@saasquatch/mint-components 1.11.1-8 → 1.11.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{GenericTableView-a3f48e15.js → GenericTableView-bb2fcd95.js} +1 -1
- package/dist/cjs/{ShadowViewAddon-d2b1e28a.js → ShadowViewAddon-a7926766.js} +29 -21
- package/dist/cjs/{copy-text-view-94e76d0a.js → copy-text-view-b70b5e73.js} +52 -40
- package/dist/cjs/{email-registration-view-4c5d9379.js → email-registration-view-54cedb43.js} +1 -1
- package/dist/cjs/{global-02e50f09.js → global-e067aa06.js} +2 -2
- package/dist/cjs/{index-b0129cd6.js → index-ff72278c.js} +2 -0
- package/dist/cjs/{index.module-df530553.js → index.module-224d7b8d.js} +1 -1
- package/dist/cjs/loader.cjs.js +5 -5
- package/dist/cjs/{luxon-05098e19.js → luxon-45228ff5.js} +1 -1
- package/dist/cjs/mint-components.cjs.js +5 -5
- package/dist/cjs/{mockRewardData-4258e067.js → mockRewardData-d6be2267.js} +1 -1
- package/dist/cjs/raisins-plop-target.cjs.entry.js +1 -1
- package/dist/cjs/{re-render-1976e05e.js → re-render-cd2f8774.js} +2 -2
- package/dist/cjs/{sqm-asset-card-view-a0e33f21.js → sqm-asset-card-view-30ca5188.js} +1 -1
- package/dist/cjs/sqm-asset-card.cjs.entry.js +5 -5
- package/dist/cjs/sqm-banking-info-form_16.cjs.entry.js +11 -11
- package/dist/cjs/sqm-big-stat_38.cjs.entry.js +14 -14
- package/dist/cjs/{sqm-close-button-view-217239b7.js → sqm-close-button-view-6a709e00.js} +1 -1
- package/dist/cjs/sqm-close-button.cjs.entry.js +4 -4
- package/dist/cjs/sqm-context-router.cjs.entry.js +3 -3
- package/dist/cjs/sqm-empty_4.cjs.entry.js +10 -6
- package/dist/cjs/sqm-form-message.cjs.entry.js +2 -2
- package/dist/cjs/sqm-graphql-client-provider.cjs.entry.js +3 -3
- package/dist/cjs/sqm-header-logo.cjs.entry.js +2 -2
- package/dist/cjs/sqm-instant-access-registration.cjs.entry.js +7 -7
- package/dist/cjs/{sqm-invoice-table-view-e3b03a00.js → sqm-invoice-table-view-2f4f426b.js} +2 -2
- package/dist/cjs/{sqm-leaderboard-rank-view-5a3d4a88.js → sqm-leaderboard-rank-view-317eb84f.js} +1 -1
- package/dist/cjs/sqm-leaderboard-rank.cjs.entry.js +5 -5
- package/dist/cjs/{sqm-logout-current-user-view-c9f18d96.js → sqm-logout-current-user-view-1912b773.js} +1 -1
- package/dist/cjs/sqm-logout-current-user.cjs.entry.js +5 -5
- package/dist/cjs/{sqm-navigation-sidebar-item-view-4e90b6f5.js → sqm-navigation-sidebar-item-view-010a81c7.js} +2 -2
- package/dist/cjs/sqm-navigation-sidebar-item.cjs.entry.js +5 -5
- package/dist/cjs/{sqm-navigation-sidebar-view-921704fb.js → sqm-navigation-sidebar-view-215eba1d.js} +1 -1
- package/dist/cjs/sqm-navigation-sidebar.cjs.entry.js +4 -4
- package/dist/cjs/sqm-pagination_3.cjs.entry.js +110 -45
- package/dist/cjs/sqm-password-field.cjs.entry.js +5 -5
- package/dist/cjs/sqm-popup-container.cjs.entry.js +3 -3
- package/dist/cjs/{sqm-portal-container-view-990a85a3.js → sqm-portal-container-view-976bf0f5.js} +1 -1
- package/dist/cjs/{sqm-portal-email-verification-view-bff9783d.js → sqm-portal-email-verification-view-f8980d11.js} +3 -3
- package/dist/cjs/sqm-portal-email-verification.cjs.entry.js +7 -7
- package/dist/cjs/{sqm-portal-forgot-password-view-3cd69fe7.js → sqm-portal-forgot-password-view-24339191.js} +2 -2
- package/dist/cjs/sqm-portal-forgot-password.cjs.entry.js +6 -6
- package/dist/cjs/sqm-portal-logout.cjs.entry.js +3 -3
- package/dist/cjs/{sqm-portal-profile-view-fde54e35.js → sqm-portal-profile-view-7c70d7f9.js} +3 -3
- package/dist/cjs/sqm-portal-profile.cjs.entry.js +8 -8
- package/dist/cjs/sqm-portal-protected-route.cjs.entry.js +3 -3
- package/dist/cjs/sqm-portal-registration-form.cjs.entry.js +6 -6
- package/dist/cjs/{sqm-portal-reset-password-view-34771d2c.js → sqm-portal-reset-password-view-1b85b8cf.js} +2 -2
- package/dist/cjs/sqm-portal-reset-password.cjs.entry.js +6 -6
- package/dist/cjs/{sqm-portal-verify-email-view-c8f91506.js → sqm-portal-verify-email-view-cc3c87c3.js} +2 -2
- package/dist/cjs/sqm-portal-verify-email.cjs.entry.js +6 -6
- package/dist/cjs/sqm-referral-table_11.cjs.entry.js +14 -12
- package/dist/cjs/sqm-referred-registration.cjs.entry.js +7 -7
- package/dist/cjs/sqm-rewards-table-customer-note-cell.cjs.entry.js +3 -3
- package/dist/cjs/sqm-rewards-table-customer-note-column.cjs.entry.js +4 -4
- package/dist/cjs/sqm-rewards-table_9.cjs.entry.js +11 -11
- package/dist/cjs/sqm-route.cjs.entry.js +1 -1
- package/dist/cjs/sqm-stencilbook.cjs.entry.js +69 -29
- package/dist/cjs/sqm-tab.cjs.entry.js +4 -4
- package/dist/cjs/sqm-tabs.cjs.entry.js +5 -5
- package/dist/cjs/{sqm-text-span-view-e1cd9bd3.js → sqm-text-span-view-38222836.js} +1 -1
- package/dist/cjs/sqm-text-span.cjs.entry.js +3 -3
- package/dist/cjs/{stencil-hooks.module-72742a0b.js → stencil-hooks.module-8f69ed33.js} +1 -1
- package/dist/cjs/{useChildElements-e0d44916.js → useChildElements-176ac928.js} +2 -2
- package/dist/cjs/{useInstantAccessRegistration-bbe746d1.js → useInstantAccessRegistration-151a3f4a.js} +3 -3
- package/dist/cjs/{useReferralTable-a76adb0d.js → useReferralTable-c91d9310.js} +5 -5
- package/dist/cjs/{useRegistrationFormState-876ed65d.js → useRegistrationFormState-49dd9295.js} +2 -2
- package/dist/cjs/{utilities-cec9dd36.js → utilities-719c980a.js} +2 -2
- package/dist/collection/collection-manifest.json +2 -2
- package/dist/collection/components/sqm-coupon-code/sqm-coupon-code.js +1 -1
- package/dist/collection/components/sqm-empty/sqm-empty.js +10 -2
- package/dist/collection/components/sqm-logout-current-user/sqm-logout-current-user.js +1 -1
- package/dist/collection/components/sqm-pagination/sqm-pagination-view.js +10 -8
- package/dist/collection/components/sqm-pagination/sqm-pagination.js +50 -24
- package/dist/collection/components/sqm-pagination/usePagination.js +23 -2
- package/dist/collection/components/sqm-portal-container/sqm-portal-container.js +0 -4
- package/dist/collection/components/sqm-referral-code/sqm-referral-code.js +8 -6
- package/dist/collection/components/sqm-referral-code/useReferralCode.js +14 -6
- package/dist/collection/components/sqm-referral-codes/ReferralCodes.stories.js +30 -0
- package/dist/collection/components/sqm-referral-codes/sqm-referral-codes-view.js +14 -4
- package/dist/collection/components/sqm-referral-codes/sqm-referral-codes.js +121 -7
- package/dist/collection/components/sqm-referral-codes/useReferralCodes.js +47 -36
- package/dist/collection/components/sqm-referral-table/cells/sqm-referral-table-rewards-cell.js +6 -2
- package/dist/collection/components/sqm-share-button/useShareButton.js +15 -8
- package/dist/collection/components/sqm-share-code/sqm-share-code.js +1 -1
- package/dist/collection/components/sqm-share-link/sqm-share-link.js +1 -1
- package/dist/collection/components/sqm-share-link/useShareLink.js +5 -4
- package/dist/collection/components/views/copy-text-view.js +4 -3
- package/dist/collection/stories/Widget.stories.js +5 -0
- package/dist/esm/{GenericTableView-bf154727.js → GenericTableView-706f5b56.js} +1 -1
- package/dist/esm/{ShadowViewAddon-76b1137d.js → ShadowViewAddon-43305632.js} +29 -21
- package/dist/esm/{copy-text-view-2ba105b6.js → copy-text-view-e66261c5.js} +52 -40
- package/dist/esm/{email-registration-view-12793040.js → email-registration-view-5ecee6f8.js} +1 -1
- package/dist/esm/{global-b89b6edc.js → global-701bd5b0.js} +2 -2
- package/dist/esm/{index-17b4da69.js → index-014ddfa3.js} +2 -1
- package/dist/esm/{index.module-f122af7b.js → index.module-5eb0926c.js} +2 -2
- package/dist/esm/loader.js +5 -5
- package/dist/esm/{luxon-7600be8d.js → luxon-12195d94.js} +1 -1
- package/dist/esm/mint-components.js +5 -5
- package/dist/esm/{mockRewardData-0eb6e778.js → mockRewardData-133c20ca.js} +1 -1
- package/dist/esm/raisins-plop-target.entry.js +1 -1
- package/dist/esm/{re-render-c64289f3.js → re-render-b31d83d7.js} +2 -2
- package/dist/esm/{sqm-asset-card-view-9d93fbdd.js → sqm-asset-card-view-da88351a.js} +1 -1
- package/dist/esm/sqm-asset-card.entry.js +5 -5
- package/dist/esm/sqm-banking-info-form_16.entry.js +11 -11
- package/dist/esm/sqm-big-stat_38.entry.js +14 -14
- package/dist/esm/{sqm-close-button-view-b24c708b.js → sqm-close-button-view-8058642b.js} +1 -1
- package/dist/esm/sqm-close-button.entry.js +4 -4
- package/dist/esm/sqm-context-router.entry.js +3 -3
- package/dist/esm/sqm-empty_4.entry.js +10 -6
- package/dist/esm/sqm-form-message.entry.js +2 -2
- package/dist/esm/sqm-graphql-client-provider.entry.js +3 -3
- package/dist/esm/sqm-header-logo.entry.js +2 -2
- package/dist/esm/sqm-instant-access-registration.entry.js +7 -7
- package/dist/esm/{sqm-invoice-table-view-09cc28d6.js → sqm-invoice-table-view-7d1aa71f.js} +2 -2
- package/dist/esm/{sqm-leaderboard-rank-view-10657658.js → sqm-leaderboard-rank-view-773a586f.js} +1 -1
- package/dist/esm/sqm-leaderboard-rank.entry.js +5 -5
- package/dist/esm/{sqm-logout-current-user-view-2c6122cd.js → sqm-logout-current-user-view-dfcd508a.js} +1 -1
- package/dist/esm/sqm-logout-current-user.entry.js +5 -5
- package/dist/esm/{sqm-navigation-sidebar-item-view-14114804.js → sqm-navigation-sidebar-item-view-9fa7f5ea.js} +2 -2
- package/dist/esm/sqm-navigation-sidebar-item.entry.js +5 -5
- package/dist/esm/{sqm-navigation-sidebar-view-0312e073.js → sqm-navigation-sidebar-view-5f332ea1.js} +1 -1
- package/dist/esm/sqm-navigation-sidebar.entry.js +4 -4
- package/dist/esm/sqm-pagination_3.entry.js +110 -45
- package/dist/esm/sqm-password-field.entry.js +5 -5
- package/dist/esm/sqm-popup-container.entry.js +3 -3
- package/dist/esm/{sqm-portal-container-view-6c582684.js → sqm-portal-container-view-83df005d.js} +1 -1
- package/dist/esm/{sqm-portal-email-verification-view-ced567c9.js → sqm-portal-email-verification-view-332e1339.js} +3 -3
- package/dist/esm/sqm-portal-email-verification.entry.js +7 -7
- package/dist/esm/{sqm-portal-forgot-password-view-95cd454f.js → sqm-portal-forgot-password-view-8629f753.js} +2 -2
- package/dist/esm/sqm-portal-forgot-password.entry.js +6 -6
- package/dist/esm/sqm-portal-logout.entry.js +3 -3
- package/dist/esm/{sqm-portal-profile-view-d72dd5ac.js → sqm-portal-profile-view-847526a2.js} +3 -3
- package/dist/esm/sqm-portal-profile.entry.js +8 -8
- package/dist/esm/sqm-portal-protected-route.entry.js +3 -3
- package/dist/esm/sqm-portal-registration-form.entry.js +6 -6
- package/dist/esm/{sqm-portal-reset-password-view-f1454d43.js → sqm-portal-reset-password-view-865655da.js} +2 -2
- package/dist/esm/sqm-portal-reset-password.entry.js +6 -6
- package/dist/esm/{sqm-portal-verify-email-view-3739f523.js → sqm-portal-verify-email-view-6c60df25.js} +2 -2
- package/dist/esm/sqm-portal-verify-email.entry.js +6 -6
- package/dist/esm/sqm-referral-table_11.entry.js +14 -12
- package/dist/esm/sqm-referred-registration.entry.js +7 -7
- package/dist/esm/sqm-rewards-table-customer-note-cell.entry.js +3 -3
- package/dist/esm/sqm-rewards-table-customer-note-column.entry.js +4 -4
- package/dist/esm/sqm-rewards-table_9.entry.js +11 -11
- package/dist/esm/sqm-route.entry.js +1 -1
- package/dist/esm/sqm-stencilbook.entry.js +69 -29
- package/dist/esm/sqm-tab.entry.js +4 -4
- package/dist/esm/sqm-tabs.entry.js +5 -5
- package/dist/esm/{sqm-text-span-view-8d140661.js → sqm-text-span-view-d6e03f93.js} +1 -1
- package/dist/esm/sqm-text-span.entry.js +3 -3
- package/dist/esm/{stencil-hooks.module-ac12ca1c.js → stencil-hooks.module-576d7f01.js} +1 -1
- package/dist/esm/{useChildElements-37daf533.js → useChildElements-ebcfbc19.js} +2 -2
- package/dist/esm/{useInstantAccessRegistration-9d4cb797.js → useInstantAccessRegistration-7b2ea2bd.js} +3 -3
- package/dist/esm/{useReferralTable-42f99ea2.js → useReferralTable-df227f15.js} +5 -5
- package/dist/esm/{useRegistrationFormState-53c71782.js → useRegistrationFormState-faea9402.js} +2 -2
- package/dist/esm/{utilities-18d10876.js → utilities-292b61b9.js} +2 -2
- package/dist/esm-es5/{GenericTableView-bf154727.js → GenericTableView-706f5b56.js} +1 -1
- package/dist/esm-es5/ShadowViewAddon-43305632.js +1 -0
- package/dist/esm-es5/copy-text-view-e66261c5.js +1 -0
- package/dist/esm-es5/{email-registration-view-12793040.js → email-registration-view-5ecee6f8.js} +1 -1
- package/dist/esm-es5/{global-b89b6edc.js → global-701bd5b0.js} +1 -1
- package/dist/esm-es5/{index-17b4da69.js → index-014ddfa3.js} +1 -1
- package/dist/esm-es5/{index.module-f122af7b.js → index.module-5eb0926c.js} +1 -1
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/{luxon-7600be8d.js → luxon-12195d94.js} +1 -1
- package/dist/esm-es5/mint-components.js +1 -1
- package/dist/esm-es5/{mockRewardData-0eb6e778.js → mockRewardData-133c20ca.js} +1 -1
- package/dist/esm-es5/raisins-plop-target.entry.js +1 -1
- package/dist/esm-es5/{re-render-c64289f3.js → re-render-b31d83d7.js} +1 -1
- package/dist/esm-es5/{sqm-asset-card-view-9d93fbdd.js → sqm-asset-card-view-da88351a.js} +1 -1
- package/dist/esm-es5/sqm-asset-card.entry.js +1 -1
- package/dist/esm-es5/sqm-banking-info-form_16.entry.js +1 -1
- package/dist/esm-es5/sqm-big-stat_38.entry.js +1 -1
- package/dist/esm-es5/{sqm-close-button-view-b24c708b.js → sqm-close-button-view-8058642b.js} +1 -1
- package/dist/esm-es5/sqm-close-button.entry.js +1 -1
- package/dist/esm-es5/sqm-context-router.entry.js +1 -1
- package/dist/esm-es5/sqm-empty_4.entry.js +1 -1
- package/dist/esm-es5/sqm-form-message.entry.js +1 -1
- package/dist/esm-es5/sqm-graphql-client-provider.entry.js +1 -1
- package/dist/esm-es5/sqm-header-logo.entry.js +1 -1
- package/dist/esm-es5/sqm-instant-access-registration.entry.js +1 -1
- package/dist/esm-es5/{sqm-invoice-table-view-09cc28d6.js → sqm-invoice-table-view-7d1aa71f.js} +1 -1
- package/dist/esm-es5/sqm-leaderboard-rank-view-773a586f.js +1 -0
- package/dist/esm-es5/sqm-leaderboard-rank.entry.js +1 -1
- package/dist/esm-es5/{sqm-logout-current-user-view-2c6122cd.js → sqm-logout-current-user-view-dfcd508a.js} +1 -1
- package/dist/esm-es5/sqm-logout-current-user.entry.js +1 -1
- package/dist/esm-es5/{sqm-navigation-sidebar-item-view-14114804.js → sqm-navigation-sidebar-item-view-9fa7f5ea.js} +1 -1
- package/dist/esm-es5/sqm-navigation-sidebar-item.entry.js +1 -1
- package/dist/esm-es5/{sqm-navigation-sidebar-view-0312e073.js → sqm-navigation-sidebar-view-5f332ea1.js} +1 -1
- package/dist/esm-es5/sqm-navigation-sidebar.entry.js +1 -1
- package/dist/esm-es5/sqm-pagination_3.entry.js +1 -1
- package/dist/esm-es5/sqm-password-field.entry.js +1 -1
- package/dist/esm-es5/sqm-popup-container.entry.js +1 -1
- package/dist/esm-es5/{sqm-portal-container-view-6c582684.js → sqm-portal-container-view-83df005d.js} +1 -1
- package/dist/esm-es5/{sqm-portal-email-verification-view-ced567c9.js → sqm-portal-email-verification-view-332e1339.js} +1 -1
- package/dist/esm-es5/sqm-portal-email-verification.entry.js +1 -1
- package/dist/esm-es5/{sqm-portal-forgot-password-view-95cd454f.js → sqm-portal-forgot-password-view-8629f753.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-d72dd5ac.js → sqm-portal-profile-view-847526a2.js} +1 -1
- package/dist/esm-es5/sqm-portal-profile.entry.js +1 -1
- package/dist/esm-es5/sqm-portal-protected-route.entry.js +1 -1
- package/dist/esm-es5/sqm-portal-registration-form.entry.js +1 -1
- package/dist/esm-es5/{sqm-portal-reset-password-view-f1454d43.js → sqm-portal-reset-password-view-865655da.js} +1 -1
- package/dist/esm-es5/sqm-portal-reset-password.entry.js +1 -1
- package/dist/esm-es5/{sqm-portal-verify-email-view-3739f523.js → sqm-portal-verify-email-view-6c60df25.js} +1 -1
- package/dist/esm-es5/sqm-portal-verify-email.entry.js +1 -1
- package/dist/esm-es5/sqm-referral-table_11.entry.js +1 -1
- package/dist/esm-es5/sqm-referred-registration.entry.js +1 -1
- package/dist/esm-es5/sqm-rewards-table-customer-note-cell.entry.js +1 -1
- package/dist/esm-es5/sqm-rewards-table-customer-note-column.entry.js +1 -1
- package/dist/esm-es5/sqm-rewards-table_9.entry.js +1 -1
- package/dist/esm-es5/sqm-route.entry.js +1 -1
- package/dist/esm-es5/sqm-stencilbook.entry.js +1 -1
- package/dist/esm-es5/sqm-tab.entry.js +1 -1
- package/dist/esm-es5/sqm-tabs.entry.js +1 -1
- package/dist/esm-es5/{sqm-text-span-view-8d140661.js → sqm-text-span-view-d6e03f93.js} +1 -1
- package/dist/esm-es5/sqm-text-span.entry.js +1 -1
- package/dist/esm-es5/{stencil-hooks.module-ac12ca1c.js → stencil-hooks.module-576d7f01.js} +1 -1
- package/dist/esm-es5/useChildElements-ebcfbc19.js +1 -0
- package/dist/esm-es5/useInstantAccessRegistration-7b2ea2bd.js +1 -0
- package/dist/esm-es5/{useReferralTable-42f99ea2.js → useReferralTable-df227f15.js} +1 -1
- package/dist/esm-es5/useRegistrationFormState-faea9402.js +1 -0
- package/dist/esm-es5/{utilities-18d10876.js → utilities-292b61b9.js} +1 -1
- package/dist/mint-components/mint-components.esm.js +1 -1
- package/dist/mint-components/mint-components.js +1 -1
- package/dist/mint-components/{p-246a2827.entry.js → p-00105748.entry.js} +2 -2
- package/dist/mint-components/{p-fd2c5407.js → p-019506c4.js} +1 -1
- package/dist/mint-components/p-03e2a88c.js +1 -0
- package/dist/mint-components/p-062051ad.entry.js +1 -0
- package/dist/mint-components/{p-18a19cb5.system.js → p-06b8a582.system.js} +1 -1
- package/dist/mint-components/p-0a26adee.js +1 -0
- package/dist/mint-components/{p-523ed056.system.js → p-0dc18b5c.system.js} +1 -1
- package/dist/mint-components/p-0ebd104c.js +1 -0
- package/dist/mint-components/{p-8077e9c6.js → p-134424df.js} +1 -1
- package/dist/mint-components/p-146c2a0e.js +1 -0
- package/dist/mint-components/{p-c7ce2c1e.system.js → p-16b9efe1.system.js} +1 -1
- package/dist/mint-components/{p-991c9787.js → p-195e306e.js} +2 -2
- package/dist/mint-components/{p-251e7567.js → p-1a4e5a3a.js} +1 -1
- package/dist/mint-components/p-1a5f4a13.system.entry.js +1 -0
- package/dist/mint-components/{p-c3dc5a23.js → p-1cd93999.js} +4 -4
- package/dist/mint-components/{p-bb6f6681.system.js → p-1e03d640.system.js} +1 -1
- package/dist/mint-components/{p-a1150633.system.entry.js → p-1e1c87a2.system.entry.js} +1 -1
- package/dist/mint-components/{p-1099290c.system.js → p-1e68fa26.system.js} +1 -1
- package/dist/mint-components/{p-5c845bc2.system.entry.js → p-1e8bafbc.system.entry.js} +1 -1
- package/dist/mint-components/p-20c6c73e.entry.js +1 -0
- package/dist/mint-components/{p-ff17b3a4.system.js → p-21d94eab.system.js} +1 -1
- package/dist/mint-components/{p-48b7d703.entry.js → p-23bc62d8.entry.js} +6 -6
- package/dist/mint-components/p-2478ab2e.js +1 -0
- package/dist/mint-components/{p-3373d84e.js → p-249798d3.js} +1 -1
- package/dist/mint-components/{p-ec8a9e91.system.entry.js → p-25720e4b.system.entry.js} +1 -1
- package/dist/mint-components/{p-c1a47137.system.entry.js → p-29952a5b.system.entry.js} +1 -1
- package/dist/mint-components/{p-4f775e84.system.js → p-2be11651.system.js} +1 -1
- package/dist/mint-components/{p-9deac406.system.js → p-2cb2401d.system.js} +1 -1
- package/dist/mint-components/p-367b6513.entry.js +1 -0
- package/dist/mint-components/{p-96cb9c17.entry.js → p-391b6274.entry.js} +1 -1
- package/dist/mint-components/{p-942d1c22.entry.js → p-3c62ed18.entry.js} +2 -2
- package/dist/mint-components/{p-59c141a2.system.js → p-3c6bc373.system.js} +1 -1
- package/dist/mint-components/p-3ee0a8af.entry.js +1 -0
- package/dist/mint-components/{p-1c6e4a5f.entry.js → p-3f03a247.entry.js} +2 -2
- package/dist/mint-components/{p-855ae1b5.js → p-42390bcc.js} +1 -1
- package/dist/mint-components/{p-e546347e.system.js → p-4531488f.system.js} +1 -1
- package/dist/mint-components/{p-2a414b2e.system.js → p-45d71b2a.system.js} +1 -1
- package/dist/mint-components/{p-798ed3a2.entry.js → p-45f46e4c.entry.js} +1 -1
- package/dist/mint-components/{p-c39f9dc1.system.entry.js → p-46aaa8b9.system.entry.js} +1 -1
- package/dist/mint-components/{p-daba8cd2.system.entry.js → p-48a72a05.system.entry.js} +1 -1
- package/dist/mint-components/p-4c5c84f5.js +52 -0
- package/dist/mint-components/{p-53ff8bd0.system.entry.js → p-4ef2f4f6.system.entry.js} +1 -1
- package/dist/mint-components/{p-a182b053.entry.js → p-4f467838.entry.js} +9 -9
- package/dist/mint-components/{p-ea88142c.js → p-517bcc71.js} +1 -1
- package/dist/mint-components/p-53e25b79.entry.js +1 -0
- package/dist/mint-components/p-549139be.entry.js +1 -0
- package/dist/mint-components/{p-9288cca6.system.entry.js → p-566dc091.system.entry.js} +1 -1
- package/dist/mint-components/p-57f92fe0.entry.js +1 -0
- package/dist/mint-components/{p-de2a8fae.system.entry.js → p-5922cd9e.system.entry.js} +1 -1
- package/dist/mint-components/{p-32cf8417.js → p-59e310c8.js} +1 -1
- package/dist/mint-components/{p-92110eef.entry.js → p-5c70bc39.entry.js} +1 -1
- package/dist/mint-components/p-5fe660bb.system.entry.js +1 -0
- package/dist/mint-components/{p-f52c3aec.system.entry.js → p-607b75ef.system.entry.js} +1 -1
- package/dist/mint-components/{p-64c3217a.js → p-61d5f26e.js} +1 -1
- package/dist/mint-components/{p-fae82751.entry.js → p-63f2aad0.entry.js} +1 -1
- package/dist/mint-components/{p-e41cb11f.js → p-65535cf7.js} +1 -1
- package/dist/mint-components/{p-0806343b.js → p-6568392b.js} +1 -1
- package/dist/mint-components/p-66aca488.entry.js +1 -0
- package/dist/mint-components/{p-9c3d78e9.js → p-66c7b15c.js} +1 -1
- package/dist/mint-components/{p-f44d88fa.system.js → p-66d9a540.system.js} +1 -1
- package/dist/mint-components/{p-79da7f18.js → p-6d164a9e.js} +1 -1
- package/dist/mint-components/{p-3cc5474d.entry.js → p-6dadd556.entry.js} +1 -1
- package/dist/mint-components/{p-e2bb72eb.system.entry.js → p-707884d9.system.entry.js} +1 -1
- package/dist/mint-components/{p-0f028514.system.js → p-71e0ca2b.system.js} +1 -1
- package/dist/mint-components/{p-3036cf58.system.js → p-752650b9.system.js} +1 -1
- package/dist/mint-components/{p-55588b46.system.js → p-778b3774.system.js} +1 -1
- package/dist/mint-components/{p-f3053c61.js → p-7ae55645.js} +1 -1
- package/dist/mint-components/{p-ecefeaa9.system.entry.js → p-7d8b3d62.system.entry.js} +1 -1
- package/dist/mint-components/{p-370a1a73.system.js → p-81ed0e97.system.js} +1 -1
- package/dist/mint-components/{p-6b5e355c.system.js → p-842cbd05.system.js} +1 -1
- package/dist/mint-components/{p-21d4f6ce.system.js → p-8b9408e5.system.js} +1 -1
- package/dist/mint-components/{p-1c710e16.entry.js → p-8b97c4f8.entry.js} +1 -1
- package/dist/mint-components/{p-6e62f207.entry.js → p-8c1e39ea.entry.js} +1 -1
- package/dist/mint-components/{p-00be5090.js → p-8c765c81.js} +1 -1
- package/dist/mint-components/{p-1ce4fa30.system.entry.js → p-8d9ff497.system.entry.js} +1 -1
- package/dist/mint-components/{p-14dac608.system.entry.js → p-902a70fb.system.entry.js} +1 -1
- package/dist/mint-components/{p-1b1d10e5.entry.js → p-9114b10e.entry.js} +1 -1
- package/dist/mint-components/p-9a4a5702.entry.js +11 -0
- package/dist/mint-components/p-9be2c9a1.system.entry.js +1 -0
- package/dist/mint-components/p-9ed09b3a.system.js +1 -0
- package/dist/mint-components/p-9ee50200.entry.js +1 -0
- package/dist/mint-components/{p-6afb4f48.system.entry.js → p-9f9f851d.system.entry.js} +1 -1
- package/dist/mint-components/{p-03a647c2.system.js → p-9fc73ff8.system.js} +1 -1
- package/dist/mint-components/p-a13c83c5.entry.js +1 -0
- package/dist/mint-components/{p-b334bde8.entry.js → p-a1c4b92d.entry.js} +2 -2
- package/dist/mint-components/{p-ce746af8.system.js → p-a2aed0da.system.js} +1 -1
- package/dist/mint-components/{p-178d2d2e.entry.js → p-a3fdbfed.entry.js} +1 -1
- package/dist/mint-components/{p-fbdf0738.entry.js → p-a4c1b404.entry.js} +1 -1
- package/dist/mint-components/{p-02f6cda4.js → p-a9ff5495.js} +1 -1
- package/dist/mint-components/{p-acc93caa.system.entry.js → p-af4cce6a.system.entry.js} +1 -1
- package/dist/mint-components/p-b08e9577.entry.js +1 -0
- package/dist/mint-components/{p-55a421bb.system.entry.js → p-b1f4cbc7.system.entry.js} +1 -1
- package/dist/mint-components/{p-ce9e7c98.system.js → p-b210bcc2.system.js} +1 -1
- package/dist/mint-components/p-b3aaeb2f.system.entry.js +1 -0
- package/dist/mint-components/p-b3d193e3.system.entry.js +1 -0
- package/dist/mint-components/{p-6e7e8af6.system.js → p-b3f02315.system.js} +1 -1
- package/dist/mint-components/{p-67846dce.system.entry.js → p-b4448aec.system.entry.js} +1 -1
- package/dist/mint-components/{p-cfbe2f86.entry.js → p-b6a7b4cf.entry.js} +1 -1
- package/dist/mint-components/{p-ed161025.js → p-b7705066.js} +1 -1
- package/dist/mint-components/{p-43a990b6.system.js → p-b8230f83.system.js} +1 -1
- package/dist/mint-components/p-ba734685.system.entry.js +1 -0
- package/dist/mint-components/p-bd5cb4f3.system.js +1 -0
- package/dist/mint-components/{p-f0806232.system.entry.js → p-c2281e04.system.entry.js} +1 -1
- package/dist/mint-components/p-c2d49e51.entry.js +13 -0
- package/dist/mint-components/p-c33c3b47.system.js +1 -0
- package/dist/mint-components/{p-d68ed4a6.system.entry.js → p-c721e692.system.entry.js} +1 -1
- package/dist/mint-components/{p-22de9f73.system.entry.js → p-cd2f57bb.system.entry.js} +1 -1
- package/dist/mint-components/{p-e3e16c36.js → p-d25af377.js} +1 -1
- package/dist/mint-components/{p-73decce7.system.js → p-d2abffc0.system.js} +1 -1
- package/dist/mint-components/p-d8d97ff5.js +1 -0
- package/dist/mint-components/p-d9a55dc5.entry.js +9 -0
- package/dist/mint-components/p-dbf3a976.entry.js +1 -0
- package/dist/mint-components/p-df6642a2.system.entry.js +1 -0
- package/dist/mint-components/p-e029c250.entry.js +1 -0
- package/dist/mint-components/{p-ac1bf045.js → p-e039ce2f.js} +1 -1
- package/dist/mint-components/p-e14d1312.system.js +1 -0
- package/dist/mint-components/{p-82e09b8d.system.entry.js → p-e1e700b8.system.entry.js} +1 -1
- package/dist/mint-components/{p-88aac6a9.system.entry.js → p-e401cb44.system.entry.js} +1 -1
- package/dist/mint-components/{p-ed6ebd60.system.js → p-e479d77e.system.js} +1 -1
- package/dist/mint-components/{p-88a2e66e.system.entry.js → p-e53e95ce.system.entry.js} +1 -1
- package/dist/mint-components/{p-41499327.entry.js → p-ecad6d86.entry.js} +1 -1
- package/dist/mint-components/{p-5d0c9424.js → p-ee343d0b.js} +1 -1
- package/dist/mint-components/{p-bf834367.system.js → p-ee474d4c.system.js} +1 -1
- package/dist/mint-components/{p-c7fd9e16.js → p-f29e62e1.js} +1 -1
- package/dist/mint-components/{p-fb2c0ce4.system.entry.js → p-f3978cec.system.entry.js} +1 -1
- package/dist/mint-components/{p-a474b0ec.system.entry.js → p-f6712472.system.entry.js} +1 -1
- package/dist/mint-components/{p-46ca288c.system.js → p-f6c279d8.system.js} +1 -1
- package/dist/mint-components/{p-b3b5b4b7.system.entry.js → p-f9564398.system.entry.js} +1 -1
- package/dist/mint-components/{p-d3d281ff.entry.js → p-f9b9be03.entry.js} +1 -1
- package/dist/mint-components/{p-1df19ea2.js → p-fd04355d.js} +1 -1
- package/dist/mint-components/{p-ff41c804.system.entry.js → p-fe516032.system.entry.js} +1 -1
- package/dist/mint-components/p-feace4a6.entry.js +1 -0
- package/dist/mint-components/{p-8c97bfb1.system.entry.js → p-fef83f2a.system.entry.js} +1 -1
- package/dist/types/components/sqm-empty/sqm-empty.d.ts +1 -1
- package/dist/types/components/sqm-pagination/sqm-pagination-view.d.ts +12 -4
- package/dist/types/components/sqm-pagination/sqm-pagination.d.ts +6 -1
- package/dist/types/components/sqm-pagination/usePagination.d.ts +10 -9
- package/dist/types/components/sqm-portal-container/sqm-portal-container.d.ts +0 -1
- package/dist/types/components/sqm-referral-code/sqm-referral-code.d.ts +3 -3
- package/dist/types/components/sqm-referral-code/useReferralCode.d.ts +2 -8
- package/dist/types/components/sqm-referral-codes/ReferralCodes.stories.d.ts +3 -0
- package/dist/types/components/sqm-referral-codes/sqm-referral-codes-view.d.ts +6 -2
- package/dist/types/components/sqm-referral-codes/sqm-referral-codes.d.ts +20 -2
- package/dist/types/components/sqm-referral-codes/useReferralCodes.d.ts +9 -5
- package/dist/types/components/views/copy-text-view.d.ts +1 -0
- package/dist/types/components.d.ts +50 -9
- package/dist/types/stories/Widget.stories.d.ts +6 -0
- package/docs/docs.docx +0 -0
- package/docs/raisins.json +1 -1
- package/grapesjs/grapesjs.js +1 -1
- package/package.json +1 -1
- package/dist/esm-es5/ShadowViewAddon-76b1137d.js +0 -1
- package/dist/esm-es5/copy-text-view-2ba105b6.js +0 -1
- package/dist/esm-es5/sqm-leaderboard-rank-view-10657658.js +0 -1
- package/dist/esm-es5/useChildElements-37daf533.js +0 -1
- package/dist/esm-es5/useInstantAccessRegistration-9d4cb797.js +0 -1
- package/dist/esm-es5/useRegistrationFormState-53c71782.js +0 -1
- package/dist/mint-components/p-01434e4a.entry.js +0 -1
- package/dist/mint-components/p-09e30e46.entry.js +0 -13
- package/dist/mint-components/p-0a898ab1.js +0 -1
- package/dist/mint-components/p-110dddfe.entry.js +0 -1
- package/dist/mint-components/p-12c56ba6.entry.js +0 -1
- package/dist/mint-components/p-15dee492.js +0 -1
- package/dist/mint-components/p-18a7f543.system.entry.js +0 -1
- package/dist/mint-components/p-26306ac4.system.entry.js +0 -1
- package/dist/mint-components/p-2e16db11.entry.js +0 -1
- package/dist/mint-components/p-476182e7.system.entry.js +0 -1
- package/dist/mint-components/p-494e407e.entry.js +0 -1
- package/dist/mint-components/p-5b7e2d53.entry.js +0 -1
- package/dist/mint-components/p-5d37482d.entry.js +0 -1
- package/dist/mint-components/p-5fc8d87c.system.js +0 -1
- package/dist/mint-components/p-639d3dd3.entry.js +0 -1
- package/dist/mint-components/p-6b0e6a6c.js +0 -1
- package/dist/mint-components/p-7356f9c9.system.js +0 -1
- package/dist/mint-components/p-7962ab58.system.entry.js +0 -1
- package/dist/mint-components/p-89a760ea.js +0 -1
- package/dist/mint-components/p-89fc3144.entry.js +0 -9
- package/dist/mint-components/p-8f33fa36.system.entry.js +0 -1
- package/dist/mint-components/p-9dcfa187.system.js +0 -1
- package/dist/mint-components/p-a0b1ecf2.system.entry.js +0 -1
- package/dist/mint-components/p-b4eb9c46.entry.js +0 -11
- package/dist/mint-components/p-b5176703.entry.js +0 -1
- package/dist/mint-components/p-bd4e9c2b.js +0 -1
- package/dist/mint-components/p-c1ba2ad0.system.entry.js +0 -1
- package/dist/mint-components/p-c8878e79.entry.js +0 -1
- package/dist/mint-components/p-ca17d998.entry.js +0 -1
- package/dist/mint-components/p-d666b326.js +0 -1
- package/dist/mint-components/p-dc41ff27.entry.js +0 -1
- package/dist/mint-components/p-dd0d79bf.entry.js +0 -1
- package/dist/mint-components/p-e983c342.js +0 -48
- package/dist/mint-components/p-f1ec1180.entry.js +0 -1
- package/dist/mint-components/p-f6b820fd.system.js +0 -1
package/dist/cjs/{useRegistrationFormState-876ed65d.js → useRegistrationFormState-49dd9295.js}
RENAMED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const stencilHooks_module = require('./stencil-hooks.module-
|
|
4
|
-
const index_module = require('./index.module-
|
|
3
|
+
const stencilHooks_module = require('./stencil-hooks.module-8f69ed33.js');
|
|
4
|
+
const index_module = require('./index.module-224d7b8d.js');
|
|
5
5
|
|
|
6
6
|
const REGISTRATION_FORM_STATE_CONTEXT = "sq:registration-form-state";
|
|
7
7
|
function useRegistrationFormState(formState) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const stencilHooks_module = require('./stencil-hooks.module-
|
|
4
|
-
const index_module = require('./index.module-
|
|
3
|
+
const stencilHooks_module = require('./stencil-hooks.module-8f69ed33.js');
|
|
4
|
+
const index_module = require('./index.module-224d7b8d.js');
|
|
5
5
|
|
|
6
6
|
// import { IntlMessageFormat } from 'intl-messageformat';
|
|
7
7
|
function isMobile(breakPoint) {
|
|
@@ -3,6 +3,8 @@
|
|
|
3
3
|
"./components/tax-and-cash/sqm-banking-info-form/sqm-banking-info-form.js",
|
|
4
4
|
"./components/tax-and-cash/sqm-docusign-form/sqm-docusign-form.js",
|
|
5
5
|
"./components/tax-and-cash/sqm-indirect-tax-form/sqm-indirect-tax-form.js",
|
|
6
|
+
"./components/sqm-referral-codes/sqm-referral-codes.js",
|
|
7
|
+
"./components/sqm-pagination/sqm-pagination.js",
|
|
6
8
|
"./components/sqm-password-field/sqm-password-field.js",
|
|
7
9
|
"./components/sqm-referral-table/sqm-referral-table.js",
|
|
8
10
|
"./components/sqm-reward-exchange-list/sqm-reward-exchange-list.js",
|
|
@@ -46,8 +48,6 @@
|
|
|
46
48
|
"./components/sqm-navigation-menu/sqm-navigation-menu.js",
|
|
47
49
|
"./components/sqm-navigation-sidebar/sqm-navigation-sidebar.js",
|
|
48
50
|
"./components/sqm-navigation-sidebar-item/sqm-navigation-sidebar-item.js",
|
|
49
|
-
"./components/sqm-referral-codes/sqm-referral-codes.js",
|
|
50
|
-
"./components/sqm-pagination/sqm-pagination.js",
|
|
51
51
|
"./components/sqm-popup-container/sqm-popup-container.js",
|
|
52
52
|
"./components/sqm-portal-change-password/sqm-portal-change-password.js",
|
|
53
53
|
"./components/sqm-portal-container/sqm-portal-container.js",
|
|
@@ -475,7 +475,7 @@ export class CouponCode {
|
|
|
475
475
|
"mutable": false,
|
|
476
476
|
"complexType": {
|
|
477
477
|
"original": "DemoData<CouponCodeViewProps>",
|
|
478
|
-
"resolved": "{ loading?: boolean; errorType?: \"error\" | \"warning\" | \"info\" | \"success\"; couponCodeLabel?: string; copyString?: string; tooltiptext?: string; open?: boolean; copyButtonLabel?: string; disabled?: boolean; textAlign?: \"left\" | \"right\" | \"center\"; buttonStyle?: \"icon\" | \"button-outside\" | \"button-below\"; error?: boolean; errorText?: string; notificationText?: string; showNotificationText?: boolean; inputPlaceholderText?: string; dateAvailable?: string; onClick?: () => void; }",
|
|
478
|
+
"resolved": "{ loading?: boolean; errorType?: \"error\" | \"warning\" | \"info\" | \"success\"; couponCodeLabel?: string; copyString?: string; tooltiptext?: string; open?: boolean; copyButtonLabel?: string; disabled?: boolean; textAlign?: \"left\" | \"right\" | \"center\"; buttonStyle?: \"icon\" | \"button-outside\" | \"button-below\"; error?: boolean; errorText?: string; notificationText?: string; showNotificationText?: boolean; inputPlaceholderText?: string; dateAvailable?: string; isCopied?: boolean; onClick?: () => void; }",
|
|
479
479
|
"references": {
|
|
480
480
|
"DemoData": {
|
|
481
481
|
"location": "import",
|
|
@@ -5,6 +5,13 @@ import { EmptyStateView } from "./sqm-empty-view";
|
|
|
5
5
|
* @validParents ["sqm-referral-table","sqm-rewards-table","sqm-leaderboard","sqm-reward-exchange-list"]
|
|
6
6
|
*/
|
|
7
7
|
export class Empty {
|
|
8
|
+
constructor() {
|
|
9
|
+
/**
|
|
10
|
+
* @uiWidget ImageUpload
|
|
11
|
+
* @format url
|
|
12
|
+
* @uiName Image */
|
|
13
|
+
this.emptyStateImage = "https://res.cloudinary.com/saasquatch/image/upload/v1644360953/squatch-assets/empty_leaderboard2.png";
|
|
14
|
+
}
|
|
8
15
|
render() {
|
|
9
16
|
return (h(Host, { slot: "empty" },
|
|
10
17
|
h(EmptyStateView, { emptyStateImage: this.emptyStateImage, emptyStateHeader: this.emptyStateHeader, emptyStateText: this.emptyStateText, supportText: this.supportText })));
|
|
@@ -21,7 +28,7 @@ export class Empty {
|
|
|
21
28
|
"references": {}
|
|
22
29
|
},
|
|
23
30
|
"required": false,
|
|
24
|
-
"optional":
|
|
31
|
+
"optional": true,
|
|
25
32
|
"docs": {
|
|
26
33
|
"tags": [{
|
|
27
34
|
"text": "ImageUpload",
|
|
@@ -36,7 +43,8 @@ export class Empty {
|
|
|
36
43
|
"text": ""
|
|
37
44
|
},
|
|
38
45
|
"attribute": "empty-state-image",
|
|
39
|
-
"reflect": false
|
|
46
|
+
"reflect": false,
|
|
47
|
+
"defaultValue": "\"https://res.cloudinary.com/saasquatch/image/upload/v1644360953/squatch-assets/empty_leaderboard2.png\""
|
|
40
48
|
},
|
|
41
49
|
"emptyStateHeader": {
|
|
42
50
|
"type": "string",
|
|
@@ -122,7 +122,7 @@ export class LogoutCurrentUser {
|
|
|
122
122
|
"mutable": false,
|
|
123
123
|
"complexType": {
|
|
124
124
|
"original": "DemoData<CopyTextViewProps>",
|
|
125
|
-
"resolved": "{ loading?: boolean; copyString?: string; tooltiptext?: string; open?: boolean; copyButtonLabel?: string; disabled?: boolean; textAlign?: \"left\" | \"right\" | \"center\"; buttonStyle?: \"icon\" | \"button-outside\" | \"button-below\"; error?: boolean; errorText?: string; notificationText?: string; showNotificationText?: boolean; inputPlaceholderText?: string; dateAvailable?: string; onClick?: () => void; }",
|
|
125
|
+
"resolved": "{ loading?: boolean; copyString?: string; tooltiptext?: string; open?: boolean; copyButtonLabel?: string; disabled?: boolean; textAlign?: \"left\" | \"right\" | \"center\"; buttonStyle?: \"icon\" | \"button-outside\" | \"button-below\"; error?: boolean; errorText?: string; notificationText?: string; showNotificationText?: boolean; inputPlaceholderText?: string; dateAvailable?: string; isCopied?: boolean; onClick?: () => void; }",
|
|
126
126
|
"references": {
|
|
127
127
|
"DemoData": {
|
|
128
128
|
"location": "import",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { h } from "@stencil/core";
|
|
1
|
+
import { Fragment, h } from "@stencil/core";
|
|
2
2
|
import { createStyleSheet } from "../../styling/JSS";
|
|
3
3
|
const style = {
|
|
4
4
|
Container: {
|
|
@@ -16,15 +16,17 @@ const style = {
|
|
|
16
16
|
const sheet = createStyleSheet(style);
|
|
17
17
|
const styleString = sheet.toString();
|
|
18
18
|
export function PaginationView(props) {
|
|
19
|
-
const {
|
|
19
|
+
const { states, callbacks, text } = props;
|
|
20
|
+
const { onNext, onPrev } = callbacks;
|
|
21
|
+
const { currentPage, totalPages, loading } = states;
|
|
22
|
+
if (totalPages === 1)
|
|
23
|
+
return h(Fragment, null);
|
|
20
24
|
return (h("span", { class: sheet.classes.Container, part: "sqm-base" },
|
|
21
25
|
h("style", { type: "text/css" }, styleString),
|
|
22
|
-
h(
|
|
23
|
-
h("sl-
|
|
24
|
-
|
|
25
|
-
h("
|
|
26
|
-
h("span", null, "of"),
|
|
27
|
-
h("span", null, totalPages)),
|
|
26
|
+
!loading && (h(Fragment, null,
|
|
27
|
+
h("sl-button", { onClick: onPrev, part: "sqm-pagination-button", circle: true, disabled: currentPage === 1 },
|
|
28
|
+
h("sl-icon", { name: "chevron-left", label: "Previous Page" })),
|
|
29
|
+
h("div", { class: sheet.classes.TextContainer }, text.paginationText))),
|
|
28
30
|
h("sl-button", { onClick: onNext, part: "sqm-pagination-button", circle: true, disabled: currentPage === totalPages },
|
|
29
31
|
h("sl-icon", { name: "chevron-right", label: "Previous Page" }))));
|
|
30
32
|
}
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
+
import { isDemo } from "@saasquatch/component-boilerplate";
|
|
2
|
+
import { withHooks } from "@saasquatch/stencil-hooks";
|
|
3
|
+
import { useState } from "@saasquatch/universal-hooks";
|
|
1
4
|
import { Component, h, Prop, State } from "@stencil/core";
|
|
5
|
+
import deepmerge from "deepmerge";
|
|
6
|
+
import { intl } from "../../global/global";
|
|
2
7
|
import { getProps } from "../../utils/utils";
|
|
3
8
|
import { PaginationView } from "./sqm-pagination-view";
|
|
4
9
|
import { usePagination } from "./usePagination";
|
|
5
|
-
import deepmerge from "deepmerge";
|
|
6
|
-
import { withHooks } from "@saasquatch/stencil-hooks";
|
|
7
|
-
import { useState } from "@saasquatch/universal-hooks";
|
|
8
|
-
import { isDemo } from "@saasquatch/component-boilerplate";
|
|
9
10
|
/**
|
|
10
11
|
* @uiName Pagination
|
|
11
12
|
* @exampleGroup Common Components
|
|
@@ -14,40 +15,57 @@ import { isDemo } from "@saasquatch/component-boilerplate";
|
|
|
14
15
|
export class Pagination {
|
|
15
16
|
constructor() {
|
|
16
17
|
this.ignored = true;
|
|
18
|
+
/**
|
|
19
|
+
* @uiName Pagination text
|
|
20
|
+
*/
|
|
21
|
+
this.paginationText = "{currentPage} of {totalPages}";
|
|
17
22
|
withHooks(this);
|
|
18
23
|
}
|
|
19
24
|
disconnectedCallback() { }
|
|
20
25
|
render() {
|
|
21
|
-
// const props = getProps(this);
|
|
22
|
-
var _a, _b;
|
|
23
26
|
const hookProps = isDemo()
|
|
24
27
|
? useDemoPagination(getProps(this))
|
|
25
|
-
: usePagination();
|
|
26
|
-
|
|
27
|
-
const props = {
|
|
28
|
-
currentPage: (_a = hookProps.states) === null || _a === void 0 ? void 0 : _a.currentPage,
|
|
29
|
-
totalPages: (_b = hookProps.states) === null || _b === void 0 ? void 0 : _b.pageCount,
|
|
30
|
-
onNext: () => { var _a, _b; return (_a = hookProps.callbacks) === null || _a === void 0 ? void 0 : _a.setCurrentPage(((_b = hookProps.states) === null || _b === void 0 ? void 0 : _b.currentPage) + 1); },
|
|
31
|
-
onPrev: () => { var _a, _b; return (_a = hookProps.callbacks) === null || _a === void 0 ? void 0 : _a.setCurrentPage(((_b = hookProps.states) === null || _b === void 0 ? void 0 : _b.currentPage) - 1); },
|
|
32
|
-
text: {
|
|
33
|
-
ofText: "of",
|
|
34
|
-
},
|
|
35
|
-
};
|
|
36
|
-
return h(PaginationView, Object.assign({}, props));
|
|
28
|
+
: usePagination(getProps(this));
|
|
29
|
+
return h(PaginationView, Object.assign({}, hookProps));
|
|
37
30
|
}
|
|
38
31
|
static get is() { return "sqm-pagination"; }
|
|
39
32
|
static get encapsulation() { return "shadow"; }
|
|
40
33
|
static get properties() { return {
|
|
34
|
+
"paginationText": {
|
|
35
|
+
"type": "string",
|
|
36
|
+
"mutable": false,
|
|
37
|
+
"complexType": {
|
|
38
|
+
"original": "string",
|
|
39
|
+
"resolved": "string",
|
|
40
|
+
"references": {}
|
|
41
|
+
},
|
|
42
|
+
"required": false,
|
|
43
|
+
"optional": false,
|
|
44
|
+
"docs": {
|
|
45
|
+
"tags": [{
|
|
46
|
+
"text": "Pagination text",
|
|
47
|
+
"name": "uiName"
|
|
48
|
+
}],
|
|
49
|
+
"text": ""
|
|
50
|
+
},
|
|
51
|
+
"attribute": "pagination-text",
|
|
52
|
+
"reflect": false,
|
|
53
|
+
"defaultValue": "\"{currentPage} of {totalPages}\""
|
|
54
|
+
},
|
|
41
55
|
"demoData": {
|
|
42
56
|
"type": "unknown",
|
|
43
57
|
"mutable": false,
|
|
44
58
|
"complexType": {
|
|
45
|
-
"original": "DemoData<
|
|
46
|
-
"resolved": "{
|
|
59
|
+
"original": "DemoData<UsePagination>",
|
|
60
|
+
"resolved": "{}",
|
|
47
61
|
"references": {
|
|
48
62
|
"DemoData": {
|
|
49
63
|
"location": "import",
|
|
50
64
|
"path": "../../global/demo"
|
|
65
|
+
},
|
|
66
|
+
"UsePagination": {
|
|
67
|
+
"location": "import",
|
|
68
|
+
"path": "./usePagination"
|
|
51
69
|
}
|
|
52
70
|
}
|
|
53
71
|
},
|
|
@@ -73,14 +91,22 @@ function useDemoPagination(props) {
|
|
|
73
91
|
const [currentPage, setCurrentPage] = useState(1);
|
|
74
92
|
return deepmerge({
|
|
75
93
|
states: {
|
|
76
|
-
currentPage
|
|
77
|
-
|
|
94
|
+
currentPage,
|
|
95
|
+
totalPages: 5,
|
|
96
|
+
loading: false,
|
|
78
97
|
},
|
|
79
98
|
callbacks: {
|
|
80
|
-
setCurrentPage,
|
|
99
|
+
onNext: () => setCurrentPage(currentPage + 1),
|
|
100
|
+
onPrev: () => setCurrentPage(currentPage - 1),
|
|
81
101
|
},
|
|
82
102
|
text: {
|
|
83
|
-
|
|
103
|
+
paginationText: intl.formatMessage({
|
|
104
|
+
id: `paginationText`,
|
|
105
|
+
defaultMessage: props.paginationText || "{currentPage} of {totalPages}",
|
|
106
|
+
}, {
|
|
107
|
+
currentPage: currentPage,
|
|
108
|
+
totalPages: 5,
|
|
109
|
+
}),
|
|
84
110
|
},
|
|
85
111
|
}, props.demoData || {}, { arrayMerge: (_, a) => a });
|
|
86
112
|
}
|
|
@@ -1,8 +1,29 @@
|
|
|
1
1
|
import { useParentValue } from "@saasquatch/component-boilerplate";
|
|
2
2
|
import { REFERRAL_CODES_PAGINATION_CONTEXT, } from "../sqm-referral-codes/useReferralCodes";
|
|
3
|
-
|
|
3
|
+
import { intl } from "../../global/global";
|
|
4
|
+
export function usePagination(props) {
|
|
5
|
+
var _a;
|
|
4
6
|
const context = useParentValue(REFERRAL_CODES_PAGINATION_CONTEXT);
|
|
7
|
+
const currentPage = context.states.currentPage + 1;
|
|
8
|
+
const totalPages = (_a = context.states) === null || _a === void 0 ? void 0 : _a.pageCount;
|
|
5
9
|
return {
|
|
6
|
-
|
|
10
|
+
states: {
|
|
11
|
+
currentPage,
|
|
12
|
+
totalPages,
|
|
13
|
+
loading: context.states.loading,
|
|
14
|
+
},
|
|
15
|
+
callbacks: {
|
|
16
|
+
onNext: () => { var _a, _b; return (_a = context.callbacks) === null || _a === void 0 ? void 0 : _a.setCurrentPage(((_b = context.states) === null || _b === void 0 ? void 0 : _b.currentPage) + 1); },
|
|
17
|
+
onPrev: () => { var _a, _b; return (_a = context.callbacks) === null || _a === void 0 ? void 0 : _a.setCurrentPage(((_b = context.states) === null || _b === void 0 ? void 0 : _b.currentPage) - 1); },
|
|
18
|
+
},
|
|
19
|
+
text: {
|
|
20
|
+
paginationText: intl.formatMessage({
|
|
21
|
+
id: `paginationText`,
|
|
22
|
+
defaultMessage: props.paginationText,
|
|
23
|
+
}, {
|
|
24
|
+
currentPage,
|
|
25
|
+
totalPages,
|
|
26
|
+
}),
|
|
27
|
+
},
|
|
7
28
|
};
|
|
8
29
|
}
|
|
@@ -47,7 +47,6 @@ export class PortalContainer {
|
|
|
47
47
|
/**
|
|
48
48
|
* @uiName Background color
|
|
49
49
|
* @uiWidget color
|
|
50
|
-
* @uiGroup Card style
|
|
51
50
|
* @uiType string
|
|
52
51
|
*/
|
|
53
52
|
this.backgroundColor = "#ffffff00";
|
|
@@ -327,9 +326,6 @@ export class PortalContainer {
|
|
|
327
326
|
}, {
|
|
328
327
|
"text": "color",
|
|
329
328
|
"name": "uiWidget"
|
|
330
|
-
}, {
|
|
331
|
-
"text": "Card style",
|
|
332
|
-
"name": "uiGroup"
|
|
333
329
|
}, {
|
|
334
330
|
"text": "string",
|
|
335
331
|
"name": "uiType"
|
|
@@ -8,7 +8,7 @@ import { useReferralCode } from "./useReferralCode";
|
|
|
8
8
|
/**
|
|
9
9
|
* @uiName Referral Code
|
|
10
10
|
* @exampleGroup Sharing
|
|
11
|
-
* @example Referral Code - <sqm-referral-code tooltip-text="Copied to Clipboard" tooltip-lifespan="1000"></sqm-referral-code>
|
|
11
|
+
* @example Referral Code - <sqm-referral-code tooltip-text="Copied to Clipboard" tooltip-lifespan="1000" show-notification-text="true"></sqm-referral-code>
|
|
12
12
|
*/
|
|
13
13
|
export class ReferralCode {
|
|
14
14
|
constructor() {
|
|
@@ -25,7 +25,7 @@ export class ReferralCode {
|
|
|
25
25
|
*/
|
|
26
26
|
this.showNotificationText = false;
|
|
27
27
|
/**
|
|
28
|
-
* Shown underneath
|
|
28
|
+
* Shown underneath single-use promo codes when the user has already copied the code
|
|
29
29
|
*
|
|
30
30
|
* @uiName Notification text
|
|
31
31
|
*/
|
|
@@ -39,7 +39,7 @@ export class ReferralCode {
|
|
|
39
39
|
/**
|
|
40
40
|
* Change the text alignment
|
|
41
41
|
*
|
|
42
|
-
* @uiName
|
|
42
|
+
* @uiName Referral code alignment
|
|
43
43
|
* @uiType string
|
|
44
44
|
* @uiEnum ["left", "center", "right"]
|
|
45
45
|
* @uiEnumNames ["Left", "Center", "Right"]
|
|
@@ -151,7 +151,7 @@ export class ReferralCode {
|
|
|
151
151
|
"text": "Notification text",
|
|
152
152
|
"name": "uiName"
|
|
153
153
|
}],
|
|
154
|
-
"text": "Shown underneath
|
|
154
|
+
"text": "Shown underneath single-use promo codes when the user has already copied the code"
|
|
155
155
|
},
|
|
156
156
|
"attribute": "notification-text",
|
|
157
157
|
"reflect": false,
|
|
@@ -190,7 +190,7 @@ export class ReferralCode {
|
|
|
190
190
|
"optional": false,
|
|
191
191
|
"docs": {
|
|
192
192
|
"tags": [{
|
|
193
|
-
"text": "
|
|
193
|
+
"text": "Referral code alignment",
|
|
194
194
|
"name": "uiName"
|
|
195
195
|
}, {
|
|
196
196
|
"text": "string",
|
|
@@ -264,7 +264,7 @@ export class ReferralCode {
|
|
|
264
264
|
"mutable": false,
|
|
265
265
|
"complexType": {
|
|
266
266
|
"original": "DemoData<CopyTextViewProps>",
|
|
267
|
-
"resolved": "{ loading?: boolean; copyString?: string; tooltiptext?: string; open?: boolean; copyButtonLabel?: string; disabled?: boolean; textAlign?: \"left\" | \"right\" | \"center\"; buttonStyle?: \"icon\" | \"button-outside\" | \"button-below\"; error?: boolean; errorText?: string; notificationText?: string; showNotificationText?: boolean; inputPlaceholderText?: string; dateAvailable?: string; onClick?: () => void; }",
|
|
267
|
+
"resolved": "{ loading?: boolean; copyString?: string; tooltiptext?: string; open?: boolean; copyButtonLabel?: string; disabled?: boolean; textAlign?: \"left\" | \"right\" | \"center\"; buttonStyle?: \"icon\" | \"button-outside\" | \"button-below\"; error?: boolean; errorText?: string; notificationText?: string; showNotificationText?: boolean; inputPlaceholderText?: string; dateAvailable?: string; isCopied?: boolean; onClick?: () => void; }",
|
|
268
268
|
"references": {
|
|
269
269
|
"DemoData": {
|
|
270
270
|
"location": "import",
|
|
@@ -302,6 +302,8 @@ function useDemoReferralCode(props) {
|
|
|
302
302
|
buttonStyle: props.buttonStyle,
|
|
303
303
|
notificationText: props.notificationText,
|
|
304
304
|
showNotificationText: props.showNotificationText,
|
|
305
|
+
isCopied: props.showNotificationText,
|
|
306
|
+
isUsed: false,
|
|
305
307
|
rewardStatus: "AVAILABLE",
|
|
306
308
|
open,
|
|
307
309
|
onClick: () => {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { useEngagementMedium, useMutation, useParentValue, useProgramId, useQuery, useUserIdentity, } from "@saasquatch/component-boilerplate";
|
|
2
2
|
import { useState } from "@saasquatch/universal-hooks";
|
|
3
3
|
import { gql } from "graphql-request";
|
|
4
|
-
import { REFERRAL_CODES_NAMESPACE,
|
|
4
|
+
import { REFERRAL_CODES_NAMESPACE, SET_CODE_COPIED, } from "../sqm-referral-codes/useReferralCodes";
|
|
5
5
|
const MessageLinkQuery = gql `
|
|
6
|
-
query ($programId: ID) {
|
|
6
|
+
query getReferralCode($programId: ID) {
|
|
7
7
|
user: viewer {
|
|
8
8
|
... on User {
|
|
9
9
|
referralCode(programId: $programId)
|
|
@@ -24,14 +24,15 @@ export function useReferralCode(props) {
|
|
|
24
24
|
const contextData = useParentValue(REFERRAL_CODES_NAMESPACE);
|
|
25
25
|
const { data } = useQuery(MessageLinkQuery, { programId }, !(user === null || user === void 0 ? void 0 : user.jwt) || (contextData === null || contextData === void 0 ? void 0 : contextData.referralCode) !== undefined);
|
|
26
26
|
const [sendLoadEvent] = useMutation(WIDGET_ENGAGEMENT_EVENT);
|
|
27
|
-
const [
|
|
27
|
+
const [setCopied] = useMutation(SET_CODE_COPIED);
|
|
28
28
|
const copyString = (_b = ((contextData === null || contextData === void 0 ? void 0 : contextData.referralCode) || ((_a = data === null || data === void 0 ? void 0 : data.user) === null || _a === void 0 ? void 0 : _a.referralCode))) !== null && _b !== void 0 ? _b :
|
|
29
29
|
// Shown during loading
|
|
30
30
|
"...";
|
|
31
31
|
const [open, setOpen] = useState(false);
|
|
32
|
-
function onClick() {
|
|
32
|
+
async function onClick() {
|
|
33
33
|
if (contextData) {
|
|
34
|
-
|
|
34
|
+
await setCopied({ referralCode: contextData.referralCode });
|
|
35
|
+
contextData.refresh();
|
|
35
36
|
}
|
|
36
37
|
// Should well supported: https://developer.mozilla.org/en-US/docs/Web/API/Clipboard#browser_compatibility
|
|
37
38
|
// Only if called from a user-initiated event
|
|
@@ -51,5 +52,12 @@ export function useReferralCode(props) {
|
|
|
51
52
|
},
|
|
52
53
|
});
|
|
53
54
|
}
|
|
54
|
-
return {
|
|
55
|
+
return {
|
|
56
|
+
...props,
|
|
57
|
+
onClick,
|
|
58
|
+
open,
|
|
59
|
+
copyString: copyString,
|
|
60
|
+
isCopied: contextData === null || contextData === void 0 ? void 0 : contextData.isCopied,
|
|
61
|
+
showNotificationText: props.showNotificationText && !!(contextData === null || contextData === void 0 ? void 0 : contextData.singleUse),
|
|
62
|
+
};
|
|
55
63
|
}
|
|
@@ -6,6 +6,16 @@ export default {
|
|
|
6
6
|
scenario,
|
|
7
7
|
},
|
|
8
8
|
};
|
|
9
|
+
const demoData = {
|
|
10
|
+
titleText: "Start sharing",
|
|
11
|
+
emptyStateHeaderText: "Your new codes and links aren’t ready yet",
|
|
12
|
+
emptyStateDescriptionText: "Please contact our program support team to let them know you’re out of codes.",
|
|
13
|
+
emptyStateImageUrl: "https://res.cloudinary.com/saasquatch/image/upload/v1644360953/squatch-assets/empty_leaderboard2.png",
|
|
14
|
+
states: {
|
|
15
|
+
noCodes: false,
|
|
16
|
+
loading: false,
|
|
17
|
+
},
|
|
18
|
+
};
|
|
9
19
|
const pagination = (slot) => {
|
|
10
20
|
return h("sqm-pagination", { slot: slot });
|
|
11
21
|
};
|
|
@@ -33,3 +43,23 @@ export const WithPreviouslyCopiedCode = () => {
|
|
|
33
43
|
shareCodeWithPreviouslyCopied("shareCodes"),
|
|
34
44
|
shareButtons("shareButtons")));
|
|
35
45
|
};
|
|
46
|
+
export const Empty = () => {
|
|
47
|
+
return (h("sqm-referral-codes", { demoData: { states: { ...demoData.states, noCodes: true } } },
|
|
48
|
+
pagination("pagination"),
|
|
49
|
+
shareCodes("shareCodes"),
|
|
50
|
+
shareButtons("shareButtons")));
|
|
51
|
+
};
|
|
52
|
+
export const EmptyWithCustomTextAndImage = () => {
|
|
53
|
+
return (h("sqm-referral-codes", { emptyStateHeaderText: "Tus nuevos c\u00F3digos y enlaces a\u00FAn no est\u00E1n listos", emptyStateDescriptionText: "Comun\u00EDquese con nuestro equipo de soporte del programa para informarles que no tiene c\u00F3digos.", emptyStateImageUrl: "https://img.freepik.com/free-vector/hand-drawn-no-data-concept_52683-127829.jpg?t=st=1738890457~exp=1738894057~hmac=2f0f32c1f0fc051f47d772a4517e2e4c4f38af5069fb855edc96d8331d9d1329&w=826", demoData: {
|
|
54
|
+
states: { ...demoData.states, noCodes: true },
|
|
55
|
+
} },
|
|
56
|
+
pagination("pagination"),
|
|
57
|
+
shareCodes("shareCodes"),
|
|
58
|
+
shareButtons("shareButtons")));
|
|
59
|
+
};
|
|
60
|
+
export const Loading = () => {
|
|
61
|
+
return (h("sqm-referral-codes", { demoData: { states: { ...demoData.states, loading: true } } },
|
|
62
|
+
pagination("pagination"),
|
|
63
|
+
shareCodes("shareCodes"),
|
|
64
|
+
shareButtons("shareButtons")));
|
|
65
|
+
};
|
|
@@ -46,14 +46,24 @@ const vanillaStyle = `
|
|
|
46
46
|
const sheet = createStyleSheet(style);
|
|
47
47
|
const styleString = sheet.toString();
|
|
48
48
|
export function ReferralCodesView(props) {
|
|
49
|
-
const { slots, titleText } = props;
|
|
49
|
+
const { slots, titleText, states } = props;
|
|
50
|
+
const getSlotContent = (states) => {
|
|
51
|
+
if (states.noCodes) {
|
|
52
|
+
return slots.empty;
|
|
53
|
+
}
|
|
54
|
+
if (states.loading) {
|
|
55
|
+
return slots.loading;
|
|
56
|
+
}
|
|
57
|
+
return (h("div", { class: sheet.classes.Wrapper },
|
|
58
|
+
h("div", { class: sheet.classes.ShareCodeContainer }, slots.shareCodes),
|
|
59
|
+
h("div", { class: sheet.classes.ShareButtonContainer }, slots.shareButtons)));
|
|
60
|
+
};
|
|
50
61
|
return (h("div", { class: sheet.classes.Wrapper, part: "sqm-base" },
|
|
51
62
|
h("style", { type: "text/css" },
|
|
52
63
|
vanillaStyle,
|
|
53
64
|
styleString),
|
|
54
65
|
h("div", { class: sheet.classes.HeaderContainer },
|
|
55
66
|
h("h2", { class: sheet.classes.TitleText }, titleText),
|
|
56
|
-
slots.pagination),
|
|
57
|
-
|
|
58
|
-
h("div", { class: sheet.classes.ShareButtonContainer }, slots.shareButtons)));
|
|
67
|
+
!states.noCodes && !states.loading && slots.pagination),
|
|
68
|
+
getSlotContent(states)));
|
|
59
69
|
}
|
|
@@ -3,19 +3,32 @@ import { withHooks } from "@saasquatch/stencil-hooks";
|
|
|
3
3
|
import { Component, Prop, h } from "@stencil/core";
|
|
4
4
|
import deepmerge from "deepmerge";
|
|
5
5
|
import { getProps } from "../../utils/utils";
|
|
6
|
-
import { useReferralCodes } from "./useReferralCodes";
|
|
7
6
|
import { ReferralCodesView, } from "./sqm-referral-codes-view";
|
|
7
|
+
import { useReferralCodes } from "./useReferralCodes";
|
|
8
8
|
/**
|
|
9
|
-
* @uiName
|
|
9
|
+
* @uiName Promo Codes
|
|
10
|
+
* @slots [{"name":"", "title":"Promo Codes Content"}]
|
|
10
11
|
* @exampleGroup Sharing
|
|
11
|
-
* @example
|
|
12
|
+
* @example Promo Codes - <sqm-referral-codes><sqm-pagination slot="pagination"></sqm-pagination><sqm-referral-code slot="shareCodes" show-notification-text="true"></sqm-referral-code><sqm-portal-container gap="small" slot="shareButtons"><sqm-share-button medium="email">Share via email</sqm-share-button><sqm-share-button medium="fbmessenger">Share on Facebook</sqm-share-button><sqm-share-button medium="whatsapp">Share on WhatsApp</sqm-share-button></sqm-portal-container></sqm-referral-codes>
|
|
12
13
|
*/
|
|
13
14
|
export class ReferralCodes {
|
|
14
15
|
constructor() {
|
|
15
16
|
/**
|
|
16
17
|
* @uiName Title Text
|
|
17
18
|
*/
|
|
18
|
-
this.titleText = "
|
|
19
|
+
this.titleText = "Start sharing";
|
|
20
|
+
/**
|
|
21
|
+
* @uiName Empty State Header Text
|
|
22
|
+
*/
|
|
23
|
+
this.emptyStateHeaderText = "Your new codes and links aren’t ready yet";
|
|
24
|
+
/**
|
|
25
|
+
* @uiName Empty State Description Text
|
|
26
|
+
*/
|
|
27
|
+
this.emptyStateDescriptionText = "Please contact our program support team to let them know you’re out of codes.";
|
|
28
|
+
/**
|
|
29
|
+
* @uiName Empty State Image URL
|
|
30
|
+
*/
|
|
31
|
+
this.emptyStateImageUrl = "https://res.cloudinary.com/saasquatch/image/upload/v1644360953/squatch-assets/empty_leaderboard2.png";
|
|
19
32
|
withHooks(this);
|
|
20
33
|
}
|
|
21
34
|
disconnectedCallback() { }
|
|
@@ -24,11 +37,12 @@ export class ReferralCodes {
|
|
|
24
37
|
const props = isDemo()
|
|
25
38
|
? useDemoReferralCodes(thisProps)
|
|
26
39
|
: useReferralCodes(thisProps);
|
|
27
|
-
console.log(props);
|
|
28
40
|
const slots = {
|
|
29
41
|
shareButtons: h("slot", { name: "shareButtons" }),
|
|
30
42
|
shareCodes: h("slot", { name: "shareCodes" }),
|
|
31
43
|
pagination: h("slot", { name: "pagination" }),
|
|
44
|
+
empty: (h(EmptySlot, { headerText: this.emptyStateHeaderText, descriptionText: this.emptyStateDescriptionText, imageUrl: this.emptyStateImageUrl })),
|
|
45
|
+
loading: h(LoadingSlot, null),
|
|
32
46
|
};
|
|
33
47
|
const viewProps = {
|
|
34
48
|
slots,
|
|
@@ -60,14 +74,100 @@ export class ReferralCodes {
|
|
|
60
74
|
},
|
|
61
75
|
"attribute": "title-text",
|
|
62
76
|
"reflect": false,
|
|
63
|
-
"defaultValue": "\"
|
|
77
|
+
"defaultValue": "\"Start sharing\""
|
|
78
|
+
},
|
|
79
|
+
"emptyStateHeaderText": {
|
|
80
|
+
"type": "string",
|
|
81
|
+
"mutable": false,
|
|
82
|
+
"complexType": {
|
|
83
|
+
"original": "string",
|
|
84
|
+
"resolved": "string",
|
|
85
|
+
"references": {}
|
|
86
|
+
},
|
|
87
|
+
"required": false,
|
|
88
|
+
"optional": true,
|
|
89
|
+
"docs": {
|
|
90
|
+
"tags": [{
|
|
91
|
+
"text": "Empty State Header Text",
|
|
92
|
+
"name": "uiName"
|
|
93
|
+
}],
|
|
94
|
+
"text": ""
|
|
95
|
+
},
|
|
96
|
+
"attribute": "empty-state-header-text",
|
|
97
|
+
"reflect": false,
|
|
98
|
+
"defaultValue": "\"Your new codes and links aren\u2019t ready yet\""
|
|
99
|
+
},
|
|
100
|
+
"emptyStateDescriptionText": {
|
|
101
|
+
"type": "string",
|
|
102
|
+
"mutable": false,
|
|
103
|
+
"complexType": {
|
|
104
|
+
"original": "string",
|
|
105
|
+
"resolved": "string",
|
|
106
|
+
"references": {}
|
|
107
|
+
},
|
|
108
|
+
"required": false,
|
|
109
|
+
"optional": true,
|
|
110
|
+
"docs": {
|
|
111
|
+
"tags": [{
|
|
112
|
+
"text": "Empty State Description Text",
|
|
113
|
+
"name": "uiName"
|
|
114
|
+
}],
|
|
115
|
+
"text": ""
|
|
116
|
+
},
|
|
117
|
+
"attribute": "empty-state-description-text",
|
|
118
|
+
"reflect": false,
|
|
119
|
+
"defaultValue": "\"Please contact our program support team to let them know you\u2019re out of codes.\""
|
|
120
|
+
},
|
|
121
|
+
"emptyStateImageUrl": {
|
|
122
|
+
"type": "string",
|
|
123
|
+
"mutable": false,
|
|
124
|
+
"complexType": {
|
|
125
|
+
"original": "string",
|
|
126
|
+
"resolved": "string",
|
|
127
|
+
"references": {}
|
|
128
|
+
},
|
|
129
|
+
"required": false,
|
|
130
|
+
"optional": true,
|
|
131
|
+
"docs": {
|
|
132
|
+
"tags": [{
|
|
133
|
+
"text": "Empty State Image URL",
|
|
134
|
+
"name": "uiName"
|
|
135
|
+
}],
|
|
136
|
+
"text": ""
|
|
137
|
+
},
|
|
138
|
+
"attribute": "empty-state-image-url",
|
|
139
|
+
"reflect": false,
|
|
140
|
+
"defaultValue": "\"https://res.cloudinary.com/saasquatch/image/upload/v1644360953/squatch-assets/empty_leaderboard2.png\""
|
|
141
|
+
},
|
|
142
|
+
"programId": {
|
|
143
|
+
"type": "string",
|
|
144
|
+
"mutable": false,
|
|
145
|
+
"complexType": {
|
|
146
|
+
"original": "string",
|
|
147
|
+
"resolved": "string",
|
|
148
|
+
"references": {}
|
|
149
|
+
},
|
|
150
|
+
"required": false,
|
|
151
|
+
"optional": true,
|
|
152
|
+
"docs": {
|
|
153
|
+
"tags": [{
|
|
154
|
+
"text": "Program ID",
|
|
155
|
+
"name": "uiName"
|
|
156
|
+
}, {
|
|
157
|
+
"text": "programSelector",
|
|
158
|
+
"name": "uiWidget"
|
|
159
|
+
}],
|
|
160
|
+
"text": ""
|
|
161
|
+
},
|
|
162
|
+
"attribute": "program-id",
|
|
163
|
+
"reflect": false
|
|
64
164
|
},
|
|
65
165
|
"demoData": {
|
|
66
166
|
"type": "unknown",
|
|
67
167
|
"mutable": false,
|
|
68
168
|
"complexType": {
|
|
69
169
|
"original": "DemoData<ReferralCodesViewProps>",
|
|
70
|
-
"resolved": "{ slots?: { shareButtons: VNode; shareCodes: VNode; pagination: VNode;
|
|
170
|
+
"resolved": "{ states?: { noCodes: boolean; loading: boolean; }; slots?: { shareButtons: VNode; shareCodes: VNode; pagination: VNode; empty: VNode; loading: VNode; }; titleText?: string; }",
|
|
71
171
|
"references": {
|
|
72
172
|
"DemoData": {
|
|
73
173
|
"location": "import",
|
|
@@ -94,6 +194,20 @@ export class ReferralCodes {
|
|
|
94
194
|
}
|
|
95
195
|
}; }
|
|
96
196
|
}
|
|
197
|
+
function EmptySlot({ headerText, descriptionText, imageUrl, }) {
|
|
198
|
+
return (h("slot", { name: "empty" },
|
|
199
|
+
h("sqm-empty", { emptyStateHeader: headerText, emptyStateText: descriptionText, emptyStateImage: imageUrl })));
|
|
200
|
+
}
|
|
201
|
+
function LoadingSlot() {
|
|
202
|
+
return (h("slot", { name: "loading" },
|
|
203
|
+
h(LoadingRow, null),
|
|
204
|
+
h(LoadingRow, null),
|
|
205
|
+
h(LoadingRow, null),
|
|
206
|
+
h(LoadingRow, null)));
|
|
207
|
+
}
|
|
208
|
+
function LoadingRow() {
|
|
209
|
+
return h("sl-skeleton", { style: { width: "100%" } });
|
|
210
|
+
}
|
|
97
211
|
function useDemoReferralCodes(props) {
|
|
98
212
|
return deepmerge({
|
|
99
213
|
titleText: props.titleText,
|