@kiva/kv-components 10.5.1 → 10.6.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.
Files changed (228) hide show
  1. package/dist/index.js +20 -20
  2. package/dist/vue/KvAccordionItem.js +1 -1
  3. package/dist/vue/KvActivityRow.js +1 -1
  4. package/dist/vue/KvAtbModal.js +1 -1
  5. package/dist/vue/KvBorrowerImage.js +1 -1
  6. package/dist/vue/KvButton.js +1 -1
  7. package/dist/vue/KvCardFrame.js +1 -1
  8. package/dist/vue/KvCarousel.js +1 -1
  9. package/dist/vue/KvCartModal.js +1 -1
  10. package/dist/vue/KvCartPill.js +1 -1
  11. package/dist/vue/KvCheckbox.js +1 -1
  12. package/dist/vue/KvCheckoutReceipt.js +1 -1
  13. package/dist/vue/KvChip.js +1 -1
  14. package/dist/vue/KvClassicLoanCard.js +252 -295
  15. package/dist/vue/KvClassicLoanCard.script.js +298 -0
  16. package/dist/vue/KvCommentsAdd.js +2 -2
  17. package/dist/vue/KvCommentsContainer.js +2 -2
  18. package/dist/vue/KvCommentsHeartButton.js +1 -1
  19. package/dist/vue/KvCommentsList.js +1 -1
  20. package/dist/vue/KvCommentsListItem.js +2 -2
  21. package/dist/vue/KvCommentsReplyButton.js +1 -1
  22. package/dist/vue/KvCompactLoanCard.js +416 -380
  23. package/dist/vue/KvCompactLoanCard.script.js +382 -0
  24. package/dist/vue/KvContentfulImg.js +1 -1
  25. package/dist/vue/KvCountdownTimer.js +1 -1
  26. package/dist/vue/KvDatePicker.js +1 -1
  27. package/dist/vue/KvExpandable.js +1 -1
  28. package/dist/vue/KvExpandableQuestion.js +1 -1
  29. package/dist/vue/KvFlag.js +1 -1
  30. package/dist/vue/KvFormAssemblyForm.js +2 -95
  31. package/dist/vue/KvFormAssemblyForm.script.js +97 -0
  32. package/dist/vue/KvGrid.js +1 -1
  33. package/dist/vue/KvIconBag.js +1 -1
  34. package/dist/vue/KvIconButton.js +2 -116
  35. package/dist/vue/KvIconButton.script.js +118 -0
  36. package/dist/vue/KvImageUpload.js +1 -1
  37. package/dist/vue/KvImpactVerticalSelector.js +1 -1
  38. package/dist/vue/KvInlineActivityCard.js +1 -1
  39. package/dist/vue/KvInlineActivityFeed.js +1 -1
  40. package/dist/vue/KvIntroductionLoanCard.js +247 -220
  41. package/dist/vue/KvIntroductionLoanCard.script.js +223 -0
  42. package/dist/vue/KvLendAmountButton.js +1 -1
  43. package/dist/vue/KvLendCta.js +355 -389
  44. package/dist/vue/KvLendCta.script.js +391 -0
  45. package/dist/vue/KvLightbox.js +18 -18
  46. package/dist/vue/KvLightbox.script.js +147 -0
  47. package/dist/vue/KvLightbox.vue.d.ts +21 -0
  48. package/dist/vue/KvLineGraph.js +1 -1
  49. package/dist/vue/KvLoadingSpinner.js +1 -1
  50. package/dist/vue/KvLoanActivities.js +75 -149
  51. package/dist/vue/KvLoanActivities.script.js +151 -0
  52. package/dist/vue/KvLoanActivities.vue.d.ts +21 -0
  53. package/dist/vue/KvLoanBookmark.js +22 -33
  54. package/dist/vue/KvLoanBookmark.script.js +35 -0
  55. package/dist/vue/KvLoanCallouts.js +1 -1
  56. package/dist/vue/KvLoanInfoCard.js +2 -2
  57. package/dist/vue/KvLoanProgressGroup.js +1 -1
  58. package/dist/vue/KvLoanTag.js +44 -123
  59. package/dist/vue/KvLoanTag.script.js +125 -0
  60. package/dist/vue/KvLoanUse.js +14 -111
  61. package/dist/vue/KvLoanUse.script.js +113 -0
  62. package/dist/vue/KvMap.js +1 -1
  63. package/dist/vue/KvMaterialIcon.js +1 -1
  64. package/dist/vue/KvPageContainer.js +1 -1
  65. package/dist/vue/KvPagination.js +1 -1
  66. package/dist/vue/KvPieChart.js +1 -1
  67. package/dist/vue/KvPieChartV2.js +1 -1
  68. package/dist/vue/KvPieChartV2.vue.d.ts +21 -0
  69. package/dist/vue/KvPill.js +1 -1
  70. package/dist/vue/KvPopper.js +1 -1
  71. package/dist/vue/KvProgressBar.js +1 -1
  72. package/dist/vue/KvProgressCircle.js +1 -1
  73. package/dist/vue/KvPulsingDot.js +1 -1
  74. package/dist/vue/KvRadio.js +1 -1
  75. package/dist/vue/KvSecondaryNav.js +1 -1
  76. package/dist/vue/KvSelect.js +1 -1
  77. package/dist/vue/KvSideSheet.js +1 -1
  78. package/dist/vue/KvSimpleMap.js +1 -1
  79. package/dist/vue/KvStackedBarGraph.js +1 -1
  80. package/dist/vue/KvSwitch.js +1 -1
  81. package/dist/vue/KvTab.js +1 -1
  82. package/dist/vue/KvTabPanel.js +1 -1
  83. package/dist/vue/KvTabs.js +1 -1
  84. package/dist/vue/KvTextInput.js +1 -1
  85. package/dist/vue/KvTextLink.js +1 -1
  86. package/dist/vue/KvThemeProvider.js +1 -1
  87. package/dist/vue/KvToast.js +1 -1
  88. package/dist/vue/KvTooltip.js +1 -1
  89. package/dist/vue/KvTreeMapChart.js +1 -1
  90. package/dist/vue/KvUserAvatar.js +1 -1
  91. package/dist/vue/KvUtilityMenu.js +1 -1
  92. package/dist/vue/KvVerticalCarousel.js +1 -1
  93. package/dist/vue/KvVotingCard.js +1 -1
  94. package/dist/vue/KvVotingCardV2.js +1 -1
  95. package/dist/vue/KvVotingCardV2.vue.d.ts +21 -0
  96. package/dist/vue/KvWideLoanCard.js +206 -232
  97. package/dist/vue/KvWideLoanCard.script.js +235 -0
  98. package/dist/vue/KvWwwHeader/KvHeaderAboutMenu.js +1 -1
  99. package/dist/vue/KvWwwHeader/KvHeaderDropdownLink.js +1 -1
  100. package/dist/vue/KvWwwHeader/KvHeaderLinkBar.js +1 -1
  101. package/dist/vue/KvWwwHeader/KvHeaderLogo.js +1 -1
  102. package/dist/vue/KvWwwHeader/KvHeaderMobileMenu.js +1 -1
  103. package/dist/vue/KvWwwHeader/KvHeaderMyKivaMenu.js +1 -1
  104. package/dist/vue/KvWwwHeader/KvHeaderTakeActionMenu.js +1 -1
  105. package/dist/vue/KvWwwHeader/LendMenu/KvLendListMenu.js +1 -1
  106. package/dist/vue/KvWwwHeader/LendMenu/KvLendMegaMenu.js +1 -1
  107. package/dist/vue/KvWwwHeader/LendMenu/KvLendMenu.js +1 -1
  108. package/dist/vue/KvWwwHeader/LendMenu/KvLendMenuCountryList.js +1 -1
  109. package/dist/vue/KvWwwHeader/LendMenu/KvLendMenuSearchList.js +1 -1
  110. package/dist/vue/KvWwwHeader.js +1 -1
  111. package/dist/vue/KvWwwHeaderBasic/AboutMenu.js +1 -1
  112. package/dist/vue/KvWwwHeaderBasic/HeaderMenuGroup.js +1 -1
  113. package/dist/vue/KvWwwHeaderBasic/KvWwwHeaderBasic.js +1 -1
  114. package/dist/vue/KvWwwHeaderBasic/LinkBar.js +1 -1
  115. package/dist/vue/KvWwwHeaderBasic/MobileLendMenu/CategoriesPanel.js +1 -1
  116. package/dist/vue/KvWwwHeaderBasic/MobileLendMenu/MobileLendMenu.js +1 -1
  117. package/dist/vue/KvWwwHeaderBasic/MobileLendMenu/MyKivaPanel.js +1 -1
  118. package/dist/vue/KvWwwHeaderBasic/MobileLendMenu/RegionsPanel.js +1 -1
  119. package/dist/vue/KvWwwHeaderBasic/MobileLendMenu/SearchPanel.js +1 -1
  120. package/dist/vue/KvWwwHeaderBasic/MobileMenu.js +1 -1
  121. package/dist/vue/KvWwwHeaderBasic/MyKivaMenu.js +1 -1
  122. package/dist/vue/KvWwwHeaderBasic/SearchBar.js +1 -1
  123. package/package.json +2 -2
  124. package/vite.config.ts +16 -13
  125. package/dist/vue/KvClassicLoanCard2.js +0 -255
  126. package/dist/vue/KvCompactLoanCard2.js +0 -418
  127. package/dist/vue/KvFormAssemblyForm2.js +0 -4
  128. package/dist/vue/KvIconButton2.js +0 -4
  129. package/dist/vue/KvIntroductionLoanCard2.js +0 -250
  130. package/dist/vue/KvLendCta2.js +0 -357
  131. package/dist/vue/KvLightbox2.js +0 -117
  132. package/dist/vue/KvLoanActivities2.js +0 -77
  133. package/dist/vue/KvLoanBookmark2.js +0 -24
  134. package/dist/vue/KvLoanTag2.js +0 -46
  135. package/dist/vue/KvLoanUse2.js +0 -16
  136. package/dist/vue/KvWideLoanCard2.js +0 -209
  137. /package/dist/vue/{KvAccordionItem2.js → KvAccordionItem.script.js} +0 -0
  138. /package/dist/vue/{KvActivityRow2.js → KvActivityRow.script.js} +0 -0
  139. /package/dist/vue/{KvAtbModal2.js → KvAtbModal.script.js} +0 -0
  140. /package/dist/vue/{KvBorrowerImage2.js → KvBorrowerImage.script.js} +0 -0
  141. /package/dist/vue/{KvButton2.js → KvButton.script.js} +0 -0
  142. /package/dist/vue/{KvCardFrame2.js → KvCardFrame.script.js} +0 -0
  143. /package/dist/vue/{KvCarousel2.js → KvCarousel.script.js} +0 -0
  144. /package/dist/vue/{KvCartModal2.js → KvCartModal.script.js} +0 -0
  145. /package/dist/vue/{KvCartPill2.js → KvCartPill.script.js} +0 -0
  146. /package/dist/vue/{KvCheckbox2.js → KvCheckbox.script.js} +0 -0
  147. /package/dist/vue/{KvCheckoutReceipt2.js → KvCheckoutReceipt.script.js} +0 -0
  148. /package/dist/vue/{KvChip2.js → KvChip.script.js} +0 -0
  149. /package/dist/vue/{KvCommentsAdd2.js → KvCommentsAdd.script.js} +0 -0
  150. /package/dist/vue/{KvCommentsContainer2.js → KvCommentsContainer.script.js} +0 -0
  151. /package/dist/vue/{KvCommentsHeartButton2.js → KvCommentsHeartButton.script.js} +0 -0
  152. /package/dist/vue/{KvCommentsList2.js → KvCommentsList.script.js} +0 -0
  153. /package/dist/vue/{KvCommentsListItem2.js → KvCommentsListItem.script.js} +0 -0
  154. /package/dist/vue/{KvCommentsReplyButton2.js → KvCommentsReplyButton.script.js} +0 -0
  155. /package/dist/vue/{KvContentfulImg2.js → KvContentfulImg.script.js} +0 -0
  156. /package/dist/vue/{KvCountdownTimer2.js → KvCountdownTimer.script.js} +0 -0
  157. /package/dist/vue/{KvDatePicker2.js → KvDatePicker.script.js} +0 -0
  158. /package/dist/vue/{KvExpandable2.js → KvExpandable.script.js} +0 -0
  159. /package/dist/vue/{KvExpandableQuestion2.js → KvExpandableQuestion.script.js} +0 -0
  160. /package/dist/vue/{KvFlag2.js → KvFlag.script.js} +0 -0
  161. /package/dist/vue/{KvGrid2.js → KvGrid.script.js} +0 -0
  162. /package/dist/vue/{KvIconBag2.js → KvIconBag.script.js} +0 -0
  163. /package/dist/vue/{KvImageUpload2.js → KvImageUpload.script.js} +0 -0
  164. /package/dist/vue/{KvImpactVerticalSelector2.js → KvImpactVerticalSelector.script.js} +0 -0
  165. /package/dist/vue/{KvInlineActivityCard2.js → KvInlineActivityCard.script.js} +0 -0
  166. /package/dist/vue/{KvInlineActivityFeed2.js → KvInlineActivityFeed.script.js} +0 -0
  167. /package/dist/vue/{KvLendAmountButton2.js → KvLendAmountButton.script.js} +0 -0
  168. /package/dist/vue/{KvLineGraph2.js → KvLineGraph.script.js} +0 -0
  169. /package/dist/vue/{KvLoadingSpinner2.js → KvLoadingSpinner.script.js} +0 -0
  170. /package/dist/vue/{KvLoanCallouts2.js → KvLoanCallouts.script.js} +0 -0
  171. /package/dist/vue/{KvLoanProgressGroup2.js → KvLoanProgressGroup.script.js} +0 -0
  172. /package/dist/vue/{KvMap2.js → KvMap.script.js} +0 -0
  173. /package/dist/vue/{KvMaterialIcon2.js → KvMaterialIcon.script.js} +0 -0
  174. /package/dist/vue/{KvPageContainer2.js → KvPageContainer.script.js} +0 -0
  175. /package/dist/vue/{KvPagination2.js → KvPagination.script.js} +0 -0
  176. /package/dist/vue/{KvPieChart2.js → KvPieChart.script.js} +0 -0
  177. /package/dist/vue/{KvPieChartV22.js → KvPieChartV2.script.js} +0 -0
  178. /package/dist/vue/{KvPill2.js → KvPill.script.js} +0 -0
  179. /package/dist/vue/{KvPopper2.js → KvPopper.script.js} +0 -0
  180. /package/dist/vue/{KvProgressBar2.js → KvProgressBar.script.js} +0 -0
  181. /package/dist/vue/{KvProgressCircle2.js → KvProgressCircle.script.js} +0 -0
  182. /package/dist/vue/{KvPulsingDot2.js → KvPulsingDot.script.js} +0 -0
  183. /package/dist/vue/{KvRadio2.js → KvRadio.script.js} +0 -0
  184. /package/dist/vue/{KvSecondaryNav2.js → KvSecondaryNav.script.js} +0 -0
  185. /package/dist/vue/{KvSelect2.js → KvSelect.script.js} +0 -0
  186. /package/dist/vue/{KvSideSheet2.js → KvSideSheet.script.js} +0 -0
  187. /package/dist/vue/{KvSimpleMap2.js → KvSimpleMap.script.js} +0 -0
  188. /package/dist/vue/{KvStackedBarGraph2.js → KvStackedBarGraph.script.js} +0 -0
  189. /package/dist/vue/{KvSwitch2.js → KvSwitch.script.js} +0 -0
  190. /package/dist/vue/{KvTab2.js → KvTab.script.js} +0 -0
  191. /package/dist/vue/{KvTabPanel2.js → KvTabPanel.script.js} +0 -0
  192. /package/dist/vue/{KvTabs2.js → KvTabs.script.js} +0 -0
  193. /package/dist/vue/{KvTextInput2.js → KvTextInput.script.js} +0 -0
  194. /package/dist/vue/{KvTextLink2.js → KvTextLink.script.js} +0 -0
  195. /package/dist/vue/{KvThemeProvider2.js → KvThemeProvider.script.js} +0 -0
  196. /package/dist/vue/{KvToast2.js → KvToast.script.js} +0 -0
  197. /package/dist/vue/{KvTooltip2.js → KvTooltip.script.js} +0 -0
  198. /package/dist/vue/{KvTreeMapChart2.js → KvTreeMapChart.script.js} +0 -0
  199. /package/dist/vue/{KvUserAvatar2.js → KvUserAvatar.script.js} +0 -0
  200. /package/dist/vue/{KvUtilityMenu2.js → KvUtilityMenu.script.js} +0 -0
  201. /package/dist/vue/{KvVerticalCarousel2.js → KvVerticalCarousel.script.js} +0 -0
  202. /package/dist/vue/{KvVotingCard2.js → KvVotingCard.script.js} +0 -0
  203. /package/dist/vue/{KvVotingCardV22.js → KvVotingCardV2.script.js} +0 -0
  204. /package/dist/vue/KvWwwHeader/{KvHeaderAboutMenu2.js → KvHeaderAboutMenu.script.js} +0 -0
  205. /package/dist/vue/KvWwwHeader/{KvHeaderDropdownLink2.js → KvHeaderDropdownLink.script.js} +0 -0
  206. /package/dist/vue/KvWwwHeader/{KvHeaderLinkBar2.js → KvHeaderLinkBar.script.js} +0 -0
  207. /package/dist/vue/KvWwwHeader/{KvHeaderLogo2.js → KvHeaderLogo.script.js} +0 -0
  208. /package/dist/vue/KvWwwHeader/{KvHeaderMobileMenu2.js → KvHeaderMobileMenu.script.js} +0 -0
  209. /package/dist/vue/KvWwwHeader/{KvHeaderMyKivaMenu2.js → KvHeaderMyKivaMenu.script.js} +0 -0
  210. /package/dist/vue/KvWwwHeader/{KvHeaderTakeActionMenu2.js → KvHeaderTakeActionMenu.script.js} +0 -0
  211. /package/dist/vue/KvWwwHeader/LendMenu/{KvLendListMenu2.js → KvLendListMenu.script.js} +0 -0
  212. /package/dist/vue/KvWwwHeader/LendMenu/{KvLendMegaMenu2.js → KvLendMegaMenu.script.js} +0 -0
  213. /package/dist/vue/KvWwwHeader/LendMenu/{KvLendMenu2.js → KvLendMenu.script.js} +0 -0
  214. /package/dist/vue/KvWwwHeader/LendMenu/{KvLendMenuCountryList2.js → KvLendMenuCountryList.script.js} +0 -0
  215. /package/dist/vue/KvWwwHeader/LendMenu/{KvLendMenuSearchList2.js → KvLendMenuSearchList.script.js} +0 -0
  216. /package/dist/vue/{KvWwwHeader2.js → KvWwwHeader.script.js} +0 -0
  217. /package/dist/vue/KvWwwHeaderBasic/{AboutMenu2.js → AboutMenu.script.js} +0 -0
  218. /package/dist/vue/KvWwwHeaderBasic/{HeaderMenuGroup2.js → HeaderMenuGroup.script.js} +0 -0
  219. /package/dist/vue/KvWwwHeaderBasic/{KvWwwHeaderBasic2.js → KvWwwHeaderBasic.script.js} +0 -0
  220. /package/dist/vue/KvWwwHeaderBasic/{LinkBar2.js → LinkBar.script.js} +0 -0
  221. /package/dist/vue/KvWwwHeaderBasic/MobileLendMenu/{CategoriesPanel2.js → CategoriesPanel.script.js} +0 -0
  222. /package/dist/vue/KvWwwHeaderBasic/MobileLendMenu/{MobileLendMenu2.js → MobileLendMenu.script.js} +0 -0
  223. /package/dist/vue/KvWwwHeaderBasic/MobileLendMenu/{MyKivaPanel2.js → MyKivaPanel.script.js} +0 -0
  224. /package/dist/vue/KvWwwHeaderBasic/MobileLendMenu/{RegionsPanel2.js → RegionsPanel.script.js} +0 -0
  225. /package/dist/vue/KvWwwHeaderBasic/MobileLendMenu/{SearchPanel2.js → SearchPanel.script.js} +0 -0
  226. /package/dist/vue/KvWwwHeaderBasic/{MobileMenu2.js → MobileMenu.script.js} +0 -0
  227. /package/dist/vue/KvWwwHeaderBasic/{MyKivaMenu2.js → MyKivaMenu.script.js} +0 -0
  228. /package/dist/vue/KvWwwHeaderBasic/{SearchBar2.js → SearchBar.script.js} +0 -0
@@ -1,223 +1,250 @@
1
- import a from "graphql-tag";
2
- import F from "numeral";
3
- import { LOAN_CALLOUTS_FRAGMENT as k, LOAN_GEOCODE_FRAGMENT as B, LOAN_PROGRESS_FRAGMENT as E, loanCardComputedProperties as G, loanCardMethods as b, useLocationTruncation as I } from "../utils/loanCard.js";
4
- import S from "./KvLoanBookmark2.js";
5
- import D from "./KvLoanUse2.js";
6
- import P from "./KvBorrowerImage.js";
7
- import U from "./KvLoanProgressGroup.js";
8
- import $ from "./KvLoanCallouts.js";
9
- import w from "./KvLoanTag2.js";
10
- import V from "./KvMaterialIcon.js";
11
- import W from "./KvLoadingPlaceholder.js";
12
- import q from "./KvFlag.js";
13
- import H from "./KvTooltip.js";
14
- import { KV_LOAN_BOOKMARK_FRAGMENT as r } from "./KvLoanBookmark.js";
15
- import { KV_LOAN_TAG_FRAGMENT as j } from "./KvLoanTag.js";
16
- import { KV_LOAN_USE_FRAGMENT as x } from "./KvLoanUse.js";
17
- const mo = a`
18
- fragment KvIntroductionLoanCard on LoanBasic {
19
- id
20
- image {
21
- id
22
- hash # for imageHash
23
- }
24
- lenders(limit: 0) {
25
- totalCount # for lendersNumber
26
- }
27
- loanFundraisingInfo {
28
- id
29
- fundedAmount # for amountLent
30
- }
31
- name # for borrowerName
32
- status # for isFunded
33
- ...KvLoanBookmark
34
- ...KvLoanTag
35
- ...KvLoanUse
36
- ...LoanCallouts
37
- ...LoanGeocode
38
- ...LoanProgress
39
- }
40
- ${r}
41
- ${j}
42
- ${x}
43
- ${k}
44
- ${B}
45
- ${E}
46
- `, fo = a`
47
- fragment KvIntroductionLoanCardUser on LoanBasic {
48
- id
49
- ...KvLoanBookmark
50
- }
51
- ${r}
52
- `, co = {
53
- name: "KvIntroductionLoanCard",
54
- components: {
55
- KvBorrowerImage: P,
56
- KvLoadingPlaceholder: W,
57
- KvLoanUse: D,
58
- KvLoanProgressGroup: U,
59
- KvMaterialIcon: V,
60
- KvLoanTag: w,
61
- KvLoanCallouts: $,
62
- KvFlag: q,
63
- KvLoanBookmark: S,
64
- KvTooltip: H
65
- },
66
- props: {
67
- loanId: {
68
- type: Number,
69
- default: void 0
70
- },
71
- loan: {
72
- type: Object,
73
- default: null
74
- },
75
- customLoanDetails: {
76
- type: Boolean,
77
- default: !1
78
- },
79
- categoryPageName: {
80
- type: String,
81
- default: ""
82
- },
83
- customCallouts: {
84
- type: Array,
85
- default: () => []
86
- },
87
- kvTrackFunction: {
88
- type: Function,
89
- required: !0
90
- },
91
- photoPath: {
92
- type: String,
93
- required: !0
94
- },
95
- errorMsg: {
96
- type: String,
97
- default: ""
98
- },
99
- externalLinks: {
100
- type: Boolean,
101
- default: !1
102
- },
103
- route: {
104
- type: Object,
105
- default: void 0
106
- },
107
- useFullWidth: {
108
- type: Boolean,
109
- default: !1
110
- },
111
- isVisitor: {
112
- type: Boolean,
113
- default: !0
114
- },
115
- isBookmarked: {
116
- type: Boolean,
117
- default: !1
118
- },
119
- customHref: {
120
- type: String,
121
- default: ""
122
- },
123
- enableMultiMatching: {
124
- type: Boolean,
125
- default: !1
126
- }
127
- },
128
- emits: [
129
- "toggle-bookmark"
130
- ],
131
- setup(o, { emit: t }) {
132
- const {
133
- allDataLoaded: e,
134
- borrowerName: n,
135
- city: i,
136
- countryName: s,
137
- countryCode: u,
138
- distributionModel: l,
139
- formattedLocation: m,
140
- fundraisingPercent: d,
141
- hasProgressData: f,
142
- imageHash: c,
143
- isLoading: p,
144
- loanAmount: L,
145
- loanBorrowerCount: g,
146
- loanCallouts: A,
147
- loanStatus: h,
148
- loanUse: N,
149
- mdiMapMarker: _,
150
- readMorePath: v,
151
- state: K,
152
- tag: y,
153
- unreservedAmount: C,
154
- sharesAvailable: O
155
- } = G(o, !0), {
156
- clickReadMore: T
157
- } = b(o, t), {
158
- locationRef: M,
159
- isLocationTruncated: R
160
- } = I();
161
- return {
162
- allDataLoaded: e,
163
- borrowerName: n,
164
- city: i,
165
- countryName: s,
166
- countryCode: u,
167
- distributionModel: l,
168
- formattedLocation: m,
169
- fundraisingPercent: d,
170
- hasProgressData: f,
171
- imageHash: c,
172
- isLoading: p,
173
- loanAmount: L,
174
- loanBorrowerCount: g,
175
- loanCallouts: A,
176
- loanStatus: h,
177
- loanUse: N,
178
- mdiMapMarker: _,
179
- readMorePath: v,
180
- state: K,
181
- tag: y,
182
- unreservedAmount: C,
183
- sharesAvailable: O,
184
- clickReadMore: T,
185
- locationRef: M,
186
- isLocationTruncated: R
187
- };
188
- },
189
- computed: {
190
- cardWidth() {
191
- return this.useFullWidth ? "100%" : "20.5rem";
192
- },
193
- imageAspectRatio() {
194
- return 5 / 8;
195
- },
196
- imageDefaultWidth() {
197
- return 480;
198
- },
199
- imageSizes() {
200
- return [
201
- { width: this.imageDefaultWidth, viewSize: 375 }
202
- ];
203
- },
204
- lendersNumber() {
205
- var o, t;
206
- return ((t = (o = this.loan) == null ? void 0 : o.lenders) == null ? void 0 : t.totalCount) ?? 0;
207
- },
208
- amountLent() {
209
- var t, e;
210
- const o = ((e = (t = this.loan) == null ? void 0 : t.loanFundraisingInfo) == null ? void 0 : e.fundedAmount) ?? 0;
211
- return F(o).format("$0,0");
212
- },
213
- isFunded() {
214
- var o;
215
- return ((o = this.loan) == null ? void 0 : o.status) === "funded" || this.hasProgressData && !this.sharesAvailable;
216
- }
217
- }
1
+ import P from "./KvIntroductionLoanCard.script.js";
2
+ import { KV_INTRODUCTION_LOAN_CARD_FRAGMENT as ot, KV_INTRODUCTION_LOAN_CARD_USER_FRAGMENT as at } from "./KvIntroductionLoanCard.script.js";
3
+ import { resolveComponent as i, openBlock as e, createElementBlock as n, normalizeStyle as R, normalizeClass as _, createElementVNode as d, createBlock as o, resolveDynamicComponent as g, withCtx as w, createVNode as s, Suspense as A, toDisplayString as f, createTextVNode as p, createCommentVNode as c, Fragment as T, renderList as I } from "vue";
4
+ import "./KvIntroductionLoanCard.css";
5
+ import B from "../_virtual/_plugin-vue_export-helper.js";
6
+ const D = { class: "tw-grow" }, z = { class: "loan-card-active-hover" }, V = {
7
+ key: 1,
8
+ style: { height: "11rem" },
9
+ class: "tw-relative tw-overflow-hidden"
10
+ }, O = { key: 0 }, S = {
11
+ class: "tw-absolute tw-bottom-1 tw-left-1 tw-text-primary tw-bg-white tw-rounded tw-p-1 tw-mb-0 tw-text-label tw-flex tw-items-center tw-h-3 !tw-capitalize",
12
+ style: { padding: "2px 6px", "max-width": "calc(100% - 1rem)" }
13
+ }, E = ["id"], F = {
14
+ key: 3,
15
+ class: "tw-flex tw-justify-center tw-gap-2"
16
+ }, U = {
17
+ key: 0,
18
+ class: "tw-w-full",
19
+ style: { height: "5.5rem" }
20
+ }, W = { key: 1 }, j = { class: "tw-px-2" }, K = {
21
+ key: 0,
22
+ class: "tw-w-full tw-pr-1"
23
+ }, G = { class: "tw-flex tw-justify-between" }, H = {
24
+ key: 2,
25
+ class: "tw-bg-eco-green-1 tw-text-action tw-text-center tw-py-1.5",
26
+ style: { "font-weight": "bold", "font-size": "13px", "border-radius": "8px" }
218
27
  };
28
+ function q(k, a, m, t, J, h) {
29
+ const r = i("kv-loading-placeholder"), u = i("kv-borrower-image"), y = i("kv-flag"), b = i("kv-tooltip"), v = i("kv-loan-bookmark"), x = i("kv-loan-callouts"), C = i("kv-loan-use"), L = i("kv-loan-progress-group"), M = i("kv-loan-tag");
30
+ return e(), n("div", {
31
+ class: _(["tw-flex tw-flex-col tw-bg-white tw-rounded tw-w-full tw-pb-2", { "tw-pointer-events-none": t.isLoading }]),
32
+ "data-testid": "loan-card",
33
+ style: R([{ "box-shadow": "0px 4px 8px 0px rgba(0, 0, 0, 0.38)" }, { minWidth: "230px", maxWidth: h.cardWidth }])
34
+ }, [
35
+ d("div", D, [
36
+ d("div", z, [
37
+ t.isLoading ? (e(), o(r, {
38
+ key: 0,
39
+ class: "tw-w-full tw-rounded-t",
40
+ style: { height: "11rem" }
41
+ })) : (e(), n("div", V, [
42
+ (e(), o(g(t.tag), {
43
+ to: t.readMorePath,
44
+ href: t.readMorePath,
45
+ class: "tw-flex",
46
+ "aria-label": "Borrower image",
47
+ onClick: a[0] || (a[0] = (l) => t.clickReadMore("Photo", l))
48
+ }, {
49
+ default: w(() => [
50
+ s(u, {
51
+ class: "tw-relative tw-w-full tw-bg-black tw-rounded-t borrower-image tw-bg-clip-content",
52
+ alt: `Photo of ${t.borrowerName}`,
53
+ "aspect-ratio": h.imageAspectRatio,
54
+ "default-image": { width: h.imageDefaultWidth },
55
+ hash: t.imageHash,
56
+ images: h.imageSizes,
57
+ "photo-path": m.photoPath
58
+ }, null, 8, ["alt", "aspect-ratio", "default-image", "hash", "images", "photo-path"]),
59
+ t.countryName ? (e(), n("div", O, [
60
+ d("p", S, [
61
+ (e(), o(A, null, {
62
+ default: w(() => [
63
+ s(y, {
64
+ class: "tw-ml-0.5 tw-mr-1 tw-flex-shrink-0",
65
+ country: t.countryCode,
66
+ name: t.countryName,
67
+ "width-override": "16px",
68
+ "hide-border": ""
69
+ }, null, 8, ["country", "name"])
70
+ ]),
71
+ _: 1
72
+ })),
73
+ d("span", {
74
+ id: `loan-location-${m.loanId}`,
75
+ ref: "locationRef",
76
+ class: "tw-truncate tw-min-w-0",
77
+ style: { "margin-top": "0.125rem" }
78
+ }, f(t.formattedLocation), 9, E),
79
+ t.isLocationTruncated ? (e(), o(b, {
80
+ key: 0,
81
+ controller: `loan-location-${m.loanId}`,
82
+ "max-width": "250px"
83
+ }, {
84
+ default: w(() => [
85
+ p(f(t.formattedLocation), 1)
86
+ ]),
87
+ _: 1
88
+ }, 8, ["controller"])) : c("", !0)
89
+ ])
90
+ ])) : c("", !0)
91
+ ]),
92
+ _: 1
93
+ }, 8, ["to", "href"])),
94
+ m.isVisitor ? c("", !0) : (e(), o(v, {
95
+ key: 0,
96
+ "loan-id": m.loanId,
97
+ "is-bookmarked": m.isBookmarked,
98
+ class: "loan-bookmark tw-absolute tw-right-1.5 tw-top-0",
99
+ "data-testid": "loan-card-bookmark",
100
+ onToggleBookmark: a[1] || (a[1] = (l) => k.$emit("toggle-bookmark"))
101
+ }, null, 8, ["loan-id", "is-bookmarked"]))
102
+ ])),
103
+ t.isLoading || typeof t.loanCallouts > "u" ? (e(), o(r, {
104
+ key: 2,
105
+ class: "tw-mt-1 tw-mx-auto",
106
+ style: { width: "60%", height: "1.75rem", "border-radius": "500rem" }
107
+ })) : c("", !0),
108
+ (e(), o(g(t.tag), {
109
+ to: t.readMorePath,
110
+ href: t.readMorePath,
111
+ "aria-label": "Borrower name",
112
+ class: "!tw-text-primary tw-no-underline",
113
+ onClick: a[2] || (a[2] = (l) => t.clickReadMore("Name", l))
114
+ }, {
115
+ default: w(() => [
116
+ d("h3", {
117
+ class: _(["loan-card-name tw-text-title", { "tw-text-center": t.borrowerName.length < 20 }]),
118
+ style: { "font-size": "28px" }
119
+ }, f(t.borrowerName), 3)
120
+ ]),
121
+ _: 1
122
+ }, 8, ["to", "href"])),
123
+ t.isLoading ? (e(), n("div", F, [
124
+ t.isLoading || typeof t.loanCallouts > "u" ? (e(), o(r, {
125
+ key: 0,
126
+ class: "tw-mt-0.5 tw-mb-1",
127
+ style: { width: "20%", height: "1.65rem", "border-radius": "500rem" }
128
+ })) : c("", !0),
129
+ t.isLoading || typeof t.loanCallouts > "u" ? (e(), o(r, {
130
+ key: 1,
131
+ class: "tw-mt-0.5 tw-mb-1",
132
+ style: { width: "20%", height: "1.65rem", "border-radius": "500rem" }
133
+ })) : c("", !0),
134
+ t.isLoading || typeof t.loanCallouts > "u" ? (e(), o(r, {
135
+ key: 2,
136
+ class: "tw-mt-0.5 tw-mb-1",
137
+ style: { width: "20%", height: "1.65rem", "border-radius": "500rem" }
138
+ })) : c("", !0)
139
+ ])) : (e(), o(g(t.tag), {
140
+ key: 4,
141
+ to: t.readMorePath,
142
+ href: t.readMorePath,
143
+ class: "tw-flex tw-no-underline hover:tw-no-underline focus:tw-no-underline tw-justify-center",
144
+ "aria-label": "Loan tag",
145
+ onClick: a[3] || (a[3] = (l) => t.clickReadMore("Tag", l))
146
+ }, {
147
+ default: w(() => [
148
+ s(x, {
149
+ callouts: t.loanCallouts,
150
+ "add-bg-color": !1,
151
+ class: "loan-callouts"
152
+ }, null, 8, ["callouts"])
153
+ ]),
154
+ _: 1
155
+ }, 8, ["to", "href"])),
156
+ (e(), o(g(t.tag), {
157
+ to: t.readMorePath,
158
+ href: t.readMorePath,
159
+ class: "loan-card-use tw-text-primary tw-no-underline",
160
+ "aria-label": "Loan use",
161
+ onClick: a[4] || (a[4] = (l) => t.clickReadMore("Use", l))
162
+ }, {
163
+ default: w(() => [
164
+ d("div", {
165
+ class: _(["tw-pt-0.5 tw-px-2", { "tw-mb-1.5": !t.isLoading }])
166
+ }, [
167
+ t.isLoading ? (e(), n("div", U, [
168
+ (e(!0), n(T, null, I([...Array(3)], (l, N) => (e(), n("div", {
169
+ key: N,
170
+ class: "tw-h-2 tw-mb-1"
171
+ }, [
172
+ s(r)
173
+ ]))), 128))
174
+ ])) : (e(), n("div", W, [
175
+ s(C, {
176
+ use: t.loanUse,
177
+ "loan-amount": t.loanAmount,
178
+ status: t.loanStatus,
179
+ "borrower-count": t.loanBorrowerCount,
180
+ name: t.borrowerName,
181
+ "distribution-model": t.distributionModel,
182
+ "hide-loan-amount": "",
183
+ class: "!tw-line-clamp-3"
184
+ }, null, 8, ["use", "loan-amount", "status", "borrower-count", "name", "distribution-model"])
185
+ ]))
186
+ ], 2)
187
+ ]),
188
+ _: 1
189
+ }, 8, ["to", "href"]))
190
+ ])
191
+ ]),
192
+ d("div", j, [
193
+ t.hasProgressData ? c("", !0) : (e(), n("div", K, [
194
+ d("div", G, [
195
+ s(r, {
196
+ class: "tw-mb-0.5",
197
+ style: { width: "20%", height: "1.3rem" }
198
+ }),
199
+ s(r, {
200
+ class: "tw-mb-0.5",
201
+ style: { width: "20%", height: "1.3rem" }
202
+ })
203
+ ]),
204
+ s(r, {
205
+ class: "tw-rounded",
206
+ style: { width: "100%", height: "0.5rem" }
207
+ })
208
+ ])),
209
+ d("div", null, [
210
+ t.sharesAvailable ? (e(), o(g(t.tag), {
211
+ key: 0,
212
+ to: t.readMorePath,
213
+ href: t.readMorePath,
214
+ class: "loan-card-progress tw-mt-1",
215
+ "aria-label": "Loan progress",
216
+ onClick: a[5] || (a[5] = (l) => t.clickReadMore("Progress", l))
217
+ }, {
218
+ default: w(() => [
219
+ s(L, {
220
+ id: "loanProgress",
221
+ "money-left": t.unreservedAmount,
222
+ "amount-goal": t.loanAmount,
223
+ "progress-percent": t.fundraisingPercent,
224
+ class: "tw-text-secondary"
225
+ }, null, 8, ["money-left", "amount-goal", "progress-percent"])
226
+ ]),
227
+ _: 1
228
+ }, 8, ["to", "href"])) : c("", !0)
229
+ ]),
230
+ t.isLoading ? (e(), o(r, {
231
+ key: 1,
232
+ class: "tw-rounded tw-mx-auto tw-mt-2",
233
+ style: { width: "9rem", height: "1rem" }
234
+ })) : h.isFunded ? (e(), n("div", H, " 🎉 Fully funded! ")) : (e(), o(M, {
235
+ key: 3,
236
+ loan: m.loan,
237
+ "use-expanded-styles": !0,
238
+ "enable-multi-matching": m.enableMultiMatching,
239
+ style: { "font-size": "15px" },
240
+ class: "tw-text-center tw-pt-2"
241
+ }, null, 8, ["loan", "enable-multi-matching"]))
242
+ ])
243
+ ], 6);
244
+ }
245
+ const $ = /* @__PURE__ */ B(P, [["render", q], ["__scopeId", "data-v-2e03cf82"]]);
219
246
  export {
220
- mo as KV_INTRODUCTION_LOAN_CARD_FRAGMENT,
221
- fo as KV_INTRODUCTION_LOAN_CARD_USER_FRAGMENT,
222
- co as default
247
+ ot as KV_INTRODUCTION_LOAN_CARD_FRAGMENT,
248
+ at as KV_INTRODUCTION_LOAN_CARD_USER_FRAGMENT,
249
+ $ as default
223
250
  };
@@ -0,0 +1,223 @@
1
+ import a from "graphql-tag";
2
+ import F from "numeral";
3
+ import { LOAN_CALLOUTS_FRAGMENT as k, LOAN_GEOCODE_FRAGMENT as B, LOAN_PROGRESS_FRAGMENT as E, loanCardComputedProperties as G, loanCardMethods as b, useLocationTruncation as I } from "../utils/loanCard.js";
4
+ import S from "./KvLoanBookmark.js";
5
+ import D from "./KvLoanUse.js";
6
+ import P from "./KvBorrowerImage.js";
7
+ import U from "./KvLoanProgressGroup.js";
8
+ import $ from "./KvLoanCallouts.js";
9
+ import w from "./KvLoanTag.js";
10
+ import V from "./KvMaterialIcon.js";
11
+ import W from "./KvLoadingPlaceholder.js";
12
+ import q from "./KvFlag.js";
13
+ import H from "./KvTooltip.js";
14
+ import { KV_LOAN_BOOKMARK_FRAGMENT as r } from "./KvLoanBookmark.script.js";
15
+ import { KV_LOAN_TAG_FRAGMENT as j } from "./KvLoanTag.script.js";
16
+ import { KV_LOAN_USE_FRAGMENT as x } from "./KvLoanUse.script.js";
17
+ const mo = a`
18
+ fragment KvIntroductionLoanCard on LoanBasic {
19
+ id
20
+ image {
21
+ id
22
+ hash # for imageHash
23
+ }
24
+ lenders(limit: 0) {
25
+ totalCount # for lendersNumber
26
+ }
27
+ loanFundraisingInfo {
28
+ id
29
+ fundedAmount # for amountLent
30
+ }
31
+ name # for borrowerName
32
+ status # for isFunded
33
+ ...KvLoanBookmark
34
+ ...KvLoanTag
35
+ ...KvLoanUse
36
+ ...LoanCallouts
37
+ ...LoanGeocode
38
+ ...LoanProgress
39
+ }
40
+ ${r}
41
+ ${j}
42
+ ${x}
43
+ ${k}
44
+ ${B}
45
+ ${E}
46
+ `, fo = a`
47
+ fragment KvIntroductionLoanCardUser on LoanBasic {
48
+ id
49
+ ...KvLoanBookmark
50
+ }
51
+ ${r}
52
+ `, co = {
53
+ name: "KvIntroductionLoanCard",
54
+ components: {
55
+ KvBorrowerImage: P,
56
+ KvLoadingPlaceholder: W,
57
+ KvLoanUse: D,
58
+ KvLoanProgressGroup: U,
59
+ KvMaterialIcon: V,
60
+ KvLoanTag: w,
61
+ KvLoanCallouts: $,
62
+ KvFlag: q,
63
+ KvLoanBookmark: S,
64
+ KvTooltip: H
65
+ },
66
+ props: {
67
+ loanId: {
68
+ type: Number,
69
+ default: void 0
70
+ },
71
+ loan: {
72
+ type: Object,
73
+ default: null
74
+ },
75
+ customLoanDetails: {
76
+ type: Boolean,
77
+ default: !1
78
+ },
79
+ categoryPageName: {
80
+ type: String,
81
+ default: ""
82
+ },
83
+ customCallouts: {
84
+ type: Array,
85
+ default: () => []
86
+ },
87
+ kvTrackFunction: {
88
+ type: Function,
89
+ required: !0
90
+ },
91
+ photoPath: {
92
+ type: String,
93
+ required: !0
94
+ },
95
+ errorMsg: {
96
+ type: String,
97
+ default: ""
98
+ },
99
+ externalLinks: {
100
+ type: Boolean,
101
+ default: !1
102
+ },
103
+ route: {
104
+ type: Object,
105
+ default: void 0
106
+ },
107
+ useFullWidth: {
108
+ type: Boolean,
109
+ default: !1
110
+ },
111
+ isVisitor: {
112
+ type: Boolean,
113
+ default: !0
114
+ },
115
+ isBookmarked: {
116
+ type: Boolean,
117
+ default: !1
118
+ },
119
+ customHref: {
120
+ type: String,
121
+ default: ""
122
+ },
123
+ enableMultiMatching: {
124
+ type: Boolean,
125
+ default: !1
126
+ }
127
+ },
128
+ emits: [
129
+ "toggle-bookmark"
130
+ ],
131
+ setup(o, { emit: t }) {
132
+ const {
133
+ allDataLoaded: e,
134
+ borrowerName: n,
135
+ city: i,
136
+ countryName: s,
137
+ countryCode: u,
138
+ distributionModel: l,
139
+ formattedLocation: m,
140
+ fundraisingPercent: d,
141
+ hasProgressData: f,
142
+ imageHash: c,
143
+ isLoading: p,
144
+ loanAmount: L,
145
+ loanBorrowerCount: g,
146
+ loanCallouts: A,
147
+ loanStatus: h,
148
+ loanUse: N,
149
+ mdiMapMarker: _,
150
+ readMorePath: v,
151
+ state: K,
152
+ tag: y,
153
+ unreservedAmount: C,
154
+ sharesAvailable: O
155
+ } = G(o, !0), {
156
+ clickReadMore: T
157
+ } = b(o, t), {
158
+ locationRef: M,
159
+ isLocationTruncated: R
160
+ } = I();
161
+ return {
162
+ allDataLoaded: e,
163
+ borrowerName: n,
164
+ city: i,
165
+ countryName: s,
166
+ countryCode: u,
167
+ distributionModel: l,
168
+ formattedLocation: m,
169
+ fundraisingPercent: d,
170
+ hasProgressData: f,
171
+ imageHash: c,
172
+ isLoading: p,
173
+ loanAmount: L,
174
+ loanBorrowerCount: g,
175
+ loanCallouts: A,
176
+ loanStatus: h,
177
+ loanUse: N,
178
+ mdiMapMarker: _,
179
+ readMorePath: v,
180
+ state: K,
181
+ tag: y,
182
+ unreservedAmount: C,
183
+ sharesAvailable: O,
184
+ clickReadMore: T,
185
+ locationRef: M,
186
+ isLocationTruncated: R
187
+ };
188
+ },
189
+ computed: {
190
+ cardWidth() {
191
+ return this.useFullWidth ? "100%" : "20.5rem";
192
+ },
193
+ imageAspectRatio() {
194
+ return 5 / 8;
195
+ },
196
+ imageDefaultWidth() {
197
+ return 480;
198
+ },
199
+ imageSizes() {
200
+ return [
201
+ { width: this.imageDefaultWidth, viewSize: 375 }
202
+ ];
203
+ },
204
+ lendersNumber() {
205
+ var o, t;
206
+ return ((t = (o = this.loan) == null ? void 0 : o.lenders) == null ? void 0 : t.totalCount) ?? 0;
207
+ },
208
+ amountLent() {
209
+ var t, e;
210
+ const o = ((e = (t = this.loan) == null ? void 0 : t.loanFundraisingInfo) == null ? void 0 : e.fundedAmount) ?? 0;
211
+ return F(o).format("$0,0");
212
+ },
213
+ isFunded() {
214
+ var o;
215
+ return ((o = this.loan) == null ? void 0 : o.status) === "funded" || this.hasProgressData && !this.sharesAvailable;
216
+ }
217
+ }
218
+ };
219
+ export {
220
+ mo as KV_INTRODUCTION_LOAN_CARD_FRAGMENT,
221
+ fo as KV_INTRODUCTION_LOAN_CARD_USER_FRAGMENT,
222
+ co as default
223
+ };
@@ -1,4 +1,4 @@
1
- import e from "./KvLendAmountButton2.js";
1
+ import e from "./KvLendAmountButton.script.js";
2
2
  import { resolveComponent as n, openBlock as r, createBlock as c, withCtx as a, createTextVNode as _, toDisplayString as p } from "vue";
3
3
  import m from "../_virtual/_plugin-vue_export-helper.js";
4
4
  function s(u, d, f, i, l, t) {