@kiva/kv-components 7.6.2 → 8.0.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.
Files changed (332) hide show
  1. package/.eslintignore +5 -0
  2. package/dist/index.d.ts +3 -0
  3. package/dist/index.js +236 -216
  4. package/dist/utils/Alea.d.ts +9 -0
  5. package/dist/utils/Alea.js +23 -23
  6. package/dist/utils/arrayUtils.d.ts +3 -0
  7. package/dist/utils/arrayUtils.js +1 -1
  8. package/dist/utils/attrs.d.ts +6 -0
  9. package/dist/utils/carousels.d.ts +21 -0
  10. package/dist/utils/comparators.d.ts +3 -0
  11. package/dist/utils/comparators.js +20 -6
  12. package/dist/utils/debounce.d.ts +1 -0
  13. package/dist/utils/debounce.js +4 -4
  14. package/dist/utils/event.d.ts +1 -0
  15. package/dist/utils/event.js +7 -0
  16. package/dist/utils/expander.d.ts +14 -0
  17. package/dist/utils/imageUtils.d.ts +11 -0
  18. package/dist/utils/imageUtils.js +12 -12
  19. package/dist/utils/index.d.ts +21 -0
  20. package/dist/utils/loanCard.d.ts +35 -0
  21. package/dist/utils/loanCard.js +2 -2
  22. package/dist/utils/loanSearch/queryParamUtils.d.ts +1 -0
  23. package/dist/utils/loanUtils.d.ts +11 -0
  24. package/dist/utils/loanUtils.js +56 -53
  25. package/dist/utils/mapUtils.d.ts +5 -0
  26. package/dist/utils/markMatches.d.ts +1 -0
  27. package/dist/utils/paramCase.d.ts +1 -0
  28. package/dist/utils/printing.d.ts +2 -0
  29. package/dist/utils/scrollLock.d.ts +4 -0
  30. package/dist/utils/themeUtils.d.ts +12 -0
  31. package/dist/utils/throttle.d.ts +1 -0
  32. package/dist/utils/throttle.js +4 -4
  33. package/dist/utils/touchEvents.d.ts +3 -0
  34. package/dist/utils/touchEvents.js +9 -9
  35. package/dist/utils/treemap.d.ts +16 -0
  36. package/dist/utils/treemap.js +1 -1
  37. package/dist/vue/KvAccordionItem.js +28 -82
  38. package/dist/vue/KvAccordionItem.vue.d.ts +107 -0
  39. package/dist/vue/KvAccordionItem2.js +60 -0
  40. package/dist/vue/KvActivityRow.js +11 -22
  41. package/dist/vue/KvActivityRow.vue.d.ts +66 -0
  42. package/dist/vue/KvActivityRow2.js +16 -0
  43. package/dist/vue/KvAtbModal.css +1 -1
  44. package/dist/vue/KvAtbModal.js +68 -248
  45. package/dist/vue/KvAtbModal.vue.d.ts +359 -0
  46. package/dist/vue/KvAtbModal2.js +186 -0
  47. package/dist/vue/KvBorrowerImage.js +17 -118
  48. package/dist/vue/KvBorrowerImage.vue.d.ts +62 -0
  49. package/dist/vue/KvBorrowerImage2.js +106 -0
  50. package/dist/vue/KvButton.js +20 -164
  51. package/dist/vue/KvButton.vue.d.ts +94 -0
  52. package/dist/vue/KvButton2.js +149 -0
  53. package/dist/vue/KvCardFrame.js +12 -74
  54. package/dist/vue/KvCardFrame.vue.d.ts +86 -0
  55. package/dist/vue/KvCardFrame2.js +67 -0
  56. package/dist/vue/KvCarousel.css +1 -1
  57. package/dist/vue/KvCarousel.js +55 -192
  58. package/dist/vue/KvCarousel.vue.d.ts +135 -0
  59. package/dist/vue/KvCarousel2.js +142 -0
  60. package/dist/vue/KvCartModal.css +1 -1
  61. package/dist/vue/KvCartModal.js +31 -131
  62. package/dist/vue/KvCartModal.vue.d.ts +163 -0
  63. package/dist/vue/KvCartModal2.js +106 -0
  64. package/dist/vue/KvCartPill.js +12 -51
  65. package/dist/vue/KvCartPill.vue.d.ts +52 -0
  66. package/dist/vue/KvCartPill2.js +45 -0
  67. package/dist/vue/KvCheckbox.css +1 -1
  68. package/dist/vue/KvCheckbox.js +30 -126
  69. package/dist/vue/KvCheckbox.vue.d.ts +90 -0
  70. package/dist/vue/KvCheckbox2.js +102 -0
  71. package/dist/vue/KvCheckoutReceipt.css +1 -1
  72. package/dist/vue/KvCheckoutReceipt.js +120 -199
  73. package/dist/vue/KvCheckoutReceipt.vue.d.ts +164 -0
  74. package/dist/vue/KvCheckoutReceipt2.js +85 -0
  75. package/dist/vue/KvChip.js +12 -29
  76. package/dist/vue/KvChip.vue.d.ts +22 -0
  77. package/dist/vue/KvChip2.js +22 -0
  78. package/dist/vue/KvClassicLoanCard.css +1 -1
  79. package/dist/vue/KvClassicLoanCard.js +83 -351
  80. package/dist/vue/KvClassicLoanCard.vue.d.ts +2120 -0
  81. package/dist/vue/KvClassicLoanCard2.js +281 -0
  82. package/dist/vue/KvCommentsAdd.css +1 -1
  83. package/dist/vue/KvCommentsAdd.js +34 -81
  84. package/dist/vue/KvCommentsAdd.vue.d.ts +296 -0
  85. package/dist/vue/KvCommentsAdd2.js +57 -0
  86. package/dist/vue/KvCommentsContainer.js +15 -66
  87. package/dist/vue/KvCommentsContainer.vue.d.ts +954 -0
  88. package/dist/vue/KvCommentsContainer2.js +58 -0
  89. package/dist/vue/KvCommentsHeartButton.css +1 -1
  90. package/dist/vue/KvCommentsHeartButton.js +12 -51
  91. package/dist/vue/KvCommentsHeartButton.vue.d.ts +42 -0
  92. package/dist/vue/KvCommentsHeartButton2.js +44 -0
  93. package/dist/vue/KvCommentsList.js +9 -51
  94. package/dist/vue/KvCommentsList.vue.d.ts +619 -0
  95. package/dist/vue/KvCommentsList2.js +46 -0
  96. package/dist/vue/KvCommentsListItem.js +62 -186
  97. package/dist/vue/KvCommentsListItem.vue.d.ts +571 -0
  98. package/dist/vue/KvCommentsListItem2.js +135 -0
  99. package/dist/vue/KvCommentsReplyButton.css +1 -1
  100. package/dist/vue/KvCommentsReplyButton.js +8 -17
  101. package/dist/vue/KvCommentsReplyButton.vue.d.ts +98 -0
  102. package/dist/vue/KvCommentsReplyButton2.js +13 -0
  103. package/dist/vue/KvCompactLoanCard.css +1 -1
  104. package/dist/vue/KvCompactLoanCard.js +71 -327
  105. package/dist/vue/KvCompactLoanCard.vue.d.ts +1272 -0
  106. package/dist/vue/KvCompactLoanCard2.js +269 -0
  107. package/dist/vue/KvContentfulImg.js +47 -149
  108. package/dist/vue/KvContentfulImg.vue.d.ts +107 -0
  109. package/dist/vue/KvContentfulImg2.js +119 -0
  110. package/dist/vue/KvCountdownTimer.js +8 -28
  111. package/dist/vue/KvCountdownTimer.vue.d.ts +15 -0
  112. package/dist/vue/KvCountdownTimer2.js +26 -0
  113. package/dist/vue/KvDatePicker.js +21 -101
  114. package/dist/vue/KvDatePicker.vue.d.ts +58 -0
  115. package/dist/vue/KvDatePicker2.js +86 -0
  116. package/dist/vue/KvExpandable.js +9 -56
  117. package/dist/vue/KvExpandable.vue.d.ts +53 -0
  118. package/dist/vue/KvExpandable2.js +52 -0
  119. package/dist/vue/KvExpandableQuestion.js +23 -82
  120. package/dist/vue/KvExpandableQuestion.vue.d.ts +124 -0
  121. package/dist/vue/KvExpandableQuestion2.js +65 -0
  122. package/dist/vue/KvFlag.css +1 -1
  123. package/dist/vue/KvFlag.js +16 -617
  124. package/dist/vue/KvFlag.vue.d.ts +66 -0
  125. package/dist/vue/KvFlag2.js +606 -0
  126. package/dist/vue/KvGrid.js +7 -18
  127. package/dist/vue/KvGrid.vue.d.ts +14 -0
  128. package/dist/vue/KvGrid2.js +15 -0
  129. package/dist/vue/KvIconBag.js +12 -18
  130. package/dist/vue/KvIconBag.vue.d.ts +14 -0
  131. package/dist/vue/KvIconBag2.js +11 -0
  132. package/dist/vue/KvImpactDashboardHeader.vue.d.ts +17 -0
  133. package/dist/vue/KvImpactVerticalSelector.js +31 -110
  134. package/dist/vue/KvImpactVerticalSelector.vue.d.ts +278 -0
  135. package/dist/vue/KvImpactVerticalSelector2.js +85 -0
  136. package/dist/vue/KvInlineActivityCard.js +15 -44
  137. package/dist/vue/KvInlineActivityCard.vue.d.ts +71 -0
  138. package/dist/vue/KvInlineActivityCard2.js +35 -0
  139. package/dist/vue/KvInlineActivityFeed.css +1 -1
  140. package/dist/vue/KvInlineActivityFeed.js +11 -23
  141. package/dist/vue/KvInlineActivityFeed.vue.d.ts +85 -0
  142. package/dist/vue/KvInlineActivityFeed2.js +17 -0
  143. package/dist/vue/KvIntroductionLoanCard.css +1 -1
  144. package/dist/vue/KvIntroductionLoanCard.js +111 -309
  145. package/dist/vue/KvIntroductionLoanCard.vue.d.ts +617 -0
  146. package/dist/vue/KvIntroductionLoanCard2.js +209 -0
  147. package/dist/vue/KvLendAmountButton.js +9 -53
  148. package/dist/vue/KvLendAmountButton.vue.d.ts +140 -0
  149. package/dist/vue/KvLendAmountButton2.js +48 -0
  150. package/dist/vue/KvLendCta.css +1 -1
  151. package/dist/vue/KvLendCta.js +150 -530
  152. package/dist/vue/KvLendCta.vue.d.ts +583 -0
  153. package/dist/vue/KvLendCta2.js +387 -0
  154. package/dist/vue/KvLightbox.js +37 -148
  155. package/dist/vue/KvLightbox.vue.d.ts +77 -0
  156. package/dist/vue/KvLightbox2.js +117 -0
  157. package/dist/vue/KvLineGraph.js +25 -58
  158. package/dist/vue/KvLineGraph.vue.d.ts +35 -0
  159. package/dist/vue/KvLineGraph2.js +39 -0
  160. package/dist/vue/KvLoadingPlaceholder.vue.d.ts +2 -0
  161. package/dist/vue/KvLoadingSpinner.js +9 -34
  162. package/dist/vue/KvLoadingSpinner.vue.d.ts +27 -0
  163. package/dist/vue/KvLoadingSpinner2.js +29 -0
  164. package/dist/vue/KvLoanActivities.css +1 -1
  165. package/dist/vue/KvLoanActivities.js +37 -179
  166. package/dist/vue/KvLoanActivities.vue.d.ts +853 -0
  167. package/dist/vue/KvLoanActivities2.js +151 -0
  168. package/dist/vue/KvLoanBookmark.js +14 -40
  169. package/dist/vue/KvLoanBookmark.vue.d.ts +32 -0
  170. package/dist/vue/KvLoanBookmark2.js +32 -0
  171. package/dist/vue/KvLoanCallouts.css +1 -1
  172. package/dist/vue/KvLoanCallouts.js +10 -17
  173. package/dist/vue/KvLoanCallouts.vue.d.ts +18 -0
  174. package/dist/vue/KvLoanCallouts2.js +12 -0
  175. package/dist/vue/KvLoanInfoCard.js +20 -19
  176. package/dist/vue/KvLoanProgressGroup.css +1 -1
  177. package/dist/vue/KvLoanProgressGroup.js +18 -57
  178. package/dist/vue/KvLoanProgressGroup.vue.d.ts +108 -0
  179. package/dist/vue/KvLoanProgressGroup2.js +44 -0
  180. package/dist/vue/KvLoanTag.js +15 -103
  181. package/dist/vue/KvLoanTag.vue.d.ts +46 -0
  182. package/dist/vue/KvLoanTag2.js +94 -0
  183. package/dist/vue/KvLoanTeamPick.vue.d.ts +2 -0
  184. package/dist/vue/KvLoanUse.js +12 -100
  185. package/dist/vue/KvLoanUse.vue.d.ts +120 -0
  186. package/dist/vue/KvLoanUse2.js +95 -0
  187. package/dist/vue/KvLogo.vue.d.ts +2 -0
  188. package/dist/vue/KvMap.js +13 -381
  189. package/dist/vue/KvMap.vue.d.ts +213 -0
  190. package/dist/vue/KvMap2.js +376 -0
  191. package/dist/vue/KvMaterialIcon.js +10 -20
  192. package/dist/vue/KvMaterialIcon.vue.d.ts +14 -0
  193. package/dist/vue/KvMaterialIcon2.js +15 -0
  194. package/dist/vue/KvPageContainer.js +9 -8
  195. package/dist/vue/KvPageContainer.vue.d.ts +2 -0
  196. package/dist/vue/KvPageContainer2.js +4 -0
  197. package/dist/vue/KvPagination.js +38 -138
  198. package/dist/vue/KvPagination.vue.d.ts +107 -0
  199. package/dist/vue/KvPagination2.js +105 -0
  200. package/dist/vue/KvPieChart.css +1 -1
  201. package/dist/vue/KvPieChart.js +49 -128
  202. package/dist/vue/KvPieChart.vue.d.ts +47 -0
  203. package/dist/vue/KvPieChart2.js +85 -0
  204. package/dist/vue/KvPill.js +9 -19
  205. package/dist/vue/KvPill.vue.d.ts +23 -0
  206. package/dist/vue/KvPill2.js +15 -0
  207. package/dist/vue/KvPopper.js +14 -122
  208. package/dist/vue/KvPopper.vue.d.ts +80 -0
  209. package/dist/vue/KvPopper2.js +113 -0
  210. package/dist/vue/KvProgressBar.js +17 -112
  211. package/dist/vue/KvProgressBar.vue.d.ts +70 -0
  212. package/dist/vue/KvProgressBar2.js +101 -0
  213. package/dist/vue/KvPulsingDot.css +1 -1
  214. package/dist/vue/KvPulsingDot.js +11 -25
  215. package/dist/vue/KvPulsingDot.vue.d.ts +23 -0
  216. package/dist/vue/KvPulsingDot2.js +19 -0
  217. package/dist/vue/KvRadio.js +23 -106
  218. package/dist/vue/KvRadio.vue.d.ts +62 -0
  219. package/dist/vue/KvRadio2.js +89 -0
  220. package/dist/vue/KvSecondaryNav.css +1 -1
  221. package/dist/vue/KvSecondaryNav.js +46 -122
  222. package/dist/vue/KvSecondaryNav.vue.d.ts +117 -0
  223. package/dist/vue/KvSecondaryNav2.js +82 -0
  224. package/dist/vue/KvSelect.css +1 -1
  225. package/dist/vue/KvSelect.js +18 -78
  226. package/dist/vue/KvSelect.vue.d.ts +58 -0
  227. package/dist/vue/KvSelect2.js +66 -0
  228. package/dist/vue/KvSideSheet.js +44 -262
  229. package/dist/vue/KvSideSheet.vue.d.ts +136 -0
  230. package/dist/vue/KvSideSheet2.js +224 -0
  231. package/dist/vue/KvSwitch.js +23 -76
  232. package/dist/vue/KvSwitch.vue.d.ts +34 -0
  233. package/dist/vue/KvSwitch2.js +59 -0
  234. package/dist/vue/KvTab.js +15 -57
  235. package/dist/vue/KvTab.vue.d.ts +34 -0
  236. package/dist/vue/KvTab2.js +48 -0
  237. package/dist/vue/KvTabPanel.js +14 -36
  238. package/dist/vue/KvTabPanel.vue.d.ts +14 -0
  239. package/dist/vue/KvTabPanel2.js +28 -0
  240. package/dist/vue/KvTabs.js +21 -75
  241. package/dist/vue/KvTabs.vue.d.ts +22 -0
  242. package/dist/vue/KvTabs2.js +60 -0
  243. package/dist/vue/KvTextInput.js +28 -148
  244. package/dist/vue/KvTextInput.vue.d.ts +105 -0
  245. package/dist/vue/KvTextInput2.js +126 -0
  246. package/dist/vue/KvTextLink.js +13 -76
  247. package/dist/vue/KvTextLink.vue.d.ts +64 -0
  248. package/dist/vue/KvTextLink2.js +68 -0
  249. package/dist/vue/KvThemeProvider.js +8 -59
  250. package/dist/vue/KvThemeProvider.vue.d.ts +23 -0
  251. package/dist/vue/KvThemeProvider2.js +55 -0
  252. package/dist/vue/KvToast.js +32 -69
  253. package/dist/vue/KvToast.vue.d.ts +31 -0
  254. package/dist/vue/KvToast2.js +43 -0
  255. package/dist/vue/KvTooltip.css +1 -1
  256. package/dist/vue/KvTooltip.js +27 -123
  257. package/dist/vue/KvTooltip.vue.d.ts +2 -0
  258. package/dist/vue/KvTooltip2.js +103 -0
  259. package/dist/vue/KvTreeMapChart.css +1 -1
  260. package/dist/vue/KvTreeMapChart.js +28 -156
  261. package/dist/vue/KvTreeMapChart.vue.d.ts +60 -0
  262. package/dist/vue/KvTreeMapChart2.js +133 -0
  263. package/dist/vue/KvUserAvatar.js +28 -110
  264. package/dist/vue/KvUserAvatar.vue.d.ts +55 -0
  265. package/dist/vue/KvUserAvatar2.js +88 -0
  266. package/dist/vue/KvUtilityMenu.js +19 -95
  267. package/dist/vue/KvUtilityMenu.vue.d.ts +104 -0
  268. package/dist/vue/KvUtilityMenu2.js +81 -0
  269. package/dist/vue/KvVerticalCarousel.js +40 -137
  270. package/dist/vue/KvVerticalCarousel.vue.d.ts +90 -0
  271. package/dist/vue/KvVerticalCarousel2.js +103 -0
  272. package/dist/vue/KvVotingCard.css +1 -1
  273. package/dist/vue/KvVotingCard.js +31 -88
  274. package/dist/vue/KvVotingCard.vue.d.ts +249 -0
  275. package/dist/vue/KvVotingCard2.js +63 -0
  276. package/dist/vue/KvVotingCardV2.js +35 -90
  277. package/dist/vue/KvVotingCardV2.vue.d.ts +308 -0
  278. package/dist/vue/KvVotingCardV22.js +61 -0
  279. package/dist/vue/KvWideLoanCard.css +1 -1
  280. package/dist/vue/KvWideLoanCard.js +66 -274
  281. package/dist/vue/KvWideLoanCard.vue.d.ts +1191 -0
  282. package/dist/vue/KvWideLoanCard2.js +220 -0
  283. package/dist/vue/KvWwwHeader/KvHeaderAboutMenu.js +34 -38
  284. package/dist/vue/KvWwwHeader/KvHeaderAboutMenu.vue.d.ts +20 -0
  285. package/dist/vue/KvWwwHeader/KvHeaderAboutMenu2.js +9 -0
  286. package/dist/vue/KvWwwHeader/KvHeaderDropdownLink.js +20 -83
  287. package/dist/vue/KvWwwHeader/KvHeaderDropdownLink.vue.d.ts +91 -0
  288. package/dist/vue/KvWwwHeader/KvHeaderDropdownLink2.js +69 -0
  289. package/dist/vue/KvWwwHeader/KvHeaderLinkBar.css +1 -1
  290. package/dist/vue/KvWwwHeader/KvHeaderLinkBar.js +77 -248
  291. package/dist/vue/KvWwwHeader/KvHeaderLinkBar.vue.d.ts +1071 -0
  292. package/dist/vue/KvWwwHeader/KvHeaderLinkBar2.js +178 -0
  293. package/dist/vue/KvWwwHeader/KvHeaderLogo.js +8 -12
  294. package/dist/vue/KvWwwHeader/KvHeaderLogo.vue.d.ts +4 -0
  295. package/dist/vue/KvWwwHeader/KvHeaderLogo2.js +9 -0
  296. package/dist/vue/KvWwwHeader/KvHeaderMenuLink.vue.d.ts +17 -0
  297. package/dist/vue/KvWwwHeader/KvHeaderMobileMenu.css +1 -1
  298. package/dist/vue/KvWwwHeader/KvHeaderMobileMenu.js +37 -91
  299. package/dist/vue/KvWwwHeader/KvHeaderMobileMenu.vue.d.ts +162 -0
  300. package/dist/vue/KvWwwHeader/KvHeaderMobileMenu2.js +59 -0
  301. package/dist/vue/KvWwwHeader/KvHeaderMyKivaMenu.js +36 -58
  302. package/dist/vue/KvWwwHeader/KvHeaderMyKivaMenu.vue.d.ts +59 -0
  303. package/dist/vue/KvWwwHeader/KvHeaderMyKivaMenu2.js +27 -0
  304. package/dist/vue/KvWwwHeader/KvHeaderTakeActionMenu.js +20 -24
  305. package/dist/vue/KvWwwHeader/KvHeaderTakeActionMenu.vue.d.ts +20 -0
  306. package/dist/vue/KvWwwHeader/KvHeaderTakeActionMenu2.js +9 -0
  307. package/dist/vue/KvWwwHeader/LendMenu/KvLendListMenu.css +1 -1
  308. package/dist/vue/KvWwwHeader/LendMenu/KvLendListMenu.js +105 -181
  309. package/dist/vue/KvWwwHeader/LendMenu/KvLendListMenu.vue.d.ts +319 -0
  310. package/dist/vue/KvWwwHeader/LendMenu/KvLendListMenu2.js +82 -0
  311. package/dist/vue/KvWwwHeader/LendMenu/KvLendMegaMenu.css +1 -1
  312. package/dist/vue/KvWwwHeader/LendMenu/KvLendMegaMenu.js +93 -173
  313. package/dist/vue/KvWwwHeader/LendMenu/KvLendMegaMenu.vue.d.ts +166 -0
  314. package/dist/vue/KvWwwHeader/LendMenu/KvLendMegaMenu2.js +86 -0
  315. package/dist/vue/KvWwwHeader/LendMenu/KvLendMenu.js +17 -157
  316. package/dist/vue/KvWwwHeader/LendMenu/KvLendMenu.vue.d.ts +506 -0
  317. package/dist/vue/KvWwwHeader/LendMenu/KvLendMenu2.js +145 -0
  318. package/dist/vue/KvWwwHeader/LendMenu/KvLendMenuCountryList.css +1 -1
  319. package/dist/vue/KvWwwHeader/LendMenu/KvLendMenuCountryList.js +11 -18
  320. package/dist/vue/KvWwwHeader/LendMenu/KvLendMenuCountryList.vue.d.ts +20 -0
  321. package/dist/vue/KvWwwHeader/LendMenu/KvLendMenuCountryList2.js +12 -0
  322. package/dist/vue/KvWwwHeader/LendMenu/KvLendMenuSearchList.js +10 -16
  323. package/dist/vue/KvWwwHeader/LendMenu/KvLendMenuSearchList.vue.d.ts +20 -0
  324. package/dist/vue/KvWwwHeader/LendMenu/KvLendMenuSearchList2.js +11 -0
  325. package/dist/vue/KvWwwHeader.css +1 -1
  326. package/dist/vue/KvWwwHeader.js +35 -148
  327. package/dist/vue/KvWwwHeader.vue.d.ts +4430 -0
  328. package/dist/vue/KvWwwHeader2.js +119 -0
  329. package/dist/vue/index.d.ts +86 -0
  330. package/package.json +35 -33
  331. package/tsconfig.json +32 -0
  332. package/vite.config.ts +84 -0
@@ -1,367 +1,169 @@
1
- import A from "graphql-tag";
2
- import E from "numeral";
3
- import { LOAN_CALLOUTS_FRAGMENT as I, LOAN_GEOCODE_FRAGMENT as G, LOAN_PROGRESS_FRAGMENT as U, loanCardComputedProperties as V, loanCardMethods as z } from "../utils/loanCard.js";
4
- import W, { KV_LOAN_BOOKMARK_FRAGMENT as M } from "./KvLoanBookmark.js";
5
- import j, { KV_LOAN_USE_FRAGMENT as H } from "./KvLoanUse.js";
6
- import q from "./KvBorrowerImage.js";
7
- import J from "./KvLoanProgressGroup.js";
8
- import Q from "./KvLoanCallouts.js";
9
- import X, { KV_LOAN_TAG_FRAGMENT as Y } from "./KvLoanTag.js";
10
- import Z from "./KvMaterialIcon.js";
11
- import $ from "./KvLoadingPlaceholder.js";
12
- import ee from "./KvFlag.js";
13
- import { resolveComponent as m, openBlock as t, createElementBlock as s, normalizeClass as x, normalizeStyle as te, createElementVNode as c, createBlock as a, resolveDynamicComponent as f, withCtx as h, createVNode as d, Suspense as oe, createTextVNode as ae, toDisplayString as N, createCommentVNode as u, Fragment as re, renderList as ne } from "vue";
1
+ import M from "./KvIntroductionLoanCard2.js";
2
+ import { KV_INTRODUCTION_LOAN_CARD_FRAGMENT as tt, KV_INTRODUCTION_LOAN_CARD_USER_FRAGMENT as et } from "./KvIntroductionLoanCard2.js";
3
+ import { resolveComponent as d, openBlock as e, createElementBlock as n, normalizeClass as _, normalizeStyle as P, createElementVNode as s, createBlock as o, resolveDynamicComponent as g, withCtx as m, createVNode as i, Suspense as R, createTextVNode as A, toDisplayString as f, createCommentVNode as c, Fragment as p, renderList as T } from "vue";
14
4
  import "./KvIntroductionLoanCard.css";
15
- import le from "../_virtual/_plugin-vue_export-helper.js";
16
- const Se = A`
17
- fragment KvIntroductionLoanCard on LoanBasic {
18
- id
19
- image {
20
- id
21
- hash # for imageHash
22
- }
23
- lenders(limit: 0) {
24
- totalCount # for lendersNumber
25
- }
26
- loanFundraisingInfo {
27
- id
28
- fundedAmount # for amountLent
29
- }
30
- name # for borrowerName
31
- status # for isFunded
32
- ...KvLoanBookmark
33
- ...KvLoanTag
34
- ...KvLoanUse
35
- ...LoanCallouts
36
- ...LoanGeocode
37
- ...LoanProgress
38
- }
39
- ${M}
40
- ${Y}
41
- ${H}
42
- ${I}
43
- ${G}
44
- ${U}
45
- `, De = A`
46
- fragment KvIntroductionLoanCardUser on LoanBasic {
47
- id
48
- ...KvLoanBookmark
49
- }
50
- ${M}
51
- `, ie = {
52
- name: "KvIntroductionLoanCard",
53
- components: {
54
- KvBorrowerImage: q,
55
- KvLoadingPlaceholder: $,
56
- KvLoanUse: j,
57
- KvLoanProgressGroup: J,
58
- KvMaterialIcon: Z,
59
- KvLoanTag: X,
60
- KvLoanCallouts: Q,
61
- KvFlag: ee,
62
- KvLoanBookmark: W
63
- },
64
- props: {
65
- loanId: {
66
- type: Number,
67
- default: void 0
68
- },
69
- loan: {
70
- type: Object,
71
- default: null
72
- },
73
- customLoanDetails: {
74
- type: Boolean,
75
- default: !1
76
- },
77
- categoryPageName: {
78
- type: String,
79
- default: ""
80
- },
81
- customCallouts: {
82
- type: Array,
83
- default: () => []
84
- },
85
- kvTrackFunction: {
86
- type: Function,
87
- required: !0
88
- },
89
- photoPath: {
90
- type: String,
91
- required: !0
92
- },
93
- errorMsg: {
94
- type: String,
95
- default: ""
96
- },
97
- externalLinks: {
98
- type: Boolean,
99
- default: !1
100
- },
101
- route: {
102
- type: Object,
103
- default: void 0
104
- },
105
- useFullWidth: {
106
- type: Boolean,
107
- default: !1
108
- },
109
- isVisitor: {
110
- type: Boolean,
111
- default: !0
112
- },
113
- isBookmarked: {
114
- type: Boolean,
115
- default: !1
116
- },
117
- customHref: {
118
- type: String,
119
- default: ""
120
- }
121
- },
122
- setup(n, { emit: o }) {
123
- const {
124
- allDataLoaded: i,
125
- borrowerName: e,
126
- city: C,
127
- countryName: w,
128
- countryCode: l,
129
- distributionModel: g,
130
- formattedLocation: _,
131
- fundraisingPercent: k,
132
- hasProgressData: y,
133
- imageHash: v,
134
- isLoading: b,
135
- loanAmount: L,
136
- loanBorrowerCount: r,
137
- loanCallouts: p,
138
- loanStatus: P,
139
- loanUse: K,
140
- mdiMapMarker: R,
141
- readMorePath: B,
142
- state: F,
143
- tag: O,
144
- unreservedAmount: T,
145
- sharesAvailable: S
146
- } = V(n, !0), {
147
- clickReadMore: D
148
- } = z(n, o);
149
- return {
150
- allDataLoaded: i,
151
- borrowerName: e,
152
- city: C,
153
- countryName: w,
154
- countryCode: l,
155
- distributionModel: g,
156
- formattedLocation: _,
157
- fundraisingPercent: k,
158
- hasProgressData: y,
159
- imageHash: v,
160
- isLoading: b,
161
- loanAmount: L,
162
- loanBorrowerCount: r,
163
- loanCallouts: p,
164
- loanStatus: P,
165
- loanUse: K,
166
- mdiMapMarker: R,
167
- readMorePath: B,
168
- state: F,
169
- tag: O,
170
- unreservedAmount: T,
171
- sharesAvailable: S,
172
- clickReadMore: D
173
- };
174
- },
175
- computed: {
176
- cardWidth() {
177
- return this.useFullWidth ? "100%" : "20.5rem";
178
- },
179
- imageAspectRatio() {
180
- return 5 / 8;
181
- },
182
- imageDefaultWidth() {
183
- return 480;
184
- },
185
- imageSizes() {
186
- return [
187
- { width: this.imageDefaultWidth, viewSize: 375 }
188
- ];
189
- },
190
- lendersNumber() {
191
- var n, o;
192
- return ((o = (n = this.loan) == null ? void 0 : n.lenders) == null ? void 0 : o.totalCount) ?? 0;
193
- },
194
- amountLent() {
195
- var o, i;
196
- const n = ((i = (o = this.loan) == null ? void 0 : o.loanFundraisingInfo) == null ? void 0 : i.fundedAmount) ?? 0;
197
- return E(n).format("$0,0");
198
- },
199
- isFunded() {
200
- var n;
201
- return ((n = this.loan) == null ? void 0 : n.status) === "funded" || this.hasProgressData && !this.sharesAvailable;
202
- }
203
- }
204
- }, se = { class: "tw-grow" }, de = { class: "loan-card-active-hover" }, me = {
5
+ import B from "../_virtual/_plugin-vue_export-helper.js";
6
+ const D = { class: "tw-grow" }, z = { class: "loan-card-active-hover" }, I = {
205
7
  key: 1,
206
8
  style: { height: "11rem" },
207
9
  class: "tw-relative tw-overflow-hidden"
208
- }, ce = { key: 0 }, ue = {
10
+ }, V = { key: 0 }, F = {
209
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-mr-2 tw-text-h4 tw-inline-flex tw-items-center !tw-capitalize",
210
12
  style: { padding: "2px 6px" }
211
- }, we = {
13
+ }, O = {
212
14
  key: 3,
213
15
  class: "tw-flex tw-justify-center tw-gap-2"
214
- }, he = {
16
+ }, S = {
215
17
  key: 0,
216
18
  class: "tw-w-full",
217
19
  style: { height: "5.5rem" }
218
- }, fe = { key: 1 }, ge = { class: "tw-px-2" }, _e = {
20
+ }, E = { key: 1 }, U = { class: "tw-px-2" }, W = {
219
21
  key: 0,
220
22
  class: "tw-w-full tw-pr-1"
221
- }, ke = { class: "tw-flex tw-justify-between" }, ye = {
23
+ }, j = { class: "tw-flex tw-justify-between" }, K = {
222
24
  key: 2,
223
25
  class: "tw-bg-eco-green-1 tw-text-action tw-text-center tw-py-1.5",
224
26
  style: { "font-weight": "bold", "font-size": "13px", "border-radius": "8px" }
225
27
  };
226
- function ve(n, o, i, e, C, w) {
227
- const l = m("kv-loading-placeholder"), g = m("kv-borrower-image"), _ = m("kv-flag"), k = m("kv-loan-bookmark"), y = m("kv-loan-callouts"), v = m("kv-loan-use"), b = m("kv-loan-progress-group"), L = m("kv-loan-tag");
228
- return t(), s("div", {
229
- class: x(["tw-flex tw-flex-col tw-bg-white tw-rounded tw-w-full tw-pb-2", { "tw-pointer-events-none": e.isLoading }]),
28
+ function G(k, a, w, t, H, h) {
29
+ const l = d("kv-loading-placeholder"), u = d("kv-borrower-image"), y = d("kv-flag"), b = d("kv-loan-bookmark"), v = d("kv-loan-callouts"), x = d("kv-loan-use"), C = d("kv-loan-progress-group"), N = d("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 }]),
230
32
  "data-testid": "loan-card",
231
- style: te([{ "box-shadow": "0px 4px 8px 0px rgba(0, 0, 0, 0.38)" }, { minWidth: "230px", maxWidth: w.cardWidth }])
33
+ style: P([{ "box-shadow": "0px 4px 8px 0px rgba(0, 0, 0, 0.38)" }, { minWidth: "230px", maxWidth: h.cardWidth }])
232
34
  }, [
233
- c("div", se, [
234
- c("div", de, [
235
- e.isLoading ? (t(), a(l, {
35
+ s("div", D, [
36
+ s("div", z, [
37
+ t.isLoading ? (e(), o(l, {
236
38
  key: 0,
237
39
  class: "tw-w-full tw-rounded-t",
238
40
  style: { height: "11rem" }
239
- })) : (t(), s("div", me, [
240
- (t(), a(f(e.tag), {
241
- to: e.readMorePath,
242
- href: e.readMorePath,
41
+ })) : (e(), n("div", I, [
42
+ (e(), o(g(t.tag), {
43
+ to: t.readMorePath,
44
+ href: t.readMorePath,
243
45
  class: "tw-flex",
244
46
  "aria-label": "Borrower image",
245
- onClick: o[0] || (o[0] = (r) => e.clickReadMore("Photo", r))
47
+ onClick: a[0] || (a[0] = (r) => t.clickReadMore("Photo", r))
246
48
  }, {
247
- default: h(() => [
248
- d(g, {
49
+ default: m(() => [
50
+ i(u, {
249
51
  class: "tw-relative tw-w-full tw-bg-black tw-rounded-t borrower-image",
250
- alt: `Photo of ${e.borrowerName}`,
251
- "aspect-ratio": w.imageAspectRatio,
252
- "default-image": { width: w.imageDefaultWidth },
253
- hash: e.imageHash,
254
- images: w.imageSizes,
255
- "photo-path": i.photoPath
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": w.photoPath
256
58
  }, null, 8, ["alt", "aspect-ratio", "default-image", "hash", "images", "photo-path"]),
257
- e.countryName ? (t(), s("div", ce, [
258
- c("p", ue, [
259
- (t(), a(oe, null, {
260
- default: h(() => [
261
- d(_, {
59
+ t.countryName ? (e(), n("div", V, [
60
+ s("p", F, [
61
+ (e(), o(R, null, {
62
+ default: m(() => [
63
+ i(y, {
262
64
  class: "tw-ml-0.5 tw-mr-1",
263
- country: e.countryCode,
264
- name: e.countryName,
65
+ country: t.countryCode,
66
+ name: t.countryName,
265
67
  "width-override": "16px",
266
68
  "hide-border": ""
267
69
  }, null, 8, ["country", "name"])
268
70
  ]),
269
71
  _: 1
270
72
  })),
271
- ae(" " + N(e.formattedLocation), 1)
73
+ A(" " + f(t.formattedLocation), 1)
272
74
  ])
273
- ])) : u("", !0)
75
+ ])) : c("", !0)
274
76
  ]),
275
77
  _: 1
276
78
  }, 8, ["to", "href"])),
277
- i.isVisitor ? u("", !0) : (t(), a(k, {
79
+ w.isVisitor ? c("", !0) : (e(), o(b, {
278
80
  key: 0,
279
- "loan-id": i.loanId,
280
- "is-bookmarked": i.isBookmarked,
81
+ "loan-id": w.loanId,
82
+ "is-bookmarked": w.isBookmarked,
281
83
  class: "loan-bookmark tw-absolute tw-right-1.5 tw-top-0",
282
84
  "data-testid": "loan-card-bookmark",
283
- onToggleBookmark: o[1] || (o[1] = (r) => n.$emit("toggle-bookmark"))
85
+ onToggleBookmark: a[1] || (a[1] = (r) => k.$emit("toggle-bookmark"))
284
86
  }, null, 8, ["loan-id", "is-bookmarked"]))
285
87
  ])),
286
- e.isLoading || typeof e.loanCallouts > "u" ? (t(), a(l, {
88
+ t.isLoading || typeof t.loanCallouts > "u" ? (e(), o(l, {
287
89
  key: 2,
288
90
  class: "tw-mt-1 tw-mx-auto",
289
91
  style: { width: "60%", height: "1.75rem", "border-radius": "500rem" }
290
- })) : u("", !0),
291
- (t(), a(f(e.tag), {
292
- to: e.readMorePath,
293
- href: e.readMorePath,
92
+ })) : c("", !0),
93
+ (e(), o(g(t.tag), {
94
+ to: t.readMorePath,
95
+ href: t.readMorePath,
294
96
  "aria-label": "Borrower name",
295
97
  class: "!tw-text-primary tw-no-underline",
296
- onClick: o[2] || (o[2] = (r) => e.clickReadMore("Name", r))
98
+ onClick: a[2] || (a[2] = (r) => t.clickReadMore("Name", r))
297
99
  }, {
298
- default: h(() => [
299
- c("h3", {
300
- class: x(["loan-card-name", { "tw-text-center": e.borrowerName.length < 20 }]),
100
+ default: m(() => [
101
+ s("h3", {
102
+ class: _(["loan-card-name", { "tw-text-center": t.borrowerName.length < 20 }]),
301
103
  style: { "font-size": "28px" }
302
- }, N(e.borrowerName), 3)
104
+ }, f(t.borrowerName), 3)
303
105
  ]),
304
106
  _: 1
305
107
  }, 8, ["to", "href"])),
306
- e.isLoading ? (t(), s("div", we, [
307
- e.isLoading || typeof e.loanCallouts > "u" ? (t(), a(l, {
108
+ t.isLoading ? (e(), n("div", O, [
109
+ t.isLoading || typeof t.loanCallouts > "u" ? (e(), o(l, {
308
110
  key: 0,
309
111
  class: "tw-mt-0.5 tw-mb-1",
310
112
  style: { width: "20%", height: "1.65rem", "border-radius": "500rem" }
311
- })) : u("", !0),
312
- e.isLoading || typeof e.loanCallouts > "u" ? (t(), a(l, {
113
+ })) : c("", !0),
114
+ t.isLoading || typeof t.loanCallouts > "u" ? (e(), o(l, {
313
115
  key: 1,
314
116
  class: "tw-mt-0.5 tw-mb-1",
315
117
  style: { width: "20%", height: "1.65rem", "border-radius": "500rem" }
316
- })) : u("", !0),
317
- e.isLoading || typeof e.loanCallouts > "u" ? (t(), a(l, {
118
+ })) : c("", !0),
119
+ t.isLoading || typeof t.loanCallouts > "u" ? (e(), o(l, {
318
120
  key: 2,
319
121
  class: "tw-mt-0.5 tw-mb-1",
320
122
  style: { width: "20%", height: "1.65rem", "border-radius": "500rem" }
321
- })) : u("", !0)
322
- ])) : (t(), a(f(e.tag), {
123
+ })) : c("", !0)
124
+ ])) : (e(), o(g(t.tag), {
323
125
  key: 4,
324
- to: e.readMorePath,
325
- href: e.readMorePath,
126
+ to: t.readMorePath,
127
+ href: t.readMorePath,
326
128
  class: "tw-flex tw-no-underline hover:tw-no-underline focus:tw-no-underline tw-justify-center",
327
129
  "aria-label": "Loan tag",
328
- onClick: o[3] || (o[3] = (r) => e.clickReadMore("Tag", r))
130
+ onClick: a[3] || (a[3] = (r) => t.clickReadMore("Tag", r))
329
131
  }, {
330
- default: h(() => [
331
- d(y, {
332
- callouts: e.loanCallouts,
132
+ default: m(() => [
133
+ i(v, {
134
+ callouts: t.loanCallouts,
333
135
  "add-bg-color": !1,
334
136
  class: "loan-callouts"
335
137
  }, null, 8, ["callouts"])
336
138
  ]),
337
139
  _: 1
338
140
  }, 8, ["to", "href"])),
339
- (t(), a(f(e.tag), {
340
- to: e.readMorePath,
341
- href: e.readMorePath,
141
+ (e(), o(g(t.tag), {
142
+ to: t.readMorePath,
143
+ href: t.readMorePath,
342
144
  class: "loan-card-use tw-text-primary tw-no-underline",
343
145
  "aria-label": "Loan use",
344
- onClick: o[4] || (o[4] = (r) => e.clickReadMore("Use", r))
146
+ onClick: a[4] || (a[4] = (r) => t.clickReadMore("Use", r))
345
147
  }, {
346
- default: h(() => [
347
- c("div", {
348
- class: x(["tw-pt-0.5 tw-px-2", { "tw-mb-1.5": !e.isLoading }])
148
+ default: m(() => [
149
+ s("div", {
150
+ class: _(["tw-pt-0.5 tw-px-2", { "tw-mb-1.5": !t.isLoading }])
349
151
  }, [
350
- e.isLoading ? (t(), s("div", he, [
351
- (t(!0), s(re, null, ne([...Array(3)], (r, p) => (t(), s("div", {
352
- key: p,
152
+ t.isLoading ? (e(), n("div", S, [
153
+ (e(!0), n(p, null, T([...Array(3)], (r, L) => (e(), n("div", {
154
+ key: L,
353
155
  class: "tw-h-2 tw-mb-1"
354
156
  }, [
355
- d(l)
157
+ i(l)
356
158
  ]))), 128))
357
- ])) : (t(), s("div", fe, [
358
- d(v, {
359
- use: e.loanUse,
360
- "loan-amount": e.loanAmount,
361
- status: e.loanStatus,
362
- "borrower-count": e.loanBorrowerCount,
363
- name: e.borrowerName,
364
- "distribution-model": e.distributionModel,
159
+ ])) : (e(), n("div", E, [
160
+ i(x, {
161
+ use: t.loanUse,
162
+ "loan-amount": t.loanAmount,
163
+ status: t.loanStatus,
164
+ "borrower-count": t.loanBorrowerCount,
165
+ name: t.borrowerName,
166
+ "distribution-model": t.distributionModel,
365
167
  "hide-loan-amount": "",
366
168
  class: "!tw-line-clamp-3"
367
169
  }, null, 8, ["use", "loan-amount", "status", "borrower-count", "name", "distribution-model"])
@@ -372,51 +174,51 @@ function ve(n, o, i, e, C, w) {
372
174
  }, 8, ["to", "href"]))
373
175
  ])
374
176
  ]),
375
- c("div", ge, [
376
- e.hasProgressData ? u("", !0) : (t(), s("div", _e, [
377
- c("div", ke, [
378
- d(l, {
177
+ s("div", U, [
178
+ t.hasProgressData ? c("", !0) : (e(), n("div", W, [
179
+ s("div", j, [
180
+ i(l, {
379
181
  class: "tw-mb-0.5",
380
182
  style: { width: "20%", height: "1.3rem" }
381
183
  }),
382
- d(l, {
184
+ i(l, {
383
185
  class: "tw-mb-0.5",
384
186
  style: { width: "20%", height: "1.3rem" }
385
187
  })
386
188
  ]),
387
- d(l, {
189
+ i(l, {
388
190
  class: "tw-rounded",
389
191
  style: { width: "100%", height: "0.5rem" }
390
192
  })
391
193
  ])),
392
- c("div", null, [
393
- e.sharesAvailable ? (t(), a(f(e.tag), {
194
+ s("div", null, [
195
+ t.sharesAvailable ? (e(), o(g(t.tag), {
394
196
  key: 0,
395
- to: e.readMorePath,
396
- href: e.readMorePath,
197
+ to: t.readMorePath,
198
+ href: t.readMorePath,
397
199
  class: "loan-card-progress tw-mt-1",
398
200
  "aria-label": "Loan progress",
399
- onClick: o[5] || (o[5] = (r) => e.clickReadMore("Progress", r))
201
+ onClick: a[5] || (a[5] = (r) => t.clickReadMore("Progress", r))
400
202
  }, {
401
- default: h(() => [
402
- d(b, {
203
+ default: m(() => [
204
+ i(C, {
403
205
  id: "loanProgress",
404
- "money-left": e.unreservedAmount,
405
- "amount-goal": e.loanAmount,
406
- "progress-percent": e.fundraisingPercent,
206
+ "money-left": t.unreservedAmount,
207
+ "amount-goal": t.loanAmount,
208
+ "progress-percent": t.fundraisingPercent,
407
209
  class: "tw-text-secondary"
408
210
  }, null, 8, ["money-left", "amount-goal", "progress-percent"])
409
211
  ]),
410
212
  _: 1
411
- }, 8, ["to", "href"])) : u("", !0)
213
+ }, 8, ["to", "href"])) : c("", !0)
412
214
  ]),
413
- e.isLoading ? (t(), a(l, {
215
+ t.isLoading ? (e(), o(l, {
414
216
  key: 1,
415
217
  class: "tw-rounded tw-mx-auto tw-mt-2",
416
218
  style: { width: "9rem", height: "1rem" }
417
- })) : w.isFunded ? (t(), s("div", ye, " 🎉 Fully funded! ")) : (t(), a(L, {
219
+ })) : h.isFunded ? (e(), n("div", K, " 🎉 Fully funded! ")) : (e(), o(N, {
418
220
  key: 3,
419
- loan: i.loan,
221
+ loan: w.loan,
420
222
  "use-expanded-styles": !0,
421
223
  style: { "font-size": "15px" },
422
224
  class: "tw-text-center tw-pt-2"
@@ -424,9 +226,9 @@ function ve(n, o, i, e, C, w) {
424
226
  ])
425
227
  ], 6);
426
228
  }
427
- const Ee = /* @__PURE__ */ le(ie, [["render", ve], ["__scopeId", "data-v-49b21d16"]]);
229
+ const Y = /* @__PURE__ */ B(M, [["render", G], ["__scopeId", "data-v-5220c6a3"]]);
428
230
  export {
429
- Se as KV_INTRODUCTION_LOAN_CARD_FRAGMENT,
430
- De as KV_INTRODUCTION_LOAN_CARD_USER_FRAGMENT,
431
- Ee as default
231
+ tt as KV_INTRODUCTION_LOAN_CARD_FRAGMENT,
232
+ et as KV_INTRODUCTION_LOAN_CARD_USER_FRAGMENT,
233
+ Y as default
432
234
  };