@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
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
const index = require('./index-b0129cd6.js');
|
|
4
4
|
const _extends = require('./extends-0302d27d.js');
|
|
5
|
-
const index_module = require('./index.module-
|
|
5
|
+
const index_module = require('./index.module-2925fe3b.js');
|
|
6
6
|
const jssPresetDefault_esm = require('./jss-preset-default.esm-6304d24f.js');
|
|
7
7
|
const cjs = require('./cjs-1066ec21.js');
|
|
8
8
|
|
|
@@ -338,7 +338,7 @@ function BigStatView(props, children) {
|
|
|
338
338
|
const debug = _extends.browser("sq:useBigStat");
|
|
339
339
|
const LOADING = "...";
|
|
340
340
|
const debugQuery = (query, variables, getStat) => {
|
|
341
|
-
const res = index_module.
|
|
341
|
+
const res = index_module.cn(query, variables);
|
|
342
342
|
if (!(res === null || res === void 0 ? void 0 : res.data) && !res.loading) {
|
|
343
343
|
console.error("issue getting stat:", res);
|
|
344
344
|
}
|
|
@@ -367,13 +367,7 @@ _, status) => {
|
|
|
367
367
|
}
|
|
368
368
|
}
|
|
369
369
|
}
|
|
370
|
-
`, { queryFilter }, (res) => {
|
|
371
|
-
var _a, _b, _c, _d, _e, _f, _g;
|
|
372
|
-
return ({
|
|
373
|
-
value: (_c = (_b = (_a = res.data) === null || _a === void 0 ? void 0 : _a.viewer) === null || _b === void 0 ? void 0 : _b.referrals) === null || _c === void 0 ? void 0 : _c.totalCount,
|
|
374
|
-
statvalue: (_g = (_f = (_e = (_d = res.data) === null || _d === void 0 ? void 0 : _d.viewer) === null || _e === void 0 ? void 0 : _e.referrals) === null || _f === void 0 ? void 0 : _f.totalCount) === null || _g === void 0 ? void 0 : _g.toString(),
|
|
375
|
-
});
|
|
376
|
-
});
|
|
370
|
+
`, { queryFilter }, (res) => { var _a, _b, _c, _d; return (_d = (_c = (_b = (_a = res.data) === null || _a === void 0 ? void 0 : _a.viewer) === null || _b === void 0 ? void 0 : _b.referrals) === null || _c === void 0 ? void 0 : _c.totalCount) === null || _d === void 0 ? void 0 : _d.toString(); });
|
|
377
371
|
};
|
|
378
372
|
const programGoalsQuery = (programId, locale, metricType, goalId) => {
|
|
379
373
|
// Confirm this behaviour
|
|
@@ -393,33 +387,9 @@ const programGoalsQuery = (programId, locale, metricType, goalId) => {
|
|
|
393
387
|
}
|
|
394
388
|
}
|
|
395
389
|
`, { programId, metricType, goalId, locale }, (res) => {
|
|
396
|
-
var _a, _b, _c, _d, _e
|
|
390
|
+
var _a, _b, _c, _d, _e;
|
|
397
391
|
const goal = (_c = (_b = (_a = res.data) === null || _a === void 0 ? void 0 : _a.viewer) === null || _b === void 0 ? void 0 : _b.programGoals) === null || _c === void 0 ? void 0 : _c.filter((goal) => goal.goalId === goalId && goal.programId === programId);
|
|
398
|
-
return
|
|
399
|
-
value: ((_d = goal === null || goal === void 0 ? void 0 : goal[0]) === null || _d === void 0 ? void 0 : _d[metricType]) || 0,
|
|
400
|
-
statvalue: ((_f = (_e = goal === null || goal === void 0 ? void 0 : goal[0]) === null || _e === void 0 ? void 0 : _e[metricType]) === null || _f === void 0 ? void 0 : _f.toString()) || 0,
|
|
401
|
-
};
|
|
402
|
-
});
|
|
403
|
-
};
|
|
404
|
-
const customFieldsQuery = (programId, locale, fieldName, goalId) => {
|
|
405
|
-
// Confirm this behaviour
|
|
406
|
-
if (programId === "classic")
|
|
407
|
-
return null;
|
|
408
|
-
return debugQuery(index_module.dist.gql `
|
|
409
|
-
query {
|
|
410
|
-
viewer {
|
|
411
|
-
... on User {
|
|
412
|
-
customFields
|
|
413
|
-
}
|
|
414
|
-
}
|
|
415
|
-
}
|
|
416
|
-
`, { programId, fieldName, goalId, locale }, (res) => {
|
|
417
|
-
var _a, _b, _c;
|
|
418
|
-
const customField = (_c = (_b = (_a = res.data) === null || _a === void 0 ? void 0 : _a.viewer) === null || _b === void 0 ? void 0 : _b.customFields) === null || _c === void 0 ? void 0 : _c[fieldName];
|
|
419
|
-
return {
|
|
420
|
-
value: customField || 0,
|
|
421
|
-
statvalue: (customField === null || customField === void 0 ? void 0 : customField.toString()) || "0",
|
|
422
|
-
};
|
|
392
|
+
return ((_e = (_d = goal === null || goal === void 0 ? void 0 : goal[0]) === null || _d === void 0 ? void 0 : _d[metricType]) === null || _e === void 0 ? void 0 : _e.toString()) || 0;
|
|
423
393
|
});
|
|
424
394
|
};
|
|
425
395
|
const referralsMonthQuery = (programId) => {
|
|
@@ -440,13 +410,7 @@ const referralsMonthQuery = (programId) => {
|
|
|
440
410
|
}
|
|
441
411
|
}
|
|
442
412
|
}
|
|
443
|
-
`, { filter }, (res) => {
|
|
444
|
-
var _a, _b, _c, _d, _e, _f, _g;
|
|
445
|
-
return ({
|
|
446
|
-
value: ((_c = (_b = (_a = res.data) === null || _a === void 0 ? void 0 : _a.viewer) === null || _b === void 0 ? void 0 : _b.referrals) === null || _c === void 0 ? void 0 : _c.totalCount) || 0,
|
|
447
|
-
statvalue: (_g = (_f = (_e = (_d = res.data) === null || _d === void 0 ? void 0 : _d.viewer) === null || _e === void 0 ? void 0 : _e.referrals) === null || _f === void 0 ? void 0 : _f.totalCount) === null || _g === void 0 ? void 0 : _g.toString(),
|
|
448
|
-
});
|
|
449
|
-
});
|
|
413
|
+
`, { filter }, (res) => { var _a, _b, _c, _d; return (_d = (_c = (_b = (_a = res.data) === null || _a === void 0 ? void 0 : _a.viewer) === null || _b === void 0 ? void 0 : _b.referrals) === null || _c === void 0 ? void 0 : _c.totalCount) === null || _d === void 0 ? void 0 : _d.toString(); });
|
|
450
414
|
};
|
|
451
415
|
const referralsWeekQuery = (programId) => {
|
|
452
416
|
const programFilter = programId === "classic"
|
|
@@ -466,13 +430,7 @@ const referralsWeekQuery = (programId) => {
|
|
|
466
430
|
}
|
|
467
431
|
}
|
|
468
432
|
}
|
|
469
|
-
`, { filter }, (res) => {
|
|
470
|
-
var _a, _b, _c, _d, _e, _f, _g;
|
|
471
|
-
return ({
|
|
472
|
-
value: ((_c = (_b = (_a = res.data) === null || _a === void 0 ? void 0 : _a.viewer) === null || _b === void 0 ? void 0 : _b.referrals) === null || _c === void 0 ? void 0 : _c.totalCount) || 0,
|
|
473
|
-
statvalue: (_g = (_f = (_e = (_d = res.data) === null || _d === void 0 ? void 0 : _d.viewer) === null || _e === void 0 ? void 0 : _e.referrals) === null || _f === void 0 ? void 0 : _f.totalCount) === null || _g === void 0 ? void 0 : _g.toString(),
|
|
474
|
-
});
|
|
475
|
-
});
|
|
433
|
+
`, { filter }, (res) => { var _a, _b, _c, _d; return (_d = (_c = (_b = (_a = res.data) === null || _a === void 0 ? void 0 : _a.viewer) === null || _b === void 0 ? void 0 : _b.referrals) === null || _c === void 0 ? void 0 : _c.totalCount) === null || _d === void 0 ? void 0 : _d.toString(); });
|
|
476
434
|
};
|
|
477
435
|
const rewardsCountQuery = (programId,
|
|
478
436
|
// locale
|
|
@@ -489,13 +447,7 @@ _, global = "") => {
|
|
|
489
447
|
}
|
|
490
448
|
`, {
|
|
491
449
|
programId: !global && programId !== "classic" ? programId : null,
|
|
492
|
-
}, (res) => {
|
|
493
|
-
var _a, _b, _c, _d, _e, _f, _g;
|
|
494
|
-
return ({
|
|
495
|
-
value: ((_c = (_b = (_a = res.data) === null || _a === void 0 ? void 0 : _a.viewer) === null || _b === void 0 ? void 0 : _b.rewards) === null || _c === void 0 ? void 0 : _c.totalCount) || 0,
|
|
496
|
-
statvalue: (_g = (_f = (_e = (_d = res.data) === null || _d === void 0 ? void 0 : _d.viewer) === null || _e === void 0 ? void 0 : _e.rewards) === null || _f === void 0 ? void 0 : _f.totalCount) === null || _g === void 0 ? void 0 : _g.toString(),
|
|
497
|
-
});
|
|
498
|
-
});
|
|
450
|
+
}, (res) => { var _a, _b, _c, _d; return (_d = (_c = (_b = (_a = res.data) === null || _a === void 0 ? void 0 : _a.viewer) === null || _b === void 0 ? void 0 : _b.rewards) === null || _c === void 0 ? void 0 : _c.totalCount) === null || _d === void 0 ? void 0 : _d.toString(); });
|
|
499
451
|
};
|
|
500
452
|
const rewardsCountFilteredQuery = (programId,
|
|
501
453
|
// locale
|
|
@@ -528,13 +480,7 @@ _, type, unit, status, global = "") => {
|
|
|
528
480
|
unit,
|
|
529
481
|
type,
|
|
530
482
|
statusFilter,
|
|
531
|
-
}, (res) => {
|
|
532
|
-
var _a, _b, _c, _d, _e, _f, _g;
|
|
533
|
-
return ({
|
|
534
|
-
value: ((_c = (_b = (_a = res.data) === null || _a === void 0 ? void 0 : _a.viewer) === null || _b === void 0 ? void 0 : _b.rewards) === null || _c === void 0 ? void 0 : _c.totalCount) || 0,
|
|
535
|
-
statvalue: (_g = (_f = (_e = (_d = res.data) === null || _d === void 0 ? void 0 : _d.viewer) === null || _e === void 0 ? void 0 : _e.rewards) === null || _f === void 0 ? void 0 : _f.totalCount) === null || _g === void 0 ? void 0 : _g.toString(),
|
|
536
|
-
});
|
|
537
|
-
});
|
|
483
|
+
}, (res) => { var _a, _b, _c, _d; return (_d = (_c = (_b = (_a = res.data) === null || _a === void 0 ? void 0 : _a.viewer) === null || _b === void 0 ? void 0 : _b.rewards) === null || _c === void 0 ? void 0 : _c.totalCount) === null || _d === void 0 ? void 0 : _d.toString(); });
|
|
538
484
|
};
|
|
539
485
|
const integrationRewardsCountFilteredQuery = (programId,
|
|
540
486
|
// locale
|
|
@@ -559,13 +505,7 @@ _, status, global = "") => {
|
|
|
559
505
|
`, {
|
|
560
506
|
programId: !global && programId !== "classic" ? programId : null,
|
|
561
507
|
statusFilter,
|
|
562
|
-
}, (res) => {
|
|
563
|
-
var _a, _b, _c, _d, _e, _f, _g;
|
|
564
|
-
return ({
|
|
565
|
-
value: ((_c = (_b = (_a = res.data) === null || _a === void 0 ? void 0 : _a.viewer) === null || _b === void 0 ? void 0 : _b.rewards) === null || _c === void 0 ? void 0 : _c.totalCount) || 0,
|
|
566
|
-
statvalue: (_g = (_f = (_e = (_d = res.data) === null || _d === void 0 ? void 0 : _d.viewer) === null || _e === void 0 ? void 0 : _e.rewards) === null || _f === void 0 ? void 0 : _f.totalCount) === null || _g === void 0 ? void 0 : _g.toString(),
|
|
567
|
-
});
|
|
568
|
-
});
|
|
508
|
+
}, (res) => { var _a, _b, _c, _d; return (_d = (_c = (_b = (_a = res.data) === null || _a === void 0 ? void 0 : _a.viewer) === null || _b === void 0 ? void 0 : _b.rewards) === null || _c === void 0 ? void 0 : _c.totalCount) === null || _d === void 0 ? void 0 : _d.toString(); });
|
|
569
509
|
};
|
|
570
510
|
const rewardsMonthQuery = (programId,
|
|
571
511
|
// locale
|
|
@@ -587,13 +527,7 @@ _, global = "") => {
|
|
|
587
527
|
}
|
|
588
528
|
`, {
|
|
589
529
|
programId: !global && programId !== "classic" ? programId : null,
|
|
590
|
-
}, (res) => {
|
|
591
|
-
var _a, _b, _c, _d, _e, _f, _g;
|
|
592
|
-
return ({
|
|
593
|
-
value: ((_c = (_b = (_a = res.data) === null || _a === void 0 ? void 0 : _a.viewer) === null || _b === void 0 ? void 0 : _b.rewards) === null || _c === void 0 ? void 0 : _c.totalCount) || 0,
|
|
594
|
-
statvalue: (_g = (_f = (_e = (_d = res.data) === null || _d === void 0 ? void 0 : _d.viewer) === null || _e === void 0 ? void 0 : _e.rewards) === null || _f === void 0 ? void 0 : _f.totalCount) === null || _g === void 0 ? void 0 : _g.toString(),
|
|
595
|
-
});
|
|
596
|
-
});
|
|
530
|
+
}, (res) => { var _a, _b, _c, _d; return (_d = (_c = (_b = (_a = res.data) === null || _a === void 0 ? void 0 : _a.viewer) === null || _b === void 0 ? void 0 : _b.rewards) === null || _c === void 0 ? void 0 : _c.totalCount) === null || _d === void 0 ? void 0 : _d.toString(); });
|
|
597
531
|
};
|
|
598
532
|
const rewardsWeekQuery = (programId,
|
|
599
533
|
// locale
|
|
@@ -615,13 +549,7 @@ _, global = "") => {
|
|
|
615
549
|
}
|
|
616
550
|
`, {
|
|
617
551
|
programId: !global && programId !== "classic" ? programId : null,
|
|
618
|
-
}, (res) => {
|
|
619
|
-
var _a, _b, _c, _d, _e, _f, _g;
|
|
620
|
-
return ({
|
|
621
|
-
value: ((_c = (_b = (_a = res.data) === null || _a === void 0 ? void 0 : _a.viewer) === null || _b === void 0 ? void 0 : _b.rewards) === null || _c === void 0 ? void 0 : _c.totalCount) || 0,
|
|
622
|
-
statvalue: (_g = (_f = (_e = (_d = res.data) === null || _d === void 0 ? void 0 : _d.viewer) === null || _e === void 0 ? void 0 : _e.rewards) === null || _f === void 0 ? void 0 : _f.totalCount) === null || _g === void 0 ? void 0 : _g.toString(),
|
|
623
|
-
});
|
|
624
|
-
});
|
|
552
|
+
}, (res) => { var _a, _b, _c, _d; return (_d = (_c = (_b = (_a = res.data) === null || _a === void 0 ? void 0 : _a.viewer) === null || _b === void 0 ? void 0 : _b.rewards) === null || _c === void 0 ? void 0 : _c.totalCount) === null || _d === void 0 ? void 0 : _d.toString(); });
|
|
625
553
|
};
|
|
626
554
|
const rewardsRedeemedQuery = (programId, locale, type, unit, global = "") => {
|
|
627
555
|
return debugQuery(index_module.dist.gql `
|
|
@@ -656,13 +584,10 @@ const rewardsRedeemedQuery = (programId, locale, type, unit, global = "") => {
|
|
|
656
584
|
unit,
|
|
657
585
|
locale,
|
|
658
586
|
}, (res) => {
|
|
659
|
-
var _a, _b, _c, _d
|
|
587
|
+
var _a, _b, _c, _d;
|
|
660
588
|
const arr = (_b = (_a = res.data) === null || _a === void 0 ? void 0 : _a.viewer) === null || _b === void 0 ? void 0 : _b.rewardBalanceDetails;
|
|
661
589
|
const fallback = (_c = res.data) === null || _c === void 0 ? void 0 : _c.fallback;
|
|
662
|
-
return
|
|
663
|
-
value: ((_d = arr === null || arr === void 0 ? void 0 : arr[0]) === null || _d === void 0 ? void 0 : _d.prettyRedeemedCredit) || 0,
|
|
664
|
-
statvalue: ((_e = arr === null || arr === void 0 ? void 0 : arr[0]) === null || _e === void 0 ? void 0 : _e.prettyRedeemedCredit) || fallback,
|
|
665
|
-
};
|
|
590
|
+
return ((_d = arr === null || arr === void 0 ? void 0 : arr[0]) === null || _d === void 0 ? void 0 : _d.prettyRedeemedCredit) || fallback;
|
|
666
591
|
});
|
|
667
592
|
};
|
|
668
593
|
const rewardsAssignedQuery = (programId, locale, type, unit, global = "") => {
|
|
@@ -698,13 +623,10 @@ const rewardsAssignedQuery = (programId, locale, type, unit, global = "") => {
|
|
|
698
623
|
unit,
|
|
699
624
|
locale,
|
|
700
625
|
}, (res) => {
|
|
701
|
-
var _a, _b, _c, _d
|
|
626
|
+
var _a, _b, _c, _d;
|
|
702
627
|
const arr = (_b = (_a = res.data) === null || _a === void 0 ? void 0 : _a.viewer) === null || _b === void 0 ? void 0 : _b.rewardBalanceDetails;
|
|
703
628
|
const fallback = (_c = res.data) === null || _c === void 0 ? void 0 : _c.fallback;
|
|
704
|
-
return
|
|
705
|
-
value: ((_d = arr === null || arr === void 0 ? void 0 : arr[0]) === null || _d === void 0 ? void 0 : _d.prettyAssignedCredit) || 0,
|
|
706
|
-
statvalue: ((_e = arr === null || arr === void 0 ? void 0 : arr[0]) === null || _e === void 0 ? void 0 : _e.prettyAssignedCredit) || fallback,
|
|
707
|
-
};
|
|
629
|
+
return ((_d = arr === null || arr === void 0 ? void 0 : arr[0]) === null || _d === void 0 ? void 0 : _d.prettyAssignedCredit) || fallback;
|
|
708
630
|
});
|
|
709
631
|
};
|
|
710
632
|
const rewardsAvailableQuery = (programId, locale, type, unit, global = "") => {
|
|
@@ -740,13 +662,10 @@ const rewardsAvailableQuery = (programId, locale, type, unit, global = "") => {
|
|
|
740
662
|
unit,
|
|
741
663
|
locale,
|
|
742
664
|
}, (res) => {
|
|
743
|
-
var _a, _b, _c, _d
|
|
665
|
+
var _a, _b, _c, _d;
|
|
744
666
|
const arr = (_b = (_a = res.data) === null || _a === void 0 ? void 0 : _a.viewer) === null || _b === void 0 ? void 0 : _b.rewardBalanceDetails;
|
|
745
667
|
const fallback = (_c = res.data) === null || _c === void 0 ? void 0 : _c.fallback;
|
|
746
|
-
return
|
|
747
|
-
value: ((_d = arr === null || arr === void 0 ? void 0 : arr[0]) === null || _d === void 0 ? void 0 : _d.prettyAvailableValue) || 0,
|
|
748
|
-
statvalue: ((_e = arr === null || arr === void 0 ? void 0 : arr[0]) === null || _e === void 0 ? void 0 : _e.prettyAvailableValue) || fallback,
|
|
749
|
-
};
|
|
668
|
+
return ((_d = arr === null || arr === void 0 ? void 0 : arr[0]) === null || _d === void 0 ? void 0 : _d.prettyAvailableValue) || fallback;
|
|
750
669
|
});
|
|
751
670
|
};
|
|
752
671
|
const parseRewardValueFormat = {
|
|
@@ -789,13 +708,10 @@ const rewardsBalanceQuery = (programId, locale, type, unit, format = "prettyValu
|
|
|
789
708
|
format: (_a = parseRewardValueFormat[format]) !== null && _a !== void 0 ? _a : "UNIT_FORMATTED",
|
|
790
709
|
locale,
|
|
791
710
|
}, (res) => {
|
|
792
|
-
var _a, _b, _c, _d
|
|
711
|
+
var _a, _b, _c, _d;
|
|
793
712
|
const arr = (_b = (_a = res.data) === null || _a === void 0 ? void 0 : _a.viewer) === null || _b === void 0 ? void 0 : _b.rewardBalanceDetails;
|
|
794
713
|
const fallback = (_c = res.data) === null || _c === void 0 ? void 0 : _c.fallback;
|
|
795
|
-
return
|
|
796
|
-
value: ((_d = arr === null || arr === void 0 ? void 0 : arr[0]) === null || _d === void 0 ? void 0 : _d.prettyAvailableValue) || 0,
|
|
797
|
-
statvalue: ((_e = arr === null || arr === void 0 ? void 0 : arr[0]) === null || _e === void 0 ? void 0 : _e.prettyAvailableValue) || fallback,
|
|
798
|
-
};
|
|
714
|
+
return ((_d = arr === null || arr === void 0 ? void 0 : arr[0]) === null || _d === void 0 ? void 0 : _d.prettyAvailableValue) || fallback;
|
|
799
715
|
});
|
|
800
716
|
};
|
|
801
717
|
// functions are of the form (programId: string, ...args: string) => string
|
|
@@ -852,15 +768,10 @@ const queries = {
|
|
|
852
768
|
label: "Program Goals",
|
|
853
769
|
query: programGoalsQuery,
|
|
854
770
|
},
|
|
855
|
-
customFields: {
|
|
856
|
-
label: "Custom Fields",
|
|
857
|
-
query: customFieldsQuery,
|
|
858
|
-
},
|
|
859
771
|
};
|
|
860
772
|
// this should be exposed in documentation somehow
|
|
861
773
|
const StatPaths = [
|
|
862
774
|
{ name: "programGoals", route: "/(programGoals)/:metricType/:goalId" },
|
|
863
|
-
{ name: "customFields", route: "/(customFields)/:customField" },
|
|
864
775
|
{ name: "referralsCount", route: "/(referralsCount)/:status?" },
|
|
865
776
|
{ name: "referralsMonth", route: "/(referralsMonth)" },
|
|
866
777
|
{ name: "referralsWeek", route: "/(referralsWeek)" },
|
|
@@ -894,15 +805,13 @@ const StatPaths = [
|
|
|
894
805
|
];
|
|
895
806
|
const StatPatterns = StatPaths.map((pattern) => pathToRegexp(pattern.route));
|
|
896
807
|
function useBigStat(props) {
|
|
897
|
-
|
|
898
|
-
const { statType, flexReverse, alignment } = props;
|
|
899
|
-
const programId = index_module.M();
|
|
808
|
+
const { statType, flexReverse, alignment, programId = index_module.M(), } = props;
|
|
900
809
|
const locale = index_module.R();
|
|
901
|
-
const userIdent = index_module.
|
|
810
|
+
const userIdent = index_module.ne();
|
|
902
811
|
const re = _extends.useMemo(() => StatPatterns.find((re) => re.exec(statType)), [statType]);
|
|
903
812
|
if (!(re === null || re === void 0 ? void 0 : re.exec(statType))) {
|
|
904
813
|
return {
|
|
905
|
-
props: {
|
|
814
|
+
props: { statvalue: "!!!", flexReverse, alignment },
|
|
906
815
|
label: "BAD PROP TYPE",
|
|
907
816
|
};
|
|
908
817
|
}
|
|
@@ -925,12 +834,7 @@ function useBigStat(props) {
|
|
|
925
834
|
const stat = (userIdent === null || userIdent === void 0 ? void 0 : userIdent.jwt) && queries[queryName].query(programId, locale, ...queryArgs);
|
|
926
835
|
debug("stat:", stat);
|
|
927
836
|
return {
|
|
928
|
-
props: {
|
|
929
|
-
value: stat === null || stat === void 0 ? void 0 : stat.value,
|
|
930
|
-
statvalue: (_a = stat === null || stat === void 0 ? void 0 : stat.statvalue) !== null && _a !== void 0 ? _a : LOADING,
|
|
931
|
-
flexReverse,
|
|
932
|
-
alignment,
|
|
933
|
-
},
|
|
837
|
+
props: { statvalue: stat !== null && stat !== void 0 ? stat : LOADING, flexReverse, alignment },
|
|
934
838
|
label,
|
|
935
839
|
};
|
|
936
840
|
}
|
|
@@ -941,7 +845,6 @@ function useDemoBigStat(props) {
|
|
|
941
845
|
if (!(re === null || re === void 0 ? void 0 : re.exec(statType))) {
|
|
942
846
|
return {
|
|
943
847
|
props: {
|
|
944
|
-
value: 0,
|
|
945
848
|
statvalue: "!!!",
|
|
946
849
|
flexReverse: false,
|
|
947
850
|
alignment: "center",
|
|
@@ -2,8 +2,6 @@
|
|
|
2
2
|
"entries": [
|
|
3
3
|
"./components/sqm-password-field/sqm-password-field.js",
|
|
4
4
|
"./components/sqm-referral-table/sqm-referral-table.js",
|
|
5
|
-
"./components/sqm-reward-exchange-list/sqm-reward-exchange-list.js",
|
|
6
|
-
"./components/sqm-rewards-table/sqm-rewards-table.js",
|
|
7
5
|
"./components/sqm-asset-card/sqm-asset-card.js",
|
|
8
6
|
"./components/sqm-big-stat/sqm-big-stat.js",
|
|
9
7
|
"./components/sqm-divided-layout/sqm-divided-layout.js",
|
|
@@ -34,6 +32,8 @@
|
|
|
34
32
|
"./components/sqm-portal-verify-email/sqm-portal-verify-email.js",
|
|
35
33
|
"./components/sqm-program-menu/sqm-program-menu.js",
|
|
36
34
|
"./components/sqm-referral-iframe/sqm-referral-iframe.js",
|
|
35
|
+
"./components/sqm-referral-table/sqm-table-cell.js",
|
|
36
|
+
"./components/sqm-referral-table/sqm-table-row.js",
|
|
37
37
|
"./components/sqm-referral-table/cells/sqm-referral-table-cell.js",
|
|
38
38
|
"./components/sqm-referral-table/cells/sqm-referral-table-date-cell.js",
|
|
39
39
|
"./components/sqm-referral-table/cells/sqm-referral-table-rewards-cell.js",
|
|
@@ -44,7 +44,6 @@
|
|
|
44
44
|
"./components/sqm-referral-table/columns/sqm-referral-table-rewards-column.js",
|
|
45
45
|
"./components/sqm-referral-table/columns/sqm-referral-table-status-column.js",
|
|
46
46
|
"./components/sqm-referral-table/columns/sqm-referral-table-user-column.js",
|
|
47
|
-
"./components/sqm-rewards-table/sqm-rewards-table-column.js",
|
|
48
47
|
"./components/sqm-route/sqm-route.js",
|
|
49
48
|
"./components/sqm-router/sqm-router.js",
|
|
50
49
|
"./components/sqm-share-button/sqm-share-button.js",
|
|
@@ -52,13 +51,10 @@
|
|
|
52
51
|
"./components/sqm-share-link/sqm-share-link.js",
|
|
53
52
|
"./components/sqm-stat-container/sqm-stat-container.js",
|
|
54
53
|
"./components/sqm-stencilbook/sqm-stencilbook.js",
|
|
55
|
-
"./components/sqm-task-card/sqm-task-card.js",
|
|
56
54
|
"./components/sqm-text/sqm-text.js",
|
|
57
55
|
"./components/sqm-text-span/sqm-text-span.js",
|
|
58
56
|
"./components/sqm-titled-section/sqm-titled-section.js",
|
|
59
|
-
"./components/sqm-user-name/sqm-user-name.js"
|
|
60
|
-
"./tables/sqm-table-cell.js",
|
|
61
|
-
"./tables/sqm-table-row.js"
|
|
57
|
+
"./components/sqm-user-name/sqm-user-name.js"
|
|
62
58
|
],
|
|
63
59
|
"compiler": {
|
|
64
60
|
"name": "@stencil/core",
|
|
@@ -100,12 +100,32 @@ export class BigStat {
|
|
|
100
100
|
"attribute": "alignment",
|
|
101
101
|
"reflect": false
|
|
102
102
|
},
|
|
103
|
+
"programId": {
|
|
104
|
+
"type": "string",
|
|
105
|
+
"mutable": false,
|
|
106
|
+
"complexType": {
|
|
107
|
+
"original": "string",
|
|
108
|
+
"resolved": "string",
|
|
109
|
+
"references": {}
|
|
110
|
+
},
|
|
111
|
+
"required": false,
|
|
112
|
+
"optional": true,
|
|
113
|
+
"docs": {
|
|
114
|
+
"tags": [{
|
|
115
|
+
"text": "Program ID",
|
|
116
|
+
"name": "uiName"
|
|
117
|
+
}],
|
|
118
|
+
"text": "The ID of the program that is used to scope stats. Defaults to the program context when no ID is specified."
|
|
119
|
+
},
|
|
120
|
+
"attribute": "program-id",
|
|
121
|
+
"reflect": false
|
|
122
|
+
},
|
|
103
123
|
"demoData": {
|
|
104
124
|
"type": "unknown",
|
|
105
125
|
"mutable": false,
|
|
106
126
|
"complexType": {
|
|
107
127
|
"original": "DemoData<BigStatViewProps>",
|
|
108
|
-
"resolved": "{
|
|
128
|
+
"resolved": "{ statvalue?: string; flexReverse?: boolean; alignment?: \"left\" | \"right\" | \"center\"; }",
|
|
109
129
|
"references": {
|
|
110
130
|
"DemoData": {
|
|
111
131
|
"location": "import",
|
|
@@ -35,13 +35,7 @@ _, status) => {
|
|
|
35
35
|
}
|
|
36
36
|
}
|
|
37
37
|
}
|
|
38
|
-
`, { queryFilter }, (res) => {
|
|
39
|
-
var _a, _b, _c, _d, _e, _f, _g;
|
|
40
|
-
return ({
|
|
41
|
-
value: (_c = (_b = (_a = res.data) === null || _a === void 0 ? void 0 : _a.viewer) === null || _b === void 0 ? void 0 : _b.referrals) === null || _c === void 0 ? void 0 : _c.totalCount,
|
|
42
|
-
statvalue: (_g = (_f = (_e = (_d = res.data) === null || _d === void 0 ? void 0 : _d.viewer) === null || _e === void 0 ? void 0 : _e.referrals) === null || _f === void 0 ? void 0 : _f.totalCount) === null || _g === void 0 ? void 0 : _g.toString(),
|
|
43
|
-
});
|
|
44
|
-
});
|
|
38
|
+
`, { queryFilter }, (res) => { var _a, _b, _c, _d; return (_d = (_c = (_b = (_a = res.data) === null || _a === void 0 ? void 0 : _a.viewer) === null || _b === void 0 ? void 0 : _b.referrals) === null || _c === void 0 ? void 0 : _c.totalCount) === null || _d === void 0 ? void 0 : _d.toString(); });
|
|
45
39
|
};
|
|
46
40
|
const programGoalsQuery = (programId, locale, metricType, goalId) => {
|
|
47
41
|
// Confirm this behaviour
|
|
@@ -61,33 +55,9 @@ const programGoalsQuery = (programId, locale, metricType, goalId) => {
|
|
|
61
55
|
}
|
|
62
56
|
}
|
|
63
57
|
`, { programId, metricType, goalId, locale }, (res) => {
|
|
64
|
-
var _a, _b, _c, _d, _e
|
|
58
|
+
var _a, _b, _c, _d, _e;
|
|
65
59
|
const goal = (_c = (_b = (_a = res.data) === null || _a === void 0 ? void 0 : _a.viewer) === null || _b === void 0 ? void 0 : _b.programGoals) === null || _c === void 0 ? void 0 : _c.filter((goal) => goal.goalId === goalId && goal.programId === programId);
|
|
66
|
-
return
|
|
67
|
-
value: ((_d = goal === null || goal === void 0 ? void 0 : goal[0]) === null || _d === void 0 ? void 0 : _d[metricType]) || 0,
|
|
68
|
-
statvalue: ((_f = (_e = goal === null || goal === void 0 ? void 0 : goal[0]) === null || _e === void 0 ? void 0 : _e[metricType]) === null || _f === void 0 ? void 0 : _f.toString()) || 0,
|
|
69
|
-
};
|
|
70
|
-
});
|
|
71
|
-
};
|
|
72
|
-
const customFieldsQuery = (programId, locale, fieldName, goalId) => {
|
|
73
|
-
// Confirm this behaviour
|
|
74
|
-
if (programId === "classic")
|
|
75
|
-
return null;
|
|
76
|
-
return debugQuery(gql `
|
|
77
|
-
query {
|
|
78
|
-
viewer {
|
|
79
|
-
... on User {
|
|
80
|
-
customFields
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
`, { programId, fieldName, goalId, locale }, (res) => {
|
|
85
|
-
var _a, _b, _c;
|
|
86
|
-
const customField = (_c = (_b = (_a = res.data) === null || _a === void 0 ? void 0 : _a.viewer) === null || _b === void 0 ? void 0 : _b.customFields) === null || _c === void 0 ? void 0 : _c[fieldName];
|
|
87
|
-
return {
|
|
88
|
-
value: customField || 0,
|
|
89
|
-
statvalue: (customField === null || customField === void 0 ? void 0 : customField.toString()) || "0",
|
|
90
|
-
};
|
|
60
|
+
return ((_e = (_d = goal === null || goal === void 0 ? void 0 : goal[0]) === null || _d === void 0 ? void 0 : _d[metricType]) === null || _e === void 0 ? void 0 : _e.toString()) || 0;
|
|
91
61
|
});
|
|
92
62
|
};
|
|
93
63
|
const referralsMonthQuery = (programId) => {
|
|
@@ -108,13 +78,7 @@ const referralsMonthQuery = (programId) => {
|
|
|
108
78
|
}
|
|
109
79
|
}
|
|
110
80
|
}
|
|
111
|
-
`, { filter }, (res) => {
|
|
112
|
-
var _a, _b, _c, _d, _e, _f, _g;
|
|
113
|
-
return ({
|
|
114
|
-
value: ((_c = (_b = (_a = res.data) === null || _a === void 0 ? void 0 : _a.viewer) === null || _b === void 0 ? void 0 : _b.referrals) === null || _c === void 0 ? void 0 : _c.totalCount) || 0,
|
|
115
|
-
statvalue: (_g = (_f = (_e = (_d = res.data) === null || _d === void 0 ? void 0 : _d.viewer) === null || _e === void 0 ? void 0 : _e.referrals) === null || _f === void 0 ? void 0 : _f.totalCount) === null || _g === void 0 ? void 0 : _g.toString(),
|
|
116
|
-
});
|
|
117
|
-
});
|
|
81
|
+
`, { filter }, (res) => { var _a, _b, _c, _d; return (_d = (_c = (_b = (_a = res.data) === null || _a === void 0 ? void 0 : _a.viewer) === null || _b === void 0 ? void 0 : _b.referrals) === null || _c === void 0 ? void 0 : _c.totalCount) === null || _d === void 0 ? void 0 : _d.toString(); });
|
|
118
82
|
};
|
|
119
83
|
const referralsWeekQuery = (programId) => {
|
|
120
84
|
const programFilter = programId === "classic"
|
|
@@ -134,13 +98,7 @@ const referralsWeekQuery = (programId) => {
|
|
|
134
98
|
}
|
|
135
99
|
}
|
|
136
100
|
}
|
|
137
|
-
`, { filter }, (res) => {
|
|
138
|
-
var _a, _b, _c, _d, _e, _f, _g;
|
|
139
|
-
return ({
|
|
140
|
-
value: ((_c = (_b = (_a = res.data) === null || _a === void 0 ? void 0 : _a.viewer) === null || _b === void 0 ? void 0 : _b.referrals) === null || _c === void 0 ? void 0 : _c.totalCount) || 0,
|
|
141
|
-
statvalue: (_g = (_f = (_e = (_d = res.data) === null || _d === void 0 ? void 0 : _d.viewer) === null || _e === void 0 ? void 0 : _e.referrals) === null || _f === void 0 ? void 0 : _f.totalCount) === null || _g === void 0 ? void 0 : _g.toString(),
|
|
142
|
-
});
|
|
143
|
-
});
|
|
101
|
+
`, { filter }, (res) => { var _a, _b, _c, _d; return (_d = (_c = (_b = (_a = res.data) === null || _a === void 0 ? void 0 : _a.viewer) === null || _b === void 0 ? void 0 : _b.referrals) === null || _c === void 0 ? void 0 : _c.totalCount) === null || _d === void 0 ? void 0 : _d.toString(); });
|
|
144
102
|
};
|
|
145
103
|
const rewardsCountQuery = (programId,
|
|
146
104
|
// locale
|
|
@@ -157,13 +115,7 @@ _, global = "") => {
|
|
|
157
115
|
}
|
|
158
116
|
`, {
|
|
159
117
|
programId: !global && programId !== "classic" ? programId : null,
|
|
160
|
-
}, (res) => {
|
|
161
|
-
var _a, _b, _c, _d, _e, _f, _g;
|
|
162
|
-
return ({
|
|
163
|
-
value: ((_c = (_b = (_a = res.data) === null || _a === void 0 ? void 0 : _a.viewer) === null || _b === void 0 ? void 0 : _b.rewards) === null || _c === void 0 ? void 0 : _c.totalCount) || 0,
|
|
164
|
-
statvalue: (_g = (_f = (_e = (_d = res.data) === null || _d === void 0 ? void 0 : _d.viewer) === null || _e === void 0 ? void 0 : _e.rewards) === null || _f === void 0 ? void 0 : _f.totalCount) === null || _g === void 0 ? void 0 : _g.toString(),
|
|
165
|
-
});
|
|
166
|
-
});
|
|
118
|
+
}, (res) => { var _a, _b, _c, _d; return (_d = (_c = (_b = (_a = res.data) === null || _a === void 0 ? void 0 : _a.viewer) === null || _b === void 0 ? void 0 : _b.rewards) === null || _c === void 0 ? void 0 : _c.totalCount) === null || _d === void 0 ? void 0 : _d.toString(); });
|
|
167
119
|
};
|
|
168
120
|
const rewardsCountFilteredQuery = (programId,
|
|
169
121
|
// locale
|
|
@@ -196,13 +148,7 @@ _, type, unit, status, global = "") => {
|
|
|
196
148
|
unit,
|
|
197
149
|
type,
|
|
198
150
|
statusFilter,
|
|
199
|
-
}, (res) => {
|
|
200
|
-
var _a, _b, _c, _d, _e, _f, _g;
|
|
201
|
-
return ({
|
|
202
|
-
value: ((_c = (_b = (_a = res.data) === null || _a === void 0 ? void 0 : _a.viewer) === null || _b === void 0 ? void 0 : _b.rewards) === null || _c === void 0 ? void 0 : _c.totalCount) || 0,
|
|
203
|
-
statvalue: (_g = (_f = (_e = (_d = res.data) === null || _d === void 0 ? void 0 : _d.viewer) === null || _e === void 0 ? void 0 : _e.rewards) === null || _f === void 0 ? void 0 : _f.totalCount) === null || _g === void 0 ? void 0 : _g.toString(),
|
|
204
|
-
});
|
|
205
|
-
});
|
|
151
|
+
}, (res) => { var _a, _b, _c, _d; return (_d = (_c = (_b = (_a = res.data) === null || _a === void 0 ? void 0 : _a.viewer) === null || _b === void 0 ? void 0 : _b.rewards) === null || _c === void 0 ? void 0 : _c.totalCount) === null || _d === void 0 ? void 0 : _d.toString(); });
|
|
206
152
|
};
|
|
207
153
|
const integrationRewardsCountFilteredQuery = (programId,
|
|
208
154
|
// locale
|
|
@@ -227,13 +173,7 @@ _, status, global = "") => {
|
|
|
227
173
|
`, {
|
|
228
174
|
programId: !global && programId !== "classic" ? programId : null,
|
|
229
175
|
statusFilter,
|
|
230
|
-
}, (res) => {
|
|
231
|
-
var _a, _b, _c, _d, _e, _f, _g;
|
|
232
|
-
return ({
|
|
233
|
-
value: ((_c = (_b = (_a = res.data) === null || _a === void 0 ? void 0 : _a.viewer) === null || _b === void 0 ? void 0 : _b.rewards) === null || _c === void 0 ? void 0 : _c.totalCount) || 0,
|
|
234
|
-
statvalue: (_g = (_f = (_e = (_d = res.data) === null || _d === void 0 ? void 0 : _d.viewer) === null || _e === void 0 ? void 0 : _e.rewards) === null || _f === void 0 ? void 0 : _f.totalCount) === null || _g === void 0 ? void 0 : _g.toString(),
|
|
235
|
-
});
|
|
236
|
-
});
|
|
176
|
+
}, (res) => { var _a, _b, _c, _d; return (_d = (_c = (_b = (_a = res.data) === null || _a === void 0 ? void 0 : _a.viewer) === null || _b === void 0 ? void 0 : _b.rewards) === null || _c === void 0 ? void 0 : _c.totalCount) === null || _d === void 0 ? void 0 : _d.toString(); });
|
|
237
177
|
};
|
|
238
178
|
const rewardsMonthQuery = (programId,
|
|
239
179
|
// locale
|
|
@@ -255,13 +195,7 @@ _, global = "") => {
|
|
|
255
195
|
}
|
|
256
196
|
`, {
|
|
257
197
|
programId: !global && programId !== "classic" ? programId : null,
|
|
258
|
-
}, (res) => {
|
|
259
|
-
var _a, _b, _c, _d, _e, _f, _g;
|
|
260
|
-
return ({
|
|
261
|
-
value: ((_c = (_b = (_a = res.data) === null || _a === void 0 ? void 0 : _a.viewer) === null || _b === void 0 ? void 0 : _b.rewards) === null || _c === void 0 ? void 0 : _c.totalCount) || 0,
|
|
262
|
-
statvalue: (_g = (_f = (_e = (_d = res.data) === null || _d === void 0 ? void 0 : _d.viewer) === null || _e === void 0 ? void 0 : _e.rewards) === null || _f === void 0 ? void 0 : _f.totalCount) === null || _g === void 0 ? void 0 : _g.toString(),
|
|
263
|
-
});
|
|
264
|
-
});
|
|
198
|
+
}, (res) => { var _a, _b, _c, _d; return (_d = (_c = (_b = (_a = res.data) === null || _a === void 0 ? void 0 : _a.viewer) === null || _b === void 0 ? void 0 : _b.rewards) === null || _c === void 0 ? void 0 : _c.totalCount) === null || _d === void 0 ? void 0 : _d.toString(); });
|
|
265
199
|
};
|
|
266
200
|
const rewardsWeekQuery = (programId,
|
|
267
201
|
// locale
|
|
@@ -283,13 +217,7 @@ _, global = "") => {
|
|
|
283
217
|
}
|
|
284
218
|
`, {
|
|
285
219
|
programId: !global && programId !== "classic" ? programId : null,
|
|
286
|
-
}, (res) => {
|
|
287
|
-
var _a, _b, _c, _d, _e, _f, _g;
|
|
288
|
-
return ({
|
|
289
|
-
value: ((_c = (_b = (_a = res.data) === null || _a === void 0 ? void 0 : _a.viewer) === null || _b === void 0 ? void 0 : _b.rewards) === null || _c === void 0 ? void 0 : _c.totalCount) || 0,
|
|
290
|
-
statvalue: (_g = (_f = (_e = (_d = res.data) === null || _d === void 0 ? void 0 : _d.viewer) === null || _e === void 0 ? void 0 : _e.rewards) === null || _f === void 0 ? void 0 : _f.totalCount) === null || _g === void 0 ? void 0 : _g.toString(),
|
|
291
|
-
});
|
|
292
|
-
});
|
|
220
|
+
}, (res) => { var _a, _b, _c, _d; return (_d = (_c = (_b = (_a = res.data) === null || _a === void 0 ? void 0 : _a.viewer) === null || _b === void 0 ? void 0 : _b.rewards) === null || _c === void 0 ? void 0 : _c.totalCount) === null || _d === void 0 ? void 0 : _d.toString(); });
|
|
293
221
|
};
|
|
294
222
|
const rewardsRedeemedQuery = (programId, locale, type, unit, global = "") => {
|
|
295
223
|
return debugQuery(gql `
|
|
@@ -324,13 +252,10 @@ const rewardsRedeemedQuery = (programId, locale, type, unit, global = "") => {
|
|
|
324
252
|
unit,
|
|
325
253
|
locale,
|
|
326
254
|
}, (res) => {
|
|
327
|
-
var _a, _b, _c, _d
|
|
255
|
+
var _a, _b, _c, _d;
|
|
328
256
|
const arr = (_b = (_a = res.data) === null || _a === void 0 ? void 0 : _a.viewer) === null || _b === void 0 ? void 0 : _b.rewardBalanceDetails;
|
|
329
257
|
const fallback = (_c = res.data) === null || _c === void 0 ? void 0 : _c.fallback;
|
|
330
|
-
return
|
|
331
|
-
value: ((_d = arr === null || arr === void 0 ? void 0 : arr[0]) === null || _d === void 0 ? void 0 : _d.prettyRedeemedCredit) || 0,
|
|
332
|
-
statvalue: ((_e = arr === null || arr === void 0 ? void 0 : arr[0]) === null || _e === void 0 ? void 0 : _e.prettyRedeemedCredit) || fallback,
|
|
333
|
-
};
|
|
258
|
+
return ((_d = arr === null || arr === void 0 ? void 0 : arr[0]) === null || _d === void 0 ? void 0 : _d.prettyRedeemedCredit) || fallback;
|
|
334
259
|
});
|
|
335
260
|
};
|
|
336
261
|
const rewardsAssignedQuery = (programId, locale, type, unit, global = "") => {
|
|
@@ -366,13 +291,10 @@ const rewardsAssignedQuery = (programId, locale, type, unit, global = "") => {
|
|
|
366
291
|
unit,
|
|
367
292
|
locale,
|
|
368
293
|
}, (res) => {
|
|
369
|
-
var _a, _b, _c, _d
|
|
294
|
+
var _a, _b, _c, _d;
|
|
370
295
|
const arr = (_b = (_a = res.data) === null || _a === void 0 ? void 0 : _a.viewer) === null || _b === void 0 ? void 0 : _b.rewardBalanceDetails;
|
|
371
296
|
const fallback = (_c = res.data) === null || _c === void 0 ? void 0 : _c.fallback;
|
|
372
|
-
return
|
|
373
|
-
value: ((_d = arr === null || arr === void 0 ? void 0 : arr[0]) === null || _d === void 0 ? void 0 : _d.prettyAssignedCredit) || 0,
|
|
374
|
-
statvalue: ((_e = arr === null || arr === void 0 ? void 0 : arr[0]) === null || _e === void 0 ? void 0 : _e.prettyAssignedCredit) || fallback,
|
|
375
|
-
};
|
|
297
|
+
return ((_d = arr === null || arr === void 0 ? void 0 : arr[0]) === null || _d === void 0 ? void 0 : _d.prettyAssignedCredit) || fallback;
|
|
376
298
|
});
|
|
377
299
|
};
|
|
378
300
|
const rewardsAvailableQuery = (programId, locale, type, unit, global = "") => {
|
|
@@ -408,13 +330,10 @@ const rewardsAvailableQuery = (programId, locale, type, unit, global = "") => {
|
|
|
408
330
|
unit,
|
|
409
331
|
locale,
|
|
410
332
|
}, (res) => {
|
|
411
|
-
var _a, _b, _c, _d
|
|
333
|
+
var _a, _b, _c, _d;
|
|
412
334
|
const arr = (_b = (_a = res.data) === null || _a === void 0 ? void 0 : _a.viewer) === null || _b === void 0 ? void 0 : _b.rewardBalanceDetails;
|
|
413
335
|
const fallback = (_c = res.data) === null || _c === void 0 ? void 0 : _c.fallback;
|
|
414
|
-
return
|
|
415
|
-
value: ((_d = arr === null || arr === void 0 ? void 0 : arr[0]) === null || _d === void 0 ? void 0 : _d.prettyAvailableValue) || 0,
|
|
416
|
-
statvalue: ((_e = arr === null || arr === void 0 ? void 0 : arr[0]) === null || _e === void 0 ? void 0 : _e.prettyAvailableValue) || fallback,
|
|
417
|
-
};
|
|
336
|
+
return ((_d = arr === null || arr === void 0 ? void 0 : arr[0]) === null || _d === void 0 ? void 0 : _d.prettyAvailableValue) || fallback;
|
|
418
337
|
});
|
|
419
338
|
};
|
|
420
339
|
const parseRewardValueFormat = {
|
|
@@ -457,13 +376,10 @@ const rewardsBalanceQuery = (programId, locale, type, unit, format = "prettyValu
|
|
|
457
376
|
format: (_a = parseRewardValueFormat[format]) !== null && _a !== void 0 ? _a : "UNIT_FORMATTED",
|
|
458
377
|
locale,
|
|
459
378
|
}, (res) => {
|
|
460
|
-
var _a, _b, _c, _d
|
|
379
|
+
var _a, _b, _c, _d;
|
|
461
380
|
const arr = (_b = (_a = res.data) === null || _a === void 0 ? void 0 : _a.viewer) === null || _b === void 0 ? void 0 : _b.rewardBalanceDetails;
|
|
462
381
|
const fallback = (_c = res.data) === null || _c === void 0 ? void 0 : _c.fallback;
|
|
463
|
-
return
|
|
464
|
-
value: ((_d = arr === null || arr === void 0 ? void 0 : arr[0]) === null || _d === void 0 ? void 0 : _d.prettyAvailableValue) || 0,
|
|
465
|
-
statvalue: ((_e = arr === null || arr === void 0 ? void 0 : arr[0]) === null || _e === void 0 ? void 0 : _e.prettyAvailableValue) || fallback,
|
|
466
|
-
};
|
|
382
|
+
return ((_d = arr === null || arr === void 0 ? void 0 : arr[0]) === null || _d === void 0 ? void 0 : _d.prettyAvailableValue) || fallback;
|
|
467
383
|
});
|
|
468
384
|
};
|
|
469
385
|
// functions are of the form (programId: string, ...args: string) => string
|
|
@@ -520,15 +436,10 @@ export const queries = {
|
|
|
520
436
|
label: "Program Goals",
|
|
521
437
|
query: programGoalsQuery,
|
|
522
438
|
},
|
|
523
|
-
customFields: {
|
|
524
|
-
label: "Custom Fields",
|
|
525
|
-
query: customFieldsQuery,
|
|
526
|
-
},
|
|
527
439
|
};
|
|
528
440
|
// this should be exposed in documentation somehow
|
|
529
441
|
export const StatPaths = [
|
|
530
442
|
{ name: "programGoals", route: "/(programGoals)/:metricType/:goalId" },
|
|
531
|
-
{ name: "customFields", route: "/(customFields)/:customField" },
|
|
532
443
|
{ name: "referralsCount", route: "/(referralsCount)/:status?" },
|
|
533
444
|
{ name: "referralsMonth", route: "/(referralsMonth)" },
|
|
534
445
|
{ name: "referralsWeek", route: "/(referralsWeek)" },
|
|
@@ -562,15 +473,13 @@ export const StatPaths = [
|
|
|
562
473
|
];
|
|
563
474
|
export const StatPatterns = StatPaths.map((pattern) => pathToRegexp(pattern.route));
|
|
564
475
|
export function useBigStat(props) {
|
|
565
|
-
|
|
566
|
-
const { statType, flexReverse, alignment } = props;
|
|
567
|
-
const programId = useProgramId();
|
|
476
|
+
const { statType, flexReverse, alignment, programId = useProgramId(), } = props;
|
|
568
477
|
const locale = useLocale();
|
|
569
478
|
const userIdent = useUserIdentity();
|
|
570
479
|
const re = useMemo(() => StatPatterns.find((re) => re.exec(statType)), [statType]);
|
|
571
480
|
if (!(re === null || re === void 0 ? void 0 : re.exec(statType))) {
|
|
572
481
|
return {
|
|
573
|
-
props: {
|
|
482
|
+
props: { statvalue: "!!!", flexReverse, alignment },
|
|
574
483
|
label: "BAD PROP TYPE",
|
|
575
484
|
};
|
|
576
485
|
}
|
|
@@ -593,12 +502,7 @@ export function useBigStat(props) {
|
|
|
593
502
|
const stat = (userIdent === null || userIdent === void 0 ? void 0 : userIdent.jwt) && queries[queryName].query(programId, locale, ...queryArgs);
|
|
594
503
|
debug("stat:", stat);
|
|
595
504
|
return {
|
|
596
|
-
props: {
|
|
597
|
-
value: stat === null || stat === void 0 ? void 0 : stat.value,
|
|
598
|
-
statvalue: (_a = stat === null || stat === void 0 ? void 0 : stat.statvalue) !== null && _a !== void 0 ? _a : LOADING,
|
|
599
|
-
flexReverse,
|
|
600
|
-
alignment,
|
|
601
|
-
},
|
|
505
|
+
props: { statvalue: stat !== null && stat !== void 0 ? stat : LOADING, flexReverse, alignment },
|
|
602
506
|
label,
|
|
603
507
|
};
|
|
604
508
|
}
|