@saasquatch/mint-components 1.3.1-6 → 1.3.2-10
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-a33867b9.js → ShadowViewAddon-d2fde0a2.js} +1 -1
- package/dist/cjs/{global-f4f5e602.js → global-e04d7cde.js} +279 -70
- package/dist/cjs/{index.module-e9dac160.js → index.module-07ed6ad2.js} +4 -2
- package/dist/cjs/loader.cjs.js +3 -3
- package/dist/cjs/mint-components.cjs.js +3 -3
- package/dist/cjs/{re-render-3acba68a.js → re-render-81649c33.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_30.cjs.entry.js} +2607 -168
- package/dist/cjs/sqm-graphql-client-provider.cjs.entry.js +1 -1
- package/dist/cjs/{sqm-leaderboard-rank-view-54299e38.js → sqm-leaderboard-rank-view-0ba128e2.js} +2 -2
- package/dist/cjs/sqm-leaderboard-rank.cjs.entry.js +3 -3
- 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-daa9c2e1.js → sqm-navigation-sidebar-item-view-0bad789c.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-395079fe.js → sqm-portal-email-verification-view-3c7d8701.js} +1 -1
- package/dist/cjs/sqm-portal-email-verification.cjs.entry.js +4 -4
- package/dist/cjs/{sqm-portal-footer-view-c82aedb5.js → sqm-portal-footer-view-8f5d682e.js} +1 -1
- package/dist/cjs/sqm-portal-footer.cjs.entry.js +3 -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-9fa00ccd.js → sqm-portal-profile-view-14866b58.js} +1 -1
- package/dist/cjs/sqm-portal-profile.cjs.entry.js +3 -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-share-code.cjs.entry.js +1 -1
- package/dist/cjs/{useDemoBigStat-e99cc8a2.js → useDemoBigStat-1692a6a1.js} +119 -22
- package/dist/collection/collection-manifest.json +7 -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 +10 -3
- package/dist/collection/{stories → components/sqm-big-stat}/UseBigStat.stories.js +7 -4
- package/dist/collection/components/sqm-big-stat/sqm-big-stat.js +1 -21
- package/dist/collection/components/sqm-big-stat/useBigStat.js +117 -21
- package/dist/collection/components/sqm-big-stat/useDemoBigStat.js +1 -0
- 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/RewardExchangeList.stories.js +21 -0
- package/dist/collection/components/sqm-reward-exchange-list/RewardExchangeListData.js +218 -0
- package/dist/collection/components/sqm-reward-exchange-list/SVGs.js +8 -0
- package/dist/collection/components/sqm-reward-exchange-list/UseRewardExchangeList.stories.js +143 -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 +60 -0
- package/dist/collection/components/sqm-reward-exchange-list/sqm-reward-exchange-list-view.js +269 -0
- package/dist/collection/components/sqm-reward-exchange-list/sqm-reward-exchange-list.js +121 -0
- package/dist/collection/components/sqm-reward-exchange-list/useRewardExchangeList.js +198 -0
- package/dist/collection/components/sqm-rewards-table/UseRewardsTable.stories.js +53 -0
- package/dist/collection/components/sqm-rewards-table/sqm-rewards-table-column.js +120 -0
- package/dist/collection/components/sqm-rewards-table/sqm-rewards-table.js +222 -0
- package/dist/collection/components/sqm-rewards-table/useRewardsTable.js +190 -0
- package/dist/collection/{stories → components/sqm-router}/Router.stories.js +1 -1
- 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/components/sqm-share-button/sqm-share-button.js +1 -1
- 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-share-link/useShareLink.js +1 -2
- package/dist/collection/components/sqm-stencilbook/CucumberAddon.js +3 -1
- package/dist/collection/components/sqm-stencilbook/sqm-stencilbook.js +48 -36
- package/dist/collection/components/sqm-task-card/Matrix.js +63 -0
- package/dist/collection/components/sqm-task-card/SVGs.js +9 -0
- package/dist/collection/components/sqm-task-card/TaskCard.stories.js +330 -0
- package/dist/collection/components/sqm-task-card/UseTaskCard.stories.js +41 -0
- package/dist/collection/components/sqm-task-card/progress-bar/SVGs.js +7 -0
- package/dist/collection/components/sqm-task-card/progress-bar/progress-bar-view.js +311 -0
- package/dist/collection/components/sqm-task-card/progress-bar/progress-bar.stories.js +53 -0
- package/dist/collection/components/sqm-task-card/sqm-task-card-view.js +173 -0
- package/dist/collection/components/sqm-task-card/sqm-task-card.js +384 -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/stories/NewPortal.stories.js +15 -15
- 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-7cbc6390.js → ShadowViewAddon-aa087ef2.js} +1 -1
- package/dist/esm/{global-5dfb4fa8.js → global-107bb084.js} +279 -70
- package/dist/esm/{index.module-07f3fbb0.js → index.module-1f571929.js} +2 -2
- package/dist/esm/loader.js +3 -3
- package/dist/esm/mint-components.js +3 -3
- package/dist/esm/{re-render-0be5746e.js → re-render-76c9129f.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_30.entry.js} +2605 -170
- package/dist/esm/sqm-graphql-client-provider.entry.js +1 -1
- package/dist/esm/{sqm-leaderboard-rank-view-04161da4.js → sqm-leaderboard-rank-view-c1aefdd5.js} +2 -2
- package/dist/esm/sqm-leaderboard-rank.entry.js +3 -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-78631800.js → sqm-navigation-sidebar-item-view-b3618185.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-d6ffe3b8.js → sqm-portal-email-verification-view-df0559b0.js} +1 -1
- package/dist/esm/sqm-portal-email-verification.entry.js +4 -4
- package/dist/esm/{sqm-portal-footer-view-5aa288c9.js → sqm-portal-footer-view-2b2bfc9e.js} +1 -1
- package/dist/esm/sqm-portal-footer.entry.js +3 -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-636a8688.js → sqm-portal-profile-view-2fbb0845.js} +1 -1
- package/dist/esm/sqm-portal-profile.entry.js +3 -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-share-code.entry.js +1 -1
- package/dist/esm/{useDemoBigStat-531a4d2a.js → useDemoBigStat-49cdfe32.js} +119 -22
- package/dist/esm-es5/{ShadowViewAddon-7cbc6390.js → ShadowViewAddon-aa087ef2.js} +1 -1
- package/dist/esm-es5/{global-5dfb4fa8.js → global-107bb084.js} +2 -2
- package/dist/esm-es5/{index.module-07f3fbb0.js → index.module-1f571929.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-0be5746e.js → re-render-76c9129f.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_30.entry.js +1 -0
- package/dist/esm-es5/sqm-graphql-client-provider.entry.js +1 -1
- package/dist/esm-es5/{sqm-leaderboard-rank-view-04161da4.js → sqm-leaderboard-rank-view-c1aefdd5.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-78631800.js → sqm-navigation-sidebar-item-view-b3618185.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-d6ffe3b8.js → sqm-portal-email-verification-view-df0559b0.js} +1 -1
- package/dist/esm-es5/sqm-portal-email-verification.entry.js +1 -1
- package/dist/esm-es5/{sqm-portal-footer-view-5aa288c9.js → sqm-portal-footer-view-2b2bfc9e.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-636a8688.js → sqm-portal-profile-view-2fbb0845.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-49cdfe32.js +1 -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-cb8a3610.system.entry.js → p-03b7444e.system.entry.js} +1 -1
- package/dist/mint-components/{p-b745adaa.system.js → p-0470556b.system.js} +1 -1
- package/dist/mint-components/{p-6bbb9d5a.system.entry.js → p-0ca63e9e.system.entry.js} +1 -1
- package/dist/mint-components/{p-4ca49eb2.system.entry.js → p-0ddd6063.system.entry.js} +1 -1
- package/dist/mint-components/{p-a12e34b0.entry.js → p-0f19ab40.entry.js} +1 -1
- package/dist/mint-components/{p-84da6c55.system.entry.js → p-123930ab.system.entry.js} +1 -1
- package/dist/mint-components/p-20991bdd.system.entry.js +1 -0
- package/dist/mint-components/{p-3f3b81de.system.js → p-22ee65c4.system.js} +1 -1
- package/dist/mint-components/{p-f05f6004.system.entry.js → p-2b9a01ce.system.entry.js} +1 -1
- package/dist/mint-components/{p-705141c1.entry.js → p-3b9492a8.entry.js} +1 -1
- package/dist/mint-components/{p-11fe72bd.entry.js → p-3bbc61af.entry.js} +1 -1
- package/dist/mint-components/{p-99f85aae.js → p-3fd9db63.js} +1 -1
- package/dist/mint-components/p-458070cf.js +1 -0
- package/dist/mint-components/{p-1c69eba7.js → p-4ae9f594.js} +1 -1
- package/dist/mint-components/{p-7e6a38d0.system.entry.js → p-57568b23.system.entry.js} +1 -1
- package/dist/mint-components/{p-453df041.entry.js → p-57aa7493.entry.js} +1 -1
- package/dist/mint-components/p-5986de11.entry.js +1 -0
- package/dist/mint-components/p-59fa991d.entry.js +335 -0
- package/dist/mint-components/{p-cac1ffd0.entry.js → p-5a1a2b2c.entry.js} +1 -1
- package/dist/mint-components/{p-552a99b9.system.js → p-5e681b4b.system.js} +1 -1
- package/dist/mint-components/p-62b134cb.system.entry.js +1 -0
- package/dist/mint-components/{p-9fb97b00.system.entry.js → p-64299f78.system.entry.js} +1 -1
- package/dist/mint-components/p-6466d643.entry.js +1 -0
- package/dist/mint-components/{p-91c46672.js → p-70008004.js} +1 -1
- package/dist/mint-components/{p-a1029019.system.entry.js → p-70a6f9d9.system.entry.js} +1 -1
- package/dist/mint-components/p-719c2664.system.js +1 -0
- package/dist/mint-components/p-75924795.system.entry.js +1 -0
- package/dist/mint-components/{p-55580223.system.js → p-8155cd07.system.js} +1 -1
- package/dist/mint-components/{p-f5333477.system.entry.js → p-86a55c58.system.entry.js} +1 -1
- package/dist/mint-components/{p-087571f1.entry.js → p-874e7da3.entry.js} +1 -1
- package/dist/mint-components/{p-d9123a4a.system.entry.js → p-8ac0ec83.system.entry.js} +1 -1
- package/dist/mint-components/{p-d32ebb2d.system.js → p-91b0d151.system.js} +1 -1
- package/dist/mint-components/{p-45befbb8.system.entry.js → p-9ca6142b.system.entry.js} +1 -1
- package/dist/mint-components/{p-e3d75555.entry.js → p-a26457cd.entry.js} +1 -1
- package/dist/mint-components/{p-ccddec52.js → p-a37fc3cb.js} +1 -1
- package/dist/mint-components/p-a48fc54e.system.js +1 -0
- package/dist/mint-components/{p-6accffd6.js → p-ab378185.js} +1 -1
- package/dist/mint-components/p-ac92b5ea.js +235 -0
- package/dist/mint-components/{p-6a9b7f7c.entry.js → p-b0c6f82b.entry.js} +1 -1
- package/dist/mint-components/{p-df3a9a38.entry.js → p-b0e9c89c.entry.js} +1 -1
- package/dist/mint-components/{p-d98a6a1c.entry.js → p-b3bac2c6.entry.js} +1 -1
- package/dist/mint-components/{p-40f1482a.system.entry.js → p-bcb30771.system.entry.js} +1 -1
- package/dist/mint-components/{p-6a95537b.system.js → p-bdfdb088.system.js} +1 -1
- package/dist/mint-components/{p-7f7f60ea.entry.js → p-beb02af2.entry.js} +1 -1
- package/dist/mint-components/{p-77cf28f1.system.js → p-beeeda0c.system.js} +2 -2
- package/dist/mint-components/p-bf10c781.system.js +1 -0
- package/dist/mint-components/{p-ab551be3.system.entry.js → p-c0e8aaa7.system.entry.js} +1 -1
- package/dist/mint-components/{p-24cc7ee3.system.entry.js → p-c35b54e4.system.entry.js} +1 -1
- package/dist/mint-components/{p-2818f3a0.entry.js → p-c61c61e7.entry.js} +1 -1
- package/dist/mint-components/{p-94c25cfe.entry.js → p-c974b7d4.entry.js} +1 -1
- package/dist/mint-components/{p-aeb995ca.entry.js → p-cbf1db2b.entry.js} +1 -1
- package/dist/mint-components/{p-0d3f2c66.entry.js → p-d1e28563.entry.js} +1 -1
- package/dist/mint-components/{p-b95eaf63.entry.js → p-d37f227e.entry.js} +1 -1
- package/dist/mint-components/{p-730785e9.system.js → p-d44e98b8.system.js} +1 -1
- package/dist/mint-components/{p-80a40e90.js → p-d73d26ec.js} +2 -2
- package/dist/mint-components/{p-ab9ef09d.entry.js → p-dacbf435.entry.js} +1 -1
- package/dist/mint-components/{p-1af6d49d.system.entry.js → p-dbc04567.system.entry.js} +1 -1
- package/dist/mint-components/{p-4018d7eb.entry.js → p-de0efef2.entry.js} +1 -1
- package/dist/mint-components/{p-72420d6b.system.entry.js → p-e01213a2.system.entry.js} +1 -1
- package/dist/mint-components/p-e2a855b8.system.entry.js +1 -0
- package/dist/mint-components/{p-0996811b.entry.js → p-f0ad9b15.entry.js} +1 -1
- package/dist/mint-components/{p-23f0e229.system.entry.js → p-f0cbf76e.system.entry.js} +1 -1
- package/dist/mint-components/{p-48b04ef0.entry.js → p-f2db1c3b.entry.js} +1 -1
- package/dist/mint-components/{p-e1549548.system.entry.js → p-f538a675.system.entry.js} +1 -1
- package/dist/mint-components/{p-8edba448.js → p-f7e2418a.js} +1 -1
- package/dist/mint-components/{p-f7118fd5.js → p-f8abbd79.js} +1 -1
- package/dist/mint-components/{p-92671ed2.system.entry.js → p-fc90a3fe.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 +6 -0
- package/dist/types/components/sqm-big-stat/sqm-big-stat-view.d.ts +1 -0
- package/dist/types/components/sqm-big-stat/sqm-big-stat.d.ts +0 -6
- package/dist/types/components/sqm-big-stat/useBigStat.d.ts +4 -1
- 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/RewardExchangeList.stories.d.ts +6 -0
- package/dist/types/components/sqm-reward-exchange-list/RewardExchangeListData.d.ts +81 -0
- package/dist/types/components/sqm-reward-exchange-list/SVGs.d.ts +3 -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 +4 -0
- package/dist/types/components/sqm-reward-exchange-list/sqm-reward-exchange-list-view.d.ts +25 -0
- package/dist/types/components/sqm-reward-exchange-list/sqm-reward-exchange-list.d.ts +20 -0
- package/dist/types/components/sqm-reward-exchange-list/useRewardExchangeList.d.ts +43 -0
- package/dist/types/components/sqm-rewards-table/UseRewardsTable.stories.d.ts +16 -0
- package/dist/types/components/sqm-rewards-table/sqm-rewards-table-column.d.ts +20 -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 +38 -0
- package/dist/types/{stories → components/sqm-router}/Router.stories.d.ts +0 -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 +2 -0
- package/dist/types/components/sqm-task-card/TaskCard.stories.d.ts +11 -0
- package/dist/types/components/sqm-task-card/UseTaskCard.stories.d.ts +10 -0
- package/dist/types/components/sqm-task-card/progress-bar/SVGs.d.ts +1 -0
- package/dist/types/components/sqm-task-card/progress-bar/progress-bar-view.d.ts +10 -0
- package/dist/types/components/sqm-task-card/progress-bar/progress-bar.stories.d.ts +12 -0
- package/dist/types/components/sqm-task-card/sqm-task-card-view.d.ts +16 -0
- package/dist/types/components/sqm-task-card/sqm-task-card.d.ts +73 -0
- package/dist/types/components/sqm-user-name/UserName.stories.d.ts +6 -0
- package/dist/types/components.d.ts +269 -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 +2 -2
- package/dist/esm-es5/sqm-divided-layout_26.entry.js +0 -1
- package/dist/esm-es5/useDemoBigStat-531a4d2a.js +0 -1
- package/dist/mint-components/p-0ed2de6a.js +0 -1
- package/dist/mint-components/p-253d07a3.system.entry.js +0 -1
- package/dist/mint-components/p-3ace9bab.entry.js +0 -230
- package/dist/mint-components/p-3e5c8dc2.entry.js +0 -1
- package/dist/mint-components/p-3fc2b5d4.system.js +0 -1
- package/dist/mint-components/p-420e50a8.entry.js +0 -1
- package/dist/mint-components/p-44a83e6e.system.js +0 -1
- package/dist/mint-components/p-4a9dcc1f.system.js +0 -1
- package/dist/mint-components/p-52be0df6.js +0 -227
- package/dist/mint-components/p-54d90d9f.system.entry.js +0 -1
- package/dist/mint-components/p-a60e8e00.system.entry.js +0 -1
- package/dist/mint-components/p-c6f2d1f4.system.entry.js +0 -1
- package/dist/types/stories/UserName.stories.d.ts +0 -6
|
@@ -287,7 +287,7 @@ export class PortalRegister {
|
|
|
287
287
|
"mutable": false,
|
|
288
288
|
"complexType": {
|
|
289
289
|
"original": "DemoData<PortalRegisterViewProps>",
|
|
290
|
-
"resolved": "{ states?: { error: string; loading: boolean; confirmPassword: boolean; hideInputs: boolean; validationState?: FormState; enablePasswordValidation?: boolean; }; content?: { formData?: any; passwordField?: any; secondaryButton?: any; emailLabel?: string; passwordLabel?: string; submitLabel?: string; pageLabel?: string; confirmPasswordLabel: string; };
|
|
290
|
+
"resolved": "{ states?: { error: string; loading: boolean; confirmPassword: boolean; hideInputs: boolean; validationState?: FormState; enablePasswordValidation?: boolean; }; refs?: { formRef: any; }; content?: { formData?: any; passwordField?: any; secondaryButton?: any; emailLabel?: string; passwordLabel?: string; submitLabel?: string; pageLabel?: string; confirmPasswordLabel: string; }; }",
|
|
291
291
|
"references": {
|
|
292
292
|
"DemoData": {
|
|
293
293
|
"location": "import",
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { h } from "@stencil/core";
|
|
2
|
-
import { PortalResetPasswordView, } from "
|
|
3
|
-
import scenario from "
|
|
2
|
+
import { PortalResetPasswordView, } from "./sqm-portal-reset-password-view";
|
|
3
|
+
import scenario from "./sqm-portal-reset-password.feature";
|
|
4
4
|
export default {
|
|
5
|
-
title: "Portal Reset Password",
|
|
5
|
+
title: "Components/Portal Reset Password",
|
|
6
6
|
parameters: {
|
|
7
7
|
scenario,
|
|
8
8
|
},
|
package/dist/collection/{stories → components/sqm-portal-verify-email}/PortalVerifyEmail.stories.js
RENAMED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { h } from "@stencil/core";
|
|
2
|
-
import { PortalVerifyEmailView, } from "
|
|
3
|
-
import scenario from "
|
|
2
|
+
import { PortalVerifyEmailView, } from "./sqm-portal-verify-email-view";
|
|
3
|
+
import scenario from "./sqm-portal-verify-email.feature";
|
|
4
4
|
export default {
|
|
5
|
-
title: "Portal Verify Email",
|
|
5
|
+
title: "Components/Portal Verify Email",
|
|
6
6
|
parameters: {
|
|
7
7
|
scenario,
|
|
8
8
|
},
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { h } from "@stencil/core";
|
|
2
|
-
import { createHookStory } from "../
|
|
3
|
-
import dashboardTemplate from "
|
|
2
|
+
import { createHookStory } from "../sqm-stencilbook/HookStoryAddon";
|
|
3
|
+
import dashboardTemplate from "../../templates/Dashboard.html";
|
|
4
4
|
export default {
|
|
5
5
|
title: "Program Menu",
|
|
6
6
|
};
|
package/dist/collection/{stories → components/sqm-referral-iframe}/ReferralIframe.stories.js
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { h } from "@stencil/core";
|
|
2
|
-
import { ReferralIframeView, } from "
|
|
3
|
-
import scenario from "../
|
|
2
|
+
import { ReferralIframeView, } from "./sqm-referral-iframe-view";
|
|
3
|
+
import scenario from "../sqm-referral-iframe/sqm-referral-iframe.feature";
|
|
4
4
|
export default {
|
|
5
5
|
title: "Referral Iframe",
|
|
6
6
|
parameters: {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { h } from "@stencil/core";
|
|
2
|
-
import { ReferralTableView } from "
|
|
2
|
+
import { ReferralTableView } from "./sqm-referral-table-view";
|
|
3
3
|
import { AvailableNoExpiry, Cancelled, PendingNoUnpend, } from "./ReferralTableRewardsCell.stories";
|
|
4
4
|
export default {
|
|
5
|
-
title: "Referral Table",
|
|
5
|
+
title: "Components/Referral Table",
|
|
6
6
|
};
|
|
7
7
|
const loadingElement = (h("div", { slot: "loading", style: { display: "contents" } },
|
|
8
8
|
h("sqm-table-row", null,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { withHooks } from "@saasquatch/stencil-hooks";
|
|
2
2
|
import { Component, getElement, h, Host, Method, Prop } from "@stencil/core";
|
|
3
|
-
import { useRequestRerender } from "
|
|
3
|
+
import { useRequestRerender } from "../../../tables/re-render";
|
|
4
4
|
/**
|
|
5
5
|
* @uiName Referral Table Generic Column
|
|
6
6
|
*/
|
package/dist/collection/components/sqm-referral-table/columns/sqm-referral-table-date-column.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { withHooks } from "@saasquatch/stencil-hooks";
|
|
2
2
|
import { Component, h, Host, Method, Prop } from "@stencil/core";
|
|
3
|
-
import { useRequestRerender } from "
|
|
3
|
+
import { useRequestRerender } from "../../../tables/re-render";
|
|
4
4
|
/**
|
|
5
5
|
* @uiName Referral Table Date Column
|
|
6
6
|
*/
|
package/dist/collection/components/sqm-referral-table/columns/sqm-referral-table-rewards-column.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { withHooks } from "@saasquatch/stencil-hooks";
|
|
2
2
|
import { Component, h, Host, Method, Prop } from "@stencil/core";
|
|
3
|
-
import { useRequestRerender } from "
|
|
3
|
+
import { useRequestRerender } from "../../../tables/re-render";
|
|
4
4
|
/**
|
|
5
5
|
* @uiName Referral Table Rewards Column
|
|
6
6
|
*/
|
package/dist/collection/components/sqm-referral-table/columns/sqm-referral-table-status-column.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { withHooks } from "@saasquatch/stencil-hooks";
|
|
2
2
|
import { Component, h, Host, Method, Prop } from "@stencil/core";
|
|
3
|
-
import { useRequestRerender } from "
|
|
3
|
+
import { useRequestRerender } from "../../../tables/re-render";
|
|
4
4
|
/**
|
|
5
5
|
* @uiName Referral Table Status Column
|
|
6
6
|
*/
|
package/dist/collection/components/sqm-referral-table/columns/sqm-referral-table-user-column.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { withHooks } from "@saasquatch/stencil-hooks";
|
|
2
2
|
import { Component, h, Host, Method, Prop } from "@stencil/core";
|
|
3
|
-
import { useRequestRerender } from "
|
|
3
|
+
import { useRequestRerender } from "../../../tables/re-render";
|
|
4
4
|
/**
|
|
5
5
|
* @uiName Referral Table User Column
|
|
6
6
|
*/
|
|
@@ -2,8 +2,8 @@ import { usePaginatedQuery, useProgramId, useQuery, useUserIdentity, } from "@sa
|
|
|
2
2
|
import { useEffect, useReducer } from "@saasquatch/universal-hooks";
|
|
3
3
|
import { h } from "@stencil/core";
|
|
4
4
|
import gql from "graphql-tag";
|
|
5
|
-
import { useRerenderListener } from "
|
|
6
|
-
import { useChildElements } from "
|
|
5
|
+
import { useRerenderListener } from "../../tables/re-render";
|
|
6
|
+
import { useChildElements } from "../../tables/useChildElements";
|
|
7
7
|
const GET_REFERRER_DATA = gql `
|
|
8
8
|
query getReferrals($programId: ID, $rewardFilter: RewardFilterInput) {
|
|
9
9
|
viewer {
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { h } from "@stencil/core";
|
|
2
|
+
import { RewardExchangeView } from "./sqm-reward-exchange-list-view";
|
|
3
|
+
import * as Data from "./RewardExchangeListData";
|
|
4
|
+
export default {
|
|
5
|
+
title: "Components/Reward Exchange List",
|
|
6
|
+
};
|
|
7
|
+
const resizable = {
|
|
8
|
+
width: "683px",
|
|
9
|
+
minWidth: "260px",
|
|
10
|
+
resize: "horizontal",
|
|
11
|
+
height: "fit-content",
|
|
12
|
+
overflow: "hidden",
|
|
13
|
+
};
|
|
14
|
+
export const Default = () => {
|
|
15
|
+
return (h("div", { style: resizable },
|
|
16
|
+
h(RewardExchangeView, Object.assign({}, Data.test))));
|
|
17
|
+
};
|
|
18
|
+
export const Default2 = () => {
|
|
19
|
+
return (h("div", { style: { ...resizable, height: "700px" } },
|
|
20
|
+
h(RewardExchangeView, Object.assign({}, Data.test2))));
|
|
21
|
+
};
|
|
@@ -0,0 +1,218 @@
|
|
|
1
|
+
const baseResponse = (data) => ({
|
|
2
|
+
states: {
|
|
3
|
+
content: null,
|
|
4
|
+
redeemStage: "chooseReward",
|
|
5
|
+
amount: 0,
|
|
6
|
+
exchangeError: false,
|
|
7
|
+
loading: false,
|
|
8
|
+
selectedItem: null,
|
|
9
|
+
selectedStep: null,
|
|
10
|
+
},
|
|
11
|
+
data: {
|
|
12
|
+
exchangeList: data,
|
|
13
|
+
},
|
|
14
|
+
callbacks: {
|
|
15
|
+
exchangeReward: null,
|
|
16
|
+
openDrawer: null,
|
|
17
|
+
setStage: null,
|
|
18
|
+
setExchangeState: null,
|
|
19
|
+
refs: null,
|
|
20
|
+
},
|
|
21
|
+
refs: null,
|
|
22
|
+
});
|
|
23
|
+
const baseReward = {
|
|
24
|
+
key: "",
|
|
25
|
+
name: "",
|
|
26
|
+
description: "",
|
|
27
|
+
imageUrl: "",
|
|
28
|
+
available: true,
|
|
29
|
+
unavailableReason: null,
|
|
30
|
+
unavailableReasonCode: null,
|
|
31
|
+
ruleType: "FIXED_GLOBAL_REWARD",
|
|
32
|
+
sourceUnit: "POINT",
|
|
33
|
+
sourceValue: 10,
|
|
34
|
+
prettySourceValue: "10 SaaSquatch Points",
|
|
35
|
+
sourceMinValue: null,
|
|
36
|
+
prettySourceMinValue: null,
|
|
37
|
+
sourceMaxValue: null,
|
|
38
|
+
prettySourceMaxValue: null,
|
|
39
|
+
destinationMinValue: null,
|
|
40
|
+
prettyDestinationMinValue: null,
|
|
41
|
+
destinationMaxValue: null,
|
|
42
|
+
prettyDestinationMaxValue: null,
|
|
43
|
+
globalRewardKey: "",
|
|
44
|
+
destinationUnit: null,
|
|
45
|
+
steps: [],
|
|
46
|
+
};
|
|
47
|
+
const notEnoughPoints = {
|
|
48
|
+
available: false,
|
|
49
|
+
unavailableReasonCode: "INSUFFICIENT_REDEEMABLE_CREDIT",
|
|
50
|
+
};
|
|
51
|
+
const usTax = {
|
|
52
|
+
available: false,
|
|
53
|
+
unavailableReasonCode: "US_TAX",
|
|
54
|
+
};
|
|
55
|
+
const imageUrl = (props) => ({
|
|
56
|
+
imageUrl: props,
|
|
57
|
+
});
|
|
58
|
+
const description = (props) => ({
|
|
59
|
+
description: props,
|
|
60
|
+
});
|
|
61
|
+
const fixedValue = (props) => ({
|
|
62
|
+
prettySourceValue: props,
|
|
63
|
+
});
|
|
64
|
+
const variableValue = (min, max, text) => ({
|
|
65
|
+
ruleType: "VARIABLE_CREDIT_REWARD",
|
|
66
|
+
sourceMinValue: min,
|
|
67
|
+
prettySourceMinValue: min + " " + text,
|
|
68
|
+
sourceMaxValue: max,
|
|
69
|
+
prettySourceMaxValue: max + " " + text,
|
|
70
|
+
});
|
|
71
|
+
export const test = {
|
|
72
|
+
...baseResponse([
|
|
73
|
+
{
|
|
74
|
+
...baseReward,
|
|
75
|
+
...description("Free swag with a promo code"),
|
|
76
|
+
...imageUrl("https://i.imgur.com/Ds7M19I.png"),
|
|
77
|
+
...fixedValue("40 SaaSquatch Points"),
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
...baseReward,
|
|
81
|
+
...description("Visa® Prepaid Card USD"),
|
|
82
|
+
...imageUrl("https://i.imgur.com/4s3q2zz.png"),
|
|
83
|
+
...variableValue(20, 80, "SaaSquatch Points"),
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
...baseReward,
|
|
87
|
+
...description("A very exclusive gift box"),
|
|
88
|
+
...imageUrl("https://i.imgur.com/XuiJi4l.png"),
|
|
89
|
+
...fixedValue("30 SaaSquatch Points"),
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
...baseReward,
|
|
93
|
+
...description("$50 Store credit"),
|
|
94
|
+
...imageUrl("https://i.imgur.com/WkCMVSE.png"),
|
|
95
|
+
...fixedValue("100 SaaSquatch Points"),
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
...baseReward,
|
|
99
|
+
...description("Variable amount of store credit"),
|
|
100
|
+
...imageUrl("https://i.imgur.com/Jn2fE0s.png"),
|
|
101
|
+
...variableValue(20, 100, "SaaSquatch Points"),
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
...baseReward,
|
|
105
|
+
...notEnoughPoints,
|
|
106
|
+
...description("A very rare cactus"),
|
|
107
|
+
...imageUrl("https://i.imgur.com/CvCdpXc.png"),
|
|
108
|
+
...fixedValue("2000 SaaSquatch Points"),
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
...baseReward,
|
|
112
|
+
...usTax,
|
|
113
|
+
...description("$1000 Store credit"),
|
|
114
|
+
...imageUrl("https://i.imgur.com/I9FCh9Z.png"),
|
|
115
|
+
...fixedValue("2000 SaaSquatch Points"),
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
...baseReward,
|
|
119
|
+
...notEnoughPoints,
|
|
120
|
+
...description("A holiday gift box"),
|
|
121
|
+
...imageUrl("https://i.imgur.com/HBJS1WH.png"),
|
|
122
|
+
...fixedValue("100 SaaSquatch Points"),
|
|
123
|
+
},
|
|
124
|
+
]),
|
|
125
|
+
};
|
|
126
|
+
export const test2 = {
|
|
127
|
+
states: {
|
|
128
|
+
content: {
|
|
129
|
+
text: {
|
|
130
|
+
buttonText: "Exchange Rewards",
|
|
131
|
+
ignored: true,
|
|
132
|
+
},
|
|
133
|
+
},
|
|
134
|
+
redeemStage: "chooseAmount",
|
|
135
|
+
amount: 0,
|
|
136
|
+
exchangeError: false,
|
|
137
|
+
loading: false,
|
|
138
|
+
selectedItem: {
|
|
139
|
+
key: "r4",
|
|
140
|
+
name: "Salmon Coins",
|
|
141
|
+
description: "Points for Salmon Coins",
|
|
142
|
+
im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5Xw51ns9Uf+xhJb2mJbycAOK1vWA3zO8eq79ncslj7rSnRrGNw+Mo1HEta18O1rQ14LHE2yAdO3Je7r54xFyYMjcQAe79oXsvQfSn2jCUy6demOrfOZLAIPa3VPMncuusujREQEREBERAREQEREFpaCIN1FqaPpu92OVvJTEQaitoVpye4c4P7LWV+i0/A7iRB7wupRZvMqy2OHf0OvIZB3tcP8lJo6EcwWYRvPtE9sldeiniL6rlRgnDNju4qx2F4fWxdakJeIeq5A0An2ZdaWDcO5WdQz4W9wWP4v+r7rlxhQs1LBt2roDhGfC3uT7Iz4fNanGJ6rmK1WgDAlxytsO6+SjPxLB7rwOQPkV02J0PRqTrNgxGsLOHbt5GQua0hoavSksHWM+7JcObMxzaT8oTrn5+Lz1/qjcVSPvgfN6v91ipjKQNxF1znXcOBvEcJH6iVJ0bpHq3TAc33mOEC+4gEA5XcvPLNyt38+N6KKuZQnIE8gt9hyxzQ5oaQdwH1KkQuv8Mv9se655mCecmHtt5rMNFvPwt8fJbtFqf+PKe61bNED3nk8gB5ypFLR7GmYk/eMxyGSmItTjmfkS21VRcXgqdQRUY10ZEi45HMHkpSLaOS0l0Qa6TRcWnc4m/4oJI+YOXLYvRVagfWa5g+JsBp5gkscTwIPBeqqhErN5laleTUmkH2Rzb/AMZ7Wmx71v8AQOB6yqJ9lvrOnbGw75MeK6itoOg6/VgH7stHcLHuUjBYFlIEMETcnMlSc1fXxMREW2BERAREQEREBc3pbodha8nV6t596nDZ5tjVPOJ4rpEQeU6U9H+Ibem5lYbB7Du5xj+rsW89HuiMThzVFZmoxwbAJBlwJuIOUE35dncopn1dVREVQREQEREBERAREQEREBERAREQEREBERAREQEREGuxuiqNW72An4hLXfmbBjhktFi+h+2nV5B4y/EyI7l1qLN5l/VlsaDo9oytQLmvc0sI2OJOtaDBYItO07Fv0RWTJhbqqIiqCIiAiIgIiICIiAiIgIiICIiAiIgIiICIiAiIg//Z",
|
|
143
|
+
available: true,
|
|
144
|
+
unavailableReason: null,
|
|
145
|
+
unavailableReasonCode: null,
|
|
146
|
+
ruleType: "VARIABLE_CREDIT_REWARD",
|
|
147
|
+
sourceUnit: "POINT",
|
|
148
|
+
sourceValue: null,
|
|
149
|
+
prettySourceValue: null,
|
|
150
|
+
sourceMinValue: 1,
|
|
151
|
+
prettySourceMinValue: "1 Point",
|
|
152
|
+
sourceMaxValue: 100,
|
|
153
|
+
prettySourceMaxValue: "100 Points",
|
|
154
|
+
destinationMinValue: 1,
|
|
155
|
+
prettyDestinationMinValue: "1 Salmon Coin",
|
|
156
|
+
destinationMaxValue: 100,
|
|
157
|
+
prettyDestinationMaxValue: "100 Salmons",
|
|
158
|
+
globalRewardKey: null,
|
|
159
|
+
destinationUnit: "TESTUNIT",
|
|
160
|
+
steps: [
|
|
161
|
+
{
|
|
162
|
+
sourceValue: 1,
|
|
163
|
+
prettySourceValue: "1 Point",
|
|
164
|
+
destinationValue: 1,
|
|
165
|
+
prettyDestinationValue: "1 Salmon Coin",
|
|
166
|
+
available: true,
|
|
167
|
+
unavailableReasonCode: null,
|
|
168
|
+
},
|
|
169
|
+
{
|
|
170
|
+
sourceValue: 2,
|
|
171
|
+
prettySourceValue: "2 Points",
|
|
172
|
+
destinationValue: 2,
|
|
173
|
+
prettyDestinationValue: "2 Salmons",
|
|
174
|
+
available: true,
|
|
175
|
+
unavailableReasonCode: null,
|
|
176
|
+
},
|
|
177
|
+
{
|
|
178
|
+
sourceValue: 3,
|
|
179
|
+
prettySourceValue: "3 Points",
|
|
180
|
+
destinationValue: 3,
|
|
181
|
+
prettyDestinationValue: "3 Salmons",
|
|
182
|
+
available: true,
|
|
183
|
+
unavailableReasonCode: null,
|
|
184
|
+
},
|
|
185
|
+
{
|
|
186
|
+
sourceValue: 4,
|
|
187
|
+
prettySourceValue: "4 Points",
|
|
188
|
+
destinationValue: 4,
|
|
189
|
+
prettyDestinationValue: "4 Salmons",
|
|
190
|
+
available: true,
|
|
191
|
+
unavailableReasonCode: null,
|
|
192
|
+
},
|
|
193
|
+
{
|
|
194
|
+
sourceValue: 5,
|
|
195
|
+
prettySourceValue: "5 Points",
|
|
196
|
+
destinationValue: 5,
|
|
197
|
+
prettyDestinationValue: "5 Salmons",
|
|
198
|
+
available: true,
|
|
199
|
+
unavailableReasonCode: null,
|
|
200
|
+
},
|
|
201
|
+
],
|
|
202
|
+
},
|
|
203
|
+
selectedStep: null,
|
|
204
|
+
},
|
|
205
|
+
data: {
|
|
206
|
+
exchangeList: null,
|
|
207
|
+
},
|
|
208
|
+
callbacks: {
|
|
209
|
+
exchangeReward: null,
|
|
210
|
+
openDrawer: null,
|
|
211
|
+
setStage: null,
|
|
212
|
+
setExchangeState: null,
|
|
213
|
+
refs: {
|
|
214
|
+
drawerRef: {},
|
|
215
|
+
},
|
|
216
|
+
},
|
|
217
|
+
refs: null,
|
|
218
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { h } from "@stencil/core";
|
|
2
|
+
export const LeftArrow = () => (h("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", style: { marginBottom: "-2px", marginRight: "5px" } },
|
|
3
|
+
h("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M7.34655 1.90573C7.75405 2.31323 7.75405 2.97392 7.34655 3.38143L3.56266 7.16531H14.9565C15.5328 7.16531 16 7.6325 16 8.20879C16 8.78509 15.5328 9.25227 14.9565 9.25227H3.56266L7.69437 13.384C8.10188 13.7915 8.10188 14.4522 7.69437 14.8597C7.28687 15.2672 6.62617 15.2672 6.21867 14.8597L0.305628 8.94664C-0.101876 8.53914 -0.101876 7.87845 0.305628 7.47094L5.87084 1.90573C6.27835 1.49822 6.93904 1.49822 7.34655 1.90573Z", fill: "#858585" })));
|
|
4
|
+
export const ExchangeArrows = () => (h("svg", { width: "30", height: "30", viewBox: "0 0 30 30", fill: "none", xmlns: "http://www.w3.org/2000/svg" },
|
|
5
|
+
h("circle", { cx: "15", cy: "15", r: "15", fill: "white" }),
|
|
6
|
+
h("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M10.6255 21.783C10.5129 21.8963 10.3597 21.96 10.2 21.96C10.0402 21.96 9.88705 21.8963 9.77442 21.783L5.87442 17.8597C5.64081 17.6247 5.64194 17.2448 5.87695 17.0112C6.11197 16.7775 6.49186 16.7787 6.72548 17.0137L9.59995 19.9054V8.52001C9.59995 8.18864 9.86858 7.92001 10.2 7.92001C10.5313 7.92001 10.8 8.18864 10.8 8.52001V19.9054L13.6744 17.0137C13.908 16.7787 14.2879 16.7775 14.5229 17.0112C14.758 17.2448 14.7591 17.6247 14.5255 17.8597L10.6255 21.783ZM20.2255 8.09707C20.1129 7.98378 19.9597 7.92007 19.8 7.92007C19.6402 7.92007 19.487 7.98378 19.3744 8.09707L15.4744 12.0204C15.2408 12.2554 15.2419 12.6353 15.477 12.8689C15.712 13.1025 16.0919 13.1014 16.3255 12.8664L19.2 9.97473V21.3601C19.2 21.6914 19.4686 21.9601 19.8 21.9601C20.1313 21.9601 20.4 21.6914 20.4 21.3601V9.97473L23.2744 12.8664C23.508 13.1014 23.8879 13.1025 24.1229 12.8689C24.358 12.6353 24.3591 12.2554 24.1255 12.0204L20.2255 8.09707Z", fill: "#333333" })));
|
|
7
|
+
export const CheckMark = () => (h("svg", { style: { top: "-4px", position: "relative", left: "2px" }, xmlns: "http://www.w3.org/2000/svg", width: "10", height: "7", viewBox: "0 0 10 7", fill: "none" },
|
|
8
|
+
h("path", { d: "M2.12828 2.71485C1.72536 2.33712 1.09253 2.35754 0.714799 2.76045C0.337068 3.16336 0.357483 3.7962 0.760395 4.17393L2.12828 2.71485ZM3.81471 5.66661L3.13076 6.39615C3.51542 6.75677 4.11399 6.75677 4.49865 6.39615L3.81471 5.66661ZM9.23939 1.95171C9.6423 1.57397 9.66271 0.941139 9.28498 0.538227C8.90725 0.135315 8.27442 0.114901 7.87151 0.492631L9.23939 1.95171ZM0.760395 4.17393L3.13076 6.39615L4.49865 4.93708L2.12828 2.71485L0.760395 4.17393ZM4.49865 6.39615L9.23939 1.95171L7.87151 0.492631L3.13076 4.93708L4.49865 6.39615Z", fill: "white" })));
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
import { setUserIdentity, useLazyQuery, } from "@saasquatch/component-boilerplate";
|
|
2
|
+
import { useEffect, useState } from "@saasquatch/universal-hooks";
|
|
3
|
+
import { h } from "@stencil/core";
|
|
4
|
+
import { gql } from "graphql-request";
|
|
5
|
+
import { createHookStory } from "../sqm-stencilbook/HookStoryAddon";
|
|
6
|
+
const EXCHANGE = gql `
|
|
7
|
+
mutation exchange($exchangeRewardInput: ExchangeRewardInput!) {
|
|
8
|
+
exchangeReward(exchangeRewardInput: $exchangeRewardInput) {
|
|
9
|
+
reward {
|
|
10
|
+
id
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
`;
|
|
15
|
+
export default {
|
|
16
|
+
title: "Hooks / useRewardExchange",
|
|
17
|
+
};
|
|
18
|
+
function setupGraphQL() {
|
|
19
|
+
const id = "testestest";
|
|
20
|
+
const accountId = id;
|
|
21
|
+
const programId = "sam-partner-test-2";
|
|
22
|
+
//@ts-ignore
|
|
23
|
+
window.widgetIdent = {
|
|
24
|
+
tenantAlias: "test_a8b41jotf8a1v",
|
|
25
|
+
appDomain: "https://staging.referralsaasquatch.com",
|
|
26
|
+
programId,
|
|
27
|
+
};
|
|
28
|
+
useEffect(() => {
|
|
29
|
+
setUserIdentity({
|
|
30
|
+
accountId,
|
|
31
|
+
id,
|
|
32
|
+
jwt: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyIjp7ImFjY291bnRJZCI6InRlc3Rlc3Rlc3QiLCJpZCI6InRlc3Rlc3Rlc3QifX0.qYnU5hNeIj9C_G3NogfG7btgCPGZC7JRXY0MG6a63zs",
|
|
33
|
+
});
|
|
34
|
+
return () => {
|
|
35
|
+
window.widgetIdent = undefined;
|
|
36
|
+
setUserIdentity(undefined);
|
|
37
|
+
};
|
|
38
|
+
}, []);
|
|
39
|
+
return { id, accountId };
|
|
40
|
+
}
|
|
41
|
+
function useExchangeButton() {
|
|
42
|
+
const { id, accountId } = setupGraphQL();
|
|
43
|
+
const [points, setPoints] = useState(10);
|
|
44
|
+
const [rate, setRate] = useState(100);
|
|
45
|
+
const [exchange, { data, errors }] = useLazyQuery(EXCHANGE);
|
|
46
|
+
return {
|
|
47
|
+
states: {
|
|
48
|
+
points,
|
|
49
|
+
rate,
|
|
50
|
+
},
|
|
51
|
+
data: {
|
|
52
|
+
id,
|
|
53
|
+
accountId,
|
|
54
|
+
data,
|
|
55
|
+
errors,
|
|
56
|
+
},
|
|
57
|
+
callbacks: {
|
|
58
|
+
exchange,
|
|
59
|
+
setPoints,
|
|
60
|
+
setRate,
|
|
61
|
+
},
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
const DefaultView = (props) => {
|
|
65
|
+
const { states, data, callbacks } = props;
|
|
66
|
+
return (h("div", null,
|
|
67
|
+
h("div", null,
|
|
68
|
+
h("label", null, "Rate:"),
|
|
69
|
+
h("input", { value: states.rate, onInput: (e) =>
|
|
70
|
+
// @ts-ignore
|
|
71
|
+
callbacks.setRate(e.target.value) })),
|
|
72
|
+
h("input", { value: states.points, onInput: (e) =>
|
|
73
|
+
// @ts-ignore
|
|
74
|
+
callbacks.setPoints(e.target.value) }),
|
|
75
|
+
h("button", { onClick: () => callbacks.exchange(props.input) }, "Exchange"),
|
|
76
|
+
h("details", null,
|
|
77
|
+
h("summary", null, "response"),
|
|
78
|
+
h("h4", null, "data"),
|
|
79
|
+
h("div", { style: { maxWidth: "500px" } },
|
|
80
|
+
h("pre", { style: { width: "500px", whiteSpace: "pre-wrap" } }, JSON.stringify(data.data))),
|
|
81
|
+
h("h4", null, "errors"),
|
|
82
|
+
h("div", { style: { maxWidth: "500px" } },
|
|
83
|
+
h("pre", { style: { maxWidth: "500px", whiteSpace: "pre-wrap" } }, JSON.stringify(data.errors))))));
|
|
84
|
+
};
|
|
85
|
+
export const RewardList = createHookStory(() => {
|
|
86
|
+
setupGraphQL();
|
|
87
|
+
const props = {
|
|
88
|
+
listType: "",
|
|
89
|
+
render: () => { },
|
|
90
|
+
disconnectedCallback: () => { },
|
|
91
|
+
ignored: true,
|
|
92
|
+
};
|
|
93
|
+
return (h("sqm-reward-exchange-list", { "list-type": "something" }));
|
|
94
|
+
});
|
|
95
|
+
export const FixedGlobalReward = createHookStory(() => {
|
|
96
|
+
const { states, data, callbacks } = useExchangeButton();
|
|
97
|
+
return (h(DefaultView, { states: states, data: data, callbacks: callbacks, input: {
|
|
98
|
+
exchangeRewardInput: {
|
|
99
|
+
userId: data.id,
|
|
100
|
+
accountId: data.accountId,
|
|
101
|
+
redeemCreditInput: {
|
|
102
|
+
amount: states.points,
|
|
103
|
+
unit: "POINT",
|
|
104
|
+
},
|
|
105
|
+
globalRewardKey: "gc1",
|
|
106
|
+
},
|
|
107
|
+
} }));
|
|
108
|
+
});
|
|
109
|
+
export const VariableGlobalReward = createHookStory(() => {
|
|
110
|
+
const { states, data, callbacks } = useExchangeButton();
|
|
111
|
+
return (h(DefaultView, { states: states, data: data, callbacks: callbacks, input: {
|
|
112
|
+
exchangeRewardInput: {
|
|
113
|
+
userId: data.id,
|
|
114
|
+
accountId: data.accountId,
|
|
115
|
+
redeemCreditInput: {
|
|
116
|
+
amount: states.points,
|
|
117
|
+
unit: "POINT",
|
|
118
|
+
},
|
|
119
|
+
globalRewardKey: "gc1",
|
|
120
|
+
rewardInput: {
|
|
121
|
+
valueInCents: Math.ceil(states.points * states.rate),
|
|
122
|
+
},
|
|
123
|
+
},
|
|
124
|
+
} }));
|
|
125
|
+
});
|
|
126
|
+
export const VariableCreditReward = createHookStory(() => {
|
|
127
|
+
const { states, data, callbacks } = useExchangeButton();
|
|
128
|
+
return (h(DefaultView, { states: states, data: data, callbacks: callbacks, input: {
|
|
129
|
+
exchangeRewardInput: {
|
|
130
|
+
userId: data.id,
|
|
131
|
+
accountId: data.accountId,
|
|
132
|
+
redeemCreditInput: {
|
|
133
|
+
amount: states.points,
|
|
134
|
+
unit: "POINT",
|
|
135
|
+
},
|
|
136
|
+
rewardInput: {
|
|
137
|
+
type: "CREDIT",
|
|
138
|
+
unit: "foo",
|
|
139
|
+
assignedCredit: Math.ceil(states.points * states.rate),
|
|
140
|
+
},
|
|
141
|
+
},
|
|
142
|
+
} }));
|
|
143
|
+
});
|
|
Binary file
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { h } from "@stencil/core";
|
|
2
|
+
import { CheckMark } from "./SVGs";
|
|
3
|
+
function Dot({ active, completed, incomplete, }) {
|
|
4
|
+
return (h("div", { style: {
|
|
5
|
+
flex: "0 0 0",
|
|
6
|
+
content: "''",
|
|
7
|
+
height: "4px",
|
|
8
|
+
borderRadius: "4px",
|
|
9
|
+
background: incomplete ? "#E5E5E5" : "#9E9E9E",
|
|
10
|
+
position: "relative",
|
|
11
|
+
bottom: "0",
|
|
12
|
+
left: "0",
|
|
13
|
+
display: "flex",
|
|
14
|
+
justifyContent: "center",
|
|
15
|
+
columnGap: "50px",
|
|
16
|
+
marginRight: "-2px",
|
|
17
|
+
boxSizing: "content-box",
|
|
18
|
+
} },
|
|
19
|
+
h("div", { style: {
|
|
20
|
+
backgroundColor: completed ? "#9E9E9E" : "#FFF",
|
|
21
|
+
border: active
|
|
22
|
+
? "2px solid #9E9E9E"
|
|
23
|
+
: incomplete
|
|
24
|
+
? "2px solid #E5E5E5"
|
|
25
|
+
: "none",
|
|
26
|
+
borderRadius: "50%",
|
|
27
|
+
width: completed ? "14px" : "10px",
|
|
28
|
+
height: completed ? "14px" : "10px",
|
|
29
|
+
margin: "-5px auto 0px",
|
|
30
|
+
zIndex: "1",
|
|
31
|
+
boxSizing: "content-box",
|
|
32
|
+
} }, completed && h(CheckMark, null))));
|
|
33
|
+
}
|
|
34
|
+
function ProgressLine({ incomplete = false, active = false }) {
|
|
35
|
+
return (h("div", { style: {
|
|
36
|
+
content: "''",
|
|
37
|
+
flex: "0.5 0.5 0",
|
|
38
|
+
height: "4px",
|
|
39
|
+
borderRadius: "4px",
|
|
40
|
+
background: incomplete || active ? "#E5E5E5" : "#9E9E9E",
|
|
41
|
+
position: "relative",
|
|
42
|
+
bottom: "0",
|
|
43
|
+
left: "0",
|
|
44
|
+
display: "flex",
|
|
45
|
+
justifyContent: "center",
|
|
46
|
+
columnGap: "50px",
|
|
47
|
+
marginRight: "-2px",
|
|
48
|
+
boxSizing: "content-box",
|
|
49
|
+
} }));
|
|
50
|
+
}
|
|
51
|
+
function Progress({ active, completed, incomplete }) {
|
|
52
|
+
return [
|
|
53
|
+
h(ProgressLine, { incomplete: incomplete }),
|
|
54
|
+
h(Dot, { active: active, completed: completed, incomplete: incomplete }),
|
|
55
|
+
h(ProgressLine, { incomplete: incomplete, active: active }),
|
|
56
|
+
];
|
|
57
|
+
}
|
|
58
|
+
export function ProgressBar({ stageCount, currentStage, }) {
|
|
59
|
+
return (h("div", { style: { display: "flex", columnGap: "-2px" } }, Array.from(Array(stageCount).keys()).map((stage) => (h(Progress, { active: currentStage === stage, completed: currentStage > stage, incomplete: currentStage < stage })))));
|
|
60
|
+
}
|