@kiva/kv-components 8.15.0 → 8.16.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.
@@ -1,12 +1,12 @@
1
- import p from "graphql-tag";
1
+ import A from "graphql-tag";
2
2
  import W from "numeral";
3
3
  import { ref as $, computed as o, watch as H } from "vue";
4
4
  import { mdiMapMarker as j, mdiHome as q, mdiLink as z, mdiCached as J } from "@mdi/js";
5
5
  import { LOAN_CALLOUTS_FRAGMENT as Q, LOAN_GEOCODE_FRAGMENT as X, LOAN_PROGRESS_FRAGMENT as Y, loanCardComputedProperties as Z, loanCardMethods as ee } from "../utils/loanCard.js";
6
6
  import { getDropdownPriceArray as te, getLendCtaSelectedOption as ae, isLessThan25 as oe } from "../utils/loanUtils.js";
7
7
  import { computePostGoalLoanCardStatement as ne } from "../utils/postGoalStatement.js";
8
- import re from "./KvLoanUse.js";
9
- import le from "./KvBorrowerImage.js";
8
+ import le from "./KvLoanUse.js";
9
+ import re from "./KvBorrowerImage.js";
10
10
  import ie from "./KvLoanCallouts.js";
11
11
  import se from "./KvLendCta.js";
12
12
  import ue from "./KvLoanProgressGroup.js";
@@ -14,14 +14,14 @@ import de from "./KvLoanTag.js";
14
14
  import me from "./KvMaterialIcon.js";
15
15
  import fe from "./KvLoadingPlaceholder.js";
16
16
  import ce from "./KvLoanTeamPick.js";
17
- import ve from "./KvSelect.js";
18
- import { KV_LEND_CTA_FRAGMENT as Le, KV_LEND_CTA_USER_FRAGMENT as he } from "./KvLendCta2.js";
19
- import { KV_LOAN_TAG_FRAGMENT as ye } from "./KvLoanTag2.js";
20
- import { KV_LOAN_USE_FRAGMENT as ge } from "./KvLoanUse2.js";
17
+ import he from "./KvSelect.js";
18
+ import { KV_LEND_CTA_FRAGMENT as ve, KV_LEND_CTA_USER_FRAGMENT as Le } from "./KvLendCta2.js";
19
+ import { KV_LOAN_TAG_FRAGMENT as ge } from "./KvLoanTag2.js";
20
+ import { KV_LOAN_USE_FRAGMENT as ye } from "./KvLoanUse2.js";
21
21
  const d = {
22
22
  default: "default",
23
23
  postGoal: "post-goal"
24
- }, Ae = (e) => e < 500 && e >= 25, pe = (e) => oe(e) || Ae(e), $e = p`
24
+ }, pe = (e) => e < 500 && e >= 25, Ae = (e) => oe(e) || pe(e), $e = A`
25
25
  fragment KvCompactLoanCard on LoanBasic {
26
26
  id
27
27
  image {
@@ -43,31 +43,31 @@ const d = {
43
43
  ...LoanGeocode
44
44
  ...LoanProgress
45
45
  }
46
- ${Le}
47
- ${ye}
46
+ ${ve}
48
47
  ${ge}
48
+ ${ye}
49
49
  ${Q}
50
50
  ${X}
51
51
  ${Y}
52
- `, He = p`
52
+ `, He = A`
53
53
  fragment KvCompactLoanCardUser on LoanBasic {
54
54
  id
55
55
  ...KvLendCtaUser
56
56
  }
57
- ${he}
57
+ ${Le}
58
58
  `, je = {
59
59
  name: "KvCompactLoanCard",
60
60
  components: {
61
- KvBorrowerImage: le,
61
+ KvBorrowerImage: re,
62
62
  KvLoadingPlaceholder: fe,
63
- KvLoanUse: re,
63
+ KvLoanUse: le,
64
64
  KvMaterialIcon: me,
65
65
  KvLendCta: se,
66
66
  KvLoanTag: de,
67
67
  KvLoanCallouts: ie,
68
68
  KvLoanTeamPick: ce,
69
69
  KvLoanProgressGroup: ue,
70
- KvSelect: ve
70
+ KvSelect: he
71
71
  },
72
72
  props: {
73
73
  variant: {
@@ -206,6 +206,10 @@ const d = {
206
206
  customAmountLent: {
207
207
  type: String,
208
208
  default: "25"
209
+ },
210
+ enableMultiMatching: {
211
+ type: Boolean,
212
+ default: !1
209
213
  }
210
214
  },
211
215
  emits: [
@@ -217,7 +221,7 @@ const d = {
217
221
  "update:selected-amount"
218
222
  ],
219
223
  setup(e, { emit: a }) {
220
- const r = $(""), s = o(
224
+ const n = $(""), s = o(
221
225
  () => e.variant === d.postGoal
222
226
  ), {
223
227
  allDataLoaded: C,
@@ -230,77 +234,77 @@ const d = {
230
234
  hasProgressData: _,
231
235
  imageHash: w,
232
236
  isLoading: B,
233
- loanAmount: v,
234
- loanBorrowerCount: L,
237
+ loanAmount: h,
238
+ loanBorrowerCount: v,
235
239
  loanCallouts: T,
236
- loanStatus: h,
237
- loanUse: y,
240
+ loanStatus: L,
241
+ loanUse: g,
238
242
  readMorePath: k,
239
- state: F,
240
- tag: K,
243
+ state: M,
244
+ tag: F,
241
245
  unreservedAmount: u,
242
- sharesAvailable: R
243
- } = Z(e), { clickReadMore: P } = ee(e, a), M = o(() => s.value ? void 0 : { width: "100px", height: "100px" }), E = o(() => {
246
+ sharesAvailable: K
247
+ } = Z(e), { clickReadMore: R } = ee(e, a), P = o(() => s.value ? void 0 : { width: "100px", height: "100px" }), E = o(() => {
244
248
  if (!e.website)
245
249
  return "";
246
250
  const t = e.website.trim();
247
251
  return t.startsWith("http://") || t.startsWith("https://") ? t : `https://${t}`;
248
252
  }), G = o(() => {
249
253
  if (s.value) return {};
250
- const t = e.showLightView ? "auto" : "6.75rem", n = e.showLightView ? "none" : "6.75rem";
251
- return { height: t, maxHeight: n };
252
- }), l = o(() => {
254
+ const t = e.showLightView ? "auto" : "6.75rem", l = e.showLightView ? "none" : "6.75rem";
255
+ return { height: t, maxHeight: l };
256
+ }), r = o(() => {
253
257
  var t;
254
258
  return ne({
255
259
  anonymizationLevel: (t = e.loan) == null ? void 0 : t.anonymizationLevel,
256
260
  borrowerName: m.value,
257
261
  distributionModel: f.value,
258
262
  formattedLocation: c.value,
259
- loanAmount: v.value,
260
- loanBorrowerCount: L.value,
261
- loanStatus: h.value,
262
- loanUse: y.value
263
+ loanAmount: h.value,
264
+ loanBorrowerCount: v.value,
265
+ loanStatus: L.value,
266
+ loanUse: g.value
263
267
  });
264
- }), O = o(() => l.value.borrowerNameWithCountry), U = o(() => l.value.loanUsePrefixStart), D = o(() => l.value.loanUsePrefixEnd), V = o(() => l.value.statementTitle), I = o(() => l.value.visibleUseStatement), g = o(() => {
268
+ }), O = o(() => r.value.borrowerNameWithCountry), U = o(() => r.value.loanUsePrefixStart), D = o(() => r.value.loanUsePrefixEnd), V = o(() => r.value.statementTitle), I = o(() => r.value.visibleUseStatement), y = o(() => {
265
269
  var i;
266
270
  const t = parseFloat(u.value);
267
271
  if (!t) return [];
268
- const n = t < 25 ? parseFloat(`${((i = e.loan) == null ? void 0 : i.minNoteSize) ?? 25}`) : 25;
272
+ const l = t < 25 ? parseFloat(`${((i = e.loan) == null ? void 0 : i.minNoteSize) ?? 25}`) : 25;
269
273
  return te(
270
274
  u.value,
271
- pe(t),
272
- n,
275
+ Ae(t),
276
+ l,
273
277
  e.enableFiveDollarsNotes,
274
278
  e.isVisitor
275
279
  );
276
280
  });
277
281
  H(
278
- g,
282
+ y,
279
283
  (t) => {
280
- var i, A;
284
+ var i, p;
281
285
  if (!s.value) return;
282
286
  if (!t.length) {
283
- r.value = "";
287
+ n.value = "";
284
288
  return;
285
289
  }
286
- const n = ae(
290
+ const l = ae(
287
291
  e.getCookie,
288
292
  e.setCookie,
289
293
  e.enableFiveDollarsNotes,
290
- (A = (i = e.route) == null ? void 0 : i.query) == null ? void 0 : A.utm_campaign,
294
+ (p = (i = e.route) == null ? void 0 : i.query) == null ? void 0 : p.utm_campaign,
291
295
  u.value,
292
296
  e.userBalance ? parseFloat(e.userBalance) : void 0,
293
297
  e.fiveDollarsSelected
294
298
  );
295
- r.value = t.includes(n) ? n : t[0];
299
+ n.value = t.includes(l) ? l : t[0];
296
300
  },
297
301
  { immediate: !0 }
298
302
  );
299
303
  const x = o(() => e.showLightView ? 3 : 4);
300
304
  return {
301
305
  allDataLoaded: C,
302
- amountOptions: g,
303
- borrowerImageStyle: M,
306
+ amountOptions: y,
307
+ borrowerImageStyle: P,
304
308
  borrowerName: m,
305
309
  borrowerNameWithCountry: O,
306
310
  city: b,
@@ -313,11 +317,11 @@ const d = {
313
317
  imageHash: w,
314
318
  isLoading: B,
315
319
  isPostGoalVariant: s,
316
- loanAmount: v,
317
- loanBorrowerCount: L,
320
+ loanAmount: h,
321
+ loanBorrowerCount: v,
318
322
  loanCallouts: T,
319
- loanStatus: h,
320
- loanUse: y,
323
+ loanStatus: L,
324
+ loanUse: g,
321
325
  loanUsePrefixEnd: D,
322
326
  loanUsePrefixStart: U,
323
327
  mdiMapMarker: j,
@@ -325,16 +329,16 @@ const d = {
325
329
  mdiLink: z,
326
330
  mdiCached: J,
327
331
  readMorePath: k,
328
- state: F,
329
- tag: K,
332
+ state: M,
333
+ tag: F,
330
334
  unreservedAmount: u,
331
- sharesAvailable: R,
332
- selectedAmount: r,
335
+ sharesAvailable: K,
336
+ selectedAmount: n,
333
337
  statementTitle: V,
334
338
  customStyle: G,
335
339
  loanUseLoadingRows: x,
336
340
  visibleUseStatement: I,
337
- clickReadMore: P,
341
+ clickReadMore: R,
338
342
  trackWebsiteClick: () => {
339
343
  e.kvTrackFunction(
340
344
  "Lending",
@@ -347,12 +351,12 @@ const d = {
347
351
  a("refresh-button", t);
348
352
  },
349
353
  handleSelectedAmount: (t) => {
350
- var n;
351
- r.value = t, a("update:selected-amount", t), e.kvTrackFunction(
354
+ var l;
355
+ n.value = t, a("update:selected-amount", t), e.kvTrackFunction(
352
356
  "Lending",
353
357
  "Modify lend amount",
354
358
  t,
355
- e.loanId ?? ((n = e.loan) == null ? void 0 : n.id)
359
+ e.loanId ?? ((l = e.loan) == null ? void 0 : l.id)
356
360
  );
357
361
  }
358
362
  };
@@ -363,13 +367,17 @@ const d = {
363
367
  return ((a = (e = this.loan) == null ? void 0 : e.lenders) == null ? void 0 : a.totalCount) ?? 0;
364
368
  },
365
369
  amountLent() {
366
- var a, r;
367
- const e = ((r = (a = this.loan) == null ? void 0 : a.loanFundraisingInfo) == null ? void 0 : r.fundedAmount) ?? 0;
370
+ var a, n;
371
+ const e = ((n = (a = this.loan) == null ? void 0 : a.loanFundraisingInfo) == null ? void 0 : n.fundedAmount) ?? 0;
368
372
  return W(e).format("$0,0");
369
373
  },
370
374
  isInBasket() {
371
375
  var e;
372
376
  return ((e = this.basketItems) == null ? void 0 : e.some((a) => a.__typename === "LoanReservation" && a.id === this.loanId)) ?? !1;
377
+ },
378
+ hasMatchingInfo() {
379
+ var e, a, n;
380
+ return !!((e = this.loan) != null && e.matchingText) || this.enableMultiMatching && (((n = (a = this.loan) == null ? void 0 : a.multiMatching) == null ? void 0 : n.length) ?? 0) > 0;
373
381
  }
374
382
  }
375
383
  };
@@ -1 +1 @@
1
- .loan-callouts[data-v-fa784de7] span{background-color:transparent!important;--tw-text-opacity: 1;color:rgba(var(--text-action),var(--tw-text-opacity, 1))}.loan-card-use[data-v-fa784de7]:hover,.loan-card-use[data-v-fa784de7]:focus{--tw-text-opacity: 1;color:rgba(var(--text-primary),var(--tw-text-opacity, 1))}.loan-card-active-hover:hover .loan-card-use[data-v-fa784de7],.loan-card-active-hover:hover .loan-card-name[data-v-fa784de7]{text-decoration-line:underline}.loan-card-progress[data-v-fa784de7],.loan-card-progress[data-v-fa784de7]:hover,.loan-card-progress[data-v-fa784de7]:focus{text-decoration-line:none}.loan-card-name[data-v-fa784de7]{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:1;cursor:pointer;overflow:hidden;text-overflow:ellipsis;padding-left:1.5rem;padding-right:1.5rem;padding-top:.5rem}.loan-bookmark[data-v-fa784de7] button{border-top-left-radius:0!important;border-top-right-radius:0!important}
1
+ .loan-callouts[data-v-03fddb4a] span{background-color:transparent!important;--tw-text-opacity: 1;color:rgba(var(--text-action),var(--tw-text-opacity, 1))}.loan-card-use[data-v-03fddb4a]:hover,.loan-card-use[data-v-03fddb4a]:focus{--tw-text-opacity: 1;color:rgba(var(--text-primary),var(--tw-text-opacity, 1))}.loan-card-active-hover:hover .loan-card-use[data-v-03fddb4a],.loan-card-active-hover:hover .loan-card-name[data-v-03fddb4a]{text-decoration-line:underline}.loan-card-progress[data-v-03fddb4a],.loan-card-progress[data-v-03fddb4a]:hover,.loan-card-progress[data-v-03fddb4a]:focus{text-decoration-line:none}.loan-card-name[data-v-03fddb4a]{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:1;cursor:pointer;overflow:hidden;text-overflow:ellipsis;padding-left:1.5rem;padding-right:1.5rem;padding-top:.5rem}.loan-bookmark[data-v-03fddb4a] button{border-top-left-radius:0!important;border-top-right-radius:0!important}
@@ -1,6 +1,6 @@
1
1
  import N from "./KvIntroductionLoanCard2.js";
2
2
  import { KV_INTRODUCTION_LOAN_CARD_FRAGMENT as tt, KV_INTRODUCTION_LOAN_CARD_USER_FRAGMENT as et } from "./KvIntroductionLoanCard2.js";
3
- import { resolveComponent as s, openBlock as e, createElementBlock as n, normalizeClass as _, normalizeStyle as P, createElementVNode as i, createBlock as o, resolveDynamicComponent as g, withCtx as w, createVNode as d, Suspense as p, toDisplayString as f, createCommentVNode as m, Fragment as R, renderList as A } from "vue";
3
+ import { resolveComponent as s, openBlock as e, createElementBlock as n, normalizeClass as _, normalizeStyle as P, createElementVNode as i, createBlock as o, resolveDynamicComponent as g, withCtx as w, createVNode as d, Suspense as R, toDisplayString as f, createCommentVNode as m, Fragment as p, renderList as A } from "vue";
4
4
  import "./KvIntroductionLoanCard.css";
5
5
  import B from "../_virtual/_plugin-vue_export-helper.js";
6
6
  const D = { class: "tw-grow" }, T = { class: "loan-card-active-hover" }, z = {
@@ -26,7 +26,7 @@ const D = { class: "tw-grow" }, T = { class: "loan-card-active-hover" }, z = {
26
26
  style: { "font-weight": "bold", "font-size": "13px", "border-radius": "8px" }
27
27
  };
28
28
  function G(k, a, c, t, H, h) {
29
- const l = s("kv-loading-placeholder"), u = s("kv-borrower-image"), y = s("kv-flag"), b = s("kv-loan-bookmark"), v = s("kv-loan-callouts"), x = s("kv-loan-use"), C = s("kv-loan-progress-group"), L = s("kv-loan-tag");
29
+ const l = s("kv-loading-placeholder"), u = s("kv-borrower-image"), y = s("kv-flag"), b = s("kv-loan-bookmark"), v = s("kv-loan-callouts"), x = s("kv-loan-use"), C = s("kv-loan-progress-group"), M = s("kv-loan-tag");
30
30
  return e(), n("div", {
31
31
  class: _(["tw-flex tw-flex-col tw-bg-white tw-rounded tw-w-full tw-pb-2", { "tw-pointer-events-none": t.isLoading }]),
32
32
  "data-testid": "loan-card",
@@ -58,7 +58,7 @@ function G(k, a, c, t, H, h) {
58
58
  }, null, 8, ["alt", "aspect-ratio", "default-image", "hash", "images", "photo-path"]),
59
59
  t.countryName ? (e(), n("div", I, [
60
60
  i("p", F, [
61
- (e(), o(p, null, {
61
+ (e(), o(R, null, {
62
62
  default: w(() => [
63
63
  d(y, {
64
64
  class: "tw-ml-0.5 tw-mr-1",
@@ -150,8 +150,8 @@ function G(k, a, c, t, H, h) {
150
150
  class: _(["tw-pt-0.5 tw-px-2", { "tw-mb-1.5": !t.isLoading }])
151
151
  }, [
152
152
  t.isLoading ? (e(), n("div", V, [
153
- (e(!0), n(R, null, A([...Array(3)], (r, M) => (e(), n("div", {
154
- key: M,
153
+ (e(!0), n(p, null, A([...Array(3)], (r, L) => (e(), n("div", {
154
+ key: L,
155
155
  class: "tw-h-2 tw-mb-1"
156
156
  }, [
157
157
  d(l)
@@ -216,17 +216,18 @@ function G(k, a, c, t, H, h) {
216
216
  key: 1,
217
217
  class: "tw-rounded tw-mx-auto tw-mt-2",
218
218
  style: { width: "9rem", height: "1rem" }
219
- })) : h.isFunded ? (e(), n("div", K, " 🎉 Fully funded! ")) : (e(), o(L, {
219
+ })) : h.isFunded ? (e(), n("div", K, " 🎉 Fully funded! ")) : (e(), o(M, {
220
220
  key: 3,
221
221
  loan: c.loan,
222
222
  "use-expanded-styles": !0,
223
+ "enable-multi-matching": c.enableMultiMatching,
223
224
  style: { "font-size": "15px" },
224
225
  class: "tw-text-center tw-pt-2"
225
- }, null, 8, ["loan"]))
226
+ }, null, 8, ["loan", "enable-multi-matching"]))
226
227
  ])
227
228
  ], 6);
228
229
  }
229
- const Y = /* @__PURE__ */ B(N, [["render", G], ["__scopeId", "data-v-fa784de7"]]);
230
+ const Y = /* @__PURE__ */ B(N, [["render", G], ["__scopeId", "data-v-03fddb4a"]]);
230
231
  export {
231
232
  tt as KV_INTRODUCTION_LOAN_CARD_FRAGMENT,
232
233
  et as KV_INTRODUCTION_LOAN_CARD_USER_FRAGMENT,
@@ -57,6 +57,10 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
57
57
  type: StringConstructor;
58
58
  default: string;
59
59
  };
60
+ enableMultiMatching: {
61
+ type: BooleanConstructor;
62
+ default: boolean;
63
+ };
60
64
  }>, {
61
65
  allDataLoaded: import('vue').ComputedRef<boolean>;
62
66
  borrowerName: import('vue').ComputedRef<any>;
@@ -149,6 +153,10 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
149
153
  type: StringConstructor;
150
154
  default: string;
151
155
  };
156
+ enableMultiMatching: {
157
+ type: BooleanConstructor;
158
+ default: boolean;
159
+ };
152
160
  }>> & Readonly<{}>, {
153
161
  loan: Record<string, any>;
154
162
  externalLinks: boolean;
@@ -160,6 +168,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
160
168
  route: Record<string, any>;
161
169
  isVisitor: boolean;
162
170
  isBookmarked: boolean;
171
+ enableMultiMatching: boolean;
163
172
  errorMsg: string;
164
173
  useFullWidth: boolean;
165
174
  }, {}, {
@@ -490,10 +499,17 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
490
499
  type: BooleanConstructor;
491
500
  default: boolean;
492
501
  };
502
+ enableMultiMatching: {
503
+ type: BooleanConstructor;
504
+ default: boolean;
505
+ };
493
506
  }>, {}, {}, {
494
507
  deadline(): Date;
495
508
  isLseLoan(): any;
496
509
  amountLeft(): any;
510
+ multiMatchingOrgs(): any;
511
+ isMultipleMatch(): boolean;
512
+ totalMatchRatio(): any;
497
513
  variation(): string;
498
514
  tagText(): string;
499
515
  tagColor(): "#AF741C" | "#CE2626" | "#2B7C5F" | "#CE4A00";
@@ -507,8 +523,13 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
507
523
  type: BooleanConstructor;
508
524
  default: boolean;
509
525
  };
526
+ enableMultiMatching: {
527
+ type: BooleanConstructor;
528
+ default: boolean;
529
+ };
510
530
  }>> & Readonly<{}>, {
511
531
  useExpandedStyles: boolean;
532
+ enableMultiMatching: boolean;
512
533
  }, {}, {
513
534
  KvCountdownTimer: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
514
535
  deadline: {
@@ -524,6 +545,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
524
545
  required: true;
525
546
  };
526
547
  }>> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
548
+ KvTooltip: import('vue').DefineSetupFnComponent<Record<string, any>, {}, {}, Record<string, any> & {}, import('vue').PublicProps>;
527
549
  }, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
528
550
  KvLoanCallouts: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
529
551
  callouts: {
@@ -1,12 +1,12 @@
1
1
  import a from "graphql-tag";
2
- import F from "numeral";
3
- import { LOAN_CALLOUTS_FRAGMENT as M, LOAN_GEOCODE_FRAGMENT as T, LOAN_PROGRESS_FRAGMENT as B, loanCardComputedProperties as k, loanCardMethods as E } from "../utils/loanCard.js";
2
+ import R from "numeral";
3
+ import { LOAN_CALLOUTS_FRAGMENT as F, LOAN_GEOCODE_FRAGMENT as T, LOAN_PROGRESS_FRAGMENT as B, loanCardComputedProperties as k, loanCardMethods as E } from "../utils/loanCard.js";
4
4
  import G from "./KvLoanBookmark.js";
5
5
  import I from "./KvLoanUse.js";
6
6
  import S from "./KvBorrowerImage.js";
7
- import D from "./KvLoanProgressGroup.js";
8
- import P from "./KvLoanCallouts.js";
9
- import b from "./KvLoanTag.js";
7
+ import b from "./KvLoanProgressGroup.js";
8
+ import D from "./KvLoanCallouts.js";
9
+ import P from "./KvLoanTag.js";
10
10
  import U from "./KvMaterialIcon.js";
11
11
  import $ from "./KvLoadingPlaceholder.js";
12
12
  import w from "./KvFlag.js";
@@ -39,7 +39,7 @@ const no = a`
39
39
  ${r}
40
40
  ${V}
41
41
  ${W}
42
- ${M}
42
+ ${F}
43
43
  ${T}
44
44
  ${B}
45
45
  `, io = a`
@@ -54,10 +54,10 @@ const no = a`
54
54
  KvBorrowerImage: S,
55
55
  KvLoadingPlaceholder: $,
56
56
  KvLoanUse: I,
57
- KvLoanProgressGroup: D,
57
+ KvLoanProgressGroup: b,
58
58
  KvMaterialIcon: U,
59
- KvLoanTag: b,
60
- KvLoanCallouts: P,
59
+ KvLoanTag: P,
60
+ KvLoanCallouts: D,
61
61
  KvFlag: w,
62
62
  KvLoanBookmark: G
63
63
  },
@@ -117,6 +117,10 @@ const no = a`
117
117
  customHref: {
118
118
  type: String,
119
119
  default: ""
120
+ },
121
+ enableMultiMatching: {
122
+ type: Boolean,
123
+ default: !1
120
124
  }
121
125
  },
122
126
  setup(o, { emit: e }) {
@@ -135,16 +139,16 @@ const no = a`
135
139
  loanAmount: L,
136
140
  loanBorrowerCount: g,
137
141
  loanCallouts: A,
138
- loanStatus: N,
139
- loanUse: h,
142
+ loanStatus: h,
143
+ loanUse: N,
140
144
  mdiMapMarker: _,
141
145
  readMorePath: K,
142
146
  state: v,
143
- tag: C,
144
- unreservedAmount: O,
145
- sharesAvailable: y
147
+ tag: y,
148
+ unreservedAmount: C,
149
+ sharesAvailable: O
146
150
  } = k(o, !0), {
147
- clickReadMore: R
151
+ clickReadMore: M
148
152
  } = E(o, e);
149
153
  return {
150
154
  allDataLoaded: t,
@@ -161,15 +165,15 @@ const no = a`
161
165
  loanAmount: L,
162
166
  loanBorrowerCount: g,
163
167
  loanCallouts: A,
164
- loanStatus: N,
165
- loanUse: h,
168
+ loanStatus: h,
169
+ loanUse: N,
166
170
  mdiMapMarker: _,
167
171
  readMorePath: K,
168
172
  state: v,
169
- tag: C,
170
- unreservedAmount: O,
171
- sharesAvailable: y,
172
- clickReadMore: R
173
+ tag: y,
174
+ unreservedAmount: C,
175
+ sharesAvailable: O,
176
+ clickReadMore: M
173
177
  };
174
178
  },
175
179
  computed: {
@@ -194,7 +198,7 @@ const no = a`
194
198
  amountLent() {
195
199
  var e, t;
196
200
  const o = ((t = (e = this.loan) == null ? void 0 : e.loanFundraisingInfo) == null ? void 0 : t.fundedAmount) ?? 0;
197
- return F(o).format("$0,0");
201
+ return R(o).format("$0,0");
198
202
  },
199
203
  isFunded() {
200
204
  var o;
@@ -1,23 +1,44 @@
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";
4
- import _ from "../_virtual/_plugin-vue_export-helper.js";
5
- function p(s, f, u, k, v, e) {
6
- const r = a("kv-countdown-timer");
7
- return e.variation ? (t(), c("div", {
1
+ import u from "./KvLoanTag2.js";
2
+ import { KV_LOAN_TAG_FRAGMENT as O } from "./KvLoanTag2.js";
3
+ import { resolveComponent as c, openBlock as e, createElementBlock as a, normalizeClass as _, normalizeStyle as g, Fragment as o, createTextVNode as i, toDisplayString as n, createElementVNode as h, createVNode as x, withCtx as f, renderList as k, createBlock as w, createCommentVNode as m } from "vue";
4
+ import p from "../_virtual/_plugin-vue_export-helper.js";
5
+ const y = ["id"];
6
+ function v(M, T, l, N, C, t) {
7
+ const d = c("kv-tooltip"), s = c("kv-countdown-timer");
8
+ return t.variation ? (e(), a("div", {
8
9
  key: 0,
9
- class: "tw-text-small tw-font-medium tw-pt-0.5 tw-line-clamp-1",
10
- style: l({ color: e.tagColor })
10
+ class: _(["tw-text-small tw-font-medium tw-pt-0.5", { "tw-line-clamp-1": !t.isMultipleMatch }]),
11
+ style: g({ color: t.tagColor })
11
12
  }, [
12
- m(d(e.tagText) + " ", 1),
13
- e.variation === "ending-soon" ? (t(), i(r, {
14
- key: 0,
15
- deadline: e.deadline
16
- }, null, 8, ["deadline"])) : o("", !0)
17
- ], 4)) : o("", !0);
13
+ t.isMultipleMatch ? (e(), a(o, { key: 0 }, [
14
+ i(n(t.totalMatchRatio) + "x match by ", 1),
15
+ h("span", {
16
+ id: `matching-orgs-${l.loan.id}`,
17
+ class: "tw-underline tw-decoration-dotted tw-cursor-pointer"
18
+ }, n(t.multiMatchingOrgs.length) + " organizations", 9, y),
19
+ x(d, {
20
+ controller: `matching-orgs-${l.loan.id}`,
21
+ theme: "default"
22
+ }, {
23
+ default: f(() => [
24
+ (e(!0), a(o, null, k(t.multiMatchingOrgs, (r) => (e(), a("p", {
25
+ key: r.matchingText,
26
+ class: "tw-m-0"
27
+ }, n(r.matchRatio + 1) + "x matching by " + n(r.matchingText), 1))), 128))
28
+ ]),
29
+ _: 1
30
+ }, 8, ["controller"])
31
+ ], 64)) : (e(), a(o, { key: 1 }, [
32
+ i(n(t.tagText) + " ", 1),
33
+ t.variation === "ending-soon" ? (e(), w(s, {
34
+ key: 0,
35
+ deadline: t.deadline
36
+ }, null, 8, ["deadline"])) : m("", !0)
37
+ ], 64))
38
+ ], 6)) : m("", !0);
18
39
  }
19
- const y = /* @__PURE__ */ _(n, [["render", p]]);
40
+ const B = /* @__PURE__ */ p(u, [["render", v]]);
20
41
  export {
21
- A as KV_LOAN_TAG_FRAGMENT,
22
- y as default
42
+ O as KV_LOAN_TAG_FRAGMENT,
43
+ B as default
23
44
  };
@@ -8,10 +8,17 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
8
8
  type: BooleanConstructor;
9
9
  default: boolean;
10
10
  };
11
+ enableMultiMatching: {
12
+ type: BooleanConstructor;
13
+ default: boolean;
14
+ };
11
15
  }>, {}, {}, {
12
16
  deadline(): Date;
13
17
  isLseLoan(): any;
14
18
  amountLeft(): any;
19
+ multiMatchingOrgs(): any;
20
+ isMultipleMatch(): boolean;
21
+ totalMatchRatio(): any;
15
22
  variation(): string;
16
23
  tagText(): string;
17
24
  tagColor(): "#AF741C" | "#CE2626" | "#2B7C5F" | "#CE4A00";
@@ -25,8 +32,13 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
25
32
  type: BooleanConstructor;
26
33
  default: boolean;
27
34
  };
35
+ enableMultiMatching: {
36
+ type: BooleanConstructor;
37
+ default: boolean;
38
+ };
28
39
  }>> & Readonly<{}>, {
29
40
  useExpandedStyles: boolean;
41
+ enableMultiMatching: boolean;
30
42
  }, {}, {
31
43
  KvCountdownTimer: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
32
44
  deadline: {
@@ -42,5 +54,6 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
42
54
  required: true;
43
55
  };
44
56
  }>> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
57
+ KvTooltip: import('vue').DefineSetupFnComponent<Record<string, any>, {}, {}, Record<string, any> & {}, import('vue').PublicProps>;
45
58
  }, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
46
59
  export default _default;