@kiva/kv-components 7.2.4 → 7.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
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 d } from "./vue/KvButton.js";
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 S, KV_COMPACT_LOAN_CARD_USER_FRAGMENT as I, default as P } from "./vue/KvCompactLoanCard.js";
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 de } from "./vue/KvInlineActivityCard.js";
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 Ie, default as Pe } from "./vue/KvLoanBookmark.js";
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/KvLoanProgressGroup.js";
40
- import { KV_LOAN_TAG_FRAGMENT as De, default as ke } from "./vue/KvLoanTag.js";
41
- import { default as Ue } from "./vue/KvLoanTeamPick.js";
42
- import { KV_LOAN_USE_FRAGMENT as be, default as we } from "./vue/KvLoanUse.js";
43
- import { default as He } from "./vue/KvLoadingPlaceholder.js";
44
- import { default as ze } from "./vue/KvLoadingSpinner.js";
45
- import { default as qe } from "./vue/KvMap.js";
46
- import { default as Xe } from "./vue/KvMaterialIcon.js";
47
- import { default as Ze } from "./vue/KvPageContainer.js";
48
- import { default as eo } from "./vue/KvPagination.js";
49
- import { default as to } from "./vue/KvPieChart.js";
50
- import { default as ro } from "./vue/KvPill.js";
51
- import { default as lo } from "./vue/KvPopper.js";
52
- import { default as mo } from "./vue/KvProgressBar.js";
53
- import { default as uo } from "./vue/KvPulsingDot.js";
54
- import { default as Ko } from "./vue/KvRadio.js";
55
- import { default as vo } from "./vue/KvSelect.js";
56
- import { default as Co } from "./vue/KvSideSheet.js";
57
- import { default as _o } from "./vue/KvSwitch.js";
58
- import { default as No } from "./vue/KvTab.js";
59
- import { default as co } from "./vue/KvTabPanel.js";
60
- import { default as Ro } from "./vue/KvTabs.js";
61
- import { default as Oo } from "./vue/KvTextInput.js";
62
- import { default as Io } from "./vue/KvTextLink.js";
63
- import { default as go } from "./vue/KvThemeProvider.js";
64
- import { default as ho } from "./vue/KvToast.js";
65
- import { default as Vo } from "./vue/KvTooltip.js";
66
- import { default as ko } from "./vue/KvTreeMapChart.js";
67
- import { default as Uo } from "./vue/KvUserAvatar.js";
68
- import { default as bo } from "./vue/KvUtilityMenu.js";
69
- import { default as Wo } from "./vue/KvVerticalCarousel.js";
70
- import { default as jo } from "./vue/KvVotingCard.js";
71
- import { default as Qo } from "./vue/KvVotingCardV2.js";
72
- import { KV_WIDE_LOAN_CARD_FRAGMENT as Jo, KV_WIDE_LOAN_CARD_USER_FRAGMENT as Xo, default as Yo } from "./vue/KvWideLoanCard.js";
73
- import { default as $o } from "./vue/KvAtbModal.js";
74
- import { default as ot } from "./vue/KvSecondaryNav.js";
75
- import { default as at } from "./vue/KvWwwHeader.js";
76
- import { default as ft, Mash as lt } from "./utils/Alea.js";
77
- import { useAttrs as dt } from "./utils/attrs.js";
78
- import { carouselUtil as pt } from "./utils/carousels.js";
79
- import { collapse as xt, expand as Kt } from "./utils/expander.js";
80
- import { getKivaImageUrl as vt, isLegacyPlaceholderAvatar as At, randomizedUserAvatarClass as Ct } from "./utils/imageUtils.js";
81
- import { LOAN_CALLOUTS_FRAGMENT as _t, LOAN_GEOCODE_FRAGMENT as Lt, LOAN_PROGRESS_FRAGMENT as Nt, loanCardComputedProperties as Tt, loanCardMethods as ct } from "./utils/loanCard.js";
82
- import { BALANCE_CAMPAIGN as Rt, BASE_CAMPAIGN as Mt, ERL_COOKIE_NAME as Ot, NO_BALANCE_CAMPAIGN as St, TOP_UP_CAMPAIGN as It, getDropdownPriceArray as Pt, getLendCtaSelectedOption as gt, isBetween25And50 as Gt, isLessThan25 as ht } from "./utils/loanUtils.js";
83
- import { animationCoordinator as Vt, generateMapMarkers as Dt, getCoordinatesBetween as kt, getCountryColor as Bt, getLoansIntervals as Ut } from "./utils/mapUtils.js";
84
- import { lockPrintSingleEl as bt, unlockPrintSingleEl as wt } from "./utils/printing.js";
85
- import { lockScroll as Ht, lockScrollSmallOnly as jt, unlockScroll as zt, unlockScrollSmallOnly as Qt } from "./utils/scrollLock.js";
86
- import { buildTailwindClassName as Jt, headerNumberCase as Xt, kebabCase as Yt, removeObjectProperty as Zt } from "./utils/themeUtils.js";
87
- import { throttle as ea } from "./utils/throttle.js";
88
- import { isTargetElement as ta, offBodyTouchstart as aa, onBodyTouchstart as ra } from "./utils/touchEvents.js";
89
- import { getTreemap as la } from "./utils/treemap.js";
90
- import { KvBlueskyIcon as da } from "./assets/icons/bluesky.js";
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
- ft as Alea,
93
- Rt as BALANCE_CAMPAIGN,
94
- Mt as BASE_CAMPAIGN,
95
- Ot as ERL_COOKIE_NAME,
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
- S as KV_COMPACT_LOAN_CARD_FRAGMENT,
99
- I as KV_COMPACT_LOAN_CARD_USER_FRAGMENT,
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
- Ie as KV_LOAN_BOOKMARK_FRAGMENT,
106
- De as KV_LOAN_TAG_FRAGMENT,
107
- be as KV_LOAN_USE_FRAGMENT,
108
- Jo as KV_WIDE_LOAN_CARD_FRAGMENT,
109
- Xo as KV_WIDE_LOAN_CARD_USER_FRAGMENT,
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
- $o as KvAtbModal,
113
- da as KvBlueskyIcon,
113
+ ot as KvAtbModal,
114
+ pa as KvBlueskyIcon,
114
115
  l as KvBorrowerImage,
115
- d as KvButton,
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
- de as KvInlineActivityCard,
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
- He as KvLoadingPlaceholder,
148
- ze as KvLoadingSpinner,
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 KvLoanProgressGroup,
153
- ke as KvLoanTag,
154
- Ue as KvLoanTeamPick,
155
- we as KvLoanUse,
156
- qe as KvMap,
157
- Xe as KvMaterialIcon,
158
- Ze as KvPageContainer,
159
- eo as KvPagination,
160
- to as KvPieChart,
161
- ro as KvPill,
162
- lo as KvPopper,
163
- mo as KvProgressBar,
164
- uo as KvPulsingDot,
165
- Ko as KvRadio,
166
- ot as KvSecondaryNav,
167
- vo as KvSelect,
168
- Co as KvSideSheet,
169
- _o as KvSwitch,
170
- No as KvTab,
171
- co as KvTabPanel,
172
- Ro as KvTabs,
173
- Oo as KvTextInput,
174
- Io as KvTextLink,
175
- go as KvThemeProvider,
176
- ho as KvToast,
177
- Vo as KvTooltip,
178
- ko as KvTreeMapChart,
179
- Uo as KvUserAvatar,
180
- bo as KvUtilityMenu,
181
- Wo as KvVerticalCarousel,
182
- jo as KvVotingCard,
183
- Qo as KvVotingCardV2,
184
- Yo as KvWideLoanCard,
185
- at as KvWwwHeader,
186
- _t as LOAN_CALLOUTS_FRAGMENT,
187
- Lt as LOAN_GEOCODE_FRAGMENT,
188
- Nt as LOAN_PROGRESS_FRAGMENT,
189
- lt as Mash,
190
- St as NO_BALANCE_CAMPAIGN,
191
- It as TOP_UP_CAMPAIGN,
192
- Vt as animationCoordinator,
193
- Jt as buildTailwindClassName,
194
- pt as carouselUtil,
195
- xt as collapse,
196
- Kt as expand,
197
- Dt as generateMapMarkers,
198
- kt as getCoordinatesBetween,
199
- Bt as getCountryColor,
200
- Pt as getDropdownPriceArray,
201
- vt as getKivaImageUrl,
202
- gt as getLendCtaSelectedOption,
203
- Ut as getLoansIntervals,
204
- la as getTreemap,
205
- Xt as headerNumberCase,
206
- Gt as isBetween25And50,
207
- At as isLegacyPlaceholderAvatar,
208
- ht as isLessThan25,
209
- ta as isTargetElement,
210
- Yt as kebabCase,
211
- Tt as loanCardComputedProperties,
212
- ct as loanCardMethods,
213
- bt as lockPrintSingleEl,
214
- Ht as lockScroll,
215
- jt as lockScrollSmallOnly,
216
- aa as offBodyTouchstart,
217
- ra as onBodyTouchstart,
218
- Ct as randomizedUserAvatarClass,
219
- Zt as removeObjectProperty,
220
- ea as throttle,
221
- wt as unlockPrintSingleEl,
222
- zt as unlockScroll,
223
- Qt as unlockScrollSmallOnly,
224
- dt as useAttrs
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
  };
@@ -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 Ee } from "@mdi/js";
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
- `, De = R`
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
- `, Me = R`
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 Te(c, f = !1) {
46
+ function Ge(c, f = !1) {
47
47
  const {
48
48
  externalLinks: p,
49
- customLoanDetails: L,
50
- loanId: m,
49
+ customLoanDetails: m,
50
+ loanId: g,
51
51
  loan: t,
52
52
  categoryPageName: v,
53
- customCallouts: y,
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 : L.value ? "" : `/lend/${m.value}`), _ = n(() => !m.value || !t.value), ce = n(() => {
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
- }), g = n(() => {
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
- }), E = n(() => {
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
- }), D = n(() => {
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 (D.value === "direct") {
81
- const e = f && g.value.toLowerCase() === "united states" ? "" : `, ${g.value}`;
82
- return `${E.value}, ${S.value}${e}`;
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 g.value === "Puerto Rico" ? `${E.value}, PR` : g.value;
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
- }), C = n(() => {
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
- }), M = n(() => N.value.clone().divide(C.value).value()), T = n(() => U.value && C.value - N.value.value() > 0), he = n(() => T.value ? oe(C.value).subtract(N.value.value()).format("0.00") : "0"), Ce = n(() => {
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(m.value, M.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) ?? "", G = ((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))) ?? [], A = ((J = t.value) == null ? void 0 : J.themes) ?? [], b = {
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: !!A.filter((o) => o.toUpperCase() === be).length,
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) ?? [], Le = ((X = t.value) == null ? void 0 : X.themesData) ?? [];
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), h = (r == null ? void 0 : r.id) ?? null;
109
- e.push({ label: s, type: "tag", id: h });
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 && G && l.toUpperCase() !== d.toUpperCase() && d.toUpperCase() !== ((ee = v.value) == null ? void 0 : ee.toUpperCase()) && e.length < 2 && e.push({ id: G, label: d, type: "sector" }), i.length && e.length < 2) {
112
- const o = Math.floor(a() * i.length), s = i[o], r = P(k, s), h = (r == null ? void 0 : r.id) ?? null;
113
- e.filter((I) => I.label.toUpperCase() === s.toUpperCase()).length || e.push({ label: s, type: "tag", id: h });
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 (A.length && e.length < 2) {
116
- const o = Math.floor(a() * A.length), s = A[o], r = P(Le, s), h = (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: h });
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 ye = ((ae = y.value) == null ? void 0 : ae.map((o) => ({ label: o }))) ?? [];
121
- return e.push(...ye), e;
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: g,
128
+ countryName: h,
129
129
  countryCode: de,
130
- city: E,
130
+ city: L,
131
131
  state: S,
132
- distributionModel: D,
132
+ distributionModel: M,
133
133
  imageHash: pe,
134
134
  hasProgressData: U,
135
135
  allDataLoaded: ve,
136
- fundraisingPercent: M,
136
+ fundraisingPercent: T,
137
137
  unreservedAmount: he,
138
- sharesAvailable: T,
138
+ sharesAvailable: G,
139
139
  formattedLocation: fe,
140
140
  loanUse: me,
141
141
  loanStatus: ge,
142
- loanAmount: C,
142
+ loanAmount: A,
143
143
  loanBorrowerCount: Ce,
144
- mdiMapMarker: Ee,
144
+ mdiMapMarker: Le,
145
145
  loanCallouts: Ae
146
146
  };
147
147
  }
148
- function Ge(c, f) {
148
+ function De(c, f) {
149
149
  const {
150
150
  loanId: p,
151
- customLoanDetails: L,
152
- kvTrackFunction: m
151
+ customLoanDetails: m,
152
+ kvTrackFunction: g
153
153
  } = re(c);
154
- function t(v, y) {
155
- m.value("Lending", "click-Read more", v, p.value), L.value && (y.preventDefault(), f("show-loan-details"));
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
- De as LOAN_GEOCODE_FRAGMENT,
164
- Me as LOAN_PROGRESS_FRAGMENT,
165
- Te as loanCardComputedProperties,
166
- Ge as loanCardMethods
163
+ Me as LOAN_GEOCODE_FRAGMENT,
164
+ Te as LOAN_PROGRESS_FRAGMENT,
165
+ Ge as loanCardComputedProperties,
166
+ De as loanCardMethods
167
167
  };
@@ -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
+ };
@@ -1,8 +1,8 @@
1
- import s from "graphql-tag";
2
- import a from "numeral";
3
- import { openBlock as i, createElementBlock as o } from "vue";
4
- import r from "../_virtual/_plugin-vue_export-helper.js";
5
- const t = "direct", w = s`
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
- `, u = {
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: t
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 === t;
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
- return `Help ${this.nameSpan} ${this.use.charAt(0).toLowerCase() + this.use.slice(1)} ${this.whySpecialSentence}`;
83
- const e = this.borrowerCount > 1;
84
- return `${a(this.loanAmount).format("$0,0")} ${this.isDirect ? "to" : this.helpLanguage} ${e ? "a member of " : ""}${this.nameSpan} ${this.isDirect ? `${this.helpLanguage} ` : ""}${this.use.charAt(0).toLowerCase() + this.use.slice(1)}${this.whySpecialSentence}`;
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
- }, l = ["innerHTML"];
88
- function h(e, p, c, m, d, n) {
89
- return i(), o("p", {
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: n.loanUse
92
- }, null, 8, l);
97
+ innerHTML: a.loanUse
98
+ }, null, 8, h);
93
99
  }
94
- const g = /* @__PURE__ */ r(u, [["render", h]]);
100
+ const w = /* @__PURE__ */ u(p, [["render", c]]);
95
101
  export {
96
- w as KV_LOAN_USE_FRAGMENT,
97
- g as default
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.2.4",
3
+ "version": "7.3.0",
4
4
  "type": "module",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -21,7 +21,7 @@
21
21
  "@babel/preset-env": "^7.24.8",
22
22
  "@babel/preset-react": "^7.24.7",
23
23
  "@babel/preset-typescript": "^7.24.7",
24
- "@kiva/kv-tokens": "^3.5.1",
24
+ "@kiva/kv-tokens": "^3.6.0",
25
25
  "@kiva/vite-plugin-vue-lib-css": "^2.0.0",
26
26
  "@laynezh/vite-plugin-lib-assets": "^0.6.1",
27
27
  "@mdi/js": "^7.4.47",
@@ -114,5 +114,5 @@
114
114
  "embla-carousel-fade",
115
115
  "popper.js"
116
116
  ],
117
- "gitHead": "57ce77622d4fb48addabf3276df04ccb05de2438"
117
+ "gitHead": "a0a085c727a4c62f54e883628e453b0140591bf2"
118
118
  }