@kiva/kv-components 6.57.5 → 6.57.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/vue/KvAtbModal.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
@media (min-width: 45.875rem){.cart-modal[data-v-
|
|
1
|
+
@media (min-width: 45.875rem){.cart-modal[data-v-85b67e19] div.container{right:var(--modal-right)!important;top:var(--modal-top)!important}}
|
package/dist/vue/KvAtbModal.js
CHANGED
|
@@ -103,20 +103,20 @@ const Q = {
|
|
|
103
103
|
],
|
|
104
104
|
setup(b, { emit: i }) {
|
|
105
105
|
const {
|
|
106
|
-
modalVisible:
|
|
106
|
+
modalVisible: r,
|
|
107
107
|
addedLoan: l,
|
|
108
108
|
userData: m,
|
|
109
109
|
hasEverLoggedIn: A,
|
|
110
110
|
myKivaExperimentEnabled: p,
|
|
111
111
|
oneLoanAwayCategory: w,
|
|
112
112
|
oneLoanAwayFilteredUrl: v,
|
|
113
|
-
milestonesProgress:
|
|
113
|
+
milestonesProgress: P
|
|
114
114
|
} = N(b), f = E(0), k = E(0), Z = C(() => {
|
|
115
115
|
var t;
|
|
116
116
|
return ((t = l.value) == null ? void 0 : t.basketSize) ?? 0;
|
|
117
|
-
}),
|
|
118
|
-
const t =
|
|
119
|
-
return { right:
|
|
117
|
+
}), q = C(() => {
|
|
118
|
+
const t = window.innerWidth - k.value - 200, o = `${t > 0 ? t : 0}`, n = `${f.value}`;
|
|
119
|
+
return { right: o, top: n };
|
|
120
120
|
}), u = C(() => {
|
|
121
121
|
var t;
|
|
122
122
|
return (t = l.value) == null ? void 0 : t.name;
|
|
@@ -124,13 +124,13 @@ const Q = {
|
|
|
124
124
|
var t;
|
|
125
125
|
return !((t = m.value) != null && t.my);
|
|
126
126
|
}), g = C(() => {
|
|
127
|
-
var t, o,
|
|
128
|
-
return p.value && (_.value && !A.value || !_.value && !((
|
|
129
|
-
}), x = C(() => w.value && v.value && !g.value), j = C(() => Object.values(
|
|
130
|
-
var o,
|
|
127
|
+
var t, o, n;
|
|
128
|
+
return p.value && (_.value && !A.value || !_.value && !((n = (o = (t = m.value) == null ? void 0 : t.my) == null ? void 0 : o.loans) != null && n.totalCount)) && Z.value === 1;
|
|
129
|
+
}), x = C(() => w.value && v.value && !g.value), j = C(() => Object.values(P.value).reduce((t, o) => t + (o > 0 ? o : 0), 0)), H = C(() => {
|
|
130
|
+
var o, n, s;
|
|
131
131
|
if (g.value) {
|
|
132
|
-
const
|
|
133
|
-
return ((o = l.value) == null ? void 0 : o.borrowerCount) > 1 || (
|
|
132
|
+
const a = `Supporting ${u.value} helps`;
|
|
133
|
+
return ((o = l.value) == null ? void 0 : o.borrowerCount) > 1 || (n = l.value) != null && n.themes.includes("Social Enterprise") ? `${a} them invest in themselves.` : ((s = l.value) == null ? void 0 : s.gender) === "male" ? `${a} him invest in himself.` : `${a} her invest in herself.`;
|
|
134
134
|
}
|
|
135
135
|
if (x.value)
|
|
136
136
|
return "You’re close to your next achievement!";
|
|
@@ -143,24 +143,24 @@ const Q = {
|
|
|
143
143
|
o && V(o), i("reset-modal");
|
|
144
144
|
}, M = () => {
|
|
145
145
|
const t = document.getElementsByTagName("header")[0], o = (t == null ? void 0 : t.getBoundingClientRect()) ?? null;
|
|
146
|
-
let
|
|
147
|
-
s || (
|
|
148
|
-
const
|
|
149
|
-
|
|
146
|
+
let n = [...document.querySelectorAll('[data-testid="header-basket"]')], s = n.find((L) => L == null ? void 0 : L.clientHeight);
|
|
147
|
+
s || (n = [...document.querySelectorAll('[data-testid="header-about"]')], s = n.find((L) => L == null ? void 0 : L.clientHeight));
|
|
148
|
+
const a = (s == null ? void 0 : s.getBoundingClientRect()) ?? null;
|
|
149
|
+
a && (a == null ? void 0 : a.right) !== k.value && (k.value = a == null ? void 0 : a.right), o && (o == null ? void 0 : o.bottom) !== f.value && (f.value = o == null ? void 0 : o.bottom);
|
|
150
150
|
}, c = G(M, 50);
|
|
151
|
-
return F(
|
|
152
|
-
|
|
151
|
+
return F(r, () => {
|
|
152
|
+
r.value && M();
|
|
153
153
|
}, { immediate: !0 }), O(() => {
|
|
154
154
|
M(), window.addEventListener("scroll", c), window.addEventListener("resize", c);
|
|
155
155
|
}), z(() => {
|
|
156
156
|
window.removeEventListener("scroll", c), window.removeEventListener("resize", c);
|
|
157
157
|
}), {
|
|
158
|
-
modalPosition:
|
|
158
|
+
modalPosition: q,
|
|
159
159
|
basketCount: Z,
|
|
160
160
|
isFirstLoan: g,
|
|
161
161
|
borrowerName: u,
|
|
162
162
|
showOneAway: x,
|
|
163
|
-
pillMsg:
|
|
163
|
+
pillMsg: H,
|
|
164
164
|
closeCartModal: K
|
|
165
165
|
};
|
|
166
166
|
}
|
|
@@ -187,27 +187,27 @@ const Q = {
|
|
|
187
187
|
key: 2,
|
|
188
188
|
class: "tw-text-h5"
|
|
189
189
|
};
|
|
190
|
-
function o1(b, i,
|
|
190
|
+
function o1(b, i, r, l, m, A) {
|
|
191
191
|
const p = B("KvCartPill"), w = B("KvCartModal");
|
|
192
|
-
return
|
|
192
|
+
return r.modalVisible ? (d(), D(w, {
|
|
193
193
|
key: 0,
|
|
194
194
|
style: R({
|
|
195
195
|
"--modal-right": `${l.modalPosition.right}px`,
|
|
196
196
|
"--modal-top": `${l.modalPosition.top}px`
|
|
197
197
|
}),
|
|
198
198
|
class: "cart-modal !tw-top-0",
|
|
199
|
-
visible:
|
|
200
|
-
"photo-path":
|
|
199
|
+
visible: r.modalVisible,
|
|
200
|
+
"photo-path": r.photoPath,
|
|
201
201
|
"basket-count": l.basketCount,
|
|
202
|
-
"category-name":
|
|
202
|
+
"category-name": r.oneLoanAwayCategory,
|
|
203
203
|
onCartModalClosed: l.closeCartModal
|
|
204
204
|
}, {
|
|
205
205
|
content: S(() => [
|
|
206
|
-
|
|
206
|
+
r.showModalContent || l.isFirstLoan ? (d(), h("div", X, [
|
|
207
207
|
T(p, {
|
|
208
208
|
class: "!tw-w-full tw-justify-center",
|
|
209
209
|
"borrower-name": l.borrowerName,
|
|
210
|
-
"milestones-number":
|
|
210
|
+
"milestones-number": r.milestonesNumber,
|
|
211
211
|
"is-close-next-milestone": l.showOneAway,
|
|
212
212
|
"custom-message": l.pillMsg
|
|
213
213
|
}, {
|
|
@@ -380,7 +380,7 @@ function o1(b, i, a, l, m, A) {
|
|
|
380
380
|
fill: "#757575"
|
|
381
381
|
}, null, -1)
|
|
382
382
|
]))),
|
|
383
|
-
l.showOneAway ? (d(), h("div", t1, U(
|
|
383
|
+
l.showOneAway ? (d(), h("div", t1, U(r.oneAwayText), 1)) : y("", !0)
|
|
384
384
|
], 2)
|
|
385
385
|
]),
|
|
386
386
|
_: 1
|
|
@@ -390,7 +390,7 @@ function o1(b, i, a, l, m, A) {
|
|
|
390
390
|
_: 1
|
|
391
391
|
}, 8, ["style", "visible", "photo-path", "basket-count", "category-name", "onCartModalClosed"])) : y("", !0);
|
|
392
392
|
}
|
|
393
|
-
const C1 = /* @__PURE__ */ J(Q, [["render", o1], ["__scopeId", "data-v-
|
|
393
|
+
const C1 = /* @__PURE__ */ J(Q, [["render", o1], ["__scopeId", "data-v-85b67e19"]]);
|
|
394
394
|
export {
|
|
395
395
|
C1 as default
|
|
396
396
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.loan-card-use[data-v-
|
|
1
|
+
.loan-card-use[data-v-9acb8553]:hover,.loan-card-use[data-v-9acb8553]: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-9acb8553]{text-decoration-line:underline}.loan-card-progress[data-v-9acb8553]:hover,.loan-card-progress[data-v-9acb8553]:focus{text-decoration-line:none}
|
|
@@ -12,12 +12,13 @@ import ee from "./KvMaterialIcon.js";
|
|
|
12
12
|
import te from "./KvLoadingPlaceholder.js";
|
|
13
13
|
import ae from "./KvLoanTeamPick.js";
|
|
14
14
|
import oe, { KV_LOAN_ACTIVITIES_FRAGMENT as ne } from "./KvLoanActivities.js";
|
|
15
|
-
import { resolveComponent as i, openBlock as o, createElementBlock as m, normalizeClass as s, normalizeStyle as le, createElementVNode as c, createBlock as r, resolveDynamicComponent as
|
|
15
|
+
import { resolveComponent as i, openBlock as o, createElementBlock as m, normalizeClass as s, normalizeStyle as le, createElementVNode as c, createBlock as r, resolveDynamicComponent as g, withCtx as k, createVNode as w, createTextVNode as re, toDisplayString as M, createCommentVNode as f, Fragment as ie, renderList as se } from "vue";
|
|
16
16
|
import "./KvClassicLoanCard.css";
|
|
17
17
|
import de from "../_virtual/_plugin-vue_export-helper.js";
|
|
18
18
|
const Ge = K`
|
|
19
19
|
fragment KvClassicLoanCard on LoanBasic {
|
|
20
20
|
id
|
|
21
|
+
gender
|
|
21
22
|
image {
|
|
22
23
|
id
|
|
23
24
|
hash # for imageHash
|
|
@@ -273,10 +274,10 @@ const Ge = K`
|
|
|
273
274
|
}, ue = { class: "tw-grow" }, ce = { class: "loan-card-active-hover" }, we = {
|
|
274
275
|
key: 1,
|
|
275
276
|
class: "tw-relative"
|
|
276
|
-
}, fe = { key: 0 },
|
|
277
|
+
}, fe = { key: 0 }, ge = {
|
|
277
278
|
class: "tw-absolute tw-bottom-1 tw-left-1 tw-text-primary tw-bg-white tw-rounded tw-p-1 tw-mb-0 tw-mr-2 tw-text-h4 tw-inline-flex tw-items-center",
|
|
278
279
|
style: { padding: "2px 6px", "text-transform": "capitalize" }
|
|
279
|
-
},
|
|
280
|
+
}, ke = { class: "tw-mb-1.5 tw-pt-1" }, ve = { key: 1 }, he = {
|
|
280
281
|
key: 0,
|
|
281
282
|
class: "tw-w-full tw-pt-1 tw-pr-1"
|
|
282
283
|
}, be = {
|
|
@@ -300,14 +301,14 @@ function _e(l, a, e, t, T, d) {
|
|
|
300
301
|
class: s(["tw-mb-1 tw-w-full", { "tw-rounded-t tw-rounded-b-none": e.largeCard, "tw-rounded": !e.largeCard }]),
|
|
301
302
|
style: { height: "15rem" }
|
|
302
303
|
}, null, 8, ["class"])) : (o(), m("div", we, [
|
|
303
|
-
(o(), r(
|
|
304
|
+
(o(), r(g(t.tag), {
|
|
304
305
|
to: t.readMorePath,
|
|
305
306
|
href: t.readMorePath,
|
|
306
307
|
class: "tw-flex",
|
|
307
308
|
"aria-label": "Borrower image",
|
|
308
309
|
onClick: a[0] || (a[0] = (n) => t.clickReadMore("Photo", n))
|
|
309
310
|
}, {
|
|
310
|
-
default:
|
|
311
|
+
default: k(() => [
|
|
311
312
|
w(v, {
|
|
312
313
|
class: s(["tw-relative tw-w-full tw-bg-black", { "tw-rounded-t": e.largeCard, "tw-rounded": !e.largeCard }]),
|
|
313
314
|
alt: `Photo of ${t.borrowerName}`,
|
|
@@ -318,7 +319,7 @@ function _e(l, a, e, t, T, d) {
|
|
|
318
319
|
"photo-path": e.photoPath
|
|
319
320
|
}, null, 8, ["class", "alt", "aspect-ratio", "default-image", "hash", "images", "photo-path"]),
|
|
320
321
|
t.countryName ? (o(), m("div", fe, [
|
|
321
|
-
c("p",
|
|
322
|
+
c("p", ge, [
|
|
322
323
|
w(h, {
|
|
323
324
|
class: "tw-h-2 tw-w-2",
|
|
324
325
|
icon: t.mdiMapMarker
|
|
@@ -345,14 +346,14 @@ function _e(l, a, e, t, T, d) {
|
|
|
345
346
|
onToggleBookmark: a[1] || (a[1] = (n) => l.$emit("toggle-bookmark"))
|
|
346
347
|
}, null, 8, ["loan-id", "is-bookmarked"]))
|
|
347
348
|
])),
|
|
348
|
-
(o(), r(
|
|
349
|
+
(o(), r(g(t.tag), {
|
|
349
350
|
to: t.readMorePath,
|
|
350
351
|
href: t.readMorePath,
|
|
351
352
|
class: s(["tw-flex tw-no-underline hover:tw-no-underline focus:tw-no-underline", { "tw-px-1": e.largeCard }]),
|
|
352
353
|
"aria-label": "Loan tag",
|
|
353
354
|
onClick: a[2] || (a[2] = (n) => t.clickReadMore("Tag", n))
|
|
354
355
|
}, {
|
|
355
|
-
default:
|
|
356
|
+
default: k(() => [
|
|
356
357
|
e.showTags && !t.isLoading ? (o(), r(_, {
|
|
357
358
|
key: 0,
|
|
358
359
|
loan: e.loan
|
|
@@ -360,15 +361,15 @@ function _e(l, a, e, t, T, d) {
|
|
|
360
361
|
]),
|
|
361
362
|
_: 1
|
|
362
363
|
}, 8, ["to", "href", "class"])),
|
|
363
|
-
(o(), r(
|
|
364
|
+
(o(), r(g(t.tag), {
|
|
364
365
|
to: t.readMorePath,
|
|
365
366
|
href: t.readMorePath,
|
|
366
367
|
class: "loan-card-use tw-no-underline tw-text-primary",
|
|
367
368
|
"aria-label": "Loan use",
|
|
368
369
|
onClick: a[3] || (a[3] = (n) => t.clickReadMore("Use", n))
|
|
369
370
|
}, {
|
|
370
|
-
default:
|
|
371
|
-
c("div",
|
|
371
|
+
default: k(() => [
|
|
372
|
+
c("div", ke, [
|
|
372
373
|
t.isLoading ? (o(), m("div", {
|
|
373
374
|
key: 0,
|
|
374
375
|
class: s(["tw-w-full", { "tw-px-1": e.largeCard }]),
|
|
@@ -421,7 +422,7 @@ function _e(l, a, e, t, T, d) {
|
|
|
421
422
|
})
|
|
422
423
|
])),
|
|
423
424
|
c("div", null, [
|
|
424
|
-
t.sharesAvailable ? (o(), r(
|
|
425
|
+
t.sharesAvailable ? (o(), r(g(t.tag), {
|
|
425
426
|
key: 0,
|
|
426
427
|
to: t.readMorePath,
|
|
427
428
|
href: t.readMorePath,
|
|
@@ -429,7 +430,7 @@ function _e(l, a, e, t, T, d) {
|
|
|
429
430
|
"aria-label": "Loan progress",
|
|
430
431
|
onClick: a[5] || (a[5] = (n) => t.clickReadMore("Progress", n))
|
|
431
432
|
}, {
|
|
432
|
-
default:
|
|
433
|
+
default: k(() => [
|
|
433
434
|
w(A, {
|
|
434
435
|
id: "loanProgress",
|
|
435
436
|
"money-left": t.unreservedAmount,
|
|
@@ -498,7 +499,7 @@ function _e(l, a, e, t, T, d) {
|
|
|
498
499
|
])) : f("", !0)
|
|
499
500
|
], 6);
|
|
500
501
|
}
|
|
501
|
-
const Ue = /* @__PURE__ */ de(me, [["render", _e], ["__scopeId", "data-v-
|
|
502
|
+
const Ue = /* @__PURE__ */ de(me, [["render", _e], ["__scopeId", "data-v-9acb8553"]]);
|
|
502
503
|
export {
|
|
503
504
|
Ge as KV_CLASSIC_LOAN_CARD_FRAGMENT,
|
|
504
505
|
Ie as KV_CLASSIC_LOAN_CARD_USER_FRAGMET,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kiva/kv-components",
|
|
3
|
-
"version": "6.57.
|
|
3
|
+
"version": "6.57.7",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -114,5 +114,5 @@
|
|
|
114
114
|
"embla-carousel-fade",
|
|
115
115
|
"popper.js"
|
|
116
116
|
],
|
|
117
|
-
"gitHead": "
|
|
117
|
+
"gitHead": "59526ed2d6727f6ee60c0da4d5f40b9b264b29b9"
|
|
118
118
|
}
|