@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
|
@@ -38,6 +38,14 @@ export class PortalLogin {
|
|
|
38
38
|
* @uiName Heading label
|
|
39
39
|
*/
|
|
40
40
|
this.pageLabel = "Sign in to your account";
|
|
41
|
+
/**
|
|
42
|
+
* @uiName Register button redirection path
|
|
43
|
+
*/
|
|
44
|
+
this.registerPath = "/register";
|
|
45
|
+
/**
|
|
46
|
+
* @uiName Forgot password button redirect path
|
|
47
|
+
*/
|
|
48
|
+
this.forgotPasswordPath = "/forgotPassword";
|
|
41
49
|
withHooks(this);
|
|
42
50
|
}
|
|
43
51
|
disconnectedCallback() { }
|
|
@@ -47,9 +55,9 @@ export class PortalLogin {
|
|
|
47
55
|
: usePortalLogin(this);
|
|
48
56
|
const content = {
|
|
49
57
|
forgotPasswordButton: (h("slot", { name: "forgotPassword" },
|
|
50
|
-
h("a", { onClick: () => navigation.push(
|
|
58
|
+
h("a", { onClick: () => navigation.push(states.forgotPasswordPath) }, this.forgotPasswordLabel))),
|
|
51
59
|
secondaryButton: (h("slot", { name: "secondaryButton" },
|
|
52
|
-
h("sl-button", { type: "text", disabled: states.loading, onClick: () => navigation.push(
|
|
60
|
+
h("sl-button", { type: "text", disabled: states.loading, onClick: () => navigation.push(states.registerPath) }, this.registerLabel))),
|
|
53
61
|
emailLabel: this.emailLabel,
|
|
54
62
|
passwordLabel: this.passwordLabel,
|
|
55
63
|
submitLabel: this.submitLabel,
|
|
@@ -207,12 +215,54 @@ export class PortalLogin {
|
|
|
207
215
|
"reflect": false,
|
|
208
216
|
"defaultValue": "\"Sign in to your account\""
|
|
209
217
|
},
|
|
218
|
+
"registerPath": {
|
|
219
|
+
"type": "string",
|
|
220
|
+
"mutable": false,
|
|
221
|
+
"complexType": {
|
|
222
|
+
"original": "string",
|
|
223
|
+
"resolved": "string",
|
|
224
|
+
"references": {}
|
|
225
|
+
},
|
|
226
|
+
"required": false,
|
|
227
|
+
"optional": false,
|
|
228
|
+
"docs": {
|
|
229
|
+
"tags": [{
|
|
230
|
+
"text": "Register button redirection path",
|
|
231
|
+
"name": "uiName"
|
|
232
|
+
}],
|
|
233
|
+
"text": ""
|
|
234
|
+
},
|
|
235
|
+
"attribute": "register-path",
|
|
236
|
+
"reflect": false,
|
|
237
|
+
"defaultValue": "\"/register\""
|
|
238
|
+
},
|
|
239
|
+
"forgotPasswordPath": {
|
|
240
|
+
"type": "string",
|
|
241
|
+
"mutable": false,
|
|
242
|
+
"complexType": {
|
|
243
|
+
"original": "string",
|
|
244
|
+
"resolved": "string",
|
|
245
|
+
"references": {}
|
|
246
|
+
},
|
|
247
|
+
"required": false,
|
|
248
|
+
"optional": false,
|
|
249
|
+
"docs": {
|
|
250
|
+
"tags": [{
|
|
251
|
+
"text": "Forgot password button redirect path",
|
|
252
|
+
"name": "uiName"
|
|
253
|
+
}],
|
|
254
|
+
"text": ""
|
|
255
|
+
},
|
|
256
|
+
"attribute": "forgot-password-path",
|
|
257
|
+
"reflect": false,
|
|
258
|
+
"defaultValue": "\"/forgotPassword\""
|
|
259
|
+
},
|
|
210
260
|
"demoData": {
|
|
211
261
|
"type": "unknown",
|
|
212
262
|
"mutable": false,
|
|
213
263
|
"complexType": {
|
|
214
264
|
"original": "DemoData<PortalLoginViewProps>",
|
|
215
|
-
"resolved": "{ states?: { error: string; loading: boolean; }; content?: { forgotPasswordButton?: any; secondaryButton?: any; emailLabel?: string; passwordLabel?: string; submitLabel?: string; pageLabel?: string; }; }",
|
|
265
|
+
"resolved": "{ states?: { error: string; loading: boolean; forgotPasswordPath: string; registerPath: string; }; content?: { forgotPasswordButton?: any; secondaryButton?: any; emailLabel?: string; passwordLabel?: string; submitLabel?: string; pageLabel?: string; }; }",
|
|
216
266
|
"references": {
|
|
217
267
|
"DemoData": {
|
|
218
268
|
"location": "import",
|
|
@@ -244,7 +294,12 @@ export class PortalLogin {
|
|
|
244
294
|
}
|
|
245
295
|
function useLoginDemo(props) {
|
|
246
296
|
return deepmerge({
|
|
247
|
-
states: {
|
|
297
|
+
states: {
|
|
298
|
+
error: "",
|
|
299
|
+
loading: false,
|
|
300
|
+
forgotPasswordPath: "/forgotPassword",
|
|
301
|
+
registerPath: "/register",
|
|
302
|
+
},
|
|
248
303
|
callbacks: {
|
|
249
304
|
submit: async (_event) => {
|
|
250
305
|
console.log("submit");
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import jsonpointer from "jsonpointer";
|
|
2
2
|
import { useEffect, useState } from "@saasquatch/universal-hooks";
|
|
3
3
|
import { navigation, useAuthenticateWithEmailAndPasswordMutation, } from "@saasquatch/component-boilerplate";
|
|
4
|
-
export function usePortalLogin(
|
|
4
|
+
export function usePortalLogin(props) {
|
|
5
5
|
var _a, _b, _c, _d;
|
|
6
6
|
const [request, { loading, errors, data }] = useAuthenticateWithEmailAndPasswordMutation();
|
|
7
7
|
const [error, setError] = useState("");
|
|
@@ -21,7 +21,7 @@ export function usePortalLogin({ nextPage }) {
|
|
|
21
21
|
if ((_a = data === null || data === void 0 ? void 0 : data.authenticateManagedIdentityWithEmailAndPassword) === null || _a === void 0 ? void 0 : _a.token) {
|
|
22
22
|
urlParams.delete("nextPage");
|
|
23
23
|
navigation.push({
|
|
24
|
-
pathname: nextPageOverride || nextPage,
|
|
24
|
+
pathname: nextPageOverride || props.nextPage,
|
|
25
25
|
search: urlParams.toString() && "?" + urlParams.toString(),
|
|
26
26
|
});
|
|
27
27
|
}
|
|
@@ -37,6 +37,8 @@ export function usePortalLogin({ nextPage }) {
|
|
|
37
37
|
states: {
|
|
38
38
|
loading,
|
|
39
39
|
error: errorMessage,
|
|
40
|
+
registerPath: props.registerPath,
|
|
41
|
+
forgotPasswordPath: props.forgotPasswordPath
|
|
40
42
|
},
|
|
41
43
|
callbacks: {
|
|
42
44
|
submit,
|
|
@@ -9,6 +9,7 @@ const defaultProps = {
|
|
|
9
9
|
loading: false,
|
|
10
10
|
confirmPassword: true,
|
|
11
11
|
hideInputs: false,
|
|
12
|
+
loginPath: "/login"
|
|
12
13
|
},
|
|
13
14
|
callbacks: {
|
|
14
15
|
submit: () => console.log("Submit!"),
|
|
@@ -25,6 +26,7 @@ const errorProps = {
|
|
|
25
26
|
loading: false,
|
|
26
27
|
confirmPassword: true,
|
|
27
28
|
hideInputs: false,
|
|
29
|
+
loginPath: "/login"
|
|
28
30
|
},
|
|
29
31
|
callbacks: {
|
|
30
32
|
submit: () => console.log("Submit!"),
|
|
@@ -44,6 +46,7 @@ const loadingProps = {
|
|
|
44
46
|
loading: true,
|
|
45
47
|
confirmPassword: true,
|
|
46
48
|
hideInputs: false,
|
|
49
|
+
loginPath: "/login"
|
|
47
50
|
},
|
|
48
51
|
callbacks: {
|
|
49
52
|
submit: () => console.log("Submit!"),
|
|
@@ -60,6 +63,7 @@ const slottedProps = {
|
|
|
60
63
|
loading: false,
|
|
61
64
|
confirmPassword: true,
|
|
62
65
|
hideInputs: false,
|
|
66
|
+
loginPath: "/login"
|
|
63
67
|
},
|
|
64
68
|
callbacks: {
|
|
65
69
|
submit: () => console.log("Submit!"),
|
|
@@ -86,6 +90,7 @@ export const FieldsHidden = () => {
|
|
|
86
90
|
loading: true,
|
|
87
91
|
confirmPassword: true,
|
|
88
92
|
hideInputs: true,
|
|
93
|
+
loginPath: "/login"
|
|
89
94
|
},
|
|
90
95
|
} }));
|
|
91
96
|
};
|
|
@@ -14,6 +14,12 @@ export class PortalRegister {
|
|
|
14
14
|
* @uiName Page navigated to after registration
|
|
15
15
|
*/
|
|
16
16
|
this.nextPage = "/";
|
|
17
|
+
/**
|
|
18
|
+
* The page that users are redirected to from the verification email.
|
|
19
|
+
*
|
|
20
|
+
* @uiName Email redirection base path
|
|
21
|
+
*/
|
|
22
|
+
this.redirectPath = "/verifyEmail";
|
|
17
23
|
/**
|
|
18
24
|
* @uiName Label for email field
|
|
19
25
|
*/
|
|
@@ -50,6 +56,10 @@ export class PortalRegister {
|
|
|
50
56
|
* @uiName Heading label
|
|
51
57
|
*/
|
|
52
58
|
this.pageLabel = "Register";
|
|
59
|
+
/**
|
|
60
|
+
* @uiName Sign in button redirection path
|
|
61
|
+
*/
|
|
62
|
+
this.loginPath = "/login";
|
|
53
63
|
withHooks(this);
|
|
54
64
|
}
|
|
55
65
|
disconnectedCallback() { }
|
|
@@ -60,7 +70,7 @@ export class PortalRegister {
|
|
|
60
70
|
const content = {
|
|
61
71
|
formData: h("slot", { name: "formData" }),
|
|
62
72
|
secondaryButton: (h("slot", { name: "secondaryButton" },
|
|
63
|
-
h("sl-button", { type: "text", disabled: states.loading, onClick: () => navigation.push(
|
|
73
|
+
h("sl-button", { type: "text", disabled: states.loading, onClick: () => navigation.push(states.loginPath) }, this.loginLabel))),
|
|
64
74
|
emailLabel: this.emailLabel,
|
|
65
75
|
passwordLabel: this.passwordLabel,
|
|
66
76
|
submitLabel: this.submitLabel,
|
|
@@ -93,6 +103,27 @@ export class PortalRegister {
|
|
|
93
103
|
"reflect": false,
|
|
94
104
|
"defaultValue": "\"/\""
|
|
95
105
|
},
|
|
106
|
+
"redirectPath": {
|
|
107
|
+
"type": "string",
|
|
108
|
+
"mutable": false,
|
|
109
|
+
"complexType": {
|
|
110
|
+
"original": "string",
|
|
111
|
+
"resolved": "string",
|
|
112
|
+
"references": {}
|
|
113
|
+
},
|
|
114
|
+
"required": false,
|
|
115
|
+
"optional": false,
|
|
116
|
+
"docs": {
|
|
117
|
+
"tags": [{
|
|
118
|
+
"text": "Email redirection base path",
|
|
119
|
+
"name": "uiName"
|
|
120
|
+
}],
|
|
121
|
+
"text": "The page that users are redirected to from the verification email."
|
|
122
|
+
},
|
|
123
|
+
"attribute": "redirect-path",
|
|
124
|
+
"reflect": false,
|
|
125
|
+
"defaultValue": "\"/verifyEmail\""
|
|
126
|
+
},
|
|
96
127
|
"emailLabel": {
|
|
97
128
|
"type": "string",
|
|
98
129
|
"mutable": false,
|
|
@@ -282,12 +313,33 @@ export class PortalRegister {
|
|
|
282
313
|
"reflect": false,
|
|
283
314
|
"defaultValue": "\"Register\""
|
|
284
315
|
},
|
|
316
|
+
"loginPath": {
|
|
317
|
+
"type": "string",
|
|
318
|
+
"mutable": false,
|
|
319
|
+
"complexType": {
|
|
320
|
+
"original": "string",
|
|
321
|
+
"resolved": "string",
|
|
322
|
+
"references": {}
|
|
323
|
+
},
|
|
324
|
+
"required": false,
|
|
325
|
+
"optional": false,
|
|
326
|
+
"docs": {
|
|
327
|
+
"tags": [{
|
|
328
|
+
"text": "Sign in button redirection path",
|
|
329
|
+
"name": "uiName"
|
|
330
|
+
}],
|
|
331
|
+
"text": ""
|
|
332
|
+
},
|
|
333
|
+
"attribute": "login-path",
|
|
334
|
+
"reflect": false,
|
|
335
|
+
"defaultValue": "\"/login\""
|
|
336
|
+
},
|
|
285
337
|
"demoData": {
|
|
286
338
|
"type": "unknown",
|
|
287
339
|
"mutable": false,
|
|
288
340
|
"complexType": {
|
|
289
341
|
"original": "DemoData<PortalRegisterViewProps>",
|
|
290
|
-
"resolved": "{ states?: { error: string; loading: boolean; confirmPassword: boolean; hideInputs: boolean; validationState?: FormState; enablePasswordValidation?: boolean; }; content?: { formData?: any; passwordField?: any; secondaryButton?: any; emailLabel?: string; passwordLabel?: string; submitLabel?: string; pageLabel?: string; confirmPasswordLabel: string; }; refs?: { formRef: any; }; }",
|
|
342
|
+
"resolved": "{ states?: { error: string; loading: boolean; confirmPassword: boolean; hideInputs: boolean; validationState?: FormState; enablePasswordValidation?: boolean; loginPath: string; }; content?: { formData?: any; passwordField?: any; secondaryButton?: any; emailLabel?: string; passwordLabel?: string; submitLabel?: string; pageLabel?: string; confirmPasswordLabel: string; }; refs?: { formRef: any; }; }",
|
|
291
343
|
"references": {
|
|
292
344
|
"DemoData": {
|
|
293
345
|
"location": "import",
|
|
@@ -325,6 +377,7 @@ function useRegisterDemo(props) {
|
|
|
325
377
|
confirmPassword: true,
|
|
326
378
|
hideInputs: props.hideInputs || false,
|
|
327
379
|
customPasswordField: false,
|
|
380
|
+
loginPath: "/login",
|
|
328
381
|
},
|
|
329
382
|
callbacks: {
|
|
330
383
|
submit: async (_event) => {
|
|
@@ -47,10 +47,12 @@ export function usePortalRegister(props) {
|
|
|
47
47
|
delete formData.password;
|
|
48
48
|
delete formData.confirmPassword;
|
|
49
49
|
formData = { ...formData };
|
|
50
|
+
const redirectPath = props.redirectPath;
|
|
50
51
|
const variables = {
|
|
51
52
|
email,
|
|
52
53
|
password,
|
|
53
54
|
formData,
|
|
55
|
+
redirectPath,
|
|
54
56
|
};
|
|
55
57
|
try {
|
|
56
58
|
await request(variables);
|
|
@@ -100,6 +102,7 @@ export function usePortalRegister(props) {
|
|
|
100
102
|
validationState,
|
|
101
103
|
confirmPassword: props.confirmPassword,
|
|
102
104
|
hideInputs: props.hideInputs,
|
|
105
|
+
loginPath: props.loginPath,
|
|
103
106
|
},
|
|
104
107
|
callbacks: {
|
|
105
108
|
submit,
|
|
@@ -11,9 +11,17 @@ export class PortalResetPassword {
|
|
|
11
11
|
constructor() {
|
|
12
12
|
this.ignored = true;
|
|
13
13
|
/**
|
|
14
|
+
* The page that users are redirected to when the password reset succeeds.
|
|
15
|
+
*
|
|
14
16
|
* @uiName Next page path
|
|
15
17
|
*/
|
|
16
18
|
this.nextPage = "/";
|
|
19
|
+
/**
|
|
20
|
+
* The page that users are redirected to if the reset fails due to outdated password reset attempt.
|
|
21
|
+
*
|
|
22
|
+
* @uiName Failed page redirection path
|
|
23
|
+
*/
|
|
24
|
+
this.failedPage = "/";
|
|
17
25
|
/**
|
|
18
26
|
* @uiName Show confirm password
|
|
19
27
|
*/
|
|
@@ -73,12 +81,33 @@ export class PortalResetPassword {
|
|
|
73
81
|
"text": "Next page path",
|
|
74
82
|
"name": "uiName"
|
|
75
83
|
}],
|
|
76
|
-
"text": ""
|
|
84
|
+
"text": "The page that users are redirected to when the password reset succeeds."
|
|
77
85
|
},
|
|
78
86
|
"attribute": "next-page",
|
|
79
87
|
"reflect": false,
|
|
80
88
|
"defaultValue": "\"/\""
|
|
81
89
|
},
|
|
90
|
+
"failedPage": {
|
|
91
|
+
"type": "string",
|
|
92
|
+
"mutable": false,
|
|
93
|
+
"complexType": {
|
|
94
|
+
"original": "string",
|
|
95
|
+
"resolved": "string",
|
|
96
|
+
"references": {}
|
|
97
|
+
},
|
|
98
|
+
"required": false,
|
|
99
|
+
"optional": false,
|
|
100
|
+
"docs": {
|
|
101
|
+
"tags": [{
|
|
102
|
+
"text": "Failed page redirection path",
|
|
103
|
+
"name": "uiName"
|
|
104
|
+
}],
|
|
105
|
+
"text": "The page that users are redirected to if the reset fails due to outdated password reset attempt."
|
|
106
|
+
},
|
|
107
|
+
"attribute": "failed-page",
|
|
108
|
+
"reflect": false,
|
|
109
|
+
"defaultValue": "\"/\""
|
|
110
|
+
},
|
|
82
111
|
"confirmPassword": {
|
|
83
112
|
"type": "boolean",
|
|
84
113
|
"mutable": false,
|
|
@@ -11,9 +11,17 @@ export class PortalVerifyEmail {
|
|
|
11
11
|
constructor() {
|
|
12
12
|
this.ignored = true;
|
|
13
13
|
/**
|
|
14
|
+
* The page that users are redirected to when the verification succeeds.
|
|
15
|
+
*
|
|
14
16
|
* @uiName Next page path
|
|
15
17
|
*/
|
|
16
18
|
this.nextPage = "/";
|
|
19
|
+
/**
|
|
20
|
+
* The page that users are redirected to if verification fails due to outdated verification attempt.
|
|
21
|
+
*
|
|
22
|
+
* @uiName Failed page redirection path
|
|
23
|
+
*/
|
|
24
|
+
this.failedPage = "/";
|
|
17
25
|
withHooks(this);
|
|
18
26
|
}
|
|
19
27
|
disconnectedCallback() { }
|
|
@@ -41,12 +49,33 @@ export class PortalVerifyEmail {
|
|
|
41
49
|
"text": "Next page path",
|
|
42
50
|
"name": "uiName"
|
|
43
51
|
}],
|
|
44
|
-
"text": ""
|
|
52
|
+
"text": "The page that users are redirected to when the verification succeeds."
|
|
45
53
|
},
|
|
46
54
|
"attribute": "next-page",
|
|
47
55
|
"reflect": false,
|
|
48
56
|
"defaultValue": "\"/\""
|
|
49
57
|
},
|
|
58
|
+
"failedPage": {
|
|
59
|
+
"type": "string",
|
|
60
|
+
"mutable": false,
|
|
61
|
+
"complexType": {
|
|
62
|
+
"original": "string",
|
|
63
|
+
"resolved": "string",
|
|
64
|
+
"references": {}
|
|
65
|
+
},
|
|
66
|
+
"required": false,
|
|
67
|
+
"optional": false,
|
|
68
|
+
"docs": {
|
|
69
|
+
"tags": [{
|
|
70
|
+
"text": "Failed page redirection path",
|
|
71
|
+
"name": "uiName"
|
|
72
|
+
}],
|
|
73
|
+
"text": "The page that users are redirected to if verification fails due to outdated verification attempt."
|
|
74
|
+
},
|
|
75
|
+
"attribute": "failed-page",
|
|
76
|
+
"reflect": false,
|
|
77
|
+
"defaultValue": "\"/\""
|
|
78
|
+
},
|
|
50
79
|
"demoData": {
|
|
51
80
|
"type": "unknown",
|
|
52
81
|
"mutable": false,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useEffect, useState } from "@saasquatch/universal-hooks";
|
|
2
2
|
import { navigation, useUserIdentity, useVerifyEmailMutation, } from "@saasquatch/component-boilerplate";
|
|
3
|
-
export function usePortalVerifyEmail({ nextPage }) {
|
|
3
|
+
export function usePortalVerifyEmail({ nextPage, failedPage }) {
|
|
4
4
|
var _a, _b, _c, _d, _e;
|
|
5
5
|
const [verified, setVerified] = useState(false);
|
|
6
6
|
const [disableContinue, setDisableContinue] = useState(true);
|
|
@@ -13,7 +13,7 @@ export function usePortalVerifyEmail({ nextPage }) {
|
|
|
13
13
|
urlParams.delete("oobCode");
|
|
14
14
|
const failed = () => {
|
|
15
15
|
return navigation.push({
|
|
16
|
-
pathname:
|
|
16
|
+
pathname: failedPage,
|
|
17
17
|
search: urlParams.toString() && "?" + urlParams.toString(),
|
|
18
18
|
});
|
|
19
19
|
};
|
|
@@ -15,7 +15,7 @@ const props = {
|
|
|
15
15
|
};
|
|
16
16
|
const steps1 = {
|
|
17
17
|
cardTitle: "Invite your friends to Klip",
|
|
18
|
-
description: "
|
|
18
|
+
description: "Send your referral link to a friend or share it through email, Twitter, or Facebook",
|
|
19
19
|
color: "white",
|
|
20
20
|
background: "#5B3EDA",
|
|
21
21
|
icon: "person-plus-fill",
|
|
@@ -6,7 +6,7 @@ export function ProgramExplainerView(props, children) {
|
|
|
6
6
|
Container: {
|
|
7
7
|
display: "flex",
|
|
8
8
|
flexDirection: "row",
|
|
9
|
-
"@media (max-width:
|
|
9
|
+
"@media (max-width: 499px)": {
|
|
10
10
|
flexDirection: "column",
|
|
11
11
|
},
|
|
12
12
|
},
|
|
@@ -38,7 +38,7 @@ export function ProgramExplainerView(props, children) {
|
|
|
38
38
|
display: flex;
|
|
39
39
|
width: 100%;
|
|
40
40
|
}
|
|
41
|
-
@media (max-width:
|
|
41
|
+
@media (max-width: 499px) {
|
|
42
42
|
::slotted(*){
|
|
43
43
|
display: block;
|
|
44
44
|
}
|
package/dist/collection/components/sqm-program-explainer-step/ProgramExplainerStep.stories.js
CHANGED
|
@@ -6,7 +6,7 @@ export default {
|
|
|
6
6
|
export const Example1 = () => {
|
|
7
7
|
const props = {
|
|
8
8
|
cardTitle: "Invite your friends to Klip",
|
|
9
|
-
description: "
|
|
9
|
+
description: "Send your referral link to a friend or share it through email, Twitter, or Facebook",
|
|
10
10
|
color: "white",
|
|
11
11
|
background: "#5B3EDA",
|
|
12
12
|
icon: "person-plus-fill",
|
package/dist/collection/components/sqm-program-explainer-step/sqm-program-explainer-step-view.js
CHANGED
|
@@ -11,14 +11,14 @@ export function ProgramExplainerStepView(props) {
|
|
|
11
11
|
background: props.background,
|
|
12
12
|
padding: "var(--sl-spacing-large)",
|
|
13
13
|
paddingBottom: "var(--sl-spacing-xxx-large)",
|
|
14
|
-
"@media (max-width:
|
|
14
|
+
"@media (max-width: 499px)": {
|
|
15
15
|
flexDirection: "row",
|
|
16
16
|
width: "auto",
|
|
17
17
|
paddingBottom: "var(--sl-spacing-large)",
|
|
18
18
|
},
|
|
19
19
|
},
|
|
20
20
|
Text: {
|
|
21
|
-
"@media (max-width:
|
|
21
|
+
"@media (max-width: 499px)": {
|
|
22
22
|
marginLeft: "var(--sl-spacing-large)",
|
|
23
23
|
},
|
|
24
24
|
},
|
|
@@ -28,14 +28,14 @@ export function ProgramExplainerStepView(props) {
|
|
|
28
28
|
fontWeight: "var(--sl-font-weight-bold)",
|
|
29
29
|
lineHeight: "var(--sl-line-height-dense)",
|
|
30
30
|
marginTop: "var(--sl-spacing-large)",
|
|
31
|
-
"@media (max-width:
|
|
31
|
+
"@media (max-width: 499px)": {
|
|
32
32
|
margin: "0",
|
|
33
33
|
},
|
|
34
34
|
},
|
|
35
35
|
Description: {
|
|
36
36
|
fontSize: "var(--sl-font-size-medium)",
|
|
37
37
|
marginTop: "var(--sl-spacing-small)",
|
|
38
|
-
"@media (max-width:
|
|
38
|
+
"@media (max-width: 499px)": {
|
|
39
39
|
marginTop: "var(--sl-spacing-x-small)",
|
|
40
40
|
},
|
|
41
41
|
},
|
|
@@ -58,7 +58,7 @@ export function ProgramExplainerStepView(props) {
|
|
|
58
58
|
display: flex;
|
|
59
59
|
width: 100%;
|
|
60
60
|
}
|
|
61
|
-
@media (max-width:
|
|
61
|
+
@media (max-width: 499px) {
|
|
62
62
|
:host{
|
|
63
63
|
display: block;
|
|
64
64
|
}
|
|
@@ -224,8 +224,11 @@ function useReferraltableDemo(props) {
|
|
|
224
224
|
elements: {
|
|
225
225
|
emptyElement: h(EmptySlot, null),
|
|
226
226
|
loadingElement: h(LoadingSlot, null),
|
|
227
|
-
|
|
228
|
-
|
|
227
|
+
columns: [
|
|
228
|
+
h("div", null, "User"),
|
|
229
|
+
h("div", null, "Referral Status"),
|
|
230
|
+
h("div", null, "Rewards"),
|
|
231
|
+
],
|
|
229
232
|
rows: [],
|
|
230
233
|
},
|
|
231
234
|
}, props.demoData || {}, { arrayMerge: (_, a) => a });
|
|
@@ -2,19 +2,24 @@ const baseResponse = (data, stage = "chooseReward", selectedItem = null, selecte
|
|
|
2
2
|
states: {
|
|
3
3
|
content: {
|
|
4
4
|
text: {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
continueToConfirmationText: "Continue to confirmation",
|
|
8
|
-
backText: "Back",
|
|
9
|
-
redeemText: "Redeem",
|
|
10
|
-
doneText: "Done",
|
|
5
|
+
buttonText: "Exchange Rewards",
|
|
6
|
+
notAvailableError: "{unavailableReason, select, US_TAX {US Tax limit} INSUFFICIENT_REDEEMABLE_CREDIT {Not enough points} other {Not available} }",
|
|
11
7
|
chooseRewardTitle: "Choose reward",
|
|
12
8
|
chooseAmountTitle: "Amount",
|
|
13
9
|
confirmationTitle: "Confirm",
|
|
10
|
+
cancelText: "Cancel",
|
|
11
|
+
backText: "Back",
|
|
12
|
+
continueText: "Continue",
|
|
13
|
+
continueToConfirmationText: "Continue to confirmation",
|
|
14
|
+
redeemText: "Redeem",
|
|
14
15
|
redeemTitle: "Confirm and redeem",
|
|
16
|
+
redemptionSuccessText: "Successfully redeemed {sourceValue} for {destinationValue}",
|
|
17
|
+
doneText: "Done",
|
|
18
|
+
toolTipText: "Copied!",
|
|
19
|
+
selectText: "Select amount to receive",
|
|
20
|
+
sourceAmountMessage: "{ruleType, select, FIXED_GLOBAL_REWARD {{sourceValue}} other {{sourceMinValue} to {sourceMaxValue}}}",
|
|
15
21
|
rewardRedeemedText: "Reward redeemed",
|
|
16
|
-
|
|
17
|
-
notAvailableError: "{unavailableReason, select, US_TAX {US Tax limit} INSUFFICIENT_REDEEMABLE_CREDIT {Not enough points} other {Not available} }",
|
|
22
|
+
redemptionError: "An error occured trying to redeem this reward. Please try again",
|
|
18
23
|
},
|
|
19
24
|
},
|
|
20
25
|
redeemStage: stage,
|