@kiva/kv-components 9.0.0 → 9.0.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.
- package/dist/vue/KvActivityRow.vue.d.ts +24 -0
- package/dist/vue/KvCommentsAdd.vue.d.ts +24 -0
- package/dist/vue/KvCommentsContainer.vue.d.ts +72 -0
- package/dist/vue/KvCommentsList.vue.d.ts +48 -0
- package/dist/vue/KvCommentsListItem.vue.d.ts +48 -0
- package/dist/vue/KvInlineActivityCard.vue.d.ts +24 -0
- package/dist/vue/KvInlineActivityFeed.vue.d.ts +24 -0
- package/dist/vue/KvLoanActivities.vue.d.ts +24 -0
- package/dist/vue/KvUserAvatar.css +1 -1
- package/dist/vue/KvUserAvatar.js +38 -32
- package/dist/vue/KvUserAvatar.vue.d.ts +24 -0
- package/dist/vue/KvUserAvatar2.js +41 -27
- package/dist/vue/KvWwwHeaderBasic/KvWwwHeaderBasic.css +1 -1
- package/dist/vue/KvWwwHeaderBasic/KvWwwHeaderBasic.js +61 -60
- package/dist/vue/KvWwwHeaderBasic/KvWwwHeaderBasic2.js +6 -4
- package/dist/vue/KvWwwHeaderBasic/LinkBar.css +1 -1
- package/dist/vue/KvWwwHeaderBasic/LinkBar.js +9 -8
- package/package.json +3 -3
|
@@ -158,15 +158,21 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
158
158
|
type: BooleanConstructor;
|
|
159
159
|
default: boolean;
|
|
160
160
|
};
|
|
161
|
+
useIconFallback: {
|
|
162
|
+
type: BooleanConstructor;
|
|
163
|
+
default: boolean;
|
|
164
|
+
};
|
|
161
165
|
theme: {
|
|
162
166
|
type: StringConstructor;
|
|
163
167
|
default: string;
|
|
164
168
|
validator(value: string): boolean;
|
|
165
169
|
};
|
|
166
170
|
}>, {
|
|
171
|
+
mdiAccountCircle: string;
|
|
167
172
|
isAnonymousUser: import('vue').ComputedRef<boolean>;
|
|
168
173
|
avatarClass: import('vue').ComputedRef<string>;
|
|
169
174
|
userHasImage: import('vue').ComputedRef<boolean>;
|
|
175
|
+
showIconFallback: import('vue').ComputedRef<boolean>;
|
|
170
176
|
lenderNameFirstLetter: import('vue').ComputedRef<string>;
|
|
171
177
|
letterViewBox: import('vue').ComputedRef<"0 0 27 27" | "0 0 27.5 27.5">;
|
|
172
178
|
isLegacyPlaceholderAvatar: typeof import('..').isLegacyPlaceholderAvatar;
|
|
@@ -191,6 +197,10 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
191
197
|
type: BooleanConstructor;
|
|
192
198
|
default: boolean;
|
|
193
199
|
};
|
|
200
|
+
useIconFallback: {
|
|
201
|
+
type: BooleanConstructor;
|
|
202
|
+
default: boolean;
|
|
203
|
+
};
|
|
194
204
|
theme: {
|
|
195
205
|
type: StringConstructor;
|
|
196
206
|
default: string;
|
|
@@ -201,9 +211,23 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
201
211
|
lenderImageUrl: string;
|
|
202
212
|
isSmall: boolean;
|
|
203
213
|
showCssPlaceholder: boolean;
|
|
214
|
+
useIconFallback: boolean;
|
|
204
215
|
theme: string;
|
|
205
216
|
}, {}, {
|
|
206
217
|
KvLoadingPlaceholder: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, HTMLDivElement>;
|
|
218
|
+
KvMaterialIcon: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
219
|
+
icon: {
|
|
220
|
+
type: StringConstructor;
|
|
221
|
+
default: string;
|
|
222
|
+
};
|
|
223
|
+
}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
224
|
+
icon: {
|
|
225
|
+
type: StringConstructor;
|
|
226
|
+
default: string;
|
|
227
|
+
};
|
|
228
|
+
}>> & Readonly<{}>, {
|
|
229
|
+
icon: string;
|
|
230
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
207
231
|
}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
208
232
|
}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
209
233
|
KvLightbox: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.kiva-k__normal[data-v-
|
|
1
|
+
.kiva-k__normal[data-v-cc9f009d]{height:60%}.kiva-k__small[data-v-cc9f009d]{height:70%}.kiva-k__white[data-v-cc9f009d]{fill:#fff}.kiva-k__green-light[data-v-cc9f009d]{fill:#78c79f}
|
package/dist/vue/KvUserAvatar.js
CHANGED
|
@@ -1,26 +1,32 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { resolveComponent as
|
|
1
|
+
import w from "./KvUserAvatar2.js";
|
|
2
|
+
import { resolveComponent as s, openBlock as a, createElementBlock as t, normalizeClass as i, createBlock as h, createCommentVNode as r, createElementVNode as o, withDirectives as v, createVNode as _, vShow as f, normalizeStyle as c, toDisplayString as k } from "vue";
|
|
3
3
|
import "./KvUserAvatar.css";
|
|
4
|
-
import
|
|
5
|
-
const
|
|
4
|
+
import g from "../_virtual/_plugin-vue_export-helper.js";
|
|
5
|
+
const u = ["src"], y = ["viewBox"], I = {
|
|
6
6
|
x: "50%",
|
|
7
7
|
y: "55%",
|
|
8
8
|
"dominant-baseline": "middle",
|
|
9
9
|
"text-anchor": "middle"
|
|
10
10
|
};
|
|
11
|
-
function
|
|
12
|
-
const d =
|
|
13
|
-
return
|
|
11
|
+
function b(x, n, l, e, C, A) {
|
|
12
|
+
const d = s("kv-material-icon"), m = s("kv-loading-placeholder");
|
|
13
|
+
return a(), t("div", {
|
|
14
14
|
ref: "userAvatar",
|
|
15
|
-
class:
|
|
16
|
-
"tw-bg-brand": e.isAnonymousUser && l.theme === "default",
|
|
17
|
-
"tw-bg-brand-100": e.isAnonymousUser && l.theme === "ecoGreenLight",
|
|
18
|
-
[e.avatarClass]: !e.isAnonymousUser
|
|
15
|
+
class: i(["data-hj-suppress tw-flex tw-items-center tw-justify-center tw-rounded-full tw-overflow-hidden", {
|
|
16
|
+
"tw-bg-brand": e.isAnonymousUser && l.theme === "default" && !e.showIconFallback,
|
|
17
|
+
"tw-bg-brand-100": e.showIconFallback || e.isAnonymousUser && l.theme === "ecoGreenLight",
|
|
18
|
+
[e.avatarClass]: !e.isAnonymousUser && !e.showIconFallback
|
|
19
19
|
}])
|
|
20
20
|
}, [
|
|
21
|
-
e.
|
|
21
|
+
e.showIconFallback ? (a(), h(d, {
|
|
22
22
|
key: 0,
|
|
23
|
-
|
|
23
|
+
icon: e.mdiAccountCircle,
|
|
24
|
+
class: "tw-w-full tw-h-full tw-text-action",
|
|
25
|
+
"data-testid": "user-avatar-icon"
|
|
26
|
+
}, null, 8, ["icon"])) : r("", !0),
|
|
27
|
+
e.isAnonymousUser && !e.showIconFallback ? (a(), t("svg", {
|
|
28
|
+
key: 1,
|
|
29
|
+
class: i({
|
|
24
30
|
"kiva-k__green-light": l.theme === "ecoGreenLight",
|
|
25
31
|
"kiva-k__white": l.theme === "default",
|
|
26
32
|
"kiva-k__small": l.isSmall,
|
|
@@ -28,41 +34,41 @@ function k(x, o, l, e, C, A) {
|
|
|
28
34
|
}),
|
|
29
35
|
viewBox: "0 0 25 37",
|
|
30
36
|
xmlns: "http://www.w3.org/2000/svg"
|
|
31
|
-
},
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
37
|
+
}, n[1] || (n[1] = [
|
|
38
|
+
o("path", { d: "M8.22861 0.875H0.857178V36.3125H8.22861V0.875Z" }, null, -1),
|
|
39
|
+
o("path", { 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" }, null, -1),
|
|
40
|
+
o("path", { 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" }, null, -1)
|
|
35
41
|
]), 2)) : r("", !0),
|
|
36
|
-
|
|
37
|
-
[f, !e.isAnonymousUser && e.userHasImage && e.isImageLoading]
|
|
42
|
+
v(_(m, null, null, 512), [
|
|
43
|
+
[f, !e.isAnonymousUser && e.userHasImage && e.isImageLoading && !l.showCssPlaceholder]
|
|
38
44
|
]),
|
|
39
|
-
!e.isAnonymousUser && e.userHasImage ? (
|
|
40
|
-
key:
|
|
45
|
+
!e.isAnonymousUser && e.userHasImage ? (a(), t("div", {
|
|
46
|
+
key: 2,
|
|
41
47
|
class: "tw-w-full tw-h-full",
|
|
42
|
-
style:
|
|
48
|
+
style: c(l.showCssPlaceholder ? { display: "var(--user-avatar-display, block)" } : {
|
|
43
49
|
display: e.isImageLoading ? "none" : "block"
|
|
44
50
|
})
|
|
45
51
|
}, [
|
|
46
|
-
|
|
52
|
+
o("img", {
|
|
47
53
|
ref: "imageRef",
|
|
48
54
|
src: l.lenderImageUrl,
|
|
49
55
|
alt: "Image of lender",
|
|
50
56
|
class: "tw-w-full",
|
|
51
|
-
style:
|
|
52
|
-
onLoad:
|
|
53
|
-
}, null, 44,
|
|
57
|
+
style: c(l.showCssPlaceholder ? { content: "var(--user-avatar)" } : {}),
|
|
58
|
+
onLoad: n[0] || (n[0] = (H) => e.onImgLoad())
|
|
59
|
+
}, null, 44, u)
|
|
54
60
|
], 4)) : r("", !0),
|
|
55
|
-
!e.isAnonymousUser && !e.userHasImage ? (
|
|
56
|
-
key:
|
|
61
|
+
!e.isAnonymousUser && !e.userHasImage && !e.showIconFallback ? (a(), t("svg", {
|
|
62
|
+
key: 3,
|
|
57
63
|
class: "tw-w-full tw-h-full",
|
|
58
64
|
fill: "currentColor",
|
|
59
65
|
viewBox: e.letterViewBox
|
|
60
66
|
}, [
|
|
61
|
-
|
|
62
|
-
], 8,
|
|
67
|
+
o("text", I, k(e.lenderNameFirstLetter), 1)
|
|
68
|
+
], 8, y)) : r("", !0)
|
|
63
69
|
], 2);
|
|
64
70
|
}
|
|
65
|
-
const
|
|
71
|
+
const V = /* @__PURE__ */ g(w, [["render", b], ["__scopeId", "data-v-cc9f009d"]]);
|
|
66
72
|
export {
|
|
67
|
-
|
|
73
|
+
V as default
|
|
68
74
|
};
|
|
@@ -16,15 +16,21 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
16
16
|
type: BooleanConstructor;
|
|
17
17
|
default: boolean;
|
|
18
18
|
};
|
|
19
|
+
useIconFallback: {
|
|
20
|
+
type: BooleanConstructor;
|
|
21
|
+
default: boolean;
|
|
22
|
+
};
|
|
19
23
|
theme: {
|
|
20
24
|
type: StringConstructor;
|
|
21
25
|
default: string;
|
|
22
26
|
validator(value: string): boolean;
|
|
23
27
|
};
|
|
24
28
|
}>, {
|
|
29
|
+
mdiAccountCircle: string;
|
|
25
30
|
isAnonymousUser: import('vue').ComputedRef<boolean>;
|
|
26
31
|
avatarClass: import('vue').ComputedRef<string>;
|
|
27
32
|
userHasImage: import('vue').ComputedRef<boolean>;
|
|
33
|
+
showIconFallback: import('vue').ComputedRef<boolean>;
|
|
28
34
|
lenderNameFirstLetter: import('vue').ComputedRef<string>;
|
|
29
35
|
letterViewBox: import('vue').ComputedRef<"0 0 27 27" | "0 0 27.5 27.5">;
|
|
30
36
|
isLegacyPlaceholderAvatar: typeof isLegacyPlaceholderAvatar;
|
|
@@ -49,6 +55,10 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
49
55
|
type: BooleanConstructor;
|
|
50
56
|
default: boolean;
|
|
51
57
|
};
|
|
58
|
+
useIconFallback: {
|
|
59
|
+
type: BooleanConstructor;
|
|
60
|
+
default: boolean;
|
|
61
|
+
};
|
|
52
62
|
theme: {
|
|
53
63
|
type: StringConstructor;
|
|
54
64
|
default: string;
|
|
@@ -59,8 +69,22 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
59
69
|
lenderImageUrl: string;
|
|
60
70
|
isSmall: boolean;
|
|
61
71
|
showCssPlaceholder: boolean;
|
|
72
|
+
useIconFallback: boolean;
|
|
62
73
|
theme: string;
|
|
63
74
|
}, {}, {
|
|
64
75
|
KvLoadingPlaceholder: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, HTMLDivElement>;
|
|
76
|
+
KvMaterialIcon: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
77
|
+
icon: {
|
|
78
|
+
type: StringConstructor;
|
|
79
|
+
default: string;
|
|
80
|
+
};
|
|
81
|
+
}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
82
|
+
icon: {
|
|
83
|
+
type: StringConstructor;
|
|
84
|
+
default: string;
|
|
85
|
+
};
|
|
86
|
+
}>> & Readonly<{}>, {
|
|
87
|
+
icon: string;
|
|
88
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
65
89
|
}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
66
90
|
export default _default;
|
|
@@ -1,10 +1,13 @@
|
|
|
1
|
-
import { toRefs as
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
|
|
1
|
+
import { toRefs as b, ref as l, computed as r, onMounted as k } from "vue";
|
|
2
|
+
import { mdiAccountCircle as B } from "@mdi/js";
|
|
3
|
+
import { randomizedUserAvatarClass as U, isLegacyPlaceholderAvatar as v } from "../utils/imageUtils.js";
|
|
4
|
+
import x from "./KvLoadingPlaceholder.js";
|
|
5
|
+
import K from "./KvMaterialIcon.js";
|
|
6
|
+
const R = {
|
|
5
7
|
name: "KvUserAvatar",
|
|
6
8
|
components: {
|
|
7
|
-
KvLoadingPlaceholder:
|
|
9
|
+
KvLoadingPlaceholder: x,
|
|
10
|
+
KvMaterialIcon: K
|
|
8
11
|
},
|
|
9
12
|
props: {
|
|
10
13
|
/**
|
|
@@ -35,6 +38,14 @@ const z = {
|
|
|
35
38
|
type: Boolean,
|
|
36
39
|
default: !1
|
|
37
40
|
},
|
|
41
|
+
/**
|
|
42
|
+
* Whether to show the avatar icon in place of the initial letter and the Kiva K when the
|
|
43
|
+
* lender has no custom image. Opt-in so existing consumers keep the lettered avatar.
|
|
44
|
+
*/
|
|
45
|
+
useIconFallback: {
|
|
46
|
+
type: Boolean,
|
|
47
|
+
default: !1
|
|
48
|
+
},
|
|
38
49
|
theme: {
|
|
39
50
|
type: String,
|
|
40
51
|
default: "default",
|
|
@@ -51,48 +62,51 @@ const z = {
|
|
|
51
62
|
lenderName: t,
|
|
52
63
|
lenderImageUrl: n,
|
|
53
64
|
isSmall: o,
|
|
54
|
-
showCssPlaceholder: u
|
|
55
|
-
|
|
65
|
+
showCssPlaceholder: u,
|
|
66
|
+
useIconFallback: g
|
|
67
|
+
} = b(s), c = l(!0), i = l(null), w = l(null), f = r(() => !u.value && t.value === "" && n.value === "" || t.value === "Anonymous"), h = r(() => {
|
|
56
68
|
const e = o != null && o.value ? "tw-font-sans tw-font-normal" : "tw-font-serif";
|
|
57
|
-
return `${
|
|
58
|
-
}),
|
|
69
|
+
return `${U(t.value)} ${e}`;
|
|
70
|
+
}), y = r(() => o != null && o.value ? "0 0 27 27" : "0 0 27.5 27.5"), m = r(() => {
|
|
59
71
|
var a;
|
|
60
72
|
if (u.value)
|
|
61
73
|
return !0;
|
|
62
74
|
const e = ((a = n == null ? void 0 : n.value) == null ? void 0 : a.split("/").pop()) ?? "";
|
|
63
|
-
return e && !
|
|
64
|
-
}),
|
|
75
|
+
return e && !v(e);
|
|
76
|
+
}), I = r(() => {
|
|
65
77
|
var e;
|
|
66
78
|
return (e = t == null ? void 0 : t.value) == null ? void 0 : e.substring(0, 1).toUpperCase();
|
|
67
|
-
}), f = () => {
|
|
79
|
+
}), A = r(() => g.value && (f.value || !m.value)), d = () => {
|
|
68
80
|
c.value = !1;
|
|
69
|
-
},
|
|
70
|
-
const P = Date.now() + a,
|
|
71
|
-
!e || e.complete ?
|
|
81
|
+
}, C = (e, a = 1e4) => new Promise((F, L) => {
|
|
82
|
+
const P = Date.now() + a, p = () => {
|
|
83
|
+
!e || e.complete ? F(e) : Date.now() > P ? L(new Error(`Timeout: ${e.src}`)) : setTimeout(p, 50);
|
|
72
84
|
};
|
|
73
|
-
|
|
85
|
+
p();
|
|
74
86
|
});
|
|
75
|
-
return
|
|
87
|
+
return k(async () => {
|
|
76
88
|
const e = i.value;
|
|
77
89
|
try {
|
|
78
|
-
await
|
|
90
|
+
await C(e), d();
|
|
79
91
|
} catch (a) {
|
|
80
92
|
console.log(a.message);
|
|
81
93
|
}
|
|
82
94
|
}), {
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
95
|
+
mdiAccountCircle: B,
|
|
96
|
+
isAnonymousUser: f,
|
|
97
|
+
avatarClass: h,
|
|
98
|
+
userHasImage: m,
|
|
99
|
+
showIconFallback: A,
|
|
100
|
+
lenderNameFirstLetter: I,
|
|
101
|
+
letterViewBox: y,
|
|
102
|
+
isLegacyPlaceholderAvatar: v,
|
|
89
103
|
isImageLoading: c,
|
|
90
|
-
onImgLoad:
|
|
104
|
+
onImgLoad: d,
|
|
91
105
|
imageRef: i,
|
|
92
|
-
userAvatar:
|
|
106
|
+
userAvatar: w
|
|
93
107
|
};
|
|
94
108
|
}
|
|
95
109
|
};
|
|
96
110
|
export {
|
|
97
|
-
|
|
111
|
+
R as default
|
|
98
112
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.header-fade-enter-active[data-v-
|
|
1
|
+
.header-fade-enter-active[data-v-ec338a13]{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.3s}.header-fade-leave-active[data-v-ec338a13]{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.1s}.header-fade-enter[data-v-ec338a13],.header-fade-leave-to[data-v-ec338a13]{opacity:0}.header-fade-leave[data-v-ec338a13],.header-fade-enter-to[data-v-ec338a13]{opacity:1}.bg-opacity-50[data-v-ec338a13]{background-color:rgba(var(--bg-action-highlight),.5)}
|
|
@@ -1,48 +1,49 @@
|
|
|
1
1
|
import k from "./KvWwwHeaderBasic2.js";
|
|
2
|
-
import { resolveComponent as
|
|
2
|
+
import { resolveComponent as l, openBlock as m, createBlock as u, withCtx as a, createElementVNode as s, normalizeStyle as d, createVNode as r, Transition as g, withDirectives as v, vShow as b, normalizeClass as h, resolveDynamicComponent as y, withModifiers as M } from "vue";
|
|
3
3
|
import "./KvWwwHeaderBasic.css";
|
|
4
4
|
import I from "../../_virtual/_plugin-vue_export-helper.js";
|
|
5
|
-
function L(t, o,
|
|
6
|
-
const w =
|
|
7
|
-
return m(), u(
|
|
5
|
+
function L(t, o, e, n, C, D) {
|
|
6
|
+
const w = l("link-bar"), c = l("kv-page-container"), f = l("kv-theme-provider");
|
|
7
|
+
return m(), u(f, {
|
|
8
8
|
tag: "div",
|
|
9
9
|
class: "tw-bg-primary"
|
|
10
10
|
}, {
|
|
11
|
-
default:
|
|
11
|
+
default: a(() => [
|
|
12
12
|
s("nav", {
|
|
13
13
|
ref: "navRef",
|
|
14
14
|
class: "tw-font-medium tw-relative",
|
|
15
|
-
style: d({ minHeight:
|
|
15
|
+
style: d({ minHeight: n.MIN_HEADER_HEIGHT })
|
|
16
16
|
}, [
|
|
17
|
-
|
|
18
|
-
default:
|
|
19
|
-
|
|
20
|
-
default:
|
|
21
|
-
|
|
22
|
-
"logged-in":
|
|
23
|
-
"basket-count":
|
|
24
|
-
balance:
|
|
25
|
-
"user-id":
|
|
26
|
-
"is-borrower":
|
|
27
|
-
"is-trustee":
|
|
28
|
-
"lender-name":
|
|
29
|
-
"lender-image-url":
|
|
30
|
-
"is-user-data-loading":
|
|
31
|
-
"is-basket-data-loading":
|
|
32
|
-
"
|
|
33
|
-
"
|
|
34
|
-
"
|
|
35
|
-
"
|
|
36
|
-
"
|
|
37
|
-
"
|
|
38
|
-
"
|
|
39
|
-
"
|
|
40
|
-
|
|
17
|
+
r(c, null, {
|
|
18
|
+
default: a(() => [
|
|
19
|
+
r(g, { name: "header-fade" }, {
|
|
20
|
+
default: a(() => [
|
|
21
|
+
v(r(w, {
|
|
22
|
+
"logged-in": e.loggedIn,
|
|
23
|
+
"basket-count": e.basketCount,
|
|
24
|
+
balance: e.balance,
|
|
25
|
+
"user-id": e.userId,
|
|
26
|
+
"is-borrower": e.isBorrower,
|
|
27
|
+
"is-trustee": e.isTrustee,
|
|
28
|
+
"lender-name": e.lenderName,
|
|
29
|
+
"lender-image-url": e.lenderImageUrl,
|
|
30
|
+
"is-user-data-loading": e.isUserDataLoading,
|
|
31
|
+
"is-basket-data-loading": e.isBasketDataLoading,
|
|
32
|
+
"use-esi-avatar": e.useEsiAvatar,
|
|
33
|
+
"show-m-g-upsell-link": e.showMGUpsellLink,
|
|
34
|
+
"login-url": e.loginUrl,
|
|
35
|
+
"my-dashboard-url": e.myDashboardUrl,
|
|
36
|
+
"countries-not-lent-to-url": e.countriesNotLentToUrl,
|
|
37
|
+
"app-origin": n.resolvedAppOrigin,
|
|
38
|
+
"search-suggestions": n.effectiveSuggestions,
|
|
39
|
+
"is-mobile": n.isMobile,
|
|
40
|
+
"open-menu-item": n.menuComponent,
|
|
41
|
+
onItemHover: n.onItemHover,
|
|
41
42
|
onLoadSearchData: o[0] || (o[0] = (i) => t.$emit("load-search-data")),
|
|
42
43
|
onSearchSubmit: o[1] || (o[1] = (i) => t.$emit("search-submit", i)),
|
|
43
44
|
onLoginClick: o[2] || (o[2] = (i) => t.$emit("login-click", i))
|
|
44
|
-
}, null, 8, ["logged-in", "basket-count", "balance", "user-id", "is-borrower", "is-trustee", "lender-name", "lender-image-url", "is-user-data-loading", "is-basket-data-loading", "show-m-g-upsell-link", "login-url", "my-dashboard-url", "countries-not-lent-to-url", "app-origin", "search-suggestions", "is-mobile", "open-menu-item", "onItemHover"]), [
|
|
45
|
-
[
|
|
45
|
+
}, null, 8, ["logged-in", "basket-count", "balance", "user-id", "is-borrower", "is-trustee", "lender-name", "lender-image-url", "is-user-data-loading", "is-basket-data-loading", "use-esi-avatar", "show-m-g-upsell-link", "login-url", "my-dashboard-url", "countries-not-lent-to-url", "app-origin", "search-suggestions", "is-mobile", "open-menu-item", "onItemHover"]), [
|
|
46
|
+
[b, n.linksVisible]
|
|
46
47
|
])
|
|
47
48
|
]),
|
|
48
49
|
_: 1
|
|
@@ -51,49 +52,49 @@ function L(t, o, n, e, C, D) {
|
|
|
51
52
|
_: 1
|
|
52
53
|
})
|
|
53
54
|
], 4),
|
|
54
|
-
|
|
55
|
-
default:
|
|
56
|
-
|
|
55
|
+
r(g, { name: "header-fade" }, {
|
|
56
|
+
default: a(() => [
|
|
57
|
+
v(s("div", {
|
|
57
58
|
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",
|
|
58
|
-
style: d({ top:
|
|
59
|
-
onTouchstart: o[9] || (o[9] = (...i) =>
|
|
59
|
+
style: d({ top: n.navHeight }),
|
|
60
|
+
onTouchstart: o[9] || (o[9] = (...i) => n.handleOverlayClick && n.handleOverlayClick(...i))
|
|
60
61
|
}, [
|
|
61
62
|
s("div", {
|
|
62
63
|
ref: "menuPanelRef",
|
|
63
|
-
class: h(["tw-bg-primary tw-overflow-y-auto",
|
|
64
|
+
class: h(["tw-bg-primary tw-overflow-y-auto", n.menuPanelClass]),
|
|
64
65
|
style: d({
|
|
65
|
-
...
|
|
66
|
-
maxHeight:
|
|
66
|
+
...n.menuPosition,
|
|
67
|
+
maxHeight: n.isMobileMenuActive ? "auto" : `calc(100dvh - ${n.navHeight})`
|
|
67
68
|
}),
|
|
68
|
-
onMouseenter: o[7] || (o[7] = (i) =>
|
|
69
|
-
onMouseleave: o[8] || (o[8] = (i) =>
|
|
69
|
+
onMouseenter: o[7] || (o[7] = (i) => n.setMenu(n.menuItem, n.menuComponent)),
|
|
70
|
+
onMouseleave: o[8] || (o[8] = (i) => n.setMenu())
|
|
70
71
|
}, [
|
|
71
|
-
(m(), u(y(
|
|
72
|
+
(m(), u(y(n.menuComponent), {
|
|
72
73
|
ref: "menuComponentInstance",
|
|
73
|
-
"logged-in":
|
|
74
|
-
"login-url":
|
|
75
|
-
"user-id":
|
|
76
|
-
"is-borrower":
|
|
77
|
-
"is-trustee":
|
|
78
|
-
"trustee-id":
|
|
79
|
-
"most-recent-borrowed-loan-id":
|
|
80
|
-
"my-dashboard-url":
|
|
81
|
-
"show-m-g-upsell-link":
|
|
82
|
-
"is-mobile":
|
|
83
|
-
"countries-not-lent-to-url":
|
|
74
|
+
"logged-in": e.loggedIn,
|
|
75
|
+
"login-url": e.loginUrl,
|
|
76
|
+
"user-id": e.userId,
|
|
77
|
+
"is-borrower": e.isBorrower,
|
|
78
|
+
"is-trustee": e.isTrustee,
|
|
79
|
+
"trustee-id": e.trusteeId,
|
|
80
|
+
"most-recent-borrowed-loan-id": e.mostRecentBorrowedLoanId,
|
|
81
|
+
"my-dashboard-url": e.myDashboardUrl,
|
|
82
|
+
"show-m-g-upsell-link": e.showMGUpsellLink,
|
|
83
|
+
"is-mobile": n.isMobile,
|
|
84
|
+
"countries-not-lent-to-url": e.countriesNotLentToUrl,
|
|
84
85
|
"use-mobile-mega-menu": !0,
|
|
85
|
-
"app-origin":
|
|
86
|
-
"search-suggestions":
|
|
87
|
-
onLoadLendMenuData:
|
|
86
|
+
"app-origin": n.resolvedAppOrigin,
|
|
87
|
+
"search-suggestions": n.effectiveSuggestions,
|
|
88
|
+
onLoadLendMenuData: n.emitLendMenuEvent,
|
|
88
89
|
onLoadSearchData: o[3] || (o[3] = (i) => t.$emit("load-search-data")),
|
|
89
90
|
onSearchSubmit: o[4] || (o[4] = (i) => t.$emit("search-submit", i)),
|
|
90
|
-
onClosingMenu: o[5] || (o[5] = (i) =>
|
|
91
|
+
onClosingMenu: o[5] || (o[5] = (i) => n.setMenu()),
|
|
91
92
|
onTouchstart: o[6] || (o[6] = M(() => {
|
|
92
93
|
}, ["stop"]))
|
|
93
94
|
}, null, 40, ["logged-in", "login-url", "user-id", "is-borrower", "is-trustee", "trustee-id", "most-recent-borrowed-loan-id", "my-dashboard-url", "show-m-g-upsell-link", "is-mobile", "countries-not-lent-to-url", "app-origin", "search-suggestions", "onLoadLendMenuData"]))
|
|
94
95
|
], 38)
|
|
95
96
|
], 36), [
|
|
96
|
-
[
|
|
97
|
+
[b, n.menuOpen]
|
|
97
98
|
])
|
|
98
99
|
]),
|
|
99
100
|
_: 1
|
|
@@ -102,7 +103,7 @@ function L(t, o, n, e, C, D) {
|
|
|
102
103
|
_: 1
|
|
103
104
|
});
|
|
104
105
|
}
|
|
105
|
-
const B = /* @__PURE__ */ I(k, [["render", L], ["__scopeId", "data-v-
|
|
106
|
+
const B = /* @__PURE__ */ I(k, [["render", L], ["__scopeId", "data-v-ec338a13"]]);
|
|
106
107
|
export {
|
|
107
108
|
B as default
|
|
108
109
|
};
|
|
@@ -33,6 +33,8 @@ const S = "4rem", Y = G`
|
|
|
33
33
|
lenderImageUrl: { type: String, default: "" },
|
|
34
34
|
isUserDataLoading: { type: Boolean, default: !1 },
|
|
35
35
|
isBasketDataLoading: { type: Boolean, default: !1 },
|
|
36
|
+
// Only for hosts whose ESI emits --user-avatar; without it the avatar renders an empty image.
|
|
37
|
+
useEsiAvatar: { type: Boolean, default: !1 },
|
|
36
38
|
showMGUpsellLink: { type: Boolean, default: !1 },
|
|
37
39
|
loginUrl: { type: String, default: "/ui-login" },
|
|
38
40
|
myDashboardUrl: { type: String, default: "/mykiva" },
|
|
@@ -68,7 +70,7 @@ const S = "4rem", Y = G`
|
|
|
68
70
|
var t, e;
|
|
69
71
|
return ((e = (t = l.value) == null ? void 0 : t.$options) == null ? void 0 : e.name) === "AboutMenu";
|
|
70
72
|
}), C = s(() => g.value ? "tw-w-full tw-min-h-dvh tw-rounded-none" : h.value ? "tw-w-auto tw-rounded-b tw-border tw-border-t-0 tw-border-tertiary" : q.value ? "tw-w-full md:tw-w-auto tw-rounded-none !tw-rounded-b md:tw-border md:tw-border-t-0 md:tw-border-tertiary" : "tw-w-full md:tw-w-auto tw-rounded-none !md:tw-rounded-b");
|
|
71
|
-
function
|
|
73
|
+
function E(t, e, n, i = null) {
|
|
72
74
|
c.value = i, f(t, e, n);
|
|
73
75
|
}
|
|
74
76
|
D(h, async (t) => {
|
|
@@ -79,7 +81,7 @@ const S = "4rem", Y = G`
|
|
|
79
81
|
const n = e.offsetWidth, i = c.value, a = Math.max(0, window.innerWidth - (i + n / 2));
|
|
80
82
|
v.value = { right: `${a}px`, position: "absolute" };
|
|
81
83
|
});
|
|
82
|
-
function
|
|
84
|
+
function R() {
|
|
83
85
|
M("load-lend-menu-data");
|
|
84
86
|
}
|
|
85
87
|
function T(t) {
|
|
@@ -125,9 +127,9 @@ const S = "4rem", Y = G`
|
|
|
125
127
|
menuPanelRef: w,
|
|
126
128
|
pinMenuOpen: H,
|
|
127
129
|
setMenu: f,
|
|
128
|
-
onItemHover:
|
|
130
|
+
onItemHover: E,
|
|
129
131
|
handleOverlayClick: x,
|
|
130
|
-
emitLendMenuEvent:
|
|
132
|
+
emitLendMenuEvent: R,
|
|
131
133
|
loadMenuData: T,
|
|
132
134
|
loadSearchSuggestions: _
|
|
133
135
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.link-bar[data-v-
|
|
1
|
+
.link-bar[data-v-5a135e5d]{display:flex;align-items:center;gap:.5rem}.link-bar__logo[data-v-5a135e5d]{position:absolute;top:50%;left:50%;--tw-translate-x: -50%;--tw-translate-y: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.3s}@media(min-width:45.875rem){.link-bar[data-v-5a135e5d]{display:grid;-moz-column-gap:1rem;column-gap:1rem;grid-template-areas:"logo lend right" "search search search";grid-template-columns:1fr auto auto;grid-template-rows:4rem auto;row-gap:.5rem}.link-bar__logo[data-v-5a135e5d]{position:static;--tw-translate-x: 0;--tw-translate-y: 0;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));grid-area:logo;justify-self:start}.link-bar__lend[data-v-5a135e5d]{grid-area:lend}.link-bar__search[data-v-5a135e5d]{grid-area:search;margin-bottom:.5rem}.link-bar__right[data-v-5a135e5d]{grid-area:right}}@media(min-width:64rem){.link-bar[data-v-5a135e5d]{-moz-column-gap:1.25rem;column-gap:1.25rem;grid-template-areas:"logo lend search right";grid-template-columns:auto auto 1fr auto;grid-template-rows:4rem}.link-bar__search[data-v-5a135e5d]{margin-bottom:0}}.header-link[data-v-5a135e5d]{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-5a135e5d]:hover{--tw-text-opacity: 1;color:rgba(var(--text-action),var(--tw-text-opacity, 1));text-decoration-line:none}.link-bar__basket-count-loader[data-v-5a135e5d]{width:1.5ch;height:1.375em;height:1lh}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import x from "./LinkBar2.js";
|
|
2
|
-
import { resolveComponent as d, openBlock as o, createElementBlock as i, createElementVNode as l, withModifiers as b, createVNode as r, withCtx as k, createTextVNode as w, Fragment as f, renderList as L, toDisplayString as m, createCommentVNode as s, withDirectives as B, normalizeStyle as
|
|
2
|
+
import { resolveComponent as d, openBlock as o, createElementBlock as i, createElementVNode as l, withModifiers as b, createVNode as r, withCtx as k, createTextVNode as w, Fragment as f, renderList as L, toDisplayString as m, createCommentVNode as s, withDirectives as B, normalizeStyle as u, vShow as O, createBlock as y } from "vue";
|
|
3
3
|
import "./LinkBar.css";
|
|
4
4
|
import S from "../../_virtual/_plugin-vue_export-helper.js";
|
|
5
5
|
const T = { class: "link-bar__right tw-flex tw-items-center tw-justify-end tw-ml-auto md:tw-ml-0 tw-gap-1 md:tw-gap-2 lg:tw-gap-2.5" }, D = ["href", "data-testid", "onClick"], U = ["href"], H = { class: "tw-hidden md:tw-flex tw-items-center" }, A = { class: "tw-bg-secondary tw-rounded-xs tw-py-0.5 tw-px-1 tw-mr-1 tw-leading-none tw-flex tw-items-center tw-justify-center" }, I = {
|
|
@@ -20,7 +20,7 @@ const T = { class: "link-bar__right tw-flex tw-items-center tw-justify-end tw-ml
|
|
|
20
20
|
class: "tw-w-3 tw-h-3 tw-rounded-full tw-overflow-hidden",
|
|
21
21
|
"data-testid": "header-avatar-skeleton"
|
|
22
22
|
};
|
|
23
|
-
function X(
|
|
23
|
+
function X(h, t, a, e, z, F) {
|
|
24
24
|
const v = d("kv-material-icon"), _ = d("kv-header-logo"), g = d("kv-header-dropdown-link"), M = d("search-bar"), c = d("kv-loading-placeholder"), C = d("kv-button"), p = d("kv-user-avatar");
|
|
25
25
|
return o(), i("div", {
|
|
26
26
|
class: "link-bar tw-min-h-[4rem] tw-font-medium tw-relative",
|
|
@@ -65,8 +65,8 @@ function X(u, t, a, e, z, F) {
|
|
|
65
65
|
"search-suggestions": a.searchSuggestions,
|
|
66
66
|
"app-origin": a.appOrigin,
|
|
67
67
|
"is-mobile": a.isMobile,
|
|
68
|
-
onLoadSearchData: t[4] || (t[4] = (n) =>
|
|
69
|
-
onSearchSubmit: t[5] || (t[5] = (n) =>
|
|
68
|
+
onLoadSearchData: t[4] || (t[4] = (n) => h.$emit("load-search-data")),
|
|
69
|
+
onSearchSubmit: t[5] || (t[5] = (n) => h.$emit("search-submit", n))
|
|
70
70
|
}, null, 8, ["search-suggestions", "app-origin", "is-mobile"]),
|
|
71
71
|
l("div", T, [
|
|
72
72
|
(o(!0), i(f, null, L(e.visiblePrimaryLinks, (n) => (o(), i("a", {
|
|
@@ -101,7 +101,7 @@ function X(u, t, a, e, z, F) {
|
|
|
101
101
|
onClick: t[7] || (t[7] = (...n) => e.onLoginClick && e.onLoginClick(...n))
|
|
102
102
|
}, "Log in", 8, U)),
|
|
103
103
|
B(l("a", {
|
|
104
|
-
style:
|
|
104
|
+
style: u(a.isBasketDataLoading ? { display: "var(--basket-display, flex)" } : void 0),
|
|
105
105
|
href: "/basket",
|
|
106
106
|
class: "header-link tw-flex tw-items-center",
|
|
107
107
|
"data-testid": "header-basket",
|
|
@@ -147,7 +147,7 @@ function X(u, t, a, e, z, F) {
|
|
|
147
147
|
ref: "avatarMenu",
|
|
148
148
|
"data-testid": "header-avatar-menu",
|
|
149
149
|
class: "tw-flex tw-items-center tw-gap-1 tw-cursor-pointer tw-py-1",
|
|
150
|
-
style:
|
|
150
|
+
style: u(a.isUserDataLoading ? { display: "var(--user-loading-display, flex)" } : void 0),
|
|
151
151
|
onMouseenter: t[9] || (t[9] = (n) => e.handleOnHover("avatarMenu", e.MyKivaMenu, e.getAvatarMenuPosition(), e.getAvatarTriggerCenterX())),
|
|
152
152
|
onMouseleave: t[10] || (t[10] = (n) => e.handleMouseOut("avatarMenu")),
|
|
153
153
|
onTouchstart: t[11] || (t[11] = b((n) => e.handleTouchStart("avatarMenu", e.MyKivaMenu, e.getAvatarMenuPosition(), e.getAvatarTriggerCenterX()), ["stop"]))
|
|
@@ -169,17 +169,18 @@ function X(u, t, a, e, z, F) {
|
|
|
169
169
|
key: 4,
|
|
170
170
|
class: "tw-w-3 tw-h-3",
|
|
171
171
|
"data-testid": e.avatarMode === "esi" ? "header-avatar-esi" : null,
|
|
172
|
-
style:
|
|
172
|
+
style: u(e.avatarMode === "esi" ? { display: "var(--user-avatar-display, block)" } : void 0),
|
|
173
173
|
"lender-name": a.lenderName,
|
|
174
174
|
"lender-image-url": a.lenderImageUrl,
|
|
175
175
|
"show-css-placeholder": e.avatarMode === "esi",
|
|
176
|
+
"use-icon-fallback": "",
|
|
176
177
|
"is-small": ""
|
|
177
178
|
}, null, 8, ["data-testid", "style", "lender-name", "lender-image-url", "show-css-placeholder"])) : s("", !0)
|
|
178
179
|
], 36)) : s("", !0)
|
|
179
180
|
])
|
|
180
181
|
], 32);
|
|
181
182
|
}
|
|
182
|
-
const W = /* @__PURE__ */ S(x, [["render", X], ["__scopeId", "data-v-
|
|
183
|
+
const W = /* @__PURE__ */ S(x, [["render", X], ["__scopeId", "data-v-5a135e5d"]]);
|
|
183
184
|
export {
|
|
184
185
|
W as default
|
|
185
186
|
};
|