@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.
- package/CHANGELOG.md +48 -24
- package/dist/cjs/{ShadowViewAddon-d6a442a9.js → ShadowViewAddon-e9bacad0.js} +3 -3
- package/dist/cjs/{global-b957dd98.js → global-413d075c.js} +72 -284
- package/dist/cjs/{index.module-85eb6b4d.js → index.module-2925fe3b.js} +16 -18
- package/dist/cjs/loader.cjs.js +3 -3
- package/dist/cjs/mint-components.cjs.js +3 -3
- package/dist/cjs/{re-render-59955561.js → re-render-b1ad512d.js} +4 -4
- package/dist/cjs/sqm-asset-card.cjs.entry.js +1 -1
- package/dist/cjs/sqm-big-stat.cjs.entry.js +2 -2
- package/dist/cjs/{sqm-divided-layout_30.cjs.entry.js → sqm-divided-layout_26.cjs.entry.js} +389 -2813
- package/dist/cjs/sqm-graphql-client-provider.cjs.entry.js +4 -4
- package/dist/cjs/{sqm-leaderboard-rank-view-9114d9ad.js → sqm-leaderboard-rank-view-b1b55673.js} +2 -2
- package/dist/cjs/sqm-leaderboard-rank.cjs.entry.js +5 -5
- package/dist/cjs/sqm-leaderboard.cjs.entry.js +2 -2
- package/dist/cjs/sqm-name-fields.cjs.entry.js +1 -1
- package/dist/cjs/{sqm-navigation-sidebar-item-view-b565a10a.js → sqm-navigation-sidebar-item-view-1bad646a.js} +2 -2
- package/dist/cjs/sqm-navigation-sidebar-item.cjs.entry.js +3 -3
- package/dist/cjs/sqm-popup-container.cjs.entry.js +1 -1
- package/dist/cjs/{sqm-portal-email-verification-view-bd40f7eb.js → sqm-portal-email-verification-view-eeb4ca62.js} +1 -1
- package/dist/cjs/sqm-portal-email-verification.cjs.entry.js +13 -6
- package/dist/cjs/{sqm-portal-footer-view-b60e17c8.js → sqm-portal-footer-view-08a2efd5.js} +1 -1
- package/dist/cjs/sqm-portal-footer.cjs.entry.js +3 -3
- package/dist/cjs/sqm-portal-forgot-password.cjs.entry.js +18 -6
- package/dist/cjs/sqm-portal-logout.cjs.entry.js +3 -3
- package/dist/cjs/{sqm-portal-profile-view-c3b889d4.js → sqm-portal-profile-view-ce86369e.js} +1 -1
- package/dist/cjs/sqm-portal-profile.cjs.entry.js +6 -6
- package/dist/cjs/sqm-portal-protected-route.cjs.entry.js +5 -5
- package/dist/cjs/sqm-portal-reset-password.cjs.entry.js +14 -6
- package/dist/cjs/sqm-portal-verify-email.cjs.entry.js +15 -7
- package/dist/cjs/sqm-referral-table-column.cjs.entry.js +2 -2
- package/dist/cjs/sqm-referral-table-date-column.cjs.entry.js +2 -2
- package/dist/cjs/sqm-referral-table-rewards-column.cjs.entry.js +2 -2
- package/dist/cjs/sqm-referral-table-status-column.cjs.entry.js +2 -2
- package/dist/cjs/sqm-referral-table-user-column.cjs.entry.js +2 -2
- package/dist/cjs/sqm-share-code.cjs.entry.js +3 -3
- package/dist/cjs/{useDemoBigStat-9193e8c5.js → useDemoBigStat-d7a60992.js} +24 -121
- package/dist/collection/collection-manifest.json +3 -7
- package/dist/collection/components/sqm-big-stat/sqm-big-stat.js +21 -1
- package/dist/collection/components/sqm-big-stat/useBigStat.js +21 -117
- package/dist/collection/components/sqm-big-stat/useDemoBigStat.js +0 -1
- package/dist/collection/components/sqm-portal-email-verification/sqm-portal-email-verification.js +27 -0
- package/dist/collection/components/sqm-portal-email-verification/usePortalEmailVerification.js +2 -1
- package/dist/collection/components/sqm-portal-forgot-password/sqm-portal-forgot-password.js +55 -3
- package/dist/collection/components/sqm-portal-forgot-password/usePortalForgotPassword.js +4 -2
- package/dist/collection/components/sqm-portal-login/sqm-portal-login.js +59 -4
- package/dist/collection/components/sqm-portal-login/usePortalLogin.js +4 -2
- package/dist/collection/components/sqm-portal-register/sqm-portal-register.js +55 -2
- package/dist/collection/components/sqm-portal-register/usePortalRegister.js +3 -0
- package/dist/collection/components/sqm-portal-reset-password/sqm-portal-reset-password.js +30 -1
- package/dist/collection/components/sqm-portal-reset-password/usePortalResetPassword.js +1 -1
- package/dist/collection/components/sqm-portal-verify-email/sqm-portal-verify-email.js +30 -1
- package/dist/collection/components/sqm-portal-verify-email/usePortalVerifyEmail.js +2 -2
- package/dist/collection/components/sqm-referral-table/columns/sqm-referral-table-column.js +1 -1
- package/dist/collection/components/sqm-referral-table/columns/sqm-referral-table-date-column.js +1 -1
- package/dist/collection/components/sqm-referral-table/columns/sqm-referral-table-rewards-column.js +1 -1
- package/dist/collection/components/sqm-referral-table/columns/sqm-referral-table-status-column.js +1 -1
- package/dist/collection/components/sqm-referral-table/columns/sqm-referral-table-user-column.js +1 -1
- package/dist/collection/{tables → components/sqm-referral-table}/re-render.js +0 -0
- package/dist/collection/{tables → components/sqm-referral-table}/sqm-table-cell.js +0 -0
- package/dist/collection/{tables → components/sqm-referral-table}/sqm-table-row.js +0 -0
- package/dist/collection/{tables → components/sqm-referral-table}/useChildElements.js +0 -0
- package/dist/collection/components/sqm-referral-table/useReferralTable.js +2 -2
- package/dist/collection/components/sqm-share-button/sqm-share-button.js +1 -1
- package/dist/collection/components/sqm-stencilbook/CucumberAddon.js +1 -3
- package/dist/collection/components/sqm-stencilbook/sqm-stencilbook.js +36 -46
- package/dist/collection/components/sqm-user-name/sqm-user-name.js +1 -1
- package/dist/collection/global/global.js +1 -1
- package/dist/collection/global/styles.js +69 -281
- package/dist/collection/global/styles.ts +69 -281
- package/dist/collection/{components/sqm-asset-card → stories}/AssetCard.stories.js +2 -2
- package/dist/collection/{components/sqm-big-stat → stories}/BigStat.stories.js +3 -10
- package/dist/collection/{components/sqm-portal-change-password → stories}/ChangePassword.stories.js +3 -3
- package/dist/collection/{components/sqm-divided-layout → stories}/DividedLayout.stories.js +4 -4
- package/dist/collection/{components/sqm-edit-profile → stories}/EditProfileForm.stories.js +2 -2
- package/dist/collection/{components/sqm-form-message → stories}/FormMessage.stories.js +1 -1
- package/dist/collection/{components/sqm-hero → stories}/Hero.stories.js +2 -2
- package/dist/collection/{components/sqm-leaderboard → stories}/Leaderboard.stories.js +2 -2
- package/dist/collection/{components/sqm-leaderboard-rank → stories}/LeaderboardRank.stories.js +2 -2
- package/dist/collection/{components/sqm-name-fields → stories}/NameFields.stories.js +2 -2
- package/dist/collection/{components/sqm-navigation-sidebar → stories}/NavigationSidebar.stories.js +3 -3
- package/dist/collection/stories/NewPortal.stories.js +15 -15
- package/dist/collection/{components/sqm-password-field → stories}/PasswordField.stories.js +1 -1
- package/dist/collection/{components/sqm-portal-email-verification → stories}/PortalEmailVerification.stories.js +3 -3
- package/dist/collection/{components/sqm-portal-footer → stories}/PortalFooter.stories.js +2 -2
- package/dist/collection/{components/sqm-portal-forgot-password → stories}/PortalForgotPassword.stories.js +7 -3
- package/dist/collection/{components/sqm-portal-frame → stories}/PortalFrame.stories.js +2 -2
- package/dist/collection/{components/sqm-portal-login → stories}/PortalLogin.stories.js +8 -2
- package/dist/collection/{components/sqm-portal-profile → stories}/PortalProfile.stories.js +2 -2
- package/dist/collection/{components/sqm-portal-register → stories}/PortalRegister.stories.js +7 -2
- package/dist/collection/{components/sqm-portal-reset-password → stories}/PortalResetPassword.stories.js +3 -3
- package/dist/collection/{components/sqm-portal-verify-email → stories}/PortalVerifyEmail.stories.js +3 -3
- package/dist/collection/{components/sqm-program-menu → stories}/ProgramMenu.stories.js +2 -2
- package/dist/collection/{components/sqm-referral-iframe → stories}/ReferralIframe.stories.js +2 -2
- package/dist/collection/{components/sqm-referral-table → stories}/ReferralTable.stories.js +2 -2
- package/dist/collection/{components/sqm-referral-table → stories}/ReferralTableCell.stories.js +1 -1
- package/dist/collection/{components/sqm-referral-table → stories}/ReferralTableRewardsCell.stories.js +1 -1
- package/dist/collection/{components/sqm-router → stories}/Router.stories.js +1 -1
- package/dist/collection/{components/sqm-share-button → stories}/ShareButton.stories.js +3 -3
- package/dist/collection/{components/sqm-share-link → stories}/ShareLink.stories.js +2 -2
- package/dist/collection/{components/sqm-navigation-sidebar-item → stories}/SidebarItem.stories.js +2 -2
- package/dist/collection/{components/sqm-big-stat → stories}/UseBigStat.stories.js +4 -7
- package/dist/collection/{components/sqm-edit-profile → stories}/UseEditProfile.stories.js +1 -1
- package/dist/collection/{components/sqm-leaderboard → stories}/UseLeaderboard.stories.js +3 -3
- package/dist/collection/{components/sqm-share-button → stories}/UseShareButton.stories.js +2 -2
- package/dist/collection/{components/sqm-share-link → stories}/UseShareLink.stories.js +3 -3
- package/dist/collection/{components/sqm-user-name → stories}/UserName.stories.js +3 -3
- package/dist/esm/{ShadowViewAddon-2338f393.js → ShadowViewAddon-5f66de48.js} +3 -3
- package/dist/esm/{global-0e81c5e6.js → global-2e50d2dc.js} +72 -284
- package/dist/esm/{index.module-9b5bb6a2.js → index.module-1e92a7a3.js} +2 -2
- package/dist/esm/loader.js +3 -3
- package/dist/esm/mint-components.js +3 -3
- package/dist/esm/{re-render-57ac6584.js → re-render-b8468637.js} +4 -4
- package/dist/esm/sqm-asset-card.entry.js +1 -1
- package/dist/esm/sqm-big-stat.entry.js +2 -2
- package/dist/esm/{sqm-divided-layout_30.entry.js → sqm-divided-layout_26.entry.js} +391 -2811
- package/dist/esm/sqm-graphql-client-provider.entry.js +4 -4
- package/dist/esm/{sqm-leaderboard-rank-view-3f0dc20e.js → sqm-leaderboard-rank-view-387f0870.js} +2 -2
- package/dist/esm/sqm-leaderboard-rank.entry.js +5 -5
- package/dist/esm/sqm-leaderboard.entry.js +2 -2
- package/dist/esm/sqm-name-fields.entry.js +1 -1
- package/dist/esm/{sqm-navigation-sidebar-item-view-79b0748c.js → sqm-navigation-sidebar-item-view-a48bca9b.js} +2 -2
- package/dist/esm/sqm-navigation-sidebar-item.entry.js +3 -3
- package/dist/esm/sqm-popup-container.entry.js +1 -1
- package/dist/esm/{sqm-portal-email-verification-view-8f253fb7.js → sqm-portal-email-verification-view-e366e94a.js} +1 -1
- package/dist/esm/sqm-portal-email-verification.entry.js +13 -6
- package/dist/esm/{sqm-portal-footer-view-b8a2f15e.js → sqm-portal-footer-view-f12d5e5a.js} +1 -1
- package/dist/esm/sqm-portal-footer.entry.js +3 -3
- package/dist/esm/sqm-portal-forgot-password.entry.js +18 -6
- package/dist/esm/sqm-portal-logout.entry.js +3 -3
- package/dist/esm/{sqm-portal-profile-view-831dea85.js → sqm-portal-profile-view-9f3c79c3.js} +1 -1
- package/dist/esm/sqm-portal-profile.entry.js +6 -6
- package/dist/esm/sqm-portal-protected-route.entry.js +5 -5
- package/dist/esm/sqm-portal-reset-password.entry.js +16 -8
- package/dist/esm/sqm-portal-verify-email.entry.js +15 -7
- package/dist/esm/sqm-referral-table-column.entry.js +2 -2
- package/dist/esm/sqm-referral-table-date-column.entry.js +2 -2
- package/dist/esm/sqm-referral-table-rewards-column.entry.js +2 -2
- package/dist/esm/sqm-referral-table-status-column.entry.js +2 -2
- package/dist/esm/sqm-referral-table-user-column.entry.js +2 -2
- package/dist/esm/sqm-share-code.entry.js +3 -3
- package/dist/esm/{useDemoBigStat-660c8672.js → useDemoBigStat-5557504e.js} +24 -121
- package/dist/esm-es5/ShadowViewAddon-5f66de48.js +1 -0
- package/dist/esm-es5/{global-0e81c5e6.js → global-2e50d2dc.js} +2 -2
- package/dist/esm-es5/{index.module-9b5bb6a2.js → index.module-1e92a7a3.js} +1 -1
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/mint-components.js +1 -1
- package/dist/esm-es5/{re-render-57ac6584.js → re-render-b8468637.js} +1 -1
- package/dist/esm-es5/sqm-asset-card.entry.js +1 -1
- package/dist/esm-es5/sqm-big-stat.entry.js +1 -1
- package/dist/esm-es5/sqm-divided-layout_26.entry.js +1 -0
- package/dist/esm-es5/sqm-graphql-client-provider.entry.js +1 -1
- package/dist/esm-es5/{sqm-leaderboard-rank-view-3f0dc20e.js → sqm-leaderboard-rank-view-387f0870.js} +1 -1
- package/dist/esm-es5/sqm-leaderboard-rank.entry.js +1 -1
- package/dist/esm-es5/sqm-leaderboard.entry.js +1 -1
- package/dist/esm-es5/sqm-name-fields.entry.js +1 -1
- package/dist/esm-es5/sqm-navigation-sidebar-item-view-a48bca9b.js +1 -0
- package/dist/esm-es5/sqm-navigation-sidebar-item.entry.js +1 -1
- package/dist/esm-es5/sqm-popup-container.entry.js +1 -1
- package/dist/esm-es5/{sqm-portal-email-verification-view-8f253fb7.js → sqm-portal-email-verification-view-e366e94a.js} +1 -1
- package/dist/esm-es5/sqm-portal-email-verification.entry.js +1 -1
- package/dist/esm-es5/{sqm-portal-footer-view-b8a2f15e.js → sqm-portal-footer-view-f12d5e5a.js} +1 -1
- package/dist/esm-es5/sqm-portal-footer.entry.js +1 -1
- package/dist/esm-es5/sqm-portal-forgot-password.entry.js +1 -1
- package/dist/esm-es5/sqm-portal-logout.entry.js +1 -1
- package/dist/esm-es5/{sqm-portal-profile-view-831dea85.js → sqm-portal-profile-view-9f3c79c3.js} +1 -1
- package/dist/esm-es5/sqm-portal-profile.entry.js +1 -1
- package/dist/esm-es5/sqm-portal-protected-route.entry.js +1 -1
- package/dist/esm-es5/sqm-portal-reset-password.entry.js +1 -1
- package/dist/esm-es5/sqm-portal-verify-email.entry.js +1 -1
- package/dist/esm-es5/sqm-referral-table-column.entry.js +1 -1
- package/dist/esm-es5/sqm-referral-table-date-column.entry.js +1 -1
- package/dist/esm-es5/sqm-referral-table-rewards-column.entry.js +1 -1
- package/dist/esm-es5/sqm-referral-table-status-column.entry.js +1 -1
- package/dist/esm-es5/sqm-referral-table-user-column.entry.js +1 -1
- package/dist/esm-es5/sqm-share-code.entry.js +1 -1
- package/dist/esm-es5/useDemoBigStat-5557504e.js +1 -0
- package/dist/mint-components/global/styles.ts +69 -281
- package/dist/mint-components/mint-components.esm.js +1 -1
- package/dist/mint-components/mint-components.js +1 -1
- package/dist/mint-components/{p-8f5b80f2.entry.js → p-05a2640d.entry.js} +1 -1
- package/dist/mint-components/{p-cafc22bf.system.entry.js → p-09afaaac.system.entry.js} +1 -1
- package/dist/mint-components/p-10a98629.entry.js +1 -0
- package/dist/mint-components/p-112d42ab.system.entry.js +1 -0
- package/dist/mint-components/p-13605359.entry.js +1 -0
- package/dist/mint-components/p-192539d2.entry.js +1 -0
- package/dist/mint-components/{p-b2cb66f5.system.js → p-27e23808.system.js} +1 -1
- package/dist/mint-components/{p-24d13567.js → p-2babeba4.js} +1 -1
- package/dist/mint-components/{p-77f9b4af.entry.js → p-2dc28ab0.entry.js} +2 -2
- package/dist/mint-components/p-2f333f89.system.entry.js +1 -0
- package/dist/mint-components/{p-17e6fc02.system.entry.js → p-337a3d6b.system.entry.js} +1 -1
- package/dist/mint-components/{p-7062ab8e.system.entry.js → p-3772bae2.system.entry.js} +1 -1
- package/dist/mint-components/{p-295b306a.js → p-3adf6ff3.js} +1 -1
- package/dist/mint-components/{p-1ec1dcb3.system.js → p-3e3dad7a.system.js} +1 -1
- package/dist/mint-components/{p-d5a00e40.system.entry.js → p-4068e47c.system.entry.js} +1 -1
- package/dist/mint-components/{p-d4fe6a69.system.js → p-48fff767.system.js} +2 -2
- package/dist/mint-components/{p-f7b80ac0.entry.js → p-4b6c316d.entry.js} +1 -1
- package/dist/mint-components/{p-58fb3d02.system.js → p-50557966.system.js} +1 -1
- package/dist/mint-components/p-528aecd1.entry.js +1 -0
- package/dist/mint-components/p-52b0b65d.entry.js +1 -0
- package/dist/mint-components/p-55210498.system.js +1 -0
- package/dist/mint-components/p-554a6339.entry.js +230 -0
- package/dist/mint-components/p-5fcd8687.entry.js +1 -0
- package/dist/mint-components/p-606506d6.system.entry.js +1 -0
- package/dist/mint-components/{p-55f029cd.system.entry.js → p-6156a7ac.system.entry.js} +1 -1
- package/dist/mint-components/{p-b9edc48d.system.entry.js → p-624c5352.system.entry.js} +1 -1
- package/dist/mint-components/p-6305419f.entry.js +1 -0
- package/dist/mint-components/{p-be615f03.system.js → p-679a7054.system.js} +1 -1
- package/dist/mint-components/p-6ad110d3.js +1 -0
- package/dist/mint-components/{p-aee2a2b9.entry.js → p-6cb81b77.entry.js} +1 -1
- package/dist/mint-components/{p-46cb29e2.system.entry.js → p-70ca623f.system.entry.js} +1 -1
- package/dist/mint-components/{p-8bfe1f7d.js → p-726c9080.js} +1 -1
- package/dist/mint-components/{p-75ae6fc0.entry.js → p-743882c6.entry.js} +1 -1
- package/dist/mint-components/p-768b9014.system.entry.js +1 -0
- package/dist/mint-components/p-77d17f35.js +1 -0
- package/dist/mint-components/p-7cf335a0.entry.js +1 -0
- package/dist/mint-components/p-86b66e5c.entry.js +1 -0
- package/dist/mint-components/{p-ad1c6eb8.system.entry.js → p-8bfebd45.system.entry.js} +1 -1
- package/dist/mint-components/p-942723ad.entry.js +1 -0
- package/dist/mint-components/{p-a93149f4.entry.js → p-965e34ab.entry.js} +1 -1
- package/dist/mint-components/{p-75b143ac.system.entry.js → p-9741333b.system.entry.js} +1 -1
- package/dist/mint-components/{p-0a882bab.system.entry.js → p-9a3a0db5.system.entry.js} +1 -1
- package/dist/mint-components/{p-8a9966fc.system.js → p-9f9191a4.system.js} +1 -1
- package/dist/mint-components/{p-e53399e5.system.entry.js → p-9ff118a2.system.entry.js} +1 -1
- package/dist/mint-components/{p-27bb0aa9.js → p-af1f8bd3.js} +1 -1
- package/dist/mint-components/{p-d5b84d6b.js → p-af2d886e.js} +1 -1
- package/dist/mint-components/{p-3404b8d2.system.entry.js → p-b3880833.system.entry.js} +1 -1
- package/dist/mint-components/p-b3cddcca.entry.js +1 -0
- package/dist/mint-components/p-b63744fe.js +227 -0
- package/dist/mint-components/p-bf26396f.system.js +1 -0
- package/dist/mint-components/{p-8ec40f9a.entry.js → p-c47b83c3.entry.js} +1 -1
- package/dist/mint-components/{p-16b0b00b.entry.js → p-c579f318.entry.js} +2 -2
- package/dist/mint-components/p-c5c029b8.system.js +1 -0
- package/dist/mint-components/p-ced568fc.system.entry.js +1 -0
- package/dist/mint-components/p-cffc23c0.entry.js +1 -0
- package/dist/mint-components/p-d1cea1b1.system.js +1 -0
- package/dist/mint-components/{p-be62004c.entry.js → p-d1d45d97.entry.js} +1 -1
- package/dist/mint-components/{p-024cc1be.system.entry.js → p-d3171b36.system.entry.js} +1 -1
- package/dist/mint-components/{p-35103a1b.system.entry.js → p-d5573e0e.system.entry.js} +1 -1
- package/dist/mint-components/p-d96e22c6.system.entry.js +1 -0
- package/dist/mint-components/p-de3311bf.entry.js +9 -0
- package/dist/mint-components/{p-0e49a93f.system.entry.js → p-e1df7914.system.entry.js} +1 -1
- package/dist/mint-components/{p-a59e65f2.js → p-eddcf481.js} +1 -1
- package/dist/mint-components/{p-98e29140.system.entry.js → p-f16bae7a.system.entry.js} +1 -1
- package/dist/mint-components/p-f3fbcdb0.system.entry.js +1 -0
- package/dist/mint-components/{p-f3ea7918.system.js → p-fd33dd62.system.js} +1 -1
- package/dist/mint-components/{p-b6107771.js → p-fe4ecc11.js} +2 -2
- package/dist/types/components/sqm-big-stat/sqm-big-stat-view.d.ts +0 -1
- package/dist/types/components/sqm-big-stat/sqm-big-stat.d.ts +6 -0
- package/dist/types/components/sqm-big-stat/useBigStat.d.ts +1 -4
- package/dist/types/components/sqm-portal-email-verification/sqm-portal-email-verification.d.ts +6 -0
- package/dist/types/components/sqm-portal-forgot-password/sqm-portal-forgot-password-view.d.ts +1 -0
- package/dist/types/components/sqm-portal-forgot-password/sqm-portal-forgot-password.d.ts +10 -0
- package/dist/types/components/sqm-portal-forgot-password/usePortalForgotPassword.d.ts +3 -1
- package/dist/types/components/sqm-portal-login/sqm-portal-login-view.d.ts +2 -0
- package/dist/types/components/sqm-portal-login/sqm-portal-login.d.ts +8 -0
- package/dist/types/components/sqm-portal-login/usePortalLogin.d.ts +3 -3
- package/dist/types/components/sqm-portal-register/sqm-portal-register-view.d.ts +1 -0
- package/dist/types/components/sqm-portal-register/sqm-portal-register.d.ts +10 -0
- package/dist/types/components/sqm-portal-register/usePortalRegister.d.ts +1 -0
- package/dist/types/components/sqm-portal-reset-password/sqm-portal-reset-password.d.ts +8 -0
- package/dist/types/components/sqm-portal-verify-email/sqm-portal-verify-email.d.ts +8 -0
- package/dist/types/components/sqm-portal-verify-email/usePortalVerifyEmail.d.ts +2 -1
- package/dist/types/{tables → components/sqm-referral-table}/re-render.d.ts +0 -0
- package/dist/types/{tables → components/sqm-referral-table}/sqm-table-cell.d.ts +0 -0
- package/dist/types/{tables → components/sqm-referral-table}/sqm-table-row.d.ts +0 -0
- package/dist/types/{tables → components/sqm-referral-table}/useChildElements.d.ts +0 -0
- package/dist/types/components/sqm-user-name/sqm-user-name.d.ts +1 -1
- package/dist/types/components.d.ts +96 -289
- package/dist/types/global/styles.d.ts +1 -1
- package/dist/types/{components/sqm-asset-card → stories}/AssetCard.stories.d.ts +0 -0
- package/dist/types/{components/sqm-big-stat → stories}/BigStat.stories.d.ts +0 -0
- package/dist/types/{components/sqm-portal-change-password → stories}/ChangePassword.stories.d.ts +0 -0
- package/dist/types/{components/sqm-divided-layout → stories}/DividedLayout.stories.d.ts +0 -0
- package/dist/types/{components/sqm-edit-profile → stories}/EditProfileForm.stories.d.ts +0 -0
- package/dist/types/{components/sqm-form-message → stories}/FormMessage.stories.d.ts +0 -0
- package/dist/types/{components/sqm-hero → stories}/Hero.stories.d.ts +0 -0
- package/dist/types/{components/sqm-leaderboard → stories}/Leaderboard.stories.d.ts +0 -0
- package/dist/types/{components/sqm-leaderboard-rank → stories}/LeaderboardRank.stories.d.ts +0 -0
- package/dist/types/{components/sqm-name-fields → stories}/NameFields.stories.d.ts +0 -0
- package/dist/types/{components/sqm-navigation-sidebar → stories}/NavigationSidebar.stories.d.ts +0 -0
- package/dist/types/{components/sqm-password-field → stories}/PasswordField.stories.d.ts +0 -0
- package/dist/types/{components/sqm-portal-email-verification → stories}/PortalEmailVerification.stories.d.ts +0 -0
- package/dist/types/{components/sqm-portal-footer → stories}/PortalFooter.stories.d.ts +0 -0
- package/dist/types/{components/sqm-portal-forgot-password → stories}/PortalForgotPassword.stories.d.ts +0 -0
- package/dist/types/{components/sqm-portal-frame → stories}/PortalFrame.stories.d.ts +0 -0
- package/dist/types/{components/sqm-portal-login → stories}/PortalLogin.stories.d.ts +0 -0
- package/dist/types/{components/sqm-portal-profile → stories}/PortalProfile.stories.d.ts +0 -0
- package/dist/types/{components/sqm-portal-register → stories}/PortalRegister.stories.d.ts +0 -0
- package/dist/types/{components/sqm-portal-reset-password → stories}/PortalResetPassword.stories.d.ts +0 -0
- package/dist/types/{components/sqm-portal-verify-email → stories}/PortalVerifyEmail.stories.d.ts +0 -0
- package/dist/types/{components/sqm-program-menu → stories}/ProgramMenu.stories.d.ts +0 -0
- package/dist/types/{components/sqm-referral-iframe → stories}/ReferralIframe.stories.d.ts +0 -0
- package/dist/types/{components/sqm-referral-table → stories}/ReferralTable.stories.d.ts +0 -0
- package/dist/types/{components/sqm-referral-table → stories}/ReferralTableCell.stories.d.ts +0 -0
- package/dist/types/{components/sqm-referral-table → stories}/ReferralTableRewardsCell.stories.d.ts +0 -0
- package/dist/types/{components/sqm-router → stories}/Router.stories.d.ts +0 -0
- package/dist/types/{components/sqm-share-button → stories}/ShareButton.stories.d.ts +0 -0
- package/dist/types/{components/sqm-share-link → stories}/ShareLink.stories.d.ts +0 -0
- package/dist/types/{components/sqm-navigation-sidebar-item → stories}/SidebarItem.stories.d.ts +0 -0
- package/dist/types/{components/sqm-big-stat → stories}/UseBigStat.stories.d.ts +0 -6
- package/dist/types/{components/sqm-edit-profile → stories}/UseEditProfile.stories.d.ts +0 -0
- package/dist/types/{components/sqm-leaderboard → stories}/UseLeaderboard.stories.d.ts +0 -0
- package/dist/types/{components/sqm-share-button → stories}/UseShareButton.stories.d.ts +0 -0
- package/dist/types/{components/sqm-share-link → stories}/UseShareLink.stories.d.ts +0 -0
- package/dist/types/stories/UserName.stories.d.ts +6 -0
- package/grapesjs/grapesjs.js +1 -1
- package/package.json +2 -2
- package/dist/collection/components/sqm-reward-exchange-list/RewardExchangeList.stories.js +0 -25
- package/dist/collection/components/sqm-reward-exchange-list/RewardExchangeListData.js +0 -241
- package/dist/collection/components/sqm-reward-exchange-list/SVGs.js +0 -8
- package/dist/collection/components/sqm-reward-exchange-list/UseRewardExchangeList.stories.js +0 -143
- package/dist/collection/components/sqm-reward-exchange-list/assets/Reward-icon.png +0 -0
- package/dist/collection/components/sqm-reward-exchange-list/progressBar.js +0 -61
- package/dist/collection/components/sqm-reward-exchange-list/sqm-reward-exchange-list-view.js +0 -357
- package/dist/collection/components/sqm-reward-exchange-list/sqm-reward-exchange-list.js +0 -144
- package/dist/collection/components/sqm-reward-exchange-list/useRewardExchangeList.js +0 -174
- package/dist/collection/components/sqm-rewards-table/UseRewardsTable.stories.js +0 -53
- package/dist/collection/components/sqm-rewards-table/sqm-rewards-table-column.js +0 -120
- package/dist/collection/components/sqm-rewards-table/sqm-rewards-table.js +0 -222
- package/dist/collection/components/sqm-rewards-table/useRewardsTable.js +0 -190
- package/dist/collection/components/sqm-task-card/Matrix.js +0 -66
- package/dist/collection/components/sqm-task-card/SVGs.js +0 -9
- package/dist/collection/components/sqm-task-card/TaskCard.stories.js +0 -278
- package/dist/collection/components/sqm-task-card/UseTaskCard.stories.js +0 -41
- package/dist/collection/components/sqm-task-card/progress-bar/SVGs.js +0 -7
- package/dist/collection/components/sqm-task-card/progress-bar/progress-bar-view.js +0 -314
- package/dist/collection/components/sqm-task-card/sqm-task-card-view.js +0 -211
- package/dist/collection/components/sqm-task-card/sqm-task-card.js +0 -419
- package/dist/collection/tables/GenericTableView.js +0 -51
- package/dist/collection/tables/TableSlots.js +0 -22
- package/dist/esm-es5/ShadowViewAddon-2338f393.js +0 -1
- package/dist/esm-es5/sqm-divided-layout_30.entry.js +0 -1
- package/dist/esm-es5/sqm-navigation-sidebar-item-view-79b0748c.js +0 -1
- package/dist/esm-es5/useDemoBigStat-660c8672.js +0 -1
- package/dist/mint-components/assets/Reward-icon.png +0 -0
- package/dist/mint-components/mint-components.css +0 -1
- package/dist/mint-components/p-101fafa3.js +0 -1
- package/dist/mint-components/p-1dc2793a.system.entry.js +0 -1
- package/dist/mint-components/p-1dc2e37a.system.entry.js +0 -1
- package/dist/mint-components/p-1dd1105d.system.entry.js +0 -1
- package/dist/mint-components/p-22d56623.entry.js +0 -9
- package/dist/mint-components/p-232dddcc.system.entry.js +0 -1
- package/dist/mint-components/p-25021e09.entry.js +0 -1
- package/dist/mint-components/p-3098bb1b.system.entry.js +0 -1
- package/dist/mint-components/p-35ba4a8b.entry.js +0 -1
- package/dist/mint-components/p-441119ee.js +0 -235
- package/dist/mint-components/p-503192e9.entry.js +0 -1
- package/dist/mint-components/p-51277d8e.system.entry.js +0 -1
- package/dist/mint-components/p-58bf2a30.system.js +0 -1
- package/dist/mint-components/p-62102076.entry.js +0 -1
- package/dist/mint-components/p-623e7f8c.entry.js +0 -335
- package/dist/mint-components/p-6410316b.entry.js +0 -1
- package/dist/mint-components/p-69902f7c.system.js +0 -1
- package/dist/mint-components/p-6acfe4a0.entry.js +0 -1
- package/dist/mint-components/p-6cbb3a00.entry.js +0 -1
- package/dist/mint-components/p-7ee8a7ed.system.js +0 -1
- package/dist/mint-components/p-853bd4bd.entry.js +0 -1
- package/dist/mint-components/p-85728f98.entry.js +0 -1
- package/dist/mint-components/p-aa39d9c0.entry.js +0 -1
- package/dist/mint-components/p-b893904c.system.entry.js +0 -1
- package/dist/mint-components/p-bafc60df.js +0 -1
- package/dist/mint-components/p-dea06c92.entry.js +0 -1
- package/dist/mint-components/p-eb5aae94.entry.js +0 -1
- package/dist/mint-components/p-f7d7e44d.system.js +0 -1
- package/dist/types/components/sqm-reward-exchange-list/RewardExchangeList.stories.d.ts +0 -7
- package/dist/types/components/sqm-reward-exchange-list/RewardExchangeListData.d.ts +0 -112
- package/dist/types/components/sqm-reward-exchange-list/SVGs.d.ts +0 -3
- package/dist/types/components/sqm-reward-exchange-list/UseRewardExchangeList.stories.d.ts +0 -28
- package/dist/types/components/sqm-reward-exchange-list/progressBar.d.ts +0 -4
- package/dist/types/components/sqm-reward-exchange-list/sqm-reward-exchange-list-view.d.ts +0 -25
- package/dist/types/components/sqm-reward-exchange-list/sqm-reward-exchange-list.d.ts +0 -24
- package/dist/types/components/sqm-reward-exchange-list/useRewardExchangeList.d.ts +0 -44
- package/dist/types/components/sqm-rewards-table/UseRewardsTable.stories.d.ts +0 -16
- package/dist/types/components/sqm-rewards-table/sqm-rewards-table-column.d.ts +0 -20
- package/dist/types/components/sqm-rewards-table/sqm-rewards-table.d.ts +0 -32
- package/dist/types/components/sqm-rewards-table/useRewardsTable.d.ts +0 -38
- package/dist/types/components/sqm-task-card/Matrix.d.ts +0 -11
- package/dist/types/components/sqm-task-card/SVGs.d.ts +0 -2
- package/dist/types/components/sqm-task-card/TaskCard.stories.d.ts +0 -16
- package/dist/types/components/sqm-task-card/UseTaskCard.stories.d.ts +0 -10
- package/dist/types/components/sqm-task-card/progress-bar/SVGs.d.ts +0 -1
- package/dist/types/components/sqm-task-card/progress-bar/progress-bar-view.d.ts +0 -11
- package/dist/types/components/sqm-task-card/sqm-task-card-view.d.ts +0 -17
- package/dist/types/components/sqm-task-card/sqm-task-card.d.ts +0 -76
- package/dist/types/components/sqm-user-name/UserName.stories.d.ts +0 -6
- package/dist/types/tables/GenericTableView.d.ts +0 -29
- package/dist/types/tables/TableSlots.d.ts +0 -8
|
@@ -4,9 +4,9 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
const index = require('./index-b0129cd6.js');
|
|
6
6
|
const _extends = require('./extends-0302d27d.js');
|
|
7
|
-
const global = require('./global-
|
|
7
|
+
const global = require('./global-413d075c.js');
|
|
8
8
|
const useCallback = require('./use-callback-fadb2643.js');
|
|
9
|
-
const index_module = require('./index.module-
|
|
9
|
+
const index_module = require('./index.module-2925fe3b.js');
|
|
10
10
|
const jsonpointer = require('./jsonpointer-11327262.js');
|
|
11
11
|
const jssPresetDefault_esm = require('./jss-preset-default.esm-6304d24f.js');
|
|
12
12
|
const utils = require('./utils-95e5317c.js');
|
|
@@ -15,21 +15,21 @@ const mixins = require('./mixins-7b7c59fe.js');
|
|
|
15
15
|
const sqmPortalContainerView = require('./sqm-portal-container-view-d144735a.js');
|
|
16
16
|
const sqmPortalSectionView = require('./sqm-portal-section-view-3b008930.js');
|
|
17
17
|
const sqmTextSpanView = require('./sqm-text-span-view-b5ae787b.js');
|
|
18
|
-
const sqmLeaderboardRankView = require('./sqm-leaderboard-rank-view-
|
|
19
|
-
const reRender = require('./re-render-
|
|
20
|
-
const useDemoBigStat = require('./useDemoBigStat-
|
|
18
|
+
const sqmLeaderboardRankView = require('./sqm-leaderboard-rank-view-b1b55673.js');
|
|
19
|
+
const reRender = require('./re-render-b1ad512d.js');
|
|
20
|
+
const useDemoBigStat = require('./useDemoBigStat-d7a60992.js');
|
|
21
21
|
const sqmShareLinkView = require('./sqm-share-link-view-a935d07e.js');
|
|
22
|
-
const ShadowViewAddon = require('./ShadowViewAddon-
|
|
22
|
+
const ShadowViewAddon = require('./ShadowViewAddon-e9bacad0.js');
|
|
23
23
|
const sqmNavigationSidebarView = require('./sqm-navigation-sidebar-view-d06e1885.js');
|
|
24
|
-
const sqmNavigationSidebarItemView = require('./sqm-navigation-sidebar-item-view-
|
|
24
|
+
const sqmNavigationSidebarItemView = require('./sqm-navigation-sidebar-item-view-1bad646a.js');
|
|
25
25
|
const sqmStatContainerView = require('./sqm-stat-container-view-ee7b00ff.js');
|
|
26
|
-
const sqmPortalProfileView = require('./sqm-portal-profile-view-
|
|
26
|
+
const sqmPortalProfileView = require('./sqm-portal-profile-view-ce86369e.js');
|
|
27
27
|
const sqmPortalForgotPasswordView = require('./sqm-portal-forgot-password-view-1704d285.js');
|
|
28
|
-
const sqmPortalEmailVerificationView = require('./sqm-portal-email-verification-view-
|
|
28
|
+
const sqmPortalEmailVerificationView = require('./sqm-portal-email-verification-view-eeb4ca62.js');
|
|
29
29
|
const sqmPortalResetPasswordView = require('./sqm-portal-reset-password-view-4d78fd6d.js');
|
|
30
30
|
const sqmPortalVerifyEmailView = require('./sqm-portal-verify-email-view-b595e302.js');
|
|
31
31
|
const sqmAssetCardView = require('./sqm-asset-card-view-07f86880.js');
|
|
32
|
-
const sqmPortalFooterView = require('./sqm-portal-footer-view-
|
|
32
|
+
const sqmPortalFooterView = require('./sqm-portal-footer-view-08a2efd5.js');
|
|
33
33
|
const sqmHeroView = require('./sqm-hero-view-bb3d00a1.js');
|
|
34
34
|
const sqmNameFieldsView = require('./sqm-name-fields-view-24614ac7.js');
|
|
35
35
|
|
|
@@ -198,13 +198,13 @@ const defaultFormState = {
|
|
|
198
198
|
error: "",
|
|
199
199
|
};
|
|
200
200
|
function useEditProfile(props) {
|
|
201
|
-
const userIdent = index_module.
|
|
201
|
+
const userIdent = index_module.ne();
|
|
202
202
|
const [showEdit, setShowEdit] = _extends.useState(false);
|
|
203
203
|
const [error, setError] = _extends.useState("");
|
|
204
204
|
const [userData, setUserData] = _extends.useState(undefined);
|
|
205
205
|
const [formState, setFormState] = _extends.useState(defaultFormState);
|
|
206
|
-
const userDataResponse = index_module.
|
|
207
|
-
const [upsertUser, upsertUserResponse] = index_module.
|
|
206
|
+
const userDataResponse = index_module.cn(GET_USER, {}, !(userIdent === null || userIdent === void 0 ? void 0 : userIdent.jwt));
|
|
207
|
+
const [upsertUser, upsertUserResponse] = index_module.De(UPSERT_USER);
|
|
208
208
|
_extends.useEffect(() => {
|
|
209
209
|
if ((upsertUserResponse === null || upsertUserResponse === void 0 ? void 0 : upsertUserResponse.loading) || !showEdit)
|
|
210
210
|
return;
|
|
@@ -430,12 +430,12 @@ function NavigationMenuView(props) {
|
|
|
430
430
|
}
|
|
431
431
|
|
|
432
432
|
function handleMenu(e) {
|
|
433
|
-
index_module.
|
|
433
|
+
index_module.mn.push(e.detail.item.value);
|
|
434
434
|
}
|
|
435
435
|
function useNavigationMenu(props) {
|
|
436
436
|
const ref = _extends.useRef();
|
|
437
|
-
const [, rerender] = index_module.
|
|
438
|
-
const user = index_module.
|
|
437
|
+
const [, rerender] = index_module.sn();
|
|
438
|
+
const user = index_module.ne();
|
|
439
439
|
_extends.useEffect(() => {
|
|
440
440
|
var _a;
|
|
441
441
|
(_a = ref.current) === null || _a === void 0 ? void 0 : _a.addEventListener("sl-select", (e) => handleMenu(e));
|
|
@@ -1129,11 +1129,11 @@ function PortalChangePasswordView(props) {
|
|
|
1129
1129
|
|
|
1130
1130
|
function usePortalChangePassword(props) {
|
|
1131
1131
|
var _a, _b, _c, _d;
|
|
1132
|
-
const [request, { loading, errors, data }] = index_module.
|
|
1132
|
+
const [request, { loading, errors, data }] = index_module.He();
|
|
1133
1133
|
const [open, setOpen] = _extends.useState(false);
|
|
1134
1134
|
const [error, setError] = _extends.useState("");
|
|
1135
1135
|
const [success, setSuccess] = _extends.useState(false);
|
|
1136
|
-
const user = index_module.
|
|
1136
|
+
const user = index_module.ne();
|
|
1137
1137
|
const submit = async (event) => {
|
|
1138
1138
|
var _a;
|
|
1139
1139
|
setSuccess(false);
|
|
@@ -1308,7 +1308,7 @@ function PortalFrameView(props, children) {
|
|
|
1308
1308
|
}
|
|
1309
1309
|
|
|
1310
1310
|
function usePortalFrame(footerContent, headerContent) {
|
|
1311
|
-
const [, rerender] = index_module.
|
|
1311
|
+
const [, rerender] = index_module.sn();
|
|
1312
1312
|
return {
|
|
1313
1313
|
data: {
|
|
1314
1314
|
footer: footerContent,
|
|
@@ -1394,9 +1394,9 @@ function PortalLoginView(props) {
|
|
|
1394
1394
|
content.secondaryButton))));
|
|
1395
1395
|
}
|
|
1396
1396
|
|
|
1397
|
-
function usePortalLogin(
|
|
1397
|
+
function usePortalLogin(props) {
|
|
1398
1398
|
var _a, _b, _c, _d;
|
|
1399
|
-
const [request, { loading, errors, data }] = index_module
|
|
1399
|
+
const [request, { loading, errors, data }] = index_module.$e();
|
|
1400
1400
|
const [error, setError] = _extends.useState("");
|
|
1401
1401
|
const urlParams = new URLSearchParams(window.location.search);
|
|
1402
1402
|
const nextPageOverride = urlParams.get("nextPage");
|
|
@@ -1413,8 +1413,8 @@ function usePortalLogin({ nextPage }) {
|
|
|
1413
1413
|
var _a;
|
|
1414
1414
|
if ((_a = data === null || data === void 0 ? void 0 : data.authenticateManagedIdentityWithEmailAndPassword) === null || _a === void 0 ? void 0 : _a.token) {
|
|
1415
1415
|
urlParams.delete("nextPage");
|
|
1416
|
-
index_module.
|
|
1417
|
-
pathname: nextPageOverride || nextPage,
|
|
1416
|
+
index_module.mn.push({
|
|
1417
|
+
pathname: nextPageOverride || props.nextPage,
|
|
1418
1418
|
search: urlParams.toString() && "?" + urlParams.toString(),
|
|
1419
1419
|
});
|
|
1420
1420
|
}
|
|
@@ -1430,6 +1430,8 @@ function usePortalLogin({ nextPage }) {
|
|
|
1430
1430
|
states: {
|
|
1431
1431
|
loading,
|
|
1432
1432
|
error: errorMessage,
|
|
1433
|
+
registerPath: props.registerPath,
|
|
1434
|
+
forgotPasswordPath: props.forgotPasswordPath
|
|
1433
1435
|
},
|
|
1434
1436
|
callbacks: {
|
|
1435
1437
|
submit,
|
|
@@ -1469,6 +1471,14 @@ const PortalLogin = class {
|
|
|
1469
1471
|
* @uiName Heading label
|
|
1470
1472
|
*/
|
|
1471
1473
|
this.pageLabel = "Sign in to your account";
|
|
1474
|
+
/**
|
|
1475
|
+
* @uiName Register button redirection path
|
|
1476
|
+
*/
|
|
1477
|
+
this.registerPath = "/register";
|
|
1478
|
+
/**
|
|
1479
|
+
* @uiName Forgot password button redirect path
|
|
1480
|
+
*/
|
|
1481
|
+
this.forgotPasswordPath = "/forgotPassword";
|
|
1472
1482
|
_extends.h$1(this);
|
|
1473
1483
|
}
|
|
1474
1484
|
disconnectedCallback() { }
|
|
@@ -1477,8 +1487,8 @@ const PortalLogin = class {
|
|
|
1477
1487
|
? useLoginDemo(this)
|
|
1478
1488
|
: usePortalLogin(this);
|
|
1479
1489
|
const content = {
|
|
1480
|
-
forgotPasswordButton: (index.h("slot", { name: "forgotPassword" }, index.h("a", { onClick: () => index_module.
|
|
1481
|
-
secondaryButton: (index.h("slot", { name: "secondaryButton" }, index.h("sl-button", { type: "text", disabled: states.loading, onClick: () => index_module.
|
|
1490
|
+
forgotPasswordButton: (index.h("slot", { name: "forgotPassword" }, index.h("a", { onClick: () => index_module.mn.push(states.forgotPasswordPath) }, this.forgotPasswordLabel))),
|
|
1491
|
+
secondaryButton: (index.h("slot", { name: "secondaryButton" }, index.h("sl-button", { type: "text", disabled: states.loading, onClick: () => index_module.mn.push(states.registerPath) }, this.registerLabel))),
|
|
1482
1492
|
emailLabel: this.emailLabel,
|
|
1483
1493
|
passwordLabel: this.passwordLabel,
|
|
1484
1494
|
submitLabel: this.submitLabel,
|
|
@@ -1489,7 +1499,12 @@ const PortalLogin = class {
|
|
|
1489
1499
|
};
|
|
1490
1500
|
function useLoginDemo(props) {
|
|
1491
1501
|
return cjs.cjs({
|
|
1492
|
-
states: {
|
|
1502
|
+
states: {
|
|
1503
|
+
error: "",
|
|
1504
|
+
loading: false,
|
|
1505
|
+
forgotPasswordPath: "/forgotPassword",
|
|
1506
|
+
registerPath: "/register",
|
|
1507
|
+
},
|
|
1493
1508
|
callbacks: {
|
|
1494
1509
|
submit: async (_event) => {
|
|
1495
1510
|
console.log("submit");
|
|
@@ -1571,7 +1586,7 @@ function PortalRegisterView(props) {
|
|
|
1571
1586
|
|
|
1572
1587
|
const CONTEXT_NAME$1 = "sq:validation-state";
|
|
1573
1588
|
function useValidationState(formState) {
|
|
1574
|
-
const host = index_module.
|
|
1589
|
+
const host = index_module.S();
|
|
1575
1590
|
const [validationState, setValidationState] = _extends.y(host, CONTEXT_NAME$1, formState);
|
|
1576
1591
|
return { validationState, setValidationState };
|
|
1577
1592
|
}
|
|
@@ -5451,7 +5466,7 @@ function usePortalRegister(props) {
|
|
|
5451
5466
|
var _a, _b, _c, _d, _e, _f;
|
|
5452
5467
|
const formRef = _extends.useRef(null);
|
|
5453
5468
|
const { validationState, setValidationState } = useValidationState({});
|
|
5454
|
-
const [request, { loading, errors, data }] = index_module.
|
|
5469
|
+
const [request, { loading, errors, data }] = index_module.Ve();
|
|
5455
5470
|
const submit = async (event) => {
|
|
5456
5471
|
let formControls = event.target.getFormControls();
|
|
5457
5472
|
let formData = {};
|
|
@@ -5491,10 +5506,12 @@ function usePortalRegister(props) {
|
|
|
5491
5506
|
delete formData.password;
|
|
5492
5507
|
delete formData.confirmPassword;
|
|
5493
5508
|
formData = { ...formData };
|
|
5509
|
+
const redirectPath = props.redirectPath;
|
|
5494
5510
|
const variables = {
|
|
5495
5511
|
email,
|
|
5496
5512
|
password,
|
|
5497
5513
|
formData,
|
|
5514
|
+
redirectPath,
|
|
5498
5515
|
};
|
|
5499
5516
|
try {
|
|
5500
5517
|
await request(variables);
|
|
@@ -5514,7 +5531,7 @@ function usePortalRegister(props) {
|
|
|
5514
5531
|
_extends.useEffect(() => {
|
|
5515
5532
|
var _a;
|
|
5516
5533
|
if ((_a = data === null || data === void 0 ? void 0 : data.registerManagedIdentityWithEmailAndPassword) === null || _a === void 0 ? void 0 : _a.token) {
|
|
5517
|
-
index_module.
|
|
5534
|
+
index_module.mn.push(props.nextPage);
|
|
5518
5535
|
}
|
|
5519
5536
|
}, [(_a = data === null || data === void 0 ? void 0 : data.registerManagedIdentityWithEmailAndPassword) === null || _a === void 0 ? void 0 : _a.token]);
|
|
5520
5537
|
_extends.useEffect(() => {
|
|
@@ -5544,6 +5561,7 @@ function usePortalRegister(props) {
|
|
|
5544
5561
|
validationState,
|
|
5545
5562
|
confirmPassword: props.confirmPassword,
|
|
5546
5563
|
hideInputs: props.hideInputs,
|
|
5564
|
+
loginPath: props.loginPath,
|
|
5547
5565
|
},
|
|
5548
5566
|
callbacks: {
|
|
5549
5567
|
submit,
|
|
@@ -5563,6 +5581,12 @@ const PortalRegister = class {
|
|
|
5563
5581
|
* @uiName Page navigated to after registration
|
|
5564
5582
|
*/
|
|
5565
5583
|
this.nextPage = "/";
|
|
5584
|
+
/**
|
|
5585
|
+
* The page that users are redirected to from the verification email.
|
|
5586
|
+
*
|
|
5587
|
+
* @uiName Email redirection base path
|
|
5588
|
+
*/
|
|
5589
|
+
this.redirectPath = "/verifyEmail";
|
|
5566
5590
|
/**
|
|
5567
5591
|
* @uiName Label for email field
|
|
5568
5592
|
*/
|
|
@@ -5599,6 +5623,10 @@ const PortalRegister = class {
|
|
|
5599
5623
|
* @uiName Heading label
|
|
5600
5624
|
*/
|
|
5601
5625
|
this.pageLabel = "Register";
|
|
5626
|
+
/**
|
|
5627
|
+
* @uiName Sign in button redirection path
|
|
5628
|
+
*/
|
|
5629
|
+
this.loginPath = "/login";
|
|
5602
5630
|
_extends.h$1(this);
|
|
5603
5631
|
}
|
|
5604
5632
|
disconnectedCallback() { }
|
|
@@ -5608,7 +5636,7 @@ const PortalRegister = class {
|
|
|
5608
5636
|
: usePortalRegister(this);
|
|
5609
5637
|
const content = {
|
|
5610
5638
|
formData: index.h("slot", { name: "formData" }),
|
|
5611
|
-
secondaryButton: (index.h("slot", { name: "secondaryButton" }, index.h("sl-button", { type: "text", disabled: states.loading, onClick: () => index_module.
|
|
5639
|
+
secondaryButton: (index.h("slot", { name: "secondaryButton" }, index.h("sl-button", { type: "text", disabled: states.loading, onClick: () => index_module.mn.push(states.loginPath) }, this.loginLabel))),
|
|
5612
5640
|
emailLabel: this.emailLabel,
|
|
5613
5641
|
passwordLabel: this.passwordLabel,
|
|
5614
5642
|
submitLabel: this.submitLabel,
|
|
@@ -5626,6 +5654,7 @@ function useRegisterDemo(props) {
|
|
|
5626
5654
|
confirmPassword: true,
|
|
5627
5655
|
hideInputs: props.hideInputs || false,
|
|
5628
5656
|
customPasswordField: false,
|
|
5657
|
+
loginPath: "/login",
|
|
5629
5658
|
},
|
|
5630
5659
|
callbacks: {
|
|
5631
5660
|
submit: async (_event) => {
|
|
@@ -5643,10 +5672,10 @@ const debug = _extends.browser('sq:useProgramMenu');
|
|
|
5643
5672
|
const UPDATE_PROGRAM_EVENT = 'sq:update-program-id';
|
|
5644
5673
|
function useProgramMenu(props) {
|
|
5645
5674
|
const programId = index_module.M();
|
|
5646
|
-
const host = index_module.
|
|
5675
|
+
const host = index_module.S();
|
|
5647
5676
|
debug({ programId, props });
|
|
5648
5677
|
const ref = _extends.useRef();
|
|
5649
|
-
const [, rerender] = index_module.
|
|
5678
|
+
const [, rerender] = index_module.sn();
|
|
5650
5679
|
_extends.useEffect(() => {
|
|
5651
5680
|
var _a;
|
|
5652
5681
|
(_a = ref.current) === null || _a === void 0 ? void 0 : _a.addEventListener('sl-select', (e) => {
|
|
@@ -5695,8 +5724,8 @@ const GET_USER_DETAILS = index_module.dist.gql `
|
|
|
5695
5724
|
function useReferralIframe(props) {
|
|
5696
5725
|
var _a;
|
|
5697
5726
|
const programId = index_module.M();
|
|
5698
|
-
const user = index_module.
|
|
5699
|
-
const { data } = index_module.
|
|
5727
|
+
const user = index_module.ne();
|
|
5728
|
+
const { data } = index_module.cn(GET_USER_DETAILS, { programId }, !(user === null || user === void 0 ? void 0 : user.jwt) || !programId);
|
|
5700
5729
|
return {
|
|
5701
5730
|
states: {
|
|
5702
5731
|
content: props,
|
|
@@ -5760,7 +5789,7 @@ const styleString$5 = sheet$5.toString();
|
|
|
5760
5789
|
function RequiredPropsError({ missingProps }) {
|
|
5761
5790
|
if (!missingProps)
|
|
5762
5791
|
return false;
|
|
5763
|
-
const host = index_module.
|
|
5792
|
+
const host = index_module.S();
|
|
5764
5793
|
const [detailsOpen, setDetailsOpen] = _extends.useState(false);
|
|
5765
5794
|
return (index.h("sl-alert", { type: "danger", open: true, class: sheet$5.classes.Alert },
|
|
5766
5795
|
index.h("style", { type: "text/css" }, styleString$5),
|
|
@@ -5877,7 +5906,7 @@ function ReferralTableView(props) {
|
|
|
5877
5906
|
}
|
|
5878
5907
|
|
|
5879
5908
|
function useChildElements() {
|
|
5880
|
-
const host = index_module.
|
|
5909
|
+
const host = index_module.S();
|
|
5881
5910
|
const initialState = host.children.length ? Array.from(host.children) : [];
|
|
5882
5911
|
const [childElements, setChildElements] = _extends.useState(initialState);
|
|
5883
5912
|
_extends.useEffect(() => {
|
|
@@ -6050,7 +6079,7 @@ const GET_REFERRAL_DATA = sqmLeaderboardRankView.gql `
|
|
|
6050
6079
|
`;
|
|
6051
6080
|
function useReferralTable(props, emptyElement, loadingElement) {
|
|
6052
6081
|
var _a, _b;
|
|
6053
|
-
const user = index_module.
|
|
6082
|
+
const user = index_module.ne();
|
|
6054
6083
|
const programIdContext = index_module.M();
|
|
6055
6084
|
// Default to context, overriden by props
|
|
6056
6085
|
const programId = (_a = props.programId) !== null && _a !== void 0 ? _a : programIdContext;
|
|
@@ -6073,13 +6102,13 @@ function useReferralTable(props, emptyElement, loadingElement) {
|
|
|
6073
6102
|
loading: false,
|
|
6074
6103
|
page: 0,
|
|
6075
6104
|
});
|
|
6076
|
-
const { data: referrerResponse, loading: referrerLoading, refetch, } = index_module.
|
|
6105
|
+
const { data: referrerResponse, loading: referrerLoading, refetch, } = index_module.cn(GET_REFERRER_DATA, {
|
|
6077
6106
|
programId: programId === "classic" ? null : programId,
|
|
6078
6107
|
rewardFilter,
|
|
6079
6108
|
}, !props.showReferrer || !(user === null || user === void 0 ? void 0 : user.jwt));
|
|
6080
6109
|
const referrerData = (_b = referrerResponse === null || referrerResponse === void 0 ? void 0 : referrerResponse.viewer) === null || _b === void 0 ? void 0 : _b.referredByReferral;
|
|
6081
6110
|
const showReferrerRow = props.showReferrer && !!(referrerData === null || referrerData === void 0 ? void 0 : referrerData.dateReferralStarted);
|
|
6082
|
-
const { envelope: referralData, states, callbacks, } = index_module.
|
|
6111
|
+
const { envelope: referralData, states, callbacks, } = index_module.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; }, {
|
|
6083
6112
|
limit: props.perPage,
|
|
6084
6113
|
offset: 0,
|
|
6085
6114
|
}, {
|
|
@@ -14749,1094 +14778,111 @@ const ReferralTableUserCell = class {
|
|
|
14749
14778
|
}
|
|
14750
14779
|
};
|
|
14751
14780
|
|
|
14752
|
-
const
|
|
14753
|
-
|
|
14754
|
-
|
|
14755
|
-
|
|
14756
|
-
|
|
14757
|
-
|
|
14758
|
-
|
|
14759
|
-
|
|
14760
|
-
|
|
14761
|
-
|
|
14762
|
-
|
|
14763
|
-
|
|
14764
|
-
|
|
14765
|
-
|
|
14766
|
-
|
|
14767
|
-
|
|
14768
|
-
|
|
14769
|
-
|
|
14770
|
-
|
|
14771
|
-
|
|
14772
|
-
|
|
14773
|
-
|
|
14774
|
-
|
|
14775
|
-
|
|
14776
|
-
|
|
14777
|
-
globalRewardKey
|
|
14778
|
-
destinationUnit
|
|
14779
|
-
steps {
|
|
14780
|
-
sourceValue
|
|
14781
|
-
prettySourceValue
|
|
14782
|
-
destinationValue
|
|
14783
|
-
prettyDestinationValue
|
|
14784
|
-
available
|
|
14785
|
-
unavailableReasonCode
|
|
14786
|
-
}
|
|
14787
|
-
}
|
|
14788
|
-
totalCount
|
|
14789
|
-
}
|
|
14790
|
-
}
|
|
14791
|
-
}
|
|
14792
|
-
}
|
|
14793
|
-
`;
|
|
14794
|
-
const EXCHANGE = index_module.dist.gql `
|
|
14795
|
-
mutation exchange($exchangeRewardInput: ExchangeRewardInput!) {
|
|
14796
|
-
exchangeReward(exchangeRewardInput: $exchangeRewardInput) {
|
|
14797
|
-
reward {
|
|
14798
|
-
id
|
|
14799
|
-
fuelTankCode
|
|
14800
|
-
}
|
|
14801
|
-
}
|
|
14802
|
-
}
|
|
14803
|
-
`;
|
|
14804
|
-
function useRewardExchangeList(props) {
|
|
14805
|
-
var _a, _b, _c, _d;
|
|
14806
|
-
const [exchangeState, setExchangeState] = _extends.useReducer((state, next) => ({
|
|
14807
|
-
...state,
|
|
14808
|
-
...next,
|
|
14809
|
-
}), {
|
|
14810
|
-
selectedItem: undefined,
|
|
14811
|
-
selectedStep: undefined,
|
|
14812
|
-
redeemStage: "chooseReward",
|
|
14813
|
-
amount: 0,
|
|
14814
|
-
exchangeError: false,
|
|
14815
|
-
});
|
|
14816
|
-
const { selectedItem, selectedStep, redeemStage, amount, exchangeError } = exchangeState;
|
|
14817
|
-
const user = index_module.T();
|
|
14818
|
-
const [exchange, { data: exchangeResponse, errors }] = index_module.be(EXCHANGE);
|
|
14819
|
-
const { data, loading, refetch } = index_module.en(GET_EXCHANGE_LIST, !(user === null || user === void 0 ? void 0 : user.jwt));
|
|
14781
|
+
const debug$1 = _extends.browser("sq:useRouter");
|
|
14782
|
+
function matchPath(pattern, page) {
|
|
14783
|
+
if (!pattern)
|
|
14784
|
+
return;
|
|
14785
|
+
const regexp = useDemoBigStat.pathToRegexp(pattern);
|
|
14786
|
+
return regexp.exec(page);
|
|
14787
|
+
}
|
|
14788
|
+
function useRouter() {
|
|
14789
|
+
const location = index_module.vn();
|
|
14790
|
+
const host = index_module.S();
|
|
14791
|
+
const [slot, setSlot] = _extends.useState(undefined);
|
|
14792
|
+
const [container, setContainer] = _extends.useState(undefined);
|
|
14793
|
+
const page = location.pathname;
|
|
14794
|
+
// convert sqm-routes into templates
|
|
14795
|
+
_extends.useEffect(() => {
|
|
14796
|
+
const routes = host.querySelectorAll(`sqm-route`);
|
|
14797
|
+
const routesArray = Array.from(routes);
|
|
14798
|
+
routesArray.forEach((route) => {
|
|
14799
|
+
const newTemplate = document.createElement("template");
|
|
14800
|
+
newTemplate.setAttribute("path", route.path);
|
|
14801
|
+
newTemplate.innerHTML = route.innerHTML;
|
|
14802
|
+
route.parentNode.appendChild(newTemplate);
|
|
14803
|
+
route.parentNode.removeChild(route);
|
|
14804
|
+
});
|
|
14805
|
+
}, []);
|
|
14820
14806
|
_extends.useEffect(() => {
|
|
14821
14807
|
var _a, _b;
|
|
14822
|
-
if (
|
|
14823
|
-
|
|
14824
|
-
}
|
|
14825
|
-
if (!!errors) {
|
|
14826
|
-
setExchangeState({ exchangeError: true });
|
|
14827
|
-
}
|
|
14828
|
-
}, [exchangeResponse, errors]);
|
|
14829
|
-
function exchangeReward() {
|
|
14830
|
-
if (!selectedItem)
|
|
14808
|
+
if (!container || !slot) {
|
|
14809
|
+
debug$1("DOM not ready for navigation rendering on:", page);
|
|
14831
14810
|
return;
|
|
14832
|
-
let exchangeVariables = {
|
|
14833
|
-
accountId: user === null || user === void 0 ? void 0 : user.accountId,
|
|
14834
|
-
userId: user.id,
|
|
14835
|
-
};
|
|
14836
|
-
switch (selectedItem.ruleType) {
|
|
14837
|
-
case "FIXED_GLOBAL_REWARD":
|
|
14838
|
-
exchangeVariables = {
|
|
14839
|
-
...exchangeVariables,
|
|
14840
|
-
redeemCreditInput: {
|
|
14841
|
-
amount: selectedItem.sourceValue,
|
|
14842
|
-
unit: selectedItem.sourceUnit,
|
|
14843
|
-
},
|
|
14844
|
-
globalRewardKey: selectedItem.globalRewardKey,
|
|
14845
|
-
};
|
|
14846
|
-
break;
|
|
14847
|
-
case "VARIABLE_GLOBAL_REWARD":
|
|
14848
|
-
exchangeVariables = {
|
|
14849
|
-
...exchangeVariables,
|
|
14850
|
-
redeemCreditInput: {
|
|
14851
|
-
amount: amount,
|
|
14852
|
-
unit: selectedItem.sourceUnit,
|
|
14853
|
-
},
|
|
14854
|
-
globalRewardKey: selectedItem.globalRewardKey,
|
|
14855
|
-
rewardInput: {
|
|
14856
|
-
valueInCents: selectedStep.destinationValue,
|
|
14857
|
-
},
|
|
14858
|
-
};
|
|
14859
|
-
break;
|
|
14860
|
-
case "VARIABLE_CREDIT_REWARD":
|
|
14861
|
-
exchangeVariables = {
|
|
14862
|
-
...exchangeVariables,
|
|
14863
|
-
redeemCreditInput: {
|
|
14864
|
-
amount: amount,
|
|
14865
|
-
unit: selectedItem.sourceUnit,
|
|
14866
|
-
},
|
|
14867
|
-
rewardInput: {
|
|
14868
|
-
type: "CREDIT",
|
|
14869
|
-
unit: selectedItem.destinationUnit,
|
|
14870
|
-
assignedCredit: selectedStep.destinationValue,
|
|
14871
|
-
},
|
|
14872
|
-
};
|
|
14873
|
-
break;
|
|
14874
|
-
default:
|
|
14875
|
-
exchangeVariables = {
|
|
14876
|
-
...exchangeVariables,
|
|
14877
|
-
redeemCreditInput: {
|
|
14878
|
-
amount: selectedItem.sourceValue,
|
|
14879
|
-
unit: selectedItem.sourceUnit,
|
|
14880
|
-
},
|
|
14881
|
-
globalRewardKey: selectedItem.globalRewardKey,
|
|
14882
|
-
};
|
|
14883
14811
|
}
|
|
14884
|
-
|
|
14885
|
-
|
|
14886
|
-
|
|
14887
|
-
|
|
14888
|
-
|
|
14889
|
-
|
|
14890
|
-
|
|
14891
|
-
|
|
14892
|
-
|
|
14893
|
-
redeemStage: "chooseReward",
|
|
14812
|
+
// <template>
|
|
14813
|
+
const templates = slot.querySelectorAll(`template`);
|
|
14814
|
+
const templatesArray = Array.from(templates);
|
|
14815
|
+
const template = templatesArray.find((template) => {
|
|
14816
|
+
var _a, _b, _c;
|
|
14817
|
+
//@ts-ignore
|
|
14818
|
+
const path = (_b = (_a = template.attributes) === null || _a === void 0 ? void 0 : _a.path) === null || _b === void 0 ? void 0 : _b.nodeValue;
|
|
14819
|
+
if ((_c = matchPath(path, page)) === null || _c === void 0 ? void 0 : _c.length)
|
|
14820
|
+
return template;
|
|
14894
14821
|
});
|
|
14895
|
-
|
|
14896
|
-
|
|
14897
|
-
|
|
14898
|
-
|
|
14822
|
+
//@ts-ignore - can't access template attributes directly
|
|
14823
|
+
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;
|
|
14824
|
+
debug$1({
|
|
14825
|
+
containerDatasetPage: container.dataset.page,
|
|
14826
|
+
templatePath,
|
|
14827
|
+
page,
|
|
14828
|
+
});
|
|
14829
|
+
// if no routes found, and the old route doesn't match the new route
|
|
14830
|
+
if (!template) {
|
|
14831
|
+
// No matching page, display nothing
|
|
14832
|
+
debug$1("No matching page found for ", page, ", so render nothing");
|
|
14833
|
+
container.innerHTML = "";
|
|
14834
|
+
container.dataset.page = page;
|
|
14835
|
+
return;
|
|
14836
|
+
}
|
|
14837
|
+
debug$1("Page updated to ", page, template);
|
|
14838
|
+
// if pathToRegexp results truthy or page is an exact match
|
|
14839
|
+
if (!!matchPath(templatePath, container.dataset.page)) {
|
|
14840
|
+
debug$1("don't rerender");
|
|
14841
|
+
// Same page, do not re-render
|
|
14842
|
+
// Reduces dom mutations, speeds up page speed
|
|
14843
|
+
}
|
|
14844
|
+
else if (template) {
|
|
14845
|
+
container.innerHTML = template.innerHTML;
|
|
14846
|
+
container.dataset.page = page;
|
|
14847
|
+
}
|
|
14848
|
+
}, [slot, container, page]);
|
|
14899
14849
|
return {
|
|
14900
|
-
states: {
|
|
14901
|
-
content: {
|
|
14902
|
-
text: props,
|
|
14903
|
-
},
|
|
14904
|
-
selectedItem,
|
|
14905
|
-
redeemStage,
|
|
14906
|
-
amount,
|
|
14907
|
-
selectedStep,
|
|
14908
|
-
exchangeError,
|
|
14909
|
-
loading,
|
|
14910
|
-
},
|
|
14911
|
-
data: {
|
|
14912
|
-
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,
|
|
14913
|
-
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,
|
|
14914
|
-
},
|
|
14915
14850
|
callbacks: {
|
|
14916
|
-
|
|
14917
|
-
|
|
14918
|
-
setStage,
|
|
14919
|
-
resetState,
|
|
14851
|
+
setSlot,
|
|
14852
|
+
setContainer,
|
|
14920
14853
|
},
|
|
14921
14854
|
};
|
|
14922
14855
|
}
|
|
14923
14856
|
|
|
14924
|
-
const
|
|
14925
|
-
index.h("circle", { cx: "15", cy: "15", r: "15", fill: "white" }),
|
|
14926
|
-
index.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" })));
|
|
14927
|
-
const CheckMark = () => (index.h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "10", height: "7", viewBox: "0 0 10 7", fill: "none" },
|
|
14928
|
-
index.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" })));
|
|
14929
|
-
|
|
14930
|
-
function Dot({ active, completed, incomplete, }) {
|
|
14931
|
-
return (index.h("div", { style: {
|
|
14932
|
-
flex: "0 0 0",
|
|
14933
|
-
content: "''",
|
|
14934
|
-
height: "4px",
|
|
14935
|
-
borderRadius: "4px",
|
|
14936
|
-
background: incomplete ? "#E5E5E5" : "#9E9E9E",
|
|
14937
|
-
position: "relative",
|
|
14938
|
-
bottom: "0",
|
|
14939
|
-
left: "0",
|
|
14940
|
-
display: "flex",
|
|
14941
|
-
justifyContent: "center",
|
|
14942
|
-
columnGap: "50px",
|
|
14943
|
-
marginRight: "-2px",
|
|
14944
|
-
boxSizing: "content-box",
|
|
14945
|
-
} },
|
|
14946
|
-
index.h("div", { style: {
|
|
14947
|
-
backgroundColor: completed ? "#9E9E9E" : "#FFF",
|
|
14948
|
-
border: active
|
|
14949
|
-
? "3px solid #9E9E9E"
|
|
14950
|
-
: incomplete
|
|
14951
|
-
? "3px solid #E5E5E5"
|
|
14952
|
-
: "3px solid #9E9E9E",
|
|
14953
|
-
borderRadius: "50%",
|
|
14954
|
-
width: "10px",
|
|
14955
|
-
height: "10px",
|
|
14956
|
-
margin: "-6px auto 0px",
|
|
14957
|
-
zIndex: "1",
|
|
14958
|
-
boxSizing: "content-box",
|
|
14959
|
-
} }, completed && (index.h("div", { style: { top: "-6px", position: "relative" } },
|
|
14960
|
-
index.h(CheckMark, null))))));
|
|
14961
|
-
}
|
|
14962
|
-
function ProgressLine({ incomplete = false, active = false }) {
|
|
14963
|
-
return (index.h("div", { style: {
|
|
14964
|
-
content: "''",
|
|
14965
|
-
flex: "0.5 0.5 0",
|
|
14966
|
-
height: "4px",
|
|
14967
|
-
borderRadius: "4px",
|
|
14968
|
-
background: incomplete || active ? "#E5E5E5" : "#9E9E9E",
|
|
14969
|
-
position: "relative",
|
|
14970
|
-
bottom: "0",
|
|
14971
|
-
left: "0",
|
|
14972
|
-
display: "flex",
|
|
14973
|
-
justifyContent: "center",
|
|
14974
|
-
columnGap: "50px",
|
|
14975
|
-
marginRight: "-2px",
|
|
14976
|
-
boxSizing: "content-box",
|
|
14977
|
-
} }));
|
|
14978
|
-
}
|
|
14979
|
-
function Progress({ active, completed, incomplete }) {
|
|
14980
|
-
return [
|
|
14981
|
-
index.h(ProgressLine, { incomplete: incomplete }),
|
|
14982
|
-
index.h(Dot, { active: active, completed: completed, incomplete: incomplete }),
|
|
14983
|
-
index.h(ProgressLine, { incomplete: incomplete, active: active }),
|
|
14984
|
-
];
|
|
14985
|
-
}
|
|
14986
|
-
function ProgressBar({ stageCount, currentStage, }) {
|
|
14987
|
-
return (index.h("div", { style: { display: "flex", columnGap: "-2px" } }, Array.from(Array(stageCount).keys()).map((stage) => (index.h(Progress, { active: currentStage === stage, completed: currentStage > stage, incomplete: currentStage < stage })))));
|
|
14988
|
-
}
|
|
14989
|
-
|
|
14990
|
-
const stageList = ["chooseReward", "chooseAmount", "confirmation", "success"];
|
|
14991
|
-
const stageProgressList = {
|
|
14992
|
-
chooseReward: "Choose reward",
|
|
14993
|
-
chooseAmount: "Amount",
|
|
14994
|
-
confirmation: "Confirm",
|
|
14995
|
-
};
|
|
14996
|
-
function RewardExchangeView(props) {
|
|
14997
|
-
console.log(props);
|
|
14998
|
-
const style = {
|
|
14999
|
-
HostBlock: mixins.HostBlock,
|
|
15000
|
-
Container: {
|
|
15001
|
-
padding: "var(--sl-spacing-medium)",
|
|
15002
|
-
position: "relative",
|
|
15003
|
-
},
|
|
15004
|
-
CardContainer: {
|
|
15005
|
-
"&:active": {
|
|
15006
|
-
//boxShadow: "0 3px 10px #87ceeb6e!important",
|
|
15007
|
-
},
|
|
15008
|
-
},
|
|
15009
|
-
Base: {
|
|
15010
|
-
display: "flex",
|
|
15011
|
-
cursor: "pointer",
|
|
15012
|
-
textAlign: "center",
|
|
15013
|
-
height: "120px",
|
|
15014
|
-
"&::part(base)": {
|
|
15015
|
-
boxShadow: "none",
|
|
15016
|
-
width: "100%",
|
|
15017
|
-
// maxWidth: "350px",
|
|
15018
|
-
display: "flex",
|
|
15019
|
-
margin: "0 auto",
|
|
15020
|
-
},
|
|
15021
|
-
"&::part(body)": {
|
|
15022
|
-
padding: 0,
|
|
15023
|
-
display: "flex",
|
|
15024
|
-
width: "100%",
|
|
15025
|
-
},
|
|
15026
|
-
"& .text-area": {
|
|
15027
|
-
textAlign: "left",
|
|
15028
|
-
padding: "8px",
|
|
15029
|
-
},
|
|
15030
|
-
"& .title": {
|
|
15031
|
-
fontSize: "var(--sl-font-size-medium)",
|
|
15032
|
-
fontWeight: "var(--sl-font-weight-semibold)",
|
|
15033
|
-
},
|
|
15034
|
-
"& .amount": {
|
|
15035
|
-
fontSize: "var(--sl-font-size-small)",
|
|
15036
|
-
},
|
|
15037
|
-
"& .error": {
|
|
15038
|
-
fontSize: "var(--sl-font-size-small)",
|
|
15039
|
-
color: "var(--sl-color-warning-500)",
|
|
15040
|
-
},
|
|
15041
|
-
"& .selected-outline": {
|
|
15042
|
-
width: "18px",
|
|
15043
|
-
height: "18px",
|
|
15044
|
-
minWidth: "18px",
|
|
15045
|
-
borderRadius: "50%",
|
|
15046
|
-
background: "var(--sl-color-primary-500)",
|
|
15047
|
-
position: "relative",
|
|
15048
|
-
margin: "-9px",
|
|
15049
|
-
left: "100%",
|
|
15050
|
-
},
|
|
15051
|
-
"& .selected-checkmark": {
|
|
15052
|
-
position: "relative",
|
|
15053
|
-
top: "-6px",
|
|
15054
|
-
},
|
|
15055
|
-
},
|
|
15056
|
-
Drawer: {
|
|
15057
|
-
"&::part(base)": {
|
|
15058
|
-
minWidth: "400px",
|
|
15059
|
-
maxWidth: "700px",
|
|
15060
|
-
width: "50%",
|
|
15061
|
-
margin: "0 auto",
|
|
15062
|
-
right: "0",
|
|
15063
|
-
},
|
|
15064
|
-
"&::part(panel)": {
|
|
15065
|
-
height: "85vh",
|
|
15066
|
-
width: "100%",
|
|
15067
|
-
},
|
|
15068
|
-
},
|
|
15069
|
-
FullImage: {
|
|
15070
|
-
objectFit: "contain",
|
|
15071
|
-
maxWidth: "100%",
|
|
15072
|
-
height: "150px",
|
|
15073
|
-
display: "flex",
|
|
15074
|
-
margin: "0 auto",
|
|
15075
|
-
},
|
|
15076
|
-
PreviewImage: {
|
|
15077
|
-
objectFit: "contain",
|
|
15078
|
-
width: "120px",
|
|
15079
|
-
height: "120px",
|
|
15080
|
-
flex: 0.33,
|
|
15081
|
-
},
|
|
15082
|
-
InputBox: {
|
|
15083
|
-
width: "100%",
|
|
15084
|
-
marginBottom: "20px",
|
|
15085
|
-
},
|
|
15086
|
-
Select: {
|
|
15087
|
-
"&::part(base)": {
|
|
15088
|
-
flex: "0.75",
|
|
15089
|
-
},
|
|
15090
|
-
"&::part(menu)": {
|
|
15091
|
-
maxHeight: "40vh",
|
|
15092
|
-
},
|
|
15093
|
-
},
|
|
15094
|
-
Buttons: {
|
|
15095
|
-
marginLeft: "auto",
|
|
15096
|
-
width: "100%",
|
|
15097
|
-
maxWidth: "300px",
|
|
15098
|
-
},
|
|
15099
|
-
Button: {
|
|
15100
|
-
margin: "10px 0",
|
|
15101
|
-
display: "block",
|
|
15102
|
-
textAlign: "center",
|
|
15103
|
-
cursor: "pointer",
|
|
15104
|
-
},
|
|
15105
|
-
ProgressBar: {
|
|
15106
|
-
fontSize: "80%",
|
|
15107
|
-
marginBottom: "20px",
|
|
15108
|
-
"& .text-area": {
|
|
15109
|
-
marginTop: "5px",
|
|
15110
|
-
display: "flex",
|
|
15111
|
-
justifyContent: "center",
|
|
15112
|
-
textAlign: "center",
|
|
15113
|
-
whiteSpace: "nowrap",
|
|
15114
|
-
marginBottom: "6px",
|
|
15115
|
-
"& .text": {
|
|
15116
|
-
flex: "1 1 0",
|
|
15117
|
-
},
|
|
15118
|
-
"& .text.subdued": {
|
|
15119
|
-
color: "#BDBDBD",
|
|
15120
|
-
},
|
|
15121
|
-
},
|
|
15122
|
-
},
|
|
15123
|
-
KutayCard: {
|
|
15124
|
-
"&::part(base)": {
|
|
15125
|
-
boxShadow: "none",
|
|
15126
|
-
},
|
|
15127
|
-
},
|
|
15128
|
-
KutayButton: {
|
|
15129
|
-
display: "flex",
|
|
15130
|
-
flexWrap: "wrap-reverse",
|
|
15131
|
-
margin: "var(--sl-spacing-medium) 0",
|
|
15132
|
-
"& .cancel": {
|
|
15133
|
-
marginLeft: "auto",
|
|
15134
|
-
marginRight: "var(--sl-spacing-medium)",
|
|
15135
|
-
"&::part(base)": {
|
|
15136
|
-
fontWeight: "var(--sl-font-weight-normal)",
|
|
15137
|
-
color: "var(--sl-color-neutral-1000)",
|
|
15138
|
-
},
|
|
15139
|
-
"@media (max-width: 1024px)": {
|
|
15140
|
-
width: "100%",
|
|
15141
|
-
marginRight: "0",
|
|
15142
|
-
},
|
|
15143
|
-
},
|
|
15144
|
-
"& .continue": {
|
|
15145
|
-
"&::part(base)": {
|
|
15146
|
-
background: "var(--sl-color-primary-500)",
|
|
15147
|
-
borderColor: "var(--sl-color-primary-500)",
|
|
15148
|
-
fontWeight: "var(--sl-font-weight-normal)",
|
|
15149
|
-
color: "var(--sl-color-neutral-0)",
|
|
15150
|
-
},
|
|
15151
|
-
"@media (max-width: 1024px)": {
|
|
15152
|
-
width: "100%",
|
|
15153
|
-
},
|
|
15154
|
-
},
|
|
15155
|
-
"& .continue.right": {
|
|
15156
|
-
marginLeft: "auto",
|
|
15157
|
-
},
|
|
15158
|
-
},
|
|
15159
|
-
};
|
|
15160
|
-
// JSS config
|
|
15161
|
-
jssPresetDefault_esm.jss.setup(jssPresetDefault_esm.create());
|
|
15162
|
-
const sheet = jssPresetDefault_esm.jss.createStyleSheet(style);
|
|
15163
|
-
const styleString = sheet.toString();
|
|
15164
|
-
const { states, data, callbacks } = props;
|
|
15165
|
-
const { selectedItem, selectedStep } = states;
|
|
15166
|
-
function getInput() {
|
|
15167
|
-
var _a, _b;
|
|
15168
|
-
const item = states.selectedItem;
|
|
15169
|
-
if (!item || (item === null || item === void 0 ? void 0 : item.ruleType) === "FIXED_GLOBAL_REWARD")
|
|
15170
|
-
return index.h("span", null, item === null || item === void 0 ? void 0 : item.prettySourceValue);
|
|
15171
|
-
if (!((_a = item.steps) === null || _a === void 0 ? void 0 : _a.length)) {
|
|
15172
|
-
return index.h("p", null,
|
|
15173
|
-
"Not enough ",
|
|
15174
|
-
item.sourceUnit,
|
|
15175
|
-
" to redeem for this reward.");
|
|
15176
|
-
}
|
|
15177
|
-
return (index.h("sl-select", { style: { width: "auto" }, label: "Select amount to receive", class: sheet.classes.Select, value: states.selectedStep, "onSl-select": (e) => {
|
|
15178
|
-
var _a, _b, _c, _d, _e;
|
|
15179
|
-
return callbacks.setExchangeState({
|
|
15180
|
-
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,
|
|
15181
|
-
selectedStep: (_e = (_d = e.detail) === null || _d === void 0 ? void 0 : _d.item) === null || _e === void 0 ? void 0 : _e.value,
|
|
15182
|
-
});
|
|
15183
|
-
} }, (_b = item.steps) === null || _b === void 0 ? void 0 : _b.map((step) => {
|
|
15184
|
-
var _a, _b;
|
|
15185
|
-
return (index.h("sl-menu-item", { value: step, disabled: !step.available },
|
|
15186
|
-
step.prettyDestinationValue,
|
|
15187
|
-
index.h("div", { slot: "suffix", style: { fontSize: "75%", float: "right" } },
|
|
15188
|
-
step.prettySourceValue,
|
|
15189
|
-
step.unavailableReasonCode && (index.h("p", { style: { fontSize: "70%", color: "#F2994A" } }, global.intl.formatMessage({
|
|
15190
|
-
id: "unavailableCode",
|
|
15191
|
-
defaultMessage: (_b = (_a = states.content) === null || _a === void 0 ? void 0 : _a.text) === null || _b === void 0 ? void 0 : _b.notAvailableError,
|
|
15192
|
-
}, {
|
|
15193
|
-
unavailableReason: step.unavailableReason || step.unavailableReasonCode,
|
|
15194
|
-
}))))));
|
|
15195
|
-
})));
|
|
15196
|
-
}
|
|
15197
|
-
function chooseReward() {
|
|
15198
|
-
var _a;
|
|
15199
|
-
return [
|
|
15200
|
-
index.h("div", { style: {
|
|
15201
|
-
display: "grid",
|
|
15202
|
-
justifyContent: "center",
|
|
15203
|
-
gap: "20px",
|
|
15204
|
-
gridTemplateColumns: "repeat(auto-fill, minmax(300px, 1fr))",
|
|
15205
|
-
} }, (_a = data.exchangeList) === null || _a === void 0 ? void 0 : _a.map((item) => {
|
|
15206
|
-
var _a, _b;
|
|
15207
|
-
const style = {
|
|
15208
|
-
boxShadow: item.key === (selectedItem === null || selectedItem === void 0 ? void 0 : selectedItem.key)
|
|
15209
|
-
? "0 0 0 2px var(--sl-color-primary-500)"
|
|
15210
|
-
: "none",
|
|
15211
|
-
marginBottom: "10px 0",
|
|
15212
|
-
borderRadius: "var(--sl-border-radius-medium)",
|
|
15213
|
-
flex: "1",
|
|
15214
|
-
minWidth: "100%",
|
|
15215
|
-
color: !item.available && "#eee",
|
|
15216
|
-
};
|
|
15217
|
-
const amount = item.ruleType === "FIXED_GLOBAL_REWARD"
|
|
15218
|
-
? item.prettySourceValue
|
|
15219
|
-
: `${item.sourceMinValue} to ${item.prettySourceMaxValue}`;
|
|
15220
|
-
return (index.h("div", { key: item.key, class: item.available ? sheet.classes.CardContainer : "", style: style },
|
|
15221
|
-
index.h("sl-card", { class: sheet.classes.Base, onClick: () => item.available &&
|
|
15222
|
-
callbacks.setExchangeState({ selectedItem: item }) },
|
|
15223
|
-
item.key === (selectedItem === null || selectedItem === void 0 ? void 0 : selectedItem.key) && (index.h("div", { class: "selected-outline" },
|
|
15224
|
-
index.h("div", { class: "selected-checkmark" },
|
|
15225
|
-
index.h(CheckMark, null)))),
|
|
15226
|
-
// item?.imageUrl &&
|
|
15227
|
-
index.h("img", { class: sheet.classes.PreviewImage, src: (item === null || item === void 0 ? void 0 : item.imageUrl) || index.getAssetPath("./assets/Reward-icon.png") }),
|
|
15228
|
-
index.h("div", { class: "text-area" },
|
|
15229
|
-
index.h("div", { class: "title" }, item.description),
|
|
15230
|
-
index.h("div", { class: "amount" }, amount),
|
|
15231
|
-
item.unavailableReasonCode && (index.h("div", { class: "error" }, global.intl.formatMessage({
|
|
15232
|
-
id: "unavailableCode",
|
|
15233
|
-
defaultMessage: (_b = (_a = states.content) === null || _a === void 0 ? void 0 : _a.text) === null || _b === void 0 ? void 0 : _b.notAvailableError,
|
|
15234
|
-
}, {
|
|
15235
|
-
unavailableReason: item.unavailableReason ||
|
|
15236
|
-
item.unavailableReasonCode,
|
|
15237
|
-
})))))));
|
|
15238
|
-
})),
|
|
15239
|
-
index.h("div", { class: sheet.classes.KutayButton },
|
|
15240
|
-
index.h("sl-button", { class: "continue right", size: "large", onClick: () => callbacks.setStage("chooseAmount"), disabled: !states.selectedItem }, "Continue")),
|
|
15241
|
-
];
|
|
15242
|
-
}
|
|
15243
|
-
function chooseAmount() {
|
|
15244
|
-
var _a;
|
|
15245
|
-
const input = getInput();
|
|
15246
|
-
const isDisabled = ((_a = states.selectedItem) === null || _a === void 0 ? void 0 : _a.ruleType) === "FIXED_GLOBAL_REWARD"
|
|
15247
|
-
? false
|
|
15248
|
-
: input && !states.amount;
|
|
15249
|
-
return (index.h("div", null,
|
|
15250
|
-
index.h("div", null,
|
|
15251
|
-
//selectedItem?.imageUrl &&
|
|
15252
|
-
index.h("img", { class: sheet.classes.FullImage, src: (selectedItem === null || selectedItem === void 0 ? void 0 : selectedItem.imageUrl) ||
|
|
15253
|
-
index.getAssetPath("./assets/Reward-icon.png") })),
|
|
15254
|
-
index.h("b", null, selectedItem === null || selectedItem === void 0 ? void 0 : selectedItem.description),
|
|
15255
|
-
index.h("div", { class: sheet.classes.InputBox }, input),
|
|
15256
|
-
index.h("div", { class: sheet.classes.KutayButton },
|
|
15257
|
-
index.h("sl-button", { class: "cancel", size: "large", type: "text", onClick: () => callbacks.resetState() }, "Cancel"),
|
|
15258
|
-
index.h("sl-button", { class: "continue", size: "large", onClick: () => callbacks.setStage("confirmation"), disabled: isDisabled }, "Continue to confirmation"))));
|
|
15259
|
-
}
|
|
15260
|
-
function confirmation() {
|
|
15261
|
-
return (index.h("div", null,
|
|
15262
|
-
index.h("h2", null, "Confirm and redeem"),
|
|
15263
|
-
index.h("div", { style: { textAlign: "center" } },
|
|
15264
|
-
index.h("p", null,
|
|
15265
|
-
index.h("b", null, (selectedStep === null || selectedStep === void 0 ? void 0 : selectedStep.prettySourceValue) || (selectedItem === null || selectedItem === void 0 ? void 0 : selectedItem.prettySourceValue))),
|
|
15266
|
-
index.h("p", null,
|
|
15267
|
-
index.h(ExchangeArrows, null)),
|
|
15268
|
-
index.h("div", { class: sheet.classes.CardContainer, style: {
|
|
15269
|
-
boxShadow: "none",
|
|
15270
|
-
marginBottom: "10px",
|
|
15271
|
-
flex: "1",
|
|
15272
|
-
minWidth: "100%",
|
|
15273
|
-
} },
|
|
15274
|
-
index.h("sl-card", { class: sheet.classes.Base },
|
|
15275
|
-
index.h("img", { class: sheet.classes.PreviewImage, src: (selectedItem === null || selectedItem === void 0 ? void 0 : selectedItem.imageUrl) ||
|
|
15276
|
-
index.getAssetPath("./assets/Reward-icon.png") }),
|
|
15277
|
-
index.h("p", { style: { marginBottom: "0", flex: "1" } }, selectedStep === null || selectedStep === void 0 ? void 0 : selectedStep.prettyDestinationValue)))),
|
|
15278
|
-
index.h("div", { class: sheet.classes.KutayButton },
|
|
15279
|
-
index.h("sl-button", { class: "cancel", type: "text", size: "large", onClick: () => callbacks.setStage("chooseAmount") }, "Back"),
|
|
15280
|
-
index.h("sl-button", { class: "continue", size: "large", onClick: callbacks.exchangeReward }, "Redeem"))));
|
|
15281
|
-
}
|
|
15282
|
-
function success() {
|
|
15283
|
-
return (index.h("div", { style: { textAlign: "center" } },
|
|
15284
|
-
index.h("img", { class: sheet.classes.FullImage, src: index.getAssetPath("./assets/Reward-icon.png") }),
|
|
15285
|
-
index.h("p", { style: { color: "forestgreen" } }, "Reward Redeemed"),
|
|
15286
|
-
(data === null || data === void 0 ? void 0 : data.fuelTankCode) && index.h("pre", null, data === null || data === void 0 ? void 0 : data.fuelTankCode),
|
|
15287
|
-
index.h("sl-button", { class: "continue", type: "primary", size: "large", onClick: () => callbacks.resetState(true) }, "Done")));
|
|
15288
|
-
}
|
|
15289
|
-
const stages = {
|
|
15290
|
-
chooseReward: () => chooseReward(),
|
|
15291
|
-
chooseAmount: () => chooseAmount(),
|
|
15292
|
-
confirmation: () => confirmation(),
|
|
15293
|
-
success: () => success(),
|
|
15294
|
-
};
|
|
15295
|
-
const currentStage = stages[states.redeemStage];
|
|
15296
|
-
function stageMap() {
|
|
15297
|
-
const stageNumber = stageList.indexOf(states.redeemStage);
|
|
15298
|
-
return (index.h("div", { class: sheet.classes.ProgressBar },
|
|
15299
|
-
index.h("div", { class: "text-area" }, Object.keys(stageProgressList).map((stage) => {
|
|
15300
|
-
if (stage === states.redeemStage) {
|
|
15301
|
-
return index.h("span", { class: "text" }, stageProgressList[stage]);
|
|
15302
|
-
}
|
|
15303
|
-
else {
|
|
15304
|
-
return (index.h("span", { class: "text subdued" }, stageProgressList[stage]));
|
|
15305
|
-
}
|
|
15306
|
-
})),
|
|
15307
|
-
index.h(ProgressBar, { stageCount: 3, currentStage: stageNumber })));
|
|
15308
|
-
}
|
|
15309
|
-
// const BackButton = () => {
|
|
15310
|
-
// if (states.redeemStage === "success") return "";
|
|
15311
|
-
// let previousStage: Stages = "";
|
|
15312
|
-
// if (states.redeemStage === "confirmation") {
|
|
15313
|
-
// previousStage = "chooseAmount";
|
|
15314
|
-
// } else if (states.redeemStage === "chooseAmount") {
|
|
15315
|
-
// previousStage = "chooseReward";
|
|
15316
|
-
// }
|
|
15317
|
-
// return (
|
|
15318
|
-
// <div slot="label">
|
|
15319
|
-
// <a
|
|
15320
|
-
// style={{ cursor: "pointer", fontSize: "80%", color: "#858585" }}
|
|
15321
|
-
// onClick={() => callbacks.setStage(previousStage)}
|
|
15322
|
-
// >
|
|
15323
|
-
// <LeftArrow /> Back
|
|
15324
|
-
// </a>
|
|
15325
|
-
// </div>
|
|
15326
|
-
// );
|
|
15327
|
-
// };
|
|
15328
|
-
function errorMessage() {
|
|
15329
|
-
return (index.h("sl-alert", { type: "danger", open: true },
|
|
15330
|
-
index.h("sl-icon", { slot: "icon", name: "exclamation-octagon" }),
|
|
15331
|
-
"An error occured trying to redeem this reward. Please try again."));
|
|
15332
|
-
}
|
|
15333
|
-
return (index.h("div", { class: sheet.classes.Container },
|
|
15334
|
-
index.h("style", { type: "text/css" }, styleString),
|
|
15335
|
-
index.h("div", null,
|
|
15336
|
-
stageMap(),
|
|
15337
|
-
states.exchangeError && errorMessage(),
|
|
15338
|
-
currentStage && currentStage())));
|
|
15339
|
-
}
|
|
14857
|
+
const sqmRouterCss = "sqm-router{display:contents}";
|
|
15340
14858
|
|
|
15341
|
-
const
|
|
14859
|
+
const SqmRouter = class {
|
|
15342
14860
|
constructor(hostRef) {
|
|
15343
14861
|
index.registerInstance(this, hostRef);
|
|
15344
14862
|
this.ignored = true;
|
|
15345
|
-
/**
|
|
15346
|
-
* @uiName Exchange button text
|
|
15347
|
-
*/
|
|
15348
|
-
this.buttonText = "Exchange Rewards";
|
|
15349
|
-
/**
|
|
15350
|
-
* @uiName Exchange button text
|
|
15351
|
-
*/
|
|
15352
|
-
this.notAvailableError = "{unavailableReason, select, US_TAX {US Tax limit} INSUFFICIENT_REDEEMABLE_CREDIT {Not enough points} other {Not available} }";
|
|
15353
14863
|
_extends.h$1(this);
|
|
15354
14864
|
}
|
|
15355
14865
|
disconnectedCallback() { }
|
|
15356
14866
|
render() {
|
|
15357
|
-
|
|
15358
|
-
|
|
15359
|
-
// attribute: "listType",
|
|
15360
|
-
// value: this.listType,
|
|
15361
|
-
// },
|
|
15362
|
-
// ]);
|
|
15363
|
-
// if (missingProps) {
|
|
15364
|
-
// return <RequiredPropsError missingProps={missingProps} />;
|
|
15365
|
-
// }
|
|
15366
|
-
const { states, data, callbacks } = index_module.j()
|
|
15367
|
-
? useRewardExchangeListDemo(utils.getProps(this))
|
|
15368
|
-
: useRewardExchangeList(utils.getProps(this));
|
|
15369
|
-
return (index.h(index.Host, { style: { display: "contents" } }, index.h(RewardExchangeView, { states: states, data: data, callbacks: callbacks })));
|
|
14867
|
+
const { callbacks } = useRouter();
|
|
14868
|
+
return (index.h(index.Host, null, index.h("div", { ref: callbacks.setSlot, style: { display: "none" } }, index.h("slot", null)), index.h("div", { style: { display: "contents" }, ref: callbacks.setContainer })));
|
|
15370
14869
|
}
|
|
15371
|
-
static get assetsDirs() { return ["assets"]; }
|
|
15372
14870
|
};
|
|
15373
|
-
|
|
15374
|
-
return cjs.cjs({
|
|
15375
|
-
states: {
|
|
15376
|
-
content: {
|
|
15377
|
-
text: props,
|
|
15378
|
-
},
|
|
15379
|
-
redeemStage: "chooseReward",
|
|
15380
|
-
amount: 0,
|
|
15381
|
-
selectedStep: undefined,
|
|
15382
|
-
exchangeError: false,
|
|
15383
|
-
loading: false,
|
|
15384
|
-
},
|
|
15385
|
-
data: {
|
|
15386
|
-
shareCode: "SHARECODE123",
|
|
15387
|
-
},
|
|
15388
|
-
callbacks: {
|
|
15389
|
-
exchangeReward: () => { },
|
|
15390
|
-
setExchangeState: (_) => { },
|
|
15391
|
-
setStage: (_) => { },
|
|
15392
|
-
resetState: () => { },
|
|
15393
|
-
},
|
|
15394
|
-
}, props.demoData || {}, { arrayMerge: (_, a) => a });
|
|
15395
|
-
}
|
|
14871
|
+
SqmRouter.style = sqmRouterCss;
|
|
15396
14872
|
|
|
15397
14873
|
const style$7 = {
|
|
15398
|
-
|
|
15399
|
-
|
|
15400
|
-
|
|
15401
|
-
},
|
|
15402
|
-
TCell: {
|
|
15403
|
-
padding: "var(--sl-spacing-small) var(--sl-spacing-medium) var(--sl-spacing-small) 0",
|
|
15404
|
-
},
|
|
15405
|
-
TRow: {
|
|
15406
|
-
"border-top": "1px solid #EAEAEA",
|
|
15407
|
-
},
|
|
15408
|
-
Table: {
|
|
15409
|
-
"border-collapse": "collapse",
|
|
15410
|
-
width: "100%",
|
|
15411
|
-
},
|
|
15412
|
-
ButtonContainer: {
|
|
15413
|
-
display: "flex",
|
|
15414
|
-
"justify-content": "flex-end",
|
|
15415
|
-
"margin-top": "var(--sl-spacing-small)",
|
|
15416
|
-
...mixins.gap({ direction: "row", size: "var(--sl-spacing-small)" }),
|
|
14874
|
+
HostBlock: mixins.HostBlock,
|
|
14875
|
+
buttonStyle: {
|
|
14876
|
+
display: "block",
|
|
15417
14877
|
},
|
|
15418
14878
|
};
|
|
15419
14879
|
jssPresetDefault_esm.jss.setup(jssPresetDefault_esm.create());
|
|
15420
14880
|
const sheet$7 = jssPresetDefault_esm.jss.createStyleSheet(style$7);
|
|
15421
14881
|
const styleString$7 = sheet$7.toString();
|
|
15422
|
-
function GenericTableView(props) {
|
|
15423
|
-
const { states, data, callbacks, elements } = props;
|
|
15424
|
-
const { columns, rows } = elements;
|
|
15425
|
-
const { show } = states;
|
|
15426
|
-
return (index.h("div", null,
|
|
15427
|
-
index.h("style", { type: "text/css" }, styleString$7),
|
|
15428
|
-
index.h("table", { class: sheet$7.classes.Table },
|
|
15429
|
-
data.textOverrides.showLabels && (index.h("thead", null,
|
|
15430
|
-
index.h("tr", null, columns === null || columns === void 0 ? void 0 : columns.map((column) => (index.h("th", { class: sheet$7.classes.THead },
|
|
15431
|
-
index.h(sqmTextSpanView.TextSpanView, { type: "h3" }, column))))))),
|
|
15432
|
-
index.h("tbody", null,
|
|
15433
|
-
show === "loading" && elements.loadingElement,
|
|
15434
|
-
show === "empty" && elements.emptyElement,
|
|
15435
|
-
show === "rows" && (rows === null || rows === void 0 ? void 0 : rows.map((row, i) => (index.h("tr", { class: sheet$7.classes.TRow, style: {
|
|
15436
|
-
borderTop: `${!data.textOverrides.showLabels && i === 0 ? "none" : ""}`,
|
|
15437
|
-
}, part: "table-row" }, row.map((cell) => (index.h("td", { class: sheet$7.classes.TCell },
|
|
15438
|
-
index.h(sqmTextSpanView.TextSpanView, { type: "p" }, cell)))))))))),
|
|
15439
|
-
index.h("div", { class: sheet$7.classes.ButtonContainer, part: states.namespace + "-button-wrapper" },
|
|
15440
|
-
index.h("sl-button", { size: "small", disabled: !states.hasPrev, loading: show === "loading", onClick: callbacks.prevPage, exportparts: "base: defaultbutton-base" }, data.textOverrides.prevLabel),
|
|
15441
|
-
index.h("sl-button", { size: "small", loading: show === "loading", disabled: !states.hasNext, onClick: callbacks.nextPage, exportparts: "base: defaultbutton-base" }, data.textOverrides.moreLabel))));
|
|
15442
|
-
}
|
|
15443
|
-
|
|
15444
|
-
function LoadingSlot$1() {
|
|
15445
|
-
return (index.h("slot", { name: "loading" },
|
|
15446
|
-
index.h(LoadingSkeleton, null)));
|
|
15447
|
-
}
|
|
15448
|
-
function LoadingSkeleton() {
|
|
15449
|
-
return (index.h("div", { style: { width: "100%" } },
|
|
15450
|
-
index.h("sl-skeleton", { style: { marginBottom: "28px" } }),
|
|
15451
|
-
index.h("sl-skeleton", { style: { marginBottom: "28px" } }),
|
|
15452
|
-
index.h("sl-skeleton", { style: { marginBottom: "28px" } }),
|
|
15453
|
-
index.h("sl-skeleton", { style: { marginBottom: "28px" } }),
|
|
15454
|
-
index.h("sl-skeleton", null)));
|
|
15455
|
-
}
|
|
15456
|
-
function EmptySlot$1({ label }) {
|
|
15457
|
-
return (index.h("slot", { name: "empty" },
|
|
15458
|
-
index.h(EmptySkeleton, { label: label })));
|
|
15459
|
-
}
|
|
15460
|
-
function EmptySkeleton({ label }) {
|
|
15461
|
-
return (index.h("div", { style: { width: "100%" } },
|
|
15462
|
-
index.h("sqm-text", null,
|
|
15463
|
-
index.h("h3", { style: { color: "#777777" } }, label))));
|
|
15464
|
-
}
|
|
15465
|
-
|
|
15466
|
-
const CSS_NAMESPACE = "sqm-rewards-table";
|
|
15467
|
-
const GET_REWARDS = sqmLeaderboardRankView.gql `
|
|
15468
|
-
query getRewards(
|
|
15469
|
-
$limit: Int!
|
|
15470
|
-
$offset: Int!
|
|
15471
|
-
$rewardFilter: RewardFilterInput
|
|
15472
|
-
) {
|
|
15473
|
-
viewer {
|
|
15474
|
-
... on User {
|
|
15475
|
-
id
|
|
15476
|
-
rewards(limit: $limit, offset: $offset, filter: $rewardFilter) {
|
|
15477
|
-
totalCount
|
|
15478
|
-
count
|
|
15479
|
-
data {
|
|
15480
|
-
id
|
|
15481
|
-
type
|
|
15482
|
-
value
|
|
15483
|
-
unit
|
|
15484
|
-
name
|
|
15485
|
-
dateGiven
|
|
15486
|
-
dateExpires
|
|
15487
|
-
dateCancelled
|
|
15488
|
-
dateRedeemed
|
|
15489
|
-
dateScheduledFor
|
|
15490
|
-
fuelTankCode
|
|
15491
|
-
fuelTankType
|
|
15492
|
-
currency
|
|
15493
|
-
prettyValue
|
|
15494
|
-
statuses
|
|
15495
|
-
globalRewardKey
|
|
15496
|
-
programRewardKey
|
|
15497
|
-
rewardRedemptionTransactions {
|
|
15498
|
-
data {
|
|
15499
|
-
exchangedRewards {
|
|
15500
|
-
data {
|
|
15501
|
-
prettyValue
|
|
15502
|
-
type
|
|
15503
|
-
fuelTankCode
|
|
15504
|
-
globalRewardKey
|
|
15505
|
-
}
|
|
15506
|
-
}
|
|
15507
|
-
}
|
|
15508
|
-
}
|
|
15509
|
-
}
|
|
15510
|
-
}
|
|
15511
|
-
}
|
|
15512
|
-
}
|
|
15513
|
-
}
|
|
15514
|
-
`;
|
|
15515
|
-
function useRewardsTable(props, emptyElement, loadingElement) {
|
|
15516
|
-
var _a, _b;
|
|
15517
|
-
const user = index_module.T();
|
|
15518
|
-
const programIdContext = index_module.M();
|
|
15519
|
-
// Default to context, overriden by props
|
|
15520
|
-
const programId = (_a = props.programId) !== null && _a !== void 0 ? _a : programIdContext;
|
|
15521
|
-
const rewardFilter = {
|
|
15522
|
-
userId_eq: user === null || user === void 0 ? void 0 : user.id,
|
|
15523
|
-
accountId_eq: user === null || user === void 0 ? void 0 : user.accountId,
|
|
15524
|
-
// If no program ID, shows all programs
|
|
15525
|
-
...(programId
|
|
15526
|
-
? programId === "classic"
|
|
15527
|
-
? { programId_exists: false }
|
|
15528
|
-
: { programId_eq: programId }
|
|
15529
|
-
: {}),
|
|
15530
|
-
};
|
|
15531
|
-
const [content, setContent] = _extends.useReducer((state, next) => ({
|
|
15532
|
-
...state,
|
|
15533
|
-
...next,
|
|
15534
|
-
}), {
|
|
15535
|
-
columns: [],
|
|
15536
|
-
rows: [],
|
|
15537
|
-
loading: false,
|
|
15538
|
-
page: 0,
|
|
15539
|
-
});
|
|
15540
|
-
const { envelope: rewardsData, states, callbacks, } = index_module.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; }, {
|
|
15541
|
-
limit: props.perPage,
|
|
15542
|
-
offset: 0,
|
|
15543
|
-
}, {
|
|
15544
|
-
rewardFilter,
|
|
15545
|
-
}, !(user === null || user === void 0 ? void 0 : user.jwt));
|
|
15546
|
-
const tick = reRender.useRerenderListener();
|
|
15547
|
-
const components = useChildElements();
|
|
15548
|
-
const data = rewardsData === null || rewardsData === void 0 ? void 0 : rewardsData.data;
|
|
15549
|
-
async function getComponentData(components) {
|
|
15550
|
-
// filter out loading and empty states from columns array
|
|
15551
|
-
const columnComponents = components.filter((component) => component.slot !== "loading" && component.slot !== "empty");
|
|
15552
|
-
// get the column titles (renderLabel is asynchronous)
|
|
15553
|
-
const columnsPromise = columnComponents === null || columnComponents === void 0 ? void 0 : columnComponents.map(async (c) => tryMethod$1(c, () => c.renderLabel()));
|
|
15554
|
-
// get the column cells (renderCell is asynchronous)
|
|
15555
|
-
const cellsPromise = data === null || data === void 0 ? void 0 : data.map(async (r) => {
|
|
15556
|
-
const cellPromise = columnComponents === null || columnComponents === void 0 ? void 0 : columnComponents.map(async (c) => tryMethod$1(c, () => c.renderCell([r], c)));
|
|
15557
|
-
const cells = await Promise.all(cellPromise);
|
|
15558
|
-
return cells;
|
|
15559
|
-
});
|
|
15560
|
-
const rows = cellsPromise && (await Promise.all(cellsPromise)).filter((i) => i);
|
|
15561
|
-
setContent({ rows });
|
|
15562
|
-
const columns = columnsPromise && (await Promise.all(columnsPromise));
|
|
15563
|
-
// Set the content to render and finish loading components
|
|
15564
|
-
setContent({ columns, loading: false, page: states.currentPage });
|
|
15565
|
-
}
|
|
15566
|
-
_extends.useEffect(() => {
|
|
15567
|
-
setContent({ loading: true });
|
|
15568
|
-
rewardsData && getComponentData(components);
|
|
15569
|
-
}, [rewardsData, components, tick]);
|
|
15570
|
-
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);
|
|
15571
|
-
console.log(states.loading, content.loading, rewardsData);
|
|
15572
|
-
const show =
|
|
15573
|
-
// 1 - Loading if loading
|
|
15574
|
-
states.loading || content.loading
|
|
15575
|
-
? "loading"
|
|
15576
|
-
: // 2 - Empty if empty
|
|
15577
|
-
isEmpty
|
|
15578
|
-
? "empty"
|
|
15579
|
-
: // 3 - Then show rows
|
|
15580
|
-
"rows";
|
|
15581
|
-
return {
|
|
15582
|
-
states: {
|
|
15583
|
-
hasNext: states.currentPage < states.pageCount - 1,
|
|
15584
|
-
hasPrev: states.currentPage > 0,
|
|
15585
|
-
show,
|
|
15586
|
-
namespace: CSS_NAMESPACE,
|
|
15587
|
-
},
|
|
15588
|
-
data: {
|
|
15589
|
-
textOverrides: {
|
|
15590
|
-
showLabels: props.showLabels,
|
|
15591
|
-
prevLabel: props.prevLabel,
|
|
15592
|
-
moreLabel: props.moreLabel,
|
|
15593
|
-
},
|
|
15594
|
-
},
|
|
15595
|
-
elements: {
|
|
15596
|
-
columns: content.columns,
|
|
15597
|
-
rows: content.rows,
|
|
15598
|
-
emptyElement,
|
|
15599
|
-
loadingElement,
|
|
15600
|
-
},
|
|
15601
|
-
callbacks: {
|
|
15602
|
-
nextPage: () => {
|
|
15603
|
-
callbacks.setCurrentPage(states.currentPage + 1);
|
|
15604
|
-
},
|
|
15605
|
-
prevPage: () => {
|
|
15606
|
-
callbacks.setCurrentPage(states.currentPage - 1);
|
|
15607
|
-
},
|
|
15608
|
-
},
|
|
15609
|
-
};
|
|
15610
|
-
}
|
|
15611
|
-
function generateUserError$1(e) {
|
|
15612
|
-
try {
|
|
15613
|
-
return JSON.stringify(e);
|
|
15614
|
-
}
|
|
15615
|
-
catch (e) {
|
|
15616
|
-
return "An unknown error";
|
|
15617
|
-
}
|
|
15618
|
-
}
|
|
15619
|
-
async function tryMethod$1(c, callback) {
|
|
15620
|
-
const tag = c.tagName.toLowerCase();
|
|
15621
|
-
await customElements.whenDefined(tag);
|
|
15622
|
-
let labelPromise;
|
|
15623
|
-
try {
|
|
15624
|
-
labelPromise = callback();
|
|
15625
|
-
}
|
|
15626
|
-
catch (e) {
|
|
15627
|
-
// renderLabel did not return a promise, so this method probably doesn't exist
|
|
15628
|
-
// therefore, we IGNORE the label
|
|
15629
|
-
if (callback.name === "renderReferrerCell") {
|
|
15630
|
-
console.error("column does not have a renderReferrerCell method.");
|
|
15631
|
-
}
|
|
15632
|
-
else {
|
|
15633
|
-
console.error("label promise failed", e);
|
|
15634
|
-
}
|
|
15635
|
-
return index.h("span", null);
|
|
15636
|
-
}
|
|
15637
|
-
try {
|
|
15638
|
-
return await labelPromise;
|
|
15639
|
-
}
|
|
15640
|
-
catch (e) {
|
|
15641
|
-
// The column returned a promise, and that promise failed.
|
|
15642
|
-
// This should not happen so we fail fast
|
|
15643
|
-
console.error("Error rendering label", e);
|
|
15644
|
-
const userError = generateUserError$1(e);
|
|
15645
|
-
return (index.h("details", null,
|
|
15646
|
-
index.h("summary", null, "Error"),
|
|
15647
|
-
userError));
|
|
15648
|
-
}
|
|
15649
|
-
}
|
|
15650
|
-
|
|
15651
|
-
const RewardsTable = class {
|
|
15652
|
-
constructor(hostRef) {
|
|
15653
|
-
index.registerInstance(this, hostRef);
|
|
15654
|
-
/** @uiName Number of rewards per page */
|
|
15655
|
-
this.perPage = 3;
|
|
15656
|
-
/** @uiName Show column labels */
|
|
15657
|
-
this.showLabels = true;
|
|
15658
|
-
/** @uiName Previous button text */
|
|
15659
|
-
this.prevLabel = "Prev";
|
|
15660
|
-
/** @uiName View More button text */
|
|
15661
|
-
this.moreLabel = "Next";
|
|
15662
|
-
/** @uiName Show Referred by user in table */
|
|
15663
|
-
this.showReferrer = false;
|
|
15664
|
-
_extends.h$1(this);
|
|
15665
|
-
}
|
|
15666
|
-
disconnectedCallback() { }
|
|
15667
|
-
render() {
|
|
15668
|
-
const empty = index.h(EmptySlot$1, { label: "No Rewards Yet" });
|
|
15669
|
-
const loading = index.h(LoadingSlot$1, null);
|
|
15670
|
-
const { states, data, callbacks, elements } = index_module.j()
|
|
15671
|
-
? useRewardsTableDemo(this)
|
|
15672
|
-
: useRewardsTable(this, empty, loading);
|
|
15673
|
-
return (index.h(GenericTableView, { states: states, data: data, callbacks: callbacks, elements: elements }));
|
|
15674
|
-
}
|
|
15675
|
-
};
|
|
15676
|
-
function useRewardsTableDemo(props) {
|
|
15677
|
-
return cjs.cjs({
|
|
15678
|
-
states: {
|
|
15679
|
-
hasPrev: false,
|
|
15680
|
-
hasNext: false,
|
|
15681
|
-
loading: false,
|
|
15682
|
-
namespace: CSS_NAMESPACE,
|
|
15683
|
-
},
|
|
15684
|
-
callbacks: {
|
|
15685
|
-
prevPage: () => console.log("Prev"),
|
|
15686
|
-
nextPage: () => console.log("Next"),
|
|
15687
|
-
},
|
|
15688
|
-
data: {
|
|
15689
|
-
textOverrides: {
|
|
15690
|
-
showLabels: props.showLabels,
|
|
15691
|
-
prevLabel: props.prevLabel,
|
|
15692
|
-
moreLabel: props.moreLabel,
|
|
15693
|
-
},
|
|
15694
|
-
referralData: [],
|
|
15695
|
-
},
|
|
15696
|
-
elements: {
|
|
15697
|
-
emptyElement: index.h(EmptySkeleton, { label: "No Rewards Yet" }),
|
|
15698
|
-
loadingElement: index.h(LoadingSkeleton, null),
|
|
15699
|
-
// TODO: This should be smarter
|
|
15700
|
-
columns: [index.h("div", null, "Name"), index.h("div", null, "Email"), index.h("div", null, "DOB")],
|
|
15701
|
-
rows: [],
|
|
15702
|
-
},
|
|
15703
|
-
}, props.demoData || {}, { arrayMerge: (_, a) => a });
|
|
15704
|
-
}
|
|
15705
|
-
|
|
15706
|
-
const RewardsTableColumn = class {
|
|
15707
|
-
constructor(hostRef) {
|
|
15708
|
-
index.registerInstance(this, hostRef);
|
|
15709
|
-
/**
|
|
15710
|
-
* @uiName Reward column title
|
|
15711
|
-
*/
|
|
15712
|
-
this.columnTitle = "Rewards";
|
|
15713
|
-
/**
|
|
15714
|
-
* @uiName Hide dropdown details of reward
|
|
15715
|
-
*/
|
|
15716
|
-
this.hideDetails = false;
|
|
15717
|
-
_extends.h$1(this);
|
|
15718
|
-
}
|
|
15719
|
-
disconnectedCallback() { }
|
|
15720
|
-
//@ts-ignore
|
|
15721
|
-
async renderCell(data) {
|
|
15722
|
-
// TODO: Do the right thing with many rewards, pending rewards, canceled rewards
|
|
15723
|
-
console.log({ data });
|
|
15724
|
-
return (index.h("sqm-referral-table-rewards-cell", { rewards: data, hideDetails: this.hideDetails }));
|
|
15725
|
-
}
|
|
15726
|
-
async renderLabel() {
|
|
15727
|
-
return this.columnTitle;
|
|
15728
|
-
}
|
|
15729
|
-
render() {
|
|
15730
|
-
reRender.useRequestRerender([this.columnTitle]);
|
|
15731
|
-
return index.h(index.Host, { style: { display: "none" } });
|
|
15732
|
-
}
|
|
15733
|
-
};
|
|
15734
|
-
|
|
15735
|
-
const debug$1 = _extends.browser("sq:useRouter");
|
|
15736
|
-
function matchPath(pattern, page) {
|
|
15737
|
-
if (!pattern)
|
|
15738
|
-
return;
|
|
15739
|
-
const regexp = useDemoBigStat.pathToRegexp(pattern);
|
|
15740
|
-
return regexp.exec(page);
|
|
15741
|
-
}
|
|
15742
|
-
function useRouter() {
|
|
15743
|
-
const location = index_module.an();
|
|
15744
|
-
const host = index_module.P();
|
|
15745
|
-
const [slot, setSlot] = _extends.useState(undefined);
|
|
15746
|
-
const [container, setContainer] = _extends.useState(undefined);
|
|
15747
|
-
const page = location.pathname;
|
|
15748
|
-
// convert sqm-routes into templates
|
|
15749
|
-
_extends.useEffect(() => {
|
|
15750
|
-
const routes = host.querySelectorAll(`sqm-route`);
|
|
15751
|
-
const routesArray = Array.from(routes);
|
|
15752
|
-
routesArray.forEach((route) => {
|
|
15753
|
-
const newTemplate = document.createElement("template");
|
|
15754
|
-
newTemplate.setAttribute("path", route.path);
|
|
15755
|
-
newTemplate.innerHTML = route.innerHTML;
|
|
15756
|
-
route.parentNode.appendChild(newTemplate);
|
|
15757
|
-
route.parentNode.removeChild(route);
|
|
15758
|
-
});
|
|
15759
|
-
}, []);
|
|
15760
|
-
_extends.useEffect(() => {
|
|
15761
|
-
var _a, _b;
|
|
15762
|
-
if (!container || !slot) {
|
|
15763
|
-
debug$1("DOM not ready for navigation rendering on:", page);
|
|
15764
|
-
return;
|
|
15765
|
-
}
|
|
15766
|
-
// <template>
|
|
15767
|
-
const templates = slot.querySelectorAll(`template`);
|
|
15768
|
-
const templatesArray = Array.from(templates);
|
|
15769
|
-
const template = templatesArray.find((template) => {
|
|
15770
|
-
var _a, _b, _c;
|
|
15771
|
-
//@ts-ignore
|
|
15772
|
-
const path = (_b = (_a = template.attributes) === null || _a === void 0 ? void 0 : _a.path) === null || _b === void 0 ? void 0 : _b.nodeValue;
|
|
15773
|
-
if ((_c = matchPath(path, page)) === null || _c === void 0 ? void 0 : _c.length)
|
|
15774
|
-
return template;
|
|
15775
|
-
});
|
|
15776
|
-
//@ts-ignore - can't access template attributes directly
|
|
15777
|
-
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;
|
|
15778
|
-
debug$1({
|
|
15779
|
-
containerDatasetPage: container.dataset.page,
|
|
15780
|
-
templatePath,
|
|
15781
|
-
page,
|
|
15782
|
-
});
|
|
15783
|
-
// if no routes found, and the old route doesn't match the new route
|
|
15784
|
-
if (!template) {
|
|
15785
|
-
// No matching page, display nothing
|
|
15786
|
-
debug$1("No matching page found for ", page, ", so render nothing");
|
|
15787
|
-
container.innerHTML = "";
|
|
15788
|
-
container.dataset.page = page;
|
|
15789
|
-
return;
|
|
15790
|
-
}
|
|
15791
|
-
debug$1("Page updated to ", page, template);
|
|
15792
|
-
// if pathToRegexp results truthy or page is an exact match
|
|
15793
|
-
if (!!matchPath(templatePath, container.dataset.page)) {
|
|
15794
|
-
debug$1("don't rerender");
|
|
15795
|
-
// Same page, do not re-render
|
|
15796
|
-
// Reduces dom mutations, speeds up page speed
|
|
15797
|
-
}
|
|
15798
|
-
else if (template) {
|
|
15799
|
-
container.innerHTML = template.innerHTML;
|
|
15800
|
-
container.dataset.page = page;
|
|
15801
|
-
}
|
|
15802
|
-
}, [slot, container, page]);
|
|
15803
|
-
return {
|
|
15804
|
-
callbacks: {
|
|
15805
|
-
setSlot,
|
|
15806
|
-
setContainer,
|
|
15807
|
-
},
|
|
15808
|
-
};
|
|
15809
|
-
}
|
|
15810
|
-
|
|
15811
|
-
const sqmRouterCss = "sqm-router{display:contents}";
|
|
15812
|
-
|
|
15813
|
-
const SqmRouter = class {
|
|
15814
|
-
constructor(hostRef) {
|
|
15815
|
-
index.registerInstance(this, hostRef);
|
|
15816
|
-
this.ignored = true;
|
|
15817
|
-
_extends.h$1(this);
|
|
15818
|
-
}
|
|
15819
|
-
disconnectedCallback() { }
|
|
15820
|
-
render() {
|
|
15821
|
-
const { callbacks } = useRouter();
|
|
15822
|
-
return (index.h(index.Host, null, index.h("div", { ref: callbacks.setSlot, style: { display: "none" } }, index.h("slot", null)), index.h("div", { style: { display: "contents" }, ref: callbacks.setContainer })));
|
|
15823
|
-
}
|
|
15824
|
-
};
|
|
15825
|
-
SqmRouter.style = sqmRouterCss;
|
|
15826
|
-
|
|
15827
|
-
const style$8 = {
|
|
15828
|
-
HostBlock: mixins.HostBlock,
|
|
15829
|
-
buttonStyle: {
|
|
15830
|
-
display: "block",
|
|
15831
|
-
},
|
|
15832
|
-
};
|
|
15833
|
-
jssPresetDefault_esm.jss.setup(jssPresetDefault_esm.create());
|
|
15834
|
-
const sheet$8 = jssPresetDefault_esm.jss.createStyleSheet(style$8);
|
|
15835
|
-
const styleString$8 = sheet$8.toString();
|
|
15836
14882
|
function ShareButtonView(props, children) {
|
|
15837
14883
|
return props.hide ? (index.h(index.Host, { style: { display: "none" } })) : (index.h("div", null,
|
|
15838
|
-
index.h("style", { type: "text/css" }, styleString$
|
|
15839
|
-
index.h("sl-button", { class: sheet$
|
|
14884
|
+
index.h("style", { type: "text/css" }, styleString$7),
|
|
14885
|
+
index.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` },
|
|
15840
14886
|
!props.hideicon && (index.h("sl-icon", { slot: props.iconslot, name: props.icon ? props.icon : props.medium, exportparts: "icon" })),
|
|
15841
14887
|
!props.hidetext && children)));
|
|
15842
14888
|
}
|
|
@@ -15900,14 +14946,14 @@ function useShareButton(props) {
|
|
|
15900
14946
|
var _a, _b;
|
|
15901
14947
|
const { sharetitle, sharetext, medium } = props;
|
|
15902
14948
|
const programId = props.programId ? props.programId : index_module.M();
|
|
15903
|
-
const user = index_module.
|
|
14949
|
+
const user = index_module.ne();
|
|
15904
14950
|
const variables = {
|
|
15905
14951
|
engagementMedium: index_module.x(),
|
|
15906
14952
|
programId: programId,
|
|
15907
14953
|
shareMedium: medium.toUpperCase(),
|
|
15908
14954
|
};
|
|
15909
14955
|
// only queries if a programId is available
|
|
15910
|
-
const res = index_module.
|
|
14956
|
+
const res = index_module.cn(MessageLinkQuery, variables, !(user === null || user === void 0 ? void 0 : user.jwt) || !programId);
|
|
15911
14957
|
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;
|
|
15912
14958
|
const environment = index_module.D();
|
|
15913
14959
|
const hide = (medium.toLocaleUpperCase() === "SMS" &&
|
|
@@ -15997,8 +15043,8 @@ const MessageLinkQuery$1 = index_module.dist.gql `
|
|
|
15997
15043
|
function useShareLink(props) {
|
|
15998
15044
|
var _a, _b;
|
|
15999
15045
|
const { programId = index_module.M() } = props;
|
|
16000
|
-
const user = index_module.
|
|
16001
|
-
const { data } = index_module.
|
|
15046
|
+
const user = index_module.ne();
|
|
15047
|
+
const { data } = index_module.cn(MessageLinkQuery$1, { programId }, !(user === null || user === void 0 ? void 0 : user.jwt));
|
|
16002
15048
|
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 :
|
|
16003
15049
|
// Shown during loading
|
|
16004
15050
|
"...";
|
|
@@ -17474,10 +16520,10 @@ var _createEmotion = createEmotion({
|
|
|
17474
16520
|
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?index.h:b,g=f.title,m=void 0===g?"Stencilbook":g,x=f.homepage,h=void 0===x?y("h3",null,"Select a story!"):x,v=f.addons,k=void 0===v?[]:v,w=_extends.useMemo(function(){return a.map(d$1).reduce(p$1,{_:[]})},a),S=_extends.useState(void 0),C=S[0],z=S[1],O=null==C?void 0:C.key,j=_extends.useState("desktop"),T=j[0],_=j[1],B=_extends.useState(!0),D=B[0],L=B[1],N=_extends.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,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}}
|
|
17475
16521
|
|
|
17476
16522
|
const ShareButton_stories = {
|
|
17477
|
-
title: "
|
|
16523
|
+
title: "Share Button",
|
|
17478
16524
|
};
|
|
17479
16525
|
const WithIcon = () => {
|
|
17480
|
-
const props = { medium: "
|
|
16526
|
+
const props = { medium: "whatsapp", iconslot: "suffix" };
|
|
17481
16527
|
return index.h(ShareButtonView, Object.assign({}, props), "Share");
|
|
17482
16528
|
};
|
|
17483
16529
|
const WithIconOverride = () => {
|
|
@@ -17530,7 +16576,7 @@ const ShareButton$1 = /*#__PURE__*/Object.freeze({
|
|
|
17530
16576
|
});
|
|
17531
16577
|
|
|
17532
16578
|
const ShareLink_stories = {
|
|
17533
|
-
title: "
|
|
16579
|
+
title: "Share Link",
|
|
17534
16580
|
};
|
|
17535
16581
|
const Default = () => {
|
|
17536
16582
|
const props = {
|
|
@@ -17571,15 +16617,14 @@ const ShareLink$1 = /*#__PURE__*/Object.freeze({
|
|
|
17571
16617
|
});
|
|
17572
16618
|
|
|
17573
16619
|
const BigStat_stories = {
|
|
17574
|
-
title: "
|
|
16620
|
+
title: "Big Stat",
|
|
17575
16621
|
};
|
|
17576
16622
|
const Default$1 = () => {
|
|
17577
|
-
const props = {
|
|
16623
|
+
const props = { statvalue: "9.900,00" };
|
|
17578
16624
|
return index.h(useDemoBigStat.BigStatView, Object.assign({}, props), "Big stat");
|
|
17579
16625
|
};
|
|
17580
16626
|
const LeftAlign = () => {
|
|
17581
16627
|
const props = {
|
|
17582
|
-
value: 500,
|
|
17583
16628
|
statvalue: "500",
|
|
17584
16629
|
alignment: "left",
|
|
17585
16630
|
};
|
|
@@ -17587,7 +16632,6 @@ const LeftAlign = () => {
|
|
|
17587
16632
|
};
|
|
17588
16633
|
const RightAlign = () => {
|
|
17589
16634
|
const props = {
|
|
17590
|
-
value: 500,
|
|
17591
16635
|
statvalue: "500",
|
|
17592
16636
|
alignment: "right",
|
|
17593
16637
|
};
|
|
@@ -17595,7 +16639,6 @@ const RightAlign = () => {
|
|
|
17595
16639
|
};
|
|
17596
16640
|
const FlexReverse = () => {
|
|
17597
16641
|
const props = {
|
|
17598
|
-
value: 500,
|
|
17599
16642
|
statvalue: "500",
|
|
17600
16643
|
flexReverse: true,
|
|
17601
16644
|
};
|
|
@@ -17603,7 +16646,6 @@ const FlexReverse = () => {
|
|
|
17603
16646
|
};
|
|
17604
16647
|
const FlexReverseRight = () => {
|
|
17605
16648
|
const props = {
|
|
17606
|
-
value: 500,
|
|
17607
16649
|
statvalue: "500",
|
|
17608
16650
|
flexReverse: true,
|
|
17609
16651
|
alignment: "right",
|
|
@@ -17612,7 +16654,6 @@ const FlexReverseRight = () => {
|
|
|
17612
16654
|
};
|
|
17613
16655
|
const FlexReverseLeft = () => {
|
|
17614
16656
|
const props = {
|
|
17615
|
-
value: 500,
|
|
17616
16657
|
statvalue: "500",
|
|
17617
16658
|
flexReverse: true,
|
|
17618
16659
|
alignment: "left",
|
|
@@ -17621,14 +16662,12 @@ const FlexReverseLeft = () => {
|
|
|
17621
16662
|
};
|
|
17622
16663
|
const NoStatValue = () => {
|
|
17623
16664
|
const props = {
|
|
17624
|
-
value: 0,
|
|
17625
16665
|
statvalue: "...",
|
|
17626
16666
|
};
|
|
17627
16667
|
return index.h(useDemoBigStat.BigStatView, Object.assign({}, props), "Big stat");
|
|
17628
16668
|
};
|
|
17629
16669
|
const InvalidStatValue = () => {
|
|
17630
16670
|
const props = {
|
|
17631
|
-
value: 0,
|
|
17632
16671
|
statvalue: "!!!",
|
|
17633
16672
|
};
|
|
17634
16673
|
return index.h(useDemoBigStat.BigStatView, Object.assign({}, props), "Big stat");
|
|
@@ -17648,7 +16687,7 @@ const BigStat = /*#__PURE__*/Object.freeze({
|
|
|
17648
16687
|
});
|
|
17649
16688
|
|
|
17650
16689
|
const Leaderboard_stories = {
|
|
17651
|
-
title: "
|
|
16690
|
+
title: "Leaderboard",
|
|
17652
16691
|
parameters: {
|
|
17653
16692
|
tagname: "sqm-leaderboard",
|
|
17654
16693
|
},
|
|
@@ -17842,36 +16881,36 @@ const routes = `
|
|
|
17842
16881
|
`;
|
|
17843
16882
|
const TemplateNavigation = createHookStory(() => {
|
|
17844
16883
|
return (index.h("div", null,
|
|
17845
|
-
index.h("button", { onClick: () => index_module.
|
|
17846
|
-
index.h("button", { onClick: () => index_module.
|
|
17847
|
-
index.h("button", { onClick: () => index_module.
|
|
17848
|
-
index.h("button", { onClick: () => index_module.
|
|
17849
|
-
index.h("button", { onClick: () => index_module.
|
|
17850
|
-
index.h("button", { onClick: () => index_module.
|
|
17851
|
-
index.h("button", { onClick: () => index_module.
|
|
17852
|
-
index.h("button", { onClick: () => index_module.
|
|
17853
|
-
index.h("button", { onClick: () => index_module.
|
|
16884
|
+
index.h("button", { onClick: () => index_module.mn.push("/") }, "/"),
|
|
16885
|
+
index.h("button", { onClick: () => index_module.mn.push("/foo") }, "/foo"),
|
|
16886
|
+
index.h("button", { onClick: () => index_module.mn.push("/bar") }, "/bar"),
|
|
16887
|
+
index.h("button", { onClick: () => index_module.mn.push("/baz/bang") }, "/baz/bang"),
|
|
16888
|
+
index.h("button", { onClick: () => index_module.mn.push("/refer") }, "/refer"),
|
|
16889
|
+
index.h("button", { onClick: () => index_module.mn.push("/refer/1") }, "/refer/1"),
|
|
16890
|
+
index.h("button", { onClick: () => index_module.mn.push("/refer/2") }, "/refer/2"),
|
|
16891
|
+
index.h("button", { onClick: () => index_module.mn.back() }, "Back"),
|
|
16892
|
+
index.h("button", { onClick: () => index_module.mn.forward() }, "Forward"),
|
|
17854
16893
|
index.h("hr", null),
|
|
17855
16894
|
index.h("sqm-router", { innerHTML: templates })));
|
|
17856
16895
|
});
|
|
17857
16896
|
const RouteNavigation = createHookStory(() => {
|
|
17858
16897
|
return (index.h("div", null,
|
|
17859
|
-
index.h("button", { onClick: () => index_module.
|
|
17860
|
-
index.h("button", { onClick: () => index_module.
|
|
17861
|
-
index.h("button", { onClick: () => index_module.
|
|
17862
|
-
index.h("button", { onClick: () => index_module.
|
|
17863
|
-
index.h("button", { onClick: () => index_module.
|
|
17864
|
-
index.h("button", { onClick: () => index_module.
|
|
17865
|
-
index.h("button", { onClick: () => index_module.
|
|
17866
|
-
index.h("button", { onClick: () => index_module.
|
|
17867
|
-
index.h("button", { onClick: () => index_module.
|
|
16898
|
+
index.h("button", { onClick: () => index_module.mn.push("/") }, "/"),
|
|
16899
|
+
index.h("button", { onClick: () => index_module.mn.push("/foo") }, "/foo"),
|
|
16900
|
+
index.h("button", { onClick: () => index_module.mn.push("/bar") }, "/bar"),
|
|
16901
|
+
index.h("button", { onClick: () => index_module.mn.push("/baz/bang") }, "/baz/bang"),
|
|
16902
|
+
index.h("button", { onClick: () => index_module.mn.push("/refer") }, "/refer"),
|
|
16903
|
+
index.h("button", { onClick: () => index_module.mn.push("/refer/1") }, "/refer/1"),
|
|
16904
|
+
index.h("button", { onClick: () => index_module.mn.push("/refer/2") }, "/refer/2"),
|
|
16905
|
+
index.h("button", { onClick: () => index_module.mn.back() }, "Back"),
|
|
16906
|
+
index.h("button", { onClick: () => index_module.mn.forward() }, "Forward"),
|
|
17868
16907
|
index.h("hr", null),
|
|
17869
16908
|
index.h("sqm-router", { innerHTML: routes })));
|
|
17870
16909
|
});
|
|
17871
16910
|
const Styling = createHookStory(() => {
|
|
17872
16911
|
return (index.h("div", null,
|
|
17873
|
-
index.h("button", { onClick: () => index_module.
|
|
17874
|
-
index.h("button", { onClick: () => index_module.
|
|
16912
|
+
index.h("button", { onClick: () => index_module.mn.push("/") }, "/"),
|
|
16913
|
+
index.h("button", { onClick: () => index_module.mn.push("/foo") }, "/foo"),
|
|
17875
16914
|
index.h("hr", null),
|
|
17876
16915
|
index.h("div", { style: { display: "flex", justifyContent: "space-around" } },
|
|
17877
16916
|
index.h("sqm-router", { innerHTML: `<template path="/">
|
|
@@ -17885,7 +16924,7 @@ function useTemplate(templateString) {
|
|
|
17885
16924
|
const [previewTemplate, setPreviewTemplate] = _extends.useState(templateString);
|
|
17886
16925
|
function setPath(e) {
|
|
17887
16926
|
//@ts-ignore
|
|
17888
|
-
index_module.
|
|
16927
|
+
index_module.mn.push(e.target.value);
|
|
17889
16928
|
}
|
|
17890
16929
|
return {
|
|
17891
16930
|
states: { previewTemplate, editedTemplate },
|
|
@@ -17925,7 +16964,7 @@ const Router = /*#__PURE__*/Object.freeze({
|
|
|
17925
16964
|
});
|
|
17926
16965
|
|
|
17927
16966
|
const LeaderboardRank_stories = {
|
|
17928
|
-
title: "
|
|
16967
|
+
title: "Leaderboard Rank",
|
|
17929
16968
|
};
|
|
17930
16969
|
const First = () => {
|
|
17931
16970
|
const props = { data: { rank: "1st" } };
|
|
@@ -17972,7 +17011,7 @@ function setupLoggedOut() {
|
|
|
17972
17011
|
};
|
|
17973
17012
|
}
|
|
17974
17013
|
const PortalFrame_stories = {
|
|
17975
|
-
title: "
|
|
17014
|
+
title: "Portal Frame",
|
|
17976
17015
|
};
|
|
17977
17016
|
const defaultProps = {
|
|
17978
17017
|
data: {
|
|
@@ -18028,8 +17067,8 @@ const FullStackFrame = () => {
|
|
|
18028
17067
|
"Current path:",
|
|
18029
17068
|
" ",
|
|
18030
17069
|
index.h("code", null,
|
|
18031
|
-
index.h("strong", null, (_a = index_module.
|
|
18032
|
-
index.h("button", { onClick: index_module.
|
|
17070
|
+
index.h("strong", null, (_a = index_module.vn()) === null || _a === void 0 ? void 0 : _a.pathname))),
|
|
17071
|
+
index.h("button", { onClick: index_module.mn.back }, "Go Back")));
|
|
18033
17072
|
};
|
|
18034
17073
|
const FullStackFrameLoggedOut = () => {
|
|
18035
17074
|
var _a;
|
|
@@ -18053,8 +17092,8 @@ const FullStackFrameLoggedOut = () => {
|
|
|
18053
17092
|
"Current path:",
|
|
18054
17093
|
" ",
|
|
18055
17094
|
index.h("code", null,
|
|
18056
|
-
index.h("strong", null, (_a = index_module.
|
|
18057
|
-
index.h("button", { onClick: index_module.
|
|
17095
|
+
index.h("strong", null, (_a = index_module.vn()) === null || _a === void 0 ? void 0 : _a.pathname))),
|
|
17096
|
+
index.h("button", { onClick: index_module.mn.back }, "Go Back")));
|
|
18058
17097
|
};
|
|
18059
17098
|
|
|
18060
17099
|
const PortalFrame$1 = /*#__PURE__*/Object.freeze({
|
|
@@ -18067,7 +17106,7 @@ const PortalFrame$1 = /*#__PURE__*/Object.freeze({
|
|
|
18067
17106
|
});
|
|
18068
17107
|
|
|
18069
17108
|
const EditProfileForm_stories = {
|
|
18070
|
-
title: "
|
|
17109
|
+
title: "Edit Profile Form",
|
|
18071
17110
|
};
|
|
18072
17111
|
const defaultProps$1 = {
|
|
18073
17112
|
states: {
|
|
@@ -18148,14 +17187,14 @@ function setupGraphQL$1() {
|
|
|
18148
17187
|
programId,
|
|
18149
17188
|
};
|
|
18150
17189
|
_extends.useEffect(() => {
|
|
18151
|
-
index_module.
|
|
17190
|
+
index_module.Y({
|
|
18152
17191
|
accountId,
|
|
18153
17192
|
id,
|
|
18154
17193
|
jwt: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyIjp7ImFjY291bnRJZCI6InRlc3Rlc3Rlc3QiLCJpZCI6InRlc3Rlc3Rlc3QifX0.qYnU5hNeIj9C_G3NogfG7btgCPGZC7JRXY0MG6a63zs",
|
|
18155
17194
|
});
|
|
18156
17195
|
return () => {
|
|
18157
17196
|
window.widgetIdent = undefined;
|
|
18158
|
-
index_module.
|
|
17197
|
+
index_module.Y(undefined);
|
|
18159
17198
|
};
|
|
18160
17199
|
}, []);
|
|
18161
17200
|
}
|
|
@@ -18210,14 +17249,14 @@ function setupGraphQL$2() {
|
|
|
18210
17249
|
programId,
|
|
18211
17250
|
};
|
|
18212
17251
|
_extends.useEffect(() => {
|
|
18213
|
-
index_module.
|
|
17252
|
+
index_module.Y({
|
|
18214
17253
|
accountId,
|
|
18215
17254
|
id,
|
|
18216
17255
|
jwt: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyIjp7ImFjY291bnRJZCI6InRlc3Rlc3Rlc3QiLCJpZCI6InRlc3Rlc3Rlc3QifX0.qYnU5hNeIj9C_G3NogfG7btgCPGZC7JRXY0MG6a63zs",
|
|
18217
17256
|
});
|
|
18218
17257
|
return () => {
|
|
18219
17258
|
window.widgetIdent = undefined;
|
|
18220
|
-
index_module.
|
|
17259
|
+
index_module.Y(undefined);
|
|
18221
17260
|
};
|
|
18222
17261
|
}, []);
|
|
18223
17262
|
}
|
|
@@ -18272,14 +17311,14 @@ function setupGraphQL$3() {
|
|
|
18272
17311
|
programId,
|
|
18273
17312
|
};
|
|
18274
17313
|
_extends.useEffect(() => {
|
|
18275
|
-
index_module.
|
|
17314
|
+
index_module.Y({
|
|
18276
17315
|
accountId,
|
|
18277
17316
|
id,
|
|
18278
17317
|
jwt: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyIjp7ImFjY291bnRJZCI6Im55bmVsbGllIiwiaWQiOiJueW5lbGxpZSJ9fQ.3KV974VPLgk4tD8LQfJTi4IPkKCmnaB8w48HzVJYDuI",
|
|
18279
17318
|
});
|
|
18280
17319
|
return () => {
|
|
18281
17320
|
window.widgetIdent = undefined;
|
|
18282
|
-
index_module.
|
|
17321
|
+
index_module.Y(undefined);
|
|
18283
17322
|
};
|
|
18284
17323
|
}, []);
|
|
18285
17324
|
}
|
|
@@ -18354,9 +17393,6 @@ const RewardBalanceCashUSD = createHookStory(() => {
|
|
|
18354
17393
|
const ProgramGoals = createHookStory(() => {
|
|
18355
17394
|
const dummy = encodeURIComponent("Paid-Member-Goal/referrals");
|
|
18356
17395
|
return View(`/programGoals/count/${dummy}`, "/(programGoals)/:metricType/:goalId");
|
|
18357
|
-
});
|
|
18358
|
-
const CustomField = createHookStory(() => {
|
|
18359
|
-
return View(`/customFields/thingCount`, "/(customFields)/:customField");
|
|
18360
17396
|
});
|
|
18361
17397
|
|
|
18362
17398
|
const UseBigStat = /*#__PURE__*/Object.freeze({
|
|
@@ -18388,8 +17424,7 @@ const UseBigStat = /*#__PURE__*/Object.freeze({
|
|
|
18388
17424
|
RewardsAvailableWithSlash: RewardsAvailableWithSlash,
|
|
18389
17425
|
RewardBalance: RewardBalance,
|
|
18390
17426
|
RewardBalanceCashUSD: RewardBalanceCashUSD,
|
|
18391
|
-
ProgramGoals: ProgramGoals
|
|
18392
|
-
CustomField: CustomField
|
|
17427
|
+
ProgramGoals: ProgramGoals
|
|
18393
17428
|
});
|
|
18394
17429
|
|
|
18395
17430
|
function setupGraphQL$4() {
|
|
@@ -18403,14 +17438,14 @@ function setupGraphQL$4() {
|
|
|
18403
17438
|
programId,
|
|
18404
17439
|
};
|
|
18405
17440
|
_extends.useEffect(() => {
|
|
18406
|
-
index_module.
|
|
17441
|
+
index_module.Y({
|
|
18407
17442
|
accountId,
|
|
18408
17443
|
id,
|
|
18409
17444
|
jwt: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyIjp7ImFjY291bnRJZCI6IndvcnJpZWQtY2FtZXJhQHVleHdsdGdoLm1haWxvc2F1ci5uZXQiLCJpZCI6IndvcnJpZWQtY2FtZXJhQHVleHdsdGdoLm1haWxvc2F1ci5uZXQiLCJmaXJzdE5hbWUiOiJ0ZXN0IiwibGFzdE5hbWUiOiJ0ZXN0In19.ziDWbdCwsTo1ijxl8d2__Ga-6iFOVShaJUPp2ZBMeO0",
|
|
18410
17445
|
});
|
|
18411
17446
|
return () => {
|
|
18412
17447
|
window.widgetIdent = undefined;
|
|
18413
|
-
index_module.
|
|
17448
|
+
index_module.Y(undefined);
|
|
18414
17449
|
};
|
|
18415
17450
|
}, []);
|
|
18416
17451
|
}
|
|
@@ -18450,14 +17485,14 @@ function setupGraphQL$5() {
|
|
|
18450
17485
|
programId,
|
|
18451
17486
|
};
|
|
18452
17487
|
_extends.useEffect(() => {
|
|
18453
|
-
index_module.
|
|
17488
|
+
index_module.Y({
|
|
18454
17489
|
accountId,
|
|
18455
17490
|
id,
|
|
18456
17491
|
jwt: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyIjp7ImFjY291bnRJZCI6InRlc3Rlc3Rlc3QiLCJpZCI6InRlc3Rlc3Rlc3QifX0.qYnU5hNeIj9C_G3NogfG7btgCPGZC7JRXY0MG6a63zs",
|
|
18457
17492
|
});
|
|
18458
17493
|
return () => {
|
|
18459
17494
|
window.widgetIdent = undefined;
|
|
18460
|
-
index_module.
|
|
17495
|
+
index_module.Y(undefined);
|
|
18461
17496
|
};
|
|
18462
17497
|
}, []);
|
|
18463
17498
|
}
|
|
@@ -18518,278 +17553,54 @@ const UseLeaderboard = /*#__PURE__*/Object.freeze({
|
|
|
18518
17553
|
});
|
|
18519
17554
|
|
|
18520
17555
|
const FormMessage_stories = {
|
|
18521
|
-
title: "
|
|
17556
|
+
title: "Form Message",
|
|
18522
17557
|
};
|
|
18523
17558
|
const SuccessAlert = () => {
|
|
18524
17559
|
return (index.h("sqm-form-message", { type: "success" },
|
|
18525
17560
|
index.h("div", null, "This is a success message.")));
|
|
18526
|
-
};
|
|
18527
|
-
const ErrorAlert = () => {
|
|
18528
|
-
return (index.h("sqm-form-message", { type: "error" },
|
|
18529
|
-
index.h("div", null, "This is an error message")));
|
|
18530
|
-
};
|
|
18531
|
-
const InfoAlert = () => {
|
|
18532
|
-
return (index.h("sqm-form-message", { type: "info" },
|
|
18533
|
-
index.h("div", null, "This is an info message")));
|
|
18534
|
-
};
|
|
18535
|
-
const FullStackSuccess = () => {
|
|
18536
|
-
return (index.h("sqm-form-message", { type: "success", exportparts: "successalert-icon" },
|
|
18537
|
-
index.h("div", { class: "AlertContent" },
|
|
18538
|
-
index.h("div", { part: "successalert-text" }, "Title"),
|
|
18539
|
-
index.h("div", { part: "successalert-subtext" }, "Body text."),
|
|
18540
|
-
index.h("sl-button", { type: "default", exportparts: "base: defaultbutton-base", onClick: () => {
|
|
18541
|
-
console.log("click");
|
|
18542
|
-
} }, "Primary Action"),
|
|
18543
|
-
index.h("sl-button", { class: "SecondaryTextButton", type: "text", onClick: () => {
|
|
18544
|
-
console.log("click");
|
|
18545
|
-
} }, "Secondary Action"))));
|
|
18546
|
-
};
|
|
18547
|
-
|
|
18548
|
-
const FormMessage$1 = /*#__PURE__*/Object.freeze({
|
|
18549
|
-
__proto__: null,
|
|
18550
|
-
'default': FormMessage_stories,
|
|
18551
|
-
SuccessAlert: SuccessAlert,
|
|
18552
|
-
ErrorAlert: ErrorAlert,
|
|
18553
|
-
InfoAlert: InfoAlert,
|
|
18554
|
-
FullStackSuccess: FullStackSuccess
|
|
18555
|
-
});
|
|
18556
|
-
|
|
18557
|
-
const EXCHANGE$1 = index_module.dist.gql `
|
|
18558
|
-
mutation exchange($exchangeRewardInput: ExchangeRewardInput!) {
|
|
18559
|
-
exchangeReward(exchangeRewardInput: $exchangeRewardInput) {
|
|
18560
|
-
reward {
|
|
18561
|
-
id
|
|
18562
|
-
}
|
|
18563
|
-
}
|
|
18564
|
-
}
|
|
18565
|
-
`;
|
|
18566
|
-
const UseRewardExchangeList_stories = {
|
|
18567
|
-
title: "Hooks / useRewardExchange",
|
|
18568
|
-
};
|
|
18569
|
-
function setupGraphQL$6() {
|
|
18570
|
-
const id = "testestest";
|
|
18571
|
-
const accountId = id;
|
|
18572
|
-
const programId = "sam-partner-test-2";
|
|
18573
|
-
//@ts-ignore
|
|
18574
|
-
window.widgetIdent = {
|
|
18575
|
-
tenantAlias: "test_a8b41jotf8a1v",
|
|
18576
|
-
appDomain: "https://staging.referralsaasquatch.com",
|
|
18577
|
-
programId,
|
|
18578
|
-
};
|
|
18579
|
-
_extends.useEffect(() => {
|
|
18580
|
-
index_module.L({
|
|
18581
|
-
accountId,
|
|
18582
|
-
id,
|
|
18583
|
-
jwt: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyIjp7ImFjY291bnRJZCI6InRlc3Rlc3Rlc3QiLCJpZCI6InRlc3Rlc3Rlc3QifX0.qYnU5hNeIj9C_G3NogfG7btgCPGZC7JRXY0MG6a63zs",
|
|
18584
|
-
});
|
|
18585
|
-
return () => {
|
|
18586
|
-
window.widgetIdent = undefined;
|
|
18587
|
-
index_module.L(undefined);
|
|
18588
|
-
};
|
|
18589
|
-
}, []);
|
|
18590
|
-
return { id, accountId };
|
|
18591
|
-
}
|
|
18592
|
-
function useExchangeButton() {
|
|
18593
|
-
const { id, accountId } = setupGraphQL$6();
|
|
18594
|
-
const [points, setPoints] = _extends.useState(10);
|
|
18595
|
-
const [rate, setRate] = _extends.useState(100);
|
|
18596
|
-
const [exchange, { data, errors }] = index_module.Ne(EXCHANGE$1);
|
|
18597
|
-
return {
|
|
18598
|
-
states: {
|
|
18599
|
-
points,
|
|
18600
|
-
rate,
|
|
18601
|
-
},
|
|
18602
|
-
data: {
|
|
18603
|
-
id,
|
|
18604
|
-
accountId,
|
|
18605
|
-
data,
|
|
18606
|
-
errors,
|
|
18607
|
-
},
|
|
18608
|
-
callbacks: {
|
|
18609
|
-
exchange,
|
|
18610
|
-
setPoints,
|
|
18611
|
-
setRate,
|
|
18612
|
-
},
|
|
18613
|
-
};
|
|
18614
|
-
}
|
|
18615
|
-
const DefaultView = (props) => {
|
|
18616
|
-
const { states, data, callbacks } = props;
|
|
18617
|
-
return (index.h("div", null,
|
|
18618
|
-
index.h("div", null,
|
|
18619
|
-
index.h("label", null, "Rate:"),
|
|
18620
|
-
index.h("input", { value: states.rate, onInput: (e) =>
|
|
18621
|
-
// @ts-ignore
|
|
18622
|
-
callbacks.setRate(e.target.value) })),
|
|
18623
|
-
index.h("input", { value: states.points, onInput: (e) =>
|
|
18624
|
-
// @ts-ignore
|
|
18625
|
-
callbacks.setPoints(e.target.value) }),
|
|
18626
|
-
index.h("button", { onClick: () => callbacks.exchange(props.input) }, "Exchange"),
|
|
18627
|
-
index.h("details", null,
|
|
18628
|
-
index.h("summary", null, "response"),
|
|
18629
|
-
index.h("h4", null, "data"),
|
|
18630
|
-
index.h("div", { style: { maxWidth: "500px" } },
|
|
18631
|
-
index.h("pre", { style: { width: "500px", whiteSpace: "pre-wrap" } }, JSON.stringify(data.data))),
|
|
18632
|
-
index.h("h4", null, "errors"),
|
|
18633
|
-
index.h("div", { style: { maxWidth: "500px" } },
|
|
18634
|
-
index.h("pre", { style: { maxWidth: "500px", whiteSpace: "pre-wrap" } }, JSON.stringify(data.errors))))));
|
|
18635
|
-
};
|
|
18636
|
-
const RewardList = createHookStory(() => {
|
|
18637
|
-
setupGraphQL$6();
|
|
18638
|
-
return (index.h("sqm-reward-exchange-list", { "list-type": "something" }));
|
|
18639
|
-
});
|
|
18640
|
-
const FixedGlobalReward = createHookStory(() => {
|
|
18641
|
-
const { states, data, callbacks } = useExchangeButton();
|
|
18642
|
-
return (index.h(DefaultView, { states: states, data: data, callbacks: callbacks, input: {
|
|
18643
|
-
exchangeRewardInput: {
|
|
18644
|
-
userId: data.id,
|
|
18645
|
-
accountId: data.accountId,
|
|
18646
|
-
redeemCreditInput: {
|
|
18647
|
-
amount: states.points,
|
|
18648
|
-
unit: "POINT",
|
|
18649
|
-
},
|
|
18650
|
-
globalRewardKey: "gc1",
|
|
18651
|
-
},
|
|
18652
|
-
} }));
|
|
18653
|
-
});
|
|
18654
|
-
const VariableGlobalReward = createHookStory(() => {
|
|
18655
|
-
const { states, data, callbacks } = useExchangeButton();
|
|
18656
|
-
return (index.h(DefaultView, { states: states, data: data, callbacks: callbacks, input: {
|
|
18657
|
-
exchangeRewardInput: {
|
|
18658
|
-
userId: data.id,
|
|
18659
|
-
accountId: data.accountId,
|
|
18660
|
-
redeemCreditInput: {
|
|
18661
|
-
amount: states.points,
|
|
18662
|
-
unit: "POINT",
|
|
18663
|
-
},
|
|
18664
|
-
globalRewardKey: "gc1",
|
|
18665
|
-
rewardInput: {
|
|
18666
|
-
valueInCents: Math.ceil(states.points * states.rate),
|
|
18667
|
-
},
|
|
18668
|
-
},
|
|
18669
|
-
} }));
|
|
18670
|
-
});
|
|
18671
|
-
const VariableCreditReward = createHookStory(() => {
|
|
18672
|
-
const { states, data, callbacks } = useExchangeButton();
|
|
18673
|
-
return (index.h(DefaultView, { states: states, data: data, callbacks: callbacks, input: {
|
|
18674
|
-
exchangeRewardInput: {
|
|
18675
|
-
userId: data.id,
|
|
18676
|
-
accountId: data.accountId,
|
|
18677
|
-
redeemCreditInput: {
|
|
18678
|
-
amount: states.points,
|
|
18679
|
-
unit: "POINT",
|
|
18680
|
-
},
|
|
18681
|
-
rewardInput: {
|
|
18682
|
-
type: "CREDIT",
|
|
18683
|
-
unit: "foo",
|
|
18684
|
-
assignedCredit: Math.ceil(states.points * states.rate),
|
|
18685
|
-
},
|
|
18686
|
-
},
|
|
18687
|
-
} }));
|
|
18688
|
-
});
|
|
18689
|
-
|
|
18690
|
-
const UseRewardExchangeList = /*#__PURE__*/Object.freeze({
|
|
18691
|
-
__proto__: null,
|
|
18692
|
-
'default': UseRewardExchangeList_stories,
|
|
18693
|
-
RewardList: RewardList,
|
|
18694
|
-
FixedGlobalReward: FixedGlobalReward,
|
|
18695
|
-
VariableGlobalReward: VariableGlobalReward,
|
|
18696
|
-
VariableCreditReward: VariableCreditReward
|
|
18697
|
-
});
|
|
18698
|
-
|
|
18699
|
-
const UseRewardsTable_stories = {
|
|
18700
|
-
title: "Hooks / useRewardsTable",
|
|
18701
|
-
};
|
|
18702
|
-
function setupGraphQL$7() {
|
|
18703
|
-
const id = "testestest";
|
|
18704
|
-
const accountId = id;
|
|
18705
|
-
//@ts-ignore
|
|
18706
|
-
window.widgetIdent = {
|
|
18707
|
-
tenantAlias: "test_a8b41jotf8a1v",
|
|
18708
|
-
appDomain: "https://staging.referralsaasquatch.com",
|
|
18709
|
-
};
|
|
18710
|
-
_extends.useEffect(() => {
|
|
18711
|
-
index_module.L({
|
|
18712
|
-
accountId,
|
|
18713
|
-
id,
|
|
18714
|
-
jwt: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyIjp7ImFjY291bnRJZCI6InRlc3Rlc3Rlc3QiLCJpZCI6InRlc3Rlc3Rlc3QifX0.qYnU5hNeIj9C_G3NogfG7btgCPGZC7JRXY0MG6a63zs",
|
|
18715
|
-
});
|
|
18716
|
-
return () => {
|
|
18717
|
-
window.widgetIdent = undefined;
|
|
18718
|
-
index_module.L(undefined);
|
|
18719
|
-
};
|
|
18720
|
-
}, []);
|
|
18721
|
-
return { id, accountId };
|
|
18722
|
-
}
|
|
18723
|
-
const RewardsTableWithProgram = createHookStory(() => {
|
|
18724
|
-
setupGraphQL$7();
|
|
18725
|
-
index_module.A("sam-partner-test-2");
|
|
18726
|
-
return (index.h("sqm-rewards-table", null,
|
|
18727
|
-
index.h("sqm-rewards-table-column", null)));
|
|
18728
|
-
});
|
|
18729
|
-
const RewardsTableNoProgram = createHookStory(() => {
|
|
18730
|
-
setupGraphQL$7();
|
|
18731
|
-
index_module.A(undefined);
|
|
18732
|
-
return (index.h("sqm-rewards-table", null,
|
|
18733
|
-
index.h("sqm-rewards-table-column", null)));
|
|
18734
|
-
});
|
|
18735
|
-
|
|
18736
|
-
const UseRewardsTable = /*#__PURE__*/Object.freeze({
|
|
18737
|
-
__proto__: null,
|
|
18738
|
-
'default': UseRewardsTable_stories,
|
|
18739
|
-
RewardsTableWithProgram: RewardsTableWithProgram,
|
|
18740
|
-
RewardsTableNoProgram: RewardsTableNoProgram
|
|
18741
|
-
});
|
|
18742
|
-
|
|
18743
|
-
const JWT = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyIjp7ImlkIjoic2FtK2tsaXBAc2Fhc3F1YXQuY2giLCJhY2NvdW50SWQiOiJzYW0ra2xpcEBzYWFzcXVhdC5jaCJ9fQ.FMNZ6oajyr6SiCcRqKKdyPqvNTvWROQ60MKAyfvWGfc";
|
|
18744
|
-
const UseTaskCard_stories = {
|
|
18745
|
-
title: "Hooks / useTaskCard",
|
|
18746
|
-
};
|
|
18747
|
-
function setupGraphQL$8() {
|
|
18748
|
-
const id = "sam+klip@saasquat.ch";
|
|
18749
|
-
const accountId = id;
|
|
18750
|
-
const programId = "klip-referral-program";
|
|
18751
|
-
//@ts-ignore
|
|
18752
|
-
window.widgetIdent = {
|
|
18753
|
-
tenantAlias: "test_a74miwdpofztj",
|
|
18754
|
-
appDomain: "https://staging.referralsaasquatch.com",
|
|
18755
|
-
programId,
|
|
18756
|
-
};
|
|
18757
|
-
_extends.useEffect(() => {
|
|
18758
|
-
index_module.L({
|
|
18759
|
-
accountId,
|
|
18760
|
-
id,
|
|
18761
|
-
jwt: JWT,
|
|
18762
|
-
});
|
|
18763
|
-
return () => {
|
|
18764
|
-
window.widgetIdent = undefined;
|
|
18765
|
-
index_module.L(undefined);
|
|
18766
|
-
};
|
|
18767
|
-
}, []);
|
|
18768
|
-
return { id, accountId };
|
|
18769
|
-
}
|
|
18770
|
-
const TaskCard = createHookStory(() => {
|
|
18771
|
-
setupGraphQL$8();
|
|
18772
|
-
return (index.h("sqm-task-card", { "card-title": "Comment on 5 articles", "button-text": "Start reading", goal: 5, steps: true, "show-progress-bar": true }));
|
|
18773
|
-
});
|
|
17561
|
+
};
|
|
17562
|
+
const ErrorAlert = () => {
|
|
17563
|
+
return (index.h("sqm-form-message", { type: "error" },
|
|
17564
|
+
index.h("div", null, "This is an error message")));
|
|
17565
|
+
};
|
|
17566
|
+
const InfoAlert = () => {
|
|
17567
|
+
return (index.h("sqm-form-message", { type: "info" },
|
|
17568
|
+
index.h("div", null, "This is an info message")));
|
|
17569
|
+
};
|
|
17570
|
+
const FullStackSuccess = () => {
|
|
17571
|
+
return (index.h("sqm-form-message", { type: "success", exportparts: "successalert-icon" },
|
|
17572
|
+
index.h("div", { class: "AlertContent" },
|
|
17573
|
+
index.h("div", { part: "successalert-text" }, "Title"),
|
|
17574
|
+
index.h("div", { part: "successalert-subtext" }, "Body text."),
|
|
17575
|
+
index.h("sl-button", { type: "default", exportparts: "base: defaultbutton-base", onClick: () => {
|
|
17576
|
+
console.log("click");
|
|
17577
|
+
} }, "Primary Action"),
|
|
17578
|
+
index.h("sl-button", { class: "SecondaryTextButton", type: "text", onClick: () => {
|
|
17579
|
+
console.log("click");
|
|
17580
|
+
} }, "Secondary Action"))));
|
|
17581
|
+
};
|
|
18774
17582
|
|
|
18775
|
-
const
|
|
17583
|
+
const FormMessage$1 = /*#__PURE__*/Object.freeze({
|
|
18776
17584
|
__proto__: null,
|
|
18777
|
-
'default':
|
|
18778
|
-
|
|
17585
|
+
'default': FormMessage_stories,
|
|
17586
|
+
SuccessAlert: SuccessAlert,
|
|
17587
|
+
ErrorAlert: ErrorAlert,
|
|
17588
|
+
InfoAlert: InfoAlert,
|
|
17589
|
+
FullStackSuccess: FullStackSuccess
|
|
18779
17590
|
});
|
|
18780
17591
|
|
|
18781
17592
|
const NewPortal_stories = {
|
|
18782
17593
|
title: "New Portal",
|
|
18783
17594
|
};
|
|
18784
|
-
const style$
|
|
17595
|
+
const style$8 = {
|
|
18785
17596
|
HeaderSubtitleBold: {
|
|
18786
17597
|
"font-weight": 500,
|
|
18787
17598
|
"text-decoration": "underline",
|
|
18788
17599
|
},
|
|
18789
17600
|
};
|
|
18790
17601
|
jssPresetDefault_esm.jss.setup(jssPresetDefault_esm.create());
|
|
18791
|
-
const sheet$
|
|
18792
|
-
const styleString$
|
|
17602
|
+
const sheet$8 = jssPresetDefault_esm.jss.createStyleSheet(style$8);
|
|
17603
|
+
const styleString$8 = sheet$8.toString();
|
|
18793
17604
|
const barProps = {
|
|
18794
17605
|
data: {
|
|
18795
17606
|
programs: [
|
|
@@ -18884,7 +17695,7 @@ const Dashboard = () => {
|
|
|
18884
17695
|
hide: false,
|
|
18885
17696
|
};
|
|
18886
17697
|
return (index.h("sqm-divided-layout", { direction: "row" },
|
|
18887
|
-
index.h("style", { type: "text/css" }, styleString$
|
|
17698
|
+
index.h("style", { type: "text/css" }, styleString$8),
|
|
18888
17699
|
index.h(Sidebar, null),
|
|
18889
17700
|
index.h("sqm-divided-layout", { direction: "column" },
|
|
18890
17701
|
index.h(sqmPortalContainerView.PortalContainerView, Object.assign({}, { direction: "column", padding: "xxx-large", gap: "xxx-large" }),
|
|
@@ -18897,10 +17708,10 @@ const Dashboard = () => {
|
|
|
18897
17708
|
index.h("h1", null, "John Smith"))),
|
|
18898
17709
|
})),
|
|
18899
17710
|
index.h(sqmStatContainerView.StatContainerView, Object.assign({}, { space: "64px" }),
|
|
18900
|
-
index.h(useDemoBigStat.BigStatView, Object.assign({}, { statvalue: "2,345"
|
|
18901
|
-
index.h(useDemoBigStat.BigStatView, Object.assign({}, { statvalue: "58"
|
|
18902
|
-
index.h(useDemoBigStat.BigStatView, Object.assign({}, { statvalue: "$10,540"
|
|
18903
|
-
index.h(useDemoBigStat.BigStatView, Object.assign({}, { statvalue: "$2,305"
|
|
17711
|
+
index.h(useDemoBigStat.BigStatView, Object.assign({}, { statvalue: "2,345" }), "Clicks"),
|
|
17712
|
+
index.h(useDemoBigStat.BigStatView, Object.assign({}, { statvalue: "58" }), "Referrals"),
|
|
17713
|
+
index.h(useDemoBigStat.BigStatView, Object.assign({}, { statvalue: "$10,540" }), "Earned"),
|
|
17714
|
+
index.h(useDemoBigStat.BigStatView, Object.assign({}, { statvalue: "$2,305" }), "Awaiting Payout"))),
|
|
18904
17715
|
index.h(sqmPortalContainerView.PortalContainerView, Object.assign({}, { direction: "column", padding: "xxx-large", gap: "xxx-large" }),
|
|
18905
17716
|
index.h(sqmPortalSectionView.PortalSectionView, Object.assign({}, {
|
|
18906
17717
|
labelMargin: "x-large",
|
|
@@ -18942,7 +17753,7 @@ const Dashboard = () => {
|
|
|
18942
17753
|
};
|
|
18943
17754
|
const EditProfile$2 = () => {
|
|
18944
17755
|
return (index.h("sqm-divided-layout", { direction: "row" },
|
|
18945
|
-
index.h("style", { type: "text/css" }, styleString$
|
|
17756
|
+
index.h("style", { type: "text/css" }, styleString$8),
|
|
18946
17757
|
index.h(Sidebar, null),
|
|
18947
17758
|
index.h("sqm-divided-layout", { direction: "column" },
|
|
18948
17759
|
index.h(sqmPortalProfileView.PortalProfileView, Object.assign({}, {
|
|
@@ -19006,7 +17817,7 @@ const EditProfile$2 = () => {
|
|
|
19006
17817
|
};
|
|
19007
17818
|
const Commissions = () => {
|
|
19008
17819
|
return (index.h("sqm-divided-layout", { direction: "row" },
|
|
19009
|
-
index.h("style", { type: "text/css" }, styleString$
|
|
17820
|
+
index.h("style", { type: "text/css" }, styleString$8),
|
|
19010
17821
|
index.h(Sidebar, null),
|
|
19011
17822
|
index.h("sqm-divided-layout", { direction: "column" },
|
|
19012
17823
|
index.h(sqmPortalContainerView.PortalContainerView, Object.assign({}, { direction: "column", padding: "xxx-large", gap: "xxx-large" }),
|
|
@@ -19019,19 +17830,19 @@ const Commissions = () => {
|
|
|
19019
17830
|
index.h("p", null,
|
|
19020
17831
|
"for the",
|
|
19021
17832
|
" ",
|
|
19022
|
-
index.h("span", { class: sheet$
|
|
17833
|
+
index.h("span", { class: sheet$8.classes.HeaderSubtitleBold }, "Partner Program #1"),
|
|
19023
17834
|
" ",
|
|
19024
17835
|
"program"))),
|
|
19025
17836
|
})),
|
|
19026
17837
|
index.h(sqmStatContainerView.StatContainerView, Object.assign({}, { space: "64px" }),
|
|
19027
|
-
index.h(useDemoBigStat.BigStatView, Object.assign({}, { statvalue: "$ 1,000"
|
|
19028
|
-
index.h(useDemoBigStat.BigStatView, Object.assign({}, { statvalue: "$ 800"
|
|
19029
|
-
index.h(useDemoBigStat.BigStatView, Object.assign({}, { statvalue: "$ 180"
|
|
19030
|
-
index.h(useDemoBigStat.BigStatView, Object.assign({}, { statvalue: "$ 20"
|
|
17838
|
+
index.h(useDemoBigStat.BigStatView, Object.assign({}, { statvalue: "$ 1,000" }), "Total Earned"),
|
|
17839
|
+
index.h(useDemoBigStat.BigStatView, Object.assign({}, { statvalue: "$ 800" }), "Available"),
|
|
17840
|
+
index.h(useDemoBigStat.BigStatView, Object.assign({}, { statvalue: "$ 180" }), "Pending"),
|
|
17841
|
+
index.h(useDemoBigStat.BigStatView, Object.assign({}, { statvalue: "$ 20" }), "Redeemed"))))));
|
|
19031
17842
|
};
|
|
19032
17843
|
const Activity = () => {
|
|
19033
17844
|
return (index.h("sqm-divided-layout", { direction: "row" },
|
|
19034
|
-
index.h("style", { type: "text/css" }, styleString$
|
|
17845
|
+
index.h("style", { type: "text/css" }, styleString$8),
|
|
19035
17846
|
index.h(Sidebar, null),
|
|
19036
17847
|
index.h("sqm-divided-layout", { direction: "column" },
|
|
19037
17848
|
index.h(sqmPortalContainerView.PortalContainerView, Object.assign({}, { direction: "column", padding: "xxx-large", gap: "xxx-large" }),
|
|
@@ -19044,7 +17855,7 @@ const Activity = () => {
|
|
|
19044
17855
|
index.h("p", null,
|
|
19045
17856
|
"for the",
|
|
19046
17857
|
" ",
|
|
19047
|
-
index.h("span", { class: sheet$
|
|
17858
|
+
index.h("span", { class: sheet$8.classes.HeaderSubtitleBold }, "Partner Program #1"),
|
|
19048
17859
|
" ",
|
|
19049
17860
|
"program"))),
|
|
19050
17861
|
})),
|
|
@@ -19054,10 +17865,10 @@ const Activity = () => {
|
|
|
19054
17865
|
label: (index.h("sqm-text", null,
|
|
19055
17866
|
index.h("h3", null, "Referral Activity"))),
|
|
19056
17867
|
content: (index.h(sqmStatContainerView.StatContainerView, Object.assign({}, { space: "64px" }),
|
|
19057
|
-
index.h(useDemoBigStat.BigStatView, Object.assign({}, { statvalue: "1,000"
|
|
19058
|
-
index.h(useDemoBigStat.BigStatView, Object.assign({}, { statvalue: "800"
|
|
19059
|
-
index.h(useDemoBigStat.BigStatView, Object.assign({}, { statvalue: "180"
|
|
19060
|
-
index.h(useDemoBigStat.BigStatView, Object.assign({}, { statvalue: "20"
|
|
17868
|
+
index.h(useDemoBigStat.BigStatView, Object.assign({}, { statvalue: "1,000" }), "Total Referrals"),
|
|
17869
|
+
index.h(useDemoBigStat.BigStatView, Object.assign({}, { statvalue: "800" }), "Converted"),
|
|
17870
|
+
index.h(useDemoBigStat.BigStatView, Object.assign({}, { statvalue: "180" }), "Pending"),
|
|
17871
|
+
index.h(useDemoBigStat.BigStatView, Object.assign({}, { statvalue: "20" }), "Disqualified"))),
|
|
19061
17872
|
}))),
|
|
19062
17873
|
index.h(sqmPortalSectionView.PortalSectionView, Object.assign({}, {
|
|
19063
17874
|
labelMargin: "x-large",
|
|
@@ -19065,9 +17876,9 @@ const Activity = () => {
|
|
|
19065
17876
|
label: (index.h("sqm-text", null,
|
|
19066
17877
|
index.h("h3", null, "Traffic Generated"))),
|
|
19067
17878
|
content: (index.h(sqmStatContainerView.StatContainerView, Object.assign({}, { space: "64px" }),
|
|
19068
|
-
index.h(useDemoBigStat.BigStatView, Object.assign({}, { statvalue: "1,000"
|
|
19069
|
-
index.h(useDemoBigStat.BigStatView, Object.assign({}, { statvalue: "800"
|
|
19070
|
-
index.h(useDemoBigStat.BigStatView, Object.assign({}, { statvalue: "180"
|
|
17879
|
+
index.h(useDemoBigStat.BigStatView, Object.assign({}, { statvalue: "1,000" }), "Clicks"),
|
|
17880
|
+
index.h(useDemoBigStat.BigStatView, Object.assign({}, { statvalue: "800" }), "From share link"),
|
|
17881
|
+
index.h(useDemoBigStat.BigStatView, Object.assign({}, { statvalue: "180" }), "From share mediums"))),
|
|
19071
17882
|
})))));
|
|
19072
17883
|
};
|
|
19073
17884
|
|
|
@@ -19081,7 +17892,7 @@ const NewPortal = /*#__PURE__*/Object.freeze({
|
|
|
19081
17892
|
});
|
|
19082
17893
|
|
|
19083
17894
|
const SidebarItem_stories = {
|
|
19084
|
-
title: "
|
|
17895
|
+
title: "Sidebar Item",
|
|
19085
17896
|
};
|
|
19086
17897
|
const InactiveItem = () => {
|
|
19087
17898
|
const props = {
|
|
@@ -19118,7 +17929,7 @@ const SidebarItem = /*#__PURE__*/Object.freeze({
|
|
|
19118
17929
|
});
|
|
19119
17930
|
|
|
19120
17931
|
const NavigationSidebar_stories = {
|
|
19121
|
-
title: "
|
|
17932
|
+
title: "Navigation Sidebar",
|
|
19122
17933
|
};
|
|
19123
17934
|
const DefaultNavigationSidebar = () => {
|
|
19124
17935
|
const barProps = {
|
|
@@ -19167,12 +17978,14 @@ const NavigationSidebar = /*#__PURE__*/Object.freeze({
|
|
|
19167
17978
|
});
|
|
19168
17979
|
|
|
19169
17980
|
const PortalLogin_stories = {
|
|
19170
|
-
title: "
|
|
17981
|
+
title: "Portal Login",
|
|
19171
17982
|
};
|
|
19172
17983
|
const defaultProps$2 = {
|
|
19173
17984
|
states: {
|
|
19174
17985
|
error: "",
|
|
19175
17986
|
loading: false,
|
|
17987
|
+
forgotPasswordPath: "/forgotPassword",
|
|
17988
|
+
registerPath: "/register",
|
|
19176
17989
|
},
|
|
19177
17990
|
callbacks: {
|
|
19178
17991
|
submit: async (e) => await e,
|
|
@@ -19183,6 +17996,8 @@ const errorProps = {
|
|
|
19183
17996
|
states: {
|
|
19184
17997
|
error: "Something went wrong. Please try again.",
|
|
19185
17998
|
loading: false,
|
|
17999
|
+
forgotPasswordPath: "/forgotPassword",
|
|
18000
|
+
registerPath: "/register",
|
|
19186
18001
|
},
|
|
19187
18002
|
callbacks: {
|
|
19188
18003
|
submit: async (e) => await e,
|
|
@@ -19193,6 +18008,8 @@ const loadingProps = {
|
|
|
19193
18008
|
states: {
|
|
19194
18009
|
error: "",
|
|
19195
18010
|
loading: true,
|
|
18011
|
+
forgotPasswordPath: "/forgotPassword",
|
|
18012
|
+
registerPath: "/register",
|
|
19196
18013
|
},
|
|
19197
18014
|
callbacks: {
|
|
19198
18015
|
submit: async (e) => await e,
|
|
@@ -19212,7 +18029,7 @@ const PortalLogin$1 = /*#__PURE__*/Object.freeze({
|
|
|
19212
18029
|
});
|
|
19213
18030
|
|
|
19214
18031
|
const PortalRegister_stories = {
|
|
19215
|
-
title: "
|
|
18032
|
+
title: "Portal Register",
|
|
19216
18033
|
};
|
|
19217
18034
|
const defaultProps$3 = {
|
|
19218
18035
|
states: {
|
|
@@ -19220,6 +18037,7 @@ const defaultProps$3 = {
|
|
|
19220
18037
|
loading: false,
|
|
19221
18038
|
confirmPassword: true,
|
|
19222
18039
|
hideInputs: false,
|
|
18040
|
+
loginPath: "/login"
|
|
19223
18041
|
},
|
|
19224
18042
|
callbacks: {
|
|
19225
18043
|
submit: () => console.log("Submit!"),
|
|
@@ -19236,6 +18054,7 @@ const errorProps$1 = {
|
|
|
19236
18054
|
loading: false,
|
|
19237
18055
|
confirmPassword: true,
|
|
19238
18056
|
hideInputs: false,
|
|
18057
|
+
loginPath: "/login"
|
|
19239
18058
|
},
|
|
19240
18059
|
callbacks: {
|
|
19241
18060
|
submit: () => console.log("Submit!"),
|
|
@@ -19255,6 +18074,7 @@ const loadingProps$1 = {
|
|
|
19255
18074
|
loading: true,
|
|
19256
18075
|
confirmPassword: true,
|
|
19257
18076
|
hideInputs: false,
|
|
18077
|
+
loginPath: "/login"
|
|
19258
18078
|
},
|
|
19259
18079
|
callbacks: {
|
|
19260
18080
|
submit: () => console.log("Submit!"),
|
|
@@ -19271,6 +18091,7 @@ const slottedProps = {
|
|
|
19271
18091
|
loading: false,
|
|
19272
18092
|
confirmPassword: true,
|
|
19273
18093
|
hideInputs: false,
|
|
18094
|
+
loginPath: "/login"
|
|
19274
18095
|
},
|
|
19275
18096
|
callbacks: {
|
|
19276
18097
|
submit: () => console.log("Submit!"),
|
|
@@ -19297,6 +18118,7 @@ const FieldsHidden = () => {
|
|
|
19297
18118
|
loading: true,
|
|
19298
18119
|
confirmPassword: true,
|
|
19299
18120
|
hideInputs: true,
|
|
18121
|
+
loginPath: "/login"
|
|
19300
18122
|
},
|
|
19301
18123
|
} }));
|
|
19302
18124
|
};
|
|
@@ -19312,10 +18134,10 @@ const PortalRegister$1 = /*#__PURE__*/Object.freeze({
|
|
|
19312
18134
|
SlottedInputs: SlottedInputs
|
|
19313
18135
|
});
|
|
19314
18136
|
|
|
19315
|
-
const scenario = "@author
|
|
18137
|
+
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 |";
|
|
19316
18138
|
|
|
19317
18139
|
const PortalForgotPassword_stories = {
|
|
19318
|
-
title: "
|
|
18140
|
+
title: "Portal Forgot Password",
|
|
19319
18141
|
parameters: {
|
|
19320
18142
|
scenario,
|
|
19321
18143
|
},
|
|
@@ -19325,6 +18147,7 @@ const defaultProps$4 = {
|
|
|
19325
18147
|
error: "",
|
|
19326
18148
|
loading: false,
|
|
19327
18149
|
success: false,
|
|
18150
|
+
loginPath: "/login",
|
|
19328
18151
|
},
|
|
19329
18152
|
callbacks: {
|
|
19330
18153
|
submit: async (e) => await e,
|
|
@@ -19339,6 +18162,7 @@ const errorProps$2 = {
|
|
|
19339
18162
|
error: "Something went wrong. Please try again.",
|
|
19340
18163
|
loading: false,
|
|
19341
18164
|
success: false,
|
|
18165
|
+
loginPath: "/login",
|
|
19342
18166
|
},
|
|
19343
18167
|
callbacks: {
|
|
19344
18168
|
submit: async (e) => await e,
|
|
@@ -19353,6 +18177,7 @@ const loadingProps$2 = {
|
|
|
19353
18177
|
error: "",
|
|
19354
18178
|
loading: true,
|
|
19355
18179
|
success: false,
|
|
18180
|
+
loginPath: "/login",
|
|
19356
18181
|
},
|
|
19357
18182
|
callbacks: {
|
|
19358
18183
|
submit: async (e) => await e,
|
|
@@ -19367,6 +18192,7 @@ const successProps = {
|
|
|
19367
18192
|
error: "",
|
|
19368
18193
|
loading: false,
|
|
19369
18194
|
success: true,
|
|
18195
|
+
loginPath: "/login",
|
|
19370
18196
|
},
|
|
19371
18197
|
callbacks: {
|
|
19372
18198
|
submit: async (e) => await e,
|
|
@@ -19390,10 +18216,10 @@ const PortalForgotPassword = /*#__PURE__*/Object.freeze({
|
|
|
19390
18216
|
ForgotPasswordSuccess: ForgotPasswordSuccess
|
|
19391
18217
|
});
|
|
19392
18218
|
|
|
19393
|
-
const scenario$1 = "@author
|
|
18219
|
+
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 |";
|
|
19394
18220
|
|
|
19395
18221
|
const PortalEmailVerification_stories = {
|
|
19396
|
-
title: "
|
|
18222
|
+
title: "Portal Email Verification",
|
|
19397
18223
|
parameters: {
|
|
19398
18224
|
scenario: scenario$1,
|
|
19399
18225
|
},
|
|
@@ -19476,10 +18302,10 @@ const PortalEmailVerification = /*#__PURE__*/Object.freeze({
|
|
|
19476
18302
|
EmailVerificationSuccess: EmailVerificationSuccess
|
|
19477
18303
|
});
|
|
19478
18304
|
|
|
19479
|
-
const scenario$2 = "@author
|
|
18305
|
+
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\"";
|
|
19480
18306
|
|
|
19481
18307
|
const PortalResetPassword_stories = {
|
|
19482
|
-
title: "
|
|
18308
|
+
title: "Portal Reset Password",
|
|
19483
18309
|
parameters: {
|
|
19484
18310
|
scenario: scenario$2,
|
|
19485
18311
|
},
|
|
@@ -19640,10 +18466,10 @@ const PortalResetPassword = /*#__PURE__*/Object.freeze({
|
|
|
19640
18466
|
CodeValidating: CodeValidating
|
|
19641
18467
|
});
|
|
19642
18468
|
|
|
19643
|
-
const scenario$3 = "@author
|
|
18469
|
+
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 |";
|
|
19644
18470
|
|
|
19645
18471
|
const PortalVerifyEmail_stories = {
|
|
19646
|
-
title: "
|
|
18472
|
+
title: "Portal Verify Email",
|
|
19647
18473
|
parameters: {
|
|
19648
18474
|
scenario: scenario$3,
|
|
19649
18475
|
},
|
|
@@ -19687,7 +18513,7 @@ const PortalVerifyEmail = /*#__PURE__*/Object.freeze({
|
|
|
19687
18513
|
});
|
|
19688
18514
|
|
|
19689
18515
|
const AssetCard_stories = {
|
|
19690
|
-
title: "
|
|
18516
|
+
title: "Asset Card",
|
|
19691
18517
|
};
|
|
19692
18518
|
const Default$7 = () => {
|
|
19693
18519
|
const props = {
|
|
@@ -19723,7 +18549,7 @@ const AssetCard = /*#__PURE__*/Object.freeze({
|
|
|
19723
18549
|
});
|
|
19724
18550
|
|
|
19725
18551
|
const DividedLayout_stories = {
|
|
19726
|
-
title: "
|
|
18552
|
+
title: "Divided Layout",
|
|
19727
18553
|
};
|
|
19728
18554
|
const barProps$1 = {
|
|
19729
18555
|
data: {
|
|
@@ -19815,7 +18641,7 @@ const DividedLayout$1 = /*#__PURE__*/Object.freeze({
|
|
|
19815
18641
|
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";
|
|
19816
18642
|
|
|
19817
18643
|
const ChangePassword_stories = {
|
|
19818
|
-
title: "
|
|
18644
|
+
title: "Change Password",
|
|
19819
18645
|
parameters: {
|
|
19820
18646
|
scenario: scenario$4,
|
|
19821
18647
|
},
|
|
@@ -19971,7 +18797,7 @@ const ChangePassword = /*#__PURE__*/Object.freeze({
|
|
|
19971
18797
|
});
|
|
19972
18798
|
|
|
19973
18799
|
const PortalProfile_stories = {
|
|
19974
|
-
title: "
|
|
18800
|
+
title: "Portal Profile",
|
|
19975
18801
|
};
|
|
19976
18802
|
// const style = {};
|
|
19977
18803
|
jssPresetDefault_esm.jss.setup(jssPresetDefault_esm.create());
|
|
@@ -20212,7 +19038,7 @@ const PortalProfile = /*#__PURE__*/Object.freeze({
|
|
|
20212
19038
|
});
|
|
20213
19039
|
|
|
20214
19040
|
const ReferralTableRewardsCell_stories = {
|
|
20215
|
-
title: "
|
|
19041
|
+
title: "Referral Table Rewards Cell",
|
|
20216
19042
|
};
|
|
20217
19043
|
const baseReward = {
|
|
20218
19044
|
id: "123",
|
|
@@ -20444,7 +19270,7 @@ const ReferralTableRewardsCell$1 = /*#__PURE__*/Object.freeze({
|
|
|
20444
19270
|
});
|
|
20445
19271
|
|
|
20446
19272
|
const ReferralTable_stories = {
|
|
20447
|
-
title: "
|
|
19273
|
+
title: "Referral Table",
|
|
20448
19274
|
};
|
|
20449
19275
|
const loadingElement = (index.h("div", { slot: "loading", style: { display: "contents" } },
|
|
20450
19276
|
index.h("sqm-table-row", null,
|
|
@@ -20931,7 +19757,7 @@ const ReferralTable$1 = /*#__PURE__*/Object.freeze({
|
|
|
20931
19757
|
});
|
|
20932
19758
|
|
|
20933
19759
|
const ReferralTableCell_stories = {
|
|
20934
|
-
title: "
|
|
19760
|
+
title: "Referral Table Cell",
|
|
20935
19761
|
};
|
|
20936
19762
|
const TableCell = () => {
|
|
20937
19763
|
return (index.h("sqm-referral-table-cell", { innerTemplate: "Table Cell Text" }));
|
|
@@ -20974,991 +19800,102 @@ const rewardsData = {
|
|
|
20974
19800
|
data: [
|
|
20975
19801
|
{
|
|
20976
19802
|
exchangedRewards: {
|
|
20977
|
-
data: [
|
|
20978
|
-
{
|
|
20979
|
-
prettyValue: "19 Points",
|
|
20980
|
-
type: "CREDIT",
|
|
20981
|
-
fuelTankCode: "ABC",
|
|
20982
|
-
globalRewardKey: "Key",
|
|
20983
|
-
},
|
|
20984
|
-
],
|
|
20985
|
-
},
|
|
20986
|
-
},
|
|
20987
|
-
],
|
|
20988
|
-
},
|
|
20989
|
-
};
|
|
20990
|
-
const rewards = [rewardsData];
|
|
20991
|
-
const RewardsCell = () => {
|
|
20992
|
-
return (index.h("sqm-referral-table-rewards-cell", { rewards: rewards }));
|
|
20993
|
-
};
|
|
20994
|
-
|
|
20995
|
-
const ReferralTableCell$1 = /*#__PURE__*/Object.freeze({
|
|
20996
|
-
__proto__: null,
|
|
20997
|
-
'default': ReferralTableCell_stories,
|
|
20998
|
-
TableCell: TableCell,
|
|
20999
|
-
TableUserCell: TableUserCell,
|
|
21000
|
-
EmptyCell: EmptyCell$1,
|
|
21001
|
-
StatusCell: StatusCell,
|
|
21002
|
-
DateCell: DateCell,
|
|
21003
|
-
RewardsCell: RewardsCell
|
|
21004
|
-
});
|
|
21005
|
-
|
|
21006
|
-
const UserName_stories = {
|
|
21007
|
-
title: "Tests/User Name",
|
|
21008
|
-
};
|
|
21009
|
-
const DemoData = () => {
|
|
21010
|
-
return (index.h("sqm-user-name", { demoData: {
|
|
21011
|
-
loading: false,
|
|
21012
|
-
loadingText: "...",
|
|
21013
|
-
username: "Test Testerson",
|
|
21014
|
-
} }));
|
|
21015
|
-
};
|
|
21016
|
-
const Username = () => {
|
|
21017
|
-
return index.h("sqm-user-name", null);
|
|
21018
|
-
};
|
|
21019
|
-
|
|
21020
|
-
const UserName = /*#__PURE__*/Object.freeze({
|
|
21021
|
-
__proto__: null,
|
|
21022
|
-
'default': UserName_stories,
|
|
21023
|
-
DemoData: DemoData,
|
|
21024
|
-
Username: Username
|
|
21025
|
-
});
|
|
21026
|
-
|
|
21027
|
-
const PasswordField_stories = {
|
|
21028
|
-
title: "Components/Portal Password Field",
|
|
21029
|
-
};
|
|
21030
|
-
const Start = () => {
|
|
21031
|
-
return (index.h("sqm-password-field", { demoData: {
|
|
21032
|
-
initValue: "",
|
|
21033
|
-
states: {
|
|
21034
|
-
enableValidation: true,
|
|
21035
|
-
validationErrors: {},
|
|
21036
|
-
content: {
|
|
21037
|
-
fieldLabel: "Password",
|
|
21038
|
-
},
|
|
21039
|
-
},
|
|
21040
|
-
} }));
|
|
21041
|
-
};
|
|
21042
|
-
const EmptyError = () => {
|
|
21043
|
-
return (index.h("sqm-password-field", { demoData: {
|
|
21044
|
-
initValue: "",
|
|
21045
|
-
states: {
|
|
21046
|
-
enableValidation: true,
|
|
21047
|
-
validationErrors: { password: "Cannot be empty" },
|
|
21048
|
-
content: {
|
|
21049
|
-
fieldLabel: "Password",
|
|
21050
|
-
},
|
|
21051
|
-
},
|
|
21052
|
-
} }));
|
|
21053
|
-
};
|
|
21054
|
-
const ValidationError = () => {
|
|
21055
|
-
return (index.h("sqm-password-field", { demoData: {
|
|
21056
|
-
initValue: "asdf",
|
|
21057
|
-
states: {
|
|
21058
|
-
enableValidation: true,
|
|
21059
|
-
validationErrors: { password: "Incomplete" },
|
|
21060
|
-
content: {
|
|
21061
|
-
fieldLabel: "Password",
|
|
21062
|
-
},
|
|
21063
|
-
},
|
|
21064
|
-
} }));
|
|
21065
|
-
};
|
|
21066
|
-
|
|
21067
|
-
const PasswordField = /*#__PURE__*/Object.freeze({
|
|
21068
|
-
__proto__: null,
|
|
21069
|
-
'default': PasswordField_stories,
|
|
21070
|
-
Start: Start,
|
|
21071
|
-
EmptyError: EmptyError,
|
|
21072
|
-
ValidationError: ValidationError
|
|
21073
|
-
});
|
|
21074
|
-
|
|
21075
|
-
/**
|
|
21076
|
-
* Displays a cartesian product of the input props
|
|
21077
|
-
*
|
|
21078
|
-
* @returns
|
|
21079
|
-
*/
|
|
21080
|
-
function MatrixStory({ matrix, props, Component, }) {
|
|
21081
|
-
const propMatrix = Object.keys(matrix).map((propKey) => {
|
|
21082
|
-
const propValues = matrix[propKey];
|
|
21083
|
-
return propValues.map((val) => {
|
|
21084
|
-
return {
|
|
21085
|
-
[propKey]: val,
|
|
21086
|
-
};
|
|
21087
|
-
});
|
|
21088
|
-
});
|
|
21089
|
-
const combinations = cartesian(...propMatrix);
|
|
21090
|
-
const propsCombinations = combinations.map((combo) => {
|
|
21091
|
-
return combo.reduce((props, prop) => {
|
|
21092
|
-
return {
|
|
21093
|
-
...props,
|
|
21094
|
-
...prop,
|
|
21095
|
-
};
|
|
21096
|
-
}, {});
|
|
21097
|
-
});
|
|
21098
|
-
return propsCombinations.map((combo) => {
|
|
21099
|
-
const example = { ...props, ...combo };
|
|
21100
|
-
return (index.h("div", null,
|
|
21101
|
-
index.h(PropsTable, { values: example }),
|
|
21102
|
-
index.h("hr", null),
|
|
21103
|
-
" ",
|
|
21104
|
-
index.h("br", null),
|
|
21105
|
-
index.h(Component, Object.assign({}, example)),
|
|
21106
|
-
index.h("br", null)));
|
|
21107
|
-
});
|
|
21108
|
-
}
|
|
21109
|
-
function PropsTable({ values }) {
|
|
21110
|
-
return (index.h("table", null,
|
|
21111
|
-
index.h("tbody", null, Object.keys(values).map((key) => {
|
|
21112
|
-
return (index.h("tr", null,
|
|
21113
|
-
index.h("th", null, key),
|
|
21114
|
-
index.h("td", null, JSON.stringify(values[key]))));
|
|
21115
|
-
}))));
|
|
21116
|
-
}
|
|
21117
|
-
/**
|
|
21118
|
-
* Source: https://stackoverflow.com/questions/15298912/javascript-generating-combinations-from-n-arrays-with-m-elements
|
|
21119
|
-
*
|
|
21120
|
-
* TODO: Could replace with a fork of https://www.npmjs.com/package/cartesian
|
|
21121
|
-
*
|
|
21122
|
-
* @param args - an array of arrays
|
|
21123
|
-
* @returns combinations of the elements in those array
|
|
21124
|
-
*/
|
|
21125
|
-
function cartesian(...args) {
|
|
21126
|
-
var r = [], max = args.length - 1;
|
|
21127
|
-
function helper(arr, i) {
|
|
21128
|
-
for (var j = 0, l = args[i].length; j < l; j++) {
|
|
21129
|
-
var a = arr.slice(0); // clone arr
|
|
21130
|
-
a.push(args[i][j]);
|
|
21131
|
-
if (i == max)
|
|
21132
|
-
r.push(a);
|
|
21133
|
-
else
|
|
21134
|
-
helper(a, i + 1);
|
|
21135
|
-
}
|
|
21136
|
-
}
|
|
21137
|
-
helper([], 0);
|
|
21138
|
-
return r;
|
|
21139
|
-
}
|
|
21140
|
-
|
|
21141
|
-
const checkmark_circle = () => {
|
|
21142
|
-
return (index.h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "18", height: "18", viewBox: "0 0 18 18" },
|
|
21143
|
-
index.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" })));
|
|
21144
|
-
};
|
|
21145
|
-
const arrow_left_right = () => {
|
|
21146
|
-
return (index.h("svg", { width: 11, height: 12, fill: "none", xmlns: "http://www.w3.org/2000/svg" },
|
|
21147
|
-
index.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" })));
|
|
21148
|
-
};
|
|
21149
|
-
|
|
21150
|
-
const gift = () => {
|
|
21151
|
-
return (index.h("svg", { width: 16, height: 16, fill: "none", xmlns: "http://www.w3.org/2000/svg" },
|
|
21152
|
-
index.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)" }),
|
|
21153
|
-
index.h("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M1.5 9v1h13V9h-13z", fill: "var(--sl-color-primary-300)" }),
|
|
21154
|
-
index.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)" })));
|
|
21155
|
-
};
|
|
21156
|
-
|
|
21157
|
-
function ProgressBarView(props) {
|
|
21158
|
-
const { progress = 0, goal = 1, steps = false, progressBarUnit = "", repeatable = false, expired = false, } = props;
|
|
21159
|
-
console.log("progress bar props", props);
|
|
21160
|
-
const gift1 = gift();
|
|
21161
|
-
const gift2 = gift();
|
|
21162
|
-
const gift3 = gift();
|
|
21163
|
-
var items = [];
|
|
21164
|
-
var columns = "";
|
|
21165
|
-
var repetitions = Math.floor(progress / goal);
|
|
21166
|
-
if (repeatable) {
|
|
21167
|
-
if (steps) {
|
|
21168
|
-
addStepsRepeatable();
|
|
21169
|
-
}
|
|
21170
|
-
else {
|
|
21171
|
-
addLinearRepeatable();
|
|
21172
|
-
}
|
|
21173
|
-
}
|
|
21174
|
-
// non repeatable
|
|
21175
|
-
else {
|
|
21176
|
-
if (steps) {
|
|
21177
|
-
addSteps();
|
|
21178
|
-
}
|
|
21179
|
-
else {
|
|
21180
|
-
addLinear();
|
|
21181
|
-
}
|
|
21182
|
-
}
|
|
21183
|
-
const style = {
|
|
21184
|
-
ProgressBar: {
|
|
21185
|
-
"& .progress-bar": {
|
|
21186
|
-
height: "15px",
|
|
21187
|
-
marginTop: steps
|
|
21188
|
-
? "var(--sl-spacing-medium)"
|
|
21189
|
-
: "var(--sl-spacing-large)",
|
|
21190
|
-
filter: expired ? "grayscale(1)" : "",
|
|
21191
|
-
marginBottom: "var(--sl-spacing-xx-large)",
|
|
21192
|
-
marginRight: "var(--sl-spacing-x-small)",
|
|
21193
|
-
fontSize: "var(--sl-font-size-x-small)",
|
|
21194
|
-
display: "grid",
|
|
21195
|
-
gridTemplateColumns: columns,
|
|
21196
|
-
lineHeight: "45px",
|
|
21197
|
-
userSelect: "none",
|
|
21198
|
-
},
|
|
21199
|
-
"& .progress-bar.repeatable-steps": {
|
|
21200
|
-
marginLeft: "var(--sl-spacing-x-small)",
|
|
21201
|
-
},
|
|
21202
|
-
"& .filled:after": {
|
|
21203
|
-
content: '""',
|
|
21204
|
-
display: "flex",
|
|
21205
|
-
width: "100%",
|
|
21206
|
-
height: "4px",
|
|
21207
|
-
borderRadius: "4px",
|
|
21208
|
-
backgroundColor: "var(--sl-color-primary-300)",
|
|
21209
|
-
},
|
|
21210
|
-
"& .progress": {
|
|
21211
|
-
display: "block",
|
|
21212
|
-
textAlign: "center",
|
|
21213
|
-
marginLeft: "-100px",
|
|
21214
|
-
marginRight: "-100px",
|
|
21215
|
-
},
|
|
21216
|
-
"& .progress::after": {
|
|
21217
|
-
content: '""',
|
|
21218
|
-
width: "12px",
|
|
21219
|
-
height: "12px",
|
|
21220
|
-
display: "flex",
|
|
21221
|
-
backgroundColor: "var(--sl-color-primary-300)",
|
|
21222
|
-
borderRadius: "50%",
|
|
21223
|
-
position: "relative",
|
|
21224
|
-
left: "47%",
|
|
21225
|
-
top: "-85%",
|
|
21226
|
-
},
|
|
21227
|
-
"& .progress.bg:after": {
|
|
21228
|
-
width: "0",
|
|
21229
|
-
height: "0",
|
|
21230
|
-
border: "none",
|
|
21231
|
-
},
|
|
21232
|
-
"& .progress.top": {
|
|
21233
|
-
position: "relative",
|
|
21234
|
-
top: "-40px",
|
|
21235
|
-
},
|
|
21236
|
-
"& .progress.top:after": {
|
|
21237
|
-
top: "-16%",
|
|
21238
|
-
},
|
|
21239
|
-
"& .empty": {
|
|
21240
|
-
display: "block",
|
|
21241
|
-
textAlign: "center",
|
|
21242
|
-
marginLeft: "-100px",
|
|
21243
|
-
marginRight: "-100px",
|
|
21244
|
-
},
|
|
21245
|
-
"& .empty::after": {
|
|
21246
|
-
content: '""',
|
|
21247
|
-
width: "12px",
|
|
21248
|
-
height: "12px",
|
|
21249
|
-
border: "2px solid #E0E0E0",
|
|
21250
|
-
margin: "-2px",
|
|
21251
|
-
display: "flex",
|
|
21252
|
-
backgroundColor: "white",
|
|
21253
|
-
borderRadius: "50%",
|
|
21254
|
-
position: "relative",
|
|
21255
|
-
left: "47%",
|
|
21256
|
-
top: "-85%",
|
|
21257
|
-
},
|
|
21258
|
-
"& .empty.bg:after": {
|
|
21259
|
-
width: "0",
|
|
21260
|
-
height: "0",
|
|
21261
|
-
border: "none",
|
|
21262
|
-
},
|
|
21263
|
-
"& .remain:after": {
|
|
21264
|
-
content: '""',
|
|
21265
|
-
display: "flex",
|
|
21266
|
-
width: "100%",
|
|
21267
|
-
height: "4px",
|
|
21268
|
-
borderRadius: "4px",
|
|
21269
|
-
backgroundColor: "#E0E0E0",
|
|
21270
|
-
},
|
|
21271
|
-
"& .gift.bw": {
|
|
21272
|
-
filter: "grayscale(100%)",
|
|
21273
|
-
},
|
|
21274
|
-
"& .gift.start": {
|
|
21275
|
-
transform: "scale(80%)",
|
|
21276
|
-
top: "-20px",
|
|
21277
|
-
},
|
|
21278
|
-
"& .gift": {
|
|
21279
|
-
textAlign: "center",
|
|
21280
|
-
marginLeft: "-100px",
|
|
21281
|
-
marginRight: "-100px",
|
|
21282
|
-
position: "relative",
|
|
21283
|
-
display: "list-item",
|
|
21284
|
-
listStyleType: "none",
|
|
21285
|
-
top: "-18px",
|
|
21286
|
-
filter: goal <= progress ? "" : "grayscale(100%)",
|
|
21287
|
-
zIndex: "1",
|
|
21288
|
-
},
|
|
21289
|
-
},
|
|
21290
|
-
};
|
|
21291
|
-
jssPresetDefault_esm.jss.setup(jssPresetDefault_esm.create());
|
|
21292
|
-
const sheet = jssPresetDefault_esm.jss.createStyleSheet(style);
|
|
21293
|
-
const styleString = sheet.toString();
|
|
21294
|
-
return (index.h("div", { class: sheet.classes.ProgressBar },
|
|
21295
|
-
index.h("style", { type: "text/css" }, styleString),
|
|
21296
|
-
index.h("div", { class: repetitions > 1 ? "progress-bar repeatable-steps" : "progress-bar" }, items)));
|
|
21297
|
-
function clamp(x, min, max) {
|
|
21298
|
-
return Math.min(Math.max(x, min), max);
|
|
21299
|
-
}
|
|
21300
|
-
function addLinear() {
|
|
21301
|
-
const ratio = progress / goal;
|
|
21302
|
-
columns =
|
|
21303
|
-
clamp(ratio, 0, 1) + "fr 0fr " + clamp(1 - ratio, 0, 1) + "fr 0fr 0fr";
|
|
21304
|
-
items.push(index.h("div", { class: "filled" }));
|
|
21305
|
-
items.push(index.h("div", { class: clamp(progress, 0, goal) == goal ? "progress top bg" : "progress top" }, clamp(progress, 0, goal) == goal
|
|
21306
|
-
? ""
|
|
21307
|
-
: progressBarUnit + clamp(progress, 0, goal)));
|
|
21308
|
-
items.push(index.h("div", { class: "remain" }));
|
|
21309
|
-
items.push(index.h("div", { class: "progress bg" }, progressBarUnit + goal));
|
|
21310
|
-
items.push(index.h("div", { class: "gift" }, gift1));
|
|
21311
|
-
}
|
|
21312
|
-
function addSteps() {
|
|
21313
|
-
let ratio = 1 / goal;
|
|
21314
|
-
for (let i = 1; i < goal; i++) {
|
|
21315
|
-
columns += ratio + "fr 0fr ";
|
|
21316
|
-
if (i > progress) {
|
|
21317
|
-
items.push(index.h("div", { class: "remain" }));
|
|
21318
|
-
items.push(index.h("div", { class: "empty" }, i));
|
|
21319
|
-
}
|
|
21320
|
-
else {
|
|
21321
|
-
items.push(index.h("div", { class: "filled" }));
|
|
21322
|
-
items.push(index.h("div", { class: "progress" }, i));
|
|
21323
|
-
}
|
|
21324
|
-
}
|
|
21325
|
-
columns += ratio + "fr 0fr ";
|
|
21326
|
-
// reward success
|
|
21327
|
-
if (goal <= progress) {
|
|
21328
|
-
columns += "0fr ";
|
|
21329
|
-
items.push(index.h("div", { class: "filled" }));
|
|
21330
|
-
items.push(index.h("div", { class: "progress bg" }, goal));
|
|
21331
|
-
items.push(index.h("div", { class: "gift" }, gift1));
|
|
21332
|
-
}
|
|
21333
|
-
// reward fail
|
|
21334
|
-
else {
|
|
21335
|
-
columns += "0fr ";
|
|
21336
|
-
items.push(index.h("div", { class: "remain" }));
|
|
21337
|
-
items.push(index.h("div", { class: "empty bg" }, goal));
|
|
21338
|
-
items.push(index.h("div", { class: "gift" }, gift1));
|
|
21339
|
-
}
|
|
21340
|
-
}
|
|
21341
|
-
function addLinearRepeatable() {
|
|
21342
|
-
let repetitions = Math.floor(progress / goal);
|
|
21343
|
-
let ratio = ((progress % goal) / goal) * 0.5;
|
|
21344
|
-
// 0 repetition
|
|
21345
|
-
if (repetitions == 0) {
|
|
21346
|
-
columns = ratio + "fr 0fr " + (0.5 - ratio) + "fr 0fr 0fr 0.5fr 0fr 0fr";
|
|
21347
|
-
items.push(index.h("div", { class: "filled" }));
|
|
21348
|
-
items.push(index.h("div", { class: progress == goal ? "progress top bg" : "progress top" }, progressBarUnit + progress));
|
|
21349
|
-
items.push(index.h("div", { class: "remain" }));
|
|
21350
|
-
items.push(index.h("div", { class: "progress bg" }, progressBarUnit + goal));
|
|
21351
|
-
items.push(index.h("div", { class: "gift" }, gift1));
|
|
21352
|
-
items.push(index.h("div", { class: "remain" }));
|
|
21353
|
-
items.push(index.h("div", { class: "progress bg" }, progressBarUnit + goal * 2));
|
|
21354
|
-
items.push(index.h("div", { class: "gift bw" }, gift2));
|
|
21355
|
-
}
|
|
21356
|
-
// single repetition
|
|
21357
|
-
else if (repetitions == 1) {
|
|
21358
|
-
columns =
|
|
21359
|
-
"0.5fr 0fr 0fr " + ratio + "fr 0fr " + (0.5 - ratio) + "fr 0fr 0fr";
|
|
21360
|
-
items.push(index.h("div", { class: "filled" }));
|
|
21361
|
-
items.push(index.h("div", { class: "progress bg" }, progressBarUnit + goal));
|
|
21362
|
-
items.push(index.h("div", { class: "gift" }, gift1));
|
|
21363
|
-
items.push(index.h("div", { class: "filled" }));
|
|
21364
|
-
items.push(index.h("div", { class: progress == goal ? "progress top bg" : "progress top" }, progress == goal ? "" : progressBarUnit + progress));
|
|
21365
|
-
items.push(index.h("div", { class: "remain" }));
|
|
21366
|
-
items.push(index.h("div", { class: "progress bg" }, progressBarUnit + goal * 2));
|
|
21367
|
-
items.push(index.h("div", { class: "gift bw" }, gift2));
|
|
21368
|
-
}
|
|
21369
|
-
// multiple repetitions
|
|
21370
|
-
else {
|
|
21371
|
-
columns =
|
|
21372
|
-
"0fr 0fr 0.5fr 0fr 0fr " +
|
|
21373
|
-
ratio +
|
|
21374
|
-
"fr 0fr " +
|
|
21375
|
-
(0.5 - ratio) +
|
|
21376
|
-
"fr 0fr 0fr";
|
|
21377
|
-
items.push(index.h("div", { class: "progress bg" }, progressBarUnit + goal * (repetitions - 1)));
|
|
21378
|
-
items.push(index.h("div", { class: "gift start" }, gift1));
|
|
21379
|
-
items.push(index.h("div", { class: "filled" }));
|
|
21380
|
-
items.push(index.h("div", { class: "progress bg" }, progressBarUnit + goal * repetitions));
|
|
21381
|
-
items.push(index.h("div", { class: "gift" }, gift2));
|
|
21382
|
-
items.push(index.h("div", { class: "filled" }));
|
|
21383
|
-
items.push(index.h("div", { class: progress == goal * repetitions ? "progress top bg" : "progress top" }, progress == goal * repetitions ? "" : progressBarUnit + progress));
|
|
21384
|
-
items.push(index.h("div", { class: "remain" }));
|
|
21385
|
-
items.push(index.h("div", { class: "progress bg" }, progressBarUnit + goal * (repetitions + 1)));
|
|
21386
|
-
items.push(index.h("div", { class: "gift bw" }, gift3));
|
|
21387
|
-
}
|
|
21388
|
-
}
|
|
21389
|
-
function addStepsRepeatable() {
|
|
21390
|
-
let repetitions = Math.floor(progress / goal);
|
|
21391
|
-
// no or single repetition
|
|
21392
|
-
if (repetitions < 2) {
|
|
21393
|
-
let ratio = 1 / goal;
|
|
21394
|
-
for (let i = 1; i < goal * 2 + 1; i++) {
|
|
21395
|
-
columns += ratio + "fr 0fr ";
|
|
21396
|
-
if (i > progress) {
|
|
21397
|
-
if (i == goal) {
|
|
21398
|
-
columns += "0fr ";
|
|
21399
|
-
items.push(index.h("div", { class: "remain" }));
|
|
21400
|
-
items.push(index.h("div", { class: "empty bg" }, goal));
|
|
21401
|
-
items.push(index.h("div", { class: "gift bw" }, gift1));
|
|
21402
|
-
}
|
|
21403
|
-
else if (i == goal * 2) {
|
|
21404
|
-
columns += "0fr 0fr";
|
|
21405
|
-
items.push(index.h("div", { class: "remain" }));
|
|
21406
|
-
items.push(index.h("div", { class: "empty bg" }, goal * 2));
|
|
21407
|
-
items.push(index.h("div", { class: "gift bw" }, gift2));
|
|
21408
|
-
}
|
|
21409
|
-
else {
|
|
21410
|
-
items.push(index.h("div", { class: "remain" }));
|
|
21411
|
-
items.push(index.h("div", { class: "empty" }, i));
|
|
21412
|
-
}
|
|
21413
|
-
}
|
|
21414
|
-
else if (i == goal) {
|
|
21415
|
-
columns += "0fr ";
|
|
21416
|
-
items.push(index.h("div", { class: "filled" }));
|
|
21417
|
-
items.push(index.h("div", { class: "progress bg" }, i));
|
|
21418
|
-
items.push(index.h("div", { class: "gift" }, gift3));
|
|
21419
|
-
}
|
|
21420
|
-
else {
|
|
21421
|
-
items.push(index.h("div", { class: "filled" }));
|
|
21422
|
-
items.push(index.h("div", { class: "progress" }, i));
|
|
21423
|
-
}
|
|
21424
|
-
}
|
|
21425
|
-
}
|
|
21426
|
-
// case repetition many
|
|
21427
|
-
else {
|
|
21428
|
-
let position = (progress % goal) + goal;
|
|
21429
|
-
let ratio = 1 / goal;
|
|
21430
|
-
columns += "0fr 0fr ";
|
|
21431
|
-
items.push(index.h("div", { class: "progress bg" }, goal * (repetitions - 1)));
|
|
21432
|
-
items.push(index.h("div", { class: "gift start" }, gift1));
|
|
21433
|
-
for (let i = 1; i < goal * 2 + 1; i++) {
|
|
21434
|
-
columns += ratio + "fr 0fr ";
|
|
21435
|
-
if (i <= goal) {
|
|
21436
|
-
if (i == goal) {
|
|
21437
|
-
columns += "0fr ";
|
|
21438
|
-
items.push(index.h("div", { class: "filled" }));
|
|
21439
|
-
items.push(index.h("div", { class: "progress bg" }, i + goal * (repetitions - 1)));
|
|
21440
|
-
items.push(index.h("div", { class: "gift" }, gift2));
|
|
21441
|
-
}
|
|
21442
|
-
else {
|
|
21443
|
-
items.push(index.h("div", { class: "filled" }));
|
|
21444
|
-
items.push(index.h("div", { class: "progress" }, i + goal * (repetitions - 1)));
|
|
21445
|
-
}
|
|
21446
|
-
}
|
|
21447
|
-
else if (i > position) {
|
|
21448
|
-
if (i == goal * 2) {
|
|
21449
|
-
columns += "0fr 0fr";
|
|
21450
|
-
items.push(index.h("div", { class: "remain" }));
|
|
21451
|
-
items.push(index.h("div", { class: "empty bg" }, i + goal * (repetitions - 1)));
|
|
21452
|
-
items.push(index.h("div", { class: "gift bw" }, gift3));
|
|
21453
|
-
}
|
|
21454
|
-
else {
|
|
21455
|
-
items.push(index.h("div", { class: "remain" }));
|
|
21456
|
-
items.push(index.h("div", { class: "empty" }, i + goal * (repetitions - 1)));
|
|
21457
|
-
}
|
|
21458
|
-
}
|
|
21459
|
-
else {
|
|
21460
|
-
items.push(index.h("div", { class: "filled" }));
|
|
21461
|
-
items.push(index.h("div", { class: "progress" }, i + goal * (repetitions - 1)));
|
|
21462
|
-
}
|
|
21463
|
-
}
|
|
21464
|
-
}
|
|
21465
|
-
}
|
|
21466
|
-
}
|
|
21467
|
-
|
|
21468
|
-
function TaskCardView(props) {
|
|
21469
|
-
console.log({ props });
|
|
21470
|
-
const checkmark_circle$1 = checkmark_circle();
|
|
21471
|
-
const arrow_left_right$1 = arrow_left_right();
|
|
21472
|
-
const style = {
|
|
21473
|
-
HostBlock: mixins.HostBlock,
|
|
21474
|
-
TaskCard: {
|
|
21475
|
-
"& .main > div": {
|
|
21476
|
-
margin: "var(--sl-spacing-medium)",
|
|
21477
|
-
},
|
|
21478
|
-
"& .main": {
|
|
21479
|
-
position: "relative",
|
|
21480
|
-
boxSizing: "border-box",
|
|
21481
|
-
minWidth: "347px",
|
|
21482
|
-
background: "var(--sl-color-neutral-0)",
|
|
21483
|
-
border: "1px solid var(--sl-color-neutral-300)",
|
|
21484
|
-
borderRadius: "var(--sl-border-radius-medium)",
|
|
21485
|
-
fontSize: "var(--sl-font-size-small)",
|
|
21486
|
-
lineHeight: "var(--sl-line-height-dense)",
|
|
21487
|
-
color: "var(--sl-color-neutral-600)",
|
|
21488
|
-
},
|
|
21489
|
-
"& .main.complete": {
|
|
21490
|
-
background: "var(--sl-color-success-50)",
|
|
21491
|
-
borderColor: "var(--sl-color-success-700)",
|
|
21492
|
-
},
|
|
21493
|
-
"& .main.expired": {
|
|
21494
|
-
color: "var(--sl-color-neutral-400)",
|
|
21495
|
-
background: "var(--sl-color-neutral-50)",
|
|
21496
|
-
},
|
|
21497
|
-
"& .title": {
|
|
21498
|
-
fontSize: "var(--sl-font-size-small)",
|
|
21499
|
-
fontWeight: "var(--sl-font-weight-semibold)",
|
|
21500
|
-
},
|
|
21501
|
-
"& .black": {
|
|
21502
|
-
color: "var(--sl-color-neutral-1000)",
|
|
21503
|
-
},
|
|
21504
|
-
},
|
|
21505
|
-
Header: {
|
|
21506
|
-
display: "flex",
|
|
21507
|
-
"& .icon": {
|
|
21508
|
-
alignSelf: "center",
|
|
21509
|
-
lineHeight: "0",
|
|
21510
|
-
color: "var(--sl-color-success-700)",
|
|
21511
|
-
fontSize: "var(--sl-font-size-large)",
|
|
21512
|
-
marginRight: "var(--sl-spacing-x-small)",
|
|
21513
|
-
},
|
|
21514
|
-
"& .value": {
|
|
21515
|
-
alignSelf: "center",
|
|
21516
|
-
fontSize: "var(--sl-font-size-x-large)",
|
|
21517
|
-
fontWeight: "var(--sl-font-weight-semibold)",
|
|
21518
|
-
lineHeight: "100%",
|
|
21519
|
-
marginRight: "var(--sl-spacing-xx-small)",
|
|
21520
|
-
},
|
|
21521
|
-
"& .text": {
|
|
21522
|
-
alignSelf: "end",
|
|
21523
|
-
textTransform: "uppercase",
|
|
21524
|
-
fontSize: "var(--sl-font-size-x-small)",
|
|
21525
|
-
lineHeight: "var(--sl-font-size-medium)",
|
|
21526
|
-
marginRight: "var(--sl-spacing-xx-small)",
|
|
21527
|
-
},
|
|
21528
|
-
"& .end": {
|
|
21529
|
-
color: "var(--sl-color-warning-500)",
|
|
21530
|
-
fontWeight: "var(--sl-font-weight-semibold)",
|
|
21531
|
-
marginBottom: "var(--sl-spacing-xx-small)",
|
|
21532
|
-
},
|
|
21533
|
-
"& .black": {
|
|
21534
|
-
color: "var(--sl-color-neutral-1000)",
|
|
21535
|
-
},
|
|
21536
|
-
"& .neutral": {
|
|
21537
|
-
color: "var(--sl-color-neutral-400)",
|
|
21538
|
-
},
|
|
21539
|
-
},
|
|
21540
|
-
Footer: {
|
|
21541
|
-
display: "flex",
|
|
21542
|
-
"& .icon": {
|
|
21543
|
-
fontSize: "var(--sl-font-size-xx-small)",
|
|
21544
|
-
marginRight: "var(--sl-spacing-xx-small)",
|
|
21545
|
-
},
|
|
21546
|
-
"& .text": {
|
|
21547
|
-
marginTop: "auto",
|
|
21548
|
-
verticalAlign: "text-bottom",
|
|
21549
|
-
fontSize: "var(--sl-font-size-x-small)",
|
|
21550
|
-
},
|
|
21551
|
-
"& .success": {
|
|
21552
|
-
color: "var(--sl-color-success-600)",
|
|
21553
|
-
fontWeight: "var(--sl-font-weight-semibold)",
|
|
21554
|
-
},
|
|
21555
|
-
"& .action": {
|
|
21556
|
-
marginTop: "auto",
|
|
21557
|
-
marginLeft: "auto",
|
|
21558
|
-
"&::part(base)": {
|
|
21559
|
-
color: "var(--sl-color-neutral-0)",
|
|
21560
|
-
borderRadius: "var(--sl-border-radius-medium)",
|
|
21561
|
-
},
|
|
21562
|
-
"&.disabled::part(base)": {
|
|
21563
|
-
border: "1px solid var(--sl-color-neutral-400)",
|
|
21564
|
-
background: "var(--sl-color-neutral-400)",
|
|
21565
|
-
},
|
|
21566
|
-
},
|
|
21567
|
-
"& .neutral": {
|
|
21568
|
-
color: "var(--sl-color-neutral-400)",
|
|
21569
|
-
},
|
|
21570
|
-
},
|
|
21571
|
-
};
|
|
21572
|
-
jssPresetDefault_esm.jss.setup(jssPresetDefault_esm.create());
|
|
21573
|
-
const sheet = jssPresetDefault_esm.jss.createStyleSheet(style);
|
|
21574
|
-
const styleString = sheet.toString();
|
|
21575
|
-
const showComplete = props.progress >= props.goal;
|
|
21576
|
-
const repetitions = props.showProgressBar
|
|
21577
|
-
? Math.floor(props.progress / props.goal)
|
|
21578
|
-
: props.progress;
|
|
21579
|
-
const dateStart = props.showExpiry && luxon.DateTime.fromISO(props.rewardDuration.split("/")[0]);
|
|
21580
|
-
const dateEnd = props.showExpiry && luxon.DateTime.fromISO(props.rewardDuration.split("/")[1]);
|
|
21581
|
-
const dateToday = luxon.DateTime.now();
|
|
21582
|
-
const taskComplete = showComplete && props.repeatable === false;
|
|
21583
|
-
const taskUnavailable = props.showExpiry && (dateEnd < dateToday || dateToday < dateStart);
|
|
21584
|
-
return (index.h("div", { class: sheet.classes.TaskCard },
|
|
21585
|
-
index.h("div", { class: taskUnavailable
|
|
21586
|
-
? "main expired"
|
|
21587
|
-
: taskComplete
|
|
21588
|
-
? "main complete"
|
|
21589
|
-
: "main" },
|
|
21590
|
-
index.h("style", { type: "text/css" }, styleString),
|
|
21591
|
-
index.h("div", { class: sheet.classes.Header }, props.loading ? (index.h("sl-skeleton", { style: { width: "22%", margin: "0", height: "12px" } })) : (index.h("div", null,
|
|
21592
|
-
taskUnavailable && (index.h("div", { class: "end" }, "Available " +
|
|
21593
|
-
dateStart.toLocaleString(luxon.DateTime.DATE_MED).split(",")[0] +
|
|
21594
|
-
" - " +
|
|
21595
|
-
dateEnd.toLocaleString(luxon.DateTime.DATE_MED).split(",")[0])),
|
|
21596
|
-
showComplete && (index.h("span", { class: taskUnavailable ? "icon neutral" : "icon" }, checkmark_circle$1)),
|
|
21597
|
-
index.h("span", { class: taskUnavailable ? "value" : "value black" }, props.rewardAmount),
|
|
21598
|
-
index.h("span", { class: "text" }, props.rewardUnit)))),
|
|
21599
|
-
props.loading ? (index.h("sl-skeleton", { style: { width: "42%", margin: "0 16px", height: "12px" } })) : (index.h("div", { class: taskUnavailable ? "title" : "title black" }, props.cardTitle)),
|
|
21600
|
-
props.loading ? (index.h("sl-skeleton", { style: { margin: "12px 16px", height: "12px" } })) : (index.h(Details, Object.assign({}, props))),
|
|
21601
|
-
props.showProgressBar && props.loading ? (index.h("sl-skeleton", { style: { margin: "0 16px", height: "12px" } })) : (props.showProgressBar && (index.h(ProgressBarView, Object.assign({}, props, { complete: taskComplete, expired: taskUnavailable })))),
|
|
21602
|
-
index.h("div", { class: sheet.classes.Footer }, props.loading ? (index.h("sl-skeleton", { style: { width: "25%", marginLeft: "auto", height: "12px" } })) : (index.h("div", { style: { display: "contents" } },
|
|
21603
|
-
index.h("span", { class: "text" },
|
|
21604
|
-
props.repeatable && (index.h("div", null,
|
|
21605
|
-
index.h("span", { class: repetitions > 0
|
|
21606
|
-
? taskUnavailable
|
|
21607
|
-
? "icon neutral"
|
|
21608
|
-
: "icon success"
|
|
21609
|
-
: "icon" }, arrow_left_right$1),
|
|
21610
|
-
index.h("span", { class: repetitions > 0
|
|
21611
|
-
? taskUnavailable
|
|
21612
|
-
? "neutral"
|
|
21613
|
-
: "success"
|
|
21614
|
-
: "" }, "Completed " + repetitions + " times"))),
|
|
21615
|
-
props.showExpiry && !taskUnavailable && (index.h("span", null, "Ends " + dateEnd.toLocaleString(luxon.DateTime.DATE_FULL)))),
|
|
21616
|
-
index.h("sl-button", { class: taskComplete || taskUnavailable ? "action disabled" : "action", type: "primary", size: "small", onClick: () => props.openNewTab
|
|
21617
|
-
? window.open(props.buttonLink)
|
|
21618
|
-
: window.open(props.buttonLink, "_self"), disabled: taskComplete || taskUnavailable }, props.buttonText)))))));
|
|
21619
|
-
}
|
|
21620
|
-
function Details(props) {
|
|
21621
|
-
const style = {
|
|
21622
|
-
Description: {
|
|
21623
|
-
"& input[type=checkbox]": {
|
|
21624
|
-
display: "none",
|
|
21625
|
-
},
|
|
21626
|
-
"& input:checked ~ .details": {
|
|
21627
|
-
transform: "rotate(-180deg)",
|
|
21628
|
-
},
|
|
21629
|
-
"& .details": {
|
|
21630
|
-
position: "absolute",
|
|
21631
|
-
top: "var(--sl-spacing-medium)",
|
|
21632
|
-
right: "var(--sl-spacing-medium)",
|
|
21633
|
-
color: "var(--sl-color-neutral-700)",
|
|
21634
|
-
fontSize: "var(--sl-font-size-large)",
|
|
21635
|
-
"& :hover": {
|
|
21636
|
-
color: "var(--sl-color-primary-700)",
|
|
19803
|
+
data: [
|
|
19804
|
+
{
|
|
19805
|
+
prettyValue: "19 Points",
|
|
19806
|
+
type: "CREDIT",
|
|
19807
|
+
fuelTankCode: "ABC",
|
|
19808
|
+
globalRewardKey: "Key",
|
|
19809
|
+
},
|
|
19810
|
+
],
|
|
21637
19811
|
},
|
|
21638
|
-
transformOrigin: "50% 37%",
|
|
21639
|
-
transition: "transform var(--sl-transition-medium) ease",
|
|
21640
19812
|
},
|
|
21641
|
-
|
|
21642
|
-
transition: "all var(--sl-transition-medium) ease",
|
|
21643
|
-
maxHeight: "300px",
|
|
21644
|
-
marginBottom: props.steps
|
|
21645
|
-
? "var(--sl-spacing-large)"
|
|
21646
|
-
: props.showProgressBar
|
|
21647
|
-
? "var(--sl-spacing-xx-large)"
|
|
21648
|
-
: "var(--sl-spacing-large)",
|
|
21649
|
-
},
|
|
21650
|
-
"& .summary": {
|
|
21651
|
-
display: "block",
|
|
21652
|
-
overflow: "hidden",
|
|
21653
|
-
fontSize: "var(--sl-font-size-small)",
|
|
21654
|
-
maxHeight: "0px",
|
|
21655
|
-
transition: "all var(--sl-transition-fast) ease-out",
|
|
21656
|
-
marginBottom: "var(--sl-spacing-medium)",
|
|
21657
|
-
},
|
|
21658
|
-
},
|
|
21659
|
-
};
|
|
21660
|
-
jssPresetDefault_esm.jss.setup(jssPresetDefault_esm.create());
|
|
21661
|
-
const sheet = jssPresetDefault_esm.jss.createStyleSheet(style);
|
|
21662
|
-
const styleString = sheet.toString();
|
|
21663
|
-
const rid = Math.random().toString(36).slice(2);
|
|
21664
|
-
return (index.h("div", null,
|
|
21665
|
-
index.h("style", { type: "text/css" }, styleString),
|
|
21666
|
-
index.h("span", { class: sheet.classes.Description },
|
|
21667
|
-
index.h("input", { type: "checkbox", id: "details-" + rid }),
|
|
21668
|
-
index.h("label", { class: "details", htmlFor: "details-" + rid },
|
|
21669
|
-
index.h("sl-icon", { name: "chevron-down" })),
|
|
21670
|
-
index.h("span", { class: "summary" }, props.description))));
|
|
21671
|
-
}
|
|
21672
|
-
|
|
21673
|
-
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 |";
|
|
21674
|
-
|
|
21675
|
-
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 |";
|
|
21676
|
-
|
|
21677
|
-
const scenario$5 = scenarioTaskCard + scenarioProgressBar;
|
|
21678
|
-
const TaskCard_stories = {
|
|
21679
|
-
title: "Components/Task Card/",
|
|
21680
|
-
parameters: {
|
|
21681
|
-
scenario: scenario$5,
|
|
19813
|
+
],
|
|
21682
19814
|
},
|
|
21683
19815
|
};
|
|
21684
|
-
const
|
|
21685
|
-
|
|
21686
|
-
|
|
21687
|
-
};
|
|
21688
|
-
|
|
21689
|
-
|
|
21690
|
-
|
|
21691
|
-
|
|
21692
|
-
|
|
21693
|
-
|
|
21694
|
-
|
|
21695
|
-
|
|
21696
|
-
|
|
21697
|
-
|
|
21698
|
-
|
|
21699
|
-
|
|
21700
|
-
|
|
21701
|
-
|
|
21702
|
-
progress: 0,
|
|
21703
|
-
goal: 1,
|
|
21704
|
-
buttonText: "Take survey",
|
|
21705
|
-
buttonLink: "https://example.com/",
|
|
21706
|
-
openNewTab: false,
|
|
21707
|
-
showExpiry: false,
|
|
21708
|
-
rewardDuration: null,
|
|
21709
|
-
loading: false,
|
|
21710
|
-
};
|
|
21711
|
-
const coupleActions = {
|
|
21712
|
-
rewardAmount: 40,
|
|
21713
|
-
rewardUnit: "SaaSquatch Points",
|
|
21714
|
-
cardTitle: "Comment on 5 articles",
|
|
21715
|
-
description: "Description of action and reward. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut eget quisque commodo leo.",
|
|
21716
|
-
repeatable: false,
|
|
21717
|
-
showProgressBar: true,
|
|
21718
|
-
steps: true,
|
|
21719
|
-
progress: 1,
|
|
21720
|
-
goal: 5,
|
|
21721
|
-
buttonText: "Take survey",
|
|
21722
|
-
buttonLink: "https://example.com/",
|
|
21723
|
-
openNewTab: false,
|
|
21724
|
-
showExpiry: false,
|
|
21725
|
-
rewardDuration: null,
|
|
21726
|
-
loading: false,
|
|
21727
|
-
};
|
|
21728
|
-
const manyActions = {
|
|
21729
|
-
rewardAmount: 150,
|
|
21730
|
-
rewardUnit: "SaaSquatch Points",
|
|
21731
|
-
cardTitle: "Spend $500 at our Store",
|
|
21732
|
-
description: "Description of action and reward. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut eget quisque commodo leo.",
|
|
21733
|
-
repeatable: false,
|
|
21734
|
-
showProgressBar: true,
|
|
21735
|
-
progress: 100,
|
|
21736
|
-
goal: 500,
|
|
21737
|
-
progressBarUnit: "$",
|
|
21738
|
-
buttonText: "Take survey",
|
|
21739
|
-
buttonLink: "https://example.com/",
|
|
21740
|
-
openNewTab: false,
|
|
21741
|
-
showExpiry: false,
|
|
21742
|
-
rewardDuration: null,
|
|
21743
|
-
loading: false,
|
|
21744
|
-
};
|
|
21745
|
-
const TaskCardNotRepeatable = () => {
|
|
21746
|
-
return (index.h("div", { style: storyFrame },
|
|
21747
|
-
index.h("div", { style: resizable },
|
|
21748
|
-
index.h("h4", null, "One Action"),
|
|
21749
|
-
index.h(TaskCardView, Object.assign({}, oneAction, { progress: 0 })),
|
|
21750
|
-
" ",
|
|
21751
|
-
index.h("h5", null),
|
|
21752
|
-
index.h(TaskCardView, Object.assign({}, oneAction, { progress: 1 })),
|
|
21753
|
-
" ",
|
|
21754
|
-
index.h("h5", null)),
|
|
21755
|
-
index.h("div", { style: resizable },
|
|
21756
|
-
index.h("h4", null, "A Couple Actions"),
|
|
21757
|
-
index.h(TaskCardView, Object.assign({}, coupleActions, { progress: 1 })),
|
|
21758
|
-
" ",
|
|
21759
|
-
index.h("h5", null),
|
|
21760
|
-
index.h(TaskCardView, Object.assign({}, coupleActions, { progress: 5 })),
|
|
21761
|
-
" ",
|
|
21762
|
-
index.h("h5", null)),
|
|
21763
|
-
index.h("div", { style: resizable },
|
|
21764
|
-
index.h("h4", null, "Many Actions"),
|
|
21765
|
-
index.h(TaskCardView, Object.assign({}, manyActions, { progress: 230 })),
|
|
21766
|
-
" ",
|
|
21767
|
-
index.h("h5", null),
|
|
21768
|
-
index.h(TaskCardView, Object.assign({}, manyActions, { progress: 500 })),
|
|
21769
|
-
" ",
|
|
21770
|
-
index.h("h5", null))));
|
|
21771
|
-
};
|
|
21772
|
-
const TaskCardRepeatable = () => {
|
|
21773
|
-
return (index.h("div", { style: storyFrame },
|
|
21774
|
-
index.h("div", { style: resizable },
|
|
21775
|
-
index.h("h4", null, "One Action"),
|
|
21776
|
-
index.h(TaskCardView, Object.assign({}, oneAction, { progress: 0, repeatable: true })),
|
|
21777
|
-
" ",
|
|
21778
|
-
index.h("h5", null),
|
|
21779
|
-
index.h(TaskCardView, Object.assign({}, oneAction, { progress: 1, repeatable: true })),
|
|
21780
|
-
" ",
|
|
21781
|
-
index.h("h5", null)),
|
|
21782
|
-
index.h("div", { style: resizable },
|
|
21783
|
-
index.h("h4", null, "A Couple Actions"),
|
|
21784
|
-
index.h(TaskCardView, Object.assign({}, coupleActions, { progress: 1, repeatable: true })),
|
|
21785
|
-
index.h("h5", null),
|
|
21786
|
-
index.h(TaskCardView, Object.assign({}, coupleActions, { progress: 5, repeatable: true })),
|
|
21787
|
-
index.h("h5", null),
|
|
21788
|
-
index.h(TaskCardView, Object.assign({}, coupleActions, { progress: 7, repeatable: true })),
|
|
21789
|
-
index.h("h5", null),
|
|
21790
|
-
index.h(TaskCardView, Object.assign({}, coupleActions, { progress: 10, repeatable: true })),
|
|
21791
|
-
index.h("h5", null)),
|
|
21792
|
-
index.h("div", { style: resizable },
|
|
21793
|
-
index.h("h4", null, "Many Actions"),
|
|
21794
|
-
index.h(TaskCardView, Object.assign({}, manyActions, { progress: 100, repeatable: true })),
|
|
21795
|
-
index.h("h5", null),
|
|
21796
|
-
index.h(TaskCardView, Object.assign({}, manyActions, { progress: 500, repeatable: true })),
|
|
21797
|
-
index.h("h5", null),
|
|
21798
|
-
index.h(TaskCardView, Object.assign({}, manyActions, { progress: 650, repeatable: true })),
|
|
21799
|
-
index.h("h5", null),
|
|
21800
|
-
index.h(TaskCardView, Object.assign({}, manyActions, { progress: 1000, repeatable: true })),
|
|
21801
|
-
index.h("h5", null))));
|
|
21802
|
-
};
|
|
21803
|
-
const TaskCardEndDate = () => {
|
|
21804
|
-
const expire = {
|
|
21805
|
-
showExpiry: true,
|
|
21806
|
-
rewardDuration: "2021-12-01T08:00:00.000Z/2077-12-01T08:00:00.000Z",
|
|
21807
|
-
};
|
|
21808
|
-
const expireRepeat = { ...expire, repeatable: true };
|
|
21809
|
-
return (index.h("div", { style: storyFrame },
|
|
21810
|
-
index.h("div", { style: resizable },
|
|
21811
|
-
index.h("h4", null, "One Action"),
|
|
21812
|
-
index.h(TaskCardView, Object.assign({}, oneAction, expire)),
|
|
21813
|
-
" ",
|
|
21814
|
-
index.h("h5", null),
|
|
21815
|
-
index.h(TaskCardView, Object.assign({}, oneAction, expireRepeat)),
|
|
21816
|
-
" ",
|
|
21817
|
-
index.h("h5", null)),
|
|
21818
|
-
index.h("div", { style: resizable },
|
|
21819
|
-
index.h("h4", null, "A Couple Actions"),
|
|
21820
|
-
index.h(TaskCardView, Object.assign({}, coupleActions, expire)),
|
|
21821
|
-
" ",
|
|
21822
|
-
index.h("h5", null),
|
|
21823
|
-
index.h(TaskCardView, Object.assign({}, coupleActions, expireRepeat)),
|
|
21824
|
-
" ",
|
|
21825
|
-
index.h("h5", null)),
|
|
21826
|
-
index.h("div", { style: resizable },
|
|
21827
|
-
index.h("h4", null, "Many Actions"),
|
|
21828
|
-
index.h(TaskCardView, Object.assign({}, manyActions, expire)),
|
|
21829
|
-
" ",
|
|
21830
|
-
index.h("h5", null),
|
|
21831
|
-
index.h(TaskCardView, Object.assign({}, manyActions, expireRepeat)),
|
|
21832
|
-
" ",
|
|
21833
|
-
index.h("h5", null))));
|
|
21834
|
-
};
|
|
21835
|
-
const TaskCardLoading = () => {
|
|
21836
|
-
const loading = { loading: true };
|
|
21837
|
-
return (index.h("div", { style: storyFrame },
|
|
21838
|
-
index.h("div", { style: resizable },
|
|
21839
|
-
index.h("h4", null, "One Action"),
|
|
21840
|
-
index.h(TaskCardView, Object.assign({}, oneAction, loading)),
|
|
21841
|
-
" ",
|
|
21842
|
-
index.h("h5", null),
|
|
21843
|
-
index.h(TaskCardView, Object.assign({}, oneAction, loading)),
|
|
21844
|
-
" ",
|
|
21845
|
-
index.h("h5", null)),
|
|
21846
|
-
index.h("div", { style: resizable },
|
|
21847
|
-
index.h("h4", null, "A Couple Actions"),
|
|
21848
|
-
index.h(TaskCardView, Object.assign({}, coupleActions, loading)),
|
|
21849
|
-
" ",
|
|
21850
|
-
index.h("h5", null),
|
|
21851
|
-
index.h(TaskCardView, Object.assign({}, coupleActions, loading)),
|
|
21852
|
-
" ",
|
|
21853
|
-
index.h("h5", null)),
|
|
21854
|
-
index.h("div", { style: resizable },
|
|
21855
|
-
index.h("h4", null, "Many Actions"),
|
|
21856
|
-
index.h(TaskCardView, Object.assign({}, manyActions, loading)),
|
|
21857
|
-
" ",
|
|
21858
|
-
index.h("h5", null),
|
|
21859
|
-
index.h(TaskCardView, Object.assign({}, manyActions, loading)),
|
|
21860
|
-
" ",
|
|
21861
|
-
index.h("h5", null))));
|
|
19816
|
+
const rewards = [rewardsData];
|
|
19817
|
+
const RewardsCell = () => {
|
|
19818
|
+
return (index.h("sqm-referral-table-rewards-cell", { rewards: rewards }));
|
|
19819
|
+
};
|
|
19820
|
+
|
|
19821
|
+
const ReferralTableCell$1 = /*#__PURE__*/Object.freeze({
|
|
19822
|
+
__proto__: null,
|
|
19823
|
+
'default': ReferralTableCell_stories,
|
|
19824
|
+
TableCell: TableCell,
|
|
19825
|
+
TableUserCell: TableUserCell,
|
|
19826
|
+
EmptyCell: EmptyCell$1,
|
|
19827
|
+
StatusCell: StatusCell,
|
|
19828
|
+
DateCell: DateCell,
|
|
19829
|
+
RewardsCell: RewardsCell
|
|
19830
|
+
});
|
|
19831
|
+
|
|
19832
|
+
const UserName_stories = {
|
|
19833
|
+
title: "User Name",
|
|
21862
19834
|
};
|
|
21863
|
-
const
|
|
21864
|
-
|
|
21865
|
-
|
|
21866
|
-
|
|
21867
|
-
|
|
21868
|
-
|
|
21869
|
-
return (index.h("div", { style: storyFrame },
|
|
21870
|
-
index.h("div", { style: resizable },
|
|
21871
|
-
index.h("h4", null, "One Action"),
|
|
21872
|
-
index.h(TaskCardView, Object.assign({}, oneAction, { progress: 0 }, expire)),
|
|
21873
|
-
" ",
|
|
21874
|
-
index.h("h5", null),
|
|
21875
|
-
index.h(TaskCardView, Object.assign({}, oneAction, { progress: 1 }, expire)),
|
|
21876
|
-
" ",
|
|
21877
|
-
index.h("h5", null),
|
|
21878
|
-
index.h(TaskCardView, Object.assign({}, oneAction, { progress: 0 }, expireRepeat)),
|
|
21879
|
-
" ",
|
|
21880
|
-
index.h("h5", null),
|
|
21881
|
-
index.h(TaskCardView, Object.assign({}, oneAction, { progress: 1 }, expireRepeat)),
|
|
21882
|
-
" ",
|
|
21883
|
-
index.h("h5", null)),
|
|
21884
|
-
index.h("div", { style: resizable },
|
|
21885
|
-
index.h("h4", null, "A Couple Actions"),
|
|
21886
|
-
index.h(TaskCardView, Object.assign({}, coupleActions, { progress: 1 }, expire)),
|
|
21887
|
-
" ",
|
|
21888
|
-
index.h("h5", null),
|
|
21889
|
-
index.h(TaskCardView, Object.assign({}, coupleActions, { progress: 5 }, expire)),
|
|
21890
|
-
" ",
|
|
21891
|
-
index.h("h5", null),
|
|
21892
|
-
index.h(TaskCardView, Object.assign({}, coupleActions, { progress: 1 }, expireRepeat)),
|
|
21893
|
-
index.h("h5", null),
|
|
21894
|
-
index.h(TaskCardView, Object.assign({}, coupleActions, { progress: 5 }, expireRepeat)),
|
|
21895
|
-
index.h("h5", null)),
|
|
21896
|
-
index.h("div", { style: resizable },
|
|
21897
|
-
index.h("h4", null, "Many Actions"),
|
|
21898
|
-
index.h(TaskCardView, Object.assign({}, manyActions, { progress: 100 }, expire)),
|
|
21899
|
-
" ",
|
|
21900
|
-
index.h("h5", null),
|
|
21901
|
-
index.h(TaskCardView, Object.assign({}, manyActions, { progress: 500 }, expire)),
|
|
21902
|
-
" ",
|
|
21903
|
-
index.h("h5", null),
|
|
21904
|
-
index.h(TaskCardView, Object.assign({}, manyActions, { progress: 100 }, expireRepeat)),
|
|
21905
|
-
index.h("h5", null),
|
|
21906
|
-
index.h(TaskCardView, Object.assign({}, manyActions, { progress: 500 }, expireRepeat)),
|
|
21907
|
-
index.h("h5", null))));
|
|
19835
|
+
const FullStack$1 = () => {
|
|
19836
|
+
return (index.h("sqm-user-name", { demoData: {
|
|
19837
|
+
loading: false,
|
|
19838
|
+
loadingText: "...",
|
|
19839
|
+
username: "Test Testerson",
|
|
19840
|
+
} }));
|
|
21908
19841
|
};
|
|
21909
|
-
const
|
|
21910
|
-
|
|
21911
|
-
|
|
21912
|
-
|
|
21913
|
-
|
|
21914
|
-
|
|
21915
|
-
|
|
21916
|
-
|
|
19842
|
+
const FullStackDefault = () => {
|
|
19843
|
+
return index.h("sqm-user-name", null);
|
|
19844
|
+
};
|
|
19845
|
+
|
|
19846
|
+
const UserName = /*#__PURE__*/Object.freeze({
|
|
19847
|
+
__proto__: null,
|
|
19848
|
+
'default': UserName_stories,
|
|
19849
|
+
FullStack: FullStack$1,
|
|
19850
|
+
FullStackDefault: FullStackDefault
|
|
19851
|
+
});
|
|
19852
|
+
|
|
19853
|
+
const PasswordField_stories = {
|
|
19854
|
+
title: "Portal Password Field",
|
|
21917
19855
|
};
|
|
21918
|
-
const
|
|
21919
|
-
|
|
21920
|
-
|
|
21921
|
-
|
|
21922
|
-
|
|
21923
|
-
|
|
21924
|
-
|
|
21925
|
-
|
|
21926
|
-
|
|
19856
|
+
const Start = () => {
|
|
19857
|
+
return (index.h("sqm-password-field", { demoData: {
|
|
19858
|
+
initValue: "",
|
|
19859
|
+
states: {
|
|
19860
|
+
enableValidation: true,
|
|
19861
|
+
validationErrors: {},
|
|
19862
|
+
content: {
|
|
19863
|
+
fieldLabel: "Password",
|
|
19864
|
+
},
|
|
19865
|
+
},
|
|
19866
|
+
} }));
|
|
21927
19867
|
};
|
|
21928
|
-
const
|
|
21929
|
-
|
|
21930
|
-
|
|
21931
|
-
|
|
21932
|
-
|
|
21933
|
-
|
|
21934
|
-
|
|
21935
|
-
|
|
21936
|
-
|
|
19868
|
+
const EmptyError = () => {
|
|
19869
|
+
return (index.h("sqm-password-field", { demoData: {
|
|
19870
|
+
initValue: "",
|
|
19871
|
+
states: {
|
|
19872
|
+
enableValidation: true,
|
|
19873
|
+
validationErrors: { password: "Cannot be empty" },
|
|
19874
|
+
content: {
|
|
19875
|
+
fieldLabel: "Password",
|
|
19876
|
+
},
|
|
19877
|
+
},
|
|
19878
|
+
} }));
|
|
21937
19879
|
};
|
|
21938
|
-
const
|
|
21939
|
-
|
|
21940
|
-
|
|
21941
|
-
|
|
21942
|
-
|
|
21943
|
-
|
|
21944
|
-
|
|
21945
|
-
|
|
21946
|
-
|
|
21947
|
-
|
|
19880
|
+
const ValidationError = () => {
|
|
19881
|
+
return (index.h("sqm-password-field", { demoData: {
|
|
19882
|
+
initValue: "asdf",
|
|
19883
|
+
states: {
|
|
19884
|
+
enableValidation: true,
|
|
19885
|
+
validationErrors: { password: "Incomplete" },
|
|
19886
|
+
content: {
|
|
19887
|
+
fieldLabel: "Password",
|
|
19888
|
+
},
|
|
19889
|
+
},
|
|
19890
|
+
} }));
|
|
21948
19891
|
};
|
|
21949
19892
|
|
|
21950
|
-
const
|
|
19893
|
+
const PasswordField = /*#__PURE__*/Object.freeze({
|
|
21951
19894
|
__proto__: null,
|
|
21952
|
-
'default':
|
|
21953
|
-
|
|
21954
|
-
|
|
21955
|
-
|
|
21956
|
-
TaskCardLoading: TaskCardLoading,
|
|
21957
|
-
TaskCardUnavailable: TaskCardUnavailable,
|
|
21958
|
-
ProgressBar: ProgressBar$1,
|
|
21959
|
-
ProgressBarSteps: ProgressBarSteps,
|
|
21960
|
-
ProgressBarRepeatable: ProgressBarRepeatable,
|
|
21961
|
-
ProgressBarStepsRepeatable: ProgressBarStepsRepeatable
|
|
19895
|
+
'default': PasswordField_stories,
|
|
19896
|
+
Start: Start,
|
|
19897
|
+
EmptyError: EmptyError,
|
|
19898
|
+
ValidationError: ValidationError
|
|
21962
19899
|
});
|
|
21963
19900
|
|
|
21964
19901
|
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";
|
|
@@ -24967,21 +22904,21 @@ var marked = _extends.createCommonjsModule(function (module, exports) {
|
|
|
24967
22904
|
})));
|
|
24968
22905
|
});
|
|
24969
22906
|
|
|
24970
|
-
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
|
|
22907
|
+
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";
|
|
24971
22908
|
|
|
24972
22909
|
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";
|
|
24973
22910
|
|
|
24974
|
-
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
|
|
22911
|
+
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";
|
|
24975
22912
|
|
|
24976
|
-
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
|
|
22913
|
+
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";
|
|
24977
22914
|
|
|
24978
22915
|
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";
|
|
24979
22916
|
|
|
24980
|
-
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
|
|
22917
|
+
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";
|
|
24981
22918
|
|
|
24982
|
-
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
|
|
22919
|
+
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";
|
|
24983
22920
|
|
|
24984
|
-
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
|
|
22921
|
+
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";
|
|
24985
22922
|
|
|
24986
22923
|
const PortalTemplates_stories = {
|
|
24987
22924
|
title: "Templates / Portal",
|
|
@@ -25028,16 +22965,16 @@ function DefaultTemplateView(props) {
|
|
|
25028
22965
|
gridTemplateColumns: "repeat(9, 80px)",
|
|
25029
22966
|
gridGap: "10px",
|
|
25030
22967
|
} },
|
|
25031
|
-
index.h("button", { onClick: () => index_module.
|
|
25032
|
-
props.leadSubmit && (index.h("button", { onClick: () => index_module.
|
|
25033
|
-
index.h("button", { onClick: () => index_module.
|
|
25034
|
-
index.h("button", { onClick: () => index_module.
|
|
25035
|
-
index.h("button", { onClick: () => index_module.
|
|
25036
|
-
index.h("button", { onClick: () => index_module.
|
|
25037
|
-
index.h("button", { onClick: () => index_module.
|
|
25038
|
-
index.h("button", { onClick: () => index_module.
|
|
25039
|
-
index.h("button", { onClick: () => index_module.
|
|
25040
|
-
index.h("button", { onClick: () => index_module.
|
|
22968
|
+
index.h("button", { onClick: () => index_module.mn.push("/") }, "Dashboard"),
|
|
22969
|
+
props.leadSubmit && (index.h("button", { onClick: () => index_module.mn.push("/refer") }, "Submit a Referral")),
|
|
22970
|
+
index.h("button", { onClick: () => index_module.mn.push("/activity") }, "Activity"),
|
|
22971
|
+
index.h("button", { onClick: () => index_module.mn.push("/editProfile") }, "Edit Profile"),
|
|
22972
|
+
index.h("button", { onClick: () => index_module.mn.push("/login") }, "Login"),
|
|
22973
|
+
index.h("button", { onClick: () => index_module.mn.push("/register") }, "Register"),
|
|
22974
|
+
index.h("button", { onClick: () => index_module.mn.push("/emailVerification") }, "Email Verification"),
|
|
22975
|
+
index.h("button", { onClick: () => index_module.mn.push("/verifyEmail") }, "Verify Email"),
|
|
22976
|
+
index.h("button", { onClick: () => index_module.mn.push("/forgotPassword") }, "Forgot Password"),
|
|
22977
|
+
index.h("button", { onClick: () => index_module.mn.push("/resetPassword") }, "Reset Password")),
|
|
25041
22978
|
index.h("br", null),
|
|
25042
22979
|
index.h("div", { innerHTML: states.previewTemplate })));
|
|
25043
22980
|
}
|
|
@@ -25197,12 +23134,12 @@ const PoweredByImg = /*#__PURE__*/Object.freeze({
|
|
|
25197
23134
|
CustomWidthAndHeight: CustomWidthAndHeight
|
|
25198
23135
|
});
|
|
25199
23136
|
|
|
25200
|
-
const scenario$
|
|
23137
|
+
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";
|
|
25201
23138
|
|
|
25202
23139
|
const PortalFooter_stories = {
|
|
25203
23140
|
title: "Portal Footer",
|
|
25204
23141
|
parameters: {
|
|
25205
|
-
scenario: scenario$
|
|
23142
|
+
scenario: scenario$5,
|
|
25206
23143
|
},
|
|
25207
23144
|
};
|
|
25208
23145
|
const defaultProps$9 = {
|
|
@@ -25231,12 +23168,12 @@ const PortalFooter = /*#__PURE__*/Object.freeze({
|
|
|
25231
23168
|
FooterNoPoweredBy: FooterNoPoweredBy
|
|
25232
23169
|
});
|
|
25233
23170
|
|
|
25234
|
-
const scenario$
|
|
23171
|
+
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 |";
|
|
25235
23172
|
|
|
25236
23173
|
const Hero_stories = {
|
|
25237
23174
|
title: "Hero Layout",
|
|
25238
23175
|
parameters: {
|
|
25239
|
-
scenario: scenario$
|
|
23176
|
+
scenario: scenario$6,
|
|
25240
23177
|
},
|
|
25241
23178
|
};
|
|
25242
23179
|
const LoginOneColumn = () => {
|
|
@@ -25413,12 +23350,12 @@ const Hero = /*#__PURE__*/Object.freeze({
|
|
|
25413
23350
|
TwoColumnLoginWithImgElement: TwoColumnLoginWithImgElement
|
|
25414
23351
|
});
|
|
25415
23352
|
|
|
25416
|
-
const scenario$
|
|
23353
|
+
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 | |";
|
|
25417
23354
|
|
|
25418
23355
|
const ReferralIframe_stories = {
|
|
25419
23356
|
title: "Referral Iframe",
|
|
25420
23357
|
parameters: {
|
|
25421
|
-
scenario: scenario$
|
|
23358
|
+
scenario: scenario$7,
|
|
25422
23359
|
},
|
|
25423
23360
|
};
|
|
25424
23361
|
const props = {
|
|
@@ -25449,12 +23386,12 @@ const ReferralIframe$1 = /*#__PURE__*/Object.freeze({
|
|
|
25449
23386
|
ReferralIframeError: ReferralIframeError
|
|
25450
23387
|
});
|
|
25451
23388
|
|
|
25452
|
-
const scenario$
|
|
23389
|
+
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";
|
|
25453
23390
|
|
|
25454
23391
|
const NameFields_stories = {
|
|
25455
23392
|
title: "Name Fields",
|
|
25456
23393
|
parameters: {
|
|
25457
|
-
scenario: scenario$
|
|
23394
|
+
scenario: scenario$8,
|
|
25458
23395
|
},
|
|
25459
23396
|
};
|
|
25460
23397
|
const props$1 = {
|
|
@@ -25492,279 +23429,6 @@ const NameFields$1 = /*#__PURE__*/Object.freeze({
|
|
|
25492
23429
|
NameFieldsWithErrors: NameFieldsWithErrors
|
|
25493
23430
|
});
|
|
25494
23431
|
|
|
25495
|
-
const baseResponse = (data, selected = null) => ({
|
|
25496
|
-
states: {
|
|
25497
|
-
content: {
|
|
25498
|
-
text: {
|
|
25499
|
-
notAvailableError: "{unavailableReason, select, US_TAX {US Tax limit} INSUFFICIENT_REDEEMABLE_CREDIT {Not enough points} other {Not available} }",
|
|
25500
|
-
},
|
|
25501
|
-
},
|
|
25502
|
-
redeemStage: "chooseReward",
|
|
25503
|
-
amount: 0,
|
|
25504
|
-
exchangeError: false,
|
|
25505
|
-
loading: false,
|
|
25506
|
-
selectedItem: selected,
|
|
25507
|
-
selectedStep: null,
|
|
25508
|
-
},
|
|
25509
|
-
data: {
|
|
25510
|
-
exchangeList: data,
|
|
25511
|
-
},
|
|
25512
|
-
callbacks: {
|
|
25513
|
-
exchangeReward: null,
|
|
25514
|
-
resetState: null,
|
|
25515
|
-
setStage: null,
|
|
25516
|
-
setExchangeState: null,
|
|
25517
|
-
refs: null,
|
|
25518
|
-
},
|
|
25519
|
-
refs: null,
|
|
25520
|
-
});
|
|
25521
|
-
const baseReward$2 = {
|
|
25522
|
-
key: "",
|
|
25523
|
-
name: "",
|
|
25524
|
-
description: "",
|
|
25525
|
-
imageUrl: "",
|
|
25526
|
-
available: true,
|
|
25527
|
-
unavailableReason: null,
|
|
25528
|
-
unavailableReasonCode: null,
|
|
25529
|
-
ruleType: "FIXED_GLOBAL_REWARD",
|
|
25530
|
-
sourceUnit: "POINT",
|
|
25531
|
-
sourceValue: 10,
|
|
25532
|
-
prettySourceValue: "10 SaaSquatch Points",
|
|
25533
|
-
sourceMinValue: null,
|
|
25534
|
-
prettySourceMinValue: null,
|
|
25535
|
-
sourceMaxValue: null,
|
|
25536
|
-
prettySourceMaxValue: null,
|
|
25537
|
-
destinationMinValue: null,
|
|
25538
|
-
prettyDestinationMinValue: null,
|
|
25539
|
-
destinationMaxValue: null,
|
|
25540
|
-
prettyDestinationMaxValue: null,
|
|
25541
|
-
globalRewardKey: "",
|
|
25542
|
-
destinationUnit: null,
|
|
25543
|
-
steps: [],
|
|
25544
|
-
};
|
|
25545
|
-
const notEnoughPoints = {
|
|
25546
|
-
available: false,
|
|
25547
|
-
unavailableReasonCode: "INSUFFICIENT_REDEEMABLE_CREDIT",
|
|
25548
|
-
};
|
|
25549
|
-
const usTax = {
|
|
25550
|
-
available: false,
|
|
25551
|
-
unavailableReasonCode: "US_TAX",
|
|
25552
|
-
};
|
|
25553
|
-
const selected = {
|
|
25554
|
-
key: "r1",
|
|
25555
|
-
};
|
|
25556
|
-
const imageUrl = (props) => ({
|
|
25557
|
-
imageUrl: props,
|
|
25558
|
-
});
|
|
25559
|
-
const description = (props) => ({
|
|
25560
|
-
description: props,
|
|
25561
|
-
});
|
|
25562
|
-
const fixedValue = (props) => ({
|
|
25563
|
-
prettySourceValue: props,
|
|
25564
|
-
});
|
|
25565
|
-
const variableValue = (min, max, text) => ({
|
|
25566
|
-
ruleType: "VARIABLE_CREDIT_REWARD",
|
|
25567
|
-
sourceMinValue: min,
|
|
25568
|
-
prettySourceMinValue: min + " " + text,
|
|
25569
|
-
sourceMaxValue: max,
|
|
25570
|
-
prettySourceMaxValue: max + " " + text,
|
|
25571
|
-
});
|
|
25572
|
-
const data = [
|
|
25573
|
-
{
|
|
25574
|
-
...baseReward$2,
|
|
25575
|
-
...description("Free swag with a promo code"),
|
|
25576
|
-
...imageUrl("https://i.imgur.com/Ds7M19I.png"),
|
|
25577
|
-
...fixedValue("40 SaaSquatch Points"),
|
|
25578
|
-
},
|
|
25579
|
-
{
|
|
25580
|
-
...baseReward$2,
|
|
25581
|
-
...selected,
|
|
25582
|
-
...description("Visa® Prepaid Card USD"),
|
|
25583
|
-
...imageUrl("https://i.imgur.com/4s3q2zz.png"),
|
|
25584
|
-
...variableValue(20, 80, "SaaSquatch Points"),
|
|
25585
|
-
},
|
|
25586
|
-
{
|
|
25587
|
-
...baseReward$2,
|
|
25588
|
-
...description("A very exclusive gift box"),
|
|
25589
|
-
...imageUrl("https://i.imgur.com/XuiJi4l.png"),
|
|
25590
|
-
...fixedValue("30 SaaSquatch Points"),
|
|
25591
|
-
},
|
|
25592
|
-
{
|
|
25593
|
-
...baseReward$2,
|
|
25594
|
-
...description("$50 Store credit"),
|
|
25595
|
-
...imageUrl("https://i.imgur.com/WkCMVSE.png"),
|
|
25596
|
-
...fixedValue("100 SaaSquatch Points"),
|
|
25597
|
-
},
|
|
25598
|
-
{
|
|
25599
|
-
...baseReward$2,
|
|
25600
|
-
...description("Variable amount of store credit"),
|
|
25601
|
-
...imageUrl("https://i.imgur.com/Jn2fE0s.png"),
|
|
25602
|
-
...variableValue(20, 100, "SaaSquatch Points"),
|
|
25603
|
-
},
|
|
25604
|
-
{
|
|
25605
|
-
...baseReward$2,
|
|
25606
|
-
...notEnoughPoints,
|
|
25607
|
-
...description("A very rare cactus"),
|
|
25608
|
-
...imageUrl("https://i.imgur.com/CvCdpXc.png"),
|
|
25609
|
-
...fixedValue("2000 SaaSquatch Points"),
|
|
25610
|
-
},
|
|
25611
|
-
{
|
|
25612
|
-
...baseReward$2,
|
|
25613
|
-
...usTax,
|
|
25614
|
-
...description("$1000 Store credit"),
|
|
25615
|
-
...imageUrl("https://i.imgur.com/I9FCh9Z.png"),
|
|
25616
|
-
...fixedValue("2000 SaaSquatch Points"),
|
|
25617
|
-
},
|
|
25618
|
-
{
|
|
25619
|
-
...baseReward$2,
|
|
25620
|
-
...notEnoughPoints,
|
|
25621
|
-
...description("A holiday gift box"),
|
|
25622
|
-
...imageUrl("https://i.imgur.com/HBJS1WH.png"),
|
|
25623
|
-
...fixedValue("100 SaaSquatch Points"),
|
|
25624
|
-
},
|
|
25625
|
-
];
|
|
25626
|
-
const rewardExchange = {
|
|
25627
|
-
...baseResponse(data),
|
|
25628
|
-
};
|
|
25629
|
-
const rewardExchangeSelected = {
|
|
25630
|
-
...baseResponse(data, {
|
|
25631
|
-
...baseReward$2,
|
|
25632
|
-
...selected,
|
|
25633
|
-
...description("Visa® Prepaid Card USD"),
|
|
25634
|
-
...imageUrl("https://i.imgur.com/4s3q2zz.png"),
|
|
25635
|
-
...variableValue(20, 80, "SaaSquatch Points"),
|
|
25636
|
-
}),
|
|
25637
|
-
};
|
|
25638
|
-
const test2 = {
|
|
25639
|
-
states: {
|
|
25640
|
-
content: {
|
|
25641
|
-
text: {
|
|
25642
|
-
buttonText: "Exchange Rewards",
|
|
25643
|
-
ignored: true,
|
|
25644
|
-
},
|
|
25645
|
-
},
|
|
25646
|
-
redeemStage: "chooseAmount",
|
|
25647
|
-
amount: 0,
|
|
25648
|
-
exchangeError: false,
|
|
25649
|
-
loading: false,
|
|
25650
|
-
selectedItem: {
|
|
25651
|
-
key: "r4",
|
|
25652
|
-
name: "Salmon Coins",
|
|
25653
|
-
description: "Points for Salmon Coins",
|
|
25654
|
-
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",
|
|
25655
|
-
available: true,
|
|
25656
|
-
unavailableReason: null,
|
|
25657
|
-
unavailableReasonCode: null,
|
|
25658
|
-
ruleType: "VARIABLE_CREDIT_REWARD",
|
|
25659
|
-
sourceUnit: "POINT",
|
|
25660
|
-
sourceValue: null,
|
|
25661
|
-
prettySourceValue: null,
|
|
25662
|
-
sourceMinValue: 1,
|
|
25663
|
-
prettySourceMinValue: "1 Point",
|
|
25664
|
-
sourceMaxValue: 100,
|
|
25665
|
-
prettySourceMaxValue: "100 Points",
|
|
25666
|
-
destinationMinValue: 1,
|
|
25667
|
-
prettyDestinationMinValue: "1 Salmon Coin",
|
|
25668
|
-
destinationMaxValue: 100,
|
|
25669
|
-
prettyDestinationMaxValue: "100 Salmons",
|
|
25670
|
-
globalRewardKey: null,
|
|
25671
|
-
destinationUnit: "TESTUNIT",
|
|
25672
|
-
steps: [
|
|
25673
|
-
{
|
|
25674
|
-
sourceValue: 1,
|
|
25675
|
-
prettySourceValue: "1 Point",
|
|
25676
|
-
destinationValue: 1,
|
|
25677
|
-
prettyDestinationValue: "1 Salmon Coin",
|
|
25678
|
-
available: true,
|
|
25679
|
-
unavailableReasonCode: null,
|
|
25680
|
-
unavailableReason: "",
|
|
25681
|
-
},
|
|
25682
|
-
{
|
|
25683
|
-
sourceValue: 2,
|
|
25684
|
-
prettySourceValue: "2 Points",
|
|
25685
|
-
destinationValue: 2,
|
|
25686
|
-
prettyDestinationValue: "2 Salmons",
|
|
25687
|
-
available: true,
|
|
25688
|
-
unavailableReasonCode: null,
|
|
25689
|
-
unavailableReason: "",
|
|
25690
|
-
},
|
|
25691
|
-
{
|
|
25692
|
-
sourceValue: 3,
|
|
25693
|
-
prettySourceValue: "3 Points",
|
|
25694
|
-
destinationValue: 3,
|
|
25695
|
-
prettyDestinationValue: "3 Salmons",
|
|
25696
|
-
available: true,
|
|
25697
|
-
unavailableReasonCode: null,
|
|
25698
|
-
unavailableReason: "",
|
|
25699
|
-
},
|
|
25700
|
-
{
|
|
25701
|
-
sourceValue: 4,
|
|
25702
|
-
prettySourceValue: "4 Points",
|
|
25703
|
-
destinationValue: 4,
|
|
25704
|
-
prettyDestinationValue: "4 Salmons",
|
|
25705
|
-
available: true,
|
|
25706
|
-
unavailableReasonCode: null,
|
|
25707
|
-
unavailableReason: "",
|
|
25708
|
-
},
|
|
25709
|
-
{
|
|
25710
|
-
sourceValue: 5,
|
|
25711
|
-
prettySourceValue: "5 Points",
|
|
25712
|
-
destinationValue: 5,
|
|
25713
|
-
prettyDestinationValue: "5 Salmons",
|
|
25714
|
-
available: true,
|
|
25715
|
-
unavailableReasonCode: null,
|
|
25716
|
-
unavailableReason: "",
|
|
25717
|
-
},
|
|
25718
|
-
],
|
|
25719
|
-
},
|
|
25720
|
-
selectedStep: null,
|
|
25721
|
-
},
|
|
25722
|
-
data: {
|
|
25723
|
-
exchangeList: null,
|
|
25724
|
-
},
|
|
25725
|
-
callbacks: {
|
|
25726
|
-
exchangeReward: null,
|
|
25727
|
-
resetState: null,
|
|
25728
|
-
setStage: null,
|
|
25729
|
-
setExchangeState: null,
|
|
25730
|
-
refs: {
|
|
25731
|
-
drawerRef: {},
|
|
25732
|
-
},
|
|
25733
|
-
},
|
|
25734
|
-
refs: null,
|
|
25735
|
-
};
|
|
25736
|
-
|
|
25737
|
-
const RewardExchangeList_stories = {
|
|
25738
|
-
title: "Components/Reward Exchange List",
|
|
25739
|
-
};
|
|
25740
|
-
const resizable$1 = {
|
|
25741
|
-
width: "683px",
|
|
25742
|
-
minWidth: "260px",
|
|
25743
|
-
resize: "horizontal",
|
|
25744
|
-
height: "fit-content",
|
|
25745
|
-
overflow: "hidden",
|
|
25746
|
-
};
|
|
25747
|
-
const rewardExchange$1 = () => {
|
|
25748
|
-
return (index.h("div", { style: resizable$1 },
|
|
25749
|
-
index.h(RewardExchangeView, Object.assign({}, rewardExchange))));
|
|
25750
|
-
};
|
|
25751
|
-
const rewardExchangeSelected$1 = () => {
|
|
25752
|
-
return (index.h("div", { style: resizable$1 },
|
|
25753
|
-
index.h(RewardExchangeView, Object.assign({}, rewardExchangeSelected))));
|
|
25754
|
-
};
|
|
25755
|
-
const Default2 = () => {
|
|
25756
|
-
return (index.h("div", { style: { ...resizable$1, height: "700px" } },
|
|
25757
|
-
index.h(RewardExchangeView, Object.assign({}, test2))));
|
|
25758
|
-
};
|
|
25759
|
-
|
|
25760
|
-
const RewardExchangeList = /*#__PURE__*/Object.freeze({
|
|
25761
|
-
__proto__: null,
|
|
25762
|
-
'default': RewardExchangeList_stories,
|
|
25763
|
-
rewardExchange: rewardExchange$1,
|
|
25764
|
-
rewardExchangeSelected: rewardExchangeSelected$1,
|
|
25765
|
-
Default2: Default2
|
|
25766
|
-
});
|
|
25767
|
-
|
|
25768
23432
|
function deepFreeze(obj) {
|
|
25769
23433
|
if (obj instanceof Map) {
|
|
25770
23434
|
obj.clear = obj.delete = obj.set = function () {
|
|
@@ -28345,9 +26009,7 @@ const CucumberAddon = ({ story }, children) => {
|
|
|
28345
26009
|
// No scenario or invalid. Ignoring.
|
|
28346
26010
|
}
|
|
28347
26011
|
return (index.h("div", null,
|
|
28348
|
-
index.h("
|
|
28349
|
-
index.h("summary", null, "Specs"),
|
|
28350
|
-
result && index.h("pre", { innerHTML: result.value })),
|
|
26012
|
+
result && index.h("pre", { innerHTML: result.value }),
|
|
28351
26013
|
children));
|
|
28352
26014
|
};
|
|
28353
26015
|
|
|
@@ -28384,7 +26046,6 @@ const stories = [
|
|
|
28384
26046
|
ReferralTableRewardsCell$1,
|
|
28385
26047
|
UserName,
|
|
28386
26048
|
PasswordField,
|
|
28387
|
-
TaskCard$1,
|
|
28388
26049
|
PortalTemplates,
|
|
28389
26050
|
ProgramMenu$1,
|
|
28390
26051
|
PoweredByImg,
|
|
@@ -28392,10 +26053,6 @@ const stories = [
|
|
|
28392
26053
|
Hero,
|
|
28393
26054
|
ReferralIframe$1,
|
|
28394
26055
|
NameFields$1,
|
|
28395
|
-
RewardExchangeList,
|
|
28396
|
-
UseRewardExchangeList,
|
|
28397
|
-
UseTaskCard,
|
|
28398
|
-
UseRewardsTable
|
|
28399
26056
|
];
|
|
28400
26057
|
const StencilStorybook = class {
|
|
28401
26058
|
constructor(hostRef) {
|
|
@@ -28435,83 +26092,6 @@ const TableRow = class {
|
|
|
28435
26092
|
}
|
|
28436
26093
|
};
|
|
28437
26094
|
|
|
28438
|
-
const TaskCard$2 = class {
|
|
28439
|
-
constructor(hostRef) {
|
|
28440
|
-
index.registerInstance(this, hostRef);
|
|
28441
|
-
this.ignored = true;
|
|
28442
|
-
/**
|
|
28443
|
-
* @uiName Reward Amount
|
|
28444
|
-
*/
|
|
28445
|
-
this.rewardAmount = 0;
|
|
28446
|
-
/**
|
|
28447
|
-
* @uiName Reward Unit
|
|
28448
|
-
*/
|
|
28449
|
-
this.rewardUnit = "Points";
|
|
28450
|
-
/**
|
|
28451
|
-
* @uiName Title Text
|
|
28452
|
-
*/
|
|
28453
|
-
this.cardTitle = "Title Text";
|
|
28454
|
-
/**
|
|
28455
|
-
* @uiName Description Text
|
|
28456
|
-
*/
|
|
28457
|
-
this.description = "Description Text";
|
|
28458
|
-
/**
|
|
28459
|
-
* @uiName Goal Repeatable
|
|
28460
|
-
*/
|
|
28461
|
-
this.repeatable = false;
|
|
28462
|
-
/**
|
|
28463
|
-
* @uiName Show Progress Bar
|
|
28464
|
-
*/
|
|
28465
|
-
this.showProgressBar = false;
|
|
28466
|
-
/**
|
|
28467
|
-
* @uiName Goal Completion Number
|
|
28468
|
-
*/
|
|
28469
|
-
this.goal = 1;
|
|
28470
|
-
/**
|
|
28471
|
-
* @uiName Progress Bar Steps
|
|
28472
|
-
*/
|
|
28473
|
-
this.steps = false;
|
|
28474
|
-
/**
|
|
28475
|
-
* @uiName Show Goal Expiry
|
|
28476
|
-
*/
|
|
28477
|
-
this.showExpiry = false;
|
|
28478
|
-
/**
|
|
28479
|
-
* @uiName Reward Duration
|
|
28480
|
-
* @uiWidget DateRange
|
|
28481
|
-
* @uiOptions {"allowPastDates":true, "months": 1}
|
|
28482
|
-
*/
|
|
28483
|
-
this.rewardDuration = "/";
|
|
28484
|
-
/**
|
|
28485
|
-
* @uiName CTA Button Text
|
|
28486
|
-
*/
|
|
28487
|
-
this.buttonText = "Complete Action";
|
|
28488
|
-
/**
|
|
28489
|
-
* @uiName CTA Button Link
|
|
28490
|
-
*/
|
|
28491
|
-
this.buttonLink = "https://example.com/";
|
|
28492
|
-
/**
|
|
28493
|
-
* @uiName CTA Button Link Open in New Tab
|
|
28494
|
-
*/
|
|
28495
|
-
this.openNewTab = false;
|
|
28496
|
-
/**
|
|
28497
|
-
* Select what type of stat to display for the goal. Manual paths are also supported.
|
|
28498
|
-
*
|
|
28499
|
-
* @uiWidget StatTypeSelectWidget
|
|
28500
|
-
* @uiName Goal Progress Source
|
|
28501
|
-
* @uiOptions {"version": 1.1}
|
|
28502
|
-
*/
|
|
28503
|
-
this.statType = "/programGoals/count/Referral-Started%2Freferrals";
|
|
28504
|
-
_extends.h$1(this);
|
|
28505
|
-
}
|
|
28506
|
-
disconnectedCallback() { }
|
|
28507
|
-
render() {
|
|
28508
|
-
const { props } = index_module.j() ? useDemoBigStat.useDemoBigStat(this) : useDemoBigStat.useBigStat(this);
|
|
28509
|
-
const { value, statvalue } = props;
|
|
28510
|
-
console.log(props, index_module.j());
|
|
28511
|
-
return (index.h(TaskCardView, Object.assign({ progress: value, loading: !index_module.j() && value === undefined }, utils.getProps(this))));
|
|
28512
|
-
}
|
|
28513
|
-
};
|
|
28514
|
-
|
|
28515
26095
|
const debug$2 = _extends.browser("sq:global");
|
|
28516
26096
|
const textStyles = `
|
|
28517
26097
|
sqm-text {
|
|
@@ -28596,8 +26176,8 @@ const GET_USER_NAME = sqmLeaderboardRankView.gql `
|
|
|
28596
26176
|
`;
|
|
28597
26177
|
function useUserName(props) {
|
|
28598
26178
|
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
28599
|
-
const user = index_module.
|
|
28600
|
-
const res = index_module.
|
|
26179
|
+
const user = index_module.ne();
|
|
26180
|
+
const res = index_module.cn(GET_USER_NAME, {}, !(user === null || user === void 0 ? void 0 : user.jwt));
|
|
28601
26181
|
const loading = res.loading;
|
|
28602
26182
|
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)
|
|
28603
26183
|
? `${(_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}`
|
|
@@ -28655,15 +26235,11 @@ exports.sqm_referral_table_date_cell = ReferralTableDateCell;
|
|
|
28655
26235
|
exports.sqm_referral_table_rewards_cell = ReferralTableRewardsCell;
|
|
28656
26236
|
exports.sqm_referral_table_status_cell = ReferralTableStatusCell;
|
|
28657
26237
|
exports.sqm_referral_table_user_cell = ReferralTableUserCell;
|
|
28658
|
-
exports.sqm_reward_exchange_list = SqmRewardExchangeList;
|
|
28659
|
-
exports.sqm_rewards_table = RewardsTable;
|
|
28660
|
-
exports.sqm_rewards_table_column = RewardsTableColumn;
|
|
28661
26238
|
exports.sqm_router = SqmRouter;
|
|
28662
26239
|
exports.sqm_share_button = ShareButton;
|
|
28663
26240
|
exports.sqm_share_link = ShareLink;
|
|
28664
26241
|
exports.sqm_stencilbook = StencilStorybook;
|
|
28665
26242
|
exports.sqm_table_cell = TableCell$1;
|
|
28666
26243
|
exports.sqm_table_row = TableRow;
|
|
28667
|
-
exports.sqm_task_card = TaskCard$2;
|
|
28668
26244
|
exports.sqm_text = Text;
|
|
28669
26245
|
exports.sqm_user_name = UserName$1;
|