@saasquatch/mint-components 1.13.0-40 → 1.13.0-41

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.
@@ -2025,14 +2025,13 @@ function usePortalLogin(props) {
2025
2025
  const urlParams = new URLSearchParams(index_module.jn.location.search);
2026
2026
  const nextPageOverride = urlParams.get("nextPage");
2027
2027
  const googleSubmit = async (e) => {
2028
- var _a, _b, _c, _d, _e;
2028
+ var _a, _b, _c, _d;
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
2032
  if (result instanceof Error) {
2033
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"]))
2034
- if (((_d = (_c = result === null || result === void 0 ? void 0 : result["response"]) === null || _c === void 0 ? void 0 : _c["errors"][0]) === null || _d === void 0 ? void 0 : _d["message"]) ===
2035
- "Invalid Credentials.") {
2034
+ if ((_c = result === null || result === void 0 ? void 0 : result["response"]) === null || _c === void 0 ? void 0 : _c["errors"].some((error) => { var _a; return ((_a = error === null || error === void 0 ? void 0 : error["extensions"]) === null || _a === void 0 ? void 0 : _a["message"]) === "Invalid Credentials."; })) {
2036
2035
  setError(props.googleUserNotRegisteredError);
2037
2036
  }
2038
2037
  else {
@@ -2040,7 +2039,7 @@ function usePortalLogin(props) {
2040
2039
  }
2041
2040
  return;
2042
2041
  }
2043
- if ((_e = result.authenticateManagedIdentityWithGoogle) === null || _e === void 0 ? void 0 : _e.token) {
2042
+ if ((_d = result.authenticateManagedIdentityWithGoogle) === null || _d === void 0 ? void 0 : _d.token) {
2044
2043
  urlParams.delete("nextPage");
2045
2044
  const url = utils.sanitizeUrlPath(nextPageOverride || props.nextPage);
2046
2045
  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| `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";
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` | `\"Your google account 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
 
@@ -10,14 +10,13 @@ export function usePortalLogin(props) {
10
10
  const urlParams = new URLSearchParams(navigation.location.search);
11
11
  const nextPageOverride = urlParams.get("nextPage");
12
12
  const googleSubmit = async (e) => {
13
- var _a, _b, _c, _d, _e;
13
+ var _a, _b, _c, _d;
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
17
  if (result instanceof Error) {
18
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"]))
19
- if (((_d = (_c = result === null || result === void 0 ? void 0 : result["response"]) === null || _c === void 0 ? void 0 : _c["errors"][0]) === null || _d === void 0 ? void 0 : _d["message"]) ===
20
- "Invalid Credentials.") {
19
+ if ((_c = result === null || result === void 0 ? void 0 : result["response"]) === null || _c === void 0 ? void 0 : _c["errors"].some((error) => { var _a; return ((_a = error === null || error === void 0 ? void 0 : error["extensions"]) === null || _a === void 0 ? void 0 : _a["message"]) === "Invalid Credentials."; })) {
21
20
  setError(props.googleUserNotRegisteredError);
22
21
  }
23
22
  else {
@@ -25,7 +24,7 @@ export function usePortalLogin(props) {
25
24
  }
26
25
  return;
27
26
  }
28
- if ((_e = result.authenticateManagedIdentityWithGoogle) === null || _e === void 0 ? void 0 : _e.token) {
27
+ if ((_d = result.authenticateManagedIdentityWithGoogle) === null || _d === void 0 ? void 0 : _d.token) {
29
28
  urlParams.delete("nextPage");
30
29
  const url = sanitizeUrlPath(nextPageOverride || props.nextPage);
31
30
  navigation.push(url.href);
@@ -2021,14 +2021,13 @@ function usePortalLogin(props) {
2021
2021
  const urlParams = new URLSearchParams(jn.location.search);
2022
2022
  const nextPageOverride = urlParams.get("nextPage");
2023
2023
  const googleSubmit = async (e) => {
2024
- var _a, _b, _c, _d, _e;
2024
+ var _a, _b, _c, _d;
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
2028
  if (result instanceof Error) {
2029
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"]))
2030
- if (((_d = (_c = result === null || result === void 0 ? void 0 : result["response"]) === null || _c === void 0 ? void 0 : _c["errors"][0]) === null || _d === void 0 ? void 0 : _d["message"]) ===
2031
- "Invalid Credentials.") {
2030
+ if ((_c = result === null || result === void 0 ? void 0 : result["response"]) === null || _c === void 0 ? void 0 : _c["errors"].some((error) => { var _a; return ((_a = error === null || error === void 0 ? void 0 : error["extensions"]) === null || _a === void 0 ? void 0 : _a["message"]) === "Invalid Credentials."; })) {
2032
2031
  setError(props.googleUserNotRegisteredError);
2033
2032
  }
2034
2033
  else {
@@ -2036,7 +2035,7 @@ function usePortalLogin(props) {
2036
2035
  }
2037
2036
  return;
2038
2037
  }
2039
- if ((_e = result.authenticateManagedIdentityWithGoogle) === null || _e === void 0 ? void 0 : _e.token) {
2038
+ if ((_d = result.authenticateManagedIdentityWithGoogle) === null || _d === void 0 ? void 0 : _d.token) {
2040
2039
  urlParams.delete("nextPage");
2041
2040
  const url = sanitizeUrlPath(nextPageOverride || props.nextPage);
2042
2041
  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| `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";
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` | `\"Your google account 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