@saasquatch/mint-components 1.6.2-1 → 1.6.2-4

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 (226) hide show
  1. package/dist/{esm/useValidationState-f9d1a9bf.js → cjs/AsYouType-6788393a.js} +2 -10
  2. package/dist/cjs/{ShadowViewAddon-aa0e441d.js → ShadowViewAddon-d2c9b323.js} +12 -5
  3. package/dist/cjs/{global-021e3c7a.js → global-58e5d657.js} +1 -1
  4. package/dist/cjs/{index.module-6650575b.js → index.module-7eab8006.js} +1 -1
  5. package/dist/cjs/loader.cjs.js +3 -3
  6. package/dist/cjs/mint-components.cjs.js +3 -3
  7. package/dist/cjs/{re-render-421592aa.js → re-render-111a3ebb.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 +15 -12
  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-958c8908.js → sqm-navigation-sidebar-item-view-6020bdf9.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-b685b780.js → sqm-portal-email-verification-view-eebe6329.js} +1 -1
  17. package/dist/cjs/sqm-portal-email-verification.cjs.entry.js +3 -3
  18. package/dist/cjs/{sqm-portal-footer-view-9f7f3834.js → sqm-portal-footer-view-531c12fe.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-a6b0c4a7.js → sqm-portal-profile-view-d0818828.js} +1 -1
  23. package/dist/cjs/sqm-portal-profile.cjs.entry.js +3 -3
  24. package/dist/cjs/sqm-portal-protected-route.cjs.entry.js +1 -1
  25. package/dist/cjs/sqm-portal-registration-form.cjs.entry.js +71 -18
  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-161f4899.js → useChildElements-3a4087c1.js} +1 -1
  35. package/dist/cjs/{useReferralTable-7909aa6b.js → useReferralTable-a04fa0e5.js} +3 -3
  36. package/dist/cjs/useRegistrationFormState-aa366992.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 +28 -1
  46. package/dist/collection/components/sqm-portal-registration-form/usePortalRegistrationForm.js +47 -6
  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-6a7e4f59.js → esm/AsYouType-46f67d0d.js} +1 -15
  50. package/dist/esm/{ShadowViewAddon-dba590a6.js → ShadowViewAddon-34b985aa.js} +12 -5
  51. package/dist/esm/{global-d07f1376.js → global-79d68d1f.js} +1 -1
  52. package/dist/esm/{index.module-f64d9e4c.js → index.module-8e654eb1.js} +1 -1
  53. package/dist/esm/loader.js +3 -3
  54. package/dist/esm/mint-components.js +3 -3
  55. package/dist/esm/{re-render-a805b533.js → re-render-cd65b629.js} +1 -1
  56. package/dist/esm/sqm-asset-card.entry.js +1 -1
  57. package/dist/esm/sqm-big-stat_35.entry.js +9 -6
  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-2ed13955.js → sqm-navigation-sidebar-item-view-52b5e3b9.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-527c54bd.js → sqm-portal-email-verification-view-7dafea6c.js} +1 -1
  65. package/dist/esm/sqm-portal-email-verification.entry.js +3 -3
  66. package/dist/esm/{sqm-portal-footer-view-5af8c8de.js → sqm-portal-footer-view-a857dd94.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-878b75ff.js → sqm-portal-profile-view-785773e9.js} +1 -1
  71. package/dist/esm/sqm-portal-profile.entry.js +3 -3
  72. package/dist/esm/sqm-portal-protected-route.entry.js +1 -1
  73. package/dist/esm/sqm-portal-registration-form.entry.js +69 -16
  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-c26c601d.js → useChildElements-5a1262d5.js} +1 -1
  83. package/dist/esm/{useReferralTable-ff2e6347.js → useReferralTable-6c14c78f.js} +3 -3
  84. package/dist/esm/useRegistrationFormState-1378c47e.js +18 -0
  85. package/dist/esm-es5/AsYouType-46f67d0d.js +1 -0
  86. package/dist/esm-es5/{ShadowViewAddon-dba590a6.js → ShadowViewAddon-34b985aa.js} +1 -1
  87. package/dist/esm-es5/{global-d07f1376.js → global-79d68d1f.js} +1 -1
  88. package/dist/esm-es5/{index.module-f64d9e4c.js → index.module-8e654eb1.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-a805b533.js → re-render-cd65b629.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-2ed13955.js → sqm-navigation-sidebar-item-view-52b5e3b9.js} +1 -1
  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-527c54bd.js → sqm-portal-email-verification-view-7dafea6c.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-5af8c8de.js → sqm-portal-footer-view-a857dd94.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-878b75ff.js → sqm-portal-profile-view-785773e9.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-c26c601d.js → useChildElements-5a1262d5.js} +1 -1
  119. package/dist/esm-es5/{useReferralTable-ff2e6347.js → useReferralTable-6c14c78f.js} +1 -1
  120. package/dist/esm-es5/useRegistrationFormState-1378c47e.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-82536ec7.entry.js → p-0049fc60.entry.js} +1 -1
  124. package/dist/mint-components/p-03d611e6.system.entry.js +1 -0
  125. package/dist/mint-components/{p-82e5167e.system.entry.js → p-0c6077a8.system.entry.js} +1 -1
  126. package/dist/mint-components/p-121cdc60.js +1 -0
  127. package/dist/mint-components/{p-e742d610.entry.js → p-1260d387.entry.js} +1 -1
  128. package/dist/mint-components/{p-0626cb73.js → p-12b08957.js} +1 -1
  129. package/dist/mint-components/{p-571835e1.system.entry.js → p-1670c8d5.system.entry.js} +1 -1
  130. package/dist/mint-components/{p-68f8fc59.system.js → p-201076d0.system.js} +1 -1
  131. package/dist/mint-components/{p-66d4a1de.system.js → p-20f0c0cc.system.js} +1 -1
  132. package/dist/mint-components/{p-45c2d208.system.entry.js → p-250e8ca9.system.entry.js} +1 -1
  133. package/dist/mint-components/{p-2a056bc0.entry.js → p-27557cc8.entry.js} +1 -1
  134. package/dist/mint-components/p-28002477.system.js +1 -0
  135. package/dist/mint-components/{p-a8c7d22f.entry.js → p-2db3e574.entry.js} +1 -1
  136. package/dist/mint-components/{p-cc330970.entry.js → p-36ff7a62.entry.js} +1 -1
  137. package/dist/mint-components/p-4392ba94.js +1 -0
  138. package/dist/mint-components/p-458416a0.system.js +1 -0
  139. package/dist/mint-components/{p-8217d5a2.entry.js → p-4587520e.entry.js} +1 -1
  140. package/dist/mint-components/{p-e6c1a0a6.entry.js → p-45d161fe.entry.js} +1 -1
  141. package/dist/mint-components/{p-3da83662.system.entry.js → p-47aa639f.system.entry.js} +1 -1
  142. package/dist/mint-components/p-494c99f7.js +1 -0
  143. package/dist/mint-components/{p-3a621348.system.js → p-4b34c8b6.system.js} +1 -1
  144. package/dist/mint-components/{p-09582767.system.entry.js → p-4cdef37c.system.entry.js} +1 -1
  145. package/dist/mint-components/{p-2b25d0d6.js → p-4e89da81.js} +1 -1
  146. package/dist/mint-components/p-4f4c7f69.system.entry.js +1 -0
  147. package/dist/mint-components/{p-f6aaa05d.js → p-55411493.js} +2 -2
  148. package/dist/mint-components/p-586eec52.js +1 -0
  149. package/dist/mint-components/{p-26ae2b6b.system.js → p-5aedc3a5.system.js} +1 -1
  150. package/dist/mint-components/{p-ae5b1a9a.js → p-5f2d84e2.js} +2 -2
  151. package/dist/mint-components/p-6d0a42f8.system.entry.js +1 -0
  152. package/dist/mint-components/{p-4d31c11c.entry.js → p-72435015.entry.js} +2 -2
  153. package/dist/mint-components/{p-6ea95c5e.system.entry.js → p-72dd2010.system.entry.js} +1 -1
  154. package/dist/mint-components/{p-c8b5a819.js → p-7ba78151.js} +1 -1
  155. package/dist/mint-components/p-7ca29279.system.entry.js +1 -0
  156. package/dist/mint-components/{p-5a5c9039.system.entry.js → p-89841802.system.entry.js} +1 -1
  157. package/dist/mint-components/{p-b60e43ec.system.entry.js → p-986000f9.system.entry.js} +1 -1
  158. package/dist/mint-components/p-9c58002f.entry.js +1 -0
  159. package/dist/mint-components/p-9d362d44.system.js +1 -0
  160. package/dist/mint-components/{p-788e20c2.system.js → p-a94d07d9.system.js} +1 -1
  161. package/dist/mint-components/{p-e7bf8047.js → p-ad04fd37.js} +1 -1
  162. package/dist/mint-components/p-af290d9f.entry.js +1 -0
  163. package/dist/mint-components/{p-e81e451e.system.entry.js → p-b2ad0a75.system.entry.js} +1 -1
  164. package/dist/mint-components/p-b670cff3.system.js +1 -0
  165. package/dist/mint-components/{p-c38b22d6.entry.js → p-b7b610d9.entry.js} +1 -1
  166. package/dist/mint-components/{p-f2e52e81.system.js → p-bc796bc0.system.js} +1 -1
  167. package/dist/mint-components/{p-3a62e293.js → p-bdf8f103.js} +1 -1
  168. package/dist/mint-components/p-c0221050.entry.js +13 -0
  169. package/dist/mint-components/{p-04342637.entry.js → p-c14b8c38.entry.js} +1 -1
  170. package/dist/mint-components/{p-59167300.entry.js → p-c32cc965.entry.js} +12 -12
  171. package/dist/mint-components/{p-05bc51fd.system.entry.js → p-c7514dbd.system.entry.js} +1 -1
  172. package/dist/mint-components/p-c78782b3.system.js +1 -0
  173. package/dist/mint-components/{p-ba306ce6.system.entry.js → p-c7eaa296.system.entry.js} +1 -1
  174. package/dist/mint-components/{p-eded5687.system.entry.js → p-cbe1f72a.system.entry.js} +1 -1
  175. package/dist/mint-components/{p-95543e61.system.entry.js → p-cd4ae408.system.entry.js} +1 -1
  176. package/dist/mint-components/{p-52aeaa53.entry.js → p-cfce9e5c.entry.js} +1 -1
  177. package/dist/mint-components/p-d0f1cc06.entry.js +9 -0
  178. package/dist/mint-components/p-d3c61681.system.js +1 -0
  179. package/dist/mint-components/{p-7ce9b6f0.entry.js → p-d5be4f5e.entry.js} +2 -2
  180. package/dist/mint-components/{p-b18c9d88.entry.js → p-d8c1aa2f.entry.js} +1 -1
  181. package/dist/mint-components/{p-dce5643a.js → p-d8f4703a.js} +1 -1
  182. package/dist/mint-components/{p-e09f76b7.system.js → p-da02c4e6.system.js} +1 -1
  183. package/dist/mint-components/{p-0b94ee0c.entry.js → p-dc2120a9.entry.js} +1 -1
  184. package/dist/mint-components/p-dd2506bd.system.entry.js +1 -0
  185. package/dist/mint-components/p-df9c90db.system.entry.js +1 -0
  186. package/dist/mint-components/p-e5591fd2.entry.js +1 -0
  187. package/dist/mint-components/{p-85339263.entry.js → p-e647c594.entry.js} +1 -1
  188. package/dist/mint-components/{p-698756dd.system.entry.js → p-f79a103c.system.entry.js} +1 -1
  189. package/dist/mint-components/p-fb8715c9.system.entry.js +1 -0
  190. package/dist/mint-components/p-fcb6bc22.entry.js +1 -0
  191. package/dist/mint-components/{p-c3d728b0.system.entry.js → p-fd2e16a3.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/sqm-portal-registration-form.d.ts +6 -0
  198. package/dist/types/components/sqm-portal-registration-form/usePortalRegistrationForm.d.ts +2 -0
  199. package/dist/types/components/sqm-portal-registration-form/useRegistrationFormState.d.ts +23 -0
  200. package/dist/types/components.d.ts +10 -0
  201. package/docs/docs.docx +0 -0
  202. package/docs/raisins.json +1 -1
  203. package/grapesjs/grapesjs.js +1 -1
  204. package/package.json +2 -2
  205. package/dist/esm-es5/useValidationState-f9d1a9bf.js +0 -1
  206. package/dist/mint-components/p-02388c5b.system.entry.js +0 -1
  207. package/dist/mint-components/p-14911a74.js +0 -1
  208. package/dist/mint-components/p-18bb324a.js +0 -1
  209. package/dist/mint-components/p-1e132e9b.entry.js +0 -1
  210. package/dist/mint-components/p-34bc2c5a.system.entry.js +0 -1
  211. package/dist/mint-components/p-35741c5c.system.js +0 -1
  212. package/dist/mint-components/p-3a967b5d.system.entry.js +0 -1
  213. package/dist/mint-components/p-4198e94e.entry.js +0 -1
  214. package/dist/mint-components/p-43cdfe9b.system.entry.js +0 -1
  215. package/dist/mint-components/p-6611741a.entry.js +0 -1
  216. package/dist/mint-components/p-6c661f42.system.js +0 -1
  217. package/dist/mint-components/p-7102315f.entry.js +0 -1
  218. package/dist/mint-components/p-8be5d9f4.system.entry.js +0 -1
  219. package/dist/mint-components/p-8d17170f.system.js +0 -1
  220. package/dist/mint-components/p-963c56e6.system.entry.js +0 -1
  221. package/dist/mint-components/p-99389e40.entry.js +0 -9
  222. package/dist/mint-components/p-a0197667.entry.js +0 -1
  223. package/dist/mint-components/p-c7797ffe.system.js +0 -1
  224. package/dist/mint-components/p-f09e5077.system.entry.js +0 -1
  225. package/dist/mint-components/p-f7c85612.js +0 -1
  226. package/dist/mint-components/p-fd05df17.system.js +0 -1
@@ -4,22 +4,23 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-b0129cd6.js');
6
6
  const stencilHooks_module = require('./stencil-hooks.module-87a1f4f7.js');
7
- const global = require('./global-021e3c7a.js');
7
+ const global = require('./global-58e5d657.js');
8
8
  const useCallback = require('./use-callback-e754042f.js');
9
- const index_module = require('./index.module-6650575b.js');
9
+ const index_module = require('./index.module-7eab8006.js');
10
10
  require('./extends-08099afd.js');
11
11
  const jsonpointer = require('./jsonpointer-11327262.js');
12
12
  const cjs = require('./cjs-1066ec21.js');
13
13
  require('./mixins-fe9d4112.js');
14
14
  const JSS = require('./JSS-97fd087e.js');
15
- const reRender = require('./re-render-421592aa.js');
16
- const useChildElements = require('./useChildElements-161f4899.js');
15
+ const reRender = require('./re-render-111a3ebb.js');
16
+ const useChildElements = require('./useChildElements-3a4087c1.js');
17
17
  require('./luxon-59ca7d19.js');
18
18
  const utils = require('./utils-6847bc06.js');
19
19
  require('./sqm-text-span-view-2c7d94b5.js');
20
20
  require('./sqm-portal-container-view-840db620.js');
21
- const useValidationState = require('./useValidationState-6a7e4f59.js');
22
- const ShadowViewAddon = require('./ShadowViewAddon-aa0e441d.js');
21
+ const AsYouType = require('./AsYouType-6788393a.js');
22
+ const useRegistrationFormState = require('./useRegistrationFormState-aa366992.js');
23
+ const ShadowViewAddon = require('./ShadowViewAddon-d2c9b323.js');
23
24
  require('./sqm-portal-section-view-854a3e9c.js');
24
25
 
25
26
  const BigStat = class {
@@ -180,7 +181,7 @@ function RequiredPropsError({ missingProps, heading = "There was a problem loadi
180
181
  }
181
182
 
182
183
  function useCheckboxField() {
183
- const validationState = stencilHooks_module.d(useValidationState.FORM_VALIDATION_CONTEXT);
184
+ const validationState = stencilHooks_module.d(useRegistrationFormState.FORM_VALIDATION_CONTEXT);
184
185
  const [checked, setChecked] = stencilHooks_module.useState(false);
185
186
  return {
186
187
  states: {
@@ -322,7 +323,7 @@ const DividedLayout = class {
322
323
  };
323
324
 
324
325
  function useDropdownField() {
325
- const validationState = stencilHooks_module.d(useValidationState.FORM_VALIDATION_CONTEXT);
326
+ const validationState = stencilHooks_module.d(useRegistrationFormState.FORM_VALIDATION_CONTEXT);
326
327
  return {
327
328
  states: {
328
329
  validationErrors: validationState === null || validationState === void 0 ? void 0 : validationState.validationErrors,
@@ -813,7 +814,7 @@ const SqmHookStoryContainer = class {
813
814
  };
814
815
 
815
816
  function useInputField() {
816
- const validationState = stencilHooks_module.d(useValidationState.FORM_VALIDATION_CONTEXT);
817
+ const validationState = stencilHooks_module.d(useRegistrationFormState.FORM_VALIDATION_CONTEXT);
817
818
  return {
818
819
  states: {
819
820
  validationErrors: validationState === null || validationState === void 0 ? void 0 : validationState.validationErrors,
@@ -1105,10 +1106,12 @@ function useLeaderboardDemo(props) {
1105
1106
  }
1106
1107
 
1107
1108
  function useNameFields(props) {
1108
- const validationState = stencilHooks_module.d(useValidationState.FORM_VALIDATION_CONTEXT);
1109
+ const registrationFormState = stencilHooks_module.d(useRegistrationFormState.REGISTRATION_FORM_STATE_CONTEXT);
1110
+ const validationState = stencilHooks_module.d(useRegistrationFormState.FORM_VALIDATION_CONTEXT);
1109
1111
  return {
1110
1112
  states: {
1111
1113
  validationErrors: validationState === null || validationState === void 0 ? void 0 : validationState.validationErrors,
1114
+ registrationFormState,
1112
1115
  content: {
1113
1116
  lastNameLabel: props.lastNameLabel,
1114
1117
  firstNameLabel: props.firstNameLabel,
@@ -1542,7 +1545,7 @@ function useLoginDemo(props) {
1542
1545
  function usePortalRegister(props) {
1543
1546
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
1544
1547
  const formRef = stencilHooks_module.useRef(null);
1545
- const { validationState, setValidationState } = useValidationState.useValidationState({});
1548
+ const { validationState, setValidationState } = useRegistrationFormState.useValidationState({});
1546
1549
  const [request, { loading, errors, data }] = index_module.He();
1547
1550
  const submit = async (event) => {
1548
1551
  let formControls = event.target.getFormControls();
@@ -1602,7 +1605,7 @@ function usePortalRegister(props) {
1602
1605
  const name = (_b = (_a = e.target) === null || _a === void 0 ? void 0 : _a.type) === null || _b === void 0 ? void 0 : _b.toLowerCase();
1603
1606
  if (name !== "tel")
1604
1607
  return;
1605
- const asYouType = new useValidationState.AsYouType("US");
1608
+ const asYouType = new AsYouType.AsYouType("US");
1606
1609
  e.target.value = asYouType.input(e.target.value);
1607
1610
  }, []);
1608
1611
  stencilHooks_module.useEffect(() => {
@@ -5,7 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
5
5
  const index = require('./index-b0129cd6.js');
6
6
  const stencilHooks_module = require('./stencil-hooks.module-87a1f4f7.js');
7
7
  require('./use-callback-e754042f.js');
8
- const index_module = require('./index.module-6650575b.js');
8
+ const index_module = require('./index.module-7eab8006.js');
9
9
  require('./extends-08099afd.js');
10
10
 
11
11
  async function useGraphQLClientProvider({ domain }) {
@@ -4,9 +4,9 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-b0129cd6.js');
6
6
  const stencilHooks_module = require('./stencil-hooks.module-87a1f4f7.js');
7
- const global = require('./global-021e3c7a.js');
7
+ const global = require('./global-58e5d657.js');
8
8
  require('./use-callback-e754042f.js');
9
- const index_module = require('./index.module-6650575b.js');
9
+ const index_module = require('./index.module-7eab8006.js');
10
10
  require('./extends-08099afd.js');
11
11
  const cjs = require('./cjs-1066ec21.js');
12
12
  const sqmLeaderboardRankView = require('./sqm-leaderboard-rank-view-5a3d4a88.js');
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  const index = require('./index-b0129cd6.js');
4
- const index_module = require('./index.module-6650575b.js');
4
+ const index_module = require('./index.module-7eab8006.js');
5
5
  const mixins = require('./mixins-fe9d4112.js');
6
6
  const JSS = require('./JSS-97fd087e.js');
7
7
 
@@ -5,13 +5,13 @@ Object.defineProperty(exports, '__esModule', { value: true });
5
5
  const index = require('./index-b0129cd6.js');
6
6
  const stencilHooks_module = require('./stencil-hooks.module-87a1f4f7.js');
7
7
  require('./use-callback-e754042f.js');
8
- const index_module = require('./index.module-6650575b.js');
8
+ const index_module = require('./index.module-7eab8006.js');
9
9
  require('./extends-08099afd.js');
10
10
  const cjs = require('./cjs-1066ec21.js');
11
11
  require('./mixins-fe9d4112.js');
12
12
  require('./JSS-97fd087e.js');
13
13
  const utils = require('./utils-6847bc06.js');
14
- const sqmNavigationSidebarItemView = require('./sqm-navigation-sidebar-item-view-958c8908.js');
14
+ const sqmNavigationSidebarItemView = require('./sqm-navigation-sidebar-item-view-6020bdf9.js');
15
15
 
16
16
  function useNavigationSidebarItem(props) {
17
17
  const currentPage = index_module.Fn();
@@ -5,11 +5,12 @@ Object.defineProperty(exports, '__esModule', { value: true });
5
5
  const index = require('./index-b0129cd6.js');
6
6
  const stencilHooks_module = require('./stencil-hooks.module-87a1f4f7.js');
7
7
  require('./use-callback-e754042f.js');
8
- const index_module = require('./index.module-6650575b.js');
8
+ const index_module = require('./index.module-7eab8006.js');
9
9
  require('./extends-08099afd.js');
10
10
  const cjs = require('./cjs-1066ec21.js');
11
11
  const mixins = require('./mixins-fe9d4112.js');
12
12
  const JSS = require('./JSS-97fd087e.js');
13
+ const useRegistrationFormState = require('./useRegistrationFormState-aa366992.js');
13
14
 
14
15
  var constants = {
15
16
  error: {
@@ -487,27 +488,30 @@ const vanillaStyle = `
487
488
  const sheet$1 = JSS.createStyleSheet(style$1);
488
489
  const styleString$1 = sheet$1.toString();
489
490
  function PortalResetPasswordView(props) {
490
- var _a, _b;
491
+ var _a, _b, _c, _d, _e, _f, _g, _h;
491
492
  const { states, callbacks } = props;
492
493
  return (index.h("div", { class: sheet$1.classes.InputContainer },
493
494
  index.h("style", { type: "text/css" },
494
495
  vanillaStyle,
495
496
  styleString$1),
496
- index.h("sl-input", Object.assign({ exportparts: "label: input-label", type: "password", name: "/password", label: states.content.fieldLabel || "Password", required: true, validationError: ({ value }) => {
497
+ index.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 }) => {
497
498
  if (!value) {
498
499
  return "Cannot be empty";
499
500
  }
500
- } }, (((_a = states.validationErrors) === null || _a === void 0 ? void 0 : _a.password) ? {
501
+ } }, (((_d = (_c = states.registrationFormState) === null || _c === void 0 ? void 0 : _c.initialData) === null || _d === void 0 ? void 0 : _d.password) ? {
502
+ value: (_f = (_e = states.registrationFormState) === null || _e === void 0 ? void 0 : _e.initialData) === null || _f === void 0 ? void 0 : _f.password,
503
+ }
504
+ : {}), (((_g = states.validationErrors) === null || _g === void 0 ? void 0 : _g.password) ? {
501
505
  class: sheet$1.classes.ErrorStyle,
502
- helpText: ((_b = states.validationErrors) === null || _b === void 0 ? void 0 : _b.password) || "Cannot be empty",
506
+ helpText: ((_h = states.validationErrors) === null || _h === void 0 ? void 0 : _h.password) || "Cannot be empty",
503
507
  }
504
508
  : []), { onInput: (input) => states.enableValidation && callbacks.onInput(input) })),
505
509
  states.dynamicValidation));
506
510
  }
507
511
 
508
- const CONTEXT_NAME = "sq:validation-state";
509
512
  function usePasswordField(props) {
510
- const validationState = stencilHooks_module.d(CONTEXT_NAME);
513
+ const validationState = stencilHooks_module.d(useRegistrationFormState.FORM_VALIDATION_CONTEXT);
514
+ const registrationFormState = stencilHooks_module.d(useRegistrationFormState.REGISTRATION_FORM_STATE_CONTEXT);
511
515
  const [dynamicValidation, setDynamicValidation] = stencilHooks_module.useState("");
512
516
  function onInput(input) {
513
517
  const validation = validateNewPassword(input.target.value);
@@ -517,6 +521,7 @@ function usePasswordField(props) {
517
521
  states: {
518
522
  enableValidation: props.enableValidation,
519
523
  dynamicValidation,
524
+ registrationFormState,
520
525
  validationErrors: validationState === null || validationState === void 0 ? void 0 : validationState.validationErrors,
521
526
  content: {
522
527
  fieldLabel: props.fieldLabel,
@@ -571,6 +576,7 @@ function usePasswordFieldDemo(props) {
571
576
  enableValidation: true,
572
577
  dynamicValidation,
573
578
  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) || {},
579
+ registrationFormState: {},
574
580
  content: {
575
581
  fieldLabel: "Password",
576
582
  },
@@ -5,7 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
5
5
  const index = require('./index-b0129cd6.js');
6
6
  const stencilHooks_module = require('./stencil-hooks.module-87a1f4f7.js');
7
7
  require('./use-callback-e754042f.js');
8
- const index_module = require('./index.module-6650575b.js');
8
+ const index_module = require('./index.module-7eab8006.js');
9
9
  require('./extends-08099afd.js');
10
10
  const utils = require('./utils-6847bc06.js');
11
11
 
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  const index = require('./index-b0129cd6.js');
4
- const global = require('./global-021e3c7a.js');
4
+ const global = require('./global-58e5d657.js');
5
5
  const mixins = require('./mixins-fe9d4112.js');
6
6
  const JSS = require('./JSS-97fd087e.js');
7
7
  const sqmTextSpanView = require('./sqm-text-span-view-2c7d94b5.js');
@@ -4,15 +4,15 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-b0129cd6.js');
6
6
  const stencilHooks_module = require('./stencil-hooks.module-87a1f4f7.js');
7
- require('./global-021e3c7a.js');
7
+ require('./global-58e5d657.js');
8
8
  require('./use-callback-e754042f.js');
9
- const index_module = require('./index.module-6650575b.js');
9
+ const index_module = require('./index.module-7eab8006.js');
10
10
  require('./extends-08099afd.js');
11
11
  const cjs = require('./cjs-1066ec21.js');
12
12
  require('./mixins-fe9d4112.js');
13
13
  require('./JSS-97fd087e.js');
14
14
  require('./sqm-text-span-view-2c7d94b5.js');
15
- const sqmPortalEmailVerificationView = require('./sqm-portal-email-verification-view-b685b780.js');
15
+ const sqmPortalEmailVerificationView = require('./sqm-portal-email-verification-view-eebe6329.js');
16
16
 
17
17
  function usePortalEmailVerification(props) {
18
18
  var _a, _b, _c, _d, _e, _f, _g, _h, _j;
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  const index = require('./index-b0129cd6.js');
4
- const global = require('./global-021e3c7a.js');
4
+ const global = require('./global-58e5d657.js');
5
5
  const JSS = require('./JSS-97fd087e.js');
6
6
 
7
7
  function PoweredByImg({ color = "#A6A6A6", width = 190, height = 29, }) {
@@ -4,13 +4,13 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-b0129cd6.js');
6
6
  const stencilHooks_module = require('./stencil-hooks.module-87a1f4f7.js');
7
- require('./global-021e3c7a.js');
7
+ require('./global-58e5d657.js');
8
8
  require('./use-callback-e754042f.js');
9
- require('./index.module-6650575b.js');
9
+ require('./index.module-7eab8006.js');
10
10
  require('./extends-08099afd.js');
11
11
  require('./JSS-97fd087e.js');
12
12
  const utils = require('./utils-6847bc06.js');
13
- const sqmPortalFooterView = require('./sqm-portal-footer-view-9f7f3834.js');
13
+ const sqmPortalFooterView = require('./sqm-portal-footer-view-531c12fe.js');
14
14
 
15
15
  const PortalFooter = class {
16
16
  constructor(hostRef) {
@@ -5,7 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
5
5
  const index = require('./index-b0129cd6.js');
6
6
  const stencilHooks_module = require('./stencil-hooks.module-87a1f4f7.js');
7
7
  require('./use-callback-e754042f.js');
8
- const index_module = require('./index.module-6650575b.js');
8
+ const index_module = require('./index.module-7eab8006.js');
9
9
  require('./extends-08099afd.js');
10
10
  const jsonpointer = require('./jsonpointer-11327262.js');
11
11
  const cjs = require('./cjs-1066ec21.js');
@@ -5,7 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
5
5
  const index = require('./index-b0129cd6.js');
6
6
  const stencilHooks_module = require('./stencil-hooks.module-87a1f4f7.js');
7
7
  require('./use-callback-e754042f.js');
8
- const index_module = require('./index.module-6650575b.js');
8
+ const index_module = require('./index.module-7eab8006.js');
9
9
  require('./extends-08099afd.js');
10
10
 
11
11
  function usePortalLogout({ nextPage }) {
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  const index = require('./index-b0129cd6.js');
4
- const global = require('./global-021e3c7a.js');
4
+ const global = require('./global-58e5d657.js');
5
5
  const JSS = require('./JSS-97fd087e.js');
6
6
  const sqmTextSpanView = require('./sqm-text-span-view-2c7d94b5.js');
7
7
  const sqmPortalContainerView = require('./sqm-portal-container-view-840db620.js');
@@ -4,16 +4,16 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-b0129cd6.js');
6
6
  const stencilHooks_module = require('./stencil-hooks.module-87a1f4f7.js');
7
- require('./global-021e3c7a.js');
7
+ require('./global-58e5d657.js');
8
8
  require('./use-callback-e754042f.js');
9
- const index_module = require('./index.module-6650575b.js');
9
+ const index_module = require('./index.module-7eab8006.js');
10
10
  require('./extends-08099afd.js');
11
11
  const cjs = require('./cjs-1066ec21.js');
12
12
  require('./JSS-97fd087e.js');
13
13
  const utils = require('./utils-6847bc06.js');
14
14
  require('./sqm-text-span-view-2c7d94b5.js');
15
15
  require('./sqm-portal-container-view-840db620.js');
16
- const sqmPortalProfileView = require('./sqm-portal-profile-view-a6b0c4a7.js');
16
+ const sqmPortalProfileView = require('./sqm-portal-profile-view-d0818828.js');
17
17
 
18
18
  const GET_USER = index_module.dist.gql `
19
19
  query {
@@ -5,7 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
5
5
  const index = require('./index-b0129cd6.js');
6
6
  const stencilHooks_module = require('./stencil-hooks.module-87a1f4f7.js');
7
7
  require('./use-callback-e754042f.js');
8
- const index_module = require('./index.module-6650575b.js');
8
+ const index_module = require('./index.module-7eab8006.js');
9
9
  require('./extends-08099afd.js');
10
10
 
11
11
  function usePortalProtectedRoute({ requireEmailVerification, redirectTo, redirectToUnverified, }) {
@@ -5,14 +5,15 @@ Object.defineProperty(exports, '__esModule', { value: true });
5
5
  const index = require('./index-b0129cd6.js');
6
6
  const stencilHooks_module = require('./stencil-hooks.module-87a1f4f7.js');
7
7
  const useCallback = require('./use-callback-e754042f.js');
8
- const index_module = require('./index.module-6650575b.js');
8
+ const index_module = require('./index.module-7eab8006.js');
9
9
  require('./extends-08099afd.js');
10
10
  const jsonpointer = require('./jsonpointer-11327262.js');
11
11
  const cjs = require('./cjs-1066ec21.js');
12
12
  const mixins = require('./mixins-fe9d4112.js');
13
13
  const JSS = require('./JSS-97fd087e.js');
14
14
  const sqmTextSpanView = require('./sqm-text-span-view-2c7d94b5.js');
15
- const useValidationState = require('./useValidationState-6a7e4f59.js');
15
+ const AsYouType = require('./AsYouType-6788393a.js');
16
+ const useRegistrationFormState = require('./useRegistrationFormState-aa366992.js');
16
17
 
17
18
  const style = {
18
19
  Wrapper: { ...mixins.AuthWrapper, "max-width": "600px" },
@@ -43,7 +44,7 @@ sqm-portal-register {
43
44
  const sheet = JSS.createStyleSheet(style);
44
45
  const styleString = sheet.toString();
45
46
  function PortalRegistrationFormView(props) {
46
- var _a, _b, _c, _d, _e, _f, _g, _h;
47
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u;
47
48
  const { states, refs, callbacks, content } = props;
48
49
  if (states.error) {
49
50
  window.scrollTo({ top: 0, left: 0, behavior: "smooth" });
@@ -54,10 +55,11 @@ function PortalRegistrationFormView(props) {
54
55
  styleString),
55
56
  index.h(sqmTextSpanView.TextSpanView, { type: "h3" }, content.pageLabel),
56
57
  index.h("sl-form", { class: sheet.classes.Column, "onSl-submit": callbacks.submit, ref: (el) => (refs.formRef.current = el), novalidate: true },
57
- states.error && (index.h("sqm-form-message", { type: "error", exportparts: "erroralert-icon" },
58
- index.h("div", { part: "erroralert-text" }, props.states.error))),
58
+ ((_a = states.registrationFormState) === null || _a === void 0 ? void 0 : _a.disabled) ? (index.h("sqm-form-message", { type: "error", exportparts: "erroralert-icon" },
59
+ index.h("div", { part: "erroralert-text" }, states.registrationFormState.disabledMessage))) : (states.error && (index.h("sqm-form-message", { type: "error", exportparts: "erroralert-icon" },
60
+ index.h("div", { part: "erroralert-text" }, props.states.error)))),
59
61
  content.formData,
60
- !states.hideInputs && (index.h("sl-input", Object.assign({ exportparts: "label: input-label", type: "email", name: "/email", label: content.emailLabel || "Email", disabled: states.loading, required: true, validationError: ({ value }) => {
62
+ !states.hideInputs && (index.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 }) => {
61
63
  if (!value) {
62
64
  return "Cannot be empty";
63
65
  }
@@ -65,40 +67,78 @@ function PortalRegistrationFormView(props) {
65
67
  if (!value.includes("@")) {
66
68
  return "Must be a valid email address";
67
69
  }
68
- } }, (((_b = (_a = states.validationState) === null || _a === void 0 ? void 0 : _a.validationErrors) === null || _b === void 0 ? void 0 : _b.email) ? {
70
+ } }, (((_d = (_c = states.registrationFormState) === null || _c === void 0 ? void 0 : _c.initialData) === null || _d === void 0 ? void 0 : _d.email) ? {
71
+ value: (_f = (_e = states.registrationFormState) === null || _e === void 0 ? void 0 : _e.initialData) === null || _f === void 0 ? void 0 : _f.email,
72
+ }
73
+ : {}), (((_h = (_g = states.validationState) === null || _g === void 0 ? void 0 : _g.validationErrors) === null || _h === void 0 ? void 0 : _h.email) ? {
69
74
  class: sheet.classes.ErrorStyle,
70
- helpText: ((_d = (_c = states.validationState) === null || _c === void 0 ? void 0 : _c.validationErrors) === null || _d === void 0 ? void 0 : _d.email) ||
75
+ helpText: ((_k = (_j = states.validationState) === null || _j === void 0 ? void 0 : _j.validationErrors) === null || _k === void 0 ? void 0 : _k.email) ||
71
76
  "Cannot be empty",
72
77
  }
73
78
  : [])))),
74
79
  !states.hideInputs && (index.h("sqm-password-field", { fieldLabel: content.passwordLabel, "enable-validation": states.enablePasswordValidation })),
75
80
  content.passwordField,
76
- !states.hideInputs && states.confirmPassword && (index.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) ? {
81
+ !states.hideInputs && states.confirmPassword && (index.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) ? {
82
+ value: (_p = (_o = states.registrationFormState) === null || _o === void 0 ? void 0 : _o.initialData) === null || _p === void 0 ? void 0 : _p.confirmPassword,
83
+ }
84
+ : {}), (((_r = (_q = states.validationState) === null || _q === void 0 ? void 0 : _q.validationErrors) === null || _r === void 0 ? void 0 : _r.confirmPassword) ? {
77
85
  class: sheet.classes.ErrorStyle,
78
- helpText: ((_h = (_g = states.validationState) === null || _g === void 0 ? void 0 : _g.validationErrors) === null || _h === void 0 ? void 0 : _h.confirmPassword) ||
86
+ helpText: ((_t = (_s = states.validationState) === null || _s === void 0 ? void 0 : _s.validationErrors) === null || _t === void 0 ? void 0 : _t.confirmPassword) ||
79
87
  "Cannot be empty",
80
88
  }
81
89
  : [])))),
82
90
  content.terms,
83
91
  index.h("div", { class: sheet.classes.ButtonsContainer },
84
- index.h("sl-button", { submit: true, loading: states.loading, exportparts: "base: primarybutton-base", type: "primary" }, content.submitLabel || "Register"),
92
+ index.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"),
85
93
  content.secondaryButton))));
86
94
  }
87
95
 
96
+ const RegistrationFormQuery = index_module.dist.gql `
97
+ query RegistrationFormQuery($key: String!) {
98
+ form(key: $key) {
99
+ key
100
+ type
101
+ initialData {
102
+ initialData
103
+ isEnabled
104
+ isEnabledErrorMessage
105
+ }
106
+ }
107
+ }
108
+ `;
88
109
  function usePortalRegistrationForm(props) {
89
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
110
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
90
111
  const formRef = stencilHooks_module.useRef(null);
91
- const { validationState, setValidationState } = useValidationState.useValidationState({});
112
+ const { registrationFormState, setRegistrationFormState } = useRegistrationFormState.useRegistrationFormState({});
113
+ const { validationState, setValidationState } = useRegistrationFormState.useValidationState({});
92
114
  const [request, { loading, errors, data, formError }] = index_module.We();
115
+ const queryResponse = index_module.wn(RegistrationFormQuery, { key: props.formKey });
116
+ const formLoading = loading || queryResponse.loading;
117
+ stencilHooks_module.useEffect(() => {
118
+ var _a, _b, _c;
119
+ const initialData = (_a = queryResponse === null || queryResponse === void 0 ? void 0 : queryResponse.data) === null || _a === void 0 ? void 0 : _a.form.initialData.initialData;
120
+ const disabled = !((_b = queryResponse === null || queryResponse === void 0 ? void 0 : queryResponse.data) === null || _b === void 0 ? void 0 : _b.form.initialData.isEnabled);
121
+ const disabledMessage = ((_c = queryResponse === null || queryResponse === void 0 ? void 0 : queryResponse.data) === null || _c === void 0 ? void 0 : _c.form.initialData.isEnabledErrorMessage) ||
122
+ "The registration form is currently disabled.";
123
+ const formState = {
124
+ loading: formLoading,
125
+ disabled,
126
+ disabledMessage,
127
+ initialData,
128
+ };
129
+ setRegistrationFormState(formState);
130
+ }, [(_a = queryResponse === null || queryResponse === void 0 ? void 0 : queryResponse.data) === null || _a === void 0 ? void 0 : _a.form.initialData, formLoading]);
93
131
  const submit = async (event) => {
94
132
  let formControls = event.target.getFormControls();
95
133
  let formData = {};
96
134
  let validationErrors = {};
97
135
  formControls === null || formControls === void 0 ? void 0 : formControls.forEach((control) => {
136
+ console.log({ control }, control.name);
98
137
  if (!control.name)
99
138
  return;
100
139
  const key = control.name;
101
140
  const value = control.value;
141
+ // control.value = initialData[key] || control.value;
102
142
  jsonpointer.jsonpointer.set(formData, key, value);
103
143
  // required validation
104
144
  if (control.required && !value) {
@@ -131,6 +171,7 @@ function usePortalRegistrationForm(props) {
131
171
  formData = { ...formData };
132
172
  const redirectPath = props.redirectPath;
133
173
  const variables = {
174
+ key: props.formKey,
134
175
  email,
135
176
  password,
136
177
  formData,
@@ -148,7 +189,7 @@ function usePortalRegistrationForm(props) {
148
189
  const name = (_b = (_a = e.target) === null || _a === void 0 ? void 0 : _a.type) === null || _b === void 0 ? void 0 : _b.toLowerCase();
149
190
  if (name !== "tel")
150
191
  return;
151
- const asYouType = new useValidationState.AsYouType("US");
192
+ const asYouType = new AsYouType.AsYouType("US");
152
193
  e.target.value = asYouType.input(e.target.value);
153
194
  }, []);
154
195
  stencilHooks_module.useEffect(() => {
@@ -171,21 +212,27 @@ function usePortalRegistrationForm(props) {
171
212
  };
172
213
  }, [formRef.current]);
173
214
  let errorMessage = "";
174
- if ((_a = errors === null || errors === void 0 ? void 0 : errors.response) === null || _a === void 0 ? void 0 : _a["error"]) {
215
+ if (((_b = queryResponse === null || queryResponse === void 0 ? void 0 : queryResponse.data) === null || _b === void 0 ? void 0 : _b.form.initialData.isEnabled) === false) {
216
+ errorMessage =
217
+ ((_c = queryResponse === null || queryResponse === void 0 ? void 0 : queryResponse.data) === null || _c === void 0 ? void 0 : _c.form.initialData.isEnabledErrorMessage) ||
218
+ "The registration form is disabled";
219
+ }
220
+ else if ((_d = errors === null || errors === void 0 ? void 0 : errors.response) === null || _d === void 0 ? void 0 : _d["error"]) {
175
221
  errorMessage = "Network request failed";
176
222
  }
177
- 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)) {
223
+ 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)) {
178
224
  errorMessage = "Network request failed";
179
225
  }
180
226
  else {
181
227
  errorMessage =
182
- 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);
228
+ 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);
183
229
  }
184
230
  return {
185
231
  states: {
186
- loading,
232
+ loading: loading || queryResponse.loading,
187
233
  error: errorMessage,
188
234
  validationState,
235
+ registrationFormState,
189
236
  confirmPassword: props.confirmPassword,
190
237
  hideInputs: props.hideInputs,
191
238
  loginPath: props.loginPath,
@@ -264,6 +311,12 @@ const PortalRegistrationForm = class {
264
311
  * @uiName Login Path
265
312
  */
266
313
  this.loginPath = "/login";
314
+ /**
315
+ * Microsite Registration Form Key
316
+ *
317
+ * @uiName Form Key
318
+ */
319
+ this.formKey = "microsite-registration-form";
267
320
  stencilHooks_module.h$1(this);
268
321
  }
269
322
  disconnectedCallback() { }
@@ -5,7 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
5
5
  const index = require('./index-b0129cd6.js');
6
6
  const stencilHooks_module = require('./stencil-hooks.module-87a1f4f7.js');
7
7
  require('./use-callback-e754042f.js');
8
- const index_module = require('./index.module-6650575b.js');
8
+ const index_module = require('./index.module-7eab8006.js');
9
9
  require('./extends-08099afd.js');
10
10
  const jsonpointer = require('./jsonpointer-11327262.js');
11
11
  const cjs = require('./cjs-1066ec21.js');
@@ -5,7 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
5
5
  const index = require('./index-b0129cd6.js');
6
6
  const stencilHooks_module = require('./stencil-hooks.module-87a1f4f7.js');
7
7
  require('./use-callback-e754042f.js');
8
- const index_module = require('./index.module-6650575b.js');
8
+ const index_module = require('./index.module-7eab8006.js');
9
9
  require('./extends-08099afd.js');
10
10
  const cjs = require('./cjs-1066ec21.js');
11
11
  require('./mixins-fe9d4112.js');
@@ -24,7 +24,6 @@ function usePortalVerifyEmail({ nextPage, failedPage }) {
24
24
  const urlParams = new URLSearchParams(window.location.search);
25
25
  const oobCode = urlParams.get("oobCode");
26
26
  const nextPageOverride = urlParams.get("nextPage");
27
- urlParams.delete("oobCode");
28
27
  const failed = () => {
29
28
  return index_module.In.push({
30
29
  pathname: failedPage,
@@ -5,9 +5,9 @@ Object.defineProperty(exports, '__esModule', { value: true });
5
5
  const index = require('./index-b0129cd6.js');
6
6
  const stencilHooks_module = require('./stencil-hooks.module-87a1f4f7.js');
7
7
  require('./use-callback-e754042f.js');
8
- const index_module = require('./index.module-6650575b.js');
8
+ const index_module = require('./index.module-7eab8006.js');
9
9
  require('./extends-08099afd.js');
10
- const useChildElements = require('./useChildElements-161f4899.js');
10
+ const useChildElements = require('./useChildElements-3a4087c1.js');
11
11
  const utils = require('./utils-6847bc06.js');
12
12
 
13
13
  const TabsView = ({ content, placement, }) => {
@@ -4,18 +4,18 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-b0129cd6.js');
6
6
  const stencilHooks_module = require('./stencil-hooks.module-87a1f4f7.js');
7
- const global = require('./global-021e3c7a.js');
7
+ const global = require('./global-58e5d657.js');
8
8
  require('./use-callback-e754042f.js');
9
- const index_module = require('./index.module-6650575b.js');
9
+ const index_module = require('./index.module-7eab8006.js');
10
10
  require('./extends-08099afd.js');
11
11
  const cjs = require('./cjs-1066ec21.js');
12
12
  require('./mixins-fe9d4112.js');
13
13
  const JSS = require('./JSS-97fd087e.js');
14
14
  const GenericTableView = require('./GenericTableView-4921be4b.js');
15
- const reRender = require('./re-render-421592aa.js');
16
- const useChildElements = require('./useChildElements-161f4899.js');
15
+ const reRender = require('./re-render-111a3ebb.js');
16
+ const useChildElements = require('./useChildElements-3a4087c1.js');
17
17
  const luxon = require('./luxon-59ca7d19.js');
18
- const useReferralTable = require('./useReferralTable-7909aa6b.js');
18
+ const useReferralTable = require('./useReferralTable-a04fa0e5.js');
19
19
  const utils = require('./utils-6847bc06.js');
20
20
  const sqmTextSpanView = require('./sqm-text-span-view-2c7d94b5.js');
21
21
 
@@ -5,9 +5,9 @@ Object.defineProperty(exports, '__esModule', { value: true });
5
5
  const index = require('./index-b0129cd6.js');
6
6
  const stencilHooks_module = require('./stencil-hooks.module-87a1f4f7.js');
7
7
  require('./use-callback-e754042f.js');
8
- require('./index.module-6650575b.js');
8
+ require('./index.module-7eab8006.js');
9
9
  require('./extends-08099afd.js');
10
- const reRender = require('./re-render-421592aa.js');
10
+ const reRender = require('./re-render-111a3ebb.js');
11
11
 
12
12
  const RewardTableCustomerNoteColumn = class {
13
13
  constructor(hostRef) {