@cal.macconnachie/web-components 0.0.19 → 0.0.20

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.
Files changed (2) hide show
  1. package/dist/index.js +35 -35
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -63,7 +63,7 @@ const { is: Cs, defineProperty: Os, getOwnPropertyDescriptor: xs, getOwnProperty
63
63
  }
64
64
  }
65
65
  return s;
66
- } }, Ze = (t, e) => !Cs(t, e), gt = { attribute: !0, type: String, converter: ke, reflect: !1, useDefault: !1, hasChanged: Ze };
66
+ } }, Xe = (t, e) => !Cs(t, e), gt = { attribute: !0, type: String, converter: ke, reflect: !1, useDefault: !1, hasChanged: Xe };
67
67
  Symbol.metadata ??= Symbol("metadata"), xe.litPropertyMetadata ??= /* @__PURE__ */ new WeakMap();
68
68
  let Q = class extends HTMLElement {
69
69
  static addInitializer(e) {
@@ -178,7 +178,7 @@ let Q = class extends HTMLElement {
178
178
  requestUpdate(e, s, r) {
179
179
  if (e !== void 0) {
180
180
  const i = this.constructor, o = this[e];
181
- if (r ??= i.getPropertyOptions(e), !((r.hasChanged ?? Ze)(o, s) || r.useDefault && r.reflect && o === this._$Ej?.get(e) && !this.hasAttribute(i._$Eu(e, r)))) return;
181
+ if (r ??= i.getPropertyOptions(e), !((r.hasChanged ?? Xe)(o, s) || r.useDefault && r.reflect && o === this._$Ej?.get(e) && !this.hasAttribute(i._$Eu(e, r)))) return;
182
182
  this.C(e, s, r);
183
183
  }
184
184
  this.isUpdatePending === !1 && (this._$ES = this._$EP());
@@ -247,7 +247,7 @@ let Q = class extends HTMLElement {
247
247
  }
248
248
  };
249
249
  Q.elementStyles = [], Q.shadowRootOptions = { mode: "open" }, Q[de("elementProperties")] = /* @__PURE__ */ new Map(), Q[de("finalized")] = /* @__PURE__ */ new Map(), Ns?.({ ReactiveElement: Q }), (xe.reactiveElementVersions ??= []).push("2.1.1");
250
- const Xe = globalThis, Ce = Xe.trustedTypes, yt = Ce ? Ce.createPolicy("lit-html", { createHTML: (t) => t }) : void 0, Vt = "$lit$", j = `lit$${Math.random().toFixed(9).slice(2)}$`, Wt = "?" + j, Ls = `<${Wt}>`, G = document, ue = () => G.createComment(""), pe = (t) => t === null || typeof t != "object" && typeof t != "function", Qe = Array.isArray, Is = (t) => Qe(t) || typeof t?.[Symbol.iterator] == "function", He = `[
250
+ const Ze = globalThis, Ce = Ze.trustedTypes, yt = Ce ? Ce.createPolicy("lit-html", { createHTML: (t) => t }) : void 0, Vt = "$lit$", j = `lit$${Math.random().toFixed(9).slice(2)}$`, Wt = "?" + j, Ls = `<${Wt}>`, G = document, ue = () => G.createComment(""), pe = (t) => t === null || typeof t != "object" && typeof t != "function", Qe = Array.isArray, Is = (t) => Qe(t) || typeof t?.[Symbol.iterator] == "function", He = `[
251
251
  \f\r]`, le = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, bt = /-->/g, wt = />/g, K = RegExp(`>|${He}(?:([^\\s"'>=/]+)(${He}*=${He}*(?:[^
252
252
  \f\r"'\`<>=]|("|')|))|$)`, "g"), St = /'/g, $t = /"/g, Yt = /^(?:script|style|textarea|title)$/i, Bs = (t) => (e, ...s) => ({ _$litType$: t, strings: e, values: s }), w = Bs(1), M = Symbol.for("lit-noChange"), S = Symbol.for("lit-nothing"), At = /* @__PURE__ */ new WeakMap(), W = G.createTreeWalker(G, 129);
253
253
  function Jt(t, e) {
@@ -461,8 +461,8 @@ class zs {
461
461
  te(this, e);
462
462
  }
463
463
  }
464
- const Ks = { I: re }, Vs = Xe.litHtmlPolyfillSupport;
465
- Vs?.(fe, re), (Xe.litHtmlVersions ??= []).push("3.3.1");
464
+ const Ks = { I: re }, Vs = Ze.litHtmlPolyfillSupport;
465
+ Vs?.(fe, re), (Ze.litHtmlVersions ??= []).push("3.3.1");
466
466
  const Ws = (t, e, s) => {
467
467
  const r = s?.renderBefore ?? e;
468
468
  let i = r._$litPart$;
@@ -504,7 +504,7 @@ const Gt = (t) => (e, s) => {
504
504
  customElements.define(t, e);
505
505
  })) : customElements.define(t, e);
506
506
  };
507
- const Js = { attribute: !0, type: String, converter: ke, reflect: !1, hasChanged: Ze }, Gs = (t = Js, e, s) => {
507
+ const Js = { attribute: !0, type: String, converter: ke, reflect: !1, hasChanged: Xe }, Gs = (t = Js, e, s) => {
508
508
  const { kind: r, metadata: i } = s;
509
509
  let o = globalThis.litPropertyMetadata.get(i);
510
510
  if (o === void 0 && globalThis.litPropertyMetadata.set(i, o = /* @__PURE__ */ new Map()), r === "setter" && ((t = Object.create(t)).wrapped = !0), o.set(s.name, t), r === "accessor") {
@@ -534,16 +534,16 @@ function O(t) {
534
534
  function T(t) {
535
535
  return O({ ...t, state: !0, attribute: !1 });
536
536
  }
537
- const Zs = (t, e, s) => (s.configurable = !0, s.enumerable = !0, Reflect.decorate && typeof e != "object" && Object.defineProperty(t, e, s), s);
537
+ const Xs = (t, e, s) => (s.configurable = !0, s.enumerable = !0, Reflect.decorate && typeof e != "object" && Object.defineProperty(t, e, s), s);
538
538
  function tt(t, e) {
539
539
  return (s, r, i) => {
540
540
  const o = (n) => n.renderRoot?.querySelector(t) ?? null;
541
- return Zs(s, r, { get() {
541
+ return Xs(s, r, { get() {
542
542
  return o(this);
543
543
  } });
544
544
  };
545
545
  }
546
- const Zt = { ATTRIBUTE: 1, CHILD: 2 }, Xt = (t) => (...e) => ({ _$litDirective$: t, values: e });
546
+ const Xt = { ATTRIBUTE: 1, CHILD: 2 }, Zt = (t) => (...e) => ({ _$litDirective$: t, values: e });
547
547
  class Qt {
548
548
  constructor(e) {
549
549
  }
@@ -560,9 +560,9 @@ class Qt {
560
560
  return this.render(...s);
561
561
  }
562
562
  }
563
- const vt = Xt(class extends Qt {
563
+ const vt = Zt(class extends Qt {
564
564
  constructor(t) {
565
- if (super(t), t.type !== Zt.ATTRIBUTE || t.name !== "class" || t.strings?.length > 2) throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.");
565
+ if (super(t), t.type !== Xt.ATTRIBUTE || t.name !== "class" || t.strings?.length > 2) throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.");
566
566
  }
567
567
  render(t) {
568
568
  return " " + Object.keys(t).filter(((e) => t[e])).join(" ") + " ";
@@ -582,11 +582,11 @@ const vt = Xt(class extends Qt {
582
582
  return M;
583
583
  }
584
584
  });
585
- const { I: Xs } = Ks, Et = () => document.createComment(""), ce = (t, e, s) => {
585
+ const { I: Zs } = Ks, Et = () => document.createComment(""), ce = (t, e, s) => {
586
586
  const r = t._$AA.parentNode, i = e === void 0 ? t._$AB : e._$AA;
587
587
  if (s === void 0) {
588
588
  const o = r.insertBefore(Et(), i), n = r.insertBefore(Et(), i);
589
- s = new Xs(o, n, t, t.options);
589
+ s = new Zs(o, n, t, t.options);
590
590
  } else {
591
591
  const o = s._$AB.nextSibling, n = s._$AM, a = n !== t;
592
592
  if (a) {
@@ -609,9 +609,9 @@ const _t = (t, e, s) => {
609
609
  const r = /* @__PURE__ */ new Map();
610
610
  for (let i = e; i <= s; i++) r.set(t[i], i);
611
611
  return r;
612
- }, Tt = Xt(class extends Qt {
612
+ }, Tt = Zt(class extends Qt {
613
613
  constructor(t) {
614
- if (super(t), t.type !== Zt.CHILD) throw Error("repeat() can only be used in text expressions");
614
+ if (super(t), t.type !== Xt.CHILD) throw Error("repeat() can only be used in text expressions");
615
615
  }
616
616
  dt(t, e, s) {
617
617
  let r;
@@ -3085,7 +3085,7 @@ $.from = (t, e, s, r, i, o) => {
3085
3085
  const a = t && t.message ? t.message : "Error", l = e == null && t ? t.code : e;
3086
3086
  return $.call(n, a, l, s, r, i), t && n.cause == null && Object.defineProperty(n, "cause", { value: t, configurable: !0 }), n.name = t && t.name || "Error", o && Object.assign(n, o), n;
3087
3087
  };
3088
- const Zr = null;
3088
+ const Xr = null;
3089
3089
  function Ve(t) {
3090
3090
  return d.isPlainObject(t) || d.isArray(t);
3091
3091
  }
@@ -3097,7 +3097,7 @@ function Ct(t, e, s) {
3097
3097
  return i = us(i), !s && o ? "[" + i + "]" : i;
3098
3098
  }).join(s ? "." : "") : e;
3099
3099
  }
3100
- function Xr(t) {
3100
+ function Zr(t) {
3101
3101
  return d.isArray(t) && !t.some(Ve);
3102
3102
  }
3103
3103
  const Qr = d.toFlatObject(d, {}, null, function(e) {
@@ -3131,7 +3131,7 @@ function Ne(t, e, s) {
3131
3131
  if (p && !m && typeof p == "object") {
3132
3132
  if (d.endsWith(g, "{}"))
3133
3133
  g = r ? g : g.slice(0, -2), p = JSON.stringify(p);
3134
- else if (d.isArray(p) && Xr(p) || (d.isFileList(p) || d.endsWith(g, "[]")) && (b = d.toArray(p)))
3134
+ else if (d.isArray(p) && Zr(p) || (d.isFileList(p) || d.endsWith(g, "[]")) && (b = d.toArray(p)))
3135
3135
  return g = us(g), b.forEach(function(E, k) {
3136
3136
  !(d.isUndefined(E) || E === null) && e.append(
3137
3137
  // eslint-disable-next-line no-nested-ternary
@@ -3733,7 +3733,7 @@ function ws(t, e, s) {
3733
3733
  return t && (r || s == !1) ? _i(t, e) : e;
3734
3734
  }
3735
3735
  const Ut = (t) => t instanceof D ? { ...t } : t;
3736
- function Z(t, e) {
3736
+ function X(t, e) {
3737
3737
  e = e || {};
3738
3738
  const s = {};
3739
3739
  function r(h, c, u, f) {
@@ -3798,7 +3798,7 @@ function Z(t, e) {
3798
3798
  }), s;
3799
3799
  }
3800
3800
  const Ss = (t) => {
3801
- const e = Z({}, t);
3801
+ const e = X({}, t);
3802
3802
  let { data: s, withXSRFToken: r, xsrfHeaderName: i, xsrfCookieName: o, headers: n, auth: a } = e;
3803
3803
  if (e.headers = n = D.from(n), e.url = fs(ws(e.baseURL, e.url, e.allowAbsoluteUrls), t.params, t.paramsSerializer), a && n.set(
3804
3804
  "Authorization",
@@ -4041,8 +4041,8 @@ const Ss = (t) => {
4041
4041
  method: "POST",
4042
4042
  body: b,
4043
4043
  duplex: "half"
4044
- }), X;
4045
- if (d.isFormData(b) && (X = H.headers.get("content-type")) && Ie.setContentType(X), H.body) {
4044
+ }), Z;
4045
+ if (d.isFormData(b) && (Z = H.headers.get("content-type")) && Ie.setContentType(Z), H.body) {
4046
4046
  const [Be, $e] = Pt(
4047
4047
  ct,
4048
4048
  Oe(Dt(q))
@@ -4068,8 +4068,8 @@ const Ss = (t) => {
4068
4068
  ["status", "statusText", "headers"].forEach((ut) => {
4069
4069
  H[ut] = B[ut];
4070
4070
  });
4071
- const X = d.toFiniteNumber(B.headers.get("content-length")), [Be, $e] = R && Pt(
4072
- X,
4071
+ const Z = d.toFiniteNumber(B.headers.get("content-length")), [Be, $e] = R && Pt(
4072
+ Z,
4073
4073
  Oe(Dt(R), !0)
4074
4074
  ) || [];
4075
4075
  B = new r(
@@ -4081,8 +4081,8 @@ const Ss = (t) => {
4081
4081
  }
4082
4082
  U = U || "text";
4083
4083
  let _s = await u[d.findKey(u, U) || "text"](B, p);
4084
- return !dt && z && z(), await new Promise((H, X) => {
4085
- bs(H, X, {
4084
+ return !dt && z && z(), await new Promise((H, Z) => {
4085
+ bs(H, Z, {
4086
4086
  data: _s,
4087
4087
  headers: D.from(B.headers),
4088
4088
  status: B.status,
@@ -4114,7 +4114,7 @@ const Ss = (t) => {
4114
4114
  };
4115
4115
  $s();
4116
4116
  const ot = {
4117
- http: Zr,
4117
+ http: Xr,
4118
4118
  xhr: ki,
4119
4119
  fetch: {
4120
4120
  get: $s
@@ -4269,7 +4269,7 @@ class J {
4269
4269
  }
4270
4270
  }
4271
4271
  _request(e, s) {
4272
- typeof e == "string" ? (s = s || {}, s.url = e) : s = e || {}, s = Z(this.defaults, s);
4272
+ typeof e == "string" ? (s = s || {}, s.url = e) : s = e || {}, s = X(this.defaults, s);
4273
4273
  const { transitional: r, paramsSerializer: i, headers: o } = s;
4274
4274
  r !== void 0 && Te.assertOptions(r, {
4275
4275
  silentJSONParsing: I.transitional(I.boolean),
@@ -4331,14 +4331,14 @@ class J {
4331
4331
  return c;
4332
4332
  }
4333
4333
  getUri(e) {
4334
- e = Z(this.defaults, e);
4334
+ e = X(this.defaults, e);
4335
4335
  const s = ws(e.baseURL, e.url, e.allowAbsoluteUrls);
4336
4336
  return fs(s, e.params, e.paramsSerializer);
4337
4337
  }
4338
4338
  }
4339
4339
  d.forEach(["delete", "get", "head", "options"], function(e) {
4340
4340
  J.prototype[e] = function(s, r) {
4341
- return this.request(Z(r || {}, {
4341
+ return this.request(X(r || {}, {
4342
4342
  method: e,
4343
4343
  url: s,
4344
4344
  data: (r || {}).data
@@ -4348,7 +4348,7 @@ d.forEach(["delete", "get", "head", "options"], function(e) {
4348
4348
  d.forEach(["post", "put", "patch"], function(e) {
4349
4349
  function s(r) {
4350
4350
  return function(o, n, a) {
4351
- return this.request(Z(a || {}, {
4351
+ return this.request(X(a || {}, {
4352
4352
  method: e,
4353
4353
  headers: r ? {
4354
4354
  "Content-Type": "multipart/form-data"
@@ -4518,7 +4518,7 @@ Object.entries(Ye).forEach(([t, e]) => {
4518
4518
  function Es(t) {
4519
4519
  const e = new J(t), s = ss(J.prototype.request, e);
4520
4520
  return d.extend(s, J.prototype, e, { allOwnKeys: !0 }), d.extend(s, e, null, { allOwnKeys: !0 }), s.create = function(i) {
4521
- return Es(Z(t, i));
4521
+ return Es(X(t, i));
4522
4522
  }, s;
4523
4523
  }
4524
4524
  const C = Es(be);
@@ -4535,7 +4535,7 @@ C.all = function(e) {
4535
4535
  };
4536
4536
  C.spread = Bi;
4537
4537
  C.isAxiosError = Hi;
4538
- C.mergeConfig = Z;
4538
+ C.mergeConfig = X;
4539
4539
  C.AxiosHeaders = D;
4540
4540
  C.formToJSON = (t) => gs(d.isHTMLForm(t) ? new FormData(t) : t);
4541
4541
  C.getAdapter = As.getAdapter;
@@ -4556,8 +4556,8 @@ const ji = ({ baseUrl: t, apiBaseUrl: e }) => {
4556
4556
  let o = !1, n = null;
4557
4557
  return i.interceptors.request.use(
4558
4558
  (a) => {
4559
- const l = s.getAuthToken("AUTH_TOKEN");
4560
- return l && a.headers && (a.headers.Authorization = `Bearer ${l}`), a;
4559
+ const l = s.getAuthToken("AUTH_TOKEN"), h = s.getAuthToken("ACCESS_TOKEN");
4560
+ return l && a.headers && (a.headers.Authorization = `Bearer ${l}`, a.headers["X-Access-Token"] = h), a;
4561
4561
  },
4562
4562
  (a) => Promise.reject(a)
4563
4563
  ), i.interceptors.response.use(
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cal.macconnachie/web-components",
3
- "version": "0.0.19",
3
+ "version": "0.0.20",
4
4
  "description": "Web components hosted on a CDN",
5
5
  "keywords": [
6
6
  "lit",