@kiva/kv-components 6.63.0 → 6.64.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.
|
@@ -1 +1 @@
|
|
|
1
|
-
.loan-card-use[data-v-
|
|
1
|
+
.loan-card-use[data-v-92c9b884]:hover,.loan-card-use[data-v-92c9b884]: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-92c9b884]{text-decoration-line:underline}.loan-card-progress[data-v-92c9b884]:hover,.loan-card-progress[data-v-92c9b884]:focus{text-decoration-line:none}.loan-card-use-text[data-v-92c9b884] p{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:4;line-clamp:4;overflow:hidden;text-overflow:ellipsis}.loan-card-cta[data-v-92c9b884] form,.loan-card-cta[data-v-92c9b884] fieldset,.loan-card-cta[data-v-92c9b884] .tw-w-full,.loan-card-cta[data-v-92c9b884] button{height:40px!important;max-height:40px!important;display:flex!important;align-items:center!important;justify-content:center!important}.loan-card-cta[data-v-92c9b884] .tw-inline-flex{height:40px!important;max-height:40px!important;min-height:40px!important}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import B from "graphql-tag";
|
|
2
2
|
import E from "numeral";
|
|
3
3
|
import { mdiMapMarker as O, mdiHome as D } from "@mdi/js";
|
|
4
4
|
import { LOAN_CALLOUTS_FRAGMENT as S, LOAN_GEOCODE_FRAGMENT as G, LOAN_PROGRESS_FRAGMENT as V, loanCardComputedProperties as U, loanCardMethods as I } from "../utils/loanCard.js";
|
|
@@ -12,10 +12,10 @@ import $, { KV_LOAN_TAG_FRAGMENT as ee } from "./KvLoanTag.js";
|
|
|
12
12
|
import te from "./KvMaterialIcon.js";
|
|
13
13
|
import oe from "./KvLoadingPlaceholder.js";
|
|
14
14
|
import ae from "./KvLoanTeamPick.js";
|
|
15
|
-
import { resolveComponent as
|
|
15
|
+
import { resolveComponent as d, openBlock as n, createElementBlock as m, createElementVNode as r, createBlock as s, resolveDynamicComponent as u, withCtx as f, createVNode as c, createCommentVNode as L, Fragment as b, renderList as ne, normalizeClass as x } from "vue";
|
|
16
16
|
import "./KvCompactLoanCard.css";
|
|
17
17
|
import le from "../_virtual/_plugin-vue_export-helper.js";
|
|
18
|
-
const Oe =
|
|
18
|
+
const Oe = B`
|
|
19
19
|
fragment KvCompactLoanCard on LoanBasic {
|
|
20
20
|
id
|
|
21
21
|
image {
|
|
@@ -43,7 +43,7 @@ const Oe = p`
|
|
|
43
43
|
${S}
|
|
44
44
|
${G}
|
|
45
45
|
${V}
|
|
46
|
-
`, De =
|
|
46
|
+
`, De = B`
|
|
47
47
|
fragment KvCompactLoanCardUser on LoanBasic {
|
|
48
48
|
id
|
|
49
49
|
...KvLendCtaUser
|
|
@@ -175,51 +175,51 @@ const Oe = p`
|
|
|
175
175
|
const {
|
|
176
176
|
allDataLoaded: t,
|
|
177
177
|
borrowerName: e,
|
|
178
|
-
city:
|
|
179
|
-
countryName:
|
|
180
|
-
distributionModel:
|
|
181
|
-
formattedLocation:
|
|
182
|
-
fundraisingPercent:
|
|
183
|
-
hasProgressData:
|
|
184
|
-
imageHash:
|
|
185
|
-
isLoading:
|
|
186
|
-
loanAmount:
|
|
178
|
+
city: C,
|
|
179
|
+
countryName: A,
|
|
180
|
+
distributionModel: w,
|
|
181
|
+
formattedLocation: g,
|
|
182
|
+
fundraisingPercent: i,
|
|
183
|
+
hasProgressData: h,
|
|
184
|
+
imageHash: v,
|
|
185
|
+
isLoading: k,
|
|
186
|
+
loanAmount: _,
|
|
187
187
|
loanBorrowerCount: a,
|
|
188
|
-
loanCallouts:
|
|
189
|
-
loanStatus:
|
|
188
|
+
loanCallouts: y,
|
|
189
|
+
loanStatus: M,
|
|
190
190
|
loanUse: N,
|
|
191
191
|
readMorePath: T,
|
|
192
|
-
state:
|
|
193
|
-
tag:
|
|
194
|
-
unreservedAmount:
|
|
195
|
-
sharesAvailable:
|
|
192
|
+
state: P,
|
|
193
|
+
tag: p,
|
|
194
|
+
unreservedAmount: K,
|
|
195
|
+
sharesAvailable: R
|
|
196
196
|
} = U(l), {
|
|
197
|
-
clickReadMore:
|
|
197
|
+
clickReadMore: F
|
|
198
198
|
} = I(l, o);
|
|
199
199
|
return {
|
|
200
200
|
allDataLoaded: t,
|
|
201
201
|
borrowerName: e,
|
|
202
|
-
city:
|
|
203
|
-
countryName:
|
|
204
|
-
distributionModel:
|
|
205
|
-
formattedLocation:
|
|
206
|
-
fundraisingPercent:
|
|
207
|
-
hasProgressData:
|
|
208
|
-
imageHash:
|
|
209
|
-
isLoading:
|
|
210
|
-
loanAmount:
|
|
202
|
+
city: C,
|
|
203
|
+
countryName: A,
|
|
204
|
+
distributionModel: w,
|
|
205
|
+
formattedLocation: g,
|
|
206
|
+
fundraisingPercent: i,
|
|
207
|
+
hasProgressData: h,
|
|
208
|
+
imageHash: v,
|
|
209
|
+
isLoading: k,
|
|
210
|
+
loanAmount: _,
|
|
211
211
|
loanBorrowerCount: a,
|
|
212
|
-
loanCallouts:
|
|
213
|
-
loanStatus:
|
|
212
|
+
loanCallouts: y,
|
|
213
|
+
loanStatus: M,
|
|
214
214
|
loanUse: N,
|
|
215
215
|
mdiMapMarker: O,
|
|
216
216
|
mdiHome: D,
|
|
217
217
|
readMorePath: T,
|
|
218
|
-
state:
|
|
219
|
-
tag:
|
|
220
|
-
unreservedAmount:
|
|
221
|
-
sharesAvailable:
|
|
222
|
-
clickReadMore:
|
|
218
|
+
state: P,
|
|
219
|
+
tag: p,
|
|
220
|
+
unreservedAmount: K,
|
|
221
|
+
sharesAvailable: R,
|
|
222
|
+
clickReadMore: F
|
|
223
223
|
};
|
|
224
224
|
},
|
|
225
225
|
computed: {
|
|
@@ -233,7 +233,7 @@ const Oe = p`
|
|
|
233
233
|
return E(l).format("$0,0");
|
|
234
234
|
}
|
|
235
235
|
}
|
|
236
|
-
}, se = { class: "tw-flex tw-flex-col tw-items-start tw-gap-3 tw-w-full" }, ie = { class: "tw-flex tw-items-start tw-gap-3 tw-w-full" }, de = { class: "tw-flex tw-flex-col tw-items-start tw-justify-between tw-p-1 tw-bg-white tw-rounded-md tw-shadow-lg tw-w-80" }, me = { class: "tw-flex tw-flex-col tw-items-start tw-w-full" },
|
|
236
|
+
}, se = { class: "tw-flex tw-flex-col tw-items-start tw-gap-3 tw-w-full" }, ie = { class: "tw-flex tw-items-start tw-gap-3 tw-w-full" }, de = { class: "tw-flex tw-flex-col tw-items-start tw-justify-between tw-p-1 tw-bg-white tw-rounded-md tw-shadow-lg tw-w-80" }, me = { class: "tw-flex tw-flex-col tw-items-start tw-w-full" }, ce = { class: "tw-flex tw-items-start tw-gap-2 tw-w-full loan-card-active-hover" }, ue = { class: "tw-flex-shrink-0 tw-overflow-hidden" }, fe = {
|
|
237
237
|
class: "tw-flex tw-flex-col tw-items-start tw-gap-1 tw-flex-1",
|
|
238
238
|
style: { height: "7.25rem" }
|
|
239
239
|
}, we = {
|
|
@@ -244,87 +244,109 @@ const Oe = p`
|
|
|
244
244
|
key: 1,
|
|
245
245
|
class: "loan-card-use-text tw-w-full tw-overflow-hidden"
|
|
246
246
|
}, he = { class: "tw-flex-1" }, ve = { class: "tw-flex-1 tw-min-w-0" };
|
|
247
|
-
function
|
|
248
|
-
const
|
|
249
|
-
return n(),
|
|
247
|
+
function ke(l, o, t, e, C, A) {
|
|
248
|
+
const w = d("kv-borrower-image"), g = d("kv-loan-tag"), i = d("kv-loading-placeholder"), h = d("kv-loan-use"), v = d("kv-loan-callouts"), k = d("kv-loan-progress-group"), _ = d("kv-lend-cta");
|
|
249
|
+
return n(), m("div", se, [
|
|
250
250
|
r("div", ie, [
|
|
251
251
|
r("div", de, [
|
|
252
252
|
r("div", me, [
|
|
253
|
-
r("div",
|
|
254
|
-
r("div",
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
"
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
253
|
+
r("div", ce, [
|
|
254
|
+
r("div", ue, [
|
|
255
|
+
(n(), s(u(e.tag), {
|
|
256
|
+
to: e.readMorePath,
|
|
257
|
+
href: e.readMorePath,
|
|
258
|
+
class: "tw-flex",
|
|
259
|
+
"aria-label": "Borrower image",
|
|
260
|
+
onClick: o[0] || (o[0] = (a) => e.clickReadMore("Photo", a))
|
|
261
|
+
}, {
|
|
262
|
+
default: f(() => [
|
|
263
|
+
c(w, {
|
|
264
|
+
class: "tw-bg-gray-300 tw-rounded-md tw-object-cover",
|
|
265
|
+
style: { width: "100px", height: "100px" },
|
|
266
|
+
alt: `Photo of ${e.borrowerName}`,
|
|
267
|
+
"aspect-ratio": 1,
|
|
268
|
+
"default-image": { width: 200, faceZoom: 50 },
|
|
269
|
+
hash: e.imageHash,
|
|
270
|
+
images: [{ width: 200, faceZoom: 50 }],
|
|
271
|
+
"photo-path": t.photoPath
|
|
272
|
+
}, null, 8, ["alt", "hash", "photo-path"])
|
|
273
|
+
]),
|
|
274
|
+
_: 1
|
|
275
|
+
}, 8, ["to", "href"]))
|
|
265
276
|
]),
|
|
266
277
|
r("div", fe, [
|
|
267
|
-
(n(), u(
|
|
278
|
+
(n(), s(u(e.tag), {
|
|
268
279
|
to: e.readMorePath,
|
|
269
280
|
href: e.readMorePath,
|
|
270
281
|
class: "tw-flex tw-no-underline hover:tw-no-underline focus:tw-no-underline -tw-mt-1",
|
|
271
282
|
"aria-label": "Loan tag",
|
|
272
|
-
onClick: o[
|
|
283
|
+
onClick: o[1] || (o[1] = (a) => e.clickReadMore("Tag", a))
|
|
273
284
|
}, {
|
|
274
|
-
default:
|
|
275
|
-
t.showTags && !e.isLoading ? (n(),
|
|
285
|
+
default: f(() => [
|
|
286
|
+
t.showTags && !e.isLoading ? (n(), s(g, {
|
|
276
287
|
key: 0,
|
|
277
288
|
loan: t.loan
|
|
278
|
-
}, null, 8, ["loan"])) :
|
|
289
|
+
}, null, 8, ["loan"])) : L("", !0)
|
|
279
290
|
]),
|
|
280
291
|
_: 1
|
|
281
292
|
}, 8, ["to", "href"])),
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
293
|
+
(n(), s(u(e.tag), {
|
|
294
|
+
to: e.readMorePath,
|
|
295
|
+
href: e.readMorePath,
|
|
296
|
+
class: "loan-card-use tw-no-underline tw-text-primary",
|
|
297
|
+
"aria-label": "Loan use",
|
|
298
|
+
onClick: o[2] || (o[2] = (a) => e.clickReadMore("Use", a))
|
|
299
|
+
}, {
|
|
300
|
+
default: f(() => [
|
|
301
|
+
e.isLoading ? (n(), m("div", we, [
|
|
302
|
+
(n(!0), m(b, null, ne([...Array(4)], (a, y) => (n(), m("div", {
|
|
303
|
+
key: y,
|
|
304
|
+
class: "tw-h-2 tw-mb-1"
|
|
305
|
+
}, [
|
|
306
|
+
c(i)
|
|
307
|
+
]))), 128))
|
|
308
|
+
])) : (n(), m("div", ge, [
|
|
309
|
+
c(h, {
|
|
310
|
+
use: e.loanUse,
|
|
311
|
+
"loan-amount": e.loanAmount,
|
|
312
|
+
status: e.loanStatus,
|
|
313
|
+
"borrower-count": e.loanBorrowerCount,
|
|
314
|
+
name: e.borrowerName,
|
|
315
|
+
"distribution-model": e.distributionModel,
|
|
316
|
+
class: "tw-text-small tw-leading-tight"
|
|
317
|
+
}, null, 8, ["use", "loan-amount", "status", "borrower-count", "name", "distribution-model"])
|
|
318
|
+
]))
|
|
319
|
+
]),
|
|
320
|
+
_: 1
|
|
321
|
+
}, 8, ["to", "href"]))
|
|
300
322
|
])
|
|
301
323
|
]),
|
|
302
|
-
e.isLoading || typeof e.loanCallouts > "u" ? (n(),
|
|
324
|
+
e.isLoading || typeof e.loanCallouts > "u" ? (n(), s(i, {
|
|
303
325
|
key: 0,
|
|
304
326
|
class: "tw-mt-1.5 tw-mb-1 tw-rounded-full",
|
|
305
327
|
style: { width: "60%", height: "1.5rem" }
|
|
306
|
-
})) : (n(),
|
|
328
|
+
})) : (n(), s(v, {
|
|
307
329
|
key: 1,
|
|
308
330
|
callouts: e.loanCallouts,
|
|
309
331
|
class: "tw-mt-1.5",
|
|
310
|
-
onClick: o[
|
|
332
|
+
onClick: o[3] || (o[3] = (a) => l.$emit("jump-filter-page", a))
|
|
311
333
|
}, null, 8, ["callouts"]))
|
|
312
334
|
]),
|
|
313
335
|
r("div", {
|
|
314
336
|
class: x(["tw-flex tw-items-end tw-w-full tw-mt-1", { "tw-gap-2": e.sharesAvailable }])
|
|
315
337
|
}, [
|
|
316
|
-
e.hasProgressData ? (n(),
|
|
338
|
+
e.hasProgressData ? (n(), m(b, { key: 1 }, [
|
|
317
339
|
r("div", ve, [
|
|
318
|
-
e.sharesAvailable ? (n(), u(
|
|
340
|
+
e.sharesAvailable ? (n(), s(u(e.tag), {
|
|
319
341
|
key: 0,
|
|
320
342
|
to: e.readMorePath,
|
|
321
343
|
href: e.readMorePath,
|
|
322
344
|
class: "loan-card-progress tw-no-underline tw-block",
|
|
323
345
|
"aria-label": "Loan progress",
|
|
324
|
-
onClick: o[
|
|
346
|
+
onClick: o[4] || (o[4] = (a) => e.clickReadMore("Progress", a))
|
|
325
347
|
}, {
|
|
326
|
-
default:
|
|
327
|
-
|
|
348
|
+
default: f(() => [
|
|
349
|
+
c(k, {
|
|
328
350
|
id: "loanProgress",
|
|
329
351
|
"money-left": e.unreservedAmount,
|
|
330
352
|
"progress-percent": e.fundraisingPercent,
|
|
@@ -332,13 +354,13 @@ function _e(l, o, t, e, L, b) {
|
|
|
332
354
|
}, null, 8, ["money-left", "progress-percent"])
|
|
333
355
|
]),
|
|
334
356
|
_: 1
|
|
335
|
-
}, 8, ["to", "href"])) :
|
|
357
|
+
}, 8, ["to", "href"])) : L("", !0)
|
|
336
358
|
]),
|
|
337
359
|
r("div", {
|
|
338
360
|
class: x(["tw-flex-shrink-0 loan-card-cta", { "tw-w-full": !e.sharesAvailable }]),
|
|
339
361
|
style: { height: "40px" }
|
|
340
362
|
}, [
|
|
341
|
-
|
|
363
|
+
c(_, {
|
|
342
364
|
loan: t.loan,
|
|
343
365
|
"unreserved-amount": e.unreservedAmount,
|
|
344
366
|
"basket-items": t.basketItems,
|
|
@@ -358,23 +380,23 @@ function _e(l, o, t, e, L, b) {
|
|
|
358
380
|
"primary-button-text": t.primaryButtonText,
|
|
359
381
|
"secondary-button-text": t.secondaryButtonText,
|
|
360
382
|
"secondary-button-handler": t.secondaryButtonHandler,
|
|
361
|
-
onAddToBasket: o[
|
|
362
|
-
onShowLoanDetails: o[
|
|
363
|
-
onRemoveFromBasket: o[
|
|
383
|
+
onAddToBasket: o[5] || (o[5] = (a) => l.$emit("add-to-basket", a)),
|
|
384
|
+
onShowLoanDetails: o[6] || (o[6] = (a) => e.clickReadMore("ViewLoan", a)),
|
|
385
|
+
onRemoveFromBasket: o[7] || (o[7] = (a) => l.$emit("remove-from-basket", a))
|
|
364
386
|
}, 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"])
|
|
365
387
|
], 2)
|
|
366
|
-
], 64)) : (n(),
|
|
388
|
+
], 64)) : (n(), m(b, { key: 0 }, [
|
|
367
389
|
r("div", he, [
|
|
368
|
-
|
|
390
|
+
c(i, {
|
|
369
391
|
class: "tw-mb-0.5",
|
|
370
392
|
style: { width: "11rem", height: "1rem" }
|
|
371
393
|
}),
|
|
372
|
-
|
|
394
|
+
c(i, {
|
|
373
395
|
class: "tw-rounded",
|
|
374
396
|
style: { width: "11rem", height: "0.5rem" }
|
|
375
397
|
})
|
|
376
398
|
]),
|
|
377
|
-
e.allDataLoaded ?
|
|
399
|
+
e.allDataLoaded ? L("", !0) : (n(), s(i, {
|
|
378
400
|
key: 0,
|
|
379
401
|
class: "tw-rounded tw-flex-shrink-0",
|
|
380
402
|
style: { width: "8rem", height: "2.5rem" }
|
|
@@ -385,7 +407,7 @@ function _e(l, o, t, e, L, b) {
|
|
|
385
407
|
])
|
|
386
408
|
]);
|
|
387
409
|
}
|
|
388
|
-
const Se = /* @__PURE__ */ le(re, [["render",
|
|
410
|
+
const Se = /* @__PURE__ */ le(re, [["render", ke], ["__scopeId", "data-v-92c9b884"]]);
|
|
389
411
|
export {
|
|
390
412
|
Oe as KV_COMPACT_LOAN_CARD_FRAGMENT,
|
|
391
413
|
De as KV_COMPACT_LOAN_CARD_USER_FRAGMENT,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kiva/kv-components",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.64.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -114,5 +114,5 @@
|
|
|
114
114
|
"embla-carousel-fade",
|
|
115
115
|
"popper.js"
|
|
116
116
|
],
|
|
117
|
-
"gitHead": "
|
|
117
|
+
"gitHead": "00c839f41376d29da8b7675e9b6bfa32f040e056"
|
|
118
118
|
}
|