@saasquatch/mint-components 1.11.0 → 1.11.1-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/{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 +316 -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 +99 -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 +310 -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-0161f5da.entry.js +13 -0
- 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-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-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-eb4e9efb.system.entry.js +1 -0
- 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 +21 -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 +170 -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/types/global/android.d.ts +0 -7
- package/dist/types/global/demo.d.ts +0 -2
- package/dist/types/stories/features.d.ts +0 -4
- package/dist/types/stories/templates.d.ts +0 -4
- 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
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { h } from "@stencil/core";
|
|
2
|
+
import scenario from "./ReferralCodes.feature";
|
|
3
|
+
export default {
|
|
4
|
+
title: "Components/Referral Codes",
|
|
5
|
+
parameters: {
|
|
6
|
+
scenario,
|
|
7
|
+
},
|
|
8
|
+
};
|
|
9
|
+
const pagination = (slot) => {
|
|
10
|
+
return h("sqm-pagination", { slot: slot });
|
|
11
|
+
};
|
|
12
|
+
const shareButtons = (slot) => {
|
|
13
|
+
return (h("sqm-portal-container", { gap: "small", slot: slot },
|
|
14
|
+
h("sqm-share-button", { medium: "email" }, "Share via email"),
|
|
15
|
+
h("sqm-share-button", { medium: "facebook" }, "Share on Facebook"),
|
|
16
|
+
h("sqm-share-button", { medium: "whatsapp" }, "Share on WhatsApp")));
|
|
17
|
+
};
|
|
18
|
+
const shareCodes = (slot) => {
|
|
19
|
+
return h("sqm-referral-code", { slot: slot });
|
|
20
|
+
};
|
|
21
|
+
const shareCodeWithPreviouslyCopied = (slot) => {
|
|
22
|
+
return (h("sqm-referral-code", { slot: slot, showNotificationText: true, notificationText: "You\u2019ve copied this before." }));
|
|
23
|
+
};
|
|
24
|
+
export const ReferralCodes = () => {
|
|
25
|
+
return (h("sqm-referral-codes", null,
|
|
26
|
+
pagination("pagination"),
|
|
27
|
+
shareCodes("shareCodes"),
|
|
28
|
+
shareButtons("shareButtons")));
|
|
29
|
+
};
|
|
30
|
+
export const WithPreviouslyCopiedCode = () => {
|
|
31
|
+
return (h("sqm-referral-codes", null,
|
|
32
|
+
pagination("pagination"),
|
|
33
|
+
shareCodeWithPreviouslyCopied("shareCodes"),
|
|
34
|
+
shareButtons("shareButtons")));
|
|
35
|
+
};
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { h } from "@stencil/core";
|
|
2
|
+
import { createStyleSheet } from "../../styling/JSS";
|
|
3
|
+
const style = {
|
|
4
|
+
Wrapper: {
|
|
5
|
+
width: "100%",
|
|
6
|
+
display: "flex",
|
|
7
|
+
alignItems: "flex-start",
|
|
8
|
+
justifyContent: "center",
|
|
9
|
+
flexDirection: "column",
|
|
10
|
+
gap: "var(--sl-spacing-large)",
|
|
11
|
+
},
|
|
12
|
+
HeaderContainer: {
|
|
13
|
+
display: "flex",
|
|
14
|
+
alignItems: "center",
|
|
15
|
+
justifyContent: "space-between",
|
|
16
|
+
width: "100%",
|
|
17
|
+
},
|
|
18
|
+
ShareCodeContainer: {
|
|
19
|
+
width: "100%",
|
|
20
|
+
display: "flex",
|
|
21
|
+
alignItems: "flex-start",
|
|
22
|
+
justifyContent: "center",
|
|
23
|
+
flexDirection: "column",
|
|
24
|
+
},
|
|
25
|
+
ShareButtonContainer: {
|
|
26
|
+
width: "100%",
|
|
27
|
+
display: "flex",
|
|
28
|
+
alignItems: "flex-start",
|
|
29
|
+
justifyContent: "center",
|
|
30
|
+
flexDirection: "column",
|
|
31
|
+
},
|
|
32
|
+
TitleText: {
|
|
33
|
+
color: "var(--sl-color-neutral-700)",
|
|
34
|
+
fontSize: "var(--sl-font-size-large)",
|
|
35
|
+
margin: "0",
|
|
36
|
+
},
|
|
37
|
+
};
|
|
38
|
+
const vanillaStyle = `
|
|
39
|
+
:host {
|
|
40
|
+
display: block;
|
|
41
|
+
}
|
|
42
|
+
:host([hidden]): {
|
|
43
|
+
display: none;
|
|
44
|
+
}
|
|
45
|
+
`;
|
|
46
|
+
const sheet = createStyleSheet(style);
|
|
47
|
+
const styleString = sheet.toString();
|
|
48
|
+
export function ReferralCodesView(props) {
|
|
49
|
+
const { slots, titleText } = props;
|
|
50
|
+
return (h("div", { class: sheet.classes.Wrapper, part: "sqm-base" },
|
|
51
|
+
h("style", { type: "text/css" },
|
|
52
|
+
vanillaStyle,
|
|
53
|
+
styleString),
|
|
54
|
+
h("div", { class: sheet.classes.HeaderContainer },
|
|
55
|
+
h("h2", { class: sheet.classes.TitleText }, titleText),
|
|
56
|
+
slots.pagination),
|
|
57
|
+
h("div", { class: sheet.classes.ShareCodeContainer }, slots.shareCodes),
|
|
58
|
+
h("div", { class: sheet.classes.ShareButtonContainer }, slots.shareButtons)));
|
|
59
|
+
}
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
import { isDemo } from "@saasquatch/component-boilerplate";
|
|
2
|
+
import { 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 { useReferralCodes } from "./useReferralCodes";
|
|
7
|
+
import { ReferralCodesView, } from "./sqm-referral-codes-view";
|
|
8
|
+
/**
|
|
9
|
+
* @uiName Referral Codes
|
|
10
|
+
* @exampleGroup Sharing
|
|
11
|
+
* @example Referral Codes - <sqm-referral-codes><sqm-pagination slot="pagination"></sqm-pagination><sqm-referral-code slot="shareCodes"></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="facebook">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
|
+
export class ReferralCodes {
|
|
14
|
+
constructor() {
|
|
15
|
+
/**
|
|
16
|
+
* @uiName Title Text
|
|
17
|
+
*/
|
|
18
|
+
this.titleText = "Your referral code";
|
|
19
|
+
withHooks(this);
|
|
20
|
+
}
|
|
21
|
+
disconnectedCallback() { }
|
|
22
|
+
render() {
|
|
23
|
+
const thisProps = getProps(this);
|
|
24
|
+
const props = isDemo()
|
|
25
|
+
? useDemoReferralCodes(thisProps)
|
|
26
|
+
: useReferralCodes(thisProps);
|
|
27
|
+
console.log(props);
|
|
28
|
+
const slots = {
|
|
29
|
+
shareButtons: h("slot", { name: "shareButtons" }),
|
|
30
|
+
shareCodes: h("slot", { name: "shareCodes" }),
|
|
31
|
+
pagination: h("slot", { name: "pagination" }),
|
|
32
|
+
};
|
|
33
|
+
const viewProps = {
|
|
34
|
+
slots,
|
|
35
|
+
...props,
|
|
36
|
+
};
|
|
37
|
+
return h(ReferralCodesView, Object.assign({}, viewProps));
|
|
38
|
+
}
|
|
39
|
+
static get is() { return "sqm-referral-codes"; }
|
|
40
|
+
static get encapsulation() { return "shadow"; }
|
|
41
|
+
static get properties() { return {
|
|
42
|
+
"titleText": {
|
|
43
|
+
"type": "string",
|
|
44
|
+
"mutable": false,
|
|
45
|
+
"complexType": {
|
|
46
|
+
"original": "string",
|
|
47
|
+
"resolved": "string",
|
|
48
|
+
"references": {}
|
|
49
|
+
},
|
|
50
|
+
"required": false,
|
|
51
|
+
"optional": true,
|
|
52
|
+
"docs": {
|
|
53
|
+
"tags": [{
|
|
54
|
+
"text": "Title Text",
|
|
55
|
+
"name": "uiName"
|
|
56
|
+
}],
|
|
57
|
+
"text": ""
|
|
58
|
+
},
|
|
59
|
+
"attribute": "title-text",
|
|
60
|
+
"reflect": false,
|
|
61
|
+
"defaultValue": "\"Your referral code\""
|
|
62
|
+
},
|
|
63
|
+
"demoData": {
|
|
64
|
+
"type": "unknown",
|
|
65
|
+
"mutable": false,
|
|
66
|
+
"complexType": {
|
|
67
|
+
"original": "DemoData<ReferralCodesViewProps>",
|
|
68
|
+
"resolved": "{ slots?: { shareButtons: VNode; shareCodes: VNode; pagination: VNode; }; titleText?: string; }",
|
|
69
|
+
"references": {
|
|
70
|
+
"DemoData": {
|
|
71
|
+
"location": "import",
|
|
72
|
+
"path": "../../global/demo"
|
|
73
|
+
},
|
|
74
|
+
"ReferralCodesViewProps": {
|
|
75
|
+
"location": "import",
|
|
76
|
+
"path": "./sqm-referral-codes-view"
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
},
|
|
80
|
+
"required": false,
|
|
81
|
+
"optional": true,
|
|
82
|
+
"docs": {
|
|
83
|
+
"tags": [{
|
|
84
|
+
"text": undefined,
|
|
85
|
+
"name": "undocumented"
|
|
86
|
+
}, {
|
|
87
|
+
"text": "object",
|
|
88
|
+
"name": "uiType"
|
|
89
|
+
}],
|
|
90
|
+
"text": ""
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
}; }
|
|
94
|
+
}
|
|
95
|
+
function useDemoReferralCodes(props) {
|
|
96
|
+
return deepmerge({
|
|
97
|
+
titleText: props.titleText,
|
|
98
|
+
}, props.demoData || {}, { arrayMerge: (_, a) => a });
|
|
99
|
+
}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { usePaginatedQuery, useParentState, useUserIdentity, } from "@saasquatch/component-boilerplate";
|
|
2
|
+
import { gql } from "graphql-request";
|
|
3
|
+
import { useEffect } from "@saasquatch/universal-hooks";
|
|
4
|
+
const GET_REFERRAL_CODES = gql `query getReferralCodes {
|
|
5
|
+
}`;
|
|
6
|
+
export const REFERRAL_CODES_NAMESPACE = "sq:referral-codes";
|
|
7
|
+
export const REFERRAL_CODES_PAGINATION_CONTEXT = "sq:referral-codes-pagination";
|
|
8
|
+
export function useReferralCodes(props) {
|
|
9
|
+
const user = useUserIdentity();
|
|
10
|
+
console.log({ props });
|
|
11
|
+
const { envelope: referralData, states, callbacks, } = usePaginatedQuery(GET_REFERRAL_CODES, (data) => { var _a; return (_a = data === null || data === void 0 ? void 0 : data.viewer) === null || _a === void 0 ? void 0 : _a.referralCodes; }, {
|
|
12
|
+
limit: 1,
|
|
13
|
+
offset: 0,
|
|
14
|
+
}, {}, !(user === null || user === void 0 ? void 0 : user.jwt));
|
|
15
|
+
const [paginationContext, setPaginationContext] = useParentState({
|
|
16
|
+
namespace: REFERRAL_CODES_PAGINATION_CONTEXT,
|
|
17
|
+
initialValue: { states, callbacks },
|
|
18
|
+
});
|
|
19
|
+
const [referralCodesContext, setReferralCodesContext] = useParentState({
|
|
20
|
+
namespace: REFERRAL_CODES_NAMESPACE,
|
|
21
|
+
initialValue: {
|
|
22
|
+
loading: true,
|
|
23
|
+
referralCode: "",
|
|
24
|
+
shareLink: "",
|
|
25
|
+
email: {
|
|
26
|
+
messageLink: "",
|
|
27
|
+
},
|
|
28
|
+
fbMessenger: {
|
|
29
|
+
messageLink: "",
|
|
30
|
+
shareLink: "",
|
|
31
|
+
},
|
|
32
|
+
whatsApp: { messageLink: "" },
|
|
33
|
+
},
|
|
34
|
+
});
|
|
35
|
+
useEffect(() => {
|
|
36
|
+
if (referralData === null || referralData === void 0 ? void 0 : referralData.data)
|
|
37
|
+
setReferralCodesContext({
|
|
38
|
+
referralCode: "EXAMPLECODE",
|
|
39
|
+
shareLink: "https://example.com",
|
|
40
|
+
email: {
|
|
41
|
+
messageLink: "https://example.com",
|
|
42
|
+
},
|
|
43
|
+
fbMessenger: {
|
|
44
|
+
messageLink: "https://example.com",
|
|
45
|
+
shareLink: "https://example.com",
|
|
46
|
+
},
|
|
47
|
+
whatsApp: { messageLink: "https://example.com" },
|
|
48
|
+
});
|
|
49
|
+
}, [referralData]);
|
|
50
|
+
useEffect(() => {
|
|
51
|
+
setPaginationContext({ states, callbacks });
|
|
52
|
+
}, [states]);
|
|
53
|
+
console.log({ referralData, states });
|
|
54
|
+
return {
|
|
55
|
+
states: {
|
|
56
|
+
...states,
|
|
57
|
+
},
|
|
58
|
+
data: {
|
|
59
|
+
referralCode: "EXAMPLECODE",
|
|
60
|
+
shareLink: "https://example.com",
|
|
61
|
+
email: {
|
|
62
|
+
messageLink: "https://example.com",
|
|
63
|
+
},
|
|
64
|
+
fbMessenger: {
|
|
65
|
+
messageLink: "https://example.com",
|
|
66
|
+
shareLink: "https://example.com",
|
|
67
|
+
},
|
|
68
|
+
whatsApp: { messageLink: "https://example.com" },
|
|
69
|
+
},
|
|
70
|
+
callbacks: {
|
|
71
|
+
// onPrev: () => callbacks.setCurrentPage(states.currentPage - 1),
|
|
72
|
+
// onNext: () => callbacks.setCurrentPage(states.currentPage + 1),
|
|
73
|
+
},
|
|
74
|
+
};
|
|
75
|
+
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { useEngagementMedium, useUserIdentity, useQuery, } from "@saasquatch/component-boilerplate";
|
|
1
|
+
import { useEngagementMedium, useUserIdentity, useQuery, useParentValue, } from "@saasquatch/component-boilerplate";
|
|
2
2
|
import { gql } from "graphql-request";
|
|
3
3
|
import { useProgramId, getEnvironmentSDK, } from "@saasquatch/component-boilerplate";
|
|
4
|
+
import { REFERRAL_CODES_NAMESPACE, } from "../sqm-referral-codes/useReferralCodes";
|
|
4
5
|
const MessageLinkQuery = gql `
|
|
5
6
|
query (
|
|
6
7
|
$programId: ID
|
|
@@ -38,26 +39,22 @@ function NativeShare(props, directLink, undefinedErrorText, unsupportedPlatformT
|
|
|
38
39
|
alert(unsupportedPlatformText);
|
|
39
40
|
}
|
|
40
41
|
}
|
|
41
|
-
function FacebookShare(directLink,
|
|
42
|
-
|
|
43
|
-
if (((_b = (_a = res.data) === null || _a === void 0 ? void 0 : _a.viewer) === null || _b === void 0 ? void 0 : _b.messageLink) === "undefined" ||
|
|
44
|
-
directLink === "undefined") {
|
|
42
|
+
function FacebookShare(directLink, messageLink, errorText) {
|
|
43
|
+
if (messageLink === "undefined" || directLink === "undefined") {
|
|
45
44
|
return alert(errorText);
|
|
46
45
|
}
|
|
47
46
|
if (typeof SquatchAndroid.shareOnFacebook !== "undefined") {
|
|
48
|
-
return SquatchAndroid.shareOnFacebook(directLink,
|
|
47
|
+
return SquatchAndroid.shareOnFacebook(directLink, messageLink);
|
|
49
48
|
}
|
|
50
49
|
else {
|
|
51
|
-
return GenericShare(
|
|
50
|
+
return GenericShare(messageLink, errorText);
|
|
52
51
|
}
|
|
53
52
|
}
|
|
54
|
-
function GenericShare(
|
|
55
|
-
|
|
56
|
-
return ((_b = (_a = res.data) === null || _a === void 0 ? void 0 : _a.viewer) === null || _b === void 0 ? void 0 : _b.messageLink) ? window.open(res.data.viewer.messageLink)
|
|
57
|
-
: alert(errorText);
|
|
53
|
+
function GenericShare(messageLink, errorText) {
|
|
54
|
+
return messageLink ? window.open(messageLink) : alert(errorText);
|
|
58
55
|
}
|
|
59
56
|
export function useShareButton(props) {
|
|
60
|
-
var _a, _b;
|
|
57
|
+
var _a, _b, _c;
|
|
61
58
|
const { sharetitle, sharetext, medium } = props;
|
|
62
59
|
const programId = props.programId ? props.programId : useProgramId();
|
|
63
60
|
const user = useUserIdentity();
|
|
@@ -66,23 +63,25 @@ export function useShareButton(props) {
|
|
|
66
63
|
programId: programId,
|
|
67
64
|
shareMedium: medium.toUpperCase(),
|
|
68
65
|
};
|
|
66
|
+
const data = useParentValue(REFERRAL_CODES_NAMESPACE);
|
|
69
67
|
// only queries if a programId is available
|
|
70
|
-
const res = useQuery(MessageLinkQuery, variables, !(user === null || user === void 0 ? void 0 : user.jwt) || !programId);
|
|
71
|
-
const directLink = (
|
|
68
|
+
const res = useQuery(MessageLinkQuery, variables, !(user === null || user === void 0 ? void 0 : user.jwt) || !programId || (data === null || data === void 0 ? void 0 : data[medium]) !== undefined);
|
|
69
|
+
const directLink = ((_a = data === null || data === void 0 ? void 0 : data[medium]) === null || _a === void 0 ? void 0 : _a.shareLink) || ((_c = (_b = res === null || res === void 0 ? void 0 : res.data) === null || _b === void 0 ? void 0 : _b.viewer) === null || _c === void 0 ? void 0 : _c.shareLink);
|
|
72
70
|
const environment = getEnvironmentSDK();
|
|
73
71
|
const hide = (medium.toLocaleUpperCase() === "SMS" &&
|
|
74
72
|
window.orientation === undefined) ||
|
|
75
73
|
(medium.toLocaleUpperCase() === "DIRECT" && !window.navigator.share);
|
|
76
74
|
function onClick() {
|
|
75
|
+
var _a, _b, _c, _d, _e, _f;
|
|
77
76
|
if (medium.toLocaleUpperCase() === "FACEBOOK" &&
|
|
78
77
|
environment.type === "SquatchAndroid") {
|
|
79
|
-
FacebookShare(directLink, res, props.errorText);
|
|
78
|
+
FacebookShare(directLink, ((_a = data === null || data === void 0 ? void 0 : data[medium]) === null || _a === void 0 ? void 0 : _a.messageLink) || ((_c = (_b = res.data) === null || _b === void 0 ? void 0 : _b.viewer) === null || _c === void 0 ? void 0 : _c.messageLink), props.errorText);
|
|
80
79
|
}
|
|
81
80
|
else if (medium.toLocaleUpperCase() === "DIRECT") {
|
|
82
81
|
NativeShare({ sharetitle, sharetext }, directLink, props.errorText, props.unsupportedPlatformText);
|
|
83
82
|
}
|
|
84
83
|
else {
|
|
85
|
-
GenericShare(res, props.errorText);
|
|
84
|
+
GenericShare(((_d = data === null || data === void 0 ? void 0 : data[medium]) === null || _d === void 0 ? void 0 : _d.messageLink) || ((_f = (_e = res.data) === null || _e === void 0 ? void 0 : _e.viewer) === null || _f === void 0 ? void 0 : _f.messageLink), props.errorText);
|
|
86
85
|
}
|
|
87
86
|
}
|
|
88
87
|
return { ...props, loading: res.loading, onClick, hide };
|
|
@@ -210,7 +210,7 @@ export class ShareCode {
|
|
|
210
210
|
"mutable": false,
|
|
211
211
|
"complexType": {
|
|
212
212
|
"original": "DemoData<CopyTextViewProps>",
|
|
213
|
-
"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; }",
|
|
213
|
+
"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; }",
|
|
214
214
|
"references": {
|
|
215
215
|
"DemoData": {
|
|
216
216
|
"location": "import",
|
|
@@ -210,7 +210,7 @@ export class ShareLink {
|
|
|
210
210
|
"mutable": false,
|
|
211
211
|
"complexType": {
|
|
212
212
|
"original": "DemoData<CopyTextViewProps>",
|
|
213
|
-
"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; }",
|
|
213
|
+
"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; }",
|
|
214
214
|
"references": {
|
|
215
215
|
"DemoData": {
|
|
216
216
|
"location": "import",
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { useEngagementMedium, useMutation, useProgramId, useQuery, useUserIdentity, } from "@saasquatch/component-boilerplate";
|
|
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, } from "../sqm-referral-codes/useReferralCodes";
|
|
4
5
|
const MessageLinkQuery = gql `
|
|
5
6
|
query ($programId: ID, $engagementMedium: UserEngagementMedium!) {
|
|
6
7
|
user: viewer {
|
|
@@ -24,9 +25,10 @@ export function useShareLink(props) {
|
|
|
24
25
|
const { programId = useProgramId() } = props;
|
|
25
26
|
const user = useUserIdentity();
|
|
26
27
|
const engagementMedium = useEngagementMedium();
|
|
27
|
-
const
|
|
28
|
+
const contextData = useParentValue(REFERRAL_CODES_NAMESPACE);
|
|
29
|
+
const { data } = useQuery(MessageLinkQuery, { programId, engagementMedium }, !(user === null || user === void 0 ? void 0 : user.jwt) || !!props.linkOverride || (contextData === null || contextData === void 0 ? void 0 : contextData.shareLink) !== undefined);
|
|
28
30
|
const [sendLoadEvent] = useMutation(WIDGET_ENGAGEMENT_EVENT);
|
|
29
|
-
const copyString = (_b = (_a = data === null || data === void 0 ? void 0 : data.user) === null || _a === void 0 ? void 0 : _a.shareLink) !== null && _b !== void 0 ? _b :
|
|
31
|
+
const copyString = (_b = ((contextData === null || contextData === void 0 ? void 0 : contextData.shareLink) || ((_a = data === null || data === void 0 ? void 0 : data.user) === null || _a === void 0 ? void 0 : _a.shareLink))) !== null && _b !== void 0 ? _b :
|
|
30
32
|
// Shown during loading
|
|
31
33
|
"...";
|
|
32
34
|
const [open, setOpen] = useState(false);
|
|
@@ -3,6 +3,7 @@ import { useStencilbook } from "@saasquatch/stencilbook";
|
|
|
3
3
|
import { useState, withHooks } from "@saasquatch/stencil-hooks";
|
|
4
4
|
import * as ShareButton from "../sqm-share-button/ShareButton.stories";
|
|
5
5
|
import * as EmptyState from "../sqm-empty/EmptyState.stories";
|
|
6
|
+
import * as Pagination from "../sqm-pagination/Pagination.stories";
|
|
6
7
|
import * as ShareLink from "../sqm-share-link/ShareLink.stories";
|
|
7
8
|
import * as BigStat from "../sqm-big-stat/BigStat.stories";
|
|
8
9
|
import * as Leaderboard from "../sqm-leaderboard/Leaderboard.stories";
|
|
@@ -69,6 +70,7 @@ import * as TitledSection from "../sqm-titled-section/TitledSection.stories";
|
|
|
69
70
|
import * as Scroll from "../sqm-scroll/Scroll.stories";
|
|
70
71
|
import * as Tabs from "../sqm-tabs/Tabs.stories";
|
|
71
72
|
import * as ShareCode from "../sqm-share-code/ShareCode.stories";
|
|
73
|
+
import * as ReferralCode from "../sqm-referral-code/ReferralCode.stories";
|
|
72
74
|
import * as EmailRegistration from "../views/EmailRegistration.stories";
|
|
73
75
|
import * as CouponCode from "../sqm-coupon-code/CouponCode.stories";
|
|
74
76
|
import * as LogoutCurrentUser from "../sqm-logout-current-user/LogoutCurrentUser.stories";
|
|
@@ -83,6 +85,7 @@ import * as BankingInfoForm from "../tax-and-cash/BankingForm.stories";
|
|
|
83
85
|
import * as InvoiceTable from "../sqm-invoice-table/InvoiceTable.stories";
|
|
84
86
|
import * as InvoiceTableCells from "../sqm-invoice-table/InvoiceTableCell.stories";
|
|
85
87
|
import * as UseInvoiceTableCells from "../sqm-invoice-table/UseInvoiceTable.stories";
|
|
88
|
+
import * as ReferralCodes from "../sqm-referral-codes/ReferralCodes.stories";
|
|
86
89
|
import * as Themes from "./Themes";
|
|
87
90
|
import { CucumberAddon } from "./CucumberAddon";
|
|
88
91
|
import { HookStoryAddon } from "./HookStoryAddon";
|
|
@@ -93,6 +96,7 @@ const stories = [
|
|
|
93
96
|
InvoiceTableCells,
|
|
94
97
|
UseInvoiceTableCells,
|
|
95
98
|
ShareButton,
|
|
99
|
+
Pagination,
|
|
96
100
|
ShareLink,
|
|
97
101
|
BigStat,
|
|
98
102
|
Leaderboard,
|
|
@@ -161,6 +165,8 @@ const stories = [
|
|
|
161
165
|
Tabs,
|
|
162
166
|
ShareCode,
|
|
163
167
|
CouponCode,
|
|
168
|
+
ReferralCode,
|
|
169
|
+
ReferralCodes,
|
|
164
170
|
LogoutCurrentUser,
|
|
165
171
|
LinkButton,
|
|
166
172
|
EmailRegistration,
|
|
@@ -13,6 +13,14 @@ const style = {
|
|
|
13
13
|
border: "2px solid red",
|
|
14
14
|
},
|
|
15
15
|
},
|
|
16
|
+
ContainerDiv: {
|
|
17
|
+
display: "flex",
|
|
18
|
+
alignItems: "flex-start",
|
|
19
|
+
flexDirection: "column",
|
|
20
|
+
justifyContent: "center",
|
|
21
|
+
gap: "var(--sl-spacing-x-small)",
|
|
22
|
+
width: "100%",
|
|
23
|
+
},
|
|
16
24
|
containerStyle: {
|
|
17
25
|
display: "flex",
|
|
18
26
|
alignItems: "center",
|
|
@@ -23,6 +31,10 @@ const style = {
|
|
|
23
31
|
margin: "0",
|
|
24
32
|
color: "var(--sl-color-danger-500)",
|
|
25
33
|
},
|
|
34
|
+
notificationTextStyle: {
|
|
35
|
+
margin: "0",
|
|
36
|
+
color: "var(--sl-color-neutral-500)",
|
|
37
|
+
},
|
|
26
38
|
};
|
|
27
39
|
const vanillaStyle = `
|
|
28
40
|
:host{
|
|
@@ -50,6 +62,7 @@ const sheet = createStyleSheet(style);
|
|
|
50
62
|
const styleString = sheet.toString();
|
|
51
63
|
export function CopyTextView(props) {
|
|
52
64
|
const { buttonStyle = "icon" } = props;
|
|
65
|
+
console.log("notification text is", props.notificationText);
|
|
53
66
|
const error = !props.loading && props.error;
|
|
54
67
|
const inputText = error ? props.inputPlaceholderText : props.copyString;
|
|
55
68
|
const disabled = error || props.loading || props.disabled;
|
|
@@ -59,7 +72,7 @@ export function CopyTextView(props) {
|
|
|
59
72
|
? "top"
|
|
60
73
|
: "top-end";
|
|
61
74
|
const copyButton = (h("sl-tooltip", { trigger: "manual", content: props.tooltiptext, placement: tooltipPlacement, disabled: props.disabled, open: props.open, skidding: props.buttonStyle === "icon" ? -5 : 0, slot: "suffix" }, buttonStyle === "icon" ? (h("sl-icon-button", { exportparts: "base: icon-button-base", onClick: () => { var _a; return (_a = props.onClick) === null || _a === void 0 ? void 0 : _a.call(props); }, name: "files", disabled: disabled })) : (h("sl-button", { exportparts: "base: copy-button-base", onClick: () => { var _a; return (_a = props.onClick) === null || _a === void 0 ? void 0 : _a.call(props); }, size: "medium", style: { width: `${buttonStyle === "button-below" && "100%"}` }, disabled: disabled, type: "primary" }, props.copyButtonLabel || "Copy"))));
|
|
62
|
-
return (h("div",
|
|
75
|
+
return (h("div", { class: sheet.classes.ContainerDiv },
|
|
63
76
|
h("style", { type: "text/css" },
|
|
64
77
|
styleString,
|
|
65
78
|
vanillaStyle,
|
|
@@ -72,5 +85,6 @@ export function CopyTextView(props) {
|
|
|
72
85
|
buttonStyle === "icon" && copyButton,
|
|
73
86
|
error && (h("p", { slot: "help-text", class: sheet.classes.errorTextStyle }, props.errorText))),
|
|
74
87
|
(buttonStyle === "button-outside" || buttonStyle === "button-below") &&
|
|
75
|
-
copyButton)
|
|
88
|
+
copyButton),
|
|
89
|
+
props.showNotificationText && props.notificationText && (h("p", { part: "sqm-notification-text", class: sheet.classes.notificationTextStyle }, props.notificationText))));
|
|
76
90
|
}
|