@saasquatch/mint-components 1.11.1-5 → 1.11.1-50
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-8e8d3f51.js → ShadowViewAddon-c3e91cee.js} +211 -145
- 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 +5 -6
- 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-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 +11 -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 +84 -241
- package/dist/cjs/sqm-tabs.cjs.entry.js +1 -1
- package/dist/collection/collection-manifest.json +0 -10
- 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-referral-card/ReferralCard.stories.js +0 -20
- package/dist/collection/components/sqm-referral-table/cells/sqm-referral-table-rewards-cell.js +7 -0
- package/dist/collection/components/sqm-referral-table/columns/sqm-referral-table-rewards-column.js +1 -0
- package/dist/collection/components/sqm-share-button/useShareButton.js +15 -19
- 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 +3 -9
- package/dist/collection/components/sqm-stencilbook/sqm-stencilbook.js +0 -6
- package/dist/collection/components/views/copy-text-view.js +2 -16
- package/dist/esm/{ShadowViewAddon-35f7489c.js → ShadowViewAddon-e012b2aa.js} +213 -148
- package/dist/esm/{global-b89b6edc.js → global-04c7d3b5.js} +1 -1
- package/dist/esm/{index.module-f122af7b.js → index.module-def4aec5.js} +1 -1
- package/dist/esm/loader.js +3 -3
- package/dist/esm/mint-components.js +3 -3
- package/dist/esm/{re-render-c64289f3.js → re-render-12fd274a.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 +9 -10
- 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-09cc28d6.js → sqm-invoice-table-view-6e13a323.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-14114804.js → sqm-navigation-sidebar-item-view-60ef06cc.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-password-field.entry.js +4 -4
- package/dist/esm/sqm-popup-container.entry.js +1 -1
- package/dist/esm/{sqm-portal-email-verification-view-ced567c9.js → sqm-portal-email-verification-view-4307c992.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-d72dd5ac.js → sqm-portal-profile-view-ffe955c8.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 +16 -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 +77 -234
- package/dist/esm/sqm-tab.entry.js +2 -2
- package/dist/esm/sqm-tabs.entry.js +3 -3
- package/dist/esm/{useChildElements-37daf533.js → useChildElements-32e1bda1.js} +1 -1
- package/dist/esm/{useInstantAccessRegistration-9d4cb797.js → useInstantAccessRegistration-46b89952.js} +2 -2
- package/dist/esm/{useReferralTable-42f99ea2.js → useReferralTable-f4de0650.js} +3 -3
- package/dist/esm/{useRegistrationFormState-53c71782.js → useRegistrationFormState-9fc1ac80.js} +1 -1
- package/dist/esm/{utilities-18d10876.js → utilities-3f5bba22.js} +1 -1
- package/dist/esm-es5/{GenericTableView-bf154727.js → GenericTableView-d59d8ab4.js} +1 -1
- package/dist/esm-es5/ShadowViewAddon-e012b2aa.js +1 -0
- package/dist/esm-es5/{email-registration-view-12793040.js → email-registration-view-a89a88bf.js} +1 -1
- package/dist/esm-es5/{global-b89b6edc.js → global-04c7d3b5.js} +1 -1
- package/dist/esm-es5/{index.module-f122af7b.js → index.module-def4aec5.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-c64289f3.js → re-render-12fd274a.js} +1 -1
- package/dist/esm-es5/sqm-asset-card.entry.js +1 -1
- package/dist/esm-es5/sqm-banking-info-form_16.entry.js +1 -1
- package/dist/esm-es5/sqm-big-stat_38.entry.js +1 -1
- package/dist/esm-es5/{sqm-close-button-view-b24c708b.js → sqm-close-button-view-dc65b4e3.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-09cc28d6.js → sqm-invoice-table-view-6e13a323.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-60ef06cc.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-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-ced567c9.js → sqm-portal-email-verification-view-4307c992.js} +1 -1
- package/dist/esm-es5/sqm-portal-email-verification.entry.js +1 -1
- package/dist/esm-es5/{sqm-portal-forgot-password-view-95cd454f.js → sqm-portal-forgot-password-view-c2ed8fed.js} +1 -1
- package/dist/esm-es5/sqm-portal-forgot-password.entry.js +1 -1
- package/dist/esm-es5/sqm-portal-logout.entry.js +1 -1
- package/dist/esm-es5/{sqm-portal-profile-view-d72dd5ac.js → sqm-portal-profile-view-ffe955c8.js} +1 -1
- package/dist/esm-es5/sqm-portal-profile.entry.js +1 -1
- package/dist/esm-es5/sqm-portal-protected-route.entry.js +1 -1
- package/dist/esm-es5/sqm-portal-registration-form.entry.js +1 -1
- package/dist/esm-es5/{sqm-portal-reset-password-view-f1454d43.js → sqm-portal-reset-password-view-79a85e02.js} +1 -1
- package/dist/esm-es5/sqm-portal-reset-password.entry.js +1 -1
- package/dist/esm-es5/{sqm-portal-verify-email-view-3739f523.js → sqm-portal-verify-email-view-d7ea2c56.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-37daf533.js → useChildElements-32e1bda1.js} +1 -1
- package/dist/esm-es5/{useInstantAccessRegistration-9d4cb797.js → useInstantAccessRegistration-46b89952.js} +1 -1
- package/dist/esm-es5/{useReferralTable-42f99ea2.js → useReferralTable-f4de0650.js} +1 -1
- package/dist/esm-es5/useRegistrationFormState-9fc1ac80.js +1 -0
- package/dist/esm-es5/{utilities-18d10876.js → utilities-3f5bba22.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-021a735d.entry.js +1 -0
- package/dist/mint-components/{p-21d4f6ce.system.js → p-02424350.system.js} +1 -1
- package/dist/mint-components/p-03494732.entry.js +1 -0
- package/dist/mint-components/{p-c1ba2ad0.system.entry.js → p-07f675ab.system.entry.js} +1 -1
- package/dist/mint-components/p-0b9fa97f.js +1 -0
- package/dist/mint-components/{p-55588b46.system.js → p-0d8c53ac.system.js} +1 -1
- package/dist/mint-components/{p-aa52c535.js → p-10685090.js} +23 -23
- package/dist/mint-components/p-10e89d0a.entry.js +1 -0
- package/dist/mint-components/{p-12c56ba6.entry.js → p-137ea86e.entry.js} +1 -1
- package/dist/mint-components/{p-32cf8417.js → p-1b9e6fc6.js} +1 -1
- package/dist/mint-components/{p-942d1c22.entry.js → p-1c857edb.entry.js} +2 -2
- package/dist/mint-components/{p-a1150633.system.entry.js → p-1dd69917.system.entry.js} +1 -1
- package/dist/mint-components/{p-cfbe2f86.entry.js → p-2dd67762.entry.js} +1 -1
- package/dist/mint-components/{p-991c9787.js → p-2ee2ebba.js} +2 -2
- package/dist/mint-components/{p-d3d281ff.entry.js → p-3223ba7b.entry.js} +1 -1
- package/dist/mint-components/{p-1c710e16.entry.js → p-32d1d162.entry.js} +1 -1
- package/dist/mint-components/{p-f52c3aec.system.entry.js → p-35d84041.system.entry.js} +1 -1
- package/dist/mint-components/{p-0f028514.system.js → p-3d4656bb.system.js} +1 -1
- package/dist/mint-components/{p-1c6e4a5f.entry.js → p-3ec16698.entry.js} +2 -2
- package/dist/mint-components/{p-59c141a2.system.js → p-3ed71bef.system.js} +1 -1
- package/dist/mint-components/{p-88029e59.entry.js → p-3f385f47.entry.js} +9 -9
- package/dist/mint-components/{p-8077e9c6.js → p-41a11a7f.js} +1 -1
- package/dist/mint-components/{p-43a990b6.system.js → p-44787d6e.system.js} +1 -1
- package/dist/mint-components/{p-67846dce.system.entry.js → p-4502ed11.system.entry.js} +1 -1
- package/dist/mint-components/{p-e41cb11f.js → p-4d233cd4.js} +1 -1
- package/dist/mint-components/{p-f44d88fa.system.js → p-4df8f1d2.system.js} +1 -1
- package/dist/mint-components/{p-03a647c2.system.js → p-4e48267b.system.js} +1 -1
- package/dist/mint-components/{p-daba8cd2.system.entry.js → p-4ea58025.system.entry.js} +1 -1
- package/dist/mint-components/{p-798ed3a2.entry.js → p-4edde470.entry.js} +1 -1
- package/dist/mint-components/{p-0806343b.js → p-509e29e6.js} +1 -1
- package/dist/mint-components/p-51f517a2.js +1 -0
- package/dist/mint-components/{p-3cc5474d.entry.js → p-56f14840.entry.js} +1 -1
- package/dist/mint-components/{p-7962ab58.system.entry.js → p-58ef25d3.system.entry.js} +1 -1
- package/dist/mint-components/{p-46ca288c.system.js → p-59fe4ad1.system.js} +1 -1
- package/dist/mint-components/{p-ecefeaa9.system.entry.js → p-5b333fa8.system.entry.js} +1 -1
- package/dist/mint-components/p-5be235f9.entry.js +1 -0
- package/dist/mint-components/{p-14dac608.system.entry.js → p-5cac90e8.system.entry.js} +1 -1
- package/dist/mint-components/p-5f1c4160.system.entry.js +1 -0
- package/dist/mint-components/p-61eab172.js +1 -0
- package/dist/mint-components/{p-9deac406.system.js → p-674a64fe.system.js} +1 -1
- package/dist/mint-components/{p-6e62f207.entry.js → p-6cef104b.entry.js} +1 -1
- package/dist/mint-components/{p-18a7f543.system.entry.js → p-711ba77e.system.entry.js} +1 -1
- package/dist/mint-components/{p-22de9f73.system.entry.js → p-733825fa.system.entry.js} +1 -1
- package/dist/mint-components/p-76b2506e.system.entry.js +1 -0
- package/dist/mint-components/{p-6e7e8af6.system.js → p-770368bc.system.js} +1 -1
- package/dist/mint-components/{p-ff41c804.system.entry.js → p-7731f793.system.entry.js} +1 -1
- package/dist/mint-components/p-79191f88.entry.js +1 -0
- package/dist/mint-components/{p-bb6f6681.system.js → p-7d5e0645.system.js} +1 -1
- package/dist/mint-components/{p-41499327.entry.js → p-7f088154.entry.js} +1 -1
- package/dist/mint-components/{p-e2bb72eb.system.entry.js → p-8679ed9f.system.entry.js} +1 -1
- package/dist/mint-components/{p-96cb9c17.entry.js → p-86990110.entry.js} +1 -1
- package/dist/mint-components/{p-9c3d78e9.js → p-8704937c.js} +1 -1
- package/dist/mint-components/p-8b5b78ca.entry.js +1 -0
- package/dist/mint-components/{p-26306ac4.system.entry.js → p-8e907ac7.system.entry.js} +1 -1
- package/dist/mint-components/p-91669312.entry.js +1 -0
- package/dist/mint-components/p-95771f79.system.js +1 -0
- package/dist/mint-components/p-9bfe2393.system.entry.js +1 -0
- package/dist/mint-components/{p-acc93caa.system.entry.js → p-9c310991.system.entry.js} +1 -1
- package/dist/mint-components/{p-db85f305.entry.js → p-9df2fe24.entry.js} +2 -2
- package/dist/mint-components/{p-476182e7.system.entry.js → p-9f0629ba.system.entry.js} +1 -1
- package/dist/mint-components/{p-d68ed4a6.system.entry.js → p-a1dba9a1.system.entry.js} +1 -1
- package/dist/mint-components/{p-523ed056.system.js → p-a51533cb.system.js} +1 -1
- package/dist/mint-components/p-a6a7dcaa.js +1 -0
- package/dist/mint-components/{p-9288cca6.system.entry.js → p-a7c2ced2.system.entry.js} +1 -1
- package/dist/mint-components/{p-00be5090.js → p-a8f7cb95.js} +1 -1
- package/dist/mint-components/{p-1b1d10e5.entry.js → p-a9050eb0.entry.js} +1 -1
- package/dist/mint-components/{p-fae82751.entry.js → p-aad11a68.entry.js} +1 -1
- package/dist/mint-components/{p-8c97bfb1.system.entry.js → p-af062c8f.system.entry.js} +1 -1
- package/dist/mint-components/{p-de2a8fae.system.entry.js → p-afd366ae.system.entry.js} +1 -1
- package/dist/mint-components/{p-1099290c.system.js → p-b370fca8.system.js} +1 -1
- package/dist/mint-components/{p-246a2827.entry.js → p-b4c52c5a.entry.js} +2 -2
- package/dist/mint-components/{p-a474b0ec.system.entry.js → p-b5861974.system.entry.js} +1 -1
- package/dist/mint-components/{p-ec8a9e91.system.entry.js → p-b6fc1227.system.entry.js} +1 -1
- package/dist/mint-components/{p-ea88142c.js → p-bb00db59.js} +1 -1
- package/dist/mint-components/{p-c39f9dc1.system.entry.js → p-be4b748a.system.entry.js} +1 -1
- package/dist/mint-components/{p-18a19cb5.system.js → p-c5577dd7.system.js} +1 -1
- package/dist/mint-components/{p-02f6cda4.js → p-c5d2e4ba.js} +1 -1
- package/dist/mint-components/{p-73decce7.system.js → p-c84659a3.system.js} +1 -1
- package/dist/mint-components/{p-ed161025.js → p-c8610d0c.js} +1 -1
- package/dist/mint-components/p-ce5afa40.entry.js +1 -0
- package/dist/mint-components/{p-3373d84e.js → p-ce621bcc.js} +1 -1
- package/dist/mint-components/{p-82e09b8d.system.entry.js → p-cf690d55.system.entry.js} +1 -1
- package/dist/mint-components/p-d495896f.system.entry.js +1 -0
- package/dist/mint-components/{p-15dee492.js → p-d49e2f7a.js} +1 -1
- package/dist/mint-components/{p-110dddfe.entry.js → p-d8d2de11.entry.js} +1 -1
- package/dist/mint-components/p-dd7ee007.system.js +1 -0
- package/dist/mint-components/p-e3735866.entry.js +11 -0
- package/dist/mint-components/{p-b334bde8.entry.js → p-e5a0c50e.entry.js} +2 -2
- package/dist/mint-components/{p-ce746af8.system.js → p-e8dde8f4.system.js} +1 -1
- package/dist/mint-components/{p-1df19ea2.js → p-eaada4da.js} +1 -1
- package/dist/mint-components/{p-53ff8bd0.system.entry.js → p-eba44835.system.entry.js} +1 -1
- package/dist/mint-components/{p-48b7d703.entry.js → p-ec41d6a4.entry.js} +6 -6
- package/dist/mint-components/{p-bf834367.system.js → p-ed095674.system.js} +1 -1
- package/dist/mint-components/p-ed17e637.system.js +1 -0
- package/dist/mint-components/p-eee6627b.entry.js +1 -0
- package/dist/mint-components/{p-fb2c0ce4.system.entry.js → p-fb20eb5e.system.entry.js} +1 -1
- package/dist/mint-components/{p-855ae1b5.js → p-fb93c962.js} +1 -1
- package/dist/types/components/sqm-referral-card/ReferralCard.stories.d.ts +0 -1
- package/dist/types/components/sqm-share-link/useShareLink.d.ts +0 -1
- package/dist/types/components/views/copy-text-view.d.ts +0 -2
- package/dist/types/components.d.ts +0 -170
- 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/cjs/copy-text-view-4b49237f.js +0 -194
- package/dist/cjs/sqm-pagination_3.cjs.entry.js +0 -320
- package/dist/collection/components/sqm-pagination/Pagination.stories.js +0 -12
- package/dist/collection/components/sqm-pagination/sqm-pagination-view.js +0 -30
- package/dist/collection/components/sqm-pagination/sqm-pagination.js +0 -85
- package/dist/collection/components/sqm-pagination/usePagination.js +0 -8
- package/dist/collection/components/sqm-referral-code/ReferralCode.stories.js +0 -60
- package/dist/collection/components/sqm-referral-code/sqm-referral-code.js +0 -315
- package/dist/collection/components/sqm-referral-code/useReferralCode.js +0 -55
- package/dist/collection/components/sqm-referral-codes/ReferralCodes.stories.js +0 -35
- package/dist/collection/components/sqm-referral-codes/sqm-referral-codes-view.js +0 -59
- package/dist/collection/components/sqm-referral-codes/sqm-referral-codes.js +0 -99
- package/dist/collection/components/sqm-referral-codes/useReferralCodes.js +0 -95
- package/dist/esm/copy-text-view-0bc4c829.js +0 -188
- package/dist/esm/sqm-pagination_3.entry.js +0 -314
- package/dist/esm-es5/ShadowViewAddon-35f7489c.js +0 -1
- package/dist/esm-es5/copy-text-view-0bc4c829.js +0 -1
- package/dist/esm-es5/sqm-navigation-sidebar-item-view-14114804.js +0 -1
- package/dist/esm-es5/sqm-pagination_3.entry.js +0 -1
- package/dist/esm-es5/useRegistrationFormState-53c71782.js +0 -1
- package/dist/mint-components/p-01434e4a.entry.js +0 -1
- package/dist/mint-components/p-1ce4fa30.system.entry.js +0 -1
- package/dist/mint-components/p-204b0e97.entry.js +0 -13
- package/dist/mint-components/p-2e16db11.entry.js +0 -1
- package/dist/mint-components/p-394c80b0.system.js +0 -1
- package/dist/mint-components/p-494e407e.entry.js +0 -1
- package/dist/mint-components/p-4abca775.system.entry.js +0 -1
- package/dist/mint-components/p-5b7e2d53.entry.js +0 -1
- package/dist/mint-components/p-5c845bc2.system.entry.js +0 -1
- package/dist/mint-components/p-5d37482d.entry.js +0 -1
- package/dist/mint-components/p-5fc8d87c.system.js +0 -1
- package/dist/mint-components/p-6b0e6a6c.js +0 -1
- package/dist/mint-components/p-7459fd5b.system.entry.js +0 -1
- package/dist/mint-components/p-83cdde7b.system.entry.js +0 -1
- package/dist/mint-components/p-89a760ea.js +0 -1
- package/dist/mint-components/p-a8edd8d6.system.js +0 -1
- package/dist/mint-components/p-b4eb9c46.entry.js +0 -11
- package/dist/mint-components/p-b5176703.entry.js +0 -1
- package/dist/mint-components/p-bd4e9c2b.js +0 -1
- package/dist/mint-components/p-c7ce2c1e.system.js +0 -1
- package/dist/mint-components/p-ca17d998.entry.js +0 -1
- package/dist/mint-components/p-d666b326.js +0 -1
- package/dist/mint-components/p-dc41ff27.entry.js +0 -1
- package/dist/mint-components/p-efee1a28.js +0 -25
- package/dist/mint-components/p-f1ec1180.entry.js +0 -1
- package/dist/types/components/sqm-pagination/Pagination.stories.d.ts +0 -5
- package/dist/types/components/sqm-pagination/sqm-pagination-view.d.ts +0 -7
- package/dist/types/components/sqm-pagination/sqm-pagination.d.ts +0 -17
- package/dist/types/components/sqm-pagination/usePagination.d.ts +0 -15
- package/dist/types/components/sqm-referral-code/ReferralCode.stories.d.ts +0 -18
- package/dist/types/components/sqm-referral-code/sqm-referral-code.d.ts +0 -70
- package/dist/types/components/sqm-referral-code/useReferralCode.d.ts +0 -9
- package/dist/types/components/sqm-referral-codes/ReferralCodes.stories.d.ts +0 -9
- package/dist/types/components/sqm-referral-codes/sqm-referral-codes-view.d.ts +0 -10
- package/dist/types/components/sqm-referral-codes/sqm-referral-codes.d.ts +0 -21
- package/dist/types/components/sqm-referral-codes/useReferralCodes.d.ts +0 -47
- package/dist/cjs/{GenericTableView-a3f48e15.js → GenericTableView-80d7642e.js} +1 -1
- package/dist/cjs/{email-registration-view-4c5d9379.js → email-registration-view-248652bb.js} +1 -1
- package/dist/cjs/{sqm-close-button-view-217239b7.js → sqm-close-button-view-fd6e8f60.js} +1 -1
- package/dist/cjs/{sqm-navigation-sidebar-item-view-4e90b6f5.js → sqm-navigation-sidebar-item-view-a125ec5f.js} +1 -1
- package/dist/cjs/{sqm-portal-email-verification-view-bff9783d.js → sqm-portal-email-verification-view-292b5bf4.js} +1 -1
- package/dist/cjs/{sqm-portal-forgot-password-view-3cd69fe7.js → sqm-portal-forgot-password-view-969c49ed.js} +1 -1
- package/dist/cjs/{sqm-portal-reset-password-view-34771d2c.js → sqm-portal-reset-password-view-96f329ed.js} +1 -1
- package/dist/cjs/{sqm-portal-verify-email-view-c8f91506.js → sqm-portal-verify-email-view-7ffcc0d4.js} +1 -1
- package/dist/esm/{GenericTableView-bf154727.js → GenericTableView-d59d8ab4.js} +1 -1
- package/dist/esm/{email-registration-view-12793040.js → email-registration-view-a89a88bf.js} +1 -1
- package/dist/esm/{sqm-close-button-view-b24c708b.js → sqm-close-button-view-dc65b4e3.js} +1 -1
- package/dist/esm/{sqm-portal-forgot-password-view-95cd454f.js → sqm-portal-forgot-password-view-c2ed8fed.js} +1 -1
- package/dist/esm/{sqm-portal-reset-password-view-f1454d43.js → sqm-portal-reset-password-view-79a85e02.js} +1 -1
- package/dist/esm/{sqm-portal-verify-email-view-3739f523.js → sqm-portal-verify-email-view-d7ea2c56.js} +1 -1
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@saasquatch/mint-components",
|
|
3
3
|
"title": "Mint Components",
|
|
4
|
-
"version": "1.11.1-
|
|
4
|
+
"version": "1.11.1-50",
|
|
5
5
|
"description": "A minimal design library with components for referral and loyalty experiences. Built with Shoelace components by Saasquatch.",
|
|
6
6
|
"icon": "https://res.cloudinary.com/saasquatch/image/upload/v1652219900/squatch-assets/For_Mint.svg",
|
|
7
7
|
"raisins": "docs/raisins.json",
|
|
@@ -1,194 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
const index = require('./index-b0129cd6.js');
|
|
4
|
-
const stencilHooks_module = require('./stencil-hooks.module-72742a0b.js');
|
|
5
|
-
const index_module = require('./index.module-df530553.js');
|
|
6
|
-
const JSS = require('./JSS-8503a151.js');
|
|
7
|
-
const mixins = require('./mixins-fe9d4112.js');
|
|
8
|
-
|
|
9
|
-
const GET_REFERRAL_CODES = index_module.dist.gql `
|
|
10
|
-
query getCodes($limit: Int!, $offset: Int!) {
|
|
11
|
-
viewer {
|
|
12
|
-
... on User {
|
|
13
|
-
referralCodeList(limit: $limit, offset: $offset) {
|
|
14
|
-
data {
|
|
15
|
-
code
|
|
16
|
-
dateUsed
|
|
17
|
-
dateCopied
|
|
18
|
-
shareLinkCodes(limit: $limit, offset: $offset) {
|
|
19
|
-
data {
|
|
20
|
-
linkCode
|
|
21
|
-
shortUrl
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
count
|
|
26
|
-
totalCount
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
`;
|
|
32
|
-
const REFERRAL_CODES_NAMESPACE = "sq:referral-codes";
|
|
33
|
-
const REFERRAL_CODES_PAGINATION_CONTEXT = "sq:referral-codes-pagination";
|
|
34
|
-
const SET_CODE_USED = index_module.dist.gql `
|
|
35
|
-
mutation test {}
|
|
36
|
-
`;
|
|
37
|
-
function useReferralCodes(props) {
|
|
38
|
-
const user = index_module.Q();
|
|
39
|
-
console.log({ props });
|
|
40
|
-
const { envelope: referralData, states, callbacks, } = index_module.kn(GET_REFERRAL_CODES, (data) => {
|
|
41
|
-
var _a;
|
|
42
|
-
console.log({ queryData: data });
|
|
43
|
-
return (_a = data === null || data === void 0 ? void 0 : data.viewer) === null || _a === void 0 ? void 0 : _a.referralCodeList;
|
|
44
|
-
}, {
|
|
45
|
-
limit: 1,
|
|
46
|
-
offset: 0,
|
|
47
|
-
}, {}, !(user === null || user === void 0 ? void 0 : user.jwt));
|
|
48
|
-
const [paginationContext, setPaginationContext] = index_module.Cn({
|
|
49
|
-
namespace: REFERRAL_CODES_PAGINATION_CONTEXT,
|
|
50
|
-
initialValue: { states, callbacks },
|
|
51
|
-
});
|
|
52
|
-
const [referralCodesContext, setReferralCodesContext] = index_module.Cn({
|
|
53
|
-
namespace: REFERRAL_CODES_NAMESPACE,
|
|
54
|
-
initialValue: {
|
|
55
|
-
loading: true,
|
|
56
|
-
referralCode: "",
|
|
57
|
-
shareLink: "",
|
|
58
|
-
email: {
|
|
59
|
-
messageLink: "",
|
|
60
|
-
},
|
|
61
|
-
fbMessenger: {
|
|
62
|
-
messageLink: "",
|
|
63
|
-
shareLink: "",
|
|
64
|
-
},
|
|
65
|
-
whatsApp: { messageLink: "" },
|
|
66
|
-
},
|
|
67
|
-
});
|
|
68
|
-
stencilHooks_module.useEffect(() => {
|
|
69
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
70
|
-
if ((_a = referralData === null || referralData === void 0 ? void 0 : referralData.data) === null || _a === void 0 ? void 0 : _a.length) {
|
|
71
|
-
const data = referralData.data[0];
|
|
72
|
-
setReferralCodesContext({
|
|
73
|
-
referralCode: data.code,
|
|
74
|
-
shareLink: (_c = (_b = data.shareLinkCodes) === null || _b === void 0 ? void 0 : _b[0]) === null || _c === void 0 ? void 0 : _c.shortUrl,
|
|
75
|
-
email: {
|
|
76
|
-
messageLink: (_e = (_d = data.shareLinkCodes) === null || _d === void 0 ? void 0 : _d[0]) === null || _e === void 0 ? void 0 : _e.shortUrl,
|
|
77
|
-
},
|
|
78
|
-
fbMessenger: {
|
|
79
|
-
messageLink: (_g = (_f = data.shareLinkCodes) === null || _f === void 0 ? void 0 : _f[0]) === null || _g === void 0 ? void 0 : _g.shortUrl,
|
|
80
|
-
shareLink: (_j = (_h = data.shareLinkCodes) === null || _h === void 0 ? void 0 : _h[0]) === null || _j === void 0 ? void 0 : _j.shortUrl,
|
|
81
|
-
},
|
|
82
|
-
whatsApp: { messageLink: (_l = (_k = data.shareLinkCodes) === null || _k === void 0 ? void 0 : _k[0]) === null || _l === void 0 ? void 0 : _l.shortUrl },
|
|
83
|
-
});
|
|
84
|
-
}
|
|
85
|
-
}, [referralData]);
|
|
86
|
-
stencilHooks_module.useEffect(() => {
|
|
87
|
-
setPaginationContext({ states, callbacks });
|
|
88
|
-
}, [states.currentPage]);
|
|
89
|
-
console.log({ referralData, states });
|
|
90
|
-
return {
|
|
91
|
-
states: {
|
|
92
|
-
...states,
|
|
93
|
-
},
|
|
94
|
-
data: referralCodesContext,
|
|
95
|
-
callbacks: {
|
|
96
|
-
// onPrev: () => callbacks.setCurrentPage(states.currentPage - 1),
|
|
97
|
-
// onNext: () => callbacks.setCurrentPage(states.currentPage + 1),
|
|
98
|
-
},
|
|
99
|
-
};
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
const style = {
|
|
103
|
-
HostBlock: mixins.HostBlock,
|
|
104
|
-
inputStyle: {
|
|
105
|
-
"&::part(input)": { textOverflow: "ellipsis", width: "100%" },
|
|
106
|
-
"&::part(base)": { cursor: "pointer", overflow: "visible" },
|
|
107
|
-
width: "100%",
|
|
108
|
-
},
|
|
109
|
-
inputErrorStyle: {
|
|
110
|
-
"&::part(base)": {
|
|
111
|
-
border: "2px solid red",
|
|
112
|
-
},
|
|
113
|
-
},
|
|
114
|
-
ContainerDiv: {
|
|
115
|
-
display: "flex",
|
|
116
|
-
alignItems: "flex-start",
|
|
117
|
-
flexDirection: "column",
|
|
118
|
-
justifyContent: "center",
|
|
119
|
-
gap: "var(--sl-spacing-x-small)",
|
|
120
|
-
width: "100%",
|
|
121
|
-
},
|
|
122
|
-
containerStyle: {
|
|
123
|
-
display: "flex",
|
|
124
|
-
alignItems: "center",
|
|
125
|
-
gap: "var(--sl-spacing-x-small)",
|
|
126
|
-
width: "100%",
|
|
127
|
-
},
|
|
128
|
-
errorTextStyle: {
|
|
129
|
-
margin: "0",
|
|
130
|
-
color: "var(--sl-color-danger-500)",
|
|
131
|
-
},
|
|
132
|
-
notificationTextStyle: {
|
|
133
|
-
margin: "0",
|
|
134
|
-
color: "var(--sl-color-neutral-500)",
|
|
135
|
-
},
|
|
136
|
-
};
|
|
137
|
-
const vanillaStyle = `
|
|
138
|
-
:host{
|
|
139
|
-
display: block;
|
|
140
|
-
width: 100%;
|
|
141
|
-
}
|
|
142
|
-
`;
|
|
143
|
-
const textAlignStyle = {
|
|
144
|
-
right: `
|
|
145
|
-
sl-input::part(input){
|
|
146
|
-
text-align: right;
|
|
147
|
-
}`,
|
|
148
|
-
center: `
|
|
149
|
-
sl-input::part(input){
|
|
150
|
-
text-align: center;
|
|
151
|
-
}`,
|
|
152
|
-
left: ``,
|
|
153
|
-
};
|
|
154
|
-
const disabledStyles = `
|
|
155
|
-
sl-input::part(input){
|
|
156
|
-
cursor: default;
|
|
157
|
-
}
|
|
158
|
-
`;
|
|
159
|
-
const sheet = JSS.createStyleSheet(style);
|
|
160
|
-
const styleString = sheet.toString();
|
|
161
|
-
function CopyTextView(props) {
|
|
162
|
-
const { buttonStyle = "icon" } = props;
|
|
163
|
-
console.log("notification text is", props.notificationText);
|
|
164
|
-
const error = !props.loading && props.error;
|
|
165
|
-
const inputText = error ? props.inputPlaceholderText : props.copyString;
|
|
166
|
-
const disabled = error || props.loading || props.disabled;
|
|
167
|
-
const tooltipPlacement = props.buttonStyle === "button-below"
|
|
168
|
-
? "bottom"
|
|
169
|
-
: props.buttonStyle === "button-outside"
|
|
170
|
-
? "top"
|
|
171
|
-
: "top-end";
|
|
172
|
-
const copyButton = (index.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" ? (index.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 })) : (index.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"))));
|
|
173
|
-
return (index.h("div", { class: sheet.classes.ContainerDiv },
|
|
174
|
-
index.h("style", { type: "text/css" },
|
|
175
|
-
styleString,
|
|
176
|
-
vanillaStyle,
|
|
177
|
-
textAlignStyle[props.textAlign],
|
|
178
|
-
disabled && disabledStyles),
|
|
179
|
-
index.h("div", { class: sheet.classes.containerStyle, style: {
|
|
180
|
-
flexDirection: `${buttonStyle === "button-below" ? "column" : "row"}`,
|
|
181
|
-
} },
|
|
182
|
-
index.h("sl-input", { class: `${sheet.classes.inputStyle} ${error ? sheet.classes.inputErrorStyle : ""}`, exportparts: "base: input-base, input: input-label", value: props.loading ? "Loading..." : inputText, readonly: true, disabled: disabled },
|
|
183
|
-
buttonStyle === "icon" && copyButton,
|
|
184
|
-
error && (index.h("p", { slot: "help-text", class: sheet.classes.errorTextStyle }, props.errorText))),
|
|
185
|
-
(buttonStyle === "button-outside" || buttonStyle === "button-below") &&
|
|
186
|
-
copyButton),
|
|
187
|
-
props.showNotificationText && props.notificationText && (index.h("p", { part: "sqm-notification-text", class: sheet.classes.notificationTextStyle }, props.notificationText))));
|
|
188
|
-
}
|
|
189
|
-
|
|
190
|
-
exports.CopyTextView = CopyTextView;
|
|
191
|
-
exports.REFERRAL_CODES_NAMESPACE = REFERRAL_CODES_NAMESPACE;
|
|
192
|
-
exports.REFERRAL_CODES_PAGINATION_CONTEXT = REFERRAL_CODES_PAGINATION_CONTEXT;
|
|
193
|
-
exports.SET_CODE_USED = SET_CODE_USED;
|
|
194
|
-
exports.useReferralCodes = useReferralCodes;
|
|
@@ -1,320 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
const index = require('./index-b0129cd6.js');
|
|
6
|
-
const stencilHooks_module = require('./stencil-hooks.module-72742a0b.js');
|
|
7
|
-
const index_module = require('./index.module-df530553.js');
|
|
8
|
-
const utils = require('./utils-6847bc06.js');
|
|
9
|
-
const JSS = require('./JSS-8503a151.js');
|
|
10
|
-
const copyTextView = require('./copy-text-view-4b49237f.js');
|
|
11
|
-
const cjs = require('./cjs-1066ec21.js');
|
|
12
|
-
require('./mixins-fe9d4112.js');
|
|
13
|
-
|
|
14
|
-
const style = {
|
|
15
|
-
Container: {
|
|
16
|
-
display: "flex",
|
|
17
|
-
justifyContent: "flex-end",
|
|
18
|
-
alignItems: "center",
|
|
19
|
-
gap: "var(--sl-spacing-small)",
|
|
20
|
-
width: "100%",
|
|
21
|
-
},
|
|
22
|
-
TextContainer: {
|
|
23
|
-
display: "flex",
|
|
24
|
-
gap: "var(--sl-spacing-xx-small)",
|
|
25
|
-
},
|
|
26
|
-
};
|
|
27
|
-
const sheet = JSS.createStyleSheet(style);
|
|
28
|
-
const styleString = sheet.toString();
|
|
29
|
-
function PaginationView(props) {
|
|
30
|
-
const { onNext, onPrev, currentPage, totalPages } = props;
|
|
31
|
-
return (index.h("span", { class: sheet.classes.Container, part: "sqm-base" },
|
|
32
|
-
index.h("style", { type: "text/css" }, styleString),
|
|
33
|
-
index.h("sl-button", { onClick: onPrev, part: "sqm-pagination-button", circle: true, disabled: currentPage === 1 },
|
|
34
|
-
index.h("sl-icon", { name: "chevron-left", label: "Previous Page" })),
|
|
35
|
-
index.h("div", { class: sheet.classes.TextContainer },
|
|
36
|
-
index.h("span", null, currentPage),
|
|
37
|
-
index.h("span", null, "of"),
|
|
38
|
-
index.h("span", null, totalPages)),
|
|
39
|
-
index.h("sl-button", { onClick: onNext, part: "sqm-pagination-button", circle: true, disabled: currentPage === totalPages },
|
|
40
|
-
index.h("sl-icon", { name: "chevron-right", label: "Previous Page" }))));
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
function usePagination() {
|
|
44
|
-
const context = index_module.In(copyTextView.REFERRAL_CODES_PAGINATION_CONTEXT);
|
|
45
|
-
return {
|
|
46
|
-
...context,
|
|
47
|
-
};
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
const Pagination = class {
|
|
51
|
-
constructor(hostRef) {
|
|
52
|
-
index.registerInstance(this, hostRef);
|
|
53
|
-
this.ignored = true;
|
|
54
|
-
stencilHooks_module.h$1(this);
|
|
55
|
-
}
|
|
56
|
-
disconnectedCallback() { }
|
|
57
|
-
render() {
|
|
58
|
-
// const props = getProps(this);
|
|
59
|
-
var _a, _b;
|
|
60
|
-
const hookProps = index_module.isDemo()
|
|
61
|
-
? useDemoPagination(utils.getProps(this))
|
|
62
|
-
: usePagination();
|
|
63
|
-
const props = {
|
|
64
|
-
currentPage: (_a = hookProps.states) === null || _a === void 0 ? void 0 : _a.currentPage,
|
|
65
|
-
totalPages: (_b = hookProps.states) === null || _b === void 0 ? void 0 : _b.pageCount,
|
|
66
|
-
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); },
|
|
67
|
-
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); },
|
|
68
|
-
text: {
|
|
69
|
-
ofText: "of",
|
|
70
|
-
},
|
|
71
|
-
};
|
|
72
|
-
return index.h(PaginationView, Object.assign({}, props));
|
|
73
|
-
}
|
|
74
|
-
};
|
|
75
|
-
function useDemoPagination(props) {
|
|
76
|
-
const [currentPage, setCurrentPage] = stencilHooks_module.useState(1);
|
|
77
|
-
return cjs.cjs({
|
|
78
|
-
states: {
|
|
79
|
-
currentPage: currentPage,
|
|
80
|
-
pageCount: 5,
|
|
81
|
-
},
|
|
82
|
-
callbacks: {
|
|
83
|
-
setCurrentPage,
|
|
84
|
-
},
|
|
85
|
-
text: {
|
|
86
|
-
ofText: `${currentPage} of 5`,
|
|
87
|
-
},
|
|
88
|
-
}, props.demoData || {}, { arrayMerge: (_, a) => a });
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
const MessageLinkQuery = index_module.dist.gql `
|
|
92
|
-
query ($programId: ID) {
|
|
93
|
-
user: viewer {
|
|
94
|
-
... on User {
|
|
95
|
-
referralCode(programId: $programId)
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
`;
|
|
100
|
-
const WIDGET_ENGAGEMENT_EVENT = index_module.dist.gql `
|
|
101
|
-
mutation loadEvent($eventMeta: UserAnalyticsEvent!) {
|
|
102
|
-
createUserAnalyticsEvent(eventMeta: $eventMeta)
|
|
103
|
-
}
|
|
104
|
-
`;
|
|
105
|
-
function useReferralCode(props) {
|
|
106
|
-
var _a, _b;
|
|
107
|
-
const { programId = index_module.H() } = props;
|
|
108
|
-
const user = index_module.Q();
|
|
109
|
-
const engagementMedium = index_module.B();
|
|
110
|
-
const contextData = index_module.In(copyTextView.REFERRAL_CODES_NAMESPACE);
|
|
111
|
-
const { data } = index_module.yn(MessageLinkQuery, { programId }, !(user === null || user === void 0 ? void 0 : user.jwt) || (contextData === null || contextData === void 0 ? void 0 : contextData.referralCode) !== undefined);
|
|
112
|
-
const [sendLoadEvent] = index_module.$e(WIDGET_ENGAGEMENT_EVENT);
|
|
113
|
-
const [setUsed, usedRes] = index_module.$e(copyTextView.SET_CODE_USED);
|
|
114
|
-
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 :
|
|
115
|
-
// Shown during loading
|
|
116
|
-
"...";
|
|
117
|
-
const [open, setOpen] = stencilHooks_module.useState(false);
|
|
118
|
-
function onClick() {
|
|
119
|
-
if (contextData) {
|
|
120
|
-
setUsed(true);
|
|
121
|
-
}
|
|
122
|
-
// Should well supported: https://developer.mozilla.org/en-US/docs/Web/API/Clipboard#browser_compatibility
|
|
123
|
-
// Only if called from a user-initiated event
|
|
124
|
-
navigator.clipboard.writeText(copyString);
|
|
125
|
-
setOpen(true);
|
|
126
|
-
setTimeout(() => setOpen(false), props.tooltiplifespan);
|
|
127
|
-
sendLoadEvent({
|
|
128
|
-
eventMeta: {
|
|
129
|
-
programId,
|
|
130
|
-
id: user === null || user === void 0 ? void 0 : user.id,
|
|
131
|
-
accountId: user === null || user === void 0 ? void 0 : user.accountId,
|
|
132
|
-
type: "USER_REFERRAL_PROGRAM_ENGAGEMENT_EVENT",
|
|
133
|
-
meta: {
|
|
134
|
-
engagementMedium,
|
|
135
|
-
shareMedium: "DIRECT",
|
|
136
|
-
},
|
|
137
|
-
},
|
|
138
|
-
});
|
|
139
|
-
}
|
|
140
|
-
return { ...props, onClick, open, copyString: copyString };
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
const ReferralCode = class {
|
|
144
|
-
constructor(hostRef) {
|
|
145
|
-
index.registerInstance(this, hostRef);
|
|
146
|
-
/**
|
|
147
|
-
* Shown inside a tooltip after someone has successfully copied the link to their clipboard
|
|
148
|
-
*
|
|
149
|
-
* @uiName Tooltip text
|
|
150
|
-
*/
|
|
151
|
-
this.tooltiptext = "Copied to Clipboard";
|
|
152
|
-
/**
|
|
153
|
-
* Boolean used to show notification text below input
|
|
154
|
-
*
|
|
155
|
-
* @uiName Show notification text
|
|
156
|
-
*/
|
|
157
|
-
this.showNotificationText = false;
|
|
158
|
-
/**
|
|
159
|
-
* Shown underneath the referral code when the user has already copied the code
|
|
160
|
-
*
|
|
161
|
-
* @uiName Notification text
|
|
162
|
-
*/
|
|
163
|
-
this.notificationText = "You've copied this code before";
|
|
164
|
-
/**
|
|
165
|
-
* The number of milliseconds that the tooltip appears for
|
|
166
|
-
*
|
|
167
|
-
* @uiName Tooltip lifespan
|
|
168
|
-
*/
|
|
169
|
-
this.tooltiplifespan = 1000;
|
|
170
|
-
/**
|
|
171
|
-
* Change the text alignment
|
|
172
|
-
*
|
|
173
|
-
* @uiName referral code alignment
|
|
174
|
-
* @uiType string
|
|
175
|
-
* @uiEnum ["left", "center", "right"]
|
|
176
|
-
* @uiEnumNames ["Left", "Center", "Right"]
|
|
177
|
-
*/
|
|
178
|
-
this.textAlign = "left";
|
|
179
|
-
/**
|
|
180
|
-
* @uiName Copy button label
|
|
181
|
-
*/
|
|
182
|
-
this.copyButtonLabel = "Copy Code";
|
|
183
|
-
/**
|
|
184
|
-
* Set the copy button style and placement
|
|
185
|
-
*
|
|
186
|
-
* @uiName Style
|
|
187
|
-
* @uiType string
|
|
188
|
-
* @uiEnum ["icon", "button-outside", "button-below"]
|
|
189
|
-
* @uiEnumNames ["Icon", "Button outside", "Button below"]
|
|
190
|
-
*/
|
|
191
|
-
this.buttonStyle = "icon";
|
|
192
|
-
stencilHooks_module.h$1(this);
|
|
193
|
-
}
|
|
194
|
-
disconnectedCallback() { }
|
|
195
|
-
render() {
|
|
196
|
-
const thisProps = utils.getProps(this);
|
|
197
|
-
const props = index_module.isDemo()
|
|
198
|
-
? useDemoReferralCode(thisProps)
|
|
199
|
-
: useReferralCode(thisProps);
|
|
200
|
-
return index.h(copyTextView.CopyTextView, Object.assign({}, props));
|
|
201
|
-
}
|
|
202
|
-
};
|
|
203
|
-
function useDemoReferralCode(props) {
|
|
204
|
-
const [open, setOpen] = stencilHooks_module.useState(false);
|
|
205
|
-
const copyString = "REFERRALCODE001";
|
|
206
|
-
return cjs.cjs({
|
|
207
|
-
copyString: copyString,
|
|
208
|
-
tooltiptext: props.tooltiptext,
|
|
209
|
-
textAlign: props.textAlign,
|
|
210
|
-
copyButtonLabel: props.copyButtonLabel,
|
|
211
|
-
buttonStyle: props.buttonStyle,
|
|
212
|
-
notificationText: props.notificationText,
|
|
213
|
-
showNotificationText: props.showNotificationText,
|
|
214
|
-
rewardStatus: "AVAILABLE",
|
|
215
|
-
open,
|
|
216
|
-
onClick: () => {
|
|
217
|
-
// Should well supported: https://developer.mozilla.org/en-US/docs/Web/API/Clipboard#browser_compatibility
|
|
218
|
-
// Only if called from a user-initiated event
|
|
219
|
-
navigator.clipboard.writeText(copyString);
|
|
220
|
-
setOpen(true);
|
|
221
|
-
setTimeout(() => setOpen(false), props.tooltiplifespan);
|
|
222
|
-
},
|
|
223
|
-
}, props.demoData || {}, { arrayMerge: (_, a) => a });
|
|
224
|
-
}
|
|
225
|
-
|
|
226
|
-
const style$1 = {
|
|
227
|
-
Wrapper: {
|
|
228
|
-
width: "100%",
|
|
229
|
-
display: "flex",
|
|
230
|
-
alignItems: "flex-start",
|
|
231
|
-
justifyContent: "center",
|
|
232
|
-
flexDirection: "column",
|
|
233
|
-
gap: "var(--sl-spacing-large)",
|
|
234
|
-
},
|
|
235
|
-
HeaderContainer: {
|
|
236
|
-
display: "flex",
|
|
237
|
-
alignItems: "center",
|
|
238
|
-
justifyContent: "space-between",
|
|
239
|
-
width: "100%",
|
|
240
|
-
},
|
|
241
|
-
ShareCodeContainer: {
|
|
242
|
-
width: "100%",
|
|
243
|
-
display: "flex",
|
|
244
|
-
alignItems: "flex-start",
|
|
245
|
-
justifyContent: "center",
|
|
246
|
-
flexDirection: "column",
|
|
247
|
-
},
|
|
248
|
-
ShareButtonContainer: {
|
|
249
|
-
width: "100%",
|
|
250
|
-
display: "flex",
|
|
251
|
-
alignItems: "flex-start",
|
|
252
|
-
justifyContent: "center",
|
|
253
|
-
flexDirection: "column",
|
|
254
|
-
},
|
|
255
|
-
TitleText: {
|
|
256
|
-
color: "var(--sl-color-neutral-700)",
|
|
257
|
-
fontSize: "var(--sl-font-size-large)",
|
|
258
|
-
margin: "0",
|
|
259
|
-
},
|
|
260
|
-
};
|
|
261
|
-
const vanillaStyle = `
|
|
262
|
-
:host {
|
|
263
|
-
display: block;
|
|
264
|
-
}
|
|
265
|
-
:host([hidden]): {
|
|
266
|
-
display: none;
|
|
267
|
-
}
|
|
268
|
-
`;
|
|
269
|
-
const sheet$1 = JSS.createStyleSheet(style$1);
|
|
270
|
-
const styleString$1 = sheet$1.toString();
|
|
271
|
-
function ReferralCodesView(props) {
|
|
272
|
-
const { slots, titleText } = props;
|
|
273
|
-
return (index.h("div", { class: sheet$1.classes.Wrapper, part: "sqm-base" },
|
|
274
|
-
index.h("style", { type: "text/css" },
|
|
275
|
-
vanillaStyle,
|
|
276
|
-
styleString$1),
|
|
277
|
-
index.h("div", { class: sheet$1.classes.HeaderContainer },
|
|
278
|
-
index.h("h2", { class: sheet$1.classes.TitleText }, titleText),
|
|
279
|
-
slots.pagination),
|
|
280
|
-
index.h("div", { class: sheet$1.classes.ShareCodeContainer }, slots.shareCodes),
|
|
281
|
-
index.h("div", { class: sheet$1.classes.ShareButtonContainer }, slots.shareButtons)));
|
|
282
|
-
}
|
|
283
|
-
|
|
284
|
-
const ReferralCodes = class {
|
|
285
|
-
constructor(hostRef) {
|
|
286
|
-
index.registerInstance(this, hostRef);
|
|
287
|
-
/**
|
|
288
|
-
* @uiName Title Text
|
|
289
|
-
*/
|
|
290
|
-
this.titleText = "Your referral code";
|
|
291
|
-
stencilHooks_module.h$1(this);
|
|
292
|
-
}
|
|
293
|
-
disconnectedCallback() { }
|
|
294
|
-
render() {
|
|
295
|
-
const thisProps = utils.getProps(this);
|
|
296
|
-
const props = index_module.isDemo()
|
|
297
|
-
? useDemoReferralCodes(thisProps)
|
|
298
|
-
: copyTextView.useReferralCodes(thisProps);
|
|
299
|
-
console.log(props);
|
|
300
|
-
const slots = {
|
|
301
|
-
shareButtons: index.h("slot", { name: "shareButtons" }),
|
|
302
|
-
shareCodes: index.h("slot", { name: "shareCodes" }),
|
|
303
|
-
pagination: index.h("slot", { name: "pagination" }),
|
|
304
|
-
};
|
|
305
|
-
const viewProps = {
|
|
306
|
-
slots,
|
|
307
|
-
...props,
|
|
308
|
-
};
|
|
309
|
-
return index.h(ReferralCodesView, Object.assign({}, viewProps));
|
|
310
|
-
}
|
|
311
|
-
};
|
|
312
|
-
function useDemoReferralCodes(props) {
|
|
313
|
-
return cjs.cjs({
|
|
314
|
-
titleText: props.titleText,
|
|
315
|
-
}, props.demoData || {}, { arrayMerge: (_, a) => a });
|
|
316
|
-
}
|
|
317
|
-
|
|
318
|
-
exports.sqm_pagination = Pagination;
|
|
319
|
-
exports.sqm_referral_code = ReferralCode;
|
|
320
|
-
exports.sqm_referral_codes = ReferralCodes;
|
|
@@ -1,12 +0,0 @@
|
|
|
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
|
-
};
|
|
@@ -1,30 +0,0 @@
|
|
|
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
|
-
}
|
|
@@ -1,85 +0,0 @@
|
|
|
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
|
-
}
|
|
@@ -1,8 +0,0 @@
|
|
|
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
|
-
}
|