@kiva/kv-components 8.25.0 → 8.26.1
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/index.js +178 -175
- package/dist/utils/loanCard.js +106 -90
- package/dist/vue/KvClassicLoanCard.css +1 -1
- package/dist/vue/KvClassicLoanCard.js +94 -79
- package/dist/vue/KvClassicLoanCard2.js +52 -45
- package/dist/vue/KvDatePicker.vue.d.ts +3 -3
- package/dist/vue/KvIntroductionLoanCard.css +1 -1
- package/dist/vue/KvIntroductionLoanCard.js +86 -71
- package/dist/vue/KvIntroductionLoanCard2.js +48 -41
- package/dist/vue/KvLoadingText.css +1 -0
- package/dist/vue/KvLoadingText.js +37 -0
- package/dist/vue/KvLoanInfoCard.css +1 -1
- package/dist/vue/KvLoanInfoCard.js +137 -115
- package/dist/vue/KvWideLoanCard.css +1 -1
- package/dist/vue/KvWideLoanCard.js +74 -59
- package/dist/vue/KvWideLoanCard2.js +53 -46
- package/dist/vue/index.d.ts +1 -0
- package/package.json +2 -2
- package/dist/utils/loanCard.d.ts +0 -35
- package/dist/vue/KvClassicLoanCard.vue.d.ts +0 -2252
- package/dist/vue/KvIntroductionLoanCard.vue.d.ts +0 -665
- package/dist/vue/KvWideLoanCard.vue.d.ts +0 -1275
package/dist/utils/loanCard.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import { toRefs as
|
|
4
|
-
import { mdiMapMarker as
|
|
5
|
-
import
|
|
6
|
-
const
|
|
1
|
+
import P from "graphql-tag";
|
|
2
|
+
import ne from "numeral";
|
|
3
|
+
import { toRefs as ue, computed as a, ref as ae, onMounted as Ue, nextTick as Ne, onBeforeUnmount as be } from "vue";
|
|
4
|
+
import { mdiMapMarker as Ie } from "@mdi/js";
|
|
5
|
+
import Re from "./Alea.js";
|
|
6
|
+
const Pe = "N/A", le = "ECO-FRIENDLY", se = "SUSTAINABLE AG", re = "SINGLE PARENT", Te = "REFUGEES/DISPLACED", R = (i, d) => (i == null ? void 0 : i.find((s) => s.name.replace("#", "").toUpperCase() === d.toUpperCase())) ?? {}, De = P`
|
|
7
7
|
fragment LoanCallouts on LoanBasic {
|
|
8
8
|
id
|
|
9
9
|
activity {
|
|
@@ -20,7 +20,7 @@ const Ne = "N/A", ne = "ECO-FRIENDLY", le = "SUSTAINABLE AG", se = "SINGLE PAREN
|
|
|
20
20
|
themes
|
|
21
21
|
}
|
|
22
22
|
}
|
|
23
|
-
`,
|
|
23
|
+
`, Oe = P`
|
|
24
24
|
fragment LoanGeocode on LoanBasic {
|
|
25
25
|
id
|
|
26
26
|
geocode {
|
|
@@ -32,7 +32,7 @@ const Ne = "N/A", ne = "ECO-FRIENDLY", le = "SUSTAINABLE AG", se = "SINGLE PAREN
|
|
|
32
32
|
}
|
|
33
33
|
}
|
|
34
34
|
}
|
|
35
|
-
`,
|
|
35
|
+
`, ke = P`
|
|
36
36
|
fragment LoanProgress on LoanBasic {
|
|
37
37
|
id
|
|
38
38
|
loanAmount
|
|
@@ -43,125 +43,141 @@ const Ne = "N/A", ne = "ECO-FRIENDLY", le = "SUSTAINABLE AG", se = "SINGLE PAREN
|
|
|
43
43
|
}
|
|
44
44
|
}
|
|
45
45
|
`;
|
|
46
|
-
function
|
|
46
|
+
function we(i, d = !1) {
|
|
47
47
|
const {
|
|
48
|
-
externalLinks:
|
|
49
|
-
customLoanDetails:
|
|
48
|
+
externalLinks: s,
|
|
49
|
+
customLoanDetails: c,
|
|
50
50
|
loanId: g,
|
|
51
51
|
loan: t,
|
|
52
|
-
categoryPageName:
|
|
52
|
+
categoryPageName: m,
|
|
53
53
|
customCallouts: E,
|
|
54
|
-
customHref:
|
|
55
|
-
} =
|
|
54
|
+
customHref: T
|
|
55
|
+
} = ue(i), ie = a(() => s.value ? "a" : "router-link"), ce = a(() => s.value && T.value ? T.value : c != null && c.value ? "" : `/lend/${g.value}`), F = a(() => !g.value || !t.value), de = a(() => {
|
|
56
56
|
var e;
|
|
57
57
|
return ((e = t.value) == null ? void 0 : e.name) || "";
|
|
58
|
-
}), h =
|
|
59
|
-
var e,
|
|
60
|
-
return ((l = (
|
|
61
|
-
}),
|
|
62
|
-
var e,
|
|
63
|
-
return ((l = (
|
|
64
|
-
}),
|
|
65
|
-
var e,
|
|
66
|
-
return ((
|
|
67
|
-
}),
|
|
68
|
-
var e,
|
|
69
|
-
return ((
|
|
70
|
-
}), M =
|
|
58
|
+
}), h = a(() => {
|
|
59
|
+
var e, o, l;
|
|
60
|
+
return ((l = (o = (e = t.value) == null ? void 0 : e.geocode) == null ? void 0 : o.country) == null ? void 0 : l.name) || "";
|
|
61
|
+
}), pe = a(() => {
|
|
62
|
+
var e, o, l;
|
|
63
|
+
return ((l = (o = (e = t.value) == null ? void 0 : e.geocode) == null ? void 0 : o.country) == null ? void 0 : l.isoCode) || "";
|
|
64
|
+
}), y = a(() => {
|
|
65
|
+
var e, o;
|
|
66
|
+
return ((o = (e = t.value) == null ? void 0 : e.geocode) == null ? void 0 : o.city) || "";
|
|
67
|
+
}), _ = a(() => {
|
|
68
|
+
var e, o;
|
|
69
|
+
return ((o = (e = t.value) == null ? void 0 : e.geocode) == null ? void 0 : o.state) || "";
|
|
70
|
+
}), M = a(() => {
|
|
71
71
|
var e;
|
|
72
72
|
return ((e = t.value) == null ? void 0 : e.distributionModel) || "";
|
|
73
|
-
}),
|
|
74
|
-
var e,
|
|
75
|
-
return ((
|
|
76
|
-
}), U =
|
|
77
|
-
var e,
|
|
78
|
-
return typeof ((e = t.value) == null ? void 0 : e.loanAmount) < "u" && typeof ((l = (
|
|
79
|
-
}),
|
|
73
|
+
}), ve = a(() => {
|
|
74
|
+
var e, o;
|
|
75
|
+
return ((o = (e = t.value) == null ? void 0 : e.image) == null ? void 0 : o.hash) ?? "";
|
|
76
|
+
}), U = a(() => {
|
|
77
|
+
var e, o, l, p, f;
|
|
78
|
+
return typeof ((e = t.value) == null ? void 0 : e.loanAmount) < "u" && typeof ((l = (o = t.value) == null ? void 0 : o.loanFundraisingInfo) == null ? void 0 : l.fundedAmount) < "u" && typeof ((f = (p = t.value) == null ? void 0 : p.loanFundraisingInfo) == null ? void 0 : f.reservedAmount) < "u";
|
|
79
|
+
}), fe = a(() => !F.value && U.value), me = a(() => {
|
|
80
80
|
if (M.value === "direct") {
|
|
81
|
-
const e =
|
|
82
|
-
return `${
|
|
81
|
+
const e = d && h.value.toLowerCase() === "united states" ? "" : `, ${h.value}`;
|
|
82
|
+
return `${y.value}, ${_.value}${e}`;
|
|
83
83
|
}
|
|
84
|
-
return h.value === "Puerto Rico" ? `${
|
|
85
|
-
}),
|
|
84
|
+
return h.value === "Puerto Rico" ? `${y.value}, PR` : h.value;
|
|
85
|
+
}), ge = a(() => {
|
|
86
86
|
var e;
|
|
87
87
|
return ((e = t.value) == null ? void 0 : e.use) ?? "";
|
|
88
|
-
}),
|
|
88
|
+
}), he = a(() => {
|
|
89
89
|
var e;
|
|
90
90
|
return ((e = t.value) == null ? void 0 : e.status) ?? "";
|
|
91
|
-
}),
|
|
91
|
+
}), L = a(() => {
|
|
92
92
|
var e;
|
|
93
93
|
return ((e = t.value) == null ? void 0 : e.loanAmount) ?? "0";
|
|
94
|
-
}), N =
|
|
95
|
-
var e,
|
|
96
|
-
return
|
|
97
|
-
}),
|
|
94
|
+
}), N = a(() => {
|
|
95
|
+
var e, o, l, p;
|
|
96
|
+
return ne(((o = (e = t.value) == null ? void 0 : e.loanFundraisingInfo) == null ? void 0 : o.reservedAmount) ?? "0").add(((p = (l = t.value) == null ? void 0 : l.loanFundraisingInfo) == null ? void 0 : p.fundedAmount) ?? "0");
|
|
97
|
+
}), S = a(() => N.value.clone().divide(L.value).value()), G = a(() => U.value && L.value - N.value.value() > 0), Ce = a(() => G.value ? ne(L.value).subtract(N.value.value()).format("0.00") : "0"), Le = a(() => {
|
|
98
98
|
var e;
|
|
99
99
|
return ((e = t.value) == null ? void 0 : e.borrowerCount) ?? 0;
|
|
100
|
-
}), Ae =
|
|
101
|
-
var
|
|
102
|
-
const e = [],
|
|
103
|
-
ecoFriendly: !!
|
|
104
|
-
refugeesIdps: !!
|
|
105
|
-
singleParents: !!
|
|
106
|
-
}, O = (
|
|
107
|
-
if (O &&
|
|
108
|
-
const
|
|
109
|
-
e.push({ label:
|
|
100
|
+
}), Ae = a(() => {
|
|
101
|
+
var w, B, Y, $, K, x, z, H, W, q, j, J, Q, V, X, Z, ee, te, oe;
|
|
102
|
+
const e = [], o = Re(g.value, S.value), l = ((B = (w = t.value) == null ? void 0 : w.activity) == null ? void 0 : B.name) ?? "", p = (($ = (Y = t.value) == null ? void 0 : Y.activity) == null ? void 0 : $.id) ?? null, f = ((x = (K = t.value) == null ? void 0 : K.sector) == null ? void 0 : x.name) ?? "", D = ((H = (z = t.value) == null ? void 0 : z.sector) == null ? void 0 : H.id) ?? null, v = ((q = (W = t.value) == null ? void 0 : W.tags) == null ? void 0 : q.filter((n) => n.charAt(0) === "#").map((n) => n.substring(1))) ?? [], A = ((j = t.value) == null ? void 0 : j.themes) ?? [], b = {
|
|
103
|
+
ecoFriendly: !!v.filter((n) => n.toUpperCase() === le || n.toUpperCase() === se).length,
|
|
104
|
+
refugeesIdps: !!A.filter((n) => n.toUpperCase() === Te).length,
|
|
105
|
+
singleParents: !!v.filter((n) => n.toUpperCase() === re).length
|
|
106
|
+
}, O = (Q = (J = t.value) == null ? void 0 : J.partnerName) == null ? void 0 : Q.toUpperCase().includes(Pe), k = ((V = t.value) == null ? void 0 : V.tagsData) ?? [], Ee = ((X = t.value) == null ? void 0 : X.themesData) ?? [];
|
|
107
|
+
if (O && v.length) {
|
|
108
|
+
const n = Math.floor(o() * v.length), r = v[n], u = R(k, r), C = (u == null ? void 0 : u.id) ?? null;
|
|
109
|
+
e.push({ label: r, type: "tag", id: C });
|
|
110
110
|
}
|
|
111
|
-
if (
|
|
112
|
-
const
|
|
113
|
-
e.filter((I) => I.label.toUpperCase() ===
|
|
111
|
+
if (m.value || (b.ecoFriendly && !e.find((n) => n.label.toUpperCase() === le || n.label.toUpperCase() === se) ? 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((n) => n.label.toUpperCase() === re) && e.push({ label: "Single Parent", type: "tag", id: 17 })), l && p && ((Z = m.value) == null ? void 0 : Z.toUpperCase()) !== l.toUpperCase() && e.push({ id: p, label: l, type: "activity" }), f && D && l.toUpperCase() !== f.toUpperCase() && f.toUpperCase() !== ((ee = m.value) == null ? void 0 : ee.toUpperCase()) && e.length < 2 && e.push({ id: D, label: f, type: "sector" }), v.length && e.length < 2) {
|
|
112
|
+
const n = Math.floor(o() * v.length), r = v[n], u = R(k, r), C = (u == null ? void 0 : u.id) ?? null;
|
|
113
|
+
e.filter((I) => I.label.toUpperCase() === r.toUpperCase()).length || e.push({ label: r, type: "tag", id: C });
|
|
114
114
|
}
|
|
115
|
-
if (
|
|
116
|
-
const
|
|
117
|
-
!e.filter((I) => I.label.toUpperCase() ===
|
|
115
|
+
if (A.length && e.length < 2) {
|
|
116
|
+
const n = Math.floor(o() * A.length), r = A[n], u = R(Ee, r), C = (u == null ? void 0 : u.id) ?? null;
|
|
117
|
+
!e.filter((I) => I.label.toUpperCase() === r.toUpperCase()).length && r.toUpperCase() !== ((te = m.value) == null ? void 0 : te.toUpperCase()) && e.push({ label: r, type: "attribute", id: C });
|
|
118
118
|
}
|
|
119
119
|
if (O && e.length > 1) return [e.shift()];
|
|
120
|
-
const
|
|
121
|
-
return e.push(...
|
|
120
|
+
const ye = ((oe = E.value) == null ? void 0 : oe.map((n) => ({ label: n }))) ?? [];
|
|
121
|
+
return e.push(...ye), e;
|
|
122
122
|
});
|
|
123
123
|
return {
|
|
124
|
-
tag:
|
|
125
|
-
readMorePath:
|
|
126
|
-
isLoading:
|
|
127
|
-
borrowerName:
|
|
124
|
+
tag: ie,
|
|
125
|
+
readMorePath: ce,
|
|
126
|
+
isLoading: F,
|
|
127
|
+
borrowerName: de,
|
|
128
128
|
countryName: h,
|
|
129
|
-
countryCode:
|
|
130
|
-
city:
|
|
131
|
-
state:
|
|
129
|
+
countryCode: pe,
|
|
130
|
+
city: y,
|
|
131
|
+
state: _,
|
|
132
132
|
distributionModel: M,
|
|
133
|
-
imageHash:
|
|
133
|
+
imageHash: ve,
|
|
134
134
|
hasProgressData: U,
|
|
135
|
-
allDataLoaded:
|
|
136
|
-
fundraisingPercent:
|
|
137
|
-
unreservedAmount:
|
|
135
|
+
allDataLoaded: fe,
|
|
136
|
+
fundraisingPercent: S,
|
|
137
|
+
unreservedAmount: Ce,
|
|
138
138
|
sharesAvailable: G,
|
|
139
|
-
formattedLocation:
|
|
140
|
-
loanUse:
|
|
141
|
-
loanStatus:
|
|
142
|
-
loanAmount:
|
|
143
|
-
loanBorrowerCount:
|
|
144
|
-
mdiMapMarker:
|
|
139
|
+
formattedLocation: me,
|
|
140
|
+
loanUse: ge,
|
|
141
|
+
loanStatus: he,
|
|
142
|
+
loanAmount: L,
|
|
143
|
+
loanBorrowerCount: Le,
|
|
144
|
+
mdiMapMarker: Ie,
|
|
145
145
|
loanCallouts: Ae
|
|
146
146
|
};
|
|
147
147
|
}
|
|
148
|
-
function
|
|
148
|
+
function Be() {
|
|
149
|
+
const i = ae(null), d = ae(!1), s = () => {
|
|
150
|
+
const c = i.value;
|
|
151
|
+
d.value = !!c && c.scrollWidth > c.clientWidth;
|
|
152
|
+
};
|
|
153
|
+
return Ue(() => {
|
|
154
|
+
Ne(s), window.addEventListener("resize", s);
|
|
155
|
+
}), be(() => {
|
|
156
|
+
window.removeEventListener("resize", s);
|
|
157
|
+
}), {
|
|
158
|
+
locationRef: i,
|
|
159
|
+
isLocationTruncated: d,
|
|
160
|
+
checkLocationTruncation: s
|
|
161
|
+
};
|
|
162
|
+
}
|
|
163
|
+
function Ye(i, d) {
|
|
149
164
|
const {
|
|
150
|
-
loanId:
|
|
151
|
-
customLoanDetails:
|
|
165
|
+
loanId: s,
|
|
166
|
+
customLoanDetails: c,
|
|
152
167
|
kvTrackFunction: g
|
|
153
|
-
} =
|
|
154
|
-
function t(
|
|
155
|
-
g.value("Lending", "click-Read more",
|
|
168
|
+
} = ue(i);
|
|
169
|
+
function t(m, E) {
|
|
170
|
+
g.value("Lending", "click-Read more", m, s.value), c.value && (E.preventDefault(), d("show-loan-details"));
|
|
156
171
|
}
|
|
157
172
|
return {
|
|
158
173
|
clickReadMore: t
|
|
159
174
|
};
|
|
160
175
|
}
|
|
161
176
|
export {
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
177
|
+
De as LOAN_CALLOUTS_FRAGMENT,
|
|
178
|
+
Oe as LOAN_GEOCODE_FRAGMENT,
|
|
179
|
+
ke as LOAN_PROGRESS_FRAGMENT,
|
|
180
|
+
we as loanCardComputedProperties,
|
|
181
|
+
Ye as loanCardMethods,
|
|
182
|
+
Be as useLocationTruncation
|
|
167
183
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.loan-card-use[data-v-
|
|
1
|
+
.loan-card-use[data-v-44561e04]:hover,.loan-card-use[data-v-44561e04]: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-44561e04]{text-decoration-line:underline}.loan-card-progress[data-v-44561e04]:hover,.loan-card-progress[data-v-44561e04]:focus{text-decoration-line:none}
|
|
@@ -1,121 +1,136 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { KV_CLASSIC_LOAN_CARD_FRAGMENT as
|
|
3
|
-
import { resolveComponent as i, openBlock as
|
|
1
|
+
import N from "./KvClassicLoanCard2.js";
|
|
2
|
+
import { KV_CLASSIC_LOAN_CARD_FRAGMENT as ae, KV_CLASSIC_LOAN_CARD_USER_FRAGMET as oe } from "./KvClassicLoanCard2.js";
|
|
3
|
+
import { resolveComponent as i, openBlock as a, createElementBlock as s, normalizeStyle as T, normalizeClass as r, createElementVNode as d, createBlock as n, resolveDynamicComponent as v, withCtx as g, createVNode as w, toDisplayString as b, createTextVNode as V, createCommentVNode as c, Fragment as R, renderList as S } from "vue";
|
|
4
4
|
import "./KvClassicLoanCard.css";
|
|
5
|
-
import
|
|
6
|
-
const
|
|
5
|
+
import F from "../_virtual/_plugin-vue_export-helper.js";
|
|
6
|
+
const I = { class: "tw-grow" }, E = { class: "loan-card-active-hover" }, K = {
|
|
7
7
|
key: 1,
|
|
8
8
|
class: "tw-relative"
|
|
9
|
-
},
|
|
10
|
-
class: "tw-absolute tw-bottom-1 tw-left-1 tw-text-primary tw-bg-white tw-rounded tw-p-1 tw-mb-0 tw-
|
|
11
|
-
style: { padding: "2px 6px", "text-transform": "capitalize" }
|
|
12
|
-
},
|
|
9
|
+
}, z = { key: 0 }, W = {
|
|
10
|
+
class: "tw-absolute tw-bottom-1 tw-left-1 tw-text-primary tw-bg-white tw-rounded tw-p-1 tw-mb-0 tw-text-label tw-flex tw-items-center tw-h-3",
|
|
11
|
+
style: { padding: "2px 6px", "text-transform": "capitalize", "max-width": "calc(100% - 1rem)" }
|
|
12
|
+
}, U = ["id"], j = { class: "tw-mb-1.5 tw-pt-1" }, G = { key: 1 }, H = {
|
|
13
13
|
key: 0,
|
|
14
14
|
class: "tw-w-full tw-pt-1 tw-pr-1"
|
|
15
|
-
},
|
|
15
|
+
}, O = {
|
|
16
16
|
key: 0,
|
|
17
17
|
class: "tw-text-center tw-w-full tw-mt-1 tw-font-medium"
|
|
18
|
-
},
|
|
18
|
+
}, q = {
|
|
19
19
|
key: 1,
|
|
20
20
|
class: "tw-pt-1.5"
|
|
21
21
|
};
|
|
22
|
-
function
|
|
23
|
-
const k = i("kv-loading-placeholder"), h = i("kv-borrower-image"), f = i("kv-material-icon"), _ = i("kv-loan-team-pick"),
|
|
24
|
-
return
|
|
22
|
+
function J(u, o, e, t, Q, m) {
|
|
23
|
+
const k = i("kv-loading-placeholder"), h = i("kv-borrower-image"), f = i("kv-material-icon"), _ = i("kv-tooltip"), y = i("kv-loan-team-pick"), x = i("kv-loan-bookmark"), C = i("kv-loan-tag"), L = i("kv-loan-use"), A = i("kv-loan-callouts"), M = i("kv-loan-progress-group"), P = i("kv-lend-cta"), B = i("KvLoanActivities");
|
|
24
|
+
return a(), s("div", {
|
|
25
25
|
class: r(["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 }]),
|
|
26
26
|
"data-testid": "loan-card",
|
|
27
|
-
style:
|
|
27
|
+
style: T([{ "box-shadow": "0 4px 12px rgba(0, 0, 0, 0.08)" }, { minWidth: "230px", maxWidth: m.cardWidth }])
|
|
28
28
|
}, [
|
|
29
|
-
d("div",
|
|
30
|
-
d("div",
|
|
31
|
-
t.isLoading ? (
|
|
29
|
+
d("div", I, [
|
|
30
|
+
d("div", E, [
|
|
31
|
+
t.isLoading ? (a(), n(k, {
|
|
32
32
|
key: 0,
|
|
33
33
|
class: r(["tw-mb-1 tw-w-full", { "tw-rounded-t tw-rounded-b-none": e.largeCard, "!tw-rounded-sm": !e.largeCard }]),
|
|
34
34
|
style: { height: "15rem" }
|
|
35
|
-
}, null, 8, ["class"])) : (
|
|
36
|
-
(
|
|
35
|
+
}, null, 8, ["class"])) : (a(), s("div", K, [
|
|
36
|
+
(a(), n(v(t.tag), {
|
|
37
37
|
to: t.readMorePath,
|
|
38
38
|
href: t.readMorePath,
|
|
39
39
|
class: "tw-flex",
|
|
40
40
|
"aria-label": "Borrower image",
|
|
41
|
-
onClick:
|
|
41
|
+
onClick: o[0] || (o[0] = (l) => t.clickReadMore("Photo", l))
|
|
42
42
|
}, {
|
|
43
|
-
default:
|
|
44
|
-
|
|
43
|
+
default: g(() => [
|
|
44
|
+
w(h, {
|
|
45
45
|
class: r(["tw-relative tw-w-full tw-bg-black tw-bg-clip-content", { "tw-rounded-t": e.largeCard, "tw-rounded-sm": !e.largeCard }]),
|
|
46
46
|
alt: `Photo of ${t.borrowerName}`,
|
|
47
|
-
"aspect-ratio":
|
|
48
|
-
"default-image": { width:
|
|
47
|
+
"aspect-ratio": m.imageAspectRatio,
|
|
48
|
+
"default-image": { width: m.imageDefaultWidth },
|
|
49
49
|
hash: t.imageHash,
|
|
50
|
-
images:
|
|
50
|
+
images: m.imageSizes,
|
|
51
51
|
"photo-path": e.photoPath
|
|
52
52
|
}, null, 8, ["class", "alt", "aspect-ratio", "default-image", "hash", "images", "photo-path"]),
|
|
53
|
-
t.countryName ? (
|
|
54
|
-
d("p",
|
|
55
|
-
|
|
56
|
-
class: "tw-h-2 tw-w-2",
|
|
53
|
+
t.countryName ? (a(), s("div", z, [
|
|
54
|
+
d("p", W, [
|
|
55
|
+
w(f, {
|
|
56
|
+
class: "tw-h-2 tw-w-2 tw-flex-shrink-0",
|
|
57
57
|
icon: t.mdiMapMarker
|
|
58
58
|
}, null, 8, ["icon"]),
|
|
59
|
-
d("span",
|
|
59
|
+
d("span", {
|
|
60
|
+
id: `loan-location-${e.loanId}`,
|
|
61
|
+
ref: "locationRef",
|
|
62
|
+
class: "tw-truncate tw-min-w-0",
|
|
63
|
+
style: { "margin-top": "0.125rem" }
|
|
64
|
+
}, b(t.formattedLocation), 9, U),
|
|
65
|
+
t.isLocationTruncated ? (a(), n(_, {
|
|
66
|
+
key: 0,
|
|
67
|
+
controller: `loan-location-${e.loanId}`,
|
|
68
|
+
"max-width": "250px"
|
|
69
|
+
}, {
|
|
70
|
+
default: g(() => [
|
|
71
|
+
V(b(t.formattedLocation), 1)
|
|
72
|
+
]),
|
|
73
|
+
_: 1
|
|
74
|
+
}, 8, ["controller"])) : c("", !0)
|
|
60
75
|
])
|
|
61
|
-
])) :
|
|
76
|
+
])) : c("", !0)
|
|
62
77
|
]),
|
|
63
78
|
_: 1
|
|
64
79
|
}, 8, ["to", "href"])),
|
|
65
|
-
e.isTeamPick ? (
|
|
80
|
+
e.isTeamPick ? (a(), n(y, {
|
|
66
81
|
key: 0,
|
|
67
82
|
class: r(["tw-absolute", { "tw-right-6": !e.isVisitor, "tw-right-0": e.isVisitor }]),
|
|
68
83
|
style: { top: "-6px" },
|
|
69
84
|
"data-testid": "loan-card-teampick"
|
|
70
|
-
}, null, 8, ["class"])) :
|
|
71
|
-
e.isVisitor ?
|
|
85
|
+
}, null, 8, ["class"])) : c("", !0),
|
|
86
|
+
e.isVisitor ? c("", !0) : (a(), n(x, {
|
|
72
87
|
key: 1,
|
|
73
88
|
"loan-id": e.loanId,
|
|
74
89
|
"is-bookmarked": e.isBookmarked,
|
|
75
90
|
class: "tw-absolute tw-right-1",
|
|
76
91
|
style: { top: "-6px" },
|
|
77
92
|
"data-testid": "loan-card-bookmark",
|
|
78
|
-
onToggleBookmark:
|
|
93
|
+
onToggleBookmark: o[1] || (o[1] = (l) => u.$emit("toggle-bookmark"))
|
|
79
94
|
}, null, 8, ["loan-id", "is-bookmarked"]))
|
|
80
95
|
])),
|
|
81
|
-
(
|
|
96
|
+
(a(), n(v(t.tag), {
|
|
82
97
|
to: t.readMorePath,
|
|
83
98
|
href: t.readMorePath,
|
|
84
99
|
class: r(["tw-flex tw-no-underline hover:tw-no-underline focus:tw-no-underline", { "tw-px-1": e.largeCard }]),
|
|
85
100
|
"aria-label": "Loan tag",
|
|
86
|
-
onClick:
|
|
101
|
+
onClick: o[2] || (o[2] = (l) => t.clickReadMore("Tag", l))
|
|
87
102
|
}, {
|
|
88
|
-
default:
|
|
89
|
-
e.showTags && !t.isLoading ? (
|
|
103
|
+
default: g(() => [
|
|
104
|
+
e.showTags && !t.isLoading ? (a(), n(C, {
|
|
90
105
|
key: 0,
|
|
91
106
|
loan: e.loan,
|
|
92
107
|
"enable-multi-matching": e.enableMultiMatching
|
|
93
|
-
}, null, 8, ["loan", "enable-multi-matching"])) :
|
|
108
|
+
}, null, 8, ["loan", "enable-multi-matching"])) : c("", !0)
|
|
94
109
|
]),
|
|
95
110
|
_: 1
|
|
96
111
|
}, 8, ["to", "href", "class"])),
|
|
97
|
-
(
|
|
112
|
+
(a(), n(v(t.tag), {
|
|
98
113
|
to: t.readMorePath,
|
|
99
114
|
href: t.readMorePath,
|
|
100
115
|
class: "loan-card-use tw-no-underline tw-text-primary",
|
|
101
116
|
"aria-label": "Loan use",
|
|
102
|
-
onClick:
|
|
117
|
+
onClick: o[3] || (o[3] = (l) => t.clickReadMore("Use", l))
|
|
103
118
|
}, {
|
|
104
|
-
default:
|
|
105
|
-
d("div",
|
|
106
|
-
t.isLoading ? (
|
|
119
|
+
default: g(() => [
|
|
120
|
+
d("div", j, [
|
|
121
|
+
t.isLoading ? (a(), s("div", {
|
|
107
122
|
key: 0,
|
|
108
123
|
class: r(["tw-w-full", { "tw-px-1": e.largeCard }]),
|
|
109
124
|
style: { height: "5.5rem" }
|
|
110
125
|
}, [
|
|
111
|
-
(
|
|
112
|
-
key:
|
|
126
|
+
(a(!0), s(R, null, S([...Array(4)], (l, D) => (a(), s("div", {
|
|
127
|
+
key: D,
|
|
113
128
|
class: "tw-h-2 tw-mb-1"
|
|
114
129
|
}, [
|
|
115
|
-
|
|
130
|
+
w(k)
|
|
116
131
|
]))), 128))
|
|
117
|
-
], 2)) : (
|
|
118
|
-
|
|
132
|
+
], 2)) : (a(), s("div", G, [
|
|
133
|
+
w(L, {
|
|
119
134
|
use: t.loanUse,
|
|
120
135
|
"loan-amount": t.loanAmount,
|
|
121
136
|
status: t.loanStatus,
|
|
@@ -130,41 +145,41 @@ function O(u, a, e, t, q, c) {
|
|
|
130
145
|
_: 1
|
|
131
146
|
}, 8, ["to", "href"]))
|
|
132
147
|
]),
|
|
133
|
-
t.isLoading || typeof t.loanCallouts > "u" ? (
|
|
148
|
+
t.isLoading || typeof t.loanCallouts > "u" ? (a(), n(k, {
|
|
134
149
|
key: 0,
|
|
135
150
|
class: r(["tw-mt-1.5 tw-mb-1", { "tw-mx-1": e.largeCard }]),
|
|
136
151
|
style: { width: "60%", height: "1.75rem", "border-radius": "500rem" }
|
|
137
|
-
}, null, 8, ["class"])) : (
|
|
152
|
+
}, null, 8, ["class"])) : (a(), n(A, {
|
|
138
153
|
key: 1,
|
|
139
154
|
callouts: t.loanCallouts,
|
|
140
155
|
class: r(["tw-mt-1.5", { "tw-px-1": e.largeCard }]),
|
|
141
|
-
onClick:
|
|
156
|
+
onClick: o[4] || (o[4] = (l) => u.$emit("jump-filter-page", l))
|
|
142
157
|
}, null, 8, ["callouts", "class"]))
|
|
143
158
|
]),
|
|
144
159
|
d("div", {
|
|
145
160
|
class: r(["tw-flex tw-justify-between tw-mt-2", { "tw-px-1": e.largeCard }])
|
|
146
161
|
}, [
|
|
147
|
-
t.hasProgressData ?
|
|
148
|
-
|
|
162
|
+
t.hasProgressData ? c("", !0) : (a(), s("div", H, [
|
|
163
|
+
w(k, {
|
|
149
164
|
class: "tw-mb-0.5",
|
|
150
165
|
style: { width: "70%", height: "1.3rem" }
|
|
151
166
|
}),
|
|
152
|
-
|
|
167
|
+
w(k, {
|
|
153
168
|
class: "tw-rounded",
|
|
154
169
|
style: { width: "70%", height: "0.5rem" }
|
|
155
170
|
})
|
|
156
171
|
])),
|
|
157
172
|
d("div", null, [
|
|
158
|
-
t.sharesAvailable ? (
|
|
173
|
+
t.sharesAvailable ? (a(), n(v(t.tag), {
|
|
159
174
|
key: 0,
|
|
160
175
|
to: t.readMorePath,
|
|
161
176
|
href: t.readMorePath,
|
|
162
177
|
class: "loan-card-progress tw-no-underline tw-mt-1",
|
|
163
178
|
"aria-label": "Loan progress",
|
|
164
|
-
onClick:
|
|
179
|
+
onClick: o[5] || (o[5] = (l) => t.clickReadMore("Progress", l))
|
|
165
180
|
}, {
|
|
166
|
-
default:
|
|
167
|
-
|
|
181
|
+
default: g(() => [
|
|
182
|
+
w(M, {
|
|
168
183
|
id: "loanProgress",
|
|
169
184
|
"money-left": t.unreservedAmount,
|
|
170
185
|
"progress-percent": t.fundraisingPercent,
|
|
@@ -172,9 +187,9 @@ function O(u, a, e, t, q, c) {
|
|
|
172
187
|
}, null, 8, ["money-left", "progress-percent"])
|
|
173
188
|
]),
|
|
174
189
|
_: 1
|
|
175
|
-
}, 8, ["to", "href"])) :
|
|
190
|
+
}, 8, ["to", "href"])) : c("", !0)
|
|
176
191
|
]),
|
|
177
|
-
t.allDataLoaded ? (
|
|
192
|
+
t.allDataLoaded ? (a(), n(P, {
|
|
178
193
|
key: 2,
|
|
179
194
|
loan: e.loan,
|
|
180
195
|
"unreserved-amount": t.unreservedAmount,
|
|
@@ -196,21 +211,21 @@ function O(u, a, e, t, q, c) {
|
|
|
196
211
|
"secondary-button-text": e.secondaryButtonText,
|
|
197
212
|
"secondary-button-handler": e.secondaryButtonHandler,
|
|
198
213
|
class: r(["tw-mt-auto", { "tw-w-full": !t.sharesAvailable }]),
|
|
199
|
-
onAddToBasket:
|
|
200
|
-
onShowLoanDetails:
|
|
201
|
-
onRemoveFromBasket:
|
|
202
|
-
}, 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"])) : (
|
|
214
|
+
onAddToBasket: o[6] || (o[6] = (l) => u.$emit("add-to-basket", l)),
|
|
215
|
+
onShowLoanDetails: o[7] || (o[7] = (l) => t.clickReadMore("ViewLoan", l)),
|
|
216
|
+
onRemoveFromBasket: o[8] || (o[8] = (l) => u.$emit("remove-from-basket", l))
|
|
217
|
+
}, 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"])) : (a(), n(k, {
|
|
203
218
|
key: 1,
|
|
204
219
|
class: "tw-rounded tw-self-start",
|
|
205
220
|
style: { width: "9rem", height: "3rem" }
|
|
206
221
|
}))
|
|
207
222
|
], 2),
|
|
208
|
-
e.showContributors &&
|
|
209
|
-
d("p", null, b(
|
|
210
|
-
])) :
|
|
211
|
-
e.combinedActivities.length > 0 ? (
|
|
212
|
-
|
|
213
|
-
|
|
223
|
+
e.showContributors && m.lendersNumber && m.amountLent ? (a(), s("div", O, [
|
|
224
|
+
d("p", null, b(m.lendersNumber) + " people contributed " + b(m.amountLent), 1)
|
|
225
|
+
])) : c("", !0),
|
|
226
|
+
e.combinedActivities.length > 0 ? (a(), s("div", q, [
|
|
227
|
+
o[10] || (o[10] = d("hr", { class: "tw-border-tertiary tw-mb-1 tw-w-5/6 tw-mx-auto" }, null, -1)),
|
|
228
|
+
w(B, {
|
|
214
229
|
loan: e.loan,
|
|
215
230
|
"combined-activities": e.combinedActivities,
|
|
216
231
|
"kv-track-function": e.kvTrackFunction,
|
|
@@ -227,14 +242,14 @@ function O(u, a, e, t, q, c) {
|
|
|
227
242
|
"set-cookie": e.setCookie,
|
|
228
243
|
"error-msg": e.errorMsg,
|
|
229
244
|
"is-visitor": e.isVisitor,
|
|
230
|
-
onAddToBasket:
|
|
245
|
+
onAddToBasket: o[9] || (o[9] = (l) => u.$emit("add-to-basket", l))
|
|
231
246
|
}, null, 8, ["loan", "combined-activities", "kv-track-function", "basket-items", "is-adding", "enable-five-dollars-notes", "five-dollars-selected", "show-view-loan", "custom-loan-details", "external-links", "route", "user-balance", "get-cookie", "set-cookie", "error-msg", "is-visitor"])
|
|
232
|
-
])) :
|
|
247
|
+
])) : c("", !0)
|
|
233
248
|
], 6);
|
|
234
249
|
}
|
|
235
|
-
const
|
|
250
|
+
const $ = /* @__PURE__ */ F(N, [["render", J], ["__scopeId", "data-v-44561e04"]]);
|
|
236
251
|
export {
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
252
|
+
ae as KV_CLASSIC_LOAN_CARD_FRAGMENT,
|
|
253
|
+
oe as KV_CLASSIC_LOAN_CARD_USER_FRAGMET,
|
|
254
|
+
$ as default
|
|
240
255
|
};
|