@kiva/kv-components 6.9.1 → 6.9.2

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.
@@ -1,4 +1,4 @@
1
- import { toRefs as A, ref as v, computed as d, onMounted as F, resolveComponent as U, openBlock as n, createElementBlock as o, normalizeClass as r, createElementVNode as s, createBlock as p, normalizeStyle as H, createCommentVNode as y, withDirectives as b, vShow as B, toDisplayString as I } from "vue";
1
+ import { toRefs as A, ref as g, computed as d, onMounted as F, resolveComponent as U, openBlock as n, createElementBlock as o, normalizeClass as r, createElementVNode as s, createBlock as p, normalizeStyle as H, createCommentVNode as y, withDirectives as b, vShow as B, toDisplayString as I } from "vue";
2
2
  import { isLegacyPlaceholderAvatar as P, randomizedUserAvatarClass as D } from "../utils/imageUtils.js";
3
3
  import M from "./KvLoadingPlaceholder.js";
4
4
  import N from "../_virtual/_plugin-vue_export-helper.js";
@@ -35,7 +35,7 @@ const V = {
35
35
  lenderName: a,
36
36
  lenderImageUrl: t,
37
37
  isSmall: e
38
- } = A(u), i = v(!0), m = v(null), c = d(() => a.value === "" && t.value === "" || a.value === "Anonymous"), f = () => {
38
+ } = A(u), i = g(!0), c = g(null), w = d(() => a.value === "" && t.value === "" || a.value === "Anonymous"), f = () => {
39
39
  const l = e != null && e.value ? "tw-w-3 tw-h-3 tw-text-h4" : "tw-w-6 tw-h-6 tw-text-h2";
40
40
  return `${D()} ${l}`;
41
41
  }, S = d(() => {
@@ -44,35 +44,35 @@ const V = {
44
44
  }), _ = d(() => {
45
45
  var l;
46
46
  return (l = a == null ? void 0 : a.value) == null ? void 0 : l.substring(0, 1).toUpperCase();
47
- }), g = () => {
47
+ }), h = () => {
48
48
  i.value = !1;
49
- }, C = (l, w = 1e4) => new Promise((L, k) => {
50
- const x = Date.now() + w, h = () => {
51
- l.complete ? L(l) : Date.now() > x ? k(new Error(`Timeout: ${l.src}`)) : setTimeout(h, 50);
49
+ }, C = (l, m = 1e4) => new Promise((L, k) => {
50
+ const x = Date.now() + m, v = () => {
51
+ l != null && l.complete ? L(l) : Date.now() > x ? k(new Error(`Timeout: ${l.src}`)) : setTimeout(v, 50);
52
52
  };
53
- h();
53
+ v();
54
54
  });
55
55
  return F(async () => {
56
- const l = m.value;
56
+ const l = c.value;
57
57
  try {
58
- await C(l), g();
59
- } catch (w) {
60
- console.log(w.message);
58
+ await C(l), h();
59
+ } catch (m) {
60
+ console.log(m.message);
61
61
  }
62
62
  }), {
63
- isAnonymousUser: c,
63
+ isAnonymousUser: w,
64
64
  avatarClass: f,
65
65
  imageFilename: S,
66
66
  lenderNameFirstLetter: _,
67
67
  isLegacyPlaceholderAvatar: P,
68
68
  isLoading: i,
69
- onImgLoad: g,
70
- imageRef: m
69
+ onImgLoad: h,
70
+ imageRef: c
71
71
  };
72
72
  }
73
73
  }, j = { key: 1 }, z = ["src"], E = { class: "tw-self-center" };
74
- function K(u, a, t, e, i, m) {
75
- const c = U("kv-loading-placeholder");
74
+ function K(u, a, t, e, i, c) {
75
+ const w = U("kv-loading-placeholder");
76
76
  return n(), o("div", {
77
77
  class: r(["data-hj-suppress tw-flex", { "tw-w-3": t.isSmall, "tw-w-6": !t.isSmall }])
78
78
  }, [
@@ -102,7 +102,7 @@ function K(u, a, t, e, i, m) {
102
102
  }, null, -1)
103
103
  ]), 2))
104
104
  ], 2)) : !e.isLegacyPlaceholderAvatar(e.imageFilename) && e.imageFilename ? (n(), o("div", j, [
105
- e.isLoading ? (n(), p(c, {
105
+ e.isLoading ? (n(), p(w, {
106
106
  key: 0,
107
107
  style: H({
108
108
  width: t.isSmall ? "1.5rem" : "3rem",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kiva/kv-components",
3
- "version": "6.9.1",
3
+ "version": "6.9.2",
4
4
  "type": "module",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -107,5 +107,5 @@
107
107
  "embla-carousel-fade",
108
108
  "popper.js"
109
109
  ],
110
- "gitHead": "dad6b80ddad74a9981a9fdf87a625a16d112fb2b"
110
+ "gitHead": "effb2fc7d637f1bb55333d855c2b353242d696b3"
111
111
  }