@saasquatch/mint-components 1.5.0-13 → 1.5.0-17
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/CHANGELOG.md +48 -24
- package/dist/cjs/{global-89f66e76.js → global-5ca2a131.js} +5 -5
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/mint-components.cjs.js +2 -2
- package/dist/cjs/sqm-big-stat.cjs.entry.js +1 -1
- package/dist/cjs/sqm-brand_39.cjs.entry.js +422 -238
- package/dist/cjs/sqm-card-feed-view-17fd3f0a.js +369 -0
- package/dist/cjs/sqm-card-feed.cjs.entry.js +4 -5
- package/dist/cjs/{sqm-leaderboard-rank-view-510f16d3.js → sqm-leaderboard-rank-view-dff9de2e.js} +1 -1
- package/dist/cjs/sqm-leaderboard-rank.cjs.entry.js +2 -2
- package/dist/cjs/{sqm-portal-email-verification-view-5093ac20.js → sqm-portal-email-verification-view-f0cbd78b.js} +1 -1
- package/dist/cjs/sqm-portal-email-verification.cjs.entry.js +10 -3
- package/dist/cjs/{sqm-portal-footer-view-03408484.js → sqm-portal-footer-view-c714590c.js} +1 -1
- package/dist/cjs/sqm-portal-footer.cjs.entry.js +2 -2
- package/dist/cjs/sqm-portal-forgot-password.cjs.entry.js +16 -4
- package/dist/cjs/{sqm-portal-profile-view-1a6327e4.js → sqm-portal-profile-view-f0233000.js} +3 -2
- package/dist/cjs/sqm-portal-profile.cjs.entry.js +2 -2
- package/dist/cjs/sqm-portal-reset-password.cjs.entry.js +9 -1
- package/dist/cjs/sqm-portal-verify-email.cjs.entry.js +10 -2
- package/dist/cjs/{sqm-program-explainer-step-view-54424840.js → sqm-program-explainer-step-view-17c5e99d.js} +4 -4
- package/dist/cjs/sqm-program-explainer-step.cjs.entry.js +1 -1
- package/dist/cjs/{sqm-program-explainer-view-db516613.js → sqm-program-explainer-view-d516c9df.js} +2 -2
- package/dist/cjs/sqm-program-explainer.cjs.entry.js +1 -1
- package/dist/cjs/{useDemoBigStat-5f770877.js → useDemoBigStat-49cd314a.js} +1 -2
- package/dist/collection/components/sqm-big-stat/sqm-big-stat.js +20 -0
- package/dist/collection/components/sqm-big-stat/useBigStat.js +1 -2
- package/dist/collection/components/sqm-card-feed/CardFeed.stories.js +13 -1
- package/dist/collection/components/sqm-card-feed/sqm-card-feed-view.js +7 -10
- package/dist/collection/components/sqm-card-feed/sqm-card-feed.js +9 -13
- package/dist/collection/components/sqm-portal-container/PortalContainer.stories.js +11 -1
- package/dist/collection/components/sqm-portal-container/sqm-portal-container-view.js +2 -1
- package/dist/collection/components/sqm-portal-container/sqm-portal-container.js +25 -0
- package/dist/collection/components/sqm-portal-email-verification/sqm-portal-email-verification.js +27 -0
- package/dist/collection/components/sqm-portal-email-verification/usePortalEmailVerification.js +2 -1
- package/dist/collection/components/sqm-portal-forgot-password/PortalForgotPassword.stories.js +4 -0
- package/dist/collection/components/sqm-portal-forgot-password/sqm-portal-forgot-password.js +55 -3
- package/dist/collection/components/sqm-portal-forgot-password/usePortalForgotPassword.js +4 -2
- package/dist/collection/components/sqm-portal-login/PortalLogin.stories.js +6 -0
- package/dist/collection/components/sqm-portal-login/sqm-portal-login.js +59 -4
- package/dist/collection/components/sqm-portal-login/usePortalLogin.js +4 -2
- package/dist/collection/components/sqm-portal-register/PortalRegister.stories.js +5 -0
- package/dist/collection/components/sqm-portal-register/sqm-portal-register.js +55 -2
- package/dist/collection/components/sqm-portal-register/usePortalRegister.js +3 -0
- package/dist/collection/components/sqm-portal-reset-password/sqm-portal-reset-password.js +30 -1
- package/dist/collection/components/sqm-portal-reset-password/usePortalResetPassword.js +1 -1
- package/dist/collection/components/sqm-portal-verify-email/sqm-portal-verify-email.js +30 -1
- package/dist/collection/components/sqm-portal-verify-email/usePortalVerifyEmail.js +2 -2
- package/dist/collection/components/sqm-program-explainer/ProgramExplainer.stories.js +1 -1
- package/dist/collection/components/sqm-program-explainer/sqm-program-explainer-view.js +2 -2
- package/dist/collection/components/sqm-program-explainer-step/ProgramExplainerStep.stories.js +1 -1
- package/dist/collection/components/sqm-program-explainer-step/sqm-program-explainer-step-view.js +5 -5
- package/dist/collection/components/sqm-referral-table/sqm-referral-table.js +5 -2
- package/dist/collection/components/sqm-reward-exchange-list/RewardExchangeListData.js +13 -8
- package/dist/collection/components/sqm-reward-exchange-list/sqm-reward-exchange-list-view.js +91 -114
- package/dist/collection/components/sqm-reward-exchange-list/sqm-reward-exchange-list.js +113 -5
- package/dist/collection/components/sqm-share-button/ShareButton.stories.js +21 -0
- package/dist/collection/components/sqm-share-button/sqm-share-button-view.js +17 -9
- package/dist/collection/components/sqm-share-button/sqm-share-button.js +62 -10
- package/dist/collection/components/sqm-task-card/TaskCard.stories.js +12 -0
- package/dist/collection/components/sqm-task-card/progress-bar/SVGs.js +1 -1
- package/dist/collection/components/sqm-task-card/progress-bar/progress-bar-view.js +24 -31
- package/dist/collection/components/sqm-task-card/sqm-task-card-view.js +79 -22
- package/dist/collection/components/sqm-task-card/sqm-task-card.js +106 -0
- package/dist/collection/components/sqm-user-name/sqm-user-name.js +1 -1
- package/dist/collection/global/styles.js +5 -5
- package/dist/collection/global/styles.ts +5 -5
- package/dist/esm/{global-e0e25c22.js → global-1c68ff6e.js} +5 -5
- package/dist/esm/loader.js +2 -2
- package/dist/esm/mint-components.js +2 -2
- package/dist/esm/sqm-big-stat.entry.js +1 -1
- package/dist/esm/sqm-brand_39.entry.js +422 -238
- package/dist/esm/sqm-card-feed-view-cdd1f818.js +367 -0
- package/dist/esm/sqm-card-feed.entry.js +4 -5
- package/dist/esm/{sqm-leaderboard-rank-view-cd1e8962.js → sqm-leaderboard-rank-view-95e6fb4f.js} +1 -1
- package/dist/esm/sqm-leaderboard-rank.entry.js +2 -2
- package/dist/esm/{sqm-portal-email-verification-view-2af31979.js → sqm-portal-email-verification-view-71eb8adb.js} +1 -1
- package/dist/esm/sqm-portal-email-verification.entry.js +10 -3
- package/dist/esm/{sqm-portal-footer-view-60cd9ae5.js → sqm-portal-footer-view-5cb00c4e.js} +1 -1
- package/dist/esm/sqm-portal-footer.entry.js +2 -2
- package/dist/esm/sqm-portal-forgot-password.entry.js +16 -4
- package/dist/esm/{sqm-portal-profile-view-ba06e776.js → sqm-portal-profile-view-864dd5b5.js} +3 -2
- package/dist/esm/sqm-portal-profile.entry.js +2 -2
- package/dist/esm/sqm-portal-reset-password.entry.js +9 -1
- package/dist/esm/sqm-portal-verify-email.entry.js +10 -2
- package/dist/esm/{sqm-program-explainer-step-view-7c0d5f71.js → sqm-program-explainer-step-view-e2b39225.js} +4 -4
- package/dist/esm/sqm-program-explainer-step.entry.js +1 -1
- package/dist/esm/{sqm-program-explainer-view-ab291eb4.js → sqm-program-explainer-view-f726f5ec.js} +2 -2
- package/dist/esm/sqm-program-explainer.entry.js +1 -1
- package/dist/esm/{useDemoBigStat-a0dd50ab.js → useDemoBigStat-acd4b73f.js} +1 -2
- package/dist/esm-es5/{global-e0e25c22.js → global-1c68ff6e.js} +1 -1
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/mint-components.js +1 -1
- package/dist/esm-es5/sqm-big-stat.entry.js +1 -1
- package/dist/esm-es5/sqm-brand_39.entry.js +1 -1
- package/dist/esm-es5/sqm-card-feed-view-cdd1f818.js +1 -0
- package/dist/esm-es5/sqm-card-feed.entry.js +1 -1
- package/dist/esm-es5/{sqm-leaderboard-rank-view-cd1e8962.js → sqm-leaderboard-rank-view-95e6fb4f.js} +1 -1
- package/dist/esm-es5/sqm-leaderboard-rank.entry.js +1 -1
- package/dist/esm-es5/{sqm-portal-email-verification-view-2af31979.js → sqm-portal-email-verification-view-71eb8adb.js} +1 -1
- package/dist/esm-es5/sqm-portal-email-verification.entry.js +1 -1
- package/dist/esm-es5/{sqm-portal-footer-view-60cd9ae5.js → sqm-portal-footer-view-5cb00c4e.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-profile-view-864dd5b5.js +1 -0
- package/dist/esm-es5/sqm-portal-profile.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-7c0d5f71.js → sqm-program-explainer-step-view-e2b39225.js} +1 -1
- package/dist/esm-es5/sqm-program-explainer-step.entry.js +1 -1
- package/dist/esm-es5/{sqm-program-explainer-view-ab291eb4.js → sqm-program-explainer-view-f726f5ec.js} +1 -1
- package/dist/esm-es5/sqm-program-explainer.entry.js +1 -1
- package/dist/esm-es5/{useDemoBigStat-a0dd50ab.js → useDemoBigStat-acd4b73f.js} +1 -1
- package/dist/mint-components/global/styles.ts +5 -5
- package/dist/mint-components/mint-components.esm.js +1 -1
- package/dist/mint-components/mint-components.js +1 -1
- package/dist/mint-components/{p-bbb06296.entry.js → p-05de158b.entry.js} +1 -1
- package/dist/mint-components/p-0b7cc270.system.js +1 -0
- package/dist/mint-components/p-172e487a.system.entry.js +1 -0
- package/dist/mint-components/{p-759d3800.entry.js → p-26e63ecb.entry.js} +2 -2
- package/dist/mint-components/{p-376a0b37.js → p-35ee8cdf.js} +1 -1
- package/dist/mint-components/p-3e187434.system.js +1 -0
- package/dist/mint-components/{p-5001b2d1.system.js → p-5744f326.system.js} +1 -1
- package/dist/mint-components/p-5896caca.system.js +1 -0
- package/dist/mint-components/p-59cc7a26.system.entry.js +1 -0
- package/dist/mint-components/{p-8b523e73.entry.js → p-5b9a5dfa.entry.js} +1 -1
- package/dist/mint-components/{p-f79454fc.entry.js → p-69e273b4.entry.js} +1 -1
- package/dist/mint-components/p-6b8d51d6.entry.js +1 -0
- package/dist/mint-components/{p-0d0ec6fd.system.entry.js → p-6caa44e1.system.entry.js} +1 -1
- package/dist/mint-components/{p-0e95b67b.js → p-700f96f5.js} +1 -1
- package/dist/mint-components/{p-a8246a50.system.entry.js → p-71b6d552.system.entry.js} +1 -1
- package/dist/mint-components/{p-02dc36a4.system.js → p-7638bf48.system.js} +1 -1
- package/dist/mint-components/p-7798ebd4.js +1 -0
- package/dist/mint-components/{p-0e8ae7e3.system.js → p-79baab87.system.js} +1 -1
- package/dist/mint-components/p-7f6d37d8.entry.js +1 -0
- package/dist/mint-components/p-878ff4ca.entry.js +1 -0
- package/dist/mint-components/{p-4fc31af7.system.js → p-89d63744.system.js} +1 -1
- package/dist/mint-components/p-8c3d0392.system.entry.js +1 -0
- package/dist/mint-components/{p-8a261335.system.entry.js → p-8f58ce03.system.entry.js} +1 -1
- package/dist/mint-components/p-9a82ec56.entry.js +1 -0
- package/dist/mint-components/{p-21b4044a.entry.js → p-9bc12158.entry.js} +1 -1
- package/dist/mint-components/p-a3a5c48f.js +1 -0
- package/dist/mint-components/{p-2027edc0.system.entry.js → p-a424ac85.system.entry.js} +1 -1
- package/dist/mint-components/{p-1f95b411.js → p-a72143af.js} +1 -1
- package/dist/mint-components/p-b0d598db.system.entry.js +1 -0
- package/dist/mint-components/p-b11625ed.system.entry.js +1 -0
- package/dist/mint-components/p-b2cbbcce.system.js +1 -0
- package/dist/mint-components/p-ba1f4bf4.system.entry.js +1 -0
- package/dist/mint-components/{p-f8f125a7.system.js → p-bb7fd343.system.js} +1 -1
- package/dist/mint-components/{p-11cd0656.js → p-bd0887fb.js} +1 -1
- package/dist/mint-components/{p-72a5a051.system.entry.js → p-bffad7b3.system.entry.js} +1 -1
- package/dist/mint-components/p-c3d0b165.entry.js +1 -0
- package/dist/mint-components/p-c4a8c149.system.entry.js +1 -0
- package/dist/mint-components/{p-046c45b1.entry.js → p-c61028b0.entry.js} +1 -1
- package/dist/mint-components/{p-f7f87338.js → p-cd0ff606.js} +1 -1
- package/dist/mint-components/{p-8fd8682c.js → p-d793d269.js} +1 -1
- package/dist/mint-components/{p-4b719313.js → p-da46fc91.js} +1 -1
- package/dist/mint-components/{p-2e63dcfd.system.js → p-f47bf492.system.js} +1 -1
- package/dist/mint-components/p-ff74bee4.entry.js +372 -0
- package/dist/types/components/sqm-big-stat/sqm-big-stat.d.ts +6 -0
- package/dist/types/components/sqm-card-feed/sqm-card-feed-view.d.ts +2 -1
- package/dist/types/components/sqm-card-feed/sqm-card-feed.d.ts +3 -4
- package/dist/types/components/sqm-portal-container/PortalContainer.stories.d.ts +2 -0
- package/dist/types/components/sqm-portal-container/sqm-portal-container-view.d.ts +1 -0
- package/dist/types/components/sqm-portal-container/sqm-portal-container.d.ts +4 -0
- package/dist/types/components/sqm-portal-email-verification/sqm-portal-email-verification.d.ts +6 -0
- package/dist/types/components/sqm-portal-forgot-password/sqm-portal-forgot-password-view.d.ts +1 -0
- package/dist/types/components/sqm-portal-forgot-password/sqm-portal-forgot-password.d.ts +10 -0
- package/dist/types/components/sqm-portal-forgot-password/usePortalForgotPassword.d.ts +3 -1
- package/dist/types/components/sqm-portal-login/sqm-portal-login-view.d.ts +2 -0
- package/dist/types/components/sqm-portal-login/sqm-portal-login.d.ts +8 -0
- package/dist/types/components/sqm-portal-login/usePortalLogin.d.ts +3 -3
- package/dist/types/components/sqm-portal-register/sqm-portal-register-view.d.ts +1 -0
- package/dist/types/components/sqm-portal-register/sqm-portal-register.d.ts +10 -0
- package/dist/types/components/sqm-portal-register/usePortalRegister.d.ts +1 -0
- package/dist/types/components/sqm-portal-reset-password/sqm-portal-reset-password.d.ts +8 -0
- package/dist/types/components/sqm-portal-verify-email/sqm-portal-verify-email.d.ts +8 -0
- package/dist/types/components/sqm-portal-verify-email/usePortalVerifyEmail.d.ts +2 -1
- package/dist/types/components/sqm-reward-exchange-list/RewardExchangeListData.d.ts +143 -88
- package/dist/types/components/sqm-reward-exchange-list/sqm-reward-exchange-list.d.ts +21 -0
- package/dist/types/components/sqm-share-button/ShareButton.stories.d.ts +2 -0
- package/dist/types/components/sqm-share-button/sqm-share-button-view.d.ts +3 -0
- package/dist/types/components/sqm-share-button/sqm-share-button.d.ts +12 -0
- package/dist/types/components/sqm-task-card/progress-bar/SVGs.d.ts +1 -1
- package/dist/types/components/sqm-task-card/sqm-task-card-view.d.ts +4 -0
- package/dist/types/components/sqm-task-card/sqm-task-card.d.ts +22 -0
- package/dist/types/components/sqm-user-name/sqm-user-name.d.ts +1 -1
- package/dist/types/components.d.ts +212 -8
- package/dist/types/global/styles.d.ts +1 -1
- package/grapesjs/grapesjs.js +1 -1
- package/package.json +2 -1
- package/dist/cjs/sqm-card-feed-view-ec75fafc.js +0 -36
- package/dist/esm/sqm-card-feed-view-81f93bc7.js +0 -34
- package/dist/esm-es5/sqm-card-feed-view-81f93bc7.js +0 -1
- package/dist/esm-es5/sqm-portal-profile-view-ba06e776.js +0 -1
- package/dist/mint-components/p-20c95798.entry.js +0 -1
- package/dist/mint-components/p-3f5aa202.system.js +0 -1
- package/dist/mint-components/p-4658d225.system.entry.js +0 -1
- package/dist/mint-components/p-5939212e.system.entry.js +0 -1
- package/dist/mint-components/p-6f498a6b.system.entry.js +0 -1
- package/dist/mint-components/p-77b5a0a4.js +0 -1
- package/dist/mint-components/p-7cdbe82a.entry.js +0 -1
- package/dist/mint-components/p-8a714f3f.js +0 -1
- package/dist/mint-components/p-91fde765.system.js +0 -1
- package/dist/mint-components/p-9608ce17.system.entry.js +0 -1
- package/dist/mint-components/p-9dd76aed.system.entry.js +0 -1
- package/dist/mint-components/p-9ef3c3bc.entry.js +0 -372
- package/dist/mint-components/p-a88a08bb.system.js +0 -1
- package/dist/mint-components/p-a9a6f205.entry.js +0 -1
- package/dist/mint-components/p-b86cbac3.system.entry.js +0 -1
- package/dist/mint-components/p-c65cfc9d.system.js +0 -1
- package/dist/mint-components/p-e36ff7fa.entry.js +0 -1
- package/dist/mint-components/p-ed696e43.entry.js +0 -1
- package/dist/mint-components/p-ef7f70f2.system.entry.js +0 -1
|
@@ -101,6 +101,66 @@ export class ShareButton {
|
|
|
101
101
|
"attribute": "program-id",
|
|
102
102
|
"reflect": false
|
|
103
103
|
},
|
|
104
|
+
"borderradius": {
|
|
105
|
+
"type": "number",
|
|
106
|
+
"mutable": false,
|
|
107
|
+
"complexType": {
|
|
108
|
+
"original": "number",
|
|
109
|
+
"resolved": "number",
|
|
110
|
+
"references": {}
|
|
111
|
+
},
|
|
112
|
+
"required": false,
|
|
113
|
+
"optional": true,
|
|
114
|
+
"docs": {
|
|
115
|
+
"tags": [{
|
|
116
|
+
"text": "Configure border radius with pixel amount",
|
|
117
|
+
"name": "uiName"
|
|
118
|
+
}],
|
|
119
|
+
"text": ""
|
|
120
|
+
},
|
|
121
|
+
"attribute": "borderradius",
|
|
122
|
+
"reflect": false
|
|
123
|
+
},
|
|
124
|
+
"backgroundcolor": {
|
|
125
|
+
"type": "string",
|
|
126
|
+
"mutable": false,
|
|
127
|
+
"complexType": {
|
|
128
|
+
"original": "string",
|
|
129
|
+
"resolved": "string",
|
|
130
|
+
"references": {}
|
|
131
|
+
},
|
|
132
|
+
"required": false,
|
|
133
|
+
"optional": true,
|
|
134
|
+
"docs": {
|
|
135
|
+
"tags": [{
|
|
136
|
+
"text": "Button background color",
|
|
137
|
+
"name": "uiName"
|
|
138
|
+
}],
|
|
139
|
+
"text": ""
|
|
140
|
+
},
|
|
141
|
+
"attribute": "backgroundcolor",
|
|
142
|
+
"reflect": false
|
|
143
|
+
},
|
|
144
|
+
"textcolor": {
|
|
145
|
+
"type": "string",
|
|
146
|
+
"mutable": false,
|
|
147
|
+
"complexType": {
|
|
148
|
+
"original": "string",
|
|
149
|
+
"resolved": "string",
|
|
150
|
+
"references": {}
|
|
151
|
+
},
|
|
152
|
+
"required": false,
|
|
153
|
+
"optional": true,
|
|
154
|
+
"docs": {
|
|
155
|
+
"tags": [{
|
|
156
|
+
"text": "Button text color",
|
|
157
|
+
"name": "uiName"
|
|
158
|
+
}],
|
|
159
|
+
"text": ""
|
|
160
|
+
},
|
|
161
|
+
"attribute": "textcolor",
|
|
162
|
+
"reflect": false
|
|
163
|
+
},
|
|
104
164
|
"pill": {
|
|
105
165
|
"type": "boolean",
|
|
106
166
|
"mutable": false,
|
|
@@ -334,7 +394,7 @@ export class ShareButton {
|
|
|
334
394
|
"mutable": false,
|
|
335
395
|
"complexType": {
|
|
336
396
|
"original": "DemoData<ShareButtonViewProps>",
|
|
337
|
-
"resolved": "{ loading?: boolean; medium?: \"facebook\" | \"twitter\" | \"email\" | \"direct\" | \"linkedin\" | \"sms\" | \"fbmessenger\" | \"whatsapp\" | \"linemessenger\" | \"pinterest\" | \"reminder\" | \"unknown\"; disabled?: boolean; pill?: boolean; type?: \"text\" | \"primary\" | \"success\" | \"info\" | \"warning\" | \"danger\" | \"default\"; size?: \"small\" | \"medium\" | \"large\"; icon?: string; hideicon?: boolean; hidetext?: boolean; iconslot?: \"prefix\" | \"suffix\"; onClick?: () => void; hide?: boolean; }",
|
|
397
|
+
"resolved": "{ loading?: boolean; medium?: \"facebook\" | \"twitter\" | \"email\" | \"direct\" | \"linkedin\" | \"sms\" | \"fbmessenger\" | \"whatsapp\" | \"linemessenger\" | \"pinterest\" | \"reminder\" | \"unknown\"; disabled?: boolean; pill?: boolean; type?: \"text\" | \"primary\" | \"success\" | \"info\" | \"warning\" | \"danger\" | \"default\"; size?: \"small\" | \"medium\" | \"large\"; icon?: string; hideicon?: boolean; hidetext?: boolean; iconslot?: \"prefix\" | \"suffix\"; onClick?: () => void; hide?: boolean; borderradius?: number; backgroundcolor?: string; textcolor?: string; }",
|
|
338
398
|
"references": {
|
|
339
399
|
"DemoData": {
|
|
340
400
|
"location": "import",
|
|
@@ -363,16 +423,8 @@ export class ShareButton {
|
|
|
363
423
|
}
|
|
364
424
|
function useDemoShareButton(props) {
|
|
365
425
|
return deepmerge({
|
|
366
|
-
|
|
426
|
+
...props,
|
|
367
427
|
loading: false,
|
|
368
|
-
disabled: props.disabled,
|
|
369
|
-
pill: props.pill,
|
|
370
|
-
type: props.type,
|
|
371
|
-
size: props.size,
|
|
372
|
-
hideicon: props.hideicon,
|
|
373
|
-
hidetext: props.hidetext,
|
|
374
|
-
iconslot: props.iconslot,
|
|
375
|
-
icon: props.icon,
|
|
376
428
|
hide: false,
|
|
377
429
|
onClick: () => {
|
|
378
430
|
// TODO: Provide visual feedback
|
|
@@ -38,7 +38,11 @@ const oneAction = {
|
|
|
38
38
|
openNewTab: false,
|
|
39
39
|
showExpiry: false,
|
|
40
40
|
rewardDuration: null,
|
|
41
|
+
completedText: "Completed {finite, select, 0 {{count, plural, =1 {{count} time} other {{count} times}}} other {{count}/{finite} times}}",
|
|
41
42
|
loading: false,
|
|
43
|
+
expiryMessage: "Ends {endDate}",
|
|
44
|
+
startsOnMessage: "Starts {startDate}",
|
|
45
|
+
endedMessage: "Ended {endDate}",
|
|
42
46
|
finite: 0,
|
|
43
47
|
};
|
|
44
48
|
const coupleActions = {
|
|
@@ -55,8 +59,12 @@ const coupleActions = {
|
|
|
55
59
|
buttonLink: "https://example.com/",
|
|
56
60
|
openNewTab: false,
|
|
57
61
|
showExpiry: false,
|
|
62
|
+
completedText: "Completed {finite, select, 0 {{count, plural, =1 {{count} time} other {{count} times}}} other {{count}/{finite} times}}",
|
|
58
63
|
rewardDuration: null,
|
|
59
64
|
loading: false,
|
|
65
|
+
expiryMessage: "Ends {endDate}",
|
|
66
|
+
startsOnMessage: "Starts {startDate}",
|
|
67
|
+
endedMessage: "Ended {endDate}",
|
|
60
68
|
finite: 0,
|
|
61
69
|
};
|
|
62
70
|
const manyActions = {
|
|
@@ -65,6 +73,7 @@ const manyActions = {
|
|
|
65
73
|
cardTitle: "Spend $500 at our Store",
|
|
66
74
|
description: "Description of action and reward. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut eget quisque commodo leo.",
|
|
67
75
|
repeatable: false,
|
|
76
|
+
completedText: "Completed {finite, select, 0 {{count, plural, =1 {{count} time} other {{count} times}}} other {{count}/{finite} times}}",
|
|
68
77
|
showProgressBar: true,
|
|
69
78
|
progress: 100,
|
|
70
79
|
goal: 500,
|
|
@@ -75,6 +84,9 @@ const manyActions = {
|
|
|
75
84
|
showExpiry: false,
|
|
76
85
|
rewardDuration: null,
|
|
77
86
|
loading: false,
|
|
87
|
+
expiryMessage: "Ends {endDate}",
|
|
88
|
+
startsOnMessage: "Starts {startDate}",
|
|
89
|
+
endedMessage: "Ended {endDate}",
|
|
78
90
|
finite: 0,
|
|
79
91
|
};
|
|
80
92
|
export const TaskCard = () => {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { h } from "@stencil/core";
|
|
2
|
-
export const
|
|
2
|
+
export const Gift = () => {
|
|
3
3
|
return (h("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg" },
|
|
4
4
|
h("path", { d: "M15 5H12.4508H9V16H13.5C14.0523 16 14.5 15.5523 14.5 15V9H15C15.5523 9 16 8.55228 16 8V6C16 5.44772 15.5523 5 15 5Z", fill: "#F2C94C" }),
|
|
5
5
|
h("path", { d: "M1.5 9V15C1.5 15.5523 1.94772 16 2.5 16H7V5H4.64242H1C0.447715 5 0 5.44772 0 6V8C0 8.55228 0.447715 9 1 9H1.5Z", fill: "#F2C94C" }),
|
|
@@ -1,13 +1,9 @@
|
|
|
1
1
|
import { h } from "@stencil/core";
|
|
2
2
|
import jss from "jss";
|
|
3
3
|
import preset from "jss-preset-default";
|
|
4
|
-
import
|
|
4
|
+
import { Gift } from "./SVGs";
|
|
5
5
|
export function ProgressBarView(props) {
|
|
6
6
|
const { progress = 0, goal = 1, steps = false, progressBarUnit = "", repeatable = false, expired = false, finite = 0, } = props;
|
|
7
|
-
// console.log("progress bar props", props);
|
|
8
|
-
const gift1 = SVGs.gift();
|
|
9
|
-
const gift2 = SVGs.gift();
|
|
10
|
-
const gift3 = SVGs.gift();
|
|
11
7
|
var items = [];
|
|
12
8
|
var columns = "";
|
|
13
9
|
if (repeatable) {
|
|
@@ -128,11 +124,8 @@ export function ProgressBarView(props) {
|
|
|
128
124
|
marginLeft: "-100px",
|
|
129
125
|
marginRight: "-100px",
|
|
130
126
|
position: "relative",
|
|
131
|
-
display: "list-item",
|
|
132
|
-
listStyleType: "none",
|
|
133
127
|
top: "-18px",
|
|
134
128
|
filter: goal <= progress ? "" : "grayscale(100%)",
|
|
135
|
-
zIndex: "1",
|
|
136
129
|
},
|
|
137
130
|
},
|
|
138
131
|
};
|
|
@@ -158,7 +151,7 @@ export function ProgressBarView(props) {
|
|
|
158
151
|
: progressBarUnit + clamp(progress, 0, goal)));
|
|
159
152
|
items.push(h("div", { class: "remain" }));
|
|
160
153
|
items.push(h("div", { class: "progress bg" }, progressBarUnit + goal));
|
|
161
|
-
items.push(h("div", { class: "gift" },
|
|
154
|
+
items.push(h("div", { class: "gift" }, h(Gift, null)));
|
|
162
155
|
}
|
|
163
156
|
function addSteps() {
|
|
164
157
|
let ratio = 1 / goal;
|
|
@@ -179,14 +172,14 @@ export function ProgressBarView(props) {
|
|
|
179
172
|
columns += "0fr ";
|
|
180
173
|
items.push(h("div", { class: "filled" }));
|
|
181
174
|
items.push(h("div", { class: "progress bg" }, goal));
|
|
182
|
-
items.push(h("div", { class: "gift" },
|
|
175
|
+
items.push(h("div", { class: "gift" }, h(Gift, null)));
|
|
183
176
|
}
|
|
184
177
|
// reward fail
|
|
185
178
|
else {
|
|
186
179
|
columns += "0fr ";
|
|
187
180
|
items.push(h("div", { class: "remain" }));
|
|
188
181
|
items.push(h("div", { class: "empty bg" }, goal));
|
|
189
|
-
items.push(h("div", { class: "gift" },
|
|
182
|
+
items.push(h("div", { class: "gift" }, h(Gift, null)));
|
|
190
183
|
}
|
|
191
184
|
}
|
|
192
185
|
function addLinearRepeatable() {
|
|
@@ -199,10 +192,10 @@ export function ProgressBarView(props) {
|
|
|
199
192
|
items.push(h("div", { class: progress == goal ? "progress top bg" : "progress top" }, progressBarUnit + progress));
|
|
200
193
|
items.push(h("div", { class: "remain" }));
|
|
201
194
|
items.push(h("div", { class: "progress bg" }, progressBarUnit + goal));
|
|
202
|
-
items.push(h("div", { class: "gift" },
|
|
195
|
+
items.push(h("div", { class: "gift" }, h(Gift, null)));
|
|
203
196
|
items.push(h("div", { class: "remain" }));
|
|
204
197
|
items.push(h("div", { class: "progress bg" }, progressBarUnit + goal * 2));
|
|
205
|
-
items.push(h("div", { class: "gift bw" },
|
|
198
|
+
items.push(h("div", { class: "gift bw" }, h(Gift, null)));
|
|
206
199
|
}
|
|
207
200
|
// single repetition
|
|
208
201
|
else if (repetitions == 1) {
|
|
@@ -210,18 +203,18 @@ export function ProgressBarView(props) {
|
|
|
210
203
|
"0.5fr 0fr 0fr " + ratio + "fr 0fr " + (0.5 - ratio) + "fr 0fr 0fr";
|
|
211
204
|
items.push(h("div", { class: "filled" }));
|
|
212
205
|
items.push(h("div", { class: "progress bg" }, progressBarUnit + goal));
|
|
213
|
-
items.push(h("div", { class: "gift" },
|
|
206
|
+
items.push(h("div", { class: "gift" }, h(Gift, null)));
|
|
214
207
|
items.push(h("div", { class: "filled" }));
|
|
215
208
|
items.push(h("div", { class: progress == goal ? "progress top bg" : "progress top" }, progress == goal ? "" : progressBarUnit + progress));
|
|
216
209
|
items.push(h("div", { class: "remain" }));
|
|
217
210
|
items.push(h("div", { class: "progress bg" }, progressBarUnit + goal * 2));
|
|
218
|
-
items.push(h("div", { class: "gift bw" },
|
|
211
|
+
items.push(h("div", { class: "gift bw" }, h(Gift, null)));
|
|
219
212
|
}
|
|
220
213
|
// finite repetition hit
|
|
221
214
|
else if (finite && repetitions >= finite) {
|
|
222
215
|
if (repetitions > 2) {
|
|
223
216
|
items.push(h("div", { class: "progress bg" }, progressBarUnit + goal * (finite - 2)));
|
|
224
|
-
items.push(h("div", { class: "gift start" },
|
|
217
|
+
items.push(h("div", { class: "gift start" }, h(Gift, null)));
|
|
225
218
|
columns = "0fr 0fr 0.5fr 0fr 0fr 0.5fr 0fr 0fr";
|
|
226
219
|
}
|
|
227
220
|
else {
|
|
@@ -229,10 +222,10 @@ export function ProgressBarView(props) {
|
|
|
229
222
|
}
|
|
230
223
|
items.push(h("div", { class: "filled" }));
|
|
231
224
|
items.push(h("div", { class: "progress bg" }, progressBarUnit + goal * (finite - 1)));
|
|
232
|
-
items.push(h("div", { class: "gift" },
|
|
225
|
+
items.push(h("div", { class: "gift" }, h(Gift, null)));
|
|
233
226
|
items.push(h("div", { class: "filled" }));
|
|
234
227
|
items.push(h("div", { class: "progress bg" }, progressBarUnit + goal * finite));
|
|
235
|
-
items.push(h("div", { class: "gift" },
|
|
228
|
+
items.push(h("div", { class: "gift" }, h(Gift, null)));
|
|
236
229
|
}
|
|
237
230
|
// multiple repetitions
|
|
238
231
|
else {
|
|
@@ -243,15 +236,15 @@ export function ProgressBarView(props) {
|
|
|
243
236
|
(0.5 - ratio) +
|
|
244
237
|
"fr 0fr 0fr";
|
|
245
238
|
items.push(h("div", { class: "progress bg" }, progressBarUnit + goal * (repetitions - 1)));
|
|
246
|
-
items.push(h("div", { class: "gift start" },
|
|
239
|
+
items.push(h("div", { class: "gift start" }, h(Gift, null)));
|
|
247
240
|
items.push(h("div", { class: "filled" }));
|
|
248
241
|
items.push(h("div", { class: "progress bg" }, progressBarUnit + goal * repetitions));
|
|
249
|
-
items.push(h("div", { class: "gift" },
|
|
242
|
+
items.push(h("div", { class: "gift" }, h(Gift, null)));
|
|
250
243
|
items.push(h("div", { class: "filled" }));
|
|
251
244
|
items.push(h("div", { class: progress == goal * repetitions ? "progress top bg" : "progress top" }, progress == goal * repetitions ? "" : progressBarUnit + progress));
|
|
252
245
|
items.push(h("div", { class: "remain" }));
|
|
253
246
|
items.push(h("div", { class: "progress bg" }, progressBarUnit + goal * (repetitions + 1)));
|
|
254
|
-
items.push(h("div", { class: "gift bw" },
|
|
247
|
+
items.push(h("div", { class: "gift bw" }, h(Gift, null)));
|
|
255
248
|
}
|
|
256
249
|
}
|
|
257
250
|
function addStepsRepeatable() {
|
|
@@ -266,13 +259,13 @@ export function ProgressBarView(props) {
|
|
|
266
259
|
columns += "0fr ";
|
|
267
260
|
items.push(h("div", { class: "remain" }));
|
|
268
261
|
items.push(h("div", { class: "empty bg" }, goal));
|
|
269
|
-
items.push(h("div", { class: "gift bw" },
|
|
262
|
+
items.push(h("div", { class: "gift bw" }, h(Gift, null)));
|
|
270
263
|
}
|
|
271
264
|
else if (i == goal * 2) {
|
|
272
265
|
columns += "0fr 0fr";
|
|
273
266
|
items.push(h("div", { class: "remain" }));
|
|
274
267
|
items.push(h("div", { class: "empty bg" }, goal * 2));
|
|
275
|
-
items.push(h("div", { class: "gift bw" },
|
|
268
|
+
items.push(h("div", { class: "gift bw" }, h(Gift, null)));
|
|
276
269
|
}
|
|
277
270
|
else {
|
|
278
271
|
items.push(h("div", { class: "remain" }));
|
|
@@ -283,7 +276,7 @@ export function ProgressBarView(props) {
|
|
|
283
276
|
columns += "0fr ";
|
|
284
277
|
items.push(h("div", { class: "filled" }));
|
|
285
278
|
items.push(h("div", { class: "progress bg" }, i));
|
|
286
|
-
items.push(h("div", { class: "gift" },
|
|
279
|
+
items.push(h("div", { class: "gift" }, h(Gift, null)));
|
|
287
280
|
}
|
|
288
281
|
else {
|
|
289
282
|
items.push(h("div", { class: "filled" }));
|
|
@@ -297,7 +290,7 @@ export function ProgressBarView(props) {
|
|
|
297
290
|
if (repetitions > 2) {
|
|
298
291
|
columns += "0fr 0fr ";
|
|
299
292
|
items.push(h("div", { class: "progress bg" }, goal * (finite - 2)));
|
|
300
|
-
items.push(h("div", { class: "gift start" },
|
|
293
|
+
items.push(h("div", { class: "gift start" }, h(Gift, null)));
|
|
301
294
|
}
|
|
302
295
|
for (let i = 1; i < goal * 2 + 1; i++) {
|
|
303
296
|
columns += ratio + "fr 0fr ";
|
|
@@ -306,20 +299,20 @@ export function ProgressBarView(props) {
|
|
|
306
299
|
columns += "0fr ";
|
|
307
300
|
items.push(h("div", { class: "remain" }));
|
|
308
301
|
items.push(h("div", { class: "progress bg" }, goal * (finite - 1)));
|
|
309
|
-
items.push(h("div", { class: "gift bw" },
|
|
302
|
+
items.push(h("div", { class: "gift bw" }, h(Gift, null)));
|
|
310
303
|
}
|
|
311
304
|
}
|
|
312
305
|
else if (i == goal) {
|
|
313
306
|
columns += "0fr ";
|
|
314
307
|
items.push(h("div", { class: "filled" }));
|
|
315
308
|
items.push(h("div", { class: "progress bg" }, goal * (finite - 1)));
|
|
316
|
-
items.push(h("div", { class: "gift" },
|
|
309
|
+
items.push(h("div", { class: "gift" }, h(Gift, null)));
|
|
317
310
|
}
|
|
318
311
|
else if (i == goal * 2) {
|
|
319
312
|
columns += "0fr 0fr";
|
|
320
313
|
items.push(h("div", { class: "filled" }));
|
|
321
314
|
items.push(h("div", { class: "progress bg" }, goal * finite));
|
|
322
|
-
items.push(h("div", { class: "gift" },
|
|
315
|
+
items.push(h("div", { class: "gift" }, h(Gift, null)));
|
|
323
316
|
}
|
|
324
317
|
else {
|
|
325
318
|
items.push(h("div", { class: "filled" }));
|
|
@@ -333,7 +326,7 @@ export function ProgressBarView(props) {
|
|
|
333
326
|
let ratio = 1 / goal;
|
|
334
327
|
columns += "0fr 0fr ";
|
|
335
328
|
items.push(h("div", { class: "progress bg" }, goal * (repetitions - 1)));
|
|
336
|
-
items.push(h("div", { class: "gift start" },
|
|
329
|
+
items.push(h("div", { class: "gift start" }, h(Gift, null)));
|
|
337
330
|
for (let i = 1; i < goal * 2 + 1; i++) {
|
|
338
331
|
columns += ratio + "fr 0fr ";
|
|
339
332
|
if (i <= goal) {
|
|
@@ -341,7 +334,7 @@ export function ProgressBarView(props) {
|
|
|
341
334
|
columns += "0fr ";
|
|
342
335
|
items.push(h("div", { class: "filled" }));
|
|
343
336
|
items.push(h("div", { class: "progress bg" }, i + goal * (repetitions - 1)));
|
|
344
|
-
items.push(h("div", { class: "gift" },
|
|
337
|
+
items.push(h("div", { class: "gift" }, h(Gift, null)));
|
|
345
338
|
}
|
|
346
339
|
else {
|
|
347
340
|
items.push(h("div", { class: "filled" }));
|
|
@@ -353,7 +346,7 @@ export function ProgressBarView(props) {
|
|
|
353
346
|
columns += "0fr 0fr";
|
|
354
347
|
items.push(h("div", { class: "remain" }));
|
|
355
348
|
items.push(h("div", { class: "empty bg" }, i + goal * (repetitions - 1)));
|
|
356
|
-
items.push(h("div", { class: "gift bw" },
|
|
349
|
+
items.push(h("div", { class: "gift bw" }, h(Gift, null)));
|
|
357
350
|
}
|
|
358
351
|
else {
|
|
359
352
|
items.push(h("div", { class: "remain" }));
|
|
@@ -4,16 +4,12 @@ import preset from "jss-preset-default";
|
|
|
4
4
|
import * as SVGs from "./SVGs";
|
|
5
5
|
import { ProgressBarView, } from "./progress-bar/progress-bar-view";
|
|
6
6
|
import { DateTime } from "luxon";
|
|
7
|
+
import { intl } from "../../global/global";
|
|
7
8
|
export function TaskCardView(props) {
|
|
8
9
|
const checkmark_circle = SVGs.checkmark_circle();
|
|
9
10
|
const checkmark_filled = SVGs.checkmark_filled();
|
|
10
11
|
const arrow_left_right = SVGs.arrow_left_right();
|
|
11
12
|
const style = {
|
|
12
|
-
// HostBlock: {
|
|
13
|
-
// ":host": {
|
|
14
|
-
// display: "inline-block",
|
|
15
|
-
// },
|
|
16
|
-
// },
|
|
17
13
|
TaskCard: {
|
|
18
14
|
display: "inline-block",
|
|
19
15
|
width: "100%",
|
|
@@ -33,7 +29,7 @@ export function TaskCardView(props) {
|
|
|
33
29
|
borderColor: "var(--sl-color-primary-500)",
|
|
34
30
|
},
|
|
35
31
|
"& .main.expired": {
|
|
36
|
-
color: "var(--sl-color-neutral-
|
|
32
|
+
color: "var(--sl-color-neutral-600)",
|
|
37
33
|
background: "var(--sl-color-neutral-50)",
|
|
38
34
|
},
|
|
39
35
|
"& .title": {
|
|
@@ -45,17 +41,43 @@ export function TaskCardView(props) {
|
|
|
45
41
|
margin: "var(--sl-spacing-medium)",
|
|
46
42
|
},
|
|
47
43
|
"& .container.subdued": {
|
|
48
|
-
opacity: "0.
|
|
44
|
+
opacity: "0.45",
|
|
49
45
|
},
|
|
50
46
|
"& .container > div": {
|
|
51
47
|
margin: "var(--sl-spacing-medium) 0",
|
|
52
48
|
},
|
|
53
49
|
},
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
50
|
+
NotStarted: {
|
|
51
|
+
padding: "var(--sl-spacing-medium)",
|
|
52
|
+
color: "var(--sl-color-primary-600)",
|
|
53
|
+
border: "1px solid var(--sl-color-neutral-200)",
|
|
54
|
+
borderRadius: "var(--sl-border-radius-medium) var(--sl-border-radius-medium) 0 0",
|
|
55
|
+
borderBottom: "none",
|
|
56
|
+
background: "var(--sl-color-primary-50)",
|
|
57
|
+
fontWeight: "var(--sl-font-weight-semibold)",
|
|
58
|
+
lineHeight: "var(--sl-line-height-dense)",
|
|
59
|
+
"& .icon": {
|
|
60
|
+
position: "relative",
|
|
61
|
+
top: "0.1em",
|
|
62
|
+
marginRight: "var(--sl-spacing-small)",
|
|
63
|
+
color: "var(--sl-color-primary-500)",
|
|
64
|
+
},
|
|
65
|
+
},
|
|
66
|
+
Ended: {
|
|
67
|
+
padding: "var(--sl-spacing-medium)",
|
|
57
68
|
color: "var(--sl-color-warning-600)",
|
|
69
|
+
border: "1px solid var(--sl-color-neutral-200)",
|
|
70
|
+
borderRadius: "var(--sl-border-radius-medium) var(--sl-border-radius-medium) 0 0",
|
|
71
|
+
borderBottom: "none",
|
|
72
|
+
background: "var(--sl-color-warning-50)",
|
|
58
73
|
fontWeight: "var(--sl-font-weight-semibold)",
|
|
74
|
+
lineHeight: "var(--sl-line-height-dense)",
|
|
75
|
+
"& .icon": {
|
|
76
|
+
position: "relative",
|
|
77
|
+
top: "0.1em",
|
|
78
|
+
marginRight: "var(--sl-spacing-small)",
|
|
79
|
+
color: "var(--sl-color-warning-500)",
|
|
80
|
+
},
|
|
59
81
|
},
|
|
60
82
|
Header: {
|
|
61
83
|
display: "flex",
|
|
@@ -126,7 +148,7 @@ export function TaskCardView(props) {
|
|
|
126
148
|
},
|
|
127
149
|
},
|
|
128
150
|
"& .neutral": {
|
|
129
|
-
color: "var(--sl-color-neutral-
|
|
151
|
+
color: "var(--sl-color-neutral-600)",
|
|
130
152
|
},
|
|
131
153
|
},
|
|
132
154
|
};
|
|
@@ -145,16 +167,42 @@ export function TaskCardView(props) {
|
|
|
145
167
|
const taskEnded = props.showExpiry && dateEnd <= dateToday;
|
|
146
168
|
const taskNotStarted = props.showExpiry && dateToday <= dateStart;
|
|
147
169
|
const taskUnavailable = taskEnded || taskNotStarted;
|
|
170
|
+
const vanillaStyle = `
|
|
171
|
+
:host{
|
|
172
|
+
display: block;
|
|
173
|
+
margin-bottom: 24px;
|
|
174
|
+
}
|
|
175
|
+
`;
|
|
148
176
|
return (h("div", { class: sheet.classes.TaskCard },
|
|
149
|
-
h("
|
|
177
|
+
h("style", { type: "text/css" },
|
|
178
|
+
styleString,
|
|
179
|
+
vanillaStyle),
|
|
180
|
+
!props.loading && taskNotStarted && (h("div", { class: sheet.classes.NotStarted },
|
|
181
|
+
h("span", { class: "icon" },
|
|
182
|
+
h("sl-icon", { name: "info-circle-fill" })),
|
|
183
|
+
intl.formatMessage({
|
|
184
|
+
id: "startsOnMessage",
|
|
185
|
+
defaultMessage: props.startsOnMessage,
|
|
186
|
+
}, {
|
|
187
|
+
startDate: dateStart.toLocaleString(DateTime.DATE_MED),
|
|
188
|
+
}))),
|
|
189
|
+
!props.loading && taskEnded && (h("div", { class: sheet.classes.Ended },
|
|
190
|
+
h("span", { class: "icon" },
|
|
191
|
+
h("sl-icon", { name: "exclamation-triangle-fill" })),
|
|
192
|
+
intl.formatMessage({
|
|
193
|
+
id: "endedMessage",
|
|
194
|
+
defaultMessage: props.endedMessage,
|
|
195
|
+
}, {
|
|
196
|
+
endDate: dateEnd.toLocaleString(DateTime.DATE_MED),
|
|
197
|
+
}))),
|
|
198
|
+
h("div", { style: {
|
|
199
|
+
borderRadius: taskUnavailable &&
|
|
200
|
+
"0 0 var(--sl-border-radius-medium) var(--sl-border-radius-medium)",
|
|
201
|
+
}, class: taskUnavailable
|
|
150
202
|
? "main expired"
|
|
151
203
|
: taskComplete
|
|
152
204
|
? "main complete"
|
|
153
205
|
: "main" },
|
|
154
|
-
h("style", { type: "text/css" }, styleString),
|
|
155
|
-
taskUnavailable && (h("div", { class: sheet.classes.Expired }, taskEnded
|
|
156
|
-
? "Ended " + dateEnd.toLocaleString(DateTime.DATE_MED)
|
|
157
|
-
: "Starts " + dateStart.toLocaleString(DateTime.DATE_MED))),
|
|
158
206
|
h("div", { class: taskComplete || taskUnavailable ? "container subdued" : "container" },
|
|
159
207
|
h("div", { class: sheet.classes.Header }, props.loading ? (h("sl-skeleton", { style: { width: "22%", margin: "0" } })) : (h("div", null,
|
|
160
208
|
showComplete && (h("span", { class: taskUnavailable ? "icon neutral" : "icon" }, taskComplete ? checkmark_filled : checkmark_circle)),
|
|
@@ -175,13 +223,21 @@ export function TaskCardView(props) {
|
|
|
175
223
|
? taskUnavailable
|
|
176
224
|
? "neutral"
|
|
177
225
|
: "success"
|
|
178
|
-
: "" },
|
|
179
|
-
|
|
226
|
+
: "" }, intl.formatMessage({
|
|
227
|
+
id: "completedMessage",
|
|
228
|
+
defaultMessage: props.completedText,
|
|
229
|
+
}, {
|
|
230
|
+
finite: props.finite,
|
|
231
|
+
count: props.finite
|
|
180
232
|
? Math.min(repetitions, props.finite)
|
|
181
|
-
: repetitions
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
233
|
+
: repetitions,
|
|
234
|
+
})))),
|
|
235
|
+
props.showExpiry && !taskUnavailable && (h("span", null, intl.formatMessage({
|
|
236
|
+
id: "expiryMessage",
|
|
237
|
+
defaultMessage: props.expiryMessage,
|
|
238
|
+
}, {
|
|
239
|
+
endDate: dateEnd.toLocaleString(DateTime.DATE_FULL),
|
|
240
|
+
})))),
|
|
185
241
|
h("sl-button", { class: taskUnavailable
|
|
186
242
|
? "action neutral"
|
|
187
243
|
: taskComplete
|
|
@@ -210,6 +266,7 @@ function Details(props) {
|
|
|
210
266
|
},
|
|
211
267
|
transformOrigin: "50% 37%",
|
|
212
268
|
transition: "transform var(--sl-transition-medium) ease",
|
|
269
|
+
cursor: "pointer",
|
|
213
270
|
},
|
|
214
271
|
"& input:checked ~ .summary": {
|
|
215
272
|
transition: "all var(--sl-transition-medium) ease",
|
|
@@ -52,12 +52,34 @@ export class TaskCard {
|
|
|
52
52
|
* @uiName Show Goal Expiry
|
|
53
53
|
*/
|
|
54
54
|
this.showExpiry = false;
|
|
55
|
+
/**
|
|
56
|
+
* @uiName Expiry Date Message
|
|
57
|
+
*/
|
|
58
|
+
this.expiryMessage = "Ends {endDate}";
|
|
55
59
|
/**
|
|
56
60
|
* @uiName Reward Duration
|
|
57
61
|
* @uiWidget DateRange
|
|
58
62
|
* @uiOptions {"allowPastDates":true, "months": 1}
|
|
59
63
|
*/
|
|
60
64
|
this.rewardDuration = "/";
|
|
65
|
+
/**
|
|
66
|
+
* Shown to users before the start of the task duration.
|
|
67
|
+
*
|
|
68
|
+
* @uiName Start Date Message
|
|
69
|
+
*/
|
|
70
|
+
this.startsOnMessage = "Starts {startDate}";
|
|
71
|
+
/**
|
|
72
|
+
* Shown to users after the end of the task duration.
|
|
73
|
+
*
|
|
74
|
+
* @uiName Ended Date Message
|
|
75
|
+
*/
|
|
76
|
+
this.endedMessage = "Ended {endDate}";
|
|
77
|
+
/**
|
|
78
|
+
* Displays the amount of times that a user has completed a repeatable task.
|
|
79
|
+
*
|
|
80
|
+
* @uiName Completed Count Text
|
|
81
|
+
*/
|
|
82
|
+
this.completedText = "Completed {finite, select, 0 {{count, plural, =1 {{count} time} other {{count} times}}} other {{count}/{finite} times}}";
|
|
61
83
|
/**
|
|
62
84
|
* @uiName CTA Button Text
|
|
63
85
|
*/
|
|
@@ -319,6 +341,27 @@ export class TaskCard {
|
|
|
319
341
|
"reflect": false,
|
|
320
342
|
"defaultValue": "false"
|
|
321
343
|
},
|
|
344
|
+
"expiryMessage": {
|
|
345
|
+
"type": "string",
|
|
346
|
+
"mutable": false,
|
|
347
|
+
"complexType": {
|
|
348
|
+
"original": "string",
|
|
349
|
+
"resolved": "string",
|
|
350
|
+
"references": {}
|
|
351
|
+
},
|
|
352
|
+
"required": false,
|
|
353
|
+
"optional": false,
|
|
354
|
+
"docs": {
|
|
355
|
+
"tags": [{
|
|
356
|
+
"text": "Expiry Date Message",
|
|
357
|
+
"name": "uiName"
|
|
358
|
+
}],
|
|
359
|
+
"text": ""
|
|
360
|
+
},
|
|
361
|
+
"attribute": "expiry-message",
|
|
362
|
+
"reflect": false,
|
|
363
|
+
"defaultValue": "\"Ends {endDate}\""
|
|
364
|
+
},
|
|
322
365
|
"rewardDuration": {
|
|
323
366
|
"type": "string",
|
|
324
367
|
"mutable": false,
|
|
@@ -346,6 +389,69 @@ export class TaskCard {
|
|
|
346
389
|
"reflect": false,
|
|
347
390
|
"defaultValue": "\"/\""
|
|
348
391
|
},
|
|
392
|
+
"startsOnMessage": {
|
|
393
|
+
"type": "string",
|
|
394
|
+
"mutable": false,
|
|
395
|
+
"complexType": {
|
|
396
|
+
"original": "string",
|
|
397
|
+
"resolved": "string",
|
|
398
|
+
"references": {}
|
|
399
|
+
},
|
|
400
|
+
"required": false,
|
|
401
|
+
"optional": false,
|
|
402
|
+
"docs": {
|
|
403
|
+
"tags": [{
|
|
404
|
+
"text": "Start Date Message",
|
|
405
|
+
"name": "uiName"
|
|
406
|
+
}],
|
|
407
|
+
"text": "Shown to users before the start of the task duration."
|
|
408
|
+
},
|
|
409
|
+
"attribute": "starts-on-message",
|
|
410
|
+
"reflect": false,
|
|
411
|
+
"defaultValue": "\"Starts {startDate}\""
|
|
412
|
+
},
|
|
413
|
+
"endedMessage": {
|
|
414
|
+
"type": "string",
|
|
415
|
+
"mutable": false,
|
|
416
|
+
"complexType": {
|
|
417
|
+
"original": "string",
|
|
418
|
+
"resolved": "string",
|
|
419
|
+
"references": {}
|
|
420
|
+
},
|
|
421
|
+
"required": false,
|
|
422
|
+
"optional": false,
|
|
423
|
+
"docs": {
|
|
424
|
+
"tags": [{
|
|
425
|
+
"text": "Ended Date Message",
|
|
426
|
+
"name": "uiName"
|
|
427
|
+
}],
|
|
428
|
+
"text": "Shown to users after the end of the task duration."
|
|
429
|
+
},
|
|
430
|
+
"attribute": "ended-message",
|
|
431
|
+
"reflect": false,
|
|
432
|
+
"defaultValue": "\"Ended {endDate}\""
|
|
433
|
+
},
|
|
434
|
+
"completedText": {
|
|
435
|
+
"type": "string",
|
|
436
|
+
"mutable": false,
|
|
437
|
+
"complexType": {
|
|
438
|
+
"original": "string",
|
|
439
|
+
"resolved": "string",
|
|
440
|
+
"references": {}
|
|
441
|
+
},
|
|
442
|
+
"required": false,
|
|
443
|
+
"optional": false,
|
|
444
|
+
"docs": {
|
|
445
|
+
"tags": [{
|
|
446
|
+
"text": "Completed Count Text",
|
|
447
|
+
"name": "uiName"
|
|
448
|
+
}],
|
|
449
|
+
"text": "Displays the amount of times that a user has completed a repeatable task."
|
|
450
|
+
},
|
|
451
|
+
"attribute": "completed-text",
|
|
452
|
+
"reflect": false,
|
|
453
|
+
"defaultValue": "\"Completed {finite, select, 0 {{count, plural, =1 {{count} time} other {{count} times}}} other {{count}/{finite} times}}\""
|
|
454
|
+
},
|
|
349
455
|
"buttonText": {
|
|
350
456
|
"type": "string",
|
|
351
457
|
"mutable": false,
|
|
@@ -503,11 +503,11 @@ html {
|
|
|
503
503
|
--sl-line-height-dense: 1.4;
|
|
504
504
|
--sl-line-height-normal: 1.8;
|
|
505
505
|
--sl-line-height-loose: 2.2;
|
|
506
|
-
--sl-focus-ring-color-primary:
|
|
507
|
-
--sl-focus-ring-color-success:
|
|
508
|
-
--sl-focus-ring-color-info:
|
|
509
|
-
--sl-focus-ring-color-warning:
|
|
510
|
-
--sl-focus-ring-color-danger: #
|
|
506
|
+
--sl-focus-ring-color-primary: var(--sl-color-primary-100);
|
|
507
|
+
--sl-focus-ring-color-success: var(--sl-color-success-100);
|
|
508
|
+
--sl-focus-ring-color-info: var(--sl-color-info-100);
|
|
509
|
+
--sl-focus-ring-color-warning: var(--sl-color-warning-100);
|
|
510
|
+
--sl-focus-ring-color-danger: #var(--sl-color-danger-100);;
|
|
511
511
|
--sl-focus-ring-width: 3px;
|
|
512
512
|
--sl-button-font-size-small: var(--sl-font-size-x-small);
|
|
513
513
|
--sl-button-font-size-medium: var(--sl-font-size-small);
|