@saasquatch/mint-components 1.5.0-3 → 1.5.0-7
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-a85b8c8d.js → ShadowViewAddon-475e00d3.js} +3 -3
- package/dist/cjs/{global-6223fe8f.js → global-89f66e76.js} +2 -2
- package/dist/cjs/{index.module-7dd4b981.js → index.module-c0bf9df0.js} +16 -16
- package/dist/cjs/loader.cjs.js +3 -3
- package/dist/cjs/mint-components.cjs.js +3 -3
- package/dist/cjs/{re-render-6111d4bd.js → re-render-124b56ee.js} +4 -4
- package/dist/cjs/sqm-asset-card.cjs.entry.js +1 -1
- package/dist/cjs/sqm-big-stat.cjs.entry.js +2 -2
- package/dist/cjs/{sqm-brand_31.cjs.entry.js → sqm-brand_38.cjs.entry.js} +935 -3744
- package/dist/cjs/sqm-graphql-client-provider.cjs.entry.js +4 -4
- package/dist/cjs/{sqm-leaderboard-rank-view-7dd44d62.js → sqm-leaderboard-rank-view-510f16d3.js} +2 -2
- package/dist/cjs/sqm-leaderboard-rank.cjs.entry.js +5 -5
- package/dist/cjs/sqm-leaderboard.cjs.entry.js +2 -2
- package/dist/cjs/sqm-name-fields.cjs.entry.js +1 -1
- package/dist/cjs/{sqm-navigation-sidebar-item-view-6c7f78e6.js → sqm-navigation-sidebar-item-view-a2bdcf05.js} +2 -2
- package/dist/cjs/sqm-navigation-sidebar-item.cjs.entry.js +3 -3
- package/dist/cjs/sqm-popup-container.cjs.entry.js +1 -1
- package/dist/cjs/{sqm-portal-email-verification-view-08d1848c.js → sqm-portal-email-verification-view-5093ac20.js} +1 -1
- package/dist/cjs/sqm-portal-email-verification.cjs.entry.js +5 -5
- package/dist/cjs/{sqm-portal-footer-view-69c73802.js → sqm-portal-footer-view-03408484.js} +1 -1
- package/dist/cjs/sqm-portal-footer.cjs.entry.js +3 -3
- package/dist/cjs/sqm-portal-forgot-password.cjs.entry.js +3 -3
- package/dist/cjs/sqm-portal-logout.cjs.entry.js +3 -3
- package/dist/cjs/{sqm-portal-profile-view-14b41436.js → sqm-portal-profile-view-fa2db439.js} +1 -1
- package/dist/cjs/sqm-portal-profile.cjs.entry.js +6 -6
- package/dist/cjs/sqm-portal-protected-route.cjs.entry.js +5 -5
- package/dist/cjs/sqm-portal-reset-password.cjs.entry.js +5 -5
- package/dist/cjs/sqm-portal-verify-email.cjs.entry.js +5 -5
- package/dist/cjs/{sqm-program-explainer-step-view-98958ab1.js → sqm-program-explainer-step-view-6a01cda0.js} +9 -3
- package/dist/cjs/sqm-program-explainer-step.cjs.entry.js +1 -1
- package/dist/cjs/{sqm-program-explainer-view-ba7ed24a.js → sqm-program-explainer-view-8a4af972.js} +2 -1
- package/dist/cjs/sqm-program-explainer.cjs.entry.js +1 -1
- package/dist/cjs/sqm-referral-table-column.cjs.entry.js +2 -2
- package/dist/cjs/sqm-referral-table-date-column.cjs.entry.js +2 -2
- package/dist/cjs/sqm-referral-table-rewards-column.cjs.entry.js +2 -2
- package/dist/cjs/sqm-referral-table-status-column.cjs.entry.js +2 -2
- package/dist/cjs/sqm-referral-table-user-column.cjs.entry.js +2 -2
- package/dist/cjs/sqm-share-code.cjs.entry.js +4 -4
- package/dist/cjs/{useDemoBigStat-2786227e.js → useDemoBigStat-5d71bbdf.js} +3 -3
- package/dist/collection/collection-manifest.json +9 -2
- package/dist/collection/components/sqm-brand/SqmBrand.stories.js +31 -13
- package/dist/collection/components/sqm-brand/sqm-brand.js +53 -15
- package/dist/collection/components/sqm-program-explainer/ProgramExplainer.stories.js +7 -4
- package/dist/collection/components/sqm-program-explainer/sqm-program-explainer-view.js +2 -1
- package/dist/collection/components/sqm-program-explainer/sqm-program-explainer.js +2 -2
- package/dist/collection/components/sqm-program-explainer-step/ProgramExplainerStep.stories.js +3 -2
- package/dist/collection/components/sqm-program-explainer-step/sqm-program-explainer-step-view.js +9 -3
- package/dist/collection/components/sqm-program-explainer-step/sqm-program-explainer-step.js +25 -2
- package/dist/collection/components/sqm-referral-table/ReferralTable.stories.js +1 -0
- package/dist/collection/components/sqm-referral-table/ReferralTableCell.stories.js +1 -0
- package/dist/collection/components/sqm-referral-table/ReferralTableRewardsCell.stories.js +1 -0
- package/dist/collection/components/sqm-reward-exchange-list/sqm-reward-exchange-list-view.js +2 -0
- package/dist/collection/components/sqm-reward-exchange-list/useRewardExchangeList.js +4 -9
- package/dist/collection/components/sqm-rewards-table/UseRewardsTable.stories.js +4 -1
- package/dist/collection/components/sqm-rewards-table/cells/sqm-rewards-table-date-cell.js +43 -0
- package/dist/collection/components/sqm-rewards-table/cells/sqm-rewards-table-rewards-cell.js +161 -0
- package/dist/collection/components/sqm-rewards-table/cells/sqm-rewards-table-source-cell.js +81 -0
- package/dist/collection/components/sqm-rewards-table/cells/sqm-rewards-table-status-cell.js +84 -0
- package/dist/collection/components/sqm-rewards-table/columns/RewardTableColumn.js +1 -0
- package/dist/collection/components/sqm-rewards-table/columns/sqm-rewards-table-date-column.js +130 -0
- package/dist/collection/components/sqm-rewards-table/{sqm-rewards-table-column.js → columns/sqm-rewards-table-reward-column.js} +5 -7
- package/dist/collection/components/sqm-rewards-table/columns/sqm-rewards-table-source-column.js +145 -0
- package/dist/collection/components/sqm-rewards-table/columns/sqm-rewards-table-status-column.js +117 -0
- package/dist/collection/components/sqm-rewards-table/useRewardsTable.js +32 -6
- package/dist/collection/components/sqm-share-button/sqm-share-button.js +1 -1
- package/dist/collection/components/sqm-stencilbook/AutoColor.js +40 -45
- package/dist/collection/fonts/GoogleFonts.js +12 -0
- package/dist/esm/{ShadowViewAddon-a3f510db.js → ShadowViewAddon-558fabb7.js} +3 -3
- package/dist/esm/{global-90da933f.js → global-e0e25c22.js} +2 -2
- package/dist/esm/{index.module-90d2c3ad.js → index.module-eb50a8d2.js} +2 -2
- package/dist/esm/loader.js +3 -3
- package/dist/esm/mint-components.js +3 -3
- package/dist/esm/{re-render-e06f2f7f.js → re-render-6d5b856e.js} +4 -4
- package/dist/esm/sqm-asset-card.entry.js +1 -1
- package/dist/esm/sqm-big-stat.entry.js +2 -2
- package/dist/esm/{sqm-brand_31.entry.js → sqm-brand_38.entry.js} +929 -3745
- package/dist/esm/sqm-graphql-client-provider.entry.js +4 -4
- package/dist/esm/{sqm-leaderboard-rank-view-47844836.js → sqm-leaderboard-rank-view-cd1e8962.js} +2 -2
- package/dist/esm/sqm-leaderboard-rank.entry.js +5 -5
- package/dist/esm/sqm-leaderboard.entry.js +2 -2
- package/dist/esm/sqm-name-fields.entry.js +1 -1
- package/dist/esm/{sqm-navigation-sidebar-item-view-f2304ad9.js → sqm-navigation-sidebar-item-view-2d8c368c.js} +2 -2
- package/dist/esm/sqm-navigation-sidebar-item.entry.js +3 -3
- package/dist/esm/sqm-popup-container.entry.js +1 -1
- package/dist/esm/{sqm-portal-email-verification-view-8cefe480.js → sqm-portal-email-verification-view-2af31979.js} +1 -1
- package/dist/esm/sqm-portal-email-verification.entry.js +5 -5
- package/dist/esm/{sqm-portal-footer-view-d9fe0bf8.js → sqm-portal-footer-view-60cd9ae5.js} +1 -1
- package/dist/esm/sqm-portal-footer.entry.js +3 -3
- package/dist/esm/sqm-portal-forgot-password.entry.js +3 -3
- package/dist/esm/sqm-portal-logout.entry.js +3 -3
- package/dist/esm/{sqm-portal-profile-view-b67467b4.js → sqm-portal-profile-view-f1deea0f.js} +1 -1
- package/dist/esm/sqm-portal-profile.entry.js +6 -6
- package/dist/esm/sqm-portal-protected-route.entry.js +5 -5
- package/dist/esm/sqm-portal-reset-password.entry.js +7 -7
- package/dist/esm/sqm-portal-verify-email.entry.js +5 -5
- package/dist/esm/{sqm-program-explainer-step-view-64fc0c37.js → sqm-program-explainer-step-view-41c1eecd.js} +9 -3
- package/dist/esm/sqm-program-explainer-step.entry.js +1 -1
- package/dist/esm/{sqm-program-explainer-view-68f0d242.js → sqm-program-explainer-view-098a64a9.js} +2 -1
- package/dist/esm/sqm-program-explainer.entry.js +1 -1
- package/dist/esm/sqm-referral-table-column.entry.js +2 -2
- package/dist/esm/sqm-referral-table-date-column.entry.js +2 -2
- package/dist/esm/sqm-referral-table-rewards-column.entry.js +2 -2
- package/dist/esm/sqm-referral-table-status-column.entry.js +2 -2
- package/dist/esm/sqm-referral-table-user-column.entry.js +2 -2
- package/dist/esm/sqm-share-code.entry.js +4 -4
- package/dist/esm/{useDemoBigStat-c3b955b7.js → useDemoBigStat-d227b2f9.js} +3 -3
- package/dist/esm-es5/ShadowViewAddon-558fabb7.js +1 -0
- package/dist/esm-es5/{global-90da933f.js → global-e0e25c22.js} +2 -2
- package/dist/esm-es5/{index.module-90d2c3ad.js → index.module-eb50a8d2.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-e06f2f7f.js → re-render-6d5b856e.js} +1 -1
- package/dist/esm-es5/sqm-asset-card.entry.js +1 -1
- package/dist/esm-es5/sqm-big-stat.entry.js +1 -1
- package/dist/esm-es5/sqm-brand_38.entry.js +1 -0
- package/dist/esm-es5/sqm-graphql-client-provider.entry.js +1 -1
- package/dist/esm-es5/{sqm-leaderboard-rank-view-47844836.js → sqm-leaderboard-rank-view-cd1e8962.js} +1 -1
- package/dist/esm-es5/sqm-leaderboard-rank.entry.js +1 -1
- package/dist/esm-es5/sqm-leaderboard.entry.js +1 -1
- package/dist/esm-es5/sqm-name-fields.entry.js +1 -1
- package/dist/esm-es5/sqm-navigation-sidebar-item-view-2d8c368c.js +1 -0
- package/dist/esm-es5/sqm-navigation-sidebar-item.entry.js +1 -1
- package/dist/esm-es5/sqm-popup-container.entry.js +1 -1
- package/dist/esm-es5/{sqm-portal-email-verification-view-8cefe480.js → sqm-portal-email-verification-view-2af31979.js} +1 -1
- package/dist/esm-es5/sqm-portal-email-verification.entry.js +1 -1
- package/dist/esm-es5/{sqm-portal-footer-view-d9fe0bf8.js → sqm-portal-footer-view-60cd9ae5.js} +1 -1
- package/dist/esm-es5/sqm-portal-footer.entry.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-b67467b4.js → sqm-portal-profile-view-f1deea0f.js} +1 -1
- package/dist/esm-es5/sqm-portal-profile.entry.js +1 -1
- package/dist/esm-es5/sqm-portal-protected-route.entry.js +1 -1
- package/dist/esm-es5/sqm-portal-reset-password.entry.js +1 -1
- package/dist/esm-es5/sqm-portal-verify-email.entry.js +1 -1
- package/dist/esm-es5/{sqm-program-explainer-step-view-64fc0c37.js → sqm-program-explainer-step-view-41c1eecd.js} +1 -1
- package/dist/esm-es5/sqm-program-explainer-step.entry.js +1 -1
- package/dist/esm-es5/{sqm-program-explainer-view-68f0d242.js → sqm-program-explainer-view-098a64a9.js} +1 -1
- package/dist/esm-es5/sqm-program-explainer.entry.js +1 -1
- package/dist/esm-es5/sqm-referral-table-column.entry.js +1 -1
- package/dist/esm-es5/sqm-referral-table-date-column.entry.js +1 -1
- package/dist/esm-es5/sqm-referral-table-rewards-column.entry.js +1 -1
- package/dist/esm-es5/sqm-referral-table-status-column.entry.js +1 -1
- package/dist/esm-es5/sqm-referral-table-user-column.entry.js +1 -1
- package/dist/esm-es5/sqm-share-code.entry.js +1 -1
- package/dist/esm-es5/useDemoBigStat-d227b2f9.js +1 -0
- package/dist/mint-components/mint-components.esm.js +1 -1
- package/dist/mint-components/mint-components.js +1 -1
- package/dist/mint-components/{p-a6094ff9.system.js → p-02dc36a4.system.js} +1 -1
- package/dist/mint-components/{p-3ce2fb83.system.js → p-03e93c82.system.js} +1 -1
- package/dist/mint-components/p-0d8b2757.system.entry.js +1 -0
- package/dist/mint-components/{p-b608f7a4.system.js → p-0e8ae7e3.system.js} +1 -1
- package/dist/mint-components/p-10103ce2.system.js +1 -0
- package/dist/mint-components/p-12071042.system.entry.js +1 -0
- package/dist/mint-components/{p-221a4097.entry.js → p-1705e549.entry.js} +1 -1
- package/dist/mint-components/{p-1435350e.system.js → p-1b5b5928.system.js} +1 -1
- package/dist/mint-components/{p-0eb3e89c.js → p-1f95b411.js} +1 -1
- package/dist/mint-components/{p-44d0fc80.system.entry.js → p-2027edc0.system.entry.js} +1 -1
- package/dist/mint-components/{p-a4c2c7ed.entry.js → p-20c95798.entry.js} +1 -1
- package/dist/mint-components/{p-b1bb07db.entry.js → p-21b4044a.entry.js} +1 -1
- package/dist/mint-components/{p-5cda79ed.system.entry.js → p-21df3f85.system.entry.js} +1 -1
- package/dist/mint-components/{p-db2e4c42.js → p-221bd06e.js} +1 -1
- package/dist/mint-components/p-2338162a.entry.js +1 -0
- package/dist/mint-components/{p-73148868.system.entry.js → p-24fa8920.system.entry.js} +1 -1
- package/dist/mint-components/{p-e6d77d20.system.entry.js → p-29ee7d11.system.entry.js} +1 -1
- package/dist/mint-components/{p-e7f633b9.system.js → p-2e63dcfd.system.js} +1 -1
- package/dist/mint-components/{p-9d6dbb2d.entry.js → p-3143cce4.entry.js} +1 -1
- package/dist/mint-components/p-34112d74.entry.js +1 -0
- package/dist/mint-components/{p-3b97aed8.system.js → p-40e83a85.system.js} +1 -1
- package/dist/mint-components/{p-be2738b0.system.entry.js → p-46493de5.system.entry.js} +1 -1
- package/dist/mint-components/{p-1dcdca58.system.entry.js → p-4658d225.system.entry.js} +1 -1
- package/dist/mint-components/{p-6882070c.js → p-4b719313.js} +1 -1
- package/dist/mint-components/{p-29fab29b.entry.js → p-53e51b3f.entry.js} +1 -1
- package/dist/mint-components/p-5939212e.system.entry.js +1 -0
- package/dist/mint-components/{p-d35b0366.js → p-5d925bb6.js} +1 -1
- package/dist/mint-components/{p-c6114bfe.system.js → p-5e4e7f01.system.js} +1 -1
- package/dist/mint-components/{p-224504ad.js → p-61acba7a.js} +1 -1
- package/dist/mint-components/{p-f17050de.entry.js → p-65c79eec.entry.js} +1 -1
- package/dist/mint-components/{p-f52bc20c.entry.js → p-748ad4f5.entry.js} +1 -1
- package/dist/mint-components/{p-52802c88.entry.js → p-759d3800.entry.js} +2 -2
- package/dist/mint-components/{p-49cbd0a2.entry.js → p-760762d3.entry.js} +2 -2
- package/dist/mint-components/{p-33c5ffb7.entry.js → p-7cdbe82a.entry.js} +1 -1
- package/dist/mint-components/{p-223b42bd.system.entry.js → p-7ff22998.system.entry.js} +1 -1
- package/dist/mint-components/p-81786aa0.js +1 -0
- package/dist/mint-components/p-85efd952.entry.js +1 -0
- package/dist/mint-components/p-86255b95.entry.js +1 -0
- package/dist/mint-components/{p-24c9a599.system.entry.js → p-88fdfd94.system.entry.js} +1 -1
- package/dist/mint-components/{p-864f49d2.system.entry.js → p-8ec5127e.system.entry.js} +1 -1
- package/dist/mint-components/{p-46a4269a.js → p-8fd8682c.js} +1 -1
- package/dist/mint-components/{p-412a9226.system.entry.js → p-97b946c2.system.entry.js} +1 -1
- package/dist/mint-components/p-9be0cb19.entry.js +1 -0
- package/dist/mint-components/{p-1a09e4e1.system.entry.js → p-a0a26fc5.system.entry.js} +1 -1
- package/dist/mint-components/{p-304e6c82.system.entry.js → p-a355eeaf.system.entry.js} +1 -1
- package/dist/mint-components/{p-67ae18d1.system.entry.js → p-a8246a50.system.entry.js} +1 -1
- package/dist/mint-components/p-a831de18.entry.js +1 -0
- package/dist/mint-components/p-a833dbb3.js +1 -0
- package/dist/mint-components/p-a88a08bb.system.js +1 -0
- package/dist/mint-components/{p-b8bd2607.entry.js → p-a9a6f205.entry.js} +1 -1
- package/dist/mint-components/{p-6e245fa3.system.entry.js → p-aee83885.system.entry.js} +1 -1
- package/dist/mint-components/{p-cca9026f.system.entry.js → p-b86cbac3.system.entry.js} +1 -1
- package/dist/mint-components/p-b90574e5.entry.js +372 -0
- package/dist/mint-components/{p-07c924fa.system.js → p-be3a0cc4.system.js} +1 -1
- package/dist/mint-components/{p-3397167c.entry.js → p-c0f9d0b1.entry.js} +1 -1
- package/dist/mint-components/{p-60855d33.system.js → p-c65cfc9d.system.js} +1 -1
- package/dist/mint-components/{p-dc603d08.system.entry.js → p-ca40dbaa.system.entry.js} +1 -1
- package/dist/mint-components/{p-9c554ca0.system.js → p-cc189fc4.system.js} +1 -1
- package/dist/mint-components/{p-fce1dbf6.entry.js → p-cc652a53.entry.js} +1 -1
- package/dist/mint-components/{p-f90486ca.js → p-d19d6012.js} +15 -15
- package/dist/mint-components/p-d3c7dbfc.entry.js +1 -0
- package/dist/mint-components/{p-24b3c6f0.system.entry.js → p-d4a1bce9.system.entry.js} +1 -1
- package/dist/mint-components/p-d68f6b64.system.entry.js +1 -0
- package/dist/mint-components/p-e36ff7fa.entry.js +1 -0
- package/dist/mint-components/{p-723ebe45.entry.js → p-e608f340.entry.js} +2 -2
- package/dist/mint-components/{p-c79c608d.system.entry.js → p-e7cb4274.system.entry.js} +1 -1
- package/dist/mint-components/p-ee684b5f.js +1 -0
- package/dist/mint-components/{p-6bf0a4d9.system.entry.js → p-ef7f70f2.system.entry.js} +1 -1
- package/dist/mint-components/{p-396bf448.system.entry.js → p-f20d9204.system.entry.js} +1 -1
- package/dist/mint-components/{p-259d31fc.entry.js → p-f5cfc52a.entry.js} +1 -1
- package/dist/mint-components/{p-d21e0dbd.js → p-f7f87338.js} +1 -1
- package/dist/mint-components/{p-cdeae699.system.js → p-f9ada3d7.system.js} +1 -1
- package/dist/mint-components/{p-563253e8.js → p-faf66fdb.js} +1 -1
- package/dist/mint-components/p-fcd03042.entry.js +1 -0
- package/dist/mint-components/{p-69bcf4fa.system.entry.js → p-fd281e6b.system.entry.js} +1 -1
- package/dist/types/components/sqm-brand/SqmBrand.stories.d.ts +1 -0
- package/dist/types/components/sqm-brand/sqm-brand.d.ts +8 -2
- package/dist/types/components/sqm-program-explainer/sqm-program-explainer-view.d.ts +1 -1
- package/dist/types/components/sqm-program-explainer/sqm-program-explainer.d.ts +1 -1
- package/dist/types/components/sqm-program-explainer-step/sqm-program-explainer-step-view.d.ts +2 -1
- package/dist/types/components/sqm-program-explainer-step/sqm-program-explainer-step.d.ts +6 -1
- package/dist/types/components/sqm-rewards-table/cells/sqm-rewards-table-date-cell.d.ts +7 -0
- package/dist/types/components/sqm-rewards-table/cells/sqm-rewards-table-rewards-cell.d.ts +5 -0
- package/dist/types/components/sqm-rewards-table/cells/sqm-rewards-table-source-cell.d.ts +4 -0
- package/dist/types/components/sqm-rewards-table/cells/sqm-rewards-table-status-cell.d.ts +6 -0
- package/dist/types/components/sqm-rewards-table/columns/RewardTableColumn.d.ts +5 -0
- package/dist/types/components/sqm-rewards-table/columns/sqm-rewards-table-date-column.d.ts +25 -0
- package/dist/types/components/sqm-rewards-table/{sqm-rewards-table-column.d.ts → columns/sqm-rewards-table-reward-column.d.ts} +2 -3
- package/dist/types/components/sqm-rewards-table/columns/sqm-rewards-table-source-column.d.ts +23 -0
- package/dist/types/components/sqm-rewards-table/columns/sqm-rewards-table-status-column.d.ts +19 -0
- package/dist/types/components/sqm-rewards-table/useRewardsTable.d.ts +0 -33
- package/dist/types/components/sqm-stencilbook/AutoColor.d.ts +0 -8
- package/dist/types/components.d.ts +210 -22
- package/dist/types/fonts/GoogleFonts.d.ts +9 -0
- package/dist/types/saasquatch.d.ts +34 -0
- package/grapesjs/grapesjs.js +1 -1
- package/package.json +2 -3
- package/dist/esm-es5/ShadowViewAddon-a3f510db.js +0 -1
- package/dist/esm-es5/sqm-brand_31.entry.js +0 -58
- package/dist/esm-es5/sqm-navigation-sidebar-item-view-f2304ad9.js +0 -1
- package/dist/esm-es5/useDemoBigStat-c3b955b7.js +0 -1
- package/dist/mint-components/p-160bd62f.entry.js +0 -1
- package/dist/mint-components/p-16f5a7cb.system.js +0 -1
- package/dist/mint-components/p-1c8b0290.entry.js +0 -1
- package/dist/mint-components/p-20d41ab1.entry.js +0 -1
- package/dist/mint-components/p-3d856985.entry.js +0 -1
- package/dist/mint-components/p-4052b948.system.entry.js +0 -1
- package/dist/mint-components/p-45c752a0.entry.js +0 -1
- package/dist/mint-components/p-5480e4ee.entry.js +0 -1
- package/dist/mint-components/p-6d6be8bd.system.js +0 -1
- package/dist/mint-components/p-8435a22d.entry.js +0 -1
- package/dist/mint-components/p-883a32e7.entry.js +0 -1
- package/dist/mint-components/p-8c4931a5.js +0 -1
- package/dist/mint-components/p-9e4fee30.system.entry.js +0 -1
- package/dist/mint-components/p-a2c3cff3.js +0 -1
- package/dist/mint-components/p-adcde089.system.entry.js +0 -58
- package/dist/mint-components/p-ade44a4e.entry.js +0 -1
- package/dist/mint-components/p-bf7fcf0c.js +0 -1
- package/dist/mint-components/p-d174d0bc.system.entry.js +0 -1
- package/dist/mint-components/p-dd865aa8.entry.js +0 -397
|
@@ -3,18 +3,19 @@ export default {
|
|
|
3
3
|
title: "Components/Brand",
|
|
4
4
|
};
|
|
5
5
|
const SampleComponents = () => (h("div", { style: { padding: "10px", border: "5px solid #EEE" } },
|
|
6
|
-
h("
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
h("
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
6
|
+
h("div", { style: { display: "flex", gap: "5px", padding: "5px" } },
|
|
7
|
+
h("sl-button", { type: "default" }, "Default"),
|
|
8
|
+
h("sl-button", { type: "primary" }, "Primary"),
|
|
9
|
+
h("sl-button", { type: "success" }, "Success"),
|
|
10
|
+
h("sl-button", { type: "neutral" }, "Neutral"),
|
|
11
|
+
h("sl-button", { type: "warning" }, "Warning"),
|
|
12
|
+
h("sl-button", { type: "danger" }, "Danger")),
|
|
13
|
+
h("div", { style: { display: "flex", gap: "5px", padding: "5px" } },
|
|
14
|
+
h("sl-badge", { type: "primary" }, "Primary"),
|
|
15
|
+
h("sl-badge", { type: "success" }, "Success"),
|
|
16
|
+
h("sl-badge", { type: "neutral" }, "Neutral"),
|
|
17
|
+
h("sl-badge", { type: "warning" }, "Warning"),
|
|
18
|
+
h("sl-badge", { type: "danger" }, "Danger")),
|
|
18
19
|
h("div", { class: "color-palette" },
|
|
19
20
|
h("div", { class: "color-palette__name" },
|
|
20
21
|
"Primary",
|
|
@@ -66,10 +67,27 @@ export const Nested = () => {
|
|
|
66
67
|
function ColorSwatch({ depth }) {
|
|
67
68
|
return (h("div", { style: {
|
|
68
69
|
backgroundColor: `var(--sl-color-primary-${depth})`,
|
|
70
|
+
color: `var(--sl-color-neutral-${1000 - depth})`,
|
|
69
71
|
width: "50px",
|
|
70
72
|
height: "50px",
|
|
71
73
|
display: "flex",
|
|
72
74
|
justifyContent: "center",
|
|
73
|
-
alignItems: "center"
|
|
75
|
+
alignItems: "center",
|
|
74
76
|
} }, depth));
|
|
75
77
|
}
|
|
78
|
+
export const Fonts = () => {
|
|
79
|
+
return (h("div", null,
|
|
80
|
+
h(SampleComponents, null),
|
|
81
|
+
h("sqm-brand", { "brand-font": "Roboto" },
|
|
82
|
+
"Roboto",
|
|
83
|
+
h(SampleComponents, null)),
|
|
84
|
+
h("sqm-brand", { "brand-font": "Open Sans" },
|
|
85
|
+
"Open Sans",
|
|
86
|
+
h(SampleComponents, null)),
|
|
87
|
+
h("sqm-brand", { "brand-font": "Lato" },
|
|
88
|
+
"Lato",
|
|
89
|
+
h(SampleComponents, null)),
|
|
90
|
+
h("sqm-brand", { "brand-font": "Oswald" },
|
|
91
|
+
"Oswald",
|
|
92
|
+
h(SampleComponents, null))));
|
|
93
|
+
};
|
|
@@ -1,32 +1,51 @@
|
|
|
1
|
-
import { Component, h, Host, Prop } from "@stencil/core";
|
|
2
1
|
import { withHooks } from "@saasquatch/stencil-hooks";
|
|
3
|
-
import {
|
|
2
|
+
import { useEffect } from "@saasquatch/universal-hooks";
|
|
3
|
+
import { Component, h, Host, Prop } from "@stencil/core";
|
|
4
|
+
import { buildFontsCssUrl } from "../../fonts/GoogleFonts";
|
|
5
|
+
import { autoColorScaleCss } from "../sqm-stencilbook/AutoColor";
|
|
4
6
|
/**
|
|
5
7
|
*
|
|
6
|
-
* @uiName
|
|
7
|
-
* @slot the
|
|
8
|
+
* @uiName Brand Container
|
|
9
|
+
* @slot Controls the brand color and font of Mint Components wrapped by the container.
|
|
8
10
|
*/
|
|
9
11
|
export class BrandComponent {
|
|
10
12
|
constructor() {
|
|
11
|
-
/**
|
|
12
|
-
* Controls the primary brand color used in the Mint Components library. Note that this
|
|
13
|
-
* does not affect vanilla components or other component libraries.
|
|
14
|
-
*
|
|
15
|
-
* @uiName Brand Color
|
|
16
|
-
*/
|
|
17
|
-
this.brandColor = "#0000FF";
|
|
18
13
|
withHooks(this);
|
|
19
14
|
}
|
|
20
15
|
disconnectedCallback() { }
|
|
21
16
|
render() {
|
|
22
|
-
|
|
17
|
+
var _a, _b;
|
|
18
|
+
const brandColor = (_a = this.brandColor) !== null && _a !== void 0 ? _a : "inherit";
|
|
19
|
+
const css = autoColorScaleCss(brandColor);
|
|
20
|
+
const sanitizedFont = ((_b = this.brandFont) !== null && _b !== void 0 ? _b : "").trim() || undefined;
|
|
21
|
+
useEffect(() => {
|
|
22
|
+
if (!sanitizedFont) {
|
|
23
|
+
// Nothing required in default case.
|
|
24
|
+
return;
|
|
25
|
+
}
|
|
26
|
+
const sheet = document.createElement("link");
|
|
27
|
+
sheet.setAttribute("href", buildFontsCssUrl(sanitizedFont));
|
|
28
|
+
sheet.setAttribute("rel", "stylesheet");
|
|
29
|
+
document.head.appendChild(sheet);
|
|
30
|
+
return () => document.head.removeChild(sheet);
|
|
31
|
+
}, [sanitizedFont]);
|
|
32
|
+
const font = sanitizedFont !== null && sanitizedFont !== void 0 ? sanitizedFont : "inherit";
|
|
23
33
|
return (h(Host, null,
|
|
24
34
|
h("style", null, `
|
|
25
35
|
:host{
|
|
26
36
|
display: contents;
|
|
27
37
|
}
|
|
28
|
-
/*
|
|
38
|
+
/*
|
|
39
|
+
Selects any element placed inside a slot
|
|
40
|
+
- resets css variable inheritence for fonts
|
|
41
|
+
|
|
42
|
+
*/
|
|
29
43
|
::slotted(*) {
|
|
44
|
+
--sl-font-sans: "${font}", arial;
|
|
45
|
+
--sl-input-font-family: "${font}", arial;
|
|
46
|
+
--sl-tooltip-font-family: "${font}", arial;
|
|
47
|
+
font-family: "${font}", arial;
|
|
48
|
+
|
|
30
49
|
${css}
|
|
31
50
|
}`),
|
|
32
51
|
h("slot", null)));
|
|
@@ -52,8 +71,27 @@ export class BrandComponent {
|
|
|
52
71
|
"text": "Controls the primary brand color used in the Mint Components library. Note that this\r\ndoes not affect vanilla components or other component libraries."
|
|
53
72
|
},
|
|
54
73
|
"attribute": "brand-color",
|
|
55
|
-
"reflect": false
|
|
56
|
-
|
|
74
|
+
"reflect": false
|
|
75
|
+
},
|
|
76
|
+
"brandFont": {
|
|
77
|
+
"type": "string",
|
|
78
|
+
"mutable": false,
|
|
79
|
+
"complexType": {
|
|
80
|
+
"original": "string",
|
|
81
|
+
"resolved": "string",
|
|
82
|
+
"references": {}
|
|
83
|
+
},
|
|
84
|
+
"required": false,
|
|
85
|
+
"optional": false,
|
|
86
|
+
"docs": {
|
|
87
|
+
"tags": [{
|
|
88
|
+
"text": "Brand Font",
|
|
89
|
+
"name": "uiName"
|
|
90
|
+
}],
|
|
91
|
+
"text": "The brand font that you want to use"
|
|
92
|
+
},
|
|
93
|
+
"attribute": "brand-font",
|
|
94
|
+
"reflect": false
|
|
57
95
|
}
|
|
58
96
|
}; }
|
|
59
97
|
}
|
|
@@ -6,28 +6,31 @@ export default {
|
|
|
6
6
|
};
|
|
7
7
|
const props = {
|
|
8
8
|
header: "Klip Rewards",
|
|
9
|
-
|
|
9
|
+
cardTitle: "Earn rewards with our loyalty program",
|
|
10
10
|
description: "Earn points by completing tasks like uploading your first video or sharing videos with friends. Use your points to redeem rewards like one free month of Klip Enterprise or two plane tickets to anywhere in North America.",
|
|
11
11
|
color: "black",
|
|
12
12
|
background: "#F3F0EC",
|
|
13
13
|
};
|
|
14
14
|
const steps1 = {
|
|
15
|
-
|
|
15
|
+
cardTitle: "Invite your friends to Klip",
|
|
16
16
|
description: "Earn up to $1200 in rewards for each referral",
|
|
17
17
|
color: "white",
|
|
18
18
|
background: "#5B3EDA",
|
|
19
|
+
icon: "person-plus-fill",
|
|
19
20
|
};
|
|
20
21
|
const steps2 = {
|
|
21
|
-
|
|
22
|
+
cardTitle: "If your friend signs up for a Klip Business plan",
|
|
22
23
|
description: "Get a $50 VISA giftcard when they pay for their first month",
|
|
23
24
|
color: "black",
|
|
24
25
|
background: "#F3CC66",
|
|
26
|
+
icon: "server",
|
|
25
27
|
};
|
|
26
28
|
const steps3 = {
|
|
27
|
-
|
|
29
|
+
cardTitle: "If your friend signs up for a Klip Enterprise plan",
|
|
28
30
|
description: "Get up to $1200 in rewards - a $200 VISA giftcard when our sales team qualifies them as a good fit for Klip, and a $1000 VISA giftcard when they become a paying customer",
|
|
29
31
|
color: "black",
|
|
30
32
|
background: "#D3CCF5",
|
|
33
|
+
icon: "people-fill",
|
|
31
34
|
};
|
|
32
35
|
export const OneStep = () => {
|
|
33
36
|
return (h(ProgramExplainerView, Object.assign({}, props),
|
|
@@ -29,12 +29,13 @@ export function ProgramExplainerView(props, children) {
|
|
|
29
29
|
jss.setup(preset());
|
|
30
30
|
const sheet = jss.createStyleSheet(style);
|
|
31
31
|
const styleString = sheet.toString();
|
|
32
|
+
console.log(props);
|
|
32
33
|
return (h("div", null,
|
|
33
34
|
h("style", { type: "text/css" }, styleString),
|
|
34
35
|
h("div", { class: sheet.classes.Card },
|
|
35
36
|
h("div", { class: sheet.classes.Title }, props.header)),
|
|
36
37
|
h("div", { class: sheet.classes.Container }, children),
|
|
37
38
|
h("div", { class: sheet.classes.Card },
|
|
38
|
-
h("div", { class: sheet.classes.Title }, props.
|
|
39
|
+
h("div", { class: sheet.classes.Title }, props.cardTitle),
|
|
39
40
|
h("div", { class: sheet.classes.Description }, props.description))));
|
|
40
41
|
}
|
|
@@ -38,7 +38,7 @@ export class ProgramExplainer {
|
|
|
38
38
|
"attribute": "header",
|
|
39
39
|
"reflect": false
|
|
40
40
|
},
|
|
41
|
-
"
|
|
41
|
+
"cardTitle": {
|
|
42
42
|
"type": "string",
|
|
43
43
|
"mutable": false,
|
|
44
44
|
"complexType": {
|
|
@@ -55,7 +55,7 @@ export class ProgramExplainer {
|
|
|
55
55
|
}],
|
|
56
56
|
"text": ""
|
|
57
57
|
},
|
|
58
|
-
"attribute": "title",
|
|
58
|
+
"attribute": "card-title",
|
|
59
59
|
"reflect": false
|
|
60
60
|
},
|
|
61
61
|
"description": {
|
package/dist/collection/components/sqm-program-explainer-step/ProgramExplainerStep.stories.js
CHANGED
|
@@ -5,10 +5,11 @@ export default {
|
|
|
5
5
|
};
|
|
6
6
|
export const Example1 = () => {
|
|
7
7
|
const props = {
|
|
8
|
-
|
|
8
|
+
cardTitle: "Invite your friends to Klip",
|
|
9
9
|
description: "Earn up to $1200 in rewards for each referral",
|
|
10
10
|
color: "white",
|
|
11
|
-
background: "#5B3EDA"
|
|
11
|
+
background: "#5B3EDA",
|
|
12
|
+
icon: "person-plus-fill",
|
|
12
13
|
};
|
|
13
14
|
return h(ProgramExplainerStepView, Object.assign({}, props));
|
|
14
15
|
};
|
package/dist/collection/components/sqm-program-explainer-step/sqm-program-explainer-step-view.js
CHANGED
|
@@ -45,6 +45,7 @@ export function ProgramExplainerStepView(props) {
|
|
|
45
45
|
jss.setup(preset());
|
|
46
46
|
const sheet = jss.createStyleSheet(style);
|
|
47
47
|
const styleString = sheet.toString();
|
|
48
|
+
console.log(props);
|
|
48
49
|
return (h("div", { class: sheet.classes.Container },
|
|
49
50
|
h("style", { type: "text/css" }, styleString),
|
|
50
51
|
h("div", { class: sheet.classes.Logo },
|
|
@@ -52,9 +53,14 @@ export function ProgramExplainerStepView(props) {
|
|
|
52
53
|
width: "64px",
|
|
53
54
|
height: "64px",
|
|
54
55
|
borderRadius: "100%",
|
|
55
|
-
background: "
|
|
56
|
-
|
|
56
|
+
background: "#F4F5F7",
|
|
57
|
+
color: "var(--sl-color-primary-400)",
|
|
58
|
+
textAlign: "center",
|
|
59
|
+
lineHeight: "72px",
|
|
60
|
+
} },
|
|
61
|
+
h("div", { style: { fontSize: "26px" } },
|
|
62
|
+
h("sl-icon", { name: props.icon })))),
|
|
57
63
|
h("div", { class: sheet.classes.Text },
|
|
58
|
-
h("div", { class: sheet.classes.Title }, props.
|
|
64
|
+
h("div", { class: sheet.classes.Title }, props.cardTitle),
|
|
59
65
|
h("div", { class: sheet.classes.Description }, props.description))));
|
|
60
66
|
}
|
|
@@ -16,7 +16,7 @@ export class ProgramExplainerStep {
|
|
|
16
16
|
static get is() { return "sqm-program-explainer-step"; }
|
|
17
17
|
static get encapsulation() { return "shadow"; }
|
|
18
18
|
static get properties() { return {
|
|
19
|
-
"
|
|
19
|
+
"cardTitle": {
|
|
20
20
|
"type": "string",
|
|
21
21
|
"mutable": false,
|
|
22
22
|
"complexType": {
|
|
@@ -33,7 +33,7 @@ export class ProgramExplainerStep {
|
|
|
33
33
|
}],
|
|
34
34
|
"text": ""
|
|
35
35
|
},
|
|
36
|
-
"attribute": "title",
|
|
36
|
+
"attribute": "card-title",
|
|
37
37
|
"reflect": false
|
|
38
38
|
},
|
|
39
39
|
"description": {
|
|
@@ -70,6 +70,9 @@ export class ProgramExplainerStep {
|
|
|
70
70
|
"tags": [{
|
|
71
71
|
"text": "Color",
|
|
72
72
|
"name": "uiName"
|
|
73
|
+
}, {
|
|
74
|
+
"text": "color",
|
|
75
|
+
"name": "uiWidget"
|
|
73
76
|
}],
|
|
74
77
|
"text": ""
|
|
75
78
|
},
|
|
@@ -95,6 +98,26 @@ export class ProgramExplainerStep {
|
|
|
95
98
|
},
|
|
96
99
|
"attribute": "background",
|
|
97
100
|
"reflect": false
|
|
101
|
+
},
|
|
102
|
+
"icon": {
|
|
103
|
+
"type": "string",
|
|
104
|
+
"mutable": false,
|
|
105
|
+
"complexType": {
|
|
106
|
+
"original": "string",
|
|
107
|
+
"resolved": "string",
|
|
108
|
+
"references": {}
|
|
109
|
+
},
|
|
110
|
+
"required": false,
|
|
111
|
+
"optional": false,
|
|
112
|
+
"docs": {
|
|
113
|
+
"tags": [{
|
|
114
|
+
"text": "Icon",
|
|
115
|
+
"name": "uiName"
|
|
116
|
+
}],
|
|
117
|
+
"text": ""
|
|
118
|
+
},
|
|
119
|
+
"attribute": "icon",
|
|
120
|
+
"reflect": false
|
|
98
121
|
}
|
|
99
122
|
}; }
|
|
100
123
|
}
|
package/dist/collection/components/sqm-reward-exchange-list/sqm-reward-exchange-list-view.js
CHANGED
|
@@ -308,6 +308,7 @@ export function RewardExchangeView(props) {
|
|
|
308
308
|
defaultMessage: (_b = (_a = states.content) === null || _a === void 0 ? void 0 : _a.text) === null || _b === void 0 ? void 0 : _b.notAvailableError,
|
|
309
309
|
}, {
|
|
310
310
|
unavailableReason: step.unavailableReasonCode,
|
|
311
|
+
sourceUnit: item.sourceUnit,
|
|
311
312
|
sourceValue: step.prettySourceValue || item.prettySourceMinValue,
|
|
312
313
|
}))))));
|
|
313
314
|
})));
|
|
@@ -370,6 +371,7 @@ export function RewardExchangeView(props) {
|
|
|
370
371
|
}, {
|
|
371
372
|
unavailableReason: item.unavailableReason ||
|
|
372
373
|
item.unavailableReasonCode,
|
|
374
|
+
sourceUnit: item.sourceUnit,
|
|
373
375
|
sourceValue: item.prettySourceValue ||
|
|
374
376
|
item.prettySourceMinValue,
|
|
375
377
|
}))))))));
|
|
@@ -37,6 +37,7 @@ const GET_EXCHANGE_LIST = gql `
|
|
|
37
37
|
available
|
|
38
38
|
globalRewardKey
|
|
39
39
|
unavailableReasonCode
|
|
40
|
+
rewardInput
|
|
40
41
|
}
|
|
41
42
|
}
|
|
42
43
|
totalCount
|
|
@@ -71,7 +72,7 @@ export function useRewardExchangeList(props) {
|
|
|
71
72
|
const { selectedItem, selectedStep, redeemStage, amount, exchangeError } = exchangeState;
|
|
72
73
|
const user = useUserIdentity();
|
|
73
74
|
const [exchange, { data: exchangeResponse, loading: exchangeLoading, errors },] = useMutation(EXCHANGE);
|
|
74
|
-
const { data, loading, refetch, errors: queryError, } = useQuery(GET_EXCHANGE_LIST, !(user === null || user === void 0 ? void 0 : user.jwt));
|
|
75
|
+
const { data, loading, refetch, errors: queryError, } = useQuery(GET_EXCHANGE_LIST, {}, !(user === null || user === void 0 ? void 0 : user.jwt));
|
|
75
76
|
useEffect(() => {
|
|
76
77
|
var _a, _b;
|
|
77
78
|
if ((_b = (_a = exchangeResponse === null || exchangeResponse === void 0 ? void 0 : exchangeResponse.exchangeReward) === null || _a === void 0 ? void 0 : _a.reward) === null || _b === void 0 ? void 0 : _b.id) {
|
|
@@ -117,9 +118,7 @@ export function useRewardExchangeList(props) {
|
|
|
117
118
|
unit: selectedItem.sourceUnit,
|
|
118
119
|
},
|
|
119
120
|
globalRewardKey: selectedItem.globalRewardKey,
|
|
120
|
-
rewardInput:
|
|
121
|
-
valueInCents: selectedStep.destinationValue,
|
|
122
|
-
},
|
|
121
|
+
rewardInput: selectedStep.rewardInput,
|
|
123
122
|
};
|
|
124
123
|
break;
|
|
125
124
|
case "VARIABLE_CREDIT_REWARD":
|
|
@@ -139,11 +138,7 @@ export function useRewardExchangeList(props) {
|
|
|
139
138
|
default:
|
|
140
139
|
exchangeVariables = {
|
|
141
140
|
...exchangeVariables,
|
|
142
|
-
|
|
143
|
-
amount: selectedItem.sourceValue,
|
|
144
|
-
unit: selectedItem.sourceUnit,
|
|
145
|
-
},
|
|
146
|
-
globalRewardKey: selectedItem.globalRewardKey,
|
|
141
|
+
...selectedStep.rewardInput,
|
|
147
142
|
};
|
|
148
143
|
}
|
|
149
144
|
exchange({ exchangeRewardInput: exchangeVariables });
|
|
@@ -49,5 +49,8 @@ export const RewardsTableNoProgram = createHookStory(() => {
|
|
|
49
49
|
ignored: true,
|
|
50
50
|
};
|
|
51
51
|
return (h("sqm-rewards-table", null,
|
|
52
|
-
h("sqm-rewards-table-column", null)
|
|
52
|
+
h("sqm-rewards-table-reward-column", null),
|
|
53
|
+
h("sqm-rewards-table-source-column", null),
|
|
54
|
+
h("sqm-rewards-table-status-column", null),
|
|
55
|
+
h("sqm-rewards-table-date-column", null)));
|
|
53
56
|
});
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { withHooks } from "@saasquatch/stencil-hooks";
|
|
2
|
+
import { Component, h, Prop, State } from "@stencil/core";
|
|
3
|
+
import { DateTime } from "luxon";
|
|
4
|
+
import { TextSpanView } from "../../sqm-text-span/sqm-text-span-view";
|
|
5
|
+
export class RewardTableDateCell {
|
|
6
|
+
constructor() {
|
|
7
|
+
this.ignored = true;
|
|
8
|
+
withHooks(this);
|
|
9
|
+
}
|
|
10
|
+
disconnectedCallback() { }
|
|
11
|
+
render() {
|
|
12
|
+
var _a;
|
|
13
|
+
// needs hook to use locale
|
|
14
|
+
const date = !this.date
|
|
15
|
+
? "-"
|
|
16
|
+
: (_a = DateTime.fromMillis(this.date)) === null || _a === void 0 ? void 0 : _a.toLocaleString(DateTime.DATE_MED);
|
|
17
|
+
return h(TextSpanView, { type: "p" }, date);
|
|
18
|
+
}
|
|
19
|
+
static get is() { return "sqm-rewards-table-date-cell"; }
|
|
20
|
+
static get encapsulation() { return "shadow"; }
|
|
21
|
+
static get properties() { return {
|
|
22
|
+
"date": {
|
|
23
|
+
"type": "number",
|
|
24
|
+
"mutable": false,
|
|
25
|
+
"complexType": {
|
|
26
|
+
"original": "number",
|
|
27
|
+
"resolved": "number",
|
|
28
|
+
"references": {}
|
|
29
|
+
},
|
|
30
|
+
"required": false,
|
|
31
|
+
"optional": false,
|
|
32
|
+
"docs": {
|
|
33
|
+
"tags": [],
|
|
34
|
+
"text": ""
|
|
35
|
+
},
|
|
36
|
+
"attribute": "date",
|
|
37
|
+
"reflect": false
|
|
38
|
+
}
|
|
39
|
+
}; }
|
|
40
|
+
static get states() { return {
|
|
41
|
+
"ignored": {}
|
|
42
|
+
}; }
|
|
43
|
+
}
|
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
import { Component, h, Prop } from "@stencil/core";
|
|
2
|
+
import jss from "jss";
|
|
3
|
+
import preset from "jss-preset-default";
|
|
4
|
+
import { TextSpanView } from "../../sqm-text-span/sqm-text-span-view";
|
|
5
|
+
export class RewardTableRewardsCell {
|
|
6
|
+
// TODO: value function from portalv2
|
|
7
|
+
render() {
|
|
8
|
+
const style = {
|
|
9
|
+
DetailsContainer: {
|
|
10
|
+
width: "100%",
|
|
11
|
+
display: "flex",
|
|
12
|
+
"align-items": "center",
|
|
13
|
+
"justify-content": "space-between",
|
|
14
|
+
"margin-right": "var(--sl-spacing-small)",
|
|
15
|
+
"flex-wrap": "wrap",
|
|
16
|
+
},
|
|
17
|
+
Details: {
|
|
18
|
+
"padding-bottom": "var(--sl-spacing-small)",
|
|
19
|
+
"max-width": "500px",
|
|
20
|
+
"padding-right": "var(--sl-spacing-x-small)",
|
|
21
|
+
"&::part(header)": {
|
|
22
|
+
padding: "var(--sl-spacing-x-small)",
|
|
23
|
+
cursor: `${this.hideDetails ? "default" : "pointer"}`,
|
|
24
|
+
},
|
|
25
|
+
"&::part(content)": {
|
|
26
|
+
padding: "var(--sl-spacing-x-small) var(--sl-spacing-medium)",
|
|
27
|
+
},
|
|
28
|
+
"&::part(base)": {
|
|
29
|
+
opacity: "1",
|
|
30
|
+
},
|
|
31
|
+
"&::part(summary-icon)": {
|
|
32
|
+
display: `${this.hideDetails ? "none" : "flex"}`,
|
|
33
|
+
},
|
|
34
|
+
},
|
|
35
|
+
BadgeContainer: {
|
|
36
|
+
"& > :not(:last-child)": {
|
|
37
|
+
"margin-right": "var(--sl-spacing-x-small)",
|
|
38
|
+
},
|
|
39
|
+
},
|
|
40
|
+
BoldText: {
|
|
41
|
+
"font-weight": "var(--sl-font-weight-semibold)",
|
|
42
|
+
},
|
|
43
|
+
StatusBadge: {
|
|
44
|
+
paddingLeft: "var(--sl-spacing-xxx-small)",
|
|
45
|
+
},
|
|
46
|
+
};
|
|
47
|
+
jss.setup(preset());
|
|
48
|
+
const sheet = jss.createStyleSheet(style);
|
|
49
|
+
const styleString = sheet.toString();
|
|
50
|
+
function RewardValue({ reward }) {
|
|
51
|
+
var _a;
|
|
52
|
+
const pimpedPrettyValue = reward.unit === "CENTS"
|
|
53
|
+
? reward.prettyValue.replace(/USD/gi, "$")
|
|
54
|
+
: (_a = reward.prettyValue) !== null && _a !== void 0 ? _a : "-";
|
|
55
|
+
if (reward.type === "CREDIT") {
|
|
56
|
+
const progress = Math.round(((parseFloat(reward.prettyValueNumber) -
|
|
57
|
+
parseFloat(reward.prettyRedeemedNumber)) /
|
|
58
|
+
parseFloat(reward.prettyValueNumber)) *
|
|
59
|
+
100);
|
|
60
|
+
const progressBarSubtext = reward.statuses.includes("EXPIRED") ||
|
|
61
|
+
reward.statuses.includes("CANCELLED") ? (h("div", null,
|
|
62
|
+
reward.prettyRedeemedCredit,
|
|
63
|
+
" redeemed")) : (h("div", null,
|
|
64
|
+
reward.prettyAvailableValue,
|
|
65
|
+
" available"));
|
|
66
|
+
const style = {
|
|
67
|
+
Progress: {
|
|
68
|
+
background: "#e0e0e0",
|
|
69
|
+
borderRadius: "4px",
|
|
70
|
+
height: "3px",
|
|
71
|
+
width: "80px",
|
|
72
|
+
marginTop: "6px",
|
|
73
|
+
marginBottom: "6px",
|
|
74
|
+
"&:after": {
|
|
75
|
+
content: '""',
|
|
76
|
+
display: "block",
|
|
77
|
+
background: "#222222",
|
|
78
|
+
borderRadius: "4px",
|
|
79
|
+
width: `${progress}%`,
|
|
80
|
+
height: "100%",
|
|
81
|
+
},
|
|
82
|
+
},
|
|
83
|
+
Ellipsis: {
|
|
84
|
+
position: "relative",
|
|
85
|
+
margin: "-8px",
|
|
86
|
+
bottom: "1px",
|
|
87
|
+
left: "8px",
|
|
88
|
+
},
|
|
89
|
+
};
|
|
90
|
+
jss.setup(preset());
|
|
91
|
+
const sheet = jss.createStyleSheet(style);
|
|
92
|
+
const styleString = sheet.toString();
|
|
93
|
+
return (h("div", null,
|
|
94
|
+
h("style", { type: "text/css" }, styleString),
|
|
95
|
+
h("div", { style: {
|
|
96
|
+
display: "inline-block",
|
|
97
|
+
verticalAlign: "top",
|
|
98
|
+
maxWidth: "100%",
|
|
99
|
+
// maxHeight: "35px",
|
|
100
|
+
maxHeight: "60px",
|
|
101
|
+
whiteSpace: "nowrap",
|
|
102
|
+
overflow: "hidden",
|
|
103
|
+
textOverflow: "ellipsis",
|
|
104
|
+
} },
|
|
105
|
+
h("span", { style: { color: "#232323" } }, pimpedPrettyValue),
|
|
106
|
+
" ",
|
|
107
|
+
h("br", null),
|
|
108
|
+
" ",
|
|
109
|
+
h("div", { class: sheet.classes.Progress }),
|
|
110
|
+
progressBarSubtext)));
|
|
111
|
+
}
|
|
112
|
+
return h("span", { style: { color: "#232323" } }, pimpedPrettyValue);
|
|
113
|
+
}
|
|
114
|
+
return (h("div", { style: { display: "contents" } },
|
|
115
|
+
h("style", { type: "text/css" }, styleString),
|
|
116
|
+
h("div", { slot: "summary", class: sheet.classes.DetailsContainer },
|
|
117
|
+
h(TextSpanView, { type: "p" },
|
|
118
|
+
h("span", { class: sheet.classes.BoldText },
|
|
119
|
+
h(RewardValue, { reward: this.reward }))))));
|
|
120
|
+
}
|
|
121
|
+
static get is() { return "sqm-rewards-table-rewards-cell"; }
|
|
122
|
+
static get encapsulation() { return "shadow"; }
|
|
123
|
+
static get properties() { return {
|
|
124
|
+
"reward": {
|
|
125
|
+
"type": "unknown",
|
|
126
|
+
"mutable": false,
|
|
127
|
+
"complexType": {
|
|
128
|
+
"original": "Reward",
|
|
129
|
+
"resolved": "Reward",
|
|
130
|
+
"references": {
|
|
131
|
+
"Reward": {
|
|
132
|
+
"location": "global"
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
},
|
|
136
|
+
"required": false,
|
|
137
|
+
"optional": false,
|
|
138
|
+
"docs": {
|
|
139
|
+
"tags": [],
|
|
140
|
+
"text": ""
|
|
141
|
+
}
|
|
142
|
+
},
|
|
143
|
+
"hideDetails": {
|
|
144
|
+
"type": "boolean",
|
|
145
|
+
"mutable": false,
|
|
146
|
+
"complexType": {
|
|
147
|
+
"original": "boolean",
|
|
148
|
+
"resolved": "boolean",
|
|
149
|
+
"references": {}
|
|
150
|
+
},
|
|
151
|
+
"required": false,
|
|
152
|
+
"optional": false,
|
|
153
|
+
"docs": {
|
|
154
|
+
"tags": [],
|
|
155
|
+
"text": ""
|
|
156
|
+
},
|
|
157
|
+
"attribute": "hide-details",
|
|
158
|
+
"reflect": false
|
|
159
|
+
}
|
|
160
|
+
}; }
|
|
161
|
+
}
|