@kiva/kv-components 10.6.0 → 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.
- package/dist/index.js +20 -20
- package/dist/vue/KvAccordionItem.js +1 -1
- package/dist/vue/KvActivityRow.js +1 -1
- package/dist/vue/KvAtbModal.js +1 -1
- package/dist/vue/KvBorrowerImage.js +1 -1
- package/dist/vue/KvButton.js +1 -1
- package/dist/vue/KvCardFrame.js +1 -1
- package/dist/vue/KvCarousel.js +1 -1
- package/dist/vue/KvCartModal.js +1 -1
- package/dist/vue/KvCartPill.js +1 -1
- package/dist/vue/KvCheckbox.js +1 -1
- package/dist/vue/KvCheckoutReceipt.js +1 -1
- package/dist/vue/KvChip.js +1 -1
- package/dist/vue/KvClassicLoanCard.js +252 -295
- package/dist/vue/KvClassicLoanCard.script.js +298 -0
- package/dist/vue/KvCommentsAdd.js +2 -2
- package/dist/vue/KvCommentsContainer.js +2 -2
- package/dist/vue/KvCommentsHeartButton.js +1 -1
- package/dist/vue/KvCommentsList.js +1 -1
- package/dist/vue/KvCommentsListItem.js +2 -2
- package/dist/vue/KvCommentsReplyButton.js +1 -1
- package/dist/vue/KvCompactLoanCard.js +416 -380
- package/dist/vue/KvCompactLoanCard.script.js +382 -0
- package/dist/vue/KvContentfulImg.js +1 -1
- package/dist/vue/KvCountdownTimer.js +1 -1
- package/dist/vue/KvDatePicker.js +1 -1
- package/dist/vue/KvExpandable.js +1 -1
- package/dist/vue/KvExpandableQuestion.js +1 -1
- package/dist/vue/KvFlag.js +1 -1
- package/dist/vue/KvFormAssemblyForm.js +2 -95
- package/dist/vue/KvFormAssemblyForm.script.js +97 -0
- package/dist/vue/KvGrid.js +1 -1
- package/dist/vue/KvIconBag.js +1 -1
- package/dist/vue/KvIconButton.js +2 -116
- package/dist/vue/KvIconButton.script.js +118 -0
- package/dist/vue/KvImageUpload.js +1 -1
- package/dist/vue/KvImpactVerticalSelector.js +1 -1
- package/dist/vue/KvInlineActivityCard.js +1 -1
- package/dist/vue/KvInlineActivityFeed.js +1 -1
- package/dist/vue/KvIntroductionLoanCard.js +247 -220
- package/dist/vue/KvIntroductionLoanCard.script.js +223 -0
- package/dist/vue/KvLendAmountButton.js +1 -1
- package/dist/vue/KvLendCta.js +355 -389
- package/dist/vue/KvLendCta.script.js +391 -0
- package/dist/vue/KvLightbox.js +1 -1
- package/dist/vue/KvLineGraph.js +1 -1
- package/dist/vue/KvLoadingSpinner.js +1 -1
- package/dist/vue/KvLoanActivities.js +75 -149
- package/dist/vue/KvLoanActivities.script.js +151 -0
- package/dist/vue/KvLoanBookmark.js +22 -33
- package/dist/vue/KvLoanBookmark.script.js +35 -0
- package/dist/vue/KvLoanCallouts.js +1 -1
- package/dist/vue/KvLoanInfoCard.js +2 -2
- package/dist/vue/KvLoanProgressGroup.js +1 -1
- package/dist/vue/KvLoanTag.js +44 -123
- package/dist/vue/KvLoanTag.script.js +125 -0
- package/dist/vue/KvLoanUse.js +14 -111
- package/dist/vue/KvLoanUse.script.js +113 -0
- package/dist/vue/KvMap.js +1 -1
- package/dist/vue/KvMaterialIcon.js +1 -1
- package/dist/vue/KvPageContainer.js +1 -1
- package/dist/vue/KvPagination.js +1 -1
- package/dist/vue/KvPieChart.js +1 -1
- package/dist/vue/KvPieChartV2.js +1 -1
- package/dist/vue/KvPill.js +1 -1
- package/dist/vue/KvPopper.js +1 -1
- package/dist/vue/KvProgressBar.js +1 -1
- package/dist/vue/KvProgressCircle.js +1 -1
- package/dist/vue/KvPulsingDot.js +1 -1
- package/dist/vue/KvRadio.js +1 -1
- package/dist/vue/KvSecondaryNav.js +1 -1
- package/dist/vue/KvSelect.js +1 -1
- package/dist/vue/KvSideSheet.js +1 -1
- package/dist/vue/KvSimpleMap.js +1 -1
- package/dist/vue/KvStackedBarGraph.js +1 -1
- package/dist/vue/KvSwitch.js +1 -1
- package/dist/vue/KvTab.js +1 -1
- package/dist/vue/KvTabPanel.js +1 -1
- package/dist/vue/KvTabs.js +1 -1
- package/dist/vue/KvTextInput.js +1 -1
- package/dist/vue/KvTextLink.js +1 -1
- package/dist/vue/KvThemeProvider.js +1 -1
- package/dist/vue/KvToast.js +1 -1
- package/dist/vue/KvTooltip.js +1 -1
- package/dist/vue/KvTreeMapChart.js +1 -1
- package/dist/vue/KvUserAvatar.js +1 -1
- package/dist/vue/KvUtilityMenu.js +1 -1
- package/dist/vue/KvVerticalCarousel.js +1 -1
- package/dist/vue/KvVotingCard.js +1 -1
- package/dist/vue/KvVotingCardV2.js +1 -1
- package/dist/vue/KvWideLoanCard.js +206 -232
- package/dist/vue/KvWideLoanCard.script.js +235 -0
- package/dist/vue/KvWwwHeader/KvHeaderAboutMenu.js +1 -1
- package/dist/vue/KvWwwHeader/KvHeaderDropdownLink.js +1 -1
- package/dist/vue/KvWwwHeader/KvHeaderLinkBar.js +1 -1
- package/dist/vue/KvWwwHeader/KvHeaderLogo.js +1 -1
- package/dist/vue/KvWwwHeader/KvHeaderMobileMenu.js +1 -1
- package/dist/vue/KvWwwHeader/KvHeaderMyKivaMenu.js +1 -1
- package/dist/vue/KvWwwHeader/KvHeaderTakeActionMenu.js +1 -1
- package/dist/vue/KvWwwHeader/LendMenu/KvLendListMenu.js +1 -1
- package/dist/vue/KvWwwHeader/LendMenu/KvLendMegaMenu.js +1 -1
- package/dist/vue/KvWwwHeader/LendMenu/KvLendMenu.js +1 -1
- package/dist/vue/KvWwwHeader/LendMenu/KvLendMenuCountryList.js +1 -1
- package/dist/vue/KvWwwHeader/LendMenu/KvLendMenuSearchList.js +1 -1
- package/dist/vue/KvWwwHeader.js +1 -1
- package/dist/vue/KvWwwHeaderBasic/AboutMenu.js +1 -1
- package/dist/vue/KvWwwHeaderBasic/HeaderMenuGroup.js +1 -1
- package/dist/vue/KvWwwHeaderBasic/KvWwwHeaderBasic.js +1 -1
- package/dist/vue/KvWwwHeaderBasic/LinkBar.js +1 -1
- package/dist/vue/KvWwwHeaderBasic/MobileLendMenu/CategoriesPanel.js +1 -1
- package/dist/vue/KvWwwHeaderBasic/MobileLendMenu/MobileLendMenu.js +1 -1
- package/dist/vue/KvWwwHeaderBasic/MobileLendMenu/MyKivaPanel.js +1 -1
- package/dist/vue/KvWwwHeaderBasic/MobileLendMenu/RegionsPanel.js +1 -1
- package/dist/vue/KvWwwHeaderBasic/MobileLendMenu/SearchPanel.js +1 -1
- package/dist/vue/KvWwwHeaderBasic/MobileMenu.js +1 -1
- package/dist/vue/KvWwwHeaderBasic/MyKivaMenu.js +1 -1
- package/dist/vue/KvWwwHeaderBasic/SearchBar.js +1 -1
- package/package.json +2 -2
- package/vite.config.ts +16 -13
- package/dist/vue/KvClassicLoanCard2.js +0 -255
- package/dist/vue/KvCompactLoanCard2.js +0 -418
- package/dist/vue/KvFormAssemblyForm2.js +0 -4
- package/dist/vue/KvIconButton2.js +0 -4
- package/dist/vue/KvIntroductionLoanCard2.js +0 -250
- package/dist/vue/KvLendCta2.js +0 -357
- package/dist/vue/KvLoanActivities2.js +0 -77
- package/dist/vue/KvLoanBookmark2.js +0 -24
- package/dist/vue/KvLoanTag2.js +0 -46
- package/dist/vue/KvLoanUse2.js +0 -16
- package/dist/vue/KvWideLoanCard2.js +0 -209
- /package/dist/vue/{KvAccordionItem2.js → KvAccordionItem.script.js} +0 -0
- /package/dist/vue/{KvActivityRow2.js → KvActivityRow.script.js} +0 -0
- /package/dist/vue/{KvAtbModal2.js → KvAtbModal.script.js} +0 -0
- /package/dist/vue/{KvBorrowerImage2.js → KvBorrowerImage.script.js} +0 -0
- /package/dist/vue/{KvButton2.js → KvButton.script.js} +0 -0
- /package/dist/vue/{KvCardFrame2.js → KvCardFrame.script.js} +0 -0
- /package/dist/vue/{KvCarousel2.js → KvCarousel.script.js} +0 -0
- /package/dist/vue/{KvCartModal2.js → KvCartModal.script.js} +0 -0
- /package/dist/vue/{KvCartPill2.js → KvCartPill.script.js} +0 -0
- /package/dist/vue/{KvCheckbox2.js → KvCheckbox.script.js} +0 -0
- /package/dist/vue/{KvCheckoutReceipt2.js → KvCheckoutReceipt.script.js} +0 -0
- /package/dist/vue/{KvChip2.js → KvChip.script.js} +0 -0
- /package/dist/vue/{KvCommentsAdd2.js → KvCommentsAdd.script.js} +0 -0
- /package/dist/vue/{KvCommentsContainer2.js → KvCommentsContainer.script.js} +0 -0
- /package/dist/vue/{KvCommentsHeartButton2.js → KvCommentsHeartButton.script.js} +0 -0
- /package/dist/vue/{KvCommentsList2.js → KvCommentsList.script.js} +0 -0
- /package/dist/vue/{KvCommentsListItem2.js → KvCommentsListItem.script.js} +0 -0
- /package/dist/vue/{KvCommentsReplyButton2.js → KvCommentsReplyButton.script.js} +0 -0
- /package/dist/vue/{KvContentfulImg2.js → KvContentfulImg.script.js} +0 -0
- /package/dist/vue/{KvCountdownTimer2.js → KvCountdownTimer.script.js} +0 -0
- /package/dist/vue/{KvDatePicker2.js → KvDatePicker.script.js} +0 -0
- /package/dist/vue/{KvExpandable2.js → KvExpandable.script.js} +0 -0
- /package/dist/vue/{KvExpandableQuestion2.js → KvExpandableQuestion.script.js} +0 -0
- /package/dist/vue/{KvFlag2.js → KvFlag.script.js} +0 -0
- /package/dist/vue/{KvGrid2.js → KvGrid.script.js} +0 -0
- /package/dist/vue/{KvIconBag2.js → KvIconBag.script.js} +0 -0
- /package/dist/vue/{KvImageUpload2.js → KvImageUpload.script.js} +0 -0
- /package/dist/vue/{KvImpactVerticalSelector2.js → KvImpactVerticalSelector.script.js} +0 -0
- /package/dist/vue/{KvInlineActivityCard2.js → KvInlineActivityCard.script.js} +0 -0
- /package/dist/vue/{KvInlineActivityFeed2.js → KvInlineActivityFeed.script.js} +0 -0
- /package/dist/vue/{KvLendAmountButton2.js → KvLendAmountButton.script.js} +0 -0
- /package/dist/vue/{KvLightbox2.js → KvLightbox.script.js} +0 -0
- /package/dist/vue/{KvLineGraph2.js → KvLineGraph.script.js} +0 -0
- /package/dist/vue/{KvLoadingSpinner2.js → KvLoadingSpinner.script.js} +0 -0
- /package/dist/vue/{KvLoanCallouts2.js → KvLoanCallouts.script.js} +0 -0
- /package/dist/vue/{KvLoanProgressGroup2.js → KvLoanProgressGroup.script.js} +0 -0
- /package/dist/vue/{KvMap2.js → KvMap.script.js} +0 -0
- /package/dist/vue/{KvMaterialIcon2.js → KvMaterialIcon.script.js} +0 -0
- /package/dist/vue/{KvPageContainer2.js → KvPageContainer.script.js} +0 -0
- /package/dist/vue/{KvPagination2.js → KvPagination.script.js} +0 -0
- /package/dist/vue/{KvPieChart2.js → KvPieChart.script.js} +0 -0
- /package/dist/vue/{KvPieChartV22.js → KvPieChartV2.script.js} +0 -0
- /package/dist/vue/{KvPill2.js → KvPill.script.js} +0 -0
- /package/dist/vue/{KvPopper2.js → KvPopper.script.js} +0 -0
- /package/dist/vue/{KvProgressBar2.js → KvProgressBar.script.js} +0 -0
- /package/dist/vue/{KvProgressCircle2.js → KvProgressCircle.script.js} +0 -0
- /package/dist/vue/{KvPulsingDot2.js → KvPulsingDot.script.js} +0 -0
- /package/dist/vue/{KvRadio2.js → KvRadio.script.js} +0 -0
- /package/dist/vue/{KvSecondaryNav2.js → KvSecondaryNav.script.js} +0 -0
- /package/dist/vue/{KvSelect2.js → KvSelect.script.js} +0 -0
- /package/dist/vue/{KvSideSheet2.js → KvSideSheet.script.js} +0 -0
- /package/dist/vue/{KvSimpleMap2.js → KvSimpleMap.script.js} +0 -0
- /package/dist/vue/{KvStackedBarGraph2.js → KvStackedBarGraph.script.js} +0 -0
- /package/dist/vue/{KvSwitch2.js → KvSwitch.script.js} +0 -0
- /package/dist/vue/{KvTab2.js → KvTab.script.js} +0 -0
- /package/dist/vue/{KvTabPanel2.js → KvTabPanel.script.js} +0 -0
- /package/dist/vue/{KvTabs2.js → KvTabs.script.js} +0 -0
- /package/dist/vue/{KvTextInput2.js → KvTextInput.script.js} +0 -0
- /package/dist/vue/{KvTextLink2.js → KvTextLink.script.js} +0 -0
- /package/dist/vue/{KvThemeProvider2.js → KvThemeProvider.script.js} +0 -0
- /package/dist/vue/{KvToast2.js → KvToast.script.js} +0 -0
- /package/dist/vue/{KvTooltip2.js → KvTooltip.script.js} +0 -0
- /package/dist/vue/{KvTreeMapChart2.js → KvTreeMapChart.script.js} +0 -0
- /package/dist/vue/{KvUserAvatar2.js → KvUserAvatar.script.js} +0 -0
- /package/dist/vue/{KvUtilityMenu2.js → KvUtilityMenu.script.js} +0 -0
- /package/dist/vue/{KvVerticalCarousel2.js → KvVerticalCarousel.script.js} +0 -0
- /package/dist/vue/{KvVotingCard2.js → KvVotingCard.script.js} +0 -0
- /package/dist/vue/{KvVotingCardV22.js → KvVotingCardV2.script.js} +0 -0
- /package/dist/vue/KvWwwHeader/{KvHeaderAboutMenu2.js → KvHeaderAboutMenu.script.js} +0 -0
- /package/dist/vue/KvWwwHeader/{KvHeaderDropdownLink2.js → KvHeaderDropdownLink.script.js} +0 -0
- /package/dist/vue/KvWwwHeader/{KvHeaderLinkBar2.js → KvHeaderLinkBar.script.js} +0 -0
- /package/dist/vue/KvWwwHeader/{KvHeaderLogo2.js → KvHeaderLogo.script.js} +0 -0
- /package/dist/vue/KvWwwHeader/{KvHeaderMobileMenu2.js → KvHeaderMobileMenu.script.js} +0 -0
- /package/dist/vue/KvWwwHeader/{KvHeaderMyKivaMenu2.js → KvHeaderMyKivaMenu.script.js} +0 -0
- /package/dist/vue/KvWwwHeader/{KvHeaderTakeActionMenu2.js → KvHeaderTakeActionMenu.script.js} +0 -0
- /package/dist/vue/KvWwwHeader/LendMenu/{KvLendListMenu2.js → KvLendListMenu.script.js} +0 -0
- /package/dist/vue/KvWwwHeader/LendMenu/{KvLendMegaMenu2.js → KvLendMegaMenu.script.js} +0 -0
- /package/dist/vue/KvWwwHeader/LendMenu/{KvLendMenu2.js → KvLendMenu.script.js} +0 -0
- /package/dist/vue/KvWwwHeader/LendMenu/{KvLendMenuCountryList2.js → KvLendMenuCountryList.script.js} +0 -0
- /package/dist/vue/KvWwwHeader/LendMenu/{KvLendMenuSearchList2.js → KvLendMenuSearchList.script.js} +0 -0
- /package/dist/vue/{KvWwwHeader2.js → KvWwwHeader.script.js} +0 -0
- /package/dist/vue/KvWwwHeaderBasic/{AboutMenu2.js → AboutMenu.script.js} +0 -0
- /package/dist/vue/KvWwwHeaderBasic/{HeaderMenuGroup2.js → HeaderMenuGroup.script.js} +0 -0
- /package/dist/vue/KvWwwHeaderBasic/{KvWwwHeaderBasic2.js → KvWwwHeaderBasic.script.js} +0 -0
- /package/dist/vue/KvWwwHeaderBasic/{LinkBar2.js → LinkBar.script.js} +0 -0
- /package/dist/vue/KvWwwHeaderBasic/MobileLendMenu/{CategoriesPanel2.js → CategoriesPanel.script.js} +0 -0
- /package/dist/vue/KvWwwHeaderBasic/MobileLendMenu/{MobileLendMenu2.js → MobileLendMenu.script.js} +0 -0
- /package/dist/vue/KvWwwHeaderBasic/MobileLendMenu/{MyKivaPanel2.js → MyKivaPanel.script.js} +0 -0
- /package/dist/vue/KvWwwHeaderBasic/MobileLendMenu/{RegionsPanel2.js → RegionsPanel.script.js} +0 -0
- /package/dist/vue/KvWwwHeaderBasic/MobileLendMenu/{SearchPanel2.js → SearchPanel.script.js} +0 -0
- /package/dist/vue/KvWwwHeaderBasic/{MobileMenu2.js → MobileMenu.script.js} +0 -0
- /package/dist/vue/KvWwwHeaderBasic/{MyKivaMenu2.js → MyKivaMenu.script.js} +0 -0
- /package/dist/vue/KvWwwHeaderBasic/{SearchBar2.js → SearchBar.script.js} +0 -0
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
import { toRefs as f, ref as v, computed as n } from "vue";
|
|
2
|
+
import { gql as p } from "@apollo/client/core";
|
|
3
|
+
import { format as y } from "date-fns";
|
|
4
|
+
import A from "numeral";
|
|
5
|
+
import g from "./KvActivityRow.js";
|
|
6
|
+
import b from "./KvLightbox.js";
|
|
7
|
+
import F from "./KvLendCta.js";
|
|
8
|
+
const O = p`
|
|
9
|
+
fragment KvLoanActivities on LoanBasic {
|
|
10
|
+
id
|
|
11
|
+
name
|
|
12
|
+
lenders(limit: 0) {
|
|
13
|
+
totalCount
|
|
14
|
+
}
|
|
15
|
+
loanFundraisingInfo {
|
|
16
|
+
id
|
|
17
|
+
fundedAmount
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
`, _ = {
|
|
21
|
+
name: "KvLoanActivities",
|
|
22
|
+
components: {
|
|
23
|
+
KvActivityRow: g,
|
|
24
|
+
KvLightbox: b,
|
|
25
|
+
KvLendCta: F
|
|
26
|
+
},
|
|
27
|
+
props: {
|
|
28
|
+
/**
|
|
29
|
+
* loan object coming from parent component
|
|
30
|
+
*/
|
|
31
|
+
loan: {
|
|
32
|
+
type: Object,
|
|
33
|
+
default: () => ({})
|
|
34
|
+
},
|
|
35
|
+
/**
|
|
36
|
+
* loan combined activities coming from parent component
|
|
37
|
+
*/
|
|
38
|
+
combinedActivities: {
|
|
39
|
+
type: Array,
|
|
40
|
+
default: () => []
|
|
41
|
+
},
|
|
42
|
+
/**
|
|
43
|
+
* isAdding flag coming from parent add to basket method
|
|
44
|
+
*/
|
|
45
|
+
isAdding: {
|
|
46
|
+
type: Boolean,
|
|
47
|
+
default: !1
|
|
48
|
+
},
|
|
49
|
+
/**
|
|
50
|
+
* basketItems array coming from parent component
|
|
51
|
+
*/
|
|
52
|
+
basketItems: {
|
|
53
|
+
type: Array,
|
|
54
|
+
default: () => []
|
|
55
|
+
},
|
|
56
|
+
/**
|
|
57
|
+
* userBalance string coming from parent component
|
|
58
|
+
*/
|
|
59
|
+
userBalance: {
|
|
60
|
+
type: String,
|
|
61
|
+
default: void 0
|
|
62
|
+
},
|
|
63
|
+
/**
|
|
64
|
+
* errorMsg string coming from parent add to basket method
|
|
65
|
+
*/
|
|
66
|
+
errorMsg: {
|
|
67
|
+
type: String,
|
|
68
|
+
default: void 0
|
|
69
|
+
},
|
|
70
|
+
/**
|
|
71
|
+
* kvTrackFunction function to track events from LendCta component
|
|
72
|
+
*/
|
|
73
|
+
kvTrackFunction: {
|
|
74
|
+
type: Function,
|
|
75
|
+
required: !0
|
|
76
|
+
},
|
|
77
|
+
/**
|
|
78
|
+
* getCookie function for LendCta component
|
|
79
|
+
*/
|
|
80
|
+
getCookie: {
|
|
81
|
+
type: Function,
|
|
82
|
+
default: void 0
|
|
83
|
+
},
|
|
84
|
+
/**
|
|
85
|
+
* setCookie function for LendCta component
|
|
86
|
+
*/
|
|
87
|
+
setCookie: {
|
|
88
|
+
type: Function,
|
|
89
|
+
default: void 0
|
|
90
|
+
},
|
|
91
|
+
/**
|
|
92
|
+
* route object for LendCta component
|
|
93
|
+
*/
|
|
94
|
+
route: {
|
|
95
|
+
type: Object,
|
|
96
|
+
default: void 0
|
|
97
|
+
},
|
|
98
|
+
enableFiveDollarsNotes: {
|
|
99
|
+
type: Boolean,
|
|
100
|
+
default: !1
|
|
101
|
+
},
|
|
102
|
+
isVisitor: {
|
|
103
|
+
type: Boolean,
|
|
104
|
+
default: !0
|
|
105
|
+
}
|
|
106
|
+
},
|
|
107
|
+
emits: [
|
|
108
|
+
"add-to-basket"
|
|
109
|
+
],
|
|
110
|
+
setup(r) {
|
|
111
|
+
const {
|
|
112
|
+
loan: a,
|
|
113
|
+
combinedActivities: l,
|
|
114
|
+
kvTrackFunction: s
|
|
115
|
+
} = f(r), i = v(!1), u = n(() => {
|
|
116
|
+
var t;
|
|
117
|
+
return `Activity for ${((t = a.value) == null ? void 0 : t.name) || ""}`;
|
|
118
|
+
}), d = n(() => {
|
|
119
|
+
var t, e;
|
|
120
|
+
return ((e = (t = a.value) == null ? void 0 : t.lenders) == null ? void 0 : e.totalCount) ?? 0;
|
|
121
|
+
}), c = n(() => {
|
|
122
|
+
var e, o;
|
|
123
|
+
const t = ((o = (e = a.value) == null ? void 0 : e.loanFundraisingInfo) == null ? void 0 : o.fundedAmount) ?? 0;
|
|
124
|
+
return A(parseFloat(t)).format("$0,0");
|
|
125
|
+
}), m = n(() => {
|
|
126
|
+
const t = l.value.find((e) => e.data.some((o) => o.type === "LendingAction"));
|
|
127
|
+
return (t == null ? void 0 : t.data[0]) ?? {};
|
|
128
|
+
});
|
|
129
|
+
return {
|
|
130
|
+
lightboxOpen: i,
|
|
131
|
+
modalTitle: u,
|
|
132
|
+
formattedDate: (t) => {
|
|
133
|
+
const e = new Date(t);
|
|
134
|
+
return y(e, "MMM d, yyyy");
|
|
135
|
+
},
|
|
136
|
+
showActivityModal: () => {
|
|
137
|
+
s.value("loan-card", "click", "see-all-activity"), i.value = !0;
|
|
138
|
+
},
|
|
139
|
+
closeLightbox: () => {
|
|
140
|
+
i.value = !1;
|
|
141
|
+
},
|
|
142
|
+
singleActivity: m,
|
|
143
|
+
lendersNumber: d,
|
|
144
|
+
amountLent: c
|
|
145
|
+
};
|
|
146
|
+
}
|
|
147
|
+
};
|
|
148
|
+
export {
|
|
149
|
+
O as KV_LOAN_ACTIVITIES_FRAGMENT,
|
|
150
|
+
_ as default
|
|
151
|
+
};
|
|
@@ -1,35 +1,24 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
},
|
|
22
|
-
emits: [
|
|
23
|
-
"toggle-bookmark"
|
|
24
|
-
],
|
|
25
|
-
data() {
|
|
26
|
-
return {
|
|
27
|
-
mdiBookmarkOutline: r,
|
|
28
|
-
mdiBookmark: a
|
|
29
|
-
};
|
|
30
|
-
}
|
|
31
|
-
};
|
|
1
|
+
import i from "./KvLoanBookmark.script.js";
|
|
2
|
+
import { KV_LOAN_BOOKMARK_FRAGMENT as K } from "./KvLoanBookmark.script.js";
|
|
3
|
+
import { resolveComponent as m, openBlock as a, createElementBlock as l, createElementVNode as s, createVNode as c, normalizeClass as k } from "vue";
|
|
4
|
+
import d from "../_virtual/_plugin-vue_export-helper.js";
|
|
5
|
+
function f(r, e, o, u, t, _) {
|
|
6
|
+
const n = m("kv-material-icon");
|
|
7
|
+
return a(), l("div", null, [
|
|
8
|
+
s("button", {
|
|
9
|
+
style: { "border-radius": "8px", padding: "3px" },
|
|
10
|
+
class: "tw-cursor-pointer tw-font-medium tw-bg-white tw-flex tw-justify-center",
|
|
11
|
+
onClick: e[0] || (e[0] = (p) => r.$emit("toggle-bookmark"))
|
|
12
|
+
}, [
|
|
13
|
+
c(n, {
|
|
14
|
+
class: k(["tw-w-3", { "tw-text-black": !o.isBookmarked, "tw-text-marigold": o.isBookmarked }]),
|
|
15
|
+
icon: `${o.isBookmarked ? t.mdiBookmark : t.mdiBookmarkOutline}`
|
|
16
|
+
}, null, 8, ["class", "icon"])
|
|
17
|
+
])
|
|
18
|
+
]);
|
|
19
|
+
}
|
|
20
|
+
const v = /* @__PURE__ */ d(i, [["render", f]]);
|
|
32
21
|
export {
|
|
33
|
-
|
|
34
|
-
|
|
22
|
+
K as KV_LOAN_BOOKMARK_FRAGMENT,
|
|
23
|
+
v as default
|
|
35
24
|
};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import o from "graphql-tag";
|
|
2
|
+
import { mdiBookmark as a, mdiBookmarkOutline as r } from "@mdi/js";
|
|
3
|
+
import e from "./KvMaterialIcon.js";
|
|
4
|
+
const i = o`
|
|
5
|
+
fragment KvLoanBookmark on LoanBasic {
|
|
6
|
+
id
|
|
7
|
+
userProperties {
|
|
8
|
+
favorited
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
`, k = {
|
|
12
|
+
name: "KvLoanBookmark",
|
|
13
|
+
components: {
|
|
14
|
+
KvMaterialIcon: e
|
|
15
|
+
},
|
|
16
|
+
props: {
|
|
17
|
+
isBookmarked: {
|
|
18
|
+
type: Boolean,
|
|
19
|
+
default: !1
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
emits: [
|
|
23
|
+
"toggle-bookmark"
|
|
24
|
+
],
|
|
25
|
+
data() {
|
|
26
|
+
return {
|
|
27
|
+
mdiBookmarkOutline: r,
|
|
28
|
+
mdiBookmark: a
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
};
|
|
32
|
+
export {
|
|
33
|
+
i as KV_LOAN_BOOKMARK_FRAGMENT,
|
|
34
|
+
k as default
|
|
35
|
+
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import r from "./
|
|
1
|
+
import r from "./KvLoanCallouts.script.js";
|
|
2
2
|
import { openBlock as e, createElementBlock as l, createElementVNode as s, Fragment as n, renderList as a, toDisplayString as i } from "vue";
|
|
3
3
|
import "./KvLoanCallouts.css";
|
|
4
4
|
import d from "../_virtual/_plugin-vue_export-helper.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import K from "graphql-tag";
|
|
2
2
|
import { LOAN_GEOCODE_FRAGMENT as z, loanCardComputedProperties as D, loanCardMethods as I, useLocationTruncation as W } from "../utils/loanCard.js";
|
|
3
|
-
import F from "./
|
|
3
|
+
import F from "./KvLoanUse.js";
|
|
4
4
|
import E from "./KvBorrowerImage.js";
|
|
5
5
|
import O from "./KvMaterialIcon.js";
|
|
6
6
|
import V from "./KvLoadingPlaceholder.js";
|
|
@@ -8,7 +8,7 @@ import U from "./KvTooltip.js";
|
|
|
8
8
|
import { resolveComponent as s, openBlock as e, createElementBlock as i, normalizeStyle as G, normalizeClass as k, createElementVNode as l, createBlock as c, resolveDynamicComponent as y, withCtx as w, createVNode as m, toDisplayString as b, createTextVNode as H, createCommentVNode as L, Fragment as q, renderList as j, withModifiers as J } from "vue";
|
|
9
9
|
import "./KvLoanInfoCard.css";
|
|
10
10
|
import Q from "../_virtual/_plugin-vue_export-helper.js";
|
|
11
|
-
import { KV_LOAN_USE_FRAGMENT as X } from "./KvLoanUse.js";
|
|
11
|
+
import { KV_LOAN_USE_FRAGMENT as X } from "./KvLoanUse.script.js";
|
|
12
12
|
const bt = K`
|
|
13
13
|
fragment KvLoanInfoCard on LoanBasic {
|
|
14
14
|
id
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import c from "./
|
|
1
|
+
import c from "./KvLoanProgressGroup.script.js";
|
|
2
2
|
import { resolveComponent as m, openBlock as o, createElementBlock as r, createElementVNode as a, normalizeClass as n, toDisplayString as l, createCommentVNode as u, createVNode as _ } from "vue";
|
|
3
3
|
import "./KvLoanProgressGroup.css";
|
|
4
4
|
import d from "../_virtual/_plugin-vue_export-helper.js";
|
package/dist/vue/KvLoanTag.js
CHANGED
|
@@ -1,125 +1,46 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import l from "
|
|
4
|
-
import
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
useExpandedStyles: {
|
|
44
|
-
type: Boolean,
|
|
45
|
-
default: !1
|
|
46
|
-
},
|
|
47
|
-
enableMultiMatching: {
|
|
48
|
-
type: Boolean,
|
|
49
|
-
default: !1
|
|
50
|
-
}
|
|
51
|
-
},
|
|
52
|
-
computed: {
|
|
53
|
-
deadline() {
|
|
54
|
-
var t;
|
|
55
|
-
return s((t = this.loan) == null ? void 0 : t.plannedExpirationDate);
|
|
56
|
-
},
|
|
57
|
-
isLseLoan() {
|
|
58
|
-
var t, n;
|
|
59
|
-
return ((n = (t = this.loan) == null ? void 0 : t.partnerName) == null ? void 0 : n.toUpperCase().includes(h)) ?? !1;
|
|
60
|
-
},
|
|
61
|
-
amountLeft() {
|
|
62
|
-
var e, o;
|
|
63
|
-
const t = ((e = this.loan) == null ? void 0 : e.loanFundraisingInfo) ?? { fundedAmount: 0, reservedAmount: 0 }, { fundedAmount: n, reservedAmount: i } = t;
|
|
64
|
-
return l((o = this.loan) == null ? void 0 : o.loanAmount).subtract(n).subtract(i).value();
|
|
65
|
-
},
|
|
66
|
-
multiMatchingOrgs() {
|
|
67
|
-
var t;
|
|
68
|
-
return ((t = this.loan) == null ? void 0 : t.simultaneousMatching) ?? [];
|
|
69
|
-
},
|
|
70
|
-
isMultipleMatch() {
|
|
71
|
-
return this.enableMultiMatching && this.multiMatchingOrgs.length > 1;
|
|
72
|
-
},
|
|
73
|
-
totalMatchRatio() {
|
|
74
|
-
return this.multiMatchingOrgs.reduce((t, n) => t + n.ratio, 1);
|
|
75
|
-
},
|
|
76
|
-
variation() {
|
|
77
|
-
var i, e;
|
|
78
|
-
const t = !!((i = this.loan) != null && i.matchingText), n = this.enableMultiMatching && this.multiMatchingOrgs.length > 0;
|
|
79
|
-
return t || n ? a.matchedLoan : this.isLseLoan ? a.lseLoan : r(s((e = this.loan) == null ? void 0 : e.plannedExpirationDate), Date.now()) <= 3 ? a.endingSoon : this.amountLeft < 100 && this.amountLeft >= 0 ? a.almostFunded : null;
|
|
80
|
-
},
|
|
81
|
-
tagText() {
|
|
82
|
-
var t;
|
|
83
|
-
switch (this.variation) {
|
|
84
|
-
case a.lseLoan:
|
|
85
|
-
return `${this.useExpandedStyles ? "⚡ " : ""}High community impact`;
|
|
86
|
-
case a.almostFunded:
|
|
87
|
-
return `${this.useExpandedStyles ? "💸 " : ""}Almost funded`;
|
|
88
|
-
case a.matchedLoan: {
|
|
89
|
-
if (this.enableMultiMatching && this.multiMatchingOrgs.length === 1) {
|
|
90
|
-
const n = this.multiMatchingOrgs[0];
|
|
91
|
-
return `${this.useExpandedStyles ? "🤝 " : ""}${n.ratio + 1}x matching by ${this.orgDisplayName(n)}`;
|
|
92
|
-
}
|
|
93
|
-
return `${this.useExpandedStyles ? "🤝 " : ""}${this.matchRatio + 1}x matching by ${(t = this.loan) == null ? void 0 : t.matchingText}`;
|
|
94
|
-
}
|
|
95
|
-
default:
|
|
96
|
-
return `${this.useExpandedStyles ? "⏰ " : ""}Ending soon: `;
|
|
97
|
-
}
|
|
98
|
-
},
|
|
99
|
-
tagColor() {
|
|
100
|
-
if (this.useExpandedStyles)
|
|
101
|
-
switch (this.variation) {
|
|
102
|
-
case a.almostFunded:
|
|
103
|
-
return "#AF741C";
|
|
104
|
-
case a.endingSoon:
|
|
105
|
-
return "#CE2626";
|
|
106
|
-
default:
|
|
107
|
-
return "#2B7C5F";
|
|
108
|
-
}
|
|
109
|
-
return "#CE4A00";
|
|
110
|
-
},
|
|
111
|
-
matchRatio() {
|
|
112
|
-
var t;
|
|
113
|
-
return (t = this.loan) == null ? void 0 : t.matchRatio;
|
|
114
|
-
}
|
|
115
|
-
},
|
|
116
|
-
methods: {
|
|
117
|
-
orgDisplayName(t) {
|
|
118
|
-
return t.displayName && t.displayName !== "Anonymous" ? t.displayName : "a Kiva supporter";
|
|
119
|
-
}
|
|
120
|
-
}
|
|
121
|
-
};
|
|
1
|
+
import h from "./KvLoanTag.script.js";
|
|
2
|
+
import { KV_LOAN_TAG_FRAGMENT as L } from "./KvLoanTag.script.js";
|
|
3
|
+
import { resolveComponent as d, openBlock as e, createElementBlock as r, normalizeStyle as _, normalizeClass as w, Fragment as o, createTextVNode as m, toDisplayString as a, createElementVNode as l, createVNode as p, withCtx as y, renderList as k, createBlock as f, createCommentVNode as s } from "vue";
|
|
4
|
+
import x from "../_virtual/_plugin-vue_export-helper.js";
|
|
5
|
+
const v = ["id"], M = { class: "tw-whitespace-nowrap tw-pb-0.5" };
|
|
6
|
+
function N(b, i, c, C, T, t) {
|
|
7
|
+
const u = d("kv-tooltip"), g = d("kv-countdown-timer");
|
|
8
|
+
return t.variation ? (e(), r("div", {
|
|
9
|
+
key: 0,
|
|
10
|
+
class: w(["tw-text-small tw-font-medium tw-pt-0.5", { "tw-line-clamp-1": !t.isMultipleMatch }]),
|
|
11
|
+
style: _({ color: t.tagColor })
|
|
12
|
+
}, [
|
|
13
|
+
t.isMultipleMatch ? (e(), r(o, { key: 0 }, [
|
|
14
|
+
m(a(t.totalMatchRatio) + "x match by ", 1),
|
|
15
|
+
l("span", {
|
|
16
|
+
id: `matching-orgs-${c.loan.id}`,
|
|
17
|
+
class: "tw-underline tw-decoration-dotted tw-cursor-pointer"
|
|
18
|
+
}, a(t.multiMatchingOrgs.length) + " organizations", 9, v),
|
|
19
|
+
p(u, {
|
|
20
|
+
controller: `matching-orgs-${c.loan.id}`,
|
|
21
|
+
"max-width": "320px"
|
|
22
|
+
}, {
|
|
23
|
+
default: y(() => [
|
|
24
|
+
l("p", M, " Your contribution is matched by " + a(t.multiMatchingOrgs.length) + " partners ", 1),
|
|
25
|
+
i[0] || (i[0] = l("hr", { class: "tw-border-caution-highlight tw-py-0.5" }, null, -1)),
|
|
26
|
+
(e(!0), r(o, null, k(t.multiMatchingOrgs, (n) => (e(), r("p", {
|
|
27
|
+
key: n.managedAccountId,
|
|
28
|
+
class: "tw-m-0"
|
|
29
|
+
}, a(n.ratio) + ":1 matching by " + a(t.orgDisplayName(n)), 1))), 128))
|
|
30
|
+
]),
|
|
31
|
+
_: 1
|
|
32
|
+
}, 8, ["controller"])
|
|
33
|
+
], 64)) : (e(), r(o, { key: 1 }, [
|
|
34
|
+
m(a(t.tagText) + " ", 1),
|
|
35
|
+
t.variation === "ending-soon" ? (e(), f(g, {
|
|
36
|
+
key: 0,
|
|
37
|
+
deadline: t.deadline
|
|
38
|
+
}, null, 8, ["deadline"])) : s("", !0)
|
|
39
|
+
], 64))
|
|
40
|
+
], 6)) : s("", !0);
|
|
41
|
+
}
|
|
42
|
+
const z = /* @__PURE__ */ x(h, [["render", N]]);
|
|
122
43
|
export {
|
|
123
|
-
|
|
124
|
-
|
|
44
|
+
L as KV_LOAN_TAG_FRAGMENT,
|
|
45
|
+
z as default
|
|
125
46
|
};
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
import { differenceInDays as r, parseISO as s } from "date-fns";
|
|
2
|
+
import u from "graphql-tag";
|
|
3
|
+
import l from "numeral";
|
|
4
|
+
import d from "./KvCountdownTimer.js";
|
|
5
|
+
import m from "./KvTooltip.js";
|
|
6
|
+
const h = "N/A", a = {
|
|
7
|
+
almostFunded: "almost-funded",
|
|
8
|
+
endingSoon: "ending-soon",
|
|
9
|
+
matchedLoan: "matched-loan",
|
|
10
|
+
lseLoan: "lse-loan"
|
|
11
|
+
}, y = u`
|
|
12
|
+
fragment KvLoanTag on LoanBasic {
|
|
13
|
+
id
|
|
14
|
+
loanFundraisingInfo {
|
|
15
|
+
id
|
|
16
|
+
fundedAmount
|
|
17
|
+
reservedAmount
|
|
18
|
+
}
|
|
19
|
+
loanAmount
|
|
20
|
+
matchRatio
|
|
21
|
+
matchingText
|
|
22
|
+
simultaneousMatching {
|
|
23
|
+
managedAccountId
|
|
24
|
+
displayName
|
|
25
|
+
ratio
|
|
26
|
+
}
|
|
27
|
+
plannedExpirationDate
|
|
28
|
+
... on LoanPartner {
|
|
29
|
+
partnerName
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
`, L = {
|
|
33
|
+
name: "KvLoanTag",
|
|
34
|
+
components: {
|
|
35
|
+
KvCountdownTimer: d,
|
|
36
|
+
KvTooltip: m
|
|
37
|
+
},
|
|
38
|
+
props: {
|
|
39
|
+
loan: {
|
|
40
|
+
type: Object,
|
|
41
|
+
required: !0
|
|
42
|
+
},
|
|
43
|
+
useExpandedStyles: {
|
|
44
|
+
type: Boolean,
|
|
45
|
+
default: !1
|
|
46
|
+
},
|
|
47
|
+
enableMultiMatching: {
|
|
48
|
+
type: Boolean,
|
|
49
|
+
default: !1
|
|
50
|
+
}
|
|
51
|
+
},
|
|
52
|
+
computed: {
|
|
53
|
+
deadline() {
|
|
54
|
+
var t;
|
|
55
|
+
return s((t = this.loan) == null ? void 0 : t.plannedExpirationDate);
|
|
56
|
+
},
|
|
57
|
+
isLseLoan() {
|
|
58
|
+
var t, n;
|
|
59
|
+
return ((n = (t = this.loan) == null ? void 0 : t.partnerName) == null ? void 0 : n.toUpperCase().includes(h)) ?? !1;
|
|
60
|
+
},
|
|
61
|
+
amountLeft() {
|
|
62
|
+
var e, o;
|
|
63
|
+
const t = ((e = this.loan) == null ? void 0 : e.loanFundraisingInfo) ?? { fundedAmount: 0, reservedAmount: 0 }, { fundedAmount: n, reservedAmount: i } = t;
|
|
64
|
+
return l((o = this.loan) == null ? void 0 : o.loanAmount).subtract(n).subtract(i).value();
|
|
65
|
+
},
|
|
66
|
+
multiMatchingOrgs() {
|
|
67
|
+
var t;
|
|
68
|
+
return ((t = this.loan) == null ? void 0 : t.simultaneousMatching) ?? [];
|
|
69
|
+
},
|
|
70
|
+
isMultipleMatch() {
|
|
71
|
+
return this.enableMultiMatching && this.multiMatchingOrgs.length > 1;
|
|
72
|
+
},
|
|
73
|
+
totalMatchRatio() {
|
|
74
|
+
return this.multiMatchingOrgs.reduce((t, n) => t + n.ratio, 1);
|
|
75
|
+
},
|
|
76
|
+
variation() {
|
|
77
|
+
var i, e;
|
|
78
|
+
const t = !!((i = this.loan) != null && i.matchingText), n = this.enableMultiMatching && this.multiMatchingOrgs.length > 0;
|
|
79
|
+
return t || n ? a.matchedLoan : this.isLseLoan ? a.lseLoan : r(s((e = this.loan) == null ? void 0 : e.plannedExpirationDate), Date.now()) <= 3 ? a.endingSoon : this.amountLeft < 100 && this.amountLeft >= 0 ? a.almostFunded : null;
|
|
80
|
+
},
|
|
81
|
+
tagText() {
|
|
82
|
+
var t;
|
|
83
|
+
switch (this.variation) {
|
|
84
|
+
case a.lseLoan:
|
|
85
|
+
return `${this.useExpandedStyles ? "⚡ " : ""}High community impact`;
|
|
86
|
+
case a.almostFunded:
|
|
87
|
+
return `${this.useExpandedStyles ? "💸 " : ""}Almost funded`;
|
|
88
|
+
case a.matchedLoan: {
|
|
89
|
+
if (this.enableMultiMatching && this.multiMatchingOrgs.length === 1) {
|
|
90
|
+
const n = this.multiMatchingOrgs[0];
|
|
91
|
+
return `${this.useExpandedStyles ? "🤝 " : ""}${n.ratio + 1}x matching by ${this.orgDisplayName(n)}`;
|
|
92
|
+
}
|
|
93
|
+
return `${this.useExpandedStyles ? "🤝 " : ""}${this.matchRatio + 1}x matching by ${(t = this.loan) == null ? void 0 : t.matchingText}`;
|
|
94
|
+
}
|
|
95
|
+
default:
|
|
96
|
+
return `${this.useExpandedStyles ? "⏰ " : ""}Ending soon: `;
|
|
97
|
+
}
|
|
98
|
+
},
|
|
99
|
+
tagColor() {
|
|
100
|
+
if (this.useExpandedStyles)
|
|
101
|
+
switch (this.variation) {
|
|
102
|
+
case a.almostFunded:
|
|
103
|
+
return "#AF741C";
|
|
104
|
+
case a.endingSoon:
|
|
105
|
+
return "#CE2626";
|
|
106
|
+
default:
|
|
107
|
+
return "#2B7C5F";
|
|
108
|
+
}
|
|
109
|
+
return "#CE4A00";
|
|
110
|
+
},
|
|
111
|
+
matchRatio() {
|
|
112
|
+
var t;
|
|
113
|
+
return (t = this.loan) == null ? void 0 : t.matchRatio;
|
|
114
|
+
}
|
|
115
|
+
},
|
|
116
|
+
methods: {
|
|
117
|
+
orgDisplayName(t) {
|
|
118
|
+
return t.displayName && t.displayName !== "Anonymous" ? t.displayName : "a Kiva supporter";
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
};
|
|
122
|
+
export {
|
|
123
|
+
y as KV_LOAN_TAG_FRAGMENT,
|
|
124
|
+
L as default
|
|
125
|
+
};
|