@kiva/kv-components 7.2.5 → 7.3.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 +148 -146
- package/dist/utils/loanCard.js +46 -46
- package/dist/vue/KvImpactVerticalSelector.js +1 -1
- package/dist/vue/KvLoanInfoCard.css +1 -0
- package/dist/vue/KvLoanInfoCard.js +259 -0
- package/dist/vue/KvLoanUse.js +26 -20
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { default as t } from "./vue/KvAccordionItem.js";
|
|
2
2
|
import { default as r } from "./vue/KvActivityRow.js";
|
|
3
3
|
import { default as l } from "./vue/KvBorrowerImage.js";
|
|
4
|
-
import { default as
|
|
4
|
+
import { default as s } from "./vue/KvButton.js";
|
|
5
5
|
import { default as p } from "./vue/KvCardFrame.js";
|
|
6
6
|
import { default as x } from "./vue/KvCarousel.js";
|
|
7
7
|
import { default as n } from "./vue/KvCartModal.js";
|
|
@@ -10,7 +10,7 @@ import { default as i } from "./vue/KvCheckbox.js";
|
|
|
10
10
|
import { default as L } from "./vue/KvCheckoutReceipt.js";
|
|
11
11
|
import { default as T } from "./vue/KvChip.js";
|
|
12
12
|
import { KV_CLASSIC_LOAN_CARD_FRAGMENT as E, KV_CLASSIC_LOAN_CARD_USER_FRAGMET as R, default as M } from "./vue/KvClassicLoanCard.js";
|
|
13
|
-
import { KV_COMPACT_LOAN_CARD_FRAGMENT as
|
|
13
|
+
import { KV_COMPACT_LOAN_CARD_FRAGMENT as I, KV_COMPACT_LOAN_CARD_USER_FRAGMENT as S, default as P } from "./vue/KvCompactLoanCard.js";
|
|
14
14
|
import { default as G } from "./vue/KvCommentsAdd.js";
|
|
15
15
|
import { default as F } from "./vue/KvCommentsContainer.js";
|
|
16
16
|
import { default as D } from "./vue/KvCommentsHeartButton.js";
|
|
@@ -26,7 +26,7 @@ import { default as ee } from "./vue/KvFlag.js";
|
|
|
26
26
|
import { default as te } from "./vue/KvGrid.js";
|
|
27
27
|
import { default as re } from "./vue/KvImpactDashboardHeader.js";
|
|
28
28
|
import { default as le } from "./vue/KvImpactVerticalSelector.js";
|
|
29
|
-
import { default as
|
|
29
|
+
import { default as se } from "./vue/KvInlineActivityCard.js";
|
|
30
30
|
import { default as pe } from "./vue/KvInlineActivityFeed.js";
|
|
31
31
|
import { KV_INTRODUCTION_LOAN_CARD_FRAGMENT as xe, KV_INTRODUCTION_LOAN_CARD_USER_FRAGMENT as Ke, default as ne } from "./vue/KvIntroductionLoanCard.js";
|
|
32
32
|
import { default as Ae } from "./vue/KvLendAmountButton.js";
|
|
@@ -34,85 +34,86 @@ import { KV_LEND_CTA_FRAGMENT as ie, KV_LEND_CTA_USER_FRAGMENT as _e, default as
|
|
|
34
34
|
import { default as Te } from "./vue/KvLightbox.js";
|
|
35
35
|
import { default as Ee } from "./vue/KvLineGraph.js";
|
|
36
36
|
import { KV_LOAN_ACTIVITIES_FRAGMENT as Me, default as Oe } from "./vue/KvLoanActivities.js";
|
|
37
|
-
import { KV_LOAN_BOOKMARK_FRAGMENT as
|
|
37
|
+
import { KV_LOAN_BOOKMARK_FRAGMENT as Se, default as Pe } from "./vue/KvLoanBookmark.js";
|
|
38
38
|
import { default as Ge } from "./vue/KvLoanCallouts.js";
|
|
39
|
-
import { default as Fe } from "./vue/
|
|
40
|
-
import {
|
|
41
|
-
import { default as Ue } from "./vue/
|
|
42
|
-
import {
|
|
43
|
-
import { default as He } from "./vue/
|
|
44
|
-
import { default as ze } from "./vue/
|
|
45
|
-
import { default as qe } from "./vue/
|
|
46
|
-
import { default as Xe } from "./vue/
|
|
47
|
-
import { default as Ze } from "./vue/
|
|
48
|
-
import { default as eo } from "./vue/
|
|
49
|
-
import { default as to } from "./vue/
|
|
50
|
-
import { default as ro } from "./vue/
|
|
51
|
-
import { default as lo } from "./vue/
|
|
52
|
-
import { default as mo } from "./vue/
|
|
53
|
-
import { default as uo } from "./vue/
|
|
54
|
-
import { default as Ko } from "./vue/
|
|
55
|
-
import { default as vo } from "./vue/
|
|
56
|
-
import { default as Co } from "./vue/
|
|
57
|
-
import { default as _o } from "./vue/
|
|
58
|
-
import { default as No } from "./vue/
|
|
59
|
-
import { default as co } from "./vue/
|
|
60
|
-
import { default as Ro } from "./vue/
|
|
61
|
-
import { default as Oo } from "./vue/
|
|
62
|
-
import { default as
|
|
63
|
-
import { default as go } from "./vue/
|
|
64
|
-
import { default as ho } from "./vue/
|
|
65
|
-
import { default as Vo } from "./vue/
|
|
66
|
-
import { default as ko } from "./vue/
|
|
67
|
-
import { default as Uo } from "./vue/
|
|
68
|
-
import { default as bo } from "./vue/
|
|
69
|
-
import { default as Wo } from "./vue/
|
|
70
|
-
import { default as jo } from "./vue/
|
|
71
|
-
import { default as Qo } from "./vue/
|
|
72
|
-
import {
|
|
73
|
-
import { default as $o } from "./vue/
|
|
74
|
-
import { default as ot } from "./vue/
|
|
75
|
-
import { default as at } from "./vue/
|
|
76
|
-
import { default as ft
|
|
77
|
-
import {
|
|
78
|
-
import {
|
|
79
|
-
import {
|
|
80
|
-
import {
|
|
81
|
-
import {
|
|
82
|
-
import {
|
|
83
|
-
import {
|
|
84
|
-
import {
|
|
85
|
-
import {
|
|
86
|
-
import {
|
|
87
|
-
import {
|
|
88
|
-
import {
|
|
89
|
-
import {
|
|
90
|
-
import {
|
|
39
|
+
import { default as Fe } from "./vue/KvLoanInfoCard.js";
|
|
40
|
+
import { default as De } from "./vue/KvLoanProgressGroup.js";
|
|
41
|
+
import { KV_LOAN_TAG_FRAGMENT as Be, default as Ue } from "./vue/KvLoanTag.js";
|
|
42
|
+
import { default as be } from "./vue/KvLoanTeamPick.js";
|
|
43
|
+
import { KV_LOAN_USE_FRAGMENT as We, default as He } from "./vue/KvLoanUse.js";
|
|
44
|
+
import { default as ze } from "./vue/KvLoadingPlaceholder.js";
|
|
45
|
+
import { default as qe } from "./vue/KvLoadingSpinner.js";
|
|
46
|
+
import { default as Xe } from "./vue/KvMap.js";
|
|
47
|
+
import { default as Ze } from "./vue/KvMaterialIcon.js";
|
|
48
|
+
import { default as eo } from "./vue/KvPageContainer.js";
|
|
49
|
+
import { default as to } from "./vue/KvPagination.js";
|
|
50
|
+
import { default as ro } from "./vue/KvPieChart.js";
|
|
51
|
+
import { default as lo } from "./vue/KvPill.js";
|
|
52
|
+
import { default as mo } from "./vue/KvPopper.js";
|
|
53
|
+
import { default as uo } from "./vue/KvProgressBar.js";
|
|
54
|
+
import { default as Ko } from "./vue/KvPulsingDot.js";
|
|
55
|
+
import { default as vo } from "./vue/KvRadio.js";
|
|
56
|
+
import { default as Co } from "./vue/KvSelect.js";
|
|
57
|
+
import { default as _o } from "./vue/KvSideSheet.js";
|
|
58
|
+
import { default as No } from "./vue/KvSwitch.js";
|
|
59
|
+
import { default as co } from "./vue/KvTab.js";
|
|
60
|
+
import { default as Ro } from "./vue/KvTabPanel.js";
|
|
61
|
+
import { default as Oo } from "./vue/KvTabs.js";
|
|
62
|
+
import { default as So } from "./vue/KvTextInput.js";
|
|
63
|
+
import { default as go } from "./vue/KvTextLink.js";
|
|
64
|
+
import { default as ho } from "./vue/KvThemeProvider.js";
|
|
65
|
+
import { default as Vo } from "./vue/KvToast.js";
|
|
66
|
+
import { default as ko } from "./vue/KvTooltip.js";
|
|
67
|
+
import { default as Uo } from "./vue/KvTreeMapChart.js";
|
|
68
|
+
import { default as bo } from "./vue/KvUserAvatar.js";
|
|
69
|
+
import { default as Wo } from "./vue/KvUtilityMenu.js";
|
|
70
|
+
import { default as jo } from "./vue/KvVerticalCarousel.js";
|
|
71
|
+
import { default as Qo } from "./vue/KvVotingCard.js";
|
|
72
|
+
import { default as Jo } from "./vue/KvVotingCardV2.js";
|
|
73
|
+
import { KV_WIDE_LOAN_CARD_FRAGMENT as Yo, KV_WIDE_LOAN_CARD_USER_FRAGMENT as Zo, default as $o } from "./vue/KvWideLoanCard.js";
|
|
74
|
+
import { default as ot } from "./vue/KvAtbModal.js";
|
|
75
|
+
import { default as at } from "./vue/KvSecondaryNav.js";
|
|
76
|
+
import { default as ft } from "./vue/KvWwwHeader.js";
|
|
77
|
+
import { default as dt, Mash as st } from "./utils/Alea.js";
|
|
78
|
+
import { useAttrs as pt } from "./utils/attrs.js";
|
|
79
|
+
import { carouselUtil as xt } from "./utils/carousels.js";
|
|
80
|
+
import { collapse as nt, expand as vt } from "./utils/expander.js";
|
|
81
|
+
import { getKivaImageUrl as Ct, isLegacyPlaceholderAvatar as it, randomizedUserAvatarClass as _t } from "./utils/imageUtils.js";
|
|
82
|
+
import { LOAN_CALLOUTS_FRAGMENT as Nt, LOAN_GEOCODE_FRAGMENT as Tt, LOAN_PROGRESS_FRAGMENT as ct, loanCardComputedProperties as Et, loanCardMethods as Rt } from "./utils/loanCard.js";
|
|
83
|
+
import { BALANCE_CAMPAIGN as Ot, BASE_CAMPAIGN as It, ERL_COOKIE_NAME as St, NO_BALANCE_CAMPAIGN as Pt, TOP_UP_CAMPAIGN as gt, getDropdownPriceArray as Gt, getLendCtaSelectedOption as ht, isBetween25And50 as Ft, isLessThan25 as Vt } from "./utils/loanUtils.js";
|
|
84
|
+
import { animationCoordinator as kt, generateMapMarkers as Bt, getCoordinatesBetween as Ut, getCountryColor as yt, getLoansIntervals as bt } from "./utils/mapUtils.js";
|
|
85
|
+
import { lockPrintSingleEl as Wt, unlockPrintSingleEl as Ht } from "./utils/printing.js";
|
|
86
|
+
import { lockScroll as zt, lockScrollSmallOnly as Qt, unlockScroll as qt, unlockScrollSmallOnly as Jt } from "./utils/scrollLock.js";
|
|
87
|
+
import { buildTailwindClassName as Yt, headerNumberCase as Zt, kebabCase as $t, removeObjectProperty as ea } from "./utils/themeUtils.js";
|
|
88
|
+
import { throttle as ta } from "./utils/throttle.js";
|
|
89
|
+
import { isTargetElement as ra, offBodyTouchstart as fa, onBodyTouchstart as la } from "./utils/touchEvents.js";
|
|
90
|
+
import { getTreemap as sa } from "./utils/treemap.js";
|
|
91
|
+
import { KvBlueskyIcon as pa } from "./assets/icons/bluesky.js";
|
|
91
92
|
export {
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
93
|
+
dt as Alea,
|
|
94
|
+
Ot as BALANCE_CAMPAIGN,
|
|
95
|
+
It as BASE_CAMPAIGN,
|
|
96
|
+
St as ERL_COOKIE_NAME,
|
|
96
97
|
E as KV_CLASSIC_LOAN_CARD_FRAGMENT,
|
|
97
98
|
R as KV_CLASSIC_LOAN_CARD_USER_FRAGMET,
|
|
98
|
-
|
|
99
|
-
|
|
99
|
+
I as KV_COMPACT_LOAN_CARD_FRAGMENT,
|
|
100
|
+
S as KV_COMPACT_LOAN_CARD_USER_FRAGMENT,
|
|
100
101
|
xe as KV_INTRODUCTION_LOAN_CARD_FRAGMENT,
|
|
101
102
|
Ke as KV_INTRODUCTION_LOAN_CARD_USER_FRAGMENT,
|
|
102
103
|
ie as KV_LEND_CTA_FRAGMENT,
|
|
103
104
|
_e as KV_LEND_CTA_USER_FRAGMENT,
|
|
104
105
|
Me as KV_LOAN_ACTIVITIES_FRAGMENT,
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
106
|
+
Se as KV_LOAN_BOOKMARK_FRAGMENT,
|
|
107
|
+
Be as KV_LOAN_TAG_FRAGMENT,
|
|
108
|
+
We as KV_LOAN_USE_FRAGMENT,
|
|
109
|
+
Yo as KV_WIDE_LOAN_CARD_FRAGMENT,
|
|
110
|
+
Zo as KV_WIDE_LOAN_CARD_USER_FRAGMENT,
|
|
110
111
|
t as KvAccordionItem,
|
|
111
112
|
r as KvActivityRow,
|
|
112
|
-
|
|
113
|
-
|
|
113
|
+
ot as KvAtbModal,
|
|
114
|
+
pa as KvBlueskyIcon,
|
|
114
115
|
l as KvBorrowerImage,
|
|
115
|
-
|
|
116
|
+
s as KvButton,
|
|
116
117
|
p as KvCardFrame,
|
|
117
118
|
x as KvCarousel,
|
|
118
119
|
n as KvCartModal,
|
|
@@ -137,89 +138,90 @@ export {
|
|
|
137
138
|
te as KvGrid,
|
|
138
139
|
re as KvImpactDashboardHeader,
|
|
139
140
|
le as KvImpactVerticalSelector,
|
|
140
|
-
|
|
141
|
+
se as KvInlineActivityCard,
|
|
141
142
|
pe as KvInlineActivityFeed,
|
|
142
143
|
ne as KvIntroductionLoanCard,
|
|
143
144
|
Ae as KvLendAmountButton,
|
|
144
145
|
Le as KvLendCta,
|
|
145
146
|
Te as KvLightbox,
|
|
146
147
|
Ee as KvLineGraph,
|
|
147
|
-
|
|
148
|
-
|
|
148
|
+
ze as KvLoadingPlaceholder,
|
|
149
|
+
qe as KvLoadingSpinner,
|
|
149
150
|
Oe as KvLoanActivities,
|
|
150
151
|
Pe as KvLoanBookmark,
|
|
151
152
|
Ge as KvLoanCallouts,
|
|
152
|
-
Fe as
|
|
153
|
-
|
|
154
|
-
Ue as
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
Xe as
|
|
158
|
-
Ze as
|
|
159
|
-
eo as
|
|
160
|
-
to as
|
|
161
|
-
ro as
|
|
162
|
-
lo as
|
|
163
|
-
mo as
|
|
164
|
-
uo as
|
|
165
|
-
Ko as
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
Co as
|
|
169
|
-
_o as
|
|
170
|
-
No as
|
|
171
|
-
co as
|
|
172
|
-
Ro as
|
|
173
|
-
Oo as
|
|
174
|
-
|
|
175
|
-
go as
|
|
176
|
-
ho as
|
|
177
|
-
Vo as
|
|
178
|
-
ko as
|
|
179
|
-
Uo as
|
|
180
|
-
bo as
|
|
181
|
-
Wo as
|
|
182
|
-
jo as
|
|
183
|
-
Qo as
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
xt as
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
ea as
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
153
|
+
Fe as KvLoanInfoCard,
|
|
154
|
+
De as KvLoanProgressGroup,
|
|
155
|
+
Ue as KvLoanTag,
|
|
156
|
+
be as KvLoanTeamPick,
|
|
157
|
+
He as KvLoanUse,
|
|
158
|
+
Xe as KvMap,
|
|
159
|
+
Ze as KvMaterialIcon,
|
|
160
|
+
eo as KvPageContainer,
|
|
161
|
+
to as KvPagination,
|
|
162
|
+
ro as KvPieChart,
|
|
163
|
+
lo as KvPill,
|
|
164
|
+
mo as KvPopper,
|
|
165
|
+
uo as KvProgressBar,
|
|
166
|
+
Ko as KvPulsingDot,
|
|
167
|
+
vo as KvRadio,
|
|
168
|
+
at as KvSecondaryNav,
|
|
169
|
+
Co as KvSelect,
|
|
170
|
+
_o as KvSideSheet,
|
|
171
|
+
No as KvSwitch,
|
|
172
|
+
co as KvTab,
|
|
173
|
+
Ro as KvTabPanel,
|
|
174
|
+
Oo as KvTabs,
|
|
175
|
+
So as KvTextInput,
|
|
176
|
+
go as KvTextLink,
|
|
177
|
+
ho as KvThemeProvider,
|
|
178
|
+
Vo as KvToast,
|
|
179
|
+
ko as KvTooltip,
|
|
180
|
+
Uo as KvTreeMapChart,
|
|
181
|
+
bo as KvUserAvatar,
|
|
182
|
+
Wo as KvUtilityMenu,
|
|
183
|
+
jo as KvVerticalCarousel,
|
|
184
|
+
Qo as KvVotingCard,
|
|
185
|
+
Jo as KvVotingCardV2,
|
|
186
|
+
$o as KvWideLoanCard,
|
|
187
|
+
ft as KvWwwHeader,
|
|
188
|
+
Nt as LOAN_CALLOUTS_FRAGMENT,
|
|
189
|
+
Tt as LOAN_GEOCODE_FRAGMENT,
|
|
190
|
+
ct as LOAN_PROGRESS_FRAGMENT,
|
|
191
|
+
st as Mash,
|
|
192
|
+
Pt as NO_BALANCE_CAMPAIGN,
|
|
193
|
+
gt as TOP_UP_CAMPAIGN,
|
|
194
|
+
kt as animationCoordinator,
|
|
195
|
+
Yt as buildTailwindClassName,
|
|
196
|
+
xt as carouselUtil,
|
|
197
|
+
nt as collapse,
|
|
198
|
+
vt as expand,
|
|
199
|
+
Bt as generateMapMarkers,
|
|
200
|
+
Ut as getCoordinatesBetween,
|
|
201
|
+
yt as getCountryColor,
|
|
202
|
+
Gt as getDropdownPriceArray,
|
|
203
|
+
Ct as getKivaImageUrl,
|
|
204
|
+
ht as getLendCtaSelectedOption,
|
|
205
|
+
bt as getLoansIntervals,
|
|
206
|
+
sa as getTreemap,
|
|
207
|
+
Zt as headerNumberCase,
|
|
208
|
+
Ft as isBetween25And50,
|
|
209
|
+
it as isLegacyPlaceholderAvatar,
|
|
210
|
+
Vt as isLessThan25,
|
|
211
|
+
ra as isTargetElement,
|
|
212
|
+
$t as kebabCase,
|
|
213
|
+
Et as loanCardComputedProperties,
|
|
214
|
+
Rt as loanCardMethods,
|
|
215
|
+
Wt as lockPrintSingleEl,
|
|
216
|
+
zt as lockScroll,
|
|
217
|
+
Qt as lockScrollSmallOnly,
|
|
218
|
+
fa as offBodyTouchstart,
|
|
219
|
+
la as onBodyTouchstart,
|
|
220
|
+
_t as randomizedUserAvatarClass,
|
|
221
|
+
ea as removeObjectProperty,
|
|
222
|
+
ta as throttle,
|
|
223
|
+
Ht as unlockPrintSingleEl,
|
|
224
|
+
qt as unlockScroll,
|
|
225
|
+
Jt as unlockScrollSmallOnly,
|
|
226
|
+
pt as useAttrs
|
|
225
227
|
};
|
package/dist/utils/loanCard.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import R from "graphql-tag";
|
|
2
2
|
import oe from "numeral";
|
|
3
3
|
import { toRefs as re, computed as n } from "vue";
|
|
4
|
-
import { mdiMapMarker as
|
|
4
|
+
import { mdiMapMarker as Le } from "@mdi/js";
|
|
5
5
|
import Ue from "./Alea.js";
|
|
6
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`
|
|
7
7
|
fragment LoanCallouts on LoanBasic {
|
|
@@ -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
|
+
`, Me = R`
|
|
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
|
+
`, Te = R`
|
|
36
36
|
fragment LoanProgress on LoanBasic {
|
|
37
37
|
id
|
|
38
38
|
loanAmount
|
|
@@ -43,31 +43,31 @@ const Ne = "N/A", ne = "ECO-FRIENDLY", le = "SUSTAINABLE AG", se = "SINGLE PAREN
|
|
|
43
43
|
}
|
|
44
44
|
}
|
|
45
45
|
`;
|
|
46
|
-
function
|
|
46
|
+
function Ge(c, f = !1) {
|
|
47
47
|
const {
|
|
48
48
|
externalLinks: p,
|
|
49
|
-
customLoanDetails:
|
|
50
|
-
loanId:
|
|
49
|
+
customLoanDetails: m,
|
|
50
|
+
loanId: g,
|
|
51
51
|
loan: t,
|
|
52
52
|
categoryPageName: v,
|
|
53
|
-
customCallouts:
|
|
53
|
+
customCallouts: E,
|
|
54
54
|
customHref: F
|
|
55
|
-
} = re(c), ue = n(() => p.value ? "a" : "router-link"), ie = n(() => p.value && F.value ? F.value :
|
|
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(() => {
|
|
56
56
|
var e;
|
|
57
57
|
return ((e = t.value) == null ? void 0 : e.name) || "";
|
|
58
|
-
}),
|
|
58
|
+
}), h = n(() => {
|
|
59
59
|
var e, a, l;
|
|
60
60
|
return ((l = (a = (e = t.value) == null ? void 0 : e.geocode) == null ? void 0 : a.country) == null ? void 0 : l.name) || "";
|
|
61
61
|
}), de = n(() => {
|
|
62
62
|
var e, a, l;
|
|
63
63
|
return ((l = (a = (e = t.value) == null ? void 0 : e.geocode) == null ? void 0 : a.country) == null ? void 0 : l.isoCode) || "";
|
|
64
|
-
}),
|
|
64
|
+
}), L = n(() => {
|
|
65
65
|
var e, a;
|
|
66
66
|
return ((a = (e = t.value) == null ? void 0 : e.geocode) == null ? void 0 : a.city) || "";
|
|
67
67
|
}), S = n(() => {
|
|
68
68
|
var e, a;
|
|
69
69
|
return ((a = (e = t.value) == null ? void 0 : e.geocode) == null ? void 0 : a.state) || "";
|
|
70
|
-
}),
|
|
70
|
+
}), M = n(() => {
|
|
71
71
|
var e;
|
|
72
72
|
return ((e = t.value) == null ? void 0 : e.distributionModel) || "";
|
|
73
73
|
}), pe = n(() => {
|
|
@@ -77,82 +77,82 @@ function Te(c, f = !1) {
|
|
|
77
77
|
var e, a, l, u, d;
|
|
78
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
79
|
}), ve = n(() => !_.value && U.value), fe = n(() => {
|
|
80
|
-
if (
|
|
81
|
-
const e = f &&
|
|
82
|
-
return `${
|
|
80
|
+
if (M.value === "direct") {
|
|
81
|
+
const e = f && h.value.toLowerCase() === "united states" ? "" : `, ${h.value}`;
|
|
82
|
+
return `${L.value}, ${S.value}${e}`;
|
|
83
83
|
}
|
|
84
|
-
return
|
|
84
|
+
return h.value === "Puerto Rico" ? `${L.value}, PR` : h.value;
|
|
85
85
|
}), me = n(() => {
|
|
86
86
|
var e;
|
|
87
87
|
return ((e = t.value) == null ? void 0 : e.use) ?? "";
|
|
88
88
|
}), ge = n(() => {
|
|
89
89
|
var e;
|
|
90
90
|
return ((e = t.value) == null ? void 0 : e.status) ?? "";
|
|
91
|
-
}),
|
|
91
|
+
}), A = n(() => {
|
|
92
92
|
var e;
|
|
93
93
|
return ((e = t.value) == null ? void 0 : e.loanAmount) ?? "0";
|
|
94
94
|
}), N = n(() => {
|
|
95
95
|
var e, a, l, u;
|
|
96
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
|
-
}),
|
|
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(() => {
|
|
98
98
|
var e;
|
|
99
99
|
return ((e = t.value) == null ? void 0 : e.borrowerCount) ?? 0;
|
|
100
100
|
}), Ae = n(() => {
|
|
101
101
|
var Y, w, B, $, K, x, H, q, j, z, J, Q, V, W, X, Z, ee, te, ae;
|
|
102
|
-
const e = [], a = new Ue(
|
|
102
|
+
const e = [], a = new Ue(g.value, T.value), l = ((w = (Y = t.value) == null ? void 0 : Y.activity) == null ? void 0 : w.name) ?? "", u = (($ = (B = t.value) == null ? void 0 : B.activity) == null ? void 0 : $.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
103
|
ecoFriendly: !!i.filter((o) => o.toUpperCase() === ne || o.toUpperCase() === le).length,
|
|
104
|
-
refugeesIdps: !!
|
|
104
|
+
refugeesIdps: !!y.filter((o) => o.toUpperCase() === be).length,
|
|
105
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) ?? [],
|
|
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
107
|
if (O && i.length) {
|
|
108
|
-
const o = Math.floor(a() * i.length), s = i[o], r = P(k, s),
|
|
109
|
-
e.push({ label: s, type: "tag", id:
|
|
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 });
|
|
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 &&
|
|
112
|
-
const o = Math.floor(a() * i.length), s = i[o], r = P(k, s),
|
|
113
|
-
e.filter((I) => I.label.toUpperCase() === s.toUpperCase()).length || e.push({ label: s, type: "tag", id:
|
|
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 });
|
|
114
114
|
}
|
|
115
|
-
if (
|
|
116
|
-
const o = Math.floor(a() *
|
|
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:
|
|
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 });
|
|
118
118
|
}
|
|
119
119
|
if (O && e.length > 1) return [e.shift()];
|
|
120
|
-
const
|
|
121
|
-
return e.push(...
|
|
120
|
+
const Ee = ((ae = E.value) == null ? void 0 : ae.map((o) => ({ label: o }))) ?? [];
|
|
121
|
+
return e.push(...Ee), e;
|
|
122
122
|
});
|
|
123
123
|
return {
|
|
124
124
|
tag: ue,
|
|
125
125
|
readMorePath: ie,
|
|
126
126
|
isLoading: _,
|
|
127
127
|
borrowerName: ce,
|
|
128
|
-
countryName:
|
|
128
|
+
countryName: h,
|
|
129
129
|
countryCode: de,
|
|
130
|
-
city:
|
|
130
|
+
city: L,
|
|
131
131
|
state: S,
|
|
132
|
-
distributionModel:
|
|
132
|
+
distributionModel: M,
|
|
133
133
|
imageHash: pe,
|
|
134
134
|
hasProgressData: U,
|
|
135
135
|
allDataLoaded: ve,
|
|
136
|
-
fundraisingPercent:
|
|
136
|
+
fundraisingPercent: T,
|
|
137
137
|
unreservedAmount: he,
|
|
138
|
-
sharesAvailable:
|
|
138
|
+
sharesAvailable: G,
|
|
139
139
|
formattedLocation: fe,
|
|
140
140
|
loanUse: me,
|
|
141
141
|
loanStatus: ge,
|
|
142
|
-
loanAmount:
|
|
142
|
+
loanAmount: A,
|
|
143
143
|
loanBorrowerCount: Ce,
|
|
144
|
-
mdiMapMarker:
|
|
144
|
+
mdiMapMarker: Le,
|
|
145
145
|
loanCallouts: Ae
|
|
146
146
|
};
|
|
147
147
|
}
|
|
148
|
-
function
|
|
148
|
+
function De(c, f) {
|
|
149
149
|
const {
|
|
150
150
|
loanId: p,
|
|
151
|
-
customLoanDetails:
|
|
152
|
-
kvTrackFunction:
|
|
151
|
+
customLoanDetails: m,
|
|
152
|
+
kvTrackFunction: g
|
|
153
153
|
} = re(c);
|
|
154
|
-
function t(v,
|
|
155
|
-
|
|
154
|
+
function t(v, E) {
|
|
155
|
+
g.value("Lending", "click-Read more", v, p.value), m.value && (E.preventDefault(), f("show-loan-details"));
|
|
156
156
|
}
|
|
157
157
|
return {
|
|
158
158
|
clickReadMore: t
|
|
@@ -160,8 +160,8 @@ function Ge(c, f) {
|
|
|
160
160
|
}
|
|
161
161
|
export {
|
|
162
162
|
Se as LOAN_CALLOUTS_FRAGMENT,
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
163
|
+
Me as LOAN_GEOCODE_FRAGMENT,
|
|
164
|
+
Te as LOAN_PROGRESS_FRAGMENT,
|
|
165
|
+
Ge as loanCardComputedProperties,
|
|
166
|
+
De as loanCardMethods
|
|
167
167
|
};
|
|
@@ -63,7 +63,7 @@ const G = {
|
|
|
63
63
|
return ((L = (E = (S = (I = (y = u == null ? void 0 : u.fields) == null ? void 0 : y.contentLight) == null ? void 0 : I[0]) == null ? void 0 : S.fields) == null ? void 0 : E.file) == null ? void 0 : L.url) ?? null;
|
|
64
64
|
}
|
|
65
65
|
return null;
|
|
66
|
-
}, h = o(() => s.useCompactCard ? "tw-p-
|
|
66
|
+
}, h = o(() => s.useCompactCard ? "tw-p-1 md:tw-p-2 tw-flex tw-flex-row tw-items-center tw-cursor-pointer" : "tw-p-2 tw-flex tw-flex-row md:tw-flex-col tw-items-center tw-cursor-pointer"), c = o(() => s.useCompactCard ? "tw-shrink-0 tw-mr-2" : "tw-shrink-0 tw-mr-2 md:tw-mr-0 md:tw-mb-2"), m = o(() => s.useCompactCard ? "" : "md:tw-text-center"), t = (e) => s.existingCategories.includes(e), x = o(() => !s.categoryList || s.categoryList.length === 0 ? [] : s.categoryList.filter((e) => !s.hiddenCategories.includes(e.id)).map((e) => ({
|
|
67
67
|
id: e.id,
|
|
68
68
|
name: e.name,
|
|
69
69
|
description: e.description,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.loan-card-active-hover[data-v-4dc95254]:hover{cursor:pointer}.loan-card-use[data-v-4dc95254]:hover,.loan-card-use[data-v-4dc95254]: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-4dc95254]{text-decoration-line:underline}.loan-card-progress[data-v-4dc95254]:hover,.loan-card-progress[data-v-4dc95254]:focus{text-decoration-line:none}
|
|
@@ -0,0 +1,259 @@
|
|
|
1
|
+
import A from "graphql-tag";
|
|
2
|
+
import { LOAN_GEOCODE_FRAGMENT as B, loanCardComputedProperties as z, loanCardMethods as W } from "../utils/loanCard.js";
|
|
3
|
+
import D, { KV_LOAN_USE_FRAGMENT as K } from "./KvLoanUse.js";
|
|
4
|
+
import R from "./KvBorrowerImage.js";
|
|
5
|
+
import T from "./KvMaterialIcon.js";
|
|
6
|
+
import E from "./KvLoadingPlaceholder.js";
|
|
7
|
+
import { resolveComponent as c, openBlock as t, createElementBlock as i, normalizeClass as v, normalizeStyle as F, createElementVNode as d, createBlock as h, resolveDynamicComponent as _, withCtx as k, createVNode as s, createTextVNode as U, toDisplayString as b, createCommentVNode as V, Fragment as I, renderList as O, withModifiers as G } from "vue";
|
|
8
|
+
import "./KvLoanInfoCard.css";
|
|
9
|
+
import H from "../_virtual/_plugin-vue_export-helper.js";
|
|
10
|
+
A`
|
|
11
|
+
fragment KvClassicLoanCard on LoanBasic {
|
|
12
|
+
id
|
|
13
|
+
gender
|
|
14
|
+
image {
|
|
15
|
+
id
|
|
16
|
+
hash # for imageHash
|
|
17
|
+
}
|
|
18
|
+
name # for borrowerName
|
|
19
|
+
...KvLoanUse
|
|
20
|
+
...LoanGeocode
|
|
21
|
+
}
|
|
22
|
+
${K}
|
|
23
|
+
${B}
|
|
24
|
+
`;
|
|
25
|
+
const q = {
|
|
26
|
+
name: "KvClassicLoanCard",
|
|
27
|
+
components: {
|
|
28
|
+
KvBorrowerImage: R,
|
|
29
|
+
KvLoadingPlaceholder: E,
|
|
30
|
+
KvLoanUse: D,
|
|
31
|
+
KvMaterialIcon: T
|
|
32
|
+
},
|
|
33
|
+
props: {
|
|
34
|
+
loanId: {
|
|
35
|
+
type: Number,
|
|
36
|
+
default: void 0
|
|
37
|
+
},
|
|
38
|
+
loan: {
|
|
39
|
+
type: Object,
|
|
40
|
+
default: null
|
|
41
|
+
},
|
|
42
|
+
customLoanDetails: {
|
|
43
|
+
type: Boolean,
|
|
44
|
+
default: !0
|
|
45
|
+
},
|
|
46
|
+
kvTrackFunction: {
|
|
47
|
+
type: Function,
|
|
48
|
+
required: !0
|
|
49
|
+
},
|
|
50
|
+
photoPath: {
|
|
51
|
+
type: String,
|
|
52
|
+
required: !0
|
|
53
|
+
},
|
|
54
|
+
externalLinks: {
|
|
55
|
+
type: Boolean,
|
|
56
|
+
default: !1
|
|
57
|
+
},
|
|
58
|
+
useFullWidth: {
|
|
59
|
+
type: Boolean,
|
|
60
|
+
default: !1
|
|
61
|
+
},
|
|
62
|
+
largeCard: {
|
|
63
|
+
type: Boolean,
|
|
64
|
+
default: !1
|
|
65
|
+
},
|
|
66
|
+
errorMsg: {
|
|
67
|
+
type: String,
|
|
68
|
+
default: ""
|
|
69
|
+
},
|
|
70
|
+
primaryLinkText: {
|
|
71
|
+
type: String,
|
|
72
|
+
default: "Learn more"
|
|
73
|
+
},
|
|
74
|
+
customHref: {
|
|
75
|
+
type: String,
|
|
76
|
+
default: ""
|
|
77
|
+
}
|
|
78
|
+
},
|
|
79
|
+
setup(m, { emit: a }) {
|
|
80
|
+
const {
|
|
81
|
+
allDataLoaded: o,
|
|
82
|
+
borrowerName: e,
|
|
83
|
+
city: y,
|
|
84
|
+
countryName: n,
|
|
85
|
+
distributionModel: l,
|
|
86
|
+
formattedLocation: w,
|
|
87
|
+
imageHash: u,
|
|
88
|
+
isLoading: f,
|
|
89
|
+
loanAmount: r,
|
|
90
|
+
loanStatus: g,
|
|
91
|
+
loanUse: p,
|
|
92
|
+
mdiMapMarker: x,
|
|
93
|
+
readMorePath: L,
|
|
94
|
+
state: C,
|
|
95
|
+
tag: M,
|
|
96
|
+
unreservedAmount: S,
|
|
97
|
+
sharesAvailable: N
|
|
98
|
+
} = z(m), {
|
|
99
|
+
clickReadMore: P
|
|
100
|
+
} = W(m, a);
|
|
101
|
+
return {
|
|
102
|
+
allDataLoaded: o,
|
|
103
|
+
borrowerName: e,
|
|
104
|
+
city: y,
|
|
105
|
+
countryName: n,
|
|
106
|
+
distributionModel: l,
|
|
107
|
+
formattedLocation: w,
|
|
108
|
+
imageHash: u,
|
|
109
|
+
isLoading: f,
|
|
110
|
+
loanAmount: r,
|
|
111
|
+
loanStatus: g,
|
|
112
|
+
loanUse: p,
|
|
113
|
+
mdiMapMarker: x,
|
|
114
|
+
readMorePath: L,
|
|
115
|
+
state: C,
|
|
116
|
+
tag: M,
|
|
117
|
+
unreservedAmount: S,
|
|
118
|
+
sharesAvailable: N,
|
|
119
|
+
clickReadMore: P
|
|
120
|
+
};
|
|
121
|
+
},
|
|
122
|
+
computed: {
|
|
123
|
+
cardWidth() {
|
|
124
|
+
return this.useFullWidth ? "100%" : "374px";
|
|
125
|
+
},
|
|
126
|
+
imageAspectRatio() {
|
|
127
|
+
return this.largeCard ? 5 / 8 : 3 / 4;
|
|
128
|
+
},
|
|
129
|
+
imageDefaultWidth() {
|
|
130
|
+
return this.largeCard ? 480 : 336;
|
|
131
|
+
},
|
|
132
|
+
imageSizes() {
|
|
133
|
+
return this.largeCard ? [{ width: 480 }] : [
|
|
134
|
+
{ width: this.imageDefaultWidth, viewSize: 1024 },
|
|
135
|
+
{ width: this.imageDefaultWidth, viewSize: 768 },
|
|
136
|
+
{ width: 416, viewSize: 480 },
|
|
137
|
+
{ width: 374, viewSize: 414 },
|
|
138
|
+
{ width: 335, viewSize: 375 }
|
|
139
|
+
];
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
}, j = { class: "tw-grow" }, J = { class: "loan-card-active-hover" }, Q = {
|
|
143
|
+
key: 1,
|
|
144
|
+
class: "tw-relative"
|
|
145
|
+
}, X = { key: 0 }, Y = {
|
|
146
|
+
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-h4 tw-inline-flex tw-items-center",
|
|
147
|
+
style: { padding: "2px 6px", "text-transform": "capitalize" }
|
|
148
|
+
}, Z = { class: "tw-mb-1.5 tw-pt-1" }, $ = {
|
|
149
|
+
key: 0,
|
|
150
|
+
class: "tw-w-full",
|
|
151
|
+
style: { height: "5.5rem" }
|
|
152
|
+
}, ee = { key: 1 }, te = { class: "tw-mt-1" }, ae = {
|
|
153
|
+
key: 0,
|
|
154
|
+
class: "tw-w-full",
|
|
155
|
+
style: { height: "1rem" }
|
|
156
|
+
};
|
|
157
|
+
function oe(m, a, o, e, y, n) {
|
|
158
|
+
const l = c("kv-loading-placeholder"), w = c("kv-borrower-image"), u = c("kv-material-icon"), f = c("kv-loan-use");
|
|
159
|
+
return t(), i("div", {
|
|
160
|
+
class: v(["tw-flex tw-flex-col tw-bg-white tw-rounded tw-w-full tw-pb-1 tw-p-1", { "tw-pointer-events-none": e.isLoading }]),
|
|
161
|
+
"data-testid": "loan-card",
|
|
162
|
+
style: F([{ "box-shadow": "0 4px 12px rgba(0, 0, 0, 0.08)" }, { minWidth: "230px", maxWidth: n.cardWidth }])
|
|
163
|
+
}, [
|
|
164
|
+
d("div", j, [
|
|
165
|
+
d("div", J, [
|
|
166
|
+
e.isLoading ? (t(), h(l, {
|
|
167
|
+
key: 0,
|
|
168
|
+
class: v(["tw-mb-1 tw-w-full", { "tw-rounded-t tw-rounded-b-none": o.largeCard, "tw-rounded": !o.largeCard }]),
|
|
169
|
+
style: { height: "15rem" }
|
|
170
|
+
}, null, 8, ["class"])) : (t(), i("div", Q, [
|
|
171
|
+
(t(), h(_(e.tag), {
|
|
172
|
+
to: e.readMorePath,
|
|
173
|
+
href: e.readMorePath,
|
|
174
|
+
class: "tw-flex",
|
|
175
|
+
"aria-label": "Borrower image",
|
|
176
|
+
onClick: a[0] || (a[0] = (r) => e.clickReadMore("Photo", r))
|
|
177
|
+
}, {
|
|
178
|
+
default: k(() => [
|
|
179
|
+
s(w, {
|
|
180
|
+
class: v(["tw-relative tw-w-full tw-bg-black", { "tw-rounded-t": o.largeCard, "tw-rounded": !o.largeCard }]),
|
|
181
|
+
alt: `Photo of ${e.borrowerName}`,
|
|
182
|
+
"aspect-ratio": n.imageAspectRatio,
|
|
183
|
+
"default-image": { width: n.imageDefaultWidth },
|
|
184
|
+
hash: e.imageHash,
|
|
185
|
+
images: n.imageSizes,
|
|
186
|
+
"photo-path": o.photoPath
|
|
187
|
+
}, null, 8, ["class", "alt", "aspect-ratio", "default-image", "hash", "images", "photo-path"]),
|
|
188
|
+
e.countryName ? (t(), i("div", X, [
|
|
189
|
+
d("p", Y, [
|
|
190
|
+
s(u, {
|
|
191
|
+
class: "tw-h-2 tw-w-2",
|
|
192
|
+
icon: e.mdiMapMarker
|
|
193
|
+
}, null, 8, ["icon"]),
|
|
194
|
+
U(" " + b(e.formattedLocation), 1)
|
|
195
|
+
])
|
|
196
|
+
])) : V("", !0)
|
|
197
|
+
]),
|
|
198
|
+
_: 1
|
|
199
|
+
}, 8, ["to", "href"]))
|
|
200
|
+
])),
|
|
201
|
+
(t(), h(_(e.tag), {
|
|
202
|
+
to: e.readMorePath,
|
|
203
|
+
href: e.readMorePath,
|
|
204
|
+
class: "loan-card-use tw-no-underline tw-text-primary",
|
|
205
|
+
"aria-label": "Loan use",
|
|
206
|
+
onClick: a[1] || (a[1] = (r) => e.clickReadMore("Use", r))
|
|
207
|
+
}, {
|
|
208
|
+
default: k(() => [
|
|
209
|
+
d("div", Z, [
|
|
210
|
+
e.isLoading ? (t(), i("div", $, [
|
|
211
|
+
(t(!0), i(I, null, O([...Array(4)], (r, g) => (t(), i("div", {
|
|
212
|
+
key: g,
|
|
213
|
+
class: "tw-h-2 tw-mb-1"
|
|
214
|
+
}, [
|
|
215
|
+
s(l)
|
|
216
|
+
]))), 128))
|
|
217
|
+
])) : (t(), i("div", ee, [
|
|
218
|
+
s(f, {
|
|
219
|
+
use: e.loanUse,
|
|
220
|
+
"hide-loan-amount": !0,
|
|
221
|
+
"loan-amount": e.loanAmount,
|
|
222
|
+
status: e.loanStatus,
|
|
223
|
+
"borrower-count": m.loanBorrowerCount,
|
|
224
|
+
name: e.borrowerName,
|
|
225
|
+
"distribution-model": e.distributionModel,
|
|
226
|
+
"use-indicative-help-text": !0
|
|
227
|
+
}, null, 8, ["use", "loan-amount", "status", "borrower-count", "name", "distribution-model"])
|
|
228
|
+
]))
|
|
229
|
+
])
|
|
230
|
+
]),
|
|
231
|
+
_: 1
|
|
232
|
+
}, 8, ["to", "href"])),
|
|
233
|
+
(t(), h(_(e.tag), {
|
|
234
|
+
to: e.readMorePath,
|
|
235
|
+
href: e.readMorePath,
|
|
236
|
+
class: "loan-card-learn-more tw-no-underline hover:tw-no-underline tw-font-medium tw-text-action hover:tw-text-action-highlight",
|
|
237
|
+
"aria-label": o.primaryLinkText,
|
|
238
|
+
onClick: a[3] || (a[3] = (r) => e.clickReadMore(o.primaryLinkText, r))
|
|
239
|
+
}, {
|
|
240
|
+
default: k(() => [
|
|
241
|
+
d("div", te, [
|
|
242
|
+
e.isLoading ? (t(), i("div", ae, [
|
|
243
|
+
s(l)
|
|
244
|
+
])) : (t(), i("div", {
|
|
245
|
+
key: 1,
|
|
246
|
+
onClick: a[2] || (a[2] = G((r) => e.clickReadMore("ViewLoan", r), ["prevent"]))
|
|
247
|
+
}, b(o.primaryLinkText), 1))
|
|
248
|
+
])
|
|
249
|
+
]),
|
|
250
|
+
_: 1
|
|
251
|
+
}, 8, ["to", "href", "aria-label"]))
|
|
252
|
+
])
|
|
253
|
+
])
|
|
254
|
+
], 6);
|
|
255
|
+
}
|
|
256
|
+
const we = /* @__PURE__ */ H(q, [["render", oe], ["__scopeId", "data-v-4dc95254"]]);
|
|
257
|
+
export {
|
|
258
|
+
we as default
|
|
259
|
+
};
|
package/dist/vue/KvLoanUse.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import { openBlock as
|
|
4
|
-
import
|
|
5
|
-
const
|
|
1
|
+
import i from "graphql-tag";
|
|
2
|
+
import o from "numeral";
|
|
3
|
+
import { openBlock as r, createElementBlock as l } from "vue";
|
|
4
|
+
import u from "../_virtual/_plugin-vue_export-helper.js";
|
|
5
|
+
const n = "direct", g = i`
|
|
6
6
|
fragment KvLoanUse on LoanBasic {
|
|
7
7
|
id
|
|
8
8
|
anonymizationLevel
|
|
@@ -14,7 +14,7 @@ const t = "direct", w = s`
|
|
|
14
14
|
distributionModel
|
|
15
15
|
whySpecial
|
|
16
16
|
}
|
|
17
|
-
`,
|
|
17
|
+
`, p = {
|
|
18
18
|
name: "KvLoanUse",
|
|
19
19
|
props: {
|
|
20
20
|
anonymizationLevel: {
|
|
@@ -43,7 +43,7 @@ const t = "direct", w = s`
|
|
|
43
43
|
},
|
|
44
44
|
distributionModel: {
|
|
45
45
|
type: String,
|
|
46
|
-
default:
|
|
46
|
+
default: n
|
|
47
47
|
},
|
|
48
48
|
whySpecial: {
|
|
49
49
|
type: String,
|
|
@@ -60,6 +60,10 @@ const t = "direct", w = s`
|
|
|
60
60
|
country: {
|
|
61
61
|
type: String,
|
|
62
62
|
default: ""
|
|
63
|
+
},
|
|
64
|
+
useIndicativeHelpText: {
|
|
65
|
+
type: Boolean,
|
|
66
|
+
default: !1
|
|
63
67
|
}
|
|
64
68
|
},
|
|
65
69
|
computed: {
|
|
@@ -67,7 +71,7 @@ const t = "direct", w = s`
|
|
|
67
71
|
return this.status === "fundraising" || this.status === "inactive" || this.status === "reviewed" ? "helps" : "helped";
|
|
68
72
|
},
|
|
69
73
|
isDirect() {
|
|
70
|
-
return this.distributionModel ===
|
|
74
|
+
return this.distributionModel === n;
|
|
71
75
|
},
|
|
72
76
|
whySpecialSentence() {
|
|
73
77
|
return this.whySpecial ? ` This loan is special because ${this.whySpecial.charAt(0).toLowerCase() + this.whySpecial.slice(1)}` : "";
|
|
@@ -78,21 +82,23 @@ const t = "direct", w = s`
|
|
|
78
82
|
loanUse() {
|
|
79
83
|
if (this.anonymizationLevel === "full" || this.use.length === 0)
|
|
80
84
|
return "For the borrower's privacy, this loan has been made anonymous.";
|
|
81
|
-
if (this.hideLoanAmount)
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
+
if (this.hideLoanAmount) {
|
|
86
|
+
const e = this.useIndicativeHelpText ? this.helpLanguage : "Help";
|
|
87
|
+
return `${e.charAt(0).toUpperCase() + e.slice(1)} ${this.nameSpan} ${this.use.charAt(0).toLowerCase() + this.use.slice(1)} ${this.whySpecialSentence}`;
|
|
88
|
+
}
|
|
89
|
+
const t = this.borrowerCount > 1;
|
|
90
|
+
return `${o(this.loanAmount).format("$0,0")} ${this.isDirect ? "to" : this.helpLanguage} ${t ? "a member of " : ""}${this.nameSpan} ${this.isDirect ? `${this.helpLanguage} ` : ""}${this.use.charAt(0).toLowerCase() + this.use.slice(1)}${this.whySpecialSentence}`;
|
|
85
91
|
}
|
|
86
92
|
}
|
|
87
|
-
},
|
|
88
|
-
function
|
|
89
|
-
return
|
|
93
|
+
}, h = ["innerHTML"];
|
|
94
|
+
function c(t, e, s, d, m, a) {
|
|
95
|
+
return r(), l("p", {
|
|
90
96
|
class: "tw-line-clamp-4",
|
|
91
|
-
innerHTML:
|
|
92
|
-
}, null, 8,
|
|
97
|
+
innerHTML: a.loanUse
|
|
98
|
+
}, null, 8, h);
|
|
93
99
|
}
|
|
94
|
-
const
|
|
100
|
+
const w = /* @__PURE__ */ u(p, [["render", c]]);
|
|
95
101
|
export {
|
|
96
|
-
|
|
97
|
-
|
|
102
|
+
g as KV_LOAN_USE_FRAGMENT,
|
|
103
|
+
w as default
|
|
98
104
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kiva/kv-components",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.3.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -114,5 +114,5 @@
|
|
|
114
114
|
"embla-carousel-fade",
|
|
115
115
|
"popper.js"
|
|
116
116
|
],
|
|
117
|
-
"gitHead": "
|
|
117
|
+
"gitHead": "510acc35df775a04f12b2eb7442ab43f40241f0a"
|
|
118
118
|
}
|