@kiva/kv-components 8.16.1 → 8.17.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/utils/useTypeaheadSearch.d.ts +1 -1
- package/dist/utils/useTypeaheadSearch.js +33 -32
- package/dist/vue/KvLoanTag.js +21 -21
- package/dist/vue/KvLoanTag2.js +2 -1
- package/dist/vue/KvWwwHeaderBasic/KvWwwHeaderBasic.css +1 -1
- package/dist/vue/KvWwwHeaderBasic/KvWwwHeaderBasic.js +63 -61
- package/dist/vue/KvWwwHeaderBasic/KvWwwHeaderBasic2.js +100 -68
- package/dist/vue/KvWwwHeaderBasic/LinkBar.vue.d.ts +19 -0
- package/dist/vue/KvWwwHeaderBasic/MyKivaMenu.css +1 -1
- package/dist/vue/KvWwwHeaderBasic/MyKivaMenu.js +96 -54
- package/dist/vue/KvWwwHeaderBasic/MyKivaMenu.vue.d.ts +19 -0
- package/dist/vue/KvWwwHeaderBasic/MyKivaMenu2.js +21 -11
- package/dist/vue/KvWwwHeaderBasic/SearchBar2.js +26 -26
- package/package.json +2 -2
|
@@ -10,7 +10,7 @@ export interface ResultGroup {
|
|
|
10
10
|
group: string;
|
|
11
11
|
items: SearchSuggestion[];
|
|
12
12
|
}
|
|
13
|
-
export declare function useTypeaheadSearch(source: Ref<SearchSuggestion[]>, appOrigin: string): {
|
|
13
|
+
export declare function useTypeaheadSearch(source: Ref<SearchSuggestion[]>, appOrigin: Ref<string> | string): {
|
|
14
14
|
term: Ref<string, string>;
|
|
15
15
|
rawResults: Ref<any, any>;
|
|
16
16
|
activeIndex: Ref<number, number>;
|
|
@@ -1,36 +1,37 @@
|
|
|
1
|
-
import { ref as o, watch as
|
|
2
|
-
import
|
|
3
|
-
import { GIFT_SUGGESTIONS as
|
|
4
|
-
const
|
|
5
|
-
function
|
|
6
|
-
return Object.keys(u).some((
|
|
1
|
+
import { ref as o, watch as g, computed as v, unref as E } from "vue";
|
|
2
|
+
import S from "./typeaheadSearchEngine.js";
|
|
3
|
+
import { GIFT_SUGGESTIONS as R, MAX_PER_GROUP as O, SECTION_ORDER as m } from "./typeaheadSearchConfig.js";
|
|
4
|
+
const _ = ["activity", "city_state", "loanTags", "state", "loanLimit"];
|
|
5
|
+
function T(u) {
|
|
6
|
+
return Object.keys(u).some((a) => _.includes(a));
|
|
7
7
|
}
|
|
8
8
|
function y(u) {
|
|
9
|
-
return u &&
|
|
9
|
+
return u && T(u) ? "/lend" : "/lend/filter";
|
|
10
10
|
}
|
|
11
|
-
function
|
|
12
|
-
const
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
}, { immediate: !0 }),
|
|
16
|
-
if (
|
|
17
|
-
|
|
11
|
+
function I(u, a) {
|
|
12
|
+
const i = new S(), n = o(""), s = o([]), l = o(-1);
|
|
13
|
+
g(u, (e) => {
|
|
14
|
+
i.reset([...e ?? [], ...R]);
|
|
15
|
+
}, { immediate: !0 }), g(n, async (e) => {
|
|
16
|
+
if (l.value = -1, !e) {
|
|
17
|
+
s.value = [];
|
|
18
18
|
return;
|
|
19
19
|
}
|
|
20
|
-
|
|
20
|
+
s.value = await i.search(e);
|
|
21
21
|
});
|
|
22
|
-
const
|
|
22
|
+
const p = v(() => {
|
|
23
23
|
const e = /* @__PURE__ */ new Map();
|
|
24
|
-
return
|
|
25
|
-
const
|
|
26
|
-
|
|
27
|
-
}), [...e.keys()].sort((
|
|
24
|
+
return s.value.forEach((r) => {
|
|
25
|
+
const t = e.get(r.group) ?? [];
|
|
26
|
+
t.length < O && t.push(r), e.set(r.group, t);
|
|
27
|
+
}), [...e.keys()].sort((r, t) => m.indexOf(r) - m.indexOf(t)).map((r) => ({ group: r, items: e.get(r) ?? [] }));
|
|
28
28
|
});
|
|
29
|
-
function
|
|
29
|
+
function d(e) {
|
|
30
|
+
const r = E(a);
|
|
30
31
|
if (typeof e == "string") {
|
|
31
32
|
const f = { queryString: e };
|
|
32
33
|
return {
|
|
33
|
-
url: `${
|
|
34
|
+
url: `${r}${y(f)}`,
|
|
34
35
|
query: f,
|
|
35
36
|
suggestion: null,
|
|
36
37
|
term: e
|
|
@@ -41,24 +42,24 @@ function w(u, n) {
|
|
|
41
42
|
url: e.url,
|
|
42
43
|
query: null,
|
|
43
44
|
suggestion: e,
|
|
44
|
-
term:
|
|
45
|
+
term: n.value
|
|
45
46
|
};
|
|
46
|
-
const [t,
|
|
47
|
+
const [t, h] = (e.query ?? "").split("="), c = t ? { [t]: h } : null;
|
|
47
48
|
return {
|
|
48
|
-
url: `${
|
|
49
|
+
url: `${r}${y(c)}`,
|
|
49
50
|
query: c,
|
|
50
51
|
suggestion: e,
|
|
51
|
-
term:
|
|
52
|
+
term: n.value
|
|
52
53
|
};
|
|
53
54
|
}
|
|
54
55
|
return {
|
|
55
|
-
term:
|
|
56
|
-
rawResults:
|
|
57
|
-
activeIndex:
|
|
58
|
-
groupedResults:
|
|
59
|
-
resolveSubmit:
|
|
56
|
+
term: n,
|
|
57
|
+
rawResults: s,
|
|
58
|
+
activeIndex: l,
|
|
59
|
+
groupedResults: p,
|
|
60
|
+
resolveSubmit: d
|
|
60
61
|
};
|
|
61
62
|
}
|
|
62
63
|
export {
|
|
63
|
-
|
|
64
|
+
I as useTypeaheadSearch
|
|
64
65
|
};
|
package/dist/vue/KvLoanTag.js
CHANGED
|
@@ -1,44 +1,44 @@
|
|
|
1
1
|
import u from "./KvLoanTag2.js";
|
|
2
|
-
import { KV_LOAN_TAG_FRAGMENT as
|
|
3
|
-
import { resolveComponent as c, openBlock as e, createElementBlock as a, normalizeClass as _, normalizeStyle as g, Fragment as
|
|
4
|
-
import
|
|
5
|
-
const
|
|
6
|
-
function v(M, N,
|
|
7
|
-
const
|
|
2
|
+
import { KV_LOAN_TAG_FRAGMENT as L } 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 r, createElementVNode as h, createVNode as p, withCtx as f, renderList as k, createBlock as w, createCommentVNode as d } from "vue";
|
|
4
|
+
import x from "../_virtual/_plugin-vue_export-helper.js";
|
|
5
|
+
const y = ["id"];
|
|
6
|
+
function v(M, N, l, A, C, t) {
|
|
7
|
+
const m = c("kv-tooltip"), s = c("kv-countdown-timer");
|
|
8
8
|
return t.variation ? (e(), a("div", {
|
|
9
9
|
key: 0,
|
|
10
10
|
class: _(["tw-text-small tw-font-medium tw-pt-0.5", { "tw-line-clamp-1": !t.isMultipleMatch }]),
|
|
11
11
|
style: g({ color: t.tagColor })
|
|
12
12
|
}, [
|
|
13
|
-
t.isMultipleMatch ? (e(), a(
|
|
13
|
+
t.isMultipleMatch ? (e(), a(o, { key: 0 }, [
|
|
14
14
|
i(r(t.totalMatchRatio) + "x match by ", 1),
|
|
15
15
|
h("span", {
|
|
16
|
-
id: `matching-orgs-${
|
|
16
|
+
id: `matching-orgs-${l.loan.id}`,
|
|
17
17
|
class: "tw-underline tw-decoration-dotted tw-cursor-pointer"
|
|
18
|
-
}, r(t.multiMatchingOrgs.length) + " organizations", 9,
|
|
19
|
-
|
|
20
|
-
controller: `matching-orgs-${
|
|
18
|
+
}, r(t.multiMatchingOrgs.length) + " organizations", 9, y),
|
|
19
|
+
p(m, {
|
|
20
|
+
controller: `matching-orgs-${l.loan.id}`,
|
|
21
21
|
theme: "default"
|
|
22
22
|
}, {
|
|
23
|
-
default:
|
|
24
|
-
(e(!0), a(
|
|
25
|
-
key: n.
|
|
23
|
+
default: f(() => [
|
|
24
|
+
(e(!0), a(o, null, k(t.multiMatchingOrgs, (n) => (e(), a("p", {
|
|
25
|
+
key: n.managedAccountId,
|
|
26
26
|
class: "tw-m-0"
|
|
27
|
-
}, r(n.ratio + 1) + "x matching by " + r(n.displayName), 1))), 128))
|
|
27
|
+
}, r(n.ratio + 1) + "x matching by " + r(n.displayName || "a Kiva supporter"), 1))), 128))
|
|
28
28
|
]),
|
|
29
29
|
_: 1
|
|
30
30
|
}, 8, ["controller"])
|
|
31
|
-
], 64)) : (e(), a(
|
|
31
|
+
], 64)) : (e(), a(o, { key: 1 }, [
|
|
32
32
|
i(r(t.tagText) + " ", 1),
|
|
33
|
-
t.variation === "ending-soon" ? (e(),
|
|
33
|
+
t.variation === "ending-soon" ? (e(), w(s, {
|
|
34
34
|
key: 0,
|
|
35
35
|
deadline: t.deadline
|
|
36
|
-
}, null, 8, ["deadline"])) :
|
|
36
|
+
}, null, 8, ["deadline"])) : d("", !0)
|
|
37
37
|
], 64))
|
|
38
|
-
], 6)) :
|
|
38
|
+
], 6)) : d("", !0);
|
|
39
39
|
}
|
|
40
|
-
const B = /* @__PURE__ */
|
|
40
|
+
const B = /* @__PURE__ */ x(u, [["render", v]]);
|
|
41
41
|
export {
|
|
42
|
-
|
|
42
|
+
L as KV_LOAN_TAG_FRAGMENT,
|
|
43
43
|
B as default
|
|
44
44
|
};
|
package/dist/vue/KvLoanTag2.js
CHANGED
|
@@ -20,6 +20,7 @@ const m = "N/A", a = {
|
|
|
20
20
|
matchRatio
|
|
21
21
|
matchingText
|
|
22
22
|
simultaneousMatching {
|
|
23
|
+
managedAccountId
|
|
23
24
|
displayName
|
|
24
25
|
ratio
|
|
25
26
|
}
|
|
@@ -87,7 +88,7 @@ const m = "N/A", a = {
|
|
|
87
88
|
case a.matchedLoan: {
|
|
88
89
|
if (this.enableMultiMatching && this.multiMatchingOrgs.length === 1) {
|
|
89
90
|
const n = this.multiMatchingOrgs[0];
|
|
90
|
-
return `${this.useExpandedStyles ? "🤝 " : ""}${n.ratio + 1}x matching by ${n.displayName}`;
|
|
91
|
+
return `${this.useExpandedStyles ? "🤝 " : ""}${n.ratio + 1}x matching by ${n.displayName || "a Kiva supporter"}`;
|
|
91
92
|
}
|
|
92
93
|
return `${this.useExpandedStyles ? "🤝 " : ""}${this.matchRatio + 1}x matching by ${(t = this.loan) == null ? void 0 : t.matchingText}`;
|
|
93
94
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.header-fade-enter-active[data-v-
|
|
1
|
+
.header-fade-enter-active[data-v-0d2a85d2]{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.3s}.header-fade-leave-active[data-v-0d2a85d2]{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.1s}.header-fade-enter[data-v-0d2a85d2],.header-fade-leave-to[data-v-0d2a85d2]{opacity:0}.header-fade-leave[data-v-0d2a85d2],.header-fade-enter-to[data-v-0d2a85d2]{opacity:1}.bg-opacity-50[data-v-0d2a85d2]{background-color:rgba(var(--bg-action-highlight),.5)}
|
|
@@ -1,47 +1,47 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { resolveComponent as l, openBlock as
|
|
1
|
+
import h from "./KvWwwHeaderBasic2.js";
|
|
2
|
+
import { resolveComponent as l, openBlock as m, createBlock as u, withCtx as r, createElementVNode as s, normalizeStyle as d, createVNode as a, Transition as g, withDirectives as b, vShow as v, normalizeClass as k, resolveDynamicComponent as y, withModifiers as M } from "vue";
|
|
3
3
|
import "./KvWwwHeaderBasic.css";
|
|
4
|
-
import
|
|
5
|
-
function
|
|
6
|
-
const w = l("link-bar"),
|
|
7
|
-
return
|
|
4
|
+
import I from "../../_virtual/_plugin-vue_export-helper.js";
|
|
5
|
+
function L(t, o, n, e, C, D) {
|
|
6
|
+
const w = l("link-bar"), c = l("kv-page-container"), f = l("kv-theme-provider");
|
|
7
|
+
return m(), u(f, {
|
|
8
8
|
tag: "div",
|
|
9
9
|
class: "tw-bg-primary"
|
|
10
10
|
}, {
|
|
11
|
-
default:
|
|
11
|
+
default: r(() => [
|
|
12
12
|
s("nav", {
|
|
13
13
|
ref: "navRef",
|
|
14
|
-
class: "tw-font-medium tw-relative
|
|
15
|
-
style:
|
|
14
|
+
class: "tw-font-medium tw-relative",
|
|
15
|
+
style: d({ minHeight: e.MIN_HEADER_HEIGHT })
|
|
16
16
|
}, [
|
|
17
|
-
|
|
18
|
-
default:
|
|
19
|
-
|
|
20
|
-
default:
|
|
21
|
-
b(
|
|
22
|
-
"logged-in":
|
|
23
|
-
"basket-count":
|
|
24
|
-
balance:
|
|
25
|
-
"user-id":
|
|
26
|
-
"is-borrower":
|
|
27
|
-
"is-trustee":
|
|
28
|
-
"lender-name":
|
|
29
|
-
"lender-image-url":
|
|
30
|
-
"is-user-data-loading":
|
|
31
|
-
"is-basket-data-loading":
|
|
32
|
-
"show-m-g-upsell-link":
|
|
33
|
-
"login-url":
|
|
34
|
-
"my-dashboard-url":
|
|
35
|
-
"countries-not-lent-to-url":
|
|
36
|
-
"app-origin": e.
|
|
37
|
-
"search-suggestions": e.
|
|
38
|
-
"is-mobile":
|
|
39
|
-
"open-menu-item":
|
|
40
|
-
onItemHover:
|
|
17
|
+
a(c, null, {
|
|
18
|
+
default: r(() => [
|
|
19
|
+
a(g, { name: "header-fade" }, {
|
|
20
|
+
default: r(() => [
|
|
21
|
+
b(a(w, {
|
|
22
|
+
"logged-in": n.loggedIn,
|
|
23
|
+
"basket-count": n.basketCount,
|
|
24
|
+
balance: n.balance,
|
|
25
|
+
"user-id": n.userId,
|
|
26
|
+
"is-borrower": n.isBorrower,
|
|
27
|
+
"is-trustee": n.isTrustee,
|
|
28
|
+
"lender-name": n.lenderName,
|
|
29
|
+
"lender-image-url": n.lenderImageUrl,
|
|
30
|
+
"is-user-data-loading": n.isUserDataLoading,
|
|
31
|
+
"is-basket-data-loading": n.isBasketDataLoading,
|
|
32
|
+
"show-m-g-upsell-link": n.showMGUpsellLink,
|
|
33
|
+
"login-url": n.loginUrl,
|
|
34
|
+
"my-dashboard-url": n.myDashboardUrl,
|
|
35
|
+
"countries-not-lent-to-url": n.countriesNotLentToUrl,
|
|
36
|
+
"app-origin": e.resolvedAppOrigin,
|
|
37
|
+
"search-suggestions": e.effectiveSuggestions,
|
|
38
|
+
"is-mobile": e.isMobile,
|
|
39
|
+
"open-menu-item": e.menuComponent,
|
|
40
|
+
onItemHover: e.onItemHover,
|
|
41
41
|
onLoadSearchData: o[0] || (o[0] = (i) => t.$emit("load-search-data")),
|
|
42
42
|
onSearchSubmit: o[1] || (o[1] = (i) => t.$emit("search-submit", i))
|
|
43
43
|
}, null, 8, ["logged-in", "basket-count", "balance", "user-id", "is-borrower", "is-trustee", "lender-name", "lender-image-url", "is-user-data-loading", "is-basket-data-loading", "show-m-g-upsell-link", "login-url", "my-dashboard-url", "countries-not-lent-to-url", "app-origin", "search-suggestions", "is-mobile", "open-menu-item", "onItemHover"]), [
|
|
44
|
-
[v,
|
|
44
|
+
[v, e.linksVisible]
|
|
45
45
|
])
|
|
46
46
|
]),
|
|
47
47
|
_: 1
|
|
@@ -50,47 +50,49 @@ function I(t, o, e, n, L, D) {
|
|
|
50
50
|
_: 1
|
|
51
51
|
})
|
|
52
52
|
], 4),
|
|
53
|
-
|
|
54
|
-
default:
|
|
53
|
+
a(g, { name: "header-fade" }, {
|
|
54
|
+
default: r(() => [
|
|
55
55
|
b(s("div", {
|
|
56
56
|
class: "tw-absolute tw-z-modal tw-h-full tw-inset-x-0 tw-bg-eco-green-4 bg-opacity-50 tw-min-h-screen",
|
|
57
|
-
style:
|
|
58
|
-
onTouchstart: o[8] || (o[8] = (...i) =>
|
|
57
|
+
style: d({ top: e.navHeight }),
|
|
58
|
+
onTouchstart: o[8] || (o[8] = (...i) => e.handleOverlayClick && e.handleOverlayClick(...i))
|
|
59
59
|
}, [
|
|
60
60
|
s("div", {
|
|
61
61
|
ref: "menuPanelRef",
|
|
62
|
-
class: k(["tw-bg-primary tw-overflow-y-auto",
|
|
63
|
-
style:
|
|
64
|
-
...
|
|
65
|
-
maxHeight:
|
|
62
|
+
class: k(["tw-bg-primary tw-overflow-y-auto", e.menuPanelClass]),
|
|
63
|
+
style: d({
|
|
64
|
+
...e.menuPosition,
|
|
65
|
+
maxHeight: e.isMobileMenuActive ? "auto" : `calc(100dvh - ${e.navHeight})`
|
|
66
66
|
}),
|
|
67
|
-
onMouseenter: o[6] || (o[6] = (i) =>
|
|
68
|
-
onMouseleave: o[7] || (o[7] = (i) =>
|
|
67
|
+
onMouseenter: o[6] || (o[6] = (i) => e.setMenu(e.menuItem, e.menuComponent)),
|
|
68
|
+
onMouseleave: o[7] || (o[7] = (i) => e.setMenu())
|
|
69
69
|
}, [
|
|
70
|
-
(
|
|
70
|
+
(m(), u(y(e.menuComponent), {
|
|
71
71
|
ref: "menuComponentInstance",
|
|
72
|
-
"logged-in":
|
|
73
|
-
"login-url":
|
|
74
|
-
"user-id":
|
|
75
|
-
"is-borrower":
|
|
76
|
-
"is-trustee":
|
|
77
|
-
"
|
|
78
|
-
"
|
|
79
|
-
"
|
|
80
|
-
"
|
|
72
|
+
"logged-in": n.loggedIn,
|
|
73
|
+
"login-url": n.loginUrl,
|
|
74
|
+
"user-id": n.userId,
|
|
75
|
+
"is-borrower": n.isBorrower,
|
|
76
|
+
"is-trustee": n.isTrustee,
|
|
77
|
+
"trustee-id": n.trusteeId,
|
|
78
|
+
"most-recent-borrowed-loan-id": n.mostRecentBorrowedLoanId,
|
|
79
|
+
"my-dashboard-url": n.myDashboardUrl,
|
|
80
|
+
"show-m-g-upsell-link": n.showMGUpsellLink,
|
|
81
|
+
"is-mobile": e.isMobile,
|
|
82
|
+
"countries-not-lent-to-url": n.countriesNotLentToUrl,
|
|
81
83
|
"use-mobile-mega-menu": !0,
|
|
82
|
-
"app-origin": e.
|
|
83
|
-
"search-suggestions": e.
|
|
84
|
-
onLoadLendMenuData:
|
|
84
|
+
"app-origin": e.resolvedAppOrigin,
|
|
85
|
+
"search-suggestions": e.effectiveSuggestions,
|
|
86
|
+
onLoadLendMenuData: e.emitLendMenuEvent,
|
|
85
87
|
onLoadSearchData: o[2] || (o[2] = (i) => t.$emit("load-search-data")),
|
|
86
88
|
onSearchSubmit: o[3] || (o[3] = (i) => t.$emit("search-submit", i)),
|
|
87
|
-
onClosingMenu: o[4] || (o[4] = (i) =>
|
|
89
|
+
onClosingMenu: o[4] || (o[4] = (i) => e.setMenu()),
|
|
88
90
|
onTouchstart: o[5] || (o[5] = M(() => {
|
|
89
91
|
}, ["stop"]))
|
|
90
|
-
}, null, 40, ["logged-in", "login-url", "user-id", "is-borrower", "is-trustee", "my-dashboard-url", "show-m-g-upsell-link", "is-mobile", "countries-not-lent-to-url", "app-origin", "search-suggestions", "onLoadLendMenuData"]))
|
|
92
|
+
}, null, 40, ["logged-in", "login-url", "user-id", "is-borrower", "is-trustee", "trustee-id", "most-recent-borrowed-loan-id", "my-dashboard-url", "show-m-g-upsell-link", "is-mobile", "countries-not-lent-to-url", "app-origin", "search-suggestions", "onLoadLendMenuData"]))
|
|
91
93
|
], 38)
|
|
92
94
|
], 36), [
|
|
93
|
-
[v,
|
|
95
|
+
[v, e.menuOpen]
|
|
94
96
|
])
|
|
95
97
|
]),
|
|
96
98
|
_: 1
|
|
@@ -99,7 +101,7 @@ function I(t, o, e, n, L, D) {
|
|
|
99
101
|
_: 1
|
|
100
102
|
});
|
|
101
103
|
}
|
|
102
|
-
const B = /* @__PURE__ */
|
|
104
|
+
const B = /* @__PURE__ */ I(h, [["render", L], ["__scopeId", "data-v-0d2a85d2"]]);
|
|
103
105
|
export {
|
|
104
106
|
B as default
|
|
105
107
|
};
|
|
@@ -1,15 +1,26 @@
|
|
|
1
|
-
import { ref as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
6
|
-
import
|
|
7
|
-
|
|
1
|
+
import { ref as o, computed as s, watch as D, nextTick as P, onMounted as K, onBeforeUnmount as $ } from "vue";
|
|
2
|
+
import { gql as G } from "@apollo/client/core";
|
|
3
|
+
import W from "../KvThemeProvider.js";
|
|
4
|
+
import z from "../KvPageContainer.js";
|
|
5
|
+
import { useBreakpoints as Q } from "../../utils/useBreakpoints.js";
|
|
6
|
+
import { useHeaderBasicMenuState as V } from "../../utils/useHeaderBasicMenuState.js";
|
|
7
|
+
import X from "./LinkBar.js";
|
|
8
|
+
const S = "4rem", Y = G`
|
|
9
|
+
query loanSearchSuggestions {
|
|
10
|
+
lend {
|
|
11
|
+
loanSearchSuggestions {
|
|
12
|
+
group
|
|
13
|
+
label
|
|
14
|
+
query
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
`, oe = {
|
|
8
19
|
name: "KvWwwHeaderBasic",
|
|
9
20
|
components: {
|
|
10
|
-
KvThemeProvider:
|
|
11
|
-
KvPageContainer:
|
|
12
|
-
LinkBar:
|
|
21
|
+
KvThemeProvider: W,
|
|
22
|
+
KvPageContainer: z,
|
|
23
|
+
LinkBar: X
|
|
13
24
|
},
|
|
14
25
|
props: {
|
|
15
26
|
loggedIn: { type: Boolean, default: !1 },
|
|
@@ -27,80 +38,101 @@ const w = "4rem", F = {
|
|
|
27
38
|
myDashboardUrl: { type: String, default: "/mykiva" },
|
|
28
39
|
countriesNotLentToUrl: { type: String, default: "/lend/countries-not-lent" },
|
|
29
40
|
appOrigin: { type: String, default: "" },
|
|
30
|
-
searchSuggestions: { type: Array, default: () => [] }
|
|
41
|
+
searchSuggestions: { type: Array, default: () => [] },
|
|
42
|
+
trusteeId: { type: Number, default: null },
|
|
43
|
+
mostRecentBorrowedLoanId: { type: Number, default: null }
|
|
31
44
|
},
|
|
32
45
|
emits: ["load-lend-menu-data", "load-search-data", "search-submit"],
|
|
33
|
-
setup(
|
|
34
|
-
const { isMobile:
|
|
35
|
-
menuOpen:
|
|
36
|
-
menuComponent:
|
|
37
|
-
menuItem:
|
|
38
|
-
menuPosition:
|
|
39
|
-
setMenu:
|
|
40
|
-
markMounted:
|
|
41
|
-
pinMenuOpen:
|
|
42
|
-
} =
|
|
43
|
-
let
|
|
44
|
-
const
|
|
46
|
+
setup(d, { emit: M }) {
|
|
47
|
+
const { isMobile: B, checkIsMobile: I } = Q(), {
|
|
48
|
+
menuOpen: k,
|
|
49
|
+
menuComponent: A,
|
|
50
|
+
menuItem: N,
|
|
51
|
+
menuPosition: v,
|
|
52
|
+
setMenu: f,
|
|
53
|
+
markMounted: O,
|
|
54
|
+
pinMenuOpen: H
|
|
55
|
+
} = V(), l = o(null), w = o(null), r = o(null), y = o(S), c = o(null), L = o(!0), b = o(d.appOrigin);
|
|
56
|
+
let u = null;
|
|
57
|
+
const m = o([]);
|
|
58
|
+
let p = !1;
|
|
59
|
+
const U = s(
|
|
60
|
+
() => m.value.length ? m.value : d.searchSuggestions
|
|
61
|
+
), g = s(() => {
|
|
45
62
|
var t, e;
|
|
46
|
-
return ((e = (t =
|
|
47
|
-
}),
|
|
63
|
+
return ((e = (t = l.value) == null ? void 0 : t.$options) == null ? void 0 : e.name) === "MobileMenu";
|
|
64
|
+
}), h = s(() => {
|
|
48
65
|
var t, e;
|
|
49
|
-
return ((e = (t =
|
|
50
|
-
}),
|
|
66
|
+
return ((e = (t = l.value) == null ? void 0 : t.$options) == null ? void 0 : e.name) === "MyKivaMenu";
|
|
67
|
+
}), q = s(() => {
|
|
51
68
|
var t, e;
|
|
52
|
-
return ((e = (t =
|
|
53
|
-
}),
|
|
54
|
-
function
|
|
55
|
-
|
|
69
|
+
return ((e = (t = l.value) == null ? void 0 : t.$options) == null ? void 0 : e.name) === "AboutMenu";
|
|
70
|
+
}), C = s(() => g.value ? "tw-w-full tw-min-h-dvh tw-rounded-none" : h.value ? "tw-w-auto tw-rounded-b tw-border tw-border-t-0 tw-border-tertiary" : q.value ? "tw-w-full md:tw-w-auto tw-rounded-none !tw-rounded-b md:tw-border md:tw-border-t-0 md:tw-border-tertiary" : "tw-w-full md:tw-w-auto tw-rounded-none !md:tw-rounded-b");
|
|
71
|
+
function R(t, e, n, i = null) {
|
|
72
|
+
c.value = i, f(t, e, n);
|
|
56
73
|
}
|
|
57
|
-
|
|
58
|
-
if (!t ||
|
|
59
|
-
await
|
|
60
|
-
const e =
|
|
74
|
+
D(h, async (t) => {
|
|
75
|
+
if (!t || c.value == null) return;
|
|
76
|
+
await P();
|
|
77
|
+
const e = w.value;
|
|
61
78
|
if (!e) return;
|
|
62
|
-
const
|
|
63
|
-
|
|
79
|
+
const n = e.offsetWidth, i = c.value, a = Math.max(0, window.innerWidth - (i + n / 2));
|
|
80
|
+
v.value = { right: `${a}px`, position: "absolute" };
|
|
64
81
|
});
|
|
65
|
-
function
|
|
66
|
-
|
|
82
|
+
function E() {
|
|
83
|
+
M("load-lend-menu-data");
|
|
67
84
|
}
|
|
68
|
-
function
|
|
69
|
-
var e,
|
|
70
|
-
(
|
|
85
|
+
function T(t) {
|
|
86
|
+
var e, n;
|
|
87
|
+
(n = (e = l.value) == null ? void 0 : e.onLoad) == null || n.call(e, t);
|
|
88
|
+
}
|
|
89
|
+
async function _(t) {
|
|
90
|
+
var e;
|
|
91
|
+
if (!p) {
|
|
92
|
+
p = !0;
|
|
93
|
+
try {
|
|
94
|
+
const { data: n } = await t.query({ query: Y }), i = ((e = n == null ? void 0 : n.lend) == null ? void 0 : e.loanSearchSuggestions) ?? [];
|
|
95
|
+
m.value = i.filter((a) => !!a).map((a) => ({ group: a.group ?? "", label: a.label ?? "", query: a.query ?? void 0 }));
|
|
96
|
+
} catch {
|
|
97
|
+
p = !1;
|
|
98
|
+
}
|
|
99
|
+
}
|
|
71
100
|
}
|
|
72
101
|
function x() {
|
|
73
|
-
|
|
102
|
+
g.value || f();
|
|
74
103
|
}
|
|
75
|
-
return
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
}),
|
|
79
|
-
}),
|
|
80
|
-
|
|
104
|
+
return K(() => {
|
|
105
|
+
!d.appOrigin && typeof window < "u" && (b.value = window.location.origin), I(), O(), r.value && typeof ResizeObserver < "u" && (u = new ResizeObserver(() => {
|
|
106
|
+
r.value && (y.value = `${r.value.offsetHeight}px`);
|
|
107
|
+
}), u.observe(r.value));
|
|
108
|
+
}), $(() => {
|
|
109
|
+
u == null || u.disconnect(), u = null;
|
|
81
110
|
}), {
|
|
82
|
-
MIN_HEADER_HEIGHT:
|
|
83
|
-
navHeight:
|
|
84
|
-
navRef:
|
|
85
|
-
linksVisible:
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
111
|
+
MIN_HEADER_HEIGHT: S,
|
|
112
|
+
navHeight: y,
|
|
113
|
+
navRef: r,
|
|
114
|
+
linksVisible: L,
|
|
115
|
+
resolvedAppOrigin: b,
|
|
116
|
+
effectiveSuggestions: U,
|
|
117
|
+
isMobile: B,
|
|
118
|
+
menuOpen: k,
|
|
119
|
+
menuComponent: A,
|
|
120
|
+
menuItem: N,
|
|
121
|
+
menuPosition: v,
|
|
122
|
+
isMobileMenuActive: g,
|
|
123
|
+
menuPanelClass: C,
|
|
124
|
+
menuComponentInstance: l,
|
|
125
|
+
menuPanelRef: w,
|
|
126
|
+
pinMenuOpen: H,
|
|
127
|
+
setMenu: f,
|
|
128
|
+
onItemHover: R,
|
|
98
129
|
handleOverlayClick: x,
|
|
99
|
-
emitLendMenuEvent:
|
|
100
|
-
loadMenuData:
|
|
130
|
+
emitLendMenuEvent: E,
|
|
131
|
+
loadMenuData: T,
|
|
132
|
+
loadSearchSuggestions: _
|
|
101
133
|
};
|
|
102
134
|
}
|
|
103
135
|
};
|
|
104
136
|
export {
|
|
105
|
-
|
|
137
|
+
oe as default
|
|
106
138
|
};
|
|
@@ -115,6 +115,14 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
115
115
|
type: BooleanConstructor;
|
|
116
116
|
default: boolean;
|
|
117
117
|
};
|
|
118
|
+
trusteeId: {
|
|
119
|
+
type: NumberConstructor;
|
|
120
|
+
default: any;
|
|
121
|
+
};
|
|
122
|
+
mostRecentBorrowedLoanId: {
|
|
123
|
+
type: NumberConstructor;
|
|
124
|
+
default: any;
|
|
125
|
+
};
|
|
118
126
|
myDashboardUrl: {
|
|
119
127
|
type: StringConstructor;
|
|
120
128
|
default: string;
|
|
@@ -124,6 +132,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
124
132
|
default: boolean;
|
|
125
133
|
};
|
|
126
134
|
}>, {
|
|
135
|
+
trusteeLoansUrl: import('vue').ComputedRef<string>;
|
|
127
136
|
onLinkClick: (action: string) => void;
|
|
128
137
|
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, "closing-menu"[], "closing-menu", import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
129
138
|
loggedIn: {
|
|
@@ -142,6 +151,14 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
142
151
|
type: BooleanConstructor;
|
|
143
152
|
default: boolean;
|
|
144
153
|
};
|
|
154
|
+
trusteeId: {
|
|
155
|
+
type: NumberConstructor;
|
|
156
|
+
default: any;
|
|
157
|
+
};
|
|
158
|
+
mostRecentBorrowedLoanId: {
|
|
159
|
+
type: NumberConstructor;
|
|
160
|
+
default: any;
|
|
161
|
+
};
|
|
145
162
|
myDashboardUrl: {
|
|
146
163
|
type: StringConstructor;
|
|
147
164
|
default: string;
|
|
@@ -159,6 +176,8 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
159
176
|
isTrustee: boolean;
|
|
160
177
|
myDashboardUrl: string;
|
|
161
178
|
userId: number;
|
|
179
|
+
trusteeId: number;
|
|
180
|
+
mostRecentBorrowedLoanId: number;
|
|
162
181
|
}, {}, {
|
|
163
182
|
KvHeaderMenuLink: any;
|
|
164
183
|
}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
[data-v-
|
|
1
|
+
[data-v-7b004666] a{padding-top:.5rem;padding-bottom:.5rem}
|
|
@@ -1,90 +1,132 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { resolveComponent as
|
|
1
|
+
import u from "./MyKivaMenu2.js";
|
|
2
|
+
import { resolveComponent as C, openBlock as f, createElementBlock as d, createVNode as r, withCtx as e, createTextVNode as i, Fragment as s, createCommentVNode as m } from "vue";
|
|
3
3
|
import "./MyKivaMenu.css";
|
|
4
|
-
import
|
|
5
|
-
const
|
|
6
|
-
function
|
|
7
|
-
const
|
|
8
|
-
return
|
|
9
|
-
|
|
10
|
-
href:
|
|
4
|
+
import y from "../../_virtual/_plugin-vue_export-helper.js";
|
|
5
|
+
const a = { class: "tw-flex tw-flex-col tw-items-start tw-font-medium tw-mt-0.5 tw-pb-1 tw-px-2" };
|
|
6
|
+
function w(v, o, k, t, M, b) {
|
|
7
|
+
const n = C("kv-header-menu-link");
|
|
8
|
+
return f(), d("nav", a, [
|
|
9
|
+
r(n, {
|
|
10
|
+
href: k.myDashboardUrl,
|
|
11
11
|
class: "md:tw-hidden",
|
|
12
|
-
onClick: o[0] || (o[0] = (
|
|
12
|
+
onClick: o[0] || (o[0] = (l) => t.onLinkClick("click-Dashboard"))
|
|
13
13
|
}, {
|
|
14
|
-
default:
|
|
15
|
-
|
|
14
|
+
default: e(() => o[12] || (o[12] = [
|
|
15
|
+
i(" My Dashboard ")
|
|
16
16
|
])),
|
|
17
17
|
_: 1
|
|
18
18
|
}, 8, ["href"]),
|
|
19
|
-
|
|
19
|
+
k.isBorrower ? (f(), d(s, { key: 0 }, [
|
|
20
|
+
r(n, {
|
|
21
|
+
href: "/my/borrower",
|
|
22
|
+
onClick: o[1] || (o[1] = (l) => t.onLinkClick("click-Portfolio-My borrower dashboard"))
|
|
23
|
+
}, {
|
|
24
|
+
default: e(() => o[13] || (o[13] = [
|
|
25
|
+
i(" My borrower dashboard ")
|
|
26
|
+
])),
|
|
27
|
+
_: 1
|
|
28
|
+
}),
|
|
29
|
+
k.mostRecentBorrowedLoanId !== null ? (f(), d(s, { key: 0 }, [
|
|
30
|
+
r(n, {
|
|
31
|
+
href: `/lend/${k.mostRecentBorrowedLoanId}`,
|
|
32
|
+
onClick: o[2] || (o[2] = (l) => t.onLinkClick("click-Portfolio-My loan page"))
|
|
33
|
+
}, {
|
|
34
|
+
default: e(() => o[14] || (o[14] = [
|
|
35
|
+
i(" My loan page ")
|
|
36
|
+
])),
|
|
37
|
+
_: 1
|
|
38
|
+
}, 8, ["href"]),
|
|
39
|
+
r(n, {
|
|
40
|
+
href: `/lend-classic/${k.mostRecentBorrowedLoanId}#loanComments`,
|
|
41
|
+
onClick: o[3] || (o[3] = (l) => t.onLinkClick("click-Portfolio-My Conversations"))
|
|
42
|
+
}, {
|
|
43
|
+
default: e(() => o[15] || (o[15] = [
|
|
44
|
+
i(" My conversations ")
|
|
45
|
+
])),
|
|
46
|
+
_: 1
|
|
47
|
+
}, 8, ["href"])
|
|
48
|
+
], 64)) : m("", !0)
|
|
49
|
+
], 64)) : m("", !0),
|
|
50
|
+
k.isTrustee ? (f(), d(s, { key: 1 }, [
|
|
51
|
+
k.isBorrower ? m("", !0) : (f(), d(s, { key: 0 }, [
|
|
52
|
+
r(n, {
|
|
53
|
+
href: t.trusteeLoansUrl,
|
|
54
|
+
onClick: o[4] || (o[4] = (l) => t.onLinkClick("click-Portfolio-My Trustee loans"))
|
|
55
|
+
}, {
|
|
56
|
+
default: e(() => o[16] || (o[16] = [
|
|
57
|
+
i(" My Trustee loans ")
|
|
58
|
+
])),
|
|
59
|
+
_: 1
|
|
60
|
+
}, 8, ["href"]),
|
|
61
|
+
r(n, {
|
|
62
|
+
href: `/trustees/${k.trusteeId}`,
|
|
63
|
+
onClick: o[5] || (o[5] = (l) => t.onLinkClick("click-Portfolio-My public Trustee page"))
|
|
64
|
+
}, {
|
|
65
|
+
default: e(() => o[17] || (o[17] = [
|
|
66
|
+
i(" My public Trustee page ")
|
|
67
|
+
])),
|
|
68
|
+
_: 1
|
|
69
|
+
}, 8, ["href"])
|
|
70
|
+
], 64)),
|
|
71
|
+
r(n, {
|
|
72
|
+
href: "/my/trustee",
|
|
73
|
+
onClick: o[6] || (o[6] = (l) => t.onLinkClick("click-Portfolio-My Trustee dashboard"))
|
|
74
|
+
}, {
|
|
75
|
+
default: e(() => o[18] || (o[18] = [
|
|
76
|
+
i(" My Trustee dashboard ")
|
|
77
|
+
])),
|
|
78
|
+
_: 1
|
|
79
|
+
})
|
|
80
|
+
], 64)) : m("", !0),
|
|
81
|
+
r(n, {
|
|
20
82
|
href: "/portfolio",
|
|
21
|
-
onClick: o[
|
|
83
|
+
onClick: o[7] || (o[7] = (l) => t.onLinkClick("click-Portfolio-Portfolio"))
|
|
22
84
|
}, {
|
|
23
|
-
default:
|
|
24
|
-
|
|
85
|
+
default: e(() => o[19] || (o[19] = [
|
|
86
|
+
i(" Portfolio ")
|
|
25
87
|
])),
|
|
26
88
|
_: 1
|
|
27
89
|
}),
|
|
28
|
-
|
|
90
|
+
r(n, {
|
|
29
91
|
href: "/teams/my-teams",
|
|
30
|
-
onClick: o[
|
|
92
|
+
onClick: o[8] || (o[8] = (l) => t.onLinkClick("click-Portfolio-My teams"))
|
|
31
93
|
}, {
|
|
32
|
-
default:
|
|
33
|
-
|
|
94
|
+
default: e(() => o[20] || (o[20] = [
|
|
95
|
+
i(" My Teams ")
|
|
34
96
|
])),
|
|
35
97
|
_: 1
|
|
36
98
|
}),
|
|
37
|
-
|
|
99
|
+
r(n, {
|
|
38
100
|
href: "/portfolio/donations",
|
|
39
|
-
onClick: o[
|
|
101
|
+
onClick: o[9] || (o[9] = (l) => t.onLinkClick("click-Portfolio-Donations"))
|
|
40
102
|
}, {
|
|
41
|
-
default:
|
|
42
|
-
|
|
103
|
+
default: e(() => o[21] || (o[21] = [
|
|
104
|
+
i(" Donations ")
|
|
43
105
|
])),
|
|
44
106
|
_: 1
|
|
45
107
|
}),
|
|
46
|
-
|
|
108
|
+
r(n, {
|
|
47
109
|
href: "/settings",
|
|
48
|
-
onClick: o[
|
|
110
|
+
onClick: o[10] || (o[10] = (l) => t.onLinkClick("click-Portfolio-Settings"))
|
|
49
111
|
}, {
|
|
50
|
-
default:
|
|
51
|
-
|
|
112
|
+
default: e(() => o[22] || (o[22] = [
|
|
113
|
+
i(" Settings ")
|
|
52
114
|
])),
|
|
53
115
|
_: 1
|
|
54
116
|
}),
|
|
55
|
-
|
|
56
|
-
key: 0,
|
|
57
|
-
href: "/my/borrower",
|
|
58
|
-
onClick: o[5] || (o[5] = (e) => t.onLinkClick("click-Portfolio-My borrower dashboard"))
|
|
59
|
-
}, {
|
|
60
|
-
default: i(() => o[13] || (o[13] = [
|
|
61
|
-
n(" Borrower Dashboard ")
|
|
62
|
-
])),
|
|
63
|
-
_: 1
|
|
64
|
-
})) : s("", !0),
|
|
65
|
-
f.isTrustee ? (k(), d(r, {
|
|
66
|
-
key: 1,
|
|
67
|
-
href: "/my/trustee",
|
|
68
|
-
onClick: o[6] || (o[6] = (e) => t.onLinkClick("click-Portfolio-My Trustee dashboard"))
|
|
69
|
-
}, {
|
|
70
|
-
default: i(() => o[14] || (o[14] = [
|
|
71
|
-
n(" Trustee Dashboard ")
|
|
72
|
-
])),
|
|
73
|
-
_: 1
|
|
74
|
-
})) : s("", !0),
|
|
75
|
-
l(r, {
|
|
117
|
+
r(n, {
|
|
76
118
|
href: "/ui-logout",
|
|
77
119
|
class: "tw-border-t tw-border-secondary tw-w-full",
|
|
78
|
-
onClick: o[
|
|
120
|
+
onClick: o[11] || (o[11] = (l) => t.onLinkClick("click-Portfolio-Sign out"))
|
|
79
121
|
}, {
|
|
80
|
-
default:
|
|
81
|
-
|
|
122
|
+
default: e(() => o[23] || (o[23] = [
|
|
123
|
+
i(" Sign out ")
|
|
82
124
|
])),
|
|
83
125
|
_: 1
|
|
84
126
|
})
|
|
85
127
|
]);
|
|
86
128
|
}
|
|
87
|
-
const
|
|
129
|
+
const x = /* @__PURE__ */ y(u, [["render", w], ["__scopeId", "data-v-7b004666"]]);
|
|
88
130
|
export {
|
|
89
|
-
|
|
131
|
+
x as default
|
|
90
132
|
};
|
|
@@ -15,6 +15,14 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
15
15
|
type: BooleanConstructor;
|
|
16
16
|
default: boolean;
|
|
17
17
|
};
|
|
18
|
+
trusteeId: {
|
|
19
|
+
type: NumberConstructor;
|
|
20
|
+
default: any;
|
|
21
|
+
};
|
|
22
|
+
mostRecentBorrowedLoanId: {
|
|
23
|
+
type: NumberConstructor;
|
|
24
|
+
default: any;
|
|
25
|
+
};
|
|
18
26
|
myDashboardUrl: {
|
|
19
27
|
type: StringConstructor;
|
|
20
28
|
default: string;
|
|
@@ -24,6 +32,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
24
32
|
default: boolean;
|
|
25
33
|
};
|
|
26
34
|
}>, {
|
|
35
|
+
trusteeLoansUrl: import('vue').ComputedRef<string>;
|
|
27
36
|
onLinkClick: (action: string) => void;
|
|
28
37
|
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, "closing-menu"[], "closing-menu", import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
29
38
|
loggedIn: {
|
|
@@ -42,6 +51,14 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
42
51
|
type: BooleanConstructor;
|
|
43
52
|
default: boolean;
|
|
44
53
|
};
|
|
54
|
+
trusteeId: {
|
|
55
|
+
type: NumberConstructor;
|
|
56
|
+
default: any;
|
|
57
|
+
};
|
|
58
|
+
mostRecentBorrowedLoanId: {
|
|
59
|
+
type: NumberConstructor;
|
|
60
|
+
default: any;
|
|
61
|
+
};
|
|
45
62
|
myDashboardUrl: {
|
|
46
63
|
type: StringConstructor;
|
|
47
64
|
default: string;
|
|
@@ -59,6 +76,8 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
59
76
|
isTrustee: boolean;
|
|
60
77
|
myDashboardUrl: string;
|
|
61
78
|
userId: number;
|
|
79
|
+
trusteeId: number;
|
|
80
|
+
mostRecentBorrowedLoanId: number;
|
|
62
81
|
}, {}, {
|
|
63
82
|
KvHeaderMenuLink: any;
|
|
64
83
|
}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { inject as
|
|
2
|
-
import
|
|
3
|
-
const
|
|
1
|
+
import { inject as l, computed as r } from "vue";
|
|
2
|
+
import u from "../KvWwwHeader/KvHeaderMenuLink.js";
|
|
3
|
+
const f = {
|
|
4
4
|
name: "MyKivaMenu",
|
|
5
|
-
components: { KvHeaderMenuLink:
|
|
5
|
+
components: { KvHeaderMenuLink: u },
|
|
6
6
|
props: {
|
|
7
7
|
// Accepts the orchestrator's user props; loggedIn/userId are part of the shared menu contract.
|
|
8
8
|
loggedIn: {
|
|
@@ -21,6 +21,14 @@ const u = {
|
|
|
21
21
|
type: Boolean,
|
|
22
22
|
default: !1
|
|
23
23
|
},
|
|
24
|
+
trusteeId: {
|
|
25
|
+
type: Number,
|
|
26
|
+
default: null
|
|
27
|
+
},
|
|
28
|
+
mostRecentBorrowedLoanId: {
|
|
29
|
+
type: Number,
|
|
30
|
+
default: null
|
|
31
|
+
},
|
|
24
32
|
myDashboardUrl: {
|
|
25
33
|
type: String,
|
|
26
34
|
default: "/mykiva"
|
|
@@ -31,15 +39,17 @@ const u = {
|
|
|
31
39
|
}
|
|
32
40
|
},
|
|
33
41
|
emits: ["closing-menu"],
|
|
34
|
-
setup(
|
|
35
|
-
const
|
|
36
|
-
})
|
|
37
|
-
|
|
38
|
-
|
|
42
|
+
setup(e, { emit: t }) {
|
|
43
|
+
const n = l("$kvTrackEvent", () => {
|
|
44
|
+
}), o = r(
|
|
45
|
+
() => `/lend?trustee=${e.trusteeId}&status=fundraising&sortBy=newest`
|
|
46
|
+
);
|
|
47
|
+
function a(s) {
|
|
48
|
+
n("TopNav", s), t("closing-menu");
|
|
39
49
|
}
|
|
40
|
-
return { onLinkClick:
|
|
50
|
+
return { trusteeLoansUrl: o, onLinkClick: a };
|
|
41
51
|
}
|
|
42
52
|
};
|
|
43
53
|
export {
|
|
44
|
-
|
|
54
|
+
f as default
|
|
45
55
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { inject as
|
|
1
|
+
import { inject as B, ref as m, toRef as p, computed as s } from "vue";
|
|
2
2
|
import { mdiMagnify as E } from "@mdi/js";
|
|
3
3
|
import F from "../KvTextInput.js";
|
|
4
4
|
import O from "../../utils/markMatches.js";
|
|
@@ -22,60 +22,60 @@ const K = {
|
|
|
22
22
|
},
|
|
23
23
|
emits: ["load-search-data", "search-submit"],
|
|
24
24
|
setup(r, { emit: i }) {
|
|
25
|
-
const f =
|
|
26
|
-
}),
|
|
25
|
+
const f = B("$kvTrackEvent", () => {
|
|
26
|
+
}), d = "kv-www-header-basic-search", n = m(!1), v = m(!1), {
|
|
27
27
|
term: t,
|
|
28
28
|
groupedResults: l,
|
|
29
29
|
activeIndex: a,
|
|
30
|
-
resolveSubmit:
|
|
31
|
-
} = _(
|
|
30
|
+
resolveSubmit: g
|
|
31
|
+
} = _(p(r, "searchSuggestions"), p(r, "appOrigin")), o = s(() => l.value.flatMap((e) => e.items)), u = s(() => a.value > -1 ? o.value[a.value] : void 0), b = s(() => {
|
|
32
32
|
var e;
|
|
33
33
|
return ((e = u.value) == null ? void 0 : e.label) ?? t.value;
|
|
34
|
-
}),
|
|
35
|
-
function
|
|
34
|
+
}), y = s(() => l.value.length > 0 && n.value);
|
|
35
|
+
function S(e) {
|
|
36
36
|
t.value = e;
|
|
37
37
|
}
|
|
38
|
-
function
|
|
38
|
+
function k() {
|
|
39
39
|
n.value = !0, v.value || (i("load-search-data"), v.value = !0), f("search", "focus");
|
|
40
40
|
}
|
|
41
|
-
function
|
|
41
|
+
function w() {
|
|
42
42
|
n.value = !1, a.value = -1;
|
|
43
43
|
}
|
|
44
44
|
function c(e) {
|
|
45
|
-
const h =
|
|
45
|
+
const h = g(e);
|
|
46
46
|
f("search", "click", h.suggestion ? "type-ahead-search" : "custom-search-option"), i("search-submit", h);
|
|
47
47
|
}
|
|
48
|
-
function
|
|
48
|
+
function I(e) {
|
|
49
49
|
c(e);
|
|
50
50
|
}
|
|
51
|
-
function
|
|
51
|
+
function R() {
|
|
52
52
|
u.value ? c(u.value) : c(t.value);
|
|
53
53
|
}
|
|
54
|
-
function
|
|
54
|
+
function T() {
|
|
55
55
|
a.value += 1, a.value >= o.value.length && (a.value = -1);
|
|
56
56
|
}
|
|
57
|
-
function
|
|
57
|
+
function M() {
|
|
58
58
|
a.value === -1 && (a.value = o.value.length), a.value -= 1;
|
|
59
59
|
}
|
|
60
|
-
function
|
|
60
|
+
function x(e) {
|
|
61
61
|
return O(e.label, e.matches);
|
|
62
62
|
}
|
|
63
63
|
return {
|
|
64
64
|
mdiMagnify: E,
|
|
65
|
-
inputId:
|
|
65
|
+
inputId: d,
|
|
66
66
|
term: t,
|
|
67
|
-
displayTerm:
|
|
67
|
+
displayTerm: b,
|
|
68
68
|
groupedResults: l,
|
|
69
69
|
highlighted: u,
|
|
70
|
-
showResults:
|
|
71
|
-
onInput:
|
|
72
|
-
onFocus:
|
|
73
|
-
onBlur:
|
|
74
|
-
onSubmit:
|
|
75
|
-
runSearch:
|
|
76
|
-
listUp:
|
|
77
|
-
listDown:
|
|
78
|
-
formatResult:
|
|
70
|
+
showResults: y,
|
|
71
|
+
onInput: S,
|
|
72
|
+
onFocus: k,
|
|
73
|
+
onBlur: w,
|
|
74
|
+
onSubmit: R,
|
|
75
|
+
runSearch: I,
|
|
76
|
+
listUp: M,
|
|
77
|
+
listDown: T,
|
|
78
|
+
formatResult: x
|
|
79
79
|
};
|
|
80
80
|
}
|
|
81
81
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kiva/kv-components",
|
|
3
|
-
"version": "8.
|
|
3
|
+
"version": "8.17.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -128,5 +128,5 @@
|
|
|
128
128
|
"dependencies": {
|
|
129
129
|
"fuse.js": "^7.1.0"
|
|
130
130
|
},
|
|
131
|
-
"gitHead": "
|
|
131
|
+
"gitHead": "b717eef77a82336fd6df9908773911555f431a71"
|
|
132
132
|
}
|