@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
@@ -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-7eab8006.js');
8
+ const index_module = require('./index.module-ff45cbf1.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-58e5d657.js');
4
+ const global = require('./global-b3587dc9.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-58e5d657.js');
7
+ require('./global-b3587dc9.js');
8
8
  require('./use-callback-e754042f.js');
9
- const index_module = require('./index.module-7eab8006.js');
9
+ const index_module = require('./index.module-ff45cbf1.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-d0818828.js');
16
+ const sqmPortalProfileView = require('./sqm-portal-profile-view-f9104d25.js');
17
17
 
18
18
  const GET_USER = index_module.dist.gql `
19
19
  query {
@@ -64,7 +64,7 @@ function usePortalProfile(props) {
64
64
  const [userData, setUserData] = stencilHooks_module.useState(undefined);
65
65
  const [formState, setFormState] = stencilHooks_module.useState(defaultFormState);
66
66
  const userDataResponse = index_module.wn(GET_USER, {}, !(userIdent === null || userIdent === void 0 ? void 0 : userIdent.jwt));
67
- const [upsertUser, upsertUserResponse] = index_module.je(UPSERT_USER);
67
+ const [upsertUser, upsertUserResponse] = index_module.$e(UPSERT_USER);
68
68
  stencilHooks_module.useEffect(() => {
69
69
  if (upsertUserResponse === null || upsertUserResponse === void 0 ? void 0 : upsertUserResponse.loading)
70
70
  return;
@@ -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-7eab8006.js');
8
+ const index_module = require('./index.module-ff45cbf1.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-7eab8006.js');
8
+ const index_module = require('./index.module-ff45cbf1.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-942d11da.js');
15
+ const AsYouType = require('./AsYouType-6788393a.js');
16
+ const useRegistrationFormState = require('./useRegistrationFormState-793a7958.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) === false;
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) {
@@ -128,14 +168,15 @@ function usePortalRegistrationForm(props) {
128
168
  delete formData.email;
129
169
  delete formData.password;
130
170
  delete formData.confirmPassword;
131
- formData = { ...formData };
132
171
  const redirectPath = props.redirectPath;
133
172
  const variables = {
134
173
  key: props.formKey,
135
- email,
136
- password,
137
- formData,
138
- redirectPath,
174
+ formData: {
175
+ email,
176
+ password,
177
+ redirectPath,
178
+ ...formData,
179
+ },
139
180
  };
140
181
  try {
141
182
  await request(variables);
@@ -149,7 +190,7 @@ function usePortalRegistrationForm(props) {
149
190
  const name = (_b = (_a = e.target) === null || _a === void 0 ? void 0 : _a.type) === null || _b === void 0 ? void 0 : _b.toLowerCase();
150
191
  if (name !== "tel")
151
192
  return;
152
- const asYouType = new useValidationState.AsYouType("US");
193
+ const asYouType = new AsYouType.AsYouType("US");
153
194
  e.target.value = asYouType.input(e.target.value);
154
195
  }, []);
155
196
  stencilHooks_module.useEffect(() => {
@@ -172,21 +213,27 @@ function usePortalRegistrationForm(props) {
172
213
  };
173
214
  }, [formRef.current]);
174
215
  let errorMessage = "";
175
- if ((_a = errors === null || errors === void 0 ? void 0 : errors.response) === null || _a === void 0 ? void 0 : _a["error"]) {
216
+ if (((_b = queryResponse === null || queryResponse === void 0 ? void 0 : queryResponse.data) === null || _b === void 0 ? void 0 : _b.form.initialData.isEnabled) === false) {
217
+ errorMessage =
218
+ ((_c = queryResponse === null || queryResponse === void 0 ? void 0 : queryResponse.data) === null || _c === void 0 ? void 0 : _c.form.initialData.isEnabledErrorMessage) ||
219
+ "The registration form is disabled";
220
+ }
221
+ else if ((_d = errors === null || errors === void 0 ? void 0 : errors.response) === null || _d === void 0 ? void 0 : _d["error"]) {
176
222
  errorMessage = "Network request failed";
177
223
  }
178
- 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)) {
224
+ 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)) {
179
225
  errorMessage = "Network request failed";
180
226
  }
181
227
  else {
182
228
  errorMessage =
183
- 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);
229
+ 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);
184
230
  }
185
231
  return {
186
232
  states: {
187
- loading,
233
+ loading: loading || queryResponse.loading,
188
234
  error: errorMessage,
189
235
  validationState,
236
+ registrationFormState,
190
237
  confirmPassword: props.confirmPassword,
191
238
  hideInputs: props.hideInputs,
192
239
  loginPath: props.loginPath,
@@ -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-7eab8006.js');
8
+ const index_module = require('./index.module-ff45cbf1.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-7eab8006.js');
8
+ const index_module = require('./index.module-ff45cbf1.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-7eab8006.js');
8
+ const index_module = require('./index.module-ff45cbf1.js');
9
9
  require('./extends-08099afd.js');
10
- const useChildElements = require('./useChildElements-3a4087c1.js');
10
+ const useChildElements = require('./useChildElements-658fefa1.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-58e5d657.js');
7
+ const global = require('./global-b3587dc9.js');
8
8
  require('./use-callback-e754042f.js');
9
- const index_module = require('./index.module-7eab8006.js');
9
+ const index_module = require('./index.module-ff45cbf1.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-111a3ebb.js');
16
- const useChildElements = require('./useChildElements-3a4087c1.js');
15
+ const reRender = require('./re-render-e5491a50.js');
16
+ const useChildElements = require('./useChildElements-658fefa1.js');
17
17
  const luxon = require('./luxon-59ca7d19.js');
18
- const useReferralTable = require('./useReferralTable-a04fa0e5.js');
18
+ const useReferralTable = require('./useReferralTable-ae05b785.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-7eab8006.js');
8
+ require('./index.module-ff45cbf1.js');
9
9
  require('./extends-08099afd.js');
10
- const reRender = require('./re-render-111a3ebb.js');
10
+ const reRender = require('./re-render-e5491a50.js');
11
11
 
12
12
  const RewardTableCustomerNoteColumn = class {
13
13
  constructor(hostRef) {
@@ -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-58e5d657.js');
7
+ const global = require('./global-b3587dc9.js');
8
8
  require('./use-callback-e754042f.js');
9
- const index_module = require('./index.module-7eab8006.js');
9
+ const index_module = require('./index.module-ff45cbf1.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-111a3ebb.js');
16
- const useChildElements = require('./useChildElements-3a4087c1.js');
15
+ const reRender = require('./re-render-e5491a50.js');
16
+ const useChildElements = require('./useChildElements-658fefa1.js');
17
17
  const luxon = require('./luxon-59ca7d19.js');
18
- const useReferralTable = require('./useReferralTable-a04fa0e5.js');
18
+ const useReferralTable = require('./useReferralTable-ae05b785.js');
19
19
  const utils = require('./utils-6847bc06.js');
20
20
 
21
21
  const mockRewardData = (count = 4) => {
@@ -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-58e5d657.js');
7
+ require('./global-b3587dc9.js');
8
8
  require('./use-callback-e754042f.js');
9
- const index_module = require('./index.module-7eab8006.js');
9
+ const index_module = require('./index.module-ff45cbf1.js');
10
10
  require('./extends-08099afd.js');
11
11
  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
- require('./useChildElements-3a4087c1.js');
15
+ require('./useChildElements-658fefa1.js');
16
16
  const luxon = require('./luxon-59ca7d19.js');
17
17
  require('./utils-6847bc06.js');
18
18
  require('./sqm-text-span-view-2c7d94b5.js');
@@ -20,15 +20,15 @@ const sqmAssetCardView = require('./sqm-asset-card-view-3da8cac1.js');
20
20
  const sqmHeroView = require('./sqm-hero-view-46223e34.js');
21
21
  const sqmLeaderboardRankView = require('./sqm-leaderboard-rank-view-5a3d4a88.js');
22
22
  const sqmNavigationSidebarView = require('./sqm-navigation-sidebar-view-969adcdc.js');
23
- const sqmNavigationSidebarItemView = require('./sqm-navigation-sidebar-item-view-6020bdf9.js');
24
- const sqmPortalEmailVerificationView = require('./sqm-portal-email-verification-view-eebe6329.js');
25
- const sqmPortalFooterView = require('./sqm-portal-footer-view-531c12fe.js');
23
+ const sqmNavigationSidebarItemView = require('./sqm-navigation-sidebar-item-view-e8f500f9.js');
24
+ const sqmPortalEmailVerificationView = require('./sqm-portal-email-verification-view-dd27bba3.js');
25
+ const sqmPortalFooterView = require('./sqm-portal-footer-view-93f8ec0e.js');
26
26
  const sqmPortalForgotPasswordView = require('./sqm-portal-forgot-password-view-fed1f563.js');
27
27
  const sqmPortalContainerView = require('./sqm-portal-container-view-840db620.js');
28
- const sqmPortalProfileView = require('./sqm-portal-profile-view-d0818828.js');
28
+ const sqmPortalProfileView = require('./sqm-portal-profile-view-f9104d25.js');
29
29
  const sqmPortalResetPasswordView = require('./sqm-portal-reset-password-view-f8dc0b79.js');
30
30
  const sqmPortalVerifyEmailView = require('./sqm-portal-verify-email-view-cc59877c.js');
31
- const ShadowViewAddon = require('./ShadowViewAddon-1c9ca20c.js');
31
+ const ShadowViewAddon = require('./ShadowViewAddon-33ae7c4f.js');
32
32
  const sqmPortalSectionView = require('./sqm-portal-section-view-854a3e9c.js');
33
33
 
34
34
  /**
@@ -5986,6 +5986,7 @@ const Start = () => {
5986
5986
  initValue: "",
5987
5987
  states: {
5988
5988
  enableValidation: true,
5989
+ registrationFormState: {},
5989
5990
  validationErrors: {},
5990
5991
  content: {
5991
5992
  fieldLabel: "Password",
@@ -5999,6 +6000,7 @@ const EmptyError = () => {
5999
6000
  states: {
6000
6001
  enableValidation: true,
6001
6002
  validationErrors: { password: "Cannot be empty" },
6003
+ registrationFormState: {},
6002
6004
  content: {
6003
6005
  fieldLabel: "Password",
6004
6006
  },
@@ -6010,6 +6012,7 @@ const ValidationError = () => {
6010
6012
  initValue: "asdf",
6011
6013
  states: {
6012
6014
  enableValidation: true,
6015
+ registrationFormState: {},
6013
6016
  validationErrors: { password: "Incomplete" },
6014
6017
  content: {
6015
6018
  fieldLabel: "Password",
@@ -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-7eab8006.js');
8
+ const index_module = require('./index.module-ff45cbf1.js');
9
9
  require('./extends-08099afd.js');
10
- const useChildElements = require('./useChildElements-3a4087c1.js');
10
+ const useChildElements = require('./useChildElements-658fefa1.js');
11
11
  const utils = require('./utils-6847bc06.js');
12
12
 
13
13
  const TabsView = ({ content, placement, }) => {
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  const stencilHooks_module = require('./stencil-hooks.module-87a1f4f7.js');
4
- const index_module = require('./index.module-7eab8006.js');
4
+ const index_module = require('./index.module-ff45cbf1.js');
5
5
 
6
6
  function useChildElements() {
7
7
  const host = index_module.P();
@@ -2,9 +2,9 @@
2
2
 
3
3
  const index = require('./index-b0129cd6.js');
4
4
  const stencilHooks_module = require('./stencil-hooks.module-87a1f4f7.js');
5
- const index_module = require('./index.module-7eab8006.js');
6
- const reRender = require('./re-render-111a3ebb.js');
7
- const useChildElements = require('./useChildElements-3a4087c1.js');
5
+ const index_module = require('./index.module-ff45cbf1.js');
6
+ const reRender = require('./re-render-e5491a50.js');
7
+ const useChildElements = require('./useChildElements-658fefa1.js');
8
8
 
9
9
  const debug = stencilHooks_module.browser("sq:useReferralTable");
10
10
  const CSS_NAMESPACE = "sqm-referral-table";
@@ -0,0 +1,23 @@
1
+ 'use strict';
2
+
3
+ const stencilHooks_module = require('./stencil-hooks.module-87a1f4f7.js');
4
+ const index_module = require('./index.module-ff45cbf1.js');
5
+
6
+ const FORM_VALIDATION_CONTEXT = "sq:validation-state";
7
+ function useValidationState(formState) {
8
+ const host = index_module.P();
9
+ const [validationState, setValidationState] = stencilHooks_module.y(host, FORM_VALIDATION_CONTEXT, formState);
10
+ return { validationState, setValidationState };
11
+ }
12
+
13
+ const REGISTRATION_FORM_STATE_CONTEXT = "sq:registration-form-state";
14
+ function useRegistrationFormState(formState) {
15
+ const host = index_module.P();
16
+ const [registrationFormState, setRegistrationFormState] = stencilHooks_module.y(host, REGISTRATION_FORM_STATE_CONTEXT, formState);
17
+ return { registrationFormState, setRegistrationFormState };
18
+ }
19
+
20
+ exports.FORM_VALIDATION_CONTEXT = FORM_VALIDATION_CONTEXT;
21
+ exports.REGISTRATION_FORM_STATE_CONTEXT = REGISTRATION_FORM_STATE_CONTEXT;
22
+ exports.useRegistrationFormState = useRegistrationFormState;
23
+ exports.useValidationState = useValidationState;
@@ -24,18 +24,25 @@ sl-input::part(label){
24
24
  const sheet = createStyleSheet(style);
25
25
  const styleString = sheet.toString();
26
26
  export function NameFieldsView(props) {
27
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
27
28
  const { states } = props;
28
29
  const validationErrors = states === null || states === void 0 ? void 0 : states.validationErrors;
29
30
  return (h("div", { class: sheet.classes.FieldsContainer },
30
31
  h("style", { type: "text/css" },
31
32
  vanillaStyle,
32
33
  styleString),
33
- h("sl-input", Object.assign({ exportparts: "label: input-label", name: "/firstName", type: "text", label: states.content.firstNameLabel, required: true }, ((validationErrors === null || validationErrors === void 0 ? void 0 : validationErrors.firstName) ? {
34
+ h("sl-input", Object.assign({ exportparts: "label: input-label", name: "/firstName", type: "text", label: states.content.firstNameLabel, 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) }, (((_d = (_c = states.registrationFormState) === null || _c === void 0 ? void 0 : _c.initialData) === null || _d === void 0 ? void 0 : _d.firstName) ? {
35
+ value: (_f = (_e = states.registrationFormState) === null || _e === void 0 ? void 0 : _e.initialData) === null || _f === void 0 ? void 0 : _f.firstName,
36
+ }
37
+ : {}), ((validationErrors === null || validationErrors === void 0 ? void 0 : validationErrors.firstName) ? {
34
38
  class: sheet.classes.ErrorStyle,
35
39
  helpText: (validationErrors === null || validationErrors === void 0 ? void 0 : validationErrors.firstName) || "Cannot be empty",
36
40
  }
37
41
  : []))),
38
- h("sl-input", Object.assign({ exportparts: "label: input-label", name: "/lastName", type: "text", label: states.content.lastNameLabel, required: true }, ((validationErrors === null || validationErrors === void 0 ? void 0 : validationErrors.lastName) ? {
42
+ h("sl-input", Object.assign({ exportparts: "label: input-label", name: "/lastName", type: "text", label: states.content.lastNameLabel, required: true, disabled: ((_g = states.registrationFormState) === null || _g === void 0 ? void 0 : _g.loading) || ((_h = states.registrationFormState) === null || _h === void 0 ? void 0 : _h.disabled) }, (((_k = (_j = states.registrationFormState) === null || _j === void 0 ? void 0 : _j.initialData) === null || _k === void 0 ? void 0 : _k.lastName) ? {
43
+ value: (_m = (_l = states.registrationFormState) === null || _l === void 0 ? void 0 : _l.initialData) === null || _m === void 0 ? void 0 : _m.lastName,
44
+ }
45
+ : {}), ((validationErrors === null || validationErrors === void 0 ? void 0 : validationErrors.lastName) ? {
39
46
  class: sheet.classes.ErrorStyle,
40
47
  helpText: (validationErrors === null || validationErrors === void 0 ? void 0 : validationErrors.lastName) || "Cannot be empty",
41
48
  }
@@ -74,7 +74,7 @@ export class NameFields {
74
74
  "mutable": false,
75
75
  "complexType": {
76
76
  "original": "DemoData<NameFieldsViewProps>",
77
- "resolved": "{ states?: { validationErrors?: ValidationErrors; content: { firstNameLabel: string; lastNameLabel: string; }; }; }",
77
+ "resolved": "{ states?: { validationErrors?: ValidationErrors; registrationFormState?: RegistrationFormState; content: { firstNameLabel: string; lastNameLabel: string; }; }; }",
78
78
  "references": {
79
79
  "DemoData": {
80
80
  "location": "import",
@@ -1,10 +1,13 @@
1
1
  import { useDomContext } from "@saasquatch/stencil-hooks";
2
2
  import { FORM_VALIDATION_CONTEXT, } from "../sqm-portal-register/useValidationState";
3
+ import { REGISTRATION_FORM_STATE_CONTEXT, } from "../sqm-portal-registration-form/useRegistrationFormState";
3
4
  export function useNameFields(props) {
5
+ const registrationFormState = useDomContext(REGISTRATION_FORM_STATE_CONTEXT);
4
6
  const validationState = useDomContext(FORM_VALIDATION_CONTEXT);
5
7
  return {
6
8
  states: {
7
9
  validationErrors: validationState === null || validationState === void 0 ? void 0 : validationState.validationErrors,
10
+ registrationFormState,
8
11
  content: {
9
12
  lastNameLabel: props.lastNameLabel,
10
13
  firstNameLabel: props.firstNameLabel,
@@ -7,6 +7,7 @@ export const Start = () => {
7
7
  initValue: "",
8
8
  states: {
9
9
  enableValidation: true,
10
+ registrationFormState: {},
10
11
  validationErrors: {},
11
12
  content: {
12
13
  fieldLabel: "Password",
@@ -20,6 +21,7 @@ export const EmptyError = () => {
20
21
  states: {
21
22
  enableValidation: true,
22
23
  validationErrors: { password: "Cannot be empty" },
24
+ registrationFormState: {},
23
25
  content: {
24
26
  fieldLabel: "Password",
25
27
  },
@@ -31,6 +33,7 @@ export const ValidationError = () => {
31
33
  initValue: "asdf",
32
34
  states: {
33
35
  enableValidation: true,
36
+ registrationFormState: {},
34
37
  validationErrors: { password: "Incomplete" },
35
38
  content: {
36
39
  fieldLabel: "Password",
@@ -22,19 +22,22 @@ const vanillaStyle = `
22
22
  const sheet = createStyleSheet(style);
23
23
  const styleString = sheet.toString();
24
24
  export function PortalResetPasswordView(props) {
25
- var _a, _b;
25
+ var _a, _b, _c, _d, _e, _f, _g, _h;
26
26
  const { states, callbacks } = props;
27
27
  return (h("div", { class: sheet.classes.InputContainer },
28
28
  h("style", { type: "text/css" },
29
29
  vanillaStyle,
30
30
  styleString),
31
- h("sl-input", Object.assign({ exportparts: "label: input-label", type: "password", name: "/password", label: states.content.fieldLabel || "Password", required: true, validationError: ({ value }) => {
31
+ 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 }) => {
32
32
  if (!value) {
33
33
  return "Cannot be empty";
34
34
  }
35
- } }, (((_a = states.validationErrors) === null || _a === void 0 ? void 0 : _a.password) ? {
35
+ } }, (((_d = (_c = states.registrationFormState) === null || _c === void 0 ? void 0 : _c.initialData) === null || _d === void 0 ? void 0 : _d.password) ? {
36
+ value: (_f = (_e = states.registrationFormState) === null || _e === void 0 ? void 0 : _e.initialData) === null || _f === void 0 ? void 0 : _f.password,
37
+ }
38
+ : {}), (((_g = states.validationErrors) === null || _g === void 0 ? void 0 : _g.password) ? {
36
39
  class: sheet.classes.ErrorStyle,
37
- helpText: ((_b = states.validationErrors) === null || _b === void 0 ? void 0 : _b.password) || "Cannot be empty",
40
+ helpText: ((_h = states.validationErrors) === null || _h === void 0 ? void 0 : _h.password) || "Cannot be empty",
38
41
  }
39
42
  : []), { onInput: (input) => states.enableValidation && callbacks.onInput(input) })),
40
43
  states.dynamicValidation));
@@ -124,6 +124,7 @@ function usePasswordFieldDemo(props) {
124
124
  enableValidation: true,
125
125
  dynamicValidation,
126
126
  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) || {},
127
+ registrationFormState: {},
127
128
  content: {
128
129
  fieldLabel: "Password",
129
130
  },
@@ -1,9 +1,11 @@
1
1
  import { useState } from "@saasquatch/universal-hooks";
2
+ import { FORM_VALIDATION_CONTEXT, } from "../sqm-portal-register/useValidationState";
2
3
  import { validateNewPassword } from "./passwordValidation";
3
4
  import { useDomContext } from "@saasquatch/stencil-hooks";
4
- const CONTEXT_NAME = "sq:validation-state";
5
+ import { REGISTRATION_FORM_STATE_CONTEXT, } from "../sqm-portal-registration-form/useRegistrationFormState";
5
6
  export function usePasswordField(props) {
6
- const validationState = useDomContext(CONTEXT_NAME);
7
+ const validationState = useDomContext(FORM_VALIDATION_CONTEXT);
8
+ const registrationFormState = useDomContext(REGISTRATION_FORM_STATE_CONTEXT);
7
9
  const [dynamicValidation, setDynamicValidation] = useState("");
8
10
  function onInput(input) {
9
11
  const validation = validateNewPassword(input.target.value);
@@ -13,6 +15,7 @@ export function usePasswordField(props) {
13
15
  states: {
14
16
  enableValidation: props.enableValidation,
15
17
  dynamicValidation,
18
+ registrationFormState,
16
19
  validationErrors: validationState === null || validationState === void 0 ? void 0 : validationState.validationErrors,
17
20
  content: {
18
21
  fieldLabel: props.fieldLabel,