@kiva/kv-components 6.28.0 → 6.29.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/utils/loanCard.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import R from "graphql-tag";
|
|
2
|
-
import
|
|
3
|
-
import { toRefs as
|
|
4
|
-
import { mdiMapMarker as
|
|
5
|
-
import
|
|
6
|
-
const
|
|
2
|
+
import oe from "numeral";
|
|
3
|
+
import { toRefs as re, computed as n } from "vue";
|
|
4
|
+
import { mdiMapMarker as Ee } from "@mdi/js";
|
|
5
|
+
import Ue from "./Alea.js";
|
|
6
|
+
const Ne = "N/A", ne = "ECO-FRIENDLY", le = "SUSTAINABLE AG", se = "SINGLE PARENT", be = "REFUGEES/DISPLACED", P = (c, f) => (c == null ? void 0 : c.find((p) => p.name.replace("#", "").toUpperCase() === f.toUpperCase())) ?? {}, Se = R`
|
|
7
7
|
fragment LoanCallouts on LoanBasic {
|
|
8
8
|
id
|
|
9
9
|
activity {
|
|
@@ -20,7 +20,7 @@ const Ue = "N/A", oe = "ECO-FRIENDLY", ne = "SUSTAINABLE AG", le = "SINGLE PAREN
|
|
|
20
20
|
themes
|
|
21
21
|
}
|
|
22
22
|
}
|
|
23
|
-
`,
|
|
23
|
+
`, De = R`
|
|
24
24
|
fragment LoanGeocode on LoanBasic {
|
|
25
25
|
id
|
|
26
26
|
geocode {
|
|
@@ -32,7 +32,7 @@ const Ue = "N/A", oe = "ECO-FRIENDLY", ne = "SUSTAINABLE AG", le = "SINGLE PAREN
|
|
|
32
32
|
}
|
|
33
33
|
}
|
|
34
34
|
}
|
|
35
|
-
`,
|
|
35
|
+
`, Me = R`
|
|
36
36
|
fragment LoanProgress on LoanBasic {
|
|
37
37
|
id
|
|
38
38
|
loanAmount
|
|
@@ -43,48 +43,49 @@ const Ue = "N/A", oe = "ECO-FRIENDLY", ne = "SUSTAINABLE AG", le = "SINGLE PAREN
|
|
|
43
43
|
}
|
|
44
44
|
}
|
|
45
45
|
`;
|
|
46
|
-
function
|
|
46
|
+
function Te(c, f = !1) {
|
|
47
47
|
const {
|
|
48
|
-
externalLinks:
|
|
48
|
+
externalLinks: p,
|
|
49
49
|
customLoanDetails: L,
|
|
50
50
|
loanId: m,
|
|
51
51
|
loan: t,
|
|
52
|
-
categoryPageName:
|
|
53
|
-
customCallouts: y
|
|
54
|
-
|
|
52
|
+
categoryPageName: v,
|
|
53
|
+
customCallouts: y,
|
|
54
|
+
customHref: F
|
|
55
|
+
} = re(c), ue = n(() => p.value ? "a" : "router-link"), ie = n(() => p.value && F.value ? F.value : L.value ? "" : `/lend/${m.value}`), _ = n(() => !m.value || !t.value), ce = n(() => {
|
|
55
56
|
var e;
|
|
56
57
|
return ((e = t.value) == null ? void 0 : e.name) || "";
|
|
57
58
|
}), g = n(() => {
|
|
58
59
|
var e, a, l;
|
|
59
60
|
return ((l = (a = (e = t.value) == null ? void 0 : e.geocode) == null ? void 0 : a.country) == null ? void 0 : l.name) || "";
|
|
60
|
-
}),
|
|
61
|
+
}), de = n(() => {
|
|
61
62
|
var e, a, l;
|
|
62
63
|
return ((l = (a = (e = t.value) == null ? void 0 : e.geocode) == null ? void 0 : a.country) == null ? void 0 : l.isoCode) || "";
|
|
63
64
|
}), E = n(() => {
|
|
64
65
|
var e, a;
|
|
65
66
|
return ((a = (e = t.value) == null ? void 0 : e.geocode) == null ? void 0 : a.city) || "";
|
|
66
|
-
}),
|
|
67
|
+
}), S = n(() => {
|
|
67
68
|
var e, a;
|
|
68
69
|
return ((a = (e = t.value) == null ? void 0 : e.geocode) == null ? void 0 : a.state) || "";
|
|
69
|
-
}),
|
|
70
|
+
}), D = n(() => {
|
|
70
71
|
var e;
|
|
71
72
|
return ((e = t.value) == null ? void 0 : e.distributionModel) || "";
|
|
72
|
-
}),
|
|
73
|
+
}), pe = n(() => {
|
|
73
74
|
var e, a;
|
|
74
75
|
return ((a = (e = t.value) == null ? void 0 : e.image) == null ? void 0 : a.hash) ?? "";
|
|
75
76
|
}), U = n(() => {
|
|
76
77
|
var e, a, l, u, d;
|
|
77
78
|
return typeof ((e = t.value) == null ? void 0 : e.loanAmount) < "u" && typeof ((l = (a = t.value) == null ? void 0 : a.loanFundraisingInfo) == null ? void 0 : l.fundedAmount) < "u" && typeof ((d = (u = t.value) == null ? void 0 : u.loanFundraisingInfo) == null ? void 0 : d.reservedAmount) < "u";
|
|
78
|
-
}),
|
|
79
|
-
if (
|
|
80
|
-
const e =
|
|
81
|
-
return `${E.value}, ${
|
|
79
|
+
}), ve = n(() => !_.value && U.value), fe = n(() => {
|
|
80
|
+
if (D.value === "direct") {
|
|
81
|
+
const e = f && g.value.toLowerCase() === "united states" ? "" : `, ${g.value}`;
|
|
82
|
+
return `${E.value}, ${S.value}${e}`;
|
|
82
83
|
}
|
|
83
84
|
return g.value === "Puerto Rico" ? `${E.value}, PR` : g.value;
|
|
84
|
-
}),
|
|
85
|
+
}), me = n(() => {
|
|
85
86
|
var e;
|
|
86
87
|
return ((e = t.value) == null ? void 0 : e.use) ?? "";
|
|
87
|
-
}),
|
|
88
|
+
}), ge = n(() => {
|
|
88
89
|
var e;
|
|
89
90
|
return ((e = t.value) == null ? void 0 : e.status) ?? "";
|
|
90
91
|
}), C = n(() => {
|
|
@@ -92,75 +93,75 @@ function Me(c, v = !1) {
|
|
|
92
93
|
return ((e = t.value) == null ? void 0 : e.loanAmount) ?? "0";
|
|
93
94
|
}), N = n(() => {
|
|
94
95
|
var e, a, l, u;
|
|
95
|
-
return
|
|
96
|
-
}),
|
|
96
|
+
return oe(((a = (e = t.value) == null ? void 0 : e.loanFundraisingInfo) == null ? void 0 : a.reservedAmount) ?? "0").add(((u = (l = t.value) == null ? void 0 : l.loanFundraisingInfo) == null ? void 0 : u.fundedAmount) ?? "0");
|
|
97
|
+
}), M = n(() => N.value.clone().divide(C.value).value()), T = n(() => U.value && C.value - N.value.value() > 0), he = n(() => T.value ? oe(C.value).subtract(N.value.value()).format("0.00") : "0"), Ce = n(() => {
|
|
97
98
|
var e;
|
|
98
99
|
return ((e = t.value) == null ? void 0 : e.borrowerCount) ?? 0;
|
|
99
|
-
}),
|
|
100
|
-
var
|
|
101
|
-
const e = [], a = new
|
|
102
|
-
ecoFriendly: !!i.filter((o) => o.toUpperCase() ===
|
|
103
|
-
refugeesIdps: !!A.filter((o) => o.toUpperCase() ===
|
|
104
|
-
singleParents: !!i.filter((o) => o.toUpperCase() ===
|
|
105
|
-
},
|
|
106
|
-
if (
|
|
107
|
-
const o = Math.floor(a() * i.length), s = i[o], r = P(
|
|
100
|
+
}), Ae = n(() => {
|
|
101
|
+
var Y, w, B, $, K, x, H, q, j, z, J, Q, V, W, X, Z, ee, te, ae;
|
|
102
|
+
const e = [], a = new Ue(m.value, M.value), l = ((w = (Y = t.value) == null ? void 0 : Y.activity) == null ? void 0 : w.name) ?? "", u = (($ = (B = t.value) == null ? void 0 : B.activity) == null ? void 0 : $.id) ?? null, d = ((x = (K = t.value) == null ? void 0 : K.sector) == null ? void 0 : x.name) ?? "", G = ((q = (H = t.value) == null ? void 0 : H.sector) == null ? void 0 : q.id) ?? null, i = ((z = (j = t.value) == null ? void 0 : j.tags) == null ? void 0 : z.filter((o) => o.charAt(0) === "#").map((o) => o.substring(1))) ?? [], A = ((J = t.value) == null ? void 0 : J.themes) ?? [], b = {
|
|
103
|
+
ecoFriendly: !!i.filter((o) => o.toUpperCase() === ne || o.toUpperCase() === le).length,
|
|
104
|
+
refugeesIdps: !!A.filter((o) => o.toUpperCase() === be).length,
|
|
105
|
+
singleParents: !!i.filter((o) => o.toUpperCase() === se).length
|
|
106
|
+
}, O = (V = (Q = t.value) == null ? void 0 : Q.partnerName) == null ? void 0 : V.toUpperCase().includes(Ne), k = ((W = t.value) == null ? void 0 : W.tagsData) ?? [], Le = ((X = t.value) == null ? void 0 : X.themesData) ?? [];
|
|
107
|
+
if (O && i.length) {
|
|
108
|
+
const o = Math.floor(a() * i.length), s = i[o], r = P(k, s), h = (r == null ? void 0 : r.id) ?? null;
|
|
108
109
|
e.push({ label: s, type: "tag", id: h });
|
|
109
110
|
}
|
|
110
|
-
if (
|
|
111
|
-
const o = Math.floor(a() * i.length), s = i[o], r = P(
|
|
111
|
+
if (v.value || (b.ecoFriendly && !e.find((o) => o.label.toUpperCase() === ne || o.label.toUpperCase() === le) ? e.push({ label: "Eco-friendly", type: "tag", id: 9 }) : b.refugeesIdps ? e.push({ label: "Refugees and IDPs", type: "attribute", id: 28 }) : b.singleParents && !e.find((o) => o.label.toUpperCase() === se) && e.push({ label: "Single Parent", type: "tag", id: 17 })), l && u && ((Z = v.value) == null ? void 0 : Z.toUpperCase()) !== l.toUpperCase() && e.push({ id: u, label: l, type: "activity" }), d && G && l.toUpperCase() !== d.toUpperCase() && d.toUpperCase() !== ((ee = v.value) == null ? void 0 : ee.toUpperCase()) && e.length < 2 && e.push({ id: G, label: d, type: "sector" }), i.length && e.length < 2) {
|
|
112
|
+
const o = Math.floor(a() * i.length), s = i[o], r = P(k, s), h = (r == null ? void 0 : r.id) ?? null;
|
|
112
113
|
e.filter((I) => I.label.toUpperCase() === s.toUpperCase()).length || e.push({ label: s, type: "tag", id: h });
|
|
113
114
|
}
|
|
114
115
|
if (A.length && e.length < 2) {
|
|
115
|
-
const o = Math.floor(a() * A.length), s = A[o], r = P(
|
|
116
|
-
!e.filter((I) => I.label.toUpperCase() === s.toUpperCase()).length && s.toUpperCase() !== ((
|
|
116
|
+
const o = Math.floor(a() * A.length), s = A[o], r = P(Le, s), h = (r == null ? void 0 : r.id) ?? null;
|
|
117
|
+
!e.filter((I) => I.label.toUpperCase() === s.toUpperCase()).length && s.toUpperCase() !== ((te = v.value) == null ? void 0 : te.toUpperCase()) && e.push({ label: s, type: "attribute", id: h });
|
|
117
118
|
}
|
|
118
|
-
if (
|
|
119
|
-
const
|
|
120
|
-
return e.push(...
|
|
119
|
+
if (O && e.length > 1) return [e.shift()];
|
|
120
|
+
const ye = ((ae = y.value) == null ? void 0 : ae.map((o) => ({ label: o }))) ?? [];
|
|
121
|
+
return e.push(...ye), e;
|
|
121
122
|
});
|
|
122
123
|
return {
|
|
123
|
-
tag:
|
|
124
|
-
readMorePath:
|
|
125
|
-
isLoading:
|
|
126
|
-
borrowerName:
|
|
124
|
+
tag: ue,
|
|
125
|
+
readMorePath: ie,
|
|
126
|
+
isLoading: _,
|
|
127
|
+
borrowerName: ce,
|
|
127
128
|
countryName: g,
|
|
128
|
-
countryCode:
|
|
129
|
+
countryCode: de,
|
|
129
130
|
city: E,
|
|
130
|
-
state:
|
|
131
|
-
distributionModel:
|
|
132
|
-
imageHash:
|
|
131
|
+
state: S,
|
|
132
|
+
distributionModel: D,
|
|
133
|
+
imageHash: pe,
|
|
133
134
|
hasProgressData: U,
|
|
134
|
-
allDataLoaded:
|
|
135
|
-
fundraisingPercent:
|
|
136
|
-
unreservedAmount:
|
|
137
|
-
sharesAvailable:
|
|
138
|
-
formattedLocation:
|
|
139
|
-
loanUse:
|
|
140
|
-
loanStatus:
|
|
135
|
+
allDataLoaded: ve,
|
|
136
|
+
fundraisingPercent: M,
|
|
137
|
+
unreservedAmount: he,
|
|
138
|
+
sharesAvailable: T,
|
|
139
|
+
formattedLocation: fe,
|
|
140
|
+
loanUse: me,
|
|
141
|
+
loanStatus: ge,
|
|
141
142
|
loanAmount: C,
|
|
142
|
-
loanBorrowerCount:
|
|
143
|
-
mdiMapMarker:
|
|
144
|
-
loanCallouts:
|
|
143
|
+
loanBorrowerCount: Ce,
|
|
144
|
+
mdiMapMarker: Ee,
|
|
145
|
+
loanCallouts: Ae
|
|
145
146
|
};
|
|
146
147
|
}
|
|
147
|
-
function
|
|
148
|
+
function Ge(c, f) {
|
|
148
149
|
const {
|
|
149
|
-
loanId:
|
|
150
|
+
loanId: p,
|
|
150
151
|
customLoanDetails: L,
|
|
151
152
|
kvTrackFunction: m
|
|
152
|
-
} =
|
|
153
|
-
function t(
|
|
154
|
-
m.value("Lending", "click-Read more",
|
|
153
|
+
} = re(c);
|
|
154
|
+
function t(v, y) {
|
|
155
|
+
m.value("Lending", "click-Read more", v, p.value), L.value && (y.preventDefault(), f("show-loan-details"));
|
|
155
156
|
}
|
|
156
157
|
return {
|
|
157
158
|
clickReadMore: t
|
|
158
159
|
};
|
|
159
160
|
}
|
|
160
161
|
export {
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
162
|
+
Se as LOAN_CALLOUTS_FRAGMENT,
|
|
163
|
+
De as LOAN_GEOCODE_FRAGMENT,
|
|
164
|
+
Me as LOAN_PROGRESS_FRAGMENT,
|
|
165
|
+
Te as loanCardComputedProperties,
|
|
166
|
+
Ge as loanCardMethods
|
|
166
167
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.loan-card-use[data-v-
|
|
1
|
+
.loan-card-use[data-v-bdb91452]:hover,.loan-card-use[data-v-bdb91452]:focus{--tw-text-opacity: 1;color:rgba(var(--text-primary),var(--tw-text-opacity, 1))}.loan-card-active-hover:hover .loan-card-use[data-v-bdb91452]{text-decoration-line:underline}.loan-card-progress[data-v-bdb91452]:hover,.loan-card-progress[data-v-bdb91452]:focus{text-decoration-line:none}
|
|
@@ -12,7 +12,7 @@ import ee from "./KvMaterialIcon.js";
|
|
|
12
12
|
import te from "./KvLoadingPlaceholder.js";
|
|
13
13
|
import ae from "./KvLoanTeamPick.js";
|
|
14
14
|
import oe, { KV_LOAN_ACTIVITIES_FRAGMENT as ne } from "./KvLoanActivities.js";
|
|
15
|
-
import { resolveComponent as
|
|
15
|
+
import { resolveComponent as i, openBlock as o, createElementBlock as m, normalizeClass as s, normalizeStyle as le, createElementVNode as c, createBlock as r, resolveDynamicComponent as k, withCtx as g, createVNode as w, createTextVNode as re, toDisplayString as M, createCommentVNode as f, Fragment as ie, renderList as se } from "vue";
|
|
16
16
|
import "./KvClassicLoanCard.css";
|
|
17
17
|
import de from "../_virtual/_plugin-vue_export-helper.js";
|
|
18
18
|
const Ge = K`
|
|
@@ -184,6 +184,10 @@ const Ge = K`
|
|
|
184
184
|
showContributors: {
|
|
185
185
|
type: Boolean,
|
|
186
186
|
default: !1
|
|
187
|
+
},
|
|
188
|
+
customHref: {
|
|
189
|
+
type: String,
|
|
190
|
+
default: ""
|
|
187
191
|
}
|
|
188
192
|
},
|
|
189
193
|
setup(l, { emit: a }) {
|
|
@@ -283,7 +287,7 @@ const Ge = K`
|
|
|
283
287
|
class: "tw-pt-1.5"
|
|
284
288
|
};
|
|
285
289
|
function _e(l, a, e, t, T, d) {
|
|
286
|
-
const u =
|
|
290
|
+
const u = i("kv-loading-placeholder"), v = i("kv-borrower-image"), h = i("kv-material-icon"), b = i("kv-loan-team-pick"), y = i("kv-loan-bookmark"), _ = i("kv-loan-tag"), L = i("kv-loan-use"), C = i("kv-loan-callouts"), A = i("kv-loan-progress-group"), x = i("kv-lend-cta"), B = i("KvLoanActivities");
|
|
287
291
|
return o(), m("div", {
|
|
288
292
|
class: s(["tw-flex tw-flex-col tw-bg-white tw-rounded tw-w-full tw-pb-1", { "tw-p-1": !e.largeCard, "tw-pointer-events-none": t.isLoading }]),
|
|
289
293
|
"data-testid": "loan-card",
|
|
@@ -291,12 +295,12 @@ function _e(l, a, e, t, T, d) {
|
|
|
291
295
|
}, [
|
|
292
296
|
c("div", ue, [
|
|
293
297
|
c("div", ce, [
|
|
294
|
-
t.isLoading ? (o(),
|
|
298
|
+
t.isLoading ? (o(), r(u, {
|
|
295
299
|
key: 0,
|
|
296
300
|
class: s(["tw-mb-1 tw-w-full", { "tw-rounded-t tw-rounded-b-none": e.largeCard, "tw-rounded": !e.largeCard }]),
|
|
297
301
|
style: { height: "15rem" }
|
|
298
302
|
}, null, 8, ["class"])) : (o(), m("div", we, [
|
|
299
|
-
(o(),
|
|
303
|
+
(o(), r(k(t.tag), {
|
|
300
304
|
to: t.readMorePath,
|
|
301
305
|
href: t.readMorePath,
|
|
302
306
|
class: "tw-flex",
|
|
@@ -319,19 +323,19 @@ function _e(l, a, e, t, T, d) {
|
|
|
319
323
|
class: "tw-h-2 tw-w-2",
|
|
320
324
|
icon: t.mdiMapMarker
|
|
321
325
|
}, null, 8, ["icon"]),
|
|
322
|
-
|
|
326
|
+
re(" " + M(t.formattedLocation), 1)
|
|
323
327
|
])
|
|
324
328
|
])) : f("", !0)
|
|
325
329
|
]),
|
|
326
330
|
_: 1
|
|
327
331
|
}, 8, ["to", "href"])),
|
|
328
|
-
e.isTeamPick ? (o(),
|
|
332
|
+
e.isTeamPick ? (o(), r(b, {
|
|
329
333
|
key: 0,
|
|
330
334
|
class: s(["tw-absolute", { "tw-right-6": !e.isVisitor, "tw-right-0": e.isVisitor }]),
|
|
331
335
|
style: { top: "-6px" },
|
|
332
336
|
"data-testid": "loan-card-teampick"
|
|
333
337
|
}, null, 8, ["class"])) : f("", !0),
|
|
334
|
-
e.isVisitor ? f("", !0) : (o(),
|
|
338
|
+
e.isVisitor ? f("", !0) : (o(), r(y, {
|
|
335
339
|
key: 1,
|
|
336
340
|
"loan-id": e.loanId,
|
|
337
341
|
"is-bookmarked": e.isBookmarked,
|
|
@@ -341,7 +345,7 @@ function _e(l, a, e, t, T, d) {
|
|
|
341
345
|
onToggleBookmark: a[1] || (a[1] = (n) => l.$emit("toggle-bookmark"))
|
|
342
346
|
}, null, 8, ["loan-id", "is-bookmarked"]))
|
|
343
347
|
])),
|
|
344
|
-
(o(),
|
|
348
|
+
(o(), r(k(t.tag), {
|
|
345
349
|
to: t.readMorePath,
|
|
346
350
|
href: t.readMorePath,
|
|
347
351
|
class: s(["tw-flex tw-no-underline hover:tw-no-underline focus:tw-no-underline", { "tw-px-1": e.largeCard }]),
|
|
@@ -349,14 +353,14 @@ function _e(l, a, e, t, T, d) {
|
|
|
349
353
|
onClick: a[2] || (a[2] = (n) => t.clickReadMore("Tag", n))
|
|
350
354
|
}, {
|
|
351
355
|
default: g(() => [
|
|
352
|
-
e.showTags && !t.isLoading ? (o(),
|
|
356
|
+
e.showTags && !t.isLoading ? (o(), r(_, {
|
|
353
357
|
key: 0,
|
|
354
358
|
loan: e.loan
|
|
355
359
|
}, null, 8, ["loan"])) : f("", !0)
|
|
356
360
|
]),
|
|
357
361
|
_: 1
|
|
358
362
|
}, 8, ["to", "href", "class"])),
|
|
359
|
-
(o(),
|
|
363
|
+
(o(), r(k(t.tag), {
|
|
360
364
|
to: t.readMorePath,
|
|
361
365
|
href: t.readMorePath,
|
|
362
366
|
class: "loan-card-use tw-no-underline tw-text-primary",
|
|
@@ -370,7 +374,7 @@ function _e(l, a, e, t, T, d) {
|
|
|
370
374
|
class: s(["tw-w-full", { "tw-px-1": e.largeCard }]),
|
|
371
375
|
style: { height: "5.5rem" }
|
|
372
376
|
}, [
|
|
373
|
-
(o(!0), m(
|
|
377
|
+
(o(!0), m(ie, null, se([...Array(4)], (n, N) => (o(), m("div", {
|
|
374
378
|
key: N,
|
|
375
379
|
class: "tw-h-2 tw-mb-1"
|
|
376
380
|
}, [
|
|
@@ -392,11 +396,11 @@ function _e(l, a, e, t, T, d) {
|
|
|
392
396
|
_: 1
|
|
393
397
|
}, 8, ["to", "href"]))
|
|
394
398
|
]),
|
|
395
|
-
t.isLoading || typeof t.loanCallouts > "u" ? (o(),
|
|
399
|
+
t.isLoading || typeof t.loanCallouts > "u" ? (o(), r(u, {
|
|
396
400
|
key: 0,
|
|
397
401
|
class: s(["tw-mt-1.5 tw-mb-1", { "tw-mx-1": e.largeCard }]),
|
|
398
402
|
style: { width: "60%", height: "1.75rem", "border-radius": "500rem" }
|
|
399
|
-
}, null, 8, ["class"])) : (o(),
|
|
403
|
+
}, null, 8, ["class"])) : (o(), r(C, {
|
|
400
404
|
key: 1,
|
|
401
405
|
callouts: t.loanCallouts,
|
|
402
406
|
class: s(["tw-mt-1.5", { "tw-px-1": e.largeCard }]),
|
|
@@ -417,7 +421,7 @@ function _e(l, a, e, t, T, d) {
|
|
|
417
421
|
})
|
|
418
422
|
])),
|
|
419
423
|
c("div", null, [
|
|
420
|
-
t.sharesAvailable ? (o(),
|
|
424
|
+
t.sharesAvailable ? (o(), r(k(t.tag), {
|
|
421
425
|
key: 0,
|
|
422
426
|
to: t.readMorePath,
|
|
423
427
|
href: t.readMorePath,
|
|
@@ -436,7 +440,7 @@ function _e(l, a, e, t, T, d) {
|
|
|
436
440
|
_: 1
|
|
437
441
|
}, 8, ["to", "href"])) : f("", !0)
|
|
438
442
|
]),
|
|
439
|
-
t.allDataLoaded ? (o(),
|
|
443
|
+
t.allDataLoaded ? (o(), r(x, {
|
|
440
444
|
key: 2,
|
|
441
445
|
loan: e.loan,
|
|
442
446
|
"unreserved-amount": t.unreservedAmount,
|
|
@@ -461,7 +465,7 @@ function _e(l, a, e, t, T, d) {
|
|
|
461
465
|
onAddToBasket: a[6] || (a[6] = (n) => l.$emit("add-to-basket", n)),
|
|
462
466
|
onShowLoanDetails: a[7] || (a[7] = (n) => t.clickReadMore("ViewLoan", n)),
|
|
463
467
|
onRemoveFromBasket: a[8] || (a[8] = (n) => l.$emit("remove-from-basket", n))
|
|
464
|
-
}, null, 8, ["loan", "unreserved-amount", "basket-items", "is-loading", "is-adding", "enable-five-dollars-notes", "five-dollars-selected", "kv-track-function", "show-view-loan", "custom-loan-details", "external-links", "route", "user-balance", "get-cookie", "set-cookie", "is-visitor", "primary-button-text", "secondary-button-text", "secondary-button-handler", "class"])) : (o(),
|
|
468
|
+
}, null, 8, ["loan", "unreserved-amount", "basket-items", "is-loading", "is-adding", "enable-five-dollars-notes", "five-dollars-selected", "kv-track-function", "show-view-loan", "custom-loan-details", "external-links", "route", "user-balance", "get-cookie", "set-cookie", "is-visitor", "primary-button-text", "secondary-button-text", "secondary-button-handler", "class"])) : (o(), r(u, {
|
|
465
469
|
key: 1,
|
|
466
470
|
class: "tw-rounded tw-self-start",
|
|
467
471
|
style: { width: "9rem", height: "3rem" }
|
|
@@ -494,7 +498,7 @@ function _e(l, a, e, t, T, d) {
|
|
|
494
498
|
])) : f("", !0)
|
|
495
499
|
], 6);
|
|
496
500
|
}
|
|
497
|
-
const Ue = /* @__PURE__ */ de(me, [["render", _e], ["__scopeId", "data-v-
|
|
501
|
+
const Ue = /* @__PURE__ */ de(me, [["render", _e], ["__scopeId", "data-v-bdb91452"]]);
|
|
498
502
|
export {
|
|
499
503
|
Ge as KV_CLASSIC_LOAN_CARD_FRAGMENT,
|
|
500
504
|
Ie as KV_CLASSIC_LOAN_CARD_USER_FRAGMET,
|
package/dist/vue/KvSideSheet.js
CHANGED
|
@@ -157,10 +157,10 @@ const le = {
|
|
|
157
157
|
width: W.value
|
|
158
158
|
}));
|
|
159
159
|
g(t, (e) => {
|
|
160
|
-
e ? (document.addEventListener("keyup", R), a.value = {}, setTimeout(() => {
|
|
160
|
+
typeof window < "u" && (e ? (document.addEventListener("keyup", R), a.value = {}, setTimeout(() => {
|
|
161
161
|
d.value = !0, T(), S();
|
|
162
|
-
}, 10)) : (d.value = !1, T(), document.removeEventListener("keyup", R), a.value = {});
|
|
163
|
-
}), g(W, (e) => {
|
|
162
|
+
}, 10)) : (d.value = !1, T(), document.removeEventListener("keyup", R), a.value = {}));
|
|
163
|
+
}, { immediate: !0 }), g(W, (e) => {
|
|
164
164
|
d.value && t.value && a.value && Object.keys(a.value).length > 0 && (a.value = {
|
|
165
165
|
...a.value,
|
|
166
166
|
width: e,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.loan-card-use[data-v-
|
|
1
|
+
.loan-card-use[data-v-6ac3e4be]:hover,.loan-card-use[data-v-6ac3e4be]:focus{--tw-text-opacity: 1;color:rgba(var(--text-primary),var(--tw-text-opacity, 1))}.loan-card-active-hover:hover .loan-card-use[data-v-6ac3e4be]{text-decoration-line:underline}.loan-card-progress[data-v-6ac3e4be],.loan-card-progress[data-v-6ac3e4be]:hover,.loan-card-progress[data-v-6ac3e4be]:focus{text-decoration-line:none}.loan-callouts[data-v-6ac3e4be] div{height:auto;flex-wrap:wrap}
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import B from "graphql-tag";
|
|
2
|
-
import { LOAN_CALLOUTS_FRAGMENT as
|
|
2
|
+
import { LOAN_CALLOUTS_FRAGMENT as E, LOAN_GEOCODE_FRAGMENT as F, LOAN_PROGRESS_FRAGMENT as V, loanCardComputedProperties as O, loanCardMethods as G } from "../utils/loanCard.js";
|
|
3
3
|
import U, { KV_LOAN_USE_FRAGMENT as W } from "./KvLoanUse.js";
|
|
4
4
|
import z from "./KvBorrowerImage.js";
|
|
5
5
|
import I from "./KvLoanProgressGroup.js";
|
|
6
|
-
import
|
|
7
|
-
import
|
|
6
|
+
import H from "./KvLoanCallouts.js";
|
|
7
|
+
import j, { KV_LEND_CTA_FRAGMENT as q, KV_LEND_CTA_USER_FRAGMENT as J } from "./KvLendCta.js";
|
|
8
8
|
import Q, { KV_LOAN_BOOKMARK_FRAGMENT as X } from "./KvLoanBookmark.js";
|
|
9
9
|
import Y, { KV_LOAN_TAG_FRAGMENT as Z } from "./KvLoanTag.js";
|
|
10
10
|
import $ from "./KvMaterialIcon.js";
|
|
11
11
|
import ee from "./KvLoadingPlaceholder.js";
|
|
12
|
-
import { resolveComponent as r, openBlock as o, createElementBlock as s, normalizeClass as N, createElementVNode as m, createBlock as l, resolveDynamicComponent as
|
|
12
|
+
import { resolveComponent as r, openBlock as o, createElementBlock as s, normalizeClass as N, createElementVNode as m, createBlock as l, resolveDynamicComponent as f, withCtx as g, createVNode as d, createTextVNode as te, toDisplayString as M, createCommentVNode as u, Fragment as oe, renderList as ae } from "vue";
|
|
13
13
|
import "./KvWideLoanCard.css";
|
|
14
14
|
import ne from "../_virtual/_plugin-vue_export-helper.js";
|
|
15
|
-
const
|
|
15
|
+
const Re = B`
|
|
16
16
|
fragment KvWideLoanCard on LoanBasic {
|
|
17
17
|
id
|
|
18
18
|
image {
|
|
@@ -27,10 +27,10 @@ const pe = B`
|
|
|
27
27
|
...LoanGeocode
|
|
28
28
|
...LoanProgress
|
|
29
29
|
}
|
|
30
|
-
${
|
|
30
|
+
${q}
|
|
31
31
|
${Z}
|
|
32
32
|
${W}
|
|
33
|
-
${
|
|
33
|
+
${E}
|
|
34
34
|
${F}
|
|
35
35
|
${V}
|
|
36
36
|
`, De = B`
|
|
@@ -49,9 +49,9 @@ const pe = B`
|
|
|
49
49
|
KvLoanUse: U,
|
|
50
50
|
KvLoanProgressGroup: I,
|
|
51
51
|
KvMaterialIcon: $,
|
|
52
|
-
KvLendCta:
|
|
52
|
+
KvLendCta: j,
|
|
53
53
|
KvLoanTag: Y,
|
|
54
|
-
KvLoanCallouts:
|
|
54
|
+
KvLoanCallouts: H,
|
|
55
55
|
KvLoanBookmark: Q
|
|
56
56
|
},
|
|
57
57
|
props: {
|
|
@@ -134,6 +134,10 @@ const pe = B`
|
|
|
134
134
|
customCallouts: {
|
|
135
135
|
type: Array,
|
|
136
136
|
default: () => []
|
|
137
|
+
},
|
|
138
|
+
customHref: {
|
|
139
|
+
type: String,
|
|
140
|
+
default: ""
|
|
137
141
|
}
|
|
138
142
|
},
|
|
139
143
|
setup(c, { emit: a }) {
|
|
@@ -154,13 +158,13 @@ const pe = B`
|
|
|
154
158
|
loanStatus: n,
|
|
155
159
|
loanUse: x,
|
|
156
160
|
mdiMapMarker: K,
|
|
157
|
-
readMorePath:
|
|
158
|
-
state:
|
|
159
|
-
tag:
|
|
161
|
+
readMorePath: p,
|
|
162
|
+
state: P,
|
|
163
|
+
tag: R,
|
|
160
164
|
unreservedAmount: D,
|
|
161
165
|
sharesAvailable: T
|
|
162
166
|
} = O(c), {
|
|
163
|
-
clickReadMore:
|
|
167
|
+
clickReadMore: S
|
|
164
168
|
} = G(c, a);
|
|
165
169
|
return {
|
|
166
170
|
allDataLoaded: t,
|
|
@@ -179,12 +183,12 @@ const pe = B`
|
|
|
179
183
|
loanStatus: n,
|
|
180
184
|
loanUse: x,
|
|
181
185
|
mdiMapMarker: K,
|
|
182
|
-
readMorePath:
|
|
183
|
-
state:
|
|
184
|
-
tag:
|
|
186
|
+
readMorePath: p,
|
|
187
|
+
state: P,
|
|
188
|
+
tag: R,
|
|
185
189
|
unreservedAmount: D,
|
|
186
190
|
sharesAvailable: T,
|
|
187
|
-
clickReadMore:
|
|
191
|
+
clickReadMore: S
|
|
188
192
|
};
|
|
189
193
|
},
|
|
190
194
|
computed: {
|
|
@@ -213,11 +217,11 @@ const pe = B`
|
|
|
213
217
|
}, se = { key: 0 }, de = {
|
|
214
218
|
class: "tw-absolute tw-bottom-1 tw-left-1 tw-text-primary tw-bg-white tw-rounded tw-p-1 tw-mb-0 tw-mr-2 tw-text-h4 tw-inline-flex tw-items-center",
|
|
215
219
|
style: { padding: "2px 6px", "text-transform": "capitalize" }
|
|
216
|
-
}, me = { class: "tw-flex tw-flex-col tw-flex-1 tw-px-1" }, ce = { class: "tw-hidden md:tw-inline-block" }, we = { class: "tw-pt-1" },
|
|
220
|
+
}, me = { class: "tw-flex tw-flex-col tw-flex-1 tw-px-1" }, ce = { class: "tw-hidden md:tw-inline-block" }, we = { class: "tw-pt-1" }, ue = {
|
|
217
221
|
key: 0,
|
|
218
222
|
class: "tw-w-full",
|
|
219
223
|
style: { height: "5.5rem" }
|
|
220
|
-
},
|
|
224
|
+
}, fe = { key: 1 }, ge = { class: "tw-flex tw-flex-row tw-justify-between tw-gap-1 md:tw-gap-3" }, ke = {
|
|
221
225
|
key: 0,
|
|
222
226
|
class: "tw-w-full tw-pt-1 tw-pr-1"
|
|
223
227
|
};
|
|
@@ -234,7 +238,7 @@ function he(c, a, t, e, C, w) {
|
|
|
234
238
|
class: "tw-mb-1 tw-w-full tw-rounded",
|
|
235
239
|
style: { height: "15rem" }
|
|
236
240
|
})) : (o(), s("div", ie, [
|
|
237
|
-
(o(), l(
|
|
241
|
+
(o(), l(f(e.tag), {
|
|
238
242
|
to: e.readMorePath,
|
|
239
243
|
href: e.readMorePath,
|
|
240
244
|
class: "tw-flex",
|
|
@@ -259,11 +263,11 @@ function he(c, a, t, e, C, w) {
|
|
|
259
263
|
}, null, 8, ["icon"]),
|
|
260
264
|
te(" " + M(e.formattedLocation), 1)
|
|
261
265
|
])
|
|
262
|
-
])) :
|
|
266
|
+
])) : u("", !0)
|
|
263
267
|
]),
|
|
264
268
|
_: 1
|
|
265
269
|
}, 8, ["to", "href"])),
|
|
266
|
-
t.isVisitor ?
|
|
270
|
+
t.isVisitor ? u("", !0) : (o(), l(_, {
|
|
267
271
|
key: 0,
|
|
268
272
|
"loan-id": t.loanId,
|
|
269
273
|
"is-bookmarked": t.isBookmarked,
|
|
@@ -276,7 +280,7 @@ function he(c, a, t, e, C, w) {
|
|
|
276
280
|
]),
|
|
277
281
|
m("div", me, [
|
|
278
282
|
m("h3", ce, M(e.borrowerName), 1),
|
|
279
|
-
(o(), l(
|
|
283
|
+
(o(), l(f(e.tag), {
|
|
280
284
|
to: e.readMorePath,
|
|
281
285
|
href: e.readMorePath,
|
|
282
286
|
class: "tw-flex tw-no-underline hover:tw-no-underline focus:tw-no-underline",
|
|
@@ -287,11 +291,11 @@ function he(c, a, t, e, C, w) {
|
|
|
287
291
|
t.showTags && !e.isLoading ? (o(), l(v, {
|
|
288
292
|
key: 0,
|
|
289
293
|
loan: t.loan
|
|
290
|
-
}, null, 8, ["loan"])) :
|
|
294
|
+
}, null, 8, ["loan"])) : u("", !0)
|
|
291
295
|
]),
|
|
292
296
|
_: 1
|
|
293
297
|
}, 8, ["to", "href"])),
|
|
294
|
-
(o(), l(
|
|
298
|
+
(o(), l(f(e.tag), {
|
|
295
299
|
to: e.readMorePath,
|
|
296
300
|
href: e.readMorePath,
|
|
297
301
|
class: "loan-card-use tw-no-underline tw-text-primary",
|
|
@@ -300,14 +304,14 @@ function he(c, a, t, e, C, w) {
|
|
|
300
304
|
}, {
|
|
301
305
|
default: g(() => [
|
|
302
306
|
m("div", we, [
|
|
303
|
-
e.isLoading ? (o(), s("div",
|
|
307
|
+
e.isLoading ? (o(), s("div", ue, [
|
|
304
308
|
(o(!0), s(oe, null, ae([...Array(4)], (n, x) => (o(), s("div", {
|
|
305
309
|
key: x,
|
|
306
310
|
class: "tw-h-2 tw-mb-1"
|
|
307
311
|
}, [
|
|
308
312
|
d(i)
|
|
309
313
|
]))), 128))
|
|
310
|
-
])) : (o(), s("div",
|
|
314
|
+
])) : (o(), s("div", fe, [
|
|
311
315
|
d(b, {
|
|
312
316
|
use: e.loanUse,
|
|
313
317
|
"loan-amount": e.loanAmount,
|
|
@@ -331,7 +335,7 @@ function he(c, a, t, e, C, w) {
|
|
|
331
335
|
class: "loan-callouts tw-my-1.5"
|
|
332
336
|
}, null, 8, ["callouts"])),
|
|
333
337
|
m("div", ge, [
|
|
334
|
-
e.hasProgressData ?
|
|
338
|
+
e.hasProgressData ? u("", !0) : (o(), s("div", ke, [
|
|
335
339
|
d(i, {
|
|
336
340
|
class: "tw-mb-0.5",
|
|
337
341
|
style: { width: "70%", height: "1.3rem" }
|
|
@@ -341,7 +345,7 @@ function he(c, a, t, e, C, w) {
|
|
|
341
345
|
style: { width: "70%", height: "0.5rem" }
|
|
342
346
|
})
|
|
343
347
|
])),
|
|
344
|
-
e.sharesAvailable ? (o(), l(
|
|
348
|
+
e.sharesAvailable ? (o(), l(f(e.tag), {
|
|
345
349
|
key: 1,
|
|
346
350
|
to: e.readMorePath,
|
|
347
351
|
href: e.readMorePath,
|
|
@@ -358,7 +362,7 @@ function he(c, a, t, e, C, w) {
|
|
|
358
362
|
}, null, 8, ["money-left", "progress-percent"])
|
|
359
363
|
]),
|
|
360
364
|
_: 1
|
|
361
|
-
}, 8, ["to", "href"])) :
|
|
365
|
+
}, 8, ["to", "href"])) : u("", !0),
|
|
362
366
|
e.allDataLoaded ? (o(), l(A, {
|
|
363
367
|
key: 3,
|
|
364
368
|
loan: t.loan,
|
|
@@ -389,9 +393,9 @@ function he(c, a, t, e, C, w) {
|
|
|
389
393
|
])
|
|
390
394
|
], 2);
|
|
391
395
|
}
|
|
392
|
-
const Te = /* @__PURE__ */ ne(le, [["render", he], ["__scopeId", "data-v-
|
|
396
|
+
const Te = /* @__PURE__ */ ne(le, [["render", he], ["__scopeId", "data-v-6ac3e4be"]]);
|
|
393
397
|
export {
|
|
394
|
-
|
|
398
|
+
Re as KV_WIDE_LOAN_CARD_FRAGMENT,
|
|
395
399
|
De as KV_WIDE_LOAN_CARD_USER_FRAGMENT,
|
|
396
400
|
Te as default
|
|
397
401
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kiva/kv-components",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.29.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -111,5 +111,5 @@
|
|
|
111
111
|
"embla-carousel-fade",
|
|
112
112
|
"popper.js"
|
|
113
113
|
],
|
|
114
|
-
"gitHead": "
|
|
114
|
+
"gitHead": "7c7ce1e484373f0db5b0a587d9dd971958f9124a"
|
|
115
115
|
}
|