@kiva/kv-components 10.4.0 → 10.5.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-02aa45c6]:hover,.loan-card-use[data-v-02aa45c6]: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-02aa45c6]{text-decoration-line:underline}.loan-card-progress[data-v-02aa45c6]:hover,.loan-card-progress[data-v-02aa45c6]:focus{text-decoration-line:none}.loan-card-use-text[data-v-02aa45c6] 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-02aa45c6] form,.loan-card-cta[data-v-02aa45c6] fieldset,.loan-card-cta[data-v-02aa45c6] .tw-w-full,.loan-card-cta[data-v-02aa45c6] button{height:40px!important;max-height:40px!important;display:flex!important;align-items:center!important;justify-content:center!important}.loan-card-cta[data-v-02aa45c6] .tw-inline-flex{height:40px!important;max-height:40px!important;min-height:40px!important}[data-v-02aa45c6] .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-02aa45c6] .goal-variant-callouts span{font-weight:500}.goal-variant-progress-group[data-v-02aa45c6] div[role=progressbar]{background-color:#d9d9d9}
1
+ .loan-card-use[data-v-330ff302]:hover,.loan-card-use[data-v-330ff302]: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-330ff302]{text-decoration-line:underline}.loan-card-progress[data-v-330ff302]:hover,.loan-card-progress[data-v-330ff302]:focus{text-decoration-line:none}.loan-card-use-text-light-detailed[data-v-330ff302] p{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:3}.loan-card-cta[data-v-330ff302] form,.loan-card-cta[data-v-330ff302] fieldset,.loan-card-cta[data-v-330ff302] .tw-w-full,.loan-card-cta[data-v-330ff302] button{display:flex!important;height:2.5rem!important;max-height:2.5rem!important;align-items:center!important;justify-content:center!important}.loan-card-cta[data-v-330ff302] .tw-inline-flex{height:2.5rem!important;max-height:2.5rem!important;min-height:2.5rem!important}[data-v-330ff302] .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-330ff302] .goal-variant-callouts span{font-weight:500}.goal-variant-progress-group[data-v-330ff302] div[role=progressbar]{background-color:#d9d9d9}.light-detailed-progress-group[data-v-330ff302] p:first-of-type{margin-bottom:.5rem}
@@ -1,74 +1,94 @@
1
- import B from "./KvCompactLoanCard2.js";
2
- import { KV_COMPACT_LOAN_CARD_FRAGMENT as nt, KV_COMPACT_LOAN_CARD_USER_FRAGMENT as lt } from "./KvCompactLoanCard2.js";
3
- import { resolveComponent as d, openBlock as o, createElementBlock as l, normalizeClass as s, createVNode as i, createCommentVNode as m, createElementVNode as r, normalizeStyle as b, createBlock as w, resolveDynamicComponent as u, withCtx as k, toDisplayString as c, withModifiers as R, Fragment as g, renderList as v } from "vue";
1
+ import D from "./KvCompactLoanCard2.js";
2
+ import { KV_COMPACT_LOAN_CARD_FRAGMENT as gt, KV_COMPACT_LOAN_CARD_USER_FRAGMENT as ft } from "./KvCompactLoanCard2.js";
3
+ import { resolveComponent as h, openBlock as a, createElementBlock as l, normalizeClass as c, createVNode as i, createCommentVNode as g, createElementVNode as r, normalizeStyle as _, createBlock as d, resolveDynamicComponent as k, withCtx as f, Fragment as s, toDisplayString as w, withModifiers as R, renderList as u } from "vue";
4
4
  import "./KvCompactLoanCard.css";
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 = {
5
+ import B from "../_virtual/_plugin-vue_export-helper.js";
6
+ const S = ["aria-busy"], G = { 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
  }, I = {
10
10
  key: 0,
11
+ class: "tw-w-full"
12
+ }, W = ["title"], j = { class: "tw-flex tw-items-center tw-gap-0.5 tw-w-full tw-min-w-0" }, E = { class: "tw-text-gray-600 !tw-font-medium tw-text-small tw-leading-normal tw-flex-shrink-0" }, F = ["title"], O = {
13
+ key: 1,
11
14
  class: "tw-mb-0.5 tw-w-full"
12
- }, W = { class: "tw-text-primary !tw-font-medium tw-text-base tw-leading-normal tw-truncate" }, E = ["href"], F = { class: "tw-truncate" }, O = ["title"], j = { class: "tw-font-medium" }, K = {
15
+ }, K = { class: "tw-text-primary !tw-font-medium tw-text-base tw-leading-normal tw-truncate" }, z = ["href"], H = { class: "tw-truncate" }, Z = ["title"], q = { class: "tw-font-medium" }, J = {
16
+ key: 0,
17
+ "data-testid": "loan-use-loading",
18
+ class: "tw-w-full tw-overflow-hidden"
19
+ }, Q = {
20
+ key: 1,
21
+ class: "loan-card-use-text-light-detailed tw-w-full tw-overflow-hidden"
22
+ }, X = {
13
23
  key: 0,
14
- class: "loan-card-use-text tw-w-full tw-overflow-hidden"
15
- }, z = { class: "tw-flex-1 tw-min-w-0 tw-mr-1" }, H = {
24
+ class: "tw-w-full tw-overflow-hidden"
25
+ }, Y = { class: "tw-flex-1 tw-min-w-0 tw-mr-1" }, p = {
26
+ class: "tw-flex-1 tw-min-w-0 tw-px-0.5",
27
+ style: { "max-width": "9.75rem" }
28
+ }, $ = { class: "tw-flex tw-items-center tw-gap-2 tw-flex-shrink-0" }, tt = {
29
+ "data-testid": "light-detailed-amount-pill",
30
+ class: "tw-border tw-border-gray-100 tw-rounded-sm tw-px-1 tw-py-0.5 tw-text-label tw-text-primary"
31
+ }, et = {
16
32
  class: "tw-flex-1 tw-min-w-0",
17
33
  style: { "max-width": "6.5rem" }
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(f, n, e, t, X, y) {
20
- var L;
21
- const _ = d("kv-material-icon"), h = d("kv-loading-placeholder"), P = d("kv-borrower-image"), C = d("kv-loan-tag"), V = d("kv-loan-use"), M = d("kv-loan-callouts"), x = d("kv-loan-progress-group"), N = d("kv-select"), A = d("kv-lend-cta");
22
- return o(), l("div", {
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
- "tw-relative": e.showRefreshButton,
25
- "!tw-p-1.5": e.showLightView || t.isPostGoalVariant
34
+ }, at = ["value"], ot = { class: "tw-flex-1 tw-min-w-0" }, nt = { class: "tw-p-1 tw-rounded-l-sm tw-border tw-border-gray-100 tw-border-r-0" };
35
+ function lt(b, n, e, t, rt, x) {
36
+ var V;
37
+ const v = h("kv-material-icon"), m = h("kv-loading-placeholder"), P = h("kv-borrower-image"), C = h("kv-loan-tag"), L = h("kv-loan-use"), M = h("kv-loan-callouts"), y = h("kv-loan-progress-group"), N = h("kv-select"), A = h("kv-lend-cta");
38
+ return a(), l("div", {
39
+ class: c(["tw-flex tw-flex-col tw-items-start tw-justify-between tw-p-1 tw-bg-white tw-shadow-lg tw-w-full", {
40
+ "tw-relative": t.shouldShowRefreshButton,
41
+ "!tw-p-1.5": e.showLightView || t.isPostGoalVariant,
42
+ "tw-rounded-md": !t.isLightDetailedVariant,
43
+ "tw-rounded": t.isLightDetailedVariant
26
44
  }]),
27
45
  "aria-busy": t.isLoading ? "true" : "false"
28
46
  }, [
29
- e.showRefreshButton ? (o(), l("button", {
47
+ t.shouldShowRefreshButton ? (a(), l("button", {
30
48
  key: 0,
31
49
  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: n[0] || (n[0] = (...a) => t.handleRefreshButton && t.handleRefreshButton(...a))
50
+ onClick: n[0] || (n[0] = (...o) => t.handleRefreshButton && t.handleRefreshButton(...o))
33
51
  }, [
34
- i(_, {
52
+ i(v, {
35
53
  icon: t.mdiCached,
36
54
  class: "tw-w-2.5 tw-h-2.5 tw--scale-x-100 tw-text-gray-500"
37
55
  }, null, 8, ["icon"])
38
- ])) : m("", !0),
39
- r("div", D, [
56
+ ])) : g("", !0),
57
+ r("div", G, [
40
58
  r("div", {
41
- class: s(["tw-flex tw-items-start tw-gap-2 tw-w-full loan-card-active-hover", {
42
- "!tw-gap-1": e.showLightView,
59
+ class: c(["tw-flex tw-items-start tw-gap-2 tw-w-full loan-card-active-hover", {
60
+ "!tw-gap-1": e.showLightView || t.isLightDetailedVariant,
43
61
  "!tw-gap-1.5 md:!tw-gap-2.5": t.isPostGoalVariant
44
62
  }]),
45
- style: b(t.customStyle)
63
+ style: _(t.customStyle)
46
64
  }, [
47
- t.isLoading ? (o(), w(h, {
65
+ t.isLoading ? (a(), d(m, {
48
66
  key: 0,
49
67
  "aria-hidden": "true",
50
- class: s({
68
+ class: c({
51
69
  "!tw-w-7.5 !tw-h-7.5": e.showLightView,
52
- "!tw-w-7.5 !tw-h-7.5 md:!tw-w-12.5 md:!tw-h-12.5": t.isPostGoalVariant
70
+ "!tw-w-7.5 !tw-h-7.5 md:!tw-w-12.5 md:!tw-h-12.5": t.isPostGoalVariant,
71
+ "!tw-w-9.5 !tw-h-9.5": t.isLightDetailedVariant
53
72
  }),
54
- style: b(t.borrowerImageStyle)
55
- }, null, 8, ["class", "style"])) : (o(), l("div", U, [
56
- (o(), w(u(t.tag), {
73
+ style: _(t.borrowerImageStyle)
74
+ }, null, 8, ["class", "style"])) : (a(), l("div", U, [
75
+ (a(), d(k(t.tag), {
57
76
  to: t.readMorePath,
58
77
  href: t.readMorePath,
59
78
  target: e.externalLinksNewTab ? "_blank" : void 0,
60
79
  rel: e.externalLinksNewTab ? "noopener noreferrer" : void 0,
61
80
  class: "tw-flex",
62
81
  "aria-label": "Borrower image",
63
- onClick: n[1] || (n[1] = (a) => t.clickReadMore("Photo", a))
82
+ onClick: n[1] || (n[1] = (o) => t.clickReadMore("Photo", o))
64
83
  }, {
65
- default: k(() => [
84
+ default: f(() => [
66
85
  i(P, {
67
- class: s(["tw-bg-gray-300 tw-rounded-sm tw-object-cover tw-bg-clip-content", {
86
+ class: c(["tw-bg-gray-300 tw-rounded-sm tw-object-cover tw-bg-clip-content", {
68
87
  "!tw-w-7.5 !tw-h-7.5": e.showLightView,
69
- "!tw-w-7.5 !tw-h-7.5 md:!tw-w-12.5 md:!tw-h-12.5": t.isPostGoalVariant
88
+ "!tw-w-7.5 !tw-h-7.5 md:!tw-w-12.5 md:!tw-h-12.5": t.isPostGoalVariant,
89
+ "!tw-w-9.5 !tw-h-9.5": t.isLightDetailedVariant
70
90
  }]),
71
- style: b(t.borrowerImageStyle),
91
+ style: _(t.borrowerImageStyle),
72
92
  alt: `Photo of ${t.borrowerName}`,
73
93
  "aspect-ratio": 1,
74
94
  "default-image": { width: 200, faceZoom: 50 },
@@ -81,98 +101,142 @@ function Q(f, n, e, t, X, y) {
81
101
  }, 8, ["to", "href", "target", "rel"]))
82
102
  ])),
83
103
  r("div", {
84
- class: s(["tw-flex tw-flex-col tw-items-start tw-gap-1 tw-flex-1 tw-min-w-0", { "!tw-gap-0": t.isPostGoalVariant }])
104
+ class: c(["tw-flex tw-flex-col tw-items-start tw-gap-1 tw-flex-1 tw-min-w-0", { "!tw-gap-0": t.isPostGoalVariant }])
85
105
  }, [
86
- e.businessName ? (o(), l("div", I, [
87
- (o(), w(u(t.tag), {
106
+ t.isLightDetailedVariant ? (a(), l("div", I, [
107
+ t.isLoading ? (a(), l(s, { key: 0 }, [
108
+ i(m, { class: "tw-mb-0.5 !tw-w-full !tw-h-2" }),
109
+ i(m, { class: "!tw-w-9 !tw-h-2" })
110
+ ], 64)) : (a(), l(s, { key: 1 }, [
111
+ r("p", {
112
+ title: t.borrowerName,
113
+ class: "tw-text-primary !tw-font-medium tw-text-small tw-leading-normal tw-truncate tw-w-full"
114
+ }, w(t.borrowerName), 9, W),
115
+ r("div", j, [
116
+ r("span", E, w(t.lightDetailedAmount), 1),
117
+ t.formattedLocation ? (a(), l(s, { key: 0 }, [
118
+ n[14] || (n[14] = r("span", {
119
+ "aria-hidden": "true",
120
+ class: "tw-w-0.5 tw-h-0.5 tw-rounded-full tw-bg-gray-600 tw-flex-shrink-0"
121
+ }, null, -1)),
122
+ r("span", {
123
+ title: t.formattedLocation,
124
+ class: "tw-text-gray-600 !tw-font-medium tw-text-small tw-leading-normal tw-truncate tw-min-w-0"
125
+ }, w(t.formattedLocation), 9, F)
126
+ ], 64)) : g("", !0)
127
+ ])
128
+ ], 64))
129
+ ])) : e.businessName ? (a(), l("div", O, [
130
+ (a(), d(k(t.tag), {
88
131
  to: t.readMorePath,
89
132
  href: t.readMorePath,
90
133
  target: e.externalLinksNewTab ? "_blank" : void 0,
91
134
  rel: e.externalLinksNewTab ? "noopener noreferrer" : void 0,
92
135
  class: "tw-no-underline hover:tw-underline focus:tw-no-underline",
93
136
  "aria-label": "Business name",
94
- onClick: n[2] || (n[2] = (a) => t.clickReadMore("Business", a))
137
+ onClick: n[2] || (n[2] = (o) => t.clickReadMore("Business", o))
95
138
  }, {
96
- default: k(() => [
97
- r("h3", W, c(e.businessName), 1)
139
+ default: f(() => [
140
+ r("h3", K, w(e.businessName), 1)
98
141
  ]),
99
142
  _: 1
100
143
  }, 8, ["to", "href", "target", "rel"])),
101
- e.website ? (o(), l("a", {
144
+ e.website ? (a(), l("a", {
102
145
  key: 0,
103
146
  href: t.formattedWebsite,
104
147
  target: "_blank",
105
148
  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: n[3] || (n[3] = R((...a) => t.trackWebsiteClick && t.trackWebsiteClick(...a), ["stop"]))
149
+ onClick: n[3] || (n[3] = R((...o) => t.trackWebsiteClick && t.trackWebsiteClick(...o), ["stop"]))
107
150
  }, [
108
- i(_, {
151
+ i(v, {
109
152
  icon: t.mdiLink,
110
153
  class: "tw-w-2 tw-h-2"
111
154
  }, null, 8, ["icon"]),
112
- r("span", F, c(e.website), 1)
113
- ], 8, E)) : m("", !0)
114
- ])) : m("", !0),
115
- t.isLoading ? m("", !0) : (o(), w(u(t.tag), {
116
- key: 1,
155
+ r("span", H, w(e.website), 1)
156
+ ], 8, z)) : g("", !0)
157
+ ])) : g("", !0),
158
+ !t.isLoading && !t.isLightDetailedVariant ? (a(), d(k(t.tag), {
159
+ key: 2,
117
160
  to: t.readMorePath,
118
161
  href: t.readMorePath,
119
162
  target: e.externalLinksNewTab ? "_blank" : void 0,
120
163
  rel: e.externalLinksNewTab ? "noopener noreferrer" : void 0,
121
164
  class: "tw-flex tw-no-underline hover:tw-no-underline focus:tw-no-underline -tw-mt-1",
122
165
  "aria-label": "Loan tag",
123
- onClick: n[4] || (n[4] = (a) => t.clickReadMore("Tag", a))
166
+ onClick: n[4] || (n[4] = (o) => t.clickReadMore("Tag", o))
124
167
  }, {
125
- default: k(() => [
126
- e.showTags ? (o(), w(C, {
168
+ default: f(() => [
169
+ e.showTags ? (a(), d(C, {
127
170
  key: 0,
128
- class: s({
171
+ class: c({
129
172
  "tw-mb-1 !tw-font-medium": t.isPostGoalVariant
130
173
  }),
131
174
  loan: e.loan,
132
175
  "enable-multi-matching": e.enableMultiMatching
133
- }, null, 8, ["class", "loan", "enable-multi-matching"])) : m("", !0)
176
+ }, null, 8, ["class", "loan", "enable-multi-matching"])) : g("", !0)
134
177
  ]),
135
178
  _: 1
136
- }, 8, ["to", "href", "target", "rel"])),
137
- t.isPostGoalVariant ? (o(), l(g, { key: 2 }, [
138
- t.isLoading ? (o(), l(g, { key: 0 }, v(4, (a) => i(h, {
139
- key: a,
179
+ }, 8, ["to", "href", "target", "rel"])) : g("", !0),
180
+ t.isPostGoalVariant ? (a(), l(s, { key: 3 }, [
181
+ t.isLoading ? (a(), l(s, { key: 0 }, u(4, (o) => i(m, {
182
+ key: o,
140
183
  class: "tw-mb-0.5 md:!tw-mb-1.5 !tw-w-full !tw-h-1.5 md:!tw-h-2"
141
- })), 64)) : (o(), l("p", {
184
+ })), 64)) : (a(), l("p", {
142
185
  key: 1,
143
186
  class: "tw-text-small tw-mb-0 tw-leading-normal",
144
187
  style: { "line-height": "150%" },
145
188
  title: t.statementTitle,
146
189
  "data-testid": "loan-use-statement"
147
190
  }, [
148
- r("span", null, c(t.loanUsePrefixStart), 1),
149
- r("span", j, c(t.borrowerNameWithCountry), 1),
150
- r("span", null, c(t.loanUsePrefixEnd), 1),
151
- r("span", null, c(t.visibleUseStatement), 1)
152
- ], 8, O))
153
- ], 64)) : e.showLoanUse ? (o(), w(u(t.tag), {
154
- key: 3,
191
+ r("span", null, w(t.loanUsePrefixStart), 1),
192
+ r("span", q, w(t.borrowerNameWithCountry), 1),
193
+ r("span", null, w(t.loanUsePrefixEnd), 1),
194
+ r("span", null, w(t.visibleUseStatement), 1)
195
+ ], 8, Z))
196
+ ], 64)) : t.isLightDetailedVariant ? (a(), l(s, { key: 4 }, [
197
+ t.isLoading ? (a(), l("div", J, [
198
+ (a(!0), l(s, null, u(t.loanUseLoadingRows, (o) => (a(), l("div", {
199
+ key: o,
200
+ class: "tw-h-2 tw-mb-1"
201
+ }, [
202
+ i(m)
203
+ ]))), 128))
204
+ ])) : (a(), l("div", Q, [
205
+ i(L, {
206
+ use: t.loanUse,
207
+ "loan-amount": t.loanAmount,
208
+ status: t.loanStatus,
209
+ "borrower-count": t.loanBorrowerCount,
210
+ name: t.borrowerName,
211
+ "distribution-model": t.distributionModel,
212
+ "hide-borrower-details": !0,
213
+ "data-testid": "loan-use-statement",
214
+ class: "tw-text-small tw-leading-normal tw-text-primary"
215
+ }, null, 8, ["use", "loan-amount", "status", "borrower-count", "name", "distribution-model"])
216
+ ]))
217
+ ], 64)) : e.showLoanUse ? (a(), d(k(t.tag), {
218
+ key: 5,
155
219
  to: t.readMorePath,
156
220
  href: t.readMorePath,
157
221
  target: e.externalLinksNewTab ? "_blank" : void 0,
158
222
  rel: e.externalLinksNewTab ? "noopener noreferrer" : void 0,
159
223
  class: "loan-card-use tw-no-underline tw-text-primary tw-block tw-w-full",
160
224
  "aria-label": "Loan use",
161
- onClick: n[5] || (n[5] = (a) => t.clickReadMore("Use", a))
225
+ onClick: n[5] || (n[5] = (o) => t.clickReadMore("Use", o))
162
226
  }, {
163
- default: k(() => [
164
- t.isLoading ? (o(), l("div", K, [
165
- (o(!0), l(g, null, v([...Array(t.loanUseLoadingRows)], (a, T) => (o(), l("div", {
227
+ default: f(() => [
228
+ t.isLoading ? (a(), l("div", X, [
229
+ (a(!0), l(s, null, u([...Array(t.loanUseLoadingRows)], (o, T) => (a(), l("div", {
166
230
  key: T,
167
231
  class: "tw-h-2 tw-mb-1"
168
232
  }, [
169
- i(h)
233
+ i(m)
170
234
  ]))), 128))
171
- ])) : (o(), l("div", {
235
+ ])) : (a(), l("div", {
172
236
  key: 1,
173
- class: s(["loan-card-use-text tw-w-full tw-overflow-hidden", { "!tw--mt-1": e.showTags && y.hasMatchingInfo && e.showLightView }])
237
+ class: c(["tw-w-full tw-overflow-hidden", { "!tw--mt-1": e.showTags && x.hasMatchingInfo && e.showLightView }])
174
238
  }, [
175
- i(V, {
239
+ i(L, {
176
240
  use: t.loanUse,
177
241
  "loan-amount": t.loanAmount,
178
242
  status: t.loanStatus,
@@ -188,29 +252,58 @@ function Q(f, n, e, t, X, y) {
188
252
  ], 2))
189
253
  ]),
190
254
  _: 1
191
- }, 8, ["to", "href", "target", "rel"])) : m("", !0)
255
+ }, 8, ["to", "href", "target", "rel"])) : g("", !0)
192
256
  ], 2)
193
257
  ], 6),
194
- t.isLoading || typeof t.loanCallouts > "u" ? (o(), w(h, {
258
+ t.isLoading || typeof t.loanCallouts > "u" ? (a(), d(m, {
195
259
  key: 0,
196
260
  class: "tw-mt-1.5 tw-mb-1 tw-rounded-full",
197
261
  style: { width: "60%", height: "1.5rem" }
198
- })) : (o(), w(M, {
262
+ })) : (a(), d(M, {
199
263
  key: 1,
200
264
  callouts: t.loanCallouts,
201
- class: s(["tw-mt-1.5", { "goal-variant-callouts": t.isPostGoalVariant }]),
202
- onClick: n[6] || (n[6] = (a) => f.$emit("jump-filter-page", a))
265
+ class: c(["tw-mt-1.5", { "goal-variant-callouts": t.isPostGoalVariant }]),
266
+ onClick: n[6] || (n[6] = (o) => b.$emit("jump-filter-page", o))
203
267
  }, null, 8, ["callouts", "class"]))
204
268
  ]),
205
269
  r("div", {
206
- class: s(["tw-flex tw-items-center tw-justify-between tw-w-full tw-mt-1", {
270
+ class: c(["tw-flex tw-items-center tw-justify-between tw-w-full tw-mt-1", {
207
271
  "tw-gap-1": t.sharesAvailable,
208
- "!tw-items-end !tw-gap-2": t.isPostGoalVariant
272
+ "!tw-items-end !tw-gap-2": t.isPostGoalVariant,
273
+ "!tw-mt-1.5": t.isLightDetailedVariant
209
274
  }])
210
275
  }, [
211
- t.hasProgressData ? t.isPostGoalVariant ? (o(), l(g, { key: 1 }, [
212
- r("div", H, [
213
- i(x, {
276
+ t.hasProgressData ? t.isLightDetailedVariant ? (a(), l(s, { key: 1 }, [
277
+ r("div", p, [
278
+ i(y, {
279
+ "money-left": t.unreservedAmount,
280
+ "progress-percent": t.fundraisingPercent,
281
+ class: "tw-text-black light-detailed-progress-group"
282
+ }, null, 8, ["money-left", "progress-percent"])
283
+ ]),
284
+ r("div", $, [
285
+ r("span", tt, " $" + w(e.customAmountLent), 1),
286
+ (a(), d(k(t.tag), {
287
+ to: t.readMorePath,
288
+ href: t.readMorePath,
289
+ target: e.externalLinksNewTab ? "_blank" : void 0,
290
+ rel: e.externalLinksNewTab ? "noopener noreferrer" : void 0,
291
+ class: "tw-flex tw-items-center tw-justify-center",
292
+ "aria-label": `View ${t.borrowerName || "this borrower"}'s loan details`,
293
+ onClick: n[7] || (n[7] = (o) => t.clickReadMore("Arrow", o))
294
+ }, {
295
+ default: f(() => [
296
+ i(v, {
297
+ icon: t.mdiArrowRight,
298
+ class: "tw-w-2.5 tw-h-2.5 tw-text-action"
299
+ }, null, 8, ["icon"])
300
+ ]),
301
+ _: 1
302
+ }, 8, ["to", "href", "target", "rel", "aria-label"]))
303
+ ])
304
+ ], 64)) : t.isPostGoalVariant ? (a(), l(s, { key: 2 }, [
305
+ r("div", et, [
306
+ i(y, {
214
307
  "money-left": t.unreservedAmount,
215
308
  "progress-percent": t.fundraisingPercent,
216
309
  class: "tw-text-black goal-variant-progress-group"
@@ -218,28 +311,28 @@ function Q(f, n, e, t, X, y) {
218
311
  ]),
219
312
  r("div", null, [
220
313
  i(N, {
221
- id: `PostGoalAmountDropdown_${((L = e.loan) == null ? void 0 : L.id) ?? e.loanId}`,
314
+ id: `PostGoalAmountDropdown_${((V = e.loan) == null ? void 0 : V.id) ?? e.loanId}`,
222
315
  modelValue: t.selectedAmount,
223
316
  "onUpdate:modelValue": [
224
- n[7] || (n[7] = (a) => t.selectedAmount = a),
317
+ n[8] || (n[8] = (o) => t.selectedAmount = o),
225
318
  t.handleSelectedAmount
226
319
  ],
227
320
  "aria-label": "Lend amount",
228
- disabled: !t.amountOptions.length || y.isInBasket,
321
+ disabled: !t.amountOptions.length || x.isInBasket,
229
322
  class: "amount-dropdown"
230
323
  }, {
231
- default: k(() => [
232
- (o(!0), l(g, null, v(t.amountOptions, (a) => (o(), l("option", {
233
- key: a,
234
- value: a
235
- }, " $" + c(a), 9, Z))), 128))
324
+ default: f(() => [
325
+ (a(!0), l(s, null, u(t.amountOptions, (o) => (a(), l("option", {
326
+ key: o,
327
+ value: o
328
+ }, " $" + w(o), 9, at))), 128))
236
329
  ]),
237
330
  _: 1
238
331
  }, 8, ["id", "modelValue", "disabled", "onUpdate:modelValue"])
239
332
  ])
240
- ], 64)) : (o(), l(g, { key: 2 }, [
241
- r("div", q, [
242
- t.sharesAvailable ? (o(), w(u(t.tag), {
333
+ ], 64)) : (a(), l(s, { key: 3 }, [
334
+ r("div", ot, [
335
+ t.sharesAvailable ? (a(), d(k(t.tag), {
243
336
  key: 0,
244
337
  to: t.readMorePath,
245
338
  href: t.readMorePath,
@@ -247,10 +340,10 @@ function Q(f, n, e, t, X, y) {
247
340
  rel: e.externalLinksNewTab ? "noopener noreferrer" : void 0,
248
341
  class: "loan-card-progress tw-no-underline tw-block",
249
342
  "aria-label": "Loan progress",
250
- onClick: n[8] || (n[8] = (a) => t.clickReadMore("Progress", a))
343
+ onClick: n[9] || (n[9] = (o) => t.clickReadMore("Progress", o))
251
344
  }, {
252
- default: k(() => [
253
- i(x, {
345
+ default: f(() => [
346
+ i(y, {
254
347
  id: "loanProgress",
255
348
  "money-left": t.unreservedAmount,
256
349
  "progress-percent": t.fundraisingPercent,
@@ -258,18 +351,18 @@ function Q(f, n, e, t, X, y) {
258
351
  }, null, 8, ["money-left", "progress-percent"])
259
352
  ]),
260
353
  _: 1
261
- }, 8, ["to", "href", "target", "rel"])) : m("", !0)
354
+ }, 8, ["to", "href", "target", "rel"])) : g("", !0)
262
355
  ]),
263
- e.showLightView ? (o(), l("button", {
356
+ e.showLightView ? (a(), l("button", {
264
357
  key: 0,
265
358
  class: "tw-ml-2",
266
- onClick: n[9] || (n[9] = (a) => t.clickReadMore("View", a))
359
+ onClick: n[10] || (n[10] = (o) => t.clickReadMore("View", o))
267
360
  }, [
268
- r("span", J, " $" + c(e.customAmountLent), 1),
269
- n[13] || (n[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))
270
- ])) : (o(), l("div", {
361
+ r("span", nt, " $" + w(e.customAmountLent), 1),
362
+ n[15] || (n[15] = 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))
363
+ ])) : (a(), l("div", {
271
364
  key: 1,
272
- class: s(["tw-flex-shrink-0 loan-card-cta", { "tw-w-full": !t.sharesAvailable }]),
365
+ class: c(["tw-flex-shrink-0 loan-card-cta", { "tw-w-full": !t.sharesAvailable }]),
273
366
  style: { height: "40px" }
274
367
  }, [
275
368
  i(A, {
@@ -292,23 +385,23 @@ function Q(f, n, e, t, X, y) {
292
385
  "primary-button-text": e.primaryButtonText,
293
386
  "secondary-button-text": e.secondaryButtonText,
294
387
  "secondary-button-handler": e.secondaryButtonHandler,
295
- onAddToBasket: n[10] || (n[10] = (a) => f.$emit("add-to-basket", a)),
296
- onShowLoanDetails: n[11] || (n[11] = (a) => t.clickReadMore("ViewLoan", a)),
297
- onRemoveFromBasket: n[12] || (n[12] = (a) => f.$emit("remove-from-basket", a))
388
+ onAddToBasket: n[11] || (n[11] = (o) => b.$emit("add-to-basket", o)),
389
+ onShowLoanDetails: n[12] || (n[12] = (o) => t.clickReadMore("ViewLoan", o)),
390
+ onRemoveFromBasket: n[13] || (n[13] = (o) => b.$emit("remove-from-basket", o))
298
391
  }, 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"])
299
392
  ], 2))
300
- ], 64)) : (o(), l(g, { key: 0 }, [
301
- r("div", z, [
302
- i(h, {
393
+ ], 64)) : (a(), l(s, { key: 0 }, [
394
+ r("div", Y, [
395
+ i(m, {
303
396
  class: "tw-mb-0.5",
304
397
  style: { width: "100%", maxWidth: "11rem", height: "1rem" }
305
398
  }),
306
- i(h, {
399
+ i(m, {
307
400
  class: "tw-rounded",
308
401
  style: { width: "100%", maxWidth: "11rem", height: "0.5rem" }
309
402
  })
310
403
  ]),
311
- t.allDataLoaded ? m("", !0) : (o(), w(h, {
404
+ t.allDataLoaded ? g("", !0) : (a(), d(m, {
312
405
  key: 0,
313
406
  class: "tw-rounded tw-flex-shrink-0",
314
407
  style: { width: "8rem", height: "2.5rem" }
@@ -317,9 +410,9 @@ function Q(f, n, e, t, X, y) {
317
410
  ], 2)
318
411
  ], 10, S);
319
412
  }
320
- const et = /* @__PURE__ */ G(B, [["render", Q], ["__scopeId", "data-v-02aa45c6"]]);
413
+ const mt = /* @__PURE__ */ B(D, [["render", lt], ["__scopeId", "data-v-330ff302"]]);
321
414
  export {
322
- nt as KV_COMPACT_LOAN_CARD_FRAGMENT,
323
- lt as KV_COMPACT_LOAN_CARD_USER_FRAGMENT,
324
- et as default
415
+ gt as KV_COMPACT_LOAN_CARD_FRAGMENT,
416
+ ft as KV_COMPACT_LOAN_CARD_USER_FRAGMENT,
417
+ mt as default
325
418
  };
@@ -153,14 +153,14 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
153
153
  }>;
154
154
  borrowerName: import('vue').ComputedRef<any>;
155
155
  borrowerNameWithCountry: import('vue').ComputedRef<string>;
156
- city: import('vue').ComputedRef<any>;
157
- countryName: import('vue').ComputedRef<any>;
156
+ lightDetailedAmount: import('vue').ComputedRef<any>;
158
157
  distributionModel: import('vue').ComputedRef<any>;
159
158
  formattedLocation: import('vue').ComputedRef<any>;
160
159
  formattedWebsite: import('vue').ComputedRef<string>;
161
160
  fundraisingPercent: import('vue').ComputedRef<any>;
162
161
  hasProgressData: import('vue').ComputedRef<boolean>;
163
162
  imageHash: import('vue').ComputedRef<any>;
163
+ isLightDetailedVariant: import('vue').ComputedRef<boolean>;
164
164
  isLoading: import('vue').ComputedRef<boolean>;
165
165
  isPostGoalVariant: import('vue').ComputedRef<boolean>;
166
166
  loanAmount: import('vue').ComputedRef<any>;
@@ -170,12 +170,11 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
170
170
  loanUse: import('vue').ComputedRef<any>;
171
171
  loanUsePrefixEnd: import('vue').ComputedRef<string>;
172
172
  loanUsePrefixStart: import('vue').ComputedRef<string>;
173
- mdiMapMarker: string;
174
- mdiHome: string;
175
173
  mdiLink: string;
176
174
  mdiCached: string;
175
+ mdiArrowRight: string;
177
176
  readMorePath: import('vue').ComputedRef<any>;
178
- state: import('vue').ComputedRef<any>;
177
+ shouldShowRefreshButton: import('vue').ComputedRef<boolean>;
179
178
  tag: import('vue').ComputedRef<"router-link" | "a">;
180
179
  unreservedAmount: import('vue').ComputedRef<any>;
181
180
  sharesAvailable: import('vue').ComputedRef<boolean>;
@@ -188,15 +187,13 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
188
187
  height: string;
189
188
  maxHeight: string;
190
189
  }>;
191
- loanUseLoadingRows: import('vue').ComputedRef<3 | 4>;
190
+ loanUseLoadingRows: import('vue').ComputedRef<2 | 3 | 4>;
192
191
  visibleUseStatement: import('vue').ComputedRef<string>;
193
192
  clickReadMore: (target: string, event: Event) => void;
194
193
  trackWebsiteClick: () => void;
195
194
  handleRefreshButton: (event: any) => void;
196
195
  handleSelectedAmount: (amount: string) => void;
197
196
  }, {}, {
198
- lendersNumber(): any;
199
- amountLent(): any;
200
197
  isInBasket(): any;
201
198
  hasMatchingInfo(): boolean;
202
199
  }, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, ("show-loan-details" | "add-to-basket" | "jump-filter-page" | "remove-from-basket" | "refresh-button" | "update:selected-amount")[], "show-loan-details" | "add-to-basket" | "jump-filter-page" | "remove-from-basket" | "refresh-button" | "update:selected-amount", import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
@@ -482,6 +479,10 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
482
479
  type: BooleanConstructor;
483
480
  default: boolean;
484
481
  };
482
+ hideBorrowerDetails: {
483
+ type: BooleanConstructor;
484
+ default: boolean;
485
+ };
485
486
  boldName: {
486
487
  type: BooleanConstructor;
487
488
  default: boolean;
@@ -545,6 +546,10 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
545
546
  type: BooleanConstructor;
546
547
  default: boolean;
547
548
  };
549
+ hideBorrowerDetails: {
550
+ type: BooleanConstructor;
551
+ default: boolean;
552
+ };
548
553
  boldName: {
549
554
  type: BooleanConstructor;
550
555
  default: boolean;
@@ -575,6 +580,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
575
580
  distributionModel: string;
576
581
  whySpecial: string;
577
582
  hideLoanAmount: boolean;
583
+ hideBorrowerDetails: boolean;
578
584
  boldName: boolean;
579
585
  country: string;
580
586
  useIndicativeHelpText: boolean;
@@ -1,27 +1,28 @@
1
- import A from "graphql-tag";
2
- import W from "numeral";
3
- import { ref as $, computed as o, watch as H } from "vue";
4
- import { mdiCached as j, mdiLink as q, mdiHome as z, mdiMapMarker as J } from "@mdi/js";
1
+ import b from "graphql-tag";
2
+ import $ from "numeral";
3
+ import { ref as j, computed as a, watch as q } from "vue";
4
+ import { mdiArrowRight as H, mdiCached as z, mdiLink 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
8
  import le from "./KvLoanUse.js";
9
- import re from "./KvBorrowerImage.js";
10
- import ie from "./KvLoanCallouts.js";
9
+ import ie from "./KvBorrowerImage.js";
10
+ import re from "./KvLoanCallouts.js";
11
11
  import se from "./KvLendCta.js";
12
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";
16
16
  import ce from "./KvLoanTeamPick.js";
17
- import ve from "./KvSelect.js";
18
- import { KV_LEND_CTA_FRAGMENT as he, KV_LEND_CTA_USER_FRAGMENT as Le } from "./KvLendCta2.js";
19
- import { KV_LOAN_TAG_FRAGMENT as ge } from "./KvLoanTag2.js";
17
+ import he from "./KvSelect.js";
18
+ import { KV_LEND_CTA_FRAGMENT as ve, KV_LEND_CTA_USER_FRAGMENT as ge } from "./KvLendCta2.js";
19
+ import { KV_LOAN_TAG_FRAGMENT as Le } from "./KvLoanTag2.js";
20
20
  import { KV_LOAN_USE_FRAGMENT as ye } from "./KvLoanUse2.js";
21
21
  const d = {
22
22
  default: "default",
23
- postGoal: "post-goal"
24
- }, pe = (e) => e < 500 && e >= 25, Ae = (e) => oe(e) || pe(e), $e = A`
23
+ postGoal: "post-goal",
24
+ lightDetailed: "light-detailed"
25
+ }, Ae = (e) => e < 500 && e >= 25, Ce = (e) => oe(e) || Ae(e), $e = b`
25
26
  fragment KvCompactLoanCard on LoanBasic {
26
27
  id
27
28
  image {
@@ -43,31 +44,31 @@ const d = {
43
44
  ...LoanGeocode
44
45
  ...LoanProgress
45
46
  }
46
- ${he}
47
- ${ge}
47
+ ${ve}
48
+ ${Le}
48
49
  ${ye}
49
50
  ${Q}
50
51
  ${X}
51
52
  ${Y}
52
- `, He = A`
53
+ `, je = b`
53
54
  fragment KvCompactLoanCardUser on LoanBasic {
54
55
  id
55
56
  ...KvLendCtaUser
56
57
  }
57
- ${Le}
58
- `, je = {
58
+ ${ge}
59
+ `, qe = {
59
60
  name: "KvCompactLoanCard",
60
61
  components: {
61
- KvBorrowerImage: re,
62
+ KvBorrowerImage: ie,
62
63
  KvLoadingPlaceholder: fe,
63
64
  KvLoanUse: le,
64
65
  KvMaterialIcon: me,
65
66
  KvLendCta: se,
66
67
  KvLoanTag: de,
67
- KvLoanCallouts: ie,
68
+ KvLoanCallouts: re,
68
69
  KvLoanTeamPick: ce,
69
70
  KvLoanProgressGroup: ue,
70
- KvSelect: ve
71
+ KvSelect: he
71
72
  },
72
73
  props: {
73
74
  variant: {
@@ -220,125 +221,127 @@ const d = {
220
221
  "show-loan-details",
221
222
  "update:selected-amount"
222
223
  ],
223
- setup(e, { emit: a }) {
224
- const n = $(""), s = o(
224
+ setup(e, { emit: o }) {
225
+ const l = j(""), m = a(
225
226
  () => e.variant === d.postGoal
227
+ ), s = a(
228
+ () => e.variant === d.lightDetailed
229
+ ), c = a(
230
+ () => m.value || s.value
231
+ ), w = a(
232
+ () => e.showRefreshButton && !s.value
226
233
  ), {
227
- allDataLoaded: C,
228
- borrowerName: m,
229
- city: b,
230
- countryName: N,
231
- distributionModel: f,
232
- formattedLocation: c,
233
- fundraisingPercent: S,
234
+ allDataLoaded: S,
235
+ borrowerName: h,
236
+ distributionModel: v,
237
+ formattedLocation: g,
238
+ fundraisingPercent: B,
234
239
  hasProgressData: _,
235
- imageHash: w,
236
- isLoading: B,
237
- loanAmount: v,
238
- loanBorrowerCount: h,
239
- loanCallouts: T,
240
- loanStatus: L,
241
- loanUse: g,
242
- readMorePath: k,
243
- state: M,
240
+ imageHash: N,
241
+ isLoading: T,
242
+ loanAmount: f,
243
+ loanBorrowerCount: L,
244
+ loanCallouts: k,
245
+ loanStatus: y,
246
+ loanUse: A,
247
+ readMorePath: R,
244
248
  tag: F,
245
249
  unreservedAmount: u,
246
- sharesAvailable: K
247
- } = Z(e), { clickReadMore: R } = ee(e, a), P = o(() => s.value ? void 0 : { width: "100px", height: "100px" }), E = o(() => {
250
+ sharesAvailable: M
251
+ } = Z(e), { clickReadMore: K } = ee(e, o), P = a(() => c.value ? void 0 : { width: "100px", height: "100px" }), D = a(() => {
248
252
  if (!e.website)
249
253
  return "";
250
254
  const t = e.website.trim();
251
255
  return t.startsWith("http://") || t.startsWith("https://") ? t : `https://${t}`;
252
- }), G = o(() => {
253
- if (s.value) return {};
254
- const t = e.showLightView ? "auto" : "6.75rem", l = e.showLightView ? "none" : "6.75rem";
255
- return { height: t, maxHeight: l };
256
- }), r = o(() => {
256
+ }), E = a(() => {
257
+ if (c.value) return {};
258
+ const t = e.showLightView ? "auto" : "6.75rem", n = e.showLightView ? "none" : "6.75rem";
259
+ return { height: t, maxHeight: n };
260
+ }), G = a(() => $(f.value).format("$0,0")), i = a(() => {
257
261
  var t;
258
262
  return ne({
259
263
  anonymizationLevel: (t = e.loan) == null ? void 0 : t.anonymizationLevel,
260
- borrowerName: m.value,
261
- distributionModel: f.value,
262
- formattedLocation: c.value,
263
- loanAmount: v.value,
264
- loanBorrowerCount: h.value,
265
- loanStatus: L.value,
266
- loanUse: g.value
264
+ borrowerName: h.value,
265
+ distributionModel: v.value,
266
+ formattedLocation: g.value,
267
+ loanAmount: f.value,
268
+ loanBorrowerCount: L.value,
269
+ loanStatus: y.value,
270
+ loanUse: A.value
267
271
  });
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(() => {
269
- var i;
272
+ }), O = a(() => i.value.borrowerNameWithCountry), U = a(() => i.value.loanUsePrefixStart), V = a(() => i.value.loanUsePrefixEnd), x = a(() => i.value.statementTitle), I = a(() => i.value.visibleUseStatement), C = a(() => {
273
+ var r;
270
274
  const t = parseFloat(u.value);
271
275
  if (!t) return [];
272
- const l = t < 25 ? parseFloat(`${((i = e.loan) == null ? void 0 : i.minNoteSize) ?? 25}`) : 25;
276
+ const n = t < 25 ? parseFloat(`${((r = e.loan) == null ? void 0 : r.minNoteSize) ?? 25}`) : 25;
273
277
  return te(
274
278
  u.value,
275
- Ae(t),
276
- l,
279
+ Ce(t),
280
+ n,
277
281
  e.enableFiveDollarsNotes,
278
282
  e.isVisitor
279
283
  );
280
284
  });
281
- H(
282
- y,
285
+ q(
286
+ C,
283
287
  (t) => {
284
- var i, p;
285
- if (!s.value) return;
288
+ var r, p;
289
+ if (!m.value) return;
286
290
  if (!t.length) {
287
- n.value = "";
291
+ l.value = "";
288
292
  return;
289
293
  }
290
- const l = ae(
294
+ const n = ae(
291
295
  e.getCookie,
292
296
  e.setCookie,
293
297
  e.enableFiveDollarsNotes,
294
- (p = (i = e.route) == null ? void 0 : i.query) == null ? void 0 : p.utm_campaign,
298
+ (p = (r = e.route) == null ? void 0 : r.query) == null ? void 0 : p.utm_campaign,
295
299
  u.value,
296
300
  e.userBalance ? parseFloat(e.userBalance) : void 0,
297
301
  e.fiveDollarsSelected
298
302
  );
299
- n.value = t.includes(l) ? l : t[0];
303
+ l.value = t.includes(n) ? n : t[0];
300
304
  },
301
305
  { immediate: !0 }
302
306
  );
303
- const x = o(() => e.showLightView ? 3 : 4);
307
+ const W = a(() => s.value ? 2 : e.showLightView ? 3 : 4);
304
308
  return {
305
- allDataLoaded: C,
306
- amountOptions: y,
309
+ allDataLoaded: S,
310
+ amountOptions: C,
307
311
  borrowerImageStyle: P,
308
- borrowerName: m,
312
+ borrowerName: h,
309
313
  borrowerNameWithCountry: O,
310
- city: b,
311
- countryName: N,
312
- distributionModel: f,
313
- formattedLocation: c,
314
- formattedWebsite: E,
315
- fundraisingPercent: S,
314
+ lightDetailedAmount: G,
315
+ distributionModel: v,
316
+ formattedLocation: g,
317
+ formattedWebsite: D,
318
+ fundraisingPercent: B,
316
319
  hasProgressData: _,
317
- imageHash: w,
318
- isLoading: B,
319
- isPostGoalVariant: s,
320
- loanAmount: v,
321
- loanBorrowerCount: h,
322
- loanCallouts: T,
323
- loanStatus: L,
324
- loanUse: g,
325
- loanUsePrefixEnd: D,
320
+ imageHash: N,
321
+ isLightDetailedVariant: s,
322
+ isLoading: T,
323
+ isPostGoalVariant: m,
324
+ loanAmount: f,
325
+ loanBorrowerCount: L,
326
+ loanCallouts: k,
327
+ loanStatus: y,
328
+ loanUse: A,
329
+ loanUsePrefixEnd: V,
326
330
  loanUsePrefixStart: U,
327
- mdiMapMarker: J,
328
- mdiHome: z,
329
- mdiLink: q,
330
- mdiCached: j,
331
- readMorePath: k,
332
- state: M,
331
+ mdiLink: J,
332
+ mdiCached: z,
333
+ mdiArrowRight: H,
334
+ readMorePath: R,
335
+ shouldShowRefreshButton: w,
333
336
  tag: F,
334
337
  unreservedAmount: u,
335
- sharesAvailable: K,
336
- selectedAmount: n,
337
- statementTitle: V,
338
- customStyle: G,
339
- loanUseLoadingRows: x,
338
+ sharesAvailable: M,
339
+ selectedAmount: l,
340
+ statementTitle: x,
341
+ customStyle: E,
342
+ loanUseLoadingRows: W,
340
343
  visibleUseStatement: I,
341
- clickReadMore: R,
344
+ clickReadMore: K,
342
345
  trackWebsiteClick: () => {
343
346
  e.kvTrackFunction(
344
347
  "Lending",
@@ -348,41 +351,32 @@ const d = {
348
351
  );
349
352
  },
350
353
  handleRefreshButton: (t) => {
351
- a("refresh-button", t);
354
+ o("refresh-button", t);
352
355
  },
353
356
  handleSelectedAmount: (t) => {
354
- var l;
355
- n.value = t, a("update:selected-amount", t), e.kvTrackFunction(
357
+ var n;
358
+ l.value = t, o("update:selected-amount", t), e.kvTrackFunction(
356
359
  "Lending",
357
360
  "Modify lend amount",
358
361
  t,
359
- e.loanId ?? ((l = e.loan) == null ? void 0 : l.id)
362
+ e.loanId ?? ((n = e.loan) == null ? void 0 : n.id)
360
363
  );
361
364
  }
362
365
  };
363
366
  },
364
367
  computed: {
365
- lendersNumber() {
366
- var e, a;
367
- return ((a = (e = this.loan) == null ? void 0 : e.lenders) == null ? void 0 : a.totalCount) ?? 0;
368
- },
369
- amountLent() {
370
- var a, n;
371
- const e = ((n = (a = this.loan) == null ? void 0 : a.loanFundraisingInfo) == null ? void 0 : n.fundedAmount) ?? 0;
372
- return W(e).format("$0,0");
373
- },
374
368
  isInBasket() {
375
369
  var e;
376
- return ((e = this.basketItems) == null ? void 0 : e.some((a) => a.__typename === "LoanReservation" && a.id === this.loanId)) ?? !1;
370
+ return ((e = this.basketItems) == null ? void 0 : e.some((o) => o.__typename === "LoanReservation" && o.id === this.loanId)) ?? !1;
377
371
  },
378
372
  hasMatchingInfo() {
379
- var e, a, n;
380
- return !!((e = this.loan) != null && e.matchingText) || this.enableMultiMatching && (((n = (a = this.loan) == null ? void 0 : a.simultaneousMatching) == null ? void 0 : n.length) ?? 0) > 0;
373
+ var e, o, l;
374
+ return !!((e = this.loan) != null && e.matchingText) || this.enableMultiMatching && (((l = (o = this.loan) == null ? void 0 : o.simultaneousMatching) == null ? void 0 : l.length) ?? 0) > 0;
381
375
  }
382
376
  }
383
377
  };
384
378
  export {
385
379
  $e as KV_COMPACT_LOAN_CARD_FRAGMENT,
386
- He as KV_COMPACT_LOAN_CARD_USER_FRAGMENT,
387
- je as default
380
+ je as KV_COMPACT_LOAN_CARD_USER_FRAGMENT,
381
+ qe as default
388
382
  };
@@ -36,6 +36,10 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
36
36
  type: BooleanConstructor;
37
37
  default: boolean;
38
38
  };
39
+ hideBorrowerDetails: {
40
+ type: BooleanConstructor;
41
+ default: boolean;
42
+ };
39
43
  boldName: {
40
44
  type: BooleanConstructor;
41
45
  default: boolean;
@@ -99,6 +103,10 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
99
103
  type: BooleanConstructor;
100
104
  default: boolean;
101
105
  };
106
+ hideBorrowerDetails: {
107
+ type: BooleanConstructor;
108
+ default: boolean;
109
+ };
102
110
  boldName: {
103
111
  type: BooleanConstructor;
104
112
  default: boolean;
@@ -129,6 +137,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
129
137
  distributionModel: string;
130
138
  whySpecial: string;
131
139
  hideLoanAmount: boolean;
140
+ hideBorrowerDetails: boolean;
132
141
  boldName: boolean;
133
142
  country: string;
134
143
  useIndicativeHelpText: boolean;
@@ -1,7 +1,7 @@
1
- import r from "graphql-tag";
2
- import o from "numeral";
3
- import { truncateStringByWords as a } from "../utils/loanUtils.js";
4
- const n = "direct", d = r`
1
+ import u from "graphql-tag";
2
+ import l from "numeral";
3
+ import { truncateStringByWords as i } from "../utils/loanUtils.js";
4
+ const r = "direct", o = (e) => e.charAt(0).toUpperCase() + e.slice(1), t = (e) => e.charAt(0).toLowerCase() + e.slice(1), m = u`
5
5
  fragment KvLoanUse on LoanBasic {
6
6
  id
7
7
  anonymizationLevel
@@ -13,7 +13,7 @@ const n = "direct", d = r`
13
13
  distributionModel
14
14
  whySpecial
15
15
  }
16
- `, m = {
16
+ `, f = {
17
17
  name: "KvLoanUse",
18
18
  props: {
19
19
  anonymizationLevel: {
@@ -42,7 +42,7 @@ const n = "direct", d = r`
42
42
  },
43
43
  distributionModel: {
44
44
  type: String,
45
- default: n
45
+ default: r
46
46
  },
47
47
  whySpecial: {
48
48
  type: String,
@@ -52,6 +52,11 @@ const n = "direct", d = r`
52
52
  type: Boolean,
53
53
  default: !1
54
54
  },
55
+ // Unlike hideLoanAmount, this drops the name and country too and never shows a read-more link.
56
+ hideBorrowerDetails: {
57
+ type: Boolean,
58
+ default: !1
59
+ },
55
60
  boldName: {
56
61
  type: Boolean,
57
62
  default: !1
@@ -78,10 +83,10 @@ const n = "direct", d = r`
78
83
  return this.status === "fundraising" || this.status === "inactive" || this.status === "reviewed" ? "helps" : "helped";
79
84
  },
80
85
  isDirect() {
81
- return this.distributionModel === n;
86
+ return this.distributionModel === r;
82
87
  },
83
88
  whySpecialSentence() {
84
- return this.whySpecial ? ` This loan is special because ${this.whySpecial.charAt(0).toLowerCase() + this.whySpecial.slice(1)}` : "";
89
+ return this.whySpecial ? ` This loan is special because ${t(this.whySpecial)}` : "";
85
90
  },
86
91
  nameSpan() {
87
92
  return this.boldName ? this.country ? `<span class="data-hj-suppress tw-font-medium">${this.name} in ${this.country}</span>` : `<span class="data-hj-suppress tw-font-medium">${this.name}</span>` : `<span class="data-hj-suppress">${this.name}</span>`;
@@ -89,18 +94,20 @@ const n = "direct", d = r`
89
94
  loanUse() {
90
95
  if (this.anonymizationLevel === "full" || this.use.length === 0)
91
96
  return "For the borrower's privacy, this loan has been made anonymous.";
97
+ if (this.hideBorrowerDetails)
98
+ return `${o(this.helpLanguage)} ${t(this.use)}${this.whySpecialSentence}`;
92
99
  if (this.hideLoanAmount) {
93
- const t = this.useIndicativeHelpText ? this.helpLanguage : "Help";
94
- let s = `${t.charAt(0).toUpperCase() + t.slice(1)} ${this.nameSpan} ${this.use.charAt(0).toLowerCase() + this.use.slice(1)} ${this.whySpecialSentence}`;
95
- return this.showReadMore && (s = `${a(s, this.truncateWordsNumber)} <span class=" tw-text-action tw-underline">read more</span>`), s;
100
+ const n = this.useIndicativeHelpText ? this.helpLanguage : "Help";
101
+ let a = `${o(n)} ${this.nameSpan} ${t(this.use)} ${this.whySpecialSentence}`;
102
+ return this.showReadMore && (a = `${i(a, this.truncateWordsNumber)} <span class=" tw-text-action tw-underline">read more</span>`), a;
96
103
  }
97
- const i = this.borrowerCount > 1;
98
- let e = `${o(this.loanAmount).format("$0,0")} ${this.isDirect ? "to" : this.helpLanguage} ${i ? "a member of " : ""}${this.nameSpan} ${this.isDirect ? `${this.helpLanguage} ` : ""}${this.use.charAt(0).toLowerCase() + this.use.slice(1)}${this.whySpecialSentence}`;
99
- return this.showReadMore && (e = `${a(e, this.truncateWordsNumber)} <span class=" tw-text-action tw-underline">read more</span>`), e;
104
+ const e = this.borrowerCount > 1;
105
+ let s = `${l(this.loanAmount).format("$0,0")} ${this.isDirect ? "to" : this.helpLanguage} ${e ? "a member of " : ""}${this.nameSpan} ${this.isDirect ? `${this.helpLanguage} ` : ""}${t(this.use)}${this.whySpecialSentence}`;
106
+ return this.showReadMore && (s = `${i(s, this.truncateWordsNumber)} <span class=" tw-text-action tw-underline">read more</span>`), s;
100
107
  }
101
108
  }
102
109
  };
103
110
  export {
104
- d as KV_LOAN_USE_FRAGMENT,
105
- m as default
111
+ m as KV_LOAN_USE_FRAGMENT,
112
+ f as default
106
113
  };
@@ -25,7 +25,7 @@ function _(r, o, l, e, p, k) {
25
25
  class: i(["tw-rounded-full tw-relative tw-overflow-hidden peer-focus-visible:tw-ring-2 peer-focus-visible:tw-ring-action tw-bg-tertiary peer-checked:tw-bg-action tw-transition-all tw-ease-in-out", e.trackSizeClasses])
26
26
  }, null, 2),
27
27
  t("div", {
28
- class: i(["tw-flex-shrink-0 tw-absolute tw-m-0.5 tw-top-0 tw-rounded-full tw-bg-white tw-transform tw-transition-all tw-ease-in-out", e.knobSizeClasses])
28
+ class: i(["tw-flex-shrink-0 tw-absolute tw-mx-0.5 tw-top-1/2 -tw-translate-y-1/2 tw-rounded-full tw-bg-white tw-transform tw-transition-all tw-ease-in-out", e.knobSizeClasses])
29
29
  }, null, 2),
30
30
  t("div", g, [
31
31
  h(r.$slots, "default")
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kiva/kv-components",
3
- "version": "10.4.0",
3
+ "version": "10.5.0",
4
4
  "type": "module",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -112,5 +112,5 @@
112
112
  "dependencies": {
113
113
  "fuse.js": "^7.1.0"
114
114
  },
115
- "gitHead": "85f612013133d5c2488e0ea23e81c576d1d1663f"
115
+ "gitHead": "007bb466335bd646f36fb385eec7bd0dea54988c"
116
116
  }