@saasquatch/mint-components 1.7.3-0 → 1.7.3-2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{ShadowViewAddon-496b2f3d.js → ShadowViewAddon-250836ad.js} +4 -4
- package/dist/cjs/{global-a1394707.js → global-6785de71.js} +1 -1
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/mint-components.cjs.js +2 -2
- package/dist/cjs/sqm-big-stat_39.cjs.entry.js +68 -2
- package/dist/cjs/sqm-leaderboard-rank.cjs.entry.js +1 -1
- package/dist/cjs/sqm-password-field.cjs.entry.js +41 -16
- package/dist/cjs/{sqm-portal-email-verification-view-f76bcd38.js → sqm-portal-email-verification-view-0bd4a2c2.js} +3 -3
- package/dist/cjs/sqm-portal-email-verification.cjs.entry.js +8 -2
- package/dist/cjs/{sqm-portal-profile-view-f9daa7c4.js → sqm-portal-profile-view-13a1229f.js} +1 -1
- package/dist/cjs/sqm-portal-profile.cjs.entry.js +2 -2
- package/dist/cjs/sqm-portal-registration-form.cjs.entry.js +39 -1
- package/dist/cjs/{sqm-portal-reset-password-view-d5bc7afc.js → sqm-portal-reset-password-view-7680fc87.js} +1 -1
- package/dist/cjs/sqm-portal-reset-password.cjs.entry.js +37 -1
- package/dist/cjs/{sqm-portal-verify-email-view-f6c7287e.js → sqm-portal-verify-email-view-200752cb.js} +4 -4
- package/dist/cjs/sqm-portal-verify-email.cjs.entry.js +31 -6
- package/dist/cjs/sqm-referral-table_11.cjs.entry.js +1 -1
- package/dist/cjs/sqm-rewards-table_9.cjs.entry.js +1 -1
- package/dist/cjs/sqm-stencilbook.cjs.entry.js +37 -30
- package/dist/collection/components/sqm-password-field/passwordValidation.js +11 -11
- package/dist/collection/components/sqm-password-field/sqm-password-field.js +155 -4
- package/dist/collection/components/sqm-password-field/usePasswordField.js +1 -1
- package/dist/collection/components/sqm-portal-change-password/sqm-portal-change-password-view.js +1 -1
- package/dist/collection/components/sqm-portal-change-password/sqm-portal-change-password.js +157 -1
- package/dist/collection/components/sqm-portal-change-password/usePortalChangePassword.js +6 -0
- package/dist/collection/components/sqm-portal-container/PortalContainer.stories.js +7 -7
- package/dist/collection/components/sqm-portal-email-verification/sqm-portal-email-verification-view.js +2 -2
- package/dist/collection/components/sqm-portal-email-verification/sqm-portal-email-verification.js +31 -1
- package/dist/collection/components/sqm-portal-register/sqm-portal-register-view.js +1 -1
- package/dist/collection/components/sqm-portal-register/sqm-portal-register.js +157 -1
- package/dist/collection/components/sqm-portal-registration-form/sqm-portal-registration-form-view.js +1 -1
- package/dist/collection/components/sqm-portal-registration-form/sqm-portal-registration-form.js +184 -1
- package/dist/collection/components/sqm-portal-registration-form/usePortalRegistrationForm.js +3 -1
- package/dist/collection/components/sqm-portal-reset-password/sqm-portal-reset-password-view.js +2 -2
- package/dist/collection/components/sqm-portal-reset-password/sqm-portal-reset-password.js +157 -1
- package/dist/collection/components/sqm-portal-reset-password/usePortalResetPassword.js +6 -0
- package/dist/collection/components/sqm-portal-verify-email/PortalVerifyEmail.stories.js +6 -0
- package/dist/collection/components/sqm-portal-verify-email/sqm-portal-verify-email-view.js +4 -4
- package/dist/collection/components/sqm-portal-verify-email/sqm-portal-verify-email.js +98 -5
- package/dist/collection/components/sqm-portal-verify-email/usePortalVerifyEmail.js +6 -1
- package/dist/collection/components/sqm-referral-card/ReferralCard.stories.js +1 -1
- package/dist/collection/components/sqm-share-button/ShareButton.stories.js +2 -1
- package/dist/collection/components/sqm-share-button/sqm-share-button-view.js +1 -1
- package/dist/collection/global/global.js +1 -1
- package/dist/collection/stories/NewPortal.stories.js +1 -1
- package/dist/esm/{ShadowViewAddon-e72b97e8.js → ShadowViewAddon-6dc295a1.js} +4 -4
- package/dist/esm/{global-f52ccc56.js → global-91edfca0.js} +1 -1
- package/dist/esm/loader.js +2 -2
- package/dist/esm/mint-components.js +2 -2
- package/dist/esm/sqm-big-stat_39.entry.js +68 -2
- package/dist/esm/sqm-leaderboard-rank.entry.js +1 -1
- package/dist/esm/sqm-password-field.entry.js +41 -16
- package/dist/esm/{sqm-portal-email-verification-view-5a91d65e.js → sqm-portal-email-verification-view-97097335.js} +3 -3
- package/dist/esm/sqm-portal-email-verification.entry.js +8 -2
- package/dist/esm/{sqm-portal-profile-view-8ba6a73e.js → sqm-portal-profile-view-efa44888.js} +1 -1
- package/dist/esm/sqm-portal-profile.entry.js +2 -2
- package/dist/esm/sqm-portal-registration-form.entry.js +40 -2
- package/dist/esm/{sqm-portal-reset-password-view-0df781f6.js → sqm-portal-reset-password-view-cdbf99dc.js} +1 -1
- package/dist/esm/sqm-portal-reset-password.entry.js +37 -1
- package/dist/esm/{sqm-portal-verify-email-view-1db4fae6.js → sqm-portal-verify-email-view-723687ca.js} +4 -4
- package/dist/esm/sqm-portal-verify-email.entry.js +32 -7
- package/dist/esm/sqm-referral-table_11.entry.js +1 -1
- package/dist/esm/sqm-rewards-table_9.entry.js +1 -1
- package/dist/esm/sqm-stencilbook.entry.js +37 -30
- package/dist/esm-es5/ShadowViewAddon-6dc295a1.js +1 -0
- package/dist/esm-es5/{global-f52ccc56.js → global-91edfca0.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_39.entry.js +1 -1
- package/dist/esm-es5/sqm-leaderboard-rank.entry.js +1 -1
- package/dist/esm-es5/sqm-password-field.entry.js +1 -1
- package/dist/esm-es5/{sqm-portal-email-verification-view-5a91d65e.js → sqm-portal-email-verification-view-97097335.js} +1 -1
- package/dist/esm-es5/sqm-portal-email-verification.entry.js +1 -1
- package/dist/esm-es5/{sqm-portal-profile-view-8ba6a73e.js → sqm-portal-profile-view-efa44888.js} +1 -1
- package/dist/esm-es5/sqm-portal-profile.entry.js +1 -1
- package/dist/esm-es5/sqm-portal-registration-form.entry.js +1 -1
- package/dist/esm-es5/{sqm-portal-reset-password-view-0df781f6.js → sqm-portal-reset-password-view-cdbf99dc.js} +1 -1
- package/dist/esm-es5/sqm-portal-reset-password.entry.js +1 -1
- package/dist/esm-es5/sqm-portal-verify-email-view-723687ca.js +1 -0
- package/dist/esm-es5/sqm-portal-verify-email.entry.js +1 -1
- package/dist/esm-es5/sqm-referral-table_11.entry.js +1 -1
- package/dist/esm-es5/sqm-rewards-table_9.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/mint-components.js +1 -1
- package/dist/mint-components/p-03c4d81a.js +1 -0
- package/dist/mint-components/{p-d76926d9.entry.js → p-05f069ce.entry.js} +2 -2
- package/dist/mint-components/p-061d90bc.system.entry.js +1 -0
- package/dist/mint-components/p-0943b547.system.js +1 -0
- package/dist/mint-components/p-418362a9.entry.js +9 -0
- package/dist/mint-components/{p-ef3d226e.js → p-42844992.js} +1 -1
- package/dist/mint-components/p-4dae1dcc.system.js +1 -0
- package/dist/mint-components/p-4eca24af.js +1 -0
- package/dist/mint-components/p-50daed57.entry.js +13 -0
- package/dist/mint-components/p-59a505e1.entry.js +1 -0
- package/dist/mint-components/p-59e4c214.system.entry.js +1 -0
- package/dist/mint-components/p-5e9e9a29.system.entry.js +1 -0
- package/dist/mint-components/p-6354c559.system.entry.js +1 -0
- package/dist/mint-components/{p-4d182391.system.entry.js → p-66e3cb0c.system.entry.js} +1 -1
- package/dist/mint-components/p-69a7558a.system.entry.js +1 -0
- package/dist/mint-components/p-6d1a2821.system.entry.js +1 -0
- package/dist/mint-components/p-72c9fbf6.system.entry.js +1 -0
- package/dist/mint-components/p-78027dd0.system.js +1 -0
- package/dist/mint-components/p-9142d62b.entry.js +1 -0
- package/dist/mint-components/p-97519743.entry.js +1 -0
- package/dist/mint-components/{p-1d09e590.system.js → p-9f3a0252.system.js} +1 -1
- package/dist/mint-components/p-a40b01d5.js +1 -0
- package/dist/mint-components/p-af302aa3.entry.js +1 -0
- package/dist/mint-components/{p-c23d7c11.entry.js → p-b0ef4f17.entry.js} +1 -1
- package/dist/mint-components/{p-f61e80c2.entry.js → p-b0f3c6c5.entry.js} +3 -3
- package/dist/mint-components/p-ce922d94.system.entry.js +1 -0
- package/dist/mint-components/p-d29c820c.system.js +1 -0
- package/dist/mint-components/{p-2c9e0e83.entry.js → p-dc72e7e9.entry.js} +10 -10
- package/dist/mint-components/{p-77c999fb.system.entry.js → p-e49392c3.system.entry.js} +1 -1
- package/dist/mint-components/{p-10106ee1.js → p-eab33344.js} +1 -1
- package/dist/mint-components/{p-5303ae94.system.entry.js → p-ed9374ef.system.entry.js} +1 -1
- package/dist/mint-components/{p-c434bfdf.entry.js → p-ef6a3ff3.entry.js} +2 -2
- package/dist/mint-components/{p-3475b8a5.system.js → p-f63961b4.system.js} +1 -1
- package/dist/mint-components/p-f8f278e9.js +379 -0
- package/dist/mint-components/p-fc51a087.system.js +1 -0
- package/dist/types/components/sqm-password-field/passwordValidation.d.ts +1 -1
- package/dist/types/components/sqm-password-field/sqm-password-field.d.ts +24 -0
- package/dist/types/components/sqm-portal-change-password/sqm-portal-change-password-view.d.ts +6 -0
- package/dist/types/components/sqm-portal-change-password/sqm-portal-change-password.d.ts +24 -0
- package/dist/types/components/sqm-portal-change-password/usePortalChangePassword.d.ts +6 -0
- package/dist/types/components/sqm-portal-email-verification/sqm-portal-email-verification-view.d.ts +1 -0
- package/dist/types/components/sqm-portal-email-verification/sqm-portal-email-verification.d.ts +5 -0
- package/dist/types/components/sqm-portal-register/sqm-portal-register-view.d.ts +6 -0
- package/dist/types/components/sqm-portal-register/sqm-portal-register.d.ts +24 -0
- package/dist/types/components/sqm-portal-registration-form/sqm-portal-registration-form-view.d.ts +6 -0
- package/dist/types/components/sqm-portal-registration-form/sqm-portal-registration-form.d.ts +30 -0
- package/dist/types/components/sqm-portal-reset-password/sqm-portal-reset-password-view.d.ts +6 -0
- package/dist/types/components/sqm-portal-reset-password/sqm-portal-reset-password.d.ts +24 -0
- package/dist/types/components/sqm-portal-verify-email/sqm-portal-verify-email-view.d.ts +5 -0
- package/dist/types/components/sqm-portal-verify-email/sqm-portal-verify-email.d.ts +15 -0
- package/dist/types/components/sqm-portal-verify-email/usePortalVerifyEmail.d.ts +9 -1
- package/dist/types/components.d.ts +290 -0
- package/docs/docs.docx +0 -0
- package/docs/raisins.json +1 -1
- package/grapesjs/grapesjs.js +1 -1
- package/package.json +1 -1
- package/dist/esm-es5/ShadowViewAddon-e72b97e8.js +0 -1
- package/dist/esm-es5/sqm-portal-verify-email-view-1db4fae6.js +0 -1
- package/dist/mint-components/p-13570402.system.entry.js +0 -1
- package/dist/mint-components/p-1bd0df11.system.entry.js +0 -1
- package/dist/mint-components/p-1ec9f519.system.entry.js +0 -1
- package/dist/mint-components/p-1edee42d.system.js +0 -1
- package/dist/mint-components/p-1fca04d5.system.js +0 -1
- package/dist/mint-components/p-3b96c230.system.js +0 -1
- package/dist/mint-components/p-46be1518.system.js +0 -1
- package/dist/mint-components/p-54a0c1df.entry.js +0 -1
- package/dist/mint-components/p-56525896.system.js +0 -1
- package/dist/mint-components/p-57a89487.entry.js +0 -1
- package/dist/mint-components/p-75ddf3ca.js +0 -1
- package/dist/mint-components/p-82e8eae6.system.entry.js +0 -1
- package/dist/mint-components/p-8488d11d.js +0 -1
- package/dist/mint-components/p-84ee5462.system.entry.js +0 -1
- package/dist/mint-components/p-8ab5b0bc.js +0 -379
- package/dist/mint-components/p-9a74f167.entry.js +0 -13
- package/dist/mint-components/p-abfb3897.system.entry.js +0 -1
- package/dist/mint-components/p-b9c7b7ef.entry.js +0 -1
- package/dist/mint-components/p-cd52f14d.system.entry.js +0 -1
- package/dist/mint-components/p-e058ba88.entry.js +0 -1
- package/dist/mint-components/p-efd129de.js +0 -1
- package/dist/mint-components/p-f60d9f3e.system.entry.js +0 -1
- package/dist/mint-components/p-fc0da6f7.entry.js +0 -9
|
@@ -10,21 +10,15 @@ const passwordSchema = new PasswordValidator()
|
|
|
10
10
|
.lowercase() // Must have lowercase letters
|
|
11
11
|
.has(/([\d`~\!@#\$%\^\&\*\(\)\-_\=\+\[\{\}\]\\\|;:'",<.>\/\?€£¥₹§±].*){1,}/); // Must contain at least 1 digit or symbol
|
|
12
12
|
// Taken from combining https://github.com/tarunbatra/password-validator/blob/40184970e4f65efa8aed7a64185a011a3b5d0e54/src/constants.js#L9
|
|
13
|
-
export const validateNewPassword = (password) => {
|
|
13
|
+
export const validateNewPassword = (password, validationText) => {
|
|
14
14
|
const errors = passwordSchema.validate(password, { list: true });
|
|
15
|
-
const message = getErrorMessage(errors, password);
|
|
15
|
+
const message = getErrorMessage(errors, password, validationText);
|
|
16
16
|
return message;
|
|
17
17
|
};
|
|
18
18
|
const Valid = () => (h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "12", height: "12", viewBox: "0 0 12 12", fill: "none" },
|
|
19
19
|
h("path", { d: "M6 0C2.688 0 0 2.688 0 6C0 9.312 2.688 12 6 12C9.312 12 12 9.312 12 6C12 2.688 9.312 0 6 0ZM4.8 9L1.8 6L2.646 5.154L4.8 7.302L9.354 2.748L10.2 3.6L4.8 9Z", fill: "#259053" })));
|
|
20
20
|
const Invalid = () => (h("svg", { width: "12", height: "12", viewBox: "0 0 12 12", fill: "none", xmlns: "http://www.w3.org/2000/svg" },
|
|
21
21
|
h("path", { d: "M6 0C2.688 0 0 2.688 0 6C0 9.312 2.688 12 6 12C9.312 12 12 9.312 12 6C12 2.688 9.312 0 6 0ZM6 10.8C3.354 10.8 1.2 8.646 1.2 6C1.2 3.354 3.354 1.2 6 1.2C8.646 1.2 10.8 3.354 10.8 6C10.8 8.646 8.646 10.8 6 10.8ZM8.754 3.348L4.8 7.302L3.246 5.754L2.4 6.6L4.8 9L9.6 4.2L8.754 3.348Z", fill: "#555555" })));
|
|
22
|
-
const validationMessages = {
|
|
23
|
-
min: "be a minimum of 8 characters",
|
|
24
|
-
uppercase: "contain at least 1 uppercase character",
|
|
25
|
-
lowercase: "contain at least 1 lowercase character",
|
|
26
|
-
has: "contain at least 1 number or symbol",
|
|
27
|
-
};
|
|
28
22
|
const baseItem = {
|
|
29
23
|
display: "flex",
|
|
30
24
|
alignItems: "center",
|
|
@@ -56,16 +50,22 @@ const style = {
|
|
|
56
50
|
};
|
|
57
51
|
const sheet = createStyleSheet(style);
|
|
58
52
|
const styleString = sheet.toString();
|
|
59
|
-
const getErrorMessage = (errorKeys, password) => {
|
|
53
|
+
const getErrorMessage = (errorKeys, password, validationText) => {
|
|
54
|
+
const validationMessages = {
|
|
55
|
+
min: validationText.minErrorText,
|
|
56
|
+
uppercase: validationText.uppercaseErrorText,
|
|
57
|
+
lowercase: validationText.lowercaseErrorText,
|
|
58
|
+
has: validationText.hasErrorText,
|
|
59
|
+
};
|
|
60
60
|
if (!errorKeys.length && password)
|
|
61
61
|
return (h("div", { class: sheet.classes.ValidationItemValid, style: { paddingBottom: "var(--sl-spacing-x-large)" } },
|
|
62
62
|
h("style", { type: "text/css" }, styleString),
|
|
63
63
|
h(Valid, null),
|
|
64
64
|
" ",
|
|
65
|
-
h("span", null,
|
|
65
|
+
h("span", null, validationText.meetsRequirementsText)));
|
|
66
66
|
return (h("div", { class: sheet.classes.Base },
|
|
67
67
|
h("style", { type: "text/css" }, styleString),
|
|
68
|
-
|
|
68
|
+
validationText.doesNotMeetRequirementsText,
|
|
69
69
|
h("ul", { class: sheet.classes.ValidationList }, Object.keys(validationMessages).map((errorKey) => errorKeys.includes(errorKey) ? (h("li", { class: sheet.classes.ValidationItemInvalid },
|
|
70
70
|
h(Invalid, null),
|
|
71
71
|
" ",
|
|
@@ -6,6 +6,7 @@ import deepmerge from "deepmerge";
|
|
|
6
6
|
import { validateNewPassword } from "./passwordValidation";
|
|
7
7
|
import { PortalResetPasswordView, } from "./sqm-password-field-view";
|
|
8
8
|
import { usePasswordField } from "./usePasswordField";
|
|
9
|
+
import { getProps } from "../../utils/utils";
|
|
9
10
|
/**
|
|
10
11
|
* @uiName Form Password Field
|
|
11
12
|
* @validParents ["sqm-portal-register","sqm-portal-registration-form"]
|
|
@@ -26,13 +27,37 @@ export class PortalPasswordField {
|
|
|
26
27
|
* @uiName Disable validation
|
|
27
28
|
*/
|
|
28
29
|
this.disableValidation = false;
|
|
30
|
+
/**
|
|
31
|
+
* @uiName Meets requirements text
|
|
32
|
+
*/
|
|
33
|
+
this.meetsRequirementsText = "Password has met all requirements";
|
|
34
|
+
/**
|
|
35
|
+
* @uiName Fails requirements text
|
|
36
|
+
*/
|
|
37
|
+
this.doesNotMeetRequirementsText = "Password must meet the following requirements:";
|
|
38
|
+
/**
|
|
39
|
+
* @uiName Minimum length text
|
|
40
|
+
*/
|
|
41
|
+
this.minErrorText = "be a minimum of 8 characters";
|
|
42
|
+
/**
|
|
43
|
+
* @uiName Missing uppercase text
|
|
44
|
+
*/
|
|
45
|
+
this.uppercaseErrorText = "contain at least 1 uppercase character";
|
|
46
|
+
/**
|
|
47
|
+
* @uiName Missing lowercase text
|
|
48
|
+
*/
|
|
49
|
+
this.lowercaseErrorText = "contain at least 1 lowercase character";
|
|
50
|
+
/**
|
|
51
|
+
* @uiName Missing number or symbol error text
|
|
52
|
+
*/
|
|
53
|
+
this.hasErrorText = "contain at least 1 number or symbol";
|
|
29
54
|
withHooks(this);
|
|
30
55
|
}
|
|
31
56
|
disconnectedCallback() { }
|
|
32
57
|
render() {
|
|
33
58
|
const { states, callbacks } = isDemo()
|
|
34
|
-
? usePasswordFieldDemo(this)
|
|
35
|
-
: usePasswordField(this);
|
|
59
|
+
? usePasswordFieldDemo(getProps(this))
|
|
60
|
+
: usePasswordField(getProps(this));
|
|
36
61
|
return h(PortalResetPasswordView, { states: states, callbacks: callbacks });
|
|
37
62
|
}
|
|
38
63
|
static get is() { return "sqm-password-field"; }
|
|
@@ -79,6 +104,132 @@ export class PortalPasswordField {
|
|
|
79
104
|
"reflect": false,
|
|
80
105
|
"defaultValue": "false"
|
|
81
106
|
},
|
|
107
|
+
"meetsRequirementsText": {
|
|
108
|
+
"type": "string",
|
|
109
|
+
"mutable": false,
|
|
110
|
+
"complexType": {
|
|
111
|
+
"original": "string",
|
|
112
|
+
"resolved": "string",
|
|
113
|
+
"references": {}
|
|
114
|
+
},
|
|
115
|
+
"required": false,
|
|
116
|
+
"optional": false,
|
|
117
|
+
"docs": {
|
|
118
|
+
"tags": [{
|
|
119
|
+
"text": "Meets requirements text",
|
|
120
|
+
"name": "uiName"
|
|
121
|
+
}],
|
|
122
|
+
"text": ""
|
|
123
|
+
},
|
|
124
|
+
"attribute": "meets-requirements-text",
|
|
125
|
+
"reflect": false,
|
|
126
|
+
"defaultValue": "\"Password has met all requirements\""
|
|
127
|
+
},
|
|
128
|
+
"doesNotMeetRequirementsText": {
|
|
129
|
+
"type": "string",
|
|
130
|
+
"mutable": false,
|
|
131
|
+
"complexType": {
|
|
132
|
+
"original": "string",
|
|
133
|
+
"resolved": "string",
|
|
134
|
+
"references": {}
|
|
135
|
+
},
|
|
136
|
+
"required": false,
|
|
137
|
+
"optional": false,
|
|
138
|
+
"docs": {
|
|
139
|
+
"tags": [{
|
|
140
|
+
"text": "Fails requirements text",
|
|
141
|
+
"name": "uiName"
|
|
142
|
+
}],
|
|
143
|
+
"text": ""
|
|
144
|
+
},
|
|
145
|
+
"attribute": "does-not-meet-requirements-text",
|
|
146
|
+
"reflect": false,
|
|
147
|
+
"defaultValue": "\"Password must meet the following requirements:\""
|
|
148
|
+
},
|
|
149
|
+
"minErrorText": {
|
|
150
|
+
"type": "string",
|
|
151
|
+
"mutable": false,
|
|
152
|
+
"complexType": {
|
|
153
|
+
"original": "string",
|
|
154
|
+
"resolved": "string",
|
|
155
|
+
"references": {}
|
|
156
|
+
},
|
|
157
|
+
"required": false,
|
|
158
|
+
"optional": false,
|
|
159
|
+
"docs": {
|
|
160
|
+
"tags": [{
|
|
161
|
+
"text": "Minimum length text",
|
|
162
|
+
"name": "uiName"
|
|
163
|
+
}],
|
|
164
|
+
"text": ""
|
|
165
|
+
},
|
|
166
|
+
"attribute": "min-error-text",
|
|
167
|
+
"reflect": false,
|
|
168
|
+
"defaultValue": "\"be a minimum of 8 characters\""
|
|
169
|
+
},
|
|
170
|
+
"uppercaseErrorText": {
|
|
171
|
+
"type": "string",
|
|
172
|
+
"mutable": false,
|
|
173
|
+
"complexType": {
|
|
174
|
+
"original": "string",
|
|
175
|
+
"resolved": "string",
|
|
176
|
+
"references": {}
|
|
177
|
+
},
|
|
178
|
+
"required": false,
|
|
179
|
+
"optional": false,
|
|
180
|
+
"docs": {
|
|
181
|
+
"tags": [{
|
|
182
|
+
"text": "Missing uppercase text",
|
|
183
|
+
"name": "uiName"
|
|
184
|
+
}],
|
|
185
|
+
"text": ""
|
|
186
|
+
},
|
|
187
|
+
"attribute": "uppercase-error-text",
|
|
188
|
+
"reflect": false,
|
|
189
|
+
"defaultValue": "\"contain at least 1 uppercase character\""
|
|
190
|
+
},
|
|
191
|
+
"lowercaseErrorText": {
|
|
192
|
+
"type": "string",
|
|
193
|
+
"mutable": false,
|
|
194
|
+
"complexType": {
|
|
195
|
+
"original": "string",
|
|
196
|
+
"resolved": "string",
|
|
197
|
+
"references": {}
|
|
198
|
+
},
|
|
199
|
+
"required": false,
|
|
200
|
+
"optional": false,
|
|
201
|
+
"docs": {
|
|
202
|
+
"tags": [{
|
|
203
|
+
"text": "Missing lowercase text",
|
|
204
|
+
"name": "uiName"
|
|
205
|
+
}],
|
|
206
|
+
"text": ""
|
|
207
|
+
},
|
|
208
|
+
"attribute": "lowercase-error-text",
|
|
209
|
+
"reflect": false,
|
|
210
|
+
"defaultValue": "\"contain at least 1 lowercase character\""
|
|
211
|
+
},
|
|
212
|
+
"hasErrorText": {
|
|
213
|
+
"type": "string",
|
|
214
|
+
"mutable": false,
|
|
215
|
+
"complexType": {
|
|
216
|
+
"original": "string",
|
|
217
|
+
"resolved": "string",
|
|
218
|
+
"references": {}
|
|
219
|
+
},
|
|
220
|
+
"required": false,
|
|
221
|
+
"optional": false,
|
|
222
|
+
"docs": {
|
|
223
|
+
"tags": [{
|
|
224
|
+
"text": "Missing number or symbol error text",
|
|
225
|
+
"name": "uiName"
|
|
226
|
+
}],
|
|
227
|
+
"text": ""
|
|
228
|
+
},
|
|
229
|
+
"attribute": "has-error-text",
|
|
230
|
+
"reflect": false,
|
|
231
|
+
"defaultValue": "\"contain at least 1 number or symbol\""
|
|
232
|
+
},
|
|
82
233
|
"demoData": {
|
|
83
234
|
"type": "unknown",
|
|
84
235
|
"mutable": false,
|
|
@@ -114,12 +265,12 @@ function usePasswordFieldDemo(props) {
|
|
|
114
265
|
const [dynamicValidation, setDynamicValidation] = useState("");
|
|
115
266
|
const [lastValidated, setLastValidated] = useState("");
|
|
116
267
|
if (props.demoData && lastValidated != ((_a = props === null || props === void 0 ? void 0 : props.demoData) === null || _a === void 0 ? void 0 : _a.initValue)) {
|
|
117
|
-
const validation = validateNewPassword(((_b = props === null || props === void 0 ? void 0 : props.demoData) === null || _b === void 0 ? void 0 : _b.initValue) || "");
|
|
268
|
+
const validation = validateNewPassword(((_b = props === null || props === void 0 ? void 0 : props.demoData) === null || _b === void 0 ? void 0 : _b.initValue) || "", props);
|
|
118
269
|
setDynamicValidation(((_c = props === null || props === void 0 ? void 0 : props.demoData) === null || _c === void 0 ? void 0 : _c.initValue) === "" ? "" : validation);
|
|
119
270
|
setLastValidated((_d = props === null || props === void 0 ? void 0 : props.demoData) === null || _d === void 0 ? void 0 : _d.initValue);
|
|
120
271
|
}
|
|
121
272
|
function onInput(input) {
|
|
122
|
-
const validation = validateNewPassword(input.target.value);
|
|
273
|
+
const validation = validateNewPassword(input.target.value, props);
|
|
123
274
|
setDynamicValidation(validation);
|
|
124
275
|
}
|
|
125
276
|
return deepmerge({
|
|
@@ -6,7 +6,7 @@ export function usePasswordField(props) {
|
|
|
6
6
|
const registrationFormState = useDomContext(REGISTRATION_FORM_STATE_CONTEXT);
|
|
7
7
|
const [dynamicValidation, setDynamicValidation] = useState("");
|
|
8
8
|
function onInput(input) {
|
|
9
|
-
const validation = validateNewPassword(input.target.value);
|
|
9
|
+
const validation = validateNewPassword(input.target.value, props);
|
|
10
10
|
setDynamicValidation(validation);
|
|
11
11
|
}
|
|
12
12
|
return {
|
package/dist/collection/components/sqm-portal-change-password/sqm-portal-change-password-view.js
CHANGED
|
@@ -58,7 +58,7 @@ export function PortalChangePasswordView(props) {
|
|
|
58
58
|
h("div", { part: "successalert-text" }, states.content.successMessage))),
|
|
59
59
|
h("sl-form", { "onSl-submit": callbacks.submit },
|
|
60
60
|
h("div", { class: sheet.classes.InputContainer },
|
|
61
|
-
h("sqm-password-field", { exportparts: "input-label: input-label", class: sheet.classes.PasswordField, fieldLabel: states.content.passwordFieldLabel }),
|
|
61
|
+
h("sqm-password-field", { exportparts: "input-label: input-label", class: sheet.classes.PasswordField, fieldLabel: states.content.passwordFieldLabel, meetsRequirementsText: states.content.meetsRequirementsText, doesNotMeetRequirementsText: states.content.doesNotMeetRequirementsText, minErrorText: states.content.minErrorText, uppercaseErrorText: states.content.uppercaseErrorText, lowercaseErrorText: states.content.lowercaseErrorText, hasErrorText: states.content.hasErrorText }),
|
|
62
62
|
h("sl-input", { exportparts: "label: input-label", name: "/confirmPassword", label: states.content.confirmPasswordFieldLabel, required: true, togglePassword: true, disabled: states.loading, type: "password" })),
|
|
63
63
|
h(PortalContainerView, Object.assign({}, { direction: "row", padding: "none", gap: "20px" }),
|
|
64
64
|
h("sl-button", { class: sheet.classes.ChangePasswordButton, type: "primary", submit: true, loading: states.loading }, states.content.changePasswordButtonText),
|
|
@@ -56,6 +56,30 @@ export class PortalChangePassword {
|
|
|
56
56
|
* @uiName Change password button text
|
|
57
57
|
*/
|
|
58
58
|
this.portalChangePasswordButtonText = "Change your password...";
|
|
59
|
+
/**
|
|
60
|
+
* @uiName Meets requirements text
|
|
61
|
+
*/
|
|
62
|
+
this.meetsRequirementsText = "Password has met all requirements";
|
|
63
|
+
/**
|
|
64
|
+
* @uiName Fails requirements text
|
|
65
|
+
*/
|
|
66
|
+
this.doesNotMeetRequirementsText = "Password must meet the following requirements:";
|
|
67
|
+
/**
|
|
68
|
+
* @uiName Minimum length text
|
|
69
|
+
*/
|
|
70
|
+
this.minErrorText = "be a minimum of 8 characters";
|
|
71
|
+
/**
|
|
72
|
+
* @uiName Missing uppercase text
|
|
73
|
+
*/
|
|
74
|
+
this.uppercaseErrorText = "contain at least 1 uppercase character";
|
|
75
|
+
/**
|
|
76
|
+
* @uiName Missing lowercase text
|
|
77
|
+
*/
|
|
78
|
+
this.lowercaseErrorText = "contain at least 1 lowercase character";
|
|
79
|
+
/**
|
|
80
|
+
* @uiName Missing number or symbol error text
|
|
81
|
+
*/
|
|
82
|
+
this.hasErrorText = "contain at least 1 number or symbol";
|
|
59
83
|
withHooks(this);
|
|
60
84
|
}
|
|
61
85
|
disconnectedCallback() { }
|
|
@@ -239,12 +263,138 @@ export class PortalChangePassword {
|
|
|
239
263
|
"reflect": false,
|
|
240
264
|
"defaultValue": "\"Change your password...\""
|
|
241
265
|
},
|
|
266
|
+
"meetsRequirementsText": {
|
|
267
|
+
"type": "string",
|
|
268
|
+
"mutable": false,
|
|
269
|
+
"complexType": {
|
|
270
|
+
"original": "string",
|
|
271
|
+
"resolved": "string",
|
|
272
|
+
"references": {}
|
|
273
|
+
},
|
|
274
|
+
"required": false,
|
|
275
|
+
"optional": false,
|
|
276
|
+
"docs": {
|
|
277
|
+
"tags": [{
|
|
278
|
+
"text": "Meets requirements text",
|
|
279
|
+
"name": "uiName"
|
|
280
|
+
}],
|
|
281
|
+
"text": ""
|
|
282
|
+
},
|
|
283
|
+
"attribute": "meets-requirements-text",
|
|
284
|
+
"reflect": false,
|
|
285
|
+
"defaultValue": "\"Password has met all requirements\""
|
|
286
|
+
},
|
|
287
|
+
"doesNotMeetRequirementsText": {
|
|
288
|
+
"type": "string",
|
|
289
|
+
"mutable": false,
|
|
290
|
+
"complexType": {
|
|
291
|
+
"original": "string",
|
|
292
|
+
"resolved": "string",
|
|
293
|
+
"references": {}
|
|
294
|
+
},
|
|
295
|
+
"required": false,
|
|
296
|
+
"optional": false,
|
|
297
|
+
"docs": {
|
|
298
|
+
"tags": [{
|
|
299
|
+
"text": "Fails requirements text",
|
|
300
|
+
"name": "uiName"
|
|
301
|
+
}],
|
|
302
|
+
"text": ""
|
|
303
|
+
},
|
|
304
|
+
"attribute": "does-not-meet-requirements-text",
|
|
305
|
+
"reflect": false,
|
|
306
|
+
"defaultValue": "\"Password must meet the following requirements:\""
|
|
307
|
+
},
|
|
308
|
+
"minErrorText": {
|
|
309
|
+
"type": "string",
|
|
310
|
+
"mutable": false,
|
|
311
|
+
"complexType": {
|
|
312
|
+
"original": "string",
|
|
313
|
+
"resolved": "string",
|
|
314
|
+
"references": {}
|
|
315
|
+
},
|
|
316
|
+
"required": false,
|
|
317
|
+
"optional": false,
|
|
318
|
+
"docs": {
|
|
319
|
+
"tags": [{
|
|
320
|
+
"text": "Minimum length text",
|
|
321
|
+
"name": "uiName"
|
|
322
|
+
}],
|
|
323
|
+
"text": ""
|
|
324
|
+
},
|
|
325
|
+
"attribute": "min-error-text",
|
|
326
|
+
"reflect": false,
|
|
327
|
+
"defaultValue": "\"be a minimum of 8 characters\""
|
|
328
|
+
},
|
|
329
|
+
"uppercaseErrorText": {
|
|
330
|
+
"type": "string",
|
|
331
|
+
"mutable": false,
|
|
332
|
+
"complexType": {
|
|
333
|
+
"original": "string",
|
|
334
|
+
"resolved": "string",
|
|
335
|
+
"references": {}
|
|
336
|
+
},
|
|
337
|
+
"required": false,
|
|
338
|
+
"optional": false,
|
|
339
|
+
"docs": {
|
|
340
|
+
"tags": [{
|
|
341
|
+
"text": "Missing uppercase text",
|
|
342
|
+
"name": "uiName"
|
|
343
|
+
}],
|
|
344
|
+
"text": ""
|
|
345
|
+
},
|
|
346
|
+
"attribute": "uppercase-error-text",
|
|
347
|
+
"reflect": false,
|
|
348
|
+
"defaultValue": "\"contain at least 1 uppercase character\""
|
|
349
|
+
},
|
|
350
|
+
"lowercaseErrorText": {
|
|
351
|
+
"type": "string",
|
|
352
|
+
"mutable": false,
|
|
353
|
+
"complexType": {
|
|
354
|
+
"original": "string",
|
|
355
|
+
"resolved": "string",
|
|
356
|
+
"references": {}
|
|
357
|
+
},
|
|
358
|
+
"required": false,
|
|
359
|
+
"optional": false,
|
|
360
|
+
"docs": {
|
|
361
|
+
"tags": [{
|
|
362
|
+
"text": "Missing lowercase text",
|
|
363
|
+
"name": "uiName"
|
|
364
|
+
}],
|
|
365
|
+
"text": ""
|
|
366
|
+
},
|
|
367
|
+
"attribute": "lowercase-error-text",
|
|
368
|
+
"reflect": false,
|
|
369
|
+
"defaultValue": "\"contain at least 1 lowercase character\""
|
|
370
|
+
},
|
|
371
|
+
"hasErrorText": {
|
|
372
|
+
"type": "string",
|
|
373
|
+
"mutable": false,
|
|
374
|
+
"complexType": {
|
|
375
|
+
"original": "string",
|
|
376
|
+
"resolved": "string",
|
|
377
|
+
"references": {}
|
|
378
|
+
},
|
|
379
|
+
"required": false,
|
|
380
|
+
"optional": false,
|
|
381
|
+
"docs": {
|
|
382
|
+
"tags": [{
|
|
383
|
+
"text": "Missing number or symbol error text",
|
|
384
|
+
"name": "uiName"
|
|
385
|
+
}],
|
|
386
|
+
"text": ""
|
|
387
|
+
},
|
|
388
|
+
"attribute": "has-error-text",
|
|
389
|
+
"reflect": false,
|
|
390
|
+
"defaultValue": "\"contain at least 1 number or symbol\""
|
|
391
|
+
},
|
|
242
392
|
"demoData": {
|
|
243
393
|
"type": "unknown",
|
|
244
394
|
"mutable": false,
|
|
245
395
|
"complexType": {
|
|
246
396
|
"original": "DemoData<PortalChangePasswordViewProps>",
|
|
247
|
-
"resolved": "{ states?: { open: boolean; error: string; loading: boolean; success: boolean; content: { modalChangePasswordHeader: string; cancelText: string; changePasswordButtonText: string; passwordFieldLabel: string; confirmPasswordFieldLabel: string; successMessage: string; portalChangePasswordHeader: string; portalChangePasswordButtonText: string; }; }; }",
|
|
397
|
+
"resolved": "{ states?: { open: boolean; error: string; loading: boolean; success: boolean; content: { modalChangePasswordHeader: string; cancelText: string; changePasswordButtonText: string; passwordFieldLabel: string; confirmPasswordFieldLabel: string; successMessage: string; portalChangePasswordHeader: string; portalChangePasswordButtonText: string; meetsRequirementsText?: string; doesNotMeetRequirementsText?: string; minErrorText?: string; uppercaseErrorText?: string; lowercaseErrorText?: string; hasErrorText?: string; }; }; }",
|
|
248
398
|
"references": {
|
|
249
399
|
"DemoData": {
|
|
250
400
|
"location": "import",
|
|
@@ -289,6 +439,12 @@ function usePortalChangePasswordDemo(props) {
|
|
|
289
439
|
successMessage: props.successMessage,
|
|
290
440
|
portalChangePasswordHeader: props.portalChangePasswordHeader,
|
|
291
441
|
portalChangePasswordButtonText: props.portalChangePasswordButtonText,
|
|
442
|
+
meetsRequirementsText: props.meetsRequirementsText,
|
|
443
|
+
doesNotMeetRequirementsText: props.doesNotMeetRequirementsText,
|
|
444
|
+
minErrorText: props.minErrorText,
|
|
445
|
+
uppercaseErrorText: props.uppercaseErrorText,
|
|
446
|
+
lowercaseErrorText: props.lowercaseErrorText,
|
|
447
|
+
hasErrorText: props.hasErrorText,
|
|
292
448
|
},
|
|
293
449
|
},
|
|
294
450
|
callbacks: {
|
|
@@ -47,6 +47,12 @@ export function usePortalChangePassword(props) {
|
|
|
47
47
|
successMessage: props.successMessage,
|
|
48
48
|
portalChangePasswordHeader: props.portalChangePasswordHeader,
|
|
49
49
|
portalChangePasswordButtonText: props.portalChangePasswordButtonText,
|
|
50
|
+
meetsRequirementsText: props.meetsRequirementsText,
|
|
51
|
+
doesNotMeetRequirementsText: props.doesNotMeetRequirementsText,
|
|
52
|
+
minErrorText: props.minErrorText,
|
|
53
|
+
uppercaseErrorText: props.uppercaseErrorText,
|
|
54
|
+
lowercaseErrorText: props.lowercaseErrorText,
|
|
55
|
+
hasErrorText: props.hasErrorText,
|
|
50
56
|
},
|
|
51
57
|
},
|
|
52
58
|
data: {},
|
|
@@ -13,37 +13,37 @@ export const TooWideColumn = () => (h("div", { style: { width: "200px", border:
|
|
|
13
13
|
export const TooWideRow = () => (h("div", { style: { width: "500px", border: "1px dashed grey" } },
|
|
14
14
|
h("sqm-portal-container", { gap: "xxx-large", direction: "row", "min-width": "160px" },
|
|
15
15
|
h("sqm-share-button", { icon: "envelope", medium: "email", size: "medium", class: "hydrated" }, "Email a friend"),
|
|
16
|
-
h("sqm-share-button", { medium: "twitter", size: "medium", class: "hydrated" }, "
|
|
16
|
+
h("sqm-share-button", { medium: "twitter", size: "medium", class: "hydrated" }, "Tweet about us"),
|
|
17
17
|
h("sqm-share-button", { medium: "facebook", size: "medium", class: "hydrated" }, "Share on Facebook"))));
|
|
18
18
|
export const TooWideSmallGap = () => (h("div", { style: { width: "500px", border: "1px dashed grey" } },
|
|
19
19
|
h("sqm-portal-container", { gap: "small", direction: "row", "min-width": "160px" },
|
|
20
20
|
h("sqm-share-button", { icon: "envelope", medium: "email", size: "medium", class: "hydrated" }, "Email a friend"),
|
|
21
|
-
h("sqm-share-button", { medium: "twitter", size: "medium", class: "hydrated" }, "
|
|
21
|
+
h("sqm-share-button", { medium: "twitter", size: "medium", class: "hydrated" }, "Tweet about us"),
|
|
22
22
|
h("sqm-share-button", { medium: "facebook", size: "medium", class: "hydrated" }, "Share on Facebook"))));
|
|
23
23
|
export const TooWidePadding = () => (h("div", { style: { width: "500px", border: "1px dashed grey" } },
|
|
24
24
|
h("sqm-portal-container", { padding: "xxx-large", gap: "xxx-large", direction: "row", "min-width": "160px" },
|
|
25
25
|
h("sqm-share-button", { icon: "envelope", medium: "email", size: "medium", class: "hydrated" }, "Email a friend"),
|
|
26
|
-
h("sqm-share-button", { medium: "twitter", size: "medium", class: "hydrated" }, "
|
|
26
|
+
h("sqm-share-button", { medium: "twitter", size: "medium", class: "hydrated" }, "Tweet about us"),
|
|
27
27
|
h("sqm-share-button", { medium: "facebook", size: "medium", class: "hydrated" }, "Share on Facebook"))));
|
|
28
28
|
export const TooWideDisplayFlex = () => (h("div", { style: { width: "500px", border: "1px dashed grey" } },
|
|
29
29
|
h("sqm-portal-container", { gap: "xxx-large", direction: "row", display: "flex", "min-width": "160px" },
|
|
30
30
|
h("sqm-share-button", { icon: "envelope", medium: "email", size: "medium", class: "hydrated" }, "Email a friend"),
|
|
31
|
-
h("sqm-share-button", { medium: "twitter", size: "medium", class: "hydrated" }, "
|
|
31
|
+
h("sqm-share-button", { medium: "twitter", size: "medium", class: "hydrated" }, "Tweet about us"),
|
|
32
32
|
h("sqm-share-button", { medium: "facebook", size: "medium", class: "hydrated" }, "Share on Facebook"))));
|
|
33
33
|
export const HalfWidth = () => (h("div", { style: { width: "1000px", border: "1px dashed grey" } },
|
|
34
34
|
h("sqm-portal-container", { gap: "xxx-large", direction: "row", minWidth: "160px", maxWidth: "50%" },
|
|
35
35
|
h("sqm-share-button", { icon: "envelope", medium: "email", size: "medium", class: "hydrated" }, "Email a friend"),
|
|
36
|
-
h("sqm-share-button", { medium: "twitter", size: "medium", class: "hydrated" }, "
|
|
36
|
+
h("sqm-share-button", { medium: "twitter", size: "medium", class: "hydrated" }, "Tweet about us"),
|
|
37
37
|
h("sqm-share-button", { medium: "facebook", size: "medium", class: "hydrated" }, "Share on Facebook"))));
|
|
38
38
|
export const HalfWidthCenter = () => (h("div", { style: { width: "1000px", border: "1px dashed grey" } },
|
|
39
39
|
h("sqm-portal-container", { gap: "xxx-large", direction: "row", minWidth: "160px", maxWidth: "50%", center: true },
|
|
40
40
|
h("sqm-share-button", { icon: "envelope", medium: "email", size: "medium", class: "hydrated" }, "Email a friend"),
|
|
41
|
-
h("sqm-share-button", { medium: "twitter", size: "medium", class: "hydrated" }, "
|
|
41
|
+
h("sqm-share-button", { medium: "twitter", size: "medium", class: "hydrated" }, "Tweet about us"),
|
|
42
42
|
h("sqm-share-button", { medium: "facebook", size: "medium", class: "hydrated" }, "Share on Facebook"))));
|
|
43
43
|
export const FullWidth = () => (h("div", { style: { width: "1000px", border: "1px dashed grey" } },
|
|
44
44
|
h("sqm-portal-container", { gap: "xxx-large", direction: "row", maxWidth: "100%" },
|
|
45
45
|
h("sqm-share-button", { icon: "envelope", medium: "email", size: "medium", class: "hydrated" }, "Email a friend"),
|
|
46
|
-
h("sqm-share-button", { medium: "twitter", size: "medium", class: "hydrated" }, "
|
|
46
|
+
h("sqm-share-button", { medium: "twitter", size: "medium", class: "hydrated" }, "Tweet about us"),
|
|
47
47
|
h("sqm-share-button", { medium: "facebook", size: "medium", class: "hydrated" }, "Share on Facebook"))));
|
|
48
48
|
export const SpaceBetween = () => {
|
|
49
49
|
return (h("div", { style: { width: "1000px", border: "1px dashed grey" } },
|
|
@@ -37,7 +37,7 @@ const vanillaStyle = `
|
|
|
37
37
|
const sheet = createStyleSheet(style);
|
|
38
38
|
const styleString = sheet.toString();
|
|
39
39
|
export function PortalEmailVerificationView(props) {
|
|
40
|
-
const { states, callbacks, content: { email, verifyMessage, emailVerificationHeader, resendEmailButtonText, verificationStatusMessage, verificationLoadingMessage, }, } = props;
|
|
40
|
+
const { states, callbacks, content: { email, verifyMessage, emailVerificationHeader, resendEmailButtonText, verificationStatusMessage, verificationLoadingMessage, verificationResentMessage, }, } = props;
|
|
41
41
|
return (h("div", { class: sheet.classes.Wrapper },
|
|
42
42
|
h("style", { type: "text/css" },
|
|
43
43
|
vanillaStyle,
|
|
@@ -47,7 +47,7 @@ export function PortalEmailVerificationView(props) {
|
|
|
47
47
|
props.states.error && (h("sqm-form-message", { type: "error", exportparts: "erroralert-icon" },
|
|
48
48
|
h("div", { part: "erroralert-text" }, props.states.error))),
|
|
49
49
|
props.states.success && (h("sqm-form-message", { type: "success", exportparts: "successalert-icon" },
|
|
50
|
-
h("div", { part: "successalert-text" },
|
|
50
|
+
h("div", { part: "successalert-text" }, verificationResentMessage))),
|
|
51
51
|
h(TextSpanView, { type: "p" }, intl.formatMessage({
|
|
52
52
|
id: "verifyMessage",
|
|
53
53
|
defaultMessage: verifyMessage,
|
package/dist/collection/components/sqm-portal-email-verification/sqm-portal-email-verification.js
CHANGED
|
@@ -40,6 +40,11 @@ export class PortalEmailVerification {
|
|
|
40
40
|
* @uiWidget textArea
|
|
41
41
|
*/
|
|
42
42
|
this.verificationLoadingMessage = "Checking verification status";
|
|
43
|
+
/**
|
|
44
|
+
* @uiName Email verification resent text
|
|
45
|
+
* @uiWidget textArea
|
|
46
|
+
*/
|
|
47
|
+
this.verificationResentMessage = "Your verification email has been resent successfully";
|
|
43
48
|
withHooks(this);
|
|
44
49
|
}
|
|
45
50
|
disconnectedCallback() { }
|
|
@@ -190,12 +195,36 @@ export class PortalEmailVerification {
|
|
|
190
195
|
"reflect": false,
|
|
191
196
|
"defaultValue": "\"Checking verification status\""
|
|
192
197
|
},
|
|
198
|
+
"verificationResentMessage": {
|
|
199
|
+
"type": "string",
|
|
200
|
+
"mutable": false,
|
|
201
|
+
"complexType": {
|
|
202
|
+
"original": "string",
|
|
203
|
+
"resolved": "string",
|
|
204
|
+
"references": {}
|
|
205
|
+
},
|
|
206
|
+
"required": false,
|
|
207
|
+
"optional": false,
|
|
208
|
+
"docs": {
|
|
209
|
+
"tags": [{
|
|
210
|
+
"text": "Email verification resent text",
|
|
211
|
+
"name": "uiName"
|
|
212
|
+
}, {
|
|
213
|
+
"text": "textArea",
|
|
214
|
+
"name": "uiWidget"
|
|
215
|
+
}],
|
|
216
|
+
"text": ""
|
|
217
|
+
},
|
|
218
|
+
"attribute": "verification-resent-message",
|
|
219
|
+
"reflect": false,
|
|
220
|
+
"defaultValue": "\"Your verification email has been resent successfully\""
|
|
221
|
+
},
|
|
193
222
|
"demoData": {
|
|
194
223
|
"type": "unknown",
|
|
195
224
|
"mutable": false,
|
|
196
225
|
"complexType": {
|
|
197
226
|
"original": "DemoData<PortalEmailVerificationViewProps>",
|
|
198
|
-
"resolved": "{ 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; }; }",
|
|
227
|
+
"resolved": "{ 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; }; }",
|
|
199
228
|
"references": {
|
|
200
229
|
"DemoData": {
|
|
201
230
|
"location": "import",
|
|
@@ -238,6 +267,7 @@ function usePortalEmailVerificationDemo(props) {
|
|
|
238
267
|
resendEmailButtonText: props.resendEmailButtonText,
|
|
239
268
|
verificationLoadingMessage: props.verificationLoadingMessage,
|
|
240
269
|
verificationStatusMessage: props.verificationStatusMessage,
|
|
270
|
+
verificationResentMessage: props.verificationResentMessage,
|
|
241
271
|
},
|
|
242
272
|
}, props.demoData || {}, { arrayMerge: (_, a) => a });
|
|
243
273
|
}
|
|
@@ -59,7 +59,7 @@ export function PortalRegisterView(props) {
|
|
|
59
59
|
content.requiredFieldErrorMessage,
|
|
60
60
|
}
|
|
61
61
|
: [])))),
|
|
62
|
-
!states.hideInputs && (h("sqm-password-field", { fieldLabel: content.passwordLabel, "disable-validation": states.disablePasswordValidation })),
|
|
62
|
+
!states.hideInputs && (h("sqm-password-field", { fieldLabel: content.passwordLabel, "disable-validation": states.disablePasswordValidation, meetsRequirementsText: content.meetsRequirementsText, doesNotMeetRequirementsText: content.doesNotMeetRequirementsText, minErrorText: content.minErrorText, uppercaseErrorText: content.uppercaseErrorText, lowercaseErrorText: content.lowercaseErrorText, hasErrorText: content.hasErrorText })),
|
|
63
63
|
content.passwordField,
|
|
64
64
|
!states.hideInputs && states.confirmPassword && (h("sl-input", Object.assign({ exportparts: "label: input-label", type: "password", name: "/confirmPassword", label: content.confirmPasswordLabel, disabled: states.loading, required: true }, (((_f = (_e = states.registrationFormState) === null || _e === void 0 ? void 0 : _e.validationErrors) === null || _f === void 0 ? void 0 : _f.confirmPassword) ? {
|
|
65
65
|
class: sheet.classes.ErrorStyle,
|