@saasquatch/mint-components 1.3.3-0 → 1.3.3-4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +165 -165
- package/LICENSE +21 -21
- package/dist/cjs/{ShadowViewAddon-b021dc8c.js → ShadowViewAddon-741e87d0.js} +113 -113
- package/dist/cjs/{global-5610b310.js → global-7d095200.js} +692 -692
- package/dist/cjs/{index.module-03ce03c2.js → index.module-66cd975e.js} +3 -3
- package/dist/cjs/loader.cjs.js +3 -3
- package/dist/cjs/mint-components.cjs.js +3 -3
- package/dist/cjs/{mixins-7b7c59fe.js → mixins-ebc0fed1.js} +85 -85
- package/dist/cjs/{re-render-b5efae5f.js → re-render-abf357d7.js} +37 -37
- package/dist/cjs/{sqm-asset-card-view-07f86880.js → sqm-asset-card-view-bcea538f.js} +44 -44
- package/dist/cjs/sqm-asset-card.cjs.entry.js +31 -31
- package/dist/cjs/sqm-big-stat.cjs.entry.js +17 -17
- package/dist/cjs/sqm-divided-layout_26.cjs.entry.js +6212 -6210
- package/dist/cjs/sqm-graphql-client-provider.cjs.entry.js +22 -22
- package/dist/cjs/{sqm-hero-view-bb3d00a1.js → sqm-hero-view-dce6baf4.js} +137 -137
- package/dist/cjs/sqm-hero.cjs.entry.js +24 -24
- package/dist/cjs/{sqm-leaderboard-rank-view-c287ac06.js → sqm-leaderboard-rank-view-e1b86aee.js} +5 -5
- package/dist/cjs/sqm-leaderboard-rank.cjs.entry.js +67 -67
- package/dist/cjs/sqm-leaderboard.cjs.entry.js +55 -55
- package/dist/cjs/{sqm-name-fields-view-24614ac7.js → sqm-name-fields-view-fbb96a06.js} +46 -46
- package/dist/cjs/sqm-name-fields.cjs.entry.js +45 -45
- package/dist/cjs/{sqm-navigation-sidebar-item-view-153503f0.js → sqm-navigation-sidebar-item-view-699ca0bd.js} +36 -36
- package/dist/cjs/sqm-navigation-sidebar-item.cjs.entry.js +39 -39
- package/dist/cjs/{sqm-navigation-sidebar-view-d06e1885.js → sqm-navigation-sidebar-view-78640345.js} +29 -29
- package/dist/cjs/sqm-navigation-sidebar.cjs.entry.js +12 -12
- package/dist/cjs/sqm-popup-container.cjs.entry.js +52 -52
- package/dist/cjs/{sqm-portal-container-view-d144735a.js → sqm-portal-container-view-35c09ff2.js} +23 -23
- package/dist/cjs/sqm-portal-container.cjs.entry.js +24 -24
- package/dist/cjs/{sqm-portal-email-verification-view-1d8728f9.js → sqm-portal-email-verification-view-57bd94d1.js} +37 -37
- package/dist/cjs/sqm-portal-email-verification.cjs.entry.js +88 -88
- package/dist/cjs/{sqm-portal-footer-view-dc4b0667.js → sqm-portal-footer-view-53d1052a.js} +72 -72
- package/dist/cjs/sqm-portal-footer.cjs.entry.js +47 -47
- package/dist/cjs/{sqm-portal-forgot-password-view-1704d285.js → sqm-portal-forgot-password-view-c6534a2d.js} +38 -38
- package/dist/cjs/sqm-portal-forgot-password.cjs.entry.js +82 -82
- package/dist/cjs/sqm-portal-logout.cjs.entry.js +19 -19
- package/dist/cjs/{sqm-portal-profile-view-a7519f19.js → sqm-portal-profile-view-d6c86d57.js} +65 -65
- package/dist/cjs/sqm-portal-profile.cjs.entry.js +234 -234
- package/dist/cjs/sqm-portal-protected-route.cjs.entry.js +52 -52
- package/dist/cjs/{sqm-portal-reset-password-view-4d78fd6d.js → sqm-portal-reset-password-view-db478b01.js} +74 -74
- package/dist/cjs/sqm-portal-reset-password.cjs.entry.js +157 -153
- package/dist/cjs/{sqm-portal-section-view-3b008930.js → sqm-portal-section-view-a1587fab.js} +20 -20
- package/dist/cjs/{sqm-portal-verify-email-view-b595e302.js → sqm-portal-verify-email-view-06b43fb1.js} +40 -40
- package/dist/cjs/sqm-portal-verify-email.cjs.entry.js +116 -112
- package/dist/cjs/sqm-referral-table-column.cjs.entry.js +19 -19
- package/dist/cjs/sqm-referral-table-date-column.cjs.entry.js +36 -36
- package/dist/cjs/sqm-referral-table-rewards-column.cjs.entry.js +27 -27
- package/dist/cjs/sqm-referral-table-status-column.cjs.entry.js +34 -34
- package/dist/cjs/sqm-referral-table-user-column.cjs.entry.js +46 -46
- package/dist/cjs/sqm-route.cjs.entry.js +9 -9
- package/dist/cjs/sqm-share-code.cjs.entry.js +72 -72
- package/dist/cjs/{sqm-share-link-view-a935d07e.js → sqm-share-link-view-9490be2a.js} +16 -16
- package/dist/cjs/{sqm-stat-container-view-ee7b00ff.js → sqm-stat-container-view-fcde63ed.js} +45 -45
- package/dist/cjs/sqm-stat-container.cjs.entry.js +18 -18
- package/dist/cjs/{sqm-text-span-view-b5ae787b.js → sqm-text-span-view-b7e0f9b8.js} +52 -52
- package/dist/cjs/sqm-text-span.cjs.entry.js +12 -12
- package/dist/cjs/sqm-titled-section.cjs.entry.js +25 -25
- package/dist/cjs/{useDemoBigStat-2025ee9b.js → useDemoBigStat-f0d2570c.js} +561 -561
- package/dist/cjs/{utils-95e5317c.js → utils-a58bfe0d.js} +22 -22
- package/dist/collection/ShadowViewAddon.js +35 -35
- package/dist/collection/components/sqm-asset-card/sqm-asset-card-view.js +48 -48
- package/dist/collection/components/sqm-asset-card/sqm-asset-card.js +107 -107
- package/dist/collection/components/sqm-asset-card/useAssetCard.js +9 -9
- package/dist/collection/components/sqm-big-stat/sqm-big-stat-view.js +37 -37
- package/dist/collection/components/sqm-big-stat/sqm-big-stat.js +137 -137
- package/dist/collection/components/sqm-big-stat/useBigStat.js +509 -509
- package/dist/collection/components/sqm-big-stat/useDemoBigStat.js +28 -28
- package/dist/collection/components/sqm-divided-layout/sqm-divided-layout-view.js +54 -54
- package/dist/collection/components/sqm-divided-layout/sqm-divided-layout.js +76 -76
- package/dist/collection/components/sqm-edit-profile/sqm-edit-profile-view.js +55 -55
- package/dist/collection/components/sqm-edit-profile/sqm-edit-profile.js +279 -279
- package/dist/collection/components/sqm-edit-profile/useEditProfile.js +156 -156
- package/dist/collection/components/sqm-form-message/sqm-form-message.js +82 -82
- package/dist/collection/components/sqm-graphql-client-provider/sqm-graphql-client-provider.js +50 -50
- package/dist/collection/components/sqm-graphql-client-provider/useGraphQLProvider.js +14 -14
- package/dist/collection/components/sqm-hero/sqm-hero-view.js +130 -130
- package/dist/collection/components/sqm-hero/sqm-hero.js +138 -138
- package/dist/collection/components/sqm-hook-story-container/sqm-hook-story-container.js +39 -39
- package/dist/collection/components/sqm-leaderboard/sqm-leaderboard-view.js +22 -22
- package/dist/collection/components/sqm-leaderboard/sqm-leaderboard.js +263 -263
- package/dist/collection/components/sqm-leaderboard/useLeaderboard.js +63 -63
- package/dist/collection/components/sqm-leaderboard-rank/sqm-leaderboard-rank-view.js +5 -5
- package/dist/collection/components/sqm-leaderboard-rank/sqm-leaderboard-rank.js +198 -198
- package/dist/collection/components/sqm-leaderboard-rank/useLeaderboardRank.js +38 -38
- package/dist/collection/components/sqm-name-fields/sqm-name-fields-view.js +50 -50
- package/dist/collection/components/sqm-name-fields/sqm-name-fields.js +114 -114
- package/dist/collection/components/sqm-name-fields/useNameFields.js +14 -14
- package/dist/collection/components/sqm-navigation-menu/sqm-navigation-menu-view.js +14 -14
- package/dist/collection/components/sqm-navigation-menu/sqm-navigation-menu.js +122 -122
- package/dist/collection/components/sqm-navigation-menu/useNavigationMenu.js +27 -27
- package/dist/collection/components/sqm-navigation-sidebar/sqm-navigation-sidebar-view.js +33 -33
- package/dist/collection/components/sqm-navigation-sidebar/sqm-navigation-sidebar.js +24 -24
- package/dist/collection/components/sqm-navigation-sidebar-item/sqm-navigation-sidebar-item-view.js +40 -40
- package/dist/collection/components/sqm-navigation-sidebar-item/sqm-navigation-sidebar-item.js +127 -127
- package/dist/collection/components/sqm-navigation-sidebar-item/useNavigationSidebarItem.js +14 -14
- package/dist/collection/components/sqm-password-field/passwordValidation.js +78 -78
- package/dist/collection/components/sqm-password-field/sqm-password-field-view.js +43 -43
- package/dist/collection/components/sqm-password-field/sqm-password-field.js +132 -132
- package/dist/collection/components/sqm-password-field/usePasswordField.js +25 -25
- package/dist/collection/components/sqm-popup-container/sqm-popup-container-view.js +11 -11
- package/dist/collection/components/sqm-popup-container/sqm-popup-container.js +139 -139
- package/dist/collection/components/sqm-popup-container/usePopupContainer.js +33 -33
- package/dist/collection/components/sqm-portal-change-password/sqm-portal-change-password-view.js +76 -76
- package/dist/collection/components/sqm-portal-change-password/sqm-portal-change-password.js +281 -281
- package/dist/collection/components/sqm-portal-change-password/usePortalChangePassword.js +61 -61
- package/dist/collection/components/sqm-portal-container/sqm-portal-container-view.js +27 -27
- package/dist/collection/components/sqm-portal-container/sqm-portal-container.js +147 -147
- package/dist/collection/components/sqm-portal-email-verification/sqm-portal-email-verification-view.js +41 -41
- package/dist/collection/components/sqm-portal-email-verification/sqm-portal-email-verification.js +148 -148
- package/dist/collection/components/sqm-portal-email-verification/usePortalEmailVerification.js +47 -47
- package/dist/collection/components/sqm-portal-footer/PoweredByImg.js +11 -11
- package/dist/collection/components/sqm-portal-footer/sqm-portal-footer-view.js +68 -68
- package/dist/collection/components/sqm-portal-footer/sqm-portal-footer.js +305 -305
- package/dist/collection/components/sqm-portal-forgot-password/sqm-portal-forgot-password-view.js +42 -42
- package/dist/collection/components/sqm-portal-forgot-password/sqm-portal-forgot-password.js +149 -149
- package/dist/collection/components/sqm-portal-forgot-password/usePortalForgotPassword.js +43 -43
- package/dist/collection/components/sqm-portal-frame/sqm-portal-frame-view.js +55 -55
- package/dist/collection/components/sqm-portal-frame/sqm-portal-frame.js +78 -78
- package/dist/collection/components/sqm-portal-frame/usePortalFrame.js +13 -13
- package/dist/collection/components/sqm-portal-login/sqm-portal-login-view.js +47 -47
- package/dist/collection/components/sqm-portal-login/sqm-portal-login.js +309 -309
- package/dist/collection/components/sqm-portal-login/usePortalLogin.js +47 -47
- package/dist/collection/components/sqm-portal-logout/sqm-portal-logout.js +50 -50
- package/dist/collection/components/sqm-portal-logout/usePortalLogout.js +5 -5
- package/dist/collection/components/sqm-portal-profile/sqm-portal-profile-view.js +69 -69
- package/dist/collection/components/sqm-portal-profile/sqm-portal-profile.js +298 -298
- package/dist/collection/components/sqm-portal-profile/usePortalProfile.js +149 -149
- package/dist/collection/components/sqm-portal-protected-route/sqm-portal-protected-route.js +106 -106
- package/dist/collection/components/sqm-portal-protected-route/usePortalProtectedRoute.js +26 -26
- package/dist/collection/components/sqm-portal-register/sqm-portal-register-view.js +75 -75
- package/dist/collection/components/sqm-portal-register/sqm-portal-register.js +365 -365
- package/dist/collection/components/sqm-portal-register/usePortalRegister.js +115 -113
- package/dist/collection/components/sqm-portal-register/useValidationState.js +8 -8
- package/dist/collection/components/sqm-portal-reset-password/sqm-portal-reset-password-view.js +78 -78
- package/dist/collection/components/sqm-portal-reset-password/sqm-portal-reset-password.js +315 -290
- package/dist/collection/components/sqm-portal-reset-password/usePortalResetPassword.js +77 -77
- package/dist/collection/components/sqm-portal-verify-email/sqm-portal-verify-email-view.js +44 -44
- package/dist/collection/components/sqm-portal-verify-email/sqm-portal-verify-email.js +123 -98
- package/dist/collection/components/sqm-portal-verify-email/usePortalVerifyEmail.js +80 -80
- package/dist/collection/components/sqm-program-menu/sqm-program-menu.js +24 -24
- package/dist/collection/components/sqm-program-menu/useProgramMenu.js +33 -33
- package/dist/collection/components/sqm-referral-iframe/sqm-referral-iframe-view.js +30 -30
- package/dist/collection/components/sqm-referral-iframe/sqm-referral-iframe.js +156 -156
- package/dist/collection/components/sqm-referral-iframe/useReferralIframe.js +25 -25
- package/dist/collection/components/sqm-referral-table/cells/sqm-referral-table-cell.js +36 -36
- package/dist/collection/components/sqm-referral-table/cells/sqm-referral-table-date-cell.js +43 -43
- package/dist/collection/components/sqm-referral-table/cells/sqm-referral-table-rewards-cell.js +169 -169
- package/dist/collection/components/sqm-referral-table/cells/sqm-referral-table-status-cell.js +44 -44
- package/dist/collection/components/sqm-referral-table/cells/sqm-referral-table-user-cell.js +28 -28
- package/dist/collection/components/sqm-referral-table/columns/ReferralTableColumn.js +1 -1
- package/dist/collection/components/sqm-referral-table/columns/sqm-referral-table-column.js +88 -88
- package/dist/collection/components/sqm-referral-table/columns/sqm-referral-table-date-column.js +137 -137
- package/dist/collection/components/sqm-referral-table/columns/sqm-referral-table-rewards-column.js +117 -117
- package/dist/collection/components/sqm-referral-table/columns/sqm-referral-table-status-column.js +145 -145
- package/dist/collection/components/sqm-referral-table/columns/sqm-referral-table-user-column.js +157 -157
- package/dist/collection/components/sqm-referral-table/re-render.js +39 -39
- package/dist/collection/components/sqm-referral-table/sqm-referral-table-view.js +54 -54
- package/dist/collection/components/sqm-referral-table/sqm-referral-table.js +238 -238
- package/dist/collection/components/sqm-referral-table/sqm-table-cell.js +52 -52
- package/dist/collection/components/sqm-referral-table/sqm-table-row.js +33 -33
- package/dist/collection/components/sqm-referral-table/useChildElements.js +16 -16
- package/dist/collection/components/sqm-referral-table/useReferralTable.js +321 -321
- package/dist/collection/components/sqm-route/sqm-route.js +40 -40
- package/dist/collection/components/sqm-router/sqm-router.css +7 -7
- package/dist/collection/components/sqm-router/sqm-router.js +30 -30
- package/dist/collection/components/sqm-router/useRouter.js +79 -79
- package/dist/collection/components/sqm-share-button/sqm-share-button-view.js +20 -20
- package/dist/collection/components/sqm-share-button/sqm-share-button.js +381 -381
- package/dist/collection/components/sqm-share-button/useShareButton.js +89 -89
- package/dist/collection/components/sqm-share-code/sqm-share-code.js +148 -148
- package/dist/collection/components/sqm-share-code/useShareCode.js +30 -30
- package/dist/collection/components/sqm-share-link/sqm-share-link-view.js +20 -20
- package/dist/collection/components/sqm-share-link/sqm-share-link.js +148 -148
- package/dist/collection/components/sqm-share-link/useShareLink.js +30 -30
- package/dist/collection/components/sqm-stat-container/sqm-stat-container-view.js +49 -49
- package/dist/collection/components/sqm-stat-container/sqm-stat-container.js +63 -63
- package/dist/collection/components/sqm-stencilbook/CucumberAddon.js +18 -18
- package/dist/collection/components/sqm-stencilbook/HookStoryAddon.js +19 -19
- package/dist/collection/components/sqm-stencilbook/sqm-stencilbook.js +110 -110
- package/dist/collection/components/sqm-text/sqm-text.js +77 -77
- package/dist/collection/components/sqm-text-span/sqm-text-span-view.js +56 -56
- package/dist/collection/components/sqm-text-span/sqm-text-span.js +69 -69
- package/dist/collection/components/sqm-titled-section/sqm-portal-section-view.js +24 -24
- package/dist/collection/components/sqm-titled-section/sqm-titled-section.js +115 -115
- package/dist/collection/components/sqm-user-name/sqm-user-name-view.js +4 -4
- package/dist/collection/components/sqm-user-name/sqm-user-name.js +114 -114
- package/dist/collection/components/sqm-user-name/useUserName.js +26 -26
- package/dist/collection/global/global.js +80 -80
- package/dist/collection/global/mixins.js +100 -100
- package/dist/collection/global/styles.js +582 -582
- package/dist/collection/global/styles.ts +584 -584
- package/dist/collection/index.js +1 -1
- package/dist/collection/insertcss.js +44 -44
- package/dist/collection/stories/AssetCard.stories.js +29 -29
- package/dist/collection/stories/BigStat.stories.js +58 -58
- package/dist/collection/stories/ChangePassword.stories.js +147 -147
- package/dist/collection/stories/DividedLayout.stories.js +85 -85
- package/dist/collection/stories/EditProfileForm.stories.js +61 -61
- package/dist/collection/stories/FormMessage.stories.js +28 -28
- package/dist/collection/stories/Hero.stories.js +168 -168
- package/dist/collection/stories/Leaderboard.stories.js +100 -100
- package/dist/collection/stories/LeaderboardRank.stories.js +12 -12
- package/dist/collection/stories/NameFields.stories.js +36 -36
- package/dist/collection/stories/NavigationSidebar.stories.js +45 -45
- package/dist/collection/stories/NewPortal.stories.js +305 -305
- package/dist/collection/stories/PasswordField.stories.js +40 -40
- package/dist/collection/stories/PortalEmailVerification.stories.js +77 -77
- package/dist/collection/stories/PortalFooter.stories.js +24 -24
- package/dist/collection/stories/PortalForgotPassword.stories.js +73 -73
- package/dist/collection/stories/PortalFrame.stories.js +118 -118
- package/dist/collection/stories/PortalLogin.stories.js +44 -44
- package/dist/collection/stories/PortalProfile.stories.js +233 -233
- package/dist/collection/stories/PortalRegister.stories.js +97 -97
- package/dist/collection/stories/PortalResetPassword.stories.js +153 -153
- package/dist/collection/stories/PortalTemplates.stories.js +156 -156
- package/dist/collection/stories/PortalVerifyEmail.stories.js +39 -39
- package/dist/collection/stories/PoweredByImg.stories.js +14 -14
- package/dist/collection/stories/ProgramMenu.stories.js +39 -39
- package/dist/collection/stories/ReferralIframe.stories.js +29 -29
- package/dist/collection/stories/ReferralTable.stories.js +475 -475
- package/dist/collection/stories/ReferralTableCell.stories.js +62 -62
- package/dist/collection/stories/ReferralTableRewardsCell.stories.js +213 -213
- package/dist/collection/stories/Router.stories.js +144 -144
- package/dist/collection/stories/ShareButton.stories.js +45 -45
- package/dist/collection/stories/ShareLink.stories.js +33 -33
- package/dist/collection/stories/SidebarItem.stories.js +31 -31
- package/dist/collection/stories/UseBigStat.stories.js +105 -105
- package/dist/collection/stories/UseEditProfile.stories.js +41 -41
- package/dist/collection/stories/UseLeaderboard.stories.js +79 -79
- package/dist/collection/stories/UseShareButton.stories.js +59 -59
- package/dist/collection/stories/UseShareLink.stories.js +59 -59
- package/dist/collection/stories/UserName.stories.js +14 -14
- package/dist/collection/utilities.js +21 -21
- package/dist/collection/utils/RequiredPropsError.js +50 -50
- package/dist/collection/utils/isDemo.js +10 -10
- package/dist/collection/utils/utils.js +33 -33
- package/dist/esm/{ShadowViewAddon-2e3ea31f.js → ShadowViewAddon-6146607d.js} +113 -113
- package/dist/esm/{global-cc82aa03.js → global-a9d82dd9.js} +692 -692
- package/dist/esm/{index.module-33c313d2.js → index.module-8c0fcb22.js} +2 -2
- package/dist/esm/loader.js +3 -3
- package/dist/esm/mint-components.js +3 -3
- package/dist/esm/{mixins-10353a39.js → mixins-eba86511.js} +85 -85
- package/dist/esm/polyfills/core-js.js +0 -0
- package/dist/esm/polyfills/dom.js +0 -0
- package/dist/esm/polyfills/es5-html-element.js +0 -0
- package/dist/esm/polyfills/index.js +0 -0
- package/dist/esm/polyfills/system.js +0 -0
- package/dist/esm/{re-render-338d931e.js → re-render-17fbc7b6.js} +37 -37
- package/dist/esm/{sqm-asset-card-view-6f360937.js → sqm-asset-card-view-686789bb.js} +44 -44
- package/dist/esm/sqm-asset-card.entry.js +31 -31
- package/dist/esm/sqm-big-stat.entry.js +17 -17
- package/dist/esm/sqm-divided-layout_26.entry.js +6212 -6210
- package/dist/esm/sqm-graphql-client-provider.entry.js +22 -22
- package/dist/esm/{sqm-hero-view-bfd8abd1.js → sqm-hero-view-8a6c5d99.js} +137 -137
- package/dist/esm/sqm-hero.entry.js +24 -24
- package/dist/esm/{sqm-leaderboard-rank-view-4f48da0c.js → sqm-leaderboard-rank-view-10bc61e5.js} +5 -5
- package/dist/esm/sqm-leaderboard-rank.entry.js +67 -67
- package/dist/esm/sqm-leaderboard.entry.js +55 -55
- package/dist/esm/{sqm-name-fields-view-4162fb7b.js → sqm-name-fields-view-443f3baa.js} +46 -46
- package/dist/esm/sqm-name-fields.entry.js +45 -45
- package/dist/esm/{sqm-navigation-sidebar-item-view-5dfa535f.js → sqm-navigation-sidebar-item-view-3539e74e.js} +36 -36
- package/dist/esm/sqm-navigation-sidebar-item.entry.js +39 -39
- package/dist/esm/{sqm-navigation-sidebar-view-2242502c.js → sqm-navigation-sidebar-view-9a7b5a9e.js} +29 -29
- package/dist/esm/sqm-navigation-sidebar.entry.js +12 -12
- package/dist/esm/sqm-popup-container.entry.js +52 -52
- package/dist/esm/{sqm-portal-container-view-73757ca5.js → sqm-portal-container-view-015fbb1c.js} +23 -23
- package/dist/esm/sqm-portal-container.entry.js +24 -24
- package/dist/esm/{sqm-portal-email-verification-view-87bf8191.js → sqm-portal-email-verification-view-a4181f6d.js} +37 -37
- package/dist/esm/sqm-portal-email-verification.entry.js +88 -88
- package/dist/esm/{sqm-portal-footer-view-da135cff.js → sqm-portal-footer-view-aa477599.js} +72 -72
- package/dist/esm/sqm-portal-footer.entry.js +47 -47
- package/dist/esm/{sqm-portal-forgot-password-view-e3a6a716.js → sqm-portal-forgot-password-view-0a3acc0e.js} +38 -38
- package/dist/esm/sqm-portal-forgot-password.entry.js +82 -82
- package/dist/esm/sqm-portal-logout.entry.js +19 -19
- package/dist/esm/{sqm-portal-profile-view-8781176c.js → sqm-portal-profile-view-137869da.js} +65 -65
- package/dist/esm/sqm-portal-profile.entry.js +234 -234
- package/dist/esm/sqm-portal-protected-route.entry.js +52 -52
- package/dist/esm/{sqm-portal-reset-password-view-a4e50da2.js → sqm-portal-reset-password-view-e36b91dd.js} +74 -74
- package/dist/esm/sqm-portal-reset-password.entry.js +157 -153
- package/dist/esm/{sqm-portal-section-view-f0876545.js → sqm-portal-section-view-17ebaaf1.js} +20 -20
- package/dist/esm/{sqm-portal-verify-email-view-6f18bac2.js → sqm-portal-verify-email-view-b818602a.js} +40 -40
- package/dist/esm/sqm-portal-verify-email.entry.js +116 -112
- package/dist/esm/sqm-referral-table-column.entry.js +19 -19
- package/dist/esm/sqm-referral-table-date-column.entry.js +36 -36
- package/dist/esm/sqm-referral-table-rewards-column.entry.js +27 -27
- package/dist/esm/sqm-referral-table-status-column.entry.js +34 -34
- package/dist/esm/sqm-referral-table-user-column.entry.js +46 -46
- package/dist/esm/sqm-route.entry.js +9 -9
- package/dist/esm/sqm-share-code.entry.js +72 -72
- package/dist/esm/{sqm-share-link-view-9282b8e8.js → sqm-share-link-view-f5b091fa.js} +16 -16
- package/dist/esm/{sqm-stat-container-view-4133feb6.js → sqm-stat-container-view-f3285eeb.js} +45 -45
- package/dist/esm/sqm-stat-container.entry.js +18 -18
- package/dist/esm/{sqm-text-span-view-1781df94.js → sqm-text-span-view-db65d1ea.js} +52 -52
- package/dist/esm/sqm-text-span.entry.js +12 -12
- package/dist/esm/sqm-titled-section.entry.js +25 -25
- package/dist/esm/{useDemoBigStat-2fe92931.js → useDemoBigStat-f7e0e830.js} +561 -561
- package/dist/esm/{utils-454405f5.js → utils-271197e1.js} +22 -22
- package/dist/esm-es5/{ShadowViewAddon-2e3ea31f.js → ShadowViewAddon-6146607d.js} +1 -1
- package/dist/esm-es5/{global-cc82aa03.js → global-a9d82dd9.js} +1 -1
- package/dist/esm-es5/{index.module-33c313d2.js → index.module-8c0fcb22.js} +1 -1
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/mint-components.js +1 -1
- package/dist/esm-es5/{mixins-10353a39.js → mixins-eba86511.js} +0 -0
- package/dist/esm-es5/{re-render-338d931e.js → re-render-17fbc7b6.js} +1 -1
- package/dist/esm-es5/{sqm-asset-card-view-6f360937.js → sqm-asset-card-view-686789bb.js} +0 -0
- package/dist/esm-es5/sqm-asset-card.entry.js +1 -1
- package/dist/esm-es5/sqm-big-stat.entry.js +1 -1
- package/dist/esm-es5/sqm-divided-layout_26.entry.js +1 -1
- package/dist/esm-es5/sqm-graphql-client-provider.entry.js +1 -1
- package/dist/esm-es5/{sqm-hero-view-bfd8abd1.js → sqm-hero-view-8a6c5d99.js} +0 -0
- package/dist/esm-es5/sqm-hero.entry.js +1 -1
- package/dist/esm-es5/{sqm-leaderboard-rank-view-4f48da0c.js → sqm-leaderboard-rank-view-10bc61e5.js} +1 -1
- package/dist/esm-es5/sqm-leaderboard-rank.entry.js +1 -1
- package/dist/esm-es5/sqm-leaderboard.entry.js +1 -1
- package/dist/esm-es5/{sqm-name-fields-view-4162fb7b.js → sqm-name-fields-view-443f3baa.js} +1 -1
- package/dist/esm-es5/sqm-name-fields.entry.js +1 -1
- package/dist/esm-es5/sqm-navigation-sidebar-item-view-3539e74e.js +1 -0
- package/dist/esm-es5/sqm-navigation-sidebar-item.entry.js +1 -1
- package/dist/esm-es5/{sqm-navigation-sidebar-view-2242502c.js → sqm-navigation-sidebar-view-9a7b5a9e.js} +1 -1
- package/dist/esm-es5/sqm-navigation-sidebar.entry.js +1 -1
- package/dist/esm-es5/sqm-popup-container.entry.js +1 -1
- package/dist/esm-es5/{sqm-portal-container-view-73757ca5.js → sqm-portal-container-view-015fbb1c.js} +0 -0
- package/dist/esm-es5/sqm-portal-container.entry.js +1 -1
- package/dist/esm-es5/{sqm-portal-email-verification-view-87bf8191.js → sqm-portal-email-verification-view-a4181f6d.js} +1 -1
- package/dist/esm-es5/sqm-portal-email-verification.entry.js +1 -1
- package/dist/esm-es5/{sqm-portal-footer-view-da135cff.js → sqm-portal-footer-view-aa477599.js} +1 -1
- package/dist/esm-es5/sqm-portal-footer.entry.js +1 -1
- package/dist/esm-es5/{sqm-portal-forgot-password-view-e3a6a716.js → sqm-portal-forgot-password-view-0a3acc0e.js} +1 -1
- package/dist/esm-es5/sqm-portal-forgot-password.entry.js +1 -1
- package/dist/esm-es5/sqm-portal-logout.entry.js +1 -1
- package/dist/esm-es5/{sqm-portal-profile-view-8781176c.js → sqm-portal-profile-view-137869da.js} +1 -1
- package/dist/esm-es5/sqm-portal-profile.entry.js +1 -1
- package/dist/esm-es5/sqm-portal-protected-route.entry.js +1 -1
- package/dist/esm-es5/{sqm-portal-reset-password-view-a4e50da2.js → sqm-portal-reset-password-view-e36b91dd.js} +1 -1
- package/dist/esm-es5/sqm-portal-reset-password.entry.js +1 -1
- package/dist/esm-es5/{sqm-portal-section-view-f0876545.js → sqm-portal-section-view-17ebaaf1.js} +0 -0
- package/dist/esm-es5/{sqm-portal-verify-email-view-6f18bac2.js → sqm-portal-verify-email-view-b818602a.js} +1 -1
- package/dist/esm-es5/sqm-portal-verify-email.entry.js +1 -1
- package/dist/esm-es5/sqm-referral-table-column.entry.js +1 -1
- package/dist/esm-es5/sqm-referral-table-date-column.entry.js +1 -1
- package/dist/esm-es5/sqm-referral-table-rewards-column.entry.js +1 -1
- package/dist/esm-es5/sqm-referral-table-status-column.entry.js +1 -1
- package/dist/esm-es5/sqm-referral-table-user-column.entry.js +1 -1
- package/dist/esm-es5/sqm-share-code.entry.js +1 -1
- package/dist/esm-es5/{sqm-share-link-view-9282b8e8.js → sqm-share-link-view-f5b091fa.js} +1 -1
- package/dist/esm-es5/{sqm-stat-container-view-4133feb6.js → sqm-stat-container-view-f3285eeb.js} +0 -0
- package/dist/esm-es5/sqm-stat-container.entry.js +1 -1
- package/dist/esm-es5/{sqm-text-span-view-1781df94.js → sqm-text-span-view-db65d1ea.js} +0 -0
- package/dist/esm-es5/sqm-text-span.entry.js +1 -1
- package/dist/esm-es5/sqm-titled-section.entry.js +1 -1
- package/dist/esm-es5/{useDemoBigStat-2fe92931.js → useDemoBigStat-f7e0e830.js} +1 -1
- package/dist/esm-es5/{utils-454405f5.js → utils-271197e1.js} +0 -0
- package/dist/mint-components/global/styles.ts +584 -584
- package/dist/mint-components/mint-components.esm.js +1 -1
- package/dist/mint-components/mint-components.js +1 -1
- package/dist/mint-components/p-02e97793.system.entry.js +1 -0
- package/dist/mint-components/{p-21bb74aa.system.entry.js → p-03775236.system.entry.js} +1 -1
- package/dist/mint-components/p-04017807.entry.js +230 -0
- package/dist/mint-components/{p-8d65fef3.entry.js → p-061b4955.entry.js} +1 -1
- package/dist/mint-components/p-11f1488d.entry.js +1 -0
- package/dist/mint-components/{p-fb1b6fdf.js → p-151fa42f.js} +0 -0
- package/dist/mint-components/{p-8e87084e.system.js → p-15cae351.system.js} +1 -1
- package/dist/mint-components/{p-f85f36c6.system.entry.js → p-16dd1560.system.entry.js} +1 -1
- package/dist/mint-components/{p-4a313a31.js → p-176716f3.js} +1 -1
- package/dist/mint-components/{p-871ed4c8.system.js → p-1a5e918c.system.js} +1 -1
- package/dist/mint-components/p-1aaf43e4.system.entry.js +1 -0
- package/dist/mint-components/p-1d5867fe.system.js +1 -0
- package/dist/mint-components/{p-b3bda4e8.entry.js → p-1e5bd34a.entry.js} +1 -1
- package/dist/mint-components/{p-126bcba1.system.js → p-1f2cf99b.system.js} +0 -0
- package/dist/mint-components/{p-4e61f958.system.js → p-224b38fd.system.js} +1 -1
- package/dist/mint-components/{p-c35bb682.system.entry.js → p-28a17af8.system.entry.js} +1 -1
- package/dist/mint-components/{p-53b0c355.system.js → p-2a495707.system.js} +1 -1
- package/dist/mint-components/{p-c03c68c1.entry.js → p-2bddc766.entry.js} +1 -1
- package/dist/mint-components/{p-48cdbd66.js → p-2db528f5.js} +1 -1
- package/dist/mint-components/p-314db33c.entry.js +1 -0
- package/dist/mint-components/{p-c324b1e8.system.js → p-346c6a66.system.js} +1 -1
- package/dist/mint-components/{p-d7d6bf44.system.js → p-35c7cb98.system.js} +0 -0
- package/dist/mint-components/{p-b462e84e.system.js → p-36dc6711.system.js} +1 -1
- package/dist/mint-components/{p-ff3c9d53.system.entry.js → p-371a6a5f.system.entry.js} +1 -1
- package/dist/mint-components/{p-a011c13c.entry.js → p-38007114.entry.js} +1 -1
- package/dist/mint-components/{p-bbb3ff09.js → p-38541813.js} +1 -1
- package/dist/mint-components/p-38584671.js +1 -0
- package/dist/mint-components/{p-e426715b.js → p-39c5c05f.js} +0 -0
- package/dist/mint-components/p-3bb30a9a.system.entry.js +1 -0
- package/dist/mint-components/p-3fddc61a.entry.js +1 -0
- package/dist/mint-components/{p-562199e3.system.js → p-4293cf8b.system.js} +1 -1
- package/dist/mint-components/p-44bb1f49.system.entry.js +1 -0
- package/dist/mint-components/p-4c65a489.system.entry.js +1 -0
- package/dist/mint-components/{p-35476f7e.system.js → p-4eaf0ffb.system.js} +0 -0
- package/dist/mint-components/{p-a8b913a8.js → p-50cab082.js} +1 -1
- package/dist/mint-components/{p-282ed862.js → p-52209290.js} +1 -1
- package/dist/mint-components/{p-01722953.entry.js → p-52ae03a2.entry.js} +1 -1
- package/dist/mint-components/{p-bd903567.js → p-571e91e7.js} +1 -1
- package/dist/mint-components/{p-60ae1ec5.system.js → p-57e8da01.system.js} +0 -0
- package/dist/mint-components/{p-952ed169.js → p-588df429.js} +0 -0
- package/dist/mint-components/{p-e52c77cd.entry.js → p-5ad67f4d.entry.js} +1 -1
- package/dist/mint-components/{p-34696973.system.js → p-5b3f7ae3.system.js} +0 -0
- package/dist/mint-components/{p-e14c15ca.system.entry.js → p-5f58de4d.system.entry.js} +1 -1
- package/dist/mint-components/{p-0a39b23c.system.entry.js → p-611744d8.system.entry.js} +1 -1
- package/dist/mint-components/{p-e069bc2d.entry.js → p-620504da.entry.js} +1 -1
- package/dist/mint-components/{p-775529b9.system.entry.js → p-622c9104.system.entry.js} +1 -1
- package/dist/mint-components/{p-1369c11a.system.entry.js → p-6330dacb.system.entry.js} +1 -1
- package/dist/mint-components/{p-fee468b7.system.entry.js → p-63e14d28.system.entry.js} +1 -1
- package/dist/mint-components/{p-ebcd8a59.js → p-663f7a43.js} +0 -0
- package/dist/mint-components/{p-a565e753.entry.js → p-67ef28d9.entry.js} +1 -1
- package/dist/mint-components/p-6c312cba.entry.js +1 -0
- package/dist/mint-components/p-6ec81e0b.entry.js +1 -0
- package/dist/mint-components/{p-156464b2.entry.js → p-71bfa6f2.entry.js} +1 -1
- package/dist/mint-components/p-7387e0e8.system.entry.js +1 -0
- package/dist/mint-components/p-74a40471.entry.js +1 -0
- package/dist/mint-components/p-7565647d.entry.js +9 -0
- package/dist/mint-components/{p-34dea514.system.entry.js → p-75a52e72.system.entry.js} +1 -1
- package/dist/mint-components/{p-6a44136e.js → p-7ba60216.js} +1 -1
- package/dist/mint-components/{p-9b4f2af6.js → p-8cb92dee.js} +0 -0
- package/dist/mint-components/{p-f9cb55dc.entry.js → p-91e7e0c7.entry.js} +1 -1
- package/dist/mint-components/p-958d85e3.js +1 -0
- package/dist/mint-components/p-95a64c33.system.js +1 -0
- package/dist/mint-components/p-978ee176.system.entry.js +1 -0
- package/dist/mint-components/{p-846cebe7.js → p-9bb3d04e.js} +1 -1
- package/dist/mint-components/{p-f4a9712a.entry.js → p-9f1733ea.entry.js} +2 -2
- package/dist/mint-components/{p-4843c461.js → p-a0ee2aaf.js} +1 -1
- package/dist/mint-components/{p-1996e9c8.system.js → p-a1734d52.system.js} +1 -1
- package/dist/mint-components/{p-e43cc1f8.system.entry.js → p-a28686e7.system.entry.js} +1 -1
- package/dist/mint-components/{p-0f84ebfe.entry.js → p-a33210a3.entry.js} +1 -1
- package/dist/mint-components/p-a793dea1.js +1 -0
- package/dist/mint-components/p-a9404207.entry.js +1 -0
- package/dist/mint-components/{p-2ad23b02.system.entry.js → p-aa3688a5.system.entry.js} +1 -1
- package/dist/mint-components/{p-713ea21e.system.entry.js → p-ae5cc5f2.system.entry.js} +1 -1
- package/dist/mint-components/p-aefa5f18.entry.js +1 -0
- package/dist/mint-components/{p-c43f3b6b.system.js → p-af9974de.system.js} +1 -1
- package/dist/mint-components/{p-bb76c6f3.system.js → p-b285d182.system.js} +0 -0
- package/dist/mint-components/{p-ee6f5a1c.system.js → p-b5b34fbd.system.js} +1 -1
- package/dist/mint-components/{p-0bcefa93.entry.js → p-b9686abe.entry.js} +1 -1
- package/dist/mint-components/{p-36de7c74.entry.js → p-bf478daa.entry.js} +1 -1
- package/dist/mint-components/{p-55f8387d.system.js → p-c0d9c611.system.js} +1 -1
- package/dist/mint-components/{p-c32fb8e5.entry.js → p-c1f992b6.entry.js} +1 -1
- package/dist/mint-components/{p-7b7613cf.system.entry.js → p-c281a8bb.system.entry.js} +1 -1
- package/dist/mint-components/p-c5572bf4.system.entry.js +1 -0
- package/dist/mint-components/{p-b1e03222.entry.js → p-cb4753c3.entry.js} +1 -1
- package/dist/mint-components/{p-6d27cd05.system.entry.js → p-cd600176.system.entry.js} +1 -1
- package/dist/mint-components/{p-99f1208f.js → p-d0e177ef.js} +1 -1
- package/dist/mint-components/{p-fee6801c.js → p-d2a78efd.js} +1 -1
- package/dist/mint-components/{p-e2fc8abf.system.entry.js → p-d3ccbe3b.system.entry.js} +1 -1
- package/dist/mint-components/{p-739b3032.js → p-d5c6b717.js} +0 -0
- package/dist/mint-components/{p-509dda90.js → p-d7a75527.js} +0 -0
- package/dist/mint-components/{p-1575e8a3.system.js → p-d809ef4f.system.js} +1 -1
- package/dist/mint-components/{p-547a0354.system.js → p-dddf8d01.system.js} +0 -0
- package/dist/mint-components/{p-b4fc47a0.js → p-decdbf86.js} +1 -1
- package/dist/mint-components/{p-aaf68d9d.system.js → p-ded92f50.system.js} +1 -1
- package/dist/mint-components/{p-26f627aa.js → p-e33e615e.js} +0 -0
- package/dist/mint-components/p-e9d0b898.system.entry.js +1 -0
- package/dist/mint-components/p-ede3887a.entry.js +1 -0
- package/dist/mint-components/{p-754060c8.system.js → p-ef78de5b.system.js} +1 -1
- package/dist/mint-components/p-f0d57b4e.system.entry.js +1 -0
- package/dist/mint-components/{p-69f28472.system.js → p-f3c05b72.system.js} +0 -0
- package/dist/mint-components/{p-c434c33a.system.entry.js → p-f754cde4.system.entry.js} +1 -1
- package/dist/mint-components/{p-e83632dd.js → p-f81bb17c.js} +1 -1
- package/dist/mint-components/p-f9257210.entry.js +1 -0
- package/dist/mint-components/{p-ff3d1ed1.system.entry.js → p-fc83bf27.system.entry.js} +1 -1
- package/dist/mint-components/p-fc9bbfa4.entry.js +1 -0
- package/dist/mint-components/p-fd621386.system.js +1 -0
- package/dist/mint-components/{p-dd0b0a4a.system.entry.js → p-fe6d5efa.system.entry.js} +1 -1
- package/dist/types/ShadowViewAddon.d.ts +6 -6
- package/dist/types/components/sqm-asset-card/sqm-asset-card-view.d.ts +8 -8
- package/dist/types/components/sqm-asset-card/sqm-asset-card.d.ts +24 -24
- package/dist/types/components/sqm-asset-card/useAssetCard.d.ts +7 -7
- package/dist/types/components/sqm-big-stat/sqm-big-stat-view.d.ts +7 -7
- package/dist/types/components/sqm-big-stat/sqm-big-stat.d.ts +36 -36
- package/dist/types/components/sqm-big-stat/useBigStat.d.ts +18 -18
- package/dist/types/components/sqm-big-stat/useDemoBigStat.d.ts +3 -3
- package/dist/types/components/sqm-divided-layout/sqm-divided-layout-view.d.ts +7 -7
- package/dist/types/components/sqm-divided-layout/sqm-divided-layout.d.ts +22 -22
- package/dist/types/components/sqm-edit-profile/sqm-edit-profile-view.d.ts +37 -37
- package/dist/types/components/sqm-edit-profile/sqm-edit-profile.d.ts +48 -48
- package/dist/types/components/sqm-edit-profile/useEditProfile.d.ts +12 -12
- package/dist/types/components/sqm-form-message/sqm-form-message.d.ts +13 -13
- package/dist/types/components/sqm-graphql-client-provider/sqm-graphql-client-provider.d.ts +13 -13
- package/dist/types/components/sqm-graphql-client-provider/useGraphQLProvider.d.ts +3 -3
- package/dist/types/components/sqm-hero/sqm-hero-view.d.ts +15 -15
- package/dist/types/components/sqm-hero/sqm-hero.d.ts +20 -20
- package/dist/types/components/sqm-hook-story-container/sqm-hook-story-container.d.ts +8 -8
- package/dist/types/components/sqm-leaderboard/sqm-leaderboard-view.d.ts +27 -27
- package/dist/types/components/sqm-leaderboard/sqm-leaderboard.d.ts +50 -50
- package/dist/types/components/sqm-leaderboard/useLeaderboard.d.ts +26 -26
- package/dist/types/components/sqm-leaderboard-rank/sqm-leaderboard-rank-view.d.ts +6 -6
- package/dist/types/components/sqm-leaderboard-rank/sqm-leaderboard-rank.d.ts +41 -41
- package/dist/types/components/sqm-leaderboard-rank/useLeaderboardRank.d.ts +9 -9
- package/dist/types/components/sqm-name-fields/sqm-name-fields-view.d.ts +10 -10
- package/dist/types/components/sqm-name-fields/sqm-name-fields.d.ts +21 -21
- package/dist/types/components/sqm-name-fields/useNameFields.d.ts +14 -14
- package/dist/types/components/sqm-navigation-menu/sqm-navigation-menu-view.d.ts +15 -15
- package/dist/types/components/sqm-navigation-menu/sqm-navigation-menu.d.ts +24 -24
- package/dist/types/components/sqm-navigation-menu/useNavigationMenu.d.ts +3 -3
- package/dist/types/components/sqm-navigation-sidebar/sqm-navigation-sidebar-view.d.ts +4 -4
- package/dist/types/components/sqm-navigation-sidebar/sqm-navigation-sidebar.d.ts +11 -11
- package/dist/types/components/sqm-navigation-sidebar-item/sqm-navigation-sidebar-item-view.d.ts +11 -11
- package/dist/types/components/sqm-navigation-sidebar-item/sqm-navigation-sidebar-item.d.ts +27 -27
- package/dist/types/components/sqm-navigation-sidebar-item/useNavigationSidebarItem.d.ts +3 -3
- package/dist/types/components/sqm-password-field/passwordValidation.d.ts +1 -1
- package/dist/types/components/sqm-password-field/sqm-password-field-view.d.ts +15 -15
- package/dist/types/components/sqm-password-field/sqm-password-field.d.ts +32 -32
- package/dist/types/components/sqm-password-field/usePasswordField.d.ts +3 -3
- package/dist/types/components/sqm-popup-container/sqm-popup-container-view.d.ts +4 -4
- package/dist/types/components/sqm-popup-container/sqm-popup-container.d.ts +26 -26
- package/dist/types/components/sqm-popup-container/usePopupContainer.d.ts +33 -33
- package/dist/types/components/sqm-portal-change-password/sqm-portal-change-password-view.d.ts +23 -23
- package/dist/types/components/sqm-portal-change-password/sqm-portal-change-password.d.ts +48 -48
- package/dist/types/components/sqm-portal-change-password/usePortalChangePassword.d.ts +24 -24
- package/dist/types/components/sqm-portal-container/sqm-portal-container-view.d.ts +10 -10
- package/dist/types/components/sqm-portal-container/sqm-portal-container.d.ts +30 -30
- package/dist/types/components/sqm-portal-email-verification/sqm-portal-email-verification-view.d.ts +17 -17
- package/dist/types/components/sqm-portal-email-verification/sqm-portal-email-verification.d.ts +28 -28
- package/dist/types/components/sqm-portal-email-verification/usePortalEmailVerification.d.ts +17 -17
- package/dist/types/components/sqm-portal-footer/PoweredByImg.d.ts +7 -7
- package/dist/types/components/sqm-portal-footer/sqm-portal-footer-view.d.ts +16 -16
- package/dist/types/components/sqm-portal-footer/sqm-portal-footer.d.ts +57 -57
- package/dist/types/components/sqm-portal-forgot-password/sqm-portal-forgot-password-view.d.ts +18 -18
- package/dist/types/components/sqm-portal-forgot-password/sqm-portal-forgot-password.d.ts +28 -28
- package/dist/types/components/sqm-portal-forgot-password/usePortalForgotPassword.d.ts +11 -11
- package/dist/types/components/sqm-portal-frame/sqm-portal-frame-view.d.ts +11 -11
- package/dist/types/components/sqm-portal-frame/sqm-portal-frame.d.ts +16 -16
- package/dist/types/components/sqm-portal-frame/usePortalFrame.d.ts +3 -3
- package/dist/types/components/sqm-portal-login/sqm-portal-login-view.d.ts +20 -20
- package/dist/types/components/sqm-portal-login/sqm-portal-login.d.ts +52 -52
- package/dist/types/components/sqm-portal-login/usePortalLogin.d.ts +11 -11
- package/dist/types/components/sqm-portal-logout/sqm-portal-logout.d.ts +13 -13
- package/dist/types/components/sqm-portal-logout/usePortalLogout.d.ts +3 -3
- package/dist/types/components/sqm-portal-profile/sqm-portal-profile-view.d.ts +37 -37
- package/dist/types/components/sqm-portal-profile/sqm-portal-profile.d.ts +48 -48
- package/dist/types/components/sqm-portal-profile/usePortalProfile.d.ts +12 -12
- package/dist/types/components/sqm-portal-protected-route/sqm-portal-protected-route.d.ts +21 -21
- package/dist/types/components/sqm-portal-protected-route/usePortalProtectedRoute.d.ts +7 -7
- package/dist/types/components/sqm-portal-register/sqm-portal-register-view.d.ts +30 -30
- package/dist/types/components/sqm-portal-register/sqm-portal-register.d.ts +60 -60
- package/dist/types/components/sqm-portal-register/usePortalRegister.d.ts +25 -25
- package/dist/types/components/sqm-portal-register/useValidationState.d.ts +17 -17
- package/dist/types/components/sqm-portal-reset-password/sqm-portal-reset-password-view.d.ts +26 -26
- package/dist/types/components/sqm-portal-reset-password/sqm-portal-reset-password.d.ts +56 -52
- package/dist/types/components/sqm-portal-reset-password/usePortalResetPassword.d.ts +3 -3
- package/dist/types/components/sqm-portal-verify-email/sqm-portal-verify-email-view.d.ts +15 -15
- package/dist/types/components/sqm-portal-verify-email/sqm-portal-verify-email.d.ts +24 -20
- package/dist/types/components/sqm-portal-verify-email/usePortalVerifyEmail.d.ts +17 -16
- package/dist/types/components/sqm-program-menu/sqm-program-menu.d.ts +9 -9
- package/dist/types/components/sqm-program-menu/useProgramMenu.d.ts +13 -13
- package/dist/types/components/sqm-referral-iframe/sqm-referral-iframe-view.d.ts +13 -13
- package/dist/types/components/sqm-referral-iframe/sqm-referral-iframe.d.ts +29 -29
- package/dist/types/components/sqm-referral-iframe/useReferralIframe.d.ts +3 -3
- package/dist/types/components/sqm-referral-table/cells/sqm-referral-table-cell.d.ts +7 -7
- package/dist/types/components/sqm-referral-table/cells/sqm-referral-table-date-cell.d.ts +7 -7
- package/dist/types/components/sqm-referral-table/cells/sqm-referral-table-rewards-cell.d.ts +5 -5
- package/dist/types/components/sqm-referral-table/cells/sqm-referral-table-status-cell.d.ts +5 -5
- package/dist/types/components/sqm-referral-table/cells/sqm-referral-table-user-cell.d.ts +4 -4
- package/dist/types/components/sqm-referral-table/columns/ReferralTableColumn.d.ts +6 -6
- package/dist/types/components/sqm-referral-table/columns/sqm-referral-table-column.d.ts +15 -15
- package/dist/types/components/sqm-referral-table/columns/sqm-referral-table-date-column.d.ts +29 -29
- package/dist/types/components/sqm-referral-table/columns/sqm-referral-table-rewards-column.d.ts +19 -19
- package/dist/types/components/sqm-referral-table/columns/sqm-referral-table-status-column.d.ts +23 -23
- package/dist/types/components/sqm-referral-table/columns/sqm-referral-table-user-column.d.ts +23 -23
- package/dist/types/components/sqm-referral-table/re-render.d.ts +13 -13
- package/dist/types/components/sqm-referral-table/sqm-referral-table-view.d.ts +29 -29
- package/dist/types/components/sqm-referral-table/sqm-referral-table.d.ts +33 -33
- package/dist/types/components/sqm-referral-table/sqm-table-cell.d.ts +5 -5
- package/dist/types/components/sqm-referral-table/sqm-table-row.d.ts +4 -4
- package/dist/types/components/sqm-referral-table/useChildElements.d.ts +1 -1
- package/dist/types/components/sqm-referral-table/useReferralTable.d.ts +5 -5
- package/dist/types/components/sqm-route/sqm-route.d.ts +15 -15
- package/dist/types/components/sqm-router/sqm-router.d.ts +9 -9
- package/dist/types/components/sqm-router/useRouter.d.ts +9 -9
- package/dist/types/components/sqm-share-button/sqm-share-button-view.d.ts +16 -16
- package/dist/types/components/sqm-share-button/sqm-share-button.d.ts +80 -80
- package/dist/types/components/sqm-share-button/useShareButton.d.ts +8 -8
- package/dist/types/components/sqm-share-code/sqm-share-code.d.ts +33 -33
- package/dist/types/components/sqm-share-code/useShareCode.d.ts +8 -8
- package/dist/types/components/sqm-share-link/sqm-share-link-view.d.ts +8 -8
- package/dist/types/components/sqm-share-link/sqm-share-link.d.ts +33 -33
- package/dist/types/components/sqm-share-link/useShareLink.d.ts +8 -8
- package/dist/types/components/sqm-stat-container/sqm-stat-container-view.d.ts +5 -5
- package/dist/types/components/sqm-stat-container/sqm-stat-container.d.ts +16 -16
- package/dist/types/components/sqm-stencilbook/CucumberAddon.d.ts +2 -2
- package/dist/types/components/sqm-stencilbook/HookStoryAddon.d.ts +8 -8
- package/dist/types/components/sqm-stencilbook/sqm-stencilbook.d.ts +11 -11
- package/dist/types/components/sqm-text/sqm-text.d.ts +10 -10
- package/dist/types/components/sqm-text-span/sqm-text-span-view.d.ts +5 -5
- package/dist/types/components/sqm-text-span/sqm-text-span.d.ts +20 -20
- package/dist/types/components/sqm-titled-section/sqm-portal-section-view.d.ts +9 -9
- package/dist/types/components/sqm-titled-section/sqm-titled-section.d.ts +22 -22
- package/dist/types/components/sqm-user-name/sqm-user-name-view.d.ts +6 -6
- package/dist/types/components/sqm-user-name/sqm-user-name.d.ts +24 -24
- package/dist/types/components/sqm-user-name/useUserName.d.ts +3 -3
- package/dist/types/components.d.ts +50 -34
- package/dist/types/global/android.d.ts +7 -7
- package/dist/types/global/global.d.ts +6 -6
- package/dist/types/global/mixins.d.ts +166 -166
- package/dist/types/global/styles.d.ts +2 -2
- package/dist/types/index.d.ts +1 -1
- package/dist/types/insertcss.d.ts +6 -6
- package/dist/types/saasquatch.d.ts +92 -92
- package/dist/types/stories/AssetCard.stories.d.ts +7 -7
- package/dist/types/stories/BigStat.stories.d.ts +12 -12
- package/dist/types/stories/ChangePassword.stories.d.ts +13 -13
- package/dist/types/stories/DividedLayout.stories.d.ts +7 -7
- package/dist/types/stories/EditProfileForm.stories.d.ts +7 -7
- package/dist/types/stories/FormMessage.stories.d.ts +8 -8
- package/dist/types/stories/Hero.stories.d.ts +16 -16
- package/dist/types/stories/Leaderboard.stories.d.ts +11 -11
- package/dist/types/stories/LeaderboardRank.stories.d.ts +5 -5
- package/dist/types/stories/NameFields.stories.d.ts +9 -9
- package/dist/types/stories/NavigationSidebar.stories.d.ts +5 -5
- package/dist/types/stories/NewPortal.stories.d.ts +8 -8
- package/dist/types/stories/PasswordField.stories.d.ts +7 -7
- package/dist/types/stories/PortalEmailVerification.stories.d.ts +11 -11
- package/dist/types/stories/PortalFooter.stories.d.ts +12 -12
- package/dist/types/stories/PortalForgotPassword.stories.d.ts +11 -11
- package/dist/types/stories/PortalFrame.stories.d.ts +8 -8
- package/dist/types/stories/PortalLogin.stories.d.ts +7 -7
- package/dist/types/stories/PortalProfile.stories.d.ts +10 -10
- package/dist/types/stories/PortalRegister.stories.d.ts +9 -9
- package/dist/types/stories/PortalResetPassword.stories.d.ts +13 -13
- package/dist/types/stories/PortalTemplates.stories.d.ts +100 -100
- package/dist/types/stories/PortalVerifyEmail.stories.d.ts +9 -9
- package/dist/types/stories/PoweredByImg.stories.d.ts +7 -7
- package/dist/types/stories/ProgramMenu.stories.d.ts +28 -28
- package/dist/types/stories/ReferralIframe.stories.d.ts +9 -9
- package/dist/types/stories/ReferralTable.stories.d.ts +13 -13
- package/dist/types/stories/ReferralTableCell.stories.d.ts +10 -10
- package/dist/types/stories/ReferralTableRewardsCell.stories.d.ts +19 -19
- package/dist/types/stories/Router.stories.d.ts +28 -28
- package/dist/types/stories/ShareButton.stories.d.ts +11 -11
- package/dist/types/stories/ShareLink.stories.d.ts +8 -8
- package/dist/types/stories/SidebarItem.stories.d.ts +6 -6
- package/dist/types/stories/UseBigStat.stories.d.ts +166 -166
- package/dist/types/stories/UseEditProfile.stories.d.ts +10 -10
- package/dist/types/stories/UseLeaderboard.stories.d.ts +16 -16
- package/dist/types/stories/UseShareButton.stories.d.ts +16 -16
- package/dist/types/stories/UseShareLink.stories.d.ts +22 -22
- package/dist/types/stories/UserName.stories.d.ts +6 -6
- package/dist/types/stories/features.d.ts +4 -4
- package/dist/types/stories/templates.d.ts +4 -4
- package/dist/types/utilities.d.ts +3 -3
- package/dist/types/utils/RequiredPropsError.d.ts +7 -7
- package/dist/types/utils/isDemo.d.ts +4 -4
- package/dist/types/utils/utils.d.ts +12 -12
- package/grapesjs/grapesjs.js +54 -54
- package/package.json +94 -94
- package/readme.md +13 -13
- package/dist/esm-es5/sqm-navigation-sidebar-item-view-5dfa535f.js +0 -1
- package/dist/mint-components/p-086aaa1e.system.entry.js +0 -1
- package/dist/mint-components/p-1915df27.system.entry.js +0 -1
- package/dist/mint-components/p-2a6f038c.system.entry.js +0 -1
- package/dist/mint-components/p-33b57b39.system.entry.js +0 -1
- package/dist/mint-components/p-39c466fb.entry.js +0 -1
- package/dist/mint-components/p-412d31b1.js +0 -1
- package/dist/mint-components/p-4cabd25b.entry.js +0 -1
- package/dist/mint-components/p-53ec4863.entry.js +0 -1
- package/dist/mint-components/p-5950e58a.entry.js +0 -1
- package/dist/mint-components/p-683a4971.system.entry.js +0 -1
- package/dist/mint-components/p-7129015b.system.js +0 -1
- package/dist/mint-components/p-772341ce.system.entry.js +0 -1
- package/dist/mint-components/p-7c3a270c.system.entry.js +0 -1
- package/dist/mint-components/p-83bdbf25.js +0 -1
- package/dist/mint-components/p-8cbc24b8.entry.js +0 -9
- package/dist/mint-components/p-9c79643f.system.js +0 -1
- package/dist/mint-components/p-b3e976e0.entry.js +0 -1
- package/dist/mint-components/p-c1cadf29.entry.js +0 -1
- package/dist/mint-components/p-c3bf9440.entry.js +0 -1
- package/dist/mint-components/p-cff66d2e.entry.js +0 -1
- package/dist/mint-components/p-d1604020.system.js +0 -1
- package/dist/mint-components/p-d482d10c.entry.js +0 -1
- package/dist/mint-components/p-d8a80855.entry.js +0 -1
- package/dist/mint-components/p-e835c56c.system.entry.js +0 -1
- package/dist/mint-components/p-ead730e0.system.entry.js +0 -1
- package/dist/mint-components/p-ec3b7256.entry.js +0 -230
- package/dist/mint-components/p-ec8f1962.system.entry.js +0 -1
- package/dist/mint-components/p-f02360c9.js +0 -1
- package/dist/mint-components/p-fa20e730.entry.js +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { h } from './index-17b4da69.js';
|
|
2
2
|
import { b as browser, k as useMemo } from './extends-3a3f9fe2.js';
|
|
3
|
-
import { M, R, T, d as dist, e as en } from './index.module-
|
|
3
|
+
import { M, R, T, d as dist, e as en } from './index.module-8c0fcb22.js';
|
|
4
4
|
import { j as jss, c as create } from './jss-preset-default.esm-71fae192.js';
|
|
5
5
|
import { c as cjs } from './cjs-bdfb4486.js';
|
|
6
6
|
|
|
@@ -298,570 +298,570 @@ function pathToRegexp(path, keys, options) {
|
|
|
298
298
|
return stringToRegexp(path, keys, options);
|
|
299
299
|
}
|
|
300
300
|
|
|
301
|
-
function BigStatView(props, children) {
|
|
302
|
-
const { statvalue, flexReverse, alignment } = props;
|
|
303
|
-
const style = {
|
|
304
|
-
Container: {
|
|
305
|
-
display: "flex",
|
|
306
|
-
height: "inherit",
|
|
307
|
-
"justify-content": "space-between",
|
|
308
|
-
"flex-direction": `${flexReverse ? "column-reverse" : "column"}`,
|
|
309
|
-
"align-items": `${alignment === "left"
|
|
310
|
-
? "flex-start"
|
|
311
|
-
: alignment === "right"
|
|
312
|
-
? "flex-end"
|
|
313
|
-
: "center"}`,
|
|
314
|
-
},
|
|
315
|
-
Stat: {
|
|
316
|
-
"font-size": "var(--sl-font-size-x-large)",
|
|
317
|
-
"text-align": alignment,
|
|
318
|
-
},
|
|
319
|
-
Description: {
|
|
320
|
-
"font-size": "var(--sl-font-size-small)",
|
|
321
|
-
"font-weight": "var(--sl-font-weight-normal)",
|
|
322
|
-
color: "var(--sl-color-gray-600)",
|
|
323
|
-
"text-transform": "uppercase",
|
|
324
|
-
"text-align": alignment,
|
|
325
|
-
},
|
|
326
|
-
};
|
|
327
|
-
jss.setup(create());
|
|
328
|
-
const sheet = jss.createStyleSheet(style);
|
|
329
|
-
const styleString = sheet.toString();
|
|
330
|
-
return (h("div", { part: "stat-wrapper", class: sheet.classes.Container },
|
|
331
|
-
h("style", { type: "text/css" }, styleString),
|
|
332
|
-
h("div", { part: "stat-value", class: sheet.classes.Stat }, statvalue),
|
|
333
|
-
h("div", { part: "stat-description", class: sheet.classes.Description }, children)));
|
|
301
|
+
function BigStatView(props, children) {
|
|
302
|
+
const { statvalue, flexReverse, alignment } = props;
|
|
303
|
+
const style = {
|
|
304
|
+
Container: {
|
|
305
|
+
display: "flex",
|
|
306
|
+
height: "inherit",
|
|
307
|
+
"justify-content": "space-between",
|
|
308
|
+
"flex-direction": `${flexReverse ? "column-reverse" : "column"}`,
|
|
309
|
+
"align-items": `${alignment === "left"
|
|
310
|
+
? "flex-start"
|
|
311
|
+
: alignment === "right"
|
|
312
|
+
? "flex-end"
|
|
313
|
+
: "center"}`,
|
|
314
|
+
},
|
|
315
|
+
Stat: {
|
|
316
|
+
"font-size": "var(--sl-font-size-x-large)",
|
|
317
|
+
"text-align": alignment,
|
|
318
|
+
},
|
|
319
|
+
Description: {
|
|
320
|
+
"font-size": "var(--sl-font-size-small)",
|
|
321
|
+
"font-weight": "var(--sl-font-weight-normal)",
|
|
322
|
+
color: "var(--sl-color-gray-600)",
|
|
323
|
+
"text-transform": "uppercase",
|
|
324
|
+
"text-align": alignment,
|
|
325
|
+
},
|
|
326
|
+
};
|
|
327
|
+
jss.setup(create());
|
|
328
|
+
const sheet = jss.createStyleSheet(style);
|
|
329
|
+
const styleString = sheet.toString();
|
|
330
|
+
return (h("div", { part: "stat-wrapper", class: sheet.classes.Container },
|
|
331
|
+
h("style", { type: "text/css" }, styleString),
|
|
332
|
+
h("div", { part: "stat-value", class: sheet.classes.Stat }, statvalue),
|
|
333
|
+
h("div", { part: "stat-description", class: sheet.classes.Description }, children)));
|
|
334
334
|
}
|
|
335
335
|
|
|
336
|
-
const debug = browser("sq:useBigStat");
|
|
337
|
-
const LOADING = "...";
|
|
338
|
-
const debugQuery = (query, variables, getStat) => {
|
|
339
|
-
const res = en(query, variables);
|
|
340
|
-
if (!(res === null || res === void 0 ? void 0 : res.data) && !res.loading) {
|
|
341
|
-
console.error("issue getting stat:", res);
|
|
342
|
-
}
|
|
343
|
-
const stat = getStat(res);
|
|
344
|
-
return stat;
|
|
345
|
-
};
|
|
346
|
-
const referralsCountQuery = (programId,
|
|
347
|
-
// locale
|
|
348
|
-
_, status) => {
|
|
349
|
-
const programFilter = programId === "classic"
|
|
350
|
-
? { programId_exists: false }
|
|
351
|
-
: { programId_eq: programId };
|
|
352
|
-
const convertedFilter = status && status == "converted"
|
|
353
|
-
? { dateConverted_exists: true }
|
|
354
|
-
: status && status == "started"
|
|
355
|
-
? { dateConverted_exists: false }
|
|
356
|
-
: {};
|
|
357
|
-
const queryFilter = { ...programFilter, ...convertedFilter };
|
|
358
|
-
return debugQuery(dist.gql `
|
|
359
|
-
query ($queryFilter: ReferralFilterInput) {
|
|
360
|
-
viewer {
|
|
361
|
-
... on User {
|
|
362
|
-
referrals(filter: $queryFilter) {
|
|
363
|
-
totalCount
|
|
364
|
-
}
|
|
365
|
-
}
|
|
366
|
-
}
|
|
367
|
-
}
|
|
368
|
-
`, { queryFilter }, (res) => { var _a, _b, _c, _d; return (_d = (_c = (_b = (_a = res.data) === null || _a === void 0 ? void 0 : _a.viewer) === null || _b === void 0 ? void 0 : _b.referrals) === null || _c === void 0 ? void 0 : _c.totalCount) === null || _d === void 0 ? void 0 : _d.toString(); });
|
|
369
|
-
};
|
|
370
|
-
const programGoalsQuery = (programId, locale, metricType, goalId) => {
|
|
371
|
-
// Confirm this behaviour
|
|
372
|
-
if (programId === "classic")
|
|
373
|
-
return null;
|
|
374
|
-
return debugQuery(dist.gql `
|
|
375
|
-
query {
|
|
376
|
-
viewer {
|
|
377
|
-
... on User {
|
|
378
|
-
programGoals {
|
|
379
|
-
goalId
|
|
380
|
-
programId
|
|
381
|
-
count
|
|
382
|
-
conversionCount
|
|
383
|
-
}
|
|
384
|
-
}
|
|
385
|
-
}
|
|
386
|
-
}
|
|
387
|
-
`, { programId, metricType, goalId, locale }, (res) => {
|
|
388
|
-
var _a, _b, _c, _d, _e;
|
|
389
|
-
const goal = (_c = (_b = (_a = res.data) === null || _a === void 0 ? void 0 : _a.viewer) === null || _b === void 0 ? void 0 : _b.programGoals) === null || _c === void 0 ? void 0 : _c.filter((goal) => goal.goalId === goalId && goal.programId === programId);
|
|
390
|
-
return ((_e = (_d = goal === null || goal === void 0 ? void 0 : goal[0]) === null || _d === void 0 ? void 0 : _d[metricType]) === null || _e === void 0 ? void 0 : _e.toString()) || 0;
|
|
391
|
-
});
|
|
392
|
-
};
|
|
393
|
-
const referralsMonthQuery = (programId) => {
|
|
394
|
-
const programFilter = programId === "classic"
|
|
395
|
-
? { programId_exists: false }
|
|
396
|
-
: { programId_eq: programId };
|
|
397
|
-
const filter = {
|
|
398
|
-
...programFilter,
|
|
399
|
-
dateReferralStarted_timeframe: "this_month",
|
|
400
|
-
};
|
|
401
|
-
return debugQuery(dist.gql `
|
|
402
|
-
query ($filter: ReferralFilterInput) {
|
|
403
|
-
viewer {
|
|
404
|
-
... on User {
|
|
405
|
-
referrals(filter: $filter) {
|
|
406
|
-
totalCount
|
|
407
|
-
}
|
|
408
|
-
}
|
|
409
|
-
}
|
|
410
|
-
}
|
|
411
|
-
`, { filter }, (res) => { var _a, _b, _c, _d; return (_d = (_c = (_b = (_a = res.data) === null || _a === void 0 ? void 0 : _a.viewer) === null || _b === void 0 ? void 0 : _b.referrals) === null || _c === void 0 ? void 0 : _c.totalCount) === null || _d === void 0 ? void 0 : _d.toString(); });
|
|
412
|
-
};
|
|
413
|
-
const referralsWeekQuery = (programId) => {
|
|
414
|
-
const programFilter = programId === "classic"
|
|
415
|
-
? { programId_exists: false }
|
|
416
|
-
: { programId_eq: programId };
|
|
417
|
-
const filter = {
|
|
418
|
-
...programFilter,
|
|
419
|
-
dateReferralStarted_timeframe: "this_month",
|
|
420
|
-
};
|
|
421
|
-
return debugQuery(dist.gql `
|
|
422
|
-
query ($filter: ReferralFilterInput) {
|
|
423
|
-
viewer {
|
|
424
|
-
... on User {
|
|
425
|
-
referrals(filter: $filter) {
|
|
426
|
-
totalCount
|
|
427
|
-
}
|
|
428
|
-
}
|
|
429
|
-
}
|
|
430
|
-
}
|
|
431
|
-
`, { filter }, (res) => { var _a, _b, _c, _d; return (_d = (_c = (_b = (_a = res.data) === null || _a === void 0 ? void 0 : _a.viewer) === null || _b === void 0 ? void 0 : _b.referrals) === null || _c === void 0 ? void 0 : _c.totalCount) === null || _d === void 0 ? void 0 : _d.toString(); });
|
|
432
|
-
};
|
|
433
|
-
const rewardsCountQuery = (programId,
|
|
434
|
-
// locale
|
|
435
|
-
_, global = "") => {
|
|
436
|
-
return debugQuery(dist.gql `
|
|
437
|
-
query ($programId: ID) {
|
|
438
|
-
viewer {
|
|
439
|
-
... on User {
|
|
440
|
-
rewards(filter: { programId_eq: $programId }) {
|
|
441
|
-
totalCount
|
|
442
|
-
}
|
|
443
|
-
}
|
|
444
|
-
}
|
|
445
|
-
}
|
|
446
|
-
`, {
|
|
447
|
-
programId: !global && programId !== "classic" ? programId : null,
|
|
448
|
-
}, (res) => { var _a, _b, _c, _d; return (_d = (_c = (_b = (_a = res.data) === null || _a === void 0 ? void 0 : _a.viewer) === null || _b === void 0 ? void 0 : _b.rewards) === null || _c === void 0 ? void 0 : _c.totalCount) === null || _d === void 0 ? void 0 : _d.toString(); });
|
|
449
|
-
};
|
|
450
|
-
const rewardsCountFilteredQuery = (programId,
|
|
451
|
-
// locale
|
|
452
|
-
_, type, unit, status, global = "") => {
|
|
453
|
-
const statusFilter = status ? { status } : null;
|
|
454
|
-
return debugQuery(dist.gql `
|
|
455
|
-
query (
|
|
456
|
-
$programId: ID
|
|
457
|
-
$unit: String
|
|
458
|
-
$type: RewardType
|
|
459
|
-
$statusFilter: RewardStatusFilterInput
|
|
460
|
-
) {
|
|
461
|
-
viewer {
|
|
462
|
-
... on User {
|
|
463
|
-
rewards(
|
|
464
|
-
filter: {
|
|
465
|
-
programId_eq: $programId
|
|
466
|
-
type_eq: $type
|
|
467
|
-
unit_eq: $unit
|
|
468
|
-
statuses_eq: $statusFilter
|
|
469
|
-
}
|
|
470
|
-
) {
|
|
471
|
-
totalCount
|
|
472
|
-
}
|
|
473
|
-
}
|
|
474
|
-
}
|
|
475
|
-
}
|
|
476
|
-
`, {
|
|
477
|
-
programId: !global && programId !== "classic" ? programId : null,
|
|
478
|
-
unit,
|
|
479
|
-
type,
|
|
480
|
-
statusFilter,
|
|
481
|
-
}, (res) => { var _a, _b, _c, _d; return (_d = (_c = (_b = (_a = res.data) === null || _a === void 0 ? void 0 : _a.viewer) === null || _b === void 0 ? void 0 : _b.rewards) === null || _c === void 0 ? void 0 : _c.totalCount) === null || _d === void 0 ? void 0 : _d.toString(); });
|
|
482
|
-
};
|
|
483
|
-
const integrationRewardsCountFilteredQuery = (programId,
|
|
484
|
-
// locale
|
|
485
|
-
_, status, global = "") => {
|
|
486
|
-
const statusFilter = status ? { status } : null;
|
|
487
|
-
return debugQuery(dist.gql `
|
|
488
|
-
query ($programId: ID, $statusFilter: RewardStatusFilterInput) {
|
|
489
|
-
viewer {
|
|
490
|
-
... on User {
|
|
491
|
-
rewards(
|
|
492
|
-
filter: {
|
|
493
|
-
programId_eq: $programId
|
|
494
|
-
type_eq: INTEGRATION
|
|
495
|
-
statuses_eq: $statusFilter
|
|
496
|
-
}
|
|
497
|
-
) {
|
|
498
|
-
totalCount
|
|
499
|
-
}
|
|
500
|
-
}
|
|
501
|
-
}
|
|
502
|
-
}
|
|
503
|
-
`, {
|
|
504
|
-
programId: !global && programId !== "classic" ? programId : null,
|
|
505
|
-
statusFilter,
|
|
506
|
-
}, (res) => { var _a, _b, _c, _d; return (_d = (_c = (_b = (_a = res.data) === null || _a === void 0 ? void 0 : _a.viewer) === null || _b === void 0 ? void 0 : _b.rewards) === null || _c === void 0 ? void 0 : _c.totalCount) === null || _d === void 0 ? void 0 : _d.toString(); });
|
|
507
|
-
};
|
|
508
|
-
const rewardsMonthQuery = (programId,
|
|
509
|
-
// locale
|
|
510
|
-
_, global = "") => {
|
|
511
|
-
return debugQuery(dist.gql `
|
|
512
|
-
query ($programId: ID) {
|
|
513
|
-
viewer {
|
|
514
|
-
... on User {
|
|
515
|
-
rewards(
|
|
516
|
-
filter: {
|
|
517
|
-
programId_eq: $programId
|
|
518
|
-
dateGiven_timeframe: "this_month"
|
|
519
|
-
}
|
|
520
|
-
) {
|
|
521
|
-
totalCount
|
|
522
|
-
}
|
|
523
|
-
}
|
|
524
|
-
}
|
|
525
|
-
}
|
|
526
|
-
`, {
|
|
527
|
-
programId: !global && programId !== "classic" ? programId : null,
|
|
528
|
-
}, (res) => { var _a, _b, _c, _d; return (_d = (_c = (_b = (_a = res.data) === null || _a === void 0 ? void 0 : _a.viewer) === null || _b === void 0 ? void 0 : _b.rewards) === null || _c === void 0 ? void 0 : _c.totalCount) === null || _d === void 0 ? void 0 : _d.toString(); });
|
|
529
|
-
};
|
|
530
|
-
const rewardsWeekQuery = (programId,
|
|
531
|
-
// locale
|
|
532
|
-
_, global = "") => {
|
|
533
|
-
return debugQuery(dist.gql `
|
|
534
|
-
query ($programId: ID) {
|
|
535
|
-
viewer {
|
|
536
|
-
... on User {
|
|
537
|
-
rewards(
|
|
538
|
-
filter: {
|
|
539
|
-
programId_eq: $programId
|
|
540
|
-
dateGiven_timeframe: "this_week"
|
|
541
|
-
}
|
|
542
|
-
) {
|
|
543
|
-
totalCount
|
|
544
|
-
}
|
|
545
|
-
}
|
|
546
|
-
}
|
|
547
|
-
}
|
|
548
|
-
`, {
|
|
549
|
-
programId: !global && programId !== "classic" ? programId : null,
|
|
550
|
-
}, (res) => { var _a, _b, _c, _d; return (_d = (_c = (_b = (_a = res.data) === null || _a === void 0 ? void 0 : _a.viewer) === null || _b === void 0 ? void 0 : _b.rewards) === null || _c === void 0 ? void 0 : _c.totalCount) === null || _d === void 0 ? void 0 : _d.toString(); });
|
|
551
|
-
};
|
|
552
|
-
const rewardsRedeemedQuery = (programId, locale, type, unit, global = "") => {
|
|
553
|
-
return debugQuery(dist.gql `
|
|
554
|
-
query (
|
|
555
|
-
$programId: ID
|
|
556
|
-
$type: RewardType
|
|
557
|
-
$unit: String!
|
|
558
|
-
$locale: RSLocale
|
|
559
|
-
) {
|
|
560
|
-
fallback: formatRewardPrettyValue(
|
|
561
|
-
value: 0
|
|
562
|
-
unit: $unit
|
|
563
|
-
locale: $locale
|
|
564
|
-
formatType: UNIT_FORMATTED
|
|
565
|
-
)
|
|
566
|
-
viewer: viewer {
|
|
567
|
-
... on User {
|
|
568
|
-
rewardBalanceDetails(
|
|
569
|
-
programId: $programId
|
|
570
|
-
filter: { type_eq: $type, unit_eq: $unit }
|
|
571
|
-
) {
|
|
572
|
-
... on CreditRewardBalance {
|
|
573
|
-
prettyRedeemedCredit
|
|
574
|
-
}
|
|
575
|
-
}
|
|
576
|
-
}
|
|
577
|
-
}
|
|
578
|
-
}
|
|
579
|
-
`, {
|
|
580
|
-
programId: !global && programId !== "classic" ? programId : null,
|
|
581
|
-
type,
|
|
582
|
-
unit,
|
|
583
|
-
locale,
|
|
584
|
-
}, (res) => {
|
|
585
|
-
var _a, _b, _c, _d;
|
|
586
|
-
const arr = (_b = (_a = res.data) === null || _a === void 0 ? void 0 : _a.viewer) === null || _b === void 0 ? void 0 : _b.rewardBalanceDetails;
|
|
587
|
-
const fallback = (_c = res.data) === null || _c === void 0 ? void 0 : _c.fallback;
|
|
588
|
-
return ((_d = arr === null || arr === void 0 ? void 0 : arr[0]) === null || _d === void 0 ? void 0 : _d.prettyRedeemedCredit) || fallback;
|
|
589
|
-
});
|
|
590
|
-
};
|
|
591
|
-
const rewardsAssignedQuery = (programId, locale, type, unit, global = "") => {
|
|
592
|
-
return debugQuery(dist.gql `
|
|
593
|
-
query (
|
|
594
|
-
$programId: ID
|
|
595
|
-
$type: RewardType
|
|
596
|
-
$unit: String!
|
|
597
|
-
$locale: RSLocale
|
|
598
|
-
) {
|
|
599
|
-
fallback: formatRewardPrettyValue(
|
|
600
|
-
value: 0
|
|
601
|
-
unit: $unit
|
|
602
|
-
locale: $locale
|
|
603
|
-
formatType: UNIT_FORMATTED
|
|
604
|
-
)
|
|
605
|
-
viewer: viewer {
|
|
606
|
-
... on User {
|
|
607
|
-
rewardBalanceDetails(
|
|
608
|
-
programId: $programId
|
|
609
|
-
filter: { type_eq: $type, unit_eq: $unit }
|
|
610
|
-
) {
|
|
611
|
-
... on CreditRewardBalance {
|
|
612
|
-
prettyAssignedCredit
|
|
613
|
-
}
|
|
614
|
-
}
|
|
615
|
-
}
|
|
616
|
-
}
|
|
617
|
-
}
|
|
618
|
-
`, {
|
|
619
|
-
programId: !global && programId !== "classic" ? programId : null,
|
|
620
|
-
type,
|
|
621
|
-
unit,
|
|
622
|
-
locale,
|
|
623
|
-
}, (res) => {
|
|
624
|
-
var _a, _b, _c, _d;
|
|
625
|
-
const arr = (_b = (_a = res.data) === null || _a === void 0 ? void 0 : _a.viewer) === null || _b === void 0 ? void 0 : _b.rewardBalanceDetails;
|
|
626
|
-
const fallback = (_c = res.data) === null || _c === void 0 ? void 0 : _c.fallback;
|
|
627
|
-
return ((_d = arr === null || arr === void 0 ? void 0 : arr[0]) === null || _d === void 0 ? void 0 : _d.prettyAssignedCredit) || fallback;
|
|
628
|
-
});
|
|
629
|
-
};
|
|
630
|
-
const rewardsAvailableQuery = (programId, locale, type, unit, global = "") => {
|
|
631
|
-
return debugQuery(dist.gql `
|
|
632
|
-
query (
|
|
633
|
-
$programId: ID
|
|
634
|
-
$type: RewardType
|
|
635
|
-
$unit: String!
|
|
636
|
-
$locale: RSLocale
|
|
637
|
-
) {
|
|
638
|
-
fallback: formatRewardPrettyValue(
|
|
639
|
-
value: 0
|
|
640
|
-
unit: $unit
|
|
641
|
-
locale: $locale
|
|
642
|
-
formatType: UNIT_FORMATTED
|
|
643
|
-
)
|
|
644
|
-
viewer: viewer {
|
|
645
|
-
... on User {
|
|
646
|
-
rewardBalanceDetails(
|
|
647
|
-
programId: $programId
|
|
648
|
-
filter: { type_eq: $type, unit_eq: $unit }
|
|
649
|
-
) {
|
|
650
|
-
... on CreditRewardBalance {
|
|
651
|
-
prettyAvailableValue
|
|
652
|
-
}
|
|
653
|
-
}
|
|
654
|
-
}
|
|
655
|
-
}
|
|
656
|
-
}
|
|
657
|
-
`, {
|
|
658
|
-
programId: !global && programId !== "classic" ? programId : null,
|
|
659
|
-
type,
|
|
660
|
-
unit,
|
|
661
|
-
locale,
|
|
662
|
-
}, (res) => {
|
|
663
|
-
var _a, _b, _c, _d;
|
|
664
|
-
const arr = (_b = (_a = res.data) === null || _a === void 0 ? void 0 : _a.viewer) === null || _b === void 0 ? void 0 : _b.rewardBalanceDetails;
|
|
665
|
-
const fallback = (_c = res.data) === null || _c === void 0 ? void 0 : _c.fallback;
|
|
666
|
-
return ((_d = arr === null || arr === void 0 ? void 0 : arr[0]) === null || _d === void 0 ? void 0 : _d.prettyAvailableValue) || fallback;
|
|
667
|
-
});
|
|
668
|
-
};
|
|
669
|
-
const parseRewardValueFormat = {
|
|
670
|
-
prettyValue: "UNIT_FORMATTED",
|
|
671
|
-
value: "NUMBER_UNFORMATTED",
|
|
672
|
-
};
|
|
673
|
-
const rewardsBalanceQuery = (programId, locale, type, unit, format = "prettyValue", global = "") => {
|
|
674
|
-
var _a;
|
|
675
|
-
return debugQuery(dist.gql `
|
|
676
|
-
query (
|
|
677
|
-
$programId: ID
|
|
678
|
-
$type: RewardType!
|
|
679
|
-
$unit: String!
|
|
680
|
-
$format: RewardValueFormatType!
|
|
681
|
-
$locale: RSLocale
|
|
682
|
-
) {
|
|
683
|
-
fallback: formatRewardPrettyValue(
|
|
684
|
-
value: 0
|
|
685
|
-
unit: $unit
|
|
686
|
-
locale: $locale
|
|
687
|
-
formatType: $format
|
|
688
|
-
)
|
|
689
|
-
viewer: viewer {
|
|
690
|
-
... on User {
|
|
691
|
-
rewardBalanceDetails(
|
|
692
|
-
programId: $programId
|
|
693
|
-
filter: { type_eq: $type, unit_eq: $unit }
|
|
694
|
-
) {
|
|
695
|
-
... on CreditRewardBalance {
|
|
696
|
-
prettyAvailableValue(formatType: $format)
|
|
697
|
-
}
|
|
698
|
-
}
|
|
699
|
-
}
|
|
700
|
-
}
|
|
701
|
-
}
|
|
702
|
-
`, {
|
|
703
|
-
programId: !global && programId !== "classic" ? programId : null,
|
|
704
|
-
type,
|
|
705
|
-
unit,
|
|
706
|
-
format: (_a = parseRewardValueFormat[format]) !== null && _a !== void 0 ? _a : "UNIT_FORMATTED",
|
|
707
|
-
locale,
|
|
708
|
-
}, (res) => {
|
|
709
|
-
var _a, _b, _c, _d;
|
|
710
|
-
const arr = (_b = (_a = res.data) === null || _a === void 0 ? void 0 : _a.viewer) === null || _b === void 0 ? void 0 : _b.rewardBalanceDetails;
|
|
711
|
-
const fallback = (_c = res.data) === null || _c === void 0 ? void 0 : _c.fallback;
|
|
712
|
-
return ((_d = arr === null || arr === void 0 ? void 0 : arr[0]) === null || _d === void 0 ? void 0 : _d.prettyAvailableValue) || fallback;
|
|
713
|
-
});
|
|
714
|
-
};
|
|
715
|
-
// functions are of the form (programId: string, ...args: string) => string
|
|
716
|
-
const queries = {
|
|
717
|
-
rewardsAssigned: {
|
|
718
|
-
label: "Rewards Earned",
|
|
719
|
-
query: rewardsAssignedQuery,
|
|
720
|
-
},
|
|
721
|
-
rewardsRedeemed: {
|
|
722
|
-
label: "Rewards Paid",
|
|
723
|
-
query: rewardsRedeemedQuery,
|
|
724
|
-
},
|
|
725
|
-
rewardsAvailable: {
|
|
726
|
-
label: "Rewards Available",
|
|
727
|
-
query: rewardsAvailableQuery,
|
|
728
|
-
},
|
|
729
|
-
referralsCount: {
|
|
730
|
-
label: "Referrals - Count",
|
|
731
|
-
query: referralsCountQuery,
|
|
732
|
-
},
|
|
733
|
-
referralsMonth: {
|
|
734
|
-
label: "Referrals - This Month",
|
|
735
|
-
query: referralsMonthQuery,
|
|
736
|
-
},
|
|
737
|
-
referralsWeek: {
|
|
738
|
-
label: "Referrals - This Week",
|
|
739
|
-
query: referralsWeekQuery,
|
|
740
|
-
},
|
|
741
|
-
rewardsCount: {
|
|
742
|
-
label: "Rewards",
|
|
743
|
-
query: rewardsCountQuery,
|
|
744
|
-
},
|
|
745
|
-
rewardsCountFiltered: {
|
|
746
|
-
label: "Rewards",
|
|
747
|
-
query: rewardsCountFilteredQuery,
|
|
748
|
-
},
|
|
749
|
-
integrationRewardsCountFiltered: {
|
|
750
|
-
label: "Rewards",
|
|
751
|
-
query: integrationRewardsCountFilteredQuery,
|
|
752
|
-
},
|
|
753
|
-
rewardsMonth: {
|
|
754
|
-
label: "Rewards - This Month",
|
|
755
|
-
query: rewardsMonthQuery,
|
|
756
|
-
},
|
|
757
|
-
rewardsWeek: {
|
|
758
|
-
label: "Rewards - This Week",
|
|
759
|
-
query: rewardsWeekQuery,
|
|
760
|
-
},
|
|
761
|
-
rewardBalance: {
|
|
762
|
-
label: "Balance - Credit Earned",
|
|
763
|
-
query: rewardsBalanceQuery,
|
|
764
|
-
},
|
|
765
|
-
programGoals: {
|
|
766
|
-
label: "Program Goals",
|
|
767
|
-
query: programGoalsQuery,
|
|
768
|
-
},
|
|
769
|
-
};
|
|
770
|
-
// this should be exposed in documentation somehow
|
|
771
|
-
const StatPaths = [
|
|
772
|
-
{ name: "programGoals", route: "/(programGoals)/:metricType/:goalId" },
|
|
773
|
-
{ name: "referralsCount", route: "/(referralsCount)/:status?" },
|
|
774
|
-
{ name: "referralsMonth", route: "/(referralsMonth)" },
|
|
775
|
-
{ name: "referralsWeek", route: "/(referralsWeek)" },
|
|
776
|
-
{ name: "rewardsCount", route: "/(rewardsCount)/:global?" },
|
|
777
|
-
{ name: "rewardsMonth", route: "/(rewardsMonth)/:global?" },
|
|
778
|
-
{ name: "rewardsWeek", route: "/(rewardsWeek)/:global?" },
|
|
779
|
-
{
|
|
780
|
-
name: "rewardsCountFiltered",
|
|
781
|
-
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?",
|
|
782
|
-
},
|
|
783
|
-
{
|
|
784
|
-
name: "integrationRewardsCountFiltered",
|
|
785
|
-
route: "/(integrationRewardsCountFiltered)/:status([PENDING|CANCELLED|EXPIRED|REDEEMED|AVAILABLE]*)?/:global?",
|
|
786
|
-
},
|
|
787
|
-
{
|
|
788
|
-
name: "rewardsAssigned",
|
|
789
|
-
route: "/(rewardsAssigned)/:statType/:unit/:global?",
|
|
790
|
-
},
|
|
791
|
-
{
|
|
792
|
-
name: "rewardsRedeemed",
|
|
793
|
-
route: "/(rewardsRedeemed)/:statType/:unit/:global?",
|
|
794
|
-
},
|
|
795
|
-
{
|
|
796
|
-
name: "rewardsAvailable",
|
|
797
|
-
route: "/(rewardsAvailable)/:statType/:unit/:global?",
|
|
798
|
-
},
|
|
799
|
-
{
|
|
800
|
-
name: "rewardBalance",
|
|
801
|
-
route: "/(rewardBalance)/:statType/:unit/:format([prettyValue|value]*)?/:global?",
|
|
802
|
-
},
|
|
803
|
-
];
|
|
804
|
-
const StatPatterns = StatPaths.map((pattern) => pathToRegexp(pattern.route));
|
|
805
|
-
function useBigStat(props) {
|
|
806
|
-
const { statType, flexReverse, alignment } = props;
|
|
807
|
-
const programId = M();
|
|
808
|
-
const locale = R();
|
|
809
|
-
const userIdent = T();
|
|
810
|
-
const re = useMemo(() => StatPatterns.find((re) => re.exec(statType)), [statType]);
|
|
811
|
-
if (!(re === null || re === void 0 ? void 0 : re.exec(statType))) {
|
|
812
|
-
return {
|
|
813
|
-
props: { statvalue: "!!!", flexReverse, alignment },
|
|
814
|
-
label: "BAD PROP TYPE",
|
|
815
|
-
};
|
|
816
|
-
}
|
|
817
|
-
const result = re.exec(statType);
|
|
818
|
-
const queryName = result[1];
|
|
819
|
-
const statPath = StatPaths.find((pattern) => pattern.name === queryName);
|
|
820
|
-
// Get a list all possible keys in path
|
|
821
|
-
const keys = [];
|
|
822
|
-
const regex = pathToRegexp(statPath === null || statPath === void 0 ? void 0 : statPath.route, keys, {
|
|
823
|
-
strict: false,
|
|
824
|
-
sensitive: false,
|
|
825
|
-
end: true,
|
|
826
|
-
});
|
|
827
|
-
const allQueryArgs = regex.exec(statType);
|
|
828
|
-
// Retrieve all key values in order including undefined
|
|
829
|
-
const queryArgs = keys.map((_, i) => allQueryArgs[i + 1] ? decodeURIComponent(allQueryArgs[i + 1]) : undefined);
|
|
830
|
-
// remove query name from list
|
|
831
|
-
queryArgs.shift();
|
|
832
|
-
const label = queries[queryName].label;
|
|
833
|
-
const stat = (userIdent === null || userIdent === void 0 ? void 0 : userIdent.jwt) && queries[queryName].query(programId, locale, ...queryArgs);
|
|
834
|
-
debug("stat:", stat);
|
|
835
|
-
return {
|
|
836
|
-
props: { statvalue: stat !== null && stat !== void 0 ? stat : LOADING, flexReverse, alignment },
|
|
837
|
-
label,
|
|
838
|
-
};
|
|
336
|
+
const debug = browser("sq:useBigStat");
|
|
337
|
+
const LOADING = "...";
|
|
338
|
+
const debugQuery = (query, variables, getStat) => {
|
|
339
|
+
const res = en(query, variables);
|
|
340
|
+
if (!(res === null || res === void 0 ? void 0 : res.data) && !res.loading) {
|
|
341
|
+
console.error("issue getting stat:", res);
|
|
342
|
+
}
|
|
343
|
+
const stat = getStat(res);
|
|
344
|
+
return stat;
|
|
345
|
+
};
|
|
346
|
+
const referralsCountQuery = (programId,
|
|
347
|
+
// locale
|
|
348
|
+
_, status) => {
|
|
349
|
+
const programFilter = programId === "classic"
|
|
350
|
+
? { programId_exists: false }
|
|
351
|
+
: { programId_eq: programId };
|
|
352
|
+
const convertedFilter = status && status == "converted"
|
|
353
|
+
? { dateConverted_exists: true }
|
|
354
|
+
: status && status == "started"
|
|
355
|
+
? { dateConverted_exists: false }
|
|
356
|
+
: {};
|
|
357
|
+
const queryFilter = { ...programFilter, ...convertedFilter };
|
|
358
|
+
return debugQuery(dist.gql `
|
|
359
|
+
query ($queryFilter: ReferralFilterInput) {
|
|
360
|
+
viewer {
|
|
361
|
+
... on User {
|
|
362
|
+
referrals(filter: $queryFilter) {
|
|
363
|
+
totalCount
|
|
364
|
+
}
|
|
365
|
+
}
|
|
366
|
+
}
|
|
367
|
+
}
|
|
368
|
+
`, { queryFilter }, (res) => { var _a, _b, _c, _d; return (_d = (_c = (_b = (_a = res.data) === null || _a === void 0 ? void 0 : _a.viewer) === null || _b === void 0 ? void 0 : _b.referrals) === null || _c === void 0 ? void 0 : _c.totalCount) === null || _d === void 0 ? void 0 : _d.toString(); });
|
|
369
|
+
};
|
|
370
|
+
const programGoalsQuery = (programId, locale, metricType, goalId) => {
|
|
371
|
+
// Confirm this behaviour
|
|
372
|
+
if (programId === "classic")
|
|
373
|
+
return null;
|
|
374
|
+
return debugQuery(dist.gql `
|
|
375
|
+
query {
|
|
376
|
+
viewer {
|
|
377
|
+
... on User {
|
|
378
|
+
programGoals {
|
|
379
|
+
goalId
|
|
380
|
+
programId
|
|
381
|
+
count
|
|
382
|
+
conversionCount
|
|
383
|
+
}
|
|
384
|
+
}
|
|
385
|
+
}
|
|
386
|
+
}
|
|
387
|
+
`, { programId, metricType, goalId, locale }, (res) => {
|
|
388
|
+
var _a, _b, _c, _d, _e;
|
|
389
|
+
const goal = (_c = (_b = (_a = res.data) === null || _a === void 0 ? void 0 : _a.viewer) === null || _b === void 0 ? void 0 : _b.programGoals) === null || _c === void 0 ? void 0 : _c.filter((goal) => goal.goalId === goalId && goal.programId === programId);
|
|
390
|
+
return ((_e = (_d = goal === null || goal === void 0 ? void 0 : goal[0]) === null || _d === void 0 ? void 0 : _d[metricType]) === null || _e === void 0 ? void 0 : _e.toString()) || 0;
|
|
391
|
+
});
|
|
392
|
+
};
|
|
393
|
+
const referralsMonthQuery = (programId) => {
|
|
394
|
+
const programFilter = programId === "classic"
|
|
395
|
+
? { programId_exists: false }
|
|
396
|
+
: { programId_eq: programId };
|
|
397
|
+
const filter = {
|
|
398
|
+
...programFilter,
|
|
399
|
+
dateReferralStarted_timeframe: "this_month",
|
|
400
|
+
};
|
|
401
|
+
return debugQuery(dist.gql `
|
|
402
|
+
query ($filter: ReferralFilterInput) {
|
|
403
|
+
viewer {
|
|
404
|
+
... on User {
|
|
405
|
+
referrals(filter: $filter) {
|
|
406
|
+
totalCount
|
|
407
|
+
}
|
|
408
|
+
}
|
|
409
|
+
}
|
|
410
|
+
}
|
|
411
|
+
`, { filter }, (res) => { var _a, _b, _c, _d; return (_d = (_c = (_b = (_a = res.data) === null || _a === void 0 ? void 0 : _a.viewer) === null || _b === void 0 ? void 0 : _b.referrals) === null || _c === void 0 ? void 0 : _c.totalCount) === null || _d === void 0 ? void 0 : _d.toString(); });
|
|
412
|
+
};
|
|
413
|
+
const referralsWeekQuery = (programId) => {
|
|
414
|
+
const programFilter = programId === "classic"
|
|
415
|
+
? { programId_exists: false }
|
|
416
|
+
: { programId_eq: programId };
|
|
417
|
+
const filter = {
|
|
418
|
+
...programFilter,
|
|
419
|
+
dateReferralStarted_timeframe: "this_month",
|
|
420
|
+
};
|
|
421
|
+
return debugQuery(dist.gql `
|
|
422
|
+
query ($filter: ReferralFilterInput) {
|
|
423
|
+
viewer {
|
|
424
|
+
... on User {
|
|
425
|
+
referrals(filter: $filter) {
|
|
426
|
+
totalCount
|
|
427
|
+
}
|
|
428
|
+
}
|
|
429
|
+
}
|
|
430
|
+
}
|
|
431
|
+
`, { filter }, (res) => { var _a, _b, _c, _d; return (_d = (_c = (_b = (_a = res.data) === null || _a === void 0 ? void 0 : _a.viewer) === null || _b === void 0 ? void 0 : _b.referrals) === null || _c === void 0 ? void 0 : _c.totalCount) === null || _d === void 0 ? void 0 : _d.toString(); });
|
|
432
|
+
};
|
|
433
|
+
const rewardsCountQuery = (programId,
|
|
434
|
+
// locale
|
|
435
|
+
_, global = "") => {
|
|
436
|
+
return debugQuery(dist.gql `
|
|
437
|
+
query ($programId: ID) {
|
|
438
|
+
viewer {
|
|
439
|
+
... on User {
|
|
440
|
+
rewards(filter: { programId_eq: $programId }) {
|
|
441
|
+
totalCount
|
|
442
|
+
}
|
|
443
|
+
}
|
|
444
|
+
}
|
|
445
|
+
}
|
|
446
|
+
`, {
|
|
447
|
+
programId: !global && programId !== "classic" ? programId : null,
|
|
448
|
+
}, (res) => { var _a, _b, _c, _d; return (_d = (_c = (_b = (_a = res.data) === null || _a === void 0 ? void 0 : _a.viewer) === null || _b === void 0 ? void 0 : _b.rewards) === null || _c === void 0 ? void 0 : _c.totalCount) === null || _d === void 0 ? void 0 : _d.toString(); });
|
|
449
|
+
};
|
|
450
|
+
const rewardsCountFilteredQuery = (programId,
|
|
451
|
+
// locale
|
|
452
|
+
_, type, unit, status, global = "") => {
|
|
453
|
+
const statusFilter = status ? { status } : null;
|
|
454
|
+
return debugQuery(dist.gql `
|
|
455
|
+
query (
|
|
456
|
+
$programId: ID
|
|
457
|
+
$unit: String
|
|
458
|
+
$type: RewardType
|
|
459
|
+
$statusFilter: RewardStatusFilterInput
|
|
460
|
+
) {
|
|
461
|
+
viewer {
|
|
462
|
+
... on User {
|
|
463
|
+
rewards(
|
|
464
|
+
filter: {
|
|
465
|
+
programId_eq: $programId
|
|
466
|
+
type_eq: $type
|
|
467
|
+
unit_eq: $unit
|
|
468
|
+
statuses_eq: $statusFilter
|
|
469
|
+
}
|
|
470
|
+
) {
|
|
471
|
+
totalCount
|
|
472
|
+
}
|
|
473
|
+
}
|
|
474
|
+
}
|
|
475
|
+
}
|
|
476
|
+
`, {
|
|
477
|
+
programId: !global && programId !== "classic" ? programId : null,
|
|
478
|
+
unit,
|
|
479
|
+
type,
|
|
480
|
+
statusFilter,
|
|
481
|
+
}, (res) => { var _a, _b, _c, _d; return (_d = (_c = (_b = (_a = res.data) === null || _a === void 0 ? void 0 : _a.viewer) === null || _b === void 0 ? void 0 : _b.rewards) === null || _c === void 0 ? void 0 : _c.totalCount) === null || _d === void 0 ? void 0 : _d.toString(); });
|
|
482
|
+
};
|
|
483
|
+
const integrationRewardsCountFilteredQuery = (programId,
|
|
484
|
+
// locale
|
|
485
|
+
_, status, global = "") => {
|
|
486
|
+
const statusFilter = status ? { status } : null;
|
|
487
|
+
return debugQuery(dist.gql `
|
|
488
|
+
query ($programId: ID, $statusFilter: RewardStatusFilterInput) {
|
|
489
|
+
viewer {
|
|
490
|
+
... on User {
|
|
491
|
+
rewards(
|
|
492
|
+
filter: {
|
|
493
|
+
programId_eq: $programId
|
|
494
|
+
type_eq: INTEGRATION
|
|
495
|
+
statuses_eq: $statusFilter
|
|
496
|
+
}
|
|
497
|
+
) {
|
|
498
|
+
totalCount
|
|
499
|
+
}
|
|
500
|
+
}
|
|
501
|
+
}
|
|
502
|
+
}
|
|
503
|
+
`, {
|
|
504
|
+
programId: !global && programId !== "classic" ? programId : null,
|
|
505
|
+
statusFilter,
|
|
506
|
+
}, (res) => { var _a, _b, _c, _d; return (_d = (_c = (_b = (_a = res.data) === null || _a === void 0 ? void 0 : _a.viewer) === null || _b === void 0 ? void 0 : _b.rewards) === null || _c === void 0 ? void 0 : _c.totalCount) === null || _d === void 0 ? void 0 : _d.toString(); });
|
|
507
|
+
};
|
|
508
|
+
const rewardsMonthQuery = (programId,
|
|
509
|
+
// locale
|
|
510
|
+
_, global = "") => {
|
|
511
|
+
return debugQuery(dist.gql `
|
|
512
|
+
query ($programId: ID) {
|
|
513
|
+
viewer {
|
|
514
|
+
... on User {
|
|
515
|
+
rewards(
|
|
516
|
+
filter: {
|
|
517
|
+
programId_eq: $programId
|
|
518
|
+
dateGiven_timeframe: "this_month"
|
|
519
|
+
}
|
|
520
|
+
) {
|
|
521
|
+
totalCount
|
|
522
|
+
}
|
|
523
|
+
}
|
|
524
|
+
}
|
|
525
|
+
}
|
|
526
|
+
`, {
|
|
527
|
+
programId: !global && programId !== "classic" ? programId : null,
|
|
528
|
+
}, (res) => { var _a, _b, _c, _d; return (_d = (_c = (_b = (_a = res.data) === null || _a === void 0 ? void 0 : _a.viewer) === null || _b === void 0 ? void 0 : _b.rewards) === null || _c === void 0 ? void 0 : _c.totalCount) === null || _d === void 0 ? void 0 : _d.toString(); });
|
|
529
|
+
};
|
|
530
|
+
const rewardsWeekQuery = (programId,
|
|
531
|
+
// locale
|
|
532
|
+
_, global = "") => {
|
|
533
|
+
return debugQuery(dist.gql `
|
|
534
|
+
query ($programId: ID) {
|
|
535
|
+
viewer {
|
|
536
|
+
... on User {
|
|
537
|
+
rewards(
|
|
538
|
+
filter: {
|
|
539
|
+
programId_eq: $programId
|
|
540
|
+
dateGiven_timeframe: "this_week"
|
|
541
|
+
}
|
|
542
|
+
) {
|
|
543
|
+
totalCount
|
|
544
|
+
}
|
|
545
|
+
}
|
|
546
|
+
}
|
|
547
|
+
}
|
|
548
|
+
`, {
|
|
549
|
+
programId: !global && programId !== "classic" ? programId : null,
|
|
550
|
+
}, (res) => { var _a, _b, _c, _d; return (_d = (_c = (_b = (_a = res.data) === null || _a === void 0 ? void 0 : _a.viewer) === null || _b === void 0 ? void 0 : _b.rewards) === null || _c === void 0 ? void 0 : _c.totalCount) === null || _d === void 0 ? void 0 : _d.toString(); });
|
|
551
|
+
};
|
|
552
|
+
const rewardsRedeemedQuery = (programId, locale, type, unit, global = "") => {
|
|
553
|
+
return debugQuery(dist.gql `
|
|
554
|
+
query (
|
|
555
|
+
$programId: ID
|
|
556
|
+
$type: RewardType
|
|
557
|
+
$unit: String!
|
|
558
|
+
$locale: RSLocale
|
|
559
|
+
) {
|
|
560
|
+
fallback: formatRewardPrettyValue(
|
|
561
|
+
value: 0
|
|
562
|
+
unit: $unit
|
|
563
|
+
locale: $locale
|
|
564
|
+
formatType: UNIT_FORMATTED
|
|
565
|
+
)
|
|
566
|
+
viewer: viewer {
|
|
567
|
+
... on User {
|
|
568
|
+
rewardBalanceDetails(
|
|
569
|
+
programId: $programId
|
|
570
|
+
filter: { type_eq: $type, unit_eq: $unit }
|
|
571
|
+
) {
|
|
572
|
+
... on CreditRewardBalance {
|
|
573
|
+
prettyRedeemedCredit
|
|
574
|
+
}
|
|
575
|
+
}
|
|
576
|
+
}
|
|
577
|
+
}
|
|
578
|
+
}
|
|
579
|
+
`, {
|
|
580
|
+
programId: !global && programId !== "classic" ? programId : null,
|
|
581
|
+
type,
|
|
582
|
+
unit,
|
|
583
|
+
locale,
|
|
584
|
+
}, (res) => {
|
|
585
|
+
var _a, _b, _c, _d;
|
|
586
|
+
const arr = (_b = (_a = res.data) === null || _a === void 0 ? void 0 : _a.viewer) === null || _b === void 0 ? void 0 : _b.rewardBalanceDetails;
|
|
587
|
+
const fallback = (_c = res.data) === null || _c === void 0 ? void 0 : _c.fallback;
|
|
588
|
+
return ((_d = arr === null || arr === void 0 ? void 0 : arr[0]) === null || _d === void 0 ? void 0 : _d.prettyRedeemedCredit) || fallback;
|
|
589
|
+
});
|
|
590
|
+
};
|
|
591
|
+
const rewardsAssignedQuery = (programId, locale, type, unit, global = "") => {
|
|
592
|
+
return debugQuery(dist.gql `
|
|
593
|
+
query (
|
|
594
|
+
$programId: ID
|
|
595
|
+
$type: RewardType
|
|
596
|
+
$unit: String!
|
|
597
|
+
$locale: RSLocale
|
|
598
|
+
) {
|
|
599
|
+
fallback: formatRewardPrettyValue(
|
|
600
|
+
value: 0
|
|
601
|
+
unit: $unit
|
|
602
|
+
locale: $locale
|
|
603
|
+
formatType: UNIT_FORMATTED
|
|
604
|
+
)
|
|
605
|
+
viewer: viewer {
|
|
606
|
+
... on User {
|
|
607
|
+
rewardBalanceDetails(
|
|
608
|
+
programId: $programId
|
|
609
|
+
filter: { type_eq: $type, unit_eq: $unit }
|
|
610
|
+
) {
|
|
611
|
+
... on CreditRewardBalance {
|
|
612
|
+
prettyAssignedCredit
|
|
613
|
+
}
|
|
614
|
+
}
|
|
615
|
+
}
|
|
616
|
+
}
|
|
617
|
+
}
|
|
618
|
+
`, {
|
|
619
|
+
programId: !global && programId !== "classic" ? programId : null,
|
|
620
|
+
type,
|
|
621
|
+
unit,
|
|
622
|
+
locale,
|
|
623
|
+
}, (res) => {
|
|
624
|
+
var _a, _b, _c, _d;
|
|
625
|
+
const arr = (_b = (_a = res.data) === null || _a === void 0 ? void 0 : _a.viewer) === null || _b === void 0 ? void 0 : _b.rewardBalanceDetails;
|
|
626
|
+
const fallback = (_c = res.data) === null || _c === void 0 ? void 0 : _c.fallback;
|
|
627
|
+
return ((_d = arr === null || arr === void 0 ? void 0 : arr[0]) === null || _d === void 0 ? void 0 : _d.prettyAssignedCredit) || fallback;
|
|
628
|
+
});
|
|
629
|
+
};
|
|
630
|
+
const rewardsAvailableQuery = (programId, locale, type, unit, global = "") => {
|
|
631
|
+
return debugQuery(dist.gql `
|
|
632
|
+
query (
|
|
633
|
+
$programId: ID
|
|
634
|
+
$type: RewardType
|
|
635
|
+
$unit: String!
|
|
636
|
+
$locale: RSLocale
|
|
637
|
+
) {
|
|
638
|
+
fallback: formatRewardPrettyValue(
|
|
639
|
+
value: 0
|
|
640
|
+
unit: $unit
|
|
641
|
+
locale: $locale
|
|
642
|
+
formatType: UNIT_FORMATTED
|
|
643
|
+
)
|
|
644
|
+
viewer: viewer {
|
|
645
|
+
... on User {
|
|
646
|
+
rewardBalanceDetails(
|
|
647
|
+
programId: $programId
|
|
648
|
+
filter: { type_eq: $type, unit_eq: $unit }
|
|
649
|
+
) {
|
|
650
|
+
... on CreditRewardBalance {
|
|
651
|
+
prettyAvailableValue
|
|
652
|
+
}
|
|
653
|
+
}
|
|
654
|
+
}
|
|
655
|
+
}
|
|
656
|
+
}
|
|
657
|
+
`, {
|
|
658
|
+
programId: !global && programId !== "classic" ? programId : null,
|
|
659
|
+
type,
|
|
660
|
+
unit,
|
|
661
|
+
locale,
|
|
662
|
+
}, (res) => {
|
|
663
|
+
var _a, _b, _c, _d;
|
|
664
|
+
const arr = (_b = (_a = res.data) === null || _a === void 0 ? void 0 : _a.viewer) === null || _b === void 0 ? void 0 : _b.rewardBalanceDetails;
|
|
665
|
+
const fallback = (_c = res.data) === null || _c === void 0 ? void 0 : _c.fallback;
|
|
666
|
+
return ((_d = arr === null || arr === void 0 ? void 0 : arr[0]) === null || _d === void 0 ? void 0 : _d.prettyAvailableValue) || fallback;
|
|
667
|
+
});
|
|
668
|
+
};
|
|
669
|
+
const parseRewardValueFormat = {
|
|
670
|
+
prettyValue: "UNIT_FORMATTED",
|
|
671
|
+
value: "NUMBER_UNFORMATTED",
|
|
672
|
+
};
|
|
673
|
+
const rewardsBalanceQuery = (programId, locale, type, unit, format = "prettyValue", global = "") => {
|
|
674
|
+
var _a;
|
|
675
|
+
return debugQuery(dist.gql `
|
|
676
|
+
query (
|
|
677
|
+
$programId: ID
|
|
678
|
+
$type: RewardType!
|
|
679
|
+
$unit: String!
|
|
680
|
+
$format: RewardValueFormatType!
|
|
681
|
+
$locale: RSLocale
|
|
682
|
+
) {
|
|
683
|
+
fallback: formatRewardPrettyValue(
|
|
684
|
+
value: 0
|
|
685
|
+
unit: $unit
|
|
686
|
+
locale: $locale
|
|
687
|
+
formatType: $format
|
|
688
|
+
)
|
|
689
|
+
viewer: viewer {
|
|
690
|
+
... on User {
|
|
691
|
+
rewardBalanceDetails(
|
|
692
|
+
programId: $programId
|
|
693
|
+
filter: { type_eq: $type, unit_eq: $unit }
|
|
694
|
+
) {
|
|
695
|
+
... on CreditRewardBalance {
|
|
696
|
+
prettyAvailableValue(formatType: $format)
|
|
697
|
+
}
|
|
698
|
+
}
|
|
699
|
+
}
|
|
700
|
+
}
|
|
701
|
+
}
|
|
702
|
+
`, {
|
|
703
|
+
programId: !global && programId !== "classic" ? programId : null,
|
|
704
|
+
type,
|
|
705
|
+
unit,
|
|
706
|
+
format: (_a = parseRewardValueFormat[format]) !== null && _a !== void 0 ? _a : "UNIT_FORMATTED",
|
|
707
|
+
locale,
|
|
708
|
+
}, (res) => {
|
|
709
|
+
var _a, _b, _c, _d;
|
|
710
|
+
const arr = (_b = (_a = res.data) === null || _a === void 0 ? void 0 : _a.viewer) === null || _b === void 0 ? void 0 : _b.rewardBalanceDetails;
|
|
711
|
+
const fallback = (_c = res.data) === null || _c === void 0 ? void 0 : _c.fallback;
|
|
712
|
+
return ((_d = arr === null || arr === void 0 ? void 0 : arr[0]) === null || _d === void 0 ? void 0 : _d.prettyAvailableValue) || fallback;
|
|
713
|
+
});
|
|
714
|
+
};
|
|
715
|
+
// functions are of the form (programId: string, ...args: string) => string
|
|
716
|
+
const queries = {
|
|
717
|
+
rewardsAssigned: {
|
|
718
|
+
label: "Rewards Earned",
|
|
719
|
+
query: rewardsAssignedQuery,
|
|
720
|
+
},
|
|
721
|
+
rewardsRedeemed: {
|
|
722
|
+
label: "Rewards Paid",
|
|
723
|
+
query: rewardsRedeemedQuery,
|
|
724
|
+
},
|
|
725
|
+
rewardsAvailable: {
|
|
726
|
+
label: "Rewards Available",
|
|
727
|
+
query: rewardsAvailableQuery,
|
|
728
|
+
},
|
|
729
|
+
referralsCount: {
|
|
730
|
+
label: "Referrals - Count",
|
|
731
|
+
query: referralsCountQuery,
|
|
732
|
+
},
|
|
733
|
+
referralsMonth: {
|
|
734
|
+
label: "Referrals - This Month",
|
|
735
|
+
query: referralsMonthQuery,
|
|
736
|
+
},
|
|
737
|
+
referralsWeek: {
|
|
738
|
+
label: "Referrals - This Week",
|
|
739
|
+
query: referralsWeekQuery,
|
|
740
|
+
},
|
|
741
|
+
rewardsCount: {
|
|
742
|
+
label: "Rewards",
|
|
743
|
+
query: rewardsCountQuery,
|
|
744
|
+
},
|
|
745
|
+
rewardsCountFiltered: {
|
|
746
|
+
label: "Rewards",
|
|
747
|
+
query: rewardsCountFilteredQuery,
|
|
748
|
+
},
|
|
749
|
+
integrationRewardsCountFiltered: {
|
|
750
|
+
label: "Rewards",
|
|
751
|
+
query: integrationRewardsCountFilteredQuery,
|
|
752
|
+
},
|
|
753
|
+
rewardsMonth: {
|
|
754
|
+
label: "Rewards - This Month",
|
|
755
|
+
query: rewardsMonthQuery,
|
|
756
|
+
},
|
|
757
|
+
rewardsWeek: {
|
|
758
|
+
label: "Rewards - This Week",
|
|
759
|
+
query: rewardsWeekQuery,
|
|
760
|
+
},
|
|
761
|
+
rewardBalance: {
|
|
762
|
+
label: "Balance - Credit Earned",
|
|
763
|
+
query: rewardsBalanceQuery,
|
|
764
|
+
},
|
|
765
|
+
programGoals: {
|
|
766
|
+
label: "Program Goals",
|
|
767
|
+
query: programGoalsQuery,
|
|
768
|
+
},
|
|
769
|
+
};
|
|
770
|
+
// this should be exposed in documentation somehow
|
|
771
|
+
const StatPaths = [
|
|
772
|
+
{ name: "programGoals", route: "/(programGoals)/:metricType/:goalId" },
|
|
773
|
+
{ name: "referralsCount", route: "/(referralsCount)/:status?" },
|
|
774
|
+
{ name: "referralsMonth", route: "/(referralsMonth)" },
|
|
775
|
+
{ name: "referralsWeek", route: "/(referralsWeek)" },
|
|
776
|
+
{ name: "rewardsCount", route: "/(rewardsCount)/:global?" },
|
|
777
|
+
{ name: "rewardsMonth", route: "/(rewardsMonth)/:global?" },
|
|
778
|
+
{ name: "rewardsWeek", route: "/(rewardsWeek)/:global?" },
|
|
779
|
+
{
|
|
780
|
+
name: "rewardsCountFiltered",
|
|
781
|
+
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?",
|
|
782
|
+
},
|
|
783
|
+
{
|
|
784
|
+
name: "integrationRewardsCountFiltered",
|
|
785
|
+
route: "/(integrationRewardsCountFiltered)/:status([PENDING|CANCELLED|EXPIRED|REDEEMED|AVAILABLE]*)?/:global?",
|
|
786
|
+
},
|
|
787
|
+
{
|
|
788
|
+
name: "rewardsAssigned",
|
|
789
|
+
route: "/(rewardsAssigned)/:statType/:unit/:global?",
|
|
790
|
+
},
|
|
791
|
+
{
|
|
792
|
+
name: "rewardsRedeemed",
|
|
793
|
+
route: "/(rewardsRedeemed)/:statType/:unit/:global?",
|
|
794
|
+
},
|
|
795
|
+
{
|
|
796
|
+
name: "rewardsAvailable",
|
|
797
|
+
route: "/(rewardsAvailable)/:statType/:unit/:global?",
|
|
798
|
+
},
|
|
799
|
+
{
|
|
800
|
+
name: "rewardBalance",
|
|
801
|
+
route: "/(rewardBalance)/:statType/:unit/:format([prettyValue|value]*)?/:global?",
|
|
802
|
+
},
|
|
803
|
+
];
|
|
804
|
+
const StatPatterns = StatPaths.map((pattern) => pathToRegexp(pattern.route));
|
|
805
|
+
function useBigStat(props) {
|
|
806
|
+
const { statType, flexReverse, alignment } = props;
|
|
807
|
+
const programId = M();
|
|
808
|
+
const locale = R();
|
|
809
|
+
const userIdent = T();
|
|
810
|
+
const re = useMemo(() => StatPatterns.find((re) => re.exec(statType)), [statType]);
|
|
811
|
+
if (!(re === null || re === void 0 ? void 0 : re.exec(statType))) {
|
|
812
|
+
return {
|
|
813
|
+
props: { statvalue: "!!!", flexReverse, alignment },
|
|
814
|
+
label: "BAD PROP TYPE",
|
|
815
|
+
};
|
|
816
|
+
}
|
|
817
|
+
const result = re.exec(statType);
|
|
818
|
+
const queryName = result[1];
|
|
819
|
+
const statPath = StatPaths.find((pattern) => pattern.name === queryName);
|
|
820
|
+
// Get a list all possible keys in path
|
|
821
|
+
const keys = [];
|
|
822
|
+
const regex = pathToRegexp(statPath === null || statPath === void 0 ? void 0 : statPath.route, keys, {
|
|
823
|
+
strict: false,
|
|
824
|
+
sensitive: false,
|
|
825
|
+
end: true,
|
|
826
|
+
});
|
|
827
|
+
const allQueryArgs = regex.exec(statType);
|
|
828
|
+
// Retrieve all key values in order including undefined
|
|
829
|
+
const queryArgs = keys.map((_, i) => allQueryArgs[i + 1] ? decodeURIComponent(allQueryArgs[i + 1]) : undefined);
|
|
830
|
+
// remove query name from list
|
|
831
|
+
queryArgs.shift();
|
|
832
|
+
const label = queries[queryName].label;
|
|
833
|
+
const stat = (userIdent === null || userIdent === void 0 ? void 0 : userIdent.jwt) && queries[queryName].query(programId, locale, ...queryArgs);
|
|
834
|
+
debug("stat:", stat);
|
|
835
|
+
return {
|
|
836
|
+
props: { statvalue: stat !== null && stat !== void 0 ? stat : LOADING, flexReverse, alignment },
|
|
837
|
+
label,
|
|
838
|
+
};
|
|
839
839
|
}
|
|
840
840
|
|
|
841
|
-
function useDemoBigStat(props) {
|
|
842
|
-
const { statType } = props;
|
|
843
|
-
const re = useMemo(() => StatPatterns.find((re) => re.exec(statType)), [statType]);
|
|
844
|
-
if (!(re === null || re === void 0 ? void 0 : re.exec(statType))) {
|
|
845
|
-
return {
|
|
846
|
-
props: {
|
|
847
|
-
statvalue: "!!!",
|
|
848
|
-
flexReverse: false,
|
|
849
|
-
alignment: "center",
|
|
850
|
-
},
|
|
851
|
-
label: "BAD PROP TYPE",
|
|
852
|
-
};
|
|
853
|
-
}
|
|
854
|
-
const result = re.exec(statType);
|
|
855
|
-
const queryName = result[1];
|
|
856
|
-
const label = queries[queryName].label;
|
|
857
|
-
return {
|
|
858
|
-
props: cjs({
|
|
859
|
-
statvalue: "12345",
|
|
860
|
-
flexReverse: false,
|
|
861
|
-
alignment: "center",
|
|
862
|
-
}, props.demoData || {}, { arrayMerge: (_, a) => a }),
|
|
863
|
-
label: label !== null && label !== void 0 ? label : "Demo Label",
|
|
864
|
-
};
|
|
841
|
+
function useDemoBigStat(props) {
|
|
842
|
+
const { statType } = props;
|
|
843
|
+
const re = useMemo(() => StatPatterns.find((re) => re.exec(statType)), [statType]);
|
|
844
|
+
if (!(re === null || re === void 0 ? void 0 : re.exec(statType))) {
|
|
845
|
+
return {
|
|
846
|
+
props: {
|
|
847
|
+
statvalue: "!!!",
|
|
848
|
+
flexReverse: false,
|
|
849
|
+
alignment: "center",
|
|
850
|
+
},
|
|
851
|
+
label: "BAD PROP TYPE",
|
|
852
|
+
};
|
|
853
|
+
}
|
|
854
|
+
const result = re.exec(statType);
|
|
855
|
+
const queryName = result[1];
|
|
856
|
+
const label = queries[queryName].label;
|
|
857
|
+
return {
|
|
858
|
+
props: cjs({
|
|
859
|
+
statvalue: "12345",
|
|
860
|
+
flexReverse: false,
|
|
861
|
+
alignment: "center",
|
|
862
|
+
}, props.demoData || {}, { arrayMerge: (_, a) => a }),
|
|
863
|
+
label: label !== null && label !== void 0 ? label : "Demo Label",
|
|
864
|
+
};
|
|
865
865
|
}
|
|
866
866
|
|
|
867
867
|
export { BigStatView as B, useDemoBigStat as a, pathToRegexp as p, useBigStat as u };
|