@saasquatch/mint-components 1.15.0-6 → 1.15.0-60
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/dist/cjs/{ErrorView-b2fcf954.js → ErrorView-5504c2b6.js} +1 -1
- package/dist/cjs/{GenericTableView-f0e9c531.js → GenericTableView-107ade89.js} +6 -6
- package/dist/cjs/IndirectTaxDetailsView-b783411a.js +646 -0
- package/dist/cjs/{ShadowViewAddon-e666dc8b.js → ShadowViewAddon-cb3fc679.js} +1446 -1390
- package/dist/cjs/{copy-text-view-7441206d.js → copy-text-view-95cf4875.js} +19 -8
- package/dist/cjs/data-d4339c2e.js +137 -0
- package/dist/cjs/{stencil-hooks.module-3a336b0f.js → dom-context-hooks.module-7fa676ae.js} +18 -18
- package/dist/cjs/{email-registration-view-55b378dc.js → email-registration-view-996fb438.js} +3 -3
- package/dist/cjs/{extractProps-fd93ba62.js → extractProps-e9c55ba8.js} +14 -0
- package/dist/cjs/{global-124aec2c.js → global-6ee8a4bb.js} +11806 -11623
- package/dist/cjs/{index-a29c60ef.js → index-a43a63b4.js} +4 -0
- package/dist/cjs/{index.module-ee84433d.js → index.module-4f54e412.js} +191 -191
- package/dist/cjs/loader.cjs.js +5 -5
- package/dist/cjs/{luxon-2926d85f.js → luxon-949beaf2.js} +2 -2
- package/dist/cjs/mint-components.cjs.js +5 -5
- package/dist/cjs/{mixins-f7e0377a.js → mixins-4761d472.js} +6 -6
- package/dist/cjs/{mockRewardData-272e22d6.js → mockRewardData-df37c8a3.js} +2 -2
- package/dist/cjs/raisins-plop-target.cjs.entry.js +1 -1
- package/dist/cjs/{re-render-b324deab.js → re-render-d516138a.js} +4 -4
- package/dist/cjs/{sqm-banking-info-form_17.cjs.entry.js → sqm-banking-info-form_10.cjs.entry.js} +873 -2260
- package/dist/cjs/{sqm-base-registration-form-view-1b2440c3.js → sqm-base-registration-form-view-8847804c.js} +3 -3
- package/dist/cjs/{sqm-big-stat_41.cjs.entry.js → sqm-big-stat_42.cjs.entry.js} +954 -244
- package/dist/cjs/{sqm-close-button-view-ea3fa23b.js → sqm-close-button-view-5e85ac51.js} +2 -2
- package/dist/cjs/sqm-close-button.cjs.entry.js +6 -6
- package/dist/cjs/sqm-code-verification.cjs.entry.js +342 -0
- package/dist/cjs/sqm-context-router.cjs.entry.js +10 -10
- package/dist/cjs/sqm-email-verification.cjs.entry.js +13 -13
- package/dist/cjs/sqm-empty_4.cjs.entry.js +56 -62
- package/dist/cjs/sqm-form-message.cjs.entry.js +3 -3
- package/dist/cjs/sqm-google-sign-in.cjs.entry.js +14 -14
- package/dist/cjs/sqm-graphql-client-provider.cjs.entry.js +6 -6
- package/dist/cjs/sqm-header-logo.cjs.entry.js +3 -3
- package/dist/cjs/sqm-instant-access-registration.cjs.entry.js +9 -9
- package/dist/cjs/sqm-invoice-table-data-cell_5.cjs.entry.js +84 -0
- package/dist/cjs/sqm-leaderboard-rank-view-6a1e63de.js +10 -0
- package/dist/cjs/sqm-leaderboard-rank.cjs.entry.js +6 -6
- package/dist/cjs/{sqm-logout-current-user-view-11d57c12.js → sqm-logout-current-user-view-b61c8bdf.js} +1 -1
- package/dist/cjs/sqm-logout-current-user.cjs.entry.js +5 -5
- package/dist/cjs/sqm-navigation-sidebar-item-view-ec7a5c53.js +56 -0
- package/dist/cjs/sqm-navigation-sidebar-item.cjs.entry.js +30 -7
- package/dist/cjs/{sqm-navigation-sidebar-view-17111896.js → sqm-navigation-sidebar-view-50ee8796.js} +17 -7
- package/dist/cjs/sqm-navigation-sidebar.cjs.entry.js +25 -9
- package/dist/cjs/sqm-pagination_3.cjs.entry.js +96 -69
- package/dist/cjs/sqm-password-field.cjs.entry.js +10 -10
- package/dist/cjs/sqm-popup-container.cjs.entry.js +4 -4
- package/dist/cjs/{sqm-portal-container-view-4f15143a.js → sqm-portal-container-view-07e4343f.js} +2 -2
- package/dist/cjs/{sqm-portal-email-verification-view-f5ce25cc.js → sqm-portal-email-verification-view-d3dccee1.js} +4 -4
- package/dist/cjs/sqm-portal-email-verification.cjs.entry.js +15 -15
- package/dist/cjs/{sqm-portal-forgot-password-view-b986086e.js → sqm-portal-forgot-password-view-0a8d3243.js} +24 -16
- package/dist/cjs/sqm-portal-forgot-password.cjs.entry.js +39 -10
- package/dist/cjs/sqm-portal-google-login.cjs.entry.js +8 -8
- package/dist/cjs/sqm-portal-google-registration-form.cjs.entry.js +13 -13
- package/dist/cjs/{sqm-portal-login-view-84e99287.js → sqm-portal-login-view-bb50304c.js} +4 -4
- package/dist/cjs/sqm-portal-logout.cjs.entry.js +4 -4
- package/dist/cjs/{sqm-portal-profile-view-07d13061.js → sqm-portal-profile-view-153a8ca9.js} +4 -4
- package/dist/cjs/sqm-portal-profile.cjs.entry.js +14 -14
- package/dist/cjs/sqm-portal-protected-route.cjs.entry.js +5 -5
- package/dist/cjs/{sqm-portal-registration-form-view-4377d849.js → sqm-portal-registration-form-view-5a96c2f5.js} +3 -3
- package/dist/cjs/sqm-portal-registration-form.cjs.entry.js +9 -9
- package/dist/cjs/{sqm-portal-reset-password-view-52fc50fe.js → sqm-portal-reset-password-view-25eb2099.js} +3 -3
- package/dist/cjs/sqm-portal-reset-password.cjs.entry.js +10 -10
- package/dist/cjs/{sqm-portal-verify-email-view-4f837226.js → sqm-portal-verify-email-view-1c4e781f.js} +3 -3
- package/dist/cjs/sqm-portal-verify-email.cjs.entry.js +11 -11
- package/dist/cjs/{sqm-qr-code-view-3da9ed28.js → sqm-qr-code-view-2cca145e.js} +3 -3
- package/dist/cjs/sqm-qr-code.cjs.entry.js +12 -12
- package/dist/cjs/sqm-referral-table_11.cjs.entry.js +132 -43
- package/dist/cjs/sqm-referred-registration.cjs.entry.js +8 -8
- package/dist/cjs/sqm-rewards-table-customer-note-cell.cjs.entry.js +4 -4
- package/dist/cjs/sqm-rewards-table-customer-note-column.cjs.entry.js +5 -5
- package/dist/cjs/sqm-rewards-table_9.cjs.entry.js +81 -34
- package/dist/cjs/sqm-route.cjs.entry.js +1 -1
- package/dist/cjs/sqm-scroll.cjs.entry.js +3 -3
- package/dist/cjs/sqm-stencilbook.cjs.entry.js +13729 -12442
- package/dist/cjs/sqm-tab.cjs.entry.js +5 -5
- package/dist/cjs/sqm-tabs.cjs.entry.js +24 -12
- package/dist/cjs/sqm-tax-and-cash.cjs.entry.js +1255 -0
- package/dist/cjs/sqm-text-span-view-7a61ae4c.js +63 -0
- package/dist/cjs/sqm-text-span.cjs.entry.js +7 -7
- package/dist/cjs/sqm-widget-verification-controller.cjs.entry.js +19 -11
- package/dist/cjs/sqm-widget-verification.cjs.entry.js +23 -13
- package/dist/cjs/{useChildElements-1b35d945.js → useChildElements-966c9041.js} +5 -5
- package/dist/cjs/{useInstantAccessRegistration-0537e28e.js → useInstantAccessRegistration-08bcb487.js} +4 -4
- package/dist/cjs/{usePayoutStatus-4b5894ef.js → usePayoutStatus-3b34dab1.js} +13 -10
- package/dist/cjs/{usePortalLogin-63d896d1.js → usePortalLogin-1c022d8d.js} +3 -3
- package/dist/cjs/{usePortalRegistrationForm-f25d89e7.js → usePortalRegistrationForm-75b647fe.js} +6 -6
- package/dist/cjs/{useReferralCodes-82e8797b.js → useReferralCodes-11cdf43b.js} +3 -3
- package/dist/cjs/{useReferralTable-7c3f9600.js → useReferralTable-90d4d6e9.js} +10 -10
- package/dist/cjs/{useRegistrationFormState-7b820f0c.js → useRegistrationFormState-bbee6e7b.js} +6 -6
- package/dist/cjs/{useVerificationEmail-95a82767.js → useVerificationEmail-9dd3997a.js} +6 -6
- package/dist/cjs/{utilities-78f5e169.js → utilities-9a0c5e91.js} +4 -4
- package/dist/cjs/utils-8b6dc3f8.js +105 -0
- package/dist/collection/collection-manifest.json +1 -1
- package/dist/collection/components/sqm-big-stat/BigStat.stories.js +13 -0
- package/dist/collection/components/sqm-big-stat/sqm-big-stat-view.js +15 -7
- package/dist/collection/components/sqm-big-stat/sqm-big-stat.js +162 -2
- package/dist/collection/components/sqm-big-stat/useBigStat.js +15 -5
- package/dist/collection/components/sqm-big-stat/useDemoBigStat.js +13 -4
- package/dist/collection/components/sqm-brand/sqm-brand.js +11 -4
- package/dist/collection/components/sqm-checkbox-field/sqm-checkbox-field.js +1 -0
- package/dist/collection/components/sqm-coupon-code/CouponCode.stories.js +4 -0
- package/dist/collection/components/sqm-coupon-code/sqm-coupon-code-view.js +13 -13
- package/dist/collection/components/sqm-coupon-code/sqm-coupon-code.js +169 -1
- package/dist/collection/components/sqm-coupon-code/useCouponCode.js +1 -0
- package/dist/collection/components/sqm-divided-layout/sqm-divided-layout-view.js +14 -6
- package/dist/collection/components/sqm-divided-layout/sqm-divided-layout.js +58 -1
- package/dist/collection/components/sqm-edit-profile/sqm-edit-profile-view.js +1 -1
- package/dist/collection/components/sqm-hero-image/sqm-hero-image-view.js +3 -2
- package/dist/collection/components/sqm-hero-image/sqm-hero-image.js +79 -0
- package/dist/collection/components/sqm-instant-access-registration/sqm-instant-access-registration.js +3 -3
- package/dist/collection/components/sqm-invoice-table/cells/sqm-invoice-table-download-cell.js +2 -2
- package/dist/collection/components/sqm-invoice-table/columns/sqm-invoice-table-data-column.js +2 -1
- package/dist/collection/components/sqm-invoice-table/columns/sqm-invoice-table-date-column.js +2 -1
- package/dist/collection/components/sqm-invoice-table/columns/sqm-invoice-table-download-column.js +2 -1
- package/dist/collection/components/sqm-invoice-table/sqm-invoice-table-view.js +1 -1
- package/dist/collection/components/sqm-invoice-table/sqm-invoice-table.js +4 -3
- package/dist/collection/components/sqm-leaderboard/Leaderboard.stories.js +37 -0
- package/dist/collection/components/sqm-leaderboard/sqm-leaderboard-view.js +10 -4
- package/dist/collection/components/sqm-leaderboard/sqm-leaderboard.js +200 -59
- package/dist/collection/components/sqm-leaderboard-rank/sqm-leaderboard-rank-view.js +2 -2
- package/dist/collection/components/sqm-logout-current-user/sqm-logout-current-user.js +1 -1
- package/dist/collection/components/sqm-name-fields/sqm-name-fields-view.js +28 -3
- package/dist/collection/components/sqm-name-fields/sqm-name-fields.js +1 -0
- package/dist/collection/components/sqm-navigation-sidebar/sqm-navigation-sidebar-view.js +16 -6
- package/dist/collection/components/sqm-navigation-sidebar/sqm-navigation-sidebar.js +83 -5
- package/dist/collection/components/sqm-navigation-sidebar-item/sqm-navigation-sidebar-item-view.js +18 -7
- package/dist/collection/components/sqm-navigation-sidebar-item/sqm-navigation-sidebar-item.js +233 -1
- package/dist/collection/components/sqm-navigation-sidebar-item/useNavigationSidebarItem.js +9 -1
- package/dist/collection/components/sqm-pagination/sqm-pagination-view.js +3 -3
- package/dist/collection/components/sqm-pagination/sqm-pagination.js +43 -0
- package/dist/collection/components/sqm-payout-button-scroll/sqm-payout-button-scroll-view.js +1 -1
- package/dist/collection/components/sqm-portal-change-password/sqm-portal-change-password-view.js +8 -4
- package/dist/collection/components/sqm-portal-change-password/sqm-portal-change-password.js +1 -1
- package/dist/collection/components/sqm-portal-container/sqm-portal-container-view.js +1 -1
- package/dist/collection/components/sqm-portal-container/sqm-portal-container.js +1 -8
- package/dist/collection/components/sqm-portal-footer/sqm-portal-footer-view.js +6 -6
- package/dist/collection/components/sqm-portal-forgot-password/PortalForgotPassword.stories.js +4 -4
- package/dist/collection/components/sqm-portal-forgot-password/sqm-portal-forgot-password-view.js +21 -13
- package/dist/collection/components/sqm-portal-forgot-password/sqm-portal-forgot-password.js +103 -3
- package/dist/collection/components/sqm-portal-frame/sqm-portal-frame-view.js +41 -36
- package/dist/collection/components/sqm-portal-frame/sqm-portal-frame.js +103 -2
- package/dist/collection/components/sqm-portal-frame/usePortalFrame.js +4 -1
- package/dist/collection/components/sqm-portal-login/PortalLogin.stories.js +10 -5
- package/dist/collection/components/sqm-portal-login/sqm-portal-login-view.js +1 -1
- package/dist/collection/components/sqm-portal-login/sqm-portal-login.js +1 -1
- package/dist/collection/components/sqm-portal-profile/sqm-portal-profile-view.js +1 -1
- package/dist/collection/components/sqm-portal-register/sqm-portal-register.js +1 -2
- package/dist/collection/components/sqm-portal-registration-form/PortalRegistrationForm.stories.js +1 -0
- package/dist/collection/components/sqm-program-explainer-step/sqm-program-explainer-step-view.js +5 -3
- package/dist/collection/components/sqm-program-explainer-step/sqm-program-explainer-step.js +4 -4
- package/dist/collection/components/sqm-qr-code/sqm-qr-code-view.js +1 -1
- package/dist/collection/components/sqm-referral-card/sqm-referral-card-view.js +32 -31
- package/dist/collection/components/sqm-referral-card/sqm-referral-card.js +77 -9
- package/dist/collection/components/sqm-referral-code/ReferralCode.stories.js +3 -0
- package/dist/collection/components/sqm-referral-code/sqm-referral-code.js +169 -1
- package/dist/collection/components/sqm-referral-codes/ReferralCodes.stories.js +6 -0
- package/dist/collection/components/sqm-referral-codes/sqm-referral-codes-view.js +46 -46
- package/dist/collection/components/sqm-referral-codes/sqm-referral-codes.js +28 -1
- package/dist/collection/components/sqm-referral-table/ReferralTable.stories.js +2 -2
- package/dist/collection/components/sqm-referral-table/cells/sqm-referral-table-rewards-cell.js +55 -18
- package/dist/collection/components/sqm-referral-table/cells/sqm-referral-table-status-cell.js +62 -7
- package/dist/collection/components/sqm-referral-table/columns/sqm-referral-table-column.js +2 -1
- package/dist/collection/components/sqm-referral-table/columns/sqm-referral-table-date-column.js +4 -2
- package/dist/collection/components/sqm-referral-table/columns/sqm-referral-table-rewards-column.js +6 -3
- package/dist/collection/components/sqm-referral-table/columns/sqm-referral-table-status-column.js +6 -3
- package/dist/collection/components/sqm-referral-table/columns/sqm-referral-table-user-column.js +4 -2
- package/dist/collection/components/sqm-referral-table/mockReferralData.js +1 -1
- package/dist/collection/components/sqm-referral-table/sqm-referral-table.js +2 -1
- package/dist/collection/components/sqm-referred-registration/sqm-referred-registration.js +1 -1
- package/dist/collection/components/sqm-reward-exchange-list/RewardExchangeList.stories.js +19 -19
- package/dist/collection/components/sqm-reward-exchange-list/RewardExchangeListData.js +31 -5
- package/dist/collection/components/sqm-reward-exchange-list/progressBar.js +10 -10
- package/dist/collection/components/sqm-reward-exchange-list/sqm-reward-exchange-list-view.js +39 -42
- package/dist/collection/components/sqm-reward-exchange-list/sqm-reward-exchange-list.js +1 -2
- package/dist/collection/components/sqm-rewards-table/RewardsTableCell.stories.js +3 -3
- package/dist/collection/components/sqm-rewards-table/cells/sqm-rewards-table-reward-cell.js +4 -3
- package/dist/collection/components/sqm-rewards-table/cells/sqm-rewards-table-source-cell.js +5 -4
- package/dist/collection/components/sqm-rewards-table/cells/sqm-rewards-table-status-cell.js +57 -8
- package/dist/collection/components/sqm-rewards-table/columns/sqm-rewards-table-date-column.js +3 -2
- package/dist/collection/components/sqm-rewards-table/columns/sqm-rewards-table-note-column.js +3 -2
- package/dist/collection/components/sqm-rewards-table/columns/sqm-rewards-table-reward-column.js +3 -2
- package/dist/collection/components/sqm-rewards-table/columns/sqm-rewards-table-source-column.js +3 -2
- package/dist/collection/components/sqm-rewards-table/columns/sqm-rewards-table-status-column.js +5 -3
- package/dist/collection/components/sqm-rewards-table/mockRewardData.js +1 -1
- package/dist/collection/components/sqm-rewards-table/sqm-rewards-table.js +3 -2
- package/dist/collection/components/sqm-rewards-table/useRewardsTable.js +1 -1
- package/dist/collection/components/sqm-share-button/ShareButton.stories.js +3 -1
- package/dist/collection/components/sqm-share-button/sqm-share-button-view.js +23 -22
- package/dist/collection/components/sqm-share-button/sqm-share-button.js +56 -10
- package/dist/collection/components/sqm-share-code/sqm-share-code.js +169 -1
- package/dist/collection/components/sqm-share-link/sqm-share-link.js +121 -4
- package/dist/collection/components/sqm-stat-container/sqm-stat-container-view.js +20 -8
- package/dist/collection/components/sqm-stat-container/sqm-stat-container.js +110 -2
- package/dist/collection/components/sqm-stencilbook/BrandSelector.js +198 -0
- package/dist/collection/components/sqm-stencilbook/Themes.js +325 -33
- package/dist/collection/components/sqm-stencilbook/sqm-stencilbook.js +81 -99
- package/dist/collection/components/sqm-tabs/Tabs.stories.js +7 -0
- package/dist/collection/components/sqm-tabs/sqm-tabs-view.js +14 -2
- package/dist/collection/components/sqm-tabs/sqm-tabs.js +28 -2
- package/dist/collection/components/sqm-task-card/DetailsView.js +7 -1
- package/dist/collection/components/sqm-task-card/progress-bar/progress-bar-view.js +3 -2
- package/dist/collection/components/sqm-task-card/sqm-task-card-view.js +16 -18
- package/dist/collection/components/sqm-task-card/sqm-task-card.js +4 -4
- package/dist/collection/components/sqm-task-card/useTaskCard.js +1 -1
- package/dist/collection/components/sqm-text/Text.stories.js +12 -0
- package/dist/collection/components/sqm-text/sqm-text.js +100 -49
- package/dist/collection/components/sqm-text-span/sqm-text-span-view.js +44 -43
- package/dist/collection/components/sqm-text-span/sqm-text-span.js +51 -2
- package/dist/collection/components/sqm-timeline/Timeline.stories.js +8 -1
- package/dist/collection/components/sqm-timeline/sqm-timeline-entry-view.js +45 -45
- package/dist/collection/components/sqm-timeline/sqm-timeline-entry.js +52 -0
- package/dist/collection/components/sqm-widget-verification/sqm-code-verification/sqm-code-verification.js +2 -2
- package/dist/collection/components/sqm-widget-verification/sqm-widget-verification-controller.js +39 -5
- package/dist/collection/components/sqm-widget-verification/sqm-widget-verification.js +42 -7
- package/dist/collection/components/tax-and-cash/BankingForm.stories.js +12 -0
- package/dist/collection/components/tax-and-cash/TaxForm.stories.js +28 -8
- package/dist/collection/components/tax-and-cash/sqm-banking-info-form/formDefinitions.js +1 -1
- package/dist/collection/components/tax-and-cash/sqm-banking-info-form/sqm-banking-info-form-view.js +60 -35
- package/dist/collection/components/tax-and-cash/sqm-banking-info-form/sqm-banking-info-form.js +108 -5
- package/dist/collection/components/tax-and-cash/sqm-banking-info-form/useBankingInfoForm.js +8 -1
- package/dist/collection/components/tax-and-cash/sqm-docusign-form/docusign-iframe/DocusignIframe.js +3 -3
- package/dist/collection/components/tax-and-cash/sqm-docusign-form/sqm-docusign-form-view.js +53 -27
- package/dist/collection/components/tax-and-cash/sqm-docusign-form/sqm-docusign-form.js +82 -4
- package/dist/collection/components/tax-and-cash/sqm-docusign-form/useDocusignForm.js +6 -2
- package/dist/collection/components/tax-and-cash/sqm-indirect-tax-form/sqm-indirect-tax-form-view.js +57 -13
- package/dist/collection/components/tax-and-cash/sqm-indirect-tax-form/sqm-indirect-tax-form.js +2 -2
- package/dist/collection/components/tax-and-cash/sqm-indirect-tax-form/useIndirectTaxForm.js +2 -2
- package/dist/collection/components/tax-and-cash/sqm-payout-details-card/sqm-payout-details-card-view.js +31 -14
- package/dist/collection/components/tax-and-cash/sqm-payout-details-card/sqm-payout-details-card.js +26 -1
- package/dist/collection/components/tax-and-cash/sqm-payout-details-card/usePayoutDetailsCard.js +2 -2
- package/dist/collection/components/tax-and-cash/sqm-payout-status-alert/usePayoutStatus.js +8 -5
- package/dist/collection/components/tax-and-cash/sqm-tax-and-cash/sqm-tax-and-cash.js +282 -30
- package/dist/collection/components/tax-and-cash/sqm-tax-and-cash/useTaxAndCash.js +1 -1
- package/dist/collection/components/tax-and-cash/sqm-tax-and-cash-dashboard/sqm-tax-and-cash-dashboard-view.js +18 -18
- package/dist/collection/components/tax-and-cash/sqm-tax-and-cash-dashboard/sqm-tax-and-cash-dashboard.js +19 -4
- package/dist/collection/components/tax-and-cash/sqm-tax-and-cash-dashboard/useTaxAndCashDashboard.js +3 -3
- package/dist/collection/components/tax-and-cash/sqm-user-info-form/small-views/DocusignExpiredView.js +1 -1
- package/dist/collection/components/tax-and-cash/sqm-user-info-form/sqm-user-info-form-view.js +164 -18
- package/dist/collection/components/tax-and-cash/sqm-user-info-form/sqm-user-info-form.js +10 -10
- package/dist/collection/components/tax-and-cash/sqm-user-info-form/useUserInfoForm.js +3 -3
- package/dist/collection/components/views/copy-text-view.js +17 -6
- package/dist/collection/components/views/email-registration-view.js +1 -1
- package/dist/collection/global/global.js +26 -12
- package/dist/collection/global/mixins.js +6 -6
- package/dist/collection/global/styles.js +270 -133
- package/dist/collection/global/styles.ts +361 -134
- package/dist/collection/insertfont.js +18 -0
- package/dist/collection/stories/PortalTemplates.stories.js +22 -30
- package/dist/collection/tables/GenericTableView.js +4 -4
- package/dist/collection/utils/parseStates.js +12 -0
- package/dist/esm/{ErrorView-48e2b969.js → ErrorView-eaafd6f5.js} +1 -1
- package/dist/esm/{GenericTableView-e7addb2b.js → GenericTableView-dd9be3ea.js} +6 -6
- package/dist/esm/IndirectTaxDetailsView-54319d79.js +639 -0
- package/dist/esm/{ShadowViewAddon-7c10e0ee.js → ShadowViewAddon-ff7a4b04.js} +1445 -1388
- package/dist/esm/{copy-text-view-717050d5.js → copy-text-view-6dec9902.js} +19 -8
- package/dist/esm/data-ee3ae298.js +121 -0
- package/dist/esm/{stencil-hooks.module-4bc38af4.js → dom-context-hooks.module-63370afd.js} +13 -13
- package/dist/esm/{email-registration-view-a7818cf2.js → email-registration-view-db81655f.js} +3 -3
- package/dist/esm/{extractProps-ae1afbb3.js → extractProps-54064fb0.js} +14 -1
- package/dist/esm/{global-6dc825bc.js → global-c38fd7a9.js} +11784 -11602
- package/dist/esm/{index-91e7729f.js → index-b3a06de8.js} +4 -0
- package/dist/esm/{index.module-89a79f66.js → index.module-38dad6c9.js} +153 -153
- package/dist/esm/loader.js +5 -5
- package/dist/esm/{luxon-8d51c92b.js → luxon-bbf75a9d.js} +1 -1
- package/dist/esm/mint-components.js +5 -5
- package/dist/esm/{mixins-83f90fa1.js → mixins-f750863a.js} +6 -6
- package/dist/esm/{mockRewardData-8bd1b356.js → mockRewardData-96a2d26d.js} +2 -2
- package/dist/esm/raisins-plop-target.entry.js +1 -1
- package/dist/esm/{re-render-cc945f38.js → re-render-9c90767d.js} +2 -2
- package/dist/esm/{sqm-banking-info-form_17.entry.js → sqm-banking-info-form_10.entry.js} +723 -2103
- package/dist/esm/{sqm-base-registration-form-view-31f1cb87.js → sqm-base-registration-form-view-193f1721.js} +3 -3
- package/dist/esm/{sqm-big-stat_41.entry.js → sqm-big-stat_42.entry.js} +867 -158
- package/dist/esm/{sqm-close-button-view-f9819751.js → sqm-close-button-view-2fa57229.js} +2 -2
- package/dist/esm/sqm-close-button.entry.js +5 -5
- package/dist/esm/sqm-code-verification.entry.js +338 -0
- package/dist/esm/sqm-context-router.entry.js +3 -3
- package/dist/esm/sqm-email-verification.entry.js +6 -6
- package/dist/esm/sqm-empty_4.entry.js +53 -59
- package/dist/esm/sqm-form-message.entry.js +2 -2
- package/dist/esm/sqm-google-sign-in.entry.js +3 -3
- package/dist/esm/sqm-graphql-client-provider.entry.js +3 -3
- package/dist/esm/sqm-header-logo.entry.js +2 -2
- package/dist/esm/sqm-instant-access-registration.entry.js +8 -8
- package/dist/esm/sqm-invoice-table-data-cell_5.entry.js +76 -0
- package/dist/esm/sqm-leaderboard-rank-view-18baae5b.js +8 -0
- package/dist/esm/sqm-leaderboard-rank.entry.js +5 -5
- package/dist/esm/{sqm-logout-current-user-view-8ef8180f.js → sqm-logout-current-user-view-f21e54e3.js} +1 -1
- package/dist/esm/sqm-logout-current-user.entry.js +4 -4
- package/dist/esm/sqm-navigation-sidebar-item-view-797601b0.js +54 -0
- package/dist/esm/sqm-navigation-sidebar-item.entry.js +29 -6
- package/dist/esm/{sqm-navigation-sidebar-view-9d802b78.js → sqm-navigation-sidebar-view-6c13798c.js} +17 -7
- package/dist/esm/sqm-navigation-sidebar.entry.js +22 -6
- package/dist/esm/sqm-pagination_3.entry.js +90 -63
- package/dist/esm/sqm-password-field.entry.js +5 -5
- package/dist/esm/sqm-popup-container.entry.js +3 -3
- package/dist/esm/{sqm-portal-container-view-1683ae32.js → sqm-portal-container-view-176e92e3.js} +2 -2
- package/dist/esm/{sqm-portal-email-verification-view-d96d6c43.js → sqm-portal-email-verification-view-cb5b8338.js} +4 -4
- package/dist/esm/sqm-portal-email-verification.entry.js +7 -7
- package/dist/esm/{sqm-portal-forgot-password-view-50444a7c.js → sqm-portal-forgot-password-view-0e795cdd.js} +24 -16
- package/dist/esm/sqm-portal-forgot-password.entry.js +36 -7
- package/dist/esm/sqm-portal-google-login.entry.js +7 -7
- package/dist/esm/sqm-portal-google-registration-form.entry.js +9 -9
- package/dist/esm/{sqm-portal-login-view-37c85d04.js → sqm-portal-login-view-7670cd86.js} +4 -4
- package/dist/esm/sqm-portal-logout.entry.js +3 -3
- package/dist/esm/{sqm-portal-profile-view-4ce1c7c3.js → sqm-portal-profile-view-47aafa20.js} +4 -4
- package/dist/esm/sqm-portal-profile.entry.js +7 -7
- package/dist/esm/sqm-portal-protected-route.entry.js +3 -3
- package/dist/esm/{sqm-portal-registration-form-view-21d57492.js → sqm-portal-registration-form-view-8bdc3804.js} +3 -3
- package/dist/esm/sqm-portal-registration-form.entry.js +8 -8
- package/dist/esm/{sqm-portal-reset-password-view-b000ffc5.js → sqm-portal-reset-password-view-abef7286.js} +3 -3
- package/dist/esm/sqm-portal-reset-password.entry.js +6 -6
- package/dist/esm/{sqm-portal-verify-email-view-2983ba9b.js → sqm-portal-verify-email-view-33805220.js} +3 -3
- package/dist/esm/sqm-portal-verify-email.entry.js +6 -6
- package/dist/esm/{sqm-qr-code-view-10b8b4cb.js → sqm-qr-code-view-11121d3c.js} +3 -3
- package/dist/esm/sqm-qr-code.entry.js +6 -6
- package/dist/esm/sqm-referral-table_11.entry.js +121 -32
- package/dist/esm/sqm-referred-registration.entry.js +7 -7
- package/dist/esm/sqm-rewards-table-customer-note-cell.entry.js +3 -3
- package/dist/esm/sqm-rewards-table-customer-note-column.entry.js +4 -4
- package/dist/esm/sqm-rewards-table_9.entry.js +69 -22
- package/dist/esm/sqm-route.entry.js +1 -1
- package/dist/esm/sqm-scroll.entry.js +2 -2
- package/dist/esm/sqm-stencilbook.entry.js +13671 -12384
- package/dist/esm/sqm-tab.entry.js +4 -4
- package/dist/esm/sqm-tabs.entry.js +21 -9
- package/dist/esm/sqm-tax-and-cash.entry.js +1251 -0
- package/dist/esm/sqm-text-span-view-4c17b8c9.js +61 -0
- package/dist/esm/sqm-text-span.entry.js +6 -6
- package/dist/esm/sqm-widget-verification-controller.entry.js +14 -6
- package/dist/esm/sqm-widget-verification.entry.js +20 -10
- package/dist/esm/{useChildElements-7945ae56.js → useChildElements-4e70ac0e.js} +2 -2
- package/dist/esm/{useInstantAccessRegistration-dc4ad9f2.js → useInstantAccessRegistration-0f04459e.js} +3 -3
- package/dist/esm/{usePayoutStatus-58aa56b4.js → usePayoutStatus-7eeec61b.js} +10 -7
- package/dist/esm/{usePortalLogin-ef647a50.js → usePortalLogin-61abe78e.js} +2 -2
- package/dist/esm/{usePortalRegistrationForm-4b35a357.js → usePortalRegistrationForm-afc0171e.js} +3 -3
- package/dist/esm/{useReferralCodes-8f75921a.js → useReferralCodes-311e6d72.js} +2 -2
- package/dist/esm/{useReferralTable-b3876ed6.js → useReferralTable-65a01a6a.js} +5 -5
- package/dist/esm/{useRegistrationFormState-d6f33135.js → useRegistrationFormState-18c2cea7.js} +2 -2
- package/dist/esm/{useVerificationEmail-edc318cb.js → useVerificationEmail-f9413de9.js} +2 -2
- package/dist/esm/{utilities-5b0ca040.js → utilities-ad9c2893.js} +2 -2
- package/dist/esm/utils-9c62ea4a.js +97 -0
- package/dist/esm-es5/{ErrorView-48e2b969.js → ErrorView-eaafd6f5.js} +1 -1
- package/dist/esm-es5/GenericTableView-dd9be3ea.js +1 -0
- package/dist/esm-es5/IndirectTaxDetailsView-54319d79.js +1 -0
- package/dist/esm-es5/ShadowViewAddon-ff7a4b04.js +1 -0
- package/dist/esm-es5/copy-text-view-6dec9902.js +1 -0
- package/dist/esm-es5/data-ee3ae298.js +1 -0
- package/dist/esm-es5/dom-context-hooks.module-63370afd.js +53 -0
- package/dist/esm-es5/email-registration-view-db81655f.js +1 -0
- package/dist/esm-es5/extractProps-54064fb0.js +1 -0
- package/dist/esm-es5/{global-6dc825bc.js → global-c38fd7a9.js} +5 -5
- package/dist/esm-es5/{index-91e7729f.js → index-b3a06de8.js} +1 -1
- package/dist/esm-es5/index.module-38dad6c9.js +1 -0
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/luxon-bbf75a9d.js +1 -0
- package/dist/esm-es5/mint-components.js +1 -1
- package/dist/esm-es5/mixins-f750863a.js +1 -0
- package/dist/esm-es5/{mockRewardData-8bd1b356.js → mockRewardData-96a2d26d.js} +1 -1
- package/dist/esm-es5/raisins-plop-target.entry.js +1 -1
- package/dist/esm-es5/re-render-9c90767d.js +1 -0
- package/dist/esm-es5/sqm-banking-info-form_10.entry.js +1 -0
- package/dist/esm-es5/{sqm-base-registration-form-view-31f1cb87.js → sqm-base-registration-form-view-193f1721.js} +1 -1
- package/dist/esm-es5/sqm-big-stat_42.entry.js +1 -0
- package/dist/esm-es5/{sqm-close-button-view-f9819751.js → sqm-close-button-view-2fa57229.js} +1 -1
- package/dist/esm-es5/sqm-close-button.entry.js +1 -1
- package/dist/esm-es5/sqm-code-verification.entry.js +1 -0
- package/dist/esm-es5/sqm-context-router.entry.js +1 -1
- package/dist/esm-es5/sqm-email-verification.entry.js +1 -1
- package/dist/esm-es5/sqm-empty_4.entry.js +1 -1
- package/dist/esm-es5/sqm-form-message.entry.js +1 -1
- package/dist/esm-es5/sqm-google-sign-in.entry.js +1 -1
- package/dist/esm-es5/sqm-graphql-client-provider.entry.js +1 -1
- package/dist/esm-es5/sqm-header-logo.entry.js +1 -1
- package/dist/esm-es5/sqm-instant-access-registration.entry.js +1 -1
- package/dist/esm-es5/sqm-invoice-table-data-cell_5.entry.js +1 -0
- package/dist/esm-es5/sqm-leaderboard-rank-view-18baae5b.js +1 -0
- package/dist/esm-es5/sqm-leaderboard-rank.entry.js +1 -1
- package/dist/esm-es5/{sqm-logout-current-user-view-8ef8180f.js → sqm-logout-current-user-view-f21e54e3.js} +1 -1
- package/dist/esm-es5/sqm-logout-current-user.entry.js +1 -1
- package/dist/esm-es5/sqm-navigation-sidebar-item-view-797601b0.js +1 -0
- package/dist/esm-es5/sqm-navigation-sidebar-item.entry.js +1 -1
- package/dist/esm-es5/sqm-navigation-sidebar-view-6c13798c.js +1 -0
- package/dist/esm-es5/sqm-navigation-sidebar.entry.js +1 -1
- package/dist/esm-es5/sqm-pagination_3.entry.js +1 -1
- package/dist/esm-es5/sqm-password-field.entry.js +1 -1
- package/dist/esm-es5/sqm-popup-container.entry.js +1 -1
- package/dist/esm-es5/{sqm-portal-container-view-1683ae32.js → sqm-portal-container-view-176e92e3.js} +1 -1
- package/dist/esm-es5/{sqm-portal-email-verification-view-d96d6c43.js → sqm-portal-email-verification-view-cb5b8338.js} +1 -1
- package/dist/esm-es5/sqm-portal-email-verification.entry.js +1 -1
- package/dist/esm-es5/sqm-portal-forgot-password-view-0e795cdd.js +1 -0
- package/dist/esm-es5/sqm-portal-forgot-password.entry.js +1 -1
- package/dist/esm-es5/sqm-portal-google-login.entry.js +1 -1
- package/dist/esm-es5/sqm-portal-google-registration-form.entry.js +1 -1
- package/dist/esm-es5/sqm-portal-login-view-7670cd86.js +1 -0
- package/dist/esm-es5/sqm-portal-logout.entry.js +1 -1
- package/dist/esm-es5/{sqm-portal-profile-view-4ce1c7c3.js → sqm-portal-profile-view-47aafa20.js} +1 -1
- package/dist/esm-es5/sqm-portal-profile.entry.js +1 -1
- package/dist/esm-es5/sqm-portal-protected-route.entry.js +1 -1
- package/dist/esm-es5/{sqm-portal-registration-form-view-21d57492.js → sqm-portal-registration-form-view-8bdc3804.js} +1 -1
- package/dist/esm-es5/sqm-portal-registration-form.entry.js +1 -1
- package/dist/esm-es5/{sqm-portal-reset-password-view-b000ffc5.js → sqm-portal-reset-password-view-abef7286.js} +1 -1
- package/dist/esm-es5/sqm-portal-reset-password.entry.js +1 -1
- package/dist/esm-es5/{sqm-portal-verify-email-view-2983ba9b.js → sqm-portal-verify-email-view-33805220.js} +1 -1
- package/dist/esm-es5/sqm-portal-verify-email.entry.js +1 -1
- package/dist/esm-es5/{sqm-qr-code-view-10b8b4cb.js → sqm-qr-code-view-11121d3c.js} +1 -1
- package/dist/esm-es5/sqm-qr-code.entry.js +1 -1
- package/dist/esm-es5/sqm-referral-table_11.entry.js +1 -1
- package/dist/esm-es5/sqm-referred-registration.entry.js +1 -1
- package/dist/esm-es5/sqm-rewards-table-customer-note-cell.entry.js +1 -1
- package/dist/esm-es5/sqm-rewards-table-customer-note-column.entry.js +1 -1
- package/dist/esm-es5/sqm-rewards-table_9.entry.js +1 -1
- package/dist/esm-es5/sqm-route.entry.js +1 -1
- package/dist/esm-es5/sqm-scroll.entry.js +1 -1
- package/dist/esm-es5/sqm-stencilbook.entry.js +1 -1
- package/dist/esm-es5/sqm-tab.entry.js +1 -1
- package/dist/esm-es5/sqm-tabs.entry.js +1 -1
- package/dist/esm-es5/sqm-tax-and-cash.entry.js +1 -0
- package/dist/esm-es5/sqm-text-span-view-4c17b8c9.js +1 -0
- package/dist/esm-es5/sqm-text-span.entry.js +1 -1
- package/dist/esm-es5/sqm-widget-verification-controller.entry.js +1 -1
- package/dist/esm-es5/sqm-widget-verification.entry.js +1 -1
- package/dist/esm-es5/useChildElements-4e70ac0e.js +1 -0
- package/dist/esm-es5/useInstantAccessRegistration-0f04459e.js +1 -0
- package/dist/esm-es5/{usePayoutStatus-58aa56b4.js → usePayoutStatus-7eeec61b.js} +2 -2
- package/dist/esm-es5/usePortalLogin-61abe78e.js +1 -0
- package/dist/esm-es5/usePortalRegistrationForm-afc0171e.js +1 -0
- package/dist/esm-es5/useReferralCodes-311e6d72.js +1 -0
- package/dist/esm-es5/useReferralTable-65a01a6a.js +1 -0
- package/dist/esm-es5/useRegistrationFormState-18c2cea7.js +1 -0
- package/dist/esm-es5/useVerificationEmail-f9413de9.js +1 -0
- package/dist/esm-es5/utilities-ad9c2893.js +1 -0
- package/dist/esm-es5/utils-9c62ea4a.js +1 -0
- package/dist/mint-components/global/styles.ts +361 -134
- package/dist/mint-components/mint-components.esm.js +1 -1
- package/dist/mint-components/mint-components.js +1 -1
- package/dist/mint-components/p-000c91b1.js +1 -0
- package/dist/mint-components/{p-44a82cf3.system.js → p-003325f4.system.js} +22 -22
- package/dist/mint-components/{p-266a8b4d.js → p-00791abc.js} +1 -1
- package/dist/mint-components/p-06a84a39.system.js +1 -0
- package/dist/mint-components/p-0797a946.js +1 -0
- package/dist/mint-components/{p-e145e4f8.js → p-07dc6d68.js} +1 -1
- package/dist/mint-components/{p-5bedb58c.js → p-08700497.js} +1 -1
- package/dist/mint-components/p-08a77d1e.system.entry.js +1 -0
- package/dist/mint-components/p-0bb21f5b.system.entry.js +1 -0
- package/dist/mint-components/{p-164a9103.system.entry.js → p-0cba75e6.system.entry.js} +1 -1
- package/dist/mint-components/{p-1a6b7d2a.entry.js → p-0de7e5ec.entry.js} +1 -1
- package/dist/mint-components/p-0e532b53.entry.js +1 -0
- package/dist/mint-components/{p-480e08e9.js → p-0e59a91e.js} +2 -2
- package/dist/mint-components/p-0ea61502.system.js +1 -0
- package/dist/mint-components/p-10c2a48c.system.js +1 -0
- package/dist/mint-components/{p-95ae4ab9.system.js → p-118593a6.system.js} +1 -1
- package/dist/mint-components/p-12cb6a87.entry.js +93 -0
- package/dist/mint-components/{p-3a62a7e2.system.js → p-12fd7ee9.system.js} +1 -1
- package/dist/mint-components/p-14128c84.system.entry.js +1 -0
- package/dist/mint-components/{p-7c2b9fe4.system.js → p-15012f59.system.js} +1 -1
- package/dist/mint-components/p-15915f9a.js +394 -0
- package/dist/mint-components/p-15c04aac.system.entry.js +1 -0
- package/dist/mint-components/p-1870fd94.entry.js +1 -0
- package/dist/mint-components/{p-42187319.system.entry.js → p-19703136.system.entry.js} +1 -1
- package/dist/mint-components/p-19c2cfae.system.entry.js +1 -0
- package/dist/mint-components/p-1a278658.entry.js +1 -0
- package/dist/mint-components/{p-dbc0e4f8.system.js → p-1c1f4ce7.system.js} +1 -1
- package/dist/mint-components/p-1cd0e1e9.system.js +1 -0
- package/dist/mint-components/p-204861a6.js +1 -0
- package/dist/mint-components/p-209ea185.js +1 -0
- package/dist/mint-components/p-22d59cba.entry.js +258 -0
- package/dist/mint-components/p-2403c6e1.system.js +1 -0
- package/dist/mint-components/p-240bec23.js +1 -0
- package/dist/mint-components/p-2487d469.system.entry.js +1 -0
- package/dist/mint-components/p-24af584d.js +1 -0
- package/dist/mint-components/p-29710406.system.entry.js +1 -0
- package/dist/mint-components/{p-4dbe2d08.entry.js → p-2a69ccdc.entry.js} +2 -2
- package/dist/mint-components/p-3191e4a8.entry.js +1 -0
- package/dist/mint-components/p-327125c2.entry.js +1 -0
- package/dist/mint-components/{p-f4a72903.system.entry.js → p-35061d76.system.entry.js} +1 -1
- package/dist/mint-components/{p-c0f19490.js → p-3787a4d6.js} +1 -1
- package/dist/mint-components/p-3a22b54d.entry.js +9 -0
- package/dist/mint-components/{p-36ffebd8.system.entry.js → p-3c546860.system.entry.js} +1 -1
- package/dist/mint-components/p-3cb1d066.js +1 -0
- package/dist/mint-components/p-3cb249c3.js +1 -0
- package/dist/mint-components/{p-13ed8586.system.js → p-3dc34570.system.js} +1 -1
- package/dist/mint-components/{p-7cbec088.system.entry.js → p-3e3b15ea.system.entry.js} +1 -1
- package/dist/mint-components/{p-20245645.js → p-3eba9036.js} +1 -1
- package/dist/mint-components/{p-38de17fa.system.js → p-4196d37a.system.js} +1 -1
- package/dist/mint-components/{p-4b6dc0e5.entry.js → p-4204a6e3.entry.js} +1 -1
- package/dist/mint-components/{p-6a8d9def.system.entry.js → p-42b62299.system.entry.js} +1 -1
- package/dist/mint-components/p-42da8239.system.js +1 -0
- package/dist/mint-components/{p-726a9924.js → p-460155de.js} +1 -1
- package/dist/mint-components/p-470c9c64.system.js +1 -0
- package/dist/mint-components/{p-301ddcaa.system.entry.js → p-485e2d9f.system.entry.js} +1 -1
- package/dist/mint-components/{p-abefb7cc.js → p-487ca373.js} +1 -1
- package/dist/mint-components/p-49b20dae.js +1 -0
- package/dist/mint-components/p-4a9aaf3d.entry.js +1 -0
- package/dist/mint-components/p-4aed3645.entry.js +16 -0
- package/dist/mint-components/{p-6d2f5a1d.js → p-4d19270b.js} +2 -2
- package/dist/mint-components/p-4d95a728.entry.js +1 -0
- package/dist/mint-components/p-4f5329a2.system.js +53 -0
- package/dist/mint-components/p-50302878.system.js +1 -0
- package/dist/mint-components/{p-59274a91.system.js → p-578a27c8.system.js} +1 -1
- package/dist/mint-components/p-587115cb.system.entry.js +1 -0
- package/dist/mint-components/p-5911a34f.system.entry.js +1 -0
- package/dist/mint-components/p-59b028db.system.js +1 -0
- package/dist/mint-components/p-5decae6e.js +1 -0
- package/dist/mint-components/p-5f3483c4.entry.js +1 -0
- package/dist/mint-components/p-63e29387.js +42 -0
- package/dist/mint-components/{p-71d7c2a0.system.js → p-64997b59.system.js} +1 -1
- package/dist/mint-components/{p-b5fb3826.system.js → p-6578ea31.system.js} +1 -1
- package/dist/mint-components/{p-2ae0e06a.entry.js → p-65ed872f.entry.js} +1 -1
- package/dist/mint-components/{p-619c2aa3.entry.js → p-66b35c5f.entry.js} +2 -2
- package/dist/mint-components/p-672d144e.entry.js +1 -0
- package/dist/mint-components/p-676ca2c0.system.js +1 -0
- package/dist/mint-components/p-67ad2252.system.js +1 -0
- package/dist/mint-components/{p-dc52c36a.js → p-68043f30.js} +1 -1
- package/dist/mint-components/{p-ad985d37.system.entry.js → p-6826e36f.system.entry.js} +1 -1
- package/dist/mint-components/p-68e277f9.entry.js +11 -0
- package/dist/mint-components/p-6ad674c2.js +103 -0
- package/dist/mint-components/p-6d2d4f7c.entry.js +1 -0
- package/dist/mint-components/p-6e069052.entry.js +1 -0
- package/dist/mint-components/{p-b7d1469d.system.entry.js → p-7059ee40.system.entry.js} +1 -1
- package/dist/mint-components/p-71271fbd.system.js +1 -0
- package/dist/mint-components/{p-6d9e52c7.system.js → p-7159c51c.system.js} +1 -1
- package/dist/mint-components/p-7264a34d.js +1233 -0
- package/dist/mint-components/{p-527216de.system.js → p-734dde9b.system.js} +1 -1
- package/dist/mint-components/p-77a73017.entry.js +13 -0
- package/dist/mint-components/p-7970e73a.js +1 -0
- package/dist/mint-components/{p-fa37513e.system.entry.js → p-7af4fba0.system.entry.js} +1 -1
- package/dist/mint-components/p-7b4f0dbc.js +1 -0
- package/dist/mint-components/{p-f4a8ee29.system.entry.js → p-7b635ed8.system.entry.js} +1 -1
- package/dist/mint-components/p-7b8d29bb.entry.js +1 -0
- package/dist/mint-components/{p-3f7b81b8.js → p-862845d7.js} +2 -2
- package/dist/mint-components/p-884a1b19.entry.js +1 -0
- package/dist/mint-components/p-8a6494c7.system.js +1 -0
- package/dist/mint-components/p-8b1d837f.entry.js +1 -0
- package/dist/mint-components/p-8c42d0a1.system.entry.js +1 -0
- package/dist/mint-components/p-8c8845f6.system.entry.js +1 -0
- package/dist/mint-components/p-8caef004.js +1 -0
- package/dist/mint-components/{p-aaff68dc.entry.js → p-8dc1cd0f.entry.js} +1 -1
- package/dist/mint-components/{p-8413ade9.system.js → p-8e28333b.system.js} +1 -1
- package/dist/mint-components/p-8e2bead4.js +1 -0
- package/dist/mint-components/{p-a37541ae.system.entry.js → p-9043b1c3.system.entry.js} +1 -1
- package/dist/mint-components/{p-2d52e2d7.system.js → p-91014439.system.js} +1 -1
- package/dist/mint-components/{p-18425f38.system.entry.js → p-910f56ca.system.entry.js} +1 -1
- package/dist/mint-components/{p-9b6a0152.system.entry.js → p-949ca517.system.entry.js} +1 -1
- package/dist/mint-components/{p-ccf8c9aa.entry.js → p-94f9fbf7.entry.js} +1 -1
- package/dist/mint-components/p-951ded9b.js +1 -0
- package/dist/mint-components/{p-a9f4ddb1.js → p-9580aac3.js} +1 -1
- package/dist/mint-components/{p-208d8d75.system.entry.js → p-9759c109.system.entry.js} +1 -1
- package/dist/mint-components/p-987036b6.system.entry.js +1 -0
- package/dist/mint-components/p-99fb2a50.js +1 -0
- package/dist/mint-components/p-9d8d348d.system.js +1 -0
- package/dist/mint-components/p-9e297104.entry.js +1 -0
- package/dist/mint-components/p-9f82e69d.entry.js +1 -0
- package/dist/mint-components/{p-5488fdd9.system.js → p-9fb8b33a.system.js} +1 -1
- package/dist/mint-components/p-a07e0930.system.entry.js +1 -0
- package/dist/mint-components/{p-8175e85f.system.js → p-a148663a.system.js} +1 -1
- package/dist/mint-components/{p-35b475bf.js → p-a45680fe.js} +1 -1
- package/dist/mint-components/p-a6811a96.system.entry.js +1 -0
- package/dist/mint-components/{p-127e66c2.system.js → p-a6f4fb03.system.js} +1 -1
- package/dist/mint-components/p-a7638e37.entry.js +13 -0
- package/dist/mint-components/{p-faba3198.entry.js → p-a7ee19dc.entry.js} +1 -1
- package/dist/mint-components/p-a889467c.system.js +1 -0
- package/dist/mint-components/p-a8b53df1.system.entry.js +1 -0
- package/dist/mint-components/{p-00ed4c2e.entry.js → p-a91408bf.entry.js} +1 -1
- package/dist/mint-components/{p-d3e5704c.entry.js → p-aa80d94f.entry.js} +1 -1
- package/dist/mint-components/{p-8362cb4c.system.entry.js → p-ac2fdad8.system.entry.js} +1 -1
- package/dist/mint-components/p-b065215a.entry.js +1 -0
- package/dist/mint-components/{p-87c21535.entry.js → p-b11d89bd.entry.js} +1 -1
- package/dist/mint-components/p-b1ddc706.js +1 -0
- package/dist/mint-components/{p-d6831af5.js → p-b22b7891.js} +1 -1
- package/dist/mint-components/p-b35ceac8.system.entry.js +1 -0
- package/dist/mint-components/{p-345fd28e.system.entry.js → p-b3da317b.system.entry.js} +1 -1
- package/dist/mint-components/{p-3af1ec4c.entry.js → p-b5346a5a.entry.js} +1 -1
- package/dist/mint-components/{p-4b6f2eca.system.entry.js → p-b64f7dcb.system.entry.js} +1 -1
- package/dist/mint-components/{p-571e1427.system.js → p-b6911812.system.js} +1 -1
- package/dist/mint-components/{p-ac9f4085.system.entry.js → p-b70ef2f5.system.entry.js} +1 -1
- package/dist/mint-components/{p-a81b507f.entry.js → p-bac0b56a.entry.js} +2 -2
- package/dist/mint-components/p-be88596c.system.js +1 -0
- package/dist/mint-components/{p-44891949.entry.js → p-c3884e55.entry.js} +1 -1
- package/dist/mint-components/{p-96431b4f.system.entry.js → p-c3dce602.system.entry.js} +1 -1
- package/dist/mint-components/p-c4886223.entry.js +1 -0
- package/dist/mint-components/{p-cf8677ea.js → p-c6a39fd3.js} +1 -1
- package/dist/mint-components/p-c7c11325.js +1 -0
- package/dist/mint-components/p-cab1f502.js +1 -0
- package/dist/mint-components/p-cb763814.js +1 -0
- package/dist/mint-components/p-d2699bed.system.entry.js +1 -0
- package/dist/mint-components/{p-1b3ab15a.system.entry.js → p-d2d15c86.system.entry.js} +1 -1
- package/dist/mint-components/{p-a71b9154.system.js → p-d399162b.system.js} +1 -1
- package/dist/mint-components/p-d821418e.system.js +1 -0
- package/dist/mint-components/p-d8c5b80a.system.js +1 -0
- package/dist/mint-components/{p-605c2904.system.entry.js → p-da6fe95f.system.entry.js} +1 -1
- package/dist/mint-components/{p-c2fdd608.system.entry.js → p-dbe29e53.system.entry.js} +1 -1
- package/dist/mint-components/{p-69ac09d4.js → p-ddf3c05e.js} +1 -1
- package/dist/mint-components/{p-da7708a7.entry.js → p-e27ff213.entry.js} +1 -1
- package/dist/mint-components/p-e49b253f.entry.js +11 -0
- package/dist/mint-components/p-e55aafe9.system.js +1 -0
- package/dist/mint-components/p-e57d61af.system.js +1 -0
- package/dist/mint-components/{p-9209a016.system.entry.js → p-e5954a23.system.entry.js} +1 -1
- package/dist/mint-components/{p-0559d880.entry.js → p-e5d72a05.entry.js} +1 -1
- package/dist/mint-components/p-ea0032f2.entry.js +1 -0
- package/dist/mint-components/p-ee859839.system.entry.js +1 -0
- package/dist/mint-components/{p-7dabdca6.system.entry.js → p-eea87fdc.system.entry.js} +1 -1
- package/dist/mint-components/p-f0368b8b.system.js +1 -0
- package/dist/mint-components/p-f1d17cda.system.entry.js +1 -0
- package/dist/mint-components/{p-05f29f64.js → p-f307b716.js} +1 -1
- package/dist/mint-components/p-f6baa0c9.system.js +1 -0
- package/dist/mint-components/{p-4e526a94.js → p-f7700805.js} +1 -1
- package/dist/mint-components/{p-e21a1cb8.system.entry.js → p-f8520da2.system.entry.js} +1 -1
- package/dist/mint-components/{p-11519322.system.js → p-f8af708e.system.js} +1 -1
- package/dist/mint-components/{p-cc7af682.system.js → p-fa6fba34.system.js} +2 -2
- package/dist/mint-components/{p-2bbff88f.entry.js → p-fa89e7d4.entry.js} +1 -1
- package/dist/mint-components/{p-2b462e4f.system.entry.js → p-fb2976fc.system.entry.js} +1 -1
- package/dist/mint-components/{p-4e451f75.js → p-fb5be0c5.js} +1 -1
- package/dist/mint-components/p-fb77f662.entry.js +1 -0
- package/dist/mint-components/p-fbef1214.entry.js +144 -0
- package/dist/types/components/sqm-big-stat/BigStat.stories.d.ts +2 -0
- package/dist/types/components/sqm-big-stat/sqm-big-stat-view.d.ts +5 -0
- package/dist/types/components/sqm-big-stat/sqm-big-stat.d.ts +41 -0
- package/dist/types/components/sqm-coupon-code/CouponCode.stories.d.ts +1 -0
- package/dist/types/components/sqm-coupon-code/sqm-coupon-code-view.d.ts +2 -0
- package/dist/types/components/sqm-coupon-code/sqm-coupon-code.d.ts +42 -0
- package/dist/types/components/sqm-coupon-code/useCouponCode.d.ts +1 -0
- package/dist/types/components/sqm-divided-layout/sqm-divided-layout-view.d.ts +4 -1
- package/dist/types/components/sqm-divided-layout/sqm-divided-layout.d.ts +13 -0
- package/dist/types/components/sqm-hero-image/sqm-hero-image-view.d.ts +1 -0
- package/dist/types/components/sqm-hero-image/sqm-hero-image.d.ts +19 -0
- package/dist/types/components/sqm-instant-access-registration/sqm-instant-access-registration.d.ts +1 -1
- package/dist/types/components/sqm-invoice-table/columns/InvoiceTableColumn.d.ts +1 -0
- package/dist/types/components/sqm-invoice-table/columns/sqm-invoice-table-data-column.d.ts +1 -0
- package/dist/types/components/sqm-invoice-table/columns/sqm-invoice-table-date-column.d.ts +1 -0
- package/dist/types/components/sqm-invoice-table/columns/sqm-invoice-table-download-column.d.ts +1 -0
- package/dist/types/components/sqm-invoice-table/mockInvoiceData.d.ts +1 -0
- package/dist/types/components/sqm-invoice-table/sqm-invoice-table.d.ts +1 -0
- package/dist/types/components/sqm-leaderboard/Leaderboard.stories.d.ts +1 -0
- package/dist/types/components/sqm-leaderboard/sqm-leaderboard-view.d.ts +6 -1
- package/dist/types/components/sqm-leaderboard/sqm-leaderboard.d.ts +51 -15
- package/dist/types/components/sqm-leaderboard/useLeaderboard.d.ts +6 -0
- package/dist/types/components/sqm-navigation-sidebar/sqm-navigation-sidebar-view.d.ts +1 -0
- package/dist/types/components/sqm-navigation-sidebar/sqm-navigation-sidebar.d.ts +14 -0
- package/dist/types/components/sqm-navigation-sidebar-item/sqm-navigation-sidebar-item-view.d.ts +8 -0
- package/dist/types/components/sqm-navigation-sidebar-item/sqm-navigation-sidebar-item.d.ts +57 -0
- package/dist/types/components/sqm-pagination/sqm-pagination-view.d.ts +1 -0
- package/dist/types/components/sqm-pagination/sqm-pagination.d.ts +9 -0
- package/dist/types/components/sqm-popup-container/usePopupContainer.d.ts +2 -2
- package/dist/types/components/sqm-portal-change-password/sqm-portal-change-password-view.d.ts +2 -0
- package/dist/types/components/sqm-portal-forgot-password/sqm-portal-forgot-password-view.d.ts +5 -1
- package/dist/types/components/sqm-portal-forgot-password/sqm-portal-forgot-password.d.ts +15 -0
- package/dist/types/components/sqm-portal-frame/sqm-portal-frame-view.d.ts +3 -0
- package/dist/types/components/sqm-portal-frame/sqm-portal-frame.d.ts +19 -0
- package/dist/types/components/sqm-portal-frame/usePortalFrame.d.ts +2 -1
- package/dist/types/components/sqm-portal-login/PortalLogin.stories.d.ts +1 -0
- package/dist/types/components/sqm-program-explainer-step/sqm-program-explainer-step-view.d.ts +1 -1
- package/dist/types/components/sqm-program-explainer-step/sqm-program-explainer-step.d.ts +2 -1
- package/dist/types/components/sqm-referral-card/sqm-referral-card-view.d.ts +5 -2
- package/dist/types/components/sqm-referral-card/sqm-referral-card.d.ts +21 -1
- package/dist/types/components/sqm-referral-code/ReferralCode.stories.d.ts +1 -0
- package/dist/types/components/sqm-referral-code/sqm-referral-code.d.ts +42 -0
- package/dist/types/components/sqm-referral-codes/ReferralCodes.stories.d.ts +1 -0
- package/dist/types/components/sqm-referral-codes/sqm-referral-codes-view.d.ts +1 -0
- package/dist/types/components/sqm-referral-codes/sqm-referral-codes.d.ts +6 -0
- package/dist/types/components/sqm-referral-table/cells/sqm-referral-table-rewards-cell.d.ts +1 -0
- package/dist/types/components/sqm-referral-table/cells/sqm-referral-table-status-cell.d.ts +1 -0
- package/dist/types/components/sqm-referral-table/columns/ReferralTableColumn.d.ts +1 -0
- package/dist/types/components/sqm-referral-table/columns/sqm-referral-table-column.d.ts +1 -0
- package/dist/types/components/sqm-referral-table/columns/sqm-referral-table-date-column.d.ts +1 -0
- package/dist/types/components/sqm-referral-table/columns/sqm-referral-table-rewards-column.d.ts +1 -0
- package/dist/types/components/sqm-referral-table/columns/sqm-referral-table-status-column.d.ts +1 -0
- package/dist/types/components/sqm-referral-table/columns/sqm-referral-table-user-column.d.ts +1 -0
- package/dist/types/components/sqm-referral-table/sqm-referral-table.d.ts +1 -0
- package/dist/types/components/sqm-referred-registration/sqm-referred-registration.d.ts +1 -1
- package/dist/types/components/sqm-reward-exchange-list/RewardExchangeListData.d.ts +457 -437
- package/dist/types/components/sqm-rewards-table/cells/sqm-rewards-table-reward-cell.d.ts +1 -0
- package/dist/types/components/sqm-rewards-table/cells/sqm-rewards-table-source-cell.d.ts +1 -0
- package/dist/types/components/sqm-rewards-table/cells/sqm-rewards-table-status-cell.d.ts +2 -1
- package/dist/types/components/sqm-rewards-table/columns/RewardTableColumn.d.ts +1 -0
- package/dist/types/components/sqm-rewards-table/columns/sqm-rewards-table-date-column.d.ts +2 -1
- package/dist/types/components/sqm-rewards-table/columns/sqm-rewards-table-note-column.d.ts +2 -1
- package/dist/types/components/sqm-rewards-table/columns/sqm-rewards-table-reward-column.d.ts +2 -1
- package/dist/types/components/sqm-rewards-table/columns/sqm-rewards-table-source-column.d.ts +2 -1
- package/dist/types/components/sqm-rewards-table/columns/sqm-rewards-table-status-column.d.ts +2 -1
- package/dist/types/components/sqm-rewards-table/mockRewardData.d.ts +1 -0
- package/dist/types/components/sqm-rewards-table/mockTaxData.d.ts +1 -0
- package/dist/types/components/sqm-rewards-table/sqm-rewards-table.d.ts +1 -0
- package/dist/types/components/sqm-rewards-table/useRewardsTable.d.ts +1 -1
- package/dist/types/components/sqm-share-button/ShareButton.stories.d.ts +1 -1
- package/dist/types/components/sqm-share-button/sqm-share-button-view.d.ts +2 -1
- package/dist/types/components/sqm-share-button/sqm-share-button.d.ts +18 -6
- package/dist/types/components/sqm-share-code/sqm-share-code.d.ts +42 -0
- package/dist/types/components/sqm-share-link/sqm-share-link.d.ts +14 -1
- package/dist/types/components/sqm-stat-container/sqm-stat-container-view.d.ts +3 -0
- package/dist/types/components/sqm-stat-container/sqm-stat-container.d.ts +23 -0
- package/dist/types/components/sqm-stencilbook/BrandSelector.d.ts +9 -0
- package/dist/types/components/sqm-stencilbook/Themes.d.ts +6 -6
- package/dist/types/components/sqm-tabs/Tabs.stories.d.ts +1 -0
- package/dist/types/components/sqm-tabs/sqm-tabs-view.d.ts +1 -0
- package/dist/types/components/sqm-tabs/sqm-tabs.d.ts +8 -0
- package/dist/types/components/sqm-task-card/DetailsView.d.ts +6 -0
- package/dist/types/components/sqm-task-card/sqm-task-card-view.d.ts +1 -1
- package/dist/types/components/sqm-task-card/sqm-task-card.d.ts +1 -1
- package/dist/types/components/sqm-task-card/useTaskCard.d.ts +1 -1
- package/dist/types/components/sqm-text/Text.stories.d.ts +6 -0
- package/dist/types/components/sqm-text/sqm-text.d.ts +12 -0
- package/dist/types/components/sqm-text-span/sqm-text-span-view.d.ts +4 -2
- package/dist/types/components/sqm-text-span/sqm-text-span.d.ts +13 -1
- package/dist/types/components/sqm-timeline/Timeline.stories.d.ts +1 -0
- package/dist/types/components/sqm-timeline/sqm-timeline-entry-view.d.ts +2 -0
- package/dist/types/components/sqm-timeline/sqm-timeline-entry.d.ts +14 -0
- package/dist/types/components/sqm-widget-verification/sqm-widget-verification-controller.d.ts +5 -0
- package/dist/types/components/sqm-widget-verification/sqm-widget-verification.d.ts +6 -1
- package/dist/types/components/tax-and-cash/BankingForm.stories.d.ts +1 -0
- package/dist/types/components/tax-and-cash/TaxForm.stories.d.ts +1 -1
- package/dist/types/components/tax-and-cash/sqm-banking-info-form/sqm-banking-info-form-view.d.ts +6 -0
- package/dist/types/components/tax-and-cash/sqm-banking-info-form/sqm-banking-info-form.d.ts +16 -0
- package/dist/types/components/tax-and-cash/sqm-docusign-form/sqm-docusign-form-view.d.ts +7 -1
- package/dist/types/components/tax-and-cash/sqm-docusign-form/sqm-docusign-form.d.ts +12 -0
- package/dist/types/components/tax-and-cash/sqm-docusign-form/useDocusignForm.d.ts +5 -2
- package/dist/types/components/tax-and-cash/sqm-payout-details-card/sqm-payout-details-card.d.ts +4 -0
- package/dist/types/components/tax-and-cash/sqm-payout-status-alert/usePayoutStatus.d.ts +1 -1
- package/dist/types/components/tax-and-cash/sqm-tax-and-cash/sqm-tax-and-cash.d.ts +45 -4
- package/dist/types/components/tax-and-cash/sqm-tax-and-cash/useTaxAndCash.d.ts +1 -1
- package/dist/types/components/tax-and-cash/sqm-tax-and-cash-dashboard/sqm-tax-and-cash-dashboard-view.d.ts +1 -1
- package/dist/types/components/tax-and-cash/sqm-user-info-form/small-views/IndirectTaxDetailsView.d.ts +1 -1
- package/dist/types/components/tax-and-cash/sqm-user-info-form/useUserInfoForm.d.ts +1 -1
- package/dist/types/components/tax-and-cash/utils.d.ts +1 -1
- package/dist/types/components.d.ts +1194 -82
- package/dist/types/global/global.d.ts +2 -2
- package/dist/types/global/mixins.d.ts +12 -12
- package/dist/types/global/styles.d.ts +10 -2
- package/dist/types/insertfont.d.ts +1 -0
- package/dist/types/saasquatch.d.ts +142 -0
- package/dist/types/utils/parseStates.d.ts +1 -0
- package/docs/docs.docx +0 -0
- package/docs/raisins.json +1 -1
- package/grapesjs/grapesjs.js +1 -1
- package/package.json +3 -2
- package/dist/cjs/sqm-asset-card-view-21ddf04f.js +0 -51
- package/dist/cjs/sqm-asset-card.cjs.entry.js +0 -45
- package/dist/cjs/sqm-invoice-table-view-f369b0a6.js +0 -2038
- package/dist/cjs/sqm-leaderboard-rank-view-d39a55d8.js +0 -10
- package/dist/cjs/sqm-navigation-sidebar-item-view-6f35d2ee.js +0 -45
- package/dist/cjs/sqm-text-span-view-56e48a78.js +0 -62
- package/dist/collection/components/sqm-asset-card/AssetCard.stories.js +0 -29
- package/dist/collection/components/sqm-asset-card/sqm-asset-card-view.js +0 -46
- package/dist/collection/components/sqm-asset-card/sqm-asset-card.js +0 -107
- package/dist/collection/components/sqm-asset-card/useAssetCard.js +0 -9
- package/dist/esm/sqm-asset-card-view-fe5db3c0.js +0 -49
- package/dist/esm/sqm-asset-card.entry.js +0 -41
- package/dist/esm/sqm-invoice-table-view-1bd8afaa.js +0 -2022
- package/dist/esm/sqm-leaderboard-rank-view-753c8d4a.js +0 -8
- package/dist/esm/sqm-navigation-sidebar-item-view-8f1c72bc.js +0 -43
- package/dist/esm/sqm-text-span-view-c577cc60.js +0 -60
- package/dist/esm-es5/GenericTableView-e7addb2b.js +0 -1
- package/dist/esm-es5/ShadowViewAddon-7c10e0ee.js +0 -1
- package/dist/esm-es5/copy-text-view-717050d5.js +0 -1
- package/dist/esm-es5/email-registration-view-a7818cf2.js +0 -1
- package/dist/esm-es5/extractProps-ae1afbb3.js +0 -1
- package/dist/esm-es5/index.module-89a79f66.js +0 -1
- package/dist/esm-es5/luxon-8d51c92b.js +0 -1
- package/dist/esm-es5/mixins-83f90fa1.js +0 -1
- package/dist/esm-es5/re-render-cc945f38.js +0 -1
- package/dist/esm-es5/sqm-asset-card-view-fe5db3c0.js +0 -1
- package/dist/esm-es5/sqm-asset-card.entry.js +0 -1
- package/dist/esm-es5/sqm-banking-info-form_17.entry.js +0 -1
- package/dist/esm-es5/sqm-big-stat_41.entry.js +0 -1
- package/dist/esm-es5/sqm-invoice-table-view-1bd8afaa.js +0 -1
- package/dist/esm-es5/sqm-leaderboard-rank-view-753c8d4a.js +0 -1
- package/dist/esm-es5/sqm-navigation-sidebar-item-view-8f1c72bc.js +0 -1
- package/dist/esm-es5/sqm-navigation-sidebar-view-9d802b78.js +0 -1
- package/dist/esm-es5/sqm-portal-forgot-password-view-50444a7c.js +0 -1
- package/dist/esm-es5/sqm-portal-login-view-37c85d04.js +0 -1
- package/dist/esm-es5/sqm-text-span-view-c577cc60.js +0 -1
- package/dist/esm-es5/stencil-hooks.module-4bc38af4.js +0 -53
- package/dist/esm-es5/useChildElements-7945ae56.js +0 -1
- package/dist/esm-es5/useInstantAccessRegistration-dc4ad9f2.js +0 -1
- package/dist/esm-es5/usePortalLogin-ef647a50.js +0 -1
- package/dist/esm-es5/usePortalRegistrationForm-4b35a357.js +0 -1
- package/dist/esm-es5/useReferralCodes-8f75921a.js +0 -1
- package/dist/esm-es5/useReferralTable-b3876ed6.js +0 -1
- package/dist/esm-es5/useRegistrationFormState-d6f33135.js +0 -1
- package/dist/esm-es5/useVerificationEmail-edc318cb.js +0 -1
- package/dist/esm-es5/utilities-5b0ca040.js +0 -1
- package/dist/mint-components/p-04a6e457.entry.js +0 -1
- package/dist/mint-components/p-11542862.system.entry.js +0 -1
- package/dist/mint-components/p-141bf5c1.system.entry.js +0 -1
- package/dist/mint-components/p-14a65f29.system.js +0 -1
- package/dist/mint-components/p-1513309d.entry.js +0 -1
- package/dist/mint-components/p-19ccb4ce.js +0 -1
- package/dist/mint-components/p-1fa9ed0d.system.entry.js +0 -1
- package/dist/mint-components/p-217514ac.system.js +0 -1
- package/dist/mint-components/p-229f797b.js +0 -1
- package/dist/mint-components/p-24db5c70.js +0 -1
- package/dist/mint-components/p-26468242.js +0 -1
- package/dist/mint-components/p-275b4767.entry.js +0 -1
- package/dist/mint-components/p-284e4ed5.entry.js +0 -1
- package/dist/mint-components/p-2c07df76.entry.js +0 -144
- package/dist/mint-components/p-2dca9e1a.system.js +0 -1
- package/dist/mint-components/p-2e110002.system.js +0 -1
- package/dist/mint-components/p-33c96e14.entry.js +0 -16
- package/dist/mint-components/p-38e5c429.system.js +0 -1
- package/dist/mint-components/p-38fc919b.entry.js +0 -1
- package/dist/mint-components/p-3a49811c.js +0 -1
- package/dist/mint-components/p-3db34d68.js +0 -1
- package/dist/mint-components/p-420554af.system.entry.js +0 -1
- package/dist/mint-components/p-4428294b.entry.js +0 -1
- package/dist/mint-components/p-48135f99.system.js +0 -53
- package/dist/mint-components/p-4874193a.system.js +0 -1
- package/dist/mint-components/p-49206a9c.entry.js +0 -1
- package/dist/mint-components/p-49deb225.entry.js +0 -1
- package/dist/mint-components/p-4e5af50c.js +0 -1
- package/dist/mint-components/p-51495bc3.entry.js +0 -13
- package/dist/mint-components/p-5ca8959a.system.entry.js +0 -1
- package/dist/mint-components/p-5dbe8b0a.system.js +0 -1
- package/dist/mint-components/p-6055eb4c.system.js +0 -1
- package/dist/mint-components/p-635d5ef2.system.js +0 -1
- package/dist/mint-components/p-6427e963.entry.js +0 -1
- package/dist/mint-components/p-65ba9e94.entry.js +0 -1
- package/dist/mint-components/p-6b7a595f.system.js +0 -1
- package/dist/mint-components/p-6cd4f2b1.system.js +0 -1
- package/dist/mint-components/p-6eaf9c57.entry.js +0 -1
- package/dist/mint-components/p-6f34c2c2.entry.js +0 -13
- package/dist/mint-components/p-734695a0.entry.js +0 -205
- package/dist/mint-components/p-775f3ded.entry.js +0 -1
- package/dist/mint-components/p-7ab21e4d.entry.js +0 -1
- package/dist/mint-components/p-7e3a84bc.js +0 -1
- package/dist/mint-components/p-7f1e10d3.entry.js +0 -9
- package/dist/mint-components/p-802b9f7e.entry.js +0 -1
- package/dist/mint-components/p-8053366e.system.entry.js +0 -1
- package/dist/mint-components/p-837dbf90.system.entry.js +0 -1
- package/dist/mint-components/p-893d7ab4.js +0 -1
- package/dist/mint-components/p-8abfeff8.entry.js +0 -1
- package/dist/mint-components/p-8b36fe4f.entry.js +0 -258
- package/dist/mint-components/p-8c12078e.js +0 -394
- package/dist/mint-components/p-8c23d1b8.js +0 -1
- package/dist/mint-components/p-8c494bf1.js +0 -1
- package/dist/mint-components/p-8d9d04b7.system.entry.js +0 -1
- package/dist/mint-components/p-90421929.system.entry.js +0 -1
- package/dist/mint-components/p-91521e9d.js +0 -1
- package/dist/mint-components/p-92816d1f.js +0 -1
- package/dist/mint-components/p-93fed35b.system.js +0 -1
- package/dist/mint-components/p-94a876b9.js +0 -1
- package/dist/mint-components/p-97d4d651.system.js +0 -1
- package/dist/mint-components/p-98698131.js +0 -1
- package/dist/mint-components/p-9acb5038.js +0 -1
- package/dist/mint-components/p-9cf80e85.system.entry.js +0 -1
- package/dist/mint-components/p-a8645c1b.system.js +0 -1
- package/dist/mint-components/p-bd2a2546.system.js +0 -1
- package/dist/mint-components/p-bdbbc673.system.entry.js +0 -1
- package/dist/mint-components/p-bfc7cfc0.system.js +0 -1
- package/dist/mint-components/p-c060f770.system.entry.js +0 -1
- package/dist/mint-components/p-c36506f6.system.entry.js +0 -1
- package/dist/mint-components/p-c3680c02.js +0 -1
- package/dist/mint-components/p-c6841ab8.system.entry.js +0 -1
- package/dist/mint-components/p-ccb5699b.js +0 -1
- package/dist/mint-components/p-cd1d497f.system.js +0 -1
- package/dist/mint-components/p-cd63a965.system.entry.js +0 -1
- package/dist/mint-components/p-cd651f81.js +0 -42
- package/dist/mint-components/p-d8cf46ba.system.js +0 -1
- package/dist/mint-components/p-dcc81e90.entry.js +0 -1
- package/dist/mint-components/p-df89186f.system.js +0 -1
- package/dist/mint-components/p-e01fe915.js +0 -1248
- package/dist/mint-components/p-e6f50ffd.entry.js +0 -1
- package/dist/mint-components/p-e8ffcc68.entry.js +0 -11
- package/dist/mint-components/p-eab1c9f3.js +0 -1
- package/dist/mint-components/p-ed11966d.system.js +0 -1
- package/dist/mint-components/p-eda5e82c.entry.js +0 -1
- package/dist/mint-components/p-f2228da3.system.entry.js +0 -1
- package/dist/mint-components/p-f26aedcd.system.js +0 -1
- package/dist/mint-components/p-f2d8d3d3.system.entry.js +0 -1
- package/dist/mint-components/p-f708da7b.js +0 -1
- package/dist/mint-components/p-fd0a013f.entry.js +0 -1
- package/dist/types/components/sqm-asset-card/AssetCard.stories.d.ts +0 -7
- package/dist/types/components/sqm-asset-card/sqm-asset-card-view.d.ts +0 -8
- package/dist/types/components/sqm-asset-card/sqm-asset-card.d.ts +0 -24
- package/dist/types/components/sqm-asset-card/useAssetCard.d.ts +0 -7
- /package/dist/collection/components/tax-and-cash/{sqm-tax-and-cash/data.js → data.js} +0 -0
- /package/dist/types/components/tax-and-cash/{sqm-tax-and-cash/data.d.ts → data.d.ts} +0 -0
|
@@ -1,21 +1,63 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const index = require('./index-
|
|
4
|
-
const
|
|
5
|
-
const
|
|
6
|
-
const index_module = require('./index.module-
|
|
3
|
+
const index = require('./index-a43a63b4.js');
|
|
4
|
+
const global = require('./global-6ee8a4bb.js');
|
|
5
|
+
const domContextHooks_module = require('./dom-context-hooks.module-7fa676ae.js');
|
|
6
|
+
const index_module = require('./index.module-4f54e412.js');
|
|
7
7
|
const cjs = require('./cjs-1066ec21.js');
|
|
8
8
|
const utils = require('./utils-6847bc06.js');
|
|
9
9
|
const JSS = require('./JSS-8503a151.js');
|
|
10
|
-
const useReferralCodes = require('./useReferralCodes-
|
|
11
|
-
const mixins = require('./mixins-
|
|
12
|
-
const copyTextView = require('./copy-text-view-
|
|
13
|
-
const useChildElements = require('./useChildElements-
|
|
14
|
-
const luxon = require('./luxon-
|
|
15
|
-
const sqmTextSpanView = require('./sqm-text-span-view-
|
|
10
|
+
const useReferralCodes = require('./useReferralCodes-11cdf43b.js');
|
|
11
|
+
const mixins = require('./mixins-4761d472.js');
|
|
12
|
+
const copyTextView = require('./copy-text-view-95cf4875.js');
|
|
13
|
+
const useChildElements = require('./useChildElements-966c9041.js');
|
|
14
|
+
const luxon = require('./luxon-949beaf2.js');
|
|
15
|
+
const sqmTextSpanView = require('./sqm-text-span-view-7a61ae4c.js');
|
|
16
16
|
const index$1 = require('./index-8c6255f5.js');
|
|
17
|
-
const utilities = require('./utilities-
|
|
18
|
-
const sqmPortalContainerView = require('./sqm-portal-container-view-
|
|
17
|
+
const utilities = require('./utilities-9a0c5e91.js');
|
|
18
|
+
const sqmPortalContainerView = require('./sqm-portal-container-view-07e4343f.js');
|
|
19
|
+
|
|
20
|
+
function BigStatView(props) {
|
|
21
|
+
const { statvalue, flexReverse, alignment, statTextColor, statFontSize, descriptionTextColor, descriptionFontSize, statFontWeight, } = props;
|
|
22
|
+
// Dependent on props, not feasible to move out
|
|
23
|
+
const style = {
|
|
24
|
+
Container: {
|
|
25
|
+
display: "flex",
|
|
26
|
+
// height: "inherit",
|
|
27
|
+
// "justify-content": "space-between",
|
|
28
|
+
"flex-direction": `${flexReverse ? "column-reverse" : "column"}`,
|
|
29
|
+
"align-items": `${alignment === "left"
|
|
30
|
+
? "flex-start"
|
|
31
|
+
: alignment === "right"
|
|
32
|
+
? "flex-end"
|
|
33
|
+
: "center"}`,
|
|
34
|
+
},
|
|
35
|
+
Stat: {
|
|
36
|
+
"font-size": statFontSize
|
|
37
|
+
? `${statFontSize}px`
|
|
38
|
+
: "var(--sl-font-size-xx-large)",
|
|
39
|
+
"text-align": alignment,
|
|
40
|
+
color: statTextColor || "var(--sqm-text)",
|
|
41
|
+
lineHeight: "35px",
|
|
42
|
+
fontWeight: statFontWeight || "var(--sl-font-weight-normal)",
|
|
43
|
+
},
|
|
44
|
+
Description: {
|
|
45
|
+
"font-size": descriptionFontSize
|
|
46
|
+
? `${descriptionFontSize}px`
|
|
47
|
+
: "var(--sl-font-size-small)",
|
|
48
|
+
"font-weight": "var(--sl-font-weight-normal)",
|
|
49
|
+
color: descriptionTextColor || "var(--sqm-text)",
|
|
50
|
+
"text-align": alignment,
|
|
51
|
+
lineHeight: "20px",
|
|
52
|
+
},
|
|
53
|
+
};
|
|
54
|
+
const sheet = JSS.createStyleSheet(style);
|
|
55
|
+
const styleString = sheet.toString();
|
|
56
|
+
return (index.h("div", { part: "stat-wrapper", class: sheet.classes.Container },
|
|
57
|
+
index.h("style", { type: "text/css" }, styleString),
|
|
58
|
+
index.h("div", { part: "stat-value", class: sheet.classes.Stat }, statvalue),
|
|
59
|
+
index.h("div", { part: "stat-description", class: sheet.classes.Description }, props.labelSlot)));
|
|
60
|
+
}
|
|
19
61
|
|
|
20
62
|
const medium = {
|
|
21
63
|
facebook: { color: "#1877f2", text: "#fff", icon: "facebook" },
|
|
@@ -40,15 +82,30 @@ const style = {
|
|
|
40
82
|
};
|
|
41
83
|
const sheet = JSS.createStyleSheet(style);
|
|
42
84
|
const styleString = sheet.toString();
|
|
85
|
+
// TODO: Figure out hover and active states
|
|
86
|
+
// *::part(base):hover {
|
|
87
|
+
// border-color: ${
|
|
88
|
+
// props.backgroundcolor
|
|
89
|
+
// ? props.backgroundcolor
|
|
90
|
+
// : props.medium
|
|
91
|
+
// ? medium[props.medium].color
|
|
92
|
+
// : ""
|
|
93
|
+
// }!important;
|
|
94
|
+
// }
|
|
95
|
+
// *::part(base):focus {
|
|
96
|
+
// border-color: ${
|
|
97
|
+
// props.backgroundcolor
|
|
98
|
+
// ? props.backgroundcolor
|
|
99
|
+
// : props.medium
|
|
100
|
+
// ? medium[props.medium].color
|
|
101
|
+
// : ""
|
|
102
|
+
// }!important;
|
|
103
|
+
// }
|
|
43
104
|
function ShareButtonView(props, children) {
|
|
44
105
|
const vanillaStyle = `
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
? props.backgroundcolor
|
|
49
|
-
: props.medium
|
|
50
|
-
? medium[props.medium].color
|
|
51
|
-
: ""}80!important;
|
|
106
|
+
sl-button::part(base) {
|
|
107
|
+
border: ${props.border || "none"};
|
|
108
|
+
|
|
52
109
|
|
|
53
110
|
background: ${props.backgroundcolor
|
|
54
111
|
? props.backgroundcolor
|
|
@@ -63,21 +120,7 @@ function ShareButtonView(props, children) {
|
|
|
63
120
|
border-radius: ${props.borderradius ? props.borderradius + "px" : ""};
|
|
64
121
|
}
|
|
65
122
|
|
|
66
|
-
*::part(base):hover {
|
|
67
|
-
border-color: ${props.backgroundcolor
|
|
68
|
-
? props.backgroundcolor
|
|
69
|
-
: props.medium
|
|
70
|
-
? medium[props.medium].color
|
|
71
|
-
: ""}D1!important;
|
|
72
|
-
}
|
|
73
123
|
|
|
74
|
-
*::part(base):focus {
|
|
75
|
-
border-color: ${props.backgroundcolor
|
|
76
|
-
? props.backgroundcolor
|
|
77
|
-
: props.medium
|
|
78
|
-
? medium[props.medium].color
|
|
79
|
-
: ""}D1!important;
|
|
80
|
-
}
|
|
81
124
|
|
|
82
125
|
*::part(label) {
|
|
83
126
|
position: relative;
|
|
@@ -87,490 +130,238 @@ function ShareButtonView(props, children) {
|
|
|
87
130
|
return props.hide ? (index.h(index.Host, { style: { display: "none" } })) : (index.h("div", null,
|
|
88
131
|
index.h("style", { type: "text/css" }, styleString),
|
|
89
132
|
index.h("style", { type: "text/css" }, vanillaStyle),
|
|
90
|
-
index.h("sl-button", { class: sheet.classes.buttonStyle, target: props.openInSameTab ? "_self" : "_blank", loading: props.loading, disabled: props.disabled, pill: props.pill, size: props.size, type: props.type, onClick: !props.isPlainLink ? props.onClick : undefined, href: props.isPlainLink ? props.messageLink : undefined, exportparts: `base: ${props.type}
|
|
133
|
+
index.h("sl-button", { class: sheet.classes.buttonStyle, target: props.openInSameTab ? "_self" : "_blank", loading: props.loading, disabled: props.disabled, pill: props.pill, size: props.size, type: props.type, onClick: !props.isPlainLink ? props.onClick : undefined, href: props.isPlainLink ? props.messageLink : undefined, exportparts: `base: ${props.type}button-base` },
|
|
91
134
|
!props.hideicon && (index.h("sl-icon", { slot: props.iconslot || "prefix", name: props.icon ? props.icon : medium[props.medium].icon, exportparts: "base: icon" })),
|
|
92
135
|
!props.hidetext && children)));
|
|
93
136
|
}
|
|
94
137
|
|
|
95
|
-
function
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
138
|
+
function StatContainerView(props, children) {
|
|
139
|
+
const divideSpace = () => {
|
|
140
|
+
const spaceValue = getComputedStyle(document.documentElement).getPropertyValue(`--sl-spacing-${props.space}`);
|
|
141
|
+
return `${Math.floor(parseInt(spaceValue) / 2)}rem`;
|
|
142
|
+
};
|
|
143
|
+
// take alignment variable and convert it to CSS flexbox alignment
|
|
144
|
+
const alignment = props.alignment === "center"
|
|
145
|
+
? "center"
|
|
146
|
+
: props.alignment === "right"
|
|
147
|
+
? "flex-end"
|
|
148
|
+
: "flex-start";
|
|
149
|
+
// Dependent on props, not feasible to move out
|
|
99
150
|
const style = {
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
},
|
|
115
|
-
"& td": {
|
|
116
|
-
fontSize: "var(--sl-font-size-medium)",
|
|
117
|
-
fontWeight: "var(--sl-font-weight-normal)",
|
|
118
|
-
},
|
|
119
|
-
"& .ellipses": {
|
|
120
|
-
textAlign: "left",
|
|
121
|
-
padding: "0",
|
|
122
|
-
color: "var(--sqm-text)",
|
|
123
|
-
paddingLeft: "25%",
|
|
124
|
-
},
|
|
125
|
-
"& .highlight": {
|
|
126
|
-
background: styles.viewingUserhighlightColor || "var(--sl-color-primary-100)",
|
|
127
|
-
},
|
|
128
|
-
"& td, th": {
|
|
129
|
-
color: "var(--sqm-text)",
|
|
130
|
-
padding: "var(--sl-spacing-medium)",
|
|
151
|
+
StatContainer: {
|
|
152
|
+
width: "100%",
|
|
153
|
+
display: "flex",
|
|
154
|
+
flexWrap: "wrap",
|
|
155
|
+
alignItems: "center",
|
|
156
|
+
justifyContent: alignment,
|
|
157
|
+
flexDirection: "row",
|
|
158
|
+
gap: `var(--sl-spacing-${props.gap})`,
|
|
159
|
+
// Apply border styles conditionally based on the hideBorder prop
|
|
160
|
+
"& > *": {
|
|
161
|
+
"border-right": props.hideBorder
|
|
162
|
+
? "none"
|
|
163
|
+
: "1px solid var(--sqm-text-subdued)",
|
|
164
|
+
"padding-right": divideSpace(),
|
|
131
165
|
},
|
|
132
|
-
"&
|
|
133
|
-
|
|
166
|
+
"& > :last-child": {
|
|
167
|
+
"border-right": "none",
|
|
134
168
|
},
|
|
135
|
-
"&
|
|
136
|
-
|
|
137
|
-
|
|
169
|
+
"& > ::slotted(*)": {
|
|
170
|
+
"border-right": props.hideBorder
|
|
171
|
+
? "none"
|
|
172
|
+
: "1px solid var(--sqm-text-subdued)",
|
|
173
|
+
"padding-right": divideSpace(),
|
|
138
174
|
},
|
|
139
|
-
"&
|
|
140
|
-
|
|
175
|
+
"& > ::slotted(*:last-child)": {
|
|
176
|
+
"border-right": "none",
|
|
141
177
|
},
|
|
142
|
-
"
|
|
143
|
-
|
|
178
|
+
"@media screen and (max-width: 430px)": {
|
|
179
|
+
"& > ::slotted(*)": {
|
|
180
|
+
borderRight: "none",
|
|
181
|
+
},
|
|
144
182
|
},
|
|
145
183
|
},
|
|
184
|
+
StatFrame: {
|
|
185
|
+
display: "flex",
|
|
186
|
+
},
|
|
187
|
+
BorderFix: {
|
|
188
|
+
"border-right": "1px solid transparent",
|
|
189
|
+
width: "0px",
|
|
190
|
+
"margin-left": "-1px",
|
|
191
|
+
},
|
|
146
192
|
};
|
|
147
193
|
const sheet = JSS.createStyleSheet(style);
|
|
148
194
|
const styleString = sheet.toString();
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
if (states.isEssentials) {
|
|
155
|
-
return (index.h("sqm-empty", { "empty-state-image": "https://res.cloudinary.com/saasquatch/image/upload/v1715360191/squatch-assets/Leaderboard_Not_Available.svg", "empty-state-header": "Leaderboards aren\u2019t available on your plan", "empty-state-text": "Contact {supportText} to upgrade your plan and start leveraging gamification in your program.", "support-text": "Support" }));
|
|
156
|
-
}
|
|
157
|
-
if (states.loading) {
|
|
158
|
-
return (index.h("div", { class: sheet.classes.Leaderboard, style: { width: styles.width || "100%" } },
|
|
159
|
-
index.h("style", { type: "text/css" },
|
|
160
|
-
styleString,
|
|
161
|
-
vanillaStyle),
|
|
162
|
-
index.h("table", null, [...Array(10)].map(() => {
|
|
163
|
-
return (index.h("tr", null,
|
|
164
|
-
index.h("td", null,
|
|
165
|
-
index.h("sl-skeleton", null))));
|
|
166
|
-
}))));
|
|
167
|
-
}
|
|
168
|
-
if (!states.hasLeaders)
|
|
169
|
-
return elements.empty;
|
|
170
|
-
let userSeenFlag = false;
|
|
171
|
-
const getUsersName = (user) => {
|
|
172
|
-
if (!user.firstName && !user.lastInitial)
|
|
173
|
-
return styles.anonymousUser;
|
|
174
|
-
const { firstName, lastInitial } = user;
|
|
175
|
-
if (firstName && lastInitial)
|
|
176
|
-
return `${firstName} ${lastInitial}`;
|
|
177
|
-
if (firstName || lastInitial)
|
|
178
|
-
return firstName || lastInitial;
|
|
179
|
-
return styles.anonymousUser;
|
|
180
|
-
};
|
|
181
|
-
const getRankCellText = (userRank, isViewingUsersRow) => {
|
|
182
|
-
if (!userRank) {
|
|
183
|
-
return styles.hideNames ? `${styles.viewingUserText}` : "-";
|
|
184
|
-
}
|
|
185
|
-
const viewingUserText = ` - ${styles.viewingUserText}`;
|
|
186
|
-
return styles.rankSuffix
|
|
187
|
-
? global.intl.formatMessage({
|
|
188
|
-
id: "rank",
|
|
189
|
-
defaultMessage: styles.rankSuffix,
|
|
190
|
-
}, {
|
|
191
|
-
rank: userRank,
|
|
192
|
-
}) + `${isViewingUsersRow && styles.hideNames ? viewingUserText : ""}`
|
|
193
|
-
: `${userRank} ${isViewingUsersRow && styles.hideNames ? viewingUserText : ""}`;
|
|
194
|
-
};
|
|
195
|
-
return (index.h("div", { class: sheet.classes.Leaderboard, part: "sqm-base", style: { width: styles.width || "100%" } },
|
|
196
|
-
index.h("style", { type: "text/css" },
|
|
197
|
-
styleString,
|
|
198
|
-
vanillaStyle),
|
|
199
|
-
index.h("table", { part: "sqm-table" },
|
|
200
|
-
index.h("tr", null,
|
|
201
|
-
styles.showRank && (index.h("th", { class: `Rank ${styles.hideNames ? "fullWidth" : ""}` }, styles.rankheading)),
|
|
202
|
-
!styles.hideNames && index.h("th", { class: "User" }, styles.usersheading),
|
|
203
|
-
index.h("th", { class: "Score" }, styles.statsheading)), (_a = data.leaderboard) === null || _a === void 0 ? void 0 :
|
|
204
|
-
_a.map((user) => {
|
|
205
|
-
var _a, _b;
|
|
206
|
-
if (user.rowNumber === ((_a = data.viewerRank) === null || _a === void 0 ? void 0 : _a.rowNumber))
|
|
207
|
-
userSeenFlag = true;
|
|
208
|
-
const isViewingUsersRow = !styles.hideViewer && user.rowNumber === ((_b = data.viewerRank) === null || _b === void 0 ? void 0 : _b.rowNumber);
|
|
209
|
-
return (index.h("tr", { class: isViewingUsersRow ? "highlight" : "" },
|
|
210
|
-
styles.showRank && (index.h("td", { class: "Rank" }, getRankCellText(user.rank, isViewingUsersRow))),
|
|
211
|
-
!styles.hideNames && index.h("td", { class: "User" }, getUsersName(user)),
|
|
212
|
-
index.h("td", { class: "Score" }, user.textValue)));
|
|
213
|
-
}),
|
|
214
|
-
!userSeenFlag && !styles.hideViewer && (index.h("tr", null,
|
|
215
|
-
index.h("td", { colSpan: 100, class: "ellipses" },
|
|
216
|
-
index.h("sl-icon", { name: "three-dots", style: { verticalAlign: "middle" } })))),
|
|
217
|
-
!userSeenFlag && !styles.hideViewer && (index.h("tr", { class: "highlight" },
|
|
218
|
-
styles.showRank && (index.h("td", { class: "Rank" }, getRankCellText((_b = data.viewerRank) === null || _b === void 0 ? void 0 : _b.rank, true))),
|
|
219
|
-
!styles.hideNames && (index.h("td", { class: "User" }, getUsersName(data.viewerRank || {}))),
|
|
220
|
-
index.h("td", { class: "Score" }, ((_c = data.viewerRank) === null || _c === void 0 ? void 0 : _c.textValue) || "0"))))));
|
|
195
|
+
return (index.h("div", { class: sheet.classes.StatFrame, part: "sqm-base" },
|
|
196
|
+
index.h("div", { class: sheet.classes.StatContainer, part: "sqm-inner-container" },
|
|
197
|
+
index.h("style", { type: "text/css" }, styleString),
|
|
198
|
+
children),
|
|
199
|
+
index.h("div", { class: sheet.classes.BorderFix, part: "sqm-border" })));
|
|
221
200
|
}
|
|
222
201
|
|
|
223
|
-
function
|
|
224
|
-
const {
|
|
225
|
-
// Dependent on props, not feasiable to move out
|
|
202
|
+
function PortalChangePasswordView(props) {
|
|
203
|
+
const { states, callbacks } = props;
|
|
226
204
|
const style = {
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
:
|
|
235
|
-
|
|
236
|
-
|
|
205
|
+
Dialog: {
|
|
206
|
+
padding: "0",
|
|
207
|
+
"&::part(panel)": {
|
|
208
|
+
background: "var(--sqm-portal-background)",
|
|
209
|
+
borderRadius: "var(--sqm-border-radius-normal, var(--sl-border-radius-medium))",
|
|
210
|
+
},
|
|
211
|
+
"&::part(close-button)": {
|
|
212
|
+
"margin-top": "var(--sl-spacing-medium)",
|
|
213
|
+
},
|
|
214
|
+
"&::part(body)": {
|
|
215
|
+
padding: "0 var(--sl-spacing-x-large) var(--sl-spacing-x-large) var(--sl-spacing-x-large)",
|
|
216
|
+
},
|
|
237
217
|
},
|
|
238
|
-
|
|
239
|
-
"
|
|
240
|
-
|
|
218
|
+
Error: {
|
|
219
|
+
"&::part(erroralert-base)": {
|
|
220
|
+
"margin-bottom": "15px",
|
|
221
|
+
},
|
|
241
222
|
},
|
|
242
|
-
|
|
243
|
-
"
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
223
|
+
Success: {
|
|
224
|
+
"&::part(successalert-base)": {
|
|
225
|
+
"margin-bottom": "15px",
|
|
226
|
+
},
|
|
227
|
+
},
|
|
228
|
+
InputContainer: {
|
|
229
|
+
"& > :not(:last-child)": {
|
|
230
|
+
"margin-bottom": "var(--sl-spacing-x-large)",
|
|
231
|
+
},
|
|
232
|
+
},
|
|
233
|
+
CancelButton: {
|
|
234
|
+
margin: "var(--sl-spacing-large) auto",
|
|
235
|
+
width: "100%",
|
|
236
|
+
},
|
|
237
|
+
PasswordField: {
|
|
238
|
+
marginBottom: "var(--sl-spacing-large) !important",
|
|
239
|
+
display: "block",
|
|
240
|
+
},
|
|
241
|
+
ChangePasswordButton: {
|
|
242
|
+
paddingTop: "var(--sl-spacing-x-large)",
|
|
247
243
|
},
|
|
248
244
|
};
|
|
249
245
|
const sheet = JSS.createStyleSheet(style);
|
|
250
246
|
const styleString = sheet.toString();
|
|
251
|
-
return (index.h("div",
|
|
247
|
+
return (index.h("div", null,
|
|
252
248
|
index.h("style", { type: "text/css" }, styleString),
|
|
253
|
-
index.h("
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
"box-sizing": "border-box",
|
|
279
|
-
display: "flex",
|
|
280
|
-
"justify-content": "space-between",
|
|
281
|
-
padding: "var(--sl-spacing-small) var(--sl-spacing-large)",
|
|
282
|
-
"align-items": "center",
|
|
283
|
-
"background-color": "var(--sqm-header-background)",
|
|
284
|
-
"@media screen and (max-width: 499px)": {
|
|
285
|
-
"flex-direction": "row-reverse",
|
|
286
|
-
"justify-content": "flex-end",
|
|
287
|
-
padding: "0",
|
|
288
|
-
},
|
|
289
|
-
},
|
|
290
|
-
};
|
|
291
|
-
const sheet$1 = JSS.createStyleSheet(style$1);
|
|
292
|
-
const styleString$1 = sheet$1.toString();
|
|
293
|
-
function PortalFrameView(props, children) {
|
|
294
|
-
const { data, notFullScreen } = props;
|
|
295
|
-
return (index.h("div", { style: { minHeight: notFullScreen ? "100%" : "100vh" }, class: sheet$1.classes.Frame, part: "sqm-base" },
|
|
296
|
-
index.h("style", { type: "text/css" }, styleString$1),
|
|
297
|
-
index.h("div", { class: sheet$1.classes.HeaderWrapper, part: "sqm-header" },
|
|
298
|
-
data.header,
|
|
299
|
-
index.h("slot", { name: "sqm-navigation-menu" })),
|
|
300
|
-
children,
|
|
301
|
-
index.h("div", { class: sheet$1.classes.FooterWrapper, part: "sqm-footer" }, data.footer)));
|
|
249
|
+
index.h("sl-dialog", { class: sheet.classes.Dialog, open: states.open, "onSl-hide": () => callbacks.setOpen(false) },
|
|
250
|
+
index.h(sqmPortalContainerView.PortalSectionView, Object.assign({}, {
|
|
251
|
+
labelMargin: "x-large",
|
|
252
|
+
padding: "none",
|
|
253
|
+
label: (index.h(sqmTextSpanView.TextSpanView, Object.assign({}, { type: "h2" }), states.content.modalChangePasswordHeader)),
|
|
254
|
+
content: (index.h(sqmPortalContainerView.PortalContainerView, Object.assign({}, { direction: "column", padding: "none", gap: "32px" }),
|
|
255
|
+
states.error && (index.h("sqm-form-message", { class: sheet.classes.Error, type: "error", exportparts: "erroralert-icon" },
|
|
256
|
+
index.h("div", { part: "erroralert-text" }, states.error))),
|
|
257
|
+
states.success && (index.h("sqm-form-message", { class: sheet.classes.Success, type: "success", exportparts: "successalert-icon" },
|
|
258
|
+
index.h("div", { part: "successalert-text" }, states.content.successMessage))),
|
|
259
|
+
index.h("sl-form", { "onSl-submit": callbacks.submit },
|
|
260
|
+
index.h("div", { class: sheet.classes.InputContainer },
|
|
261
|
+
index.h("sqm-password-field", { exportparts: "input-label: input-label", class: sheet.classes.PasswordField, fieldLabel: states.content.passwordFieldLabel, meetsRequirementsText: states.content.meetsRequirementsText, doesNotMeetRequirementsText: states.content.doesNotMeetRequirementsText, minErrorText: states.content.minErrorText, uppercaseErrorText: states.content.uppercaseErrorText, lowercaseErrorText: states.content.lowercaseErrorText, hasErrorText: states.content.hasErrorText }),
|
|
262
|
+
index.h("sl-input", { exportparts: "label: input-label, base: input-base", name: "/confirmPassword", label: states.content.confirmPasswordFieldLabel, required: true, togglePassword: true, disabled: states.loading, type: "password" })),
|
|
263
|
+
index.h(sqmPortalContainerView.PortalContainerView, Object.assign({}, { direction: "row", padding: "none", gap: "20px" }),
|
|
264
|
+
index.h("sl-button", { class: sheet.classes.ChangePasswordButton, type: "primary", exportparts: "base: primarybutton-base", submit: true, loading: states.loading }, states.content.changePasswordButtonText),
|
|
265
|
+
index.h("sl-button", { class: sheet.classes.CancelButton, type: "secondary", exportparts: "base: secondarybutton-base", onClick: () => callbacks.setOpen(false) }, states.content.cancelText))))),
|
|
266
|
+
}))),
|
|
267
|
+
index.h(sqmPortalContainerView.PortalSectionView, Object.assign({}, {
|
|
268
|
+
labelMargin: "x-large",
|
|
269
|
+
padding: "xxx-large",
|
|
270
|
+
label: (index.h(sqmTextSpanView.TextSpanView, Object.assign({}, { type: "h2" }), states.content.portalChangePasswordHeader)),
|
|
271
|
+
content: (index.h("sl-button", { type: "primary", exportparts: "base: primarybutton-base", onClick: () => callbacks.setOpen(true) }, states.content.portalChangePasswordButtonText)),
|
|
272
|
+
}),
|
|
273
|
+
index.h("style", { type: "text/css" }, styleString))));
|
|
302
274
|
}
|
|
303
275
|
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
276
|
+
function PoweredByImg({ color = "#A6A6A6", width = 120, height = 16, }) {
|
|
277
|
+
return (index.h("svg", { width: width, height: height, viewBox: "0 0 1662 254", fill: "none", xmlns: "http://www.w3.org/2000/svg" },
|
|
278
|
+
index.h("path", { d: "M801.082 253.58L869.382 1.67969", stroke: color, "stroke-width": "3" }),
|
|
279
|
+
index.h("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M125.682 42.48C123.882 42.48 121.982 42.78 120.382 43.48C118.682 44.18 117.182 45.18 115.882 46.48C114.582 47.68 113.582 49.28 112.882 50.98C112.182 52.68 111.882 54.48 111.982 56.28C112.282 59.68 113.882 63.08 116.382 65.38C118.982 67.78 122.382 68.98 125.782 68.98C129.282 68.98 132.682 67.58 135.182 65.38C137.782 62.98 139.382 59.78 139.582 56.28C139.582 54.38 139.282 52.68 138.682 50.98C137.982 49.28 136.982 47.78 135.682 46.48C134.382 45.18 132.882 44.18 131.182 43.48C129.282 42.78 127.582 42.48 125.682 42.48Z", fill: color }),
|
|
280
|
+
index.h("path", { d: "M135.882 89.2798H115.582V187.58H135.882V89.2798Z", fill: color }),
|
|
281
|
+
index.h("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M231.481 104.18C238.781 93.4799 251.181 87.3799 266.281 87.3799C290.981 87.3799 307.581 103.28 307.381 127.08V187.48H286.781V132.38C286.781 116.38 278.281 107.18 263.381 107.18C248.481 107.18 237.981 117.68 237.981 132.68V187.48H217.281V132.38C217.281 116.38 208.781 107.18 193.881 107.18C178.981 107.18 168.481 117.68 168.481 132.68V187.48H147.981V89.3799H168.681V97.8799C178.081 88.8799 190.181 87.4799 197.081 87.4799C211.881 87.4799 224.381 93.5799 231.481 104.18Z", fill: color }),
|
|
282
|
+
index.h("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M370.781 87.48C358.581 87.48 347.981 91.38 339.981 98.38V89.28H319.481V226.08H339.981V177.78C347.881 185.08 358.581 188.78 370.781 188.78C398.781 188.78 419.881 166.88 419.881 138.08C419.981 109.28 398.781 87.48 370.781 87.48ZM368.881 169.58C351.481 169.58 338.881 156.38 338.881 138.28C338.881 120.38 351.381 106.98 368.881 106.98C386.281 106.98 398.881 120.08 398.881 138.28C398.881 156.48 386.381 169.58 368.881 169.58Z", fill: color }),
|
|
283
|
+
index.h("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M701.782 169.88C707.682 169.88 714.082 167.58 719.582 163.98L721.482 162.88L731.482 178.68L729.782 179.88C721.282 186.28 710.982 189.58 700.382 189.58C678.082 189.58 665.782 176.38 665.782 152.28V108.68H645.682V89.3799H665.782V59.8799H686.482V89.2798H725.682V108.48H686.482V151.88C686.482 163.38 691.982 169.88 701.782 169.88Z", fill: color }),
|
|
284
|
+
index.h("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M551.282 239.88C549.982 239.88 548.782 240.28 547.682 240.88C546.682 241.58 545.782 242.58 545.382 243.68C544.882 244.78 544.782 246.08 545.082 247.28C545.282 248.58 545.882 249.68 546.882 250.48C547.782 251.38 548.882 251.98 550.082 252.28C551.382 252.48 552.582 252.38 553.782 251.98C554.882 251.48 555.982 250.78 556.582 249.68C557.282 248.68 557.582 247.38 557.582 246.18C557.582 244.48 556.982 242.88 555.682 241.68C554.482 240.48 552.882 239.88 551.282 239.88Z", fill: color }),
|
|
285
|
+
index.h("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M586.182 210.78C592.282 210.78 597.582 213.08 601.082 217.18L601.482 217.68L596.282 223.08L595.782 222.58C594.482 221.18 593.082 220.18 591.382 219.48C589.682 218.78 587.882 218.38 586.082 218.48C578.882 218.48 573.682 224.08 573.682 231.58C573.682 239.18 578.882 244.78 586.082 244.78C589.782 244.68 593.282 243.18 595.882 240.58L596.382 240.08L601.382 245.68L600.982 246.08C597.182 250.18 591.982 252.18 586.082 252.18C574.082 252.18 565.382 243.58 565.382 231.58C565.582 219.48 574.182 210.78 586.182 210.78Z", fill: color }),
|
|
286
|
+
index.h("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M633.782 210.78C621.682 210.78 612.582 219.68 612.582 231.38C612.582 243.08 621.682 251.98 633.782 251.98C645.882 251.98 654.882 243.08 654.882 231.38C655.082 219.78 645.982 210.78 633.782 210.78ZM633.782 244.78C626.382 244.78 620.782 239.28 620.782 231.58C620.782 223.88 626.182 218.48 633.782 218.48C641.182 218.48 646.782 224.08 646.782 231.58C646.782 238.98 641.382 244.78 633.782 244.78Z", fill: color }),
|
|
287
|
+
index.h("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M723.982 228.78C723.982 222.18 720.382 218.28 714.082 218.28C707.682 218.28 703.382 222.78 702.982 228.98V252.18H695.082V228.68C695.082 222.08 691.482 218.18 685.182 218.18C680.082 218.18 674.482 221.48 674.482 228.88V252.08H666.582V211.38H674.482V214.78L676.682 213.28C679.582 211.38 683.082 210.48 686.582 210.48C692.082 210.48 696.782 212.48 699.882 216.08L700.882 217.28L701.882 216.08C704.782 212.48 709.582 210.48 715.182 210.48C725.082 210.48 731.982 217.08 731.982 226.38V251.88H724.082V228.68H723.982V228.78Z", fill: color }),
|
|
288
|
+
index.h("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M511.681 89.4797V98.7797C503.681 91.4797 493.181 87.6797 480.981 87.6797C452.981 87.6797 431.981 109.68 431.981 138.68C431.981 167.78 453.081 189.68 480.981 189.68C493.181 189.68 503.681 185.78 511.681 178.38V187.68H532.381V89.4797H511.681ZM482.881 169.88C465.481 169.88 452.781 156.58 452.781 138.48C452.781 120.48 465.281 106.98 482.881 106.98C500.481 106.98 512.781 120.08 512.781 138.48C512.781 156.68 500.181 169.88 482.881 169.88Z", fill: color }),
|
|
289
|
+
index.h("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M595.281 107.08C604.181 107.08 611.781 110.38 618.781 116.98L620.481 118.68L633.981 104.58L632.581 102.98C623.781 92.98 610.781 87.48 595.781 87.48C565.981 87.48 544.481 109.08 544.481 138.48C544.481 167.98 565.981 189.48 595.781 189.48C610.481 189.48 623.681 183.98 632.581 174.08L633.981 172.58L620.981 158.18L619.281 159.88C612.481 166.48 603.981 169.98 595.481 169.98C578.381 169.98 565.681 156.68 565.681 138.58C565.581 120.58 577.881 107.08 595.281 107.08Z", fill: color }),
|
|
290
|
+
index.h("path", { d: "M135.882 89.2798H115.582V187.58H135.882V89.2798Z", fill: color }),
|
|
291
|
+
index.h("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M231.481 104.18C238.781 93.4799 251.181 87.3799 266.281 87.3799C290.981 87.3799 307.581 103.28 307.381 127.08V187.48H286.781V132.38C286.781 116.38 278.281 107.18 263.381 107.18C248.481 107.18 237.981 117.68 237.981 132.68V187.48H217.281V132.38C217.281 116.38 208.781 107.18 193.881 107.18C178.981 107.18 168.481 117.68 168.481 132.68V187.48H147.981V89.3799H168.681V97.8799C178.081 88.8799 190.181 87.4799 197.081 87.4799C211.881 87.4799 224.381 93.5799 231.481 104.18Z", fill: color }),
|
|
292
|
+
index.h("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M370.781 87.48C358.581 87.48 347.981 91.38 339.981 98.38V89.28H319.481V226.08H339.981V177.78C347.881 185.08 358.581 188.78 370.781 188.78C398.781 188.78 419.881 166.88 419.881 138.08C419.981 109.28 398.781 87.48 370.781 87.48ZM368.881 169.58C351.481 169.58 338.881 156.38 338.881 138.28C338.881 120.38 351.381 106.98 368.881 106.98C386.281 106.98 398.881 120.08 398.881 138.28C398.881 156.48 386.381 169.58 368.881 169.58Z", fill: color }),
|
|
293
|
+
index.h("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M701.782 169.88C707.682 169.88 714.082 167.58 719.582 163.98L721.482 162.88L731.482 178.68L729.782 179.88C721.282 186.28 710.982 189.58 700.382 189.58C678.082 189.58 665.782 176.38 665.782 152.28V108.68H645.682V89.3799H665.782V59.8799H686.482V89.2798H725.682V108.48H686.482V151.88C686.482 163.38 691.982 169.88 701.782 169.88Z", fill: color }),
|
|
294
|
+
index.h("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M511.681 89.4797V98.7797C503.681 91.4797 493.181 87.6797 480.981 87.6797C452.981 87.6797 431.981 109.68 431.981 138.68C431.981 167.78 453.081 189.68 480.981 189.68C493.181 189.68 503.681 185.78 511.681 178.38V187.68H532.381V89.4797H511.681ZM482.881 169.88C465.481 169.88 452.781 156.58 452.781 138.48C452.781 120.48 465.281 106.98 482.881 106.98C500.481 106.98 512.781 120.08 512.781 138.48C512.781 156.68 500.181 169.88 482.881 169.88Z", fill: color }),
|
|
295
|
+
index.h("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M595.281 107.08C604.181 107.08 611.781 110.38 618.781 116.98L620.481 118.68L633.981 104.58L632.581 102.98C623.781 92.98 610.781 87.48 595.781 87.48C565.981 87.48 544.481 109.08 544.481 138.48C544.481 167.98 565.981 189.48 595.781 189.48C610.481 189.48 623.681 183.98 632.581 174.08L633.981 172.58L620.981 158.18L619.281 159.88C612.481 166.48 603.981 169.98 595.481 169.98C578.381 169.98 565.681 156.68 565.681 138.58C565.581 120.58 577.881 107.08 595.281 107.08Z", fill: color }),
|
|
296
|
+
index.h("path", { d: "M34.6815 112.78C40.6815 112.78 46.5815 114.18 51.8815 116.68C57.2815 119.18 62.0815 122.78 65.9815 127.28C67.9815 122.68 69.0815 117.78 69.0815 112.88C69.0815 108.38 68.1815 103.88 66.4815 99.8799C64.6815 95.6799 62.1815 91.9799 58.9815 88.8799C55.7815 85.7799 51.9815 83.2799 47.7815 81.4799C43.5815 79.7799 39.0815 78.8799 34.5815 78.8799C30.0815 78.8799 25.5815 79.6799 21.3815 81.4799C17.1815 83.1799 13.3815 85.7799 10.1815 88.8799C6.98154 91.9799 4.48154 95.7799 2.68154 99.8799C0.881541 104.08 0.081543 108.38 0.081543 112.88C0.181543 117.88 1.18154 122.78 3.18154 127.28C7.08154 122.68 11.8815 119.18 17.1815 116.68C22.7815 113.98 28.7815 112.68 34.6815 112.78Z", fill: color }),
|
|
297
|
+
index.h("path", { d: "M69.1817 153.48C69.1817 146.68 67.1817 140.18 63.2817 134.48C59.4817 128.88 54.0817 124.48 47.7817 121.88C41.4817 119.28 34.4817 118.68 27.7817 119.88C21.0817 121.28 14.8817 124.48 10.0817 129.28C5.28166 134.08 1.88166 140.08 0.681661 146.78C-0.718339 153.48 0.0816607 160.18 2.68166 166.48C5.28166 172.78 9.68166 178.08 15.4817 181.78C21.0817 185.58 27.7817 187.48 34.6817 187.48C43.7817 187.38 52.5817 183.88 59.0817 177.38C65.6817 170.98 69.1817 162.58 69.1817 153.48Z", fill: color }),
|
|
298
|
+
index.h("path", { d: "M69.1817 34.9799C69.1817 28.1799 67.1817 21.6799 63.2817 15.9799C59.4817 10.3799 54.1817 5.9799 47.7817 3.3799C41.4817 0.779901 34.4817 0.1799 27.7817 1.3799C21.0817 2.7799 14.8817 5.97986 10.0817 10.7799C5.28166 15.5799 1.88166 21.5799 0.681661 28.2799C-0.718339 34.9799 0.0816607 41.6799 2.68166 47.9799C5.28166 54.2799 9.68166 59.5799 15.4817 63.2799C21.0817 67.0799 27.7817 68.9799 34.6817 68.9799C43.8817 68.9799 52.6817 65.3799 59.1817 58.9799C65.5817 52.6799 69.1817 43.8799 69.1817 34.9799Z", fill: color }),
|
|
299
|
+
index.h("path", { d: "M962.664 203.95C953.044 203.95 945.244 201.285 939.264 195.955C933.284 190.495 930.294 183.41 930.294 174.7C930.294 165.08 933.739 157.605 940.629 152.275C947.649 146.945 957.464 144.28 970.074 144.28H993.864V138.43C993.864 129.72 991.589 123.09 987.039 118.54C982.619 113.86 976.184 111.52 967.734 111.52C962.014 111.52 956.749 112.885 951.939 115.615C947.129 118.345 943.229 122.18 940.239 127.12L933.999 120.295C937.639 114.575 942.384 110.22 948.234 107.23C954.214 104.11 960.974 102.55 968.514 102.55C979.694 102.55 988.404 105.605 994.644 111.715C1001.01 117.695 1004.2 126.015 1004.2 136.675V184.255C1004.2 188.805 1004.98 194.72 1006.54 202H997.569C996.399 199.14 995.554 194.07 995.034 186.79H994.644C990.874 192.25 986.259 196.475 980.799 199.465C975.339 202.455 969.294 203.95 962.664 203.95ZM962.664 195.175C968.124 195.175 973.259 194.07 978.069 191.86C982.879 189.52 986.714 186.465 989.574 182.695C992.434 178.795 993.864 174.7 993.864 170.41V152.665H969.489C960.389 152.665 953.239 154.615 948.039 158.515C942.969 162.415 940.434 167.81 940.434 174.7C940.434 180.68 942.514 185.62 946.674 189.52C950.834 193.29 956.164 195.175 962.664 195.175Z", fill: color }),
|
|
300
|
+
index.h("path", { d: "M1067.55 203.95C1055.07 203.95 1045.25 199.27 1038.1 189.91C1030.95 180.55 1027.38 167.745 1027.38 151.495C1027.38 136.415 1031.02 124.52 1038.3 115.81C1045.71 106.97 1055.72 102.55 1068.33 102.55C1074.7 102.55 1080.55 104.045 1085.88 107.035C1091.21 110.025 1095.5 114.25 1098.75 119.71H1099.14V57.3101H1109.67V178.21C1109.67 189.13 1109.86 197.06 1110.25 202H1100.89C1100.63 197.84 1100.5 192.12 1100.5 184.84H1100.11C1097.12 190.69 1092.7 195.37 1086.85 198.88C1081 202.26 1074.57 203.95 1067.55 203.95ZM1068.13 195.175C1077.23 195.175 1084.64 192.185 1090.36 186.205C1096.21 180.225 1099.14 172.49 1099.14 163V146.815C1099.14 135.895 1096.41 127.25 1090.95 120.88C1085.49 114.38 1078.08 111.13 1068.72 111.13C1059.1 111.13 1051.49 114.77 1045.9 122.05C1040.44 129.2 1037.71 139.145 1037.71 151.885C1037.71 165.275 1040.44 175.87 1045.9 183.67C1051.36 191.34 1058.77 195.175 1068.13 195.175Z", fill: color }),
|
|
301
|
+
index.h("path", { d: "M1208.57 104.5L1172.3 202H1161.96L1125.5 104.5H1136.61L1167.03 189.715L1197.45 104.5H1208.57Z", fill: color }),
|
|
302
|
+
index.h("path", { d: "M1261.51 203.95C1252.54 203.95 1244.61 201.87 1237.72 197.71C1230.96 193.55 1225.7 187.635 1221.93 179.965C1218.29 172.295 1216.47 163.39 1216.47 153.25C1216.47 143.11 1218.29 134.205 1221.93 126.535C1225.7 118.865 1230.96 112.95 1237.72 108.79C1244.61 104.63 1252.54 102.55 1261.51 102.55C1270.48 102.55 1278.35 104.63 1285.11 108.79C1292 112.95 1297.33 118.865 1301.1 126.535C1304.87 134.205 1306.75 143.11 1306.75 153.25C1306.75 163.39 1304.87 172.295 1301.1 179.965C1297.33 187.635 1292 193.55 1285.11 197.71C1278.35 201.87 1270.48 203.95 1261.51 203.95ZM1261.51 195.37C1268.4 195.37 1274.45 193.615 1279.65 190.105C1284.98 186.595 1289.07 181.655 1291.93 175.285C1294.79 168.915 1296.22 161.57 1296.22 153.25C1296.22 144.93 1294.79 137.585 1291.93 131.215C1289.07 124.845 1284.98 119.905 1279.65 116.395C1274.45 112.885 1268.4 111.13 1261.51 111.13C1254.75 111.13 1248.71 112.885 1243.38 116.395C1238.18 119.905 1234.15 124.845 1231.29 131.215C1228.43 137.585 1227 144.93 1227 153.25C1227 161.57 1228.43 168.915 1231.29 175.285C1234.15 181.655 1238.18 186.595 1243.38 190.105C1248.71 193.615 1254.75 195.37 1261.51 195.37Z", fill: color }),
|
|
303
|
+
index.h("path", { d: "M1366.03 203.95C1352.25 203.95 1341.52 199.53 1333.85 190.69C1326.31 181.72 1322.54 169.24 1322.54 153.25C1322.54 137.39 1326.38 124.975 1334.05 116.005C1341.72 107.035 1352.38 102.55 1366.03 102.55C1373.57 102.55 1380.26 104.11 1386.11 107.23C1391.96 110.22 1396.77 114.575 1400.54 120.295L1394.3 126.34C1391.31 121.66 1387.28 118.02 1382.21 115.42C1377.27 112.69 1371.88 111.325 1366.03 111.325C1355.76 111.325 1347.63 115.03 1341.65 122.44C1335.8 129.85 1332.88 140.12 1332.88 153.25C1332.88 166.38 1335.8 176.65 1341.65 184.06C1347.63 191.47 1355.76 195.175 1366.03 195.175C1371.88 195.175 1377.27 193.875 1382.21 191.275C1387.28 188.545 1391.31 184.84 1394.3 180.16L1400.54 186.205C1396.77 191.925 1391.96 196.345 1386.11 199.465C1380.26 202.455 1373.57 203.95 1366.03 203.95Z", fill: color }),
|
|
304
|
+
index.h("path", { d: "M1446.55 203.95C1436.93 203.95 1429.13 201.285 1423.15 195.955C1417.17 190.495 1414.18 183.41 1414.18 174.7C1414.18 165.08 1417.62 157.605 1424.51 152.275C1431.53 146.945 1441.35 144.28 1453.96 144.28H1477.75V138.43C1477.75 129.72 1475.47 123.09 1470.92 118.54C1466.5 113.86 1460.07 111.52 1451.62 111.52C1445.9 111.52 1440.63 112.885 1435.82 115.615C1431.01 118.345 1427.11 122.18 1424.12 127.12L1417.88 120.295C1421.52 114.575 1426.27 110.22 1432.12 107.23C1438.1 104.11 1444.86 102.55 1452.4 102.55C1463.58 102.55 1472.29 105.605 1478.53 111.715C1484.9 117.695 1488.08 126.015 1488.08 136.675V184.255C1488.08 188.805 1488.86 194.72 1490.42 202H1481.45C1480.28 199.14 1479.44 194.07 1478.92 186.79H1478.53C1474.76 192.25 1470.14 196.475 1464.68 199.465C1459.22 202.455 1453.18 203.95 1446.55 203.95ZM1446.55 195.175C1452.01 195.175 1457.14 194.07 1461.95 191.86C1466.76 189.52 1470.6 186.465 1473.46 182.695C1476.32 178.795 1477.75 174.7 1477.75 170.41V152.665H1453.37C1444.27 152.665 1437.12 154.615 1431.92 158.515C1426.85 162.415 1424.32 167.81 1424.32 174.7C1424.32 180.68 1426.4 185.62 1430.56 189.52C1434.72 193.29 1440.05 195.175 1446.55 195.175Z", fill: color }),
|
|
305
|
+
index.h("path", { d: "M1547.14 203.95C1539.08 203.95 1532.97 201.48 1528.81 196.54C1524.65 191.47 1522.57 184.19 1522.57 174.7V113.275H1505.02V104.5H1522.57V77.9801L1532.32 74.6651H1533.1V104.5H1560.59V113.275H1533.1V172.555C1533.1 180.355 1534.33 186.01 1536.8 189.52C1539.27 193.03 1543.17 194.785 1548.5 194.785C1553.83 194.785 1558.06 194.005 1561.18 192.445L1562.35 200.83C1558.19 202.91 1553.12 203.95 1547.14 203.95Z", fill: color }),
|
|
306
|
+
index.h("path", { d: "M1661.53 157.54H1589.77C1590.42 169.37 1593.54 178.535 1599.13 185.035C1604.85 191.535 1612.65 194.785 1622.53 194.785C1628.51 194.785 1633.97 193.485 1638.91 190.885C1643.98 188.285 1647.95 184.645 1650.81 179.965L1657.24 186.4C1653.34 192.12 1648.4 196.475 1642.42 199.465C1636.57 202.455 1629.94 203.95 1622.53 203.95C1609.01 203.95 1598.35 199.465 1590.55 190.495C1582.88 181.525 1579.05 169.175 1579.05 153.445C1579.05 137.585 1582.82 125.17 1590.36 116.2C1597.9 107.1 1608.23 102.55 1621.36 102.55C1633.84 102.55 1643.66 106.84 1650.81 115.42C1657.96 124 1661.53 135.895 1661.53 151.105V157.54ZM1651.39 147.4C1651.39 136.48 1648.66 127.77 1643.2 121.27C1637.74 114.77 1630.46 111.52 1621.36 111.52C1611.74 111.52 1604.2 114.77 1598.74 121.27C1593.28 127.77 1590.29 137.065 1589.77 149.155H1651.39V147.4Z", fill: color })));
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
const debug = domContextHooks_module.browser("sq:useBigStat");
|
|
310
|
+
const LOADING = "...";
|
|
311
|
+
const debugQuery = (query, variables, getStat) => {
|
|
312
|
+
const res = index_module.wn(query, variables);
|
|
313
|
+
if (!(res === null || res === void 0 ? void 0 : res.data) && !res.loading) {
|
|
314
|
+
console.error("issue getting stat:", res);
|
|
338
315
|
}
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
index.h("h2", { part: "sqm-header", style: {
|
|
342
|
-
fontSize: "var(--sl-font-size-x-large)",
|
|
343
|
-
marginBottom: "0px",
|
|
344
|
-
textAlign: "center",
|
|
345
|
-
} }, text.editprofileheader),
|
|
346
|
-
index.h("div", null,
|
|
347
|
-
index.h("p", { style: { fontSize: "var(--sl-font-size-medium)" } }, (_a = states.user) === null || _a === void 0 ? void 0 :
|
|
348
|
-
_a.firstName,
|
|
349
|
-
" ", (_b = states.user) === null || _b === void 0 ? void 0 :
|
|
350
|
-
_b.lastName),
|
|
351
|
-
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))),
|
|
352
|
-
index.h("sl-button", { type: "primary", loading: states.loading, onClick: () => {
|
|
353
|
-
callbacks.resetForm();
|
|
354
|
-
callbacks.setShowEdit(true);
|
|
355
|
-
}, exportparts: "base: primarybutton-base" }, text.editprofiletext)));
|
|
316
|
+
const stat = getStat(res);
|
|
317
|
+
return { ...stat, loading: res.loading };
|
|
356
318
|
};
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
319
|
+
const referralsCountQuery = (programId,
|
|
320
|
+
// locale
|
|
321
|
+
_, status) => {
|
|
322
|
+
const programFilter = programId === "classic"
|
|
323
|
+
? { programId_exists: false }
|
|
324
|
+
: { programId_eq: programId };
|
|
325
|
+
const convertedFilter = status && status == "converted"
|
|
326
|
+
? { dateConverted_exists: true }
|
|
327
|
+
: status && status == "started"
|
|
328
|
+
? { dateConverted_exists: false }
|
|
329
|
+
: {};
|
|
330
|
+
const queryFilter = { ...programFilter, ...convertedFilter };
|
|
331
|
+
return debugQuery(index_module.dist.gql `
|
|
332
|
+
query ($queryFilter: ReferralFilterInput) {
|
|
333
|
+
viewer {
|
|
334
|
+
... on User {
|
|
335
|
+
referrals(filter: $queryFilter) {
|
|
336
|
+
totalCount
|
|
337
|
+
}
|
|
338
|
+
}
|
|
339
|
+
}
|
|
367
340
|
}
|
|
368
|
-
}
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
createUserAnalyticsEvent(eventMeta: $eventMeta)
|
|
374
|
-
}
|
|
375
|
-
`;
|
|
376
|
-
function useShareLink(props) {
|
|
377
|
-
var _a, _b;
|
|
378
|
-
const { programId = index_module.H() } = props;
|
|
379
|
-
const user = index_module.J();
|
|
380
|
-
const engagementMedium = index_module.B();
|
|
381
|
-
const contextData = index_module.Fn(useReferralCodes.REFERRAL_CODES_NAMESPACE);
|
|
382
|
-
const { data } = index_module.wn(MessageLinkQuery, { programId, engagementMedium }, !(user === null || user === void 0 ? void 0 : user.jwt) || !!props.linkOverride || (contextData === null || contextData === void 0 ? void 0 : contextData.shareLink) !== undefined);
|
|
383
|
-
const [sendLoadEvent] = index_module.$e(WIDGET_ENGAGEMENT_EVENT);
|
|
384
|
-
const [setCopied, copiedRes] = index_module.$e(useReferralCodes.SET_CODE_COPIED);
|
|
385
|
-
const copyString = (_b = ((contextData === null || contextData === void 0 ? void 0 : contextData.shareLink) || ((_a = data === null || data === void 0 ? void 0 : data.user) === null || _a === void 0 ? void 0 : _a.shareLink))) !== null && _b !== void 0 ? _b :
|
|
386
|
-
// Shown during loading
|
|
387
|
-
"...";
|
|
388
|
-
const [open, setOpen] = stencilHooks_module.useState(false);
|
|
389
|
-
async function onClick() {
|
|
390
|
-
if (contextData) {
|
|
391
|
-
await setCopied({ referralCode: contextData.referralCode });
|
|
392
|
-
contextData.refresh();
|
|
393
|
-
}
|
|
394
|
-
// Should well supported: https://developer.mozilla.org/en-US/docs/Web/API/Clipboard#browser_compatibility
|
|
395
|
-
// Only if called from a user-initiated event
|
|
396
|
-
navigator.clipboard.writeText(copyString);
|
|
397
|
-
setOpen(true);
|
|
398
|
-
setTimeout(() => setOpen(false), props.tooltiplifespan);
|
|
399
|
-
sendLoadEvent({
|
|
400
|
-
eventMeta: {
|
|
401
|
-
programId,
|
|
402
|
-
id: user === null || user === void 0 ? void 0 : user.id,
|
|
403
|
-
accountId: user === null || user === void 0 ? void 0 : user.accountId,
|
|
404
|
-
type: "USER_REFERRAL_PROGRAM_ENGAGEMENT_EVENT",
|
|
405
|
-
meta: {
|
|
406
|
-
engagementMedium,
|
|
407
|
-
shareMedium: "DIRECT",
|
|
408
|
-
},
|
|
409
|
-
},
|
|
341
|
+
`, { queryFilter }, (res) => {
|
|
342
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
343
|
+
return ({
|
|
344
|
+
value: ((_c = (_b = (_a = res.data) === null || _a === void 0 ? void 0 : _a.viewer) === null || _b === void 0 ? void 0 : _b.referrals) === null || _c === void 0 ? void 0 : _c.totalCount) || 0,
|
|
345
|
+
statvalue: (_g = (_f = (_e = (_d = res.data) === null || _d === void 0 ? void 0 : _d.viewer) === null || _e === void 0 ? void 0 : _e.referrals) === null || _f === void 0 ? void 0 : _f.totalCount) === null || _g === void 0 ? void 0 : _g.toString(),
|
|
410
346
|
});
|
|
411
|
-
}
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
}
|
|
430
|
-
}
|
|
431
|
-
}
|
|
432
|
-
`;
|
|
433
|
-
function NativeShare(props, directLink, undefinedErrorText, unsupportedPlatformText) {
|
|
434
|
-
const title = props.sharetitle || "Share title";
|
|
435
|
-
const text = props.sharetext || "Share text";
|
|
436
|
-
if (directLink === "undefined") {
|
|
437
|
-
return alert(undefinedErrorText);
|
|
438
|
-
}
|
|
439
|
-
if (window.navigator.share) {
|
|
440
|
-
window.navigator
|
|
441
|
-
.share({
|
|
442
|
-
title,
|
|
443
|
-
text,
|
|
444
|
-
url: directLink,
|
|
445
|
-
})
|
|
446
|
-
.catch((error) => console.error("Error on web share", error));
|
|
447
|
-
}
|
|
448
|
-
else {
|
|
449
|
-
alert(unsupportedPlatformText);
|
|
450
|
-
}
|
|
451
|
-
}
|
|
452
|
-
function FacebookShare(directLink, messageLink, errorText) {
|
|
453
|
-
if (messageLink === "undefined" || directLink === "undefined") {
|
|
454
|
-
return alert(errorText);
|
|
455
|
-
}
|
|
456
|
-
if (typeof SquatchAndroid.shareOnFacebook !== "undefined") {
|
|
457
|
-
return SquatchAndroid.shareOnFacebook(directLink, messageLink);
|
|
458
|
-
}
|
|
459
|
-
else {
|
|
460
|
-
return GenericShare(messageLink, errorText);
|
|
461
|
-
}
|
|
462
|
-
}
|
|
463
|
-
function GenericShare(messageLink, errorText) {
|
|
464
|
-
return messageLink ? (window.location.href = messageLink) : alert(errorText);
|
|
465
|
-
}
|
|
466
|
-
function useShareButton(props) {
|
|
467
|
-
var _a, _b, _c, _d;
|
|
468
|
-
const { sharetitle, sharetext, medium } = props;
|
|
469
|
-
const programId = props.programId ? props.programId : index_module.H();
|
|
470
|
-
const user = index_module.J();
|
|
471
|
-
const engagementMedium = index_module.B();
|
|
472
|
-
const variables = {
|
|
473
|
-
engagementMedium,
|
|
474
|
-
programId: programId,
|
|
475
|
-
shareMedium: medium.toUpperCase(),
|
|
476
|
-
};
|
|
477
|
-
const contextData = index_module.Fn(useReferralCodes.REFERRAL_CODES_NAMESPACE);
|
|
478
|
-
const overrideData = contextData === null || contextData === void 0 ? void 0 : contextData[medium];
|
|
479
|
-
// only queries if a programId is available
|
|
480
|
-
const res = index_module.wn(MessageLinkQuery$1, variables, !(user === null || user === void 0 ? void 0 : user.jwt) || !programId || overrideData !== undefined);
|
|
481
|
-
const [setCopied, copiedRes] = index_module.$e(useReferralCodes.SET_CODE_COPIED);
|
|
482
|
-
const directLink = (overrideData === null || overrideData === void 0 ? void 0 : overrideData.shareLink) || ((_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);
|
|
483
|
-
const environment = index_module.getEnvironmentSDK();
|
|
484
|
-
const hide = (medium.toLocaleUpperCase() === "SMS" &&
|
|
485
|
-
window.orientation === undefined) ||
|
|
486
|
-
(medium.toLocaleUpperCase() === "DIRECT" && !window.navigator.share);
|
|
487
|
-
const messageLink = (overrideData === null || overrideData === void 0 ? void 0 : overrideData.messageLink) || ((_d = (_c = res.data) === null || _c === void 0 ? void 0 : _c.viewer) === null || _d === void 0 ? void 0 : _d.messageLink);
|
|
488
|
-
async function onClick() {
|
|
489
|
-
if (overrideData) {
|
|
490
|
-
await setCopied({ referralCode: contextData.referralCode });
|
|
491
|
-
contextData.refresh();
|
|
492
|
-
}
|
|
493
|
-
if (medium.toLocaleUpperCase() === "FACEBOOK" &&
|
|
494
|
-
environment.type === "SquatchAndroid") {
|
|
495
|
-
FacebookShare(directLink, messageLink, props.errorText);
|
|
496
|
-
}
|
|
497
|
-
else if (medium.toLocaleUpperCase() === "DIRECT") {
|
|
498
|
-
NativeShare({ sharetitle, sharetext }, directLink, props.errorText, props.unsupportedPlatformText);
|
|
499
|
-
}
|
|
500
|
-
}
|
|
501
|
-
const isPlainLink = !(medium.toLocaleUpperCase() === "FACEBOOK" &&
|
|
502
|
-
environment.type === "SquatchAndroid") &&
|
|
503
|
-
medium.toLocaleUpperCase() !== "DIRECT" &&
|
|
504
|
-
messageLink;
|
|
505
|
-
const userAgent = window.navigator.userAgent.toLowerCase(), safari = /safari/.test(userAgent), ios = /iphone|ipod|ipad/.test(userAgent);
|
|
506
|
-
const openInSameTab = ios && !safari;
|
|
507
|
-
return {
|
|
508
|
-
...props,
|
|
509
|
-
loading: res.loading && !(overrideData === null || overrideData === void 0 ? void 0 : overrideData.messageLink),
|
|
510
|
-
messageLink,
|
|
511
|
-
isPlainLink,
|
|
512
|
-
onClick,
|
|
513
|
-
openInSameTab,
|
|
514
|
-
hide,
|
|
515
|
-
};
|
|
516
|
-
}
|
|
517
|
-
|
|
518
|
-
const debug = stencilHooks_module.browser("sq:useBigStat");
|
|
519
|
-
const LOADING = "...";
|
|
520
|
-
const debugQuery = (query, variables, getStat) => {
|
|
521
|
-
const res = index_module.wn(query, variables);
|
|
522
|
-
if (!(res === null || res === void 0 ? void 0 : res.data) && !res.loading) {
|
|
523
|
-
console.error("issue getting stat:", res);
|
|
524
|
-
}
|
|
525
|
-
const stat = getStat(res);
|
|
526
|
-
return { ...stat, loading: res.loading };
|
|
527
|
-
};
|
|
528
|
-
const referralsCountQuery = (programId,
|
|
529
|
-
// locale
|
|
530
|
-
_, status) => {
|
|
531
|
-
const programFilter = programId === "classic"
|
|
532
|
-
? { programId_exists: false }
|
|
533
|
-
: { programId_eq: programId };
|
|
534
|
-
const convertedFilter = status && status == "converted"
|
|
535
|
-
? { dateConverted_exists: true }
|
|
536
|
-
: status && status == "started"
|
|
537
|
-
? { dateConverted_exists: false }
|
|
538
|
-
: {};
|
|
539
|
-
const queryFilter = { ...programFilter, ...convertedFilter };
|
|
540
|
-
return debugQuery(index_module.dist.gql `
|
|
541
|
-
query ($queryFilter: ReferralFilterInput) {
|
|
542
|
-
viewer {
|
|
543
|
-
... on User {
|
|
544
|
-
referrals(filter: $queryFilter) {
|
|
545
|
-
totalCount
|
|
546
|
-
}
|
|
547
|
-
}
|
|
548
|
-
}
|
|
549
|
-
}
|
|
550
|
-
`, { queryFilter }, (res) => {
|
|
551
|
-
var _a, _b, _c, _d, _e, _f, _g;
|
|
552
|
-
return ({
|
|
553
|
-
value: ((_c = (_b = (_a = res.data) === null || _a === void 0 ? void 0 : _a.viewer) === null || _b === void 0 ? void 0 : _b.referrals) === null || _c === void 0 ? void 0 : _c.totalCount) || 0,
|
|
554
|
-
statvalue: (_g = (_f = (_e = (_d = res.data) === null || _d === void 0 ? void 0 : _d.viewer) === null || _e === void 0 ? void 0 : _e.referrals) === null || _f === void 0 ? void 0 : _f.totalCount) === null || _g === void 0 ? void 0 : _g.toString(),
|
|
555
|
-
});
|
|
556
|
-
});
|
|
557
|
-
};
|
|
558
|
-
const programGoalsQuery = (programId, locale, metricType, goalId) => {
|
|
559
|
-
// Confirm this behaviour
|
|
560
|
-
if (programId === "classic")
|
|
561
|
-
return null;
|
|
562
|
-
return debugQuery(index_module.dist.gql `
|
|
563
|
-
query {
|
|
564
|
-
viewer {
|
|
565
|
-
... on User {
|
|
566
|
-
programGoals {
|
|
567
|
-
goalId
|
|
568
|
-
programId
|
|
569
|
-
count
|
|
570
|
-
conversionCount
|
|
571
|
-
}
|
|
572
|
-
}
|
|
573
|
-
}
|
|
347
|
+
});
|
|
348
|
+
};
|
|
349
|
+
const programGoalsQuery = (programId, locale, metricType, goalId) => {
|
|
350
|
+
// Confirm this behaviour
|
|
351
|
+
if (programId === "classic")
|
|
352
|
+
return null;
|
|
353
|
+
return debugQuery(index_module.dist.gql `
|
|
354
|
+
query {
|
|
355
|
+
viewer {
|
|
356
|
+
... on User {
|
|
357
|
+
programGoals {
|
|
358
|
+
goalId
|
|
359
|
+
programId
|
|
360
|
+
count
|
|
361
|
+
conversionCount
|
|
362
|
+
}
|
|
363
|
+
}
|
|
364
|
+
}
|
|
574
365
|
}
|
|
575
366
|
`, { programId, metricType, goalId, locale }, (res) => {
|
|
576
367
|
var _a, _b, _c, _d, _e, _f;
|
|
@@ -1274,498 +1065,251 @@ const queries = {
|
|
|
1274
1065
|
},
|
|
1275
1066
|
referralsMonth: {
|
|
1276
1067
|
label: "Referrals - This Month",
|
|
1277
|
-
query: referralsMonthQuery,
|
|
1278
|
-
},
|
|
1279
|
-
referralsWeek: {
|
|
1280
|
-
label: "Referrals - This Week",
|
|
1281
|
-
query: referralsWeekQuery,
|
|
1282
|
-
},
|
|
1283
|
-
rewardsCount: {
|
|
1284
|
-
label: "Rewards",
|
|
1285
|
-
query: rewardsCountQuery,
|
|
1286
|
-
},
|
|
1287
|
-
rewardsCountFiltered: {
|
|
1288
|
-
label: "Rewards",
|
|
1289
|
-
query: rewardsCountFilteredQuery,
|
|
1290
|
-
},
|
|
1291
|
-
integrationRewardsCountFiltered: {
|
|
1292
|
-
label: "Rewards",
|
|
1293
|
-
query: integrationRewardsCountFilteredQuery,
|
|
1294
|
-
},
|
|
1295
|
-
rewardsMonth: {
|
|
1296
|
-
label: "Rewards - This Month",
|
|
1297
|
-
query: rewardsMonthQuery,
|
|
1298
|
-
},
|
|
1299
|
-
rewardsWeek: {
|
|
1300
|
-
label: "Rewards - This Week",
|
|
1301
|
-
query: rewardsWeekQuery,
|
|
1302
|
-
},
|
|
1303
|
-
rewardBalance: {
|
|
1304
|
-
label: "Balance - Credit Earned",
|
|
1305
|
-
query: rewardsBalanceQuery,
|
|
1306
|
-
},
|
|
1307
|
-
programGoals: {
|
|
1308
|
-
label: "Program Goals",
|
|
1309
|
-
query: programGoalsQuery,
|
|
1310
|
-
},
|
|
1311
|
-
customFields: {
|
|
1312
|
-
label: "Custom Fields",
|
|
1313
|
-
query: customFieldsQuery,
|
|
1314
|
-
},
|
|
1315
|
-
traffic: {
|
|
1316
|
-
label: "Traffic",
|
|
1317
|
-
query: trafficQuery,
|
|
1318
|
-
},
|
|
1319
|
-
userStats: {
|
|
1320
|
-
label: "User Stat",
|
|
1321
|
-
query: userStatsQuery,
|
|
1322
|
-
},
|
|
1323
|
-
payoutBalance: {
|
|
1324
|
-
label: "Payout Balance",
|
|
1325
|
-
query: payoutBalanceQuery,
|
|
1326
|
-
},
|
|
1327
|
-
};
|
|
1328
|
-
// this should be exposed in documentation somehow
|
|
1329
|
-
const StatPaths = [
|
|
1330
|
-
{ name: "programGoals", route: "/(programGoals)/:metricType/:goalId" },
|
|
1331
|
-
{ name: "customFields", route: "/(customFields)/:customField" },
|
|
1332
|
-
{ name: "referralsCount", route: "/(referralsCount)/:status?" },
|
|
1333
|
-
{ name: "referralsMonth", route: "/(referralsMonth)" },
|
|
1334
|
-
{ name: "referralsWeek", route: "/(referralsWeek)" },
|
|
1335
|
-
{ name: "rewardsCount", route: "/(rewardsCount)/:global?" },
|
|
1336
|
-
{ name: "rewardsMonth", route: "/(rewardsMonth)/:global?" },
|
|
1337
|
-
{ name: "rewardsWeek", route: "/(rewardsWeek)/:global?" },
|
|
1338
|
-
{
|
|
1339
|
-
name: "rewardsCountFiltered",
|
|
1340
|
-
route: "/(rewardsCountFiltered)/:statType([INTEGRATION|PCT_DISCOUNT|CREDIT]*)?/:unit((?!global)(?!PENDING)(?!CANCELLED)(?!EXPIRED)(?!REDEEMED)(?!AVAILABLE)[a-zA-Z0-9%]+)?/:status([PENDING|CANCELLED|EXPIRED|REDEEMED|AVAILABLE]*)?/:global?",
|
|
1341
|
-
},
|
|
1342
|
-
{
|
|
1343
|
-
name: "integrationRewardsCountFiltered",
|
|
1344
|
-
route: "/(integrationRewardsCountFiltered)/:status([PENDING|CANCELLED|EXPIRED|REDEEMED|AVAILABLE]*)?/:global?",
|
|
1345
|
-
},
|
|
1346
|
-
{
|
|
1347
|
-
name: "rewardsAssigned",
|
|
1348
|
-
route: "/(rewardsAssigned)/:statType/:unit/:global?",
|
|
1349
|
-
},
|
|
1350
|
-
{
|
|
1351
|
-
name: "rewardsPending",
|
|
1352
|
-
route: "/(rewardsPending)/:statType/:unit/:global?",
|
|
1353
|
-
},
|
|
1354
|
-
{
|
|
1355
|
-
name: "rewardsRedeemed",
|
|
1356
|
-
route: "/(rewardsRedeemed)/:statType/:unit/:global?",
|
|
1357
|
-
},
|
|
1358
|
-
{
|
|
1359
|
-
name: "rewardsRedeemedWeek",
|
|
1360
|
-
route: "/(rewardsRedeemedWeek)/:statType/:unit/:global?",
|
|
1361
|
-
},
|
|
1362
|
-
{
|
|
1363
|
-
name: "rewardsRedeemedMonth",
|
|
1364
|
-
route: "/(rewardsRedeemedMonth)/:statType/:unit/:global?",
|
|
1365
|
-
},
|
|
1366
|
-
{
|
|
1367
|
-
name: "rewardsAvailable",
|
|
1368
|
-
route: "/(rewardsAvailable)/:statType/:unit/:global?",
|
|
1369
|
-
},
|
|
1370
|
-
{
|
|
1371
|
-
name: "rewardBalance",
|
|
1372
|
-
route: "/(rewardBalance)/:statType/:unit/:format([prettyValue|value]*)?/:global?",
|
|
1373
|
-
},
|
|
1374
|
-
{
|
|
1375
|
-
name: "traffic",
|
|
1376
|
-
route: "/(traffic)",
|
|
1377
|
-
},
|
|
1378
|
-
{
|
|
1379
|
-
name: "userStats",
|
|
1380
|
-
route: "/(userStats)/:statId",
|
|
1381
|
-
},
|
|
1382
|
-
{
|
|
1383
|
-
name: "payoutBalance",
|
|
1384
|
-
route: "/(payoutBalance)",
|
|
1385
|
-
},
|
|
1386
|
-
];
|
|
1387
|
-
const StatPatterns = StatPaths.map((pattern) => index$1.pathToRegexp(pattern.route));
|
|
1388
|
-
function useBigStat(props) {
|
|
1389
|
-
var _a;
|
|
1390
|
-
const { statType, flexReverse, alignment, programId = index_module.H(), } = props;
|
|
1391
|
-
// triggers a re-render if the label is manually changed
|
|
1392
|
-
useChildElements.useChildElements();
|
|
1393
|
-
const locale = index_module.L();
|
|
1394
|
-
const userIdent = index_module.J();
|
|
1395
|
-
const re = stencilHooks_module.useMemo(() => StatPatterns.find((re) => re.exec(statType)), [statType]);
|
|
1396
|
-
if (!(re === null || re === void 0 ? void 0 : re.exec(statType))) {
|
|
1397
|
-
return {
|
|
1398
|
-
props: {
|
|
1399
|
-
value: 0,
|
|
1400
|
-
statvalue: "!!!",
|
|
1401
|
-
flexReverse,
|
|
1402
|
-
alignment,
|
|
1403
|
-
loading: false,
|
|
1404
|
-
},
|
|
1405
|
-
label: "BAD PROP TYPE",
|
|
1406
|
-
};
|
|
1407
|
-
}
|
|
1408
|
-
const result = re.exec(statType);
|
|
1409
|
-
const queryName = result[1];
|
|
1410
|
-
const statPath = StatPaths.find((pattern) => pattern.name === queryName);
|
|
1411
|
-
// Get a list all possible keys in path
|
|
1412
|
-
const keys = [];
|
|
1413
|
-
const regex = index$1.pathToRegexp(statPath === null || statPath === void 0 ? void 0 : statPath.route, keys, {
|
|
1414
|
-
strict: false,
|
|
1415
|
-
sensitive: false,
|
|
1416
|
-
end: true,
|
|
1417
|
-
});
|
|
1418
|
-
const allQueryArgs = regex.exec(statType);
|
|
1419
|
-
// Retrieve all key values in order including undefined
|
|
1420
|
-
const queryArgs = keys.map((_, i) => allQueryArgs[i + 1] ? decodeURIComponent(allQueryArgs[i + 1]) : undefined);
|
|
1421
|
-
// remove query name from list
|
|
1422
|
-
queryArgs.shift();
|
|
1423
|
-
const label = queries[queryName].label;
|
|
1424
|
-
const stat = (userIdent === null || userIdent === void 0 ? void 0 : userIdent.jwt) && queries[queryName].query(programId, locale, ...queryArgs);
|
|
1425
|
-
debug("stat:", stat);
|
|
1426
|
-
return {
|
|
1427
|
-
props: {
|
|
1428
|
-
value: stat === null || stat === void 0 ? void 0 : stat.value,
|
|
1429
|
-
statvalue: (_a = stat === null || stat === void 0 ? void 0 : stat.statvalue) !== null && _a !== void 0 ? _a : LOADING,
|
|
1430
|
-
loading: stat === null || stat === void 0 ? void 0 : stat.loading,
|
|
1431
|
-
flexReverse,
|
|
1432
|
-
alignment,
|
|
1433
|
-
},
|
|
1434
|
-
label,
|
|
1435
|
-
};
|
|
1436
|
-
}
|
|
1437
|
-
|
|
1438
|
-
function useDemoBigStat(props) {
|
|
1439
|
-
const { statType } = props;
|
|
1440
|
-
const re = stencilHooks_module.useMemo(() => StatPatterns.find((re) => re.exec(statType)), [statType]);
|
|
1441
|
-
// triggers a re-render if the label is manually changed
|
|
1442
|
-
useChildElements.useChildElements();
|
|
1443
|
-
if (!(re === null || re === void 0 ? void 0 : re.exec(statType))) {
|
|
1444
|
-
return {
|
|
1445
|
-
props: {
|
|
1446
|
-
value: 0,
|
|
1447
|
-
statvalue: "!!!",
|
|
1448
|
-
loading: false,
|
|
1449
|
-
flexReverse: false,
|
|
1450
|
-
alignment: "center",
|
|
1451
|
-
},
|
|
1452
|
-
label: "BAD PROP TYPE",
|
|
1453
|
-
};
|
|
1454
|
-
}
|
|
1455
|
-
const result = re.exec(statType);
|
|
1456
|
-
const queryName = result[1];
|
|
1457
|
-
const label = queries[queryName].label;
|
|
1458
|
-
return {
|
|
1459
|
-
props: cjs.cjs({
|
|
1460
|
-
statvalue: "12345",
|
|
1461
|
-
value: 0,
|
|
1462
|
-
flexReverse: false,
|
|
1463
|
-
alignment: "center",
|
|
1464
|
-
}, props.demoData || {}, { arrayMerge: (_, a) => a }),
|
|
1465
|
-
label: label !== null && label !== void 0 ? label : "Demo Label",
|
|
1466
|
-
};
|
|
1467
|
-
}
|
|
1468
|
-
|
|
1469
|
-
function StatContainerView(props, children) {
|
|
1470
|
-
const divideSpace = () => {
|
|
1471
|
-
const spaceValue = getComputedStyle(document.documentElement).getPropertyValue(`--sl-spacing-${props.space}`);
|
|
1472
|
-
return `${Math.floor(parseInt(spaceValue) / 2)}rem`;
|
|
1473
|
-
};
|
|
1474
|
-
// Dependent on props, not feasiable to move out
|
|
1475
|
-
const style = {
|
|
1476
|
-
StatContainer: {
|
|
1477
|
-
width: "100%",
|
|
1478
|
-
display: props.display || "grid",
|
|
1479
|
-
"grid-template-columns": "repeat(auto-fill, minmax(130px, auto))",
|
|
1480
|
-
gap: divideSpace(),
|
|
1481
|
-
// First set of styles applies when shadow DOM is disabled, second set applies when shadow DOM is enabled
|
|
1482
|
-
"& > *": {
|
|
1483
|
-
"border-right": "1px solid #EAEAEA",
|
|
1484
|
-
"padding-right": divideSpace(),
|
|
1485
|
-
},
|
|
1486
|
-
"& > :last-child": {
|
|
1487
|
-
"border-right": "none",
|
|
1488
|
-
},
|
|
1489
|
-
"& > ::slotted(*)": {
|
|
1490
|
-
"border-right": "1px solid #EAEAEA",
|
|
1491
|
-
"padding-right": divideSpace(),
|
|
1492
|
-
height: "100%",
|
|
1493
|
-
},
|
|
1494
|
-
"& > ::slotted(*:last-child)": {
|
|
1495
|
-
"border-right": "none",
|
|
1496
|
-
},
|
|
1497
|
-
"@media screen and (max-width: 430px)": {
|
|
1498
|
-
"& > ::slotted(*)": {
|
|
1499
|
-
borderRight: "none",
|
|
1500
|
-
},
|
|
1501
|
-
},
|
|
1502
|
-
},
|
|
1503
|
-
StatFrame: {
|
|
1504
|
-
display: "flex",
|
|
1505
|
-
},
|
|
1506
|
-
BorderFix: {
|
|
1507
|
-
"border-right": "1px solid transparent",
|
|
1508
|
-
width: "0px",
|
|
1509
|
-
"margin-left": "-1px",
|
|
1510
|
-
},
|
|
1511
|
-
};
|
|
1512
|
-
const sheet = JSS.createStyleSheet(style);
|
|
1513
|
-
const styleString = sheet.toString();
|
|
1514
|
-
return (index.h("div", { class: sheet.classes.StatFrame, part: "sqm-base" },
|
|
1515
|
-
index.h("div", { class: sheet.classes.StatContainer, part: "sqm-inner-container" },
|
|
1516
|
-
index.h("style", { type: "text/css" }, styleString),
|
|
1517
|
-
children),
|
|
1518
|
-
index.h("div", { class: sheet.classes.BorderFix, part: "sqm-border" })));
|
|
1519
|
-
}
|
|
1520
|
-
|
|
1521
|
-
function PortalChangePasswordView(props) {
|
|
1522
|
-
const { states, callbacks } = props;
|
|
1523
|
-
const style = {
|
|
1524
|
-
Dialog: {
|
|
1525
|
-
padding: "0",
|
|
1526
|
-
"&::part(close-button)": {
|
|
1527
|
-
"margin-top": "var(--sl-spacing-medium)",
|
|
1528
|
-
},
|
|
1529
|
-
"&::part(body)": {
|
|
1530
|
-
padding: "0 var(--sl-spacing-x-large) var(--sl-spacing-x-large) var(--sl-spacing-x-large)",
|
|
1531
|
-
},
|
|
1532
|
-
},
|
|
1533
|
-
Error: {
|
|
1534
|
-
"&::part(erroralert-base)": {
|
|
1535
|
-
"margin-bottom": "15px",
|
|
1536
|
-
},
|
|
1537
|
-
},
|
|
1538
|
-
Success: {
|
|
1539
|
-
"&::part(successalert-base)": {
|
|
1540
|
-
"margin-bottom": "15px",
|
|
1541
|
-
},
|
|
1542
|
-
},
|
|
1543
|
-
InputContainer: {
|
|
1544
|
-
"& > :not(:last-child)": {
|
|
1545
|
-
"margin-bottom": "var(--sl-spacing-x-large)",
|
|
1546
|
-
},
|
|
1547
|
-
},
|
|
1548
|
-
CancelButton: {
|
|
1549
|
-
width: "25%",
|
|
1550
|
-
margin: "var(--sl-spacing-large) auto",
|
|
1551
|
-
},
|
|
1552
|
-
PasswordField: {
|
|
1553
|
-
marginBottom: "var(--sl-spacing-large) !important",
|
|
1554
|
-
display: "block",
|
|
1555
|
-
},
|
|
1556
|
-
ChangePasswordButton: {
|
|
1557
|
-
paddingTop: "var(--sl-spacing-x-large)",
|
|
1558
|
-
},
|
|
1559
|
-
};
|
|
1560
|
-
const sheet = JSS.createStyleSheet(style);
|
|
1561
|
-
const styleString = sheet.toString();
|
|
1562
|
-
return (index.h("div", null,
|
|
1563
|
-
index.h("style", { type: "text/css" }, styleString),
|
|
1564
|
-
index.h("sl-dialog", { class: sheet.classes.Dialog, open: states.open, "onSl-hide": () => callbacks.setOpen(false) },
|
|
1565
|
-
index.h(sqmPortalContainerView.PortalSectionView, Object.assign({}, {
|
|
1566
|
-
labelMargin: "x-large",
|
|
1567
|
-
padding: "none",
|
|
1568
|
-
label: (index.h(sqmTextSpanView.TextSpanView, Object.assign({}, { type: "h2" }), states.content.modalChangePasswordHeader)),
|
|
1569
|
-
content: (index.h(sqmPortalContainerView.PortalContainerView, Object.assign({}, { direction: "column", padding: "none", gap: "32px" }),
|
|
1570
|
-
states.error && (index.h("sqm-form-message", { class: sheet.classes.Error, type: "error", exportparts: "erroralert-icon" },
|
|
1571
|
-
index.h("div", { part: "erroralert-text" }, states.error))),
|
|
1572
|
-
states.success && (index.h("sqm-form-message", { class: sheet.classes.Success, type: "success", exportparts: "successalert-icon" },
|
|
1573
|
-
index.h("div", { part: "successalert-text" }, states.content.successMessage))),
|
|
1574
|
-
index.h("sl-form", { "onSl-submit": callbacks.submit },
|
|
1575
|
-
index.h("div", { class: sheet.classes.InputContainer },
|
|
1576
|
-
index.h("sqm-password-field", { exportparts: "input-label: input-label", class: sheet.classes.PasswordField, fieldLabel: states.content.passwordFieldLabel, meetsRequirementsText: states.content.meetsRequirementsText, doesNotMeetRequirementsText: states.content.doesNotMeetRequirementsText, minErrorText: states.content.minErrorText, uppercaseErrorText: states.content.uppercaseErrorText, lowercaseErrorText: states.content.lowercaseErrorText, hasErrorText: states.content.hasErrorText }),
|
|
1577
|
-
index.h("sl-input", { exportparts: "label: input-label, base: input-base", name: "/confirmPassword", label: states.content.confirmPasswordFieldLabel, required: true, togglePassword: true, disabled: states.loading, type: "password" })),
|
|
1578
|
-
index.h(sqmPortalContainerView.PortalContainerView, Object.assign({}, { direction: "row", padding: "none", gap: "20px" }),
|
|
1579
|
-
index.h("sl-button", { class: sheet.classes.ChangePasswordButton, type: "primary", submit: true, loading: states.loading }, states.content.changePasswordButtonText),
|
|
1580
|
-
index.h("sl-button", { class: sheet.classes.CancelButton, type: "text", onClick: () => callbacks.setOpen(false) }, states.content.cancelText))))),
|
|
1581
|
-
}))),
|
|
1582
|
-
index.h(sqmPortalContainerView.PortalSectionView, Object.assign({}, {
|
|
1583
|
-
labelMargin: "x-large",
|
|
1584
|
-
padding: "xxx-large",
|
|
1585
|
-
label: (index.h(sqmTextSpanView.TextSpanView, Object.assign({}, { type: "h2" }), states.content.portalChangePasswordHeader)),
|
|
1586
|
-
content: (index.h("sl-button", { onClick: () => callbacks.setOpen(true) }, states.content.portalChangePasswordButtonText)),
|
|
1587
|
-
}),
|
|
1588
|
-
index.h("style", { type: "text/css" }, styleString))));
|
|
1589
|
-
}
|
|
1590
|
-
|
|
1591
|
-
const style$2 = {
|
|
1592
|
-
Wrapper: { ...mixins.AuthWrapper, "max-width": "600px" },
|
|
1593
|
-
Column: mixins.AuthColumn,
|
|
1594
|
-
HostBlock: mixins.HostBlock,
|
|
1595
|
-
":host": {
|
|
1596
|
-
margin: "0 auto",
|
|
1597
|
-
width: "100%",
|
|
1598
|
-
},
|
|
1599
|
-
ButtonsContainer: mixins.AuthButtonsContainer,
|
|
1600
|
-
ErrorStyle: mixins.ErrorStyles,
|
|
1601
|
-
};
|
|
1602
|
-
const vanillaStyle = `
|
|
1603
|
-
sqm-portal-register {
|
|
1604
|
-
margin: 0 auto;
|
|
1605
|
-
width: 100%;
|
|
1606
|
-
display: block;
|
|
1607
|
-
}
|
|
1608
|
-
|
|
1609
|
-
:host{
|
|
1610
|
-
display: block;
|
|
1611
|
-
}
|
|
1612
|
-
|
|
1613
|
-
:host([hidden]) {
|
|
1614
|
-
display: none;
|
|
1615
|
-
}
|
|
1616
|
-
`;
|
|
1617
|
-
const sheet$2 = JSS.createStyleSheet(style$2);
|
|
1618
|
-
const styleString$2 = sheet$2.toString();
|
|
1619
|
-
function PortalRegisterView(props) {
|
|
1620
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
|
|
1621
|
-
const { states, refs, callbacks, content } = props;
|
|
1622
|
-
if (states.error) {
|
|
1623
|
-
window.scrollTo({ top: 0, left: 0, behavior: "smooth" });
|
|
1624
|
-
}
|
|
1625
|
-
return (index.h("div", { class: sheet$2.classes.Wrapper, part: "sqm-base" },
|
|
1626
|
-
index.h("style", { type: "text/css" },
|
|
1627
|
-
vanillaStyle,
|
|
1628
|
-
styleString$2),
|
|
1629
|
-
index.h(sqmTextSpanView.TextSpanView, { type: "h3" }, content.pageLabel),
|
|
1630
|
-
index.h("sl-form", { class: sheet$2.classes.Column, "onSl-submit": callbacks.submit, ref: (el) => (refs.formRef.current = el), novalidate: true },
|
|
1631
|
-
states.error && (index.h("sqm-form-message", { type: "error", exportparts: "erroralert-icon" },
|
|
1632
|
-
index.h("div", { part: "erroralert-text" }, props.states.error))),
|
|
1633
|
-
content.formData,
|
|
1634
|
-
!states.hideInputs && (index.h("sl-input", Object.assign({ exportparts: "label: input-label, base: input-base", type: "email", name: "/email", label: content.emailLabel || "Email", disabled: states.loading, required: true, validationError: ({ value }) => {
|
|
1635
|
-
if (!value) {
|
|
1636
|
-
return content.requiredFieldErrorMessage;
|
|
1637
|
-
}
|
|
1638
|
-
// this matches shoelace validation, but could be better
|
|
1639
|
-
if (!value.includes("@")) {
|
|
1640
|
-
return content.invalidEmailErrorMessage;
|
|
1641
|
-
}
|
|
1642
|
-
} }, (((_b = (_a = states.registrationFormState) === null || _a === void 0 ? void 0 : _a.validationErrors) === null || _b === void 0 ? void 0 : _b.email) ? {
|
|
1643
|
-
class: sheet$2.classes.ErrorStyle,
|
|
1644
|
-
helpText: ((_d = (_c = states.registrationFormState) === null || _c === void 0 ? void 0 : _c.validationErrors) === null || _d === void 0 ? void 0 : _d.email) ||
|
|
1645
|
-
content.requiredFieldErrorMessage,
|
|
1646
|
-
}
|
|
1647
|
-
: [])))),
|
|
1648
|
-
!states.hideInputs && (index.h("sqm-password-field", { fieldLabel: content.passwordLabel, "disable-validation": states.disablePasswordValidation, meetsRequirementsText: content.meetsRequirementsText, doesNotMeetRequirementsText: content.doesNotMeetRequirementsText, minErrorText: content.minErrorText, uppercaseErrorText: content.uppercaseErrorText, lowercaseErrorText: content.lowercaseErrorText, hasErrorText: content.hasErrorText })),
|
|
1649
|
-
content.passwordField,
|
|
1650
|
-
!states.hideInputs && states.confirmPassword && (index.h("sl-input", Object.assign({ exportparts: "label: input-label, base: input-base", type: "password", name: "/confirmPassword", label: content.confirmPasswordLabel, disabled: states.loading || ((_e = states.registrationFormState) === null || _e === void 0 ? void 0 : _e.disabled), required: true }, (((_g = (_f = states.registrationFormState) === null || _f === void 0 ? void 0 : _f.initialData) === null || _g === void 0 ? void 0 : _g.confirmPassword) ? {
|
|
1651
|
-
value: (_j = (_h = states.registrationFormState) === null || _h === void 0 ? void 0 : _h.initialData) === null || _j === void 0 ? void 0 : _j.confirmPassword,
|
|
1652
|
-
}
|
|
1653
|
-
: {}), (((_l = (_k = states.registrationFormState) === null || _k === void 0 ? void 0 : _k.validationErrors) === null || _l === void 0 ? void 0 : _l.confirmPassword) ? {
|
|
1654
|
-
class: sheet$2.classes.ErrorStyle,
|
|
1655
|
-
helpText: ((_o = (_m = states.registrationFormState) === null || _m === void 0 ? void 0 : _m.validationErrors) === null || _o === void 0 ? void 0 : _o.confirmPassword) || content.requiredFieldErrorMessage,
|
|
1656
|
-
}
|
|
1657
|
-
: [])))),
|
|
1658
|
-
content.terms,
|
|
1659
|
-
index.h("div", { class: sheet$2.classes.ButtonsContainer },
|
|
1660
|
-
index.h("sl-button", { submit: true, loading: states.loading, exportparts: "base: primarybutton-base", type: "primary" }, content.submitLabel || "Register"),
|
|
1661
|
-
content.secondaryButton))));
|
|
1662
|
-
}
|
|
1663
|
-
|
|
1664
|
-
const style$3 = {
|
|
1665
|
-
ErrorStyle: {
|
|
1666
|
-
"&::part(control)": {
|
|
1667
|
-
background: "var(--sl-color-danger-10)",
|
|
1668
|
-
borderColor: "var(--sl-color-danger-500)",
|
|
1669
|
-
outline: "var(--sl-color-danger-500)",
|
|
1670
|
-
},
|
|
1671
|
-
"&:host": {
|
|
1672
|
-
"--focus-ring": "0 0 0 var(--sl-focus-ring-width) red !important",
|
|
1673
|
-
},
|
|
1068
|
+
query: referralsMonthQuery,
|
|
1674
1069
|
},
|
|
1675
|
-
|
|
1676
|
-
|
|
1677
|
-
|
|
1678
|
-
color: "var(--sl-color-danger-500)",
|
|
1679
|
-
fontSize: "var(--sl-input-help-text-font-size-medium)",
|
|
1680
|
-
fontFamily: "var(--sl-font-sans)",
|
|
1681
|
-
fontWeight: "var(--sl-font-weight-normal)",
|
|
1070
|
+
referralsWeek: {
|
|
1071
|
+
label: "Referrals - This Week",
|
|
1072
|
+
query: referralsWeekQuery,
|
|
1682
1073
|
},
|
|
1683
|
-
|
|
1684
|
-
|
|
1074
|
+
rewardsCount: {
|
|
1075
|
+
label: "Rewards",
|
|
1076
|
+
query: rewardsCountQuery,
|
|
1077
|
+
},
|
|
1078
|
+
rewardsCountFiltered: {
|
|
1079
|
+
label: "Rewards",
|
|
1080
|
+
query: rewardsCountFilteredQuery,
|
|
1081
|
+
},
|
|
1082
|
+
integrationRewardsCountFiltered: {
|
|
1083
|
+
label: "Rewards",
|
|
1084
|
+
query: integrationRewardsCountFilteredQuery,
|
|
1085
|
+
},
|
|
1086
|
+
rewardsMonth: {
|
|
1087
|
+
label: "Rewards - This Month",
|
|
1088
|
+
query: rewardsMonthQuery,
|
|
1089
|
+
},
|
|
1090
|
+
rewardsWeek: {
|
|
1091
|
+
label: "Rewards - This Week",
|
|
1092
|
+
query: rewardsWeekQuery,
|
|
1093
|
+
},
|
|
1094
|
+
rewardBalance: {
|
|
1095
|
+
label: "Balance - Credit Earned",
|
|
1096
|
+
query: rewardsBalanceQuery,
|
|
1097
|
+
},
|
|
1098
|
+
programGoals: {
|
|
1099
|
+
label: "Program Goals",
|
|
1100
|
+
query: programGoalsQuery,
|
|
1101
|
+
},
|
|
1102
|
+
customFields: {
|
|
1103
|
+
label: "Custom Fields",
|
|
1104
|
+
query: customFieldsQuery,
|
|
1105
|
+
},
|
|
1106
|
+
traffic: {
|
|
1107
|
+
label: "Traffic",
|
|
1108
|
+
query: trafficQuery,
|
|
1109
|
+
},
|
|
1110
|
+
userStats: {
|
|
1111
|
+
label: "User Stat",
|
|
1112
|
+
query: userStatsQuery,
|
|
1113
|
+
},
|
|
1114
|
+
payoutBalance: {
|
|
1115
|
+
label: "Payout Balance",
|
|
1116
|
+
query: payoutBalanceQuery,
|
|
1685
1117
|
},
|
|
1686
1118
|
};
|
|
1687
|
-
|
|
1688
|
-
|
|
1689
|
-
|
|
1690
|
-
|
|
1691
|
-
|
|
1692
|
-
}
|
|
1693
|
-
|
|
1694
|
-
|
|
1695
|
-
|
|
1696
|
-
|
|
1697
|
-
|
|
1698
|
-
|
|
1699
|
-
|
|
1700
|
-
}
|
|
1701
|
-
|
|
1702
|
-
|
|
1703
|
-
|
|
1704
|
-
|
|
1705
|
-
|
|
1706
|
-
|
|
1707
|
-
|
|
1708
|
-
|
|
1709
|
-
|
|
1710
|
-
|
|
1711
|
-
|
|
1712
|
-
|
|
1713
|
-
|
|
1714
|
-
|
|
1715
|
-
|
|
1716
|
-
|
|
1717
|
-
|
|
1718
|
-
|
|
1719
|
-
|
|
1720
|
-
|
|
1721
|
-
|
|
1722
|
-
|
|
1723
|
-
|
|
1724
|
-
|
|
1725
|
-
|
|
1726
|
-
|
|
1727
|
-
|
|
1728
|
-
|
|
1729
|
-
|
|
1730
|
-
|
|
1731
|
-
|
|
1732
|
-
|
|
1733
|
-
|
|
1734
|
-
|
|
1735
|
-
|
|
1736
|
-
|
|
1737
|
-
|
|
1119
|
+
// this should be exposed in documentation somehow
|
|
1120
|
+
const StatPaths = [
|
|
1121
|
+
{ name: "programGoals", route: "/(programGoals)/:metricType/:goalId" },
|
|
1122
|
+
{ name: "customFields", route: "/(customFields)/:customField" },
|
|
1123
|
+
{ name: "referralsCount", route: "/(referralsCount)/:status?" },
|
|
1124
|
+
{ name: "referralsMonth", route: "/(referralsMonth)/:status?" },
|
|
1125
|
+
{ name: "referralsWeek", route: "/(referralsWeek)/:status?" },
|
|
1126
|
+
{ name: "rewardsCount", route: "/(rewardsCount)/:global?" },
|
|
1127
|
+
{ name: "rewardsMonth", route: "/(rewardsMonth)/:global?" },
|
|
1128
|
+
{ name: "rewardsWeek", route: "/(rewardsWeek)/:global?" },
|
|
1129
|
+
{
|
|
1130
|
+
name: "rewardsCountFiltered",
|
|
1131
|
+
route: "/(rewardsCountFiltered)/:statType([INTEGRATION|PCT_DISCOUNT|CREDIT]*)?/:unit((?!global)(?!PENDING)(?!CANCELLED)(?!EXPIRED)(?!REDEEMED)(?!AVAILABLE)[a-zA-Z0-9%]+)?/:status([PENDING|CANCELLED|EXPIRED|REDEEMED|AVAILABLE]*)?/:global?",
|
|
1132
|
+
},
|
|
1133
|
+
{
|
|
1134
|
+
name: "integrationRewardsCountFiltered",
|
|
1135
|
+
route: "/(integrationRewardsCountFiltered)/:status([PENDING|CANCELLED|EXPIRED|REDEEMED|AVAILABLE]*)?/:global?",
|
|
1136
|
+
},
|
|
1137
|
+
{
|
|
1138
|
+
name: "rewardsAssigned",
|
|
1139
|
+
route: "/(rewardsAssigned)/:statType/:unit/:global?",
|
|
1140
|
+
},
|
|
1141
|
+
{
|
|
1142
|
+
name: "rewardsPending",
|
|
1143
|
+
route: "/(rewardsPending)/:statType/:unit/:global?",
|
|
1144
|
+
},
|
|
1145
|
+
{
|
|
1146
|
+
name: "rewardsRedeemed",
|
|
1147
|
+
route: "/(rewardsRedeemed)/:statType/:unit/:global?",
|
|
1148
|
+
},
|
|
1149
|
+
{
|
|
1150
|
+
name: "rewardsRedeemedWeek",
|
|
1151
|
+
route: "/(rewardsRedeemedWeek)/:statType/:unit/:global?",
|
|
1152
|
+
},
|
|
1153
|
+
{
|
|
1154
|
+
name: "rewardsRedeemedMonth",
|
|
1155
|
+
route: "/(rewardsRedeemedMonth)/:statType/:unit/:global?",
|
|
1156
|
+
},
|
|
1157
|
+
{
|
|
1158
|
+
name: "rewardsAvailable",
|
|
1159
|
+
route: "/(rewardsAvailable)/:statType/:unit/:global?",
|
|
1160
|
+
},
|
|
1161
|
+
{
|
|
1162
|
+
name: "rewardBalance",
|
|
1163
|
+
route: "/(rewardBalance)/:statType/:unit/:format([prettyValue|value]*)?/:global?",
|
|
1164
|
+
},
|
|
1165
|
+
{
|
|
1166
|
+
name: "traffic",
|
|
1167
|
+
route: "/(traffic)",
|
|
1168
|
+
},
|
|
1169
|
+
{
|
|
1170
|
+
name: "userStats",
|
|
1171
|
+
route: "/(userStats)/:statId",
|
|
1172
|
+
},
|
|
1173
|
+
{
|
|
1174
|
+
name: "payoutBalance",
|
|
1175
|
+
route: "/(payoutBalance)",
|
|
1176
|
+
},
|
|
1177
|
+
];
|
|
1178
|
+
const StatPatterns = StatPaths.map((pattern) => index$1.pathToRegexp(pattern.route));
|
|
1179
|
+
function useBigStat(props) {
|
|
1180
|
+
var _a;
|
|
1181
|
+
const { statType, flexReverse, alignment, programId = index_module.H(), } = props;
|
|
1182
|
+
// triggers a re-render if the label is manually changed
|
|
1183
|
+
useChildElements.useChildElements();
|
|
1184
|
+
const locale = index_module.L();
|
|
1185
|
+
const userIdent = index_module.J();
|
|
1186
|
+
const re = domContextHooks_module.useMemo(() => StatPatterns.find((re) => re.exec(statType)), [statType]);
|
|
1187
|
+
if (!(re === null || re === void 0 ? void 0 : re.exec(statType))) {
|
|
1188
|
+
return {
|
|
1189
|
+
props: {
|
|
1190
|
+
value: 0,
|
|
1191
|
+
statvalue: "!!!",
|
|
1192
|
+
flexReverse,
|
|
1193
|
+
alignment,
|
|
1194
|
+
loading: false,
|
|
1195
|
+
statTextColor: props.statTextColor,
|
|
1196
|
+
statFontSize: props.statFontSize,
|
|
1197
|
+
descriptionTextColor: props.descriptionTextColor,
|
|
1198
|
+
descriptionFontSize: props.descriptionFontSize,
|
|
1199
|
+
statFontWeight: props.statFontWeight,
|
|
1738
1200
|
},
|
|
1201
|
+
label: "BAD PROP TYPE",
|
|
1202
|
+
};
|
|
1203
|
+
}
|
|
1204
|
+
const result = re.exec(statType);
|
|
1205
|
+
const queryName = result[1];
|
|
1206
|
+
const statPath = StatPaths.find((pattern) => pattern.name === queryName);
|
|
1207
|
+
// Get a list all possible keys in path
|
|
1208
|
+
const keys = [];
|
|
1209
|
+
const regex = index$1.pathToRegexp(statPath === null || statPath === void 0 ? void 0 : statPath.route, keys, {
|
|
1210
|
+
strict: false,
|
|
1211
|
+
sensitive: false,
|
|
1212
|
+
end: true,
|
|
1213
|
+
});
|
|
1214
|
+
const allQueryArgs = regex.exec(statType);
|
|
1215
|
+
// Retrieve all key values in order including undefined
|
|
1216
|
+
const queryArgs = keys.map((_, i) => allQueryArgs[i + 1] ? decodeURIComponent(allQueryArgs[i + 1]) : undefined);
|
|
1217
|
+
// remove query name from list
|
|
1218
|
+
queryArgs.shift();
|
|
1219
|
+
const label = queries[queryName].label;
|
|
1220
|
+
const stat = (userIdent === null || userIdent === void 0 ? void 0 : userIdent.jwt) && queries[queryName].query(programId, locale, ...queryArgs);
|
|
1221
|
+
debug("stat:", stat);
|
|
1222
|
+
return {
|
|
1223
|
+
props: {
|
|
1224
|
+
value: stat === null || stat === void 0 ? void 0 : stat.value,
|
|
1225
|
+
statvalue: (_a = stat === null || stat === void 0 ? void 0 : stat.statvalue) !== null && _a !== void 0 ? _a : LOADING,
|
|
1226
|
+
loading: stat === null || stat === void 0 ? void 0 : stat.loading,
|
|
1227
|
+
flexReverse,
|
|
1228
|
+
alignment,
|
|
1229
|
+
statTextColor: props.statTextColor,
|
|
1230
|
+
statFontSize: props.statFontSize,
|
|
1231
|
+
descriptionTextColor: props.descriptionTextColor,
|
|
1232
|
+
descriptionFontSize: props.descriptionFontSize,
|
|
1233
|
+
statFontWeight: props.statFontWeight,
|
|
1739
1234
|
},
|
|
1740
|
-
|
|
1741
|
-
|
|
1742
|
-
|
|
1235
|
+
label,
|
|
1236
|
+
};
|
|
1237
|
+
}
|
|
1238
|
+
|
|
1239
|
+
function useDemoBigStat(props) {
|
|
1240
|
+
const { statType } = props;
|
|
1241
|
+
const re = domContextHooks_module.useMemo(() => StatPatterns.find((re) => re.exec(statType)), [statType]);
|
|
1242
|
+
// triggers a re-render if the label is manually changed
|
|
1243
|
+
useChildElements.useChildElements();
|
|
1244
|
+
if (!(re === null || re === void 0 ? void 0 : re.exec(statType))) {
|
|
1245
|
+
return {
|
|
1246
|
+
props: {
|
|
1247
|
+
value: 0,
|
|
1248
|
+
statvalue: "!!!",
|
|
1249
|
+
loading: false,
|
|
1250
|
+
flexReverse: props.flexReverse,
|
|
1251
|
+
alignment: props.alignment,
|
|
1252
|
+
statTextColor: props.statTextColor,
|
|
1253
|
+
statFontSize: props.statFontSize,
|
|
1254
|
+
descriptionTextColor: props.descriptionTextColor,
|
|
1255
|
+
descriptionFontSize: props.descriptionFontSize,
|
|
1743
1256
|
},
|
|
1744
|
-
|
|
1257
|
+
label: "BAD PROP TYPE",
|
|
1258
|
+
};
|
|
1259
|
+
}
|
|
1260
|
+
const result = re.exec(statType);
|
|
1261
|
+
const queryName = result[1];
|
|
1262
|
+
const label = queries[queryName].label;
|
|
1263
|
+
return {
|
|
1264
|
+
props: cjs.cjs({
|
|
1265
|
+
statvalue: "12345",
|
|
1266
|
+
value: 0,
|
|
1267
|
+
flexReverse: props.flexReverse,
|
|
1268
|
+
alignment: props.alignment,
|
|
1269
|
+
statTextColor: props.statTextColor,
|
|
1270
|
+
statFontSize: props.statFontSize,
|
|
1271
|
+
descriptionTextColor: props.descriptionTextColor,
|
|
1272
|
+
descriptionFontSize: props.descriptionFontSize,
|
|
1273
|
+
statFontWeight: props.statFontWeight,
|
|
1274
|
+
}, props.demoData || {}, { arrayMerge: (_, a) => a }),
|
|
1275
|
+
label: label !== null && label !== void 0 ? label : "Demo Label",
|
|
1745
1276
|
};
|
|
1746
|
-
const sheet = JSS.createStyleSheet(style);
|
|
1747
|
-
const styleString = sheet.toString();
|
|
1748
|
-
return (index.h("div", { class: sheet.classes.Container, part: "sqm-base" },
|
|
1749
|
-
index.h("style", { type: "text/css" }, styleString),
|
|
1750
|
-
index.h(sqmTextSpanView.TextSpanView, Object.assign({}, { type: "h2" }), text.emailPreferencesHeader),
|
|
1751
|
-
index.h("sl-form", { "onSl-submit": callbacks.onSubmit },
|
|
1752
|
-
index.h(CheckboxFieldView, { states: {
|
|
1753
|
-
checked: states.formState.marketingEmailOptIn,
|
|
1754
|
-
}, content: {
|
|
1755
|
-
checkboxLabel: text.marketingCheckboxLabel,
|
|
1756
|
-
checkboxName: "marketingEmailOptIn",
|
|
1757
|
-
}, callbacks: {
|
|
1758
|
-
setChecked: callbacks.setChecked,
|
|
1759
|
-
} }),
|
|
1760
|
-
index.h("sl-button", { class: sheet.classes.SubmitButton, type: "primary", submit: true, loading: states.loading, disabled: states.submitDisabled }, text.submitChangeButtonText),
|
|
1761
|
-
error && (index.h("sqm-form-message", { class: sheet.classes.Error, type: "error", exportparts: "erroralert-icon" },
|
|
1762
|
-
index.h("div", { part: "erroralert-text" }, error))),
|
|
1763
|
-
states.success && (index.h("sqm-form-message", { class: sheet.classes.Success, type: "success", exportparts: "successalert-icon" },
|
|
1764
|
-
index.h("div", { part: "successalert-text" }, states.text.successMessage))))));
|
|
1765
1277
|
}
|
|
1766
1278
|
|
|
1767
|
-
|
|
1279
|
+
function CardFeedView(props, children) {
|
|
1280
|
+
// Dependent on props, not feasiable to move out
|
|
1281
|
+
const style = {
|
|
1282
|
+
Container: {
|
|
1283
|
+
columnGap: props.gap + "px",
|
|
1284
|
+
columnWidth: props.width + "px",
|
|
1285
|
+
"& > div": {
|
|
1286
|
+
marginBottom: "24px",
|
|
1287
|
+
},
|
|
1288
|
+
},
|
|
1289
|
+
};
|
|
1290
|
+
const sheet = JSS.createStyleSheet(style);
|
|
1291
|
+
const styleString = sheet.toString();
|
|
1292
|
+
const vanillaStyle = `
|
|
1293
|
+
:host{
|
|
1294
|
+
display: block;
|
|
1295
|
+
}
|
|
1296
|
+
|
|
1297
|
+
`;
|
|
1298
|
+
return (index.h("div", null,
|
|
1299
|
+
index.h("style", { type: "text/css" },
|
|
1300
|
+
styleString,
|
|
1301
|
+
vanillaStyle),
|
|
1302
|
+
index.h("div", { class: sheet.classes.Container, part: "sqm-base" }, children)));
|
|
1303
|
+
}
|
|
1304
|
+
|
|
1305
|
+
const style$1 = {
|
|
1768
1306
|
Description: {
|
|
1307
|
+
"& .icon": {
|
|
1308
|
+
color: "var(--sqm-text)",
|
|
1309
|
+
"&:hover": {
|
|
1310
|
+
color: "var(--sqm-accent-color-icon)",
|
|
1311
|
+
},
|
|
1312
|
+
},
|
|
1769
1313
|
"& input[type=checkbox]": {
|
|
1770
1314
|
display: "none",
|
|
1771
1315
|
},
|
|
@@ -1803,16 +1347,16 @@ const style$4 = {
|
|
|
1803
1347
|
},
|
|
1804
1348
|
},
|
|
1805
1349
|
};
|
|
1806
|
-
const sheet$
|
|
1807
|
-
const styleString$
|
|
1350
|
+
const sheet$1 = JSS.createStyleSheet(style$1);
|
|
1351
|
+
const styleString$1 = sheet$1.toString();
|
|
1808
1352
|
function Details(props) {
|
|
1809
1353
|
const rid = Math.random().toString(36).slice(2);
|
|
1810
1354
|
return (index.h("div", { style: { opacity: props.opacity } },
|
|
1811
|
-
index.h("style", { type: "text/css" }, styleString$
|
|
1812
|
-
index.h("span", { class: sheet$
|
|
1355
|
+
index.h("style", { type: "text/css" }, styleString$1),
|
|
1356
|
+
index.h("span", { class: sheet$1.classes.Description },
|
|
1813
1357
|
index.h("input", { type: "checkbox", id: "details-" + rid }),
|
|
1814
1358
|
index.h("label", { class: "details", htmlFor: "details-" + rid },
|
|
1815
|
-
index.h("sl-icon", { exportparts: "base: chevron-icon", name: "chevron-down" })),
|
|
1359
|
+
index.h("sl-icon", { class: "icon", exportparts: "base: chevron-icon", name: "chevron-down" })),
|
|
1816
1360
|
index.h("span", { class: "summary", "progress-bar": props.progressBar }, props.content.description))));
|
|
1817
1361
|
}
|
|
1818
1362
|
|
|
@@ -1831,7 +1375,7 @@ const GreyGift = () => {
|
|
|
1831
1375
|
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: "#828282" })));
|
|
1832
1376
|
};
|
|
1833
1377
|
|
|
1834
|
-
const style$
|
|
1378
|
+
const style$2 = {
|
|
1835
1379
|
ProgressBar: {
|
|
1836
1380
|
"& .progress-bar": {
|
|
1837
1381
|
height: "0",
|
|
@@ -1878,7 +1422,8 @@ const style$5 = {
|
|
|
1878
1422
|
width: "100%",
|
|
1879
1423
|
height: "4px",
|
|
1880
1424
|
borderRadius: "4px",
|
|
1881
|
-
backgroundColor: "var(--
|
|
1425
|
+
backgroundColor: "var(--sqm-accent-color-icon)",
|
|
1426
|
+
background: "red",
|
|
1882
1427
|
},
|
|
1883
1428
|
"& .progress": {
|
|
1884
1429
|
display: "block",
|
|
@@ -1891,7 +1436,7 @@ const style$5 = {
|
|
|
1891
1436
|
width: "12px",
|
|
1892
1437
|
height: "12px",
|
|
1893
1438
|
display: "flex",
|
|
1894
|
-
backgroundColor: "var(--
|
|
1439
|
+
backgroundColor: "var(--sqm-accent-color-icon)",
|
|
1895
1440
|
borderRadius: "50%",
|
|
1896
1441
|
position: "relative",
|
|
1897
1442
|
left: "47%",
|
|
@@ -1943,14 +1488,14 @@ const style$5 = {
|
|
|
1943
1488
|
},
|
|
1944
1489
|
},
|
|
1945
1490
|
};
|
|
1946
|
-
const sheet$
|
|
1947
|
-
const styleString$
|
|
1491
|
+
const sheet$2 = JSS.createStyleSheet(style$2, { classNamePrefix: "sqm-prog-bar" });
|
|
1492
|
+
const styleString$2 = sheet$2.toString();
|
|
1948
1493
|
function ProgressBarView(props) {
|
|
1949
1494
|
const { progress = 0, goal = 1, steps = false, progressBarUnit = "", repeatable = false, complete = false, expired = false, finite = 0, opacity = "1", } = props;
|
|
1950
1495
|
let aggregate = buildProgressBar(repeatable, steps, props);
|
|
1951
1496
|
const { columns, items } = aggregate;
|
|
1952
|
-
return (index.h("div", { class: sheet$
|
|
1953
|
-
index.h("style", { type: "text/css" }, styleString$
|
|
1497
|
+
return (index.h("div", { class: sheet$2.classes.ProgressBar, "data-expired": expired, "data-complete": complete, "data-steps": steps, "data-done": goal <= progress, style: { opacity: opacity } },
|
|
1498
|
+
index.h("style", { type: "text/css" }, styleString$2),
|
|
1954
1499
|
index.h("div", { class: (!Boolean(finite) && progress >= 2 * goal) ||
|
|
1955
1500
|
(Boolean(finite) && progress > 2 * goal)
|
|
1956
1501
|
? "progress-bar repeatable-steps"
|
|
@@ -2244,29 +1789,29 @@ const arrow_left_right = () => {
|
|
|
2244
1789
|
function TaskCardView(props) {
|
|
2245
1790
|
var _a, _b;
|
|
2246
1791
|
const { callbacks, states, content } = props;
|
|
2247
|
-
console.log("
|
|
1792
|
+
console.log("buttonType ", content.buttonType);
|
|
2248
1793
|
const style = {
|
|
2249
1794
|
TaskCard: {
|
|
2250
1795
|
display: "inline-block",
|
|
2251
1796
|
width: "100%",
|
|
2252
1797
|
"& .main": {
|
|
2253
1798
|
position: "relative",
|
|
2254
|
-
boxSizing: "border-
|
|
2255
|
-
background: content.backgroundColor || "var(--
|
|
2256
|
-
border: `1px solid ${content.borderColor || "var(--
|
|
2257
|
-
borderRadius: "var(--
|
|
1799
|
+
boxSizing: "border-box",
|
|
1800
|
+
background: content.backgroundColor || "var(--sqm-portal-background)",
|
|
1801
|
+
border: `1px solid ${content.borderColor || "var(--sqm-border-color)"}`,
|
|
1802
|
+
borderRadius: "var(--sqm-border-radius-normal)",
|
|
2258
1803
|
boxShadow: "1px 2px 4px rgba(211, 211, 211, 0.2)",
|
|
2259
1804
|
fontSize: "var(--sl-font-size-small)",
|
|
2260
1805
|
lineHeight: "var(--sl-line-height-dense)",
|
|
2261
1806
|
color: content.textColor || "var(--sqm-text)",
|
|
2262
1807
|
},
|
|
2263
1808
|
"& .main.complete": {
|
|
2264
|
-
|
|
2265
|
-
borderColor:
|
|
1809
|
+
opacity: "0.8",
|
|
1810
|
+
borderColor: "var(--sqm-accent-color-border)",
|
|
2266
1811
|
},
|
|
2267
1812
|
"& .main.expired": {
|
|
2268
1813
|
color: content.textColor || "var(--sqm-text)",
|
|
2269
|
-
|
|
1814
|
+
opacity: "0.8",
|
|
2270
1815
|
},
|
|
2271
1816
|
"& .title": {
|
|
2272
1817
|
fontSize: "var(--sl-font-size-medium)",
|
|
@@ -2287,7 +1832,7 @@ function TaskCardView(props) {
|
|
|
2287
1832
|
padding: "var(--sl-spacing-medium)",
|
|
2288
1833
|
color: content.textColor || "var(--sl-color-primary-600)",
|
|
2289
1834
|
border: `1px solid ${content.borderColor || "var(--sl-color-neutral-200)"}`,
|
|
2290
|
-
borderRadius: "var(--
|
|
1835
|
+
borderRadius: "var(--sqm-border-radius-normal) var(--sqm-border-radius-normal) 0 0",
|
|
2291
1836
|
borderBottom: "none",
|
|
2292
1837
|
background: content.backgroundColor || "var(--sl-color-primary-50)",
|
|
2293
1838
|
fontWeight: "var(--sl-font-weight-semibold)",
|
|
@@ -2304,7 +1849,7 @@ function TaskCardView(props) {
|
|
|
2304
1849
|
padding: "var(--sl-spacing-medium)",
|
|
2305
1850
|
color: content.textColor || "var(--sl-color-warning-600)",
|
|
2306
1851
|
border: `1px solid ${content.borderColor || "var(--sl-color-neutral-200)"}`,
|
|
2307
|
-
borderRadius: "var(--
|
|
1852
|
+
borderRadius: "var(--sqm-border-radius-normal) var(--sqm-border-radius-normal) 0 0",
|
|
2308
1853
|
borderBottom: "none",
|
|
2309
1854
|
background: content.backgroundColor || "var(--sl-color-warning-50)",
|
|
2310
1855
|
fontWeight: "var(--sl-font-weight-semibold)",
|
|
@@ -2323,7 +1868,7 @@ function TaskCardView(props) {
|
|
|
2323
1868
|
top: "5%",
|
|
2324
1869
|
alignSelf: "center",
|
|
2325
1870
|
lineHeight: "0",
|
|
2326
|
-
color:
|
|
1871
|
+
color: "var(--sqm-accent-color-icon)",
|
|
2327
1872
|
fontSize: "var(--sl-font-size-large)",
|
|
2328
1873
|
marginRight: "var(--sl-spacing-x-small)",
|
|
2329
1874
|
},
|
|
@@ -2385,7 +1930,7 @@ function TaskCardView(props) {
|
|
|
2385
1930
|
},
|
|
2386
1931
|
};
|
|
2387
1932
|
const sheet = JSS.createStyleSheet(style);
|
|
2388
|
-
const
|
|
1933
|
+
const contentString = sheet.toString();
|
|
2389
1934
|
const dateStart = content.rewardDuration &&
|
|
2390
1935
|
luxon.luxon.DateTime.fromISO(content.rewardDuration.split("/")[0]);
|
|
2391
1936
|
const dateEnd = content.rewardDuration &&
|
|
@@ -2420,7 +1965,7 @@ function TaskCardView(props) {
|
|
|
2420
1965
|
`;
|
|
2421
1966
|
return (index.h("div", { class: sheet.classes.TaskCard, part: "sqm-base" },
|
|
2422
1967
|
index.h("style", { type: "text/css" },
|
|
2423
|
-
|
|
1968
|
+
contentString,
|
|
2424
1969
|
vanillaStyle),
|
|
2425
1970
|
!states.loading && taskNotStarted && (index.h("div", { class: sheet.classes.NotStarted },
|
|
2426
1971
|
index.h("span", { class: "icon" },
|
|
@@ -2446,7 +1991,7 @@ function TaskCardView(props) {
|
|
|
2446
1991
|
}))),
|
|
2447
1992
|
index.h("div", { part: "sqm-style-container", style: {
|
|
2448
1993
|
borderRadius: taskUnavailable &&
|
|
2449
|
-
"0 0 var(--
|
|
1994
|
+
"0 0 var(--sqm-border-radius-normal) var(--sqm-border-radius-normal)",
|
|
2450
1995
|
}, class: taskUnavailable
|
|
2451
1996
|
? "main expired"
|
|
2452
1997
|
: taskComplete
|
|
@@ -2468,7 +2013,7 @@ function TaskCardView(props) {
|
|
|
2468
2013
|
opacity: taskComplete || taskUnavailable ? "0.45" : "1",
|
|
2469
2014
|
} }, content.cardTitle)),
|
|
2470
2015
|
states.loading ? (index.h("sl-skeleton", { style: { margin: "var(--sl-spacing-medium) 0" } })) : (content.description && (index.h(Details, Object.assign({}, props, { opacity: taskComplete || taskUnavailable ? "0.45" : "1" })))),
|
|
2471
|
-
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, { opacity: taskComplete || taskUnavailable ? "0.
|
|
2016
|
+
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, { opacity: taskComplete || taskUnavailable ? "0.75" : "1", complete: taskComplete, expired: taskUnavailable })))),
|
|
2472
2017
|
index.h("div", { class: sheet.classes.Footer, "data-subdue": taskComplete || taskUnavailable }, states.loading ? (index.h("sl-skeleton", { style: { width: "25%", marginLeft: "auto" } })) : (index.h("div", { style: { display: "contents" } },
|
|
2473
2018
|
index.h("span", { class: "text" },
|
|
2474
2019
|
content.repeatable && (index.h("div", null,
|
|
@@ -2498,116 +2043,407 @@ function TaskCardView(props) {
|
|
|
2498
2043
|
.setLocale(utils.luxonLocale(states.locale))
|
|
2499
2044
|
.toLocaleString(luxon.luxon.DateTime.DATETIME_MED),
|
|
2500
2045
|
})))),
|
|
2501
|
-
content.hideButton ? ("") : (index.h("sl-button", { exportparts: `base: ${content.
|
|
2502
|
-
? "primary"
|
|
2503
|
-
: "secondary"}button-base`, id: "sl-button", type: content.buttonStyle === "primary" ? "primary" : "default", size: "small", onClick: callbacks.onClick, loading: states.loadingEvent, disabled: taskComplete || taskUnavailable, style: {
|
|
2046
|
+
content.hideButton ? ("") : (index.h("sl-button", { exportparts: `base: ${content.buttonType || "primary"}button-base`, type: "primary", id: "sl-button", size: "small", onClick: callbacks.onClick, loading: states.loadingEvent, disabled: taskComplete || taskUnavailable, style: {
|
|
2504
2047
|
opacity: taskComplete || taskUnavailable ? "0.45" : "1",
|
|
2505
2048
|
} }, content.buttonText)))))))));
|
|
2506
2049
|
}
|
|
2507
2050
|
|
|
2508
|
-
|
|
2509
|
-
|
|
2510
|
-
|
|
2511
|
-
|
|
2512
|
-
|
|
2513
|
-
|
|
2514
|
-
|
|
2515
|
-
|
|
2516
|
-
|
|
2517
|
-
|
|
2518
|
-
|
|
2519
|
-
|
|
2520
|
-
|
|
2521
|
-
|
|
2522
|
-
|
|
2523
|
-
|
|
2524
|
-
index.h("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M370.781 87.48C358.581 87.48 347.981 91.38 339.981 98.38V89.28H319.481V226.08H339.981V177.78C347.881 185.08 358.581 188.78 370.781 188.78C398.781 188.78 419.881 166.88 419.881 138.08C419.981 109.28 398.781 87.48 370.781 87.48ZM368.881 169.58C351.481 169.58 338.881 156.38 338.881 138.28C338.881 120.38 351.381 106.98 368.881 106.98C386.281 106.98 398.881 120.08 398.881 138.28C398.881 156.48 386.381 169.58 368.881 169.58Z", fill: color }),
|
|
2525
|
-
index.h("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M701.782 169.88C707.682 169.88 714.082 167.58 719.582 163.98L721.482 162.88L731.482 178.68L729.782 179.88C721.282 186.28 710.982 189.58 700.382 189.58C678.082 189.58 665.782 176.38 665.782 152.28V108.68H645.682V89.3799H665.782V59.8799H686.482V89.2798H725.682V108.48H686.482V151.88C686.482 163.38 691.982 169.88 701.782 169.88Z", fill: color }),
|
|
2526
|
-
index.h("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M511.681 89.4797V98.7797C503.681 91.4797 493.181 87.6797 480.981 87.6797C452.981 87.6797 431.981 109.68 431.981 138.68C431.981 167.78 453.081 189.68 480.981 189.68C493.181 189.68 503.681 185.78 511.681 178.38V187.68H532.381V89.4797H511.681ZM482.881 169.88C465.481 169.88 452.781 156.58 452.781 138.48C452.781 120.48 465.281 106.98 482.881 106.98C500.481 106.98 512.781 120.08 512.781 138.48C512.781 156.68 500.181 169.88 482.881 169.88Z", fill: color }),
|
|
2527
|
-
index.h("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M595.281 107.08C604.181 107.08 611.781 110.38 618.781 116.98L620.481 118.68L633.981 104.58L632.581 102.98C623.781 92.98 610.781 87.48 595.781 87.48C565.981 87.48 544.481 109.08 544.481 138.48C544.481 167.98 565.981 189.48 595.781 189.48C610.481 189.48 623.681 183.98 632.581 174.08L633.981 172.58L620.981 158.18L619.281 159.88C612.481 166.48 603.981 169.98 595.481 169.98C578.381 169.98 565.681 156.68 565.681 138.58C565.581 120.58 577.881 107.08 595.281 107.08Z", fill: color }),
|
|
2528
|
-
index.h("path", { d: "M34.6815 112.78C40.6815 112.78 46.5815 114.18 51.8815 116.68C57.2815 119.18 62.0815 122.78 65.9815 127.28C67.9815 122.68 69.0815 117.78 69.0815 112.88C69.0815 108.38 68.1815 103.88 66.4815 99.8799C64.6815 95.6799 62.1815 91.9799 58.9815 88.8799C55.7815 85.7799 51.9815 83.2799 47.7815 81.4799C43.5815 79.7799 39.0815 78.8799 34.5815 78.8799C30.0815 78.8799 25.5815 79.6799 21.3815 81.4799C17.1815 83.1799 13.3815 85.7799 10.1815 88.8799C6.98154 91.9799 4.48154 95.7799 2.68154 99.8799C0.881541 104.08 0.081543 108.38 0.081543 112.88C0.181543 117.88 1.18154 122.78 3.18154 127.28C7.08154 122.68 11.8815 119.18 17.1815 116.68C22.7815 113.98 28.7815 112.68 34.6815 112.78Z", fill: color }),
|
|
2529
|
-
index.h("path", { d: "M69.1817 153.48C69.1817 146.68 67.1817 140.18 63.2817 134.48C59.4817 128.88 54.0817 124.48 47.7817 121.88C41.4817 119.28 34.4817 118.68 27.7817 119.88C21.0817 121.28 14.8817 124.48 10.0817 129.28C5.28166 134.08 1.88166 140.08 0.681661 146.78C-0.718339 153.48 0.0816607 160.18 2.68166 166.48C5.28166 172.78 9.68166 178.08 15.4817 181.78C21.0817 185.58 27.7817 187.48 34.6817 187.48C43.7817 187.38 52.5817 183.88 59.0817 177.38C65.6817 170.98 69.1817 162.58 69.1817 153.48Z", fill: color }),
|
|
2530
|
-
index.h("path", { d: "M69.1817 34.9799C69.1817 28.1799 67.1817 21.6799 63.2817 15.9799C59.4817 10.3799 54.1817 5.9799 47.7817 3.3799C41.4817 0.779901 34.4817 0.1799 27.7817 1.3799C21.0817 2.7799 14.8817 5.97986 10.0817 10.7799C5.28166 15.5799 1.88166 21.5799 0.681661 28.2799C-0.718339 34.9799 0.0816607 41.6799 2.68166 47.9799C5.28166 54.2799 9.68166 59.5799 15.4817 63.2799C21.0817 67.0799 27.7817 68.9799 34.6817 68.9799C43.8817 68.9799 52.6817 65.3799 59.1817 58.9799C65.5817 52.6799 69.1817 43.8799 69.1817 34.9799Z", fill: color }),
|
|
2531
|
-
index.h("path", { d: "M962.664 203.95C953.044 203.95 945.244 201.285 939.264 195.955C933.284 190.495 930.294 183.41 930.294 174.7C930.294 165.08 933.739 157.605 940.629 152.275C947.649 146.945 957.464 144.28 970.074 144.28H993.864V138.43C993.864 129.72 991.589 123.09 987.039 118.54C982.619 113.86 976.184 111.52 967.734 111.52C962.014 111.52 956.749 112.885 951.939 115.615C947.129 118.345 943.229 122.18 940.239 127.12L933.999 120.295C937.639 114.575 942.384 110.22 948.234 107.23C954.214 104.11 960.974 102.55 968.514 102.55C979.694 102.55 988.404 105.605 994.644 111.715C1001.01 117.695 1004.2 126.015 1004.2 136.675V184.255C1004.2 188.805 1004.98 194.72 1006.54 202H997.569C996.399 199.14 995.554 194.07 995.034 186.79H994.644C990.874 192.25 986.259 196.475 980.799 199.465C975.339 202.455 969.294 203.95 962.664 203.95ZM962.664 195.175C968.124 195.175 973.259 194.07 978.069 191.86C982.879 189.52 986.714 186.465 989.574 182.695C992.434 178.795 993.864 174.7 993.864 170.41V152.665H969.489C960.389 152.665 953.239 154.615 948.039 158.515C942.969 162.415 940.434 167.81 940.434 174.7C940.434 180.68 942.514 185.62 946.674 189.52C950.834 193.29 956.164 195.175 962.664 195.175Z", fill: color }),
|
|
2532
|
-
index.h("path", { d: "M1067.55 203.95C1055.07 203.95 1045.25 199.27 1038.1 189.91C1030.95 180.55 1027.38 167.745 1027.38 151.495C1027.38 136.415 1031.02 124.52 1038.3 115.81C1045.71 106.97 1055.72 102.55 1068.33 102.55C1074.7 102.55 1080.55 104.045 1085.88 107.035C1091.21 110.025 1095.5 114.25 1098.75 119.71H1099.14V57.3101H1109.67V178.21C1109.67 189.13 1109.86 197.06 1110.25 202H1100.89C1100.63 197.84 1100.5 192.12 1100.5 184.84H1100.11C1097.12 190.69 1092.7 195.37 1086.85 198.88C1081 202.26 1074.57 203.95 1067.55 203.95ZM1068.13 195.175C1077.23 195.175 1084.64 192.185 1090.36 186.205C1096.21 180.225 1099.14 172.49 1099.14 163V146.815C1099.14 135.895 1096.41 127.25 1090.95 120.88C1085.49 114.38 1078.08 111.13 1068.72 111.13C1059.1 111.13 1051.49 114.77 1045.9 122.05C1040.44 129.2 1037.71 139.145 1037.71 151.885C1037.71 165.275 1040.44 175.87 1045.9 183.67C1051.36 191.34 1058.77 195.175 1068.13 195.175Z", fill: color }),
|
|
2533
|
-
index.h("path", { d: "M1208.57 104.5L1172.3 202H1161.96L1125.5 104.5H1136.61L1167.03 189.715L1197.45 104.5H1208.57Z", fill: color }),
|
|
2534
|
-
index.h("path", { d: "M1261.51 203.95C1252.54 203.95 1244.61 201.87 1237.72 197.71C1230.96 193.55 1225.7 187.635 1221.93 179.965C1218.29 172.295 1216.47 163.39 1216.47 153.25C1216.47 143.11 1218.29 134.205 1221.93 126.535C1225.7 118.865 1230.96 112.95 1237.72 108.79C1244.61 104.63 1252.54 102.55 1261.51 102.55C1270.48 102.55 1278.35 104.63 1285.11 108.79C1292 112.95 1297.33 118.865 1301.1 126.535C1304.87 134.205 1306.75 143.11 1306.75 153.25C1306.75 163.39 1304.87 172.295 1301.1 179.965C1297.33 187.635 1292 193.55 1285.11 197.71C1278.35 201.87 1270.48 203.95 1261.51 203.95ZM1261.51 195.37C1268.4 195.37 1274.45 193.615 1279.65 190.105C1284.98 186.595 1289.07 181.655 1291.93 175.285C1294.79 168.915 1296.22 161.57 1296.22 153.25C1296.22 144.93 1294.79 137.585 1291.93 131.215C1289.07 124.845 1284.98 119.905 1279.65 116.395C1274.45 112.885 1268.4 111.13 1261.51 111.13C1254.75 111.13 1248.71 112.885 1243.38 116.395C1238.18 119.905 1234.15 124.845 1231.29 131.215C1228.43 137.585 1227 144.93 1227 153.25C1227 161.57 1228.43 168.915 1231.29 175.285C1234.15 181.655 1238.18 186.595 1243.38 190.105C1248.71 193.615 1254.75 195.37 1261.51 195.37Z", fill: color }),
|
|
2535
|
-
index.h("path", { d: "M1366.03 203.95C1352.25 203.95 1341.52 199.53 1333.85 190.69C1326.31 181.72 1322.54 169.24 1322.54 153.25C1322.54 137.39 1326.38 124.975 1334.05 116.005C1341.72 107.035 1352.38 102.55 1366.03 102.55C1373.57 102.55 1380.26 104.11 1386.11 107.23C1391.96 110.22 1396.77 114.575 1400.54 120.295L1394.3 126.34C1391.31 121.66 1387.28 118.02 1382.21 115.42C1377.27 112.69 1371.88 111.325 1366.03 111.325C1355.76 111.325 1347.63 115.03 1341.65 122.44C1335.8 129.85 1332.88 140.12 1332.88 153.25C1332.88 166.38 1335.8 176.65 1341.65 184.06C1347.63 191.47 1355.76 195.175 1366.03 195.175C1371.88 195.175 1377.27 193.875 1382.21 191.275C1387.28 188.545 1391.31 184.84 1394.3 180.16L1400.54 186.205C1396.77 191.925 1391.96 196.345 1386.11 199.465C1380.26 202.455 1373.57 203.95 1366.03 203.95Z", fill: color }),
|
|
2536
|
-
index.h("path", { d: "M1446.55 203.95C1436.93 203.95 1429.13 201.285 1423.15 195.955C1417.17 190.495 1414.18 183.41 1414.18 174.7C1414.18 165.08 1417.62 157.605 1424.51 152.275C1431.53 146.945 1441.35 144.28 1453.96 144.28H1477.75V138.43C1477.75 129.72 1475.47 123.09 1470.92 118.54C1466.5 113.86 1460.07 111.52 1451.62 111.52C1445.9 111.52 1440.63 112.885 1435.82 115.615C1431.01 118.345 1427.11 122.18 1424.12 127.12L1417.88 120.295C1421.52 114.575 1426.27 110.22 1432.12 107.23C1438.1 104.11 1444.86 102.55 1452.4 102.55C1463.58 102.55 1472.29 105.605 1478.53 111.715C1484.9 117.695 1488.08 126.015 1488.08 136.675V184.255C1488.08 188.805 1488.86 194.72 1490.42 202H1481.45C1480.28 199.14 1479.44 194.07 1478.92 186.79H1478.53C1474.76 192.25 1470.14 196.475 1464.68 199.465C1459.22 202.455 1453.18 203.95 1446.55 203.95ZM1446.55 195.175C1452.01 195.175 1457.14 194.07 1461.95 191.86C1466.76 189.52 1470.6 186.465 1473.46 182.695C1476.32 178.795 1477.75 174.7 1477.75 170.41V152.665H1453.37C1444.27 152.665 1437.12 154.615 1431.92 158.515C1426.85 162.415 1424.32 167.81 1424.32 174.7C1424.32 180.68 1426.4 185.62 1430.56 189.52C1434.72 193.29 1440.05 195.175 1446.55 195.175Z", fill: color }),
|
|
2537
|
-
index.h("path", { d: "M1547.14 203.95C1539.08 203.95 1532.97 201.48 1528.81 196.54C1524.65 191.47 1522.57 184.19 1522.57 174.7V113.275H1505.02V104.5H1522.57V77.9801L1532.32 74.6651H1533.1V104.5H1560.59V113.275H1533.1V172.555C1533.1 180.355 1534.33 186.01 1536.8 189.52C1539.27 193.03 1543.17 194.785 1548.5 194.785C1553.83 194.785 1558.06 194.005 1561.18 192.445L1562.35 200.83C1558.19 202.91 1553.12 203.95 1547.14 203.95Z", fill: color }),
|
|
2538
|
-
index.h("path", { d: "M1661.53 157.54H1589.77C1590.42 169.37 1593.54 178.535 1599.13 185.035C1604.85 191.535 1612.65 194.785 1622.53 194.785C1628.51 194.785 1633.97 193.485 1638.91 190.885C1643.98 188.285 1647.95 184.645 1650.81 179.965L1657.24 186.4C1653.34 192.12 1648.4 196.475 1642.42 199.465C1636.57 202.455 1629.94 203.95 1622.53 203.95C1609.01 203.95 1598.35 199.465 1590.55 190.495C1582.88 181.525 1579.05 169.175 1579.05 153.445C1579.05 137.585 1582.82 125.17 1590.36 116.2C1597.9 107.1 1608.23 102.55 1621.36 102.55C1633.84 102.55 1643.66 106.84 1650.81 115.42C1657.96 124 1661.53 135.895 1661.53 151.105V157.54ZM1651.39 147.4C1651.39 136.48 1648.66 127.77 1643.2 121.27C1637.74 114.77 1630.46 111.52 1621.36 111.52C1611.74 111.52 1604.2 114.77 1598.74 121.27C1593.28 127.77 1590.29 137.065 1589.77 149.155H1651.39V147.4Z", fill: color })));
|
|
2051
|
+
const style$3 = {
|
|
2052
|
+
Wrapper: { ...mixins.AuthWrapper, "max-width": "600px" },
|
|
2053
|
+
Column: mixins.AuthColumn,
|
|
2054
|
+
HostBlock: mixins.HostBlock,
|
|
2055
|
+
":host": {
|
|
2056
|
+
margin: "0 auto",
|
|
2057
|
+
width: "100%",
|
|
2058
|
+
},
|
|
2059
|
+
ButtonsContainer: mixins.AuthButtonsContainer,
|
|
2060
|
+
ErrorStyle: mixins.ErrorStyles,
|
|
2061
|
+
};
|
|
2062
|
+
const vanillaStyle = `
|
|
2063
|
+
sqm-portal-register {
|
|
2064
|
+
margin: 0 auto;
|
|
2065
|
+
width: 100%;
|
|
2066
|
+
display: block;
|
|
2539
2067
|
}
|
|
2540
2068
|
|
|
2541
|
-
|
|
2069
|
+
:host{
|
|
2070
|
+
display: block;
|
|
2071
|
+
}
|
|
2072
|
+
|
|
2073
|
+
:host([hidden]) {
|
|
2074
|
+
display: none;
|
|
2075
|
+
}
|
|
2076
|
+
`;
|
|
2077
|
+
const sheet$3 = JSS.createStyleSheet(style$3);
|
|
2078
|
+
const styleString$3 = sheet$3.toString();
|
|
2079
|
+
function PortalRegisterView(props) {
|
|
2080
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
|
|
2081
|
+
const { states, refs, callbacks, content } = props;
|
|
2082
|
+
if (states.error) {
|
|
2083
|
+
window.scrollTo({ top: 0, left: 0, behavior: "smooth" });
|
|
2084
|
+
}
|
|
2085
|
+
return (index.h("div", { class: sheet$3.classes.Wrapper, part: "sqm-base" },
|
|
2086
|
+
index.h("style", { type: "text/css" },
|
|
2087
|
+
vanillaStyle,
|
|
2088
|
+
styleString$3),
|
|
2089
|
+
index.h(sqmTextSpanView.TextSpanView, { type: "h3" }, content.pageLabel),
|
|
2090
|
+
index.h("sl-form", { class: sheet$3.classes.Column, "onSl-submit": callbacks.submit, ref: (el) => (refs.formRef.current = el), novalidate: true },
|
|
2091
|
+
states.error && (index.h("sqm-form-message", { type: "error", exportparts: "erroralert-icon" },
|
|
2092
|
+
index.h("div", { part: "erroralert-text" }, props.states.error))),
|
|
2093
|
+
content.formData,
|
|
2094
|
+
!states.hideInputs && (index.h("sl-input", Object.assign({ exportparts: "label: input-label, base: input-base", type: "email", name: "/email", label: content.emailLabel || "Email", disabled: states.loading, required: true, validationError: ({ value }) => {
|
|
2095
|
+
if (!value) {
|
|
2096
|
+
return content.requiredFieldErrorMessage;
|
|
2097
|
+
}
|
|
2098
|
+
// this matches shoelace validation, but could be better
|
|
2099
|
+
if (!value.includes("@")) {
|
|
2100
|
+
return content.invalidEmailErrorMessage;
|
|
2101
|
+
}
|
|
2102
|
+
} }, (((_b = (_a = states.registrationFormState) === null || _a === void 0 ? void 0 : _a.validationErrors) === null || _b === void 0 ? void 0 : _b.email) ? {
|
|
2103
|
+
class: sheet$3.classes.ErrorStyle,
|
|
2104
|
+
helpText: ((_d = (_c = states.registrationFormState) === null || _c === void 0 ? void 0 : _c.validationErrors) === null || _d === void 0 ? void 0 : _d.email) ||
|
|
2105
|
+
content.requiredFieldErrorMessage,
|
|
2106
|
+
}
|
|
2107
|
+
: [])))),
|
|
2108
|
+
!states.hideInputs && (index.h("sqm-password-field", { fieldLabel: content.passwordLabel, "disable-validation": states.disablePasswordValidation, meetsRequirementsText: content.meetsRequirementsText, doesNotMeetRequirementsText: content.doesNotMeetRequirementsText, minErrorText: content.minErrorText, uppercaseErrorText: content.uppercaseErrorText, lowercaseErrorText: content.lowercaseErrorText, hasErrorText: content.hasErrorText })),
|
|
2109
|
+
content.passwordField,
|
|
2110
|
+
!states.hideInputs && states.confirmPassword && (index.h("sl-input", Object.assign({ exportparts: "label: input-label, base: input-base", type: "password", name: "/confirmPassword", label: content.confirmPasswordLabel, disabled: states.loading || ((_e = states.registrationFormState) === null || _e === void 0 ? void 0 : _e.disabled), required: true }, (((_g = (_f = states.registrationFormState) === null || _f === void 0 ? void 0 : _f.initialData) === null || _g === void 0 ? void 0 : _g.confirmPassword) ? {
|
|
2111
|
+
value: (_j = (_h = states.registrationFormState) === null || _h === void 0 ? void 0 : _h.initialData) === null || _j === void 0 ? void 0 : _j.confirmPassword,
|
|
2112
|
+
}
|
|
2113
|
+
: {}), (((_l = (_k = states.registrationFormState) === null || _k === void 0 ? void 0 : _k.validationErrors) === null || _l === void 0 ? void 0 : _l.confirmPassword) ? {
|
|
2114
|
+
class: sheet$3.classes.ErrorStyle,
|
|
2115
|
+
helpText: ((_o = (_m = states.registrationFormState) === null || _m === void 0 ? void 0 : _m.validationErrors) === null || _o === void 0 ? void 0 : _o.confirmPassword) || content.requiredFieldErrorMessage,
|
|
2116
|
+
}
|
|
2117
|
+
: [])))),
|
|
2118
|
+
content.terms,
|
|
2119
|
+
index.h("div", { class: sheet$3.classes.ButtonsContainer },
|
|
2120
|
+
index.h("sl-button", { submit: true, loading: states.loading, exportparts: "base: primarybutton-base", type: "primary" }, content.submitLabel || "Register"),
|
|
2121
|
+
content.secondaryButton))));
|
|
2122
|
+
}
|
|
2123
|
+
|
|
2124
|
+
const style$4 = {
|
|
2125
|
+
ErrorStyle: {
|
|
2126
|
+
"&::part(control)": {
|
|
2127
|
+
background: "var(--sl-color-danger-10)",
|
|
2128
|
+
borderColor: "var(--sl-color-danger-500)",
|
|
2129
|
+
outline: "var(--sl-color-danger-500)",
|
|
2130
|
+
},
|
|
2131
|
+
"&:host": {
|
|
2132
|
+
"--focus-ring": "0 0 0 var(--sl-focus-ring-width) red !important",
|
|
2133
|
+
},
|
|
2134
|
+
},
|
|
2135
|
+
ErrorMessageStyle: {
|
|
2136
|
+
margin: 0,
|
|
2137
|
+
marginTop: "5px",
|
|
2138
|
+
color: "var(--sl-color-danger-500)",
|
|
2139
|
+
fontSize: "var(--sl-input-help-text-font-size-medium)",
|
|
2140
|
+
fontFamily: "var(--sl-font-sans)",
|
|
2141
|
+
fontWeight: "var(--sl-font-weight-normal)",
|
|
2142
|
+
},
|
|
2143
|
+
FieldContainer: {
|
|
2144
|
+
"margin-bottom": "var(--sl-spacing-large)",
|
|
2145
|
+
},
|
|
2146
|
+
};
|
|
2147
|
+
const vanillaStyle$1 = `
|
|
2148
|
+
:host {
|
|
2149
|
+
margin: 0 auto;
|
|
2150
|
+
width: 100%;
|
|
2151
|
+
display: block;
|
|
2152
|
+
}
|
|
2153
|
+
sl-checkbox::part(label){
|
|
2154
|
+
font-size: var(--sl-input-label-font-size-small);
|
|
2155
|
+
font-weight: var(--sl-font-weight-normal);
|
|
2156
|
+
line-height: 20px;
|
|
2157
|
+
}
|
|
2158
|
+
sl-checkbox::part(base){
|
|
2159
|
+
align-items: start;
|
|
2160
|
+
}
|
|
2161
|
+
`;
|
|
2162
|
+
JSS.jss.setup(JSS.create());
|
|
2163
|
+
const sheet$4 = JSS.jss.createStyleSheet(style$4);
|
|
2164
|
+
const styleString$4 = sheet$4.toString();
|
|
2165
|
+
function CheckboxFieldView(props) {
|
|
2166
|
+
var _b, _c;
|
|
2167
|
+
const { states, content, callbacks } = props;
|
|
2168
|
+
return (index.h("div", { class: sheet$4.classes.FieldContainer, part: "sqm-base" },
|
|
2169
|
+
index.h("style", { type: "text/css" },
|
|
2170
|
+
vanillaStyle$1,
|
|
2171
|
+
styleString$4),
|
|
2172
|
+
index.h("sl-checkbox", Object.assign({ exportparts: "label: input-label, base: input-base", name: `/${content.checkboxName}`, checked: states.checked, "onSl-change": (e) => {
|
|
2173
|
+
e.target.value = e.target.checked;
|
|
2174
|
+
callbacks.setChecked(e.target.value);
|
|
2175
|
+
} }, (!content.checkboxOptional ? { required: false } : []), { disabled: ((_b = states.registrationFormState) === null || _b === void 0 ? void 0 : _b.loading) || ((_c = states.registrationFormState) === null || _c === void 0 ? void 0 : _c.disabled), required: false }), global.intl.formatMessage({
|
|
2176
|
+
id: content.checkboxName + "-message",
|
|
2177
|
+
defaultMessage: content.checkboxLabel,
|
|
2178
|
+
}, {
|
|
2179
|
+
labelLink: (index.h("a", { href: content.checkboxLabelLink, target: "_blank" }, content.checkboxLabelLinkText || content.checkboxLabelLink)),
|
|
2180
|
+
}))));
|
|
2181
|
+
}
|
|
2182
|
+
|
|
2183
|
+
function CouponCodeView(props) {
|
|
2184
|
+
const error = !props.loading && props.error;
|
|
2185
|
+
const style = {
|
|
2186
|
+
HostBlock: mixins.HostBlock,
|
|
2187
|
+
couponCodeLabel: {
|
|
2188
|
+
margin: "var(--sl-spacing-x-small) 0",
|
|
2189
|
+
color: props.textColor || "var(--sqm-text-subdued)",
|
|
2190
|
+
fontSize: "var(--sl-font-size-small)",
|
|
2191
|
+
},
|
|
2192
|
+
};
|
|
2193
|
+
const vanillaStyle = `
|
|
2542
2194
|
:host{
|
|
2543
|
-
|
|
2195
|
+
display: block;
|
|
2544
2196
|
width: 100%;
|
|
2545
2197
|
}
|
|
2546
|
-
|
|
2547
|
-
|
|
2548
|
-
|
|
2549
|
-
|
|
2198
|
+
`;
|
|
2199
|
+
const sheet = JSS.createStyleSheet(style);
|
|
2200
|
+
const styleString = sheet.toString();
|
|
2201
|
+
return (index.h("div", null,
|
|
2202
|
+
index.h("style", { type: "text/css" },
|
|
2203
|
+
styleString,
|
|
2204
|
+
vanillaStyle),
|
|
2205
|
+
index.h("p", { class: sheet.classes.couponCodeLabel, style: { textAlign: props.textAlign } }, props.couponCodeLabel),
|
|
2206
|
+
error ? (index.h("sqm-form-message", { type: props.errorType, exportparts: "erroralert-icon" },
|
|
2207
|
+
index.h("div", { part: "erroralert-text" }, props.errorText))) : (index.h(copyTextView.CopyTextView, Object.assign({}, props)))));
|
|
2208
|
+
}
|
|
2209
|
+
|
|
2210
|
+
const style$5 = {
|
|
2211
|
+
ErrorStyle: {
|
|
2212
|
+
"--sl-input-border-color": "var(--sl-color-danger-500)",
|
|
2213
|
+
"--sl-input-background-color": "var(--sl-color-danger-10)",
|
|
2214
|
+
"--sl-input-border-color-focus": "var(--sl-color-danger-500)",
|
|
2215
|
+
"--sl-input-border-color-hover": "var(--sl-color-danger-500)",
|
|
2216
|
+
},
|
|
2217
|
+
ErrorMessageStyle: {
|
|
2218
|
+
margin: 0,
|
|
2219
|
+
color: "var(--sl-color-danger-500)",
|
|
2220
|
+
fontSize: "var(--sl-input-help-text-font-size-medium)",
|
|
2221
|
+
},
|
|
2222
|
+
FieldContainer: {
|
|
2223
|
+
"margin-bottom": "var(--sl-spacing-large)",
|
|
2224
|
+
},
|
|
2225
|
+
};
|
|
2226
|
+
const vanillaStyle$2 = `
|
|
2227
|
+
:host {
|
|
2228
|
+
margin: 0 auto;
|
|
2229
|
+
width: 100%;
|
|
2230
|
+
display: block;
|
|
2231
|
+
}
|
|
2232
|
+
sl-select::part(label){
|
|
2233
|
+
font-size: var(--sl-input-label-font-size-small);
|
|
2234
|
+
font-weight: var(--sl-font-weight-semibold);
|
|
2235
|
+
}
|
|
2236
|
+
`;
|
|
2237
|
+
JSS.jss.setup(JSS.create());
|
|
2238
|
+
const sheet$5 = JSS.jss.createStyleSheet(style$5);
|
|
2239
|
+
const styleString$5 = sheet$5.toString();
|
|
2240
|
+
function DropdownFieldView(props) {
|
|
2241
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
2242
|
+
const { states, content } = props;
|
|
2243
|
+
const validationErrors = (_a = states === null || states === void 0 ? void 0 : states.registrationFormState) === null || _a === void 0 ? void 0 : _a.validationErrors;
|
|
2244
|
+
return (index.h("div", { class: sheet$5.classes.FieldContainer, part: "sqm-base" },
|
|
2245
|
+
index.h("style", { type: "text/css" },
|
|
2246
|
+
vanillaStyle$2,
|
|
2247
|
+
styleString$5),
|
|
2248
|
+
index.h("sl-select", Object.assign({ exportparts: "label: input-label, base: input-base", label: content.dropdownLabel, name: `/${content.dropdownName}` }, (!content.dropdownOptional ? { required: true } : []), { disabled: ((_b = states.registrationFormState) === null || _b === void 0 ? void 0 : _b.loading) || ((_c = states.registrationFormState) === null || _c === void 0 ? void 0 : _c.disabled) }, (((_e = (_d = states.registrationFormState) === null || _d === void 0 ? void 0 : _d.initialData) === null || _e === void 0 ? void 0 : _e[content.dropdownName]) ? {
|
|
2249
|
+
value: (_g = (_f = states.registrationFormState) === null || _f === void 0 ? void 0 : _f.initialData) === null || _g === void 0 ? void 0 : _g[content.dropdownName],
|
|
2250
|
+
}
|
|
2251
|
+
: {}), ((validationErrors === null || validationErrors === void 0 ? void 0 : validationErrors[content.dropdownName]) ? {
|
|
2252
|
+
class: sheet$5.classes.ErrorStyle,
|
|
2253
|
+
}
|
|
2254
|
+
: [])), content.selectOptions),
|
|
2255
|
+
(validationErrors === null || validationErrors === void 0 ? void 0 : validationErrors[content.dropdownName]) && (index.h("p", { class: sheet$5.classes.ErrorMessageStyle }, global.intl.formatMessage({
|
|
2256
|
+
id: `errorMessage-${content.dropdownName}`,
|
|
2257
|
+
defaultMessage: content.errorMessage,
|
|
2258
|
+
})))));
|
|
2259
|
+
}
|
|
2260
|
+
|
|
2261
|
+
const EditProfileView = (props) => {
|
|
2262
|
+
var _a, _b, _c, _d;
|
|
2263
|
+
const { states, callbacks } = props;
|
|
2264
|
+
const { text } = states;
|
|
2265
|
+
const { errors } = states.formState;
|
|
2266
|
+
if (states.showEdit) {
|
|
2267
|
+
return (index.h("div", { class: `CardWrapper ${!states.showEdit && "ShowEdit"}`, part: "sqm-base" },
|
|
2268
|
+
index.h("h2", { part: "sqm-header", style: {
|
|
2269
|
+
fontSize: "var(--sl-font-size-x-large)",
|
|
2270
|
+
margin: "0px",
|
|
2271
|
+
textAlign: "center",
|
|
2272
|
+
} }, text.editprofileheader),
|
|
2273
|
+
index.h("form", { class: "FormWrapper", onSubmit: callbacks.onSubmit },
|
|
2274
|
+
index.h("div", { class: "FormSection" },
|
|
2275
|
+
states.formState.error && (index.h("sqm-form-message", { type: "error", exportparts: "erroralert-icon" },
|
|
2276
|
+
index.h("div", { part: "erroralert-text" }, states.formState.error))),
|
|
2277
|
+
index.h("sl-input", Object.assign({ exportparts: "label: input-label, base: input-base", value: states.formState.firstName, onInput: callbacks.onChange, label: text.firstnametext, disabled: states.loading }, (errors.firstName && errors.firstName.status !== "valid"
|
|
2278
|
+
? { class: "ErrorStyles", helpText: text.fieldEmptyText }
|
|
2279
|
+
: []), { id: "firstName", name: "firstName", error: errors.firstName && errors.firstName.status !== "valid"
|
|
2280
|
+
? errors.firstName.message
|
|
2281
|
+
: undefined })),
|
|
2282
|
+
index.h("sl-input", Object.assign({ exportparts: "label: input-label, base: input-base", value: states.formState.lastName, onInput: callbacks.onChange, label: text.lastnametext, disabled: states.loading, id: "lastName", name: "lastName" }, (errors.lastName && errors.lastName.status !== "valid"
|
|
2283
|
+
? { class: "ErrorStyles", helpText: text.fieldEmptyText }
|
|
2284
|
+
: []), { error: errors.lastName && errors.lastName.status !== "valid"
|
|
2285
|
+
? errors.lastName.message
|
|
2286
|
+
: undefined }))),
|
|
2287
|
+
text.showregion && states.formState.currentRegion && (index.h("sl-input", { exportparts: "label: input-label, base: input-base", disabled: true, value: states.formState.currentRegion, label: text.currentregiontext, id: "currentRegion", name: "currentRegion" })),
|
|
2288
|
+
index.h("div", { class: "ButtonWrapper" },
|
|
2289
|
+
index.h("sl-button", { type: "primary", loading: states.loading, disabled: states.submitDisabled, onClick: (e) => {
|
|
2290
|
+
callbacks.onSubmit(e);
|
|
2291
|
+
}, submit: true, exportparts: "base: primarybutton-base" }, text.updatetext),
|
|
2292
|
+
index.h("sl-button", { onClick: () => {
|
|
2293
|
+
callbacks.setShowEdit(false);
|
|
2294
|
+
}, type: "secondary", exportparts: "base: secondarybutton-base" }, text.canceltext)))));
|
|
2550
2295
|
}
|
|
2551
|
-
|
|
2552
|
-
|
|
2296
|
+
return (index.h("div", { class: `CardWrapper FormWrapper ${!states.showEdit && "ShowEdit"}`, part: "sqm-base" },
|
|
2297
|
+
index.h("div", { class: "FormSection" },
|
|
2298
|
+
index.h("h2", { part: "sqm-header", style: {
|
|
2299
|
+
fontSize: "var(--sl-font-size-x-large)",
|
|
2300
|
+
marginBottom: "0px",
|
|
2301
|
+
textAlign: "center",
|
|
2302
|
+
} }, text.editprofileheader),
|
|
2303
|
+
index.h("div", null,
|
|
2304
|
+
index.h("p", { style: { fontSize: "var(--sl-font-size-medium)" } }, (_a = states.user) === null || _a === void 0 ? void 0 :
|
|
2305
|
+
_a.firstName,
|
|
2306
|
+
" ", (_b = states.user) === null || _b === void 0 ? void 0 :
|
|
2307
|
+
_b.lastName),
|
|
2308
|
+
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))),
|
|
2309
|
+
index.h("sl-button", { type: "primary", loading: states.loading, onClick: () => {
|
|
2310
|
+
callbacks.resetForm();
|
|
2311
|
+
callbacks.setShowEdit(true);
|
|
2312
|
+
}, exportparts: "base: primarybutton-base" }, text.editprofiletext)));
|
|
2313
|
+
};
|
|
2314
|
+
|
|
2315
|
+
function LeaderboardView(props) {
|
|
2316
|
+
var _a, _b, _c;
|
|
2317
|
+
const { states, data, elements } = props;
|
|
2318
|
+
const { styles } = states;
|
|
2553
2319
|
const style = {
|
|
2554
|
-
|
|
2555
|
-
|
|
2556
|
-
|
|
2557
|
-
|
|
2320
|
+
Leaderboard: {
|
|
2321
|
+
"& table": {
|
|
2322
|
+
width: "100%",
|
|
2323
|
+
borderCollapse: "collapse",
|
|
2324
|
+
background: styles.background || "transparent",
|
|
2325
|
+
borderRadius: styles.borderRadius ? `${styles.borderRadius}px` : "0",
|
|
2558
2326
|
},
|
|
2559
|
-
|
|
2560
|
-
|
|
2561
|
-
|
|
2562
|
-
|
|
2563
|
-
|
|
2564
|
-
|
|
2565
|
-
color: "var(--sl-color-gray-600)",
|
|
2566
|
-
"padding-top": `var(--sl-spacing-${props.paddingTop})`,
|
|
2567
|
-
"padding-right": `var(--sl-spacing-${props.paddingRight})`,
|
|
2568
|
-
"padding-bottom": `var(--sl-spacing-${props.paddingBottom})`,
|
|
2569
|
-
"padding-left": `var(--sl-spacing-${props.paddingLeft})`,
|
|
2570
|
-
"row-gap": `var(--sl-spacing-small)`,
|
|
2571
|
-
"& a:hover": {
|
|
2572
|
-
color: "var(--sl-color-gray-900)",
|
|
2327
|
+
"& th": {
|
|
2328
|
+
textAlign: "left",
|
|
2329
|
+
padding: "var(--sl-spacing-medium)",
|
|
2330
|
+
paddingTop: "0",
|
|
2331
|
+
fontSize: "var(--sl-font-size-medium)",
|
|
2332
|
+
fontWeight: "var(--sl-font-weight-semibold)",
|
|
2573
2333
|
},
|
|
2574
|
-
|
|
2575
|
-
|
|
2576
|
-
textAlign: "center",
|
|
2577
|
-
margin: 0,
|
|
2578
|
-
},
|
|
2579
|
-
PoweredByLink: {
|
|
2580
|
-
color: "var(--sl-color-gray-400)",
|
|
2581
|
-
"font-size": "var(--sl-font-size-small)",
|
|
2582
|
-
display: "flex",
|
|
2583
|
-
alignItems: "center",
|
|
2584
|
-
svg: {
|
|
2585
|
-
marginTop: "2px",
|
|
2586
|
-
shapeRendering: "geometricprecision",
|
|
2334
|
+
"& tr:not(:first-child)": {
|
|
2335
|
+
borderTop: `var(--sqm-bordr-thickness) solid ${styles.borderColor || "var(--sqm-border-color)"}`,
|
|
2587
2336
|
},
|
|
2588
|
-
"
|
|
2589
|
-
|
|
2337
|
+
"& td": {
|
|
2338
|
+
fontSize: "var(--sl-font-size-medium)",
|
|
2339
|
+
fontWeight: "var(--sl-font-weight-normal)",
|
|
2340
|
+
},
|
|
2341
|
+
"& .ellipses": {
|
|
2342
|
+
textAlign: "left",
|
|
2343
|
+
padding: "0",
|
|
2344
|
+
color: styles.textColor || "var(--sqm-text)",
|
|
2345
|
+
paddingLeft: "25%",
|
|
2346
|
+
},
|
|
2347
|
+
"& .highlight": {
|
|
2348
|
+
background: styles.viewingUserHighlightColor ||
|
|
2349
|
+
"var(--sqm-accent-color-background)",
|
|
2350
|
+
"& td, th": {
|
|
2351
|
+
color: styles.viewingUserHighlightTextColor || "var(--sqm-text)",
|
|
2352
|
+
},
|
|
2353
|
+
},
|
|
2354
|
+
"& td, th": {
|
|
2355
|
+
color: styles.textColor || "var(--sqm-text)",
|
|
2356
|
+
padding: "var(--sl-spacing-medium)",
|
|
2357
|
+
},
|
|
2358
|
+
"& .User": {
|
|
2359
|
+
width: "100%",
|
|
2360
|
+
},
|
|
2361
|
+
"& .Score": {
|
|
2362
|
+
width: "auto",
|
|
2363
|
+
whiteSpace: "nowrap",
|
|
2364
|
+
},
|
|
2365
|
+
"& .Rank": {
|
|
2366
|
+
whiteSpace: "nowrap",
|
|
2367
|
+
},
|
|
2368
|
+
"& .fullWidth": {
|
|
2369
|
+
width: "100%",
|
|
2590
2370
|
},
|
|
2591
2371
|
},
|
|
2592
2372
|
};
|
|
2593
2373
|
const sheet = JSS.createStyleSheet(style);
|
|
2594
2374
|
const styleString = sheet.toString();
|
|
2595
|
-
|
|
2375
|
+
const vanillaStyle = `
|
|
2376
|
+
:host{
|
|
2377
|
+
display: block;
|
|
2378
|
+
}
|
|
2379
|
+
`;
|
|
2380
|
+
if (states.isEssentials) {
|
|
2381
|
+
return (index.h("sqm-empty", { "empty-state-image": "https://res.cloudinary.com/saasquatch/image/upload/v1715360191/squatch-assets/Leaderboard_Not_Available.svg", "empty-state-header": "Leaderboards aren\u2019t available on your plan", "empty-state-text": "Contact {supportText} to upgrade your plan and start leveraging gamification in your program.", "support-text": "Support" }));
|
|
2382
|
+
}
|
|
2383
|
+
if (states.loading) {
|
|
2384
|
+
return (index.h("div", { class: sheet.classes.Leaderboard, style: { width: styles.width || "100%" } },
|
|
2385
|
+
index.h("style", { type: "text/css" },
|
|
2386
|
+
styleString,
|
|
2387
|
+
vanillaStyle),
|
|
2388
|
+
index.h("table", null, [...Array(10)].map(() => {
|
|
2389
|
+
return (index.h("tr", null,
|
|
2390
|
+
index.h("td", null,
|
|
2391
|
+
index.h("sl-skeleton", null))));
|
|
2392
|
+
}))));
|
|
2393
|
+
}
|
|
2394
|
+
if (!states.hasLeaders)
|
|
2395
|
+
return elements.empty;
|
|
2396
|
+
let userSeenFlag = false;
|
|
2397
|
+
const getUsersName = (user) => {
|
|
2398
|
+
if (!user.firstName && !user.lastInitial)
|
|
2399
|
+
return styles.anonymousUser;
|
|
2400
|
+
const { firstName, lastInitial } = user;
|
|
2401
|
+
if (firstName && lastInitial)
|
|
2402
|
+
return `${firstName} ${lastInitial}`;
|
|
2403
|
+
if (firstName || lastInitial)
|
|
2404
|
+
return firstName || lastInitial;
|
|
2405
|
+
return styles.anonymousUser;
|
|
2406
|
+
};
|
|
2407
|
+
const getRankCellText = (userRank, isViewingUsersRow) => {
|
|
2408
|
+
if (!userRank) {
|
|
2409
|
+
return styles.hideNames ? `${styles.viewingUserText}` : "-";
|
|
2410
|
+
}
|
|
2411
|
+
const viewingUserText = ` - ${styles.viewingUserText}`;
|
|
2412
|
+
return styles.rankSuffix
|
|
2413
|
+
? global.intl.formatMessage({
|
|
2414
|
+
id: "rank",
|
|
2415
|
+
defaultMessage: styles.rankSuffix,
|
|
2416
|
+
}, {
|
|
2417
|
+
rank: userRank,
|
|
2418
|
+
}) + `${isViewingUsersRow && styles.hideNames ? viewingUserText : ""}`
|
|
2419
|
+
: `${userRank} ${isViewingUsersRow && styles.hideNames ? viewingUserText : ""}`;
|
|
2420
|
+
};
|
|
2421
|
+
return (index.h("div", { class: sheet.classes.Leaderboard, part: "sqm-base", style: { width: styles.width || "100%" } },
|
|
2596
2422
|
index.h("style", { type: "text/css" },
|
|
2597
|
-
|
|
2598
|
-
|
|
2599
|
-
index.h("
|
|
2600
|
-
|
|
2601
|
-
|
|
2602
|
-
|
|
2603
|
-
|
|
2604
|
-
|
|
2605
|
-
|
|
2606
|
-
|
|
2607
|
-
|
|
2608
|
-
|
|
2609
|
-
|
|
2610
|
-
|
|
2423
|
+
styleString,
|
|
2424
|
+
vanillaStyle),
|
|
2425
|
+
index.h("table", { part: "sqm-table" },
|
|
2426
|
+
index.h("tr", null,
|
|
2427
|
+
styles.showRank && (index.h("th", { class: `Rank ${styles.hideNames ? "fullWidth" : ""}` }, styles.rankheading)),
|
|
2428
|
+
!styles.hideNames && index.h("th", { class: "User" }, styles.usersheading),
|
|
2429
|
+
index.h("th", { class: "Score" }, styles.statsheading)), (_a = data.leaderboard) === null || _a === void 0 ? void 0 :
|
|
2430
|
+
_a.map((user) => {
|
|
2431
|
+
var _a, _b;
|
|
2432
|
+
if (user.rowNumber === ((_a = data.viewerRank) === null || _a === void 0 ? void 0 : _a.rowNumber))
|
|
2433
|
+
userSeenFlag = true;
|
|
2434
|
+
const isViewingUsersRow = !styles.hideViewer && user.rowNumber === ((_b = data.viewerRank) === null || _b === void 0 ? void 0 : _b.rowNumber);
|
|
2435
|
+
return (index.h("tr", { class: isViewingUsersRow ? "highlight" : "" },
|
|
2436
|
+
styles.showRank && (index.h("td", { class: "Rank" }, getRankCellText(user.rank, isViewingUsersRow))),
|
|
2437
|
+
!styles.hideNames && index.h("td", { class: "User" }, getUsersName(user)),
|
|
2438
|
+
index.h("td", { class: "Score" }, user.textValue)));
|
|
2439
|
+
}),
|
|
2440
|
+
!userSeenFlag && !styles.hideViewer && (index.h("tr", null,
|
|
2441
|
+
index.h("td", { colSpan: 100, class: "ellipses" },
|
|
2442
|
+
index.h("sl-icon", { name: "three-dots", style: { verticalAlign: "middle" } })))),
|
|
2443
|
+
!userSeenFlag && !styles.hideViewer && (index.h("tr", { class: "highlight" },
|
|
2444
|
+
styles.showRank && (index.h("td", { class: "Rank" }, getRankCellText((_b = data.viewerRank) === null || _b === void 0 ? void 0 : _b.rank, true))),
|
|
2445
|
+
!styles.hideNames && (index.h("td", { class: "User" }, getUsersName(data.viewerRank || {}))),
|
|
2446
|
+
index.h("td", { class: "Score" }, ((_c = data.viewerRank) === null || _c === void 0 ? void 0 : _c.textValue) || "0"))))));
|
|
2611
2447
|
}
|
|
2612
2448
|
|
|
2613
2449
|
const paddingList = [
|
|
@@ -2723,55 +2559,25 @@ function HeroView(props) {
|
|
|
2723
2559
|
display: contents;
|
|
2724
2560
|
}
|
|
2725
2561
|
img{
|
|
2726
|
-
max-width: 100%;
|
|
2727
|
-
height: auto;
|
|
2728
|
-
}
|
|
2729
|
-
|
|
2730
|
-
`;
|
|
2731
|
-
// NOTE: Spacing on the columns is controlled on the slots itself. For example using inline styling
|
|
2732
|
-
return (index.h("div", { class: sheet.classes.Container, part: "sqm-base" },
|
|
2733
|
-
index.h("style", { type: "text/css" },
|
|
2734
|
-
vanillaStyle,
|
|
2735
|
-
styleString),
|
|
2736
|
-
states.columns == 2 ? (index.h("div", { class: sheet.classes.TwoColumnContainer, part: "sqm-two-col-container" },
|
|
2737
|
-
index.h("div", { part: "sqm-two-col-primary-col", class: `${sheet.classes.ColumnWrapper} ${sheet.classes.ColumnPadding}` }, content.primaryColumn),
|
|
2738
|
-
index.h("div", { part: "sqm-two-col-secondary-col", class: `${sheet.classes.ColumnWrapper} ${sheet.classes.ColumnPadding}` }, content.secondaryColumn))) : (index.h("div", { part: "sqm-single-col", class: `${sheet.classes.SingleColumnContainer} ${sheet.classes.ColumnPadding}` }, content.primaryColumn))));
|
|
2739
|
-
}
|
|
2740
|
-
|
|
2741
|
-
function ReferralIframeView(props) {
|
|
2742
|
-
const { states, data } = props;
|
|
2743
|
-
const { content } = states;
|
|
2744
|
-
// dependent on props
|
|
2745
|
-
const style = {
|
|
2746
|
-
Container: {
|
|
2747
|
-
position: "relative",
|
|
2748
|
-
width: content.iframeWidth,
|
|
2749
|
-
height: content.iframeHeight,
|
|
2750
|
-
},
|
|
2751
|
-
IFrame: {
|
|
2752
|
-
position: "absolute",
|
|
2753
|
-
width: "100%",
|
|
2754
|
-
height: "100%",
|
|
2755
|
-
border: "0",
|
|
2756
|
-
top: "0",
|
|
2757
|
-
left: "0",
|
|
2758
|
-
right: "0",
|
|
2759
|
-
},
|
|
2760
|
-
};
|
|
2761
|
-
// JSS config
|
|
2762
|
-
const sheet = JSS.createStyleSheet(style);
|
|
2763
|
-
const styleString = sheet.toString();
|
|
2764
|
-
return (index.h("div", { class: sheet.classes.Container },
|
|
2765
|
-
index.h("style", { type: "text/css" }, styleString),
|
|
2766
|
-
index.h("iframe", { class: sheet.classes.IFrame, src: `${content.iframeSrc}?rsCode=${data.shareCode}` })));
|
|
2562
|
+
max-width: 100%;
|
|
2563
|
+
height: auto;
|
|
2564
|
+
}
|
|
2565
|
+
|
|
2566
|
+
`;
|
|
2567
|
+
// NOTE: Spacing on the columns is controlled on the slots itself. For example using inline styling
|
|
2568
|
+
return (index.h("div", { class: sheet.classes.Container, part: "sqm-base" },
|
|
2569
|
+
index.h("style", { type: "text/css" },
|
|
2570
|
+
vanillaStyle,
|
|
2571
|
+
styleString),
|
|
2572
|
+
states.columns == 2 ? (index.h("div", { class: sheet.classes.TwoColumnContainer, part: "sqm-two-col-container" },
|
|
2573
|
+
index.h("div", { part: "sqm-two-col-primary-col", class: `${sheet.classes.ColumnWrapper} ${sheet.classes.ColumnPadding}` }, content.primaryColumn),
|
|
2574
|
+
index.h("div", { part: "sqm-two-col-secondary-col", class: `${sheet.classes.ColumnWrapper} ${sheet.classes.ColumnPadding}` }, content.secondaryColumn))) : (index.h("div", { part: "sqm-single-col", class: `${sheet.classes.SingleColumnContainer} ${sheet.classes.ColumnPadding}` }, content.primaryColumn))));
|
|
2767
2575
|
}
|
|
2768
2576
|
|
|
2769
2577
|
const style$6 = {
|
|
2770
2578
|
ErrorStyle: mixins.ErrorStyles,
|
|
2771
|
-
|
|
2772
|
-
"
|
|
2773
|
-
"margin-bottom": "var(--sl-spacing-large)",
|
|
2774
|
-
},
|
|
2579
|
+
FieldContainer: {
|
|
2580
|
+
"margin-bottom": "var(--sl-spacing-large)",
|
|
2775
2581
|
},
|
|
2776
2582
|
};
|
|
2777
2583
|
const vanillaStyle$3 = `
|
|
@@ -2780,54 +2586,37 @@ const vanillaStyle$3 = `
|
|
|
2780
2586
|
width: 100%;
|
|
2781
2587
|
display: block;
|
|
2782
2588
|
}
|
|
2783
|
-
|
|
2784
|
-
sl-input::part(label){
|
|
2785
|
-
font-size: var(--sl-input-label-font-size-small);
|
|
2786
|
-
font-weight: var(--sl-font-weight-semibold);
|
|
2787
|
-
}
|
|
2788
2589
|
`;
|
|
2789
|
-
|
|
2590
|
+
JSS.jss.setup(JSS.create());
|
|
2591
|
+
const sheet$6 = JSS.jss.createStyleSheet(style$6);
|
|
2790
2592
|
const styleString$6 = sheet$6.toString();
|
|
2791
|
-
function
|
|
2792
|
-
var _a, _b, _c, _d, _e, _f, _g
|
|
2793
|
-
const { states } = props;
|
|
2593
|
+
function InputFieldView(props) {
|
|
2594
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
2595
|
+
const { states, content } = props;
|
|
2794
2596
|
const validationErrors = (_a = states === null || states === void 0 ? void 0 : states.registrationFormState) === null || _a === void 0 ? void 0 : _a.validationErrors;
|
|
2795
|
-
return (index.h("div", { class: sheet$6.classes.
|
|
2597
|
+
return (index.h("div", { class: sheet$6.classes.FieldContainer, part: "sqm-base" },
|
|
2796
2598
|
index.h("style", { type: "text/css" },
|
|
2797
2599
|
vanillaStyle$3,
|
|
2798
2600
|
styleString$6),
|
|
2799
|
-
index.h("sl-input", Object.assign({ exportparts: "label: input-label, base: input-base", name:
|
|
2800
|
-
value: (_g = (_f = states.registrationFormState) === null || _f === void 0 ? void 0 : _f.initialData) === null || _g === void 0 ? void 0 : _g.
|
|
2801
|
-
}
|
|
2802
|
-
: {}), ((validationErrors === null || validationErrors === void 0 ? void 0 : validationErrors.firstName) ? {
|
|
2803
|
-
class: sheet$6.classes.ErrorStyle,
|
|
2804
|
-
helpText: (validationErrors === null || validationErrors === void 0 ? void 0 : validationErrors.firstName) || "Cannot be empty",
|
|
2805
|
-
}
|
|
2806
|
-
: []))),
|
|
2807
|
-
index.h("sl-input", Object.assign({ exportparts: "label: input-label, base: input-base", name: "/lastName", type: "text", label: states.content.lastNameLabel, required: true, disabled: ((_h = states.registrationFormState) === null || _h === void 0 ? void 0 : _h.loading) || ((_j = states.registrationFormState) === null || _j === void 0 ? void 0 : _j.disabled) }, (((_l = (_k = states.registrationFormState) === null || _k === void 0 ? void 0 : _k.initialData) === null || _l === void 0 ? void 0 : _l.lastName) ? {
|
|
2808
|
-
value: (_o = (_m = states.registrationFormState) === null || _m === void 0 ? void 0 : _m.initialData) === null || _o === void 0 ? void 0 : _o.lastName,
|
|
2601
|
+
index.h("sl-input", Object.assign({ exportparts: "label: input-label, base: input-base", name: `/${content.fieldName}`, type: content.fieldType, label: content.fieldLabel }, (!content.fieldOptional ? { required: true } : []), { disabled: ((_b = states.registrationFormState) === null || _b === void 0 ? void 0 : _b.loading) || ((_c = states.registrationFormState) === null || _c === void 0 ? void 0 : _c.disabled) }, (((_e = (_d = states.registrationFormState) === null || _d === void 0 ? void 0 : _d.initialData) === null || _e === void 0 ? void 0 : _e[content.fieldName]) ? {
|
|
2602
|
+
value: (_g = (_f = states.registrationFormState) === null || _f === void 0 ? void 0 : _f.initialData) === null || _g === void 0 ? void 0 : _g[content.fieldName],
|
|
2809
2603
|
}
|
|
2810
|
-
: {}), ((validationErrors === null || validationErrors === void 0 ? void 0 : validationErrors.
|
|
2604
|
+
: {}), ((validationErrors === null || validationErrors === void 0 ? void 0 : validationErrors[content.fieldName]) ? {
|
|
2811
2605
|
class: sheet$6.classes.ErrorStyle,
|
|
2812
|
-
helpText: (
|
|
2606
|
+
helpText: global.intl.formatMessage({
|
|
2607
|
+
id: `errorMessage-${content.fieldName}`,
|
|
2608
|
+
defaultMessage: content.errorMessage || (validationErrors === null || validationErrors === void 0 ? void 0 : validationErrors[content.fieldName]),
|
|
2609
|
+
}),
|
|
2813
2610
|
}
|
|
2814
2611
|
: [])))));
|
|
2815
2612
|
}
|
|
2816
2613
|
|
|
2817
2614
|
const style$7 = {
|
|
2818
|
-
ErrorStyle:
|
|
2819
|
-
|
|
2820
|
-
"
|
|
2821
|
-
|
|
2822
|
-
|
|
2823
|
-
},
|
|
2824
|
-
ErrorMessageStyle: {
|
|
2825
|
-
margin: 0,
|
|
2826
|
-
color: "var(--sl-color-danger-500)",
|
|
2827
|
-
fontSize: "var(--sl-input-help-text-font-size-medium)",
|
|
2828
|
-
},
|
|
2829
|
-
FieldContainer: {
|
|
2830
|
-
"margin-bottom": "var(--sl-spacing-large)",
|
|
2615
|
+
ErrorStyle: mixins.ErrorStyles,
|
|
2616
|
+
FieldsContainer: {
|
|
2617
|
+
"& sl-input": {
|
|
2618
|
+
"margin-bottom": "var(--sl-spacing-large)",
|
|
2619
|
+
},
|
|
2831
2620
|
},
|
|
2832
2621
|
};
|
|
2833
2622
|
const vanillaStyle$4 = `
|
|
@@ -2836,70 +2625,259 @@ const vanillaStyle$4 = `
|
|
|
2836
2625
|
width: 100%;
|
|
2837
2626
|
display: block;
|
|
2838
2627
|
}
|
|
2839
|
-
|
|
2840
|
-
|
|
2628
|
+
|
|
2629
|
+
*::part(input-label), *::part(select-label), *::part(textarea-label){
|
|
2630
|
+
font-size: var(--sqm-input-label-font-size, var(--sl-input-font-size-small));
|
|
2841
2631
|
font-weight: var(--sl-font-weight-semibold);
|
|
2632
|
+
color: var(--sqm-input-label-color, var(--sqm-text), black);
|
|
2633
|
+
}
|
|
2634
|
+
|
|
2635
|
+
*::part(input-base), *::part(select-base), *::part(textarea-base){
|
|
2636
|
+
background-color: var(--sqm-input-background, #fff);
|
|
2637
|
+
border-radius: var(--sqm-input-border-radius, var(--sl-input-border-radius-large), 0.25rem);
|
|
2638
|
+
color: var(--sqm-input-color, white);
|
|
2639
|
+
border-width: var(--sqm-border-thickness, 1px);
|
|
2842
2640
|
}
|
|
2641
|
+
|
|
2642
|
+
sl-input::part(base):focus,
|
|
2643
|
+
sl-select::part(form-control-wrapper):focus,
|
|
2644
|
+
sl-textare::part(textarea-label):focus {
|
|
2645
|
+
border-color: none;
|
|
2646
|
+
border: var(--sqm-input-focus-border, 1px solid var(--sl-input-border-color-focus));
|
|
2647
|
+
}
|
|
2648
|
+
|
|
2649
|
+
*::part(input-label):disabled, *::part(select-label):disabled, *::part(textarea-label):disabled{
|
|
2650
|
+
background: var(--sqm-input-disabled-background, #f5f5f5);
|
|
2651
|
+
color: var(--sqm-input-disabled-color, var(--sl-color-gray-600));
|
|
2652
|
+
}
|
|
2653
|
+
|
|
2654
|
+
sl-input {
|
|
2655
|
+
--sl-input-border-color-focus: var(--sqm-border-color-focus);
|
|
2656
|
+
}
|
|
2657
|
+
|
|
2843
2658
|
`;
|
|
2844
|
-
JSS.
|
|
2845
|
-
const sheet$7 = JSS.jss.createStyleSheet(style$7);
|
|
2659
|
+
const sheet$7 = JSS.createStyleSheet(style$7);
|
|
2846
2660
|
const styleString$7 = sheet$7.toString();
|
|
2847
|
-
function
|
|
2848
|
-
var _a, _b, _c, _d, _e, _f, _g;
|
|
2849
|
-
const { states
|
|
2661
|
+
function NameFieldsView(props) {
|
|
2662
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
|
|
2663
|
+
const { states } = props;
|
|
2850
2664
|
const validationErrors = (_a = states === null || states === void 0 ? void 0 : states.registrationFormState) === null || _a === void 0 ? void 0 : _a.validationErrors;
|
|
2851
|
-
return (index.h("div", { class: sheet$7.classes.
|
|
2665
|
+
return (index.h("div", { class: sheet$7.classes.FieldsContainer },
|
|
2852
2666
|
index.h("style", { type: "text/css" },
|
|
2853
2667
|
vanillaStyle$4,
|
|
2854
2668
|
styleString$7),
|
|
2855
|
-
index.h("sl-
|
|
2856
|
-
value: (_g = (_f = states.registrationFormState) === null || _f === void 0 ? void 0 : _f.initialData) === null || _g === void 0 ? void 0 : _g
|
|
2669
|
+
index.h("sl-input", Object.assign({ exportparts: "label: input-label, base: input-base", name: "/firstName", type: "text", label: states.content.firstNameLabel, required: true, disabled: ((_b = states.registrationFormState) === null || _b === void 0 ? void 0 : _b.loading) || ((_c = states.registrationFormState) === null || _c === void 0 ? void 0 : _c.disabled) }, (((_e = (_d = states.registrationFormState) === null || _d === void 0 ? void 0 : _d.initialData) === null || _e === void 0 ? void 0 : _e.firstName) ? {
|
|
2670
|
+
value: (_g = (_f = states.registrationFormState) === null || _f === void 0 ? void 0 : _f.initialData) === null || _g === void 0 ? void 0 : _g.firstName,
|
|
2857
2671
|
}
|
|
2858
|
-
: {}), ((validationErrors === null || validationErrors === void 0 ? void 0 : validationErrors
|
|
2672
|
+
: {}), ((validationErrors === null || validationErrors === void 0 ? void 0 : validationErrors.firstName) ? {
|
|
2859
2673
|
class: sheet$7.classes.ErrorStyle,
|
|
2674
|
+
helpText: (validationErrors === null || validationErrors === void 0 ? void 0 : validationErrors.firstName) || "Cannot be empty",
|
|
2860
2675
|
}
|
|
2861
|
-
: []))
|
|
2862
|
-
(
|
|
2863
|
-
|
|
2864
|
-
|
|
2865
|
-
|
|
2676
|
+
: []))),
|
|
2677
|
+
index.h("sl-input", Object.assign({ exportparts: "label: input-label, base: input-base", name: "/lastName", type: "text", label: states.content.lastNameLabel, required: true, disabled: ((_h = states.registrationFormState) === null || _h === void 0 ? void 0 : _h.loading) || ((_j = states.registrationFormState) === null || _j === void 0 ? void 0 : _j.disabled) }, (((_l = (_k = states.registrationFormState) === null || _k === void 0 ? void 0 : _k.initialData) === null || _l === void 0 ? void 0 : _l.lastName) ? {
|
|
2678
|
+
value: (_o = (_m = states.registrationFormState) === null || _m === void 0 ? void 0 : _m.initialData) === null || _o === void 0 ? void 0 : _o.lastName,
|
|
2679
|
+
}
|
|
2680
|
+
: {}), ((validationErrors === null || validationErrors === void 0 ? void 0 : validationErrors.lastName) ? {
|
|
2681
|
+
class: sheet$7.classes.ErrorStyle,
|
|
2682
|
+
helpText: (validationErrors === null || validationErrors === void 0 ? void 0 : validationErrors.lastName) || "Cannot be empty",
|
|
2683
|
+
}
|
|
2684
|
+
: [])))));
|
|
2866
2685
|
}
|
|
2867
2686
|
|
|
2868
|
-
|
|
2869
|
-
|
|
2870
|
-
|
|
2871
|
-
|
|
2872
|
-
|
|
2873
|
-
|
|
2874
|
-
|
|
2875
|
-
:
|
|
2876
|
-
|
|
2877
|
-
|
|
2878
|
-
|
|
2687
|
+
function ChangeMarktingView(props) {
|
|
2688
|
+
const { states, callbacks } = props;
|
|
2689
|
+
const { text, formState } = states;
|
|
2690
|
+
const { error } = formState;
|
|
2691
|
+
const style = {
|
|
2692
|
+
Container: {
|
|
2693
|
+
display: "flex",
|
|
2694
|
+
flexDirection: "column",
|
|
2695
|
+
gap: "var(--sl-spacing-x-small)",
|
|
2696
|
+
padding: "0 var(--sl-spacing-xxx-large) var(--sl-spacing-xxx-large)",
|
|
2697
|
+
},
|
|
2698
|
+
SubmitButton: { marginBottom: "var(--sl-spacing-medium)" },
|
|
2699
|
+
Error: {
|
|
2700
|
+
"&::part(erroralert-base)": {
|
|
2701
|
+
"margin-bottom": "15px",
|
|
2702
|
+
},
|
|
2703
|
+
},
|
|
2704
|
+
Success: {
|
|
2705
|
+
"&::part(successalert-base)": {
|
|
2706
|
+
"margin-bottom": "15px",
|
|
2707
|
+
},
|
|
2708
|
+
},
|
|
2709
|
+
};
|
|
2710
|
+
const sheet = JSS.createStyleSheet(style);
|
|
2711
|
+
const styleString = sheet.toString();
|
|
2712
|
+
return (index.h("div", { class: sheet.classes.Container, part: "sqm-base" },
|
|
2713
|
+
index.h("style", { type: "text/css" }, styleString),
|
|
2714
|
+
index.h(sqmTextSpanView.TextSpanView, Object.assign({}, { type: "h2" }), text.emailPreferencesHeader),
|
|
2715
|
+
index.h("sl-form", { "onSl-submit": callbacks.onSubmit },
|
|
2716
|
+
index.h(CheckboxFieldView, { states: {
|
|
2717
|
+
checked: states.formState.marketingEmailOptIn,
|
|
2718
|
+
}, content: {
|
|
2719
|
+
checkboxLabel: text.marketingCheckboxLabel,
|
|
2720
|
+
checkboxName: "marketingEmailOptIn",
|
|
2721
|
+
}, callbacks: {
|
|
2722
|
+
setChecked: callbacks.setChecked,
|
|
2723
|
+
} }),
|
|
2724
|
+
index.h("sl-button", { class: sheet.classes.SubmitButton, type: "primary", submit: true, loading: states.loading, disabled: states.submitDisabled }, text.submitChangeButtonText),
|
|
2725
|
+
error && (index.h("sqm-form-message", { class: sheet.classes.Error, type: "error", exportparts: "erroralert-icon" },
|
|
2726
|
+
index.h("div", { part: "erroralert-text" }, error))),
|
|
2727
|
+
states.success && (index.h("sqm-form-message", { class: sheet.classes.Success, type: "success", exportparts: "successalert-icon" },
|
|
2728
|
+
index.h("div", { part: "successalert-text" }, states.text.successMessage))))));
|
|
2879
2729
|
}
|
|
2730
|
+
|
|
2731
|
+
const vanillaStyle$5 = `
|
|
2732
|
+
:host{
|
|
2733
|
+
margin: 0 auto;
|
|
2734
|
+
width: 100%;
|
|
2735
|
+
}
|
|
2736
|
+
a{
|
|
2737
|
+
cursor:pointer;
|
|
2738
|
+
color: var(--sqm-text-subdued);
|
|
2739
|
+
text-decoration: none ;
|
|
2740
|
+
}
|
|
2880
2741
|
`;
|
|
2881
|
-
|
|
2882
|
-
const
|
|
2883
|
-
|
|
2884
|
-
|
|
2885
|
-
|
|
2886
|
-
|
|
2887
|
-
|
|
2888
|
-
|
|
2742
|
+
function PortalFooterView(props) {
|
|
2743
|
+
const style = {
|
|
2744
|
+
RowContainer: {
|
|
2745
|
+
display: "flex",
|
|
2746
|
+
"& > :not(:last-child)": {
|
|
2747
|
+
"margin-right": "var(--sl-spacing-large)",
|
|
2748
|
+
},
|
|
2749
|
+
},
|
|
2750
|
+
Container: {
|
|
2751
|
+
display: "flex",
|
|
2752
|
+
"flex-direction": "column",
|
|
2753
|
+
"align-items": "center",
|
|
2754
|
+
"font-size": "var(--sl-font-size-small)",
|
|
2755
|
+
color: "var(--sqm-text-subdued)",
|
|
2756
|
+
"padding-top": `var(--sl-spacing-${props.paddingTop})`,
|
|
2757
|
+
"padding-right": `var(--sl-spacing-${props.paddingRight})`,
|
|
2758
|
+
"padding-bottom": `var(--sl-spacing-${props.paddingBottom})`,
|
|
2759
|
+
"padding-left": `var(--sl-spacing-${props.paddingLeft})`,
|
|
2760
|
+
"row-gap": `var(--sl-spacing-small)`,
|
|
2761
|
+
"& a:hover": {
|
|
2762
|
+
color: "var(--sqm-text)",
|
|
2763
|
+
},
|
|
2764
|
+
},
|
|
2765
|
+
SupportText: {
|
|
2766
|
+
textAlign: "center",
|
|
2767
|
+
margin: 0,
|
|
2768
|
+
},
|
|
2769
|
+
PoweredByLink: {
|
|
2770
|
+
color: "var(--sqm-text-subdued)",
|
|
2771
|
+
"font-size": "var(--sl-font-size-small)",
|
|
2772
|
+
display: "flex",
|
|
2773
|
+
alignItems: "center",
|
|
2774
|
+
svg: {
|
|
2775
|
+
marginTop: "2px",
|
|
2776
|
+
shapeRendering: "geometricprecision",
|
|
2777
|
+
},
|
|
2778
|
+
"&:hover, &:hover *": {
|
|
2779
|
+
color: "var(--sqm-text)",
|
|
2780
|
+
},
|
|
2781
|
+
},
|
|
2782
|
+
};
|
|
2783
|
+
const sheet = JSS.createStyleSheet(style);
|
|
2784
|
+
const styleString = sheet.toString();
|
|
2785
|
+
return (index.h("div", { class: sheet.classes.Container, part: "sqm-base" },
|
|
2889
2786
|
index.h("style", { type: "text/css" },
|
|
2890
2787
|
vanillaStyle$5,
|
|
2891
|
-
styleString
|
|
2892
|
-
index.h("
|
|
2893
|
-
|
|
2894
|
-
|
|
2895
|
-
|
|
2896
|
-
|
|
2897
|
-
|
|
2898
|
-
|
|
2899
|
-
|
|
2900
|
-
|
|
2901
|
-
}
|
|
2902
|
-
|
|
2788
|
+
styleString),
|
|
2789
|
+
index.h("div", { class: sheet.classes.RowContainer },
|
|
2790
|
+
props.faqLink && (index.h("a", { target: "_blank", href: props.faqLink }, props.faqText)),
|
|
2791
|
+
props.termsLink && (index.h("a", { target: "_blank", href: props.termsLink }, props.termsText))),
|
|
2792
|
+
!props.hideSupportText && (index.h("p", { class: sheet.classes.SupportText }, global.intl.formatMessage({
|
|
2793
|
+
id: "supportFooter",
|
|
2794
|
+
defaultMessage: props.supportText,
|
|
2795
|
+
}, {
|
|
2796
|
+
email: (index.h("a", { target: "_blank", href: `mailto:${props.supportEmail}` }, props.supportEmail)),
|
|
2797
|
+
}))),
|
|
2798
|
+
!props.hidePoweredBy && (index.h("a", { class: sheet.classes.PoweredByLink, target: "_blank", href: props.poweredByLink },
|
|
2799
|
+
"Powered by ",
|
|
2800
|
+
index.h(PoweredByImg, { color: "currentColor" })))));
|
|
2801
|
+
}
|
|
2802
|
+
|
|
2803
|
+
function PortalFrameView(props, children) {
|
|
2804
|
+
const { data, notFullScreen, border } = props;
|
|
2805
|
+
const style = {
|
|
2806
|
+
HostBlock: mixins.HostBlock,
|
|
2807
|
+
Frame: {
|
|
2808
|
+
display: "flex",
|
|
2809
|
+
"flex-direction": "column",
|
|
2810
|
+
"box-sizing": "border-box",
|
|
2811
|
+
"&:nth-child(2)": {
|
|
2812
|
+
background: props.backgroundColor,
|
|
2813
|
+
},
|
|
2814
|
+
},
|
|
2815
|
+
FooterWrapper: {
|
|
2816
|
+
width: "100%",
|
|
2817
|
+
"max-width": "100%",
|
|
2818
|
+
padding: "var(--sl-spacing-medium) var(--sl-spacing-x-large)",
|
|
2819
|
+
background: props.headerAndFooterBackgroundColor,
|
|
2820
|
+
display: "flex",
|
|
2821
|
+
"justify-content": "flex-end",
|
|
2822
|
+
"align-items": "center",
|
|
2823
|
+
"box-sizing": "border-box",
|
|
2824
|
+
borderTop: border,
|
|
2825
|
+
"margin-top": "auto",
|
|
2826
|
+
},
|
|
2827
|
+
HeaderWrapper: {
|
|
2828
|
+
width: "100%",
|
|
2829
|
+
"max-width": "100%",
|
|
2830
|
+
"box-sizing": "border-box",
|
|
2831
|
+
display: "flex",
|
|
2832
|
+
"justify-content": "space-between",
|
|
2833
|
+
padding: "var(--sl-spacing-small) var(--sl-spacing-large)",
|
|
2834
|
+
"align-items": "center",
|
|
2835
|
+
borderBottom: border,
|
|
2836
|
+
background: props.headerAndFooterBackgroundColor,
|
|
2837
|
+
"@media screen and (max-width: 499px)": {
|
|
2838
|
+
"flex-direction": "row-reverse",
|
|
2839
|
+
"justify-content": "flex-end",
|
|
2840
|
+
padding: "0",
|
|
2841
|
+
},
|
|
2842
|
+
},
|
|
2843
|
+
};
|
|
2844
|
+
const sheet = JSS.createStyleSheet(style);
|
|
2845
|
+
const styleString = sheet.toString();
|
|
2846
|
+
return (index.h("div", { style: { minHeight: notFullScreen ? "100%" : "100vh" }, class: sheet.classes.Frame, part: "sqm-base" },
|
|
2847
|
+
index.h("style", { type: "text/css" }, styleString),
|
|
2848
|
+
index.h("div", { class: sheet.classes.HeaderWrapper, part: "sqm-header" },
|
|
2849
|
+
data.header,
|
|
2850
|
+
index.h("slot", { name: "sqm-navigation-menu" })),
|
|
2851
|
+
children,
|
|
2852
|
+
index.h("div", { class: sheet.classes.FooterWrapper, part: "sqm-footer" }, data.footer)));
|
|
2853
|
+
}
|
|
2854
|
+
|
|
2855
|
+
function ReferralIframeView(props) {
|
|
2856
|
+
const { states, data } = props;
|
|
2857
|
+
const { content } = states;
|
|
2858
|
+
// dependent on props
|
|
2859
|
+
const style = {
|
|
2860
|
+
Container: {
|
|
2861
|
+
position: "relative",
|
|
2862
|
+
width: content.iframeWidth,
|
|
2863
|
+
height: content.iframeHeight,
|
|
2864
|
+
},
|
|
2865
|
+
IFrame: {
|
|
2866
|
+
position: "absolute",
|
|
2867
|
+
width: "100%",
|
|
2868
|
+
height: "100%",
|
|
2869
|
+
border: "0",
|
|
2870
|
+
top: "0",
|
|
2871
|
+
left: "0",
|
|
2872
|
+
right: "0",
|
|
2873
|
+
},
|
|
2874
|
+
};
|
|
2875
|
+
// JSS config
|
|
2876
|
+
const sheet = JSS.createStyleSheet(style);
|
|
2877
|
+
const styleString = sheet.toString();
|
|
2878
|
+
return (index.h("div", { class: sheet.classes.Container },
|
|
2879
|
+
index.h("style", { type: "text/css" }, styleString),
|
|
2880
|
+
index.h("iframe", { class: sheet.classes.IFrame, src: `${content.iframeSrc}?rsCode=${data.shareCode}` })));
|
|
2903
2881
|
}
|
|
2904
2882
|
|
|
2905
2883
|
const CheckMark = () => (index.h("svg", { width: 12, height: 10, fill: "none", xmlns: "http://www.w3.org/2000/svg" },
|
|
@@ -2931,15 +2909,15 @@ function Dot({ active, completed, incomplete, stage, }) {
|
|
|
2931
2909
|
} },
|
|
2932
2910
|
index.h("div", { style: {
|
|
2933
2911
|
backgroundColor: completed
|
|
2934
|
-
? "var(--
|
|
2912
|
+
? "var(--sqm-success-color-icon)"
|
|
2935
2913
|
: incomplete
|
|
2936
|
-
? "var(--
|
|
2937
|
-
: "
|
|
2914
|
+
? "var(--sqm-border-color)"
|
|
2915
|
+
: "white",
|
|
2938
2916
|
border: active
|
|
2939
|
-
? "1px solid var(--
|
|
2917
|
+
? "1px solid var(--sqm-success-color-border)"
|
|
2940
2918
|
: incomplete
|
|
2941
|
-
? "1px solid var(--
|
|
2942
|
-
: "1px solid var(--
|
|
2919
|
+
? "1px solid var(--sqm-border-color)"
|
|
2920
|
+
: "1px solid var(--sqm-success-color-border)",
|
|
2943
2921
|
borderRadius: "50%",
|
|
2944
2922
|
width: "23px",
|
|
2945
2923
|
height: "23px",
|
|
@@ -2949,8 +2927,8 @@ function Dot({ active, completed, incomplete, stage, }) {
|
|
|
2949
2927
|
} }, completed ? (index.h("div", { style: { top: "-10.5%", left: "23.5%", position: "relative" } },
|
|
2950
2928
|
index.h(CheckMark, null))) : (index.h("div", { style: {
|
|
2951
2929
|
color: active
|
|
2952
|
-
? "var(--
|
|
2953
|
-
: "var(--
|
|
2930
|
+
? "var(--sqm-success-color-border)"
|
|
2931
|
+
: "var(--sqm-text-subdued)",
|
|
2954
2932
|
width: "23px",
|
|
2955
2933
|
lineHeight: "24px",
|
|
2956
2934
|
textAlign: "center",
|
|
@@ -2964,8 +2942,8 @@ function ProgressLine({ incomplete = false, active = false, invisible = false, }
|
|
|
2964
2942
|
height: "4px",
|
|
2965
2943
|
borderRadius: "4px",
|
|
2966
2944
|
background: incomplete || active
|
|
2967
|
-
? "var(--
|
|
2968
|
-
: "var(--
|
|
2945
|
+
? "var(--sqm-border-color)"
|
|
2946
|
+
: "var(--sqm-success-color-icon)",
|
|
2969
2947
|
position: "relative",
|
|
2970
2948
|
bottom: "0",
|
|
2971
2949
|
left: "0",
|
|
@@ -2988,7 +2966,7 @@ function ProgressBar({ stageCount, currentStage, }) {
|
|
|
2988
2966
|
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 })))));
|
|
2989
2967
|
}
|
|
2990
2968
|
|
|
2991
|
-
const style$
|
|
2969
|
+
const style$8 = {
|
|
2992
2970
|
HostBlock: mixins.HostBlock,
|
|
2993
2971
|
Container: {
|
|
2994
2972
|
minWidth: "300px",
|
|
@@ -3002,21 +2980,25 @@ const style$9 = {
|
|
|
3002
2980
|
margin: "0 auto",
|
|
3003
2981
|
},
|
|
3004
2982
|
Select: {
|
|
2983
|
+
"&::part(base)": {
|
|
2984
|
+
borderRadius: "var(--sqm-input-border-radius)",
|
|
2985
|
+
},
|
|
3005
2986
|
"&::part(label)": {
|
|
3006
|
-
|
|
2987
|
+
color: "var(--sqm-input-label-color)",
|
|
3007
2988
|
},
|
|
3008
2989
|
"&::part(menu)": {
|
|
3009
2990
|
maxHeight: "450px",
|
|
3010
2991
|
},
|
|
3011
2992
|
"& sl-menu-item::part(checked-icon)": {
|
|
3012
2993
|
top: "8px",
|
|
2994
|
+
color: "var(--sqm-text)",
|
|
3013
2995
|
},
|
|
3014
2996
|
"& sl-menu-item::part(base)": {
|
|
3015
2997
|
flexDirection: "column",
|
|
3016
2998
|
},
|
|
3017
2999
|
"& sl-menu-item::part(base):focus": {
|
|
3018
|
-
background: "
|
|
3019
|
-
color: "var(--
|
|
3000
|
+
background: "var(--sqm-accent-color-background)",
|
|
3001
|
+
color: "var(--sqm-text)",
|
|
3020
3002
|
},
|
|
3021
3003
|
},
|
|
3022
3004
|
ProgressBar: {
|
|
@@ -3036,7 +3018,7 @@ const style$9 = {
|
|
|
3036
3018
|
flex: "1 1 0",
|
|
3037
3019
|
},
|
|
3038
3020
|
"& .text.subdued": {
|
|
3039
|
-
color: "var(--
|
|
3021
|
+
color: "var(--sqm-text-subdued)",
|
|
3040
3022
|
},
|
|
3041
3023
|
},
|
|
3042
3024
|
},
|
|
@@ -3051,6 +3033,9 @@ const style$9 = {
|
|
|
3051
3033
|
userSelect: "none",
|
|
3052
3034
|
height: "120px",
|
|
3053
3035
|
"&::part(base)": {
|
|
3036
|
+
background: "var(--sqm-portal-background)",
|
|
3037
|
+
border: "var(--sqm-border-thickness) solid var(--sqm-border-color)",
|
|
3038
|
+
borderRadius: "var(--sqm-border-radius-normal)",
|
|
3054
3039
|
boxShadow: "none",
|
|
3055
3040
|
width: "100%",
|
|
3056
3041
|
},
|
|
@@ -3059,10 +3044,11 @@ const style$9 = {
|
|
|
3059
3044
|
padding: 0,
|
|
3060
3045
|
},
|
|
3061
3046
|
"& .selected": {
|
|
3047
|
+
borderRadius: "var(--sqm-border-radius-normal)",
|
|
3062
3048
|
position: "relative",
|
|
3063
3049
|
top: "-2%",
|
|
3064
3050
|
left: "100%",
|
|
3065
|
-
color: "var(--
|
|
3051
|
+
color: "var(--sqm-primary-color)",
|
|
3066
3052
|
margin: "-9px",
|
|
3067
3053
|
},
|
|
3068
3054
|
},
|
|
@@ -3094,7 +3080,7 @@ const style$9 = {
|
|
|
3094
3080
|
fontSize: "var(--sl-font-size-medium)",
|
|
3095
3081
|
lineHeight: "var(--sl-line-height-dense)",
|
|
3096
3082
|
fontWeight: "600",
|
|
3097
|
-
color: "var(--
|
|
3083
|
+
color: "var(--sqm-text)",
|
|
3098
3084
|
display: "-webkit-box",
|
|
3099
3085
|
"-webkit-line-clamp": "1",
|
|
3100
3086
|
"-webkit-box-orient": "vertical",
|
|
@@ -3104,7 +3090,7 @@ const style$9 = {
|
|
|
3104
3090
|
fontSize: "var(--sl-font-size-small)",
|
|
3105
3091
|
lineHeight: "var(--sl-line-height-dense)",
|
|
3106
3092
|
marginTop: "var(--sl-spacing-x-small)",
|
|
3107
|
-
color: "var(--
|
|
3093
|
+
color: "var(--sqm-text-subdued)",
|
|
3108
3094
|
display: "-webkit-box",
|
|
3109
3095
|
"-webkit-line-clamp": "1",
|
|
3110
3096
|
"-webkit-box-orient": "vertical",
|
|
@@ -3115,7 +3101,7 @@ const style$9 = {
|
|
|
3115
3101
|
lineHeight: "var(--sl-line-height-dense)",
|
|
3116
3102
|
marginTop: "var(--sl-spacing-x-small)",
|
|
3117
3103
|
fontWeight: "600",
|
|
3118
|
-
color: "var(--
|
|
3104
|
+
color: "var(--sqm-warning-color-icon)",
|
|
3119
3105
|
display: "-webkit-box",
|
|
3120
3106
|
"-webkit-line-clamp": "1",
|
|
3121
3107
|
"-webkit-box-orient": "vertical",
|
|
@@ -3150,7 +3136,6 @@ const style$9 = {
|
|
|
3150
3136
|
"& .text": {
|
|
3151
3137
|
width: "50%",
|
|
3152
3138
|
maxWidth: "400px",
|
|
3153
|
-
// minWidth: "330px",
|
|
3154
3139
|
"@media (max-width: 799px)": {
|
|
3155
3140
|
width: "auto",
|
|
3156
3141
|
margin: "auto",
|
|
@@ -3159,17 +3144,17 @@ const style$9 = {
|
|
|
3159
3144
|
"& .title": {
|
|
3160
3145
|
fontSize: "var(--sl-font-size-large)",
|
|
3161
3146
|
fontWeight: "var(--sl-font-weight-semibold)",
|
|
3162
|
-
color: "var(--
|
|
3147
|
+
color: "var(--sqm-text)",
|
|
3163
3148
|
},
|
|
3164
3149
|
"& .points": {
|
|
3165
3150
|
fontSize: "var(--sl-font-size-large)",
|
|
3166
3151
|
fontWeight: "var(--sl-font-weight-semibold)",
|
|
3167
|
-
color: "var(--
|
|
3152
|
+
color: "var(--sqm-accent-color-text)",
|
|
3168
3153
|
},
|
|
3169
3154
|
"& .description": {
|
|
3170
3155
|
fontSize: "var(--sl-font-size-medium)",
|
|
3171
3156
|
fontWeight: "var(--sl-font-weight-normal)",
|
|
3172
|
-
color: "var(--
|
|
3157
|
+
color: "var(--sqm-text-subdued)",
|
|
3173
3158
|
margin: "var(--sl-spacing-medium) 0",
|
|
3174
3159
|
lineHeight: "var(--sl-line-height-dense)",
|
|
3175
3160
|
marginTop: "var(--sl-spacing-xx-small)",
|
|
@@ -3178,14 +3163,14 @@ const style$9 = {
|
|
|
3178
3163
|
marginBottom: "var(--sl-spacing-xxx-large)",
|
|
3179
3164
|
},
|
|
3180
3165
|
"& sl-menu-item[disabled]::part(label)": {
|
|
3181
|
-
color: "var(
|
|
3166
|
+
color: "var(sqm-text-subdued)",
|
|
3182
3167
|
},
|
|
3183
3168
|
"& sl-menu-item[disabled]": {
|
|
3184
3169
|
"& .step-cost": {
|
|
3185
|
-
color: "var(
|
|
3170
|
+
color: "var(sqm-text-subdued)",
|
|
3186
3171
|
},
|
|
3187
3172
|
"& .step-value": {
|
|
3188
|
-
color: "var(
|
|
3173
|
+
color: "var(sqm-text-subdued)",
|
|
3189
3174
|
},
|
|
3190
3175
|
},
|
|
3191
3176
|
},
|
|
@@ -3193,16 +3178,16 @@ const style$9 = {
|
|
|
3193
3178
|
display: "flex",
|
|
3194
3179
|
flexDirection: "column",
|
|
3195
3180
|
"&::part(label)": {
|
|
3196
|
-
color: "var(--
|
|
3181
|
+
color: "var(--sqm-text)",
|
|
3197
3182
|
margin: "0",
|
|
3198
3183
|
},
|
|
3199
3184
|
"& .step-cost": {
|
|
3200
|
-
color: "var(--
|
|
3185
|
+
color: "var(--sqm-text-subdued)",
|
|
3201
3186
|
marginBottom: "var(--sl-spacing-x-small)",
|
|
3202
3187
|
},
|
|
3203
3188
|
"& .step-unavailable": {
|
|
3204
3189
|
fontSize: "var(--sl-font-size-small)",
|
|
3205
|
-
color: "var(--
|
|
3190
|
+
color: "var(--sqm-warning-color-text)",
|
|
3206
3191
|
margin: "0",
|
|
3207
3192
|
},
|
|
3208
3193
|
},
|
|
@@ -3211,10 +3196,10 @@ const style$9 = {
|
|
|
3211
3196
|
"& .title": {
|
|
3212
3197
|
fontSize: "var(--sl-font-size-large)",
|
|
3213
3198
|
fontWeight: "var(--sl-font-weight-semibold)",
|
|
3214
|
-
color: "var(--
|
|
3199
|
+
color: "var(--sqm-text)",
|
|
3215
3200
|
},
|
|
3216
3201
|
"& .description": {
|
|
3217
|
-
color: "var(--
|
|
3202
|
+
color: "var(--sqm-text-subued)",
|
|
3218
3203
|
maxWidth: "350px",
|
|
3219
3204
|
margin: "0 auto",
|
|
3220
3205
|
lineHeight: "var(--sl-line-height-dense)",
|
|
@@ -3225,7 +3210,7 @@ const style$9 = {
|
|
|
3225
3210
|
maxWidth: "350px",
|
|
3226
3211
|
margin: "-30px auto var(--sl-spacing-xxx-large) auto",
|
|
3227
3212
|
textAlign: "left",
|
|
3228
|
-
color: "var(--
|
|
3213
|
+
color: "var(--sqm-text-subdued)",
|
|
3229
3214
|
},
|
|
3230
3215
|
},
|
|
3231
3216
|
Grid: {
|
|
@@ -3267,10 +3252,9 @@ const style$9 = {
|
|
|
3267
3252
|
},
|
|
3268
3253
|
"& .field": {
|
|
3269
3254
|
width: "30%",
|
|
3270
|
-
textTransform: "uppercase",
|
|
3271
3255
|
fontSize: "var(--sl-font-size-medium)",
|
|
3272
3256
|
fontWeight: "var(--sl-font-weight-normal)",
|
|
3273
|
-
color: "var(--
|
|
3257
|
+
color: "var(--sqm-text-subdued)",
|
|
3274
3258
|
textAlign: "left",
|
|
3275
3259
|
paddingRight: "var(--sl-spacing-xxx-large)",
|
|
3276
3260
|
"@media (max-width: 499px)": {
|
|
@@ -3284,7 +3268,7 @@ const style$9 = {
|
|
|
3284
3268
|
fontWeight: "var(--sl-font-weight-semibold)",
|
|
3285
3269
|
},
|
|
3286
3270
|
"& .top-border": {
|
|
3287
|
-
borderTop: "
|
|
3271
|
+
borderTop: "var(--sqm-border-thickness) solid var(--sqm-border-color)",
|
|
3288
3272
|
},
|
|
3289
3273
|
"& .image": {
|
|
3290
3274
|
width: "200px",
|
|
@@ -3300,10 +3284,6 @@ const style$9 = {
|
|
|
3300
3284
|
"& .cancel": {
|
|
3301
3285
|
marginLeft: "auto",
|
|
3302
3286
|
marginRight: "var(--sl-spacing-medium)",
|
|
3303
|
-
"&::part(base)": {
|
|
3304
|
-
fontWeight: "var(--sl-font-weight-normal)",
|
|
3305
|
-
color: "var(--sl-color-neutral-1000)",
|
|
3306
|
-
},
|
|
3307
3287
|
"@media (max-width: 499px)": {
|
|
3308
3288
|
width: "100%",
|
|
3309
3289
|
marginRight: "0",
|
|
@@ -3311,12 +3291,6 @@ const style$9 = {
|
|
|
3311
3291
|
},
|
|
3312
3292
|
},
|
|
3313
3293
|
"& .continue": {
|
|
3314
|
-
"&::part(base)": {
|
|
3315
|
-
background: "var(--sl-color-primary-500)",
|
|
3316
|
-
borderColor: "var(--sl-color-primary-500)",
|
|
3317
|
-
fontWeight: "var(--sl-font-weight-normal)",
|
|
3318
|
-
color: "var(--sl-color-neutral-0)",
|
|
3319
|
-
},
|
|
3320
3294
|
"@media (max-width: 499px)": {
|
|
3321
3295
|
width: "100%",
|
|
3322
3296
|
},
|
|
@@ -3339,8 +3313,8 @@ const style$9 = {
|
|
|
3339
3313
|
},
|
|
3340
3314
|
};
|
|
3341
3315
|
// JSS config
|
|
3342
|
-
const sheet$
|
|
3343
|
-
const styleString$
|
|
3316
|
+
const sheet$8 = JSS.createStyleSheet(style$8);
|
|
3317
|
+
const styleString$8 = sheet$8.toString();
|
|
3344
3318
|
const stageList = ["chooseReward", "chooseAmount", "confirmation", "success"];
|
|
3345
3319
|
function RewardExchangeView(props) {
|
|
3346
3320
|
const { states, data, callbacks, refs } = props;
|
|
@@ -3363,7 +3337,7 @@ function RewardExchangeView(props) {
|
|
|
3363
3337
|
sourceUnit: item.sourceUnit,
|
|
3364
3338
|
})));
|
|
3365
3339
|
}
|
|
3366
|
-
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$
|
|
3340
|
+
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$8.classes.Select, value: states.selectedStep, "onSl-select": (e) => {
|
|
3367
3341
|
var _a, _b, _c, _d, _e;
|
|
3368
3342
|
return callbacks.setExchangeState({
|
|
3369
3343
|
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,
|
|
@@ -3371,7 +3345,7 @@ function RewardExchangeView(props) {
|
|
|
3371
3345
|
});
|
|
3372
3346
|
} }, (_c = item.steps) === null || _c === void 0 ? void 0 : _c.map((step) => {
|
|
3373
3347
|
var _a, _b;
|
|
3374
|
-
return (index.h("sl-menu-item", { value: step, disabled: !step.available, class: sheet$
|
|
3348
|
+
return (index.h("sl-menu-item", { value: step, disabled: !step.available, class: sheet$8.classes.SelectItem },
|
|
3375
3349
|
step.prettyDestinationValue,
|
|
3376
3350
|
index.h("br", null),
|
|
3377
3351
|
index.h("div", { class: "step-cost", slot: "suffix" },
|
|
@@ -3390,17 +3364,18 @@ function RewardExchangeView(props) {
|
|
|
3390
3364
|
var _a;
|
|
3391
3365
|
return [
|
|
3392
3366
|
index.h("div", { part: "choose-reward-container" },
|
|
3393
|
-
index.h("div", { class: sheet$
|
|
3394
|
-
states.loading || states.queryError ? (loading()) : (index.h("div", { class: sheet$
|
|
3367
|
+
index.h("div", { class: sheet$8.classes.Title }, states.content.text.rewardTitle),
|
|
3368
|
+
states.loading || states.queryError ? (loading()) : (index.h("div", { class: sheet$8.classes.Grid }, (_a = data.exchangeList) === null || _a === void 0 ? void 0 : _a.map((item) => {
|
|
3395
3369
|
var _a, _b, _c, _d, _e;
|
|
3396
3370
|
const style = {
|
|
3397
3371
|
boxShadow: item.key === (selectedItem === null || selectedItem === void 0 ? void 0 : selectedItem.key)
|
|
3398
|
-
? "0 0 0 2px var(--
|
|
3372
|
+
? "0 0 0 2px var(--sqm-primary-color)"
|
|
3399
3373
|
: "none",
|
|
3400
|
-
borderRadius: "
|
|
3374
|
+
borderRadius: "var(--sqm-border-radius-normal)",
|
|
3375
|
+
borderColor: "none",
|
|
3401
3376
|
};
|
|
3402
3377
|
return (index.h("div", { key: item.key, style: style },
|
|
3403
|
-
index.h("sl-card", { exportparts: "base: exchange-card-container", class: sheet$
|
|
3378
|
+
index.h("sl-card", { exportparts: "base: exchange-card-container", class: sheet$8.classes.Card, style: {
|
|
3404
3379
|
cursor: item.unavailableReasonCode
|
|
3405
3380
|
? "not-allowed"
|
|
3406
3381
|
: "pointer",
|
|
@@ -3417,14 +3392,14 @@ function RewardExchangeView(props) {
|
|
|
3417
3392
|
? "rgba(0, 0, 0, 0.05)"
|
|
3418
3393
|
: "rgba(0, 0, 0, 0)",
|
|
3419
3394
|
} },
|
|
3420
|
-
index.h("div", { class: sheet$
|
|
3395
|
+
index.h("div", { class: sheet$8.classes.Image, style: {
|
|
3421
3396
|
opacity: item.unavailableReasonCode ? "0.5" : "1",
|
|
3422
3397
|
} },
|
|
3423
3398
|
index.h("img", { class: item.unavailableReasonCode
|
|
3424
3399
|
? "image subdued"
|
|
3425
3400
|
: "image", src: (item === null || item === void 0 ? void 0 : item.imageUrl) ||
|
|
3426
3401
|
index.getAssetPath("./assets/Reward-image.png") })),
|
|
3427
|
-
index.h("div", { class: sheet$
|
|
3402
|
+
index.h("div", { class: sheet$8.classes.TextArea, style: {
|
|
3428
3403
|
opacity: item.unavailableReasonCode ? "0.5" : "1",
|
|
3429
3404
|
} },
|
|
3430
3405
|
index.h("div", { class: "title", style: {
|
|
@@ -3457,8 +3432,8 @@ function RewardExchangeView(props) {
|
|
|
3457
3432
|
item.prettySourceMinValue,
|
|
3458
3433
|
}))))))));
|
|
3459
3434
|
}))),
|
|
3460
|
-
index.h("div", { class: sheet$
|
|
3461
|
-
index.h("sl-button", { exportparts: "base: primarybutton-base", class: "continue right", size: "large", onClick: () => callbacks.setStage("chooseAmount"), loading: states.loading, disabled: !states.selectedItem }, states.content.text.continueText))),
|
|
3435
|
+
index.h("div", { class: sheet$8.classes.Button },
|
|
3436
|
+
index.h("sl-button", { exportparts: "base: primarybutton-base", type: "primary", class: "continue right", size: "large", onClick: () => callbacks.setStage("chooseAmount"), loading: states.loading, disabled: !states.selectedItem }, states.content.text.continueText))),
|
|
3462
3437
|
];
|
|
3463
3438
|
}
|
|
3464
3439
|
function chooseAmount() {
|
|
@@ -3468,7 +3443,7 @@ function RewardExchangeView(props) {
|
|
|
3468
3443
|
? false
|
|
3469
3444
|
: input && !states.amount;
|
|
3470
3445
|
return (index.h("div", null,
|
|
3471
|
-
index.h("div", { class: sheet$
|
|
3446
|
+
index.h("div", { class: sheet$8.classes.ChooseAmount, part: "choose-amount-container" },
|
|
3472
3447
|
index.h("div", { class: "wrapper" },
|
|
3473
3448
|
index.h("img", { class: "image", src: (selectedItem === null || selectedItem === void 0 ? void 0 : selectedItem.imageUrl) ||
|
|
3474
3449
|
index.getAssetPath("./assets/Reward-image.png") }),
|
|
@@ -3477,16 +3452,16 @@ function RewardExchangeView(props) {
|
|
|
3477
3452
|
((_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)),
|
|
3478
3453
|
((_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", null, input)),
|
|
3479
3454
|
index.h("div", { class: "space" }))),
|
|
3480
|
-
index.h("div", { class: sheet$
|
|
3481
|
-
index.h("sl-button", { exportparts: "base: secondarybutton-base", class: "cancel", size: "large", type: "
|
|
3482
|
-
index.h("sl-button", { exportparts: "base: primarybutton-base", class: "continue", size: "large", onClick: () => callbacks.setStage("confirmation"), disabled: isDisabled }, states.content.text.continueToConfirmationText)))));
|
|
3455
|
+
index.h("div", { class: sheet$8.classes.Button },
|
|
3456
|
+
index.h("sl-button", { exportparts: "base: secondarybutton-base", class: "cancel", size: "large", type: "secondary", onClick: () => callbacks.resetState() }, states.content.text.cancelText),
|
|
3457
|
+
index.h("sl-button", { exportparts: "base: primarybutton-base", class: "continue", size: "large", type: "primary", onClick: () => callbacks.setStage("confirmation"), disabled: isDisabled }, states.content.text.continueToConfirmationText)))));
|
|
3483
3458
|
}
|
|
3484
3459
|
function confirmation() {
|
|
3485
3460
|
const cost = (selectedStep === null || selectedStep === void 0 ? void 0 : selectedStep.prettySourceValue) || selectedItem.prettySourceValue;
|
|
3486
3461
|
const amount = selectedStep === null || selectedStep === void 0 ? void 0 : selectedStep.prettyDestinationValue;
|
|
3487
3462
|
return (index.h("div", null,
|
|
3488
|
-
index.h("div", { class: sheet$
|
|
3489
|
-
index.h("div", { class: sheet$
|
|
3463
|
+
index.h("div", { class: sheet$8.classes.Confirmation, part: "confirmation-container" },
|
|
3464
|
+
index.h("div", { class: sheet$8.classes.Title }, states.content.text.redeemTitle),
|
|
3490
3465
|
index.h("div", { class: "wrapper" },
|
|
3491
3466
|
index.h("div", { class: "field" }, states.content.text.rewardNameTitle),
|
|
3492
3467
|
index.h("div", { class: "reward-item-container" },
|
|
@@ -3501,13 +3476,13 @@ function RewardExchangeView(props) {
|
|
|
3501
3476
|
index.h("div", { class: "wrapper top-border padding" },
|
|
3502
3477
|
index.h("div", { class: "field" }, states.content.text.costTitle),
|
|
3503
3478
|
index.h("div", { class: "value" }, cost)),
|
|
3504
|
-
index.h("div", { class: sheet$
|
|
3505
|
-
index.h("sl-button", { class: "cancel", type: "
|
|
3506
|
-
index.h("sl-button", { class: "continue", size: "large", loading: states.loading, onClick: callbacks.exchangeReward }, states.content.text.redeemText)))));
|
|
3479
|
+
index.h("div", { class: sheet$8.classes.Button },
|
|
3480
|
+
index.h("sl-button", { class: "cancel", type: "secondary", size: "large", onClick: () => callbacks.setStage("chooseAmount") }, states.content.text.backText),
|
|
3481
|
+
index.h("sl-button", { class: "continue", size: "large", type: "primary", loading: states.loading, onClick: callbacks.exchangeReward }, states.content.text.redeemText)))));
|
|
3507
3482
|
}
|
|
3508
3483
|
function success() {
|
|
3509
3484
|
var _a, _b, _c, _d, _e, _f;
|
|
3510
|
-
return (index.h("div", { class: sheet$
|
|
3485
|
+
return (index.h("div", { class: sheet$8.classes.Success, part: "success-container" },
|
|
3511
3486
|
index.h(Gift$1, null),
|
|
3512
3487
|
index.h(Confetti, null),
|
|
3513
3488
|
index.h("div", { class: "title" }, (_a = states.content.text) === null || _a === void 0 ? void 0 : _a.rewardRedeemedText),
|
|
@@ -3522,7 +3497,7 @@ function RewardExchangeView(props) {
|
|
|
3522
3497
|
(data === null || data === void 0 ? void 0 : data.fuelTankCode) && (index.h("div", { class: "promo" },
|
|
3523
3498
|
states.content.text.promoCode,
|
|
3524
3499
|
index.h(copyTextView.CopyTextView, { copyString: data.fuelTankCode, tooltiptext: (_f = states === null || states === void 0 ? void 0 : states.content) === null || _f === void 0 ? void 0 : _f.text.tooltipText, open: states.open, onClick: callbacks.copyFuelTankCode }))),
|
|
3525
|
-
index.h("div", { class: sheet$
|
|
3500
|
+
index.h("div", { class: sheet$8.classes.Button },
|
|
3526
3501
|
index.h("sl-button", { class: "continue center", type: "primary", size: "large", onClick: () => callbacks.resetState(true) }, states.content.text.doneText))));
|
|
3527
3502
|
}
|
|
3528
3503
|
const stages = {
|
|
@@ -3534,7 +3509,7 @@ function RewardExchangeView(props) {
|
|
|
3534
3509
|
const currentStage = stages[states.redeemStage];
|
|
3535
3510
|
function stageMap() {
|
|
3536
3511
|
const stageNumber = stageList.indexOf(states.redeemStage);
|
|
3537
|
-
return (index.h("div", { class: sheet$
|
|
3512
|
+
return (index.h("div", { class: sheet$8.classes.ProgressBar },
|
|
3538
3513
|
index.h("div", { class: "text-area" }, Object.keys(stageProgressList).map((stage) => {
|
|
3539
3514
|
if (stageList.indexOf(stage) <= stageNumber) {
|
|
3540
3515
|
return index.h("span", { class: "text" }, stageProgressList[stage]);
|
|
@@ -3546,16 +3521,16 @@ function RewardExchangeView(props) {
|
|
|
3546
3521
|
index.h(ProgressBar, { stageCount: 3, currentStage: stageNumber })));
|
|
3547
3522
|
}
|
|
3548
3523
|
function loading() {
|
|
3549
|
-
return (index.h("div", { class: sheet$
|
|
3524
|
+
return (index.h("div", { class: sheet$8.classes.Grid, part: "loading-container" }, [...Array(states.content.text.skeletonCardNum)].map(() => {
|
|
3550
3525
|
return (index.h("div", null,
|
|
3551
|
-
index.h("sl-card", { class: sheet$
|
|
3552
|
-
index.h("div", { class: sheet$
|
|
3526
|
+
index.h("sl-card", { class: sheet$8.classes.Card },
|
|
3527
|
+
index.h("div", { class: sheet$8.classes.CardLayout },
|
|
3553
3528
|
index.h("div", null,
|
|
3554
3529
|
index.h("sl-skeleton", { style: {
|
|
3555
3530
|
width: "100px",
|
|
3556
3531
|
height: "100px",
|
|
3557
3532
|
margin: "9px",
|
|
3558
|
-
"--border-radius": "
|
|
3533
|
+
"--border-radius": "var(--sqm-border-radius-normal)",
|
|
3559
3534
|
} })),
|
|
3560
3535
|
index.h("div", { style: {
|
|
3561
3536
|
margin: "var(--sl-spacing-small) var(--sl-spacing-small) 0 0",
|
|
@@ -3581,12 +3556,12 @@ function RewardExchangeView(props) {
|
|
|
3581
3556
|
if (!(refs === null || refs === void 0 ? void 0 : refs.canvasRef))
|
|
3582
3557
|
return;
|
|
3583
3558
|
refs.canvasRef.current = canvas;
|
|
3584
|
-
}, id: "my-canvas", class: sheet$
|
|
3559
|
+
}, id: "my-canvas", class: sheet$8.classes.Confetti }));
|
|
3585
3560
|
}
|
|
3586
3561
|
if (states.noExchangeOptions)
|
|
3587
3562
|
return states.content.text.empty;
|
|
3588
|
-
return (index.h("div", { class: sheet$
|
|
3589
|
-
index.h("style", { type: "text/css" }, styleString$
|
|
3563
|
+
return (index.h("div", { class: sheet$8.classes.Container, part: "sqm-base" },
|
|
3564
|
+
index.h("style", { type: "text/css" }, styleString$8),
|
|
3590
3565
|
index.h("div", null,
|
|
3591
3566
|
stageMap(),
|
|
3592
3567
|
states.exchangeError && errorMessage(),
|
|
@@ -3647,15 +3622,14 @@ const baseResponse = (data, stage = "chooseReward", selectedItem = null, selecte
|
|
|
3647
3622
|
setStage: null,
|
|
3648
3623
|
setExchangeState: null,
|
|
3649
3624
|
copyFuelTankCode: null,
|
|
3650
|
-
refs: null,
|
|
3651
3625
|
},
|
|
3652
3626
|
refs: null,
|
|
3653
3627
|
});
|
|
3654
3628
|
const baseReward = {
|
|
3655
|
-
key: "",
|
|
3656
|
-
name: "",
|
|
3629
|
+
key: "reward",
|
|
3630
|
+
name: "Demo Reward",
|
|
3657
3631
|
description: "Description of reward. Lorem ipsum dolor sit amet, consectetur adipiscing. Id nec semper sapien dignissim rhoncus nunc.",
|
|
3658
|
-
imageUrl: "",
|
|
3632
|
+
imageUrl: "https://res.cloudinary.com/saasquatch/image/upload/v1643653103/squatch-assets/default_rewards_1.png",
|
|
3659
3633
|
available: true,
|
|
3660
3634
|
unavailableReasonCode: null,
|
|
3661
3635
|
ruleType: "FIXED_GLOBAL_REWARD",
|
|
@@ -3672,7 +3646,34 @@ const baseReward = {
|
|
|
3672
3646
|
prettyDestinationMaxValue: null,
|
|
3673
3647
|
globalRewardKey: "",
|
|
3674
3648
|
destinationUnit: null,
|
|
3675
|
-
steps: [
|
|
3649
|
+
steps: [
|
|
3650
|
+
{
|
|
3651
|
+
prettyDestinationValue: "Reward Step 1",
|
|
3652
|
+
prettySourceValue: "50 Points",
|
|
3653
|
+
available: true,
|
|
3654
|
+
unavailableReasonCode: null,
|
|
3655
|
+
destinationValue: 10,
|
|
3656
|
+
sourceValue: 1,
|
|
3657
|
+
globalRewardKey: "reward1",
|
|
3658
|
+
rewardInput: {
|
|
3659
|
+
accountId: "zach",
|
|
3660
|
+
userId: "zach",
|
|
3661
|
+
},
|
|
3662
|
+
},
|
|
3663
|
+
{
|
|
3664
|
+
prettyDestinationValue: "Reward Step 2",
|
|
3665
|
+
prettySourceValue: "100 Points",
|
|
3666
|
+
available: false,
|
|
3667
|
+
unavailableReasonCode: "Not enough points",
|
|
3668
|
+
destinationValue: 10,
|
|
3669
|
+
sourceValue: 1,
|
|
3670
|
+
globalRewardKey: "reward1",
|
|
3671
|
+
rewardInput: {
|
|
3672
|
+
accountId: "zach",
|
|
3673
|
+
userId: "zach",
|
|
3674
|
+
},
|
|
3675
|
+
},
|
|
3676
|
+
],
|
|
3676
3677
|
};
|
|
3677
3678
|
const notEnoughPoints = {
|
|
3678
3679
|
available: false,
|
|
@@ -3976,108 +3977,164 @@ const empty = {
|
|
|
3976
3977
|
...baseResponse(null, "chooseReward", null, null, false, false, null, true),
|
|
3977
3978
|
};
|
|
3978
3979
|
|
|
3979
|
-
|
|
3980
|
-
|
|
3981
|
-
|
|
3982
|
-
|
|
3983
|
-
|
|
3984
|
-
|
|
3985
|
-
|
|
3986
|
-
|
|
3987
|
-
|
|
3988
|
-
|
|
3989
|
-
|
|
3990
|
-
|
|
3991
|
-
|
|
3992
|
-
|
|
3993
|
-
|
|
3994
|
-
display: block;
|
|
3980
|
+
const MessageLinkQuery = index_module.dist.gql `
|
|
3981
|
+
query (
|
|
3982
|
+
$programId: ID
|
|
3983
|
+
$engagementMedium: UserEngagementMedium!
|
|
3984
|
+
$shareMedium: ReferralShareMedium!
|
|
3985
|
+
) {
|
|
3986
|
+
viewer {
|
|
3987
|
+
... on User {
|
|
3988
|
+
messageLink(
|
|
3989
|
+
programId: $programId
|
|
3990
|
+
engagementMedium: $engagementMedium
|
|
3991
|
+
shareMedium: $shareMedium
|
|
3992
|
+
)
|
|
3993
|
+
shareLink(programId: $programId, engagementMedium: $engagementMedium)
|
|
3994
|
+
}
|
|
3995
3995
|
}
|
|
3996
|
-
|
|
3997
|
-
`;
|
|
3998
|
-
return (index.h("div", null,
|
|
3999
|
-
index.h("style", { type: "text/css" },
|
|
4000
|
-
styleString,
|
|
4001
|
-
vanillaStyle),
|
|
4002
|
-
index.h("div", { class: sheet.classes.Container, part: "sqm-base" }, children)));
|
|
4003
|
-
}
|
|
4004
|
-
|
|
4005
|
-
const style$a = {
|
|
4006
|
-
HostBlock: mixins.HostBlock,
|
|
4007
|
-
couponCodeLabel: {
|
|
4008
|
-
margin: "var(--sl-spacing-x-small) 0",
|
|
4009
|
-
color: "var(--sqm-text-subdued)",
|
|
4010
|
-
fontSize: "var(--sl-font-size-small)",
|
|
4011
|
-
},
|
|
4012
|
-
};
|
|
4013
|
-
const vanillaStyle$6 = `
|
|
4014
|
-
:host{
|
|
4015
|
-
display: block;
|
|
4016
|
-
width: 100%;
|
|
4017
3996
|
}
|
|
4018
3997
|
`;
|
|
4019
|
-
|
|
4020
|
-
const
|
|
4021
|
-
|
|
4022
|
-
|
|
4023
|
-
|
|
4024
|
-
|
|
4025
|
-
|
|
4026
|
-
|
|
4027
|
-
|
|
4028
|
-
|
|
4029
|
-
|
|
3998
|
+
function NativeShare(props, directLink, undefinedErrorText, unsupportedPlatformText) {
|
|
3999
|
+
const title = props.sharetitle || "Share title";
|
|
4000
|
+
const text = props.sharetext || "Share text";
|
|
4001
|
+
if (directLink === "undefined") {
|
|
4002
|
+
return alert(undefinedErrorText);
|
|
4003
|
+
}
|
|
4004
|
+
if (window.navigator.share) {
|
|
4005
|
+
window.navigator
|
|
4006
|
+
.share({
|
|
4007
|
+
title,
|
|
4008
|
+
text,
|
|
4009
|
+
url: directLink,
|
|
4010
|
+
})
|
|
4011
|
+
.catch((error) => console.error("Error on web share", error));
|
|
4012
|
+
}
|
|
4013
|
+
else {
|
|
4014
|
+
alert(unsupportedPlatformText);
|
|
4015
|
+
}
|
|
4030
4016
|
}
|
|
4031
|
-
|
|
4032
|
-
|
|
4033
|
-
|
|
4034
|
-
|
|
4035
|
-
|
|
4036
|
-
|
|
4037
|
-
|
|
4038
|
-
|
|
4039
|
-
|
|
4040
|
-
0.56,
|
|
4041
|
-
0.46,
|
|
4042
|
-
0.39,
|
|
4043
|
-
0.32,
|
|
4044
|
-
0.25,
|
|
4045
|
-
0.18,
|
|
4046
|
-
0.15,
|
|
4047
|
-
];
|
|
4048
|
-
// https://github.com/ricokahler/color2k/blob/main/src/parseToRgba.ts
|
|
4049
|
-
const hslaRegex = /^hsla?\(\s*([\d.]+)\s*,\s*([\d.]+)%\s*,\s*([\d.]+)%(?:\s*,\s*([\d.]+))?\s*\)$/i;
|
|
4050
|
-
function niceParseToHsla(color) {
|
|
4051
|
-
const normalizedColor = color.trim();
|
|
4052
|
-
const hslaMatch = hslaRegex.exec(normalizedColor);
|
|
4053
|
-
if (hslaMatch) {
|
|
4054
|
-
const [h, s, l, a] = Array.from(hslaMatch).slice(1).map(parseFloat);
|
|
4055
|
-
if (t(0, 100, s) !== s)
|
|
4056
|
-
throw new n(color);
|
|
4057
|
-
if (t(0, 100, l) !== l)
|
|
4058
|
-
throw new n(color);
|
|
4059
|
-
return [h, s / 100, l, a || 1];
|
|
4017
|
+
function FacebookShare(directLink, messageLink, errorText) {
|
|
4018
|
+
if (messageLink === "undefined" || directLink === "undefined") {
|
|
4019
|
+
return alert(errorText);
|
|
4020
|
+
}
|
|
4021
|
+
if (typeof SquatchAndroid.shareOnFacebook !== "undefined") {
|
|
4022
|
+
return SquatchAndroid.shareOnFacebook(directLink, messageLink);
|
|
4023
|
+
}
|
|
4024
|
+
else {
|
|
4025
|
+
return GenericShare(messageLink, errorText);
|
|
4060
4026
|
}
|
|
4061
|
-
// Warning -- converts to RGB first, so is lossy
|
|
4062
|
-
return p(color);
|
|
4063
4027
|
}
|
|
4064
|
-
function
|
|
4065
|
-
|
|
4066
|
-
return lScale
|
|
4067
|
-
.map((l) => z(h, s, l, a))
|
|
4068
|
-
.map((color, index) => {
|
|
4069
|
-
return `--sl-color-${name}-${colorScale[index]}: ${color};\n`;
|
|
4070
|
-
});
|
|
4028
|
+
function GenericShare(messageLink, errorText) {
|
|
4029
|
+
return messageLink ? (window.location.href = messageLink) : alert(errorText);
|
|
4071
4030
|
}
|
|
4072
|
-
|
|
4073
|
-
|
|
4074
|
-
|
|
4075
|
-
|
|
4076
|
-
|
|
4077
|
-
|
|
4078
|
-
|
|
4079
|
-
|
|
4080
|
-
|
|
4031
|
+
function useShareButton(props) {
|
|
4032
|
+
var _a, _b, _c, _d;
|
|
4033
|
+
const { sharetitle, sharetext, medium } = props;
|
|
4034
|
+
const programId = props.programId ? props.programId : index_module.H();
|
|
4035
|
+
const user = index_module.J();
|
|
4036
|
+
const engagementMedium = index_module.B();
|
|
4037
|
+
const variables = {
|
|
4038
|
+
engagementMedium,
|
|
4039
|
+
programId: programId,
|
|
4040
|
+
shareMedium: medium.toUpperCase(),
|
|
4041
|
+
};
|
|
4042
|
+
const contextData = index_module.Fn(useReferralCodes.REFERRAL_CODES_NAMESPACE);
|
|
4043
|
+
const overrideData = contextData === null || contextData === void 0 ? void 0 : contextData[medium];
|
|
4044
|
+
// only queries if a programId is available
|
|
4045
|
+
const res = index_module.wn(MessageLinkQuery, variables, !(user === null || user === void 0 ? void 0 : user.jwt) || !programId || overrideData !== undefined);
|
|
4046
|
+
const [setCopied, copiedRes] = index_module.$e(useReferralCodes.SET_CODE_COPIED);
|
|
4047
|
+
const directLink = (overrideData === null || overrideData === void 0 ? void 0 : overrideData.shareLink) || ((_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);
|
|
4048
|
+
const environment = index_module.getEnvironmentSDK();
|
|
4049
|
+
const hide = (medium.toLocaleUpperCase() === "SMS" &&
|
|
4050
|
+
window.orientation === undefined) ||
|
|
4051
|
+
(medium.toLocaleUpperCase() === "DIRECT" && !window.navigator.share);
|
|
4052
|
+
const messageLink = (overrideData === null || overrideData === void 0 ? void 0 : overrideData.messageLink) || ((_d = (_c = res.data) === null || _c === void 0 ? void 0 : _c.viewer) === null || _d === void 0 ? void 0 : _d.messageLink);
|
|
4053
|
+
async function onClick() {
|
|
4054
|
+
if (overrideData) {
|
|
4055
|
+
await setCopied({ referralCode: contextData.referralCode });
|
|
4056
|
+
contextData.refresh();
|
|
4057
|
+
}
|
|
4058
|
+
if (medium.toLocaleUpperCase() === "FACEBOOK" &&
|
|
4059
|
+
environment.type === "SquatchAndroid") {
|
|
4060
|
+
FacebookShare(directLink, messageLink, props.errorText);
|
|
4061
|
+
}
|
|
4062
|
+
else if (medium.toLocaleUpperCase() === "DIRECT") {
|
|
4063
|
+
NativeShare({ sharetitle, sharetext }, directLink, props.errorText, props.unsupportedPlatformText);
|
|
4064
|
+
}
|
|
4065
|
+
}
|
|
4066
|
+
const isPlainLink = !(medium.toLocaleUpperCase() === "FACEBOOK" &&
|
|
4067
|
+
environment.type === "SquatchAndroid") &&
|
|
4068
|
+
medium.toLocaleUpperCase() !== "DIRECT" &&
|
|
4069
|
+
messageLink;
|
|
4070
|
+
const userAgent = window.navigator.userAgent.toLowerCase(), safari = /safari/.test(userAgent), ios = /iphone|ipod|ipad/.test(userAgent);
|
|
4071
|
+
const openInSameTab = ios && !safari;
|
|
4072
|
+
return {
|
|
4073
|
+
...props,
|
|
4074
|
+
loading: res.loading && !(overrideData === null || overrideData === void 0 ? void 0 : overrideData.messageLink),
|
|
4075
|
+
messageLink,
|
|
4076
|
+
isPlainLink,
|
|
4077
|
+
onClick,
|
|
4078
|
+
openInSameTab,
|
|
4079
|
+
hide,
|
|
4080
|
+
};
|
|
4081
|
+
}
|
|
4082
|
+
|
|
4083
|
+
const MessageLinkQuery$1 = index_module.dist.gql `
|
|
4084
|
+
query ($programId: ID, $engagementMedium: UserEngagementMedium!) {
|
|
4085
|
+
user: viewer {
|
|
4086
|
+
... on User {
|
|
4087
|
+
shareLink(
|
|
4088
|
+
programId: $programId
|
|
4089
|
+
engagementMedium: $engagementMedium
|
|
4090
|
+
shareMedium: DIRECT
|
|
4091
|
+
)
|
|
4092
|
+
}
|
|
4093
|
+
}
|
|
4094
|
+
}
|
|
4095
|
+
`;
|
|
4096
|
+
const WIDGET_ENGAGEMENT_EVENT = index_module.dist.gql `
|
|
4097
|
+
mutation loadEvent($eventMeta: UserAnalyticsEvent!) {
|
|
4098
|
+
createUserAnalyticsEvent(eventMeta: $eventMeta)
|
|
4099
|
+
}
|
|
4100
|
+
`;
|
|
4101
|
+
function useShareLink(props) {
|
|
4102
|
+
var _a, _b;
|
|
4103
|
+
const { programId = index_module.H() } = props;
|
|
4104
|
+
const user = index_module.J();
|
|
4105
|
+
const engagementMedium = index_module.B();
|
|
4106
|
+
const contextData = index_module.Fn(useReferralCodes.REFERRAL_CODES_NAMESPACE);
|
|
4107
|
+
const { data } = index_module.wn(MessageLinkQuery$1, { programId, engagementMedium }, !(user === null || user === void 0 ? void 0 : user.jwt) || !!props.linkOverride || (contextData === null || contextData === void 0 ? void 0 : contextData.shareLink) !== undefined);
|
|
4108
|
+
const [sendLoadEvent] = index_module.$e(WIDGET_ENGAGEMENT_EVENT);
|
|
4109
|
+
const [setCopied, copiedRes] = index_module.$e(useReferralCodes.SET_CODE_COPIED);
|
|
4110
|
+
const copyString = (_b = ((contextData === null || contextData === void 0 ? void 0 : contextData.shareLink) || ((_a = data === null || data === void 0 ? void 0 : data.user) === null || _a === void 0 ? void 0 : _a.shareLink))) !== null && _b !== void 0 ? _b :
|
|
4111
|
+
// Shown during loading
|
|
4112
|
+
"...";
|
|
4113
|
+
const [open, setOpen] = domContextHooks_module.useState(false);
|
|
4114
|
+
async function onClick() {
|
|
4115
|
+
if (contextData) {
|
|
4116
|
+
await setCopied({ referralCode: contextData.referralCode });
|
|
4117
|
+
contextData.refresh();
|
|
4118
|
+
}
|
|
4119
|
+
// Should well supported: https://developer.mozilla.org/en-US/docs/Web/API/Clipboard#browser_compatibility
|
|
4120
|
+
// Only if called from a user-initiated event
|
|
4121
|
+
navigator.clipboard.writeText(copyString);
|
|
4122
|
+
setOpen(true);
|
|
4123
|
+
setTimeout(() => setOpen(false), props.tooltiplifespan);
|
|
4124
|
+
sendLoadEvent({
|
|
4125
|
+
eventMeta: {
|
|
4126
|
+
programId,
|
|
4127
|
+
id: user === null || user === void 0 ? void 0 : user.id,
|
|
4128
|
+
accountId: user === null || user === void 0 ? void 0 : user.accountId,
|
|
4129
|
+
type: "USER_REFERRAL_PROGRAM_ENGAGEMENT_EVENT",
|
|
4130
|
+
meta: {
|
|
4131
|
+
engagementMedium,
|
|
4132
|
+
shareMedium: "DIRECT",
|
|
4133
|
+
},
|
|
4134
|
+
},
|
|
4135
|
+
});
|
|
4136
|
+
}
|
|
4137
|
+
return { ...props, onClick, open, copyString: copyString };
|
|
4081
4138
|
}
|
|
4082
4139
|
|
|
4083
4140
|
const map = new Map();
|
|
@@ -4138,7 +4195,6 @@ exports.ShadowViewAddon = ShadowViewAddon;
|
|
|
4138
4195
|
exports.ShareButtonView = ShareButtonView;
|
|
4139
4196
|
exports.StatContainerView = StatContainerView;
|
|
4140
4197
|
exports.TaskCardView = TaskCardView;
|
|
4141
|
-
exports.autoColorScaleCss = autoColorScaleCss;
|
|
4142
4198
|
exports.chooseAmountFixed = chooseAmountFixed;
|
|
4143
4199
|
exports.chooseAmountFixedNoDescription = chooseAmountFixedNoDescription;
|
|
4144
4200
|
exports.chooseAmountVariable = chooseAmountVariable;
|