@cal.macconnachie/web-components 2.2.1 → 2.3.1

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
@@ -5,8 +5,6 @@ import { nothing } from 'lit';
5
5
  import { PropertyValues } from 'lit';
6
6
  import { TemplateResult } from 'lit-html';
7
7
 
8
- export declare const apiClient: ({ baseUrl }: ApiClientConfig) => AxiosInstance;
9
-
10
8
  declare interface ApiClientConfig {
11
9
  baseUrl: string;
12
10
  }
package/dist/index.js CHANGED
@@ -1513,6 +1513,18 @@ class E extends L {
1513
1513
  const { user: e } = await this.getApiService().checkSession();
1514
1514
  e && this.handleAuthSuccess(e);
1515
1515
  } catch {
1516
+ try {
1517
+ window.__authRefreshPromise || (window.__authRefreshPromise = (async () => {
1518
+ try {
1519
+ await this.getApiService().refresh();
1520
+ } finally {
1521
+ window.__authRefreshPromise = null;
1522
+ }
1523
+ })()), await window.__authRefreshPromise;
1524
+ const { user: t } = await this.getApiService().checkSession();
1525
+ t && this.handleAuthSuccess(t);
1526
+ } catch {
1527
+ }
1516
1528
  }
1517
1529
  }
1518
1530
  firstUpdated() {
@@ -5386,7 +5398,6 @@ class Ce extends L {
5386
5398
  <div
5387
5399
  style="
5388
5400
  --icon-size: ${this.size};
5389
- --icon-color: ${this.color};
5390
5401
  "
5391
5402
  >
5392
5403
  ${Rr(this.svgContent)}
@@ -7705,7 +7716,7 @@ Ve([
7705
7716
  Ve([
7706
7717
  u({ type: String, attribute: "position", reflect: !0 })
7707
7718
  ], Te.prototype, "position");
7708
- function wa({
7719
+ function ya({
7709
7720
  message: r,
7710
7721
  variant: e = "default",
7711
7722
  position: t = "top-right",
@@ -9957,7 +9968,7 @@ class Sr extends Error {
9957
9968
  super(e), this.name = "AuthRefreshError";
9958
9969
  }
9959
9970
  }
9960
- const ma = ({ baseUrl: r }) => {
9971
+ const wa = ({ baseUrl: r }) => {
9961
9972
  const e = O.create({
9962
9973
  baseURL: r,
9963
9974
  headers: {
@@ -10019,8 +10030,8 @@ const ma = ({ baseUrl: r }) => {
10019
10030
  return Promise.reject(o);
10020
10031
  }
10021
10032
  ), e;
10022
- }, xa = ma;
10023
- function $a() {
10033
+ };
10034
+ function xa() {
10024
10035
  Ns(), Fs(), js(), Zs(), Js(), Gs(), So(), Eo(), Ao(), Po(), Ro(), zo(), Ws(), Io(), Bo(), No();
10025
10036
  }
10026
10037
  export {
@@ -10041,9 +10052,8 @@ export {
10041
10052
  Te as BaseToast,
10042
10053
  Pe as QuantitySelect,
10043
10054
  Oe as ThemeToggle,
10044
- xa as apiClient,
10045
- ma as createApiClient,
10046
- $a as registerAll,
10055
+ wa as createApiClient,
10056
+ xa as registerAll,
10047
10057
  Ns as registerAuthForm,
10048
10058
  Fs as registerBaseButton,
10049
10059
  js as registerBaseCard,
@@ -10060,5 +10070,5 @@ export {
10060
10070
  Io as registerBaseToast,
10061
10071
  Bo as registerQuantitySelect,
10062
10072
  No as registerThemeToggle,
10063
- wa as showToast
10073
+ ya as showToast
10064
10074
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cal.macconnachie/web-components",
3
- "version": "2.2.1",
3
+ "version": "2.3.1",
4
4
  "description": "Web components hosted on a CDN",
5
5
  "keywords": [
6
6
  "web-components",