@saasquatch/mint-components 1.15.0-15 → 1.15.0-151
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/{GenericTableView-f0e9c531.js → GenericTableView-a9845e80.js} +6 -6
- package/dist/cjs/IndirectTaxDetailsView-6888f0e0.js +646 -0
- package/dist/cjs/{ShadowViewAddon-d2ed86e8.js → ShadowViewAddon-135ad23d.js} +1606 -1408
- package/dist/cjs/{copy-text-view-b2f47da0.js → copy-text-view-51c8ee5d.js} +23 -12
- 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-ace50780.js} +5 -3
- package/dist/cjs/{global-19fe8600.js → global-c2a8cb88.js} +11849 -11610
- 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/parseStates-d1effc19.js +16 -0
- 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} +914 -2412
- 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_44.cjs.entry.js} +1193 -245
- 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 +352 -0
- package/dist/cjs/sqm-context-router.cjs.entry.js +11 -11
- package/dist/cjs/sqm-email-verification.cjs.entry.js +152 -28
- package/dist/cjs/sqm-empty_4.cjs.entry.js +9 -15
- package/dist/cjs/sqm-form-message.cjs.entry.js +8 -8
- 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 +6 -6
- package/dist/cjs/sqm-navigation-sidebar-item-view-4e88f774.js +56 -0
- package/dist/cjs/sqm-navigation-sidebar-item.cjs.entry.js +31 -8
- package/dist/cjs/{sqm-navigation-sidebar-view-17111896.js → sqm-navigation-sidebar-view-de90ef03.js} +18 -8
- package/dist/cjs/sqm-navigation-sidebar.cjs.entry.js +25 -9
- package/dist/cjs/sqm-pagination_3.cjs.entry.js +28 -18
- package/dist/cjs/sqm-password-field.cjs.entry.js +11 -11
- package/dist/cjs/sqm-popup-container.cjs.entry.js +5 -5
- 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-9f7b86a9.js → sqm-portal-email-verification-view-15b88171.js} +4 -4
- package/dist/cjs/sqm-portal-email-verification.cjs.entry.js +15 -15
- package/dist/cjs/sqm-portal-google-login.cjs.entry.js +9 -9
- 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-e77710f0.js → sqm-portal-profile-view-02d8bdf5.js} +4 -4
- package/dist/cjs/sqm-portal-profile.cjs.entry.js +15 -15
- 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 +11 -11
- 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 +12 -12
- package/dist/cjs/{sqm-qr-code-view-3da9ed28.js → sqm-qr-code-view-0c3b2f48.js} +9 -4
- package/dist/cjs/sqm-qr-code.cjs.entry.js +12 -13
- package/dist/cjs/sqm-referral-table_11.cjs.entry.js +133 -44
- 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 +82 -35
- package/dist/cjs/sqm-route.cjs.entry.js +1 -1
- package/dist/cjs/sqm-scroll.cjs.entry.js +21 -67
- package/dist/cjs/sqm-stencilbook.cjs.entry.js +13719 -12490
- package/dist/cjs/sqm-tab.cjs.entry.js +5 -5
- package/dist/cjs/sqm-tabs.cjs.entry.js +27 -13
- package/dist/cjs/sqm-tax-and-cash.cjs.entry.js +1254 -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 +25 -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-6aa864ef.js} +4 -4
- 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-7baae348.js +105 -0
- package/dist/cjs/{utils-6847bc06.js → utils-7cbd60cc.js} +5 -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 +169 -4
- package/dist/collection/components/sqm-big-stat/useBigStat.js +127 -8
- package/dist/collection/components/sqm-big-stat/useDemoBigStat.js +14 -5
- package/dist/collection/components/sqm-brand/sqm-brand.js +12 -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 +2 -2
- 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 +61 -4
- package/dist/collection/components/sqm-edit-profile/sqm-edit-profile-view.js +1 -1
- package/dist/collection/components/sqm-form-message/FormMessage.stories.js +8 -16
- package/dist/collection/components/sqm-form-message/sqm-form-message.css +50 -11
- package/dist/collection/components/sqm-form-message/sqm-form-message.js +5 -5
- package/dist/collection/components/sqm-hero/Hero.stories.js +11 -0
- package/dist/collection/components/sqm-hero/sqm-hero-view.js +16 -8
- package/dist/collection/components/sqm-hero/sqm-hero.js +39 -5
- package/dist/collection/components/sqm-hero-image/sqm-hero-image-view.js +5 -2
- package/dist/collection/components/sqm-hero-image/sqm-hero-image.js +2 -2
- 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 +6 -3
- package/dist/collection/components/sqm-leaderboard/sqm-leaderboard-view.js +3 -2
- package/dist/collection/components/sqm-leaderboard/sqm-leaderboard.js +5 -5
- package/dist/collection/components/sqm-leaderboard-rank/sqm-leaderboard-rank-view.js +2 -2
- package/dist/collection/components/sqm-link-button/sqm-link-button.js +1 -0
- package/dist/collection/components/sqm-logout-current-user/sqm-logout-current-user.js +2 -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 +17 -7
- 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 -2
- 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-footer/sqm-portal-footer.js +1 -1
- package/dist/collection/components/sqm-portal-forgot-password/PortalForgotPassword.stories.js +5 -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 +102 -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/sqm-program-explainer.js +1 -1
- 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 +5 -5
- package/dist/collection/components/sqm-qr-code/sqm-qr-code-view.js +1 -1
- package/dist/collection/components/sqm-radio-card/sqm-radio-card-view.js +2 -2
- package/dist/collection/components/sqm-referral-card/sqm-referral-card-view.js +6 -4
- package/dist/collection/components/sqm-referral-card/sqm-referral-card.js +7 -13
- package/dist/collection/components/sqm-referral-code/sqm-referral-code.js +4 -4
- 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 +3 -2
- package/dist/collection/components/sqm-referred-registration/sqm-referred-registration.js +2 -10
- package/dist/collection/components/sqm-reward-exchange-list/RewardExchangeList.stories.js +19 -19
- package/dist/collection/components/sqm-reward-exchange-list/RewardExchangeListData.js +32 -6
- 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 +45 -49
- package/dist/collection/components/sqm-reward-exchange-list/sqm-reward-exchange-list.js +81 -35
- 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-scroll/sqm-scroll.js +22 -101
- package/dist/collection/components/sqm-share-button/ShareButton.stories.js +3 -1
- package/dist/collection/components/sqm-share-button/sqm-share-button-view.js +12 -24
- package/dist/collection/components/sqm-share-button/sqm-share-button.js +56 -10
- package/dist/collection/components/sqm-share-code/sqm-share-code.js +5 -5
- package/dist/collection/components/sqm-share-link/ShareLink.stories.js +13 -0
- package/dist/collection/components/sqm-share-link/sqm-share-link.js +6 -4
- package/dist/collection/components/sqm-stat-container/sqm-stat-container-view.js +21 -9
- 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 +80 -100
- package/dist/collection/components/sqm-table-row/sqm-table-row.js +2 -2
- package/dist/collection/components/sqm-tabs/Tabs.stories.js +7 -0
- package/dist/collection/components/sqm-tabs/sqm-tabs-view.js +16 -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 +23 -26
- package/dist/collection/components/sqm-task-card/sqm-task-card.js +4 -8
- package/dist/collection/components/sqm-task-card/useTaskCard.js +1 -1
- package/dist/collection/components/sqm-text/sqm-text.js +1 -1
- 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/sqm-timeline-entry-view.js +2 -2
- package/dist/collection/components/sqm-titled-section/sqm-titled-section.js +2 -2
- package/dist/collection/components/sqm-widget-verification/sqm-code-verification/sqm-code-verification-view.js +12 -2
- package/dist/collection/components/sqm-widget-verification/sqm-code-verification/sqm-code-verification.js +2 -2
- package/dist/collection/components/sqm-widget-verification/sqm-email-verification/sqm-email-verification-view.js +138 -14
- package/dist/collection/components/sqm-widget-verification/sqm-widget-verification-controller.js +39 -7
- package/dist/collection/components/sqm-widget-verification/sqm-widget-verification.js +45 -8
- package/dist/collection/components/tax-and-cash/BankingForm.stories.js +12 -0
- package/dist/collection/components/tax-and-cash/TaxForm.stories.js +30 -9
- 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 +58 -62
- 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 +59 -61
- 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 +60 -63
- 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 +24 -27
- 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/sqm-payout-status-alert-view.js +18 -48
- package/dist/collection/components/tax-and-cash/sqm-payout-status-alert/sqm-payout-status-alert.js +1 -0
- 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/ErrorView.js +3 -27
- package/dist/collection/components/tax-and-cash/sqm-tax-and-cash/sqm-tax-and-cash.js +284 -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 +135 -93
- package/dist/collection/components/tax-and-cash/sqm-tax-and-cash-dashboard/sqm-tax-and-cash-dashboard.js +50 -5
- 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/small-views/IndirectTaxDetailsView.js +3 -3
- package/dist/collection/components/tax-and-cash/sqm-user-info-form/sqm-user-info-form-view.js +166 -54
- 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 +21 -10
- package/dist/collection/components/views/email-registration-view.js +3 -1
- package/dist/collection/global/global.js +27 -12
- package/dist/collection/global/mixins.js +6 -6
- package/dist/collection/global/styles.js +328 -136
- package/dist/collection/global/styles.ts +428 -136
- 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/collection/utils/utils.js +4 -0
- package/dist/esm/{GenericTableView-e7addb2b.js → GenericTableView-e43d310f.js} +6 -6
- package/dist/esm/IndirectTaxDetailsView-631017e0.js +639 -0
- package/dist/esm/{ShadowViewAddon-3651cb42.js → ShadowViewAddon-3aace77f.js} +1603 -1405
- package/dist/esm/{copy-text-view-0ac6e1d1.js → copy-text-view-83b09456.js} +23 -12
- package/dist/esm/data-dea73d4d.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-1f587f8b.js} +5 -3
- package/dist/esm/{global-9d6f3bbe.js → global-ed7927c1.js} +11873 -11635
- package/dist/esm/{index-91e7729f.js → index-b3a06de8.js} +4 -0
- package/dist/esm/{index.module-89a79f66.js → index.module-c9811a48.js} +154 -154
- 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/parseStates-ed75e224.js +14 -0
- package/dist/esm/raisins-plop-target.entry.js +1 -1
- package/dist/esm/{re-render-cc945f38.js → re-render-7e22fb0d.js} +2 -2
- package/dist/esm/{sqm-banking-info-form_17.entry.js → sqm-banking-info-form_10.entry.js} +762 -2253
- 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_44.entry.js} +1104 -159
- 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 +348 -0
- package/dist/esm/sqm-context-router.entry.js +4 -4
- package/dist/esm/sqm-email-verification.entry.js +145 -21
- package/dist/esm/sqm-empty_4.entry.js +6 -12
- package/dist/esm/sqm-form-message.entry.js +7 -7
- 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 +5 -5
- package/dist/esm/sqm-navigation-sidebar-item-view-5a452423.js +54 -0
- package/dist/esm/sqm-navigation-sidebar-item.entry.js +30 -7
- package/dist/esm/{sqm-navigation-sidebar-view-9d802b78.js → sqm-navigation-sidebar-view-0a2ec560.js} +18 -8
- package/dist/esm/sqm-navigation-sidebar.entry.js +22 -6
- package/dist/esm/sqm-pagination_3.entry.js +22 -12
- package/dist/esm/sqm-password-field.entry.js +6 -6
- package/dist/esm/sqm-popup-container.entry.js +4 -4
- 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-14f1c22c.js → sqm-portal-email-verification-view-b17a5a59.js} +4 -4
- package/dist/esm/sqm-portal-email-verification.entry.js +7 -7
- package/dist/esm/sqm-portal-google-login.entry.js +8 -8
- 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-41116f1d.js → sqm-portal-profile-view-d33da4af.js} +4 -4
- package/dist/esm/sqm-portal-profile.entry.js +8 -8
- 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 +7 -7
- 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 +7 -7
- package/dist/esm/{sqm-qr-code-view-10b8b4cb.js → sqm-qr-code-view-97124a66.js} +8 -3
- package/dist/esm/sqm-qr-code.entry.js +6 -7
- package/dist/esm/sqm-referral-table_11.entry.js +122 -33
- 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 +70 -23
- package/dist/esm/sqm-route.entry.js +1 -1
- package/dist/esm/sqm-scroll.entry.js +20 -66
- package/dist/esm/sqm-stencilbook.entry.js +10918 -9689
- package/dist/esm/sqm-tab.entry.js +4 -4
- package/dist/esm/sqm-tabs.entry.js +24 -10
- package/dist/esm/sqm-tax-and-cash.entry.js +1250 -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 +22 -10
- package/dist/esm/{useChildElements-7945ae56.js → useChildElements-3d872cef.js} +2 -2
- package/dist/esm/{useInstantAccessRegistration-dc4ad9f2.js → useInstantAccessRegistration-dda1f52b.js} +3 -3
- package/dist/esm/{usePayoutStatus-58aa56b4.js → usePayoutStatus-93462be3.js} +10 -7
- package/dist/esm/{usePortalLogin-ef647a50.js → usePortalLogin-e95df3c3.js} +3 -3
- package/dist/esm/{usePortalRegistrationForm-4b35a357.js → usePortalRegistrationForm-1eb3cd72.js} +3 -3
- package/dist/esm/{useReferralCodes-8f75921a.js → useReferralCodes-c2e809cf.js} +2 -2
- package/dist/esm/{useReferralTable-b3876ed6.js → useReferralTable-909ccb28.js} +5 -5
- package/dist/esm/{useRegistrationFormState-d6f33135.js → useRegistrationFormState-24d594ea.js} +2 -2
- package/dist/esm/{useVerificationEmail-edc318cb.js → useVerificationEmail-55e0e98f.js} +2 -2
- package/dist/esm/{utilities-5b0ca040.js → utilities-72c07b09.js} +2 -2
- package/dist/esm/{utils-334c1e34.js → utils-03188de2.js} +5 -1
- package/dist/esm/utils-8690dd2e.js +97 -0
- package/dist/esm-es5/GenericTableView-e43d310f.js +1 -0
- package/dist/esm-es5/IndirectTaxDetailsView-631017e0.js +1 -0
- package/dist/esm-es5/ShadowViewAddon-3aace77f.js +1 -0
- package/dist/esm-es5/copy-text-view-83b09456.js +1 -0
- package/dist/esm-es5/data-dea73d4d.js +1 -0
- package/dist/esm-es5/dom-context-hooks.module-63370afd.js +53 -0
- package/dist/esm-es5/email-registration-view-1f587f8b.js +1 -0
- package/dist/esm-es5/{global-9d6f3bbe.js → global-ed7927c1.js} +5 -5
- package/dist/esm-es5/{index-91e7729f.js → index-b3a06de8.js} +1 -1
- package/dist/esm-es5/index.module-c9811a48.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/parseStates-ed75e224.js +1 -0
- package/dist/esm-es5/raisins-plop-target.entry.js +1 -1
- package/dist/esm-es5/re-render-7e22fb0d.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_44.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-5a452423.js +1 -0
- package/dist/esm-es5/sqm-navigation-sidebar-item.entry.js +1 -1
- package/dist/esm-es5/sqm-navigation-sidebar-view-0a2ec560.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-14f1c22c.js → sqm-portal-email-verification-view-b17a5a59.js} +1 -1
- package/dist/esm-es5/sqm-portal-email-verification.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-41116f1d.js → sqm-portal-profile-view-d33da4af.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-97124a66.js +1 -0
- 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-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-3d872cef.js +1 -0
- package/dist/esm-es5/useInstantAccessRegistration-dda1f52b.js +1 -0
- package/dist/esm-es5/{usePayoutStatus-58aa56b4.js → usePayoutStatus-93462be3.js} +2 -2
- package/dist/esm-es5/usePortalLogin-e95df3c3.js +1 -0
- package/dist/esm-es5/usePortalRegistrationForm-1eb3cd72.js +1 -0
- package/dist/esm-es5/useReferralCodes-c2e809cf.js +1 -0
- package/dist/esm-es5/useReferralTable-909ccb28.js +1 -0
- package/dist/esm-es5/useRegistrationFormState-24d594ea.js +1 -0
- package/dist/esm-es5/useVerificationEmail-55e0e98f.js +1 -0
- package/dist/esm-es5/utilities-72c07b09.js +1 -0
- package/dist/esm-es5/utils-03188de2.js +1 -0
- package/dist/esm-es5/utils-8690dd2e.js +1 -0
- package/dist/mint-components/global/styles.ts +428 -136
- package/dist/mint-components/mint-components.esm.js +1 -1
- package/dist/mint-components/mint-components.js +1 -1
- package/dist/mint-components/{p-266a8b4d.js → p-00791abc.js} +1 -1
- package/dist/mint-components/p-0087ad39.system.js +1 -0
- package/dist/mint-components/p-01e73f14.system.entry.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-0935f9b7.system.js +1 -0
- package/dist/mint-components/p-0e532b53.entry.js +1 -0
- package/dist/mint-components/p-0ec54f97.js +1 -0
- package/dist/mint-components/p-10c63703.entry.js +1 -0
- package/dist/mint-components/p-115dfc03.system.js +1 -0
- package/dist/mint-components/p-125a894f.js +1 -0
- package/dist/mint-components/p-1363c4ab.system.js +1 -0
- package/dist/mint-components/p-13f3a647.js +1 -0
- package/dist/mint-components/p-14128c84.system.entry.js +1 -0
- package/dist/mint-components/p-1470eb1d.entry.js +93 -0
- package/dist/mint-components/{p-a81b507f.entry.js → p-155f7d25.entry.js} +2 -2
- package/dist/mint-components/p-15bfd7e2.system.js +1 -0
- package/dist/mint-components/p-171310d9.system.js +1 -0
- package/dist/mint-components/p-174b20e4.js +448 -0
- package/dist/mint-components/{p-dbc0e4f8.system.js → p-17a0f310.system.js} +1 -1
- package/dist/mint-components/{p-4d91a1d6.system.js → p-1936caf9.system.js} +1 -1
- package/dist/mint-components/p-1cd0e1e9.system.js +1 -0
- package/dist/mint-components/p-1ef7d49f.system.entry.js +1 -0
- package/dist/mint-components/p-1fcfb419.entry.js +13 -0
- package/dist/mint-components/p-204861a6.js +1 -0
- package/dist/mint-components/{p-e8ffcc68.entry.js → p-20916402.entry.js} +2 -2
- package/dist/mint-components/p-2403c6e1.system.js +1 -0
- package/dist/mint-components/p-240bec23.js +1 -0
- package/dist/mint-components/{p-164a9103.system.entry.js → p-26a7051d.system.entry.js} +1 -1
- package/dist/mint-components/p-26b1971c.entry.js +1 -0
- package/dist/mint-components/{p-0559d880.entry.js → p-27a7f6a6.entry.js} +1 -1
- package/dist/mint-components/p-29398c98.entry.js +1 -0
- package/dist/mint-components/{p-480e08e9.js → p-293e3b25.js} +2 -2
- package/dist/mint-components/p-298cf8ee.system.entry.js +1 -0
- package/dist/mint-components/p-29ba2eaa.entry.js +1 -0
- package/dist/mint-components/p-2d917441.system.js +1 -0
- package/dist/mint-components/{p-45bb63c7.system.entry.js → p-33c34619.system.entry.js} +1 -1
- package/dist/mint-components/{p-36ffebd8.system.entry.js → p-355079f4.system.entry.js} +1 -1
- package/dist/mint-components/{p-44891949.entry.js → p-386ec00c.entry.js} +1 -1
- package/dist/mint-components/p-3c76e7c8.system.entry.js +1 -0
- package/dist/mint-components/p-3dd5ba75.js +1233 -0
- package/dist/mint-components/{p-20245645.js → p-3eba9036.js} +1 -1
- package/dist/mint-components/p-3edecfa4.entry.js +1 -0
- package/dist/mint-components/p-3fa6eac8.system.entry.js +1 -0
- package/dist/mint-components/p-40752a0f.entry.js +1 -0
- package/dist/mint-components/p-40c01a5a.system.js +1 -0
- package/dist/mint-components/{p-301ddcaa.system.entry.js → p-40c33b6a.system.entry.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-345fd28e.system.entry.js → p-43d9c1c5.system.entry.js} +1 -1
- package/dist/mint-components/p-4475e203.system.entry.js +1 -0
- package/dist/mint-components/p-45c3ff6d.js +1 -0
- package/dist/mint-components/{p-726a9924.js → p-460155de.js} +1 -1
- package/dist/mint-components/{p-c0f19490.js → p-49400aab.js} +2 -2
- package/dist/mint-components/p-49b20dae.js +1 -0
- package/dist/mint-components/p-4b1106ff.system.js +1 -0
- package/dist/mint-components/p-4f5329a2.system.js +53 -0
- package/dist/mint-components/{p-ac9f4085.system.entry.js → p-4f5a3dad.system.entry.js} +1 -1
- package/dist/mint-components/p-513f5d80.js +1 -0
- package/dist/mint-components/{p-13ed8586.system.js → p-537a3894.system.js} +1 -1
- package/dist/mint-components/{p-4b6f2eca.system.entry.js → p-54abb144.system.entry.js} +1 -1
- package/dist/mint-components/p-552a6d1b.js +103 -0
- package/dist/mint-components/{p-9b6a0152.system.entry.js → p-58e0eccc.system.entry.js} +1 -1
- package/dist/mint-components/p-59b028db.system.js +1 -0
- package/dist/mint-components/{p-f4a72903.system.entry.js → p-5b29d833.system.entry.js} +1 -1
- package/dist/mint-components/p-5c9a8f62.system.entry.js +1 -0
- package/dist/mint-components/p-5e145a54.system.entry.js +1 -0
- package/dist/mint-components/{p-f4a8ee29.system.entry.js → p-5e8d6f3a.system.entry.js} +1 -1
- package/dist/mint-components/p-5ff2da11.js +1 -0
- package/dist/mint-components/{p-fa37513e.system.entry.js → p-60ec0961.system.entry.js} +1 -1
- package/dist/mint-components/p-621f3e30.entry.js +1 -0
- package/dist/mint-components/p-625ca62f.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-67ad2252.system.js +1 -0
- package/dist/mint-components/{p-dc52c36a.js → p-68043f30.js} +1 -1
- package/dist/mint-components/{p-4027c743.system.entry.js → p-6849f609.system.entry.js} +1 -1
- package/dist/mint-components/p-692bacf3.js +1 -0
- package/dist/mint-components/{p-9ec99ced.js → p-6951663b.js} +1 -1
- package/dist/mint-components/p-6b076bae.system.entry.js +1 -0
- package/dist/mint-components/{p-8175e85f.system.js → p-6c82d60c.system.js} +1 -1
- package/dist/mint-components/{p-b385c9f0.system.entry.js → p-6d74df04.system.entry.js} +1 -1
- package/dist/mint-components/p-71271fbd.system.js +1 -0
- package/dist/mint-components/p-7129329c.entry.js +11 -0
- package/dist/mint-components/{p-6d9e52c7.system.js → p-7159c51c.system.js} +1 -1
- package/dist/mint-components/{p-05f29f64.js → p-71af93e3.js} +1 -1
- package/dist/mint-components/{p-cc7af682.system.js → p-71daeed9.system.js} +2 -2
- package/dist/mint-components/p-75b8fd75.entry.js +1 -0
- package/dist/mint-components/p-7602eb6a.entry.js +1 -0
- package/dist/mint-components/{p-8362cb4c.system.entry.js → p-78c754de.system.entry.js} +1 -1
- package/dist/mint-components/p-79ef70f8.entry.js +25 -0
- package/dist/mint-components/p-7b8d29bb.entry.js +1 -0
- package/dist/mint-components/{p-28b011a0.js → p-7d93f0ed.js} +1 -1
- package/dist/mint-components/{p-1a6b7d2a.entry.js → p-7eb0573c.entry.js} +1 -1
- package/dist/mint-components/p-83d07288.entry.js +9 -0
- package/dist/mint-components/{p-7c2b9fe4.system.js → p-867b2baf.system.js} +1 -1
- package/dist/mint-components/p-8a6494c7.system.js +1 -0
- package/dist/mint-components/p-8b908fb5.js +1 -0
- package/dist/mint-components/p-8caef004.js +1 -0
- package/dist/mint-components/{p-8413ade9.system.js → p-8e28333b.system.js} +1 -1
- package/dist/mint-components/p-916a2045.system.entry.js +1 -0
- package/dist/mint-components/p-92a54b0c.entry.js +1 -0
- package/dist/mint-components/{p-3c96533f.js → p-93382c4f.js} +1 -1
- package/dist/mint-components/{p-c2fdd608.system.entry.js → p-9491f5fb.system.entry.js} +1 -1
- package/dist/mint-components/{p-a9f4ddb1.js → p-9580aac3.js} +1 -1
- package/dist/mint-components/p-976ee669.js +1 -0
- package/dist/mint-components/{p-6d2f5a1d.js → p-97dc6863.js} +2 -2
- package/dist/mint-components/{p-284e4ed5.entry.js → p-9943f53e.entry.js} +1 -1
- package/dist/mint-components/{p-e21a1cb8.system.entry.js → p-9ab8a0fd.system.entry.js} +1 -1
- package/dist/mint-components/{p-3f7b81b8.js → p-9c79ab08.js} +2 -2
- package/dist/mint-components/p-9e297104.entry.js +1 -0
- package/dist/mint-components/p-9eba8408.js +1 -0
- package/dist/mint-components/p-a1b89894.system.entry.js +1 -0
- package/dist/mint-components/{p-35b475bf.js → p-a45680fe.js} +1 -1
- package/dist/mint-components/p-a473e720.entry.js +33 -0
- package/dist/mint-components/p-a4e8eb33.entry.js +1 -0
- package/dist/mint-components/{p-87c21535.entry.js → p-a52df294.entry.js} +1 -1
- package/dist/mint-components/p-a597b136.entry.js +1 -0
- package/dist/mint-components/{p-1b7e6ee9.entry.js → p-a5f10cbd.entry.js} +1 -1
- package/dist/mint-components/{p-127e66c2.system.js → p-a6f4fb03.system.js} +1 -1
- package/dist/mint-components/{p-faba3198.entry.js → p-a7ee19dc.entry.js} +1 -1
- package/dist/mint-components/p-a8c86cd8.system.entry.js +1 -0
- package/dist/mint-components/{p-4e526a94.js → p-aa596749.js} +1 -1
- package/dist/mint-components/p-abc5691f.system.entry.js +1 -0
- package/dist/mint-components/{p-f2d8d3d3.system.entry.js → p-af69ee79.system.entry.js} +1 -1
- package/dist/mint-components/{p-2ae0e06a.entry.js → p-b2fdb0b1.entry.js} +1 -1
- package/dist/mint-components/p-b4a922e1.system.entry.js +1 -0
- package/dist/mint-components/{p-571e1427.system.js → p-b6911812.system.js} +1 -1
- package/dist/mint-components/p-bad50dc1.entry.js +1 -0
- package/dist/mint-components/{p-5488fdd9.system.js → p-bb5d153f.system.js} +1 -1
- package/dist/mint-components/p-bcac83f0.system.js +1 -0
- package/dist/mint-components/p-bd093069.system.entry.js +1 -0
- package/dist/mint-components/p-be88596c.system.js +1 -0
- package/dist/mint-components/p-c210374a.system.js +1 -0
- package/dist/mint-components/{p-d6831af5.js → p-c30ad421.js} +1 -1
- package/dist/mint-components/{p-96431b4f.system.entry.js → p-c3dce602.system.entry.js} +1 -1
- package/dist/mint-components/p-c7c11325.js +1 -0
- package/dist/mint-components/{p-605c2904.system.entry.js → p-cc8ca3ff.system.entry.js} +1 -1
- package/dist/mint-components/p-ced147bc.system.entry.js +1 -0
- package/dist/mint-components/{p-aaff68dc.entry.js → p-d08bcd88.entry.js} +1 -1
- package/dist/mint-components/{p-a71b9154.system.js → p-d09d3b8f.system.js} +1 -1
- package/dist/mint-components/p-d14f3149.system.js +1 -0
- package/dist/mint-components/{p-17da19a2.system.js → p-d212e319.system.js} +1 -1
- package/dist/mint-components/p-d251c213.system.js +1 -0
- package/dist/mint-components/p-d3086782.entry.js +258 -0
- package/dist/mint-components/p-d3262344.js +1 -0
- package/dist/mint-components/p-d399b343.system.entry.js +1 -0
- package/dist/mint-components/p-d650e349.system.entry.js +1 -0
- package/dist/mint-components/p-d705ed24.entry.js +144 -0
- package/dist/mint-components/p-d848957e.system.entry.js +1 -0
- package/dist/mint-components/p-dae3c988.entry.js +13 -0
- package/dist/mint-components/p-dcc50d90.entry.js +1 -0
- package/dist/mint-components/{p-69ac09d4.js → p-ddf3c05e.js} +1 -1
- package/dist/mint-components/p-de66c77f.entry.js +1 -0
- package/dist/mint-components/{p-2d52e2d7.system.js → p-e174b704.system.js} +1 -1
- package/dist/mint-components/p-e5b224b9.entry.js +1 -0
- package/dist/mint-components/{p-ccf8c9aa.entry.js → p-ea063d99.entry.js} +1 -1
- package/dist/mint-components/p-eaeddfe2.system.js +1 -0
- package/dist/mint-components/p-ee92a728.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-f1dc581f.js +1 -0
- package/dist/mint-components/{p-527216de.system.js → p-f3392945.system.js} +1 -1
- package/dist/mint-components/p-f4202a64.system.entry.js +1 -0
- package/dist/mint-components/{p-4e451f75.js → p-f5fff87e.js} +1 -1
- package/dist/mint-components/p-f6baa0c9.system.js +1 -0
- package/dist/mint-components/p-f764e51f.entry.js +16 -0
- package/dist/mint-components/{p-3af1ec4c.entry.js → p-f9295990.entry.js} +1 -1
- package/dist/mint-components/{p-642b0650.system.js → p-f931c628.system.js} +21 -21
- package/dist/mint-components/p-f9c7248e.js +1 -0
- package/dist/mint-components/{p-2b462e4f.system.entry.js → p-fb2976fc.system.entry.js} +1 -1
- package/dist/mint-components/p-fb2d2be0.system.js +1 -0
- package/dist/mint-components/{p-59274a91.system.js → p-ff0e1564.system.js} +1 -1
- 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 +45 -1
- 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 +1 -1
- 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 +14 -1
- package/dist/types/components/sqm-form-message/FormMessage.stories.d.ts +0 -1
- package/dist/types/components/sqm-hero/Hero.stories.d.ts +1 -0
- package/dist/types/components/sqm-hero/sqm-hero-view.d.ts +1 -0
- package/dist/types/components/sqm-hero/sqm-hero.d.ts +9 -2
- package/dist/types/components/sqm-hero-image/sqm-hero-image.d.ts +1 -1
- 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 +3 -0
- package/dist/types/components/sqm-leaderboard/sqm-leaderboard.d.ts +5 -5
- package/dist/types/components/sqm-link-button/sqm-link-button.d.ts +1 -0
- package/dist/types/components/sqm-logout-current-user/sqm-logout-current-user.d.ts +1 -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 -2
- 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-footer/sqm-portal-footer.d.ts +1 -1
- package/dist/types/components/sqm-portal-forgot-password/PortalForgotPassword.stories.d.ts +1 -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/sqm-program-explainer.d.ts +1 -1
- 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 +3 -2
- package/dist/types/components/sqm-referral-card/sqm-referral-card.d.ts +6 -5
- package/dist/types/components/sqm-referral-code/sqm-referral-code.d.ts +2 -2
- 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 +2 -1
- 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-reward-exchange-list/sqm-reward-exchange-list.d.ts +8 -1
- package/dist/types/components/sqm-reward-exchange-list/useRewardExchangeList.d.ts +1 -0
- 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 +1 -0
- 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-scroll/sqm-scroll.d.ts +0 -8
- 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 +3 -3
- package/dist/types/components/sqm-share-link/ShareLink.stories.d.ts +1 -0
- package/dist/types/components/sqm-share-link/sqm-share-link.d.ts +3 -2
- 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 -5
- package/dist/types/components/sqm-task-card/useTaskCard.d.ts +1 -1
- package/dist/types/components/sqm-text/sqm-text.d.ts +1 -1
- 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-titled-section/sqm-titled-section.d.ts +2 -2
- package/dist/types/components/sqm-widget-verification/sqm-widget-verification-controller.d.ts +5 -2
- package/dist/types/components/sqm-widget-verification/sqm-widget-verification.d.ts +6 -2
- 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/sqm-payout-status-alert.d.ts +1 -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 +47 -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-tax-and-cash-dashboard/sqm-tax-and-cash-dashboard.d.ts +5 -0
- 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 +718 -120
- 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/dist/types/utils/utils.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/shoelace/assets/icons/twitter-x.svg +4 -0
- package/dist/cjs/ErrorView-b2fcf954.js +0 -35
- 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-55066ec6.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-portal-forgot-password-view-b986086e.js +0 -45
- package/dist/cjs/sqm-portal-forgot-password.cjs.entry.js +0 -127
- package/dist/cjs/sqm-referred-registration.cjs.entry.js +0 -178
- 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/ErrorView-48e2b969.js +0 -33
- 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-fda573e4.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-portal-forgot-password-view-50444a7c.js +0 -43
- package/dist/esm/sqm-portal-forgot-password.entry.js +0 -123
- package/dist/esm/sqm-referred-registration.entry.js +0 -174
- package/dist/esm/sqm-text-span-view-c577cc60.js +0 -60
- package/dist/esm-es5/ErrorView-48e2b969.js +0 -1
- package/dist/esm-es5/GenericTableView-e7addb2b.js +0 -1
- package/dist/esm-es5/ShadowViewAddon-3651cb42.js +0 -1
- package/dist/esm-es5/copy-text-view-0ac6e1d1.js +0 -1
- package/dist/esm-es5/email-registration-view-a7818cf2.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-fda573e4.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-forgot-password.entry.js +0 -1
- package/dist/esm-es5/sqm-portal-login-view-37c85d04.js +0 -1
- package/dist/esm-es5/sqm-qr-code-view-10b8b4cb.js +0 -1
- package/dist/esm-es5/sqm-referred-registration.entry.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/esm-es5/utils-334c1e34.js +0 -1
- package/dist/mint-components/p-00ed4c2e.entry.js +0 -1
- package/dist/mint-components/p-04a6e457.entry.js +0 -1
- package/dist/mint-components/p-12536a1f.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-16dba1eb.system.js +0 -1
- package/dist/mint-components/p-18425f38.system.entry.js +0 -1
- package/dist/mint-components/p-19ccb4ce.js +0 -1
- package/dist/mint-components/p-1ae6c418.entry.js +0 -1
- package/dist/mint-components/p-1b3ab15a.system.entry.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-275b4767.entry.js +0 -1
- package/dist/mint-components/p-2bbff88f.entry.js +0 -1
- package/dist/mint-components/p-2c7ebd5b.js +0 -1
- 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-320d3c31.entry.js +0 -205
- package/dist/mint-components/p-32dbde60.system.js +0 -1
- package/dist/mint-components/p-33c96e14.entry.js +0 -16
- package/dist/mint-components/p-38de17fa.system.js +0 -1
- 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-3a62a7e2.system.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-42187319.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-49206a9c.entry.js +0 -1
- package/dist/mint-components/p-4e5af50c.js +0 -1
- package/dist/mint-components/p-52858682.system.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-60e72631.entry.js +0 -9
- package/dist/mint-components/p-6333265f.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-6d8f7c71.js +0 -1
- package/dist/mint-components/p-6eaf9c57.entry.js +0 -1
- package/dist/mint-components/p-70c8fea5.system.entry.js +0 -1
- package/dist/mint-components/p-775f3ded.entry.js +0 -1
- package/dist/mint-components/p-776260e8.js +0 -1248
- package/dist/mint-components/p-7ab21e4d.entry.js +0 -1
- package/dist/mint-components/p-7cbec088.system.entry.js +0 -1
- package/dist/mint-components/p-7e3a84bc.js +0 -1
- package/dist/mint-components/p-7e3d84a3.entry.js +0 -13
- 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-8119a65e.system.entry.js +0 -1
- package/dist/mint-components/p-82d04fd3.entry.js +0 -25
- package/dist/mint-components/p-868daffd.system.entry.js +0 -1
- package/dist/mint-components/p-893d7ab4.js +0 -1
- package/dist/mint-components/p-8ab87bd4.entry.js +0 -144
- package/dist/mint-components/p-8abfeff8.entry.js +0 -1
- package/dist/mint-components/p-8c23d1b8.js +0 -1
- package/dist/mint-components/p-8c494bf1.js +0 -1
- package/dist/mint-components/p-8d9328dd.entry.js +0 -33
- package/dist/mint-components/p-8d9d04b7.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-94a876b9.js +0 -1
- package/dist/mint-components/p-9617685e.system.entry.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-9abb9ab0.entry.js +0 -13
- package/dist/mint-components/p-9acb5038.js +0 -1
- package/dist/mint-components/p-9b2e60ce.entry.js +0 -258
- package/dist/mint-components/p-9cf80e85.system.entry.js +0 -1
- package/dist/mint-components/p-a6ca754f.js +0 -394
- package/dist/mint-components/p-afbb3f73.entry.js +0 -1
- package/dist/mint-components/p-b12e132b.system.entry.js +0 -1
- package/dist/mint-components/p-b7d1469d.system.entry.js +0 -1
- package/dist/mint-components/p-bd2a2546.system.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-ccb5699b.js +0 -1
- package/dist/mint-components/p-cd1d497f.system.js +0 -1
- package/dist/mint-components/p-cd651f81.js +0 -42
- package/dist/mint-components/p-da7708a7.entry.js +0 -1
- package/dist/mint-components/p-dcc81e90.entry.js +0 -1
- package/dist/mint-components/p-dce51a2e.system.entry.js +0 -1
- package/dist/mint-components/p-df89186f.system.js +0 -1
- package/dist/mint-components/p-e6f50ffd.entry.js +0 -1
- package/dist/mint-components/p-eab1c9f3.js +0 -1
- package/dist/mint-components/p-ee06426a.system.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-f708da7b.js +0 -1
- package/dist/mint-components/p-f9da2c34.system.entry.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,25 +1,71 @@
|
|
|
1
|
-
import { h, c as Host, d as getAssetPath, g as getElement } from './index-
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { d as dist,
|
|
1
|
+
import { h, c as Host, d as getAssetPath, g as getElement } from './index-b3a06de8.js';
|
|
2
|
+
import { i as intl } from './global-ed7927c1.js';
|
|
3
|
+
import { b as browser, u as useMemo, k as useState } from './dom-context-hooks.module-63370afd.js';
|
|
4
|
+
import { H, L, J, d as dist, w as wn, j as jn, B, F as Fn, $ as $e, g as getEnvironmentSDK } from './index.module-c9811a48.js';
|
|
5
5
|
import { c as cjs } from './cjs-bdfb4486.js';
|
|
6
|
-
import { l as luxonLocale } from './utils-
|
|
6
|
+
import { l as luxonLocale } from './utils-03188de2.js';
|
|
7
7
|
import { c as createStyleSheet, j as jss, a as create } from './JSS-67b5cff8.js';
|
|
8
|
-
import { a as REFERRAL_CODES_NAMESPACE, S as SET_CODE_COPIED } from './useReferralCodes-
|
|
9
|
-
import { H as HostBlock, A as AuthWrapper, a as AuthColumn, b as AuthButtonsContainer, E as ErrorStyles } from './mixins-
|
|
10
|
-
import { C as CopyTextView } from './copy-text-view-
|
|
11
|
-
import { u as useChildElements } from './useChildElements-
|
|
12
|
-
import { l as luxon } from './luxon-
|
|
13
|
-
import { T as TextSpanView } from './sqm-text-span-view-
|
|
8
|
+
import { a as REFERRAL_CODES_NAMESPACE, S as SET_CODE_COPIED } from './useReferralCodes-c2e809cf.js';
|
|
9
|
+
import { H as HostBlock, A as AuthWrapper, a as AuthColumn, b as AuthButtonsContainer, E as ErrorStyles } from './mixins-f750863a.js';
|
|
10
|
+
import { C as CopyTextView } from './copy-text-view-83b09456.js';
|
|
11
|
+
import { u as useChildElements } from './useChildElements-3d872cef.js';
|
|
12
|
+
import { l as luxon } from './luxon-bbf75a9d.js';
|
|
13
|
+
import { T as TextSpanView } from './sqm-text-span-view-4c17b8c9.js';
|
|
14
14
|
import { p as pathToRegexp } from './index-ffa26b43.js';
|
|
15
|
-
import { a as isValidColor, b as isMobile } from './utilities-
|
|
16
|
-
import { a as PortalSectionView, P as PortalContainerView } from './sqm-portal-container-view-
|
|
15
|
+
import { a as isValidColor, b as isMobile } from './utilities-72c07b09.js';
|
|
16
|
+
import { a as PortalSectionView, P as PortalContainerView } from './sqm-portal-container-view-176e92e3.js';
|
|
17
|
+
|
|
18
|
+
function BigStatView(props) {
|
|
19
|
+
const { statvalue, flexReverse, alignment, statTextColor, statFontSize, descriptionTextColor, descriptionFontSize, statFontWeight, } = props;
|
|
20
|
+
// Dependent on props, not feasible to move out
|
|
21
|
+
const style = {
|
|
22
|
+
Container: {
|
|
23
|
+
display: "flex",
|
|
24
|
+
// height: "inherit",
|
|
25
|
+
// "justify-content": "space-between",
|
|
26
|
+
"flex-direction": `${flexReverse ? "column-reverse" : "column"}`,
|
|
27
|
+
"align-items": `${alignment === "left"
|
|
28
|
+
? "flex-start"
|
|
29
|
+
: alignment === "right"
|
|
30
|
+
? "flex-end"
|
|
31
|
+
: "center"}`,
|
|
32
|
+
},
|
|
33
|
+
Stat: {
|
|
34
|
+
"font-size": statFontSize
|
|
35
|
+
? `${statFontSize}px`
|
|
36
|
+
: "var(--sl-font-size-xx-large)",
|
|
37
|
+
"text-align": alignment,
|
|
38
|
+
color: statTextColor || "var(--sqm-text)",
|
|
39
|
+
lineHeight: "35px",
|
|
40
|
+
fontWeight: statFontWeight || "var(--sl-font-weight-normal)",
|
|
41
|
+
},
|
|
42
|
+
Description: {
|
|
43
|
+
"font-size": descriptionFontSize
|
|
44
|
+
? `${descriptionFontSize}px`
|
|
45
|
+
: "var(--sl-font-size-small)",
|
|
46
|
+
"font-weight": "var(--sl-font-weight-normal)",
|
|
47
|
+
color: descriptionTextColor || "var(--sqm-text)",
|
|
48
|
+
"text-align": alignment,
|
|
49
|
+
lineHeight: "20px",
|
|
50
|
+
},
|
|
51
|
+
};
|
|
52
|
+
const sheet = createStyleSheet(style);
|
|
53
|
+
const styleString = sheet.toString();
|
|
54
|
+
return (h("div", { part: "stat-wrapper", class: sheet.classes.Container },
|
|
55
|
+
h("style", { type: "text/css" }, styleString),
|
|
56
|
+
h("div", { part: "stat-value", class: sheet.classes.Stat }, statvalue),
|
|
57
|
+
h("div", { part: "stat-description", class: sheet.classes.Description }, props.labelSlot)));
|
|
58
|
+
}
|
|
17
59
|
|
|
18
60
|
const medium = {
|
|
19
61
|
facebook: { color: "#1877f2", text: "#fff", icon: "facebook" },
|
|
20
62
|
twitter: { color: "#000000", text: "#fff", icon: "twitter-x" },
|
|
21
63
|
email: { color: "#666666", text: "#fff", icon: "envelope" },
|
|
22
|
-
direct: {
|
|
64
|
+
direct: {
|
|
65
|
+
color: "var(--sqm-primary-button-background)",
|
|
66
|
+
text: "var(--sqm-primary-button-color)",
|
|
67
|
+
icon: "send",
|
|
68
|
+
},
|
|
23
69
|
linkedin: { color: "#0077b5", text: "#fff", icon: "linkedin" },
|
|
24
70
|
sms: { color: "#34DA50", text: "#fff", icon: "chat" },
|
|
25
71
|
fbmessenger: { color: "#0084ff", text: "#fff", icon: "messenger" },
|
|
@@ -40,13 +86,9 @@ const sheet = createStyleSheet(style);
|
|
|
40
86
|
const styleString = sheet.toString();
|
|
41
87
|
function ShareButtonView(props, children) {
|
|
42
88
|
const vanillaStyle = `
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
? props.backgroundcolor
|
|
47
|
-
: props.medium
|
|
48
|
-
? medium[props.medium].color
|
|
49
|
-
: ""}80!important;
|
|
89
|
+
sl-button::part(base) {
|
|
90
|
+
border: ${props.border || "none"};
|
|
91
|
+
font-family: var(--sqm-primary-font);
|
|
50
92
|
|
|
51
93
|
background: ${props.backgroundcolor
|
|
52
94
|
? props.backgroundcolor
|
|
@@ -58,24 +100,12 @@ function ShareButtonView(props, children) {
|
|
|
58
100
|
: props.medium
|
|
59
101
|
? medium[props.medium].text
|
|
60
102
|
: ""};
|
|
61
|
-
border-radius: ${props.borderradius
|
|
103
|
+
border-radius: ${props.borderradius
|
|
104
|
+
? props.borderradius + "px"
|
|
105
|
+
: "var(--sqm-primary-button-radius)"};
|
|
62
106
|
}
|
|
63
107
|
|
|
64
|
-
*::part(base):hover {
|
|
65
|
-
border-color: ${props.backgroundcolor
|
|
66
|
-
? props.backgroundcolor
|
|
67
|
-
: props.medium
|
|
68
|
-
? medium[props.medium].color
|
|
69
|
-
: ""}D1!important;
|
|
70
|
-
}
|
|
71
108
|
|
|
72
|
-
*::part(base):focus {
|
|
73
|
-
border-color: ${props.backgroundcolor
|
|
74
|
-
? props.backgroundcolor
|
|
75
|
-
: props.medium
|
|
76
|
-
? medium[props.medium].color
|
|
77
|
-
: ""}D1!important;
|
|
78
|
-
}
|
|
79
109
|
|
|
80
110
|
*::part(label) {
|
|
81
111
|
position: relative;
|
|
@@ -85,495 +115,238 @@ function ShareButtonView(props, children) {
|
|
|
85
115
|
return props.hide ? (h(Host, { style: { display: "none" } })) : (h("div", null,
|
|
86
116
|
h("style", { type: "text/css" }, styleString),
|
|
87
117
|
h("style", { type: "text/css" }, vanillaStyle),
|
|
88
|
-
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}
|
|
118
|
+
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` },
|
|
89
119
|
!props.hideicon && (h("sl-icon", { slot: props.iconslot || "prefix", name: props.icon ? props.icon : medium[props.medium].icon, exportparts: "base: icon" })),
|
|
90
120
|
!props.hidetext && children)));
|
|
91
121
|
}
|
|
92
122
|
|
|
93
|
-
function
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
123
|
+
function StatContainerView(props, children) {
|
|
124
|
+
const divideSpace = () => {
|
|
125
|
+
const spaceValue = getComputedStyle(document.documentElement).getPropertyValue(`--sl-spacing-${props.space}`);
|
|
126
|
+
return `${Math.floor(parseInt(spaceValue) / 2)}rem`;
|
|
127
|
+
};
|
|
128
|
+
// take alignment variable and convert it to CSS flexbox alignment
|
|
129
|
+
const alignment = props.alignment === "center"
|
|
130
|
+
? "center"
|
|
131
|
+
: props.alignment === "right"
|
|
132
|
+
? "flex-end"
|
|
133
|
+
: "flex-start";
|
|
134
|
+
// Dependent on props, not feasible to move out
|
|
97
135
|
const style = {
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
136
|
+
StatContainer: {
|
|
137
|
+
width: "100%",
|
|
138
|
+
display: "flex",
|
|
139
|
+
flexWrap: "wrap",
|
|
140
|
+
alignItems: "center",
|
|
141
|
+
justifyContent: alignment,
|
|
142
|
+
flexDirection: "row",
|
|
143
|
+
gap: `var(--sl-spacing-${props.gap})`,
|
|
144
|
+
// Apply border styles conditionally based on the hideBorder prop
|
|
145
|
+
"& > *": {
|
|
146
|
+
"border-right": props.hideBorder
|
|
147
|
+
? "none"
|
|
148
|
+
: "var(--sqm-border-thickness) solid var(--sqm-border-color)",
|
|
149
|
+
"padding-right": divideSpace(),
|
|
111
150
|
},
|
|
112
|
-
"&
|
|
113
|
-
|
|
151
|
+
"& > :last-child": {
|
|
152
|
+
"border-right": "none",
|
|
114
153
|
},
|
|
115
|
-
"&
|
|
116
|
-
|
|
117
|
-
|
|
154
|
+
"& > ::slotted(*)": {
|
|
155
|
+
"border-right": props.hideBorder
|
|
156
|
+
? "none"
|
|
157
|
+
: "var(--sqm-border-thickness) solid var(--sqm-border-color)",
|
|
158
|
+
"padding-right": divideSpace(),
|
|
118
159
|
},
|
|
119
|
-
"&
|
|
120
|
-
|
|
121
|
-
padding: "0",
|
|
122
|
-
color: styles.textColor || "var(--sqm-text)",
|
|
123
|
-
paddingLeft: "25%",
|
|
160
|
+
"& > ::slotted(*:last-child)": {
|
|
161
|
+
"border-right": "none",
|
|
124
162
|
},
|
|
125
|
-
"
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
color: styles.viewingUserHighlightTextColor || "var(--sqm-text)",
|
|
163
|
+
"@media screen and (max-width: 430px)": {
|
|
164
|
+
"& > ::slotted(*)": {
|
|
165
|
+
borderRight: "none",
|
|
129
166
|
},
|
|
130
167
|
},
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
"
|
|
139
|
-
width: "auto",
|
|
140
|
-
whiteSpace: "nowrap",
|
|
141
|
-
},
|
|
142
|
-
"& .Rank": {
|
|
143
|
-
whiteSpace: "nowrap",
|
|
144
|
-
},
|
|
145
|
-
"& .fullWidth": {
|
|
146
|
-
width: "100%",
|
|
147
|
-
},
|
|
168
|
+
},
|
|
169
|
+
StatFrame: {
|
|
170
|
+
display: "flex",
|
|
171
|
+
},
|
|
172
|
+
BorderFix: {
|
|
173
|
+
"border-right": "var(--sqm-border-thickness) solid transparent",
|
|
174
|
+
width: "0px",
|
|
175
|
+
"margin-left": "-1px",
|
|
148
176
|
},
|
|
149
177
|
};
|
|
150
178
|
const sheet = createStyleSheet(style);
|
|
151
179
|
const styleString = sheet.toString();
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
if (states.isEssentials) {
|
|
158
|
-
return (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" }));
|
|
159
|
-
}
|
|
160
|
-
if (states.loading) {
|
|
161
|
-
return (h("div", { class: sheet.classes.Leaderboard, style: { width: styles.width || "100%" } },
|
|
162
|
-
h("style", { type: "text/css" },
|
|
163
|
-
styleString,
|
|
164
|
-
vanillaStyle),
|
|
165
|
-
h("table", null, [...Array(10)].map(() => {
|
|
166
|
-
return (h("tr", null,
|
|
167
|
-
h("td", null,
|
|
168
|
-
h("sl-skeleton", null))));
|
|
169
|
-
}))));
|
|
170
|
-
}
|
|
171
|
-
if (!states.hasLeaders)
|
|
172
|
-
return elements.empty;
|
|
173
|
-
let userSeenFlag = false;
|
|
174
|
-
const getUsersName = (user) => {
|
|
175
|
-
if (!user.firstName && !user.lastInitial)
|
|
176
|
-
return styles.anonymousUser;
|
|
177
|
-
const { firstName, lastInitial } = user;
|
|
178
|
-
if (firstName && lastInitial)
|
|
179
|
-
return `${firstName} ${lastInitial}`;
|
|
180
|
-
if (firstName || lastInitial)
|
|
181
|
-
return firstName || lastInitial;
|
|
182
|
-
return styles.anonymousUser;
|
|
183
|
-
};
|
|
184
|
-
const getRankCellText = (userRank, isViewingUsersRow) => {
|
|
185
|
-
if (!userRank) {
|
|
186
|
-
return styles.hideNames ? `${styles.viewingUserText}` : "-";
|
|
187
|
-
}
|
|
188
|
-
const viewingUserText = ` - ${styles.viewingUserText}`;
|
|
189
|
-
return styles.rankSuffix
|
|
190
|
-
? intl.formatMessage({
|
|
191
|
-
id: "rank",
|
|
192
|
-
defaultMessage: styles.rankSuffix,
|
|
193
|
-
}, {
|
|
194
|
-
rank: userRank,
|
|
195
|
-
}) + `${isViewingUsersRow && styles.hideNames ? viewingUserText : ""}`
|
|
196
|
-
: `${userRank} ${isViewingUsersRow && styles.hideNames ? viewingUserText : ""}`;
|
|
197
|
-
};
|
|
198
|
-
return (h("div", { class: sheet.classes.Leaderboard, part: "sqm-base", style: { width: styles.width || "100%" } },
|
|
199
|
-
h("style", { type: "text/css" },
|
|
200
|
-
styleString,
|
|
201
|
-
vanillaStyle),
|
|
202
|
-
h("table", { part: "sqm-table" },
|
|
203
|
-
h("tr", null,
|
|
204
|
-
styles.showRank && (h("th", { class: `Rank ${styles.hideNames ? "fullWidth" : ""}` }, styles.rankheading)),
|
|
205
|
-
!styles.hideNames && h("th", { class: "User" }, styles.usersheading),
|
|
206
|
-
h("th", { class: "Score" }, styles.statsheading)), (_a = data.leaderboard) === null || _a === void 0 ? void 0 :
|
|
207
|
-
_a.map((user) => {
|
|
208
|
-
var _a, _b;
|
|
209
|
-
if (user.rowNumber === ((_a = data.viewerRank) === null || _a === void 0 ? void 0 : _a.rowNumber))
|
|
210
|
-
userSeenFlag = true;
|
|
211
|
-
const isViewingUsersRow = !styles.hideViewer && user.rowNumber === ((_b = data.viewerRank) === null || _b === void 0 ? void 0 : _b.rowNumber);
|
|
212
|
-
return (h("tr", { class: isViewingUsersRow ? "highlight" : "" },
|
|
213
|
-
styles.showRank && (h("td", { class: "Rank" }, getRankCellText(user.rank, isViewingUsersRow))),
|
|
214
|
-
!styles.hideNames && h("td", { class: "User" }, getUsersName(user)),
|
|
215
|
-
h("td", { class: "Score" }, user.textValue)));
|
|
216
|
-
}),
|
|
217
|
-
!userSeenFlag && !styles.hideViewer && (h("tr", null,
|
|
218
|
-
h("td", { colSpan: 100, class: "ellipses" },
|
|
219
|
-
h("sl-icon", { name: "three-dots", style: { verticalAlign: "middle" } })))),
|
|
220
|
-
!userSeenFlag && !styles.hideViewer && (h("tr", { class: "highlight" },
|
|
221
|
-
styles.showRank && (h("td", { class: "Rank" }, getRankCellText((_b = data.viewerRank) === null || _b === void 0 ? void 0 : _b.rank, true))),
|
|
222
|
-
!styles.hideNames && (h("td", { class: "User" }, getUsersName(data.viewerRank || {}))),
|
|
223
|
-
h("td", { class: "Score" }, ((_c = data.viewerRank) === null || _c === void 0 ? void 0 : _c.textValue) || "0"))))));
|
|
180
|
+
return (h("div", { class: sheet.classes.StatFrame, part: "sqm-base" },
|
|
181
|
+
h("div", { class: sheet.classes.StatContainer, part: "sqm-inner-container" },
|
|
182
|
+
h("style", { type: "text/css" }, styleString),
|
|
183
|
+
children),
|
|
184
|
+
h("div", { class: sheet.classes.BorderFix, part: "sqm-border" })));
|
|
224
185
|
}
|
|
225
186
|
|
|
226
|
-
function
|
|
227
|
-
const {
|
|
228
|
-
// Dependent on props, not feasiable to move out
|
|
187
|
+
function PortalChangePasswordView(props) {
|
|
188
|
+
const { states, callbacks } = props;
|
|
229
189
|
const style = {
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
:
|
|
238
|
-
|
|
239
|
-
|
|
190
|
+
Dialog: {
|
|
191
|
+
padding: "0",
|
|
192
|
+
"&::part(panel)": {
|
|
193
|
+
background: "var(--sqm-portal-background)",
|
|
194
|
+
borderRadius: "var(--sqm-border-radius-normal, var(--sl-border-radius-medium))",
|
|
195
|
+
},
|
|
196
|
+
"&::part(close-button)": {
|
|
197
|
+
"margin-top": "var(--sl-spacing-medium)",
|
|
198
|
+
},
|
|
199
|
+
"&::part(body)": {
|
|
200
|
+
padding: "0 var(--sl-spacing-x-large) var(--sl-spacing-x-large) var(--sl-spacing-x-large)",
|
|
201
|
+
},
|
|
240
202
|
},
|
|
241
|
-
|
|
242
|
-
"
|
|
243
|
-
|
|
203
|
+
Error: {
|
|
204
|
+
"&::part(erroralert-base)": {
|
|
205
|
+
"margin-bottom": "15px",
|
|
206
|
+
},
|
|
244
207
|
},
|
|
245
|
-
|
|
246
|
-
"
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
208
|
+
Success: {
|
|
209
|
+
"&::part(successalert-base)": {
|
|
210
|
+
"margin-bottom": "15px",
|
|
211
|
+
},
|
|
212
|
+
},
|
|
213
|
+
InputContainer: {
|
|
214
|
+
"& > :not(:last-child)": {
|
|
215
|
+
"margin-bottom": "var(--sl-spacing-x-large)",
|
|
216
|
+
},
|
|
217
|
+
},
|
|
218
|
+
CancelButton: {
|
|
219
|
+
margin: "var(--sl-spacing-large) auto",
|
|
220
|
+
width: "100%",
|
|
221
|
+
},
|
|
222
|
+
PasswordField: {
|
|
223
|
+
marginBottom: "var(--sl-spacing-large) !important",
|
|
224
|
+
display: "block",
|
|
225
|
+
},
|
|
226
|
+
ChangePasswordButton: {
|
|
227
|
+
paddingTop: "var(--sl-spacing-x-large)",
|
|
250
228
|
},
|
|
251
229
|
};
|
|
252
230
|
const sheet = createStyleSheet(style);
|
|
253
231
|
const styleString = sheet.toString();
|
|
254
|
-
return (h("div",
|
|
232
|
+
return (h("div", null,
|
|
255
233
|
h("style", { type: "text/css" }, styleString),
|
|
256
|
-
h("
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
"box-sizing": "border-box",
|
|
282
|
-
display: "flex",
|
|
283
|
-
"justify-content": "space-between",
|
|
284
|
-
padding: "var(--sl-spacing-small) var(--sl-spacing-large)",
|
|
285
|
-
"align-items": "center",
|
|
286
|
-
"background-color": "var(--sqm-header-background)",
|
|
287
|
-
"@media screen and (max-width: 499px)": {
|
|
288
|
-
"flex-direction": "row-reverse",
|
|
289
|
-
"justify-content": "flex-end",
|
|
290
|
-
padding: "0",
|
|
291
|
-
},
|
|
292
|
-
},
|
|
293
|
-
};
|
|
294
|
-
const sheet$1 = createStyleSheet(style$1);
|
|
295
|
-
const styleString$1 = sheet$1.toString();
|
|
296
|
-
function PortalFrameView(props, children) {
|
|
297
|
-
const { data, notFullScreen } = props;
|
|
298
|
-
return (h("div", { style: { minHeight: notFullScreen ? "100%" : "100vh" }, class: sheet$1.classes.Frame, part: "sqm-base" },
|
|
299
|
-
h("style", { type: "text/css" }, styleString$1),
|
|
300
|
-
h("div", { class: sheet$1.classes.HeaderWrapper, part: "sqm-header" },
|
|
301
|
-
data.header,
|
|
302
|
-
h("slot", { name: "sqm-navigation-menu" })),
|
|
303
|
-
children,
|
|
304
|
-
h("div", { class: sheet$1.classes.FooterWrapper, part: "sqm-footer" }, data.footer)));
|
|
234
|
+
h("sl-dialog", { class: sheet.classes.Dialog, open: states.open, "onSl-hide": () => callbacks.setOpen(false) },
|
|
235
|
+
h(PortalSectionView, Object.assign({}, {
|
|
236
|
+
labelMargin: "x-large",
|
|
237
|
+
padding: "none",
|
|
238
|
+
label: (h(TextSpanView, Object.assign({}, { type: "h2" }), states.content.modalChangePasswordHeader)),
|
|
239
|
+
content: (h(PortalContainerView, Object.assign({}, { direction: "column", padding: "none", gap: "32px" }),
|
|
240
|
+
states.error && (h("sqm-form-message", { class: sheet.classes.Error, type: "error", exportparts: "erroralert-icon" },
|
|
241
|
+
h("div", { part: "erroralert-text" }, states.error))),
|
|
242
|
+
states.success && (h("sqm-form-message", { class: sheet.classes.Success, type: "success", exportparts: "successalert-icon" },
|
|
243
|
+
h("div", { part: "successalert-text" }, states.content.successMessage))),
|
|
244
|
+
h("sl-form", { "onSl-submit": callbacks.submit },
|
|
245
|
+
h("div", { class: sheet.classes.InputContainer },
|
|
246
|
+
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 }),
|
|
247
|
+
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" })),
|
|
248
|
+
h(PortalContainerView, Object.assign({}, { direction: "row", padding: "none", gap: "20px" }),
|
|
249
|
+
h("sl-button", { class: sheet.classes.ChangePasswordButton, type: "primary", exportparts: "base: primarybutton-base", submit: true, loading: states.loading }, states.content.changePasswordButtonText),
|
|
250
|
+
h("sl-button", { class: sheet.classes.CancelButton, type: "secondary", exportparts: "base: secondarybutton-base", onClick: () => callbacks.setOpen(false) }, states.content.cancelText))))),
|
|
251
|
+
}))),
|
|
252
|
+
h(PortalSectionView, Object.assign({}, {
|
|
253
|
+
labelMargin: "x-large",
|
|
254
|
+
padding: "xxx-large",
|
|
255
|
+
label: (h(TextSpanView, Object.assign({}, { type: "h2" }), states.content.portalChangePasswordHeader)),
|
|
256
|
+
content: (h("sl-button", { type: "primary", exportparts: "base: primarybutton-base", onClick: () => callbacks.setOpen(true) }, states.content.portalChangePasswordButtonText)),
|
|
257
|
+
}),
|
|
258
|
+
h("style", { type: "text/css" }, styleString))));
|
|
305
259
|
}
|
|
306
260
|
|
|
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
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
261
|
+
function PoweredByImg({ color = "#A6A6A6", width = 120, height = 16, }) {
|
|
262
|
+
return (h("svg", { width: width, height: height, viewBox: "0 0 1662 254", fill: "none", xmlns: "http://www.w3.org/2000/svg" },
|
|
263
|
+
h("path", { d: "M801.082 253.58L869.382 1.67969", stroke: color, "stroke-width": "3" }),
|
|
264
|
+
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 }),
|
|
265
|
+
h("path", { d: "M135.882 89.2798H115.582V187.58H135.882V89.2798Z", fill: color }),
|
|
266
|
+
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 }),
|
|
267
|
+
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 }),
|
|
268
|
+
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 }),
|
|
269
|
+
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 }),
|
|
270
|
+
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 }),
|
|
271
|
+
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 }),
|
|
272
|
+
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 }),
|
|
273
|
+
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 }),
|
|
274
|
+
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 }),
|
|
275
|
+
h("path", { d: "M135.882 89.2798H115.582V187.58H135.882V89.2798Z", fill: color }),
|
|
276
|
+
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 }),
|
|
277
|
+
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 }),
|
|
278
|
+
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 }),
|
|
279
|
+
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 }),
|
|
280
|
+
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 }),
|
|
281
|
+
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 }),
|
|
282
|
+
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 }),
|
|
283
|
+
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 }),
|
|
284
|
+
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 }),
|
|
285
|
+
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 }),
|
|
286
|
+
h("path", { d: "M1208.57 104.5L1172.3 202H1161.96L1125.5 104.5H1136.61L1167.03 189.715L1197.45 104.5H1208.57Z", fill: color }),
|
|
287
|
+
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 }),
|
|
288
|
+
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 }),
|
|
289
|
+
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 }),
|
|
290
|
+
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 }),
|
|
291
|
+
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 })));
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
const debug = browser("sq:useBigStat");
|
|
295
|
+
const LOADING = "...";
|
|
296
|
+
const debugQuery = (query, variables, getStat) => {
|
|
297
|
+
const res = wn(query, variables);
|
|
298
|
+
if (!(res === null || res === void 0 ? void 0 : res.data) && !res.loading) {
|
|
299
|
+
console.error("issue getting stat:", res);
|
|
341
300
|
}
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
h("h2", { part: "sqm-header", style: {
|
|
345
|
-
fontSize: "var(--sl-font-size-x-large)",
|
|
346
|
-
marginBottom: "0px",
|
|
347
|
-
textAlign: "center",
|
|
348
|
-
} }, text.editprofileheader),
|
|
349
|
-
h("div", null,
|
|
350
|
-
h("p", { style: { fontSize: "var(--sl-font-size-medium)" } }, (_a = states.user) === null || _a === void 0 ? void 0 :
|
|
351
|
-
_a.firstName,
|
|
352
|
-
" ", (_b = states.user) === null || _b === void 0 ? void 0 :
|
|
353
|
-
_b.lastName),
|
|
354
|
-
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))),
|
|
355
|
-
h("sl-button", { type: "primary", loading: states.loading, onClick: () => {
|
|
356
|
-
callbacks.resetForm();
|
|
357
|
-
callbacks.setShowEdit(true);
|
|
358
|
-
}, exportparts: "base: primarybutton-base" }, text.editprofiletext)));
|
|
301
|
+
const stat = getStat(res);
|
|
302
|
+
return { ...stat, loading: res.loading };
|
|
359
303
|
};
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
304
|
+
const referralsCountQuery = (programId,
|
|
305
|
+
// locale
|
|
306
|
+
_, status) => {
|
|
307
|
+
const programFilter = programId === "classic"
|
|
308
|
+
? { programId_exists: false }
|
|
309
|
+
: { programId_eq: programId };
|
|
310
|
+
const convertedFilter = status && status == "converted"
|
|
311
|
+
? { dateConverted_exists: true }
|
|
312
|
+
: status && status == "started"
|
|
313
|
+
? { dateConverted_exists: false }
|
|
314
|
+
: {};
|
|
315
|
+
const queryFilter = { ...programFilter, ...convertedFilter };
|
|
316
|
+
return debugQuery(dist.gql `
|
|
317
|
+
query ($queryFilter: ReferralFilterInput) {
|
|
318
|
+
viewer {
|
|
319
|
+
... on User {
|
|
320
|
+
referrals(filter: $queryFilter) {
|
|
321
|
+
totalCount
|
|
322
|
+
}
|
|
323
|
+
}
|
|
324
|
+
}
|
|
370
325
|
}
|
|
371
|
-
}
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
createUserAnalyticsEvent(eventMeta: $eventMeta)
|
|
377
|
-
}
|
|
378
|
-
`;
|
|
379
|
-
function useShareLink(props) {
|
|
380
|
-
var _a, _b;
|
|
381
|
-
const { programId = H() } = props;
|
|
382
|
-
const user = J();
|
|
383
|
-
const engagementMedium = B();
|
|
384
|
-
const contextData = Fn(REFERRAL_CODES_NAMESPACE);
|
|
385
|
-
const { data } = 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);
|
|
386
|
-
const [sendLoadEvent] = $e(WIDGET_ENGAGEMENT_EVENT);
|
|
387
|
-
const [setCopied, copiedRes] = $e(SET_CODE_COPIED);
|
|
388
|
-
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 :
|
|
389
|
-
// Shown during loading
|
|
390
|
-
"...";
|
|
391
|
-
const [open, setOpen] = useState(false);
|
|
392
|
-
async function onClick() {
|
|
393
|
-
if (contextData) {
|
|
394
|
-
await setCopied({ referralCode: contextData.referralCode });
|
|
395
|
-
contextData.refresh();
|
|
396
|
-
}
|
|
397
|
-
// Should well supported: https://developer.mozilla.org/en-US/docs/Web/API/Clipboard#browser_compatibility
|
|
398
|
-
// Only if called from a user-initiated event
|
|
399
|
-
navigator.clipboard.writeText(copyString);
|
|
400
|
-
setOpen(true);
|
|
401
|
-
setTimeout(() => setOpen(false), props.tooltiplifespan);
|
|
402
|
-
sendLoadEvent({
|
|
403
|
-
eventMeta: {
|
|
404
|
-
programId,
|
|
405
|
-
id: user === null || user === void 0 ? void 0 : user.id,
|
|
406
|
-
accountId: user === null || user === void 0 ? void 0 : user.accountId,
|
|
407
|
-
type: "USER_REFERRAL_PROGRAM_ENGAGEMENT_EVENT",
|
|
408
|
-
meta: {
|
|
409
|
-
engagementMedium,
|
|
410
|
-
shareMedium: "DIRECT",
|
|
411
|
-
},
|
|
412
|
-
},
|
|
326
|
+
`, { queryFilter }, (res) => {
|
|
327
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
328
|
+
return ({
|
|
329
|
+
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,
|
|
330
|
+
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(),
|
|
413
331
|
});
|
|
414
|
-
}
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
}
|
|
433
|
-
}
|
|
434
|
-
}
|
|
435
|
-
`;
|
|
436
|
-
function NativeShare(props, directLink, undefinedErrorText, unsupportedPlatformText) {
|
|
437
|
-
const title = props.sharetitle || "Share title";
|
|
438
|
-
const text = props.sharetext || "Share text";
|
|
439
|
-
if (directLink === "undefined") {
|
|
440
|
-
return alert(undefinedErrorText);
|
|
441
|
-
}
|
|
442
|
-
if (window.navigator.share) {
|
|
443
|
-
window.navigator
|
|
444
|
-
.share({
|
|
445
|
-
title,
|
|
446
|
-
text,
|
|
447
|
-
url: directLink,
|
|
448
|
-
})
|
|
449
|
-
.catch((error) => console.error("Error on web share", error));
|
|
450
|
-
}
|
|
451
|
-
else {
|
|
452
|
-
alert(unsupportedPlatformText);
|
|
453
|
-
}
|
|
454
|
-
}
|
|
455
|
-
function FacebookShare(directLink, messageLink, errorText) {
|
|
456
|
-
if (messageLink === "undefined" || directLink === "undefined") {
|
|
457
|
-
return alert(errorText);
|
|
458
|
-
}
|
|
459
|
-
if (typeof SquatchAndroid.shareOnFacebook !== "undefined") {
|
|
460
|
-
return SquatchAndroid.shareOnFacebook(directLink, messageLink);
|
|
461
|
-
}
|
|
462
|
-
else {
|
|
463
|
-
return GenericShare(messageLink, errorText);
|
|
464
|
-
}
|
|
465
|
-
}
|
|
466
|
-
function GenericShare(messageLink, errorText) {
|
|
467
|
-
return messageLink ? (window.location.href = messageLink) : alert(errorText);
|
|
468
|
-
}
|
|
469
|
-
function useShareButton(props) {
|
|
470
|
-
var _a, _b, _c, _d;
|
|
471
|
-
const { sharetitle, sharetext, medium } = props;
|
|
472
|
-
const programId = props.programId ? props.programId : H();
|
|
473
|
-
const user = J();
|
|
474
|
-
const engagementMedium = B();
|
|
475
|
-
const variables = {
|
|
476
|
-
engagementMedium,
|
|
477
|
-
programId: programId,
|
|
478
|
-
shareMedium: medium.toUpperCase(),
|
|
479
|
-
};
|
|
480
|
-
const contextData = Fn(REFERRAL_CODES_NAMESPACE);
|
|
481
|
-
const overrideData = contextData === null || contextData === void 0 ? void 0 : contextData[medium];
|
|
482
|
-
// only queries if a programId is available
|
|
483
|
-
const res = wn(MessageLinkQuery$1, variables, !(user === null || user === void 0 ? void 0 : user.jwt) || !programId || overrideData !== undefined);
|
|
484
|
-
const [setCopied, copiedRes] = $e(SET_CODE_COPIED);
|
|
485
|
-
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);
|
|
486
|
-
const environment = getEnvironmentSDK();
|
|
487
|
-
const hide = (medium.toLocaleUpperCase() === "SMS" &&
|
|
488
|
-
window.orientation === undefined) ||
|
|
489
|
-
(medium.toLocaleUpperCase() === "DIRECT" && !window.navigator.share);
|
|
490
|
-
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);
|
|
491
|
-
async function onClick() {
|
|
492
|
-
if (overrideData) {
|
|
493
|
-
await setCopied({ referralCode: contextData.referralCode });
|
|
494
|
-
contextData.refresh();
|
|
495
|
-
}
|
|
496
|
-
if (medium.toLocaleUpperCase() === "FACEBOOK" &&
|
|
497
|
-
environment.type === "SquatchAndroid") {
|
|
498
|
-
FacebookShare(directLink, messageLink, props.errorText);
|
|
499
|
-
}
|
|
500
|
-
else if (medium.toLocaleUpperCase() === "DIRECT") {
|
|
501
|
-
NativeShare({ sharetitle, sharetext }, directLink, props.errorText, props.unsupportedPlatformText);
|
|
502
|
-
}
|
|
503
|
-
}
|
|
504
|
-
const isPlainLink = !(medium.toLocaleUpperCase() === "FACEBOOK" &&
|
|
505
|
-
environment.type === "SquatchAndroid") &&
|
|
506
|
-
medium.toLocaleUpperCase() !== "DIRECT" &&
|
|
507
|
-
messageLink;
|
|
508
|
-
const userAgent = window.navigator.userAgent.toLowerCase(), safari = /safari/.test(userAgent), ios = /iphone|ipod|ipad/.test(userAgent);
|
|
509
|
-
const openInSameTab = ios && !safari;
|
|
510
|
-
return {
|
|
511
|
-
...props,
|
|
512
|
-
loading: res.loading && !(overrideData === null || overrideData === void 0 ? void 0 : overrideData.messageLink),
|
|
513
|
-
messageLink,
|
|
514
|
-
isPlainLink,
|
|
515
|
-
onClick,
|
|
516
|
-
openInSameTab,
|
|
517
|
-
hide,
|
|
518
|
-
};
|
|
519
|
-
}
|
|
520
|
-
|
|
521
|
-
const debug = browser("sq:useBigStat");
|
|
522
|
-
const LOADING = "...";
|
|
523
|
-
const debugQuery = (query, variables, getStat) => {
|
|
524
|
-
const res = wn(query, variables);
|
|
525
|
-
if (!(res === null || res === void 0 ? void 0 : res.data) && !res.loading) {
|
|
526
|
-
console.error("issue getting stat:", res);
|
|
527
|
-
}
|
|
528
|
-
const stat = getStat(res);
|
|
529
|
-
return { ...stat, loading: res.loading };
|
|
530
|
-
};
|
|
531
|
-
const referralsCountQuery = (programId,
|
|
532
|
-
// locale
|
|
533
|
-
_, status) => {
|
|
534
|
-
const programFilter = programId === "classic"
|
|
535
|
-
? { programId_exists: false }
|
|
536
|
-
: { programId_eq: programId };
|
|
537
|
-
const convertedFilter = status && status == "converted"
|
|
538
|
-
? { dateConverted_exists: true }
|
|
539
|
-
: status && status == "started"
|
|
540
|
-
? { dateConverted_exists: false }
|
|
541
|
-
: {};
|
|
542
|
-
const queryFilter = { ...programFilter, ...convertedFilter };
|
|
543
|
-
return debugQuery(dist.gql `
|
|
544
|
-
query ($queryFilter: ReferralFilterInput) {
|
|
545
|
-
viewer {
|
|
546
|
-
... on User {
|
|
547
|
-
referrals(filter: $queryFilter) {
|
|
548
|
-
totalCount
|
|
549
|
-
}
|
|
550
|
-
}
|
|
551
|
-
}
|
|
552
|
-
}
|
|
553
|
-
`, { queryFilter }, (res) => {
|
|
554
|
-
var _a, _b, _c, _d, _e, _f, _g;
|
|
555
|
-
return ({
|
|
556
|
-
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,
|
|
557
|
-
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(),
|
|
558
|
-
});
|
|
559
|
-
});
|
|
560
|
-
};
|
|
561
|
-
const programGoalsQuery = (programId, locale, metricType, goalId) => {
|
|
562
|
-
// Confirm this behaviour
|
|
563
|
-
if (programId === "classic")
|
|
564
|
-
return null;
|
|
565
|
-
return debugQuery(dist.gql `
|
|
566
|
-
query {
|
|
567
|
-
viewer {
|
|
568
|
-
... on User {
|
|
569
|
-
programGoals {
|
|
570
|
-
goalId
|
|
571
|
-
programId
|
|
572
|
-
count
|
|
573
|
-
conversionCount
|
|
574
|
-
}
|
|
575
|
-
}
|
|
576
|
-
}
|
|
332
|
+
});
|
|
333
|
+
};
|
|
334
|
+
const programGoalsQuery = (programId, locale, metricType, goalId) => {
|
|
335
|
+
// Confirm this behaviour
|
|
336
|
+
if (programId === "classic")
|
|
337
|
+
return null;
|
|
338
|
+
return debugQuery(dist.gql `
|
|
339
|
+
query {
|
|
340
|
+
viewer {
|
|
341
|
+
... on User {
|
|
342
|
+
programGoals {
|
|
343
|
+
goalId
|
|
344
|
+
programId
|
|
345
|
+
count
|
|
346
|
+
conversionCount
|
|
347
|
+
}
|
|
348
|
+
}
|
|
349
|
+
}
|
|
577
350
|
}
|
|
578
351
|
`, { programId, metricType, goalId, locale }, (res) => {
|
|
579
352
|
var _a, _b, _c, _d, _e, _f;
|
|
@@ -602,12 +375,18 @@ const customFieldsQuery = (_programId, locale, fieldName, goalId) => {
|
|
|
602
375
|
};
|
|
603
376
|
});
|
|
604
377
|
};
|
|
605
|
-
const referralsMonthQuery = (programId) => {
|
|
378
|
+
const referralsMonthQuery = (programId, status) => {
|
|
606
379
|
const programFilter = programId === "classic"
|
|
607
380
|
? { programId_exists: false }
|
|
608
381
|
: { programId_eq: programId };
|
|
382
|
+
const convertedFilter = status && status == "converted"
|
|
383
|
+
? { dateConverted_exists: true }
|
|
384
|
+
: status && status == "started"
|
|
385
|
+
? { dateConverted_exists: false }
|
|
386
|
+
: {};
|
|
609
387
|
const filter = {
|
|
610
388
|
...programFilter,
|
|
389
|
+
...convertedFilter,
|
|
611
390
|
dateReferralStarted_timeframe: "this_month",
|
|
612
391
|
};
|
|
613
392
|
return debugQuery(dist.gql `
|
|
@@ -1050,6 +829,92 @@ const rewardsAssignedQuery = (programId, locale, type, unit, global = "") => {
|
|
|
1050
829
|
};
|
|
1051
830
|
});
|
|
1052
831
|
};
|
|
832
|
+
const rewardsExpiredQuery = (programId, locale, type, unit, global = "") => {
|
|
833
|
+
return debugQuery(dist.gql `
|
|
834
|
+
query (
|
|
835
|
+
$programId: ID
|
|
836
|
+
$type: RewardType
|
|
837
|
+
$unit: String!
|
|
838
|
+
$locale: RSLocale
|
|
839
|
+
) {
|
|
840
|
+
fallback: formatRewardPrettyValue(
|
|
841
|
+
value: 0
|
|
842
|
+
unit: $unit
|
|
843
|
+
locale: $locale
|
|
844
|
+
formatType: UNIT_FORMATTED
|
|
845
|
+
)
|
|
846
|
+
viewer: viewer {
|
|
847
|
+
... on User {
|
|
848
|
+
rewardBalanceDetails(
|
|
849
|
+
programId: $programId
|
|
850
|
+
filter: { type_eq: $type, unit_eq: $unit }
|
|
851
|
+
locale: $locale
|
|
852
|
+
) {
|
|
853
|
+
... on CreditRewardBalance {
|
|
854
|
+
prettyExpiredCredit
|
|
855
|
+
}
|
|
856
|
+
}
|
|
857
|
+
}
|
|
858
|
+
}
|
|
859
|
+
}
|
|
860
|
+
`, {
|
|
861
|
+
programId: !global && programId !== "classic" ? programId : null,
|
|
862
|
+
type,
|
|
863
|
+
unit,
|
|
864
|
+
locale,
|
|
865
|
+
}, (res) => {
|
|
866
|
+
var _a, _b, _c, _d, _e;
|
|
867
|
+
const arr = (_b = (_a = res.data) === null || _a === void 0 ? void 0 : _a.viewer) === null || _b === void 0 ? void 0 : _b.rewardBalanceDetails;
|
|
868
|
+
const fallback = (_c = res.data) === null || _c === void 0 ? void 0 : _c.fallback;
|
|
869
|
+
return {
|
|
870
|
+
value: ((_d = arr === null || arr === void 0 ? void 0 : arr[0]) === null || _d === void 0 ? void 0 : _d.prettyAssignedCredit) || 0,
|
|
871
|
+
statvalue: ((_e = arr === null || arr === void 0 ? void 0 : arr[0]) === null || _e === void 0 ? void 0 : _e.prettyAssignedCredit) || fallback,
|
|
872
|
+
};
|
|
873
|
+
});
|
|
874
|
+
};
|
|
875
|
+
const rewardsCancelledQuery = (programId, locale, type, unit, global = "") => {
|
|
876
|
+
return debugQuery(dist.gql `
|
|
877
|
+
query (
|
|
878
|
+
$programId: ID
|
|
879
|
+
$type: RewardType
|
|
880
|
+
$unit: String!
|
|
881
|
+
$locale: RSLocale
|
|
882
|
+
) {
|
|
883
|
+
fallback: formatRewardPrettyValue(
|
|
884
|
+
value: 0
|
|
885
|
+
unit: $unit
|
|
886
|
+
locale: $locale
|
|
887
|
+
formatType: UNIT_FORMATTED
|
|
888
|
+
)
|
|
889
|
+
viewer: viewer {
|
|
890
|
+
... on User {
|
|
891
|
+
rewardBalanceDetails(
|
|
892
|
+
programId: $programId
|
|
893
|
+
filter: { type_eq: $type, unit_eq: $unit }
|
|
894
|
+
locale: $locale
|
|
895
|
+
) {
|
|
896
|
+
... on CreditRewardBalance {
|
|
897
|
+
prettyCancelledCredit
|
|
898
|
+
}
|
|
899
|
+
}
|
|
900
|
+
}
|
|
901
|
+
}
|
|
902
|
+
}
|
|
903
|
+
`, {
|
|
904
|
+
programId: !global && programId !== "classic" ? programId : null,
|
|
905
|
+
type,
|
|
906
|
+
unit,
|
|
907
|
+
locale,
|
|
908
|
+
}, (res) => {
|
|
909
|
+
var _a, _b, _c, _d, _e;
|
|
910
|
+
const arr = (_b = (_a = res.data) === null || _a === void 0 ? void 0 : _a.viewer) === null || _b === void 0 ? void 0 : _b.rewardBalanceDetails;
|
|
911
|
+
const fallback = (_c = res.data) === null || _c === void 0 ? void 0 : _c.fallback;
|
|
912
|
+
return {
|
|
913
|
+
value: ((_d = arr === null || arr === void 0 ? void 0 : arr[0]) === null || _d === void 0 ? void 0 : _d.prettyAssignedCredit) || 0,
|
|
914
|
+
statvalue: ((_e = arr === null || arr === void 0 ? void 0 : arr[0]) === null || _e === void 0 ? void 0 : _e.prettyAssignedCredit) || fallback,
|
|
915
|
+
};
|
|
916
|
+
});
|
|
917
|
+
};
|
|
1053
918
|
const rewardsAvailableQuery = (programId, locale, type, unit, global = "") => {
|
|
1054
919
|
return debugQuery(dist.gql `
|
|
1055
920
|
query (
|
|
@@ -1255,6 +1120,14 @@ const queries = {
|
|
|
1255
1120
|
label: "Rewards Pending",
|
|
1256
1121
|
query: rewardsPendingQuery,
|
|
1257
1122
|
},
|
|
1123
|
+
rewardsExpired: {
|
|
1124
|
+
label: "Rewards Expired",
|
|
1125
|
+
query: rewardsExpiredQuery,
|
|
1126
|
+
},
|
|
1127
|
+
rewardsCancelled: {
|
|
1128
|
+
label: "Rewards Cancelled",
|
|
1129
|
+
query: rewardsCancelledQuery,
|
|
1130
|
+
},
|
|
1258
1131
|
rewardsRedeemed: {
|
|
1259
1132
|
label: "Rewards Paid",
|
|
1260
1133
|
query: rewardsRedeemedQuery,
|
|
@@ -1280,495 +1153,257 @@ const queries = {
|
|
|
1280
1153
|
query: referralsMonthQuery,
|
|
1281
1154
|
},
|
|
1282
1155
|
referralsWeek: {
|
|
1283
|
-
label: "Referrals - This Week",
|
|
1284
|
-
query: referralsWeekQuery,
|
|
1285
|
-
},
|
|
1286
|
-
rewardsCount: {
|
|
1287
|
-
label: "Rewards",
|
|
1288
|
-
query: rewardsCountQuery,
|
|
1289
|
-
},
|
|
1290
|
-
rewardsCountFiltered: {
|
|
1291
|
-
label: "Rewards",
|
|
1292
|
-
query: rewardsCountFilteredQuery,
|
|
1293
|
-
},
|
|
1294
|
-
integrationRewardsCountFiltered: {
|
|
1295
|
-
label: "Rewards",
|
|
1296
|
-
query: integrationRewardsCountFilteredQuery,
|
|
1297
|
-
},
|
|
1298
|
-
rewardsMonth: {
|
|
1299
|
-
label: "Rewards - This Month",
|
|
1300
|
-
query: rewardsMonthQuery,
|
|
1301
|
-
},
|
|
1302
|
-
rewardsWeek: {
|
|
1303
|
-
label: "Rewards - This Week",
|
|
1304
|
-
query: rewardsWeekQuery,
|
|
1305
|
-
},
|
|
1306
|
-
rewardBalance: {
|
|
1307
|
-
label: "Balance - Credit Earned",
|
|
1308
|
-
query: rewardsBalanceQuery,
|
|
1309
|
-
},
|
|
1310
|
-
programGoals: {
|
|
1311
|
-
label: "Program Goals",
|
|
1312
|
-
query: programGoalsQuery,
|
|
1313
|
-
},
|
|
1314
|
-
customFields: {
|
|
1315
|
-
label: "Custom Fields",
|
|
1316
|
-
query: customFieldsQuery,
|
|
1317
|
-
},
|
|
1318
|
-
traffic: {
|
|
1319
|
-
label: "Traffic",
|
|
1320
|
-
query: trafficQuery,
|
|
1321
|
-
},
|
|
1322
|
-
userStats: {
|
|
1323
|
-
label: "User Stat",
|
|
1324
|
-
query: userStatsQuery,
|
|
1325
|
-
},
|
|
1326
|
-
payoutBalance: {
|
|
1327
|
-
label: "Payout Balance",
|
|
1328
|
-
query: payoutBalanceQuery,
|
|
1329
|
-
},
|
|
1330
|
-
};
|
|
1331
|
-
// this should be exposed in documentation somehow
|
|
1332
|
-
const StatPaths = [
|
|
1333
|
-
{ name: "programGoals", route: "/(programGoals)/:metricType/:goalId" },
|
|
1334
|
-
{ name: "customFields", route: "/(customFields)/:customField" },
|
|
1335
|
-
{ name: "referralsCount", route: "/(referralsCount)/:status?" },
|
|
1336
|
-
{ name: "referralsMonth", route: "/(referralsMonth)" },
|
|
1337
|
-
{ name: "referralsWeek", route: "/(referralsWeek)" },
|
|
1338
|
-
{ name: "rewardsCount", route: "/(rewardsCount)/:global?" },
|
|
1339
|
-
{ name: "rewardsMonth", route: "/(rewardsMonth)/:global?" },
|
|
1340
|
-
{ name: "rewardsWeek", route: "/(rewardsWeek)/:global?" },
|
|
1341
|
-
{
|
|
1342
|
-
name: "rewardsCountFiltered",
|
|
1343
|
-
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?",
|
|
1344
|
-
},
|
|
1345
|
-
{
|
|
1346
|
-
name: "integrationRewardsCountFiltered",
|
|
1347
|
-
route: "/(integrationRewardsCountFiltered)/:status([PENDING|CANCELLED|EXPIRED|REDEEMED|AVAILABLE]*)?/:global?",
|
|
1348
|
-
},
|
|
1349
|
-
{
|
|
1350
|
-
name: "rewardsAssigned",
|
|
1351
|
-
route: "/(rewardsAssigned)/:statType/:unit/:global?",
|
|
1352
|
-
},
|
|
1353
|
-
{
|
|
1354
|
-
name: "rewardsPending",
|
|
1355
|
-
route: "/(rewardsPending)/:statType/:unit/:global?",
|
|
1356
|
-
},
|
|
1357
|
-
{
|
|
1358
|
-
name: "rewardsRedeemed",
|
|
1359
|
-
route: "/(rewardsRedeemed)/:statType/:unit/:global?",
|
|
1360
|
-
},
|
|
1361
|
-
{
|
|
1362
|
-
name: "rewardsRedeemedWeek",
|
|
1363
|
-
route: "/(rewardsRedeemedWeek)/:statType/:unit/:global?",
|
|
1364
|
-
},
|
|
1365
|
-
{
|
|
1366
|
-
name: "rewardsRedeemedMonth",
|
|
1367
|
-
route: "/(rewardsRedeemedMonth)/:statType/:unit/:global?",
|
|
1368
|
-
},
|
|
1369
|
-
{
|
|
1370
|
-
name: "rewardsAvailable",
|
|
1371
|
-
route: "/(rewardsAvailable)/:statType/:unit/:global?",
|
|
1372
|
-
},
|
|
1373
|
-
{
|
|
1374
|
-
name: "rewardBalance",
|
|
1375
|
-
route: "/(rewardBalance)/:statType/:unit/:format([prettyValue|value]*)?/:global?",
|
|
1376
|
-
},
|
|
1377
|
-
{
|
|
1378
|
-
name: "traffic",
|
|
1379
|
-
route: "/(traffic)",
|
|
1380
|
-
},
|
|
1381
|
-
{
|
|
1382
|
-
name: "userStats",
|
|
1383
|
-
route: "/(userStats)/:statId",
|
|
1384
|
-
},
|
|
1385
|
-
{
|
|
1386
|
-
name: "payoutBalance",
|
|
1387
|
-
route: "/(payoutBalance)",
|
|
1388
|
-
},
|
|
1389
|
-
];
|
|
1390
|
-
const StatPatterns = StatPaths.map((pattern) => pathToRegexp(pattern.route));
|
|
1391
|
-
function useBigStat(props) {
|
|
1392
|
-
var _a;
|
|
1393
|
-
const { statType, flexReverse, alignment, programId = H(), } = props;
|
|
1394
|
-
// triggers a re-render if the label is manually changed
|
|
1395
|
-
useChildElements();
|
|
1396
|
-
const locale = L();
|
|
1397
|
-
const userIdent = J();
|
|
1398
|
-
const re = useMemo(() => StatPatterns.find((re) => re.exec(statType)), [statType]);
|
|
1399
|
-
if (!(re === null || re === void 0 ? void 0 : re.exec(statType))) {
|
|
1400
|
-
return {
|
|
1401
|
-
props: {
|
|
1402
|
-
value: 0,
|
|
1403
|
-
statvalue: "!!!",
|
|
1404
|
-
flexReverse,
|
|
1405
|
-
alignment,
|
|
1406
|
-
loading: false,
|
|
1407
|
-
},
|
|
1408
|
-
label: "BAD PROP TYPE",
|
|
1409
|
-
};
|
|
1410
|
-
}
|
|
1411
|
-
const result = re.exec(statType);
|
|
1412
|
-
const queryName = result[1];
|
|
1413
|
-
const statPath = StatPaths.find((pattern) => pattern.name === queryName);
|
|
1414
|
-
// Get a list all possible keys in path
|
|
1415
|
-
const keys = [];
|
|
1416
|
-
const regex = pathToRegexp(statPath === null || statPath === void 0 ? void 0 : statPath.route, keys, {
|
|
1417
|
-
strict: false,
|
|
1418
|
-
sensitive: false,
|
|
1419
|
-
end: true,
|
|
1420
|
-
});
|
|
1421
|
-
const allQueryArgs = regex.exec(statType);
|
|
1422
|
-
// Retrieve all key values in order including undefined
|
|
1423
|
-
const queryArgs = keys.map((_, i) => allQueryArgs[i + 1] ? decodeURIComponent(allQueryArgs[i + 1]) : undefined);
|
|
1424
|
-
// remove query name from list
|
|
1425
|
-
queryArgs.shift();
|
|
1426
|
-
const label = queries[queryName].label;
|
|
1427
|
-
const stat = (userIdent === null || userIdent === void 0 ? void 0 : userIdent.jwt) && queries[queryName].query(programId, locale, ...queryArgs);
|
|
1428
|
-
debug("stat:", stat);
|
|
1429
|
-
return {
|
|
1430
|
-
props: {
|
|
1431
|
-
value: stat === null || stat === void 0 ? void 0 : stat.value,
|
|
1432
|
-
statvalue: (_a = stat === null || stat === void 0 ? void 0 : stat.statvalue) !== null && _a !== void 0 ? _a : LOADING,
|
|
1433
|
-
loading: stat === null || stat === void 0 ? void 0 : stat.loading,
|
|
1434
|
-
flexReverse,
|
|
1435
|
-
alignment,
|
|
1436
|
-
},
|
|
1437
|
-
label,
|
|
1438
|
-
};
|
|
1439
|
-
}
|
|
1440
|
-
|
|
1441
|
-
function useDemoBigStat(props) {
|
|
1442
|
-
const { statType } = props;
|
|
1443
|
-
const re = useMemo(() => StatPatterns.find((re) => re.exec(statType)), [statType]);
|
|
1444
|
-
// triggers a re-render if the label is manually changed
|
|
1445
|
-
useChildElements();
|
|
1446
|
-
if (!(re === null || re === void 0 ? void 0 : re.exec(statType))) {
|
|
1447
|
-
return {
|
|
1448
|
-
props: {
|
|
1449
|
-
value: 0,
|
|
1450
|
-
statvalue: "!!!",
|
|
1451
|
-
loading: false,
|
|
1452
|
-
flexReverse: false,
|
|
1453
|
-
alignment: "center",
|
|
1454
|
-
},
|
|
1455
|
-
label: "BAD PROP TYPE",
|
|
1456
|
-
};
|
|
1457
|
-
}
|
|
1458
|
-
const result = re.exec(statType);
|
|
1459
|
-
const queryName = result[1];
|
|
1460
|
-
const label = queries[queryName].label;
|
|
1461
|
-
return {
|
|
1462
|
-
props: cjs({
|
|
1463
|
-
statvalue: "12345",
|
|
1464
|
-
value: 0,
|
|
1465
|
-
flexReverse: false,
|
|
1466
|
-
alignment: "center",
|
|
1467
|
-
}, props.demoData || {}, { arrayMerge: (_, a) => a }),
|
|
1468
|
-
label: label !== null && label !== void 0 ? label : "Demo Label",
|
|
1469
|
-
};
|
|
1470
|
-
}
|
|
1471
|
-
|
|
1472
|
-
function StatContainerView(props, children) {
|
|
1473
|
-
const divideSpace = () => {
|
|
1474
|
-
const spaceValue = getComputedStyle(document.documentElement).getPropertyValue(`--sl-spacing-${props.space}`);
|
|
1475
|
-
return `${Math.floor(parseInt(spaceValue) / 2)}rem`;
|
|
1476
|
-
};
|
|
1477
|
-
// Dependent on props, not feasiable to move out
|
|
1478
|
-
const style = {
|
|
1479
|
-
StatContainer: {
|
|
1480
|
-
width: "100%",
|
|
1481
|
-
display: props.display || "grid",
|
|
1482
|
-
"grid-template-columns": "repeat(auto-fill, minmax(130px, auto))",
|
|
1483
|
-
gap: divideSpace(),
|
|
1484
|
-
// First set of styles applies when shadow DOM is disabled, second set applies when shadow DOM is enabled
|
|
1485
|
-
"& > *": {
|
|
1486
|
-
"border-right": "1px solid #EAEAEA",
|
|
1487
|
-
"padding-right": divideSpace(),
|
|
1488
|
-
},
|
|
1489
|
-
"& > :last-child": {
|
|
1490
|
-
"border-right": "none",
|
|
1491
|
-
},
|
|
1492
|
-
"& > ::slotted(*)": {
|
|
1493
|
-
"border-right": "1px solid #EAEAEA",
|
|
1494
|
-
"padding-right": divideSpace(),
|
|
1495
|
-
height: "100%",
|
|
1496
|
-
},
|
|
1497
|
-
"& > ::slotted(*:last-child)": {
|
|
1498
|
-
"border-right": "none",
|
|
1499
|
-
},
|
|
1500
|
-
"@media screen and (max-width: 430px)": {
|
|
1501
|
-
"& > ::slotted(*)": {
|
|
1502
|
-
borderRight: "none",
|
|
1503
|
-
},
|
|
1504
|
-
},
|
|
1505
|
-
},
|
|
1506
|
-
StatFrame: {
|
|
1507
|
-
display: "flex",
|
|
1508
|
-
},
|
|
1509
|
-
BorderFix: {
|
|
1510
|
-
"border-right": "1px solid transparent",
|
|
1511
|
-
width: "0px",
|
|
1512
|
-
"margin-left": "-1px",
|
|
1513
|
-
},
|
|
1514
|
-
};
|
|
1515
|
-
const sheet = createStyleSheet(style);
|
|
1516
|
-
const styleString = sheet.toString();
|
|
1517
|
-
return (h("div", { class: sheet.classes.StatFrame, part: "sqm-base" },
|
|
1518
|
-
h("div", { class: sheet.classes.StatContainer, part: "sqm-inner-container" },
|
|
1519
|
-
h("style", { type: "text/css" }, styleString),
|
|
1520
|
-
children),
|
|
1521
|
-
h("div", { class: sheet.classes.BorderFix, part: "sqm-border" })));
|
|
1522
|
-
}
|
|
1523
|
-
|
|
1524
|
-
function PortalChangePasswordView(props) {
|
|
1525
|
-
const { states, callbacks } = props;
|
|
1526
|
-
const style = {
|
|
1527
|
-
Dialog: {
|
|
1528
|
-
padding: "0",
|
|
1529
|
-
"&::part(close-button)": {
|
|
1530
|
-
"margin-top": "var(--sl-spacing-medium)",
|
|
1531
|
-
},
|
|
1532
|
-
"&::part(body)": {
|
|
1533
|
-
padding: "0 var(--sl-spacing-x-large) var(--sl-spacing-x-large) var(--sl-spacing-x-large)",
|
|
1534
|
-
},
|
|
1535
|
-
},
|
|
1536
|
-
Error: {
|
|
1537
|
-
"&::part(erroralert-base)": {
|
|
1538
|
-
"margin-bottom": "15px",
|
|
1539
|
-
},
|
|
1540
|
-
},
|
|
1541
|
-
Success: {
|
|
1542
|
-
"&::part(successalert-base)": {
|
|
1543
|
-
"margin-bottom": "15px",
|
|
1544
|
-
},
|
|
1545
|
-
},
|
|
1546
|
-
InputContainer: {
|
|
1547
|
-
"& > :not(:last-child)": {
|
|
1548
|
-
"margin-bottom": "var(--sl-spacing-x-large)",
|
|
1549
|
-
},
|
|
1550
|
-
},
|
|
1551
|
-
CancelButton: {
|
|
1552
|
-
width: "25%",
|
|
1553
|
-
margin: "var(--sl-spacing-large) auto",
|
|
1554
|
-
},
|
|
1555
|
-
PasswordField: {
|
|
1556
|
-
marginBottom: "var(--sl-spacing-large) !important",
|
|
1557
|
-
display: "block",
|
|
1558
|
-
},
|
|
1559
|
-
ChangePasswordButton: {
|
|
1560
|
-
paddingTop: "var(--sl-spacing-x-large)",
|
|
1561
|
-
},
|
|
1562
|
-
};
|
|
1563
|
-
const sheet = createStyleSheet(style);
|
|
1564
|
-
const styleString = sheet.toString();
|
|
1565
|
-
return (h("div", null,
|
|
1566
|
-
h("style", { type: "text/css" }, styleString),
|
|
1567
|
-
h("sl-dialog", { class: sheet.classes.Dialog, open: states.open, "onSl-hide": () => callbacks.setOpen(false) },
|
|
1568
|
-
h(PortalSectionView, Object.assign({}, {
|
|
1569
|
-
labelMargin: "x-large",
|
|
1570
|
-
padding: "none",
|
|
1571
|
-
label: (h(TextSpanView, Object.assign({}, { type: "h2" }), states.content.modalChangePasswordHeader)),
|
|
1572
|
-
content: (h(PortalContainerView, Object.assign({}, { direction: "column", padding: "none", gap: "32px" }),
|
|
1573
|
-
states.error && (h("sqm-form-message", { class: sheet.classes.Error, type: "error", exportparts: "erroralert-icon" },
|
|
1574
|
-
h("div", { part: "erroralert-text" }, states.error))),
|
|
1575
|
-
states.success && (h("sqm-form-message", { class: sheet.classes.Success, type: "success", exportparts: "successalert-icon" },
|
|
1576
|
-
h("div", { part: "successalert-text" }, states.content.successMessage))),
|
|
1577
|
-
h("sl-form", { "onSl-submit": callbacks.submit },
|
|
1578
|
-
h("div", { class: sheet.classes.InputContainer },
|
|
1579
|
-
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 }),
|
|
1580
|
-
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" })),
|
|
1581
|
-
h(PortalContainerView, Object.assign({}, { direction: "row", padding: "none", gap: "20px" }),
|
|
1582
|
-
h("sl-button", { class: sheet.classes.ChangePasswordButton, type: "primary", submit: true, loading: states.loading }, states.content.changePasswordButtonText),
|
|
1583
|
-
h("sl-button", { class: sheet.classes.CancelButton, type: "text", onClick: () => callbacks.setOpen(false) }, states.content.cancelText))))),
|
|
1584
|
-
}))),
|
|
1585
|
-
h(PortalSectionView, Object.assign({}, {
|
|
1586
|
-
labelMargin: "x-large",
|
|
1587
|
-
padding: "xxx-large",
|
|
1588
|
-
label: (h(TextSpanView, Object.assign({}, { type: "h2" }), states.content.portalChangePasswordHeader)),
|
|
1589
|
-
content: (h("sl-button", { onClick: () => callbacks.setOpen(true) }, states.content.portalChangePasswordButtonText)),
|
|
1590
|
-
}),
|
|
1591
|
-
h("style", { type: "text/css" }, styleString))));
|
|
1592
|
-
}
|
|
1593
|
-
|
|
1594
|
-
const style$2 = {
|
|
1595
|
-
Wrapper: { ...AuthWrapper, "max-width": "600px" },
|
|
1596
|
-
Column: AuthColumn,
|
|
1597
|
-
HostBlock: HostBlock,
|
|
1598
|
-
":host": {
|
|
1599
|
-
margin: "0 auto",
|
|
1600
|
-
width: "100%",
|
|
1601
|
-
},
|
|
1602
|
-
ButtonsContainer: AuthButtonsContainer,
|
|
1603
|
-
ErrorStyle: ErrorStyles,
|
|
1604
|
-
};
|
|
1605
|
-
const vanillaStyle = `
|
|
1606
|
-
sqm-portal-register {
|
|
1607
|
-
margin: 0 auto;
|
|
1608
|
-
width: 100%;
|
|
1609
|
-
display: block;
|
|
1610
|
-
}
|
|
1611
|
-
|
|
1612
|
-
:host{
|
|
1613
|
-
display: block;
|
|
1614
|
-
}
|
|
1615
|
-
|
|
1616
|
-
:host([hidden]) {
|
|
1617
|
-
display: none;
|
|
1618
|
-
}
|
|
1619
|
-
`;
|
|
1620
|
-
const sheet$2 = createStyleSheet(style$2);
|
|
1621
|
-
const styleString$2 = sheet$2.toString();
|
|
1622
|
-
function PortalRegisterView(props) {
|
|
1623
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
|
|
1624
|
-
const { states, refs, callbacks, content } = props;
|
|
1625
|
-
if (states.error) {
|
|
1626
|
-
window.scrollTo({ top: 0, left: 0, behavior: "smooth" });
|
|
1627
|
-
}
|
|
1628
|
-
return (h("div", { class: sheet$2.classes.Wrapper, part: "sqm-base" },
|
|
1629
|
-
h("style", { type: "text/css" },
|
|
1630
|
-
vanillaStyle,
|
|
1631
|
-
styleString$2),
|
|
1632
|
-
h(TextSpanView, { type: "h3" }, content.pageLabel),
|
|
1633
|
-
h("sl-form", { class: sheet$2.classes.Column, "onSl-submit": callbacks.submit, ref: (el) => (refs.formRef.current = el), novalidate: true },
|
|
1634
|
-
states.error && (h("sqm-form-message", { type: "error", exportparts: "erroralert-icon" },
|
|
1635
|
-
h("div", { part: "erroralert-text" }, props.states.error))),
|
|
1636
|
-
content.formData,
|
|
1637
|
-
!states.hideInputs && (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 }) => {
|
|
1638
|
-
if (!value) {
|
|
1639
|
-
return content.requiredFieldErrorMessage;
|
|
1640
|
-
}
|
|
1641
|
-
// this matches shoelace validation, but could be better
|
|
1642
|
-
if (!value.includes("@")) {
|
|
1643
|
-
return content.invalidEmailErrorMessage;
|
|
1644
|
-
}
|
|
1645
|
-
} }, (((_b = (_a = states.registrationFormState) === null || _a === void 0 ? void 0 : _a.validationErrors) === null || _b === void 0 ? void 0 : _b.email) ? {
|
|
1646
|
-
class: sheet$2.classes.ErrorStyle,
|
|
1647
|
-
helpText: ((_d = (_c = states.registrationFormState) === null || _c === void 0 ? void 0 : _c.validationErrors) === null || _d === void 0 ? void 0 : _d.email) ||
|
|
1648
|
-
content.requiredFieldErrorMessage,
|
|
1649
|
-
}
|
|
1650
|
-
: [])))),
|
|
1651
|
-
!states.hideInputs && (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 })),
|
|
1652
|
-
content.passwordField,
|
|
1653
|
-
!states.hideInputs && states.confirmPassword && (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) ? {
|
|
1654
|
-
value: (_j = (_h = states.registrationFormState) === null || _h === void 0 ? void 0 : _h.initialData) === null || _j === void 0 ? void 0 : _j.confirmPassword,
|
|
1655
|
-
}
|
|
1656
|
-
: {}), (((_l = (_k = states.registrationFormState) === null || _k === void 0 ? void 0 : _k.validationErrors) === null || _l === void 0 ? void 0 : _l.confirmPassword) ? {
|
|
1657
|
-
class: sheet$2.classes.ErrorStyle,
|
|
1658
|
-
helpText: ((_o = (_m = states.registrationFormState) === null || _m === void 0 ? void 0 : _m.validationErrors) === null || _o === void 0 ? void 0 : _o.confirmPassword) || content.requiredFieldErrorMessage,
|
|
1659
|
-
}
|
|
1660
|
-
: [])))),
|
|
1661
|
-
content.terms,
|
|
1662
|
-
h("div", { class: sheet$2.classes.ButtonsContainer },
|
|
1663
|
-
h("sl-button", { submit: true, loading: states.loading, exportparts: "base: primarybutton-base", type: "primary" }, content.submitLabel || "Register"),
|
|
1664
|
-
content.secondaryButton))));
|
|
1665
|
-
}
|
|
1666
|
-
|
|
1667
|
-
const style$3 = {
|
|
1668
|
-
ErrorStyle: {
|
|
1669
|
-
"&::part(control)": {
|
|
1670
|
-
background: "var(--sl-color-danger-10)",
|
|
1671
|
-
borderColor: "var(--sl-color-danger-500)",
|
|
1672
|
-
outline: "var(--sl-color-danger-500)",
|
|
1673
|
-
},
|
|
1674
|
-
"&:host": {
|
|
1675
|
-
"--focus-ring": "0 0 0 var(--sl-focus-ring-width) red !important",
|
|
1676
|
-
},
|
|
1156
|
+
label: "Referrals - This Week",
|
|
1157
|
+
query: referralsWeekQuery,
|
|
1677
1158
|
},
|
|
1678
|
-
|
|
1679
|
-
|
|
1680
|
-
|
|
1681
|
-
color: "var(--sl-color-danger-500)",
|
|
1682
|
-
fontSize: "var(--sl-input-help-text-font-size-medium)",
|
|
1683
|
-
fontFamily: "var(--sl-font-sans)",
|
|
1684
|
-
fontWeight: "var(--sl-font-weight-normal)",
|
|
1159
|
+
rewardsCount: {
|
|
1160
|
+
label: "Rewards",
|
|
1161
|
+
query: rewardsCountQuery,
|
|
1685
1162
|
},
|
|
1686
|
-
|
|
1687
|
-
|
|
1163
|
+
rewardsCountFiltered: {
|
|
1164
|
+
label: "Rewards",
|
|
1165
|
+
query: rewardsCountFilteredQuery,
|
|
1166
|
+
},
|
|
1167
|
+
integrationRewardsCountFiltered: {
|
|
1168
|
+
label: "Rewards",
|
|
1169
|
+
query: integrationRewardsCountFilteredQuery,
|
|
1170
|
+
},
|
|
1171
|
+
rewardsMonth: {
|
|
1172
|
+
label: "Rewards - This Month",
|
|
1173
|
+
query: rewardsMonthQuery,
|
|
1174
|
+
},
|
|
1175
|
+
rewardsWeek: {
|
|
1176
|
+
label: "Rewards - This Week",
|
|
1177
|
+
query: rewardsWeekQuery,
|
|
1178
|
+
},
|
|
1179
|
+
rewardBalance: {
|
|
1180
|
+
label: "Balance - Credit Earned",
|
|
1181
|
+
query: rewardsBalanceQuery,
|
|
1182
|
+
},
|
|
1183
|
+
programGoals: {
|
|
1184
|
+
label: "Program Goals",
|
|
1185
|
+
query: programGoalsQuery,
|
|
1186
|
+
},
|
|
1187
|
+
customFields: {
|
|
1188
|
+
label: "Custom Fields",
|
|
1189
|
+
query: customFieldsQuery,
|
|
1190
|
+
},
|
|
1191
|
+
traffic: {
|
|
1192
|
+
label: "Traffic",
|
|
1193
|
+
query: trafficQuery,
|
|
1194
|
+
},
|
|
1195
|
+
userStats: {
|
|
1196
|
+
label: "User Stat",
|
|
1197
|
+
query: userStatsQuery,
|
|
1198
|
+
},
|
|
1199
|
+
payoutBalance: {
|
|
1200
|
+
label: "Payout Balance",
|
|
1201
|
+
query: payoutBalanceQuery,
|
|
1688
1202
|
},
|
|
1689
1203
|
};
|
|
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
|
-
|
|
1738
|
-
|
|
1739
|
-
|
|
1740
|
-
|
|
1204
|
+
// ! Any update to this should be reflected in StatPathBuilder.tsx in the saasquatch repo
|
|
1205
|
+
// this should be exposed in documentation somehow
|
|
1206
|
+
const StatPaths = [
|
|
1207
|
+
{ name: "programGoals", route: "/(programGoals)/:metricType/:goalId" },
|
|
1208
|
+
{ name: "customFields", route: "/(customFields)/:customField" },
|
|
1209
|
+
{ name: "referralsCount", route: "/(referralsCount)/:status?" },
|
|
1210
|
+
{ name: "referralsMonth", route: "/(referralsMonth)/:status?" },
|
|
1211
|
+
{ name: "referralsWeek", route: "/(referralsWeek)/:status?" },
|
|
1212
|
+
{ name: "rewardsCount", route: "/(rewardsCount)/:global?" },
|
|
1213
|
+
{ name: "rewardsMonth", route: "/(rewardsMonth)/:global?" },
|
|
1214
|
+
{ name: "rewardsWeek", route: "/(rewardsWeek)/:global?" },
|
|
1215
|
+
{
|
|
1216
|
+
name: "rewardsCountFiltered",
|
|
1217
|
+
route: "/(rewardsCountFiltered)/:statType([FUELTANK|INTEGRATION|PCT_DISCOUNT|CREDIT]*)?/:unit((?!global)(?!PENDING)(?!CANCELLED)(?!EXPIRED)(?!REDEEMED)(?!AVAILABLE)[a-zA-Z0-9%]+)?/:status([PENDING|CANCELLED|EXPIRED|REDEEMED|AVAILABLE]*)?/:global?",
|
|
1218
|
+
},
|
|
1219
|
+
{
|
|
1220
|
+
name: "integrationRewardsCountFiltered",
|
|
1221
|
+
route: "/(integrationRewardsCountFiltered)/:status([PENDING|CANCELLED|EXPIRED|REDEEMED|AVAILABLE]*)?/:global?",
|
|
1222
|
+
},
|
|
1223
|
+
{
|
|
1224
|
+
name: "rewardsAssigned",
|
|
1225
|
+
route: "/(rewardsAssigned)/:statType/:unit/:global?",
|
|
1226
|
+
},
|
|
1227
|
+
{
|
|
1228
|
+
name: "rewardsExpired",
|
|
1229
|
+
route: "/(rewardsExpired)/:statType/:unit/:global?",
|
|
1230
|
+
},
|
|
1231
|
+
{
|
|
1232
|
+
name: "rewardsCancelled",
|
|
1233
|
+
route: "/(rewardsCancelled)/:statType/:unit/:global?",
|
|
1234
|
+
},
|
|
1235
|
+
{
|
|
1236
|
+
name: "rewardsPending",
|
|
1237
|
+
route: "/(rewardsPending)/:statType/:unit/:global?",
|
|
1238
|
+
},
|
|
1239
|
+
{
|
|
1240
|
+
name: "rewardsRedeemed",
|
|
1241
|
+
route: "/(rewardsRedeemed)/:statType/:unit/:global?",
|
|
1242
|
+
},
|
|
1243
|
+
{
|
|
1244
|
+
name: "rewardsRedeemedWeek",
|
|
1245
|
+
route: "/(rewardsRedeemedWeek)/:statType/:unit/:global?",
|
|
1246
|
+
},
|
|
1247
|
+
{
|
|
1248
|
+
name: "rewardsRedeemedMonth",
|
|
1249
|
+
route: "/(rewardsRedeemedMonth)/:statType/:unit/:global?",
|
|
1250
|
+
},
|
|
1251
|
+
{
|
|
1252
|
+
name: "rewardsAvailable",
|
|
1253
|
+
route: "/(rewardsAvailable)/:statType/:unit/:global?",
|
|
1254
|
+
},
|
|
1255
|
+
{
|
|
1256
|
+
name: "rewardBalance",
|
|
1257
|
+
route: "/(rewardBalance)/:statType/:unit/:format([prettyValue|value]*)?/:global?",
|
|
1258
|
+
},
|
|
1259
|
+
{
|
|
1260
|
+
name: "traffic",
|
|
1261
|
+
route: "/(traffic)",
|
|
1262
|
+
},
|
|
1263
|
+
{
|
|
1264
|
+
name: "userStats",
|
|
1265
|
+
route: "/(userStats)/:statId",
|
|
1266
|
+
},
|
|
1267
|
+
{
|
|
1268
|
+
name: "payoutBalance",
|
|
1269
|
+
route: "/(payoutBalance)",
|
|
1270
|
+
},
|
|
1271
|
+
];
|
|
1272
|
+
const StatPatterns = StatPaths.map((pattern) => pathToRegexp(pattern.route));
|
|
1273
|
+
function useBigStat(props) {
|
|
1274
|
+
var _a;
|
|
1275
|
+
const { statType, flexReverse, alignment, programId = H(), } = props;
|
|
1276
|
+
// triggers a re-render if the label is manually changed
|
|
1277
|
+
useChildElements();
|
|
1278
|
+
const locale = L();
|
|
1279
|
+
const userIdent = J();
|
|
1280
|
+
const re = useMemo(() => StatPatterns.find((re) => re.exec(statType)), [statType]);
|
|
1281
|
+
if (!(re === null || re === void 0 ? void 0 : re.exec(statType))) {
|
|
1282
|
+
return {
|
|
1283
|
+
props: {
|
|
1284
|
+
value: 0,
|
|
1285
|
+
statvalue: "-",
|
|
1286
|
+
flexReverse,
|
|
1287
|
+
alignment,
|
|
1288
|
+
loading: false,
|
|
1289
|
+
statTextColor: props.statTextColor,
|
|
1290
|
+
statFontSize: props.statFontSize,
|
|
1291
|
+
descriptionTextColor: props.descriptionTextColor,
|
|
1292
|
+
descriptionFontSize: props.descriptionFontSize,
|
|
1293
|
+
statFontWeight: props.statFontWeight,
|
|
1741
1294
|
},
|
|
1295
|
+
label: "BAD PROP TYPE",
|
|
1296
|
+
};
|
|
1297
|
+
}
|
|
1298
|
+
const result = re.exec(statType);
|
|
1299
|
+
const queryName = result[1];
|
|
1300
|
+
const statPath = StatPaths.find((pattern) => pattern.name === queryName);
|
|
1301
|
+
// Get a list all possible keys in path
|
|
1302
|
+
const keys = [];
|
|
1303
|
+
const regex = pathToRegexp(statPath === null || statPath === void 0 ? void 0 : statPath.route, keys, {
|
|
1304
|
+
strict: false,
|
|
1305
|
+
sensitive: false,
|
|
1306
|
+
end: true,
|
|
1307
|
+
});
|
|
1308
|
+
const allQueryArgs = regex.exec(statType);
|
|
1309
|
+
// Retrieve all key values in order including undefined
|
|
1310
|
+
const queryArgs = keys.map((_, i) => allQueryArgs[i + 1] ? decodeURIComponent(allQueryArgs[i + 1]) : undefined);
|
|
1311
|
+
// remove query name from list
|
|
1312
|
+
queryArgs.shift();
|
|
1313
|
+
const label = queries[queryName].label;
|
|
1314
|
+
const stat = (userIdent === null || userIdent === void 0 ? void 0 : userIdent.jwt) && queries[queryName].query(programId, locale, ...queryArgs);
|
|
1315
|
+
debug("stat:", stat);
|
|
1316
|
+
return {
|
|
1317
|
+
props: {
|
|
1318
|
+
value: stat === null || stat === void 0 ? void 0 : stat.value,
|
|
1319
|
+
statvalue: (_a = stat === null || stat === void 0 ? void 0 : stat.statvalue) !== null && _a !== void 0 ? _a : LOADING,
|
|
1320
|
+
loading: stat === null || stat === void 0 ? void 0 : stat.loading,
|
|
1321
|
+
flexReverse,
|
|
1322
|
+
alignment,
|
|
1323
|
+
statTextColor: props.statTextColor,
|
|
1324
|
+
statFontSize: props.statFontSize,
|
|
1325
|
+
descriptionTextColor: props.descriptionTextColor,
|
|
1326
|
+
descriptionFontSize: props.descriptionFontSize,
|
|
1327
|
+
statFontWeight: props.statFontWeight,
|
|
1742
1328
|
},
|
|
1743
|
-
|
|
1744
|
-
|
|
1745
|
-
|
|
1329
|
+
label,
|
|
1330
|
+
};
|
|
1331
|
+
}
|
|
1332
|
+
|
|
1333
|
+
function useDemoBigStat(props) {
|
|
1334
|
+
const { statType } = props;
|
|
1335
|
+
const re = useMemo(() => StatPatterns.find((re) => re.exec(statType)), [statType]);
|
|
1336
|
+
// triggers a re-render if the label is manually changed
|
|
1337
|
+
useChildElements();
|
|
1338
|
+
if (!(re === null || re === void 0 ? void 0 : re.exec(statType))) {
|
|
1339
|
+
return {
|
|
1340
|
+
props: {
|
|
1341
|
+
value: 0,
|
|
1342
|
+
statvalue: "-",
|
|
1343
|
+
loading: false,
|
|
1344
|
+
flexReverse: props.flexReverse,
|
|
1345
|
+
alignment: props.alignment,
|
|
1346
|
+
statTextColor: props.statTextColor,
|
|
1347
|
+
statFontSize: props.statFontSize,
|
|
1348
|
+
descriptionTextColor: props.descriptionTextColor,
|
|
1349
|
+
descriptionFontSize: props.descriptionFontSize,
|
|
1746
1350
|
},
|
|
1747
|
-
|
|
1351
|
+
label: "BAD PROP TYPE",
|
|
1352
|
+
};
|
|
1353
|
+
}
|
|
1354
|
+
const result = re.exec(statType);
|
|
1355
|
+
const queryName = result[1];
|
|
1356
|
+
const label = queries[queryName].label;
|
|
1357
|
+
return {
|
|
1358
|
+
props: cjs({
|
|
1359
|
+
statvalue: "12345",
|
|
1360
|
+
value: 0,
|
|
1361
|
+
flexReverse: props.flexReverse,
|
|
1362
|
+
alignment: props.alignment,
|
|
1363
|
+
statTextColor: props.statTextColor,
|
|
1364
|
+
statFontSize: props.statFontSize,
|
|
1365
|
+
descriptionTextColor: props.descriptionTextColor,
|
|
1366
|
+
descriptionFontSize: props.descriptionFontSize,
|
|
1367
|
+
statFontWeight: props.statFontWeight,
|
|
1368
|
+
}, props.demoData || {}, { arrayMerge: (_, a) => a }),
|
|
1369
|
+
label: label !== null && label !== void 0 ? label : "Demo Label",
|
|
1748
1370
|
};
|
|
1749
|
-
const sheet = createStyleSheet(style);
|
|
1750
|
-
const styleString = sheet.toString();
|
|
1751
|
-
return (h("div", { class: sheet.classes.Container, part: "sqm-base" },
|
|
1752
|
-
h("style", { type: "text/css" }, styleString),
|
|
1753
|
-
h(TextSpanView, Object.assign({}, { type: "h2" }), text.emailPreferencesHeader),
|
|
1754
|
-
h("sl-form", { "onSl-submit": callbacks.onSubmit },
|
|
1755
|
-
h(CheckboxFieldView, { states: {
|
|
1756
|
-
checked: states.formState.marketingEmailOptIn,
|
|
1757
|
-
}, content: {
|
|
1758
|
-
checkboxLabel: text.marketingCheckboxLabel,
|
|
1759
|
-
checkboxName: "marketingEmailOptIn",
|
|
1760
|
-
}, callbacks: {
|
|
1761
|
-
setChecked: callbacks.setChecked,
|
|
1762
|
-
} }),
|
|
1763
|
-
h("sl-button", { class: sheet.classes.SubmitButton, type: "primary", submit: true, loading: states.loading, disabled: states.submitDisabled }, text.submitChangeButtonText),
|
|
1764
|
-
error && (h("sqm-form-message", { class: sheet.classes.Error, type: "error", exportparts: "erroralert-icon" },
|
|
1765
|
-
h("div", { part: "erroralert-text" }, error))),
|
|
1766
|
-
states.success && (h("sqm-form-message", { class: sheet.classes.Success, type: "success", exportparts: "successalert-icon" },
|
|
1767
|
-
h("div", { part: "successalert-text" }, states.text.successMessage))))));
|
|
1768
1371
|
}
|
|
1769
1372
|
|
|
1770
|
-
|
|
1373
|
+
function CardFeedView(props, children) {
|
|
1374
|
+
// Dependent on props, not feasiable to move out
|
|
1375
|
+
const style = {
|
|
1376
|
+
Container: {
|
|
1377
|
+
columnGap: props.gap + "px",
|
|
1378
|
+
columnWidth: props.width + "px",
|
|
1379
|
+
"& > div": {
|
|
1380
|
+
marginBottom: "24px",
|
|
1381
|
+
},
|
|
1382
|
+
},
|
|
1383
|
+
};
|
|
1384
|
+
const sheet = createStyleSheet(style);
|
|
1385
|
+
const styleString = sheet.toString();
|
|
1386
|
+
const vanillaStyle = `
|
|
1387
|
+
:host{
|
|
1388
|
+
display: block;
|
|
1389
|
+
}
|
|
1390
|
+
|
|
1391
|
+
`;
|
|
1392
|
+
return (h("div", null,
|
|
1393
|
+
h("style", { type: "text/css" },
|
|
1394
|
+
styleString,
|
|
1395
|
+
vanillaStyle),
|
|
1396
|
+
h("div", { class: sheet.classes.Container, part: "sqm-base" }, children)));
|
|
1397
|
+
}
|
|
1398
|
+
|
|
1399
|
+
const style$1 = {
|
|
1771
1400
|
Description: {
|
|
1401
|
+
"& .icon": {
|
|
1402
|
+
color: "var(--sqm-text)",
|
|
1403
|
+
"&:hover": {
|
|
1404
|
+
color: "var(--sqm-accent-color-icon)",
|
|
1405
|
+
},
|
|
1406
|
+
},
|
|
1772
1407
|
"& input[type=checkbox]": {
|
|
1773
1408
|
display: "none",
|
|
1774
1409
|
},
|
|
@@ -1806,16 +1441,16 @@ const style$4 = {
|
|
|
1806
1441
|
},
|
|
1807
1442
|
},
|
|
1808
1443
|
};
|
|
1809
|
-
const sheet$
|
|
1810
|
-
const styleString$
|
|
1444
|
+
const sheet$1 = createStyleSheet(style$1);
|
|
1445
|
+
const styleString$1 = sheet$1.toString();
|
|
1811
1446
|
function Details(props) {
|
|
1812
1447
|
const rid = Math.random().toString(36).slice(2);
|
|
1813
1448
|
return (h("div", { style: { opacity: props.opacity } },
|
|
1814
|
-
h("style", { type: "text/css" }, styleString$
|
|
1815
|
-
h("span", { class: sheet$
|
|
1449
|
+
h("style", { type: "text/css" }, styleString$1),
|
|
1450
|
+
h("span", { class: sheet$1.classes.Description },
|
|
1816
1451
|
h("input", { type: "checkbox", id: "details-" + rid }),
|
|
1817
1452
|
h("label", { class: "details", htmlFor: "details-" + rid },
|
|
1818
|
-
h("sl-icon", { exportparts: "base: chevron-icon", name: "chevron-down" })),
|
|
1453
|
+
h("sl-icon", { class: "icon", exportparts: "base: chevron-icon", name: "chevron-down" })),
|
|
1819
1454
|
h("span", { class: "summary", "progress-bar": props.progressBar }, props.content.description))));
|
|
1820
1455
|
}
|
|
1821
1456
|
|
|
@@ -1834,7 +1469,7 @@ const GreyGift = () => {
|
|
|
1834
1469
|
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" })));
|
|
1835
1470
|
};
|
|
1836
1471
|
|
|
1837
|
-
const style$
|
|
1472
|
+
const style$2 = {
|
|
1838
1473
|
ProgressBar: {
|
|
1839
1474
|
"& .progress-bar": {
|
|
1840
1475
|
height: "0",
|
|
@@ -1881,7 +1516,8 @@ const style$5 = {
|
|
|
1881
1516
|
width: "100%",
|
|
1882
1517
|
height: "4px",
|
|
1883
1518
|
borderRadius: "4px",
|
|
1884
|
-
backgroundColor: "var(--
|
|
1519
|
+
backgroundColor: "var(--sqm-accent-color-icon)",
|
|
1520
|
+
background: "red",
|
|
1885
1521
|
},
|
|
1886
1522
|
"& .progress": {
|
|
1887
1523
|
display: "block",
|
|
@@ -1894,7 +1530,7 @@ const style$5 = {
|
|
|
1894
1530
|
width: "12px",
|
|
1895
1531
|
height: "12px",
|
|
1896
1532
|
display: "flex",
|
|
1897
|
-
backgroundColor: "var(--
|
|
1533
|
+
backgroundColor: "var(--sqm-accent-color-icon)",
|
|
1898
1534
|
borderRadius: "50%",
|
|
1899
1535
|
position: "relative",
|
|
1900
1536
|
left: "47%",
|
|
@@ -1946,14 +1582,14 @@ const style$5 = {
|
|
|
1946
1582
|
},
|
|
1947
1583
|
},
|
|
1948
1584
|
};
|
|
1949
|
-
const sheet$
|
|
1950
|
-
const styleString$
|
|
1585
|
+
const sheet$2 = createStyleSheet(style$2, { classNamePrefix: "sqm-prog-bar" });
|
|
1586
|
+
const styleString$2 = sheet$2.toString();
|
|
1951
1587
|
function ProgressBarView(props) {
|
|
1952
1588
|
const { progress = 0, goal = 1, steps = false, progressBarUnit = "", repeatable = false, complete = false, expired = false, finite = 0, opacity = "1", } = props;
|
|
1953
1589
|
let aggregate = buildProgressBar(repeatable, steps, props);
|
|
1954
1590
|
const { columns, items } = aggregate;
|
|
1955
|
-
return (h("div", { class: sheet$
|
|
1956
|
-
h("style", { type: "text/css" }, styleString$
|
|
1591
|
+
return (h("div", { class: sheet$2.classes.ProgressBar, "data-expired": expired, "data-complete": complete, "data-steps": steps, "data-done": goal <= progress, style: { opacity: opacity } },
|
|
1592
|
+
h("style", { type: "text/css" }, styleString$2),
|
|
1957
1593
|
h("div", { class: (!Boolean(finite) && progress >= 2 * goal) ||
|
|
1958
1594
|
(Boolean(finite) && progress > 2 * goal)
|
|
1959
1595
|
? "progress-bar repeatable-steps"
|
|
@@ -2247,29 +1883,28 @@ const arrow_left_right = () => {
|
|
|
2247
1883
|
function TaskCardView(props) {
|
|
2248
1884
|
var _a, _b;
|
|
2249
1885
|
const { callbacks, states, content } = props;
|
|
2250
|
-
console.log("text color from the view ", content.textColor);
|
|
2251
1886
|
const style = {
|
|
2252
1887
|
TaskCard: {
|
|
2253
1888
|
display: "inline-block",
|
|
2254
1889
|
width: "100%",
|
|
2255
1890
|
"& .main": {
|
|
2256
1891
|
position: "relative",
|
|
2257
|
-
boxSizing: "border-
|
|
2258
|
-
background: content.backgroundColor || "var(--
|
|
2259
|
-
border: `
|
|
2260
|
-
borderRadius: "var(--
|
|
2261
|
-
boxShadow: "1px 2px 4px rgba(211, 211, 211, 0.
|
|
1892
|
+
boxSizing: "border-box",
|
|
1893
|
+
background: content.backgroundColor || "var(--sqm-portal-background)",
|
|
1894
|
+
border: `var(--sqm-border-thickness) solid ${content.borderColor || "var(--sqm-border-color)"}`,
|
|
1895
|
+
borderRadius: "var(--sqm-border-radius-normal)",
|
|
1896
|
+
boxShadow: "1px 2px 4px rgba(211, 211, 211, 0.4)",
|
|
2262
1897
|
fontSize: "var(--sl-font-size-small)",
|
|
2263
1898
|
lineHeight: "var(--sl-line-height-dense)",
|
|
2264
1899
|
color: content.textColor || "var(--sqm-text)",
|
|
2265
1900
|
},
|
|
2266
1901
|
"& .main.complete": {
|
|
2267
|
-
|
|
2268
|
-
borderColor:
|
|
1902
|
+
opacity: "0.8",
|
|
1903
|
+
borderColor: "var(--sqm-accent-color-border)",
|
|
2269
1904
|
},
|
|
2270
1905
|
"& .main.expired": {
|
|
2271
1906
|
color: content.textColor || "var(--sqm-text)",
|
|
2272
|
-
|
|
1907
|
+
opacity: "0.8",
|
|
2273
1908
|
},
|
|
2274
1909
|
"& .title": {
|
|
2275
1910
|
fontSize: "var(--sl-font-size-medium)",
|
|
@@ -2288,9 +1923,9 @@ function TaskCardView(props) {
|
|
|
2288
1923
|
NotStarted: {
|
|
2289
1924
|
fontSize: "var(--sl-font-size-small)",
|
|
2290
1925
|
padding: "var(--sl-spacing-medium)",
|
|
2291
|
-
color: content.textColor || "var(--
|
|
2292
|
-
border: `1px solid ${content.borderColor || "var(--sl-color-neutral-200)"}`,
|
|
2293
|
-
borderRadius: "var(--
|
|
1926
|
+
color: content.textColor || "var(--sqm-primary-color)",
|
|
1927
|
+
border: `var(--sqm-border-thickness, 1px) solid ${content.borderColor || "var(--sl-color-neutral-200)"}`,
|
|
1928
|
+
borderRadius: "var(--sqm-border-radius-normal) var(--sqm-border-radius-normal) 0 0",
|
|
2294
1929
|
borderBottom: "none",
|
|
2295
1930
|
background: content.backgroundColor || "var(--sl-color-primary-50)",
|
|
2296
1931
|
fontWeight: "var(--sl-font-weight-semibold)",
|
|
@@ -2305,11 +1940,11 @@ function TaskCardView(props) {
|
|
|
2305
1940
|
Ended: {
|
|
2306
1941
|
fontSize: "var(--sl-font-size-small)",
|
|
2307
1942
|
padding: "var(--sl-spacing-medium)",
|
|
2308
|
-
color: content.textColor || "var(--
|
|
2309
|
-
border: `1px solid ${content.borderColor || "var(--sl-color-neutral-200)"}`,
|
|
2310
|
-
borderRadius: "var(--
|
|
1943
|
+
color: content.textColor || "var(--sqm-warning-color-text)",
|
|
1944
|
+
border: `var(--sqm-border-thickness, 1px) solid ${content.borderColor || "var(--sl-color-neutral-200)"}`,
|
|
1945
|
+
borderRadius: "var(--sqm-border-radius-normal) var(--sqm-border-radius-normal) 0 0",
|
|
2311
1946
|
borderBottom: "none",
|
|
2312
|
-
background: content.backgroundColor || "var(--
|
|
1947
|
+
background: content.backgroundColor || "var(--sqm-warning-color-background)",
|
|
2313
1948
|
fontWeight: "var(--sl-font-weight-semibold)",
|
|
2314
1949
|
lineHeight: "var(--sl-line-height-dense)",
|
|
2315
1950
|
"& .icon": {
|
|
@@ -2326,7 +1961,7 @@ function TaskCardView(props) {
|
|
|
2326
1961
|
top: "5%",
|
|
2327
1962
|
alignSelf: "center",
|
|
2328
1963
|
lineHeight: "0",
|
|
2329
|
-
color:
|
|
1964
|
+
color: "var(--sqm-accent-color-icon)",
|
|
2330
1965
|
fontSize: "var(--sl-font-size-large)",
|
|
2331
1966
|
marginRight: "var(--sl-spacing-x-small)",
|
|
2332
1967
|
},
|
|
@@ -2347,7 +1982,7 @@ function TaskCardView(props) {
|
|
|
2347
1982
|
marginRight: "var(--sl-spacing-xx-small)",
|
|
2348
1983
|
},
|
|
2349
1984
|
"& .end": {
|
|
2350
|
-
color: content.textColor || "var(--
|
|
1985
|
+
color: content.textColor || "var(--sqm-warning-color-text)",
|
|
2351
1986
|
fontWeight: "var(--sl-font-weight-semibold)",
|
|
2352
1987
|
marginBottom: "var(--sl-spacing-xx-small)",
|
|
2353
1988
|
},
|
|
@@ -2357,7 +1992,7 @@ function TaskCardView(props) {
|
|
|
2357
1992
|
},
|
|
2358
1993
|
Footer: {
|
|
2359
1994
|
"&[data-subdue] .success": {
|
|
2360
|
-
color: content.textColor || "var(--
|
|
1995
|
+
color: content.textColor || "var(--sqm-accent-color-text)",
|
|
2361
1996
|
},
|
|
2362
1997
|
"&[data-subdue] .neutral": {
|
|
2363
1998
|
color: content.textColor || "var(--sqm-text)",
|
|
@@ -2388,7 +2023,7 @@ function TaskCardView(props) {
|
|
|
2388
2023
|
},
|
|
2389
2024
|
};
|
|
2390
2025
|
const sheet = createStyleSheet(style);
|
|
2391
|
-
const
|
|
2026
|
+
const contentString = sheet.toString();
|
|
2392
2027
|
const dateStart = content.rewardDuration &&
|
|
2393
2028
|
luxon.DateTime.fromISO(content.rewardDuration.split("/")[0]);
|
|
2394
2029
|
const dateEnd = content.rewardDuration &&
|
|
@@ -2423,7 +2058,7 @@ function TaskCardView(props) {
|
|
|
2423
2058
|
`;
|
|
2424
2059
|
return (h("div", { class: sheet.classes.TaskCard, part: "sqm-base" },
|
|
2425
2060
|
h("style", { type: "text/css" },
|
|
2426
|
-
|
|
2061
|
+
contentString,
|
|
2427
2062
|
vanillaStyle),
|
|
2428
2063
|
!states.loading && taskNotStarted && (h("div", { class: sheet.classes.NotStarted },
|
|
2429
2064
|
h("span", { class: "icon" },
|
|
@@ -2449,7 +2084,7 @@ function TaskCardView(props) {
|
|
|
2449
2084
|
}))),
|
|
2450
2085
|
h("div", { part: "sqm-style-container", style: {
|
|
2451
2086
|
borderRadius: taskUnavailable &&
|
|
2452
|
-
"0 0 var(--
|
|
2087
|
+
"0 0 var(--sqm-border-radius-normal) var(--sqm-border-radius-normal)",
|
|
2453
2088
|
}, class: taskUnavailable
|
|
2454
2089
|
? "main expired"
|
|
2455
2090
|
: taskComplete
|
|
@@ -2471,7 +2106,7 @@ function TaskCardView(props) {
|
|
|
2471
2106
|
opacity: taskComplete || taskUnavailable ? "0.45" : "1",
|
|
2472
2107
|
} }, content.cardTitle)),
|
|
2473
2108
|
states.loading ? (h("sl-skeleton", { style: { margin: "var(--sl-spacing-medium) 0" } })) : (content.description && (h(Details, Object.assign({}, props, { opacity: taskComplete || taskUnavailable ? "0.45" : "1" })))),
|
|
2474
|
-
content.showProgressBar && states.loading ? (h("sl-skeleton", { style: { margin: "var(--sl-spacing-medium) 0" } })) : (content.showProgressBar && (h(ProgressBarView, Object.assign({}, props.content, props.states, { opacity: taskComplete || taskUnavailable ? "0.
|
|
2109
|
+
content.showProgressBar && states.loading ? (h("sl-skeleton", { style: { margin: "var(--sl-spacing-medium) 0" } })) : (content.showProgressBar && (h(ProgressBarView, Object.assign({}, props.content, props.states, { opacity: taskComplete || taskUnavailable ? "0.75" : "1", complete: taskComplete, expired: taskUnavailable })))),
|
|
2475
2110
|
h("div", { class: sheet.classes.Footer, "data-subdue": taskComplete || taskUnavailable }, states.loading ? (h("sl-skeleton", { style: { width: "25%", marginLeft: "auto" } })) : (h("div", { style: { display: "contents" } },
|
|
2476
2111
|
h("span", { class: "text" },
|
|
2477
2112
|
content.repeatable && (h("div", null,
|
|
@@ -2501,116 +2136,407 @@ function TaskCardView(props) {
|
|
|
2501
2136
|
.setLocale(luxonLocale(states.locale))
|
|
2502
2137
|
.toLocaleString(luxon.DateTime.DATETIME_MED),
|
|
2503
2138
|
})))),
|
|
2504
|
-
content.hideButton ? ("") : (h("sl-button", { exportparts: `base: ${content.
|
|
2505
|
-
? "primary"
|
|
2506
|
-
: "secondary"}button-base`, id: "sl-button", type: content.buttonStyle === "primary" ? "primary" : "default", size: "small", onClick: callbacks.onClick, loading: states.loadingEvent, disabled: taskComplete || taskUnavailable, style: {
|
|
2139
|
+
content.hideButton ? ("") : (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: {
|
|
2507
2140
|
opacity: taskComplete || taskUnavailable ? "0.45" : "1",
|
|
2508
2141
|
} }, content.buttonText)))))))));
|
|
2509
2142
|
}
|
|
2510
2143
|
|
|
2511
|
-
|
|
2512
|
-
|
|
2513
|
-
|
|
2514
|
-
|
|
2515
|
-
|
|
2516
|
-
|
|
2517
|
-
|
|
2518
|
-
|
|
2519
|
-
|
|
2520
|
-
|
|
2521
|
-
|
|
2522
|
-
|
|
2523
|
-
|
|
2524
|
-
|
|
2525
|
-
|
|
2526
|
-
|
|
2527
|
-
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 }),
|
|
2528
|
-
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 }),
|
|
2529
|
-
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 }),
|
|
2530
|
-
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 }),
|
|
2531
|
-
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 }),
|
|
2532
|
-
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 }),
|
|
2533
|
-
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 }),
|
|
2534
|
-
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 }),
|
|
2535
|
-
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 }),
|
|
2536
|
-
h("path", { d: "M1208.57 104.5L1172.3 202H1161.96L1125.5 104.5H1136.61L1167.03 189.715L1197.45 104.5H1208.57Z", fill: color }),
|
|
2537
|
-
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 }),
|
|
2538
|
-
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 }),
|
|
2539
|
-
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 }),
|
|
2540
|
-
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 }),
|
|
2541
|
-
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 })));
|
|
2144
|
+
const style$3 = {
|
|
2145
|
+
Wrapper: { ...AuthWrapper, "max-width": "600px" },
|
|
2146
|
+
Column: AuthColumn,
|
|
2147
|
+
HostBlock: HostBlock,
|
|
2148
|
+
":host": {
|
|
2149
|
+
margin: "0 auto",
|
|
2150
|
+
width: "100%",
|
|
2151
|
+
},
|
|
2152
|
+
ButtonsContainer: AuthButtonsContainer,
|
|
2153
|
+
ErrorStyle: ErrorStyles,
|
|
2154
|
+
};
|
|
2155
|
+
const vanillaStyle = `
|
|
2156
|
+
sqm-portal-register {
|
|
2157
|
+
margin: 0 auto;
|
|
2158
|
+
width: 100%;
|
|
2159
|
+
display: block;
|
|
2542
2160
|
}
|
|
2543
2161
|
|
|
2544
|
-
|
|
2162
|
+
:host{
|
|
2163
|
+
display: block;
|
|
2164
|
+
}
|
|
2165
|
+
|
|
2166
|
+
:host([hidden]) {
|
|
2167
|
+
display: none;
|
|
2168
|
+
}
|
|
2169
|
+
`;
|
|
2170
|
+
const sheet$3 = createStyleSheet(style$3);
|
|
2171
|
+
const styleString$3 = sheet$3.toString();
|
|
2172
|
+
function PortalRegisterView(props) {
|
|
2173
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
|
|
2174
|
+
const { states, refs, callbacks, content } = props;
|
|
2175
|
+
if (states.error) {
|
|
2176
|
+
window.scrollTo({ top: 0, left: 0, behavior: "smooth" });
|
|
2177
|
+
}
|
|
2178
|
+
return (h("div", { class: sheet$3.classes.Wrapper, part: "sqm-base" },
|
|
2179
|
+
h("style", { type: "text/css" },
|
|
2180
|
+
vanillaStyle,
|
|
2181
|
+
styleString$3),
|
|
2182
|
+
h(TextSpanView, { type: "h3" }, content.pageLabel),
|
|
2183
|
+
h("sl-form", { class: sheet$3.classes.Column, "onSl-submit": callbacks.submit, ref: (el) => (refs.formRef.current = el), novalidate: true },
|
|
2184
|
+
states.error && (h("sqm-form-message", { type: "error", exportparts: "erroralert-icon" },
|
|
2185
|
+
h("div", { part: "erroralert-text" }, props.states.error))),
|
|
2186
|
+
content.formData,
|
|
2187
|
+
!states.hideInputs && (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 }) => {
|
|
2188
|
+
if (!value) {
|
|
2189
|
+
return content.requiredFieldErrorMessage;
|
|
2190
|
+
}
|
|
2191
|
+
// this matches shoelace validation, but could be better
|
|
2192
|
+
if (!value.includes("@")) {
|
|
2193
|
+
return content.invalidEmailErrorMessage;
|
|
2194
|
+
}
|
|
2195
|
+
} }, (((_b = (_a = states.registrationFormState) === null || _a === void 0 ? void 0 : _a.validationErrors) === null || _b === void 0 ? void 0 : _b.email) ? {
|
|
2196
|
+
class: sheet$3.classes.ErrorStyle,
|
|
2197
|
+
helpText: ((_d = (_c = states.registrationFormState) === null || _c === void 0 ? void 0 : _c.validationErrors) === null || _d === void 0 ? void 0 : _d.email) ||
|
|
2198
|
+
content.requiredFieldErrorMessage,
|
|
2199
|
+
}
|
|
2200
|
+
: [])))),
|
|
2201
|
+
!states.hideInputs && (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 })),
|
|
2202
|
+
content.passwordField,
|
|
2203
|
+
!states.hideInputs && states.confirmPassword && (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) ? {
|
|
2204
|
+
value: (_j = (_h = states.registrationFormState) === null || _h === void 0 ? void 0 : _h.initialData) === null || _j === void 0 ? void 0 : _j.confirmPassword,
|
|
2205
|
+
}
|
|
2206
|
+
: {}), (((_l = (_k = states.registrationFormState) === null || _k === void 0 ? void 0 : _k.validationErrors) === null || _l === void 0 ? void 0 : _l.confirmPassword) ? {
|
|
2207
|
+
class: sheet$3.classes.ErrorStyle,
|
|
2208
|
+
helpText: ((_o = (_m = states.registrationFormState) === null || _m === void 0 ? void 0 : _m.validationErrors) === null || _o === void 0 ? void 0 : _o.confirmPassword) || content.requiredFieldErrorMessage,
|
|
2209
|
+
}
|
|
2210
|
+
: [])))),
|
|
2211
|
+
content.terms,
|
|
2212
|
+
h("div", { class: sheet$3.classes.ButtonsContainer },
|
|
2213
|
+
h("sl-button", { submit: true, loading: states.loading, exportparts: "base: primarybutton-base", type: "primary" }, content.submitLabel || "Register"),
|
|
2214
|
+
content.secondaryButton))));
|
|
2215
|
+
}
|
|
2216
|
+
|
|
2217
|
+
const style$4 = {
|
|
2218
|
+
ErrorStyle: {
|
|
2219
|
+
"&::part(control)": {
|
|
2220
|
+
background: "var(--sl-color-danger-10)",
|
|
2221
|
+
borderColor: "var(--sl-color-danger-500)",
|
|
2222
|
+
outline: "var(--sl-color-danger-500)",
|
|
2223
|
+
},
|
|
2224
|
+
"&:host": {
|
|
2225
|
+
"--focus-ring": "0 0 0 var(--sl-focus-ring-width) red !important",
|
|
2226
|
+
},
|
|
2227
|
+
},
|
|
2228
|
+
ErrorMessageStyle: {
|
|
2229
|
+
margin: 0,
|
|
2230
|
+
marginTop: "5px",
|
|
2231
|
+
color: "var(--sl-color-danger-500)",
|
|
2232
|
+
fontSize: "var(--sl-input-help-text-font-size-medium)",
|
|
2233
|
+
fontFamily: "var(--sl-font-sans)",
|
|
2234
|
+
fontWeight: "var(--sl-font-weight-normal)",
|
|
2235
|
+
},
|
|
2236
|
+
FieldContainer: {
|
|
2237
|
+
"margin-bottom": "var(--sl-spacing-large)",
|
|
2238
|
+
},
|
|
2239
|
+
};
|
|
2240
|
+
const vanillaStyle$1 = `
|
|
2241
|
+
:host {
|
|
2242
|
+
margin: 0 auto;
|
|
2243
|
+
width: 100%;
|
|
2244
|
+
display: block;
|
|
2245
|
+
}
|
|
2246
|
+
sl-checkbox::part(label){
|
|
2247
|
+
font-size: var(--sl-input-label-font-size-small);
|
|
2248
|
+
font-weight: var(--sl-font-weight-normal);
|
|
2249
|
+
line-height: 20px;
|
|
2250
|
+
}
|
|
2251
|
+
sl-checkbox::part(base){
|
|
2252
|
+
align-items: start;
|
|
2253
|
+
}
|
|
2254
|
+
`;
|
|
2255
|
+
jss.setup(create());
|
|
2256
|
+
const sheet$4 = jss.createStyleSheet(style$4);
|
|
2257
|
+
const styleString$4 = sheet$4.toString();
|
|
2258
|
+
function CheckboxFieldView(props) {
|
|
2259
|
+
var _b, _c;
|
|
2260
|
+
const { states, content, callbacks } = props;
|
|
2261
|
+
return (h("div", { class: sheet$4.classes.FieldContainer, part: "sqm-base" },
|
|
2262
|
+
h("style", { type: "text/css" },
|
|
2263
|
+
vanillaStyle$1,
|
|
2264
|
+
styleString$4),
|
|
2265
|
+
h("sl-checkbox", Object.assign({ exportparts: "label: input-label, base: input-base", name: `/${content.checkboxName}`, checked: states.checked, "onSl-change": (e) => {
|
|
2266
|
+
e.target.value = e.target.checked;
|
|
2267
|
+
callbacks.setChecked(e.target.value);
|
|
2268
|
+
} }, (!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 }), intl.formatMessage({
|
|
2269
|
+
id: content.checkboxName + "-message",
|
|
2270
|
+
defaultMessage: content.checkboxLabel,
|
|
2271
|
+
}, {
|
|
2272
|
+
labelLink: (h("a", { href: content.checkboxLabelLink, target: "_blank" }, content.checkboxLabelLinkText || content.checkboxLabelLink)),
|
|
2273
|
+
}))));
|
|
2274
|
+
}
|
|
2275
|
+
|
|
2276
|
+
function CouponCodeView(props) {
|
|
2277
|
+
const error = !props.loading && props.error;
|
|
2278
|
+
const style = {
|
|
2279
|
+
HostBlock: HostBlock,
|
|
2280
|
+
couponCodeLabel: {
|
|
2281
|
+
margin: "var(--sl-spacing-x-small) 0",
|
|
2282
|
+
color: props.textColor || "var(--sqm-text-subdued)",
|
|
2283
|
+
fontSize: "var(--sl-font-size-small)",
|
|
2284
|
+
},
|
|
2285
|
+
};
|
|
2286
|
+
const vanillaStyle = `
|
|
2545
2287
|
:host{
|
|
2546
|
-
|
|
2288
|
+
display: block;
|
|
2547
2289
|
width: 100%;
|
|
2548
2290
|
}
|
|
2549
|
-
|
|
2550
|
-
|
|
2551
|
-
|
|
2552
|
-
|
|
2291
|
+
`;
|
|
2292
|
+
const sheet = createStyleSheet(style);
|
|
2293
|
+
const styleString = sheet.toString();
|
|
2294
|
+
return (h("div", null,
|
|
2295
|
+
h("style", { type: "text/css" },
|
|
2296
|
+
styleString,
|
|
2297
|
+
vanillaStyle),
|
|
2298
|
+
h("p", { class: sheet.classes.couponCodeLabel, style: { textAlign: props.textAlign } }, props.couponCodeLabel),
|
|
2299
|
+
error ? (h("sqm-form-message", { type: props.errorType, exportparts: "erroralert-icon" },
|
|
2300
|
+
h("div", { part: "erroralert-text" }, props.errorText))) : (h(CopyTextView, Object.assign({}, props)))));
|
|
2301
|
+
}
|
|
2302
|
+
|
|
2303
|
+
const style$5 = {
|
|
2304
|
+
ErrorStyle: {
|
|
2305
|
+
"--sl-input-border-color": "var(--sl-color-danger-500)",
|
|
2306
|
+
"--sl-input-background-color": "var(--sl-color-danger-10)",
|
|
2307
|
+
"--sl-input-border-color-focus": "var(--sl-color-danger-500)",
|
|
2308
|
+
"--sl-input-border-color-hover": "var(--sl-color-danger-500)",
|
|
2309
|
+
},
|
|
2310
|
+
ErrorMessageStyle: {
|
|
2311
|
+
margin: 0,
|
|
2312
|
+
color: "var(--sl-color-danger-500)",
|
|
2313
|
+
fontSize: "var(--sl-input-help-text-font-size-medium)",
|
|
2314
|
+
},
|
|
2315
|
+
FieldContainer: {
|
|
2316
|
+
"margin-bottom": "var(--sl-spacing-large)",
|
|
2317
|
+
},
|
|
2318
|
+
};
|
|
2319
|
+
const vanillaStyle$2 = `
|
|
2320
|
+
:host {
|
|
2321
|
+
margin: 0 auto;
|
|
2322
|
+
width: 100%;
|
|
2323
|
+
display: block;
|
|
2324
|
+
}
|
|
2325
|
+
sl-select::part(label){
|
|
2326
|
+
font-size: var(--sl-input-label-font-size-small);
|
|
2327
|
+
font-weight: var(--sl-font-weight-semibold);
|
|
2328
|
+
}
|
|
2329
|
+
`;
|
|
2330
|
+
jss.setup(create());
|
|
2331
|
+
const sheet$5 = jss.createStyleSheet(style$5);
|
|
2332
|
+
const styleString$5 = sheet$5.toString();
|
|
2333
|
+
function DropdownFieldView(props) {
|
|
2334
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
2335
|
+
const { states, content } = props;
|
|
2336
|
+
const validationErrors = (_a = states === null || states === void 0 ? void 0 : states.registrationFormState) === null || _a === void 0 ? void 0 : _a.validationErrors;
|
|
2337
|
+
return (h("div", { class: sheet$5.classes.FieldContainer, part: "sqm-base" },
|
|
2338
|
+
h("style", { type: "text/css" },
|
|
2339
|
+
vanillaStyle$2,
|
|
2340
|
+
styleString$5),
|
|
2341
|
+
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]) ? {
|
|
2342
|
+
value: (_g = (_f = states.registrationFormState) === null || _f === void 0 ? void 0 : _f.initialData) === null || _g === void 0 ? void 0 : _g[content.dropdownName],
|
|
2343
|
+
}
|
|
2344
|
+
: {}), ((validationErrors === null || validationErrors === void 0 ? void 0 : validationErrors[content.dropdownName]) ? {
|
|
2345
|
+
class: sheet$5.classes.ErrorStyle,
|
|
2346
|
+
}
|
|
2347
|
+
: [])), content.selectOptions),
|
|
2348
|
+
(validationErrors === null || validationErrors === void 0 ? void 0 : validationErrors[content.dropdownName]) && (h("p", { class: sheet$5.classes.ErrorMessageStyle }, intl.formatMessage({
|
|
2349
|
+
id: `errorMessage-${content.dropdownName}`,
|
|
2350
|
+
defaultMessage: content.errorMessage,
|
|
2351
|
+
})))));
|
|
2352
|
+
}
|
|
2353
|
+
|
|
2354
|
+
const EditProfileView = (props) => {
|
|
2355
|
+
var _a, _b, _c, _d;
|
|
2356
|
+
const { states, callbacks } = props;
|
|
2357
|
+
const { text } = states;
|
|
2358
|
+
const { errors } = states.formState;
|
|
2359
|
+
if (states.showEdit) {
|
|
2360
|
+
return (h("div", { class: `CardWrapper ${!states.showEdit && "ShowEdit"}`, part: "sqm-base" },
|
|
2361
|
+
h("h2", { part: "sqm-header", style: {
|
|
2362
|
+
fontSize: "var(--sl-font-size-x-large)",
|
|
2363
|
+
margin: "0px",
|
|
2364
|
+
textAlign: "center",
|
|
2365
|
+
} }, text.editprofileheader),
|
|
2366
|
+
h("form", { class: "FormWrapper", onSubmit: callbacks.onSubmit },
|
|
2367
|
+
h("div", { class: "FormSection" },
|
|
2368
|
+
states.formState.error && (h("sqm-form-message", { type: "error", exportparts: "erroralert-icon" },
|
|
2369
|
+
h("div", { part: "erroralert-text" }, states.formState.error))),
|
|
2370
|
+
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"
|
|
2371
|
+
? { class: "ErrorStyles", helpText: text.fieldEmptyText }
|
|
2372
|
+
: []), { id: "firstName", name: "firstName", error: errors.firstName && errors.firstName.status !== "valid"
|
|
2373
|
+
? errors.firstName.message
|
|
2374
|
+
: undefined })),
|
|
2375
|
+
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"
|
|
2376
|
+
? { class: "ErrorStyles", helpText: text.fieldEmptyText }
|
|
2377
|
+
: []), { error: errors.lastName && errors.lastName.status !== "valid"
|
|
2378
|
+
? errors.lastName.message
|
|
2379
|
+
: undefined }))),
|
|
2380
|
+
text.showregion && states.formState.currentRegion && (h("sl-input", { exportparts: "label: input-label, base: input-base", disabled: true, value: states.formState.currentRegion, label: text.currentregiontext, id: "currentRegion", name: "currentRegion" })),
|
|
2381
|
+
h("div", { class: "ButtonWrapper" },
|
|
2382
|
+
h("sl-button", { type: "primary", loading: states.loading, disabled: states.submitDisabled, onClick: (e) => {
|
|
2383
|
+
callbacks.onSubmit(e);
|
|
2384
|
+
}, submit: true, exportparts: "base: primarybutton-base" }, text.updatetext),
|
|
2385
|
+
h("sl-button", { onClick: () => {
|
|
2386
|
+
callbacks.setShowEdit(false);
|
|
2387
|
+
}, type: "secondary", exportparts: "base: secondarybutton-base" }, text.canceltext)))));
|
|
2553
2388
|
}
|
|
2554
|
-
|
|
2555
|
-
|
|
2389
|
+
return (h("div", { class: `CardWrapper FormWrapper ${!states.showEdit && "ShowEdit"}`, part: "sqm-base" },
|
|
2390
|
+
h("div", { class: "FormSection" },
|
|
2391
|
+
h("h2", { part: "sqm-header", style: {
|
|
2392
|
+
fontSize: "var(--sl-font-size-x-large)",
|
|
2393
|
+
marginBottom: "0px",
|
|
2394
|
+
textAlign: "center",
|
|
2395
|
+
} }, text.editprofileheader),
|
|
2396
|
+
h("div", null,
|
|
2397
|
+
h("p", { style: { fontSize: "var(--sl-font-size-medium)" } }, (_a = states.user) === null || _a === void 0 ? void 0 :
|
|
2398
|
+
_a.firstName,
|
|
2399
|
+
" ", (_b = states.user) === null || _b === void 0 ? void 0 :
|
|
2400
|
+
_b.lastName),
|
|
2401
|
+
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))),
|
|
2402
|
+
h("sl-button", { type: "primary", loading: states.loading, onClick: () => {
|
|
2403
|
+
callbacks.resetForm();
|
|
2404
|
+
callbacks.setShowEdit(true);
|
|
2405
|
+
}, exportparts: "base: primarybutton-base" }, text.editprofiletext)));
|
|
2406
|
+
};
|
|
2407
|
+
|
|
2408
|
+
function LeaderboardView(props) {
|
|
2409
|
+
var _a, _b, _c;
|
|
2410
|
+
const { states, data, elements } = props;
|
|
2411
|
+
const { styles } = states;
|
|
2556
2412
|
const style = {
|
|
2557
|
-
|
|
2558
|
-
|
|
2559
|
-
|
|
2560
|
-
|
|
2413
|
+
Leaderboard: {
|
|
2414
|
+
"& table": {
|
|
2415
|
+
width: "100%",
|
|
2416
|
+
borderCollapse: "collapse",
|
|
2417
|
+
background: styles.background || "transparent",
|
|
2418
|
+
borderRadius: styles.borderRadius ? `${styles.borderRadius}px` : "0",
|
|
2561
2419
|
},
|
|
2562
|
-
|
|
2563
|
-
|
|
2564
|
-
|
|
2565
|
-
|
|
2566
|
-
|
|
2567
|
-
|
|
2568
|
-
color: "var(--sl-color-gray-600)",
|
|
2569
|
-
"padding-top": `var(--sl-spacing-${props.paddingTop})`,
|
|
2570
|
-
"padding-right": `var(--sl-spacing-${props.paddingRight})`,
|
|
2571
|
-
"padding-bottom": `var(--sl-spacing-${props.paddingBottom})`,
|
|
2572
|
-
"padding-left": `var(--sl-spacing-${props.paddingLeft})`,
|
|
2573
|
-
"row-gap": `var(--sl-spacing-small)`,
|
|
2574
|
-
"& a:hover": {
|
|
2575
|
-
color: "var(--sl-color-gray-900)",
|
|
2420
|
+
"& th": {
|
|
2421
|
+
textAlign: "left",
|
|
2422
|
+
padding: "var(--sl-spacing-medium)",
|
|
2423
|
+
paddingTop: "0",
|
|
2424
|
+
fontSize: "var(--sl-font-size-medium)",
|
|
2425
|
+
fontWeight: "var(--sl-font-weight-semibold)",
|
|
2576
2426
|
},
|
|
2577
|
-
|
|
2578
|
-
|
|
2579
|
-
textAlign: "center",
|
|
2580
|
-
margin: 0,
|
|
2581
|
-
},
|
|
2582
|
-
PoweredByLink: {
|
|
2583
|
-
color: "var(--sl-color-gray-400)",
|
|
2584
|
-
"font-size": "var(--sl-font-size-small)",
|
|
2585
|
-
display: "flex",
|
|
2586
|
-
alignItems: "center",
|
|
2587
|
-
svg: {
|
|
2588
|
-
marginTop: "2px",
|
|
2589
|
-
shapeRendering: "geometricprecision",
|
|
2427
|
+
"& tr:not(:first-child)": {
|
|
2428
|
+
borderTop: `var(--sqm-border-thickness) solid ${styles.borderColor || "var(--sqm-border-color)"}`,
|
|
2590
2429
|
},
|
|
2591
|
-
"
|
|
2592
|
-
|
|
2430
|
+
"& td": {
|
|
2431
|
+
fontSize: "var(--sl-font-size-medium)",
|
|
2432
|
+
fontWeight: "var(--sl-font-weight-normal)",
|
|
2433
|
+
},
|
|
2434
|
+
"& .ellipses": {
|
|
2435
|
+
textAlign: "left",
|
|
2436
|
+
padding: "0",
|
|
2437
|
+
color: styles.textColor || "var(--sqm-text)",
|
|
2438
|
+
paddingLeft: "25%",
|
|
2439
|
+
},
|
|
2440
|
+
"& .highlight": {
|
|
2441
|
+
background: styles.viewingUserHighlightColor ||
|
|
2442
|
+
"var(--sqm-accent-color-background)",
|
|
2443
|
+
"& td, th": {
|
|
2444
|
+
color: styles.viewingUserHighlightTextColor || "var(--sqm-text)",
|
|
2445
|
+
},
|
|
2446
|
+
},
|
|
2447
|
+
"& td, th": {
|
|
2448
|
+
color: styles.textColor || "var(--sqm-text)",
|
|
2449
|
+
padding: "var(--sl-spacing-medium)",
|
|
2450
|
+
},
|
|
2451
|
+
"& .User": {
|
|
2452
|
+
width: "100%",
|
|
2453
|
+
},
|
|
2454
|
+
"& .Score": {
|
|
2455
|
+
width: "auto",
|
|
2456
|
+
whiteSpace: "nowrap",
|
|
2457
|
+
},
|
|
2458
|
+
"& .Rank": {
|
|
2459
|
+
whiteSpace: "nowrap",
|
|
2460
|
+
},
|
|
2461
|
+
"& .fullWidth": {
|
|
2462
|
+
width: "100%",
|
|
2593
2463
|
},
|
|
2594
2464
|
},
|
|
2595
2465
|
};
|
|
2596
2466
|
const sheet = createStyleSheet(style);
|
|
2597
2467
|
const styleString = sheet.toString();
|
|
2598
|
-
|
|
2468
|
+
const vanillaStyle = `
|
|
2469
|
+
:host{
|
|
2470
|
+
display: block;
|
|
2471
|
+
}
|
|
2472
|
+
`;
|
|
2473
|
+
if (states.isEssentials) {
|
|
2474
|
+
return (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" }));
|
|
2475
|
+
}
|
|
2476
|
+
if (states.loading) {
|
|
2477
|
+
return (h("div", { class: sheet.classes.Leaderboard, style: { width: styles.width || "100%" } },
|
|
2478
|
+
h("style", { type: "text/css" },
|
|
2479
|
+
styleString,
|
|
2480
|
+
vanillaStyle),
|
|
2481
|
+
h("table", null, [...Array(10)].map(() => {
|
|
2482
|
+
return (h("tr", null,
|
|
2483
|
+
h("td", null,
|
|
2484
|
+
h("sl-skeleton", null))));
|
|
2485
|
+
}))));
|
|
2486
|
+
}
|
|
2487
|
+
if (!states.hasLeaders)
|
|
2488
|
+
return elements.empty;
|
|
2489
|
+
let userSeenFlag = false;
|
|
2490
|
+
const getUsersName = (user) => {
|
|
2491
|
+
if (!user.firstName && !user.lastInitial)
|
|
2492
|
+
return styles.anonymousUser;
|
|
2493
|
+
const { firstName, lastInitial } = user;
|
|
2494
|
+
if (firstName && lastInitial)
|
|
2495
|
+
return `${firstName} ${lastInitial}`;
|
|
2496
|
+
if (firstName || lastInitial)
|
|
2497
|
+
return firstName || lastInitial;
|
|
2498
|
+
return styles.anonymousUser;
|
|
2499
|
+
};
|
|
2500
|
+
const getRankCellText = (userRank, isViewingUsersRow) => {
|
|
2501
|
+
if (!userRank) {
|
|
2502
|
+
return styles.hideNames ? `${styles.viewingUserText}` : "-";
|
|
2503
|
+
}
|
|
2504
|
+
const viewingUserText = ` - ${styles.viewingUserText}`;
|
|
2505
|
+
return styles.rankSuffix
|
|
2506
|
+
? intl.formatMessage({
|
|
2507
|
+
id: "rank",
|
|
2508
|
+
defaultMessage: styles.rankSuffix,
|
|
2509
|
+
}, {
|
|
2510
|
+
rank: userRank,
|
|
2511
|
+
}) + `${isViewingUsersRow && styles.hideNames ? viewingUserText : ""}`
|
|
2512
|
+
: `${userRank} ${isViewingUsersRow && styles.hideNames ? viewingUserText : ""}`;
|
|
2513
|
+
};
|
|
2514
|
+
return (h("div", { class: sheet.classes.Leaderboard, part: "sqm-base", style: { width: styles.width || "100%" } },
|
|
2599
2515
|
h("style", { type: "text/css" },
|
|
2600
|
-
|
|
2601
|
-
|
|
2602
|
-
h("
|
|
2603
|
-
|
|
2604
|
-
|
|
2605
|
-
|
|
2606
|
-
|
|
2607
|
-
|
|
2608
|
-
|
|
2609
|
-
|
|
2610
|
-
|
|
2611
|
-
|
|
2612
|
-
|
|
2613
|
-
|
|
2516
|
+
styleString,
|
|
2517
|
+
vanillaStyle),
|
|
2518
|
+
h("table", { part: "sqm-table" },
|
|
2519
|
+
h("tr", null,
|
|
2520
|
+
styles.showRank && (h("th", { class: `Rank ${styles.hideNames ? "fullWidth" : ""}` }, styles.rankheading)),
|
|
2521
|
+
!styles.hideNames && h("th", { class: "User" }, styles.usersheading),
|
|
2522
|
+
h("th", { class: "Score" }, styles.statsheading)), (_a = data.leaderboard) === null || _a === void 0 ? void 0 :
|
|
2523
|
+
_a.map((user) => {
|
|
2524
|
+
var _a, _b;
|
|
2525
|
+
if (user.rowNumber === ((_a = data.viewerRank) === null || _a === void 0 ? void 0 : _a.rowNumber))
|
|
2526
|
+
userSeenFlag = true;
|
|
2527
|
+
const isViewingUsersRow = !styles.hideViewer && user.rowNumber === ((_b = data.viewerRank) === null || _b === void 0 ? void 0 : _b.rowNumber);
|
|
2528
|
+
return (h("tr", { class: isViewingUsersRow ? "highlight" : "" },
|
|
2529
|
+
styles.showRank && (h("td", { class: "Rank" }, getRankCellText(user.rank, isViewingUsersRow))),
|
|
2530
|
+
!styles.hideNames && h("td", { class: "User" }, getUsersName(user)),
|
|
2531
|
+
h("td", { class: "Score" }, user.textValue)));
|
|
2532
|
+
}),
|
|
2533
|
+
!userSeenFlag && !styles.hideViewer && (h("tr", null,
|
|
2534
|
+
h("td", { colSpan: 100, class: "ellipses" },
|
|
2535
|
+
h("sl-icon", { name: "three-dots", style: { verticalAlign: "middle" } })))),
|
|
2536
|
+
!userSeenFlag && !styles.hideViewer && (h("tr", { class: "highlight" },
|
|
2537
|
+
styles.showRank && (h("td", { class: "Rank" }, getRankCellText((_b = data.viewerRank) === null || _b === void 0 ? void 0 : _b.rank, true))),
|
|
2538
|
+
!styles.hideNames && (h("td", { class: "User" }, getUsersName(data.viewerRank || {}))),
|
|
2539
|
+
h("td", { class: "Score" }, ((_c = data.viewerRank) === null || _c === void 0 ? void 0 : _c.textValue) || "0"))))));
|
|
2614
2540
|
}
|
|
2615
2541
|
|
|
2616
2542
|
const paddingList = [
|
|
@@ -2635,11 +2561,12 @@ const parseBackground = (provided_bg) => {
|
|
|
2635
2561
|
}
|
|
2636
2562
|
}
|
|
2637
2563
|
else {
|
|
2638
|
-
return "";
|
|
2564
|
+
return "var(--sqm-portal-background)";
|
|
2639
2565
|
}
|
|
2640
2566
|
};
|
|
2641
2567
|
function HeroView(props) {
|
|
2642
2568
|
const { states, content } = props;
|
|
2569
|
+
const { secondaryBackground = "var(--sqm-portal-background)" } = states;
|
|
2643
2570
|
const getVertivalPadding = (size, half) => {
|
|
2644
2571
|
const sizes = {
|
|
2645
2572
|
small: 7,
|
|
@@ -2647,10 +2574,10 @@ function HeroView(props) {
|
|
|
2647
2574
|
large: 9,
|
|
2648
2575
|
};
|
|
2649
2576
|
var index = sizes[size];
|
|
2650
|
-
if (isMobile(
|
|
2577
|
+
if (isMobile(650)) {
|
|
2651
2578
|
index = index - 2;
|
|
2652
2579
|
}
|
|
2653
|
-
else if (isMobile(
|
|
2580
|
+
else if (isMobile(767)) {
|
|
2654
2581
|
index = index - 1;
|
|
2655
2582
|
}
|
|
2656
2583
|
return half ? paddingList[index - 2] : paddingList[index];
|
|
@@ -2670,7 +2597,7 @@ function HeroView(props) {
|
|
|
2670
2597
|
const style = {
|
|
2671
2598
|
TwoColumnContainer: {
|
|
2672
2599
|
display: "flex",
|
|
2673
|
-
"@media screen and (max-width:
|
|
2600
|
+
"@media screen and (max-width: 650px)": {
|
|
2674
2601
|
flexDirection: states.wrapDirection == "wrap-reverse" ? "column-reverse" : "column",
|
|
2675
2602
|
justfiyContent: "center",
|
|
2676
2603
|
},
|
|
@@ -2694,12 +2621,15 @@ function HeroView(props) {
|
|
|
2694
2621
|
background: `no-repeat center/cover ${parseBackground(states.background)}`,
|
|
2695
2622
|
},
|
|
2696
2623
|
"&:last-of-type": {
|
|
2697
|
-
background: `no-repeat center/cover ${parseBackground(
|
|
2624
|
+
background: `no-repeat center/cover ${parseBackground(secondaryBackground)}`,
|
|
2698
2625
|
},
|
|
2699
|
-
"@media screen and (min-width:
|
|
2626
|
+
"@media screen and (min-width: 650px)": { flex: "1 1 0" },
|
|
2700
2627
|
minHeight: `${states.minHeight}px`,
|
|
2701
2628
|
display: "block",
|
|
2702
2629
|
},
|
|
2630
|
+
HideColumn: {
|
|
2631
|
+
"@media screen and (max-width: 650px)": { display: "none" },
|
|
2632
|
+
},
|
|
2703
2633
|
SingleColumnContainer: {
|
|
2704
2634
|
background: `no-repeat center/cover ${parseBackground(states.background)}`,
|
|
2705
2635
|
minHeight: `${states.minHeight}px`,
|
|
@@ -2737,39 +2667,52 @@ function HeroView(props) {
|
|
|
2737
2667
|
vanillaStyle,
|
|
2738
2668
|
styleString),
|
|
2739
2669
|
states.columns == 2 ? (h("div", { class: sheet.classes.TwoColumnContainer, part: "sqm-two-col-container" },
|
|
2740
|
-
h("div", { part: "sqm-two-col-primary-col", class: `${sheet.classes.ColumnWrapper} ${sheet.classes.ColumnPadding}
|
|
2741
|
-
|
|
2670
|
+
h("div", { part: "sqm-two-col-primary-col", class: `${sheet.classes.ColumnWrapper} ${sheet.classes.ColumnPadding} ${states.columnToHideInMobile === "primary"
|
|
2671
|
+
? sheet.classes.HideColumn
|
|
2672
|
+
: ""}` }, content.primaryColumn),
|
|
2673
|
+
h("div", { part: "sqm-two-col-secondary-col", class: `${sheet.classes.ColumnWrapper} ${sheet.classes.ColumnPadding} ${states.columnToHideInMobile === "secondary"
|
|
2674
|
+
? sheet.classes.HideColumn
|
|
2675
|
+
: ""}` }, content.secondaryColumn))) : (h("div", { part: "sqm-single-col", class: `${sheet.classes.SingleColumnContainer} ${sheet.classes.ColumnPadding}` }, content.primaryColumn))));
|
|
2742
2676
|
}
|
|
2743
2677
|
|
|
2744
|
-
|
|
2745
|
-
|
|
2746
|
-
|
|
2747
|
-
|
|
2748
|
-
|
|
2749
|
-
|
|
2750
|
-
|
|
2751
|
-
|
|
2752
|
-
|
|
2753
|
-
|
|
2754
|
-
|
|
2755
|
-
|
|
2756
|
-
|
|
2757
|
-
|
|
2758
|
-
|
|
2759
|
-
|
|
2760
|
-
|
|
2761
|
-
|
|
2762
|
-
|
|
2763
|
-
|
|
2764
|
-
|
|
2765
|
-
|
|
2766
|
-
|
|
2767
|
-
|
|
2768
|
-
h("
|
|
2769
|
-
|
|
2678
|
+
const style$6 = {
|
|
2679
|
+
ErrorStyle: ErrorStyles,
|
|
2680
|
+
FieldContainer: {
|
|
2681
|
+
"margin-bottom": "var(--sl-spacing-large)",
|
|
2682
|
+
},
|
|
2683
|
+
};
|
|
2684
|
+
const vanillaStyle$3 = `
|
|
2685
|
+
:host {
|
|
2686
|
+
margin: 0 auto;
|
|
2687
|
+
width: 100%;
|
|
2688
|
+
display: block;
|
|
2689
|
+
}
|
|
2690
|
+
`;
|
|
2691
|
+
jss.setup(create());
|
|
2692
|
+
const sheet$6 = jss.createStyleSheet(style$6);
|
|
2693
|
+
const styleString$6 = sheet$6.toString();
|
|
2694
|
+
function InputFieldView(props) {
|
|
2695
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
2696
|
+
const { states, content } = props;
|
|
2697
|
+
const validationErrors = (_a = states === null || states === void 0 ? void 0 : states.registrationFormState) === null || _a === void 0 ? void 0 : _a.validationErrors;
|
|
2698
|
+
return (h("div", { class: sheet$6.classes.FieldContainer, part: "sqm-base" },
|
|
2699
|
+
h("style", { type: "text/css" },
|
|
2700
|
+
vanillaStyle$3,
|
|
2701
|
+
styleString$6),
|
|
2702
|
+
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]) ? {
|
|
2703
|
+
value: (_g = (_f = states.registrationFormState) === null || _f === void 0 ? void 0 : _f.initialData) === null || _g === void 0 ? void 0 : _g[content.fieldName],
|
|
2704
|
+
}
|
|
2705
|
+
: {}), ((validationErrors === null || validationErrors === void 0 ? void 0 : validationErrors[content.fieldName]) ? {
|
|
2706
|
+
class: sheet$6.classes.ErrorStyle,
|
|
2707
|
+
helpText: intl.formatMessage({
|
|
2708
|
+
id: `errorMessage-${content.fieldName}`,
|
|
2709
|
+
defaultMessage: content.errorMessage || (validationErrors === null || validationErrors === void 0 ? void 0 : validationErrors[content.fieldName]),
|
|
2710
|
+
}),
|
|
2711
|
+
}
|
|
2712
|
+
: [])))));
|
|
2770
2713
|
}
|
|
2771
2714
|
|
|
2772
|
-
const style$
|
|
2715
|
+
const style$7 = {
|
|
2773
2716
|
ErrorStyle: ErrorStyles,
|
|
2774
2717
|
FieldsContainer: {
|
|
2775
2718
|
"& sl-input": {
|
|
@@ -2777,33 +2720,58 @@ const style$6 = {
|
|
|
2777
2720
|
},
|
|
2778
2721
|
},
|
|
2779
2722
|
};
|
|
2780
|
-
const vanillaStyle$
|
|
2723
|
+
const vanillaStyle$4 = `
|
|
2781
2724
|
:host {
|
|
2782
2725
|
margin: 0 auto;
|
|
2783
2726
|
width: 100%;
|
|
2784
2727
|
display: block;
|
|
2785
2728
|
}
|
|
2786
2729
|
|
|
2787
|
-
|
|
2788
|
-
font-size: var(--
|
|
2730
|
+
*::part(input-label), *::part(select-label), *::part(textarea-label){
|
|
2731
|
+
font-size: var(--sqm-input-label-font-size, var(--sl-input-font-size-small));
|
|
2789
2732
|
font-weight: var(--sl-font-weight-semibold);
|
|
2733
|
+
color: var(--sqm-input-label-color, var(--sqm-text), black);
|
|
2734
|
+
}
|
|
2735
|
+
|
|
2736
|
+
*::part(input-base), *::part(select-base), *::part(textarea-base){
|
|
2737
|
+
background-color: var(--sqm-input-background, #fff);
|
|
2738
|
+
border-radius: var(--sqm-input-border-radius, var(--sl-input-border-radius-large), 0.25rem);
|
|
2739
|
+
color: var(--sqm-input-color, white);
|
|
2740
|
+
border-width: var(--sqm-border-thickness, 1px);
|
|
2790
2741
|
}
|
|
2742
|
+
|
|
2743
|
+
sl-input::part(base):focus,
|
|
2744
|
+
sl-select::part(form-control-wrapper):focus,
|
|
2745
|
+
sl-textare::part(textarea-label):focus {
|
|
2746
|
+
border-color: none;
|
|
2747
|
+
border: var(--sqm-input-focus-border, var(--sqm-border-thickness) solid var(--sl-input-border-color-focus));
|
|
2748
|
+
}
|
|
2749
|
+
|
|
2750
|
+
*::part(input-label):disabled, *::part(select-label):disabled, *::part(textarea-label):disabled{
|
|
2751
|
+
background: var(--sqm-input-disabled-background, #f5f5f5);
|
|
2752
|
+
color: var(--sqm-input-disabled-color, var(--sl-color-gray-600));
|
|
2753
|
+
}
|
|
2754
|
+
|
|
2755
|
+
sl-input {
|
|
2756
|
+
--sl-input-border-color-focus: var(--sqm-border-color-focus);
|
|
2757
|
+
}
|
|
2758
|
+
|
|
2791
2759
|
`;
|
|
2792
|
-
const sheet$
|
|
2793
|
-
const styleString$
|
|
2760
|
+
const sheet$7 = createStyleSheet(style$7);
|
|
2761
|
+
const styleString$7 = sheet$7.toString();
|
|
2794
2762
|
function NameFieldsView(props) {
|
|
2795
2763
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
|
|
2796
2764
|
const { states } = props;
|
|
2797
2765
|
const validationErrors = (_a = states === null || states === void 0 ? void 0 : states.registrationFormState) === null || _a === void 0 ? void 0 : _a.validationErrors;
|
|
2798
|
-
return (h("div", { class: sheet$
|
|
2766
|
+
return (h("div", { class: sheet$7.classes.FieldsContainer },
|
|
2799
2767
|
h("style", { type: "text/css" },
|
|
2800
|
-
vanillaStyle$
|
|
2801
|
-
styleString$
|
|
2768
|
+
vanillaStyle$4,
|
|
2769
|
+
styleString$7),
|
|
2802
2770
|
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) ? {
|
|
2803
2771
|
value: (_g = (_f = states.registrationFormState) === null || _f === void 0 ? void 0 : _f.initialData) === null || _g === void 0 ? void 0 : _g.firstName,
|
|
2804
2772
|
}
|
|
2805
2773
|
: {}), ((validationErrors === null || validationErrors === void 0 ? void 0 : validationErrors.firstName) ? {
|
|
2806
|
-
class: sheet$
|
|
2774
|
+
class: sheet$7.classes.ErrorStyle,
|
|
2807
2775
|
helpText: (validationErrors === null || validationErrors === void 0 ? void 0 : validationErrors.firstName) || "Cannot be empty",
|
|
2808
2776
|
}
|
|
2809
2777
|
: []))),
|
|
@@ -2811,98 +2779,250 @@ function NameFieldsView(props) {
|
|
|
2811
2779
|
value: (_o = (_m = states.registrationFormState) === null || _m === void 0 ? void 0 : _m.initialData) === null || _o === void 0 ? void 0 : _o.lastName,
|
|
2812
2780
|
}
|
|
2813
2781
|
: {}), ((validationErrors === null || validationErrors === void 0 ? void 0 : validationErrors.lastName) ? {
|
|
2814
|
-
class: sheet$
|
|
2782
|
+
class: sheet$7.classes.ErrorStyle,
|
|
2815
2783
|
helpText: (validationErrors === null || validationErrors === void 0 ? void 0 : validationErrors.lastName) || "Cannot be empty",
|
|
2816
2784
|
}
|
|
2817
2785
|
: [])))));
|
|
2818
2786
|
}
|
|
2819
2787
|
|
|
2820
|
-
|
|
2821
|
-
|
|
2822
|
-
|
|
2823
|
-
|
|
2824
|
-
|
|
2825
|
-
|
|
2826
|
-
|
|
2827
|
-
|
|
2828
|
-
|
|
2829
|
-
|
|
2830
|
-
|
|
2831
|
-
|
|
2832
|
-
|
|
2833
|
-
|
|
2834
|
-
|
|
2835
|
-
}
|
|
2836
|
-
|
|
2837
|
-
:
|
|
2838
|
-
|
|
2839
|
-
|
|
2840
|
-
|
|
2841
|
-
}
|
|
2842
|
-
|
|
2843
|
-
|
|
2844
|
-
|
|
2788
|
+
function ChangeMarktingView(props) {
|
|
2789
|
+
const { states, callbacks } = props;
|
|
2790
|
+
const { text, formState } = states;
|
|
2791
|
+
const { error } = formState;
|
|
2792
|
+
const style = {
|
|
2793
|
+
Container: {
|
|
2794
|
+
display: "flex",
|
|
2795
|
+
flexDirection: "column",
|
|
2796
|
+
gap: "var(--sl-spacing-x-small)",
|
|
2797
|
+
padding: "0 var(--sl-spacing-xxx-large) var(--sl-spacing-xxx-large)",
|
|
2798
|
+
},
|
|
2799
|
+
SubmitButton: { marginBottom: "var(--sl-spacing-medium)" },
|
|
2800
|
+
Error: {
|
|
2801
|
+
"&::part(erroralert-base)": {
|
|
2802
|
+
"margin-bottom": "15px",
|
|
2803
|
+
},
|
|
2804
|
+
},
|
|
2805
|
+
Success: {
|
|
2806
|
+
"&::part(successalert-base)": {
|
|
2807
|
+
"margin-bottom": "15px",
|
|
2808
|
+
},
|
|
2809
|
+
},
|
|
2810
|
+
};
|
|
2811
|
+
const sheet = createStyleSheet(style);
|
|
2812
|
+
const styleString = sheet.toString();
|
|
2813
|
+
return (h("div", { class: sheet.classes.Container, part: "sqm-base" },
|
|
2814
|
+
h("style", { type: "text/css" }, styleString),
|
|
2815
|
+
h(TextSpanView, Object.assign({}, { type: "h2" }), text.emailPreferencesHeader),
|
|
2816
|
+
h("sl-form", { "onSl-submit": callbacks.onSubmit },
|
|
2817
|
+
h(CheckboxFieldView, { states: {
|
|
2818
|
+
checked: states.formState.marketingEmailOptIn,
|
|
2819
|
+
}, content: {
|
|
2820
|
+
checkboxLabel: text.marketingCheckboxLabel,
|
|
2821
|
+
checkboxName: "marketingEmailOptIn",
|
|
2822
|
+
}, callbacks: {
|
|
2823
|
+
setChecked: callbacks.setChecked,
|
|
2824
|
+
} }),
|
|
2825
|
+
h("sl-button", { class: sheet.classes.SubmitButton, type: "primary", submit: true, loading: states.loading, disabled: states.submitDisabled }, text.submitChangeButtonText),
|
|
2826
|
+
error && (h("sqm-form-message", { class: sheet.classes.Error, type: "error", exportparts: "erroralert-icon" },
|
|
2827
|
+
h("div", { part: "erroralert-text" }, error))),
|
|
2828
|
+
states.success && (h("sqm-form-message", { class: sheet.classes.Success, type: "success", exportparts: "successalert-icon" },
|
|
2829
|
+
h("div", { part: "successalert-text" }, states.text.successMessage))))));
|
|
2845
2830
|
}
|
|
2831
|
+
|
|
2832
|
+
const vanillaStyle$5 = `
|
|
2833
|
+
:host{
|
|
2834
|
+
margin: 0 auto;
|
|
2835
|
+
width: 100%;
|
|
2836
|
+
}
|
|
2837
|
+
a{
|
|
2838
|
+
cursor:pointer;
|
|
2839
|
+
color: var(--sqm-text-subdued);
|
|
2840
|
+
text-decoration: none ;
|
|
2841
|
+
}
|
|
2846
2842
|
`;
|
|
2847
|
-
|
|
2848
|
-
const
|
|
2849
|
-
|
|
2850
|
-
|
|
2851
|
-
|
|
2852
|
-
|
|
2853
|
-
|
|
2854
|
-
|
|
2843
|
+
function PortalFooterView(props) {
|
|
2844
|
+
const style = {
|
|
2845
|
+
RowContainer: {
|
|
2846
|
+
display: "flex",
|
|
2847
|
+
"& > :not(:last-child)": {
|
|
2848
|
+
"margin-right": "var(--sl-spacing-large)",
|
|
2849
|
+
},
|
|
2850
|
+
},
|
|
2851
|
+
Container: {
|
|
2852
|
+
display: "flex",
|
|
2853
|
+
"flex-direction": "column",
|
|
2854
|
+
"align-items": "center",
|
|
2855
|
+
"font-size": "var(--sl-font-size-small)",
|
|
2856
|
+
color: "var(--sqm-text-subdued)",
|
|
2857
|
+
"padding-top": `var(--sl-spacing-${props.paddingTop})`,
|
|
2858
|
+
"padding-right": `var(--sl-spacing-${props.paddingRight})`,
|
|
2859
|
+
"padding-bottom": `var(--sl-spacing-${props.paddingBottom})`,
|
|
2860
|
+
"padding-left": `var(--sl-spacing-${props.paddingLeft})`,
|
|
2861
|
+
"row-gap": `var(--sl-spacing-small)`,
|
|
2862
|
+
"& a:hover": {
|
|
2863
|
+
color: "var(--sqm-text)",
|
|
2864
|
+
},
|
|
2865
|
+
},
|
|
2866
|
+
SupportText: {
|
|
2867
|
+
textAlign: "center",
|
|
2868
|
+
margin: 0,
|
|
2869
|
+
},
|
|
2870
|
+
PoweredByLink: {
|
|
2871
|
+
color: "var(--sqm-text-subdued)",
|
|
2872
|
+
"font-size": "var(--sl-font-size-small)",
|
|
2873
|
+
display: "flex",
|
|
2874
|
+
alignItems: "center",
|
|
2875
|
+
svg: {
|
|
2876
|
+
marginTop: "2px",
|
|
2877
|
+
shapeRendering: "geometricprecision",
|
|
2878
|
+
},
|
|
2879
|
+
"&:hover, &:hover *": {
|
|
2880
|
+
color: "var(--sqm-text)",
|
|
2881
|
+
},
|
|
2882
|
+
},
|
|
2883
|
+
};
|
|
2884
|
+
const sheet = createStyleSheet(style);
|
|
2885
|
+
const styleString = sheet.toString();
|
|
2886
|
+
return (h("div", { class: sheet.classes.Container, part: "sqm-base" },
|
|
2855
2887
|
h("style", { type: "text/css" },
|
|
2856
|
-
vanillaStyle$
|
|
2857
|
-
styleString
|
|
2858
|
-
h("
|
|
2859
|
-
|
|
2860
|
-
|
|
2861
|
-
|
|
2862
|
-
|
|
2863
|
-
|
|
2864
|
-
|
|
2865
|
-
|
|
2866
|
-
|
|
2867
|
-
|
|
2868
|
-
|
|
2888
|
+
vanillaStyle$5,
|
|
2889
|
+
styleString),
|
|
2890
|
+
h("div", { class: sheet.classes.RowContainer },
|
|
2891
|
+
props.faqLink && (h("a", { target: "_blank", href: props.faqLink }, props.faqText)),
|
|
2892
|
+
props.termsLink && (h("a", { target: "_blank", href: props.termsLink }, props.termsText))),
|
|
2893
|
+
!props.hideSupportText && (h("p", { class: sheet.classes.SupportText }, intl.formatMessage({
|
|
2894
|
+
id: "supportFooter",
|
|
2895
|
+
defaultMessage: props.supportText,
|
|
2896
|
+
}, {
|
|
2897
|
+
email: (h("a", { target: "_blank", href: `mailto:${props.supportEmail}` }, props.supportEmail)),
|
|
2898
|
+
}))),
|
|
2899
|
+
!props.hidePoweredBy && (h("a", { class: sheet.classes.PoweredByLink, target: "_blank", href: props.poweredByLink },
|
|
2900
|
+
"Powered by ",
|
|
2901
|
+
h(PoweredByImg, { color: "currentColor" })))));
|
|
2869
2902
|
}
|
|
2870
2903
|
|
|
2871
|
-
const
|
|
2872
|
-
ErrorStyle: ErrorStyles,
|
|
2873
|
-
FieldContainer: {
|
|
2874
|
-
"margin-bottom": "var(--sl-spacing-large)",
|
|
2875
|
-
},
|
|
2876
|
-
};
|
|
2877
|
-
const vanillaStyle$5 = `
|
|
2904
|
+
const vanillaStyle$6 = `
|
|
2878
2905
|
:host {
|
|
2879
|
-
margin: 0 auto;
|
|
2880
|
-
width: 100%;
|
|
2881
2906
|
display: block;
|
|
2882
2907
|
}
|
|
2908
|
+
:host([hidden]): {
|
|
2909
|
+
display: none;
|
|
2910
|
+
}
|
|
2883
2911
|
`;
|
|
2884
|
-
|
|
2885
|
-
const
|
|
2886
|
-
const
|
|
2887
|
-
|
|
2888
|
-
|
|
2889
|
-
|
|
2890
|
-
|
|
2891
|
-
|
|
2912
|
+
function PortalForgotPasswordView(props) {
|
|
2913
|
+
const { states, callbacks, content } = props;
|
|
2914
|
+
const style = {
|
|
2915
|
+
FormWrapper: {
|
|
2916
|
+
...AuthWrapper,
|
|
2917
|
+
background: content.backgroundColor || "var(--sqm-portal-background)",
|
|
2918
|
+
borderRadius: content.borderRadius || "var(--sqm-border-radius-normal)",
|
|
2919
|
+
border: content.border ||
|
|
2920
|
+
"var(--sqm-border-thickness) solid var(--sqm-border-color)",
|
|
2921
|
+
},
|
|
2922
|
+
Column: { ...AuthColumn },
|
|
2923
|
+
ButtonsContainer: AuthButtonsContainer,
|
|
2924
|
+
SecondaryButton: {
|
|
2925
|
+
margin: "auto",
|
|
2926
|
+
display: "block",
|
|
2927
|
+
cursor: "pointer",
|
|
2928
|
+
},
|
|
2929
|
+
};
|
|
2930
|
+
const sheet = createStyleSheet(style);
|
|
2931
|
+
const styleString = sheet.toString();
|
|
2932
|
+
return (h("div", { class: sheet.classes.FormWrapper, part: "sqm-base" },
|
|
2892
2933
|
h("style", { type: "text/css" },
|
|
2893
|
-
vanillaStyle$
|
|
2894
|
-
styleString
|
|
2895
|
-
h(
|
|
2896
|
-
|
|
2897
|
-
|
|
2898
|
-
|
|
2899
|
-
|
|
2900
|
-
|
|
2901
|
-
|
|
2902
|
-
|
|
2903
|
-
|
|
2904
|
-
|
|
2905
|
-
|
|
2934
|
+
vanillaStyle$6,
|
|
2935
|
+
styleString),
|
|
2936
|
+
h(TextSpanView, { type: "h3" }, content.messageSlot),
|
|
2937
|
+
h("sl-form", { class: sheet.classes.Column, "onSl-submit": callbacks.submit },
|
|
2938
|
+
props.states.error && (h("sqm-form-message", { type: "error", exportparts: "erroralert-icon" },
|
|
2939
|
+
h("div", { part: "erroralert-text" }, props.states.error))),
|
|
2940
|
+
props.states.success && (h("sqm-form-message", { type: "success", exportparts: "successalert-icon" },
|
|
2941
|
+
h("div", { part: "successalert-text" }, content.successAlertText))),
|
|
2942
|
+
h("sl-input", { exportparts: "label: input-label, base: input-base", type: "email", name: "/email", label: content.emailLabel || "Email", disabled: states.loading, required: true }),
|
|
2943
|
+
h("div", { class: sheet.classes.ButtonsContainer },
|
|
2944
|
+
h("sl-button", { submit: true, loading: states.loading, exportparts: "base: primarybutton-base", type: "primary" }, content.submitLabel || "Reset Password"),
|
|
2945
|
+
h("sl-button", { type: "secondary", exportparts: "base: secondarybutton-base", class: sheet.classes.SecondaryButton, disabled: states.loading, onClick: () => jn.push(states.loginPath) }, content.loginText)))));
|
|
2946
|
+
}
|
|
2947
|
+
|
|
2948
|
+
function PortalFrameView(props, children) {
|
|
2949
|
+
const { data, notFullScreen, border } = props;
|
|
2950
|
+
const style = {
|
|
2951
|
+
HostBlock: HostBlock,
|
|
2952
|
+
Frame: {
|
|
2953
|
+
display: "flex",
|
|
2954
|
+
"flex-direction": "column",
|
|
2955
|
+
"box-sizing": "border-box",
|
|
2956
|
+
"&:nth-child(2)": {
|
|
2957
|
+
background: props.backgroundColor,
|
|
2958
|
+
},
|
|
2959
|
+
},
|
|
2960
|
+
FooterWrapper: {
|
|
2961
|
+
width: "100%",
|
|
2962
|
+
"max-width": "100%",
|
|
2963
|
+
padding: "var(--sl-spacing-medium) var(--sl-spacing-x-large)",
|
|
2964
|
+
background: props.headerAndFooterBackgroundColor,
|
|
2965
|
+
display: "flex",
|
|
2966
|
+
"justify-content": "flex-end",
|
|
2967
|
+
"align-items": "center",
|
|
2968
|
+
"box-sizing": "border-box",
|
|
2969
|
+
borderTop: border,
|
|
2970
|
+
"margin-top": "auto",
|
|
2971
|
+
},
|
|
2972
|
+
HeaderWrapper: {
|
|
2973
|
+
width: "100%",
|
|
2974
|
+
"max-width": "100%",
|
|
2975
|
+
"box-sizing": "border-box",
|
|
2976
|
+
display: "flex",
|
|
2977
|
+
"justify-content": "space-between",
|
|
2978
|
+
padding: "var(--sl-spacing-small) var(--sl-spacing-large)",
|
|
2979
|
+
"align-items": "center",
|
|
2980
|
+
borderBottom: border,
|
|
2981
|
+
background: props.headerAndFooterBackgroundColor,
|
|
2982
|
+
"@media screen and (max-width: 499px)": {
|
|
2983
|
+
"flex-direction": "row-reverse",
|
|
2984
|
+
"justify-content": "flex-end",
|
|
2985
|
+
padding: "0",
|
|
2986
|
+
},
|
|
2987
|
+
},
|
|
2988
|
+
};
|
|
2989
|
+
const sheet = createStyleSheet(style);
|
|
2990
|
+
const styleString = sheet.toString();
|
|
2991
|
+
return (h("div", { style: { minHeight: notFullScreen ? "100%" : "100vh" }, class: sheet.classes.Frame, part: "sqm-base" },
|
|
2992
|
+
h("style", { type: "text/css" }, styleString),
|
|
2993
|
+
h("div", { class: sheet.classes.HeaderWrapper, part: "sqm-header" },
|
|
2994
|
+
data.header,
|
|
2995
|
+
h("slot", { name: "sqm-navigation-menu" })),
|
|
2996
|
+
children,
|
|
2997
|
+
h("div", { class: sheet.classes.FooterWrapper, part: "sqm-footer" }, data.footer)));
|
|
2998
|
+
}
|
|
2999
|
+
|
|
3000
|
+
function ReferralIframeView(props) {
|
|
3001
|
+
const { states, data } = props;
|
|
3002
|
+
const { content } = states;
|
|
3003
|
+
// dependent on props
|
|
3004
|
+
const style = {
|
|
3005
|
+
Container: {
|
|
3006
|
+
position: "relative",
|
|
3007
|
+
width: content.iframeWidth,
|
|
3008
|
+
height: content.iframeHeight,
|
|
3009
|
+
},
|
|
3010
|
+
IFrame: {
|
|
3011
|
+
position: "absolute",
|
|
3012
|
+
width: "100%",
|
|
3013
|
+
height: "100%",
|
|
3014
|
+
border: "0",
|
|
3015
|
+
top: "0",
|
|
3016
|
+
left: "0",
|
|
3017
|
+
right: "0",
|
|
3018
|
+
},
|
|
3019
|
+
};
|
|
3020
|
+
// JSS config
|
|
3021
|
+
const sheet = createStyleSheet(style);
|
|
3022
|
+
const styleString = sheet.toString();
|
|
3023
|
+
return (h("div", { class: sheet.classes.Container },
|
|
3024
|
+
h("style", { type: "text/css" }, styleString),
|
|
3025
|
+
h("iframe", { class: sheet.classes.IFrame, src: `${content.iframeSrc}?rsCode=${data.shareCode}` })));
|
|
2906
3026
|
}
|
|
2907
3027
|
|
|
2908
3028
|
const CheckMark = () => (h("svg", { width: 12, height: 10, fill: "none", xmlns: "http://www.w3.org/2000/svg" },
|
|
@@ -2934,15 +3054,15 @@ function Dot({ active, completed, incomplete, stage, }) {
|
|
|
2934
3054
|
} },
|
|
2935
3055
|
h("div", { style: {
|
|
2936
3056
|
backgroundColor: completed
|
|
2937
|
-
? "var(--
|
|
3057
|
+
? "var(--sqm-success-color-icon)"
|
|
2938
3058
|
: incomplete
|
|
2939
|
-
? "var(--
|
|
2940
|
-
: "
|
|
3059
|
+
? "var(--sqm-border-color)"
|
|
3060
|
+
: "white",
|
|
2941
3061
|
border: active
|
|
2942
|
-
? "1px solid var(--
|
|
3062
|
+
? "1px solid var(--sqm-success-color-border)"
|
|
2943
3063
|
: incomplete
|
|
2944
|
-
? "1px solid var(--
|
|
2945
|
-
: "1px solid var(--
|
|
3064
|
+
? "1px solid var(--sqm-border-color)"
|
|
3065
|
+
: "1px solid var(--sqm-success-color-border)",
|
|
2946
3066
|
borderRadius: "50%",
|
|
2947
3067
|
width: "23px",
|
|
2948
3068
|
height: "23px",
|
|
@@ -2952,8 +3072,8 @@ function Dot({ active, completed, incomplete, stage, }) {
|
|
|
2952
3072
|
} }, completed ? (h("div", { style: { top: "-10.5%", left: "23.5%", position: "relative" } },
|
|
2953
3073
|
h(CheckMark, null))) : (h("div", { style: {
|
|
2954
3074
|
color: active
|
|
2955
|
-
? "var(--
|
|
2956
|
-
: "var(--
|
|
3075
|
+
? "var(--sqm-success-color-border)"
|
|
3076
|
+
: "var(--sqm-text-subdued)",
|
|
2957
3077
|
width: "23px",
|
|
2958
3078
|
lineHeight: "24px",
|
|
2959
3079
|
textAlign: "center",
|
|
@@ -2967,8 +3087,8 @@ function ProgressLine({ incomplete = false, active = false, invisible = false, }
|
|
|
2967
3087
|
height: "4px",
|
|
2968
3088
|
borderRadius: "4px",
|
|
2969
3089
|
background: incomplete || active
|
|
2970
|
-
? "var(--
|
|
2971
|
-
: "var(--
|
|
3090
|
+
? "var(--sqm-border-color)"
|
|
3091
|
+
: "var(--sqm-success-color-icon)",
|
|
2972
3092
|
position: "relative",
|
|
2973
3093
|
bottom: "0",
|
|
2974
3094
|
left: "0",
|
|
@@ -2991,7 +3111,7 @@ function ProgressBar({ stageCount, currentStage, }) {
|
|
|
2991
3111
|
return (h("div", { style: { display: "flex", columnGap: "-2px" } }, Array.from(Array(stageCount).keys()).map((stage) => (h(Progress, { active: currentStage === stage, completed: currentStage > stage, incomplete: currentStage < stage, stage: stage })))));
|
|
2992
3112
|
}
|
|
2993
3113
|
|
|
2994
|
-
const style$
|
|
3114
|
+
const style$8 = {
|
|
2995
3115
|
HostBlock: HostBlock,
|
|
2996
3116
|
Container: {
|
|
2997
3117
|
minWidth: "300px",
|
|
@@ -3005,21 +3125,25 @@ const style$9 = {
|
|
|
3005
3125
|
margin: "0 auto",
|
|
3006
3126
|
},
|
|
3007
3127
|
Select: {
|
|
3128
|
+
"&::part(base)": {
|
|
3129
|
+
borderRadius: "var(--sqm-input-border-radius)",
|
|
3130
|
+
},
|
|
3008
3131
|
"&::part(label)": {
|
|
3009
|
-
|
|
3132
|
+
color: "var(--sqm-input-label-color)",
|
|
3010
3133
|
},
|
|
3011
3134
|
"&::part(menu)": {
|
|
3012
3135
|
maxHeight: "450px",
|
|
3013
3136
|
},
|
|
3014
3137
|
"& sl-menu-item::part(checked-icon)": {
|
|
3015
3138
|
top: "8px",
|
|
3139
|
+
color: "var(--sqm-text)",
|
|
3016
3140
|
},
|
|
3017
3141
|
"& sl-menu-item::part(base)": {
|
|
3018
3142
|
flexDirection: "column",
|
|
3019
3143
|
},
|
|
3020
3144
|
"& sl-menu-item::part(base):focus": {
|
|
3021
|
-
background: "
|
|
3022
|
-
color: "var(--
|
|
3145
|
+
background: "var(--sqm-accent-color-background)",
|
|
3146
|
+
color: "var(--sqm-text)",
|
|
3023
3147
|
},
|
|
3024
3148
|
},
|
|
3025
3149
|
ProgressBar: {
|
|
@@ -3039,7 +3163,7 @@ const style$9 = {
|
|
|
3039
3163
|
flex: "1 1 0",
|
|
3040
3164
|
},
|
|
3041
3165
|
"& .text.subdued": {
|
|
3042
|
-
color: "var(--
|
|
3166
|
+
color: "var(--sqm-text-subdued)",
|
|
3043
3167
|
},
|
|
3044
3168
|
},
|
|
3045
3169
|
},
|
|
@@ -3054,6 +3178,9 @@ const style$9 = {
|
|
|
3054
3178
|
userSelect: "none",
|
|
3055
3179
|
height: "120px",
|
|
3056
3180
|
"&::part(base)": {
|
|
3181
|
+
background: "var(--sqm-portal-background)",
|
|
3182
|
+
border: "var(--sqm-border-thickness) solid var(--sqm-border-color)",
|
|
3183
|
+
borderRadius: "var(--sqm-border-radius-normal)",
|
|
3057
3184
|
boxShadow: "none",
|
|
3058
3185
|
width: "100%",
|
|
3059
3186
|
},
|
|
@@ -3062,10 +3189,11 @@ const style$9 = {
|
|
|
3062
3189
|
padding: 0,
|
|
3063
3190
|
},
|
|
3064
3191
|
"& .selected": {
|
|
3192
|
+
borderRadius: "var(--sqm-border-radius-normal)",
|
|
3065
3193
|
position: "relative",
|
|
3066
3194
|
top: "-2%",
|
|
3067
3195
|
left: "100%",
|
|
3068
|
-
color: "var(--
|
|
3196
|
+
color: "var(--sqm-primary-color)",
|
|
3069
3197
|
margin: "-9px",
|
|
3070
3198
|
},
|
|
3071
3199
|
},
|
|
@@ -3097,7 +3225,7 @@ const style$9 = {
|
|
|
3097
3225
|
fontSize: "var(--sl-font-size-medium)",
|
|
3098
3226
|
lineHeight: "var(--sl-line-height-dense)",
|
|
3099
3227
|
fontWeight: "600",
|
|
3100
|
-
color: "var(--
|
|
3228
|
+
color: "var(--sqm-text)",
|
|
3101
3229
|
display: "-webkit-box",
|
|
3102
3230
|
"-webkit-line-clamp": "1",
|
|
3103
3231
|
"-webkit-box-orient": "vertical",
|
|
@@ -3107,7 +3235,7 @@ const style$9 = {
|
|
|
3107
3235
|
fontSize: "var(--sl-font-size-small)",
|
|
3108
3236
|
lineHeight: "var(--sl-line-height-dense)",
|
|
3109
3237
|
marginTop: "var(--sl-spacing-x-small)",
|
|
3110
|
-
color: "var(--
|
|
3238
|
+
color: "var(--sqm-text-subdued)",
|
|
3111
3239
|
display: "-webkit-box",
|
|
3112
3240
|
"-webkit-line-clamp": "1",
|
|
3113
3241
|
"-webkit-box-orient": "vertical",
|
|
@@ -3118,7 +3246,7 @@ const style$9 = {
|
|
|
3118
3246
|
lineHeight: "var(--sl-line-height-dense)",
|
|
3119
3247
|
marginTop: "var(--sl-spacing-x-small)",
|
|
3120
3248
|
fontWeight: "600",
|
|
3121
|
-
color: "var(--
|
|
3249
|
+
color: "var(--sqm-warning-color-icon)",
|
|
3122
3250
|
display: "-webkit-box",
|
|
3123
3251
|
"-webkit-line-clamp": "1",
|
|
3124
3252
|
"-webkit-box-orient": "vertical",
|
|
@@ -3153,7 +3281,6 @@ const style$9 = {
|
|
|
3153
3281
|
"& .text": {
|
|
3154
3282
|
width: "50%",
|
|
3155
3283
|
maxWidth: "400px",
|
|
3156
|
-
// minWidth: "330px",
|
|
3157
3284
|
"@media (max-width: 799px)": {
|
|
3158
3285
|
width: "auto",
|
|
3159
3286
|
margin: "auto",
|
|
@@ -3162,17 +3289,17 @@ const style$9 = {
|
|
|
3162
3289
|
"& .title": {
|
|
3163
3290
|
fontSize: "var(--sl-font-size-large)",
|
|
3164
3291
|
fontWeight: "var(--sl-font-weight-semibold)",
|
|
3165
|
-
color: "var(--
|
|
3292
|
+
color: "var(--sqm-text)",
|
|
3166
3293
|
},
|
|
3167
3294
|
"& .points": {
|
|
3168
3295
|
fontSize: "var(--sl-font-size-large)",
|
|
3169
3296
|
fontWeight: "var(--sl-font-weight-semibold)",
|
|
3170
|
-
color: "var(--
|
|
3297
|
+
color: "var(--sqm-accent-color-text)",
|
|
3171
3298
|
},
|
|
3172
3299
|
"& .description": {
|
|
3173
3300
|
fontSize: "var(--sl-font-size-medium)",
|
|
3174
3301
|
fontWeight: "var(--sl-font-weight-normal)",
|
|
3175
|
-
color: "var(--
|
|
3302
|
+
color: "var(--sqm-text-subdued)",
|
|
3176
3303
|
margin: "var(--sl-spacing-medium) 0",
|
|
3177
3304
|
lineHeight: "var(--sl-line-height-dense)",
|
|
3178
3305
|
marginTop: "var(--sl-spacing-xx-small)",
|
|
@@ -3181,14 +3308,14 @@ const style$9 = {
|
|
|
3181
3308
|
marginBottom: "var(--sl-spacing-xxx-large)",
|
|
3182
3309
|
},
|
|
3183
3310
|
"& sl-menu-item[disabled]::part(label)": {
|
|
3184
|
-
color: "var(
|
|
3311
|
+
color: "var(sqm-text-subdued)",
|
|
3185
3312
|
},
|
|
3186
3313
|
"& sl-menu-item[disabled]": {
|
|
3187
3314
|
"& .step-cost": {
|
|
3188
|
-
color: "var(
|
|
3315
|
+
color: "var(sqm-text-subdued)",
|
|
3189
3316
|
},
|
|
3190
3317
|
"& .step-value": {
|
|
3191
|
-
color: "var(
|
|
3318
|
+
color: "var(sqm-text-subdued)",
|
|
3192
3319
|
},
|
|
3193
3320
|
},
|
|
3194
3321
|
},
|
|
@@ -3196,16 +3323,16 @@ const style$9 = {
|
|
|
3196
3323
|
display: "flex",
|
|
3197
3324
|
flexDirection: "column",
|
|
3198
3325
|
"&::part(label)": {
|
|
3199
|
-
color: "var(--
|
|
3326
|
+
color: "var(--sqm-text)",
|
|
3200
3327
|
margin: "0",
|
|
3201
3328
|
},
|
|
3202
3329
|
"& .step-cost": {
|
|
3203
|
-
color: "var(--
|
|
3330
|
+
color: "var(--sqm-text-subdued)",
|
|
3204
3331
|
marginBottom: "var(--sl-spacing-x-small)",
|
|
3205
3332
|
},
|
|
3206
3333
|
"& .step-unavailable": {
|
|
3207
3334
|
fontSize: "var(--sl-font-size-small)",
|
|
3208
|
-
color: "var(--
|
|
3335
|
+
color: "var(--sqm-warning-color-text)",
|
|
3209
3336
|
margin: "0",
|
|
3210
3337
|
},
|
|
3211
3338
|
},
|
|
@@ -3214,10 +3341,10 @@ const style$9 = {
|
|
|
3214
3341
|
"& .title": {
|
|
3215
3342
|
fontSize: "var(--sl-font-size-large)",
|
|
3216
3343
|
fontWeight: "var(--sl-font-weight-semibold)",
|
|
3217
|
-
color: "var(--
|
|
3344
|
+
color: "var(--sqm-text)",
|
|
3218
3345
|
},
|
|
3219
3346
|
"& .description": {
|
|
3220
|
-
color: "var(--
|
|
3347
|
+
color: "var(--sqm-text-subued)",
|
|
3221
3348
|
maxWidth: "350px",
|
|
3222
3349
|
margin: "0 auto",
|
|
3223
3350
|
lineHeight: "var(--sl-line-height-dense)",
|
|
@@ -3228,7 +3355,7 @@ const style$9 = {
|
|
|
3228
3355
|
maxWidth: "350px",
|
|
3229
3356
|
margin: "-30px auto var(--sl-spacing-xxx-large) auto",
|
|
3230
3357
|
textAlign: "left",
|
|
3231
|
-
color: "var(--
|
|
3358
|
+
color: "var(--sqm-text-subdued)",
|
|
3232
3359
|
},
|
|
3233
3360
|
},
|
|
3234
3361
|
Grid: {
|
|
@@ -3270,10 +3397,9 @@ const style$9 = {
|
|
|
3270
3397
|
},
|
|
3271
3398
|
"& .field": {
|
|
3272
3399
|
width: "30%",
|
|
3273
|
-
textTransform: "uppercase",
|
|
3274
3400
|
fontSize: "var(--sl-font-size-medium)",
|
|
3275
3401
|
fontWeight: "var(--sl-font-weight-normal)",
|
|
3276
|
-
color: "var(--
|
|
3402
|
+
color: "var(--sqm-text-subdued)",
|
|
3277
3403
|
textAlign: "left",
|
|
3278
3404
|
paddingRight: "var(--sl-spacing-xxx-large)",
|
|
3279
3405
|
"@media (max-width: 499px)": {
|
|
@@ -3287,7 +3413,7 @@ const style$9 = {
|
|
|
3287
3413
|
fontWeight: "var(--sl-font-weight-semibold)",
|
|
3288
3414
|
},
|
|
3289
3415
|
"& .top-border": {
|
|
3290
|
-
borderTop: "
|
|
3416
|
+
borderTop: "var(--sqm-border-thickness) solid var(--sqm-border-color)",
|
|
3291
3417
|
},
|
|
3292
3418
|
"& .image": {
|
|
3293
3419
|
width: "200px",
|
|
@@ -3303,10 +3429,6 @@ const style$9 = {
|
|
|
3303
3429
|
"& .cancel": {
|
|
3304
3430
|
marginLeft: "auto",
|
|
3305
3431
|
marginRight: "var(--sl-spacing-medium)",
|
|
3306
|
-
"&::part(base)": {
|
|
3307
|
-
fontWeight: "var(--sl-font-weight-normal)",
|
|
3308
|
-
color: "var(--sl-color-neutral-1000)",
|
|
3309
|
-
},
|
|
3310
3432
|
"@media (max-width: 499px)": {
|
|
3311
3433
|
width: "100%",
|
|
3312
3434
|
marginRight: "0",
|
|
@@ -3314,12 +3436,6 @@ const style$9 = {
|
|
|
3314
3436
|
},
|
|
3315
3437
|
},
|
|
3316
3438
|
"& .continue": {
|
|
3317
|
-
"&::part(base)": {
|
|
3318
|
-
background: "var(--sl-color-primary-500)",
|
|
3319
|
-
borderColor: "var(--sl-color-primary-500)",
|
|
3320
|
-
fontWeight: "var(--sl-font-weight-normal)",
|
|
3321
|
-
color: "var(--sl-color-neutral-0)",
|
|
3322
|
-
},
|
|
3323
3439
|
"@media (max-width: 499px)": {
|
|
3324
3440
|
width: "100%",
|
|
3325
3441
|
},
|
|
@@ -3342,8 +3458,8 @@ const style$9 = {
|
|
|
3342
3458
|
},
|
|
3343
3459
|
};
|
|
3344
3460
|
// JSS config
|
|
3345
|
-
const sheet$
|
|
3346
|
-
const styleString$
|
|
3461
|
+
const sheet$8 = createStyleSheet(style$8);
|
|
3462
|
+
const styleString$8 = sheet$8.toString();
|
|
3347
3463
|
const stageList = ["chooseReward", "chooseAmount", "confirmation", "success"];
|
|
3348
3464
|
function RewardExchangeView(props) {
|
|
3349
3465
|
const { states, data, callbacks, refs } = props;
|
|
@@ -3366,7 +3482,7 @@ function RewardExchangeView(props) {
|
|
|
3366
3482
|
sourceUnit: item.sourceUnit,
|
|
3367
3483
|
})));
|
|
3368
3484
|
}
|
|
3369
|
-
return (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$
|
|
3485
|
+
return (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) => {
|
|
3370
3486
|
var _a, _b, _c, _d, _e;
|
|
3371
3487
|
return callbacks.setExchangeState({
|
|
3372
3488
|
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,
|
|
@@ -3374,7 +3490,7 @@ function RewardExchangeView(props) {
|
|
|
3374
3490
|
});
|
|
3375
3491
|
} }, (_c = item.steps) === null || _c === void 0 ? void 0 : _c.map((step) => {
|
|
3376
3492
|
var _a, _b;
|
|
3377
|
-
return (h("sl-menu-item", { value: step, disabled: !step.available, class: sheet$
|
|
3493
|
+
return (h("sl-menu-item", { value: step, disabled: !step.available, class: sheet$8.classes.SelectItem },
|
|
3378
3494
|
step.prettyDestinationValue,
|
|
3379
3495
|
h("br", null),
|
|
3380
3496
|
h("div", { class: "step-cost", slot: "suffix" },
|
|
@@ -3393,17 +3509,18 @@ function RewardExchangeView(props) {
|
|
|
3393
3509
|
var _a;
|
|
3394
3510
|
return [
|
|
3395
3511
|
h("div", { part: "choose-reward-container" },
|
|
3396
|
-
h("div", { class: sheet$
|
|
3397
|
-
states.loading || states.queryError ? (loading()) : (h("div", { class: sheet$
|
|
3512
|
+
h("div", { class: sheet$8.classes.Title }, states.content.text.rewardTitle),
|
|
3513
|
+
states.loading || states.queryError ? (loading()) : (h("div", { class: sheet$8.classes.Grid }, (_a = data.exchangeList) === null || _a === void 0 ? void 0 : _a.map((item) => {
|
|
3398
3514
|
var _a, _b, _c, _d, _e;
|
|
3399
3515
|
const style = {
|
|
3400
3516
|
boxShadow: item.key === (selectedItem === null || selectedItem === void 0 ? void 0 : selectedItem.key)
|
|
3401
|
-
? "0 0 0 2px var(--
|
|
3517
|
+
? "0 0 0 2px var(--sqm-primary-color)"
|
|
3402
3518
|
: "none",
|
|
3403
|
-
borderRadius: "
|
|
3519
|
+
borderRadius: "var(--sqm-border-radius-normal)",
|
|
3520
|
+
borderColor: "none",
|
|
3404
3521
|
};
|
|
3405
3522
|
return (h("div", { key: item.key, style: style },
|
|
3406
|
-
h("sl-card", { exportparts: "base: exchange-card-container", class: sheet$
|
|
3523
|
+
h("sl-card", { exportparts: "base: exchange-card-container", class: sheet$8.classes.Card, style: {
|
|
3407
3524
|
cursor: item.unavailableReasonCode
|
|
3408
3525
|
? "not-allowed"
|
|
3409
3526
|
: "pointer",
|
|
@@ -3420,14 +3537,14 @@ function RewardExchangeView(props) {
|
|
|
3420
3537
|
? "rgba(0, 0, 0, 0.05)"
|
|
3421
3538
|
: "rgba(0, 0, 0, 0)",
|
|
3422
3539
|
} },
|
|
3423
|
-
h("div", { class: sheet$
|
|
3540
|
+
h("div", { class: sheet$8.classes.Image, style: {
|
|
3424
3541
|
opacity: item.unavailableReasonCode ? "0.5" : "1",
|
|
3425
3542
|
} },
|
|
3426
3543
|
h("img", { class: item.unavailableReasonCode
|
|
3427
3544
|
? "image subdued"
|
|
3428
3545
|
: "image", src: (item === null || item === void 0 ? void 0 : item.imageUrl) ||
|
|
3429
3546
|
getAssetPath("./assets/Reward-image.png") })),
|
|
3430
|
-
h("div", { class: sheet$
|
|
3547
|
+
h("div", { class: sheet$8.classes.TextArea, style: {
|
|
3431
3548
|
opacity: item.unavailableReasonCode ? "0.5" : "1",
|
|
3432
3549
|
} },
|
|
3433
3550
|
h("div", { class: "title", style: {
|
|
@@ -3460,8 +3577,8 @@ function RewardExchangeView(props) {
|
|
|
3460
3577
|
item.prettySourceMinValue,
|
|
3461
3578
|
}))))))));
|
|
3462
3579
|
}))),
|
|
3463
|
-
h("div", { class: sheet$
|
|
3464
|
-
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))),
|
|
3580
|
+
h("div", { class: sheet$8.classes.Button },
|
|
3581
|
+
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))),
|
|
3465
3582
|
];
|
|
3466
3583
|
}
|
|
3467
3584
|
function chooseAmount() {
|
|
@@ -3471,7 +3588,7 @@ function RewardExchangeView(props) {
|
|
|
3471
3588
|
? false
|
|
3472
3589
|
: input && !states.amount;
|
|
3473
3590
|
return (h("div", null,
|
|
3474
|
-
h("div", { class: sheet$
|
|
3591
|
+
h("div", { class: sheet$8.classes.ChooseAmount, part: "choose-amount-container" },
|
|
3475
3592
|
h("div", { class: "wrapper" },
|
|
3476
3593
|
h("img", { class: "image", src: (selectedItem === null || selectedItem === void 0 ? void 0 : selectedItem.imageUrl) ||
|
|
3477
3594
|
getAssetPath("./assets/Reward-image.png") }),
|
|
@@ -3480,20 +3597,20 @@ function RewardExchangeView(props) {
|
|
|
3480
3597
|
((_c = states.selectedItem) === null || _c === void 0 ? void 0 : _c.ruleType) === "FIXED_GLOBAL_REWARD" ? (h("div", { class: "points" }, input)) : (h("div", { class: "description" }, selectedItem === null || selectedItem === void 0 ? void 0 : selectedItem.description)),
|
|
3481
3598
|
((_d = states.selectedItem) === null || _d === void 0 ? void 0 : _d.ruleType) === "FIXED_GLOBAL_REWARD" ? (h("div", { class: "description" }, selectedItem === null || selectedItem === void 0 ? void 0 : selectedItem.description)) : (h("div", null, input)),
|
|
3482
3599
|
h("div", { class: "space" }))),
|
|
3483
|
-
h("div", { class: sheet$
|
|
3484
|
-
h("sl-button", { exportparts: "base: secondarybutton-base", class: "cancel", size: "large", type: "
|
|
3485
|
-
h("sl-button", { exportparts: "base: primarybutton-base", class: "continue", size: "large", onClick: () => callbacks.setStage("confirmation"), disabled: isDisabled }, states.content.text.continueToConfirmationText)))));
|
|
3600
|
+
h("div", { class: sheet$8.classes.Button },
|
|
3601
|
+
h("sl-button", { exportparts: "base: secondarybutton-base", class: "cancel", size: "large", type: "secondary", onClick: () => callbacks.resetState() }, states.content.text.cancelText),
|
|
3602
|
+
h("sl-button", { exportparts: "base: primarybutton-base", class: "continue", size: "large", type: "primary", onClick: () => callbacks.setStage("confirmation"), disabled: isDisabled }, states.content.text.continueToConfirmationText)))));
|
|
3486
3603
|
}
|
|
3487
3604
|
function confirmation() {
|
|
3488
|
-
const cost = (selectedStep === null || selectedStep === void 0 ? void 0 : selectedStep.prettySourceValue) || selectedItem.prettySourceValue;
|
|
3605
|
+
const cost = (selectedStep === null || selectedStep === void 0 ? void 0 : selectedStep.prettySourceValue) || (selectedItem === null || selectedItem === void 0 ? void 0 : selectedItem.prettySourceValue);
|
|
3489
3606
|
const amount = selectedStep === null || selectedStep === void 0 ? void 0 : selectedStep.prettyDestinationValue;
|
|
3490
3607
|
return (h("div", null,
|
|
3491
|
-
h("div", { class: sheet$
|
|
3492
|
-
h("div", { class: sheet$
|
|
3608
|
+
h("div", { class: sheet$8.classes.Confirmation, part: "confirmation-container" },
|
|
3609
|
+
h("div", { class: sheet$8.classes.Title }, states.content.text.redeemTitle),
|
|
3493
3610
|
h("div", { class: "wrapper" },
|
|
3494
3611
|
h("div", { class: "field" }, states.content.text.rewardNameTitle),
|
|
3495
3612
|
h("div", { class: "reward-item-container" },
|
|
3496
|
-
h("div", { class: "reward-title" }, selectedItem.name),
|
|
3613
|
+
h("div", { class: "reward-title" }, selectedItem === null || selectedItem === void 0 ? void 0 : selectedItem.name),
|
|
3497
3614
|
h("img", { class: "image", src: (selectedItem === null || selectedItem === void 0 ? void 0 : selectedItem.imageUrl) ||
|
|
3498
3615
|
getAssetPath("./assets/Reward-image.png") }))),
|
|
3499
3616
|
h("div", { class: "wrapper padding" },
|
|
@@ -3504,13 +3621,13 @@ function RewardExchangeView(props) {
|
|
|
3504
3621
|
h("div", { class: "wrapper top-border padding" },
|
|
3505
3622
|
h("div", { class: "field" }, states.content.text.costTitle),
|
|
3506
3623
|
h("div", { class: "value" }, cost)),
|
|
3507
|
-
h("div", { class: sheet$
|
|
3508
|
-
h("sl-button", { class: "cancel", type: "
|
|
3509
|
-
h("sl-button", { class: "continue", size: "large", loading: states.loading, onClick: callbacks.exchangeReward }, states.content.text.redeemText)))));
|
|
3624
|
+
h("div", { class: sheet$8.classes.Button },
|
|
3625
|
+
h("sl-button", { class: "cancel", type: "secondary", size: "large", onClick: () => callbacks.setStage("chooseAmount") }, states.content.text.backText),
|
|
3626
|
+
h("sl-button", { class: "continue", size: "large", type: "primary", loading: states.loading, onClick: callbacks.exchangeReward }, states.content.text.redeemText)))));
|
|
3510
3627
|
}
|
|
3511
3628
|
function success() {
|
|
3512
|
-
var _a, _b, _c, _d, _e, _f;
|
|
3513
|
-
return (h("div", { class: sheet$
|
|
3629
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
3630
|
+
return (h("div", { class: sheet$8.classes.Success, part: "success-container" },
|
|
3514
3631
|
h(Gift$1, null),
|
|
3515
3632
|
h(Confetti, null),
|
|
3516
3633
|
h("div", { class: "title" }, (_a = states.content.text) === null || _a === void 0 ? void 0 : _a.rewardRedeemedText),
|
|
@@ -3518,14 +3635,13 @@ function RewardExchangeView(props) {
|
|
|
3518
3635
|
id: "successMessage",
|
|
3519
3636
|
defaultMessage: states.content.text.redemptionSuccessText,
|
|
3520
3637
|
}, {
|
|
3521
|
-
sourceValue: (_b = states.selectedItem.prettySourceValue) !== null &&
|
|
3522
|
-
destinationValue: ((
|
|
3523
|
-
states.selectedItem.globalRewardKey,
|
|
3638
|
+
sourceValue: (_c = (_b = states.selectedItem) === null || _b === void 0 ? void 0 : _b.prettySourceValue) !== null && _c !== void 0 ? _c : (_d = states.selectedStep) === null || _d === void 0 ? void 0 : _d.prettySourceValue,
|
|
3639
|
+
destinationValue: ((_e = states.selectedStep) === null || _e === void 0 ? void 0 : _e.prettyDestinationValue) || ((_f = states.selectedItem) === null || _f === void 0 ? void 0 : _f.name) || ((_g = states.selectedItem) === null || _g === void 0 ? void 0 : _g.globalRewardKey),
|
|
3524
3640
|
})),
|
|
3525
3641
|
(data === null || data === void 0 ? void 0 : data.fuelTankCode) && (h("div", { class: "promo" },
|
|
3526
3642
|
states.content.text.promoCode,
|
|
3527
|
-
h(CopyTextView, { copyString: data.fuelTankCode, tooltiptext: (
|
|
3528
|
-
h("div", { class: sheet$
|
|
3643
|
+
h(CopyTextView, { copyString: data.fuelTankCode, tooltiptext: (_h = states === null || states === void 0 ? void 0 : states.content) === null || _h === void 0 ? void 0 : _h.text.tooltipText, open: states.open, onClick: callbacks.copyFuelTankCode }))),
|
|
3644
|
+
h("div", { class: sheet$8.classes.Button },
|
|
3529
3645
|
h("sl-button", { class: "continue center", type: "primary", size: "large", onClick: () => callbacks.resetState(true) }, states.content.text.doneText))));
|
|
3530
3646
|
}
|
|
3531
3647
|
const stages = {
|
|
@@ -3537,7 +3653,7 @@ function RewardExchangeView(props) {
|
|
|
3537
3653
|
const currentStage = stages[states.redeemStage];
|
|
3538
3654
|
function stageMap() {
|
|
3539
3655
|
const stageNumber = stageList.indexOf(states.redeemStage);
|
|
3540
|
-
return (h("div", { class: sheet$
|
|
3656
|
+
return (h("div", { class: sheet$8.classes.ProgressBar },
|
|
3541
3657
|
h("div", { class: "text-area" }, Object.keys(stageProgressList).map((stage) => {
|
|
3542
3658
|
if (stageList.indexOf(stage) <= stageNumber) {
|
|
3543
3659
|
return h("span", { class: "text" }, stageProgressList[stage]);
|
|
@@ -3549,16 +3665,16 @@ function RewardExchangeView(props) {
|
|
|
3549
3665
|
h(ProgressBar, { stageCount: 3, currentStage: stageNumber })));
|
|
3550
3666
|
}
|
|
3551
3667
|
function loading() {
|
|
3552
|
-
return (h("div", { class: sheet$
|
|
3668
|
+
return (h("div", { class: sheet$8.classes.Grid, part: "loading-container" }, [...Array(states.content.text.skeletonCardNum)].map(() => {
|
|
3553
3669
|
return (h("div", null,
|
|
3554
|
-
h("sl-card", { class: sheet$
|
|
3555
|
-
h("div", { class: sheet$
|
|
3670
|
+
h("sl-card", { class: sheet$8.classes.Card },
|
|
3671
|
+
h("div", { class: sheet$8.classes.CardLayout },
|
|
3556
3672
|
h("div", null,
|
|
3557
3673
|
h("sl-skeleton", { style: {
|
|
3558
3674
|
width: "100px",
|
|
3559
3675
|
height: "100px",
|
|
3560
3676
|
margin: "9px",
|
|
3561
|
-
"--border-radius": "
|
|
3677
|
+
"--border-radius": "var(--sqm-border-radius-normal)",
|
|
3562
3678
|
} })),
|
|
3563
3679
|
h("div", { style: {
|
|
3564
3680
|
margin: "var(--sl-spacing-small) var(--sl-spacing-small) 0 0",
|
|
@@ -3584,12 +3700,12 @@ function RewardExchangeView(props) {
|
|
|
3584
3700
|
if (!(refs === null || refs === void 0 ? void 0 : refs.canvasRef))
|
|
3585
3701
|
return;
|
|
3586
3702
|
refs.canvasRef.current = canvas;
|
|
3587
|
-
}, id: "my-canvas", class: sheet$
|
|
3703
|
+
}, id: "my-canvas", class: sheet$8.classes.Confetti }));
|
|
3588
3704
|
}
|
|
3589
3705
|
if (states.noExchangeOptions)
|
|
3590
3706
|
return states.content.text.empty;
|
|
3591
|
-
return (h("div", { class: sheet$
|
|
3592
|
-
h("style", { type: "text/css" }, styleString$
|
|
3707
|
+
return (h("div", { class: sheet$8.classes.Container, part: "sqm-base" },
|
|
3708
|
+
h("style", { type: "text/css" }, styleString$8),
|
|
3593
3709
|
h("div", null,
|
|
3594
3710
|
stageMap(),
|
|
3595
3711
|
states.exchangeError && errorMessage(),
|
|
@@ -3650,15 +3766,14 @@ const baseResponse = (data, stage = "chooseReward", selectedItem = null, selecte
|
|
|
3650
3766
|
setStage: null,
|
|
3651
3767
|
setExchangeState: null,
|
|
3652
3768
|
copyFuelTankCode: null,
|
|
3653
|
-
refs: null,
|
|
3654
3769
|
},
|
|
3655
3770
|
refs: null,
|
|
3656
3771
|
});
|
|
3657
3772
|
const baseReward = {
|
|
3658
|
-
key: "",
|
|
3659
|
-
name: "",
|
|
3773
|
+
key: "reward",
|
|
3774
|
+
name: "Demo Reward",
|
|
3660
3775
|
description: "Description of reward. Lorem ipsum dolor sit amet, consectetur adipiscing. Id nec semper sapien dignissim rhoncus nunc.",
|
|
3661
|
-
imageUrl: "",
|
|
3776
|
+
imageUrl: "https://res.cloudinary.com/saasquatch/image/upload/v1643653103/squatch-assets/default_rewards_1.png",
|
|
3662
3777
|
available: true,
|
|
3663
3778
|
unavailableReasonCode: null,
|
|
3664
3779
|
ruleType: "FIXED_GLOBAL_REWARD",
|
|
@@ -3675,7 +3790,34 @@ const baseReward = {
|
|
|
3675
3790
|
prettyDestinationMaxValue: null,
|
|
3676
3791
|
globalRewardKey: "",
|
|
3677
3792
|
destinationUnit: null,
|
|
3678
|
-
steps: [
|
|
3793
|
+
steps: [
|
|
3794
|
+
{
|
|
3795
|
+
prettyDestinationValue: "Reward Step 1",
|
|
3796
|
+
prettySourceValue: "50 Points",
|
|
3797
|
+
available: true,
|
|
3798
|
+
unavailableReasonCode: null,
|
|
3799
|
+
destinationValue: 10,
|
|
3800
|
+
sourceValue: 1,
|
|
3801
|
+
globalRewardKey: "reward1",
|
|
3802
|
+
rewardInput: {
|
|
3803
|
+
accountId: "zach",
|
|
3804
|
+
userId: "zach",
|
|
3805
|
+
},
|
|
3806
|
+
},
|
|
3807
|
+
{
|
|
3808
|
+
prettyDestinationValue: "Reward Step 2",
|
|
3809
|
+
prettySourceValue: "100 Points",
|
|
3810
|
+
available: false,
|
|
3811
|
+
unavailableReasonCode: "Not enough points",
|
|
3812
|
+
destinationValue: 10,
|
|
3813
|
+
sourceValue: 1,
|
|
3814
|
+
globalRewardKey: "reward1",
|
|
3815
|
+
rewardInput: {
|
|
3816
|
+
accountId: "zach",
|
|
3817
|
+
userId: "zach",
|
|
3818
|
+
},
|
|
3819
|
+
},
|
|
3820
|
+
],
|
|
3679
3821
|
};
|
|
3680
3822
|
const notEnoughPoints = {
|
|
3681
3823
|
available: false,
|
|
@@ -3796,7 +3938,7 @@ const rewardExchange = {
|
|
|
3796
3938
|
...baseResponse(data),
|
|
3797
3939
|
};
|
|
3798
3940
|
const demoRewardExchange = {
|
|
3799
|
-
...baseResponse(demoData),
|
|
3941
|
+
...baseResponse(demoData, "chooseReward", baseReward),
|
|
3800
3942
|
};
|
|
3801
3943
|
const rewardExchangeLongText = {
|
|
3802
3944
|
...baseResponse([
|
|
@@ -3979,108 +4121,164 @@ const empty = {
|
|
|
3979
4121
|
...baseResponse(null, "chooseReward", null, null, false, false, null, true),
|
|
3980
4122
|
};
|
|
3981
4123
|
|
|
3982
|
-
|
|
3983
|
-
|
|
3984
|
-
|
|
3985
|
-
|
|
3986
|
-
|
|
3987
|
-
|
|
3988
|
-
|
|
3989
|
-
|
|
3990
|
-
|
|
3991
|
-
|
|
3992
|
-
|
|
3993
|
-
|
|
3994
|
-
|
|
3995
|
-
|
|
3996
|
-
|
|
3997
|
-
display: block;
|
|
4124
|
+
const MessageLinkQuery = dist.gql `
|
|
4125
|
+
query (
|
|
4126
|
+
$programId: ID
|
|
4127
|
+
$engagementMedium: UserEngagementMedium!
|
|
4128
|
+
$shareMedium: ReferralShareMedium!
|
|
4129
|
+
) {
|
|
4130
|
+
viewer {
|
|
4131
|
+
... on User {
|
|
4132
|
+
messageLink(
|
|
4133
|
+
programId: $programId
|
|
4134
|
+
engagementMedium: $engagementMedium
|
|
4135
|
+
shareMedium: $shareMedium
|
|
4136
|
+
)
|
|
4137
|
+
shareLink(programId: $programId, engagementMedium: $engagementMedium)
|
|
4138
|
+
}
|
|
3998
4139
|
}
|
|
3999
|
-
|
|
4000
|
-
`;
|
|
4001
|
-
return (h("div", null,
|
|
4002
|
-
h("style", { type: "text/css" },
|
|
4003
|
-
styleString,
|
|
4004
|
-
vanillaStyle),
|
|
4005
|
-
h("div", { class: sheet.classes.Container, part: "sqm-base" }, children)));
|
|
4006
|
-
}
|
|
4007
|
-
|
|
4008
|
-
const style$a = {
|
|
4009
|
-
HostBlock: HostBlock,
|
|
4010
|
-
couponCodeLabel: {
|
|
4011
|
-
margin: "var(--sl-spacing-x-small) 0",
|
|
4012
|
-
color: "var(--sqm-text-subdued)",
|
|
4013
|
-
fontSize: "var(--sl-font-size-small)",
|
|
4014
|
-
},
|
|
4015
|
-
};
|
|
4016
|
-
const vanillaStyle$6 = `
|
|
4017
|
-
:host{
|
|
4018
|
-
display: block;
|
|
4019
|
-
width: 100%;
|
|
4020
4140
|
}
|
|
4021
4141
|
`;
|
|
4022
|
-
|
|
4023
|
-
const
|
|
4024
|
-
|
|
4025
|
-
|
|
4026
|
-
|
|
4027
|
-
|
|
4028
|
-
|
|
4029
|
-
|
|
4030
|
-
|
|
4031
|
-
|
|
4032
|
-
|
|
4142
|
+
function NativeShare(props, directLink, undefinedErrorText, unsupportedPlatformText) {
|
|
4143
|
+
const title = props.sharetitle || "Share title";
|
|
4144
|
+
const text = props.sharetext || "Share text";
|
|
4145
|
+
if (directLink === "undefined") {
|
|
4146
|
+
return alert(undefinedErrorText);
|
|
4147
|
+
}
|
|
4148
|
+
if (window.navigator.share) {
|
|
4149
|
+
window.navigator
|
|
4150
|
+
.share({
|
|
4151
|
+
title,
|
|
4152
|
+
text,
|
|
4153
|
+
url: directLink,
|
|
4154
|
+
})
|
|
4155
|
+
.catch((error) => console.error("Error on web share", error));
|
|
4156
|
+
}
|
|
4157
|
+
else {
|
|
4158
|
+
alert(unsupportedPlatformText);
|
|
4159
|
+
}
|
|
4033
4160
|
}
|
|
4034
|
-
|
|
4035
|
-
|
|
4036
|
-
|
|
4037
|
-
|
|
4038
|
-
|
|
4039
|
-
|
|
4040
|
-
|
|
4041
|
-
|
|
4042
|
-
|
|
4043
|
-
0.56,
|
|
4044
|
-
0.46,
|
|
4045
|
-
0.39,
|
|
4046
|
-
0.32,
|
|
4047
|
-
0.25,
|
|
4048
|
-
0.18,
|
|
4049
|
-
0.15,
|
|
4050
|
-
];
|
|
4051
|
-
// https://github.com/ricokahler/color2k/blob/main/src/parseToRgba.ts
|
|
4052
|
-
const hslaRegex = /^hsla?\(\s*([\d.]+)\s*,\s*([\d.]+)%\s*,\s*([\d.]+)%(?:\s*,\s*([\d.]+))?\s*\)$/i;
|
|
4053
|
-
function niceParseToHsla(color) {
|
|
4054
|
-
const normalizedColor = color.trim();
|
|
4055
|
-
const hslaMatch = hslaRegex.exec(normalizedColor);
|
|
4056
|
-
if (hslaMatch) {
|
|
4057
|
-
const [h, s, l, a] = Array.from(hslaMatch).slice(1).map(parseFloat);
|
|
4058
|
-
if (t(0, 100, s) !== s)
|
|
4059
|
-
throw new n(color);
|
|
4060
|
-
if (t(0, 100, l) !== l)
|
|
4061
|
-
throw new n(color);
|
|
4062
|
-
return [h, s / 100, l, a || 1];
|
|
4161
|
+
function FacebookShare(directLink, messageLink, errorText) {
|
|
4162
|
+
if (messageLink === "undefined" || directLink === "undefined") {
|
|
4163
|
+
return alert(errorText);
|
|
4164
|
+
}
|
|
4165
|
+
if (typeof SquatchAndroid.shareOnFacebook !== "undefined") {
|
|
4166
|
+
return SquatchAndroid.shareOnFacebook(directLink, messageLink);
|
|
4167
|
+
}
|
|
4168
|
+
else {
|
|
4169
|
+
return GenericShare(messageLink, errorText);
|
|
4063
4170
|
}
|
|
4064
|
-
// Warning -- converts to RGB first, so is lossy
|
|
4065
|
-
return p(color);
|
|
4066
4171
|
}
|
|
4067
|
-
function
|
|
4068
|
-
|
|
4069
|
-
return lScale
|
|
4070
|
-
.map((l) => z(h, s, l, a))
|
|
4071
|
-
.map((color, index) => {
|
|
4072
|
-
return `--sl-color-${name}-${colorScale[index]}: ${color};\n`;
|
|
4073
|
-
});
|
|
4172
|
+
function GenericShare(messageLink, errorText) {
|
|
4173
|
+
return messageLink ? (window.location.href = messageLink) : alert(errorText);
|
|
4074
4174
|
}
|
|
4075
|
-
|
|
4076
|
-
|
|
4077
|
-
|
|
4078
|
-
|
|
4079
|
-
|
|
4080
|
-
|
|
4081
|
-
|
|
4082
|
-
|
|
4083
|
-
|
|
4175
|
+
function useShareButton(props) {
|
|
4176
|
+
var _a, _b, _c, _d;
|
|
4177
|
+
const { sharetitle, sharetext, medium } = props;
|
|
4178
|
+
const programId = props.programId ? props.programId : H();
|
|
4179
|
+
const user = J();
|
|
4180
|
+
const engagementMedium = B();
|
|
4181
|
+
const variables = {
|
|
4182
|
+
engagementMedium,
|
|
4183
|
+
programId: programId,
|
|
4184
|
+
shareMedium: medium.toUpperCase(),
|
|
4185
|
+
};
|
|
4186
|
+
const contextData = Fn(REFERRAL_CODES_NAMESPACE);
|
|
4187
|
+
const overrideData = contextData === null || contextData === void 0 ? void 0 : contextData[medium];
|
|
4188
|
+
// only queries if a programId is available
|
|
4189
|
+
const res = wn(MessageLinkQuery, variables, !(user === null || user === void 0 ? void 0 : user.jwt) || !programId || overrideData !== undefined);
|
|
4190
|
+
const [setCopied, copiedRes] = $e(SET_CODE_COPIED);
|
|
4191
|
+
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);
|
|
4192
|
+
const environment = getEnvironmentSDK();
|
|
4193
|
+
const hide = (medium.toLocaleUpperCase() === "SMS" &&
|
|
4194
|
+
window.orientation === undefined) ||
|
|
4195
|
+
(medium.toLocaleUpperCase() === "DIRECT" && !window.navigator.share);
|
|
4196
|
+
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);
|
|
4197
|
+
async function onClick() {
|
|
4198
|
+
if (overrideData) {
|
|
4199
|
+
await setCopied({ referralCode: contextData.referralCode });
|
|
4200
|
+
contextData.refresh();
|
|
4201
|
+
}
|
|
4202
|
+
if (medium.toLocaleUpperCase() === "FACEBOOK" &&
|
|
4203
|
+
environment.type === "SquatchAndroid") {
|
|
4204
|
+
FacebookShare(directLink, messageLink, props.errorText);
|
|
4205
|
+
}
|
|
4206
|
+
else if (medium.toLocaleUpperCase() === "DIRECT") {
|
|
4207
|
+
NativeShare({ sharetitle, sharetext }, directLink, props.errorText, props.unsupportedPlatformText);
|
|
4208
|
+
}
|
|
4209
|
+
}
|
|
4210
|
+
const isPlainLink = !(medium.toLocaleUpperCase() === "FACEBOOK" &&
|
|
4211
|
+
environment.type === "SquatchAndroid") &&
|
|
4212
|
+
medium.toLocaleUpperCase() !== "DIRECT" &&
|
|
4213
|
+
messageLink;
|
|
4214
|
+
const userAgent = window.navigator.userAgent.toLowerCase(), safari = /safari/.test(userAgent), ios = /iphone|ipod|ipad/.test(userAgent);
|
|
4215
|
+
const openInSameTab = ios && !safari;
|
|
4216
|
+
return {
|
|
4217
|
+
...props,
|
|
4218
|
+
loading: res.loading && !(overrideData === null || overrideData === void 0 ? void 0 : overrideData.messageLink),
|
|
4219
|
+
messageLink,
|
|
4220
|
+
isPlainLink,
|
|
4221
|
+
onClick,
|
|
4222
|
+
openInSameTab,
|
|
4223
|
+
hide,
|
|
4224
|
+
};
|
|
4225
|
+
}
|
|
4226
|
+
|
|
4227
|
+
const MessageLinkQuery$1 = dist.gql `
|
|
4228
|
+
query ($programId: ID, $engagementMedium: UserEngagementMedium!) {
|
|
4229
|
+
user: viewer {
|
|
4230
|
+
... on User {
|
|
4231
|
+
shareLink(
|
|
4232
|
+
programId: $programId
|
|
4233
|
+
engagementMedium: $engagementMedium
|
|
4234
|
+
shareMedium: DIRECT
|
|
4235
|
+
)
|
|
4236
|
+
}
|
|
4237
|
+
}
|
|
4238
|
+
}
|
|
4239
|
+
`;
|
|
4240
|
+
const WIDGET_ENGAGEMENT_EVENT = dist.gql `
|
|
4241
|
+
mutation loadEvent($eventMeta: UserAnalyticsEvent!) {
|
|
4242
|
+
createUserAnalyticsEvent(eventMeta: $eventMeta)
|
|
4243
|
+
}
|
|
4244
|
+
`;
|
|
4245
|
+
function useShareLink(props) {
|
|
4246
|
+
var _a, _b;
|
|
4247
|
+
const { programId = H() } = props;
|
|
4248
|
+
const user = J();
|
|
4249
|
+
const engagementMedium = B();
|
|
4250
|
+
const contextData = Fn(REFERRAL_CODES_NAMESPACE);
|
|
4251
|
+
const { data } = 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);
|
|
4252
|
+
const [sendLoadEvent] = $e(WIDGET_ENGAGEMENT_EVENT);
|
|
4253
|
+
const [setCopied, copiedRes] = $e(SET_CODE_COPIED);
|
|
4254
|
+
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 :
|
|
4255
|
+
// Shown during loading
|
|
4256
|
+
"...";
|
|
4257
|
+
const [open, setOpen] = useState(false);
|
|
4258
|
+
async function onClick() {
|
|
4259
|
+
if (contextData) {
|
|
4260
|
+
await setCopied({ referralCode: contextData.referralCode });
|
|
4261
|
+
contextData.refresh();
|
|
4262
|
+
}
|
|
4263
|
+
// Should well supported: https://developer.mozilla.org/en-US/docs/Web/API/Clipboard#browser_compatibility
|
|
4264
|
+
// Only if called from a user-initiated event
|
|
4265
|
+
navigator.clipboard.writeText(copyString);
|
|
4266
|
+
setOpen(true);
|
|
4267
|
+
setTimeout(() => setOpen(false), props.tooltiplifespan);
|
|
4268
|
+
sendLoadEvent({
|
|
4269
|
+
eventMeta: {
|
|
4270
|
+
programId,
|
|
4271
|
+
id: user === null || user === void 0 ? void 0 : user.id,
|
|
4272
|
+
accountId: user === null || user === void 0 ? void 0 : user.accountId,
|
|
4273
|
+
type: "USER_REFERRAL_PROGRAM_ENGAGEMENT_EVENT",
|
|
4274
|
+
meta: {
|
|
4275
|
+
engagementMedium,
|
|
4276
|
+
shareMedium: "DIRECT",
|
|
4277
|
+
},
|
|
4278
|
+
},
|
|
4279
|
+
});
|
|
4280
|
+
}
|
|
4281
|
+
return { ...props, onClick, open, copyString: copyString };
|
|
4084
4282
|
}
|
|
4085
4283
|
|
|
4086
4284
|
const map = new Map();
|
|
@@ -4117,4 +4315,4 @@ const ShadowViewAddon = ({ story }, children) => {
|
|
|
4117
4315
|
h(TagName, { "stencilbook-shadow-view": randomInt })));
|
|
4118
4316
|
};
|
|
4119
4317
|
|
|
4120
|
-
export { loading as A, BigStatView as B,
|
|
4318
|
+
export { loading as A, BigStatView as B, CardFeedView as C, DropdownFieldView as D, EditProfileView as E, empty as F, rewardExchange as G, HeroView as H, InputFieldView as I, useShareButton as J, useShareLink as K, LeaderboardView as L, ProgressBarView as M, NameFieldsView as N, ProgressBar as O, PortalChangePasswordView as P, ShadowViewAddon as Q, ReferralIframeView as R, StatContainerView as S, TaskCardView as T, useBigStat as U, withShadowView as V, demoRewardExchange as W, ShareButtonView as a, PoweredByImg as b, CheckboxFieldView as c, PortalRegisterView as d, CouponCodeView as e, ChangeMarktingView as f, PortalFooterView as g, PortalForgotPasswordView as h, PortalFrameView as i, RewardExchangeView as j, rewardExchangeLongText as k, rewardExchangeSelected as l, chooseAmountFixed as m, chooseAmountFixedNoDescription as n, chooseAmountVariable as o, chooseAmountVariableNoDescription as p, chooseAmountVariableDisabled as q, rewardExchangeCustomErrorMsg as r, chooseAmountVariableUnavailable as s, confirmFixed as t, useDemoBigStat as u, confirmVariable as v, redemptionError as w, queryError as x, success as y, successVariable as z };
|