@saasquatch/mint-components 1.13.0-33 → 1.13.0-35
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/sqm-big-stat_38.cjs.entry.js +7 -5
- package/dist/cjs/sqm-stencilbook.cjs.entry.js +1 -1
- package/dist/collection/components/sqm-portal-login/usePortalLogin.js +7 -5
- package/dist/esm/sqm-big-stat_38.entry.js +7 -5
- package/dist/esm/sqm-stencilbook.entry.js +1 -1
- package/dist/esm-es5/sqm-big-stat_38.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-d12a009a.system.entry.js → p-35a20e65.system.entry.js} +1 -1
- package/dist/mint-components/{p-c1a73197.entry.js → p-b015d050.entry.js} +9 -9
- package/dist/mint-components/p-b28caca0.system.entry.js +1 -0
- package/dist/mint-components/{p-b4c8315d.entry.js → p-c450a678.entry.js} +1 -1
- package/dist/mint-components/p-d671e44e.system.js +1 -1
- package/docs/docs.docx +0 -0
- package/package.json +1 -1
- package/dist/mint-components/p-b60231bd.system.entry.js +0 -1
|
@@ -2029,14 +2029,18 @@ function usePortalLogin(props) {
|
|
|
2029
2029
|
if (!((_a = e.detail) === null || _a === void 0 ? void 0 : _a.credential))
|
|
2030
2030
|
return;
|
|
2031
2031
|
const result = await loginWithGoogle({ idToken: e.detail.credential });
|
|
2032
|
+
console.log(result, "googleResult");
|
|
2032
2033
|
if (result instanceof Error) {
|
|
2033
|
-
console.log(result, "resultGoogleError");
|
|
2034
2034
|
if ((result === null || result === void 0 ? void 0 : result.message) || ((_b = result === null || result === void 0 ? void 0 : result["response"]) === null || _b === void 0 ? void 0 : _b["error"]))
|
|
2035
|
-
|
|
2035
|
+
if (result.message === "Invalid Credentials.") {
|
|
2036
|
+
setError(props.googleUserNotRegisteredError);
|
|
2037
|
+
}
|
|
2038
|
+
else {
|
|
2039
|
+
setError(props.networkErrorMessage);
|
|
2040
|
+
}
|
|
2036
2041
|
return;
|
|
2037
2042
|
}
|
|
2038
2043
|
if ((_c = result.authenticateManagedIdentityWithGoogle) === null || _c === void 0 ? void 0 : _c.token) {
|
|
2039
|
-
console.log(result, "resultGoogle");
|
|
2040
2044
|
urlParams.delete("nextPage");
|
|
2041
2045
|
const url = utils.sanitizeUrlPath(nextPageOverride || props.nextPage);
|
|
2042
2046
|
index_module.jn.push(url.href);
|
|
@@ -2052,13 +2056,11 @@ function usePortalLogin(props) {
|
|
|
2052
2056
|
const variables = { email: formData.email, password: formData.password };
|
|
2053
2057
|
const result = await request(variables);
|
|
2054
2058
|
if (result instanceof Error) {
|
|
2055
|
-
console.log(result, "resultRegular");
|
|
2056
2059
|
if ((result === null || result === void 0 ? void 0 : result.message) || ((_a = result === null || result === void 0 ? void 0 : result["response"]) === null || _a === void 0 ? void 0 : _a["error"]))
|
|
2057
2060
|
setError(props.networkErrorMessage);
|
|
2058
2061
|
return;
|
|
2059
2062
|
}
|
|
2060
2063
|
if ((_b = result.authenticateManagedIdentityWithEmailAndPassword) === null || _b === void 0 ? void 0 : _b.token) {
|
|
2061
|
-
console.log(result, "resultRegular");
|
|
2062
2064
|
urlParams.delete("nextPage");
|
|
2063
2065
|
const url = utils.sanitizeUrlPath(nextPageOverride || props.nextPage);
|
|
2064
2066
|
index_module.jn.push(url.href);
|
|
@@ -10134,7 +10134,7 @@ const emailVerifiedTemplate = "<sqm-portal-verify-email></sqm-portal-verify-emai
|
|
|
10134
10134
|
|
|
10135
10135
|
const emailVerificationTemplate = "<sqm-portal-protected-route redirect-to=\"/login\"></sqm-portal-protected-route>\n<sqm-portal-email-verification></sqm-portal-email-verification>\n";
|
|
10136
10136
|
|
|
10137
|
-
const LoginReadme = "# sqm-portal-login\n\n\n\n<!-- Auto Generated Below -->\n\n\n## Properties\n\n| Property
|
|
10137
|
+
const LoginReadme = "# sqm-portal-login\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; forgotPasswordPath: string; registerPath: string; }; content?: { googleButton?: VNode; forgotPasswordButton?: any; secondaryButton?: any; emailLabel?: string; passwordLabel?: string; submitLabel?: string; pageLabel?: string; }; }` | `undefined` |\n| `emailLabel` | `email-label` | | `string` | `\"Email\"` |\n| `forgotPasswordLabel` | `forgot-password-label` | | `string` | `\"Forgot Password?\"` |\n| `forgotPasswordPath` | `forgot-password-path` | Redirect participants to this page to reset their password | `string` | `\"/forgotPassword\"` |\n| `googleUserNotRegisteredError` | `google-user-not-registered-error` | | `string` | `\"Google user has not registered on our platform. Please complete the registration process with your Google account.\"` |\n| `networkErrorMessage` | `network-error-message` | | `string` | `\"An error occurred while logging you in. Please refresh the page and try again.\"` |\n| `nextPage` | `next-page` | Redirect participants to this page after they successfully login. | `string` | `\"/\"` |\n| `pageLabel` | `page-label` | | `string` | `\"Sign in to your account\"` |\n| `passwordLabel` | `password-label` | | `string` | `\"Password\"` |\n| `registerCTA` | `register-c-t-a` | | `string` | `\"Don't have an account?\"` |\n| `registerLabel` | `register-label` | | `string` | `\"Register\"` |\n| `registerPath` | `register-path` | Redirect participants to this page to start registration. | `string` | `\"/register\"` |\n| `showGoogleLogin` | `show-google-login` | | `boolean` | `false` |\n| `submitLabel` | `submit-label` | | `string` | `\"Sign In\"` |\n\n\n## Dependencies\n\n### Used by\n\n - [sqm-stencilbook](../sqm-stencilbook)\n\n### Depends on\n\n- [sqm-google-sign-in](../sqm-google-sign-in)\n- [sqm-form-message](../sqm-form-message)\n\n### Graph\n```mermaid\ngraph TD;\n sqm-portal-login --> sqm-google-sign-in\n sqm-portal-login --> sqm-form-message\n sqm-stencilbook --> sqm-portal-login\n style sqm-portal-login fill:#f9f,stroke:#333,stroke-width:4px\n```\n\n----------------------------------------------\n\n*Built with [StencilJS](https://stenciljs.com/)*\n";
|
|
10138
10138
|
|
|
10139
10139
|
const ReferralIframeReadme = "# sqm-referral-iframe\n\n\n\n<!-- Auto Generated Below -->\n\n\n## Properties\n\n| Property | Attribute | Description | Type | Default |\n| -------------- | --------------- | ----------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------ | ----------- |\n| `demoData` | -- | | `{ states?: { content: { iframeSrc: string; iframeHeight: string; iframeWidth: string; }; }; data?: { shareCode: string; }; }` | `undefined` |\n| `iframeHeight` | `iframe-height` | Define the height of the iframe with any valid CSS height value. Example: 100px, 5rem, or auto. | `string` | `\"100%\"` |\n| `iframeSrc` | `iframe-src` | URL of iframe to display | `string` | `undefined` |\n| `iframeWidth` | `iframe-width` | Define the width of the iframe with any valid CSS width value. Example: 100px, 5rem, or auto. | `string` | `\"100%\"` |\n\n\n## Dependencies\n\n### Used by\n\n - [sqm-stencilbook](../sqm-stencilbook)\n\n### Graph\n```mermaid\ngraph TD;\n sqm-stencilbook --> sqm-referral-iframe\n style sqm-referral-iframe fill:#f9f,stroke:#333,stroke-width:4px\n```\n\n----------------------------------------------\n\n*Built with [StencilJS](https://stenciljs.com/)*\n";
|
|
10140
10140
|
|
|
@@ -14,14 +14,18 @@ export function usePortalLogin(props) {
|
|
|
14
14
|
if (!((_a = e.detail) === null || _a === void 0 ? void 0 : _a.credential))
|
|
15
15
|
return;
|
|
16
16
|
const result = await loginWithGoogle({ idToken: e.detail.credential });
|
|
17
|
+
console.log(result, "googleResult");
|
|
17
18
|
if (result instanceof Error) {
|
|
18
|
-
console.log(result, "resultGoogleError");
|
|
19
19
|
if ((result === null || result === void 0 ? void 0 : result.message) || ((_b = result === null || result === void 0 ? void 0 : result["response"]) === null || _b === void 0 ? void 0 : _b["error"]))
|
|
20
|
-
|
|
20
|
+
if (result.message === "Invalid Credentials.") {
|
|
21
|
+
setError(props.googleUserNotRegisteredError);
|
|
22
|
+
}
|
|
23
|
+
else {
|
|
24
|
+
setError(props.networkErrorMessage);
|
|
25
|
+
}
|
|
21
26
|
return;
|
|
22
27
|
}
|
|
23
28
|
if ((_c = result.authenticateManagedIdentityWithGoogle) === null || _c === void 0 ? void 0 : _c.token) {
|
|
24
|
-
console.log(result, "resultGoogle");
|
|
25
29
|
urlParams.delete("nextPage");
|
|
26
30
|
const url = sanitizeUrlPath(nextPageOverride || props.nextPage);
|
|
27
31
|
navigation.push(url.href);
|
|
@@ -37,13 +41,11 @@ export function usePortalLogin(props) {
|
|
|
37
41
|
const variables = { email: formData.email, password: formData.password };
|
|
38
42
|
const result = await request(variables);
|
|
39
43
|
if (result instanceof Error) {
|
|
40
|
-
console.log(result, "resultRegular");
|
|
41
44
|
if ((result === null || result === void 0 ? void 0 : result.message) || ((_a = result === null || result === void 0 ? void 0 : result["response"]) === null || _a === void 0 ? void 0 : _a["error"]))
|
|
42
45
|
setError(props.networkErrorMessage);
|
|
43
46
|
return;
|
|
44
47
|
}
|
|
45
48
|
if ((_b = result.authenticateManagedIdentityWithEmailAndPassword) === null || _b === void 0 ? void 0 : _b.token) {
|
|
46
|
-
console.log(result, "resultRegular");
|
|
47
49
|
urlParams.delete("nextPage");
|
|
48
50
|
const url = sanitizeUrlPath(nextPageOverride || props.nextPage);
|
|
49
51
|
navigation.push(url.href);
|
|
@@ -2025,14 +2025,18 @@ function usePortalLogin(props) {
|
|
|
2025
2025
|
if (!((_a = e.detail) === null || _a === void 0 ? void 0 : _a.credential))
|
|
2026
2026
|
return;
|
|
2027
2027
|
const result = await loginWithGoogle({ idToken: e.detail.credential });
|
|
2028
|
+
console.log(result, "googleResult");
|
|
2028
2029
|
if (result instanceof Error) {
|
|
2029
|
-
console.log(result, "resultGoogleError");
|
|
2030
2030
|
if ((result === null || result === void 0 ? void 0 : result.message) || ((_b = result === null || result === void 0 ? void 0 : result["response"]) === null || _b === void 0 ? void 0 : _b["error"]))
|
|
2031
|
-
|
|
2031
|
+
if (result.message === "Invalid Credentials.") {
|
|
2032
|
+
setError(props.googleUserNotRegisteredError);
|
|
2033
|
+
}
|
|
2034
|
+
else {
|
|
2035
|
+
setError(props.networkErrorMessage);
|
|
2036
|
+
}
|
|
2032
2037
|
return;
|
|
2033
2038
|
}
|
|
2034
2039
|
if ((_c = result.authenticateManagedIdentityWithGoogle) === null || _c === void 0 ? void 0 : _c.token) {
|
|
2035
|
-
console.log(result, "resultGoogle");
|
|
2036
2040
|
urlParams.delete("nextPage");
|
|
2037
2041
|
const url = sanitizeUrlPath(nextPageOverride || props.nextPage);
|
|
2038
2042
|
jn.push(url.href);
|
|
@@ -2048,13 +2052,11 @@ function usePortalLogin(props) {
|
|
|
2048
2052
|
const variables = { email: formData.email, password: formData.password };
|
|
2049
2053
|
const result = await request(variables);
|
|
2050
2054
|
if (result instanceof Error) {
|
|
2051
|
-
console.log(result, "resultRegular");
|
|
2052
2055
|
if ((result === null || result === void 0 ? void 0 : result.message) || ((_a = result === null || result === void 0 ? void 0 : result["response"]) === null || _a === void 0 ? void 0 : _a["error"]))
|
|
2053
2056
|
setError(props.networkErrorMessage);
|
|
2054
2057
|
return;
|
|
2055
2058
|
}
|
|
2056
2059
|
if ((_b = result.authenticateManagedIdentityWithEmailAndPassword) === null || _b === void 0 ? void 0 : _b.token) {
|
|
2057
|
-
console.log(result, "resultRegular");
|
|
2058
2060
|
urlParams.delete("nextPage");
|
|
2059
2061
|
const url = sanitizeUrlPath(nextPageOverride || props.nextPage);
|
|
2060
2062
|
jn.push(url.href);
|
|
@@ -10130,7 +10130,7 @@ const emailVerifiedTemplate = "<sqm-portal-verify-email></sqm-portal-verify-emai
|
|
|
10130
10130
|
|
|
10131
10131
|
const emailVerificationTemplate = "<sqm-portal-protected-route redirect-to=\"/login\"></sqm-portal-protected-route>\n<sqm-portal-email-verification></sqm-portal-email-verification>\n";
|
|
10132
10132
|
|
|
10133
|
-
const LoginReadme = "# sqm-portal-login\n\n\n\n<!-- Auto Generated Below -->\n\n\n## Properties\n\n| Property
|
|
10133
|
+
const LoginReadme = "# sqm-portal-login\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; forgotPasswordPath: string; registerPath: string; }; content?: { googleButton?: VNode; forgotPasswordButton?: any; secondaryButton?: any; emailLabel?: string; passwordLabel?: string; submitLabel?: string; pageLabel?: string; }; }` | `undefined` |\n| `emailLabel` | `email-label` | | `string` | `\"Email\"` |\n| `forgotPasswordLabel` | `forgot-password-label` | | `string` | `\"Forgot Password?\"` |\n| `forgotPasswordPath` | `forgot-password-path` | Redirect participants to this page to reset their password | `string` | `\"/forgotPassword\"` |\n| `googleUserNotRegisteredError` | `google-user-not-registered-error` | | `string` | `\"Google user has not registered on our platform. Please complete the registration process with your Google account.\"` |\n| `networkErrorMessage` | `network-error-message` | | `string` | `\"An error occurred while logging you in. Please refresh the page and try again.\"` |\n| `nextPage` | `next-page` | Redirect participants to this page after they successfully login. | `string` | `\"/\"` |\n| `pageLabel` | `page-label` | | `string` | `\"Sign in to your account\"` |\n| `passwordLabel` | `password-label` | | `string` | `\"Password\"` |\n| `registerCTA` | `register-c-t-a` | | `string` | `\"Don't have an account?\"` |\n| `registerLabel` | `register-label` | | `string` | `\"Register\"` |\n| `registerPath` | `register-path` | Redirect participants to this page to start registration. | `string` | `\"/register\"` |\n| `showGoogleLogin` | `show-google-login` | | `boolean` | `false` |\n| `submitLabel` | `submit-label` | | `string` | `\"Sign In\"` |\n\n\n## Dependencies\n\n### Used by\n\n - [sqm-stencilbook](../sqm-stencilbook)\n\n### Depends on\n\n- [sqm-google-sign-in](../sqm-google-sign-in)\n- [sqm-form-message](../sqm-form-message)\n\n### Graph\n```mermaid\ngraph TD;\n sqm-portal-login --> sqm-google-sign-in\n sqm-portal-login --> sqm-form-message\n sqm-stencilbook --> sqm-portal-login\n style sqm-portal-login fill:#f9f,stroke:#333,stroke-width:4px\n```\n\n----------------------------------------------\n\n*Built with [StencilJS](https://stenciljs.com/)*\n";
|
|
10134
10134
|
|
|
10135
10135
|
const ReferralIframeReadme = "# sqm-referral-iframe\n\n\n\n<!-- Auto Generated Below -->\n\n\n## Properties\n\n| Property | Attribute | Description | Type | Default |\n| -------------- | --------------- | ----------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------ | ----------- |\n| `demoData` | -- | | `{ states?: { content: { iframeSrc: string; iframeHeight: string; iframeWidth: string; }; }; data?: { shareCode: string; }; }` | `undefined` |\n| `iframeHeight` | `iframe-height` | Define the height of the iframe with any valid CSS height value. Example: 100px, 5rem, or auto. | `string` | `\"100%\"` |\n| `iframeSrc` | `iframe-src` | URL of iframe to display | `string` | `undefined` |\n| `iframeWidth` | `iframe-width` | Define the width of the iframe with any valid CSS width value. Example: 100px, 5rem, or auto. | `string` | `\"100%\"` |\n\n\n## Dependencies\n\n### Used by\n\n - [sqm-stencilbook](../sqm-stencilbook)\n\n### Graph\n```mermaid\ngraph TD;\n sqm-stencilbook --> sqm-referral-iframe\n style sqm-referral-iframe fill:#f9f,stroke:#333,stroke-width:4px\n```\n\n----------------------------------------------\n\n*Built with [StencilJS](https://stenciljs.com/)*\n";
|
|
10136
10136
|
|