@saasquatch/mint-components 1.8.5-17 → 1.8.5-18
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/sqm-big-stat_38.cjs.entry.js +2 -2
- package/dist/cjs/sqm-portal-verify-email.cjs.entry.js +68 -46
- package/dist/cjs/sqm-stencilbook.cjs.entry.js +2 -2
- package/dist/collection/components/sqm-link-button/sqm-link-button-view.js +2 -2
- package/dist/collection/components/sqm-portal-verify-email/usePortalVerifyEmail.js +67 -44
- package/dist/esm/sqm-big-stat_38.entry.js +2 -2
- package/dist/esm/sqm-portal-verify-email.entry.js +68 -46
- package/dist/esm/sqm-stencilbook.entry.js +2 -2
- package/dist/esm-es5/sqm-big-stat_38.entry.js +1 -1
- package/dist/esm-es5/sqm-portal-verify-email.entry.js +1 -1
- package/dist/esm-es5/sqm-stencilbook.entry.js +1 -1
- package/dist/mint-components/mint-components.esm.js +1 -1
- package/dist/mint-components/p-04658bbd.system.entry.js +1 -0
- package/dist/mint-components/p-07fc5950.system.entry.js +1 -0
- package/dist/mint-components/{p-561262cd.entry.js → p-1a5005fe.entry.js} +1 -1
- package/dist/mint-components/p-44b12b2e.system.js +1 -1
- package/dist/mint-components/p-64443c35.entry.js +9 -0
- package/dist/mint-components/{p-907c3344.system.entry.js → p-a9482c97.system.entry.js} +1 -1
- package/dist/mint-components/p-d32dbf5e.entry.js +1 -0
- package/docs/docs.docx +0 -0
- package/package.json +1 -1
- package/dist/mint-components/p-0bc62218.system.entry.js +0 -1
- package/dist/mint-components/p-737aac25.entry.js +0 -1
- package/dist/mint-components/p-b7bd62b1.system.entry.js +0 -1
- package/dist/mint-components/p-e0d7fab3.entry.js +0 -9
|
@@ -1508,8 +1508,8 @@ function LinkButtonView(props) {
|
|
|
1508
1508
|
index.h("style", { type: "text/css" },
|
|
1509
1509
|
styleString$1,
|
|
1510
1510
|
vanillaStyle),
|
|
1511
|
-
index.h("sl-button", { type: "primary", exportparts: "base: primarybutton-base" },
|
|
1512
|
-
index.h("a", {
|
|
1511
|
+
index.h("sl-button", { onClick: onClick, type: "primary", exportparts: "base: primarybutton-base" },
|
|
1512
|
+
index.h("a", { class: sheet$1.classes.Link, part: "sqm-link" }, buttonText))));
|
|
1513
1513
|
}
|
|
1514
1514
|
|
|
1515
1515
|
const LinkButton = class {
|
|
@@ -18,12 +18,11 @@ function setSubmitted(submitted) {
|
|
|
18
18
|
window[SUBMITTED_CONTEXT] = submitted;
|
|
19
19
|
}
|
|
20
20
|
function usePortalVerifyEmail({ nextPage, failedPage, verifySuccessText, verifyEmailText, verifyInvalidText, networkErrorMessage, continueText, }) {
|
|
21
|
-
var
|
|
21
|
+
var _b, _c, _d, _e, _f, _g, _h, _j;
|
|
22
22
|
const submitted = window[SUBMITTED_CONTEXT];
|
|
23
23
|
const userIdent = index_module.Q();
|
|
24
24
|
const [verificationError, setVerificationError] = stencilHooks_module.useState(null);
|
|
25
25
|
const [success, setSuccess] = stencilHooks_module.useState(false);
|
|
26
|
-
const email = (_a = userIdent === null || userIdent === void 0 ? void 0 : userIdent.managedIdentity) === null || _a === void 0 ? void 0 : _a.email;
|
|
27
26
|
const [request, { loading, data, errors }] = index_module.an();
|
|
28
27
|
const urlParams = new URLSearchParams(index_module.$n.location.search);
|
|
29
28
|
const oobCode = urlParams.get("oobCode");
|
|
@@ -45,54 +44,77 @@ function usePortalVerifyEmail({ nextPage, failedPage, verifySuccessText, verifyE
|
|
|
45
44
|
const url = utils.sanitizeUrlPath(nextPageOverride || nextPage);
|
|
46
45
|
index_module.$n.push(url.href);
|
|
47
46
|
};
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
var _a;
|
|
58
|
-
setSubmitted(true);
|
|
59
|
-
const response = await request({ oobCode });
|
|
60
|
-
if (response instanceof Error ||
|
|
61
|
-
!((_a = response === null || response === void 0 ? void 0 : response.verifyManagedIdentityEmail) === null || _a === void 0 ? void 0 : _a.success)) {
|
|
62
|
-
setVerificationError({ message: true });
|
|
63
|
-
}
|
|
64
|
-
console.debug("SUBMITTED", response);
|
|
65
|
-
};
|
|
66
|
-
console.log({ hasContext, userIdent, data, submitted, verified, errors });
|
|
67
|
-
stencilHooks_module.useEffect(() => {
|
|
68
|
-
if (errors && !verified)
|
|
69
|
-
setVerificationError(errors);
|
|
70
|
-
}, [errors, verified]);
|
|
47
|
+
console.log({
|
|
48
|
+
hasContext,
|
|
49
|
+
userIdent,
|
|
50
|
+
data,
|
|
51
|
+
submitted,
|
|
52
|
+
verified,
|
|
53
|
+
verificationError,
|
|
54
|
+
success,
|
|
55
|
+
});
|
|
71
56
|
stencilHooks_module.useEffect(() => {
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
console.debug("email mismatch");
|
|
80
|
-
logout();
|
|
81
|
-
return;
|
|
82
|
-
// Already verified, begin redirect
|
|
57
|
+
const check = async () => {
|
|
58
|
+
var _a;
|
|
59
|
+
setSubmitted(true);
|
|
60
|
+
const response = await request({ oobCode });
|
|
61
|
+
if (response instanceof Error ||
|
|
62
|
+
!((_a = response === null || response === void 0 ? void 0 : response.verifyManagedIdentityEmail) === null || _a === void 0 ? void 0 : _a.success)) {
|
|
63
|
+
setVerificationError({ message: true });
|
|
83
64
|
}
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
setSuccess(true);
|
|
87
|
-
console.debug("verified");
|
|
88
|
-
setTimeout(() => {
|
|
89
|
-
gotoNextPage();
|
|
90
|
-
setSubmitted(false);
|
|
91
|
-
}, 3000);
|
|
92
|
-
return;
|
|
65
|
+
else {
|
|
66
|
+
setSuccess(true);
|
|
93
67
|
}
|
|
68
|
+
console.debug("SUBMITTED", response);
|
|
69
|
+
};
|
|
70
|
+
if (!submitted)
|
|
71
|
+
check();
|
|
72
|
+
}, [submitted]);
|
|
73
|
+
stencilHooks_module.useEffect(() => {
|
|
74
|
+
if (!submitted)
|
|
75
|
+
return;
|
|
76
|
+
if ((success || verified) && !verificationError) {
|
|
77
|
+
console.log("LOGGING IN", success, verified, verificationError);
|
|
78
|
+
setTimeout(gotoNextPage, 3000);
|
|
79
|
+
}
|
|
80
|
+
else {
|
|
81
|
+
console.log("LOGGING OUT", success, verified, verificationError);
|
|
82
|
+
setTimeout(() => {
|
|
83
|
+
index_module.setUserIdentity(undefined);
|
|
84
|
+
gotoNextPage();
|
|
85
|
+
}, 3000);
|
|
94
86
|
}
|
|
95
|
-
}, [
|
|
87
|
+
}, [verified, verificationError, success, submitted]);
|
|
88
|
+
stencilHooks_module.useEffect(() => {
|
|
89
|
+
if (errors)
|
|
90
|
+
setVerificationError(errors);
|
|
91
|
+
}, [errors]);
|
|
92
|
+
// useEffect(() => {
|
|
93
|
+
// if (!data && !submitted && oobCode) {
|
|
94
|
+
// submit();
|
|
95
|
+
// return;
|
|
96
|
+
// }
|
|
97
|
+
// // verification successful but user in context is not verified
|
|
98
|
+
// // or mismatch between logged in user and user associated with oobCode
|
|
99
|
+
// if (submitted) {
|
|
100
|
+
// console.debug("in submit condition");
|
|
101
|
+
// if (email && email !== oobEmail) {
|
|
102
|
+
// console.debug("email mismatch");
|
|
103
|
+
// logout();
|
|
104
|
+
// return;
|
|
105
|
+
// // Already verified, begin redirect
|
|
106
|
+
// }
|
|
107
|
+
// if (verified) {
|
|
108
|
+
// if (!verificationError) setSuccess(true);
|
|
109
|
+
// console.debug("verified");
|
|
110
|
+
// setTimeout(() => {
|
|
111
|
+
// gotoNextPage();
|
|
112
|
+
// setSubmitted(false);
|
|
113
|
+
// }, 3000);
|
|
114
|
+
// return;
|
|
115
|
+
// }
|
|
116
|
+
// }
|
|
117
|
+
// }, [submitted, verificationError, data, email, oobCode, oobEmail, submit]);
|
|
96
118
|
return {
|
|
97
119
|
states: {
|
|
98
120
|
loading: loading || disableContinue,
|
|
@@ -7605,7 +7605,7 @@ const PortalResetPassword = /*#__PURE__*/Object.freeze({
|
|
|
7605
7605
|
CodeValidating: CodeValidating
|
|
7606
7606
|
});
|
|
7607
7607
|
|
|
7608
|
-
const scenario$9 = "@author:derek\n@owner:ian\nFeature: Verify Email\n\n Background: A user is on the email verification page\n Given a user who has been redirected to the email verification page\n\n @motivating\n Scenario: Verifying your email takes you to the portal login page\n Given a user has a valid oob code as a url query parameter\n When they click \"Verify Email\"\n Then the button enters a loading state\n When their email is validated\n Then a button that says \"Continue\" appears\n When they click \"Continue\"\n Then they are redirected to login\n\n @motivating\n Scenario: Users are automatically redirected if they dont click \"Continue\"\n Given a user has a valid oob code as a url query parameter\n When they click \"Verify Email\"\n Then the button enters a loading state\n When their email is validated\n Then a button that says \"Continue\" appears\n When they wait 5 seconds\n Then they are redirected to login\n\n @motivating\n Scenario: Users are notified if verifying their email has failed\n Given a user has a valid oob code as a url query parameter\n When they click \"Verify Email\"\n Then the button enters a loading state\n When their email fails to be validated\n Then an banner is shown stating that an error occured\n\n @motivating\n Scenario Outline: Users cannot verify their email with an invalid or missing oob code\n Given a user has a <oobCode> as a url query parameter\n And the component <mayHave> \"failed-page\" with <value>\n Then they see an error message saying that their verification code is invalid/expired\n When they click \"Continue\"\n Then they are redirected to <redirectPath>\n Examples:\n | oobCode | mayHave | value | redirectPath |\n | invalid oob code | doesn't have | N/A | / |\n | non existant oob code | doesn't have | N/A | / |\n | invalid oob code | has | /login | /login |\n | non existant oob code | has | /login | /login |\n\n @motivating\n Scenario: Users are redirected to \"/\" by default\n Given the component does not have prop \"nextPage\"\n And the users url does not contain a \"nextPage\" query parameter\n And a user has verified their email\n When they click \"Continue\"\n Then they are redirected to \"/\"\n\n @motivating\n Scenario: Custom redirection can be configured\n Given the component has prop \"nextPage\" with value \"/activity\"\n And the users url does not contain a \"nextPage\" query parameter\n And a user has verified their email\n When they click \"Continue\"\n Then they are redirected to \"/activity\"\n\n @motivating\n Scenario Outline: Users are redirected to the value of the nextPage url parameter if it exists\n Given the component <mayHave> prop \"nextPage\" with <nextPageValue>\n And the users url contains a \"nextPage\" query paramater with <nextPageParamValue>\n And the user has verified their email\n When they click \"Continue\"\n Then they are redirected to <nextPageParamValue>\n Examples:\n | mayHave | nextPageValue | nextPageParamValue |\n | has | /dashboard | /activity |\n | does not have | N/A | /activity |\n\n @motivating\n Scenario Outline: Users are redirected to the value of the nextPage url parameter as if it were a relative path\n Given the component is loaded at <currentUrl>\n And the user has verified their email\n When they click \"Continue\"\n And they are redirected to <url>\n Examples:\n | currentUrl | url |\n | https://www.example.com?nextPage=./activity | https://www.example.com/activity |\n | https://www.example.com?nextPage=activity | https://www.example.com/activity |\n | https://www.example.com?nextPage=/activity | https://www.example.com/activity |\n | https://www.example.com?nextPage=www.google.com | https://www.example.com/www.google.com |\n | https://www.example.com?nextPage=//foo.com | https://www.example.com/ |\n | https://www.example.com?nextPage=https://malicious.example.com | https://www.example.com/ |\n | http://www.example.com/nest/page?oob=123&other&nextPage=activity#heading-1 | http://www.example.com/activity |\n | https://www.example.com?nextPage=activity?foo=bar | https://www.example.com/activity?foo=bar |\n | https://www.example.com?nextPage=%2Factivity%3Ffoo%3Dbar | https://www.example.com/activity?foo=bar |\n | https://www.example.com?nextPage=%2Factivity%3Ffoo%3Dbar#hash | https://www.example.com/activity?foo=bar |\n | https://www.example.com?nextPage=%2Factivity%3Ffoo%3Dbar%23hash | https://www.example.com/activity?foo=bar#hash |\n | https://www.example.com:1337?nextPage=activity | https://www.example.com:1337/activity |\n | http://1.1.1.1:1111?nextPage=activity | http://1.1.1.1:1111/activity |\n\n @landmine\n Scenario Outline: Username and password are not persisted on redirects\n Given the component is loaded at <currentUrl>\n And the user has verified their email\n When they click \"Continue\"\n And they are redirected to <url>\n Examples:\n | currentUrl | url |\n | https://user:pass@www.example.com:444?nextPage=activity | https://www.example.com:444/activity |\n\n\n
|
|
7608
|
+
const scenario$9 = "@author:derek\n@owner:ian\nFeature: Verify Email\n\n Background: A user is on the email verification page\n Given a user who has been redirected to the email verification page\n\n @motivating\n Scenario: Verifying your email takes you to the portal login page\n Given a user has a valid oob code as a url query parameter\n When they click \"Verify Email\"\n Then the button enters a loading state\n When their email is validated\n Then a button that says \"Continue\" appears\n When they click \"Continue\"\n Then they are redirected to login\n\n @motivating\n Scenario: Users are automatically redirected if they dont click \"Continue\"\n Given a user has a valid oob code as a url query parameter\n When they click \"Verify Email\"\n Then the button enters a loading state\n When their email is validated\n Then a button that says \"Continue\" appears\n When they wait 5 seconds\n Then they are redirected to login\n\n @motivating\n Scenario: Users are notified if verifying their email has failed\n Given a user has a valid oob code as a url query parameter\n When they click \"Verify Email\"\n Then the button enters a loading state\n When their email fails to be validated\n Then an banner is shown stating that an error occured\n\n @motivating\n Scenario Outline: Users cannot verify their email with an invalid or missing oob code\n Given a user has a <oobCode> as a url query parameter\n And the component <mayHave> \"failed-page\" with <value>\n Then they see an error message saying that their verification code is invalid/expired\n When they click \"Continue\"\n Then they are redirected to <redirectPath>\n Examples:\n | oobCode | mayHave | value | redirectPath |\n | invalid oob code | doesn't have | N/A | / |\n | non existant oob code | doesn't have | N/A | / |\n | invalid oob code | has | /login | /login |\n | non existant oob code | has | /login | /login |\n\n @motivating\n Scenario: Users are redirected to \"/\" by default\n Given the component does not have prop \"nextPage\"\n And the users url does not contain a \"nextPage\" query parameter\n And a user has verified their email\n When they click \"Continue\"\n Then they are redirected to \"/\"\n\n @motivating\n Scenario: Custom redirection can be configured\n Given the component has prop \"nextPage\" with value \"/activity\"\n And the users url does not contain a \"nextPage\" query parameter\n And a user has verified their email\n When they click \"Continue\"\n Then they are redirected to \"/activity\"\n\n @motivating\n Scenario Outline: Users are redirected to the value of the nextPage url parameter if it exists\n Given the component <mayHave> prop \"nextPage\" with <nextPageValue>\n And the users url contains a \"nextPage\" query paramater with <nextPageParamValue>\n And the user has verified their email\n When they click \"Continue\"\n Then they are redirected to <nextPageParamValue>\n Examples:\n | mayHave | nextPageValue | nextPageParamValue |\n | has | /dashboard | /activity |\n | does not have | N/A | /activity |\n\n @motivating\n Scenario Outline: Users are redirected to the value of the nextPage url parameter as if it were a relative path\n Given the component is loaded at <currentUrl>\n And the user has verified their email\n When they click \"Continue\"\n And they are redirected to <url>\n Examples:\n | currentUrl | url |\n | https://www.example.com?nextPage=./activity | https://www.example.com/activity |\n | https://www.example.com?nextPage=activity | https://www.example.com/activity |\n | https://www.example.com?nextPage=/activity | https://www.example.com/activity |\n | https://www.example.com?nextPage=www.google.com | https://www.example.com/www.google.com |\n | https://www.example.com?nextPage=//foo.com | https://www.example.com/ |\n | https://www.example.com?nextPage=https://malicious.example.com | https://www.example.com/ |\n | http://www.example.com/nest/page?oob=123&other&nextPage=activity#heading-1 | http://www.example.com/activity |\n | https://www.example.com?nextPage=activity?foo=bar | https://www.example.com/activity?foo=bar |\n | https://www.example.com?nextPage=%2Factivity%3Ffoo%3Dbar | https://www.example.com/activity?foo=bar |\n | https://www.example.com?nextPage=%2Factivity%3Ffoo%3Dbar#hash | https://www.example.com/activity?foo=bar |\n | https://www.example.com?nextPage=%2Factivity%3Ffoo%3Dbar%23hash | https://www.example.com/activity?foo=bar#hash |\n | https://www.example.com:1337?nextPage=activity | https://www.example.com:1337/activity |\n | http://1.1.1.1:1111?nextPage=activity | http://1.1.1.1:1111/activity |\n\n @landmine\n Scenario Outline: Username and password are not persisted on redirects\n Given the component is loaded at <currentUrl>\n And the user has verified their email\n When they click \"Continue\"\n And they are redirected to <url>\n Examples:\n | currentUrl | url |\n | https://user:pass@www.example.com:444?nextPage=activity | https://www.example.com:444/activity |\n\n\n @minutia\n Scenario Outline: Users may be logged in or logged out depending on the verified status and logged in email\n Given an oobCode with email <oobCodeEmail> as a url query parameter\n And the user is logged in as <loggedInEmail>\n And the logged in user <isVerified>\n When the oobCode is submitted\n And the oobCode <isValid>\n Then the <submitState> screen is shown\n And after 3 seconds pass\n Then the user is redirected to <redirect>\n Examples:\n | oobCodeEmail | loggedInEmail | isVerified | isValid | submitState | redirect |\n | user1@example.com | N/A | false | is valid | success | /login |\n | user1@example.com | N/A | false | is not valid | error | /login |\n | user1@example.com | user1@example.com | false | is valid | success | /activity |\n | user1@example.com | user1@example.com | false | is not valid | error | N/A |\n | user1@example.com | user2@example.com | false | is valid | success | /login |\n | user1@example.com | user2@example.com | false | is not valid | error | /login |\n | user1@example.com | user1@example.com | true | is valid | success | /activity |\n | user1@example.com | user1@example.com | true | is not valid | success | /activity |\n | user1@example.com | user2@example.com | true | is not valid | error | /login |\n | N/A | N/A | false | is not valid | error | N/A |\n";
|
|
7609
7609
|
|
|
7610
7610
|
const PortalVerifyEmail_stories = {
|
|
7611
7611
|
title: "Components/Microsite Verify Email",
|
|
@@ -9957,7 +9957,7 @@ const ResetPasswordReadme = "# sqm-portal-reset-password\n\n\n\n<!-- Auto Genera
|
|
|
9957
9957
|
|
|
9958
9958
|
const EmailVerificationReadme = "# sqm-portal-email-verification\n\n\n\n<!-- Auto Generated Below -->\n\n\n## Properties\n\n| Property | Attribute | Description | Type | Default |\n| ---------------------------- | ------------------------------ | ----------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| `demoData` | -- | | `{ states?: { error: string; loading: boolean; success: boolean; isVerified?: boolean; loadingVerification?: boolean; countdown?: number; }; content?: { email: string; verifyMessage: string; emailVerificationHeader: string; resendEmailButtonText: string; verificationStatusMessage?: string; verificationLoadingMessage?: string; verificationResentMessage?: string; }; }` | `undefined` |\n| `emailVerificationHeader` | `email-verification-header` | | `string` | `\"Verify your email\"` |\n| `networkErrorMessage` | `network-error-message` | | `string` | `\"An error occurred while verifying your password. Please refresh the page.\"` |\n| `redirectPath` | `redirect-path` | Redirect participants to this page from their verification email. | `string` | `\"/verifyEmail\"` |\n| `resendEmailButtonText` | `resend-email-button-text` | | `string` | `\"Re-send Email\"` |\n| `verificationLoadingMessage` | `verification-loading-message` | | `string` | `\"Checking verification status\"` |\n| `verificationResentMessage` | `verification-resent-message` | | `string` | `\"Your verification email has been resent successfully\"` |\n| `verificationStatusMessage` | `verification-status-message` | | `string` | `\"Checking verification status in {countdown}\"` |\n| `verifyMessage` | `verify-message` | | `string` | `\"A verification email was sent to {email}. Please verify your email to continue to the portal. Resending an email will invalidate the previous email.\"` |\n\n\n## Dependencies\n\n### Depends on\n\n- [sqm-form-message](../sqm-form-message)\n\n### Graph\n```mermaid\ngraph TD;\n sqm-portal-email-verification --> sqm-form-message\n style sqm-portal-email-verification fill:#f9f,stroke:#333,stroke-width:4px\n```\n\n----------------------------------------------\n\n*Built with [StencilJS](https://stenciljs.com/)*\n";
|
|
9959
9959
|
|
|
9960
|
-
const EmailVerifiedReadme = "# sqm-portal-verify-email\n\n\n\n<!-- Auto Generated Below -->\n\n\n## Properties\n\n| Property | Attribute | Description | Type
|
|
9960
|
+
const EmailVerifiedReadme = "# sqm-portal-verify-email\n\n\n\n<!-- Auto Generated Below -->\n\n\n## Properties\n\n| Property | Attribute | Description | Type | Default |\n| --------------------- | ----------------------- | ------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- |\n| `continueText` | `continue-text` | | `string` | `\"Continue\"` |\n| `demoData` | -- | | `{ states?: { error: string; loading: boolean; success: boolean; verified: boolean; }; data?: { oobCode: string; }; content?: { verifySuccessText?: string; verifyEmailText?: string; verifyInvalidText?: string; continueText?: string; }; }` | `undefined` |\n| `failedPage` | `failed-page` | Redirect participants to this page if verification fails due to an outdated verification attempt. | `string` | `\"/\"` |\n| `networkErrorMessage` | `network-error-message` | | `string` | `\"An error occurred while verifying your email. Please refresh the page and try again.\"` |\n| `nextPage` | `next-page` | Redirect participants to this page when they successfully verify their email. | `string` | `\"/\"` |\n| `verifyEmailText` | `verify-email-text` | | `string` | `\"Verify your email\"` |\n| `verifyInvalidText` | `verify-invalid-text` | | `string` | `\"The email verification code is invalid or has expired, please try again.\"` |\n| `verifySuccessText` | `verify-success-text` | | `string` | `\"Your email has been verified and you are being redirected. If you are not redirected, please click Continue.\"` |\n\n\n## Dependencies\n\n### Depends on\n\n- [sqm-form-message](../sqm-form-message)\n\n### Graph\n```mermaid\ngraph TD;\n sqm-portal-verify-email --> sqm-form-message\n style sqm-portal-verify-email fill:#f9f,stroke:#333,stroke-width:4px\n```\n\n----------------------------------------------\n\n*Built with [StencilJS](https://stenciljs.com/)*\n";
|
|
9961
9961
|
|
|
9962
9962
|
const PortalTemplates_stories = {
|
|
9963
9963
|
title: "Templates / Microsite",
|
|
@@ -20,6 +20,6 @@ export function LinkButtonView(props) {
|
|
|
20
20
|
h("style", { type: "text/css" },
|
|
21
21
|
styleString,
|
|
22
22
|
vanillaStyle),
|
|
23
|
-
h("sl-button", { type: "primary", exportparts: "base: primarybutton-base" },
|
|
24
|
-
h("a", {
|
|
23
|
+
h("sl-button", { onClick: onClick, type: "primary", exportparts: "base: primarybutton-base" },
|
|
24
|
+
h("a", { class: sheet.classes.Link, part: "sqm-link" }, buttonText))));
|
|
25
25
|
}
|
|
@@ -34,54 +34,77 @@ export function usePortalVerifyEmail({ nextPage, failedPage, verifySuccessText,
|
|
|
34
34
|
const url = sanitizeUrlPath(nextPageOverride || nextPage);
|
|
35
35
|
navigation.push(url.href);
|
|
36
36
|
};
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
var _a;
|
|
47
|
-
setSubmitted(true);
|
|
48
|
-
const response = await request({ oobCode });
|
|
49
|
-
if (response instanceof Error ||
|
|
50
|
-
!((_a = response === null || response === void 0 ? void 0 : response.verifyManagedIdentityEmail) === null || _a === void 0 ? void 0 : _a.success)) {
|
|
51
|
-
setVerificationError({ message: true });
|
|
52
|
-
}
|
|
53
|
-
console.debug("SUBMITTED", response);
|
|
54
|
-
};
|
|
55
|
-
console.log({ hasContext, userIdent, data, submitted, verified, errors });
|
|
56
|
-
useEffect(() => {
|
|
57
|
-
if (errors && !verified)
|
|
58
|
-
setVerificationError(errors);
|
|
59
|
-
}, [errors, verified]);
|
|
37
|
+
console.log({
|
|
38
|
+
hasContext,
|
|
39
|
+
userIdent,
|
|
40
|
+
data,
|
|
41
|
+
submitted,
|
|
42
|
+
verified,
|
|
43
|
+
verificationError,
|
|
44
|
+
success,
|
|
45
|
+
});
|
|
60
46
|
useEffect(() => {
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
console.debug("email mismatch");
|
|
69
|
-
logout();
|
|
70
|
-
return;
|
|
71
|
-
// Already verified, begin redirect
|
|
47
|
+
const check = async () => {
|
|
48
|
+
var _a;
|
|
49
|
+
setSubmitted(true);
|
|
50
|
+
const response = await request({ oobCode });
|
|
51
|
+
if (response instanceof Error ||
|
|
52
|
+
!((_a = response === null || response === void 0 ? void 0 : response.verifyManagedIdentityEmail) === null || _a === void 0 ? void 0 : _a.success)) {
|
|
53
|
+
setVerificationError({ message: true });
|
|
72
54
|
}
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
setSuccess(true);
|
|
76
|
-
console.debug("verified");
|
|
77
|
-
setTimeout(() => {
|
|
78
|
-
gotoNextPage();
|
|
79
|
-
setSubmitted(false);
|
|
80
|
-
}, 3000);
|
|
81
|
-
return;
|
|
55
|
+
else {
|
|
56
|
+
setSuccess(true);
|
|
82
57
|
}
|
|
58
|
+
console.debug("SUBMITTED", response);
|
|
59
|
+
};
|
|
60
|
+
if (!submitted)
|
|
61
|
+
check();
|
|
62
|
+
}, [submitted]);
|
|
63
|
+
useEffect(() => {
|
|
64
|
+
if (!submitted)
|
|
65
|
+
return;
|
|
66
|
+
if ((success || verified) && !verificationError) {
|
|
67
|
+
console.log("LOGGING IN", success, verified, verificationError);
|
|
68
|
+
setTimeout(gotoNextPage, 3000);
|
|
69
|
+
}
|
|
70
|
+
else {
|
|
71
|
+
console.log("LOGGING OUT", success, verified, verificationError);
|
|
72
|
+
setTimeout(() => {
|
|
73
|
+
setUserIdentity(undefined);
|
|
74
|
+
gotoNextPage();
|
|
75
|
+
}, 3000);
|
|
83
76
|
}
|
|
84
|
-
}, [
|
|
77
|
+
}, [verified, verificationError, success, submitted]);
|
|
78
|
+
useEffect(() => {
|
|
79
|
+
if (errors)
|
|
80
|
+
setVerificationError(errors);
|
|
81
|
+
}, [errors]);
|
|
82
|
+
// useEffect(() => {
|
|
83
|
+
// if (!data && !submitted && oobCode) {
|
|
84
|
+
// submit();
|
|
85
|
+
// return;
|
|
86
|
+
// }
|
|
87
|
+
// // verification successful but user in context is not verified
|
|
88
|
+
// // or mismatch between logged in user and user associated with oobCode
|
|
89
|
+
// if (submitted) {
|
|
90
|
+
// console.debug("in submit condition");
|
|
91
|
+
// if (email && email !== oobEmail) {
|
|
92
|
+
// console.debug("email mismatch");
|
|
93
|
+
// logout();
|
|
94
|
+
// return;
|
|
95
|
+
// // Already verified, begin redirect
|
|
96
|
+
// }
|
|
97
|
+
// if (verified) {
|
|
98
|
+
// if (!verificationError) setSuccess(true);
|
|
99
|
+
// console.debug("verified");
|
|
100
|
+
// setTimeout(() => {
|
|
101
|
+
// gotoNextPage();
|
|
102
|
+
// setSubmitted(false);
|
|
103
|
+
// }, 3000);
|
|
104
|
+
// return;
|
|
105
|
+
// }
|
|
106
|
+
// }
|
|
107
|
+
// }, [submitted, verificationError, data, email, oobCode, oobEmail, submit]);
|
|
85
108
|
return {
|
|
86
109
|
states: {
|
|
87
110
|
loading: loading || disableContinue,
|
|
@@ -1504,8 +1504,8 @@ function LinkButtonView(props) {
|
|
|
1504
1504
|
h$1("style", { type: "text/css" },
|
|
1505
1505
|
styleString$1,
|
|
1506
1506
|
vanillaStyle),
|
|
1507
|
-
h$1("sl-button", { type: "primary", exportparts: "base: primarybutton-base" },
|
|
1508
|
-
h$1("a", {
|
|
1507
|
+
h$1("sl-button", { onClick: onClick, type: "primary", exportparts: "base: primarybutton-base" },
|
|
1508
|
+
h$1("a", { class: sheet$1.classes.Link, part: "sqm-link" }, buttonText))));
|
|
1509
1509
|
}
|
|
1510
1510
|
|
|
1511
1511
|
const LinkButton = class {
|
|
@@ -14,12 +14,11 @@ function setSubmitted(submitted) {
|
|
|
14
14
|
window[SUBMITTED_CONTEXT] = submitted;
|
|
15
15
|
}
|
|
16
16
|
function usePortalVerifyEmail({ nextPage, failedPage, verifySuccessText, verifyEmailText, verifyInvalidText, networkErrorMessage, continueText, }) {
|
|
17
|
-
var
|
|
17
|
+
var _b, _c, _d, _e, _f, _g, _h, _j;
|
|
18
18
|
const submitted = window[SUBMITTED_CONTEXT];
|
|
19
19
|
const userIdent = Q();
|
|
20
20
|
const [verificationError, setVerificationError] = useState(null);
|
|
21
21
|
const [success, setSuccess] = useState(false);
|
|
22
|
-
const email = (_a = userIdent === null || userIdent === void 0 ? void 0 : userIdent.managedIdentity) === null || _a === void 0 ? void 0 : _a.email;
|
|
23
22
|
const [request, { loading, data, errors }] = an();
|
|
24
23
|
const urlParams = new URLSearchParams($n.location.search);
|
|
25
24
|
const oobCode = urlParams.get("oobCode");
|
|
@@ -41,54 +40,77 @@ function usePortalVerifyEmail({ nextPage, failedPage, verifySuccessText, verifyE
|
|
|
41
40
|
const url = sanitizeUrlPath(nextPageOverride || nextPage);
|
|
42
41
|
$n.push(url.href);
|
|
43
42
|
};
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
var _a;
|
|
54
|
-
setSubmitted(true);
|
|
55
|
-
const response = await request({ oobCode });
|
|
56
|
-
if (response instanceof Error ||
|
|
57
|
-
!((_a = response === null || response === void 0 ? void 0 : response.verifyManagedIdentityEmail) === null || _a === void 0 ? void 0 : _a.success)) {
|
|
58
|
-
setVerificationError({ message: true });
|
|
59
|
-
}
|
|
60
|
-
console.debug("SUBMITTED", response);
|
|
61
|
-
};
|
|
62
|
-
console.log({ hasContext, userIdent, data, submitted, verified, errors });
|
|
63
|
-
useEffect(() => {
|
|
64
|
-
if (errors && !verified)
|
|
65
|
-
setVerificationError(errors);
|
|
66
|
-
}, [errors, verified]);
|
|
43
|
+
console.log({
|
|
44
|
+
hasContext,
|
|
45
|
+
userIdent,
|
|
46
|
+
data,
|
|
47
|
+
submitted,
|
|
48
|
+
verified,
|
|
49
|
+
verificationError,
|
|
50
|
+
success,
|
|
51
|
+
});
|
|
67
52
|
useEffect(() => {
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
console.debug("email mismatch");
|
|
76
|
-
logout();
|
|
77
|
-
return;
|
|
78
|
-
// Already verified, begin redirect
|
|
53
|
+
const check = async () => {
|
|
54
|
+
var _a;
|
|
55
|
+
setSubmitted(true);
|
|
56
|
+
const response = await request({ oobCode });
|
|
57
|
+
if (response instanceof Error ||
|
|
58
|
+
!((_a = response === null || response === void 0 ? void 0 : response.verifyManagedIdentityEmail) === null || _a === void 0 ? void 0 : _a.success)) {
|
|
59
|
+
setVerificationError({ message: true });
|
|
79
60
|
}
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
setSuccess(true);
|
|
83
|
-
console.debug("verified");
|
|
84
|
-
setTimeout(() => {
|
|
85
|
-
gotoNextPage();
|
|
86
|
-
setSubmitted(false);
|
|
87
|
-
}, 3000);
|
|
88
|
-
return;
|
|
61
|
+
else {
|
|
62
|
+
setSuccess(true);
|
|
89
63
|
}
|
|
64
|
+
console.debug("SUBMITTED", response);
|
|
65
|
+
};
|
|
66
|
+
if (!submitted)
|
|
67
|
+
check();
|
|
68
|
+
}, [submitted]);
|
|
69
|
+
useEffect(() => {
|
|
70
|
+
if (!submitted)
|
|
71
|
+
return;
|
|
72
|
+
if ((success || verified) && !verificationError) {
|
|
73
|
+
console.log("LOGGING IN", success, verified, verificationError);
|
|
74
|
+
setTimeout(gotoNextPage, 3000);
|
|
75
|
+
}
|
|
76
|
+
else {
|
|
77
|
+
console.log("LOGGING OUT", success, verified, verificationError);
|
|
78
|
+
setTimeout(() => {
|
|
79
|
+
setUserIdentity(undefined);
|
|
80
|
+
gotoNextPage();
|
|
81
|
+
}, 3000);
|
|
90
82
|
}
|
|
91
|
-
}, [
|
|
83
|
+
}, [verified, verificationError, success, submitted]);
|
|
84
|
+
useEffect(() => {
|
|
85
|
+
if (errors)
|
|
86
|
+
setVerificationError(errors);
|
|
87
|
+
}, [errors]);
|
|
88
|
+
// useEffect(() => {
|
|
89
|
+
// if (!data && !submitted && oobCode) {
|
|
90
|
+
// submit();
|
|
91
|
+
// return;
|
|
92
|
+
// }
|
|
93
|
+
// // verification successful but user in context is not verified
|
|
94
|
+
// // or mismatch between logged in user and user associated with oobCode
|
|
95
|
+
// if (submitted) {
|
|
96
|
+
// console.debug("in submit condition");
|
|
97
|
+
// if (email && email !== oobEmail) {
|
|
98
|
+
// console.debug("email mismatch");
|
|
99
|
+
// logout();
|
|
100
|
+
// return;
|
|
101
|
+
// // Already verified, begin redirect
|
|
102
|
+
// }
|
|
103
|
+
// if (verified) {
|
|
104
|
+
// if (!verificationError) setSuccess(true);
|
|
105
|
+
// console.debug("verified");
|
|
106
|
+
// setTimeout(() => {
|
|
107
|
+
// gotoNextPage();
|
|
108
|
+
// setSubmitted(false);
|
|
109
|
+
// }, 3000);
|
|
110
|
+
// return;
|
|
111
|
+
// }
|
|
112
|
+
// }
|
|
113
|
+
// }, [submitted, verificationError, data, email, oobCode, oobEmail, submit]);
|
|
92
114
|
return {
|
|
93
115
|
states: {
|
|
94
116
|
loading: loading || disableContinue,
|
|
@@ -7601,7 +7601,7 @@ const PortalResetPassword = /*#__PURE__*/Object.freeze({
|
|
|
7601
7601
|
CodeValidating: CodeValidating
|
|
7602
7602
|
});
|
|
7603
7603
|
|
|
7604
|
-
const scenario$9 = "@author:derek\n@owner:ian\nFeature: Verify Email\n\n Background: A user is on the email verification page\n Given a user who has been redirected to the email verification page\n\n @motivating\n Scenario: Verifying your email takes you to the portal login page\n Given a user has a valid oob code as a url query parameter\n When they click \"Verify Email\"\n Then the button enters a loading state\n When their email is validated\n Then a button that says \"Continue\" appears\n When they click \"Continue\"\n Then they are redirected to login\n\n @motivating\n Scenario: Users are automatically redirected if they dont click \"Continue\"\n Given a user has a valid oob code as a url query parameter\n When they click \"Verify Email\"\n Then the button enters a loading state\n When their email is validated\n Then a button that says \"Continue\" appears\n When they wait 5 seconds\n Then they are redirected to login\n\n @motivating\n Scenario: Users are notified if verifying their email has failed\n Given a user has a valid oob code as a url query parameter\n When they click \"Verify Email\"\n Then the button enters a loading state\n When their email fails to be validated\n Then an banner is shown stating that an error occured\n\n @motivating\n Scenario Outline: Users cannot verify their email with an invalid or missing oob code\n Given a user has a <oobCode> as a url query parameter\n And the component <mayHave> \"failed-page\" with <value>\n Then they see an error message saying that their verification code is invalid/expired\n When they click \"Continue\"\n Then they are redirected to <redirectPath>\n Examples:\n | oobCode | mayHave | value | redirectPath |\n | invalid oob code | doesn't have | N/A | / |\n | non existant oob code | doesn't have | N/A | / |\n | invalid oob code | has | /login | /login |\n | non existant oob code | has | /login | /login |\n\n @motivating\n Scenario: Users are redirected to \"/\" by default\n Given the component does not have prop \"nextPage\"\n And the users url does not contain a \"nextPage\" query parameter\n And a user has verified their email\n When they click \"Continue\"\n Then they are redirected to \"/\"\n\n @motivating\n Scenario: Custom redirection can be configured\n Given the component has prop \"nextPage\" with value \"/activity\"\n And the users url does not contain a \"nextPage\" query parameter\n And a user has verified their email\n When they click \"Continue\"\n Then they are redirected to \"/activity\"\n\n @motivating\n Scenario Outline: Users are redirected to the value of the nextPage url parameter if it exists\n Given the component <mayHave> prop \"nextPage\" with <nextPageValue>\n And the users url contains a \"nextPage\" query paramater with <nextPageParamValue>\n And the user has verified their email\n When they click \"Continue\"\n Then they are redirected to <nextPageParamValue>\n Examples:\n | mayHave | nextPageValue | nextPageParamValue |\n | has | /dashboard | /activity |\n | does not have | N/A | /activity |\n\n @motivating\n Scenario Outline: Users are redirected to the value of the nextPage url parameter as if it were a relative path\n Given the component is loaded at <currentUrl>\n And the user has verified their email\n When they click \"Continue\"\n And they are redirected to <url>\n Examples:\n | currentUrl | url |\n | https://www.example.com?nextPage=./activity | https://www.example.com/activity |\n | https://www.example.com?nextPage=activity | https://www.example.com/activity |\n | https://www.example.com?nextPage=/activity | https://www.example.com/activity |\n | https://www.example.com?nextPage=www.google.com | https://www.example.com/www.google.com |\n | https://www.example.com?nextPage=//foo.com | https://www.example.com/ |\n | https://www.example.com?nextPage=https://malicious.example.com | https://www.example.com/ |\n | http://www.example.com/nest/page?oob=123&other&nextPage=activity#heading-1 | http://www.example.com/activity |\n | https://www.example.com?nextPage=activity?foo=bar | https://www.example.com/activity?foo=bar |\n | https://www.example.com?nextPage=%2Factivity%3Ffoo%3Dbar | https://www.example.com/activity?foo=bar |\n | https://www.example.com?nextPage=%2Factivity%3Ffoo%3Dbar#hash | https://www.example.com/activity?foo=bar |\n | https://www.example.com?nextPage=%2Factivity%3Ffoo%3Dbar%23hash | https://www.example.com/activity?foo=bar#hash |\n | https://www.example.com:1337?nextPage=activity | https://www.example.com:1337/activity |\n | http://1.1.1.1:1111?nextPage=activity | http://1.1.1.1:1111/activity |\n\n @landmine\n Scenario Outline: Username and password are not persisted on redirects\n Given the component is loaded at <currentUrl>\n And the user has verified their email\n When they click \"Continue\"\n And they are redirected to <url>\n Examples:\n | currentUrl | url |\n | https://user:pass@www.example.com:444?nextPage=activity | https://www.example.com:444/activity |\n\n\n
|
|
7604
|
+
const scenario$9 = "@author:derek\n@owner:ian\nFeature: Verify Email\n\n Background: A user is on the email verification page\n Given a user who has been redirected to the email verification page\n\n @motivating\n Scenario: Verifying your email takes you to the portal login page\n Given a user has a valid oob code as a url query parameter\n When they click \"Verify Email\"\n Then the button enters a loading state\n When their email is validated\n Then a button that says \"Continue\" appears\n When they click \"Continue\"\n Then they are redirected to login\n\n @motivating\n Scenario: Users are automatically redirected if they dont click \"Continue\"\n Given a user has a valid oob code as a url query parameter\n When they click \"Verify Email\"\n Then the button enters a loading state\n When their email is validated\n Then a button that says \"Continue\" appears\n When they wait 5 seconds\n Then they are redirected to login\n\n @motivating\n Scenario: Users are notified if verifying their email has failed\n Given a user has a valid oob code as a url query parameter\n When they click \"Verify Email\"\n Then the button enters a loading state\n When their email fails to be validated\n Then an banner is shown stating that an error occured\n\n @motivating\n Scenario Outline: Users cannot verify their email with an invalid or missing oob code\n Given a user has a <oobCode> as a url query parameter\n And the component <mayHave> \"failed-page\" with <value>\n Then they see an error message saying that their verification code is invalid/expired\n When they click \"Continue\"\n Then they are redirected to <redirectPath>\n Examples:\n | oobCode | mayHave | value | redirectPath |\n | invalid oob code | doesn't have | N/A | / |\n | non existant oob code | doesn't have | N/A | / |\n | invalid oob code | has | /login | /login |\n | non existant oob code | has | /login | /login |\n\n @motivating\n Scenario: Users are redirected to \"/\" by default\n Given the component does not have prop \"nextPage\"\n And the users url does not contain a \"nextPage\" query parameter\n And a user has verified their email\n When they click \"Continue\"\n Then they are redirected to \"/\"\n\n @motivating\n Scenario: Custom redirection can be configured\n Given the component has prop \"nextPage\" with value \"/activity\"\n And the users url does not contain a \"nextPage\" query parameter\n And a user has verified their email\n When they click \"Continue\"\n Then they are redirected to \"/activity\"\n\n @motivating\n Scenario Outline: Users are redirected to the value of the nextPage url parameter if it exists\n Given the component <mayHave> prop \"nextPage\" with <nextPageValue>\n And the users url contains a \"nextPage\" query paramater with <nextPageParamValue>\n And the user has verified their email\n When they click \"Continue\"\n Then they are redirected to <nextPageParamValue>\n Examples:\n | mayHave | nextPageValue | nextPageParamValue |\n | has | /dashboard | /activity |\n | does not have | N/A | /activity |\n\n @motivating\n Scenario Outline: Users are redirected to the value of the nextPage url parameter as if it were a relative path\n Given the component is loaded at <currentUrl>\n And the user has verified their email\n When they click \"Continue\"\n And they are redirected to <url>\n Examples:\n | currentUrl | url |\n | https://www.example.com?nextPage=./activity | https://www.example.com/activity |\n | https://www.example.com?nextPage=activity | https://www.example.com/activity |\n | https://www.example.com?nextPage=/activity | https://www.example.com/activity |\n | https://www.example.com?nextPage=www.google.com | https://www.example.com/www.google.com |\n | https://www.example.com?nextPage=//foo.com | https://www.example.com/ |\n | https://www.example.com?nextPage=https://malicious.example.com | https://www.example.com/ |\n | http://www.example.com/nest/page?oob=123&other&nextPage=activity#heading-1 | http://www.example.com/activity |\n | https://www.example.com?nextPage=activity?foo=bar | https://www.example.com/activity?foo=bar |\n | https://www.example.com?nextPage=%2Factivity%3Ffoo%3Dbar | https://www.example.com/activity?foo=bar |\n | https://www.example.com?nextPage=%2Factivity%3Ffoo%3Dbar#hash | https://www.example.com/activity?foo=bar |\n | https://www.example.com?nextPage=%2Factivity%3Ffoo%3Dbar%23hash | https://www.example.com/activity?foo=bar#hash |\n | https://www.example.com:1337?nextPage=activity | https://www.example.com:1337/activity |\n | http://1.1.1.1:1111?nextPage=activity | http://1.1.1.1:1111/activity |\n\n @landmine\n Scenario Outline: Username and password are not persisted on redirects\n Given the component is loaded at <currentUrl>\n And the user has verified their email\n When they click \"Continue\"\n And they are redirected to <url>\n Examples:\n | currentUrl | url |\n | https://user:pass@www.example.com:444?nextPage=activity | https://www.example.com:444/activity |\n\n\n @minutia\n Scenario Outline: Users may be logged in or logged out depending on the verified status and logged in email\n Given an oobCode with email <oobCodeEmail> as a url query parameter\n And the user is logged in as <loggedInEmail>\n And the logged in user <isVerified>\n When the oobCode is submitted\n And the oobCode <isValid>\n Then the <submitState> screen is shown\n And after 3 seconds pass\n Then the user is redirected to <redirect>\n Examples:\n | oobCodeEmail | loggedInEmail | isVerified | isValid | submitState | redirect |\n | user1@example.com | N/A | false | is valid | success | /login |\n | user1@example.com | N/A | false | is not valid | error | /login |\n | user1@example.com | user1@example.com | false | is valid | success | /activity |\n | user1@example.com | user1@example.com | false | is not valid | error | N/A |\n | user1@example.com | user2@example.com | false | is valid | success | /login |\n | user1@example.com | user2@example.com | false | is not valid | error | /login |\n | user1@example.com | user1@example.com | true | is valid | success | /activity |\n | user1@example.com | user1@example.com | true | is not valid | success | /activity |\n | user1@example.com | user2@example.com | true | is not valid | error | /login |\n | N/A | N/A | false | is not valid | error | N/A |\n";
|
|
7605
7605
|
|
|
7606
7606
|
const PortalVerifyEmail_stories = {
|
|
7607
7607
|
title: "Components/Microsite Verify Email",
|
|
@@ -9953,7 +9953,7 @@ const ResetPasswordReadme = "# sqm-portal-reset-password\n\n\n\n<!-- Auto Genera
|
|
|
9953
9953
|
|
|
9954
9954
|
const EmailVerificationReadme = "# sqm-portal-email-verification\n\n\n\n<!-- Auto Generated Below -->\n\n\n## Properties\n\n| Property | Attribute | Description | Type | Default |\n| ---------------------------- | ------------------------------ | ----------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| `demoData` | -- | | `{ states?: { error: string; loading: boolean; success: boolean; isVerified?: boolean; loadingVerification?: boolean; countdown?: number; }; content?: { email: string; verifyMessage: string; emailVerificationHeader: string; resendEmailButtonText: string; verificationStatusMessage?: string; verificationLoadingMessage?: string; verificationResentMessage?: string; }; }` | `undefined` |\n| `emailVerificationHeader` | `email-verification-header` | | `string` | `\"Verify your email\"` |\n| `networkErrorMessage` | `network-error-message` | | `string` | `\"An error occurred while verifying your password. Please refresh the page.\"` |\n| `redirectPath` | `redirect-path` | Redirect participants to this page from their verification email. | `string` | `\"/verifyEmail\"` |\n| `resendEmailButtonText` | `resend-email-button-text` | | `string` | `\"Re-send Email\"` |\n| `verificationLoadingMessage` | `verification-loading-message` | | `string` | `\"Checking verification status\"` |\n| `verificationResentMessage` | `verification-resent-message` | | `string` | `\"Your verification email has been resent successfully\"` |\n| `verificationStatusMessage` | `verification-status-message` | | `string` | `\"Checking verification status in {countdown}\"` |\n| `verifyMessage` | `verify-message` | | `string` | `\"A verification email was sent to {email}. Please verify your email to continue to the portal. Resending an email will invalidate the previous email.\"` |\n\n\n## Dependencies\n\n### Depends on\n\n- [sqm-form-message](../sqm-form-message)\n\n### Graph\n```mermaid\ngraph TD;\n sqm-portal-email-verification --> sqm-form-message\n style sqm-portal-email-verification fill:#f9f,stroke:#333,stroke-width:4px\n```\n\n----------------------------------------------\n\n*Built with [StencilJS](https://stenciljs.com/)*\n";
|
|
9955
9955
|
|
|
9956
|
-
const EmailVerifiedReadme = "# sqm-portal-verify-email\n\n\n\n<!-- Auto Generated Below -->\n\n\n## Properties\n\n| Property | Attribute | Description | Type
|
|
9956
|
+
const EmailVerifiedReadme = "# sqm-portal-verify-email\n\n\n\n<!-- Auto Generated Below -->\n\n\n## Properties\n\n| Property | Attribute | Description | Type | Default |\n| --------------------- | ----------------------- | ------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- |\n| `continueText` | `continue-text` | | `string` | `\"Continue\"` |\n| `demoData` | -- | | `{ states?: { error: string; loading: boolean; success: boolean; verified: boolean; }; data?: { oobCode: string; }; content?: { verifySuccessText?: string; verifyEmailText?: string; verifyInvalidText?: string; continueText?: string; }; }` | `undefined` |\n| `failedPage` | `failed-page` | Redirect participants to this page if verification fails due to an outdated verification attempt. | `string` | `\"/\"` |\n| `networkErrorMessage` | `network-error-message` | | `string` | `\"An error occurred while verifying your email. Please refresh the page and try again.\"` |\n| `nextPage` | `next-page` | Redirect participants to this page when they successfully verify their email. | `string` | `\"/\"` |\n| `verifyEmailText` | `verify-email-text` | | `string` | `\"Verify your email\"` |\n| `verifyInvalidText` | `verify-invalid-text` | | `string` | `\"The email verification code is invalid or has expired, please try again.\"` |\n| `verifySuccessText` | `verify-success-text` | | `string` | `\"Your email has been verified and you are being redirected. If you are not redirected, please click Continue.\"` |\n\n\n## Dependencies\n\n### Depends on\n\n- [sqm-form-message](../sqm-form-message)\n\n### Graph\n```mermaid\ngraph TD;\n sqm-portal-verify-email --> sqm-form-message\n style sqm-portal-verify-email fill:#f9f,stroke:#333,stroke-width:4px\n```\n\n----------------------------------------------\n\n*Built with [StencilJS](https://stenciljs.com/)*\n";
|
|
9957
9957
|
|
|
9958
9958
|
const PortalTemplates_stories = {
|
|
9959
9959
|
title: "Templates / Microsite",
|