@kiva/kv-components 6.48.1 → 6.49.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.
- package/dist/vue/KvLendCta.css +1 -1
- package/dist/vue/KvLendCta.js +323 -189
- package/dist/vue/KvWwwHeader/KvHeaderLinkBar.css +1 -1
- package/dist/vue/KvWwwHeader/KvHeaderLinkBar.js +132 -119
- package/dist/vue/KvWwwHeader/KvHeaderMobileMenu.css +1 -1
- package/dist/vue/KvWwwHeader/KvHeaderMobileMenu.js +5 -2
- package/dist/vue/KvWwwHeader.css +1 -1
- package/dist/vue/KvWwwHeader.js +6 -6
- package/package.json +2 -2
package/dist/vue/KvLendCta.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.amountDropdownWrapper[data-v-
|
|
1
|
+
.amountDropdownWrapper[data-v-ce2eaa1b] select{border-radius:14px 0 0 14px}.lend-again[data-v-ce2eaa1b] span{padding-left:0;padding-right:0;padding-left:.5rem;padding-right:.5rem}.lendButtonWrapper[data-v-ce2eaa1b] span:first-child{border-radius:0 14px 14px 0}.filtered-dropdown[data-v-ce2eaa1b] select{cursor:pointer;white-space:nowrap;border-radius:1rem;border-width:2px;font-weight:500}.unselected-dropdown[data-v-ce2eaa1b] select{--tw-border-opacity: 1;border-color:rgb(158 158 158 / var(--tw-border-opacity, 1))}.preset-option[data-v-ce2eaa1b] span.tw-w-full:first-child{border-width:2px;--tw-border-opacity: 1;border-color:rgb(158 158 158 / var(--tw-border-opacity, 1))}.selected-dropdown[data-v-ce2eaa1b] select,.selected-option[data-v-ce2eaa1b] span.tw-w-full:first-child{--tw-border-opacity: 1;border-color:rgba(var(--border-action),var(--tw-border-opacity, 1));--tw-bg-opacity: 1;background-color:rgba(var(--bg-secondary),var(--tw-bg-opacity, 1))}.button-ellipsis[data-v-ce2eaa1b] span>span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}@media (max-width: 325px){[data-testid=bp-lend-cta-select-and-button-mobile]>div.tw-flex[data-v-ce2eaa1b]{flex-wrap:wrap}.mobile-other-dd[data-v-ce2eaa1b]{flex:0 0 100px!important;min-width:100px!important;max-width:100px!important;width:100px!important}.button-ellipsis[data-v-ce2eaa1b]{flex:1 1 0%;min-width:0}}
|
package/dist/vue/KvLendCta.js
CHANGED
|
@@ -1,34 +1,35 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { mdiChevronRight as
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
1
|
+
import _ from "graphql-tag";
|
|
2
|
+
import { mdiChevronRight as D } from "@mdi/js";
|
|
3
|
+
import { throttle as C } from "../utils/throttle.js";
|
|
4
|
+
import { getLendCtaSelectedOption as g, getDropdownPriceArray as P } from "../utils/loanUtils.js";
|
|
5
|
+
import F from "./KvLendAmountButton.js";
|
|
6
|
+
import S from "./KvSelect.js";
|
|
7
|
+
import I from "./KvButton.js";
|
|
8
|
+
import V from "./KvMaterialIcon.js";
|
|
9
|
+
import { resolveComponent as b, openBlock as o, createElementBlock as d, createBlock as l, withCtx as u, createTextVNode as w, toDisplayString as h, createElementVNode as f, createVNode as N, withModifiers as v, Fragment as k, renderList as y, normalizeClass as m, createCommentVNode as r } from "vue";
|
|
9
10
|
import "./KvLendCta.css";
|
|
10
|
-
import
|
|
11
|
-
const
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
`,
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
`,
|
|
11
|
+
import O from "../_virtual/_plugin-vue_export-helper.js";
|
|
12
|
+
const A = "Other", ce = _`
|
|
13
|
+
fragment KvLendCta on LoanBasic {
|
|
14
|
+
id
|
|
15
|
+
name
|
|
16
|
+
status
|
|
17
|
+
minNoteSize
|
|
18
|
+
}
|
|
19
|
+
`, we = _`
|
|
20
|
+
fragment KvLendCtaUser on LoanBasic {
|
|
21
|
+
id
|
|
22
|
+
userProperties {
|
|
23
|
+
lentTo
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
`, M = {
|
|
26
27
|
name: "KvLendCta",
|
|
27
28
|
components: {
|
|
28
|
-
KvLendAmountButton:
|
|
29
|
-
KvUiButton:
|
|
30
|
-
KvUiSelect:
|
|
31
|
-
KvMaterialIcon:
|
|
29
|
+
KvLendAmountButton: F,
|
|
30
|
+
KvUiButton: I,
|
|
31
|
+
KvUiSelect: S,
|
|
32
|
+
KvMaterialIcon: V
|
|
32
33
|
},
|
|
33
34
|
props: {
|
|
34
35
|
loan: {
|
|
@@ -108,9 +109,9 @@ const w = "Other", nt = T`
|
|
|
108
109
|
default: void 0
|
|
109
110
|
},
|
|
110
111
|
/**
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
112
|
+
* Hide preset buttons under this amount when
|
|
113
|
+
* showPresetAmounts is true
|
|
114
|
+
* */
|
|
114
115
|
maxAmount: {
|
|
115
116
|
type: String,
|
|
116
117
|
default: ""
|
|
@@ -125,21 +126,24 @@ const w = "Other", nt = T`
|
|
|
125
126
|
}
|
|
126
127
|
},
|
|
127
128
|
data() {
|
|
128
|
-
var t,
|
|
129
|
+
var t, s;
|
|
129
130
|
return {
|
|
130
|
-
mdiChevronRight:
|
|
131
|
+
mdiChevronRight: D,
|
|
131
132
|
defaultAmountOptions: [25, 50, 75],
|
|
132
133
|
selectedOption: g(
|
|
133
134
|
this.getCookie,
|
|
134
135
|
this.setCookie,
|
|
135
136
|
this.enableFiveDollarsNotes,
|
|
136
|
-
(
|
|
137
|
+
(s = (t = this.route) == null ? void 0 : t.query) == null ? void 0 : s.utm_campaign,
|
|
137
138
|
this.unreservedAmount,
|
|
138
139
|
this.userBalance,
|
|
139
140
|
this.fiveDollarsSelected
|
|
140
141
|
),
|
|
141
|
-
selectedDropdownOption:
|
|
142
|
-
OTHER_OPTION:
|
|
142
|
+
selectedDropdownOption: A,
|
|
143
|
+
OTHER_OPTION: A,
|
|
144
|
+
// SSR-safe viewport width initialization
|
|
145
|
+
viewportWidth: typeof window < "u" ? window.innerWidth : 1024,
|
|
146
|
+
resizeHandler: void 0
|
|
143
147
|
};
|
|
144
148
|
},
|
|
145
149
|
computed: {
|
|
@@ -159,22 +163,22 @@ const w = "Other", nt = T`
|
|
|
159
163
|
return ((t = this.loan) == null ? void 0 : t.minNoteSize) ?? "";
|
|
160
164
|
},
|
|
161
165
|
lentPreviously() {
|
|
162
|
-
var t,
|
|
163
|
-
return ((
|
|
166
|
+
var t, s;
|
|
167
|
+
return ((s = (t = this.loan) == null ? void 0 : t.userProperties) == null ? void 0 : s.lentTo) ?? !1;
|
|
164
168
|
},
|
|
165
169
|
isInBasket() {
|
|
166
170
|
var t;
|
|
167
|
-
return ((t = this.basketItems) == null ? void 0 : t.some((
|
|
171
|
+
return ((t = this.basketItems) == null ? void 0 : t.some((s) => s.__typename === "LoanReservation" && s.id === this.loanId)) ?? !1;
|
|
168
172
|
},
|
|
169
173
|
prices() {
|
|
170
|
-
const t = parseFloat(this.unreservedAmount < 25 ? this.minNoteSize : 25),
|
|
174
|
+
const t = parseFloat(this.unreservedAmount < 25 ? this.minNoteSize : 25), s = P(
|
|
171
175
|
this.unreservedAmount,
|
|
172
176
|
this.isCompleteLoanActive,
|
|
173
177
|
t,
|
|
174
178
|
this.enableFiveDollarsNotes,
|
|
175
179
|
this.isVisitor
|
|
176
180
|
);
|
|
177
|
-
return this.maxAmount ?
|
|
181
|
+
return this.maxAmount ? s.filter((i) => parseFloat(i) <= parseFloat(this.maxAmount)) : s;
|
|
178
182
|
},
|
|
179
183
|
presetButtonsPrices() {
|
|
180
184
|
const t = this.prices.slice(0, 3);
|
|
@@ -184,7 +188,7 @@ const w = "Other", nt = T`
|
|
|
184
188
|
if (this.prices.length === 4)
|
|
185
189
|
return [];
|
|
186
190
|
const t = this.prices.slice(this.defaultAmountOptions.length);
|
|
187
|
-
return t.unshift(
|
|
191
|
+
return t.unshift(A), t;
|
|
188
192
|
},
|
|
189
193
|
loanName() {
|
|
190
194
|
var t;
|
|
@@ -254,7 +258,7 @@ const w = "Other", nt = T`
|
|
|
254
258
|
return this.isLentTo && !this.isLessThan25;
|
|
255
259
|
},
|
|
256
260
|
selectedDropdown() {
|
|
257
|
-
return this.selectedDropdownOption !==
|
|
261
|
+
return this.selectedDropdownOption !== A;
|
|
258
262
|
},
|
|
259
263
|
showFilteredDropdown() {
|
|
260
264
|
return this.presetDropdownPrices.length > 1;
|
|
@@ -264,20 +268,28 @@ const w = "Other", nt = T`
|
|
|
264
268
|
}
|
|
265
269
|
},
|
|
266
270
|
watch: {
|
|
267
|
-
unreservedAmount(t,
|
|
268
|
-
var
|
|
269
|
-
t !==
|
|
271
|
+
unreservedAmount(t, s) {
|
|
272
|
+
var i, p;
|
|
273
|
+
t !== s && s === "" && (this.selectedOption = g(
|
|
270
274
|
this.getCookie,
|
|
271
275
|
this.setCookie,
|
|
272
276
|
this.enableFiveDollarsNotes,
|
|
273
|
-
(
|
|
277
|
+
(p = (i = this.route) == null ? void 0 : i.query) == null ? void 0 : p.utm_campaign,
|
|
274
278
|
t,
|
|
275
279
|
this.userBalance,
|
|
276
280
|
this.fiveDollarsSelected,
|
|
277
281
|
this.showPresetAmounts
|
|
278
|
-
)), this.showPresetAmounts && (this.selectedOption =
|
|
282
|
+
)), this.showPresetAmounts && (this.selectedOption = A);
|
|
279
283
|
}
|
|
280
284
|
},
|
|
285
|
+
mounted() {
|
|
286
|
+
typeof window < "u" && (this.viewportWidth = window.innerWidth, this.resizeHandler = C(() => {
|
|
287
|
+
this.viewportWidth = window.innerWidth;
|
|
288
|
+
}, 50), window.addEventListener("resize", this.resizeHandler));
|
|
289
|
+
},
|
|
290
|
+
beforeDestroy() {
|
|
291
|
+
this.resizeHandler && typeof window < "u" && window.removeEventListener("resize", this.resizeHandler);
|
|
292
|
+
},
|
|
281
293
|
methods: {
|
|
282
294
|
async addToBasket() {
|
|
283
295
|
this.kvTrackFunction(
|
|
@@ -325,7 +337,7 @@ const w = "Other", nt = T`
|
|
|
325
337
|
t,
|
|
326
338
|
this.loanId,
|
|
327
339
|
this.loanId
|
|
328
|
-
), this.selectedOption = t, this.selectedDropdownOption =
|
|
340
|
+
), this.selectedOption = t, this.selectedDropdownOption = A;
|
|
329
341
|
},
|
|
330
342
|
handleCheckout() {
|
|
331
343
|
this.kvTrackFunction(
|
|
@@ -337,185 +349,307 @@ const w = "Other", nt = T`
|
|
|
337
349
|
);
|
|
338
350
|
}
|
|
339
351
|
}
|
|
340
|
-
},
|
|
352
|
+
}, E = { class: "tw-whitespace-nowrap" }, R = {
|
|
341
353
|
key: 2,
|
|
342
354
|
class: "tw-w-full tw-text-center tw-rounded tw-p-2",
|
|
343
355
|
style: { background: "#f1f1f1" }
|
|
344
|
-
},
|
|
356
|
+
}, U = { class: "tw-flex" }, z = { class: "md:tw-hidden tw-w-full" }, H = ["disabled"], K = { class: "tw-flex tw-gap-1 lg:tw-gap-2" }, W = ["value"], j = {
|
|
357
|
+
key: 0,
|
|
358
|
+
class: "tw-flex tw-gap-1 tw-mt-1"
|
|
359
|
+
}, q = ["value"], G = {
|
|
360
|
+
key: 1,
|
|
361
|
+
class: "tw-mt-1 mobile-cta-row"
|
|
362
|
+
}, J = { class: "tw-hidden md:tw-block tw-w-full" }, Q = ["disabled"], X = {
|
|
345
363
|
key: 0,
|
|
346
364
|
class: "tw-flex tw-gap-1 lg:tw-gap-2 tw-flex-wrap md:tw-flex-nowrap"
|
|
347
|
-
},
|
|
365
|
+
}, Y = ["value"], Z = {
|
|
348
366
|
key: 1,
|
|
349
367
|
class: "amountDropdownWrapper"
|
|
350
|
-
},
|
|
351
|
-
function
|
|
352
|
-
const
|
|
353
|
-
return
|
|
354
|
-
e.isInBasket ? (
|
|
368
|
+
}, $ = ["value"];
|
|
369
|
+
function ee(t, s, i, p, a, e) {
|
|
370
|
+
const c = b("kv-ui-button"), x = b("kv-material-icon"), B = b("kv-ui-select"), L = b("kv-lend-amount-button");
|
|
371
|
+
return o(), d("div", E, [
|
|
372
|
+
e.isInBasket ? (o(), l(c, {
|
|
355
373
|
key: 0,
|
|
356
374
|
variant: "secondary",
|
|
357
375
|
class: "tw-inline-flex tw-flex-1 tw-w-full",
|
|
358
376
|
"data-testid": "bp-lend-cta-checkout-button",
|
|
359
|
-
to:
|
|
360
|
-
href:
|
|
361
|
-
onClick:
|
|
377
|
+
to: i.externalLinks ? void 0 : "/basket",
|
|
378
|
+
href: i.externalLinks ? "/basket" : void 0,
|
|
379
|
+
onClick: s[0] || (s[0] = (n) => e.clickSecondaryButton(n))
|
|
362
380
|
}, {
|
|
363
|
-
default:
|
|
364
|
-
|
|
381
|
+
default: u(() => [
|
|
382
|
+
w(h(e.loanInBasketButtonText), 1)
|
|
365
383
|
]),
|
|
366
384
|
_: 1
|
|
367
|
-
}, 8, ["to", "href"])) : e.showNonActionableLoanButton ? (
|
|
385
|
+
}, 8, ["to", "href"])) : e.showNonActionableLoanButton ? (o(), l(c, {
|
|
368
386
|
key: 1,
|
|
369
387
|
class: "tw-inline-flex tw-flex-1"
|
|
370
388
|
}, {
|
|
371
|
-
default:
|
|
372
|
-
|
|
389
|
+
default: u(() => [
|
|
390
|
+
w(h(e.ctaButtonText), 1)
|
|
373
391
|
]),
|
|
374
392
|
_: 1
|
|
375
|
-
})) : e.isFunded ? (
|
|
393
|
+
})) : e.isFunded ? (o(), d("div", R, " This loan was just funded! 🎉 ")) : i.showViewLoan ? (o(), l(c, {
|
|
376
394
|
key: 3,
|
|
377
395
|
state: `${e.allSharesReserved ? "disabled" : ""}`,
|
|
378
|
-
to:
|
|
379
|
-
href:
|
|
396
|
+
to: i.externalLinks ? void 0 : e.readMorePath,
|
|
397
|
+
href: i.externalLinks ? e.readMorePath : void 0,
|
|
380
398
|
class: "tw-mb-0",
|
|
381
|
-
onClick:
|
|
399
|
+
onClick: s[1] || (s[1] = (n) => t.$emit("show-loan-details", n))
|
|
382
400
|
}, {
|
|
383
|
-
default:
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
401
|
+
default: u(() => [
|
|
402
|
+
f("span", U, [
|
|
403
|
+
s[7] || (s[7] = w(" View loan ")),
|
|
404
|
+
N(x, {
|
|
387
405
|
class: "tw-w-3 tw-h-3 tw-align-middle",
|
|
388
|
-
icon:
|
|
406
|
+
icon: a.mdiChevronRight
|
|
389
407
|
}, null, 8, ["icon"])
|
|
390
408
|
])
|
|
391
409
|
]),
|
|
392
410
|
_: 1
|
|
393
|
-
}, 8, ["state", "to", "href"])) : e.useFormSubmit ? (
|
|
411
|
+
}, 8, ["state", "to", "href"])) : e.useFormSubmit ? (o(), d("form", {
|
|
394
412
|
key: 4,
|
|
395
413
|
class: "tw-w-full tw-flex",
|
|
396
|
-
onSubmit:
|
|
414
|
+
onSubmit: s[6] || (s[6] = v((...n) => e.addToBasket && e.addToBasket(...n), ["prevent"]))
|
|
397
415
|
}, [
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
+
f("div", z, [
|
|
417
|
+
f("fieldset", {
|
|
418
|
+
class: "tw-w-full tw-min-w-0",
|
|
419
|
+
disabled: i.isAdding,
|
|
420
|
+
"data-testid": "bp-lend-cta-select-and-button-mobile"
|
|
421
|
+
}, [
|
|
422
|
+
i.isAdding ? r("", !0) : (o(), d(k, { key: 0 }, [
|
|
423
|
+
f("div", K, [
|
|
424
|
+
e.isLendAmountButton ? r("", !0) : (o(!0), d(k, { key: 0 }, y(e.presetButtonsPrices, (n) => (o(), l(c, {
|
|
425
|
+
key: "m-" + n,
|
|
426
|
+
variant: "secondary",
|
|
427
|
+
class: m(["preset-option tw-basis-0 tw-flex-1 tw-min-w-0", { "selected-option": a.selectedOption == n }]),
|
|
428
|
+
"data-testid": "bp-lend-cta-lend-button-mobile",
|
|
429
|
+
onClick: (T) => e.clickPresetButton(n)
|
|
430
|
+
}, {
|
|
431
|
+
default: u(() => [
|
|
432
|
+
w(" $" + h(n), 1)
|
|
433
|
+
]),
|
|
434
|
+
_: 2
|
|
435
|
+
}, 1032, ["class", "onClick"]))), 128)),
|
|
436
|
+
e.showFilteredDropdown && a.viewportWidth > 325 ? (o(), l(B, {
|
|
437
|
+
key: 1,
|
|
438
|
+
id: `LoanAmountDropdownMobile_${e.loanId}`,
|
|
439
|
+
modelValue: a.selectedDropdownOption,
|
|
440
|
+
"onUpdate:modelValue": [
|
|
441
|
+
s[2] || (s[2] = (n) => a.selectedDropdownOption = n),
|
|
442
|
+
e.trackLendAmountSelection
|
|
443
|
+
],
|
|
444
|
+
class: m(["filtered-dropdown tw-rounded tw-w-auto tw-flex-none mobile-other-dd tw-min-w-max", {
|
|
445
|
+
"unselected-dropdown": !e.selectedDropdown,
|
|
446
|
+
"selected-dropdown": e.selectedDropdown
|
|
447
|
+
}]),
|
|
448
|
+
"aria-label": "Lend amount",
|
|
449
|
+
onClick: v(e.clickDropdown, ["stop"])
|
|
450
|
+
}, {
|
|
451
|
+
default: u(() => [
|
|
452
|
+
(o(!0), d(k, null, y(e.presetDropdownPrices, (n) => (o(), d("option", {
|
|
453
|
+
key: "m-" + n,
|
|
454
|
+
value: n
|
|
455
|
+
}, h(n !== a.OTHER_OPTION ? `$${n}` : n), 9, W))), 128))
|
|
456
|
+
]),
|
|
457
|
+
_: 1
|
|
458
|
+
}, 8, ["id", "modelValue", "class", "onUpdate:modelValue", "onClick"])) : r("", !0)
|
|
416
459
|
]),
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
460
|
+
a.viewportWidth <= 325 ? (o(), d("div", j, [
|
|
461
|
+
e.showFilteredDropdown ? (o(), l(B, {
|
|
462
|
+
key: 0,
|
|
463
|
+
id: `LoanAmountDropdownMobile_${e.loanId}`,
|
|
464
|
+
modelValue: a.selectedDropdownOption,
|
|
465
|
+
"onUpdate:modelValue": [
|
|
466
|
+
s[3] || (s[3] = (n) => a.selectedDropdownOption = n),
|
|
467
|
+
e.trackLendAmountSelection
|
|
468
|
+
],
|
|
469
|
+
class: m(["filtered-dropdown tw-rounded tw-w-auto tw-flex-none mobile-other-dd", {
|
|
470
|
+
"unselected-dropdown": !e.selectedDropdown,
|
|
471
|
+
"selected-dropdown": e.selectedDropdown
|
|
472
|
+
}]),
|
|
473
|
+
"aria-label": "Lend amount",
|
|
474
|
+
style: { "min-width": "90px", "max-width": "110px" },
|
|
475
|
+
onClick: v(e.clickDropdown, ["stop"])
|
|
476
|
+
}, {
|
|
477
|
+
default: u(() => [
|
|
478
|
+
(o(!0), d(k, null, y(e.presetDropdownPrices, (n) => (o(), d("option", {
|
|
479
|
+
key: "m-" + n,
|
|
480
|
+
value: n
|
|
481
|
+
}, h(n !== a.OTHER_OPTION ? `$${n}` : n), 9, q))), 128))
|
|
482
|
+
]),
|
|
483
|
+
_: 1
|
|
484
|
+
}, 8, ["id", "modelValue", "class", "onUpdate:modelValue", "onClick"])) : r("", !0),
|
|
485
|
+
e.lendButtonVisibility && !e.isLessThan25 && !e.hideLendButton ? (o(), l(c, {
|
|
486
|
+
key: "lendButtonMobile",
|
|
487
|
+
class: "button-ellipsis tw-flex-1",
|
|
488
|
+
"data-testid": "bp-lend-cta-lend-button-mobile",
|
|
489
|
+
type: "submit"
|
|
490
|
+
}, {
|
|
491
|
+
default: u(() => [
|
|
492
|
+
w(h(e.ctaButtonText), 1)
|
|
493
|
+
]),
|
|
494
|
+
_: 1
|
|
495
|
+
})) : r("", !0)
|
|
496
|
+
])) : (o(), d("div", G, [
|
|
497
|
+
e.lendButtonVisibility && !e.isLessThan25 && !e.hideLendButton ? (o(), l(c, {
|
|
498
|
+
key: "lendButtonMobile",
|
|
499
|
+
class: "button-ellipsis tw-w-full",
|
|
500
|
+
"data-testid": "bp-lend-cta-lend-button-mobile",
|
|
501
|
+
type: "submit"
|
|
502
|
+
}, {
|
|
503
|
+
default: u(() => [
|
|
504
|
+
w(h(e.ctaButtonText), 1)
|
|
505
|
+
]),
|
|
506
|
+
_: 1
|
|
507
|
+
})) : r("", !0)
|
|
508
|
+
]))
|
|
509
|
+
], 64)),
|
|
510
|
+
!i.isLoading && i.isAdding ? (o(), l(c, {
|
|
420
511
|
key: 1,
|
|
421
|
-
|
|
422
|
-
modelValue: u.selectedDropdownOption,
|
|
423
|
-
"onUpdate:modelValue": [
|
|
424
|
-
n[2] || (n[2] = (o) => u.selectedDropdownOption = o),
|
|
425
|
-
e.trackLendAmountSelection
|
|
426
|
-
],
|
|
427
|
-
class: f(["tw-min-w-12 tw-rounded filtered-dropdown tw-w-full", {
|
|
428
|
-
"unselected-dropdown": !e.selectedDropdown,
|
|
429
|
-
"selected-dropdown": e.selectedDropdown
|
|
430
|
-
}]),
|
|
431
|
-
"aria-label": "Lend amount",
|
|
432
|
-
onClick: y(e.clickDropdown, ["stop"])
|
|
512
|
+
class: "tw-inline-flex tw-flex-1 tw-w-full"
|
|
433
513
|
}, {
|
|
434
|
-
default:
|
|
435
|
-
(
|
|
436
|
-
|
|
437
|
-
value: o
|
|
438
|
-
}, m(o !== u.OTHER_OPTION ? `$${o}` : o), 9, U))), 128))
|
|
439
|
-
]),
|
|
514
|
+
default: u(() => s[8] || (s[8] = [
|
|
515
|
+
w(" Adding to basket ")
|
|
516
|
+
])),
|
|
440
517
|
_: 1
|
|
441
|
-
}
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
id:
|
|
446
|
-
|
|
447
|
-
"
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
]),
|
|
462
|
-
_: 1
|
|
463
|
-
}, 8, ["id", "modelValue", "onUpdate:modelValue", "onClick"])) : l("", !0)
|
|
464
|
-
])),
|
|
465
|
-
p("div", {
|
|
466
|
-
class: f({
|
|
467
|
-
"tw-min-w-0": s.showPresetAmounts,
|
|
468
|
-
lendButtonWrapper: e.hideShowLendDropdown && !s.showPresetAmounts,
|
|
469
|
-
"tw-hidden": e.hideLendButton
|
|
470
|
-
})
|
|
518
|
+
})) : r("", !0),
|
|
519
|
+
e.isLendAmountButton && !i.enableFiveDollarsNotes ? (o(), l(L, {
|
|
520
|
+
key: 2,
|
|
521
|
+
class: "tw-w-full",
|
|
522
|
+
"loan-id": e.loanId,
|
|
523
|
+
"show-now": !1,
|
|
524
|
+
"amount-left": e.amountForLendAmountButton,
|
|
525
|
+
"is-adding": i.isAdding,
|
|
526
|
+
onAddToBasket: e.addToBasket
|
|
527
|
+
}, null, 8, ["loan-id", "amount-left", "is-adding", "onAddToBasket"])) : r("", !0)
|
|
528
|
+
], 8, H)
|
|
529
|
+
]),
|
|
530
|
+
f("div", J, [
|
|
531
|
+
f("fieldset", {
|
|
532
|
+
class: m(["tw-w-full tw-flex", {
|
|
533
|
+
"tw-flex-col md:tw-flex-row md:tw-justify-between tw-min-w-0": i.showPresetAmounts,
|
|
534
|
+
"tw-gap-1.5": i.showPresetAmounts && !e.isLendAmountButton
|
|
535
|
+
}]),
|
|
536
|
+
disabled: i.isAdding,
|
|
537
|
+
"data-testid": "bp-lend-cta-select-and-button"
|
|
471
538
|
}, [
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
539
|
+
i.showPresetAmounts && !i.isAdding ? (o(), d("div", X, [
|
|
540
|
+
e.isLendAmountButton ? r("", !0) : (o(!0), d(k, { key: 0 }, y(e.presetButtonsPrices, (n) => (o(), l(c, {
|
|
541
|
+
key: n,
|
|
542
|
+
variant: "secondary",
|
|
543
|
+
class: m(["tw-inline-flex tw-flex-1 preset-option tw-w-8", { "selected-option": a.selectedOption == n }]),
|
|
544
|
+
"data-testid": "bp-lend-cta-lend-button",
|
|
545
|
+
onClick: (T) => e.clickPresetButton(n)
|
|
546
|
+
}, {
|
|
547
|
+
default: u(() => [
|
|
548
|
+
w(" $" + h(n), 1)
|
|
549
|
+
]),
|
|
550
|
+
_: 2
|
|
551
|
+
}, 1032, ["class", "onClick"]))), 128)),
|
|
552
|
+
e.showFilteredDropdown ? (o(), l(B, {
|
|
553
|
+
key: 1,
|
|
554
|
+
id: `LoanAmountDropdown_${e.loanId}`,
|
|
555
|
+
modelValue: a.selectedDropdownOption,
|
|
556
|
+
"onUpdate:modelValue": [
|
|
557
|
+
s[4] || (s[4] = (n) => a.selectedDropdownOption = n),
|
|
558
|
+
e.trackLendAmountSelection
|
|
559
|
+
],
|
|
560
|
+
class: m(["tw-min-w-12 tw-rounded filtered-dropdown tw-w-full", {
|
|
561
|
+
"unselected-dropdown": !e.selectedDropdown,
|
|
562
|
+
"selected-dropdown": e.selectedDropdown
|
|
563
|
+
}]),
|
|
564
|
+
"aria-label": "Lend amount",
|
|
565
|
+
onClick: v(e.clickDropdown, ["stop"])
|
|
566
|
+
}, {
|
|
567
|
+
default: u(() => [
|
|
568
|
+
(o(!0), d(k, null, y(e.presetDropdownPrices, (n) => (o(), d("option", {
|
|
569
|
+
key: n,
|
|
570
|
+
value: n
|
|
571
|
+
}, h(n !== a.OTHER_OPTION ? `$${n}` : n), 9, Y))), 128))
|
|
572
|
+
]),
|
|
573
|
+
_: 1
|
|
574
|
+
}, 8, ["id", "modelValue", "class", "onUpdate:modelValue", "onClick"])) : r("", !0)
|
|
575
|
+
])) : i.showPresetAmounts ? r("", !0) : (o(), d("div", Z, [
|
|
576
|
+
e.hideShowLendDropdown && !e.isLessThan25 ? (o(), l(B, {
|
|
577
|
+
key: 0,
|
|
578
|
+
id: `LoanAmountDropdown_${e.loanId}`,
|
|
579
|
+
modelValue: a.selectedOption,
|
|
580
|
+
"onUpdate:modelValue": [
|
|
581
|
+
s[5] || (s[5] = (n) => a.selectedOption = n),
|
|
582
|
+
e.trackLendAmountSelection
|
|
583
|
+
],
|
|
584
|
+
class: "tw-min-w-12",
|
|
585
|
+
style: { "border-radius": "14px 0 0 14px" },
|
|
586
|
+
"aria-label": "Lend amount",
|
|
587
|
+
onClick: v(e.clickDropdown, ["stop"])
|
|
588
|
+
}, {
|
|
589
|
+
default: u(() => [
|
|
590
|
+
(o(!0), d(k, null, y(e.prices, (n) => (o(), d("option", {
|
|
591
|
+
key: n,
|
|
592
|
+
value: n
|
|
593
|
+
}, " $" + h(n), 9, $))), 128))
|
|
594
|
+
]),
|
|
595
|
+
_: 1
|
|
596
|
+
}, 8, ["id", "modelValue", "onUpdate:modelValue", "onClick"])) : r("", !0)
|
|
597
|
+
])),
|
|
598
|
+
f("div", {
|
|
599
|
+
class: m({
|
|
600
|
+
"tw-min-w-0": i.showPresetAmounts,
|
|
601
|
+
lendButtonWrapper: e.hideShowLendDropdown && !i.showPresetAmounts,
|
|
602
|
+
"tw-hidden": e.hideLendButton
|
|
603
|
+
})
|
|
604
|
+
}, [
|
|
605
|
+
e.lendButtonVisibility && !e.isLessThan25 ? (o(), l(c, {
|
|
606
|
+
key: "lendButton",
|
|
607
|
+
class: m(["tw-inline-flex tw-flex-1", { "button-ellipsis tw-w-full": i.showPresetAmounts }]),
|
|
608
|
+
"data-testid": "bp-lend-cta-lend-button",
|
|
609
|
+
type: "submit"
|
|
610
|
+
}, {
|
|
611
|
+
default: u(() => [
|
|
612
|
+
w(h(e.ctaButtonText), 1)
|
|
613
|
+
]),
|
|
614
|
+
_: 1
|
|
615
|
+
}, 8, ["class"])) : e.showLendAgain ? (o(), l(c, {
|
|
616
|
+
key: "lendAgainButton",
|
|
617
|
+
class: m(["lend-again", { "tw-w-full": i.showPresetAmounts }]),
|
|
618
|
+
"data-testid": "bp-lend-cta-lend-again-button",
|
|
619
|
+
type: "submit"
|
|
620
|
+
}, {
|
|
621
|
+
default: u(() => [
|
|
622
|
+
w(h(i.primaryButtonText || "Lend") + " again ", 1)
|
|
623
|
+
]),
|
|
624
|
+
_: 1
|
|
625
|
+
}, 8, ["class"])) : r("", !0)
|
|
626
|
+
], 2),
|
|
627
|
+
e.isLendAmountButton && !i.enableFiveDollarsNotes ? (o(), l(L, {
|
|
628
|
+
key: 2,
|
|
629
|
+
class: "tw-w-full",
|
|
630
|
+
"loan-id": e.loanId,
|
|
631
|
+
"show-now": !1,
|
|
632
|
+
"amount-left": e.amountForLendAmountButton,
|
|
633
|
+
"is-adding": i.isAdding,
|
|
634
|
+
onAddToBasket: e.addToBasket
|
|
635
|
+
}, null, 8, ["loan-id", "amount-left", "is-adding", "onAddToBasket"])) : r("", !0),
|
|
636
|
+
!i.isLoading && i.isAdding ? (o(), l(c, {
|
|
637
|
+
key: 3,
|
|
638
|
+
class: "tw-inline-flex tw-flex-1"
|
|
487
639
|
}, {
|
|
488
|
-
default:
|
|
489
|
-
|
|
490
|
-
]),
|
|
640
|
+
default: u(() => s[9] || (s[9] = [
|
|
641
|
+
w(" Adding to basket ")
|
|
642
|
+
])),
|
|
491
643
|
_: 1
|
|
492
|
-
}
|
|
493
|
-
],
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
class: "tw-w-full",
|
|
497
|
-
"loan-id": e.loanId,
|
|
498
|
-
"show-now": !1,
|
|
499
|
-
"amount-left": e.amountForLendAmountButton,
|
|
500
|
-
"is-adding": s.isAdding,
|
|
501
|
-
onAddToBasket: e.addToBasket
|
|
502
|
-
}, null, 8, ["loan-id", "amount-left", "is-adding", "onAddToBasket"])) : l("", !0),
|
|
503
|
-
!s.isLoading && s.isAdding ? (i(), r(h, {
|
|
504
|
-
key: 3,
|
|
505
|
-
class: "tw-inline-flex tw-flex-1"
|
|
506
|
-
}, {
|
|
507
|
-
default: d(() => n[6] || (n[6] = [
|
|
508
|
-
c(" Adding to basket ")
|
|
509
|
-
])),
|
|
510
|
-
_: 1
|
|
511
|
-
})) : l("", !0)
|
|
512
|
-
], 10, R)
|
|
513
|
-
], 32)) : l("", !0)
|
|
644
|
+
})) : r("", !0)
|
|
645
|
+
], 10, Q)
|
|
646
|
+
])
|
|
647
|
+
], 32)) : r("", !0)
|
|
514
648
|
]);
|
|
515
649
|
}
|
|
516
|
-
const
|
|
650
|
+
const me = /* @__PURE__ */ O(M, [["render", ee], ["__scopeId", "data-v-ce2eaa1b"]]);
|
|
517
651
|
export {
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
652
|
+
ce as KV_LEND_CTA_FRAGMENT,
|
|
653
|
+
we as KV_LEND_CTA_USER_FRAGMENT,
|
|
654
|
+
me as default
|
|
521
655
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.header-link[data-v-
|
|
1
|
+
.header-link[data-v-ae8c3f96]{cursor:pointer;padding:1rem .5rem;--tw-text-opacity: 1;color:rgba(var(--text-primary),var(--tw-text-opacity, 1));text-decoration-line:none}.header-link[data-v-ae8c3f96]:hover{--tw-text-opacity: 1;color:rgba(var(--text-action),var(--tw-text-opacity, 1));text-decoration-line:none}@media (min-width: 64rem){.header-link[data-v-ae8c3f96]{padding-left:1.25rem;padding-right:1.25rem}}
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import { defineAsyncComponent as
|
|
2
|
-
import { mdiAccountCircle as
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import { throttle as
|
|
1
|
+
import { defineAsyncComponent as w, ref as l, computed as P, onMounted as z, onUnmounted as W, resolveComponent as g, resolveDirective as j, openBlock as i, createElementBlock as c, withDirectives as u, normalizeClass as b, createVNode as U, createBlock as h, withCtx as p, createTextVNode as M, createElementVNode as D, createCommentVNode as k, toDisplayString as F } from "vue";
|
|
2
|
+
import { mdiAccountCircle as q, mdiChevronDown as G, mdiMagnify as J, mdiMenu as Q } from "@mdi/js";
|
|
3
|
+
import X from "numeral";
|
|
4
|
+
import Y from "../KvMaterialIcon.js";
|
|
5
|
+
import Z from "../KvIconBag.js";
|
|
6
|
+
import $ from "./KvHeaderDropdownLink.js";
|
|
7
|
+
import ee from "../KvUserAvatar.js";
|
|
8
|
+
import { throttle as ne } from "../../utils/throttle.js";
|
|
9
9
|
import "./KvHeaderLinkBar.css";
|
|
10
|
-
import
|
|
11
|
-
const
|
|
10
|
+
import te from "../../_virtual/_plugin-vue_export-helper.js";
|
|
11
|
+
const oe = w(() => import("./KvHeaderMobileMenu.js")), O = w(() => import("./KvHeaderMyKivaMenu.js")), re = w(() => import("./LendMenu/KvLendMenu.js")), le = w(() => import("./KvHeaderTakeActionMenu.js")), ie = w(() => import("./KvHeaderAboutMenu.js")), C = 118, T = "avatar-menu", ae = {
|
|
12
12
|
components: {
|
|
13
|
-
KvMaterialIcon:
|
|
14
|
-
KvIconBag:
|
|
15
|
-
KvHeaderDropdownLink:
|
|
16
|
-
KvUserAvatar:
|
|
13
|
+
KvMaterialIcon: Y,
|
|
14
|
+
KvIconBag: Z,
|
|
15
|
+
KvHeaderDropdownLink: $,
|
|
16
|
+
KvUserAvatar: ee
|
|
17
17
|
},
|
|
18
18
|
props: {
|
|
19
19
|
loggedIn: {
|
|
@@ -56,175 +56,188 @@ const Z = f(() => import("./KvHeaderMobileMenu.js")), C = f(() => import("./KvHe
|
|
|
56
56
|
emits: [
|
|
57
57
|
"item-hover"
|
|
58
58
|
],
|
|
59
|
-
setup(
|
|
60
|
-
const
|
|
61
|
-
e("item-hover",
|
|
62
|
-
},
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
}
|
|
81
|
-
|
|
59
|
+
setup(d, { emit: e }) {
|
|
60
|
+
const t = l(null), n = l(null), K = l(null), x = l(null), A = l(null), f = l(null), H = l(null), y = l(null), a = l(null), o = l(null), m = (r, v, s = null) => {
|
|
61
|
+
e("item-hover", r, v, s);
|
|
62
|
+
}, _ = (r, v, s = null) => {
|
|
63
|
+
d.isMobile || m(r, v, s);
|
|
64
|
+
}, S = (r) => {
|
|
65
|
+
o.value === r && (o.value = null, m());
|
|
66
|
+
}, E = () => {
|
|
67
|
+
var B, N;
|
|
68
|
+
const r = (N = (B = t.value) == null ? void 0 : B.userAvatar) == null ? void 0 : N.getBoundingClientRect();
|
|
69
|
+
if (!r) return null;
|
|
70
|
+
const s = r.left + r.width / 2 - C / 2;
|
|
71
|
+
return {
|
|
72
|
+
...s + C > window.outerWidth ? { right: 0 } : { left: d.isMobile ? 0 : `${s}px` },
|
|
73
|
+
borderRadius: "0px 0px 8px 8px",
|
|
74
|
+
width: d.isMobile ? "100%" : "auto"
|
|
75
|
+
};
|
|
76
|
+
}, I = () => {
|
|
77
|
+
o.value = T, m(t.value, O, E());
|
|
78
|
+
}, V = (r, v) => {
|
|
79
|
+
!o.value || o.value !== r ? (o.value = r, r === T ? I() : m(r, v)) : (o.value = null, m());
|
|
80
|
+
}, L = ne(() => {
|
|
81
|
+
d.openMenuItem && I();
|
|
82
|
+
}, 50), R = P(() => d.isMobile ? void 0 : "/lend-by-category");
|
|
83
|
+
return z(() => {
|
|
84
|
+
import("./KvHeaderMobileMenu.js"), import("./KvHeaderMyKivaMenu.js"), import("./LendMenu/KvLendMenu.js"), import("./KvHeaderTakeActionMenu.js"), import("./KvHeaderAboutMenu.js"), window.addEventListener("resize", L);
|
|
85
|
+
}), W(() => {
|
|
86
|
+
window.removeEventListener("resize", L);
|
|
82
87
|
}), {
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
88
|
+
AVATAR_MENU_ID: T,
|
|
89
|
+
openMenuId: o,
|
|
90
|
+
numeral: X,
|
|
91
|
+
mdiAccountCircle: q,
|
|
92
|
+
mdiChevronDown: G,
|
|
93
|
+
mdiMagnify: J,
|
|
94
|
+
mdiMenu: Q,
|
|
95
|
+
onHover: m,
|
|
96
|
+
avatar: t,
|
|
90
97
|
lendButton: n,
|
|
91
|
-
aboutUsLink:
|
|
92
|
-
partnerWithUsLink:
|
|
93
|
-
borrowLink:
|
|
94
|
-
supportKivaLink:
|
|
98
|
+
aboutUsLink: K,
|
|
99
|
+
partnerWithUsLink: x,
|
|
100
|
+
borrowLink: A,
|
|
101
|
+
supportKivaLink: f,
|
|
95
102
|
basketLink: H,
|
|
96
103
|
signInLink: y,
|
|
97
|
-
menuButton:
|
|
98
|
-
lendUrl:
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
104
|
+
menuButton: a,
|
|
105
|
+
lendUrl: R,
|
|
106
|
+
handleOnHover: _,
|
|
107
|
+
handleTouchStart: V,
|
|
108
|
+
handleMouseOut: S,
|
|
109
|
+
handleAvatarMenuPosition: I,
|
|
110
|
+
KvHeaderMobileMenu: oe,
|
|
111
|
+
KvHeaderMyKivaMenu: O,
|
|
112
|
+
KvLendMenu: re,
|
|
113
|
+
KvHeaderTakeActionMenu: le,
|
|
114
|
+
KvHeaderAboutMenu: ie
|
|
105
115
|
};
|
|
106
116
|
}
|
|
107
|
-
},
|
|
117
|
+
}, ue = { class: "tw-h-full tw-flex tw-items-center" }, de = ["href"], me = {
|
|
108
118
|
key: 0,
|
|
109
119
|
class: "tw-bg-eco-green-1 tw-py-0.5 tw-px-1 tw-text-eco-green-4"
|
|
110
|
-
},
|
|
111
|
-
function
|
|
112
|
-
const
|
|
113
|
-
return i(),
|
|
114
|
-
|
|
120
|
+
}, ve = ["href"];
|
|
121
|
+
function se(d, e, t, n, K, x) {
|
|
122
|
+
const A = g("kv-material-icon"), f = g("KvHeaderDropdownLink"), H = g("kv-icon-bag"), y = g("KvUserAvatar"), a = j("kv-track-event");
|
|
123
|
+
return i(), c("div", ue, [
|
|
124
|
+
u((i(), c("button", {
|
|
115
125
|
ref: "menuButton",
|
|
116
|
-
class:
|
|
117
|
-
"tw-text-tertiary":
|
|
126
|
+
class: b(["header-link tw-inline-flex lg:tw-hidden", {
|
|
127
|
+
"tw-text-tertiary": t.openMenuItem && t.openMenuItem !== n.KvHeaderMobileMenu
|
|
118
128
|
}]),
|
|
119
|
-
onMouseover: e[0] || (e[0] = (
|
|
120
|
-
onMouseout: e[1] || (e[1] = (
|
|
129
|
+
onMouseover: e[0] || (e[0] = (o) => n.handleOnHover(n.menuButton, n.KvHeaderMobileMenu)),
|
|
130
|
+
onMouseout: e[1] || (e[1] = (o) => n.handleMouseOut("menuButton")),
|
|
131
|
+
onTouchstart: e[2] || (e[2] = (o) => n.handleTouchStart("menuButton", n.KvHeaderMobileMenu))
|
|
121
132
|
}, [
|
|
122
|
-
|
|
133
|
+
U(A, { icon: n.mdiMenu }, null, 8, ["icon"])
|
|
123
134
|
], 34)), [
|
|
124
|
-
[
|
|
135
|
+
[a, t.openMenuItem === n.KvHeaderMobileMenu ? ["TopNav", "click-Hamburger-menu"] : null]
|
|
125
136
|
]),
|
|
126
|
-
|
|
137
|
+
u((i(), h(f, {
|
|
127
138
|
"ref-name": "lendButton",
|
|
128
139
|
href: n.lendUrl,
|
|
129
140
|
"menu-component": n.KvLendMenu,
|
|
130
|
-
"open-menu-item":
|
|
141
|
+
"open-menu-item": t.openMenuItem,
|
|
131
142
|
"dropdown-icon": n.mdiChevronDown,
|
|
132
143
|
"base-class": "tw-inline-flex",
|
|
133
|
-
onOnHover: n.
|
|
134
|
-
onMouseout: e[
|
|
144
|
+
onOnHover: n.handleOnHover,
|
|
145
|
+
onMouseout: e[3] || (e[3] = (o) => n.handleMouseOut("lendButton")),
|
|
146
|
+
onTouchstart: e[4] || (e[4] = (o) => n.handleTouchStart("lendButton", n.KvLendMenu))
|
|
135
147
|
}, {
|
|
136
|
-
default:
|
|
137
|
-
|
|
148
|
+
default: p(() => e[10] || (e[10] = [
|
|
149
|
+
M(" Lend ")
|
|
138
150
|
])),
|
|
139
151
|
_: 1
|
|
140
152
|
}, 8, ["href", "menu-component", "open-menu-item", "dropdown-icon", "onOnHover"])), [
|
|
141
|
-
[
|
|
153
|
+
[a, ["TopNav", "click-Lend"]]
|
|
142
154
|
]),
|
|
143
|
-
|
|
155
|
+
u((i(), h(f, {
|
|
144
156
|
"ref-name": "takeActionButton",
|
|
145
157
|
"base-class": "tw-hidden lg:tw-inline-flex",
|
|
146
158
|
"menu-component": n.KvHeaderTakeActionMenu,
|
|
147
|
-
"open-menu-item":
|
|
159
|
+
"open-menu-item": t.openMenuItem,
|
|
148
160
|
"dropdown-icon": n.mdiChevronDown,
|
|
149
161
|
"send-link-position": "",
|
|
150
162
|
onOnHover: n.onHover,
|
|
151
|
-
onMouseout: e[
|
|
163
|
+
onMouseout: e[5] || (e[5] = (o) => n.onHover())
|
|
152
164
|
}, {
|
|
153
|
-
default:
|
|
154
|
-
|
|
165
|
+
default: p(() => e[11] || (e[11] = [
|
|
166
|
+
M(" Take action ")
|
|
155
167
|
])),
|
|
156
168
|
_: 1
|
|
157
169
|
}, 8, ["menu-component", "open-menu-item", "dropdown-icon", "onOnHover"])), [
|
|
158
|
-
[
|
|
170
|
+
[a, ["TopNav", "click-TakeAction"]]
|
|
159
171
|
]),
|
|
160
|
-
|
|
172
|
+
u((i(), h(f, {
|
|
161
173
|
"ref-name": "aboutUsLink",
|
|
162
174
|
"base-class": "tw-hidden lg:tw-inline-flex",
|
|
163
175
|
"menu-component": n.KvHeaderAboutMenu,
|
|
164
|
-
"open-menu-item":
|
|
176
|
+
"open-menu-item": t.openMenuItem,
|
|
165
177
|
"dropdown-icon": n.mdiChevronDown,
|
|
166
178
|
"send-link-position": "",
|
|
167
179
|
onOnHover: n.onHover,
|
|
168
|
-
onMouseout: e[
|
|
180
|
+
onMouseout: e[6] || (e[6] = (o) => n.onHover())
|
|
169
181
|
}, {
|
|
170
|
-
default:
|
|
171
|
-
|
|
182
|
+
default: p(() => e[12] || (e[12] = [
|
|
183
|
+
M(" About ")
|
|
172
184
|
])),
|
|
173
185
|
_: 1
|
|
174
186
|
}, 8, ["menu-component", "open-menu-item", "dropdown-icon", "onOnHover"])), [
|
|
175
|
-
[
|
|
187
|
+
[a, ["TopNav", "click-About"]]
|
|
176
188
|
]),
|
|
177
|
-
e[
|
|
178
|
-
|
|
189
|
+
e[15] || (e[15] = D("div", { class: "tw-flex-1 tw-h-full" }, null, -1)),
|
|
190
|
+
t.loggedIn ? u((i(), c("a", {
|
|
179
191
|
key: 0,
|
|
180
192
|
ref: "dashboardLink",
|
|
181
|
-
href:
|
|
182
|
-
class:
|
|
183
|
-
}, e[
|
|
184
|
-
|
|
185
|
-
]), 10,
|
|
186
|
-
[
|
|
187
|
-
]) :
|
|
188
|
-
|
|
193
|
+
href: t.myDashboardUrl,
|
|
194
|
+
class: b(["header-link tw-hidden lg:tw-block", { "tw-text-tertiary": !!t.openMenuItem }])
|
|
195
|
+
}, e[13] || (e[13] = [
|
|
196
|
+
M(" My dashboard ")
|
|
197
|
+
]), 10, de)), [
|
|
198
|
+
[a, ["TopNav", "click-Dashboard"]]
|
|
199
|
+
]) : k("", !0),
|
|
200
|
+
t.basketCount > 0 ? u((i(), c("a", {
|
|
189
201
|
key: 1,
|
|
190
202
|
ref: "basketLink",
|
|
191
203
|
href: "/basket",
|
|
192
|
-
class:
|
|
204
|
+
class: b(["header-link tw-relative", { "tw-text-tertiary": !!t.openMenuItem }])
|
|
193
205
|
}, [
|
|
194
|
-
|
|
206
|
+
U(H, {
|
|
195
207
|
class: "tw-w-3 tw-h-3 tw-pointer-events-none",
|
|
196
|
-
count:
|
|
208
|
+
count: t.basketCount
|
|
197
209
|
}, null, 8, ["count"])
|
|
198
210
|
], 2)), [
|
|
199
|
-
[
|
|
200
|
-
]) :
|
|
201
|
-
|
|
211
|
+
[a, ["TopNav", "click-Basket"]]
|
|
212
|
+
]) : k("", !0),
|
|
213
|
+
D("div", {
|
|
202
214
|
class: "tw-cursor-pointer tw-flex tw-items-center tw-gap-1",
|
|
203
|
-
onMouseover: e[
|
|
204
|
-
onMouseout: e[
|
|
215
|
+
onMouseover: e[7] || (e[7] = (...o) => n.handleAvatarMenuPosition && n.handleAvatarMenuPosition(...o)),
|
|
216
|
+
onMouseout: e[8] || (e[8] = (o) => n.handleMouseOut(n.AVATAR_MENU_ID)),
|
|
217
|
+
onTouchstart: e[9] || (e[9] = (o) => n.handleTouchStart(n.AVATAR_MENU_ID))
|
|
205
218
|
}, [
|
|
206
|
-
|
|
207
|
-
|
|
219
|
+
t.loggedIn ? (i(), c("span", me, F(n.numeral(t.balance).format("$0")), 1)) : k("", !0),
|
|
220
|
+
t.loggedIn ? (i(), h(y, {
|
|
208
221
|
key: 1,
|
|
209
222
|
ref: "avatar",
|
|
210
|
-
"lender-name":
|
|
211
|
-
"lender-image-url":
|
|
223
|
+
"lender-name": t.lenderName,
|
|
224
|
+
"lender-image-url": t.lenderImageUrl,
|
|
212
225
|
"is-small": ""
|
|
213
|
-
}, null, 8, ["lender-name", "lender-image-url"])) :
|
|
226
|
+
}, null, 8, ["lender-name", "lender-image-url"])) : k("", !0)
|
|
214
227
|
], 32),
|
|
215
|
-
|
|
228
|
+
t.loggedIn ? k("", !0) : u((i(), c("a", {
|
|
216
229
|
key: 2,
|
|
217
230
|
ref: "signInLink",
|
|
218
|
-
href:
|
|
219
|
-
class:
|
|
220
|
-
}, e[
|
|
221
|
-
|
|
222
|
-
]), 10,
|
|
223
|
-
[
|
|
231
|
+
href: t.loginUrl,
|
|
232
|
+
class: b(["header-link", { "tw-text-tertiary": !!t.openMenuItem }])
|
|
233
|
+
}, e[14] || (e[14] = [
|
|
234
|
+
M(" Sign in ")
|
|
235
|
+
]), 10, ve)), [
|
|
236
|
+
[a, ["TopNav", "click-Sign-in"]]
|
|
224
237
|
])
|
|
225
238
|
]);
|
|
226
239
|
}
|
|
227
|
-
const
|
|
240
|
+
const Ie = /* @__PURE__ */ te(ae, [["render", se], ["__scopeId", "data-v-ae8c3f96"]]);
|
|
228
241
|
export {
|
|
229
|
-
|
|
242
|
+
Ie as default
|
|
230
243
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.mobile-link[data-v-
|
|
1
|
+
.mobile-link[data-v-463ea821]{--tw-text-opacity: 1;color:rgba(var(--text-primary),var(--tw-text-opacity, 1));text-decoration-line:none}.mobile-link[data-v-463ea821]:hover{--tw-text-opacity: 1;color:rgba(var(--text-action),var(--tw-text-opacity, 1));text-decoration-line:none}
|
|
@@ -74,7 +74,10 @@ const b = {
|
|
|
74
74
|
function $(H, e, M, S, p, V) {
|
|
75
75
|
const c = k("KvAccordionItem"), i = v("kv-track-event");
|
|
76
76
|
return t(), o("nav", _, [
|
|
77
|
-
d(c, {
|
|
77
|
+
d(c, {
|
|
78
|
+
open: "",
|
|
79
|
+
class: "tw-w-full tw-border-b-0"
|
|
80
|
+
}, {
|
|
78
81
|
header: a(() => e[0] || (e[0] = [
|
|
79
82
|
l("h3", null, "Take action", -1)
|
|
80
83
|
])),
|
|
@@ -147,7 +150,7 @@ function $(H, e, M, S, p, V) {
|
|
|
147
150
|
})
|
|
148
151
|
]);
|
|
149
152
|
}
|
|
150
|
-
const q = /* @__PURE__ */ h(b, [["render", $], ["__scopeId", "data-v-
|
|
153
|
+
const q = /* @__PURE__ */ h(b, [["render", $], ["__scopeId", "data-v-463ea821"]]);
|
|
151
154
|
export {
|
|
152
155
|
q as default
|
|
153
156
|
};
|
package/dist/vue/KvWwwHeader.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.header-margins[data-v-
|
|
1
|
+
.header-margins[data-v-c4b7061b]{margin:0 auto;max-width:1400px}.header-fade-enter-active[data-v-c4b7061b]{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.3s}.header-fade-leave-active[data-v-c4b7061b]{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.1s}.header-fade-enter[data-v-c4b7061b],.header-fade-leave-to[data-v-c4b7061b]{opacity:0}.header-fade-leave[data-v-c4b7061b],.header-fade-enter-to[data-v-c4b7061b]{opacity:1}.bg-opacity-50[data-v-c4b7061b]{background-color:rgba(var(--bg-action-highlight),.5)}
|
package/dist/vue/KvWwwHeader.js
CHANGED
|
@@ -78,7 +78,7 @@ const T = {
|
|
|
78
78
|
position: "absolute"
|
|
79
79
|
})) : l.value && (d = setTimeout(() => {
|
|
80
80
|
l.value = !1, a.value = null;
|
|
81
|
-
},
|
|
81
|
+
}, 50));
|
|
82
82
|
},
|
|
83
83
|
loadMenuData: (_) => {
|
|
84
84
|
var o;
|
|
@@ -101,7 +101,7 @@ const T = {
|
|
|
101
101
|
style: { top: "3.75rem" }
|
|
102
102
|
}, V = { class: "header-margins tw-px-2.5" };
|
|
103
103
|
function z(I, n, e, t, l, a) {
|
|
104
|
-
const s = c("kv-header-link-bar"), r = c("kv-header-logo"), d = c("kv-theme-provider"),
|
|
104
|
+
const s = c("kv-header-link-bar"), r = c("kv-header-logo"), d = c("kv-theme-provider"), b = M("kv-track-event");
|
|
105
105
|
return v(), y(d, { tag: "div" }, {
|
|
106
106
|
default: f(() => [
|
|
107
107
|
m("nav", S, [
|
|
@@ -127,7 +127,7 @@ function z(I, n, e, t, l, a) {
|
|
|
127
127
|
g((v(), C("a", E, [
|
|
128
128
|
u(r)
|
|
129
129
|
])), [
|
|
130
|
-
[
|
|
130
|
+
[b, ["TopNav", "click-Logo"]]
|
|
131
131
|
])
|
|
132
132
|
]),
|
|
133
133
|
u(k, { name: "header-fade" }, {
|
|
@@ -136,8 +136,8 @@ function z(I, n, e, t, l, a) {
|
|
|
136
136
|
m("div", {
|
|
137
137
|
class: "tw-bg-primary",
|
|
138
138
|
style: H(t.menuPosition),
|
|
139
|
-
onMouseover: n[0] || (n[0] = (
|
|
140
|
-
onMouseout: n[1] || (n[1] = (
|
|
139
|
+
onMouseover: n[0] || (n[0] = (w) => t.onHover(t.activeHeaderItem, t.menuComponent)),
|
|
140
|
+
onMouseout: n[1] || (n[1] = (w) => t.onHover())
|
|
141
141
|
}, [
|
|
142
142
|
m("div", V, [
|
|
143
143
|
(v(), y(B(t.menuComponent), {
|
|
@@ -163,7 +163,7 @@ function z(I, n, e, t, l, a) {
|
|
|
163
163
|
_: 1
|
|
164
164
|
});
|
|
165
165
|
}
|
|
166
|
-
const A = /* @__PURE__ */ N(T, [["render", z], ["__scopeId", "data-v-
|
|
166
|
+
const A = /* @__PURE__ */ N(T, [["render", z], ["__scopeId", "data-v-c4b7061b"]]);
|
|
167
167
|
export {
|
|
168
168
|
A as default
|
|
169
169
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kiva/kv-components",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.49.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -113,5 +113,5 @@
|
|
|
113
113
|
"embla-carousel-fade",
|
|
114
114
|
"popper.js"
|
|
115
115
|
],
|
|
116
|
-
"gitHead": "
|
|
116
|
+
"gitHead": "f03ff523198dcc597eebe95a49a39847fb1d37e0"
|
|
117
117
|
}
|