@saasquatch/mint-components 1.13.0-33 → 1.13.0-34

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.
@@ -2030,13 +2030,16 @@ function usePortalLogin(props) {
2030
2030
  return;
2031
2031
  const result = await loginWithGoogle({ idToken: e.detail.credential });
2032
2032
  if (result instanceof Error) {
2033
- console.log(result, "resultGoogleError");
2034
2033
  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
- setError(props.networkErrorMessage);
2034
+ if (result.message === "Invalid Credentials.") {
2035
+ setError(props.googleUserNotRegisteredError);
2036
+ }
2037
+ else {
2038
+ setError(props.networkErrorMessage);
2039
+ }
2036
2040
  return;
2037
2041
  }
2038
2042
  if ((_c = result.authenticateManagedIdentityWithGoogle) === null || _c === void 0 ? void 0 : _c.token) {
2039
- console.log(result, "resultGoogle");
2040
2043
  urlParams.delete("nextPage");
2041
2044
  const url = utils.sanitizeUrlPath(nextPageOverride || props.nextPage);
2042
2045
  index_module.jn.push(url.href);
@@ -2052,13 +2055,11 @@ function usePortalLogin(props) {
2052
2055
  const variables = { email: formData.email, password: formData.password };
2053
2056
  const result = await request(variables);
2054
2057
  if (result instanceof Error) {
2055
- console.log(result, "resultRegular");
2056
2058
  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
2059
  setError(props.networkErrorMessage);
2058
2060
  return;
2059
2061
  }
2060
2062
  if ((_b = result.authenticateManagedIdentityWithEmailAndPassword) === null || _b === void 0 ? void 0 : _b.token) {
2061
- console.log(result, "resultRegular");
2062
2063
  urlParams.delete("nextPage");
2063
2064
  const url = utils.sanitizeUrlPath(nextPageOverride || props.nextPage);
2064
2065
  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 | 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| `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";
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
 
@@ -15,13 +15,16 @@ export function usePortalLogin(props) {
15
15
  return;
16
16
  const result = await loginWithGoogle({ idToken: e.detail.credential });
17
17
  if (result instanceof Error) {
18
- console.log(result, "resultGoogleError");
19
18
  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
- setError(props.networkErrorMessage);
19
+ if (result.message === "Invalid Credentials.") {
20
+ setError(props.googleUserNotRegisteredError);
21
+ }
22
+ else {
23
+ setError(props.networkErrorMessage);
24
+ }
21
25
  return;
22
26
  }
23
27
  if ((_c = result.authenticateManagedIdentityWithGoogle) === null || _c === void 0 ? void 0 : _c.token) {
24
- console.log(result, "resultGoogle");
25
28
  urlParams.delete("nextPage");
26
29
  const url = sanitizeUrlPath(nextPageOverride || props.nextPage);
27
30
  navigation.push(url.href);
@@ -37,13 +40,11 @@ export function usePortalLogin(props) {
37
40
  const variables = { email: formData.email, password: formData.password };
38
41
  const result = await request(variables);
39
42
  if (result instanceof Error) {
40
- console.log(result, "resultRegular");
41
43
  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
44
  setError(props.networkErrorMessage);
43
45
  return;
44
46
  }
45
47
  if ((_b = result.authenticateManagedIdentityWithEmailAndPassword) === null || _b === void 0 ? void 0 : _b.token) {
46
- console.log(result, "resultRegular");
47
48
  urlParams.delete("nextPage");
48
49
  const url = sanitizeUrlPath(nextPageOverride || props.nextPage);
49
50
  navigation.push(url.href);
@@ -2026,13 +2026,16 @@ function usePortalLogin(props) {
2026
2026
  return;
2027
2027
  const result = await loginWithGoogle({ idToken: e.detail.credential });
2028
2028
  if (result instanceof Error) {
2029
- console.log(result, "resultGoogleError");
2030
2029
  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
- setError(props.networkErrorMessage);
2030
+ if (result.message === "Invalid Credentials.") {
2031
+ setError(props.googleUserNotRegisteredError);
2032
+ }
2033
+ else {
2034
+ setError(props.networkErrorMessage);
2035
+ }
2032
2036
  return;
2033
2037
  }
2034
2038
  if ((_c = result.authenticateManagedIdentityWithGoogle) === null || _c === void 0 ? void 0 : _c.token) {
2035
- console.log(result, "resultGoogle");
2036
2039
  urlParams.delete("nextPage");
2037
2040
  const url = sanitizeUrlPath(nextPageOverride || props.nextPage);
2038
2041
  jn.push(url.href);
@@ -2048,13 +2051,11 @@ function usePortalLogin(props) {
2048
2051
  const variables = { email: formData.email, password: formData.password };
2049
2052
  const result = await request(variables);
2050
2053
  if (result instanceof Error) {
2051
- console.log(result, "resultRegular");
2052
2054
  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
2055
  setError(props.networkErrorMessage);
2054
2056
  return;
2055
2057
  }
2056
2058
  if ((_b = result.authenticateManagedIdentityWithEmailAndPassword) === null || _b === void 0 ? void 0 : _b.token) {
2057
- console.log(result, "resultRegular");
2058
2059
  urlParams.delete("nextPage");
2059
2060
  const url = sanitizeUrlPath(nextPageOverride || props.nextPage);
2060
2061
  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 | 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| `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";
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