@saasquatch/mint-components 1.6.3-3 → 1.6.3-5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{sqm-portal-email-verification-view-4419779f.js → sqm-portal-email-verification-view-bb8f5aa0.js} +8 -4
- package/dist/cjs/sqm-portal-email-verification.cjs.entry.js +7 -18
- package/dist/cjs/sqm-stencilbook.cjs.entry.js +21 -21
- package/dist/collection/components/sqm-portal-email-verification/sqm-portal-email-verification-view.js +8 -4
- package/dist/collection/components/sqm-portal-email-verification/sqm-portal-email-verification.js +5 -5
- package/dist/collection/components/sqm-portal-email-verification/usePortalEmailVerification.js +3 -14
- package/dist/esm/{sqm-portal-email-verification-view-c181c9ff.js → sqm-portal-email-verification-view-0170c6d1.js} +8 -4
- package/dist/esm/sqm-portal-email-verification.entry.js +7 -18
- package/dist/esm/sqm-stencilbook.entry.js +21 -21
- package/dist/esm-es5/{sqm-portal-email-verification-view-c181c9ff.js → sqm-portal-email-verification-view-0170c6d1.js} +1 -1
- package/dist/esm-es5/sqm-portal-email-verification.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-07c6faa1.system.js +1 -0
- package/dist/mint-components/p-2e308c1b.system.js +1 -1
- package/dist/mint-components/p-3f96e1c4.entry.js +1 -0
- package/dist/mint-components/p-3fff79f3.system.entry.js +1 -0
- package/dist/mint-components/p-514e7691.entry.js +9 -0
- package/dist/mint-components/p-62ed88a1.js +1 -0
- package/dist/mint-components/{p-01848cdc.system.entry.js → p-6451e5af.system.entry.js} +1 -1
- package/docs/docs.docx +0 -0
- package/docs/raisins.json +1 -1
- package/package.json +1 -1
- package/dist/mint-components/p-103274ca.system.entry.js +0 -1
- package/dist/mint-components/p-329f2ebe.entry.js +0 -9
- package/dist/mint-components/p-459c3a9c.js +0 -1
- package/dist/mint-components/p-aa5c7bc5.entry.js +0 -1
- package/dist/mint-components/p-ca97933a.system.js +0 -1
|
@@ -35,9 +35,13 @@ export function PortalEmailVerificationView(props) {
|
|
|
35
35
|
}, {
|
|
36
36
|
email: (h("span", { style: { fontWeight: "var(--sl-font-weight-semibold)" } }, email)),
|
|
37
37
|
})),
|
|
38
|
-
h("sl-button", { submit: true, loading: states.loading
|
|
39
|
-
|
|
38
|
+
h("sl-button", { variant: "default", submit: true, loading: states.loading }, resendEmailButtonText),
|
|
39
|
+
h("p", { style: { color: "#BBBBBB" } }, intl.formatMessage({
|
|
40
40
|
id: `verificationStatus`,
|
|
41
|
-
defaultMessage:
|
|
42
|
-
|
|
41
|
+
defaultMessage: states.loadingVerification
|
|
42
|
+
? verificationLoadingMessage + " {countdown}"
|
|
43
|
+
: verificationStatusMessage,
|
|
44
|
+
}, {
|
|
45
|
+
countdown: states.loadingVerification ? (h("sl-spinner", null)) : (states.countdown),
|
|
46
|
+
})))));
|
|
43
47
|
}
|
package/dist/collection/components/sqm-portal-email-verification/sqm-portal-email-verification.js
CHANGED
|
@@ -34,12 +34,12 @@ export class PortalEmailVerification {
|
|
|
34
34
|
* @uiName Email Verification Status Text
|
|
35
35
|
* @uiWidget textArea
|
|
36
36
|
*/
|
|
37
|
-
this.verificationStatusMessage = "Check verification status in {countdown}";
|
|
37
|
+
this.verificationStatusMessage = "Check verification status: in {countdown}";
|
|
38
38
|
/**
|
|
39
39
|
* @uiName Email Verification Checking Text
|
|
40
40
|
* @uiWidget textArea
|
|
41
41
|
*/
|
|
42
|
-
this.verificationLoadingMessage = "
|
|
42
|
+
this.verificationLoadingMessage = "Check verification status:";
|
|
43
43
|
withHooks(this);
|
|
44
44
|
}
|
|
45
45
|
disconnectedCallback() { }
|
|
@@ -164,7 +164,7 @@ export class PortalEmailVerification {
|
|
|
164
164
|
},
|
|
165
165
|
"attribute": "verification-status-message",
|
|
166
166
|
"reflect": false,
|
|
167
|
-
"defaultValue": "\"Check verification status in {countdown}\""
|
|
167
|
+
"defaultValue": "\"Check verification status: in {countdown}\""
|
|
168
168
|
},
|
|
169
169
|
"verificationLoadingMessage": {
|
|
170
170
|
"type": "string",
|
|
@@ -188,7 +188,7 @@ export class PortalEmailVerification {
|
|
|
188
188
|
},
|
|
189
189
|
"attribute": "verification-loading-message",
|
|
190
190
|
"reflect": false,
|
|
191
|
-
"defaultValue": "\"
|
|
191
|
+
"defaultValue": "\"Check verification status:\""
|
|
192
192
|
},
|
|
193
193
|
"demoData": {
|
|
194
194
|
"type": "unknown",
|
|
@@ -227,7 +227,7 @@ export class PortalEmailVerification {
|
|
|
227
227
|
}
|
|
228
228
|
function usePortalEmailVerificationDemo(props) {
|
|
229
229
|
return deepmerge({
|
|
230
|
-
states: { error: "", loading: false, success: false },
|
|
230
|
+
states: { error: "", loading: false, success: false, countdown: 10 },
|
|
231
231
|
callbacks: {
|
|
232
232
|
submit: async (_event) => { },
|
|
233
233
|
},
|
package/dist/collection/components/sqm-portal-email-verification/usePortalEmailVerification.js
CHANGED
|
@@ -31,35 +31,24 @@ export function usePortalEmailVerification(props) {
|
|
|
31
31
|
if ((_a = result.requestManagedIdentityVerificationEmail) === null || _a === void 0 ? void 0 : _a.success)
|
|
32
32
|
setSuccess(true);
|
|
33
33
|
};
|
|
34
|
-
function clearTimer() {
|
|
35
|
-
console.log("clearing!", timerRef.current);
|
|
36
|
-
clearInterval(timerRef.current);
|
|
37
|
-
}
|
|
38
34
|
const checkVerification = useCallback(async () => {
|
|
39
35
|
var _a;
|
|
40
|
-
|
|
36
|
+
setCountdown(10);
|
|
41
37
|
const data = (await getVerificationStatus());
|
|
42
38
|
if ((_a = data === null || data === void 0 ? void 0 : data.managedIdentitySession) === null || _a === void 0 ? void 0 : _a.emailVerified) {
|
|
43
|
-
|
|
44
|
-
clearTimer();
|
|
39
|
+
clearInterval(timerRef.current);
|
|
45
40
|
return navigation.push({
|
|
46
41
|
pathname: props.redirectPath,
|
|
47
42
|
search: urlParams.toString() && "?" + urlParams.toString(),
|
|
48
43
|
});
|
|
49
44
|
}
|
|
50
|
-
else {
|
|
51
|
-
setCountdown(10);
|
|
52
|
-
}
|
|
53
45
|
}, []);
|
|
54
46
|
useEffect(() => {
|
|
55
47
|
if (!timerRef.current) {
|
|
56
48
|
checkVerification();
|
|
57
49
|
timerRef.current = setInterval(checkVerification, 10000);
|
|
58
50
|
}
|
|
59
|
-
return () =>
|
|
60
|
-
console.log("clear timer");
|
|
61
|
-
clearTimer();
|
|
62
|
-
};
|
|
51
|
+
return () => clearInterval(timerRef.current);
|
|
63
52
|
}, []);
|
|
64
53
|
useEffect(() => {
|
|
65
54
|
const countdownTimer = countdown > 0 && setInterval(() => setCountdown(countdown - 1), 1000);
|
|
@@ -36,11 +36,15 @@ function PortalEmailVerificationView(props) {
|
|
|
36
36
|
}, {
|
|
37
37
|
email: (h("span", { style: { fontWeight: "var(--sl-font-weight-semibold)" } }, email)),
|
|
38
38
|
})),
|
|
39
|
-
h("sl-button", { submit: true, loading: states.loading
|
|
40
|
-
|
|
39
|
+
h("sl-button", { variant: "default", submit: true, loading: states.loading }, resendEmailButtonText),
|
|
40
|
+
h("p", { style: { color: "#BBBBBB" } }, intl.formatMessage({
|
|
41
41
|
id: `verificationStatus`,
|
|
42
|
-
defaultMessage:
|
|
43
|
-
|
|
42
|
+
defaultMessage: states.loadingVerification
|
|
43
|
+
? verificationLoadingMessage + " {countdown}"
|
|
44
|
+
: verificationStatusMessage,
|
|
45
|
+
}, {
|
|
46
|
+
countdown: states.loadingVerification ? (h("sl-spinner", null)) : (states.countdown),
|
|
47
|
+
})))));
|
|
44
48
|
}
|
|
45
49
|
|
|
46
50
|
export { PortalEmailVerificationView as P };
|
|
@@ -7,7 +7,7 @@ import { c as cjs } from './cjs-bdfb4486.js';
|
|
|
7
7
|
import './mixins-f60a614c.js';
|
|
8
8
|
import './JSS-67b5cff8.js';
|
|
9
9
|
import './sqm-text-span-view-2567b6c0.js';
|
|
10
|
-
import { P as PortalEmailVerificationView } from './sqm-portal-email-verification-view-
|
|
10
|
+
import { P as PortalEmailVerificationView } from './sqm-portal-email-verification-view-0170c6d1.js';
|
|
11
11
|
|
|
12
12
|
// var refreshTimer;
|
|
13
13
|
function usePortalEmailVerification(props) {
|
|
@@ -40,35 +40,24 @@ function usePortalEmailVerification(props) {
|
|
|
40
40
|
if ((_a = result.requestManagedIdentityVerificationEmail) === null || _a === void 0 ? void 0 : _a.success)
|
|
41
41
|
setSuccess(true);
|
|
42
42
|
};
|
|
43
|
-
function clearTimer() {
|
|
44
|
-
console.log("clearing!", timerRef.current);
|
|
45
|
-
clearInterval(timerRef.current);
|
|
46
|
-
}
|
|
47
43
|
const checkVerification = useCallback(async () => {
|
|
48
44
|
var _a;
|
|
49
|
-
|
|
45
|
+
setCountdown(10);
|
|
50
46
|
const data = (await getVerificationStatus());
|
|
51
47
|
if ((_a = data === null || data === void 0 ? void 0 : data.managedIdentitySession) === null || _a === void 0 ? void 0 : _a.emailVerified) {
|
|
52
|
-
|
|
53
|
-
clearTimer();
|
|
48
|
+
clearInterval(timerRef.current);
|
|
54
49
|
return fn.push({
|
|
55
50
|
pathname: props.redirectPath,
|
|
56
51
|
search: urlParams.toString() && "?" + urlParams.toString(),
|
|
57
52
|
});
|
|
58
53
|
}
|
|
59
|
-
else {
|
|
60
|
-
setCountdown(10);
|
|
61
|
-
}
|
|
62
54
|
}, []);
|
|
63
55
|
useEffect(() => {
|
|
64
56
|
if (!timerRef.current) {
|
|
65
57
|
checkVerification();
|
|
66
58
|
timerRef.current = setInterval(checkVerification, 10000);
|
|
67
59
|
}
|
|
68
|
-
return () =>
|
|
69
|
-
console.log("clear timer");
|
|
70
|
-
clearTimer();
|
|
71
|
-
};
|
|
60
|
+
return () => clearInterval(timerRef.current);
|
|
72
61
|
}, []);
|
|
73
62
|
useEffect(() => {
|
|
74
63
|
const countdownTimer = countdown > 0 && setInterval(() => setCountdown(countdown - 1), 1000);
|
|
@@ -128,12 +117,12 @@ const PortalEmailVerification = class {
|
|
|
128
117
|
* @uiName Email Verification Status Text
|
|
129
118
|
* @uiWidget textArea
|
|
130
119
|
*/
|
|
131
|
-
this.verificationStatusMessage = "Check verification status in {countdown}";
|
|
120
|
+
this.verificationStatusMessage = "Check verification status: in {countdown}";
|
|
132
121
|
/**
|
|
133
122
|
* @uiName Email Verification Checking Text
|
|
134
123
|
* @uiWidget textArea
|
|
135
124
|
*/
|
|
136
|
-
this.verificationLoadingMessage = "
|
|
125
|
+
this.verificationLoadingMessage = "Check verification status:";
|
|
137
126
|
h(this);
|
|
138
127
|
}
|
|
139
128
|
disconnectedCallback() { }
|
|
@@ -146,7 +135,7 @@ const PortalEmailVerification = class {
|
|
|
146
135
|
};
|
|
147
136
|
function usePortalEmailVerificationDemo(props) {
|
|
148
137
|
return cjs({
|
|
149
|
-
states: { error: "", loading: false, success: false },
|
|
138
|
+
states: { error: "", loading: false, success: false, countdown: 10 },
|
|
150
139
|
callbacks: {
|
|
151
140
|
submit: async (_event) => { },
|
|
152
141
|
},
|