@saasquatch/mint-components 1.5.0-4 → 1.5.0-43
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 +156 -24
- package/dist/cjs/AutoColor-f85faee8.js +2007 -0
- package/dist/cjs/GenericTableView-e09de80f.js +111 -0
- package/dist/cjs/{jss-preset-default.esm-6304d24f.js → JSS-c65a40f1.js} +5 -3
- package/dist/cjs/extends-08099afd.js +21 -0
- package/dist/cjs/{global-6223fe8f.js → global-e375afa1.js} +45 -148
- package/dist/cjs/{sqm-leaderboard-rank-view-7dd44d62.js → index-d9b12889.js} +2 -9
- package/dist/cjs/{index.module-7dd4b981.js → index.module-10eb2374.js} +6232 -6230
- package/dist/cjs/insertcss-04580cfa.js +47 -0
- package/dist/cjs/loader.cjs.js +7 -5
- package/dist/cjs/luxon-59ca7d19.js +8348 -0
- package/dist/cjs/mint-components.cjs.js +7 -5
- package/dist/cjs/{sqm-asset-card-view-07f86880.js → sqm-asset-card-view-d9ac6a95.js} +2 -3
- package/dist/cjs/sqm-asset-card.cjs.entry.js +8 -7
- package/dist/cjs/sqm-big-stat-view-e5dc0877.js +40 -0
- package/dist/cjs/sqm-big-stat.cjs.entry.js +10 -8
- package/dist/cjs/sqm-brand_24.cjs.entry.js +6829 -0
- package/dist/cjs/sqm-form-message.cjs.entry.js +31 -0
- package/dist/cjs/sqm-graphql-client-provider.cjs.entry.js +10 -9
- package/dist/cjs/{sqm-hero-view-bb3d00a1.js → sqm-hero-view-a13795c0.js} +6 -7
- package/dist/cjs/sqm-hero.cjs.entry.js +7 -6
- package/dist/cjs/sqm-leaderboard-rank-view-35015d30.js +10 -0
- package/dist/cjs/sqm-leaderboard-rank.cjs.entry.js +17 -17
- package/dist/cjs/sqm-leaderboard.cjs.entry.js +41 -14
- package/dist/cjs/{sqm-name-fields-view-24614ac7.js → sqm-name-fields-view-c95e4768.js} +2 -3
- package/dist/cjs/sqm-name-fields.cjs.entry.js +9 -8
- package/dist/cjs/{sqm-navigation-sidebar-item-view-6c7f78e6.js → sqm-navigation-sidebar-item-view-6db6d810.js} +7 -6
- package/dist/cjs/sqm-navigation-sidebar-item.cjs.entry.js +10 -9
- package/dist/cjs/{sqm-navigation-sidebar-view-d06e1885.js → sqm-navigation-sidebar-view-36632c96.js} +2 -3
- package/dist/cjs/sqm-navigation-sidebar.cjs.entry.js +5 -4
- package/dist/cjs/sqm-password-field.cjs.entry.js +581 -0
- package/dist/cjs/sqm-popup-container.cjs.entry.js +9 -8
- package/dist/cjs/{sqm-portal-container-view-d144735a.js → sqm-portal-container-view-d8cc826b.js} +5 -4
- package/dist/cjs/{sqm-portal-email-verification-view-08d1848c.js → sqm-portal-email-verification-view-30176b23.js} +5 -6
- package/dist/cjs/sqm-portal-email-verification.cjs.entry.js +25 -16
- package/dist/cjs/{sqm-portal-footer-view-69c73802.js → sqm-portal-footer-view-90522bba.js} +3 -4
- package/dist/cjs/sqm-portal-footer.cjs.entry.js +10 -8
- package/dist/cjs/{sqm-portal-forgot-password-view-1704d285.js → sqm-portal-forgot-password-view-10c0b54f.js} +3 -4
- package/dist/cjs/sqm-portal-forgot-password.cjs.entry.js +30 -17
- package/dist/cjs/sqm-portal-logout.cjs.entry.js +8 -7
- package/dist/cjs/{sqm-portal-profile-view-14b41436.js → sqm-portal-profile-view-a5557f9f.js} +5 -6
- package/dist/cjs/sqm-portal-profile.cjs.entry.js +22 -20
- package/dist/cjs/sqm-portal-protected-route.cjs.entry.js +11 -10
- package/dist/cjs/{sqm-portal-reset-password-view-4d78fd6d.js → sqm-portal-reset-password-view-1fdc957e.js} +3 -4
- package/dist/cjs/sqm-portal-reset-password.cjs.entry.js +27 -18
- package/dist/cjs/{sqm-portal-section-view-3b008930.js → sqm-portal-section-view-3b6c990e.js} +3 -6
- package/dist/cjs/{sqm-portal-verify-email-view-b595e302.js → sqm-portal-verify-email-view-4c78e231.js} +3 -4
- package/dist/cjs/sqm-portal-verify-email.cjs.entry.js +30 -21
- package/dist/cjs/sqm-referral-card.cjs.entry.js +29 -0
- package/dist/cjs/sqm-referral-table_11.cjs.entry.js +866 -0
- package/dist/cjs/sqm-refresh-button.cjs.entry.js +54 -0
- package/dist/cjs/sqm-rewards-table_9.cjs.entry.js +743 -0
- package/dist/cjs/sqm-share-code.cjs.entry.js +15 -14
- package/dist/cjs/{sqm-share-link-view-a935d07e.js → sqm-share-link-view-8e984365.js} +2 -3
- package/dist/cjs/{sqm-stat-container-view-ee7b00ff.js → sqm-stat-container-view-5b2db929.js} +3 -4
- package/dist/cjs/sqm-stat-container.cjs.entry.js +6 -5
- package/dist/cjs/sqm-stencilbook.cjs.entry.js +13207 -0
- package/dist/cjs/sqm-table-cell_3.cjs.entry.js +100 -0
- package/dist/cjs/{sqm-text-span-view-b5ae787b.js → sqm-text-span-view-f101dedf.js} +2 -3
- package/dist/cjs/sqm-text-span.cjs.entry.js +5 -4
- package/dist/cjs/sqm-titled-section.cjs.entry.js +6 -5
- package/dist/cjs/{extends-0302d27d.js → stencil-hooks.module-87a1f4f7.js} +0 -19
- package/dist/cjs/use-callback-e754042f.js +7 -0
- package/dist/cjs/{re-render-6111d4bd.js → useChildElements-d8e872a4.js} +21 -5
- package/dist/cjs/{useDemoBigStat-2786227e.js → useDemoBigStat-f3c67fd6.js} +13 -50
- package/dist/cjs/{ShadowViewAddon-a85b8c8d.js → useLeaderboard-370ac19e.js} +104 -49
- package/dist/cjs/{utils-95e5317c.js → utils-01dbfd4a.js} +9 -0
- package/dist/collection/collection-manifest.json +48 -6
- package/dist/collection/components/sqm-asset-card/sqm-asset-card-view.js +2 -4
- package/dist/collection/components/sqm-big-stat/BigStat.stories.js +8 -1
- package/dist/collection/components/sqm-big-stat/sqm-big-stat-view.js +2 -4
- package/dist/collection/components/sqm-big-stat/sqm-big-stat.js +21 -1
- package/dist/collection/components/sqm-big-stat/useBigStat.js +4 -4
- package/dist/collection/components/sqm-big-stat/useDemoBigStat.js +1 -0
- package/dist/collection/components/sqm-brand/sqm-brand.js +7 -4
- package/dist/collection/components/sqm-card-feed/CardFeed.stories.js +104 -0
- package/dist/collection/components/sqm-card-feed/sqm-card-feed-view.js +27 -0
- package/dist/collection/components/sqm-card-feed/sqm-card-feed.js +79 -0
- package/dist/collection/components/sqm-divided-layout/sqm-divided-layout-view.js +2 -4
- package/dist/collection/components/sqm-hero/sqm-hero-view.js +2 -4
- package/dist/collection/components/sqm-leaderboard/Leaderboard.stories.js +210 -8
- package/dist/collection/components/sqm-leaderboard/sqm-leaderboard-view.js +37 -10
- package/dist/collection/components/sqm-leaderboard/sqm-leaderboard.css +37 -1
- package/dist/collection/components/sqm-leaderboard/sqm-leaderboard.js +60 -5
- package/dist/collection/components/sqm-leaderboard/useLeaderboard.js +30 -2
- package/dist/collection/components/sqm-leaderboard-rank/sqm-leaderboard-rank.js +1 -4
- package/dist/collection/components/sqm-media/Media.stories.js +28 -0
- package/dist/collection/components/sqm-media/sqm-media-view.js +119 -0
- package/dist/collection/components/sqm-media/sqm-media.js +335 -0
- package/dist/collection/components/sqm-name-fields/sqm-name-fields-view.js +2 -4
- package/dist/collection/components/sqm-navigation-sidebar/sqm-navigation-sidebar-view.js +2 -4
- package/dist/collection/components/sqm-navigation-sidebar-item/sqm-navigation-sidebar-item-view.js +5 -5
- package/dist/collection/components/sqm-password-field/passwordValidation.js +2 -4
- package/dist/collection/components/sqm-password-field/sqm-password-field-view.js +2 -4
- package/dist/collection/components/sqm-portal-change-password/sqm-portal-change-password-view.js +2 -4
- package/dist/collection/components/sqm-portal-container/PortalContainer.stories.js +27 -0
- package/dist/collection/components/sqm-portal-container/sqm-portal-container-view.js +5 -5
- package/dist/collection/components/sqm-portal-container/sqm-portal-container.js +25 -0
- package/dist/collection/components/sqm-portal-email-verification/sqm-portal-email-verification-view.js +4 -6
- package/dist/collection/components/sqm-portal-email-verification/sqm-portal-email-verification.js +27 -0
- package/dist/collection/components/sqm-portal-email-verification/usePortalEmailVerification.js +2 -1
- package/dist/collection/components/sqm-portal-footer/sqm-portal-footer-view.js +2 -4
- package/dist/collection/components/sqm-portal-forgot-password/PortalForgotPassword.stories.js +4 -0
- package/dist/collection/components/sqm-portal-forgot-password/sqm-portal-forgot-password-view.js +2 -4
- package/dist/collection/components/sqm-portal-forgot-password/sqm-portal-forgot-password.js +55 -3
- package/dist/collection/components/sqm-portal-forgot-password/usePortalForgotPassword.js +4 -2
- package/dist/collection/components/sqm-portal-frame/sqm-portal-frame-view.js +2 -4
- package/dist/collection/components/sqm-portal-login/PortalLogin.stories.js +6 -0
- package/dist/collection/components/sqm-portal-login/sqm-portal-login-view.js +3 -5
- package/dist/collection/components/sqm-portal-login/sqm-portal-login.js +59 -4
- package/dist/collection/components/sqm-portal-login/usePortalLogin.js +4 -2
- package/dist/collection/components/sqm-portal-profile/PortalProfile.stories.js +1 -7
- package/dist/collection/components/sqm-portal-profile/sqm-portal-profile-view.js +2 -4
- package/dist/collection/components/sqm-portal-register/PortalRegister.stories.js +12 -0
- package/dist/collection/components/sqm-portal-register/sqm-portal-register-view.js +3 -4
- package/dist/collection/components/sqm-portal-register/sqm-portal-register.js +56 -2
- package/dist/collection/components/sqm-portal-register/usePortalRegister.js +3 -0
- package/dist/collection/components/sqm-portal-reset-password/sqm-portal-reset-password-view.js +3 -5
- package/dist/collection/components/sqm-portal-reset-password/sqm-portal-reset-password.js +30 -1
- package/dist/collection/components/sqm-portal-reset-password/usePortalResetPassword.js +1 -1
- package/dist/collection/components/sqm-portal-verify-email/sqm-portal-verify-email-view.js +2 -4
- package/dist/collection/components/sqm-portal-verify-email/sqm-portal-verify-email.js +30 -1
- package/dist/collection/components/sqm-portal-verify-email/usePortalVerifyEmail.js +2 -2
- package/dist/collection/components/sqm-program-explainer/ProgramExplainer.stories.js +28 -44
- package/dist/collection/components/sqm-program-explainer/sqm-program-explainer-view.js +33 -30
- package/dist/collection/components/sqm-program-explainer/sqm-program-explainer.js +7 -47
- package/dist/collection/components/sqm-program-explainer-step/ProgramExplainerStep.stories.js +5 -17
- package/dist/collection/components/sqm-program-explainer-step/sqm-program-explainer-step-view.js +43 -38
- package/dist/collection/components/sqm-program-explainer-step/sqm-program-explainer-step.js +27 -7
- package/dist/collection/components/sqm-referral-card/ReferralCard.stories.js +67 -0
- package/dist/collection/components/sqm-referral-card/SVGs.js +10 -0
- package/dist/collection/components/sqm-referral-card/sqm-referral-card-view.js +20 -0
- package/dist/collection/components/sqm-referral-card/sqm-referral-card.js +76 -0
- package/dist/collection/components/sqm-referral-card/sqm-timeline-reward.js +164 -0
- package/dist/collection/components/sqm-referral-card/sqm-timeline.js +71 -0
- package/dist/collection/components/sqm-referral-iframe/sqm-referral-iframe-view.js +2 -4
- package/dist/collection/components/sqm-referral-table/ReferralTable.stories.js +64 -26
- package/dist/collection/components/sqm-referral-table/ReferralTableCell.stories.js +2 -1
- package/dist/collection/components/sqm-referral-table/ReferralTableRewardsCell.stories.js +26 -25
- package/dist/collection/components/sqm-referral-table/UseReferralTable.stories.js +44 -0
- package/dist/collection/components/sqm-referral-table/cells/sqm-referral-table-date-cell.js +23 -5
- package/dist/collection/components/sqm-referral-table/cells/sqm-referral-table-rewards-cell.js +256 -46
- package/dist/collection/components/sqm-referral-table/cells/sqm-referral-table-status-cell.js +14 -1
- package/dist/collection/components/sqm-referral-table/cells/sqm-referral-table-user-cell.js +2 -3
- package/dist/collection/components/sqm-referral-table/columns/sqm-referral-table-date-column.js +6 -3
- package/dist/collection/components/sqm-referral-table/columns/sqm-referral-table-rewards-column.js +156 -3
- package/dist/collection/components/sqm-referral-table/sqm-referral-table-view.js +3 -7
- package/dist/collection/components/sqm-referral-table/sqm-referral-table.js +164 -15
- package/dist/collection/components/sqm-referral-table/useReferralTable.js +32 -10
- package/dist/collection/components/sqm-refresh-button/RefreshButtonView.js +8 -0
- package/dist/collection/components/sqm-refresh-button/sqm-refresh-button.js +66 -0
- package/dist/collection/components/sqm-reward-exchange-list/RewardExchangeList.stories.js +2 -3
- package/dist/collection/components/sqm-reward-exchange-list/RewardExchangeListData.js +32 -20
- package/dist/collection/components/sqm-reward-exchange-list/sqm-reward-exchange-list-view.js +236 -196
- package/dist/collection/components/sqm-reward-exchange-list/sqm-reward-exchange-list.js +254 -12
- package/dist/collection/components/sqm-reward-exchange-list/useRewardExchangeList.js +24 -17
- package/dist/collection/components/sqm-rewards-table/RewardsTable.stories.js +955 -0
- package/dist/collection/components/sqm-rewards-table/RewardsTableCell.stories.js +183 -0
- package/dist/collection/components/sqm-rewards-table/UseRewardsTable.stories.js +46 -2
- package/dist/collection/components/sqm-rewards-table/cells/sqm-rewards-table-date-cell.js +62 -0
- package/dist/collection/components/sqm-rewards-table/cells/sqm-rewards-table-reward-cell.js +197 -0
- package/dist/collection/components/sqm-rewards-table/cells/sqm-rewards-table-source-cell.js +189 -0
- package/dist/collection/components/sqm-rewards-table/cells/sqm-rewards-table-status-cell.js +162 -0
- package/dist/collection/components/sqm-rewards-table/columns/RewardTableColumn.js +1 -0
- package/dist/collection/components/sqm-rewards-table/{sqm-rewards-table-column.js → columns/sqm-rewards-table-date-column.js} +34 -24
- package/dist/collection/components/sqm-rewards-table/columns/sqm-rewards-table-reward-column.js +144 -0
- package/dist/collection/components/sqm-rewards-table/columns/sqm-rewards-table-source-column.js +225 -0
- package/dist/collection/components/sqm-rewards-table/columns/sqm-rewards-table-status-column.js +145 -0
- package/dist/collection/components/sqm-rewards-table/sqm-rewards-table-view.js +96 -0
- package/dist/collection/components/sqm-rewards-table/sqm-rewards-table.js +155 -15
- package/dist/collection/components/sqm-rewards-table/useRewardsTable.js +48 -10
- package/dist/collection/components/sqm-share-button/ShareButton.stories.js +51 -1
- package/dist/collection/components/sqm-share-button/sqm-share-button-view.js +24 -11
- package/dist/collection/components/sqm-share-button/sqm-share-button.js +62 -10
- package/dist/collection/components/sqm-share-link/sqm-share-link-view.js +2 -4
- package/dist/collection/components/sqm-stat-container/sqm-stat-container-view.js +3 -5
- package/dist/collection/components/sqm-stencilbook/AutoColor.js +40 -45
- package/dist/collection/components/sqm-stencilbook/Themes.js +3 -11
- package/dist/collection/components/sqm-stencilbook/sqm-stencilbook.js +15 -1
- package/dist/collection/{tables → components/sqm-table-cell}/sqm-table-cell.js +0 -0
- package/dist/collection/{tables → components/sqm-table-row}/sqm-table-row.js +0 -0
- package/dist/collection/components/sqm-task-card/DetailsView.js +53 -0
- package/dist/collection/components/sqm-task-card/TaskCard.stories.js +172 -160
- package/dist/collection/components/sqm-task-card/UseTaskCard.stories.js +28 -2
- package/dist/collection/components/sqm-task-card/progress-bar/SVGs.js +1 -1
- package/dist/collection/components/sqm-task-card/progress-bar/progress-bar-view.js +349 -319
- package/dist/collection/components/sqm-task-card/sqm-task-card-view.js +293 -205
- package/dist/collection/components/sqm-task-card/sqm-task-card.js +245 -11
- package/dist/collection/components/sqm-task-card/useTaskCard.js +43 -0
- package/dist/collection/components/sqm-text-span/sqm-text-span-view.js +2 -4
- package/dist/collection/components/sqm-titled-section/sqm-portal-section-view.js +3 -7
- package/dist/collection/components/sqm-user-name/sqm-user-name.js +1 -1
- package/dist/collection/global/global.js +1 -1
- package/dist/collection/global/styles.js +13 -71
- package/dist/collection/global/styles.ts +13 -71
- package/dist/collection/stories/NewPortal.stories.js +17 -19
- package/dist/collection/styling/JSS.js +9 -0
- package/dist/collection/tables/GenericTableView.js +90 -35
- package/dist/collection/tables/TableSlots.js +9 -1
- package/dist/collection/utils/RequiredPropsError.js +2 -4
- package/dist/collection/utils/utils.js +8 -0
- package/dist/esm/AutoColor-f4ba4eec.js +1992 -0
- package/dist/esm/GenericTableView-25965d2b.js +109 -0
- package/dist/esm/{jss-preset-default.esm-71fae192.js → JSS-96eeab98.js} +5 -2
- package/dist/esm/extends-c31f1eff.js +19 -0
- package/dist/esm/{global-90da933f.js → global-baef42b7.js} +18 -119
- package/dist/esm/{sqm-leaderboard-rank-view-47844836.js → index-0e5ee1c5.js} +3 -9
- package/dist/esm/{index.module-90d2c3ad.js → index.module-c6efec0e.js} +6181 -6180
- package/dist/esm/insertcss-bcaf3818.js +45 -0
- package/dist/esm/loader.js +7 -5
- package/dist/esm/luxon-5fa22651.js +8346 -0
- package/dist/esm/mint-components.js +7 -5
- package/dist/esm/{sqm-asset-card-view-6f360937.js → sqm-asset-card-view-f9ca5345.js} +2 -3
- package/dist/esm/sqm-asset-card.entry.js +7 -6
- package/dist/esm/sqm-big-stat-view-309f7c1f.js +38 -0
- package/dist/esm/sqm-big-stat.entry.js +8 -6
- package/dist/esm/sqm-brand_24.entry.js +6802 -0
- package/dist/esm/sqm-form-message.entry.js +27 -0
- package/dist/esm/sqm-graphql-client-provider.entry.js +8 -7
- package/dist/esm/{sqm-hero-view-bfd8abd1.js → sqm-hero-view-190bc812.js} +4 -5
- package/dist/esm/sqm-hero.entry.js +6 -5
- package/dist/esm/sqm-leaderboard-rank-view-da91f5f3.js +8 -0
- package/dist/esm/sqm-leaderboard-rank.entry.js +11 -11
- package/dist/esm/sqm-leaderboard.entry.js +40 -13
- package/dist/esm/{sqm-name-fields-view-4162fb7b.js → sqm-name-fields-view-69b1583f.js} +2 -3
- package/dist/esm/sqm-name-fields.entry.js +7 -6
- package/dist/esm/{sqm-navigation-sidebar-item-view-f2304ad9.js → sqm-navigation-sidebar-item-view-0b100705.js} +7 -6
- package/dist/esm/sqm-navigation-sidebar-item.entry.js +9 -8
- package/dist/esm/{sqm-navigation-sidebar-view-2242502c.js → sqm-navigation-sidebar-view-816558e3.js} +2 -3
- package/dist/esm/sqm-navigation-sidebar.entry.js +4 -3
- package/dist/esm/sqm-password-field.entry.js +577 -0
- package/dist/esm/sqm-popup-container.entry.js +8 -7
- package/dist/esm/{sqm-portal-container-view-73757ca5.js → sqm-portal-container-view-615ef615.js} +5 -4
- package/dist/esm/{sqm-portal-email-verification-view-8cefe480.js → sqm-portal-email-verification-view-03321940.js} +5 -6
- package/dist/esm/sqm-portal-email-verification.entry.js +20 -11
- package/dist/esm/{sqm-portal-footer-view-d9fe0bf8.js → sqm-portal-footer-view-036b21ba.js} +4 -5
- package/dist/esm/sqm-portal-footer.entry.js +9 -7
- package/dist/esm/{sqm-portal-forgot-password-view-e3a6a716.js → sqm-portal-forgot-password-view-fa088f83.js} +3 -4
- package/dist/esm/sqm-portal-forgot-password.entry.js +25 -12
- package/dist/esm/sqm-portal-logout.entry.js +7 -6
- package/dist/esm/{sqm-portal-profile-view-b67467b4.js → sqm-portal-profile-view-e286254e.js} +5 -6
- package/dist/esm/sqm-portal-profile.entry.js +15 -13
- package/dist/esm/sqm-portal-protected-route.entry.js +9 -8
- package/dist/esm/{sqm-portal-reset-password-view-a4e50da2.js → sqm-portal-reset-password-view-73e14282.js} +3 -4
- package/dist/esm/sqm-portal-reset-password.entry.js +21 -12
- package/dist/esm/{sqm-portal-section-view-f0876545.js → sqm-portal-section-view-d3098f7f.js} +3 -6
- package/dist/esm/{sqm-portal-verify-email-view-6f18bac2.js → sqm-portal-verify-email-view-cbf1cfdc.js} +3 -4
- package/dist/esm/sqm-portal-verify-email.entry.js +22 -13
- package/dist/esm/sqm-referral-card.entry.js +25 -0
- package/dist/esm/sqm-referral-table_11.entry.js +852 -0
- package/dist/esm/sqm-refresh-button.entry.js +50 -0
- package/dist/esm/sqm-rewards-table_9.entry.js +731 -0
- package/dist/esm/sqm-share-code.entry.js +12 -11
- package/dist/esm/{sqm-share-link-view-9282b8e8.js → sqm-share-link-view-18f5387c.js} +2 -3
- package/dist/esm/{sqm-stat-container-view-4133feb6.js → sqm-stat-container-view-8a565c5a.js} +3 -4
- package/dist/esm/sqm-stat-container.entry.js +5 -4
- package/dist/esm/sqm-stencilbook.entry.js +13203 -0
- package/dist/esm/sqm-table-cell_3.entry.js +94 -0
- package/dist/esm/{sqm-text-span-view-1781df94.js → sqm-text-span-view-7e61c95c.js} +2 -3
- package/dist/esm/sqm-text-span.entry.js +4 -3
- package/dist/esm/sqm-titled-section.entry.js +5 -4
- package/dist/esm/{extends-3a3f9fe2.js → stencil-hooks.module-2f159754.js} +1 -19
- package/dist/esm/{use-callback-b38a1523.js → use-callback-d8ef4b5d.js} +1 -1
- package/dist/esm/{re-render-e06f2f7f.js → useChildElements-b6a77993.js} +19 -4
- package/dist/esm/{useDemoBigStat-c3b955b7.js → useDemoBigStat-3c62e7b6.js} +11 -47
- package/dist/esm/useLeaderboard-80fd5ab5.js +177 -0
- package/dist/esm/{utils-454405f5.js → utils-1d345130.js} +9 -1
- package/dist/esm-es5/AutoColor-f4ba4eec.js +1 -0
- package/dist/esm-es5/GenericTableView-25965d2b.js +1 -0
- package/dist/esm-es5/{jss-preset-default.esm-71fae192.js → JSS-96eeab98.js} +2 -2
- package/dist/esm-es5/extends-c31f1eff.js +1 -0
- package/dist/esm-es5/{global-90da933f.js → global-baef42b7.js} +2 -2
- package/dist/esm-es5/index-0e5ee1c5.js +1 -0
- package/dist/esm-es5/index.module-c6efec0e.js +1 -0
- package/dist/esm-es5/insertcss-bcaf3818.js +1 -0
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/luxon-5fa22651.js +1 -0
- package/dist/esm-es5/mint-components.js +1 -1
- package/dist/esm-es5/sqm-asset-card-view-f9ca5345.js +1 -0
- package/dist/esm-es5/sqm-asset-card.entry.js +1 -1
- package/dist/esm-es5/sqm-big-stat-view-309f7c1f.js +1 -0
- package/dist/esm-es5/sqm-big-stat.entry.js +1 -1
- package/dist/esm-es5/sqm-brand_24.entry.js +1 -0
- package/dist/esm-es5/sqm-form-message.entry.js +1 -0
- package/dist/esm-es5/sqm-graphql-client-provider.entry.js +1 -1
- package/dist/esm-es5/sqm-hero-view-190bc812.js +1 -0
- package/dist/esm-es5/sqm-hero.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-view-69b1583f.js +1 -0
- package/dist/esm-es5/sqm-name-fields.entry.js +1 -1
- package/dist/esm-es5/sqm-navigation-sidebar-item-view-0b100705.js +1 -0
- package/dist/esm-es5/sqm-navigation-sidebar-item.entry.js +1 -1
- package/dist/esm-es5/sqm-navigation-sidebar-view-816558e3.js +1 -0
- package/dist/esm-es5/sqm-navigation-sidebar.entry.js +1 -1
- package/dist/esm-es5/sqm-password-field.entry.js +1 -0
- package/dist/esm-es5/sqm-popup-container.entry.js +1 -1
- package/dist/esm-es5/sqm-portal-container-view-615ef615.js +1 -0
- package/dist/esm-es5/sqm-portal-email-verification-view-03321940.js +1 -0
- package/dist/esm-es5/sqm-portal-email-verification.entry.js +1 -1
- package/dist/esm-es5/sqm-portal-footer-view-036b21ba.js +1 -0
- package/dist/esm-es5/sqm-portal-footer.entry.js +1 -1
- package/dist/esm-es5/sqm-portal-forgot-password-view-fa088f83.js +1 -0
- 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-e286254e.js +1 -0
- 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-view-73e14282.js +1 -0
- package/dist/esm-es5/sqm-portal-reset-password.entry.js +1 -1
- package/dist/esm-es5/sqm-portal-section-view-d3098f7f.js +1 -0
- package/dist/esm-es5/sqm-portal-verify-email-view-cbf1cfdc.js +1 -0
- package/dist/esm-es5/sqm-portal-verify-email.entry.js +1 -1
- package/dist/esm-es5/sqm-referral-card.entry.js +1 -0
- package/dist/esm-es5/sqm-referral-table_11.entry.js +1 -0
- package/dist/esm-es5/sqm-refresh-button.entry.js +1 -0
- package/dist/esm-es5/sqm-rewards-table_9.entry.js +1 -0
- package/dist/esm-es5/sqm-share-code.entry.js +1 -1
- package/dist/esm-es5/sqm-share-link-view-18f5387c.js +1 -0
- package/dist/esm-es5/sqm-stat-container-view-8a565c5a.js +1 -0
- package/dist/esm-es5/sqm-stat-container.entry.js +1 -1
- package/dist/esm-es5/sqm-stencilbook.entry.js +1 -0
- package/dist/esm-es5/sqm-table-cell_3.entry.js +1 -0
- package/dist/esm-es5/sqm-text-span-view-7e61c95c.js +1 -0
- package/dist/esm-es5/sqm-text-span.entry.js +1 -1
- package/dist/esm-es5/sqm-titled-section.entry.js +1 -1
- package/dist/esm-es5/{extends-3a3f9fe2.js → stencil-hooks.module-2f159754.js} +1 -1
- package/dist/esm-es5/use-callback-d8ef4b5d.js +1 -0
- package/dist/esm-es5/useChildElements-b6a77993.js +1 -0
- package/dist/esm-es5/useDemoBigStat-3c62e7b6.js +1 -0
- package/dist/esm-es5/useLeaderboard-80fd5ab5.js +1 -0
- package/dist/esm-es5/utils-1d345130.js +1 -0
- package/dist/mint-components/global/styles.ts +13 -71
- package/dist/mint-components/mint-components.esm.js +1 -1
- package/dist/mint-components/mint-components.js +1 -1
- package/dist/mint-components/p-0115eff6.system.entry.js +1 -0
- package/dist/mint-components/p-023dcaee.js +1 -0
- package/dist/mint-components/p-04cd932f.js +1 -0
- package/dist/mint-components/p-06b567db.entry.js +13 -0
- package/dist/mint-components/p-0c18b278.entry.js +1 -0
- package/dist/mint-components/p-0c19f830.entry.js +1 -0
- package/dist/mint-components/p-0e928e93.system.entry.js +1 -0
- package/dist/mint-components/p-177b349a.entry.js +1 -0
- package/dist/mint-components/p-178e8aeb.js +1 -0
- package/dist/mint-components/p-179988b5.js +1 -0
- package/dist/mint-components/p-182da4c3.entry.js +1 -0
- package/dist/mint-components/p-1959da16.system.js +1 -0
- package/dist/mint-components/p-1b29406e.entry.js +1 -0
- package/dist/mint-components/p-1c17892a.system.js +1 -0
- package/dist/mint-components/p-1d1e9197.js +1 -0
- package/dist/mint-components/p-204fd08c.js +1 -0
- package/dist/mint-components/p-232db563.system.entry.js +1 -0
- package/dist/mint-components/p-2454f30a.system.entry.js +1 -0
- package/dist/mint-components/p-24a562cc.system.js +1 -0
- package/dist/mint-components/p-2746ee47.js +1 -0
- package/dist/mint-components/p-27e97f15.system.js +1 -0
- package/dist/mint-components/p-281dbe34.entry.js +1 -0
- package/dist/mint-components/p-29cbad7a.system.entry.js +1 -0
- package/dist/mint-components/p-2a339ffe.entry.js +107 -0
- package/dist/mint-components/p-2dc88a1b.js +1 -0
- package/dist/mint-components/p-2ee78b3d.js +1 -0
- package/dist/mint-components/p-342256ce.entry.js +1 -0
- package/dist/mint-components/p-348461ec.system.entry.js +1 -0
- package/dist/mint-components/p-34e274fb.entry.js +1 -0
- package/dist/mint-components/p-373fa002.js +1 -0
- package/dist/mint-components/p-3a2a3c3e.system.entry.js +1 -0
- package/dist/mint-components/{p-1b7d89a7.system.js → p-3bbb90a9.system.js} +2 -2
- package/dist/mint-components/p-3e556042.js +1 -0
- package/dist/mint-components/p-3f32aae4.system.entry.js +1 -0
- package/dist/mint-components/p-3f97db68.entry.js +1 -0
- package/dist/mint-components/{p-723ebe45.entry.js → p-4164d2b4.entry.js} +2 -2
- package/dist/mint-components/p-4279da4b.system.js +1 -0
- package/dist/mint-components/p-44310711.system.entry.js +1 -0
- package/dist/mint-components/p-4a1b7d35.js +1 -0
- package/dist/mint-components/p-4a986ac1.system.js +1 -0
- package/dist/mint-components/p-4e05c65a.js +1 -0
- package/dist/mint-components/p-5289072a.js +1 -0
- package/dist/mint-components/{p-b608f7a4.system.js → p-53ee371d.system.js} +22 -22
- package/dist/mint-components/p-55c69ba3.system.entry.js +1 -0
- package/dist/mint-components/p-591de129.js +1 -0
- package/dist/mint-components/p-593c8acb.system.entry.js +1 -0
- package/dist/mint-components/p-5adee990.js +32 -0
- package/dist/mint-components/p-5c75acad.js +1 -0
- package/dist/mint-components/p-5e8ee25d.system.entry.js +1 -0
- package/dist/mint-components/p-5ea593b1.system.js +1 -0
- package/dist/mint-components/p-61d6a391.js +1 -0
- package/dist/mint-components/p-61d769e2.system.js +1 -0
- package/dist/mint-components/p-641509ef.entry.js +1 -0
- package/dist/mint-components/p-64e48f85.system.entry.js +1 -0
- package/dist/mint-components/p-6501669d.system.entry.js +1 -0
- package/dist/mint-components/p-6b43e4cc.system.js +1 -0
- package/dist/mint-components/p-6b7cc8dc.entry.js +161 -0
- package/dist/mint-components/p-73d5306f.js +1 -0
- package/dist/mint-components/p-795e4668.system.entry.js +1 -0
- package/dist/mint-components/p-7e8cce0b.system.js +1 -0
- package/dist/mint-components/p-81681ebd.system.entry.js +1 -0
- package/dist/mint-components/p-81f34787.js +1 -0
- package/dist/mint-components/p-88de7fd1.system.entry.js +1 -0
- package/dist/mint-components/p-8bcaafaf.system.js +1 -0
- package/dist/mint-components/{p-46a4269a.js → p-8eb39116.js} +3 -3
- package/dist/mint-components/p-91ab2b0d.system.entry.js +1 -0
- package/dist/mint-components/p-91d119ad.system.js +1 -0
- package/dist/mint-components/p-9362280b.entry.js +1 -0
- package/dist/mint-components/{p-015b683f.system.js → p-9580888c.system.js} +2 -2
- package/dist/mint-components/p-9632b815.entry.js +9 -0
- package/dist/mint-components/p-98393bf0.entry.js +1 -0
- package/dist/mint-components/p-989d0634.entry.js +13 -0
- package/dist/mint-components/p-9b3fb533.system.entry.js +1 -0
- package/dist/mint-components/p-9b48d01e.js +1 -0
- package/dist/mint-components/p-9d1104a8.js +235 -0
- package/dist/mint-components/p-a09e3176.system.js +1 -0
- package/dist/mint-components/p-a11e146e.entry.js +1 -0
- package/dist/mint-components/p-a31d3fbf.entry.js +1 -0
- package/dist/mint-components/p-a58d909c.js +1 -0
- package/dist/mint-components/p-a6d5deab.system.js +1 -0
- package/dist/mint-components/p-b0e8c584.system.entry.js +1 -0
- package/dist/mint-components/p-b3201e4c.entry.js +1 -0
- package/dist/mint-components/p-b3896502.system.entry.js +1 -0
- package/dist/mint-components/p-b3abf90a.system.entry.js +1 -0
- package/dist/mint-components/p-b3af1c6f.js +1 -0
- package/dist/mint-components/p-b3c09e54.js +30 -0
- package/dist/mint-components/p-b69365f5.entry.js +1 -0
- package/dist/mint-components/{p-44578b22.js → p-b7da9a8a.js} +1 -1
- package/dist/mint-components/p-b8434fc0.system.js +1 -0
- package/dist/mint-components/p-ba4293fd.system.js +1 -0
- package/dist/mint-components/p-ba801e50.system.entry.js +1 -0
- package/dist/mint-components/p-babbd7ee.system.js +1 -0
- package/dist/mint-components/p-bb7bf658.system.js +1 -0
- package/dist/mint-components/p-bccaa2d4.entry.js +1 -0
- package/dist/mint-components/p-bda464b8.system.entry.js +1 -0
- package/dist/mint-components/p-bf055b6c.system.js +1 -0
- package/dist/mint-components/p-c136f20e.entry.js +1 -0
- package/dist/mint-components/p-c2a2ac04.system.entry.js +1 -0
- package/dist/mint-components/p-c3f300e8.system.js +1 -0
- package/dist/mint-components/p-c4fb3862.entry.js +1 -0
- package/dist/mint-components/p-c68f123d.system.entry.js +1 -0
- package/dist/mint-components/p-c93f52d5.entry.js +1 -0
- package/dist/mint-components/p-cb93f2c8.entry.js +1 -0
- package/dist/mint-components/p-ce0ec1c4.system.js +1 -0
- package/dist/mint-components/p-ce4f83a1.system.js +1 -0
- package/dist/mint-components/p-d1520098.js +1 -0
- package/dist/mint-components/p-d33eb961.js +1 -0
- package/dist/mint-components/p-ddb0e1d3.js +1 -0
- package/dist/mint-components/p-df30c4ce.system.entry.js +1 -0
- package/dist/mint-components/p-df466813.system.js +1 -0
- package/dist/mint-components/p-e00e11b1.system.js +1 -0
- package/dist/mint-components/p-e0a37a67.system.entry.js +1 -0
- package/dist/mint-components/p-e1aab0fd.system.js +1 -0
- package/dist/mint-components/p-e2c1f185.entry.js +1 -0
- package/dist/mint-components/p-e73ce4c1.system.entry.js +1 -0
- package/dist/mint-components/p-e85a8de8.entry.js +1 -0
- package/dist/mint-components/p-e8a78952.system.js +1 -0
- package/dist/mint-components/p-ea110693.system.js +1 -0
- package/dist/mint-components/p-eba2e455.system.js +1 -0
- package/dist/mint-components/p-eecaab51.system.entry.js +1 -0
- package/dist/mint-components/p-f23eb849.system.js +1 -0
- package/dist/mint-components/p-f28f40ea.system.entry.js +1 -0
- package/dist/mint-components/p-f372c8d8.entry.js +1 -0
- package/dist/mint-components/p-f4015b7d.js +1 -0
- package/dist/mint-components/p-f4c0cd0b.js +1 -0
- package/dist/mint-components/p-f8d95abc.system.js +1 -0
- package/dist/mint-components/p-f8dbd0ee.system.js +1 -0
- package/dist/mint-components/p-fd5c4e67.entry.js +86 -0
- package/dist/mint-components/p-fff2ded5.js +1 -0
- package/dist/types/components/sqm-big-stat/sqm-big-stat-view.d.ts +1 -0
- package/dist/types/components/sqm-big-stat/sqm-big-stat.d.ts +6 -0
- package/dist/types/components/sqm-big-stat/useBigStat.d.ts +1 -0
- package/dist/types/components/sqm-brand/sqm-brand.d.ts +2 -2
- package/dist/types/components/sqm-card-feed/CardFeed.stories.d.ts +5 -0
- package/dist/types/components/sqm-card-feed/sqm-card-feed-view.d.ts +6 -0
- package/dist/types/components/sqm-card-feed/sqm-card-feed.d.ts +18 -0
- package/dist/types/components/sqm-leaderboard/Leaderboard.stories.d.ts +3 -0
- package/dist/types/components/sqm-leaderboard/sqm-leaderboard-view.d.ts +9 -0
- package/dist/types/components/sqm-leaderboard/sqm-leaderboard.d.ts +8 -0
- package/dist/types/components/sqm-leaderboard/useLeaderboard.d.ts +2 -0
- package/dist/types/components/sqm-media/Media.stories.d.ts +12 -0
- package/dist/types/components/sqm-media/sqm-media-view.d.ts +17 -0
- package/dist/types/components/sqm-media/sqm-media.d.ts +64 -0
- package/dist/types/components/sqm-portal-container/PortalContainer.stories.d.ts +11 -0
- package/dist/types/components/sqm-portal-container/sqm-portal-container-view.d.ts +1 -0
- package/dist/types/components/sqm-portal-container/sqm-portal-container.d.ts +4 -0
- package/dist/types/components/sqm-portal-email-verification/sqm-portal-email-verification.d.ts +6 -0
- package/dist/types/components/sqm-portal-forgot-password/sqm-portal-forgot-password-view.d.ts +1 -0
- package/dist/types/components/sqm-portal-forgot-password/sqm-portal-forgot-password.d.ts +10 -0
- package/dist/types/components/sqm-portal-forgot-password/usePortalForgotPassword.d.ts +3 -1
- package/dist/types/components/sqm-portal-login/sqm-portal-login-view.d.ts +2 -0
- package/dist/types/components/sqm-portal-login/sqm-portal-login.d.ts +8 -0
- package/dist/types/components/sqm-portal-login/usePortalLogin.d.ts +3 -3
- package/dist/types/components/sqm-portal-register/PortalRegister.stories.d.ts +1 -0
- package/dist/types/components/sqm-portal-register/sqm-portal-register-view.d.ts +6 -3
- package/dist/types/components/sqm-portal-register/sqm-portal-register.d.ts +10 -0
- package/dist/types/components/sqm-portal-register/usePortalRegister.d.ts +1 -0
- package/dist/types/components/sqm-portal-reset-password/sqm-portal-reset-password.d.ts +8 -0
- package/dist/types/components/sqm-portal-verify-email/sqm-portal-verify-email.d.ts +8 -0
- package/dist/types/components/sqm-portal-verify-email/usePortalVerifyEmail.d.ts +2 -1
- package/dist/types/components/sqm-program-explainer/ProgramExplainer.stories.d.ts +1 -2
- package/dist/types/components/sqm-program-explainer/sqm-program-explainer-view.d.ts +2 -4
- package/dist/types/components/sqm-program-explainer/sqm-program-explainer.d.ts +5 -13
- package/dist/types/components/sqm-program-explainer-step/ProgramExplainerStep.stories.d.ts +2 -1
- package/dist/types/components/sqm-program-explainer-step/sqm-program-explainer-step-view.d.ts +5 -4
- package/dist/types/components/sqm-program-explainer-step/sqm-program-explainer-step.d.ts +8 -4
- package/dist/types/components/sqm-referral-card/ReferralCard.stories.d.ts +9 -0
- package/dist/types/components/sqm-referral-card/SVGs.d.ts +3 -0
- package/dist/types/components/sqm-referral-card/sqm-referral-card-view.d.ts +6 -0
- package/dist/types/components/sqm-referral-card/sqm-referral-card.d.ts +18 -0
- package/dist/types/components/sqm-referral-card/sqm-timeline-reward.d.ts +25 -0
- package/dist/types/components/sqm-referral-card/sqm-timeline.d.ts +13 -0
- package/dist/types/components/sqm-referral-table/UseReferralTable.stories.d.ts +10 -0
- package/dist/types/components/sqm-referral-table/cells/sqm-referral-table-date-cell.d.ts +2 -1
- package/dist/types/components/sqm-referral-table/cells/sqm-referral-table-rewards-cell.d.ts +7 -0
- package/dist/types/components/sqm-referral-table/cells/sqm-referral-table-user-cell.d.ts +1 -1
- package/dist/types/components/sqm-referral-table/columns/ReferralTableColumn.d.ts +1 -1
- package/dist/types/components/sqm-referral-table/columns/sqm-referral-table-date-column.d.ts +1 -1
- package/dist/types/components/sqm-referral-table/columns/sqm-referral-table-rewards-column.d.ts +25 -1
- package/dist/types/components/sqm-referral-table/sqm-referral-table.d.ts +14 -2
- package/dist/types/components/sqm-referral-table/useReferralTable.d.ts +3 -2
- package/dist/types/components/sqm-refresh-button/RefreshButtonView.d.ts +15 -0
- package/dist/types/components/sqm-refresh-button/sqm-refresh-button.d.ts +12 -0
- package/dist/types/components/sqm-reward-exchange-list/RewardExchangeList.stories.d.ts +1 -2
- package/dist/types/components/sqm-reward-exchange-list/RewardExchangeListData.d.ts +231 -30
- package/dist/types/components/sqm-reward-exchange-list/sqm-reward-exchange-list-view.d.ts +3 -0
- package/dist/types/components/sqm-reward-exchange-list/sqm-reward-exchange-list.d.ts +47 -0
- package/dist/types/components/sqm-reward-exchange-list/useRewardExchangeList.d.ts +0 -1
- package/dist/types/components/sqm-rewards-table/RewardsTable.stories.d.ts +6 -0
- package/dist/types/components/sqm-rewards-table/RewardsTableCell.stories.d.ts +23 -0
- package/dist/types/components/sqm-rewards-table/UseRewardsTable.stories.d.ts +6 -0
- package/dist/types/components/sqm-rewards-table/cells/sqm-rewards-table-date-cell.d.ts +8 -0
- package/dist/types/components/sqm-rewards-table/cells/sqm-rewards-table-reward-cell.d.ts +7 -0
- package/dist/types/components/sqm-rewards-table/cells/sqm-rewards-table-source-cell.d.ts +10 -0
- package/dist/types/components/sqm-rewards-table/cells/sqm-rewards-table-status-cell.d.ts +8 -0
- package/dist/types/components/sqm-rewards-table/columns/RewardTableColumn.d.ts +5 -0
- package/dist/types/components/sqm-rewards-table/columns/sqm-rewards-table-date-column.d.ts +25 -0
- package/dist/types/components/sqm-rewards-table/columns/sqm-rewards-table-reward-column.d.ts +23 -0
- package/dist/types/components/sqm-rewards-table/columns/sqm-rewards-table-source-column.d.ts +37 -0
- package/dist/types/components/sqm-rewards-table/columns/sqm-rewards-table-status-column.d.ts +23 -0
- package/dist/types/components/sqm-rewards-table/sqm-rewards-table-view.d.ts +32 -0
- package/dist/types/components/sqm-rewards-table/sqm-rewards-table.d.ts +12 -2
- package/dist/types/components/sqm-rewards-table/useRewardsTable.d.ts +2 -35
- package/dist/types/components/sqm-share-button/ShareButton.stories.d.ts +3 -0
- package/dist/types/components/sqm-share-button/sqm-share-button-view.d.ts +3 -0
- package/dist/types/components/sqm-share-button/sqm-share-button.d.ts +12 -0
- package/dist/types/components/sqm-stencilbook/AutoColor.d.ts +0 -8
- package/dist/types/components/sqm-stencilbook/Themes.d.ts +1 -1
- package/dist/types/{tables → components/sqm-table-cell}/sqm-table-cell.d.ts +0 -0
- package/dist/types/{tables → components/sqm-table-row}/sqm-table-row.d.ts +0 -0
- package/dist/types/components/sqm-task-card/DetailsView.d.ts +41 -0
- package/dist/types/components/sqm-task-card/UseTaskCard.stories.d.ts +6 -0
- package/dist/types/components/sqm-task-card/progress-bar/SVGs.d.ts +1 -1
- package/dist/types/components/sqm-task-card/sqm-task-card-view.d.ts +33 -15
- package/dist/types/components/sqm-task-card/sqm-task-card.d.ts +51 -3
- package/dist/types/components/sqm-task-card/useTaskCard.d.ts +11 -0
- package/dist/types/components/sqm-user-name/sqm-user-name.d.ts +1 -1
- package/dist/types/components.d.ts +1038 -78
- package/dist/types/global/styles.d.ts +1 -1
- package/dist/types/saasquatch.d.ts +35 -0
- package/dist/types/styling/JSS.d.ts +7 -0
- package/dist/types/tables/GenericTableView.d.ts +3 -0
- package/dist/types/tables/TableSlots.d.ts +1 -0
- package/dist/types/utils/utils.d.ts +1 -0
- package/grapesjs/grapesjs.js +1 -1
- package/package.json +8 -6
- package/dist/cjs/sqm-brand_31.cjs.entry.js +0 -32786
- package/dist/cjs/sqm-portal-container.cjs.entry.js +0 -35
- package/dist/cjs/sqm-program-explainer-step-view-74863815.js +0 -70
- package/dist/cjs/sqm-program-explainer-step.cjs.entry.js +0 -22
- package/dist/cjs/sqm-program-explainer-view-afed92f5.js +0 -45
- package/dist/cjs/sqm-program-explainer.cjs.entry.js +0 -23
- package/dist/cjs/sqm-referral-table-column.cjs.entry.js +0 -30
- package/dist/cjs/sqm-referral-table-date-column.cjs.entry.js +0 -47
- package/dist/cjs/sqm-referral-table-rewards-column.cjs.entry.js +0 -38
- package/dist/cjs/sqm-referral-table-status-column.cjs.entry.js +0 -45
- package/dist/cjs/sqm-referral-table-user-column.cjs.entry.js +0 -57
- package/dist/cjs/use-callback-fadb2643.js +0 -7
- package/dist/esm/ShadowViewAddon-a3f510db.js +0 -122
- package/dist/esm/sqm-brand_31.entry.js +0 -32752
- package/dist/esm/sqm-portal-container.entry.js +0 -31
- package/dist/esm/sqm-program-explainer-step-view-f190277a.js +0 -68
- package/dist/esm/sqm-program-explainer-step.entry.js +0 -18
- package/dist/esm/sqm-program-explainer-view-1c603bb7.js +0 -43
- package/dist/esm/sqm-program-explainer.entry.js +0 -19
- package/dist/esm/sqm-referral-table-column.entry.js +0 -26
- package/dist/esm/sqm-referral-table-date-column.entry.js +0 -43
- package/dist/esm/sqm-referral-table-rewards-column.entry.js +0 -34
- package/dist/esm/sqm-referral-table-status-column.entry.js +0 -41
- package/dist/esm/sqm-referral-table-user-column.entry.js +0 -53
- package/dist/esm-es5/ShadowViewAddon-a3f510db.js +0 -1
- package/dist/esm-es5/index.module-90d2c3ad.js +0 -1
- package/dist/esm-es5/re-render-e06f2f7f.js +0 -1
- package/dist/esm-es5/sqm-asset-card-view-6f360937.js +0 -1
- package/dist/esm-es5/sqm-brand_31.entry.js +0 -58
- package/dist/esm-es5/sqm-hero-view-bfd8abd1.js +0 -1
- package/dist/esm-es5/sqm-leaderboard-rank-view-47844836.js +0 -1
- package/dist/esm-es5/sqm-name-fields-view-4162fb7b.js +0 -1
- package/dist/esm-es5/sqm-navigation-sidebar-item-view-f2304ad9.js +0 -1
- package/dist/esm-es5/sqm-navigation-sidebar-view-2242502c.js +0 -1
- package/dist/esm-es5/sqm-portal-container-view-73757ca5.js +0 -1
- package/dist/esm-es5/sqm-portal-container.entry.js +0 -1
- package/dist/esm-es5/sqm-portal-email-verification-view-8cefe480.js +0 -1
- package/dist/esm-es5/sqm-portal-footer-view-d9fe0bf8.js +0 -1
- package/dist/esm-es5/sqm-portal-forgot-password-view-e3a6a716.js +0 -1
- package/dist/esm-es5/sqm-portal-profile-view-b67467b4.js +0 -1
- package/dist/esm-es5/sqm-portal-reset-password-view-a4e50da2.js +0 -1
- package/dist/esm-es5/sqm-portal-section-view-f0876545.js +0 -1
- package/dist/esm-es5/sqm-portal-verify-email-view-6f18bac2.js +0 -1
- package/dist/esm-es5/sqm-program-explainer-step-view-f190277a.js +0 -1
- package/dist/esm-es5/sqm-program-explainer-step.entry.js +0 -1
- package/dist/esm-es5/sqm-program-explainer-view-1c603bb7.js +0 -1
- package/dist/esm-es5/sqm-program-explainer.entry.js +0 -1
- package/dist/esm-es5/sqm-referral-table-column.entry.js +0 -1
- package/dist/esm-es5/sqm-referral-table-date-column.entry.js +0 -1
- package/dist/esm-es5/sqm-referral-table-rewards-column.entry.js +0 -1
- package/dist/esm-es5/sqm-referral-table-status-column.entry.js +0 -1
- package/dist/esm-es5/sqm-referral-table-user-column.entry.js +0 -1
- package/dist/esm-es5/sqm-share-link-view-9282b8e8.js +0 -1
- package/dist/esm-es5/sqm-stat-container-view-4133feb6.js +0 -1
- package/dist/esm-es5/sqm-text-span-view-1781df94.js +0 -1
- package/dist/esm-es5/use-callback-b38a1523.js +0 -1
- package/dist/esm-es5/useDemoBigStat-c3b955b7.js +0 -1
- package/dist/esm-es5/utils-454405f5.js +0 -1
- package/dist/mint-components/p-07c924fa.system.js +0 -1
- package/dist/mint-components/p-0a39b23c.system.entry.js +0 -1
- package/dist/mint-components/p-0bcefa93.entry.js +0 -1
- package/dist/mint-components/p-0eb3e89c.js +0 -1
- package/dist/mint-components/p-1575e8a3.system.js +0 -1
- package/dist/mint-components/p-160bd62f.entry.js +0 -1
- package/dist/mint-components/p-16f5a7cb.system.js +0 -1
- package/dist/mint-components/p-1a09e4e1.system.entry.js +0 -1
- package/dist/mint-components/p-1c8b0290.entry.js +0 -1
- package/dist/mint-components/p-1dcdca58.system.entry.js +0 -1
- package/dist/mint-components/p-1e182e88.system.js +0 -1
- package/dist/mint-components/p-20d41ab1.entry.js +0 -1
- package/dist/mint-components/p-221a4097.entry.js +0 -1
- package/dist/mint-components/p-223b42bd.system.entry.js +0 -1
- package/dist/mint-components/p-224504ad.js +0 -1
- package/dist/mint-components/p-24b3c6f0.system.entry.js +0 -1
- package/dist/mint-components/p-24c9a599.system.entry.js +0 -1
- package/dist/mint-components/p-282ed862.js +0 -1
- package/dist/mint-components/p-29fab29b.entry.js +0 -1
- package/dist/mint-components/p-2d6421b6.system.js +0 -1
- package/dist/mint-components/p-304e6c82.system.entry.js +0 -1
- package/dist/mint-components/p-3397167c.entry.js +0 -1
- package/dist/mint-components/p-33c5ffb7.entry.js +0 -1
- package/dist/mint-components/p-34696973.system.js +0 -1
- package/dist/mint-components/p-35476f7e.system.js +0 -1
- package/dist/mint-components/p-396bf448.system.entry.js +0 -1
- package/dist/mint-components/p-3b6228f4.system.js +0 -1
- package/dist/mint-components/p-3b97aed8.system.js +0 -1
- package/dist/mint-components/p-3ce2fb83.system.js +0 -1
- package/dist/mint-components/p-3d856985.entry.js +0 -1
- package/dist/mint-components/p-4052b948.system.entry.js +0 -1
- package/dist/mint-components/p-412a9226.system.entry.js +0 -1
- package/dist/mint-components/p-412d31b1.js +0 -1
- package/dist/mint-components/p-44d0fc80.system.entry.js +0 -1
- package/dist/mint-components/p-45c752a0.entry.js +0 -1
- package/dist/mint-components/p-49cbd0a2.entry.js +0 -13
- package/dist/mint-components/p-509dda90.js +0 -1
- package/dist/mint-components/p-52802c88.entry.js +0 -13
- package/dist/mint-components/p-53b0c355.system.js +0 -1
- package/dist/mint-components/p-53ec4863.entry.js +0 -1
- package/dist/mint-components/p-547a0354.system.js +0 -1
- package/dist/mint-components/p-5480e4ee.entry.js +0 -1
- package/dist/mint-components/p-55f8387d.system.js +0 -1
- package/dist/mint-components/p-562199e3.system.js +0 -1
- package/dist/mint-components/p-563253e8.js +0 -17
- package/dist/mint-components/p-5f4d838e.system.entry.js +0 -58
- package/dist/mint-components/p-60855d33.system.js +0 -1
- package/dist/mint-components/p-60ae1ec5.system.js +0 -1
- package/dist/mint-components/p-67ae18d1.system.entry.js +0 -1
- package/dist/mint-components/p-6882070c.js +0 -1
- package/dist/mint-components/p-69bcf4fa.system.entry.js +0 -1
- package/dist/mint-components/p-69f28472.system.js +0 -1
- package/dist/mint-components/p-6bf0a4d9.system.entry.js +0 -1
- package/dist/mint-components/p-6c9c4477.js +0 -1
- package/dist/mint-components/p-6d27cd05.system.entry.js +0 -1
- package/dist/mint-components/p-6e245fa3.system.entry.js +0 -1
- package/dist/mint-components/p-73148868.system.entry.js +0 -1
- package/dist/mint-components/p-739b3032.js +0 -1
- package/dist/mint-components/p-8435a22d.entry.js +0 -1
- package/dist/mint-components/p-84dc4854.entry.js +0 -397
- package/dist/mint-components/p-883a32e7.entry.js +0 -1
- package/dist/mint-components/p-952ed169.js +0 -1
- package/dist/mint-components/p-96a1967b.entry.js +0 -1
- package/dist/mint-components/p-99f1208f.js +0 -1
- package/dist/mint-components/p-9b4f2af6.js +0 -1
- package/dist/mint-components/p-9c554ca0.system.js +0 -1
- package/dist/mint-components/p-9c79643f.system.js +0 -1
- package/dist/mint-components/p-9d6dbb2d.entry.js +0 -1
- package/dist/mint-components/p-9e4e397a.system.entry.js +0 -1
- package/dist/mint-components/p-9e4fee30.system.entry.js +0 -1
- package/dist/mint-components/p-a2c3cff3.js +0 -1
- package/dist/mint-components/p-a4c2c7ed.entry.js +0 -1
- package/dist/mint-components/p-a565e753.entry.js +0 -1
- package/dist/mint-components/p-a6094ff9.system.js +0 -1
- package/dist/mint-components/p-a8b913a8.js +0 -1
- package/dist/mint-components/p-aaf68d9d.system.js +0 -1
- package/dist/mint-components/p-ade44a4e.entry.js +0 -1
- package/dist/mint-components/p-b1bb07db.entry.js +0 -1
- package/dist/mint-components/p-b8bd2607.entry.js +0 -1
- package/dist/mint-components/p-ba505a8c.js +0 -1
- package/dist/mint-components/p-bb76c6f3.system.js +0 -1
- package/dist/mint-components/p-bc8b6125.js +0 -1
- package/dist/mint-components/p-bd903567.js +0 -1
- package/dist/mint-components/p-be2738b0.system.entry.js +0 -1
- package/dist/mint-components/p-bf1b79ba.entry.js +0 -1
- package/dist/mint-components/p-c3bf9440.entry.js +0 -1
- package/dist/mint-components/p-c3f91add.system.entry.js +0 -1
- package/dist/mint-components/p-c6114bfe.system.js +0 -1
- package/dist/mint-components/p-c79c608d.system.entry.js +0 -1
- package/dist/mint-components/p-cca9026f.system.entry.js +0 -1
- package/dist/mint-components/p-cdeae699.system.js +0 -1
- package/dist/mint-components/p-d174d0bc.system.entry.js +0 -1
- package/dist/mint-components/p-d21e0dbd.js +0 -1
- package/dist/mint-components/p-d35b0366.js +0 -1
- package/dist/mint-components/p-d7d6bf44.system.js +0 -1
- package/dist/mint-components/p-db2e4c42.js +0 -1
- package/dist/mint-components/p-db5a1e78.js +0 -1
- package/dist/mint-components/p-dc603d08.system.entry.js +0 -1
- package/dist/mint-components/p-e069bc2d.entry.js +0 -1
- package/dist/mint-components/p-e14c15ca.system.entry.js +0 -1
- package/dist/mint-components/p-e426715b.js +0 -1
- package/dist/mint-components/p-e43cc1f8.system.entry.js +0 -1
- package/dist/mint-components/p-e6d77d20.system.entry.js +0 -1
- package/dist/mint-components/p-e7f633b9.system.js +0 -1
- package/dist/mint-components/p-ebcd8a59.js +0 -1
- package/dist/mint-components/p-f17050de.entry.js +0 -1
- package/dist/mint-components/p-f85f36c6.system.entry.js +0 -1
- package/dist/mint-components/p-f90486ca.js +0 -235
- package/dist/mint-components/p-f9cb55dc.entry.js +0 -1
- package/dist/mint-components/p-fb1b6fdf.js +0 -1
- package/dist/mint-components/p-fce1dbf6.entry.js +0 -1
- package/dist/mint-components/p-fee468b7.system.entry.js +0 -1
- package/dist/mint-components/p-fee6801c.js +0 -1
- package/dist/types/components/sqm-rewards-table/sqm-rewards-table-column.d.ts +0 -20
- package/dist/types/global/android.d.ts +0 -7
- package/dist/types/global/demo.d.ts +0 -1
- package/dist/types/stories/features.d.ts +0 -4
- package/dist/types/stories/templates.d.ts +0 -4
|
@@ -0,0 +1,2007 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const index = require('./index-b0129cd6.js');
|
|
4
|
+
const stencilHooks_module = require('./stencil-hooks.module-87a1f4f7.js');
|
|
5
|
+
const global = require('./global-e375afa1.js');
|
|
6
|
+
const index_module = require('./index.module-10eb2374.js');
|
|
7
|
+
const mixins = require('./mixins-7b7c59fe.js');
|
|
8
|
+
const JSS = require('./JSS-c65a40f1.js');
|
|
9
|
+
const index$1 = require('./index-d9b12889.js');
|
|
10
|
+
const luxon = require('./luxon-59ca7d19.js');
|
|
11
|
+
const utils = require('./utils-01dbfd4a.js');
|
|
12
|
+
const sqmTextSpanView = require('./sqm-text-span-view-f101dedf.js');
|
|
13
|
+
const sqmPortalContainerView = require('./sqm-portal-container-view-d8cc826b.js');
|
|
14
|
+
const sqmShareLinkView = require('./sqm-share-link-view-8e984365.js');
|
|
15
|
+
const sqmPortalSectionView = require('./sqm-portal-section-view-3b6c990e.js');
|
|
16
|
+
|
|
17
|
+
function ShareButtonView(props, children) {
|
|
18
|
+
const vanillaStyle = `
|
|
19
|
+
*::part(base) {
|
|
20
|
+
background: ${props.backgroundcolor ? props.backgroundcolor : ""};
|
|
21
|
+
color: ${props.textcolor ? props.textcolor : ""};
|
|
22
|
+
border-radius: ${props.borderradius ? props.borderradius + "px" : ""};
|
|
23
|
+
}
|
|
24
|
+
*::part(label) {
|
|
25
|
+
position: relative;
|
|
26
|
+
top: 5%;
|
|
27
|
+
}
|
|
28
|
+
`;
|
|
29
|
+
const style = {
|
|
30
|
+
HostBlock: mixins.HostBlock,
|
|
31
|
+
buttonStyle: {
|
|
32
|
+
display: "flex",
|
|
33
|
+
alignItems: "center",
|
|
34
|
+
justifyContent: "center",
|
|
35
|
+
lineHeight: "0",
|
|
36
|
+
},
|
|
37
|
+
};
|
|
38
|
+
const sheet = JSS.createStyleSheet(style);
|
|
39
|
+
const styleString = sheet.toString();
|
|
40
|
+
return props.hide ? (index.h(index.Host, { style: { display: "none" } })) : (index.h("div", null,
|
|
41
|
+
index.h("style", { type: "text/css" }, styleString),
|
|
42
|
+
index.h("style", { type: "text/css" }, vanillaStyle),
|
|
43
|
+
index.h("sl-button", { class: sheet.classes.buttonStyle, loading: props.loading, disabled: props.disabled, pill: props.pill, size: props.size, type: props.type, onClick: props.onClick, exportparts: `base: ${props.type}sharebutton-base` },
|
|
44
|
+
!props.hideicon && (index.h("sl-icon", { slot: props.iconslot, name: props.icon ? props.icon : props.medium, exportparts: "icon" })),
|
|
45
|
+
!props.hidetext && children)));
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
const style = {
|
|
49
|
+
HostBlock: mixins.HostBlock,
|
|
50
|
+
":host": {
|
|
51
|
+
"min-height": "100vh",
|
|
52
|
+
},
|
|
53
|
+
Frame: {
|
|
54
|
+
"min-height": "100vh",
|
|
55
|
+
display: "flex",
|
|
56
|
+
"flex-direction": "column",
|
|
57
|
+
"box-sizing": "border-box",
|
|
58
|
+
},
|
|
59
|
+
FooterWrapper: {
|
|
60
|
+
width: "100%",
|
|
61
|
+
"max-width": "100%",
|
|
62
|
+
padding: "var(--sl-spacing-medium) var(--sl-spacing-x-large)",
|
|
63
|
+
background: "var(--sqm-footer-background)",
|
|
64
|
+
display: "flex",
|
|
65
|
+
"justify-content": "flex-end",
|
|
66
|
+
"align-items": "center",
|
|
67
|
+
"box-sizing": "border-box",
|
|
68
|
+
"margin-top": "auto",
|
|
69
|
+
},
|
|
70
|
+
HeaderWrapper: {
|
|
71
|
+
width: "100%",
|
|
72
|
+
"max-width": "100%",
|
|
73
|
+
"box-sizing": "border-box",
|
|
74
|
+
display: "flex",
|
|
75
|
+
"justify-content": "space-between",
|
|
76
|
+
padding: "var(--sl-spacing-small) var(--sl-spacing-large)",
|
|
77
|
+
"align-items": "center",
|
|
78
|
+
"background-color": "var(--sqm-header-background)",
|
|
79
|
+
"@media screen and (max-width: 499px)": {
|
|
80
|
+
"flex-direction": "row-reverse",
|
|
81
|
+
"justify-content": "flex-end",
|
|
82
|
+
padding: "0",
|
|
83
|
+
},
|
|
84
|
+
},
|
|
85
|
+
};
|
|
86
|
+
const sheet = JSS.createStyleSheet(style);
|
|
87
|
+
const styleString = sheet.toString();
|
|
88
|
+
function PortalFrameView(props, children) {
|
|
89
|
+
const { data } = props;
|
|
90
|
+
return (index.h("div", { class: sheet.classes.Frame },
|
|
91
|
+
index.h("style", { type: "text/css" }, styleString),
|
|
92
|
+
index.h("div", { class: sheet.classes.HeaderWrapper },
|
|
93
|
+
data.header,
|
|
94
|
+
index.h("slot", { name: "sqm-navigation-menu" })),
|
|
95
|
+
children,
|
|
96
|
+
index.h("div", { class: sheet.classes.FooterWrapper }, data.footer)));
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
const EditProfileView = (props) => {
|
|
100
|
+
var _a, _b, _c, _d;
|
|
101
|
+
const { states, callbacks } = props;
|
|
102
|
+
const { text } = states;
|
|
103
|
+
const { errors } = states.formState;
|
|
104
|
+
if (states.showEdit) {
|
|
105
|
+
return (index.h("div", { class: `CardWrapper ${!states.showEdit && "ShowEdit"}` },
|
|
106
|
+
index.h("h2", { style: {
|
|
107
|
+
fontSize: "var(--sl-font-size-x-large)",
|
|
108
|
+
margin: "0px",
|
|
109
|
+
textAlign: "center",
|
|
110
|
+
} }, text.editprofileheader),
|
|
111
|
+
index.h("form", { class: "FormWrapper", onSubmit: callbacks.onSubmit },
|
|
112
|
+
index.h("div", { class: "FormSection" },
|
|
113
|
+
states.formState.error && (index.h("sqm-form-message", { type: "error", exportparts: "erroralert-icon" },
|
|
114
|
+
index.h("div", { part: "erroralert-text" }, states.formState.error))),
|
|
115
|
+
index.h("sl-input", Object.assign({ exportparts: "label: input-label", value: states.formState.firstName, onInput: callbacks.onChange, label: text.firstnametext, disabled: states.loading }, (errors.firstName && errors.firstName.status !== "valid"
|
|
116
|
+
? { class: "ErrorStyles", helpText: "Cannot be empty" }
|
|
117
|
+
: []), { id: "firstName", name: "firstName", error: errors.firstName && errors.firstName.status !== "valid"
|
|
118
|
+
? errors.firstName.message
|
|
119
|
+
: undefined })),
|
|
120
|
+
index.h("sl-input", Object.assign({ exportparts: "label: input-label", value: states.formState.lastName, onInput: callbacks.onChange, label: text.lastnametext, disabled: states.loading, id: "lastName", name: "lastName" }, (errors.lastName && errors.lastName.status !== "valid"
|
|
121
|
+
? { class: "ErrorStyles", helpText: "Cannot be empty" }
|
|
122
|
+
: []), { error: errors.lastName && errors.lastName.status !== "valid"
|
|
123
|
+
? errors.lastName.message
|
|
124
|
+
: undefined }))),
|
|
125
|
+
text.showregion && states.formState.currentRegion && (index.h("sl-input", { exportparts: "label: input-label", disabled: true, value: states.formState.currentRegion, label: text.currentregiontext, id: "currentRegion", name: "currentRegion" })),
|
|
126
|
+
index.h("div", { class: "ButtonWrapper" },
|
|
127
|
+
index.h("sl-button", { onClick: () => {
|
|
128
|
+
callbacks.setShowEdit(false);
|
|
129
|
+
}, exportparts: "base: defaultbutton-base" }, text.canceltext),
|
|
130
|
+
index.h("sl-button", { type: "primary", loading: states.loading, disabled: states.submitDisabled, onClick: (e) => {
|
|
131
|
+
callbacks.onSubmit(e);
|
|
132
|
+
}, submit: true, exportparts: "base: primarybutton-base" }, text.updatetext)))));
|
|
133
|
+
}
|
|
134
|
+
return (index.h("div", { class: `CardWrapper FormWrapper ${!states.showEdit && "ShowEdit"}` },
|
|
135
|
+
index.h("div", { class: "FormSection" },
|
|
136
|
+
index.h("h2", { style: {
|
|
137
|
+
fontSize: "var(--sl-font-size-x-large",
|
|
138
|
+
marginBottom: "0px",
|
|
139
|
+
textAlign: "center",
|
|
140
|
+
} }, text.editprofileheader),
|
|
141
|
+
index.h("div", null,
|
|
142
|
+
index.h("p", { style: { fontSize: "var(--sl-font-size-medium)" } }, (_a = states.user) === null || _a === void 0 ? void 0 :
|
|
143
|
+
_a.firstName,
|
|
144
|
+
" ", (_b = states.user) === null || _b === void 0 ? void 0 :
|
|
145
|
+
_b.lastName),
|
|
146
|
+
index.h("p", { style: { fontSize: "var(--sl-font-size-medium)" }, title: (_c = states.user) === null || _c === void 0 ? void 0 : _c.email }, (_d = states.user) === null || _d === void 0 ? void 0 : _d.email))),
|
|
147
|
+
index.h("sl-button", { type: "primary", loading: states.loading, onClick: () => {
|
|
148
|
+
callbacks.resetForm();
|
|
149
|
+
callbacks.setShowEdit(true);
|
|
150
|
+
}, exportparts: "base: primarybutton-base" }, text.editprofiletext)));
|
|
151
|
+
};
|
|
152
|
+
|
|
153
|
+
const MessageLinkQuery = index_module.dist.gql `
|
|
154
|
+
query ($programId: ID) {
|
|
155
|
+
user: viewer {
|
|
156
|
+
... on User {
|
|
157
|
+
shareLink(programId: $programId)
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
`;
|
|
162
|
+
const WIDGET_ENGAGEMENT_EVENT = index_module.dist.gql `
|
|
163
|
+
mutation loadEvent($eventMeta: UserAnalyticsEvent!) {
|
|
164
|
+
createUserAnalyticsEvent(eventMeta: $eventMeta)
|
|
165
|
+
}
|
|
166
|
+
`;
|
|
167
|
+
function useShareLink(props) {
|
|
168
|
+
var _a, _b;
|
|
169
|
+
const { programId = index_module.M() } = props;
|
|
170
|
+
const user = index_module.ie();
|
|
171
|
+
const engagementMedium = index_module.Rn();
|
|
172
|
+
const { data } = index_module.sn(MessageLinkQuery, { programId }, !(user === null || user === void 0 ? void 0 : user.jwt));
|
|
173
|
+
const [sendLoadEvent] = index_module.qe(WIDGET_ENGAGEMENT_EVENT);
|
|
174
|
+
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 :
|
|
175
|
+
// Shown during loading
|
|
176
|
+
"...";
|
|
177
|
+
const [open, setOpen] = stencilHooks_module.useState(false);
|
|
178
|
+
function onClick() {
|
|
179
|
+
// Should well supported: https://developer.mozilla.org/en-US/docs/Web/API/Clipboard#browser_compatibility
|
|
180
|
+
// Only if called from a user-initiated event
|
|
181
|
+
navigator.clipboard.writeText(shareString);
|
|
182
|
+
setOpen(true);
|
|
183
|
+
setTimeout(() => setOpen(false), props.tooltiplifespan);
|
|
184
|
+
sendLoadEvent({
|
|
185
|
+
eventMeta: {
|
|
186
|
+
programId,
|
|
187
|
+
id: user === null || user === void 0 ? void 0 : user.id,
|
|
188
|
+
accountId: user === null || user === void 0 ? void 0 : user.accountId,
|
|
189
|
+
type: "USER_REFERRAL_PROGRAM_ENGAGEMENT_EVENT",
|
|
190
|
+
meta: {
|
|
191
|
+
engagementMedium,
|
|
192
|
+
shareMedium: "DIRECT",
|
|
193
|
+
},
|
|
194
|
+
},
|
|
195
|
+
});
|
|
196
|
+
}
|
|
197
|
+
return { ...props, onClick, open, shareString };
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
const MessageLinkQuery$1 = index$1.gql `
|
|
201
|
+
query (
|
|
202
|
+
$programId: ID
|
|
203
|
+
$engagementMedium: UserEngagementMedium!
|
|
204
|
+
$shareMedium: ReferralShareMedium!
|
|
205
|
+
) {
|
|
206
|
+
viewer {
|
|
207
|
+
... on User {
|
|
208
|
+
messageLink(
|
|
209
|
+
programId: $programId
|
|
210
|
+
engagementMedium: $engagementMedium
|
|
211
|
+
shareMedium: $shareMedium
|
|
212
|
+
)
|
|
213
|
+
shareLink(programId: $programId, engagementMedium: $engagementMedium)
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
`;
|
|
218
|
+
function NativeShare(props, directLink) {
|
|
219
|
+
const title = props.sharetitle || "Share title";
|
|
220
|
+
const text = props.sharetext || "Share text";
|
|
221
|
+
if (directLink === "undefined") {
|
|
222
|
+
return alert("error: message link undefined!");
|
|
223
|
+
}
|
|
224
|
+
if (window.navigator.share) {
|
|
225
|
+
window.navigator
|
|
226
|
+
.share({
|
|
227
|
+
title,
|
|
228
|
+
text,
|
|
229
|
+
url: directLink,
|
|
230
|
+
})
|
|
231
|
+
.catch((error) => console.error("Error on web share", error));
|
|
232
|
+
}
|
|
233
|
+
else {
|
|
234
|
+
alert("Not on a supported device");
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
function FacebookShare(directLink, res) {
|
|
238
|
+
var _a, _b;
|
|
239
|
+
if (((_b = (_a = res.data) === null || _a === void 0 ? void 0 : _a.viewer) === null || _b === void 0 ? void 0 : _b.messageLink) === "undefined" ||
|
|
240
|
+
directLink === "undefined") {
|
|
241
|
+
return alert("error: message link undefined!");
|
|
242
|
+
}
|
|
243
|
+
if (typeof SquatchAndroid.shareOnFacebook !== "undefined") {
|
|
244
|
+
return SquatchAndroid.shareOnFacebook(directLink, res.data.viewer.messageLink);
|
|
245
|
+
}
|
|
246
|
+
else {
|
|
247
|
+
return GenericShare(res);
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
function GenericShare(res) {
|
|
251
|
+
var _a, _b;
|
|
252
|
+
return ((_b = (_a = res.data) === null || _a === void 0 ? void 0 : _a.viewer) === null || _b === void 0 ? void 0 : _b.messageLink) ? window.open(res.data.viewer.messageLink)
|
|
253
|
+
: alert("error: message link undefined!");
|
|
254
|
+
}
|
|
255
|
+
function useShareButton(props) {
|
|
256
|
+
var _a, _b;
|
|
257
|
+
const { sharetitle, sharetext, medium } = props;
|
|
258
|
+
const programId = props.programId ? props.programId : index_module.M();
|
|
259
|
+
const user = index_module.ie();
|
|
260
|
+
const variables = {
|
|
261
|
+
engagementMedium: index_module.Rn(),
|
|
262
|
+
programId: programId,
|
|
263
|
+
shareMedium: medium.toUpperCase(),
|
|
264
|
+
};
|
|
265
|
+
// only queries if a programId is available
|
|
266
|
+
const res = index_module.sn(MessageLinkQuery$1, variables, !(user === null || user === void 0 ? void 0 : user.jwt) || !programId);
|
|
267
|
+
const directLink = (_b = (_a = res === null || res === void 0 ? void 0 : res.data) === null || _a === void 0 ? void 0 : _a.viewer) === null || _b === void 0 ? void 0 : _b.shareLink;
|
|
268
|
+
const environment = index_module.kn();
|
|
269
|
+
const hide = (medium.toLocaleUpperCase() === "SMS" &&
|
|
270
|
+
window.orientation === undefined) ||
|
|
271
|
+
(medium.toLocaleUpperCase() === "DIRECT" && !window.navigator.share);
|
|
272
|
+
function onClick() {
|
|
273
|
+
if (medium.toLocaleUpperCase() === "FACEBOOK" &&
|
|
274
|
+
environment.type === "SquatchAndroid") {
|
|
275
|
+
FacebookShare(directLink, res);
|
|
276
|
+
}
|
|
277
|
+
else if (medium.toLocaleUpperCase() === "DIRECT") {
|
|
278
|
+
NativeShare({ sharetitle, sharetext }, directLink);
|
|
279
|
+
}
|
|
280
|
+
else {
|
|
281
|
+
GenericShare(res);
|
|
282
|
+
}
|
|
283
|
+
}
|
|
284
|
+
return { ...props, loading: res.loading, onClick, hide };
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
function PortalChangePasswordView(props) {
|
|
288
|
+
const { states, callbacks } = props;
|
|
289
|
+
const style = {
|
|
290
|
+
Dialog: {
|
|
291
|
+
padding: "0",
|
|
292
|
+
"&::part(close-button)": {
|
|
293
|
+
"margin-top": "var(--sl-spacing-medium)",
|
|
294
|
+
},
|
|
295
|
+
"&::part(body)": {
|
|
296
|
+
padding: "0 var(--sl-spacing-x-large) var(--sl-spacing-x-large) var(--sl-spacing-x-large)",
|
|
297
|
+
},
|
|
298
|
+
},
|
|
299
|
+
Error: {
|
|
300
|
+
"&::part(erroralert-base)": {
|
|
301
|
+
"margin-bottom": "15px",
|
|
302
|
+
},
|
|
303
|
+
},
|
|
304
|
+
Success: {
|
|
305
|
+
"&::part(successalert-base)": {
|
|
306
|
+
"margin-bottom": "15px",
|
|
307
|
+
},
|
|
308
|
+
},
|
|
309
|
+
InputContainer: {
|
|
310
|
+
"& > :not(:last-child)": {
|
|
311
|
+
"margin-bottom": "var(--sl-spacing-x-large)",
|
|
312
|
+
},
|
|
313
|
+
},
|
|
314
|
+
CancelButton: {
|
|
315
|
+
width: "25%",
|
|
316
|
+
margin: "var(--sl-spacing-large) auto",
|
|
317
|
+
},
|
|
318
|
+
PasswordField: {
|
|
319
|
+
marginBottom: "var(--sl-spacing-large) !important",
|
|
320
|
+
display: "block",
|
|
321
|
+
},
|
|
322
|
+
ChangePasswordButton: {
|
|
323
|
+
paddingTop: "var(--sl-spacing-x-large)",
|
|
324
|
+
},
|
|
325
|
+
};
|
|
326
|
+
const sheet = JSS.createStyleSheet(style);
|
|
327
|
+
const styleString = sheet.toString();
|
|
328
|
+
return (index.h("div", null,
|
|
329
|
+
index.h("style", { type: "text/css" }, styleString),
|
|
330
|
+
index.h("sl-dialog", { class: sheet.classes.Dialog, open: states.open, "onSl-hide": () => callbacks.setOpen(false) },
|
|
331
|
+
index.h(sqmPortalSectionView.PortalSectionView, Object.assign({}, {
|
|
332
|
+
labelMargin: "x-large",
|
|
333
|
+
padding: "none",
|
|
334
|
+
label: (index.h(sqmTextSpanView.TextSpanView, Object.assign({}, { type: "h2" }), states.content.modalChangePasswordHeader)),
|
|
335
|
+
content: (index.h(sqmPortalContainerView.PortalContainerView, Object.assign({}, { direction: "column", padding: "none", gap: "32px" }),
|
|
336
|
+
states.error && (index.h("sqm-form-message", { class: sheet.classes.Error, type: "error", exportparts: "erroralert-icon" },
|
|
337
|
+
index.h("div", { part: "erroralert-text" }, states.error))),
|
|
338
|
+
states.success && (index.h("sqm-form-message", { class: sheet.classes.Success, type: "success", exportparts: "successalert-icon" },
|
|
339
|
+
index.h("div", { part: "successalert-text" }, states.content.successMessage))),
|
|
340
|
+
index.h("sl-form", { "onSl-submit": callbacks.submit },
|
|
341
|
+
index.h("div", { class: sheet.classes.InputContainer },
|
|
342
|
+
index.h("sqm-password-field", { exportparts: "input-label: input-label", class: sheet.classes.PasswordField, fieldLabel: states.content.passwordFieldLabel }),
|
|
343
|
+
index.h("sl-input", { exportparts: "label: input-label", name: "/confirmPassword", label: states.content.confirmPasswordFieldLabel, required: true, togglePassword: true, disabled: states.loading, type: "password" })),
|
|
344
|
+
index.h(sqmPortalContainerView.PortalContainerView, Object.assign({}, { direction: "row", padding: "none", gap: "20px" }),
|
|
345
|
+
index.h("sl-button", { class: sheet.classes.ChangePasswordButton, type: "primary", submit: true, loading: states.loading }, states.content.changePasswordButtonText),
|
|
346
|
+
index.h("sl-button", { class: sheet.classes.CancelButton, type: "text", onClick: () => callbacks.setOpen(false) }, states.content.cancelText))))),
|
|
347
|
+
}))),
|
|
348
|
+
index.h(sqmPortalSectionView.PortalSectionView, Object.assign({}, {
|
|
349
|
+
labelMargin: "x-large",
|
|
350
|
+
padding: "xxx-large",
|
|
351
|
+
label: (index.h(sqmTextSpanView.TextSpanView, Object.assign({}, { type: "h2" }), states.content.portalChangePasswordHeader)),
|
|
352
|
+
content: (index.h("sl-button", { onClick: () => callbacks.setOpen(true) }, states.content.portalChangePasswordButtonText)),
|
|
353
|
+
}),
|
|
354
|
+
index.h("style", { type: "text/css" }, styleString))));
|
|
355
|
+
}
|
|
356
|
+
|
|
357
|
+
const style$1 = {
|
|
358
|
+
Wrapper: mixins.AuthWrapper,
|
|
359
|
+
Column: mixins.AuthColumn,
|
|
360
|
+
ForgotButtonContainer: {
|
|
361
|
+
display: "inline",
|
|
362
|
+
cursor: "pointer",
|
|
363
|
+
"font-size": "13px",
|
|
364
|
+
"font-weight": "600",
|
|
365
|
+
color: "#AAAAAA",
|
|
366
|
+
margin: "0",
|
|
367
|
+
},
|
|
368
|
+
ButtonsContainer: mixins.AuthButtonsContainer,
|
|
369
|
+
};
|
|
370
|
+
const vanillaStyle = `
|
|
371
|
+
:host {
|
|
372
|
+
display: block;
|
|
373
|
+
}
|
|
374
|
+
:host([hidden]): {
|
|
375
|
+
display: none;
|
|
376
|
+
}
|
|
377
|
+
`;
|
|
378
|
+
const sheet$1 = JSS.createStyleSheet(style$1);
|
|
379
|
+
const styleString$1 = sheet$1.toString();
|
|
380
|
+
function PortalLoginView(props) {
|
|
381
|
+
const { states, callbacks, content } = props;
|
|
382
|
+
return (index.h("div", { class: sheet$1.classes.Wrapper },
|
|
383
|
+
index.h("style", { type: "text/css" },
|
|
384
|
+
vanillaStyle,
|
|
385
|
+
styleString$1),
|
|
386
|
+
index.h(sqmTextSpanView.TextSpanView, { type: "h3" }, content.pageLabel),
|
|
387
|
+
index.h("sl-form", { class: sheet$1.classes.Column, "onSl-submit": callbacks.submit },
|
|
388
|
+
props.states.error && (index.h("sqm-form-message", { type: "error", exportparts: "erroralert-icon" },
|
|
389
|
+
index.h("div", { part: "erroralert-text" }, props.states.error))),
|
|
390
|
+
index.h("sl-input", { exportparts: "label: input-label", type: "email", name: "/email", label: content.emailLabel || "Email", disabled: states.loading, required: true }),
|
|
391
|
+
index.h("div", null,
|
|
392
|
+
index.h("sl-input", { exportparts: "label: input-label", type: "password", name: "/password", label: content.passwordLabel || "Password", disabled: states.loading, required: true }),
|
|
393
|
+
index.h("div", { class: sheet$1.classes.ForgotButtonContainer }, content.forgotPasswordButton)),
|
|
394
|
+
index.h("div", { class: sheet$1.classes.ButtonsContainer },
|
|
395
|
+
index.h("sl-button", { submit: true, loading: states.loading, exportparts: "base: primarybutton-base", type: "primary" }, content.submitLabel || "Login"),
|
|
396
|
+
content.secondaryButton))));
|
|
397
|
+
}
|
|
398
|
+
|
|
399
|
+
const style$2 = {
|
|
400
|
+
Wrapper: { ...mixins.AuthWrapper, "max-width": "600px" },
|
|
401
|
+
Column: mixins.AuthColumn,
|
|
402
|
+
HostBlock: mixins.HostBlock,
|
|
403
|
+
":host": {
|
|
404
|
+
margin: "0 auto",
|
|
405
|
+
width: "100%",
|
|
406
|
+
},
|
|
407
|
+
ButtonsContainer: mixins.AuthButtonsContainer,
|
|
408
|
+
ErrorStyle: mixins.ErrorStyles,
|
|
409
|
+
};
|
|
410
|
+
const vanillaStyle$1 = `
|
|
411
|
+
sqm-portal-register {
|
|
412
|
+
margin: 0 auto;
|
|
413
|
+
width: 100%;
|
|
414
|
+
display: block;
|
|
415
|
+
}
|
|
416
|
+
|
|
417
|
+
:host{
|
|
418
|
+
display: block;
|
|
419
|
+
}
|
|
420
|
+
|
|
421
|
+
:host([hidden]) {
|
|
422
|
+
display: none;
|
|
423
|
+
}
|
|
424
|
+
`;
|
|
425
|
+
const sheet$2 = JSS.createStyleSheet(style$2);
|
|
426
|
+
const styleString$2 = sheet$2.toString();
|
|
427
|
+
function PortalRegisterView(props) {
|
|
428
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
429
|
+
const { states, refs, callbacks, content } = props;
|
|
430
|
+
if (states.error) {
|
|
431
|
+
window.scrollTo({ top: 0, left: 0, behavior: "smooth" });
|
|
432
|
+
}
|
|
433
|
+
return (index.h("div", { class: sheet$2.classes.Wrapper },
|
|
434
|
+
index.h("style", { type: "text/css" },
|
|
435
|
+
vanillaStyle$1,
|
|
436
|
+
styleString$2),
|
|
437
|
+
index.h(sqmTextSpanView.TextSpanView, { type: "h3" }, content.pageLabel),
|
|
438
|
+
index.h("sl-form", { class: sheet$2.classes.Column, "onSl-submit": callbacks.submit, ref: (el) => (refs.formRef.current = el), novalidate: true },
|
|
439
|
+
states.error && (index.h("sqm-form-message", { type: "error", exportparts: "erroralert-icon" },
|
|
440
|
+
index.h("div", { part: "erroralert-text" }, props.states.error))),
|
|
441
|
+
content.formData,
|
|
442
|
+
!states.hideInputs && (index.h("sl-input", Object.assign({ exportparts: "label: input-label", type: "email", name: "/email", label: content.emailLabel || "Email", disabled: states.loading, required: true, validationError: ({ value }) => {
|
|
443
|
+
if (!value) {
|
|
444
|
+
return "Cannot be empty";
|
|
445
|
+
}
|
|
446
|
+
// this matches shoelace validation, but could be better
|
|
447
|
+
if (!value.includes("@")) {
|
|
448
|
+
return "Must be a valid email address";
|
|
449
|
+
}
|
|
450
|
+
} }, (((_b = (_a = states.validationState) === null || _a === void 0 ? void 0 : _a.validationErrors) === null || _b === void 0 ? void 0 : _b.email) ? {
|
|
451
|
+
class: sheet$2.classes.ErrorStyle,
|
|
452
|
+
helpText: ((_d = (_c = states.validationState) === null || _c === void 0 ? void 0 : _c.validationErrors) === null || _d === void 0 ? void 0 : _d.email) ||
|
|
453
|
+
"Cannot be empty",
|
|
454
|
+
}
|
|
455
|
+
: [])))),
|
|
456
|
+
!states.hideInputs && (index.h("sqm-password-field", { fieldLabel: content.passwordLabel, "enable-validation": states.enablePasswordValidation })),
|
|
457
|
+
content.passwordField,
|
|
458
|
+
!states.hideInputs && states.confirmPassword && (index.h("sl-input", Object.assign({ exportparts: "label: input-label", type: "password", name: "/confirmPassword", label: content.confirmPasswordLabel, disabled: states.loading, required: true }, (((_f = (_e = states.validationState) === null || _e === void 0 ? void 0 : _e.validationErrors) === null || _f === void 0 ? void 0 : _f.confirmPassword) ? {
|
|
459
|
+
class: sheet$2.classes.ErrorStyle,
|
|
460
|
+
helpText: ((_h = (_g = states.validationState) === null || _g === void 0 ? void 0 : _g.validationErrors) === null || _h === void 0 ? void 0 : _h.confirmPassword) ||
|
|
461
|
+
"Cannot be empty",
|
|
462
|
+
}
|
|
463
|
+
: [])))),
|
|
464
|
+
content.terms,
|
|
465
|
+
index.h("div", { class: sheet$2.classes.ButtonsContainer },
|
|
466
|
+
index.h("sl-button", { submit: true, loading: states.loading, exportparts: "base: primarybutton-base", type: "primary" }, content.submitLabel || "Register"),
|
|
467
|
+
content.secondaryButton))));
|
|
468
|
+
}
|
|
469
|
+
|
|
470
|
+
const style$3 = {
|
|
471
|
+
Description: {
|
|
472
|
+
"& input[type=checkbox]": {
|
|
473
|
+
display: "none",
|
|
474
|
+
},
|
|
475
|
+
"& input:checked ~ .details": {
|
|
476
|
+
transform: "rotate(-180deg)",
|
|
477
|
+
},
|
|
478
|
+
"& .details": {
|
|
479
|
+
position: "absolute",
|
|
480
|
+
top: "var(--sl-spacing-medium)",
|
|
481
|
+
right: "var(--sl-spacing-medium)",
|
|
482
|
+
color: "var(--sl-color-neutral-700)",
|
|
483
|
+
fontSize: "var(--sl-font-size-large)",
|
|
484
|
+
"& :hover": {
|
|
485
|
+
color: "var(--sl-color-primary-700)",
|
|
486
|
+
},
|
|
487
|
+
transformOrigin: "50% 37%",
|
|
488
|
+
transition: "transform var(--sl-transition-medium) ease",
|
|
489
|
+
cursor: "pointer",
|
|
490
|
+
},
|
|
491
|
+
"& input:checked ~ .summary": {
|
|
492
|
+
transition: "all var(--sl-transition-medium) ease",
|
|
493
|
+
maxHeight: "300px",
|
|
494
|
+
marginBottom: "var(--sl-spacing-x-large)",
|
|
495
|
+
},
|
|
496
|
+
"& input:checked ~ .summary[progress-bar]": {
|
|
497
|
+
marginBottom: "var(--sl-spacing-xx-large)",
|
|
498
|
+
},
|
|
499
|
+
"& .summary": {
|
|
500
|
+
display: "block",
|
|
501
|
+
overflow: "hidden",
|
|
502
|
+
fontSize: "var(--sl-font-size-small)",
|
|
503
|
+
maxHeight: "0px",
|
|
504
|
+
transition: "all var(--sl-transition-fast) ease-out",
|
|
505
|
+
marginBottom: "var(--sl-spacing-medium)",
|
|
506
|
+
},
|
|
507
|
+
},
|
|
508
|
+
};
|
|
509
|
+
const sheet$3 = JSS.createStyleSheet(style$3);
|
|
510
|
+
const styleString$3 = sheet$3.toString();
|
|
511
|
+
function Details(props) {
|
|
512
|
+
const rid = Math.random().toString(36).slice(2);
|
|
513
|
+
return (index.h("div", null,
|
|
514
|
+
index.h("style", { type: "text/css" }, styleString$3),
|
|
515
|
+
index.h("span", { class: sheet$3.classes.Description },
|
|
516
|
+
index.h("input", { type: "checkbox", id: "details-" + rid }),
|
|
517
|
+
index.h("label", { class: "details", htmlFor: "details-" + rid },
|
|
518
|
+
index.h("sl-icon", { name: "chevron-down" })),
|
|
519
|
+
index.h("span", { class: "summary", "progress-bar": props.progressBar }, props.content.description))));
|
|
520
|
+
}
|
|
521
|
+
|
|
522
|
+
const Gift = () => {
|
|
523
|
+
return (index.h("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg" },
|
|
524
|
+
index.h("path", { d: "M15 5H12.4508H9V16H13.5C14.0523 16 14.5 15.5523 14.5 15V9H15C15.5523 9 16 8.55228 16 8V6C16 5.44772 15.5523 5 15 5Z", fill: "#F2C94C" }),
|
|
525
|
+
index.h("path", { d: "M1.5 9V15C1.5 15.5523 1.94772 16 2.5 16H7V5H4.64242H1C0.447715 5 0 5.44772 0 6V8C0 8.55228 0.447715 9 1 9H1.5Z", fill: "#F2C94C" }),
|
|
526
|
+
index.h("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M1.5 9V10H14.5V9H1.5Z", fill: "#BE9720" }),
|
|
527
|
+
index.h("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M14 2.70949C14 3.59565 12.6694 4.93746 12 5H9V16H7.00179V5H4.58792C3.21247 4.70182 2 3.64537 2 2.52072C2 1.42474 2.47603 0.556701 3.34184 0.182041C4.16921 -0.175986 5.12452 0.0203328 5.87976 0.544666C6.80676 1.18825 7.32679 2.3963 7.79856 3.49226C7.83996 3.58845 7.88099 3.68378 7.9219 3.77778C7.96173 3.68865 8.00186 3.59793 8.0425 3.50608C8.50995 2.44948 9.04359 1.24325 9.9404 0.59563C10.7332 0.0231438 11.741 -0.193157 12.6121 0.198945C13.5129 0.604397 14 1.53453 14 2.70949ZM10.6123 1.5C11.0928 1.15305 11.668 1.09012 12.1597 1.5C12.5879 1.85694 12.6108 2.02497 12.6658 2.42926L12.6755 2.5C12.6755 3.09851 12.1597 4 11.6439 4C11.2785 4 10.9914 3.99691 10.7224 3.99402C10.2319 3.98875 9.80131 3.98412 9.06496 4C9.20533 3.72786 9.31743 3.46669 9.42434 3.21761C9.71026 2.55143 9.95907 1.97176 10.6123 1.5ZM4.93861 1.5C4.70607 1.33855 4.17281 1.4106 3.95166 1.5063C3.76894 1.58537 3.49602 1.82658 3.49602 2.52072C3.49602 3.19524 4.58792 3.77778 4.58792 3.77778C4.58792 3.77778 5.45441 4 7.00179 4C6.47506 2.69451 5.7289 2.04867 4.93861 1.5Z", fill: "#EB5757" })));
|
|
528
|
+
};
|
|
529
|
+
|
|
530
|
+
const style$4 = {
|
|
531
|
+
ProgressBar: {
|
|
532
|
+
"& .progress-bar": {
|
|
533
|
+
height: "0",
|
|
534
|
+
marginTop: "var(--sl-spacing-large)",
|
|
535
|
+
marginBottom: "var(--sl-spacing-xxx-large)",
|
|
536
|
+
marginRight: "var(--sl-spacing-x-small)",
|
|
537
|
+
fontSize: "var(--sl-font-size-x-small)",
|
|
538
|
+
display: "grid",
|
|
539
|
+
lineHeight: "45px",
|
|
540
|
+
userSelect: "none",
|
|
541
|
+
},
|
|
542
|
+
"&[data-steps]": {
|
|
543
|
+
marginTop: "calc(-1*var(--sl-spacing-x-small))",
|
|
544
|
+
},
|
|
545
|
+
"&[data-steps] .progress-bar": {
|
|
546
|
+
marginTop: "var(--sl-spacing-medium)",
|
|
547
|
+
},
|
|
548
|
+
"&[data-expired] .progress-bar": {
|
|
549
|
+
filter: "grayscale(1)",
|
|
550
|
+
},
|
|
551
|
+
"& .progress-bar.repeatable-steps": {
|
|
552
|
+
marginLeft: "var(--sl-spacing-x-small)",
|
|
553
|
+
},
|
|
554
|
+
"& .filled:after": {
|
|
555
|
+
content: '""',
|
|
556
|
+
display: "flex",
|
|
557
|
+
width: "100%",
|
|
558
|
+
height: "4px",
|
|
559
|
+
borderRadius: "4px",
|
|
560
|
+
backgroundColor: "var(--sl-color-primary-300)",
|
|
561
|
+
},
|
|
562
|
+
"& .progress": {
|
|
563
|
+
display: "block",
|
|
564
|
+
textAlign: "center",
|
|
565
|
+
marginLeft: "-100px",
|
|
566
|
+
marginRight: "-100px",
|
|
567
|
+
},
|
|
568
|
+
"& .progress::after": {
|
|
569
|
+
content: '""',
|
|
570
|
+
width: "12px",
|
|
571
|
+
height: "12px",
|
|
572
|
+
display: "flex",
|
|
573
|
+
backgroundColor: "var(--sl-color-primary-300)",
|
|
574
|
+
borderRadius: "50%",
|
|
575
|
+
position: "relative",
|
|
576
|
+
left: "47%",
|
|
577
|
+
top: "-85%",
|
|
578
|
+
},
|
|
579
|
+
"& .progress.bg:after": {
|
|
580
|
+
width: "0",
|
|
581
|
+
height: "0",
|
|
582
|
+
border: "none",
|
|
583
|
+
},
|
|
584
|
+
"& .progress.top": {
|
|
585
|
+
position: "relative",
|
|
586
|
+
top: "-40px",
|
|
587
|
+
},
|
|
588
|
+
"& .progress.top:after": {
|
|
589
|
+
top: "-16%",
|
|
590
|
+
},
|
|
591
|
+
"& .empty": {
|
|
592
|
+
display: "block",
|
|
593
|
+
textAlign: "center",
|
|
594
|
+
marginLeft: "-100px",
|
|
595
|
+
marginRight: "-100px",
|
|
596
|
+
},
|
|
597
|
+
"& .empty::after": {
|
|
598
|
+
content: '""',
|
|
599
|
+
width: "12px",
|
|
600
|
+
height: "12px",
|
|
601
|
+
border: "2px solid #E0E0E0",
|
|
602
|
+
margin: "-2px",
|
|
603
|
+
display: "flex",
|
|
604
|
+
backgroundColor: "white",
|
|
605
|
+
borderRadius: "50%",
|
|
606
|
+
position: "relative",
|
|
607
|
+
left: "47%",
|
|
608
|
+
top: "-85%",
|
|
609
|
+
},
|
|
610
|
+
"& .empty.bg:after": {
|
|
611
|
+
width: "0",
|
|
612
|
+
height: "0",
|
|
613
|
+
border: "none",
|
|
614
|
+
},
|
|
615
|
+
"& .remain:after": {
|
|
616
|
+
content: '""',
|
|
617
|
+
display: "flex",
|
|
618
|
+
width: "100%",
|
|
619
|
+
height: "4px",
|
|
620
|
+
borderRadius: "4px",
|
|
621
|
+
backgroundColor: "#E0E0E0",
|
|
622
|
+
},
|
|
623
|
+
"& .gift.bw": {
|
|
624
|
+
filter: "grayscale(100%)",
|
|
625
|
+
},
|
|
626
|
+
"& .gift.start": {
|
|
627
|
+
transform: "scale(80%)",
|
|
628
|
+
top: "-20px",
|
|
629
|
+
},
|
|
630
|
+
"& .gift": {
|
|
631
|
+
textAlign: "center",
|
|
632
|
+
marginLeft: "-100px",
|
|
633
|
+
marginRight: "-100px",
|
|
634
|
+
position: "relative",
|
|
635
|
+
top: "-18px",
|
|
636
|
+
},
|
|
637
|
+
},
|
|
638
|
+
};
|
|
639
|
+
const sheet$4 = JSS.createStyleSheet(style$4, { classNamePrefix: "sqm-prog-bar" });
|
|
640
|
+
const styleString$4 = sheet$4.toString();
|
|
641
|
+
function ProgressBarView(props) {
|
|
642
|
+
var _a;
|
|
643
|
+
const { progress = 0, goal = 1, steps = false, progressBarUnit = "", repeatable = false, expired = false, finite = 0, } = props;
|
|
644
|
+
let aggregate = buildProgressBar(repeatable, steps, props);
|
|
645
|
+
const { columns, items } = aggregate;
|
|
646
|
+
//@ts-ignore
|
|
647
|
+
console.log("PROGRESS BAR PROPS " + ((_a = props === null || props === void 0 ? void 0 : props.content) === null || _a === void 0 ? void 0 : _a.cardTitle));
|
|
648
|
+
console.log({ props });
|
|
649
|
+
return (index.h("div", { class: sheet$4.classes.ProgressBar, "data-expired": expired, "data-steps": steps, "data-done": goal <= progress },
|
|
650
|
+
index.h("style", { type: "text/css" }, styleString$4),
|
|
651
|
+
index.h("div", { class: (!Boolean(finite) && progress >= 2 * goal) ||
|
|
652
|
+
(Boolean(finite) && progress > 2 * goal)
|
|
653
|
+
? "progress-bar repeatable-steps"
|
|
654
|
+
: "progress-bar", style: {
|
|
655
|
+
gridTemplateColumns: columns,
|
|
656
|
+
marginLeft: progress === 0 && !steps ? "var(--sl-spacing-x-small)" : "",
|
|
657
|
+
} }, items)));
|
|
658
|
+
}
|
|
659
|
+
function buildProgressBar(repeatable, steps, props) {
|
|
660
|
+
if (repeatable) {
|
|
661
|
+
if (steps) {
|
|
662
|
+
return addStepsRepeatable(props);
|
|
663
|
+
}
|
|
664
|
+
else {
|
|
665
|
+
return addLinearRepeatable(props);
|
|
666
|
+
}
|
|
667
|
+
}
|
|
668
|
+
// non repeatable
|
|
669
|
+
else {
|
|
670
|
+
if (steps) {
|
|
671
|
+
return addSteps(props);
|
|
672
|
+
}
|
|
673
|
+
else {
|
|
674
|
+
return addLinear(props);
|
|
675
|
+
}
|
|
676
|
+
}
|
|
677
|
+
}
|
|
678
|
+
function addSteps({ progress, goal }) {
|
|
679
|
+
const items = [];
|
|
680
|
+
const columns = [];
|
|
681
|
+
let ratio = 1 / goal;
|
|
682
|
+
for (let i = 1; i < goal; i++) {
|
|
683
|
+
columns.push(ratio + "fr");
|
|
684
|
+
columns.push("0fr");
|
|
685
|
+
if (i > progress) {
|
|
686
|
+
items.push(index.h("div", { class: "remain" }));
|
|
687
|
+
items.push(index.h("div", { class: "empty" }, i));
|
|
688
|
+
}
|
|
689
|
+
else {
|
|
690
|
+
items.push(index.h("div", { class: "filled" }));
|
|
691
|
+
items.push(index.h("div", { class: "progress" }, i));
|
|
692
|
+
}
|
|
693
|
+
}
|
|
694
|
+
columns.push(ratio + "fr");
|
|
695
|
+
columns.push("0fr");
|
|
696
|
+
// reward success
|
|
697
|
+
if (goal <= progress) {
|
|
698
|
+
columns.push("0fr");
|
|
699
|
+
items.push(index.h("div", { class: "filled" }));
|
|
700
|
+
items.push(index.h("div", { class: "progress bg" }, goal));
|
|
701
|
+
items.push(index.h("div", { class: "gift" }, index.h(Gift, null)));
|
|
702
|
+
}
|
|
703
|
+
// reward fail
|
|
704
|
+
else {
|
|
705
|
+
columns.push("0fr");
|
|
706
|
+
items.push(index.h("div", { class: "remain" }));
|
|
707
|
+
items.push(index.h("div", { class: "empty bg" }, goal));
|
|
708
|
+
items.push(index.h("div", { class: "gift bw" }, index.h(Gift, null)));
|
|
709
|
+
}
|
|
710
|
+
return {
|
|
711
|
+
items,
|
|
712
|
+
columns: columns.join(" "),
|
|
713
|
+
};
|
|
714
|
+
}
|
|
715
|
+
function addLinearRepeatable({ progress, goal, progressBarUnit, finite, }) {
|
|
716
|
+
let repetitions = Math.floor(progress / goal);
|
|
717
|
+
let ratio = ((progress % goal) / goal) * 0.5;
|
|
718
|
+
const items = [];
|
|
719
|
+
let columns = "";
|
|
720
|
+
// 0 repetition
|
|
721
|
+
if (repetitions == 0) {
|
|
722
|
+
columns = ratio + "fr 0fr " + (0.5 - ratio) + "fr 0fr 0fr 0.5fr 0fr 0fr";
|
|
723
|
+
items.push(index.h("div", { class: "filled" }));
|
|
724
|
+
items.push(index.h("div", { class: progress == goal ? "progress top bg" : "progress top" }, progressBarUnit + progress));
|
|
725
|
+
items.push(index.h("div", { class: "remain" }));
|
|
726
|
+
items.push(index.h("div", { class: "progress bg" }, progressBarUnit + goal));
|
|
727
|
+
items.push(index.h("div", { class: progress == goal ? "gift" : "gift bw" },
|
|
728
|
+
index.h(Gift, null)));
|
|
729
|
+
items.push(index.h("div", { class: "remain" }));
|
|
730
|
+
items.push(index.h("div", { class: "progress bg" }, progressBarUnit + goal * 2));
|
|
731
|
+
items.push(index.h("div", { class: "gift bw" }, index.h(Gift, null)));
|
|
732
|
+
}
|
|
733
|
+
// single repetition
|
|
734
|
+
else if (repetitions == 1) {
|
|
735
|
+
columns =
|
|
736
|
+
"0.5fr 0fr 0fr " + ratio + "fr 0fr " + (0.5 - ratio) + "fr 0fr 0fr";
|
|
737
|
+
items.push(index.h("div", { class: "filled" }));
|
|
738
|
+
items.push(index.h("div", { class: "progress bg" }, progressBarUnit + goal));
|
|
739
|
+
items.push(index.h("div", { class: "gift" }, index.h(Gift, null)));
|
|
740
|
+
items.push(index.h("div", { class: "filled" }));
|
|
741
|
+
items.push(index.h("div", { class: progress == goal ? "progress top bg" : "progress top" }, progress == goal ? "" : progressBarUnit + progress));
|
|
742
|
+
items.push(index.h("div", { class: "remain" }));
|
|
743
|
+
items.push(index.h("div", { class: "progress bg" }, progressBarUnit + goal * 2));
|
|
744
|
+
items.push(index.h("div", { class: "gift bw" }, index.h(Gift, null)));
|
|
745
|
+
}
|
|
746
|
+
// finite repetition hit
|
|
747
|
+
else if (finite && repetitions >= finite) {
|
|
748
|
+
if (repetitions > 2) {
|
|
749
|
+
items.push(index.h("div", { class: "progress bg" }, progressBarUnit + goal * (finite - 2)));
|
|
750
|
+
items.push(index.h("div", { class: "gift start" }, index.h(Gift, null)));
|
|
751
|
+
columns = "0fr 0fr 0.5fr 0fr 0fr 0.5fr 0fr 0fr";
|
|
752
|
+
}
|
|
753
|
+
else {
|
|
754
|
+
columns = "0.5fr 0fr 0fr 0.5fr 0fr 0fr";
|
|
755
|
+
}
|
|
756
|
+
items.push(index.h("div", { class: "filled" }));
|
|
757
|
+
items.push(index.h("div", { class: "progress bg" }, progressBarUnit + goal * (finite - 1)));
|
|
758
|
+
items.push(index.h("div", { class: "gift" }, index.h(Gift, null)));
|
|
759
|
+
items.push(index.h("div", { class: "filled" }));
|
|
760
|
+
items.push(index.h("div", { class: "progress bg" }, progressBarUnit + goal * finite));
|
|
761
|
+
items.push(index.h("div", { class: "gift" }, index.h(Gift, null)));
|
|
762
|
+
}
|
|
763
|
+
// multiple repetitions
|
|
764
|
+
else {
|
|
765
|
+
columns =
|
|
766
|
+
"0fr 0fr 0.5fr 0fr 0fr " +
|
|
767
|
+
ratio +
|
|
768
|
+
"fr 0fr " +
|
|
769
|
+
(0.5 - ratio) +
|
|
770
|
+
"fr 0fr 0fr";
|
|
771
|
+
items.push(index.h("div", { class: "progress bg" }, progressBarUnit + goal * (repetitions - 1)));
|
|
772
|
+
items.push(index.h("div", { class: "gift start" }, index.h(Gift, null)));
|
|
773
|
+
items.push(index.h("div", { class: "filled" }));
|
|
774
|
+
items.push(index.h("div", { class: "progress bg" }, progressBarUnit + goal * repetitions));
|
|
775
|
+
items.push(index.h("div", { class: "gift" }, index.h(Gift, null)));
|
|
776
|
+
items.push(index.h("div", { class: "filled" }));
|
|
777
|
+
items.push(index.h("div", { class: progress == goal * repetitions ? "progress top bg" : "progress top" }, progress == goal * repetitions ? "" : progressBarUnit + progress));
|
|
778
|
+
items.push(index.h("div", { class: "remain" }));
|
|
779
|
+
items.push(index.h("div", { class: "progress bg" }, progressBarUnit + goal * (repetitions + 1)));
|
|
780
|
+
items.push(index.h("div", { class: "gift bw" }, index.h(Gift, null)));
|
|
781
|
+
}
|
|
782
|
+
return { items, columns };
|
|
783
|
+
}
|
|
784
|
+
function addStepsRepeatable({ progress, goal, finite, }) {
|
|
785
|
+
const items = [];
|
|
786
|
+
const columns = [];
|
|
787
|
+
let repetitions = Math.floor(progress / goal);
|
|
788
|
+
// no or single repetition
|
|
789
|
+
if (repetitions < 2) {
|
|
790
|
+
let ratio = 1 / goal;
|
|
791
|
+
for (let i = 1; i < goal * 2 + 1; i++) {
|
|
792
|
+
columns.push(ratio + "fr");
|
|
793
|
+
columns.push("0fr");
|
|
794
|
+
if (i > progress) {
|
|
795
|
+
if (i == goal) {
|
|
796
|
+
columns.push("0fr");
|
|
797
|
+
items.push(index.h("div", { class: "remain" }));
|
|
798
|
+
items.push(index.h("div", { class: "empty bg" }, goal));
|
|
799
|
+
items.push(index.h("div", { class: "gift bw" }, index.h(Gift, null)));
|
|
800
|
+
}
|
|
801
|
+
else if (i == goal * 2) {
|
|
802
|
+
columns.push("0fr");
|
|
803
|
+
columns.push("0fr");
|
|
804
|
+
items.push(index.h("div", { class: "remain" }));
|
|
805
|
+
items.push(index.h("div", { class: "empty bg" }, goal * 2));
|
|
806
|
+
items.push(index.h("div", { class: "gift bw" }, index.h(Gift, null)));
|
|
807
|
+
}
|
|
808
|
+
else {
|
|
809
|
+
items.push(index.h("div", { class: "remain" }));
|
|
810
|
+
items.push(index.h("div", { class: "empty" }, i));
|
|
811
|
+
}
|
|
812
|
+
}
|
|
813
|
+
else if (i == goal) {
|
|
814
|
+
columns.push("0fr");
|
|
815
|
+
items.push(index.h("div", { class: "filled" }));
|
|
816
|
+
items.push(index.h("div", { class: "progress bg" }, i));
|
|
817
|
+
items.push(index.h("div", { class: "gift" }, index.h(Gift, null)));
|
|
818
|
+
}
|
|
819
|
+
else {
|
|
820
|
+
items.push(index.h("div", { class: "filled" }));
|
|
821
|
+
items.push(index.h("div", { class: "progress" }, i));
|
|
822
|
+
}
|
|
823
|
+
}
|
|
824
|
+
}
|
|
825
|
+
// finite repetition hit
|
|
826
|
+
else if (finite && repetitions >= finite) {
|
|
827
|
+
let ratio = 1 / goal;
|
|
828
|
+
if (repetitions > 2) {
|
|
829
|
+
columns.push("0fr");
|
|
830
|
+
columns.push("0fr");
|
|
831
|
+
items.push(index.h("div", { class: "progress bg" }, goal * (finite - 2)));
|
|
832
|
+
items.push(index.h("div", { class: "gift start" }, index.h(Gift, null)));
|
|
833
|
+
}
|
|
834
|
+
for (let i = 1; i < goal * 2 + 1; i++) {
|
|
835
|
+
columns.push(ratio + "fr");
|
|
836
|
+
columns.push("0fr");
|
|
837
|
+
if (i > progress) {
|
|
838
|
+
if (i == goal) {
|
|
839
|
+
columns.push("0fr");
|
|
840
|
+
items.push(index.h("div", { class: "remain" }));
|
|
841
|
+
items.push(index.h("div", { class: "progress bg" }, goal * (finite - 1)));
|
|
842
|
+
items.push(index.h("div", { class: "gift bw" }, index.h(Gift, null)));
|
|
843
|
+
}
|
|
844
|
+
}
|
|
845
|
+
else if (i == goal) {
|
|
846
|
+
columns.push("0fr");
|
|
847
|
+
items.push(index.h("div", { class: "filled" }));
|
|
848
|
+
items.push(index.h("div", { class: "progress bg" }, goal * (finite - 1)));
|
|
849
|
+
items.push(index.h("div", { class: "gift" }, index.h(Gift, null)));
|
|
850
|
+
}
|
|
851
|
+
else if (i == goal * 2) {
|
|
852
|
+
columns.push("0fr");
|
|
853
|
+
columns.push("0fr");
|
|
854
|
+
items.push(index.h("div", { class: "filled" }));
|
|
855
|
+
items.push(index.h("div", { class: "progress bg" }, goal * finite));
|
|
856
|
+
items.push(index.h("div", { class: "gift" }, index.h(Gift, null)));
|
|
857
|
+
}
|
|
858
|
+
else {
|
|
859
|
+
items.push(index.h("div", { class: "filled" }));
|
|
860
|
+
items.push(index.h("div", { class: "progress" }, i + goal * (finite - 2)));
|
|
861
|
+
}
|
|
862
|
+
}
|
|
863
|
+
}
|
|
864
|
+
// case repetition many
|
|
865
|
+
else {
|
|
866
|
+
let position = (progress % goal) + goal;
|
|
867
|
+
let ratio = 1 / goal;
|
|
868
|
+
columns.push("0fr");
|
|
869
|
+
columns.push("0fr");
|
|
870
|
+
items.push(index.h("div", { class: "progress bg" }, goal * (repetitions - 1)));
|
|
871
|
+
items.push(index.h("div", { class: "gift start" }, index.h(Gift, null)));
|
|
872
|
+
for (let i = 1; i < goal * 2 + 1; i++) {
|
|
873
|
+
columns.push(ratio + "fr");
|
|
874
|
+
columns.push("0fr");
|
|
875
|
+
if (i <= goal) {
|
|
876
|
+
if (i == goal) {
|
|
877
|
+
columns.push("0fr");
|
|
878
|
+
items.push(index.h("div", { class: "filled" }));
|
|
879
|
+
items.push(index.h("div", { class: "progress bg" }, i + goal * (repetitions - 1)));
|
|
880
|
+
items.push(index.h("div", { class: "gift" }, index.h(Gift, null)));
|
|
881
|
+
}
|
|
882
|
+
else {
|
|
883
|
+
items.push(index.h("div", { class: "filled" }));
|
|
884
|
+
items.push(index.h("div", { class: "progress" }, i + goal * (repetitions - 1)));
|
|
885
|
+
}
|
|
886
|
+
}
|
|
887
|
+
else if (i > position) {
|
|
888
|
+
if (i == goal * 2) {
|
|
889
|
+
columns.push("0fr");
|
|
890
|
+
columns.push("0fr");
|
|
891
|
+
items.push(index.h("div", { class: "remain" }));
|
|
892
|
+
items.push(index.h("div", { class: "empty bg" }, i + goal * (repetitions - 1)));
|
|
893
|
+
items.push(index.h("div", { class: "gift bw" }, index.h(Gift, null)));
|
|
894
|
+
}
|
|
895
|
+
else {
|
|
896
|
+
items.push(index.h("div", { class: "remain" }));
|
|
897
|
+
items.push(index.h("div", { class: "empty" }, i + goal * (repetitions - 1)));
|
|
898
|
+
}
|
|
899
|
+
}
|
|
900
|
+
else {
|
|
901
|
+
items.push(index.h("div", { class: "filled" }));
|
|
902
|
+
items.push(index.h("div", { class: "progress" }, i + goal * (repetitions - 1)));
|
|
903
|
+
}
|
|
904
|
+
}
|
|
905
|
+
}
|
|
906
|
+
return { items, columns: columns.join(" ") };
|
|
907
|
+
}
|
|
908
|
+
function addLinear({ progress, goal, progressBarUnit, }) {
|
|
909
|
+
const items = [];
|
|
910
|
+
let columns = "";
|
|
911
|
+
const ratio = progress / goal;
|
|
912
|
+
columns =
|
|
913
|
+
clamp(ratio, 0, 1) + "fr 0fr " + clamp(1 - ratio, 0, 1) + "fr 0fr 0fr";
|
|
914
|
+
items.push(index.h("div", { class: "filled" }));
|
|
915
|
+
items.push(index.h("div", { class: clamp(progress, 0, goal) == goal ? "progress top bg" : "progress top" }, clamp(progress, 0, goal) == goal
|
|
916
|
+
? ""
|
|
917
|
+
: progressBarUnit + clamp(progress, 0, goal)));
|
|
918
|
+
items.push(index.h("div", { class: "remain" }));
|
|
919
|
+
items.push(index.h("div", { class: "progress bg" }, progressBarUnit + goal));
|
|
920
|
+
items.push(index.h("div", { class: clamp(progress, 0, goal) == goal ? "gift" : "gift bw" },
|
|
921
|
+
index.h(Gift, null)));
|
|
922
|
+
return { items, columns };
|
|
923
|
+
}
|
|
924
|
+
function clamp(x, min, max) {
|
|
925
|
+
return Math.min(Math.max(x, min), max);
|
|
926
|
+
}
|
|
927
|
+
|
|
928
|
+
const checkmark_circle = () => {
|
|
929
|
+
return (index.h("svg", { width: "20", height: "20", viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg" },
|
|
930
|
+
index.h("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M1.81818 10C1.81818 5.48131 5.48131 1.81818 10 1.81818C14.5187 1.81818 18.1818 5.48131 18.1818 10C18.1818 14.5187 14.5187 18.1818 10 18.1818C5.48131 18.1818 1.81818 14.5187 1.81818 10ZM10 0C4.47715 0 0 4.47715 0 10C0 15.5228 4.47715 20 10 20C15.5228 20 20 15.5228 20 10C20 4.47715 15.5228 0 10 0ZM15.7692 6.96189C16.1398 6.48683 16.0551 5.80132 15.58 5.43077C15.1049 5.06022 14.4194 5.14495 14.0489 5.62001L8.72994 12.4391L5.86229 9.5715C5.43627 9.14548 4.74554 9.14548 4.31952 9.5715C3.89349 9.99752 3.89349 10.6882 4.31952 11.1143L8.05976 14.8545C8.28083 15.0756 8.58613 15.1912 8.89818 15.172C9.21023 15.1528 9.49905 15.0006 9.69133 14.7541L15.7692 6.96189Z", fill: "currentColor" })));
|
|
931
|
+
};
|
|
932
|
+
const checkmark_filled = () => {
|
|
933
|
+
return (index.h("svg", { width: "20", height: "20", viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg" },
|
|
934
|
+
index.h("circle", { cx: "10", cy: "10", r: "10", fill: "currentColor" }),
|
|
935
|
+
index.h("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M14.65 6.19231C15.0459 6.5011 15.1165 7.07236 14.8077 7.46825L9.74277 13.9617C9.58254 14.1672 9.34186 14.294 9.08182 14.31C8.82178 14.326 8.56736 14.2297 8.38314 14.0454L5.26627 10.9286C4.91124 10.5735 4.91124 9.99794 5.26627 9.64292C5.62129 9.2879 6.19689 9.2879 6.55191 9.64292L8.94162 12.0326L13.3741 6.35001C13.6828 5.95412 14.2541 5.88352 14.65 6.19231Z", fill: "white" })));
|
|
936
|
+
};
|
|
937
|
+
const arrow_left_right = () => {
|
|
938
|
+
return (index.h("svg", { width: 11, height: 12, fill: "none", xmlns: "http://www.w3.org/2000/svg" },
|
|
939
|
+
index.h("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M10.265 2.789a.346.346 0 000-.489L8.066.101a.346.346 0 10-.489.489l1.61 1.609H2.073a.691.691 0 00-.69.691v1.728a.346.346 0 00.69 0V2.89h7.114L7.577 4.5a.346.346 0 10.49.488l2.198-2.2zM.101 9.21a.346.346 0 000 .489l2.2 2.199a.346.346 0 00.488-.489l-1.61-1.609h7.114c.382 0 .691-.31.691-.691V7.382a.346.346 0 00-.691 0V9.11H1.18L2.789 7.5a.346.346 0 10-.489-.488l-2.199 2.2z", fill: "currentColor" })));
|
|
940
|
+
};
|
|
941
|
+
|
|
942
|
+
const style$5 = {
|
|
943
|
+
TaskCard: {
|
|
944
|
+
display: "inline-block",
|
|
945
|
+
width: "100%",
|
|
946
|
+
"& .main": {
|
|
947
|
+
position: "relative",
|
|
948
|
+
boxSizing: "border-box",
|
|
949
|
+
background: "var(--sl-color-neutral-0)",
|
|
950
|
+
border: "1px solid var(--sl-color-neutral-200)",
|
|
951
|
+
borderRadius: "var(--sl-border-radius-medium)",
|
|
952
|
+
boxShadow: "1px 2px 4px rgba(211, 211, 211, 0.2)",
|
|
953
|
+
fontSize: "var(--sl-font-size-small)",
|
|
954
|
+
lineHeight: "var(--sl-line-height-dense)",
|
|
955
|
+
color: "var(--sl-color-neutral-600)",
|
|
956
|
+
},
|
|
957
|
+
"& .main.complete": {
|
|
958
|
+
background: "var(--sl-color-primary-50)",
|
|
959
|
+
borderColor: "var(--sl-color-primary-500)",
|
|
960
|
+
},
|
|
961
|
+
"& .main.expired": {
|
|
962
|
+
color: "var(--sl-color-neutral-600)",
|
|
963
|
+
background: "var(--sl-color-neutral-50)",
|
|
964
|
+
},
|
|
965
|
+
"& .title": {
|
|
966
|
+
fontSize: "var(--sl-font-size-medium)",
|
|
967
|
+
// fontWeight: "var(--sl-font-weight-semibold)",
|
|
968
|
+
color: "var(--sl-color-neutral-950)",
|
|
969
|
+
},
|
|
970
|
+
"& .container": {
|
|
971
|
+
margin: "var(--sl-spacing-medium)",
|
|
972
|
+
},
|
|
973
|
+
"& .container.subdued": {
|
|
974
|
+
opacity: "0.45",
|
|
975
|
+
},
|
|
976
|
+
"& .container > div": {
|
|
977
|
+
margin: "var(--sl-spacing-medium) 0",
|
|
978
|
+
},
|
|
979
|
+
},
|
|
980
|
+
NotStarted: {
|
|
981
|
+
fontSize: "var(--sl-font-size-small)",
|
|
982
|
+
padding: "var(--sl-spacing-medium)",
|
|
983
|
+
color: "var(--sl-color-primary-600)",
|
|
984
|
+
border: "1px solid var(--sl-color-neutral-200)",
|
|
985
|
+
borderRadius: "var(--sl-border-radius-medium) var(--sl-border-radius-medium) 0 0",
|
|
986
|
+
borderBottom: "none",
|
|
987
|
+
background: "var(--sl-color-primary-50)",
|
|
988
|
+
fontWeight: "var(--sl-font-weight-semibold)",
|
|
989
|
+
lineHeight: "var(--sl-line-height-dense)",
|
|
990
|
+
"& .icon": {
|
|
991
|
+
position: "relative",
|
|
992
|
+
top: "0.1em",
|
|
993
|
+
marginRight: "var(--sl-spacing-small)",
|
|
994
|
+
color: "var(--sl-color-primary-500)",
|
|
995
|
+
},
|
|
996
|
+
},
|
|
997
|
+
Ended: {
|
|
998
|
+
fontSize: "var(--sl-font-size-small)",
|
|
999
|
+
padding: "var(--sl-spacing-medium)",
|
|
1000
|
+
color: "var(--sl-color-warning-600)",
|
|
1001
|
+
border: "1px solid var(--sl-color-neutral-200)",
|
|
1002
|
+
borderRadius: "var(--sl-border-radius-medium) var(--sl-border-radius-medium) 0 0",
|
|
1003
|
+
borderBottom: "none",
|
|
1004
|
+
background: "var(--sl-color-warning-50)",
|
|
1005
|
+
fontWeight: "var(--sl-font-weight-semibold)",
|
|
1006
|
+
lineHeight: "var(--sl-line-height-dense)",
|
|
1007
|
+
"& .icon": {
|
|
1008
|
+
position: "relative",
|
|
1009
|
+
top: "0.1em",
|
|
1010
|
+
marginRight: "var(--sl-spacing-small)",
|
|
1011
|
+
color: "var(--sl-color-warning-500)",
|
|
1012
|
+
},
|
|
1013
|
+
},
|
|
1014
|
+
Header: {
|
|
1015
|
+
display: "flex",
|
|
1016
|
+
"& .icon": {
|
|
1017
|
+
position: "relative",
|
|
1018
|
+
top: "5%",
|
|
1019
|
+
alignSelf: "center",
|
|
1020
|
+
lineHeight: "0",
|
|
1021
|
+
color: "var(--sl-color-primary-400)",
|
|
1022
|
+
fontSize: "var(--sl-font-size-large)",
|
|
1023
|
+
marginRight: "var(--sl-spacing-x-small)",
|
|
1024
|
+
},
|
|
1025
|
+
"& .value": {
|
|
1026
|
+
alignSelf: "center",
|
|
1027
|
+
fontSize: "var(--sl-font-size-x-large)",
|
|
1028
|
+
fontWeight: "var(--sl-font-weight-semibold)",
|
|
1029
|
+
color: "var(--sl-color-neutral-950)",
|
|
1030
|
+
lineHeight: "100%",
|
|
1031
|
+
marginRight: "var(--sl-spacing-xx-small)",
|
|
1032
|
+
},
|
|
1033
|
+
"& .text": {
|
|
1034
|
+
alignSelf: "end",
|
|
1035
|
+
textTransform: "uppercase",
|
|
1036
|
+
fontSize: "var(--sl-font-size-x-small)",
|
|
1037
|
+
color: "var(--sl-color-neutral-950)",
|
|
1038
|
+
lineHeight: "var(--sl-font-size-medium)",
|
|
1039
|
+
marginRight: "var(--sl-spacing-xx-small)",
|
|
1040
|
+
},
|
|
1041
|
+
"& .end": {
|
|
1042
|
+
color: "var(--sl-color-warning-500)",
|
|
1043
|
+
fontWeight: "var(--sl-font-weight-semibold)",
|
|
1044
|
+
marginBottom: "var(--sl-spacing-xx-small)",
|
|
1045
|
+
},
|
|
1046
|
+
"& .neutral": {
|
|
1047
|
+
color: "var(--sl-color-neutral-400)",
|
|
1048
|
+
},
|
|
1049
|
+
},
|
|
1050
|
+
Footer: {
|
|
1051
|
+
display: "flex",
|
|
1052
|
+
"& .icon": {
|
|
1053
|
+
fontSize: "var(--sl-font-size-xx-small)",
|
|
1054
|
+
marginRight: "var(--sl-spacing-xx-small)",
|
|
1055
|
+
verticalAlign: "middle",
|
|
1056
|
+
},
|
|
1057
|
+
"& .text": {
|
|
1058
|
+
marginTop: "auto",
|
|
1059
|
+
verticalAlign: "text-bottom",
|
|
1060
|
+
fontSize: "var(--sl-font-size-x-small)",
|
|
1061
|
+
color: "var(--sl-color-neutral-400)",
|
|
1062
|
+
},
|
|
1063
|
+
"& .success": {
|
|
1064
|
+
color: "var(--sl-color-primary-500)",
|
|
1065
|
+
fontWeight: "var(--sl-font-weight-semibold)",
|
|
1066
|
+
},
|
|
1067
|
+
"& .action": {
|
|
1068
|
+
marginTop: "auto",
|
|
1069
|
+
marginLeft: "auto",
|
|
1070
|
+
"&::part(base)": {
|
|
1071
|
+
color: "var(--sl-color-neutral-0)",
|
|
1072
|
+
borderRadius: "var(--sl-border-radius-medium)",
|
|
1073
|
+
},
|
|
1074
|
+
"&.disabled::part(base)": {
|
|
1075
|
+
border: "1px solid var(--sl-color-primary-400)",
|
|
1076
|
+
background: "var(--sl-color-primary-400)",
|
|
1077
|
+
},
|
|
1078
|
+
"&.neutral::part(base)": {
|
|
1079
|
+
border: "1px solid var(--sl-color-neutral-400)",
|
|
1080
|
+
background: "var(--sl-color-neutral-400)",
|
|
1081
|
+
},
|
|
1082
|
+
},
|
|
1083
|
+
"& .neutral": {
|
|
1084
|
+
color: "var(--sl-color-neutral-400)",
|
|
1085
|
+
},
|
|
1086
|
+
"& .datetime": {
|
|
1087
|
+
display: "block",
|
|
1088
|
+
marginTop: "var(--sl-spacing-xx-small)",
|
|
1089
|
+
color: "var(--sl-color-neutral-400)",
|
|
1090
|
+
},
|
|
1091
|
+
},
|
|
1092
|
+
};
|
|
1093
|
+
const sheet$5 = JSS.createStyleSheet(style$5);
|
|
1094
|
+
const styleString$5 = sheet$5.toString();
|
|
1095
|
+
function TaskCardView(props) {
|
|
1096
|
+
var _a, _b, _c;
|
|
1097
|
+
console.log("TASK CARD PROPS " + ((_a = props === null || props === void 0 ? void 0 : props.content) === null || _a === void 0 ? void 0 : _a.cardTitle));
|
|
1098
|
+
console.log({ props });
|
|
1099
|
+
const { callbacks, states, content } = props;
|
|
1100
|
+
const dateStart = content.showExpiry &&
|
|
1101
|
+
luxon.luxon.DateTime.fromISO(content.rewardDuration.split("/")[0]);
|
|
1102
|
+
const dateEnd = content.showExpiry &&
|
|
1103
|
+
luxon.luxon.DateTime.fromISO(content.rewardDuration.split("/")[1]);
|
|
1104
|
+
const dateToday = luxon.luxon.DateTime.now();
|
|
1105
|
+
if (content.displayDuration) {
|
|
1106
|
+
const start = (_b = content.displayDuration.split("/")) === null || _b === void 0 ? void 0 : _b[0];
|
|
1107
|
+
const end = (_c = content.displayDuration.split("/")) === null || _c === void 0 ? void 0 : _c[1];
|
|
1108
|
+
const displayDateStart = start ? luxon.luxon.DateTime.fromISO(start) : dateToday;
|
|
1109
|
+
const displayDateEnd = end ? luxon.luxon.DateTime.fromISO(end) : dateToday;
|
|
1110
|
+
console.log({ displayDateStart, dateToday, displayDateEnd });
|
|
1111
|
+
if (dateToday < displayDateStart || dateToday > displayDateEnd)
|
|
1112
|
+
return index.h("span", null);
|
|
1113
|
+
}
|
|
1114
|
+
const checkmark_circle$1 = checkmark_circle();
|
|
1115
|
+
const checkmark_filled$1 = checkmark_filled();
|
|
1116
|
+
const arrow_left_right$1 = arrow_left_right();
|
|
1117
|
+
const showComplete = states.progress >= content.goal;
|
|
1118
|
+
const repetitions = content.showProgressBar
|
|
1119
|
+
? Math.floor(states.progress / content.goal)
|
|
1120
|
+
: states.progress;
|
|
1121
|
+
const taskComplete = (showComplete && content.repeatable === false) ||
|
|
1122
|
+
(content.finite && states.progress >= content.finite * content.goal);
|
|
1123
|
+
const taskEnded = content.showExpiry && dateEnd <= dateToday;
|
|
1124
|
+
const taskNotStarted = content.showExpiry && dateToday <= dateStart;
|
|
1125
|
+
const taskUnavailable = taskEnded || taskNotStarted;
|
|
1126
|
+
const vanillaStyle = `
|
|
1127
|
+
:host{
|
|
1128
|
+
display: block;
|
|
1129
|
+
margin-bottom: var(--sl-spacing-large);
|
|
1130
|
+
}
|
|
1131
|
+
`;
|
|
1132
|
+
return (index.h("div", { class: sheet$5.classes.TaskCard },
|
|
1133
|
+
index.h("style", { type: "text/css" },
|
|
1134
|
+
styleString$5,
|
|
1135
|
+
vanillaStyle),
|
|
1136
|
+
!states.loading && taskNotStarted && (index.h("div", { class: sheet$5.classes.NotStarted },
|
|
1137
|
+
index.h("span", { class: "icon" },
|
|
1138
|
+
index.h("sl-icon", { name: "info-circle-fill" })),
|
|
1139
|
+
global.intl.formatMessage({
|
|
1140
|
+
id: "startsOnMessage",
|
|
1141
|
+
defaultMessage: content.startsOnMessage,
|
|
1142
|
+
}, {
|
|
1143
|
+
startDate: states.locale.includes("en")
|
|
1144
|
+
? dateStart
|
|
1145
|
+
.setLocale(utils.luxonLocale(states.locale))
|
|
1146
|
+
.toLocaleString(luxon.luxon.DateTime.DATETIME_MED)
|
|
1147
|
+
.split(",")
|
|
1148
|
+
.slice(0, 2)
|
|
1149
|
+
.join(",") +
|
|
1150
|
+
" at " +
|
|
1151
|
+
dateStart
|
|
1152
|
+
.setLocale(utils.luxonLocale(states.locale))
|
|
1153
|
+
.toLocaleString(luxon.luxon.DateTime.DATETIME_MED)
|
|
1154
|
+
.split(",")
|
|
1155
|
+
.slice(2)
|
|
1156
|
+
.join(",")
|
|
1157
|
+
.toLowerCase()
|
|
1158
|
+
: dateStart
|
|
1159
|
+
.setLocale(utils.luxonLocale(states.locale))
|
|
1160
|
+
.toLocaleString(luxon.luxon.DateTime.DATETIME_MED),
|
|
1161
|
+
}))),
|
|
1162
|
+
!states.loading && taskEnded && (index.h("div", { class: sheet$5.classes.Ended },
|
|
1163
|
+
index.h("span", { class: "icon" },
|
|
1164
|
+
index.h("sl-icon", { name: "exclamation-triangle-fill" })),
|
|
1165
|
+
global.intl.formatMessage({
|
|
1166
|
+
id: "endedMessage",
|
|
1167
|
+
defaultMessage: content.endedMessage,
|
|
1168
|
+
}, {
|
|
1169
|
+
endDate: states.locale.includes("en")
|
|
1170
|
+
? dateEnd
|
|
1171
|
+
.setLocale(utils.luxonLocale(states.locale))
|
|
1172
|
+
.toLocaleString(luxon.luxon.DateTime.DATETIME_MED)
|
|
1173
|
+
.split(",")
|
|
1174
|
+
.slice(0, 2)
|
|
1175
|
+
.join(",") +
|
|
1176
|
+
" at " +
|
|
1177
|
+
dateEnd
|
|
1178
|
+
.setLocale(utils.luxonLocale(states.locale))
|
|
1179
|
+
.toLocaleString(luxon.luxon.DateTime.DATETIME_MED)
|
|
1180
|
+
.split(",")
|
|
1181
|
+
.slice(2)
|
|
1182
|
+
.join(",")
|
|
1183
|
+
.toLowerCase()
|
|
1184
|
+
: dateEnd
|
|
1185
|
+
.setLocale(states.locale)
|
|
1186
|
+
.toLocaleString(luxon.luxon.DateTime.DATETIME_MED),
|
|
1187
|
+
}))),
|
|
1188
|
+
index.h("div", { style: {
|
|
1189
|
+
borderRadius: taskUnavailable &&
|
|
1190
|
+
"0 0 var(--sl-border-radius-medium) var(--sl-border-radius-medium)",
|
|
1191
|
+
}, class: taskUnavailable
|
|
1192
|
+
? "main expired"
|
|
1193
|
+
: taskComplete
|
|
1194
|
+
? "main complete"
|
|
1195
|
+
: "main" },
|
|
1196
|
+
index.h("div", { class: taskComplete || taskUnavailable ? "container subdued" : "container" },
|
|
1197
|
+
index.h("div", { class: sheet$5.classes.Header }, states.loading ? (index.h("sl-skeleton", { style: { width: "22%", margin: "0" } })) : (index.h("div", null,
|
|
1198
|
+
showComplete && (index.h("span", { class: taskUnavailable ? "icon neutral" : "icon" }, taskComplete ? checkmark_filled$1 : checkmark_circle$1)),
|
|
1199
|
+
index.h("span", { class: "value" }, content.rewardAmount),
|
|
1200
|
+
index.h("span", { class: "text" }, content.rewardUnit)))),
|
|
1201
|
+
states.loading ? (index.h("sl-skeleton", { style: { width: "42%", margin: "var(--sl-spacing-medium) 0" } })) : (index.h("div", { class: "title", style: {
|
|
1202
|
+
marginBottom: !content.description
|
|
1203
|
+
? content.steps
|
|
1204
|
+
? "var(--sl-spacing-x-large)"
|
|
1205
|
+
: content.showProgressBar
|
|
1206
|
+
? "var(--sl-spacing-xx-large)"
|
|
1207
|
+
: ""
|
|
1208
|
+
: "",
|
|
1209
|
+
} }, content.cardTitle)),
|
|
1210
|
+
states.loading ? (index.h("sl-skeleton", { style: { margin: "var(--sl-spacing-medium) 0" } })) : (content.description && index.h(Details, Object.assign({}, props))),
|
|
1211
|
+
content.showProgressBar && states.loading ? (index.h("sl-skeleton", { style: { margin: "var(--sl-spacing-medium) 0" } })) : (content.showProgressBar && (index.h(ProgressBarView, Object.assign({}, props.content, props.states, { complete: taskComplete, expired: taskUnavailable })))),
|
|
1212
|
+
index.h("div", { class: sheet$5.classes.Footer }, states.loading ? (index.h("sl-skeleton", { style: { width: "25%", marginLeft: "auto" } })) : (index.h("div", { style: { display: "contents" } },
|
|
1213
|
+
index.h("span", { class: "text" },
|
|
1214
|
+
content.repeatable && (index.h("div", null,
|
|
1215
|
+
index.h("span", { class: repetitions > 0
|
|
1216
|
+
? taskUnavailable
|
|
1217
|
+
? "icon neutral"
|
|
1218
|
+
: "icon success"
|
|
1219
|
+
: "icon" }, arrow_left_right$1),
|
|
1220
|
+
index.h("span", { class: repetitions > 0
|
|
1221
|
+
? taskUnavailable
|
|
1222
|
+
? "neutral"
|
|
1223
|
+
: "success"
|
|
1224
|
+
: "" }, global.intl.formatMessage({
|
|
1225
|
+
id: "completedMessage",
|
|
1226
|
+
defaultMessage: content.completedText,
|
|
1227
|
+
}, {
|
|
1228
|
+
finite: content.finite,
|
|
1229
|
+
count: content.finite
|
|
1230
|
+
? Math.min(repetitions, content.finite)
|
|
1231
|
+
: repetitions,
|
|
1232
|
+
})))),
|
|
1233
|
+
content.showExpiry && !taskUnavailable && (index.h("span", { class: "datetime" }, global.intl.formatMessage({
|
|
1234
|
+
id: "expiryMessage",
|
|
1235
|
+
defaultMessage: content.expiryMessage,
|
|
1236
|
+
}, {
|
|
1237
|
+
endDate: states.locale.includes("en")
|
|
1238
|
+
? dateEnd
|
|
1239
|
+
.setLocale(utils.luxonLocale(states.locale))
|
|
1240
|
+
.toLocaleString(luxon.luxon.DateTime.DATETIME_MED)
|
|
1241
|
+
.split(",")
|
|
1242
|
+
.slice(0, 2)
|
|
1243
|
+
.join(",") +
|
|
1244
|
+
" at " +
|
|
1245
|
+
dateEnd
|
|
1246
|
+
.setLocale(utils.luxonLocale(states.locale))
|
|
1247
|
+
.toLocaleString(luxon.luxon.DateTime.DATETIME_MED)
|
|
1248
|
+
.split(",")
|
|
1249
|
+
.slice(2)
|
|
1250
|
+
.join(",")
|
|
1251
|
+
.toLowerCase()
|
|
1252
|
+
: dateEnd
|
|
1253
|
+
.setLocale(utils.luxonLocale(states.locale))
|
|
1254
|
+
.toLocaleString(luxon.luxon.DateTime.DATETIME_MED),
|
|
1255
|
+
})))),
|
|
1256
|
+
index.h("sl-button", { class: taskUnavailable
|
|
1257
|
+
? "action neutral"
|
|
1258
|
+
: taskComplete
|
|
1259
|
+
? "action disabled"
|
|
1260
|
+
: "action", type: "primary", size: "small", onClick: callbacks.onClick, loading: states.loadingEvent, disabled: taskComplete || taskUnavailable }, content.buttonText))))))));
|
|
1261
|
+
}
|
|
1262
|
+
|
|
1263
|
+
function ReferralIframeView(props) {
|
|
1264
|
+
const { states, data } = props;
|
|
1265
|
+
const { content } = states;
|
|
1266
|
+
const style = {
|
|
1267
|
+
Container: {
|
|
1268
|
+
position: "relative",
|
|
1269
|
+
width: content.iframeWidth,
|
|
1270
|
+
height: content.iframeHeight,
|
|
1271
|
+
},
|
|
1272
|
+
IFrame: {
|
|
1273
|
+
position: "absolute",
|
|
1274
|
+
width: "100%",
|
|
1275
|
+
height: "100%",
|
|
1276
|
+
border: "0",
|
|
1277
|
+
top: "0",
|
|
1278
|
+
left: "0",
|
|
1279
|
+
right: "0",
|
|
1280
|
+
},
|
|
1281
|
+
};
|
|
1282
|
+
// JSS config
|
|
1283
|
+
const sheet = JSS.createStyleSheet(style);
|
|
1284
|
+
const styleString = sheet.toString();
|
|
1285
|
+
return (index.h("div", { class: sheet.classes.Container },
|
|
1286
|
+
index.h("style", { type: "text/css" }, styleString),
|
|
1287
|
+
index.h("iframe", { class: sheet.classes.IFrame, src: `${content.iframeSrc}?rsCode=${data.shareCode}` })));
|
|
1288
|
+
}
|
|
1289
|
+
|
|
1290
|
+
const CheckMark = () => (index.h("svg", { width: 12, height: 10, fill: "none", xmlns: "http://www.w3.org/2000/svg" },
|
|
1291
|
+
index.h("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M11.58.23c.475.371.56 1.057.19 1.532L5.69 9.554a1.091 1.091 0 0 1-1.631.1L.32 5.915a1.09 1.09 0 1 1 1.542-1.542L4.73 7.239 10.049.42A1.09 1.09 0 0 1 11.58.23Z", fill: "#fff" })));
|
|
1292
|
+
const CheckmarkFilled = () => (index.h("svg", { width: "18", height: "18", viewBox: "0 0 18 18", fill: "none", xmlns: "http://www.w3.org/2000/svg" },
|
|
1293
|
+
index.h("path", { d: "M0 9C0 4.02944 4.02944 0 9 0C13.9706 0 18 4.02944 18 9C18 13.9706 13.9706 18 9 18C4.02944 18 0 13.9706 0 9Z", fill: "currentColor" }),
|
|
1294
|
+
index.h("path", { d: "M5.68394 8.77046C5.28103 8.39273 4.64819 8.41315 4.27046 8.81606C3.89273 9.21897 3.91315 9.85181 4.31606 10.2295L5.68394 8.77046ZM7.66667 12L6.98273 12.7295C7.36738 13.0902 7.96595 13.0902 8.35061 12.7295L7.66667 12ZM13.6839 7.72954C14.0869 7.35181 14.1073 6.71897 13.7295 6.31606C13.3518 5.91315 12.719 5.89273 12.3161 6.27046L13.6839 7.72954ZM4.31606 10.2295L6.98273 12.7295L8.35061 11.2705L5.68394 8.77046L4.31606 10.2295ZM8.35061 12.7295L13.6839 7.72954L12.3161 6.27046L6.98273 11.2705L8.35061 12.7295Z", fill: "white" })));
|
|
1295
|
+
const Gift$1 = () => (index.h("svg", { width: 156, height: 157, fill: "none", xmlns: "http://www.w3.org/2000/svg" },
|
|
1296
|
+
index.h("path", { d: "M40.18 126h83.663a3 3 0 0 0 3-3V73.966a3 3 0 0 0-3-3H40.18a3 3 0 0 0-3 3V123a3 3 0 0 0 3 3Z", fill: "#FFD34F" }),
|
|
1297
|
+
index.h("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M37.18 73.862v7.966h89.663v-7.966H37.18Z", fill: "#E9BB30" }),
|
|
1298
|
+
index.h("path", { d: "M133.039 74.224a2.18 2.18 0 0 0 2.187-2.172v-19.19c0-1.2-.98-2.172-2.187-2.172H31.347a2.18 2.18 0 0 0-2.187 2.172v19.19c0 1.2.98 2.172 2.187 2.172H133.04Z", fill: "#FFC000" }),
|
|
1299
|
+
index.h("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M123.287 35.172c0 6.056-9.155 15.226-13.76 15.654H88.888V126H75.141V50.826H58.534c-9.462-2.038-17.803-9.258-17.803-16.944 0-7.49 3.274-13.422 9.23-15.983 5.693-2.446 12.265-1.105 17.46 2.479 6.378 4.398 9.956 12.654 13.202 20.144.284.657.567 1.308.848 1.95.274-.608.55-1.228.83-1.856 3.216-7.22 6.887-15.464 13.057-19.89 5.454-3.913 12.387-5.39 18.38-2.711 6.197 2.77 9.549 9.127 9.549 17.157Zm-23.306-8.266c3.305-2.37 7.262-2.8 10.645 0 2.946 2.44 3.103 3.588 3.482 6.351l.067.483c0 4.09-3.549 10.252-7.097 10.252-2.515 0-4.489-.022-6.34-.041-3.375-.036-6.337-.068-11.403.04.966-1.86 1.737-3.644 2.473-5.346 1.967-4.553 3.678-8.515 8.173-11.739Zm-39.034 0c-1.6-1.103-5.268-.61-6.79.043-1.257.54-3.134 2.19-3.134 6.933 0 4.61 7.511 8.59 7.511 8.59s5.962 1.52 16.607 1.52c-3.624-8.922-8.757-13.336-14.194-17.086Z", fill: "#EB5757" }),
|
|
1300
|
+
index.h("path", { d: "M75.086 74.224h13.85v7.604h-13.85v-7.604Z", fill: "#DD4747" }),
|
|
1301
|
+
index.h("g", { filter: "url(#a)" },
|
|
1302
|
+
index.h("ellipse", { cx: 82.008, cy: 141.207, rx: 36.813, ry: 5.793, fill: "#E0DDDD", "fill-opacity": 0.8 })),
|
|
1303
|
+
index.h("path", { d: "M150.446 79.134a.5.5 0 0 1 .9 0l1.133 2.336c.05.102.132.184.234.233l2.344 1.122a.5.5 0 0 1 0 .902l-2.344 1.122a.503.503 0 0 0-.234.233l-1.133 2.336a.5.5 0 0 1-.9 0l-1.134-2.336a.499.499 0 0 0-.234-.233l-2.343-1.122a.5.5 0 0 1 0-.902l2.343-1.122a.499.499 0 0 0 .234-.233l1.134-2.336Z", fill: "#FAB6B6" }),
|
|
1304
|
+
index.h("path", { d: "M14.86 29.168a.5.5 0 0 1 .9 0l1.133 2.336a.5.5 0 0 0 .234.233l2.344 1.122a.5.5 0 0 1 0 .902l-2.344 1.122a.5.5 0 0 0-.234.233l-1.133 2.336a.5.5 0 0 1-.9 0l-1.134-2.336a.5.5 0 0 0-.234-.233l-2.343-1.122a.5.5 0 0 1 0-.902l2.344-1.122a.5.5 0 0 0 .233-.233l1.134-2.336Z", fill: "#F4EFBC" }),
|
|
1305
|
+
index.h("path", { d: "m125.382 0 .712 1.466 1.475.706-1.475.707-.712 1.466-.711-1.466-1.476-.707 1.476-.706.711-1.466Z", fill: "#FDA802" }),
|
|
1306
|
+
index.h("path", { d: "m2.187 103.552.711 1.466 1.476.706-1.476.707-.711 1.466-.711-1.466L0 105.724l1.476-.706.71-1.466Z", fill: "#E4599C" }),
|
|
1307
|
+
index.h("defs", null,
|
|
1308
|
+
index.h("filter", { id: "a", x: 35.195, y: 125.414, width: 93.625, height: 31.586, filterUnits: "userSpaceOnUse", "color-interpolation-filters": "s-rGB" },
|
|
1309
|
+
index.h("feFlood", { "flood-opacity": 0, result: "BackgroundImageFix" }),
|
|
1310
|
+
index.h("feBlend", { in: "SourceGraphic", in2: "BackgroundImageFix", result: "shape" }),
|
|
1311
|
+
index.h("feGaussianBlur", { stdDeviation: 5, result: "effect1_foregroundBlur_653_17907" })))));
|
|
1312
|
+
|
|
1313
|
+
function Dot({ active, completed, incomplete, stage, }) {
|
|
1314
|
+
return (index.h("div", { style: {
|
|
1315
|
+
display: "flex",
|
|
1316
|
+
} },
|
|
1317
|
+
index.h("div", { style: {
|
|
1318
|
+
backgroundColor: completed
|
|
1319
|
+
? "var(--sl-color-success-500)"
|
|
1320
|
+
: incomplete
|
|
1321
|
+
? "var(--sl-color-neutral-200)"
|
|
1322
|
+
: "var(--sl-color-neutral-0)",
|
|
1323
|
+
border: active
|
|
1324
|
+
? "1px solid var(--sl-color-success-500)"
|
|
1325
|
+
: incomplete
|
|
1326
|
+
? "1px solid var(--sl-color-neutral-200)"
|
|
1327
|
+
: "1px solid var(--sl-color-success-500)",
|
|
1328
|
+
borderRadius: "50%",
|
|
1329
|
+
width: "23px",
|
|
1330
|
+
height: "23px",
|
|
1331
|
+
margin: "-11px",
|
|
1332
|
+
zIndex: "1",
|
|
1333
|
+
boxSizing: "content-box",
|
|
1334
|
+
} }, completed ? (index.h("div", { style: { top: "-10.5%", left: "23.5%", position: "relative" } },
|
|
1335
|
+
index.h(CheckMark, null))) : (index.h("div", { style: {
|
|
1336
|
+
color: active
|
|
1337
|
+
? "var(--sl-color-success-500)"
|
|
1338
|
+
: "var(--sl-color-neutral-50)",
|
|
1339
|
+
width: "23px",
|
|
1340
|
+
lineHeight: "24px",
|
|
1341
|
+
textAlign: "center",
|
|
1342
|
+
position: "relative",
|
|
1343
|
+
} }, stage + 1)))));
|
|
1344
|
+
}
|
|
1345
|
+
function ProgressLine({ incomplete = false, active = false, invisible = false, }) {
|
|
1346
|
+
return (index.h("div", { style: {
|
|
1347
|
+
content: "''",
|
|
1348
|
+
flex: "0.5 0.5 0",
|
|
1349
|
+
height: "4px",
|
|
1350
|
+
borderRadius: "4px",
|
|
1351
|
+
background: incomplete || active
|
|
1352
|
+
? "var(--sl-color-neutral-200)"
|
|
1353
|
+
: "var(--sl-color-success-500)",
|
|
1354
|
+
position: "relative",
|
|
1355
|
+
bottom: "0",
|
|
1356
|
+
left: "0",
|
|
1357
|
+
display: "flex",
|
|
1358
|
+
justifyContent: "center",
|
|
1359
|
+
columnGap: "50px",
|
|
1360
|
+
marginRight: "-2px",
|
|
1361
|
+
boxSizing: "content-box",
|
|
1362
|
+
opacity: invisible ? "0" : "1",
|
|
1363
|
+
} }));
|
|
1364
|
+
}
|
|
1365
|
+
function Progress({ active, completed, incomplete, stage }) {
|
|
1366
|
+
return [
|
|
1367
|
+
index.h(ProgressLine, { incomplete: incomplete, invisible: stage === 0 }),
|
|
1368
|
+
index.h(Dot, { active: active, completed: completed, incomplete: incomplete, stage: stage }),
|
|
1369
|
+
index.h(ProgressLine, { incomplete: incomplete, active: active, invisible: stage === 2 }),
|
|
1370
|
+
];
|
|
1371
|
+
}
|
|
1372
|
+
function ProgressBar({ stageCount, currentStage, }) {
|
|
1373
|
+
return (index.h("div", { style: { display: "flex", columnGap: "-2px" } }, Array.from(Array(stageCount).keys()).map((stage) => (index.h(Progress, { active: currentStage === stage, completed: currentStage > stage, incomplete: currentStage < stage, stage: stage })))));
|
|
1374
|
+
}
|
|
1375
|
+
|
|
1376
|
+
const stageList = ["chooseReward", "chooseAmount", "confirmation", "success"];
|
|
1377
|
+
function RewardExchangeView(props) {
|
|
1378
|
+
const { states, data, callbacks, refs } = props;
|
|
1379
|
+
const { selectedItem, selectedStep } = states;
|
|
1380
|
+
const stageProgressList = {
|
|
1381
|
+
chooseReward: states.content.text.chooseRewardTitle,
|
|
1382
|
+
chooseAmount: states.content.text.chooseAmountTitle,
|
|
1383
|
+
confirmation: states.content.text.confirmationTitle,
|
|
1384
|
+
};
|
|
1385
|
+
const style = {
|
|
1386
|
+
HostBlock: mixins.HostBlock,
|
|
1387
|
+
Container: {
|
|
1388
|
+
padding: "var(--sl-spacing-medium)",
|
|
1389
|
+
position: "relative",
|
|
1390
|
+
},
|
|
1391
|
+
FullImage: {
|
|
1392
|
+
objectFit: "contain",
|
|
1393
|
+
maxWidth: "100%",
|
|
1394
|
+
height: "250px",
|
|
1395
|
+
display: "flex",
|
|
1396
|
+
margin: "0 auto",
|
|
1397
|
+
},
|
|
1398
|
+
Select: {
|
|
1399
|
+
"&::part(label)": {
|
|
1400
|
+
color: "var(--sl-color-primary-500)",
|
|
1401
|
+
},
|
|
1402
|
+
"&::part(menu)": {
|
|
1403
|
+
maxHeight: "50vh",
|
|
1404
|
+
},
|
|
1405
|
+
},
|
|
1406
|
+
ProgressBar: {
|
|
1407
|
+
maxWidth: "350px",
|
|
1408
|
+
width: "100%",
|
|
1409
|
+
margin: "auto",
|
|
1410
|
+
marginBottom: "var(--sl-spacing-xxx-large)",
|
|
1411
|
+
"& .text-area": {
|
|
1412
|
+
marginTop: "5px",
|
|
1413
|
+
display: "flex",
|
|
1414
|
+
justifyContent: "center",
|
|
1415
|
+
textAlign: "center",
|
|
1416
|
+
whiteSpace: "nowrap",
|
|
1417
|
+
marginBottom: "6px",
|
|
1418
|
+
"& .text": {
|
|
1419
|
+
marginBottom: "var(--sl-spacing-x-small)",
|
|
1420
|
+
flex: "1 1 0",
|
|
1421
|
+
},
|
|
1422
|
+
"& .text.subdued": {
|
|
1423
|
+
color: "var(--sl-color-neutral-200)",
|
|
1424
|
+
},
|
|
1425
|
+
},
|
|
1426
|
+
},
|
|
1427
|
+
CardLayout: {
|
|
1428
|
+
display: "flex",
|
|
1429
|
+
width: "100%",
|
|
1430
|
+
borderRadius: "3px",
|
|
1431
|
+
background: "rgba(0, 0, 0, 0)",
|
|
1432
|
+
},
|
|
1433
|
+
Card: {
|
|
1434
|
+
display: "flex",
|
|
1435
|
+
userSelect: "none",
|
|
1436
|
+
height: "120px",
|
|
1437
|
+
"&::part(base)": {
|
|
1438
|
+
boxShadow: "none",
|
|
1439
|
+
width: "100%",
|
|
1440
|
+
},
|
|
1441
|
+
"&::part(body)": {
|
|
1442
|
+
display: "flex",
|
|
1443
|
+
padding: 0,
|
|
1444
|
+
},
|
|
1445
|
+
"& .selected": {
|
|
1446
|
+
position: "relative",
|
|
1447
|
+
top: "-2%",
|
|
1448
|
+
left: "100%",
|
|
1449
|
+
color: "var(--sl-color-primary-500)",
|
|
1450
|
+
margin: "-9px",
|
|
1451
|
+
},
|
|
1452
|
+
},
|
|
1453
|
+
Image: {
|
|
1454
|
+
padding: "var(--sl-spacing-small)",
|
|
1455
|
+
minWidth: "96px",
|
|
1456
|
+
maxWidth: "96px",
|
|
1457
|
+
"& .image": {
|
|
1458
|
+
width: "100%",
|
|
1459
|
+
height: "100%",
|
|
1460
|
+
objectFit: "contain",
|
|
1461
|
+
borderRadius: "4px",
|
|
1462
|
+
},
|
|
1463
|
+
"& .image.subdued": {
|
|
1464
|
+
filter: "brightness(0.95)",
|
|
1465
|
+
opacity: "0.5",
|
|
1466
|
+
},
|
|
1467
|
+
},
|
|
1468
|
+
Square: {
|
|
1469
|
+
width: "120px",
|
|
1470
|
+
height: "118px",
|
|
1471
|
+
borderRadius: "3px 0 0 3px",
|
|
1472
|
+
"& .image": {
|
|
1473
|
+
width: "100%",
|
|
1474
|
+
height: "100%",
|
|
1475
|
+
objectFit: "contain",
|
|
1476
|
+
borderRadius: "inherit",
|
|
1477
|
+
},
|
|
1478
|
+
},
|
|
1479
|
+
TextArea: {
|
|
1480
|
+
textAlign: "left",
|
|
1481
|
+
padding: "var(--sl-spacing-small)",
|
|
1482
|
+
paddingLeft: "0",
|
|
1483
|
+
"& .title": {
|
|
1484
|
+
fontSize: "var(--sl-font-size-medium)",
|
|
1485
|
+
lineHeight: "var(--sl-line-height-dense)",
|
|
1486
|
+
fontWeight: "600",
|
|
1487
|
+
color: "var(--sl-color-neutral-1000)",
|
|
1488
|
+
display: "-webkit-box",
|
|
1489
|
+
"-webkit-line-clamp": "1",
|
|
1490
|
+
"-webkit-box-orient": "vertical",
|
|
1491
|
+
overflow: "hidden",
|
|
1492
|
+
},
|
|
1493
|
+
"& .amount": {
|
|
1494
|
+
fontSize: "var(--sl-font-size-small)",
|
|
1495
|
+
lineHeight: "var(--sl-line-height-dense)",
|
|
1496
|
+
marginTop: "var(--sl-spacing-x-small)",
|
|
1497
|
+
color: "var(--sl-color-neutral-500)",
|
|
1498
|
+
display: "-webkit-box",
|
|
1499
|
+
"-webkit-line-clamp": "1",
|
|
1500
|
+
"-webkit-box-orient": "vertical",
|
|
1501
|
+
overflow: "hidden",
|
|
1502
|
+
},
|
|
1503
|
+
"& .error": {
|
|
1504
|
+
fontSize: "var(--sl-font-size-small)",
|
|
1505
|
+
lineHeight: "var(--sl-line-height-dense)",
|
|
1506
|
+
marginTop: "var(--sl-spacing-x-small)",
|
|
1507
|
+
fontWeight: "600",
|
|
1508
|
+
color: "var(--sl-color-warning-600)",
|
|
1509
|
+
display: "-webkit-box",
|
|
1510
|
+
"-webkit-line-clamp": "1",
|
|
1511
|
+
"-webkit-box-orient": "vertical",
|
|
1512
|
+
overflow: "hidden",
|
|
1513
|
+
"& .icon": {
|
|
1514
|
+
position: "relative",
|
|
1515
|
+
top: "0.1em",
|
|
1516
|
+
marginRight: "var(--sl-spacing-xx-small)",
|
|
1517
|
+
},
|
|
1518
|
+
},
|
|
1519
|
+
},
|
|
1520
|
+
ChooseAmount: {
|
|
1521
|
+
margin: "var(--sl-spacing-medium) 0",
|
|
1522
|
+
"& .wrapper": {
|
|
1523
|
+
display: "flex",
|
|
1524
|
+
gap: "var(--sl-spacing-xx-large)",
|
|
1525
|
+
"@media (max-width: 799px)": {
|
|
1526
|
+
flexDirection: "column",
|
|
1527
|
+
},
|
|
1528
|
+
},
|
|
1529
|
+
"& .image": {
|
|
1530
|
+
width: "47%",
|
|
1531
|
+
objectFit: "contain",
|
|
1532
|
+
maxWidth: "100%",
|
|
1533
|
+
height: "250px",
|
|
1534
|
+
display: "flex",
|
|
1535
|
+
"@media (max-width: 799px)": {
|
|
1536
|
+
width: "auto",
|
|
1537
|
+
},
|
|
1538
|
+
},
|
|
1539
|
+
"& .text": {
|
|
1540
|
+
width: "53%",
|
|
1541
|
+
"@media (max-width: 799px)": {
|
|
1542
|
+
width: "auto",
|
|
1543
|
+
},
|
|
1544
|
+
},
|
|
1545
|
+
"& .title": {
|
|
1546
|
+
fontSize: "var(--sl-font-size-large)",
|
|
1547
|
+
fontWeight: "var(--sl-font-weight-semibold)",
|
|
1548
|
+
color: "var(--sl-color-neutral-1000)",
|
|
1549
|
+
},
|
|
1550
|
+
"& .points": {
|
|
1551
|
+
fontSize: "var(--sl-font-size-large)",
|
|
1552
|
+
fontWeight: "var(--sl-font-weight-semibold)",
|
|
1553
|
+
color: "var(--sl-color-primary-500)",
|
|
1554
|
+
},
|
|
1555
|
+
"& .description": {
|
|
1556
|
+
fontSize: "var(--sl-font-size-medium)",
|
|
1557
|
+
fontWeight: "var(--sl-font-weight-normal)",
|
|
1558
|
+
color: "var(--sl-color-neutral-500)",
|
|
1559
|
+
margin: "var(--sl-spacing-medium) 0",
|
|
1560
|
+
lineHeight: "var(--sl-line-height-dense)",
|
|
1561
|
+
marginTop: "var(--sl-spacing-xx-small)",
|
|
1562
|
+
},
|
|
1563
|
+
"& .space": {
|
|
1564
|
+
marginBottom: "var(--sl-spacing-xxx-large)",
|
|
1565
|
+
},
|
|
1566
|
+
},
|
|
1567
|
+
Success: {
|
|
1568
|
+
textAlign: "center",
|
|
1569
|
+
"& .title": {
|
|
1570
|
+
fontSize: "var(--sl-font-size-large)",
|
|
1571
|
+
fontWeight: "var(--sl-font-weight-semibold)",
|
|
1572
|
+
color: "var(--sl-color-neutral-1000)",
|
|
1573
|
+
},
|
|
1574
|
+
"& .description": {
|
|
1575
|
+
color: "var(--sl-color-neutral-400)",
|
|
1576
|
+
width: "100%",
|
|
1577
|
+
maxWidth: "350px",
|
|
1578
|
+
margin: "0 auto",
|
|
1579
|
+
lineHeight: "var(--sl-line-height-dense)",
|
|
1580
|
+
marginBottom: "var(--sl-spacing-xx-large)",
|
|
1581
|
+
marginTop: "var(--sl-spacing-xx-small)",
|
|
1582
|
+
},
|
|
1583
|
+
},
|
|
1584
|
+
Grid: {
|
|
1585
|
+
display: "grid",
|
|
1586
|
+
justifyContent: "center",
|
|
1587
|
+
gap: "20px",
|
|
1588
|
+
gridTemplateColumns: "repeat(auto-fill, minmax(300px, 1fr))",
|
|
1589
|
+
},
|
|
1590
|
+
Confirmation: {
|
|
1591
|
+
"& .wrapper": {
|
|
1592
|
+
display: "flex",
|
|
1593
|
+
},
|
|
1594
|
+
"& .padding": {
|
|
1595
|
+
padding: "var(--sl-spacing-medium) 0",
|
|
1596
|
+
},
|
|
1597
|
+
"& .field": {
|
|
1598
|
+
width: "40%",
|
|
1599
|
+
textTransform: "uppercase",
|
|
1600
|
+
fontSize: "var(--sl-font-size-medium)",
|
|
1601
|
+
fontWeight: "var(--sl-font-weight-normal)",
|
|
1602
|
+
color: "var(--sl-color-neutral-400)",
|
|
1603
|
+
textAlign: "right",
|
|
1604
|
+
paddingRight: "var(--sl-spacing-xxx-large)",
|
|
1605
|
+
},
|
|
1606
|
+
"& .value": {
|
|
1607
|
+
fontSize: "var(--sl-font-size-large)",
|
|
1608
|
+
fontWeight: "var(--sl-font-weight-semibold)",
|
|
1609
|
+
},
|
|
1610
|
+
"& .top-border": {
|
|
1611
|
+
borderTop: "1px solid var(--sl-color-neutral-200)",
|
|
1612
|
+
},
|
|
1613
|
+
"& .image": {
|
|
1614
|
+
width: "200px",
|
|
1615
|
+
},
|
|
1616
|
+
},
|
|
1617
|
+
Button: {
|
|
1618
|
+
display: "flex",
|
|
1619
|
+
flexWrap: "wrap-reverse",
|
|
1620
|
+
margin: "var(--sl-spacing-medium) 0",
|
|
1621
|
+
"& .cancel": {
|
|
1622
|
+
marginLeft: "auto",
|
|
1623
|
+
marginRight: "var(--sl-spacing-medium)",
|
|
1624
|
+
"&::part(base)": {
|
|
1625
|
+
fontWeight: "var(--sl-font-weight-normal)",
|
|
1626
|
+
color: "var(--sl-color-neutral-1000)",
|
|
1627
|
+
},
|
|
1628
|
+
"@media (max-width: 499px)": {
|
|
1629
|
+
width: "100%",
|
|
1630
|
+
marginRight: "0",
|
|
1631
|
+
},
|
|
1632
|
+
},
|
|
1633
|
+
"& .continue": {
|
|
1634
|
+
"&::part(base)": {
|
|
1635
|
+
background: "var(--sl-color-primary-500)",
|
|
1636
|
+
borderColor: "var(--sl-color-primary-500)",
|
|
1637
|
+
fontWeight: "var(--sl-font-weight-normal)",
|
|
1638
|
+
color: "var(--sl-color-neutral-0)",
|
|
1639
|
+
},
|
|
1640
|
+
"@media (max-width: 499px)": {
|
|
1641
|
+
width: "100%",
|
|
1642
|
+
},
|
|
1643
|
+
},
|
|
1644
|
+
"& .continue.right": {
|
|
1645
|
+
marginLeft: "auto",
|
|
1646
|
+
},
|
|
1647
|
+
"& .continue.center": {
|
|
1648
|
+
margin: "0 auto",
|
|
1649
|
+
},
|
|
1650
|
+
},
|
|
1651
|
+
};
|
|
1652
|
+
// JSS config
|
|
1653
|
+
const sheet = JSS.createStyleSheet(style);
|
|
1654
|
+
const styleString = sheet.toString();
|
|
1655
|
+
function getInput() {
|
|
1656
|
+
var _a, _b, _c;
|
|
1657
|
+
const item = states.selectedItem;
|
|
1658
|
+
if (!item || (item === null || item === void 0 ? void 0 : item.ruleType) === "FIXED_GLOBAL_REWARD")
|
|
1659
|
+
return index.h("span", null, item === null || item === void 0 ? void 0 : item.prettySourceValue);
|
|
1660
|
+
if (!((_a = item.steps) === null || _a === void 0 ? void 0 : _a.length)) {
|
|
1661
|
+
return (index.h("p", null, global.intl.formatMessage({
|
|
1662
|
+
id: "notEnoughError",
|
|
1663
|
+
defaultMessage: states.content.text.notEnoughError,
|
|
1664
|
+
}, {
|
|
1665
|
+
sourceUnit: item.sourceUnit,
|
|
1666
|
+
})));
|
|
1667
|
+
}
|
|
1668
|
+
return (index.h("sl-select", { style: { width: "auto" }, label: (_b = states === null || states === void 0 ? void 0 : states.content) === null || _b === void 0 ? void 0 : _b.text.selectText, class: sheet.classes.Select, value: states.selectedStep, "onSl-select": (e) => {
|
|
1669
|
+
var _a, _b, _c, _d, _e;
|
|
1670
|
+
return callbacks.setExchangeState({
|
|
1671
|
+
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,
|
|
1672
|
+
selectedStep: (_e = (_d = e.detail) === null || _d === void 0 ? void 0 : _d.item) === null || _e === void 0 ? void 0 : _e.value,
|
|
1673
|
+
});
|
|
1674
|
+
} }, (_c = item.steps) === null || _c === void 0 ? void 0 : _c.map((step) => {
|
|
1675
|
+
var _a, _b;
|
|
1676
|
+
return (index.h("sl-menu-item", { value: step, disabled: !step.available },
|
|
1677
|
+
step.prettyDestinationValue,
|
|
1678
|
+
step.unavailableReasonCode && (index.h("p", { style: {
|
|
1679
|
+
fontSize: "var(--sl-font-size-small)",
|
|
1680
|
+
color: "var(--sl-color-warning-500)",
|
|
1681
|
+
margin: "0",
|
|
1682
|
+
} }, global.intl.formatMessage({
|
|
1683
|
+
id: "unavailableCode",
|
|
1684
|
+
defaultMessage: (_b = (_a = states.content) === null || _a === void 0 ? void 0 : _a.text) === null || _b === void 0 ? void 0 : _b.notAvailableError,
|
|
1685
|
+
}, {
|
|
1686
|
+
unavailableReasonCode: step.unavailableReasonCode,
|
|
1687
|
+
sourceUnit: item.sourceUnit,
|
|
1688
|
+
sourceValue: step.prettySourceValue || item.prettySourceMinValue,
|
|
1689
|
+
}))),
|
|
1690
|
+
index.h("div", { slot: "suffix", style: { marginBottom: "auto", float: "right" } }, step.prettySourceValue)));
|
|
1691
|
+
})));
|
|
1692
|
+
}
|
|
1693
|
+
function chooseReward() {
|
|
1694
|
+
var _a;
|
|
1695
|
+
return [
|
|
1696
|
+
index.h("div", null,
|
|
1697
|
+
index.h("h2", { style: { margin: "var(--sl-spacing-large) 0" } }, states.content.text.rewardTitle),
|
|
1698
|
+
states.loading ? (loading()) : (index.h("div", { class: sheet.classes.Grid }, (_a = data.exchangeList) === null || _a === void 0 ? void 0 : _a.map((item) => {
|
|
1699
|
+
var _a, _b, _c, _d, _e;
|
|
1700
|
+
const style = {
|
|
1701
|
+
boxShadow: item.key === (selectedItem === null || selectedItem === void 0 ? void 0 : selectedItem.key)
|
|
1702
|
+
? "0 0 0 2px var(--sl-color-primary-500)"
|
|
1703
|
+
: "none",
|
|
1704
|
+
borderRadius: "4px",
|
|
1705
|
+
};
|
|
1706
|
+
return (index.h("div", { key: item.key, style: style },
|
|
1707
|
+
index.h("sl-card", { class: sheet.classes.Card, style: {
|
|
1708
|
+
cursor: item.unavailableReasonCode
|
|
1709
|
+
? "not-allowed"
|
|
1710
|
+
: "pointer",
|
|
1711
|
+
}, onClick: () => item.available &&
|
|
1712
|
+
callbacks.setExchangeState({ selectedItem: item }) },
|
|
1713
|
+
item.key === (selectedItem === null || selectedItem === void 0 ? void 0 : selectedItem.key) && (index.h("div", { class: "selected" },
|
|
1714
|
+
index.h(CheckmarkFilled, null))),
|
|
1715
|
+
index.h("div", { style: {
|
|
1716
|
+
display: "flex",
|
|
1717
|
+
width: "100%",
|
|
1718
|
+
height: "120px",
|
|
1719
|
+
borderRadius: "3px",
|
|
1720
|
+
background: item.unavailableReasonCode
|
|
1721
|
+
? "rgba(0, 0, 0, 0.05)"
|
|
1722
|
+
: "rgba(0, 0, 0, 0)",
|
|
1723
|
+
} },
|
|
1724
|
+
index.h("div", { class: sheet.classes.Image, style: {
|
|
1725
|
+
opacity: item.unavailableReasonCode ? "0.5" : "1",
|
|
1726
|
+
} },
|
|
1727
|
+
index.h("img", { class: item.unavailableReasonCode
|
|
1728
|
+
? "image subdued"
|
|
1729
|
+
: "image", src: (item === null || item === void 0 ? void 0 : item.imageUrl) ||
|
|
1730
|
+
index.getAssetPath("./assets/placeholder.png") })),
|
|
1731
|
+
index.h("div", { class: sheet.classes.TextArea, style: {
|
|
1732
|
+
opacity: item.unavailableReasonCode ? "0.5" : "1",
|
|
1733
|
+
} },
|
|
1734
|
+
index.h("div", { class: "title", style: {
|
|
1735
|
+
"-webkit-line-clamp": item.unavailableReasonCode
|
|
1736
|
+
? "1"
|
|
1737
|
+
: "2",
|
|
1738
|
+
} }, (_a = item.name) !== null && _a !== void 0 ? _a : ""),
|
|
1739
|
+
index.h("div", { class: "amount", style: {
|
|
1740
|
+
"-webkit-line-clamp": item.unavailableReasonCode
|
|
1741
|
+
? "1"
|
|
1742
|
+
: "2",
|
|
1743
|
+
} }, global.intl.formatMessage({
|
|
1744
|
+
id: "sourceAmountMessage",
|
|
1745
|
+
defaultMessage: (_c = (_b = states.content) === null || _b === void 0 ? void 0 : _b.text) === null || _c === void 0 ? void 0 : _c.sourceAmountMessage,
|
|
1746
|
+
}, {
|
|
1747
|
+
ruleType: item.ruleType,
|
|
1748
|
+
sourceValue: item.prettySourceValue,
|
|
1749
|
+
sourceMinValue: item.prettySourceMinValue,
|
|
1750
|
+
sourceMaxValue: item.prettySourceMaxValue,
|
|
1751
|
+
})),
|
|
1752
|
+
item.unavailableReasonCode && (index.h("div", { class: "error" },
|
|
1753
|
+
index.h("sl-icon", { class: "icon", name: "exclamation-triangle-fill" }),
|
|
1754
|
+
global.intl.formatMessage({
|
|
1755
|
+
id: "unavailableCode",
|
|
1756
|
+
defaultMessage: (_e = (_d = states.content) === null || _d === void 0 ? void 0 : _d.text) === null || _e === void 0 ? void 0 : _e.notAvailableError,
|
|
1757
|
+
}, {
|
|
1758
|
+
unavailableReasonCode: item.unavailableReasonCode,
|
|
1759
|
+
sourceUnit: item.sourceUnit,
|
|
1760
|
+
sourceValue: item.prettySourceValue ||
|
|
1761
|
+
item.prettySourceMinValue,
|
|
1762
|
+
}))))))));
|
|
1763
|
+
}))),
|
|
1764
|
+
index.h("div", { class: sheet.classes.Button },
|
|
1765
|
+
index.h("sl-button", { class: "continue right", size: "large", onClick: () => callbacks.setStage("chooseAmount"), loading: states.loading, disabled: !states.selectedItem }, states.content.text.continueText))),
|
|
1766
|
+
];
|
|
1767
|
+
}
|
|
1768
|
+
function chooseAmount() {
|
|
1769
|
+
var _a, _b, _c, _d;
|
|
1770
|
+
const input = getInput();
|
|
1771
|
+
const isDisabled = ((_a = states.selectedItem) === null || _a === void 0 ? void 0 : _a.ruleType) === "FIXED_GLOBAL_REWARD"
|
|
1772
|
+
? false
|
|
1773
|
+
: input && !states.amount;
|
|
1774
|
+
return (index.h("div", null,
|
|
1775
|
+
index.h("div", { class: sheet.classes.ChooseAmount },
|
|
1776
|
+
index.h("div", { class: "wrapper" },
|
|
1777
|
+
index.h("img", { class: "image", src: (selectedItem === null || selectedItem === void 0 ? void 0 : selectedItem.imageUrl) ||
|
|
1778
|
+
index.getAssetPath("./assets/placeholder.png") }),
|
|
1779
|
+
index.h("div", { class: "text" },
|
|
1780
|
+
index.h("div", { class: "title" }, (_b = selectedItem === null || selectedItem === void 0 ? void 0 : selectedItem.name) !== null && _b !== void 0 ? _b : ""),
|
|
1781
|
+
((_c = states.selectedItem) === null || _c === void 0 ? void 0 : _c.ruleType) === "FIXED_GLOBAL_REWARD" ? (index.h("div", { class: "points" }, input)) : (index.h("div", { class: "description" }, selectedItem === null || selectedItem === void 0 ? void 0 : selectedItem.description)),
|
|
1782
|
+
((_d = states.selectedItem) === null || _d === void 0 ? void 0 : _d.ruleType) === "FIXED_GLOBAL_REWARD" ? (index.h("div", { class: "description" }, selectedItem === null || selectedItem === void 0 ? void 0 : selectedItem.description)) : (index.h("div", { class: "points" }, input)),
|
|
1783
|
+
index.h("div", { class: "space" })))),
|
|
1784
|
+
index.h("div", { class: sheet.classes.Button },
|
|
1785
|
+
index.h("sl-button", { class: "cancel", size: "large", type: "text", onClick: () => callbacks.resetState() }, states.content.text.cancelText),
|
|
1786
|
+
index.h("sl-button", { class: "continue", size: "large", onClick: () => callbacks.setStage("confirmation"), disabled: isDisabled }, states.content.text.continueToConfirmationText))));
|
|
1787
|
+
}
|
|
1788
|
+
function confirmation() {
|
|
1789
|
+
console.log(selectedItem);
|
|
1790
|
+
console.log(selectedStep);
|
|
1791
|
+
const cost = (selectedStep === null || selectedStep === void 0 ? void 0 : selectedStep.prettySourceValue) || selectedItem.prettySourceValue;
|
|
1792
|
+
const amount = selectedStep === null || selectedStep === void 0 ? void 0 : selectedStep.prettyDestinationValue;
|
|
1793
|
+
return (index.h("div", null,
|
|
1794
|
+
index.h("h2", { style: { margin: "var(--sl-spacing-large) 0" } }, states.content.text.redeemTitle),
|
|
1795
|
+
index.h("div", { class: sheet.classes.Confirmation },
|
|
1796
|
+
index.h("div", { class: "wrapper" },
|
|
1797
|
+
index.h("div", { class: "field" }, states.content.text.rewardNameTitle),
|
|
1798
|
+
index.h("div", null, selectedItem.name)),
|
|
1799
|
+
index.h("div", { class: "wrapper" },
|
|
1800
|
+
index.h("div", { class: "field" }),
|
|
1801
|
+
index.h("div", null,
|
|
1802
|
+
index.h("img", { class: "image", src: (selectedItem === null || selectedItem === void 0 ? void 0 : selectedItem.imageUrl) ||
|
|
1803
|
+
index.getAssetPath("./assets/placeholder.png") }))),
|
|
1804
|
+
amount && (index.h("div", { class: "wrapper top-border padding" },
|
|
1805
|
+
index.h("div", { class: "field" }, states.content.text.rewardAmountTitle),
|
|
1806
|
+
index.h("div", null, amount))),
|
|
1807
|
+
index.h("div", { class: "wrapper top-border padding" },
|
|
1808
|
+
index.h("div", { class: "field" }, states.content.text.costTitle),
|
|
1809
|
+
index.h("div", { class: "value" }, cost))),
|
|
1810
|
+
index.h("div", { class: sheet.classes.Button },
|
|
1811
|
+
index.h("sl-button", { class: "cancel", type: "text", size: "large", onClick: () => callbacks.setStage("chooseAmount") }, states.content.text.backText),
|
|
1812
|
+
index.h("sl-button", { class: "continue", size: "large", loading: states.loading, onClick: callbacks.exchangeReward }, states.content.text.redeemText))));
|
|
1813
|
+
}
|
|
1814
|
+
function success() {
|
|
1815
|
+
var _a, _b, _c, _d, _e;
|
|
1816
|
+
console.log("success");
|
|
1817
|
+
return (index.h("div", { class: sheet.classes.Success },
|
|
1818
|
+
index.h(Gift$1, null),
|
|
1819
|
+
index.h(Confetti, null),
|
|
1820
|
+
index.h("div", { class: "title" }, states.content.text.rewardRedeemedText),
|
|
1821
|
+
index.h("div", { class: "description" }, global.intl.formatMessage({
|
|
1822
|
+
id: "successMessage",
|
|
1823
|
+
defaultMessage: states.content.text.redemptionSuccessText,
|
|
1824
|
+
}, {
|
|
1825
|
+
sourceValue: (_a = states.selectedItem.prettySourceValue) !== null && _a !== void 0 ? _a : (_b = states.selectedStep) === null || _b === void 0 ? void 0 : _b.prettySourceValue,
|
|
1826
|
+
destinationValue: ((_c = states.selectedStep) === null || _c === void 0 ? void 0 : _c.prettyDestinationValue) || ((_d = states.selectedItem) === null || _d === void 0 ? void 0 : _d.name) ||
|
|
1827
|
+
states.selectedItem.globalRewardKey,
|
|
1828
|
+
})),
|
|
1829
|
+
(data === null || data === void 0 ? void 0 : data.fuelTankCode) && (index.h("div", { style: {
|
|
1830
|
+
width: "40%",
|
|
1831
|
+
margin: "-30px auto var(--sl-spacing-xxx-large) auto",
|
|
1832
|
+
textAlign: "left",
|
|
1833
|
+
color: "var(--sl-color-neutral-700)",
|
|
1834
|
+
} },
|
|
1835
|
+
states.content.text.promoCode,
|
|
1836
|
+
index.h(sqmShareLinkView.ShareLinkView, { shareString: data.fuelTankCode, tooltiptext: (_e = states === null || states === void 0 ? void 0 : states.content) === null || _e === void 0 ? void 0 : _e.text.toopTipText, open: states.open, onClick: callbacks.copyFuelTankCode }))),
|
|
1837
|
+
index.h("div", { class: sheet.classes.Button },
|
|
1838
|
+
index.h("sl-button", { class: "continue center", type: "primary", size: "large", onClick: () => callbacks.resetState(true) }, states.content.text.doneText))));
|
|
1839
|
+
}
|
|
1840
|
+
const stages = {
|
|
1841
|
+
chooseReward: () => chooseReward(),
|
|
1842
|
+
chooseAmount: () => chooseAmount(),
|
|
1843
|
+
confirmation: () => confirmation(),
|
|
1844
|
+
success: () => success(),
|
|
1845
|
+
};
|
|
1846
|
+
const currentStage = stages[states.redeemStage];
|
|
1847
|
+
function stageMap() {
|
|
1848
|
+
const stageNumber = stageList.indexOf(states.redeemStage);
|
|
1849
|
+
return (index.h("div", { class: sheet.classes.ProgressBar },
|
|
1850
|
+
index.h("div", { class: "text-area" }, Object.keys(stageProgressList).map((stage) => {
|
|
1851
|
+
if (stageList.indexOf(stage) <= stageNumber) {
|
|
1852
|
+
return index.h("span", { class: "text" }, stageProgressList[stage]);
|
|
1853
|
+
}
|
|
1854
|
+
else {
|
|
1855
|
+
return (index.h("span", { class: "text subdued" }, stageProgressList[stage]));
|
|
1856
|
+
}
|
|
1857
|
+
})),
|
|
1858
|
+
index.h(ProgressBar, { stageCount: 3, currentStage: stageNumber })));
|
|
1859
|
+
}
|
|
1860
|
+
function loading() {
|
|
1861
|
+
return (index.h("div", { class: sheet.classes.Grid }, [...Array(states.content.text.skeletonCardNum)].map(() => {
|
|
1862
|
+
return (index.h("div", null,
|
|
1863
|
+
index.h("sl-card", { class: sheet.classes.Card },
|
|
1864
|
+
index.h("div", { class: sheet.classes.CardLayout },
|
|
1865
|
+
index.h("div", null,
|
|
1866
|
+
index.h("sl-skeleton", { style: {
|
|
1867
|
+
width: "100px",
|
|
1868
|
+
height: "100px",
|
|
1869
|
+
margin: "9px",
|
|
1870
|
+
"--border-radius": "4px",
|
|
1871
|
+
} })),
|
|
1872
|
+
index.h("div", { style: {
|
|
1873
|
+
margin: "var(--sl-spacing-small) var(--sl-spacing-small) 0 0",
|
|
1874
|
+
width: "100%",
|
|
1875
|
+
} },
|
|
1876
|
+
index.h("sl-skeleton", { style: { marginBottom: "var(--sl-spacing-small)" } }),
|
|
1877
|
+
index.h("sl-skeleton", { style: { marginBottom: "var(--sl-spacing-small)" } }),
|
|
1878
|
+
index.h("sl-skeleton", { style: { width: "45%" } }))))));
|
|
1879
|
+
})));
|
|
1880
|
+
}
|
|
1881
|
+
function errorMessage() {
|
|
1882
|
+
return (index.h("sl-alert", { type: "danger", open: true },
|
|
1883
|
+
index.h("sl-icon", { slot: "icon", name: "exclamation-octagon" }),
|
|
1884
|
+
states.content.text.redemptionError));
|
|
1885
|
+
}
|
|
1886
|
+
function queryErrorMessage() {
|
|
1887
|
+
return (index.h("sl-alert", { type: "danger", open: true },
|
|
1888
|
+
index.h("sl-icon", { slot: "icon", name: "exclamation-octagon" }),
|
|
1889
|
+
states.content.text.queryError));
|
|
1890
|
+
}
|
|
1891
|
+
function Confetti() {
|
|
1892
|
+
return (index.h("canvas", { ref: (canvas) => {
|
|
1893
|
+
if (!(refs === null || refs === void 0 ? void 0 : refs.canvasRef))
|
|
1894
|
+
return;
|
|
1895
|
+
refs.canvasRef.current = canvas;
|
|
1896
|
+
}, id: "my-canvas", style: {
|
|
1897
|
+
pointerEvents: "none",
|
|
1898
|
+
position: "absolute",
|
|
1899
|
+
width: "500px",
|
|
1900
|
+
height: "500px",
|
|
1901
|
+
top: "5%",
|
|
1902
|
+
zIndex: "1",
|
|
1903
|
+
left: "25%",
|
|
1904
|
+
} }));
|
|
1905
|
+
}
|
|
1906
|
+
return (index.h("div", { class: sheet.classes.Container },
|
|
1907
|
+
index.h("style", { type: "text/css" }, styleString),
|
|
1908
|
+
index.h("div", null,
|
|
1909
|
+
console.log(props),
|
|
1910
|
+
stageMap(),
|
|
1911
|
+
states.exchangeError && errorMessage(),
|
|
1912
|
+
states.queryError && queryErrorMessage(),
|
|
1913
|
+
currentStage && currentStage(),
|
|
1914
|
+
states.redeemStage === "success")));
|
|
1915
|
+
}
|
|
1916
|
+
|
|
1917
|
+
function CardFeedView(props, children) {
|
|
1918
|
+
const style = {
|
|
1919
|
+
Container: {
|
|
1920
|
+
columnGap: props.gap + "px",
|
|
1921
|
+
columnWidth: props.width + "px",
|
|
1922
|
+
"& > div": {
|
|
1923
|
+
marginBottom: "24px",
|
|
1924
|
+
},
|
|
1925
|
+
},
|
|
1926
|
+
};
|
|
1927
|
+
const sheet = JSS.createStyleSheet(style);
|
|
1928
|
+
const styleString = sheet.toString();
|
|
1929
|
+
console.log(props);
|
|
1930
|
+
const vanillaStyle = `
|
|
1931
|
+
:host{
|
|
1932
|
+
display: block;
|
|
1933
|
+
}
|
|
1934
|
+
|
|
1935
|
+
`;
|
|
1936
|
+
return (index.h("div", null,
|
|
1937
|
+
index.h("style", { type: "text/css" },
|
|
1938
|
+
styleString,
|
|
1939
|
+
vanillaStyle),
|
|
1940
|
+
index.h("div", { class: sheet.classes.Container }, children)));
|
|
1941
|
+
}
|
|
1942
|
+
|
|
1943
|
+
function t(t,n,r){return Math.min(Math.max(t,r),n)}class n extends Error{constructor(t){super(`Failed to parse color: "${t}"`);}}function r(r){if("string"!=typeof r)throw new n(r);if("transparent"===r.trim().toLowerCase())return [0,0,0,0];let e=r.trim();e=u.test(r)?function(t){const r=t.toLowerCase().trim(),e=o[function(t){let n=5381,r=t.length;for(;r;)n=33*n^t.charCodeAt(--r);return (n>>>0)%2341}(r)];if(!e)throw new n(t);return `#${e}`}(r):r;const f=s.exec(e);if(f){const t=Array.from(f).slice(1);return [...t.slice(0,3).map(t=>parseInt(_(t,2),16)),parseInt(_(t[3]||"f",2),16)/255]}const p=i.exec(e);if(p){const t=Array.from(p).slice(1);return [...t.slice(0,3).map(t=>parseInt(t,16)),parseInt(t[3]||"ff",16)/255]}const z=a.exec(e);if(z){const t=Array.from(z).slice(1);return [...t.slice(0,3).map(t=>parseInt(t,10)),parseFloat(t[3]||"1")]}const h=c.exec(e);if(h){const[e,o,_,s]=Array.from(h).slice(1).map(parseFloat);if(t(0,100,o)!==o)throw new n(r);if(t(0,100,_)!==_)throw new n(r);return [...l(e,o,_),s||1]}throw new n(r)}const e=t=>parseInt(t.replace(/_/g,""),36),o="1q29ehhb 1n09sgk7 1kl1ekf_ _yl4zsno 16z9eiv3 1p29lhp8 _bd9zg04 17u0____ _iw9zhe5 _to73___ _r45e31e _7l6g016 _jh8ouiv _zn3qba8 1jy4zshs 11u87k0u 1ro9yvyo 1aj3xael 1gz9zjz0 _3w8l4xo 1bf1ekf_ _ke3v___ _4rrkb__ 13j776yz _646mbhl _nrjr4__ _le6mbhl 1n37ehkb _m75f91n _qj3bzfz 1939yygw 11i5z6x8 _1k5f8xs 1509441m 15t5lwgf _ae2th1n _tg1ugcv 1lp1ugcv 16e14up_ _h55rw7n _ny9yavn _7a11xb_ 1ih442g9 _pv442g9 1mv16xof 14e6y7tu 1oo9zkds 17d1cisi _4v9y70f _y98m8kc 1019pq0v 12o9zda8 _348j4f4 1et50i2o _8epa8__ _ts6senj 1o350i2o 1mi9eiuo 1259yrp0 1ln80gnw _632xcoy 1cn9zldc _f29edu4 1n490c8q _9f9ziet 1b94vk74 _m49zkct 1kz6s73a 1eu9dtog _q58s1rz 1dy9sjiq __u89jo3 _aj5nkwg _ld89jo3 13h9z6wx _qa9z2ii _l119xgq _bs5arju 1hj4nwk9 1qt4nwk9 1ge6wau6 14j9zlcw 11p1edc_ _ms1zcxe _439shk6 _jt9y70f _754zsow 1la40eju _oq5p___ _x279qkz 1fa5r3rv _yd2d9ip _424tcku _8y1di2_ _zi2uabw _yy7rn9h 12yz980_ __39ljp6 1b59zg0x _n39zfzp 1fy9zest _b33k___ _hp9wq92 1il50hz4 _io472ub _lj9z3eo 19z9ykg0 _8t8iu3a 12b9bl4a 1ak5yw0o _896v4ku _tb8k8lv _s59zi6t _c09ze0p 1lg80oqn 1id9z8wb _238nba5 1kq6wgdi _154zssg _tn3zk49 _da9y6tc 1sg7cv4f _r12jvtt 1gq5fmkz 1cs9rvci _lp9jn1c _xw1tdnb 13f9zje6 16f6973h _vo7ir40 _bt5arjf _rc45e4t _hr4e100 10v4e100 _hc9zke2 _w91egv_ _sj2r1kk 13c87yx8 _vqpds__ _ni8ggk8 _tj9yqfb 1ia2j4r4 _7x9b10u 1fc9ld4j 1eq9zldr _5j9lhpx _ez9zl6o _md61fzm".split(" ").reduce((t,n)=>{const r=e(n.substring(0,3)),o=e(n.substring(3)).toString(16);let _="";for(let t=0;t<6-o.length;t++)_+="0";return t[r]=`${_}${o}`,t},{}),_=(t,n)=>Array.from(Array(n)).map(()=>t).join(""),s=new RegExp(`^#${_("([a-f0-9])",3)}([a-f0-9])?$`,"i"),i=new RegExp(`^#${_("([a-f0-9]{2})",3)}([a-f0-9]{2})?$`,"i"),a=new RegExp(`^rgba?\\(\\s*(\\d+)\\s*${_(",\\s*(\\d+)\\s*",2)}(?:,\\s*([\\d.]+))?\\s*\\)$`,"i"),c=/^hsla?\(\s*([\d.]+)\s*,\s*([\d.]+)%\s*,\s*([\d.]+)%(?:\s*,\s*([\d.]+))?\s*\)$/i,u=/^[a-z]+$/i,f=t=>Math.round(255*t),l=(t,n,r)=>{let e=r/100;if(0===n)return [e,e,e].map(f);const o=(t%360+360)%360/60,_=(1-Math.abs(2*e-1))*(n/100),s=_*(1-Math.abs(o%2-1));let i=0,a=0,c=0;o>=0&&o<1?(i=_,a=s):o>=1&&o<2?(i=s,a=_):o>=2&&o<3?(a=_,c=s):o>=3&&o<4?(a=s,c=_):o>=4&&o<5?(i=s,c=_):o>=5&&o<6&&(i=_,c=s);const u=e-_/2;return [i+u,a+u,c+u].map(f)};function p(t){const[n,e,o,_]=r(t).map((t,n)=>3===n?t:t/255),s=Math.max(n,e,o),i=Math.min(n,e,o),a=(s+i)/2;if(s===i)return [0,0,a,_];const c=s-i;return [60*(n===s?(e-o)/c+(e<o?6:0):e===s?(o-n)/c+2:(n-e)/c+4),a>.5?c/(2-s-i):c/(s+i),a,_]}function z(n,r,e,o){return `hsla(${(n%360).toFixed()}, ${t(0,100,100*r).toFixed()}%, ${t(0,100,100*e).toFixed()}%, ${parseFloat(t(0,1,o).toFixed(3))})`}
|
|
1944
|
+
|
|
1945
|
+
const colorScale = [50, 100, 200, 300, 400, 500, 600, 700, 800, 900, 950];
|
|
1946
|
+
const lScale = [
|
|
1947
|
+
0.95,
|
|
1948
|
+
0.86,
|
|
1949
|
+
0.76,
|
|
1950
|
+
0.66,
|
|
1951
|
+
0.56,
|
|
1952
|
+
0.46,
|
|
1953
|
+
0.39,
|
|
1954
|
+
0.32,
|
|
1955
|
+
0.25,
|
|
1956
|
+
0.18,
|
|
1957
|
+
0.15,
|
|
1958
|
+
];
|
|
1959
|
+
// https://github.com/ricokahler/color2k/blob/main/src/parseToRgba.ts
|
|
1960
|
+
const hslaRegex = /^hsla?\(\s*([\d.]+)\s*,\s*([\d.]+)%\s*,\s*([\d.]+)%(?:\s*,\s*([\d.]+))?\s*\)$/i;
|
|
1961
|
+
function niceParseToHsla(color) {
|
|
1962
|
+
const normalizedColor = color.trim();
|
|
1963
|
+
const hslaMatch = hslaRegex.exec(normalizedColor);
|
|
1964
|
+
if (hslaMatch) {
|
|
1965
|
+
const [h, s, l, a] = Array.from(hslaMatch).slice(1).map(parseFloat);
|
|
1966
|
+
if (t(0, 100, s) !== s)
|
|
1967
|
+
throw new n(color);
|
|
1968
|
+
if (t(0, 100, l) !== l)
|
|
1969
|
+
throw new n(color);
|
|
1970
|
+
return [h, s / 100, l, a || 1];
|
|
1971
|
+
}
|
|
1972
|
+
// Warning -- converts to RGB first, so is lossy
|
|
1973
|
+
return p(color);
|
|
1974
|
+
}
|
|
1975
|
+
function generateScale(color, name = "primary") {
|
|
1976
|
+
const [h, s, l, a] = niceParseToHsla(color);
|
|
1977
|
+
return lScale
|
|
1978
|
+
.map((l) => z(h, s, l, a))
|
|
1979
|
+
.map((color, index) => {
|
|
1980
|
+
return `--sl-color-${name}-${colorScale[index]}: ${color};\n`;
|
|
1981
|
+
});
|
|
1982
|
+
}
|
|
1983
|
+
/**
|
|
1984
|
+
* Generated a Shoelace color scale css string from a base color
|
|
1985
|
+
*
|
|
1986
|
+
* @param color
|
|
1987
|
+
* @param name
|
|
1988
|
+
* @returns
|
|
1989
|
+
*/
|
|
1990
|
+
function autoColorScaleCss(color, name = "primary") {
|
|
1991
|
+
return generateScale(color, name).join("\n");
|
|
1992
|
+
}
|
|
1993
|
+
|
|
1994
|
+
exports.CardFeedView = CardFeedView;
|
|
1995
|
+
exports.EditProfileView = EditProfileView;
|
|
1996
|
+
exports.PortalChangePasswordView = PortalChangePasswordView;
|
|
1997
|
+
exports.PortalFrameView = PortalFrameView;
|
|
1998
|
+
exports.PortalLoginView = PortalLoginView;
|
|
1999
|
+
exports.PortalRegisterView = PortalRegisterView;
|
|
2000
|
+
exports.ProgressBarView = ProgressBarView;
|
|
2001
|
+
exports.ReferralIframeView = ReferralIframeView;
|
|
2002
|
+
exports.RewardExchangeView = RewardExchangeView;
|
|
2003
|
+
exports.ShareButtonView = ShareButtonView;
|
|
2004
|
+
exports.TaskCardView = TaskCardView;
|
|
2005
|
+
exports.autoColorScaleCss = autoColorScaleCss;
|
|
2006
|
+
exports.useShareButton = useShareButton;
|
|
2007
|
+
exports.useShareLink = useShareLink;
|