@kiva/kv-components 8.25.0 → 8.26.1

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