@kiva/kv-components 8.15.1 → 8.16.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/KvClassicLoanCard.css +1 -1
- package/dist/vue/KvClassicLoanCard.js +4 -3
- package/dist/vue/KvClassicLoanCard.vue.d.ts +22 -0
- package/dist/vue/KvClassicLoanCard2.js +24 -20
- package/dist/vue/KvCompactLoanCard.css +1 -1
- package/dist/vue/KvCompactLoanCard.js +32 -31
- package/dist/vue/KvCompactLoanCard.vue.d.ts +23 -0
- package/dist/vue/KvCompactLoanCard2.js +65 -57
- package/dist/vue/KvIntroductionLoanCard.css +1 -1
- package/dist/vue/KvIntroductionLoanCard.js +9 -8
- package/dist/vue/KvIntroductionLoanCard.vue.d.ts +22 -0
- package/dist/vue/KvIntroductionLoanCard2.js +26 -22
- package/dist/vue/KvLoanTag.js +39 -18
- package/dist/vue/KvLoanTag.vue.d.ts +13 -0
- package/dist/vue/KvLoanTag2.js +53 -28
- package/dist/vue/KvWideLoanCard.css +1 -1
- package/dist/vue/KvWideLoanCard.js +4 -3
- package/dist/vue/KvWideLoanCard.vue.d.ts +22 -0
- package/dist/vue/KvWideLoanCard2.js +22 -18
- package/package.json +2 -2
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import
|
|
1
|
+
import A from "graphql-tag";
|
|
2
2
|
import W from "numeral";
|
|
3
3
|
import { ref as $, computed as o, watch as H } from "vue";
|
|
4
4
|
import { mdiMapMarker as j, mdiHome as q, mdiLink as z, mdiCached as J } from "@mdi/js";
|
|
5
5
|
import { LOAN_CALLOUTS_FRAGMENT as Q, LOAN_GEOCODE_FRAGMENT as X, LOAN_PROGRESS_FRAGMENT as Y, loanCardComputedProperties as Z, loanCardMethods as ee } from "../utils/loanCard.js";
|
|
6
6
|
import { getDropdownPriceArray as te, getLendCtaSelectedOption as ae, isLessThan25 as oe } from "../utils/loanUtils.js";
|
|
7
7
|
import { computePostGoalLoanCardStatement as ne } from "../utils/postGoalStatement.js";
|
|
8
|
-
import
|
|
9
|
-
import
|
|
8
|
+
import le from "./KvLoanUse.js";
|
|
9
|
+
import re from "./KvBorrowerImage.js";
|
|
10
10
|
import ie from "./KvLoanCallouts.js";
|
|
11
11
|
import se from "./KvLendCta.js";
|
|
12
12
|
import ue from "./KvLoanProgressGroup.js";
|
|
@@ -14,14 +14,14 @@ import de from "./KvLoanTag.js";
|
|
|
14
14
|
import me from "./KvMaterialIcon.js";
|
|
15
15
|
import fe from "./KvLoadingPlaceholder.js";
|
|
16
16
|
import ce from "./KvLoanTeamPick.js";
|
|
17
|
-
import
|
|
18
|
-
import { KV_LEND_CTA_FRAGMENT as
|
|
19
|
-
import { KV_LOAN_TAG_FRAGMENT as
|
|
20
|
-
import { KV_LOAN_USE_FRAGMENT as
|
|
17
|
+
import he from "./KvSelect.js";
|
|
18
|
+
import { KV_LEND_CTA_FRAGMENT as ve, KV_LEND_CTA_USER_FRAGMENT as Le } from "./KvLendCta2.js";
|
|
19
|
+
import { KV_LOAN_TAG_FRAGMENT as ge } from "./KvLoanTag2.js";
|
|
20
|
+
import { KV_LOAN_USE_FRAGMENT as ye } from "./KvLoanUse2.js";
|
|
21
21
|
const d = {
|
|
22
22
|
default: "default",
|
|
23
23
|
postGoal: "post-goal"
|
|
24
|
-
},
|
|
24
|
+
}, pe = (e) => e < 500 && e >= 25, Ae = (e) => oe(e) || pe(e), $e = A`
|
|
25
25
|
fragment KvCompactLoanCard on LoanBasic {
|
|
26
26
|
id
|
|
27
27
|
image {
|
|
@@ -43,31 +43,31 @@ const d = {
|
|
|
43
43
|
...LoanGeocode
|
|
44
44
|
...LoanProgress
|
|
45
45
|
}
|
|
46
|
-
${
|
|
47
|
-
${ye}
|
|
46
|
+
${ve}
|
|
48
47
|
${ge}
|
|
48
|
+
${ye}
|
|
49
49
|
${Q}
|
|
50
50
|
${X}
|
|
51
51
|
${Y}
|
|
52
|
-
`, He =
|
|
52
|
+
`, He = A`
|
|
53
53
|
fragment KvCompactLoanCardUser on LoanBasic {
|
|
54
54
|
id
|
|
55
55
|
...KvLendCtaUser
|
|
56
56
|
}
|
|
57
|
-
${
|
|
57
|
+
${Le}
|
|
58
58
|
`, je = {
|
|
59
59
|
name: "KvCompactLoanCard",
|
|
60
60
|
components: {
|
|
61
|
-
KvBorrowerImage:
|
|
61
|
+
KvBorrowerImage: re,
|
|
62
62
|
KvLoadingPlaceholder: fe,
|
|
63
|
-
KvLoanUse:
|
|
63
|
+
KvLoanUse: le,
|
|
64
64
|
KvMaterialIcon: me,
|
|
65
65
|
KvLendCta: se,
|
|
66
66
|
KvLoanTag: de,
|
|
67
67
|
KvLoanCallouts: ie,
|
|
68
68
|
KvLoanTeamPick: ce,
|
|
69
69
|
KvLoanProgressGroup: ue,
|
|
70
|
-
KvSelect:
|
|
70
|
+
KvSelect: he
|
|
71
71
|
},
|
|
72
72
|
props: {
|
|
73
73
|
variant: {
|
|
@@ -206,6 +206,10 @@ const d = {
|
|
|
206
206
|
customAmountLent: {
|
|
207
207
|
type: String,
|
|
208
208
|
default: "25"
|
|
209
|
+
},
|
|
210
|
+
enableMultiMatching: {
|
|
211
|
+
type: Boolean,
|
|
212
|
+
default: !1
|
|
209
213
|
}
|
|
210
214
|
},
|
|
211
215
|
emits: [
|
|
@@ -217,7 +221,7 @@ const d = {
|
|
|
217
221
|
"update:selected-amount"
|
|
218
222
|
],
|
|
219
223
|
setup(e, { emit: a }) {
|
|
220
|
-
const
|
|
224
|
+
const n = $(""), s = o(
|
|
221
225
|
() => e.variant === d.postGoal
|
|
222
226
|
), {
|
|
223
227
|
allDataLoaded: C,
|
|
@@ -230,77 +234,77 @@ const d = {
|
|
|
230
234
|
hasProgressData: _,
|
|
231
235
|
imageHash: w,
|
|
232
236
|
isLoading: B,
|
|
233
|
-
loanAmount:
|
|
234
|
-
loanBorrowerCount:
|
|
237
|
+
loanAmount: h,
|
|
238
|
+
loanBorrowerCount: v,
|
|
235
239
|
loanCallouts: T,
|
|
236
|
-
loanStatus:
|
|
237
|
-
loanUse:
|
|
240
|
+
loanStatus: L,
|
|
241
|
+
loanUse: g,
|
|
238
242
|
readMorePath: k,
|
|
239
|
-
state:
|
|
240
|
-
tag:
|
|
243
|
+
state: M,
|
|
244
|
+
tag: F,
|
|
241
245
|
unreservedAmount: u,
|
|
242
|
-
sharesAvailable:
|
|
243
|
-
} = Z(e), { clickReadMore:
|
|
246
|
+
sharesAvailable: K
|
|
247
|
+
} = Z(e), { clickReadMore: R } = ee(e, a), P = o(() => s.value ? void 0 : { width: "100px", height: "100px" }), E = o(() => {
|
|
244
248
|
if (!e.website)
|
|
245
249
|
return "";
|
|
246
250
|
const t = e.website.trim();
|
|
247
251
|
return t.startsWith("http://") || t.startsWith("https://") ? t : `https://${t}`;
|
|
248
252
|
}), G = o(() => {
|
|
249
253
|
if (s.value) return {};
|
|
250
|
-
const t = e.showLightView ? "auto" : "6.75rem",
|
|
251
|
-
return { height: t, maxHeight:
|
|
252
|
-
}),
|
|
254
|
+
const t = e.showLightView ? "auto" : "6.75rem", l = e.showLightView ? "none" : "6.75rem";
|
|
255
|
+
return { height: t, maxHeight: l };
|
|
256
|
+
}), r = o(() => {
|
|
253
257
|
var t;
|
|
254
258
|
return ne({
|
|
255
259
|
anonymizationLevel: (t = e.loan) == null ? void 0 : t.anonymizationLevel,
|
|
256
260
|
borrowerName: m.value,
|
|
257
261
|
distributionModel: f.value,
|
|
258
262
|
formattedLocation: c.value,
|
|
259
|
-
loanAmount:
|
|
260
|
-
loanBorrowerCount:
|
|
261
|
-
loanStatus:
|
|
262
|
-
loanUse:
|
|
263
|
+
loanAmount: h.value,
|
|
264
|
+
loanBorrowerCount: v.value,
|
|
265
|
+
loanStatus: L.value,
|
|
266
|
+
loanUse: g.value
|
|
263
267
|
});
|
|
264
|
-
}), O = o(() =>
|
|
268
|
+
}), O = o(() => r.value.borrowerNameWithCountry), U = o(() => r.value.loanUsePrefixStart), D = o(() => r.value.loanUsePrefixEnd), V = o(() => r.value.statementTitle), I = o(() => r.value.visibleUseStatement), y = o(() => {
|
|
265
269
|
var i;
|
|
266
270
|
const t = parseFloat(u.value);
|
|
267
271
|
if (!t) return [];
|
|
268
|
-
const
|
|
272
|
+
const l = t < 25 ? parseFloat(`${((i = e.loan) == null ? void 0 : i.minNoteSize) ?? 25}`) : 25;
|
|
269
273
|
return te(
|
|
270
274
|
u.value,
|
|
271
|
-
|
|
272
|
-
|
|
275
|
+
Ae(t),
|
|
276
|
+
l,
|
|
273
277
|
e.enableFiveDollarsNotes,
|
|
274
278
|
e.isVisitor
|
|
275
279
|
);
|
|
276
280
|
});
|
|
277
281
|
H(
|
|
278
|
-
|
|
282
|
+
y,
|
|
279
283
|
(t) => {
|
|
280
|
-
var i,
|
|
284
|
+
var i, p;
|
|
281
285
|
if (!s.value) return;
|
|
282
286
|
if (!t.length) {
|
|
283
|
-
|
|
287
|
+
n.value = "";
|
|
284
288
|
return;
|
|
285
289
|
}
|
|
286
|
-
const
|
|
290
|
+
const l = ae(
|
|
287
291
|
e.getCookie,
|
|
288
292
|
e.setCookie,
|
|
289
293
|
e.enableFiveDollarsNotes,
|
|
290
|
-
(
|
|
294
|
+
(p = (i = e.route) == null ? void 0 : i.query) == null ? void 0 : p.utm_campaign,
|
|
291
295
|
u.value,
|
|
292
296
|
e.userBalance ? parseFloat(e.userBalance) : void 0,
|
|
293
297
|
e.fiveDollarsSelected
|
|
294
298
|
);
|
|
295
|
-
|
|
299
|
+
n.value = t.includes(l) ? l : t[0];
|
|
296
300
|
},
|
|
297
301
|
{ immediate: !0 }
|
|
298
302
|
);
|
|
299
303
|
const x = o(() => e.showLightView ? 3 : 4);
|
|
300
304
|
return {
|
|
301
305
|
allDataLoaded: C,
|
|
302
|
-
amountOptions:
|
|
303
|
-
borrowerImageStyle:
|
|
306
|
+
amountOptions: y,
|
|
307
|
+
borrowerImageStyle: P,
|
|
304
308
|
borrowerName: m,
|
|
305
309
|
borrowerNameWithCountry: O,
|
|
306
310
|
city: b,
|
|
@@ -313,11 +317,11 @@ const d = {
|
|
|
313
317
|
imageHash: w,
|
|
314
318
|
isLoading: B,
|
|
315
319
|
isPostGoalVariant: s,
|
|
316
|
-
loanAmount:
|
|
317
|
-
loanBorrowerCount:
|
|
320
|
+
loanAmount: h,
|
|
321
|
+
loanBorrowerCount: v,
|
|
318
322
|
loanCallouts: T,
|
|
319
|
-
loanStatus:
|
|
320
|
-
loanUse:
|
|
323
|
+
loanStatus: L,
|
|
324
|
+
loanUse: g,
|
|
321
325
|
loanUsePrefixEnd: D,
|
|
322
326
|
loanUsePrefixStart: U,
|
|
323
327
|
mdiMapMarker: j,
|
|
@@ -325,16 +329,16 @@ const d = {
|
|
|
325
329
|
mdiLink: z,
|
|
326
330
|
mdiCached: J,
|
|
327
331
|
readMorePath: k,
|
|
328
|
-
state:
|
|
329
|
-
tag:
|
|
332
|
+
state: M,
|
|
333
|
+
tag: F,
|
|
330
334
|
unreservedAmount: u,
|
|
331
|
-
sharesAvailable:
|
|
332
|
-
selectedAmount:
|
|
335
|
+
sharesAvailable: K,
|
|
336
|
+
selectedAmount: n,
|
|
333
337
|
statementTitle: V,
|
|
334
338
|
customStyle: G,
|
|
335
339
|
loanUseLoadingRows: x,
|
|
336
340
|
visibleUseStatement: I,
|
|
337
|
-
clickReadMore:
|
|
341
|
+
clickReadMore: R,
|
|
338
342
|
trackWebsiteClick: () => {
|
|
339
343
|
e.kvTrackFunction(
|
|
340
344
|
"Lending",
|
|
@@ -347,12 +351,12 @@ const d = {
|
|
|
347
351
|
a("refresh-button", t);
|
|
348
352
|
},
|
|
349
353
|
handleSelectedAmount: (t) => {
|
|
350
|
-
var
|
|
351
|
-
|
|
354
|
+
var l;
|
|
355
|
+
n.value = t, a("update:selected-amount", t), e.kvTrackFunction(
|
|
352
356
|
"Lending",
|
|
353
357
|
"Modify lend amount",
|
|
354
358
|
t,
|
|
355
|
-
e.loanId ?? ((
|
|
359
|
+
e.loanId ?? ((l = e.loan) == null ? void 0 : l.id)
|
|
356
360
|
);
|
|
357
361
|
}
|
|
358
362
|
};
|
|
@@ -363,13 +367,17 @@ const d = {
|
|
|
363
367
|
return ((a = (e = this.loan) == null ? void 0 : e.lenders) == null ? void 0 : a.totalCount) ?? 0;
|
|
364
368
|
},
|
|
365
369
|
amountLent() {
|
|
366
|
-
var a,
|
|
367
|
-
const e = ((
|
|
370
|
+
var a, n;
|
|
371
|
+
const e = ((n = (a = this.loan) == null ? void 0 : a.loanFundraisingInfo) == null ? void 0 : n.fundedAmount) ?? 0;
|
|
368
372
|
return W(e).format("$0,0");
|
|
369
373
|
},
|
|
370
374
|
isInBasket() {
|
|
371
375
|
var e;
|
|
372
376
|
return ((e = this.basketItems) == null ? void 0 : e.some((a) => a.__typename === "LoanReservation" && a.id === this.loanId)) ?? !1;
|
|
377
|
+
},
|
|
378
|
+
hasMatchingInfo() {
|
|
379
|
+
var e, a, n;
|
|
380
|
+
return !!((e = this.loan) != null && e.matchingText) || this.enableMultiMatching && (((n = (a = this.loan) == null ? void 0 : a.multiMatching) == null ? void 0 : n.length) ?? 0) > 0;
|
|
373
381
|
}
|
|
374
382
|
}
|
|
375
383
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.loan-callouts[data-v-
|
|
1
|
+
.loan-callouts[data-v-03fddb4a] span{background-color:transparent!important;--tw-text-opacity: 1;color:rgba(var(--text-action),var(--tw-text-opacity, 1))}.loan-card-use[data-v-03fddb4a]:hover,.loan-card-use[data-v-03fddb4a]: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-03fddb4a],.loan-card-active-hover:hover .loan-card-name[data-v-03fddb4a]{text-decoration-line:underline}.loan-card-progress[data-v-03fddb4a],.loan-card-progress[data-v-03fddb4a]:hover,.loan-card-progress[data-v-03fddb4a]:focus{text-decoration-line:none}.loan-card-name[data-v-03fddb4a]{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:1;cursor:pointer;overflow:hidden;text-overflow:ellipsis;padding-left:1.5rem;padding-right:1.5rem;padding-top:.5rem}.loan-bookmark[data-v-03fddb4a] button{border-top-left-radius:0!important;border-top-right-radius:0!important}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import N from "./KvIntroductionLoanCard2.js";
|
|
2
2
|
import { KV_INTRODUCTION_LOAN_CARD_FRAGMENT as tt, KV_INTRODUCTION_LOAN_CARD_USER_FRAGMENT as et } from "./KvIntroductionLoanCard2.js";
|
|
3
|
-
import { resolveComponent as s, openBlock as e, createElementBlock as n, normalizeClass as _, normalizeStyle as P, createElementVNode as i, createBlock as o, resolveDynamicComponent as g, withCtx as w, createVNode as d, Suspense as
|
|
3
|
+
import { resolveComponent as s, openBlock as e, createElementBlock as n, normalizeClass as _, normalizeStyle as P, createElementVNode as i, createBlock as o, resolveDynamicComponent as g, withCtx as w, createVNode as d, Suspense as R, toDisplayString as f, createCommentVNode as m, Fragment as p, renderList as A } from "vue";
|
|
4
4
|
import "./KvIntroductionLoanCard.css";
|
|
5
5
|
import B from "../_virtual/_plugin-vue_export-helper.js";
|
|
6
6
|
const D = { class: "tw-grow" }, T = { class: "loan-card-active-hover" }, z = {
|
|
@@ -26,7 +26,7 @@ const D = { class: "tw-grow" }, T = { class: "loan-card-active-hover" }, z = {
|
|
|
26
26
|
style: { "font-weight": "bold", "font-size": "13px", "border-radius": "8px" }
|
|
27
27
|
};
|
|
28
28
|
function G(k, a, c, t, H, h) {
|
|
29
|
-
const l = s("kv-loading-placeholder"), u = s("kv-borrower-image"), y = s("kv-flag"), b = s("kv-loan-bookmark"), v = s("kv-loan-callouts"), x = s("kv-loan-use"), C = s("kv-loan-progress-group"),
|
|
29
|
+
const l = s("kv-loading-placeholder"), u = s("kv-borrower-image"), y = s("kv-flag"), b = s("kv-loan-bookmark"), v = s("kv-loan-callouts"), x = s("kv-loan-use"), C = s("kv-loan-progress-group"), M = s("kv-loan-tag");
|
|
30
30
|
return e(), n("div", {
|
|
31
31
|
class: _(["tw-flex tw-flex-col tw-bg-white tw-rounded tw-w-full tw-pb-2", { "tw-pointer-events-none": t.isLoading }]),
|
|
32
32
|
"data-testid": "loan-card",
|
|
@@ -58,7 +58,7 @@ function G(k, a, c, t, H, h) {
|
|
|
58
58
|
}, null, 8, ["alt", "aspect-ratio", "default-image", "hash", "images", "photo-path"]),
|
|
59
59
|
t.countryName ? (e(), n("div", I, [
|
|
60
60
|
i("p", F, [
|
|
61
|
-
(e(), o(
|
|
61
|
+
(e(), o(R, null, {
|
|
62
62
|
default: w(() => [
|
|
63
63
|
d(y, {
|
|
64
64
|
class: "tw-ml-0.5 tw-mr-1",
|
|
@@ -150,8 +150,8 @@ function G(k, a, c, t, H, h) {
|
|
|
150
150
|
class: _(["tw-pt-0.5 tw-px-2", { "tw-mb-1.5": !t.isLoading }])
|
|
151
151
|
}, [
|
|
152
152
|
t.isLoading ? (e(), n("div", V, [
|
|
153
|
-
(e(!0), n(
|
|
154
|
-
key:
|
|
153
|
+
(e(!0), n(p, null, A([...Array(3)], (r, L) => (e(), n("div", {
|
|
154
|
+
key: L,
|
|
155
155
|
class: "tw-h-2 tw-mb-1"
|
|
156
156
|
}, [
|
|
157
157
|
d(l)
|
|
@@ -216,17 +216,18 @@ function G(k, a, c, t, H, h) {
|
|
|
216
216
|
key: 1,
|
|
217
217
|
class: "tw-rounded tw-mx-auto tw-mt-2",
|
|
218
218
|
style: { width: "9rem", height: "1rem" }
|
|
219
|
-
})) : h.isFunded ? (e(), n("div", K, " 🎉 Fully funded! ")) : (e(), o(
|
|
219
|
+
})) : h.isFunded ? (e(), n("div", K, " 🎉 Fully funded! ")) : (e(), o(M, {
|
|
220
220
|
key: 3,
|
|
221
221
|
loan: c.loan,
|
|
222
222
|
"use-expanded-styles": !0,
|
|
223
|
+
"enable-multi-matching": c.enableMultiMatching,
|
|
223
224
|
style: { "font-size": "15px" },
|
|
224
225
|
class: "tw-text-center tw-pt-2"
|
|
225
|
-
}, null, 8, ["loan"]))
|
|
226
|
+
}, null, 8, ["loan", "enable-multi-matching"]))
|
|
226
227
|
])
|
|
227
228
|
], 6);
|
|
228
229
|
}
|
|
229
|
-
const Y = /* @__PURE__ */ B(N, [["render", G], ["__scopeId", "data-v-
|
|
230
|
+
const Y = /* @__PURE__ */ B(N, [["render", G], ["__scopeId", "data-v-03fddb4a"]]);
|
|
230
231
|
export {
|
|
231
232
|
tt as KV_INTRODUCTION_LOAN_CARD_FRAGMENT,
|
|
232
233
|
et as KV_INTRODUCTION_LOAN_CARD_USER_FRAGMENT,
|
|
@@ -57,6 +57,10 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
57
57
|
type: StringConstructor;
|
|
58
58
|
default: string;
|
|
59
59
|
};
|
|
60
|
+
enableMultiMatching: {
|
|
61
|
+
type: BooleanConstructor;
|
|
62
|
+
default: boolean;
|
|
63
|
+
};
|
|
60
64
|
}>, {
|
|
61
65
|
allDataLoaded: import('vue').ComputedRef<boolean>;
|
|
62
66
|
borrowerName: import('vue').ComputedRef<any>;
|
|
@@ -149,6 +153,10 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
149
153
|
type: StringConstructor;
|
|
150
154
|
default: string;
|
|
151
155
|
};
|
|
156
|
+
enableMultiMatching: {
|
|
157
|
+
type: BooleanConstructor;
|
|
158
|
+
default: boolean;
|
|
159
|
+
};
|
|
152
160
|
}>> & Readonly<{}>, {
|
|
153
161
|
loan: Record<string, any>;
|
|
154
162
|
externalLinks: boolean;
|
|
@@ -160,6 +168,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
160
168
|
route: Record<string, any>;
|
|
161
169
|
isVisitor: boolean;
|
|
162
170
|
isBookmarked: boolean;
|
|
171
|
+
enableMultiMatching: boolean;
|
|
163
172
|
errorMsg: string;
|
|
164
173
|
useFullWidth: boolean;
|
|
165
174
|
}, {}, {
|
|
@@ -490,10 +499,17 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
490
499
|
type: BooleanConstructor;
|
|
491
500
|
default: boolean;
|
|
492
501
|
};
|
|
502
|
+
enableMultiMatching: {
|
|
503
|
+
type: BooleanConstructor;
|
|
504
|
+
default: boolean;
|
|
505
|
+
};
|
|
493
506
|
}>, {}, {}, {
|
|
494
507
|
deadline(): Date;
|
|
495
508
|
isLseLoan(): any;
|
|
496
509
|
amountLeft(): any;
|
|
510
|
+
multiMatchingOrgs(): any;
|
|
511
|
+
isMultipleMatch(): boolean;
|
|
512
|
+
totalMatchRatio(): any;
|
|
497
513
|
variation(): string;
|
|
498
514
|
tagText(): string;
|
|
499
515
|
tagColor(): "#AF741C" | "#CE2626" | "#2B7C5F" | "#CE4A00";
|
|
@@ -507,8 +523,13 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
507
523
|
type: BooleanConstructor;
|
|
508
524
|
default: boolean;
|
|
509
525
|
};
|
|
526
|
+
enableMultiMatching: {
|
|
527
|
+
type: BooleanConstructor;
|
|
528
|
+
default: boolean;
|
|
529
|
+
};
|
|
510
530
|
}>> & Readonly<{}>, {
|
|
511
531
|
useExpandedStyles: boolean;
|
|
532
|
+
enableMultiMatching: boolean;
|
|
512
533
|
}, {}, {
|
|
513
534
|
KvCountdownTimer: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
514
535
|
deadline: {
|
|
@@ -524,6 +545,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
524
545
|
required: true;
|
|
525
546
|
};
|
|
526
547
|
}>> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
548
|
+
KvTooltip: import('vue').DefineSetupFnComponent<Record<string, any>, {}, {}, Record<string, any> & {}, import('vue').PublicProps>;
|
|
527
549
|
}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
528
550
|
KvLoanCallouts: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
529
551
|
callouts: {
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import a from "graphql-tag";
|
|
2
|
-
import
|
|
3
|
-
import { LOAN_CALLOUTS_FRAGMENT as
|
|
2
|
+
import R from "numeral";
|
|
3
|
+
import { LOAN_CALLOUTS_FRAGMENT as F, LOAN_GEOCODE_FRAGMENT as T, LOAN_PROGRESS_FRAGMENT as B, loanCardComputedProperties as k, loanCardMethods as E } from "../utils/loanCard.js";
|
|
4
4
|
import G from "./KvLoanBookmark.js";
|
|
5
5
|
import I from "./KvLoanUse.js";
|
|
6
6
|
import S from "./KvBorrowerImage.js";
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
7
|
+
import b from "./KvLoanProgressGroup.js";
|
|
8
|
+
import D from "./KvLoanCallouts.js";
|
|
9
|
+
import P from "./KvLoanTag.js";
|
|
10
10
|
import U from "./KvMaterialIcon.js";
|
|
11
11
|
import $ from "./KvLoadingPlaceholder.js";
|
|
12
12
|
import w from "./KvFlag.js";
|
|
@@ -39,7 +39,7 @@ const no = a`
|
|
|
39
39
|
${r}
|
|
40
40
|
${V}
|
|
41
41
|
${W}
|
|
42
|
-
${
|
|
42
|
+
${F}
|
|
43
43
|
${T}
|
|
44
44
|
${B}
|
|
45
45
|
`, io = a`
|
|
@@ -54,10 +54,10 @@ const no = a`
|
|
|
54
54
|
KvBorrowerImage: S,
|
|
55
55
|
KvLoadingPlaceholder: $,
|
|
56
56
|
KvLoanUse: I,
|
|
57
|
-
KvLoanProgressGroup:
|
|
57
|
+
KvLoanProgressGroup: b,
|
|
58
58
|
KvMaterialIcon: U,
|
|
59
|
-
KvLoanTag:
|
|
60
|
-
KvLoanCallouts:
|
|
59
|
+
KvLoanTag: P,
|
|
60
|
+
KvLoanCallouts: D,
|
|
61
61
|
KvFlag: w,
|
|
62
62
|
KvLoanBookmark: G
|
|
63
63
|
},
|
|
@@ -117,6 +117,10 @@ const no = a`
|
|
|
117
117
|
customHref: {
|
|
118
118
|
type: String,
|
|
119
119
|
default: ""
|
|
120
|
+
},
|
|
121
|
+
enableMultiMatching: {
|
|
122
|
+
type: Boolean,
|
|
123
|
+
default: !1
|
|
120
124
|
}
|
|
121
125
|
},
|
|
122
126
|
setup(o, { emit: e }) {
|
|
@@ -135,16 +139,16 @@ const no = a`
|
|
|
135
139
|
loanAmount: L,
|
|
136
140
|
loanBorrowerCount: g,
|
|
137
141
|
loanCallouts: A,
|
|
138
|
-
loanStatus:
|
|
139
|
-
loanUse:
|
|
142
|
+
loanStatus: h,
|
|
143
|
+
loanUse: N,
|
|
140
144
|
mdiMapMarker: _,
|
|
141
145
|
readMorePath: K,
|
|
142
146
|
state: v,
|
|
143
|
-
tag:
|
|
144
|
-
unreservedAmount:
|
|
145
|
-
sharesAvailable:
|
|
147
|
+
tag: y,
|
|
148
|
+
unreservedAmount: C,
|
|
149
|
+
sharesAvailable: O
|
|
146
150
|
} = k(o, !0), {
|
|
147
|
-
clickReadMore:
|
|
151
|
+
clickReadMore: M
|
|
148
152
|
} = E(o, e);
|
|
149
153
|
return {
|
|
150
154
|
allDataLoaded: t,
|
|
@@ -161,15 +165,15 @@ const no = a`
|
|
|
161
165
|
loanAmount: L,
|
|
162
166
|
loanBorrowerCount: g,
|
|
163
167
|
loanCallouts: A,
|
|
164
|
-
loanStatus:
|
|
165
|
-
loanUse:
|
|
168
|
+
loanStatus: h,
|
|
169
|
+
loanUse: N,
|
|
166
170
|
mdiMapMarker: _,
|
|
167
171
|
readMorePath: K,
|
|
168
172
|
state: v,
|
|
169
|
-
tag:
|
|
170
|
-
unreservedAmount:
|
|
171
|
-
sharesAvailable:
|
|
172
|
-
clickReadMore:
|
|
173
|
+
tag: y,
|
|
174
|
+
unreservedAmount: C,
|
|
175
|
+
sharesAvailable: O,
|
|
176
|
+
clickReadMore: M
|
|
173
177
|
};
|
|
174
178
|
},
|
|
175
179
|
computed: {
|
|
@@ -194,7 +198,7 @@ const no = a`
|
|
|
194
198
|
amountLent() {
|
|
195
199
|
var e, t;
|
|
196
200
|
const o = ((t = (e = this.loan) == null ? void 0 : e.loanFundraisingInfo) == null ? void 0 : t.fundedAmount) ?? 0;
|
|
197
|
-
return
|
|
201
|
+
return R(o).format("$0,0");
|
|
198
202
|
},
|
|
199
203
|
isFunded() {
|
|
200
204
|
var o;
|
package/dist/vue/KvLoanTag.js
CHANGED
|
@@ -1,23 +1,44 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { KV_LOAN_TAG_FRAGMENT as
|
|
3
|
-
import { resolveComponent as
|
|
4
|
-
import
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
import u from "./KvLoanTag2.js";
|
|
2
|
+
import { KV_LOAN_TAG_FRAGMENT as O } from "./KvLoanTag2.js";
|
|
3
|
+
import { resolveComponent as c, openBlock as e, createElementBlock as a, normalizeClass as _, normalizeStyle as g, Fragment as o, createTextVNode as i, toDisplayString as n, createElementVNode as h, createVNode as x, withCtx as f, renderList as k, createBlock as w, createCommentVNode as m } from "vue";
|
|
4
|
+
import p from "../_virtual/_plugin-vue_export-helper.js";
|
|
5
|
+
const y = ["id"];
|
|
6
|
+
function v(M, T, l, N, C, t) {
|
|
7
|
+
const d = c("kv-tooltip"), s = c("kv-countdown-timer");
|
|
8
|
+
return t.variation ? (e(), a("div", {
|
|
8
9
|
key: 0,
|
|
9
|
-
class: "tw-text-small tw-font-medium tw-pt-0.5 tw-line-clamp-1",
|
|
10
|
-
style:
|
|
10
|
+
class: _(["tw-text-small tw-font-medium tw-pt-0.5", { "tw-line-clamp-1": !t.isMultipleMatch }]),
|
|
11
|
+
style: g({ color: t.tagColor })
|
|
11
12
|
}, [
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
13
|
+
t.isMultipleMatch ? (e(), a(o, { key: 0 }, [
|
|
14
|
+
i(n(t.totalMatchRatio) + "x match by ", 1),
|
|
15
|
+
h("span", {
|
|
16
|
+
id: `matching-orgs-${l.loan.id}`,
|
|
17
|
+
class: "tw-underline tw-decoration-dotted tw-cursor-pointer"
|
|
18
|
+
}, n(t.multiMatchingOrgs.length) + " organizations", 9, y),
|
|
19
|
+
x(d, {
|
|
20
|
+
controller: `matching-orgs-${l.loan.id}`,
|
|
21
|
+
theme: "default"
|
|
22
|
+
}, {
|
|
23
|
+
default: f(() => [
|
|
24
|
+
(e(!0), a(o, null, k(t.multiMatchingOrgs, (r) => (e(), a("p", {
|
|
25
|
+
key: r.matchingText,
|
|
26
|
+
class: "tw-m-0"
|
|
27
|
+
}, n(r.matchRatio + 1) + "x matching by " + n(r.matchingText), 1))), 128))
|
|
28
|
+
]),
|
|
29
|
+
_: 1
|
|
30
|
+
}, 8, ["controller"])
|
|
31
|
+
], 64)) : (e(), a(o, { key: 1 }, [
|
|
32
|
+
i(n(t.tagText) + " ", 1),
|
|
33
|
+
t.variation === "ending-soon" ? (e(), w(s, {
|
|
34
|
+
key: 0,
|
|
35
|
+
deadline: t.deadline
|
|
36
|
+
}, null, 8, ["deadline"])) : m("", !0)
|
|
37
|
+
], 64))
|
|
38
|
+
], 6)) : m("", !0);
|
|
18
39
|
}
|
|
19
|
-
const
|
|
40
|
+
const B = /* @__PURE__ */ p(u, [["render", v]]);
|
|
20
41
|
export {
|
|
21
|
-
|
|
22
|
-
|
|
42
|
+
O as KV_LOAN_TAG_FRAGMENT,
|
|
43
|
+
B as default
|
|
23
44
|
};
|
|
@@ -8,10 +8,17 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
8
8
|
type: BooleanConstructor;
|
|
9
9
|
default: boolean;
|
|
10
10
|
};
|
|
11
|
+
enableMultiMatching: {
|
|
12
|
+
type: BooleanConstructor;
|
|
13
|
+
default: boolean;
|
|
14
|
+
};
|
|
11
15
|
}>, {}, {}, {
|
|
12
16
|
deadline(): Date;
|
|
13
17
|
isLseLoan(): any;
|
|
14
18
|
amountLeft(): any;
|
|
19
|
+
multiMatchingOrgs(): any;
|
|
20
|
+
isMultipleMatch(): boolean;
|
|
21
|
+
totalMatchRatio(): any;
|
|
15
22
|
variation(): string;
|
|
16
23
|
tagText(): string;
|
|
17
24
|
tagColor(): "#AF741C" | "#CE2626" | "#2B7C5F" | "#CE4A00";
|
|
@@ -25,8 +32,13 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
25
32
|
type: BooleanConstructor;
|
|
26
33
|
default: boolean;
|
|
27
34
|
};
|
|
35
|
+
enableMultiMatching: {
|
|
36
|
+
type: BooleanConstructor;
|
|
37
|
+
default: boolean;
|
|
38
|
+
};
|
|
28
39
|
}>> & Readonly<{}>, {
|
|
29
40
|
useExpandedStyles: boolean;
|
|
41
|
+
enableMultiMatching: boolean;
|
|
30
42
|
}, {}, {
|
|
31
43
|
KvCountdownTimer: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
32
44
|
deadline: {
|
|
@@ -42,5 +54,6 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
42
54
|
required: true;
|
|
43
55
|
};
|
|
44
56
|
}>> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
57
|
+
KvTooltip: import('vue').DefineSetupFnComponent<Record<string, any>, {}, {}, Record<string, any> & {}, import('vue').PublicProps>;
|
|
45
58
|
}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
46
59
|
export default _default;
|