@kiva/kv-components 6.13.2 → 6.14.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.
@@ -1,27 +1,46 @@
1
+ import C from "graphql-tag";
1
2
  import { mdiChevronRight as x } from "@mdi/js";
2
- import { getLendCtaSelectedOption as B, getDropdownPriceArray as _ } from "../utils/loanUtils.js";
3
- import D from "./KvLendAmountButton.js";
4
- import P from "./KvSelect.js";
5
- import S from "./KvButton.js";
3
+ import { getLendCtaSelectedOption as B, getDropdownPriceArray as D } from "../utils/loanUtils.js";
4
+ import P from "./KvLendAmountButton.js";
5
+ import S from "./KvSelect.js";
6
+ import F from "./KvButton.js";
6
7
  import I from "./KvMaterialIcon.js";
7
- import F from "./KvCartPill.js";
8
- import { resolveComponent as y, openBlock as i, createElementBlock as l, createBlock as a, withCtx as r, createElementVNode as u, createCommentVNode as d, normalizeClass as h, createTextVNode as w, toDisplayString as f, createVNode as O, withModifiers as v, Fragment as p, renderList as L } from "vue";
8
+ import N from "./KvCartPill.js";
9
+ import { resolveComponent as y, openBlock as i, createElementBlock as l, createBlock as a, withCtx as r, createElementVNode as u, createCommentVNode as d, normalizeClass as h, createTextVNode as f, toDisplayString as w, createVNode as V, withModifiers as A, Fragment as g, renderList as p } from "vue";
9
10
  import "./KvLendCta.css";
10
- import V from "../_virtual/_plugin-vue_export-helper.js";
11
- const k = "Other", N = {
11
+ import O from "../_virtual/_plugin-vue_export-helper.js";
12
+ const k = "Other", oe = C`
13
+ fragment KvLendCta on LoanBasic {
14
+ id
15
+ name
16
+ status
17
+ minNoteSize
18
+ }
19
+ `, ie = C`
20
+ fragment KvLendCtaUser on LoanBasic {
21
+ id
22
+ userProperties {
23
+ lentTo
24
+ }
25
+ }
26
+ `, M = {
12
27
  name: "KvLendCta",
13
28
  components: {
14
- KvLendAmountButton: D,
15
- KvUiButton: S,
16
- KvUiSelect: P,
29
+ KvLendAmountButton: P,
30
+ KvUiButton: F,
31
+ KvUiSelect: S,
17
32
  KvMaterialIcon: I,
18
- KvCartPill: F
33
+ KvCartPill: N
19
34
  },
20
35
  props: {
21
36
  loan: {
22
37
  type: Object,
23
38
  default: () => ({})
24
39
  },
40
+ unreservedAmount: {
41
+ type: String,
42
+ default: ""
43
+ },
25
44
  basketItems: {
26
45
  type: Array,
27
46
  default: () => []
@@ -108,7 +127,7 @@ const k = "Other", N = {
108
127
  }
109
128
  },
110
129
  data() {
111
- var e, s, n;
130
+ var e, n;
112
131
  return {
113
132
  mdiChevronRight: x,
114
133
  defaultAmountOptions: [25, 50, 75],
@@ -116,8 +135,8 @@ const k = "Other", N = {
116
135
  this.getCookie,
117
136
  this.setCookie,
118
137
  this.enableFiveDollarsNotes,
119
- (s = (e = this.route) == null ? void 0 : e.query) == null ? void 0 : s.utm_campaign,
120
- (n = this.loan) == null ? void 0 : n.unreservedAmount,
138
+ (n = (e = this.route) == null ? void 0 : e.query) == null ? void 0 : n.utm_campaign,
139
+ this.unreservedAmount,
121
140
  this.userBalance,
122
141
  this.fiveDollarsSelected
123
142
  ),
@@ -141,21 +160,17 @@ const k = "Other", N = {
141
160
  var e;
142
161
  return ((e = this.loan) == null ? void 0 : e.minNoteSize) ?? "";
143
162
  },
144
- unreservedAmount() {
145
- var e;
146
- return ((e = this.loan) == null ? void 0 : e.unreservedAmount) ?? "";
147
- },
148
163
  lentPreviously() {
149
- var e, s;
150
- return ((s = (e = this.loan) == null ? void 0 : e.userProperties) == null ? void 0 : s.lentTo) ?? !1;
164
+ var e, n;
165
+ return ((n = (e = this.loan) == null ? void 0 : e.userProperties) == null ? void 0 : n.lentTo) ?? !1;
151
166
  },
152
167
  isInBasket() {
153
168
  var e;
154
- return ((e = this.basketItems) == null ? void 0 : e.some((s) => s.__typename === "LoanReservation" && s.id === this.loanId)) ?? !1;
169
+ return ((e = this.basketItems) == null ? void 0 : e.some((n) => n.__typename === "LoanReservation" && n.id === this.loanId)) ?? !1;
155
170
  },
156
171
  prices() {
157
172
  const e = parseFloat(this.unreservedAmount < 25 ? this.minNoteSize : 25);
158
- return _(
173
+ return D(
159
174
  this.unreservedAmount,
160
175
  this.isCompleteLoanActive,
161
176
  e,
@@ -248,13 +263,13 @@ const k = "Other", N = {
248
263
  }
249
264
  },
250
265
  watch: {
251
- unreservedAmount(e, s) {
252
- var n, A;
253
- e !== s && s === "" && (this.selectedOption = B(
266
+ unreservedAmount(e, n) {
267
+ var s, L;
268
+ e !== n && n === "" && (this.selectedOption = B(
254
269
  this.getCookie,
255
270
  this.setCookie,
256
271
  this.enableFiveDollarsNotes,
257
- (A = (n = this.route) == null ? void 0 : n.query) == null ? void 0 : A.utm_campaign,
272
+ (L = (s = this.route) == null ? void 0 : s.query) == null ? void 0 : L.utm_campaign,
258
273
  e,
259
274
  this.userBalance,
260
275
  this.fiveDollarsSelected,
@@ -321,23 +336,23 @@ const k = "Other", N = {
321
336
  );
322
337
  }
323
338
  }
324
- }, H = { class: "tw-whitespace-nowrap" }, M = {
339
+ }, H = { class: "tw-whitespace-nowrap" }, K = {
325
340
  key: 3,
326
341
  class: "tw-w-full tw-text-center tw-rounded tw-p-2",
327
342
  style: { background: "#f1f1f1" }
328
- }, K = { class: "tw-flex" }, R = ["disabled"], U = ["value"], j = {
343
+ }, R = { class: "tw-flex" }, U = ["disabled"], E = ["value"], j = {
329
344
  key: 1,
330
345
  class: "amountDropdownWrapper"
331
346
  }, z = ["value"];
332
- function E(e, s, n, A, c, t) {
333
- const C = y("kv-cart-pill"), m = y("kv-ui-button"), b = y("kv-material-icon"), g = y("kv-ui-select"), T = y("kv-lend-amount-button");
347
+ function q(e, n, s, L, c, t) {
348
+ const b = y("kv-cart-pill"), m = y("kv-ui-button"), T = y("kv-material-icon"), v = y("kv-ui-select"), _ = y("kv-lend-amount-button");
334
349
  return i(), l("div", H, [
335
- n.showPill && n.showPresetAmounts ? (i(), a(C, {
350
+ s.showPill && s.showPresetAmounts ? (i(), a(b, {
336
351
  key: 0,
337
352
  "borrower-name": t.loanName,
338
353
  class: "!tw-w-full tw-justify-center tw-pb-2"
339
354
  }, {
340
- icon: r(() => s[5] || (s[5] = [
355
+ icon: r(() => n[5] || (n[5] = [
341
356
  u("svg", {
342
357
  xmlns: "http://www.w3.org/2000/svg",
343
358
  width: "25",
@@ -375,14 +390,14 @@ function E(e, s, n, A, c, t) {
375
390
  t.isInBasket ? (i(), a(m, {
376
391
  key: 1,
377
392
  variant: "secondary",
378
- class: h(["tw-inline-flex tw-flex-1", { "tw-w-full": n.showPresetAmounts }]),
393
+ class: h(["tw-inline-flex tw-flex-1", { "tw-w-full": s.showPresetAmounts }]),
379
394
  "data-testid": "bp-lend-cta-checkout-button",
380
- to: n.externalLinks ? void 0 : "/basket",
381
- href: n.externalLinks ? "/basket" : void 0,
382
- onClick: s[0] || (s[0] = (o) => t.clickSecondaryButton(o))
395
+ to: s.externalLinks ? void 0 : "/basket",
396
+ href: s.externalLinks ? "/basket" : void 0,
397
+ onClick: n[0] || (n[0] = (o) => t.clickSecondaryButton(o))
383
398
  }, {
384
399
  default: r(() => [
385
- w(f(t.loanInBasketButtonText), 1)
400
+ f(w(t.loanInBasketButtonText), 1)
386
401
  ]),
387
402
  _: 1
388
403
  }, 8, ["class", "to", "href"])) : t.showNonActionableLoanButton ? (i(), a(m, {
@@ -390,21 +405,21 @@ function E(e, s, n, A, c, t) {
390
405
  class: "tw-inline-flex tw-flex-1"
391
406
  }, {
392
407
  default: r(() => [
393
- w(f(t.ctaButtonText), 1)
408
+ f(w(t.ctaButtonText), 1)
394
409
  ]),
395
410
  _: 1
396
- })) : t.isFunded ? (i(), l("div", M, " This loan was just funded! 🎉 ")) : n.showViewLoan ? (i(), a(m, {
411
+ })) : t.isFunded ? (i(), l("div", K, " This loan was just funded! 🎉 ")) : s.showViewLoan ? (i(), a(m, {
397
412
  key: 4,
398
413
  state: `${t.allSharesReserved ? "disabled" : ""}`,
399
- to: n.externalLinks ? void 0 : t.readMorePath,
400
- href: n.externalLinks ? t.readMorePath : void 0,
414
+ to: s.externalLinks ? void 0 : t.readMorePath,
415
+ href: s.externalLinks ? t.readMorePath : void 0,
401
416
  class: "tw-mb-0",
402
- onClick: s[1] || (s[1] = (o) => e.$emit("show-loan-details", o))
417
+ onClick: n[1] || (n[1] = (o) => e.$emit("show-loan-details", o))
403
418
  }, {
404
419
  default: r(() => [
405
- u("span", K, [
406
- s[6] || (s[6] = w(" View loan ")),
407
- O(b, {
420
+ u("span", R, [
421
+ n[6] || (n[6] = f(" View loan ")),
422
+ V(T, {
408
423
  class: "tw-w-3 tw-h-3 tw-align-middle",
409
424
  icon: c.mdiChevronRight
410
425
  }, null, 8, ["icon"])
@@ -414,130 +429,132 @@ function E(e, s, n, A, c, t) {
414
429
  }, 8, ["state", "to", "href"])) : t.useFormSubmit ? (i(), l("form", {
415
430
  key: 5,
416
431
  class: "tw-w-full tw-flex",
417
- onSubmit: s[4] || (s[4] = v((...o) => t.addToBasket && t.addToBasket(...o), ["prevent"]))
432
+ onSubmit: n[4] || (n[4] = A((...o) => t.addToBasket && t.addToBasket(...o), ["prevent"]))
418
433
  }, [
419
434
  u("fieldset", {
420
435
  class: h(["tw-w-full tw-flex", {
421
- "tw-flex-col md:tw-flex-row md:tw-justify-between": n.showPresetAmounts,
422
- "tw-gap-1.5": n.showPresetAmounts && !t.isLendAmountButton
436
+ "tw-flex-col md:tw-flex-row md:tw-justify-between": s.showPresetAmounts,
437
+ "tw-gap-1.5": s.showPresetAmounts && !t.isLendAmountButton
423
438
  }]),
424
- disabled: n.isAdding,
439
+ disabled: s.isAdding,
425
440
  "data-testid": "bp-lend-cta-select-and-button"
426
441
  }, [
427
- n.showPresetAmounts && !n.isAdding ? (i(), l("div", {
442
+ s.showPresetAmounts && !s.isAdding ? (i(), l("div", {
428
443
  key: 0,
429
- class: h(["tw-flex tw-gap-1 lg:tw-gap-2", { "tw-flex-wrap md:tw-flex-nowrap": n.enableHugeAmount }])
444
+ class: h(["tw-flex tw-gap-1 lg:tw-gap-2", { "tw-flex-wrap md:tw-flex-nowrap": s.enableHugeAmount }])
430
445
  }, [
431
- t.isLendAmountButton ? d("", !0) : (i(!0), l(p, { key: 0 }, L(t.presetButtonsPrices, (o) => (i(), a(m, {
446
+ t.isLendAmountButton ? d("", !0) : (i(!0), l(g, { key: 0 }, p(t.presetButtonsPrices, (o) => (i(), a(m, {
432
447
  key: o,
433
448
  variant: "secondary",
434
449
  class: h(["tw-inline-flex tw-flex-1 preset-option tw-w-8", { "selected-option": c.selectedOption == o }]),
435
450
  "data-testid": "bp-lend-cta-lend-button",
436
- onClick: (q) => t.clickPresetButton(o)
451
+ onClick: (Z) => t.clickPresetButton(o)
437
452
  }, {
438
453
  default: r(() => [
439
- w(" $" + f(o), 1)
454
+ f(" $" + w(o), 1)
440
455
  ]),
441
456
  _: 2
442
457
  }, 1032, ["class", "onClick"]))), 128)),
443
- t.showFilteredDropdown ? (i(), a(g, {
458
+ t.showFilteredDropdown ? (i(), a(v, {
444
459
  key: 1,
445
460
  id: `LoanAmountDropdown_${t.loanId}`,
446
461
  modelValue: c.selectedDropdownOption,
447
462
  "onUpdate:modelValue": [
448
- s[2] || (s[2] = (o) => c.selectedDropdownOption = o),
463
+ n[2] || (n[2] = (o) => c.selectedDropdownOption = o),
449
464
  t.trackLendAmountSelection
450
465
  ],
451
466
  class: h(["tw-min-w-12 tw-rounded filtered-dropdown", {
452
467
  "unselected-dropdown": !t.selectedDropdown,
453
468
  "selected-dropdown": t.selectedDropdown,
454
- "tw-w-full": n.enableHugeAmount
469
+ "tw-w-full": s.enableHugeAmount
455
470
  }]),
456
471
  "aria-label": "Lend amount",
457
- onClick: v(t.clickDropdown, ["stop"])
472
+ onClick: A(t.clickDropdown, ["stop"])
458
473
  }, {
459
474
  default: r(() => [
460
- (i(!0), l(p, null, L(t.presetDropdownPrices, (o) => (i(), l("option", {
475
+ (i(!0), l(g, null, p(t.presetDropdownPrices, (o) => (i(), l("option", {
461
476
  key: o,
462
477
  value: o
463
- }, f(o !== c.OTHER_OPTION ? `$${o}` : o), 9, U))), 128))
478
+ }, w(o !== c.OTHER_OPTION ? `$${o}` : o), 9, E))), 128))
464
479
  ]),
465
480
  _: 1
466
481
  }, 8, ["id", "modelValue", "class", "onUpdate:modelValue", "onClick"])) : d("", !0)
467
- ], 2)) : n.showPresetAmounts ? d("", !0) : (i(), l("div", j, [
468
- t.hideShowLendDropdown && !t.isLessThan25 ? (i(), a(g, {
482
+ ], 2)) : s.showPresetAmounts ? d("", !0) : (i(), l("div", j, [
483
+ t.hideShowLendDropdown && !t.isLessThan25 ? (i(), a(v, {
469
484
  key: 0,
470
485
  id: `LoanAmountDropdown_${t.loanId}`,
471
486
  modelValue: c.selectedOption,
472
487
  "onUpdate:modelValue": [
473
- s[3] || (s[3] = (o) => c.selectedOption = o),
488
+ n[3] || (n[3] = (o) => c.selectedOption = o),
474
489
  t.trackLendAmountSelection
475
490
  ],
476
491
  class: "tw-min-w-12",
477
492
  style: { "border-radius": "14px 0 0 14px" },
478
493
  "aria-label": "Lend amount",
479
- onClick: v(t.clickDropdown, ["stop"])
494
+ onClick: A(t.clickDropdown, ["stop"])
480
495
  }, {
481
496
  default: r(() => [
482
- (i(!0), l(p, null, L(t.prices, (o) => (i(), l("option", {
497
+ (i(!0), l(g, null, p(t.prices, (o) => (i(), l("option", {
483
498
  key: o,
484
499
  value: o
485
- }, " $" + f(o), 9, z))), 128))
500
+ }, " $" + w(o), 9, z))), 128))
486
501
  ]),
487
502
  _: 1
488
503
  }, 8, ["id", "modelValue", "onUpdate:modelValue", "onClick"])) : d("", !0)
489
504
  ])),
490
505
  u("div", {
491
506
  class: h({
492
- lendButtonWrapper: t.hideShowLendDropdown && !n.showPresetAmounts,
507
+ lendButtonWrapper: t.hideShowLendDropdown && !s.showPresetAmounts,
493
508
  "tw-hidden": t.hideLendButton
494
509
  })
495
510
  }, [
496
511
  t.lendButtonVisibility && !t.isLessThan25 ? (i(), a(m, {
497
512
  key: "lendButton",
498
- class: h(["tw-inline-flex tw-flex-1", { "tw-w-full": n.showPresetAmounts }]),
513
+ class: h(["tw-inline-flex tw-flex-1", { "tw-w-full": s.showPresetAmounts }]),
499
514
  "data-testid": "bp-lend-cta-lend-button",
500
515
  type: "submit"
501
516
  }, {
502
517
  default: r(() => [
503
- w(f(t.ctaButtonText), 1)
518
+ f(w(t.ctaButtonText), 1)
504
519
  ]),
505
520
  _: 1
506
521
  }, 8, ["class"])) : t.showLendAgain ? (i(), a(m, {
507
522
  key: "lendAgainButton",
508
- class: h(["lend-again", { "tw-w-full": n.showPresetAmounts }]),
523
+ class: h(["lend-again", { "tw-w-full": s.showPresetAmounts }]),
509
524
  "data-testid": "bp-lend-cta-lend-again-button",
510
525
  type: "submit"
511
526
  }, {
512
527
  default: r(() => [
513
- w(f(n.primaryButtonText || "Lend") + " again ", 1)
528
+ f(w(s.primaryButtonText || "Lend") + " again ", 1)
514
529
  ]),
515
530
  _: 1
516
531
  }, 8, ["class"])) : d("", !0)
517
532
  ], 2),
518
- t.isLendAmountButton && !n.enableFiveDollarsNotes ? (i(), a(T, {
533
+ t.isLendAmountButton && !s.enableFiveDollarsNotes ? (i(), a(_, {
519
534
  key: 2,
520
535
  class: "tw-w-full",
521
536
  "loan-id": t.loanId,
522
537
  "show-now": !1,
523
- "amount-left": t.unreservedAmount,
524
- "is-adding": n.isAdding,
538
+ "amount-left": s.unreservedAmount,
539
+ "is-adding": s.isAdding,
525
540
  onAddToBasket: t.addToBasket
526
541
  }, null, 8, ["loan-id", "amount-left", "is-adding", "onAddToBasket"])) : d("", !0),
527
- !n.isLoading && n.isAdding ? (i(), a(m, {
542
+ !s.isLoading && s.isAdding ? (i(), a(m, {
528
543
  key: 3,
529
544
  class: "tw-inline-flex tw-flex-1"
530
545
  }, {
531
- default: r(() => s[7] || (s[7] = [
532
- w(" Adding to basket ")
546
+ default: r(() => n[7] || (n[7] = [
547
+ f(" Adding to basket ")
533
548
  ])),
534
549
  _: 1
535
550
  })) : d("", !0)
536
- ], 10, R)
551
+ ], 10, U)
537
552
  ], 32)) : d("", !0)
538
553
  ]);
539
554
  }
540
- const ne = /* @__PURE__ */ V(N, [["render", E], ["__scopeId", "data-v-6049057c"]]);
555
+ const ae = /* @__PURE__ */ O(M, [["render", q], ["__scopeId", "data-v-1ac5c3c8"]]);
541
556
  export {
542
- ne as default
557
+ oe as KV_LEND_CTA_FRAGMENT,
558
+ ie as KV_LEND_CTA_USER_FRAGMENT,
559
+ ae as default
543
560
  };
@@ -1 +1 @@
1
- .loan-activity[data-v-2bb2fe91] #kvLightboxBody{display:flex;flex-direction:column;padding-left:0;padding-right:0;padding-bottom:0}.loan-activity[data-v-2bb2fe91] div>div>div>div>div:first-child{box-shadow:var(--kiva-box-shadow)}.loan-activity[data-v-2bb2fe91] div>div>div>div>div:first-child>div,.loan-activity[data-v-2bb2fe91] #kvLightboxBody div{box-shadow:none}.loan-activity[data-v-2bb2fe91] #kvLightboxBody>div:first-child{padding-left:2rem;padding-right:2rem}.loan-activity[data-v-2bb2fe91] [role=dialog]{min-width:840px;max-width:840px!important}@media (max-width: calc(840px + 2rem)){.loan-activity[data-v-2bb2fe91] [role=dialog]{min-width:100%;max-width:100%!important}}.loan-activity[data-v-2bb2fe91] #kvLightboxBody>div:nth-child(2){padding-left:2rem;padding-right:2rem;box-shadow:var(--kiva-negative-box-shadow)}
1
+ .loan-activity[data-v-a3adcb1a] #kvLightboxBody{display:flex;flex-direction:column;padding-left:0;padding-right:0;padding-bottom:0}.loan-activity[data-v-a3adcb1a] div>div>div>div>div:first-child{box-shadow:var(--kiva-box-shadow)}.loan-activity[data-v-a3adcb1a] div>div>div>div>div:first-child>div,.loan-activity[data-v-a3adcb1a] #kvLightboxBody div{box-shadow:none}.loan-activity[data-v-a3adcb1a] #kvLightboxBody>div:first-child{padding-left:2rem;padding-right:2rem}.loan-activity[data-v-a3adcb1a] [role=dialog]{min-width:840px;max-width:840px!important}@media (max-width: calc(840px + 2rem)){.loan-activity[data-v-a3adcb1a] [role=dialog]{min-width:100%;max-width:100%!important}}.loan-activity[data-v-a3adcb1a] #kvLightboxBody>div:nth-child(2){padding-left:2rem;padding-right:2rem;box-shadow:var(--kiva-negative-box-shadow)}
@@ -1,17 +1,29 @@
1
- import { toRefs as C, ref as F, computed as v, resolveComponent as w, openBlock as s, createElementBlock as d, createElementVNode as i, createVNode as g, toDisplayString as c, createCommentVNode as k, withCtx as A, Fragment as L, renderList as p, createBlock as K } from "vue";
2
- import M from "numeral";
3
- import { format as B } from "date-fns";
4
- import N from "./KvActivityRow.js";
5
- import j from "./KvLightbox.js";
6
- import D from "./KvLendCta.js";
1
+ import p from "graphql-tag";
2
+ import { toRefs as F, ref as K, computed as v, resolveComponent as g, openBlock as s, createElementBlock as d, createElementVNode as i, createVNode as w, toDisplayString as c, createCommentVNode as k, withCtx as A, Fragment as L, renderList as C, createBlock as M } from "vue";
3
+ import B from "numeral";
4
+ import { format as N } from "date-fns";
5
+ import T from "./KvActivityRow.js";
6
+ import I from "./KvLightbox.js";
7
+ import j from "./KvLendCta.js";
7
8
  import "./KvLoanActivities.css";
8
- import T from "../_virtual/_plugin-vue_export-helper.js";
9
- const O = {
9
+ import D from "../_virtual/_plugin-vue_export-helper.js";
10
+ const nt = p`
11
+ fragment KvLoanActivities on LoanBasic {
12
+ id
13
+ lenders(limit: 0) {
14
+ totalCount
15
+ }
16
+ loanFundraisingInfo {
17
+ id
18
+ fundedAmount
19
+ }
20
+ }
21
+ `, V = {
10
22
  name: "KvLoanActivities",
11
23
  components: {
12
- KvActivityRow: N,
13
- KvLightbox: j,
14
- KvLendCta: D
24
+ KvActivityRow: T,
25
+ KvLightbox: I,
26
+ KvLendCta: j
15
27
  },
16
28
  props: {
17
29
  /**
@@ -105,7 +117,7 @@ const O = {
105
117
  loan: a,
106
118
  combinedActivities: t,
107
119
  kvTrackFunction: e
108
- } = C(f), r = F(!1), h = v(() => {
120
+ } = F(f), r = K(!1), _ = v(() => {
109
121
  var o;
110
122
  return `Activity for ${(o = a.value) == null ? void 0 : o.name}`;
111
123
  }), u = v(() => {
@@ -114,17 +126,17 @@ const O = {
114
126
  }), y = v(() => {
115
127
  var n, m;
116
128
  const o = ((m = (n = a.value) == null ? void 0 : n.loanFundraisingInfo) == null ? void 0 : m.fundedAmount) ?? 0;
117
- return M(parseFloat(o)).format("$0,0");
129
+ return B(parseFloat(o)).format("$0,0");
118
130
  }), b = v(() => {
119
131
  const o = t.value.find((n) => n.data.some((m) => m.type === "LendingAction"));
120
132
  return (o == null ? void 0 : o.data[0]) ?? {};
121
133
  });
122
134
  return {
123
135
  lightboxOpen: r,
124
- modalTitle: h,
136
+ modalTitle: _,
125
137
  formattedDate: (o) => {
126
138
  const n = new Date(o);
127
- return B(n, "MMM d, yyyy");
139
+ return N(n, "MMM d, yyyy");
128
140
  },
129
141
  showActivityModal: () => {
130
142
  e.value("loan-card", "click", "see-all-activity"), r.value = !0;
@@ -137,53 +149,53 @@ const O = {
137
149
  amountLent: y
138
150
  };
139
151
  }
140
- }, V = {
152
+ }, O = {
141
153
  key: 0,
142
154
  class: "loan-activity"
143
- }, I = { class: "tw-flex tw-justify-center lg:tw-px-0" }, R = { class: "tw-flex tw-justify-center tw-mt-1 tw-text-small" }, S = { key: 0 }, E = { class: "tw-text-h3 tw-flex-1 data-hj-suppress" }, H = { class: "tw-overflow-x-hidden tw-px-2 tw-pb-1" }, q = { class: "tw-text-center tw-text-h4" }, z = { class: "tw-flex tw-flex-col tw-gap-y-1" }, G = {
155
+ }, R = { class: "tw-flex tw-justify-center lg:tw-px-0" }, S = { class: "tw-flex tw-justify-center tw-mt-1 tw-text-small" }, E = { key: 0 }, q = { class: "tw-text-h3 tw-flex-1 data-hj-suppress" }, H = { class: "tw-overflow-x-hidden tw-px-2 tw-pb-1" }, G = { class: "tw-text-center tw-text-h4" }, z = { class: "tw-flex tw-flex-col tw-gap-y-1" }, J = {
144
156
  key: 0,
145
157
  class: "tw-mt-1 tw-text-small tw-text-danger"
146
- }, J = { class: "tw-flex tw-justify-end tw-mt-4 tw-pb-2.5 md:tw-pb-4" };
147
- function P(f, a, t, e, r, h) {
148
- const u = w("KvActivityRow"), y = w("KvLendCta"), b = w("KvLightbox");
149
- return t.combinedActivities.length > 0 ? (s(), d("div", V, [
150
- i("div", I, [
151
- g(u, { activity: e.singleActivity }, null, 8, ["activity"])
152
- ]),
158
+ }, P = { class: "tw-flex tw-justify-end tw-mt-4 tw-pb-2.5 md:tw-pb-4" };
159
+ function Q(f, a, t, e, r, _) {
160
+ const u = g("KvActivityRow"), y = g("KvLendCta"), b = g("KvLightbox");
161
+ return t.combinedActivities.length > 0 ? (s(), d("div", O, [
153
162
  i("div", R, [
154
- e.lendersNumber && e.amountLent ? (s(), d("span", S, c(e.lendersNumber) + " lenders lent " + c(e.amountLent) + ".   ", 1)) : k("", !0),
163
+ w(u, { activity: e.singleActivity }, null, 8, ["activity"])
164
+ ]),
165
+ i("div", S, [
166
+ e.lendersNumber && e.amountLent ? (s(), d("span", E, c(e.lendersNumber) + " lenders lent " + c(e.amountLent) + ".   ", 1)) : k("", !0),
155
167
  i("button", {
156
168
  class: "tw-text-action hover:tw-underline",
157
169
  onClick: a[0] || (a[0] = (...l) => e.showActivityModal && e.showActivityModal(...l))
158
170
  }, " See all activity ")
159
171
  ]),
160
- g(b, {
172
+ w(b, {
161
173
  title: "Activity Feed Modal",
162
174
  visible: e.lightboxOpen,
163
175
  onLightboxClosed: e.closeLightbox
164
176
  }, {
165
177
  header: A(() => [
166
- i("h2", E, c(e.modalTitle), 1)
178
+ i("h2", q, c(e.modalTitle), 1)
167
179
  ]),
168
180
  default: A(() => [
169
181
  i("div", H, [
170
- (s(!0), d(L, null, p(t.combinedActivities, (l) => (s(), d("div", {
182
+ (s(!0), d(L, null, C(t.combinedActivities, (l) => (s(), d("div", {
171
183
  key: l.key,
172
184
  class: "md:tw-px-8 lg:tw-px-14 tw-mt-4"
173
185
  }, [
174
- i("h4", q, c(e.formattedDate(l.key)), 1),
186
+ i("h4", G, c(e.formattedDate(l.key)), 1),
175
187
  i("div", z, [
176
- (s(!0), d(L, null, p(l.data, (_, x) => (s(), K(u, {
188
+ (s(!0), d(L, null, C(l.data, (h, x) => (s(), M(u, {
177
189
  key: x,
178
- activity: _
190
+ activity: h
179
191
  }, null, 8, ["activity"]))), 128))
180
192
  ])
181
193
  ]))), 128))
182
194
  ]),
183
195
  i("div", null, [
184
- t.errorMsg ? (s(), d("p", G, c(t.errorMsg), 1)) : k("", !0),
185
- i("div", J, [
186
- g(y, {
196
+ t.errorMsg ? (s(), d("p", J, c(t.errorMsg), 1)) : k("", !0),
197
+ i("div", P, [
198
+ w(y, {
187
199
  loan: t.loan,
188
200
  "is-loading": !1,
189
201
  "kv-track-function": t.kvTrackFunction,
@@ -205,7 +217,8 @@ function P(f, a, t, e, r, h) {
205
217
  }, 8, ["visible", "onLightboxClosed"])
206
218
  ])) : k("", !0);
207
219
  }
208
- const et = /* @__PURE__ */ T(O, [["render", P], ["__scopeId", "data-v-2bb2fe91"]]);
220
+ const it = /* @__PURE__ */ D(V, [["render", Q], ["__scopeId", "data-v-a3adcb1a"]]);
209
221
  export {
210
- et as default
222
+ nt as KV_LOAN_ACTIVITIES_FRAGMENT,
223
+ it as default
211
224
  };
@@ -1,11 +1,19 @@
1
- import { mdiBookmarkOutline as a, mdiBookmark as m } from "@mdi/js";
2
- import i from "./KvMaterialIcon.js";
3
- import { resolveComponent as l, openBlock as k, createElementBlock as s, createElementVNode as c, createVNode as d, normalizeClass as p } from "vue";
1
+ import a from "graphql-tag";
2
+ import { mdiBookmarkOutline as m, mdiBookmark as i } from "@mdi/js";
3
+ import s from "./KvMaterialIcon.js";
4
+ import { resolveComponent as k, openBlock as l, createElementBlock as c, createElementVNode as d, createVNode as f, normalizeClass as p } from "vue";
4
5
  import u from "../_virtual/_plugin-vue_export-helper.js";
5
- const f = {
6
+ const N = a`
7
+ fragment KvLoanBookmark on LoanBasic {
8
+ id
9
+ userProperties {
10
+ favorited
11
+ }
12
+ }
13
+ `, B = {
6
14
  name: "KvLoanBookmark",
7
15
  components: {
8
- KvMaterialIcon: i
16
+ KvMaterialIcon: s
9
17
  },
10
18
  props: {
11
19
  isBookmarked: {
@@ -15,27 +23,28 @@ const f = {
15
23
  },
16
24
  data() {
17
25
  return {
18
- mdiBookmarkOutline: a,
19
- mdiBookmark: m
26
+ mdiBookmarkOutline: m,
27
+ mdiBookmark: i
20
28
  };
21
29
  }
22
30
  };
23
- function B(r, e, o, w, t, _) {
24
- const n = l("kv-material-icon");
25
- return k(), s("div", null, [
26
- c("button", {
31
+ function _(r, e, o, v, t, w) {
32
+ const n = k("kv-material-icon");
33
+ return l(), c("div", null, [
34
+ d("button", {
27
35
  style: { "border-radius": "8px", padding: "3px" },
28
36
  class: "tw-cursor-pointer tw-font-medium tw-bg-white tw-flex tw-justify-center",
29
- onClick: e[0] || (e[0] = (v) => r.$emit("toggle-bookmark"))
37
+ onClick: e[0] || (e[0] = (g) => r.$emit("toggle-bookmark"))
30
38
  }, [
31
- d(n, {
39
+ f(n, {
32
40
  class: p(["tw-w-3", { "tw-text-black": !o.isBookmarked, "tw-text-marigold": o.isBookmarked }]),
33
41
  icon: `${o.isBookmarked ? t.mdiBookmark : t.mdiBookmarkOutline}`
34
42
  }, null, 8, ["class", "icon"])
35
43
  ])
36
44
  ]);
37
45
  }
38
- const C = /* @__PURE__ */ u(f, [["render", B]]);
46
+ const y = /* @__PURE__ */ u(B, [["render", _]]);
39
47
  export {
40
- C as default
48
+ N as KV_LOAN_BOOKMARK_FRAGMENT,
49
+ y as default
41
50
  };