@kiva/kv-components 8.26.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.
- package/dist/index.js +75 -74
- package/dist/utils/loanCard.js +106 -90
- package/dist/vue/KvClassicLoanCard.css +1 -1
- package/dist/vue/KvClassicLoanCard.js +94 -79
- package/dist/vue/KvClassicLoanCard2.js +52 -45
- package/dist/vue/KvDatePicker.vue.d.ts +3 -3
- package/dist/vue/KvIntroductionLoanCard.css +1 -1
- package/dist/vue/KvIntroductionLoanCard.js +86 -71
- package/dist/vue/KvIntroductionLoanCard2.js +48 -41
- package/dist/vue/KvLoanInfoCard.css +1 -1
- package/dist/vue/KvLoanInfoCard.js +137 -115
- package/dist/vue/KvWideLoanCard.css +1 -1
- package/dist/vue/KvWideLoanCard.js +74 -59
- package/dist/vue/KvWideLoanCard2.js +53 -46
- package/package.json +2 -2
- package/dist/utils/loanCard.d.ts +0 -35
- package/dist/vue/KvClassicLoanCard.vue.d.ts +0 -2252
- package/dist/vue/KvIntroductionLoanCard.vue.d.ts +0 -665
- package/dist/vue/KvWideLoanCard.vue.d.ts +0 -1275
package/dist/index.js
CHANGED
|
@@ -4,7 +4,7 @@ import { default as l } from "./vue/KvBorrowerImage.js";
|
|
|
4
4
|
import { default as s } from "./vue/KvButton.js";
|
|
5
5
|
import { default as d } from "./vue/KvCardFrame.js";
|
|
6
6
|
import { default as x } from "./vue/KvCarousel.js";
|
|
7
|
-
import { default as
|
|
7
|
+
import { default as K } from "./vue/KvCartModal.js";
|
|
8
8
|
import { default as A } from "./vue/KvCartPill.js";
|
|
9
9
|
import { default as C } from "./vue/KvCheckbox.js";
|
|
10
10
|
import { default as c } from "./vue/KvCheckoutReceipt.js";
|
|
@@ -31,7 +31,7 @@ import { default as le } from "./vue/KvImpactDashboardHeader.js";
|
|
|
31
31
|
import { default as se } from "./vue/KvImpactVerticalSelector.js";
|
|
32
32
|
import { default as de } from "./vue/KvInlineActivityCard.js";
|
|
33
33
|
import { default as xe } from "./vue/KvInlineActivityFeed.js";
|
|
34
|
-
import { default as
|
|
34
|
+
import { default as Ke } from "./vue/KvIntroductionLoanCard.js";
|
|
35
35
|
import { default as Ae } from "./vue/KvLendAmountButton.js";
|
|
36
36
|
import { default as Ce } from "./vue/KvLendCta.js";
|
|
37
37
|
import { default as ce } from "./vue/KvLightbox.js";
|
|
@@ -57,7 +57,7 @@ import { default as fo } from "./vue/KvPieChartV2.js";
|
|
|
57
57
|
import { default as mo } from "./vue/KvPill.js";
|
|
58
58
|
import { default as po } from "./vue/KvPopper.js";
|
|
59
59
|
import { default as xo } from "./vue/KvProgressBar.js";
|
|
60
|
-
import { default as
|
|
60
|
+
import { default as Ko } from "./vue/KvProgressCircle.js";
|
|
61
61
|
import { default as Ao } from "./vue/KvPulsingDot.js";
|
|
62
62
|
import { default as Co } from "./vue/KvRadio.js";
|
|
63
63
|
import { default as co } from "./vue/KvSelect.js";
|
|
@@ -83,7 +83,7 @@ import { default as ar } from "./vue/KvAtbModal.js";
|
|
|
83
83
|
import { default as lr } from "./vue/KvSecondaryNav.js";
|
|
84
84
|
import { default as sr } from "./vue/KvWwwHeader.js";
|
|
85
85
|
import { default as dr } from "./vue/KvWwwHeaderBasic/KvWwwHeaderBasic.js";
|
|
86
|
-
import { default as xr, Mash as
|
|
86
|
+
import { default as xr, Mash as nr } from "./utils/Alea.js";
|
|
87
87
|
import { groupBy as vr, sortBy as Ar } from "./utils/arrayUtils.js";
|
|
88
88
|
import { useAttrs as Cr } from "./utils/attrs.js";
|
|
89
89
|
import { carouselUtil as cr } from "./utils/carousels.js";
|
|
@@ -92,55 +92,55 @@ import { debounce as Mr } from "./utils/debounce.js";
|
|
|
92
92
|
import { useEventListener as Or } from "./utils/event.js";
|
|
93
93
|
import { collapse as gr, expand as Pr } from "./utils/expander.js";
|
|
94
94
|
import { DEFAULT_ACCEPTED_IMAGE_TYPES as Fr, cropResizeImageToDataUrl as hr, getKivaImageUrl as Dr, isLegacyPlaceholderAvatar as Br, randomizedUserAvatarClass as Vr, validateImageFile as yr } from "./utils/imageUtils.js";
|
|
95
|
-
import { LOAN_CALLOUTS_FRAGMENT as br, LOAN_GEOCODE_FRAGMENT as kr, LOAN_PROGRESS_FRAGMENT as wr, loanCardComputedProperties as Wr, loanCardMethods as Hr } from "./utils/loanCard.js";
|
|
96
|
-
import { BALANCE_CAMPAIGN as
|
|
97
|
-
import { animationCoordinator as
|
|
98
|
-
import { lockPrintSingleEl as
|
|
99
|
-
import { lockScroll as
|
|
100
|
-
import { buildTailwindClassName as
|
|
101
|
-
import { throttle as
|
|
102
|
-
import { isTargetElement as
|
|
103
|
-
import { getTreemap as
|
|
104
|
-
import { KvBlueskyIcon as
|
|
105
|
-
import { KV_CLASSIC_LOAN_CARD_FRAGMENT as
|
|
106
|
-
import { KV_COMPACT_LOAN_CARD_FRAGMENT as
|
|
107
|
-
import { KV_INTRODUCTION_LOAN_CARD_FRAGMENT as
|
|
108
|
-
import { KV_LEND_CTA_FRAGMENT as
|
|
109
|
-
import { KV_LOAN_ACTIVITIES_FRAGMENT as
|
|
110
|
-
import { KV_LOAN_BOOKMARK_FRAGMENT as
|
|
111
|
-
import { KV_LOAN_TAG_FRAGMENT as
|
|
112
|
-
import { KV_LOAN_USE_FRAGMENT as
|
|
113
|
-
import { KV_WIDE_LOAN_CARD_FRAGMENT as
|
|
95
|
+
import { LOAN_CALLOUTS_FRAGMENT as br, LOAN_GEOCODE_FRAGMENT as kr, LOAN_PROGRESS_FRAGMENT as wr, loanCardComputedProperties as Wr, loanCardMethods as Hr, useLocationTruncation as zr } from "./utils/loanCard.js";
|
|
96
|
+
import { BALANCE_CAMPAIGN as Qr, BASE_CAMPAIGN as Yr, ERL_COOKIE_NAME as Zr, NO_BALANCE_CAMPAIGN as qr, TOP_UP_CAMPAIGN as Jr, getDropdownPriceArray as Xr, getLendCtaSelectedOption as $r, isBetween25And50 as et, isLessThan25 as ot, truncateStringByWords as rt } from "./utils/loanUtils.js";
|
|
97
|
+
import { animationCoordinator as at, computeMapCenter as ft, computeMapZoom as lt, generateMapMarkers as mt, getCoordinatesBetween as st, getCountryColor as pt, getLoansIntervals as dt } from "./utils/mapUtils.js";
|
|
98
|
+
import { lockPrintSingleEl as xt, unlockPrintSingleEl as nt } from "./utils/printing.js";
|
|
99
|
+
import { lockScroll as vt, lockScrollSmallOnly as At, unlockScroll as it, unlockScrollSmallOnly as Ct } from "./utils/scrollLock.js";
|
|
100
|
+
import { buildTailwindClassName as ct, headerNumberCase as Tt, kebabCase as Lt, removeObjectProperty as Nt } from "./utils/themeUtils.js";
|
|
101
|
+
import { throttle as Rt } from "./utils/throttle.js";
|
|
102
|
+
import { isTargetElement as It, offBodyTouchstart as Ot, onBodyTouchstart as St } from "./utils/touchEvents.js";
|
|
103
|
+
import { getTreemap as Pt } from "./utils/treemap.js";
|
|
104
|
+
import { KvBlueskyIcon as Ft } from "./assets/icons/bluesky.js";
|
|
105
|
+
import { KV_CLASSIC_LOAN_CARD_FRAGMENT as Dt, KV_CLASSIC_LOAN_CARD_USER_FRAGMET as Bt } from "./vue/KvClassicLoanCard2.js";
|
|
106
|
+
import { KV_COMPACT_LOAN_CARD_FRAGMENT as yt, KV_COMPACT_LOAN_CARD_USER_FRAGMENT as Ut } from "./vue/KvCompactLoanCard2.js";
|
|
107
|
+
import { KV_INTRODUCTION_LOAN_CARD_FRAGMENT as kt, KV_INTRODUCTION_LOAN_CARD_USER_FRAGMENT as wt } from "./vue/KvIntroductionLoanCard2.js";
|
|
108
|
+
import { KV_LEND_CTA_FRAGMENT as Ht, KV_LEND_CTA_USER_FRAGMENT as zt } from "./vue/KvLendCta2.js";
|
|
109
|
+
import { KV_LOAN_ACTIVITIES_FRAGMENT as Qt } from "./vue/KvLoanActivities2.js";
|
|
110
|
+
import { KV_LOAN_BOOKMARK_FRAGMENT as Zt } from "./vue/KvLoanBookmark2.js";
|
|
111
|
+
import { KV_LOAN_TAG_FRAGMENT as Jt } from "./vue/KvLoanTag2.js";
|
|
112
|
+
import { KV_LOAN_USE_FRAGMENT as $t } from "./vue/KvLoanUse2.js";
|
|
113
|
+
import { KV_WIDE_LOAN_CARD_FRAGMENT as oa, KV_WIDE_LOAN_CARD_USER_FRAGMENT as ra } from "./vue/KvWideLoanCard2.js";
|
|
114
114
|
export {
|
|
115
115
|
xr as Alea,
|
|
116
|
-
|
|
117
|
-
|
|
116
|
+
Qr as BALANCE_CAMPAIGN,
|
|
117
|
+
Yr as BASE_CAMPAIGN,
|
|
118
118
|
Fr as DEFAULT_ACCEPTED_IMAGE_TYPES,
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
119
|
+
Zr as ERL_COOKIE_NAME,
|
|
120
|
+
Dt as KV_CLASSIC_LOAN_CARD_FRAGMENT,
|
|
121
|
+
Bt as KV_CLASSIC_LOAN_CARD_USER_FRAGMET,
|
|
122
|
+
yt as KV_COMPACT_LOAN_CARD_FRAGMENT,
|
|
123
|
+
Ut as KV_COMPACT_LOAN_CARD_USER_FRAGMENT,
|
|
124
|
+
kt as KV_INTRODUCTION_LOAN_CARD_FRAGMENT,
|
|
125
|
+
wt as KV_INTRODUCTION_LOAN_CARD_USER_FRAGMENT,
|
|
126
|
+
Ht as KV_LEND_CTA_FRAGMENT,
|
|
127
|
+
zt as KV_LEND_CTA_USER_FRAGMENT,
|
|
128
|
+
Qt as KV_LOAN_ACTIVITIES_FRAGMENT,
|
|
129
|
+
Zt as KV_LOAN_BOOKMARK_FRAGMENT,
|
|
130
130
|
ge as KV_LOAN_INFO_CARD_FRAGMENT,
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
131
|
+
Jt as KV_LOAN_TAG_FRAGMENT,
|
|
132
|
+
$t as KV_LOAN_USE_FRAGMENT,
|
|
133
|
+
oa as KV_WIDE_LOAN_CARD_FRAGMENT,
|
|
134
|
+
ra as KV_WIDE_LOAN_CARD_USER_FRAGMENT,
|
|
135
135
|
r as KvAccordionItem,
|
|
136
136
|
a as KvActivityRow,
|
|
137
137
|
ar as KvAtbModal,
|
|
138
|
-
|
|
138
|
+
Ft as KvBlueskyIcon,
|
|
139
139
|
l as KvBorrowerImage,
|
|
140
140
|
s as KvButton,
|
|
141
141
|
d as KvCardFrame,
|
|
142
142
|
x as KvCarousel,
|
|
143
|
-
|
|
143
|
+
K as KvCartModal,
|
|
144
144
|
A as KvCartPill,
|
|
145
145
|
C as KvCheckbox,
|
|
146
146
|
c as KvCheckoutReceipt,
|
|
@@ -167,7 +167,7 @@ export {
|
|
|
167
167
|
se as KvImpactVerticalSelector,
|
|
168
168
|
de as KvInlineActivityCard,
|
|
169
169
|
xe as KvInlineActivityFeed,
|
|
170
|
-
|
|
170
|
+
Ke as KvIntroductionLoanCard,
|
|
171
171
|
Ae as KvLendAmountButton,
|
|
172
172
|
Ce as KvLendCta,
|
|
173
173
|
ce as KvLightbox,
|
|
@@ -192,7 +192,7 @@ export {
|
|
|
192
192
|
mo as KvPill,
|
|
193
193
|
po as KvPopper,
|
|
194
194
|
xo as KvProgressBar,
|
|
195
|
-
|
|
195
|
+
Ko as KvProgressCircle,
|
|
196
196
|
Ao as KvPulsingDot,
|
|
197
197
|
Co as KvRadio,
|
|
198
198
|
lr as KvSecondaryNav,
|
|
@@ -221,52 +221,53 @@ export {
|
|
|
221
221
|
br as LOAN_CALLOUTS_FRAGMENT,
|
|
222
222
|
kr as LOAN_GEOCODE_FRAGMENT,
|
|
223
223
|
wr as LOAN_PROGRESS_FRAGMENT,
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
224
|
+
nr as Mash,
|
|
225
|
+
qr as NO_BALANCE_CAMPAIGN,
|
|
226
|
+
Jr as TOP_UP_CAMPAIGN,
|
|
227
227
|
Lr as abc,
|
|
228
|
-
|
|
229
|
-
|
|
228
|
+
at as animationCoordinator,
|
|
229
|
+
ct as buildTailwindClassName,
|
|
230
230
|
cr as carouselUtil,
|
|
231
231
|
gr as collapse,
|
|
232
|
-
|
|
233
|
-
|
|
232
|
+
ft as computeMapCenter,
|
|
233
|
+
lt as computeMapZoom,
|
|
234
234
|
hr as cropResizeImageToDataUrl,
|
|
235
235
|
Mr as debounce,
|
|
236
236
|
Pr as expand,
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
237
|
+
mt as generateMapMarkers,
|
|
238
|
+
st as getCoordinatesBetween,
|
|
239
|
+
pt as getCountryColor,
|
|
240
|
+
Xr as getDropdownPriceArray,
|
|
241
241
|
Dr as getKivaImageUrl,
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
242
|
+
$r as getLendCtaSelectedOption,
|
|
243
|
+
dt as getLoansIntervals,
|
|
244
|
+
Pt as getTreemap,
|
|
245
245
|
vr as groupBy,
|
|
246
|
-
|
|
246
|
+
Tt as headerNumberCase,
|
|
247
247
|
Nr as indexIn,
|
|
248
|
-
|
|
248
|
+
et as isBetween25And50,
|
|
249
249
|
Br as isLegacyPlaceholderAvatar,
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
250
|
+
ot as isLessThan25,
|
|
251
|
+
It as isTargetElement,
|
|
252
|
+
Lt as kebabCase,
|
|
253
253
|
Wr as loanCardComputedProperties,
|
|
254
254
|
Hr as loanCardMethods,
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
255
|
+
xt as lockPrintSingleEl,
|
|
256
|
+
vt as lockScroll,
|
|
257
|
+
At as lockScrollSmallOnly,
|
|
258
|
+
Ot as offBodyTouchstart,
|
|
259
|
+
St as onBodyTouchstart,
|
|
260
260
|
Vr as randomizedUserAvatarClass,
|
|
261
|
-
|
|
261
|
+
Nt as removeObjectProperty,
|
|
262
262
|
Ar as sortBy,
|
|
263
263
|
Er as startsWith,
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
264
|
+
Rt as throttle,
|
|
265
|
+
rt as truncateStringByWords,
|
|
266
|
+
nt as unlockPrintSingleEl,
|
|
267
|
+
it as unlockScroll,
|
|
268
|
+
Ct as unlockScrollSmallOnly,
|
|
269
269
|
Cr as useAttrs,
|
|
270
270
|
Or as useEventListener,
|
|
271
|
+
zr as useLocationTruncation,
|
|
271
272
|
yr as validateImageFile
|
|
272
273
|
};
|
package/dist/utils/loanCard.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import { toRefs as
|
|
4
|
-
import { mdiMapMarker as
|
|
5
|
-
import
|
|
6
|
-
const
|
|
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
|
-
`,
|
|
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
|
-
`,
|
|
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
|
|
46
|
+
function we(i, d = !1) {
|
|
47
47
|
const {
|
|
48
|
-
externalLinks:
|
|
49
|
-
customLoanDetails:
|
|
48
|
+
externalLinks: s,
|
|
49
|
+
customLoanDetails: c,
|
|
50
50
|
loanId: g,
|
|
51
51
|
loan: t,
|
|
52
|
-
categoryPageName:
|
|
52
|
+
categoryPageName: m,
|
|
53
53
|
customCallouts: E,
|
|
54
|
-
customHref:
|
|
55
|
-
} =
|
|
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 =
|
|
59
|
-
var e,
|
|
60
|
-
return ((l = (
|
|
61
|
-
}),
|
|
62
|
-
var e,
|
|
63
|
-
return ((l = (
|
|
64
|
-
}),
|
|
65
|
-
var e,
|
|
66
|
-
return ((
|
|
67
|
-
}),
|
|
68
|
-
var e,
|
|
69
|
-
return ((
|
|
70
|
-
}), M =
|
|
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
|
-
}),
|
|
74
|
-
var e,
|
|
75
|
-
return ((
|
|
76
|
-
}), U =
|
|
77
|
-
var e,
|
|
78
|
-
return typeof ((e = t.value) == null ? void 0 : e.loanAmount) < "u" && typeof ((l = (
|
|
79
|
-
}),
|
|
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 =
|
|
82
|
-
return `${
|
|
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" ? `${
|
|
85
|
-
}),
|
|
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
|
-
}),
|
|
88
|
+
}), he = a(() => {
|
|
89
89
|
var e;
|
|
90
90
|
return ((e = t.value) == null ? void 0 : e.status) ?? "";
|
|
91
|
-
}),
|
|
91
|
+
}), L = a(() => {
|
|
92
92
|
var e;
|
|
93
93
|
return ((e = t.value) == null ? void 0 : e.loanAmount) ?? "0";
|
|
94
|
-
}), N =
|
|
95
|
-
var e,
|
|
96
|
-
return
|
|
97
|
-
}),
|
|
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 =
|
|
101
|
-
var
|
|
102
|
-
const e = [],
|
|
103
|
-
ecoFriendly: !!
|
|
104
|
-
refugeesIdps: !!
|
|
105
|
-
singleParents: !!
|
|
106
|
-
}, O = (
|
|
107
|
-
if (O &&
|
|
108
|
-
const
|
|
109
|
-
e.push({ label:
|
|
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 (
|
|
112
|
-
const
|
|
113
|
-
e.filter((I) => I.label.toUpperCase() ===
|
|
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 (
|
|
116
|
-
const
|
|
117
|
-
!e.filter((I) => I.label.toUpperCase() ===
|
|
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
|
|
121
|
-
return e.push(...
|
|
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:
|
|
125
|
-
readMorePath:
|
|
126
|
-
isLoading:
|
|
127
|
-
borrowerName:
|
|
124
|
+
tag: ie,
|
|
125
|
+
readMorePath: ce,
|
|
126
|
+
isLoading: F,
|
|
127
|
+
borrowerName: de,
|
|
128
128
|
countryName: h,
|
|
129
|
-
countryCode:
|
|
130
|
-
city:
|
|
131
|
-
state:
|
|
129
|
+
countryCode: pe,
|
|
130
|
+
city: y,
|
|
131
|
+
state: _,
|
|
132
132
|
distributionModel: M,
|
|
133
|
-
imageHash:
|
|
133
|
+
imageHash: ve,
|
|
134
134
|
hasProgressData: U,
|
|
135
|
-
allDataLoaded:
|
|
136
|
-
fundraisingPercent:
|
|
137
|
-
unreservedAmount:
|
|
135
|
+
allDataLoaded: fe,
|
|
136
|
+
fundraisingPercent: S,
|
|
137
|
+
unreservedAmount: Ce,
|
|
138
138
|
sharesAvailable: G,
|
|
139
|
-
formattedLocation:
|
|
140
|
-
loanUse:
|
|
141
|
-
loanStatus:
|
|
142
|
-
loanAmount:
|
|
143
|
-
loanBorrowerCount:
|
|
144
|
-
mdiMapMarker:
|
|
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
|
|
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:
|
|
151
|
-
customLoanDetails:
|
|
165
|
+
loanId: s,
|
|
166
|
+
customLoanDetails: c,
|
|
152
167
|
kvTrackFunction: g
|
|
153
|
-
} =
|
|
154
|
-
function t(
|
|
155
|
-
g.value("Lending", "click-Read more",
|
|
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
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
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-
|
|
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}
|