@saasquatch/mint-components 1.16.0-9 → 2.0.0-0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/ErrorView-3f91e5ab.js +11 -0
- package/dist/cjs/{GenericTableView-a9f4ba75.js → GenericTableView-a9845e80.js} +8 -8
- package/dist/cjs/IndirectTaxDetailsView-e5f70b8b.js +660 -0
- package/dist/cjs/{ShadowViewAddon-28865623.js → ShadowViewAddon-23b04c91.js} +1692 -1496
- package/dist/cjs/copy-text-view-51c8ee5d.js +122 -0
- package/dist/cjs/data-88adb95b.js +146 -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-e31dc4f5.js → global-8bba5b3a.js} +11840 -11561
- 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-7815f10f.js → mockRewardData-df37c8a3.js} +1 -1
- 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} +795 -2496
- package/dist/cjs/{sqm-base-registration-form-view-8a2c8763.js → sqm-base-registration-form-view-8847804c.js} +3 -3
- package/dist/cjs/{sqm-big-stat_43.cjs.entry.js → sqm-big-stat_46.cjs.entry.js} +1475 -382
- 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 +58 -63
- 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-lead-checkbox-field-view-34d94919.js → sqm-lead-checkbox-field-view-340acad0.js} +2 -2
- package/dist/cjs/sqm-lead-checkbox-field.cjs.entry.js +9 -9
- package/dist/cjs/{sqm-lead-input-field-view-89308aab.js → sqm-lead-input-field-view-06ed3632.js} +3 -3
- package/dist/cjs/sqm-lead-input-field.cjs.entry.js +10 -10
- package/dist/cjs/sqm-leaderboard-rank-view-6a1e63de.js +10 -0
- package/dist/cjs/sqm-leaderboard-rank.cjs.entry.js +7 -7
- 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 +97 -70
- 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-7ebb426a.js → sqm-portal-email-verification-view-5518eb0d.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-761a4d8e.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-33164798.js → sqm-portal-profile-view-615e6975.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-637a4bf4.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-fe602822.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-7b678f34.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-15dfc0b6.js → sqm-qr-code-view-4ccf89da.js} +4 -9
- package/dist/cjs/sqm-qr-code.cjs.entry.js +14 -26
- package/dist/cjs/sqm-referral-table_11.cjs.entry.js +131 -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 +85 -38
- 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 +13741 -12408
- package/dist/cjs/sqm-tab.cjs.entry.js +5 -5
- package/dist/cjs/sqm-tabs.cjs.entry.js +28 -13
- package/dist/cjs/sqm-tax-and-cash.cjs.entry.js +1313 -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/{useLeadFormState-c83d2034.js → useLeadFormState-fd0445f9.js} +7 -7
- package/dist/cjs/{usePayoutStatus-c84a7d98.js → usePayoutStatus-fe32dd1a.js} +49 -17
- package/dist/cjs/{usePortalLogin-63d896d1.js → usePortalLogin-353f776a.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-6847bc06.js → utils-0d3ac0fb.js} +4 -0
- package/dist/cjs/utils-83d125fa.js +105 -0
- package/dist/collection/collection-manifest.json +1 -1
- package/dist/collection/components/sqm-big-stat/BigStat.stories.js +13 -0
- package/dist/collection/components/sqm-big-stat/sqm-big-stat-view.js +15 -8
- package/dist/collection/components/sqm-big-stat/sqm-big-stat.js +171 -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-card-feed/sqm-card-feed.js +2 -0
- package/dist/collection/components/sqm-checkbox-field/sqm-checkbox-field-view.js +7 -0
- 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 +170 -1
- package/dist/collection/components/sqm-coupon-code/useCouponCode.js +1 -0
- package/dist/collection/components/sqm-divided-layout/sqm-divided-layout-view.js +14 -6
- package/dist/collection/components/sqm-divided-layout/sqm-divided-layout.js +62 -3
- package/dist/collection/components/sqm-edit-profile/sqm-edit-profile-view.js +1 -1
- package/dist/collection/components/sqm-empty/sqm-empty-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-header-logo/sqm-header-logo.js +1 -0
- 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 -4
- package/dist/collection/components/sqm-hero-image/sqm-hero-image-view.js +7 -4
- package/dist/collection/components/sqm-hero-image/sqm-hero-image.js +80 -0
- package/dist/collection/components/sqm-image/sqm-image.js +1 -0
- package/dist/collection/components/sqm-instant-access-registration/sqm-instant-access-registration.js +4 -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/Leaderboard.stories.js +37 -0
- package/dist/collection/components/sqm-leaderboard/sqm-leaderboard-view.js +60 -54
- package/dist/collection/components/sqm-leaderboard/sqm-leaderboard.js +202 -36
- package/dist/collection/components/sqm-leaderboard-rank/sqm-leaderboard-rank-view.js +2 -2
- package/dist/collection/components/sqm-leaderboard-rank/sqm-leaderboard-rank.css +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 +2 -1
- package/dist/collection/components/sqm-navigation-menu/sqm-navigation-menu.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 +85 -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 +2 -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 -0
- 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 +2 -1
- package/dist/collection/components/sqm-portal-logout/sqm-portal-logout.js +1 -0
- package/dist/collection/components/sqm-portal-profile/sqm-portal-profile-view.js +1 -1
- package/dist/collection/components/sqm-portal-profile/sqm-portal-profile.js +1 -0
- package/dist/collection/components/sqm-portal-protected-route/sqm-portal-protected-route.js +1 -0
- 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-view.js +1 -1
- package/dist/collection/components/sqm-program-explainer/sqm-program-explainer.js +3 -1
- package/dist/collection/components/sqm-program-explainer-step/sqm-program-explainer-step-view.js +12 -4
- package/dist/collection/components/sqm-program-explainer-step/sqm-program-explainer-step.js +78 -3
- package/dist/collection/components/sqm-program-menu/sqm-program-menu.js +1 -0
- package/dist/collection/components/sqm-qr-code/sqm-qr-code-view.js +2 -7
- package/dist/collection/components/sqm-qr-code/sqm-qr-code.js +1 -0
- package/dist/collection/components/sqm-qr-code/useQRCode.js +1 -13
- package/dist/collection/components/sqm-radio-card/sqm-radio-card-view.js +9 -2
- package/dist/collection/components/sqm-referral-card/sqm-referral-card-view.js +34 -31
- package/dist/collection/components/sqm-referral-card/sqm-referral-card.js +81 -10
- package/dist/collection/components/sqm-referral-code/ReferralCode.stories.js +3 -0
- package/dist/collection/components/sqm-referral-code/sqm-referral-code.js +170 -1
- package/dist/collection/components/sqm-referral-codes/ReferralCodes.stories.js +6 -0
- package/dist/collection/components/sqm-referral-codes/sqm-referral-codes-view.js +46 -46
- package/dist/collection/components/sqm-referral-codes/sqm-referral-codes.js +29 -1
- package/dist/collection/components/sqm-referral-table/ReferralTable.stories.js +2 -2
- package/dist/collection/components/sqm-referral-table/cells/sqm-referral-table-rewards-cell.js +52 -17
- 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/sqm-referral-table.js +4 -1
- package/dist/collection/components/sqm-referred-registration/sqm-referred-registration.js +3 -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 +48 -49
- package/dist/collection/components/sqm-reward-exchange-list/sqm-reward-exchange-list.js +83 -35
- package/dist/collection/components/sqm-rewards-table/RewardsTableCell.stories.js +1 -1
- package/dist/collection/components/sqm-rewards-table/cells/sqm-rewards-table-reward-cell.js +6 -5
- 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 +56 -7
- 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 +2 -1
- package/dist/collection/components/sqm-rewards-table/columns/sqm-rewards-table-status-column.js +8 -6
- package/dist/collection/components/sqm-rewards-table/sqm-rewards-table.js +4 -2
- package/dist/collection/components/sqm-rewards-table/useRewardsTable.js +1 -1
- package/dist/collection/components/sqm-route/sqm-route.js +1 -0
- package/dist/collection/components/sqm-router/sqm-router.js +2 -0
- package/dist/collection/components/sqm-scroll/sqm-scroll.js +23 -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 +57 -10
- package/dist/collection/components/sqm-share-code/sqm-share-code.js +170 -1
- package/dist/collection/components/sqm-share-link/ShareLink.stories.js +25 -0
- package/dist/collection/components/sqm-share-link/sqm-share-link.js +173 -3
- 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 +112 -2
- package/dist/collection/components/sqm-stencilbook/BrandSelector.js +198 -0
- package/dist/collection/components/sqm-stencilbook/Themes.js +325 -33
- package/dist/collection/components/sqm-stencilbook/sqm-stencilbook.js +81 -99
- package/dist/collection/components/sqm-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 +17 -2
- package/dist/collection/components/sqm-tabs/sqm-tabs.js +30 -2
- package/dist/collection/components/sqm-task-card/DetailsView.js +8 -2
- 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 +138 -157
- package/dist/collection/components/sqm-task-card/sqm-task-card.js +147 -4
- package/dist/collection/components/sqm-task-card/useTaskCard.js +10 -0
- package/dist/collection/components/sqm-text/Text.stories.js +12 -0
- package/dist/collection/components/sqm-text/sqm-text.js +101 -48
- 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 +52 -2
- package/dist/collection/components/sqm-timeline/Timeline.stories.js +8 -1
- package/dist/collection/components/sqm-timeline/sqm-timeline-entry-view.js +45 -45
- package/dist/collection/components/sqm-timeline/sqm-timeline-entry.js +52 -0
- package/dist/collection/components/sqm-timeline/sqm-timeline.js +3 -1
- package/dist/collection/components/sqm-titled-section/sqm-titled-section.js +2 -0
- 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/TaxForm.stories.js +13 -8
- package/dist/collection/components/tax-and-cash/{sqm-tax-and-cash/data.js → data.js} +9 -0
- package/dist/collection/components/tax-and-cash/sqm-banking-info-form/sqm-banking-info-form-view.js +23 -73
- package/dist/collection/components/tax-and-cash/sqm-banking-info-form/sqm-banking-info-form.js +11 -2
- package/dist/collection/components/tax-and-cash/sqm-banking-info-form/useBankingInfoForm.js +5 -3
- package/dist/collection/components/tax-and-cash/sqm-docusign-form/docusign-iframe/DocusignIframe.js +4 -4
- package/dist/collection/components/tax-and-cash/sqm-docusign-form/sqm-docusign-form-view.js +21 -76
- package/dist/collection/components/tax-and-cash/sqm-docusign-form/sqm-docusign-form.js +5 -5
- package/dist/collection/components/tax-and-cash/sqm-docusign-form/useDocusignForm.js +2 -2
- package/dist/collection/components/tax-and-cash/sqm-indirect-tax-form/sqm-indirect-tax-form-view.js +59 -72
- 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 +6 -4
- 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 +59 -54
- package/dist/collection/components/tax-and-cash/sqm-payout-status-alert/sqm-payout-status-alert.js +64 -13
- package/dist/collection/components/tax-and-cash/sqm-payout-status-alert/usePayoutStatus.js +44 -12
- 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 +130 -25
- 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 +51 -20
- package/dist/collection/components/tax-and-cash/sqm-tax-and-cash-dashboard/sqm-tax-and-cash-dashboard.js +113 -44
- package/dist/collection/components/tax-and-cash/sqm-tax-and-cash-dashboard/useTaxAndCashDashboard.js +23 -12
- 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 +17 -3
- package/dist/collection/components/tax-and-cash/sqm-user-info-form/sqm-user-info-form-view.js +183 -56
- 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 +7 -5
- package/dist/collection/components/views/copy-text-view.js +65 -39
- 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 +8 -8
- package/dist/collection/global/styles.js +334 -102
- package/dist/collection/global/styles.ts +434 -102
- package/dist/collection/insertfont.js +18 -0
- package/dist/collection/stories/PortalTemplates.stories.js +22 -30
- package/dist/collection/tables/GenericTableView.js +6 -6
- package/dist/collection/utils/parseStates.js +12 -0
- package/dist/collection/utils/utils.js +4 -0
- package/dist/esm/ErrorView-bbf0a042.js +9 -0
- package/dist/esm/{GenericTableView-7b9087af.js → GenericTableView-e43d310f.js} +8 -8
- package/dist/esm/IndirectTaxDetailsView-0a57b622.js +653 -0
- package/dist/esm/{ShadowViewAddon-f2176779.js → ShadowViewAddon-c0bd62f7.js} +1689 -1493
- package/dist/esm/copy-text-view-83b09456.js +120 -0
- package/dist/esm/data-807686c2.js +130 -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-be1f9992.js → global-1099f20d.js} +11864 -11586
- 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-a3cdb832.js → mockRewardData-96a2d26d.js} +1 -1
- 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} +651 -2345
- package/dist/esm/{sqm-base-registration-form-view-593d4ac3.js → sqm-base-registration-form-view-193f1721.js} +3 -3
- package/dist/esm/{sqm-big-stat_43.entry.js → sqm-big-stat_46.entry.js} +1371 -281
- 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 +55 -60
- 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-lead-checkbox-field-view-a8c1c78e.js → sqm-lead-checkbox-field-view-cbafee07.js} +2 -2
- package/dist/esm/sqm-lead-checkbox-field.entry.js +7 -7
- package/dist/esm/{sqm-lead-input-field-view-4ede5d7f.js → sqm-lead-input-field-view-f3775c28.js} +3 -3
- package/dist/esm/sqm-lead-input-field.entry.js +8 -8
- package/dist/esm/sqm-leaderboard-rank-view-18baae5b.js +8 -0
- package/dist/esm/sqm-leaderboard-rank.entry.js +6 -6
- 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 +91 -64
- 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-35b4353b.js → sqm-portal-email-verification-view-7d86299c.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-7e49609a.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-93003974.js → sqm-portal-profile-view-3ed13e4d.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-3c1f6000.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-54a8651f.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-b12cb894.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-f1d0763b.js → sqm-qr-code-view-ea505213.js} +4 -9
- package/dist/esm/sqm-qr-code.entry.js +8 -20
- package/dist/esm/sqm-referral-table_11.entry.js +120 -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 +73 -26
- 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 +13818 -12485
- package/dist/esm/sqm-tab.entry.js +4 -4
- package/dist/esm/sqm-tabs.entry.js +25 -10
- package/dist/esm/sqm-tax-and-cash.entry.js +1309 -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/{useLeadFormState-9016d812.js → useLeadFormState-c379e5d7.js} +4 -4
- package/dist/esm/{usePayoutStatus-f07bcf90.js → usePayoutStatus-42cc6a2c.js} +46 -14
- package/dist/esm/{usePortalLogin-ef647a50.js → usePortalLogin-95814943.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-6122971b.js +97 -0
- package/dist/esm/{utils-334c1e34.js → utils-84b4b092.js} +4 -0
- package/dist/esm-es5/ErrorView-bbf0a042.js +1 -0
- package/dist/esm-es5/GenericTableView-e43d310f.js +1 -0
- package/dist/esm-es5/IndirectTaxDetailsView-0a57b622.js +1 -0
- package/dist/esm-es5/ShadowViewAddon-c0bd62f7.js +1 -0
- package/dist/esm-es5/copy-text-view-83b09456.js +1 -0
- package/dist/esm-es5/data-807686c2.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-be1f9992.js → global-1099f20d.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-a3cdb832.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-593d4ac3.js → sqm-base-registration-form-view-193f1721.js} +1 -1
- package/dist/esm-es5/sqm-big-stat_46.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-lead-checkbox-field-view-a8c1c78e.js → sqm-lead-checkbox-field-view-cbafee07.js} +1 -1
- package/dist/esm-es5/sqm-lead-checkbox-field.entry.js +1 -1
- package/dist/esm-es5/{sqm-lead-input-field-view-4ede5d7f.js → sqm-lead-input-field-view-f3775c28.js} +1 -1
- package/dist/esm-es5/sqm-lead-input-field.entry.js +1 -1
- 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-35b4353b.js → sqm-portal-email-verification-view-7d86299c.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-93003974.js → sqm-portal-profile-view-3ed13e4d.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-3c1f6000.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-54a8651f.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-b12cb894.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-f1d0763b.js → sqm-qr-code-view-ea505213.js} +1 -1
- package/dist/esm-es5/sqm-qr-code.entry.js +1 -1
- package/dist/esm-es5/sqm-referral-table_11.entry.js +1 -1
- package/dist/esm-es5/sqm-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/useLeadFormState-c379e5d7.js +1 -0
- package/dist/esm-es5/usePayoutStatus-42cc6a2c.js +6 -0
- package/dist/esm-es5/usePortalLogin-95814943.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-6122971b.js +1 -0
- package/dist/esm-es5/utils-84b4b092.js +1 -0
- package/dist/mint-components/global/styles.ts +434 -102
- 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-bbcd824a.js → p-00bc7211.js} +1 -1
- package/dist/mint-components/{p-50c902ca.system.entry.js → p-06f13966.system.entry.js} +1 -1
- package/dist/mint-components/{p-f940190a.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-0caad0db.entry.js +144 -0
- package/dist/mint-components/{p-48c69c2d.entry.js → p-0d21194c.entry.js} +1 -1
- package/dist/mint-components/p-0d71303d.js +1 -0
- package/dist/mint-components/p-0e532b53.entry.js +1 -0
- package/dist/mint-components/{p-f4a8ee29.system.entry.js → p-0ea4d6a1.system.entry.js} +1 -1
- package/dist/mint-components/p-0ec54f97.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-13e66b37.system.entry.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-171310d9.system.js +1 -0
- package/dist/mint-components/{p-dbc0e4f8.system.js → p-17a0f310.system.js} +1 -1
- package/dist/mint-components/{p-5c28406d.system.entry.js → p-1c6ef258.system.entry.js} +1 -1
- package/dist/mint-components/p-1cd0e1e9.system.js +1 -0
- package/dist/mint-components/p-204861a6.js +1 -0
- package/dist/mint-components/{p-b287833c.system.entry.js → p-22a9114f.system.entry.js} +1 -1
- package/dist/mint-components/p-2403c6e1.system.js +1 -0
- package/dist/mint-components/p-240bec23.js +1 -0
- package/dist/mint-components/p-2623b232.system.entry.js +1 -0
- package/dist/mint-components/{p-164a9103.system.entry.js → p-26a7051d.system.entry.js} +1 -1
- package/dist/mint-components/p-29398c98.entry.js +1 -0
- package/dist/mint-components/p-29ba2eaa.entry.js +1 -0
- package/dist/mint-components/{p-d07f3090.entry.js → p-29f0c87d.entry.js} +1 -1
- package/dist/mint-components/p-2ff72acc.entry.js +16 -0
- package/dist/mint-components/p-35081b0c.system.entry.js +1 -0
- package/dist/mint-components/{p-44891949.entry.js → p-386ec00c.entry.js} +1 -1
- package/dist/mint-components/{p-7a9290ba.js → p-3eba9036.js} +1 -1
- package/dist/mint-components/p-402984b3.system.entry.js +1 -0
- package/dist/mint-components/p-40752a0f.entry.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-4250b06d.entry.js +1 -0
- package/dist/mint-components/{p-6a8d9def.system.entry.js → p-42b62299.system.entry.js} +1 -1
- package/dist/mint-components/{p-ff8b8067.entry.js → p-4306a11d.entry.js} +1 -1
- package/dist/mint-components/{p-a2fde301.entry.js → p-433e7458.entry.js} +1 -1
- package/dist/mint-components/{p-9bfd9bed.system.entry.js → p-43d9c1c5.system.entry.js} +1 -1
- package/dist/mint-components/p-45c3ff6d.js +1 -0
- package/dist/mint-components/{p-938f64d9.js → p-460155de.js} +1 -1
- package/dist/mint-components/{p-10d17989.entry.js → p-47c83656.entry.js} +1 -1
- package/dist/mint-components/{p-c0f19490.js → p-49400aab.js} +2 -2
- package/dist/mint-components/p-4965dae4.system.js +1 -0
- package/dist/mint-components/p-49b20dae.js +1 -0
- package/dist/mint-components/p-4b9976cc.system.js +1 -0
- package/dist/mint-components/p-4c811d12.entry.js +13 -0
- package/dist/mint-components/{p-2f101bae.entry.js → p-4c9d80e4.entry.js} +1 -1
- package/dist/mint-components/p-4f5329a2.system.js +53 -0
- package/dist/mint-components/{p-00df0cac.js → p-4fed8672.js} +1 -1
- package/dist/mint-components/p-511c87ce.system.entry.js +1 -0
- 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-9b6a0152.system.entry.js → p-55eaba8e.system.entry.js} +1 -1
- package/dist/mint-components/p-59b028db.system.js +1 -0
- package/dist/mint-components/p-5e145a54.system.entry.js +1 -0
- package/dist/mint-components/p-5ff2da11.js +1 -0
- package/dist/mint-components/{p-cd569259.system.js → p-60465a2d.system.js} +1 -1
- package/dist/mint-components/{p-fa37513e.system.entry.js → p-60ec0961.system.entry.js} +1 -1
- package/dist/mint-components/p-60f1cca2.system.js +1 -0
- package/dist/mint-components/p-61157c6a.entry.js +11 -0
- 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-99ad7d56.system.js → p-64997b59.system.js} +1 -1
- package/dist/mint-components/{p-b75bb6e3.system.js → p-6578ea31.system.js} +1 -1
- package/dist/mint-components/{p-f0772618.system.entry.js → p-66cf70f7.system.entry.js} +1 -1
- package/dist/mint-components/{p-1a6b7d2a.entry.js → p-67aa0b2d.entry.js} +1 -1
- package/dist/mint-components/p-67ad2252.system.js +1 -0
- package/dist/mint-components/{p-91ab3da1.js → p-68043f30.js} +1 -1
- package/dist/mint-components/p-6b0f79d1.system.entry.js +1 -0
- package/dist/mint-components/{p-8175e85f.system.js → p-6c82d60c.system.js} +1 -1
- package/dist/mint-components/p-6d5bd95a.js +1 -0
- package/dist/mint-components/{p-9ec99ced.js → p-6dc742bc.js} +1 -1
- package/dist/mint-components/p-71271fbd.system.js +1 -0
- package/dist/mint-components/{p-6d9e52c7.system.js → p-7159c51c.system.js} +1 -1
- package/dist/mint-components/{p-05f29f64.js → p-71af93e3.js} +1 -1
- package/dist/mint-components/p-74f43a08.system.js +1 -0
- 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-76d4ef41.entry.js +1 -0
- package/dist/mint-components/{p-6bb25c02.js → p-7837f69e.js} +18 -3
- package/dist/mint-components/{p-8362cb4c.system.entry.js → p-78c754de.system.entry.js} +1 -1
- package/dist/mint-components/{p-6ba44ca9.js → p-79a3344f.js} +1 -1
- package/dist/mint-components/p-7a268047.js +1 -0
- package/dist/mint-components/p-7b8232f8.system.js +6 -0
- package/dist/mint-components/p-7b8cd420.system.entry.js +1 -0
- package/dist/mint-components/p-7b8d29bb.entry.js +1 -0
- package/dist/mint-components/p-7bae9bb7.system.entry.js +1 -0
- package/dist/mint-components/p-7d735c9c.js +448 -0
- package/dist/mint-components/{p-f4a72903.system.entry.js → p-84d1041d.system.entry.js} +1 -1
- 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-8c3c4e92.js +112 -0
- package/dist/mint-components/p-8caef004.js +1 -0
- package/dist/mint-components/{p-ae1ea5ac.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-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-967a9040.system.js +1 -0
- package/dist/mint-components/p-976ee669.js +1 -0
- package/dist/mint-components/p-978d06ab.entry.js +1 -0
- package/dist/mint-components/{p-6d2f5a1d.js → p-97dc6863.js} +2 -2
- 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-a0730259.entry.js +99 -0
- package/dist/mint-components/p-a38dd63f.system.entry.js +1 -0
- package/dist/mint-components/p-a44a912b.entry.js +1 -0
- package/dist/mint-components/{p-35b475bf.js → p-a45680fe.js} +1 -1
- package/dist/mint-components/p-a4e8eb33.entry.js +1 -0
- package/dist/mint-components/p-a513c1a6.js +1 -0
- package/dist/mint-components/p-a597b136.entry.js +1 -0
- 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-a9ad7fb2.system.entry.js +1 -0
- package/dist/mint-components/{p-0d182dc1.system.js → p-aa08457e.system.js} +1 -1
- package/dist/mint-components/p-aa8c6332.js +1 -0
- package/dist/mint-components/{p-e8ffcc68.entry.js → p-ab018deb.entry.js} +2 -2
- package/dist/mint-components/p-ad4348c3.system.js +1 -0
- package/dist/mint-components/{p-f2d8d3d3.system.entry.js → p-af69ee79.system.entry.js} +1 -1
- package/dist/mint-components/p-b1eafaae.entry.js +25 -0
- package/dist/mint-components/p-b487cb00.system.entry.js +1 -0
- package/dist/mint-components/{p-36ffebd8.system.entry.js → p-b55002dc.system.entry.js} +1 -1
- package/dist/mint-components/{p-e5d0375e.system.js → p-b6911812.system.js} +1 -1
- package/dist/mint-components/p-b703c89f.system.entry.js +1 -0
- package/dist/mint-components/p-b8d3fb57.entry.js +273 -0
- package/dist/mint-components/p-bb452830.system.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-2ae0e06a.entry.js → p-bfd77a07.entry.js} +1 -1
- package/dist/mint-components/p-c065057d.entry.js +17 -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-c531cc75.entry.js +1 -0
- package/dist/mint-components/p-c5fea579.system.entry.js +1 -0
- package/dist/mint-components/{p-527216de.system.js → p-c6fa4cc5.system.js} +1 -1
- package/dist/mint-components/p-c7c11325.js +1 -0
- package/dist/mint-components/p-c85f204b.system.js +1 -0
- package/dist/mint-components/{p-90fc6774.system.entry.js → p-c86f64ad.system.entry.js} +1 -1
- package/dist/mint-components/{p-95b88eb6.system.js → p-c994512c.system.js} +1 -1
- package/dist/mint-components/{p-0b4cac9f.system.entry.js → p-cb845a3a.system.entry.js} +1 -1
- package/dist/mint-components/{p-9386ad84.system.entry.js → p-cc8ca3ff.system.entry.js} +1 -1
- package/dist/mint-components/p-cf22cf56.entry.js +1 -0
- package/dist/mint-components/p-cf4e1709.entry.js +1 -0
- package/dist/mint-components/{p-0d2d0b6d.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-d399b343.system.entry.js +1 -0
- package/dist/mint-components/{p-8c0b7881.system.entry.js → p-d4edce6c.system.entry.js} +1 -1
- package/dist/mint-components/p-db1a0db1.js +1233 -0
- package/dist/mint-components/p-dcc50d90.entry.js +1 -0
- package/dist/mint-components/p-dd30354a.system.entry.js +1 -0
- package/dist/mint-components/{p-91959fbe.js → p-ddf3c05e.js} +1 -1
- package/dist/mint-components/{p-bdb7d451.system.js → p-e0a724dd.system.js} +21 -21
- package/dist/mint-components/{p-2d52e2d7.system.js → p-e174b704.system.js} +1 -1
- package/dist/mint-components/{p-4e526a94.js → p-e711d0e9.js} +1 -1
- package/dist/mint-components/{p-7f80a9d7.entry.js → p-ea063d99.entry.js} +1 -1
- package/dist/mint-components/p-eaeddfe2.system.js +1 -0
- package/dist/mint-components/p-eba70d67.system.entry.js +1 -0
- package/dist/mint-components/p-ecc84140.system.entry.js +1 -0
- package/dist/mint-components/p-ed16b35a.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-01dd541f.system.js → p-f0eae4e6.system.js} +1 -1
- package/dist/mint-components/p-f1dc581f.js +1 -0
- package/dist/mint-components/p-f1f6a13d.system.js +1 -0
- package/dist/mint-components/p-f370bddc.entry.js +13 -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-284e4ed5.entry.js → p-f7c0877d.entry.js} +1 -1
- package/dist/mint-components/p-f860e7f1.entry.js +9 -0
- package/dist/mint-components/p-f9c7248e.js +1 -0
- package/dist/mint-components/{p-19bc3406.system.entry.js → p-fb2976fc.system.entry.js} +1 -1
- 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 +47 -1
- package/dist/types/components/sqm-card-feed/sqm-card-feed.d.ts +2 -0
- package/dist/types/components/sqm-coupon-code/CouponCode.stories.d.ts +1 -0
- package/dist/types/components/sqm-coupon-code/sqm-coupon-code-view.d.ts +2 -0
- package/dist/types/components/sqm-coupon-code/sqm-coupon-code.d.ts +43 -0
- package/dist/types/components/sqm-coupon-code/useCouponCode.d.ts +1 -0
- package/dist/types/components/sqm-divided-layout/sqm-divided-layout-view.d.ts +4 -1
- package/dist/types/components/sqm-divided-layout/sqm-divided-layout.d.ts +15 -0
- package/dist/types/components/sqm-form-message/FormMessage.stories.d.ts +0 -1
- package/dist/types/components/sqm-header-logo/sqm-header-logo.d.ts +1 -0
- 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 -1
- package/dist/types/components/sqm-hero-image/sqm-hero-image-view.d.ts +1 -0
- package/dist/types/components/sqm-hero-image/sqm-hero-image.d.ts +20 -0
- package/dist/types/components/sqm-image/sqm-image.d.ts +1 -0
- package/dist/types/components/sqm-instant-access-registration/sqm-instant-access-registration.d.ts +2 -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/Leaderboard.stories.d.ts +1 -0
- package/dist/types/components/sqm-leaderboard/sqm-leaderboard-view.d.ts +6 -0
- package/dist/types/components/sqm-leaderboard/sqm-leaderboard.d.ts +53 -11
- package/dist/types/components/sqm-leaderboard/useLeaderboard.d.ts +6 -0
- 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-name-fields/sqm-name-fields.d.ts +1 -1
- package/dist/types/components/sqm-navigation-menu/sqm-navigation-menu.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 +16 -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-change-password/sqm-portal-change-password.d.ts +1 -0
- package/dist/types/components/sqm-portal-footer/sqm-portal-footer.d.ts +1 -0
- 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-portal-login/sqm-portal-login.d.ts +1 -0
- package/dist/types/components/sqm-portal-logout/sqm-portal-logout.d.ts +1 -0
- package/dist/types/components/sqm-portal-profile/sqm-portal-profile.d.ts +1 -0
- package/dist/types/components/sqm-portal-protected-route/sqm-portal-protected-route.d.ts +1 -0
- package/dist/types/components/sqm-program-explainer/sqm-program-explainer.d.ts +3 -1
- package/dist/types/components/sqm-program-explainer-step/sqm-program-explainer-step-view.d.ts +3 -0
- package/dist/types/components/sqm-program-explainer-step/sqm-program-explainer-step.d.ts +21 -3
- package/dist/types/components/sqm-program-menu/sqm-program-menu.d.ts +1 -0
- package/dist/types/components/sqm-qr-code/sqm-qr-code.d.ts +1 -0
- package/dist/types/components/sqm-referral-card/sqm-referral-card-view.d.ts +5 -2
- package/dist/types/components/sqm-referral-card/sqm-referral-card.d.ts +25 -2
- package/dist/types/components/sqm-referral-code/ReferralCode.stories.d.ts +1 -0
- package/dist/types/components/sqm-referral-code/sqm-referral-code.d.ts +43 -0
- package/dist/types/components/sqm-referral-codes/ReferralCodes.stories.d.ts +1 -0
- package/dist/types/components/sqm-referral-codes/sqm-referral-codes-view.d.ts +1 -0
- package/dist/types/components/sqm-referral-codes/sqm-referral-codes.d.ts +7 -0
- package/dist/types/components/sqm-referral-table/cells/sqm-referral-table-rewards-cell.d.ts +1 -0
- package/dist/types/components/sqm-referral-table/cells/sqm-referral-table-status-cell.d.ts +1 -0
- package/dist/types/components/sqm-referral-table/columns/ReferralTableColumn.d.ts +1 -0
- package/dist/types/components/sqm-referral-table/columns/sqm-referral-table-column.d.ts +1 -0
- package/dist/types/components/sqm-referral-table/columns/sqm-referral-table-date-column.d.ts +1 -0
- package/dist/types/components/sqm-referral-table/columns/sqm-referral-table-rewards-column.d.ts +1 -0
- package/dist/types/components/sqm-referral-table/columns/sqm-referral-table-status-column.d.ts +1 -0
- package/dist/types/components/sqm-referral-table/columns/sqm-referral-table-user-column.d.ts +1 -0
- package/dist/types/components/sqm-referral-table/sqm-referral-table.d.ts +3 -0
- package/dist/types/components/sqm-referred-registration/sqm-referred-registration.d.ts +2 -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 +10 -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 +2 -1
- package/dist/types/components/sqm-rewards-table/columns/RewardTableColumn.d.ts +1 -0
- package/dist/types/components/sqm-rewards-table/columns/sqm-rewards-table-date-column.d.ts +2 -1
- package/dist/types/components/sqm-rewards-table/columns/sqm-rewards-table-note-column.d.ts +2 -1
- package/dist/types/components/sqm-rewards-table/columns/sqm-rewards-table-reward-column.d.ts +2 -1
- package/dist/types/components/sqm-rewards-table/columns/sqm-rewards-table-source-column.d.ts +1 -0
- package/dist/types/components/sqm-rewards-table/columns/sqm-rewards-table-status-column.d.ts +3 -2
- 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 +2 -0
- package/dist/types/components/sqm-rewards-table/useRewardsTable.d.ts +1 -1
- package/dist/types/components/sqm-route/sqm-route.d.ts +1 -0
- package/dist/types/components/sqm-router/sqm-router.d.ts +2 -0
- package/dist/types/components/sqm-scroll/sqm-scroll.d.ts +1 -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 +19 -6
- package/dist/types/components/sqm-share-code/sqm-share-code.d.ts +43 -0
- package/dist/types/components/sqm-share-link/ShareLink.stories.d.ts +2 -0
- package/dist/types/components/sqm-share-link/sqm-share-link.d.ts +44 -1
- package/dist/types/components/sqm-stat-container/sqm-stat-container-view.d.ts +3 -0
- package/dist/types/components/sqm-stat-container/sqm-stat-container.d.ts +25 -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 +10 -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 +5 -0
- package/dist/types/components/sqm-task-card/sqm-task-card.d.ts +33 -4
- package/dist/types/components/sqm-task-card/useTaskCard.d.ts +9 -0
- package/dist/types/components/sqm-text/Text.stories.d.ts +6 -0
- package/dist/types/components/sqm-text/sqm-text.d.ts +13 -0
- package/dist/types/components/sqm-text-span/sqm-text-span-view.d.ts +4 -2
- package/dist/types/components/sqm-text-span/sqm-text-span.d.ts +14 -1
- package/dist/types/components/sqm-timeline/Timeline.stories.d.ts +1 -0
- package/dist/types/components/sqm-timeline/sqm-timeline-entry-view.d.ts +2 -0
- package/dist/types/components/sqm-timeline/sqm-timeline-entry.d.ts +14 -0
- package/dist/types/components/sqm-timeline/sqm-timeline.d.ts +3 -1
- package/dist/types/components/sqm-titled-section/sqm-titled-section.d.ts +2 -0
- 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/TaxForm.stories.d.ts +0 -1
- package/dist/types/components/tax-and-cash/{sqm-tax-and-cash/data.d.ts → data.d.ts} +9 -0
- package/dist/types/components/tax-and-cash/sqm-docusign-form/sqm-docusign-form-view.d.ts +1 -1
- package/dist/types/components/tax-and-cash/sqm-docusign-form/useDocusignForm.d.ts +2 -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-view.d.ts +4 -1
- package/dist/types/components/tax-and-cash/sqm-payout-status-alert/sqm-payout-status-alert.d.ts +12 -3
- package/dist/types/components/tax-and-cash/sqm-payout-status-alert/usePayoutStatus.d.ts +9 -2
- package/dist/types/components/tax-and-cash/sqm-tax-and-cash/sqm-tax-and-cash.d.ts +23 -6
- 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 +4 -2
- package/dist/types/components/tax-and-cash/sqm-tax-and-cash-dashboard/sqm-tax-and-cash-dashboard.d.ts +16 -8
- 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/views/copy-text-view.d.ts +5 -0
- package/dist/types/components.d.ts +1288 -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/copy-text-view-c85acaaa.js +0 -96
- 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-5c74607f.js +0 -2074
- 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-78f19ef9.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-0aa82125.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/copy-text-view-782137ba.js +0 -94
- 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-3491dd80.js +0 -2058
- 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-3d3182f1.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-ca32495e.js +0 -60
- package/dist/esm-es5/ErrorView-48e2b969.js +0 -1
- package/dist/esm-es5/GenericTableView-7b9087af.js +0 -1
- package/dist/esm-es5/ShadowViewAddon-f2176779.js +0 -1
- package/dist/esm-es5/copy-text-view-782137ba.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_43.entry.js +0 -1
- package/dist/esm-es5/sqm-invoice-table-view-3491dd80.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-3d3182f1.js +0 -1
- package/dist/esm-es5/sqm-portal-forgot-password.entry.js +0 -1
- package/dist/esm-es5/sqm-portal-login-view-7e49609a.js +0 -1
- package/dist/esm-es5/sqm-referred-registration.entry.js +0 -1
- package/dist/esm-es5/sqm-text-span-view-ca32495e.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/useLeadFormState-9016d812.js +0 -1
- package/dist/esm-es5/usePayoutStatus-f07bcf90.js +0 -6
- 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-01a851f7.system.entry.js +0 -1
- package/dist/mint-components/p-0309fdfa.entry.js +0 -1
- package/dist/mint-components/p-04a6e457.entry.js +0 -1
- package/dist/mint-components/p-0c78815e.system.entry.js +0 -1
- package/dist/mint-components/p-0c9debc1.system.js +0 -6
- package/dist/mint-components/p-0d939b73.system.js +0 -1
- package/dist/mint-components/p-0ebab63e.system.js +0 -1
- package/dist/mint-components/p-12bba567.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-18425f38.system.entry.js +0 -1
- package/dist/mint-components/p-1870ab08.system.entry.js +0 -1
- package/dist/mint-components/p-19ccb4ce.js +0 -1
- package/dist/mint-components/p-1b3ab15a.system.entry.js +0 -1
- package/dist/mint-components/p-1d704c40.system.js +0 -1
- package/dist/mint-components/p-1fa9ed0d.system.entry.js +0 -1
- package/dist/mint-components/p-21620f81.system.entry.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-267c8f8c.entry.js +0 -144
- 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-2da21ba4.entry.js +0 -1
- package/dist/mint-components/p-2dca9e1a.system.js +0 -1
- package/dist/mint-components/p-31015791.js +0 -1
- package/dist/mint-components/p-33c96e14.entry.js +0 -16
- package/dist/mint-components/p-37996351.system.js +0 -1
- package/dist/mint-components/p-37a4452c.system.entry.js +0 -1
- package/dist/mint-components/p-380bfde1.entry.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-3b90e01b.system.js +0 -1
- package/dist/mint-components/p-3db34d68.js +0 -1
- package/dist/mint-components/p-3f6e0197.system.entry.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-4794641c.system.js +0 -1
- package/dist/mint-components/p-48135f99.system.js +0 -53
- package/dist/mint-components/p-492b70db.system.js +0 -1
- package/dist/mint-components/p-49932f12.system.js +0 -1
- package/dist/mint-components/p-4e5af50c.js +0 -1
- package/dist/mint-components/p-53730ffe.entry.js +0 -17
- package/dist/mint-components/p-5cb7f9fc.system.entry.js +0 -1
- package/dist/mint-components/p-6055eb4c.system.js +0 -1
- package/dist/mint-components/p-609613e8.entry.js +0 -205
- package/dist/mint-components/p-626e9e84.js +0 -1
- 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-63a75798.js +0 -1
- package/dist/mint-components/p-6427e963.entry.js +0 -1
- package/dist/mint-components/p-65069b66.js +0 -1248
- package/dist/mint-components/p-653f963f.entry.js +0 -13
- package/dist/mint-components/p-65ba9e94.entry.js +0 -1
- package/dist/mint-components/p-6b7a595f.system.js +0 -1
- package/dist/mint-components/p-6cd4f2b1.system.js +0 -1
- package/dist/mint-components/p-6eaf9c57.entry.js +0 -1
- package/dist/mint-components/p-775f3ded.entry.js +0 -1
- package/dist/mint-components/p-7846937e.entry.js +0 -13
- package/dist/mint-components/p-7893e7d1.entry.js +0 -9
- package/dist/mint-components/p-7ab21e4d.entry.js +0 -1
- package/dist/mint-components/p-837a0fdd.js +0 -1
- package/dist/mint-components/p-85671c3d.system.entry.js +0 -1
- package/dist/mint-components/p-8abfeff8.entry.js +0 -1
- package/dist/mint-components/p-8c23d1b8.js +0 -1
- 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-97d4d651.system.js +0 -1
- package/dist/mint-components/p-98698131.js +0 -1
- package/dist/mint-components/p-986d4c17.system.entry.js +0 -1
- package/dist/mint-components/p-9acb5038.js +0 -1
- package/dist/mint-components/p-9cf80e85.system.entry.js +0 -1
- package/dist/mint-components/p-aad32fb6.system.js +0 -1
- package/dist/mint-components/p-b207beeb.entry.js +0 -1
- package/dist/mint-components/p-b7d1469d.system.entry.js +0 -1
- package/dist/mint-components/p-b82e1935.system.entry.js +0 -1
- package/dist/mint-components/p-bfc7cfc0.system.js +0 -1
- package/dist/mint-components/p-c060f770.system.entry.js +0 -1
- package/dist/mint-components/p-c1b074b6.js +0 -394
- package/dist/mint-components/p-c36506f6.system.entry.js +0 -1
- package/dist/mint-components/p-c9f1dde7.js +0 -1
- package/dist/mint-components/p-cb7bdbe4.entry.js +0 -1
- package/dist/mint-components/p-cbbfac66.entry.js +0 -25
- package/dist/mint-components/p-cd1d497f.system.js +0 -1
- package/dist/mint-components/p-cd651f81.js +0 -42
- package/dist/mint-components/p-d8ea88f9.entry.js +0 -273
- package/dist/mint-components/p-da7708a7.entry.js +0 -1
- package/dist/mint-components/p-dbcb5359.js +0 -1
- package/dist/mint-components/p-dcc81e90.entry.js +0 -1
- package/dist/mint-components/p-ddcf4a9e.system.entry.js +0 -1
- package/dist/mint-components/p-e07bc6c4.system.js +0 -1
- package/dist/mint-components/p-e5a5ae7f.system.entry.js +0 -1
- package/dist/mint-components/p-e6f50ffd.entry.js +0 -1
- package/dist/mint-components/p-e8e48982.js +0 -1
- package/dist/mint-components/p-f26aedcd.system.js +0 -1
- package/dist/mint-components/p-f56bedd5.js +0 -1
- package/dist/mint-components/p-f708da7b.js +0 -1
- package/dist/mint-components/p-f7c99803.system.js +0 -1
- package/dist/mint-components/p-f98a4354.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
|
@@ -1,25 +1,71 @@
|
|
|
1
|
-
import { h, c as Host, d as getAssetPath, F as Fragment, g as getElement } from './index-
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { d as dist,
|
|
1
|
+
import { h, c as Host, d as getAssetPath, F as Fragment, g as getElement } from './index-b3a06de8.js';
|
|
2
|
+
import { i as intl } from './global-1099f20d.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-84b4b092.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,433 +115,180 @@ 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
|
-
|
|
94
|
-
|
|
95
|
-
|
|
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
|
|
135
|
+
const style = {
|
|
136
|
+
StatContainer: {
|
|
96
137
|
width: "100%",
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
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(),
|
|
150
|
+
},
|
|
151
|
+
"& > :last-child": {
|
|
152
|
+
"border-right": "none",
|
|
153
|
+
},
|
|
154
|
+
"& > ::slotted(*)": {
|
|
155
|
+
"border-right": props.hideBorder
|
|
156
|
+
? "none"
|
|
157
|
+
: "var(--sqm-border-thickness) solid var(--sqm-border-color)",
|
|
158
|
+
"padding-right": divideSpace(),
|
|
159
|
+
},
|
|
160
|
+
"& > ::slotted(*:last-child)": {
|
|
161
|
+
"border-right": "none",
|
|
162
|
+
},
|
|
163
|
+
"@media screen and (max-width: 430px)": {
|
|
164
|
+
"& > ::slotted(*)": {
|
|
165
|
+
borderRight: "none",
|
|
166
|
+
},
|
|
167
|
+
},
|
|
105
168
|
},
|
|
106
|
-
|
|
107
|
-
|
|
169
|
+
StatFrame: {
|
|
170
|
+
display: "flex",
|
|
108
171
|
},
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
172
|
+
BorderFix: {
|
|
173
|
+
"border-right": "var(--sqm-border-thickness) solid transparent",
|
|
174
|
+
width: "0px",
|
|
175
|
+
"margin-left": "-1px",
|
|
112
176
|
},
|
|
113
|
-
|
|
114
|
-
|
|
177
|
+
};
|
|
178
|
+
const sheet = createStyleSheet(style);
|
|
179
|
+
const styleString = sheet.toString();
|
|
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" })));
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
function PortalChangePasswordView(props) {
|
|
188
|
+
const { states, callbacks } = props;
|
|
189
|
+
const style = {
|
|
190
|
+
Dialog: {
|
|
115
191
|
padding: "0",
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
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
|
+
},
|
|
125
202
|
},
|
|
126
|
-
|
|
127
|
-
|
|
203
|
+
Error: {
|
|
204
|
+
"&::part(erroralert-base)": {
|
|
205
|
+
"margin-bottom": "15px",
|
|
206
|
+
},
|
|
128
207
|
},
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
208
|
+
Success: {
|
|
209
|
+
"&::part(successalert-base)": {
|
|
210
|
+
"margin-bottom": "15px",
|
|
211
|
+
},
|
|
132
212
|
},
|
|
133
|
-
|
|
134
|
-
|
|
213
|
+
InputContainer: {
|
|
214
|
+
"& > :not(:last-child)": {
|
|
215
|
+
"margin-bottom": "var(--sl-spacing-x-large)",
|
|
216
|
+
},
|
|
135
217
|
},
|
|
136
|
-
|
|
218
|
+
CancelButton: {
|
|
219
|
+
margin: "var(--sl-spacing-large) auto",
|
|
137
220
|
width: "100%",
|
|
138
221
|
},
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
const styleString$1 = sheet$1.toString();
|
|
143
|
-
const vanillaStyle = `
|
|
144
|
-
:host{
|
|
145
|
-
display: block;
|
|
146
|
-
}
|
|
147
|
-
`;
|
|
148
|
-
function LeaderboardView(props) {
|
|
149
|
-
var _a, _b, _c;
|
|
150
|
-
const { states, data, elements } = props;
|
|
151
|
-
const { styles } = states;
|
|
152
|
-
if (states.isEssentials) {
|
|
153
|
-
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" }));
|
|
154
|
-
}
|
|
155
|
-
if (states.loading) {
|
|
156
|
-
return (h("div", { class: sheet$1.classes.Leaderboard, style: { width: styles.width || "100%" } },
|
|
157
|
-
h("style", { type: "text/css" },
|
|
158
|
-
styleString$1,
|
|
159
|
-
vanillaStyle),
|
|
160
|
-
h("table", null, [...Array(10)].map(() => {
|
|
161
|
-
return (h("tr", null,
|
|
162
|
-
h("td", null,
|
|
163
|
-
h("sl-skeleton", null))));
|
|
164
|
-
}))));
|
|
165
|
-
}
|
|
166
|
-
if (!states.hasLeaders)
|
|
167
|
-
return elements.empty;
|
|
168
|
-
let userSeenFlag = false;
|
|
169
|
-
const getUsersName = (user) => {
|
|
170
|
-
if (!user.firstName && !user.lastInitial)
|
|
171
|
-
return styles.anonymousUser;
|
|
172
|
-
const { firstName, lastInitial } = user;
|
|
173
|
-
if (firstName && lastInitial)
|
|
174
|
-
return `${firstName} ${lastInitial}`;
|
|
175
|
-
if (firstName || lastInitial)
|
|
176
|
-
return firstName || lastInitial;
|
|
177
|
-
return styles.anonymousUser;
|
|
178
|
-
};
|
|
179
|
-
const getRankCellText = (userRank, isViewingUsersRow) => {
|
|
180
|
-
if (!userRank) {
|
|
181
|
-
return styles.hideNames ? `${styles.viewingUserText}` : "-";
|
|
182
|
-
}
|
|
183
|
-
const viewingUserText = ` - ${styles.viewingUserText}`;
|
|
184
|
-
return styles.rankSuffix
|
|
185
|
-
? intl.formatMessage({
|
|
186
|
-
id: "rank",
|
|
187
|
-
defaultMessage: styles.rankSuffix,
|
|
188
|
-
}, {
|
|
189
|
-
rank: userRank,
|
|
190
|
-
}) + `${isViewingUsersRow && styles.hideNames ? viewingUserText : ""}`
|
|
191
|
-
: `${userRank} ${isViewingUsersRow && styles.hideNames ? viewingUserText : ""}`;
|
|
192
|
-
};
|
|
193
|
-
return (h("div", { class: sheet$1.classes.Leaderboard, part: "sqm-base", style: { width: styles.width || "100%" } },
|
|
194
|
-
h("style", { type: "text/css" },
|
|
195
|
-
styleString$1,
|
|
196
|
-
vanillaStyle),
|
|
197
|
-
h("table", { part: "sqm-table" },
|
|
198
|
-
h("tr", null,
|
|
199
|
-
styles.showRank && (h("th", { class: `Rank ${styles.hideNames ? "fullWidth" : ""}` }, styles.rankheading)),
|
|
200
|
-
!styles.hideNames && h("th", { class: "User" }, styles.usersheading),
|
|
201
|
-
h("th", { class: "Score" }, styles.statsheading)), (_a = data.leaderboard) === null || _a === void 0 ? void 0 :
|
|
202
|
-
_a.map((user) => {
|
|
203
|
-
var _a, _b;
|
|
204
|
-
if (user.rowNumber === ((_a = data.viewerRank) === null || _a === void 0 ? void 0 : _a.rowNumber))
|
|
205
|
-
userSeenFlag = true;
|
|
206
|
-
const isViewingUsersRow = !styles.hideViewer && user.rowNumber === ((_b = data.viewerRank) === null || _b === void 0 ? void 0 : _b.rowNumber);
|
|
207
|
-
return (h("tr", { class: isViewingUsersRow ? "highlight" : "" },
|
|
208
|
-
styles.showRank && (h("td", { class: "Rank" }, getRankCellText(user.rank, isViewingUsersRow))),
|
|
209
|
-
!styles.hideNames && h("td", { class: "User" }, getUsersName(user)),
|
|
210
|
-
h("td", { class: "Score" }, user.textValue)));
|
|
211
|
-
}),
|
|
212
|
-
!userSeenFlag && !styles.hideViewer && (h("tr", null,
|
|
213
|
-
h("td", { colSpan: 100, class: "ellipses" },
|
|
214
|
-
h("sl-icon", { name: "three-dots", style: { verticalAlign: "middle" } })))),
|
|
215
|
-
!userSeenFlag && !styles.hideViewer && (h("tr", { class: "highlight" },
|
|
216
|
-
styles.showRank && (h("td", { class: "Rank" }, getRankCellText((_b = data.viewerRank) === null || _b === void 0 ? void 0 : _b.rank, true))),
|
|
217
|
-
!styles.hideNames && (h("td", { class: "User" }, getUsersName(data.viewerRank || {}))),
|
|
218
|
-
h("td", { class: "Score" }, ((_c = data.viewerRank) === null || _c === void 0 ? void 0 : _c.textValue) || "0"))))));
|
|
219
|
-
}
|
|
220
|
-
|
|
221
|
-
function BigStatView(props) {
|
|
222
|
-
const { statvalue, flexReverse, alignment } = props;
|
|
223
|
-
// Dependent on props, not feasiable to move out
|
|
224
|
-
const style = {
|
|
225
|
-
Container: {
|
|
226
|
-
display: "flex",
|
|
227
|
-
height: "inherit",
|
|
228
|
-
"justify-content": "space-between",
|
|
229
|
-
"flex-direction": `${flexReverse ? "column-reverse" : "column"}`,
|
|
230
|
-
"align-items": `${alignment === "left"
|
|
231
|
-
? "flex-start"
|
|
232
|
-
: alignment === "right"
|
|
233
|
-
? "flex-end"
|
|
234
|
-
: "center"}`,
|
|
235
|
-
},
|
|
236
|
-
Stat: {
|
|
237
|
-
"font-size": "var(--sl-font-size-x-large)",
|
|
238
|
-
"text-align": alignment,
|
|
222
|
+
PasswordField: {
|
|
223
|
+
marginBottom: "var(--sl-spacing-large) !important",
|
|
224
|
+
display: "block",
|
|
239
225
|
},
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
"font-weight": "var(--sl-font-weight-normal)",
|
|
243
|
-
color: "var(--sl-color-gray-600)",
|
|
244
|
-
"text-transform": "uppercase",
|
|
245
|
-
"text-align": alignment,
|
|
226
|
+
ChangePasswordButton: {
|
|
227
|
+
paddingTop: "var(--sl-spacing-x-large)",
|
|
246
228
|
},
|
|
247
229
|
};
|
|
248
230
|
const sheet = createStyleSheet(style);
|
|
249
231
|
const styleString = sheet.toString();
|
|
250
|
-
return (h("div",
|
|
232
|
+
return (h("div", null,
|
|
251
233
|
h("style", { type: "text/css" }, styleString),
|
|
252
|
-
h("
|
|
253
|
-
|
|
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))));
|
|
254
259
|
}
|
|
255
260
|
|
|
256
|
-
|
|
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
|
-
"
|
|
282
|
-
"
|
|
283
|
-
"
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
},
|
|
288
|
-
},
|
|
289
|
-
};
|
|
290
|
-
const sheet$2 = createStyleSheet(style$2);
|
|
291
|
-
const styleString$2 = sheet$2.toString();
|
|
292
|
-
function PortalFrameView(props, children) {
|
|
293
|
-
const { data, notFullScreen } = props;
|
|
294
|
-
return (h("div", { style: { minHeight: notFullScreen ? "100%" : "100vh" }, class: sheet$2.classes.Frame, part: "sqm-base" },
|
|
295
|
-
h("style", { type: "text/css" }, styleString$2),
|
|
296
|
-
h("div", { class: sheet$2.classes.HeaderWrapper, part: "sqm-header" },
|
|
297
|
-
data.header,
|
|
298
|
-
h("slot", { name: "sqm-navigation-menu" })),
|
|
299
|
-
children,
|
|
300
|
-
h("div", { class: sheet$2.classes.FooterWrapper, part: "sqm-footer" }, data.footer)));
|
|
301
|
-
}
|
|
302
|
-
|
|
303
|
-
const EditProfileView = (props) => {
|
|
304
|
-
var _a, _b, _c, _d;
|
|
305
|
-
const { states, callbacks } = props;
|
|
306
|
-
const { text } = states;
|
|
307
|
-
const { errors } = states.formState;
|
|
308
|
-
if (states.showEdit) {
|
|
309
|
-
return (h("div", { class: `CardWrapper ${!states.showEdit && "ShowEdit"}`, part: "sqm-base" },
|
|
310
|
-
h("h2", { part: "sqm-header", style: {
|
|
311
|
-
fontSize: "var(--sl-font-size-x-large)",
|
|
312
|
-
margin: "0px",
|
|
313
|
-
textAlign: "center",
|
|
314
|
-
} }, text.editprofileheader),
|
|
315
|
-
h("form", { class: "FormWrapper", onSubmit: callbacks.onSubmit },
|
|
316
|
-
h("div", { class: "FormSection" },
|
|
317
|
-
states.formState.error && (h("sqm-form-message", { type: "error", exportparts: "erroralert-icon" },
|
|
318
|
-
h("div", { part: "erroralert-text" }, states.formState.error))),
|
|
319
|
-
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"
|
|
320
|
-
? { class: "ErrorStyles", helpText: text.fieldEmptyText }
|
|
321
|
-
: []), { id: "firstName", name: "firstName", error: errors.firstName && errors.firstName.status !== "valid"
|
|
322
|
-
? errors.firstName.message
|
|
323
|
-
: undefined })),
|
|
324
|
-
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"
|
|
325
|
-
? { class: "ErrorStyles", helpText: text.fieldEmptyText }
|
|
326
|
-
: []), { error: errors.lastName && errors.lastName.status !== "valid"
|
|
327
|
-
? errors.lastName.message
|
|
328
|
-
: undefined }))),
|
|
329
|
-
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" })),
|
|
330
|
-
h("div", { class: "ButtonWrapper" },
|
|
331
|
-
h("sl-button", { type: "primary", loading: states.loading, disabled: states.submitDisabled, onClick: (e) => {
|
|
332
|
-
callbacks.onSubmit(e);
|
|
333
|
-
}, submit: true, exportparts: "base: primarybutton-base" }, text.updatetext),
|
|
334
|
-
h("sl-button", { onClick: () => {
|
|
335
|
-
callbacks.setShowEdit(false);
|
|
336
|
-
}, exportparts: "base: defaultbutton-base" }, text.canceltext)))));
|
|
337
|
-
}
|
|
338
|
-
return (h("div", { class: `CardWrapper FormWrapper ${!states.showEdit && "ShowEdit"}`, part: "sqm-base" },
|
|
339
|
-
h("div", { class: "FormSection" },
|
|
340
|
-
h("h2", { part: "sqm-header", style: {
|
|
341
|
-
fontSize: "var(--sl-font-size-x-large)",
|
|
342
|
-
marginBottom: "0px",
|
|
343
|
-
textAlign: "center",
|
|
344
|
-
} }, text.editprofileheader),
|
|
345
|
-
h("div", null,
|
|
346
|
-
h("p", { style: { fontSize: "var(--sl-font-size-medium)" } }, (_a = states.user) === null || _a === void 0 ? void 0 :
|
|
347
|
-
_a.firstName,
|
|
348
|
-
" ", (_b = states.user) === null || _b === void 0 ? void 0 :
|
|
349
|
-
_b.lastName),
|
|
350
|
-
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))),
|
|
351
|
-
h("sl-button", { type: "primary", loading: states.loading, onClick: () => {
|
|
352
|
-
callbacks.resetForm();
|
|
353
|
-
callbacks.setShowEdit(true);
|
|
354
|
-
}, exportparts: "base: primarybutton-base" }, text.editprofiletext)));
|
|
355
|
-
};
|
|
356
|
-
|
|
357
|
-
const MessageLinkQuery = dist.gql `
|
|
358
|
-
query ($programId: ID, $engagementMedium: UserEngagementMedium!) {
|
|
359
|
-
user: viewer {
|
|
360
|
-
... on User {
|
|
361
|
-
shareLink(
|
|
362
|
-
programId: $programId
|
|
363
|
-
engagementMedium: $engagementMedium
|
|
364
|
-
shareMedium: DIRECT
|
|
365
|
-
)
|
|
366
|
-
}
|
|
367
|
-
}
|
|
368
|
-
}
|
|
369
|
-
`;
|
|
370
|
-
const WIDGET_ENGAGEMENT_EVENT = dist.gql `
|
|
371
|
-
mutation loadEvent($eventMeta: UserAnalyticsEvent!) {
|
|
372
|
-
createUserAnalyticsEvent(eventMeta: $eventMeta)
|
|
373
|
-
}
|
|
374
|
-
`;
|
|
375
|
-
function useShareLink(props) {
|
|
376
|
-
var _a, _b;
|
|
377
|
-
const { programId = H() } = props;
|
|
378
|
-
const user = J();
|
|
379
|
-
const engagementMedium = B();
|
|
380
|
-
const contextData = Fn(REFERRAL_CODES_NAMESPACE);
|
|
381
|
-
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);
|
|
382
|
-
const [sendLoadEvent] = $e(WIDGET_ENGAGEMENT_EVENT);
|
|
383
|
-
const [setCopied, copiedRes] = $e(SET_CODE_COPIED);
|
|
384
|
-
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 :
|
|
385
|
-
// Shown during loading
|
|
386
|
-
"...";
|
|
387
|
-
const [open, setOpen] = useState(false);
|
|
388
|
-
async function onClick() {
|
|
389
|
-
if (contextData) {
|
|
390
|
-
await setCopied({ referralCode: contextData.referralCode });
|
|
391
|
-
contextData.refresh();
|
|
392
|
-
}
|
|
393
|
-
// Should well supported: https://developer.mozilla.org/en-US/docs/Web/API/Clipboard#browser_compatibility
|
|
394
|
-
// Only if called from a user-initiated event
|
|
395
|
-
navigator.clipboard.writeText(copyString);
|
|
396
|
-
setOpen(true);
|
|
397
|
-
setTimeout(() => setOpen(false), props.tooltiplifespan);
|
|
398
|
-
sendLoadEvent({
|
|
399
|
-
eventMeta: {
|
|
400
|
-
programId,
|
|
401
|
-
id: user === null || user === void 0 ? void 0 : user.id,
|
|
402
|
-
accountId: user === null || user === void 0 ? void 0 : user.accountId,
|
|
403
|
-
type: "USER_REFERRAL_PROGRAM_ENGAGEMENT_EVENT",
|
|
404
|
-
meta: {
|
|
405
|
-
engagementMedium,
|
|
406
|
-
shareMedium: "DIRECT",
|
|
407
|
-
},
|
|
408
|
-
},
|
|
409
|
-
});
|
|
410
|
-
}
|
|
411
|
-
return { ...props, onClick, open, copyString: copyString };
|
|
412
|
-
}
|
|
413
|
-
|
|
414
|
-
const MessageLinkQuery$1 = dist.gql `
|
|
415
|
-
query (
|
|
416
|
-
$programId: ID
|
|
417
|
-
$engagementMedium: UserEngagementMedium!
|
|
418
|
-
$shareMedium: ReferralShareMedium!
|
|
419
|
-
) {
|
|
420
|
-
viewer {
|
|
421
|
-
... on User {
|
|
422
|
-
messageLink(
|
|
423
|
-
programId: $programId
|
|
424
|
-
engagementMedium: $engagementMedium
|
|
425
|
-
shareMedium: $shareMedium
|
|
426
|
-
)
|
|
427
|
-
shareLink(programId: $programId, engagementMedium: $engagementMedium)
|
|
428
|
-
}
|
|
429
|
-
}
|
|
430
|
-
}
|
|
431
|
-
`;
|
|
432
|
-
function NativeShare(props, directLink, undefinedErrorText, unsupportedPlatformText) {
|
|
433
|
-
const title = props.sharetitle || "Share title";
|
|
434
|
-
const text = props.sharetext || "Share text";
|
|
435
|
-
if (directLink === "undefined") {
|
|
436
|
-
return alert(undefinedErrorText);
|
|
437
|
-
}
|
|
438
|
-
if (window.navigator.share) {
|
|
439
|
-
window.navigator
|
|
440
|
-
.share({
|
|
441
|
-
title,
|
|
442
|
-
text,
|
|
443
|
-
url: directLink,
|
|
444
|
-
})
|
|
445
|
-
.catch((error) => console.error("Error on web share", error));
|
|
446
|
-
}
|
|
447
|
-
else {
|
|
448
|
-
alert(unsupportedPlatformText);
|
|
449
|
-
}
|
|
450
|
-
}
|
|
451
|
-
function FacebookShare(directLink, messageLink, errorText) {
|
|
452
|
-
if (messageLink === "undefined" || directLink === "undefined") {
|
|
453
|
-
return alert(errorText);
|
|
454
|
-
}
|
|
455
|
-
if (typeof SquatchAndroid.shareOnFacebook !== "undefined") {
|
|
456
|
-
return SquatchAndroid.shareOnFacebook(directLink, messageLink);
|
|
457
|
-
}
|
|
458
|
-
else {
|
|
459
|
-
return GenericShare(messageLink, errorText);
|
|
460
|
-
}
|
|
461
|
-
}
|
|
462
|
-
function GenericShare(messageLink, errorText) {
|
|
463
|
-
return messageLink ? (window.location.href = messageLink) : alert(errorText);
|
|
464
|
-
}
|
|
465
|
-
function useShareButton(props) {
|
|
466
|
-
var _a, _b, _c, _d;
|
|
467
|
-
const { sharetitle, sharetext, medium } = props;
|
|
468
|
-
const programId = props.programId ? props.programId : H();
|
|
469
|
-
const user = J();
|
|
470
|
-
const engagementMedium = B();
|
|
471
|
-
const variables = {
|
|
472
|
-
engagementMedium,
|
|
473
|
-
programId: programId,
|
|
474
|
-
shareMedium: medium.toUpperCase(),
|
|
475
|
-
};
|
|
476
|
-
const contextData = Fn(REFERRAL_CODES_NAMESPACE);
|
|
477
|
-
const overrideData = contextData === null || contextData === void 0 ? void 0 : contextData[medium];
|
|
478
|
-
// only queries if a programId is available
|
|
479
|
-
const res = wn(MessageLinkQuery$1, variables, !(user === null || user === void 0 ? void 0 : user.jwt) || !programId || overrideData !== undefined);
|
|
480
|
-
const [setCopied, copiedRes] = $e(SET_CODE_COPIED);
|
|
481
|
-
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);
|
|
482
|
-
const environment = getEnvironmentSDK();
|
|
483
|
-
const hide = (medium.toLocaleUpperCase() === "SMS" &&
|
|
484
|
-
window.orientation === undefined) ||
|
|
485
|
-
(medium.toLocaleUpperCase() === "DIRECT" && !window.navigator.share);
|
|
486
|
-
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);
|
|
487
|
-
async function onClick() {
|
|
488
|
-
if (overrideData) {
|
|
489
|
-
await setCopied({ referralCode: contextData.referralCode });
|
|
490
|
-
contextData.refresh();
|
|
491
|
-
}
|
|
492
|
-
if (medium.toLocaleUpperCase() === "FACEBOOK" &&
|
|
493
|
-
environment.type === "SquatchAndroid") {
|
|
494
|
-
FacebookShare(directLink, messageLink, props.errorText);
|
|
495
|
-
}
|
|
496
|
-
else if (medium.toLocaleUpperCase() === "DIRECT") {
|
|
497
|
-
NativeShare({ sharetitle, sharetext }, directLink, props.errorText, props.unsupportedPlatformText);
|
|
498
|
-
}
|
|
499
|
-
}
|
|
500
|
-
const isPlainLink = !(medium.toLocaleUpperCase() === "FACEBOOK" &&
|
|
501
|
-
environment.type === "SquatchAndroid") &&
|
|
502
|
-
medium.toLocaleUpperCase() !== "DIRECT" &&
|
|
503
|
-
messageLink;
|
|
504
|
-
const userAgent = window.navigator.userAgent.toLowerCase(), safari = /safari/.test(userAgent), ios = /iphone|ipod|ipad/.test(userAgent);
|
|
505
|
-
const openInSameTab = ios && !safari;
|
|
506
|
-
return {
|
|
507
|
-
...props,
|
|
508
|
-
loading: res.loading && !(overrideData === null || overrideData === void 0 ? void 0 : overrideData.messageLink),
|
|
509
|
-
messageLink,
|
|
510
|
-
isPlainLink,
|
|
511
|
-
onClick,
|
|
512
|
-
openInSameTab,
|
|
513
|
-
hide,
|
|
514
|
-
};
|
|
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 })));
|
|
515
292
|
}
|
|
516
293
|
|
|
517
294
|
const debug = browser("sq:useBigStat");
|
|
@@ -598,12 +375,18 @@ const customFieldsQuery = (_programId, locale, fieldName, goalId) => {
|
|
|
598
375
|
};
|
|
599
376
|
});
|
|
600
377
|
};
|
|
601
|
-
const referralsMonthQuery = (programId) => {
|
|
378
|
+
const referralsMonthQuery = (programId, status) => {
|
|
602
379
|
const programFilter = programId === "classic"
|
|
603
380
|
? { programId_exists: false }
|
|
604
381
|
: { programId_eq: programId };
|
|
605
|
-
const
|
|
382
|
+
const convertedFilter = status && status == "converted"
|
|
383
|
+
? { dateConverted_exists: true }
|
|
384
|
+
: status && status == "started"
|
|
385
|
+
? { dateConverted_exists: false }
|
|
386
|
+
: {};
|
|
387
|
+
const filter = {
|
|
606
388
|
...programFilter,
|
|
389
|
+
...convertedFilter,
|
|
607
390
|
dateReferralStarted_timeframe: "this_month",
|
|
608
391
|
};
|
|
609
392
|
return debugQuery(dist.gql `
|
|
@@ -1046,6 +829,92 @@ const rewardsAssignedQuery = (programId, locale, type, unit, global = "") => {
|
|
|
1046
829
|
};
|
|
1047
830
|
});
|
|
1048
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
|
+
};
|
|
1049
918
|
const rewardsAvailableQuery = (programId, locale, type, unit, global = "") => {
|
|
1050
919
|
return debugQuery(dist.gql `
|
|
1051
920
|
query (
|
|
@@ -1251,6 +1120,14 @@ const queries = {
|
|
|
1251
1120
|
label: "Rewards Pending",
|
|
1252
1121
|
query: rewardsPendingQuery,
|
|
1253
1122
|
},
|
|
1123
|
+
rewardsExpired: {
|
|
1124
|
+
label: "Rewards Expired",
|
|
1125
|
+
query: rewardsExpiredQuery,
|
|
1126
|
+
},
|
|
1127
|
+
rewardsCancelled: {
|
|
1128
|
+
label: "Rewards Cancelled",
|
|
1129
|
+
query: rewardsCancelledQuery,
|
|
1130
|
+
},
|
|
1254
1131
|
rewardsRedeemed: {
|
|
1255
1132
|
label: "Rewards Paid",
|
|
1256
1133
|
query: rewardsRedeemedQuery,
|
|
@@ -1324,19 +1201,20 @@ const queries = {
|
|
|
1324
1201
|
query: payoutBalanceQuery,
|
|
1325
1202
|
},
|
|
1326
1203
|
};
|
|
1204
|
+
// ! Any update to this should be reflected in StatPathBuilder.tsx in the saasquatch repo
|
|
1327
1205
|
// this should be exposed in documentation somehow
|
|
1328
1206
|
const StatPaths = [
|
|
1329
1207
|
{ name: "programGoals", route: "/(programGoals)/:metricType/:goalId" },
|
|
1330
1208
|
{ name: "customFields", route: "/(customFields)/:customField" },
|
|
1331
1209
|
{ name: "referralsCount", route: "/(referralsCount)/:status?" },
|
|
1332
|
-
{ name: "referralsMonth", route: "/(referralsMonth)" },
|
|
1333
|
-
{ name: "referralsWeek", route: "/(referralsWeek)" },
|
|
1210
|
+
{ name: "referralsMonth", route: "/(referralsMonth)/:status?" },
|
|
1211
|
+
{ name: "referralsWeek", route: "/(referralsWeek)/:status?" },
|
|
1334
1212
|
{ name: "rewardsCount", route: "/(rewardsCount)/:global?" },
|
|
1335
1213
|
{ name: "rewardsMonth", route: "/(rewardsMonth)/:global?" },
|
|
1336
1214
|
{ name: "rewardsWeek", route: "/(rewardsWeek)/:global?" },
|
|
1337
1215
|
{
|
|
1338
1216
|
name: "rewardsCountFiltered",
|
|
1339
|
-
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?",
|
|
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?",
|
|
1340
1218
|
},
|
|
1341
1219
|
{
|
|
1342
1220
|
name: "integrationRewardsCountFiltered",
|
|
@@ -1346,6 +1224,14 @@ const StatPaths = [
|
|
|
1346
1224
|
name: "rewardsAssigned",
|
|
1347
1225
|
route: "/(rewardsAssigned)/:statType/:unit/:global?",
|
|
1348
1226
|
},
|
|
1227
|
+
{
|
|
1228
|
+
name: "rewardsExpired",
|
|
1229
|
+
route: "/(rewardsExpired)/:statType/:unit/:global?",
|
|
1230
|
+
},
|
|
1231
|
+
{
|
|
1232
|
+
name: "rewardsCancelled",
|
|
1233
|
+
route: "/(rewardsCancelled)/:statType/:unit/:global?",
|
|
1234
|
+
},
|
|
1349
1235
|
{
|
|
1350
1236
|
name: "rewardsPending",
|
|
1351
1237
|
route: "/(rewardsPending)/:statType/:unit/:global?",
|
|
@@ -1396,10 +1282,15 @@ function useBigStat(props) {
|
|
|
1396
1282
|
return {
|
|
1397
1283
|
props: {
|
|
1398
1284
|
value: 0,
|
|
1399
|
-
statvalue: "
|
|
1285
|
+
statvalue: "-",
|
|
1400
1286
|
flexReverse,
|
|
1401
1287
|
alignment,
|
|
1402
1288
|
loading: false,
|
|
1289
|
+
statTextColor: props.statTextColor,
|
|
1290
|
+
statFontSize: props.statFontSize,
|
|
1291
|
+
descriptionTextColor: props.descriptionTextColor,
|
|
1292
|
+
descriptionFontSize: props.descriptionFontSize,
|
|
1293
|
+
statFontWeight: props.statFontWeight,
|
|
1403
1294
|
},
|
|
1404
1295
|
label: "BAD PROP TYPE",
|
|
1405
1296
|
};
|
|
@@ -1429,6 +1320,11 @@ function useBigStat(props) {
|
|
|
1429
1320
|
loading: stat === null || stat === void 0 ? void 0 : stat.loading,
|
|
1430
1321
|
flexReverse,
|
|
1431
1322
|
alignment,
|
|
1323
|
+
statTextColor: props.statTextColor,
|
|
1324
|
+
statFontSize: props.statFontSize,
|
|
1325
|
+
descriptionTextColor: props.descriptionTextColor,
|
|
1326
|
+
descriptionFontSize: props.descriptionFontSize,
|
|
1327
|
+
statFontWeight: props.statFontWeight,
|
|
1432
1328
|
},
|
|
1433
1329
|
label,
|
|
1434
1330
|
};
|
|
@@ -1443,10 +1339,14 @@ function useDemoBigStat(props) {
|
|
|
1443
1339
|
return {
|
|
1444
1340
|
props: {
|
|
1445
1341
|
value: 0,
|
|
1446
|
-
statvalue: "
|
|
1342
|
+
statvalue: "-",
|
|
1447
1343
|
loading: false,
|
|
1448
|
-
flexReverse:
|
|
1449
|
-
alignment:
|
|
1344
|
+
flexReverse: props.flexReverse,
|
|
1345
|
+
alignment: props.alignment,
|
|
1346
|
+
statTextColor: props.statTextColor,
|
|
1347
|
+
statFontSize: props.statFontSize,
|
|
1348
|
+
descriptionTextColor: props.descriptionTextColor,
|
|
1349
|
+
descriptionFontSize: props.descriptionFontSize,
|
|
1450
1350
|
},
|
|
1451
1351
|
label: "BAD PROP TYPE",
|
|
1452
1352
|
};
|
|
@@ -1458,369 +1358,100 @@ function useDemoBigStat(props) {
|
|
|
1458
1358
|
props: cjs({
|
|
1459
1359
|
statvalue: "12345",
|
|
1460
1360
|
value: 0,
|
|
1461
|
-
flexReverse:
|
|
1462
|
-
alignment:
|
|
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,
|
|
1463
1368
|
}, props.demoData || {}, { arrayMerge: (_, a) => a }),
|
|
1464
1369
|
label: label !== null && label !== void 0 ? label : "Demo Label",
|
|
1465
1370
|
};
|
|
1466
1371
|
}
|
|
1467
1372
|
|
|
1468
|
-
function
|
|
1469
|
-
const divideSpace = () => {
|
|
1470
|
-
const spaceValue = getComputedStyle(document.documentElement).getPropertyValue(`--sl-spacing-${props.space}`);
|
|
1471
|
-
return `${Math.floor(parseInt(spaceValue) / 2)}rem`;
|
|
1472
|
-
};
|
|
1373
|
+
function CardFeedView(props, children) {
|
|
1473
1374
|
// Dependent on props, not feasiable to move out
|
|
1474
1375
|
const style = {
|
|
1475
|
-
|
|
1476
|
-
|
|
1477
|
-
|
|
1478
|
-
"
|
|
1479
|
-
|
|
1480
|
-
// First set of styles applies when shadow DOM is disabled, second set applies when shadow DOM is enabled
|
|
1481
|
-
"& > *": {
|
|
1482
|
-
"border-right": "1px solid #EAEAEA",
|
|
1483
|
-
"padding-right": divideSpace(),
|
|
1484
|
-
},
|
|
1485
|
-
"& > :last-child": {
|
|
1486
|
-
"border-right": "none",
|
|
1487
|
-
},
|
|
1488
|
-
"& > ::slotted(*)": {
|
|
1489
|
-
"border-right": "1px solid #EAEAEA",
|
|
1490
|
-
"padding-right": divideSpace(),
|
|
1491
|
-
height: "100%",
|
|
1492
|
-
},
|
|
1493
|
-
"& > ::slotted(*:last-child)": {
|
|
1494
|
-
"border-right": "none",
|
|
1495
|
-
},
|
|
1496
|
-
"@media screen and (max-width: 430px)": {
|
|
1497
|
-
"& > ::slotted(*)": {
|
|
1498
|
-
borderRight: "none",
|
|
1499
|
-
},
|
|
1376
|
+
Container: {
|
|
1377
|
+
columnGap: props.gap + "px",
|
|
1378
|
+
columnWidth: props.width + "px",
|
|
1379
|
+
"& > div": {
|
|
1380
|
+
marginBottom: "24px",
|
|
1500
1381
|
},
|
|
1501
1382
|
},
|
|
1502
|
-
StatFrame: {
|
|
1503
|
-
display: "flex",
|
|
1504
|
-
},
|
|
1505
|
-
BorderFix: {
|
|
1506
|
-
"border-right": "1px solid transparent",
|
|
1507
|
-
width: "0px",
|
|
1508
|
-
"margin-left": "-1px",
|
|
1509
|
-
},
|
|
1510
1383
|
};
|
|
1511
1384
|
const sheet = createStyleSheet(style);
|
|
1512
1385
|
const styleString = sheet.toString();
|
|
1513
|
-
|
|
1514
|
-
|
|
1515
|
-
|
|
1516
|
-
|
|
1517
|
-
|
|
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)));
|
|
1518
1397
|
}
|
|
1519
1398
|
|
|
1520
|
-
|
|
1521
|
-
|
|
1522
|
-
|
|
1523
|
-
|
|
1524
|
-
|
|
1525
|
-
|
|
1526
|
-
"margin-top": "var(--sl-spacing-medium)",
|
|
1527
|
-
},
|
|
1528
|
-
"&::part(body)": {
|
|
1529
|
-
padding: "0 var(--sl-spacing-x-large) var(--sl-spacing-x-large) var(--sl-spacing-x-large)",
|
|
1399
|
+
const style$1 = {
|
|
1400
|
+
Description: {
|
|
1401
|
+
"& .icon": {
|
|
1402
|
+
color: "var(--sqm-text)",
|
|
1403
|
+
"&:hover": {
|
|
1404
|
+
color: "var(--sqm-accent-color-icon)",
|
|
1530
1405
|
},
|
|
1531
1406
|
},
|
|
1532
|
-
|
|
1533
|
-
"
|
|
1534
|
-
"margin-bottom": "15px",
|
|
1535
|
-
},
|
|
1407
|
+
"& input[type=checkbox]": {
|
|
1408
|
+
display: "none",
|
|
1536
1409
|
},
|
|
1537
|
-
|
|
1538
|
-
"
|
|
1539
|
-
"margin-bottom": "15px",
|
|
1540
|
-
},
|
|
1410
|
+
"& input:checked ~ .details": {
|
|
1411
|
+
transform: "rotate(-180deg)",
|
|
1541
1412
|
},
|
|
1542
|
-
|
|
1543
|
-
|
|
1544
|
-
|
|
1413
|
+
"& .details": {
|
|
1414
|
+
position: "absolute",
|
|
1415
|
+
top: "var(--sl-spacing-medium)",
|
|
1416
|
+
right: "var(--sl-spacing-medium)",
|
|
1417
|
+
color: "var(--sqm-text)",
|
|
1418
|
+
fontSize: "var(--sl-font-size-large)",
|
|
1419
|
+
"& :hover": {
|
|
1420
|
+
color: "var(--sl-color-primary-700)",
|
|
1545
1421
|
},
|
|
1422
|
+
transformOrigin: "50% 37%",
|
|
1423
|
+
transition: "transform var(--sl-transition-medium) ease",
|
|
1424
|
+
cursor: "pointer",
|
|
1546
1425
|
},
|
|
1547
|
-
|
|
1548
|
-
|
|
1549
|
-
|
|
1426
|
+
"& input:checked ~ .summary": {
|
|
1427
|
+
transition: "all var(--sl-transition-medium) ease",
|
|
1428
|
+
maxHeight: "300px",
|
|
1429
|
+
marginBottom: "var(--sl-spacing-x-large)",
|
|
1550
1430
|
},
|
|
1551
|
-
|
|
1552
|
-
marginBottom: "var(--sl-spacing-large)
|
|
1553
|
-
display: "block",
|
|
1431
|
+
"& input:checked ~ .summary[progress-bar]": {
|
|
1432
|
+
marginBottom: "var(--sl-spacing-xx-large)",
|
|
1554
1433
|
},
|
|
1555
|
-
|
|
1556
|
-
|
|
1434
|
+
"& .summary": {
|
|
1435
|
+
display: "block",
|
|
1436
|
+
overflow: "hidden",
|
|
1437
|
+
fontSize: "var(--sl-font-size-small)",
|
|
1438
|
+
maxHeight: "0px",
|
|
1439
|
+
transition: "all var(--sl-transition-fast) ease-out",
|
|
1440
|
+
marginBottom: "var(--sl-spacing-medium)",
|
|
1557
1441
|
},
|
|
1558
|
-
};
|
|
1559
|
-
const sheet = createStyleSheet(style);
|
|
1560
|
-
const styleString = sheet.toString();
|
|
1561
|
-
return (h("div", null,
|
|
1562
|
-
h("style", { type: "text/css" }, styleString),
|
|
1563
|
-
h("sl-dialog", { class: sheet.classes.Dialog, open: states.open, "onSl-hide": () => callbacks.setOpen(false) },
|
|
1564
|
-
h(PortalSectionView, Object.assign({}, {
|
|
1565
|
-
labelMargin: "x-large",
|
|
1566
|
-
padding: "none",
|
|
1567
|
-
label: (h(TextSpanView, Object.assign({}, { type: "h2" }), states.content.modalChangePasswordHeader)),
|
|
1568
|
-
content: (h(PortalContainerView, Object.assign({}, { direction: "column", padding: "none", gap: "32px" }),
|
|
1569
|
-
states.error && (h("sqm-form-message", { class: sheet.classes.Error, type: "error", exportparts: "erroralert-icon" },
|
|
1570
|
-
h("div", { part: "erroralert-text" }, states.error))),
|
|
1571
|
-
states.success && (h("sqm-form-message", { class: sheet.classes.Success, type: "success", exportparts: "successalert-icon" },
|
|
1572
|
-
h("div", { part: "successalert-text" }, states.content.successMessage))),
|
|
1573
|
-
h("sl-form", { "onSl-submit": callbacks.submit },
|
|
1574
|
-
h("div", { class: sheet.classes.InputContainer },
|
|
1575
|
-
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 }),
|
|
1576
|
-
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" })),
|
|
1577
|
-
h(PortalContainerView, Object.assign({}, { direction: "row", padding: "none", gap: "20px" }),
|
|
1578
|
-
h("sl-button", { class: sheet.classes.ChangePasswordButton, type: "primary", submit: true, loading: states.loading }, states.content.changePasswordButtonText),
|
|
1579
|
-
h("sl-button", { class: sheet.classes.CancelButton, type: "text", onClick: () => callbacks.setOpen(false) }, states.content.cancelText))))),
|
|
1580
|
-
}))),
|
|
1581
|
-
h(PortalSectionView, Object.assign({}, {
|
|
1582
|
-
labelMargin: "x-large",
|
|
1583
|
-
padding: "xxx-large",
|
|
1584
|
-
label: (h(TextSpanView, Object.assign({}, { type: "h2" }), states.content.portalChangePasswordHeader)),
|
|
1585
|
-
content: (h("sl-button", { onClick: () => callbacks.setOpen(true) }, states.content.portalChangePasswordButtonText)),
|
|
1586
|
-
}),
|
|
1587
|
-
h("style", { type: "text/css" }, styleString))));
|
|
1588
|
-
}
|
|
1589
|
-
|
|
1590
|
-
const style$3 = {
|
|
1591
|
-
Wrapper: { ...AuthWrapper, "max-width": "600px" },
|
|
1592
|
-
Column: AuthColumn,
|
|
1593
|
-
HostBlock: HostBlock,
|
|
1594
|
-
":host": {
|
|
1595
|
-
margin: "0 auto",
|
|
1596
|
-
width: "100%",
|
|
1597
1442
|
},
|
|
1598
|
-
ButtonsContainer: AuthButtonsContainer,
|
|
1599
|
-
ErrorStyle: ErrorStyles,
|
|
1600
1443
|
};
|
|
1601
|
-
const
|
|
1602
|
-
|
|
1603
|
-
|
|
1604
|
-
|
|
1605
|
-
|
|
1606
|
-
}
|
|
1607
|
-
|
|
1608
|
-
:
|
|
1609
|
-
|
|
1610
|
-
}
|
|
1611
|
-
|
|
1612
|
-
:host([hidden]) {
|
|
1613
|
-
display: none;
|
|
1614
|
-
}
|
|
1615
|
-
`;
|
|
1616
|
-
const sheet$3 = createStyleSheet(style$3);
|
|
1617
|
-
const styleString$3 = sheet$3.toString();
|
|
1618
|
-
function PortalRegisterView(props) {
|
|
1619
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
|
|
1620
|
-
const { states, refs, callbacks, content } = props;
|
|
1621
|
-
if (states.error) {
|
|
1622
|
-
window.scrollTo({ top: 0, left: 0, behavior: "smooth" });
|
|
1623
|
-
}
|
|
1624
|
-
return (h("div", { class: sheet$3.classes.Wrapper, part: "sqm-base" },
|
|
1625
|
-
h("style", { type: "text/css" },
|
|
1626
|
-
vanillaStyle$1,
|
|
1627
|
-
styleString$3),
|
|
1628
|
-
h(TextSpanView, { type: "h3" }, content.pageLabel),
|
|
1629
|
-
h("sl-form", { class: sheet$3.classes.Column, "onSl-submit": callbacks.submit, ref: (el) => (refs.formRef.current = el), novalidate: true },
|
|
1630
|
-
states.error && (h("sqm-form-message", { type: "error", exportparts: "erroralert-icon" },
|
|
1631
|
-
h("div", { part: "erroralert-text" }, props.states.error))),
|
|
1632
|
-
content.formData,
|
|
1633
|
-
!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 }) => {
|
|
1634
|
-
if (!value) {
|
|
1635
|
-
return content.requiredFieldErrorMessage;
|
|
1636
|
-
}
|
|
1637
|
-
// this matches shoelace validation, but could be better
|
|
1638
|
-
if (!value.includes("@")) {
|
|
1639
|
-
return content.invalidEmailErrorMessage;
|
|
1640
|
-
}
|
|
1641
|
-
} }, (((_b = (_a = states.registrationFormState) === null || _a === void 0 ? void 0 : _a.validationErrors) === null || _b === void 0 ? void 0 : _b.email) ? {
|
|
1642
|
-
class: sheet$3.classes.ErrorStyle,
|
|
1643
|
-
helpText: ((_d = (_c = states.registrationFormState) === null || _c === void 0 ? void 0 : _c.validationErrors) === null || _d === void 0 ? void 0 : _d.email) ||
|
|
1644
|
-
content.requiredFieldErrorMessage,
|
|
1645
|
-
}
|
|
1646
|
-
: [])))),
|
|
1647
|
-
!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 })),
|
|
1648
|
-
content.passwordField,
|
|
1649
|
-
!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) ? {
|
|
1650
|
-
value: (_j = (_h = states.registrationFormState) === null || _h === void 0 ? void 0 : _h.initialData) === null || _j === void 0 ? void 0 : _j.confirmPassword,
|
|
1651
|
-
}
|
|
1652
|
-
: {}), (((_l = (_k = states.registrationFormState) === null || _k === void 0 ? void 0 : _k.validationErrors) === null || _l === void 0 ? void 0 : _l.confirmPassword) ? {
|
|
1653
|
-
class: sheet$3.classes.ErrorStyle,
|
|
1654
|
-
helpText: ((_o = (_m = states.registrationFormState) === null || _m === void 0 ? void 0 : _m.validationErrors) === null || _o === void 0 ? void 0 : _o.confirmPassword) || content.requiredFieldErrorMessage,
|
|
1655
|
-
}
|
|
1656
|
-
: [])))),
|
|
1657
|
-
content.terms,
|
|
1658
|
-
h("div", { class: sheet$3.classes.ButtonsContainer },
|
|
1659
|
-
h("sl-button", { submit: true, loading: states.loading, exportparts: "base: primarybutton-base", type: "primary" }, content.submitLabel || "Register"),
|
|
1660
|
-
content.secondaryButton))));
|
|
1661
|
-
}
|
|
1662
|
-
|
|
1663
|
-
const style$4 = {
|
|
1664
|
-
ErrorStyle: {
|
|
1665
|
-
"&::part(control)": {
|
|
1666
|
-
borderColor: "var(--sl-color-danger-500)",
|
|
1667
|
-
outline: "var(--sl-color-danger-500)",
|
|
1668
|
-
},
|
|
1669
|
-
"&:host": {
|
|
1670
|
-
"--focus-ring": "0 0 0 var(--sl-focus-ring-width) red !important",
|
|
1671
|
-
},
|
|
1672
|
-
},
|
|
1673
|
-
ErrorMessageStyle: {
|
|
1674
|
-
margin: 0,
|
|
1675
|
-
marginTop: "5px",
|
|
1676
|
-
color: "var(--sl-color-danger-500)",
|
|
1677
|
-
fontSize: "var(--sl-input-help-text-font-size-medium)",
|
|
1678
|
-
fontFamily: "var(--sl-font-sans)",
|
|
1679
|
-
fontWeight: "var(--sl-font-weight-normal)",
|
|
1680
|
-
},
|
|
1681
|
-
FieldContainer: {
|
|
1682
|
-
"margin-bottom": "var(--sl-spacing-large)",
|
|
1683
|
-
},
|
|
1684
|
-
};
|
|
1685
|
-
const vanillaStyle$2 = `
|
|
1686
|
-
:host {
|
|
1687
|
-
margin: 0 auto;
|
|
1688
|
-
width: 100%;
|
|
1689
|
-
display: block;
|
|
1690
|
-
}
|
|
1691
|
-
sl-checkbox::part(label){
|
|
1692
|
-
font-size: var(--sl-input-label-font-size-small);
|
|
1693
|
-
font-weight: var(--sl-font-weight-normal);
|
|
1694
|
-
line-height: 20px;
|
|
1695
|
-
}
|
|
1696
|
-
sl-checkbox::part(base){
|
|
1697
|
-
align-items: start;
|
|
1698
|
-
}
|
|
1699
|
-
`;
|
|
1700
|
-
jss.setup(create());
|
|
1701
|
-
const sheet$4 = jss.createStyleSheet(style$4);
|
|
1702
|
-
const styleString$4 = sheet$4.toString();
|
|
1703
|
-
function CheckboxFieldView(props) {
|
|
1704
|
-
var _a, _b, _c, _d, _e;
|
|
1705
|
-
const { states, content, callbacks } = props;
|
|
1706
|
-
const validationErrors = (_a = states === null || states === void 0 ? void 0 : states.registrationFormState) === null || _a === void 0 ? void 0 : _a.validationErrors;
|
|
1707
|
-
return (h("div", { class: sheet$4.classes.FieldContainer, part: "sqm-base" },
|
|
1708
|
-
h("style", { type: "text/css" },
|
|
1709
|
-
vanillaStyle$2,
|
|
1710
|
-
styleString$4),
|
|
1711
|
-
h("sl-checkbox", Object.assign({ exportparts: "label: input-label, base: input-base", name: `/${content.checkboxName}`, checked: states.checked, "onSl-change": (e) => {
|
|
1712
|
-
e.target.value = e.target.checked;
|
|
1713
|
-
callbacks.setChecked(e.target.value);
|
|
1714
|
-
} }, (!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), validationError: ({ value }) => {
|
|
1715
|
-
if (!value && !content.checkboxOptional) {
|
|
1716
|
-
return content.errorMessage;
|
|
1717
|
-
}
|
|
1718
|
-
} }, (((_e = (_d = states.registrationFormState) === null || _d === void 0 ? void 0 : _d.validationErrors) === null || _e === void 0 ? void 0 : _e[content.checkboxName]) ? {
|
|
1719
|
-
class: sheet$4.classes.ErrorStyle,
|
|
1720
|
-
}
|
|
1721
|
-
: [])), intl.formatMessage({
|
|
1722
|
-
id: content.checkboxName + "-message",
|
|
1723
|
-
defaultMessage: content.checkboxLabel,
|
|
1724
|
-
}, {
|
|
1725
|
-
labelLink: (h("a", { href: content.checkboxLabelLink, target: "_blank" }, content.checkboxLabelLinkText || content.checkboxLabelLink)),
|
|
1726
|
-
})),
|
|
1727
|
-
(validationErrors === null || validationErrors === void 0 ? void 0 : validationErrors[content.checkboxName]) && (h("p", { class: sheet$4.classes.ErrorMessageStyle }, content.errorMessage))));
|
|
1728
|
-
}
|
|
1729
|
-
|
|
1730
|
-
function ChangeMarktingView(props) {
|
|
1731
|
-
const { states, callbacks } = props;
|
|
1732
|
-
const { text, formState } = states;
|
|
1733
|
-
const { error } = formState;
|
|
1734
|
-
const style = {
|
|
1735
|
-
Container: {
|
|
1736
|
-
display: "flex",
|
|
1737
|
-
flexDirection: "column",
|
|
1738
|
-
gap: "var(--sl-spacing-x-small)",
|
|
1739
|
-
padding: "0 var(--sl-spacing-xxx-large) var(--sl-spacing-xxx-large)",
|
|
1740
|
-
},
|
|
1741
|
-
SubmitButton: { marginBottom: "var(--sl-spacing-medium)" },
|
|
1742
|
-
Error: {
|
|
1743
|
-
"&::part(erroralert-base)": {
|
|
1744
|
-
"margin-bottom": "15px",
|
|
1745
|
-
},
|
|
1746
|
-
},
|
|
1747
|
-
Success: {
|
|
1748
|
-
"&::part(successalert-base)": {
|
|
1749
|
-
"margin-bottom": "15px",
|
|
1750
|
-
},
|
|
1751
|
-
},
|
|
1752
|
-
};
|
|
1753
|
-
const sheet = createStyleSheet(style);
|
|
1754
|
-
const styleString = sheet.toString();
|
|
1755
|
-
return (h("div", { class: sheet.classes.Container, part: "sqm-base" },
|
|
1756
|
-
h("style", { type: "text/css" }, styleString),
|
|
1757
|
-
h(TextSpanView, Object.assign({}, { type: "h2" }), text.emailPreferencesHeader),
|
|
1758
|
-
h("sl-form", { "onSl-submit": callbacks.onSubmit },
|
|
1759
|
-
h(CheckboxFieldView, { states: {
|
|
1760
|
-
checked: states.formState.marketingEmailOptIn,
|
|
1761
|
-
}, content: {
|
|
1762
|
-
checkboxLabel: text.marketingCheckboxLabel,
|
|
1763
|
-
checkboxName: "marketingEmailOptIn",
|
|
1764
|
-
}, callbacks: {
|
|
1765
|
-
setChecked: callbacks.setChecked,
|
|
1766
|
-
} }),
|
|
1767
|
-
h("sl-button", { class: sheet.classes.SubmitButton, type: "primary", submit: true, loading: states.loading, disabled: states.submitDisabled }, text.submitChangeButtonText),
|
|
1768
|
-
error && (h("sqm-form-message", { class: sheet.classes.Error, type: "error", exportparts: "erroralert-icon" },
|
|
1769
|
-
h("div", { part: "erroralert-text" }, error))),
|
|
1770
|
-
states.success && (h("sqm-form-message", { class: sheet.classes.Success, type: "success", exportparts: "successalert-icon" },
|
|
1771
|
-
h("div", { part: "successalert-text" }, states.text.successMessage))))));
|
|
1772
|
-
}
|
|
1773
|
-
|
|
1774
|
-
const style$5 = {
|
|
1775
|
-
Description: {
|
|
1776
|
-
"& input[type=checkbox]": {
|
|
1777
|
-
display: "none",
|
|
1778
|
-
},
|
|
1779
|
-
"& input:checked ~ .details": {
|
|
1780
|
-
transform: "rotate(-180deg)",
|
|
1781
|
-
},
|
|
1782
|
-
"& .details": {
|
|
1783
|
-
position: "absolute",
|
|
1784
|
-
top: "var(--sl-spacing-medium)",
|
|
1785
|
-
right: "var(--sl-spacing-medium)",
|
|
1786
|
-
color: "var(--sl-color-neutral-700)",
|
|
1787
|
-
fontSize: "var(--sl-font-size-large)",
|
|
1788
|
-
"& :hover": {
|
|
1789
|
-
color: "var(--sl-color-primary-700)",
|
|
1790
|
-
},
|
|
1791
|
-
transformOrigin: "50% 37%",
|
|
1792
|
-
transition: "transform var(--sl-transition-medium) ease",
|
|
1793
|
-
cursor: "pointer",
|
|
1794
|
-
},
|
|
1795
|
-
"& input:checked ~ .summary": {
|
|
1796
|
-
transition: "all var(--sl-transition-medium) ease",
|
|
1797
|
-
maxHeight: "300px",
|
|
1798
|
-
marginBottom: "var(--sl-spacing-x-large)",
|
|
1799
|
-
},
|
|
1800
|
-
"& input:checked ~ .summary[progress-bar]": {
|
|
1801
|
-
marginBottom: "var(--sl-spacing-xx-large)",
|
|
1802
|
-
},
|
|
1803
|
-
"& .summary": {
|
|
1804
|
-
display: "block",
|
|
1805
|
-
overflow: "hidden",
|
|
1806
|
-
fontSize: "var(--sl-font-size-small)",
|
|
1807
|
-
maxHeight: "0px",
|
|
1808
|
-
transition: "all var(--sl-transition-fast) ease-out",
|
|
1809
|
-
marginBottom: "var(--sl-spacing-medium)",
|
|
1810
|
-
},
|
|
1811
|
-
},
|
|
1812
|
-
};
|
|
1813
|
-
const sheet$5 = createStyleSheet(style$5);
|
|
1814
|
-
const styleString$5 = sheet$5.toString();
|
|
1815
|
-
function Details(props) {
|
|
1816
|
-
const rid = Math.random().toString(36).slice(2);
|
|
1817
|
-
return (h("div", { style: { opacity: props.opacity } },
|
|
1818
|
-
h("style", { type: "text/css" }, styleString$5),
|
|
1819
|
-
h("span", { class: sheet$5.classes.Description },
|
|
1820
|
-
h("input", { type: "checkbox", id: "details-" + rid }),
|
|
1821
|
-
h("label", { class: "details", htmlFor: "details-" + rid },
|
|
1822
|
-
h("sl-icon", { exportparts: "base: chevron-icon", name: "chevron-down" })),
|
|
1823
|
-
h("span", { class: "summary", "progress-bar": props.progressBar }, props.content.description))));
|
|
1444
|
+
const sheet$1 = createStyleSheet(style$1);
|
|
1445
|
+
const styleString$1 = sheet$1.toString();
|
|
1446
|
+
function Details(props) {
|
|
1447
|
+
const rid = Math.random().toString(36).slice(2);
|
|
1448
|
+
return (h("div", { style: { opacity: props.opacity } },
|
|
1449
|
+
h("style", { type: "text/css" }, styleString$1),
|
|
1450
|
+
h("span", { class: sheet$1.classes.Description },
|
|
1451
|
+
h("input", { type: "checkbox", id: "details-" + rid }),
|
|
1452
|
+
h("label", { class: "details", htmlFor: "details-" + rid },
|
|
1453
|
+
h("sl-icon", { class: "icon", exportparts: "base: chevron-icon", name: "chevron-down" })),
|
|
1454
|
+
h("span", { class: "summary", "progress-bar": props.progressBar }, props.content.description))));
|
|
1824
1455
|
}
|
|
1825
1456
|
|
|
1826
1457
|
const Gift = () => {
|
|
@@ -1838,7 +1469,7 @@ const GreyGift = () => {
|
|
|
1838
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" })));
|
|
1839
1470
|
};
|
|
1840
1471
|
|
|
1841
|
-
const style$
|
|
1472
|
+
const style$2 = {
|
|
1842
1473
|
ProgressBar: {
|
|
1843
1474
|
"& .progress-bar": {
|
|
1844
1475
|
height: "0",
|
|
@@ -1885,7 +1516,8 @@ const style$6 = {
|
|
|
1885
1516
|
width: "100%",
|
|
1886
1517
|
height: "4px",
|
|
1887
1518
|
borderRadius: "4px",
|
|
1888
|
-
backgroundColor: "var(--
|
|
1519
|
+
backgroundColor: "var(--sqm-accent-color-icon)",
|
|
1520
|
+
background: "red",
|
|
1889
1521
|
},
|
|
1890
1522
|
"& .progress": {
|
|
1891
1523
|
display: "block",
|
|
@@ -1898,7 +1530,7 @@ const style$6 = {
|
|
|
1898
1530
|
width: "12px",
|
|
1899
1531
|
height: "12px",
|
|
1900
1532
|
display: "flex",
|
|
1901
|
-
backgroundColor: "var(--
|
|
1533
|
+
backgroundColor: "var(--sqm-accent-color-icon)",
|
|
1902
1534
|
borderRadius: "50%",
|
|
1903
1535
|
position: "relative",
|
|
1904
1536
|
left: "47%",
|
|
@@ -1950,14 +1582,14 @@ const style$6 = {
|
|
|
1950
1582
|
},
|
|
1951
1583
|
},
|
|
1952
1584
|
};
|
|
1953
|
-
const sheet$
|
|
1954
|
-
const styleString$
|
|
1585
|
+
const sheet$2 = createStyleSheet(style$2, { classNamePrefix: "sqm-prog-bar" });
|
|
1586
|
+
const styleString$2 = sheet$2.toString();
|
|
1955
1587
|
function ProgressBarView(props) {
|
|
1956
1588
|
const { progress = 0, goal = 1, steps = false, progressBarUnit = "", repeatable = false, complete = false, expired = false, finite = 0, opacity = "1", } = props;
|
|
1957
1589
|
let aggregate = buildProgressBar(repeatable, steps, props);
|
|
1958
1590
|
const { columns, items } = aggregate;
|
|
1959
|
-
return (h("div", { class: sheet$
|
|
1960
|
-
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),
|
|
1961
1593
|
h("div", { class: (!Boolean(finite) && progress >= 2 * goal) ||
|
|
1962
1594
|
(Boolean(finite) && progress > 2 * goal)
|
|
1963
1595
|
? "progress-bar repeatable-steps"
|
|
@@ -2248,165 +1880,150 @@ const arrow_left_right = () => {
|
|
|
2248
1880
|
h("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M10.265 2.789a.346.346 0 000-.489L8.066.101a.346.346 0 10-.489.489l1.61 1.609H2.073a.691.691 0 00-.69.691v1.728a.346.346 0 00.69 0V2.89h7.114L7.577 4.5a.346.346 0 10.49.488l2.198-2.2zM.101 9.21a.346.346 0 000 .489l2.2 2.199a.346.346 0 00.488-.489l-1.61-1.609h7.114c.382 0 .691-.31.691-.691V7.382a.346.346 0 00-.691 0V9.11H1.18L2.789 7.5a.346.346 0 10-.489-.488l-2.199 2.2z", fill: "currentColor" })));
|
|
2249
1881
|
};
|
|
2250
1882
|
|
|
2251
|
-
|
|
2252
|
-
|
|
2253
|
-
|
|
2254
|
-
|
|
2255
|
-
|
|
2256
|
-
|
|
2257
|
-
|
|
2258
|
-
|
|
2259
|
-
|
|
2260
|
-
|
|
2261
|
-
|
|
1883
|
+
function TaskCardView(props) {
|
|
1884
|
+
var _a, _b;
|
|
1885
|
+
const { callbacks, states, content } = props;
|
|
1886
|
+
const style = {
|
|
1887
|
+
TaskCard: {
|
|
1888
|
+
display: "inline-block",
|
|
1889
|
+
width: "100%",
|
|
1890
|
+
"& .main": {
|
|
1891
|
+
position: "relative",
|
|
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)",
|
|
1897
|
+
fontSize: "var(--sl-font-size-small)",
|
|
1898
|
+
lineHeight: "var(--sl-line-height-dense)",
|
|
1899
|
+
color: content.textColor || "var(--sqm-text)",
|
|
1900
|
+
},
|
|
1901
|
+
"& .main.complete": {
|
|
1902
|
+
opacity: "0.8",
|
|
1903
|
+
borderColor: "var(--sqm-accent-color-border)",
|
|
1904
|
+
},
|
|
1905
|
+
"& .main.expired": {
|
|
1906
|
+
color: content.textColor || "var(--sqm-text)",
|
|
1907
|
+
opacity: "0.8",
|
|
1908
|
+
},
|
|
1909
|
+
"& .title": {
|
|
1910
|
+
fontSize: "var(--sl-font-size-medium)",
|
|
1911
|
+
color: content.textColor || "var(--sqm-text)",
|
|
1912
|
+
},
|
|
1913
|
+
"& .container": {
|
|
1914
|
+
margin: "var(--sl-spacing-medium)",
|
|
1915
|
+
},
|
|
1916
|
+
"& .container.subdued": {
|
|
1917
|
+
opacity: "0.45",
|
|
1918
|
+
},
|
|
1919
|
+
"& .container > div": {
|
|
1920
|
+
margin: "var(--sl-spacing-medium) 0",
|
|
1921
|
+
},
|
|
1922
|
+
},
|
|
1923
|
+
NotStarted: {
|
|
2262
1924
|
fontSize: "var(--sl-font-size-small)",
|
|
1925
|
+
padding: "var(--sl-spacing-medium)",
|
|
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",
|
|
1929
|
+
borderBottom: "none",
|
|
1930
|
+
background: content.backgroundColor || "var(--sl-color-primary-50)",
|
|
1931
|
+
fontWeight: "var(--sl-font-weight-semibold)",
|
|
2263
1932
|
lineHeight: "var(--sl-line-height-dense)",
|
|
2264
|
-
|
|
2265
|
-
|
|
2266
|
-
|
|
2267
|
-
|
|
2268
|
-
|
|
2269
|
-
|
|
2270
|
-
"& .main.expired": {
|
|
2271
|
-
color: "var(--sl-color-neutral-600)",
|
|
2272
|
-
background: "var(--sl-color-neutral-50)",
|
|
2273
|
-
},
|
|
2274
|
-
"& .title": {
|
|
2275
|
-
fontSize: "var(--sl-font-size-medium)",
|
|
2276
|
-
color: "var(--sl-color-neutral-950)",
|
|
2277
|
-
},
|
|
2278
|
-
"& .container": {
|
|
2279
|
-
margin: "var(--sl-spacing-medium)",
|
|
2280
|
-
},
|
|
2281
|
-
"& .container.subdued": {
|
|
2282
|
-
opacity: "0.45",
|
|
1933
|
+
"& .icon": {
|
|
1934
|
+
position: "relative",
|
|
1935
|
+
top: "0.1em",
|
|
1936
|
+
marginRight: "var(--sl-spacing-small)",
|
|
1937
|
+
color: content.textColor || "var(--sqm-text)",
|
|
1938
|
+
},
|
|
2283
1939
|
},
|
|
2284
|
-
|
|
2285
|
-
|
|
1940
|
+
Ended: {
|
|
1941
|
+
fontSize: "var(--sl-font-size-small)",
|
|
1942
|
+
padding: "var(--sl-spacing-medium)",
|
|
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",
|
|
1946
|
+
borderBottom: "none",
|
|
1947
|
+
background: content.backgroundColor || "var(--sqm-warning-color-background)",
|
|
1948
|
+
fontWeight: "var(--sl-font-weight-semibold)",
|
|
1949
|
+
lineHeight: "var(--sl-line-height-dense)",
|
|
1950
|
+
"& .icon": {
|
|
1951
|
+
position: "relative",
|
|
1952
|
+
top: "0.1em",
|
|
1953
|
+
marginRight: "var(--sl-spacing-small)",
|
|
1954
|
+
color: content.textColor || "var(--sqm-text)",
|
|
1955
|
+
},
|
|
2286
1956
|
},
|
|
2287
|
-
|
|
2288
|
-
|
|
2289
|
-
|
|
2290
|
-
|
|
2291
|
-
|
|
2292
|
-
|
|
2293
|
-
|
|
2294
|
-
|
|
2295
|
-
|
|
2296
|
-
|
|
2297
|
-
|
|
2298
|
-
|
|
2299
|
-
|
|
2300
|
-
|
|
2301
|
-
|
|
2302
|
-
|
|
2303
|
-
|
|
2304
|
-
|
|
2305
|
-
|
|
2306
|
-
|
|
2307
|
-
|
|
2308
|
-
|
|
2309
|
-
|
|
2310
|
-
|
|
2311
|
-
|
|
2312
|
-
|
|
2313
|
-
fontWeight: "var(--sl-font-weight-semibold)",
|
|
2314
|
-
lineHeight: "var(--sl-line-height-dense)",
|
|
2315
|
-
"& .icon": {
|
|
2316
|
-
position: "relative",
|
|
2317
|
-
top: "0.1em",
|
|
2318
|
-
marginRight: "var(--sl-spacing-small)",
|
|
2319
|
-
color: "var(--sl-color-warning-500)",
|
|
2320
|
-
},
|
|
2321
|
-
},
|
|
2322
|
-
Header: {
|
|
2323
|
-
display: "flex",
|
|
2324
|
-
"& .icon": {
|
|
2325
|
-
position: "relative",
|
|
2326
|
-
top: "5%",
|
|
2327
|
-
alignSelf: "center",
|
|
2328
|
-
lineHeight: "0",
|
|
2329
|
-
color: "var(--sl-color-primary-400)",
|
|
2330
|
-
fontSize: "var(--sl-font-size-large)",
|
|
2331
|
-
marginRight: "var(--sl-spacing-x-small)",
|
|
2332
|
-
},
|
|
2333
|
-
"& .value": {
|
|
2334
|
-
alignSelf: "center",
|
|
2335
|
-
fontSize: "var(--sl-font-size-x-large)",
|
|
2336
|
-
fontWeight: "var(--sl-font-weight-semibold)",
|
|
2337
|
-
color: "var(--sl-color-neutral-950)",
|
|
2338
|
-
lineHeight: "100%",
|
|
2339
|
-
marginRight: "var(--sl-spacing-xx-small)",
|
|
2340
|
-
},
|
|
2341
|
-
"& .text": {
|
|
2342
|
-
alignSelf: "end",
|
|
2343
|
-
textTransform: "uppercase",
|
|
2344
|
-
fontSize: "var(--sl-font-size-x-small)",
|
|
2345
|
-
color: "var(--sl-color-neutral-950)",
|
|
2346
|
-
lineHeight: "var(--sl-font-size-medium)",
|
|
2347
|
-
marginRight: "var(--sl-spacing-xx-small)",
|
|
2348
|
-
},
|
|
2349
|
-
"& .end": {
|
|
2350
|
-
color: "var(--sl-color-warning-500)",
|
|
2351
|
-
fontWeight: "var(--sl-font-weight-semibold)",
|
|
2352
|
-
marginBottom: "var(--sl-spacing-xx-small)",
|
|
2353
|
-
},
|
|
2354
|
-
"& .neutral": {
|
|
2355
|
-
color: "var(--sl-color-neutral-400)",
|
|
2356
|
-
},
|
|
2357
|
-
},
|
|
2358
|
-
Footer: {
|
|
2359
|
-
"&[data-subdue] .success": {
|
|
2360
|
-
color: "var(--sl-color-primary-300)",
|
|
2361
|
-
},
|
|
2362
|
-
"&[data-subdue] .neutral": {
|
|
2363
|
-
color: "var(--sl-color-neutral-300)",
|
|
2364
|
-
},
|
|
2365
|
-
display: "flex",
|
|
2366
|
-
"& .icon": {
|
|
2367
|
-
fontSize: "var(--sl-font-size-xx-small)",
|
|
2368
|
-
marginRight: "var(--sl-spacing-xx-small)",
|
|
2369
|
-
verticalAlign: "middle",
|
|
2370
|
-
},
|
|
2371
|
-
"& .text": {
|
|
2372
|
-
marginTop: "auto",
|
|
2373
|
-
verticalAlign: "text-bottom",
|
|
2374
|
-
fontSize: "var(--sl-font-size-x-small)",
|
|
2375
|
-
color: "var(--sl-color-neutral-400)",
|
|
2376
|
-
},
|
|
2377
|
-
"& .success": {
|
|
2378
|
-
color: "var(--sl-color-primary-500)",
|
|
2379
|
-
fontWeight: "var(--sl-font-weight-semibold)",
|
|
2380
|
-
},
|
|
2381
|
-
"& .action": {
|
|
2382
|
-
marginTop: "auto",
|
|
2383
|
-
marginLeft: "auto",
|
|
2384
|
-
"&::part(base)": {
|
|
2385
|
-
color: "var(--sl-color-neutral-0)",
|
|
1957
|
+
Header: {
|
|
1958
|
+
display: "flex",
|
|
1959
|
+
"& .icon": {
|
|
1960
|
+
position: "relative",
|
|
1961
|
+
top: "5%",
|
|
1962
|
+
alignSelf: "center",
|
|
1963
|
+
lineHeight: "0",
|
|
1964
|
+
color: "var(--sqm-accent-color-icon)",
|
|
1965
|
+
fontSize: "var(--sl-font-size-large)",
|
|
1966
|
+
marginRight: "var(--sl-spacing-x-small)",
|
|
1967
|
+
},
|
|
1968
|
+
"& .value": {
|
|
1969
|
+
alignSelf: "center",
|
|
1970
|
+
fontSize: "var(--sl-font-size-x-large)",
|
|
1971
|
+
fontWeight: "var(--sl-font-weight-semibold)",
|
|
1972
|
+
color: content.textColor || "var(--sqm-text)",
|
|
1973
|
+
lineHeight: "100%",
|
|
1974
|
+
marginRight: "var(--sl-spacing-xx-small)",
|
|
1975
|
+
},
|
|
1976
|
+
"& .text": {
|
|
1977
|
+
alignSelf: "end",
|
|
1978
|
+
textTransform: "uppercase",
|
|
1979
|
+
fontSize: "var(--sl-font-size-x-small)",
|
|
1980
|
+
color: content.textColor || "var(--sqm-text)",
|
|
1981
|
+
lineHeight: "var(--sl-font-size-medium)",
|
|
1982
|
+
marginRight: "var(--sl-spacing-xx-small)",
|
|
2386
1983
|
},
|
|
2387
|
-
"
|
|
2388
|
-
|
|
2389
|
-
|
|
1984
|
+
"& .end": {
|
|
1985
|
+
color: content.textColor || "var(--sqm-warning-color-text)",
|
|
1986
|
+
fontWeight: "var(--sl-font-weight-semibold)",
|
|
1987
|
+
marginBottom: "var(--sl-spacing-xx-small)",
|
|
2390
1988
|
},
|
|
2391
|
-
"
|
|
2392
|
-
|
|
2393
|
-
background: "var(--sl-color-neutral-400)",
|
|
1989
|
+
"& .neutral": {
|
|
1990
|
+
color: content.textColor || "var(--sl-color-neutral-400)",
|
|
2394
1991
|
},
|
|
2395
1992
|
},
|
|
2396
|
-
|
|
2397
|
-
|
|
2398
|
-
|
|
2399
|
-
|
|
2400
|
-
|
|
2401
|
-
|
|
1993
|
+
Footer: {
|
|
1994
|
+
"&[data-subdue] .success": {
|
|
1995
|
+
color: content.textColor || "var(--sqm-accent-color-text)",
|
|
1996
|
+
},
|
|
1997
|
+
"&[data-subdue] .neutral": {
|
|
1998
|
+
color: content.textColor || "var(--sqm-text)",
|
|
1999
|
+
},
|
|
2000
|
+
display: "flex",
|
|
2001
|
+
"& .icon": {
|
|
2002
|
+
fontSize: "var(--sl-font-size-xx-small)",
|
|
2003
|
+
marginRight: "var(--sl-spacing-xx-small)",
|
|
2004
|
+
verticalAlign: "middle",
|
|
2005
|
+
},
|
|
2006
|
+
"& .text": {
|
|
2007
|
+
marginTop: "auto",
|
|
2008
|
+
verticalAlign: "text-bottom",
|
|
2009
|
+
fontSize: "var(--sl-font-size-x-small)",
|
|
2010
|
+
color: content.textColor || "var(--sqm-text)",
|
|
2011
|
+
},
|
|
2012
|
+
"& .success": {
|
|
2013
|
+
color: content.textColor || "var(--sqm-text)",
|
|
2014
|
+
fontWeight: "var(--sl-font-weight-semibold)",
|
|
2015
|
+
},
|
|
2016
|
+
"& .neutral": {
|
|
2017
|
+
color: content.textColor || "var(--sqm-text)",
|
|
2018
|
+
},
|
|
2019
|
+
"& .datetime": {
|
|
2020
|
+
display: "block",
|
|
2021
|
+
marginTop: "var(--sl-spacing-xx-small)",
|
|
2022
|
+
},
|
|
2402
2023
|
},
|
|
2403
|
-
}
|
|
2404
|
-
|
|
2405
|
-
const
|
|
2406
|
-
const styleString$7 = sheet$7.toString();
|
|
2407
|
-
function TaskCardView(props) {
|
|
2408
|
-
var _a, _b;
|
|
2409
|
-
const { callbacks, states, content } = props;
|
|
2024
|
+
};
|
|
2025
|
+
const sheet = createStyleSheet(style);
|
|
2026
|
+
const contentString = sheet.toString();
|
|
2410
2027
|
const dateStart = content.rewardDuration &&
|
|
2411
2028
|
luxon.DateTime.fromISO(content.rewardDuration.split("/")[0]);
|
|
2412
2029
|
const dateEnd = content.rewardDuration &&
|
|
@@ -2439,11 +2056,11 @@ function TaskCardView(props) {
|
|
|
2439
2056
|
}
|
|
2440
2057
|
|
|
2441
2058
|
`;
|
|
2442
|
-
return (h("div", { class: sheet
|
|
2059
|
+
return (h("div", { class: sheet.classes.TaskCard, part: "sqm-base" },
|
|
2443
2060
|
h("style", { type: "text/css" },
|
|
2444
|
-
|
|
2061
|
+
contentString,
|
|
2445
2062
|
vanillaStyle),
|
|
2446
|
-
!states.loading && taskNotStarted && (h("div", { class: sheet
|
|
2063
|
+
!states.loading && taskNotStarted && (h("div", { class: sheet.classes.NotStarted },
|
|
2447
2064
|
h("span", { class: "icon" },
|
|
2448
2065
|
h("sl-icon", { name: "info-circle-fill" })),
|
|
2449
2066
|
intl.formatMessage({
|
|
@@ -2454,7 +2071,7 @@ function TaskCardView(props) {
|
|
|
2454
2071
|
.setLocale(luxonLocale(states.locale))
|
|
2455
2072
|
.toLocaleString(luxon.DateTime.DATETIME_MED),
|
|
2456
2073
|
}))),
|
|
2457
|
-
!states.loading && taskEnded && (h("div", { class: sheet
|
|
2074
|
+
!states.loading && taskEnded && (h("div", { class: sheet.classes.Ended },
|
|
2458
2075
|
h("span", { class: "icon" },
|
|
2459
2076
|
h("sl-icon", { exportparts: "base: task-card-icon", name: "exclamation-triangle-fill" })),
|
|
2460
2077
|
intl.formatMessage({
|
|
@@ -2467,14 +2084,14 @@ function TaskCardView(props) {
|
|
|
2467
2084
|
}))),
|
|
2468
2085
|
h("div", { part: "sqm-style-container", style: {
|
|
2469
2086
|
borderRadius: taskUnavailable &&
|
|
2470
|
-
"0 0 var(--
|
|
2087
|
+
"0 0 var(--sqm-border-radius-normal) var(--sqm-border-radius-normal)",
|
|
2471
2088
|
}, class: taskUnavailable
|
|
2472
2089
|
? "main expired"
|
|
2473
2090
|
: taskComplete
|
|
2474
2091
|
? "main complete"
|
|
2475
2092
|
: "main" },
|
|
2476
2093
|
h("div", { class: "container", part: "sqm-card-container", "data-subdue": taskComplete || taskUnavailable },
|
|
2477
|
-
h("div", { class: sheet
|
|
2094
|
+
h("div", { class: sheet.classes.Header, style: { opacity: taskComplete || taskUnavailable ? "0.45" : "1" } }, states.loading ? (h("sl-skeleton", { style: { width: "22%", margin: "0" } })) : (h("div", null,
|
|
2478
2095
|
showComplete && (h("span", { class: taskUnavailable ? "icon neutral" : "icon" }, taskComplete ? checkmark_filled$1 : checkmark_circle$1)),
|
|
2479
2096
|
h("span", { part: "sqm-value", class: "value" }, content.rewardAmount),
|
|
2480
2097
|
h("span", { part: "sqm-unit", class: "text" }, content.rewardUnit)))),
|
|
@@ -2489,8 +2106,8 @@ function TaskCardView(props) {
|
|
|
2489
2106
|
opacity: taskComplete || taskUnavailable ? "0.45" : "1",
|
|
2490
2107
|
} }, content.cardTitle)),
|
|
2491
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" })))),
|
|
2492
|
-
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.
|
|
2493
|
-
h("div", { class: sheet
|
|
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 })))),
|
|
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" } },
|
|
2494
2111
|
h("span", { class: "text" },
|
|
2495
2112
|
content.repeatable && (h("div", null,
|
|
2496
2113
|
h("span", { class: repetitions > 0
|
|
@@ -2519,325 +2136,186 @@ function TaskCardView(props) {
|
|
|
2519
2136
|
.setLocale(luxonLocale(states.locale))
|
|
2520
2137
|
.toLocaleString(luxon.DateTime.DATETIME_MED),
|
|
2521
2138
|
})))),
|
|
2522
|
-
content.hideButton ? ("") : (h("sl-button", { exportparts: "base:
|
|
2523
|
-
? "action neutral"
|
|
2524
|
-
: taskComplete
|
|
2525
|
-
? "action disabled"
|
|
2526
|
-
: "action", type: "primary", 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: {
|
|
2527
2140
|
opacity: taskComplete || taskUnavailable ? "0.45" : "1",
|
|
2528
2141
|
} }, content.buttonText)))))))));
|
|
2529
2142
|
}
|
|
2530
2143
|
|
|
2531
|
-
|
|
2532
|
-
|
|
2533
|
-
|
|
2534
|
-
|
|
2535
|
-
|
|
2536
|
-
|
|
2537
|
-
|
|
2538
|
-
|
|
2539
|
-
|
|
2540
|
-
|
|
2541
|
-
|
|
2542
|
-
|
|
2543
|
-
|
|
2544
|
-
|
|
2545
|
-
|
|
2546
|
-
|
|
2547
|
-
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 }),
|
|
2548
|
-
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 }),
|
|
2549
|
-
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 }),
|
|
2550
|
-
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 }),
|
|
2551
|
-
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 }),
|
|
2552
|
-
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 }),
|
|
2553
|
-
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 }),
|
|
2554
|
-
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 }),
|
|
2555
|
-
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 }),
|
|
2556
|
-
h("path", { d: "M1208.57 104.5L1172.3 202H1161.96L1125.5 104.5H1136.61L1167.03 189.715L1197.45 104.5H1208.57Z", fill: color }),
|
|
2557
|
-
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 }),
|
|
2558
|
-
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 }),
|
|
2559
|
-
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 }),
|
|
2560
|
-
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 }),
|
|
2561
|
-
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;
|
|
2562
2160
|
}
|
|
2563
2161
|
|
|
2564
|
-
|
|
2565
|
-
:
|
|
2566
|
-
|
|
2567
|
-
|
|
2568
|
-
|
|
2569
|
-
|
|
2570
|
-
|
|
2571
|
-
color: inherit;
|
|
2572
|
-
text-decoration: none;
|
|
2573
|
-
}
|
|
2162
|
+
:host{
|
|
2163
|
+
display: block;
|
|
2164
|
+
}
|
|
2165
|
+
|
|
2166
|
+
:host([hidden]) {
|
|
2167
|
+
display: none;
|
|
2168
|
+
}
|
|
2574
2169
|
`;
|
|
2575
|
-
|
|
2576
|
-
|
|
2577
|
-
|
|
2578
|
-
|
|
2579
|
-
|
|
2580
|
-
|
|
2581
|
-
|
|
2582
|
-
|
|
2583
|
-
|
|
2584
|
-
display: "flex",
|
|
2585
|
-
"flex-direction": "column",
|
|
2586
|
-
"align-items": "center",
|
|
2587
|
-
"font-size": "var(--sl-font-size-small)",
|
|
2588
|
-
color: "var(--sl-color-gray-600)",
|
|
2589
|
-
"padding-top": `var(--sl-spacing-${props.paddingTop})`,
|
|
2590
|
-
"padding-right": `var(--sl-spacing-${props.paddingRight})`,
|
|
2591
|
-
"padding-bottom": `var(--sl-spacing-${props.paddingBottom})`,
|
|
2592
|
-
"padding-left": `var(--sl-spacing-${props.paddingLeft})`,
|
|
2593
|
-
"row-gap": `var(--sl-spacing-small)`,
|
|
2594
|
-
"& a:hover": {
|
|
2595
|
-
color: "var(--sl-color-gray-900)",
|
|
2596
|
-
},
|
|
2597
|
-
},
|
|
2598
|
-
SupportText: {
|
|
2599
|
-
textAlign: "center",
|
|
2600
|
-
margin: 0,
|
|
2601
|
-
},
|
|
2602
|
-
PoweredByLink: {
|
|
2603
|
-
color: "var(--sl-color-gray-400)",
|
|
2604
|
-
"font-size": "var(--sl-font-size-small)",
|
|
2605
|
-
display: "flex",
|
|
2606
|
-
alignItems: "center",
|
|
2607
|
-
svg: {
|
|
2608
|
-
marginTop: "2px",
|
|
2609
|
-
shapeRendering: "geometricprecision",
|
|
2610
|
-
},
|
|
2611
|
-
"&:hover, &:hover *": {
|
|
2612
|
-
color: "var(--sl-color-gray-900)",
|
|
2613
|
-
},
|
|
2614
|
-
},
|
|
2615
|
-
};
|
|
2616
|
-
const sheet = createStyleSheet(style);
|
|
2617
|
-
const styleString = sheet.toString();
|
|
2618
|
-
return (h("div", { class: sheet.classes.Container, part: "sqm-base" },
|
|
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" },
|
|
2619
2179
|
h("style", { type: "text/css" },
|
|
2620
|
-
vanillaStyle
|
|
2621
|
-
styleString),
|
|
2622
|
-
h(
|
|
2623
|
-
|
|
2624
|
-
|
|
2625
|
-
|
|
2626
|
-
|
|
2627
|
-
|
|
2628
|
-
|
|
2629
|
-
|
|
2630
|
-
|
|
2631
|
-
|
|
2632
|
-
|
|
2633
|
-
|
|
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))));
|
|
2634
2215
|
}
|
|
2635
2216
|
|
|
2636
|
-
const
|
|
2637
|
-
|
|
2638
|
-
|
|
2639
|
-
|
|
2640
|
-
|
|
2641
|
-
"var(--sl-spacing-medium)",
|
|
2642
|
-
"var(--sl-spacing-large)",
|
|
2643
|
-
"var(--sl-spacing-x-large)",
|
|
2644
|
-
"var(--sl-spacing-xx-large)",
|
|
2645
|
-
"var(--sl-spacing-xxx-large)",
|
|
2646
|
-
"var(--sl-spacing-xxxx-large)",
|
|
2647
|
-
];
|
|
2648
|
-
const parseBackground = (provided_bg) => {
|
|
2649
|
-
if (provided_bg) {
|
|
2650
|
-
if (isValidColor(provided_bg)) {
|
|
2651
|
-
return provided_bg;
|
|
2652
|
-
}
|
|
2653
|
-
else {
|
|
2654
|
-
return `url(${provided_bg})`;
|
|
2655
|
-
}
|
|
2656
|
-
}
|
|
2657
|
-
else {
|
|
2658
|
-
return "";
|
|
2659
|
-
}
|
|
2660
|
-
};
|
|
2661
|
-
function HeroView(props) {
|
|
2662
|
-
const { states, content } = props;
|
|
2663
|
-
const getVertivalPadding = (size, half) => {
|
|
2664
|
-
const sizes = {
|
|
2665
|
-
small: 7,
|
|
2666
|
-
medium: 8,
|
|
2667
|
-
large: 9,
|
|
2668
|
-
};
|
|
2669
|
-
var index = sizes[size];
|
|
2670
|
-
if (isMobile(767)) {
|
|
2671
|
-
index = index - 2;
|
|
2672
|
-
}
|
|
2673
|
-
else if (isMobile(1023)) {
|
|
2674
|
-
index = index - 1;
|
|
2675
|
-
}
|
|
2676
|
-
return half ? paddingList[index - 2] : paddingList[index];
|
|
2677
|
-
};
|
|
2678
|
-
const getHorizontalPadding = (size) => {
|
|
2679
|
-
if (size == "small") {
|
|
2680
|
-
return "1%";
|
|
2681
|
-
}
|
|
2682
|
-
else if (size == "medium") {
|
|
2683
|
-
return "3%";
|
|
2684
|
-
}
|
|
2685
|
-
else {
|
|
2686
|
-
return "5%";
|
|
2687
|
-
}
|
|
2688
|
-
};
|
|
2689
|
-
// Dependent on props, not feasiable to move out
|
|
2690
|
-
const style = {
|
|
2691
|
-
TwoColumnContainer: {
|
|
2692
|
-
display: "flex",
|
|
2693
|
-
"@media screen and (max-width: 1023px)": {
|
|
2694
|
-
flexDirection: states.wrapDirection == "wrap-reverse" ? "column-reverse" : "column",
|
|
2695
|
-
justfiyContent: "center",
|
|
2696
|
-
},
|
|
2697
|
-
},
|
|
2698
|
-
ColumnPadding: {
|
|
2699
|
-
paddingTop: states.paddingSize == "none"
|
|
2700
|
-
? "0px"
|
|
2701
|
-
: getVertivalPadding(states.paddingSize),
|
|
2702
|
-
paddingBottom: states.paddingSize == "none"
|
|
2703
|
-
? "0px"
|
|
2704
|
-
: getVertivalPadding(states.paddingSize),
|
|
2705
|
-
paddingLeft: states.paddingSize == "none"
|
|
2706
|
-
? "0px"
|
|
2707
|
-
: getHorizontalPadding(states.paddingSize),
|
|
2708
|
-
paddingRight: states.paddingSize == "none"
|
|
2709
|
-
? "0px"
|
|
2710
|
-
: getHorizontalPadding(states.paddingSize),
|
|
2711
|
-
},
|
|
2712
|
-
ColumnWrapper: {
|
|
2713
|
-
"&:first-of-type": {
|
|
2714
|
-
background: `no-repeat center/cover ${parseBackground(states.background)}`,
|
|
2715
|
-
},
|
|
2716
|
-
"&:last-of-type": {
|
|
2717
|
-
background: `no-repeat center/cover ${parseBackground(states.secondaryBackground)}`,
|
|
2718
|
-
},
|
|
2719
|
-
"@media screen and (min-width: 1023px)": { flex: "1 1 0" },
|
|
2720
|
-
minHeight: `${states.minHeight}px`,
|
|
2721
|
-
display: "block",
|
|
2722
|
-
},
|
|
2723
|
-
SingleColumnContainer: {
|
|
2724
|
-
background: `no-repeat center/cover ${parseBackground(states.background)}`,
|
|
2725
|
-
minHeight: `${states.minHeight}px`,
|
|
2726
|
-
},
|
|
2727
|
-
Container: {
|
|
2728
|
-
width: "100%",
|
|
2729
|
-
maxWidth: "var(--sqm-max-width)",
|
|
2730
|
-
margin: "0 auto",
|
|
2731
|
-
flex: 1,
|
|
2732
|
-
display: "flex",
|
|
2733
|
-
flexDirection: "column",
|
|
2734
|
-
minHeight: "100%",
|
|
2735
|
-
},
|
|
2736
|
-
};
|
|
2737
|
-
const sheet = createStyleSheet(style);
|
|
2738
|
-
const styleString = sheet.toString();
|
|
2739
|
-
const vanillaStyle = `
|
|
2740
|
-
:host{
|
|
2741
|
-
height: 100%;
|
|
2742
|
-
display: contents;
|
|
2743
|
-
}
|
|
2744
|
-
sqm-hero{
|
|
2745
|
-
height: 100%;
|
|
2746
|
-
display: contents;
|
|
2747
|
-
}
|
|
2748
|
-
img{
|
|
2749
|
-
max-width: 100%;
|
|
2750
|
-
height: auto;
|
|
2751
|
-
}
|
|
2752
|
-
|
|
2753
|
-
`;
|
|
2754
|
-
// NOTE: Spacing on the columns is controlled on the slots itself. For example using inline styling
|
|
2755
|
-
return (h("div", { class: sheet.classes.Container, part: "sqm-base" },
|
|
2756
|
-
h("style", { type: "text/css" },
|
|
2757
|
-
vanillaStyle,
|
|
2758
|
-
styleString),
|
|
2759
|
-
states.columns == 2 ? (h("div", { class: sheet.classes.TwoColumnContainer, part: "sqm-two-col-container" },
|
|
2760
|
-
h("div", { part: "sqm-two-col-primary-col", class: `${sheet.classes.ColumnWrapper} ${sheet.classes.ColumnPadding}` }, content.primaryColumn),
|
|
2761
|
-
h("div", { part: "sqm-two-col-secondary-col", class: `${sheet.classes.ColumnWrapper} ${sheet.classes.ColumnPadding}` }, content.secondaryColumn))) : (h("div", { part: "sqm-single-col", class: `${sheet.classes.SingleColumnContainer} ${sheet.classes.ColumnPadding}` }, content.primaryColumn))));
|
|
2762
|
-
}
|
|
2763
|
-
|
|
2764
|
-
function ReferralIframeView(props) {
|
|
2765
|
-
const { states, data } = props;
|
|
2766
|
-
const { content } = states;
|
|
2767
|
-
// dependent on props
|
|
2768
|
-
const style = {
|
|
2769
|
-
Container: {
|
|
2770
|
-
position: "relative",
|
|
2771
|
-
width: content.iframeWidth,
|
|
2772
|
-
height: content.iframeHeight,
|
|
2773
|
-
},
|
|
2774
|
-
IFrame: {
|
|
2775
|
-
position: "absolute",
|
|
2776
|
-
width: "100%",
|
|
2777
|
-
height: "100%",
|
|
2778
|
-
border: "0",
|
|
2779
|
-
top: "0",
|
|
2780
|
-
left: "0",
|
|
2781
|
-
right: "0",
|
|
2217
|
+
const style$4 = {
|
|
2218
|
+
ErrorStyle: {
|
|
2219
|
+
"&::part(control)": {
|
|
2220
|
+
borderColor: "var(--sl-color-danger-500)",
|
|
2221
|
+
outline: "var(--sl-color-danger-500)",
|
|
2782
2222
|
},
|
|
2783
|
-
|
|
2784
|
-
|
|
2785
|
-
const sheet = createStyleSheet(style);
|
|
2786
|
-
const styleString = sheet.toString();
|
|
2787
|
-
return (h("div", { class: sheet.classes.Container },
|
|
2788
|
-
h("style", { type: "text/css" }, styleString),
|
|
2789
|
-
h("iframe", { class: sheet.classes.IFrame, src: `${content.iframeSrc}?rsCode=${data.shareCode}` })));
|
|
2790
|
-
}
|
|
2791
|
-
|
|
2792
|
-
const style$8 = {
|
|
2793
|
-
ErrorStyle: ErrorStyles,
|
|
2794
|
-
FieldsContainer: {
|
|
2795
|
-
"& sl-input": {
|
|
2796
|
-
"margin-bottom": "var(--sl-spacing-large)",
|
|
2223
|
+
"&:host": {
|
|
2224
|
+
"--focus-ring": "0 0 0 var(--sl-focus-ring-width) red !important",
|
|
2797
2225
|
},
|
|
2798
2226
|
},
|
|
2227
|
+
ErrorMessageStyle: {
|
|
2228
|
+
margin: 0,
|
|
2229
|
+
marginTop: "5px",
|
|
2230
|
+
color: "var(--sl-color-danger-500)",
|
|
2231
|
+
fontSize: "var(--sl-input-help-text-font-size-medium)",
|
|
2232
|
+
fontFamily: "var(--sl-font-sans)",
|
|
2233
|
+
fontWeight: "var(--sl-font-weight-normal)",
|
|
2234
|
+
},
|
|
2235
|
+
FieldContainer: {
|
|
2236
|
+
"margin-bottom": "var(--sl-spacing-large)",
|
|
2237
|
+
},
|
|
2799
2238
|
};
|
|
2800
|
-
const vanillaStyle$
|
|
2239
|
+
const vanillaStyle$1 = `
|
|
2801
2240
|
:host {
|
|
2802
2241
|
margin: 0 auto;
|
|
2803
2242
|
width: 100%;
|
|
2804
2243
|
display: block;
|
|
2805
2244
|
}
|
|
2806
|
-
|
|
2807
|
-
sl-input::part(label){
|
|
2245
|
+
sl-checkbox::part(label){
|
|
2808
2246
|
font-size: var(--sl-input-label-font-size-small);
|
|
2809
|
-
font-weight: var(--sl-font-weight-
|
|
2247
|
+
font-weight: var(--sl-font-weight-normal);
|
|
2248
|
+
line-height: 20px;
|
|
2249
|
+
}
|
|
2250
|
+
sl-checkbox::part(base){
|
|
2251
|
+
align-items: start;
|
|
2252
|
+
}
|
|
2253
|
+
sl-checkbox[checked]::part(control){
|
|
2254
|
+
background-color: var(--sqm-input-border-color-focus);
|
|
2255
|
+
}
|
|
2256
|
+
|
|
2257
|
+
sl-checkbox[checked]::part(checked-icon){
|
|
2258
|
+
color: var(--sqm-input-background);
|
|
2810
2259
|
}
|
|
2811
2260
|
`;
|
|
2812
|
-
|
|
2813
|
-
const
|
|
2814
|
-
|
|
2815
|
-
|
|
2816
|
-
|
|
2261
|
+
jss.setup(create());
|
|
2262
|
+
const sheet$4 = jss.createStyleSheet(style$4);
|
|
2263
|
+
const styleString$4 = sheet$4.toString();
|
|
2264
|
+
function CheckboxFieldView(props) {
|
|
2265
|
+
var _a, _b, _c, _d, _e;
|
|
2266
|
+
const { states, content, callbacks } = props;
|
|
2817
2267
|
const validationErrors = (_a = states === null || states === void 0 ? void 0 : states.registrationFormState) === null || _a === void 0 ? void 0 : _a.validationErrors;
|
|
2818
|
-
return (h("div", { class: sheet$
|
|
2268
|
+
return (h("div", { class: sheet$4.classes.FieldContainer, part: "sqm-base" },
|
|
2819
2269
|
h("style", { type: "text/css" },
|
|
2820
|
-
vanillaStyle$
|
|
2821
|
-
styleString$
|
|
2822
|
-
h("sl-
|
|
2823
|
-
|
|
2824
|
-
|
|
2825
|
-
:
|
|
2826
|
-
|
|
2827
|
-
|
|
2828
|
-
|
|
2829
|
-
: [])
|
|
2830
|
-
|
|
2831
|
-
value: (_o = (_m = states.registrationFormState) === null || _m === void 0 ? void 0 : _m.initialData) === null || _o === void 0 ? void 0 : _o.lastName,
|
|
2832
|
-
}
|
|
2833
|
-
: {}), ((validationErrors === null || validationErrors === void 0 ? void 0 : validationErrors.lastName) ? {
|
|
2834
|
-
class: sheet$8.classes.ErrorStyle,
|
|
2835
|
-
helpText: (validationErrors === null || validationErrors === void 0 ? void 0 : validationErrors.lastName) || "Cannot be empty",
|
|
2270
|
+
vanillaStyle$1,
|
|
2271
|
+
styleString$4),
|
|
2272
|
+
h("sl-checkbox", Object.assign({ exportparts: "label: input-label, base: input-base", name: `/${content.checkboxName}`, checked: states.checked, "onSl-change": (e) => {
|
|
2273
|
+
e.target.value = e.target.checked;
|
|
2274
|
+
callbacks.setChecked(e.target.value);
|
|
2275
|
+
} }, (!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), validationError: ({ value }) => {
|
|
2276
|
+
if (!value && !content.checkboxOptional) {
|
|
2277
|
+
return content.errorMessage;
|
|
2278
|
+
}
|
|
2279
|
+
} }, (((_e = (_d = states.registrationFormState) === null || _d === void 0 ? void 0 : _d.validationErrors) === null || _e === void 0 ? void 0 : _e[content.checkboxName]) ? {
|
|
2280
|
+
class: sheet$4.classes.ErrorStyle,
|
|
2836
2281
|
}
|
|
2837
|
-
: []))
|
|
2282
|
+
: [])), intl.formatMessage({
|
|
2283
|
+
id: content.checkboxName + "-message",
|
|
2284
|
+
defaultMessage: content.checkboxLabel,
|
|
2285
|
+
}, {
|
|
2286
|
+
labelLink: (h("a", { href: content.checkboxLabelLink, target: "_blank" }, content.checkboxLabelLinkText || content.checkboxLabelLink)),
|
|
2287
|
+
})),
|
|
2288
|
+
(validationErrors === null || validationErrors === void 0 ? void 0 : validationErrors[content.checkboxName]) && (h("p", { class: sheet$4.classes.ErrorMessageStyle }, content.errorMessage))));
|
|
2838
2289
|
}
|
|
2839
2290
|
|
|
2840
|
-
|
|
2291
|
+
function CouponCodeView(props) {
|
|
2292
|
+
const error = !props.loading && props.error;
|
|
2293
|
+
const style = {
|
|
2294
|
+
HostBlock: HostBlock,
|
|
2295
|
+
couponCodeLabel: {
|
|
2296
|
+
margin: "var(--sl-spacing-x-small) 0",
|
|
2297
|
+
color: props.textColor || "var(--sqm-text-subdued)",
|
|
2298
|
+
fontSize: "var(--sl-font-size-small)",
|
|
2299
|
+
},
|
|
2300
|
+
};
|
|
2301
|
+
const vanillaStyle = `
|
|
2302
|
+
:host{
|
|
2303
|
+
display: block;
|
|
2304
|
+
width: 100%;
|
|
2305
|
+
}
|
|
2306
|
+
`;
|
|
2307
|
+
const sheet = createStyleSheet(style);
|
|
2308
|
+
const styleString = sheet.toString();
|
|
2309
|
+
return (h("div", null,
|
|
2310
|
+
h("style", { type: "text/css" },
|
|
2311
|
+
styleString,
|
|
2312
|
+
vanillaStyle),
|
|
2313
|
+
h("p", { class: sheet.classes.couponCodeLabel, style: { textAlign: props.textAlign } }, props.couponCodeLabel),
|
|
2314
|
+
error ? (h("sqm-form-message", { type: props.errorType, exportparts: "erroralert-icon" },
|
|
2315
|
+
h("div", { part: "erroralert-text" }, props.errorText))) : (h(CopyTextView, Object.assign({}, props)))));
|
|
2316
|
+
}
|
|
2317
|
+
|
|
2318
|
+
const style$5 = {
|
|
2841
2319
|
ErrorStyle: {
|
|
2842
2320
|
"--sl-input-border-color": "var(--sl-color-danger-500)",
|
|
2843
2321
|
"--sl-input-background-color": "var(--sl-color-danger-10)",
|
|
@@ -2853,7 +2331,7 @@ const style$9 = {
|
|
|
2853
2331
|
"margin-bottom": "var(--sl-spacing-medium)",
|
|
2854
2332
|
},
|
|
2855
2333
|
};
|
|
2856
|
-
const vanillaStyle$
|
|
2334
|
+
const vanillaStyle$2 = `
|
|
2857
2335
|
:host {
|
|
2858
2336
|
margin: 0 auto;
|
|
2859
2337
|
width: 100%;
|
|
@@ -2865,58 +2343,382 @@ sl-select::part(label){
|
|
|
2865
2343
|
}
|
|
2866
2344
|
`;
|
|
2867
2345
|
jss.setup(create());
|
|
2868
|
-
const sheet$
|
|
2869
|
-
const styleString$
|
|
2346
|
+
const sheet$5 = jss.createStyleSheet(style$5);
|
|
2347
|
+
const styleString$5 = sheet$5.toString();
|
|
2870
2348
|
function DropdownFieldView(props) {
|
|
2871
2349
|
var _a, _b, _c, _d, _e, _f, _g;
|
|
2872
2350
|
const { states, content } = props;
|
|
2873
2351
|
const validationErrors = (_a = states === null || states === void 0 ? void 0 : states.registrationFormState) === null || _a === void 0 ? void 0 : _a.validationErrors;
|
|
2874
|
-
return (h("div", { class: sheet$
|
|
2352
|
+
return (h("div", { class: sheet$5.classes.FieldContainer, part: "sqm-base" },
|
|
2875
2353
|
h("style", { type: "text/css" },
|
|
2876
|
-
vanillaStyle$
|
|
2877
|
-
styleString$
|
|
2354
|
+
vanillaStyle$2,
|
|
2355
|
+
styleString$5),
|
|
2878
2356
|
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]) ? {
|
|
2879
2357
|
value: (_g = (_f = states.registrationFormState) === null || _f === void 0 ? void 0 : _f.initialData) === null || _g === void 0 ? void 0 : _g[content.dropdownName],
|
|
2880
2358
|
}
|
|
2881
2359
|
: {}), ((validationErrors === null || validationErrors === void 0 ? void 0 : validationErrors[content.dropdownName]) ? {
|
|
2882
|
-
class: sheet$
|
|
2360
|
+
class: sheet$5.classes.ErrorStyle,
|
|
2883
2361
|
}
|
|
2884
2362
|
: [])), content.selectOptions),
|
|
2885
|
-
(validationErrors === null || validationErrors === void 0 ? void 0 : validationErrors[content.dropdownName]) && (h("p", { class: sheet$
|
|
2363
|
+
(validationErrors === null || validationErrors === void 0 ? void 0 : validationErrors[content.dropdownName]) && (h("p", { class: sheet$5.classes.ErrorMessageStyle }, intl.formatMessage({
|
|
2886
2364
|
id: `errorMessage-${content.dropdownName}`,
|
|
2887
2365
|
defaultMessage: content.errorMessage,
|
|
2888
2366
|
})))));
|
|
2889
2367
|
}
|
|
2890
2368
|
|
|
2891
|
-
const
|
|
2892
|
-
|
|
2893
|
-
|
|
2894
|
-
|
|
2895
|
-
}
|
|
2896
|
-
|
|
2897
|
-
|
|
2898
|
-
:
|
|
2899
|
-
|
|
2900
|
-
|
|
2901
|
-
|
|
2902
|
-
}
|
|
2903
|
-
|
|
2904
|
-
|
|
2905
|
-
|
|
2906
|
-
|
|
2907
|
-
|
|
2908
|
-
|
|
2909
|
-
|
|
2910
|
-
|
|
2911
|
-
|
|
2912
|
-
|
|
2913
|
-
|
|
2914
|
-
|
|
2915
|
-
|
|
2916
|
-
|
|
2369
|
+
const EditProfileView = (props) => {
|
|
2370
|
+
var _a, _b, _c, _d;
|
|
2371
|
+
const { states, callbacks } = props;
|
|
2372
|
+
const { text } = states;
|
|
2373
|
+
const { errors } = states.formState;
|
|
2374
|
+
if (states.showEdit) {
|
|
2375
|
+
return (h("div", { class: `CardWrapper ${!states.showEdit && "ShowEdit"}`, part: "sqm-base" },
|
|
2376
|
+
h("h2", { part: "sqm-header", style: {
|
|
2377
|
+
fontSize: "var(--sl-font-size-x-large)",
|
|
2378
|
+
margin: "0px",
|
|
2379
|
+
textAlign: "center",
|
|
2380
|
+
} }, text.editprofileheader),
|
|
2381
|
+
h("form", { class: "FormWrapper", onSubmit: callbacks.onSubmit },
|
|
2382
|
+
h("div", { class: "FormSection" },
|
|
2383
|
+
states.formState.error && (h("sqm-form-message", { type: "error", exportparts: "erroralert-icon" },
|
|
2384
|
+
h("div", { part: "erroralert-text" }, states.formState.error))),
|
|
2385
|
+
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"
|
|
2386
|
+
? { class: "ErrorStyles", helpText: text.fieldEmptyText }
|
|
2387
|
+
: []), { id: "firstName", name: "firstName", error: errors.firstName && errors.firstName.status !== "valid"
|
|
2388
|
+
? errors.firstName.message
|
|
2389
|
+
: undefined })),
|
|
2390
|
+
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"
|
|
2391
|
+
? { class: "ErrorStyles", helpText: text.fieldEmptyText }
|
|
2392
|
+
: []), { error: errors.lastName && errors.lastName.status !== "valid"
|
|
2393
|
+
? errors.lastName.message
|
|
2394
|
+
: undefined }))),
|
|
2395
|
+
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" })),
|
|
2396
|
+
h("div", { class: "ButtonWrapper" },
|
|
2397
|
+
h("sl-button", { type: "primary", loading: states.loading, disabled: states.submitDisabled, onClick: (e) => {
|
|
2398
|
+
callbacks.onSubmit(e);
|
|
2399
|
+
}, submit: true, exportparts: "base: primarybutton-base" }, text.updatetext),
|
|
2400
|
+
h("sl-button", { onClick: () => {
|
|
2401
|
+
callbacks.setShowEdit(false);
|
|
2402
|
+
}, type: "secondary", exportparts: "base: secondarybutton-base" }, text.canceltext)))));
|
|
2403
|
+
}
|
|
2404
|
+
return (h("div", { class: `CardWrapper FormWrapper ${!states.showEdit && "ShowEdit"}`, part: "sqm-base" },
|
|
2405
|
+
h("div", { class: "FormSection" },
|
|
2406
|
+
h("h2", { part: "sqm-header", style: {
|
|
2407
|
+
fontSize: "var(--sl-font-size-x-large)",
|
|
2408
|
+
marginBottom: "0px",
|
|
2409
|
+
textAlign: "center",
|
|
2410
|
+
} }, text.editprofileheader),
|
|
2411
|
+
h("div", null,
|
|
2412
|
+
h("p", { style: { fontSize: "var(--sl-font-size-medium)" } }, (_a = states.user) === null || _a === void 0 ? void 0 :
|
|
2413
|
+
_a.firstName,
|
|
2414
|
+
" ", (_b = states.user) === null || _b === void 0 ? void 0 :
|
|
2415
|
+
_b.lastName),
|
|
2416
|
+
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))),
|
|
2417
|
+
h("sl-button", { type: "primary", loading: states.loading, onClick: () => {
|
|
2418
|
+
callbacks.resetForm();
|
|
2419
|
+
callbacks.setShowEdit(true);
|
|
2420
|
+
}, exportparts: "base: primarybutton-base" }, text.editprofiletext)));
|
|
2421
|
+
};
|
|
2422
|
+
|
|
2423
|
+
function LeaderboardView(props) {
|
|
2424
|
+
var _a, _b, _c;
|
|
2425
|
+
const { states, data, elements } = props;
|
|
2426
|
+
const { styles } = states;
|
|
2427
|
+
const style = {
|
|
2428
|
+
Leaderboard: {
|
|
2429
|
+
"& table": {
|
|
2430
|
+
width: "100%",
|
|
2431
|
+
borderCollapse: "collapse",
|
|
2432
|
+
background: styles.background || "transparent",
|
|
2433
|
+
borderRadius: styles.borderRadius ? `${styles.borderRadius}px` : "0",
|
|
2434
|
+
},
|
|
2435
|
+
"& th": {
|
|
2436
|
+
textAlign: "left",
|
|
2437
|
+
padding: "var(--sl-spacing-medium)",
|
|
2438
|
+
paddingTop: "0",
|
|
2439
|
+
fontSize: "var(--sl-font-size-medium)",
|
|
2440
|
+
fontWeight: "var(--sl-font-weight-semibold)",
|
|
2441
|
+
},
|
|
2442
|
+
"& tr:not(:first-child)": {
|
|
2443
|
+
borderTop: `var(--sqm-border-thickness) solid ${styles.borderColor || "var(--sqm-border-color)"}`,
|
|
2444
|
+
},
|
|
2445
|
+
"& td": {
|
|
2446
|
+
fontSize: "var(--sl-font-size-medium)",
|
|
2447
|
+
fontWeight: "var(--sl-font-weight-normal)",
|
|
2448
|
+
},
|
|
2449
|
+
"& .ellipses": {
|
|
2450
|
+
textAlign: "left",
|
|
2451
|
+
padding: "0",
|
|
2452
|
+
color: styles.textColor || "var(--sqm-text)",
|
|
2453
|
+
paddingLeft: "25%",
|
|
2454
|
+
},
|
|
2455
|
+
"& .highlight": {
|
|
2456
|
+
background: styles.viewingUserHighlightColor ||
|
|
2457
|
+
"var(--sqm-accent-color-background)",
|
|
2458
|
+
"& td, th": {
|
|
2459
|
+
color: styles.viewingUserHighlightTextColor || "var(--sqm-text)",
|
|
2460
|
+
},
|
|
2461
|
+
},
|
|
2462
|
+
"& td, th": {
|
|
2463
|
+
color: styles.textColor || "var(--sqm-text)",
|
|
2464
|
+
padding: "var(--sl-spacing-medium)",
|
|
2465
|
+
},
|
|
2466
|
+
"& .User": {
|
|
2467
|
+
width: "100%",
|
|
2468
|
+
},
|
|
2469
|
+
"& .Score": {
|
|
2470
|
+
width: "auto",
|
|
2471
|
+
whiteSpace: "nowrap",
|
|
2472
|
+
},
|
|
2473
|
+
"& .Rank": {
|
|
2474
|
+
whiteSpace: "nowrap",
|
|
2475
|
+
},
|
|
2476
|
+
"& .fullWidth": {
|
|
2477
|
+
width: "100%",
|
|
2478
|
+
},
|
|
2479
|
+
},
|
|
2480
|
+
};
|
|
2481
|
+
const sheet = createStyleSheet(style);
|
|
2482
|
+
const styleString = sheet.toString();
|
|
2483
|
+
const vanillaStyle = `
|
|
2484
|
+
:host{
|
|
2485
|
+
display: block;
|
|
2486
|
+
}
|
|
2487
|
+
`;
|
|
2488
|
+
if (states.isEssentials) {
|
|
2489
|
+
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" }));
|
|
2490
|
+
}
|
|
2491
|
+
if (states.loading) {
|
|
2492
|
+
return (h("div", { class: sheet.classes.Leaderboard, style: { width: styles.width || "100%" } },
|
|
2493
|
+
h("style", { type: "text/css" },
|
|
2494
|
+
styleString,
|
|
2495
|
+
vanillaStyle),
|
|
2496
|
+
h("table", null, [...Array(10)].map(() => {
|
|
2497
|
+
return (h("tr", null,
|
|
2498
|
+
h("td", null,
|
|
2499
|
+
h("sl-skeleton", null))));
|
|
2500
|
+
}))));
|
|
2501
|
+
}
|
|
2502
|
+
if (!states.hasLeaders)
|
|
2503
|
+
return elements.empty;
|
|
2504
|
+
let userSeenFlag = false;
|
|
2505
|
+
const getUsersName = (user) => {
|
|
2506
|
+
if (!user.firstName && !user.lastInitial)
|
|
2507
|
+
return styles.anonymousUser;
|
|
2508
|
+
const { firstName, lastInitial } = user;
|
|
2509
|
+
if (firstName && lastInitial)
|
|
2510
|
+
return `${firstName} ${lastInitial}`;
|
|
2511
|
+
if (firstName || lastInitial)
|
|
2512
|
+
return firstName || lastInitial;
|
|
2513
|
+
return styles.anonymousUser;
|
|
2514
|
+
};
|
|
2515
|
+
const getRankCellText = (userRank, isViewingUsersRow) => {
|
|
2516
|
+
if (!userRank) {
|
|
2517
|
+
return styles.hideNames ? `${styles.viewingUserText}` : "-";
|
|
2518
|
+
}
|
|
2519
|
+
const viewingUserText = ` - ${styles.viewingUserText}`;
|
|
2520
|
+
return styles.rankSuffix
|
|
2521
|
+
? intl.formatMessage({
|
|
2522
|
+
id: "rank",
|
|
2523
|
+
defaultMessage: styles.rankSuffix,
|
|
2524
|
+
}, {
|
|
2525
|
+
rank: userRank,
|
|
2526
|
+
}) + `${isViewingUsersRow && styles.hideNames ? viewingUserText : ""}`
|
|
2527
|
+
: `${userRank} ${isViewingUsersRow && styles.hideNames ? viewingUserText : ""}`;
|
|
2528
|
+
};
|
|
2529
|
+
return (h("div", { class: sheet.classes.Leaderboard, part: "sqm-base", style: { width: styles.width || "100%" } },
|
|
2530
|
+
h("style", { type: "text/css" },
|
|
2531
|
+
styleString,
|
|
2532
|
+
vanillaStyle),
|
|
2533
|
+
h("table", { part: "sqm-table" },
|
|
2534
|
+
h("tr", null,
|
|
2535
|
+
styles.showRank && (h("th", { class: `Rank ${styles.hideNames ? "fullWidth" : ""}` }, styles.rankheading)),
|
|
2536
|
+
!styles.hideNames && h("th", { class: "User" }, styles.usersheading),
|
|
2537
|
+
h("th", { class: "Score" }, styles.statsheading)), (_a = data.leaderboard) === null || _a === void 0 ? void 0 :
|
|
2538
|
+
_a.map((user) => {
|
|
2539
|
+
var _a, _b;
|
|
2540
|
+
if (user.rowNumber === ((_a = data.viewerRank) === null || _a === void 0 ? void 0 : _a.rowNumber))
|
|
2541
|
+
userSeenFlag = true;
|
|
2542
|
+
const isViewingUsersRow = !styles.hideViewer && user.rowNumber === ((_b = data.viewerRank) === null || _b === void 0 ? void 0 : _b.rowNumber);
|
|
2543
|
+
return (h("tr", { class: isViewingUsersRow ? "highlight" : "" },
|
|
2544
|
+
styles.showRank && (h("td", { class: "Rank" }, getRankCellText(user.rank, isViewingUsersRow))),
|
|
2545
|
+
!styles.hideNames && h("td", { class: "User" }, getUsersName(user)),
|
|
2546
|
+
h("td", { class: "Score" }, user.textValue)));
|
|
2547
|
+
}),
|
|
2548
|
+
!userSeenFlag && !styles.hideViewer && (h("tr", null,
|
|
2549
|
+
h("td", { colSpan: 100, class: "ellipses" },
|
|
2550
|
+
h("sl-icon", { name: "three-dots", style: { verticalAlign: "middle" } })))),
|
|
2551
|
+
!userSeenFlag && !styles.hideViewer && (h("tr", { class: "highlight" },
|
|
2552
|
+
styles.showRank && (h("td", { class: "Rank" }, getRankCellText((_b = data.viewerRank) === null || _b === void 0 ? void 0 : _b.rank, true))),
|
|
2553
|
+
!styles.hideNames && (h("td", { class: "User" }, getUsersName(data.viewerRank || {}))),
|
|
2554
|
+
h("td", { class: "Score" }, ((_c = data.viewerRank) === null || _c === void 0 ? void 0 : _c.textValue) || "0"))))));
|
|
2555
|
+
}
|
|
2556
|
+
|
|
2557
|
+
const paddingList = [
|
|
2558
|
+
"var(--sl-spacing-xxx-small)",
|
|
2559
|
+
"var(--sl-spacing-xx-small)",
|
|
2560
|
+
"var(--sl-spacing-x-small)",
|
|
2561
|
+
"var(--sl-spacing-small)",
|
|
2562
|
+
"var(--sl-spacing-medium)",
|
|
2563
|
+
"var(--sl-spacing-large)",
|
|
2564
|
+
"var(--sl-spacing-x-large)",
|
|
2565
|
+
"var(--sl-spacing-xx-large)",
|
|
2566
|
+
"var(--sl-spacing-xxx-large)",
|
|
2567
|
+
"var(--sl-spacing-xxxx-large)",
|
|
2568
|
+
];
|
|
2569
|
+
const parseBackground = (provided_bg) => {
|
|
2570
|
+
if (provided_bg) {
|
|
2571
|
+
if (isValidColor(provided_bg)) {
|
|
2572
|
+
return provided_bg;
|
|
2573
|
+
}
|
|
2574
|
+
else {
|
|
2575
|
+
return `url(${provided_bg})`;
|
|
2576
|
+
}
|
|
2577
|
+
}
|
|
2578
|
+
else {
|
|
2579
|
+
return "var(--sqm-portal-background)";
|
|
2580
|
+
}
|
|
2581
|
+
};
|
|
2582
|
+
function HeroView(props) {
|
|
2583
|
+
const { states, content } = props;
|
|
2584
|
+
const { secondaryBackground = "var(--sqm-portal-background)" } = states;
|
|
2585
|
+
const getVertivalPadding = (size, half) => {
|
|
2586
|
+
const sizes = {
|
|
2587
|
+
small: 7,
|
|
2588
|
+
medium: 8,
|
|
2589
|
+
large: 9,
|
|
2590
|
+
};
|
|
2591
|
+
var index = sizes[size];
|
|
2592
|
+
if (isMobile(650)) {
|
|
2593
|
+
index = index - 2;
|
|
2594
|
+
}
|
|
2595
|
+
else if (isMobile(767)) {
|
|
2596
|
+
index = index - 1;
|
|
2597
|
+
}
|
|
2598
|
+
return half ? paddingList[index - 2] : paddingList[index];
|
|
2599
|
+
};
|
|
2600
|
+
const getHorizontalPadding = (size) => {
|
|
2601
|
+
if (size == "small") {
|
|
2602
|
+
return "1%";
|
|
2603
|
+
}
|
|
2604
|
+
else if (size == "medium") {
|
|
2605
|
+
return "3%";
|
|
2606
|
+
}
|
|
2607
|
+
else {
|
|
2608
|
+
return "5%";
|
|
2609
|
+
}
|
|
2610
|
+
};
|
|
2611
|
+
// Dependent on props, not feasiable to move out
|
|
2612
|
+
const style = {
|
|
2613
|
+
TwoColumnContainer: {
|
|
2614
|
+
display: "flex",
|
|
2615
|
+
"@media screen and (max-width: 650px)": {
|
|
2616
|
+
flexDirection: states.wrapDirection == "wrap-reverse" ? "column-reverse" : "column",
|
|
2617
|
+
justfiyContent: "center",
|
|
2618
|
+
},
|
|
2619
|
+
},
|
|
2620
|
+
ColumnPadding: {
|
|
2621
|
+
paddingTop: states.paddingSize == "none"
|
|
2622
|
+
? "0px"
|
|
2623
|
+
: getVertivalPadding(states.paddingSize),
|
|
2624
|
+
paddingBottom: states.paddingSize == "none"
|
|
2625
|
+
? "0px"
|
|
2626
|
+
: getVertivalPadding(states.paddingSize),
|
|
2627
|
+
paddingLeft: states.paddingSize == "none"
|
|
2628
|
+
? "0px"
|
|
2629
|
+
: getHorizontalPadding(states.paddingSize),
|
|
2630
|
+
paddingRight: states.paddingSize == "none"
|
|
2631
|
+
? "0px"
|
|
2632
|
+
: getHorizontalPadding(states.paddingSize),
|
|
2633
|
+
},
|
|
2634
|
+
ColumnWrapper: {
|
|
2635
|
+
"&:first-of-type": {
|
|
2636
|
+
background: `no-repeat center/cover ${parseBackground(states.background)}`,
|
|
2637
|
+
},
|
|
2638
|
+
"&:last-of-type": {
|
|
2639
|
+
background: `no-repeat center/cover ${parseBackground(secondaryBackground)}`,
|
|
2640
|
+
},
|
|
2641
|
+
"@media screen and (min-width: 650px)": { flex: "1 1 0" },
|
|
2642
|
+
minHeight: `${states.minHeight}px`,
|
|
2643
|
+
display: "block",
|
|
2644
|
+
},
|
|
2645
|
+
HideColumn: {
|
|
2646
|
+
"@media screen and (max-width: 650px)": { display: "none" },
|
|
2647
|
+
},
|
|
2648
|
+
SingleColumnContainer: {
|
|
2649
|
+
background: `no-repeat center/cover ${parseBackground(states.background)}`,
|
|
2650
|
+
minHeight: `${states.minHeight}px`,
|
|
2651
|
+
},
|
|
2652
|
+
Container: {
|
|
2653
|
+
width: "100%",
|
|
2654
|
+
maxWidth: "var(--sqm-max-width)",
|
|
2655
|
+
margin: "0 auto",
|
|
2656
|
+
flex: 1,
|
|
2657
|
+
display: "flex",
|
|
2658
|
+
flexDirection: "column",
|
|
2659
|
+
minHeight: "100%",
|
|
2660
|
+
},
|
|
2661
|
+
};
|
|
2662
|
+
const sheet = createStyleSheet(style);
|
|
2663
|
+
const styleString = sheet.toString();
|
|
2664
|
+
const vanillaStyle = `
|
|
2665
|
+
:host{
|
|
2666
|
+
height: 100%;
|
|
2667
|
+
display: contents;
|
|
2668
|
+
}
|
|
2669
|
+
sqm-hero{
|
|
2670
|
+
height: 100%;
|
|
2671
|
+
display: contents;
|
|
2672
|
+
}
|
|
2673
|
+
img{
|
|
2674
|
+
max-width: 100%;
|
|
2675
|
+
height: auto;
|
|
2676
|
+
}
|
|
2677
|
+
|
|
2678
|
+
`;
|
|
2679
|
+
// NOTE: Spacing on the columns is controlled on the slots itself. For example using inline styling
|
|
2680
|
+
return (h("div", { class: sheet.classes.Container, part: "sqm-base" },
|
|
2681
|
+
h("style", { type: "text/css" },
|
|
2682
|
+
vanillaStyle,
|
|
2683
|
+
styleString),
|
|
2684
|
+
states.columns == 2 ? (h("div", { class: sheet.classes.TwoColumnContainer, part: "sqm-two-col-container" },
|
|
2685
|
+
h("div", { part: "sqm-two-col-primary-col", class: `${sheet.classes.ColumnWrapper} ${sheet.classes.ColumnPadding} ${states.columnToHideInMobile === "primary"
|
|
2686
|
+
? sheet.classes.HideColumn
|
|
2687
|
+
: ""}` }, content.primaryColumn),
|
|
2688
|
+
h("div", { part: "sqm-two-col-secondary-col", class: `${sheet.classes.ColumnWrapper} ${sheet.classes.ColumnPadding} ${states.columnToHideInMobile === "secondary"
|
|
2689
|
+
? sheet.classes.HideColumn
|
|
2690
|
+
: ""}` }, content.secondaryColumn))) : (h("div", { part: "sqm-single-col", class: `${sheet.classes.SingleColumnContainer} ${sheet.classes.ColumnPadding}` }, content.primaryColumn))));
|
|
2691
|
+
}
|
|
2692
|
+
|
|
2693
|
+
const style$6 = {
|
|
2694
|
+
ErrorStyle: ErrorStyles,
|
|
2695
|
+
FieldContainer: {
|
|
2696
|
+
"margin-bottom": "var(--sl-spacing-large)",
|
|
2697
|
+
},
|
|
2698
|
+
};
|
|
2699
|
+
const vanillaStyle$3 = `
|
|
2700
|
+
:host {
|
|
2701
|
+
margin: 0 auto;
|
|
2702
|
+
width: 100%;
|
|
2703
|
+
display: block;
|
|
2704
|
+
}
|
|
2705
|
+
`;
|
|
2706
|
+
jss.setup(create());
|
|
2707
|
+
const sheet$6 = jss.createStyleSheet(style$6);
|
|
2708
|
+
const styleString$6 = sheet$6.toString();
|
|
2709
|
+
function InputFieldView(props) {
|
|
2710
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
2711
|
+
const { states, content } = props;
|
|
2712
|
+
const validationErrors = (_a = states === null || states === void 0 ? void 0 : states.registrationFormState) === null || _a === void 0 ? void 0 : _a.validationErrors;
|
|
2713
|
+
return (h("div", { class: sheet$6.classes.FieldContainer, part: "sqm-base" },
|
|
2714
|
+
h("style", { type: "text/css" },
|
|
2715
|
+
vanillaStyle$3,
|
|
2716
|
+
styleString$6),
|
|
2717
|
+
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]) ? {
|
|
2718
|
+
value: (_g = (_f = states.registrationFormState) === null || _f === void 0 ? void 0 : _f.initialData) === null || _g === void 0 ? void 0 : _g[content.fieldName],
|
|
2917
2719
|
}
|
|
2918
2720
|
: {}), ((validationErrors === null || validationErrors === void 0 ? void 0 : validationErrors[content.fieldName]) ? {
|
|
2919
|
-
class: sheet$
|
|
2721
|
+
class: sheet$6.classes.ErrorStyle,
|
|
2920
2722
|
helpText: intl.formatMessage({
|
|
2921
2723
|
id: `errorMessage-${content.fieldName}`,
|
|
2922
2724
|
defaultMessage: content.errorMessage || (validationErrors === null || validationErrors === void 0 ? void 0 : validationErrors[content.fieldName]),
|
|
@@ -2925,6 +2727,319 @@ function InputFieldView(props) {
|
|
|
2925
2727
|
: [])))));
|
|
2926
2728
|
}
|
|
2927
2729
|
|
|
2730
|
+
const style$7 = {
|
|
2731
|
+
ErrorStyle: ErrorStyles,
|
|
2732
|
+
FieldsContainer: {
|
|
2733
|
+
"& sl-input": {
|
|
2734
|
+
"margin-bottom": "var(--sl-spacing-large)",
|
|
2735
|
+
},
|
|
2736
|
+
},
|
|
2737
|
+
};
|
|
2738
|
+
const vanillaStyle$4 = `
|
|
2739
|
+
:host {
|
|
2740
|
+
margin: 0 auto;
|
|
2741
|
+
width: 100%;
|
|
2742
|
+
display: block;
|
|
2743
|
+
}
|
|
2744
|
+
|
|
2745
|
+
*::part(input-label), *::part(select-label), *::part(textarea-label){
|
|
2746
|
+
font-size: var(--sqm-input-label-font-size, var(--sl-input-font-size-small));
|
|
2747
|
+
font-weight: var(--sl-font-weight-semibold);
|
|
2748
|
+
color: var(--sqm-input-label-color, var(--sqm-text), black);
|
|
2749
|
+
}
|
|
2750
|
+
|
|
2751
|
+
*::part(input-base), *::part(select-base), *::part(textarea-base){
|
|
2752
|
+
background-color: var(--sqm-input-background, #fff);
|
|
2753
|
+
border-radius: var(--sqm-input-border-radius, var(--sl-input-border-radius-large), 0.25rem);
|
|
2754
|
+
color: var(--sqm-input-color, white);
|
|
2755
|
+
border-width: var(--sqm-border-thickness, 1px);
|
|
2756
|
+
}
|
|
2757
|
+
|
|
2758
|
+
sl-input::part(base):focus,
|
|
2759
|
+
sl-select::part(form-control-wrapper):focus,
|
|
2760
|
+
sl-textare::part(textarea-label):focus {
|
|
2761
|
+
border-color: none;
|
|
2762
|
+
border: var(--sqm-input-focus-border, var(--sqm-border-thickness) solid var(--sl-input-border-color-focus));
|
|
2763
|
+
}
|
|
2764
|
+
|
|
2765
|
+
*::part(input-label):disabled, *::part(select-label):disabled, *::part(textarea-label):disabled{
|
|
2766
|
+
background: var(--sqm-input-disabled-background, #f5f5f5);
|
|
2767
|
+
color: var(--sqm-input-disabled-color, var(--sl-color-gray-600));
|
|
2768
|
+
}
|
|
2769
|
+
|
|
2770
|
+
sl-input {
|
|
2771
|
+
--sl-input-border-color-focus: var(--sqm-border-color-focus);
|
|
2772
|
+
}
|
|
2773
|
+
|
|
2774
|
+
`;
|
|
2775
|
+
const sheet$7 = createStyleSheet(style$7);
|
|
2776
|
+
const styleString$7 = sheet$7.toString();
|
|
2777
|
+
function NameFieldsView(props) {
|
|
2778
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
|
|
2779
|
+
const { states } = props;
|
|
2780
|
+
const validationErrors = (_a = states === null || states === void 0 ? void 0 : states.registrationFormState) === null || _a === void 0 ? void 0 : _a.validationErrors;
|
|
2781
|
+
return (h("div", { class: sheet$7.classes.FieldsContainer },
|
|
2782
|
+
h("style", { type: "text/css" },
|
|
2783
|
+
vanillaStyle$4,
|
|
2784
|
+
styleString$7),
|
|
2785
|
+
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) ? {
|
|
2786
|
+
value: (_g = (_f = states.registrationFormState) === null || _f === void 0 ? void 0 : _f.initialData) === null || _g === void 0 ? void 0 : _g.firstName,
|
|
2787
|
+
}
|
|
2788
|
+
: {}), ((validationErrors === null || validationErrors === void 0 ? void 0 : validationErrors.firstName) ? {
|
|
2789
|
+
class: sheet$7.classes.ErrorStyle,
|
|
2790
|
+
helpText: (validationErrors === null || validationErrors === void 0 ? void 0 : validationErrors.firstName) || "Cannot be empty",
|
|
2791
|
+
}
|
|
2792
|
+
: []))),
|
|
2793
|
+
h("sl-input", Object.assign({ exportparts: "label: input-label, base: input-base", name: "/lastName", type: "text", label: states.content.lastNameLabel, required: true, disabled: ((_h = states.registrationFormState) === null || _h === void 0 ? void 0 : _h.loading) || ((_j = states.registrationFormState) === null || _j === void 0 ? void 0 : _j.disabled) }, (((_l = (_k = states.registrationFormState) === null || _k === void 0 ? void 0 : _k.initialData) === null || _l === void 0 ? void 0 : _l.lastName) ? {
|
|
2794
|
+
value: (_o = (_m = states.registrationFormState) === null || _m === void 0 ? void 0 : _m.initialData) === null || _o === void 0 ? void 0 : _o.lastName,
|
|
2795
|
+
}
|
|
2796
|
+
: {}), ((validationErrors === null || validationErrors === void 0 ? void 0 : validationErrors.lastName) ? {
|
|
2797
|
+
class: sheet$7.classes.ErrorStyle,
|
|
2798
|
+
helpText: (validationErrors === null || validationErrors === void 0 ? void 0 : validationErrors.lastName) || "Cannot be empty",
|
|
2799
|
+
}
|
|
2800
|
+
: [])))));
|
|
2801
|
+
}
|
|
2802
|
+
|
|
2803
|
+
function ChangeMarktingView(props) {
|
|
2804
|
+
const { states, callbacks } = props;
|
|
2805
|
+
const { text, formState } = states;
|
|
2806
|
+
const { error } = formState;
|
|
2807
|
+
const style = {
|
|
2808
|
+
Container: {
|
|
2809
|
+
display: "flex",
|
|
2810
|
+
flexDirection: "column",
|
|
2811
|
+
gap: "var(--sl-spacing-x-small)",
|
|
2812
|
+
padding: "0 var(--sl-spacing-xxx-large) var(--sl-spacing-xxx-large)",
|
|
2813
|
+
},
|
|
2814
|
+
SubmitButton: { marginBottom: "var(--sl-spacing-medium)" },
|
|
2815
|
+
Error: {
|
|
2816
|
+
"&::part(erroralert-base)": {
|
|
2817
|
+
"margin-bottom": "15px",
|
|
2818
|
+
},
|
|
2819
|
+
},
|
|
2820
|
+
Success: {
|
|
2821
|
+
"&::part(successalert-base)": {
|
|
2822
|
+
"margin-bottom": "15px",
|
|
2823
|
+
},
|
|
2824
|
+
},
|
|
2825
|
+
};
|
|
2826
|
+
const sheet = createStyleSheet(style);
|
|
2827
|
+
const styleString = sheet.toString();
|
|
2828
|
+
return (h("div", { class: sheet.classes.Container, part: "sqm-base" },
|
|
2829
|
+
h("style", { type: "text/css" }, styleString),
|
|
2830
|
+
h(TextSpanView, Object.assign({}, { type: "h2" }), text.emailPreferencesHeader),
|
|
2831
|
+
h("sl-form", { "onSl-submit": callbacks.onSubmit },
|
|
2832
|
+
h(CheckboxFieldView, { states: {
|
|
2833
|
+
checked: states.formState.marketingEmailOptIn,
|
|
2834
|
+
}, content: {
|
|
2835
|
+
checkboxLabel: text.marketingCheckboxLabel,
|
|
2836
|
+
checkboxName: "marketingEmailOptIn",
|
|
2837
|
+
}, callbacks: {
|
|
2838
|
+
setChecked: callbacks.setChecked,
|
|
2839
|
+
} }),
|
|
2840
|
+
h("sl-button", { class: sheet.classes.SubmitButton, type: "primary", submit: true, loading: states.loading, disabled: states.submitDisabled }, text.submitChangeButtonText),
|
|
2841
|
+
error && (h("sqm-form-message", { class: sheet.classes.Error, type: "error", exportparts: "erroralert-icon" },
|
|
2842
|
+
h("div", { part: "erroralert-text" }, error))),
|
|
2843
|
+
states.success && (h("sqm-form-message", { class: sheet.classes.Success, type: "success", exportparts: "successalert-icon" },
|
|
2844
|
+
h("div", { part: "successalert-text" }, states.text.successMessage))))));
|
|
2845
|
+
}
|
|
2846
|
+
|
|
2847
|
+
const vanillaStyle$5 = `
|
|
2848
|
+
:host{
|
|
2849
|
+
margin: 0 auto;
|
|
2850
|
+
width: 100%;
|
|
2851
|
+
}
|
|
2852
|
+
a{
|
|
2853
|
+
cursor:pointer;
|
|
2854
|
+
color: var(--sqm-text-subdued);
|
|
2855
|
+
text-decoration: none ;
|
|
2856
|
+
}
|
|
2857
|
+
`;
|
|
2858
|
+
function PortalFooterView(props) {
|
|
2859
|
+
const style = {
|
|
2860
|
+
RowContainer: {
|
|
2861
|
+
display: "flex",
|
|
2862
|
+
"& > :not(:last-child)": {
|
|
2863
|
+
"margin-right": "var(--sl-spacing-large)",
|
|
2864
|
+
},
|
|
2865
|
+
},
|
|
2866
|
+
Container: {
|
|
2867
|
+
display: "flex",
|
|
2868
|
+
"flex-direction": "column",
|
|
2869
|
+
"align-items": "center",
|
|
2870
|
+
"font-size": "var(--sl-font-size-small)",
|
|
2871
|
+
color: "var(--sqm-text-subdued)",
|
|
2872
|
+
"padding-top": `var(--sl-spacing-${props.paddingTop})`,
|
|
2873
|
+
"padding-right": `var(--sl-spacing-${props.paddingRight})`,
|
|
2874
|
+
"padding-bottom": `var(--sl-spacing-${props.paddingBottom})`,
|
|
2875
|
+
"padding-left": `var(--sl-spacing-${props.paddingLeft})`,
|
|
2876
|
+
"row-gap": `var(--sl-spacing-small)`,
|
|
2877
|
+
"& a:hover": {
|
|
2878
|
+
color: "var(--sqm-text)",
|
|
2879
|
+
},
|
|
2880
|
+
},
|
|
2881
|
+
SupportText: {
|
|
2882
|
+
textAlign: "center",
|
|
2883
|
+
margin: 0,
|
|
2884
|
+
},
|
|
2885
|
+
PoweredByLink: {
|
|
2886
|
+
color: "var(--sqm-text-subdued)",
|
|
2887
|
+
"font-size": "var(--sl-font-size-small)",
|
|
2888
|
+
display: "flex",
|
|
2889
|
+
alignItems: "center",
|
|
2890
|
+
svg: {
|
|
2891
|
+
marginTop: "2px",
|
|
2892
|
+
shapeRendering: "geometricprecision",
|
|
2893
|
+
},
|
|
2894
|
+
"&:hover, &:hover *": {
|
|
2895
|
+
color: "var(--sqm-text)",
|
|
2896
|
+
},
|
|
2897
|
+
},
|
|
2898
|
+
};
|
|
2899
|
+
const sheet = createStyleSheet(style);
|
|
2900
|
+
const styleString = sheet.toString();
|
|
2901
|
+
return (h("div", { class: sheet.classes.Container, part: "sqm-base" },
|
|
2902
|
+
h("style", { type: "text/css" },
|
|
2903
|
+
vanillaStyle$5,
|
|
2904
|
+
styleString),
|
|
2905
|
+
h("div", { class: sheet.classes.RowContainer },
|
|
2906
|
+
props.faqLink && (h("a", { target: "_blank", href: props.faqLink }, props.faqText)),
|
|
2907
|
+
props.termsLink && (h("a", { target: "_blank", href: props.termsLink }, props.termsText))),
|
|
2908
|
+
!props.hideSupportText && (h("p", { class: sheet.classes.SupportText }, intl.formatMessage({
|
|
2909
|
+
id: "supportFooter",
|
|
2910
|
+
defaultMessage: props.supportText,
|
|
2911
|
+
}, {
|
|
2912
|
+
email: (h("a", { target: "_blank", href: `mailto:${props.supportEmail}` }, props.supportEmail)),
|
|
2913
|
+
}))),
|
|
2914
|
+
!props.hidePoweredBy && (h("a", { class: sheet.classes.PoweredByLink, target: "_blank", href: props.poweredByLink },
|
|
2915
|
+
"Powered by ",
|
|
2916
|
+
h(PoweredByImg, { color: "currentColor" })))));
|
|
2917
|
+
}
|
|
2918
|
+
|
|
2919
|
+
const vanillaStyle$6 = `
|
|
2920
|
+
:host {
|
|
2921
|
+
display: block;
|
|
2922
|
+
}
|
|
2923
|
+
:host([hidden]): {
|
|
2924
|
+
display: none;
|
|
2925
|
+
}
|
|
2926
|
+
`;
|
|
2927
|
+
function PortalForgotPasswordView(props) {
|
|
2928
|
+
const { states, callbacks, content } = props;
|
|
2929
|
+
const style = {
|
|
2930
|
+
FormWrapper: {
|
|
2931
|
+
...AuthWrapper,
|
|
2932
|
+
background: content.backgroundColor || "var(--sqm-portal-background)",
|
|
2933
|
+
borderRadius: content.borderRadius || "var(--sqm-border-radius-normal)",
|
|
2934
|
+
border: content.border ||
|
|
2935
|
+
"var(--sqm-border-thickness) solid var(--sqm-border-color)",
|
|
2936
|
+
},
|
|
2937
|
+
Column: { ...AuthColumn },
|
|
2938
|
+
ButtonsContainer: AuthButtonsContainer,
|
|
2939
|
+
SecondaryButton: {
|
|
2940
|
+
margin: "auto",
|
|
2941
|
+
display: "block",
|
|
2942
|
+
cursor: "pointer",
|
|
2943
|
+
},
|
|
2944
|
+
};
|
|
2945
|
+
const sheet = createStyleSheet(style);
|
|
2946
|
+
const styleString = sheet.toString();
|
|
2947
|
+
return (h("div", { class: sheet.classes.FormWrapper, part: "sqm-base" },
|
|
2948
|
+
h("style", { type: "text/css" },
|
|
2949
|
+
vanillaStyle$6,
|
|
2950
|
+
styleString),
|
|
2951
|
+
h(TextSpanView, { type: "h3" }, content.messageSlot),
|
|
2952
|
+
h("sl-form", { class: sheet.classes.Column, "onSl-submit": callbacks.submit },
|
|
2953
|
+
props.states.error && (h("sqm-form-message", { type: "error", exportparts: "erroralert-icon" },
|
|
2954
|
+
h("div", { part: "erroralert-text" }, props.states.error))),
|
|
2955
|
+
props.states.success && (h("sqm-form-message", { type: "success", exportparts: "successalert-icon" },
|
|
2956
|
+
h("div", { part: "successalert-text" }, content.successAlertText))),
|
|
2957
|
+
h("sl-input", { exportparts: "label: input-label, base: input-base", type: "email", name: "/email", label: content.emailLabel || "Email", disabled: states.loading, required: true }),
|
|
2958
|
+
h("div", { class: sheet.classes.ButtonsContainer },
|
|
2959
|
+
h("sl-button", { submit: true, loading: states.loading, exportparts: "base: primarybutton-base", type: "primary" }, content.submitLabel || "Reset Password"),
|
|
2960
|
+
h("sl-button", { type: "secondary", exportparts: "base: secondarybutton-base", class: sheet.classes.SecondaryButton, disabled: states.loading, onClick: () => jn.push(states.loginPath) }, content.loginText)))));
|
|
2961
|
+
}
|
|
2962
|
+
|
|
2963
|
+
function PortalFrameView(props, children) {
|
|
2964
|
+
const { data, notFullScreen, border } = props;
|
|
2965
|
+
const style = {
|
|
2966
|
+
HostBlock: HostBlock,
|
|
2967
|
+
Frame: {
|
|
2968
|
+
display: "flex",
|
|
2969
|
+
"flex-direction": "column",
|
|
2970
|
+
"box-sizing": "border-box",
|
|
2971
|
+
"&:nth-child(2)": {
|
|
2972
|
+
background: props.backgroundColor,
|
|
2973
|
+
},
|
|
2974
|
+
},
|
|
2975
|
+
FooterWrapper: {
|
|
2976
|
+
width: "100%",
|
|
2977
|
+
"max-width": "100%",
|
|
2978
|
+
padding: "var(--sl-spacing-medium) var(--sl-spacing-x-large)",
|
|
2979
|
+
background: props.headerAndFooterBackgroundColor,
|
|
2980
|
+
display: "flex",
|
|
2981
|
+
"justify-content": "flex-end",
|
|
2982
|
+
"align-items": "center",
|
|
2983
|
+
"box-sizing": "border-box",
|
|
2984
|
+
borderTop: border,
|
|
2985
|
+
"margin-top": "auto",
|
|
2986
|
+
},
|
|
2987
|
+
HeaderWrapper: {
|
|
2988
|
+
width: "100%",
|
|
2989
|
+
"max-width": "100%",
|
|
2990
|
+
"box-sizing": "border-box",
|
|
2991
|
+
display: "flex",
|
|
2992
|
+
"justify-content": "space-between",
|
|
2993
|
+
padding: "var(--sl-spacing-small) var(--sl-spacing-large)",
|
|
2994
|
+
"align-items": "center",
|
|
2995
|
+
borderBottom: border,
|
|
2996
|
+
background: props.headerAndFooterBackgroundColor,
|
|
2997
|
+
"@media screen and (max-width: 499px)": {
|
|
2998
|
+
"flex-direction": "row-reverse",
|
|
2999
|
+
"justify-content": "flex-end",
|
|
3000
|
+
padding: "0",
|
|
3001
|
+
},
|
|
3002
|
+
},
|
|
3003
|
+
};
|
|
3004
|
+
const sheet = createStyleSheet(style);
|
|
3005
|
+
const styleString = sheet.toString();
|
|
3006
|
+
return (h("div", { style: { minHeight: notFullScreen ? "100%" : "100vh" }, class: sheet.classes.Frame, part: "sqm-base" },
|
|
3007
|
+
h("style", { type: "text/css" }, styleString),
|
|
3008
|
+
h("div", { class: sheet.classes.HeaderWrapper, part: "sqm-header" },
|
|
3009
|
+
data.header,
|
|
3010
|
+
h("slot", { name: "sqm-navigation-menu" })),
|
|
3011
|
+
children,
|
|
3012
|
+
h("div", { class: sheet.classes.FooterWrapper, part: "sqm-footer" }, data.footer)));
|
|
3013
|
+
}
|
|
3014
|
+
|
|
3015
|
+
function ReferralIframeView(props) {
|
|
3016
|
+
const { states, data } = props;
|
|
3017
|
+
const { content } = states;
|
|
3018
|
+
// dependent on props
|
|
3019
|
+
const style = {
|
|
3020
|
+
Container: {
|
|
3021
|
+
position: "relative",
|
|
3022
|
+
width: content.iframeWidth,
|
|
3023
|
+
height: content.iframeHeight,
|
|
3024
|
+
},
|
|
3025
|
+
IFrame: {
|
|
3026
|
+
position: "absolute",
|
|
3027
|
+
width: "100%",
|
|
3028
|
+
height: "100%",
|
|
3029
|
+
border: "0",
|
|
3030
|
+
top: "0",
|
|
3031
|
+
left: "0",
|
|
3032
|
+
right: "0",
|
|
3033
|
+
},
|
|
3034
|
+
};
|
|
3035
|
+
// JSS config
|
|
3036
|
+
const sheet = createStyleSheet(style);
|
|
3037
|
+
const styleString = sheet.toString();
|
|
3038
|
+
return (h("div", { class: sheet.classes.Container },
|
|
3039
|
+
h("style", { type: "text/css" }, styleString),
|
|
3040
|
+
h("iframe", { class: sheet.classes.IFrame, src: `${content.iframeSrc}?rsCode=${data.shareCode}` })));
|
|
3041
|
+
}
|
|
3042
|
+
|
|
2928
3043
|
const CheckMark = () => (h("svg", { width: 12, height: 10, fill: "none", xmlns: "http://www.w3.org/2000/svg" },
|
|
2929
3044
|
h("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M11.58.23c.475.371.56 1.057.19 1.532L5.69 9.554a1.091 1.091 0 0 1-1.631.1L.32 5.915a1.09 1.09 0 1 1 1.542-1.542L4.73 7.239 10.049.42A1.09 1.09 0 0 1 11.58.23Z", fill: "#fff" })));
|
|
2930
3045
|
const CheckmarkFilled = () => (h("svg", { width: "18", height: "18", viewBox: "0 0 18 18", fill: "none", xmlns: "http://www.w3.org/2000/svg" },
|
|
@@ -2954,15 +3069,15 @@ function Dot({ active, completed, incomplete, stage, }) {
|
|
|
2954
3069
|
} },
|
|
2955
3070
|
h("div", { style: {
|
|
2956
3071
|
backgroundColor: completed
|
|
2957
|
-
? "var(--
|
|
3072
|
+
? "var(--sqm-success-color-icon)"
|
|
2958
3073
|
: incomplete
|
|
2959
|
-
? "var(--
|
|
2960
|
-
: "
|
|
3074
|
+
? "var(--sqm-border-color)"
|
|
3075
|
+
: "white",
|
|
2961
3076
|
border: active
|
|
2962
|
-
? "1px solid var(--
|
|
3077
|
+
? "1px solid var(--sqm-success-color-border)"
|
|
2963
3078
|
: incomplete
|
|
2964
|
-
? "1px solid var(--
|
|
2965
|
-
: "1px solid var(--
|
|
3079
|
+
? "1px solid var(--sqm-border-color)"
|
|
3080
|
+
: "1px solid var(--sqm-success-color-border)",
|
|
2966
3081
|
borderRadius: "50%",
|
|
2967
3082
|
width: "23px",
|
|
2968
3083
|
height: "23px",
|
|
@@ -2972,8 +3087,8 @@ function Dot({ active, completed, incomplete, stage, }) {
|
|
|
2972
3087
|
} }, completed ? (h("div", { style: { top: "-10.5%", left: "23.5%", position: "relative" } },
|
|
2973
3088
|
h(CheckMark, null))) : (h("div", { style: {
|
|
2974
3089
|
color: active
|
|
2975
|
-
? "var(--
|
|
2976
|
-
: "var(--
|
|
3090
|
+
? "var(--sqm-success-color-border)"
|
|
3091
|
+
: "var(--sqm-text-subdued)",
|
|
2977
3092
|
width: "23px",
|
|
2978
3093
|
lineHeight: "24px",
|
|
2979
3094
|
textAlign: "center",
|
|
@@ -2987,8 +3102,8 @@ function ProgressLine({ incomplete = false, active = false, invisible = false, }
|
|
|
2987
3102
|
height: "4px",
|
|
2988
3103
|
borderRadius: "4px",
|
|
2989
3104
|
background: incomplete || active
|
|
2990
|
-
? "var(--
|
|
2991
|
-
: "var(--
|
|
3105
|
+
? "var(--sqm-border-color)"
|
|
3106
|
+
: "var(--sqm-success-color-icon)",
|
|
2992
3107
|
position: "relative",
|
|
2993
3108
|
bottom: "0",
|
|
2994
3109
|
left: "0",
|
|
@@ -3011,7 +3126,7 @@ function ProgressBar({ stageCount, currentStage, }) {
|
|
|
3011
3126
|
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 })))));
|
|
3012
3127
|
}
|
|
3013
3128
|
|
|
3014
|
-
const style$
|
|
3129
|
+
const style$8 = {
|
|
3015
3130
|
HostBlock: HostBlock,
|
|
3016
3131
|
Container: {
|
|
3017
3132
|
minWidth: "300px",
|
|
@@ -3025,21 +3140,28 @@ const style$b = {
|
|
|
3025
3140
|
margin: "0 auto",
|
|
3026
3141
|
},
|
|
3027
3142
|
Select: {
|
|
3143
|
+
"&::part(base)": {
|
|
3144
|
+
borderRadius: "var(--sqm-input-border-radius)",
|
|
3145
|
+
},
|
|
3028
3146
|
"&::part(label)": {
|
|
3029
|
-
|
|
3147
|
+
color: "var(--sqm-input-label-color)",
|
|
3030
3148
|
},
|
|
3031
3149
|
"&::part(menu)": {
|
|
3032
3150
|
maxHeight: "450px",
|
|
3033
3151
|
},
|
|
3034
3152
|
"& sl-menu-item::part(checked-icon)": {
|
|
3035
3153
|
top: "8px",
|
|
3154
|
+
color: "var(--sqm-text)",
|
|
3036
3155
|
},
|
|
3037
3156
|
"& sl-menu-item::part(base)": {
|
|
3038
3157
|
flexDirection: "column",
|
|
3158
|
+
color: "var(--sqm-input-color)"
|
|
3159
|
+
},
|
|
3160
|
+
"& sl-menu-item::part(base):hover": {
|
|
3161
|
+
backgroundColor: "var(--sqm-input-border-color-hover)",
|
|
3039
3162
|
},
|
|
3040
3163
|
"& sl-menu-item::part(base):focus": {
|
|
3041
|
-
background: "
|
|
3042
|
-
color: "var(--sl-color-gray-700)",
|
|
3164
|
+
background: "var(--sqm-accent-color-background)",
|
|
3043
3165
|
},
|
|
3044
3166
|
},
|
|
3045
3167
|
ProgressBar: {
|
|
@@ -3059,7 +3181,7 @@ const style$b = {
|
|
|
3059
3181
|
flex: "1 1 0",
|
|
3060
3182
|
},
|
|
3061
3183
|
"& .text.subdued": {
|
|
3062
|
-
color: "var(--
|
|
3184
|
+
color: "var(--sqm-text-subdued)",
|
|
3063
3185
|
},
|
|
3064
3186
|
},
|
|
3065
3187
|
},
|
|
@@ -3074,6 +3196,9 @@ const style$b = {
|
|
|
3074
3196
|
userSelect: "none",
|
|
3075
3197
|
height: "120px",
|
|
3076
3198
|
"&::part(base)": {
|
|
3199
|
+
background: "var(--sqm-portal-background)",
|
|
3200
|
+
border: "var(--sqm-border-thickness) solid var(--sqm-border-color)",
|
|
3201
|
+
borderRadius: "var(--sqm-border-radius-normal)",
|
|
3077
3202
|
boxShadow: "none",
|
|
3078
3203
|
width: "100%",
|
|
3079
3204
|
},
|
|
@@ -3082,10 +3207,11 @@ const style$b = {
|
|
|
3082
3207
|
padding: 0,
|
|
3083
3208
|
},
|
|
3084
3209
|
"& .selected": {
|
|
3210
|
+
borderRadius: "var(--sqm-border-radius-normal)",
|
|
3085
3211
|
position: "relative",
|
|
3086
3212
|
top: "-2%",
|
|
3087
3213
|
left: "100%",
|
|
3088
|
-
color: "var(--
|
|
3214
|
+
color: "var(--sqm-primary-color)",
|
|
3089
3215
|
margin: "-9px",
|
|
3090
3216
|
},
|
|
3091
3217
|
},
|
|
@@ -3117,7 +3243,7 @@ const style$b = {
|
|
|
3117
3243
|
fontSize: "var(--sl-font-size-medium)",
|
|
3118
3244
|
lineHeight: "var(--sl-line-height-dense)",
|
|
3119
3245
|
fontWeight: "600",
|
|
3120
|
-
color: "var(--
|
|
3246
|
+
color: "var(--sqm-text)",
|
|
3121
3247
|
display: "-webkit-box",
|
|
3122
3248
|
"-webkit-line-clamp": "1",
|
|
3123
3249
|
"-webkit-box-orient": "vertical",
|
|
@@ -3127,7 +3253,7 @@ const style$b = {
|
|
|
3127
3253
|
fontSize: "var(--sl-font-size-small)",
|
|
3128
3254
|
lineHeight: "var(--sl-line-height-dense)",
|
|
3129
3255
|
marginTop: "var(--sl-spacing-x-small)",
|
|
3130
|
-
color: "var(--
|
|
3256
|
+
color: "var(--sqm-text-subdued)",
|
|
3131
3257
|
display: "-webkit-box",
|
|
3132
3258
|
"-webkit-line-clamp": "1",
|
|
3133
3259
|
"-webkit-box-orient": "vertical",
|
|
@@ -3138,7 +3264,7 @@ const style$b = {
|
|
|
3138
3264
|
lineHeight: "var(--sl-line-height-dense)",
|
|
3139
3265
|
marginTop: "var(--sl-spacing-x-small)",
|
|
3140
3266
|
fontWeight: "600",
|
|
3141
|
-
color: "var(--
|
|
3267
|
+
color: "var(--sqm-warning-color-icon)",
|
|
3142
3268
|
display: "-webkit-box",
|
|
3143
3269
|
"-webkit-line-clamp": "1",
|
|
3144
3270
|
"-webkit-box-orient": "vertical",
|
|
@@ -3173,7 +3299,6 @@ const style$b = {
|
|
|
3173
3299
|
"& .text": {
|
|
3174
3300
|
width: "50%",
|
|
3175
3301
|
maxWidth: "400px",
|
|
3176
|
-
// minWidth: "330px",
|
|
3177
3302
|
"@media (max-width: 799px)": {
|
|
3178
3303
|
width: "auto",
|
|
3179
3304
|
margin: "auto",
|
|
@@ -3182,17 +3307,17 @@ const style$b = {
|
|
|
3182
3307
|
"& .title": {
|
|
3183
3308
|
fontSize: "var(--sl-font-size-large)",
|
|
3184
3309
|
fontWeight: "var(--sl-font-weight-semibold)",
|
|
3185
|
-
color: "var(--
|
|
3310
|
+
color: "var(--sqm-text)",
|
|
3186
3311
|
},
|
|
3187
3312
|
"& .points": {
|
|
3188
3313
|
fontSize: "var(--sl-font-size-large)",
|
|
3189
3314
|
fontWeight: "var(--sl-font-weight-semibold)",
|
|
3190
|
-
color: "var(--
|
|
3315
|
+
color: "var(--sqm-accent-color-text)",
|
|
3191
3316
|
},
|
|
3192
3317
|
"& .description": {
|
|
3193
3318
|
fontSize: "var(--sl-font-size-medium)",
|
|
3194
3319
|
fontWeight: "var(--sl-font-weight-normal)",
|
|
3195
|
-
color: "var(--
|
|
3320
|
+
color: "var(--sqm-text-subdued)",
|
|
3196
3321
|
margin: "var(--sl-spacing-medium) 0",
|
|
3197
3322
|
lineHeight: "var(--sl-line-height-dense)",
|
|
3198
3323
|
marginTop: "var(--sl-spacing-xx-small)",
|
|
@@ -3201,14 +3326,14 @@ const style$b = {
|
|
|
3201
3326
|
marginBottom: "var(--sl-spacing-xxx-large)",
|
|
3202
3327
|
},
|
|
3203
3328
|
"& sl-menu-item[disabled]::part(label)": {
|
|
3204
|
-
color: "var(
|
|
3329
|
+
color: "var(sqm-text-subdued)",
|
|
3205
3330
|
},
|
|
3206
3331
|
"& sl-menu-item[disabled]": {
|
|
3207
3332
|
"& .step-cost": {
|
|
3208
|
-
color: "var(
|
|
3333
|
+
color: "var(sqm-text-subdued)",
|
|
3209
3334
|
},
|
|
3210
3335
|
"& .step-value": {
|
|
3211
|
-
color: "var(
|
|
3336
|
+
color: "var(sqm-text-subdued)",
|
|
3212
3337
|
},
|
|
3213
3338
|
},
|
|
3214
3339
|
},
|
|
@@ -3216,16 +3341,16 @@ const style$b = {
|
|
|
3216
3341
|
display: "flex",
|
|
3217
3342
|
flexDirection: "column",
|
|
3218
3343
|
"&::part(label)": {
|
|
3219
|
-
color: "var(--
|
|
3344
|
+
color: "var(--sqm-text)",
|
|
3220
3345
|
margin: "0",
|
|
3221
3346
|
},
|
|
3222
3347
|
"& .step-cost": {
|
|
3223
|
-
color: "var(--
|
|
3348
|
+
color: "var(--sqm-text-subdued)",
|
|
3224
3349
|
marginBottom: "var(--sl-spacing-x-small)",
|
|
3225
3350
|
},
|
|
3226
3351
|
"& .step-unavailable": {
|
|
3227
3352
|
fontSize: "var(--sl-font-size-small)",
|
|
3228
|
-
color: "var(--
|
|
3353
|
+
color: "var(--sqm-warning-color-text)",
|
|
3229
3354
|
margin: "0",
|
|
3230
3355
|
},
|
|
3231
3356
|
},
|
|
@@ -3234,10 +3359,10 @@ const style$b = {
|
|
|
3234
3359
|
"& .title": {
|
|
3235
3360
|
fontSize: "var(--sl-font-size-large)",
|
|
3236
3361
|
fontWeight: "var(--sl-font-weight-semibold)",
|
|
3237
|
-
color: "var(--
|
|
3362
|
+
color: "var(--sqm-text)",
|
|
3238
3363
|
},
|
|
3239
3364
|
"& .description": {
|
|
3240
|
-
color: "var(--
|
|
3365
|
+
color: "var(--sqm-text-subued)",
|
|
3241
3366
|
maxWidth: "350px",
|
|
3242
3367
|
margin: "0 auto",
|
|
3243
3368
|
lineHeight: "var(--sl-line-height-dense)",
|
|
@@ -3248,7 +3373,7 @@ const style$b = {
|
|
|
3248
3373
|
maxWidth: "350px",
|
|
3249
3374
|
margin: "-30px auto var(--sl-spacing-xxx-large) auto",
|
|
3250
3375
|
textAlign: "left",
|
|
3251
|
-
color: "var(--
|
|
3376
|
+
color: "var(--sqm-text-subdued)",
|
|
3252
3377
|
},
|
|
3253
3378
|
},
|
|
3254
3379
|
Grid: {
|
|
@@ -3290,10 +3415,9 @@ const style$b = {
|
|
|
3290
3415
|
},
|
|
3291
3416
|
"& .field": {
|
|
3292
3417
|
width: "30%",
|
|
3293
|
-
textTransform: "uppercase",
|
|
3294
3418
|
fontSize: "var(--sl-font-size-medium)",
|
|
3295
3419
|
fontWeight: "var(--sl-font-weight-normal)",
|
|
3296
|
-
color: "var(--
|
|
3420
|
+
color: "var(--sqm-text-subdued)",
|
|
3297
3421
|
textAlign: "left",
|
|
3298
3422
|
paddingRight: "var(--sl-spacing-xxx-large)",
|
|
3299
3423
|
"@media (max-width: 499px)": {
|
|
@@ -3307,7 +3431,7 @@ const style$b = {
|
|
|
3307
3431
|
fontWeight: "var(--sl-font-weight-semibold)",
|
|
3308
3432
|
},
|
|
3309
3433
|
"& .top-border": {
|
|
3310
|
-
borderTop: "
|
|
3434
|
+
borderTop: "var(--sqm-border-thickness) solid var(--sqm-border-color)",
|
|
3311
3435
|
},
|
|
3312
3436
|
"& .image": {
|
|
3313
3437
|
width: "200px",
|
|
@@ -3323,10 +3447,6 @@ const style$b = {
|
|
|
3323
3447
|
"& .cancel": {
|
|
3324
3448
|
marginLeft: "auto",
|
|
3325
3449
|
marginRight: "var(--sl-spacing-medium)",
|
|
3326
|
-
"&::part(base)": {
|
|
3327
|
-
fontWeight: "var(--sl-font-weight-normal)",
|
|
3328
|
-
color: "var(--sl-color-neutral-1000)",
|
|
3329
|
-
},
|
|
3330
3450
|
"@media (max-width: 499px)": {
|
|
3331
3451
|
width: "100%",
|
|
3332
3452
|
marginRight: "0",
|
|
@@ -3334,12 +3454,6 @@ const style$b = {
|
|
|
3334
3454
|
},
|
|
3335
3455
|
},
|
|
3336
3456
|
"& .continue": {
|
|
3337
|
-
"&::part(base)": {
|
|
3338
|
-
background: "var(--sl-color-primary-500)",
|
|
3339
|
-
borderColor: "var(--sl-color-primary-500)",
|
|
3340
|
-
fontWeight: "var(--sl-font-weight-normal)",
|
|
3341
|
-
color: "var(--sl-color-neutral-0)",
|
|
3342
|
-
},
|
|
3343
3457
|
"@media (max-width: 499px)": {
|
|
3344
3458
|
width: "100%",
|
|
3345
3459
|
},
|
|
@@ -3362,8 +3476,8 @@ const style$b = {
|
|
|
3362
3476
|
},
|
|
3363
3477
|
};
|
|
3364
3478
|
// JSS config
|
|
3365
|
-
const sheet$
|
|
3366
|
-
const styleString$
|
|
3479
|
+
const sheet$8 = createStyleSheet(style$8);
|
|
3480
|
+
const styleString$8 = sheet$8.toString();
|
|
3367
3481
|
const stageList = ["chooseReward", "chooseAmount", "confirmation", "success"];
|
|
3368
3482
|
function RewardExchangeView(props) {
|
|
3369
3483
|
const { states, data, callbacks, refs } = props;
|
|
@@ -3386,7 +3500,7 @@ function RewardExchangeView(props) {
|
|
|
3386
3500
|
sourceUnit: item.sourceUnit,
|
|
3387
3501
|
})));
|
|
3388
3502
|
}
|
|
3389
|
-
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$
|
|
3503
|
+
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) => {
|
|
3390
3504
|
var _a, _b, _c, _d, _e;
|
|
3391
3505
|
return callbacks.setExchangeState({
|
|
3392
3506
|
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,
|
|
@@ -3394,7 +3508,7 @@ function RewardExchangeView(props) {
|
|
|
3394
3508
|
});
|
|
3395
3509
|
} }, (_c = item.steps) === null || _c === void 0 ? void 0 : _c.map((step) => {
|
|
3396
3510
|
var _a, _b;
|
|
3397
|
-
return (h("sl-menu-item", { value: step, disabled: !step.available, class: sheet$
|
|
3511
|
+
return (h("sl-menu-item", { value: step, disabled: !step.available, class: sheet$8.classes.SelectItem },
|
|
3398
3512
|
step.prettyDestinationValue,
|
|
3399
3513
|
h("br", null),
|
|
3400
3514
|
h("div", { class: "step-cost", slot: "suffix" },
|
|
@@ -3413,17 +3527,18 @@ function RewardExchangeView(props) {
|
|
|
3413
3527
|
var _a;
|
|
3414
3528
|
return [
|
|
3415
3529
|
h("div", { part: "choose-reward-container" },
|
|
3416
|
-
h("div", { class: sheet$
|
|
3417
|
-
states.loading || states.queryError ? (loading()) : (h("div", { class: sheet$
|
|
3530
|
+
h("div", { class: sheet$8.classes.Title }, states.content.text.rewardTitle),
|
|
3531
|
+
states.loading || states.queryError ? (loading()) : (h("div", { class: sheet$8.classes.Grid }, (_a = data.exchangeList) === null || _a === void 0 ? void 0 : _a.map((item) => {
|
|
3418
3532
|
var _a, _b, _c, _d, _e;
|
|
3419
3533
|
const style = {
|
|
3420
3534
|
boxShadow: item.key === (selectedItem === null || selectedItem === void 0 ? void 0 : selectedItem.key)
|
|
3421
|
-
? "0 0 0 2px var(--
|
|
3535
|
+
? "0 0 0 2px var(--sqm-primary-color)"
|
|
3422
3536
|
: "none",
|
|
3423
|
-
borderRadius: "
|
|
3537
|
+
borderRadius: "var(--sqm-border-radius-normal)",
|
|
3538
|
+
borderColor: "none",
|
|
3424
3539
|
};
|
|
3425
3540
|
return (h("div", { key: item.key, style: style },
|
|
3426
|
-
h("sl-card", { exportparts: "base: exchange-card-container", class: sheet$
|
|
3541
|
+
h("sl-card", { exportparts: "base: exchange-card-container", class: sheet$8.classes.Card, style: {
|
|
3427
3542
|
cursor: item.unavailableReasonCode
|
|
3428
3543
|
? "not-allowed"
|
|
3429
3544
|
: "pointer",
|
|
@@ -3440,14 +3555,14 @@ function RewardExchangeView(props) {
|
|
|
3440
3555
|
? "rgba(0, 0, 0, 0.05)"
|
|
3441
3556
|
: "rgba(0, 0, 0, 0)",
|
|
3442
3557
|
} },
|
|
3443
|
-
h("div", { class: sheet$
|
|
3558
|
+
h("div", { class: sheet$8.classes.Image, style: {
|
|
3444
3559
|
opacity: item.unavailableReasonCode ? "0.5" : "1",
|
|
3445
3560
|
} },
|
|
3446
3561
|
h("img", { class: item.unavailableReasonCode
|
|
3447
3562
|
? "image subdued"
|
|
3448
3563
|
: "image", src: (item === null || item === void 0 ? void 0 : item.imageUrl) ||
|
|
3449
3564
|
getAssetPath("./assets/Reward-image.png") })),
|
|
3450
|
-
h("div", { class: sheet$
|
|
3565
|
+
h("div", { class: sheet$8.classes.TextArea, style: {
|
|
3451
3566
|
opacity: item.unavailableReasonCode ? "0.5" : "1",
|
|
3452
3567
|
} },
|
|
3453
3568
|
h("div", { class: "title", style: {
|
|
@@ -3480,8 +3595,8 @@ function RewardExchangeView(props) {
|
|
|
3480
3595
|
item.prettySourceMinValue,
|
|
3481
3596
|
}))))))));
|
|
3482
3597
|
}))),
|
|
3483
|
-
h("div", { class: sheet$
|
|
3484
|
-
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))),
|
|
3598
|
+
h("div", { class: sheet$8.classes.Button },
|
|
3599
|
+
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))),
|
|
3485
3600
|
];
|
|
3486
3601
|
}
|
|
3487
3602
|
function chooseAmount() {
|
|
@@ -3491,7 +3606,7 @@ function RewardExchangeView(props) {
|
|
|
3491
3606
|
? false
|
|
3492
3607
|
: input && !states.amount;
|
|
3493
3608
|
return (h("div", null,
|
|
3494
|
-
h("div", { class: sheet$
|
|
3609
|
+
h("div", { class: sheet$8.classes.ChooseAmount, part: "choose-amount-container" },
|
|
3495
3610
|
h("div", { class: "wrapper" },
|
|
3496
3611
|
h("img", { class: "image", src: (selectedItem === null || selectedItem === void 0 ? void 0 : selectedItem.imageUrl) ||
|
|
3497
3612
|
getAssetPath("./assets/Reward-image.png") }),
|
|
@@ -3500,20 +3615,20 @@ function RewardExchangeView(props) {
|
|
|
3500
3615
|
((_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)),
|
|
3501
3616
|
((_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)),
|
|
3502
3617
|
h("div", { class: "space" }))),
|
|
3503
|
-
h("div", { class: sheet$
|
|
3504
|
-
h("sl-button", { exportparts: "base: secondarybutton-base", class: "cancel", size: "large", type: "
|
|
3505
|
-
h("sl-button", { exportparts: "base: primarybutton-base", class: "continue", size: "large", onClick: () => callbacks.setStage("confirmation"), disabled: isDisabled }, states.content.text.continueToConfirmationText)))));
|
|
3618
|
+
h("div", { class: sheet$8.classes.Button },
|
|
3619
|
+
h("sl-button", { exportparts: "base: secondarybutton-base", class: "cancel", size: "large", type: "secondary", onClick: () => callbacks.resetState() }, states.content.text.cancelText),
|
|
3620
|
+
h("sl-button", { exportparts: "base: primarybutton-base", class: "continue", size: "large", type: "primary", onClick: () => callbacks.setStage("confirmation"), disabled: isDisabled }, states.content.text.continueToConfirmationText)))));
|
|
3506
3621
|
}
|
|
3507
3622
|
function confirmation() {
|
|
3508
|
-
const cost = (selectedStep === null || selectedStep === void 0 ? void 0 : selectedStep.prettySourceValue) || selectedItem.prettySourceValue;
|
|
3623
|
+
const cost = (selectedStep === null || selectedStep === void 0 ? void 0 : selectedStep.prettySourceValue) || (selectedItem === null || selectedItem === void 0 ? void 0 : selectedItem.prettySourceValue);
|
|
3509
3624
|
const amount = selectedStep === null || selectedStep === void 0 ? void 0 : selectedStep.prettyDestinationValue;
|
|
3510
3625
|
return (h("div", null,
|
|
3511
|
-
h("div", { class: sheet$
|
|
3512
|
-
h("div", { class: sheet$
|
|
3626
|
+
h("div", { class: sheet$8.classes.Confirmation, part: "confirmation-container" },
|
|
3627
|
+
h("div", { class: sheet$8.classes.Title }, states.content.text.redeemTitle),
|
|
3513
3628
|
h("div", { class: "wrapper" },
|
|
3514
3629
|
h("div", { class: "field" }, states.content.text.rewardNameTitle),
|
|
3515
3630
|
h("div", { class: "reward-item-container" },
|
|
3516
|
-
h("div", { class: "reward-title" }, selectedItem.name),
|
|
3631
|
+
h("div", { class: "reward-title" }, selectedItem === null || selectedItem === void 0 ? void 0 : selectedItem.name),
|
|
3517
3632
|
h("img", { class: "image", src: (selectedItem === null || selectedItem === void 0 ? void 0 : selectedItem.imageUrl) ||
|
|
3518
3633
|
getAssetPath("./assets/Reward-image.png") }))),
|
|
3519
3634
|
h("div", { class: "wrapper padding" },
|
|
@@ -3524,13 +3639,13 @@ function RewardExchangeView(props) {
|
|
|
3524
3639
|
h("div", { class: "wrapper top-border padding" },
|
|
3525
3640
|
h("div", { class: "field" }, states.content.text.costTitle),
|
|
3526
3641
|
h("div", { class: "value" }, cost)),
|
|
3527
|
-
h("div", { class: sheet$
|
|
3528
|
-
h("sl-button", { class: "cancel", type: "
|
|
3529
|
-
h("sl-button", { class: "continue", size: "large", loading: states.loading, onClick: callbacks.exchangeReward }, states.content.text.redeemText)))));
|
|
3642
|
+
h("div", { class: sheet$8.classes.Button },
|
|
3643
|
+
h("sl-button", { class: "cancel", type: "secondary", size: "large", onClick: () => callbacks.setStage("chooseAmount") }, states.content.text.backText),
|
|
3644
|
+
h("sl-button", { class: "continue", size: "large", type: "primary", loading: states.loading, onClick: callbacks.exchangeReward }, states.content.text.redeemText)))));
|
|
3530
3645
|
}
|
|
3531
3646
|
function success() {
|
|
3532
|
-
var _a, _b, _c, _d, _e, _f;
|
|
3533
|
-
return (h("div", { class: sheet$
|
|
3647
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
3648
|
+
return (h("div", { class: sheet$8.classes.Success, part: "success-container" },
|
|
3534
3649
|
h(Gift$1, null),
|
|
3535
3650
|
h(Confetti, null),
|
|
3536
3651
|
h("div", { class: "title" }, (_a = states.content.text) === null || _a === void 0 ? void 0 : _a.rewardRedeemedText),
|
|
@@ -3538,14 +3653,13 @@ function RewardExchangeView(props) {
|
|
|
3538
3653
|
id: "successMessage",
|
|
3539
3654
|
defaultMessage: states.content.text.redemptionSuccessText,
|
|
3540
3655
|
}, {
|
|
3541
|
-
sourceValue: (_b = states.selectedItem.prettySourceValue) !== null &&
|
|
3542
|
-
destinationValue: ((
|
|
3543
|
-
states.selectedItem.globalRewardKey,
|
|
3656
|
+
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,
|
|
3657
|
+
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),
|
|
3544
3658
|
})),
|
|
3545
3659
|
(data === null || data === void 0 ? void 0 : data.fuelTankCode) && (h("div", { class: "promo" },
|
|
3546
3660
|
states.content.text.promoCode,
|
|
3547
|
-
h(CopyTextView, { copyString: data.fuelTankCode, tooltiptext: (
|
|
3548
|
-
h("div", { class: sheet$
|
|
3661
|
+
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 }))),
|
|
3662
|
+
h("div", { class: sheet$8.classes.Button },
|
|
3549
3663
|
h("sl-button", { class: "continue center", type: "primary", size: "large", onClick: () => callbacks.resetState(true) }, states.content.text.doneText))));
|
|
3550
3664
|
}
|
|
3551
3665
|
const stages = {
|
|
@@ -3557,7 +3671,7 @@ function RewardExchangeView(props) {
|
|
|
3557
3671
|
const currentStage = stages[states.redeemStage];
|
|
3558
3672
|
function stageMap() {
|
|
3559
3673
|
const stageNumber = stageList.indexOf(states.redeemStage);
|
|
3560
|
-
return (h("div", { class: sheet$
|
|
3674
|
+
return (h("div", { class: sheet$8.classes.ProgressBar },
|
|
3561
3675
|
h("div", { class: "text-area" }, Object.keys(stageProgressList).map((stage) => {
|
|
3562
3676
|
if (stageList.indexOf(stage) <= stageNumber) {
|
|
3563
3677
|
return h("span", { class: "text" }, stageProgressList[stage]);
|
|
@@ -3569,16 +3683,16 @@ function RewardExchangeView(props) {
|
|
|
3569
3683
|
h(ProgressBar, { stageCount: 3, currentStage: stageNumber })));
|
|
3570
3684
|
}
|
|
3571
3685
|
function loading() {
|
|
3572
|
-
return (h("div", { class: sheet$
|
|
3686
|
+
return (h("div", { class: sheet$8.classes.Grid, part: "loading-container" }, [...Array(states.content.text.skeletonCardNum)].map(() => {
|
|
3573
3687
|
return (h("div", null,
|
|
3574
|
-
h("sl-card", { class: sheet$
|
|
3575
|
-
h("div", { class: sheet$
|
|
3688
|
+
h("sl-card", { class: sheet$8.classes.Card },
|
|
3689
|
+
h("div", { class: sheet$8.classes.CardLayout },
|
|
3576
3690
|
h("div", null,
|
|
3577
3691
|
h("sl-skeleton", { style: {
|
|
3578
3692
|
width: "100px",
|
|
3579
3693
|
height: "100px",
|
|
3580
3694
|
margin: "9px",
|
|
3581
|
-
"--border-radius": "
|
|
3695
|
+
"--border-radius": "var(--sqm-border-radius-normal)",
|
|
3582
3696
|
} })),
|
|
3583
3697
|
h("div", { style: {
|
|
3584
3698
|
margin: "var(--sl-spacing-small) var(--sl-spacing-small) 0 0",
|
|
@@ -3604,12 +3718,12 @@ function RewardExchangeView(props) {
|
|
|
3604
3718
|
if (!(refs === null || refs === void 0 ? void 0 : refs.canvasRef))
|
|
3605
3719
|
return;
|
|
3606
3720
|
refs.canvasRef.current = canvas;
|
|
3607
|
-
}, id: "my-canvas", class: sheet$
|
|
3721
|
+
}, id: "my-canvas", class: sheet$8.classes.Confetti }));
|
|
3608
3722
|
}
|
|
3609
3723
|
if (states.noExchangeOptions)
|
|
3610
3724
|
return states.content.text.empty;
|
|
3611
|
-
return (h("div", { class: sheet$
|
|
3612
|
-
h("style", { type: "text/css" }, styleString$
|
|
3725
|
+
return (h("div", { class: sheet$8.classes.Container, part: "sqm-base" },
|
|
3726
|
+
h("style", { type: "text/css" }, styleString$8),
|
|
3613
3727
|
h("div", null,
|
|
3614
3728
|
stageMap(),
|
|
3615
3729
|
states.exchangeError && errorMessage(),
|
|
@@ -3670,15 +3784,14 @@ const baseResponse = (data, stage = "chooseReward", selectedItem = null, selecte
|
|
|
3670
3784
|
setStage: null,
|
|
3671
3785
|
setExchangeState: null,
|
|
3672
3786
|
copyFuelTankCode: null,
|
|
3673
|
-
refs: null,
|
|
3674
3787
|
},
|
|
3675
3788
|
refs: null,
|
|
3676
3789
|
});
|
|
3677
3790
|
const baseReward = {
|
|
3678
|
-
key: "",
|
|
3679
|
-
name: "",
|
|
3791
|
+
key: "reward",
|
|
3792
|
+
name: "Demo Reward",
|
|
3680
3793
|
description: "Description of reward. Lorem ipsum dolor sit amet, consectetur adipiscing. Id nec semper sapien dignissim rhoncus nunc.",
|
|
3681
|
-
imageUrl: "",
|
|
3794
|
+
imageUrl: "https://res.cloudinary.com/saasquatch/image/upload/v1643653103/squatch-assets/default_rewards_1.png",
|
|
3682
3795
|
available: true,
|
|
3683
3796
|
unavailableReasonCode: null,
|
|
3684
3797
|
ruleType: "FIXED_GLOBAL_REWARD",
|
|
@@ -3695,7 +3808,34 @@ const baseReward = {
|
|
|
3695
3808
|
prettyDestinationMaxValue: null,
|
|
3696
3809
|
globalRewardKey: "",
|
|
3697
3810
|
destinationUnit: null,
|
|
3698
|
-
steps: [
|
|
3811
|
+
steps: [
|
|
3812
|
+
{
|
|
3813
|
+
prettyDestinationValue: "Reward Step 1",
|
|
3814
|
+
prettySourceValue: "50 Points",
|
|
3815
|
+
available: true,
|
|
3816
|
+
unavailableReasonCode: null,
|
|
3817
|
+
destinationValue: 10,
|
|
3818
|
+
sourceValue: 1,
|
|
3819
|
+
globalRewardKey: "reward1",
|
|
3820
|
+
rewardInput: {
|
|
3821
|
+
accountId: "zach",
|
|
3822
|
+
userId: "zach",
|
|
3823
|
+
},
|
|
3824
|
+
},
|
|
3825
|
+
{
|
|
3826
|
+
prettyDestinationValue: "Reward Step 2",
|
|
3827
|
+
prettySourceValue: "100 Points",
|
|
3828
|
+
available: false,
|
|
3829
|
+
unavailableReasonCode: "Not enough points",
|
|
3830
|
+
destinationValue: 10,
|
|
3831
|
+
sourceValue: 1,
|
|
3832
|
+
globalRewardKey: "reward1",
|
|
3833
|
+
rewardInput: {
|
|
3834
|
+
accountId: "zach",
|
|
3835
|
+
userId: "zach",
|
|
3836
|
+
},
|
|
3837
|
+
},
|
|
3838
|
+
],
|
|
3699
3839
|
};
|
|
3700
3840
|
const notEnoughPoints = {
|
|
3701
3841
|
available: false,
|
|
@@ -3816,7 +3956,7 @@ const rewardExchange = {
|
|
|
3816
3956
|
...baseResponse(data),
|
|
3817
3957
|
};
|
|
3818
3958
|
const demoRewardExchange = {
|
|
3819
|
-
...baseResponse(demoData),
|
|
3959
|
+
...baseResponse(demoData, "chooseReward", baseReward),
|
|
3820
3960
|
};
|
|
3821
3961
|
const rewardExchangeLongText = {
|
|
3822
3962
|
...baseResponse([
|
|
@@ -3999,60 +4139,167 @@ const empty = {
|
|
|
3999
4139
|
...baseResponse(null, "chooseReward", null, null, false, false, null, true),
|
|
4000
4140
|
};
|
|
4001
4141
|
|
|
4002
|
-
|
|
4003
|
-
|
|
4004
|
-
|
|
4005
|
-
|
|
4006
|
-
|
|
4007
|
-
|
|
4008
|
-
|
|
4009
|
-
|
|
4010
|
-
|
|
4011
|
-
|
|
4142
|
+
const MessageLinkQuery = dist.gql `
|
|
4143
|
+
query (
|
|
4144
|
+
$programId: ID
|
|
4145
|
+
$engagementMedium: UserEngagementMedium!
|
|
4146
|
+
$shareMedium: ReferralShareMedium!
|
|
4147
|
+
) {
|
|
4148
|
+
viewer {
|
|
4149
|
+
... on User {
|
|
4150
|
+
messageLink(
|
|
4151
|
+
programId: $programId
|
|
4152
|
+
engagementMedium: $engagementMedium
|
|
4153
|
+
shareMedium: $shareMedium
|
|
4154
|
+
)
|
|
4155
|
+
shareLink(programId: $programId, engagementMedium: $engagementMedium)
|
|
4156
|
+
}
|
|
4157
|
+
}
|
|
4158
|
+
}
|
|
4159
|
+
`;
|
|
4160
|
+
function NativeShare(props, directLink, undefinedErrorText, unsupportedPlatformText) {
|
|
4161
|
+
const title = props.sharetitle || "Share title";
|
|
4162
|
+
const text = props.sharetext || "Share text";
|
|
4163
|
+
if (directLink === "undefined") {
|
|
4164
|
+
return alert(undefinedErrorText);
|
|
4165
|
+
}
|
|
4166
|
+
if (window.navigator.share) {
|
|
4167
|
+
window.navigator
|
|
4168
|
+
.share({
|
|
4169
|
+
title,
|
|
4170
|
+
text,
|
|
4171
|
+
url: directLink,
|
|
4172
|
+
})
|
|
4173
|
+
.catch((error) => console.error("Error on web share", error));
|
|
4174
|
+
}
|
|
4175
|
+
else {
|
|
4176
|
+
alert(unsupportedPlatformText);
|
|
4177
|
+
}
|
|
4178
|
+
}
|
|
4179
|
+
function FacebookShare(directLink, messageLink, errorText) {
|
|
4180
|
+
if (messageLink === "undefined" || directLink === "undefined") {
|
|
4181
|
+
return alert(errorText);
|
|
4182
|
+
}
|
|
4183
|
+
if (typeof SquatchAndroid.shareOnFacebook !== "undefined") {
|
|
4184
|
+
return SquatchAndroid.shareOnFacebook(directLink, messageLink);
|
|
4185
|
+
}
|
|
4186
|
+
else {
|
|
4187
|
+
return GenericShare(messageLink, errorText);
|
|
4188
|
+
}
|
|
4189
|
+
}
|
|
4190
|
+
function GenericShare(messageLink, errorText) {
|
|
4191
|
+
return messageLink ? (window.location.href = messageLink) : alert(errorText);
|
|
4192
|
+
}
|
|
4193
|
+
function useShareButton(props) {
|
|
4194
|
+
var _a, _b, _c, _d;
|
|
4195
|
+
const { sharetitle, sharetext, medium } = props;
|
|
4196
|
+
const programId = props.programId ? props.programId : H();
|
|
4197
|
+
const user = J();
|
|
4198
|
+
const engagementMedium = B();
|
|
4199
|
+
const variables = {
|
|
4200
|
+
engagementMedium,
|
|
4201
|
+
programId: programId,
|
|
4202
|
+
shareMedium: medium.toUpperCase(),
|
|
4012
4203
|
};
|
|
4013
|
-
const
|
|
4014
|
-
const
|
|
4015
|
-
|
|
4016
|
-
|
|
4017
|
-
|
|
4204
|
+
const contextData = Fn(REFERRAL_CODES_NAMESPACE);
|
|
4205
|
+
const overrideData = contextData === null || contextData === void 0 ? void 0 : contextData[medium];
|
|
4206
|
+
// only queries if a programId is available
|
|
4207
|
+
const res = wn(MessageLinkQuery, variables, !(user === null || user === void 0 ? void 0 : user.jwt) || !programId || overrideData !== undefined);
|
|
4208
|
+
const [setCopied, copiedRes] = $e(SET_CODE_COPIED);
|
|
4209
|
+
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);
|
|
4210
|
+
const environment = getEnvironmentSDK();
|
|
4211
|
+
const hide = (medium.toLocaleUpperCase() === "SMS" &&
|
|
4212
|
+
window.orientation === undefined) ||
|
|
4213
|
+
(medium.toLocaleUpperCase() === "DIRECT" && !window.navigator.share);
|
|
4214
|
+
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);
|
|
4215
|
+
async function onClick() {
|
|
4216
|
+
if (overrideData) {
|
|
4217
|
+
await setCopied({ referralCode: contextData.referralCode });
|
|
4218
|
+
contextData.refresh();
|
|
4018
4219
|
}
|
|
4019
|
-
|
|
4020
|
-
|
|
4021
|
-
|
|
4022
|
-
|
|
4023
|
-
|
|
4024
|
-
|
|
4025
|
-
|
|
4220
|
+
if (medium.toLocaleUpperCase() === "FACEBOOK" &&
|
|
4221
|
+
environment.type === "SquatchAndroid") {
|
|
4222
|
+
FacebookShare(directLink, messageLink, props.errorText);
|
|
4223
|
+
}
|
|
4224
|
+
else if (medium.toLocaleUpperCase() === "DIRECT") {
|
|
4225
|
+
NativeShare({ sharetitle, sharetext }, directLink, props.errorText, props.unsupportedPlatformText);
|
|
4226
|
+
}
|
|
4227
|
+
}
|
|
4228
|
+
const isPlainLink = !(medium.toLocaleUpperCase() === "FACEBOOK" &&
|
|
4229
|
+
environment.type === "SquatchAndroid") &&
|
|
4230
|
+
medium.toLocaleUpperCase() !== "DIRECT" &&
|
|
4231
|
+
messageLink;
|
|
4232
|
+
const userAgent = window.navigator.userAgent.toLowerCase(), safari = /safari/.test(userAgent), ios = /iphone|ipod|ipad/.test(userAgent);
|
|
4233
|
+
const openInSameTab = ios && !safari;
|
|
4234
|
+
return {
|
|
4235
|
+
...props,
|
|
4236
|
+
loading: res.loading && !(overrideData === null || overrideData === void 0 ? void 0 : overrideData.messageLink),
|
|
4237
|
+
messageLink,
|
|
4238
|
+
isPlainLink,
|
|
4239
|
+
onClick,
|
|
4240
|
+
openInSameTab,
|
|
4241
|
+
hide,
|
|
4242
|
+
};
|
|
4026
4243
|
}
|
|
4027
4244
|
|
|
4028
|
-
const
|
|
4029
|
-
|
|
4030
|
-
|
|
4031
|
-
|
|
4032
|
-
|
|
4033
|
-
|
|
4034
|
-
|
|
4035
|
-
|
|
4036
|
-
|
|
4037
|
-
|
|
4038
|
-
|
|
4039
|
-
width: 100%;
|
|
4245
|
+
const MessageLinkQuery$1 = dist.gql `
|
|
4246
|
+
query ($programId: ID, $engagementMedium: UserEngagementMedium!) {
|
|
4247
|
+
user: viewer {
|
|
4248
|
+
... on User {
|
|
4249
|
+
shareLink(
|
|
4250
|
+
programId: $programId
|
|
4251
|
+
engagementMedium: $engagementMedium
|
|
4252
|
+
shareMedium: DIRECT
|
|
4253
|
+
)
|
|
4254
|
+
}
|
|
4255
|
+
}
|
|
4040
4256
|
}
|
|
4041
4257
|
`;
|
|
4042
|
-
const
|
|
4043
|
-
|
|
4044
|
-
|
|
4045
|
-
|
|
4046
|
-
|
|
4047
|
-
|
|
4048
|
-
|
|
4049
|
-
|
|
4050
|
-
|
|
4051
|
-
|
|
4052
|
-
|
|
4258
|
+
const WIDGET_ENGAGEMENT_EVENT = dist.gql `
|
|
4259
|
+
mutation loadEvent($eventMeta: UserAnalyticsEvent!) {
|
|
4260
|
+
createUserAnalyticsEvent(eventMeta: $eventMeta)
|
|
4261
|
+
}
|
|
4262
|
+
`;
|
|
4263
|
+
function useShareLink(props) {
|
|
4264
|
+
var _a, _b;
|
|
4265
|
+
const { programId = H() } = props;
|
|
4266
|
+
const user = J();
|
|
4267
|
+
const engagementMedium = B();
|
|
4268
|
+
const contextData = Fn(REFERRAL_CODES_NAMESPACE);
|
|
4269
|
+
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);
|
|
4270
|
+
const [sendLoadEvent] = $e(WIDGET_ENGAGEMENT_EVENT);
|
|
4271
|
+
const [setCopied, copiedRes] = $e(SET_CODE_COPIED);
|
|
4272
|
+
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 :
|
|
4273
|
+
// Shown during loading
|
|
4274
|
+
"...";
|
|
4275
|
+
const [open, setOpen] = useState(false);
|
|
4276
|
+
async function onClick() {
|
|
4277
|
+
if (contextData) {
|
|
4278
|
+
await setCopied({ referralCode: contextData.referralCode });
|
|
4279
|
+
contextData.refresh();
|
|
4280
|
+
}
|
|
4281
|
+
// Should well supported: https://developer.mozilla.org/en-US/docs/Web/API/Clipboard#browser_compatibility
|
|
4282
|
+
// Only if called from a user-initiated event
|
|
4283
|
+
navigator.clipboard.writeText(copyString);
|
|
4284
|
+
setOpen(true);
|
|
4285
|
+
setTimeout(() => setOpen(false), props.tooltiplifespan);
|
|
4286
|
+
sendLoadEvent({
|
|
4287
|
+
eventMeta: {
|
|
4288
|
+
programId,
|
|
4289
|
+
id: user === null || user === void 0 ? void 0 : user.id,
|
|
4290
|
+
accountId: user === null || user === void 0 ? void 0 : user.accountId,
|
|
4291
|
+
type: "USER_REFERRAL_PROGRAM_ENGAGEMENT_EVENT",
|
|
4292
|
+
meta: {
|
|
4293
|
+
engagementMedium,
|
|
4294
|
+
shareMedium: "DIRECT",
|
|
4295
|
+
},
|
|
4296
|
+
},
|
|
4297
|
+
});
|
|
4298
|
+
}
|
|
4299
|
+
return { ...props, onClick, open, copyString: copyString };
|
|
4053
4300
|
}
|
|
4054
4301
|
|
|
4055
|
-
const style$
|
|
4302
|
+
const style$9 = {
|
|
4056
4303
|
Wrapper: {
|
|
4057
4304
|
...AuthWrapper,
|
|
4058
4305
|
"max-width": "600px",
|
|
@@ -4090,7 +4337,7 @@ const style$d = {
|
|
|
4090
4337
|
},
|
|
4091
4338
|
ErrorStyle: ErrorStyles,
|
|
4092
4339
|
};
|
|
4093
|
-
const vanillaStyle$
|
|
4340
|
+
const vanillaStyle$7 = `
|
|
4094
4341
|
sqm-portal-register {
|
|
4095
4342
|
margin: 0 auto;
|
|
4096
4343
|
width: 100%;
|
|
@@ -4105,8 +4352,8 @@ sqm-portal-register {
|
|
|
4105
4352
|
display: none;
|
|
4106
4353
|
}
|
|
4107
4354
|
`;
|
|
4108
|
-
const sheet$
|
|
4109
|
-
const styleString$
|
|
4355
|
+
const sheet$9 = createStyleSheet(style$9);
|
|
4356
|
+
const styleString$9 = sheet$9.toString();
|
|
4110
4357
|
function LeadFormView(props) {
|
|
4111
4358
|
var _a, _b, _c, _d;
|
|
4112
4359
|
const { states, refs, callbacks, content } = props;
|
|
@@ -4120,23 +4367,23 @@ function LeadFormView(props) {
|
|
|
4120
4367
|
fieldLabel,
|
|
4121
4368
|
});
|
|
4122
4369
|
return (h(Fragment, null,
|
|
4123
|
-
states.success && (h("div", { class: sheet$
|
|
4370
|
+
states.success && (h("div", { class: sheet$9.classes.Wrapper, part: "sqm-base" },
|
|
4124
4371
|
h("style", { type: "text/css" },
|
|
4125
|
-
vanillaStyle$
|
|
4126
|
-
styleString$
|
|
4372
|
+
vanillaStyle$7,
|
|
4373
|
+
styleString$9),
|
|
4127
4374
|
h(TextSpanView, { type: "h3" }, content.pageLabel),
|
|
4128
4375
|
h("sqm-form-message", { exportparts: "success-icon" },
|
|
4129
4376
|
h("b", null, content.submitSuccessHeader),
|
|
4130
4377
|
h("br", null),
|
|
4131
4378
|
h("div", { part: "successalert-text" }, content.submitSuccessDescription)),
|
|
4132
|
-
h("sl-button", { class: sheet$
|
|
4133
|
-
h("div", { class: sheet$
|
|
4379
|
+
h("sl-button", { class: sheet$9.classes.ContinueButton, onClick: callbacks.resetForm, loading: states.loading, exportparts: "base: primarybutton-base", type: "default" }, content.resubmitFormLabel))),
|
|
4380
|
+
h("div", { class: sheet$9.classes.Wrapper, part: "sqm-base", style: { display: states.success ? "none" : "block" } },
|
|
4134
4381
|
h("style", { type: "text/css" },
|
|
4135
|
-
vanillaStyle$
|
|
4136
|
-
styleString$
|
|
4382
|
+
vanillaStyle$7,
|
|
4383
|
+
styleString$9),
|
|
4137
4384
|
h(TextSpanView, { type: "h3" }, content.pageLabel),
|
|
4138
|
-
h("sl-form", { class: sheet$
|
|
4139
|
-
states.error && (h("sl-alert", { exportparts: "base: alert-base, icon:alert-icon", type: "danger", class: sheet$
|
|
4385
|
+
h("sl-form", { class: sheet$9.classes.Column, "onSl-submit": callbacks.submit, ref: (el) => (refs.formRef.current = el), novalidate: true },
|
|
4386
|
+
states.error && (h("sl-alert", { exportparts: "base: alert-base, icon:alert-icon", type: "danger", class: sheet$9.classes.ErrorAlertContainer, open: true },
|
|
4140
4387
|
h("sl-icon", { slot: "icon", name: "exclamation-octagon" }),
|
|
4141
4388
|
h("b", null, content.submitErrorHeader),
|
|
4142
4389
|
h("br", null),
|
|
@@ -4146,9 +4393,9 @@ function LeadFormView(props) {
|
|
|
4146
4393
|
}, {
|
|
4147
4394
|
supportLink: (h("a", { target: "_blank", href: `mailto:advocate-support@impact.com` }, content.supportLinkText)),
|
|
4148
4395
|
}))),
|
|
4149
|
-
h("div", { class: sheet$
|
|
4150
|
-
h("sqm-lead-input-field", { class: sheet$
|
|
4151
|
-
h("sqm-lead-input-field", { class: sheet$
|
|
4396
|
+
h("div", { class: sheet$9.classes.NameFieldWrapper },
|
|
4397
|
+
h("sqm-lead-input-field", { class: sheet$9.classes.NameInput, "field-label": content.firstNameLabel || "First Name", "field-name": "firstName" }),
|
|
4398
|
+
h("sqm-lead-input-field", { class: sheet$9.classes.NameInput, "field-label": content.lastNameLabel || "Last Name", "field-name": "lastName" })),
|
|
4152
4399
|
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 }) => {
|
|
4153
4400
|
if (!value) {
|
|
4154
4401
|
return getRequiredFieldErrorMessage({
|
|
@@ -4160,18 +4407,18 @@ function LeadFormView(props) {
|
|
|
4160
4407
|
return content.invalidEmailErrorMessage;
|
|
4161
4408
|
}
|
|
4162
4409
|
} }, (((_b = (_a = states.leadFormState) === null || _a === void 0 ? void 0 : _a.validationErrors) === null || _b === void 0 ? void 0 : _b.email) ? {
|
|
4163
|
-
class: sheet$
|
|
4410
|
+
class: sheet$9.classes.ErrorStyle,
|
|
4164
4411
|
helpText: ((_d = (_c = states.leadFormState) === null || _c === void 0 ? void 0 : _c.validationErrors) === null || _d === void 0 ? void 0 : _d.email) ||
|
|
4165
4412
|
content.requiredFieldErrorMessage,
|
|
4166
4413
|
}
|
|
4167
4414
|
: []))),
|
|
4168
4415
|
h("input", { type: "hidden", hidden: true, name: "/referralCode", value: states.referralCode }),
|
|
4169
4416
|
content.formData,
|
|
4170
|
-
h("div", { class: sheet$
|
|
4417
|
+
h("div", { class: sheet$9.classes.ButtonsContainer },
|
|
4171
4418
|
h("sl-button", { submit: true, loading: states.loading, exportparts: "base: primarybutton-base", type: "primary" }, content.submitLabel || "Register"))))));
|
|
4172
4419
|
}
|
|
4173
4420
|
|
|
4174
|
-
const style$
|
|
4421
|
+
const style$a = {
|
|
4175
4422
|
ErrorStyle: {
|
|
4176
4423
|
"--sl-input-border-color": "var(--sl-color-danger-500)",
|
|
4177
4424
|
"--sl-input-background-color": "var(--sl-color-danger-10)",
|
|
@@ -4187,7 +4434,7 @@ const style$e = {
|
|
|
4187
4434
|
"margin-bottom": "var(--sl-spacing-large)",
|
|
4188
4435
|
},
|
|
4189
4436
|
};
|
|
4190
|
-
const vanillaStyle$
|
|
4437
|
+
const vanillaStyle$8 = `
|
|
4191
4438
|
:host {
|
|
4192
4439
|
margin: 0 auto;
|
|
4193
4440
|
width: 100%;
|
|
@@ -4202,8 +4449,8 @@ sl-select::part(menu){
|
|
|
4202
4449
|
}
|
|
4203
4450
|
`;
|
|
4204
4451
|
jss.setup(create());
|
|
4205
|
-
const sheet$
|
|
4206
|
-
const styleString$
|
|
4452
|
+
const sheet$a = jss.createStyleSheet(style$a);
|
|
4453
|
+
const styleString$a = sheet$a.toString();
|
|
4207
4454
|
function LeadDropdownFieldView(props) {
|
|
4208
4455
|
var _a, _b, _c, _d, _e;
|
|
4209
4456
|
const { states, content } = props;
|
|
@@ -4214,10 +4461,10 @@ function LeadDropdownFieldView(props) {
|
|
|
4214
4461
|
}, {
|
|
4215
4462
|
dropdownLabel,
|
|
4216
4463
|
});
|
|
4217
|
-
return (h("div", { class: sheet$
|
|
4464
|
+
return (h("div", { class: sheet$a.classes.FieldContainer, part: "sqm-base" },
|
|
4218
4465
|
h("style", { type: "text/css" },
|
|
4219
|
-
vanillaStyle$
|
|
4220
|
-
styleString$
|
|
4466
|
+
vanillaStyle$8,
|
|
4467
|
+
styleString$a),
|
|
4221
4468
|
h("sl-select", Object.assign({ style: { maxHeight: "100px" }, exportparts: "label: input-label, base: input-base", label: `${content.dropdownLabel}${content.dropdownOptional ? ` ${content.optionalLabel}` : ""}`, name: `/${content.dropdownName}`, multiple: content.multiple }, (!content.dropdownOptional ? { required: true } : []), { disabled: ((_b = states.leadFormState) === null || _b === void 0 ? void 0 : _b.loading) || ((_c = states.leadFormState) === null || _c === void 0 ? void 0 : _c.disabled), validationError: ({ value }) => {
|
|
4222
4469
|
if (!value && !content.dropdownOptional) {
|
|
4223
4470
|
return getRequiredFieldErrorMessage({
|
|
@@ -4225,65 +4472,14 @@ function LeadDropdownFieldView(props) {
|
|
|
4225
4472
|
});
|
|
4226
4473
|
}
|
|
4227
4474
|
} }, (((_e = (_d = states.leadFormState) === null || _d === void 0 ? void 0 : _d.validationErrors) === null || _e === void 0 ? void 0 : _e[content.dropdownName]) ? {
|
|
4228
|
-
class: sheet$
|
|
4475
|
+
class: sheet$a.classes.ErrorStyle,
|
|
4229
4476
|
}
|
|
4230
4477
|
: [])), content.selectOptions),
|
|
4231
|
-
(validationErrors === null || validationErrors === void 0 ? void 0 : validationErrors[content.dropdownName]) && (h("p", { class: sheet$
|
|
4478
|
+
(validationErrors === null || validationErrors === void 0 ? void 0 : validationErrors[content.dropdownName]) && (h("p", { class: sheet$a.classes.ErrorMessageStyle }, getRequiredFieldErrorMessage({
|
|
4232
4479
|
dropdownLabel: content.dropdownLabel,
|
|
4233
4480
|
})))));
|
|
4234
4481
|
}
|
|
4235
4482
|
|
|
4236
|
-
function t(t,n,r){return Math.min(Math.max(t,r),n)}class n extends Error{constructor(t){super(`Failed to parse color: "${t}"`);}}function r(r){if("string"!=typeof r)throw new n(r);if("transparent"===r.trim().toLowerCase())return [0,0,0,0];let e=r.trim();e=u.test(r)?function(t){const r=t.toLowerCase().trim(),e=o[function(t){let n=5381,r=t.length;for(;r;)n=33*n^t.charCodeAt(--r);return (n>>>0)%2341}(r)];if(!e)throw new n(t);return `#${e}`}(r):r;const f=s.exec(e);if(f){const t=Array.from(f).slice(1);return [...t.slice(0,3).map(t=>parseInt(_(t,2),16)),parseInt(_(t[3]||"f",2),16)/255]}const p=i.exec(e);if(p){const t=Array.from(p).slice(1);return [...t.slice(0,3).map(t=>parseInt(t,16)),parseInt(t[3]||"ff",16)/255]}const z=a.exec(e);if(z){const t=Array.from(z).slice(1);return [...t.slice(0,3).map(t=>parseInt(t,10)),parseFloat(t[3]||"1")]}const h=c.exec(e);if(h){const[e,o,_,s]=Array.from(h).slice(1).map(parseFloat);if(t(0,100,o)!==o)throw new n(r);if(t(0,100,_)!==_)throw new n(r);return [...l(e,o,_),s||1]}throw new n(r)}const e=t=>parseInt(t.replace(/_/g,""),36),o="1q29ehhb 1n09sgk7 1kl1ekf_ _yl4zsno 16z9eiv3 1p29lhp8 _bd9zg04 17u0____ _iw9zhe5 _to73___ _r45e31e _7l6g016 _jh8ouiv _zn3qba8 1jy4zshs 11u87k0u 1ro9yvyo 1aj3xael 1gz9zjz0 _3w8l4xo 1bf1ekf_ _ke3v___ _4rrkb__ 13j776yz _646mbhl _nrjr4__ _le6mbhl 1n37ehkb _m75f91n _qj3bzfz 1939yygw 11i5z6x8 _1k5f8xs 1509441m 15t5lwgf _ae2th1n _tg1ugcv 1lp1ugcv 16e14up_ _h55rw7n _ny9yavn _7a11xb_ 1ih442g9 _pv442g9 1mv16xof 14e6y7tu 1oo9zkds 17d1cisi _4v9y70f _y98m8kc 1019pq0v 12o9zda8 _348j4f4 1et50i2o _8epa8__ _ts6senj 1o350i2o 1mi9eiuo 1259yrp0 1ln80gnw _632xcoy 1cn9zldc _f29edu4 1n490c8q _9f9ziet 1b94vk74 _m49zkct 1kz6s73a 1eu9dtog _q58s1rz 1dy9sjiq __u89jo3 _aj5nkwg _ld89jo3 13h9z6wx _qa9z2ii _l119xgq _bs5arju 1hj4nwk9 1qt4nwk9 1ge6wau6 14j9zlcw 11p1edc_ _ms1zcxe _439shk6 _jt9y70f _754zsow 1la40eju _oq5p___ _x279qkz 1fa5r3rv _yd2d9ip _424tcku _8y1di2_ _zi2uabw _yy7rn9h 12yz980_ __39ljp6 1b59zg0x _n39zfzp 1fy9zest _b33k___ _hp9wq92 1il50hz4 _io472ub _lj9z3eo 19z9ykg0 _8t8iu3a 12b9bl4a 1ak5yw0o _896v4ku _tb8k8lv _s59zi6t _c09ze0p 1lg80oqn 1id9z8wb _238nba5 1kq6wgdi _154zssg _tn3zk49 _da9y6tc 1sg7cv4f _r12jvtt 1gq5fmkz 1cs9rvci _lp9jn1c _xw1tdnb 13f9zje6 16f6973h _vo7ir40 _bt5arjf _rc45e4t _hr4e100 10v4e100 _hc9zke2 _w91egv_ _sj2r1kk 13c87yx8 _vqpds__ _ni8ggk8 _tj9yqfb 1ia2j4r4 _7x9b10u 1fc9ld4j 1eq9zldr _5j9lhpx _ez9zl6o _md61fzm".split(" ").reduce((t,n)=>{const r=e(n.substring(0,3)),o=e(n.substring(3)).toString(16);let _="";for(let t=0;t<6-o.length;t++)_+="0";return t[r]=`${_}${o}`,t},{}),_=(t,n)=>Array.from(Array(n)).map(()=>t).join(""),s=new RegExp(`^#${_("([a-f0-9])",3)}([a-f0-9])?$`,"i"),i=new RegExp(`^#${_("([a-f0-9]{2})",3)}([a-f0-9]{2})?$`,"i"),a=new RegExp(`^rgba?\\(\\s*(\\d+)\\s*${_(",\\s*(\\d+)\\s*",2)}(?:,\\s*([\\d.]+))?\\s*\\)$`,"i"),c=/^hsla?\(\s*([\d.]+)\s*,\s*([\d.]+)%\s*,\s*([\d.]+)%(?:\s*,\s*([\d.]+))?\s*\)$/i,u=/^[a-z]+$/i,f=t=>Math.round(255*t),l=(t,n,r)=>{let e=r/100;if(0===n)return [e,e,e].map(f);const o=(t%360+360)%360/60,_=(1-Math.abs(2*e-1))*(n/100),s=_*(1-Math.abs(o%2-1));let i=0,a=0,c=0;o>=0&&o<1?(i=_,a=s):o>=1&&o<2?(i=s,a=_):o>=2&&o<3?(a=_,c=s):o>=3&&o<4?(a=s,c=_):o>=4&&o<5?(i=s,c=_):o>=5&&o<6&&(i=_,c=s);const u=e-_/2;return [i+u,a+u,c+u].map(f)};function p(t){const[n,e,o,_]=r(t).map((t,n)=>3===n?t:t/255),s=Math.max(n,e,o),i=Math.min(n,e,o),a=(s+i)/2;if(s===i)return [0,0,a,_];const c=s-i;return [60*(n===s?(e-o)/c+(e<o?6:0):e===s?(o-n)/c+2:(n-e)/c+4),a>.5?c/(2-s-i):c/(s+i),a,_]}function z(n,r,e,o){return `hsla(${(n%360).toFixed()}, ${t(0,100,100*r).toFixed()}%, ${t(0,100,100*e).toFixed()}%, ${parseFloat(t(0,1,o).toFixed(3))})`}
|
|
4237
|
-
|
|
4238
|
-
const colorScale = [50, 100, 200, 300, 400, 500, 600, 700, 800, 900, 950];
|
|
4239
|
-
const lScale = [
|
|
4240
|
-
0.95,
|
|
4241
|
-
0.86,
|
|
4242
|
-
0.76,
|
|
4243
|
-
0.66,
|
|
4244
|
-
0.56,
|
|
4245
|
-
0.46,
|
|
4246
|
-
0.39,
|
|
4247
|
-
0.32,
|
|
4248
|
-
0.25,
|
|
4249
|
-
0.18,
|
|
4250
|
-
0.15,
|
|
4251
|
-
];
|
|
4252
|
-
// https://github.com/ricokahler/color2k/blob/main/src/parseToRgba.ts
|
|
4253
|
-
const hslaRegex = /^hsla?\(\s*([\d.]+)\s*,\s*([\d.]+)%\s*,\s*([\d.]+)%(?:\s*,\s*([\d.]+))?\s*\)$/i;
|
|
4254
|
-
function niceParseToHsla(color) {
|
|
4255
|
-
const normalizedColor = color.trim();
|
|
4256
|
-
const hslaMatch = hslaRegex.exec(normalizedColor);
|
|
4257
|
-
if (hslaMatch) {
|
|
4258
|
-
const [h, s, l, a] = Array.from(hslaMatch).slice(1).map(parseFloat);
|
|
4259
|
-
if (t(0, 100, s) !== s)
|
|
4260
|
-
throw new n(color);
|
|
4261
|
-
if (t(0, 100, l) !== l)
|
|
4262
|
-
throw new n(color);
|
|
4263
|
-
return [h, s / 100, l, a || 1];
|
|
4264
|
-
}
|
|
4265
|
-
// Warning -- converts to RGB first, so is lossy
|
|
4266
|
-
return p(color);
|
|
4267
|
-
}
|
|
4268
|
-
function generateScale(color, name = "primary") {
|
|
4269
|
-
const [h, s, l, a] = niceParseToHsla(color);
|
|
4270
|
-
return lScale
|
|
4271
|
-
.map((l) => z(h, s, l, a))
|
|
4272
|
-
.map((color, index) => {
|
|
4273
|
-
return `--sl-color-${name}-${colorScale[index]}: ${color};\n`;
|
|
4274
|
-
});
|
|
4275
|
-
}
|
|
4276
|
-
/**
|
|
4277
|
-
* Generated a Shoelace color scale css string from a base color
|
|
4278
|
-
*
|
|
4279
|
-
* @param color
|
|
4280
|
-
* @param name
|
|
4281
|
-
* @returns
|
|
4282
|
-
*/
|
|
4283
|
-
function autoColorScaleCss(color, name = "primary") {
|
|
4284
|
-
return generateScale(color, name).join("\n");
|
|
4285
|
-
}
|
|
4286
|
-
|
|
4287
4483
|
const map = new Map();
|
|
4288
4484
|
function withShadowView(component) {
|
|
4289
4485
|
// TODO: Could only do this if rendered in a Stencilbook environment to prevent unintended side-effects
|
|
@@ -4318,4 +4514,4 @@ const ShadowViewAddon = ({ story }, children) => {
|
|
|
4318
4514
|
h(TagName, { "stencilbook-shadow-view": randomInt })));
|
|
4319
4515
|
};
|
|
4320
4516
|
|
|
4321
|
-
export { loading as A, BigStatView as B,
|
|
4517
|
+
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, LeadFormView as Q, ReferralIframeView as R, StatContainerView as S, TaskCardView as T, LeadDropdownFieldView as U, ShadowViewAddon as V, useBigStat as W, withShadowView as X, demoRewardExchange as Y, 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 };
|