@saasquatch/mint-components 1.3.1-7 → 1.3.2-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 +23 -31
- package/dist/cjs/{ShadowViewAddon-b021dc8c.js → ShadowViewAddon-75c18b96.js} +1 -1
- package/dist/cjs/{global-5610b310.js → global-041b5338.js} +334 -176
- package/dist/cjs/{sqm-leaderboard-rank-view-c287ac06.js → index-19309631.js} +3 -10
- package/dist/cjs/{index.module-03ce03c2.js → index.module-6a7bda18.js} +1 -0
- package/dist/cjs/loader.cjs.js +4 -3
- package/dist/cjs/mint-components.cjs.js +4 -3
- package/dist/cjs/{re-render-b5efae5f.js → re-render-7cdb2d81.js} +1 -1
- 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_26.cjs.entry.js → sqm-divided-layout_27.cjs.entry.js} +1093 -61
- package/dist/cjs/sqm-graphql-client-provider.cjs.entry.js +1 -1
- package/dist/cjs/sqm-leaderboard-rank-view-35015d30.js +10 -0
- package/dist/cjs/sqm-leaderboard-rank.cjs.entry.js +9 -7
- 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-153503f0.js → sqm-navigation-sidebar-item-view-e99b4a10.js} +1 -1
- package/dist/cjs/sqm-navigation-sidebar-item.cjs.entry.js +2 -2
- package/dist/cjs/sqm-popup-container.cjs.entry.js +1 -1
- package/dist/cjs/{sqm-portal-email-verification-view-1d8728f9.js → sqm-portal-email-verification-view-5e955797.js} +1 -1
- package/dist/cjs/sqm-portal-email-verification.cjs.entry.js +4 -3
- package/dist/cjs/{sqm-portal-footer-view-dc4b0667.js → sqm-portal-footer-view-9089feb7.js} +1 -1
- package/dist/cjs/sqm-portal-footer.cjs.entry.js +4 -3
- package/dist/cjs/sqm-portal-forgot-password.cjs.entry.js +1 -1
- package/dist/cjs/sqm-portal-logout.cjs.entry.js +1 -1
- package/dist/cjs/{sqm-portal-profile-view-a7519f19.js → sqm-portal-profile-view-a23ea292.js} +1 -1
- package/dist/cjs/sqm-portal-profile.cjs.entry.js +4 -3
- package/dist/cjs/sqm-portal-protected-route.cjs.entry.js +1 -1
- package/dist/cjs/sqm-portal-reset-password.cjs.entry.js +1 -1
- package/dist/cjs/sqm-portal-verify-email.cjs.entry.js +1 -1
- 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-rewards-table.cjs.entry.js +332 -0
- package/dist/cjs/sqm-share-code.cjs.entry.js +1 -1
- package/dist/cjs/sqm-task-card-view-cb11e56f.js +472 -0
- package/dist/cjs/sqm-task-card.cjs.entry.js +32 -0
- package/dist/cjs/tslib.es6-0e81fab1.js +56 -0
- package/dist/cjs/useChildElements-428ca5b8.js +21 -0
- package/dist/cjs/{useDemoBigStat-d7bd93f2.js → useDemoBigStat-17e61803.js} +3 -2
- package/dist/collection/collection-manifest.json +6 -3
- package/dist/collection/{stories → components/sqm-asset-card}/AssetCard.stories.js +2 -2
- package/dist/collection/{stories → components/sqm-big-stat}/BigStat.stories.js +2 -2
- package/dist/collection/{stories → components/sqm-big-stat}/UseBigStat.stories.js +4 -4
- package/dist/collection/components/sqm-big-stat/sqm-big-stat.js +0 -20
- package/dist/collection/components/sqm-big-stat/useBigStat.js +2 -1
- package/dist/collection/{stories → components/sqm-divided-layout}/DividedLayout.stories.js +4 -4
- package/dist/collection/{stories → components/sqm-edit-profile}/EditProfileForm.stories.js +2 -2
- package/dist/collection/{stories → components/sqm-edit-profile}/UseEditProfile.stories.js +1 -1
- package/dist/collection/{stories → components/sqm-form-message}/FormMessage.stories.js +1 -1
- package/dist/collection/{stories → components/sqm-hero}/Hero.stories.js +2 -2
- package/dist/collection/{stories → components/sqm-leaderboard}/Leaderboard.stories.js +2 -2
- package/dist/collection/{stories → components/sqm-leaderboard}/UseLeaderboard.stories.js +3 -3
- package/dist/collection/{stories → components/sqm-leaderboard-rank}/LeaderboardRank.stories.js +2 -2
- package/dist/collection/{stories → components/sqm-name-fields}/NameFields.stories.js +2 -2
- package/dist/collection/{stories → components/sqm-navigation-sidebar}/NavigationSidebar.stories.js +3 -3
- package/dist/collection/{stories → components/sqm-navigation-sidebar-item}/SidebarItem.stories.js +2 -2
- package/dist/collection/{stories → components/sqm-password-field}/PasswordField.stories.js +1 -1
- package/dist/collection/{stories → components/sqm-portal-change-password}/ChangePassword.stories.js +3 -3
- package/dist/collection/{stories → components/sqm-portal-email-verification}/PortalEmailVerification.stories.js +3 -3
- package/dist/collection/{stories → components/sqm-portal-footer}/PortalFooter.stories.js +2 -2
- package/dist/collection/{stories → components/sqm-portal-forgot-password}/PortalForgotPassword.stories.js +3 -3
- package/dist/collection/{stories → components/sqm-portal-frame}/PortalFrame.stories.js +2 -2
- package/dist/collection/{stories → components/sqm-portal-login}/PortalLogin.stories.js +2 -2
- package/dist/collection/{stories → components/sqm-portal-profile}/PortalProfile.stories.js +2 -2
- package/dist/collection/{stories → components/sqm-portal-register}/PortalRegister.stories.js +2 -2
- package/dist/collection/components/sqm-portal-register/sqm-portal-register.js +1 -1
- package/dist/collection/{stories → components/sqm-portal-reset-password}/PortalResetPassword.stories.js +3 -3
- package/dist/collection/{stories → components/sqm-portal-verify-email}/PortalVerifyEmail.stories.js +3 -3
- package/dist/collection/{stories → components/sqm-program-menu}/ProgramMenu.stories.js +2 -2
- package/dist/collection/{stories → components/sqm-referral-iframe}/ReferralIframe.stories.js +2 -2
- package/dist/collection/{stories → components/sqm-referral-table}/ReferralTable.stories.js +2 -2
- package/dist/collection/{stories → components/sqm-referral-table}/ReferralTableCell.stories.js +1 -1
- package/dist/collection/{stories → components/sqm-referral-table}/ReferralTableRewardsCell.stories.js +1 -1
- 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/components/sqm-referral-table/useReferralTable.js +2 -2
- package/dist/collection/components/sqm-reward-exchange-list/UseRewardExchangeList.stories.js +143 -0
- package/dist/collection/components/sqm-reward-exchange-list/assets/Leftward Arrow.svg +3 -0
- package/dist/collection/components/sqm-reward-exchange-list/assets/Reward-icon.png +0 -0
- package/dist/collection/components/sqm-reward-exchange-list/progressBar.js +70 -0
- package/dist/collection/components/sqm-reward-exchange-list/sqm-reward-exchange-list-view.js +226 -0
- package/dist/collection/components/sqm-reward-exchange-list/sqm-reward-exchange-list.js +120 -0
- package/dist/collection/components/sqm-reward-exchange-list/useRewardExchangeList.js +194 -0
- package/dist/collection/{stories → components/sqm-rewards-table}/Router.stories.js +1 -1
- package/dist/collection/components/sqm-rewards-table/sqm-rewards-table.js +222 -0
- package/dist/collection/components/sqm-rewards-table/useRewardsTable.js +195 -0
- package/dist/collection/{stories → components/sqm-share-button}/ShareButton.stories.js +2 -2
- package/dist/collection/{stories → components/sqm-share-button}/UseShareButton.stories.js +2 -2
- package/dist/collection/{stories → components/sqm-share-link}/ShareLink.stories.js +2 -2
- package/dist/collection/{stories → components/sqm-share-link}/UseShareLink.stories.js +3 -3
- package/dist/collection/components/sqm-stencilbook/sqm-stencilbook.js +40 -36
- package/dist/collection/components/sqm-task-card/Matrix.js +63 -0
- package/dist/collection/components/sqm-task-card/SVGs.js +15 -0
- package/dist/collection/components/sqm-task-card/TaskCard.stories.js +291 -0
- package/dist/collection/components/sqm-task-card/sqm-task-card-view.js +453 -0
- package/dist/collection/components/sqm-task-card/sqm-task-card.js +192 -0
- package/dist/collection/{stories → components/sqm-user-name}/UserName.stories.js +3 -3
- package/dist/collection/global/styles.js +278 -69
- package/dist/collection/global/styles.ts +278 -69
- package/dist/collection/tables/GenericTableView.js +51 -0
- package/dist/collection/tables/TableSlots.js +22 -0
- package/dist/collection/{components/sqm-referral-table → tables}/re-render.js +0 -0
- package/dist/collection/{components/sqm-referral-table → tables}/sqm-table-cell.js +0 -0
- package/dist/collection/{components/sqm-referral-table → tables}/sqm-table-row.js +0 -0
- package/dist/collection/{components/sqm-referral-table → tables}/useChildElements.js +0 -0
- package/dist/esm/{ShadowViewAddon-2e3ea31f.js → ShadowViewAddon-fff5d35d.js} +1 -1
- package/dist/esm/{global-cc82aa03.js → global-5ecbf81a.js} +281 -123
- package/dist/esm/{sqm-leaderboard-rank-view-4f48da0c.js → index-2f5dd0a1.js} +3 -9
- package/dist/esm/{index.module-33c313d2.js → index.module-f80561db.js} +1 -1
- package/dist/esm/loader.js +4 -3
- package/dist/esm/mint-components.js +4 -3
- package/dist/esm/{re-render-338d931e.js → re-render-9ab5fe0f.js} +1 -1
- 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_26.entry.js → sqm-divided-layout_27.entry.js} +1089 -58
- package/dist/esm/sqm-graphql-client-provider.entry.js +1 -1
- package/dist/esm/sqm-leaderboard-rank-view-da91f5f3.js +8 -0
- package/dist/esm/sqm-leaderboard-rank.entry.js +5 -3
- 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-5dfa535f.js → sqm-navigation-sidebar-item-view-8a3f374b.js} +1 -1
- package/dist/esm/sqm-navigation-sidebar-item.entry.js +2 -2
- package/dist/esm/sqm-popup-container.entry.js +1 -1
- package/dist/esm/{sqm-portal-email-verification-view-87bf8191.js → sqm-portal-email-verification-view-90781be2.js} +1 -1
- package/dist/esm/sqm-portal-email-verification.entry.js +4 -3
- package/dist/esm/{sqm-portal-footer-view-da135cff.js → sqm-portal-footer-view-c317518e.js} +1 -1
- package/dist/esm/sqm-portal-footer.entry.js +4 -3
- package/dist/esm/sqm-portal-forgot-password.entry.js +1 -1
- package/dist/esm/sqm-portal-logout.entry.js +1 -1
- package/dist/esm/{sqm-portal-profile-view-8781176c.js → sqm-portal-profile-view-824c8242.js} +1 -1
- package/dist/esm/sqm-portal-profile.entry.js +4 -3
- package/dist/esm/sqm-portal-protected-route.entry.js +1 -1
- package/dist/esm/sqm-portal-reset-password.entry.js +1 -1
- package/dist/esm/sqm-portal-verify-email.entry.js +1 -1
- 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-rewards-table.entry.js +328 -0
- package/dist/esm/sqm-share-code.entry.js +1 -1
- package/dist/esm/sqm-task-card-view-6a082a21.js +469 -0
- package/dist/esm/sqm-task-card.entry.js +28 -0
- package/dist/esm/tslib.es6-7ac9d7e4.js +53 -0
- package/dist/esm/useChildElements-506f00d0.js +19 -0
- package/dist/esm/{useDemoBigStat-bb14d844.js → useDemoBigStat-b71fe122.js} +3 -2
- package/dist/esm-es5/{ShadowViewAddon-2e3ea31f.js → ShadowViewAddon-fff5d35d.js} +1 -1
- package/dist/esm-es5/{global-cc82aa03.js → global-5ecbf81a.js} +2 -16
- package/dist/esm-es5/index-2f5dd0a1.js +1 -0
- package/dist/esm-es5/{index.module-33c313d2.js → index.module-f80561db.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-338d931e.js → re-render-9ab5fe0f.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_27.entry.js +1 -0
- package/dist/esm-es5/sqm-graphql-client-provider.entry.js +1 -1
- package/dist/esm-es5/sqm-leaderboard-rank-view-da91f5f3.js +1 -0
- 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-5dfa535f.js → sqm-navigation-sidebar-item-view-8a3f374b.js} +1 -1
- 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-87bf8191.js → sqm-portal-email-verification-view-90781be2.js} +1 -1
- package/dist/esm-es5/sqm-portal-email-verification.entry.js +1 -1
- package/dist/esm-es5/{sqm-portal-footer-view-da135cff.js → sqm-portal-footer-view-c317518e.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-8781176c.js → sqm-portal-profile-view-824c8242.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-rewards-table.entry.js +1 -0
- package/dist/esm-es5/sqm-share-code.entry.js +1 -1
- package/dist/esm-es5/sqm-task-card-view-6a082a21.js +1 -0
- package/dist/esm-es5/sqm-task-card.entry.js +1 -0
- package/dist/esm-es5/tslib.es6-7ac9d7e4.js +15 -0
- package/dist/esm-es5/useChildElements-506f00d0.js +1 -0
- package/dist/esm-es5/{useDemoBigStat-bb14d844.js → useDemoBigStat-b71fe122.js} +1 -1
- package/dist/mint-components/assets/Leftward Arrow.svg +3 -0
- package/dist/mint-components/assets/Reward-icon.png +0 -0
- package/dist/mint-components/global/styles.ts +278 -69
- package/dist/mint-components/mint-components.esm.js +1 -1
- package/dist/mint-components/mint-components.js +1 -1
- package/dist/mint-components/{p-846cebe7.js → p-00190438.js} +1 -1
- package/dist/mint-components/{p-ead730e0.system.entry.js → p-04516274.system.entry.js} +1 -1
- package/dist/mint-components/{p-f02360c9.js → p-05cca77b.js} +1 -1
- package/dist/mint-components/{p-775529b9.system.entry.js → p-0688c9c2.system.entry.js} +1 -1
- package/dist/mint-components/p-11c75956.entry.js +1 -0
- package/dist/mint-components/p-12fb9197.entry.js +1 -0
- package/dist/mint-components/{p-713ea21e.system.entry.js → p-16535642.system.entry.js} +1 -1
- package/dist/mint-components/p-16da5146.entry.js +1 -0
- package/dist/mint-components/{p-c43f3b6b.system.js → p-1813b9b9.system.js} +1 -1
- package/dist/mint-components/p-189219ee.system.js +1 -0
- package/dist/mint-components/{p-2a6f038c.system.entry.js → p-1ac9c24b.system.entry.js} +1 -1
- package/dist/mint-components/{p-34dea514.system.entry.js → p-1b414d8f.system.entry.js} +1 -1
- package/dist/mint-components/{p-871ed4c8.system.js → p-1fb688a9.system.js} +1 -1
- package/dist/mint-components/p-21dfdeb8.entry.js +1 -0
- package/dist/mint-components/p-23a0bdae.entry.js +1 -0
- package/dist/mint-components/{p-7b7613cf.system.entry.js → p-2a025d2a.system.entry.js} +1 -1
- package/dist/mint-components/p-2ae9c535.js +1 -0
- package/dist/mint-components/{p-4a313a31.js → p-2bce988c.js} +1 -1
- package/dist/mint-components/{p-2bfc61a5.entry.js → p-2f171597.entry.js} +1 -1
- package/dist/mint-components/{p-8e87084e.system.js → p-3052c913.system.js} +1 -1
- package/dist/mint-components/p-337b49ee.entry.js +1 -0
- package/dist/mint-components/{p-1996e9c8.system.js → p-3b0acfcd.system.js} +1 -1
- package/dist/mint-components/{p-772341ce.system.entry.js → p-3fd33dee.system.entry.js} +1 -1
- package/dist/mint-components/{p-38fbdc3a.js → p-405a9253.js} +2 -2
- package/dist/mint-components/{p-e83632dd.js → p-434ee9c1.js} +1 -1
- package/dist/mint-components/{p-086aaa1e.system.entry.js → p-4ba2faf2.system.entry.js} +1 -1
- package/dist/mint-components/{p-7c3a270c.system.entry.js → p-505f5c59.system.entry.js} +1 -1
- package/dist/mint-components/p-550b4579.system.entry.js +1 -0
- package/dist/mint-components/p-55e02769.entry.js +13 -0
- package/dist/mint-components/{p-c434c33a.system.entry.js → p-57a53dbd.system.entry.js} +1 -1
- package/dist/mint-components/p-58d9b2f0.js +15 -0
- package/dist/mint-components/{p-e2fc8abf.system.entry.js → p-5dfc6804.system.entry.js} +1 -1
- package/dist/mint-components/{p-01722953.entry.js → p-5f28af29.entry.js} +1 -1
- package/dist/mint-components/{p-0f84ebfe.entry.js → p-6cdc70f4.entry.js} +1 -1
- package/dist/mint-components/p-6d545e13.entry.js +1 -0
- package/dist/mint-components/p-70837c1c.entry.js +49 -0
- package/dist/mint-components/p-71d942af.entry.js +9 -0
- package/dist/mint-components/p-795a7259.system.entry.js +1 -0
- package/dist/mint-components/p-7c138c84.entry.js +1 -0
- package/dist/mint-components/{p-16d0ec52.system.entry.js → p-7c13e32e.system.entry.js} +1 -1
- package/dist/mint-components/p-7c261ea0.system.entry.js +1 -0
- package/dist/mint-components/p-8034f81c.system.entry.js +1 -0
- package/dist/mint-components/{p-d1604020.system.js → p-82ab88fe.system.js} +1 -1
- package/dist/mint-components/{p-c32fb8e5.entry.js → p-82d7a2ba.entry.js} +1 -1
- package/dist/mint-components/{p-a011c13c.entry.js → p-844f9bad.entry.js} +1 -1
- package/dist/mint-components/{p-48cdbd66.js → p-844fd903.js} +1 -1
- package/dist/mint-components/p-86cd9f79.entry.js +286 -0
- package/dist/mint-components/p-8c16f04e.js +1 -0
- package/dist/mint-components/{p-4843c461.js → p-8e37c08d.js} +1 -1
- package/dist/mint-components/p-91d39961.system.js +1 -0
- package/dist/mint-components/{p-ff3c9d53.system.entry.js → p-a0045707.system.entry.js} +1 -1
- package/dist/mint-components/p-a0cfd3d9.system.js +1 -0
- package/dist/mint-components/{p-f4a9712a.entry.js → p-a4a00461.entry.js} +2 -2
- package/dist/mint-components/{p-156464b2.entry.js → p-a7f0b2f6.entry.js} +1 -1
- package/dist/mint-components/{p-b3e976e0.entry.js → p-aba21f90.entry.js} +1 -1
- package/dist/mint-components/{p-dd0b0a4a.system.entry.js → p-af06ea5b.system.entry.js} +1 -1
- package/dist/mint-components/p-b3af1c6f.js +1 -0
- package/dist/mint-components/p-bf04a8e1.system.entry.js +1 -0
- package/dist/mint-components/p-bf055b6c.system.js +1 -0
- package/dist/mint-components/p-c3866bfa.system.entry.js +1 -0
- package/dist/mint-components/{p-e282d07b.system.entry.js → p-c9c4f31b.system.entry.js} +1 -1
- package/dist/mint-components/{p-bbb3ff09.js → p-cc3510c8.js} +1 -1
- package/dist/mint-components/{p-754060c8.system.js → p-ceeaf074.system.js} +21 -35
- package/dist/mint-components/p-d0913f8d.system.js +1 -0
- package/dist/mint-components/{p-b1e03222.entry.js → p-d3787c3a.entry.js} +1 -1
- package/dist/mint-components/{p-c1cadf29.entry.js → p-d9cc041f.entry.js} +1 -1
- package/dist/mint-components/{p-683a4971.system.entry.js → p-db723323.system.entry.js} +1 -1
- package/dist/mint-components/p-dd6a666e.system.js +15 -0
- package/dist/mint-components/p-dfc3cf82.js +1 -0
- package/dist/mint-components/p-e19a57a4.system.entry.js +1 -0
- package/dist/mint-components/p-e22eed7b.entry.js +1 -0
- package/dist/mint-components/p-e2ebe90c.entry.js +1 -0
- package/dist/mint-components/{p-1369c11a.system.entry.js → p-e475a5ff.system.entry.js} +1 -1
- package/dist/mint-components/{p-36de7c74.entry.js → p-e9ab90a1.entry.js} +1 -1
- package/dist/mint-components/p-ecbabf6e.system.js +1 -0
- package/dist/mint-components/{p-b4fc47a0.js → p-f1e1086e.js} +2 -17
- package/dist/mint-components/p-f41ab9e1.system.js +1 -0
- package/dist/mint-components/{p-fb185ffd.system.js → p-f87d8f53.system.js} +1 -1
- package/dist/mint-components/{p-33b57b39.system.entry.js → p-fcaa5886.system.entry.js} +1 -1
- package/dist/types/{stories → components/sqm-asset-card}/AssetCard.stories.d.ts +0 -0
- package/dist/types/{stories → components/sqm-big-stat}/BigStat.stories.d.ts +0 -0
- package/dist/types/{stories → components/sqm-big-stat}/UseBigStat.stories.d.ts +0 -0
- package/dist/types/components/sqm-big-stat/sqm-big-stat.d.ts +0 -6
- package/dist/types/{stories → components/sqm-divided-layout}/DividedLayout.stories.d.ts +0 -0
- package/dist/types/{stories → components/sqm-edit-profile}/EditProfileForm.stories.d.ts +0 -0
- package/dist/types/{stories → components/sqm-edit-profile}/UseEditProfile.stories.d.ts +0 -0
- package/dist/types/{stories → components/sqm-form-message}/FormMessage.stories.d.ts +0 -0
- package/dist/types/{stories → components/sqm-hero}/Hero.stories.d.ts +0 -0
- package/dist/types/{stories → components/sqm-leaderboard}/Leaderboard.stories.d.ts +0 -0
- package/dist/types/{stories → components/sqm-leaderboard}/UseLeaderboard.stories.d.ts +0 -0
- package/dist/types/{stories → components/sqm-leaderboard-rank}/LeaderboardRank.stories.d.ts +0 -0
- package/dist/types/{stories → components/sqm-name-fields}/NameFields.stories.d.ts +0 -0
- package/dist/types/{stories → components/sqm-navigation-sidebar}/NavigationSidebar.stories.d.ts +0 -0
- package/dist/types/{stories → components/sqm-navigation-sidebar-item}/SidebarItem.stories.d.ts +0 -0
- package/dist/types/{stories → components/sqm-password-field}/PasswordField.stories.d.ts +0 -0
- package/dist/types/{stories → components/sqm-portal-change-password}/ChangePassword.stories.d.ts +0 -0
- package/dist/types/{stories → components/sqm-portal-email-verification}/PortalEmailVerification.stories.d.ts +0 -0
- package/dist/types/{stories → components/sqm-portal-footer}/PortalFooter.stories.d.ts +0 -0
- package/dist/types/{stories → components/sqm-portal-forgot-password}/PortalForgotPassword.stories.d.ts +0 -0
- package/dist/types/{stories → components/sqm-portal-frame}/PortalFrame.stories.d.ts +0 -0
- package/dist/types/{stories → components/sqm-portal-login}/PortalLogin.stories.d.ts +0 -0
- package/dist/types/{stories → components/sqm-portal-profile}/PortalProfile.stories.d.ts +0 -0
- package/dist/types/{stories → components/sqm-portal-register}/PortalRegister.stories.d.ts +0 -0
- package/dist/types/{stories → components/sqm-portal-reset-password}/PortalResetPassword.stories.d.ts +0 -0
- package/dist/types/{stories → components/sqm-portal-verify-email}/PortalVerifyEmail.stories.d.ts +0 -0
- package/dist/types/{stories → components/sqm-program-menu}/ProgramMenu.stories.d.ts +0 -0
- package/dist/types/{stories → components/sqm-referral-iframe}/ReferralIframe.stories.d.ts +0 -0
- package/dist/types/{stories → components/sqm-referral-table}/ReferralTable.stories.d.ts +0 -0
- package/dist/types/{stories → components/sqm-referral-table}/ReferralTableCell.stories.d.ts +0 -0
- package/dist/types/{stories → components/sqm-referral-table}/ReferralTableRewardsCell.stories.d.ts +0 -0
- package/dist/types/components/sqm-reward-exchange-list/UseRewardExchangeList.stories.d.ts +28 -0
- package/dist/types/components/sqm-reward-exchange-list/progressBar.d.ts +3 -0
- package/dist/types/components/sqm-reward-exchange-list/sqm-reward-exchange-list-view.d.ts +23 -0
- package/dist/types/components/sqm-reward-exchange-list/sqm-reward-exchange-list.d.ts +21 -0
- package/dist/types/components/sqm-reward-exchange-list/useRewardExchangeList.d.ts +46 -0
- package/dist/types/{stories → components/sqm-rewards-table}/Router.stories.d.ts +0 -0
- package/dist/types/components/sqm-rewards-table/sqm-rewards-table.d.ts +32 -0
- package/dist/types/components/sqm-rewards-table/useRewardsTable.d.ts +5 -0
- package/dist/types/{stories → components/sqm-share-button}/ShareButton.stories.d.ts +0 -0
- package/dist/types/{stories → components/sqm-share-button}/UseShareButton.stories.d.ts +0 -0
- package/dist/types/{stories → components/sqm-share-link}/ShareLink.stories.d.ts +0 -0
- package/dist/types/{stories → components/sqm-share-link}/UseShareLink.stories.d.ts +0 -0
- package/dist/types/components/sqm-task-card/Matrix.d.ts +11 -0
- package/dist/types/components/sqm-task-card/SVGs.d.ts +3 -0
- package/dist/types/components/sqm-task-card/TaskCard.stories.d.ts +9 -0
- package/dist/types/components/sqm-task-card/sqm-task-card-view.d.ts +23 -0
- package/dist/types/components/sqm-task-card/sqm-task-card.d.ts +41 -0
- package/dist/types/components/sqm-user-name/UserName.stories.d.ts +6 -0
- package/dist/types/components.d.ts +185 -10
- package/dist/types/global/styles.d.ts +1 -1
- package/dist/types/tables/GenericTableView.d.ts +29 -0
- package/dist/types/tables/TableSlots.d.ts +8 -0
- package/dist/types/{components/sqm-referral-table → tables}/re-render.d.ts +0 -0
- package/dist/types/{components/sqm-referral-table → tables}/sqm-table-cell.d.ts +0 -0
- package/dist/types/{components/sqm-referral-table → tables}/sqm-table-row.d.ts +0 -0
- package/dist/types/{components/sqm-referral-table → tables}/useChildElements.d.ts +0 -0
- package/grapesjs/grapesjs.js +1 -1
- package/package.json +1 -1
- package/dist/esm-es5/sqm-divided-layout_26.entry.js +0 -1
- package/dist/esm-es5/sqm-leaderboard-rank-view-4f48da0c.js +0 -1
- package/dist/mint-components/p-1a2eadd1.entry.js +0 -1
- package/dist/mint-components/p-21bb74aa.system.entry.js +0 -1
- package/dist/mint-components/p-2ad23b02.system.entry.js +0 -1
- package/dist/mint-components/p-4cabd25b.entry.js +0 -1
- package/dist/mint-components/p-4e61f958.system.js +0 -1
- package/dist/mint-components/p-5950e58a.entry.js +0 -1
- package/dist/mint-components/p-6b21186a.entry.js +0 -230
- package/dist/mint-components/p-7129015b.system.js +0 -1
- package/dist/mint-components/p-83bdbf25.js +0 -1
- package/dist/mint-components/p-8cbc24b8.entry.js +0 -9
- package/dist/mint-components/p-8d65fef3.entry.js +0 -1
- package/dist/mint-components/p-b462e84e.system.js +0 -1
- package/dist/mint-components/p-bd67990b.system.entry.js +0 -1
- package/dist/mint-components/p-c03c68c1.entry.js +0 -1
- package/dist/mint-components/p-c35bb682.system.entry.js +0 -1
- package/dist/mint-components/p-cff66d2e.entry.js +0 -1
- package/dist/mint-components/p-d482d10c.entry.js +0 -1
- package/dist/mint-components/p-d8a80855.entry.js +0 -1
- package/dist/mint-components/p-e52c77cd.entry.js +0 -13
- package/dist/mint-components/p-ee6f5a1c.system.js +0 -1
- package/dist/mint-components/p-fa20e730.entry.js +0 -1
- package/dist/mint-components/p-ff3d1ed1.system.entry.js +0 -1
- package/dist/types/stories/UserName.stories.d.ts +0 -6
|
@@ -0,0 +1,222 @@
|
|
|
1
|
+
import { isDemo } from "@saasquatch/component-boilerplate";
|
|
2
|
+
import { withHooks } from "@saasquatch/stencil-hooks";
|
|
3
|
+
import { Component, h, Prop } from "@stencil/core";
|
|
4
|
+
import deepmerge from "deepmerge";
|
|
5
|
+
import { GenericTableView, } from "../../tables/GenericTableView";
|
|
6
|
+
import { EmptySlot, LoadingSlot, EmptySkeleton, LoadingSkeleton } from "../../tables/TableSlots";
|
|
7
|
+
import { useRewardsTable, CSS_NAMESPACE } from "./useRewardsTable";
|
|
8
|
+
/**
|
|
9
|
+
* @uiName Rewards Table
|
|
10
|
+
*/
|
|
11
|
+
export class RewardsTable {
|
|
12
|
+
constructor() {
|
|
13
|
+
/** @uiName Number of rewards per page */
|
|
14
|
+
this.perPage = 3;
|
|
15
|
+
/** @uiName Show column labels */
|
|
16
|
+
this.showLabels = true;
|
|
17
|
+
/** @uiName Previous button text */
|
|
18
|
+
this.prevLabel = "Prev";
|
|
19
|
+
/** @uiName View More button text */
|
|
20
|
+
this.moreLabel = "Next";
|
|
21
|
+
/** @uiName Show Referred by user in table */
|
|
22
|
+
this.showReferrer = false;
|
|
23
|
+
withHooks(this);
|
|
24
|
+
}
|
|
25
|
+
disconnectedCallback() { }
|
|
26
|
+
render() {
|
|
27
|
+
const empty = h(EmptySlot, { label: "No Rewards Yet" });
|
|
28
|
+
const loading = h(LoadingSlot, null);
|
|
29
|
+
const { states, data, callbacks, elements } = isDemo()
|
|
30
|
+
? useRewardsTableDemo(this)
|
|
31
|
+
: useRewardsTable(this, empty, loading);
|
|
32
|
+
return (h(GenericTableView, { states: states, data: data, callbacks: callbacks, elements: elements }));
|
|
33
|
+
}
|
|
34
|
+
static get is() { return "sqm-rewards-table"; }
|
|
35
|
+
static get encapsulation() { return "shadow"; }
|
|
36
|
+
static get properties() { return {
|
|
37
|
+
"programId": {
|
|
38
|
+
"type": "string",
|
|
39
|
+
"mutable": false,
|
|
40
|
+
"complexType": {
|
|
41
|
+
"original": "string",
|
|
42
|
+
"resolved": "string",
|
|
43
|
+
"references": {}
|
|
44
|
+
},
|
|
45
|
+
"required": false,
|
|
46
|
+
"optional": false,
|
|
47
|
+
"docs": {
|
|
48
|
+
"tags": [{
|
|
49
|
+
"text": "Program",
|
|
50
|
+
"name": "uiName"
|
|
51
|
+
}],
|
|
52
|
+
"text": "Filters to only show rewards in this program. Will default to filtering by the program context where\r\nthis table lives. If no program ID is set or provided by context, then shows all rewards from all programs."
|
|
53
|
+
},
|
|
54
|
+
"attribute": "program-id",
|
|
55
|
+
"reflect": false
|
|
56
|
+
},
|
|
57
|
+
"perPage": {
|
|
58
|
+
"type": "number",
|
|
59
|
+
"mutable": false,
|
|
60
|
+
"complexType": {
|
|
61
|
+
"original": "number",
|
|
62
|
+
"resolved": "number",
|
|
63
|
+
"references": {}
|
|
64
|
+
},
|
|
65
|
+
"required": false,
|
|
66
|
+
"optional": false,
|
|
67
|
+
"docs": {
|
|
68
|
+
"tags": [{
|
|
69
|
+
"text": "Number of rewards per page",
|
|
70
|
+
"name": "uiName"
|
|
71
|
+
}],
|
|
72
|
+
"text": ""
|
|
73
|
+
},
|
|
74
|
+
"attribute": "per-page",
|
|
75
|
+
"reflect": false,
|
|
76
|
+
"defaultValue": "3"
|
|
77
|
+
},
|
|
78
|
+
"showLabels": {
|
|
79
|
+
"type": "boolean",
|
|
80
|
+
"mutable": false,
|
|
81
|
+
"complexType": {
|
|
82
|
+
"original": "boolean",
|
|
83
|
+
"resolved": "boolean",
|
|
84
|
+
"references": {}
|
|
85
|
+
},
|
|
86
|
+
"required": false,
|
|
87
|
+
"optional": true,
|
|
88
|
+
"docs": {
|
|
89
|
+
"tags": [{
|
|
90
|
+
"text": "Show column labels",
|
|
91
|
+
"name": "uiName"
|
|
92
|
+
}],
|
|
93
|
+
"text": ""
|
|
94
|
+
},
|
|
95
|
+
"attribute": "show-labels",
|
|
96
|
+
"reflect": false,
|
|
97
|
+
"defaultValue": "true"
|
|
98
|
+
},
|
|
99
|
+
"prevLabel": {
|
|
100
|
+
"type": "string",
|
|
101
|
+
"mutable": false,
|
|
102
|
+
"complexType": {
|
|
103
|
+
"original": "string",
|
|
104
|
+
"resolved": "string",
|
|
105
|
+
"references": {}
|
|
106
|
+
},
|
|
107
|
+
"required": false,
|
|
108
|
+
"optional": true,
|
|
109
|
+
"docs": {
|
|
110
|
+
"tags": [{
|
|
111
|
+
"text": "Previous button text",
|
|
112
|
+
"name": "uiName"
|
|
113
|
+
}],
|
|
114
|
+
"text": ""
|
|
115
|
+
},
|
|
116
|
+
"attribute": "prev-label",
|
|
117
|
+
"reflect": false,
|
|
118
|
+
"defaultValue": "\"Prev\""
|
|
119
|
+
},
|
|
120
|
+
"moreLabel": {
|
|
121
|
+
"type": "string",
|
|
122
|
+
"mutable": false,
|
|
123
|
+
"complexType": {
|
|
124
|
+
"original": "string",
|
|
125
|
+
"resolved": "string",
|
|
126
|
+
"references": {}
|
|
127
|
+
},
|
|
128
|
+
"required": false,
|
|
129
|
+
"optional": true,
|
|
130
|
+
"docs": {
|
|
131
|
+
"tags": [{
|
|
132
|
+
"text": "View More button text",
|
|
133
|
+
"name": "uiName"
|
|
134
|
+
}],
|
|
135
|
+
"text": ""
|
|
136
|
+
},
|
|
137
|
+
"attribute": "more-label",
|
|
138
|
+
"reflect": false,
|
|
139
|
+
"defaultValue": "\"Next\""
|
|
140
|
+
},
|
|
141
|
+
"showReferrer": {
|
|
142
|
+
"type": "boolean",
|
|
143
|
+
"mutable": false,
|
|
144
|
+
"complexType": {
|
|
145
|
+
"original": "boolean",
|
|
146
|
+
"resolved": "boolean",
|
|
147
|
+
"references": {}
|
|
148
|
+
},
|
|
149
|
+
"required": false,
|
|
150
|
+
"optional": true,
|
|
151
|
+
"docs": {
|
|
152
|
+
"tags": [{
|
|
153
|
+
"text": "Show Referred by user in table",
|
|
154
|
+
"name": "uiName"
|
|
155
|
+
}],
|
|
156
|
+
"text": ""
|
|
157
|
+
},
|
|
158
|
+
"attribute": "show-referrer",
|
|
159
|
+
"reflect": false,
|
|
160
|
+
"defaultValue": "false"
|
|
161
|
+
},
|
|
162
|
+
"demoData": {
|
|
163
|
+
"type": "unknown",
|
|
164
|
+
"mutable": false,
|
|
165
|
+
"complexType": {
|
|
166
|
+
"original": "DemoData<GenericTableViewProps>",
|
|
167
|
+
"resolved": "{ states?: { hasPrev: boolean; hasNext: boolean; show: \"loading\" | \"empty\" | \"rows\"; namespace: string; }; data?: { textOverrides: { showLabels: boolean; prevLabel: string; moreLabel: string; }; }; elements?: { columns: VNode[]; rows: VNode[][]; loading?: boolean; emptyElement?: VNode; loadingElement?: VNode; page?: number; }; }",
|
|
168
|
+
"references": {
|
|
169
|
+
"DemoData": {
|
|
170
|
+
"location": "import",
|
|
171
|
+
"path": "../../global/demo"
|
|
172
|
+
},
|
|
173
|
+
"GenericTableViewProps": {
|
|
174
|
+
"location": "import",
|
|
175
|
+
"path": "../../tables/GenericTableView"
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
},
|
|
179
|
+
"required": false,
|
|
180
|
+
"optional": true,
|
|
181
|
+
"docs": {
|
|
182
|
+
"tags": [{
|
|
183
|
+
"text": undefined,
|
|
184
|
+
"name": "undocumented"
|
|
185
|
+
}, {
|
|
186
|
+
"text": "object",
|
|
187
|
+
"name": "uiType"
|
|
188
|
+
}],
|
|
189
|
+
"text": ""
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
}; }
|
|
193
|
+
}
|
|
194
|
+
function useRewardsTableDemo(props) {
|
|
195
|
+
return deepmerge({
|
|
196
|
+
states: {
|
|
197
|
+
hasPrev: false,
|
|
198
|
+
hasNext: false,
|
|
199
|
+
loading: false,
|
|
200
|
+
namespace: CSS_NAMESPACE,
|
|
201
|
+
},
|
|
202
|
+
callbacks: {
|
|
203
|
+
prevPage: () => console.log("Prev"),
|
|
204
|
+
nextPage: () => console.log("Next"),
|
|
205
|
+
},
|
|
206
|
+
data: {
|
|
207
|
+
textOverrides: {
|
|
208
|
+
showLabels: props.showLabels,
|
|
209
|
+
prevLabel: props.prevLabel,
|
|
210
|
+
moreLabel: props.moreLabel,
|
|
211
|
+
},
|
|
212
|
+
referralData: [],
|
|
213
|
+
},
|
|
214
|
+
elements: {
|
|
215
|
+
emptyElement: h(EmptySkeleton, { label: "No Rewards Yet" }),
|
|
216
|
+
loadingElement: h(LoadingSkeleton, null),
|
|
217
|
+
// TODO: This should be smarter
|
|
218
|
+
columns: [h("div", null, "Name"), h("div", null, "Email"), h("div", null, "DOB")],
|
|
219
|
+
rows: [],
|
|
220
|
+
},
|
|
221
|
+
}, props.demoData || {}, { arrayMerge: (_, a) => a });
|
|
222
|
+
}
|
|
@@ -0,0 +1,195 @@
|
|
|
1
|
+
import { usePaginatedQuery, useProgramId, useUserIdentity, } from "@saasquatch/component-boilerplate";
|
|
2
|
+
import { useEffect, useReducer } from "@saasquatch/universal-hooks";
|
|
3
|
+
import { h } from "@stencil/core";
|
|
4
|
+
import gql from "graphql-tag";
|
|
5
|
+
import { useRerenderListener } from "../../tables/re-render";
|
|
6
|
+
import { useChildElements } from "../../tables/useChildElements";
|
|
7
|
+
export const CSS_NAMESPACE = "sqm-rewards-table";
|
|
8
|
+
const GET_REWARDS = gql `
|
|
9
|
+
query getRewards(
|
|
10
|
+
$limit: Int!
|
|
11
|
+
$offset: Int!
|
|
12
|
+
$referralFilter: ReferralFilterInput
|
|
13
|
+
$rewardFilter: RewardFilterInput
|
|
14
|
+
) {
|
|
15
|
+
viewer {
|
|
16
|
+
... on User {
|
|
17
|
+
id
|
|
18
|
+
rewards(limit: $limit, offset: $offset, filter: $referralFilter) {
|
|
19
|
+
totalCount
|
|
20
|
+
count
|
|
21
|
+
data {
|
|
22
|
+
id
|
|
23
|
+
type
|
|
24
|
+
value
|
|
25
|
+
unit
|
|
26
|
+
name
|
|
27
|
+
dateGiven
|
|
28
|
+
dateExpires
|
|
29
|
+
dateCancelled
|
|
30
|
+
dateRedeemed
|
|
31
|
+
dateScheduledFor
|
|
32
|
+
fuelTankCode
|
|
33
|
+
fuelTankType
|
|
34
|
+
currency
|
|
35
|
+
prettyValue
|
|
36
|
+
statuses
|
|
37
|
+
globalRewardKey
|
|
38
|
+
programRewardKey
|
|
39
|
+
rewardRedemptionTransactions {
|
|
40
|
+
data {
|
|
41
|
+
exchangedRewards {
|
|
42
|
+
data {
|
|
43
|
+
prettyValue
|
|
44
|
+
type
|
|
45
|
+
fuelTankCode
|
|
46
|
+
globalRewardKey
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
`;
|
|
57
|
+
export function useRewardsTable(props, emptyElement, loadingElement) {
|
|
58
|
+
var _a, _b;
|
|
59
|
+
const user = useUserIdentity();
|
|
60
|
+
const programIdContext = useProgramId();
|
|
61
|
+
// Default to context, overriden by props
|
|
62
|
+
const programId = (_a = props.programId) !== null && _a !== void 0 ? _a : programIdContext;
|
|
63
|
+
// If no program ID, shows all programs
|
|
64
|
+
const referralFilter = programId
|
|
65
|
+
? programId === "classic"
|
|
66
|
+
? { programId_exists: false }
|
|
67
|
+
: { programId_eq: programId }
|
|
68
|
+
: {};
|
|
69
|
+
const rewardFilter = {
|
|
70
|
+
userId_eq: user === null || user === void 0 ? void 0 : user.id,
|
|
71
|
+
accountId_eq: user === null || user === void 0 ? void 0 : user.accountId,
|
|
72
|
+
};
|
|
73
|
+
const [content, setContent] = useReducer((state, next) => ({
|
|
74
|
+
...state,
|
|
75
|
+
...next,
|
|
76
|
+
}), {
|
|
77
|
+
columns: [],
|
|
78
|
+
rows: [],
|
|
79
|
+
loading: false,
|
|
80
|
+
page: 0,
|
|
81
|
+
});
|
|
82
|
+
const { envelope: rewardsData, states, callbacks, } = usePaginatedQuery(GET_REWARDS, (data) => { var _a; return (_a = data === null || data === void 0 ? void 0 : data.viewer) === null || _a === void 0 ? void 0 : _a.referrals; }, {
|
|
83
|
+
limit: props.perPage,
|
|
84
|
+
offset: 0,
|
|
85
|
+
}, {
|
|
86
|
+
referralFilter,
|
|
87
|
+
rewardFilter,
|
|
88
|
+
}, !(user === null || user === void 0 ? void 0 : user.jwt));
|
|
89
|
+
const tick = useRerenderListener();
|
|
90
|
+
const components = useChildElements();
|
|
91
|
+
const data = rewardsData === null || rewardsData === void 0 ? void 0 : rewardsData.data;
|
|
92
|
+
async function getComponentData(components) {
|
|
93
|
+
// filter out loading and empty states from columns array
|
|
94
|
+
const columnComponents = components.filter((component) => component.slot !== "loading" && component.slot !== "empty");
|
|
95
|
+
// get the column titles (renderLabel is asynchronous)
|
|
96
|
+
const columnsPromise = columnComponents === null || columnComponents === void 0 ? void 0 : columnComponents.map(async (c) => tryMethod(c, () => c.renderLabel()));
|
|
97
|
+
// get the column cells (renderCell is asynchronous)
|
|
98
|
+
const cellsPromise = data === null || data === void 0 ? void 0 : data.map(async (r) => {
|
|
99
|
+
const cellPromise = columnComponents === null || columnComponents === void 0 ? void 0 : columnComponents.map(async (c) => tryMethod(c, () => c.renderCell(r, c)));
|
|
100
|
+
const cells = await Promise.all(cellPromise);
|
|
101
|
+
return cells;
|
|
102
|
+
});
|
|
103
|
+
const rows = cellsPromise && (await Promise.all(cellsPromise)).filter((i) => i);
|
|
104
|
+
setContent({ rows });
|
|
105
|
+
const columns = columnsPromise && (await Promise.all(columnsPromise));
|
|
106
|
+
// Set the content to render and finish loading components
|
|
107
|
+
setContent({ columns, loading: false, page: states.currentPage });
|
|
108
|
+
}
|
|
109
|
+
useEffect(() => {
|
|
110
|
+
setContent({ loading: true });
|
|
111
|
+
rewardsData && getComponentData(components);
|
|
112
|
+
}, [rewardsData, components, tick]);
|
|
113
|
+
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);
|
|
114
|
+
const show =
|
|
115
|
+
// 1 - Loading if loading
|
|
116
|
+
states.loading || content.loading
|
|
117
|
+
? "loading"
|
|
118
|
+
: // 2 - Empty if empty
|
|
119
|
+
isEmpty
|
|
120
|
+
? "empty"
|
|
121
|
+
: // 3 - Then show rows
|
|
122
|
+
"rows";
|
|
123
|
+
return {
|
|
124
|
+
states: {
|
|
125
|
+
hasNext: states.currentPage < states.pageCount - 1,
|
|
126
|
+
hasPrev: states.currentPage > 0,
|
|
127
|
+
show,
|
|
128
|
+
namespace: CSS_NAMESPACE
|
|
129
|
+
},
|
|
130
|
+
data: {
|
|
131
|
+
textOverrides: {
|
|
132
|
+
showLabels: props.showLabels,
|
|
133
|
+
prevLabel: props.prevLabel,
|
|
134
|
+
moreLabel: props.moreLabel,
|
|
135
|
+
},
|
|
136
|
+
},
|
|
137
|
+
elements: {
|
|
138
|
+
columns: content.columns,
|
|
139
|
+
rows: content.rows,
|
|
140
|
+
emptyElement,
|
|
141
|
+
loadingElement,
|
|
142
|
+
},
|
|
143
|
+
callbacks: {
|
|
144
|
+
nextPage: () => {
|
|
145
|
+
if (states.currentPage === 0)
|
|
146
|
+
callbacks.setLimit(props.perPage);
|
|
147
|
+
callbacks.setCurrentPage(states.currentPage + 1);
|
|
148
|
+
},
|
|
149
|
+
prevPage: () => {
|
|
150
|
+
if (states.currentPage === 1)
|
|
151
|
+
callbacks.setLimit(props.perPage - 1);
|
|
152
|
+
callbacks.setCurrentPage(states.currentPage - 1);
|
|
153
|
+
},
|
|
154
|
+
},
|
|
155
|
+
};
|
|
156
|
+
}
|
|
157
|
+
function generateUserError(e) {
|
|
158
|
+
try {
|
|
159
|
+
return JSON.stringify(e);
|
|
160
|
+
}
|
|
161
|
+
catch (e) {
|
|
162
|
+
return "An unknown error";
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
async function tryMethod(c, callback) {
|
|
166
|
+
const tag = c.tagName.toLowerCase();
|
|
167
|
+
await customElements.whenDefined(tag);
|
|
168
|
+
let labelPromise;
|
|
169
|
+
try {
|
|
170
|
+
labelPromise = callback();
|
|
171
|
+
}
|
|
172
|
+
catch (e) {
|
|
173
|
+
// renderLabel did not return a promise, so this method probably doesn't exist
|
|
174
|
+
// therefore, we IGNORE the label
|
|
175
|
+
if (callback.name === "renderReferrerCell") {
|
|
176
|
+
console.error("column does not have a renderReferrerCell method.");
|
|
177
|
+
}
|
|
178
|
+
else {
|
|
179
|
+
console.error("label promise failed", e);
|
|
180
|
+
}
|
|
181
|
+
return h("span", null);
|
|
182
|
+
}
|
|
183
|
+
try {
|
|
184
|
+
return await labelPromise;
|
|
185
|
+
}
|
|
186
|
+
catch (e) {
|
|
187
|
+
// The column returned a promise, and that promise failed.
|
|
188
|
+
// This should not happen so we fail fast
|
|
189
|
+
console.error("Error rendering label", e);
|
|
190
|
+
const userError = generateUserError(e);
|
|
191
|
+
return (h("details", null,
|
|
192
|
+
h("summary", null, "Error"),
|
|
193
|
+
userError));
|
|
194
|
+
}
|
|
195
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { h } from "@stencil/core";
|
|
2
|
-
import { ShareButtonView } from "
|
|
2
|
+
import { ShareButtonView } from "./sqm-share-button-view";
|
|
3
3
|
export default {
|
|
4
|
-
title: "Share Button",
|
|
4
|
+
title: "Components/Share Button",
|
|
5
5
|
};
|
|
6
6
|
export const WithIcon = () => {
|
|
7
7
|
const props = { medium: "facebook", iconslot: "suffix" };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { setUserIdentity } from "@saasquatch/component-boilerplate";
|
|
2
2
|
import { useEffect } from "@saasquatch/universal-hooks";
|
|
3
3
|
import { h } from "@stencil/core";
|
|
4
|
-
import { useShareButton } from "
|
|
5
|
-
import { createHookStory } from "../
|
|
4
|
+
import { useShareButton } from "./useShareButton";
|
|
5
|
+
import { createHookStory } from "../sqm-stencilbook/HookStoryAddon";
|
|
6
6
|
export default {
|
|
7
7
|
title: "Hooks / useShareButton",
|
|
8
8
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { h } from "@stencil/core";
|
|
2
|
-
import { ShareLinkView } from "
|
|
2
|
+
import { ShareLinkView } from "./sqm-share-link-view";
|
|
3
3
|
export default {
|
|
4
|
-
title: "Share Link",
|
|
4
|
+
title: "Components/Share Link",
|
|
5
5
|
};
|
|
6
6
|
export const Default = () => {
|
|
7
7
|
const props = {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { setUserIdentity } from "@saasquatch/component-boilerplate";
|
|
2
2
|
import { useEffect } from "@saasquatch/universal-hooks";
|
|
3
3
|
import { h } from "@stencil/core";
|
|
4
|
-
import { ShareLinkView } from "
|
|
5
|
-
import { useShareLink } from "
|
|
6
|
-
import { createHookStory } from "../
|
|
4
|
+
import { ShareLinkView } from "./sqm-share-link-view";
|
|
5
|
+
import { useShareLink } from "./useShareLink";
|
|
6
|
+
import { createHookStory } from "../sqm-stencilbook/HookStoryAddon";
|
|
7
7
|
export default {
|
|
8
8
|
title: "Hooks / useShareLink",
|
|
9
9
|
};
|
|
@@ -1,45 +1,47 @@
|
|
|
1
1
|
import { h, Component, Host, State } from "@stencil/core";
|
|
2
2
|
import { useStencilbook } from "@saasquatch/stencilbook";
|
|
3
3
|
import { withHooks } from "@saasquatch/stencil-hooks";
|
|
4
|
-
import * as ShareButton from "
|
|
5
|
-
import * as ShareLink from "
|
|
6
|
-
import * as BigStat from "
|
|
7
|
-
import * as Leaderboard from "
|
|
8
|
-
import * as Router from "
|
|
9
|
-
import * as LeaderboardRank from "
|
|
10
|
-
import * as PortalFrame from "
|
|
11
|
-
import * as EditProfile from "
|
|
12
|
-
import * as UseShareLink from "
|
|
13
|
-
import * as UseShareButton from "
|
|
14
|
-
import * as UseBigStat from "
|
|
15
|
-
import * as UseEditProfile from "
|
|
16
|
-
import * as UseLeaderboard from "
|
|
17
|
-
import * as FormMessage from "
|
|
4
|
+
import * as ShareButton from "../sqm-share-button/ShareButton.stories";
|
|
5
|
+
import * as ShareLink from "../sqm-share-link/ShareLink.stories";
|
|
6
|
+
import * as BigStat from "../sqm-big-stat/BigStat.stories";
|
|
7
|
+
import * as Leaderboard from "../sqm-leaderboard/Leaderboard.stories";
|
|
8
|
+
import * as Router from "../sqm-rewards-table/Router.stories";
|
|
9
|
+
import * as LeaderboardRank from "../sqm-leaderboard-rank/LeaderboardRank.stories";
|
|
10
|
+
import * as PortalFrame from "../sqm-portal-frame/PortalFrame.stories";
|
|
11
|
+
import * as EditProfile from "../sqm-edit-profile/EditProfileForm.stories";
|
|
12
|
+
import * as UseShareLink from "../sqm-share-link/UseShareLink.stories";
|
|
13
|
+
import * as UseShareButton from "../sqm-share-button/UseShareButton.stories";
|
|
14
|
+
import * as UseBigStat from "../sqm-big-stat/UseBigStat.stories";
|
|
15
|
+
import * as UseEditProfile from "../sqm-edit-profile/UseEditProfile.stories";
|
|
16
|
+
import * as UseLeaderboard from "../sqm-leaderboard/UseLeaderboard.stories";
|
|
17
|
+
import * as FormMessage from "../sqm-form-message/FormMessage.stories";
|
|
18
|
+
import * as UseRewardExchangeList from "../sqm-reward-exchange-list/UseRewardExchangeList.stories";
|
|
18
19
|
import * as NewPortal from "../../stories/NewPortal.stories";
|
|
19
|
-
import * as SidebarItem from "
|
|
20
|
-
import * as NavigationSidebar from "
|
|
21
|
-
import * as PortalLogin from "
|
|
22
|
-
import * as PortalRegister from "
|
|
23
|
-
import * as PortalForgotPassword from "
|
|
24
|
-
import * as PortalEmailVerification from "
|
|
25
|
-
import * as PortalResetPassword from "
|
|
26
|
-
import * as PortalVerifyEmail from "
|
|
27
|
-
import * as AssetCard from "
|
|
28
|
-
import * as DividedLayout from "
|
|
29
|
-
import * as ChangePassword from "
|
|
30
|
-
import * as PortalProfile from "
|
|
31
|
-
import * as ReferralTable from "
|
|
32
|
-
import * as ReferralTableCell from "
|
|
33
|
-
import * as ReferralTableRewardsCell from "
|
|
34
|
-
import * as UserName from "
|
|
35
|
-
import * as PasswordField from "
|
|
20
|
+
import * as SidebarItem from "../sqm-navigation-sidebar-item/SidebarItem.stories";
|
|
21
|
+
import * as NavigationSidebar from "../sqm-navigation-sidebar/NavigationSidebar.stories";
|
|
22
|
+
import * as PortalLogin from "../sqm-portal-login/PortalLogin.stories";
|
|
23
|
+
import * as PortalRegister from "../sqm-portal-register/PortalRegister.stories";
|
|
24
|
+
import * as PortalForgotPassword from "../sqm-portal-forgot-password/PortalForgotPassword.stories";
|
|
25
|
+
import * as PortalEmailVerification from "../sqm-portal-email-verification/PortalEmailVerification.stories";
|
|
26
|
+
import * as PortalResetPassword from "../sqm-portal-reset-password/PortalResetPassword.stories";
|
|
27
|
+
import * as PortalVerifyEmail from "../sqm-portal-verify-email/PortalVerifyEmail.stories";
|
|
28
|
+
import * as AssetCard from "../sqm-asset-card/AssetCard.stories";
|
|
29
|
+
import * as DividedLayout from "../sqm-divided-layout/DividedLayout.stories";
|
|
30
|
+
import * as ChangePassword from "../sqm-portal-change-password/ChangePassword.stories";
|
|
31
|
+
import * as PortalProfile from "../sqm-portal-profile/PortalProfile.stories";
|
|
32
|
+
import * as ReferralTable from "../sqm-referral-table/ReferralTable.stories";
|
|
33
|
+
import * as ReferralTableCell from "../sqm-referral-table/ReferralTableCell.stories";
|
|
34
|
+
import * as ReferralTableRewardsCell from "../sqm-referral-table/ReferralTableRewardsCell.stories";
|
|
35
|
+
import * as UserName from "../sqm-user-name/UserName.stories";
|
|
36
|
+
import * as PasswordField from "../sqm-password-field/PasswordField.stories";
|
|
37
|
+
import * as TaskCard from "../sqm-task-card/TaskCard.stories";
|
|
36
38
|
import * as PortalTemplates from "../../stories/PortalTemplates.stories";
|
|
37
|
-
import * as ProgramMenu from "
|
|
39
|
+
import * as ProgramMenu from "../sqm-program-menu/ProgramMenu.stories";
|
|
38
40
|
import * as PoweredByImg from "../../stories/PoweredByImg.stories";
|
|
39
|
-
import * as PortalFooter from "
|
|
40
|
-
import * as Hero from "
|
|
41
|
-
import * as ReferralIframe from "
|
|
42
|
-
import * as NameFields from "
|
|
41
|
+
import * as PortalFooter from "../sqm-portal-footer/PortalFooter.stories";
|
|
42
|
+
import * as Hero from "../sqm-hero/Hero.stories";
|
|
43
|
+
import * as ReferralIframe from "../sqm-referral-iframe/ReferralIframe.stories";
|
|
44
|
+
import * as NameFields from "../sqm-name-fields/NameFields.stories";
|
|
43
45
|
import { CucumberAddon } from "./CucumberAddon";
|
|
44
46
|
import { HookStoryAddon } from "./HookStoryAddon";
|
|
45
47
|
import { ShadowViewAddon } from "../../ShadowViewAddon";
|
|
@@ -76,6 +78,7 @@ const stories = [
|
|
|
76
78
|
ReferralTableRewardsCell,
|
|
77
79
|
UserName,
|
|
78
80
|
PasswordField,
|
|
81
|
+
TaskCard,
|
|
79
82
|
PortalTemplates,
|
|
80
83
|
ProgramMenu,
|
|
81
84
|
PoweredByImg,
|
|
@@ -83,6 +86,7 @@ const stories = [
|
|
|
83
86
|
Hero,
|
|
84
87
|
ReferralIframe,
|
|
85
88
|
NameFields,
|
|
89
|
+
UseRewardExchangeList,
|
|
86
90
|
];
|
|
87
91
|
/**
|
|
88
92
|
* For internal documentation
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { h } from "@stencil/core";
|
|
2
|
+
/**
|
|
3
|
+
* Displays a cartesian product of the input props
|
|
4
|
+
*
|
|
5
|
+
* @returns
|
|
6
|
+
*/
|
|
7
|
+
export function MatrixStory({ matrix, props, Component, }) {
|
|
8
|
+
const propMatrix = Object.keys(matrix).map((propKey) => {
|
|
9
|
+
const propValues = matrix[propKey];
|
|
10
|
+
return propValues.map((val) => {
|
|
11
|
+
return {
|
|
12
|
+
[propKey]: val,
|
|
13
|
+
};
|
|
14
|
+
});
|
|
15
|
+
});
|
|
16
|
+
const combinations = cartesian(...propMatrix);
|
|
17
|
+
const propsCombinations = combinations.map((combo) => {
|
|
18
|
+
return combo.reduce((props, prop) => {
|
|
19
|
+
return {
|
|
20
|
+
...props,
|
|
21
|
+
...prop,
|
|
22
|
+
};
|
|
23
|
+
}, {});
|
|
24
|
+
});
|
|
25
|
+
return propsCombinations.map((combo) => {
|
|
26
|
+
const example = { ...props, ...combo };
|
|
27
|
+
return (h("div", null,
|
|
28
|
+
h(PropsTable, { values: example }),
|
|
29
|
+
h("hr", null),
|
|
30
|
+
h(Component, Object.assign({}, example))));
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
function PropsTable({ values }) {
|
|
34
|
+
return (h("table", null,
|
|
35
|
+
h("tbody", null, Object.keys(values).map((key) => {
|
|
36
|
+
return (h("tr", null,
|
|
37
|
+
h("th", null, key),
|
|
38
|
+
h("td", null, JSON.stringify(values[key]))));
|
|
39
|
+
}))));
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Source: https://stackoverflow.com/questions/15298912/javascript-generating-combinations-from-n-arrays-with-m-elements
|
|
43
|
+
*
|
|
44
|
+
* TODO: Could replace with a fork of https://www.npmjs.com/package/cartesian
|
|
45
|
+
*
|
|
46
|
+
* @param args - an array of arrays
|
|
47
|
+
* @returns combinations of the elements in those array
|
|
48
|
+
*/
|
|
49
|
+
function cartesian(...args) {
|
|
50
|
+
var r = [], max = args.length - 1;
|
|
51
|
+
function helper(arr, i) {
|
|
52
|
+
for (var j = 0, l = args[i].length; j < l; j++) {
|
|
53
|
+
var a = arr.slice(0); // clone arr
|
|
54
|
+
a.push(args[i][j]);
|
|
55
|
+
if (i == max)
|
|
56
|
+
r.push(a);
|
|
57
|
+
else
|
|
58
|
+
helper(a, i + 1);
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
helper([], 0);
|
|
62
|
+
return r;
|
|
63
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { h } from "@stencil/core";
|
|
2
|
+
export const checkmark_circle = () => {
|
|
3
|
+
return (h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "18", height: "18", viewBox: "0 0 18 18" },
|
|
4
|
+
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" })));
|
|
5
|
+
};
|
|
6
|
+
export const arrow_left_right = () => {
|
|
7
|
+
return (h("svg", { width: 11, height: 12, fill: "none", xmlns: "http://www.w3.org/2000/svg" },
|
|
8
|
+
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" })));
|
|
9
|
+
};
|
|
10
|
+
export const gift = () => {
|
|
11
|
+
return (h("svg", { width: 16, height: 16, fill: "none", xmlns: "http://www.w3.org/2000/svg" },
|
|
12
|
+
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)" }),
|
|
13
|
+
h("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M1.5 9v1h13V9h-13z", fill: "var(--sl-color-primary-300)" }),
|
|
14
|
+
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)" })));
|
|
15
|
+
};
|