@cal.macconnachie/web-components 2.0.2 → 2.0.3

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/index.d.ts CHANGED
@@ -523,7 +523,12 @@ export declare interface SelectOption {
523
523
 
524
524
  declare type SelectSize = 'sm' | 'md' | 'lg';
525
525
 
526
- export declare function showToast(message: string, variant?: ToastVariant, position?: ToastPosition, dismiss?: DismissBehavior): void;
526
+ export declare function showToast({ message, variant, position, dismiss }: {
527
+ message: string;
528
+ variant?: ToastVariant;
529
+ position?: ToastPosition;
530
+ dismiss?: DismissBehavior;
531
+ }): void;
527
532
 
528
533
  export declare interface TabData {
529
534
  id: string;
package/dist/index.js CHANGED
@@ -1456,7 +1456,7 @@ const Mo = [
1456
1456
  class C extends N {
1457
1457
  constructor() {
1458
1458
  super(...arguments), this.initialMode = "signin", this.logoUrl = "", this.oauthDomain = "", this.oauthRegion = "", this.oauthUserPoolId = "", this.oauthClientId = "", this.oauthRedirectUri = "", this.oauthSpaDomain = "", this.disableSignup = !1, this.mockMode = !1, this.mode = "signin", this.resetStep = "none", this.signupStep = "form", this.isLoading = !1, this.isLoggedIn = !1, this.email = "", this.password = "", this.givenName = "", this.familyName = "", this.newPassword = "", this.confirmPassword = "", this.notice = "", this.error = "", this.errors = {}, this.userEmail = null, this.otpDigits = ["", "", "", "", "", ""], this.signupOtpDigits = ["", "", "", "", "", ""], this.hasHandledOAuthCallback = !1, this.handleAuthRefreshFailed = () => {
1459
- this.isLoggedIn = !1, this.userEmail = null, this.error = "Your session has expired. Please sign in again.";
1459
+ this.isLoggedIn = !1, this.userEmail = null;
1460
1460
  };
1461
1461
  }
1462
1462
  getApiService() {
@@ -2289,7 +2289,7 @@ class C extends N {
2289
2289
  }
2290
2290
  async refresh() {
2291
2291
  try {
2292
- await this.getApiService().refresh();
2292
+ await this.getApiService().refresh(), this.checkExistingSession();
2293
2293
  } catch {
2294
2294
  this.isLoggedIn = !1;
2295
2295
  }
@@ -7291,7 +7291,12 @@ je([
7291
7291
  je([
7292
7292
  m({ type: String, attribute: "position", reflect: !0 })
7293
7293
  ], _e.prototype, "position");
7294
- function Ws(r, e = "default", t = "top-right", i = "2s") {
7294
+ function Ws({
7295
+ message: r,
7296
+ variant: e = "default",
7297
+ position: t = "top-right",
7298
+ dismiss: i = "2s"
7299
+ }) {
7295
7300
  const o = document.createElement("base-toast");
7296
7301
  o.id = `toast-${Date.now()}`, o.setAttribute("variant", e), o.setAttribute("position", t), o.setAttribute("dismiss", i), o.textContent = r, document.body.appendChild(o), o.show(), o.addEventListener("toast-hidden", () => {
7297
7302
  o.remove();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cal.macconnachie/web-components",
3
- "version": "2.0.2",
3
+ "version": "2.0.3",
4
4
  "description": "Web components hosted on a CDN",
5
5
  "keywords": [
6
6
  "web-components",