@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
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { h, r as registerInstance, c as Host } from './index-17b4da69.js';
|
|
1
|
+
import { h, r as registerInstance, c as Host, d as getAssetPath } from './index-17b4da69.js';
|
|
2
2
|
import { m as h$1, j as useState, e as useEffect, f as useRef, n as d$2, y as y$1, b as browser, u as useReducer, c as createCommonjsModule, a as commonjsGlobal, k as useMemo } from './extends-3a3f9fe2.js';
|
|
3
|
-
import { i as intl, a as insertCSS } from './global-
|
|
3
|
+
import { i as intl, a as insertCSS } from './global-5ecbf81a.js';
|
|
4
4
|
import { u as useCallback } from './use-callback-b38a1523.js';
|
|
5
|
-
import { d as dist, T as T$1, e as en, b as be, j as j$1, Z as Ze, r as rn, D as De, q as qe, P as P$1, E as Ee, M as M$1, a as sn, c as an, x as x$1, f as D$1, L as L$1 } from './index.module-
|
|
5
|
+
import { d as dist, T as T$1, e as en, b as be, j as j$1, Z as Ze, r as rn, D as De, q as qe, P as P$1, E as Ee, M as M$1, a as sn, c as an, x as x$1, f as D$1, L as L$1, N as Ne } from './index.module-f80561db.js';
|
|
6
6
|
import { j as jsonpointer } from './jsonpointer-388a7082.js';
|
|
7
|
+
import './tslib.es6-7ac9d7e4.js';
|
|
7
8
|
import { j as jss, c as create } from './jss-preset-default.esm-71fae192.js';
|
|
8
9
|
import { g as getProps, a as getMissingProps } from './utils-454405f5.js';
|
|
9
10
|
import { c as cjs } from './cjs-bdfb4486.js';
|
|
@@ -11,21 +12,24 @@ import { E as ErrorStyles, H as HostBlock, A as AuthWrapper, a as AuthColumn, b
|
|
|
11
12
|
import { P as PortalContainerView } from './sqm-portal-container-view-73757ca5.js';
|
|
12
13
|
import { P as PortalSectionView } from './sqm-portal-section-view-f0876545.js';
|
|
13
14
|
import { T as TextSpanView } from './sqm-text-span-view-1781df94.js';
|
|
14
|
-
import { g as gql
|
|
15
|
-
import { u as useRerenderListener } from './re-render-
|
|
16
|
-
import {
|
|
15
|
+
import { g as gql } from './index-2f5dd0a1.js';
|
|
16
|
+
import { u as useRerenderListener } from './re-render-9ab5fe0f.js';
|
|
17
|
+
import { u as useChildElements } from './useChildElements-506f00d0.js';
|
|
18
|
+
import { p as pathToRegexp, B as BigStatView, u as useBigStat, a as useDemoBigStat } from './useDemoBigStat-b71fe122.js';
|
|
17
19
|
import { S as ShareLinkView } from './sqm-share-link-view-9282b8e8.js';
|
|
18
|
-
import { L as LeaderboardView, u as useLeaderboard, S as ShadowViewAddon } from './ShadowViewAddon-
|
|
20
|
+
import { L as LeaderboardView, u as useLeaderboard, S as ShadowViewAddon } from './ShadowViewAddon-fff5d35d.js';
|
|
21
|
+
import { L as LeaderboardRankView } from './sqm-leaderboard-rank-view-da91f5f3.js';
|
|
19
22
|
import { N as NavigationSidebarView } from './sqm-navigation-sidebar-view-2242502c.js';
|
|
20
|
-
import { N as NavigationSidebarItemView } from './sqm-navigation-sidebar-item-view-
|
|
23
|
+
import { N as NavigationSidebarItemView } from './sqm-navigation-sidebar-item-view-8a3f374b.js';
|
|
21
24
|
import { S as StatContainerView } from './sqm-stat-container-view-4133feb6.js';
|
|
22
|
-
import { P as PortalProfileView } from './sqm-portal-profile-view-
|
|
25
|
+
import { P as PortalProfileView } from './sqm-portal-profile-view-824c8242.js';
|
|
23
26
|
import { P as PortalForgotPasswordView } from './sqm-portal-forgot-password-view-e3a6a716.js';
|
|
24
|
-
import { P as PortalEmailVerificationView } from './sqm-portal-email-verification-view-
|
|
27
|
+
import { P as PortalEmailVerificationView } from './sqm-portal-email-verification-view-90781be2.js';
|
|
25
28
|
import { P as PortalResetPasswordView$1 } from './sqm-portal-reset-password-view-a4e50da2.js';
|
|
26
29
|
import { P as PortalVerifyEmailView } from './sqm-portal-verify-email-view-6f18bac2.js';
|
|
27
30
|
import { A as AssetCardView } from './sqm-asset-card-view-6f360937.js';
|
|
28
|
-
import {
|
|
31
|
+
import { T as TaskCardView, P as ProgressBar$2 } from './sqm-task-card-view-6a082a21.js';
|
|
32
|
+
import { P as PoweredByImg$1, a as PortalFooterView } from './sqm-portal-footer-view-c317518e.js';
|
|
29
33
|
import { H as HeroView } from './sqm-hero-view-bfd8abd1.js';
|
|
30
34
|
import { N as NameFieldsView } from './sqm-name-fields-view-4162fb7b.js';
|
|
31
35
|
|
|
@@ -5872,21 +5876,6 @@ function ReferralTableView(props) {
|
|
|
5872
5876
|
h("sl-button", { size: "small", loading: states.loading, disabled: !states.hasNext, onClick: callbacks.nextPage, exportparts: "base: defaultbutton-base" }, data.textOverrides.moreLabel))));
|
|
5873
5877
|
}
|
|
5874
5878
|
|
|
5875
|
-
function useChildElements() {
|
|
5876
|
-
const host = P$1();
|
|
5877
|
-
const initialState = host.children.length ? Array.from(host.children) : [];
|
|
5878
|
-
const [childElements, setChildElements] = useState(initialState);
|
|
5879
|
-
useEffect(() => {
|
|
5880
|
-
const observer = new MutationObserver(() => {
|
|
5881
|
-
const children = Array.from(host.children);
|
|
5882
|
-
setChildElements([...children]);
|
|
5883
|
-
});
|
|
5884
|
-
observer.observe(host, { childList: true });
|
|
5885
|
-
return () => observer.disconnect();
|
|
5886
|
-
}, [host]);
|
|
5887
|
-
return childElements;
|
|
5888
|
-
}
|
|
5889
|
-
|
|
5890
5879
|
const GET_REFERRER_DATA = gql `
|
|
5891
5880
|
query getReferrals($programId: ID, $rewardFilter: RewardFilterInput) {
|
|
5892
5881
|
viewer {
|
|
@@ -14745,6 +14734,542 @@ const ReferralTableUserCell = class {
|
|
|
14745
14734
|
}
|
|
14746
14735
|
};
|
|
14747
14736
|
|
|
14737
|
+
const GET_EXCHANGE_LIST = dist.gql `
|
|
14738
|
+
query getExchangeList {
|
|
14739
|
+
viewer {
|
|
14740
|
+
... on User {
|
|
14741
|
+
visibleRewardExchangeItems(limit: 20, offset: 0) {
|
|
14742
|
+
data {
|
|
14743
|
+
key
|
|
14744
|
+
name
|
|
14745
|
+
description
|
|
14746
|
+
imageUrl
|
|
14747
|
+
available
|
|
14748
|
+
unavailableReason
|
|
14749
|
+
unavailableReasonCode
|
|
14750
|
+
ruleType
|
|
14751
|
+
sourceUnit
|
|
14752
|
+
sourceValue
|
|
14753
|
+
prettySourceValue
|
|
14754
|
+
sourceMinValue
|
|
14755
|
+
prettySourceMinValue
|
|
14756
|
+
sourceMaxValue
|
|
14757
|
+
prettySourceMaxValue
|
|
14758
|
+
destinationMinValue
|
|
14759
|
+
prettyDestinationMinValue
|
|
14760
|
+
destinationMaxValue
|
|
14761
|
+
prettyDestinationMaxValue
|
|
14762
|
+
globalRewardKey
|
|
14763
|
+
destinationUnit
|
|
14764
|
+
steps {
|
|
14765
|
+
sourceValue
|
|
14766
|
+
prettySourceValue
|
|
14767
|
+
destinationValue
|
|
14768
|
+
prettyDestinationValue
|
|
14769
|
+
}
|
|
14770
|
+
}
|
|
14771
|
+
totalCount
|
|
14772
|
+
}
|
|
14773
|
+
}
|
|
14774
|
+
}
|
|
14775
|
+
}
|
|
14776
|
+
`;
|
|
14777
|
+
const EXCHANGE = dist.gql `
|
|
14778
|
+
mutation exchange($exchangeRewardInput: ExchangeRewardInput!) {
|
|
14779
|
+
exchangeReward(exchangeRewardInput: $exchangeRewardInput) {
|
|
14780
|
+
reward {
|
|
14781
|
+
id
|
|
14782
|
+
fuelTankCode
|
|
14783
|
+
}
|
|
14784
|
+
}
|
|
14785
|
+
}
|
|
14786
|
+
`;
|
|
14787
|
+
function useRewardExchangeList(_) {
|
|
14788
|
+
var _a, _b, _c, _d;
|
|
14789
|
+
const drawerRef = useRef();
|
|
14790
|
+
const [exchangeState, setExchangeState] = useReducer((state, next) => ({
|
|
14791
|
+
...state,
|
|
14792
|
+
...next,
|
|
14793
|
+
}), {
|
|
14794
|
+
selectedItem: undefined,
|
|
14795
|
+
selectedStep: undefined,
|
|
14796
|
+
redeemStage: "",
|
|
14797
|
+
amount: 0,
|
|
14798
|
+
exchangeError: false,
|
|
14799
|
+
});
|
|
14800
|
+
const { selectedItem, selectedStep, redeemStage, amount, exchangeError } = exchangeState;
|
|
14801
|
+
const user = T$1();
|
|
14802
|
+
const [exchange, { data: exchangeResponse, errors }] = be(EXCHANGE);
|
|
14803
|
+
const { data } = en(GET_EXCHANGE_LIST, !(user === null || user === void 0 ? void 0 : user.jwt));
|
|
14804
|
+
useEffect(() => {
|
|
14805
|
+
var _a, _b;
|
|
14806
|
+
if ((_b = (_a = exchangeResponse === null || exchangeResponse === void 0 ? void 0 : exchangeResponse.exchangeReward) === null || _a === void 0 ? void 0 : _a.reward) === null || _b === void 0 ? void 0 : _b.id) {
|
|
14807
|
+
setExchangeState({ redeemStage: "success" });
|
|
14808
|
+
}
|
|
14809
|
+
if (!!errors) {
|
|
14810
|
+
console.log("YEA");
|
|
14811
|
+
setExchangeState({ exchangeError: true });
|
|
14812
|
+
}
|
|
14813
|
+
}, [exchangeResponse, errors]);
|
|
14814
|
+
function openDrawer() {
|
|
14815
|
+
var _a;
|
|
14816
|
+
setExchangeState({ redeemStage: "chooseReward" });
|
|
14817
|
+
(_a = drawerRef.current) === null || _a === void 0 ? void 0 : _a.show();
|
|
14818
|
+
}
|
|
14819
|
+
function exchangeReward() {
|
|
14820
|
+
if (!selectedItem)
|
|
14821
|
+
return;
|
|
14822
|
+
let exchangeVariables = {
|
|
14823
|
+
accountId: user === null || user === void 0 ? void 0 : user.accountId,
|
|
14824
|
+
userId: user.id,
|
|
14825
|
+
};
|
|
14826
|
+
switch (selectedItem.ruleType) {
|
|
14827
|
+
case "FIXED_GLOBAL_REWARD":
|
|
14828
|
+
exchangeVariables = {
|
|
14829
|
+
...exchangeVariables,
|
|
14830
|
+
redeemCreditInput: {
|
|
14831
|
+
amount: selectedItem.sourceValue,
|
|
14832
|
+
unit: selectedItem.sourceUnit,
|
|
14833
|
+
},
|
|
14834
|
+
globalRewardKey: selectedItem.globalRewardKey,
|
|
14835
|
+
};
|
|
14836
|
+
break;
|
|
14837
|
+
case "VARIABLE_GLOBAL_REWARD":
|
|
14838
|
+
exchangeVariables = {
|
|
14839
|
+
...exchangeVariables,
|
|
14840
|
+
redeemCreditInput: {
|
|
14841
|
+
amount: amount,
|
|
14842
|
+
unit: selectedItem.sourceUnit,
|
|
14843
|
+
},
|
|
14844
|
+
globalRewardKey: selectedItem.globalRewardKey,
|
|
14845
|
+
rewardInput: {
|
|
14846
|
+
valueInCents: selectedStep.destinationValue,
|
|
14847
|
+
},
|
|
14848
|
+
};
|
|
14849
|
+
break;
|
|
14850
|
+
case "VARIABLE_CREDIT_REWARD":
|
|
14851
|
+
exchangeVariables = {
|
|
14852
|
+
...exchangeVariables,
|
|
14853
|
+
redeemCreditInput: {
|
|
14854
|
+
amount: amount,
|
|
14855
|
+
unit: selectedItem.sourceUnit,
|
|
14856
|
+
},
|
|
14857
|
+
rewardInput: {
|
|
14858
|
+
type: "CREDIT",
|
|
14859
|
+
unit: selectedItem.destinationUnit,
|
|
14860
|
+
assignedCredit: selectedStep.destinationValue,
|
|
14861
|
+
},
|
|
14862
|
+
};
|
|
14863
|
+
break;
|
|
14864
|
+
default:
|
|
14865
|
+
exchangeVariables = {
|
|
14866
|
+
...exchangeVariables,
|
|
14867
|
+
redeemCreditInput: {
|
|
14868
|
+
amount: selectedItem.sourceValue,
|
|
14869
|
+
unit: selectedItem.sourceUnit,
|
|
14870
|
+
},
|
|
14871
|
+
globalRewardKey: selectedItem.globalRewardKey,
|
|
14872
|
+
};
|
|
14873
|
+
}
|
|
14874
|
+
console.log(exchangeVariables);
|
|
14875
|
+
exchange({ exchangeRewardInput: exchangeVariables });
|
|
14876
|
+
}
|
|
14877
|
+
const resetState = useCallback((e) => {
|
|
14878
|
+
var _a, _b;
|
|
14879
|
+
// selects also trigger an sl-hide event :(
|
|
14880
|
+
//@ts-ignore - componentId is not private here
|
|
14881
|
+
if (((_a = e === null || e === void 0 ? void 0 : e.target) === null || _a === void 0 ? void 0 : _a.componentId) !== ((_b = drawerRef.current) === null || _b === void 0 ? void 0 : _b.componentId))
|
|
14882
|
+
return;
|
|
14883
|
+
setExchangeState({
|
|
14884
|
+
amount: 0,
|
|
14885
|
+
selectedStep: undefined,
|
|
14886
|
+
selectedItem: undefined,
|
|
14887
|
+
exchangeError: false,
|
|
14888
|
+
});
|
|
14889
|
+
}, []);
|
|
14890
|
+
useEffect(() => {
|
|
14891
|
+
if (!(drawerRef === null || drawerRef === void 0 ? void 0 : drawerRef.current))
|
|
14892
|
+
return;
|
|
14893
|
+
const drawer = drawerRef.current;
|
|
14894
|
+
// Clear input value when drawer is closed
|
|
14895
|
+
drawer.addEventListener("sl-hide", resetState);
|
|
14896
|
+
return () => {
|
|
14897
|
+
drawer.removeEventListener("sl-hide", resetState);
|
|
14898
|
+
};
|
|
14899
|
+
}, [drawerRef.current]);
|
|
14900
|
+
function setStage(stage) {
|
|
14901
|
+
setExchangeState({ redeemStage: stage });
|
|
14902
|
+
}
|
|
14903
|
+
console.log(exchangeResponse, exchangeResponse === null || exchangeResponse === void 0 ? void 0 : exchangeResponse.data, errors);
|
|
14904
|
+
return {
|
|
14905
|
+
states: {
|
|
14906
|
+
selectedItem,
|
|
14907
|
+
redeemStage,
|
|
14908
|
+
amount,
|
|
14909
|
+
selectedStep,
|
|
14910
|
+
exchangeError,
|
|
14911
|
+
},
|
|
14912
|
+
data: {
|
|
14913
|
+
exchangeList: (_b = (_a = data === null || data === void 0 ? void 0 : data.viewer) === null || _a === void 0 ? void 0 : _a.visibleRewardExchangeItems) === null || _b === void 0 ? void 0 : _b.data,
|
|
14914
|
+
//@ts-ignore
|
|
14915
|
+
fuelTankCode: (_d = (_c = exchangeResponse === null || exchangeResponse === void 0 ? void 0 : exchangeResponse.exchangeReward) === null || _c === void 0 ? void 0 : _c.reward) === null || _d === void 0 ? void 0 : _d.fuelTankCode,
|
|
14916
|
+
},
|
|
14917
|
+
callbacks: {
|
|
14918
|
+
exchangeReward,
|
|
14919
|
+
openDrawer,
|
|
14920
|
+
setExchangeState,
|
|
14921
|
+
setStage,
|
|
14922
|
+
},
|
|
14923
|
+
refs: {
|
|
14924
|
+
drawerRef,
|
|
14925
|
+
},
|
|
14926
|
+
};
|
|
14927
|
+
}
|
|
14928
|
+
|
|
14929
|
+
function Dot({ active, completed, incomplete, }) {
|
|
14930
|
+
return (h("div", { style: {
|
|
14931
|
+
flex: "0 0 0",
|
|
14932
|
+
content: "''",
|
|
14933
|
+
height: "4px",
|
|
14934
|
+
borderRadius: "4px",
|
|
14935
|
+
background: incomplete ? "#E5E5E5" : "#9E9E9E",
|
|
14936
|
+
position: "relative",
|
|
14937
|
+
bottom: "0",
|
|
14938
|
+
left: "0",
|
|
14939
|
+
display: "flex",
|
|
14940
|
+
justifyContent: "center",
|
|
14941
|
+
columnGap: "50px",
|
|
14942
|
+
marginRight: "-2px",
|
|
14943
|
+
} },
|
|
14944
|
+
h("div", { style: {
|
|
14945
|
+
backgroundColor: completed ? "#9E9E9E" : "#FFF",
|
|
14946
|
+
border: active
|
|
14947
|
+
? "2px solid #9E9E9E"
|
|
14948
|
+
: incomplete
|
|
14949
|
+
? "2px solid #E5E5E5"
|
|
14950
|
+
: "none",
|
|
14951
|
+
borderRadius: "50%",
|
|
14952
|
+
width: completed ? "12px" : "8px",
|
|
14953
|
+
height: completed ? "12px" : "8px",
|
|
14954
|
+
margin: "-4px auto 0px",
|
|
14955
|
+
zIndex: "1",
|
|
14956
|
+
} })));
|
|
14957
|
+
}
|
|
14958
|
+
function Progress({ active, completed, incomplete }) {
|
|
14959
|
+
return [
|
|
14960
|
+
h("div", { style: {
|
|
14961
|
+
content: "''",
|
|
14962
|
+
flex: "0.5 0.5 0",
|
|
14963
|
+
height: "4px",
|
|
14964
|
+
borderRadius: "4px",
|
|
14965
|
+
background: incomplete ? "#E5E5E5" : "#9E9E9E",
|
|
14966
|
+
position: "relative",
|
|
14967
|
+
bottom: "0",
|
|
14968
|
+
left: "0",
|
|
14969
|
+
display: "flex",
|
|
14970
|
+
justifyContent: "center",
|
|
14971
|
+
columnGap: "50px",
|
|
14972
|
+
marginRight: "-2px",
|
|
14973
|
+
} }),
|
|
14974
|
+
h(Dot, { active: active, completed: completed, incomplete: incomplete }),
|
|
14975
|
+
h("div", { style: {
|
|
14976
|
+
content: "''",
|
|
14977
|
+
flex: "0.5 0.5 0",
|
|
14978
|
+
height: "4px",
|
|
14979
|
+
borderRadius: "4px",
|
|
14980
|
+
background: incomplete || active ? "#E5E5E5" : "#9E9E9E",
|
|
14981
|
+
position: "relative",
|
|
14982
|
+
bottom: "0",
|
|
14983
|
+
left: "0",
|
|
14984
|
+
display: "flex",
|
|
14985
|
+
justifyContent: "center",
|
|
14986
|
+
columnGap: "50px",
|
|
14987
|
+
marginRight: "-2px",
|
|
14988
|
+
} }),
|
|
14989
|
+
];
|
|
14990
|
+
}
|
|
14991
|
+
function ProgressBar({ stage }) {
|
|
14992
|
+
console.log({ stage });
|
|
14993
|
+
return (h("div", { style: { display: "flex", columnGap: "-2px" } },
|
|
14994
|
+
h(Progress, { active: stage === 0, completed: stage > 0, incomplete: stage < 0 }),
|
|
14995
|
+
h(Progress, { active: stage === 1, completed: stage > 1, incomplete: stage < 1 }),
|
|
14996
|
+
h(Progress, { active: stage === 2, completed: stage > 2, incomplete: stage < 2 })));
|
|
14997
|
+
}
|
|
14998
|
+
|
|
14999
|
+
const stageList = ["chooseReward", "chooseAmount", "confirmation", "success"];
|
|
15000
|
+
const stageProgressList = {
|
|
15001
|
+
chooseReward: "Choose reward",
|
|
15002
|
+
chooseAmount: "Amount",
|
|
15003
|
+
confirmation: "Confirm",
|
|
15004
|
+
};
|
|
15005
|
+
function RewardExchangeView(props) {
|
|
15006
|
+
const style = {
|
|
15007
|
+
Container: {
|
|
15008
|
+
position: "relative",
|
|
15009
|
+
display: "flex",
|
|
15010
|
+
},
|
|
15011
|
+
CardContainer: {
|
|
15012
|
+
"&:hover": {
|
|
15013
|
+
boxShadow: "0 3px 10px #87ceeb6e!important",
|
|
15014
|
+
},
|
|
15015
|
+
},
|
|
15016
|
+
Base: {
|
|
15017
|
+
display: "block",
|
|
15018
|
+
cursor: "pointer",
|
|
15019
|
+
textAlign: "center",
|
|
15020
|
+
"&::part(base)": {
|
|
15021
|
+
width: "100%",
|
|
15022
|
+
height: "170px",
|
|
15023
|
+
display: "flex",
|
|
15024
|
+
justifyContent: "space-between",
|
|
15025
|
+
alignItems: "center",
|
|
15026
|
+
},
|
|
15027
|
+
"&::part(body)": {
|
|
15028
|
+
padding: "10px 0",
|
|
15029
|
+
},
|
|
15030
|
+
},
|
|
15031
|
+
Drawer: {
|
|
15032
|
+
"&::part(base)": {
|
|
15033
|
+
minWidth: "400px",
|
|
15034
|
+
width: "50%",
|
|
15035
|
+
margin: "0 auto",
|
|
15036
|
+
right: "0",
|
|
15037
|
+
},
|
|
15038
|
+
"&::part(panel)": {
|
|
15039
|
+
height: "85vh",
|
|
15040
|
+
},
|
|
15041
|
+
},
|
|
15042
|
+
FullImage: {
|
|
15043
|
+
objectFit: "contain",
|
|
15044
|
+
maxWidth: "100%",
|
|
15045
|
+
height: "100px",
|
|
15046
|
+
},
|
|
15047
|
+
PreviewImage: {
|
|
15048
|
+
objectFit: "contain",
|
|
15049
|
+
maxWidth: "100%",
|
|
15050
|
+
height: "75px",
|
|
15051
|
+
},
|
|
15052
|
+
InputBox: {
|
|
15053
|
+
width: "100%",
|
|
15054
|
+
marginBottom: "20px",
|
|
15055
|
+
},
|
|
15056
|
+
Select: {
|
|
15057
|
+
"&::part(base)": {
|
|
15058
|
+
flex: "0.75",
|
|
15059
|
+
},
|
|
15060
|
+
"&::part(menu)": {
|
|
15061
|
+
maxHeight: "40vh",
|
|
15062
|
+
},
|
|
15063
|
+
},
|
|
15064
|
+
Buttons: {
|
|
15065
|
+
bottom: "0",
|
|
15066
|
+
},
|
|
15067
|
+
Button: {
|
|
15068
|
+
margin: "10px 0",
|
|
15069
|
+
display: "block",
|
|
15070
|
+
textAlign: "center",
|
|
15071
|
+
cursor: "pointer",
|
|
15072
|
+
},
|
|
15073
|
+
};
|
|
15074
|
+
// JSS config
|
|
15075
|
+
jss.setup(create());
|
|
15076
|
+
const sheet = jss.createStyleSheet(style);
|
|
15077
|
+
const styleString = sheet.toString();
|
|
15078
|
+
const { states, data, callbacks, refs } = props;
|
|
15079
|
+
const { selectedItem, selectedStep } = states;
|
|
15080
|
+
function getInput() {
|
|
15081
|
+
var _a;
|
|
15082
|
+
const item = states.selectedItem;
|
|
15083
|
+
if (!item || (item === null || item === void 0 ? void 0 : item.ruleType) === "FIXED_GLOBAL_REWARD")
|
|
15084
|
+
return h("span", null);
|
|
15085
|
+
return (h("sl-select", { style: { width: "auto" }, label: "Select amount to receive", class: sheet.classes.Select, value: states.selectedStep, "onSl-select": (e) => {
|
|
15086
|
+
var _a, _b, _c, _d, _e;
|
|
15087
|
+
return callbacks.setExchangeState({
|
|
15088
|
+
amount: (_c = (_b = (_a = e.detail) === null || _a === void 0 ? void 0 : _a.item) === null || _b === void 0 ? void 0 : _b.value) === null || _c === void 0 ? void 0 : _c.sourceValue,
|
|
15089
|
+
selectedStep: (_e = (_d = e.detail) === null || _d === void 0 ? void 0 : _d.item) === null || _e === void 0 ? void 0 : _e.value,
|
|
15090
|
+
});
|
|
15091
|
+
} }, (_a = item === null || item === void 0 ? void 0 : item.steps) === null || _a === void 0 ? void 0 : _a.map((step) => (h("sl-menu-item", { value: step },
|
|
15092
|
+
step.prettyDestinationValue,
|
|
15093
|
+
h("span", { slot: "suffix", style: { fontSize: "75%" } }, step.prettySourceValue))))));
|
|
15094
|
+
}
|
|
15095
|
+
function chooseReward() {
|
|
15096
|
+
var _a;
|
|
15097
|
+
const nextStage = (selectedItem === null || selectedItem === void 0 ? void 0 : selectedItem.ruleType) === "FIXED_GLOBAL_REWARD"
|
|
15098
|
+
? "confirmation"
|
|
15099
|
+
: "chooseAmount";
|
|
15100
|
+
console.log({ nextStage, ruleType: selectedItem === null || selectedItem === void 0 ? void 0 : selectedItem.ruleType });
|
|
15101
|
+
return (h("div", { style: {
|
|
15102
|
+
display: "flex",
|
|
15103
|
+
justifyContent: "center",
|
|
15104
|
+
flexWrap: "wrap",
|
|
15105
|
+
alignItems: "center",
|
|
15106
|
+
columnGap: "12px",
|
|
15107
|
+
rowGap: "12px",
|
|
15108
|
+
} }, (_a = data.exchangeList) === null || _a === void 0 ? void 0 :
|
|
15109
|
+
_a.map((item) => {
|
|
15110
|
+
const style = {
|
|
15111
|
+
boxShadow: item.key === (selectedItem === null || selectedItem === void 0 ? void 0 : selectedItem.key) ? "0 1px 8px #87ceeb" : "none",
|
|
15112
|
+
marginBottom: "10px 0",
|
|
15113
|
+
flex: "1",
|
|
15114
|
+
minWidth: "45%",
|
|
15115
|
+
};
|
|
15116
|
+
return (h("div", { key: item.key, class: sheet.classes.CardContainer, style: style },
|
|
15117
|
+
h("sl-card", { class: sheet.classes.Base, onClick: () => callbacks.setExchangeState({ selectedItem: item }), disabled: !item.available },
|
|
15118
|
+
h("img", { class: sheet.classes.PreviewImage, src: (item === null || item === void 0 ? void 0 : item.imageUrl) || getAssetPath("./assets/Reward-icon.png") }),
|
|
15119
|
+
h("p", null, item.description))));
|
|
15120
|
+
}),
|
|
15121
|
+
h("div", { class: sheet.classes.Buttons },
|
|
15122
|
+
h("sl-button", { onClick: () => callbacks.setStage(nextStage), style: { display: "block" }, class: sheet.classes.Button, disabled: !states.selectedItem }, "Continue"),
|
|
15123
|
+
h("a", { onClick: () => { var _a; return (_a = refs.drawerRef.current) === null || _a === void 0 ? void 0 : _a.hide(); }, style: { display: "block" }, class: sheet.classes.Button }, "Cancel"))));
|
|
15124
|
+
}
|
|
15125
|
+
function chooseAmount() {
|
|
15126
|
+
const input = getInput();
|
|
15127
|
+
return (h("div", null,
|
|
15128
|
+
h("div", { style: { width: "50%", margin: "0 auto" } }, (selectedItem === null || selectedItem === void 0 ? void 0 : selectedItem.imageUrl) && (h("img", { class: sheet.classes.FullImage, src: selectedItem === null || selectedItem === void 0 ? void 0 : selectedItem.imageUrl }))),
|
|
15129
|
+
h("div", { class: sheet.classes.InputBox }, input),
|
|
15130
|
+
h("div", { class: sheet.classes.Buttons },
|
|
15131
|
+
h("sl-button", { onClick: () => callbacks.setStage("confirmation"), disabled: input && !states.amount, style: { display: "block" }, class: sheet.classes.Button }, "Continue"),
|
|
15132
|
+
h("a", { onClick: () => callbacks.setStage("chooseReward"), style: { display: "block" }, class: sheet.classes.Button }, "Back"))));
|
|
15133
|
+
}
|
|
15134
|
+
console.log({ selectedItem, selectedStep });
|
|
15135
|
+
function confirmation() {
|
|
15136
|
+
console.log("confirmation:", { selectedItem });
|
|
15137
|
+
const redemptionAmount = () => {
|
|
15138
|
+
var _a;
|
|
15139
|
+
if ((selectedItem === null || selectedItem === void 0 ? void 0 : selectedItem.ruleType) === "FIXED_GLOBAL_REWARD") {
|
|
15140
|
+
return `Redeem ${selectedItem === null || selectedItem === void 0 ? void 0 : selectedItem.sourceValue} ${selectedItem === null || selectedItem === void 0 ? void 0 : selectedItem.sourceUnit} for ${selectedItem === null || selectedItem === void 0 ? void 0 : selectedItem.globalRewardKey}`;
|
|
15141
|
+
}
|
|
15142
|
+
else {
|
|
15143
|
+
const amount = states.amount;
|
|
15144
|
+
const reward = (_a = selectedStep === null || selectedStep === void 0 ? void 0 : selectedStep.prettyDestinationValue) !== null && _a !== void 0 ? _a : `${amount} ${selectedItem === null || selectedItem === void 0 ? void 0 : selectedItem.destinationUnit}`;
|
|
15145
|
+
return `Redeem ${amount} ${selectedItem === null || selectedItem === void 0 ? void 0 : selectedItem.sourceUnit} for ${reward}`;
|
|
15146
|
+
}
|
|
15147
|
+
};
|
|
15148
|
+
const previousStage = (selectedItem === null || selectedItem === void 0 ? void 0 : selectedItem.ruleType) === "FIXED_GLOBAL_REWARD"
|
|
15149
|
+
? "chooseReward"
|
|
15150
|
+
: "chooseAmount";
|
|
15151
|
+
return (h("div", null,
|
|
15152
|
+
h("h2", null, "Confirm your redemption:"),
|
|
15153
|
+
redemptionAmount(),
|
|
15154
|
+
h("div", { class: sheet.classes.Buttons },
|
|
15155
|
+
h("sl-button", { onClick: callbacks.exchangeReward, style: { display: "block" }, class: sheet.classes.Button }, "Redeem"),
|
|
15156
|
+
h("a", { onClick: () => callbacks.setStage(previousStage), style: { display: "block" }, class: sheet.classes.Button }, "Back"))));
|
|
15157
|
+
}
|
|
15158
|
+
function success() {
|
|
15159
|
+
return (h("div", { style: { textAlign: "center" } },
|
|
15160
|
+
h("img", { class: sheet.classes.FullImage, src: getAssetPath("./assets/Reward-icon.png") }),
|
|
15161
|
+
h("p", { style: { color: "forestgreen" } }, "Reward Redeemed"),
|
|
15162
|
+
(data === null || data === void 0 ? void 0 : data.fuelTankCode) && h("pre", null, data === null || data === void 0 ? void 0 : data.fuelTankCode),
|
|
15163
|
+
h("sl-button", { onClick: () => { var _a, _b; return (_b = (_a = refs.drawerRef) === null || _a === void 0 ? void 0 : _a.current) === null || _b === void 0 ? void 0 : _b.hide(); } }, "Done")));
|
|
15164
|
+
}
|
|
15165
|
+
const stages = {
|
|
15166
|
+
chooseReward: () => chooseReward(),
|
|
15167
|
+
chooseAmount: () => chooseAmount(),
|
|
15168
|
+
confirmation: () => confirmation(),
|
|
15169
|
+
success: () => success(),
|
|
15170
|
+
};
|
|
15171
|
+
const currentStage = stages[states.redeemStage];
|
|
15172
|
+
function stageMap() {
|
|
15173
|
+
const stageNumber = stageList.indexOf(states.redeemStage);
|
|
15174
|
+
return (h("div", { style: { fontSize: "80%" } },
|
|
15175
|
+
h(ProgressBar, { stage: stageNumber }),
|
|
15176
|
+
h("div", { style: {
|
|
15177
|
+
marginTop: "5px",
|
|
15178
|
+
display: "flex",
|
|
15179
|
+
justifyContent: "center",
|
|
15180
|
+
textAlign: "center",
|
|
15181
|
+
whiteSpace: "nowrap",
|
|
15182
|
+
marginBottom: "10px",
|
|
15183
|
+
} }, Object.keys(stageProgressList).map((stage) => {
|
|
15184
|
+
if (stage === states.redeemStage)
|
|
15185
|
+
return (h("b", { style: { flex: "1 1 0" } },
|
|
15186
|
+
" ",
|
|
15187
|
+
stageProgressList[stage]));
|
|
15188
|
+
return h("i", { style: { flex: "1 1 0" } }, stageProgressList[stage]);
|
|
15189
|
+
}))));
|
|
15190
|
+
}
|
|
15191
|
+
const Label = () => {
|
|
15192
|
+
if (states.redeemStage === "success")
|
|
15193
|
+
return "";
|
|
15194
|
+
let previousStage = "";
|
|
15195
|
+
if (states.redeemStage === "confirmation") {
|
|
15196
|
+
previousStage =
|
|
15197
|
+
(selectedItem === null || selectedItem === void 0 ? void 0 : selectedItem.ruleType) === "FIXED_GLOBAL_REWARD"
|
|
15198
|
+
? "chooseReward"
|
|
15199
|
+
: "chooseAmount";
|
|
15200
|
+
}
|
|
15201
|
+
else if (states.redeemStage === "chooseAmount") {
|
|
15202
|
+
previousStage = "chooseReward";
|
|
15203
|
+
}
|
|
15204
|
+
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" } },
|
|
15205
|
+
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" })));
|
|
15206
|
+
return (h("div", { slot: "label" },
|
|
15207
|
+
h("a", { style: { cursor: "pointer", fontSize: "80%", color: "#858585" }, onClick: () => callbacks.setStage(previousStage) },
|
|
15208
|
+
h(LeftArrow, null),
|
|
15209
|
+
" Back")));
|
|
15210
|
+
};
|
|
15211
|
+
return (h("div", { class: sheet.classes.Container },
|
|
15212
|
+
h("style", { type: "text/css" }, styleString),
|
|
15213
|
+
h("div", null,
|
|
15214
|
+
h("sl-drawer", { ref: (ref) => (refs.drawerRef.current = ref), placement: "right", class: sheet.classes.Drawer, open: stageList.indexOf(states.redeemStage) >= 0 },
|
|
15215
|
+
h(Label, null),
|
|
15216
|
+
stageMap(),
|
|
15217
|
+
currentStage && currentStage(),
|
|
15218
|
+
states.exchangeError && "Something went wrong. Please contact support or try again."),
|
|
15219
|
+
h("sl-button", { onClick: () => callbacks.openDrawer() }, "Redeem Rewards"))));
|
|
15220
|
+
}
|
|
15221
|
+
|
|
15222
|
+
const SqmRewardExchangeList = class {
|
|
15223
|
+
constructor(hostRef) {
|
|
15224
|
+
registerInstance(this, hostRef);
|
|
15225
|
+
this.ignored = true;
|
|
15226
|
+
h$1(this);
|
|
15227
|
+
}
|
|
15228
|
+
disconnectedCallback() { }
|
|
15229
|
+
render() {
|
|
15230
|
+
const missingProps = getMissingProps([
|
|
15231
|
+
{
|
|
15232
|
+
attribute: "listType",
|
|
15233
|
+
value: this.listType,
|
|
15234
|
+
},
|
|
15235
|
+
]);
|
|
15236
|
+
if (missingProps) {
|
|
15237
|
+
return h(RequiredPropsError, { missingProps: missingProps });
|
|
15238
|
+
}
|
|
15239
|
+
const { states, data, callbacks, refs } = j$1()
|
|
15240
|
+
? useRewardExchangeListDemo(getProps(this))
|
|
15241
|
+
: useRewardExchangeList(getProps(this));
|
|
15242
|
+
return (h(Host, { style: { display: "contents" } }, h(RewardExchangeView, { states: states, data: data, callbacks: callbacks, refs: refs })));
|
|
15243
|
+
}
|
|
15244
|
+
static get assetsDirs() { return ["assets"]; }
|
|
15245
|
+
};
|
|
15246
|
+
function useRewardExchangeListDemo(props) {
|
|
15247
|
+
return cjs({
|
|
15248
|
+
states: {
|
|
15249
|
+
content: {
|
|
15250
|
+
listType: "https://example.com",
|
|
15251
|
+
...props,
|
|
15252
|
+
},
|
|
15253
|
+
redeemStage: "",
|
|
15254
|
+
amount: 0,
|
|
15255
|
+
selectedStep: undefined,
|
|
15256
|
+
exchangeError: false,
|
|
15257
|
+
},
|
|
15258
|
+
data: {
|
|
15259
|
+
shareCode: "SHARECODE123",
|
|
15260
|
+
},
|
|
15261
|
+
callbacks: {
|
|
15262
|
+
exchangeReward: () => { },
|
|
15263
|
+
openDrawer: () => { },
|
|
15264
|
+
setExchangeState: (_) => { },
|
|
15265
|
+
setStage: (_) => { },
|
|
15266
|
+
},
|
|
15267
|
+
refs: {
|
|
15268
|
+
drawerRef: {},
|
|
15269
|
+
},
|
|
15270
|
+
}, props.demoData || {}, { arrayMerge: (_, a) => a });
|
|
15271
|
+
}
|
|
15272
|
+
|
|
14748
15273
|
const debug$1 = browser("sq:useRouter");
|
|
14749
15274
|
function matchPath(pattern, page) {
|
|
14750
15275
|
if (!pattern)
|
|
@@ -16487,7 +17012,7 @@ var _createEmotion = createEmotion({
|
|
|
16487
17012
|
function i$1(){return (i$1=Object.assign||function(n){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var r in o)Object.prototype.hasOwnProperty.call(o,r)&&(n[r]=o[r]);}return n}).apply(this,arguments)}function s(n,t){return t||(t=n.slice(0)),n.raw=t,n}var a$1,l,u,c$1=css(a$1||(a$1=s(['\n width: 100vw;\n height: 100vh;\n\n .story-book-outer-div {\n .story-div {\n font-family: "Arial", sans-serif;\n font-size: 12px;\n }\n padding-bottom: 500px;\n }\n\n .story-div {\n position: fixed;\n box-sizing: border-box;\n top: 0;\n width: 250px;\n height: 100vh;\n z-index: 999;\n overflow-y: scroll;\n background: white;\n margin-bottom: 32px;\n }\n\n .header {\n padding: 24px 0 16px 16px;\n margin-bottom: 24px;\n color: white;\n background: #333;\n cursor: pointer;\n\n h2 {\n letter-spacing: 3px;\n font-weight: 400;\n }\n }\n\n .parentStoryList {\n list-style: none;\n padding-left: 16px;\n\n summary {\n margin-bottom: 4px;\n }\n }\n .parentStory {\n cursor: pointer;\n }\n .parentStory.selected {\n font-weight: bold;\n }\n\n .subStory {\n font-size: 12px;\n cursor: pointer;\n line-height: 1.5em;\n margin-top: 4px;\n\n a {\n display: block;\n padding: 4px 4px 4px 16px;\n }\n }\n .subStory:hover {\n background-color: #eee;\n }\n .subStory.selected {\n background-color: lightgreen;\n }\n\n .component {\n padding: 24px 16px;\n }\n\n h4.group-header {\n margin: 8px 0;\n text-transform: uppercase;\n font-weight: 600;\n font-size: 14px;\n color: #575757;\n }\n\n .group-wrapper {\n margin-bottom: 24px;\n }\n\n .dynamic-display-wrapper {\n position: fixed;\n display: flex;\n flex-direction: column;\n bottom: 0;\n left: 100%;\n padding: 16px;\n z-index: 1000;\n background: white;\n transform: translateX(-100%);\n box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);\n\n & > :not(:first-child) {\n margin-top: 12px;\n }\n\n p {\n font-size: 12px;\n margin: 0;\n padding: 0;\n }\n\n .button-wrapper {\n display: flex;\n\n & > :not(:first-child) {\n margin-left: 12px;\n }\n }\n\n & button {\n border: 1px solid #eaeaea;\n background: white;\n border-radius: 4px;\n color: #777;\n padding: 4px 12px;\n justify-content: center;\n align-items: center;\n text-align: center;\n\n &.active {\n background: #555;\n border-color: #555;\n color: white;\n }\n }\n }\n'])));function p$1(n,t){var o,r=t.story.title.split("/"),e=r[1]?r[0]:"_";return i$1({},n,((o={})[e]=[].concat(n[e]||[],[{story:i$1({},t.story,{title:r[1]||r[0]}),subs:t.subs}]).sort(function(n,t){return n.story.title.localeCompare(t.story.title)}),o))}function d$1(n){return {story:n.default,subs:function(n,t){if(null==n)return {};var o,r,e={},i=Object.keys(n);for(r=0;r<i.length;r++)t.indexOf(o=i[r])>=0||(e[o]=n[o]);return e}(n,["default"])}}function f(a,f){var b=f.h,y=void 0===b?h:b,g=f.title,m=void 0===g?"Stencilbook":g,x=f.homepage,h$1=void 0===x?y("h3",null,"Select a story!"):x,v=f.addons,k=void 0===v?[]:v,w=useMemo(function(){return a.map(d$1).reduce(p$1,{_:[]})},a),S=useState(void 0),C=S[0],z=S[1],O=null==C?void 0:C.key,j=useState("desktop"),T=j[0],_=j[1],B=useState(!0),D=B[0],L=B[1],N=useState(!1),q=N[0],A=N[1],M=function(){return y("div",{class:"dynamic-display-wrapper"},y("div",{class:"button-wrapper"},y("button",{class:"desktop"===T?"active":"",onClick:function(){return _("desktop")}},"Desktop"),y("button",{class:"tablet"===T?"active":"",onClick:function(){return _("tablet")}},"Tablet"),y("button",{class:"mobile"===T?"active":"",onClick:function(){return _("mobile")}},"Mobile")),y("p",null,"Note: Currently doesn't test breakpoints, use the native tester for now"),y("hr",null),y("button",{class:q?"active":"",onClick:function(){return A(function(n){return !n})}},"Toggle Dark Background"),y("hr",null),y("button",{class:D?"active":"",onClick:function(){return L(function(n){return !n})}},"Toggle Sidebar"))},P="mobile"===T?"375px":"tablet"===T?"768px":"1124px",V=css(l||(l=s(["\n max-width: ",";\n margin-left: ",";\n "])),P,D?"250px":"0px"),X=css(u||(u=s(["\n display: none;\n "])));document.body.style.backgroundColor=q?"#232323":"#fafafa";var E=function(n){var t=n.selected,o=k.reduce(function(n,o){return function(){return y(o,{story:i$1({},t)},y(n,null))}},null==t?void 0:t.story);return y(o,null)},F=function(){return y("div",{class:"story-book-outer-div"},y("div",{class:"story-div "+(D?"":X)},y("div",{class:"header",onClick:function(){z(void 0);}},y("h2",null,m)),y("ul",{class:"parentStoryList"},Object.keys(w).sort().map(function(n){return y("div",{class:"group-wrapper"},"_"!==n&&y("h4",{class:"group-header"},n),w[n].map(function(t){return y("li",{class:"parentStory"},y("details",{style:{marginBottom:"10px"}},y("summary",{style:{outline:"none"}},t.story.title),t.subs&&Object.keys(t.subs).map(function(o){var e=n+"/"+o,i=t.subs[o],s=i.storyName||lodash_startcase(o);return y("div",{class:"subStory "+(O===e?"selected":"")},y("a",{onClick:function(){return function(n,t,o,r){z({key:t,story:n,parent:o,label:r});}(i,e,t.story,s)}},s))})))}))}))),y(M,null),y("div",{class:"component "+V},!O&&h$1,O&&y("div",null,y("h3",null,C.label),y(E,{selected:C}))))};return {class:c$1,children:y(F,null),View:F,selected:C}}
|
|
16488
17013
|
|
|
16489
17014
|
const ShareButton_stories = {
|
|
16490
|
-
title: "Share Button",
|
|
17015
|
+
title: "Components/Share Button",
|
|
16491
17016
|
};
|
|
16492
17017
|
const WithIcon = () => {
|
|
16493
17018
|
const props = { medium: "facebook", iconslot: "suffix" };
|
|
@@ -16543,7 +17068,7 @@ const ShareButton$1 = /*#__PURE__*/Object.freeze({
|
|
|
16543
17068
|
});
|
|
16544
17069
|
|
|
16545
17070
|
const ShareLink_stories = {
|
|
16546
|
-
title: "Share Link",
|
|
17071
|
+
title: "Components/Share Link",
|
|
16547
17072
|
};
|
|
16548
17073
|
const Default = () => {
|
|
16549
17074
|
const props = {
|
|
@@ -16584,7 +17109,7 @@ const ShareLink$1 = /*#__PURE__*/Object.freeze({
|
|
|
16584
17109
|
});
|
|
16585
17110
|
|
|
16586
17111
|
const BigStat_stories = {
|
|
16587
|
-
title: "Big Stat",
|
|
17112
|
+
title: "Components/Big Stat",
|
|
16588
17113
|
};
|
|
16589
17114
|
const Default$1 = () => {
|
|
16590
17115
|
const props = { statvalue: "9.900,00" };
|
|
@@ -16654,7 +17179,7 @@ const BigStat = /*#__PURE__*/Object.freeze({
|
|
|
16654
17179
|
});
|
|
16655
17180
|
|
|
16656
17181
|
const Leaderboard_stories = {
|
|
16657
|
-
title: "Leaderboard",
|
|
17182
|
+
title: "Components/Leaderboard",
|
|
16658
17183
|
parameters: {
|
|
16659
17184
|
tagname: "sqm-leaderboard",
|
|
16660
17185
|
},
|
|
@@ -16931,7 +17456,7 @@ const Router = /*#__PURE__*/Object.freeze({
|
|
|
16931
17456
|
});
|
|
16932
17457
|
|
|
16933
17458
|
const LeaderboardRank_stories = {
|
|
16934
|
-
title: "Leaderboard Rank",
|
|
17459
|
+
title: "Components/Leaderboard Rank",
|
|
16935
17460
|
};
|
|
16936
17461
|
const First = () => {
|
|
16937
17462
|
const props = { data: { rank: "1st" } };
|
|
@@ -16978,7 +17503,7 @@ function setupLoggedOut() {
|
|
|
16978
17503
|
};
|
|
16979
17504
|
}
|
|
16980
17505
|
const PortalFrame_stories = {
|
|
16981
|
-
title: "Portal Frame",
|
|
17506
|
+
title: "Components/Portal Frame",
|
|
16982
17507
|
};
|
|
16983
17508
|
const defaultProps = {
|
|
16984
17509
|
data: {
|
|
@@ -17073,7 +17598,7 @@ const PortalFrame$1 = /*#__PURE__*/Object.freeze({
|
|
|
17073
17598
|
});
|
|
17074
17599
|
|
|
17075
17600
|
const EditProfileForm_stories = {
|
|
17076
|
-
title: "Edit Profile Form",
|
|
17601
|
+
title: "Components/Edit Profile Form",
|
|
17077
17602
|
};
|
|
17078
17603
|
const defaultProps$1 = {
|
|
17079
17604
|
states: {
|
|
@@ -17520,7 +18045,7 @@ const UseLeaderboard = /*#__PURE__*/Object.freeze({
|
|
|
17520
18045
|
});
|
|
17521
18046
|
|
|
17522
18047
|
const FormMessage_stories = {
|
|
17523
|
-
title: "Form Message",
|
|
18048
|
+
title: "Components/Form Message",
|
|
17524
18049
|
};
|
|
17525
18050
|
const SuccessAlert = () => {
|
|
17526
18051
|
return (h("sqm-form-message", { type: "success" },
|
|
@@ -17556,6 +18081,148 @@ const FormMessage$1 = /*#__PURE__*/Object.freeze({
|
|
|
17556
18081
|
FullStackSuccess: FullStackSuccess
|
|
17557
18082
|
});
|
|
17558
18083
|
|
|
18084
|
+
const EXCHANGE$1 = dist.gql `
|
|
18085
|
+
mutation exchange($exchangeRewardInput: ExchangeRewardInput!) {
|
|
18086
|
+
exchangeReward(exchangeRewardInput: $exchangeRewardInput) {
|
|
18087
|
+
reward {
|
|
18088
|
+
id
|
|
18089
|
+
}
|
|
18090
|
+
}
|
|
18091
|
+
}
|
|
18092
|
+
`;
|
|
18093
|
+
const UseRewardExchangeList_stories = {
|
|
18094
|
+
title: "Hooks / useRewardExchange",
|
|
18095
|
+
};
|
|
18096
|
+
function setupGraphQL$6() {
|
|
18097
|
+
const id = "testestest";
|
|
18098
|
+
const accountId = id;
|
|
18099
|
+
const programId = "sam-partner-test-2";
|
|
18100
|
+
//@ts-ignore
|
|
18101
|
+
window.widgetIdent = {
|
|
18102
|
+
tenantAlias: "test_a8b41jotf8a1v",
|
|
18103
|
+
appDomain: "https://staging.referralsaasquatch.com",
|
|
18104
|
+
programId,
|
|
18105
|
+
};
|
|
18106
|
+
useEffect(() => {
|
|
18107
|
+
L$1({
|
|
18108
|
+
accountId,
|
|
18109
|
+
id,
|
|
18110
|
+
jwt: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyIjp7ImFjY291bnRJZCI6InRlc3Rlc3Rlc3QiLCJpZCI6InRlc3Rlc3Rlc3QifX0.qYnU5hNeIj9C_G3NogfG7btgCPGZC7JRXY0MG6a63zs",
|
|
18111
|
+
});
|
|
18112
|
+
return () => {
|
|
18113
|
+
window.widgetIdent = undefined;
|
|
18114
|
+
L$1(undefined);
|
|
18115
|
+
};
|
|
18116
|
+
}, []);
|
|
18117
|
+
return { id, accountId };
|
|
18118
|
+
}
|
|
18119
|
+
function useExchangeButton() {
|
|
18120
|
+
const { id, accountId } = setupGraphQL$6();
|
|
18121
|
+
const [points, setPoints] = useState(10);
|
|
18122
|
+
const [rate, setRate] = useState(100);
|
|
18123
|
+
const [exchange, { data, errors }] = Ne(EXCHANGE$1);
|
|
18124
|
+
return {
|
|
18125
|
+
states: {
|
|
18126
|
+
points,
|
|
18127
|
+
rate,
|
|
18128
|
+
},
|
|
18129
|
+
data: {
|
|
18130
|
+
id,
|
|
18131
|
+
accountId,
|
|
18132
|
+
data,
|
|
18133
|
+
errors,
|
|
18134
|
+
},
|
|
18135
|
+
callbacks: {
|
|
18136
|
+
exchange,
|
|
18137
|
+
setPoints,
|
|
18138
|
+
setRate,
|
|
18139
|
+
},
|
|
18140
|
+
};
|
|
18141
|
+
}
|
|
18142
|
+
const DefaultView = (props) => {
|
|
18143
|
+
const { states, data, callbacks } = props;
|
|
18144
|
+
return (h("div", null,
|
|
18145
|
+
h("div", null,
|
|
18146
|
+
h("label", null, "Rate:"),
|
|
18147
|
+
h("input", { value: states.rate, onInput: (e) =>
|
|
18148
|
+
// @ts-ignore
|
|
18149
|
+
callbacks.setRate(e.target.value) })),
|
|
18150
|
+
h("input", { value: states.points, onInput: (e) =>
|
|
18151
|
+
// @ts-ignore
|
|
18152
|
+
callbacks.setPoints(e.target.value) }),
|
|
18153
|
+
h("button", { onClick: () => callbacks.exchange(props.input) }, "Exchange"),
|
|
18154
|
+
h("details", null,
|
|
18155
|
+
h("summary", null, "response"),
|
|
18156
|
+
h("h4", null, "data"),
|
|
18157
|
+
h("div", { style: { maxWidth: "500px" } },
|
|
18158
|
+
h("pre", { style: { width: "500px", whiteSpace: "pre-wrap" } }, JSON.stringify(data.data))),
|
|
18159
|
+
h("h4", null, "errors"),
|
|
18160
|
+
h("div", { style: { maxWidth: "500px" } },
|
|
18161
|
+
h("pre", { style: { maxWidth: "500px", whiteSpace: "pre-wrap" } }, JSON.stringify(data.errors))))));
|
|
18162
|
+
};
|
|
18163
|
+
const RewardList = createHookStory(() => {
|
|
18164
|
+
setupGraphQL$6();
|
|
18165
|
+
return (h("sqm-reward-exchange-list", { "list-type": "something" }));
|
|
18166
|
+
});
|
|
18167
|
+
const FixedGlobalReward = createHookStory(() => {
|
|
18168
|
+
const { states, data, callbacks } = useExchangeButton();
|
|
18169
|
+
return (h(DefaultView, { states: states, data: data, callbacks: callbacks, input: {
|
|
18170
|
+
exchangeRewardInput: {
|
|
18171
|
+
userId: data.id,
|
|
18172
|
+
accountId: data.accountId,
|
|
18173
|
+
redeemCreditInput: {
|
|
18174
|
+
amount: states.points,
|
|
18175
|
+
unit: "POINT",
|
|
18176
|
+
},
|
|
18177
|
+
globalRewardKey: "gc1",
|
|
18178
|
+
},
|
|
18179
|
+
} }));
|
|
18180
|
+
});
|
|
18181
|
+
const VariableGlobalReward = createHookStory(() => {
|
|
18182
|
+
const { states, data, callbacks } = useExchangeButton();
|
|
18183
|
+
return (h(DefaultView, { states: states, data: data, callbacks: callbacks, input: {
|
|
18184
|
+
exchangeRewardInput: {
|
|
18185
|
+
userId: data.id,
|
|
18186
|
+
accountId: data.accountId,
|
|
18187
|
+
redeemCreditInput: {
|
|
18188
|
+
amount: states.points,
|
|
18189
|
+
unit: "POINT",
|
|
18190
|
+
},
|
|
18191
|
+
globalRewardKey: "gc1",
|
|
18192
|
+
rewardInput: {
|
|
18193
|
+
valueInCents: Math.ceil(states.points * states.rate),
|
|
18194
|
+
},
|
|
18195
|
+
},
|
|
18196
|
+
} }));
|
|
18197
|
+
});
|
|
18198
|
+
const VariableCreditReward = createHookStory(() => {
|
|
18199
|
+
const { states, data, callbacks } = useExchangeButton();
|
|
18200
|
+
return (h(DefaultView, { states: states, data: data, callbacks: callbacks, input: {
|
|
18201
|
+
exchangeRewardInput: {
|
|
18202
|
+
userId: data.id,
|
|
18203
|
+
accountId: data.accountId,
|
|
18204
|
+
redeemCreditInput: {
|
|
18205
|
+
amount: states.points,
|
|
18206
|
+
unit: "POINT",
|
|
18207
|
+
},
|
|
18208
|
+
rewardInput: {
|
|
18209
|
+
type: "CREDIT",
|
|
18210
|
+
unit: "foo",
|
|
18211
|
+
assignedCredit: Math.ceil(states.points * states.rate),
|
|
18212
|
+
},
|
|
18213
|
+
},
|
|
18214
|
+
} }));
|
|
18215
|
+
});
|
|
18216
|
+
|
|
18217
|
+
const UseRewardExchangeList = /*#__PURE__*/Object.freeze({
|
|
18218
|
+
__proto__: null,
|
|
18219
|
+
'default': UseRewardExchangeList_stories,
|
|
18220
|
+
RewardList: RewardList,
|
|
18221
|
+
FixedGlobalReward: FixedGlobalReward,
|
|
18222
|
+
VariableGlobalReward: VariableGlobalReward,
|
|
18223
|
+
VariableCreditReward: VariableCreditReward
|
|
18224
|
+
});
|
|
18225
|
+
|
|
17559
18226
|
const NewPortal_stories = {
|
|
17560
18227
|
title: "New Portal",
|
|
17561
18228
|
};
|
|
@@ -17859,7 +18526,7 @@ const NewPortal = /*#__PURE__*/Object.freeze({
|
|
|
17859
18526
|
});
|
|
17860
18527
|
|
|
17861
18528
|
const SidebarItem_stories = {
|
|
17862
|
-
title: "Sidebar Item",
|
|
18529
|
+
title: "Components/Sidebar Item",
|
|
17863
18530
|
};
|
|
17864
18531
|
const InactiveItem = () => {
|
|
17865
18532
|
const props = {
|
|
@@ -17896,7 +18563,7 @@ const SidebarItem = /*#__PURE__*/Object.freeze({
|
|
|
17896
18563
|
});
|
|
17897
18564
|
|
|
17898
18565
|
const NavigationSidebar_stories = {
|
|
17899
|
-
title: "Navigation Sidebar",
|
|
18566
|
+
title: "Components/Navigation Sidebar",
|
|
17900
18567
|
};
|
|
17901
18568
|
const DefaultNavigationSidebar = () => {
|
|
17902
18569
|
const barProps = {
|
|
@@ -17945,7 +18612,7 @@ const NavigationSidebar = /*#__PURE__*/Object.freeze({
|
|
|
17945
18612
|
});
|
|
17946
18613
|
|
|
17947
18614
|
const PortalLogin_stories = {
|
|
17948
|
-
title: "Portal Login",
|
|
18615
|
+
title: "Components/Portal Login",
|
|
17949
18616
|
};
|
|
17950
18617
|
const defaultProps$2 = {
|
|
17951
18618
|
states: {
|
|
@@ -17990,7 +18657,7 @@ const PortalLogin$1 = /*#__PURE__*/Object.freeze({
|
|
|
17990
18657
|
});
|
|
17991
18658
|
|
|
17992
18659
|
const PortalRegister_stories = {
|
|
17993
|
-
title: "Portal Register",
|
|
18660
|
+
title: "Components/Portal Register",
|
|
17994
18661
|
};
|
|
17995
18662
|
const defaultProps$3 = {
|
|
17996
18663
|
states: {
|
|
@@ -18093,7 +18760,7 @@ const PortalRegister$1 = /*#__PURE__*/Object.freeze({
|
|
|
18093
18760
|
const scenario = "@author:\r\n@owner:ian\r\nFeature: Forgot Password\r\n\r\n @motivating\r\n Scenario: Users can request to reset their password\r\n Given a user enters their email address\r\n And that email address is linked to a previously created account\r\n When they click \"Reset Password\"\r\n Then the button enters a loading state\r\n When the password reset email is sent\r\n Then a confirmation banner is shown stating a password reset email was sent\r\n\r\n @motivating\r\n Scenario: Users are notified if sending their password reset email fails\r\n Given a user enters their email address\r\n And that email address is linked to a previously created account\r\n When they click \"Reset Password\"\r\n Then the button enters a loading state\r\n When the password reset email fails to send\r\n Then the user will not receive a password reset email\r\n And an error banner is shown stating that they should try again\r\n\r\n @motivating\r\n @landmine\r\n Scenario: If the input email is not associated to an account a success banner will be shown but an email will not be sent\r\n Given the user entered an email address that is not associated to an accoun\r\n When they click \"Reset Password\"\r\n Then the button enters a loading state\r\n But no email will be sent\r\n And a success banner is shown stating a password reset email was sent if the given email was associated to an account\r\n\r\n @motivating\r\n Scenario: Users can resend password reset email\r\n Given a user had previously requested to reset their password\r\n When they enter their email address\r\n And that email address is linked to a previously created account\r\n And they click \"Reset Password\"\r\n Then the user will receive a second password reset email\r\n And a success banner is shown stating that their email was sent\r\n";
|
|
18094
18761
|
|
|
18095
18762
|
const PortalForgotPassword_stories = {
|
|
18096
|
-
title: "Portal Forgot Password",
|
|
18763
|
+
title: "Components/Portal Forgot Password",
|
|
18097
18764
|
parameters: {
|
|
18098
18765
|
scenario,
|
|
18099
18766
|
},
|
|
@@ -18171,7 +18838,7 @@ const PortalForgotPassword = /*#__PURE__*/Object.freeze({
|
|
|
18171
18838
|
const scenario$1 = "@author:\r\n@owner: ian\r\nFeature: Email Verification\r\n\r\n @minutae\r\n Scenario: User's redirected from registration can re-send their verification email\r\n Given a user has registered\r\n And they have been sent a verification email\r\n When they are redirected to the email verification page\r\n Then a message will be displayed\r\n And it will reflect that a email has already been sent to their email\r\n But they can still re-send the email\r\n When they click to \"Resend-Email\"\r\n Then the user will receive a verification email\r\n\r\n @motivating\r\n Scenario: Users are notified if sending the email verification message fails\r\n Given a user with an email was stored in session data from registration\r\n When they click to \"Resend-Email\"\r\n Then the button enters a loading state\r\n When an error occurs trying to send the verification email\r\n Then the user will not receive a verification email\r\n And an error banner is shown stating that they should try again\r\n\r\n @motivating\r\n Scenario: Users are notified if sending the email verification message succeeds\r\n Given a user with an email was stored in session data from registration\r\n When they click to \"Resend-Email\"\r\n Then the button enters a loading state\r\n When the email verification message sends\r\n Then the user will receive a verification email\r\n And a success banner is shown stating that their email was resent";
|
|
18172
18839
|
|
|
18173
18840
|
const PortalEmailVerification_stories = {
|
|
18174
|
-
title: "Portal Email Verification",
|
|
18841
|
+
title: "Components/Portal Email Verification",
|
|
18175
18842
|
parameters: {
|
|
18176
18843
|
scenario: scenario$1,
|
|
18177
18844
|
},
|
|
@@ -18257,7 +18924,7 @@ const PortalEmailVerification = /*#__PURE__*/Object.freeze({
|
|
|
18257
18924
|
const scenario$2 = "@author:\r\n@owner:ian\r\nFeature: Reset Password\r\n\r\n\r\n Background: A user in on the password reset page\r\n Given a user who has been redirected to the password reset page\r\n\r\n @motivating\r\n Scenario: Users can reset their password\r\n Given a user has a valid oob code as a url query parameter\r\n When they enter their password twice\r\n And they click \"Update\"\r\n Then their password is updated\r\n And a banner with a success message will be displayed\r\n And they can log in with their new password\r\n\r\n @motivating\r\n Scenario Outline: Users cannot reset their password with an invalid or missing oob code\r\n Given a user has a <oobCode> as a url query parameter\r\n Then they will see an error message saying that their password reset code is invalid or expired\r\n When they click \"Continue\"\r\n Then they will be redirected to \"/\"\r\n Examples:\r\n | oobCode |\r\n | invalid oob code |\r\n | non existant oob code |\r\n\r\n @motivating\r\n Scenario: Users must enter the same password twice to successfully reset their password\r\n Given a user has been redirected to the password reset page\r\n And they have a valid oob code as a url query parameter\r\n When they enter two different passwords into the password reset form\r\n And they click \"Update\"\r\n Then their password is not be reset\r\n And an error banner stating the input passwords must match appears\r\n And their password will not be reset\r\n When they enter the same password twice\r\n And they click \"Update\"\r\n Then a banner appears with a success message\r\n And they can log in with their new password\r\n\r\n @motivating\r\n Scenario: Users are redirected to \"/\" by default\r\n Given the component does not have prop \"nextPage\"\r\n And the users url does not contain a \"nextPage\" query parameter\r\n And a user has entered their password twice\r\n When they click \"Update\"\r\n Then their password is updated\r\n And they are redirected to \"/\"\r\n\r\n @motivating\r\n Scenario: Custom redirection can be configured\r\n Given the component has prop \"nextPage\" with value \"/activity\"\r\n And the users url does not contain a \"nextPage\" query parameter\r\n And a user has entered their password twice\r\n When they click \"Update\"\r\n Then their password is updated\r\n And they are redirected to \"/activity\"";
|
|
18258
18925
|
|
|
18259
18926
|
const PortalResetPassword_stories = {
|
|
18260
|
-
title: "Portal Reset Password",
|
|
18927
|
+
title: "Components/Portal Reset Password",
|
|
18261
18928
|
parameters: {
|
|
18262
18929
|
scenario: scenario$2,
|
|
18263
18930
|
},
|
|
@@ -18421,7 +19088,7 @@ const PortalResetPassword = /*#__PURE__*/Object.freeze({
|
|
|
18421
19088
|
const scenario$3 = "@author:\r\n@owner:ian\r\nFeature: Verify Email\r\n\r\n\r\n Background: A user is on the email verification page\r\n Given a user who has been redirected to the email verification page\r\n\r\n @motivating\r\n Scenario: Verifying your email will take you to the portal login page\r\n Given a user has a valid oob code as a url query parameter\r\n When they click \"Verify Email\"\r\n Then the button will enter a loading state\r\n When their email is validated\r\n Then a button that says \"Continue\" will appear\r\n When they click \"Continue\"\r\n Then they will be redirected to login\r\n\r\n @motivating\r\n Scenario: Users will be automatically redirected if they dont click \"Continue\"\r\n Given a user has a valid oob code as a url query parameter\r\n When they click \"Verify Email\"\r\n Then the button will enter a loading state\r\n When their email is validated\r\n Then a button that says \"Continue\" will appear\r\n When they wait 5 seconds\r\n Then they will be redirected to login\r\n\r\n @motivating\r\n Scenario: Users are notified if verifying their email has failed\r\n Given a user has a valid oob code as a url query parameter\r\n When they click \"Verify Email\"\r\n Then the button will enter a loading state\r\n When their email fails to be validated\r\n Then an banner is shown stating that an error occured\r\n\r\n @motivating\r\n Scenario Outline: Users cannot verify their email with an invalid or missing oob code\r\n Given a user has a <oobCode> as a url query parameter\r\n Then they will see an error message saying that their verification code is invalid or expired\r\n When they click \"Continue\"\r\n Then they will be redirected to \"/\"\r\n Examples:\r\n | oobCode |\r\n | invalid oob code |\r\n | non existant oob code |\r\n\r\n @motivating\r\n Scenario: Users are redirected to \"/\" by default\r\n Given the component does not have prop \"nextPage\"\r\n And the users url does not contain a \"nextPage\" query parameter\r\n And a user has verified their email\r\n When they click \"Continue\"\r\n Then they will be redirected to \"/\"\r\n\r\n @motivating\r\n Scenario: Custom redirection can be configured\r\n Given the component has prop \"nextPage\" with value \"/activity\"\r\n And the users url does not contain a \"nextPage\" query parameter\r\n And a user has verified their email\r\n When they click \"Continue\"\r\n Then they will be redirected to \"/activity\"\r\n\r\n @motivating\r\n Scenario Outline: Users will be redirected to the value of the nextPage url parameter if it exists\r\n Given the component <mayHave> prop \"nextPage\" with <nextPageValue>\r\n And the users url contains a \"nextPage\" query paramater with <nextPageParamValue>\r\n And the user has verified their email\r\n When they click \"Continue\"\r\n Then they are redirected to <nextPageParamValue>\r\n Examples:\r\n | mayHave | nextPageValue | nextPageParamValue |\r\n | has | /dashboard | /activity |\r\n | does not have | N/A | /activity |";
|
|
18422
19089
|
|
|
18423
19090
|
const PortalVerifyEmail_stories = {
|
|
18424
|
-
title: "Portal Verify Email",
|
|
19091
|
+
title: "Components/Portal Verify Email",
|
|
18425
19092
|
parameters: {
|
|
18426
19093
|
scenario: scenario$3,
|
|
18427
19094
|
},
|
|
@@ -18465,7 +19132,7 @@ const PortalVerifyEmail = /*#__PURE__*/Object.freeze({
|
|
|
18465
19132
|
});
|
|
18466
19133
|
|
|
18467
19134
|
const AssetCard_stories = {
|
|
18468
|
-
title: "Asset Card",
|
|
19135
|
+
title: "Components/Asset Card",
|
|
18469
19136
|
};
|
|
18470
19137
|
const Default$7 = () => {
|
|
18471
19138
|
const props = {
|
|
@@ -18501,7 +19168,7 @@ const AssetCard = /*#__PURE__*/Object.freeze({
|
|
|
18501
19168
|
});
|
|
18502
19169
|
|
|
18503
19170
|
const DividedLayout_stories = {
|
|
18504
|
-
title: "Divided Layout",
|
|
19171
|
+
title: "Components/Divided Layout",
|
|
18505
19172
|
};
|
|
18506
19173
|
const barProps$1 = {
|
|
18507
19174
|
data: {
|
|
@@ -18593,7 +19260,7 @@ const DividedLayout$1 = /*#__PURE__*/Object.freeze({
|
|
|
18593
19260
|
const scenario$4 = "Feature: Change Password\r\n\r\n @motivating\r\n Scenario: Users can change their password\r\n Given a user has registered for the portal\r\n And they have a password\r\n When they navigate to the edit profile page\r\n And click \"Change your password...\"\r\n Then a popup will appear\r\n When they enter their new password\r\n And confirm it\r\n And click \"Change Password\"\r\n Then they will see a success banner stating that the change was successful\r\n When they logout\r\n And try to login\r\n Then they will not be able to login with their old password\r\n But they will be able to login with their new password\r\n\r\n @motivating\r\n Scenario: Users must confirm their password change\r\n Given a user has registered for the portal\r\n When they navigate to the edit profile page\r\n And click \"Change your password...\"\r\n Then a popup will appear\r\n When they enter their new password\r\n But they enter a different password to confirm\r\n And click \"Change Password\"\r\n Then they will see an error banner stating that the passwords didnt match\r\n When they logout\r\n And try to login\r\n Then they will be able to login with their existing password\r\n\r\n @motivating\r\n Scenario: Users must enter a new password and confirm it to change their password\r\n Given a user has registered for the portal\r\n When they navigate to the edit profile page\r\n And click \"Change your password...\"\r\n Then a popup will appear\r\n When they click \"Change password\"\r\n Then a validation error will appear for the new password field\r\n And their password will not be changed\r\n When they enter a new password\r\n And they click \"Change password\"\r\n Then a validation error will appear for the confirm new password field\r\n And their password will not be changed\r\n\r\n @motivating\r\n Scenario: An error banner will be displayed if the password change fails\r\n Given a user has registered for the portal\r\n When they navigate to the edit profile page\r\n And click \"Change your password...\"\r\n When they enter their new password\r\n And confirm it\r\n And click \"Change Password\"\r\n But the change fails\r\n Then they will see an error banner stating that the change failed\r\n When they logout\r\n And try to login\r\n Then they will be able to login with their existing password";
|
|
18594
19261
|
|
|
18595
19262
|
const ChangePassword_stories = {
|
|
18596
|
-
title: "Change Password",
|
|
19263
|
+
title: "Components/Change Password",
|
|
18597
19264
|
parameters: {
|
|
18598
19265
|
scenario: scenario$4,
|
|
18599
19266
|
},
|
|
@@ -18749,7 +19416,7 @@ const ChangePassword = /*#__PURE__*/Object.freeze({
|
|
|
18749
19416
|
});
|
|
18750
19417
|
|
|
18751
19418
|
const PortalProfile_stories = {
|
|
18752
|
-
title: "Portal Profile",
|
|
19419
|
+
title: "Components/Portal Profile",
|
|
18753
19420
|
};
|
|
18754
19421
|
// const style = {};
|
|
18755
19422
|
jss.setup(create());
|
|
@@ -18990,7 +19657,7 @@ const PortalProfile = /*#__PURE__*/Object.freeze({
|
|
|
18990
19657
|
});
|
|
18991
19658
|
|
|
18992
19659
|
const ReferralTableRewardsCell_stories = {
|
|
18993
|
-
title: "Referral Table Rewards Cell",
|
|
19660
|
+
title: "Components/Referral Table Rewards Cell",
|
|
18994
19661
|
};
|
|
18995
19662
|
const baseReward = {
|
|
18996
19663
|
id: "123",
|
|
@@ -19222,7 +19889,7 @@ const ReferralTableRewardsCell$1 = /*#__PURE__*/Object.freeze({
|
|
|
19222
19889
|
});
|
|
19223
19890
|
|
|
19224
19891
|
const ReferralTable_stories = {
|
|
19225
|
-
title: "Referral Table",
|
|
19892
|
+
title: "Components/Referral Table",
|
|
19226
19893
|
};
|
|
19227
19894
|
const loadingElement = (h("div", { slot: "loading", style: { display: "contents" } },
|
|
19228
19895
|
h("sqm-table-row", null,
|
|
@@ -19709,7 +20376,7 @@ const ReferralTable$1 = /*#__PURE__*/Object.freeze({
|
|
|
19709
20376
|
});
|
|
19710
20377
|
|
|
19711
20378
|
const ReferralTableCell_stories = {
|
|
19712
|
-
title: "Referral Table Cell",
|
|
20379
|
+
title: "Components/Referral Table Cell",
|
|
19713
20380
|
};
|
|
19714
20381
|
const TableCell = () => {
|
|
19715
20382
|
return (h("sqm-referral-table-cell", { innerTemplate: "Table Cell Text" }));
|
|
@@ -19782,28 +20449,28 @@ const ReferralTableCell$1 = /*#__PURE__*/Object.freeze({
|
|
|
19782
20449
|
});
|
|
19783
20450
|
|
|
19784
20451
|
const UserName_stories = {
|
|
19785
|
-
title: "User Name",
|
|
20452
|
+
title: "Tests/User Name",
|
|
19786
20453
|
};
|
|
19787
|
-
const
|
|
20454
|
+
const DemoData = () => {
|
|
19788
20455
|
return (h("sqm-user-name", { demoData: {
|
|
19789
20456
|
loading: false,
|
|
19790
20457
|
loadingText: "...",
|
|
19791
20458
|
username: "Test Testerson",
|
|
19792
20459
|
} }));
|
|
19793
20460
|
};
|
|
19794
|
-
const
|
|
20461
|
+
const Username = () => {
|
|
19795
20462
|
return h("sqm-user-name", null);
|
|
19796
20463
|
};
|
|
19797
20464
|
|
|
19798
20465
|
const UserName = /*#__PURE__*/Object.freeze({
|
|
19799
20466
|
__proto__: null,
|
|
19800
20467
|
'default': UserName_stories,
|
|
19801
|
-
|
|
19802
|
-
|
|
20468
|
+
DemoData: DemoData,
|
|
20469
|
+
Username: Username
|
|
19803
20470
|
});
|
|
19804
20471
|
|
|
19805
20472
|
const PasswordField_stories = {
|
|
19806
|
-
title: "Portal Password Field",
|
|
20473
|
+
title: "Components/Portal Password Field",
|
|
19807
20474
|
};
|
|
19808
20475
|
const Start = () => {
|
|
19809
20476
|
return (h("sqm-password-field", { demoData: {
|
|
@@ -19850,6 +20517,368 @@ const PasswordField = /*#__PURE__*/Object.freeze({
|
|
|
19850
20517
|
ValidationError: ValidationError
|
|
19851
20518
|
});
|
|
19852
20519
|
|
|
20520
|
+
/**
|
|
20521
|
+
* Displays a cartesian product of the input props
|
|
20522
|
+
*
|
|
20523
|
+
* @returns
|
|
20524
|
+
*/
|
|
20525
|
+
function MatrixStory({ matrix, props, Component, }) {
|
|
20526
|
+
const propMatrix = Object.keys(matrix).map((propKey) => {
|
|
20527
|
+
const propValues = matrix[propKey];
|
|
20528
|
+
return propValues.map((val) => {
|
|
20529
|
+
return {
|
|
20530
|
+
[propKey]: val,
|
|
20531
|
+
};
|
|
20532
|
+
});
|
|
20533
|
+
});
|
|
20534
|
+
const combinations = cartesian(...propMatrix);
|
|
20535
|
+
const propsCombinations = combinations.map((combo) => {
|
|
20536
|
+
return combo.reduce((props, prop) => {
|
|
20537
|
+
return {
|
|
20538
|
+
...props,
|
|
20539
|
+
...prop,
|
|
20540
|
+
};
|
|
20541
|
+
}, {});
|
|
20542
|
+
});
|
|
20543
|
+
return propsCombinations.map((combo) => {
|
|
20544
|
+
const example = { ...props, ...combo };
|
|
20545
|
+
return (h("div", null,
|
|
20546
|
+
h(PropsTable, { values: example }),
|
|
20547
|
+
h("hr", null),
|
|
20548
|
+
h(Component, Object.assign({}, example))));
|
|
20549
|
+
});
|
|
20550
|
+
}
|
|
20551
|
+
function PropsTable({ values }) {
|
|
20552
|
+
return (h("table", null,
|
|
20553
|
+
h("tbody", null, Object.keys(values).map((key) => {
|
|
20554
|
+
return (h("tr", null,
|
|
20555
|
+
h("th", null, key),
|
|
20556
|
+
h("td", null, JSON.stringify(values[key]))));
|
|
20557
|
+
}))));
|
|
20558
|
+
}
|
|
20559
|
+
/**
|
|
20560
|
+
* Source: https://stackoverflow.com/questions/15298912/javascript-generating-combinations-from-n-arrays-with-m-elements
|
|
20561
|
+
*
|
|
20562
|
+
* TODO: Could replace with a fork of https://www.npmjs.com/package/cartesian
|
|
20563
|
+
*
|
|
20564
|
+
* @param args - an array of arrays
|
|
20565
|
+
* @returns combinations of the elements in those array
|
|
20566
|
+
*/
|
|
20567
|
+
function cartesian(...args) {
|
|
20568
|
+
var r = [], max = args.length - 1;
|
|
20569
|
+
function helper(arr, i) {
|
|
20570
|
+
for (var j = 0, l = args[i].length; j < l; j++) {
|
|
20571
|
+
var a = arr.slice(0); // clone arr
|
|
20572
|
+
a.push(args[i][j]);
|
|
20573
|
+
if (i == max)
|
|
20574
|
+
r.push(a);
|
|
20575
|
+
else
|
|
20576
|
+
helper(a, i + 1);
|
|
20577
|
+
}
|
|
20578
|
+
}
|
|
20579
|
+
helper([], 0);
|
|
20580
|
+
return r;
|
|
20581
|
+
}
|
|
20582
|
+
|
|
20583
|
+
const TaskCard_stories = {
|
|
20584
|
+
title: "Components/Task Card",
|
|
20585
|
+
};
|
|
20586
|
+
const resizable = {
|
|
20587
|
+
width: "347px",
|
|
20588
|
+
minWidth: "347px",
|
|
20589
|
+
resize: "horizontal",
|
|
20590
|
+
height: "fit-content",
|
|
20591
|
+
overflow: "hidden",
|
|
20592
|
+
};
|
|
20593
|
+
const NotRepeatable = () => {
|
|
20594
|
+
const oneAction = {
|
|
20595
|
+
points: 20,
|
|
20596
|
+
title: "Complete a survey",
|
|
20597
|
+
description: "Description of action and reward. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut eget quisque commodo leo.",
|
|
20598
|
+
buttonText: "Take survey",
|
|
20599
|
+
onClick: () => { },
|
|
20600
|
+
};
|
|
20601
|
+
const coupleActions = {
|
|
20602
|
+
points: 40,
|
|
20603
|
+
title: "Comment on 5 articles",
|
|
20604
|
+
progress: 1,
|
|
20605
|
+
goal: 5,
|
|
20606
|
+
steps: 1,
|
|
20607
|
+
description: "Description of action and reward. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut eget quisque commodo leo.",
|
|
20608
|
+
buttonText: "Start reading",
|
|
20609
|
+
onClick: () => { },
|
|
20610
|
+
};
|
|
20611
|
+
const manyActions = {
|
|
20612
|
+
points: 150,
|
|
20613
|
+
title: "Spend $500 at our Store",
|
|
20614
|
+
progress: 230,
|
|
20615
|
+
goal: 500,
|
|
20616
|
+
unit: "$",
|
|
20617
|
+
description: "Description of action and reward. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut eget quisque commodo leo.",
|
|
20618
|
+
buttonText: "Visit our Store",
|
|
20619
|
+
onClick: () => { },
|
|
20620
|
+
};
|
|
20621
|
+
return (h("div", { style: { display: "inline-flex", gap: "32px" } },
|
|
20622
|
+
h("div", { style: resizable },
|
|
20623
|
+
h("h4", null, "One Action"),
|
|
20624
|
+
h(TaskCardView, Object.assign({}, oneAction)),
|
|
20625
|
+
" ",
|
|
20626
|
+
h("h5", null),
|
|
20627
|
+
h(TaskCardView, Object.assign({}, oneAction, { complete: true })),
|
|
20628
|
+
" ",
|
|
20629
|
+
h("h5", null)),
|
|
20630
|
+
h("div", { style: resizable },
|
|
20631
|
+
h("h4", null, "A Couple Actions"),
|
|
20632
|
+
h(TaskCardView, Object.assign({}, coupleActions)),
|
|
20633
|
+
" ",
|
|
20634
|
+
h("h5", null),
|
|
20635
|
+
h(TaskCardView, Object.assign({}, coupleActions, { progress: 5 })),
|
|
20636
|
+
h("h5", null,
|
|
20637
|
+
"Progress ",
|
|
20638
|
+
">",
|
|
20639
|
+
" Goal"),
|
|
20640
|
+
h(TaskCardView, Object.assign({}, coupleActions, { progress: 9 })),
|
|
20641
|
+
" ",
|
|
20642
|
+
h("h5", null)),
|
|
20643
|
+
h("div", { style: resizable },
|
|
20644
|
+
h("h4", null, "Many Actions"),
|
|
20645
|
+
h(TaskCardView, Object.assign({}, manyActions)),
|
|
20646
|
+
" ",
|
|
20647
|
+
h("h5", null),
|
|
20648
|
+
h(TaskCardView, Object.assign({}, manyActions, { progress: 500 })),
|
|
20649
|
+
" ",
|
|
20650
|
+
h("h5", null))));
|
|
20651
|
+
};
|
|
20652
|
+
const NotRepeatableWithExpiry = () => {
|
|
20653
|
+
const oneAction = {
|
|
20654
|
+
points: 20,
|
|
20655
|
+
title: "Complete a survey",
|
|
20656
|
+
description: "Description of action and reward. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut eget quisque commodo leo.",
|
|
20657
|
+
expire: "Nov 30, 2021",
|
|
20658
|
+
buttonText: "Take survey",
|
|
20659
|
+
onClick: () => { },
|
|
20660
|
+
};
|
|
20661
|
+
const coupleActions = {
|
|
20662
|
+
points: 40,
|
|
20663
|
+
title: "Comment on 5 articles",
|
|
20664
|
+
progress: 1,
|
|
20665
|
+
goal: 5,
|
|
20666
|
+
steps: 1,
|
|
20667
|
+
description: "Description of action and reward. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut eget quisque commodo leo.",
|
|
20668
|
+
expire: "Nov 30, 2021",
|
|
20669
|
+
buttonText: "Start reading",
|
|
20670
|
+
onClick: () => { },
|
|
20671
|
+
};
|
|
20672
|
+
const manyActions = {
|
|
20673
|
+
points: 150,
|
|
20674
|
+
title: "Spend $500 at our Store",
|
|
20675
|
+
progress: 230,
|
|
20676
|
+
goal: 500,
|
|
20677
|
+
unit: "$",
|
|
20678
|
+
description: "Description of action and reward. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut eget quisque commodo leo.",
|
|
20679
|
+
expire: "Nov 30, 2021",
|
|
20680
|
+
buttonText: "Visit our Store",
|
|
20681
|
+
onClick: () => { },
|
|
20682
|
+
};
|
|
20683
|
+
return (h("div", { style: { display: "inline-flex", gap: "32px" } },
|
|
20684
|
+
h("div", { style: resizable },
|
|
20685
|
+
h("h4", null, "One Action"),
|
|
20686
|
+
h(TaskCardView, Object.assign({}, oneAction)),
|
|
20687
|
+
" ",
|
|
20688
|
+
h("h5", null),
|
|
20689
|
+
h(TaskCardView, Object.assign({}, oneAction, { complete: true })),
|
|
20690
|
+
" ",
|
|
20691
|
+
h("h5", null)),
|
|
20692
|
+
h("div", { style: resizable },
|
|
20693
|
+
h("h4", null, "A Couple Actions"),
|
|
20694
|
+
h(TaskCardView, Object.assign({}, coupleActions)),
|
|
20695
|
+
" ",
|
|
20696
|
+
h("h5", null),
|
|
20697
|
+
h(TaskCardView, Object.assign({}, coupleActions, { progress: 5 })),
|
|
20698
|
+
h("h5", null,
|
|
20699
|
+
"Progress ",
|
|
20700
|
+
">",
|
|
20701
|
+
" Goal"),
|
|
20702
|
+
h(TaskCardView, Object.assign({}, coupleActions, { progress: 9 })),
|
|
20703
|
+
" ",
|
|
20704
|
+
h("h5", null)),
|
|
20705
|
+
h("div", { style: resizable },
|
|
20706
|
+
h("h4", null, "Many Actions"),
|
|
20707
|
+
h(TaskCardView, Object.assign({}, manyActions)),
|
|
20708
|
+
" ",
|
|
20709
|
+
h("h5", null),
|
|
20710
|
+
h(TaskCardView, Object.assign({}, manyActions, { progress: 500 })),
|
|
20711
|
+
" ",
|
|
20712
|
+
h("h5", null))));
|
|
20713
|
+
};
|
|
20714
|
+
const Repeatable = () => {
|
|
20715
|
+
const oneAction = {
|
|
20716
|
+
points: 20,
|
|
20717
|
+
title: "Complete a survey",
|
|
20718
|
+
description: "Description of action and reward. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut eget quisque commodo leo.",
|
|
20719
|
+
repeatable: 0,
|
|
20720
|
+
buttonText: "Take survey",
|
|
20721
|
+
onClick: () => { },
|
|
20722
|
+
};
|
|
20723
|
+
const coupleActions = {
|
|
20724
|
+
points: 40,
|
|
20725
|
+
title: "Comment on 5 articles",
|
|
20726
|
+
goal: 5,
|
|
20727
|
+
steps: 1,
|
|
20728
|
+
repeatable: true,
|
|
20729
|
+
description: "Description of action and reward. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut eget quisque commodo leo.",
|
|
20730
|
+
buttonText: "Start reading",
|
|
20731
|
+
onClick: () => { },
|
|
20732
|
+
};
|
|
20733
|
+
const manyActions = {
|
|
20734
|
+
points: 150,
|
|
20735
|
+
title: "Spend $500 at our Store",
|
|
20736
|
+
goal: 500,
|
|
20737
|
+
repeatable: true,
|
|
20738
|
+
unit: "$",
|
|
20739
|
+
description: "Description of action and reward. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut eget quisque commodo leo.",
|
|
20740
|
+
buttonText: "Visit our Store",
|
|
20741
|
+
onClick: () => { },
|
|
20742
|
+
};
|
|
20743
|
+
return (h("div", { style: { display: "inline-flex", gap: "32px" } },
|
|
20744
|
+
h("div", { style: resizable },
|
|
20745
|
+
h("h4", null, "One Action"),
|
|
20746
|
+
h(TaskCardView, Object.assign({}, oneAction)),
|
|
20747
|
+
" ",
|
|
20748
|
+
h("h5", null),
|
|
20749
|
+
h(TaskCardView, Object.assign({}, oneAction, { repeatable: 1, complete: true })),
|
|
20750
|
+
" ",
|
|
20751
|
+
h("h5", null)),
|
|
20752
|
+
h("div", { style: resizable },
|
|
20753
|
+
h("h4", null, "A Couple Actions"),
|
|
20754
|
+
h(TaskCardView, Object.assign({}, coupleActions, { progress: 1 })),
|
|
20755
|
+
" ",
|
|
20756
|
+
h("h5", null),
|
|
20757
|
+
h(TaskCardView, Object.assign({}, coupleActions, { progress: 5 })),
|
|
20758
|
+
" ",
|
|
20759
|
+
h("h5", null),
|
|
20760
|
+
h(TaskCardView, Object.assign({}, coupleActions, { progress: 7 })),
|
|
20761
|
+
" ",
|
|
20762
|
+
h("h5", null),
|
|
20763
|
+
h(TaskCardView, Object.assign({}, coupleActions, { progress: 10 })),
|
|
20764
|
+
" ",
|
|
20765
|
+
h("h5", null),
|
|
20766
|
+
h(TaskCardView, Object.assign({}, coupleActions, { progress: 12 })),
|
|
20767
|
+
" ",
|
|
20768
|
+
h("h5", null)),
|
|
20769
|
+
h("div", { style: resizable },
|
|
20770
|
+
h("h4", null, "Many Actions"),
|
|
20771
|
+
h(TaskCardView, Object.assign({}, manyActions, { progress: 100 })),
|
|
20772
|
+
" ",
|
|
20773
|
+
h("h5", null),
|
|
20774
|
+
h(TaskCardView, Object.assign({}, manyActions, { progress: 500 })),
|
|
20775
|
+
" ",
|
|
20776
|
+
h("h5", null),
|
|
20777
|
+
h(TaskCardView, Object.assign({}, manyActions, { progress: 650 })),
|
|
20778
|
+
" ",
|
|
20779
|
+
h("h5", null),
|
|
20780
|
+
h(TaskCardView, Object.assign({}, manyActions, { progress: 1000 })),
|
|
20781
|
+
" ",
|
|
20782
|
+
h("h5", null),
|
|
20783
|
+
h(TaskCardView, Object.assign({}, manyActions, { progress: 1200 })),
|
|
20784
|
+
" ",
|
|
20785
|
+
h("h5", null))));
|
|
20786
|
+
};
|
|
20787
|
+
const RepeatableWithExpiry = () => {
|
|
20788
|
+
const oneAction = {
|
|
20789
|
+
points: 20,
|
|
20790
|
+
title: "Complete a survey",
|
|
20791
|
+
expire: "Nov 30, 2021",
|
|
20792
|
+
description: "Description of action and reward. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut eget quisque commodo leo.",
|
|
20793
|
+
repeatable: 0,
|
|
20794
|
+
buttonText: "Take survey",
|
|
20795
|
+
onClick: () => { },
|
|
20796
|
+
};
|
|
20797
|
+
const coupleActions = {
|
|
20798
|
+
points: 40,
|
|
20799
|
+
title: "Comment on 5 articles",
|
|
20800
|
+
expire: "Nov 30, 2021",
|
|
20801
|
+
goal: 5,
|
|
20802
|
+
steps: 1,
|
|
20803
|
+
repeatable: true,
|
|
20804
|
+
description: "Description of action and reward. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut eget quisque commodo leo.",
|
|
20805
|
+
buttonText: "Start reading",
|
|
20806
|
+
onClick: () => { },
|
|
20807
|
+
};
|
|
20808
|
+
const manyActions = {
|
|
20809
|
+
points: 150,
|
|
20810
|
+
title: "Spend $500 at our Store",
|
|
20811
|
+
expire: "Nov 30, 2021",
|
|
20812
|
+
goal: 500,
|
|
20813
|
+
repeatable: true,
|
|
20814
|
+
unit: "$",
|
|
20815
|
+
description: "Description of action and reward. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut eget quisque commodo leo.",
|
|
20816
|
+
buttonText: "Visit our Store",
|
|
20817
|
+
onClick: () => { },
|
|
20818
|
+
};
|
|
20819
|
+
return (h("div", { style: { display: "inline-flex", gap: "32px" } },
|
|
20820
|
+
h("div", { style: resizable },
|
|
20821
|
+
h("h4", null, "One Action"),
|
|
20822
|
+
h(TaskCardView, Object.assign({}, oneAction)),
|
|
20823
|
+
" ",
|
|
20824
|
+
h("h5", null),
|
|
20825
|
+
h(TaskCardView, Object.assign({}, oneAction, { repeatable: 1, complete: true })),
|
|
20826
|
+
" ",
|
|
20827
|
+
h("h5", null)),
|
|
20828
|
+
h("div", { style: resizable },
|
|
20829
|
+
h("h4", null, "A Couple Actions"),
|
|
20830
|
+
h(TaskCardView, Object.assign({}, coupleActions, { progress: 1 })),
|
|
20831
|
+
" ",
|
|
20832
|
+
h("h5", null),
|
|
20833
|
+
h(TaskCardView, Object.assign({}, coupleActions, { progress: 5 })),
|
|
20834
|
+
" ",
|
|
20835
|
+
h("h5", null),
|
|
20836
|
+
h(TaskCardView, Object.assign({}, coupleActions, { progress: 7 })),
|
|
20837
|
+
" ",
|
|
20838
|
+
h("h5", null),
|
|
20839
|
+
h(TaskCardView, Object.assign({}, coupleActions, { progress: 10 })),
|
|
20840
|
+
" ",
|
|
20841
|
+
h("h5", null),
|
|
20842
|
+
h(TaskCardView, Object.assign({}, coupleActions, { progress: 12 })),
|
|
20843
|
+
" ",
|
|
20844
|
+
h("h5", null)),
|
|
20845
|
+
h("div", { style: resizable },
|
|
20846
|
+
h("h4", null, "Many Actions"),
|
|
20847
|
+
h(TaskCardView, Object.assign({}, manyActions, { progress: 100 })),
|
|
20848
|
+
" ",
|
|
20849
|
+
h("h5", null),
|
|
20850
|
+
h(TaskCardView, Object.assign({}, manyActions, { progress: 500 })),
|
|
20851
|
+
" ",
|
|
20852
|
+
h("h5", null),
|
|
20853
|
+
h(TaskCardView, Object.assign({}, manyActions, { progress: 650 })),
|
|
20854
|
+
" ",
|
|
20855
|
+
h("h5", null),
|
|
20856
|
+
h(TaskCardView, Object.assign({}, manyActions, { progress: 1000 })),
|
|
20857
|
+
" ",
|
|
20858
|
+
h("h5", null),
|
|
20859
|
+
h(TaskCardView, Object.assign({}, manyActions, { progress: 1200 })),
|
|
20860
|
+
" ",
|
|
20861
|
+
h("h5", null))));
|
|
20862
|
+
};
|
|
20863
|
+
const ProgressBar$1 = () => {
|
|
20864
|
+
const props = {
|
|
20865
|
+
goal: 5,
|
|
20866
|
+
};
|
|
20867
|
+
return (h("div", null,
|
|
20868
|
+
h(MatrixStory, { matrix: { progress: [1, 2, 5], steps: [0, 1], repeatable: [false] }, props: props, Component: ProgressBar$2 }),
|
|
20869
|
+
h(MatrixStory, { matrix: { progress: [2, 5, 7, 12], steps: [0, 1], repeatable: [true] }, props: props, Component: ProgressBar$2 })));
|
|
20870
|
+
};
|
|
20871
|
+
|
|
20872
|
+
const TaskCard = /*#__PURE__*/Object.freeze({
|
|
20873
|
+
__proto__: null,
|
|
20874
|
+
'default': TaskCard_stories,
|
|
20875
|
+
NotRepeatable: NotRepeatable,
|
|
20876
|
+
NotRepeatableWithExpiry: NotRepeatableWithExpiry,
|
|
20877
|
+
Repeatable: Repeatable,
|
|
20878
|
+
RepeatableWithExpiry: RepeatableWithExpiry,
|
|
20879
|
+
ProgressBar: ProgressBar$1
|
|
20880
|
+
});
|
|
20881
|
+
|
|
19853
20882
|
const portalTemplate = "<sqm-portal-frame>\r\n <a slot=\"header\" href=\"/\">\r\n <sqm-text style=\"height: 60px\">\r\n <img\r\n style=\"height: 60px\"\r\n src=\"https://res.cloudinary.com/saasquatch/image/upload/v1634255445/squatch-assets/Copy_of_saasquatch-logo-tree-large-horizontal.png\"\r\n />\r\n </sqm-text>\r\n </a>\r\n <sqb-program-section program-id=\"referral-program\">\r\n <sqm-router>\r\n <template\r\n path=\"/:path(\\bregister\\b|\\bemailVerification\\b|\\blogin\\b|\\bverifyEmail\\b|\\bforgotPassword\\b|\\bresetPassword\\b|\\blogout\\b)\"\r\n >\r\n <sqm-graphql-client-provider\r\n domain=\"https://managed-identity.saasquatch.com\"\r\n >\r\n <sqm-hero\r\n background=\"https://images.unsplash.com/photo-1599676821464-3555954838dc?ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&ixlib=rb-1.2.1&auto=format&fit=crop&w=1939&q=80\"\r\n >\r\n <sqm-router>\r\n <template path=\"/register\">\r\n <sqm-portal-register>\r\n <sqm-name-fields slot=\"formData\"></sqm-name-fields>\r\n </sqm-portal-register>\r\n </template>\r\n\r\n <template path=\"/emailVerification\">\r\n <sqm-portal-protected-route\r\n redirect-to=\"/login\"\r\n ></sqm-portal-protected-route>\r\n <sqm-portal-email-verification></sqm-portal-email-verification>\r\n </template>\r\n\r\n <template path=\"/login\">\r\n <sqm-portal-login></sqm-portal-login>\r\n </template>\r\n\r\n <template path=\"/verifyEmail\">\r\n <sqm-portal-verify-email></sqm-portal-verify-email>\r\n </template>\r\n\r\n <template path=\"/forgotPassword\">\r\n <sqm-portal-forgot-password\r\n email-label=\"Business Email\"\r\n ></sqm-portal-forgot-password>\r\n </template>\r\n\r\n <template path=\"/resetPassword\">\r\n <sqm-portal-reset-password\r\n confirm-password=\"true\"\r\n ></sqm-portal-reset-password>\r\n </template>\r\n <template path=\"/logout\">\r\n <sqm-portal-logout next-page=\"/login\"></sqm-portal-logout>\r\n </template>\r\n </sqm-router>\r\n </sqm-hero>\r\n </sqm-graphql-client-provider>\r\n </template>\r\n </sqm-router>\r\n <sqm-router>\r\n <template path=\"/:path(\\bactivity\\b|\\beditProfile\\b)?\">\r\n <sqm-divided-layout\r\n direction=\"row\"\r\n style=\"\r\n border-top: 1px solid #eaeaea;\r\n border-bottom: 1px solid #eaeaea;\r\n \"\r\n >\r\n <sqm-navigation-sidebar>\r\n <sqm-navigation-sidebar-item\r\n path=\"/\"\r\n icon=\"house\"\r\n label=\"Dashboard\"\r\n ></sqm-navigation-sidebar-item>\r\n <sqm-navigation-sidebar-item\r\n path=\"/activity\"\r\n icon=\"bar-chart\"\r\n label=\"Activity\"\r\n ></sqm-navigation-sidebar-item>\r\n <sqm-navigation-sidebar-item\r\n path=\"/editProfile\"\r\n icon=\"person\"\r\n label=\"Edit Profile\"\r\n ></sqm-navigation-sidebar-item>\r\n <sqm-navigation-sidebar-item\r\n path=\"/logout\"\r\n icon=\"box-arrow-right\"\r\n label=\"Logout\"\r\n ></sqm-navigation-sidebar-item>\r\n </sqm-navigation-sidebar>\r\n <sqm-divided-layout direction=\"column\">\r\n <sqm-router>\r\n <template path=\"/\">\r\n <sqm-portal-protected-route\r\n require-email-verification=\"true\"\r\n redirect-to=\"/login\"\r\n redirect-to-unverified=\"/emailVerification\"\r\n ></sqm-portal-protected-route>\r\n <sqb-widget\r\n widget-type=\"p/referral-program/w/referrerWidget\"\r\n track-loads=\"true\"\r\n ></sqb-widget>\r\n </template>\r\n <template path=\"/editProfile\">\r\n <sqm-portal-protected-route\r\n require-email-verification=\"true\"\r\n redirect-to=\"/login\"\r\n redirect-to-unverified=\"/emailVerification\"\r\n ></sqm-portal-protected-route>\r\n <sqm-portal-container direction=\"column\" gap=\"xxx-large\">\r\n <sqm-portal-profile></sqm-portal-profile> </sqm-portal-container\r\n ><sqm-portal-container direction=\"column\" gap=\"xxx-large\">\r\n <sqm-graphql-client-provider\r\n domain=\"https://managed-identity.saasquatch.com\"\r\n >\r\n <sqm-portal-change-password></sqm-portal-change-password>\r\n </sqm-graphql-client-provider>\r\n </sqm-portal-container>\r\n </template>\r\n\r\n <template path=\"/activity\">\r\n <sqm-portal-protected-route\r\n require-email-verification=\"true\"\r\n redirect-to=\"/login\"\r\n redirect-to-unverified=\"/emailVerification\"\r\n ></sqm-portal-protected-route>\r\n <sqm-portal-container\r\n direction=\"column\"\r\n padding=\"xxx-large\"\r\n gap=\"xxx-large\"\r\n >\r\n <sqm-text> <h1>Activity</h1></sqm-text>\r\n <sqm-stat-container space=\"xxxx-large\"\r\n ><sqm-big-stat\r\n flex-reverse=\"true\"\r\n alignment=\"left\"\r\n stat-type=\"/referralsCount\"\r\n ><sqm-text><p>Referrals</p></sqm-text></sqm-big-stat\r\n >\r\n <sqm-big-stat\r\n flex-reverse=\"true\"\r\n alignment=\"left\"\r\n stat-type=\"/rewardsCountFiltered/AVAILABLE\"\r\n ><sqm-text><p>Rewards Earned</p></sqm-text></sqm-big-stat\r\n >\r\n <sqm-big-stat\r\n flex-reverse=\"true\"\r\n alignment=\"left\"\r\n stat-type=\"/rewardBalance/CREDIT/CENTS\"\r\n ><sqm-text><p>Reward Balance</p></sqm-text></sqm-big-stat\r\n >\r\n </sqm-stat-container>\r\n <sqm-referral-table>\r\n <sqm-referral-table-user-column></sqm-referral-table-user-column>\r\n <sqm-referral-table-rewards-column></sqm-referral-table-rewards-column>\r\n <sqm-referral-table-status-column></sqm-referral-table-status-column>\r\n <sqm-referral-table-date-column\r\n column-title=\"Referred\"\r\n date-shown=\"dateReferralStarted\"\r\n ></sqm-referral-table-date-column> </sqm-referral-table\r\n ></sqm-portal-container>\r\n </template>\r\n </sqm-router>\r\n </sqm-divided-layout>\r\n </sqm-divided-layout>\r\n </template>\r\n </sqm-router>\r\n </sqb-program-section>\r\n <sqm-portal-footer\r\n slot=\"footer\"\r\n support-email=\"support@example.com\"\r\n terms-link=\"https://example.com\"\r\n faq-link=\"https://example.com\"\r\n terms-text=\"Terms And Conditions\"\r\n faq-text=\"FAQ\"\r\n show-powered-by=\"true\"\r\n ></sqm-portal-footer>\r\n</sqm-portal-frame>\r\n";
|
|
19854
20883
|
|
|
19855
20884
|
const portalLeadSubmitTemplate = "<sqm-portal-frame>\r\n <a slot=\"header\" href=\"/\">\r\n <sqm-text style=\"height: 60px\">\r\n <img\r\n style=\"height: 60px\"\r\n src=\"https://res.cloudinary.com/saasquatch/image/upload/v1634255445/squatch-assets/Copy_of_saasquatch-logo-tree-large-horizontal.png\"\r\n />\r\n </sqm-text>\r\n </a>\r\n <sqb-program-section program-id=\"referral-program\">\r\n <sqm-router>\r\n <template\r\n path=\"/:path(\\bregister\\b|\\bemailVerification\\b|\\blogin\\b|\\bverifyEmail\\b|\\bforgotPassword\\b|\\bresetPassword\\b|\\blogout\\b)\"\r\n >\r\n <sqm-graphql-client-provider\r\n domain=\"https://managed-identity.saasquatch.com\"\r\n >\r\n <sqm-hero\r\n background=\"https://images.unsplash.com/photo-1599676821464-3555954838dc?ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&ixlib=rb-1.2.1&auto=format&fit=crop&w=1939&q=80\"\r\n >\r\n <sqm-router>\r\n <template path=\"/register\">\r\n <sqm-portal-register>\r\n <sqm-name-fields slot=\"formData\"></sqm-name-fields>\r\n </sqm-portal-register>\r\n </template>\r\n\r\n <template path=\"/emailVerification\">\r\n <sqm-portal-protected-route\r\n redirect-to=\"/login\"\r\n ></sqm-portal-protected-route>\r\n <sqm-portal-email-verification></sqm-portal-email-verification>\r\n </template>\r\n\r\n <template path=\"/login\">\r\n <sqm-portal-login></sqm-portal-login>\r\n </template>\r\n\r\n <template path=\"/verifyEmail\">\r\n <sqm-portal-verify-email></sqm-portal-verify-email>\r\n </template>\r\n\r\n <template path=\"/forgotPassword\">\r\n <sqm-portal-forgot-password\r\n email-label=\"Business Email\"\r\n ></sqm-portal-forgot-password>\r\n </template>\r\n\r\n <template path=\"/resetPassword\">\r\n <sqm-portal-reset-password\r\n confirm-password=\"true\"\r\n ></sqm-portal-reset-password>\r\n </template>\r\n <template path=\"/logout\">\r\n <sqm-portal-logout next-page=\"/login\"></sqm-portal-logout>\r\n </template>\r\n </sqm-router>\r\n </sqm-hero>\r\n </sqm-graphql-client-provider>\r\n </template>\r\n </sqm-router>\r\n <sqm-router>\r\n <template path=\"/:path(\\bactivity\\b|\\beditProfile\\b|\\brefer\\b)?\">\r\n <sqm-divided-layout\r\n direction=\"row\"\r\n style=\"\r\n border-top: 1px solid #eaeaea;\r\n border-bottom: 1px solid #eaeaea;\r\n \"\r\n >\r\n <sqm-navigation-sidebar>\r\n <sqm-navigation-sidebar-item\r\n path=\"/\"\r\n icon=\"house\"\r\n label=\"Dashboard\"\r\n ></sqm-navigation-sidebar-item>\r\n <sqm-navigation-sidebar-item\r\n path=\"/refer\"\r\n icon=\"inbox\"\r\n label=\"Submit A Lead\"\r\n ></sqm-navigation-sidebar-item>\r\n <sqm-navigation-sidebar-item\r\n path=\"/activity\"\r\n icon=\"bar-chart\"\r\n label=\"Activity\"\r\n ></sqm-navigation-sidebar-item>\r\n <sqm-navigation-sidebar-item\r\n path=\"/editProfile\"\r\n icon=\"person\"\r\n label=\"Edit Profile\"\r\n ></sqm-navigation-sidebar-item>\r\n <sqm-navigation-sidebar-item\r\n path=\"/logout\"\r\n icon=\"box-arrow-right\"\r\n label=\"Logout\"\r\n ></sqm-navigation-sidebar-item>\r\n </sqm-navigation-sidebar>\r\n <sqm-divided-layout direction=\"column\">\r\n <sqm-router>\r\n <template path=\"/\">\r\n <sqm-portal-protected-route\r\n require-email-verification=\"true\"\r\n redirect-to=\"/login\"\r\n redirect-to-unverified=\"/emailVerification\"\r\n ></sqm-portal-protected-route>\r\n <sqb-widget\r\n widget-type=\"p/referral-program/w/referrerWidget\"\r\n track-loads=\"true\"\r\n ></sqb-widget>\r\n </template>\r\n <template path=\"/editProfile\">\r\n <sqm-portal-protected-route\r\n require-email-verification=\"true\"\r\n redirect-to=\"/login\"\r\n redirect-to-unverified=\"/emailVerification\"\r\n ></sqm-portal-protected-route>\r\n <sqm-portal-container direction=\"column\" gap=\"xxx-large\">\r\n <sqm-portal-profile></sqm-portal-profile> </sqm-portal-container\r\n ><sqm-portal-container direction=\"column\" gap=\"xxx-large\">\r\n <sqm-graphql-client-provider\r\n domain=\"https://managed-identity.saasquatch.com\"\r\n >\r\n <sqm-portal-change-password></sqm-portal-change-password>\r\n </sqm-graphql-client-provider>\r\n </sqm-portal-container>\r\n </template>\r\n <template path=\"/refer\">\r\n <sqm-portal-protected-route\r\n require-email-verification=\"true\"\r\n redirect-to=\"/login\"\r\n redirect-to-unverified=\"/emailVerification\"\r\n ></sqm-portal-protected-route>\r\n <sqm-referral-iframe></sqm-referral-iframe>\r\n </template>\r\n <template path=\"/activity\">\r\n <sqm-portal-protected-route\r\n require-email-verification=\"true\"\r\n redirect-to=\"/login\"\r\n redirect-to-unverified=\"/emailVerification\"\r\n ></sqm-portal-protected-route>\r\n <sqm-portal-container\r\n direction=\"column\"\r\n padding=\"xxx-large\"\r\n gap=\"xxx-large\"\r\n >\r\n <sqm-text> <h1>Activity</h1></sqm-text>\r\n <sqm-stat-container space=\"xxxx-large\"\r\n ><sqm-big-stat\r\n flex-reverse=\"true\"\r\n alignment=\"left\"\r\n stat-type=\"/referralsCount\"\r\n ><sqm-text><p>Referrals</p></sqm-text></sqm-big-stat\r\n >\r\n <sqm-big-stat\r\n flex-reverse=\"true\"\r\n alignment=\"left\"\r\n stat-type=\"/rewardsCountFiltered/AVAILABLE\"\r\n ><sqm-text><p>Rewards Earned</p></sqm-text></sqm-big-stat\r\n >\r\n <sqm-big-stat\r\n flex-reverse=\"true\"\r\n alignment=\"left\"\r\n stat-type=\"/rewardBalance/CREDIT/CENTS\"\r\n ><sqm-text><p>Reward Balance</p></sqm-text></sqm-big-stat\r\n >\r\n </sqm-stat-container>\r\n <sqm-referral-table>\r\n <sqm-referral-table-user-column></sqm-referral-table-user-column>\r\n <sqm-referral-table-rewards-column></sqm-referral-table-rewards-column>\r\n <sqm-referral-table-status-column></sqm-referral-table-status-column>\r\n <sqm-referral-table-date-column\r\n column-title=\"Referred\"\r\n date-shown=\"dateReferralStarted\"\r\n ></sqm-referral-table-date-column> </sqm-referral-table\r\n ></sqm-portal-container>\r\n </template>\r\n </sqm-router>\r\n </sqm-divided-layout>\r\n </sqm-divided-layout>\r\n </template>\r\n </sqm-router>\r\n </sqb-program-section>\r\n <sqm-portal-footer\r\n slot=\"footer\"\r\n support-email=\"support@example.com\"\r\n terms-link=\"https://example.com\"\r\n faq-link=\"https://example.com\"\r\n terms-text=\"Terms And Conditions\"\r\n faq-text=\"FAQ\"\r\n show-powered-by=\"true\"\r\n ></sqm-portal-footer>\r\n</sqm-portal-frame>\r\n";
|
|
@@ -22862,7 +23891,7 @@ const ReferralIframeReadme = "# sqm-referral-iframe\r\n\r\n\r\n\r\n<!-- Auto Gen
|
|
|
22862
23891
|
|
|
22863
23892
|
const ForgotPasswordReadme = "# sqm-portal-forgot-password\r\n\r\n\r\n\r\n<!-- Auto Generated Below -->\r\n\r\n\r\n## Properties\r\n\r\n| Property | Attribute | Description | Type | Default |\r\n| ------------- | -------------- | ----------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -------------------------- |\r\n| `demoData` | -- | | `{ states?: { error: string; loading: boolean; success: boolean; }; content?: { secondaryButton: any; messageSlot: any; emailLabel?: string; submitLabel?: string; }; }` | `undefined` |\r\n| `emailLabel` | `email-label` | | `string` | `\"Email\"` |\r\n| `submitLabel` | `submit-label` | | `string` | `\"Request Password Reset\"` |\r\n\r\n\r\n## Dependencies\r\n\r\n### Depends on\r\n\r\n- [sqm-form-message](../sqm-form-message)\r\n\r\n### Graph\r\n```mermaid\r\ngraph TD;\r\n sqm-portal-forgot-password --> sqm-form-message\r\n style sqm-portal-forgot-password fill:#f9f,stroke:#333,stroke-width:4px\r\n```\r\n\r\n----------------------------------------------\r\n\r\n*Built with [StencilJS](https://stenciljs.com/)*\r\n";
|
|
22864
23893
|
|
|
22865
|
-
const RegisterReadme = "# sqm-portal-register\r\n\r\n\r\n\r\n<!-- Auto Generated Below -->\
|
|
23894
|
+
const RegisterReadme = "# sqm-portal-register\r\n\r\n\r\n\r\n<!-- Auto Generated Below -->\n\n\n## Properties\n\n| Property | Attribute | Description | Type | Default |\n| -------------------------- | ---------------------------- | ----------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------- |\n| `confirmPassword` | `confirm-password` | | `boolean` | `false` |\n| `confirmPasswordLabel` | `confirm-password-label` | | `string` | `\"Confirm Password\"` |\n| `demoData` | -- | | `{ 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; }; }` | `undefined` |\n| `emailLabel` | `email-label` | | `string` | `\"Email\"` |\n| `enablePasswordValidation` | `enable-password-validation` | | `boolean` | `true` |\n| `hideInputs` | `hide-inputs` | | `boolean` | `false` |\n| `loginLabel` | `login-label` | | `string` | `\"Sign in\"` |\n| `nextPage` | `next-page` | | `string` | `\"/\"` |\n| `pageLabel` | `page-label` | | `string` | `\"Register\"` |\n| `passwordLabel` | `password-label` | | `string` | `\"Password\"` |\n| `submitLabel` | `submit-label` | | `string` | `\"Register\"` |\n\n\n## Dependencies\n\n### Used by\n\n - [sqm-stencilbook](../sqm-stencilbook)\n\n### Depends on\n\n- [sqm-form-message](../sqm-form-message)\n- [sqm-password-field](../sqm-password-field)\n\n### Graph\n```mermaid\ngraph TD;\n sqm-portal-register --> sqm-form-message\n sqm-portal-register --> sqm-password-field\n sqm-stencilbook --> sqm-portal-register\n style sqm-portal-register fill:#f9f,stroke:#333,stroke-width:4px\n```\n\n----------------------------------------------\n\n*Built with [StencilJS](https://stenciljs.com/)*\n";
|
|
22866
23895
|
|
|
22867
23896
|
const EditProfileReadme = "# sqm-portal-profile\r\n\r\n\r\n\r\n<!-- Auto Generated Below -->\r\n\r\n\r\n## Properties\r\n\r\n| Property | Attribute | Description | Type | Default |\r\n| ------------------------ | --------------------------- | ----------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------ |\r\n| `countrytext` | `countrytext` | | `string` | `\"Country\"` |\r\n| `demoData` | -- | | `{ states?: { success: boolean; loading: boolean; submitDisabled: boolean; showCountry: boolean; formState: { country: string; firstName: string; lastName: string; errors: any; error: string; }; user: { id: string; accountId: string; firstName: string; lastName: string; email: string; countryCode: string; }; text: { firstnametext: string; lastnametext: string; emailtext: string; countrytext: string; editProfileHeader: string; editProfileSubHeader: string; submitChangeButtonText: string; }; }; }` | `undefined` |\r\n| `editProfileHeader` | `edit-profile-header` | | `string` | `\"Edit your profile\"` |\r\n| `editProfileSubHeader` | `edit-profile-sub-header` | | `string` | `\"Personal Information\"` |\r\n| `emailtext` | `emailtext` | | `string` | `\"Email\"` |\r\n| `firstnametext` | `firstnametext` | | `string` | `\"First Name\"` |\r\n| `lastnametext` | `lastnametext` | | `string` | `\"Last Name\"` |\r\n| `showCountry` | `show-country` | | `boolean` | `true` |\r\n| `submitChangeButtonText` | `submit-change-button-text` | | `string` | `\"Submit Changes\"` |\r\n\r\n\r\n## Dependencies\r\n\r\n### Depends on\r\n\r\n- [sqm-form-message](../sqm-form-message)\r\n\r\n### Graph\r\n```mermaid\r\ngraph TD;\r\n sqm-portal-profile --> sqm-form-message\r\n style sqm-portal-profile fill:#f9f,stroke:#333,stroke-width:4px\r\n```\r\n\r\n----------------------------------------------\r\n\r\n*Built with [StencilJS](https://stenciljs.com/)*\r\n";
|
|
22868
23897
|
|
|
@@ -22870,7 +23899,7 @@ const ResetPasswordReadme = "# sqm-portal-reset-password\r\n\r\n\r\n\r\n<!-- Aut
|
|
|
22870
23899
|
|
|
22871
23900
|
const EmailVerificationReadme = "# sqm-portal-email-verification\r\n\r\n\r\n\r\n<!-- Auto Generated Below -->\r\n\r\n\r\n## Properties\r\n\r\n| Property | Attribute | Description | Type | Default |\r\n| ------------------------- | --------------------------- | ----------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- |\r\n| `demoData` | -- | | `{ states?: { error: string; loading: boolean; success: boolean; }; content?: { email: string; verifyMessage: string; emailVerificationHeader: string; resendEmailButtonText: string; }; }` | `undefined` |\r\n| `emailVerificationHeader` | `email-verification-header` | | `string` | `\"Verify your email\"` |\r\n| `resendEmailButtonText` | `resend-email-button-text` | | `string` | `\"Re-send Email\"` |\r\n| `verifyMessage` | `verify-message` | | `string` | `\"A verification email was sent to {email}. Please verify your email to continue to the portal.\"` |\r\n\r\n\r\n## Dependencies\r\n\r\n### Depends on\r\n\r\n- [sqm-form-message](../sqm-form-message)\r\n\r\n### Graph\r\n```mermaid\r\ngraph TD;\r\n sqm-portal-email-verification --> sqm-form-message\r\n style sqm-portal-email-verification fill:#f9f,stroke:#333,stroke-width:4px\r\n```\r\n\r\n----------------------------------------------\r\n\r\n*Built with [StencilJS](https://stenciljs.com/)*\r\n";
|
|
22872
23901
|
|
|
22873
|
-
const EmailVerifiedReadme = "# sqm-portal-verify-email\r\n\r\n\r\n\r\n<!-- Auto Generated Below -->\n\n\n## Properties\n\n| Property | Attribute | Description | Type | Default |\n| ---------- | ----------- | ----------- | ---------------------------------------------------------------------------------------------------- | ----------- |\n| `demoData` | -- | | `{ states?: { error: string; loading: boolean; verified: boolean; }; data?: { oobCode: string; }; }` | `undefined` |\n| `nextPage` | `next-page` | | `string` | `\"/\"` |\n\n\n## Dependencies\n\n### Depends on\n\n- [sqm-form-message](../sqm-form-message)\n\n### Graph\n```mermaid\ngraph TD;\n sqm-portal-verify-email --> sqm-form-message\n style sqm-portal-verify-email fill:#f9f,stroke:#333,stroke-width:4px\n```\n\n----------------------------------------------\n\n*Built with [StencilJS](https://stenciljs.com/)*\n";
|
|
23902
|
+
const EmailVerifiedReadme = "# sqm-portal-verify-email\r\n\r\n\r\n\r\n<!-- Auto Generated Below -->\r\n\r\n\r\n## Properties\r\n\r\n| Property | Attribute | Description | Type | Default |\r\n| ---------- | ----------- | ----------- | ---------------------------------------------------------------------------------------------------- | ----------- |\r\n| `demoData` | -- | | `{ states?: { error: string; loading: boolean; verified: boolean; }; data?: { oobCode: string; }; }` | `undefined` |\r\n| `nextPage` | `next-page` | | `string` | `\"/\"` |\r\n\r\n\r\n## Dependencies\r\n\r\n### Depends on\r\n\r\n- [sqm-form-message](../sqm-form-message)\r\n\r\n### Graph\r\n```mermaid\r\ngraph TD;\r\n sqm-portal-verify-email --> sqm-form-message\r\n style sqm-portal-verify-email fill:#f9f,stroke:#333,stroke-width:4px\r\n```\r\n\r\n----------------------------------------------\r\n\r\n*Built with [StencilJS](https://stenciljs.com/)*\r\n";
|
|
22874
23903
|
|
|
22875
23904
|
const PortalTemplates_stories = {
|
|
22876
23905
|
title: "Templates / Portal",
|
|
@@ -25998,6 +27027,7 @@ const stories = [
|
|
|
25998
27027
|
ReferralTableRewardsCell$1,
|
|
25999
27028
|
UserName,
|
|
26000
27029
|
PasswordField,
|
|
27030
|
+
TaskCard,
|
|
26001
27031
|
PortalTemplates,
|
|
26002
27032
|
ProgramMenu$1,
|
|
26003
27033
|
PoweredByImg,
|
|
@@ -26005,6 +27035,7 @@ const stories = [
|
|
|
26005
27035
|
Hero,
|
|
26006
27036
|
ReferralIframe$1,
|
|
26007
27037
|
NameFields$1,
|
|
27038
|
+
UseRewardExchangeList,
|
|
26008
27039
|
];
|
|
26009
27040
|
const StencilStorybook = class {
|
|
26010
27041
|
constructor(hostRef) {
|
|
@@ -26169,4 +27200,4 @@ function useUserNameDemo(props) {
|
|
|
26169
27200
|
}, props.demoData || {}, { arrayMerge: (_, a) => a });
|
|
26170
27201
|
}
|
|
26171
27202
|
|
|
26172
|
-
export { DividedLayout as sqm_divided_layout, EditProfile as sqm_edit_profile, FormMessage as sqm_form_message, SqmHookStoryContainer as sqm_hook_story_container, NavigationMenu as sqm_navigation_menu, PortalPasswordField as sqm_password_field, PortalChangePassword as sqm_portal_change_password, PortalFrame as sqm_portal_frame, PortalLogin as sqm_portal_login, PortalRegister as sqm_portal_register, ProgramMenu as sqm_program_menu, SqmReferralIframe as sqm_referral_iframe, ReferralTable as sqm_referral_table, ReferralTableCell as sqm_referral_table_cell, ReferralTableDateCell as sqm_referral_table_date_cell, ReferralTableRewardsCell as sqm_referral_table_rewards_cell, ReferralTableStatusCell as sqm_referral_table_status_cell, ReferralTableUserCell as sqm_referral_table_user_cell, SqmRouter as sqm_router, ShareButton as sqm_share_button, ShareLink as sqm_share_link, StencilStorybook as sqm_stencilbook, TableCell$1 as sqm_table_cell, TableRow as sqm_table_row, Text as sqm_text, UserName$1 as sqm_user_name };
|
|
27203
|
+
export { DividedLayout as sqm_divided_layout, EditProfile as sqm_edit_profile, FormMessage as sqm_form_message, SqmHookStoryContainer as sqm_hook_story_container, NavigationMenu as sqm_navigation_menu, PortalPasswordField as sqm_password_field, PortalChangePassword as sqm_portal_change_password, PortalFrame as sqm_portal_frame, PortalLogin as sqm_portal_login, PortalRegister as sqm_portal_register, ProgramMenu as sqm_program_menu, SqmReferralIframe as sqm_referral_iframe, ReferralTable as sqm_referral_table, ReferralTableCell as sqm_referral_table_cell, ReferralTableDateCell as sqm_referral_table_date_cell, ReferralTableRewardsCell as sqm_referral_table_rewards_cell, ReferralTableStatusCell as sqm_referral_table_status_cell, ReferralTableUserCell as sqm_referral_table_user_cell, SqmRewardExchangeList as sqm_reward_exchange_list, SqmRouter as sqm_router, ShareButton as sqm_share_button, ShareLink as sqm_share_link, StencilStorybook as sqm_stencilbook, TableCell$1 as sqm_table_cell, TableRow as sqm_table_row, Text as sqm_text, UserName$1 as sqm_user_name };
|