@saasquatch/mint-components 1.11.0 → 1.11.1-0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{ShadowViewAddon-c3e91cee.js → ShadowViewAddon-2c6026c3.js} +137 -212
- package/dist/cjs/copy-text-view-a22ad7e7.js +173 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/mint-components.cjs.js +1 -1
- package/dist/cjs/sqm-asset-card.cjs.entry.js +1 -1
- package/dist/cjs/sqm-banking-info-form_16.cjs.entry.js +3 -3
- package/dist/cjs/sqm-big-stat_38.cjs.entry.js +6 -5
- package/dist/cjs/sqm-close-button.cjs.entry.js +2 -2
- package/dist/cjs/sqm-empty_4.cjs.entry.js +1 -1
- package/dist/cjs/sqm-instant-access-registration.cjs.entry.js +2 -2
- package/dist/cjs/sqm-logout-current-user.cjs.entry.js +2 -2
- package/dist/cjs/sqm-navigation-sidebar-item.cjs.entry.js +3 -3
- package/dist/cjs/sqm-pagination_3.cjs.entry.js +313 -0
- package/dist/cjs/sqm-password-field.cjs.entry.js +2 -2
- package/dist/cjs/sqm-portal-email-verification.cjs.entry.js +2 -2
- package/dist/cjs/sqm-portal-forgot-password.cjs.entry.js +2 -2
- package/dist/cjs/sqm-portal-profile.cjs.entry.js +2 -2
- package/dist/cjs/sqm-portal-registration-form.cjs.entry.js +1 -1
- package/dist/cjs/sqm-portal-reset-password.cjs.entry.js +3 -3
- package/dist/cjs/sqm-portal-verify-email.cjs.entry.js +3 -3
- package/dist/cjs/sqm-referral-table_11.cjs.entry.js +3 -3
- package/dist/cjs/sqm-referred-registration.cjs.entry.js +2 -2
- package/dist/cjs/sqm-rewards-table_9.cjs.entry.js +3 -3
- package/dist/cjs/sqm-stencilbook.cjs.entry.js +241 -84
- package/dist/cjs/sqm-tabs.cjs.entry.js +1 -1
- package/dist/collection/collection-manifest.json +10 -0
- package/dist/collection/components/sqm-coupon-code/sqm-coupon-code.js +1 -1
- package/dist/collection/components/sqm-logout-current-user/sqm-logout-current-user.js +1 -1
- package/dist/collection/components/sqm-pagination/Pagination.stories.js +12 -0
- package/dist/collection/components/sqm-pagination/sqm-pagination-view.js +30 -0
- package/dist/collection/components/sqm-pagination/sqm-pagination.js +85 -0
- package/dist/collection/components/sqm-pagination/usePagination.js +8 -0
- package/dist/collection/components/sqm-referral-card/ReferralCard.stories.js +20 -0
- package/dist/collection/components/sqm-referral-code/ReferralCode.stories.js +60 -0
- package/dist/collection/components/sqm-referral-code/sqm-referral-code.js +315 -0
- package/dist/collection/components/sqm-referral-code/useReferralCode.js +51 -0
- package/dist/collection/components/sqm-referral-codes/ReferralCodes.stories.js +35 -0
- package/dist/collection/components/sqm-referral-codes/sqm-referral-codes-view.js +59 -0
- package/dist/collection/components/sqm-referral-codes/sqm-referral-codes.js +93 -0
- package/dist/collection/components/sqm-referral-codes/useReferralCodes.js +75 -0
- package/dist/collection/components/sqm-share-button/useShareButton.js +15 -16
- 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 -3
- package/dist/collection/components/sqm-stencilbook/sqm-stencilbook.js +6 -0
- package/dist/collection/components/views/copy-text-view.js +16 -2
- package/dist/esm/{ShadowViewAddon-e012b2aa.js → ShadowViewAddon-5bb2b69a.js} +140 -214
- package/dist/esm/copy-text-view-bf55abeb.js +168 -0
- package/dist/esm/{global-04c7d3b5.js → global-b89b6edc.js} +1 -1
- package/dist/esm/{index.module-def4aec5.js → index.module-f122af7b.js} +1 -1
- package/dist/esm/loader.js +3 -3
- package/dist/esm/mint-components.js +3 -3
- package/dist/esm/{re-render-12fd274a.js → re-render-c64289f3.js} +1 -1
- package/dist/esm/sqm-asset-card.entry.js +2 -2
- package/dist/esm/sqm-banking-info-form_16.entry.js +9 -9
- package/dist/esm/sqm-big-stat_38.entry.js +10 -9
- package/dist/esm/sqm-close-button.entry.js +3 -3
- package/dist/esm/sqm-context-router.entry.js +1 -1
- package/dist/esm/sqm-empty_4.entry.js +3 -3
- package/dist/esm/sqm-graphql-client-provider.entry.js +1 -1
- package/dist/esm/sqm-instant-access-registration.entry.js +5 -5
- package/dist/esm/{sqm-invoice-table-view-6e13a323.js → sqm-invoice-table-view-09cc28d6.js} +1 -1
- package/dist/esm/sqm-leaderboard-rank.entry.js +2 -2
- package/dist/esm/sqm-logout-current-user.entry.js +3 -3
- package/dist/esm/{sqm-navigation-sidebar-item-view-60ef06cc.js → sqm-navigation-sidebar-item-view-14114804.js} +2 -2
- package/dist/esm/sqm-navigation-sidebar-item.entry.js +4 -4
- package/dist/esm/sqm-navigation-sidebar.entry.js +1 -1
- package/dist/esm/sqm-pagination_3.entry.js +307 -0
- package/dist/esm/sqm-password-field.entry.js +4 -4
- package/dist/esm/sqm-popup-container.entry.js +1 -1
- package/dist/esm/{sqm-portal-email-verification-view-4307c992.js → sqm-portal-email-verification-view-ced567c9.js} +2 -2
- package/dist/esm/sqm-portal-email-verification.entry.js +4 -4
- package/dist/esm/sqm-portal-forgot-password.entry.js +3 -3
- package/dist/esm/sqm-portal-logout.entry.js +1 -1
- package/dist/esm/{sqm-portal-profile-view-ffe955c8.js → sqm-portal-profile-view-d72dd5ac.js} +1 -1
- package/dist/esm/sqm-portal-profile.entry.js +6 -6
- package/dist/esm/sqm-portal-protected-route.entry.js +1 -1
- package/dist/esm/sqm-portal-registration-form.entry.js +3 -3
- package/dist/esm/sqm-portal-reset-password.entry.js +4 -4
- package/dist/esm/sqm-portal-verify-email.entry.js +4 -4
- package/dist/esm/sqm-referral-table_11.entry.js +8 -8
- package/dist/esm/sqm-referred-registration.entry.js +5 -5
- package/dist/esm/sqm-rewards-table-customer-note-column.entry.js +2 -2
- package/dist/esm/sqm-rewards-table_9.entry.js +8 -8
- package/dist/esm/sqm-stencilbook.entry.js +234 -77
- package/dist/esm/sqm-tab.entry.js +2 -2
- package/dist/esm/sqm-tabs.entry.js +3 -3
- package/dist/esm/{useChildElements-32e1bda1.js → useChildElements-37daf533.js} +1 -1
- package/dist/esm/{useInstantAccessRegistration-46b89952.js → useInstantAccessRegistration-9d4cb797.js} +2 -2
- package/dist/esm/{useReferralTable-f4de0650.js → useReferralTable-42f99ea2.js} +3 -3
- package/dist/esm/{useRegistrationFormState-9fc1ac80.js → useRegistrationFormState-53c71782.js} +1 -1
- package/dist/esm/{utilities-3f5bba22.js → utilities-18d10876.js} +1 -1
- package/dist/esm-es5/{GenericTableView-d59d8ab4.js → GenericTableView-bf154727.js} +1 -1
- package/dist/esm-es5/ShadowViewAddon-5bb2b69a.js +1 -0
- package/dist/esm-es5/copy-text-view-bf55abeb.js +1 -0
- package/dist/esm-es5/{email-registration-view-a89a88bf.js → email-registration-view-12793040.js} +1 -1
- package/dist/esm-es5/{global-04c7d3b5.js → global-b89b6edc.js} +1 -1
- package/dist/esm-es5/{index.module-def4aec5.js → index.module-f122af7b.js} +1 -1
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/mint-components.js +1 -1
- package/dist/esm-es5/{re-render-12fd274a.js → re-render-c64289f3.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-dc65b4e3.js → sqm-close-button-view-b24c708b.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-graphql-client-provider.entry.js +1 -1
- package/dist/esm-es5/sqm-instant-access-registration.entry.js +1 -1
- package/dist/esm-es5/{sqm-invoice-table-view-6e13a323.js → sqm-invoice-table-view-09cc28d6.js} +1 -1
- package/dist/esm-es5/sqm-leaderboard-rank.entry.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 +1 -0
- package/dist/esm-es5/sqm-navigation-sidebar-item.entry.js +1 -1
- package/dist/esm-es5/sqm-navigation-sidebar.entry.js +1 -1
- package/dist/esm-es5/sqm-pagination_3.entry.js +1 -0
- 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-email-verification-view-4307c992.js → sqm-portal-email-verification-view-ced567c9.js} +1 -1
- package/dist/esm-es5/sqm-portal-email-verification.entry.js +1 -1
- package/dist/esm-es5/{sqm-portal-forgot-password-view-c2ed8fed.js → sqm-portal-forgot-password-view-95cd454f.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-ffe955c8.js → sqm-portal-profile-view-d72dd5ac.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-79a85e02.js → sqm-portal-reset-password-view-f1454d43.js} +1 -1
- package/dist/esm-es5/sqm-portal-reset-password.entry.js +1 -1
- package/dist/esm-es5/{sqm-portal-verify-email-view-d7ea2c56.js → sqm-portal-verify-email-view-3739f523.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-column.entry.js +1 -1
- package/dist/esm-es5/sqm-rewards-table_9.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/{useChildElements-32e1bda1.js → useChildElements-37daf533.js} +1 -1
- package/dist/esm-es5/{useInstantAccessRegistration-46b89952.js → useInstantAccessRegistration-9d4cb797.js} +1 -1
- package/dist/esm-es5/{useReferralTable-f4de0650.js → useReferralTable-42f99ea2.js} +1 -1
- package/dist/esm-es5/useRegistrationFormState-53c71782.js +1 -0
- package/dist/esm-es5/{utilities-3f5bba22.js → utilities-18d10876.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-a8f7cb95.js → p-00be5090.js} +1 -1
- package/dist/mint-components/{p-7049e9b0.entry.js → p-01434e4a.entry.js} +1 -1
- package/dist/mint-components/{p-c5d2e4ba.js → p-02f6cda4.js} +1 -1
- package/dist/mint-components/{p-4e48267b.system.js → p-03a647c2.system.js} +1 -1
- package/dist/mint-components/{p-509e29e6.js → p-0806343b.js} +1 -1
- package/dist/mint-components/{p-3d4656bb.system.js → p-0f028514.system.js} +1 -1
- package/dist/mint-components/{p-b370fca8.system.js → p-1099290c.system.js} +1 -1
- package/dist/mint-components/{p-d8d2de11.entry.js → p-110dddfe.entry.js} +1 -1
- package/dist/mint-components/{p-137ea86e.entry.js → p-12c56ba6.entry.js} +1 -1
- package/dist/mint-components/{p-5cac90e8.system.entry.js → p-14dac608.system.entry.js} +1 -1
- package/dist/mint-components/p-1537b6ef.system.entry.js +1 -0
- package/dist/mint-components/{p-d49e2f7a.js → p-15dee492.js} +1 -1
- package/dist/mint-components/{p-c5577dd7.system.js → p-18a19cb5.system.js} +1 -1
- package/dist/mint-components/{p-711ba77e.system.entry.js → p-18a7f543.system.entry.js} +1 -1
- package/dist/mint-components/{p-a9050eb0.entry.js → p-1b1d10e5.entry.js} +1 -1
- package/dist/mint-components/{p-3ec16698.entry.js → p-1c6e4a5f.entry.js} +2 -2
- package/dist/mint-components/{p-32d1d162.entry.js → p-1c710e16.entry.js} +1 -1
- package/dist/mint-components/{p-01cfff8a.system.entry.js → p-1ce4fa30.system.entry.js} +1 -1
- package/dist/mint-components/{p-eaada4da.js → p-1df19ea2.js} +1 -1
- package/dist/mint-components/{p-02424350.system.js → p-21d4f6ce.system.js} +1 -1
- package/dist/mint-components/{p-733825fa.system.entry.js → p-22de9f73.system.entry.js} +1 -1
- package/dist/mint-components/{p-b4c52c5a.entry.js → p-246a2827.entry.js} +2 -2
- package/dist/mint-components/{p-8e907ac7.system.entry.js → p-26306ac4.system.entry.js} +1 -1
- package/dist/mint-components/p-2e16db11.entry.js +1 -0
- package/dist/mint-components/{p-1b9e6fc6.js → p-32cf8417.js} +1 -1
- package/dist/mint-components/{p-ce621bcc.js → p-3373d84e.js} +1 -1
- package/dist/mint-components/{p-56f14840.entry.js → p-3cc5474d.entry.js} +1 -1
- package/dist/mint-components/{p-7f088154.entry.js → p-41499327.entry.js} +1 -1
- package/dist/mint-components/{p-44787d6e.system.js → p-43a990b6.system.js} +1 -1
- package/dist/mint-components/{p-59fe4ad1.system.js → p-46ca288c.system.js} +1 -1
- package/dist/mint-components/{p-9f0629ba.system.entry.js → p-476182e7.system.entry.js} +1 -1
- package/dist/mint-components/p-4856b234.system.entry.js +1 -0
- package/dist/mint-components/{p-ec41d6a4.entry.js → p-48b7d703.entry.js} +6 -6
- package/dist/mint-components/p-494e407e.entry.js +1 -0
- package/dist/mint-components/{p-a51533cb.system.js → p-523ed056.system.js} +1 -1
- package/dist/mint-components/{p-eba44835.system.entry.js → p-53ff8bd0.system.entry.js} +1 -1
- package/dist/mint-components/{p-0d8c53ac.system.js → p-55588b46.system.js} +1 -1
- package/dist/mint-components/{p-3ed71bef.system.js → p-59c141a2.system.js} +1 -1
- package/dist/mint-components/p-5b7e2d53.entry.js +1 -0
- package/dist/mint-components/p-5c845bc2.system.entry.js +1 -0
- package/dist/mint-components/p-5d37482d.entry.js +1 -0
- package/dist/mint-components/p-5fc8d87c.system.js +1 -0
- package/dist/mint-components/p-646d302a.system.js +1 -0
- package/dist/mint-components/p-6628bc0e.system.js +1 -0
- package/dist/mint-components/p-66aac0fb.entry.js +13 -0
- package/dist/mint-components/{p-4502ed11.system.entry.js → p-67846dce.system.entry.js} +1 -1
- package/dist/mint-components/p-6b0e6a6c.js +1 -0
- package/dist/mint-components/{p-6cef104b.entry.js → p-6e62f207.entry.js} +1 -1
- package/dist/mint-components/{p-770368bc.system.js → p-6e7e8af6.system.js} +1 -1
- package/dist/mint-components/{p-3f385f47.entry.js → p-73c6b26d.entry.js} +9 -9
- package/dist/mint-components/{p-c84659a3.system.js → p-73decce7.system.js} +1 -1
- package/dist/mint-components/{p-58ef25d3.system.entry.js → p-7962ab58.system.entry.js} +1 -1
- package/dist/mint-components/{p-4edde470.entry.js → p-798ed3a2.entry.js} +1 -1
- package/dist/mint-components/{p-41a11a7f.js → p-8077e9c6.js} +1 -1
- package/dist/mint-components/{p-cf690d55.system.entry.js → p-82e09b8d.system.entry.js} +1 -1
- package/dist/mint-components/{p-fb93c962.js → p-855ae1b5.js} +1 -1
- package/dist/mint-components/p-89a760ea.js +1 -0
- package/dist/mint-components/{p-af062c8f.system.entry.js → p-8c97bfb1.system.entry.js} +1 -1
- package/dist/mint-components/{p-a7c2ced2.system.entry.js → p-9288cca6.system.entry.js} +1 -1
- package/dist/mint-components/{p-1c857edb.entry.js → p-942d1c22.entry.js} +2 -2
- package/dist/mint-components/{p-86990110.entry.js → p-96cb9c17.entry.js} +1 -1
- package/dist/mint-components/{p-2ee2ebba.js → p-991c9787.js} +2 -2
- package/dist/mint-components/{p-8704937c.js → p-9c3d78e9.js} +1 -1
- package/dist/mint-components/{p-674a64fe.system.js → p-9deac406.system.js} +1 -1
- package/dist/mint-components/{p-1dd69917.system.entry.js → p-a1150633.system.entry.js} +1 -1
- package/dist/mint-components/{p-b5861974.system.entry.js → p-a474b0ec.system.entry.js} +1 -1
- package/dist/mint-components/{p-9c310991.system.entry.js → p-acc93caa.system.entry.js} +1 -1
- package/dist/mint-components/{p-9df2fe24.entry.js → p-b0ce005d.entry.js} +2 -2
- package/dist/mint-components/{p-e5a0c50e.entry.js → p-b334bde8.entry.js} +2 -2
- package/dist/mint-components/p-b4eb9c46.entry.js +11 -0
- package/dist/mint-components/p-b5176703.entry.js +1 -0
- package/dist/mint-components/p-b71c0e2d.system.entry.js +1 -0
- package/dist/mint-components/{p-7d5e0645.system.js → p-bb6f6681.system.js} +1 -1
- package/dist/mint-components/p-bd4e9c2b.js +1 -0
- package/dist/mint-components/{p-ed095674.system.js → p-bf834367.system.js} +1 -1
- package/dist/mint-components/{p-07f675ab.system.entry.js → p-c1ba2ad0.system.entry.js} +1 -1
- package/dist/mint-components/p-c37137cd.js +2 -0
- package/dist/mint-components/{p-be4b748a.system.entry.js → p-c39f9dc1.system.entry.js} +1 -1
- package/dist/mint-components/p-c7ce2c1e.system.js +1 -0
- package/dist/mint-components/p-ca17d998.entry.js +1 -0
- package/dist/mint-components/{p-e8dde8f4.system.js → p-ce746af8.system.js} +1 -1
- package/dist/mint-components/{p-2dd67762.entry.js → p-cfbe2f86.entry.js} +1 -1
- package/dist/mint-components/{p-3223ba7b.entry.js → p-d3d281ff.entry.js} +1 -1
- package/dist/mint-components/p-d666b326.js +1 -0
- package/dist/mint-components/{p-a1dba9a1.system.entry.js → p-d68ed4a6.system.entry.js} +1 -1
- package/dist/mint-components/{p-4ea58025.system.entry.js → p-daba8cd2.system.entry.js} +1 -1
- package/dist/mint-components/p-dc41ff27.entry.js +1 -0
- package/dist/mint-components/{p-afd366ae.system.entry.js → p-de2a8fae.system.entry.js} +1 -1
- package/dist/mint-components/{p-8679ed9f.system.entry.js → p-e2bb72eb.system.entry.js} +1 -1
- package/dist/mint-components/{p-4d233cd4.js → p-e41cb11f.js} +1 -1
- package/dist/mint-components/{p-bb00db59.js → p-ea88142c.js} +1 -1
- package/dist/mint-components/{p-b6fc1227.system.entry.js → p-ec8a9e91.system.entry.js} +1 -1
- package/dist/mint-components/{p-5b333fa8.system.entry.js → p-ecefeaa9.system.entry.js} +1 -1
- package/dist/mint-components/{p-c8610d0c.js → p-ed161025.js} +1 -1
- package/dist/mint-components/p-f1ec1180.entry.js +1 -0
- package/dist/mint-components/{p-4df8f1d2.system.js → p-f44d88fa.system.js} +1 -1
- package/dist/mint-components/{p-35d84041.system.entry.js → p-f52c3aec.system.entry.js} +1 -1
- package/dist/mint-components/{p-aad11a68.entry.js → p-fae82751.entry.js} +1 -1
- package/dist/mint-components/{p-fb20eb5e.system.entry.js → p-fb2c0ce4.system.entry.js} +1 -1
- package/dist/mint-components/{p-10685090.js → p-fec0ac31.js} +24 -24
- package/dist/mint-components/{p-7731f793.system.entry.js → p-ff41c804.system.entry.js} +1 -1
- package/dist/types/components/sqm-pagination/Pagination.stories.d.ts +5 -0
- package/dist/types/components/sqm-pagination/sqm-pagination-view.d.ts +7 -0
- package/dist/types/components/sqm-pagination/sqm-pagination.d.ts +17 -0
- package/dist/types/components/sqm-pagination/usePagination.d.ts +15 -0
- package/dist/types/components/sqm-referral-card/ReferralCard.stories.d.ts +1 -0
- package/dist/types/components/sqm-referral-code/ReferralCode.stories.d.ts +18 -0
- package/dist/types/components/sqm-referral-code/sqm-referral-code.d.ts +70 -0
- package/dist/types/components/sqm-referral-code/useReferralCode.d.ts +9 -0
- package/dist/types/components/sqm-referral-codes/ReferralCodes.stories.d.ts +9 -0
- package/dist/types/components/sqm-referral-codes/sqm-referral-codes-view.d.ts +10 -0
- package/dist/types/components/sqm-referral-codes/sqm-referral-codes.d.ts +18 -0
- package/dist/types/components/sqm-referral-codes/useReferralCodes.d.ts +59 -0
- package/dist/types/components/sqm-share-link/useShareLink.d.ts +1 -0
- package/dist/types/components/views/copy-text-view.d.ts +2 -0
- package/dist/types/components.d.ts +164 -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-e012b2aa.js +0 -1
- package/dist/esm-es5/sqm-navigation-sidebar-item-view-60ef06cc.js +0 -1
- package/dist/esm-es5/useRegistrationFormState-9fc1ac80.js +0 -1
- package/dist/mint-components/p-021a735d.entry.js +0 -1
- package/dist/mint-components/p-03494732.entry.js +0 -1
- package/dist/mint-components/p-0b9fa97f.js +0 -1
- package/dist/mint-components/p-10e89d0a.entry.js +0 -1
- package/dist/mint-components/p-51f517a2.js +0 -1
- package/dist/mint-components/p-5be235f9.entry.js +0 -1
- package/dist/mint-components/p-5f1c4160.system.entry.js +0 -1
- package/dist/mint-components/p-61eab172.js +0 -1
- package/dist/mint-components/p-76b2506e.system.entry.js +0 -1
- package/dist/mint-components/p-79191f88.entry.js +0 -1
- package/dist/mint-components/p-8b5b78ca.entry.js +0 -1
- package/dist/mint-components/p-91669312.entry.js +0 -1
- package/dist/mint-components/p-95771f79.system.js +0 -1
- package/dist/mint-components/p-a6a7dcaa.js +0 -1
- package/dist/mint-components/p-ce5afa40.entry.js +0 -1
- package/dist/mint-components/p-d495896f.system.entry.js +0 -1
- package/dist/mint-components/p-dd7ee007.system.js +0 -1
- package/dist/mint-components/p-e3735866.entry.js +0 -11
- package/dist/mint-components/p-ed17e637.system.js +0 -1
- package/dist/cjs/{GenericTableView-80d7642e.js → GenericTableView-a3f48e15.js} +1 -1
- package/dist/cjs/{email-registration-view-248652bb.js → email-registration-view-4c5d9379.js} +1 -1
- package/dist/cjs/{sqm-close-button-view-fd6e8f60.js → sqm-close-button-view-217239b7.js} +1 -1
- package/dist/cjs/{sqm-navigation-sidebar-item-view-a125ec5f.js → sqm-navigation-sidebar-item-view-4e90b6f5.js} +1 -1
- package/dist/cjs/{sqm-portal-email-verification-view-292b5bf4.js → sqm-portal-email-verification-view-bff9783d.js} +1 -1
- package/dist/cjs/{sqm-portal-forgot-password-view-969c49ed.js → sqm-portal-forgot-password-view-3cd69fe7.js} +1 -1
- package/dist/cjs/{sqm-portal-reset-password-view-96f329ed.js → sqm-portal-reset-password-view-34771d2c.js} +1 -1
- package/dist/cjs/{sqm-portal-verify-email-view-7ffcc0d4.js → sqm-portal-verify-email-view-c8f91506.js} +1 -1
- package/dist/esm/{GenericTableView-d59d8ab4.js → GenericTableView-bf154727.js} +1 -1
- package/dist/esm/{email-registration-view-a89a88bf.js → email-registration-view-12793040.js} +1 -1
- package/dist/esm/{sqm-close-button-view-dc65b4e3.js → sqm-close-button-view-b24c708b.js} +1 -1
- package/dist/esm/{sqm-portal-forgot-password-view-c2ed8fed.js → sqm-portal-forgot-password-view-95cd454f.js} +1 -1
- package/dist/esm/{sqm-portal-reset-password-view-79a85e02.js → sqm-portal-reset-password-view-f1454d43.js} +1 -1
- package/dist/esm/{sqm-portal-verify-email-view-d7ea2c56.js → sqm-portal-verify-email-view-3739f523.js} +1 -1
|
@@ -5,9 +5,9 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
const index = require('./index-b0129cd6.js');
|
|
6
6
|
const stencilHooks_module = require('./stencil-hooks.module-72742a0b.js');
|
|
7
7
|
const index_module = require('./index.module-df530553.js');
|
|
8
|
+
const utils = require('./utils-6847bc06.js');
|
|
8
9
|
const reRender = require('./re-render-1976e05e.js');
|
|
9
10
|
const useChildElements = require('./useChildElements-e0d44916.js');
|
|
10
|
-
const utils = require('./utils-6847bc06.js');
|
|
11
11
|
|
|
12
12
|
const TabsView = ({ content, placement, }) => {
|
|
13
13
|
// Vertical padding for top & bottom placement, horizontal for left & right.
|
|
@@ -46,6 +46,8 @@
|
|
|
46
46
|
"./components/sqm-navigation-menu/sqm-navigation-menu.js",
|
|
47
47
|
"./components/sqm-navigation-sidebar/sqm-navigation-sidebar.js",
|
|
48
48
|
"./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",
|
|
49
51
|
"./components/sqm-popup-container/sqm-popup-container.js",
|
|
50
52
|
"./components/sqm-portal-change-password/sqm-portal-change-password.js",
|
|
51
53
|
"./components/sqm-portal-container/sqm-portal-container.js",
|
|
@@ -64,6 +66,7 @@
|
|
|
64
66
|
"./components/sqm-program-explainer-step/sqm-program-explainer-step.js",
|
|
65
67
|
"./components/sqm-program-menu/sqm-program-menu.js",
|
|
66
68
|
"./components/sqm-referral-card/sqm-referral-card.js",
|
|
69
|
+
"./components/sqm-referral-code/sqm-referral-code.js",
|
|
67
70
|
"./components/sqm-referral-iframe/sqm-referral-iframe.js",
|
|
68
71
|
"./components/sqm-referral-table/cells/sqm-referral-table-cell.js",
|
|
69
72
|
"./components/sqm-referral-table/cells/sqm-referral-table-date-cell.js",
|
|
@@ -116,6 +119,13 @@
|
|
|
116
119
|
},
|
|
117
120
|
"collections": [],
|
|
118
121
|
"bundles": [
|
|
122
|
+
{
|
|
123
|
+
"components": [
|
|
124
|
+
"sqm-pagination",
|
|
125
|
+
"sqm-referral-code",
|
|
126
|
+
"sqm-referral-codes"
|
|
127
|
+
]
|
|
128
|
+
},
|
|
119
129
|
{
|
|
120
130
|
"components": [
|
|
121
131
|
"sqm-rewards-table",
|
|
@@ -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; 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; onClick?: () => void; }",
|
|
479
479
|
"references": {
|
|
480
480
|
"DemoData": {
|
|
481
481
|
"location": "import",
|
|
@@ -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; 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; onClick?: () => void; }",
|
|
126
126
|
"references": {
|
|
127
127
|
"DemoData": {
|
|
128
128
|
"location": "import",
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { h } from "@stencil/core";
|
|
2
|
+
export default {
|
|
3
|
+
title: "Components/Link Button",
|
|
4
|
+
};
|
|
5
|
+
const defaultProps = {
|
|
6
|
+
link: "https://example.com",
|
|
7
|
+
openInNewTab: false,
|
|
8
|
+
buttonText: "Button Text",
|
|
9
|
+
};
|
|
10
|
+
export const Default = () => {
|
|
11
|
+
return h("sqm-pagination", null);
|
|
12
|
+
};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { h } from "@stencil/core";
|
|
2
|
+
import { createStyleSheet } from "../../styling/JSS";
|
|
3
|
+
const style = {
|
|
4
|
+
Container: {
|
|
5
|
+
display: "flex",
|
|
6
|
+
justifyContent: "flex-end",
|
|
7
|
+
alignItems: "center",
|
|
8
|
+
gap: "var(--sl-spacing-small)",
|
|
9
|
+
width: "100%",
|
|
10
|
+
},
|
|
11
|
+
TextContainer: {
|
|
12
|
+
display: "flex",
|
|
13
|
+
gap: "var(--sl-spacing-xx-small)",
|
|
14
|
+
},
|
|
15
|
+
};
|
|
16
|
+
const sheet = createStyleSheet(style);
|
|
17
|
+
const styleString = sheet.toString();
|
|
18
|
+
export function PaginationView(props) {
|
|
19
|
+
const { onNext, onPrev, currentPage, totalPages } = props;
|
|
20
|
+
return (h("span", { class: sheet.classes.Container, part: "sqm-base" },
|
|
21
|
+
h("style", { type: "text/css" }, styleString),
|
|
22
|
+
h("sl-button", { onClick: onPrev, part: "sqm-pagination-button", circle: true, disabled: currentPage === 1 },
|
|
23
|
+
h("sl-icon", { name: "chevron-left", label: "Previous Page" })),
|
|
24
|
+
h("div", { class: sheet.classes.TextContainer },
|
|
25
|
+
h("span", null, currentPage),
|
|
26
|
+
h("span", null, "of"),
|
|
27
|
+
h("span", null, totalPages)),
|
|
28
|
+
h("sl-button", { onClick: onNext, part: "sqm-pagination-button", circle: true, disabled: currentPage === totalPages },
|
|
29
|
+
h("sl-icon", { name: "chevron-right", label: "Previous Page" }))));
|
|
30
|
+
}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import { Component, h, Prop, State } from "@stencil/core";
|
|
2
|
+
import { getProps } from "../../utils/utils";
|
|
3
|
+
import { PaginationView } from "./sqm-pagination-view";
|
|
4
|
+
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
|
+
* @uiName Pagination
|
|
11
|
+
* @exampleGroup Common Components
|
|
12
|
+
* @example Link Button - <sqm-pagination></sqm-pagination>
|
|
13
|
+
*/
|
|
14
|
+
export class Pagination {
|
|
15
|
+
constructor() {
|
|
16
|
+
this.ignored = true;
|
|
17
|
+
withHooks(this);
|
|
18
|
+
}
|
|
19
|
+
disconnectedCallback() { }
|
|
20
|
+
render() {
|
|
21
|
+
// const props = getProps(this);
|
|
22
|
+
var _a, _b;
|
|
23
|
+
const hookProps = isDemo()
|
|
24
|
+
? useDemoPagination(getProps(this))
|
|
25
|
+
: usePagination();
|
|
26
|
+
const props = {
|
|
27
|
+
currentPage: (_a = hookProps.states) === null || _a === void 0 ? void 0 : _a.currentPage,
|
|
28
|
+
totalPages: (_b = hookProps.states) === null || _b === void 0 ? void 0 : _b.pageCount,
|
|
29
|
+
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); },
|
|
30
|
+
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); },
|
|
31
|
+
text: {
|
|
32
|
+
ofText: "of",
|
|
33
|
+
},
|
|
34
|
+
};
|
|
35
|
+
return h(PaginationView, Object.assign({}, props));
|
|
36
|
+
}
|
|
37
|
+
static get is() { return "sqm-pagination"; }
|
|
38
|
+
static get encapsulation() { return "shadow"; }
|
|
39
|
+
static get properties() { return {
|
|
40
|
+
"demoData": {
|
|
41
|
+
"type": "unknown",
|
|
42
|
+
"mutable": false,
|
|
43
|
+
"complexType": {
|
|
44
|
+
"original": "DemoData<any>",
|
|
45
|
+
"resolved": "{ [x: string]: any; [x: number]: any; }",
|
|
46
|
+
"references": {
|
|
47
|
+
"DemoData": {
|
|
48
|
+
"location": "import",
|
|
49
|
+
"path": "../../global/demo"
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
"required": false,
|
|
54
|
+
"optional": true,
|
|
55
|
+
"docs": {
|
|
56
|
+
"tags": [{
|
|
57
|
+
"text": undefined,
|
|
58
|
+
"name": "undocumented"
|
|
59
|
+
}, {
|
|
60
|
+
"text": "object",
|
|
61
|
+
"name": "uiType"
|
|
62
|
+
}],
|
|
63
|
+
"text": ""
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
}; }
|
|
67
|
+
static get states() { return {
|
|
68
|
+
"ignored": {}
|
|
69
|
+
}; }
|
|
70
|
+
}
|
|
71
|
+
function useDemoPagination(props) {
|
|
72
|
+
const [currentPage, setCurrentPage] = useState(1);
|
|
73
|
+
return deepmerge({
|
|
74
|
+
states: {
|
|
75
|
+
currentPage: currentPage,
|
|
76
|
+
pageCount: 5,
|
|
77
|
+
},
|
|
78
|
+
callbacks: {
|
|
79
|
+
setCurrentPage,
|
|
80
|
+
},
|
|
81
|
+
text: {
|
|
82
|
+
ofText: `${currentPage} of 5`,
|
|
83
|
+
},
|
|
84
|
+
}, props.demoData || {}, { arrayMerge: (_, a) => a });
|
|
85
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { useParentValue } from "@saasquatch/component-boilerplate";
|
|
2
|
+
import { REFERRAL_CODES_PAGINATION_CONTEXT, } from "../sqm-referral-codes/useReferralCodes";
|
|
3
|
+
export function usePagination() {
|
|
4
|
+
const context = useParentValue(REFERRAL_CODES_PAGINATION_CONTEXT);
|
|
5
|
+
return {
|
|
6
|
+
...context,
|
|
7
|
+
};
|
|
8
|
+
}
|
|
@@ -21,6 +21,21 @@ const sharebutton = (slot) => {
|
|
|
21
21
|
h("sqm-share-button", { medium: "facebook" }, "Share on Facebook"),
|
|
22
22
|
h("sqm-share-button", { medium: "twitter" }, "Post about us on X"))));
|
|
23
23
|
};
|
|
24
|
+
const shareButtonsWithPromoCodes = (slot) => {
|
|
25
|
+
return (h("sqm-portal-container", { gap: "large", slot: slot },
|
|
26
|
+
h("sqm-text", null, "Choose how you want to share:"),
|
|
27
|
+
h("sqm-text", null,
|
|
28
|
+
h("sub", null, "Share with your friends:"),
|
|
29
|
+
h("sqm-share-code", null),
|
|
30
|
+
h("sqm-share-link", null)),
|
|
31
|
+
h("sqm-portal-container", { gap: "x-small" },
|
|
32
|
+
h("sqm-share-button", { medium: "email" }, "Share via email"),
|
|
33
|
+
h("sqm-share-button", { medium: "facebook" }, "Share on Facebook"),
|
|
34
|
+
h("sqm-share-button", { medium: "twitter" }, "Post about us on X"),
|
|
35
|
+
h("sqm-portal-container", { gap: "x-small" },
|
|
36
|
+
h("span", { style: { textAlign: "center", color: "var(--sl-color-gray-500)" } }, "You have copied this code before"),
|
|
37
|
+
h("sqm-pagination", null)))));
|
|
38
|
+
};
|
|
24
39
|
const timeline = (slot, count) => {
|
|
25
40
|
return (h("sqm-timeline", { slot: slot, icon: "circle" },
|
|
26
41
|
count > 0 && (h("sqm-timeline-entry", { reward: "75", unit: "points", desc: "Your friends signs up for a free trial" })),
|
|
@@ -43,6 +58,11 @@ export const TimelineAndShareButtons = () => {
|
|
|
43
58
|
timeline("left", 3),
|
|
44
59
|
sharebutton("right")));
|
|
45
60
|
};
|
|
61
|
+
export const OneTimeUsePromoCodes = () => {
|
|
62
|
+
return (h("sqm-referral-card", null,
|
|
63
|
+
timeline("left", 4),
|
|
64
|
+
shareButtonsWithPromoCodes("right")));
|
|
65
|
+
};
|
|
46
66
|
export const StartAlignment = () => {
|
|
47
67
|
return (h("sqm-referral-card", { "vertical-alignment": "start" },
|
|
48
68
|
timeline("left", 4),
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { h } from "@stencil/core";
|
|
2
|
+
import { CopyTextView } from "../views/copy-text-view";
|
|
3
|
+
import scenario from "./ReferralCode.feature";
|
|
4
|
+
export default {
|
|
5
|
+
title: "Components/Referral Code",
|
|
6
|
+
parameters: {
|
|
7
|
+
scenario,
|
|
8
|
+
},
|
|
9
|
+
};
|
|
10
|
+
export const ReferralCode = () => {
|
|
11
|
+
return (h("sqm-referral-code", { tooltiptext: "Copied to Clipboard" }));
|
|
12
|
+
};
|
|
13
|
+
export const ShowNotificationText = () => {
|
|
14
|
+
return (h("sqm-referral-code", { showNotificationText: true, notificationText: "You've copied this code before" }));
|
|
15
|
+
};
|
|
16
|
+
export const ShowNotificationTextWithButton = () => {
|
|
17
|
+
return (h("sqm-referral-code", { showNotificationText: true, notificationText: "You've copied this code before", buttonStyle: "button-outside" }));
|
|
18
|
+
};
|
|
19
|
+
export const ShowNotificationTextWithButtonBelow = () => {
|
|
20
|
+
return (h("sqm-referral-code", { showNotificationText: true, notificationText: "You've copied this code before", buttonStyle: "button-below" }));
|
|
21
|
+
};
|
|
22
|
+
export const CustomTooltipText = () => {
|
|
23
|
+
return (h("sqm-referral-code", { tooltiptext: "CUSTOM TOOLTIP TEXT" }));
|
|
24
|
+
};
|
|
25
|
+
export const TextAlignCenter = () => {
|
|
26
|
+
return h("sqm-referral-code", { textAlign: "center" });
|
|
27
|
+
};
|
|
28
|
+
export const TextAlignRight = () => {
|
|
29
|
+
return h("sqm-referral-code", { textAlign: "right" });
|
|
30
|
+
};
|
|
31
|
+
export const CustomTooltipDuration = () => {
|
|
32
|
+
return (h("sqm-referral-code", { tooltiplifespan: 5000, tooltiptext: "CUSTOM TOOLTIP TEXT" }));
|
|
33
|
+
};
|
|
34
|
+
export const CopyButton = () => {
|
|
35
|
+
return (h(CopyTextView, Object.assign({}, {
|
|
36
|
+
copyString: "https://noah.example.com",
|
|
37
|
+
open: false,
|
|
38
|
+
tooltiptext: "Copied!",
|
|
39
|
+
isCopyIcon: false,
|
|
40
|
+
buttonStyle: "button-outside",
|
|
41
|
+
})));
|
|
42
|
+
};
|
|
43
|
+
export const CopyButtonBelow = () => {
|
|
44
|
+
return (h(CopyTextView, Object.assign({}, {
|
|
45
|
+
copyString: "https://noah.example.com",
|
|
46
|
+
open: false,
|
|
47
|
+
tooltiptext: "Copied!",
|
|
48
|
+
buttonStyle: "button-below",
|
|
49
|
+
})));
|
|
50
|
+
};
|
|
51
|
+
export const Error = () => {
|
|
52
|
+
const props = {
|
|
53
|
+
copyString: "https://noah.example.com",
|
|
54
|
+
disabled: true,
|
|
55
|
+
open: true,
|
|
56
|
+
tooltiptext: "Copied!",
|
|
57
|
+
error: true,
|
|
58
|
+
};
|
|
59
|
+
return h(CopyTextView, Object.assign({}, props));
|
|
60
|
+
};
|
|
@@ -0,0 +1,315 @@
|
|
|
1
|
+
import { isDemo } from "@saasquatch/component-boilerplate";
|
|
2
|
+
import { useState, withHooks } from "@saasquatch/stencil-hooks";
|
|
3
|
+
import { Component, Prop, h } from "@stencil/core";
|
|
4
|
+
import deepmerge from "deepmerge";
|
|
5
|
+
import { getProps } from "../../utils/utils";
|
|
6
|
+
import { CopyTextView } from "../views/copy-text-view";
|
|
7
|
+
import { useReferralCode } from "./useReferralCode";
|
|
8
|
+
/**
|
|
9
|
+
* @uiName Referral Code
|
|
10
|
+
* @exampleGroup Sharing
|
|
11
|
+
* @example Referral Code - <sqm-referral-code tooltip-text="Copied to Clipboard" tooltip-lifespan="1000"></sqm-referral-code>
|
|
12
|
+
*/
|
|
13
|
+
export class ReferralCode {
|
|
14
|
+
constructor() {
|
|
15
|
+
/**
|
|
16
|
+
* Shown inside a tooltip after someone has successfully copied the link to their clipboard
|
|
17
|
+
*
|
|
18
|
+
* @uiName Tooltip text
|
|
19
|
+
*/
|
|
20
|
+
this.tooltiptext = "Copied to Clipboard";
|
|
21
|
+
/**
|
|
22
|
+
* Boolean used to show notification text below input
|
|
23
|
+
*
|
|
24
|
+
* @uiName Show notification text
|
|
25
|
+
*/
|
|
26
|
+
this.showNotificationText = false;
|
|
27
|
+
/**
|
|
28
|
+
* Shown underneath the referral code when the user has already copied the code
|
|
29
|
+
*
|
|
30
|
+
* @uiName Notification text
|
|
31
|
+
*/
|
|
32
|
+
this.notificationText = "You've copied this code before";
|
|
33
|
+
/**
|
|
34
|
+
* The number of milliseconds that the tooltip appears for
|
|
35
|
+
*
|
|
36
|
+
* @uiName Tooltip lifespan
|
|
37
|
+
*/
|
|
38
|
+
this.tooltiplifespan = 1000;
|
|
39
|
+
/**
|
|
40
|
+
* Change the text alignment
|
|
41
|
+
*
|
|
42
|
+
* @uiName referral code alignment
|
|
43
|
+
* @uiType string
|
|
44
|
+
* @uiEnum ["left", "center", "right"]
|
|
45
|
+
* @uiEnumNames ["Left", "Center", "Right"]
|
|
46
|
+
*/
|
|
47
|
+
this.textAlign = "left";
|
|
48
|
+
/**
|
|
49
|
+
* @uiName Copy button label
|
|
50
|
+
*/
|
|
51
|
+
this.copyButtonLabel = "Copy Code";
|
|
52
|
+
/**
|
|
53
|
+
* Set the copy button style and placement
|
|
54
|
+
*
|
|
55
|
+
* @uiName Style
|
|
56
|
+
* @uiType string
|
|
57
|
+
* @uiEnum ["icon", "button-outside", "button-below"]
|
|
58
|
+
* @uiEnumNames ["Icon", "Button outside", "Button below"]
|
|
59
|
+
*/
|
|
60
|
+
this.buttonStyle = "icon";
|
|
61
|
+
withHooks(this);
|
|
62
|
+
}
|
|
63
|
+
disconnectedCallback() { }
|
|
64
|
+
render() {
|
|
65
|
+
const thisProps = getProps(this);
|
|
66
|
+
const props = isDemo()
|
|
67
|
+
? useDemoReferralCode(thisProps)
|
|
68
|
+
: useReferralCode(thisProps);
|
|
69
|
+
return h(CopyTextView, Object.assign({}, props));
|
|
70
|
+
}
|
|
71
|
+
static get is() { return "sqm-referral-code"; }
|
|
72
|
+
static get encapsulation() { return "shadow"; }
|
|
73
|
+
static get properties() { return {
|
|
74
|
+
"programId": {
|
|
75
|
+
"type": "string",
|
|
76
|
+
"mutable": false,
|
|
77
|
+
"complexType": {
|
|
78
|
+
"original": "string",
|
|
79
|
+
"resolved": "string",
|
|
80
|
+
"references": {}
|
|
81
|
+
},
|
|
82
|
+
"required": false,
|
|
83
|
+
"optional": true,
|
|
84
|
+
"docs": {
|
|
85
|
+
"tags": [{
|
|
86
|
+
"text": "Program ID",
|
|
87
|
+
"name": "uiName"
|
|
88
|
+
}, {
|
|
89
|
+
"text": "programSelector",
|
|
90
|
+
"name": "uiWidget"
|
|
91
|
+
}],
|
|
92
|
+
"text": "The ID of the program that should generate the code. Defaults to the program ID in context where this widget is loaded."
|
|
93
|
+
},
|
|
94
|
+
"attribute": "program-id",
|
|
95
|
+
"reflect": false
|
|
96
|
+
},
|
|
97
|
+
"tooltiptext": {
|
|
98
|
+
"type": "string",
|
|
99
|
+
"mutable": false,
|
|
100
|
+
"complexType": {
|
|
101
|
+
"original": "string",
|
|
102
|
+
"resolved": "string",
|
|
103
|
+
"references": {}
|
|
104
|
+
},
|
|
105
|
+
"required": false,
|
|
106
|
+
"optional": false,
|
|
107
|
+
"docs": {
|
|
108
|
+
"tags": [{
|
|
109
|
+
"text": "Tooltip text",
|
|
110
|
+
"name": "uiName"
|
|
111
|
+
}],
|
|
112
|
+
"text": "Shown inside a tooltip after someone has successfully copied the link to their clipboard"
|
|
113
|
+
},
|
|
114
|
+
"attribute": "tooltip-text",
|
|
115
|
+
"reflect": false,
|
|
116
|
+
"defaultValue": "\"Copied to Clipboard\""
|
|
117
|
+
},
|
|
118
|
+
"showNotificationText": {
|
|
119
|
+
"type": "boolean",
|
|
120
|
+
"mutable": false,
|
|
121
|
+
"complexType": {
|
|
122
|
+
"original": "boolean",
|
|
123
|
+
"resolved": "boolean",
|
|
124
|
+
"references": {}
|
|
125
|
+
},
|
|
126
|
+
"required": false,
|
|
127
|
+
"optional": false,
|
|
128
|
+
"docs": {
|
|
129
|
+
"tags": [{
|
|
130
|
+
"text": "Show notification text",
|
|
131
|
+
"name": "uiName"
|
|
132
|
+
}],
|
|
133
|
+
"text": "Boolean used to show notification text below input"
|
|
134
|
+
},
|
|
135
|
+
"attribute": "show-notification-text",
|
|
136
|
+
"reflect": false,
|
|
137
|
+
"defaultValue": "false"
|
|
138
|
+
},
|
|
139
|
+
"notificationText": {
|
|
140
|
+
"type": "string",
|
|
141
|
+
"mutable": false,
|
|
142
|
+
"complexType": {
|
|
143
|
+
"original": "string",
|
|
144
|
+
"resolved": "string",
|
|
145
|
+
"references": {}
|
|
146
|
+
},
|
|
147
|
+
"required": false,
|
|
148
|
+
"optional": false,
|
|
149
|
+
"docs": {
|
|
150
|
+
"tags": [{
|
|
151
|
+
"text": "Notification text",
|
|
152
|
+
"name": "uiName"
|
|
153
|
+
}],
|
|
154
|
+
"text": "Shown underneath the referral code when the user has already copied the code"
|
|
155
|
+
},
|
|
156
|
+
"attribute": "notification-text",
|
|
157
|
+
"reflect": false,
|
|
158
|
+
"defaultValue": "\"You've copied this code before\""
|
|
159
|
+
},
|
|
160
|
+
"tooltiplifespan": {
|
|
161
|
+
"type": "number",
|
|
162
|
+
"mutable": false,
|
|
163
|
+
"complexType": {
|
|
164
|
+
"original": "number",
|
|
165
|
+
"resolved": "number",
|
|
166
|
+
"references": {}
|
|
167
|
+
},
|
|
168
|
+
"required": false,
|
|
169
|
+
"optional": false,
|
|
170
|
+
"docs": {
|
|
171
|
+
"tags": [{
|
|
172
|
+
"text": "Tooltip lifespan",
|
|
173
|
+
"name": "uiName"
|
|
174
|
+
}],
|
|
175
|
+
"text": "The number of milliseconds that the tooltip appears for"
|
|
176
|
+
},
|
|
177
|
+
"attribute": "tooltip-lifespan",
|
|
178
|
+
"reflect": false,
|
|
179
|
+
"defaultValue": "1000"
|
|
180
|
+
},
|
|
181
|
+
"textAlign": {
|
|
182
|
+
"type": "string",
|
|
183
|
+
"mutable": false,
|
|
184
|
+
"complexType": {
|
|
185
|
+
"original": "\"left\" | \"center\" | \"right\"",
|
|
186
|
+
"resolved": "\"center\" | \"left\" | \"right\"",
|
|
187
|
+
"references": {}
|
|
188
|
+
},
|
|
189
|
+
"required": false,
|
|
190
|
+
"optional": false,
|
|
191
|
+
"docs": {
|
|
192
|
+
"tags": [{
|
|
193
|
+
"text": "referral code alignment",
|
|
194
|
+
"name": "uiName"
|
|
195
|
+
}, {
|
|
196
|
+
"text": "string",
|
|
197
|
+
"name": "uiType"
|
|
198
|
+
}, {
|
|
199
|
+
"text": "[\"left\", \"center\", \"right\"]",
|
|
200
|
+
"name": "uiEnum"
|
|
201
|
+
}, {
|
|
202
|
+
"text": "[\"Left\", \"Center\", \"Right\"]",
|
|
203
|
+
"name": "uiEnumNames"
|
|
204
|
+
}],
|
|
205
|
+
"text": "Change the text alignment"
|
|
206
|
+
},
|
|
207
|
+
"attribute": "text-align",
|
|
208
|
+
"reflect": false,
|
|
209
|
+
"defaultValue": "\"left\""
|
|
210
|
+
},
|
|
211
|
+
"copyButtonLabel": {
|
|
212
|
+
"type": "string",
|
|
213
|
+
"mutable": false,
|
|
214
|
+
"complexType": {
|
|
215
|
+
"original": "string",
|
|
216
|
+
"resolved": "string",
|
|
217
|
+
"references": {}
|
|
218
|
+
},
|
|
219
|
+
"required": false,
|
|
220
|
+
"optional": true,
|
|
221
|
+
"docs": {
|
|
222
|
+
"tags": [{
|
|
223
|
+
"text": "Copy button label",
|
|
224
|
+
"name": "uiName"
|
|
225
|
+
}],
|
|
226
|
+
"text": ""
|
|
227
|
+
},
|
|
228
|
+
"attribute": "copy-button-label",
|
|
229
|
+
"reflect": false,
|
|
230
|
+
"defaultValue": "\"Copy Code\""
|
|
231
|
+
},
|
|
232
|
+
"buttonStyle": {
|
|
233
|
+
"type": "string",
|
|
234
|
+
"mutable": false,
|
|
235
|
+
"complexType": {
|
|
236
|
+
"original": "\"icon\" | \"button-outside\" | \"button-below\"",
|
|
237
|
+
"resolved": "\"button-below\" | \"button-outside\" | \"icon\"",
|
|
238
|
+
"references": {}
|
|
239
|
+
},
|
|
240
|
+
"required": false,
|
|
241
|
+
"optional": true,
|
|
242
|
+
"docs": {
|
|
243
|
+
"tags": [{
|
|
244
|
+
"text": "Style",
|
|
245
|
+
"name": "uiName"
|
|
246
|
+
}, {
|
|
247
|
+
"text": "string",
|
|
248
|
+
"name": "uiType"
|
|
249
|
+
}, {
|
|
250
|
+
"text": "[\"icon\", \"button-outside\", \"button-below\"]",
|
|
251
|
+
"name": "uiEnum"
|
|
252
|
+
}, {
|
|
253
|
+
"text": "[\"Icon\", \"Button outside\", \"Button below\"]",
|
|
254
|
+
"name": "uiEnumNames"
|
|
255
|
+
}],
|
|
256
|
+
"text": "Set the copy button style and placement"
|
|
257
|
+
},
|
|
258
|
+
"attribute": "copy-button-style",
|
|
259
|
+
"reflect": false,
|
|
260
|
+
"defaultValue": "\"icon\""
|
|
261
|
+
},
|
|
262
|
+
"demoData": {
|
|
263
|
+
"type": "unknown",
|
|
264
|
+
"mutable": false,
|
|
265
|
+
"complexType": {
|
|
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; }",
|
|
268
|
+
"references": {
|
|
269
|
+
"DemoData": {
|
|
270
|
+
"location": "import",
|
|
271
|
+
"path": "../../global/demo"
|
|
272
|
+
},
|
|
273
|
+
"CopyTextViewProps": {
|
|
274
|
+
"location": "import",
|
|
275
|
+
"path": "../views/copy-text-view"
|
|
276
|
+
}
|
|
277
|
+
}
|
|
278
|
+
},
|
|
279
|
+
"required": false,
|
|
280
|
+
"optional": true,
|
|
281
|
+
"docs": {
|
|
282
|
+
"tags": [{
|
|
283
|
+
"text": undefined,
|
|
284
|
+
"name": "undocumented"
|
|
285
|
+
}, {
|
|
286
|
+
"text": "object",
|
|
287
|
+
"name": "uiType"
|
|
288
|
+
}],
|
|
289
|
+
"text": ""
|
|
290
|
+
}
|
|
291
|
+
}
|
|
292
|
+
}; }
|
|
293
|
+
}
|
|
294
|
+
function useDemoReferralCode(props) {
|
|
295
|
+
const [open, setOpen] = useState(false);
|
|
296
|
+
const copyString = "REFERRALCODE001";
|
|
297
|
+
return deepmerge({
|
|
298
|
+
copyString: copyString,
|
|
299
|
+
tooltiptext: props.tooltiptext,
|
|
300
|
+
textAlign: props.textAlign,
|
|
301
|
+
copyButtonLabel: props.copyButtonLabel,
|
|
302
|
+
buttonStyle: props.buttonStyle,
|
|
303
|
+
notificationText: props.notificationText,
|
|
304
|
+
showNotificationText: props.showNotificationText,
|
|
305
|
+
rewardStatus: "AVAILABLE",
|
|
306
|
+
open,
|
|
307
|
+
onClick: () => {
|
|
308
|
+
// Should well supported: https://developer.mozilla.org/en-US/docs/Web/API/Clipboard#browser_compatibility
|
|
309
|
+
// Only if called from a user-initiated event
|
|
310
|
+
navigator.clipboard.writeText(copyString);
|
|
311
|
+
setOpen(true);
|
|
312
|
+
setTimeout(() => setOpen(false), props.tooltiplifespan);
|
|
313
|
+
},
|
|
314
|
+
}, props.demoData || {}, { arrayMerge: (_, a) => a });
|
|
315
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { useEngagementMedium, useMutation, useParentValue, useProgramId, useQuery, useUserIdentity, } from "@saasquatch/component-boilerplate";
|
|
2
|
+
import { useState } from "@saasquatch/universal-hooks";
|
|
3
|
+
import { gql } from "graphql-request";
|
|
4
|
+
import { REFERRAL_CODES_NAMESPACE, } from "../sqm-referral-codes/useReferralCodes";
|
|
5
|
+
const MessageLinkQuery = gql `
|
|
6
|
+
query ($programId: ID) {
|
|
7
|
+
user: viewer {
|
|
8
|
+
... on User {
|
|
9
|
+
referralCode(programId: $programId)
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
`;
|
|
14
|
+
const WIDGET_ENGAGEMENT_EVENT = gql `
|
|
15
|
+
mutation loadEvent($eventMeta: UserAnalyticsEvent!) {
|
|
16
|
+
createUserAnalyticsEvent(eventMeta: $eventMeta)
|
|
17
|
+
}
|
|
18
|
+
`;
|
|
19
|
+
export function useReferralCode(props) {
|
|
20
|
+
var _a, _b;
|
|
21
|
+
const { programId = useProgramId() } = props;
|
|
22
|
+
const user = useUserIdentity();
|
|
23
|
+
const engagementMedium = useEngagementMedium();
|
|
24
|
+
const contextData = useParentValue(REFERRAL_CODES_NAMESPACE);
|
|
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
|
+
const [sendLoadEvent] = useMutation(WIDGET_ENGAGEMENT_EVENT);
|
|
27
|
+
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 :
|
|
28
|
+
// Shown during loading
|
|
29
|
+
"...";
|
|
30
|
+
const [open, setOpen] = useState(false);
|
|
31
|
+
function onClick() {
|
|
32
|
+
// Should well supported: https://developer.mozilla.org/en-US/docs/Web/API/Clipboard#browser_compatibility
|
|
33
|
+
// Only if called from a user-initiated event
|
|
34
|
+
navigator.clipboard.writeText(copyString);
|
|
35
|
+
setOpen(true);
|
|
36
|
+
setTimeout(() => setOpen(false), props.tooltiplifespan);
|
|
37
|
+
sendLoadEvent({
|
|
38
|
+
eventMeta: {
|
|
39
|
+
programId,
|
|
40
|
+
id: user === null || user === void 0 ? void 0 : user.id,
|
|
41
|
+
accountId: user === null || user === void 0 ? void 0 : user.accountId,
|
|
42
|
+
type: "USER_REFERRAL_PROGRAM_ENGAGEMENT_EVENT",
|
|
43
|
+
meta: {
|
|
44
|
+
engagementMedium,
|
|
45
|
+
shareMedium: "DIRECT",
|
|
46
|
+
},
|
|
47
|
+
},
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
return { ...props, onClick, open, copyString: copyString };
|
|
51
|
+
}
|