@kiva/kv-components 7.6.3 → 8.0.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/.eslintignore +5 -0
- package/.github/copilot-instructions.md +11 -0
- package/AGENTS.md +184 -0
- package/CLAUDE.md +11 -0
- package/GEMINI.md +11 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +236 -216
- package/dist/utils/Alea.d.ts +9 -0
- package/dist/utils/Alea.js +23 -23
- package/dist/utils/arrayUtils.d.ts +3 -0
- package/dist/utils/arrayUtils.js +1 -1
- package/dist/utils/attrs.d.ts +6 -0
- package/dist/utils/carousels.d.ts +21 -0
- package/dist/utils/comparators.d.ts +3 -0
- package/dist/utils/comparators.js +20 -6
- package/dist/utils/debounce.d.ts +1 -0
- package/dist/utils/debounce.js +4 -4
- package/dist/utils/event.d.ts +1 -0
- package/dist/utils/event.js +7 -0
- package/dist/utils/expander.d.ts +14 -0
- package/dist/utils/imageUtils.d.ts +11 -0
- package/dist/utils/imageUtils.js +12 -12
- package/dist/utils/index.d.ts +21 -0
- package/dist/utils/loanCard.d.ts +35 -0
- package/dist/utils/loanCard.js +2 -2
- package/dist/utils/loanSearch/queryParamUtils.d.ts +1 -0
- package/dist/utils/loanUtils.d.ts +11 -0
- package/dist/utils/loanUtils.js +56 -53
- package/dist/utils/mapUtils.d.ts +5 -0
- package/dist/utils/markMatches.d.ts +1 -0
- package/dist/utils/paramCase.d.ts +1 -0
- package/dist/utils/printing.d.ts +2 -0
- package/dist/utils/scrollLock.d.ts +4 -0
- package/dist/utils/themeUtils.d.ts +12 -0
- package/dist/utils/throttle.d.ts +1 -0
- package/dist/utils/throttle.js +4 -4
- package/dist/utils/touchEvents.d.ts +3 -0
- package/dist/utils/touchEvents.js +9 -9
- package/dist/utils/treemap.d.ts +16 -0
- package/dist/utils/treemap.js +1 -1
- package/dist/vue/KvAccordionItem.js +28 -82
- package/dist/vue/KvAccordionItem.vue.d.ts +107 -0
- package/dist/vue/KvAccordionItem2.js +60 -0
- package/dist/vue/KvActivityRow.js +11 -22
- package/dist/vue/KvActivityRow.vue.d.ts +66 -0
- package/dist/vue/KvActivityRow2.js +16 -0
- package/dist/vue/KvAtbModal.css +1 -1
- package/dist/vue/KvAtbModal.js +68 -248
- package/dist/vue/KvAtbModal.vue.d.ts +359 -0
- package/dist/vue/KvAtbModal2.js +186 -0
- package/dist/vue/KvBorrowerImage.js +17 -118
- package/dist/vue/KvBorrowerImage.vue.d.ts +62 -0
- package/dist/vue/KvBorrowerImage2.js +106 -0
- package/dist/vue/KvButton.js +20 -164
- package/dist/vue/KvButton.vue.d.ts +94 -0
- package/dist/vue/KvButton2.js +149 -0
- package/dist/vue/KvCardFrame.js +12 -74
- package/dist/vue/KvCardFrame.vue.d.ts +86 -0
- package/dist/vue/KvCardFrame2.js +67 -0
- package/dist/vue/KvCarousel.css +1 -1
- package/dist/vue/KvCarousel.js +55 -192
- package/dist/vue/KvCarousel.vue.d.ts +135 -0
- package/dist/vue/KvCarousel2.js +142 -0
- package/dist/vue/KvCartModal.css +1 -1
- package/dist/vue/KvCartModal.js +31 -131
- package/dist/vue/KvCartModal.vue.d.ts +163 -0
- package/dist/vue/KvCartModal2.js +106 -0
- package/dist/vue/KvCartPill.js +12 -51
- package/dist/vue/KvCartPill.vue.d.ts +52 -0
- package/dist/vue/KvCartPill2.js +45 -0
- package/dist/vue/KvCheckbox.css +1 -1
- package/dist/vue/KvCheckbox.js +30 -126
- package/dist/vue/KvCheckbox.vue.d.ts +90 -0
- package/dist/vue/KvCheckbox2.js +102 -0
- package/dist/vue/KvCheckoutReceipt.css +1 -1
- package/dist/vue/KvCheckoutReceipt.js +120 -199
- package/dist/vue/KvCheckoutReceipt.vue.d.ts +164 -0
- package/dist/vue/KvCheckoutReceipt2.js +85 -0
- package/dist/vue/KvChip.js +12 -29
- package/dist/vue/KvChip.vue.d.ts +22 -0
- package/dist/vue/KvChip2.js +22 -0
- package/dist/vue/KvClassicLoanCard.css +1 -1
- package/dist/vue/KvClassicLoanCard.js +83 -351
- package/dist/vue/KvClassicLoanCard.vue.d.ts +2120 -0
- package/dist/vue/KvClassicLoanCard2.js +281 -0
- package/dist/vue/KvCommentsAdd.css +1 -1
- package/dist/vue/KvCommentsAdd.js +34 -81
- package/dist/vue/KvCommentsAdd.vue.d.ts +296 -0
- package/dist/vue/KvCommentsAdd2.js +57 -0
- package/dist/vue/KvCommentsContainer.js +15 -66
- package/dist/vue/KvCommentsContainer.vue.d.ts +954 -0
- package/dist/vue/KvCommentsContainer2.js +58 -0
- package/dist/vue/KvCommentsHeartButton.css +1 -1
- package/dist/vue/KvCommentsHeartButton.js +12 -51
- package/dist/vue/KvCommentsHeartButton.vue.d.ts +42 -0
- package/dist/vue/KvCommentsHeartButton2.js +44 -0
- package/dist/vue/KvCommentsList.js +9 -51
- package/dist/vue/KvCommentsList.vue.d.ts +619 -0
- package/dist/vue/KvCommentsList2.js +46 -0
- package/dist/vue/KvCommentsListItem.js +62 -186
- package/dist/vue/KvCommentsListItem.vue.d.ts +571 -0
- package/dist/vue/KvCommentsListItem2.js +135 -0
- package/dist/vue/KvCommentsReplyButton.css +1 -1
- package/dist/vue/KvCommentsReplyButton.js +8 -17
- package/dist/vue/KvCommentsReplyButton.vue.d.ts +98 -0
- package/dist/vue/KvCommentsReplyButton2.js +13 -0
- package/dist/vue/KvCompactLoanCard.css +1 -1
- package/dist/vue/KvCompactLoanCard.js +71 -327
- package/dist/vue/KvCompactLoanCard.vue.d.ts +1272 -0
- package/dist/vue/KvCompactLoanCard2.js +269 -0
- package/dist/vue/KvContentfulImg.js +51 -164
- package/dist/vue/KvContentfulImg.vue.d.ts +107 -0
- package/dist/vue/KvContentfulImg2.js +119 -0
- package/dist/vue/KvCountdownTimer.js +8 -28
- package/dist/vue/KvCountdownTimer.vue.d.ts +15 -0
- package/dist/vue/KvCountdownTimer2.js +26 -0
- package/dist/vue/KvDatePicker.js +21 -101
- package/dist/vue/KvDatePicker.vue.d.ts +58 -0
- package/dist/vue/KvDatePicker2.js +86 -0
- package/dist/vue/KvExpandable.js +9 -56
- package/dist/vue/KvExpandable.vue.d.ts +53 -0
- package/dist/vue/KvExpandable2.js +52 -0
- package/dist/vue/KvExpandableQuestion.js +23 -82
- package/dist/vue/KvExpandableQuestion.vue.d.ts +124 -0
- package/dist/vue/KvExpandableQuestion2.js +65 -0
- package/dist/vue/KvFlag.css +1 -1
- package/dist/vue/KvFlag.js +16 -617
- package/dist/vue/KvFlag.vue.d.ts +66 -0
- package/dist/vue/KvFlag2.js +606 -0
- package/dist/vue/KvGrid.js +7 -18
- package/dist/vue/KvGrid.vue.d.ts +14 -0
- package/dist/vue/KvGrid2.js +15 -0
- package/dist/vue/KvIconBag.js +12 -18
- package/dist/vue/KvIconBag.vue.d.ts +14 -0
- package/dist/vue/KvIconBag2.js +11 -0
- package/dist/vue/KvImpactDashboardHeader.vue.d.ts +17 -0
- package/dist/vue/KvImpactVerticalSelector.js +31 -110
- package/dist/vue/KvImpactVerticalSelector.vue.d.ts +278 -0
- package/dist/vue/KvImpactVerticalSelector2.js +85 -0
- package/dist/vue/KvInlineActivityCard.js +15 -44
- package/dist/vue/KvInlineActivityCard.vue.d.ts +71 -0
- package/dist/vue/KvInlineActivityCard2.js +35 -0
- package/dist/vue/KvInlineActivityFeed.css +1 -1
- package/dist/vue/KvInlineActivityFeed.js +11 -23
- package/dist/vue/KvInlineActivityFeed.vue.d.ts +85 -0
- package/dist/vue/KvInlineActivityFeed2.js +17 -0
- package/dist/vue/KvIntroductionLoanCard.css +1 -1
- package/dist/vue/KvIntroductionLoanCard.js +111 -309
- package/dist/vue/KvIntroductionLoanCard.vue.d.ts +617 -0
- package/dist/vue/KvIntroductionLoanCard2.js +209 -0
- package/dist/vue/KvLendAmountButton.js +9 -53
- package/dist/vue/KvLendAmountButton.vue.d.ts +140 -0
- package/dist/vue/KvLendAmountButton2.js +48 -0
- package/dist/vue/KvLendCta.css +1 -1
- package/dist/vue/KvLendCta.js +150 -530
- package/dist/vue/KvLendCta.vue.d.ts +583 -0
- package/dist/vue/KvLendCta2.js +387 -0
- package/dist/vue/KvLightbox.js +37 -148
- package/dist/vue/KvLightbox.vue.d.ts +77 -0
- package/dist/vue/KvLightbox2.js +117 -0
- package/dist/vue/KvLineGraph.js +25 -58
- package/dist/vue/KvLineGraph.vue.d.ts +35 -0
- package/dist/vue/KvLineGraph2.js +39 -0
- package/dist/vue/KvLoadingPlaceholder.vue.d.ts +2 -0
- package/dist/vue/KvLoadingSpinner.js +9 -34
- package/dist/vue/KvLoadingSpinner.vue.d.ts +27 -0
- package/dist/vue/KvLoadingSpinner2.js +29 -0
- package/dist/vue/KvLoanActivities.css +1 -1
- package/dist/vue/KvLoanActivities.js +37 -179
- package/dist/vue/KvLoanActivities.vue.d.ts +853 -0
- package/dist/vue/KvLoanActivities2.js +151 -0
- package/dist/vue/KvLoanBookmark.js +14 -40
- package/dist/vue/KvLoanBookmark.vue.d.ts +32 -0
- package/dist/vue/KvLoanBookmark2.js +32 -0
- package/dist/vue/KvLoanCallouts.css +1 -1
- package/dist/vue/KvLoanCallouts.js +10 -17
- package/dist/vue/KvLoanCallouts.vue.d.ts +18 -0
- package/dist/vue/KvLoanCallouts2.js +12 -0
- package/dist/vue/KvLoanInfoCard.js +20 -19
- package/dist/vue/KvLoanProgressGroup.css +1 -1
- package/dist/vue/KvLoanProgressGroup.js +18 -57
- package/dist/vue/KvLoanProgressGroup.vue.d.ts +108 -0
- package/dist/vue/KvLoanProgressGroup2.js +44 -0
- package/dist/vue/KvLoanTag.js +15 -103
- package/dist/vue/KvLoanTag.vue.d.ts +46 -0
- package/dist/vue/KvLoanTag2.js +94 -0
- package/dist/vue/KvLoanTeamPick.vue.d.ts +2 -0
- package/dist/vue/KvLoanUse.js +12 -100
- package/dist/vue/KvLoanUse.vue.d.ts +120 -0
- package/dist/vue/KvLoanUse2.js +95 -0
- package/dist/vue/KvLogo.vue.d.ts +2 -0
- package/dist/vue/KvMap.js +13 -381
- package/dist/vue/KvMap.vue.d.ts +213 -0
- package/dist/vue/KvMap2.js +376 -0
- package/dist/vue/KvMaterialIcon.js +10 -20
- package/dist/vue/KvMaterialIcon.vue.d.ts +14 -0
- package/dist/vue/KvMaterialIcon2.js +15 -0
- package/dist/vue/KvPageContainer.js +9 -8
- package/dist/vue/KvPageContainer.vue.d.ts +2 -0
- package/dist/vue/KvPageContainer2.js +4 -0
- package/dist/vue/KvPagination.js +38 -138
- package/dist/vue/KvPagination.vue.d.ts +107 -0
- package/dist/vue/KvPagination2.js +105 -0
- package/dist/vue/KvPieChart.css +1 -1
- package/dist/vue/KvPieChart.js +49 -128
- package/dist/vue/KvPieChart.vue.d.ts +47 -0
- package/dist/vue/KvPieChart2.js +85 -0
- package/dist/vue/KvPill.js +9 -19
- package/dist/vue/KvPill.vue.d.ts +23 -0
- package/dist/vue/KvPill2.js +15 -0
- package/dist/vue/KvPopper.js +14 -122
- package/dist/vue/KvPopper.vue.d.ts +80 -0
- package/dist/vue/KvPopper2.js +113 -0
- package/dist/vue/KvProgressBar.js +17 -112
- package/dist/vue/KvProgressBar.vue.d.ts +70 -0
- package/dist/vue/KvProgressBar2.js +101 -0
- package/dist/vue/KvPulsingDot.css +1 -1
- package/dist/vue/KvPulsingDot.js +11 -25
- package/dist/vue/KvPulsingDot.vue.d.ts +23 -0
- package/dist/vue/KvPulsingDot2.js +19 -0
- package/dist/vue/KvRadio.js +23 -106
- package/dist/vue/KvRadio.vue.d.ts +62 -0
- package/dist/vue/KvRadio2.js +89 -0
- package/dist/vue/KvSecondaryNav.css +1 -1
- package/dist/vue/KvSecondaryNav.js +46 -122
- package/dist/vue/KvSecondaryNav.vue.d.ts +117 -0
- package/dist/vue/KvSecondaryNav2.js +82 -0
- package/dist/vue/KvSelect.css +1 -1
- package/dist/vue/KvSelect.js +18 -78
- package/dist/vue/KvSelect.vue.d.ts +58 -0
- package/dist/vue/KvSelect2.js +66 -0
- package/dist/vue/KvSideSheet.js +44 -262
- package/dist/vue/KvSideSheet.vue.d.ts +136 -0
- package/dist/vue/KvSideSheet2.js +224 -0
- package/dist/vue/KvSwitch.js +23 -76
- package/dist/vue/KvSwitch.vue.d.ts +34 -0
- package/dist/vue/KvSwitch2.js +59 -0
- package/dist/vue/KvTab.js +15 -57
- package/dist/vue/KvTab.vue.d.ts +34 -0
- package/dist/vue/KvTab2.js +48 -0
- package/dist/vue/KvTabPanel.js +14 -36
- package/dist/vue/KvTabPanel.vue.d.ts +14 -0
- package/dist/vue/KvTabPanel2.js +28 -0
- package/dist/vue/KvTabs.js +21 -75
- package/dist/vue/KvTabs.vue.d.ts +22 -0
- package/dist/vue/KvTabs2.js +60 -0
- package/dist/vue/KvTextInput.js +28 -148
- package/dist/vue/KvTextInput.vue.d.ts +105 -0
- package/dist/vue/KvTextInput2.js +126 -0
- package/dist/vue/KvTextLink.js +13 -76
- package/dist/vue/KvTextLink.vue.d.ts +64 -0
- package/dist/vue/KvTextLink2.js +68 -0
- package/dist/vue/KvThemeProvider.js +8 -59
- package/dist/vue/KvThemeProvider.vue.d.ts +23 -0
- package/dist/vue/KvThemeProvider2.js +55 -0
- package/dist/vue/KvToast.js +32 -69
- package/dist/vue/KvToast.vue.d.ts +31 -0
- package/dist/vue/KvToast2.js +43 -0
- package/dist/vue/KvTooltip.css +1 -1
- package/dist/vue/KvTooltip.js +27 -123
- package/dist/vue/KvTooltip.vue.d.ts +2 -0
- package/dist/vue/KvTooltip2.js +103 -0
- package/dist/vue/KvTreeMapChart.css +1 -1
- package/dist/vue/KvTreeMapChart.js +28 -156
- package/dist/vue/KvTreeMapChart.vue.d.ts +60 -0
- package/dist/vue/KvTreeMapChart2.js +133 -0
- package/dist/vue/KvUserAvatar.js +28 -110
- package/dist/vue/KvUserAvatar.vue.d.ts +55 -0
- package/dist/vue/KvUserAvatar2.js +88 -0
- package/dist/vue/KvUtilityMenu.js +19 -95
- package/dist/vue/KvUtilityMenu.vue.d.ts +104 -0
- package/dist/vue/KvUtilityMenu2.js +81 -0
- package/dist/vue/KvVerticalCarousel.js +40 -137
- package/dist/vue/KvVerticalCarousel.vue.d.ts +90 -0
- package/dist/vue/KvVerticalCarousel2.js +103 -0
- package/dist/vue/KvVotingCard.css +1 -1
- package/dist/vue/KvVotingCard.js +31 -88
- package/dist/vue/KvVotingCard.vue.d.ts +249 -0
- package/dist/vue/KvVotingCard2.js +63 -0
- package/dist/vue/KvVotingCardV2.js +35 -90
- package/dist/vue/KvVotingCardV2.vue.d.ts +308 -0
- package/dist/vue/KvVotingCardV22.js +61 -0
- package/dist/vue/KvWideLoanCard.css +1 -1
- package/dist/vue/KvWideLoanCard.js +66 -274
- package/dist/vue/KvWideLoanCard.vue.d.ts +1191 -0
- package/dist/vue/KvWideLoanCard2.js +220 -0
- package/dist/vue/KvWwwHeader/KvHeaderAboutMenu.js +34 -38
- package/dist/vue/KvWwwHeader/KvHeaderAboutMenu.vue.d.ts +20 -0
- package/dist/vue/KvWwwHeader/KvHeaderAboutMenu2.js +9 -0
- package/dist/vue/KvWwwHeader/KvHeaderDropdownLink.js +20 -83
- package/dist/vue/KvWwwHeader/KvHeaderDropdownLink.vue.d.ts +91 -0
- package/dist/vue/KvWwwHeader/KvHeaderDropdownLink2.js +69 -0
- package/dist/vue/KvWwwHeader/KvHeaderLinkBar.css +1 -1
- package/dist/vue/KvWwwHeader/KvHeaderLinkBar.js +77 -248
- package/dist/vue/KvWwwHeader/KvHeaderLinkBar.vue.d.ts +1071 -0
- package/dist/vue/KvWwwHeader/KvHeaderLinkBar2.js +178 -0
- package/dist/vue/KvWwwHeader/KvHeaderLogo.js +8 -12
- package/dist/vue/KvWwwHeader/KvHeaderLogo.vue.d.ts +4 -0
- package/dist/vue/KvWwwHeader/KvHeaderLogo2.js +9 -0
- package/dist/vue/KvWwwHeader/KvHeaderMenuLink.vue.d.ts +17 -0
- package/dist/vue/KvWwwHeader/KvHeaderMobileMenu.css +1 -1
- package/dist/vue/KvWwwHeader/KvHeaderMobileMenu.js +37 -91
- package/dist/vue/KvWwwHeader/KvHeaderMobileMenu.vue.d.ts +162 -0
- package/dist/vue/KvWwwHeader/KvHeaderMobileMenu2.js +59 -0
- package/dist/vue/KvWwwHeader/KvHeaderMyKivaMenu.js +36 -58
- package/dist/vue/KvWwwHeader/KvHeaderMyKivaMenu.vue.d.ts +59 -0
- package/dist/vue/KvWwwHeader/KvHeaderMyKivaMenu2.js +27 -0
- package/dist/vue/KvWwwHeader/KvHeaderTakeActionMenu.js +20 -24
- package/dist/vue/KvWwwHeader/KvHeaderTakeActionMenu.vue.d.ts +20 -0
- package/dist/vue/KvWwwHeader/KvHeaderTakeActionMenu2.js +9 -0
- package/dist/vue/KvWwwHeader/LendMenu/KvLendListMenu.css +1 -1
- package/dist/vue/KvWwwHeader/LendMenu/KvLendListMenu.js +105 -181
- package/dist/vue/KvWwwHeader/LendMenu/KvLendListMenu.vue.d.ts +319 -0
- package/dist/vue/KvWwwHeader/LendMenu/KvLendListMenu2.js +82 -0
- package/dist/vue/KvWwwHeader/LendMenu/KvLendMegaMenu.css +1 -1
- package/dist/vue/KvWwwHeader/LendMenu/KvLendMegaMenu.js +93 -173
- package/dist/vue/KvWwwHeader/LendMenu/KvLendMegaMenu.vue.d.ts +166 -0
- package/dist/vue/KvWwwHeader/LendMenu/KvLendMegaMenu2.js +86 -0
- package/dist/vue/KvWwwHeader/LendMenu/KvLendMenu.js +17 -157
- package/dist/vue/KvWwwHeader/LendMenu/KvLendMenu.vue.d.ts +506 -0
- package/dist/vue/KvWwwHeader/LendMenu/KvLendMenu2.js +145 -0
- package/dist/vue/KvWwwHeader/LendMenu/KvLendMenuCountryList.css +1 -1
- package/dist/vue/KvWwwHeader/LendMenu/KvLendMenuCountryList.js +11 -18
- package/dist/vue/KvWwwHeader/LendMenu/KvLendMenuCountryList.vue.d.ts +20 -0
- package/dist/vue/KvWwwHeader/LendMenu/KvLendMenuCountryList2.js +12 -0
- package/dist/vue/KvWwwHeader/LendMenu/KvLendMenuSearchList.js +10 -16
- package/dist/vue/KvWwwHeader/LendMenu/KvLendMenuSearchList.vue.d.ts +20 -0
- package/dist/vue/KvWwwHeader/LendMenu/KvLendMenuSearchList2.js +11 -0
- package/dist/vue/KvWwwHeader.css +1 -1
- package/dist/vue/KvWwwHeader.js +35 -148
- package/dist/vue/KvWwwHeader.vue.d.ts +4430 -0
- package/dist/vue/KvWwwHeader2.js +119 -0
- package/dist/vue/index.d.ts +86 -0
- package/package.json +35 -33
- package/tsconfig.json +32 -0
- package/vite.config.ts +84 -0
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import e from "numeral";
|
|
2
|
+
import o from "./KvProgressBar.js";
|
|
3
|
+
const u = {
|
|
4
|
+
name: "KvLoanProgressGroup",
|
|
5
|
+
components: {
|
|
6
|
+
KvProgressBar: o
|
|
7
|
+
},
|
|
8
|
+
props: {
|
|
9
|
+
moneyLeft: {
|
|
10
|
+
type: String,
|
|
11
|
+
default: "0.00"
|
|
12
|
+
},
|
|
13
|
+
progressPercent: {
|
|
14
|
+
type: Number,
|
|
15
|
+
default: 0
|
|
16
|
+
},
|
|
17
|
+
amountGoal: {
|
|
18
|
+
type: String,
|
|
19
|
+
default: ""
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
computed: {
|
|
23
|
+
numeralLeft() {
|
|
24
|
+
return e(this.moneyLeft);
|
|
25
|
+
},
|
|
26
|
+
amountLow() {
|
|
27
|
+
return this.numeralLeft.value() < 100;
|
|
28
|
+
},
|
|
29
|
+
fundingText() {
|
|
30
|
+
if (!this.numeralLeft.value()) return "funded!";
|
|
31
|
+
const t = this.numeralLeft.format("$0,0[.]00"), r = this.amountLow ? "!" : "";
|
|
32
|
+
return `${t} to go${r}`;
|
|
33
|
+
},
|
|
34
|
+
numeralGoal() {
|
|
35
|
+
return e(this.amountGoal);
|
|
36
|
+
},
|
|
37
|
+
goalText() {
|
|
38
|
+
return this.numeralGoal.value() ? `${this.numeralGoal.format("$0,0[.]00")} goal` : "";
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
};
|
|
42
|
+
export {
|
|
43
|
+
u as default
|
|
44
|
+
};
|
package/dist/vue/KvLoanTag.js
CHANGED
|
@@ -1,111 +1,23 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import f from "./KvCountdownTimer.js";
|
|
5
|
-
import { resolveComponent as h, openBlock as d, createElementBlock as g, normalizeStyle as L, createTextVNode as x, toDisplayString as A, createBlock as v, createCommentVNode as l } from "vue";
|
|
1
|
+
import n from "./KvLoanTag2.js";
|
|
2
|
+
import { KV_LOAN_TAG_FRAGMENT as A } from "./KvLoanTag2.js";
|
|
3
|
+
import { resolveComponent as a, openBlock as t, createElementBlock as c, normalizeStyle as l, createTextVNode as m, toDisplayString as d, createBlock as i, createCommentVNode as o } from "vue";
|
|
6
4
|
import _ from "../_virtual/_plugin-vue_export-helper.js";
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
matchedLoan: "matched-loan",
|
|
11
|
-
lseLoan: "lse-loan"
|
|
12
|
-
}, I = c`
|
|
13
|
-
fragment KvLoanTag on LoanBasic {
|
|
14
|
-
id
|
|
15
|
-
loanFundraisingInfo {
|
|
16
|
-
id
|
|
17
|
-
fundedAmount
|
|
18
|
-
reservedAmount
|
|
19
|
-
}
|
|
20
|
-
loanAmount
|
|
21
|
-
matchRatio
|
|
22
|
-
matchingText
|
|
23
|
-
plannedExpirationDate
|
|
24
|
-
... on LoanPartner {
|
|
25
|
-
partnerName
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
`, E = {
|
|
29
|
-
name: "KvLoanTag",
|
|
30
|
-
components: {
|
|
31
|
-
KvCountdownTimer: f
|
|
32
|
-
},
|
|
33
|
-
props: {
|
|
34
|
-
loan: {
|
|
35
|
-
type: Object,
|
|
36
|
-
required: !0
|
|
37
|
-
},
|
|
38
|
-
useExpandedStyles: {
|
|
39
|
-
type: Boolean,
|
|
40
|
-
default: !1
|
|
41
|
-
}
|
|
42
|
-
},
|
|
43
|
-
computed: {
|
|
44
|
-
deadline() {
|
|
45
|
-
var e;
|
|
46
|
-
return s((e = this.loan) == null ? void 0 : e.plannedExpirationDate);
|
|
47
|
-
},
|
|
48
|
-
isLseLoan() {
|
|
49
|
-
var e, n;
|
|
50
|
-
return ((n = (e = this.loan) == null ? void 0 : e.partnerName) == null ? void 0 : n.toUpperCase().includes(y)) ?? !1;
|
|
51
|
-
},
|
|
52
|
-
amountLeft() {
|
|
53
|
-
var o, r;
|
|
54
|
-
const e = ((o = this.loan) == null ? void 0 : o.loanFundraisingInfo) ?? { fundedAmount: 0, reservedAmount: 0 }, { fundedAmount: n, reservedAmount: i } = e;
|
|
55
|
-
return p((r = this.loan) == null ? void 0 : r.loanAmount).subtract(n).subtract(i).value();
|
|
56
|
-
},
|
|
57
|
-
variation() {
|
|
58
|
-
var e, n;
|
|
59
|
-
return (e = this.loan) != null && e.matchingText ? t.matchedLoan : this.isLseLoan ? t.lseLoan : m(s((n = this.loan) == null ? void 0 : n.plannedExpirationDate), Date.now()) <= 3 ? t.endingSoon : this.amountLeft < 100 && this.amountLeft >= 0 ? t.almostFunded : null;
|
|
60
|
-
},
|
|
61
|
-
tagText() {
|
|
62
|
-
var e;
|
|
63
|
-
switch (this.variation) {
|
|
64
|
-
case t.lseLoan:
|
|
65
|
-
return `${this.useExpandedStyles ? "⚡ " : ""}High community impact`;
|
|
66
|
-
case t.almostFunded:
|
|
67
|
-
return `${this.useExpandedStyles ? "💸 " : ""}Almost funded`;
|
|
68
|
-
// eslint-disable-next-line max-len
|
|
69
|
-
case t.matchedLoan:
|
|
70
|
-
return `${this.useExpandedStyles ? "🤝 " : ""}${this.matchRatio + 1}x matching by ${(e = this.loan) == null ? void 0 : e.matchingText}`;
|
|
71
|
-
default:
|
|
72
|
-
return `${this.useExpandedStyles ? "⏰ " : ""}Ending soon: `;
|
|
73
|
-
}
|
|
74
|
-
},
|
|
75
|
-
tagColor() {
|
|
76
|
-
if (this.useExpandedStyles)
|
|
77
|
-
switch (this.variation) {
|
|
78
|
-
case t.almostFunded:
|
|
79
|
-
return "#AF741C";
|
|
80
|
-
case t.endingSoon:
|
|
81
|
-
return "#CE2626";
|
|
82
|
-
default:
|
|
83
|
-
return "#2B7C5F";
|
|
84
|
-
}
|
|
85
|
-
return "#CE4A00";
|
|
86
|
-
},
|
|
87
|
-
matchRatio() {
|
|
88
|
-
var e;
|
|
89
|
-
return (e = this.loan) == null ? void 0 : e.matchRatio;
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
};
|
|
93
|
-
function S(e, n, i, o, r, a) {
|
|
94
|
-
const u = h("kv-countdown-timer");
|
|
95
|
-
return a.variation ? (d(), g("div", {
|
|
5
|
+
function p(s, f, u, k, v, e) {
|
|
6
|
+
const r = a("kv-countdown-timer");
|
|
7
|
+
return e.variation ? (t(), c("div", {
|
|
96
8
|
key: 0,
|
|
97
9
|
class: "tw-text-small tw-font-medium tw-pt-0.5 tw-line-clamp-1",
|
|
98
|
-
style:
|
|
10
|
+
style: l({ color: e.tagColor })
|
|
99
11
|
}, [
|
|
100
|
-
|
|
101
|
-
|
|
12
|
+
m(d(e.tagText) + " ", 1),
|
|
13
|
+
e.variation === "ending-soon" ? (t(), i(r, {
|
|
102
14
|
key: 0,
|
|
103
|
-
deadline:
|
|
104
|
-
}, null, 8, ["deadline"])) :
|
|
105
|
-
], 4)) :
|
|
15
|
+
deadline: e.deadline
|
|
16
|
+
}, null, 8, ["deadline"])) : o("", !0)
|
|
17
|
+
], 4)) : o("", !0);
|
|
106
18
|
}
|
|
107
|
-
const
|
|
19
|
+
const y = /* @__PURE__ */ _(n, [["render", p]]);
|
|
108
20
|
export {
|
|
109
|
-
|
|
110
|
-
|
|
21
|
+
A as KV_LOAN_TAG_FRAGMENT,
|
|
22
|
+
y as default
|
|
111
23
|
};
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
export declare const KV_LOAN_TAG_FRAGMENT: import('graphql').DocumentNode;
|
|
2
|
+
declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
3
|
+
loan: {
|
|
4
|
+
type: ObjectConstructor;
|
|
5
|
+
required: true;
|
|
6
|
+
};
|
|
7
|
+
useExpandedStyles: {
|
|
8
|
+
type: BooleanConstructor;
|
|
9
|
+
default: boolean;
|
|
10
|
+
};
|
|
11
|
+
}>, {}, {}, {
|
|
12
|
+
deadline(): Date;
|
|
13
|
+
isLseLoan(): any;
|
|
14
|
+
amountLeft(): any;
|
|
15
|
+
variation(): string;
|
|
16
|
+
tagText(): string;
|
|
17
|
+
tagColor(): "#AF741C" | "#CE2626" | "#2B7C5F" | "#CE4A00";
|
|
18
|
+
matchRatio(): any;
|
|
19
|
+
}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
20
|
+
loan: {
|
|
21
|
+
type: ObjectConstructor;
|
|
22
|
+
required: true;
|
|
23
|
+
};
|
|
24
|
+
useExpandedStyles: {
|
|
25
|
+
type: BooleanConstructor;
|
|
26
|
+
default: boolean;
|
|
27
|
+
};
|
|
28
|
+
}>> & Readonly<{}>, {
|
|
29
|
+
useExpandedStyles: boolean;
|
|
30
|
+
}, {}, {
|
|
31
|
+
KvCountdownTimer: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
32
|
+
deadline: {
|
|
33
|
+
type: DateConstructor;
|
|
34
|
+
required: true;
|
|
35
|
+
};
|
|
36
|
+
}>, {
|
|
37
|
+
timeLeft: import('vue').Ref<any, any>;
|
|
38
|
+
remainingHours: import('vue').Ref<any, any>;
|
|
39
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
40
|
+
deadline: {
|
|
41
|
+
type: DateConstructor;
|
|
42
|
+
required: true;
|
|
43
|
+
};
|
|
44
|
+
}>> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
45
|
+
}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
46
|
+
export default _default;
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import { parseISO as s, differenceInDays as i } from "date-fns";
|
|
2
|
+
import d from "graphql-tag";
|
|
3
|
+
import u from "numeral";
|
|
4
|
+
import l from "./KvCountdownTimer.js";
|
|
5
|
+
const m = "N/A", t = {
|
|
6
|
+
almostFunded: "almost-funded",
|
|
7
|
+
endingSoon: "ending-soon",
|
|
8
|
+
matchedLoan: "matched-loan",
|
|
9
|
+
lseLoan: "lse-loan"
|
|
10
|
+
}, L = d`
|
|
11
|
+
fragment KvLoanTag on LoanBasic {
|
|
12
|
+
id
|
|
13
|
+
loanFundraisingInfo {
|
|
14
|
+
id
|
|
15
|
+
fundedAmount
|
|
16
|
+
reservedAmount
|
|
17
|
+
}
|
|
18
|
+
loanAmount
|
|
19
|
+
matchRatio
|
|
20
|
+
matchingText
|
|
21
|
+
plannedExpirationDate
|
|
22
|
+
... on LoanPartner {
|
|
23
|
+
partnerName
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
`, g = {
|
|
27
|
+
name: "KvLoanTag",
|
|
28
|
+
components: {
|
|
29
|
+
KvCountdownTimer: l
|
|
30
|
+
},
|
|
31
|
+
props: {
|
|
32
|
+
loan: {
|
|
33
|
+
type: Object,
|
|
34
|
+
required: !0
|
|
35
|
+
},
|
|
36
|
+
useExpandedStyles: {
|
|
37
|
+
type: Boolean,
|
|
38
|
+
default: !1
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
computed: {
|
|
42
|
+
deadline() {
|
|
43
|
+
var n;
|
|
44
|
+
return s((n = this.loan) == null ? void 0 : n.plannedExpirationDate);
|
|
45
|
+
},
|
|
46
|
+
isLseLoan() {
|
|
47
|
+
var n, e;
|
|
48
|
+
return ((e = (n = this.loan) == null ? void 0 : n.partnerName) == null ? void 0 : e.toUpperCase().includes(m)) ?? !1;
|
|
49
|
+
},
|
|
50
|
+
amountLeft() {
|
|
51
|
+
var a, o;
|
|
52
|
+
const n = ((a = this.loan) == null ? void 0 : a.loanFundraisingInfo) ?? { fundedAmount: 0, reservedAmount: 0 }, { fundedAmount: e, reservedAmount: r } = n;
|
|
53
|
+
return u((o = this.loan) == null ? void 0 : o.loanAmount).subtract(e).subtract(r).value();
|
|
54
|
+
},
|
|
55
|
+
variation() {
|
|
56
|
+
var n, e;
|
|
57
|
+
return (n = this.loan) != null && n.matchingText ? t.matchedLoan : this.isLseLoan ? t.lseLoan : i(s((e = this.loan) == null ? void 0 : e.plannedExpirationDate), Date.now()) <= 3 ? t.endingSoon : this.amountLeft < 100 && this.amountLeft >= 0 ? t.almostFunded : null;
|
|
58
|
+
},
|
|
59
|
+
tagText() {
|
|
60
|
+
var n;
|
|
61
|
+
switch (this.variation) {
|
|
62
|
+
case t.lseLoan:
|
|
63
|
+
return `${this.useExpandedStyles ? "⚡ " : ""}High community impact`;
|
|
64
|
+
case t.almostFunded:
|
|
65
|
+
return `${this.useExpandedStyles ? "💸 " : ""}Almost funded`;
|
|
66
|
+
// eslint-disable-next-line max-len
|
|
67
|
+
case t.matchedLoan:
|
|
68
|
+
return `${this.useExpandedStyles ? "🤝 " : ""}${this.matchRatio + 1}x matching by ${(n = this.loan) == null ? void 0 : n.matchingText}`;
|
|
69
|
+
default:
|
|
70
|
+
return `${this.useExpandedStyles ? "⏰ " : ""}Ending soon: `;
|
|
71
|
+
}
|
|
72
|
+
},
|
|
73
|
+
tagColor() {
|
|
74
|
+
if (this.useExpandedStyles)
|
|
75
|
+
switch (this.variation) {
|
|
76
|
+
case t.almostFunded:
|
|
77
|
+
return "#AF741C";
|
|
78
|
+
case t.endingSoon:
|
|
79
|
+
return "#CE2626";
|
|
80
|
+
default:
|
|
81
|
+
return "#2B7C5F";
|
|
82
|
+
}
|
|
83
|
+
return "#CE4A00";
|
|
84
|
+
},
|
|
85
|
+
matchRatio() {
|
|
86
|
+
var n;
|
|
87
|
+
return (n = this.loan) == null ? void 0 : n.matchRatio;
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
};
|
|
91
|
+
export {
|
|
92
|
+
L as KV_LOAN_TAG_FRAGMENT,
|
|
93
|
+
g as default
|
|
94
|
+
};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
declare const _default: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, HTMLDivElement>;
|
|
2
|
+
export default _default;
|
package/dist/vue/KvLoanUse.js
CHANGED
|
@@ -1,104 +1,16 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import { openBlock as r, createElementBlock as
|
|
4
|
-
import
|
|
5
|
-
const
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
anonymizationLevel
|
|
9
|
-
use
|
|
10
|
-
loanAmount
|
|
11
|
-
status
|
|
12
|
-
borrowerCount
|
|
13
|
-
name
|
|
14
|
-
distributionModel
|
|
15
|
-
whySpecial
|
|
16
|
-
}
|
|
17
|
-
`, p = {
|
|
18
|
-
name: "KvLoanUse",
|
|
19
|
-
props: {
|
|
20
|
-
anonymizationLevel: {
|
|
21
|
-
type: String,
|
|
22
|
-
default: "none"
|
|
23
|
-
},
|
|
24
|
-
use: {
|
|
25
|
-
type: String,
|
|
26
|
-
default: ""
|
|
27
|
-
},
|
|
28
|
-
loanAmount: {
|
|
29
|
-
type: String,
|
|
30
|
-
default: ""
|
|
31
|
-
},
|
|
32
|
-
status: {
|
|
33
|
-
type: String,
|
|
34
|
-
default: ""
|
|
35
|
-
},
|
|
36
|
-
borrowerCount: {
|
|
37
|
-
type: Number,
|
|
38
|
-
default: 1
|
|
39
|
-
},
|
|
40
|
-
name: {
|
|
41
|
-
type: String,
|
|
42
|
-
default: ""
|
|
43
|
-
},
|
|
44
|
-
distributionModel: {
|
|
45
|
-
type: String,
|
|
46
|
-
default: n
|
|
47
|
-
},
|
|
48
|
-
whySpecial: {
|
|
49
|
-
type: String,
|
|
50
|
-
default: ""
|
|
51
|
-
},
|
|
52
|
-
hideLoanAmount: {
|
|
53
|
-
type: Boolean,
|
|
54
|
-
default: !1
|
|
55
|
-
},
|
|
56
|
-
boldName: {
|
|
57
|
-
type: Boolean,
|
|
58
|
-
default: !1
|
|
59
|
-
},
|
|
60
|
-
country: {
|
|
61
|
-
type: String,
|
|
62
|
-
default: ""
|
|
63
|
-
},
|
|
64
|
-
useIndicativeHelpText: {
|
|
65
|
-
type: Boolean,
|
|
66
|
-
default: !1
|
|
67
|
-
}
|
|
68
|
-
},
|
|
69
|
-
computed: {
|
|
70
|
-
helpLanguage() {
|
|
71
|
-
return this.status === "fundraising" || this.status === "inactive" || this.status === "reviewed" ? "helps" : "helped";
|
|
72
|
-
},
|
|
73
|
-
isDirect() {
|
|
74
|
-
return this.distributionModel === n;
|
|
75
|
-
},
|
|
76
|
-
whySpecialSentence() {
|
|
77
|
-
return this.whySpecial ? ` This loan is special because ${this.whySpecial.charAt(0).toLowerCase() + this.whySpecial.slice(1)}` : "";
|
|
78
|
-
},
|
|
79
|
-
nameSpan() {
|
|
80
|
-
return this.boldName ? this.country ? `<span class="data-hj-suppress tw-font-medium">${this.name} in ${this.country}</span>` : `<span class="data-hj-suppress tw-font-medium">${this.name}</span>` : `<span class="data-hj-suppress">${this.name}</span>`;
|
|
81
|
-
},
|
|
82
|
-
loanUse() {
|
|
83
|
-
if (this.anonymizationLevel === "full" || this.use.length === 0)
|
|
84
|
-
return "For the borrower's privacy, this loan has been made anonymous.";
|
|
85
|
-
if (this.hideLoanAmount) {
|
|
86
|
-
const e = this.useIndicativeHelpText ? this.helpLanguage : "Help";
|
|
87
|
-
return `${e.charAt(0).toUpperCase() + e.slice(1)} ${this.nameSpan} ${this.use.charAt(0).toLowerCase() + this.use.slice(1)} ${this.whySpecialSentence}`;
|
|
88
|
-
}
|
|
89
|
-
const t = this.borrowerCount > 1;
|
|
90
|
-
return `${o(this.loanAmount).format("$0,0")} ${this.isDirect ? "to" : this.helpLanguage} ${t ? "a member of " : ""}${this.nameSpan} ${this.isDirect ? `${this.helpLanguage} ` : ""}${this.use.charAt(0).toLowerCase() + this.use.slice(1)}${this.whySpecialSentence}`;
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
}, h = ["innerHTML"];
|
|
94
|
-
function c(t, e, s, d, m, a) {
|
|
95
|
-
return r(), l("p", {
|
|
1
|
+
import o from "./KvLoanUse2.js";
|
|
2
|
+
import { KV_LOAN_USE_FRAGMENT as E } from "./KvLoanUse2.js";
|
|
3
|
+
import { openBlock as r, createElementBlock as n } from "vue";
|
|
4
|
+
import t from "../_virtual/_plugin-vue_export-helper.js";
|
|
5
|
+
const c = ["innerHTML"];
|
|
6
|
+
function s(_, p, a, l, m, e) {
|
|
7
|
+
return r(), n("p", {
|
|
96
8
|
class: "tw-line-clamp-4",
|
|
97
|
-
innerHTML:
|
|
98
|
-
}, null, 8,
|
|
9
|
+
innerHTML: e.loanUse
|
|
10
|
+
}, null, 8, c);
|
|
99
11
|
}
|
|
100
|
-
const
|
|
12
|
+
const u = /* @__PURE__ */ t(o, [["render", s]]);
|
|
101
13
|
export {
|
|
102
|
-
|
|
103
|
-
|
|
14
|
+
E as KV_LOAN_USE_FRAGMENT,
|
|
15
|
+
u as default
|
|
104
16
|
};
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
export declare const KV_LOAN_USE_FRAGMENT: import('graphql').DocumentNode;
|
|
2
|
+
declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
3
|
+
anonymizationLevel: {
|
|
4
|
+
type: StringConstructor;
|
|
5
|
+
default: string;
|
|
6
|
+
};
|
|
7
|
+
use: {
|
|
8
|
+
type: StringConstructor;
|
|
9
|
+
default: string;
|
|
10
|
+
};
|
|
11
|
+
loanAmount: {
|
|
12
|
+
type: StringConstructor;
|
|
13
|
+
default: string;
|
|
14
|
+
};
|
|
15
|
+
status: {
|
|
16
|
+
type: StringConstructor;
|
|
17
|
+
default: string;
|
|
18
|
+
};
|
|
19
|
+
borrowerCount: {
|
|
20
|
+
type: NumberConstructor;
|
|
21
|
+
default: number;
|
|
22
|
+
};
|
|
23
|
+
name: {
|
|
24
|
+
type: StringConstructor;
|
|
25
|
+
default: string;
|
|
26
|
+
};
|
|
27
|
+
distributionModel: {
|
|
28
|
+
type: StringConstructor;
|
|
29
|
+
default: string;
|
|
30
|
+
};
|
|
31
|
+
whySpecial: {
|
|
32
|
+
type: StringConstructor;
|
|
33
|
+
default: string;
|
|
34
|
+
};
|
|
35
|
+
hideLoanAmount: {
|
|
36
|
+
type: BooleanConstructor;
|
|
37
|
+
default: boolean;
|
|
38
|
+
};
|
|
39
|
+
boldName: {
|
|
40
|
+
type: BooleanConstructor;
|
|
41
|
+
default: boolean;
|
|
42
|
+
};
|
|
43
|
+
country: {
|
|
44
|
+
type: StringConstructor;
|
|
45
|
+
default: string;
|
|
46
|
+
};
|
|
47
|
+
useIndicativeHelpText: {
|
|
48
|
+
type: BooleanConstructor;
|
|
49
|
+
default: boolean;
|
|
50
|
+
};
|
|
51
|
+
}>, {}, {}, {
|
|
52
|
+
helpLanguage(): "helps" | "helped";
|
|
53
|
+
isDirect(): boolean;
|
|
54
|
+
whySpecialSentence(): string;
|
|
55
|
+
nameSpan(): string;
|
|
56
|
+
loanUse(): string;
|
|
57
|
+
}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
58
|
+
anonymizationLevel: {
|
|
59
|
+
type: StringConstructor;
|
|
60
|
+
default: string;
|
|
61
|
+
};
|
|
62
|
+
use: {
|
|
63
|
+
type: StringConstructor;
|
|
64
|
+
default: string;
|
|
65
|
+
};
|
|
66
|
+
loanAmount: {
|
|
67
|
+
type: StringConstructor;
|
|
68
|
+
default: string;
|
|
69
|
+
};
|
|
70
|
+
status: {
|
|
71
|
+
type: StringConstructor;
|
|
72
|
+
default: string;
|
|
73
|
+
};
|
|
74
|
+
borrowerCount: {
|
|
75
|
+
type: NumberConstructor;
|
|
76
|
+
default: number;
|
|
77
|
+
};
|
|
78
|
+
name: {
|
|
79
|
+
type: StringConstructor;
|
|
80
|
+
default: string;
|
|
81
|
+
};
|
|
82
|
+
distributionModel: {
|
|
83
|
+
type: StringConstructor;
|
|
84
|
+
default: string;
|
|
85
|
+
};
|
|
86
|
+
whySpecial: {
|
|
87
|
+
type: StringConstructor;
|
|
88
|
+
default: string;
|
|
89
|
+
};
|
|
90
|
+
hideLoanAmount: {
|
|
91
|
+
type: BooleanConstructor;
|
|
92
|
+
default: boolean;
|
|
93
|
+
};
|
|
94
|
+
boldName: {
|
|
95
|
+
type: BooleanConstructor;
|
|
96
|
+
default: boolean;
|
|
97
|
+
};
|
|
98
|
+
country: {
|
|
99
|
+
type: StringConstructor;
|
|
100
|
+
default: string;
|
|
101
|
+
};
|
|
102
|
+
useIndicativeHelpText: {
|
|
103
|
+
type: BooleanConstructor;
|
|
104
|
+
default: boolean;
|
|
105
|
+
};
|
|
106
|
+
}>> & Readonly<{}>, {
|
|
107
|
+
name: string;
|
|
108
|
+
use: string;
|
|
109
|
+
anonymizationLevel: string;
|
|
110
|
+
loanAmount: string;
|
|
111
|
+
status: string;
|
|
112
|
+
borrowerCount: number;
|
|
113
|
+
distributionModel: string;
|
|
114
|
+
whySpecial: string;
|
|
115
|
+
hideLoanAmount: boolean;
|
|
116
|
+
boldName: boolean;
|
|
117
|
+
country: string;
|
|
118
|
+
useIndicativeHelpText: boolean;
|
|
119
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
120
|
+
export default _default;
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import s from "graphql-tag";
|
|
2
|
+
import i from "numeral";
|
|
3
|
+
const t = "direct", l = s`
|
|
4
|
+
fragment KvLoanUse on LoanBasic {
|
|
5
|
+
id
|
|
6
|
+
anonymizationLevel
|
|
7
|
+
use
|
|
8
|
+
loanAmount
|
|
9
|
+
status
|
|
10
|
+
borrowerCount
|
|
11
|
+
name
|
|
12
|
+
distributionModel
|
|
13
|
+
whySpecial
|
|
14
|
+
}
|
|
15
|
+
`, u = {
|
|
16
|
+
name: "KvLoanUse",
|
|
17
|
+
props: {
|
|
18
|
+
anonymizationLevel: {
|
|
19
|
+
type: String,
|
|
20
|
+
default: "none"
|
|
21
|
+
},
|
|
22
|
+
use: {
|
|
23
|
+
type: String,
|
|
24
|
+
default: ""
|
|
25
|
+
},
|
|
26
|
+
loanAmount: {
|
|
27
|
+
type: String,
|
|
28
|
+
default: ""
|
|
29
|
+
},
|
|
30
|
+
status: {
|
|
31
|
+
type: String,
|
|
32
|
+
default: ""
|
|
33
|
+
},
|
|
34
|
+
borrowerCount: {
|
|
35
|
+
type: Number,
|
|
36
|
+
default: 1
|
|
37
|
+
},
|
|
38
|
+
name: {
|
|
39
|
+
type: String,
|
|
40
|
+
default: ""
|
|
41
|
+
},
|
|
42
|
+
distributionModel: {
|
|
43
|
+
type: String,
|
|
44
|
+
default: t
|
|
45
|
+
},
|
|
46
|
+
whySpecial: {
|
|
47
|
+
type: String,
|
|
48
|
+
default: ""
|
|
49
|
+
},
|
|
50
|
+
hideLoanAmount: {
|
|
51
|
+
type: Boolean,
|
|
52
|
+
default: !1
|
|
53
|
+
},
|
|
54
|
+
boldName: {
|
|
55
|
+
type: Boolean,
|
|
56
|
+
default: !1
|
|
57
|
+
},
|
|
58
|
+
country: {
|
|
59
|
+
type: String,
|
|
60
|
+
default: ""
|
|
61
|
+
},
|
|
62
|
+
useIndicativeHelpText: {
|
|
63
|
+
type: Boolean,
|
|
64
|
+
default: !1
|
|
65
|
+
}
|
|
66
|
+
},
|
|
67
|
+
computed: {
|
|
68
|
+
helpLanguage() {
|
|
69
|
+
return this.status === "fundraising" || this.status === "inactive" || this.status === "reviewed" ? "helps" : "helped";
|
|
70
|
+
},
|
|
71
|
+
isDirect() {
|
|
72
|
+
return this.distributionModel === t;
|
|
73
|
+
},
|
|
74
|
+
whySpecialSentence() {
|
|
75
|
+
return this.whySpecial ? ` This loan is special because ${this.whySpecial.charAt(0).toLowerCase() + this.whySpecial.slice(1)}` : "";
|
|
76
|
+
},
|
|
77
|
+
nameSpan() {
|
|
78
|
+
return this.boldName ? this.country ? `<span class="data-hj-suppress tw-font-medium">${this.name} in ${this.country}</span>` : `<span class="data-hj-suppress tw-font-medium">${this.name}</span>` : `<span class="data-hj-suppress">${this.name}</span>`;
|
|
79
|
+
},
|
|
80
|
+
loanUse() {
|
|
81
|
+
if (this.anonymizationLevel === "full" || this.use.length === 0)
|
|
82
|
+
return "For the borrower's privacy, this loan has been made anonymous.";
|
|
83
|
+
if (this.hideLoanAmount) {
|
|
84
|
+
const e = this.useIndicativeHelpText ? this.helpLanguage : "Help";
|
|
85
|
+
return `${e.charAt(0).toUpperCase() + e.slice(1)} ${this.nameSpan} ${this.use.charAt(0).toLowerCase() + this.use.slice(1)} ${this.whySpecialSentence}`;
|
|
86
|
+
}
|
|
87
|
+
const a = this.borrowerCount > 1;
|
|
88
|
+
return `${i(this.loanAmount).format("$0,0")} ${this.isDirect ? "to" : this.helpLanguage} ${a ? "a member of " : ""}${this.nameSpan} ${this.isDirect ? `${this.helpLanguage} ` : ""}${this.use.charAt(0).toLowerCase() + this.use.slice(1)}${this.whySpecialSentence}`;
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
};
|
|
92
|
+
export {
|
|
93
|
+
l as KV_LOAN_USE_FRAGMENT,
|
|
94
|
+
u as default
|
|
95
|
+
};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
declare const _default: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, SVGSVGElement>;
|
|
2
|
+
export default _default;
|