@saasquatch/mint-components 1.3.1-4 → 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-616d23ff.js → ShadowViewAddon-75c18b96.js} +1 -1
- package/dist/cjs/{global-4a64e4d5.js → global-041b5338.js} +334 -176
- package/dist/cjs/{sqm-leaderboard-rank-view-e6aaad22.js → index-19309631.js} +3 -10
- package/dist/cjs/{index.module-3a261802.js → index.module-6a7bda18.js} +3 -2
- package/dist/cjs/loader.cjs.js +4 -3
- package/dist/cjs/mint-components.cjs.js +4 -3
- package/dist/cjs/{re-render-c2492742.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} +1094 -63
- 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-5455964e.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-790a4411.js → sqm-portal-email-verification-view-5e955797.js} +1 -1
- package/dist/cjs/sqm-portal-email-verification.cjs.entry.js +5 -4
- package/dist/cjs/{sqm-portal-footer-view-8b82e9df.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-11a0b201.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-7f38c988.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-share-link/useShareLink.js +1 -2
- 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-90bddd7a.js → ShadowViewAddon-fff5d35d.js} +1 -1
- package/dist/esm/{global-2af7c34c.js → global-5ecbf81a.js} +281 -123
- package/dist/esm/{sqm-leaderboard-rank-view-8aacf3aa.js → index-2f5dd0a1.js} +3 -9
- package/dist/esm/{index.module-96d22fa3.js → index.module-f80561db.js} +2 -2
- package/dist/esm/loader.js +4 -3
- package/dist/esm/mint-components.js +4 -3
- package/dist/esm/{re-render-712044e1.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} +1090 -60
- 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-84d77c9b.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-34bef778.js → sqm-portal-email-verification-view-90781be2.js} +1 -1
- package/dist/esm/sqm-portal-email-verification.entry.js +5 -4
- package/dist/esm/{sqm-portal-footer-view-82345c97.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-4b9828d9.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-c03e4116.js → useDemoBigStat-b71fe122.js} +3 -2
- package/dist/esm-es5/{ShadowViewAddon-90bddd7a.js → ShadowViewAddon-fff5d35d.js} +1 -1
- package/dist/esm-es5/{global-2af7c34c.js → global-5ecbf81a.js} +2 -16
- package/dist/esm-es5/index-2f5dd0a1.js +1 -0
- package/dist/esm-es5/{index.module-96d22fa3.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-712044e1.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-84d77c9b.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-34bef778.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-82345c97.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-4b9828d9.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-c03e4116.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-22a96415.js → p-00190438.js} +1 -1
- package/dist/mint-components/{p-dbb59971.system.entry.js → p-04516274.system.entry.js} +1 -1
- package/dist/mint-components/{p-28e86ebc.js → p-05cca77b.js} +1 -1
- package/dist/mint-components/{p-972267f0.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-b967445b.system.entry.js → p-16535642.system.entry.js} +1 -1
- package/dist/mint-components/{p-cc7ea657.entry.js → p-16da5146.entry.js} +1 -1
- package/dist/mint-components/{p-953259a7.system.js → p-1813b9b9.system.js} +1 -1
- package/dist/mint-components/p-189219ee.system.js +1 -0
- package/dist/mint-components/{p-c8981921.system.entry.js → p-1ac9c24b.system.entry.js} +1 -1
- package/dist/mint-components/{p-d842d3c2.system.entry.js → p-1b414d8f.system.entry.js} +1 -1
- package/dist/mint-components/{p-a4bd59d4.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-1604e504.system.entry.js → p-2a025d2a.system.entry.js} +1 -1
- package/dist/mint-components/p-2ae9c535.js +1 -0
- package/dist/mint-components/{p-ba489b88.js → p-2bce988c.js} +1 -1
- package/dist/mint-components/{p-b5afca53.entry.js → p-2f171597.entry.js} +1 -1
- package/dist/mint-components/{p-12d2582e.system.js → p-3052c913.system.js} +1 -1
- package/dist/mint-components/{p-4a627ee3.entry.js → p-337b49ee.entry.js} +1 -1
- package/dist/mint-components/{p-af506742.system.js → p-3b0acfcd.system.js} +1 -1
- package/dist/mint-components/{p-559cc6a6.system.entry.js → p-3fd33dee.system.entry.js} +1 -1
- package/dist/mint-components/{p-bb817d4a.js → p-405a9253.js} +2 -2
- package/dist/mint-components/{p-0ce359a5.js → p-434ee9c1.js} +1 -1
- package/dist/mint-components/p-4ba2faf2.system.entry.js +1 -0
- package/dist/mint-components/{p-955981cd.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-9048f7eb.system.entry.js → p-57a53dbd.system.entry.js} +1 -1
- package/dist/mint-components/p-58d9b2f0.js +15 -0
- package/dist/mint-components/{p-14880676.system.entry.js → p-5dfc6804.system.entry.js} +1 -1
- package/dist/mint-components/{p-597a8eaa.entry.js → p-5f28af29.entry.js} +1 -1
- package/dist/mint-components/{p-5ca0f272.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-af702398.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-48efaf7e.system.js → p-82ab88fe.system.js} +1 -1
- package/dist/mint-components/{p-a8680516.entry.js → p-82d7a2ba.entry.js} +1 -1
- package/dist/mint-components/{p-c12b5dee.entry.js → p-844f9bad.entry.js} +1 -1
- package/dist/mint-components/{p-c5d4bbbd.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-aeb65d2b.js → p-8e37c08d.js} +1 -1
- package/dist/mint-components/p-91d39961.system.js +1 -0
- package/dist/mint-components/{p-bc84734e.system.entry.js → p-a0045707.system.entry.js} +1 -1
- package/dist/mint-components/{p-29c57faa.system.js → p-a0cfd3d9.system.js} +1 -1
- package/dist/mint-components/{p-2f23e292.entry.js → p-a4a00461.entry.js} +1 -1
- package/dist/mint-components/{p-bc3ec47d.entry.js → p-a7f0b2f6.entry.js} +1 -1
- package/dist/mint-components/{p-e3b307a9.entry.js → p-aba21f90.entry.js} +1 -1
- package/dist/mint-components/{p-263da1a3.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-c9c4f31b.system.entry.js +1 -0
- package/dist/mint-components/{p-4d97e5d3.js → p-cc3510c8.js} +1 -1
- package/dist/mint-components/{p-d3522156.system.js → p-ceeaf074.system.js} +21 -35
- package/dist/mint-components/p-d0913f8d.system.js +1 -0
- package/dist/mint-components/{p-497beffc.entry.js → p-d3787c3a.entry.js} +1 -1
- package/dist/mint-components/{p-2a3e5c1f.entry.js → p-d9cc041f.entry.js} +1 -1
- package/dist/mint-components/p-db723323.system.entry.js +1 -0
- 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-f40db771.system.entry.js → p-e475a5ff.system.entry.js} +1 -1
- package/dist/mint-components/{p-d3937919.entry.js → p-e9ab90a1.entry.js} +1 -1
- package/dist/mint-components/p-ecbabf6e.system.js +1 -0
- package/dist/mint-components/{p-6b508611.js → p-f1e1086e.js} +2 -17
- package/dist/mint-components/p-f41ab9e1.system.js +1 -0
- package/dist/mint-components/{p-3aedd556.system.js → p-f87d8f53.system.js} +1 -1
- package/dist/mint-components/p-fcaa5886.system.entry.js +1 -0
- 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 +2 -2
- package/dist/esm-es5/sqm-divided-layout_26.entry.js +0 -1
- package/dist/esm-es5/sqm-leaderboard-rank-view-8aacf3aa.js +0 -1
- package/dist/mint-components/p-094e2a37.entry.js +0 -13
- package/dist/mint-components/p-0955e6cb.system.entry.js +0 -1
- package/dist/mint-components/p-0ad19e35.system.entry.js +0 -1
- package/dist/mint-components/p-18b2407c.system.entry.js +0 -1
- package/dist/mint-components/p-5555ba99.system.js +0 -1
- package/dist/mint-components/p-5753e72a.entry.js +0 -1
- package/dist/mint-components/p-600a7424.entry.js +0 -1
- package/dist/mint-components/p-728cdabb.entry.js +0 -1
- package/dist/mint-components/p-7ea1d7d6.entry.js +0 -9
- package/dist/mint-components/p-893a12d1.system.entry.js +0 -1
- package/dist/mint-components/p-9c7dfd92.system.entry.js +0 -1
- package/dist/mint-components/p-aeaebccb.entry.js +0 -230
- package/dist/mint-components/p-b32a1703.entry.js +0 -1
- package/dist/mint-components/p-b431ce31.entry.js +0 -1
- package/dist/mint-components/p-b86921f5.entry.js +0 -1
- package/dist/mint-components/p-b966c6fc.system.entry.js +0 -1
- package/dist/mint-components/p-d2f2c1b9.system.entry.js +0 -1
- package/dist/mint-components/p-d9d9954c.js +0 -1
- package/dist/mint-components/p-da26f022.system.js +0 -1
- package/dist/mint-components/p-e13bff75.system.entry.js +0 -1
- package/dist/mint-components/p-e171513a.entry.js +0 -1
- package/dist/mint-components/p-e87a5773.system.js +0 -1
- package/dist/mint-components/p-e9d4fbb9.system.entry.js +0 -1
- package/dist/types/global/android.d.ts +0 -7
- package/dist/types/global/demo.d.ts +0 -1
- package/dist/types/stories/UserName.stories.d.ts +0 -6
- package/dist/types/stories/features.d.ts +0 -4
- package/dist/types/stories/templates.d.ts +0 -4
|
@@ -4,10 +4,11 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
const index = require('./index-b0129cd6.js');
|
|
6
6
|
const _extends = require('./extends-0302d27d.js');
|
|
7
|
-
const global = require('./global-
|
|
7
|
+
const global = require('./global-041b5338.js');
|
|
8
8
|
const useCallback = require('./use-callback-fadb2643.js');
|
|
9
|
-
const index_module = require('./index.module-
|
|
9
|
+
const index_module = require('./index.module-6a7bda18.js');
|
|
10
10
|
const jsonpointer = require('./jsonpointer-11327262.js');
|
|
11
|
+
require('./tslib.es6-0e81fab1.js');
|
|
11
12
|
const jssPresetDefault_esm = require('./jss-preset-default.esm-6304d24f.js');
|
|
12
13
|
const utils = require('./utils-95e5317c.js');
|
|
13
14
|
const cjs = require('./cjs-1066ec21.js');
|
|
@@ -15,21 +16,24 @@ const mixins = require('./mixins-7b7c59fe.js');
|
|
|
15
16
|
const sqmPortalContainerView = require('./sqm-portal-container-view-d144735a.js');
|
|
16
17
|
const sqmPortalSectionView = require('./sqm-portal-section-view-3b008930.js');
|
|
17
18
|
const sqmTextSpanView = require('./sqm-text-span-view-b5ae787b.js');
|
|
18
|
-
const
|
|
19
|
-
const reRender = require('./re-render-
|
|
20
|
-
const
|
|
19
|
+
const index$1 = require('./index-19309631.js');
|
|
20
|
+
const reRender = require('./re-render-7cdb2d81.js');
|
|
21
|
+
const useChildElements = require('./useChildElements-428ca5b8.js');
|
|
22
|
+
const useDemoBigStat = require('./useDemoBigStat-17e61803.js');
|
|
21
23
|
const sqmShareLinkView = require('./sqm-share-link-view-a935d07e.js');
|
|
22
|
-
const ShadowViewAddon = require('./ShadowViewAddon-
|
|
24
|
+
const ShadowViewAddon = require('./ShadowViewAddon-75c18b96.js');
|
|
25
|
+
const sqmLeaderboardRankView = require('./sqm-leaderboard-rank-view-35015d30.js');
|
|
23
26
|
const sqmNavigationSidebarView = require('./sqm-navigation-sidebar-view-d06e1885.js');
|
|
24
|
-
const sqmNavigationSidebarItemView = require('./sqm-navigation-sidebar-item-view-
|
|
27
|
+
const sqmNavigationSidebarItemView = require('./sqm-navigation-sidebar-item-view-e99b4a10.js');
|
|
25
28
|
const sqmStatContainerView = require('./sqm-stat-container-view-ee7b00ff.js');
|
|
26
|
-
const sqmPortalProfileView = require('./sqm-portal-profile-view-
|
|
29
|
+
const sqmPortalProfileView = require('./sqm-portal-profile-view-a23ea292.js');
|
|
27
30
|
const sqmPortalForgotPasswordView = require('./sqm-portal-forgot-password-view-1704d285.js');
|
|
28
|
-
const sqmPortalEmailVerificationView = require('./sqm-portal-email-verification-view-
|
|
31
|
+
const sqmPortalEmailVerificationView = require('./sqm-portal-email-verification-view-5e955797.js');
|
|
29
32
|
const sqmPortalResetPasswordView = require('./sqm-portal-reset-password-view-4d78fd6d.js');
|
|
30
33
|
const sqmPortalVerifyEmailView = require('./sqm-portal-verify-email-view-b595e302.js');
|
|
31
34
|
const sqmAssetCardView = require('./sqm-asset-card-view-07f86880.js');
|
|
32
|
-
const
|
|
35
|
+
const sqmTaskCardView = require('./sqm-task-card-view-cb11e56f.js');
|
|
36
|
+
const sqmPortalFooterView = require('./sqm-portal-footer-view-9089feb7.js');
|
|
33
37
|
const sqmHeroView = require('./sqm-hero-view-bb3d00a1.js');
|
|
34
38
|
const sqmNameFieldsView = require('./sqm-name-fields-view-24614ac7.js');
|
|
35
39
|
|
|
@@ -5876,22 +5880,7 @@ function ReferralTableView(props) {
|
|
|
5876
5880
|
index.h("sl-button", { size: "small", loading: states.loading, disabled: !states.hasNext, onClick: callbacks.nextPage, exportparts: "base: defaultbutton-base" }, data.textOverrides.moreLabel))));
|
|
5877
5881
|
}
|
|
5878
5882
|
|
|
5879
|
-
|
|
5880
|
-
const host = index_module.P();
|
|
5881
|
-
const initialState = host.children.length ? Array.from(host.children) : [];
|
|
5882
|
-
const [childElements, setChildElements] = _extends.useState(initialState);
|
|
5883
|
-
_extends.useEffect(() => {
|
|
5884
|
-
const observer = new MutationObserver(() => {
|
|
5885
|
-
const children = Array.from(host.children);
|
|
5886
|
-
setChildElements([...children]);
|
|
5887
|
-
});
|
|
5888
|
-
observer.observe(host, { childList: true });
|
|
5889
|
-
return () => observer.disconnect();
|
|
5890
|
-
}, [host]);
|
|
5891
|
-
return childElements;
|
|
5892
|
-
}
|
|
5893
|
-
|
|
5894
|
-
const GET_REFERRER_DATA = sqmLeaderboardRankView.gql `
|
|
5883
|
+
const GET_REFERRER_DATA = index$1.gql `
|
|
5895
5884
|
query getReferrals($programId: ID, $rewardFilter: RewardFilterInput) {
|
|
5896
5885
|
viewer {
|
|
5897
5886
|
... on User {
|
|
@@ -5938,7 +5927,7 @@ const GET_REFERRER_DATA = sqmLeaderboardRankView.gql `
|
|
|
5938
5927
|
}
|
|
5939
5928
|
}
|
|
5940
5929
|
`;
|
|
5941
|
-
const GET_REFERRAL_DATA =
|
|
5930
|
+
const GET_REFERRAL_DATA = index$1.gql `
|
|
5942
5931
|
query getReferrals(
|
|
5943
5932
|
$limit: Int!
|
|
5944
5933
|
$offset: Int!
|
|
@@ -6102,7 +6091,7 @@ function useReferralTable(props, emptyElement, loadingElement) {
|
|
|
6102
6091
|
}, [props.showReferrer]);
|
|
6103
6092
|
const tick = reRender.useRerenderListener();
|
|
6104
6093
|
const data = referralData === null || referralData === void 0 ? void 0 : referralData.data;
|
|
6105
|
-
const components = useChildElements();
|
|
6094
|
+
const components = useChildElements.useChildElements();
|
|
6106
6095
|
async function getComponentData(components) {
|
|
6107
6096
|
// filter out loading and empty states from columns array
|
|
6108
6097
|
const columnComponents = components.filter((component) => component.slot !== "loading" && component.slot !== "empty");
|
|
@@ -14749,6 +14738,542 @@ const ReferralTableUserCell = class {
|
|
|
14749
14738
|
}
|
|
14750
14739
|
};
|
|
14751
14740
|
|
|
14741
|
+
const GET_EXCHANGE_LIST = index_module.dist.gql `
|
|
14742
|
+
query getExchangeList {
|
|
14743
|
+
viewer {
|
|
14744
|
+
... on User {
|
|
14745
|
+
visibleRewardExchangeItems(limit: 20, offset: 0) {
|
|
14746
|
+
data {
|
|
14747
|
+
key
|
|
14748
|
+
name
|
|
14749
|
+
description
|
|
14750
|
+
imageUrl
|
|
14751
|
+
available
|
|
14752
|
+
unavailableReason
|
|
14753
|
+
unavailableReasonCode
|
|
14754
|
+
ruleType
|
|
14755
|
+
sourceUnit
|
|
14756
|
+
sourceValue
|
|
14757
|
+
prettySourceValue
|
|
14758
|
+
sourceMinValue
|
|
14759
|
+
prettySourceMinValue
|
|
14760
|
+
sourceMaxValue
|
|
14761
|
+
prettySourceMaxValue
|
|
14762
|
+
destinationMinValue
|
|
14763
|
+
prettyDestinationMinValue
|
|
14764
|
+
destinationMaxValue
|
|
14765
|
+
prettyDestinationMaxValue
|
|
14766
|
+
globalRewardKey
|
|
14767
|
+
destinationUnit
|
|
14768
|
+
steps {
|
|
14769
|
+
sourceValue
|
|
14770
|
+
prettySourceValue
|
|
14771
|
+
destinationValue
|
|
14772
|
+
prettyDestinationValue
|
|
14773
|
+
}
|
|
14774
|
+
}
|
|
14775
|
+
totalCount
|
|
14776
|
+
}
|
|
14777
|
+
}
|
|
14778
|
+
}
|
|
14779
|
+
}
|
|
14780
|
+
`;
|
|
14781
|
+
const EXCHANGE = index_module.dist.gql `
|
|
14782
|
+
mutation exchange($exchangeRewardInput: ExchangeRewardInput!) {
|
|
14783
|
+
exchangeReward(exchangeRewardInput: $exchangeRewardInput) {
|
|
14784
|
+
reward {
|
|
14785
|
+
id
|
|
14786
|
+
fuelTankCode
|
|
14787
|
+
}
|
|
14788
|
+
}
|
|
14789
|
+
}
|
|
14790
|
+
`;
|
|
14791
|
+
function useRewardExchangeList(_) {
|
|
14792
|
+
var _a, _b, _c, _d;
|
|
14793
|
+
const drawerRef = _extends.useRef();
|
|
14794
|
+
const [exchangeState, setExchangeState] = _extends.useReducer((state, next) => ({
|
|
14795
|
+
...state,
|
|
14796
|
+
...next,
|
|
14797
|
+
}), {
|
|
14798
|
+
selectedItem: undefined,
|
|
14799
|
+
selectedStep: undefined,
|
|
14800
|
+
redeemStage: "",
|
|
14801
|
+
amount: 0,
|
|
14802
|
+
exchangeError: false,
|
|
14803
|
+
});
|
|
14804
|
+
const { selectedItem, selectedStep, redeemStage, amount, exchangeError } = exchangeState;
|
|
14805
|
+
const user = index_module.T();
|
|
14806
|
+
const [exchange, { data: exchangeResponse, errors }] = index_module.be(EXCHANGE);
|
|
14807
|
+
const { data } = index_module.en(GET_EXCHANGE_LIST, !(user === null || user === void 0 ? void 0 : user.jwt));
|
|
14808
|
+
_extends.useEffect(() => {
|
|
14809
|
+
var _a, _b;
|
|
14810
|
+
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) {
|
|
14811
|
+
setExchangeState({ redeemStage: "success" });
|
|
14812
|
+
}
|
|
14813
|
+
if (!!errors) {
|
|
14814
|
+
console.log("YEA");
|
|
14815
|
+
setExchangeState({ exchangeError: true });
|
|
14816
|
+
}
|
|
14817
|
+
}, [exchangeResponse, errors]);
|
|
14818
|
+
function openDrawer() {
|
|
14819
|
+
var _a;
|
|
14820
|
+
setExchangeState({ redeemStage: "chooseReward" });
|
|
14821
|
+
(_a = drawerRef.current) === null || _a === void 0 ? void 0 : _a.show();
|
|
14822
|
+
}
|
|
14823
|
+
function exchangeReward() {
|
|
14824
|
+
if (!selectedItem)
|
|
14825
|
+
return;
|
|
14826
|
+
let exchangeVariables = {
|
|
14827
|
+
accountId: user === null || user === void 0 ? void 0 : user.accountId,
|
|
14828
|
+
userId: user.id,
|
|
14829
|
+
};
|
|
14830
|
+
switch (selectedItem.ruleType) {
|
|
14831
|
+
case "FIXED_GLOBAL_REWARD":
|
|
14832
|
+
exchangeVariables = {
|
|
14833
|
+
...exchangeVariables,
|
|
14834
|
+
redeemCreditInput: {
|
|
14835
|
+
amount: selectedItem.sourceValue,
|
|
14836
|
+
unit: selectedItem.sourceUnit,
|
|
14837
|
+
},
|
|
14838
|
+
globalRewardKey: selectedItem.globalRewardKey,
|
|
14839
|
+
};
|
|
14840
|
+
break;
|
|
14841
|
+
case "VARIABLE_GLOBAL_REWARD":
|
|
14842
|
+
exchangeVariables = {
|
|
14843
|
+
...exchangeVariables,
|
|
14844
|
+
redeemCreditInput: {
|
|
14845
|
+
amount: amount,
|
|
14846
|
+
unit: selectedItem.sourceUnit,
|
|
14847
|
+
},
|
|
14848
|
+
globalRewardKey: selectedItem.globalRewardKey,
|
|
14849
|
+
rewardInput: {
|
|
14850
|
+
valueInCents: selectedStep.destinationValue,
|
|
14851
|
+
},
|
|
14852
|
+
};
|
|
14853
|
+
break;
|
|
14854
|
+
case "VARIABLE_CREDIT_REWARD":
|
|
14855
|
+
exchangeVariables = {
|
|
14856
|
+
...exchangeVariables,
|
|
14857
|
+
redeemCreditInput: {
|
|
14858
|
+
amount: amount,
|
|
14859
|
+
unit: selectedItem.sourceUnit,
|
|
14860
|
+
},
|
|
14861
|
+
rewardInput: {
|
|
14862
|
+
type: "CREDIT",
|
|
14863
|
+
unit: selectedItem.destinationUnit,
|
|
14864
|
+
assignedCredit: selectedStep.destinationValue,
|
|
14865
|
+
},
|
|
14866
|
+
};
|
|
14867
|
+
break;
|
|
14868
|
+
default:
|
|
14869
|
+
exchangeVariables = {
|
|
14870
|
+
...exchangeVariables,
|
|
14871
|
+
redeemCreditInput: {
|
|
14872
|
+
amount: selectedItem.sourceValue,
|
|
14873
|
+
unit: selectedItem.sourceUnit,
|
|
14874
|
+
},
|
|
14875
|
+
globalRewardKey: selectedItem.globalRewardKey,
|
|
14876
|
+
};
|
|
14877
|
+
}
|
|
14878
|
+
console.log(exchangeVariables);
|
|
14879
|
+
exchange({ exchangeRewardInput: exchangeVariables });
|
|
14880
|
+
}
|
|
14881
|
+
const resetState = useCallback.useCallback((e) => {
|
|
14882
|
+
var _a, _b;
|
|
14883
|
+
// selects also trigger an sl-hide event :(
|
|
14884
|
+
//@ts-ignore - componentId is not private here
|
|
14885
|
+
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))
|
|
14886
|
+
return;
|
|
14887
|
+
setExchangeState({
|
|
14888
|
+
amount: 0,
|
|
14889
|
+
selectedStep: undefined,
|
|
14890
|
+
selectedItem: undefined,
|
|
14891
|
+
exchangeError: false,
|
|
14892
|
+
});
|
|
14893
|
+
}, []);
|
|
14894
|
+
_extends.useEffect(() => {
|
|
14895
|
+
if (!(drawerRef === null || drawerRef === void 0 ? void 0 : drawerRef.current))
|
|
14896
|
+
return;
|
|
14897
|
+
const drawer = drawerRef.current;
|
|
14898
|
+
// Clear input value when drawer is closed
|
|
14899
|
+
drawer.addEventListener("sl-hide", resetState);
|
|
14900
|
+
return () => {
|
|
14901
|
+
drawer.removeEventListener("sl-hide", resetState);
|
|
14902
|
+
};
|
|
14903
|
+
}, [drawerRef.current]);
|
|
14904
|
+
function setStage(stage) {
|
|
14905
|
+
setExchangeState({ redeemStage: stage });
|
|
14906
|
+
}
|
|
14907
|
+
console.log(exchangeResponse, exchangeResponse === null || exchangeResponse === void 0 ? void 0 : exchangeResponse.data, errors);
|
|
14908
|
+
return {
|
|
14909
|
+
states: {
|
|
14910
|
+
selectedItem,
|
|
14911
|
+
redeemStage,
|
|
14912
|
+
amount,
|
|
14913
|
+
selectedStep,
|
|
14914
|
+
exchangeError,
|
|
14915
|
+
},
|
|
14916
|
+
data: {
|
|
14917
|
+
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,
|
|
14918
|
+
//@ts-ignore
|
|
14919
|
+
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,
|
|
14920
|
+
},
|
|
14921
|
+
callbacks: {
|
|
14922
|
+
exchangeReward,
|
|
14923
|
+
openDrawer,
|
|
14924
|
+
setExchangeState,
|
|
14925
|
+
setStage,
|
|
14926
|
+
},
|
|
14927
|
+
refs: {
|
|
14928
|
+
drawerRef,
|
|
14929
|
+
},
|
|
14930
|
+
};
|
|
14931
|
+
}
|
|
14932
|
+
|
|
14933
|
+
function Dot({ active, completed, incomplete, }) {
|
|
14934
|
+
return (index.h("div", { style: {
|
|
14935
|
+
flex: "0 0 0",
|
|
14936
|
+
content: "''",
|
|
14937
|
+
height: "4px",
|
|
14938
|
+
borderRadius: "4px",
|
|
14939
|
+
background: incomplete ? "#E5E5E5" : "#9E9E9E",
|
|
14940
|
+
position: "relative",
|
|
14941
|
+
bottom: "0",
|
|
14942
|
+
left: "0",
|
|
14943
|
+
display: "flex",
|
|
14944
|
+
justifyContent: "center",
|
|
14945
|
+
columnGap: "50px",
|
|
14946
|
+
marginRight: "-2px",
|
|
14947
|
+
} },
|
|
14948
|
+
index.h("div", { style: {
|
|
14949
|
+
backgroundColor: completed ? "#9E9E9E" : "#FFF",
|
|
14950
|
+
border: active
|
|
14951
|
+
? "2px solid #9E9E9E"
|
|
14952
|
+
: incomplete
|
|
14953
|
+
? "2px solid #E5E5E5"
|
|
14954
|
+
: "none",
|
|
14955
|
+
borderRadius: "50%",
|
|
14956
|
+
width: completed ? "12px" : "8px",
|
|
14957
|
+
height: completed ? "12px" : "8px",
|
|
14958
|
+
margin: "-4px auto 0px",
|
|
14959
|
+
zIndex: "1",
|
|
14960
|
+
} })));
|
|
14961
|
+
}
|
|
14962
|
+
function Progress({ active, completed, incomplete }) {
|
|
14963
|
+
return [
|
|
14964
|
+
index.h("div", { style: {
|
|
14965
|
+
content: "''",
|
|
14966
|
+
flex: "0.5 0.5 0",
|
|
14967
|
+
height: "4px",
|
|
14968
|
+
borderRadius: "4px",
|
|
14969
|
+
background: incomplete ? "#E5E5E5" : "#9E9E9E",
|
|
14970
|
+
position: "relative",
|
|
14971
|
+
bottom: "0",
|
|
14972
|
+
left: "0",
|
|
14973
|
+
display: "flex",
|
|
14974
|
+
justifyContent: "center",
|
|
14975
|
+
columnGap: "50px",
|
|
14976
|
+
marginRight: "-2px",
|
|
14977
|
+
} }),
|
|
14978
|
+
index.h(Dot, { active: active, completed: completed, incomplete: incomplete }),
|
|
14979
|
+
index.h("div", { style: {
|
|
14980
|
+
content: "''",
|
|
14981
|
+
flex: "0.5 0.5 0",
|
|
14982
|
+
height: "4px",
|
|
14983
|
+
borderRadius: "4px",
|
|
14984
|
+
background: incomplete || active ? "#E5E5E5" : "#9E9E9E",
|
|
14985
|
+
position: "relative",
|
|
14986
|
+
bottom: "0",
|
|
14987
|
+
left: "0",
|
|
14988
|
+
display: "flex",
|
|
14989
|
+
justifyContent: "center",
|
|
14990
|
+
columnGap: "50px",
|
|
14991
|
+
marginRight: "-2px",
|
|
14992
|
+
} }),
|
|
14993
|
+
];
|
|
14994
|
+
}
|
|
14995
|
+
function ProgressBar({ stage }) {
|
|
14996
|
+
console.log({ stage });
|
|
14997
|
+
return (index.h("div", { style: { display: "flex", columnGap: "-2px" } },
|
|
14998
|
+
index.h(Progress, { active: stage === 0, completed: stage > 0, incomplete: stage < 0 }),
|
|
14999
|
+
index.h(Progress, { active: stage === 1, completed: stage > 1, incomplete: stage < 1 }),
|
|
15000
|
+
index.h(Progress, { active: stage === 2, completed: stage > 2, incomplete: stage < 2 })));
|
|
15001
|
+
}
|
|
15002
|
+
|
|
15003
|
+
const stageList = ["chooseReward", "chooseAmount", "confirmation", "success"];
|
|
15004
|
+
const stageProgressList = {
|
|
15005
|
+
chooseReward: "Choose reward",
|
|
15006
|
+
chooseAmount: "Amount",
|
|
15007
|
+
confirmation: "Confirm",
|
|
15008
|
+
};
|
|
15009
|
+
function RewardExchangeView(props) {
|
|
15010
|
+
const style = {
|
|
15011
|
+
Container: {
|
|
15012
|
+
position: "relative",
|
|
15013
|
+
display: "flex",
|
|
15014
|
+
},
|
|
15015
|
+
CardContainer: {
|
|
15016
|
+
"&:hover": {
|
|
15017
|
+
boxShadow: "0 3px 10px #87ceeb6e!important",
|
|
15018
|
+
},
|
|
15019
|
+
},
|
|
15020
|
+
Base: {
|
|
15021
|
+
display: "block",
|
|
15022
|
+
cursor: "pointer",
|
|
15023
|
+
textAlign: "center",
|
|
15024
|
+
"&::part(base)": {
|
|
15025
|
+
width: "100%",
|
|
15026
|
+
height: "170px",
|
|
15027
|
+
display: "flex",
|
|
15028
|
+
justifyContent: "space-between",
|
|
15029
|
+
alignItems: "center",
|
|
15030
|
+
},
|
|
15031
|
+
"&::part(body)": {
|
|
15032
|
+
padding: "10px 0",
|
|
15033
|
+
},
|
|
15034
|
+
},
|
|
15035
|
+
Drawer: {
|
|
15036
|
+
"&::part(base)": {
|
|
15037
|
+
minWidth: "400px",
|
|
15038
|
+
width: "50%",
|
|
15039
|
+
margin: "0 auto",
|
|
15040
|
+
right: "0",
|
|
15041
|
+
},
|
|
15042
|
+
"&::part(panel)": {
|
|
15043
|
+
height: "85vh",
|
|
15044
|
+
},
|
|
15045
|
+
},
|
|
15046
|
+
FullImage: {
|
|
15047
|
+
objectFit: "contain",
|
|
15048
|
+
maxWidth: "100%",
|
|
15049
|
+
height: "100px",
|
|
15050
|
+
},
|
|
15051
|
+
PreviewImage: {
|
|
15052
|
+
objectFit: "contain",
|
|
15053
|
+
maxWidth: "100%",
|
|
15054
|
+
height: "75px",
|
|
15055
|
+
},
|
|
15056
|
+
InputBox: {
|
|
15057
|
+
width: "100%",
|
|
15058
|
+
marginBottom: "20px",
|
|
15059
|
+
},
|
|
15060
|
+
Select: {
|
|
15061
|
+
"&::part(base)": {
|
|
15062
|
+
flex: "0.75",
|
|
15063
|
+
},
|
|
15064
|
+
"&::part(menu)": {
|
|
15065
|
+
maxHeight: "40vh",
|
|
15066
|
+
},
|
|
15067
|
+
},
|
|
15068
|
+
Buttons: {
|
|
15069
|
+
bottom: "0",
|
|
15070
|
+
},
|
|
15071
|
+
Button: {
|
|
15072
|
+
margin: "10px 0",
|
|
15073
|
+
display: "block",
|
|
15074
|
+
textAlign: "center",
|
|
15075
|
+
cursor: "pointer",
|
|
15076
|
+
},
|
|
15077
|
+
};
|
|
15078
|
+
// JSS config
|
|
15079
|
+
jssPresetDefault_esm.jss.setup(jssPresetDefault_esm.create());
|
|
15080
|
+
const sheet = jssPresetDefault_esm.jss.createStyleSheet(style);
|
|
15081
|
+
const styleString = sheet.toString();
|
|
15082
|
+
const { states, data, callbacks, refs } = props;
|
|
15083
|
+
const { selectedItem, selectedStep } = states;
|
|
15084
|
+
function getInput() {
|
|
15085
|
+
var _a;
|
|
15086
|
+
const item = states.selectedItem;
|
|
15087
|
+
if (!item || (item === null || item === void 0 ? void 0 : item.ruleType) === "FIXED_GLOBAL_REWARD")
|
|
15088
|
+
return index.h("span", null);
|
|
15089
|
+
return (index.h("sl-select", { style: { width: "auto" }, label: "Select amount to receive", class: sheet.classes.Select, value: states.selectedStep, "onSl-select": (e) => {
|
|
15090
|
+
var _a, _b, _c, _d, _e;
|
|
15091
|
+
return callbacks.setExchangeState({
|
|
15092
|
+
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,
|
|
15093
|
+
selectedStep: (_e = (_d = e.detail) === null || _d === void 0 ? void 0 : _d.item) === null || _e === void 0 ? void 0 : _e.value,
|
|
15094
|
+
});
|
|
15095
|
+
} }, (_a = item === null || item === void 0 ? void 0 : item.steps) === null || _a === void 0 ? void 0 : _a.map((step) => (index.h("sl-menu-item", { value: step },
|
|
15096
|
+
step.prettyDestinationValue,
|
|
15097
|
+
index.h("span", { slot: "suffix", style: { fontSize: "75%" } }, step.prettySourceValue))))));
|
|
15098
|
+
}
|
|
15099
|
+
function chooseReward() {
|
|
15100
|
+
var _a;
|
|
15101
|
+
const nextStage = (selectedItem === null || selectedItem === void 0 ? void 0 : selectedItem.ruleType) === "FIXED_GLOBAL_REWARD"
|
|
15102
|
+
? "confirmation"
|
|
15103
|
+
: "chooseAmount";
|
|
15104
|
+
console.log({ nextStage, ruleType: selectedItem === null || selectedItem === void 0 ? void 0 : selectedItem.ruleType });
|
|
15105
|
+
return (index.h("div", { style: {
|
|
15106
|
+
display: "flex",
|
|
15107
|
+
justifyContent: "center",
|
|
15108
|
+
flexWrap: "wrap",
|
|
15109
|
+
alignItems: "center",
|
|
15110
|
+
columnGap: "12px",
|
|
15111
|
+
rowGap: "12px",
|
|
15112
|
+
} }, (_a = data.exchangeList) === null || _a === void 0 ? void 0 :
|
|
15113
|
+
_a.map((item) => {
|
|
15114
|
+
const style = {
|
|
15115
|
+
boxShadow: item.key === (selectedItem === null || selectedItem === void 0 ? void 0 : selectedItem.key) ? "0 1px 8px #87ceeb" : "none",
|
|
15116
|
+
marginBottom: "10px 0",
|
|
15117
|
+
flex: "1",
|
|
15118
|
+
minWidth: "45%",
|
|
15119
|
+
};
|
|
15120
|
+
return (index.h("div", { key: item.key, class: sheet.classes.CardContainer, style: style },
|
|
15121
|
+
index.h("sl-card", { class: sheet.classes.Base, onClick: () => callbacks.setExchangeState({ selectedItem: item }), disabled: !item.available },
|
|
15122
|
+
index.h("img", { class: sheet.classes.PreviewImage, src: (item === null || item === void 0 ? void 0 : item.imageUrl) || index.getAssetPath("./assets/Reward-icon.png") }),
|
|
15123
|
+
index.h("p", null, item.description))));
|
|
15124
|
+
}),
|
|
15125
|
+
index.h("div", { class: sheet.classes.Buttons },
|
|
15126
|
+
index.h("sl-button", { onClick: () => callbacks.setStage(nextStage), style: { display: "block" }, class: sheet.classes.Button, disabled: !states.selectedItem }, "Continue"),
|
|
15127
|
+
index.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"))));
|
|
15128
|
+
}
|
|
15129
|
+
function chooseAmount() {
|
|
15130
|
+
const input = getInput();
|
|
15131
|
+
return (index.h("div", null,
|
|
15132
|
+
index.h("div", { style: { width: "50%", margin: "0 auto" } }, (selectedItem === null || selectedItem === void 0 ? void 0 : selectedItem.imageUrl) && (index.h("img", { class: sheet.classes.FullImage, src: selectedItem === null || selectedItem === void 0 ? void 0 : selectedItem.imageUrl }))),
|
|
15133
|
+
index.h("div", { class: sheet.classes.InputBox }, input),
|
|
15134
|
+
index.h("div", { class: sheet.classes.Buttons },
|
|
15135
|
+
index.h("sl-button", { onClick: () => callbacks.setStage("confirmation"), disabled: input && !states.amount, style: { display: "block" }, class: sheet.classes.Button }, "Continue"),
|
|
15136
|
+
index.h("a", { onClick: () => callbacks.setStage("chooseReward"), style: { display: "block" }, class: sheet.classes.Button }, "Back"))));
|
|
15137
|
+
}
|
|
15138
|
+
console.log({ selectedItem, selectedStep });
|
|
15139
|
+
function confirmation() {
|
|
15140
|
+
console.log("confirmation:", { selectedItem });
|
|
15141
|
+
const redemptionAmount = () => {
|
|
15142
|
+
var _a;
|
|
15143
|
+
if ((selectedItem === null || selectedItem === void 0 ? void 0 : selectedItem.ruleType) === "FIXED_GLOBAL_REWARD") {
|
|
15144
|
+
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}`;
|
|
15145
|
+
}
|
|
15146
|
+
else {
|
|
15147
|
+
const amount = states.amount;
|
|
15148
|
+
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}`;
|
|
15149
|
+
return `Redeem ${amount} ${selectedItem === null || selectedItem === void 0 ? void 0 : selectedItem.sourceUnit} for ${reward}`;
|
|
15150
|
+
}
|
|
15151
|
+
};
|
|
15152
|
+
const previousStage = (selectedItem === null || selectedItem === void 0 ? void 0 : selectedItem.ruleType) === "FIXED_GLOBAL_REWARD"
|
|
15153
|
+
? "chooseReward"
|
|
15154
|
+
: "chooseAmount";
|
|
15155
|
+
return (index.h("div", null,
|
|
15156
|
+
index.h("h2", null, "Confirm your redemption:"),
|
|
15157
|
+
redemptionAmount(),
|
|
15158
|
+
index.h("div", { class: sheet.classes.Buttons },
|
|
15159
|
+
index.h("sl-button", { onClick: callbacks.exchangeReward, style: { display: "block" }, class: sheet.classes.Button }, "Redeem"),
|
|
15160
|
+
index.h("a", { onClick: () => callbacks.setStage(previousStage), style: { display: "block" }, class: sheet.classes.Button }, "Back"))));
|
|
15161
|
+
}
|
|
15162
|
+
function success() {
|
|
15163
|
+
return (index.h("div", { style: { textAlign: "center" } },
|
|
15164
|
+
index.h("img", { class: sheet.classes.FullImage, src: index.getAssetPath("./assets/Reward-icon.png") }),
|
|
15165
|
+
index.h("p", { style: { color: "forestgreen" } }, "Reward Redeemed"),
|
|
15166
|
+
(data === null || data === void 0 ? void 0 : data.fuelTankCode) && index.h("pre", null, data === null || data === void 0 ? void 0 : data.fuelTankCode),
|
|
15167
|
+
index.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")));
|
|
15168
|
+
}
|
|
15169
|
+
const stages = {
|
|
15170
|
+
chooseReward: () => chooseReward(),
|
|
15171
|
+
chooseAmount: () => chooseAmount(),
|
|
15172
|
+
confirmation: () => confirmation(),
|
|
15173
|
+
success: () => success(),
|
|
15174
|
+
};
|
|
15175
|
+
const currentStage = stages[states.redeemStage];
|
|
15176
|
+
function stageMap() {
|
|
15177
|
+
const stageNumber = stageList.indexOf(states.redeemStage);
|
|
15178
|
+
return (index.h("div", { style: { fontSize: "80%" } },
|
|
15179
|
+
index.h(ProgressBar, { stage: stageNumber }),
|
|
15180
|
+
index.h("div", { style: {
|
|
15181
|
+
marginTop: "5px",
|
|
15182
|
+
display: "flex",
|
|
15183
|
+
justifyContent: "center",
|
|
15184
|
+
textAlign: "center",
|
|
15185
|
+
whiteSpace: "nowrap",
|
|
15186
|
+
marginBottom: "10px",
|
|
15187
|
+
} }, Object.keys(stageProgressList).map((stage) => {
|
|
15188
|
+
if (stage === states.redeemStage)
|
|
15189
|
+
return (index.h("b", { style: { flex: "1 1 0" } },
|
|
15190
|
+
" ",
|
|
15191
|
+
stageProgressList[stage]));
|
|
15192
|
+
return index.h("i", { style: { flex: "1 1 0" } }, stageProgressList[stage]);
|
|
15193
|
+
}))));
|
|
15194
|
+
}
|
|
15195
|
+
const Label = () => {
|
|
15196
|
+
if (states.redeemStage === "success")
|
|
15197
|
+
return "";
|
|
15198
|
+
let previousStage = "";
|
|
15199
|
+
if (states.redeemStage === "confirmation") {
|
|
15200
|
+
previousStage =
|
|
15201
|
+
(selectedItem === null || selectedItem === void 0 ? void 0 : selectedItem.ruleType) === "FIXED_GLOBAL_REWARD"
|
|
15202
|
+
? "chooseReward"
|
|
15203
|
+
: "chooseAmount";
|
|
15204
|
+
}
|
|
15205
|
+
else if (states.redeemStage === "chooseAmount") {
|
|
15206
|
+
previousStage = "chooseReward";
|
|
15207
|
+
}
|
|
15208
|
+
const LeftArrow = () => (index.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" } },
|
|
15209
|
+
index.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" })));
|
|
15210
|
+
return (index.h("div", { slot: "label" },
|
|
15211
|
+
index.h("a", { style: { cursor: "pointer", fontSize: "80%", color: "#858585" }, onClick: () => callbacks.setStage(previousStage) },
|
|
15212
|
+
index.h(LeftArrow, null),
|
|
15213
|
+
" Back")));
|
|
15214
|
+
};
|
|
15215
|
+
return (index.h("div", { class: sheet.classes.Container },
|
|
15216
|
+
index.h("style", { type: "text/css" }, styleString),
|
|
15217
|
+
index.h("div", null,
|
|
15218
|
+
index.h("sl-drawer", { ref: (ref) => (refs.drawerRef.current = ref), placement: "right", class: sheet.classes.Drawer, open: stageList.indexOf(states.redeemStage) >= 0 },
|
|
15219
|
+
index.h(Label, null),
|
|
15220
|
+
stageMap(),
|
|
15221
|
+
currentStage && currentStage(),
|
|
15222
|
+
states.exchangeError && "Something went wrong. Please contact support or try again."),
|
|
15223
|
+
index.h("sl-button", { onClick: () => callbacks.openDrawer() }, "Redeem Rewards"))));
|
|
15224
|
+
}
|
|
15225
|
+
|
|
15226
|
+
const SqmRewardExchangeList = class {
|
|
15227
|
+
constructor(hostRef) {
|
|
15228
|
+
index.registerInstance(this, hostRef);
|
|
15229
|
+
this.ignored = true;
|
|
15230
|
+
_extends.h$1(this);
|
|
15231
|
+
}
|
|
15232
|
+
disconnectedCallback() { }
|
|
15233
|
+
render() {
|
|
15234
|
+
const missingProps = utils.getMissingProps([
|
|
15235
|
+
{
|
|
15236
|
+
attribute: "listType",
|
|
15237
|
+
value: this.listType,
|
|
15238
|
+
},
|
|
15239
|
+
]);
|
|
15240
|
+
if (missingProps) {
|
|
15241
|
+
return index.h(RequiredPropsError, { missingProps: missingProps });
|
|
15242
|
+
}
|
|
15243
|
+
const { states, data, callbacks, refs } = index_module.j()
|
|
15244
|
+
? useRewardExchangeListDemo(utils.getProps(this))
|
|
15245
|
+
: useRewardExchangeList(utils.getProps(this));
|
|
15246
|
+
return (index.h(index.Host, { style: { display: "contents" } }, index.h(RewardExchangeView, { states: states, data: data, callbacks: callbacks, refs: refs })));
|
|
15247
|
+
}
|
|
15248
|
+
static get assetsDirs() { return ["assets"]; }
|
|
15249
|
+
};
|
|
15250
|
+
function useRewardExchangeListDemo(props) {
|
|
15251
|
+
return cjs.cjs({
|
|
15252
|
+
states: {
|
|
15253
|
+
content: {
|
|
15254
|
+
listType: "https://example.com",
|
|
15255
|
+
...props,
|
|
15256
|
+
},
|
|
15257
|
+
redeemStage: "",
|
|
15258
|
+
amount: 0,
|
|
15259
|
+
selectedStep: undefined,
|
|
15260
|
+
exchangeError: false,
|
|
15261
|
+
},
|
|
15262
|
+
data: {
|
|
15263
|
+
shareCode: "SHARECODE123",
|
|
15264
|
+
},
|
|
15265
|
+
callbacks: {
|
|
15266
|
+
exchangeReward: () => { },
|
|
15267
|
+
openDrawer: () => { },
|
|
15268
|
+
setExchangeState: (_) => { },
|
|
15269
|
+
setStage: (_) => { },
|
|
15270
|
+
},
|
|
15271
|
+
refs: {
|
|
15272
|
+
drawerRef: {},
|
|
15273
|
+
},
|
|
15274
|
+
}, props.demoData || {}, { arrayMerge: (_, a) => a });
|
|
15275
|
+
}
|
|
15276
|
+
|
|
14752
15277
|
const debug$1 = _extends.browser("sq:useRouter");
|
|
14753
15278
|
function matchPath(pattern, page) {
|
|
14754
15279
|
if (!pattern)
|
|
@@ -14858,7 +15383,7 @@ function ShareButtonView(props, children) {
|
|
|
14858
15383
|
!props.hidetext && children)));
|
|
14859
15384
|
}
|
|
14860
15385
|
|
|
14861
|
-
const MessageLinkQuery =
|
|
15386
|
+
const MessageLinkQuery = index$1.gql `
|
|
14862
15387
|
query (
|
|
14863
15388
|
$programId: ID
|
|
14864
15389
|
$engagementMedium: UserEngagementMedium!
|
|
@@ -15012,14 +15537,13 @@ const MessageLinkQuery$1 = index_module.dist.gql `
|
|
|
15012
15537
|
}
|
|
15013
15538
|
`;
|
|
15014
15539
|
function useShareLink(props) {
|
|
15015
|
-
var _a, _b
|
|
15540
|
+
var _a, _b;
|
|
15016
15541
|
const { programId = index_module.M() } = props;
|
|
15017
15542
|
const user = index_module.T();
|
|
15018
15543
|
const { data } = index_module.en(MessageLinkQuery$1, { programId }, !(user === null || user === void 0 ? void 0 : user.jwt));
|
|
15019
15544
|
const shareString = (_b = (_a = data === null || data === void 0 ? void 0 : data.user) === null || _a === void 0 ? void 0 : _a.shareLink) !== null && _b !== void 0 ? _b :
|
|
15020
15545
|
// Shown during loading
|
|
15021
15546
|
"...";
|
|
15022
|
-
console.log((_c = data === null || data === void 0 ? void 0 : data.user) === null || _c === void 0 ? void 0 : _c.shareLink, shareString);
|
|
15023
15547
|
const [open, setOpen] = _extends.useState(false);
|
|
15024
15548
|
function onClick() {
|
|
15025
15549
|
// Should well supported: https://developer.mozilla.org/en-US/docs/Web/API/Clipboard#browser_compatibility
|
|
@@ -16492,7 +17016,7 @@ var _createEmotion = createEmotion({
|
|
|
16492
17016
|
function i$1(){return (i$1=Object.assign||function(n){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var r in o)Object.prototype.hasOwnProperty.call(o,r)&&(n[r]=o[r]);}return n}).apply(this,arguments)}function s(n,t){return t||(t=n.slice(0)),n.raw=t,n}var a$1,l,u,c$1=css(a$1||(a$1=s(['\n width: 100vw;\n height: 100vh;\n\n .story-book-outer-div {\n .story-div {\n font-family: "Arial", sans-serif;\n font-size: 12px;\n }\n padding-bottom: 500px;\n }\n\n .story-div {\n position: fixed;\n box-sizing: border-box;\n top: 0;\n width: 250px;\n height: 100vh;\n z-index: 999;\n overflow-y: scroll;\n background: white;\n margin-bottom: 32px;\n }\n\n .header {\n padding: 24px 0 16px 16px;\n margin-bottom: 24px;\n color: white;\n background: #333;\n cursor: pointer;\n\n h2 {\n letter-spacing: 3px;\n font-weight: 400;\n }\n }\n\n .parentStoryList {\n list-style: none;\n padding-left: 16px;\n\n summary {\n margin-bottom: 4px;\n }\n }\n .parentStory {\n cursor: pointer;\n }\n .parentStory.selected {\n font-weight: bold;\n }\n\n .subStory {\n font-size: 12px;\n cursor: pointer;\n line-height: 1.5em;\n margin-top: 4px;\n\n a {\n display: block;\n padding: 4px 4px 4px 16px;\n }\n }\n .subStory:hover {\n background-color: #eee;\n }\n .subStory.selected {\n background-color: lightgreen;\n }\n\n .component {\n padding: 24px 16px;\n }\n\n h4.group-header {\n margin: 8px 0;\n text-transform: uppercase;\n font-weight: 600;\n font-size: 14px;\n color: #575757;\n }\n\n .group-wrapper {\n margin-bottom: 24px;\n }\n\n .dynamic-display-wrapper {\n position: fixed;\n display: flex;\n flex-direction: column;\n bottom: 0;\n left: 100%;\n padding: 16px;\n z-index: 1000;\n background: white;\n transform: translateX(-100%);\n box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);\n\n & > :not(:first-child) {\n margin-top: 12px;\n }\n\n p {\n font-size: 12px;\n margin: 0;\n padding: 0;\n }\n\n .button-wrapper {\n display: flex;\n\n & > :not(:first-child) {\n margin-left: 12px;\n }\n }\n\n & button {\n border: 1px solid #eaeaea;\n background: white;\n border-radius: 4px;\n color: #777;\n padding: 4px 12px;\n justify-content: center;\n align-items: center;\n text-align: center;\n\n &.active {\n background: #555;\n border-color: #555;\n color: white;\n }\n }\n }\n'])));function p$1(n,t){var o,r=t.story.title.split("/"),e=r[1]?r[0]:"_";return i$1({},n,((o={})[e]=[].concat(n[e]||[],[{story:i$1({},t.story,{title:r[1]||r[0]}),subs:t.subs}]).sort(function(n,t){return n.story.title.localeCompare(t.story.title)}),o))}function d$1(n){return {story:n.default,subs:function(n,t){if(null==n)return {};var o,r,e={},i=Object.keys(n);for(r=0;r<i.length;r++)t.indexOf(o=i[r])>=0||(e[o]=n[o]);return e}(n,["default"])}}function f(a,f){var b=f.h,y=void 0===b?index.h:b,g=f.title,m=void 0===g?"Stencilbook":g,x=f.homepage,h=void 0===x?y("h3",null,"Select a story!"):x,v=f.addons,k=void 0===v?[]:v,w=_extends.useMemo(function(){return a.map(d$1).reduce(p$1,{_:[]})},a),S=_extends.useState(void 0),C=S[0],z=S[1],O=null==C?void 0:C.key,j=_extends.useState("desktop"),T=j[0],_=j[1],B=_extends.useState(!0),D=B[0],L=B[1],N=_extends.useState(!1),q=N[0],A=N[1],M=function(){return y("div",{class:"dynamic-display-wrapper"},y("div",{class:"button-wrapper"},y("button",{class:"desktop"===T?"active":"",onClick:function(){return _("desktop")}},"Desktop"),y("button",{class:"tablet"===T?"active":"",onClick:function(){return _("tablet")}},"Tablet"),y("button",{class:"mobile"===T?"active":"",onClick:function(){return _("mobile")}},"Mobile")),y("p",null,"Note: Currently doesn't test breakpoints, use the native tester for now"),y("hr",null),y("button",{class:q?"active":"",onClick:function(){return A(function(n){return !n})}},"Toggle Dark Background"),y("hr",null),y("button",{class:D?"active":"",onClick:function(){return L(function(n){return !n})}},"Toggle Sidebar"))},P="mobile"===T?"375px":"tablet"===T?"768px":"1124px",V=css(l||(l=s(["\n max-width: ",";\n margin-left: ",";\n "])),P,D?"250px":"0px"),X=css(u||(u=s(["\n display: none;\n "])));document.body.style.backgroundColor=q?"#232323":"#fafafa";var E=function(n){var t=n.selected,o=k.reduce(function(n,o){return function(){return y(o,{story:i$1({},t)},y(n,null))}},null==t?void 0:t.story);return y(o,null)},F=function(){return y("div",{class:"story-book-outer-div"},y("div",{class:"story-div "+(D?"":X)},y("div",{class:"header",onClick:function(){z(void 0);}},y("h2",null,m)),y("ul",{class:"parentStoryList"},Object.keys(w).sort().map(function(n){return y("div",{class:"group-wrapper"},"_"!==n&&y("h4",{class:"group-header"},n),w[n].map(function(t){return y("li",{class:"parentStory"},y("details",{style:{marginBottom:"10px"}},y("summary",{style:{outline:"none"}},t.story.title),t.subs&&Object.keys(t.subs).map(function(o){var e=n+"/"+o,i=t.subs[o],s=i.storyName||lodash_startcase(o);return y("div",{class:"subStory "+(O===e?"selected":"")},y("a",{onClick:function(){return function(n,t,o,r){z({key:t,story:n,parent:o,label:r});}(i,e,t.story,s)}},s))})))}))}))),y(M,null),y("div",{class:"component "+V},!O&&h,O&&y("div",null,y("h3",null,C.label),y(E,{selected:C}))))};return {class:c$1,children:y(F,null),View:F,selected:C}}
|
|
16493
17017
|
|
|
16494
17018
|
const ShareButton_stories = {
|
|
16495
|
-
title: "Share Button",
|
|
17019
|
+
title: "Components/Share Button",
|
|
16496
17020
|
};
|
|
16497
17021
|
const WithIcon = () => {
|
|
16498
17022
|
const props = { medium: "facebook", iconslot: "suffix" };
|
|
@@ -16548,7 +17072,7 @@ const ShareButton$1 = /*#__PURE__*/Object.freeze({
|
|
|
16548
17072
|
});
|
|
16549
17073
|
|
|
16550
17074
|
const ShareLink_stories = {
|
|
16551
|
-
title: "Share Link",
|
|
17075
|
+
title: "Components/Share Link",
|
|
16552
17076
|
};
|
|
16553
17077
|
const Default = () => {
|
|
16554
17078
|
const props = {
|
|
@@ -16589,7 +17113,7 @@ const ShareLink$1 = /*#__PURE__*/Object.freeze({
|
|
|
16589
17113
|
});
|
|
16590
17114
|
|
|
16591
17115
|
const BigStat_stories = {
|
|
16592
|
-
title: "Big Stat",
|
|
17116
|
+
title: "Components/Big Stat",
|
|
16593
17117
|
};
|
|
16594
17118
|
const Default$1 = () => {
|
|
16595
17119
|
const props = { statvalue: "9.900,00" };
|
|
@@ -16659,7 +17183,7 @@ const BigStat = /*#__PURE__*/Object.freeze({
|
|
|
16659
17183
|
});
|
|
16660
17184
|
|
|
16661
17185
|
const Leaderboard_stories = {
|
|
16662
|
-
title: "Leaderboard",
|
|
17186
|
+
title: "Components/Leaderboard",
|
|
16663
17187
|
parameters: {
|
|
16664
17188
|
tagname: "sqm-leaderboard",
|
|
16665
17189
|
},
|
|
@@ -16936,7 +17460,7 @@ const Router = /*#__PURE__*/Object.freeze({
|
|
|
16936
17460
|
});
|
|
16937
17461
|
|
|
16938
17462
|
const LeaderboardRank_stories = {
|
|
16939
|
-
title: "Leaderboard Rank",
|
|
17463
|
+
title: "Components/Leaderboard Rank",
|
|
16940
17464
|
};
|
|
16941
17465
|
const First = () => {
|
|
16942
17466
|
const props = { data: { rank: "1st" } };
|
|
@@ -16983,7 +17507,7 @@ function setupLoggedOut() {
|
|
|
16983
17507
|
};
|
|
16984
17508
|
}
|
|
16985
17509
|
const PortalFrame_stories = {
|
|
16986
|
-
title: "Portal Frame",
|
|
17510
|
+
title: "Components/Portal Frame",
|
|
16987
17511
|
};
|
|
16988
17512
|
const defaultProps = {
|
|
16989
17513
|
data: {
|
|
@@ -17078,7 +17602,7 @@ const PortalFrame$1 = /*#__PURE__*/Object.freeze({
|
|
|
17078
17602
|
});
|
|
17079
17603
|
|
|
17080
17604
|
const EditProfileForm_stories = {
|
|
17081
|
-
title: "Edit Profile Form",
|
|
17605
|
+
title: "Components/Edit Profile Form",
|
|
17082
17606
|
};
|
|
17083
17607
|
const defaultProps$1 = {
|
|
17084
17608
|
states: {
|
|
@@ -17525,7 +18049,7 @@ const UseLeaderboard = /*#__PURE__*/Object.freeze({
|
|
|
17525
18049
|
});
|
|
17526
18050
|
|
|
17527
18051
|
const FormMessage_stories = {
|
|
17528
|
-
title: "Form Message",
|
|
18052
|
+
title: "Components/Form Message",
|
|
17529
18053
|
};
|
|
17530
18054
|
const SuccessAlert = () => {
|
|
17531
18055
|
return (index.h("sqm-form-message", { type: "success" },
|
|
@@ -17561,6 +18085,148 @@ const FormMessage$1 = /*#__PURE__*/Object.freeze({
|
|
|
17561
18085
|
FullStackSuccess: FullStackSuccess
|
|
17562
18086
|
});
|
|
17563
18087
|
|
|
18088
|
+
const EXCHANGE$1 = index_module.dist.gql `
|
|
18089
|
+
mutation exchange($exchangeRewardInput: ExchangeRewardInput!) {
|
|
18090
|
+
exchangeReward(exchangeRewardInput: $exchangeRewardInput) {
|
|
18091
|
+
reward {
|
|
18092
|
+
id
|
|
18093
|
+
}
|
|
18094
|
+
}
|
|
18095
|
+
}
|
|
18096
|
+
`;
|
|
18097
|
+
const UseRewardExchangeList_stories = {
|
|
18098
|
+
title: "Hooks / useRewardExchange",
|
|
18099
|
+
};
|
|
18100
|
+
function setupGraphQL$6() {
|
|
18101
|
+
const id = "testestest";
|
|
18102
|
+
const accountId = id;
|
|
18103
|
+
const programId = "sam-partner-test-2";
|
|
18104
|
+
//@ts-ignore
|
|
18105
|
+
window.widgetIdent = {
|
|
18106
|
+
tenantAlias: "test_a8b41jotf8a1v",
|
|
18107
|
+
appDomain: "https://staging.referralsaasquatch.com",
|
|
18108
|
+
programId,
|
|
18109
|
+
};
|
|
18110
|
+
_extends.useEffect(() => {
|
|
18111
|
+
index_module.L({
|
|
18112
|
+
accountId,
|
|
18113
|
+
id,
|
|
18114
|
+
jwt: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyIjp7ImFjY291bnRJZCI6InRlc3Rlc3Rlc3QiLCJpZCI6InRlc3Rlc3Rlc3QifX0.qYnU5hNeIj9C_G3NogfG7btgCPGZC7JRXY0MG6a63zs",
|
|
18115
|
+
});
|
|
18116
|
+
return () => {
|
|
18117
|
+
window.widgetIdent = undefined;
|
|
18118
|
+
index_module.L(undefined);
|
|
18119
|
+
};
|
|
18120
|
+
}, []);
|
|
18121
|
+
return { id, accountId };
|
|
18122
|
+
}
|
|
18123
|
+
function useExchangeButton() {
|
|
18124
|
+
const { id, accountId } = setupGraphQL$6();
|
|
18125
|
+
const [points, setPoints] = _extends.useState(10);
|
|
18126
|
+
const [rate, setRate] = _extends.useState(100);
|
|
18127
|
+
const [exchange, { data, errors }] = index_module.Ne(EXCHANGE$1);
|
|
18128
|
+
return {
|
|
18129
|
+
states: {
|
|
18130
|
+
points,
|
|
18131
|
+
rate,
|
|
18132
|
+
},
|
|
18133
|
+
data: {
|
|
18134
|
+
id,
|
|
18135
|
+
accountId,
|
|
18136
|
+
data,
|
|
18137
|
+
errors,
|
|
18138
|
+
},
|
|
18139
|
+
callbacks: {
|
|
18140
|
+
exchange,
|
|
18141
|
+
setPoints,
|
|
18142
|
+
setRate,
|
|
18143
|
+
},
|
|
18144
|
+
};
|
|
18145
|
+
}
|
|
18146
|
+
const DefaultView = (props) => {
|
|
18147
|
+
const { states, data, callbacks } = props;
|
|
18148
|
+
return (index.h("div", null,
|
|
18149
|
+
index.h("div", null,
|
|
18150
|
+
index.h("label", null, "Rate:"),
|
|
18151
|
+
index.h("input", { value: states.rate, onInput: (e) =>
|
|
18152
|
+
// @ts-ignore
|
|
18153
|
+
callbacks.setRate(e.target.value) })),
|
|
18154
|
+
index.h("input", { value: states.points, onInput: (e) =>
|
|
18155
|
+
// @ts-ignore
|
|
18156
|
+
callbacks.setPoints(e.target.value) }),
|
|
18157
|
+
index.h("button", { onClick: () => callbacks.exchange(props.input) }, "Exchange"),
|
|
18158
|
+
index.h("details", null,
|
|
18159
|
+
index.h("summary", null, "response"),
|
|
18160
|
+
index.h("h4", null, "data"),
|
|
18161
|
+
index.h("div", { style: { maxWidth: "500px" } },
|
|
18162
|
+
index.h("pre", { style: { width: "500px", whiteSpace: "pre-wrap" } }, JSON.stringify(data.data))),
|
|
18163
|
+
index.h("h4", null, "errors"),
|
|
18164
|
+
index.h("div", { style: { maxWidth: "500px" } },
|
|
18165
|
+
index.h("pre", { style: { maxWidth: "500px", whiteSpace: "pre-wrap" } }, JSON.stringify(data.errors))))));
|
|
18166
|
+
};
|
|
18167
|
+
const RewardList = createHookStory(() => {
|
|
18168
|
+
setupGraphQL$6();
|
|
18169
|
+
return (index.h("sqm-reward-exchange-list", { "list-type": "something" }));
|
|
18170
|
+
});
|
|
18171
|
+
const FixedGlobalReward = createHookStory(() => {
|
|
18172
|
+
const { states, data, callbacks } = useExchangeButton();
|
|
18173
|
+
return (index.h(DefaultView, { states: states, data: data, callbacks: callbacks, input: {
|
|
18174
|
+
exchangeRewardInput: {
|
|
18175
|
+
userId: data.id,
|
|
18176
|
+
accountId: data.accountId,
|
|
18177
|
+
redeemCreditInput: {
|
|
18178
|
+
amount: states.points,
|
|
18179
|
+
unit: "POINT",
|
|
18180
|
+
},
|
|
18181
|
+
globalRewardKey: "gc1",
|
|
18182
|
+
},
|
|
18183
|
+
} }));
|
|
18184
|
+
});
|
|
18185
|
+
const VariableGlobalReward = createHookStory(() => {
|
|
18186
|
+
const { states, data, callbacks } = useExchangeButton();
|
|
18187
|
+
return (index.h(DefaultView, { states: states, data: data, callbacks: callbacks, input: {
|
|
18188
|
+
exchangeRewardInput: {
|
|
18189
|
+
userId: data.id,
|
|
18190
|
+
accountId: data.accountId,
|
|
18191
|
+
redeemCreditInput: {
|
|
18192
|
+
amount: states.points,
|
|
18193
|
+
unit: "POINT",
|
|
18194
|
+
},
|
|
18195
|
+
globalRewardKey: "gc1",
|
|
18196
|
+
rewardInput: {
|
|
18197
|
+
valueInCents: Math.ceil(states.points * states.rate),
|
|
18198
|
+
},
|
|
18199
|
+
},
|
|
18200
|
+
} }));
|
|
18201
|
+
});
|
|
18202
|
+
const VariableCreditReward = createHookStory(() => {
|
|
18203
|
+
const { states, data, callbacks } = useExchangeButton();
|
|
18204
|
+
return (index.h(DefaultView, { states: states, data: data, callbacks: callbacks, input: {
|
|
18205
|
+
exchangeRewardInput: {
|
|
18206
|
+
userId: data.id,
|
|
18207
|
+
accountId: data.accountId,
|
|
18208
|
+
redeemCreditInput: {
|
|
18209
|
+
amount: states.points,
|
|
18210
|
+
unit: "POINT",
|
|
18211
|
+
},
|
|
18212
|
+
rewardInput: {
|
|
18213
|
+
type: "CREDIT",
|
|
18214
|
+
unit: "foo",
|
|
18215
|
+
assignedCredit: Math.ceil(states.points * states.rate),
|
|
18216
|
+
},
|
|
18217
|
+
},
|
|
18218
|
+
} }));
|
|
18219
|
+
});
|
|
18220
|
+
|
|
18221
|
+
const UseRewardExchangeList = /*#__PURE__*/Object.freeze({
|
|
18222
|
+
__proto__: null,
|
|
18223
|
+
'default': UseRewardExchangeList_stories,
|
|
18224
|
+
RewardList: RewardList,
|
|
18225
|
+
FixedGlobalReward: FixedGlobalReward,
|
|
18226
|
+
VariableGlobalReward: VariableGlobalReward,
|
|
18227
|
+
VariableCreditReward: VariableCreditReward
|
|
18228
|
+
});
|
|
18229
|
+
|
|
17564
18230
|
const NewPortal_stories = {
|
|
17565
18231
|
title: "New Portal",
|
|
17566
18232
|
};
|
|
@@ -17864,7 +18530,7 @@ const NewPortal = /*#__PURE__*/Object.freeze({
|
|
|
17864
18530
|
});
|
|
17865
18531
|
|
|
17866
18532
|
const SidebarItem_stories = {
|
|
17867
|
-
title: "Sidebar Item",
|
|
18533
|
+
title: "Components/Sidebar Item",
|
|
17868
18534
|
};
|
|
17869
18535
|
const InactiveItem = () => {
|
|
17870
18536
|
const props = {
|
|
@@ -17901,7 +18567,7 @@ const SidebarItem = /*#__PURE__*/Object.freeze({
|
|
|
17901
18567
|
});
|
|
17902
18568
|
|
|
17903
18569
|
const NavigationSidebar_stories = {
|
|
17904
|
-
title: "Navigation Sidebar",
|
|
18570
|
+
title: "Components/Navigation Sidebar",
|
|
17905
18571
|
};
|
|
17906
18572
|
const DefaultNavigationSidebar = () => {
|
|
17907
18573
|
const barProps = {
|
|
@@ -17950,7 +18616,7 @@ const NavigationSidebar = /*#__PURE__*/Object.freeze({
|
|
|
17950
18616
|
});
|
|
17951
18617
|
|
|
17952
18618
|
const PortalLogin_stories = {
|
|
17953
|
-
title: "Portal Login",
|
|
18619
|
+
title: "Components/Portal Login",
|
|
17954
18620
|
};
|
|
17955
18621
|
const defaultProps$2 = {
|
|
17956
18622
|
states: {
|
|
@@ -17995,7 +18661,7 @@ const PortalLogin$1 = /*#__PURE__*/Object.freeze({
|
|
|
17995
18661
|
});
|
|
17996
18662
|
|
|
17997
18663
|
const PortalRegister_stories = {
|
|
17998
|
-
title: "Portal Register",
|
|
18664
|
+
title: "Components/Portal Register",
|
|
17999
18665
|
};
|
|
18000
18666
|
const defaultProps$3 = {
|
|
18001
18667
|
states: {
|
|
@@ -18098,7 +18764,7 @@ const PortalRegister$1 = /*#__PURE__*/Object.freeze({
|
|
|
18098
18764
|
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";
|
|
18099
18765
|
|
|
18100
18766
|
const PortalForgotPassword_stories = {
|
|
18101
|
-
title: "Portal Forgot Password",
|
|
18767
|
+
title: "Components/Portal Forgot Password",
|
|
18102
18768
|
parameters: {
|
|
18103
18769
|
scenario,
|
|
18104
18770
|
},
|
|
@@ -18176,7 +18842,7 @@ const PortalForgotPassword = /*#__PURE__*/Object.freeze({
|
|
|
18176
18842
|
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";
|
|
18177
18843
|
|
|
18178
18844
|
const PortalEmailVerification_stories = {
|
|
18179
|
-
title: "Portal Email Verification",
|
|
18845
|
+
title: "Components/Portal Email Verification",
|
|
18180
18846
|
parameters: {
|
|
18181
18847
|
scenario: scenario$1,
|
|
18182
18848
|
},
|
|
@@ -18262,7 +18928,7 @@ const PortalEmailVerification = /*#__PURE__*/Object.freeze({
|
|
|
18262
18928
|
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\"";
|
|
18263
18929
|
|
|
18264
18930
|
const PortalResetPassword_stories = {
|
|
18265
|
-
title: "Portal Reset Password",
|
|
18931
|
+
title: "Components/Portal Reset Password",
|
|
18266
18932
|
parameters: {
|
|
18267
18933
|
scenario: scenario$2,
|
|
18268
18934
|
},
|
|
@@ -18426,7 +19092,7 @@ const PortalResetPassword = /*#__PURE__*/Object.freeze({
|
|
|
18426
19092
|
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 |";
|
|
18427
19093
|
|
|
18428
19094
|
const PortalVerifyEmail_stories = {
|
|
18429
|
-
title: "Portal Verify Email",
|
|
19095
|
+
title: "Components/Portal Verify Email",
|
|
18430
19096
|
parameters: {
|
|
18431
19097
|
scenario: scenario$3,
|
|
18432
19098
|
},
|
|
@@ -18470,7 +19136,7 @@ const PortalVerifyEmail = /*#__PURE__*/Object.freeze({
|
|
|
18470
19136
|
});
|
|
18471
19137
|
|
|
18472
19138
|
const AssetCard_stories = {
|
|
18473
|
-
title: "Asset Card",
|
|
19139
|
+
title: "Components/Asset Card",
|
|
18474
19140
|
};
|
|
18475
19141
|
const Default$7 = () => {
|
|
18476
19142
|
const props = {
|
|
@@ -18506,7 +19172,7 @@ const AssetCard = /*#__PURE__*/Object.freeze({
|
|
|
18506
19172
|
});
|
|
18507
19173
|
|
|
18508
19174
|
const DividedLayout_stories = {
|
|
18509
|
-
title: "Divided Layout",
|
|
19175
|
+
title: "Components/Divided Layout",
|
|
18510
19176
|
};
|
|
18511
19177
|
const barProps$1 = {
|
|
18512
19178
|
data: {
|
|
@@ -18598,7 +19264,7 @@ const DividedLayout$1 = /*#__PURE__*/Object.freeze({
|
|
|
18598
19264
|
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";
|
|
18599
19265
|
|
|
18600
19266
|
const ChangePassword_stories = {
|
|
18601
|
-
title: "Change Password",
|
|
19267
|
+
title: "Components/Change Password",
|
|
18602
19268
|
parameters: {
|
|
18603
19269
|
scenario: scenario$4,
|
|
18604
19270
|
},
|
|
@@ -18754,7 +19420,7 @@ const ChangePassword = /*#__PURE__*/Object.freeze({
|
|
|
18754
19420
|
});
|
|
18755
19421
|
|
|
18756
19422
|
const PortalProfile_stories = {
|
|
18757
|
-
title: "Portal Profile",
|
|
19423
|
+
title: "Components/Portal Profile",
|
|
18758
19424
|
};
|
|
18759
19425
|
// const style = {};
|
|
18760
19426
|
jssPresetDefault_esm.jss.setup(jssPresetDefault_esm.create());
|
|
@@ -18995,7 +19661,7 @@ const PortalProfile = /*#__PURE__*/Object.freeze({
|
|
|
18995
19661
|
});
|
|
18996
19662
|
|
|
18997
19663
|
const ReferralTableRewardsCell_stories = {
|
|
18998
|
-
title: "Referral Table Rewards Cell",
|
|
19664
|
+
title: "Components/Referral Table Rewards Cell",
|
|
18999
19665
|
};
|
|
19000
19666
|
const baseReward = {
|
|
19001
19667
|
id: "123",
|
|
@@ -19227,7 +19893,7 @@ const ReferralTableRewardsCell$1 = /*#__PURE__*/Object.freeze({
|
|
|
19227
19893
|
});
|
|
19228
19894
|
|
|
19229
19895
|
const ReferralTable_stories = {
|
|
19230
|
-
title: "Referral Table",
|
|
19896
|
+
title: "Components/Referral Table",
|
|
19231
19897
|
};
|
|
19232
19898
|
const loadingElement = (index.h("div", { slot: "loading", style: { display: "contents" } },
|
|
19233
19899
|
index.h("sqm-table-row", null,
|
|
@@ -19714,7 +20380,7 @@ const ReferralTable$1 = /*#__PURE__*/Object.freeze({
|
|
|
19714
20380
|
});
|
|
19715
20381
|
|
|
19716
20382
|
const ReferralTableCell_stories = {
|
|
19717
|
-
title: "Referral Table Cell",
|
|
20383
|
+
title: "Components/Referral Table Cell",
|
|
19718
20384
|
};
|
|
19719
20385
|
const TableCell = () => {
|
|
19720
20386
|
return (index.h("sqm-referral-table-cell", { innerTemplate: "Table Cell Text" }));
|
|
@@ -19787,28 +20453,28 @@ const ReferralTableCell$1 = /*#__PURE__*/Object.freeze({
|
|
|
19787
20453
|
});
|
|
19788
20454
|
|
|
19789
20455
|
const UserName_stories = {
|
|
19790
|
-
title: "User Name",
|
|
20456
|
+
title: "Tests/User Name",
|
|
19791
20457
|
};
|
|
19792
|
-
const
|
|
20458
|
+
const DemoData = () => {
|
|
19793
20459
|
return (index.h("sqm-user-name", { demoData: {
|
|
19794
20460
|
loading: false,
|
|
19795
20461
|
loadingText: "...",
|
|
19796
20462
|
username: "Test Testerson",
|
|
19797
20463
|
} }));
|
|
19798
20464
|
};
|
|
19799
|
-
const
|
|
20465
|
+
const Username = () => {
|
|
19800
20466
|
return index.h("sqm-user-name", null);
|
|
19801
20467
|
};
|
|
19802
20468
|
|
|
19803
20469
|
const UserName = /*#__PURE__*/Object.freeze({
|
|
19804
20470
|
__proto__: null,
|
|
19805
20471
|
'default': UserName_stories,
|
|
19806
|
-
|
|
19807
|
-
|
|
20472
|
+
DemoData: DemoData,
|
|
20473
|
+
Username: Username
|
|
19808
20474
|
});
|
|
19809
20475
|
|
|
19810
20476
|
const PasswordField_stories = {
|
|
19811
|
-
title: "Portal Password Field",
|
|
20477
|
+
title: "Components/Portal Password Field",
|
|
19812
20478
|
};
|
|
19813
20479
|
const Start = () => {
|
|
19814
20480
|
return (index.h("sqm-password-field", { demoData: {
|
|
@@ -19855,6 +20521,368 @@ const PasswordField = /*#__PURE__*/Object.freeze({
|
|
|
19855
20521
|
ValidationError: ValidationError
|
|
19856
20522
|
});
|
|
19857
20523
|
|
|
20524
|
+
/**
|
|
20525
|
+
* Displays a cartesian product of the input props
|
|
20526
|
+
*
|
|
20527
|
+
* @returns
|
|
20528
|
+
*/
|
|
20529
|
+
function MatrixStory({ matrix, props, Component, }) {
|
|
20530
|
+
const propMatrix = Object.keys(matrix).map((propKey) => {
|
|
20531
|
+
const propValues = matrix[propKey];
|
|
20532
|
+
return propValues.map((val) => {
|
|
20533
|
+
return {
|
|
20534
|
+
[propKey]: val,
|
|
20535
|
+
};
|
|
20536
|
+
});
|
|
20537
|
+
});
|
|
20538
|
+
const combinations = cartesian(...propMatrix);
|
|
20539
|
+
const propsCombinations = combinations.map((combo) => {
|
|
20540
|
+
return combo.reduce((props, prop) => {
|
|
20541
|
+
return {
|
|
20542
|
+
...props,
|
|
20543
|
+
...prop,
|
|
20544
|
+
};
|
|
20545
|
+
}, {});
|
|
20546
|
+
});
|
|
20547
|
+
return propsCombinations.map((combo) => {
|
|
20548
|
+
const example = { ...props, ...combo };
|
|
20549
|
+
return (index.h("div", null,
|
|
20550
|
+
index.h(PropsTable, { values: example }),
|
|
20551
|
+
index.h("hr", null),
|
|
20552
|
+
index.h(Component, Object.assign({}, example))));
|
|
20553
|
+
});
|
|
20554
|
+
}
|
|
20555
|
+
function PropsTable({ values }) {
|
|
20556
|
+
return (index.h("table", null,
|
|
20557
|
+
index.h("tbody", null, Object.keys(values).map((key) => {
|
|
20558
|
+
return (index.h("tr", null,
|
|
20559
|
+
index.h("th", null, key),
|
|
20560
|
+
index.h("td", null, JSON.stringify(values[key]))));
|
|
20561
|
+
}))));
|
|
20562
|
+
}
|
|
20563
|
+
/**
|
|
20564
|
+
* Source: https://stackoverflow.com/questions/15298912/javascript-generating-combinations-from-n-arrays-with-m-elements
|
|
20565
|
+
*
|
|
20566
|
+
* TODO: Could replace with a fork of https://www.npmjs.com/package/cartesian
|
|
20567
|
+
*
|
|
20568
|
+
* @param args - an array of arrays
|
|
20569
|
+
* @returns combinations of the elements in those array
|
|
20570
|
+
*/
|
|
20571
|
+
function cartesian(...args) {
|
|
20572
|
+
var r = [], max = args.length - 1;
|
|
20573
|
+
function helper(arr, i) {
|
|
20574
|
+
for (var j = 0, l = args[i].length; j < l; j++) {
|
|
20575
|
+
var a = arr.slice(0); // clone arr
|
|
20576
|
+
a.push(args[i][j]);
|
|
20577
|
+
if (i == max)
|
|
20578
|
+
r.push(a);
|
|
20579
|
+
else
|
|
20580
|
+
helper(a, i + 1);
|
|
20581
|
+
}
|
|
20582
|
+
}
|
|
20583
|
+
helper([], 0);
|
|
20584
|
+
return r;
|
|
20585
|
+
}
|
|
20586
|
+
|
|
20587
|
+
const TaskCard_stories = {
|
|
20588
|
+
title: "Components/Task Card",
|
|
20589
|
+
};
|
|
20590
|
+
const resizable = {
|
|
20591
|
+
width: "347px",
|
|
20592
|
+
minWidth: "347px",
|
|
20593
|
+
resize: "horizontal",
|
|
20594
|
+
height: "fit-content",
|
|
20595
|
+
overflow: "hidden",
|
|
20596
|
+
};
|
|
20597
|
+
const NotRepeatable = () => {
|
|
20598
|
+
const oneAction = {
|
|
20599
|
+
points: 20,
|
|
20600
|
+
title: "Complete a survey",
|
|
20601
|
+
description: "Description of action and reward. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut eget quisque commodo leo.",
|
|
20602
|
+
buttonText: "Take survey",
|
|
20603
|
+
onClick: () => { },
|
|
20604
|
+
};
|
|
20605
|
+
const coupleActions = {
|
|
20606
|
+
points: 40,
|
|
20607
|
+
title: "Comment on 5 articles",
|
|
20608
|
+
progress: 1,
|
|
20609
|
+
goal: 5,
|
|
20610
|
+
steps: 1,
|
|
20611
|
+
description: "Description of action and reward. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut eget quisque commodo leo.",
|
|
20612
|
+
buttonText: "Start reading",
|
|
20613
|
+
onClick: () => { },
|
|
20614
|
+
};
|
|
20615
|
+
const manyActions = {
|
|
20616
|
+
points: 150,
|
|
20617
|
+
title: "Spend $500 at our Store",
|
|
20618
|
+
progress: 230,
|
|
20619
|
+
goal: 500,
|
|
20620
|
+
unit: "$",
|
|
20621
|
+
description: "Description of action and reward. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut eget quisque commodo leo.",
|
|
20622
|
+
buttonText: "Visit our Store",
|
|
20623
|
+
onClick: () => { },
|
|
20624
|
+
};
|
|
20625
|
+
return (index.h("div", { style: { display: "inline-flex", gap: "32px" } },
|
|
20626
|
+
index.h("div", { style: resizable },
|
|
20627
|
+
index.h("h4", null, "One Action"),
|
|
20628
|
+
index.h(sqmTaskCardView.TaskCardView, Object.assign({}, oneAction)),
|
|
20629
|
+
" ",
|
|
20630
|
+
index.h("h5", null),
|
|
20631
|
+
index.h(sqmTaskCardView.TaskCardView, Object.assign({}, oneAction, { complete: true })),
|
|
20632
|
+
" ",
|
|
20633
|
+
index.h("h5", null)),
|
|
20634
|
+
index.h("div", { style: resizable },
|
|
20635
|
+
index.h("h4", null, "A Couple Actions"),
|
|
20636
|
+
index.h(sqmTaskCardView.TaskCardView, Object.assign({}, coupleActions)),
|
|
20637
|
+
" ",
|
|
20638
|
+
index.h("h5", null),
|
|
20639
|
+
index.h(sqmTaskCardView.TaskCardView, Object.assign({}, coupleActions, { progress: 5 })),
|
|
20640
|
+
index.h("h5", null,
|
|
20641
|
+
"Progress ",
|
|
20642
|
+
">",
|
|
20643
|
+
" Goal"),
|
|
20644
|
+
index.h(sqmTaskCardView.TaskCardView, Object.assign({}, coupleActions, { progress: 9 })),
|
|
20645
|
+
" ",
|
|
20646
|
+
index.h("h5", null)),
|
|
20647
|
+
index.h("div", { style: resizable },
|
|
20648
|
+
index.h("h4", null, "Many Actions"),
|
|
20649
|
+
index.h(sqmTaskCardView.TaskCardView, Object.assign({}, manyActions)),
|
|
20650
|
+
" ",
|
|
20651
|
+
index.h("h5", null),
|
|
20652
|
+
index.h(sqmTaskCardView.TaskCardView, Object.assign({}, manyActions, { progress: 500 })),
|
|
20653
|
+
" ",
|
|
20654
|
+
index.h("h5", null))));
|
|
20655
|
+
};
|
|
20656
|
+
const NotRepeatableWithExpiry = () => {
|
|
20657
|
+
const oneAction = {
|
|
20658
|
+
points: 20,
|
|
20659
|
+
title: "Complete a survey",
|
|
20660
|
+
description: "Description of action and reward. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut eget quisque commodo leo.",
|
|
20661
|
+
expire: "Nov 30, 2021",
|
|
20662
|
+
buttonText: "Take survey",
|
|
20663
|
+
onClick: () => { },
|
|
20664
|
+
};
|
|
20665
|
+
const coupleActions = {
|
|
20666
|
+
points: 40,
|
|
20667
|
+
title: "Comment on 5 articles",
|
|
20668
|
+
progress: 1,
|
|
20669
|
+
goal: 5,
|
|
20670
|
+
steps: 1,
|
|
20671
|
+
description: "Description of action and reward. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut eget quisque commodo leo.",
|
|
20672
|
+
expire: "Nov 30, 2021",
|
|
20673
|
+
buttonText: "Start reading",
|
|
20674
|
+
onClick: () => { },
|
|
20675
|
+
};
|
|
20676
|
+
const manyActions = {
|
|
20677
|
+
points: 150,
|
|
20678
|
+
title: "Spend $500 at our Store",
|
|
20679
|
+
progress: 230,
|
|
20680
|
+
goal: 500,
|
|
20681
|
+
unit: "$",
|
|
20682
|
+
description: "Description of action and reward. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut eget quisque commodo leo.",
|
|
20683
|
+
expire: "Nov 30, 2021",
|
|
20684
|
+
buttonText: "Visit our Store",
|
|
20685
|
+
onClick: () => { },
|
|
20686
|
+
};
|
|
20687
|
+
return (index.h("div", { style: { display: "inline-flex", gap: "32px" } },
|
|
20688
|
+
index.h("div", { style: resizable },
|
|
20689
|
+
index.h("h4", null, "One Action"),
|
|
20690
|
+
index.h(sqmTaskCardView.TaskCardView, Object.assign({}, oneAction)),
|
|
20691
|
+
" ",
|
|
20692
|
+
index.h("h5", null),
|
|
20693
|
+
index.h(sqmTaskCardView.TaskCardView, Object.assign({}, oneAction, { complete: true })),
|
|
20694
|
+
" ",
|
|
20695
|
+
index.h("h5", null)),
|
|
20696
|
+
index.h("div", { style: resizable },
|
|
20697
|
+
index.h("h4", null, "A Couple Actions"),
|
|
20698
|
+
index.h(sqmTaskCardView.TaskCardView, Object.assign({}, coupleActions)),
|
|
20699
|
+
" ",
|
|
20700
|
+
index.h("h5", null),
|
|
20701
|
+
index.h(sqmTaskCardView.TaskCardView, Object.assign({}, coupleActions, { progress: 5 })),
|
|
20702
|
+
index.h("h5", null,
|
|
20703
|
+
"Progress ",
|
|
20704
|
+
">",
|
|
20705
|
+
" Goal"),
|
|
20706
|
+
index.h(sqmTaskCardView.TaskCardView, Object.assign({}, coupleActions, { progress: 9 })),
|
|
20707
|
+
" ",
|
|
20708
|
+
index.h("h5", null)),
|
|
20709
|
+
index.h("div", { style: resizable },
|
|
20710
|
+
index.h("h4", null, "Many Actions"),
|
|
20711
|
+
index.h(sqmTaskCardView.TaskCardView, Object.assign({}, manyActions)),
|
|
20712
|
+
" ",
|
|
20713
|
+
index.h("h5", null),
|
|
20714
|
+
index.h(sqmTaskCardView.TaskCardView, Object.assign({}, manyActions, { progress: 500 })),
|
|
20715
|
+
" ",
|
|
20716
|
+
index.h("h5", null))));
|
|
20717
|
+
};
|
|
20718
|
+
const Repeatable = () => {
|
|
20719
|
+
const oneAction = {
|
|
20720
|
+
points: 20,
|
|
20721
|
+
title: "Complete a survey",
|
|
20722
|
+
description: "Description of action and reward. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut eget quisque commodo leo.",
|
|
20723
|
+
repeatable: 0,
|
|
20724
|
+
buttonText: "Take survey",
|
|
20725
|
+
onClick: () => { },
|
|
20726
|
+
};
|
|
20727
|
+
const coupleActions = {
|
|
20728
|
+
points: 40,
|
|
20729
|
+
title: "Comment on 5 articles",
|
|
20730
|
+
goal: 5,
|
|
20731
|
+
steps: 1,
|
|
20732
|
+
repeatable: true,
|
|
20733
|
+
description: "Description of action and reward. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut eget quisque commodo leo.",
|
|
20734
|
+
buttonText: "Start reading",
|
|
20735
|
+
onClick: () => { },
|
|
20736
|
+
};
|
|
20737
|
+
const manyActions = {
|
|
20738
|
+
points: 150,
|
|
20739
|
+
title: "Spend $500 at our Store",
|
|
20740
|
+
goal: 500,
|
|
20741
|
+
repeatable: true,
|
|
20742
|
+
unit: "$",
|
|
20743
|
+
description: "Description of action and reward. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut eget quisque commodo leo.",
|
|
20744
|
+
buttonText: "Visit our Store",
|
|
20745
|
+
onClick: () => { },
|
|
20746
|
+
};
|
|
20747
|
+
return (index.h("div", { style: { display: "inline-flex", gap: "32px" } },
|
|
20748
|
+
index.h("div", { style: resizable },
|
|
20749
|
+
index.h("h4", null, "One Action"),
|
|
20750
|
+
index.h(sqmTaskCardView.TaskCardView, Object.assign({}, oneAction)),
|
|
20751
|
+
" ",
|
|
20752
|
+
index.h("h5", null),
|
|
20753
|
+
index.h(sqmTaskCardView.TaskCardView, Object.assign({}, oneAction, { repeatable: 1, complete: true })),
|
|
20754
|
+
" ",
|
|
20755
|
+
index.h("h5", null)),
|
|
20756
|
+
index.h("div", { style: resizable },
|
|
20757
|
+
index.h("h4", null, "A Couple Actions"),
|
|
20758
|
+
index.h(sqmTaskCardView.TaskCardView, Object.assign({}, coupleActions, { progress: 1 })),
|
|
20759
|
+
" ",
|
|
20760
|
+
index.h("h5", null),
|
|
20761
|
+
index.h(sqmTaskCardView.TaskCardView, Object.assign({}, coupleActions, { progress: 5 })),
|
|
20762
|
+
" ",
|
|
20763
|
+
index.h("h5", null),
|
|
20764
|
+
index.h(sqmTaskCardView.TaskCardView, Object.assign({}, coupleActions, { progress: 7 })),
|
|
20765
|
+
" ",
|
|
20766
|
+
index.h("h5", null),
|
|
20767
|
+
index.h(sqmTaskCardView.TaskCardView, Object.assign({}, coupleActions, { progress: 10 })),
|
|
20768
|
+
" ",
|
|
20769
|
+
index.h("h5", null),
|
|
20770
|
+
index.h(sqmTaskCardView.TaskCardView, Object.assign({}, coupleActions, { progress: 12 })),
|
|
20771
|
+
" ",
|
|
20772
|
+
index.h("h5", null)),
|
|
20773
|
+
index.h("div", { style: resizable },
|
|
20774
|
+
index.h("h4", null, "Many Actions"),
|
|
20775
|
+
index.h(sqmTaskCardView.TaskCardView, Object.assign({}, manyActions, { progress: 100 })),
|
|
20776
|
+
" ",
|
|
20777
|
+
index.h("h5", null),
|
|
20778
|
+
index.h(sqmTaskCardView.TaskCardView, Object.assign({}, manyActions, { progress: 500 })),
|
|
20779
|
+
" ",
|
|
20780
|
+
index.h("h5", null),
|
|
20781
|
+
index.h(sqmTaskCardView.TaskCardView, Object.assign({}, manyActions, { progress: 650 })),
|
|
20782
|
+
" ",
|
|
20783
|
+
index.h("h5", null),
|
|
20784
|
+
index.h(sqmTaskCardView.TaskCardView, Object.assign({}, manyActions, { progress: 1000 })),
|
|
20785
|
+
" ",
|
|
20786
|
+
index.h("h5", null),
|
|
20787
|
+
index.h(sqmTaskCardView.TaskCardView, Object.assign({}, manyActions, { progress: 1200 })),
|
|
20788
|
+
" ",
|
|
20789
|
+
index.h("h5", null))));
|
|
20790
|
+
};
|
|
20791
|
+
const RepeatableWithExpiry = () => {
|
|
20792
|
+
const oneAction = {
|
|
20793
|
+
points: 20,
|
|
20794
|
+
title: "Complete a survey",
|
|
20795
|
+
expire: "Nov 30, 2021",
|
|
20796
|
+
description: "Description of action and reward. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut eget quisque commodo leo.",
|
|
20797
|
+
repeatable: 0,
|
|
20798
|
+
buttonText: "Take survey",
|
|
20799
|
+
onClick: () => { },
|
|
20800
|
+
};
|
|
20801
|
+
const coupleActions = {
|
|
20802
|
+
points: 40,
|
|
20803
|
+
title: "Comment on 5 articles",
|
|
20804
|
+
expire: "Nov 30, 2021",
|
|
20805
|
+
goal: 5,
|
|
20806
|
+
steps: 1,
|
|
20807
|
+
repeatable: true,
|
|
20808
|
+
description: "Description of action and reward. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut eget quisque commodo leo.",
|
|
20809
|
+
buttonText: "Start reading",
|
|
20810
|
+
onClick: () => { },
|
|
20811
|
+
};
|
|
20812
|
+
const manyActions = {
|
|
20813
|
+
points: 150,
|
|
20814
|
+
title: "Spend $500 at our Store",
|
|
20815
|
+
expire: "Nov 30, 2021",
|
|
20816
|
+
goal: 500,
|
|
20817
|
+
repeatable: true,
|
|
20818
|
+
unit: "$",
|
|
20819
|
+
description: "Description of action and reward. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut eget quisque commodo leo.",
|
|
20820
|
+
buttonText: "Visit our Store",
|
|
20821
|
+
onClick: () => { },
|
|
20822
|
+
};
|
|
20823
|
+
return (index.h("div", { style: { display: "inline-flex", gap: "32px" } },
|
|
20824
|
+
index.h("div", { style: resizable },
|
|
20825
|
+
index.h("h4", null, "One Action"),
|
|
20826
|
+
index.h(sqmTaskCardView.TaskCardView, Object.assign({}, oneAction)),
|
|
20827
|
+
" ",
|
|
20828
|
+
index.h("h5", null),
|
|
20829
|
+
index.h(sqmTaskCardView.TaskCardView, Object.assign({}, oneAction, { repeatable: 1, complete: true })),
|
|
20830
|
+
" ",
|
|
20831
|
+
index.h("h5", null)),
|
|
20832
|
+
index.h("div", { style: resizable },
|
|
20833
|
+
index.h("h4", null, "A Couple Actions"),
|
|
20834
|
+
index.h(sqmTaskCardView.TaskCardView, Object.assign({}, coupleActions, { progress: 1 })),
|
|
20835
|
+
" ",
|
|
20836
|
+
index.h("h5", null),
|
|
20837
|
+
index.h(sqmTaskCardView.TaskCardView, Object.assign({}, coupleActions, { progress: 5 })),
|
|
20838
|
+
" ",
|
|
20839
|
+
index.h("h5", null),
|
|
20840
|
+
index.h(sqmTaskCardView.TaskCardView, Object.assign({}, coupleActions, { progress: 7 })),
|
|
20841
|
+
" ",
|
|
20842
|
+
index.h("h5", null),
|
|
20843
|
+
index.h(sqmTaskCardView.TaskCardView, Object.assign({}, coupleActions, { progress: 10 })),
|
|
20844
|
+
" ",
|
|
20845
|
+
index.h("h5", null),
|
|
20846
|
+
index.h(sqmTaskCardView.TaskCardView, Object.assign({}, coupleActions, { progress: 12 })),
|
|
20847
|
+
" ",
|
|
20848
|
+
index.h("h5", null)),
|
|
20849
|
+
index.h("div", { style: resizable },
|
|
20850
|
+
index.h("h4", null, "Many Actions"),
|
|
20851
|
+
index.h(sqmTaskCardView.TaskCardView, Object.assign({}, manyActions, { progress: 100 })),
|
|
20852
|
+
" ",
|
|
20853
|
+
index.h("h5", null),
|
|
20854
|
+
index.h(sqmTaskCardView.TaskCardView, Object.assign({}, manyActions, { progress: 500 })),
|
|
20855
|
+
" ",
|
|
20856
|
+
index.h("h5", null),
|
|
20857
|
+
index.h(sqmTaskCardView.TaskCardView, Object.assign({}, manyActions, { progress: 650 })),
|
|
20858
|
+
" ",
|
|
20859
|
+
index.h("h5", null),
|
|
20860
|
+
index.h(sqmTaskCardView.TaskCardView, Object.assign({}, manyActions, { progress: 1000 })),
|
|
20861
|
+
" ",
|
|
20862
|
+
index.h("h5", null),
|
|
20863
|
+
index.h(sqmTaskCardView.TaskCardView, Object.assign({}, manyActions, { progress: 1200 })),
|
|
20864
|
+
" ",
|
|
20865
|
+
index.h("h5", null))));
|
|
20866
|
+
};
|
|
20867
|
+
const ProgressBar$1 = () => {
|
|
20868
|
+
const props = {
|
|
20869
|
+
goal: 5,
|
|
20870
|
+
};
|
|
20871
|
+
return (index.h("div", null,
|
|
20872
|
+
index.h(MatrixStory, { matrix: { progress: [1, 2, 5], steps: [0, 1], repeatable: [false] }, props: props, Component: sqmTaskCardView.ProgressBar }),
|
|
20873
|
+
index.h(MatrixStory, { matrix: { progress: [2, 5, 7, 12], steps: [0, 1], repeatable: [true] }, props: props, Component: sqmTaskCardView.ProgressBar })));
|
|
20874
|
+
};
|
|
20875
|
+
|
|
20876
|
+
const TaskCard = /*#__PURE__*/Object.freeze({
|
|
20877
|
+
__proto__: null,
|
|
20878
|
+
'default': TaskCard_stories,
|
|
20879
|
+
NotRepeatable: NotRepeatable,
|
|
20880
|
+
NotRepeatableWithExpiry: NotRepeatableWithExpiry,
|
|
20881
|
+
Repeatable: Repeatable,
|
|
20882
|
+
RepeatableWithExpiry: RepeatableWithExpiry,
|
|
20883
|
+
ProgressBar: ProgressBar$1
|
|
20884
|
+
});
|
|
20885
|
+
|
|
19858
20886
|
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";
|
|
19859
20887
|
|
|
19860
20888
|
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";
|
|
@@ -22867,7 +23895,7 @@ const ReferralIframeReadme = "# sqm-referral-iframe\r\n\r\n\r\n\r\n<!-- Auto Gen
|
|
|
22867
23895
|
|
|
22868
23896
|
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";
|
|
22869
23897
|
|
|
22870
|
-
const RegisterReadme = "# sqm-portal-register\r\n\r\n\r\n\r\n<!-- Auto Generated Below -->\
|
|
23898
|
+
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";
|
|
22871
23899
|
|
|
22872
23900
|
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";
|
|
22873
23901
|
|
|
@@ -22875,7 +23903,7 @@ const ResetPasswordReadme = "# sqm-portal-reset-password\r\n\r\n\r\n\r\n<!-- Aut
|
|
|
22875
23903
|
|
|
22876
23904
|
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";
|
|
22877
23905
|
|
|
22878
|
-
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";
|
|
23906
|
+
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";
|
|
22879
23907
|
|
|
22880
23908
|
const PortalTemplates_stories = {
|
|
22881
23909
|
title: "Templates / Portal",
|
|
@@ -26003,6 +27031,7 @@ const stories = [
|
|
|
26003
27031
|
ReferralTableRewardsCell$1,
|
|
26004
27032
|
UserName,
|
|
26005
27033
|
PasswordField,
|
|
27034
|
+
TaskCard,
|
|
26006
27035
|
PortalTemplates,
|
|
26007
27036
|
ProgramMenu$1,
|
|
26008
27037
|
PoweredByImg,
|
|
@@ -26010,6 +27039,7 @@ const stories = [
|
|
|
26010
27039
|
Hero,
|
|
26011
27040
|
ReferralIframe$1,
|
|
26012
27041
|
NameFields$1,
|
|
27042
|
+
UseRewardExchangeList,
|
|
26013
27043
|
];
|
|
26014
27044
|
const StencilStorybook = class {
|
|
26015
27045
|
constructor(hostRef) {
|
|
@@ -26121,7 +27151,7 @@ function UserNameView(props) {
|
|
|
26121
27151
|
return index.h(index.Host, null, props.loading ? props.loadingText : props.username);
|
|
26122
27152
|
}
|
|
26123
27153
|
|
|
26124
|
-
const GET_USER_NAME =
|
|
27154
|
+
const GET_USER_NAME = index$1.gql `
|
|
26125
27155
|
query getUserName {
|
|
26126
27156
|
viewer {
|
|
26127
27157
|
... on User {
|
|
@@ -26192,6 +27222,7 @@ exports.sqm_referral_table_date_cell = ReferralTableDateCell;
|
|
|
26192
27222
|
exports.sqm_referral_table_rewards_cell = ReferralTableRewardsCell;
|
|
26193
27223
|
exports.sqm_referral_table_status_cell = ReferralTableStatusCell;
|
|
26194
27224
|
exports.sqm_referral_table_user_cell = ReferralTableUserCell;
|
|
27225
|
+
exports.sqm_reward_exchange_list = SqmRewardExchangeList;
|
|
26195
27226
|
exports.sqm_router = SqmRouter;
|
|
26196
27227
|
exports.sqm_share_button = ShareButton;
|
|
26197
27228
|
exports.sqm_share_link = ShareLink;
|