@kiva/kv-components 6.69.3 → 7.0.0
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/vue/KvActivityRow.js +5 -4
- package/dist/vue/KvCommentsAdd.css +1 -1
- package/dist/vue/KvCommentsAdd.js +7 -6
- package/dist/vue/KvCommentsListItem.js +7 -6
- package/dist/vue/KvIconBag.js +19 -16
- package/dist/vue/KvInlineActivityCard.js +19 -20
- package/dist/vue/KvUserAvatar.js +106 -91
- package/dist/vue/KvWwwHeader/KvHeaderLinkBar.css +1 -1
- package/dist/vue/KvWwwHeader/KvHeaderLinkBar.js +198 -164
- package/dist/vue/KvWwwHeader.css +1 -1
- package/dist/vue/KvWwwHeader.js +48 -38
- package/package.json +2 -2
- package/dist/vue/KvInlineActivityCard.css +0 -1
- package/dist/vue/KvUserAvatar.css +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import r from "./KvUserAvatar.js";
|
|
2
|
-
import { resolveComponent as o, openBlock as
|
|
2
|
+
import { resolveComponent as o, openBlock as a, createElementBlock as i, createElementVNode as t, createVNode as c } from "vue";
|
|
3
3
|
import l from "../_virtual/_plugin-vue_export-helper.js";
|
|
4
4
|
const s = {
|
|
5
5
|
name: "KvActivityRow",
|
|
@@ -13,14 +13,15 @@ const s = {
|
|
|
13
13
|
}
|
|
14
14
|
}
|
|
15
15
|
}, m = { class: "tw-flex tw-gap-x-1 tw-items-center" }, d = ["innerHTML"];
|
|
16
|
-
function v(_,
|
|
16
|
+
function v(_, p, e, u, f, w) {
|
|
17
17
|
const n = o("KvUserAvatar");
|
|
18
|
-
return
|
|
18
|
+
return a(), i("div", m, [
|
|
19
19
|
t("div", null, [
|
|
20
20
|
c(n, {
|
|
21
21
|
"lender-name": e.activity.lenderName,
|
|
22
22
|
"lender-image-url": e.activity.lenderImage,
|
|
23
|
-
"
|
|
23
|
+
class: "tw-w-3 tw-h-3",
|
|
24
|
+
"is-small": ""
|
|
24
25
|
}, null, 8, ["lender-name", "lender-image-url"])
|
|
25
26
|
]),
|
|
26
27
|
t("div", null, [
|
|
@@ -1 +1 @@
|
|
|
1
|
-
[data-v-
|
|
1
|
+
[data-v-8a6d6ddc] input{height:2rem;border-radius:0;border-top-width:0px;border-right-width:0px;border-left-width:0px;padding:0}[data-v-8a6d6ddc] input:focus{--tw-border-opacity: 1;border-color:rgba(var(--border-tertiary),var(--tw-border-opacity, 1));box-shadow:none}[data-v-8a6d6ddc] button>span{min-height:0}[data-v-8a6d6ddc] button>span>span{padding-top:0;padding-bottom:0;padding-left:.25rem;padding-right:.25rem}
|
|
@@ -36,11 +36,11 @@ const h = "add-comment-value", f = "add-comment", m = "hide-input", I = {
|
|
|
36
36
|
},
|
|
37
37
|
emits: [f, m],
|
|
38
38
|
setup(l, { emit: t }) {
|
|
39
|
-
const e = u(""), o = u(null),
|
|
39
|
+
const e = u(""), o = u(null), d = C(() => e.value ? "" : "disabled");
|
|
40
40
|
return {
|
|
41
41
|
ADD_COMMENT_ID: h,
|
|
42
42
|
addCommentValue: e,
|
|
43
|
-
commentButtonState:
|
|
43
|
+
commentButtonState: d,
|
|
44
44
|
cancel: () => {
|
|
45
45
|
e.value = "", l.isReply && t(m);
|
|
46
46
|
},
|
|
@@ -51,14 +51,15 @@ const h = "add-comment-value", f = "add-comment", m = "hide-input", I = {
|
|
|
51
51
|
};
|
|
52
52
|
}
|
|
53
53
|
}, K = { class: "tw-flex tw-flex-col" }, T = { class: "tw-flex tw-flex-col md:tw-flex-row md:tw-items-center tw-gap-0.5 md:tw-gap-1" }, A = { class: "tw-flex tw-items-center tw-gap-1" }, B = { class: "data-hj-suppress tw-font-medium" }, M = { class: "tw-flex tw-py-0.5 tw-gap-0.5" };
|
|
54
|
-
function S(l, t, e, o,
|
|
55
|
-
const
|
|
54
|
+
function S(l, t, e, o, d, v) {
|
|
55
|
+
const c = s("kv-user-avatar"), r = s("kv-text-input"), i = s("kv-button");
|
|
56
56
|
return x(), g("div", K, [
|
|
57
57
|
n("div", T, [
|
|
58
58
|
n("div", A, [
|
|
59
|
-
a(
|
|
59
|
+
a(c, {
|
|
60
60
|
"lender-name": e.userDisplayName,
|
|
61
61
|
"lender-image-url": e.userImageUrl,
|
|
62
|
+
class: "tw-w-3 tw-h-3",
|
|
62
63
|
"is-small": ""
|
|
63
64
|
}, null, 8, ["lender-name", "lender-image-url"]),
|
|
64
65
|
n("div", B, y(e.userDisplayName), 1)
|
|
@@ -97,7 +98,7 @@ function S(l, t, e, o, c, v) {
|
|
|
97
98
|
])
|
|
98
99
|
]);
|
|
99
100
|
}
|
|
100
|
-
const P = /* @__PURE__ */ E(I, [["render", S], ["__scopeId", "data-v-
|
|
101
|
+
const P = /* @__PURE__ */ E(I, [["render", S], ["__scopeId", "data-v-8a6d6ddc"]]);
|
|
101
102
|
export {
|
|
102
103
|
f as ADD_COMMENT_EVENT,
|
|
103
104
|
h as ADD_COMMENT_ID,
|
|
@@ -55,11 +55,11 @@ const $ = "reply-comment", ee = "like-comment", N = "add-reaction", te = {
|
|
|
55
55
|
emits: [
|
|
56
56
|
N
|
|
57
57
|
],
|
|
58
|
-
setup(
|
|
58
|
+
setup(h, { emit: s }) {
|
|
59
59
|
const {
|
|
60
60
|
comment: e,
|
|
61
61
|
userPublicId: n
|
|
62
|
-
} = B(
|
|
62
|
+
} = B(h), u = y(!1), g = y(null), a = y(), _ = y(!1), b = i(() => {
|
|
63
63
|
var t;
|
|
64
64
|
return ((t = e == null ? void 0 : e.value) == null ? void 0 : t.text) ?? "";
|
|
65
65
|
}), w = i(() => {
|
|
@@ -79,7 +79,7 @@ const $ = "reply-comment", ee = "like-comment", N = "add-reaction", te = {
|
|
|
79
79
|
return ((l = (t = e == null ? void 0 : e.value) == null ? void 0 : t.children) == null ? void 0 : l.like) ?? [];
|
|
80
80
|
}), R = i(() => E.value.find((t) => t.publicLenderId === n.value)), O = i(() => R.value !== void 0), T = () => {
|
|
81
81
|
u.value = !u.value, q(() => {
|
|
82
|
-
u.value &&
|
|
82
|
+
u.value && g.value.$refs.input.focus();
|
|
83
83
|
});
|
|
84
84
|
}, x = (t, l) => {
|
|
85
85
|
var L;
|
|
@@ -109,7 +109,7 @@ const $ = "reply-comment", ee = "like-comment", N = "add-reaction", te = {
|
|
|
109
109
|
}), {
|
|
110
110
|
hideInput: D,
|
|
111
111
|
showInput: u,
|
|
112
|
-
commentsAddRef:
|
|
112
|
+
commentsAddRef: g,
|
|
113
113
|
replyClick: T,
|
|
114
114
|
addReaction: x,
|
|
115
115
|
REPLY_COMMENT_EVENT: $,
|
|
@@ -141,7 +141,7 @@ const $ = "reply-comment", ee = "like-comment", N = "add-reaction", te = {
|
|
|
141
141
|
key: 1,
|
|
142
142
|
class: "tw-my-1"
|
|
143
143
|
}, me = { key: 1 };
|
|
144
|
-
function de(
|
|
144
|
+
function de(h, s, e, n, u, g) {
|
|
145
145
|
const a = v("kv-user-avatar"), _ = v("kv-comments-heart-button"), b = v("kv-comments-reply-button"), w = v("kv-comments-add"), C = v("kv-material-icon"), I = v("kv-comments-list-item", !0);
|
|
146
146
|
return r(), m("div", null, [
|
|
147
147
|
f("div", null, [
|
|
@@ -149,6 +149,7 @@ function de(g, s, e, n, u, h) {
|
|
|
149
149
|
k(a, {
|
|
150
150
|
"lender-name": n.authorName,
|
|
151
151
|
"lender-image-url": n.authorImage,
|
|
152
|
+
class: "tw-w-3 tw-h-3",
|
|
152
153
|
"is-small": ""
|
|
153
154
|
}, null, 8, ["lender-name", "lender-image-url"]),
|
|
154
155
|
n.authorName ? (r(), m("p", le, p(n.authorName), 1)) : c("", !0)
|
|
@@ -205,7 +206,7 @@ function de(g, s, e, n, u, h) {
|
|
|
205
206
|
comment: o,
|
|
206
207
|
"nest-level": e.nestLevel + 1,
|
|
207
208
|
onAddReaction: s[3] || (s[3] = (E) => {
|
|
208
|
-
|
|
209
|
+
h.$emit(n.ADD_REACTION_EVENT, E);
|
|
209
210
|
})
|
|
210
211
|
}, null, 8, ["user-image-url", "user-display-name", "user-public-id", "comment", "nest-level"])
|
|
211
212
|
]))), 128))
|
package/dist/vue/KvIconBag.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { openBlock as n, createElementBlock as s, createElementVNode as
|
|
1
|
+
import { openBlock as n, createElementBlock as s, createElementVNode as e, toDisplayString as c, createCommentVNode as l } from "vue";
|
|
2
2
|
import r from "../_virtual/_plugin-vue_export-helper.js";
|
|
3
3
|
const i = {
|
|
4
4
|
props: {
|
|
@@ -7,35 +7,38 @@ const i = {
|
|
|
7
7
|
default: 0
|
|
8
8
|
}
|
|
9
9
|
}
|
|
10
|
-
},
|
|
10
|
+
}, u = {
|
|
11
11
|
xmlns: "http://www.w3.org/2000/svg",
|
|
12
12
|
viewBox: "0 0 24 24"
|
|
13
|
-
},
|
|
13
|
+
}, d = ["id"], a = {
|
|
14
14
|
x: "12",
|
|
15
15
|
y: "17",
|
|
16
16
|
fill: "#000",
|
|
17
17
|
style: { "font-size": "9px", "font-weight": "631", "text-anchor": "middle" }
|
|
18
|
-
};
|
|
19
|
-
function
|
|
20
|
-
return n(), s("svg",
|
|
21
|
-
|
|
22
|
-
t("mask",
|
|
23
|
-
|
|
18
|
+
}, f = ["mask"];
|
|
19
|
+
function m(_, o, t, h, x, k) {
|
|
20
|
+
return n(), s("svg", u, [
|
|
21
|
+
e("defs", null, [
|
|
22
|
+
t.count > 0 ? (n(), s("mask", {
|
|
23
|
+
key: 0,
|
|
24
|
+
id: `countMask-${t.count}`
|
|
25
|
+
}, [
|
|
26
|
+
o[0] || (o[0] = e("rect", {
|
|
24
27
|
width: "100%",
|
|
25
28
|
height: "100%",
|
|
26
29
|
fill: "#fff"
|
|
27
30
|
}, null, -1)),
|
|
28
|
-
|
|
29
|
-
])
|
|
31
|
+
e("text", a, c(t.count), 1)
|
|
32
|
+
], 8, d)) : l("", !0)
|
|
30
33
|
]),
|
|
31
|
-
|
|
34
|
+
e("path", {
|
|
32
35
|
d: "M12,3A3,3 0 0,1 15,6H9A3,3 0 0,1 12,3M19,6H17A5,5 0 0,0 12,1A5,5 0 0,0 7,6H5C3.89,6 3,6.89 3,8V20A2,2 0 0,0 5,22H19A2,2 0 0,0 21,20V8C21,6.89 20.1,6 19,6Z",
|
|
33
36
|
fill: "currentColor",
|
|
34
|
-
mask:
|
|
35
|
-
}, null,
|
|
37
|
+
mask: `url(#countMask-${t.count})`
|
|
38
|
+
}, null, 8, f)
|
|
36
39
|
]);
|
|
37
40
|
}
|
|
38
|
-
const
|
|
41
|
+
const w = /* @__PURE__ */ r(i, [["render", m]]);
|
|
39
42
|
export {
|
|
40
|
-
|
|
43
|
+
w as default
|
|
41
44
|
};
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import { toRefs as c, computed as l, resolveComponent as m, openBlock as p, createElementBlock as i, createVNode as
|
|
2
|
-
import
|
|
3
|
-
import "
|
|
4
|
-
import f from "../_virtual/_plugin-vue_export-helper.js";
|
|
1
|
+
import { toRefs as c, computed as l, resolveComponent as m, openBlock as p, createElementBlock as i, createVNode as w, createElementVNode as d, toDisplayString as u, createTextVNode as _ } from "vue";
|
|
2
|
+
import f from "./KvUserAvatar.js";
|
|
3
|
+
import v from "../_virtual/_plugin-vue_export-helper.js";
|
|
5
4
|
const g = {
|
|
6
5
|
name: "KvInlineActivityCard",
|
|
7
6
|
components: {
|
|
8
|
-
KvUserAvatar:
|
|
7
|
+
KvUserAvatar: f
|
|
9
8
|
},
|
|
10
9
|
props: {
|
|
11
10
|
/**
|
|
@@ -16,38 +15,38 @@ const g = {
|
|
|
16
15
|
default: () => ({})
|
|
17
16
|
}
|
|
18
17
|
},
|
|
19
|
-
setup(
|
|
18
|
+
setup(s) {
|
|
20
19
|
const {
|
|
21
20
|
activity: e
|
|
22
|
-
} = c(
|
|
21
|
+
} = c(s), a = l(() => {
|
|
23
22
|
var t, r;
|
|
24
23
|
return ((r = (t = e == null ? void 0 : e.value) == null ? void 0 : t.lender) == null ? void 0 : r.name) ?? "";
|
|
25
24
|
});
|
|
26
25
|
return {
|
|
27
26
|
lenderImageUrl: l(() => {
|
|
28
|
-
var t, r,
|
|
29
|
-
return ((
|
|
27
|
+
var t, r, o;
|
|
28
|
+
return ((o = (r = (t = e == null ? void 0 : e.value) == null ? void 0 : t.lender) == null ? void 0 : r.image) == null ? void 0 : o.url) ?? "";
|
|
30
29
|
}),
|
|
31
|
-
lenderName:
|
|
30
|
+
lenderName: a
|
|
32
31
|
};
|
|
33
32
|
}
|
|
34
|
-
}, x = { class: "tw-flex tw-items-center tw-gap-1 tw-py-0.5 tw-px-1 tw-shadow-lg tw-rounded-xs tw-bg-white" }, h = { class: "tw-text-base tw-whitespace-nowrap" },
|
|
35
|
-
function
|
|
36
|
-
const
|
|
33
|
+
}, x = { class: "tw-flex tw-items-center tw-gap-1 tw-py-0.5 tw-px-1 tw-shadow-lg tw-rounded-xs tw-bg-white" }, h = { class: "tw-text-base tw-whitespace-nowrap" }, N = { class: "data-hj-suppress" };
|
|
34
|
+
function U(s, e, a, n, t, r) {
|
|
35
|
+
const o = m("KvUserAvatar");
|
|
37
36
|
return p(), i("div", x, [
|
|
38
|
-
|
|
37
|
+
w(o, {
|
|
39
38
|
"lender-image-url": n.lenderImageUrl,
|
|
40
39
|
"lender-name": n.lenderName,
|
|
41
|
-
"
|
|
42
|
-
|
|
40
|
+
class: "tw-w-4 tw-h-4 tw-flex-shrink-0",
|
|
41
|
+
"is-small": ""
|
|
43
42
|
}, null, 8, ["lender-image-url", "lender-name"]),
|
|
44
43
|
d("p", h, [
|
|
45
|
-
d("span",
|
|
46
|
-
e[0] || (e[0] =
|
|
44
|
+
d("span", N, u(n.lenderName), 1),
|
|
45
|
+
e[0] || (e[0] = _(" contributed "))
|
|
47
46
|
])
|
|
48
47
|
]);
|
|
49
48
|
}
|
|
50
|
-
const
|
|
49
|
+
const b = /* @__PURE__ */ v(g, [["render", U]]);
|
|
51
50
|
export {
|
|
52
|
-
|
|
51
|
+
b as default
|
|
53
52
|
};
|
package/dist/vue/KvUserAvatar.js
CHANGED
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
import { toRefs as
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
import "
|
|
5
|
-
|
|
6
|
-
const V = {
|
|
1
|
+
import { toRefs as B, ref as m, computed as a, onMounted as P, resolveComponent as V, openBlock as i, createElementBlock as c, normalizeClass as b, createElementVNode as r, createCommentVNode as f, withDirectives as N, createVNode as z, vShow as D, normalizeStyle as y, toDisplayString as F } from "vue";
|
|
2
|
+
import { randomizedUserAvatarClass as M, isLegacyPlaceholderAvatar as p } from "../utils/imageUtils.js";
|
|
3
|
+
import S from "./KvLoadingPlaceholder.js";
|
|
4
|
+
import E from "../_virtual/_plugin-vue_export-helper.js";
|
|
5
|
+
const K = {
|
|
7
6
|
name: "KvUserAvatar",
|
|
8
7
|
components: {
|
|
9
|
-
KvLoadingPlaceholder:
|
|
8
|
+
KvLoadingPlaceholder: S
|
|
10
9
|
},
|
|
11
10
|
props: {
|
|
12
11
|
/**
|
|
@@ -24,115 +23,131 @@ const V = {
|
|
|
24
23
|
default: ""
|
|
25
24
|
},
|
|
26
25
|
/**
|
|
27
|
-
*
|
|
26
|
+
* Whether to render a smaller avatar
|
|
28
27
|
*/
|
|
29
28
|
isSmall: {
|
|
30
29
|
type: Boolean,
|
|
31
30
|
default: !1
|
|
31
|
+
},
|
|
32
|
+
/**
|
|
33
|
+
* Whether to use a css variable for the avatar url before data is loaded
|
|
34
|
+
*/
|
|
35
|
+
showCssPlaceholder: {
|
|
36
|
+
type: Boolean,
|
|
37
|
+
default: !1
|
|
32
38
|
}
|
|
33
39
|
},
|
|
34
|
-
setup(
|
|
40
|
+
setup(w) {
|
|
35
41
|
const {
|
|
36
|
-
lenderName:
|
|
37
|
-
lenderImageUrl:
|
|
38
|
-
isSmall:
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
42
|
+
lenderName: t,
|
|
43
|
+
lenderImageUrl: s,
|
|
44
|
+
isSmall: e,
|
|
45
|
+
showCssPlaceholder: d
|
|
46
|
+
} = B(w), u = m(!0), l = m(null), v = m(null), C = a(() => !d.value && t.value === "" && s.value === "" || t.value === "Anonymous"), _ = a(() => {
|
|
47
|
+
const o = e != null && e.value ? "tw-font-sans tw-font-normal" : "tw-font-serif";
|
|
48
|
+
return `${M(t.value)} ${o}`;
|
|
49
|
+
}), A = a(() => e != null && e.value ? "0 0 27 27" : "0 0 27.5 27.5"), x = a(() => {
|
|
50
|
+
var n;
|
|
51
|
+
if (d.value)
|
|
52
|
+
return !0;
|
|
53
|
+
const o = ((n = s == null ? void 0 : s.value) == null ? void 0 : n.split("/").pop()) ?? "";
|
|
54
|
+
return o && !p(o);
|
|
55
|
+
}), I = a(() => {
|
|
56
|
+
var o;
|
|
57
|
+
return (o = t == null ? void 0 : t.value) == null ? void 0 : o.substring(0, 1).toUpperCase();
|
|
48
58
|
}), g = () => {
|
|
49
|
-
|
|
50
|
-
},
|
|
51
|
-
const
|
|
52
|
-
!
|
|
59
|
+
u.value = !1;
|
|
60
|
+
}, U = (o, n = 1e4) => new Promise((k, H) => {
|
|
61
|
+
const L = Date.now() + n, h = () => {
|
|
62
|
+
!o || o.complete ? k(o) : Date.now() > L ? H(new Error(`Timeout: ${o.src}`)) : setTimeout(h, 50);
|
|
53
63
|
};
|
|
54
64
|
h();
|
|
55
65
|
});
|
|
56
|
-
return
|
|
57
|
-
const
|
|
66
|
+
return P(async () => {
|
|
67
|
+
const o = l.value;
|
|
58
68
|
try {
|
|
59
|
-
await
|
|
60
|
-
} catch (
|
|
61
|
-
console.log(
|
|
69
|
+
await U(o), g();
|
|
70
|
+
} catch (n) {
|
|
71
|
+
console.log(n.message);
|
|
62
72
|
}
|
|
63
73
|
}), {
|
|
64
|
-
isAnonymousUser:
|
|
65
|
-
avatarClass:
|
|
66
|
-
|
|
67
|
-
lenderNameFirstLetter:
|
|
68
|
-
|
|
69
|
-
|
|
74
|
+
isAnonymousUser: C,
|
|
75
|
+
avatarClass: _,
|
|
76
|
+
userHasImage: x,
|
|
77
|
+
lenderNameFirstLetter: I,
|
|
78
|
+
letterViewBox: A,
|
|
79
|
+
isLegacyPlaceholderAvatar: p,
|
|
80
|
+
isImageLoading: u,
|
|
70
81
|
onImgLoad: g,
|
|
71
|
-
imageRef:
|
|
72
|
-
userAvatar:
|
|
82
|
+
imageRef: l,
|
|
83
|
+
userAvatar: v
|
|
73
84
|
};
|
|
74
85
|
}
|
|
75
|
-
},
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
86
|
+
}, R = {
|
|
87
|
+
key: 0,
|
|
88
|
+
class: "tw-h-3/4",
|
|
89
|
+
viewBox: "0 0 25 37",
|
|
90
|
+
fill: "none",
|
|
91
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
92
|
+
}, T = ["src"], Z = ["viewBox"], j = {
|
|
93
|
+
x: "50%",
|
|
94
|
+
y: "55%",
|
|
95
|
+
"dominant-baseline": "middle",
|
|
96
|
+
"text-anchor": "middle"
|
|
97
|
+
};
|
|
98
|
+
function q(w, t, s, e, d, u) {
|
|
99
|
+
const l = V("kv-loading-placeholder");
|
|
100
|
+
return i(), c("div", {
|
|
79
101
|
ref: "userAvatar",
|
|
80
|
-
class:
|
|
102
|
+
class: b(["data-hj-suppress tw-flex tw-items-center tw-justify-center tw-rounded-full tw-overflow-hidden", {
|
|
103
|
+
"tw-bg-brand": e.isAnonymousUser,
|
|
104
|
+
[e.avatarClass]: !e.isAnonymousUser
|
|
105
|
+
}])
|
|
81
106
|
}, [
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
107
|
+
e.isAnonymousUser ? (i(), c("svg", R, t[1] || (t[1] = [
|
|
108
|
+
r("path", {
|
|
109
|
+
d: "M8.22861 0.875H0.857178V36.3125H8.22861V0.875Z",
|
|
110
|
+
fill: "white"
|
|
111
|
+
}, null, -1),
|
|
112
|
+
r("path", {
|
|
113
|
+
d: "M10.1143 23.2751C21.9428 23.2751 24.6857 13.2126 24.6857 11.4626H23.6571C11.8286 11.4626 9.08569 21.5251 9.08569 23.2751H10.1143Z",
|
|
114
|
+
fill: "white"
|
|
115
|
+
}, null, -1),
|
|
116
|
+
r("path", {
|
|
117
|
+
d: "M9.08569 24.2376C9.08569 26.0751 11.1428 36.3126 23.8285 36.3126H24.8571C24.8571 34.4751 22.8 24.2376 10.1143 24.2376H9.08569Z",
|
|
118
|
+
fill: "white"
|
|
119
|
+
}, null, -1)
|
|
120
|
+
]))) : f("", !0),
|
|
121
|
+
N(z(l, null, null, 512), [
|
|
122
|
+
[D, !e.isAnonymousUser && e.userHasImage && e.isImageLoading]
|
|
123
|
+
]),
|
|
124
|
+
!e.isAnonymousUser && e.userHasImage ? (i(), c("div", {
|
|
125
|
+
key: 1,
|
|
126
|
+
class: "tw-w-full tw-h-full",
|
|
127
|
+
style: y(s.showCssPlaceholder ? { display: "var(--user-avatar-display, block)" } : {
|
|
128
|
+
display: e.isImageLoading ? "none" : "block"
|
|
129
|
+
})
|
|
85
130
|
}, [
|
|
86
|
-
(
|
|
87
|
-
class: r(["tw-h-full tw-text-brand", { "tw-w-3 tw-h-3": e.isSmall }]),
|
|
88
|
-
width: "25",
|
|
89
|
-
height: "37",
|
|
90
|
-
viewBox: "0 0 25 37",
|
|
91
|
-
fill: "none",
|
|
92
|
-
xmlns: "http://www.w3.org/2000/svg"
|
|
93
|
-
}, a[1] || (a[1] = [
|
|
94
|
-
s("path", {
|
|
95
|
-
d: "M8.22861 0.875H0.857178V36.3125H8.22861V0.875Z",
|
|
96
|
-
fill: "white"
|
|
97
|
-
}, null, -1),
|
|
98
|
-
s("path", {
|
|
99
|
-
d: "M10.1143 23.2751C21.9428 23.2751 24.6857 13.2126 24.6857 11.4626H23.6571C11.8286 11.4626 9.08569 21.5251 9.08569 23.2751H10.1143Z",
|
|
100
|
-
fill: "white"
|
|
101
|
-
}, null, -1),
|
|
102
|
-
s("path", {
|
|
103
|
-
d: "M9.08569 24.2376C9.08569 26.0751 11.1428 36.3126 23.8285 36.3126H24.8571C24.8571 34.4751 22.8 24.2376 10.1143 24.2376H9.08569Z",
|
|
104
|
-
fill: "white"
|
|
105
|
-
}, null, -1)
|
|
106
|
-
]), 2))
|
|
107
|
-
], 2)) : !t.isLegacyPlaceholderAvatar(t.imageFilename) && t.imageFilename ? (n(), o("div", z, [
|
|
108
|
-
t.isLoading ? (n(), H(m, {
|
|
109
|
-
key: 0,
|
|
110
|
-
style: I({
|
|
111
|
-
width: e.isSmall ? "1.5rem" : "3rem",
|
|
112
|
-
height: e.isSmall ? "1.5rem" : "3rem"
|
|
113
|
-
}),
|
|
114
|
-
class: "!tw-rounded-full"
|
|
115
|
-
}, null, 8, ["style"])) : y("", !0),
|
|
116
|
-
b(s("img", {
|
|
131
|
+
r("img", {
|
|
117
132
|
ref: "imageRef",
|
|
118
|
-
src:
|
|
133
|
+
src: s.lenderImageUrl,
|
|
119
134
|
alt: "Image of lender",
|
|
120
|
-
class:
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
135
|
+
class: "tw-w-full",
|
|
136
|
+
style: y(s.showCssPlaceholder ? { content: "var(--user-avatar)" } : {}),
|
|
137
|
+
onLoad: t[0] || (t[0] = (v) => e.onImgLoad())
|
|
138
|
+
}, null, 44, T)
|
|
139
|
+
], 4)) : f("", !0),
|
|
140
|
+
!e.isAnonymousUser && !e.userHasImage ? (i(), c("svg", {
|
|
126
141
|
key: 2,
|
|
127
|
-
class:
|
|
142
|
+
class: "tw-w-full tw-h-full",
|
|
143
|
+
fill: "currentColor",
|
|
144
|
+
viewBox: e.letterViewBox
|
|
128
145
|
}, [
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
}, P(t.lenderNameFirstLetter), 3)
|
|
132
|
-
], 2)) : y("", !0)
|
|
146
|
+
r("text", j, F(e.lenderNameFirstLetter), 1)
|
|
147
|
+
], 8, Z)) : f("", !0)
|
|
133
148
|
], 2);
|
|
134
149
|
}
|
|
135
|
-
const
|
|
150
|
+
const W = /* @__PURE__ */ E(K, [["render", q]]);
|
|
136
151
|
export {
|
|
137
|
-
|
|
152
|
+
W as default
|
|
138
153
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.header-link[data-v-
|
|
1
|
+
.header-link[data-v-c31f1fca]{cursor:pointer;padding-top:1rem;padding-bottom:1rem;--tw-text-opacity: 1;color:rgba(var(--text-primary),var(--tw-text-opacity, 1));text-decoration-line:none}.header-link[data-v-c31f1fca]:hover{--tw-text-opacity: 1;color:rgba(var(--text-action),var(--tw-text-opacity, 1));text-decoration-line:none}
|
|
@@ -1,21 +1,23 @@
|
|
|
1
|
-
import { defineAsyncComponent as h, ref as
|
|
2
|
-
import { mdiAccountCircle as
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import {
|
|
1
|
+
import { defineAsyncComponent as h, ref as i, inject as ne, computed as T, watch as V, onMounted as te, onUnmounted as oe, resolveComponent as g, resolveDirective as ae, openBlock as d, createElementBlock as v, withDirectives as f, normalizeClass as A, withModifiers as K, createVNode as w, createBlock as R, withCtx as E, createTextVNode as b, createElementVNode as L, createCommentVNode as z, normalizeStyle as N, vShow as W, toDisplayString as le } from "vue";
|
|
2
|
+
import { mdiAccountCircle as ie, mdiChevronDown as re, mdiMagnify as de, mdiMenu as se } from "@mdi/js";
|
|
3
|
+
import ue from "numeral";
|
|
4
|
+
import me from "@kiva/kv-tokens";
|
|
5
|
+
import ce from "../KvMaterialIcon.js";
|
|
6
|
+
import ve from "../KvIconBag.js";
|
|
7
|
+
import fe from "./KvHeaderDropdownLink.js";
|
|
8
|
+
import we from "../KvUserAvatar.js";
|
|
9
|
+
import ke from "../KvLoadingPlaceholder.js";
|
|
10
|
+
import { throttle as Me } from "../../utils/throttle.js";
|
|
11
|
+
import { isLegacyPlaceholderAvatar as j } from "../../utils/imageUtils.js";
|
|
11
12
|
import "./KvHeaderLinkBar.css";
|
|
12
|
-
import
|
|
13
|
-
const
|
|
13
|
+
import ge from "../../_virtual/_plugin-vue_export-helper.js";
|
|
14
|
+
const be = h(() => import("./KvHeaderMobileMenu.js")), F = h(() => import("./KvHeaderMyKivaMenu.js")), he = h(() => import("./LendMenu/KvLendMenu.js")), ye = h(() => import("./KvHeaderTakeActionMenu.js")), pe = h(() => import("./KvHeaderAboutMenu.js")), q = 150, k = "avatar-menu", U = "menuButton", G = { top: "-3.75rem", width: "100%" }, Te = "lendButton", Ae = "takeActionButton", Le = "aboutUsLink", Ue = {
|
|
14
15
|
components: {
|
|
15
|
-
KvMaterialIcon:
|
|
16
|
-
KvIconBag:
|
|
17
|
-
KvHeaderDropdownLink:
|
|
18
|
-
KvUserAvatar:
|
|
16
|
+
KvMaterialIcon: ce,
|
|
17
|
+
KvIconBag: ve,
|
|
18
|
+
KvHeaderDropdownLink: fe,
|
|
19
|
+
KvUserAvatar: we,
|
|
20
|
+
KvLoadingPlaceholder: ke
|
|
19
21
|
},
|
|
20
22
|
props: {
|
|
21
23
|
loggedIn: {
|
|
@@ -53,255 +55,287 @@ const Me = h(() => import("./KvHeaderMobileMenu.js")), F = h(() => import("./KvH
|
|
|
53
55
|
balance: {
|
|
54
56
|
type: Number,
|
|
55
57
|
default: 0
|
|
58
|
+
},
|
|
59
|
+
isBasketDataLoading: {
|
|
60
|
+
type: Boolean,
|
|
61
|
+
default: !1
|
|
62
|
+
},
|
|
63
|
+
isUserDataLoading: {
|
|
64
|
+
type: Boolean,
|
|
65
|
+
default: !1
|
|
56
66
|
}
|
|
57
67
|
},
|
|
58
68
|
emits: [
|
|
59
69
|
"item-hover"
|
|
60
70
|
],
|
|
61
|
-
setup(
|
|
62
|
-
const
|
|
63
|
-
[
|
|
64
|
-
[
|
|
65
|
-
[
|
|
66
|
-
[
|
|
67
|
-
[
|
|
68
|
-
},
|
|
69
|
-
n("item-hover", t,
|
|
70
|
-
},
|
|
71
|
+
setup(s, { emit: n }) {
|
|
72
|
+
const o = i(null), e = i(null), x = i(null), _ = i(null), y = i(null), M = i(null), B = i(null), I = i(null), H = i(null), a = i(null), l = ne("$kvTrackEvent"), O = {
|
|
73
|
+
[Te]: { action: "hover-Lend-menu", label: "Lend" },
|
|
74
|
+
[Ae]: { action: "hover-Take-action-menu", label: "Take action" },
|
|
75
|
+
[Le]: { action: "hover-About-menu", label: "About" },
|
|
76
|
+
[U]: { action: "hover-Hamburger-menu", label: "Hamburger" },
|
|
77
|
+
[k]: { action: "hover-Avatar-menu", label: "Avatar" }
|
|
78
|
+
}, u = (t, m, c = null) => {
|
|
79
|
+
n("item-hover", t, m, c);
|
|
80
|
+
}, J = (t, m, c = null) => {
|
|
71
81
|
if (!navigator.maxTouchPoints) {
|
|
72
|
-
if (t &&
|
|
73
|
-
const r =
|
|
74
|
-
r &&
|
|
82
|
+
if (t && a.value !== t) {
|
|
83
|
+
const r = O[t];
|
|
84
|
+
r && l(
|
|
75
85
|
"TopNav",
|
|
76
86
|
r.action,
|
|
77
87
|
r.label
|
|
78
88
|
);
|
|
79
89
|
}
|
|
80
|
-
|
|
90
|
+
a.value = t, u(
|
|
81
91
|
t,
|
|
82
|
-
|
|
83
|
-
t ===
|
|
92
|
+
m,
|
|
93
|
+
t === U && s.isMobile ? G : c
|
|
84
94
|
);
|
|
85
95
|
}
|
|
86
|
-
},
|
|
87
|
-
!navigator.maxTouchPoints &&
|
|
88
|
-
},
|
|
89
|
-
var
|
|
90
|
-
const t = (
|
|
96
|
+
}, Q = (t) => {
|
|
97
|
+
!navigator.maxTouchPoints && a.value === t && (a.value = null, u());
|
|
98
|
+
}, S = () => {
|
|
99
|
+
var P;
|
|
100
|
+
const t = (P = o.value) == null ? void 0 : P.getBoundingClientRect();
|
|
91
101
|
if (!t) return null;
|
|
92
|
-
const
|
|
102
|
+
const c = t.left + t.width / 2 - q / 2, r = `${window.innerWidth - c - q}px`;
|
|
93
103
|
return {
|
|
94
|
-
right: (window == null ? void 0 : window.innerWidth) <
|
|
104
|
+
right: (window == null ? void 0 : window.innerWidth) < me.breakpoints.md ? 0 : r
|
|
95
105
|
};
|
|
96
|
-
},
|
|
97
|
-
|
|
98
|
-
},
|
|
99
|
-
if (t &&
|
|
100
|
-
const r =
|
|
101
|
-
r &&
|
|
106
|
+
}, p = () => {
|
|
107
|
+
a.value = k, u(o.value, F, S());
|
|
108
|
+
}, X = (t, m, c) => {
|
|
109
|
+
if (t && a.value !== t) {
|
|
110
|
+
const r = O[t];
|
|
111
|
+
r && l(
|
|
102
112
|
"TopNav",
|
|
103
113
|
r.action,
|
|
104
114
|
r.label
|
|
105
115
|
);
|
|
106
116
|
}
|
|
107
|
-
|
|
108
|
-
},
|
|
109
|
-
|
|
110
|
-
}, 100),
|
|
117
|
+
a.value === U && (a.value = null), !a.value || a.value !== t ? (a.value = t, t === k ? p() : t === U && s.isMobile ? u(t, m, G) : u(t, m, c)) : (a.value = null, u());
|
|
118
|
+
}, C = Me(() => {
|
|
119
|
+
a.value === k && p();
|
|
120
|
+
}, 100), Y = T(() => s.isMobile ? void 0 : "/lend-by-category"), D = T(() => {
|
|
111
121
|
var t;
|
|
112
|
-
return ((t =
|
|
113
|
-
}),
|
|
114
|
-
t.target === t.currentTarget &&
|
|
122
|
+
return ((t = s.lenderImageUrl) == null ? void 0 : t.split("/").pop()) ?? "";
|
|
123
|
+
}), Z = T(() => Math.floor(s.balance)), $ = T(() => j(D.value) || !D.value), ee = (t) => {
|
|
124
|
+
t.target === t.currentTarget && u();
|
|
115
125
|
};
|
|
116
|
-
return
|
|
117
|
-
() =>
|
|
126
|
+
return V(
|
|
127
|
+
() => s.isMobile,
|
|
118
128
|
() => {
|
|
119
|
-
|
|
129
|
+
a.value === k && p();
|
|
120
130
|
}
|
|
121
|
-
),
|
|
122
|
-
() =>
|
|
131
|
+
), V(
|
|
132
|
+
() => s.openMenuItem,
|
|
123
133
|
(t) => {
|
|
124
|
-
t || (
|
|
134
|
+
t || (a.value = null);
|
|
125
135
|
}
|
|
126
|
-
),
|
|
127
|
-
import("./KvHeaderMobileMenu.js"), import("./KvHeaderMyKivaMenu.js"), import("./LendMenu/KvLendMenu.js"), import("./KvHeaderTakeActionMenu.js"), import("./KvHeaderAboutMenu.js"), window.addEventListener("resize",
|
|
128
|
-
}),
|
|
129
|
-
window.removeEventListener("resize",
|
|
136
|
+
), te(() => {
|
|
137
|
+
import("./KvHeaderMobileMenu.js"), import("./KvHeaderMyKivaMenu.js"), import("./LendMenu/KvLendMenu.js"), import("./KvHeaderTakeActionMenu.js"), import("./KvHeaderAboutMenu.js"), window.addEventListener("resize", C);
|
|
138
|
+
}), oe(() => {
|
|
139
|
+
window.removeEventListener("resize", C);
|
|
130
140
|
}), {
|
|
131
|
-
AVATAR_MENU_ID:
|
|
132
|
-
openMenuId:
|
|
133
|
-
numeral:
|
|
134
|
-
mdiAccountCircle:
|
|
135
|
-
mdiChevronDown:
|
|
136
|
-
mdiMagnify:
|
|
137
|
-
mdiMenu:
|
|
138
|
-
onHover:
|
|
139
|
-
avatar:
|
|
141
|
+
AVATAR_MENU_ID: k,
|
|
142
|
+
openMenuId: a,
|
|
143
|
+
numeral: ue,
|
|
144
|
+
mdiAccountCircle: ie,
|
|
145
|
+
mdiChevronDown: re,
|
|
146
|
+
mdiMagnify: de,
|
|
147
|
+
mdiMenu: se,
|
|
148
|
+
onHover: u,
|
|
149
|
+
avatar: o,
|
|
140
150
|
lendButton: e,
|
|
141
|
-
aboutUsLink:
|
|
142
|
-
partnerWithUsLink:
|
|
143
|
-
borrowLink:
|
|
144
|
-
supportKivaLink:
|
|
145
|
-
basketLink:
|
|
146
|
-
signInLink:
|
|
147
|
-
menuButton:
|
|
148
|
-
lendUrl:
|
|
149
|
-
avatarFilename:
|
|
150
|
-
handleOnHover:
|
|
151
|
-
handleTouchStart:
|
|
152
|
-
handleMouseOut:
|
|
153
|
-
handleAvatarMenuPosition:
|
|
154
|
-
KvHeaderMobileMenu:
|
|
151
|
+
aboutUsLink: x,
|
|
152
|
+
partnerWithUsLink: _,
|
|
153
|
+
borrowLink: y,
|
|
154
|
+
supportKivaLink: M,
|
|
155
|
+
basketLink: B,
|
|
156
|
+
signInLink: I,
|
|
157
|
+
menuButton: H,
|
|
158
|
+
lendUrl: Y,
|
|
159
|
+
avatarFilename: D,
|
|
160
|
+
handleOnHover: J,
|
|
161
|
+
handleTouchStart: X,
|
|
162
|
+
handleMouseOut: Q,
|
|
163
|
+
handleAvatarMenuPosition: p,
|
|
164
|
+
KvHeaderMobileMenu: be,
|
|
155
165
|
KvHeaderMyKivaMenu: F,
|
|
156
|
-
KvLendMenu:
|
|
157
|
-
KvHeaderTakeActionMenu:
|
|
158
|
-
KvHeaderAboutMenu:
|
|
159
|
-
isLegacyPlaceholderAvatar:
|
|
160
|
-
getAvatarMenuPosition:
|
|
161
|
-
handleEmptySpaceClick:
|
|
162
|
-
roundedBalance:
|
|
166
|
+
KvLendMenu: he,
|
|
167
|
+
KvHeaderTakeActionMenu: ye,
|
|
168
|
+
KvHeaderAboutMenu: pe,
|
|
169
|
+
isLegacyPlaceholderAvatar: j,
|
|
170
|
+
getAvatarMenuPosition: S,
|
|
171
|
+
handleEmptySpaceClick: ee,
|
|
172
|
+
roundedBalance: Z,
|
|
173
|
+
isDefaultProfilePic: $
|
|
163
174
|
};
|
|
164
175
|
}
|
|
165
|
-
},
|
|
176
|
+
}, Be = ["href"], Ie = {
|
|
166
177
|
ref: "avatar",
|
|
167
178
|
class: "tw-cursor-pointer tw-flex tw-items-center tw-gap-1 tw-bg-eco-green-1 tw-rounded-md tw-py-0.5 md:tw-py-1 tw-px-1 md:tw-px-2"
|
|
168
|
-
},
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
179
|
+
}, He = {
|
|
180
|
+
key: 0,
|
|
181
|
+
class: "tw-w-4 tw-h-3",
|
|
182
|
+
style: {
|
|
183
|
+
display: "var(--user-balance-loading-display, inline-block)"
|
|
184
|
+
}
|
|
185
|
+
}, De = {
|
|
186
|
+
key: 1,
|
|
187
|
+
class: "tw-text-eco-green-4"
|
|
188
|
+
}, Ke = ["href"];
|
|
189
|
+
function Ee(s, n, o, e, x, _) {
|
|
190
|
+
const y = g("kv-material-icon"), M = g("KvHeaderDropdownLink"), B = g("kv-icon-bag"), I = g("KvUserAvatar"), H = g("KvLoadingPlaceholder"), a = ae("kv-track-event");
|
|
191
|
+
return d(), v("div", {
|
|
172
192
|
class: "tw-h-full tw-flex tw-items-center tw-gap-0.5 md:tw-gap-2 lg:tw-gap-2.5",
|
|
173
|
-
onTouchstart: n[10] || (n[10] = (...
|
|
193
|
+
onTouchstart: n[10] || (n[10] = (...l) => e.handleEmptySpaceClick && e.handleEmptySpaceClick(...l))
|
|
174
194
|
}, [
|
|
175
|
-
|
|
195
|
+
f((d(), v("button", {
|
|
176
196
|
ref: "menuButton",
|
|
177
197
|
class: A(["header-link tw-inline-flex md:tw-hidden", {
|
|
178
|
-
"tw-text-tertiary":
|
|
198
|
+
"tw-text-tertiary": o.openMenuItem && o.openMenuItem !== e.KvHeaderMobileMenu
|
|
179
199
|
}]),
|
|
180
|
-
onMouseover: n[0] || (n[0] = (
|
|
181
|
-
onMouseout: n[1] || (n[1] = (
|
|
182
|
-
onTouchstart: n[2] || (n[2] =
|
|
200
|
+
onMouseover: n[0] || (n[0] = (l) => e.handleOnHover("menuButton", e.KvHeaderMobileMenu)),
|
|
201
|
+
onMouseout: n[1] || (n[1] = (l) => e.handleMouseOut("menuButton")),
|
|
202
|
+
onTouchstart: n[2] || (n[2] = K((l) => e.handleTouchStart("menuButton", e.KvHeaderMobileMenu), ["stop"]))
|
|
183
203
|
}, [
|
|
184
|
-
|
|
204
|
+
w(y, { icon: e.mdiMenu }, null, 8, ["icon"])
|
|
185
205
|
], 34)), [
|
|
186
|
-
[
|
|
206
|
+
[a, o.openMenuItem === e.KvHeaderMobileMenu ? ["TopNav", "click-Hamburger-menu"] : null]
|
|
187
207
|
]),
|
|
188
|
-
|
|
208
|
+
f((d(), R(M, {
|
|
189
209
|
class: "tw-py-1",
|
|
190
210
|
"ref-name": "lendButton",
|
|
191
211
|
href: e.lendUrl,
|
|
192
212
|
"menu-component": e.KvLendMenu,
|
|
193
|
-
"open-menu-item":
|
|
213
|
+
"open-menu-item": o.openMenuItem,
|
|
194
214
|
"dropdown-icon": e.mdiChevronDown,
|
|
195
215
|
"base-class": "tw-inline-flex md:tw-border md:tw-rounded-md tw-px-1.5 tw-py-0.5",
|
|
196
216
|
onOnHover: e.handleOnHover,
|
|
197
|
-
onMouseleave: n[3] || (n[3] = (
|
|
198
|
-
onTouchstart: n[4] || (n[4] =
|
|
217
|
+
onMouseleave: n[3] || (n[3] = (l) => e.handleMouseOut("lendButton")),
|
|
218
|
+
onTouchstart: n[4] || (n[4] = K((l) => e.handleTouchStart("lendButton", e.KvLendMenu), ["stop"]))
|
|
199
219
|
}, {
|
|
200
|
-
default:
|
|
201
|
-
|
|
220
|
+
default: E(() => n[11] || (n[11] = [
|
|
221
|
+
b(" Lend ")
|
|
202
222
|
])),
|
|
203
223
|
_: 1
|
|
204
224
|
}, 8, ["href", "menu-component", "open-menu-item", "dropdown-icon", "onOnHover"])), [
|
|
205
|
-
[
|
|
225
|
+
[a, ["TopNav", "click-Lend"]]
|
|
206
226
|
]),
|
|
207
|
-
|
|
227
|
+
f((d(), R(M, {
|
|
208
228
|
"ref-name": "takeActionButton",
|
|
209
229
|
"base-class": "tw-hidden md:tw-inline-flex tw-py-1",
|
|
210
230
|
"menu-component": e.KvHeaderTakeActionMenu,
|
|
211
|
-
"open-menu-item":
|
|
231
|
+
"open-menu-item": o.openMenuItem,
|
|
212
232
|
"dropdown-icon": e.mdiChevronDown,
|
|
213
233
|
"send-link-position": "",
|
|
214
234
|
onOnHover: e.handleOnHover,
|
|
215
|
-
onMouseleave: n[5] || (n[5] = (
|
|
235
|
+
onMouseleave: n[5] || (n[5] = (l) => e.handleMouseOut("takeActionButton")),
|
|
216
236
|
onUserTap: e.handleTouchStart
|
|
217
237
|
}, {
|
|
218
|
-
default:
|
|
219
|
-
|
|
238
|
+
default: E(() => n[12] || (n[12] = [
|
|
239
|
+
b(" Take action ")
|
|
220
240
|
])),
|
|
221
241
|
_: 1
|
|
222
242
|
}, 8, ["menu-component", "open-menu-item", "dropdown-icon", "onOnHover", "onUserTap"])), [
|
|
223
|
-
[
|
|
243
|
+
[a, ["TopNav", "click-take-action"]]
|
|
224
244
|
]),
|
|
225
|
-
|
|
245
|
+
w(M, {
|
|
226
246
|
"ref-name": "aboutUsLink",
|
|
227
247
|
"data-testid": "header-about",
|
|
228
248
|
"base-class": "tw-hidden md:tw-inline-flex tw-py-1",
|
|
229
249
|
"menu-component": e.KvHeaderAboutMenu,
|
|
230
|
-
"open-menu-item":
|
|
250
|
+
"open-menu-item": o.openMenuItem,
|
|
231
251
|
"dropdown-icon": e.mdiChevronDown,
|
|
232
252
|
"send-link-position": "",
|
|
233
253
|
onOnHover: e.handleOnHover,
|
|
234
|
-
onMouseleave: n[6] || (n[6] = (
|
|
254
|
+
onMouseleave: n[6] || (n[6] = (l) => e.handleMouseOut("aboutUsLink")),
|
|
235
255
|
onUserTap: e.handleTouchStart
|
|
236
256
|
}, {
|
|
237
|
-
default:
|
|
238
|
-
|
|
257
|
+
default: E(() => n[13] || (n[13] = [
|
|
258
|
+
b(" About ")
|
|
239
259
|
])),
|
|
240
260
|
_: 1
|
|
241
261
|
}, 8, ["menu-component", "open-menu-item", "dropdown-icon", "onOnHover", "onUserTap"]),
|
|
242
|
-
n[17] || (n[17] =
|
|
243
|
-
|
|
262
|
+
n[17] || (n[17] = L("div", { class: "tw-flex-1 tw-h-full" }, null, -1)),
|
|
263
|
+
o.loggedIn ? f((d(), v("a", {
|
|
244
264
|
key: 0,
|
|
245
265
|
ref: "dashboardLink",
|
|
246
|
-
href:
|
|
247
|
-
class: A(["header-link tw-hidden md:tw-block", { "tw-text-tertiary": !!
|
|
266
|
+
href: o.myDashboardUrl,
|
|
267
|
+
class: A(["header-link tw-hidden md:tw-block", { "tw-text-tertiary": !!o.openMenuItem }])
|
|
248
268
|
}, n[14] || (n[14] = [
|
|
249
|
-
|
|
250
|
-
]), 10,
|
|
251
|
-
[
|
|
252
|
-
]) :
|
|
253
|
-
|
|
269
|
+
b(" My dashboard ")
|
|
270
|
+
]), 10, Be)), [
|
|
271
|
+
[a, ["TopNav", "click-Dashboard"]]
|
|
272
|
+
]) : z("", !0),
|
|
273
|
+
f((d(), v("a", {
|
|
254
274
|
ref: "basketLink",
|
|
255
275
|
href: "/basket",
|
|
256
|
-
class: A(["header-link tw-relative md:!tw-mr-0 tw-flex tw-items-center tw-gap-0.5", { "tw-text-tertiary": !!
|
|
257
|
-
style:
|
|
276
|
+
class: A(["header-link tw-relative md:!tw-mr-0 tw-flex tw-items-center tw-gap-0.5", { "tw-text-tertiary": !!o.openMenuItem }]),
|
|
277
|
+
style: N([o.isBasketDataLoading ? {
|
|
278
|
+
display: "var(--basket-display, flex)"
|
|
279
|
+
} : void 0, { "margin-right": "2px" }]),
|
|
258
280
|
"data-testid": "header-basket"
|
|
259
281
|
}, [
|
|
260
|
-
|
|
282
|
+
w(B, {
|
|
261
283
|
class: "tw-w-3 tw-h-3 md:tw-w-3.5 md:tw-h-3.5 tw-pointer-events-none tw-text-action",
|
|
262
|
-
count:
|
|
284
|
+
count: o.isBasketDataLoading ? 0 : o.basketCount
|
|
263
285
|
}, null, 8, ["count"]),
|
|
264
|
-
n[15] || (n[15] =
|
|
265
|
-
],
|
|
266
|
-
[
|
|
267
|
-
[
|
|
286
|
+
n[15] || (n[15] = L("span", { class: "tw-hidden md:tw-block" }, "Basket", -1))
|
|
287
|
+
], 6)), [
|
|
288
|
+
[W, o.isBasketDataLoading ? !0 : o.basketCount > 0],
|
|
289
|
+
[a, ["TopNav", "click-Basket"]]
|
|
268
290
|
]),
|
|
269
|
-
|
|
291
|
+
L("div", {
|
|
270
292
|
class: "md:tw-py-1",
|
|
271
|
-
onMouseenter: n[7] || (n[7] = (
|
|
272
|
-
onMouseleave: n[8] || (n[8] = (
|
|
273
|
-
onTouchstart: n[9] || (n[9] =
|
|
293
|
+
onMouseenter: n[7] || (n[7] = (l) => e.handleOnHover(e.AVATAR_MENU_ID, e.KvHeaderMyKivaMenu, e.getAvatarMenuPosition())),
|
|
294
|
+
onMouseleave: n[8] || (n[8] = (l) => e.handleMouseOut(e.AVATAR_MENU_ID)),
|
|
295
|
+
onTouchstart: n[9] || (n[9] = K((l) => e.handleTouchStart(e.AVATAR_MENU_ID), ["stop"]))
|
|
274
296
|
}, [
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
key: 0,
|
|
297
|
+
f(L("div", Ie, [
|
|
298
|
+
w(y, {
|
|
278
299
|
icon: e.mdiAccountCircle,
|
|
279
|
-
class: "tw-w-3"
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
300
|
+
class: "tw-w-3",
|
|
301
|
+
style: N(o.isUserDataLoading ? {
|
|
302
|
+
display: "var(--user-avatar-legacy-display, inline-block)"
|
|
303
|
+
} : {
|
|
304
|
+
display: e.isDefaultProfilePic ? "inline-block" : "none"
|
|
305
|
+
})
|
|
306
|
+
}, null, 8, ["icon", "style"]),
|
|
307
|
+
w(I, {
|
|
308
|
+
class: "tw-w-3 tw-h-3",
|
|
309
|
+
"lender-name": o.lenderName,
|
|
310
|
+
"lender-image-url": o.lenderImageUrl,
|
|
311
|
+
style: N(o.isUserDataLoading ? {
|
|
312
|
+
display: "var(--user-avatar-display, inline-block)"
|
|
313
|
+
} : {
|
|
314
|
+
display: e.isDefaultProfilePic ? "none" : "inline-block"
|
|
315
|
+
}),
|
|
316
|
+
"show-css-placeholder": o.isUserDataLoading,
|
|
285
317
|
"is-small": ""
|
|
286
|
-
}, null, 8, ["lender-name", "lender-image-url"])
|
|
287
|
-
|
|
318
|
+
}, null, 8, ["lender-name", "lender-image-url", "style", "show-css-placeholder"]),
|
|
319
|
+
o.isUserDataLoading ? (d(), v("div", He, [
|
|
320
|
+
w(H)
|
|
321
|
+
])) : (d(), v("span", De, le(e.numeral(e.roundedBalance).format("$0")), 1))
|
|
288
322
|
], 512), [
|
|
289
|
-
[
|
|
323
|
+
[W, o.loggedIn]
|
|
290
324
|
])
|
|
291
325
|
], 32),
|
|
292
|
-
|
|
326
|
+
o.loggedIn ? z("", !0) : f((d(), v("a", {
|
|
293
327
|
key: 1,
|
|
294
328
|
ref: "signInLink",
|
|
295
|
-
href:
|
|
296
|
-
class: A(["header-link", { "tw-text-tertiary": !!
|
|
329
|
+
href: o.loginUrl,
|
|
330
|
+
class: A(["header-link", { "tw-text-tertiary": !!o.openMenuItem }])
|
|
297
331
|
}, n[16] || (n[16] = [
|
|
298
|
-
|
|
299
|
-
]), 10,
|
|
300
|
-
[
|
|
332
|
+
b(" Sign in ")
|
|
333
|
+
]), 10, Ke)), [
|
|
334
|
+
[a, ["TopNav", "click-Sign-in"]]
|
|
301
335
|
])
|
|
302
336
|
], 32);
|
|
303
337
|
}
|
|
304
|
-
const
|
|
338
|
+
const Ge = /* @__PURE__ */ ge(Ue, [["render", Ee], ["__scopeId", "data-v-c31f1fca"]]);
|
|
305
339
|
export {
|
|
306
|
-
|
|
340
|
+
Ge as default
|
|
307
341
|
};
|
package/dist/vue/KvWwwHeader.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.header-fade-enter-active[data-v-
|
|
1
|
+
.header-fade-enter-active[data-v-137228da]{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.3s}.header-fade-leave-active[data-v-137228da]{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.1s}.header-fade-enter[data-v-137228da],.header-fade-leave-to[data-v-137228da]{opacity:0}.header-fade-leave[data-v-137228da],.header-fade-enter-to[data-v-137228da]{opacity:1}.bg-opacity-50[data-v-137228da]{background-color:rgba(var(--bg-action-highlight),.5)}
|
package/dist/vue/KvWwwHeader.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ref as a, shallowRef as N, computed as S, onMounted as x, onBeforeUnmount as A, resolveComponent as
|
|
1
|
+
import { ref as a, shallowRef as N, computed as S, onMounted as x, onBeforeUnmount as A, resolveComponent as g, resolveDirective as K, openBlock as b, createBlock as L, withCtx as w, createElementVNode as k, normalizeStyle as h, createVNode as v, Transition as E, withDirectives as y, vShow as I, createElementBlock as O, normalizeClass as G, resolveDynamicComponent as z, withModifiers as P } from "vue";
|
|
2
2
|
import R from "@kiva/kv-tokens";
|
|
3
3
|
import V from "./KvWwwHeader/KvHeaderLinkBar.js";
|
|
4
4
|
import W from "./KvWwwHeader/KvHeaderLogo.js";
|
|
@@ -32,6 +32,10 @@ const Q = "4rem", X = ["lendMenu", "aboutUsLink", "takeActionButton"], Z = {
|
|
|
32
32
|
type: Number,
|
|
33
33
|
default: 0
|
|
34
34
|
},
|
|
35
|
+
isBasketDataLoading: {
|
|
36
|
+
type: Boolean,
|
|
37
|
+
default: !1
|
|
38
|
+
},
|
|
35
39
|
isBorrower: {
|
|
36
40
|
type: Boolean,
|
|
37
41
|
default: !1
|
|
@@ -40,6 +44,10 @@ const Q = "4rem", X = ["lendMenu", "aboutUsLink", "takeActionButton"], Z = {
|
|
|
40
44
|
type: Boolean,
|
|
41
45
|
default: !1
|
|
42
46
|
},
|
|
47
|
+
isUserDataLoading: {
|
|
48
|
+
type: Boolean,
|
|
49
|
+
default: !1
|
|
50
|
+
},
|
|
43
51
|
userId: {
|
|
44
52
|
type: Number,
|
|
45
53
|
default: null
|
|
@@ -68,42 +76,42 @@ const Q = "4rem", X = ["lendMenu", "aboutUsLink", "takeActionButton"], Z = {
|
|
|
68
76
|
emits: [
|
|
69
77
|
"load-lend-menu-data"
|
|
70
78
|
],
|
|
71
|
-
setup(
|
|
72
|
-
const n = a(!0), e = a(null),
|
|
73
|
-
var
|
|
74
|
-
return ((t = (
|
|
75
|
-
}), _ = F((
|
|
76
|
-
f.value && (t ? (c.value =
|
|
77
|
-
...
|
|
79
|
+
setup(C, { emit: o }) {
|
|
80
|
+
const n = a(!0), e = a(null), i = a(!1), r = N(null), u = a(null), m = a({ left: 0, position: "relative" }), s = a(!1), c = a(null), f = a(!1), l = S(() => {
|
|
81
|
+
var d, t;
|
|
82
|
+
return ((t = (d = u.value) == null ? void 0 : d.$options) == null ? void 0 : t.name) === "KvHeaderMobileMenu";
|
|
83
|
+
}), _ = F((d, t, p) => {
|
|
84
|
+
f.value && (t ? (c.value = d, r.value !== t && (m.value = { left: 0, position: "relative" }), r.value = t, i.value = !0, p && (m.value = {
|
|
85
|
+
...p,
|
|
78
86
|
position: "absolute"
|
|
79
|
-
})) :
|
|
80
|
-
}, 100),
|
|
87
|
+
})) : i.value && (i.value = !1, r.value = null));
|
|
88
|
+
}, 100), D = (d) => {
|
|
81
89
|
var t;
|
|
82
|
-
(t =
|
|
90
|
+
(t = u.value) == null || t.onLoad(d);
|
|
83
91
|
}, U = () => {
|
|
84
92
|
if (!l.value) return _();
|
|
85
|
-
},
|
|
93
|
+
}, B = () => {
|
|
86
94
|
o("load-lend-menu-data");
|
|
87
|
-
},
|
|
88
|
-
s.value = (window == null ? void 0 : window.innerWidth) < R.breakpoints.md,
|
|
89
|
-
},
|
|
95
|
+
}, T = () => s.value && X.includes(c.value) || !s.value && l.value, M = () => {
|
|
96
|
+
s.value = (window == null ? void 0 : window.innerWidth) < R.breakpoints.md, T() && (r.value = null, i.value = !1);
|
|
97
|
+
}, H = q(M, 100);
|
|
90
98
|
return x(() => {
|
|
91
|
-
M(), window.addEventListener("resize",
|
|
99
|
+
M(), window.addEventListener("resize", H), f.value = !0;
|
|
92
100
|
}), A(() => {
|
|
93
|
-
window.removeEventListener("resize",
|
|
101
|
+
window.removeEventListener("resize", H);
|
|
94
102
|
}), {
|
|
95
103
|
HEADER_HEIGHT: Q,
|
|
96
|
-
emitLendMenuEvent:
|
|
104
|
+
emitLendMenuEvent: B,
|
|
97
105
|
isMobile: s,
|
|
98
106
|
linksVisible: n,
|
|
99
|
-
menuOpen:
|
|
107
|
+
menuOpen: i,
|
|
100
108
|
isMobileMenuActive: l,
|
|
101
109
|
onHover: _,
|
|
102
|
-
loadMenuData:
|
|
110
|
+
loadMenuData: D,
|
|
103
111
|
handleOverlayClick: U,
|
|
104
112
|
activeHeaderItem: e,
|
|
105
|
-
menuComponent:
|
|
106
|
-
menuComponentInstance:
|
|
113
|
+
menuComponent: r,
|
|
114
|
+
menuComponentInstance: u,
|
|
107
115
|
menuPosition: m
|
|
108
116
|
};
|
|
109
117
|
}
|
|
@@ -111,22 +119,24 @@ const Q = "4rem", X = ["lendMenu", "aboutUsLink", "takeActionButton"], Z = {
|
|
|
111
119
|
href: "/",
|
|
112
120
|
class: "tw-px-1 tw-py-2 tw-cursor-pointer tw-absolute tw-top-1/2 tw-left-1/2 tw--translate-y-1/2 tw--translate-x-1/2 tw-transition-all tw-duration-300"
|
|
113
121
|
};
|
|
114
|
-
function ee(
|
|
115
|
-
const
|
|
116
|
-
return
|
|
122
|
+
function ee(C, o, n, e, i, r) {
|
|
123
|
+
const u = g("kv-header-link-bar"), m = g("kv-header-logo"), s = g("kv-page-container"), c = g("kv-theme-provider"), f = K("kv-track-event");
|
|
124
|
+
return b(), L(c, {
|
|
117
125
|
tag: "div",
|
|
118
126
|
class: "tw-bg-primary"
|
|
119
127
|
}, {
|
|
120
|
-
default:
|
|
128
|
+
default: w(() => [
|
|
121
129
|
k("nav", {
|
|
122
130
|
class: "tw-font-medium tw-relative",
|
|
123
131
|
style: h({ height: e.HEADER_HEIGHT })
|
|
124
132
|
}, [
|
|
125
133
|
v(s, { class: "tw-h-full" }, {
|
|
126
|
-
default:
|
|
127
|
-
v(
|
|
128
|
-
default:
|
|
129
|
-
y(v(
|
|
134
|
+
default: w(() => [
|
|
135
|
+
v(E, { name: "header-fade" }, {
|
|
136
|
+
default: w(() => [
|
|
137
|
+
y(v(u, {
|
|
138
|
+
"is-basket-data-loading": n.isBasketDataLoading,
|
|
139
|
+
"is-user-data-loading": n.isUserDataLoading,
|
|
130
140
|
"logged-in": n.loggedIn,
|
|
131
141
|
"basket-count": n.basketCount,
|
|
132
142
|
"login-url": n.loginUrl,
|
|
@@ -137,13 +147,13 @@ function ee(L, o, n, e, r, i) {
|
|
|
137
147
|
"is-mobile": e.isMobile,
|
|
138
148
|
balance: n.balance,
|
|
139
149
|
onItemHover: e.onHover
|
|
140
|
-
}, null, 8, ["logged-in", "basket-count", "login-url", "open-menu-item", "my-dashboard-url", "lender-name", "lender-image-url", "is-mobile", "balance", "onItemHover"]), [
|
|
141
|
-
[
|
|
150
|
+
}, null, 8, ["is-basket-data-loading", "is-user-data-loading", "logged-in", "basket-count", "login-url", "open-menu-item", "my-dashboard-url", "lender-name", "lender-image-url", "is-mobile", "balance", "onItemHover"]), [
|
|
151
|
+
[I, e.linksVisible]
|
|
142
152
|
])
|
|
143
153
|
]),
|
|
144
154
|
_: 1
|
|
145
155
|
}),
|
|
146
|
-
y((
|
|
156
|
+
y((b(), O("a", $, [
|
|
147
157
|
v(m)
|
|
148
158
|
])), [
|
|
149
159
|
[f, ["TopNav", "click-Logo"]]
|
|
@@ -152,8 +162,8 @@ function ee(L, o, n, e, r, i) {
|
|
|
152
162
|
_: 1
|
|
153
163
|
})
|
|
154
164
|
], 4),
|
|
155
|
-
v(
|
|
156
|
-
default:
|
|
165
|
+
v(E, { name: "header-fade" }, {
|
|
166
|
+
default: w(() => [
|
|
157
167
|
y(k("div", {
|
|
158
168
|
class: "tw-absolute tw-z-modal tw-h-full tw-inset-x-0 tw-bg-eco-green-4 bg-opacity-50 tw-min-h-screen",
|
|
159
169
|
style: h({ top: e.HEADER_HEIGHT }),
|
|
@@ -168,7 +178,7 @@ function ee(L, o, n, e, r, i) {
|
|
|
168
178
|
onMouseenter: o[2] || (o[2] = (l) => e.onHover(e.activeHeaderItem, e.menuComponent)),
|
|
169
179
|
onMouseleave: o[3] || (o[3] = (l) => e.onHover())
|
|
170
180
|
}, [
|
|
171
|
-
(
|
|
181
|
+
(b(), L(z(e.menuComponent), {
|
|
172
182
|
ref: "menuComponentInstance",
|
|
173
183
|
"logged-in": n.loggedIn,
|
|
174
184
|
"login-url": n.loginUrl,
|
|
@@ -186,7 +196,7 @@ function ee(L, o, n, e, r, i) {
|
|
|
186
196
|
}, null, 40, ["logged-in", "login-url", "user-id", "is-borrower", "is-trustee", "my-dashboard-url", "show-m-g-upsell-link", "is-mobile", "countries-not-lent-to-url", "onLoadLendMenuData"]))
|
|
187
197
|
], 38)
|
|
188
198
|
], 36), [
|
|
189
|
-
[
|
|
199
|
+
[I, e.menuOpen]
|
|
190
200
|
])
|
|
191
201
|
]),
|
|
192
202
|
_: 1
|
|
@@ -195,7 +205,7 @@ function ee(L, o, n, e, r, i) {
|
|
|
195
205
|
_: 1
|
|
196
206
|
});
|
|
197
207
|
}
|
|
198
|
-
const me = /* @__PURE__ */ J(Z, [["render", ee], ["__scopeId", "data-v-
|
|
208
|
+
const me = /* @__PURE__ */ J(Z, [["render", ee], ["__scopeId", "data-v-137228da"]]);
|
|
199
209
|
export {
|
|
200
210
|
me as default
|
|
201
211
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kiva/kv-components",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "7.0.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -114,5 +114,5 @@
|
|
|
114
114
|
"embla-carousel-fade",
|
|
115
115
|
"popper.js"
|
|
116
116
|
],
|
|
117
|
-
"gitHead": "
|
|
117
|
+
"gitHead": "d1d979db0ae3e33f4b8b8a1d04a802ffb0c733ee"
|
|
118
118
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
.activity-avatar[data-v-84a9404c],.activity-avatar[data-v-84a9404c] img,.activity-avatar[data-v-84a9404c] div{height:2rem;width:2rem}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
.adjust-vertical-spacing[data-v-c9339e78]{top:-.1rem;position:relative}
|