@kiva/kv-components 6.57.6 → 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.
@@ -1 +1 @@
1
- @media (min-width: 45.875rem){.cart-modal[data-v-2070d628] div.container{right:var(--modal-right)!important;top:var(--modal-top)!important}}
1
+ @media (min-width: 45.875rem){.cart-modal[data-v-85b67e19] div.container{right:var(--modal-right)!important;top:var(--modal-top)!important}}
@@ -103,20 +103,20 @@ const Q = {
103
103
  ],
104
104
  setup(b, { emit: i }) {
105
105
  const {
106
- modalVisible: a,
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: q
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
- }), H = C(() => {
118
- const t = `${window.innerWidth - k.value - 200}`, o = `${f.value}`;
119
- return { right: t, top: o };
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, r;
128
- return p.value && (_.value && !A.value || !_.value && !((r = (o = (t = m.value) == null ? void 0 : t.my) == null ? void 0 : o.loans) != null && r.totalCount)) && Z.value === 1;
129
- }), x = C(() => w.value && v.value && !g.value), j = C(() => Object.values(q.value).reduce((t, o) => t + (o > 0 ? o : 0), 0)), P = C(() => {
130
- var o, r, s;
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 n = `Supporting ${u.value} helps`;
133
- return ((o = l.value) == null ? void 0 : o.borrowerCount) > 1 || (r = l.value) != null && r.themes.includes("Social Enterprise") ? `${n} them invest in themselves.` : ((s = l.value) == null ? void 0 : s.gender) === "male" ? `${n} him invest in himself.` : `${n} her invest in herself.`;
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 r = [...document.querySelectorAll('[data-testid="header-basket"]')], s = r.find((L) => L == null ? void 0 : L.clientHeight);
147
- s || (r = [...document.querySelectorAll('[data-testid="header-about"]')], s = r.find((L) => L == null ? void 0 : L.clientHeight));
148
- const n = (s == null ? void 0 : s.getBoundingClientRect()) ?? null;
149
- n && (n == null ? void 0 : n.right) !== k.value && (k.value = n == null ? void 0 : n.right), o && (o == null ? void 0 : o.bottom) !== f.value && (f.value = o == null ? void 0 : o.bottom);
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(a, () => {
152
- a.value && M();
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: H,
158
+ modalPosition: q,
159
159
  basketCount: Z,
160
160
  isFirstLoan: g,
161
161
  borrowerName: u,
162
162
  showOneAway: x,
163
- pillMsg: P,
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, a, l, m, A) {
190
+ function o1(b, i, r, l, m, A) {
191
191
  const p = B("KvCartPill"), w = B("KvCartModal");
192
- return a.modalVisible ? (d(), D(w, {
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: a.modalVisible,
200
- "photo-path": a.photoPath,
199
+ visible: r.modalVisible,
200
+ "photo-path": r.photoPath,
201
201
  "basket-count": l.basketCount,
202
- "category-name": a.oneLoanAwayCategory,
202
+ "category-name": r.oneLoanAwayCategory,
203
203
  onCartModalClosed: l.closeCartModal
204
204
  }, {
205
205
  content: S(() => [
206
- a.showModalContent || l.isFirstLoan ? (d(), h("div", X, [
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": a.milestonesNumber,
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(a.oneAwayText), 1)) : y("", !0)
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-2070d628"]]);
393
+ const C1 = /* @__PURE__ */ J(Q, [["render", o1], ["__scopeId", "data-v-85b67e19"]]);
394
394
  export {
395
395
  C1 as default
396
396
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kiva/kv-components",
3
- "version": "6.57.6",
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": "24c9aa1fe01dc29c3aaccd0d1f9f16e3755d2094"
117
+ "gitHead": "59526ed2d6727f6ee60c0da4d5f40b9b264b29b9"
118
118
  }