@saasquatch/mint-components 1.8.5-24 → 1.8.5-26
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-1e2f6f9b.js → ShadowViewAddon-89ba2ab0.js} +17 -17
- package/dist/cjs/{email-registration-view-5170d9f1.js → email-registration-view-a6b6430e.js} +3 -3
- package/dist/cjs/sqm-banking-info-form_16.cjs.entry.js +17 -17
- package/dist/cjs/sqm-big-stat_38.cjs.entry.js +3 -3
- package/dist/cjs/sqm-empty_4.cjs.entry.js +2 -2
- package/dist/cjs/sqm-instant-access-registration.cjs.entry.js +1 -1
- package/dist/cjs/{sqm-invoice-table-view-cae2a67d.js → sqm-invoice-table-view-501f8985.js} +8 -8
- package/dist/cjs/sqm-password-field.cjs.entry.js +1 -1
- package/dist/cjs/{sqm-portal-forgot-password-view-969c49ed.js → sqm-portal-forgot-password-view-ca5f6db9.js} +1 -1
- package/dist/cjs/sqm-portal-forgot-password.cjs.entry.js +1 -1
- package/dist/cjs/{sqm-portal-profile-view-851a020f.js → sqm-portal-profile-view-d8697f23.js} +4 -4
- package/dist/cjs/sqm-portal-profile.cjs.entry.js +1 -1
- package/dist/cjs/sqm-portal-registration-form.cjs.entry.js +2 -2
- package/dist/cjs/{sqm-portal-reset-password-view-96f329ed.js → sqm-portal-reset-password-view-07a13210.js} +1 -1
- package/dist/cjs/sqm-portal-reset-password.cjs.entry.js +1 -1
- package/dist/cjs/{sqm-portal-verify-email-view-ce552bbc.js → sqm-portal-verify-email-view-1ae5724a.js} +3 -1
- package/dist/cjs/sqm-portal-verify-email.cjs.entry.js +88 -31
- package/dist/cjs/sqm-referred-registration.cjs.entry.js +1 -1
- package/dist/cjs/sqm-stencilbook.cjs.entry.js +13 -11
- package/dist/collection/components/sqm-checkbox-field/sqm-checkbox-field-view.js +1 -1
- package/dist/collection/components/sqm-dropdown-field/sqm-dropdown-field-view.js +1 -1
- package/dist/collection/components/sqm-edit-profile/sqm-edit-profile-view.js +3 -3
- package/dist/collection/components/sqm-empty/sqm-empty-view.js +2 -2
- package/dist/collection/components/sqm-input-field/sqm-input-field-view.js +1 -1
- package/dist/collection/components/sqm-link-button/sqm-link-button-view.js +2 -2
- package/dist/collection/components/sqm-name-fields/sqm-name-fields-view.js +2 -2
- package/dist/collection/components/sqm-password-field/sqm-password-field-view.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-forgot-password/sqm-portal-forgot-password-view.js +1 -1
- package/dist/collection/components/sqm-portal-login/sqm-portal-login-view.js +2 -2
- package/dist/collection/components/sqm-portal-profile/sqm-portal-profile-view.js +4 -4
- package/dist/collection/components/sqm-portal-register/PortalRegister.stories.js +2 -2
- package/dist/collection/components/sqm-portal-register/sqm-portal-register-view.js +2 -2
- package/dist/collection/components/sqm-portal-registration-form/PortalRegistrationForm.stories.js +2 -2
- package/dist/collection/components/sqm-portal-registration-form/sqm-portal-registration-form-view.js +2 -2
- package/dist/collection/components/sqm-portal-reset-password/sqm-portal-reset-password-view.js +1 -1
- package/dist/collection/components/sqm-portal-verify-email/PortalVerifyEmail.stories.js +2 -0
- package/dist/collection/components/sqm-portal-verify-email/sqm-portal-verify-email-view.js +3 -1
- package/dist/collection/components/sqm-portal-verify-email/sqm-portal-verify-email.js +1 -1
- package/dist/collection/components/sqm-portal-verify-email/usePortalVerifyEmail.js +90 -32
- package/dist/collection/components/sqm-reward-exchange-list/sqm-reward-exchange-list-view.js +4 -4
- package/dist/collection/components/tax-and-cash/sqm-banking-info-form/sqm-banking-info-form-view.js +4 -4
- package/dist/collection/components/tax-and-cash/sqm-user-info-form/small-views/IndirectTaxDetailsView.js +8 -8
- package/dist/collection/components/tax-and-cash/sqm-user-info-form/sqm-user-info-form-view.js +12 -12
- package/dist/collection/components/views/email-registration-view.js +3 -3
- package/dist/esm/{ShadowViewAddon-8fd4f148.js → ShadowViewAddon-c22043d9.js} +17 -17
- package/dist/esm/{email-registration-view-07d80492.js → email-registration-view-4a4202e7.js} +3 -3
- package/dist/esm/sqm-banking-info-form_16.entry.js +17 -17
- package/dist/esm/sqm-big-stat_38.entry.js +3 -3
- package/dist/esm/sqm-empty_4.entry.js +2 -2
- package/dist/esm/sqm-instant-access-registration.entry.js +1 -1
- package/dist/esm/{sqm-invoice-table-view-c905071b.js → sqm-invoice-table-view-d00894ce.js} +8 -8
- package/dist/esm/sqm-password-field.entry.js +1 -1
- package/dist/esm/{sqm-portal-forgot-password-view-c2ed8fed.js → sqm-portal-forgot-password-view-a764ad67.js} +1 -1
- package/dist/esm/sqm-portal-forgot-password.entry.js +1 -1
- package/dist/esm/{sqm-portal-profile-view-eeff5fa0.js → sqm-portal-profile-view-13f0ef79.js} +4 -4
- package/dist/esm/sqm-portal-profile.entry.js +1 -1
- package/dist/esm/sqm-portal-registration-form.entry.js +2 -2
- package/dist/esm/{sqm-portal-reset-password-view-79a85e02.js → sqm-portal-reset-password-view-d3e726a9.js} +1 -1
- package/dist/esm/sqm-portal-reset-password.entry.js +1 -1
- package/dist/esm/{sqm-portal-verify-email-view-283bf637.js → sqm-portal-verify-email-view-279b4e58.js} +3 -1
- package/dist/esm/sqm-portal-verify-email.entry.js +90 -33
- package/dist/esm/sqm-referred-registration.entry.js +1 -1
- package/dist/esm/sqm-stencilbook.entry.js +13 -11
- package/dist/esm-es5/ShadowViewAddon-c22043d9.js +1 -0
- package/dist/esm-es5/{email-registration-view-07d80492.js → email-registration-view-4a4202e7.js} +1 -1
- package/dist/esm-es5/sqm-banking-info-form_16.entry.js +1 -1
- package/dist/esm-es5/sqm-big-stat_38.entry.js +1 -1
- package/dist/esm-es5/sqm-empty_4.entry.js +1 -1
- package/dist/esm-es5/sqm-instant-access-registration.entry.js +1 -1
- package/dist/esm-es5/{sqm-invoice-table-view-c905071b.js → sqm-invoice-table-view-d00894ce.js} +1 -1
- package/dist/esm-es5/sqm-password-field.entry.js +1 -1
- package/dist/esm-es5/{sqm-portal-forgot-password-view-c2ed8fed.js → sqm-portal-forgot-password-view-a764ad67.js} +1 -1
- package/dist/esm-es5/sqm-portal-forgot-password.entry.js +1 -1
- package/dist/esm-es5/sqm-portal-profile-view-13f0ef79.js +1 -0
- 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-79a85e02.js → sqm-portal-reset-password-view-d3e726a9.js} +1 -1
- package/dist/esm-es5/sqm-portal-reset-password.entry.js +1 -1
- package/dist/esm-es5/sqm-portal-verify-email-view-279b4e58.js +1 -0
- package/dist/esm-es5/sqm-portal-verify-email.entry.js +1 -1
- package/dist/esm-es5/sqm-referred-registration.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-05bfb3bf.js +391 -0
- package/dist/mint-components/{p-ebbcc7c5.entry.js → p-11be93f5.entry.js} +1 -1
- package/dist/mint-components/{p-11858d60.system.entry.js → p-18ccb4ad.system.entry.js} +1 -1
- package/dist/mint-components/{p-4b3fff57.entry.js → p-1a5005fe.entry.js} +2 -2
- package/dist/mint-components/{p-5c750437.entry.js → p-1a8a8795.entry.js} +1 -1
- package/dist/mint-components/{p-a61430ad.system.entry.js → p-20e2037d.system.entry.js} +1 -1
- package/dist/mint-components/{p-f3be6d20.entry.js → p-2a6133dc.entry.js} +1 -1
- package/dist/mint-components/{p-e0f374e2.entry.js → p-2f2b220a.entry.js} +1 -1
- package/dist/mint-components/{p-03cfceb5.js → p-3539d14d.js} +1 -1
- package/dist/mint-components/p-3a5d82b7.system.entry.js +1 -0
- package/dist/mint-components/p-44b12b2e.system.js +1 -1
- package/dist/mint-components/{p-d49e2f7a.js → p-46ef82ed.js} +1 -1
- package/dist/mint-components/{p-6868667d.entry.js → p-4e513c81.entry.js} +1 -1
- package/dist/mint-components/p-71fed413.system.entry.js +1 -0
- package/dist/mint-components/{p-7d5e0645.system.js → p-7487f23c.system.js} +1 -1
- package/dist/mint-components/p-7f6a6657.system.js +1 -0
- package/dist/mint-components/p-8a9ceee6.entry.js +9 -0
- package/dist/mint-components/p-9b400b7e.system.entry.js +1 -0
- package/dist/mint-components/p-a40d2ed3.system.js +1 -0
- package/dist/mint-components/{p-6a6b1966.system.entry.js → p-a9482c97.system.entry.js} +1 -1
- package/dist/mint-components/p-af7a9281.system.entry.js +1 -0
- package/dist/mint-components/p-b153fc0c.system.js +1 -0
- package/dist/mint-components/p-b5ee2781.js +1 -0
- package/dist/mint-components/p-b67f5743.system.js +1 -0
- package/dist/mint-components/p-b9d010e0.js +1 -0
- package/dist/mint-components/p-be584089.system.entry.js +1 -0
- package/dist/mint-components/{p-6d95589e.system.entry.js → p-be96cc00.system.entry.js} +1 -1
- package/dist/mint-components/p-c74a8f95.entry.js +1 -0
- package/dist/mint-components/{p-2020caa1.system.js → p-cd45b39f.system.js} +1 -1
- package/dist/mint-components/p-cef64e28.system.entry.js +1 -0
- package/dist/mint-components/{p-41e2a408.entry.js → p-d3cd5ec5.entry.js} +1 -1
- package/dist/mint-components/{p-1403b1f1.system.entry.js → p-da99e3c7.system.entry.js} +1 -1
- package/dist/mint-components/{p-9891a965.entry.js → p-dd5ca1b2.entry.js} +2 -2
- package/dist/mint-components/{p-1b9e6fc6.js → p-ea6a7135.js} +1 -1
- package/dist/mint-components/p-f24de0a5.entry.js +1 -0
- package/dist/mint-components/p-f5f25aba.js +1 -0
- package/dist/mint-components/{p-4d964945.entry.js → p-f710f9d7.entry.js} +3 -3
- package/dist/mint-components/{p-4e48267b.system.js → p-fca0dc98.system.js} +1 -1
- package/dist/mint-components/{p-b2e34063.system.entry.js → p-fd3dacb9.system.entry.js} +1 -1
- package/dist/types/components/sqm-portal-verify-email/sqm-portal-verify-email-view.d.ts +1 -0
- package/dist/types/components/sqm-portal-verify-email/usePortalVerifyEmail.d.ts +1 -0
- package/docs/docs.docx +0 -0
- package/package.json +1 -1
- package/dist/esm-es5/ShadowViewAddon-8fd4f148.js +0 -1
- package/dist/esm-es5/sqm-portal-profile-view-eeff5fa0.js +0 -1
- package/dist/esm-es5/sqm-portal-verify-email-view-283bf637.js +0 -1
- package/dist/mint-components/p-0382167f.entry.js +0 -1
- package/dist/mint-components/p-10036f16.js +0 -1
- package/dist/mint-components/p-3652236f.system.entry.js +0 -1
- package/dist/mint-components/p-3e096e73.entry.js +0 -1
- package/dist/mint-components/p-4a3a0014.entry.js +0 -9
- package/dist/mint-components/p-4d9744bf.js +0 -1
- package/dist/mint-components/p-5e1366ac.system.js +0 -1
- package/dist/mint-components/p-6bf41e0d.system.js +0 -1
- package/dist/mint-components/p-8c5a6603.js +0 -1
- package/dist/mint-components/p-9bdccddd.system.entry.js +0 -1
- package/dist/mint-components/p-ab174fe6.system.entry.js +0 -1
- package/dist/mint-components/p-abc6cb26.system.js +0 -1
- package/dist/mint-components/p-ccb7d32e.system.entry.js +0 -1
- package/dist/mint-components/p-d4b174e1.system.js +0 -1
- package/dist/mint-components/p-d60b15e7.js +0 -391
- package/dist/mint-components/p-da718618.system.entry.js +0 -1
- package/dist/mint-components/p-e1253472.system.entry.js +0 -1
- package/docs/picklesdoc--2024-01-15--11-20-00.xlsx +0 -0
- package/docs/picklesdoc--2024-01-15--11-24-04.xlsx +0 -0
|
@@ -10,25 +10,33 @@ require('./mixins-fe9d4112.js');
|
|
|
10
10
|
require('./JSS-8503a151.js');
|
|
11
11
|
const utils = require('./utils-6847bc06.js');
|
|
12
12
|
require('./sqm-text-span-view-e1cd9bd3.js');
|
|
13
|
-
const sqmPortalVerifyEmailView = require('./sqm-portal-verify-email-view-
|
|
13
|
+
const sqmPortalVerifyEmailView = require('./sqm-portal-verify-email-view-1ae5724a.js');
|
|
14
14
|
|
|
15
15
|
const SUBMITTED_CONTEXT = "sq:verify-submitted";
|
|
16
|
-
function
|
|
16
|
+
function setWindowSubmitted(submitted) {
|
|
17
17
|
// using window due to dom-context getting reset on re-render
|
|
18
18
|
window[SUBMITTED_CONTEXT] = submitted;
|
|
19
19
|
}
|
|
20
20
|
function usePortalVerifyEmail({ nextPage, failedPage, verifySuccessText, verifyEmailText, verifyInvalidText, networkErrorMessage, continueText, }) {
|
|
21
|
-
var
|
|
22
|
-
const submitted = window[SUBMITTED_CONTEXT];
|
|
21
|
+
var _b, _c, _d, _e, _f, _g, _h, _j;
|
|
22
|
+
const [submitted, setSubmitted] = stencilHooks_module.useState(window[SUBMITTED_CONTEXT]);
|
|
23
23
|
const userIdent = index_module.Q();
|
|
24
|
+
const [verificationError, setVerificationError] = stencilHooks_module.useState(null);
|
|
25
|
+
const [success, setSuccess] = stencilHooks_module.useState(false);
|
|
24
26
|
const [request, { loading, data, errors }] = index_module.an();
|
|
25
27
|
const urlParams = new URLSearchParams(index_module.$n.location.search);
|
|
26
28
|
const oobCode = urlParams.get("oobCode");
|
|
29
|
+
const oobEmail = urlParams.get("email");
|
|
27
30
|
const nextPageOverride = urlParams.get("nextPage");
|
|
31
|
+
const syncSubmitted = (submitted) => {
|
|
32
|
+
setSubmitted(submitted);
|
|
33
|
+
setWindowSubmitted(submitted);
|
|
34
|
+
};
|
|
28
35
|
// derived from useMutation in component boilerplate initialState
|
|
29
36
|
const disableContinue = data === undefined && errors === undefined && !!oobCode;
|
|
30
37
|
// if logged out, userIdent?.managedIdentity?.emailVerified will be falsey, even if verification was successful
|
|
31
|
-
const
|
|
38
|
+
const hasContext = localStorage.getItem("sq:user-identity");
|
|
39
|
+
const verified = !!((_b = userIdent === null || userIdent === void 0 ? void 0 : userIdent.managedIdentity) === null || _b === void 0 ? void 0 : _b.emailVerified);
|
|
32
40
|
const failed = () => {
|
|
33
41
|
return index_module.$n.push({
|
|
34
42
|
pathname: failedPage,
|
|
@@ -40,40 +48,89 @@ function usePortalVerifyEmail({ nextPage, failedPage, verifySuccessText, verifyE
|
|
|
40
48
|
const url = utils.sanitizeUrlPath(nextPageOverride || nextPage);
|
|
41
49
|
index_module.$n.push(url.href);
|
|
42
50
|
};
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
51
|
+
console.log({
|
|
52
|
+
hasContext,
|
|
53
|
+
userIdent,
|
|
54
|
+
data,
|
|
55
|
+
submitted,
|
|
56
|
+
verified,
|
|
57
|
+
verificationError,
|
|
58
|
+
success,
|
|
59
|
+
});
|
|
60
|
+
stencilHooks_module.useEffect(() => {
|
|
61
|
+
const check = async () => {
|
|
62
|
+
var _a;
|
|
63
|
+
const response = await request({ oobCode });
|
|
64
|
+
if (response instanceof Error ||
|
|
65
|
+
!((_a = response === null || response === void 0 ? void 0 : response.verifyManagedIdentityEmail) === null || _a === void 0 ? void 0 : _a.success)) {
|
|
66
|
+
console.debug("set verification error");
|
|
67
|
+
setVerificationError({ message: true });
|
|
53
68
|
}
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
|
|
69
|
+
else {
|
|
70
|
+
console.debug("set success: true");
|
|
71
|
+
setSuccess(true);
|
|
72
|
+
}
|
|
73
|
+
console.debug("SUBMITTED", response);
|
|
74
|
+
console.debug("window", window[SUBMITTED_CONTEXT]);
|
|
75
|
+
syncSubmitted(true);
|
|
76
|
+
};
|
|
77
|
+
if (!submitted)
|
|
78
|
+
check();
|
|
79
|
+
}, [submitted]);
|
|
60
80
|
stencilHooks_module.useEffect(() => {
|
|
61
|
-
|
|
62
|
-
if (
|
|
81
|
+
var _a;
|
|
82
|
+
if (!submitted)
|
|
83
|
+
return;
|
|
84
|
+
if (!verificationError &&
|
|
85
|
+
((_a = userIdent === null || userIdent === void 0 ? void 0 : userIdent.managedIdentity) === null || _a === void 0 ? void 0 : _a.email) === oobEmail &&
|
|
86
|
+
(success || verified)) {
|
|
87
|
+
console.log("LOGGING IN", success, verified, verificationError);
|
|
88
|
+
setTimeout(gotoNextPage, 3000);
|
|
89
|
+
}
|
|
90
|
+
else {
|
|
91
|
+
console.log("LOGGING OUT", success, verified, verificationError);
|
|
63
92
|
setTimeout(() => {
|
|
93
|
+
index_module.setUserIdentity(undefined);
|
|
64
94
|
gotoNextPage();
|
|
65
|
-
setSubmitted(false);
|
|
66
95
|
}, 3000);
|
|
67
|
-
return;
|
|
68
96
|
}
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
97
|
+
}, [verified, verificationError, success, submitted, userIdent]);
|
|
98
|
+
stencilHooks_module.useEffect(() => {
|
|
99
|
+
if (errors)
|
|
100
|
+
setVerificationError(errors);
|
|
101
|
+
}, [errors, setVerificationError]);
|
|
102
|
+
// useEffect(() => {
|
|
103
|
+
// if (!data && !submitted && oobCode) {
|
|
104
|
+
// submit();
|
|
105
|
+
// return;
|
|
106
|
+
// }
|
|
107
|
+
// // verification successful but user in context is not verified
|
|
108
|
+
// // or mismatch between logged in user and user associated with oobCode
|
|
109
|
+
// if (submitted) {
|
|
110
|
+
// console.debug("in submit condition");
|
|
111
|
+
// if (email && email !== oobEmail) {
|
|
112
|
+
// console.debug("email mismatch");
|
|
113
|
+
// logout();
|
|
114
|
+
// return;
|
|
115
|
+
// // Already verified, begin redirect
|
|
116
|
+
// }
|
|
117
|
+
// if (verified) {
|
|
118
|
+
// if (!verificationError) setSuccess(true);
|
|
119
|
+
// console.debug("verified");
|
|
120
|
+
// setTimeout(() => {
|
|
121
|
+
// gotoNextPage();
|
|
122
|
+
// setSubmitted(false);
|
|
123
|
+
// }, 3000);
|
|
124
|
+
// return;
|
|
125
|
+
// }
|
|
126
|
+
// }
|
|
127
|
+
// }, [submitted, verificationError, data, email, oobCode, oobEmail, submit]);
|
|
72
128
|
return {
|
|
73
129
|
states: {
|
|
74
|
-
loading:
|
|
75
|
-
|
|
76
|
-
|
|
130
|
+
loading: disableContinue,
|
|
131
|
+
success,
|
|
132
|
+
error: ((_f = (_e = (_d = (_c = verificationError === null || verificationError === void 0 ? void 0 : verificationError.response) === null || _c === void 0 ? void 0 : _c.errors) === null || _d === void 0 ? void 0 : _d[0]) === null || _e === void 0 ? void 0 : _e.extensions) === null || _f === void 0 ? void 0 : _f.message) || ((_j = (_h = (_g = verificationError === null || verificationError === void 0 ? void 0 : verificationError.response) === null || _g === void 0 ? void 0 : _g.errors) === null || _h === void 0 ? void 0 : _h[0]) === null || _j === void 0 ? void 0 : _j.message) ||
|
|
133
|
+
((verificationError === null || verificationError === void 0 ? void 0 : verificationError.message) && networkErrorMessage),
|
|
77
134
|
verified,
|
|
78
135
|
},
|
|
79
136
|
data: {
|
|
@@ -9,7 +9,7 @@ require('./jsonpointer-11327262.js');
|
|
|
9
9
|
const cjs = require('./cjs-1066ec21.js');
|
|
10
10
|
require('./mixins-fe9d4112.js');
|
|
11
11
|
require('./JSS-8503a151.js');
|
|
12
|
-
const emailRegistrationView = require('./email-registration-view-
|
|
12
|
+
const emailRegistrationView = require('./email-registration-view-a6b6430e.js');
|
|
13
13
|
require('./useRegistrationFormState-ad3190c9.js');
|
|
14
14
|
const useInstantAccessRegistration = require('./useInstantAccessRegistration-fe258c50.js');
|
|
15
15
|
|
|
@@ -17,20 +17,20 @@ require('./sqm-text-span-view-e1cd9bd3.js');
|
|
|
17
17
|
const sqmAssetCardView = require('./sqm-asset-card-view-a0e33f21.js');
|
|
18
18
|
const sqmCloseButtonView = require('./sqm-close-button-view-fd6e8f60.js');
|
|
19
19
|
require('./index-8c6255f5.js');
|
|
20
|
-
const emailRegistrationView = require('./email-registration-view-
|
|
20
|
+
const emailRegistrationView = require('./email-registration-view-a6b6430e.js');
|
|
21
21
|
const sqmLeaderboardRankView = require('./sqm-leaderboard-rank-view-5a3d4a88.js');
|
|
22
22
|
const sqmLogoutCurrentUserView = require('./sqm-logout-current-user-view-c9f18d96.js');
|
|
23
23
|
const sqmNavigationSidebarView = require('./sqm-navigation-sidebar-view-dd53f947.js');
|
|
24
24
|
const sqmNavigationSidebarItemView = require('./sqm-navigation-sidebar-item-view-7f79627b.js');
|
|
25
25
|
const sqmPortalEmailVerificationView = require('./sqm-portal-email-verification-view-8f15bace.js');
|
|
26
|
-
const sqmPortalForgotPasswordView = require('./sqm-portal-forgot-password-view-
|
|
27
|
-
const sqmPortalProfileView = require('./sqm-portal-profile-view-
|
|
26
|
+
const sqmPortalForgotPasswordView = require('./sqm-portal-forgot-password-view-ca5f6db9.js');
|
|
27
|
+
const sqmPortalProfileView = require('./sqm-portal-profile-view-d8697f23.js');
|
|
28
28
|
require('./utilities-73df97e1.js');
|
|
29
|
-
const sqmPortalResetPasswordView = require('./sqm-portal-reset-password-view-
|
|
30
|
-
const sqmPortalVerifyEmailView = require('./sqm-portal-verify-email-view-
|
|
31
|
-
const ShadowViewAddon = require('./ShadowViewAddon-
|
|
29
|
+
const sqmPortalResetPasswordView = require('./sqm-portal-reset-password-view-07a13210.js');
|
|
30
|
+
const sqmPortalVerifyEmailView = require('./sqm-portal-verify-email-view-1ae5724a.js');
|
|
31
|
+
const ShadowViewAddon = require('./ShadowViewAddon-89ba2ab0.js');
|
|
32
32
|
const sqmPortalContainerView = require('./sqm-portal-container-view-5fb2ad49.js');
|
|
33
|
-
const sqmInvoiceTableView = require('./sqm-invoice-table-view-
|
|
33
|
+
const sqmInvoiceTableView = require('./sqm-invoice-table-view-501f8985.js');
|
|
34
34
|
|
|
35
35
|
/**
|
|
36
36
|
* lodash (Custom Build) <https://lodash.com/>
|
|
@@ -7239,8 +7239,8 @@ const slottedProps = {
|
|
|
7239
7239
|
requiredFieldErrorMessage: "Cannot be empty",
|
|
7240
7240
|
invalidEmailErrorMessage: "Must be a valid email address",
|
|
7241
7241
|
formData: (index.h("div", null,
|
|
7242
|
-
index.h("sl-input", { style: { marginBottom: "var(--sl-spacing-x-large)" }, exportparts: "label: input-label
|
|
7243
|
-
index.h("sl-input", { exportparts: "label: input-label
|
|
7242
|
+
index.h("sl-input", { style: { marginBottom: "var(--sl-spacing-x-large)" }, exportparts: "label: input-label", label: "Slotted Input", required: true }),
|
|
7243
|
+
index.h("sl-input", { exportparts: "label: input-label", label: "Slotted Input 2", required: true }))),
|
|
7244
7244
|
},
|
|
7245
7245
|
};
|
|
7246
7246
|
const Default$3 = () => index.h(ShadowViewAddon.PortalRegisterView, Object.assign({}, defaultProps$3));
|
|
@@ -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
|
|
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",
|
|
@@ -7618,6 +7618,7 @@ const errorProps$5 = {
|
|
|
7618
7618
|
error: "Something went wrong. Please try again.",
|
|
7619
7619
|
loading: false,
|
|
7620
7620
|
verified: false,
|
|
7621
|
+
success: false,
|
|
7621
7622
|
},
|
|
7622
7623
|
data: {
|
|
7623
7624
|
oobCode: "abc123",
|
|
@@ -7637,6 +7638,7 @@ const verifiedProps = {
|
|
|
7637
7638
|
error: "",
|
|
7638
7639
|
loading: false,
|
|
7639
7640
|
verified: true,
|
|
7641
|
+
success: true,
|
|
7640
7642
|
},
|
|
7641
7643
|
data: {
|
|
7642
7644
|
oobCode: "abc123",
|
|
@@ -9955,7 +9957,7 @@ const ResetPasswordReadme = "# sqm-portal-reset-password\n\n\n\n<!-- Auto Genera
|
|
|
9955
9957
|
|
|
9956
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";
|
|
9957
9959
|
|
|
9958
|
-
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";
|
|
9959
9961
|
|
|
9960
9962
|
const PortalTemplates_stories = {
|
|
9961
9963
|
title: "Templates / Microsite",
|
|
@@ -51,7 +51,7 @@ export function CheckboxFieldView(props) {
|
|
|
51
51
|
h("style", { type: "text/css" },
|
|
52
52
|
vanillaStyle,
|
|
53
53
|
styleString),
|
|
54
|
-
h("sl-checkbox", Object.assign({ exportparts: "label: input-label
|
|
54
|
+
h("sl-checkbox", Object.assign({ exportparts: "label: input-label", name: `/${content.checkboxName}`, checked: states.checked, "onSl-change": (e) => {
|
|
55
55
|
e.target.value = e.target.checked;
|
|
56
56
|
callbacks.setChecked(e.target.value);
|
|
57
57
|
} }, (!content.checkboxOptional ? { required: true } : []), { disabled: ((_b = states.registrationFormState) === null || _b === void 0 ? void 0 : _b.loading) || ((_c = states.registrationFormState) === null || _c === void 0 ? void 0 : _c.disabled) }, (!states.checked && (validationErrors === null || validationErrors === void 0 ? void 0 : validationErrors[content.checkboxName])
|
|
@@ -40,7 +40,7 @@ export function DropdownFieldView(props) {
|
|
|
40
40
|
h("style", { type: "text/css" },
|
|
41
41
|
vanillaStyle,
|
|
42
42
|
styleString),
|
|
43
|
-
h("sl-select", Object.assign({ exportparts: "label: input-label
|
|
43
|
+
h("sl-select", Object.assign({ exportparts: "label: input-label", label: content.dropdownLabel, name: `/${content.dropdownName}` }, (!content.dropdownOptional ? { required: true } : []), { disabled: ((_b = states.registrationFormState) === null || _b === void 0 ? void 0 : _b.loading) || ((_c = states.registrationFormState) === null || _c === void 0 ? void 0 : _c.disabled) }, (((_e = (_d = states.registrationFormState) === null || _d === void 0 ? void 0 : _d.initialData) === null || _e === void 0 ? void 0 : _e[content.dropdownName]) ? {
|
|
44
44
|
value: (_g = (_f = states.registrationFormState) === null || _f === void 0 ? void 0 : _f.initialData) === null || _g === void 0 ? void 0 : _g[content.dropdownName],
|
|
45
45
|
}
|
|
46
46
|
: {}), ((validationErrors === null || validationErrors === void 0 ? void 0 : validationErrors[content.dropdownName]) ? {
|
|
@@ -15,17 +15,17 @@ const EditProfileView = (props) => {
|
|
|
15
15
|
h("div", { class: "FormSection" },
|
|
16
16
|
states.formState.error && (h("sqm-form-message", { type: "error", exportparts: "erroralert-icon" },
|
|
17
17
|
h("div", { part: "erroralert-text" }, states.formState.error))),
|
|
18
|
-
h("sl-input", Object.assign({ exportparts: "label: input-label
|
|
18
|
+
h("sl-input", Object.assign({ exportparts: "label: input-label", value: states.formState.firstName, onInput: callbacks.onChange, label: text.firstnametext, disabled: states.loading }, (errors.firstName && errors.firstName.status !== "valid"
|
|
19
19
|
? { class: "ErrorStyles", helpText: text.fieldEmptyText }
|
|
20
20
|
: []), { id: "firstName", name: "firstName", error: errors.firstName && errors.firstName.status !== "valid"
|
|
21
21
|
? errors.firstName.message
|
|
22
22
|
: undefined })),
|
|
23
|
-
h("sl-input", Object.assign({ exportparts: "label: input-label
|
|
23
|
+
h("sl-input", Object.assign({ exportparts: "label: input-label", value: states.formState.lastName, onInput: callbacks.onChange, label: text.lastnametext, disabled: states.loading, id: "lastName", name: "lastName" }, (errors.lastName && errors.lastName.status !== "valid"
|
|
24
24
|
? { class: "ErrorStyles", helpText: text.fieldEmptyText }
|
|
25
25
|
: []), { error: errors.lastName && errors.lastName.status !== "valid"
|
|
26
26
|
? errors.lastName.message
|
|
27
27
|
: undefined }))),
|
|
28
|
-
text.showregion && states.formState.currentRegion && (h("sl-input", { exportparts: "label: input-label
|
|
28
|
+
text.showregion && states.formState.currentRegion && (h("sl-input", { exportparts: "label: input-label", disabled: true, value: states.formState.currentRegion, label: text.currentregiontext, id: "currentRegion", name: "currentRegion" })),
|
|
29
29
|
h("div", { class: "ButtonWrapper" },
|
|
30
30
|
h("sl-button", { type: "primary", loading: states.loading, disabled: states.submitDisabled, onClick: (e) => {
|
|
31
31
|
callbacks.onSubmit(e);
|
|
@@ -5,7 +5,7 @@ export function EmptyStateView(props) {
|
|
|
5
5
|
h("img", { style: { height: "100px", margin: "auto" }, src: emptyStateImage }),
|
|
6
6
|
h("sqm-titled-section", { style: { maxHeight: "400px" }, "label-margin": "xxx-small", "text-align": "center" },
|
|
7
7
|
h("sqm-text", { slot: "label" },
|
|
8
|
-
h("p",
|
|
8
|
+
h("p", null, emptyStateHeader)),
|
|
9
9
|
h("sqm-text", { slot: "content" },
|
|
10
|
-
h("p", {
|
|
10
|
+
h("p", { style: { color: "var(--sl-color-gray-500)" } }, emptyStateText)))));
|
|
11
11
|
}
|
|
@@ -27,7 +27,7 @@ export function InputFieldView(props) {
|
|
|
27
27
|
h("style", { type: "text/css" },
|
|
28
28
|
vanillaStyle,
|
|
29
29
|
styleString),
|
|
30
|
-
h("sl-input", Object.assign({ exportparts: "label: input-label
|
|
30
|
+
h("sl-input", Object.assign({ exportparts: "label: input-label", name: `/${content.fieldName}`, type: content.fieldType, label: content.fieldLabel }, (!content.fieldOptional ? { required: true } : []), { disabled: ((_b = states.registrationFormState) === null || _b === void 0 ? void 0 : _b.loading) || ((_c = states.registrationFormState) === null || _c === void 0 ? void 0 : _c.disabled) }, (((_e = (_d = states.registrationFormState) === null || _d === void 0 ? void 0 : _d.initialData) === null || _e === void 0 ? void 0 : _e[content.fieldName]) ? {
|
|
31
31
|
value: (_g = (_f = states.registrationFormState) === null || _f === void 0 ? void 0 : _f.initialData) === null || _g === void 0 ? void 0 : _g[content.fieldName],
|
|
32
32
|
}
|
|
33
33
|
: {}), ((validationErrors === null || validationErrors === void 0 ? void 0 : validationErrors[content.fieldName]) ? {
|
|
@@ -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
|
}
|
|
@@ -31,7 +31,7 @@ export function NameFieldsView(props) {
|
|
|
31
31
|
h("style", { type: "text/css" },
|
|
32
32
|
vanillaStyle,
|
|
33
33
|
styleString),
|
|
34
|
-
h("sl-input", Object.assign({ exportparts: "label: input-label
|
|
34
|
+
h("sl-input", Object.assign({ exportparts: "label: input-label", name: "/firstName", type: "text", label: states.content.firstNameLabel, required: true, disabled: ((_b = states.registrationFormState) === null || _b === void 0 ? void 0 : _b.loading) || ((_c = states.registrationFormState) === null || _c === void 0 ? void 0 : _c.disabled) }, (((_e = (_d = states.registrationFormState) === null || _d === void 0 ? void 0 : _d.initialData) === null || _e === void 0 ? void 0 : _e.firstName) ? {
|
|
35
35
|
value: (_g = (_f = states.registrationFormState) === null || _f === void 0 ? void 0 : _f.initialData) === null || _g === void 0 ? void 0 : _g.firstName,
|
|
36
36
|
}
|
|
37
37
|
: {}), ((validationErrors === null || validationErrors === void 0 ? void 0 : validationErrors.firstName) ? {
|
|
@@ -39,7 +39,7 @@ export function NameFieldsView(props) {
|
|
|
39
39
|
helpText: (validationErrors === null || validationErrors === void 0 ? void 0 : validationErrors.firstName) || "Cannot be empty",
|
|
40
40
|
}
|
|
41
41
|
: []))),
|
|
42
|
-
h("sl-input", Object.assign({ exportparts: "label: input-label
|
|
42
|
+
h("sl-input", Object.assign({ exportparts: "label: input-label", name: "/lastName", type: "text", label: states.content.lastNameLabel, required: true, disabled: ((_h = states.registrationFormState) === null || _h === void 0 ? void 0 : _h.loading) || ((_j = states.registrationFormState) === null || _j === void 0 ? void 0 : _j.disabled) }, (((_l = (_k = states.registrationFormState) === null || _k === void 0 ? void 0 : _k.initialData) === null || _l === void 0 ? void 0 : _l.lastName) ? {
|
|
43
43
|
value: (_o = (_m = states.registrationFormState) === null || _m === void 0 ? void 0 : _m.initialData) === null || _o === void 0 ? void 0 : _o.lastName,
|
|
44
44
|
}
|
|
45
45
|
: {}), ((validationErrors === null || validationErrors === void 0 ? void 0 : validationErrors.lastName) ? {
|
|
@@ -28,7 +28,7 @@ export function PortalResetPasswordView(props) {
|
|
|
28
28
|
h("style", { type: "text/css" },
|
|
29
29
|
vanillaStyle,
|
|
30
30
|
styleString),
|
|
31
|
-
h("sl-input", Object.assign({ exportparts: "label: input-label
|
|
31
|
+
h("sl-input", Object.assign({ exportparts: "label: input-label", type: "password", name: "/password", label: states.content.fieldLabel || "Password", required: true, disabled: ((_a = states.registrationFormState) === null || _a === void 0 ? void 0 : _a.loading) || ((_b = states.registrationFormState) === null || _b === void 0 ? void 0 : _b.disabled), validationError: ({ value }) => {
|
|
32
32
|
if (!value) {
|
|
33
33
|
return "Cannot be empty";
|
|
34
34
|
}
|
package/dist/collection/components/sqm-portal-change-password/sqm-portal-change-password-view.js
CHANGED
|
@@ -59,7 +59,7 @@ export function PortalChangePasswordView(props) {
|
|
|
59
59
|
h("sl-form", { "onSl-submit": callbacks.submit },
|
|
60
60
|
h("div", { class: sheet.classes.InputContainer },
|
|
61
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
|
-
h("sl-input", { exportparts: "label: input-label
|
|
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),
|
|
65
65
|
h("sl-button", { class: sheet.classes.CancelButton, type: "text", onClick: () => callbacks.setOpen(false) }, states.content.cancelText))))),
|
package/dist/collection/components/sqm-portal-forgot-password/sqm-portal-forgot-password-view.js
CHANGED
|
@@ -33,7 +33,7 @@ export function PortalForgotPasswordView(props) {
|
|
|
33
33
|
h("div", { part: "erroralert-text" }, props.states.error))),
|
|
34
34
|
props.states.success && (h("sqm-form-message", { type: "success", exportparts: "successalert-icon" },
|
|
35
35
|
h("div", { part: "successalert-text" }, content.successAlertText))),
|
|
36
|
-
h("sl-input", { exportparts: "label: input-label
|
|
36
|
+
h("sl-input", { exportparts: "label: input-label", type: "email", name: "/email", label: content.emailLabel || "Email", disabled: states.loading, required: true }),
|
|
37
37
|
h("div", { class: sheet.classes.ButtonsContainer },
|
|
38
38
|
h("sl-button", { submit: true, loading: states.loading, exportparts: "base: primarybutton-base", type: "primary" }, content.submitLabel || "Reset Password"),
|
|
39
39
|
h("div", { class: sheet.classes.SecondaryButton }, content.secondaryButton)))));
|
|
@@ -35,9 +35,9 @@ export function PortalLoginView(props) {
|
|
|
35
35
|
h("sl-form", { class: sheet.classes.Column, "onSl-submit": callbacks.submit },
|
|
36
36
|
props.states.error && (h("sqm-form-message", { type: "error", exportparts: "erroralert-icon" },
|
|
37
37
|
h("div", { part: "erroralert-text" }, props.states.error))),
|
|
38
|
-
h("sl-input", { exportparts: "label: input-label
|
|
38
|
+
h("sl-input", { exportparts: "label: input-label", type: "email", name: "/email", label: content.emailLabel || "Email", disabled: states.loading, required: true }),
|
|
39
39
|
h("div", null,
|
|
40
|
-
h("sl-input", { exportparts: "label: input-label
|
|
40
|
+
h("sl-input", { exportparts: "label: input-label", type: "password", name: "/password", label: content.passwordLabel || "Password", disabled: states.loading, required: true }),
|
|
41
41
|
h("div", { class: sheet.classes.ForgotButtonContainer }, content.forgotPasswordButton)),
|
|
42
42
|
h("div", { class: sheet.classes.ButtonsContainer },
|
|
43
43
|
h("sl-button", { submit: true, loading: states.loading, exportparts: "base: primarybutton-base", type: "primary" }, content.submitLabel || "Login"),
|
|
@@ -66,16 +66,16 @@ export function PortalProfileView(props) {
|
|
|
66
66
|
error && (h("sqm-form-message", { class: sheet.classes.Error, type: "error", exportparts: "erroralert-icon" },
|
|
67
67
|
h("div", { part: "erroralert-text" }, error))),
|
|
68
68
|
h("div", { class: sheet.classes.NameInputContainer },
|
|
69
|
-
h("sl-input", Object.assign({ class: sheet.classes.NameInputStyle, exportparts: "label: input-label
|
|
69
|
+
h("sl-input", Object.assign({ class: sheet.classes.NameInputStyle, exportparts: "label: input-label", value: (_c = states.user) === null || _c === void 0 ? void 0 : _c.firstName, onInput: callbacks.onChange, label: text.firstnametext, disabled: states.loading }, ((errors === null || errors === void 0 ? void 0 : errors.firstName) && (errors === null || errors === void 0 ? void 0 : errors.firstName.status) !== "valid"
|
|
70
70
|
? { class: "ErrorStyles", helpText: text.fieldEmptyText }
|
|
71
71
|
: []), { id: "firstName", name: "firstName", error: (errors === null || errors === void 0 ? void 0 : errors.firstName) && (errors === null || errors === void 0 ? void 0 : errors.firstName.status) !== "valid"
|
|
72
72
|
? errors === null || errors === void 0 ? void 0 : errors.firstName.message : undefined })),
|
|
73
|
-
h("sl-input", Object.assign({ class: sheet.classes.NameInputStyle, exportparts: "label: input-label
|
|
73
|
+
h("sl-input", Object.assign({ class: sheet.classes.NameInputStyle, exportparts: "label: input-label", value: (_d = states.user) === null || _d === void 0 ? void 0 : _d.lastName, onInput: callbacks.onChange, label: text.lastnametext, disabled: states.loading, id: "lastName", name: "lastName" }, ((errors === null || errors === void 0 ? void 0 : errors.lastName) && (errors === null || errors === void 0 ? void 0 : errors.lastName.status) !== "valid"
|
|
74
74
|
? { class: "ErrorStyles", helpText: text.fieldEmptyText }
|
|
75
75
|
: []), { error: (errors === null || errors === void 0 ? void 0 : errors.lastName) && (errors === null || errors === void 0 ? void 0 : errors.lastName.status) !== "valid"
|
|
76
76
|
? errors === null || errors === void 0 ? void 0 : errors.lastName.message : undefined }))),
|
|
77
|
-
h("sl-input", { label: text.emailtext, value: (_e = states.user) === null || _e === void 0 ? void 0 : _e.email, exportparts: "label: input-label
|
|
78
|
-
states.showCountry && (h("sl-input", { label: text.countrytext, value: country, exportparts: "label: input-label
|
|
77
|
+
h("sl-input", { label: text.emailtext, value: (_e = states.user) === null || _e === void 0 ? void 0 : _e.email, exportparts: "label: input-label", disabled: true }),
|
|
78
|
+
states.showCountry && (h("sl-input", { label: text.countrytext, value: country, exportparts: "label: input-label", disabled: true })),
|
|
79
79
|
h("sl-button", { type: "primary", loading: states.loading, disabled: states.submitDisabled, onClick: (e) => {
|
|
80
80
|
callbacks.onSubmit(e);
|
|
81
81
|
}, submit: true }, text.submitChangeButtonText))));
|
|
@@ -94,8 +94,8 @@ const slottedProps = {
|
|
|
94
94
|
requiredFieldErrorMessage: "Cannot be empty",
|
|
95
95
|
invalidEmailErrorMessage: "Must be a valid email address",
|
|
96
96
|
formData: (h("div", null,
|
|
97
|
-
h("sl-input", { style: { marginBottom: "var(--sl-spacing-x-large)" }, exportparts: "label: input-label
|
|
98
|
-
h("sl-input", { exportparts: "label: input-label
|
|
97
|
+
h("sl-input", { style: { marginBottom: "var(--sl-spacing-x-large)" }, exportparts: "label: input-label", label: "Slotted Input", required: true }),
|
|
98
|
+
h("sl-input", { exportparts: "label: input-label", label: "Slotted Input 2", required: true }))),
|
|
99
99
|
},
|
|
100
100
|
};
|
|
101
101
|
export const Default = () => h(PortalRegisterView, Object.assign({}, defaultProps));
|
|
@@ -45,7 +45,7 @@ export function PortalRegisterView(props) {
|
|
|
45
45
|
states.error && (h("sqm-form-message", { type: "error", exportparts: "erroralert-icon" },
|
|
46
46
|
h("div", { part: "erroralert-text" }, props.states.error))),
|
|
47
47
|
content.formData,
|
|
48
|
-
!states.hideInputs && (h("sl-input", Object.assign({ exportparts: "label: input-label
|
|
48
|
+
!states.hideInputs && (h("sl-input", Object.assign({ exportparts: "label: input-label", type: "email", name: "/email", label: content.emailLabel || "Email", disabled: states.loading, required: true, validationError: ({ value }) => {
|
|
49
49
|
if (!value) {
|
|
50
50
|
return content.requiredFieldErrorMessage;
|
|
51
51
|
}
|
|
@@ -61,7 +61,7 @@ export function PortalRegisterView(props) {
|
|
|
61
61
|
: [])))),
|
|
62
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
|
-
!states.hideInputs && states.confirmPassword && (h("sl-input", Object.assign({ exportparts: "label: input-label
|
|
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,
|
|
66
66
|
helpText: ((_h = (_g = states.registrationFormState) === null || _g === void 0 ? void 0 : _g.validationErrors) === null || _h === void 0 ? void 0 : _h.confirmPassword) || content.requiredFieldErrorMessage,
|
|
67
67
|
}
|
package/dist/collection/components/sqm-portal-registration-form/PortalRegistrationForm.stories.js
CHANGED
|
@@ -76,8 +76,8 @@ const slottedProps = {
|
|
|
76
76
|
pageLabel: "Register",
|
|
77
77
|
confirmPasswordLabel: "Confirm Password",
|
|
78
78
|
formData: (h("div", null,
|
|
79
|
-
h("sl-input", { style: { marginBottom: "var(--sl-spacing-x-large)" }, exportparts: "label: input-label
|
|
80
|
-
h("sl-input", { exportparts: "label: input-label
|
|
79
|
+
h("sl-input", { style: { marginBottom: "var(--sl-spacing-x-large)" }, exportparts: "label: input-label", label: "Slotted Input", required: true }),
|
|
80
|
+
h("sl-input", { exportparts: "label: input-label", label: "Slotted Input 2", required: true }))),
|
|
81
81
|
},
|
|
82
82
|
};
|
|
83
83
|
export const Default = () => h(PortalRegistrationFormView, Object.assign({}, defaultProps));
|
package/dist/collection/components/sqm-portal-registration-form/sqm-portal-registration-form-view.js
CHANGED
|
@@ -46,7 +46,7 @@ export function PortalRegistrationFormView(props) {
|
|
|
46
46
|
h("div", { part: "erroralert-text" }, states.registrationFormState.disabledMessage))) : (states.error && (h("sqm-form-message", { type: "error", exportparts: "erroralert-icon" },
|
|
47
47
|
h("div", { part: "erroralert-text" }, props.states.error)))),
|
|
48
48
|
content.formData,
|
|
49
|
-
!states.hideInputs && (h("sl-input", Object.assign({ exportparts: "label: input-label
|
|
49
|
+
!states.hideInputs && (h("sl-input", Object.assign({ exportparts: "label: input-label", type: "email", name: "/email", label: content.emailLabel || "Email", disabled: states.loading || ((_b = states.registrationFormState) === null || _b === void 0 ? void 0 : _b.disabled), required: true, validationError: ({ value }) => {
|
|
50
50
|
if (!value) {
|
|
51
51
|
return content.requiredFieldErrorMessage;
|
|
52
52
|
}
|
|
@@ -65,7 +65,7 @@ export function PortalRegistrationFormView(props) {
|
|
|
65
65
|
: [])))),
|
|
66
66
|
!states.hideInputs && (h("sqm-password-field", { fieldLabel: content.passwordLabel, "disable-validation": !states.enablePasswordValidation, meetsRequirementsText: content.meetsRequirementsText, doesNotMeetRequirementsText: content.doesNotMeetRequirementsText, minErrorText: content.minErrorText, uppercaseErrorText: content.uppercaseErrorText, lowercaseErrorText: content.lowercaseErrorText, hasErrorText: content.hasErrorText })),
|
|
67
67
|
content.passwordField,
|
|
68
|
-
!states.hideInputs && states.confirmPassword && (h("sl-input", Object.assign({ exportparts: "label: input-label
|
|
68
|
+
!states.hideInputs && states.confirmPassword && (h("sl-input", Object.assign({ exportparts: "label: input-label", type: "password", name: "/confirmPassword", label: content.confirmPasswordLabel, disabled: states.loading || ((_l = states.registrationFormState) === null || _l === void 0 ? void 0 : _l.disabled), required: true }, (((_o = (_m = states.registrationFormState) === null || _m === void 0 ? void 0 : _m.initialData) === null || _o === void 0 ? void 0 : _o.confirmPassword) ? {
|
|
69
69
|
value: (_q = (_p = states.registrationFormState) === null || _p === void 0 ? void 0 : _p.initialData) === null || _q === void 0 ? void 0 : _q.confirmPassword,
|
|
70
70
|
}
|
|
71
71
|
: {}), (((_s = (_r = states.registrationFormState) === null || _r === void 0 ? void 0 : _r.validationErrors) === null || _s === void 0 ? void 0 : _s.confirmPassword) ? {
|
package/dist/collection/components/sqm-portal-reset-password/sqm-portal-reset-password-view.js
CHANGED
|
@@ -68,7 +68,7 @@ export function PortalResetPasswordView(props) {
|
|
|
68
68
|
props.states.error && (h("sqm-form-message", { type: "error", class: sheet.classes.Banner, exportparts: "erroralert-icon" },
|
|
69
69
|
h("div", { part: "erroralert-text" }, props.states.error))),
|
|
70
70
|
!states.reset && (h("sqm-password-field", { fieldLabel: states.content.passwordFieldLabel, demoData: states.passwordDemoData, meetsRequirementsText: states.content.meetsRequirementsText, doesNotMeetRequirementsText: states.content.doesNotMeetRequirementsText, minErrorText: states.content.minErrorText, uppercaseErrorText: states.content.uppercaseErrorText, lowercaseErrorText: states.content.lowercaseErrorText, hasErrorText: states.content.hasErrorText })),
|
|
71
|
-
!states.reset && states.confirmPassword && (h("sl-input", { exportparts: "label: input-label
|
|
71
|
+
!states.reset && states.confirmPassword && (h("sl-input", { exportparts: "label: input-label", type: "password", name: "/confirmPassword", label: states.content.confirmPasswordFieldLabel, disabled: states.loading, required: true })),
|
|
72
72
|
h("div", { class: sheet.classes.ButtonsContainer },
|
|
73
73
|
h("sl-button", { class: sheet.classes.ContinueButton, submit: true, loading: states.loading, exportparts: "base: primarybutton-base", type: "primary" }, states.reset
|
|
74
74
|
? states.content.continueButtonText
|
|
@@ -12,6 +12,7 @@ const errorProps = {
|
|
|
12
12
|
error: "Something went wrong. Please try again.",
|
|
13
13
|
loading: false,
|
|
14
14
|
verified: false,
|
|
15
|
+
success: false,
|
|
15
16
|
},
|
|
16
17
|
data: {
|
|
17
18
|
oobCode: "abc123",
|
|
@@ -31,6 +32,7 @@ const verifiedProps = {
|
|
|
31
32
|
error: "",
|
|
32
33
|
loading: false,
|
|
33
34
|
verified: true,
|
|
35
|
+
success: true,
|
|
34
36
|
},
|
|
35
37
|
data: {
|
|
36
38
|
oobCode: "abc123",
|