@saasquatch/mint-components 1.3.3-6 → 1.4.1-0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (387) hide show
  1. package/CHANGELOG.md +48 -24
  2. package/dist/cjs/{ShadowViewAddon-d6a442a9.js → ShadowViewAddon-e9bacad0.js} +3 -3
  3. package/dist/cjs/{global-b957dd98.js → global-413d075c.js} +72 -284
  4. package/dist/cjs/{index.module-85eb6b4d.js → index.module-2925fe3b.js} +16 -18
  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-59955561.js → re-render-b1ad512d.js} +4 -4
  8. package/dist/cjs/sqm-asset-card.cjs.entry.js +1 -1
  9. package/dist/cjs/sqm-big-stat.cjs.entry.js +2 -2
  10. package/dist/cjs/{sqm-divided-layout_30.cjs.entry.js → sqm-divided-layout_26.cjs.entry.js} +389 -2813
  11. package/dist/cjs/sqm-graphql-client-provider.cjs.entry.js +4 -4
  12. package/dist/cjs/{sqm-leaderboard-rank-view-9114d9ad.js → sqm-leaderboard-rank-view-b1b55673.js} +2 -2
  13. package/dist/cjs/sqm-leaderboard-rank.cjs.entry.js +5 -5
  14. package/dist/cjs/sqm-leaderboard.cjs.entry.js +2 -2
  15. package/dist/cjs/sqm-name-fields.cjs.entry.js +1 -1
  16. package/dist/cjs/{sqm-navigation-sidebar-item-view-b565a10a.js → sqm-navigation-sidebar-item-view-1bad646a.js} +2 -2
  17. package/dist/cjs/sqm-navigation-sidebar-item.cjs.entry.js +3 -3
  18. package/dist/cjs/sqm-popup-container.cjs.entry.js +1 -1
  19. package/dist/cjs/{sqm-portal-email-verification-view-bd40f7eb.js → sqm-portal-email-verification-view-eeb4ca62.js} +1 -1
  20. package/dist/cjs/sqm-portal-email-verification.cjs.entry.js +13 -6
  21. package/dist/cjs/{sqm-portal-footer-view-b60e17c8.js → sqm-portal-footer-view-08a2efd5.js} +1 -1
  22. package/dist/cjs/sqm-portal-footer.cjs.entry.js +3 -3
  23. package/dist/cjs/sqm-portal-forgot-password.cjs.entry.js +18 -6
  24. package/dist/cjs/sqm-portal-logout.cjs.entry.js +3 -3
  25. package/dist/cjs/{sqm-portal-profile-view-c3b889d4.js → sqm-portal-profile-view-ce86369e.js} +1 -1
  26. package/dist/cjs/sqm-portal-profile.cjs.entry.js +6 -6
  27. package/dist/cjs/sqm-portal-protected-route.cjs.entry.js +5 -5
  28. package/dist/cjs/sqm-portal-reset-password.cjs.entry.js +14 -6
  29. package/dist/cjs/sqm-portal-verify-email.cjs.entry.js +15 -7
  30. package/dist/cjs/sqm-referral-table-column.cjs.entry.js +2 -2
  31. package/dist/cjs/sqm-referral-table-date-column.cjs.entry.js +2 -2
  32. package/dist/cjs/sqm-referral-table-rewards-column.cjs.entry.js +2 -2
  33. package/dist/cjs/sqm-referral-table-status-column.cjs.entry.js +2 -2
  34. package/dist/cjs/sqm-referral-table-user-column.cjs.entry.js +2 -2
  35. package/dist/cjs/sqm-share-code.cjs.entry.js +3 -3
  36. package/dist/cjs/{useDemoBigStat-9193e8c5.js → useDemoBigStat-d7a60992.js} +24 -121
  37. package/dist/collection/collection-manifest.json +3 -7
  38. package/dist/collection/components/sqm-big-stat/sqm-big-stat.js +21 -1
  39. package/dist/collection/components/sqm-big-stat/useBigStat.js +21 -117
  40. package/dist/collection/components/sqm-big-stat/useDemoBigStat.js +0 -1
  41. package/dist/collection/components/sqm-portal-email-verification/sqm-portal-email-verification.js +27 -0
  42. package/dist/collection/components/sqm-portal-email-verification/usePortalEmailVerification.js +2 -1
  43. package/dist/collection/components/sqm-portal-forgot-password/sqm-portal-forgot-password.js +55 -3
  44. package/dist/collection/components/sqm-portal-forgot-password/usePortalForgotPassword.js +4 -2
  45. package/dist/collection/components/sqm-portal-login/sqm-portal-login.js +59 -4
  46. package/dist/collection/components/sqm-portal-login/usePortalLogin.js +4 -2
  47. package/dist/collection/components/sqm-portal-register/sqm-portal-register.js +55 -2
  48. package/dist/collection/components/sqm-portal-register/usePortalRegister.js +3 -0
  49. package/dist/collection/components/sqm-portal-reset-password/sqm-portal-reset-password.js +30 -1
  50. package/dist/collection/components/sqm-portal-reset-password/usePortalResetPassword.js +1 -1
  51. package/dist/collection/components/sqm-portal-verify-email/sqm-portal-verify-email.js +30 -1
  52. package/dist/collection/components/sqm-portal-verify-email/usePortalVerifyEmail.js +2 -2
  53. package/dist/collection/components/sqm-referral-table/columns/sqm-referral-table-column.js +1 -1
  54. package/dist/collection/components/sqm-referral-table/columns/sqm-referral-table-date-column.js +1 -1
  55. package/dist/collection/components/sqm-referral-table/columns/sqm-referral-table-rewards-column.js +1 -1
  56. package/dist/collection/components/sqm-referral-table/columns/sqm-referral-table-status-column.js +1 -1
  57. package/dist/collection/components/sqm-referral-table/columns/sqm-referral-table-user-column.js +1 -1
  58. package/dist/collection/{tables → components/sqm-referral-table}/re-render.js +0 -0
  59. package/dist/collection/{tables → components/sqm-referral-table}/sqm-table-cell.js +0 -0
  60. package/dist/collection/{tables → components/sqm-referral-table}/sqm-table-row.js +0 -0
  61. package/dist/collection/{tables → components/sqm-referral-table}/useChildElements.js +0 -0
  62. package/dist/collection/components/sqm-referral-table/useReferralTable.js +2 -2
  63. package/dist/collection/components/sqm-share-button/sqm-share-button.js +1 -1
  64. package/dist/collection/components/sqm-stencilbook/CucumberAddon.js +1 -3
  65. package/dist/collection/components/sqm-stencilbook/sqm-stencilbook.js +36 -46
  66. package/dist/collection/components/sqm-user-name/sqm-user-name.js +1 -1
  67. package/dist/collection/global/global.js +1 -1
  68. package/dist/collection/global/styles.js +69 -281
  69. package/dist/collection/global/styles.ts +69 -281
  70. package/dist/collection/{components/sqm-asset-card → stories}/AssetCard.stories.js +2 -2
  71. package/dist/collection/{components/sqm-big-stat → stories}/BigStat.stories.js +3 -10
  72. package/dist/collection/{components/sqm-portal-change-password → stories}/ChangePassword.stories.js +3 -3
  73. package/dist/collection/{components/sqm-divided-layout → stories}/DividedLayout.stories.js +4 -4
  74. package/dist/collection/{components/sqm-edit-profile → stories}/EditProfileForm.stories.js +2 -2
  75. package/dist/collection/{components/sqm-form-message → stories}/FormMessage.stories.js +1 -1
  76. package/dist/collection/{components/sqm-hero → stories}/Hero.stories.js +2 -2
  77. package/dist/collection/{components/sqm-leaderboard → stories}/Leaderboard.stories.js +2 -2
  78. package/dist/collection/{components/sqm-leaderboard-rank → stories}/LeaderboardRank.stories.js +2 -2
  79. package/dist/collection/{components/sqm-name-fields → stories}/NameFields.stories.js +2 -2
  80. package/dist/collection/{components/sqm-navigation-sidebar → stories}/NavigationSidebar.stories.js +3 -3
  81. package/dist/collection/stories/NewPortal.stories.js +15 -15
  82. package/dist/collection/{components/sqm-password-field → stories}/PasswordField.stories.js +1 -1
  83. package/dist/collection/{components/sqm-portal-email-verification → stories}/PortalEmailVerification.stories.js +3 -3
  84. package/dist/collection/{components/sqm-portal-footer → stories}/PortalFooter.stories.js +2 -2
  85. package/dist/collection/{components/sqm-portal-forgot-password → stories}/PortalForgotPassword.stories.js +7 -3
  86. package/dist/collection/{components/sqm-portal-frame → stories}/PortalFrame.stories.js +2 -2
  87. package/dist/collection/{components/sqm-portal-login → stories}/PortalLogin.stories.js +8 -2
  88. package/dist/collection/{components/sqm-portal-profile → stories}/PortalProfile.stories.js +2 -2
  89. package/dist/collection/{components/sqm-portal-register → stories}/PortalRegister.stories.js +7 -2
  90. package/dist/collection/{components/sqm-portal-reset-password → stories}/PortalResetPassword.stories.js +3 -3
  91. package/dist/collection/{components/sqm-portal-verify-email → stories}/PortalVerifyEmail.stories.js +3 -3
  92. package/dist/collection/{components/sqm-program-menu → stories}/ProgramMenu.stories.js +2 -2
  93. package/dist/collection/{components/sqm-referral-iframe → stories}/ReferralIframe.stories.js +2 -2
  94. package/dist/collection/{components/sqm-referral-table → stories}/ReferralTable.stories.js +2 -2
  95. package/dist/collection/{components/sqm-referral-table → stories}/ReferralTableCell.stories.js +1 -1
  96. package/dist/collection/{components/sqm-referral-table → stories}/ReferralTableRewardsCell.stories.js +1 -1
  97. package/dist/collection/{components/sqm-router → stories}/Router.stories.js +1 -1
  98. package/dist/collection/{components/sqm-share-button → stories}/ShareButton.stories.js +3 -3
  99. package/dist/collection/{components/sqm-share-link → stories}/ShareLink.stories.js +2 -2
  100. package/dist/collection/{components/sqm-navigation-sidebar-item → stories}/SidebarItem.stories.js +2 -2
  101. package/dist/collection/{components/sqm-big-stat → stories}/UseBigStat.stories.js +4 -7
  102. package/dist/collection/{components/sqm-edit-profile → stories}/UseEditProfile.stories.js +1 -1
  103. package/dist/collection/{components/sqm-leaderboard → stories}/UseLeaderboard.stories.js +3 -3
  104. package/dist/collection/{components/sqm-share-button → stories}/UseShareButton.stories.js +2 -2
  105. package/dist/collection/{components/sqm-share-link → stories}/UseShareLink.stories.js +3 -3
  106. package/dist/collection/{components/sqm-user-name → stories}/UserName.stories.js +3 -3
  107. package/dist/esm/{ShadowViewAddon-2338f393.js → ShadowViewAddon-5f66de48.js} +3 -3
  108. package/dist/esm/{global-0e81c5e6.js → global-2e50d2dc.js} +72 -284
  109. package/dist/esm/{index.module-9b5bb6a2.js → index.module-1e92a7a3.js} +2 -2
  110. package/dist/esm/loader.js +3 -3
  111. package/dist/esm/mint-components.js +3 -3
  112. package/dist/esm/{re-render-57ac6584.js → re-render-b8468637.js} +4 -4
  113. package/dist/esm/sqm-asset-card.entry.js +1 -1
  114. package/dist/esm/sqm-big-stat.entry.js +2 -2
  115. package/dist/esm/{sqm-divided-layout_30.entry.js → sqm-divided-layout_26.entry.js} +391 -2811
  116. package/dist/esm/sqm-graphql-client-provider.entry.js +4 -4
  117. package/dist/esm/{sqm-leaderboard-rank-view-3f0dc20e.js → sqm-leaderboard-rank-view-387f0870.js} +2 -2
  118. package/dist/esm/sqm-leaderboard-rank.entry.js +5 -5
  119. package/dist/esm/sqm-leaderboard.entry.js +2 -2
  120. package/dist/esm/sqm-name-fields.entry.js +1 -1
  121. package/dist/esm/{sqm-navigation-sidebar-item-view-79b0748c.js → sqm-navigation-sidebar-item-view-a48bca9b.js} +2 -2
  122. package/dist/esm/sqm-navigation-sidebar-item.entry.js +3 -3
  123. package/dist/esm/sqm-popup-container.entry.js +1 -1
  124. package/dist/esm/{sqm-portal-email-verification-view-8f253fb7.js → sqm-portal-email-verification-view-e366e94a.js} +1 -1
  125. package/dist/esm/sqm-portal-email-verification.entry.js +13 -6
  126. package/dist/esm/{sqm-portal-footer-view-b8a2f15e.js → sqm-portal-footer-view-f12d5e5a.js} +1 -1
  127. package/dist/esm/sqm-portal-footer.entry.js +3 -3
  128. package/dist/esm/sqm-portal-forgot-password.entry.js +18 -6
  129. package/dist/esm/sqm-portal-logout.entry.js +3 -3
  130. package/dist/esm/{sqm-portal-profile-view-831dea85.js → sqm-portal-profile-view-9f3c79c3.js} +1 -1
  131. package/dist/esm/sqm-portal-profile.entry.js +6 -6
  132. package/dist/esm/sqm-portal-protected-route.entry.js +5 -5
  133. package/dist/esm/sqm-portal-reset-password.entry.js +16 -8
  134. package/dist/esm/sqm-portal-verify-email.entry.js +15 -7
  135. package/dist/esm/sqm-referral-table-column.entry.js +2 -2
  136. package/dist/esm/sqm-referral-table-date-column.entry.js +2 -2
  137. package/dist/esm/sqm-referral-table-rewards-column.entry.js +2 -2
  138. package/dist/esm/sqm-referral-table-status-column.entry.js +2 -2
  139. package/dist/esm/sqm-referral-table-user-column.entry.js +2 -2
  140. package/dist/esm/sqm-share-code.entry.js +3 -3
  141. package/dist/esm/{useDemoBigStat-660c8672.js → useDemoBigStat-5557504e.js} +24 -121
  142. package/dist/esm-es5/ShadowViewAddon-5f66de48.js +1 -0
  143. package/dist/esm-es5/{global-0e81c5e6.js → global-2e50d2dc.js} +2 -2
  144. package/dist/esm-es5/{index.module-9b5bb6a2.js → index.module-1e92a7a3.js} +1 -1
  145. package/dist/esm-es5/loader.js +1 -1
  146. package/dist/esm-es5/mint-components.js +1 -1
  147. package/dist/esm-es5/{re-render-57ac6584.js → re-render-b8468637.js} +1 -1
  148. package/dist/esm-es5/sqm-asset-card.entry.js +1 -1
  149. package/dist/esm-es5/sqm-big-stat.entry.js +1 -1
  150. package/dist/esm-es5/sqm-divided-layout_26.entry.js +1 -0
  151. package/dist/esm-es5/sqm-graphql-client-provider.entry.js +1 -1
  152. package/dist/esm-es5/{sqm-leaderboard-rank-view-3f0dc20e.js → sqm-leaderboard-rank-view-387f0870.js} +1 -1
  153. package/dist/esm-es5/sqm-leaderboard-rank.entry.js +1 -1
  154. package/dist/esm-es5/sqm-leaderboard.entry.js +1 -1
  155. package/dist/esm-es5/sqm-name-fields.entry.js +1 -1
  156. package/dist/esm-es5/sqm-navigation-sidebar-item-view-a48bca9b.js +1 -0
  157. package/dist/esm-es5/sqm-navigation-sidebar-item.entry.js +1 -1
  158. package/dist/esm-es5/sqm-popup-container.entry.js +1 -1
  159. package/dist/esm-es5/{sqm-portal-email-verification-view-8f253fb7.js → sqm-portal-email-verification-view-e366e94a.js} +1 -1
  160. package/dist/esm-es5/sqm-portal-email-verification.entry.js +1 -1
  161. package/dist/esm-es5/{sqm-portal-footer-view-b8a2f15e.js → sqm-portal-footer-view-f12d5e5a.js} +1 -1
  162. package/dist/esm-es5/sqm-portal-footer.entry.js +1 -1
  163. package/dist/esm-es5/sqm-portal-forgot-password.entry.js +1 -1
  164. package/dist/esm-es5/sqm-portal-logout.entry.js +1 -1
  165. package/dist/esm-es5/{sqm-portal-profile-view-831dea85.js → sqm-portal-profile-view-9f3c79c3.js} +1 -1
  166. package/dist/esm-es5/sqm-portal-profile.entry.js +1 -1
  167. package/dist/esm-es5/sqm-portal-protected-route.entry.js +1 -1
  168. package/dist/esm-es5/sqm-portal-reset-password.entry.js +1 -1
  169. package/dist/esm-es5/sqm-portal-verify-email.entry.js +1 -1
  170. package/dist/esm-es5/sqm-referral-table-column.entry.js +1 -1
  171. package/dist/esm-es5/sqm-referral-table-date-column.entry.js +1 -1
  172. package/dist/esm-es5/sqm-referral-table-rewards-column.entry.js +1 -1
  173. package/dist/esm-es5/sqm-referral-table-status-column.entry.js +1 -1
  174. package/dist/esm-es5/sqm-referral-table-user-column.entry.js +1 -1
  175. package/dist/esm-es5/sqm-share-code.entry.js +1 -1
  176. package/dist/esm-es5/useDemoBigStat-5557504e.js +1 -0
  177. package/dist/mint-components/global/styles.ts +69 -281
  178. package/dist/mint-components/mint-components.esm.js +1 -1
  179. package/dist/mint-components/mint-components.js +1 -1
  180. package/dist/mint-components/{p-8f5b80f2.entry.js → p-05a2640d.entry.js} +1 -1
  181. package/dist/mint-components/{p-cafc22bf.system.entry.js → p-09afaaac.system.entry.js} +1 -1
  182. package/dist/mint-components/p-10a98629.entry.js +1 -0
  183. package/dist/mint-components/p-112d42ab.system.entry.js +1 -0
  184. package/dist/mint-components/p-13605359.entry.js +1 -0
  185. package/dist/mint-components/p-192539d2.entry.js +1 -0
  186. package/dist/mint-components/{p-b2cb66f5.system.js → p-27e23808.system.js} +1 -1
  187. package/dist/mint-components/{p-24d13567.js → p-2babeba4.js} +1 -1
  188. package/dist/mint-components/{p-77f9b4af.entry.js → p-2dc28ab0.entry.js} +2 -2
  189. package/dist/mint-components/p-2f333f89.system.entry.js +1 -0
  190. package/dist/mint-components/{p-17e6fc02.system.entry.js → p-337a3d6b.system.entry.js} +1 -1
  191. package/dist/mint-components/{p-7062ab8e.system.entry.js → p-3772bae2.system.entry.js} +1 -1
  192. package/dist/mint-components/{p-295b306a.js → p-3adf6ff3.js} +1 -1
  193. package/dist/mint-components/{p-1ec1dcb3.system.js → p-3e3dad7a.system.js} +1 -1
  194. package/dist/mint-components/{p-d5a00e40.system.entry.js → p-4068e47c.system.entry.js} +1 -1
  195. package/dist/mint-components/{p-d4fe6a69.system.js → p-48fff767.system.js} +2 -2
  196. package/dist/mint-components/{p-f7b80ac0.entry.js → p-4b6c316d.entry.js} +1 -1
  197. package/dist/mint-components/{p-58fb3d02.system.js → p-50557966.system.js} +1 -1
  198. package/dist/mint-components/p-528aecd1.entry.js +1 -0
  199. package/dist/mint-components/p-52b0b65d.entry.js +1 -0
  200. package/dist/mint-components/p-55210498.system.js +1 -0
  201. package/dist/mint-components/p-554a6339.entry.js +230 -0
  202. package/dist/mint-components/p-5fcd8687.entry.js +1 -0
  203. package/dist/mint-components/p-606506d6.system.entry.js +1 -0
  204. package/dist/mint-components/{p-55f029cd.system.entry.js → p-6156a7ac.system.entry.js} +1 -1
  205. package/dist/mint-components/{p-b9edc48d.system.entry.js → p-624c5352.system.entry.js} +1 -1
  206. package/dist/mint-components/p-6305419f.entry.js +1 -0
  207. package/dist/mint-components/{p-be615f03.system.js → p-679a7054.system.js} +1 -1
  208. package/dist/mint-components/p-6ad110d3.js +1 -0
  209. package/dist/mint-components/{p-aee2a2b9.entry.js → p-6cb81b77.entry.js} +1 -1
  210. package/dist/mint-components/{p-46cb29e2.system.entry.js → p-70ca623f.system.entry.js} +1 -1
  211. package/dist/mint-components/{p-8bfe1f7d.js → p-726c9080.js} +1 -1
  212. package/dist/mint-components/{p-75ae6fc0.entry.js → p-743882c6.entry.js} +1 -1
  213. package/dist/mint-components/p-768b9014.system.entry.js +1 -0
  214. package/dist/mint-components/p-77d17f35.js +1 -0
  215. package/dist/mint-components/p-7cf335a0.entry.js +1 -0
  216. package/dist/mint-components/p-86b66e5c.entry.js +1 -0
  217. package/dist/mint-components/{p-ad1c6eb8.system.entry.js → p-8bfebd45.system.entry.js} +1 -1
  218. package/dist/mint-components/p-942723ad.entry.js +1 -0
  219. package/dist/mint-components/{p-a93149f4.entry.js → p-965e34ab.entry.js} +1 -1
  220. package/dist/mint-components/{p-75b143ac.system.entry.js → p-9741333b.system.entry.js} +1 -1
  221. package/dist/mint-components/{p-0a882bab.system.entry.js → p-9a3a0db5.system.entry.js} +1 -1
  222. package/dist/mint-components/{p-8a9966fc.system.js → p-9f9191a4.system.js} +1 -1
  223. package/dist/mint-components/{p-e53399e5.system.entry.js → p-9ff118a2.system.entry.js} +1 -1
  224. package/dist/mint-components/{p-27bb0aa9.js → p-af1f8bd3.js} +1 -1
  225. package/dist/mint-components/{p-d5b84d6b.js → p-af2d886e.js} +1 -1
  226. package/dist/mint-components/{p-3404b8d2.system.entry.js → p-b3880833.system.entry.js} +1 -1
  227. package/dist/mint-components/p-b3cddcca.entry.js +1 -0
  228. package/dist/mint-components/p-b63744fe.js +227 -0
  229. package/dist/mint-components/p-bf26396f.system.js +1 -0
  230. package/dist/mint-components/{p-8ec40f9a.entry.js → p-c47b83c3.entry.js} +1 -1
  231. package/dist/mint-components/{p-16b0b00b.entry.js → p-c579f318.entry.js} +2 -2
  232. package/dist/mint-components/p-c5c029b8.system.js +1 -0
  233. package/dist/mint-components/p-ced568fc.system.entry.js +1 -0
  234. package/dist/mint-components/p-cffc23c0.entry.js +1 -0
  235. package/dist/mint-components/p-d1cea1b1.system.js +1 -0
  236. package/dist/mint-components/{p-be62004c.entry.js → p-d1d45d97.entry.js} +1 -1
  237. package/dist/mint-components/{p-024cc1be.system.entry.js → p-d3171b36.system.entry.js} +1 -1
  238. package/dist/mint-components/{p-35103a1b.system.entry.js → p-d5573e0e.system.entry.js} +1 -1
  239. package/dist/mint-components/p-d96e22c6.system.entry.js +1 -0
  240. package/dist/mint-components/p-de3311bf.entry.js +9 -0
  241. package/dist/mint-components/{p-0e49a93f.system.entry.js → p-e1df7914.system.entry.js} +1 -1
  242. package/dist/mint-components/{p-a59e65f2.js → p-eddcf481.js} +1 -1
  243. package/dist/mint-components/{p-98e29140.system.entry.js → p-f16bae7a.system.entry.js} +1 -1
  244. package/dist/mint-components/p-f3fbcdb0.system.entry.js +1 -0
  245. package/dist/mint-components/{p-f3ea7918.system.js → p-fd33dd62.system.js} +1 -1
  246. package/dist/mint-components/{p-b6107771.js → p-fe4ecc11.js} +2 -2
  247. package/dist/types/components/sqm-big-stat/sqm-big-stat-view.d.ts +0 -1
  248. package/dist/types/components/sqm-big-stat/sqm-big-stat.d.ts +6 -0
  249. package/dist/types/components/sqm-big-stat/useBigStat.d.ts +1 -4
  250. package/dist/types/components/sqm-portal-email-verification/sqm-portal-email-verification.d.ts +6 -0
  251. package/dist/types/components/sqm-portal-forgot-password/sqm-portal-forgot-password-view.d.ts +1 -0
  252. package/dist/types/components/sqm-portal-forgot-password/sqm-portal-forgot-password.d.ts +10 -0
  253. package/dist/types/components/sqm-portal-forgot-password/usePortalForgotPassword.d.ts +3 -1
  254. package/dist/types/components/sqm-portal-login/sqm-portal-login-view.d.ts +2 -0
  255. package/dist/types/components/sqm-portal-login/sqm-portal-login.d.ts +8 -0
  256. package/dist/types/components/sqm-portal-login/usePortalLogin.d.ts +3 -3
  257. package/dist/types/components/sqm-portal-register/sqm-portal-register-view.d.ts +1 -0
  258. package/dist/types/components/sqm-portal-register/sqm-portal-register.d.ts +10 -0
  259. package/dist/types/components/sqm-portal-register/usePortalRegister.d.ts +1 -0
  260. package/dist/types/components/sqm-portal-reset-password/sqm-portal-reset-password.d.ts +8 -0
  261. package/dist/types/components/sqm-portal-verify-email/sqm-portal-verify-email.d.ts +8 -0
  262. package/dist/types/components/sqm-portal-verify-email/usePortalVerifyEmail.d.ts +2 -1
  263. package/dist/types/{tables → components/sqm-referral-table}/re-render.d.ts +0 -0
  264. package/dist/types/{tables → components/sqm-referral-table}/sqm-table-cell.d.ts +0 -0
  265. package/dist/types/{tables → components/sqm-referral-table}/sqm-table-row.d.ts +0 -0
  266. package/dist/types/{tables → components/sqm-referral-table}/useChildElements.d.ts +0 -0
  267. package/dist/types/components/sqm-user-name/sqm-user-name.d.ts +1 -1
  268. package/dist/types/components.d.ts +96 -289
  269. package/dist/types/global/styles.d.ts +1 -1
  270. package/dist/types/{components/sqm-asset-card → stories}/AssetCard.stories.d.ts +0 -0
  271. package/dist/types/{components/sqm-big-stat → stories}/BigStat.stories.d.ts +0 -0
  272. package/dist/types/{components/sqm-portal-change-password → stories}/ChangePassword.stories.d.ts +0 -0
  273. package/dist/types/{components/sqm-divided-layout → stories}/DividedLayout.stories.d.ts +0 -0
  274. package/dist/types/{components/sqm-edit-profile → stories}/EditProfileForm.stories.d.ts +0 -0
  275. package/dist/types/{components/sqm-form-message → stories}/FormMessage.stories.d.ts +0 -0
  276. package/dist/types/{components/sqm-hero → stories}/Hero.stories.d.ts +0 -0
  277. package/dist/types/{components/sqm-leaderboard → stories}/Leaderboard.stories.d.ts +0 -0
  278. package/dist/types/{components/sqm-leaderboard-rank → stories}/LeaderboardRank.stories.d.ts +0 -0
  279. package/dist/types/{components/sqm-name-fields → stories}/NameFields.stories.d.ts +0 -0
  280. package/dist/types/{components/sqm-navigation-sidebar → stories}/NavigationSidebar.stories.d.ts +0 -0
  281. package/dist/types/{components/sqm-password-field → stories}/PasswordField.stories.d.ts +0 -0
  282. package/dist/types/{components/sqm-portal-email-verification → stories}/PortalEmailVerification.stories.d.ts +0 -0
  283. package/dist/types/{components/sqm-portal-footer → stories}/PortalFooter.stories.d.ts +0 -0
  284. package/dist/types/{components/sqm-portal-forgot-password → stories}/PortalForgotPassword.stories.d.ts +0 -0
  285. package/dist/types/{components/sqm-portal-frame → stories}/PortalFrame.stories.d.ts +0 -0
  286. package/dist/types/{components/sqm-portal-login → stories}/PortalLogin.stories.d.ts +0 -0
  287. package/dist/types/{components/sqm-portal-profile → stories}/PortalProfile.stories.d.ts +0 -0
  288. package/dist/types/{components/sqm-portal-register → stories}/PortalRegister.stories.d.ts +0 -0
  289. package/dist/types/{components/sqm-portal-reset-password → stories}/PortalResetPassword.stories.d.ts +0 -0
  290. package/dist/types/{components/sqm-portal-verify-email → stories}/PortalVerifyEmail.stories.d.ts +0 -0
  291. package/dist/types/{components/sqm-program-menu → stories}/ProgramMenu.stories.d.ts +0 -0
  292. package/dist/types/{components/sqm-referral-iframe → stories}/ReferralIframe.stories.d.ts +0 -0
  293. package/dist/types/{components/sqm-referral-table → stories}/ReferralTable.stories.d.ts +0 -0
  294. package/dist/types/{components/sqm-referral-table → stories}/ReferralTableCell.stories.d.ts +0 -0
  295. package/dist/types/{components/sqm-referral-table → stories}/ReferralTableRewardsCell.stories.d.ts +0 -0
  296. package/dist/types/{components/sqm-router → stories}/Router.stories.d.ts +0 -0
  297. package/dist/types/{components/sqm-share-button → stories}/ShareButton.stories.d.ts +0 -0
  298. package/dist/types/{components/sqm-share-link → stories}/ShareLink.stories.d.ts +0 -0
  299. package/dist/types/{components/sqm-navigation-sidebar-item → stories}/SidebarItem.stories.d.ts +0 -0
  300. package/dist/types/{components/sqm-big-stat → stories}/UseBigStat.stories.d.ts +0 -6
  301. package/dist/types/{components/sqm-edit-profile → stories}/UseEditProfile.stories.d.ts +0 -0
  302. package/dist/types/{components/sqm-leaderboard → stories}/UseLeaderboard.stories.d.ts +0 -0
  303. package/dist/types/{components/sqm-share-button → stories}/UseShareButton.stories.d.ts +0 -0
  304. package/dist/types/{components/sqm-share-link → stories}/UseShareLink.stories.d.ts +0 -0
  305. package/dist/types/stories/UserName.stories.d.ts +6 -0
  306. package/grapesjs/grapesjs.js +1 -1
  307. package/package.json +2 -2
  308. package/dist/collection/components/sqm-reward-exchange-list/RewardExchangeList.stories.js +0 -25
  309. package/dist/collection/components/sqm-reward-exchange-list/RewardExchangeListData.js +0 -241
  310. package/dist/collection/components/sqm-reward-exchange-list/SVGs.js +0 -8
  311. package/dist/collection/components/sqm-reward-exchange-list/UseRewardExchangeList.stories.js +0 -143
  312. package/dist/collection/components/sqm-reward-exchange-list/assets/Reward-icon.png +0 -0
  313. package/dist/collection/components/sqm-reward-exchange-list/progressBar.js +0 -61
  314. package/dist/collection/components/sqm-reward-exchange-list/sqm-reward-exchange-list-view.js +0 -357
  315. package/dist/collection/components/sqm-reward-exchange-list/sqm-reward-exchange-list.js +0 -144
  316. package/dist/collection/components/sqm-reward-exchange-list/useRewardExchangeList.js +0 -174
  317. package/dist/collection/components/sqm-rewards-table/UseRewardsTable.stories.js +0 -53
  318. package/dist/collection/components/sqm-rewards-table/sqm-rewards-table-column.js +0 -120
  319. package/dist/collection/components/sqm-rewards-table/sqm-rewards-table.js +0 -222
  320. package/dist/collection/components/sqm-rewards-table/useRewardsTable.js +0 -190
  321. package/dist/collection/components/sqm-task-card/Matrix.js +0 -66
  322. package/dist/collection/components/sqm-task-card/SVGs.js +0 -9
  323. package/dist/collection/components/sqm-task-card/TaskCard.stories.js +0 -278
  324. package/dist/collection/components/sqm-task-card/UseTaskCard.stories.js +0 -41
  325. package/dist/collection/components/sqm-task-card/progress-bar/SVGs.js +0 -7
  326. package/dist/collection/components/sqm-task-card/progress-bar/progress-bar-view.js +0 -314
  327. package/dist/collection/components/sqm-task-card/sqm-task-card-view.js +0 -211
  328. package/dist/collection/components/sqm-task-card/sqm-task-card.js +0 -419
  329. package/dist/collection/tables/GenericTableView.js +0 -51
  330. package/dist/collection/tables/TableSlots.js +0 -22
  331. package/dist/esm-es5/ShadowViewAddon-2338f393.js +0 -1
  332. package/dist/esm-es5/sqm-divided-layout_30.entry.js +0 -1
  333. package/dist/esm-es5/sqm-navigation-sidebar-item-view-79b0748c.js +0 -1
  334. package/dist/esm-es5/useDemoBigStat-660c8672.js +0 -1
  335. package/dist/mint-components/assets/Reward-icon.png +0 -0
  336. package/dist/mint-components/mint-components.css +0 -1
  337. package/dist/mint-components/p-101fafa3.js +0 -1
  338. package/dist/mint-components/p-1dc2793a.system.entry.js +0 -1
  339. package/dist/mint-components/p-1dc2e37a.system.entry.js +0 -1
  340. package/dist/mint-components/p-1dd1105d.system.entry.js +0 -1
  341. package/dist/mint-components/p-22d56623.entry.js +0 -9
  342. package/dist/mint-components/p-232dddcc.system.entry.js +0 -1
  343. package/dist/mint-components/p-25021e09.entry.js +0 -1
  344. package/dist/mint-components/p-3098bb1b.system.entry.js +0 -1
  345. package/dist/mint-components/p-35ba4a8b.entry.js +0 -1
  346. package/dist/mint-components/p-441119ee.js +0 -235
  347. package/dist/mint-components/p-503192e9.entry.js +0 -1
  348. package/dist/mint-components/p-51277d8e.system.entry.js +0 -1
  349. package/dist/mint-components/p-58bf2a30.system.js +0 -1
  350. package/dist/mint-components/p-62102076.entry.js +0 -1
  351. package/dist/mint-components/p-623e7f8c.entry.js +0 -335
  352. package/dist/mint-components/p-6410316b.entry.js +0 -1
  353. package/dist/mint-components/p-69902f7c.system.js +0 -1
  354. package/dist/mint-components/p-6acfe4a0.entry.js +0 -1
  355. package/dist/mint-components/p-6cbb3a00.entry.js +0 -1
  356. package/dist/mint-components/p-7ee8a7ed.system.js +0 -1
  357. package/dist/mint-components/p-853bd4bd.entry.js +0 -1
  358. package/dist/mint-components/p-85728f98.entry.js +0 -1
  359. package/dist/mint-components/p-aa39d9c0.entry.js +0 -1
  360. package/dist/mint-components/p-b893904c.system.entry.js +0 -1
  361. package/dist/mint-components/p-bafc60df.js +0 -1
  362. package/dist/mint-components/p-dea06c92.entry.js +0 -1
  363. package/dist/mint-components/p-eb5aae94.entry.js +0 -1
  364. package/dist/mint-components/p-f7d7e44d.system.js +0 -1
  365. package/dist/types/components/sqm-reward-exchange-list/RewardExchangeList.stories.d.ts +0 -7
  366. package/dist/types/components/sqm-reward-exchange-list/RewardExchangeListData.d.ts +0 -112
  367. package/dist/types/components/sqm-reward-exchange-list/SVGs.d.ts +0 -3
  368. package/dist/types/components/sqm-reward-exchange-list/UseRewardExchangeList.stories.d.ts +0 -28
  369. package/dist/types/components/sqm-reward-exchange-list/progressBar.d.ts +0 -4
  370. package/dist/types/components/sqm-reward-exchange-list/sqm-reward-exchange-list-view.d.ts +0 -25
  371. package/dist/types/components/sqm-reward-exchange-list/sqm-reward-exchange-list.d.ts +0 -24
  372. package/dist/types/components/sqm-reward-exchange-list/useRewardExchangeList.d.ts +0 -44
  373. package/dist/types/components/sqm-rewards-table/UseRewardsTable.stories.d.ts +0 -16
  374. package/dist/types/components/sqm-rewards-table/sqm-rewards-table-column.d.ts +0 -20
  375. package/dist/types/components/sqm-rewards-table/sqm-rewards-table.d.ts +0 -32
  376. package/dist/types/components/sqm-rewards-table/useRewardsTable.d.ts +0 -38
  377. package/dist/types/components/sqm-task-card/Matrix.d.ts +0 -11
  378. package/dist/types/components/sqm-task-card/SVGs.d.ts +0 -2
  379. package/dist/types/components/sqm-task-card/TaskCard.stories.d.ts +0 -16
  380. package/dist/types/components/sqm-task-card/UseTaskCard.stories.d.ts +0 -10
  381. package/dist/types/components/sqm-task-card/progress-bar/SVGs.d.ts +0 -1
  382. package/dist/types/components/sqm-task-card/progress-bar/progress-bar-view.d.ts +0 -11
  383. package/dist/types/components/sqm-task-card/sqm-task-card-view.d.ts +0 -17
  384. package/dist/types/components/sqm-task-card/sqm-task-card.d.ts +0 -76
  385. package/dist/types/components/sqm-user-name/UserName.stories.d.ts +0 -6
  386. package/dist/types/tables/GenericTableView.d.ts +0 -29
  387. package/dist/types/tables/TableSlots.d.ts +0 -8
@@ -1,8 +1,8 @@
1
- import { h, r as registerInstance, c as Host, d as getAssetPath } from './index-17b4da69.js';
1
+ import { h, r as registerInstance, c as Host } from './index-17b4da69.js';
2
2
  import { m as h$1, j as useState, e as useEffect, f as useRef, n as d$2, y as y$1, b as browser, u as useReducer, c as createCommonjsModule, a as commonjsGlobal, k as useMemo } from './extends-3a3f9fe2.js';
3
- import { i as intl, a as insertCSS } from './global-0e81c5e6.js';
3
+ import { i as intl, a as insertCSS } from './global-2e50d2dc.js';
4
4
  import { u as useCallback } from './use-callback-b38a1523.js';
5
- import { d as dist, T as T$1, e as en, b as be, j as j$1, Z as Ze, r as rn, D as De, q as qe, P as P$1, E as Ee, M as M$1, a as sn, c as an, x as x$1, f as D$1, L as L$1, N as Ne, A as A$1 } from './index.module-9b5bb6a2.js';
5
+ import { d as dist, n as ne$1, c as cn, D as De, j as j$1, a as sn, b as mn, H as He, $ as $e, S as S$1, V as Ve, M as M$1, p as pn, v as vn, x as x$1, e as D$1, Y } from './index.module-1e92a7a3.js';
6
6
  import { j as jsonpointer } from './jsonpointer-388a7082.js';
7
7
  import { j as jss, c as create } from './jss-preset-default.esm-71fae192.js';
8
8
  import { g as getProps, a as getMissingProps } from './utils-454405f5.js';
@@ -11,21 +11,21 @@ import { E as ErrorStyles, H as HostBlock, A as AuthWrapper, a as AuthColumn, b
11
11
  import { P as PortalContainerView } from './sqm-portal-container-view-73757ca5.js';
12
12
  import { P as PortalSectionView } from './sqm-portal-section-view-f0876545.js';
13
13
  import { T as TextSpanView } from './sqm-text-span-view-1781df94.js';
14
- import { g as gql, L as LeaderboardRankView } from './sqm-leaderboard-rank-view-3f0dc20e.js';
15
- import { u as useRerenderListener, a as useRequestRerender } from './re-render-57ac6584.js';
16
- import { p as pathToRegexp, B as BigStatView, u as useBigStat, a as useDemoBigStat } from './useDemoBigStat-660c8672.js';
14
+ import { g as gql, L as LeaderboardRankView } from './sqm-leaderboard-rank-view-387f0870.js';
15
+ import { u as useRerenderListener } from './re-render-b8468637.js';
16
+ import { p as pathToRegexp, B as BigStatView, u as useBigStat, a as useDemoBigStat } from './useDemoBigStat-5557504e.js';
17
17
  import { S as ShareLinkView } from './sqm-share-link-view-9282b8e8.js';
18
- import { L as LeaderboardView, u as useLeaderboard, S as ShadowViewAddon } from './ShadowViewAddon-2338f393.js';
18
+ import { L as LeaderboardView, u as useLeaderboard, S as ShadowViewAddon } from './ShadowViewAddon-5f66de48.js';
19
19
  import { N as NavigationSidebarView } from './sqm-navigation-sidebar-view-2242502c.js';
20
- import { N as NavigationSidebarItemView } from './sqm-navigation-sidebar-item-view-79b0748c.js';
20
+ import { N as NavigationSidebarItemView } from './sqm-navigation-sidebar-item-view-a48bca9b.js';
21
21
  import { S as StatContainerView } from './sqm-stat-container-view-4133feb6.js';
22
- import { P as PortalProfileView } from './sqm-portal-profile-view-831dea85.js';
22
+ import { P as PortalProfileView } from './sqm-portal-profile-view-9f3c79c3.js';
23
23
  import { P as PortalForgotPasswordView } from './sqm-portal-forgot-password-view-e3a6a716.js';
24
- import { P as PortalEmailVerificationView } from './sqm-portal-email-verification-view-8f253fb7.js';
24
+ import { P as PortalEmailVerificationView } from './sqm-portal-email-verification-view-e366e94a.js';
25
25
  import { P as PortalResetPasswordView$1 } from './sqm-portal-reset-password-view-a4e50da2.js';
26
26
  import { P as PortalVerifyEmailView } from './sqm-portal-verify-email-view-6f18bac2.js';
27
27
  import { A as AssetCardView } from './sqm-asset-card-view-6f360937.js';
28
- import { P as PoweredByImg$1, a as PortalFooterView } from './sqm-portal-footer-view-b8a2f15e.js';
28
+ import { P as PoweredByImg$1, a as PortalFooterView } from './sqm-portal-footer-view-f12d5e5a.js';
29
29
  import { H as HeroView } from './sqm-hero-view-bfd8abd1.js';
30
30
  import { N as NameFieldsView } from './sqm-name-fields-view-4162fb7b.js';
31
31
 
@@ -194,13 +194,13 @@ const defaultFormState = {
194
194
  error: "",
195
195
  };
196
196
  function useEditProfile(props) {
197
- const userIdent = T$1();
197
+ const userIdent = ne$1();
198
198
  const [showEdit, setShowEdit] = useState(false);
199
199
  const [error, setError] = useState("");
200
200
  const [userData, setUserData] = useState(undefined);
201
201
  const [formState, setFormState] = useState(defaultFormState);
202
- const userDataResponse = en(GET_USER, {}, !(userIdent === null || userIdent === void 0 ? void 0 : userIdent.jwt));
203
- const [upsertUser, upsertUserResponse] = be(UPSERT_USER);
202
+ const userDataResponse = cn(GET_USER, {}, !(userIdent === null || userIdent === void 0 ? void 0 : userIdent.jwt));
203
+ const [upsertUser, upsertUserResponse] = De(UPSERT_USER);
204
204
  useEffect(() => {
205
205
  if ((upsertUserResponse === null || upsertUserResponse === void 0 ? void 0 : upsertUserResponse.loading) || !showEdit)
206
206
  return;
@@ -426,12 +426,12 @@ function NavigationMenuView(props) {
426
426
  }
427
427
 
428
428
  function handleMenu(e) {
429
- rn.push(e.detail.item.value);
429
+ mn.push(e.detail.item.value);
430
430
  }
431
431
  function useNavigationMenu(props) {
432
432
  const ref = useRef();
433
- const [, rerender] = Ze();
434
- const user = T$1();
433
+ const [, rerender] = sn();
434
+ const user = ne$1();
435
435
  useEffect(() => {
436
436
  var _a;
437
437
  (_a = ref.current) === null || _a === void 0 ? void 0 : _a.addEventListener("sl-select", (e) => handleMenu(e));
@@ -1125,11 +1125,11 @@ function PortalChangePasswordView(props) {
1125
1125
 
1126
1126
  function usePortalChangePassword(props) {
1127
1127
  var _a, _b, _c, _d;
1128
- const [request, { loading, errors, data }] = De();
1128
+ const [request, { loading, errors, data }] = He();
1129
1129
  const [open, setOpen] = useState(false);
1130
1130
  const [error, setError] = useState("");
1131
1131
  const [success, setSuccess] = useState(false);
1132
- const user = T$1();
1132
+ const user = ne$1();
1133
1133
  const submit = async (event) => {
1134
1134
  var _a;
1135
1135
  setSuccess(false);
@@ -1304,7 +1304,7 @@ function PortalFrameView(props, children) {
1304
1304
  }
1305
1305
 
1306
1306
  function usePortalFrame(footerContent, headerContent) {
1307
- const [, rerender] = Ze();
1307
+ const [, rerender] = sn();
1308
1308
  return {
1309
1309
  data: {
1310
1310
  footer: footerContent,
@@ -1390,9 +1390,9 @@ function PortalLoginView(props) {
1390
1390
  content.secondaryButton))));
1391
1391
  }
1392
1392
 
1393
- function usePortalLogin({ nextPage }) {
1393
+ function usePortalLogin(props) {
1394
1394
  var _a, _b, _c, _d;
1395
- const [request, { loading, errors, data }] = qe();
1395
+ const [request, { loading, errors, data }] = $e();
1396
1396
  const [error, setError] = useState("");
1397
1397
  const urlParams = new URLSearchParams(window.location.search);
1398
1398
  const nextPageOverride = urlParams.get("nextPage");
@@ -1409,8 +1409,8 @@ function usePortalLogin({ nextPage }) {
1409
1409
  var _a;
1410
1410
  if ((_a = data === null || data === void 0 ? void 0 : data.authenticateManagedIdentityWithEmailAndPassword) === null || _a === void 0 ? void 0 : _a.token) {
1411
1411
  urlParams.delete("nextPage");
1412
- rn.push({
1413
- pathname: nextPageOverride || nextPage,
1412
+ mn.push({
1413
+ pathname: nextPageOverride || props.nextPage,
1414
1414
  search: urlParams.toString() && "?" + urlParams.toString(),
1415
1415
  });
1416
1416
  }
@@ -1426,6 +1426,8 @@ function usePortalLogin({ nextPage }) {
1426
1426
  states: {
1427
1427
  loading,
1428
1428
  error: errorMessage,
1429
+ registerPath: props.registerPath,
1430
+ forgotPasswordPath: props.forgotPasswordPath
1429
1431
  },
1430
1432
  callbacks: {
1431
1433
  submit,
@@ -1465,6 +1467,14 @@ const PortalLogin = class {
1465
1467
  * @uiName Heading label
1466
1468
  */
1467
1469
  this.pageLabel = "Sign in to your account";
1470
+ /**
1471
+ * @uiName Register button redirection path
1472
+ */
1473
+ this.registerPath = "/register";
1474
+ /**
1475
+ * @uiName Forgot password button redirect path
1476
+ */
1477
+ this.forgotPasswordPath = "/forgotPassword";
1468
1478
  h$1(this);
1469
1479
  }
1470
1480
  disconnectedCallback() { }
@@ -1473,8 +1483,8 @@ const PortalLogin = class {
1473
1483
  ? useLoginDemo(this)
1474
1484
  : usePortalLogin(this);
1475
1485
  const content = {
1476
- forgotPasswordButton: (h("slot", { name: "forgotPassword" }, h("a", { onClick: () => rn.push("/forgotPassword") }, this.forgotPasswordLabel))),
1477
- secondaryButton: (h("slot", { name: "secondaryButton" }, h("sl-button", { type: "text", disabled: states.loading, onClick: () => rn.push("/register") }, this.registerLabel))),
1486
+ forgotPasswordButton: (h("slot", { name: "forgotPassword" }, h("a", { onClick: () => mn.push(states.forgotPasswordPath) }, this.forgotPasswordLabel))),
1487
+ secondaryButton: (h("slot", { name: "secondaryButton" }, h("sl-button", { type: "text", disabled: states.loading, onClick: () => mn.push(states.registerPath) }, this.registerLabel))),
1478
1488
  emailLabel: this.emailLabel,
1479
1489
  passwordLabel: this.passwordLabel,
1480
1490
  submitLabel: this.submitLabel,
@@ -1485,7 +1495,12 @@ const PortalLogin = class {
1485
1495
  };
1486
1496
  function useLoginDemo(props) {
1487
1497
  return cjs({
1488
- states: { error: "", loading: false },
1498
+ states: {
1499
+ error: "",
1500
+ loading: false,
1501
+ forgotPasswordPath: "/forgotPassword",
1502
+ registerPath: "/register",
1503
+ },
1489
1504
  callbacks: {
1490
1505
  submit: async (_event) => {
1491
1506
  console.log("submit");
@@ -1567,7 +1582,7 @@ function PortalRegisterView(props) {
1567
1582
 
1568
1583
  const CONTEXT_NAME$1 = "sq:validation-state";
1569
1584
  function useValidationState(formState) {
1570
- const host = P$1();
1585
+ const host = S$1();
1571
1586
  const [validationState, setValidationState] = y$1(host, CONTEXT_NAME$1, formState);
1572
1587
  return { validationState, setValidationState };
1573
1588
  }
@@ -5447,7 +5462,7 @@ function usePortalRegister(props) {
5447
5462
  var _a, _b, _c, _d, _e, _f;
5448
5463
  const formRef = useRef(null);
5449
5464
  const { validationState, setValidationState } = useValidationState({});
5450
- const [request, { loading, errors, data }] = Ee();
5465
+ const [request, { loading, errors, data }] = Ve();
5451
5466
  const submit = async (event) => {
5452
5467
  let formControls = event.target.getFormControls();
5453
5468
  let formData = {};
@@ -5487,10 +5502,12 @@ function usePortalRegister(props) {
5487
5502
  delete formData.password;
5488
5503
  delete formData.confirmPassword;
5489
5504
  formData = { ...formData };
5505
+ const redirectPath = props.redirectPath;
5490
5506
  const variables = {
5491
5507
  email,
5492
5508
  password,
5493
5509
  formData,
5510
+ redirectPath,
5494
5511
  };
5495
5512
  try {
5496
5513
  await request(variables);
@@ -5510,7 +5527,7 @@ function usePortalRegister(props) {
5510
5527
  useEffect(() => {
5511
5528
  var _a;
5512
5529
  if ((_a = data === null || data === void 0 ? void 0 : data.registerManagedIdentityWithEmailAndPassword) === null || _a === void 0 ? void 0 : _a.token) {
5513
- rn.push(props.nextPage);
5530
+ mn.push(props.nextPage);
5514
5531
  }
5515
5532
  }, [(_a = data === null || data === void 0 ? void 0 : data.registerManagedIdentityWithEmailAndPassword) === null || _a === void 0 ? void 0 : _a.token]);
5516
5533
  useEffect(() => {
@@ -5540,6 +5557,7 @@ function usePortalRegister(props) {
5540
5557
  validationState,
5541
5558
  confirmPassword: props.confirmPassword,
5542
5559
  hideInputs: props.hideInputs,
5560
+ loginPath: props.loginPath,
5543
5561
  },
5544
5562
  callbacks: {
5545
5563
  submit,
@@ -5559,6 +5577,12 @@ const PortalRegister = class {
5559
5577
  * @uiName Page navigated to after registration
5560
5578
  */
5561
5579
  this.nextPage = "/";
5580
+ /**
5581
+ * The page that users are redirected to from the verification email.
5582
+ *
5583
+ * @uiName Email redirection base path
5584
+ */
5585
+ this.redirectPath = "/verifyEmail";
5562
5586
  /**
5563
5587
  * @uiName Label for email field
5564
5588
  */
@@ -5595,6 +5619,10 @@ const PortalRegister = class {
5595
5619
  * @uiName Heading label
5596
5620
  */
5597
5621
  this.pageLabel = "Register";
5622
+ /**
5623
+ * @uiName Sign in button redirection path
5624
+ */
5625
+ this.loginPath = "/login";
5598
5626
  h$1(this);
5599
5627
  }
5600
5628
  disconnectedCallback() { }
@@ -5604,7 +5632,7 @@ const PortalRegister = class {
5604
5632
  : usePortalRegister(this);
5605
5633
  const content = {
5606
5634
  formData: h("slot", { name: "formData" }),
5607
- secondaryButton: (h("slot", { name: "secondaryButton" }, h("sl-button", { type: "text", disabled: states.loading, onClick: () => rn.push("/login") }, this.loginLabel))),
5635
+ secondaryButton: (h("slot", { name: "secondaryButton" }, h("sl-button", { type: "text", disabled: states.loading, onClick: () => mn.push(states.loginPath) }, this.loginLabel))),
5608
5636
  emailLabel: this.emailLabel,
5609
5637
  passwordLabel: this.passwordLabel,
5610
5638
  submitLabel: this.submitLabel,
@@ -5622,6 +5650,7 @@ function useRegisterDemo(props) {
5622
5650
  confirmPassword: true,
5623
5651
  hideInputs: props.hideInputs || false,
5624
5652
  customPasswordField: false,
5653
+ loginPath: "/login",
5625
5654
  },
5626
5655
  callbacks: {
5627
5656
  submit: async (_event) => {
@@ -5639,10 +5668,10 @@ const debug = browser('sq:useProgramMenu');
5639
5668
  const UPDATE_PROGRAM_EVENT = 'sq:update-program-id';
5640
5669
  function useProgramMenu(props) {
5641
5670
  const programId = M$1();
5642
- const host = P$1();
5671
+ const host = S$1();
5643
5672
  debug({ programId, props });
5644
5673
  const ref = useRef();
5645
- const [, rerender] = Ze();
5674
+ const [, rerender] = sn();
5646
5675
  useEffect(() => {
5647
5676
  var _a;
5648
5677
  (_a = ref.current) === null || _a === void 0 ? void 0 : _a.addEventListener('sl-select', (e) => {
@@ -5691,8 +5720,8 @@ const GET_USER_DETAILS = dist.gql `
5691
5720
  function useReferralIframe(props) {
5692
5721
  var _a;
5693
5722
  const programId = M$1();
5694
- const user = T$1();
5695
- const { data } = en(GET_USER_DETAILS, { programId }, !(user === null || user === void 0 ? void 0 : user.jwt) || !programId);
5723
+ const user = ne$1();
5724
+ const { data } = cn(GET_USER_DETAILS, { programId }, !(user === null || user === void 0 ? void 0 : user.jwt) || !programId);
5696
5725
  return {
5697
5726
  states: {
5698
5727
  content: props,
@@ -5756,7 +5785,7 @@ const styleString$5 = sheet$5.toString();
5756
5785
  function RequiredPropsError({ missingProps }) {
5757
5786
  if (!missingProps)
5758
5787
  return false;
5759
- const host = P$1();
5788
+ const host = S$1();
5760
5789
  const [detailsOpen, setDetailsOpen] = useState(false);
5761
5790
  return (h("sl-alert", { type: "danger", open: true, class: sheet$5.classes.Alert },
5762
5791
  h("style", { type: "text/css" }, styleString$5),
@@ -5873,7 +5902,7 @@ function ReferralTableView(props) {
5873
5902
  }
5874
5903
 
5875
5904
  function useChildElements() {
5876
- const host = P$1();
5905
+ const host = S$1();
5877
5906
  const initialState = host.children.length ? Array.from(host.children) : [];
5878
5907
  const [childElements, setChildElements] = useState(initialState);
5879
5908
  useEffect(() => {
@@ -6046,7 +6075,7 @@ const GET_REFERRAL_DATA = gql `
6046
6075
  `;
6047
6076
  function useReferralTable(props, emptyElement, loadingElement) {
6048
6077
  var _a, _b;
6049
- const user = T$1();
6078
+ const user = ne$1();
6050
6079
  const programIdContext = M$1();
6051
6080
  // Default to context, overriden by props
6052
6081
  const programId = (_a = props.programId) !== null && _a !== void 0 ? _a : programIdContext;
@@ -6069,13 +6098,13 @@ function useReferralTable(props, emptyElement, loadingElement) {
6069
6098
  loading: false,
6070
6099
  page: 0,
6071
6100
  });
6072
- const { data: referrerResponse, loading: referrerLoading, refetch, } = en(GET_REFERRER_DATA, {
6101
+ const { data: referrerResponse, loading: referrerLoading, refetch, } = cn(GET_REFERRER_DATA, {
6073
6102
  programId: programId === "classic" ? null : programId,
6074
6103
  rewardFilter,
6075
6104
  }, !props.showReferrer || !(user === null || user === void 0 ? void 0 : user.jwt));
6076
6105
  const referrerData = (_b = referrerResponse === null || referrerResponse === void 0 ? void 0 : referrerResponse.viewer) === null || _b === void 0 ? void 0 : _b.referredByReferral;
6077
6106
  const showReferrerRow = props.showReferrer && !!(referrerData === null || referrerData === void 0 ? void 0 : referrerData.dateReferralStarted);
6078
- const { envelope: referralData, states, callbacks, } = sn(GET_REFERRAL_DATA, (data) => { var _a; return (_a = data === null || data === void 0 ? void 0 : data.viewer) === null || _a === void 0 ? void 0 : _a.referrals; }, {
6107
+ const { envelope: referralData, states, callbacks, } = pn(GET_REFERRAL_DATA, (data) => { var _a; return (_a = data === null || data === void 0 ? void 0 : data.viewer) === null || _a === void 0 ? void 0 : _a.referrals; }, {
6079
6108
  limit: props.perPage,
6080
6109
  offset: 0,
6081
6110
  }, {
@@ -14745,1094 +14774,111 @@ const ReferralTableUserCell = class {
14745
14774
  }
14746
14775
  };
14747
14776
 
14748
- const GET_EXCHANGE_LIST = dist.gql `
14749
- query getExchangeList {
14750
- viewer {
14751
- ... on User {
14752
- visibleRewardExchangeItems(limit: 20, offset: 0) {
14753
- data {
14754
- key
14755
- name
14756
- description
14757
- imageUrl
14758
- available
14759
- unavailableReason
14760
- unavailableReasonCode
14761
- ruleType
14762
- sourceUnit
14763
- sourceValue
14764
- prettySourceValue
14765
- sourceMinValue
14766
- prettySourceMinValue
14767
- sourceMaxValue
14768
- prettySourceMaxValue
14769
- destinationMinValue
14770
- prettyDestinationMinValue
14771
- destinationMaxValue
14772
- prettyDestinationMaxValue
14773
- globalRewardKey
14774
- destinationUnit
14775
- steps {
14776
- sourceValue
14777
- prettySourceValue
14778
- destinationValue
14779
- prettyDestinationValue
14780
- available
14781
- unavailableReasonCode
14782
- }
14783
- }
14784
- totalCount
14785
- }
14786
- }
14787
- }
14788
- }
14789
- `;
14790
- const EXCHANGE = dist.gql `
14791
- mutation exchange($exchangeRewardInput: ExchangeRewardInput!) {
14792
- exchangeReward(exchangeRewardInput: $exchangeRewardInput) {
14793
- reward {
14794
- id
14795
- fuelTankCode
14796
- }
14797
- }
14798
- }
14799
- `;
14800
- function useRewardExchangeList(props) {
14801
- var _a, _b, _c, _d;
14802
- const [exchangeState, setExchangeState] = useReducer((state, next) => ({
14803
- ...state,
14804
- ...next,
14805
- }), {
14806
- selectedItem: undefined,
14807
- selectedStep: undefined,
14808
- redeemStage: "chooseReward",
14809
- amount: 0,
14810
- exchangeError: false,
14811
- });
14812
- const { selectedItem, selectedStep, redeemStage, amount, exchangeError } = exchangeState;
14813
- const user = T$1();
14814
- const [exchange, { data: exchangeResponse, errors }] = be(EXCHANGE);
14815
- const { data, loading, refetch } = en(GET_EXCHANGE_LIST, !(user === null || user === void 0 ? void 0 : user.jwt));
14777
+ const debug$1 = browser("sq:useRouter");
14778
+ function matchPath(pattern, page) {
14779
+ if (!pattern)
14780
+ return;
14781
+ const regexp = pathToRegexp(pattern);
14782
+ return regexp.exec(page);
14783
+ }
14784
+ function useRouter() {
14785
+ const location = vn();
14786
+ const host = S$1();
14787
+ const [slot, setSlot] = useState(undefined);
14788
+ const [container, setContainer] = useState(undefined);
14789
+ const page = location.pathname;
14790
+ // convert sqm-routes into templates
14791
+ useEffect(() => {
14792
+ const routes = host.querySelectorAll(`sqm-route`);
14793
+ const routesArray = Array.from(routes);
14794
+ routesArray.forEach((route) => {
14795
+ const newTemplate = document.createElement("template");
14796
+ newTemplate.setAttribute("path", route.path);
14797
+ newTemplate.innerHTML = route.innerHTML;
14798
+ route.parentNode.appendChild(newTemplate);
14799
+ route.parentNode.removeChild(route);
14800
+ });
14801
+ }, []);
14816
14802
  useEffect(() => {
14817
14803
  var _a, _b;
14818
- if ((_b = (_a = exchangeResponse === null || exchangeResponse === void 0 ? void 0 : exchangeResponse.exchangeReward) === null || _a === void 0 ? void 0 : _a.reward) === null || _b === void 0 ? void 0 : _b.id) {
14819
- setExchangeState({ redeemStage: "success", exchangeError: false });
14820
- }
14821
- if (!!errors) {
14822
- setExchangeState({ exchangeError: true });
14823
- }
14824
- }, [exchangeResponse, errors]);
14825
- function exchangeReward() {
14826
- if (!selectedItem)
14804
+ if (!container || !slot) {
14805
+ debug$1("DOM not ready for navigation rendering on:", page);
14827
14806
  return;
14828
- let exchangeVariables = {
14829
- accountId: user === null || user === void 0 ? void 0 : user.accountId,
14830
- userId: user.id,
14831
- };
14832
- switch (selectedItem.ruleType) {
14833
- case "FIXED_GLOBAL_REWARD":
14834
- exchangeVariables = {
14835
- ...exchangeVariables,
14836
- redeemCreditInput: {
14837
- amount: selectedItem.sourceValue,
14838
- unit: selectedItem.sourceUnit,
14839
- },
14840
- globalRewardKey: selectedItem.globalRewardKey,
14841
- };
14842
- break;
14843
- case "VARIABLE_GLOBAL_REWARD":
14844
- exchangeVariables = {
14845
- ...exchangeVariables,
14846
- redeemCreditInput: {
14847
- amount: amount,
14848
- unit: selectedItem.sourceUnit,
14849
- },
14850
- globalRewardKey: selectedItem.globalRewardKey,
14851
- rewardInput: {
14852
- valueInCents: selectedStep.destinationValue,
14853
- },
14854
- };
14855
- break;
14856
- case "VARIABLE_CREDIT_REWARD":
14857
- exchangeVariables = {
14858
- ...exchangeVariables,
14859
- redeemCreditInput: {
14860
- amount: amount,
14861
- unit: selectedItem.sourceUnit,
14862
- },
14863
- rewardInput: {
14864
- type: "CREDIT",
14865
- unit: selectedItem.destinationUnit,
14866
- assignedCredit: selectedStep.destinationValue,
14867
- },
14868
- };
14869
- break;
14870
- default:
14871
- exchangeVariables = {
14872
- ...exchangeVariables,
14873
- redeemCreditInput: {
14874
- amount: selectedItem.sourceValue,
14875
- unit: selectedItem.sourceUnit,
14876
- },
14877
- globalRewardKey: selectedItem.globalRewardKey,
14878
- };
14879
14807
  }
14880
- exchange({ exchangeRewardInput: exchangeVariables });
14881
- }
14882
- const resetState = (refresh) => {
14883
- refresh && refetch();
14884
- setExchangeState({
14885
- amount: 0,
14886
- selectedStep: undefined,
14887
- selectedItem: undefined,
14888
- exchangeError: false,
14889
- redeemStage: "chooseReward",
14808
+ // <template>
14809
+ const templates = slot.querySelectorAll(`template`);
14810
+ const templatesArray = Array.from(templates);
14811
+ const template = templatesArray.find((template) => {
14812
+ var _a, _b, _c;
14813
+ //@ts-ignore
14814
+ const path = (_b = (_a = template.attributes) === null || _a === void 0 ? void 0 : _a.path) === null || _b === void 0 ? void 0 : _b.nodeValue;
14815
+ if ((_c = matchPath(path, page)) === null || _c === void 0 ? void 0 : _c.length)
14816
+ return template;
14890
14817
  });
14891
- };
14892
- function setStage(stage) {
14893
- setExchangeState({ redeemStage: stage });
14894
- }
14818
+ //@ts-ignore - can't access template attributes directly
14819
+ const templatePath = (_b = (_a = template === null || template === void 0 ? void 0 : template.attributes) === null || _a === void 0 ? void 0 : _a.path) === null || _b === void 0 ? void 0 : _b.nodeValue;
14820
+ debug$1({
14821
+ containerDatasetPage: container.dataset.page,
14822
+ templatePath,
14823
+ page,
14824
+ });
14825
+ // if no routes found, and the old route doesn't match the new route
14826
+ if (!template) {
14827
+ // No matching page, display nothing
14828
+ debug$1("No matching page found for ", page, ", so render nothing");
14829
+ container.innerHTML = "";
14830
+ container.dataset.page = page;
14831
+ return;
14832
+ }
14833
+ debug$1("Page updated to ", page, template);
14834
+ // if pathToRegexp results truthy or page is an exact match
14835
+ if (!!matchPath(templatePath, container.dataset.page)) {
14836
+ debug$1("don't rerender");
14837
+ // Same page, do not re-render
14838
+ // Reduces dom mutations, speeds up page speed
14839
+ }
14840
+ else if (template) {
14841
+ container.innerHTML = template.innerHTML;
14842
+ container.dataset.page = page;
14843
+ }
14844
+ }, [slot, container, page]);
14895
14845
  return {
14896
- states: {
14897
- content: {
14898
- text: props,
14899
- },
14900
- selectedItem,
14901
- redeemStage,
14902
- amount,
14903
- selectedStep,
14904
- exchangeError,
14905
- loading,
14906
- },
14907
- data: {
14908
- exchangeList: (_b = (_a = data === null || data === void 0 ? void 0 : data.viewer) === null || _a === void 0 ? void 0 : _a.visibleRewardExchangeItems) === null || _b === void 0 ? void 0 : _b.data,
14909
- fuelTankCode: (_d = (_c = exchangeResponse === null || exchangeResponse === void 0 ? void 0 : exchangeResponse.exchangeReward) === null || _c === void 0 ? void 0 : _c.reward) === null || _d === void 0 ? void 0 : _d.fuelTankCode,
14910
- },
14911
14846
  callbacks: {
14912
- exchangeReward,
14913
- setExchangeState,
14914
- setStage,
14915
- resetState,
14847
+ setSlot,
14848
+ setContainer,
14916
14849
  },
14917
14850
  };
14918
14851
  }
14919
14852
 
14920
- const ExchangeArrows = () => (h("svg", { width: "30", height: "30", viewBox: "0 0 30 30", fill: "none", xmlns: "http://www.w3.org/2000/svg" },
14921
- h("circle", { cx: "15", cy: "15", r: "15", fill: "white" }),
14922
- h("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M10.6255 21.783C10.5129 21.8963 10.3597 21.96 10.2 21.96C10.0402 21.96 9.88705 21.8963 9.77442 21.783L5.87442 17.8597C5.64081 17.6247 5.64194 17.2448 5.87695 17.0112C6.11197 16.7775 6.49186 16.7787 6.72548 17.0137L9.59995 19.9054V8.52001C9.59995 8.18864 9.86858 7.92001 10.2 7.92001C10.5313 7.92001 10.8 8.18864 10.8 8.52001V19.9054L13.6744 17.0137C13.908 16.7787 14.2879 16.7775 14.5229 17.0112C14.758 17.2448 14.7591 17.6247 14.5255 17.8597L10.6255 21.783ZM20.2255 8.09707C20.1129 7.98378 19.9597 7.92007 19.8 7.92007C19.6402 7.92007 19.487 7.98378 19.3744 8.09707L15.4744 12.0204C15.2408 12.2554 15.2419 12.6353 15.477 12.8689C15.712 13.1025 16.0919 13.1014 16.3255 12.8664L19.2 9.97473V21.3601C19.2 21.6914 19.4686 21.9601 19.8 21.9601C20.1313 21.9601 20.4 21.6914 20.4 21.3601V9.97473L23.2744 12.8664C23.508 13.1014 23.8879 13.1025 24.1229 12.8689C24.358 12.6353 24.3591 12.2554 24.1255 12.0204L20.2255 8.09707Z", fill: "#333333" })));
14923
- const CheckMark = () => (h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "10", height: "7", viewBox: "0 0 10 7", fill: "none" },
14924
- h("path", { d: "M2.12828 2.71485C1.72536 2.33712 1.09253 2.35754 0.714799 2.76045C0.337068 3.16336 0.357483 3.7962 0.760395 4.17393L2.12828 2.71485ZM3.81471 5.66661L3.13076 6.39615C3.51542 6.75677 4.11399 6.75677 4.49865 6.39615L3.81471 5.66661ZM9.23939 1.95171C9.6423 1.57397 9.66271 0.941139 9.28498 0.538227C8.90725 0.135315 8.27442 0.114901 7.87151 0.492631L9.23939 1.95171ZM0.760395 4.17393L3.13076 6.39615L4.49865 4.93708L2.12828 2.71485L0.760395 4.17393ZM4.49865 6.39615L9.23939 1.95171L7.87151 0.492631L3.13076 4.93708L4.49865 6.39615Z", fill: "white" })));
14925
-
14926
- function Dot({ active, completed, incomplete, }) {
14927
- return (h("div", { style: {
14928
- flex: "0 0 0",
14929
- content: "''",
14930
- height: "4px",
14931
- borderRadius: "4px",
14932
- background: incomplete ? "#E5E5E5" : "#9E9E9E",
14933
- position: "relative",
14934
- bottom: "0",
14935
- left: "0",
14936
- display: "flex",
14937
- justifyContent: "center",
14938
- columnGap: "50px",
14939
- marginRight: "-2px",
14940
- boxSizing: "content-box",
14941
- } },
14942
- h("div", { style: {
14943
- backgroundColor: completed ? "#9E9E9E" : "#FFF",
14944
- border: active
14945
- ? "3px solid #9E9E9E"
14946
- : incomplete
14947
- ? "3px solid #E5E5E5"
14948
- : "3px solid #9E9E9E",
14949
- borderRadius: "50%",
14950
- width: "10px",
14951
- height: "10px",
14952
- margin: "-6px auto 0px",
14953
- zIndex: "1",
14954
- boxSizing: "content-box",
14955
- } }, completed && (h("div", { style: { top: "-6px", position: "relative" } },
14956
- h(CheckMark, null))))));
14957
- }
14958
- function ProgressLine({ incomplete = false, active = false }) {
14959
- return (h("div", { style: {
14960
- content: "''",
14961
- flex: "0.5 0.5 0",
14962
- height: "4px",
14963
- borderRadius: "4px",
14964
- background: incomplete || active ? "#E5E5E5" : "#9E9E9E",
14965
- position: "relative",
14966
- bottom: "0",
14967
- left: "0",
14968
- display: "flex",
14969
- justifyContent: "center",
14970
- columnGap: "50px",
14971
- marginRight: "-2px",
14972
- boxSizing: "content-box",
14973
- } }));
14974
- }
14975
- function Progress({ active, completed, incomplete }) {
14976
- return [
14977
- h(ProgressLine, { incomplete: incomplete }),
14978
- h(Dot, { active: active, completed: completed, incomplete: incomplete }),
14979
- h(ProgressLine, { incomplete: incomplete, active: active }),
14980
- ];
14981
- }
14982
- function ProgressBar({ stageCount, currentStage, }) {
14983
- return (h("div", { style: { display: "flex", columnGap: "-2px" } }, Array.from(Array(stageCount).keys()).map((stage) => (h(Progress, { active: currentStage === stage, completed: currentStage > stage, incomplete: currentStage < stage })))));
14984
- }
14985
-
14986
- const stageList = ["chooseReward", "chooseAmount", "confirmation", "success"];
14987
- const stageProgressList = {
14988
- chooseReward: "Choose reward",
14989
- chooseAmount: "Amount",
14990
- confirmation: "Confirm",
14991
- };
14992
- function RewardExchangeView(props) {
14993
- console.log(props);
14994
- const style = {
14995
- HostBlock: HostBlock,
14996
- Container: {
14997
- padding: "var(--sl-spacing-medium)",
14998
- position: "relative",
14999
- },
15000
- CardContainer: {
15001
- "&:active": {
15002
- //boxShadow: "0 3px 10px #87ceeb6e!important",
15003
- },
15004
- },
15005
- Base: {
15006
- display: "flex",
15007
- cursor: "pointer",
15008
- textAlign: "center",
15009
- height: "120px",
15010
- "&::part(base)": {
15011
- boxShadow: "none",
15012
- width: "100%",
15013
- // maxWidth: "350px",
15014
- display: "flex",
15015
- margin: "0 auto",
15016
- },
15017
- "&::part(body)": {
15018
- padding: 0,
15019
- display: "flex",
15020
- width: "100%",
15021
- },
15022
- "& .text-area": {
15023
- textAlign: "left",
15024
- padding: "8px",
15025
- },
15026
- "& .title": {
15027
- fontSize: "var(--sl-font-size-medium)",
15028
- fontWeight: "var(--sl-font-weight-semibold)",
15029
- },
15030
- "& .amount": {
15031
- fontSize: "var(--sl-font-size-small)",
15032
- },
15033
- "& .error": {
15034
- fontSize: "var(--sl-font-size-small)",
15035
- color: "var(--sl-color-warning-500)",
15036
- },
15037
- "& .selected-outline": {
15038
- width: "18px",
15039
- height: "18px",
15040
- minWidth: "18px",
15041
- borderRadius: "50%",
15042
- background: "var(--sl-color-primary-500)",
15043
- position: "relative",
15044
- margin: "-9px",
15045
- left: "100%",
15046
- },
15047
- "& .selected-checkmark": {
15048
- position: "relative",
15049
- top: "-6px",
15050
- },
15051
- },
15052
- Drawer: {
15053
- "&::part(base)": {
15054
- minWidth: "400px",
15055
- maxWidth: "700px",
15056
- width: "50%",
15057
- margin: "0 auto",
15058
- right: "0",
15059
- },
15060
- "&::part(panel)": {
15061
- height: "85vh",
15062
- width: "100%",
15063
- },
15064
- },
15065
- FullImage: {
15066
- objectFit: "contain",
15067
- maxWidth: "100%",
15068
- height: "150px",
15069
- display: "flex",
15070
- margin: "0 auto",
15071
- },
15072
- PreviewImage: {
15073
- objectFit: "contain",
15074
- width: "120px",
15075
- height: "120px",
15076
- flex: 0.33,
15077
- },
15078
- InputBox: {
15079
- width: "100%",
15080
- marginBottom: "20px",
15081
- },
15082
- Select: {
15083
- "&::part(base)": {
15084
- flex: "0.75",
15085
- },
15086
- "&::part(menu)": {
15087
- maxHeight: "40vh",
15088
- },
15089
- },
15090
- Buttons: {
15091
- marginLeft: "auto",
15092
- width: "100%",
15093
- maxWidth: "300px",
15094
- },
15095
- Button: {
15096
- margin: "10px 0",
15097
- display: "block",
15098
- textAlign: "center",
15099
- cursor: "pointer",
15100
- },
15101
- ProgressBar: {
15102
- fontSize: "80%",
15103
- marginBottom: "20px",
15104
- "& .text-area": {
15105
- marginTop: "5px",
15106
- display: "flex",
15107
- justifyContent: "center",
15108
- textAlign: "center",
15109
- whiteSpace: "nowrap",
15110
- marginBottom: "6px",
15111
- "& .text": {
15112
- flex: "1 1 0",
15113
- },
15114
- "& .text.subdued": {
15115
- color: "#BDBDBD",
15116
- },
15117
- },
15118
- },
15119
- KutayCard: {
15120
- "&::part(base)": {
15121
- boxShadow: "none",
15122
- },
15123
- },
15124
- KutayButton: {
15125
- display: "flex",
15126
- flexWrap: "wrap-reverse",
15127
- margin: "var(--sl-spacing-medium) 0",
15128
- "& .cancel": {
15129
- marginLeft: "auto",
15130
- marginRight: "var(--sl-spacing-medium)",
15131
- "&::part(base)": {
15132
- fontWeight: "var(--sl-font-weight-normal)",
15133
- color: "var(--sl-color-neutral-1000)",
15134
- },
15135
- "@media (max-width: 1024px)": {
15136
- width: "100%",
15137
- marginRight: "0",
15138
- },
15139
- },
15140
- "& .continue": {
15141
- "&::part(base)": {
15142
- background: "var(--sl-color-primary-500)",
15143
- borderColor: "var(--sl-color-primary-500)",
15144
- fontWeight: "var(--sl-font-weight-normal)",
15145
- color: "var(--sl-color-neutral-0)",
15146
- },
15147
- "@media (max-width: 1024px)": {
15148
- width: "100%",
15149
- },
15150
- },
15151
- "& .continue.right": {
15152
- marginLeft: "auto",
15153
- },
15154
- },
15155
- };
15156
- // JSS config
15157
- jss.setup(create());
15158
- const sheet = jss.createStyleSheet(style);
15159
- const styleString = sheet.toString();
15160
- const { states, data, callbacks } = props;
15161
- const { selectedItem, selectedStep } = states;
15162
- function getInput() {
15163
- var _a, _b;
15164
- const item = states.selectedItem;
15165
- if (!item || (item === null || item === void 0 ? void 0 : item.ruleType) === "FIXED_GLOBAL_REWARD")
15166
- return h("span", null, item === null || item === void 0 ? void 0 : item.prettySourceValue);
15167
- if (!((_a = item.steps) === null || _a === void 0 ? void 0 : _a.length)) {
15168
- return h("p", null,
15169
- "Not enough ",
15170
- item.sourceUnit,
15171
- " to redeem for this reward.");
15172
- }
15173
- return (h("sl-select", { style: { width: "auto" }, label: "Select amount to receive", class: sheet.classes.Select, value: states.selectedStep, "onSl-select": (e) => {
15174
- var _a, _b, _c, _d, _e;
15175
- return callbacks.setExchangeState({
15176
- amount: (_c = (_b = (_a = e.detail) === null || _a === void 0 ? void 0 : _a.item) === null || _b === void 0 ? void 0 : _b.value) === null || _c === void 0 ? void 0 : _c.sourceValue,
15177
- selectedStep: (_e = (_d = e.detail) === null || _d === void 0 ? void 0 : _d.item) === null || _e === void 0 ? void 0 : _e.value,
15178
- });
15179
- } }, (_b = item.steps) === null || _b === void 0 ? void 0 : _b.map((step) => {
15180
- var _a, _b;
15181
- return (h("sl-menu-item", { value: step, disabled: !step.available },
15182
- step.prettyDestinationValue,
15183
- h("div", { slot: "suffix", style: { fontSize: "75%", float: "right" } },
15184
- step.prettySourceValue,
15185
- step.unavailableReasonCode && (h("p", { style: { fontSize: "70%", color: "#F2994A" } }, intl.formatMessage({
15186
- id: "unavailableCode",
15187
- defaultMessage: (_b = (_a = states.content) === null || _a === void 0 ? void 0 : _a.text) === null || _b === void 0 ? void 0 : _b.notAvailableError,
15188
- }, {
15189
- unavailableReason: step.unavailableReason || step.unavailableReasonCode,
15190
- }))))));
15191
- })));
15192
- }
15193
- function chooseReward() {
15194
- var _a;
15195
- return [
15196
- h("div", { style: {
15197
- display: "grid",
15198
- justifyContent: "center",
15199
- gap: "20px",
15200
- gridTemplateColumns: "repeat(auto-fill, minmax(300px, 1fr))",
15201
- } }, (_a = data.exchangeList) === null || _a === void 0 ? void 0 : _a.map((item) => {
15202
- var _a, _b;
15203
- const style = {
15204
- boxShadow: item.key === (selectedItem === null || selectedItem === void 0 ? void 0 : selectedItem.key)
15205
- ? "0 0 0 2px var(--sl-color-primary-500)"
15206
- : "none",
15207
- marginBottom: "10px 0",
15208
- borderRadius: "var(--sl-border-radius-medium)",
15209
- flex: "1",
15210
- minWidth: "100%",
15211
- color: !item.available && "#eee",
15212
- };
15213
- const amount = item.ruleType === "FIXED_GLOBAL_REWARD"
15214
- ? item.prettySourceValue
15215
- : `${item.sourceMinValue} to ${item.prettySourceMaxValue}`;
15216
- return (h("div", { key: item.key, class: item.available ? sheet.classes.CardContainer : "", style: style },
15217
- h("sl-card", { class: sheet.classes.Base, onClick: () => item.available &&
15218
- callbacks.setExchangeState({ selectedItem: item }) },
15219
- item.key === (selectedItem === null || selectedItem === void 0 ? void 0 : selectedItem.key) && (h("div", { class: "selected-outline" },
15220
- h("div", { class: "selected-checkmark" },
15221
- h(CheckMark, null)))),
15222
- // item?.imageUrl &&
15223
- h("img", { class: sheet.classes.PreviewImage, src: (item === null || item === void 0 ? void 0 : item.imageUrl) || getAssetPath("./assets/Reward-icon.png") }),
15224
- h("div", { class: "text-area" },
15225
- h("div", { class: "title" }, item.description),
15226
- h("div", { class: "amount" }, amount),
15227
- item.unavailableReasonCode && (h("div", { class: "error" }, intl.formatMessage({
15228
- id: "unavailableCode",
15229
- defaultMessage: (_b = (_a = states.content) === null || _a === void 0 ? void 0 : _a.text) === null || _b === void 0 ? void 0 : _b.notAvailableError,
15230
- }, {
15231
- unavailableReason: item.unavailableReason ||
15232
- item.unavailableReasonCode,
15233
- })))))));
15234
- })),
15235
- h("div", { class: sheet.classes.KutayButton },
15236
- h("sl-button", { class: "continue right", size: "large", onClick: () => callbacks.setStage("chooseAmount"), disabled: !states.selectedItem }, "Continue")),
15237
- ];
15238
- }
15239
- function chooseAmount() {
15240
- var _a;
15241
- const input = getInput();
15242
- const isDisabled = ((_a = states.selectedItem) === null || _a === void 0 ? void 0 : _a.ruleType) === "FIXED_GLOBAL_REWARD"
15243
- ? false
15244
- : input && !states.amount;
15245
- return (h("div", null,
15246
- h("div", null,
15247
- //selectedItem?.imageUrl &&
15248
- h("img", { class: sheet.classes.FullImage, src: (selectedItem === null || selectedItem === void 0 ? void 0 : selectedItem.imageUrl) ||
15249
- getAssetPath("./assets/Reward-icon.png") })),
15250
- h("b", null, selectedItem === null || selectedItem === void 0 ? void 0 : selectedItem.description),
15251
- h("div", { class: sheet.classes.InputBox }, input),
15252
- h("div", { class: sheet.classes.KutayButton },
15253
- h("sl-button", { class: "cancel", size: "large", type: "text", onClick: () => callbacks.resetState() }, "Cancel"),
15254
- h("sl-button", { class: "continue", size: "large", onClick: () => callbacks.setStage("confirmation"), disabled: isDisabled }, "Continue to confirmation"))));
15255
- }
15256
- function confirmation() {
15257
- return (h("div", null,
15258
- h("h2", null, "Confirm and redeem"),
15259
- h("div", { style: { textAlign: "center" } },
15260
- h("p", null,
15261
- h("b", null, (selectedStep === null || selectedStep === void 0 ? void 0 : selectedStep.prettySourceValue) || (selectedItem === null || selectedItem === void 0 ? void 0 : selectedItem.prettySourceValue))),
15262
- h("p", null,
15263
- h(ExchangeArrows, null)),
15264
- h("div", { class: sheet.classes.CardContainer, style: {
15265
- boxShadow: "none",
15266
- marginBottom: "10px",
15267
- flex: "1",
15268
- minWidth: "100%",
15269
- } },
15270
- h("sl-card", { class: sheet.classes.Base },
15271
- h("img", { class: sheet.classes.PreviewImage, src: (selectedItem === null || selectedItem === void 0 ? void 0 : selectedItem.imageUrl) ||
15272
- getAssetPath("./assets/Reward-icon.png") }),
15273
- h("p", { style: { marginBottom: "0", flex: "1" } }, selectedStep === null || selectedStep === void 0 ? void 0 : selectedStep.prettyDestinationValue)))),
15274
- h("div", { class: sheet.classes.KutayButton },
15275
- h("sl-button", { class: "cancel", type: "text", size: "large", onClick: () => callbacks.setStage("chooseAmount") }, "Back"),
15276
- h("sl-button", { class: "continue", size: "large", onClick: callbacks.exchangeReward }, "Redeem"))));
15277
- }
15278
- function success() {
15279
- return (h("div", { style: { textAlign: "center" } },
15280
- h("img", { class: sheet.classes.FullImage, src: getAssetPath("./assets/Reward-icon.png") }),
15281
- h("p", { style: { color: "forestgreen" } }, "Reward Redeemed"),
15282
- (data === null || data === void 0 ? void 0 : data.fuelTankCode) && h("pre", null, data === null || data === void 0 ? void 0 : data.fuelTankCode),
15283
- h("sl-button", { class: "continue", type: "primary", size: "large", onClick: () => callbacks.resetState(true) }, "Done")));
15284
- }
15285
- const stages = {
15286
- chooseReward: () => chooseReward(),
15287
- chooseAmount: () => chooseAmount(),
15288
- confirmation: () => confirmation(),
15289
- success: () => success(),
15290
- };
15291
- const currentStage = stages[states.redeemStage];
15292
- function stageMap() {
15293
- const stageNumber = stageList.indexOf(states.redeemStage);
15294
- return (h("div", { class: sheet.classes.ProgressBar },
15295
- h("div", { class: "text-area" }, Object.keys(stageProgressList).map((stage) => {
15296
- if (stage === states.redeemStage) {
15297
- return h("span", { class: "text" }, stageProgressList[stage]);
15298
- }
15299
- else {
15300
- return (h("span", { class: "text subdued" }, stageProgressList[stage]));
15301
- }
15302
- })),
15303
- h(ProgressBar, { stageCount: 3, currentStage: stageNumber })));
15304
- }
15305
- // const BackButton = () => {
15306
- // if (states.redeemStage === "success") return "";
15307
- // let previousStage: Stages = "";
15308
- // if (states.redeemStage === "confirmation") {
15309
- // previousStage = "chooseAmount";
15310
- // } else if (states.redeemStage === "chooseAmount") {
15311
- // previousStage = "chooseReward";
15312
- // }
15313
- // return (
15314
- // <div slot="label">
15315
- // <a
15316
- // style={{ cursor: "pointer", fontSize: "80%", color: "#858585" }}
15317
- // onClick={() => callbacks.setStage(previousStage)}
15318
- // >
15319
- // <LeftArrow /> Back
15320
- // </a>
15321
- // </div>
15322
- // );
15323
- // };
15324
- function errorMessage() {
15325
- return (h("sl-alert", { type: "danger", open: true },
15326
- h("sl-icon", { slot: "icon", name: "exclamation-octagon" }),
15327
- "An error occured trying to redeem this reward. Please try again."));
15328
- }
15329
- return (h("div", { class: sheet.classes.Container },
15330
- h("style", { type: "text/css" }, styleString),
15331
- h("div", null,
15332
- stageMap(),
15333
- states.exchangeError && errorMessage(),
15334
- currentStage && currentStage())));
15335
- }
14853
+ const sqmRouterCss = "sqm-router{display:contents}";
15336
14854
 
15337
- const SqmRewardExchangeList = class {
14855
+ const SqmRouter = class {
15338
14856
  constructor(hostRef) {
15339
14857
  registerInstance(this, hostRef);
15340
14858
  this.ignored = true;
15341
- /**
15342
- * @uiName Exchange button text
15343
- */
15344
- this.buttonText = "Exchange Rewards";
15345
- /**
15346
- * @uiName Exchange button text
15347
- */
15348
- this.notAvailableError = "{unavailableReason, select, US_TAX {US Tax limit} INSUFFICIENT_REDEEMABLE_CREDIT {Not enough points} other {Not available} }";
15349
14859
  h$1(this);
15350
14860
  }
15351
14861
  disconnectedCallback() { }
15352
14862
  render() {
15353
- // const missingProps = getMissingProps([
15354
- // {
15355
- // attribute: "listType",
15356
- // value: this.listType,
15357
- // },
15358
- // ]);
15359
- // if (missingProps) {
15360
- // return <RequiredPropsError missingProps={missingProps} />;
15361
- // }
15362
- const { states, data, callbacks } = j$1()
15363
- ? useRewardExchangeListDemo(getProps(this))
15364
- : useRewardExchangeList(getProps(this));
15365
- return (h(Host, { style: { display: "contents" } }, h(RewardExchangeView, { states: states, data: data, callbacks: callbacks })));
14863
+ const { callbacks } = useRouter();
14864
+ return (h(Host, null, h("div", { ref: callbacks.setSlot, style: { display: "none" } }, h("slot", null)), h("div", { style: { display: "contents" }, ref: callbacks.setContainer })));
15366
14865
  }
15367
- static get assetsDirs() { return ["assets"]; }
15368
14866
  };
15369
- function useRewardExchangeListDemo(props) {
15370
- return cjs({
15371
- states: {
15372
- content: {
15373
- text: props,
15374
- },
15375
- redeemStage: "chooseReward",
15376
- amount: 0,
15377
- selectedStep: undefined,
15378
- exchangeError: false,
15379
- loading: false,
15380
- },
15381
- data: {
15382
- shareCode: "SHARECODE123",
15383
- },
15384
- callbacks: {
15385
- exchangeReward: () => { },
15386
- setExchangeState: (_) => { },
15387
- setStage: (_) => { },
15388
- resetState: () => { },
15389
- },
15390
- }, props.demoData || {}, { arrayMerge: (_, a) => a });
15391
- }
14867
+ SqmRouter.style = sqmRouterCss;
15392
14868
 
15393
14869
  const style$7 = {
15394
- THead: {
15395
- padding: "var(--sl-spacing-small) var(--sl-spacing-medium) var(--sl-spacing-small) 0",
15396
- "text-align": "left",
15397
- },
15398
- TCell: {
15399
- padding: "var(--sl-spacing-small) var(--sl-spacing-medium) var(--sl-spacing-small) 0",
15400
- },
15401
- TRow: {
15402
- "border-top": "1px solid #EAEAEA",
15403
- },
15404
- Table: {
15405
- "border-collapse": "collapse",
15406
- width: "100%",
15407
- },
15408
- ButtonContainer: {
15409
- display: "flex",
15410
- "justify-content": "flex-end",
15411
- "margin-top": "var(--sl-spacing-small)",
15412
- ...gap({ direction: "row", size: "var(--sl-spacing-small)" }),
14870
+ HostBlock: HostBlock,
14871
+ buttonStyle: {
14872
+ display: "block",
15413
14873
  },
15414
14874
  };
15415
14875
  jss.setup(create());
15416
14876
  const sheet$7 = jss.createStyleSheet(style$7);
15417
14877
  const styleString$7 = sheet$7.toString();
15418
- function GenericTableView(props) {
15419
- const { states, data, callbacks, elements } = props;
15420
- const { columns, rows } = elements;
15421
- const { show } = states;
15422
- return (h("div", null,
15423
- h("style", { type: "text/css" }, styleString$7),
15424
- h("table", { class: sheet$7.classes.Table },
15425
- data.textOverrides.showLabels && (h("thead", null,
15426
- h("tr", null, columns === null || columns === void 0 ? void 0 : columns.map((column) => (h("th", { class: sheet$7.classes.THead },
15427
- h(TextSpanView, { type: "h3" }, column))))))),
15428
- h("tbody", null,
15429
- show === "loading" && elements.loadingElement,
15430
- show === "empty" && elements.emptyElement,
15431
- show === "rows" && (rows === null || rows === void 0 ? void 0 : rows.map((row, i) => (h("tr", { class: sheet$7.classes.TRow, style: {
15432
- borderTop: `${!data.textOverrides.showLabels && i === 0 ? "none" : ""}`,
15433
- }, part: "table-row" }, row.map((cell) => (h("td", { class: sheet$7.classes.TCell },
15434
- h(TextSpanView, { type: "p" }, cell)))))))))),
15435
- h("div", { class: sheet$7.classes.ButtonContainer, part: states.namespace + "-button-wrapper" },
15436
- h("sl-button", { size: "small", disabled: !states.hasPrev, loading: show === "loading", onClick: callbacks.prevPage, exportparts: "base: defaultbutton-base" }, data.textOverrides.prevLabel),
15437
- h("sl-button", { size: "small", loading: show === "loading", disabled: !states.hasNext, onClick: callbacks.nextPage, exportparts: "base: defaultbutton-base" }, data.textOverrides.moreLabel))));
15438
- }
15439
-
15440
- function LoadingSlot$1() {
15441
- return (h("slot", { name: "loading" },
15442
- h(LoadingSkeleton, null)));
15443
- }
15444
- function LoadingSkeleton() {
15445
- return (h("div", { style: { width: "100%" } },
15446
- h("sl-skeleton", { style: { marginBottom: "28px" } }),
15447
- h("sl-skeleton", { style: { marginBottom: "28px" } }),
15448
- h("sl-skeleton", { style: { marginBottom: "28px" } }),
15449
- h("sl-skeleton", { style: { marginBottom: "28px" } }),
15450
- h("sl-skeleton", null)));
15451
- }
15452
- function EmptySlot$1({ label }) {
15453
- return (h("slot", { name: "empty" },
15454
- h(EmptySkeleton, { label: label })));
15455
- }
15456
- function EmptySkeleton({ label }) {
15457
- return (h("div", { style: { width: "100%" } },
15458
- h("sqm-text", null,
15459
- h("h3", { style: { color: "#777777" } }, label))));
15460
- }
15461
-
15462
- const CSS_NAMESPACE = "sqm-rewards-table";
15463
- const GET_REWARDS = gql `
15464
- query getRewards(
15465
- $limit: Int!
15466
- $offset: Int!
15467
- $rewardFilter: RewardFilterInput
15468
- ) {
15469
- viewer {
15470
- ... on User {
15471
- id
15472
- rewards(limit: $limit, offset: $offset, filter: $rewardFilter) {
15473
- totalCount
15474
- count
15475
- data {
15476
- id
15477
- type
15478
- value
15479
- unit
15480
- name
15481
- dateGiven
15482
- dateExpires
15483
- dateCancelled
15484
- dateRedeemed
15485
- dateScheduledFor
15486
- fuelTankCode
15487
- fuelTankType
15488
- currency
15489
- prettyValue
15490
- statuses
15491
- globalRewardKey
15492
- programRewardKey
15493
- rewardRedemptionTransactions {
15494
- data {
15495
- exchangedRewards {
15496
- data {
15497
- prettyValue
15498
- type
15499
- fuelTankCode
15500
- globalRewardKey
15501
- }
15502
- }
15503
- }
15504
- }
15505
- }
15506
- }
15507
- }
15508
- }
15509
- }
15510
- `;
15511
- function useRewardsTable(props, emptyElement, loadingElement) {
15512
- var _a, _b;
15513
- const user = T$1();
15514
- const programIdContext = M$1();
15515
- // Default to context, overriden by props
15516
- const programId = (_a = props.programId) !== null && _a !== void 0 ? _a : programIdContext;
15517
- const rewardFilter = {
15518
- userId_eq: user === null || user === void 0 ? void 0 : user.id,
15519
- accountId_eq: user === null || user === void 0 ? void 0 : user.accountId,
15520
- // If no program ID, shows all programs
15521
- ...(programId
15522
- ? programId === "classic"
15523
- ? { programId_exists: false }
15524
- : { programId_eq: programId }
15525
- : {}),
15526
- };
15527
- const [content, setContent] = useReducer((state, next) => ({
15528
- ...state,
15529
- ...next,
15530
- }), {
15531
- columns: [],
15532
- rows: [],
15533
- loading: false,
15534
- page: 0,
15535
- });
15536
- const { envelope: rewardsData, states, callbacks, } = sn(GET_REWARDS, (data) => { var _a; return (_a = data === null || data === void 0 ? void 0 : data.viewer) === null || _a === void 0 ? void 0 : _a.rewards; }, {
15537
- limit: props.perPage,
15538
- offset: 0,
15539
- }, {
15540
- rewardFilter,
15541
- }, !(user === null || user === void 0 ? void 0 : user.jwt));
15542
- const tick = useRerenderListener();
15543
- const components = useChildElements();
15544
- const data = rewardsData === null || rewardsData === void 0 ? void 0 : rewardsData.data;
15545
- async function getComponentData(components) {
15546
- // filter out loading and empty states from columns array
15547
- const columnComponents = components.filter((component) => component.slot !== "loading" && component.slot !== "empty");
15548
- // get the column titles (renderLabel is asynchronous)
15549
- const columnsPromise = columnComponents === null || columnComponents === void 0 ? void 0 : columnComponents.map(async (c) => tryMethod$1(c, () => c.renderLabel()));
15550
- // get the column cells (renderCell is asynchronous)
15551
- const cellsPromise = data === null || data === void 0 ? void 0 : data.map(async (r) => {
15552
- const cellPromise = columnComponents === null || columnComponents === void 0 ? void 0 : columnComponents.map(async (c) => tryMethod$1(c, () => c.renderCell([r], c)));
15553
- const cells = await Promise.all(cellPromise);
15554
- return cells;
15555
- });
15556
- const rows = cellsPromise && (await Promise.all(cellsPromise)).filter((i) => i);
15557
- setContent({ rows });
15558
- const columns = columnsPromise && (await Promise.all(columnsPromise));
15559
- // Set the content to render and finish loading components
15560
- setContent({ columns, loading: false, page: states.currentPage });
15561
- }
15562
- useEffect(() => {
15563
- setContent({ loading: true });
15564
- rewardsData && getComponentData(components);
15565
- }, [rewardsData, components, tick]);
15566
- const isEmpty = !((_b = content === null || content === void 0 ? void 0 : content.rows) === null || _b === void 0 ? void 0 : _b.length) && !(data === null || data === void 0 ? void 0 : data.length);
15567
- console.log(states.loading, content.loading, rewardsData);
15568
- const show =
15569
- // 1 - Loading if loading
15570
- states.loading || content.loading
15571
- ? "loading"
15572
- : // 2 - Empty if empty
15573
- isEmpty
15574
- ? "empty"
15575
- : // 3 - Then show rows
15576
- "rows";
15577
- return {
15578
- states: {
15579
- hasNext: states.currentPage < states.pageCount - 1,
15580
- hasPrev: states.currentPage > 0,
15581
- show,
15582
- namespace: CSS_NAMESPACE,
15583
- },
15584
- data: {
15585
- textOverrides: {
15586
- showLabels: props.showLabels,
15587
- prevLabel: props.prevLabel,
15588
- moreLabel: props.moreLabel,
15589
- },
15590
- },
15591
- elements: {
15592
- columns: content.columns,
15593
- rows: content.rows,
15594
- emptyElement,
15595
- loadingElement,
15596
- },
15597
- callbacks: {
15598
- nextPage: () => {
15599
- callbacks.setCurrentPage(states.currentPage + 1);
15600
- },
15601
- prevPage: () => {
15602
- callbacks.setCurrentPage(states.currentPage - 1);
15603
- },
15604
- },
15605
- };
15606
- }
15607
- function generateUserError$1(e) {
15608
- try {
15609
- return JSON.stringify(e);
15610
- }
15611
- catch (e) {
15612
- return "An unknown error";
15613
- }
15614
- }
15615
- async function tryMethod$1(c, callback) {
15616
- const tag = c.tagName.toLowerCase();
15617
- await customElements.whenDefined(tag);
15618
- let labelPromise;
15619
- try {
15620
- labelPromise = callback();
15621
- }
15622
- catch (e) {
15623
- // renderLabel did not return a promise, so this method probably doesn't exist
15624
- // therefore, we IGNORE the label
15625
- if (callback.name === "renderReferrerCell") {
15626
- console.error("column does not have a renderReferrerCell method.");
15627
- }
15628
- else {
15629
- console.error("label promise failed", e);
15630
- }
15631
- return h("span", null);
15632
- }
15633
- try {
15634
- return await labelPromise;
15635
- }
15636
- catch (e) {
15637
- // The column returned a promise, and that promise failed.
15638
- // This should not happen so we fail fast
15639
- console.error("Error rendering label", e);
15640
- const userError = generateUserError$1(e);
15641
- return (h("details", null,
15642
- h("summary", null, "Error"),
15643
- userError));
15644
- }
15645
- }
15646
-
15647
- const RewardsTable = class {
15648
- constructor(hostRef) {
15649
- registerInstance(this, hostRef);
15650
- /** @uiName Number of rewards per page */
15651
- this.perPage = 3;
15652
- /** @uiName Show column labels */
15653
- this.showLabels = true;
15654
- /** @uiName Previous button text */
15655
- this.prevLabel = "Prev";
15656
- /** @uiName View More button text */
15657
- this.moreLabel = "Next";
15658
- /** @uiName Show Referred by user in table */
15659
- this.showReferrer = false;
15660
- h$1(this);
15661
- }
15662
- disconnectedCallback() { }
15663
- render() {
15664
- const empty = h(EmptySlot$1, { label: "No Rewards Yet" });
15665
- const loading = h(LoadingSlot$1, null);
15666
- const { states, data, callbacks, elements } = j$1()
15667
- ? useRewardsTableDemo(this)
15668
- : useRewardsTable(this, empty, loading);
15669
- return (h(GenericTableView, { states: states, data: data, callbacks: callbacks, elements: elements }));
15670
- }
15671
- };
15672
- function useRewardsTableDemo(props) {
15673
- return cjs({
15674
- states: {
15675
- hasPrev: false,
15676
- hasNext: false,
15677
- loading: false,
15678
- namespace: CSS_NAMESPACE,
15679
- },
15680
- callbacks: {
15681
- prevPage: () => console.log("Prev"),
15682
- nextPage: () => console.log("Next"),
15683
- },
15684
- data: {
15685
- textOverrides: {
15686
- showLabels: props.showLabels,
15687
- prevLabel: props.prevLabel,
15688
- moreLabel: props.moreLabel,
15689
- },
15690
- referralData: [],
15691
- },
15692
- elements: {
15693
- emptyElement: h(EmptySkeleton, { label: "No Rewards Yet" }),
15694
- loadingElement: h(LoadingSkeleton, null),
15695
- // TODO: This should be smarter
15696
- columns: [h("div", null, "Name"), h("div", null, "Email"), h("div", null, "DOB")],
15697
- rows: [],
15698
- },
15699
- }, props.demoData || {}, { arrayMerge: (_, a) => a });
15700
- }
15701
-
15702
- const RewardsTableColumn = class {
15703
- constructor(hostRef) {
15704
- registerInstance(this, hostRef);
15705
- /**
15706
- * @uiName Reward column title
15707
- */
15708
- this.columnTitle = "Rewards";
15709
- /**
15710
- * @uiName Hide dropdown details of reward
15711
- */
15712
- this.hideDetails = false;
15713
- h$1(this);
15714
- }
15715
- disconnectedCallback() { }
15716
- //@ts-ignore
15717
- async renderCell(data) {
15718
- // TODO: Do the right thing with many rewards, pending rewards, canceled rewards
15719
- console.log({ data });
15720
- return (h("sqm-referral-table-rewards-cell", { rewards: data, hideDetails: this.hideDetails }));
15721
- }
15722
- async renderLabel() {
15723
- return this.columnTitle;
15724
- }
15725
- render() {
15726
- useRequestRerender([this.columnTitle]);
15727
- return h(Host, { style: { display: "none" } });
15728
- }
15729
- };
15730
-
15731
- const debug$1 = browser("sq:useRouter");
15732
- function matchPath(pattern, page) {
15733
- if (!pattern)
15734
- return;
15735
- const regexp = pathToRegexp(pattern);
15736
- return regexp.exec(page);
15737
- }
15738
- function useRouter() {
15739
- const location = an();
15740
- const host = P$1();
15741
- const [slot, setSlot] = useState(undefined);
15742
- const [container, setContainer] = useState(undefined);
15743
- const page = location.pathname;
15744
- // convert sqm-routes into templates
15745
- useEffect(() => {
15746
- const routes = host.querySelectorAll(`sqm-route`);
15747
- const routesArray = Array.from(routes);
15748
- routesArray.forEach((route) => {
15749
- const newTemplate = document.createElement("template");
15750
- newTemplate.setAttribute("path", route.path);
15751
- newTemplate.innerHTML = route.innerHTML;
15752
- route.parentNode.appendChild(newTemplate);
15753
- route.parentNode.removeChild(route);
15754
- });
15755
- }, []);
15756
- useEffect(() => {
15757
- var _a, _b;
15758
- if (!container || !slot) {
15759
- debug$1("DOM not ready for navigation rendering on:", page);
15760
- return;
15761
- }
15762
- // <template>
15763
- const templates = slot.querySelectorAll(`template`);
15764
- const templatesArray = Array.from(templates);
15765
- const template = templatesArray.find((template) => {
15766
- var _a, _b, _c;
15767
- //@ts-ignore
15768
- const path = (_b = (_a = template.attributes) === null || _a === void 0 ? void 0 : _a.path) === null || _b === void 0 ? void 0 : _b.nodeValue;
15769
- if ((_c = matchPath(path, page)) === null || _c === void 0 ? void 0 : _c.length)
15770
- return template;
15771
- });
15772
- //@ts-ignore - can't access template attributes directly
15773
- const templatePath = (_b = (_a = template === null || template === void 0 ? void 0 : template.attributes) === null || _a === void 0 ? void 0 : _a.path) === null || _b === void 0 ? void 0 : _b.nodeValue;
15774
- debug$1({
15775
- containerDatasetPage: container.dataset.page,
15776
- templatePath,
15777
- page,
15778
- });
15779
- // if no routes found, and the old route doesn't match the new route
15780
- if (!template) {
15781
- // No matching page, display nothing
15782
- debug$1("No matching page found for ", page, ", so render nothing");
15783
- container.innerHTML = "";
15784
- container.dataset.page = page;
15785
- return;
15786
- }
15787
- debug$1("Page updated to ", page, template);
15788
- // if pathToRegexp results truthy or page is an exact match
15789
- if (!!matchPath(templatePath, container.dataset.page)) {
15790
- debug$1("don't rerender");
15791
- // Same page, do not re-render
15792
- // Reduces dom mutations, speeds up page speed
15793
- }
15794
- else if (template) {
15795
- container.innerHTML = template.innerHTML;
15796
- container.dataset.page = page;
15797
- }
15798
- }, [slot, container, page]);
15799
- return {
15800
- callbacks: {
15801
- setSlot,
15802
- setContainer,
15803
- },
15804
- };
15805
- }
15806
-
15807
- const sqmRouterCss = "sqm-router{display:contents}";
15808
-
15809
- const SqmRouter = class {
15810
- constructor(hostRef) {
15811
- registerInstance(this, hostRef);
15812
- this.ignored = true;
15813
- h$1(this);
15814
- }
15815
- disconnectedCallback() { }
15816
- render() {
15817
- const { callbacks } = useRouter();
15818
- return (h(Host, null, h("div", { ref: callbacks.setSlot, style: { display: "none" } }, h("slot", null)), h("div", { style: { display: "contents" }, ref: callbacks.setContainer })));
15819
- }
15820
- };
15821
- SqmRouter.style = sqmRouterCss;
15822
-
15823
- const style$8 = {
15824
- HostBlock: HostBlock,
15825
- buttonStyle: {
15826
- display: "block",
15827
- },
15828
- };
15829
- jss.setup(create());
15830
- const sheet$8 = jss.createStyleSheet(style$8);
15831
- const styleString$8 = sheet$8.toString();
15832
14878
  function ShareButtonView(props, children) {
15833
14879
  return props.hide ? (h(Host, { style: { display: "none" } })) : (h("div", null,
15834
- h("style", { type: "text/css" }, styleString$8),
15835
- h("sl-button", { class: sheet$8.classes.buttonStyle, loading: props.loading, disabled: props.disabled, pill: props.pill, size: props.size, type: props.type, onClick: props.onClick, exportparts: `base: ${props.type}sharebutton-base` },
14880
+ h("style", { type: "text/css" }, styleString$7),
14881
+ h("sl-button", { class: sheet$7.classes.buttonStyle, loading: props.loading, disabled: props.disabled, pill: props.pill, size: props.size, type: props.type, onClick: props.onClick, exportparts: `base: ${props.type}sharebutton-base` },
15836
14882
  !props.hideicon && (h("sl-icon", { slot: props.iconslot, name: props.icon ? props.icon : props.medium, exportparts: "icon" })),
15837
14883
  !props.hidetext && children)));
15838
14884
  }
@@ -15896,14 +14942,14 @@ function useShareButton(props) {
15896
14942
  var _a, _b;
15897
14943
  const { sharetitle, sharetext, medium } = props;
15898
14944
  const programId = props.programId ? props.programId : M$1();
15899
- const user = T$1();
14945
+ const user = ne$1();
15900
14946
  const variables = {
15901
14947
  engagementMedium: x$1(),
15902
14948
  programId: programId,
15903
14949
  shareMedium: medium.toUpperCase(),
15904
14950
  };
15905
14951
  // only queries if a programId is available
15906
- const res = en(MessageLinkQuery, variables, !(user === null || user === void 0 ? void 0 : user.jwt) || !programId);
14952
+ const res = cn(MessageLinkQuery, variables, !(user === null || user === void 0 ? void 0 : user.jwt) || !programId);
15907
14953
  const directLink = (_b = (_a = res === null || res === void 0 ? void 0 : res.data) === null || _a === void 0 ? void 0 : _a.viewer) === null || _b === void 0 ? void 0 : _b.shareLink;
15908
14954
  const environment = D$1();
15909
14955
  const hide = (medium.toLocaleUpperCase() === "SMS" &&
@@ -15993,8 +15039,8 @@ const MessageLinkQuery$1 = dist.gql `
15993
15039
  function useShareLink(props) {
15994
15040
  var _a, _b;
15995
15041
  const { programId = M$1() } = props;
15996
- const user = T$1();
15997
- const { data } = en(MessageLinkQuery$1, { programId }, !(user === null || user === void 0 ? void 0 : user.jwt));
15042
+ const user = ne$1();
15043
+ const { data } = cn(MessageLinkQuery$1, { programId }, !(user === null || user === void 0 ? void 0 : user.jwt));
15998
15044
  const shareString = (_b = (_a = data === null || data === void 0 ? void 0 : data.user) === null || _a === void 0 ? void 0 : _a.shareLink) !== null && _b !== void 0 ? _b :
15999
15045
  // Shown during loading
16000
15046
  "...";
@@ -17470,10 +16516,10 @@ var _createEmotion = createEmotion({
17470
16516
  function i$1(){return (i$1=Object.assign||function(n){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var r in o)Object.prototype.hasOwnProperty.call(o,r)&&(n[r]=o[r]);}return n}).apply(this,arguments)}function s(n,t){return t||(t=n.slice(0)),n.raw=t,n}var a$1,l,u,c$1=css(a$1||(a$1=s(['\n width: 100vw;\n height: 100vh;\n\n .story-book-outer-div {\n .story-div {\n font-family: "Arial", sans-serif;\n font-size: 12px;\n }\n padding-bottom: 500px;\n }\n\n .story-div {\n position: fixed;\n box-sizing: border-box;\n top: 0;\n width: 250px;\n height: 100vh;\n z-index: 999;\n overflow-y: scroll;\n background: white;\n margin-bottom: 32px;\n }\n\n .header {\n padding: 24px 0 16px 16px;\n margin-bottom: 24px;\n color: white;\n background: #333;\n cursor: pointer;\n\n h2 {\n letter-spacing: 3px;\n font-weight: 400;\n }\n }\n\n .parentStoryList {\n list-style: none;\n padding-left: 16px;\n\n summary {\n margin-bottom: 4px;\n }\n }\n .parentStory {\n cursor: pointer;\n }\n .parentStory.selected {\n font-weight: bold;\n }\n\n .subStory {\n font-size: 12px;\n cursor: pointer;\n line-height: 1.5em;\n margin-top: 4px;\n\n a {\n display: block;\n padding: 4px 4px 4px 16px;\n }\n }\n .subStory:hover {\n background-color: #eee;\n }\n .subStory.selected {\n background-color: lightgreen;\n }\n\n .component {\n padding: 24px 16px;\n }\n\n h4.group-header {\n margin: 8px 0;\n text-transform: uppercase;\n font-weight: 600;\n font-size: 14px;\n color: #575757;\n }\n\n .group-wrapper {\n margin-bottom: 24px;\n }\n\n .dynamic-display-wrapper {\n position: fixed;\n display: flex;\n flex-direction: column;\n bottom: 0;\n left: 100%;\n padding: 16px;\n z-index: 1000;\n background: white;\n transform: translateX(-100%);\n box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);\n\n & > :not(:first-child) {\n margin-top: 12px;\n }\n\n p {\n font-size: 12px;\n margin: 0;\n padding: 0;\n }\n\n .button-wrapper {\n display: flex;\n\n & > :not(:first-child) {\n margin-left: 12px;\n }\n }\n\n & button {\n border: 1px solid #eaeaea;\n background: white;\n border-radius: 4px;\n color: #777;\n padding: 4px 12px;\n justify-content: center;\n align-items: center;\n text-align: center;\n\n &.active {\n background: #555;\n border-color: #555;\n color: white;\n }\n }\n }\n'])));function p$1(n,t){var o,r=t.story.title.split("/"),e=r[1]?r[0]:"_";return i$1({},n,((o={})[e]=[].concat(n[e]||[],[{story:i$1({},t.story,{title:r[1]||r[0]}),subs:t.subs}]).sort(function(n,t){return n.story.title.localeCompare(t.story.title)}),o))}function d$1(n){return {story:n.default,subs:function(n,t){if(null==n)return {};var o,r,e={},i=Object.keys(n);for(r=0;r<i.length;r++)t.indexOf(o=i[r])>=0||(e[o]=n[o]);return e}(n,["default"])}}function f(a,f){var b=f.h,y=void 0===b?h:b,g=f.title,m=void 0===g?"Stencilbook":g,x=f.homepage,h$1=void 0===x?y("h3",null,"Select a story!"):x,v=f.addons,k=void 0===v?[]:v,w=useMemo(function(){return a.map(d$1).reduce(p$1,{_:[]})},a),S=useState(void 0),C=S[0],z=S[1],O=null==C?void 0:C.key,j=useState("desktop"),T=j[0],_=j[1],B=useState(!0),D=B[0],L=B[1],N=useState(!1),q=N[0],A=N[1],M=function(){return y("div",{class:"dynamic-display-wrapper"},y("div",{class:"button-wrapper"},y("button",{class:"desktop"===T?"active":"",onClick:function(){return _("desktop")}},"Desktop"),y("button",{class:"tablet"===T?"active":"",onClick:function(){return _("tablet")}},"Tablet"),y("button",{class:"mobile"===T?"active":"",onClick:function(){return _("mobile")}},"Mobile")),y("p",null,"Note: Currently doesn't test breakpoints, use the native tester for now"),y("hr",null),y("button",{class:q?"active":"",onClick:function(){return A(function(n){return !n})}},"Toggle Dark Background"),y("hr",null),y("button",{class:D?"active":"",onClick:function(){return L(function(n){return !n})}},"Toggle Sidebar"))},P="mobile"===T?"375px":"tablet"===T?"768px":"1124px",V=css(l||(l=s(["\n max-width: ",";\n margin-left: ",";\n "])),P,D?"250px":"0px"),X=css(u||(u=s(["\n display: none;\n "])));document.body.style.backgroundColor=q?"#232323":"#fafafa";var E=function(n){var t=n.selected,o=k.reduce(function(n,o){return function(){return y(o,{story:i$1({},t)},y(n,null))}},null==t?void 0:t.story);return y(o,null)},F=function(){return y("div",{class:"story-book-outer-div"},y("div",{class:"story-div "+(D?"":X)},y("div",{class:"header",onClick:function(){z(void 0);}},y("h2",null,m)),y("ul",{class:"parentStoryList"},Object.keys(w).sort().map(function(n){return y("div",{class:"group-wrapper"},"_"!==n&&y("h4",{class:"group-header"},n),w[n].map(function(t){return y("li",{class:"parentStory"},y("details",{style:{marginBottom:"10px"}},y("summary",{style:{outline:"none"}},t.story.title),t.subs&&Object.keys(t.subs).map(function(o){var e=n+"/"+o,i=t.subs[o],s=i.storyName||lodash_startcase(o);return y("div",{class:"subStory "+(O===e?"selected":"")},y("a",{onClick:function(){return function(n,t,o,r){z({key:t,story:n,parent:o,label:r});}(i,e,t.story,s)}},s))})))}))}))),y(M,null),y("div",{class:"component "+V},!O&&h$1,O&&y("div",null,y("h3",null,C.label),y(E,{selected:C}))))};return {class:c$1,children:y(F,null),View:F,selected:C}}
17471
16517
 
17472
16518
  const ShareButton_stories = {
17473
- title: "Components/Share Button",
16519
+ title: "Share Button",
17474
16520
  };
17475
16521
  const WithIcon = () => {
17476
- const props = { medium: "facebook", iconslot: "suffix" };
16522
+ const props = { medium: "whatsapp", iconslot: "suffix" };
17477
16523
  return h(ShareButtonView, Object.assign({}, props), "Share");
17478
16524
  };
17479
16525
  const WithIconOverride = () => {
@@ -17526,7 +16572,7 @@ const ShareButton$1 = /*#__PURE__*/Object.freeze({
17526
16572
  });
17527
16573
 
17528
16574
  const ShareLink_stories = {
17529
- title: "Components/Share Link",
16575
+ title: "Share Link",
17530
16576
  };
17531
16577
  const Default = () => {
17532
16578
  const props = {
@@ -17567,15 +16613,14 @@ const ShareLink$1 = /*#__PURE__*/Object.freeze({
17567
16613
  });
17568
16614
 
17569
16615
  const BigStat_stories = {
17570
- title: "Components/Big Stat",
16616
+ title: "Big Stat",
17571
16617
  };
17572
16618
  const Default$1 = () => {
17573
- const props = { value: 990000, statvalue: "9.900,00" };
16619
+ const props = { statvalue: "9.900,00" };
17574
16620
  return h(BigStatView, Object.assign({}, props), "Big stat");
17575
16621
  };
17576
16622
  const LeftAlign = () => {
17577
16623
  const props = {
17578
- value: 500,
17579
16624
  statvalue: "500",
17580
16625
  alignment: "left",
17581
16626
  };
@@ -17583,7 +16628,6 @@ const LeftAlign = () => {
17583
16628
  };
17584
16629
  const RightAlign = () => {
17585
16630
  const props = {
17586
- value: 500,
17587
16631
  statvalue: "500",
17588
16632
  alignment: "right",
17589
16633
  };
@@ -17591,7 +16635,6 @@ const RightAlign = () => {
17591
16635
  };
17592
16636
  const FlexReverse = () => {
17593
16637
  const props = {
17594
- value: 500,
17595
16638
  statvalue: "500",
17596
16639
  flexReverse: true,
17597
16640
  };
@@ -17599,7 +16642,6 @@ const FlexReverse = () => {
17599
16642
  };
17600
16643
  const FlexReverseRight = () => {
17601
16644
  const props = {
17602
- value: 500,
17603
16645
  statvalue: "500",
17604
16646
  flexReverse: true,
17605
16647
  alignment: "right",
@@ -17608,7 +16650,6 @@ const FlexReverseRight = () => {
17608
16650
  };
17609
16651
  const FlexReverseLeft = () => {
17610
16652
  const props = {
17611
- value: 500,
17612
16653
  statvalue: "500",
17613
16654
  flexReverse: true,
17614
16655
  alignment: "left",
@@ -17617,14 +16658,12 @@ const FlexReverseLeft = () => {
17617
16658
  };
17618
16659
  const NoStatValue = () => {
17619
16660
  const props = {
17620
- value: 0,
17621
16661
  statvalue: "...",
17622
16662
  };
17623
16663
  return h(BigStatView, Object.assign({}, props), "Big stat");
17624
16664
  };
17625
16665
  const InvalidStatValue = () => {
17626
16666
  const props = {
17627
- value: 0,
17628
16667
  statvalue: "!!!",
17629
16668
  };
17630
16669
  return h(BigStatView, Object.assign({}, props), "Big stat");
@@ -17644,7 +16683,7 @@ const BigStat = /*#__PURE__*/Object.freeze({
17644
16683
  });
17645
16684
 
17646
16685
  const Leaderboard_stories = {
17647
- title: "Components/Leaderboard",
16686
+ title: "Leaderboard",
17648
16687
  parameters: {
17649
16688
  tagname: "sqm-leaderboard",
17650
16689
  },
@@ -17838,36 +16877,36 @@ const routes = `
17838
16877
  `;
17839
16878
  const TemplateNavigation = createHookStory(() => {
17840
16879
  return (h("div", null,
17841
- h("button", { onClick: () => rn.push("/") }, "/"),
17842
- h("button", { onClick: () => rn.push("/foo") }, "/foo"),
17843
- h("button", { onClick: () => rn.push("/bar") }, "/bar"),
17844
- h("button", { onClick: () => rn.push("/baz/bang") }, "/baz/bang"),
17845
- h("button", { onClick: () => rn.push("/refer") }, "/refer"),
17846
- h("button", { onClick: () => rn.push("/refer/1") }, "/refer/1"),
17847
- h("button", { onClick: () => rn.push("/refer/2") }, "/refer/2"),
17848
- h("button", { onClick: () => rn.back() }, "Back"),
17849
- h("button", { onClick: () => rn.forward() }, "Forward"),
16880
+ h("button", { onClick: () => mn.push("/") }, "/"),
16881
+ h("button", { onClick: () => mn.push("/foo") }, "/foo"),
16882
+ h("button", { onClick: () => mn.push("/bar") }, "/bar"),
16883
+ h("button", { onClick: () => mn.push("/baz/bang") }, "/baz/bang"),
16884
+ h("button", { onClick: () => mn.push("/refer") }, "/refer"),
16885
+ h("button", { onClick: () => mn.push("/refer/1") }, "/refer/1"),
16886
+ h("button", { onClick: () => mn.push("/refer/2") }, "/refer/2"),
16887
+ h("button", { onClick: () => mn.back() }, "Back"),
16888
+ h("button", { onClick: () => mn.forward() }, "Forward"),
17850
16889
  h("hr", null),
17851
16890
  h("sqm-router", { innerHTML: templates })));
17852
16891
  });
17853
16892
  const RouteNavigation = createHookStory(() => {
17854
16893
  return (h("div", null,
17855
- h("button", { onClick: () => rn.push("/") }, "/"),
17856
- h("button", { onClick: () => rn.push("/foo") }, "/foo"),
17857
- h("button", { onClick: () => rn.push("/bar") }, "/bar"),
17858
- h("button", { onClick: () => rn.push("/baz/bang") }, "/baz/bang"),
17859
- h("button", { onClick: () => rn.push("/refer") }, "/refer"),
17860
- h("button", { onClick: () => rn.push("/refer/1") }, "/refer/1"),
17861
- h("button", { onClick: () => rn.push("/refer/2") }, "/refer/2"),
17862
- h("button", { onClick: () => rn.back() }, "Back"),
17863
- h("button", { onClick: () => rn.forward() }, "Forward"),
16894
+ h("button", { onClick: () => mn.push("/") }, "/"),
16895
+ h("button", { onClick: () => mn.push("/foo") }, "/foo"),
16896
+ h("button", { onClick: () => mn.push("/bar") }, "/bar"),
16897
+ h("button", { onClick: () => mn.push("/baz/bang") }, "/baz/bang"),
16898
+ h("button", { onClick: () => mn.push("/refer") }, "/refer"),
16899
+ h("button", { onClick: () => mn.push("/refer/1") }, "/refer/1"),
16900
+ h("button", { onClick: () => mn.push("/refer/2") }, "/refer/2"),
16901
+ h("button", { onClick: () => mn.back() }, "Back"),
16902
+ h("button", { onClick: () => mn.forward() }, "Forward"),
17864
16903
  h("hr", null),
17865
16904
  h("sqm-router", { innerHTML: routes })));
17866
16905
  });
17867
16906
  const Styling = createHookStory(() => {
17868
16907
  return (h("div", null,
17869
- h("button", { onClick: () => rn.push("/") }, "/"),
17870
- h("button", { onClick: () => rn.push("/foo") }, "/foo"),
16908
+ h("button", { onClick: () => mn.push("/") }, "/"),
16909
+ h("button", { onClick: () => mn.push("/foo") }, "/foo"),
17871
16910
  h("hr", null),
17872
16911
  h("div", { style: { display: "flex", justifyContent: "space-around" } },
17873
16912
  h("sqm-router", { innerHTML: `<template path="/">
@@ -17881,7 +16920,7 @@ function useTemplate(templateString) {
17881
16920
  const [previewTemplate, setPreviewTemplate] = useState(templateString);
17882
16921
  function setPath(e) {
17883
16922
  //@ts-ignore
17884
- rn.push(e.target.value);
16923
+ mn.push(e.target.value);
17885
16924
  }
17886
16925
  return {
17887
16926
  states: { previewTemplate, editedTemplate },
@@ -17921,7 +16960,7 @@ const Router = /*#__PURE__*/Object.freeze({
17921
16960
  });
17922
16961
 
17923
16962
  const LeaderboardRank_stories = {
17924
- title: "Components/Leaderboard Rank",
16963
+ title: "Leaderboard Rank",
17925
16964
  };
17926
16965
  const First = () => {
17927
16966
  const props = { data: { rank: "1st" } };
@@ -17968,7 +17007,7 @@ function setupLoggedOut() {
17968
17007
  };
17969
17008
  }
17970
17009
  const PortalFrame_stories = {
17971
- title: "Components/Portal Frame",
17010
+ title: "Portal Frame",
17972
17011
  };
17973
17012
  const defaultProps = {
17974
17013
  data: {
@@ -18024,8 +17063,8 @@ const FullStackFrame = () => {
18024
17063
  "Current path:",
18025
17064
  " ",
18026
17065
  h("code", null,
18027
- h("strong", null, (_a = an()) === null || _a === void 0 ? void 0 : _a.pathname))),
18028
- h("button", { onClick: rn.back }, "Go Back")));
17066
+ h("strong", null, (_a = vn()) === null || _a === void 0 ? void 0 : _a.pathname))),
17067
+ h("button", { onClick: mn.back }, "Go Back")));
18029
17068
  };
18030
17069
  const FullStackFrameLoggedOut = () => {
18031
17070
  var _a;
@@ -18049,8 +17088,8 @@ const FullStackFrameLoggedOut = () => {
18049
17088
  "Current path:",
18050
17089
  " ",
18051
17090
  h("code", null,
18052
- h("strong", null, (_a = an()) === null || _a === void 0 ? void 0 : _a.pathname))),
18053
- h("button", { onClick: rn.back }, "Go Back")));
17091
+ h("strong", null, (_a = vn()) === null || _a === void 0 ? void 0 : _a.pathname))),
17092
+ h("button", { onClick: mn.back }, "Go Back")));
18054
17093
  };
18055
17094
 
18056
17095
  const PortalFrame$1 = /*#__PURE__*/Object.freeze({
@@ -18063,7 +17102,7 @@ const PortalFrame$1 = /*#__PURE__*/Object.freeze({
18063
17102
  });
18064
17103
 
18065
17104
  const EditProfileForm_stories = {
18066
- title: "Components/Edit Profile Form",
17105
+ title: "Edit Profile Form",
18067
17106
  };
18068
17107
  const defaultProps$1 = {
18069
17108
  states: {
@@ -18144,14 +17183,14 @@ function setupGraphQL$1() {
18144
17183
  programId,
18145
17184
  };
18146
17185
  useEffect(() => {
18147
- L$1({
17186
+ Y({
18148
17187
  accountId,
18149
17188
  id,
18150
17189
  jwt: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyIjp7ImFjY291bnRJZCI6InRlc3Rlc3Rlc3QiLCJpZCI6InRlc3Rlc3Rlc3QifX0.qYnU5hNeIj9C_G3NogfG7btgCPGZC7JRXY0MG6a63zs",
18151
17190
  });
18152
17191
  return () => {
18153
17192
  window.widgetIdent = undefined;
18154
- L$1(undefined);
17193
+ Y(undefined);
18155
17194
  };
18156
17195
  }, []);
18157
17196
  }
@@ -18206,14 +17245,14 @@ function setupGraphQL$2() {
18206
17245
  programId,
18207
17246
  };
18208
17247
  useEffect(() => {
18209
- L$1({
17248
+ Y({
18210
17249
  accountId,
18211
17250
  id,
18212
17251
  jwt: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyIjp7ImFjY291bnRJZCI6InRlc3Rlc3Rlc3QiLCJpZCI6InRlc3Rlc3Rlc3QifX0.qYnU5hNeIj9C_G3NogfG7btgCPGZC7JRXY0MG6a63zs",
18213
17252
  });
18214
17253
  return () => {
18215
17254
  window.widgetIdent = undefined;
18216
- L$1(undefined);
17255
+ Y(undefined);
18217
17256
  };
18218
17257
  }, []);
18219
17258
  }
@@ -18268,14 +17307,14 @@ function setupGraphQL$3() {
18268
17307
  programId,
18269
17308
  };
18270
17309
  useEffect(() => {
18271
- L$1({
17310
+ Y({
18272
17311
  accountId,
18273
17312
  id,
18274
17313
  jwt: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyIjp7ImFjY291bnRJZCI6Im55bmVsbGllIiwiaWQiOiJueW5lbGxpZSJ9fQ.3KV974VPLgk4tD8LQfJTi4IPkKCmnaB8w48HzVJYDuI",
18275
17314
  });
18276
17315
  return () => {
18277
17316
  window.widgetIdent = undefined;
18278
- L$1(undefined);
17317
+ Y(undefined);
18279
17318
  };
18280
17319
  }, []);
18281
17320
  }
@@ -18350,9 +17389,6 @@ const RewardBalanceCashUSD = createHookStory(() => {
18350
17389
  const ProgramGoals = createHookStory(() => {
18351
17390
  const dummy = encodeURIComponent("Paid-Member-Goal/referrals");
18352
17391
  return View(`/programGoals/count/${dummy}`, "/(programGoals)/:metricType/:goalId");
18353
- });
18354
- const CustomField = createHookStory(() => {
18355
- return View(`/customFields/thingCount`, "/(customFields)/:customField");
18356
17392
  });
18357
17393
 
18358
17394
  const UseBigStat = /*#__PURE__*/Object.freeze({
@@ -18384,8 +17420,7 @@ const UseBigStat = /*#__PURE__*/Object.freeze({
18384
17420
  RewardsAvailableWithSlash: RewardsAvailableWithSlash,
18385
17421
  RewardBalance: RewardBalance,
18386
17422
  RewardBalanceCashUSD: RewardBalanceCashUSD,
18387
- ProgramGoals: ProgramGoals,
18388
- CustomField: CustomField
17423
+ ProgramGoals: ProgramGoals
18389
17424
  });
18390
17425
 
18391
17426
  function setupGraphQL$4() {
@@ -18399,14 +17434,14 @@ function setupGraphQL$4() {
18399
17434
  programId,
18400
17435
  };
18401
17436
  useEffect(() => {
18402
- L$1({
17437
+ Y({
18403
17438
  accountId,
18404
17439
  id,
18405
17440
  jwt: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyIjp7ImFjY291bnRJZCI6IndvcnJpZWQtY2FtZXJhQHVleHdsdGdoLm1haWxvc2F1ci5uZXQiLCJpZCI6IndvcnJpZWQtY2FtZXJhQHVleHdsdGdoLm1haWxvc2F1ci5uZXQiLCJmaXJzdE5hbWUiOiJ0ZXN0IiwibGFzdE5hbWUiOiJ0ZXN0In19.ziDWbdCwsTo1ijxl8d2__Ga-6iFOVShaJUPp2ZBMeO0",
18406
17441
  });
18407
17442
  return () => {
18408
17443
  window.widgetIdent = undefined;
18409
- L$1(undefined);
17444
+ Y(undefined);
18410
17445
  };
18411
17446
  }, []);
18412
17447
  }
@@ -18446,14 +17481,14 @@ function setupGraphQL$5() {
18446
17481
  programId,
18447
17482
  };
18448
17483
  useEffect(() => {
18449
- L$1({
17484
+ Y({
18450
17485
  accountId,
18451
17486
  id,
18452
17487
  jwt: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyIjp7ImFjY291bnRJZCI6InRlc3Rlc3Rlc3QiLCJpZCI6InRlc3Rlc3Rlc3QifX0.qYnU5hNeIj9C_G3NogfG7btgCPGZC7JRXY0MG6a63zs",
18453
17488
  });
18454
17489
  return () => {
18455
17490
  window.widgetIdent = undefined;
18456
- L$1(undefined);
17491
+ Y(undefined);
18457
17492
  };
18458
17493
  }, []);
18459
17494
  }
@@ -18514,278 +17549,54 @@ const UseLeaderboard = /*#__PURE__*/Object.freeze({
18514
17549
  });
18515
17550
 
18516
17551
  const FormMessage_stories = {
18517
- title: "Components/Form Message",
17552
+ title: "Form Message",
18518
17553
  };
18519
17554
  const SuccessAlert = () => {
18520
17555
  return (h("sqm-form-message", { type: "success" },
18521
17556
  h("div", null, "This is a success message.")));
18522
- };
18523
- const ErrorAlert = () => {
18524
- return (h("sqm-form-message", { type: "error" },
18525
- h("div", null, "This is an error message")));
18526
- };
18527
- const InfoAlert = () => {
18528
- return (h("sqm-form-message", { type: "info" },
18529
- h("div", null, "This is an info message")));
18530
- };
18531
- const FullStackSuccess = () => {
18532
- return (h("sqm-form-message", { type: "success", exportparts: "successalert-icon" },
18533
- h("div", { class: "AlertContent" },
18534
- h("div", { part: "successalert-text" }, "Title"),
18535
- h("div", { part: "successalert-subtext" }, "Body text."),
18536
- h("sl-button", { type: "default", exportparts: "base: defaultbutton-base", onClick: () => {
18537
- console.log("click");
18538
- } }, "Primary Action"),
18539
- h("sl-button", { class: "SecondaryTextButton", type: "text", onClick: () => {
18540
- console.log("click");
18541
- } }, "Secondary Action"))));
18542
- };
18543
-
18544
- const FormMessage$1 = /*#__PURE__*/Object.freeze({
18545
- __proto__: null,
18546
- 'default': FormMessage_stories,
18547
- SuccessAlert: SuccessAlert,
18548
- ErrorAlert: ErrorAlert,
18549
- InfoAlert: InfoAlert,
18550
- FullStackSuccess: FullStackSuccess
18551
- });
18552
-
18553
- const EXCHANGE$1 = dist.gql `
18554
- mutation exchange($exchangeRewardInput: ExchangeRewardInput!) {
18555
- exchangeReward(exchangeRewardInput: $exchangeRewardInput) {
18556
- reward {
18557
- id
18558
- }
18559
- }
18560
- }
18561
- `;
18562
- const UseRewardExchangeList_stories = {
18563
- title: "Hooks / useRewardExchange",
18564
- };
18565
- function setupGraphQL$6() {
18566
- const id = "testestest";
18567
- const accountId = id;
18568
- const programId = "sam-partner-test-2";
18569
- //@ts-ignore
18570
- window.widgetIdent = {
18571
- tenantAlias: "test_a8b41jotf8a1v",
18572
- appDomain: "https://staging.referralsaasquatch.com",
18573
- programId,
18574
- };
18575
- useEffect(() => {
18576
- L$1({
18577
- accountId,
18578
- id,
18579
- jwt: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyIjp7ImFjY291bnRJZCI6InRlc3Rlc3Rlc3QiLCJpZCI6InRlc3Rlc3Rlc3QifX0.qYnU5hNeIj9C_G3NogfG7btgCPGZC7JRXY0MG6a63zs",
18580
- });
18581
- return () => {
18582
- window.widgetIdent = undefined;
18583
- L$1(undefined);
18584
- };
18585
- }, []);
18586
- return { id, accountId };
18587
- }
18588
- function useExchangeButton() {
18589
- const { id, accountId } = setupGraphQL$6();
18590
- const [points, setPoints] = useState(10);
18591
- const [rate, setRate] = useState(100);
18592
- const [exchange, { data, errors }] = Ne(EXCHANGE$1);
18593
- return {
18594
- states: {
18595
- points,
18596
- rate,
18597
- },
18598
- data: {
18599
- id,
18600
- accountId,
18601
- data,
18602
- errors,
18603
- },
18604
- callbacks: {
18605
- exchange,
18606
- setPoints,
18607
- setRate,
18608
- },
18609
- };
18610
- }
18611
- const DefaultView = (props) => {
18612
- const { states, data, callbacks } = props;
18613
- return (h("div", null,
18614
- h("div", null,
18615
- h("label", null, "Rate:"),
18616
- h("input", { value: states.rate, onInput: (e) =>
18617
- // @ts-ignore
18618
- callbacks.setRate(e.target.value) })),
18619
- h("input", { value: states.points, onInput: (e) =>
18620
- // @ts-ignore
18621
- callbacks.setPoints(e.target.value) }),
18622
- h("button", { onClick: () => callbacks.exchange(props.input) }, "Exchange"),
18623
- h("details", null,
18624
- h("summary", null, "response"),
18625
- h("h4", null, "data"),
18626
- h("div", { style: { maxWidth: "500px" } },
18627
- h("pre", { style: { width: "500px", whiteSpace: "pre-wrap" } }, JSON.stringify(data.data))),
18628
- h("h4", null, "errors"),
18629
- h("div", { style: { maxWidth: "500px" } },
18630
- h("pre", { style: { maxWidth: "500px", whiteSpace: "pre-wrap" } }, JSON.stringify(data.errors))))));
18631
- };
18632
- const RewardList = createHookStory(() => {
18633
- setupGraphQL$6();
18634
- return (h("sqm-reward-exchange-list", { "list-type": "something" }));
18635
- });
18636
- const FixedGlobalReward = createHookStory(() => {
18637
- const { states, data, callbacks } = useExchangeButton();
18638
- return (h(DefaultView, { states: states, data: data, callbacks: callbacks, input: {
18639
- exchangeRewardInput: {
18640
- userId: data.id,
18641
- accountId: data.accountId,
18642
- redeemCreditInput: {
18643
- amount: states.points,
18644
- unit: "POINT",
18645
- },
18646
- globalRewardKey: "gc1",
18647
- },
18648
- } }));
18649
- });
18650
- const VariableGlobalReward = createHookStory(() => {
18651
- const { states, data, callbacks } = useExchangeButton();
18652
- return (h(DefaultView, { states: states, data: data, callbacks: callbacks, input: {
18653
- exchangeRewardInput: {
18654
- userId: data.id,
18655
- accountId: data.accountId,
18656
- redeemCreditInput: {
18657
- amount: states.points,
18658
- unit: "POINT",
18659
- },
18660
- globalRewardKey: "gc1",
18661
- rewardInput: {
18662
- valueInCents: Math.ceil(states.points * states.rate),
18663
- },
18664
- },
18665
- } }));
18666
- });
18667
- const VariableCreditReward = createHookStory(() => {
18668
- const { states, data, callbacks } = useExchangeButton();
18669
- return (h(DefaultView, { states: states, data: data, callbacks: callbacks, input: {
18670
- exchangeRewardInput: {
18671
- userId: data.id,
18672
- accountId: data.accountId,
18673
- redeemCreditInput: {
18674
- amount: states.points,
18675
- unit: "POINT",
18676
- },
18677
- rewardInput: {
18678
- type: "CREDIT",
18679
- unit: "foo",
18680
- assignedCredit: Math.ceil(states.points * states.rate),
18681
- },
18682
- },
18683
- } }));
18684
- });
18685
-
18686
- const UseRewardExchangeList = /*#__PURE__*/Object.freeze({
18687
- __proto__: null,
18688
- 'default': UseRewardExchangeList_stories,
18689
- RewardList: RewardList,
18690
- FixedGlobalReward: FixedGlobalReward,
18691
- VariableGlobalReward: VariableGlobalReward,
18692
- VariableCreditReward: VariableCreditReward
18693
- });
18694
-
18695
- const UseRewardsTable_stories = {
18696
- title: "Hooks / useRewardsTable",
18697
- };
18698
- function setupGraphQL$7() {
18699
- const id = "testestest";
18700
- const accountId = id;
18701
- //@ts-ignore
18702
- window.widgetIdent = {
18703
- tenantAlias: "test_a8b41jotf8a1v",
18704
- appDomain: "https://staging.referralsaasquatch.com",
18705
- };
18706
- useEffect(() => {
18707
- L$1({
18708
- accountId,
18709
- id,
18710
- jwt: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyIjp7ImFjY291bnRJZCI6InRlc3Rlc3Rlc3QiLCJpZCI6InRlc3Rlc3Rlc3QifX0.qYnU5hNeIj9C_G3NogfG7btgCPGZC7JRXY0MG6a63zs",
18711
- });
18712
- return () => {
18713
- window.widgetIdent = undefined;
18714
- L$1(undefined);
18715
- };
18716
- }, []);
18717
- return { id, accountId };
18718
- }
18719
- const RewardsTableWithProgram = createHookStory(() => {
18720
- setupGraphQL$7();
18721
- A$1("sam-partner-test-2");
18722
- return (h("sqm-rewards-table", null,
18723
- h("sqm-rewards-table-column", null)));
18724
- });
18725
- const RewardsTableNoProgram = createHookStory(() => {
18726
- setupGraphQL$7();
18727
- A$1(undefined);
18728
- return (h("sqm-rewards-table", null,
18729
- h("sqm-rewards-table-column", null)));
18730
- });
18731
-
18732
- const UseRewardsTable = /*#__PURE__*/Object.freeze({
18733
- __proto__: null,
18734
- 'default': UseRewardsTable_stories,
18735
- RewardsTableWithProgram: RewardsTableWithProgram,
18736
- RewardsTableNoProgram: RewardsTableNoProgram
18737
- });
18738
-
18739
- const JWT = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyIjp7ImlkIjoic2FtK2tsaXBAc2Fhc3F1YXQuY2giLCJhY2NvdW50SWQiOiJzYW0ra2xpcEBzYWFzcXVhdC5jaCJ9fQ.FMNZ6oajyr6SiCcRqKKdyPqvNTvWROQ60MKAyfvWGfc";
18740
- const UseTaskCard_stories = {
18741
- title: "Hooks / useTaskCard",
18742
- };
18743
- function setupGraphQL$8() {
18744
- const id = "sam+klip@saasquat.ch";
18745
- const accountId = id;
18746
- const programId = "klip-referral-program";
18747
- //@ts-ignore
18748
- window.widgetIdent = {
18749
- tenantAlias: "test_a74miwdpofztj",
18750
- appDomain: "https://staging.referralsaasquatch.com",
18751
- programId,
18752
- };
18753
- useEffect(() => {
18754
- L$1({
18755
- accountId,
18756
- id,
18757
- jwt: JWT,
18758
- });
18759
- return () => {
18760
- window.widgetIdent = undefined;
18761
- L$1(undefined);
18762
- };
18763
- }, []);
18764
- return { id, accountId };
18765
- }
18766
- const TaskCard = createHookStory(() => {
18767
- setupGraphQL$8();
18768
- return (h("sqm-task-card", { "card-title": "Comment on 5 articles", "button-text": "Start reading", goal: 5, steps: true, "show-progress-bar": true }));
18769
- });
17557
+ };
17558
+ const ErrorAlert = () => {
17559
+ return (h("sqm-form-message", { type: "error" },
17560
+ h("div", null, "This is an error message")));
17561
+ };
17562
+ const InfoAlert = () => {
17563
+ return (h("sqm-form-message", { type: "info" },
17564
+ h("div", null, "This is an info message")));
17565
+ };
17566
+ const FullStackSuccess = () => {
17567
+ return (h("sqm-form-message", { type: "success", exportparts: "successalert-icon" },
17568
+ h("div", { class: "AlertContent" },
17569
+ h("div", { part: "successalert-text" }, "Title"),
17570
+ h("div", { part: "successalert-subtext" }, "Body text."),
17571
+ h("sl-button", { type: "default", exportparts: "base: defaultbutton-base", onClick: () => {
17572
+ console.log("click");
17573
+ } }, "Primary Action"),
17574
+ h("sl-button", { class: "SecondaryTextButton", type: "text", onClick: () => {
17575
+ console.log("click");
17576
+ } }, "Secondary Action"))));
17577
+ };
18770
17578
 
18771
- const UseTaskCard = /*#__PURE__*/Object.freeze({
17579
+ const FormMessage$1 = /*#__PURE__*/Object.freeze({
18772
17580
  __proto__: null,
18773
- 'default': UseTaskCard_stories,
18774
- TaskCard: TaskCard
17581
+ 'default': FormMessage_stories,
17582
+ SuccessAlert: SuccessAlert,
17583
+ ErrorAlert: ErrorAlert,
17584
+ InfoAlert: InfoAlert,
17585
+ FullStackSuccess: FullStackSuccess
18775
17586
  });
18776
17587
 
18777
17588
  const NewPortal_stories = {
18778
17589
  title: "New Portal",
18779
17590
  };
18780
- const style$9 = {
17591
+ const style$8 = {
18781
17592
  HeaderSubtitleBold: {
18782
17593
  "font-weight": 500,
18783
17594
  "text-decoration": "underline",
18784
17595
  },
18785
17596
  };
18786
17597
  jss.setup(create());
18787
- const sheet$9 = jss.createStyleSheet(style$9);
18788
- const styleString$9 = sheet$9.toString();
17598
+ const sheet$8 = jss.createStyleSheet(style$8);
17599
+ const styleString$8 = sheet$8.toString();
18789
17600
  const barProps = {
18790
17601
  data: {
18791
17602
  programs: [
@@ -18880,7 +17691,7 @@ const Dashboard = () => {
18880
17691
  hide: false,
18881
17692
  };
18882
17693
  return (h("sqm-divided-layout", { direction: "row" },
18883
- h("style", { type: "text/css" }, styleString$9),
17694
+ h("style", { type: "text/css" }, styleString$8),
18884
17695
  h(Sidebar, null),
18885
17696
  h("sqm-divided-layout", { direction: "column" },
18886
17697
  h(PortalContainerView, Object.assign({}, { direction: "column", padding: "xxx-large", gap: "xxx-large" }),
@@ -18893,10 +17704,10 @@ const Dashboard = () => {
18893
17704
  h("h1", null, "John Smith"))),
18894
17705
  })),
18895
17706
  h(StatContainerView, Object.assign({}, { space: "64px" }),
18896
- h(BigStatView, Object.assign({}, { statvalue: "2,345", value: 234500 }), "Clicks"),
18897
- h(BigStatView, Object.assign({}, { statvalue: "58", value: 58 }), "Referrals"),
18898
- h(BigStatView, Object.assign({}, { statvalue: "$10,540", value: 1054000 }), "Earned"),
18899
- h(BigStatView, Object.assign({}, { statvalue: "$2,305", value: 230500 }), "Awaiting Payout"))),
17707
+ h(BigStatView, Object.assign({}, { statvalue: "2,345" }), "Clicks"),
17708
+ h(BigStatView, Object.assign({}, { statvalue: "58" }), "Referrals"),
17709
+ h(BigStatView, Object.assign({}, { statvalue: "$10,540" }), "Earned"),
17710
+ h(BigStatView, Object.assign({}, { statvalue: "$2,305" }), "Awaiting Payout"))),
18900
17711
  h(PortalContainerView, Object.assign({}, { direction: "column", padding: "xxx-large", gap: "xxx-large" }),
18901
17712
  h(PortalSectionView, Object.assign({}, {
18902
17713
  labelMargin: "x-large",
@@ -18938,7 +17749,7 @@ const Dashboard = () => {
18938
17749
  };
18939
17750
  const EditProfile$2 = () => {
18940
17751
  return (h("sqm-divided-layout", { direction: "row" },
18941
- h("style", { type: "text/css" }, styleString$9),
17752
+ h("style", { type: "text/css" }, styleString$8),
18942
17753
  h(Sidebar, null),
18943
17754
  h("sqm-divided-layout", { direction: "column" },
18944
17755
  h(PortalProfileView, Object.assign({}, {
@@ -19002,7 +17813,7 @@ const EditProfile$2 = () => {
19002
17813
  };
19003
17814
  const Commissions = () => {
19004
17815
  return (h("sqm-divided-layout", { direction: "row" },
19005
- h("style", { type: "text/css" }, styleString$9),
17816
+ h("style", { type: "text/css" }, styleString$8),
19006
17817
  h(Sidebar, null),
19007
17818
  h("sqm-divided-layout", { direction: "column" },
19008
17819
  h(PortalContainerView, Object.assign({}, { direction: "column", padding: "xxx-large", gap: "xxx-large" }),
@@ -19015,19 +17826,19 @@ const Commissions = () => {
19015
17826
  h("p", null,
19016
17827
  "for the",
19017
17828
  " ",
19018
- h("span", { class: sheet$9.classes.HeaderSubtitleBold }, "Partner Program #1"),
17829
+ h("span", { class: sheet$8.classes.HeaderSubtitleBold }, "Partner Program #1"),
19019
17830
  " ",
19020
17831
  "program"))),
19021
17832
  })),
19022
17833
  h(StatContainerView, Object.assign({}, { space: "64px" }),
19023
- h(BigStatView, Object.assign({}, { statvalue: "$ 1,000", value: 100000 }), "Total Earned"),
19024
- h(BigStatView, Object.assign({}, { statvalue: "$ 800", value: 80000 }), "Available"),
19025
- h(BigStatView, Object.assign({}, { statvalue: "$ 180", value: 18000 }), "Pending"),
19026
- h(BigStatView, Object.assign({}, { statvalue: "$ 20", value: 2000 }), "Redeemed"))))));
17834
+ h(BigStatView, Object.assign({}, { statvalue: "$ 1,000" }), "Total Earned"),
17835
+ h(BigStatView, Object.assign({}, { statvalue: "$ 800" }), "Available"),
17836
+ h(BigStatView, Object.assign({}, { statvalue: "$ 180" }), "Pending"),
17837
+ h(BigStatView, Object.assign({}, { statvalue: "$ 20" }), "Redeemed"))))));
19027
17838
  };
19028
17839
  const Activity = () => {
19029
17840
  return (h("sqm-divided-layout", { direction: "row" },
19030
- h("style", { type: "text/css" }, styleString$9),
17841
+ h("style", { type: "text/css" }, styleString$8),
19031
17842
  h(Sidebar, null),
19032
17843
  h("sqm-divided-layout", { direction: "column" },
19033
17844
  h(PortalContainerView, Object.assign({}, { direction: "column", padding: "xxx-large", gap: "xxx-large" }),
@@ -19040,7 +17851,7 @@ const Activity = () => {
19040
17851
  h("p", null,
19041
17852
  "for the",
19042
17853
  " ",
19043
- h("span", { class: sheet$9.classes.HeaderSubtitleBold }, "Partner Program #1"),
17854
+ h("span", { class: sheet$8.classes.HeaderSubtitleBold }, "Partner Program #1"),
19044
17855
  " ",
19045
17856
  "program"))),
19046
17857
  })),
@@ -19050,10 +17861,10 @@ const Activity = () => {
19050
17861
  label: (h("sqm-text", null,
19051
17862
  h("h3", null, "Referral Activity"))),
19052
17863
  content: (h(StatContainerView, Object.assign({}, { space: "64px" }),
19053
- h(BigStatView, Object.assign({}, { statvalue: "1,000", value: 100000 }), "Total Referrals"),
19054
- h(BigStatView, Object.assign({}, { statvalue: "800", value: 800 }), "Converted"),
19055
- h(BigStatView, Object.assign({}, { statvalue: "180", value: 180 }), "Pending"),
19056
- h(BigStatView, Object.assign({}, { statvalue: "20", value: 20 }), "Disqualified"))),
17864
+ h(BigStatView, Object.assign({}, { statvalue: "1,000" }), "Total Referrals"),
17865
+ h(BigStatView, Object.assign({}, { statvalue: "800" }), "Converted"),
17866
+ h(BigStatView, Object.assign({}, { statvalue: "180" }), "Pending"),
17867
+ h(BigStatView, Object.assign({}, { statvalue: "20" }), "Disqualified"))),
19057
17868
  }))),
19058
17869
  h(PortalSectionView, Object.assign({}, {
19059
17870
  labelMargin: "x-large",
@@ -19061,9 +17872,9 @@ const Activity = () => {
19061
17872
  label: (h("sqm-text", null,
19062
17873
  h("h3", null, "Traffic Generated"))),
19063
17874
  content: (h(StatContainerView, Object.assign({}, { space: "64px" }),
19064
- h(BigStatView, Object.assign({}, { statvalue: "1,000", value: 1000 }), "Clicks"),
19065
- h(BigStatView, Object.assign({}, { statvalue: "800", value: 800 }), "From share link"),
19066
- h(BigStatView, Object.assign({}, { statvalue: "180", value: 180 }), "From share mediums"))),
17875
+ h(BigStatView, Object.assign({}, { statvalue: "1,000" }), "Clicks"),
17876
+ h(BigStatView, Object.assign({}, { statvalue: "800" }), "From share link"),
17877
+ h(BigStatView, Object.assign({}, { statvalue: "180" }), "From share mediums"))),
19067
17878
  })))));
19068
17879
  };
19069
17880
 
@@ -19077,7 +17888,7 @@ const NewPortal = /*#__PURE__*/Object.freeze({
19077
17888
  });
19078
17889
 
19079
17890
  const SidebarItem_stories = {
19080
- title: "Components/Sidebar Item",
17891
+ title: "Sidebar Item",
19081
17892
  };
19082
17893
  const InactiveItem = () => {
19083
17894
  const props = {
@@ -19114,7 +17925,7 @@ const SidebarItem = /*#__PURE__*/Object.freeze({
19114
17925
  });
19115
17926
 
19116
17927
  const NavigationSidebar_stories = {
19117
- title: "Components/Navigation Sidebar",
17928
+ title: "Navigation Sidebar",
19118
17929
  };
19119
17930
  const DefaultNavigationSidebar = () => {
19120
17931
  const barProps = {
@@ -19163,12 +17974,14 @@ const NavigationSidebar = /*#__PURE__*/Object.freeze({
19163
17974
  });
19164
17975
 
19165
17976
  const PortalLogin_stories = {
19166
- title: "Components/Portal Login",
17977
+ title: "Portal Login",
19167
17978
  };
19168
17979
  const defaultProps$2 = {
19169
17980
  states: {
19170
17981
  error: "",
19171
17982
  loading: false,
17983
+ forgotPasswordPath: "/forgotPassword",
17984
+ registerPath: "/register",
19172
17985
  },
19173
17986
  callbacks: {
19174
17987
  submit: async (e) => await e,
@@ -19179,6 +17992,8 @@ const errorProps = {
19179
17992
  states: {
19180
17993
  error: "Something went wrong. Please try again.",
19181
17994
  loading: false,
17995
+ forgotPasswordPath: "/forgotPassword",
17996
+ registerPath: "/register",
19182
17997
  },
19183
17998
  callbacks: {
19184
17999
  submit: async (e) => await e,
@@ -19189,6 +18004,8 @@ const loadingProps = {
19189
18004
  states: {
19190
18005
  error: "",
19191
18006
  loading: true,
18007
+ forgotPasswordPath: "/forgotPassword",
18008
+ registerPath: "/register",
19192
18009
  },
19193
18010
  callbacks: {
19194
18011
  submit: async (e) => await e,
@@ -19208,7 +18025,7 @@ const PortalLogin$1 = /*#__PURE__*/Object.freeze({
19208
18025
  });
19209
18026
 
19210
18027
  const PortalRegister_stories = {
19211
- title: "Components/Portal Register",
18028
+ title: "Portal Register",
19212
18029
  };
19213
18030
  const defaultProps$3 = {
19214
18031
  states: {
@@ -19216,6 +18033,7 @@ const defaultProps$3 = {
19216
18033
  loading: false,
19217
18034
  confirmPassword: true,
19218
18035
  hideInputs: false,
18036
+ loginPath: "/login"
19219
18037
  },
19220
18038
  callbacks: {
19221
18039
  submit: () => console.log("Submit!"),
@@ -19232,6 +18050,7 @@ const errorProps$1 = {
19232
18050
  loading: false,
19233
18051
  confirmPassword: true,
19234
18052
  hideInputs: false,
18053
+ loginPath: "/login"
19235
18054
  },
19236
18055
  callbacks: {
19237
18056
  submit: () => console.log("Submit!"),
@@ -19251,6 +18070,7 @@ const loadingProps$1 = {
19251
18070
  loading: true,
19252
18071
  confirmPassword: true,
19253
18072
  hideInputs: false,
18073
+ loginPath: "/login"
19254
18074
  },
19255
18075
  callbacks: {
19256
18076
  submit: () => console.log("Submit!"),
@@ -19267,6 +18087,7 @@ const slottedProps = {
19267
18087
  loading: false,
19268
18088
  confirmPassword: true,
19269
18089
  hideInputs: false,
18090
+ loginPath: "/login"
19270
18091
  },
19271
18092
  callbacks: {
19272
18093
  submit: () => console.log("Submit!"),
@@ -19293,6 +18114,7 @@ const FieldsHidden = () => {
19293
18114
  loading: true,
19294
18115
  confirmPassword: true,
19295
18116
  hideInputs: true,
18117
+ loginPath: "/login"
19296
18118
  },
19297
18119
  } }));
19298
18120
  };
@@ -19308,10 +18130,10 @@ const PortalRegister$1 = /*#__PURE__*/Object.freeze({
19308
18130
  SlottedInputs: SlottedInputs
19309
18131
  });
19310
18132
 
19311
- const scenario = "@author:\r\n@owner:ian\r\nFeature: Forgot Password\r\n\r\n @motivating\r\n Scenario: Users can request to reset their password\r\n Given a user enters their email address\r\n And that email address is linked to a previously created account\r\n When they click \"Reset Password\"\r\n Then the button enters a loading state\r\n When the password reset email is sent\r\n Then a confirmation banner is shown stating a password reset email was sent\r\n\r\n @motivating\r\n Scenario: Users are notified if sending their password reset email fails\r\n Given a user enters their email address\r\n And that email address is linked to a previously created account\r\n When they click \"Reset Password\"\r\n Then the button enters a loading state\r\n When the password reset email fails to send\r\n Then the user will not receive a password reset email\r\n And an error banner is shown stating that they should try again\r\n\r\n @motivating\r\n @landmine\r\n Scenario: If the input email is not associated to an account a success banner will be shown but an email will not be sent\r\n Given the user entered an email address that is not associated to an accoun\r\n When they click \"Reset Password\"\r\n Then the button enters a loading state\r\n But no email will be sent\r\n And a success banner is shown stating a password reset email was sent if the given email was associated to an account\r\n\r\n @motivating\r\n Scenario: Users can resend password reset email\r\n Given a user had previously requested to reset their password\r\n When they enter their email address\r\n And that email address is linked to a previously created account\r\n And they click \"Reset Password\"\r\n Then the user will receive a second password reset email\r\n And a success banner is shown stating that their email was sent\r\n";
18133
+ const scenario = "@author:derek\r\n@owner:ian\r\nFeature: Forgot Password\r\n\r\n @motivating\r\n Scenario: Users can request to reset their password\r\n Given a user enters their email address\r\n And that email address is linked to a previously created account\r\n When they click \"Reset Password\"\r\n Then the button enters a loading state\r\n When the password reset email is sent\r\n Then a confirmation banner is shown stating a password reset email was sent\r\n\r\n @motivating\r\n Scenario: Users are notified if sending their password reset email fails\r\n Given a user enters their email address\r\n And that email address is linked to a previously created account\r\n When they click \"Reset Password\"\r\n Then the button enters a loading state\r\n When the password reset email fails to send\r\n Then the user does not receive a password reset email\r\n And an error banner is shown stating that they should try again\r\n\r\n @motivating\r\n @landmine\r\n Scenario: If the input email is not associated to an account a success banner is shown but an email is not be sent\r\n Given the user entered an email address that is not associated to an accoun\r\n When they click \"Reset Password\"\r\n Then the button enters a loading state\r\n But no email is sent\r\n And a success banner is shown stating a password reset email was sent if the given email was associated to an account\r\n\r\n @motivating\r\n Scenario: Users can resend password reset email\r\n Given a user had previously requested to reset their password\r\n When they enter their email address\r\n And that email address is linked to a previously created account\r\n And they click \"Reset Password\"\r\n Then the user receives a second password reset email\r\n And a success banner is shown stating that their email was sent\r\n\r\n @motivating\r\n Scenario Outline: The email link can be configured to redirect users to a specific base path but defaults to \"/resetPassword\"\r\n Given a user viewing the password reset component\r\n And the component <mayHave> \"redirect-path\" with <value>\r\n When they request a password reset email\r\n And they click the link in the email\r\n Then they are redirected to <redirectPath>\r\n Examples:\r\n | mayHave | value | redirectPath |\r\n | doesn't have | N/A | /resetPassword |\r\n | has | /resetMyPassword | /resetMyPassword |\r\n\r\n @minutae\r\n Scenario Outline: Navigation back to the login page can be customized but defaults to \"/login\"\r\n Given a user viewing the password reset component\r\n And the component <mayHave> \"login-path\" with <value>\r\n Then they see a \"Sign In\" text button\r\n When they click \"Sign In\"\r\n Then they are redirected to <redirectPath>\r\n Examples:\r\n | mayHave | value | redirectPath |\r\n | doesn't have | N/A | /login |\r\n | has | /signin | /signin |";
19312
18134
 
19313
18135
  const PortalForgotPassword_stories = {
19314
- title: "Components/Portal Forgot Password",
18136
+ title: "Portal Forgot Password",
19315
18137
  parameters: {
19316
18138
  scenario,
19317
18139
  },
@@ -19321,6 +18143,7 @@ const defaultProps$4 = {
19321
18143
  error: "",
19322
18144
  loading: false,
19323
18145
  success: false,
18146
+ loginPath: "/login",
19324
18147
  },
19325
18148
  callbacks: {
19326
18149
  submit: async (e) => await e,
@@ -19335,6 +18158,7 @@ const errorProps$2 = {
19335
18158
  error: "Something went wrong. Please try again.",
19336
18159
  loading: false,
19337
18160
  success: false,
18161
+ loginPath: "/login",
19338
18162
  },
19339
18163
  callbacks: {
19340
18164
  submit: async (e) => await e,
@@ -19349,6 +18173,7 @@ const loadingProps$2 = {
19349
18173
  error: "",
19350
18174
  loading: true,
19351
18175
  success: false,
18176
+ loginPath: "/login",
19352
18177
  },
19353
18178
  callbacks: {
19354
18179
  submit: async (e) => await e,
@@ -19363,6 +18188,7 @@ const successProps = {
19363
18188
  error: "",
19364
18189
  loading: false,
19365
18190
  success: true,
18191
+ loginPath: "/login",
19366
18192
  },
19367
18193
  callbacks: {
19368
18194
  submit: async (e) => await e,
@@ -19386,10 +18212,10 @@ const PortalForgotPassword = /*#__PURE__*/Object.freeze({
19386
18212
  ForgotPasswordSuccess: ForgotPasswordSuccess
19387
18213
  });
19388
18214
 
19389
- const scenario$1 = "@author:\r\n@owner: ian\r\nFeature: Email Verification\r\n\r\n @minutae\r\n Scenario: User's redirected from registration can re-send their verification email\r\n Given a user has registered\r\n And they have been sent a verification email\r\n When they are redirected to the email verification page\r\n Then a message will be displayed\r\n And it will reflect that a email has already been sent to their email\r\n But they can still re-send the email\r\n When they click to \"Resend-Email\"\r\n Then the user will receive a verification email\r\n\r\n @motivating\r\n Scenario: Users are notified if sending the email verification message fails\r\n Given a user with an email was stored in session data from registration\r\n When they click to \"Resend-Email\"\r\n Then the button enters a loading state\r\n When an error occurs trying to send the verification email\r\n Then the user will not receive a verification email\r\n And an error banner is shown stating that they should try again\r\n\r\n @motivating\r\n Scenario: Users are notified if sending the email verification message succeeds\r\n Given a user with an email was stored in session data from registration\r\n When they click to \"Resend-Email\"\r\n Then the button enters a loading state\r\n When the email verification message sends\r\n Then the user will receive a verification email\r\n And a success banner is shown stating that their email was resent";
18215
+ const scenario$1 = "@author:derek\r\n@owner:ian\r\nFeature: Email Verification\r\n\r\n @minutae\r\n Scenario: User's redirected from registration can re-send their verification email\r\n Given a user has registered\r\n And they have been sent a verification email\r\n When they are redirected to the email verification page\r\n Then a message is displayed\r\n And it reflects that a email has been sent to their email\r\n But they can still re-send the email\r\n When they click to \"Resend-Email\"\r\n Then they receive a verification email\r\n\r\n @motivating\r\n Scenario: Users are notified if sending the email verification message fails\r\n Given a user viewing the email verification component\r\n And they have an email stored in session data from registration\r\n When they click to \"Resend-Email\"\r\n Then the button enters a loading state\r\n When an error occurs trying to send the verification email\r\n Then the user does not receive a verification email\r\n And an error banner is shown stating that they should try again\r\n\r\n @motivating\r\n Scenario: Users are notified if sending the email verification message succeeds\r\n Given a user viewing the email verification component\r\n And they have an email stored in session data from registration\r\n When they click to \"Resend-Email\"\r\n Then the button enters a loading state\r\n When the email verification message sends\r\n Then the user receives a verification email\r\n And a success banner is shown stating that their email was resent\r\n\r\n @motivating\r\n Scenario Outline: The email link can be configured to redirect users to a specific base path but defaults to \"/verifyEmail\"\r\n Given a user viewing the email verification component\r\n And they have an email stored in session data from registration\r\n And the component <mayHave> \"redirect-path\" with <value>\r\n When they resend their verification email\r\n And they click the link in the email\r\n Then they are redirected to <redirectPath>\r\n Examples:\r\n | mayHave | value | redirectPath |\r\n | doesn't have | N/A | /verifyEmail |\r\n | has | /verifyMyEmail | /verifyMyEmail |";
19390
18216
 
19391
18217
  const PortalEmailVerification_stories = {
19392
- title: "Components/Portal Email Verification",
18218
+ title: "Portal Email Verification",
19393
18219
  parameters: {
19394
18220
  scenario: scenario$1,
19395
18221
  },
@@ -19472,10 +18298,10 @@ const PortalEmailVerification = /*#__PURE__*/Object.freeze({
19472
18298
  EmailVerificationSuccess: EmailVerificationSuccess
19473
18299
  });
19474
18300
 
19475
- const scenario$2 = "@author:\r\n@owner:ian\r\nFeature: Reset Password\r\n\r\n\r\n Background: A user in on the password reset page\r\n Given a user who has been redirected to the password reset page\r\n\r\n @motivating\r\n Scenario: Users can reset their password\r\n Given a user has a valid oob code as a url query parameter\r\n When they enter their password twice\r\n And they click \"Update\"\r\n Then their password is updated\r\n And a banner with a success message will be displayed\r\n And they can log in with their new password\r\n\r\n @motivating\r\n Scenario Outline: Users cannot reset their password with an invalid or missing oob code\r\n Given a user has a <oobCode> as a url query parameter\r\n Then they will see an error message saying that their password reset code is invalid or expired\r\n When they click \"Continue\"\r\n Then they will be redirected to \"/\"\r\n Examples:\r\n | oobCode |\r\n | invalid oob code |\r\n | non existant oob code |\r\n\r\n @motivating\r\n Scenario: Users must enter the same password twice to successfully reset their password\r\n Given a user has been redirected to the password reset page\r\n And they have a valid oob code as a url query parameter\r\n When they enter two different passwords into the password reset form\r\n And they click \"Update\"\r\n Then their password is not be reset\r\n And an error banner stating the input passwords must match appears\r\n And their password will not be reset\r\n When they enter the same password twice\r\n And they click \"Update\"\r\n Then a banner appears with a success message\r\n And they can log in with their new password\r\n\r\n @motivating\r\n Scenario: Users are redirected to \"/\" by default\r\n Given the component does not have prop \"nextPage\"\r\n And the users url does not contain a \"nextPage\" query parameter\r\n And a user has entered their password twice\r\n When they click \"Update\"\r\n Then their password is updated\r\n And they are redirected to \"/\"\r\n\r\n @motivating\r\n Scenario: Custom redirection can be configured\r\n Given the component has prop \"nextPage\" with value \"/activity\"\r\n And the users url does not contain a \"nextPage\" query parameter\r\n And a user has entered their password twice\r\n When they click \"Update\"\r\n Then their password is updated\r\n And they are redirected to \"/activity\"";
18301
+ const scenario$2 = "@author:derek\r\n@owner:ian\r\nFeature: Reset Password\r\n\r\n Background: A user in on the password reset page\r\n Given a user who has been redirected to the password reset page\r\n\r\n @motivating\r\n Scenario: Users can reset their password\r\n Given a user has a valid oob code as a url query parameter\r\n When they enter their password twice\r\n And they click \"Update\"\r\n Then their password is updated\r\n And a banner with a success message is displayed\r\n And they can log in with their new password\r\n\r\n @motivating\r\n Scenario Outline: Users cannot reset their password with an invalid or missing oob code\r\n Given a user has a <oobCode> as a url query parameter\r\n And the component <mayHave> \"failed-page\" with <value>\r\n Then they see an error message saying that their password reset code is invalid/expired\r\n When they click \"Continue\"\r\n Then they are redirected to <redirectPath>\r\n Examples:\r\n | oobCode | mayHave | value | redirectPath |\r\n | invalid oob code | doesn't have | N/A | / |\r\n | non existant oob code | doesn't have | N/A | / |\r\n | invalid oob code | has | /login | /login |\r\n | non existant oob code | has | /login | /login |\r\n\r\n @motivating\r\n Scenario: Users must enter the same password twice to successfully reset their password\r\n Given a user has been redirected to the password reset page\r\n And they have a valid oob code as a url query parameter\r\n When they enter two different passwords into the password reset form\r\n And they click \"Update\"\r\n Then their password is not be reset\r\n And an error banner stating the input passwords must match appears\r\n And their password is not be reset\r\n When they enter the same password twice\r\n And they click \"Update\"\r\n Then a banner appears with a success message\r\n And they can log in with their new password\r\n\r\n @motivating\r\n Scenario: Users are redirected to \"/\" by default\r\n Given the component does not have prop \"nextPage\"\r\n And the users url does not contain a \"nextPage\" query parameter\r\n And a user has entered their password twice\r\n When they click \"Update\"\r\n Then their password is updated\r\n And they are redirected to \"/\"\r\n\r\n @motivating\r\n Scenario: Custom redirection can be configured\r\n Given the component has prop \"nextPage\" with value \"/activity\"\r\n And the users url does not contain a \"nextPage\" query parameter\r\n And a user has entered their password twice\r\n When they click \"Update\"\r\n Then their password is updated\r\n And they are redirected to \"/activity\"";
19476
18302
 
19477
18303
  const PortalResetPassword_stories = {
19478
- title: "Components/Portal Reset Password",
18304
+ title: "Portal Reset Password",
19479
18305
  parameters: {
19480
18306
  scenario: scenario$2,
19481
18307
  },
@@ -19636,10 +18462,10 @@ const PortalResetPassword = /*#__PURE__*/Object.freeze({
19636
18462
  CodeValidating: CodeValidating
19637
18463
  });
19638
18464
 
19639
- const scenario$3 = "@author:\r\n@owner:ian\r\nFeature: Verify Email\r\n\r\n\r\n Background: A user is on the email verification page\r\n Given a user who has been redirected to the email verification page\r\n\r\n @motivating\r\n Scenario: Verifying your email will take you to the portal login page\r\n Given a user has a valid oob code as a url query parameter\r\n When they click \"Verify Email\"\r\n Then the button will enter a loading state\r\n When their email is validated\r\n Then a button that says \"Continue\" will appear\r\n When they click \"Continue\"\r\n Then they will be redirected to login\r\n\r\n @motivating\r\n Scenario: Users will be automatically redirected if they dont click \"Continue\"\r\n Given a user has a valid oob code as a url query parameter\r\n When they click \"Verify Email\"\r\n Then the button will enter a loading state\r\n When their email is validated\r\n Then a button that says \"Continue\" will appear\r\n When they wait 5 seconds\r\n Then they will be redirected to login\r\n\r\n @motivating\r\n Scenario: Users are notified if verifying their email has failed\r\n Given a user has a valid oob code as a url query parameter\r\n When they click \"Verify Email\"\r\n Then the button will enter a loading state\r\n When their email fails to be validated\r\n Then an banner is shown stating that an error occured\r\n\r\n @motivating\r\n Scenario Outline: Users cannot verify their email with an invalid or missing oob code\r\n Given a user has a <oobCode> as a url query parameter\r\n Then they will see an error message saying that their verification code is invalid or expired\r\n When they click \"Continue\"\r\n Then they will be redirected to \"/\"\r\n Examples:\r\n | oobCode |\r\n | invalid oob code |\r\n | non existant oob code |\r\n\r\n @motivating\r\n Scenario: Users are redirected to \"/\" by default\r\n Given the component does not have prop \"nextPage\"\r\n And the users url does not contain a \"nextPage\" query parameter\r\n And a user has verified their email\r\n When they click \"Continue\"\r\n Then they will be redirected to \"/\"\r\n\r\n @motivating\r\n Scenario: Custom redirection can be configured\r\n Given the component has prop \"nextPage\" with value \"/activity\"\r\n And the users url does not contain a \"nextPage\" query parameter\r\n And a user has verified their email\r\n When they click \"Continue\"\r\n Then they will be redirected to \"/activity\"\r\n\r\n @motivating\r\n Scenario Outline: Users will be redirected to the value of the nextPage url parameter if it exists\r\n Given the component <mayHave> prop \"nextPage\" with <nextPageValue>\r\n And the users url contains a \"nextPage\" query paramater with <nextPageParamValue>\r\n And the user has verified their email\r\n When they click \"Continue\"\r\n Then they are redirected to <nextPageParamValue>\r\n Examples:\r\n | mayHave | nextPageValue | nextPageParamValue |\r\n | has | /dashboard | /activity |\r\n | does not have | N/A | /activity |";
18465
+ const scenario$3 = "@author:derek\r\n@owner:ian\r\nFeature: Verify Email\r\n\r\n Background: A user is on the email verification page\r\n Given a user who has been redirected to the email verification page\r\n\r\n @motivating\r\n Scenario: Verifying your email takes you to the portal login page\r\n Given a user has a valid oob code as a url query parameter\r\n When they click \"Verify Email\"\r\n Then the button enters a loading state\r\n When their email is validated\r\n Then a button that says \"Continue\" appears\r\n When they click \"Continue\"\r\n Then they are redirected to login\r\n\r\n @motivating\r\n Scenario: Users are automatically redirected if they dont click \"Continue\"\r\n Given a user has a valid oob code as a url query parameter\r\n When they click \"Verify Email\"\r\n Then the button enters a loading state\r\n When their email is validated\r\n Then a button that says \"Continue\" appears\r\n When they wait 5 seconds\r\n Then they are redirected to login\r\n\r\n @motivating\r\n Scenario: Users are notified if verifying their email has failed\r\n Given a user has a valid oob code as a url query parameter\r\n When they click \"Verify Email\"\r\n Then the button enters a loading state\r\n When their email fails to be validated\r\n Then an banner is shown stating that an error occured\r\n\r\n @motivating\r\n Scenario Outline: Users cannot verify their email with an invalid or missing oob code\r\n Given a user has a <oobCode> as a url query parameter\r\n And the component <mayHave> \"failed-page\" with <value>\r\n Then they see an error message saying that their verification code is invalid/expired\r\n When they click \"Continue\"\r\n Then they are redirected to <redirectPath>\r\n Examples:\r\n | oobCode | mayHave | value | redirectPath |\r\n | invalid oob code | doesn't have | N/A | / |\r\n | non existant oob code | doesn't have | N/A | / |\r\n | invalid oob code | has | /login | /login |\r\n | non existant oob code | has | /login | /login |\r\n\r\n @motivating\r\n Scenario: Users are redirected to \"/\" by default\r\n Given the component does not have prop \"nextPage\"\r\n And the users url does not contain a \"nextPage\" query parameter\r\n And a user has verified their email\r\n When they click \"Continue\"\r\n Then they are redirected to \"/\"\r\n\r\n @motivating\r\n Scenario: Custom redirection can be configured\r\n Given the component has prop \"nextPage\" with value \"/activity\"\r\n And the users url does not contain a \"nextPage\" query parameter\r\n And a user has verified their email\r\n When they click \"Continue\"\r\n Then they are redirected to \"/activity\"\r\n\r\n @motivating\r\n Scenario Outline: Users are redirected to the value of the nextPage url parameter if it exists\r\n Given the component <mayHave> prop \"nextPage\" with <nextPageValue>\r\n And the users url contains a \"nextPage\" query paramater with <nextPageParamValue>\r\n And the user has verified their email\r\n When they click \"Continue\"\r\n Then they are redirected to <nextPageParamValue>\r\n Examples:\r\n | mayHave | nextPageValue | nextPageParamValue |\r\n | has | /dashboard | /activity |\r\n | does not have | N/A | /activity |";
19640
18466
 
19641
18467
  const PortalVerifyEmail_stories = {
19642
- title: "Components/Portal Verify Email",
18468
+ title: "Portal Verify Email",
19643
18469
  parameters: {
19644
18470
  scenario: scenario$3,
19645
18471
  },
@@ -19683,7 +18509,7 @@ const PortalVerifyEmail = /*#__PURE__*/Object.freeze({
19683
18509
  });
19684
18510
 
19685
18511
  const AssetCard_stories = {
19686
- title: "Components/Asset Card",
18512
+ title: "Asset Card",
19687
18513
  };
19688
18514
  const Default$7 = () => {
19689
18515
  const props = {
@@ -19719,7 +18545,7 @@ const AssetCard = /*#__PURE__*/Object.freeze({
19719
18545
  });
19720
18546
 
19721
18547
  const DividedLayout_stories = {
19722
- title: "Components/Divided Layout",
18548
+ title: "Divided Layout",
19723
18549
  };
19724
18550
  const barProps$1 = {
19725
18551
  data: {
@@ -19811,7 +18637,7 @@ const DividedLayout$1 = /*#__PURE__*/Object.freeze({
19811
18637
  const scenario$4 = "Feature: Change Password\r\n\r\n @motivating\r\n Scenario: Users can change their password\r\n Given a user has registered for the portal\r\n And they have a password\r\n When they navigate to the edit profile page\r\n And click \"Change your password...\"\r\n Then a popup will appear\r\n When they enter their new password\r\n And confirm it\r\n And click \"Change Password\"\r\n Then they will see a success banner stating that the change was successful\r\n When they logout\r\n And try to login\r\n Then they will not be able to login with their old password\r\n But they will be able to login with their new password\r\n\r\n @motivating\r\n Scenario: Users must confirm their password change\r\n Given a user has registered for the portal\r\n When they navigate to the edit profile page\r\n And click \"Change your password...\"\r\n Then a popup will appear\r\n When they enter their new password\r\n But they enter a different password to confirm\r\n And click \"Change Password\"\r\n Then they will see an error banner stating that the passwords didnt match\r\n When they logout\r\n And try to login\r\n Then they will be able to login with their existing password\r\n\r\n @motivating\r\n Scenario: Users must enter a new password and confirm it to change their password\r\n Given a user has registered for the portal\r\n When they navigate to the edit profile page\r\n And click \"Change your password...\"\r\n Then a popup will appear\r\n When they click \"Change password\"\r\n Then a validation error will appear for the new password field\r\n And their password will not be changed\r\n When they enter a new password\r\n And they click \"Change password\"\r\n Then a validation error will appear for the confirm new password field\r\n And their password will not be changed\r\n\r\n @motivating\r\n Scenario: An error banner will be displayed if the password change fails\r\n Given a user has registered for the portal\r\n When they navigate to the edit profile page\r\n And click \"Change your password...\"\r\n When they enter their new password\r\n And confirm it\r\n And click \"Change Password\"\r\n But the change fails\r\n Then they will see an error banner stating that the change failed\r\n When they logout\r\n And try to login\r\n Then they will be able to login with their existing password";
19812
18638
 
19813
18639
  const ChangePassword_stories = {
19814
- title: "Components/Change Password",
18640
+ title: "Change Password",
19815
18641
  parameters: {
19816
18642
  scenario: scenario$4,
19817
18643
  },
@@ -19967,7 +18793,7 @@ const ChangePassword = /*#__PURE__*/Object.freeze({
19967
18793
  });
19968
18794
 
19969
18795
  const PortalProfile_stories = {
19970
- title: "Components/Portal Profile",
18796
+ title: "Portal Profile",
19971
18797
  };
19972
18798
  // const style = {};
19973
18799
  jss.setup(create());
@@ -20208,7 +19034,7 @@ const PortalProfile = /*#__PURE__*/Object.freeze({
20208
19034
  });
20209
19035
 
20210
19036
  const ReferralTableRewardsCell_stories = {
20211
- title: "Components/Referral Table Rewards Cell",
19037
+ title: "Referral Table Rewards Cell",
20212
19038
  };
20213
19039
  const baseReward = {
20214
19040
  id: "123",
@@ -20440,7 +19266,7 @@ const ReferralTableRewardsCell$1 = /*#__PURE__*/Object.freeze({
20440
19266
  });
20441
19267
 
20442
19268
  const ReferralTable_stories = {
20443
- title: "Components/Referral Table",
19269
+ title: "Referral Table",
20444
19270
  };
20445
19271
  const loadingElement = (h("div", { slot: "loading", style: { display: "contents" } },
20446
19272
  h("sqm-table-row", null,
@@ -20927,7 +19753,7 @@ const ReferralTable$1 = /*#__PURE__*/Object.freeze({
20927
19753
  });
20928
19754
 
20929
19755
  const ReferralTableCell_stories = {
20930
- title: "Components/Referral Table Cell",
19756
+ title: "Referral Table Cell",
20931
19757
  };
20932
19758
  const TableCell = () => {
20933
19759
  return (h("sqm-referral-table-cell", { innerTemplate: "Table Cell Text" }));
@@ -20970,991 +19796,102 @@ const rewardsData = {
20970
19796
  data: [
20971
19797
  {
20972
19798
  exchangedRewards: {
20973
- data: [
20974
- {
20975
- prettyValue: "19 Points",
20976
- type: "CREDIT",
20977
- fuelTankCode: "ABC",
20978
- globalRewardKey: "Key",
20979
- },
20980
- ],
20981
- },
20982
- },
20983
- ],
20984
- },
20985
- };
20986
- const rewards = [rewardsData];
20987
- const RewardsCell = () => {
20988
- return (h("sqm-referral-table-rewards-cell", { rewards: rewards }));
20989
- };
20990
-
20991
- const ReferralTableCell$1 = /*#__PURE__*/Object.freeze({
20992
- __proto__: null,
20993
- 'default': ReferralTableCell_stories,
20994
- TableCell: TableCell,
20995
- TableUserCell: TableUserCell,
20996
- EmptyCell: EmptyCell$1,
20997
- StatusCell: StatusCell,
20998
- DateCell: DateCell,
20999
- RewardsCell: RewardsCell
21000
- });
21001
-
21002
- const UserName_stories = {
21003
- title: "Tests/User Name",
21004
- };
21005
- const DemoData = () => {
21006
- return (h("sqm-user-name", { demoData: {
21007
- loading: false,
21008
- loadingText: "...",
21009
- username: "Test Testerson",
21010
- } }));
21011
- };
21012
- const Username = () => {
21013
- return h("sqm-user-name", null);
21014
- };
21015
-
21016
- const UserName = /*#__PURE__*/Object.freeze({
21017
- __proto__: null,
21018
- 'default': UserName_stories,
21019
- DemoData: DemoData,
21020
- Username: Username
21021
- });
21022
-
21023
- const PasswordField_stories = {
21024
- title: "Components/Portal Password Field",
21025
- };
21026
- const Start = () => {
21027
- return (h("sqm-password-field", { demoData: {
21028
- initValue: "",
21029
- states: {
21030
- enableValidation: true,
21031
- validationErrors: {},
21032
- content: {
21033
- fieldLabel: "Password",
21034
- },
21035
- },
21036
- } }));
21037
- };
21038
- const EmptyError = () => {
21039
- return (h("sqm-password-field", { demoData: {
21040
- initValue: "",
21041
- states: {
21042
- enableValidation: true,
21043
- validationErrors: { password: "Cannot be empty" },
21044
- content: {
21045
- fieldLabel: "Password",
21046
- },
21047
- },
21048
- } }));
21049
- };
21050
- const ValidationError = () => {
21051
- return (h("sqm-password-field", { demoData: {
21052
- initValue: "asdf",
21053
- states: {
21054
- enableValidation: true,
21055
- validationErrors: { password: "Incomplete" },
21056
- content: {
21057
- fieldLabel: "Password",
21058
- },
21059
- },
21060
- } }));
21061
- };
21062
-
21063
- const PasswordField = /*#__PURE__*/Object.freeze({
21064
- __proto__: null,
21065
- 'default': PasswordField_stories,
21066
- Start: Start,
21067
- EmptyError: EmptyError,
21068
- ValidationError: ValidationError
21069
- });
21070
-
21071
- /**
21072
- * Displays a cartesian product of the input props
21073
- *
21074
- * @returns
21075
- */
21076
- function MatrixStory({ matrix, props, Component, }) {
21077
- const propMatrix = Object.keys(matrix).map((propKey) => {
21078
- const propValues = matrix[propKey];
21079
- return propValues.map((val) => {
21080
- return {
21081
- [propKey]: val,
21082
- };
21083
- });
21084
- });
21085
- const combinations = cartesian(...propMatrix);
21086
- const propsCombinations = combinations.map((combo) => {
21087
- return combo.reduce((props, prop) => {
21088
- return {
21089
- ...props,
21090
- ...prop,
21091
- };
21092
- }, {});
21093
- });
21094
- return propsCombinations.map((combo) => {
21095
- const example = { ...props, ...combo };
21096
- return (h("div", null,
21097
- h(PropsTable, { values: example }),
21098
- h("hr", null),
21099
- " ",
21100
- h("br", null),
21101
- h(Component, Object.assign({}, example)),
21102
- h("br", null)));
21103
- });
21104
- }
21105
- function PropsTable({ values }) {
21106
- return (h("table", null,
21107
- h("tbody", null, Object.keys(values).map((key) => {
21108
- return (h("tr", null,
21109
- h("th", null, key),
21110
- h("td", null, JSON.stringify(values[key]))));
21111
- }))));
21112
- }
21113
- /**
21114
- * Source: https://stackoverflow.com/questions/15298912/javascript-generating-combinations-from-n-arrays-with-m-elements
21115
- *
21116
- * TODO: Could replace with a fork of https://www.npmjs.com/package/cartesian
21117
- *
21118
- * @param args - an array of arrays
21119
- * @returns combinations of the elements in those array
21120
- */
21121
- function cartesian(...args) {
21122
- var r = [], max = args.length - 1;
21123
- function helper(arr, i) {
21124
- for (var j = 0, l = args[i].length; j < l; j++) {
21125
- var a = arr.slice(0); // clone arr
21126
- a.push(args[i][j]);
21127
- if (i == max)
21128
- r.push(a);
21129
- else
21130
- helper(a, i + 1);
21131
- }
21132
- }
21133
- helper([], 0);
21134
- return r;
21135
- }
21136
-
21137
- const checkmark_circle = () => {
21138
- return (h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "18", height: "18", viewBox: "0 0 18 18" },
21139
- h("path", { fill: "currentColor", "fill-rule": "evenodd", d: "M1.636 9a7.364 7.364 0 1114.728 0A7.364 7.364 0 011.636 9zM9 0a9 9 0 100 18A9 9 0 009 0zm5.192 6.266a.982.982 0 00-1.548-1.208l-4.787 6.137-2.58-2.58a.982.982 0 00-1.39 1.388l3.367 3.366a.982.982 0 001.468-.09l5.47-7.013z", "clip-rule": "evenodd" })));
21140
- };
21141
- const arrow_left_right = () => {
21142
- return (h("svg", { width: 11, height: 12, fill: "none", xmlns: "http://www.w3.org/2000/svg" },
21143
- h("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M10.265 2.789a.346.346 0 000-.489L8.066.101a.346.346 0 10-.489.489l1.61 1.609H2.073a.691.691 0 00-.69.691v1.728a.346.346 0 00.69 0V2.89h7.114L7.577 4.5a.346.346 0 10.49.488l2.198-2.2zM.101 9.21a.346.346 0 000 .489l2.2 2.199a.346.346 0 00.488-.489l-1.61-1.609h7.114c.382 0 .691-.31.691-.691V7.382a.346.346 0 00-.691 0V9.11H1.18L2.789 7.5a.346.346 0 10-.489-.488l-2.199 2.2z", fill: "currentColor" })));
21144
- };
21145
-
21146
- const gift = () => {
21147
- return (h("svg", { width: 16, height: 16, fill: "none", xmlns: "http://www.w3.org/2000/svg" },
21148
- h("path", { d: "M15 5H9v11h4.5a1 1 0 001-1V9h.5a1 1 0 001-1V6a1 1 0 00-1-1zM1.5 9v6a1 1 0 001 1H7V5H1a1 1 0 00-1 1v2a1 1 0 001 1h.5z", fill: "var(--sl-color-primary-200)" }),
21149
- h("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M1.5 9v1h13V9h-13z", fill: "var(--sl-color-primary-300)" }),
21150
- h("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M14 2.71c0 .886-1.33 2.227-2 2.29H9v11H7.002V5H4.588C3.212 4.702 2 3.645 2 2.52 2 1.426 2.476.558 3.342.183 4.169-.176 5.125.02 5.88.545c.927.643 1.447 1.851 1.919 2.947l.123.286.12-.272C8.51 2.45 9.045 1.243 9.94.596c.793-.573 1.801-.79 2.672-.397.9.405 1.388 1.336 1.388 2.51zM10.612 1.5c.48-.347 1.056-.41 1.548 0 .428.357.45.525.506.93l.01.07c0 .599-.516 1.5-1.032 1.5-.366 0-.653-.003-.922-.006-.49-.005-.92-.01-1.657.006.14-.272.252-.533.36-.782.285-.667.534-1.246 1.187-1.718zm-5.673 0c-.233-.161-.766-.09-.987.006-.183.08-.456.32-.456 1.015 0 .674 1.092 1.257 1.092 1.257S5.454 4 7.002 4c-.527-1.305-1.273-1.951-2.063-2.5z", fill: "var(--sl-color-primary-600)" })));
21151
- };
21152
-
21153
- function ProgressBarView(props) {
21154
- const { progress = 0, goal = 1, steps = false, progressBarUnit = "", repeatable = false, expired = false, } = props;
21155
- console.log("progress bar props", props);
21156
- const gift1 = gift();
21157
- const gift2 = gift();
21158
- const gift3 = gift();
21159
- var items = [];
21160
- var columns = "";
21161
- var repetitions = Math.floor(progress / goal);
21162
- if (repeatable) {
21163
- if (steps) {
21164
- addStepsRepeatable();
21165
- }
21166
- else {
21167
- addLinearRepeatable();
21168
- }
21169
- }
21170
- // non repeatable
21171
- else {
21172
- if (steps) {
21173
- addSteps();
21174
- }
21175
- else {
21176
- addLinear();
21177
- }
21178
- }
21179
- const style = {
21180
- ProgressBar: {
21181
- "& .progress-bar": {
21182
- height: "15px",
21183
- marginTop: steps
21184
- ? "var(--sl-spacing-medium)"
21185
- : "var(--sl-spacing-large)",
21186
- filter: expired ? "grayscale(1)" : "",
21187
- marginBottom: "var(--sl-spacing-xx-large)",
21188
- marginRight: "var(--sl-spacing-x-small)",
21189
- fontSize: "var(--sl-font-size-x-small)",
21190
- display: "grid",
21191
- gridTemplateColumns: columns,
21192
- lineHeight: "45px",
21193
- userSelect: "none",
21194
- },
21195
- "& .progress-bar.repeatable-steps": {
21196
- marginLeft: "var(--sl-spacing-x-small)",
21197
- },
21198
- "& .filled:after": {
21199
- content: '""',
21200
- display: "flex",
21201
- width: "100%",
21202
- height: "4px",
21203
- borderRadius: "4px",
21204
- backgroundColor: "var(--sl-color-primary-300)",
21205
- },
21206
- "& .progress": {
21207
- display: "block",
21208
- textAlign: "center",
21209
- marginLeft: "-100px",
21210
- marginRight: "-100px",
21211
- },
21212
- "& .progress::after": {
21213
- content: '""',
21214
- width: "12px",
21215
- height: "12px",
21216
- display: "flex",
21217
- backgroundColor: "var(--sl-color-primary-300)",
21218
- borderRadius: "50%",
21219
- position: "relative",
21220
- left: "47%",
21221
- top: "-85%",
21222
- },
21223
- "& .progress.bg:after": {
21224
- width: "0",
21225
- height: "0",
21226
- border: "none",
21227
- },
21228
- "& .progress.top": {
21229
- position: "relative",
21230
- top: "-40px",
21231
- },
21232
- "& .progress.top:after": {
21233
- top: "-16%",
21234
- },
21235
- "& .empty": {
21236
- display: "block",
21237
- textAlign: "center",
21238
- marginLeft: "-100px",
21239
- marginRight: "-100px",
21240
- },
21241
- "& .empty::after": {
21242
- content: '""',
21243
- width: "12px",
21244
- height: "12px",
21245
- border: "2px solid #E0E0E0",
21246
- margin: "-2px",
21247
- display: "flex",
21248
- backgroundColor: "white",
21249
- borderRadius: "50%",
21250
- position: "relative",
21251
- left: "47%",
21252
- top: "-85%",
21253
- },
21254
- "& .empty.bg:after": {
21255
- width: "0",
21256
- height: "0",
21257
- border: "none",
21258
- },
21259
- "& .remain:after": {
21260
- content: '""',
21261
- display: "flex",
21262
- width: "100%",
21263
- height: "4px",
21264
- borderRadius: "4px",
21265
- backgroundColor: "#E0E0E0",
21266
- },
21267
- "& .gift.bw": {
21268
- filter: "grayscale(100%)",
21269
- },
21270
- "& .gift.start": {
21271
- transform: "scale(80%)",
21272
- top: "-20px",
21273
- },
21274
- "& .gift": {
21275
- textAlign: "center",
21276
- marginLeft: "-100px",
21277
- marginRight: "-100px",
21278
- position: "relative",
21279
- display: "list-item",
21280
- listStyleType: "none",
21281
- top: "-18px",
21282
- filter: goal <= progress ? "" : "grayscale(100%)",
21283
- zIndex: "1",
21284
- },
21285
- },
21286
- };
21287
- jss.setup(create());
21288
- const sheet = jss.createStyleSheet(style);
21289
- const styleString = sheet.toString();
21290
- return (h("div", { class: sheet.classes.ProgressBar },
21291
- h("style", { type: "text/css" }, styleString),
21292
- h("div", { class: repetitions > 1 ? "progress-bar repeatable-steps" : "progress-bar" }, items)));
21293
- function clamp(x, min, max) {
21294
- return Math.min(Math.max(x, min), max);
21295
- }
21296
- function addLinear() {
21297
- const ratio = progress / goal;
21298
- columns =
21299
- clamp(ratio, 0, 1) + "fr 0fr " + clamp(1 - ratio, 0, 1) + "fr 0fr 0fr";
21300
- items.push(h("div", { class: "filled" }));
21301
- items.push(h("div", { class: clamp(progress, 0, goal) == goal ? "progress top bg" : "progress top" }, clamp(progress, 0, goal) == goal
21302
- ? ""
21303
- : progressBarUnit + clamp(progress, 0, goal)));
21304
- items.push(h("div", { class: "remain" }));
21305
- items.push(h("div", { class: "progress bg" }, progressBarUnit + goal));
21306
- items.push(h("div", { class: "gift" }, gift1));
21307
- }
21308
- function addSteps() {
21309
- let ratio = 1 / goal;
21310
- for (let i = 1; i < goal; i++) {
21311
- columns += ratio + "fr 0fr ";
21312
- if (i > progress) {
21313
- items.push(h("div", { class: "remain" }));
21314
- items.push(h("div", { class: "empty" }, i));
21315
- }
21316
- else {
21317
- items.push(h("div", { class: "filled" }));
21318
- items.push(h("div", { class: "progress" }, i));
21319
- }
21320
- }
21321
- columns += ratio + "fr 0fr ";
21322
- // reward success
21323
- if (goal <= progress) {
21324
- columns += "0fr ";
21325
- items.push(h("div", { class: "filled" }));
21326
- items.push(h("div", { class: "progress bg" }, goal));
21327
- items.push(h("div", { class: "gift" }, gift1));
21328
- }
21329
- // reward fail
21330
- else {
21331
- columns += "0fr ";
21332
- items.push(h("div", { class: "remain" }));
21333
- items.push(h("div", { class: "empty bg" }, goal));
21334
- items.push(h("div", { class: "gift" }, gift1));
21335
- }
21336
- }
21337
- function addLinearRepeatable() {
21338
- let repetitions = Math.floor(progress / goal);
21339
- let ratio = ((progress % goal) / goal) * 0.5;
21340
- // 0 repetition
21341
- if (repetitions == 0) {
21342
- columns = ratio + "fr 0fr " + (0.5 - ratio) + "fr 0fr 0fr 0.5fr 0fr 0fr";
21343
- items.push(h("div", { class: "filled" }));
21344
- items.push(h("div", { class: progress == goal ? "progress top bg" : "progress top" }, progressBarUnit + progress));
21345
- items.push(h("div", { class: "remain" }));
21346
- items.push(h("div", { class: "progress bg" }, progressBarUnit + goal));
21347
- items.push(h("div", { class: "gift" }, gift1));
21348
- items.push(h("div", { class: "remain" }));
21349
- items.push(h("div", { class: "progress bg" }, progressBarUnit + goal * 2));
21350
- items.push(h("div", { class: "gift bw" }, gift2));
21351
- }
21352
- // single repetition
21353
- else if (repetitions == 1) {
21354
- columns =
21355
- "0.5fr 0fr 0fr " + ratio + "fr 0fr " + (0.5 - ratio) + "fr 0fr 0fr";
21356
- items.push(h("div", { class: "filled" }));
21357
- items.push(h("div", { class: "progress bg" }, progressBarUnit + goal));
21358
- items.push(h("div", { class: "gift" }, gift1));
21359
- items.push(h("div", { class: "filled" }));
21360
- items.push(h("div", { class: progress == goal ? "progress top bg" : "progress top" }, progress == goal ? "" : progressBarUnit + progress));
21361
- items.push(h("div", { class: "remain" }));
21362
- items.push(h("div", { class: "progress bg" }, progressBarUnit + goal * 2));
21363
- items.push(h("div", { class: "gift bw" }, gift2));
21364
- }
21365
- // multiple repetitions
21366
- else {
21367
- columns =
21368
- "0fr 0fr 0.5fr 0fr 0fr " +
21369
- ratio +
21370
- "fr 0fr " +
21371
- (0.5 - ratio) +
21372
- "fr 0fr 0fr";
21373
- items.push(h("div", { class: "progress bg" }, progressBarUnit + goal * (repetitions - 1)));
21374
- items.push(h("div", { class: "gift start" }, gift1));
21375
- items.push(h("div", { class: "filled" }));
21376
- items.push(h("div", { class: "progress bg" }, progressBarUnit + goal * repetitions));
21377
- items.push(h("div", { class: "gift" }, gift2));
21378
- items.push(h("div", { class: "filled" }));
21379
- items.push(h("div", { class: progress == goal * repetitions ? "progress top bg" : "progress top" }, progress == goal * repetitions ? "" : progressBarUnit + progress));
21380
- items.push(h("div", { class: "remain" }));
21381
- items.push(h("div", { class: "progress bg" }, progressBarUnit + goal * (repetitions + 1)));
21382
- items.push(h("div", { class: "gift bw" }, gift3));
21383
- }
21384
- }
21385
- function addStepsRepeatable() {
21386
- let repetitions = Math.floor(progress / goal);
21387
- // no or single repetition
21388
- if (repetitions < 2) {
21389
- let ratio = 1 / goal;
21390
- for (let i = 1; i < goal * 2 + 1; i++) {
21391
- columns += ratio + "fr 0fr ";
21392
- if (i > progress) {
21393
- if (i == goal) {
21394
- columns += "0fr ";
21395
- items.push(h("div", { class: "remain" }));
21396
- items.push(h("div", { class: "empty bg" }, goal));
21397
- items.push(h("div", { class: "gift bw" }, gift1));
21398
- }
21399
- else if (i == goal * 2) {
21400
- columns += "0fr 0fr";
21401
- items.push(h("div", { class: "remain" }));
21402
- items.push(h("div", { class: "empty bg" }, goal * 2));
21403
- items.push(h("div", { class: "gift bw" }, gift2));
21404
- }
21405
- else {
21406
- items.push(h("div", { class: "remain" }));
21407
- items.push(h("div", { class: "empty" }, i));
21408
- }
21409
- }
21410
- else if (i == goal) {
21411
- columns += "0fr ";
21412
- items.push(h("div", { class: "filled" }));
21413
- items.push(h("div", { class: "progress bg" }, i));
21414
- items.push(h("div", { class: "gift" }, gift3));
21415
- }
21416
- else {
21417
- items.push(h("div", { class: "filled" }));
21418
- items.push(h("div", { class: "progress" }, i));
21419
- }
21420
- }
21421
- }
21422
- // case repetition many
21423
- else {
21424
- let position = (progress % goal) + goal;
21425
- let ratio = 1 / goal;
21426
- columns += "0fr 0fr ";
21427
- items.push(h("div", { class: "progress bg" }, goal * (repetitions - 1)));
21428
- items.push(h("div", { class: "gift start" }, gift1));
21429
- for (let i = 1; i < goal * 2 + 1; i++) {
21430
- columns += ratio + "fr 0fr ";
21431
- if (i <= goal) {
21432
- if (i == goal) {
21433
- columns += "0fr ";
21434
- items.push(h("div", { class: "filled" }));
21435
- items.push(h("div", { class: "progress bg" }, i + goal * (repetitions - 1)));
21436
- items.push(h("div", { class: "gift" }, gift2));
21437
- }
21438
- else {
21439
- items.push(h("div", { class: "filled" }));
21440
- items.push(h("div", { class: "progress" }, i + goal * (repetitions - 1)));
21441
- }
21442
- }
21443
- else if (i > position) {
21444
- if (i == goal * 2) {
21445
- columns += "0fr 0fr";
21446
- items.push(h("div", { class: "remain" }));
21447
- items.push(h("div", { class: "empty bg" }, i + goal * (repetitions - 1)));
21448
- items.push(h("div", { class: "gift bw" }, gift3));
21449
- }
21450
- else {
21451
- items.push(h("div", { class: "remain" }));
21452
- items.push(h("div", { class: "empty" }, i + goal * (repetitions - 1)));
21453
- }
21454
- }
21455
- else {
21456
- items.push(h("div", { class: "filled" }));
21457
- items.push(h("div", { class: "progress" }, i + goal * (repetitions - 1)));
21458
- }
21459
- }
21460
- }
21461
- }
21462
- }
21463
-
21464
- function TaskCardView(props) {
21465
- console.log({ props });
21466
- const checkmark_circle$1 = checkmark_circle();
21467
- const arrow_left_right$1 = arrow_left_right();
21468
- const style = {
21469
- HostBlock: HostBlock,
21470
- TaskCard: {
21471
- "& .main > div": {
21472
- margin: "var(--sl-spacing-medium)",
21473
- },
21474
- "& .main": {
21475
- position: "relative",
21476
- boxSizing: "border-box",
21477
- minWidth: "347px",
21478
- background: "var(--sl-color-neutral-0)",
21479
- border: "1px solid var(--sl-color-neutral-300)",
21480
- borderRadius: "var(--sl-border-radius-medium)",
21481
- fontSize: "var(--sl-font-size-small)",
21482
- lineHeight: "var(--sl-line-height-dense)",
21483
- color: "var(--sl-color-neutral-600)",
21484
- },
21485
- "& .main.complete": {
21486
- background: "var(--sl-color-success-50)",
21487
- borderColor: "var(--sl-color-success-700)",
21488
- },
21489
- "& .main.expired": {
21490
- color: "var(--sl-color-neutral-400)",
21491
- background: "var(--sl-color-neutral-50)",
21492
- },
21493
- "& .title": {
21494
- fontSize: "var(--sl-font-size-small)",
21495
- fontWeight: "var(--sl-font-weight-semibold)",
21496
- },
21497
- "& .black": {
21498
- color: "var(--sl-color-neutral-1000)",
21499
- },
21500
- },
21501
- Header: {
21502
- display: "flex",
21503
- "& .icon": {
21504
- alignSelf: "center",
21505
- lineHeight: "0",
21506
- color: "var(--sl-color-success-700)",
21507
- fontSize: "var(--sl-font-size-large)",
21508
- marginRight: "var(--sl-spacing-x-small)",
21509
- },
21510
- "& .value": {
21511
- alignSelf: "center",
21512
- fontSize: "var(--sl-font-size-x-large)",
21513
- fontWeight: "var(--sl-font-weight-semibold)",
21514
- lineHeight: "100%",
21515
- marginRight: "var(--sl-spacing-xx-small)",
21516
- },
21517
- "& .text": {
21518
- alignSelf: "end",
21519
- textTransform: "uppercase",
21520
- fontSize: "var(--sl-font-size-x-small)",
21521
- lineHeight: "var(--sl-font-size-medium)",
21522
- marginRight: "var(--sl-spacing-xx-small)",
21523
- },
21524
- "& .end": {
21525
- color: "var(--sl-color-warning-500)",
21526
- fontWeight: "var(--sl-font-weight-semibold)",
21527
- marginBottom: "var(--sl-spacing-xx-small)",
21528
- },
21529
- "& .black": {
21530
- color: "var(--sl-color-neutral-1000)",
21531
- },
21532
- "& .neutral": {
21533
- color: "var(--sl-color-neutral-400)",
21534
- },
21535
- },
21536
- Footer: {
21537
- display: "flex",
21538
- "& .icon": {
21539
- fontSize: "var(--sl-font-size-xx-small)",
21540
- marginRight: "var(--sl-spacing-xx-small)",
21541
- },
21542
- "& .text": {
21543
- marginTop: "auto",
21544
- verticalAlign: "text-bottom",
21545
- fontSize: "var(--sl-font-size-x-small)",
21546
- },
21547
- "& .success": {
21548
- color: "var(--sl-color-success-600)",
21549
- fontWeight: "var(--sl-font-weight-semibold)",
21550
- },
21551
- "& .action": {
21552
- marginTop: "auto",
21553
- marginLeft: "auto",
21554
- "&::part(base)": {
21555
- color: "var(--sl-color-neutral-0)",
21556
- borderRadius: "var(--sl-border-radius-medium)",
21557
- },
21558
- "&.disabled::part(base)": {
21559
- border: "1px solid var(--sl-color-neutral-400)",
21560
- background: "var(--sl-color-neutral-400)",
21561
- },
21562
- },
21563
- "& .neutral": {
21564
- color: "var(--sl-color-neutral-400)",
21565
- },
21566
- },
21567
- };
21568
- jss.setup(create());
21569
- const sheet = jss.createStyleSheet(style);
21570
- const styleString = sheet.toString();
21571
- const showComplete = props.progress >= props.goal;
21572
- const repetitions = props.showProgressBar
21573
- ? Math.floor(props.progress / props.goal)
21574
- : props.progress;
21575
- const dateStart = props.showExpiry && luxon.DateTime.fromISO(props.rewardDuration.split("/")[0]);
21576
- const dateEnd = props.showExpiry && luxon.DateTime.fromISO(props.rewardDuration.split("/")[1]);
21577
- const dateToday = luxon.DateTime.now();
21578
- const taskComplete = showComplete && props.repeatable === false;
21579
- const taskUnavailable = props.showExpiry && (dateEnd < dateToday || dateToday < dateStart);
21580
- return (h("div", { class: sheet.classes.TaskCard },
21581
- h("div", { class: taskUnavailable
21582
- ? "main expired"
21583
- : taskComplete
21584
- ? "main complete"
21585
- : "main" },
21586
- h("style", { type: "text/css" }, styleString),
21587
- h("div", { class: sheet.classes.Header }, props.loading ? (h("sl-skeleton", { style: { width: "22%", margin: "0", height: "12px" } })) : (h("div", null,
21588
- taskUnavailable && (h("div", { class: "end" }, "Available " +
21589
- dateStart.toLocaleString(luxon.DateTime.DATE_MED).split(",")[0] +
21590
- " - " +
21591
- dateEnd.toLocaleString(luxon.DateTime.DATE_MED).split(",")[0])),
21592
- showComplete && (h("span", { class: taskUnavailable ? "icon neutral" : "icon" }, checkmark_circle$1)),
21593
- h("span", { class: taskUnavailable ? "value" : "value black" }, props.rewardAmount),
21594
- h("span", { class: "text" }, props.rewardUnit)))),
21595
- props.loading ? (h("sl-skeleton", { style: { width: "42%", margin: "0 16px", height: "12px" } })) : (h("div", { class: taskUnavailable ? "title" : "title black" }, props.cardTitle)),
21596
- props.loading ? (h("sl-skeleton", { style: { margin: "12px 16px", height: "12px" } })) : (h(Details, Object.assign({}, props))),
21597
- props.showProgressBar && props.loading ? (h("sl-skeleton", { style: { margin: "0 16px", height: "12px" } })) : (props.showProgressBar && (h(ProgressBarView, Object.assign({}, props, { complete: taskComplete, expired: taskUnavailable })))),
21598
- h("div", { class: sheet.classes.Footer }, props.loading ? (h("sl-skeleton", { style: { width: "25%", marginLeft: "auto", height: "12px" } })) : (h("div", { style: { display: "contents" } },
21599
- h("span", { class: "text" },
21600
- props.repeatable && (h("div", null,
21601
- h("span", { class: repetitions > 0
21602
- ? taskUnavailable
21603
- ? "icon neutral"
21604
- : "icon success"
21605
- : "icon" }, arrow_left_right$1),
21606
- h("span", { class: repetitions > 0
21607
- ? taskUnavailable
21608
- ? "neutral"
21609
- : "success"
21610
- : "" }, "Completed " + repetitions + " times"))),
21611
- props.showExpiry && !taskUnavailable && (h("span", null, "Ends " + dateEnd.toLocaleString(luxon.DateTime.DATE_FULL)))),
21612
- h("sl-button", { class: taskComplete || taskUnavailable ? "action disabled" : "action", type: "primary", size: "small", onClick: () => props.openNewTab
21613
- ? window.open(props.buttonLink)
21614
- : window.open(props.buttonLink, "_self"), disabled: taskComplete || taskUnavailable }, props.buttonText)))))));
21615
- }
21616
- function Details(props) {
21617
- const style = {
21618
- Description: {
21619
- "& input[type=checkbox]": {
21620
- display: "none",
21621
- },
21622
- "& input:checked ~ .details": {
21623
- transform: "rotate(-180deg)",
21624
- },
21625
- "& .details": {
21626
- position: "absolute",
21627
- top: "var(--sl-spacing-medium)",
21628
- right: "var(--sl-spacing-medium)",
21629
- color: "var(--sl-color-neutral-700)",
21630
- fontSize: "var(--sl-font-size-large)",
21631
- "& :hover": {
21632
- color: "var(--sl-color-primary-700)",
19799
+ data: [
19800
+ {
19801
+ prettyValue: "19 Points",
19802
+ type: "CREDIT",
19803
+ fuelTankCode: "ABC",
19804
+ globalRewardKey: "Key",
19805
+ },
19806
+ ],
21633
19807
  },
21634
- transformOrigin: "50% 37%",
21635
- transition: "transform var(--sl-transition-medium) ease",
21636
19808
  },
21637
- "& input:checked ~ .summary": {
21638
- transition: "all var(--sl-transition-medium) ease",
21639
- maxHeight: "300px",
21640
- marginBottom: props.steps
21641
- ? "var(--sl-spacing-large)"
21642
- : props.showProgressBar
21643
- ? "var(--sl-spacing-xx-large)"
21644
- : "var(--sl-spacing-large)",
21645
- },
21646
- "& .summary": {
21647
- display: "block",
21648
- overflow: "hidden",
21649
- fontSize: "var(--sl-font-size-small)",
21650
- maxHeight: "0px",
21651
- transition: "all var(--sl-transition-fast) ease-out",
21652
- marginBottom: "var(--sl-spacing-medium)",
21653
- },
21654
- },
21655
- };
21656
- jss.setup(create());
21657
- const sheet = jss.createStyleSheet(style);
21658
- const styleString = sheet.toString();
21659
- const rid = Math.random().toString(36).slice(2);
21660
- return (h("div", null,
21661
- h("style", { type: "text/css" }, styleString),
21662
- h("span", { class: sheet.classes.Description },
21663
- h("input", { type: "checkbox", id: "details-" + rid }),
21664
- h("label", { class: "details", htmlFor: "details-" + rid },
21665
- h("sl-icon", { name: "chevron-down" })),
21666
- h("span", { class: "summary" }, props.description))));
21667
- }
21668
-
21669
- const scenarioTaskCard = "@author:derek\r\n@owner:\r\nFeature: Task Card\r\n\r\n\tScenario: A header, body title, description and a CTA button are always displayed\r\n\t\tGiven the Task Card is configured with the following props\r\n\t\t\t| prop | value |\r\n\t\t\t| rewardAmount | \"40\" |\r\n\t\t\t| rewardUnit | \"Points\" |\r\n\t\t\t| cardTitle | Complete a survey |\r\n\t\t\t| description | Fill out our survey form and receive points! |\r\n\t\t\t| buttonText | Take Survey |\r\n\t\t\t| buttonLink | https://example.com/ |\r\n\t\tWhen a user views the Task Card\r\n\t\tThen they see \"40 Points\" as the heading\r\n\t\tAnd the \"40\" is bolded\r\n\t\tAnd they see \"Complete a survey\" bolded in the body\r\n\t\tAnd a details icon in the top right hand corner\r\n\t\tAnd a button with text \"Take Survey\" in the bottom right hand corner\r\n\t\tWhen they click the button\r\n\t\tThen they are redirected to \"example.com\" in a new window\r\n\t\tWhen they click the details icon\r\n\t\tThen \"Fill out our survey form and receive points!\" is shown as the card description\r\n\r\n\tScenario: A loading state is displayed while the Task Card is loading\r\n\t\tGiven a Task Card component\r\n\t\tWhen a user views the Task Card\r\n\t\tThen a loading state is displayed\r\n\t\tWhen the Task Card has loaded\r\n\t\tThen the loading state disapears\r\n\r\n\tScenario Outline: The Progress Bar can be shown or hidden but is hidden by default\r\n\t\tGiven a Task Card component\r\n\t\tAnd it <mayHave> \"showProgressBar\" <value>\r\n\t\tWhen a user views the Task Card\r\n\t\tThen the progress bar <mayBe> displayed\r\n\t\tExamples:\r\n\t\t\t| mayHave | value | mayBe |\r\n\t\t\t| has | true | is |\r\n\t\t\t| has | false | isn't |\r\n\t\t\t| doesn't have | | isn't |\r\n\r\n\tScenario Outline: Tasks can be repeatable or one-time only but are one-time only be default\r\n\t\tGiven a Task Card component\r\n\t\tAnd it <mayHave> \"repeatable\" <value>\r\n\t\tAnd a user who has already completed the task\r\n\t\tWhen they views the Task Card\r\n\t\tThen they see a green checkmark icon beside the card heading\r\n\t\tAnd the card <mayBe> green\r\n\t\tAnd the card's border <mayBe> green\r\n\t\tAnd the CTA button <mayBe> disabled\r\n\t\tAnd the CTA button <mayBe> grey\r\n\t\tExamples:\r\n\t\t\t| mayHave | value | mayBe |\r\n\t\t\t| has | true | isn't |\r\n\t\t\t| has | false | is |\r\n\t\t\t| doesn't have | | is |\r\n\r\n\tScenario: Task Expiries can be configured and disable the CTA after the expiry\r\n\t\tGiven a Task Card component\r\n\t\tAnd it is configured for <expiry>\r\n\t\tWhen a user views the Card on <day>\r\n\t\tThen they the expiry on <cardLocation>\r\n\t\tAnd the text <mayBe> orange\r\n\t\tAnd the card <mayBe> disabled\r\n\t\tAnd the card <mayBe> grey\r\n\t\tAnd the user <mayBe> unable to complete the loyalty task\r\n\t\tExamples:\r\n\t\t\t| expiry | day | cardLocation | mayBe |\r\n\t\t\t| Dec 31 2021 11:59:59 | Dec 1st 2021 12:00:00 | bottom left | isn't |\r\n\t\t\t| Dec 31 2021 11:59:59 | Dec 31 2021 11:00:00 | top right | isn't |\r\n\t\t\t| Dec 31 2021 11:59:59 | Jan 15th 2022 10:00:00 | top right | is |\r\n\r\n\tScenario Outline: Task expiry can be hidden or shown but is hidden by default\r\n\t\tGiven a Task Card\r\n\t\tAnd it is configured with an expiry\r\n\t\tAnd it <mayHave> \"showExpiry\" <value>\r\n\t\tWhen a user views the Task card\r\n\t\tThen the expiry <mayBe> shown in the bottom left hand corner\r\n\t\tExamples:\r\n\t\t\t| mayHave | value | mayBe |\r\n\t\t\t| has | true | is |\r\n\t\t\t| has | false | isn't |\r\n\t\t\t| doesn't have | | isn't |\r\n\r\n\t#DS: Currently this text is non configurable and isnt set up for proper pluralization\r\n\tScenario Outline: A task completion count is displayed for repeatable tasks\r\n\t\tGiven a Task Card is configured for a repeatable task\r\n\t\tAnd has \"goalCompletionNumber\" <goalCompletionNumberValue>\r\n\t\tAnd a user with <userGoalProgress>\r\n\t\tWhen the user views the task card\r\n\t\tThen they see a repeat icon\r\n\t\tAnd the <text> in the bottom left hand corner\r\n\t\tAnd the <text> is green\r\n\t\tExamples:\r\n\t\t\t| goalCompletionNumber | userGoalProgress | text |\r\n\t\t\t| 1 | 0 | Completed 0 times |\r\n\t\t\t| 1 | 1 | Completed 1 times |\r\n\t\t\t| 1 | 2 | Completed 2 times |\r\n\t\t\t| 10 | 5 | Completed 0 times |\r\n\t\t\t| 10 | 12 | Completed 1 times |\r\n\t\t\t| 10 | 29 | Completed 2 times |\r\n\r\n\tScenario Outline: The source of a user's progress can be a custom field or a program goal\r\n\t\tGiven a Task Card is configured to have <progressSourcePath> progress source\r\n\t\tAnd a user\r\n\t\tWhen they view the Task card\r\n\t\tThen the value at <progressSourcePath> is used to benchmark their progress against the Goal Completion Count\r\n\t\tExamples:\r\n\t\t\t| value |\r\n\t\t\t| /customFields/activityCount |\r\n\t\t\t| /customFields/purchaseTotal |\r\n\t\t\t| /programGoals/count%2FComment-on-Article |\r\n\t\t\t| /programGoals/count/Referral-Started%2Freferrals |\r\n\r\n\tScenario Outline: The users completion of a goal is calculated by the Goal Completion Number\r\n\t\tGiven a Task Card is configured to have <goalValue>\r\n\t\tAnd a user who has <progressValue>\r\n\t\tWhen they view the Task Card\r\n\t\tThen they are shown to have <progressValue> towards <goalValue>\r\n\t\tWhen their progress grows larger than <goalValue>\r\n\t\tThen the task is marked as completed\r\n\t\tExamples:\r\n\t\t\t| goalValue | progressValue |\r\n\t\t\t| 1 | 0 |\r\n\t\t\t| 10 | 9 |\r\n\t\t\t| 5 | 2 |\r\n\r\n\tScenario: The Goal Completion Number defaults to 1\r\n\t\tGiven a Task Card without a configured \"goalCompletionNumber\"\r\n\t\tAnd a user who has <progressValue>\r\n\t\tWhen they view the Task Card\r\n\t\tThen it <mayBe> marked as completed\r\n\t\tExamples:\r\n\t\t\t| progressValue | mayBe |\r\n\t\t\t| 0 | isn't |\r\n\t\t\t| 1 | is |\r\n\t\t\t| 2 | is |";
21670
-
21671
- const scenarioProgressBar = "@author:\r\n@owner:\r\nFeature: Task Card Progress Bar\r\n\r\n\tScenario Outline: Progress Bar\r\n\r\n\t\tGiven a Task Card component\r\n\t\tAnd progress is <progress>\r\n\t\tAnd goal is <goal>\r\n\t\tThen I have <progressBar>\r\n\t\tAnd <progressBar> shows <progress> with <unit> above\r\n\t\tAnd gift icon has <color>\r\n\t\tAnd gift icon shows <goal> with <unit> below\r\n\r\n\t\tExamples:\r\n\t\t\t| progress | goal | progressBar | unit | color |\r\n\t\t\t| -100 | 500 | ●――――――――――――――――――🎁 | $ | no |\r\n\t\t\t| 0 | 500 | ●――――――――――――――――――🎁 | $ | no |\r\n\t\t\t| 250 | 500 | ―――――――――●―――――――――🎁 | $ | no |\r\n\t\t\t| 500 | 500 | ―――――――――――――――――――🎁 | $ | yes |\r\n\t\t\t| 1000 | 500 | ―――――――――――――――――――🎁 | $ | yes |\r\n\r\n\tScenario Outline: Progress Bar Steps\r\n\r\n\t\tGiven a Task Card component\r\n\t\tAnd progress is <progress>\r\n\t\tAnd goal is <goal>\r\n\t\tAnd steps is enabled\r\n\t\tThen I have <progressBar>\r\n\t\tAnd <progressBar> has incrementing steps from 1 to <goal>\r\n\t\tAnd gift icon has <color>\r\n\t\tAnd gift icon shows <goal> below\r\n\r\n\t\tExamples:\r\n\t\t\t| progress | goal | progressBar | color |\r\n\t\t\t| -1 | 5 | ―――○―――○―――○―――○―――🎁 | no |\r\n\t\t\t| 0 | 5 | ―――○―――○―――○―――○―――🎁 | no |\r\n\t\t\t| 1 | 5 | ―――●―――○―――○―――○―――🎁 | no |\r\n\t\t\t| 5 | 5 | ―――○―――○―――○―――●―――🎁 | yes |\r\n\t\t\t| 7 | 5 | ―――○―――○―――○―――●―――🎁 | yes |\r\n\r\n\r\n\tScenario Outline: Progress Bar Repeatable\r\n\r\n\t\tGiven a Task Card component\r\n\t\tAnd progress is <progress>\r\n\t\tAnd goal is <goal>\r\n\t\tAnd it is repeatable\r\n\t\tThen I have <progressBar>\r\n\t\tAnd <progressBar> shows <progress> with <unit> above\r\n\t\tAnd <icon1> is <color1> with <text1> displayed below\r\n\t\tAnd <icon2> is <color2> with <text2> displayed below\r\n\t\tAnd <icon3> is <color3> with <text3> displayed below\r\n\r\n\t\tExamples:\r\n\t\t\t| progress | goal | progressBar | unit | icon1 | color1 | text1 | icon2 | color2 | text 2 | icon3 | color3 | text 1 | text 3 |\r\n\t\t\t| 250 | 500 | ――――●――――🎁―――――――🎁 | $ | NA | NA | NA | gift | greyscale | 500 | gift | greyscale | NA | 1000 |\r\n\t\t\t| 500 | 500 | ―――――――――🎁―――――――🎁 | $ | NA | NA | NA | gift | colorful | 500 | gift | greyscale | NA | 1000 |\r\n\t\t\t| 750 | 500 | ―――――――――🎁―――●―――🎁 | $ | NA | NA | NA | gift | colorful | 500 | gift | greyscale | NA | 1000 |\r\n\t\t\t| 1000 | 500 | 🎁―――――――🎁―――――――🎁 | $ | gift | colorful | 500 | gift | colorful | 1000 | gift | greyscale | 500 | 1500 |\r\n\t\t\t| 1250 | 500 | 🎁―――――――🎁―――●―――🎁 | $ | gift | colorful | 500 | gift | colorful | 1000 | gift | greyscale | 500 | 1500 |\r\n\r\n\tScenario Outline: Progress Bar Steps Repeatable\r\n\r\n\t\tGiven a Task Card component\r\n\t\tAnd progress is <progress>\r\n\t\tAnd goal is <goal>\r\n\t\tAnd steps is enabled\r\n\t\tAnd it is repeatable\r\n\t\tThen I have <progressBar>\r\n\r\n\t\tExamples:\r\n\t\t\t| progress | goal | progressBar |";
21672
-
21673
- const scenario$5 = scenarioTaskCard + scenarioProgressBar;
21674
- const TaskCard_stories = {
21675
- title: "Components/Task Card/",
21676
- parameters: {
21677
- scenario: scenario$5,
19809
+ ],
21678
19810
  },
21679
19811
  };
21680
- const storyFrame = {
21681
- display: "inline-flex",
21682
- gap: "32px",
21683
- };
21684
- const resizable = {
21685
- width: "347px",
21686
- minWidth: "347px",
21687
- resize: "horizontal",
21688
- height: "fit-content",
21689
- overflow: "hidden",
21690
- };
21691
- const oneAction = {
21692
- rewardAmount: 20,
21693
- rewardUnit: "SaaSquatch Points",
21694
- cardTitle: "Complete a survey",
21695
- description: "Description of action and reward. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut eget quisque commodo leo.",
21696
- repeatable: false,
21697
- showProgressBar: false,
21698
- progress: 0,
21699
- goal: 1,
21700
- buttonText: "Take survey",
21701
- buttonLink: "https://example.com/",
21702
- openNewTab: false,
21703
- showExpiry: false,
21704
- rewardDuration: null,
21705
- loading: false,
21706
- };
21707
- const coupleActions = {
21708
- rewardAmount: 40,
21709
- rewardUnit: "SaaSquatch Points",
21710
- cardTitle: "Comment on 5 articles",
21711
- description: "Description of action and reward. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut eget quisque commodo leo.",
21712
- repeatable: false,
21713
- showProgressBar: true,
21714
- steps: true,
21715
- progress: 1,
21716
- goal: 5,
21717
- buttonText: "Take survey",
21718
- buttonLink: "https://example.com/",
21719
- openNewTab: false,
21720
- showExpiry: false,
21721
- rewardDuration: null,
21722
- loading: false,
21723
- };
21724
- const manyActions = {
21725
- rewardAmount: 150,
21726
- rewardUnit: "SaaSquatch Points",
21727
- cardTitle: "Spend $500 at our Store",
21728
- description: "Description of action and reward. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut eget quisque commodo leo.",
21729
- repeatable: false,
21730
- showProgressBar: true,
21731
- progress: 100,
21732
- goal: 500,
21733
- progressBarUnit: "$",
21734
- buttonText: "Take survey",
21735
- buttonLink: "https://example.com/",
21736
- openNewTab: false,
21737
- showExpiry: false,
21738
- rewardDuration: null,
21739
- loading: false,
21740
- };
21741
- const TaskCardNotRepeatable = () => {
21742
- return (h("div", { style: storyFrame },
21743
- h("div", { style: resizable },
21744
- h("h4", null, "One Action"),
21745
- h(TaskCardView, Object.assign({}, oneAction, { progress: 0 })),
21746
- " ",
21747
- h("h5", null),
21748
- h(TaskCardView, Object.assign({}, oneAction, { progress: 1 })),
21749
- " ",
21750
- h("h5", null)),
21751
- h("div", { style: resizable },
21752
- h("h4", null, "A Couple Actions"),
21753
- h(TaskCardView, Object.assign({}, coupleActions, { progress: 1 })),
21754
- " ",
21755
- h("h5", null),
21756
- h(TaskCardView, Object.assign({}, coupleActions, { progress: 5 })),
21757
- " ",
21758
- h("h5", null)),
21759
- h("div", { style: resizable },
21760
- h("h4", null, "Many Actions"),
21761
- h(TaskCardView, Object.assign({}, manyActions, { progress: 230 })),
21762
- " ",
21763
- h("h5", null),
21764
- h(TaskCardView, Object.assign({}, manyActions, { progress: 500 })),
21765
- " ",
21766
- h("h5", null))));
21767
- };
21768
- const TaskCardRepeatable = () => {
21769
- return (h("div", { style: storyFrame },
21770
- h("div", { style: resizable },
21771
- h("h4", null, "One Action"),
21772
- h(TaskCardView, Object.assign({}, oneAction, { progress: 0, repeatable: true })),
21773
- " ",
21774
- h("h5", null),
21775
- h(TaskCardView, Object.assign({}, oneAction, { progress: 1, repeatable: true })),
21776
- " ",
21777
- h("h5", null)),
21778
- h("div", { style: resizable },
21779
- h("h4", null, "A Couple Actions"),
21780
- h(TaskCardView, Object.assign({}, coupleActions, { progress: 1, repeatable: true })),
21781
- h("h5", null),
21782
- h(TaskCardView, Object.assign({}, coupleActions, { progress: 5, repeatable: true })),
21783
- h("h5", null),
21784
- h(TaskCardView, Object.assign({}, coupleActions, { progress: 7, repeatable: true })),
21785
- h("h5", null),
21786
- h(TaskCardView, Object.assign({}, coupleActions, { progress: 10, repeatable: true })),
21787
- h("h5", null)),
21788
- h("div", { style: resizable },
21789
- h("h4", null, "Many Actions"),
21790
- h(TaskCardView, Object.assign({}, manyActions, { progress: 100, repeatable: true })),
21791
- h("h5", null),
21792
- h(TaskCardView, Object.assign({}, manyActions, { progress: 500, repeatable: true })),
21793
- h("h5", null),
21794
- h(TaskCardView, Object.assign({}, manyActions, { progress: 650, repeatable: true })),
21795
- h("h5", null),
21796
- h(TaskCardView, Object.assign({}, manyActions, { progress: 1000, repeatable: true })),
21797
- h("h5", null))));
21798
- };
21799
- const TaskCardEndDate = () => {
21800
- const expire = {
21801
- showExpiry: true,
21802
- rewardDuration: "2021-12-01T08:00:00.000Z/2077-12-01T08:00:00.000Z",
21803
- };
21804
- const expireRepeat = { ...expire, repeatable: true };
21805
- return (h("div", { style: storyFrame },
21806
- h("div", { style: resizable },
21807
- h("h4", null, "One Action"),
21808
- h(TaskCardView, Object.assign({}, oneAction, expire)),
21809
- " ",
21810
- h("h5", null),
21811
- h(TaskCardView, Object.assign({}, oneAction, expireRepeat)),
21812
- " ",
21813
- h("h5", null)),
21814
- h("div", { style: resizable },
21815
- h("h4", null, "A Couple Actions"),
21816
- h(TaskCardView, Object.assign({}, coupleActions, expire)),
21817
- " ",
21818
- h("h5", null),
21819
- h(TaskCardView, Object.assign({}, coupleActions, expireRepeat)),
21820
- " ",
21821
- h("h5", null)),
21822
- h("div", { style: resizable },
21823
- h("h4", null, "Many Actions"),
21824
- h(TaskCardView, Object.assign({}, manyActions, expire)),
21825
- " ",
21826
- h("h5", null),
21827
- h(TaskCardView, Object.assign({}, manyActions, expireRepeat)),
21828
- " ",
21829
- h("h5", null))));
21830
- };
21831
- const TaskCardLoading = () => {
21832
- const loading = { loading: true };
21833
- return (h("div", { style: storyFrame },
21834
- h("div", { style: resizable },
21835
- h("h4", null, "One Action"),
21836
- h(TaskCardView, Object.assign({}, oneAction, loading)),
21837
- " ",
21838
- h("h5", null),
21839
- h(TaskCardView, Object.assign({}, oneAction, loading)),
21840
- " ",
21841
- h("h5", null)),
21842
- h("div", { style: resizable },
21843
- h("h4", null, "A Couple Actions"),
21844
- h(TaskCardView, Object.assign({}, coupleActions, loading)),
21845
- " ",
21846
- h("h5", null),
21847
- h(TaskCardView, Object.assign({}, coupleActions, loading)),
21848
- " ",
21849
- h("h5", null)),
21850
- h("div", { style: resizable },
21851
- h("h4", null, "Many Actions"),
21852
- h(TaskCardView, Object.assign({}, manyActions, loading)),
21853
- " ",
21854
- h("h5", null),
21855
- h(TaskCardView, Object.assign({}, manyActions, loading)),
21856
- " ",
21857
- h("h5", null))));
19812
+ const rewards = [rewardsData];
19813
+ const RewardsCell = () => {
19814
+ return (h("sqm-referral-table-rewards-cell", { rewards: rewards }));
19815
+ };
19816
+
19817
+ const ReferralTableCell$1 = /*#__PURE__*/Object.freeze({
19818
+ __proto__: null,
19819
+ 'default': ReferralTableCell_stories,
19820
+ TableCell: TableCell,
19821
+ TableUserCell: TableUserCell,
19822
+ EmptyCell: EmptyCell$1,
19823
+ StatusCell: StatusCell,
19824
+ DateCell: DateCell,
19825
+ RewardsCell: RewardsCell
19826
+ });
19827
+
19828
+ const UserName_stories = {
19829
+ title: "User Name",
21858
19830
  };
21859
- const TaskCardUnavailable = () => {
21860
- const expire = {
21861
- showExpiry: true,
21862
- rewardDuration: "2021-11-30T08:00:00.000Z/2021-12-01T08:00:00.000Z",
21863
- };
21864
- const expireRepeat = { ...expire, repeatable: true };
21865
- return (h("div", { style: storyFrame },
21866
- h("div", { style: resizable },
21867
- h("h4", null, "One Action"),
21868
- h(TaskCardView, Object.assign({}, oneAction, { progress: 0 }, expire)),
21869
- " ",
21870
- h("h5", null),
21871
- h(TaskCardView, Object.assign({}, oneAction, { progress: 1 }, expire)),
21872
- " ",
21873
- h("h5", null),
21874
- h(TaskCardView, Object.assign({}, oneAction, { progress: 0 }, expireRepeat)),
21875
- " ",
21876
- h("h5", null),
21877
- h(TaskCardView, Object.assign({}, oneAction, { progress: 1 }, expireRepeat)),
21878
- " ",
21879
- h("h5", null)),
21880
- h("div", { style: resizable },
21881
- h("h4", null, "A Couple Actions"),
21882
- h(TaskCardView, Object.assign({}, coupleActions, { progress: 1 }, expire)),
21883
- " ",
21884
- h("h5", null),
21885
- h(TaskCardView, Object.assign({}, coupleActions, { progress: 5 }, expire)),
21886
- " ",
21887
- h("h5", null),
21888
- h(TaskCardView, Object.assign({}, coupleActions, { progress: 1 }, expireRepeat)),
21889
- h("h5", null),
21890
- h(TaskCardView, Object.assign({}, coupleActions, { progress: 5 }, expireRepeat)),
21891
- h("h5", null)),
21892
- h("div", { style: resizable },
21893
- h("h4", null, "Many Actions"),
21894
- h(TaskCardView, Object.assign({}, manyActions, { progress: 100 }, expire)),
21895
- " ",
21896
- h("h5", null),
21897
- h(TaskCardView, Object.assign({}, manyActions, { progress: 500 }, expire)),
21898
- " ",
21899
- h("h5", null),
21900
- h(TaskCardView, Object.assign({}, manyActions, { progress: 100 }, expireRepeat)),
21901
- h("h5", null),
21902
- h(TaskCardView, Object.assign({}, manyActions, { progress: 500 }, expireRepeat)),
21903
- h("h5", null))));
19831
+ const FullStack$1 = () => {
19832
+ return (h("sqm-user-name", { demoData: {
19833
+ loading: false,
19834
+ loadingText: "...",
19835
+ username: "Test Testerson",
19836
+ } }));
21904
19837
  };
21905
- const ProgressBar$1 = () => {
21906
- const props = {
21907
- progress: 0,
21908
- goal: 500,
21909
- progressBarUnit: "$",
21910
- };
21911
- return (h("div", null,
21912
- h(MatrixStory, { matrix: { progress: [-100, 0, 100, 500, 1000] }, props: props, Component: ProgressBarView })));
19838
+ const FullStackDefault = () => {
19839
+ return h("sqm-user-name", null);
19840
+ };
19841
+
19842
+ const UserName = /*#__PURE__*/Object.freeze({
19843
+ __proto__: null,
19844
+ 'default': UserName_stories,
19845
+ FullStack: FullStack$1,
19846
+ FullStackDefault: FullStackDefault
19847
+ });
19848
+
19849
+ const PasswordField_stories = {
19850
+ title: "Portal Password Field",
21913
19851
  };
21914
- const ProgressBarSteps = () => {
21915
- const props = {
21916
- progress: 0,
21917
- steps: true,
21918
- goal: 5,
21919
- progressBarUnit: "$",
21920
- };
21921
- return (h("div", null,
21922
- h(MatrixStory, { matrix: { progress: [-1, 0, 1, 5, 7] }, props: props, Component: ProgressBarView })));
19852
+ const Start = () => {
19853
+ return (h("sqm-password-field", { demoData: {
19854
+ initValue: "",
19855
+ states: {
19856
+ enableValidation: true,
19857
+ validationErrors: {},
19858
+ content: {
19859
+ fieldLabel: "Password",
19860
+ },
19861
+ },
19862
+ } }));
21923
19863
  };
21924
- const ProgressBarRepeatable = () => {
21925
- const props = {
21926
- progress: 0,
21927
- goal: 500,
21928
- progressBarUnit: "$",
21929
- repeatable: true,
21930
- };
21931
- return (h("div", null,
21932
- h(MatrixStory, { matrix: { progress: [100, 500, 650, 1200] }, props: props, Component: ProgressBarView })));
19864
+ const EmptyError = () => {
19865
+ return (h("sqm-password-field", { demoData: {
19866
+ initValue: "",
19867
+ states: {
19868
+ enableValidation: true,
19869
+ validationErrors: { password: "Cannot be empty" },
19870
+ content: {
19871
+ fieldLabel: "Password",
19872
+ },
19873
+ },
19874
+ } }));
21933
19875
  };
21934
- const ProgressBarStepsRepeatable = () => {
21935
- const props = {
21936
- progress: 0,
21937
- steps: true,
21938
- goal: 5,
21939
- progressBarUnit: "$",
21940
- repeatable: true,
21941
- };
21942
- return (h("div", null,
21943
- h(MatrixStory, { matrix: { progress: [1, 5, 7, 12] }, props: props, Component: ProgressBarView })));
19876
+ const ValidationError = () => {
19877
+ return (h("sqm-password-field", { demoData: {
19878
+ initValue: "asdf",
19879
+ states: {
19880
+ enableValidation: true,
19881
+ validationErrors: { password: "Incomplete" },
19882
+ content: {
19883
+ fieldLabel: "Password",
19884
+ },
19885
+ },
19886
+ } }));
21944
19887
  };
21945
19888
 
21946
- const TaskCard$1 = /*#__PURE__*/Object.freeze({
19889
+ const PasswordField = /*#__PURE__*/Object.freeze({
21947
19890
  __proto__: null,
21948
- 'default': TaskCard_stories,
21949
- TaskCardNotRepeatable: TaskCardNotRepeatable,
21950
- TaskCardRepeatable: TaskCardRepeatable,
21951
- TaskCardEndDate: TaskCardEndDate,
21952
- TaskCardLoading: TaskCardLoading,
21953
- TaskCardUnavailable: TaskCardUnavailable,
21954
- ProgressBar: ProgressBar$1,
21955
- ProgressBarSteps: ProgressBarSteps,
21956
- ProgressBarRepeatable: ProgressBarRepeatable,
21957
- ProgressBarStepsRepeatable: ProgressBarStepsRepeatable
19891
+ 'default': PasswordField_stories,
19892
+ Start: Start,
19893
+ EmptyError: EmptyError,
19894
+ ValidationError: ValidationError
21958
19895
  });
21959
19896
 
21960
19897
  const portalTemplate = "<sqm-portal-frame>\r\n <a slot=\"header\" href=\"/\">\r\n <sqm-text style=\"height: 60px\">\r\n <img\r\n style=\"height: 60px\"\r\n src=\"https://res.cloudinary.com/saasquatch/image/upload/v1634255445/squatch-assets/Copy_of_saasquatch-logo-tree-large-horizontal.png\"\r\n />\r\n </sqm-text>\r\n </a>\r\n <sqb-program-section program-id=\"referral-program\">\r\n <sqm-router>\r\n <template\r\n path=\"/:path(\\bregister\\b|\\bemailVerification\\b|\\blogin\\b|\\bverifyEmail\\b|\\bforgotPassword\\b|\\bresetPassword\\b|\\blogout\\b)\"\r\n >\r\n <sqm-graphql-client-provider\r\n domain=\"https://managed-identity.saasquatch.com\"\r\n >\r\n <sqm-hero\r\n background=\"https://images.unsplash.com/photo-1599676821464-3555954838dc?ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&ixlib=rb-1.2.1&auto=format&fit=crop&w=1939&q=80\"\r\n >\r\n <sqm-router>\r\n <template path=\"/register\">\r\n <sqm-portal-register>\r\n <sqm-name-fields slot=\"formData\"></sqm-name-fields>\r\n </sqm-portal-register>\r\n </template>\r\n\r\n <template path=\"/emailVerification\">\r\n <sqm-portal-protected-route\r\n redirect-to=\"/login\"\r\n ></sqm-portal-protected-route>\r\n <sqm-portal-email-verification></sqm-portal-email-verification>\r\n </template>\r\n\r\n <template path=\"/login\">\r\n <sqm-portal-login></sqm-portal-login>\r\n </template>\r\n\r\n <template path=\"/verifyEmail\">\r\n <sqm-portal-verify-email></sqm-portal-verify-email>\r\n </template>\r\n\r\n <template path=\"/forgotPassword\">\r\n <sqm-portal-forgot-password\r\n email-label=\"Business Email\"\r\n ></sqm-portal-forgot-password>\r\n </template>\r\n\r\n <template path=\"/resetPassword\">\r\n <sqm-portal-reset-password\r\n confirm-password=\"true\"\r\n ></sqm-portal-reset-password>\r\n </template>\r\n <template path=\"/logout\">\r\n <sqm-portal-logout next-page=\"/login\"></sqm-portal-logout>\r\n </template>\r\n </sqm-router>\r\n </sqm-hero>\r\n </sqm-graphql-client-provider>\r\n </template>\r\n </sqm-router>\r\n <sqm-router>\r\n <template path=\"/:path(\\bactivity\\b|\\beditProfile\\b)?\">\r\n <sqm-divided-layout\r\n direction=\"row\"\r\n style=\"\r\n border-top: 1px solid #eaeaea;\r\n border-bottom: 1px solid #eaeaea;\r\n \"\r\n >\r\n <sqm-navigation-sidebar>\r\n <sqm-navigation-sidebar-item\r\n path=\"/\"\r\n icon=\"house\"\r\n label=\"Dashboard\"\r\n ></sqm-navigation-sidebar-item>\r\n <sqm-navigation-sidebar-item\r\n path=\"/activity\"\r\n icon=\"bar-chart\"\r\n label=\"Activity\"\r\n ></sqm-navigation-sidebar-item>\r\n <sqm-navigation-sidebar-item\r\n path=\"/editProfile\"\r\n icon=\"person\"\r\n label=\"Edit Profile\"\r\n ></sqm-navigation-sidebar-item>\r\n <sqm-navigation-sidebar-item\r\n path=\"/logout\"\r\n icon=\"box-arrow-right\"\r\n label=\"Logout\"\r\n ></sqm-navigation-sidebar-item>\r\n </sqm-navigation-sidebar>\r\n <sqm-divided-layout direction=\"column\">\r\n <sqm-router>\r\n <template path=\"/\">\r\n <sqm-portal-protected-route\r\n require-email-verification=\"true\"\r\n redirect-to=\"/login\"\r\n redirect-to-unverified=\"/emailVerification\"\r\n ></sqm-portal-protected-route>\r\n <sqb-widget\r\n widget-type=\"p/referral-program/w/referrerWidget\"\r\n track-loads=\"true\"\r\n ></sqb-widget>\r\n </template>\r\n <template path=\"/editProfile\">\r\n <sqm-portal-protected-route\r\n require-email-verification=\"true\"\r\n redirect-to=\"/login\"\r\n redirect-to-unverified=\"/emailVerification\"\r\n ></sqm-portal-protected-route>\r\n <sqm-portal-container direction=\"column\" gap=\"xxx-large\">\r\n <sqm-portal-profile></sqm-portal-profile> </sqm-portal-container\r\n ><sqm-portal-container direction=\"column\" gap=\"xxx-large\">\r\n <sqm-graphql-client-provider\r\n domain=\"https://managed-identity.saasquatch.com\"\r\n >\r\n <sqm-portal-change-password></sqm-portal-change-password>\r\n </sqm-graphql-client-provider>\r\n </sqm-portal-container>\r\n </template>\r\n\r\n <template path=\"/activity\">\r\n <sqm-portal-protected-route\r\n require-email-verification=\"true\"\r\n redirect-to=\"/login\"\r\n redirect-to-unverified=\"/emailVerification\"\r\n ></sqm-portal-protected-route>\r\n <sqm-portal-container\r\n direction=\"column\"\r\n padding=\"xxx-large\"\r\n gap=\"xxx-large\"\r\n >\r\n <sqm-text> <h1>Activity</h1></sqm-text>\r\n <sqm-stat-container space=\"xxxx-large\"\r\n ><sqm-big-stat\r\n flex-reverse=\"true\"\r\n alignment=\"left\"\r\n stat-type=\"/referralsCount\"\r\n ><sqm-text><p>Referrals</p></sqm-text></sqm-big-stat\r\n >\r\n <sqm-big-stat\r\n flex-reverse=\"true\"\r\n alignment=\"left\"\r\n stat-type=\"/rewardsCountFiltered/AVAILABLE\"\r\n ><sqm-text><p>Rewards Earned</p></sqm-text></sqm-big-stat\r\n >\r\n <sqm-big-stat\r\n flex-reverse=\"true\"\r\n alignment=\"left\"\r\n stat-type=\"/rewardBalance/CREDIT/CENTS\"\r\n ><sqm-text><p>Reward Balance</p></sqm-text></sqm-big-stat\r\n >\r\n </sqm-stat-container>\r\n <sqm-referral-table>\r\n <sqm-referral-table-user-column></sqm-referral-table-user-column>\r\n <sqm-referral-table-rewards-column></sqm-referral-table-rewards-column>\r\n <sqm-referral-table-status-column></sqm-referral-table-status-column>\r\n <sqm-referral-table-date-column\r\n column-title=\"Referred\"\r\n date-shown=\"dateReferralStarted\"\r\n ></sqm-referral-table-date-column> </sqm-referral-table\r\n ></sqm-portal-container>\r\n </template>\r\n </sqm-router>\r\n </sqm-divided-layout>\r\n </sqm-divided-layout>\r\n </template>\r\n </sqm-router>\r\n </sqb-program-section>\r\n <sqm-portal-footer\r\n slot=\"footer\"\r\n support-email=\"support@example.com\"\r\n terms-link=\"https://example.com\"\r\n faq-link=\"https://example.com\"\r\n terms-text=\"Terms And Conditions\"\r\n faq-text=\"FAQ\"\r\n show-powered-by=\"true\"\r\n ></sqm-portal-footer>\r\n</sqm-portal-frame>\r\n";
@@ -24963,21 +22900,21 @@ var marked = createCommonjsModule(function (module, exports) {
24963
22900
  })));
24964
22901
  });
24965
22902
 
24966
- const LoginReadme = "# sqm-portal-login\r\n\r\n\r\n\r\n<!-- Auto Generated Below -->\r\n\r\n\r\n## Properties\r\n\r\n| Property | Attribute | Description | Type | Default |\r\n| --------------------- | ----------------------- | ----------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------- |\r\n| `demoData` | -- | | `{ states?: { error: string; loading: boolean; }; content?: { forgotPasswordButton?: any; secondaryButton?: any; emailLabel?: string; passwordLabel?: string; submitLabel?: string; pageLabel?: string; }; }` | `undefined` |\r\n| `emailLabel` | `email-label` | | `string` | `\"Email\"` |\r\n| `forgotPasswordLabel` | `forgot-password-label` | | `string` | `\"Forgot Password?\"` |\r\n| `nextPage` | `next-page` | | `string` | `\"/\"` |\r\n| `pageLabel` | `page-label` | | `string` | `\"Sign in to your account\"` |\r\n| `passwordLabel` | `password-label` | | `string` | `\"Password\"` |\r\n| `registerLabel` | `register-label` | | `string` | `\"Register\"` |\r\n| `submitLabel` | `submit-label` | | `string` | `\"Sign In\"` |\r\n\r\n\r\n## Dependencies\r\n\r\n### Used by\r\n\r\n - [sqm-stencilbook](../sqm-stencilbook)\r\n\r\n### Depends on\r\n\r\n- [sqm-form-message](../sqm-form-message)\r\n\r\n### Graph\r\n```mermaid\r\ngraph TD;\r\n sqm-portal-login --> sqm-form-message\r\n sqm-stencilbook --> sqm-portal-login\r\n style sqm-portal-login fill:#f9f,stroke:#333,stroke-width:4px\r\n```\r\n\r\n----------------------------------------------\r\n\r\n*Built with [StencilJS](https://stenciljs.com/)*\r\n";
22903
+ const LoginReadme = "# sqm-portal-login\r\n\r\n\r\n\r\n<!-- Auto Generated Below -->\r\n\r\n\r\n## Properties\r\n\r\n| Property | Attribute | Description | Type | Default |\r\n| --------------------- | ----------------------- | ----------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------- |\r\n| `demoData` | -- | | `{ states?: { error: string; loading: boolean; forgotPasswordPath: string; registerPath: string; }; content?: { forgotPasswordButton?: any; secondaryButton?: any; emailLabel?: string; passwordLabel?: string; submitLabel?: string; pageLabel?: string; }; }` | `undefined` |\r\n| `emailLabel` | `email-label` | | `string` | `\"Email\"` |\r\n| `forgotPasswordLabel` | `forgot-password-label` | | `string` | `\"Forgot Password?\"` |\r\n| `forgotPasswordPath` | `forgot-password-path` | | `string` | `\"/forgotPassword\"` |\r\n| `nextPage` | `next-page` | | `string` | `\"/\"` |\r\n| `pageLabel` | `page-label` | | `string` | `\"Sign in to your account\"` |\r\n| `passwordLabel` | `password-label` | | `string` | `\"Password\"` |\r\n| `registerLabel` | `register-label` | | `string` | `\"Register\"` |\r\n| `registerPath` | `register-path` | | `string` | `\"/register\"` |\r\n| `submitLabel` | `submit-label` | | `string` | `\"Sign In\"` |\r\n\r\n\r\n## Dependencies\r\n\r\n### Used by\r\n\r\n - [sqm-stencilbook](../sqm-stencilbook)\r\n\r\n### Depends on\r\n\r\n- [sqm-form-message](../sqm-form-message)\r\n\r\n### Graph\r\n```mermaid\r\ngraph TD;\r\n sqm-portal-login --> sqm-form-message\r\n sqm-stencilbook --> sqm-portal-login\r\n style sqm-portal-login fill:#f9f,stroke:#333,stroke-width:4px\r\n```\r\n\r\n----------------------------------------------\r\n\r\n*Built with [StencilJS](https://stenciljs.com/)*\r\n";
24967
22904
 
24968
22905
  const ReferralIframeReadme = "# sqm-referral-iframe\r\n\r\n\r\n\r\n<!-- Auto Generated Below -->\r\n\r\n\r\n## Properties\r\n\r\n| Property | Attribute | Description | Type | Default |\r\n| -------------- | --------------- | ----------- | ------------------------------------------------------------------------------------------------------------------------------ | ----------- |\r\n| `demoData` | -- | | `{ states?: { content: { iframeSrc: string; iframeHeight: string; iframeWidth: string; }; }; data?: { shareCode: string; }; }` | `undefined` |\r\n| `iframeHeight` | `iframe-height` | | `string` | `\"100%\"` |\r\n| `iframeSrc` | `iframe-src` | | `string` | `undefined` |\r\n| `iframeWidth` | `iframe-width` | | `string` | `\"100%\"` |\r\n\r\n\r\n## Dependencies\r\n\r\n### Used by\r\n\r\n - [sqm-stencilbook](../sqm-stencilbook)\r\n\r\n### Graph\r\n```mermaid\r\ngraph TD;\r\n sqm-stencilbook --> sqm-referral-iframe\r\n style sqm-referral-iframe fill:#f9f,stroke:#333,stroke-width:4px\r\n```\r\n\r\n----------------------------------------------\r\n\r\n*Built with [StencilJS](https://stenciljs.com/)*\r\n";
24969
22906
 
24970
- const ForgotPasswordReadme = "# sqm-portal-forgot-password\r\n\r\n\r\n\r\n<!-- Auto Generated Below -->\r\n\r\n\r\n## Properties\r\n\r\n| Property | Attribute | Description | Type | Default |\r\n| ------------- | -------------- | ----------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -------------------------- |\r\n| `demoData` | -- | | `{ states?: { error: string; loading: boolean; success: boolean; }; content?: { secondaryButton: any; messageSlot: any; emailLabel?: string; submitLabel?: string; }; }` | `undefined` |\r\n| `emailLabel` | `email-label` | | `string` | `\"Email\"` |\r\n| `submitLabel` | `submit-label` | | `string` | `\"Request Password Reset\"` |\r\n\r\n\r\n## Dependencies\r\n\r\n### Depends on\r\n\r\n- [sqm-form-message](../sqm-form-message)\r\n\r\n### Graph\r\n```mermaid\r\ngraph TD;\r\n sqm-portal-forgot-password --> sqm-form-message\r\n style sqm-portal-forgot-password fill:#f9f,stroke:#333,stroke-width:4px\r\n```\r\n\r\n----------------------------------------------\r\n\r\n*Built with [StencilJS](https://stenciljs.com/)*\r\n";
22907
+ const ForgotPasswordReadme = "# sqm-portal-forgot-password\r\n\r\n\r\n\r\n<!-- Auto Generated Below -->\r\n\r\n\r\n## Properties\r\n\r\n| Property | Attribute | Description | Type | Default |\r\n| -------------- | --------------- | -------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------- |\r\n| `demoData` | -- | | `{ states?: { error: string; loading: boolean; success: boolean; loginPath: string; }; content?: { secondaryButton: any; messageSlot: any; emailLabel?: string; submitLabel?: string; }; }` | `undefined` |\r\n| `emailLabel` | `email-label` | | `string` | `\"Email\"` |\r\n| `loginPath` | `login-path` | | `string` | `\"/login\"` |\r\n| `redirectPath` | `redirect-path` | The page that users are redirected to from the password reset email. | `string` | `\"/resetPassword\"` |\r\n| `submitLabel` | `submit-label` | | `string` | `\"Request Password Reset\"` |\r\n\r\n\r\n## Dependencies\r\n\r\n### Depends on\r\n\r\n- [sqm-form-message](../sqm-form-message)\r\n\r\n### Graph\r\n```mermaid\r\ngraph TD;\r\n sqm-portal-forgot-password --> sqm-form-message\r\n style sqm-portal-forgot-password fill:#f9f,stroke:#333,stroke-width:4px\r\n```\r\n\r\n----------------------------------------------\r\n\r\n*Built with [StencilJS](https://stenciljs.com/)*\r\n";
24971
22908
 
24972
- const RegisterReadme = "# sqm-portal-register\r\n\r\n\r\n\r\n<!-- Auto Generated Below -->\r\n\r\n\r\n## Properties\r\n\r\n| Property | Attribute | Description | Type | Default |\r\n| -------------------------- | ---------------------------- | ----------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------- |\r\n| `confirmPassword` | `confirm-password` | | `boolean` | `false` |\r\n| `confirmPasswordLabel` | `confirm-password-label` | | `string` | `\"Confirm Password\"` |\r\n| `demoData` | -- | | `{ states?: { error: string; loading: boolean; confirmPassword: boolean; hideInputs: boolean; validationState?: FormState; enablePasswordValidation?: boolean; }; content?: { formData?: any; passwordField?: any; secondaryButton?: any; emailLabel?: string; passwordLabel?: string; submitLabel?: string; pageLabel?: string; confirmPasswordLabel: string; }; refs?: { formRef: any; }; }` | `undefined` |\r\n| `emailLabel` | `email-label` | | `string` | `\"Email\"` |\r\n| `enablePasswordValidation` | `enable-password-validation` | | `boolean` | `true` |\r\n| `hideInputs` | `hide-inputs` | | `boolean` | `false` |\r\n| `loginLabel` | `login-label` | | `string` | `\"Sign in\"` |\r\n| `nextPage` | `next-page` | | `string` | `\"/\"` |\r\n| `pageLabel` | `page-label` | | `string` | `\"Register\"` |\r\n| `passwordLabel` | `password-label` | | `string` | `\"Password\"` |\r\n| `submitLabel` | `submit-label` | | `string` | `\"Register\"` |\r\n\r\n\r\n## Dependencies\r\n\r\n### Used by\r\n\r\n - [sqm-stencilbook](../sqm-stencilbook)\r\n\r\n### Depends on\r\n\r\n- [sqm-form-message](../sqm-form-message)\r\n- [sqm-password-field](../sqm-password-field)\r\n\r\n### Graph\r\n```mermaid\r\ngraph TD;\r\n sqm-portal-register --> sqm-form-message\r\n sqm-portal-register --> sqm-password-field\r\n sqm-stencilbook --> sqm-portal-register\r\n style sqm-portal-register fill:#f9f,stroke:#333,stroke-width:4px\r\n```\r\n\r\n----------------------------------------------\r\n\r\n*Built with [StencilJS](https://stenciljs.com/)*\r\n";
22909
+ const RegisterReadme = "# sqm-portal-register\r\n\r\n\r\n\r\n<!-- Auto Generated Below -->\r\n\r\n\r\n## Properties\r\n\r\n| Property | Attribute | Description | Type | Default |\r\n| -------------------------- | ---------------------------- | ------------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------- |\r\n| `confirmPassword` | `confirm-password` | | `boolean` | `false` |\r\n| `confirmPasswordLabel` | `confirm-password-label` | | `string` | `\"Confirm Password\"` |\r\n| `demoData` | -- | | `{ states?: { error: string; loading: boolean; confirmPassword: boolean; hideInputs: boolean; validationState?: FormState; enablePasswordValidation?: boolean; loginPath: string; }; content?: { formData?: any; passwordField?: any; secondaryButton?: any; emailLabel?: string; passwordLabel?: string; submitLabel?: string; pageLabel?: string; confirmPasswordLabel: string; }; refs?: { formRef: any; }; }` | `undefined` |\r\n| `emailLabel` | `email-label` | | `string` | `\"Email\"` |\r\n| `enablePasswordValidation` | `enable-password-validation` | | `boolean` | `true` |\r\n| `hideInputs` | `hide-inputs` | | `boolean` | `false` |\r\n| `loginLabel` | `login-label` | | `string` | `\"Sign in\"` |\r\n| `loginPath` | `login-path` | | `string` | `\"/login\"` |\r\n| `nextPage` | `next-page` | | `string` | `\"/\"` |\r\n| `pageLabel` | `page-label` | | `string` | `\"Register\"` |\r\n| `passwordLabel` | `password-label` | | `string` | `\"Password\"` |\r\n| `redirectPath` | `redirect-path` | The page that users are redirected to from the verification email. | `string` | `\"/verifyEmail\"` |\r\n| `submitLabel` | `submit-label` | | `string` | `\"Register\"` |\r\n\r\n\r\n## Dependencies\r\n\r\n### Used by\r\n\r\n - [sqm-stencilbook](../sqm-stencilbook)\r\n\r\n### Depends on\r\n\r\n- [sqm-form-message](../sqm-form-message)\r\n- [sqm-password-field](../sqm-password-field)\r\n\r\n### Graph\r\n```mermaid\r\ngraph TD;\r\n sqm-portal-register --> sqm-form-message\r\n sqm-portal-register --> sqm-password-field\r\n sqm-stencilbook --> sqm-portal-register\r\n style sqm-portal-register fill:#f9f,stroke:#333,stroke-width:4px\r\n```\r\n\r\n----------------------------------------------\r\n\r\n*Built with [StencilJS](https://stenciljs.com/)*\r\n";
24973
22910
 
24974
22911
  const EditProfileReadme = "# sqm-portal-profile\r\n\r\n\r\n\r\n<!-- Auto Generated Below -->\r\n\r\n\r\n## Properties\r\n\r\n| Property | Attribute | Description | Type | Default |\r\n| ------------------------ | --------------------------- | ----------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------ |\r\n| `countrytext` | `countrytext` | | `string` | `\"Country\"` |\r\n| `demoData` | -- | | `{ states?: { success: boolean; loading: boolean; submitDisabled: boolean; showCountry: boolean; formState: { country: string; firstName: string; lastName: string; errors: any; error: string; }; user: { id: string; accountId: string; firstName: string; lastName: string; email: string; countryCode: string; }; text: { firstnametext: string; lastnametext: string; emailtext: string; countrytext: string; editProfileHeader: string; editProfileSubHeader: string; submitChangeButtonText: string; }; }; }` | `undefined` |\r\n| `editProfileHeader` | `edit-profile-header` | | `string` | `\"Edit your profile\"` |\r\n| `editProfileSubHeader` | `edit-profile-sub-header` | | `string` | `\"Personal Information\"` |\r\n| `emailtext` | `emailtext` | | `string` | `\"Email\"` |\r\n| `firstnametext` | `firstnametext` | | `string` | `\"First Name\"` |\r\n| `lastnametext` | `lastnametext` | | `string` | `\"Last Name\"` |\r\n| `showCountry` | `show-country` | | `boolean` | `true` |\r\n| `submitChangeButtonText` | `submit-change-button-text` | | `string` | `\"Submit Changes\"` |\r\n\r\n\r\n## Dependencies\r\n\r\n### Depends on\r\n\r\n- [sqm-form-message](../sqm-form-message)\r\n\r\n### Graph\r\n```mermaid\r\ngraph TD;\r\n sqm-portal-profile --> sqm-form-message\r\n style sqm-portal-profile fill:#f9f,stroke:#333,stroke-width:4px\r\n```\r\n\r\n----------------------------------------------\r\n\r\n*Built with [StencilJS](https://stenciljs.com/)*\r\n";
24975
22912
 
24976
- const ResetPasswordReadme = "# sqm-portal-reset-password\r\n\r\n\r\n\r\n<!-- Auto Generated Below -->\r\n\r\n\r\n## Properties\r\n\r\n| Property | Attribute | Description | Type | Default |\r\n| --------------------------- | ------------------------------ | ------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------- |\r\n| `confirmPassword` | `confirm-password` | | `boolean` | `false` |\r\n| `confirmPasswordFieldLabel` | `confirm-password-field-label` | | `string` | `\"Confirm Password\"` |\r\n| `continueButtonText` | `continue-button-text` | Displayed after a successful password reset | `string` | `\"Continue\"` |\r\n| `demoData` | -- | | `{ states?: { error: string; loading: boolean; reset: boolean; confirmPassword: boolean; oobCodeValidating: boolean; oobCodeValid: boolean; passwordDemoData?: PasswordFieldViewDemoProps; content: { passwordResetHeader: string; resetPasswordHeader: string; continueButtonText: string; resetPasswordButtonText: string; confirmPasswordFieldLabel: string; passwordFieldLabel: string; }; }; }` | `undefined` |\r\n| `nextPage` | `next-page` | | `string` | `\"/\"` |\r\n| `passwordFieldLabel` | `password-field-label` | | `string` | `\"New Password\"` |\r\n| `passwordResetHeader` | `password-reset-header` | Displayed after a successful password reset | `string` | `\"Password reset\"` |\r\n| `resetPasswordButtonText` | `reset-password-button-text` | | `string` | `\"Reset Password\"` |\r\n| `resetPasswordHeader` | `reset-password-header` | | `string` | `\"Reset your password\"` |\r\n\r\n\r\n## Dependencies\r\n\r\n### Depends on\r\n\r\n- [sqm-form-message](../sqm-form-message)\r\n- [sqm-password-field](../sqm-password-field)\r\n\r\n### Graph\r\n```mermaid\r\ngraph TD;\r\n sqm-portal-reset-password --> sqm-form-message\r\n sqm-portal-reset-password --> sqm-password-field\r\n style sqm-portal-reset-password fill:#f9f,stroke:#333,stroke-width:4px\r\n```\r\n\r\n----------------------------------------------\r\n\r\n*Built with [StencilJS](https://stenciljs.com/)*\r\n";
22913
+ const ResetPasswordReadme = "# sqm-portal-reset-password\r\n\r\n\r\n\r\n<!-- Auto Generated Below -->\r\n\r\n\r\n## Properties\r\n\r\n| Property | Attribute | Description | Type | Default |\r\n| --------------------------- | ------------------------------ | ------------------------------------------------------------------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------- |\r\n| `confirmPassword` | `confirm-password` | | `boolean` | `false` |\r\n| `confirmPasswordFieldLabel` | `confirm-password-field-label` | | `string` | `\"Confirm Password\"` |\r\n| `continueButtonText` | `continue-button-text` | Displayed after a successful password reset | `string` | `\"Continue\"` |\r\n| `demoData` | -- | | `{ states?: { error: string; loading: boolean; reset: boolean; confirmPassword: boolean; oobCodeValidating: boolean; oobCodeValid: boolean; passwordDemoData?: PasswordFieldViewDemoProps; content: { passwordResetHeader: string; resetPasswordHeader: string; continueButtonText: string; resetPasswordButtonText: string; confirmPasswordFieldLabel: string; passwordFieldLabel: string; }; }; }` | `undefined` |\r\n| `failedPage` | `failed-page` | The page that users are redirected to if the reset fails due to outdated password reset attempt. | `string` | `\"/\"` |\r\n| `nextPage` | `next-page` | The page that users are redirected to when the password reset succeeds. | `string` | `\"/\"` |\r\n| `passwordFieldLabel` | `password-field-label` | | `string` | `\"New Password\"` |\r\n| `passwordResetHeader` | `password-reset-header` | Displayed after a successful password reset | `string` | `\"Password reset\"` |\r\n| `resetPasswordButtonText` | `reset-password-button-text` | | `string` | `\"Reset Password\"` |\r\n| `resetPasswordHeader` | `reset-password-header` | | `string` | `\"Reset your password\"` |\r\n\r\n\r\n## Dependencies\r\n\r\n### Depends on\r\n\r\n- [sqm-form-message](../sqm-form-message)\r\n- [sqm-password-field](../sqm-password-field)\r\n\r\n### Graph\r\n```mermaid\r\ngraph TD;\r\n sqm-portal-reset-password --> sqm-form-message\r\n sqm-portal-reset-password --> sqm-password-field\r\n style sqm-portal-reset-password fill:#f9f,stroke:#333,stroke-width:4px\r\n```\r\n\r\n----------------------------------------------\r\n\r\n*Built with [StencilJS](https://stenciljs.com/)*\r\n";
24977
22914
 
24978
- const EmailVerificationReadme = "# sqm-portal-email-verification\r\n\r\n\r\n\r\n<!-- Auto Generated Below -->\r\n\r\n\r\n## Properties\r\n\r\n| Property | Attribute | Description | Type | Default |\r\n| ------------------------- | --------------------------- | ----------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- |\r\n| `demoData` | -- | | `{ states?: { error: string; loading: boolean; success: boolean; }; content?: { email: string; verifyMessage: string; emailVerificationHeader: string; resendEmailButtonText: string; }; }` | `undefined` |\r\n| `emailVerificationHeader` | `email-verification-header` | | `string` | `\"Verify your email\"` |\r\n| `resendEmailButtonText` | `resend-email-button-text` | | `string` | `\"Re-send Email\"` |\r\n| `verifyMessage` | `verify-message` | | `string` | `\"A verification email was sent to {email}. Please verify your email to continue to the portal.\"` |\r\n\r\n\r\n## Dependencies\r\n\r\n### Depends on\r\n\r\n- [sqm-form-message](../sqm-form-message)\r\n\r\n### Graph\r\n```mermaid\r\ngraph TD;\r\n sqm-portal-email-verification --> sqm-form-message\r\n style sqm-portal-email-verification fill:#f9f,stroke:#333,stroke-width:4px\r\n```\r\n\r\n----------------------------------------------\r\n\r\n*Built with [StencilJS](https://stenciljs.com/)*\r\n";
22915
+ const EmailVerificationReadme = "# sqm-portal-email-verification\r\n\r\n\r\n\r\n<!-- Auto Generated Below -->\r\n\r\n\r\n## Properties\r\n\r\n| Property | Attribute | Description | Type | Default |\r\n| ------------------------- | --------------------------- | ------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- |\r\n| `demoData` | -- | | `{ states?: { error: string; loading: boolean; success: boolean; }; content?: { email: string; verifyMessage: string; emailVerificationHeader: string; resendEmailButtonText: string; }; }` | `undefined` |\r\n| `emailVerificationHeader` | `email-verification-header` | | `string` | `\"Verify your email\"` |\r\n| `redirectPath` | `redirect-path` | The page that users are redirected to from the verification email. | `string` | `\"/verifyEmail\"` |\r\n| `resendEmailButtonText` | `resend-email-button-text` | | `string` | `\"Re-send Email\"` |\r\n| `verifyMessage` | `verify-message` | | `string` | `\"A verification email was sent to {email}. Please verify your email to continue to the portal.\"` |\r\n\r\n\r\n## Dependencies\r\n\r\n### Depends on\r\n\r\n- [sqm-form-message](../sqm-form-message)\r\n\r\n### Graph\r\n```mermaid\r\ngraph TD;\r\n sqm-portal-email-verification --> sqm-form-message\r\n style sqm-portal-email-verification fill:#f9f,stroke:#333,stroke-width:4px\r\n```\r\n\r\n----------------------------------------------\r\n\r\n*Built with [StencilJS](https://stenciljs.com/)*\r\n";
24979
22916
 
24980
- const EmailVerifiedReadme = "# sqm-portal-verify-email\r\n\r\n\r\n\r\n<!-- Auto Generated Below -->\r\n\r\n\r\n## Properties\r\n\r\n| Property | Attribute | Description | Type | Default |\r\n| ---------- | ----------- | ----------- | ---------------------------------------------------------------------------------------------------- | ----------- |\r\n| `demoData` | -- | | `{ states?: { error: string; loading: boolean; verified: boolean; }; data?: { oobCode: string; }; }` | `undefined` |\r\n| `nextPage` | `next-page` | | `string` | `\"/\"` |\r\n\r\n\r\n## Dependencies\r\n\r\n### Depends on\r\n\r\n- [sqm-form-message](../sqm-form-message)\r\n\r\n### Graph\r\n```mermaid\r\ngraph TD;\r\n sqm-portal-verify-email --> sqm-form-message\r\n style sqm-portal-verify-email fill:#f9f,stroke:#333,stroke-width:4px\r\n```\r\n\r\n----------------------------------------------\r\n\r\n*Built with [StencilJS](https://stenciljs.com/)*\r\n";
22917
+ const EmailVerifiedReadme = "# sqm-portal-verify-email\r\n\r\n\r\n\r\n<!-- Auto Generated Below -->\r\n\r\n\r\n## Properties\r\n\r\n| Property | Attribute | Description | Type | Default |\r\n| ------------ | ------------- | ------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ----------- |\r\n| `demoData` | -- | | `{ states?: { error: string; loading: boolean; verified: boolean; }; data?: { oobCode: string; }; }` | `undefined` |\r\n| `failedPage` | `failed-page` | The page that users are redirected to if verification fails due to outdated verification attempt. | `string` | `\"/\"` |\r\n| `nextPage` | `next-page` | The page that users are redirected to when the verification succeeds. | `string` | `\"/\"` |\r\n\r\n\r\n## Dependencies\r\n\r\n### Depends on\r\n\r\n- [sqm-form-message](../sqm-form-message)\r\n\r\n### Graph\r\n```mermaid\r\ngraph TD;\r\n sqm-portal-verify-email --> sqm-form-message\r\n style sqm-portal-verify-email fill:#f9f,stroke:#333,stroke-width:4px\r\n```\r\n\r\n----------------------------------------------\r\n\r\n*Built with [StencilJS](https://stenciljs.com/)*\r\n";
24981
22918
 
24982
22919
  const PortalTemplates_stories = {
24983
22920
  title: "Templates / Portal",
@@ -25024,16 +22961,16 @@ function DefaultTemplateView(props) {
25024
22961
  gridTemplateColumns: "repeat(9, 80px)",
25025
22962
  gridGap: "10px",
25026
22963
  } },
25027
- h("button", { onClick: () => rn.push("/") }, "Dashboard"),
25028
- props.leadSubmit && (h("button", { onClick: () => rn.push("/refer") }, "Submit a Referral")),
25029
- h("button", { onClick: () => rn.push("/activity") }, "Activity"),
25030
- h("button", { onClick: () => rn.push("/editProfile") }, "Edit Profile"),
25031
- h("button", { onClick: () => rn.push("/login") }, "Login"),
25032
- h("button", { onClick: () => rn.push("/register") }, "Register"),
25033
- h("button", { onClick: () => rn.push("/emailVerification") }, "Email Verification"),
25034
- h("button", { onClick: () => rn.push("/verifyEmail") }, "Verify Email"),
25035
- h("button", { onClick: () => rn.push("/forgotPassword") }, "Forgot Password"),
25036
- h("button", { onClick: () => rn.push("/resetPassword") }, "Reset Password")),
22964
+ h("button", { onClick: () => mn.push("/") }, "Dashboard"),
22965
+ props.leadSubmit && (h("button", { onClick: () => mn.push("/refer") }, "Submit a Referral")),
22966
+ h("button", { onClick: () => mn.push("/activity") }, "Activity"),
22967
+ h("button", { onClick: () => mn.push("/editProfile") }, "Edit Profile"),
22968
+ h("button", { onClick: () => mn.push("/login") }, "Login"),
22969
+ h("button", { onClick: () => mn.push("/register") }, "Register"),
22970
+ h("button", { onClick: () => mn.push("/emailVerification") }, "Email Verification"),
22971
+ h("button", { onClick: () => mn.push("/verifyEmail") }, "Verify Email"),
22972
+ h("button", { onClick: () => mn.push("/forgotPassword") }, "Forgot Password"),
22973
+ h("button", { onClick: () => mn.push("/resetPassword") }, "Reset Password")),
25037
22974
  h("br", null),
25038
22975
  h("div", { innerHTML: states.previewTemplate })));
25039
22976
  }
@@ -25193,12 +23130,12 @@ const PoweredByImg = /*#__PURE__*/Object.freeze({
25193
23130
  CustomWidthAndHeight: CustomWidthAndHeight
25194
23131
  });
25195
23132
 
25196
- const scenario$6 = "Feature: Portal Footer\r\n\r\n Background: A user is viewing the portal\r\n Given a hosted portal\r\n And a user is viewing the portal\r\n And the portal has a footer\r\n\r\n Scenario Outline: FAQ and T&C links/text are configurable and open in a new page when clicked\r\n Given the footer has prop \"terms-link\" with value \"https://example.com/terms\"\r\n And prop \"terms-text\" with value \"Terms and Conditions\"\r\n And prop \"faq-link\" with value \"https://example.com/FAQ\"\r\n And prop \"faq-text\" with value \"Visit FAQ\"\r\n When a user clicks on the \"Visit FAQ\" link\r\n Then they will be redirected to \"https://example.com/FAQ\" in a new page\r\n When they go back to the portal\r\n And click on the \"Terms and Conditions\" link\r\n Then they will be redirected to \"https://example.com/terms\" in a new page\r\n\r\n Scenario Outline: FAQ/T&C Links are not shown if a link is not provided\r\n Given the footer does not have <linkProp>\r\n But it <mayHave> <textProp> with <value>\r\n Then the <link> will not be shown in the footer\r\n Examples:\r\n | linkProp | mayHave | textProp | value | link |\r\n | terms-link | has | termsText | Terms and Conditions | T&C Link |\r\n | faq-link | has | faqText | Visit FAQ | FAQ Link |\r\n | terms-link | doesn't have | | | T&C Link |\r\n | faq-link | doesn't have | | | FAQ Link |\r\n\r\n Scenario Outline: The support email and text is configurable but has a default\r\n Given the footer <mayHave> <emailPropWithValue>\r\n And the footer <mayAlsoHave> <textPropWithValue>\r\n Then the footer's support email text is <renderedEmailText>\r\n And the email address will be a mailto link with <mailtoEmail>\r\n When the user clicks on the email address mailto Link\r\n Then the users preferred email client will open with a draft email to <mailtoEmail>\r\n Examples:\r\n | mayHave | emailPropWithValue | mayAlsoHave | textPropWithValue | mailtoEmail | renderedEmailText |\r\n | has | support@saasquatch.com | has | For support please contact {email} | support@saasquatch.com | For support please contact support@saasquatch.com |\r\n | doesn't have | N/A | doesn't have | N/A | support@example.com | For program support, contact support@example.com |\r\n\r\n Scenario Outline: Powered by SaaSquatch is shown by default\r\n Given the footer <mayHaveProp> \"show-powered-by\" with <value>\r\n Then the powered by SaaSquatch image <mayBeShown>\r\n Examples:\r\n | mayHaveProp | value | mayBeShown |\r\n | has prop | true | is shown |\r\n | has prop | false | isn't shown |\r\n | has prop | test | is shown |\r\n | has prop | | is shown |\r\n | doesn't have prop | | is shown |\r\n\r\n Scenario: Powered By Saasquatch links out to \"https://saasquatch.com\"\r\n Given the footer has the powered by SaaSquatch image\r\n When a user clicks on it\r\n Then they will be redirected to \"https://saasquatch.com\" in a new page";
23133
+ const scenario$5 = "Feature: Portal Footer\r\n\r\n Background: A user is viewing the portal\r\n Given a hosted portal\r\n And a user is viewing the portal\r\n And the portal has a footer\r\n\r\n Scenario Outline: FAQ and T&C links/text are configurable and open in a new page when clicked\r\n Given the footer has prop \"terms-link\" with value \"https://example.com/terms\"\r\n And prop \"terms-text\" with value \"Terms and Conditions\"\r\n And prop \"faq-link\" with value \"https://example.com/FAQ\"\r\n And prop \"faq-text\" with value \"Visit FAQ\"\r\n When a user clicks on the \"Visit FAQ\" link\r\n Then they will be redirected to \"https://example.com/FAQ\" in a new page\r\n When they go back to the portal\r\n And click on the \"Terms and Conditions\" link\r\n Then they will be redirected to \"https://example.com/terms\" in a new page\r\n\r\n Scenario Outline: FAQ/T&C Links are not shown if a link is not provided\r\n Given the footer does not have <linkProp>\r\n But it <mayHave> <textProp> with <value>\r\n Then the <link> will not be shown in the footer\r\n Examples:\r\n | linkProp | mayHave | textProp | value | link |\r\n | terms-link | has | termsText | Terms and Conditions | T&C Link |\r\n | faq-link | has | faqText | Visit FAQ | FAQ Link |\r\n | terms-link | doesn't have | | | T&C Link |\r\n | faq-link | doesn't have | | | FAQ Link |\r\n\r\n Scenario Outline: The support email and text is configurable but has a default\r\n Given the footer <mayHave> <emailPropWithValue>\r\n And the footer <mayAlsoHave> <textPropWithValue>\r\n Then the footer's support email text is <renderedEmailText>\r\n And the email address will be a mailto link with <mailtoEmail>\r\n When the user clicks on the email address mailto Link\r\n Then the users preferred email client will open with a draft email to <mailtoEmail>\r\n Examples:\r\n | mayHave | emailPropWithValue | mayAlsoHave | textPropWithValue | mailtoEmail | renderedEmailText |\r\n | has | support@saasquatch.com | has | For support please contact {email} | support@saasquatch.com | For support please contact support@saasquatch.com |\r\n | doesn't have | N/A | doesn't have | N/A | support@example.com | For program support, contact support@example.com |\r\n\r\n Scenario Outline: Powered by SaaSquatch is shown by default\r\n Given the footer <mayHaveProp> \"show-powered-by\" with <value>\r\n Then the powered by SaaSquatch image <mayBeShown>\r\n Examples:\r\n | mayHaveProp | value | mayBeShown |\r\n | has prop | true | is shown |\r\n | has prop | false | isn't shown |\r\n | has prop | test | is shown |\r\n | has prop | | is shown |\r\n | doesn't have prop | | is shown |\r\n\r\n Scenario: Powered By Saasquatch links out to \"https://saasquatch.com\"\r\n Given the footer has the powered by SaaSquatch image\r\n When a user clicks on it\r\n Then they will be redirected to \"https://saasquatch.com\" in a new page";
25197
23134
 
25198
23135
  const PortalFooter_stories = {
25199
23136
  title: "Portal Footer",
25200
23137
  parameters: {
25201
- scenario: scenario$6,
23138
+ scenario: scenario$5,
25202
23139
  },
25203
23140
  };
25204
23141
  const defaultProps$9 = {
@@ -25227,12 +23164,12 @@ const PortalFooter = /*#__PURE__*/Object.freeze({
25227
23164
  FooterNoPoweredBy: FooterNoPoweredBy
25228
23165
  });
25229
23166
 
25230
- const scenario$7 = "Feature: Hero Unit\r\n\r\n Background: A portal with a hero unit exists\r\n Given a hosted portal\r\n And the portal has hero unit on the login page\r\n And a user is viewing the login page\r\n\r\n Scenario: The hero unit defaults to a single column layout\r\n Given a hero unit does not have a \"columns\" prop\r\n But the following html is wrapped by the hero unit\r\n \"\"\"\r\n <sqm-portal-login></sqm-portal-login>\r\n <div slot=\"secondary-column\">\r\n <h1 style=\"text-align:center\">Get Referring!</h1>\r\n <p style=\"text-align:center\">\r\n Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do\r\n eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim\r\n ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut\r\n aliquip ex ea commodo consequat. Duis aute irure dolor in\r\n reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla\r\n pariatur.\r\n </p>\r\n </div>\r\n \"\"\"\r\n Then only a single column will be displayed\r\n And within it will be the login component\r\n\r\n Scenario Outline: The hero unit supports single or dual column layouts\r\n Given a hero unit with prop \"columns\" having <columnValue>\r\n And it wraps <html>\r\n Then the hero unit displays <columnValue> columns\r\n Examples:\r\n | columnValue | html |\r\n | 1 | <h1>Column 1!</h1> |\r\n | 2 | <h1>Column 1!</h1><div slot=\"secondary-column\"><h1 style=\"text-align:center\">Column 2!</h1></div> |\r\n\r\n Scenario: HTML to be displayed in the second column comes from the \"secondary-column\" slot\r\n Given a hero unit with \"columns\" \"2\"\r\n And the following html\r\n \"\"\"\r\n <h1>Column 1!</h1>\r\n <div>\r\n <h1 style=\"text-align:center\">Column 2!</h1>\r\n </div>\r\n \"\"\"\r\n When the hero unit is rendered\r\n Then only one column is displayed with content\r\n And column 1 will contain the \"Column 1!\" text\r\n And column 1 will contain the \"Column 2!\" text\r\n When the div for column two is updated to have 'slot=\"secondary-column\"'\r\n Then the two columns are displayed with content\r\n And column 1 will contain the \"Column 1!\" text\r\n And column 2 will contain the \"Column 2!\" text\r\n\r\n Scenario Outline: A background for the hero unit can be set as an image or colour\r\n Given a hero unit with <backgroundPropValue>\r\n Then the background will be <background>\r\n Examples:\r\n | background | background |\r\n | https://images.unsplash.com/photo-1599676821464-3555954838d | image of misty mountains |\r\n | LightSlateGrey | light slate grey |\r\n | #00FF00 | green |\r\n | rgb(128,0,128) | purple |\r\n\r\n Scenario Outline: Wrap Direction can be configured for mobile experiences\r\n Given a hero unit with the following HTML\r\n \"\"\"\r\n <h1>Column 1!</h1>\r\n <div slot=\"secondary-column\">\r\n <h1 style=\"text-align:center\">Column 2!</h1>\r\n </div>\r\n \"\"\"\r\n And prop \"wrap-direction\" has <value>\r\n When the window width is less than 600px\r\n Then the two columns will stack\r\n And <column> will be on top\r\n Examples:\r\n | value | column |\r\n | wrap | 1 |\r\n | wrap-reverse | 2 |\r\n | | 1 |";
23167
+ const scenario$6 = "Feature: Hero Unit\r\n\r\n Background: A portal with a hero unit exists\r\n Given a hosted portal\r\n And the portal has hero unit on the login page\r\n And a user is viewing the login page\r\n\r\n Scenario: The hero unit defaults to a single column layout\r\n Given a hero unit does not have a \"columns\" prop\r\n But the following html is wrapped by the hero unit\r\n \"\"\"\r\n <sqm-portal-login></sqm-portal-login>\r\n <div slot=\"secondary-column\">\r\n <h1 style=\"text-align:center\">Get Referring!</h1>\r\n <p style=\"text-align:center\">\r\n Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do\r\n eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim\r\n ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut\r\n aliquip ex ea commodo consequat. Duis aute irure dolor in\r\n reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla\r\n pariatur.\r\n </p>\r\n </div>\r\n \"\"\"\r\n Then only a single column will be displayed\r\n And within it will be the login component\r\n\r\n Scenario Outline: The hero unit supports single or dual column layouts\r\n Given a hero unit with prop \"columns\" having <columnValue>\r\n And it wraps <html>\r\n Then the hero unit displays <columnValue> columns\r\n Examples:\r\n | columnValue | html |\r\n | 1 | <h1>Column 1!</h1> |\r\n | 2 | <h1>Column 1!</h1><div slot=\"secondary-column\"><h1 style=\"text-align:center\">Column 2!</h1></div> |\r\n\r\n Scenario: HTML to be displayed in the second column comes from the \"secondary-column\" slot\r\n Given a hero unit with \"columns\" \"2\"\r\n And the following html\r\n \"\"\"\r\n <h1>Column 1!</h1>\r\n <div>\r\n <h1 style=\"text-align:center\">Column 2!</h1>\r\n </div>\r\n \"\"\"\r\n When the hero unit is rendered\r\n Then only one column is displayed with content\r\n And column 1 will contain the \"Column 1!\" text\r\n And column 1 will contain the \"Column 2!\" text\r\n When the div for column two is updated to have 'slot=\"secondary-column\"'\r\n Then the two columns are displayed with content\r\n And column 1 will contain the \"Column 1!\" text\r\n And column 2 will contain the \"Column 2!\" text\r\n\r\n Scenario Outline: A background for the hero unit can be set as an image or colour\r\n Given a hero unit with <backgroundPropValue>\r\n Then the background will be <background>\r\n Examples:\r\n | background | background |\r\n | https://images.unsplash.com/photo-1599676821464-3555954838d | image of misty mountains |\r\n | LightSlateGrey | light slate grey |\r\n | #00FF00 | green |\r\n | rgb(128,0,128) | purple |\r\n\r\n Scenario Outline: Wrap Direction can be configured for mobile experiences\r\n Given a hero unit with the following HTML\r\n \"\"\"\r\n <h1>Column 1!</h1>\r\n <div slot=\"secondary-column\">\r\n <h1 style=\"text-align:center\">Column 2!</h1>\r\n </div>\r\n \"\"\"\r\n And prop \"wrap-direction\" has <value>\r\n When the window width is less than 600px\r\n Then the two columns will stack\r\n And <column> will be on top\r\n Examples:\r\n | value | column |\r\n | wrap | 1 |\r\n | wrap-reverse | 2 |\r\n | | 1 |";
25231
23168
 
25232
23169
  const Hero_stories = {
25233
23170
  title: "Hero Layout",
25234
23171
  parameters: {
25235
- scenario: scenario$7,
23172
+ scenario: scenario$6,
25236
23173
  },
25237
23174
  };
25238
23175
  const LoginOneColumn = () => {
@@ -25409,12 +23346,12 @@ const Hero = /*#__PURE__*/Object.freeze({
25409
23346
  TwoColumnLoginWithImgElement: TwoColumnLoginWithImgElement
25410
23347
  });
25411
23348
 
25412
- const scenario$8 = "@owner:sam\r\n@author:sam\r\n\r\nFeature: Referral Iframe\r\n\r\n Used to provide an external form for submitting referral leads using the current user's referral code\r\n\r\n Background: A user is logged in\r\n Given there is a logged in user\r\n\r\n @motivating\r\n Scenario: Referral code is passed to the iframe as a query parameter\r\n Given the \"iframe-src\" is \"https://example.com\"\r\n And the user has navigated to \"/refer\"\r\n And the user's referral code is \"BOBBYREFER\"\r\n When the iframe content is loaded\r\n Then the iframe url will be \"https://example.com?rsCode=BOBBYREFER\"\r\n\r\n @ui\r\n Scenario Outline: The height and width of the iFrame can be controlled via props\r\n Given the \"iframe-src\" is \"https://example.com\"\r\n And the iframe content is 1000x1000\r\n And the \"iframe-height\" is set to <heightValue>\r\n And the \"iframe-width\" is set to <widthValue>\r\n Then the content of the iframe will be displayed with scrollbars\r\n And the dimension of the iFrame displayed will be 500x500\r\n When the \"iframe-height\" is set to <heightValue>\r\n And the \"iframe-width\" is set to <widthValue>\r\n Then the full content of the iframe will be displayed on the page\r\n And the dimension of the iFrame displayed will be 1000x1000\r\n Examples:\r\n | heightValue | widthValue |\r\n | 500px | 500px |\r\n | 50% | 50% |\r\n\r\n @minutae\r\n Scenario Outline: The iFrame will fail fast if a iFrame source isn't provided\r\n Given \"iframe-src\" <mayBeAnAttribute>\r\n And it <mayHaveValue>\r\n When a user views the referral iFrame component\r\n Then an alert with an error message is displayed in place of the iFrame\r\n And it has a details section\r\n When \"More details\" is clicked\r\n Then the following information will be displayed\r\n | component being used |\r\n | missing attribute(s) |\r\n\r\n Examples:\r\n | mayBeAnAttribute | mayHaveValue |\r\n | is not an attribute | N/A |\r\n | is an attribute | \"\" |\r\n | is an attribute | |";
23349
+ const scenario$7 = "@owner:sam\r\n@author:sam\r\n\r\nFeature: Referral Iframe\r\n\r\n Used to provide an external form for submitting referral leads using the current user's referral code\r\n\r\n Background: A user is logged in\r\n Given there is a logged in user\r\n\r\n @motivating\r\n Scenario: Referral code is passed to the iframe as a query parameter\r\n Given the \"iframe-src\" is \"https://example.com\"\r\n And the user has navigated to \"/refer\"\r\n And the user's referral code is \"BOBBYREFER\"\r\n When the iframe content is loaded\r\n Then the iframe url will be \"https://example.com?rsCode=BOBBYREFER\"\r\n\r\n @ui\r\n Scenario Outline: The height and width of the iFrame can be controlled via props\r\n Given the \"iframe-src\" is \"https://example.com\"\r\n And the iframe content is 1000x1000\r\n And the \"iframe-height\" is set to <heightValue>\r\n And the \"iframe-width\" is set to <widthValue>\r\n Then the content of the iframe will be displayed with scrollbars\r\n And the dimension of the iFrame displayed will be 500x500\r\n When the \"iframe-height\" is set to <heightValue>\r\n And the \"iframe-width\" is set to <widthValue>\r\n Then the full content of the iframe will be displayed on the page\r\n And the dimension of the iFrame displayed will be 1000x1000\r\n Examples:\r\n | heightValue | widthValue |\r\n | 500px | 500px |\r\n | 50% | 50% |\r\n\r\n @minutae\r\n Scenario Outline: The iFrame will fail fast if a iFrame source isn't provided\r\n Given \"iframe-src\" <mayBeAnAttribute>\r\n And it <mayHaveValue>\r\n When a user views the referral iFrame component\r\n Then an alert with an error message is displayed in place of the iFrame\r\n And it has a details section\r\n When \"More details\" is clicked\r\n Then the following information will be displayed\r\n | component being used |\r\n | missing attribute(s) |\r\n\r\n Examples:\r\n | mayBeAnAttribute | mayHaveValue |\r\n | is not an attribute | N/A |\r\n | is an attribute | \"\" |\r\n | is an attribute | |";
25413
23350
 
25414
23351
  const ReferralIframe_stories = {
25415
23352
  title: "Referral Iframe",
25416
23353
  parameters: {
25417
- scenario: scenario$8,
23354
+ scenario: scenario$7,
25418
23355
  },
25419
23356
  };
25420
23357
  const props = {
@@ -25445,12 +23382,12 @@ const ReferralIframe$1 = /*#__PURE__*/Object.freeze({
25445
23382
  ReferralIframeError: ReferralIframeError
25446
23383
  });
25447
23384
 
25448
- const scenario$9 = "@owner:sam\r\n@author:sam\r\n\r\nFeature: Name Fields\r\n\r\n Fields to be used to fill the first and last name of a user during registration\r\n\r\n Background:\r\n Given the current page is \"/register\"\r\n\r\n @motivating\r\n Scenario: Both first name and last name are required\r\n Given the email field has valid input\r\n And the password field has valid input\r\n And first name field is empty\r\n And last name field is empty\r\n When register is clicked\r\n Then the name fields will be highlighted in red\r\n And the error messages will say \"Cannot be empty\"\r\n\r\n @motivating\r\n Scenario: First and last name are upserted with the SaaSquatch user\r\n Given all fields have been filled with data\r\n | firstName | lastName | email | password |\r\n | Bob | Testerson | bob@example.com | SecurePassword1 |\r\n When register is clicked\r\n Then the email verification page will be loaded\r\n And the user will be upserted\r\n And the SaaSquatch user will contain data\r\n | firstName | lastName | email |\r\n | Bob | Testerson | bob@example.com |\r\n\r\n";
23385
+ const scenario$8 = "@owner:sam\r\n@author:sam\r\n\r\nFeature: Name Fields\r\n\r\n Fields to be used to fill the first and last name of a user during registration\r\n\r\n Background:\r\n Given the current page is \"/register\"\r\n\r\n @motivating\r\n Scenario: Both first name and last name are required\r\n Given the email field has valid input\r\n And the password field has valid input\r\n And first name field is empty\r\n And last name field is empty\r\n When register is clicked\r\n Then the name fields will be highlighted in red\r\n And the error messages will say \"Cannot be empty\"\r\n\r\n @motivating\r\n Scenario: First and last name are upserted with the SaaSquatch user\r\n Given all fields have been filled with data\r\n | firstName | lastName | email | password |\r\n | Bob | Testerson | bob@example.com | SecurePassword1 |\r\n When register is clicked\r\n Then the email verification page will be loaded\r\n And the user will be upserted\r\n And the SaaSquatch user will contain data\r\n | firstName | lastName | email |\r\n | Bob | Testerson | bob@example.com |\r\n\r\n";
25449
23386
 
25450
23387
  const NameFields_stories = {
25451
23388
  title: "Name Fields",
25452
23389
  parameters: {
25453
- scenario: scenario$9,
23390
+ scenario: scenario$8,
25454
23391
  },
25455
23392
  };
25456
23393
  const props$1 = {
@@ -25488,279 +23425,6 @@ const NameFields$1 = /*#__PURE__*/Object.freeze({
25488
23425
  NameFieldsWithErrors: NameFieldsWithErrors
25489
23426
  });
25490
23427
 
25491
- const baseResponse = (data, selected = null) => ({
25492
- states: {
25493
- content: {
25494
- text: {
25495
- notAvailableError: "{unavailableReason, select, US_TAX {US Tax limit} INSUFFICIENT_REDEEMABLE_CREDIT {Not enough points} other {Not available} }",
25496
- },
25497
- },
25498
- redeemStage: "chooseReward",
25499
- amount: 0,
25500
- exchangeError: false,
25501
- loading: false,
25502
- selectedItem: selected,
25503
- selectedStep: null,
25504
- },
25505
- data: {
25506
- exchangeList: data,
25507
- },
25508
- callbacks: {
25509
- exchangeReward: null,
25510
- resetState: null,
25511
- setStage: null,
25512
- setExchangeState: null,
25513
- refs: null,
25514
- },
25515
- refs: null,
25516
- });
25517
- const baseReward$2 = {
25518
- key: "",
25519
- name: "",
25520
- description: "",
25521
- imageUrl: "",
25522
- available: true,
25523
- unavailableReason: null,
25524
- unavailableReasonCode: null,
25525
- ruleType: "FIXED_GLOBAL_REWARD",
25526
- sourceUnit: "POINT",
25527
- sourceValue: 10,
25528
- prettySourceValue: "10 SaaSquatch Points",
25529
- sourceMinValue: null,
25530
- prettySourceMinValue: null,
25531
- sourceMaxValue: null,
25532
- prettySourceMaxValue: null,
25533
- destinationMinValue: null,
25534
- prettyDestinationMinValue: null,
25535
- destinationMaxValue: null,
25536
- prettyDestinationMaxValue: null,
25537
- globalRewardKey: "",
25538
- destinationUnit: null,
25539
- steps: [],
25540
- };
25541
- const notEnoughPoints = {
25542
- available: false,
25543
- unavailableReasonCode: "INSUFFICIENT_REDEEMABLE_CREDIT",
25544
- };
25545
- const usTax = {
25546
- available: false,
25547
- unavailableReasonCode: "US_TAX",
25548
- };
25549
- const selected = {
25550
- key: "r1",
25551
- };
25552
- const imageUrl = (props) => ({
25553
- imageUrl: props,
25554
- });
25555
- const description = (props) => ({
25556
- description: props,
25557
- });
25558
- const fixedValue = (props) => ({
25559
- prettySourceValue: props,
25560
- });
25561
- const variableValue = (min, max, text) => ({
25562
- ruleType: "VARIABLE_CREDIT_REWARD",
25563
- sourceMinValue: min,
25564
- prettySourceMinValue: min + " " + text,
25565
- sourceMaxValue: max,
25566
- prettySourceMaxValue: max + " " + text,
25567
- });
25568
- const data = [
25569
- {
25570
- ...baseReward$2,
25571
- ...description("Free swag with a promo code"),
25572
- ...imageUrl("https://i.imgur.com/Ds7M19I.png"),
25573
- ...fixedValue("40 SaaSquatch Points"),
25574
- },
25575
- {
25576
- ...baseReward$2,
25577
- ...selected,
25578
- ...description("Visa® Prepaid Card USD"),
25579
- ...imageUrl("https://i.imgur.com/4s3q2zz.png"),
25580
- ...variableValue(20, 80, "SaaSquatch Points"),
25581
- },
25582
- {
25583
- ...baseReward$2,
25584
- ...description("A very exclusive gift box"),
25585
- ...imageUrl("https://i.imgur.com/XuiJi4l.png"),
25586
- ...fixedValue("30 SaaSquatch Points"),
25587
- },
25588
- {
25589
- ...baseReward$2,
25590
- ...description("$50 Store credit"),
25591
- ...imageUrl("https://i.imgur.com/WkCMVSE.png"),
25592
- ...fixedValue("100 SaaSquatch Points"),
25593
- },
25594
- {
25595
- ...baseReward$2,
25596
- ...description("Variable amount of store credit"),
25597
- ...imageUrl("https://i.imgur.com/Jn2fE0s.png"),
25598
- ...variableValue(20, 100, "SaaSquatch Points"),
25599
- },
25600
- {
25601
- ...baseReward$2,
25602
- ...notEnoughPoints,
25603
- ...description("A very rare cactus"),
25604
- ...imageUrl("https://i.imgur.com/CvCdpXc.png"),
25605
- ...fixedValue("2000 SaaSquatch Points"),
25606
- },
25607
- {
25608
- ...baseReward$2,
25609
- ...usTax,
25610
- ...description("$1000 Store credit"),
25611
- ...imageUrl("https://i.imgur.com/I9FCh9Z.png"),
25612
- ...fixedValue("2000 SaaSquatch Points"),
25613
- },
25614
- {
25615
- ...baseReward$2,
25616
- ...notEnoughPoints,
25617
- ...description("A holiday gift box"),
25618
- ...imageUrl("https://i.imgur.com/HBJS1WH.png"),
25619
- ...fixedValue("100 SaaSquatch Points"),
25620
- },
25621
- ];
25622
- const rewardExchange = {
25623
- ...baseResponse(data),
25624
- };
25625
- const rewardExchangeSelected = {
25626
- ...baseResponse(data, {
25627
- ...baseReward$2,
25628
- ...selected,
25629
- ...description("Visa® Prepaid Card USD"),
25630
- ...imageUrl("https://i.imgur.com/4s3q2zz.png"),
25631
- ...variableValue(20, 80, "SaaSquatch Points"),
25632
- }),
25633
- };
25634
- const test2 = {
25635
- states: {
25636
- content: {
25637
- text: {
25638
- buttonText: "Exchange Rewards",
25639
- ignored: true,
25640
- },
25641
- },
25642
- redeemStage: "chooseAmount",
25643
- amount: 0,
25644
- exchangeError: false,
25645
- loading: false,
25646
- selectedItem: {
25647
- key: "r4",
25648
- name: "Salmon Coins",
25649
- description: "Points for Salmon Coins",
25650
- imageUrl: "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wCEAAoHCBUWFRgWFRYYGRgZGh4cHBocHR4aHxwdGRwZHBwfHh4cIS4lHB4rHxoYJjgnKy8xNTU1GiQ7QD00Py40NTEBDAwMEA8QHhISHzQrJCs0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NP/AABEIAIABiQMBIgACEQEDEQH/xAAcAAEAAQUBAQAAAAAAAAAAAAAABAECAwUGBwj/xAA+EAABAwICBgYHBwQCAwAAAAABAAIRAyEEMQUSQVFhcQYTgZGhsQciMkJScvAUYoKSwdHhorLC8SMzFUNj/8QAGAEBAQEBAQAAAAAAAAAAAAAAAAECAwT/xAAfEQEBAQEBAQEAAwEBAAAAAAAAARECEiExE0FRYQP/2gAMAwEAAhEDEQA/APZkREBERAREQEREBERAREQEREBERAREQERY6jw0EkgACSTYADMk7AgvVjHgzBBixgzBXmfSjpqapNLDuLaeTqgs58Zhl/Vbx28BnA0Lj3UXNcx0G0tmxHwkW1tvLhks3qRZHryqtdonSjK7dZtnCzmzJaf1HFbFWXUERFQREQEREBERAREQEREBERAREQEREBERAREQEREBERAREQEREBERAREQEREBERAREQEREBFSVqdNafoYVoNaoAT7LBdzvlaLxxyG0oNlUqBoLnEAASSTAAFySTkF5H0z6WHEuNKiSKANx7JqkXl20MFoHfsAidKemVTFeo31KPwAgl0ZF7hY7IaLA39aBHNsIO0cv34eaCVSeBlcnblb/FqnYatxz3WLhw+FnHMrVMfx7/MjyCkMI5znx+Y7flCx1NajqNGaUdTIex2qRYRkRuj3h+y9D0Lp2nXETq1APWb5xv5ZjxXj9Ovt8dsdmXIHmVKw+OIg62rGWqQIINvWs1vZJWeZeVuV7gi5Xoj0j+0g03kGowSSMnNkCTYAOkjK17cOqXSXWBERUEREBERAREQEREBERAREQEREBERBRFjq1WtaXOcGtAkuJAAG8k2C5LS/TukyW0GGq74j6jO83PcAd6DslQFeI6Y6VYmvOvWcG/BS9RvIwZcODiV1vomonq69QWa57Wht82N1i6+ZIe0diD0JERAREQEREBERARFgxOJZTaX1HtY0ZucQAOZNkGdFxmkvSJg2SGa9Y5eo2G/mdEji2VzmO9JWIdalTp0xvcS93+IHcUHqyiYvH0qQmpUYwb3ua3+4rxTG9IsbV9vEVI3NPVjuZC1XUyST7RvfM85zQezYrptgGW68OO5jXP8AFojxWoxHpMw49ilVfxOowH+onwXmzcKdqudhrG0oOyr+k+qfYwzG/M9zvANatfX9ImOd7Ios5NJI/M4+S55lCQREFXvoaosJU0ScV0u0g+ZxL28GtYzxa2fFaKs173F73ue45uc4uceZcSStuyiI8+zmqfZNvDJNGlGGVww5W21BFh2eCubSMAxCmrjUCkruqK2v2dUNAxZTVazUdlJU7A6Rq0rs1J3vp06jvzPYXeKyCiQL5jzhUZhrXAngg2+H6c41lmmnx/42j+2FLZ6RcbtFA/gd+j1z4o8Fa2lJNoTTHV0/SVifeo0Ty1m+bipdL0nO9/DDm2p+hZ+q4p9A7B3rG7D7ldR6NR9JlA+1Qqj5Sx3m4KfR9IOCd7RqM+ZhP9msvKjQVr6B2Jo9oodLcC/LEsHzSz+8BbLDaRo1P+urTf8AK9rvIrwQUSrTSDtxummPohF4Dh8VXZ/11qrAPhe9o7gYUmp0kxzmln2mrB3EB35wNYd6uo9oxukqNETWqspg5a7mtnlJute3pbgSYGJp9pgd5svC6mHc5xcXFzjmXEknmTcqVo3Btc8Nq1RSZHt6jn8hqtuVLf8AFkfQVGs17Q5rg5pyIIIPIjNZFxnQgYXDsdTZjadUvdrBtqcWizC4mTtPALswVZUVREVBEWr0tpujh2k1HXiQwXc7k3ntMBBs1y+nOmFKjLaUVXjODDW/M7aeA3XIXHae6XVq8tE06RkBjbufwc7ad7R6oyOstA8SBrmBsYMvC7nclm0TdJ6Zq4l01Hl8GzR6rGn7rbxzu6+ajOpW9cwPhH6/RVGHdYcBJ7hYfVlewxlnvzPfkPBc63GsxNODkQBsi8cBGXYAvbui+jxQwtFgEHUDncXP9Z09pK8r6N4QV8XSY4Swv1nWMEMBeQTx1YjivbF1n4wIiKgiIgIoOkdJUaDdatUaxuzWMExsAzceAuuG016RjduFpz/9KgMfhYDPeRyQeh1KgaC5xAAuSTAA4k5LldJ9PsHSkNc6s7dTEt/OYaRyleZY/FVq/rYis525rnta0cmWaOwBR6VJvZs4q4mur0j6Q8U+RRYykN//AGO4GXANH5SuWxlWrWdr13ve7e8zHyjJo4CFIpU5dnEe7CzMpgkGO02gBTYIlHCNOWaq7CxnCmsLGky4H9O7MqSXMd7Jnz7Vf0a84Y7M1e3DAGTErOQcoVGAgXud6xeo1jC+iDsmLgHfCyNZa43LIAeCrqu4f6UvS4w06bRIBvtG76/VXhuYiwyWRtMzO+yv1Dv3qejEcuEScuSqy4BG0LK6mdpsVXqSs+lxHfRsdWATwVWstfwUjqztOfJWll4m5k5d6noxH1A4R5KoZsj+Fnbh4yt2BVFMzF8s7J6XGBzIyEo1ucgjmpXUcSqvpwJv5p6MRXU4KPZAsCeA4qUKMDWEmc8haMzKvFDinpMQxTtzWGphSQIMR4rZ9TxKtFDVMTmdt8k9JiA6lA9bZmVa2nrXGV4Wy6kn/SCieCejGt+z7xmqNw42dotmtmKBz3oaJ2Af7V0xrRQWB2GcTIIjzW2dhycx9cVUUjuWtRqeom8Kx1K4EEzt3dq2tXCuIgerfNXtoHIieJj9E1WndhQsuHxFWkJp1XsH3HOb4A3WxNI5kW7FjfhpvfMfUKWkS8J0xxzBPWB42B7GnxbB8Vs6HpHrCzsOxzvuuczwId5rROpDYIUX7MdbIRGe8/tmp7MbLSXS/F1zGv1TDbVpktJ5vnW7iBwWrNSZtebn6vzOfFVdRGcXG/gsRBDshzlX2YvNM5iBPvHyaNg4eG1YjTGwEnaTf67SFKaRffynyusVWmTcz2sJ7tdat2J/axur7zm8p1u5rLDvV9erAsCecADs/hVYHDIv7NRo8FHxTnfAT+L9LrEm1b+Oz9GGj9Z9XEOAloFNsTm71nk615jU/MV6UuX9HmC6vBMMQajnVD+Iw3+lrV1C7MiIiAuO9IHSKthWU20GEvqlw19XWDA3VyGRcS4RNrGxXYrnOk2lMTRNPqKTHtdOs5xIAgthoIyLpME2tkUHj+OOIc7rq7aznEj13tI5Aa1o3NFuCuwrdbWE6riLS3IjxFoyBXqjelDXtLK+FqesIcwalQXzBDi0kfhXKaVwNBjvUa4U3e44arqZ+66TLfEdsiejHLvwuIBa6wMga4aHsc0DIyQGk2sYNjvKtpawqOLWwwxbjAkwbiTPet7UoPp2JljvZeNvBw913gdig1KV5XK3LrUmzGLDTrtaTMmOU2/lS37ABbb/AAsOFoE1GQPeb5hSXsHblO1T18Xz9Ryxu5VwLTDzuj/L9JVXtUmizOMnF3c0GPM9y1OrSxjartiFiqAufVakUoP1hJEZrK6mSRBi97Z71cwZdir9d4WNXFdVXNEqx0ERvVW2Fgp6XyuLFY5h1gda0XEZ9queyYuREG31krnH+fruU9LimomoMz2LIFR0C5OXYI4p6MYxTOtMjVjLirnTcNF4tOXarmNMkmI2b+9Zm7Pr6/hPRjBTa7Ii+/YVke0xbPYs4CAJ6MYg3KyvaxXGYnM7BvVackXEHd2/68U9GMb6YIIOX6K3qwIHYJ+tyyUmOvr6udonLjO1XagsSMtvZCejGCjh2tsNu03klZQxYsSx9tRwF7yFlkNgE3yE7SrOk8mp9fXasLcOQ4nXJnJuwfWaz6xmIsRnbPkriP3VnR5Y9S/P/StbB+uav2fXFY2MDRAgBb1PK5zARBEqxrCTIJABiIF/4V7XAHNXdYO1X6mLKtEOBaQSCLqw4Yauq31Rsjv2rKao+vFKeHcSS1r3TsDSc+Q4KWUYxTsNvNW1mgA2mPFTv/H4g5Uan5CPNYq2isRBmg8j5Z8FPPRsatzgXECLfV9ywOpif45fXapr6DwdUtLTuIIPcVb1WrcxuG4fynMpsQyyPLb+gPkotRzQbhp5kDwICmVXjeQOYjucIBUWq8jcR94FvcW2K758xz36xlrfgj8MjwJUSs1v3B4f3BSw5o90s4tgjvb+yxYydWQ6RxA8wYWZ+rXqfo9x/WYNjSQTSJpmDsEFv9JA7CuqXlPotx5biKlLJr6etH3mERH4XOmNwXqy6siIiArHNBEG4KvRBp8XoNjrsJpncAHM7WnIfKWrVVKGKpWcwPZvpme9jr90rrEQcBUbQMyzVM3nWaAeAB1QeS1dbRjM2vjg6/iP2XpOJwTH+00ExEizo5i8cFrH9Gqcy2AeLWu8gFiytS44puHYy4cHOi0ZDZKgVMPORlegO0PUbZmpHzOb4AR4qK/RNfiB90yfF58li87+rOscTTwT5HqnmRAHG+alDDRyFu/+JK6N2BLTdpHF0yVKo4VgF4KvM35C2OKqtDZLnBvMxMhRnYpnuBzvlB8yt5pvo/TZrVWAu2lusZ7Jz5LRMqUzsaOcHzlZ65y/VnSprH4I+ZzR5lOsd8LOx7VIAaBIcR2D9WfqrqYJMes7dZpn8oXOyNzWClUJIBaR4/QUkMU+ngY4k5/sPFX/AGXZ9bFm81djWOaRECZsrw1T/syDDeaxjSG1nmq9XkpzMMq9QfBXE1DDFka3fkpXUHcqmgdmcJhqKykGiGgDkq6ql9QqUsKAIE773vxKmLqMGqrWKaMOrm4fbClVE1FaaUrYjDqvUKfVa80bz3KvUeS2LcNfKyzNw4GasqfGpOFJtcRe23f2LL9iO7gtoQR7LHu+Vrj5BafFaRfJaPVjOxkcxs7V2541z66g/CATrEfsoVUMBzJ2WvdYMRUnN2tO0u1e45FYX1CPasD8Q1f62+qe0Ld5iemdzm7bc7HslZcO9jXAlrXfdfrDuDSCe2QorfxAb7Fve2W94UzDwLWjgBHhY9wUsw/XUaG0i1zmsZh2NnMtgQNp9n9V1C0fR3AajNciC4WERDc9m+3gt4u/O59crm/FURFpEfE4Zjxqva1w3ET3blz2keh9N96bi0/C712nhJ9bvJ5LqUQeTaX6P1qMl7SGj32+s3tOwcHRwXPPBbmNXc5t2nmNy95IXM6W6H0Ksup/8Tz8Ilp5sy7oWbB5WwbQPxM/Vv8AEJUo6wkAO4tMH9j2Qttpbo5Xw51ns9Uf+xhJb2mJbycAOK1vWA3zO8eq79ncslj7rSnRrGNw+Mo1HEta18O1rQ14LHE2yAdO3Je7r54xFyYMjcQAe79oXsvQfSn2jCUy6demOrfOZLAIPa3VPMncuusujREQEREBERAREQEREFpaCIN1FqaPpu92OVvJTEQaitoVpye4c4P7LWV+i0/A7iRB7wupRZvMqy2OHf0OvIZB3tcP8lJo6EcwWYRvPtE9sldeiniL6rlRgnDNju4qx2F4fWxdakJeIeq5A0An2ZdaWDcO5WdQz4W9wWP4v+r7rlxhQs1LBt2roDhGfC3uT7Iz4fNanGJ6rmK1WgDAlxytsO6+SjPxLB7rwOQPkV02J0PRqTrNgxGsLOHbt5GQua0hoavSksHWM+7JcObMxzaT8oTrn5+Lz1/qjcVSPvgfN6v91ipjKQNxF1znXcOBvEcJH6iVJ0bpHq3TAc33mOEC+4gEA5XcvPLNyt38+N6KKuZQnIE8gt9hyxzQ5oaQdwH1KkQuv8Mv9se655mCecmHtt5rMNFvPwt8fJbtFqf+PKe61bNED3nk8gB5ypFLR7GmYk/eMxyGSmItTjmfkS21VRcXgqdQRUY10ZEi45HMHkpSLaOS0l0Qa6TRcWnc4m/4oJI+YOXLYvRVagfWa5g+JsBp5gkscTwIPBeqqhErN5laleTUmkH2Rzb/AMZ7Wmx71v8AQOB6yqJ9lvrOnbGw75MeK6itoOg6/VgH7stHcLHuUjBYFlIEMETcnMlSc1fXxMREW2BERAREQEREBc3pbodha8nV6t596nDZ5tjVPOJ4rpEQeU6U9H+Ibem5lYbB7Du5xj+rsW89HuiMThzVFZmoxwbAJBlwJuIOUE35dncopn1dVREVQREQEREBERAREQEREBERAREQEREBERAREQEREGuxuiqNW72An4hLXfmbBjhktFi+h+2nV5B4y/EyI7l1qLN5l/VlsaDo9oytQLmvc0sI2OJOtaDBYItO07Fv0RWTJhbqqIiqCIiAiIgIiICIiAiIgIiICIiAiIgIiICIiAiIg//Z",
25651
- available: true,
25652
- unavailableReason: null,
25653
- unavailableReasonCode: null,
25654
- ruleType: "VARIABLE_CREDIT_REWARD",
25655
- sourceUnit: "POINT",
25656
- sourceValue: null,
25657
- prettySourceValue: null,
25658
- sourceMinValue: 1,
25659
- prettySourceMinValue: "1 Point",
25660
- sourceMaxValue: 100,
25661
- prettySourceMaxValue: "100 Points",
25662
- destinationMinValue: 1,
25663
- prettyDestinationMinValue: "1 Salmon Coin",
25664
- destinationMaxValue: 100,
25665
- prettyDestinationMaxValue: "100 Salmons",
25666
- globalRewardKey: null,
25667
- destinationUnit: "TESTUNIT",
25668
- steps: [
25669
- {
25670
- sourceValue: 1,
25671
- prettySourceValue: "1 Point",
25672
- destinationValue: 1,
25673
- prettyDestinationValue: "1 Salmon Coin",
25674
- available: true,
25675
- unavailableReasonCode: null,
25676
- unavailableReason: "",
25677
- },
25678
- {
25679
- sourceValue: 2,
25680
- prettySourceValue: "2 Points",
25681
- destinationValue: 2,
25682
- prettyDestinationValue: "2 Salmons",
25683
- available: true,
25684
- unavailableReasonCode: null,
25685
- unavailableReason: "",
25686
- },
25687
- {
25688
- sourceValue: 3,
25689
- prettySourceValue: "3 Points",
25690
- destinationValue: 3,
25691
- prettyDestinationValue: "3 Salmons",
25692
- available: true,
25693
- unavailableReasonCode: null,
25694
- unavailableReason: "",
25695
- },
25696
- {
25697
- sourceValue: 4,
25698
- prettySourceValue: "4 Points",
25699
- destinationValue: 4,
25700
- prettyDestinationValue: "4 Salmons",
25701
- available: true,
25702
- unavailableReasonCode: null,
25703
- unavailableReason: "",
25704
- },
25705
- {
25706
- sourceValue: 5,
25707
- prettySourceValue: "5 Points",
25708
- destinationValue: 5,
25709
- prettyDestinationValue: "5 Salmons",
25710
- available: true,
25711
- unavailableReasonCode: null,
25712
- unavailableReason: "",
25713
- },
25714
- ],
25715
- },
25716
- selectedStep: null,
25717
- },
25718
- data: {
25719
- exchangeList: null,
25720
- },
25721
- callbacks: {
25722
- exchangeReward: null,
25723
- resetState: null,
25724
- setStage: null,
25725
- setExchangeState: null,
25726
- refs: {
25727
- drawerRef: {},
25728
- },
25729
- },
25730
- refs: null,
25731
- };
25732
-
25733
- const RewardExchangeList_stories = {
25734
- title: "Components/Reward Exchange List",
25735
- };
25736
- const resizable$1 = {
25737
- width: "683px",
25738
- minWidth: "260px",
25739
- resize: "horizontal",
25740
- height: "fit-content",
25741
- overflow: "hidden",
25742
- };
25743
- const rewardExchange$1 = () => {
25744
- return (h("div", { style: resizable$1 },
25745
- h(RewardExchangeView, Object.assign({}, rewardExchange))));
25746
- };
25747
- const rewardExchangeSelected$1 = () => {
25748
- return (h("div", { style: resizable$1 },
25749
- h(RewardExchangeView, Object.assign({}, rewardExchangeSelected))));
25750
- };
25751
- const Default2 = () => {
25752
- return (h("div", { style: { ...resizable$1, height: "700px" } },
25753
- h(RewardExchangeView, Object.assign({}, test2))));
25754
- };
25755
-
25756
- const RewardExchangeList = /*#__PURE__*/Object.freeze({
25757
- __proto__: null,
25758
- 'default': RewardExchangeList_stories,
25759
- rewardExchange: rewardExchange$1,
25760
- rewardExchangeSelected: rewardExchangeSelected$1,
25761
- Default2: Default2
25762
- });
25763
-
25764
23428
  function deepFreeze(obj) {
25765
23429
  if (obj instanceof Map) {
25766
23430
  obj.clear = obj.delete = obj.set = function () {
@@ -28341,9 +26005,7 @@ const CucumberAddon = ({ story }, children) => {
28341
26005
  // No scenario or invalid. Ignoring.
28342
26006
  }
28343
26007
  return (h("div", null,
28344
- h("details", null,
28345
- h("summary", null, "Specs"),
28346
- result && h("pre", { innerHTML: result.value })),
26008
+ result && h("pre", { innerHTML: result.value }),
28347
26009
  children));
28348
26010
  };
28349
26011
 
@@ -28380,7 +26042,6 @@ const stories = [
28380
26042
  ReferralTableRewardsCell$1,
28381
26043
  UserName,
28382
26044
  PasswordField,
28383
- TaskCard$1,
28384
26045
  PortalTemplates,
28385
26046
  ProgramMenu$1,
28386
26047
  PoweredByImg,
@@ -28388,10 +26049,6 @@ const stories = [
28388
26049
  Hero,
28389
26050
  ReferralIframe$1,
28390
26051
  NameFields$1,
28391
- RewardExchangeList,
28392
- UseRewardExchangeList,
28393
- UseTaskCard,
28394
- UseRewardsTable
28395
26052
  ];
28396
26053
  const StencilStorybook = class {
28397
26054
  constructor(hostRef) {
@@ -28431,83 +26088,6 @@ const TableRow = class {
28431
26088
  }
28432
26089
  };
28433
26090
 
28434
- const TaskCard$2 = class {
28435
- constructor(hostRef) {
28436
- registerInstance(this, hostRef);
28437
- this.ignored = true;
28438
- /**
28439
- * @uiName Reward Amount
28440
- */
28441
- this.rewardAmount = 0;
28442
- /**
28443
- * @uiName Reward Unit
28444
- */
28445
- this.rewardUnit = "Points";
28446
- /**
28447
- * @uiName Title Text
28448
- */
28449
- this.cardTitle = "Title Text";
28450
- /**
28451
- * @uiName Description Text
28452
- */
28453
- this.description = "Description Text";
28454
- /**
28455
- * @uiName Goal Repeatable
28456
- */
28457
- this.repeatable = false;
28458
- /**
28459
- * @uiName Show Progress Bar
28460
- */
28461
- this.showProgressBar = false;
28462
- /**
28463
- * @uiName Goal Completion Number
28464
- */
28465
- this.goal = 1;
28466
- /**
28467
- * @uiName Progress Bar Steps
28468
- */
28469
- this.steps = false;
28470
- /**
28471
- * @uiName Show Goal Expiry
28472
- */
28473
- this.showExpiry = false;
28474
- /**
28475
- * @uiName Reward Duration
28476
- * @uiWidget DateRange
28477
- * @uiOptions {"allowPastDates":true, "months": 1}
28478
- */
28479
- this.rewardDuration = "/";
28480
- /**
28481
- * @uiName CTA Button Text
28482
- */
28483
- this.buttonText = "Complete Action";
28484
- /**
28485
- * @uiName CTA Button Link
28486
- */
28487
- this.buttonLink = "https://example.com/";
28488
- /**
28489
- * @uiName CTA Button Link Open in New Tab
28490
- */
28491
- this.openNewTab = false;
28492
- /**
28493
- * Select what type of stat to display for the goal. Manual paths are also supported.
28494
- *
28495
- * @uiWidget StatTypeSelectWidget
28496
- * @uiName Goal Progress Source
28497
- * @uiOptions {"version": 1.1}
28498
- */
28499
- this.statType = "/programGoals/count/Referral-Started%2Freferrals";
28500
- h$1(this);
28501
- }
28502
- disconnectedCallback() { }
28503
- render() {
28504
- const { props } = j$1() ? useDemoBigStat(this) : useBigStat(this);
28505
- const { value, statvalue } = props;
28506
- console.log(props, j$1());
28507
- return (h(TaskCardView, Object.assign({ progress: value, loading: !j$1() && value === undefined }, getProps(this))));
28508
- }
28509
- };
28510
-
28511
26091
  const debug$2 = browser("sq:global");
28512
26092
  const textStyles = `
28513
26093
  sqm-text {
@@ -28592,8 +26172,8 @@ const GET_USER_NAME = gql `
28592
26172
  `;
28593
26173
  function useUserName(props) {
28594
26174
  var _a, _b, _c, _d, _e, _f, _g, _h;
28595
- const user = T$1();
28596
- const res = en(GET_USER_NAME, {}, !(user === null || user === void 0 ? void 0 : user.jwt));
26175
+ const user = ne$1();
26176
+ const res = cn(GET_USER_NAME, {}, !(user === null || user === void 0 ? void 0 : user.jwt));
28597
26177
  const loading = res.loading;
28598
26178
  const username = ((_b = (_a = res.data) === null || _a === void 0 ? void 0 : _a.viewer) === null || _b === void 0 ? void 0 : _b.firstName) || ((_d = (_c = res.data) === null || _c === void 0 ? void 0 : _c.viewer) === null || _d === void 0 ? void 0 : _d.lastName)
28599
26179
  ? `${(_f = (_e = res.data) === null || _e === void 0 ? void 0 : _e.viewer) === null || _f === void 0 ? void 0 : _f.firstName} ${(_h = (_g = res.data) === null || _g === void 0 ? void 0 : _g.viewer) === null || _h === void 0 ? void 0 : _h.lastName}`
@@ -28633,4 +26213,4 @@ function useUserNameDemo(props) {
28633
26213
  }, props.demoData || {}, { arrayMerge: (_, a) => a });
28634
26214
  }
28635
26215
 
28636
- export { DividedLayout as sqm_divided_layout, EditProfile as sqm_edit_profile, FormMessage as sqm_form_message, SqmHookStoryContainer as sqm_hook_story_container, NavigationMenu as sqm_navigation_menu, PortalPasswordField as sqm_password_field, PortalChangePassword as sqm_portal_change_password, PortalFrame as sqm_portal_frame, PortalLogin as sqm_portal_login, PortalRegister as sqm_portal_register, ProgramMenu as sqm_program_menu, SqmReferralIframe as sqm_referral_iframe, ReferralTable as sqm_referral_table, ReferralTableCell as sqm_referral_table_cell, ReferralTableDateCell as sqm_referral_table_date_cell, ReferralTableRewardsCell as sqm_referral_table_rewards_cell, ReferralTableStatusCell as sqm_referral_table_status_cell, ReferralTableUserCell as sqm_referral_table_user_cell, SqmRewardExchangeList as sqm_reward_exchange_list, RewardsTable as sqm_rewards_table, RewardsTableColumn as sqm_rewards_table_column, SqmRouter as sqm_router, ShareButton as sqm_share_button, ShareLink as sqm_share_link, StencilStorybook as sqm_stencilbook, TableCell$1 as sqm_table_cell, TableRow as sqm_table_row, TaskCard$2 as sqm_task_card, Text as sqm_text, UserName$1 as sqm_user_name };
26216
+ export { DividedLayout as sqm_divided_layout, EditProfile as sqm_edit_profile, FormMessage as sqm_form_message, SqmHookStoryContainer as sqm_hook_story_container, NavigationMenu as sqm_navigation_menu, PortalPasswordField as sqm_password_field, PortalChangePassword as sqm_portal_change_password, PortalFrame as sqm_portal_frame, PortalLogin as sqm_portal_login, PortalRegister as sqm_portal_register, ProgramMenu as sqm_program_menu, SqmReferralIframe as sqm_referral_iframe, ReferralTable as sqm_referral_table, ReferralTableCell as sqm_referral_table_cell, ReferralTableDateCell as sqm_referral_table_date_cell, ReferralTableRewardsCell as sqm_referral_table_rewards_cell, ReferralTableStatusCell as sqm_referral_table_status_cell, ReferralTableUserCell as sqm_referral_table_user_cell, SqmRouter as sqm_router, ShareButton as sqm_share_button, ShareLink as sqm_share_link, StencilStorybook as sqm_stencilbook, TableCell$1 as sqm_table_cell, TableRow as sqm_table_row, Text as sqm_text, UserName$1 as sqm_user_name };