@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,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
 
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-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
  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-161f4899.js');
15
+ require('./useChildElements-3a4087c1.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-958c8908.js');
24
- const sqmPortalEmailVerificationView = require('./sqm-portal-email-verification-view-b685b780.js');
25
- const sqmPortalFooterView = require('./sqm-portal-footer-view-9f7f3834.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');
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-a6b0c4a7.js');
28
+ const sqmPortalProfileView = require('./sqm-portal-profile-view-d0818828.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-aa0e441d.js');
31
+ const ShadowViewAddon = require('./ShadowViewAddon-d2c9b323.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-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, }) => {
@@ -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-6650575b.js');
4
+ const index_module = require('./index.module-7eab8006.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-6650575b.js');
6
- const reRender = require('./re-render-421592aa.js');
7
- const useChildElements = require('./useChildElements-161f4899.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');
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-7eab8006.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,
@@ -31,7 +31,7 @@ sqm-portal-register {
31
31
  const sheet = createStyleSheet(style);
32
32
  const styleString = sheet.toString();
33
33
  export function PortalRegistrationFormView(props) {
34
- var _a, _b, _c, _d, _e, _f, _g, _h;
34
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u;
35
35
  const { states, refs, callbacks, content } = props;
36
36
  if (states.error) {
37
37
  window.scrollTo({ top: 0, left: 0, behavior: "smooth" });
@@ -42,10 +42,11 @@ export function PortalRegistrationFormView(props) {
42
42
  styleString),
43
43
  h(TextSpanView, { type: "h3" }, content.pageLabel),
44
44
  h("sl-form", { class: sheet.classes.Column, "onSl-submit": callbacks.submit, ref: (el) => (refs.formRef.current = el), novalidate: true },
45
- states.error && (h("sqm-form-message", { type: "error", exportparts: "erroralert-icon" },
46
- h("div", { part: "erroralert-text" }, props.states.error))),
45
+ ((_a = states.registrationFormState) === null || _a === void 0 ? void 0 : _a.disabled) ? (h("sqm-form-message", { type: "error", exportparts: "erroralert-icon" },
46
+ h("div", { part: "erroralert-text" }, states.registrationFormState.disabledMessage))) : (states.error && (h("sqm-form-message", { type: "error", exportparts: "erroralert-icon" },
47
+ h("div", { part: "erroralert-text" }, props.states.error)))),
47
48
  content.formData,
48
- !states.hideInputs && (h("sl-input", Object.assign({ exportparts: "label: input-label", type: "email", name: "/email", label: content.emailLabel || "Email", disabled: states.loading, required: true, validationError: ({ value }) => {
49
+ !states.hideInputs && (h("sl-input", Object.assign({ exportparts: "label: input-label", type: "email", name: "/email", label: content.emailLabel || "Email", disabled: states.loading || ((_b = states.registrationFormState) === null || _b === void 0 ? void 0 : _b.disabled), required: true, validationError: ({ value }) => {
49
50
  if (!value) {
50
51
  return "Cannot be empty";
51
52
  }
@@ -53,22 +54,28 @@ export function PortalRegistrationFormView(props) {
53
54
  if (!value.includes("@")) {
54
55
  return "Must be a valid email address";
55
56
  }
56
- } }, (((_b = (_a = states.validationState) === null || _a === void 0 ? void 0 : _a.validationErrors) === null || _b === void 0 ? void 0 : _b.email) ? {
57
+ } }, (((_d = (_c = states.registrationFormState) === null || _c === void 0 ? void 0 : _c.initialData) === null || _d === void 0 ? void 0 : _d.email) ? {
58
+ value: (_f = (_e = states.registrationFormState) === null || _e === void 0 ? void 0 : _e.initialData) === null || _f === void 0 ? void 0 : _f.email,
59
+ }
60
+ : {}), (((_h = (_g = states.validationState) === null || _g === void 0 ? void 0 : _g.validationErrors) === null || _h === void 0 ? void 0 : _h.email) ? {
57
61
  class: sheet.classes.ErrorStyle,
58
- helpText: ((_d = (_c = states.validationState) === null || _c === void 0 ? void 0 : _c.validationErrors) === null || _d === void 0 ? void 0 : _d.email) ||
62
+ helpText: ((_k = (_j = states.validationState) === null || _j === void 0 ? void 0 : _j.validationErrors) === null || _k === void 0 ? void 0 : _k.email) ||
59
63
  "Cannot be empty",
60
64
  }
61
65
  : [])))),
62
66
  !states.hideInputs && (h("sqm-password-field", { fieldLabel: content.passwordLabel, "enable-validation": states.enablePasswordValidation })),
63
67
  content.passwordField,
64
- !states.hideInputs && states.confirmPassword && (h("sl-input", Object.assign({ exportparts: "label: input-label", type: "password", name: "/confirmPassword", label: content.confirmPasswordLabel, disabled: states.loading, required: true }, (((_f = (_e = states.validationState) === null || _e === void 0 ? void 0 : _e.validationErrors) === null || _f === void 0 ? void 0 : _f.confirmPassword) ? {
68
+ !states.hideInputs && states.confirmPassword && (h("sl-input", Object.assign({ exportparts: "label: input-label", type: "password", name: "/confirmPassword", label: content.confirmPasswordLabel, disabled: states.loading, required: true }, (((_m = (_l = states.registrationFormState) === null || _l === void 0 ? void 0 : _l.initialData) === null || _m === void 0 ? void 0 : _m.confirmPassword) ? {
69
+ value: (_p = (_o = states.registrationFormState) === null || _o === void 0 ? void 0 : _o.initialData) === null || _p === void 0 ? void 0 : _p.confirmPassword,
70
+ }
71
+ : {}), (((_r = (_q = states.validationState) === null || _q === void 0 ? void 0 : _q.validationErrors) === null || _r === void 0 ? void 0 : _r.confirmPassword) ? {
65
72
  class: sheet.classes.ErrorStyle,
66
- helpText: ((_h = (_g = states.validationState) === null || _g === void 0 ? void 0 : _g.validationErrors) === null || _h === void 0 ? void 0 : _h.confirmPassword) ||
73
+ helpText: ((_t = (_s = states.validationState) === null || _s === void 0 ? void 0 : _s.validationErrors) === null || _t === void 0 ? void 0 : _t.confirmPassword) ||
67
74
  "Cannot be empty",
68
75
  }
69
76
  : [])))),
70
77
  content.terms,
71
78
  h("div", { class: sheet.classes.ButtonsContainer },
72
- h("sl-button", { submit: true, loading: states.loading, exportparts: "base: primarybutton-base", type: "primary" }, content.submitLabel || "Register"),
79
+ 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"),
73
80
  content.secondaryButton))));
74
81
  }
@@ -70,6 +70,12 @@ export class PortalRegistrationForm {
70
70
  * @uiName Login Path
71
71
  */
72
72
  this.loginPath = "/login";
73
+ /**
74
+ * Microsite Registration Form Key
75
+ *
76
+ * @uiName Form Key
77
+ */
78
+ this.formKey = "microsite-registration-form";
73
79
  withHooks(this);
74
80
  }
75
81
  disconnectedCallback() { }
@@ -351,12 +357,33 @@ export class PortalRegistrationForm {
351
357
  "reflect": false,
352
358
  "defaultValue": "\"/login\""
353
359
  },
360
+ "formKey": {
361
+ "type": "string",
362
+ "mutable": false,
363
+ "complexType": {
364
+ "original": "string",
365
+ "resolved": "string",
366
+ "references": {}
367
+ },
368
+ "required": false,
369
+ "optional": false,
370
+ "docs": {
371
+ "tags": [{
372
+ "text": "Form Key",
373
+ "name": "uiName"
374
+ }],
375
+ "text": "Microsite Registration Form Key"
376
+ },
377
+ "attribute": "form-key",
378
+ "reflect": false,
379
+ "defaultValue": "\"microsite-registration-form\""
380
+ },
354
381
  "demoData": {
355
382
  "type": "unknown",
356
383
  "mutable": false,
357
384
  "complexType": {
358
385
  "original": "DemoData<PortalRegistrationFormViewProps>",
359
- "resolved": "{ states?: { error: string; loading: boolean; confirmPassword: boolean; hideInputs: boolean; validationState?: FormState; enablePasswordValidation?: boolean; loginPath: string; }; refs?: { formRef: any; }; content?: { formData?: VNode; terms?: VNode; passwordField?: VNode; secondaryButton?: VNode; emailLabel?: string; passwordLabel?: string; submitLabel?: string; pageLabel?: string; confirmPasswordLabel: string; }; }",
386
+ "resolved": "{ states?: { error: string; loading: boolean; confirmPassword: boolean; hideInputs: boolean; validationState?: FormState; registrationFormState?: RegistrationFormState; enablePasswordValidation?: boolean; loginPath: string; }; refs?: { formRef: any; }; content?: { formData?: VNode; terms?: VNode; passwordField?: VNode; secondaryButton?: VNode; emailLabel?: string; passwordLabel?: string; submitLabel?: string; pageLabel?: string; confirmPasswordLabel: string; }; }",
360
387
  "references": {
361
388
  "DemoData": {
362
389
  "location": "import",
@@ -1,22 +1,56 @@
1
1
  import jsonpointer from "jsonpointer";
2
2
  import { useCallback, useEffect, useRef } from "@saasquatch/universal-hooks";
3
- import { navigation, useRegisterViaRegistrationFormMutation, } from "@saasquatch/component-boilerplate";
3
+ import { navigation, useQuery, useRegisterViaRegistrationFormMutation, } from "@saasquatch/component-boilerplate";
4
4
  import { AsYouType } from "libphonenumber-js";
5
5
  import { useValidationState } from "../sqm-portal-register/useValidationState";
6
+ import { gql } from "graphql-request";
7
+ import { useRegistrationFormState, } from "./useRegistrationFormState";
8
+ const RegistrationFormQuery = gql `
9
+ query RegistrationFormQuery($key: String!) {
10
+ form(key: $key) {
11
+ key
12
+ type
13
+ initialData {
14
+ initialData
15
+ isEnabled
16
+ isEnabledErrorMessage
17
+ }
18
+ }
19
+ }
20
+ `;
6
21
  export function usePortalRegistrationForm(props) {
7
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
22
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
8
23
  const formRef = useRef(null);
24
+ const { registrationFormState, setRegistrationFormState } = useRegistrationFormState({});
9
25
  const { validationState, setValidationState } = useValidationState({});
10
26
  const [request, { loading, errors, data, formError }] = useRegisterViaRegistrationFormMutation();
27
+ const queryResponse = useQuery(RegistrationFormQuery, { key: props.formKey });
28
+ const formLoading = loading || queryResponse.loading;
29
+ useEffect(() => {
30
+ var _a, _b, _c;
31
+ const initialData = (_a = queryResponse === null || queryResponse === void 0 ? void 0 : queryResponse.data) === null || _a === void 0 ? void 0 : _a.form.initialData.initialData;
32
+ const disabled = !((_b = queryResponse === null || queryResponse === void 0 ? void 0 : queryResponse.data) === null || _b === void 0 ? void 0 : _b.form.initialData.isEnabled);
33
+ const disabledMessage = ((_c = queryResponse === null || queryResponse === void 0 ? void 0 : queryResponse.data) === null || _c === void 0 ? void 0 : _c.form.initialData.isEnabledErrorMessage) ||
34
+ "The registration form is currently disabled.";
35
+ const formState = {
36
+ loading: formLoading,
37
+ disabled,
38
+ disabledMessage,
39
+ initialData,
40
+ };
41
+ setRegistrationFormState(formState);
42
+ }, [(_a = queryResponse === null || queryResponse === void 0 ? void 0 : queryResponse.data) === null || _a === void 0 ? void 0 : _a.form.initialData, formLoading]);
11
43
  const submit = async (event) => {
12
44
  let formControls = event.target.getFormControls();
13
45
  let formData = {};
14
46
  let validationErrors = {};
15
47
  formControls === null || formControls === void 0 ? void 0 : formControls.forEach((control) => {
48
+ console.log({ control }, control.name);
16
49
  if (!control.name)
17
50
  return;
18
51
  const key = control.name;
19
52
  const value = control.value;
53
+ // control.value = initialData[key] || control.value;
20
54
  jsonpointer.set(formData, key, value);
21
55
  // required validation
22
56
  if (control.required && !value) {
@@ -49,6 +83,7 @@ export function usePortalRegistrationForm(props) {
49
83
  formData = { ...formData };
50
84
  const redirectPath = props.redirectPath;
51
85
  const variables = {
86
+ key: props.formKey,
52
87
  email,
53
88
  password,
54
89
  formData,
@@ -89,21 +124,27 @@ export function usePortalRegistrationForm(props) {
89
124
  };
90
125
  }, [formRef.current]);
91
126
  let errorMessage = "";
92
- if ((_a = errors === null || errors === void 0 ? void 0 : errors.response) === null || _a === void 0 ? void 0 : _a["error"]) {
127
+ if (((_b = queryResponse === null || queryResponse === void 0 ? void 0 : queryResponse.data) === null || _b === void 0 ? void 0 : _b.form.initialData.isEnabled) === false) {
128
+ errorMessage =
129
+ ((_c = queryResponse === null || queryResponse === void 0 ? void 0 : queryResponse.data) === null || _c === void 0 ? void 0 : _c.form.initialData.isEnabledErrorMessage) ||
130
+ "The registration form is disabled";
131
+ }
132
+ else if ((_d = errors === null || errors === void 0 ? void 0 : errors.response) === null || _d === void 0 ? void 0 : _d["error"]) {
93
133
  errorMessage = "Network request failed";
94
134
  }
95
- 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)) {
135
+ 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)) {
96
136
  errorMessage = "Network request failed";
97
137
  }
98
138
  else {
99
139
  errorMessage =
100
- 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);
140
+ 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);
101
141
  }
102
142
  return {
103
143
  states: {
104
- loading,
144
+ loading: loading || queryResponse.loading,
105
145
  error: errorMessage,
106
146
  validationState,
147
+ registrationFormState,
107
148
  confirmPassword: props.confirmPassword,
108
149
  hideInputs: props.hideInputs,
109
150
  loginPath: props.loginPath,
@@ -0,0 +1,8 @@
1
+ import { useHost } from "@saasquatch/component-boilerplate";
2
+ import { useDomContextState } from "@saasquatch/dom-context-hooks";
3
+ export const REGISTRATION_FORM_STATE_CONTEXT = "sq:registration-form-state";
4
+ export function useRegistrationFormState(formState) {
5
+ const host = useHost();
6
+ const [registrationFormState, setRegistrationFormState] = useDomContextState(host, REGISTRATION_FORM_STATE_CONTEXT, formState);
7
+ return { registrationFormState, setRegistrationFormState };
8
+ }
@@ -11,7 +11,6 @@ export function usePortalVerifyEmail({ nextPage, failedPage }) {
11
11
  const urlParams = new URLSearchParams(window.location.search);
12
12
  const oobCode = urlParams.get("oobCode");
13
13
  const nextPageOverride = urlParams.get("nextPage");
14
- urlParams.delete("oobCode");
15
14
  const failed = () => {
16
15
  return navigation.push({
17
16
  pathname: failedPage,
@@ -1,8 +1,3 @@
1
- 'use strict';
2
-
3
- const stencilHooks_module = require('./stencil-hooks.module-87a1f4f7.js');
4
- const index_module = require('./index.module-6650575b.js');
5
-
6
1
  // This file is a workaround for a bug in web browsers' "native"
7
2
  // ES6 importing system which is uncapable of importing "*.json" files.
8
3
  // https://github.com/catamphetamine/libphonenumber-js/issues/239
@@ -3874,13 +3869,4 @@ function AsYouType$1(country) {
3874
3869
  AsYouType$1.prototype = Object.create(AsYouType.prototype, {});
3875
3870
  AsYouType$1.prototype.constructor = AsYouType$1;
3876
3871
 
3877
- const FORM_VALIDATION_CONTEXT = "sq:validation-state";
3878
- function useValidationState(formState) {
3879
- const host = index_module.P();
3880
- const [validationState, setValidationState] = stencilHooks_module.y(host, FORM_VALIDATION_CONTEXT, formState);
3881
- return { validationState, setValidationState };
3882
- }
3883
-
3884
- exports.AsYouType = AsYouType$1;
3885
- exports.FORM_VALIDATION_CONTEXT = FORM_VALIDATION_CONTEXT;
3886
- exports.useValidationState = useValidationState;
3872
+ export { AsYouType$1 as A };
@@ -1,11 +1,11 @@
1
1
  import { h, c as Host, d as getAssetPath, g as getElement } from './index-17b4da69.js';
2
2
  import { i as useState, b as browser, k as useMemo } from './stencil-hooks.module-66fea7dc.js';
3
- import { i as intl } from './global-d07f1376.js';
4
- import { d as dist, M, a as ae, J, w as wn, j as je, H, O } from './index.module-f64d9e4c.js';
3
+ import { i as intl } from './global-79d68d1f.js';
4
+ import { d as dist, M, a as ae, J, w as wn, j as je, H, O } from './index.module-8e654eb1.js';
5
5
  import { c as cjs } from './cjs-bdfb4486.js';
6
6
  import { H as HostBlock, A as AuthWrapper, a as AuthColumn, b as AuthButtonsContainer, E as ErrorStyles } from './mixins-f60a614c.js';
7
7
  import { c as createStyleSheet, j as jss, a as create } from './JSS-f00f9536.js';
8
- import { u as useChildElements } from './useChildElements-c26c601d.js';
8
+ import { u as useChildElements } from './useChildElements-5a1262d5.js';
9
9
  import { l as luxon } from './luxon-38ca2169.js';
10
10
  import { l as luxonLocale } from './utils-334c1e34.js';
11
11
  import { T as TextSpanView } from './sqm-text-span-view-0ba1484d.js';
@@ -2448,18 +2448,25 @@ sl-input::part(label){
2448
2448
  const sheet$9 = createStyleSheet(style$9);
2449
2449
  const styleString$9 = sheet$9.toString();
2450
2450
  function NameFieldsView(props) {
2451
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
2451
2452
  const { states } = props;
2452
2453
  const validationErrors = states === null || states === void 0 ? void 0 : states.validationErrors;
2453
2454
  return (h("div", { class: sheet$9.classes.FieldsContainer },
2454
2455
  h("style", { type: "text/css" },
2455
2456
  vanillaStyle$3,
2456
2457
  styleString$9),
2457
- 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) ? {
2458
+ 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) ? {
2459
+ value: (_f = (_e = states.registrationFormState) === null || _e === void 0 ? void 0 : _e.initialData) === null || _f === void 0 ? void 0 : _f.firstName,
2460
+ }
2461
+ : {}), ((validationErrors === null || validationErrors === void 0 ? void 0 : validationErrors.firstName) ? {
2458
2462
  class: sheet$9.classes.ErrorStyle,
2459
2463
  helpText: (validationErrors === null || validationErrors === void 0 ? void 0 : validationErrors.firstName) || "Cannot be empty",
2460
2464
  }
2461
2465
  : []))),
2462
- 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) ? {
2466
+ 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) ? {
2467
+ value: (_m = (_l = states.registrationFormState) === null || _l === void 0 ? void 0 : _l.initialData) === null || _m === void 0 ? void 0 : _m.lastName,
2468
+ }
2469
+ : {}), ((validationErrors === null || validationErrors === void 0 ? void 0 : validationErrors.lastName) ? {
2463
2470
  class: sheet$9.classes.ErrorStyle,
2464
2471
  helpText: (validationErrors === null || validationErrors === void 0 ? void 0 : validationErrors.lastName) || "Cannot be empty",
2465
2472
  }
@@ -1,5 +1,5 @@
1
1
  import { g as getAugmentedNamespace, c as createCommonjsModule, a as commonjsGlobal, b as browser, l as l$1 } from './stencil-hooks.module-66fea7dc.js';
2
- import { s as src, m as memoize, E } from './index.module-f64d9e4c.js';
2
+ import { s as src, m as memoize, E } from './index.module-8e654eb1.js';
3
3
 
4
4
  var __assign = (undefined && undefined.__assign) || function () {
5
5
  __assign = Object.assign || function(t) {