Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: declare component events that can be emitted MP-873 MP-901 #5577

Merged
merged 4 commits into from
Oct 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/components/15Years/15YearsButton.vue
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ export default {
}
return h(this.tag, options, this.$slots.default());
},
emits: ['click'],
props: {
to: {
type: String,
Expand Down
1 change: 1 addition & 0 deletions src/components/15Years/15YearsGlobe.vue
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ export default {
components: {
FifteenYearsGlobeCTA,
},
emits: ['selectcountry', 'pan'],
data() {
return {
ctaVisible: false,
Expand Down
1 change: 1 addition & 0 deletions src/components/15Years/15YearsIndividualsProfile.vue
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ export default {
components: {
FifteenYearsButton,
},
emits: ['show-full-profile', 'show-next-person'],
props: {
expanded: {
type: Boolean,
Expand Down
1 change: 1 addition & 0 deletions src/components/15Years/15YearsLightbox.vue
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ export default {
isShown: false
};
},
emits: ['lightbox-closed'],
props: {
visible: {
type: Boolean,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ export default {
},
inject: ['apollo'],
mixins: [braintreeDropInError],
emits: ['complete-transaction', 'no-update'],
props: {
amount: {
type: Number,
Expand Down
1 change: 1 addition & 0 deletions src/components/BorrowerProfile/DescriptionListItem.vue
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
<script>
export default {
name: 'DescriptionListItem',
emits: ['show-definition'],
props: {
term: {
type: String,
Expand Down
1 change: 1 addition & 0 deletions src/components/BorrowerProfile/FieldPartnerDetails.vue
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ export default {
mdiStarHalfFull,
};
},
emits: ['show-definition'],
props: {
partnerId: { // Partner.id
type: Number,
Expand Down
1 change: 1 addition & 0 deletions src/components/BorrowerProfile/JournalUpdates.vue
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ export default {
UpdateDetails
},
inject: ['apollo', 'cookieStore'],
emits: ['hide-section'],
props: {
loanId: {
type: Number,
Expand Down
1 change: 1 addition & 0 deletions src/components/BorrowerProfile/LendersAndTeams.vue
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,7 @@ export default {
SupporterDetails,
},
inject: ['apollo', 'cookieStore'],
emits: ['hide-section'],
props: {
displayType: {
type: String,
Expand Down
1 change: 1 addition & 0 deletions src/components/BorrowerProfile/LoanDetails.vue
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ export default {
components: {
DescriptionListItem,
},
emits: ['show-definition'],
props: {
partnerName: { // LoanPartner.partnerName
type: String,
Expand Down
1 change: 1 addition & 0 deletions src/components/BorrowerProfile/TrusteeDetails.vue
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ export default {
DescriptionListItem,
KvTextLink,
},
emits: ['show-definition'],
props: {
borrowerName: {
type: String,
Expand Down
6 changes: 6 additions & 0 deletions src/components/Checkout/BasketItem.vue
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,12 @@ export default {
TeamAttribution
},
inject: ['apollo', 'cookieStore'],
emits: [
'refreshtotals',
'updating-totals',
'jump-to-loans',
'validateprecheckout',
],
props: {
disableRedirects: {
type: Boolean,
Expand Down
6 changes: 6 additions & 0 deletions src/components/Checkout/BasketItemsList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,12 @@ import { userUsLoanCheckout } from '#src/util/optimizelyUserMetrics';

export default {
name: 'BasketItemsList',
emits: [
'refreshtotals',
'updating-totals',
'jump-to-loans',
'validateprecheckout',
],
props: {
disableRedirects: {
type: Boolean,
Expand Down
1 change: 1 addition & 0 deletions src/components/Checkout/CheckoutDropInPaymentWrapper.vue
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,7 @@ export default {
},
inject: ['apollo', 'cookieStore'],
mixins: [checkoutUtils, braintreeDropInError],
emits: ['complete-transaction', 'updating-totals', 'refreshtotals', 'opt-in'],
props: {
amount: {
type: String,
Expand Down
1 change: 1 addition & 0 deletions src/components/Checkout/CheckoutHolidayPromo.vue
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ export default {
KvIcon,
},
inject: ['apollo'],
emits: ['updating-totals'],
methods: {
addOnePrintKivaCard() {
this.$emit('updating-totals', true);
Expand Down
1 change: 1 addition & 0 deletions src/components/Checkout/DepositIncentiveUpsell.vue
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ const upsellLoansQuery = gql`query upsellLoansQuery(
export default {
name: 'DepositIncentiveUpsell',
inject: ['apollo'],
emits: ['adding-loan', 'done-adding'],
props: {
maxLoans: {
type: Number,
Expand Down
1 change: 1 addition & 0 deletions src/components/Checkout/DonateRepaymentsToggle.vue
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ export default {
KvLightbox,
},
inject: ['apollo'],
emits: ['updating-totals', 'refreshtotals'],
data() {
return {
donateRepayments: false,
Expand Down
1 change: 1 addition & 0 deletions src/components/Checkout/DonationItem.vue
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,7 @@ export default {
HowKivaUsesDonation,
},
inject: ['apollo', 'cookieStore'],
emits: ['refreshtotals', 'updating-totals'],
props: {
donation: {
type: Object,
Expand Down
1 change: 1 addition & 0 deletions src/components/Checkout/EmptyBasketCarousel.vue
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ export default {
KvCarousel,
KvClassicLoanCardContainer
},
emits: ['updating-totals', 'refreshtotals'],
props: {
enableFiveDollarsNotes: {
type: Boolean,
Expand Down
6 changes: 6 additions & 0 deletions src/components/Checkout/InContext/InContextCheckout.vue
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,12 @@ export default {
mixins: [
checkoutUtils
],
emits: [
'complete-transaction',
'checkout-failure',
'refreshtotals',
'updating-totals'
],
props: {
isLoggedIn: {
type: Boolean,
Expand Down
1 change: 1 addition & 0 deletions src/components/Checkout/KivaCardItem.vue
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,7 @@ export default {
LoanPrice,
RemoveBasketItem,
},
emits: ['refreshtotals', 'updating-totals'],
props: {
kivaCard: {
type: Object,
Expand Down
1 change: 1 addition & 0 deletions src/components/Checkout/KivaCardRedemption.vue
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,7 @@ export default {
KvTextInput,
},
inject: ['apollo'],
emits: ['updating-totals', 'refreshtotals'],
props: {
credits: {
type: Array,
Expand Down
6 changes: 6 additions & 0 deletions src/components/Checkout/KivaCreditGuestPayment.vue
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,12 @@ export default {
mixins: [
checkoutUtils,
],
emits: [
'complete-transaction',
'checkout-failure',
'refreshtotals',
'updating-totals',
],
props: {
managedAccountId: {
type: String,
Expand Down
6 changes: 6 additions & 0 deletions src/components/Checkout/KivaCreditPayment.vue
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,12 @@ export default {
mixins: [
checkoutUtils
],
emits: [
'complete-transaction',
'checkout-failure',
'refreshtotals',
'updating-totals'
],
props: {
useAsyncCheckout: {
type: Boolean,
Expand Down
1 change: 1 addition & 0 deletions src/components/Checkout/LoanPrice.vue
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ export default {
RemoveBasketItem,
},
inject: ['apollo'],
emits: ['refreshtotals', 'updating-totals'],
props: {
price: {
type: String,
Expand Down
5 changes: 5 additions & 0 deletions src/components/Checkout/OrderTotals.vue
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,11 @@ export default {
KvMaterialIcon
},
inject: ['apollo', 'cookieStore'],
emits: [
'refreshtotals',
'updating-totals',
'credit-removed'
],
props: {
totals: {
type: Object,
Expand Down
1 change: 1 addition & 0 deletions src/components/Checkout/RemoveBasketItem.vue
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ export default {
KvMaterialIcon,
},
inject: ['apollo'],
emits: ['updating-totals', 'refreshtotals'],
props: {
loanId: {
type: Number,
Expand Down
1 change: 1 addition & 0 deletions src/components/Checkout/TeamAttribution.vue
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ import KvSelect from '@kiva/kv-components/vue/KvSelect';

export default {
name: 'TeamAttribution',
emits: ['refresh-totals', 'updating-totals'],
props: {
teams: {
type: Array,
Expand Down
1 change: 1 addition & 0 deletions src/components/Checkout/VerifyRemovePromoCredit.vue
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ export default {
KvButton,
KvLightbox,
},
emits: ['credit-removed', 'promo-opt-out-lightbox-closed', 'updating-totals'],
props: {
activeCreditType: {
type: String,
Expand Down
1 change: 1 addition & 0 deletions src/components/CorporateCampaign/CampaignHero.vue
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ export default {
components: {
KvUiButton,
},
emits: ['jump-to-loans', 'add-to-basket'],
props: {
heroAreaContent: {
type: Object,
Expand Down
1 change: 1 addition & 0 deletions src/components/CorporateCampaign/CampaignJoinTeamForm.vue
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ export default {
KvLightbox,
KvLoadingOverlay,
},
emits: ['team-process-complete'],
props: {
promoId: {
type: Number,
Expand Down
8 changes: 8 additions & 0 deletions src/components/CorporateCampaign/CampaignLoanGridDisplay.vue
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,14 @@ export default {
KvPagination,
KivaClassicBasicLoanCard,
},
emits: [
'add-to-basket',
'remove-loan-from-basket',
'reset-loan-filters',
'show-basket',
'show-loan-details',
'update-total-count',
],
props: {
checkoutVisible: {
type: Boolean,
Expand Down
9 changes: 9 additions & 0 deletions src/components/CorporateCampaign/CampaignLoanRow.vue
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,15 @@ export default {
KvLoadingSpinner,
KivaClassicBasicLoanCard
},
emits: [
'add-to-basket',
'remove-loan-from-basket',
'reset-loan-filters',
'show-basket',
'show-loan-details',
'update-available-loans',
'update-total-count'
],
props: {
filters: {
type: Object,
Expand Down
1 change: 1 addition & 0 deletions src/components/CorporateCampaign/CampaignProgressBar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ export default {
KvUiButton,
KvGrid
},
emits: ['show-basket'],
props: {
promoAmount: {
type: String,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ export default {
KvLightbox,
KvButton,
},
emits: ['verification-complete', 'campaign-verification-opt-out'],
props: {
formId: {
type: String,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ export default {
mixins: [
anyOrSelectedAutolendingFilter
],
emits: ['updated-filters'],
props: {
allAttributes: {
type: Array,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ export default {
components: {
KvRadio
},
emits: ['gender-updated'],
props: {
selectedGender: {
type: String,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -305,6 +305,12 @@ export default {
SortOrder,
TagFilter
},
emits: [
'updated-filters',
'updated-sort-by',
'reset-loan-filters',
'set-loan-display'
],
props: {
activeLoanDisplay: {
type: String,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ export default {
mixins: [
anyOrSelectedAutolendingFilter
],
emits: ['updated-filters'],
props: {
allCountries: {
type: Array,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ export default {
mixins: [
anyOrSelectedAutolendingFilter
],
emits: ['updated-filters'],
props: {
allSectors: {
type: Array,
Expand Down
1 change: 1 addition & 0 deletions src/components/CorporateCampaign/LoanSearch/SortOrder.vue
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ export default {
components: {
KvRadio
},
emits: ['sort-order-updated'],
props: {
selectedSort: {
type: String,
Expand Down
1 change: 1 addition & 0 deletions src/components/CorporateCampaign/LoanSearch/TagFilter.vue
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ export default {
mixins: [
anyOrSelectedAutolendingFilter
],
emits: ['updated-filters'],
props: {
allTags: {
type: Array,
Expand Down
1 change: 1 addition & 0 deletions src/components/Forms/MonthlyGoodUpdateForm.vue
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,7 @@ export default {
};
},
setup() { return { v$: useVuelidate() }; },
emits: ['form-update'],
props: {
/**
* Should all inputs on the form be disabled
Expand Down
Loading
Loading