@kiva/kv-components 8.13.0 → 8.13.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.
|
@@ -1 +1 @@
|
|
|
1
|
-
.loan-card-use[data-v-
|
|
1
|
+
.loan-card-use[data-v-02c91111]:hover,.loan-card-use[data-v-02c91111]: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-02c91111]{text-decoration-line:underline}.loan-card-progress[data-v-02c91111]:hover,.loan-card-progress[data-v-02c91111]:focus{text-decoration-line:none}.loan-card-use-text[data-v-02c91111] 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-02c91111] form,.loan-card-cta[data-v-02c91111] fieldset,.loan-card-cta[data-v-02c91111] .tw-w-full,.loan-card-cta[data-v-02c91111] button{height:40px!important;max-height:40px!important;display:flex!important;align-items:center!important;justify-content:center!important}.loan-card-cta[data-v-02c91111] .tw-inline-flex{height:40px!important;max-height:40px!important;min-height:40px!important}[data-v-02c91111] .amount-dropdown select{height:2.25rem;--tw-border-opacity: 1;border-color:rgb(245 245 245 / var(--tw-border-opacity, 1));padding-left:.5rem}[data-v-02c91111] .goal-variant-callouts span{font-weight:500}.goal-variant-progress-group[data-v-02c91111] div[role=progressbar]{background-color:#d9d9d9}
|
|
@@ -1,42 +1,42 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { KV_COMPACT_LOAN_CARD_FRAGMENT as
|
|
3
|
-
import { resolveComponent as w, openBlock as
|
|
1
|
+
import B from "./KvCompactLoanCard2.js";
|
|
2
|
+
import { KV_COMPACT_LOAN_CARD_FRAGMENT as oe, KV_COMPACT_LOAN_CARD_USER_FRAGMENT as le } from "./KvCompactLoanCard2.js";
|
|
3
|
+
import { resolveComponent as w, openBlock as n, createElementBlock as l, normalizeClass as s, createVNode as i, createCommentVNode as m, createElementVNode as r, normalizeStyle as b, createBlock as d, resolveDynamicComponent as k, withCtx as f, toDisplayString as c, withModifiers as R, Fragment as u, renderList as v } from "vue";
|
|
4
4
|
import "./KvCompactLoanCard.css";
|
|
5
|
-
import
|
|
6
|
-
const
|
|
5
|
+
import G from "../_virtual/_plugin-vue_export-helper.js";
|
|
6
|
+
const S = ["aria-busy"], D = { class: "tw-flex tw-flex-col tw-items-start tw-w-full" }, U = {
|
|
7
7
|
key: 1,
|
|
8
8
|
class: "tw-flex-shrink-0 tw-overflow-hidden"
|
|
9
|
-
},
|
|
9
|
+
}, W = {
|
|
10
10
|
key: 0,
|
|
11
11
|
class: "tw-mb-0.5 tw-w-full"
|
|
12
|
-
},
|
|
12
|
+
}, E = { class: "tw-text-primary !tw-font-medium tw-text-base tw-leading-normal tw-truncate" }, F = ["href"], I = { class: "tw-truncate" }, O = ["title"], j = { class: "tw-font-medium" }, K = {
|
|
13
13
|
key: 0,
|
|
14
14
|
class: "loan-card-use-text tw-w-full tw-overflow-hidden"
|
|
15
|
-
},
|
|
15
|
+
}, z = { class: "tw-flex-1 tw-min-w-0 tw-mr-1" }, H = {
|
|
16
16
|
class: "tw-flex-1 tw-min-w-0",
|
|
17
17
|
style: { "max-width": "6.5rem" }
|
|
18
|
-
},
|
|
19
|
-
function Q(
|
|
18
|
+
}, Z = ["value"], q = { class: "tw-flex-1 tw-min-w-0" }, J = { class: "tw-p-1 tw-rounded-l-sm tw-border tw-border-gray-100 tw-border-r-0" };
|
|
19
|
+
function Q(g, o, t, e, X, L) {
|
|
20
20
|
var x;
|
|
21
|
-
const y = w("kv-material-icon"), h = w("kv-loading-placeholder"),
|
|
22
|
-
return
|
|
21
|
+
const y = w("kv-material-icon"), h = w("kv-loading-placeholder"), P = w("kv-borrower-image"), C = w("kv-loan-tag"), V = w("kv-loan-use"), N = w("kv-loan-callouts"), _ = w("kv-loan-progress-group"), A = w("kv-select"), M = w("kv-lend-cta");
|
|
22
|
+
return n(), l("div", {
|
|
23
23
|
class: s(["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-full", {
|
|
24
24
|
"tw-relative": t.showRefreshButton,
|
|
25
25
|
"!tw-p-1.5": t.showLightView || e.isPostGoalVariant
|
|
26
26
|
}]),
|
|
27
27
|
"aria-busy": e.isLoading ? "true" : "false"
|
|
28
28
|
}, [
|
|
29
|
-
t.showRefreshButton ? (
|
|
29
|
+
t.showRefreshButton ? (n(), l("button", {
|
|
30
30
|
key: 0,
|
|
31
31
|
class: "tw-absolute tw--top-1 tw--right-1 tw-bg-white tw-rounded-full tw-w-2.5 tw-h-2.5 tw-flex tw-items-center tw-justify-center tw-cursor-pointer tw-drop-shadow-sm",
|
|
32
|
-
onClick:
|
|
32
|
+
onClick: o[0] || (o[0] = (...a) => e.handleRefreshButton && e.handleRefreshButton(...a))
|
|
33
33
|
}, [
|
|
34
34
|
i(y, {
|
|
35
35
|
icon: e.mdiCached,
|
|
36
36
|
class: "tw-w-2.5 tw-h-2.5 tw--scale-x-100 tw-text-gray-500"
|
|
37
37
|
}, null, 8, ["icon"])
|
|
38
38
|
])) : m("", !0),
|
|
39
|
-
r("div",
|
|
39
|
+
r("div", D, [
|
|
40
40
|
r("div", {
|
|
41
41
|
class: s(["tw-flex tw-items-start tw-gap-2 tw-w-full loan-card-active-hover", {
|
|
42
42
|
"!tw-gap-1": t.showLightView,
|
|
@@ -44,7 +44,7 @@ function Q(k, n, t, e, X, Y) {
|
|
|
44
44
|
}]),
|
|
45
45
|
style: b(e.customStyle)
|
|
46
46
|
}, [
|
|
47
|
-
e.isLoading ? (
|
|
47
|
+
e.isLoading ? (n(), d(h, {
|
|
48
48
|
key: 0,
|
|
49
49
|
"aria-hidden": "true",
|
|
50
50
|
class: s({
|
|
@@ -52,18 +52,18 @@ function Q(k, n, t, e, X, Y) {
|
|
|
52
52
|
"!tw-w-7.5 !tw-h-7.5 md:!tw-w-12.5 md:!tw-h-12.5": e.isPostGoalVariant
|
|
53
53
|
}),
|
|
54
54
|
style: b(e.borrowerImageStyle)
|
|
55
|
-
}, null, 8, ["class", "style"])) : (
|
|
56
|
-
(
|
|
55
|
+
}, null, 8, ["class", "style"])) : (n(), l("div", U, [
|
|
56
|
+
(n(), d(k(e.tag), {
|
|
57
57
|
to: e.readMorePath,
|
|
58
58
|
href: e.readMorePath,
|
|
59
59
|
target: t.externalLinksNewTab ? "_blank" : void 0,
|
|
60
60
|
rel: t.externalLinksNewTab ? "noopener noreferrer" : void 0,
|
|
61
61
|
class: "tw-flex",
|
|
62
62
|
"aria-label": "Borrower image",
|
|
63
|
-
onClick:
|
|
63
|
+
onClick: o[1] || (o[1] = (a) => e.clickReadMore("Photo", a))
|
|
64
64
|
}, {
|
|
65
65
|
default: f(() => [
|
|
66
|
-
i(
|
|
66
|
+
i(P, {
|
|
67
67
|
class: s(["tw-bg-gray-300 tw-rounded-sm tw-object-cover tw-bg-clip-content", {
|
|
68
68
|
"!tw-w-7.5 !tw-h-7.5": t.showLightView,
|
|
69
69
|
"!tw-w-7.5 !tw-h-7.5 md:!tw-w-12.5 md:!tw-h-12.5": e.isPostGoalVariant
|
|
@@ -83,36 +83,36 @@ function Q(k, n, t, e, X, Y) {
|
|
|
83
83
|
r("div", {
|
|
84
84
|
class: s(["tw-flex tw-flex-col tw-items-start tw-gap-1 tw-flex-1 tw-min-w-0", { "!tw-gap-0": e.isPostGoalVariant }])
|
|
85
85
|
}, [
|
|
86
|
-
t.businessName ? (
|
|
87
|
-
(
|
|
86
|
+
t.businessName ? (n(), l("div", W, [
|
|
87
|
+
(n(), d(k(e.tag), {
|
|
88
88
|
to: e.readMorePath,
|
|
89
89
|
href: e.readMorePath,
|
|
90
90
|
target: t.externalLinksNewTab ? "_blank" : void 0,
|
|
91
91
|
rel: t.externalLinksNewTab ? "noopener noreferrer" : void 0,
|
|
92
92
|
class: "tw-no-underline hover:tw-underline focus:tw-no-underline",
|
|
93
93
|
"aria-label": "Business name",
|
|
94
|
-
onClick:
|
|
94
|
+
onClick: o[2] || (o[2] = (a) => e.clickReadMore("Business", a))
|
|
95
95
|
}, {
|
|
96
96
|
default: f(() => [
|
|
97
|
-
r("h3",
|
|
97
|
+
r("h3", E, c(t.businessName), 1)
|
|
98
98
|
]),
|
|
99
99
|
_: 1
|
|
100
100
|
}, 8, ["to", "href", "target", "rel"])),
|
|
101
|
-
t.website ? (
|
|
101
|
+
t.website ? (n(), l("a", {
|
|
102
102
|
key: 0,
|
|
103
103
|
href: e.formattedWebsite,
|
|
104
104
|
target: "_blank",
|
|
105
105
|
class: "tw-flex tw-items-center tw-gap-0.5 tw-text-secondary tw-text-small tw-font-light tw-leading-normal tw-no-underline hover:tw-underline",
|
|
106
|
-
onClick:
|
|
106
|
+
onClick: o[3] || (o[3] = R((...a) => e.trackWebsiteClick && e.trackWebsiteClick(...a), ["stop"]))
|
|
107
107
|
}, [
|
|
108
108
|
i(y, {
|
|
109
109
|
icon: e.mdiLink,
|
|
110
110
|
class: "tw-w-2 tw-h-2"
|
|
111
111
|
}, null, 8, ["icon"]),
|
|
112
|
-
r("span",
|
|
113
|
-
], 8,
|
|
112
|
+
r("span", I, c(t.website), 1)
|
|
113
|
+
], 8, F)) : m("", !0)
|
|
114
114
|
])) : m("", !0),
|
|
115
|
-
e.isLoading ? m("", !0) : (
|
|
115
|
+
e.isLoading ? m("", !0) : (n(), d(k(e.tag), {
|
|
116
116
|
key: 1,
|
|
117
117
|
to: e.readMorePath,
|
|
118
118
|
href: e.readMorePath,
|
|
@@ -120,10 +120,10 @@ function Q(k, n, t, e, X, Y) {
|
|
|
120
120
|
rel: t.externalLinksNewTab ? "noopener noreferrer" : void 0,
|
|
121
121
|
class: "tw-flex tw-no-underline hover:tw-no-underline focus:tw-no-underline -tw-mt-1",
|
|
122
122
|
"aria-label": "Loan tag",
|
|
123
|
-
onClick:
|
|
123
|
+
onClick: o[4] || (o[4] = (a) => e.clickReadMore("Tag", a))
|
|
124
124
|
}, {
|
|
125
125
|
default: f(() => [
|
|
126
|
-
t.showTags ? (
|
|
126
|
+
t.showTags ? (n(), d(C, {
|
|
127
127
|
key: 0,
|
|
128
128
|
class: s({
|
|
129
129
|
"tw-mb-1 !tw-font-medium": e.isPostGoalVariant
|
|
@@ -133,11 +133,11 @@ function Q(k, n, t, e, X, Y) {
|
|
|
133
133
|
]),
|
|
134
134
|
_: 1
|
|
135
135
|
}, 8, ["to", "href", "target", "rel"])),
|
|
136
|
-
e.isPostGoalVariant ? (
|
|
137
|
-
e.isLoading ? (
|
|
136
|
+
e.isPostGoalVariant ? (n(), l(u, { key: 2 }, [
|
|
137
|
+
e.isLoading ? (n(), l(u, { key: 0 }, v(4, (a) => i(h, {
|
|
138
138
|
key: a,
|
|
139
139
|
class: "tw-mb-0.5 md:!tw-mb-1.5 !tw-w-full !tw-h-1.5 md:!tw-h-2"
|
|
140
|
-
})), 64)) : (
|
|
140
|
+
})), 64)) : (n(), l("p", {
|
|
141
141
|
key: 1,
|
|
142
142
|
class: "tw-text-small tw-mb-0 tw-leading-normal",
|
|
143
143
|
style: { "line-height": "150%" },
|
|
@@ -149,7 +149,7 @@ function Q(k, n, t, e, X, Y) {
|
|
|
149
149
|
r("span", null, c(e.loanUsePrefixEnd), 1),
|
|
150
150
|
r("span", null, c(e.visibleUseStatement), 1)
|
|
151
151
|
], 8, O))
|
|
152
|
-
], 64)) : t.showLoanUse ? (
|
|
152
|
+
], 64)) : t.showLoanUse ? (n(), d(k(e.tag), {
|
|
153
153
|
key: 3,
|
|
154
154
|
to: e.readMorePath,
|
|
155
155
|
href: e.readMorePath,
|
|
@@ -157,21 +157,21 @@ function Q(k, n, t, e, X, Y) {
|
|
|
157
157
|
rel: t.externalLinksNewTab ? "noopener noreferrer" : void 0,
|
|
158
158
|
class: "loan-card-use tw-no-underline tw-text-primary tw-block tw-w-full",
|
|
159
159
|
"aria-label": "Loan use",
|
|
160
|
-
onClick:
|
|
160
|
+
onClick: o[5] || (o[5] = (a) => e.clickReadMore("Use", a))
|
|
161
161
|
}, {
|
|
162
162
|
default: f(() => [
|
|
163
|
-
e.isLoading ? (
|
|
164
|
-
(
|
|
165
|
-
key:
|
|
163
|
+
e.isLoading ? (n(), l("div", K, [
|
|
164
|
+
(n(!0), l(u, null, v([...Array(e.loanUseLoadingRows)], (a, T) => (n(), l("div", {
|
|
165
|
+
key: T,
|
|
166
166
|
class: "tw-h-2 tw-mb-1"
|
|
167
167
|
}, [
|
|
168
168
|
i(h)
|
|
169
169
|
]))), 128))
|
|
170
|
-
])) : (
|
|
170
|
+
])) : (n(), l("div", {
|
|
171
171
|
key: 1,
|
|
172
172
|
class: s(["loan-card-use-text tw-w-full tw-overflow-hidden", { "!tw--mt-1": t.showTags && t.loan.matchingText && t.showLightView }])
|
|
173
173
|
}, [
|
|
174
|
-
i(
|
|
174
|
+
i(V, {
|
|
175
175
|
use: e.loanUse,
|
|
176
176
|
"loan-amount": e.loanAmount,
|
|
177
177
|
status: e.loanStatus,
|
|
@@ -190,15 +190,15 @@ function Q(k, n, t, e, X, Y) {
|
|
|
190
190
|
}, 8, ["to", "href", "target", "rel"])) : m("", !0)
|
|
191
191
|
], 2)
|
|
192
192
|
], 6),
|
|
193
|
-
e.isLoading || typeof e.loanCallouts > "u" ? (
|
|
193
|
+
e.isLoading || typeof e.loanCallouts > "u" ? (n(), d(h, {
|
|
194
194
|
key: 0,
|
|
195
195
|
class: "tw-mt-1.5 tw-mb-1 tw-rounded-full",
|
|
196
196
|
style: { width: "60%", height: "1.5rem" }
|
|
197
|
-
})) : (
|
|
197
|
+
})) : (n(), d(N, {
|
|
198
198
|
key: 1,
|
|
199
199
|
callouts: e.loanCallouts,
|
|
200
200
|
class: s(["tw-mt-1.5", { "goal-variant-callouts": e.isPostGoalVariant }]),
|
|
201
|
-
onClick:
|
|
201
|
+
onClick: o[6] || (o[6] = (a) => g.$emit("jump-filter-page", a))
|
|
202
202
|
}, null, 8, ["callouts", "class"]))
|
|
203
203
|
]),
|
|
204
204
|
r("div", {
|
|
@@ -207,28 +207,28 @@ function Q(k, n, t, e, X, Y) {
|
|
|
207
207
|
"!tw-items-end !tw-gap-2": e.isPostGoalVariant
|
|
208
208
|
}])
|
|
209
209
|
}, [
|
|
210
|
-
e.hasProgressData ? e.isPostGoalVariant ? (
|
|
211
|
-
r("div",
|
|
210
|
+
e.hasProgressData ? e.isPostGoalVariant ? (n(), l(u, { key: 1 }, [
|
|
211
|
+
r("div", H, [
|
|
212
212
|
i(_, {
|
|
213
213
|
"money-left": e.unreservedAmount,
|
|
214
214
|
"progress-percent": e.fundraisingPercent,
|
|
215
215
|
class: "tw-text-black goal-variant-progress-group"
|
|
216
216
|
}, null, 8, ["money-left", "progress-percent"])
|
|
217
217
|
]),
|
|
218
|
-
r("div",
|
|
219
|
-
i(
|
|
218
|
+
r("div", null, [
|
|
219
|
+
i(A, {
|
|
220
220
|
id: `PostGoalAmountDropdown_${((x = t.loan) == null ? void 0 : x.id) ?? t.loanId}`,
|
|
221
221
|
modelValue: e.selectedAmount,
|
|
222
222
|
"onUpdate:modelValue": [
|
|
223
|
-
|
|
223
|
+
o[7] || (o[7] = (a) => e.selectedAmount = a),
|
|
224
224
|
e.handleSelectedAmount
|
|
225
225
|
],
|
|
226
226
|
"aria-label": "Lend amount",
|
|
227
|
-
disabled: !e.amountOptions.length,
|
|
227
|
+
disabled: !e.amountOptions.length || L.isInBasket,
|
|
228
228
|
class: "amount-dropdown"
|
|
229
229
|
}, {
|
|
230
230
|
default: f(() => [
|
|
231
|
-
(
|
|
231
|
+
(n(!0), l(u, null, v(e.amountOptions, (a) => (n(), l("option", {
|
|
232
232
|
key: a,
|
|
233
233
|
value: a
|
|
234
234
|
}, " $" + c(a), 9, Z))), 128))
|
|
@@ -236,9 +236,9 @@ function Q(k, n, t, e, X, Y) {
|
|
|
236
236
|
_: 1
|
|
237
237
|
}, 8, ["id", "modelValue", "disabled", "onUpdate:modelValue"])
|
|
238
238
|
])
|
|
239
|
-
], 64)) : (
|
|
239
|
+
], 64)) : (n(), l(u, { key: 2 }, [
|
|
240
240
|
r("div", q, [
|
|
241
|
-
e.sharesAvailable ? (
|
|
241
|
+
e.sharesAvailable ? (n(), d(k(e.tag), {
|
|
242
242
|
key: 0,
|
|
243
243
|
to: e.readMorePath,
|
|
244
244
|
href: e.readMorePath,
|
|
@@ -246,7 +246,7 @@ function Q(k, n, t, e, X, Y) {
|
|
|
246
246
|
rel: t.externalLinksNewTab ? "noopener noreferrer" : void 0,
|
|
247
247
|
class: "loan-card-progress tw-no-underline tw-block",
|
|
248
248
|
"aria-label": "Loan progress",
|
|
249
|
-
onClick:
|
|
249
|
+
onClick: o[8] || (o[8] = (a) => e.clickReadMore("Progress", a))
|
|
250
250
|
}, {
|
|
251
251
|
default: f(() => [
|
|
252
252
|
i(_, {
|
|
@@ -259,19 +259,19 @@ function Q(k, n, t, e, X, Y) {
|
|
|
259
259
|
_: 1
|
|
260
260
|
}, 8, ["to", "href", "target", "rel"])) : m("", !0)
|
|
261
261
|
]),
|
|
262
|
-
t.showLightView ? (
|
|
262
|
+
t.showLightView ? (n(), l("button", {
|
|
263
263
|
key: 0,
|
|
264
264
|
class: "tw-ml-2",
|
|
265
|
-
onClick:
|
|
265
|
+
onClick: o[9] || (o[9] = (a) => e.clickReadMore("View", a))
|
|
266
266
|
}, [
|
|
267
267
|
r("span", J, " $" + c(t.customAmountLent), 1),
|
|
268
|
-
|
|
269
|
-
])) : (
|
|
268
|
+
o[13] || (o[13] = r("span", { class: "tw-bg-gray-100 tw-px-1.5 tw-py-1 tw-rounded-r-sm tw-border tw-border-gray-100 tw-text-action tw-font-medium hover:tw-underline tw-text-center tw-cursor-pointer" }, " View ", -1))
|
|
269
|
+
])) : (n(), l("div", {
|
|
270
270
|
key: 1,
|
|
271
271
|
class: s(["tw-flex-shrink-0 loan-card-cta", { "tw-w-full": !e.sharesAvailable }]),
|
|
272
272
|
style: { height: "40px" }
|
|
273
273
|
}, [
|
|
274
|
-
i(
|
|
274
|
+
i(M, {
|
|
275
275
|
loan: t.loan,
|
|
276
276
|
"unreserved-amount": e.unreservedAmount,
|
|
277
277
|
"basket-items": t.basketItems,
|
|
@@ -291,13 +291,13 @@ function Q(k, n, t, e, X, Y) {
|
|
|
291
291
|
"primary-button-text": t.primaryButtonText,
|
|
292
292
|
"secondary-button-text": t.secondaryButtonText,
|
|
293
293
|
"secondary-button-handler": t.secondaryButtonHandler,
|
|
294
|
-
onAddToBasket:
|
|
295
|
-
onShowLoanDetails:
|
|
296
|
-
onRemoveFromBasket:
|
|
294
|
+
onAddToBasket: o[10] || (o[10] = (a) => g.$emit("add-to-basket", a)),
|
|
295
|
+
onShowLoanDetails: o[11] || (o[11] = (a) => e.clickReadMore("ViewLoan", a)),
|
|
296
|
+
onRemoveFromBasket: o[12] || (o[12] = (a) => g.$emit("remove-from-basket", a))
|
|
297
297
|
}, 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"])
|
|
298
298
|
], 2))
|
|
299
|
-
], 64)) : (
|
|
300
|
-
r("div",
|
|
299
|
+
], 64)) : (n(), l(u, { key: 0 }, [
|
|
300
|
+
r("div", z, [
|
|
301
301
|
i(h, {
|
|
302
302
|
class: "tw-mb-0.5",
|
|
303
303
|
style: { width: "100%", maxWidth: "11rem", height: "1rem" }
|
|
@@ -307,18 +307,18 @@ function Q(k, n, t, e, X, Y) {
|
|
|
307
307
|
style: { width: "100%", maxWidth: "11rem", height: "0.5rem" }
|
|
308
308
|
})
|
|
309
309
|
]),
|
|
310
|
-
e.allDataLoaded ? m("", !0) : (
|
|
310
|
+
e.allDataLoaded ? m("", !0) : (n(), d(h, {
|
|
311
311
|
key: 0,
|
|
312
312
|
class: "tw-rounded tw-flex-shrink-0",
|
|
313
313
|
style: { width: "8rem", height: "2.5rem" }
|
|
314
314
|
}))
|
|
315
315
|
], 64))
|
|
316
316
|
], 2)
|
|
317
|
-
], 10,
|
|
317
|
+
], 10, S);
|
|
318
318
|
}
|
|
319
|
-
const
|
|
319
|
+
const te = /* @__PURE__ */ G(B, [["render", Q], ["__scopeId", "data-v-02c91111"]]);
|
|
320
320
|
export {
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
321
|
+
oe as KV_COMPACT_LOAN_CARD_FRAGMENT,
|
|
322
|
+
le as KV_COMPACT_LOAN_CARD_USER_FRAGMENT,
|
|
323
|
+
te as default
|
|
324
324
|
};
|
|
@@ -193,6 +193,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
193
193
|
}, {}, {
|
|
194
194
|
lendersNumber(): any;
|
|
195
195
|
amountLent(): any;
|
|
196
|
+
isInBasket(): any;
|
|
196
197
|
}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, ("show-loan-details" | "add-to-basket" | "remove-from-basket" | "jump-filter-page" | "refresh-button" | "update:selected-amount")[], "show-loan-details" | "add-to-basket" | "remove-from-basket" | "jump-filter-page" | "refresh-button" | "update:selected-amount", import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
197
198
|
variant: {
|
|
198
199
|
type: StringConstructor;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import
|
|
1
|
+
import p from "graphql-tag";
|
|
2
2
|
import W from "numeral";
|
|
3
|
-
import { ref as $, computed as
|
|
3
|
+
import { ref as $, computed as n, 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";
|
|
@@ -8,8 +8,8 @@ import { computePostGoalLoanCardStatement as ne } from "../utils/postGoalStateme
|
|
|
8
8
|
import re from "./KvLoanUse.js";
|
|
9
9
|
import le from "./KvBorrowerImage.js";
|
|
10
10
|
import ie from "./KvLoanCallouts.js";
|
|
11
|
-
import
|
|
12
|
-
import
|
|
11
|
+
import se from "./KvLendCta.js";
|
|
12
|
+
import ue from "./KvLoanProgressGroup.js";
|
|
13
13
|
import de from "./KvLoanTag.js";
|
|
14
14
|
import me from "./KvMaterialIcon.js";
|
|
15
15
|
import fe from "./KvLoadingPlaceholder.js";
|
|
@@ -21,7 +21,7 @@ import { KV_LOAN_USE_FRAGMENT as ge } from "./KvLoanUse2.js";
|
|
|
21
21
|
const d = {
|
|
22
22
|
default: "default",
|
|
23
23
|
postGoal: "post-goal"
|
|
24
|
-
}, Ae = (e) => e < 500 && e >= 25,
|
|
24
|
+
}, Ae = (e) => e < 500 && e >= 25, pe = (e) => oe(e) || Ae(e), $e = p`
|
|
25
25
|
fragment KvCompactLoanCard on LoanBasic {
|
|
26
26
|
id
|
|
27
27
|
image {
|
|
@@ -49,7 +49,7 @@ const d = {
|
|
|
49
49
|
${Q}
|
|
50
50
|
${X}
|
|
51
51
|
${Y}
|
|
52
|
-
`, He =
|
|
52
|
+
`, He = p`
|
|
53
53
|
fragment KvCompactLoanCardUser on LoanBasic {
|
|
54
54
|
id
|
|
55
55
|
...KvLendCtaUser
|
|
@@ -62,11 +62,11 @@ const d = {
|
|
|
62
62
|
KvLoadingPlaceholder: fe,
|
|
63
63
|
KvLoanUse: re,
|
|
64
64
|
KvMaterialIcon: me,
|
|
65
|
-
KvLendCta:
|
|
65
|
+
KvLendCta: se,
|
|
66
66
|
KvLoanTag: de,
|
|
67
67
|
KvLoanCallouts: ie,
|
|
68
68
|
KvLoanTeamPick: ce,
|
|
69
|
-
KvLoanProgressGroup:
|
|
69
|
+
KvLoanProgressGroup: ue,
|
|
70
70
|
KvSelect: ve
|
|
71
71
|
},
|
|
72
72
|
props: {
|
|
@@ -216,11 +216,11 @@ const d = {
|
|
|
216
216
|
"show-loan-details",
|
|
217
217
|
"update:selected-amount"
|
|
218
218
|
],
|
|
219
|
-
setup(e, { emit:
|
|
220
|
-
const r = $(""),
|
|
219
|
+
setup(e, { emit: a }) {
|
|
220
|
+
const r = $(""), s = n(
|
|
221
221
|
() => e.variant === d.postGoal
|
|
222
222
|
), {
|
|
223
|
-
allDataLoaded:
|
|
223
|
+
allDataLoaded: C,
|
|
224
224
|
borrowerName: m,
|
|
225
225
|
city: b,
|
|
226
226
|
countryName: S,
|
|
@@ -238,19 +238,19 @@ const d = {
|
|
|
238
238
|
readMorePath: k,
|
|
239
239
|
state: F,
|
|
240
240
|
tag: K,
|
|
241
|
-
unreservedAmount:
|
|
241
|
+
unreservedAmount: u,
|
|
242
242
|
sharesAvailable: R
|
|
243
|
-
} = Z(e), { clickReadMore: P } = ee(e,
|
|
243
|
+
} = Z(e), { clickReadMore: P } = ee(e, a), M = n(() => s.value ? void 0 : { width: "100px", height: "100px" }), E = n(() => {
|
|
244
244
|
if (!e.website)
|
|
245
245
|
return "";
|
|
246
246
|
const t = e.website.trim();
|
|
247
247
|
return t.startsWith("http://") || t.startsWith("https://") ? t : `https://${t}`;
|
|
248
|
-
}), G =
|
|
249
|
-
if (
|
|
250
|
-
const t = e.showLightView ? "auto" : "6.75rem",
|
|
251
|
-
return { height: t, maxHeight:
|
|
252
|
-
}), l =
|
|
253
|
-
var t,
|
|
248
|
+
}), G = n(() => {
|
|
249
|
+
if (s.value) return {};
|
|
250
|
+
const t = e.showLightView ? "auto" : "6.75rem", o = e.showLightView ? "none" : "6.75rem";
|
|
251
|
+
return { height: t, maxHeight: o };
|
|
252
|
+
}), l = n(() => {
|
|
253
|
+
var t, o;
|
|
254
254
|
return ne({
|
|
255
255
|
anonymizationLevel: (t = e.loan) == null ? void 0 : t.anonymizationLevel,
|
|
256
256
|
borrowerName: m.value,
|
|
@@ -260,17 +260,17 @@ const d = {
|
|
|
260
260
|
loanBorrowerCount: L.value,
|
|
261
261
|
loanStatus: h.value,
|
|
262
262
|
loanUse: y.value,
|
|
263
|
-
whySpecial: (
|
|
263
|
+
whySpecial: (o = e.loan) == null ? void 0 : o.whySpecial
|
|
264
264
|
});
|
|
265
|
-
}), O =
|
|
265
|
+
}), O = n(() => l.value.borrowerNameWithCountry), U = n(() => l.value.loanUsePrefixStart), D = n(() => l.value.loanUsePrefixEnd), V = n(() => l.value.statementTitle), I = n(() => l.value.visibleUseStatement), g = n(() => {
|
|
266
266
|
var i;
|
|
267
|
-
const t = parseFloat(
|
|
267
|
+
const t = parseFloat(u.value);
|
|
268
268
|
if (!t) return [];
|
|
269
|
-
const
|
|
269
|
+
const o = t < 25 ? parseFloat(`${((i = e.loan) == null ? void 0 : i.minNoteSize) ?? 25}`) : 25;
|
|
270
270
|
return te(
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
271
|
+
u.value,
|
|
272
|
+
pe(t),
|
|
273
|
+
o,
|
|
274
274
|
e.enableFiveDollarsNotes,
|
|
275
275
|
e.isVisitor
|
|
276
276
|
);
|
|
@@ -279,27 +279,27 @@ const d = {
|
|
|
279
279
|
g,
|
|
280
280
|
(t) => {
|
|
281
281
|
var i, A;
|
|
282
|
-
if (!
|
|
282
|
+
if (!s.value) return;
|
|
283
283
|
if (!t.length) {
|
|
284
284
|
r.value = "";
|
|
285
285
|
return;
|
|
286
286
|
}
|
|
287
|
-
const
|
|
287
|
+
const o = ae(
|
|
288
288
|
e.getCookie,
|
|
289
289
|
e.setCookie,
|
|
290
290
|
e.enableFiveDollarsNotes,
|
|
291
291
|
(A = (i = e.route) == null ? void 0 : i.query) == null ? void 0 : A.utm_campaign,
|
|
292
|
-
|
|
292
|
+
u.value,
|
|
293
293
|
e.userBalance ? parseFloat(e.userBalance) : void 0,
|
|
294
294
|
e.fiveDollarsSelected
|
|
295
295
|
);
|
|
296
|
-
r.value = t.includes(
|
|
296
|
+
r.value = t.includes(o) ? o : t[0];
|
|
297
297
|
},
|
|
298
298
|
{ immediate: !0 }
|
|
299
299
|
);
|
|
300
|
-
const
|
|
300
|
+
const x = n(() => e.showLightView ? 3 : 4);
|
|
301
301
|
return {
|
|
302
|
-
allDataLoaded:
|
|
302
|
+
allDataLoaded: C,
|
|
303
303
|
amountOptions: g,
|
|
304
304
|
borrowerImageStyle: M,
|
|
305
305
|
borrowerName: m,
|
|
@@ -313,7 +313,7 @@ const d = {
|
|
|
313
313
|
hasProgressData: N,
|
|
314
314
|
imageHash: _,
|
|
315
315
|
isLoading: B,
|
|
316
|
-
isPostGoalVariant:
|
|
316
|
+
isPostGoalVariant: s,
|
|
317
317
|
loanAmount: v,
|
|
318
318
|
loanBorrowerCount: L,
|
|
319
319
|
loanCallouts: T,
|
|
@@ -328,13 +328,13 @@ const d = {
|
|
|
328
328
|
readMorePath: k,
|
|
329
329
|
state: F,
|
|
330
330
|
tag: K,
|
|
331
|
-
unreservedAmount:
|
|
331
|
+
unreservedAmount: u,
|
|
332
332
|
sharesAvailable: R,
|
|
333
333
|
selectedAmount: r,
|
|
334
334
|
statementTitle: V,
|
|
335
335
|
customStyle: G,
|
|
336
|
-
loanUseLoadingRows:
|
|
337
|
-
visibleUseStatement:
|
|
336
|
+
loanUseLoadingRows: x,
|
|
337
|
+
visibleUseStatement: I,
|
|
338
338
|
clickReadMore: P,
|
|
339
339
|
trackWebsiteClick: () => {
|
|
340
340
|
e.kvTrackFunction(
|
|
@@ -345,28 +345,32 @@ const d = {
|
|
|
345
345
|
);
|
|
346
346
|
},
|
|
347
347
|
handleRefreshButton: (t) => {
|
|
348
|
-
|
|
348
|
+
a("refresh-button", t);
|
|
349
349
|
},
|
|
350
350
|
handleSelectedAmount: (t) => {
|
|
351
|
-
var
|
|
352
|
-
r.value = t,
|
|
351
|
+
var o;
|
|
352
|
+
r.value = t, a("update:selected-amount", t), e.kvTrackFunction(
|
|
353
353
|
"Lending",
|
|
354
354
|
"Modify lend amount",
|
|
355
355
|
t,
|
|
356
|
-
e.loanId ?? ((
|
|
356
|
+
e.loanId ?? ((o = e.loan) == null ? void 0 : o.id)
|
|
357
357
|
);
|
|
358
358
|
}
|
|
359
359
|
};
|
|
360
360
|
},
|
|
361
361
|
computed: {
|
|
362
362
|
lendersNumber() {
|
|
363
|
-
var e,
|
|
364
|
-
return ((
|
|
363
|
+
var e, a;
|
|
364
|
+
return ((a = (e = this.loan) == null ? void 0 : e.lenders) == null ? void 0 : a.totalCount) ?? 0;
|
|
365
365
|
},
|
|
366
366
|
amountLent() {
|
|
367
|
-
var
|
|
368
|
-
const e = ((r = (
|
|
367
|
+
var a, r;
|
|
368
|
+
const e = ((r = (a = this.loan) == null ? void 0 : a.loanFundraisingInfo) == null ? void 0 : r.fundedAmount) ?? 0;
|
|
369
369
|
return W(e).format("$0,0");
|
|
370
|
+
},
|
|
371
|
+
isInBasket() {
|
|
372
|
+
var e;
|
|
373
|
+
return ((e = this.basketItems) == null ? void 0 : e.some((a) => a.__typename === "LoanReservation" && a.id === this.loanId)) ?? !1;
|
|
370
374
|
}
|
|
371
375
|
}
|
|
372
376
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kiva/kv-components",
|
|
3
|
-
"version": "8.13.
|
|
3
|
+
"version": "8.13.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -125,5 +125,5 @@
|
|
|
125
125
|
"embla-carousel-fade",
|
|
126
126
|
"popper.js"
|
|
127
127
|
],
|
|
128
|
-
"gitHead": "
|
|
128
|
+
"gitHead": "3e46955f45bfc6410794544fd0a750a5ed3d32f7"
|
|
129
129
|
}
|