@kiva/kv-components 8.14.2 → 8.15.0
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/index.js +104 -102
- package/dist/utils/headerNavLinks.d.ts +8 -0
- package/dist/utils/headerNavLinks.js +19 -0
- package/dist/utils/markMatches.js +12 -0
- package/dist/utils/typeaheadSearchConfig.d.ts +4 -0
- package/dist/utils/typeaheadSearchConfig.js +31 -0
- package/dist/utils/typeaheadSearchEngine.d.ts +14 -0
- package/dist/utils/typeaheadSearchEngine.js +28 -0
- package/dist/utils/useBreakpoints.d.ts +4 -0
- package/dist/utils/useBreakpoints.js +18 -0
- package/dist/utils/useHeaderBasicMenuState.d.ts +3197 -0
- package/dist/utils/useHeaderBasicMenuState.js +30 -0
- package/dist/utils/useTypeaheadSearch.d.ts +19 -0
- package/dist/utils/useTypeaheadSearch.js +64 -0
- package/dist/vue/KvTab.vue.d.ts +9 -0
- package/dist/vue/KvTextInput.css +1 -0
- package/dist/vue/KvTextInput.js +18 -17
- package/dist/vue/KvWwwHeader/LendMenu/KvLendMenu.js +29 -13
- package/dist/vue/KvWwwHeader/LendMenu/KvLendMenu2.js +58 -32
- package/dist/vue/KvWwwHeaderBasic/AboutMenu.css +1 -0
- package/dist/vue/KvWwwHeaderBasic/AboutMenu.js +25 -0
- package/dist/vue/KvWwwHeaderBasic/AboutMenu.vue.d.ts +29 -0
- package/dist/vue/KvWwwHeaderBasic/AboutMenu2.js +33 -0
- package/dist/vue/KvWwwHeaderBasic/KvWwwHeaderBasic.css +1 -0
- package/dist/vue/KvWwwHeaderBasic/KvWwwHeaderBasic.js +105 -0
- package/dist/vue/KvWwwHeaderBasic/KvWwwHeaderBasic2.js +106 -0
- package/dist/vue/KvWwwHeaderBasic/LinkBar.css +1 -0
- package/dist/vue/KvWwwHeaderBasic/LinkBar.js +161 -0
- package/dist/vue/KvWwwHeaderBasic/LinkBar.vue.d.ts +398 -0
- package/dist/vue/KvWwwHeaderBasic/LinkBar2.js +114 -0
- package/dist/vue/KvWwwHeaderBasic/MobileLendMenu/CategoriesPanel.css +1 -0
- package/dist/vue/KvWwwHeaderBasic/MobileLendMenu/CategoriesPanel.js +61 -0
- package/dist/vue/KvWwwHeaderBasic/MobileLendMenu/CategoriesPanel.vue.d.ts +30 -0
- package/dist/vue/KvWwwHeaderBasic/MobileLendMenu/CategoriesPanel2.js +18 -0
- package/dist/vue/KvWwwHeaderBasic/MobileLendMenu/MobileLendMenu.css +1 -0
- package/dist/vue/KvWwwHeaderBasic/MobileLendMenu/MobileLendMenu.js +102 -0
- package/dist/vue/KvWwwHeaderBasic/MobileLendMenu/MobileLendMenu.vue.d.ts +285 -0
- package/dist/vue/KvWwwHeaderBasic/MobileLendMenu/MobileLendMenu2.js +74 -0
- package/dist/vue/KvWwwHeaderBasic/MobileLendMenu/MyKivaPanel.css +1 -0
- package/dist/vue/KvWwwHeaderBasic/MobileLendMenu/MyKivaPanel.js +51 -0
- package/dist/vue/KvWwwHeaderBasic/MobileLendMenu/MyKivaPanel.vue.d.ts +48 -0
- package/dist/vue/KvWwwHeaderBasic/MobileLendMenu/MyKivaPanel2.js +31 -0
- package/dist/vue/KvWwwHeaderBasic/MobileLendMenu/RegionsPanel.js +38 -0
- package/dist/vue/KvWwwHeaderBasic/MobileLendMenu/RegionsPanel.vue.d.ts +38 -0
- package/dist/vue/KvWwwHeaderBasic/MobileLendMenu/RegionsPanel2.js +24 -0
- package/dist/vue/KvWwwHeaderBasic/MobileLendMenu/SearchPanel.js +17 -0
- package/dist/vue/KvWwwHeaderBasic/MobileLendMenu/SearchPanel.vue.d.ts +81 -0
- package/dist/vue/KvWwwHeaderBasic/MobileLendMenu/SearchPanel2.js +19 -0
- package/dist/vue/KvWwwHeaderBasic/MobileMenu.css +1 -0
- package/dist/vue/KvWwwHeaderBasic/MobileMenu.js +52 -0
- package/dist/vue/KvWwwHeaderBasic/MobileMenu.vue.d.ts +59 -0
- package/dist/vue/KvWwwHeaderBasic/MobileMenu2.js +36 -0
- package/dist/vue/KvWwwHeaderBasic/MyKivaMenu.css +1 -0
- package/dist/vue/KvWwwHeaderBasic/MyKivaMenu.js +90 -0
- package/dist/vue/KvWwwHeaderBasic/MyKivaMenu.vue.d.ts +65 -0
- package/dist/vue/KvWwwHeaderBasic/MyKivaMenu2.js +45 -0
- package/dist/vue/KvWwwHeaderBasic/SearchBar.js +73 -0
- package/dist/vue/KvWwwHeaderBasic/SearchBar.vue.d.ts +54 -0
- package/dist/vue/KvWwwHeaderBasic/SearchBar2.js +84 -0
- package/dist/vue/index.d.ts +1 -0
- package/package.json +5 -2
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { ref as e, shallowRef as m } from "vue";
|
|
2
|
+
import { debounce as p } from "./debounce.js";
|
|
3
|
+
function b() {
|
|
4
|
+
const f = e(null), n = e(!1), l = m(null), o = e(null), t = e({ left: 0, position: "relative" }), a = e(!1), i = e(!1), r = p((c, u, s) => {
|
|
5
|
+
if (a.value) {
|
|
6
|
+
if (u)
|
|
7
|
+
o.value = c ?? null, l.value !== u && (t.value = { left: 0, position: "relative" }), l.value = u, n.value = !0, s && (t.value = { ...s, position: "absolute" });
|
|
8
|
+
else if (n.value) {
|
|
9
|
+
if (i.value) return;
|
|
10
|
+
n.value = !1, l.value = null;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
}, 100);
|
|
14
|
+
function v() {
|
|
15
|
+
a.value = !0;
|
|
16
|
+
}
|
|
17
|
+
return {
|
|
18
|
+
activeHeaderItem: f,
|
|
19
|
+
menuOpen: n,
|
|
20
|
+
menuComponent: l,
|
|
21
|
+
menuItem: o,
|
|
22
|
+
menuPosition: t,
|
|
23
|
+
setMenu: r,
|
|
24
|
+
markMounted: v,
|
|
25
|
+
pinMenuOpen: i
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
export {
|
|
29
|
+
b as useHeaderBasicMenuState
|
|
30
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { Ref } from 'vue';
|
|
2
|
+
import { SearchSuggestion } from '../../../../../../../../../src/utils/typeaheadSearchEngine';
|
|
3
|
+
export interface SubmitPayload {
|
|
4
|
+
url: string;
|
|
5
|
+
query: Record<string, string> | null;
|
|
6
|
+
suggestion: SearchSuggestion | null;
|
|
7
|
+
term: string;
|
|
8
|
+
}
|
|
9
|
+
export interface ResultGroup {
|
|
10
|
+
group: string;
|
|
11
|
+
items: SearchSuggestion[];
|
|
12
|
+
}
|
|
13
|
+
export declare function useTypeaheadSearch(source: Ref<SearchSuggestion[]>, appOrigin: string): {
|
|
14
|
+
term: Ref<string, string>;
|
|
15
|
+
rawResults: Ref<any, any>;
|
|
16
|
+
activeIndex: Ref<number, number>;
|
|
17
|
+
groupedResults: import('vue').ComputedRef<ResultGroup[]>;
|
|
18
|
+
resolveSubmit: (selection: SearchSuggestion | string) => SubmitPayload;
|
|
19
|
+
};
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { ref as o, watch as m, computed as h } from "vue";
|
|
2
|
+
import v from "./typeaheadSearchEngine.js";
|
|
3
|
+
import { GIFT_SUGGESTIONS as E, MAX_PER_GROUP as S, SECTION_ORDER as g } from "./typeaheadSearchConfig.js";
|
|
4
|
+
const R = ["activity", "city_state", "loanTags", "state", "loanLimit"];
|
|
5
|
+
function _(u) {
|
|
6
|
+
return Object.keys(u).some((n) => R.includes(n));
|
|
7
|
+
}
|
|
8
|
+
function y(u) {
|
|
9
|
+
return u && _(u) ? "/lend" : "/lend/filter";
|
|
10
|
+
}
|
|
11
|
+
function w(u, n) {
|
|
12
|
+
const l = new v(), s = o(""), a = o([]), i = o(-1);
|
|
13
|
+
m(u, (e) => {
|
|
14
|
+
l.reset([...e ?? [], ...E]);
|
|
15
|
+
}, { immediate: !0 }), m(s, async (e) => {
|
|
16
|
+
if (i.value = -1, !e) {
|
|
17
|
+
a.value = [];
|
|
18
|
+
return;
|
|
19
|
+
}
|
|
20
|
+
a.value = await l.search(e);
|
|
21
|
+
});
|
|
22
|
+
const d = h(() => {
|
|
23
|
+
const e = /* @__PURE__ */ new Map();
|
|
24
|
+
return a.value.forEach((t) => {
|
|
25
|
+
const r = e.get(t.group) ?? [];
|
|
26
|
+
r.length < S && r.push(t), e.set(t.group, r);
|
|
27
|
+
}), [...e.keys()].sort((t, r) => g.indexOf(t) - g.indexOf(r)).map((t) => ({ group: t, items: e.get(t) ?? [] }));
|
|
28
|
+
});
|
|
29
|
+
function p(e) {
|
|
30
|
+
if (typeof e == "string") {
|
|
31
|
+
const f = { queryString: e };
|
|
32
|
+
return {
|
|
33
|
+
url: `${n}${y(f)}`,
|
|
34
|
+
query: f,
|
|
35
|
+
suggestion: null,
|
|
36
|
+
term: e
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
if (e.url)
|
|
40
|
+
return {
|
|
41
|
+
url: e.url,
|
|
42
|
+
query: null,
|
|
43
|
+
suggestion: e,
|
|
44
|
+
term: s.value
|
|
45
|
+
};
|
|
46
|
+
const [t, r] = (e.query ?? "").split("="), c = t ? { [t]: r } : null;
|
|
47
|
+
return {
|
|
48
|
+
url: `${n}${y(c)}`,
|
|
49
|
+
query: c,
|
|
50
|
+
suggestion: e,
|
|
51
|
+
term: s.value
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
return {
|
|
55
|
+
term: s,
|
|
56
|
+
rawResults: a,
|
|
57
|
+
activeIndex: i,
|
|
58
|
+
groupedResults: d,
|
|
59
|
+
resolveSubmit: p
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
export {
|
|
63
|
+
w as useTypeaheadSearch
|
|
64
|
+
};
|
package/dist/vue/KvTab.vue.d.ts
CHANGED
|
@@ -1,3 +1,12 @@
|
|
|
1
|
+
export interface NavItem {
|
|
2
|
+
forPanel?: string;
|
|
3
|
+
[key: string]: any;
|
|
4
|
+
}
|
|
5
|
+
export interface KvTabContext {
|
|
6
|
+
navItems: NavItem[];
|
|
7
|
+
selectedIndex: number;
|
|
8
|
+
setTab: (index: number) => void;
|
|
9
|
+
}
|
|
1
10
|
declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
2
11
|
forPanel: {
|
|
3
12
|
type: StringConstructor;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
input[type=search][data-v-c3eac6f7]::-webkit-search-cancel-button,input[type=search][data-v-c3eac6f7]::-webkit-search-decoration{-webkit-appearance:none;-moz-appearance:none;appearance:none}
|
package/dist/vue/KvTextInput.js
CHANGED
|
@@ -1,20 +1,21 @@
|
|
|
1
1
|
import u from "./KvTextInput2.js";
|
|
2
|
-
import { resolveComponent as m, openBlock as l, createElementBlock as
|
|
3
|
-
import
|
|
4
|
-
|
|
2
|
+
import { resolveComponent as m, openBlock as l, createElementBlock as w, normalizeClass as c, normalizeStyle as f, createElementVNode as i, mergeProps as g, toHandlers as v, createBlock as s, createCommentVNode as a, withDirectives as b, createVNode as h, vShow as y, renderSlot as x } from "vue";
|
|
3
|
+
import "./KvTextInput.css";
|
|
4
|
+
import _ from "../_virtual/_plugin-vue_export-helper.js";
|
|
5
|
+
const k = ["id", "type", "placeholder", "disabled", "value"], I = {
|
|
5
6
|
key: 2,
|
|
6
7
|
class: "tw-text-danger-highlight tw-text-small tw-font-medium tw-mt-1"
|
|
7
8
|
};
|
|
8
|
-
function
|
|
9
|
+
function C(d, n, t, e, V, p) {
|
|
9
10
|
const o = m("kv-material-icon");
|
|
10
|
-
return l(),
|
|
11
|
-
class:
|
|
12
|
-
style:
|
|
11
|
+
return l(), w("div", {
|
|
12
|
+
class: c(["tw-inline-flex", e.classes]),
|
|
13
|
+
style: f(e.styles)
|
|
13
14
|
}, [
|
|
14
15
|
i("div", {
|
|
15
|
-
class:
|
|
16
|
+
class: c(["tw-relative tw-w-full", { "tw-opacity-low": t.disabled }])
|
|
16
17
|
}, [
|
|
17
|
-
i("input",
|
|
18
|
+
i("input", g({
|
|
18
19
|
id: t.id,
|
|
19
20
|
ref: "textInputRef",
|
|
20
21
|
type: t.type,
|
|
@@ -27,20 +28,20 @@ function I(w, n, t, e, V, B) {
|
|
|
27
28
|
}],
|
|
28
29
|
placeholder: t.placeholder,
|
|
29
30
|
disabled: t.disabled
|
|
30
|
-
}, e.inputAttrs, { value: t.modelValue },
|
|
31
|
+
}, e.inputAttrs, { value: t.modelValue }, v(e.inputListeners, !0), {
|
|
31
32
|
onInput: n[0] || (n[0] = (...r) => e.onInput && e.onInput(...r))
|
|
32
|
-
}), null, 16,
|
|
33
|
-
t.icon ? (l(),
|
|
33
|
+
}), null, 16, k),
|
|
34
|
+
t.icon ? (l(), s(o, {
|
|
34
35
|
key: 0,
|
|
35
36
|
icon: t.icon,
|
|
36
37
|
class: "tw-w-3 tw-h-3 tw-absolute tw-top-1.5 tw-left-1.5 tw-pointer-events-none"
|
|
37
38
|
}, null, 8, ["icon"])) : a("", !0),
|
|
38
|
-
t.valid ? a("", !0) : (l(),
|
|
39
|
+
t.valid ? a("", !0) : (l(), s(o, {
|
|
39
40
|
key: 1,
|
|
40
41
|
icon: e.mdiAlertCircleOutline,
|
|
41
42
|
class: "tw-w-3 tw-h-3 tw-absolute tw-top-1.5 tw-right-1.5 tw-pointer-events-none tw-text-danger"
|
|
42
43
|
}, null, 8, ["icon"])),
|
|
43
|
-
|
|
44
|
+
b(i("button", {
|
|
44
45
|
type: "button",
|
|
45
46
|
class: "tw-absolute tw-top-1.5 tw-right-1.5",
|
|
46
47
|
onClick: n[1] || (n[1] = (...r) => e.clearInput && e.clearInput(...r))
|
|
@@ -53,13 +54,13 @@ function I(w, n, t, e, V, B) {
|
|
|
53
54
|
], 512), [
|
|
54
55
|
[y, t.canClear && t.valid && !!e.inputText]
|
|
55
56
|
]),
|
|
56
|
-
|
|
57
|
-
x(
|
|
57
|
+
d.$slots.error ? (l(), w("div", I, [
|
|
58
|
+
x(d.$slots, "error", {}, void 0, !0)
|
|
58
59
|
])) : a("", !0)
|
|
59
60
|
], 2)
|
|
60
61
|
], 6);
|
|
61
62
|
}
|
|
62
|
-
const A = /* @__PURE__ */
|
|
63
|
+
const A = /* @__PURE__ */ _(u, [["render", C], ["__scopeId", "data-v-c3eac6f7"]]);
|
|
63
64
|
export {
|
|
64
65
|
A as default
|
|
65
66
|
};
|
|
@@ -1,12 +1,28 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { resolveComponent as
|
|
3
|
-
import
|
|
4
|
-
function
|
|
5
|
-
const i =
|
|
6
|
-
return
|
|
7
|
-
default:
|
|
8
|
-
|
|
9
|
-
|
|
1
|
+
import m from "./KvLendMenu2.js";
|
|
2
|
+
import { resolveComponent as i, openBlock as t, createBlock as r, withCtx as h, createCommentVNode as v, createVNode as l, normalizeClass as _ } from "vue";
|
|
3
|
+
import f from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
+
function k(s, o, n, e, w, C) {
|
|
5
|
+
const g = i("mobile-lend-menu"), d = i("kv-lend-list-menu"), c = i("kv-lend-mega-menu"), u = i("kv-page-container");
|
|
6
|
+
return t(), r(u, { class: "tw-pt-2 lg:tw-pt-0" }, {
|
|
7
|
+
default: h(() => [
|
|
8
|
+
n.useMobileMegaMenu ? (t(), r(g, {
|
|
9
|
+
key: 0,
|
|
10
|
+
class: "md:tw-hidden",
|
|
11
|
+
categories: e.computedCategories,
|
|
12
|
+
regions: e.regions,
|
|
13
|
+
"user-id": n.userId,
|
|
14
|
+
favorites: e.favoritesCount,
|
|
15
|
+
searches: e.savedSearches,
|
|
16
|
+
"is-regions-loading": e.isRegionsLoading,
|
|
17
|
+
"is-channels-loading": e.isChannelsLoading,
|
|
18
|
+
"countries-not-lent-to-url": n.countriesNotLentToUrl,
|
|
19
|
+
"search-suggestions": n.searchSuggestions,
|
|
20
|
+
"app-origin": n.appOrigin,
|
|
21
|
+
onLoadSearchData: o[0] || (o[0] = (a) => s.$emit("load-search-data")),
|
|
22
|
+
onSearchSubmit: o[1] || (o[1] = (a) => s.$emit("search-submit", a))
|
|
23
|
+
}, null, 8, ["categories", "regions", "user-id", "favorites", "searches", "is-regions-loading", "is-channels-loading", "countries-not-lent-to-url", "search-suggestions", "app-origin"])) : v("", !0),
|
|
24
|
+
l(d, {
|
|
25
|
+
class: _(n.useMobileMegaMenu ? "tw-hidden md:tw-block lg:tw-hidden" : "lg:tw-hidden"),
|
|
10
26
|
categories: e.computedCategories,
|
|
11
27
|
regions: e.regions,
|
|
12
28
|
"user-id": n.userId,
|
|
@@ -16,8 +32,8 @@ function u(m, _, n, e, h, v) {
|
|
|
16
32
|
"is-channels-loading": e.isChannelsLoading,
|
|
17
33
|
"show-m-g-upsell-link": n.showMGUpsellLink,
|
|
18
34
|
"countries-not-lent-to-url": n.countriesNotLentToUrl
|
|
19
|
-
}, null, 8, ["categories", "regions", "user-id", "favorites", "searches", "is-regions-loading", "is-channels-loading", "show-m-g-upsell-link", "countries-not-lent-to-url"]),
|
|
20
|
-
|
|
35
|
+
}, null, 8, ["class", "categories", "regions", "user-id", "favorites", "searches", "is-regions-loading", "is-channels-loading", "show-m-g-upsell-link", "countries-not-lent-to-url"]),
|
|
36
|
+
l(c, {
|
|
21
37
|
class: "tw-hidden lg:tw-block",
|
|
22
38
|
categories: e.computedCategories,
|
|
23
39
|
regions: e.regions,
|
|
@@ -33,7 +49,7 @@ function u(m, _, n, e, h, v) {
|
|
|
33
49
|
_: 1
|
|
34
50
|
});
|
|
35
51
|
}
|
|
36
|
-
const
|
|
52
|
+
const S = /* @__PURE__ */ f(m, [["render", k]]);
|
|
37
53
|
export {
|
|
38
|
-
|
|
54
|
+
S as default
|
|
39
55
|
};
|
|
@@ -1,15 +1,17 @@
|
|
|
1
1
|
import { gql as l } from "@apollo/client/core";
|
|
2
|
-
import { toRefs as
|
|
2
|
+
import { toRefs as I, ref as s, computed as v, onMounted as w } from "vue";
|
|
3
3
|
import A from "./KvLendListMenu.js";
|
|
4
|
-
import
|
|
4
|
+
import O from "./KvLendMegaMenu.js";
|
|
5
|
+
import F from "../../KvWwwHeaderBasic/MobileLendMenu/MobileLendMenu.js";
|
|
5
6
|
import { indexIn as N } from "../../../utils/comparators.js";
|
|
6
|
-
import { groupBy as
|
|
7
|
-
import
|
|
8
|
-
const
|
|
7
|
+
import { groupBy as x, sortBy as C } from "../../../utils/arrayUtils.js";
|
|
8
|
+
import B from "../../KvPageContainer.js";
|
|
9
|
+
const U = {
|
|
9
10
|
components: {
|
|
10
11
|
KvLendListMenu: A,
|
|
11
|
-
KvLendMegaMenu:
|
|
12
|
-
|
|
12
|
+
KvLendMegaMenu: O,
|
|
13
|
+
MobileLendMenu: F,
|
|
14
|
+
KvPageContainer: B
|
|
13
15
|
},
|
|
14
16
|
props: {
|
|
15
17
|
userId: {
|
|
@@ -23,13 +25,37 @@ const J = {
|
|
|
23
25
|
countriesNotLentToUrl: {
|
|
24
26
|
type: String,
|
|
25
27
|
default: "/lend/countries-not-lent"
|
|
28
|
+
},
|
|
29
|
+
/**
|
|
30
|
+
* Render the new KvWwwHeaderBasic mobile tabbed menu (Categories / Regions / MyKiva / Search)
|
|
31
|
+
* below the md breakpoint instead of the legacy KvLendListMenu. Mega menu still renders at
|
|
32
|
+
* md+ in this mode. Default off preserves the legacy KvWwwHeader behavior.
|
|
33
|
+
*/
|
|
34
|
+
useMobileMegaMenu: {
|
|
35
|
+
type: Boolean,
|
|
36
|
+
default: !1
|
|
37
|
+
},
|
|
38
|
+
/**
|
|
39
|
+
* Search suggestion dataset for the mobile Search tab. Only used when useMobileMegaMenu is on.
|
|
40
|
+
*/
|
|
41
|
+
searchSuggestions: {
|
|
42
|
+
type: Array,
|
|
43
|
+
default: () => []
|
|
44
|
+
},
|
|
45
|
+
/**
|
|
46
|
+
* App origin used to build /lend/filter URLs on Search-tab submit. Only used when
|
|
47
|
+
* useMobileMegaMenu is on.
|
|
48
|
+
*/
|
|
49
|
+
appOrigin: {
|
|
50
|
+
type: String,
|
|
51
|
+
default: ""
|
|
26
52
|
}
|
|
27
53
|
},
|
|
28
|
-
emits: ["load-lend-menu-data"],
|
|
29
|
-
setup(h, { emit:
|
|
54
|
+
emits: ["load-lend-menu-data", "load-search-data", "search-submit"],
|
|
55
|
+
setup(h, { emit: M }) {
|
|
30
56
|
const {
|
|
31
57
|
userId: i
|
|
32
|
-
} =
|
|
58
|
+
} = I(h), c = s([]), d = s([]), m = s(0), p = s([]), b = [
|
|
33
59
|
"North America",
|
|
34
60
|
"Central America",
|
|
35
61
|
"South America",
|
|
@@ -38,8 +64,8 @@ const J = {
|
|
|
38
64
|
"Middle East",
|
|
39
65
|
"Asia",
|
|
40
66
|
"Oceania"
|
|
41
|
-
],
|
|
42
|
-
var o, t, n,
|
|
67
|
+
], y = s(!0), f = s(!0), L = async (r) => {
|
|
68
|
+
var o, t, n, u;
|
|
43
69
|
if (r.watchQuery({
|
|
44
70
|
query: l`query countryFacets {
|
|
45
71
|
lend {
|
|
@@ -56,8 +82,8 @@ const J = {
|
|
|
56
82
|
}`
|
|
57
83
|
}).subscribe({
|
|
58
84
|
next: ({ data: e }) => {
|
|
59
|
-
var
|
|
60
|
-
|
|
85
|
+
var a;
|
|
86
|
+
d.value = ((a = e == null ? void 0 : e.lend) == null ? void 0 : a.countryFacets) ?? [], y.value = !1;
|
|
61
87
|
}
|
|
62
88
|
}), r.watchQuery({
|
|
63
89
|
query: l`
|
|
@@ -75,8 +101,8 @@ const J = {
|
|
|
75
101
|
`
|
|
76
102
|
}).subscribe({
|
|
77
103
|
next: ({ data: e }) => {
|
|
78
|
-
var
|
|
79
|
-
c.value = ((
|
|
104
|
+
var a, g;
|
|
105
|
+
c.value = ((g = (a = e == null ? void 0 : e.lend) == null ? void 0 : a.loanChannels) == null ? void 0 : g.values) ?? [], f.value = !1;
|
|
80
106
|
}
|
|
81
107
|
}), i.value) {
|
|
82
108
|
const { data: e } = await r.query({
|
|
@@ -105,22 +131,22 @@ const J = {
|
|
|
105
131
|
},
|
|
106
132
|
fetchPolicy: "network-only"
|
|
107
133
|
});
|
|
108
|
-
|
|
134
|
+
m.value = ((t = (o = e == null ? void 0 : e.lend) == null ? void 0 : o.loans) == null ? void 0 : t.totalCount) ?? 0, p.value = ((u = (n = e == null ? void 0 : e.my) == null ? void 0 : n.savedSearches) == null ? void 0 : u.values) ?? [];
|
|
109
135
|
}
|
|
110
|
-
},
|
|
111
|
-
const r =
|
|
136
|
+
}, S = v(() => {
|
|
137
|
+
const r = d.value.map((n) => ({
|
|
112
138
|
name: n.country.name,
|
|
113
139
|
region: n.country.region,
|
|
114
140
|
isoCode: n.country.isoCode.toLowerCase(),
|
|
115
141
|
count: n.count || 0
|
|
116
|
-
})), o =
|
|
117
|
-
for (const [n,
|
|
142
|
+
})), o = x(r, "region"), t = [];
|
|
143
|
+
for (const [n, u] of Object.entries(o))
|
|
118
144
|
t.push({
|
|
119
145
|
name: n,
|
|
120
|
-
countries:
|
|
146
|
+
countries: u.sort(C("name"))
|
|
121
147
|
});
|
|
122
|
-
return t.sort(N(
|
|
123
|
-
}),
|
|
148
|
+
return t.sort(N(b, "name"));
|
|
149
|
+
}), q = v(() => {
|
|
124
150
|
var o;
|
|
125
151
|
return ((o = c.value) == null ? void 0 : o.map((t) => {
|
|
126
152
|
const n = JSON.parse(JSON.stringify(t));
|
|
@@ -128,18 +154,18 @@ const J = {
|
|
|
128
154
|
})).sort(C("name"));
|
|
129
155
|
});
|
|
130
156
|
return w(() => {
|
|
131
|
-
|
|
157
|
+
M("load-lend-menu-data");
|
|
132
158
|
}), {
|
|
133
|
-
onLoad:
|
|
134
|
-
regions:
|
|
135
|
-
computedCategories:
|
|
159
|
+
onLoad: L,
|
|
160
|
+
regions: S,
|
|
161
|
+
computedCategories: q,
|
|
136
162
|
isChannelsLoading: f,
|
|
137
|
-
isRegionsLoading:
|
|
138
|
-
savedSearches:
|
|
139
|
-
favoritesCount:
|
|
163
|
+
isRegionsLoading: y,
|
|
164
|
+
savedSearches: p,
|
|
165
|
+
favoritesCount: m
|
|
140
166
|
};
|
|
141
167
|
}
|
|
142
168
|
};
|
|
143
169
|
export {
|
|
144
|
-
|
|
170
|
+
U as default
|
|
145
171
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
[data-v-a681200e] a{padding-top:.5rem;padding-bottom:.5rem}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import c from "./AboutMenu2.js";
|
|
2
|
+
import { resolveComponent as l, openBlock as t, createElementBlock as r, normalizeClass as i, Fragment as m, renderList as s, createBlock as f, withCtx as _, createTextVNode as p, toDisplayString as d } from "vue";
|
|
3
|
+
import "./AboutMenu.css";
|
|
4
|
+
import u from "../../_virtual/_plugin-vue_export-helper.js";
|
|
5
|
+
function k(w, x, n, o, h, v) {
|
|
6
|
+
const a = l("kv-header-menu-link");
|
|
7
|
+
return t(), r("nav", {
|
|
8
|
+
class: i(["tw-flex tw-flex-col tw-items-start tw-font-medium tw-mt-0.5 tw-pb-1", n.isMobile ? "tw-px-0" : "tw-px-2"])
|
|
9
|
+
}, [
|
|
10
|
+
(t(!0), r(m, null, s(o.links, (e) => (t(), f(a, {
|
|
11
|
+
key: e.href,
|
|
12
|
+
href: e.href,
|
|
13
|
+
onClick: (C) => o.onLinkClick(e.action)
|
|
14
|
+
}, {
|
|
15
|
+
default: _(() => [
|
|
16
|
+
p(d(e.label), 1)
|
|
17
|
+
]),
|
|
18
|
+
_: 2
|
|
19
|
+
}, 1032, ["href", "onClick"]))), 128))
|
|
20
|
+
], 2);
|
|
21
|
+
}
|
|
22
|
+
const L = /* @__PURE__ */ u(c, [["render", k], ["__scopeId", "data-v-a681200e"]]);
|
|
23
|
+
export {
|
|
24
|
+
L as default
|
|
25
|
+
};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
export interface TrackEvent {
|
|
2
|
+
(category: string, action: string, label?: string, value?: number): void;
|
|
3
|
+
}
|
|
4
|
+
export interface AboutLink {
|
|
5
|
+
label: string;
|
|
6
|
+
href: string;
|
|
7
|
+
action: string;
|
|
8
|
+
}
|
|
9
|
+
declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
10
|
+
isMobile: {
|
|
11
|
+
type: BooleanConstructor;
|
|
12
|
+
default: boolean;
|
|
13
|
+
};
|
|
14
|
+
}>, {
|
|
15
|
+
links: AboutLink[];
|
|
16
|
+
onLinkClick: (action: string) => void;
|
|
17
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, "closing-menu"[], "closing-menu", import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
18
|
+
isMobile: {
|
|
19
|
+
type: BooleanConstructor;
|
|
20
|
+
default: boolean;
|
|
21
|
+
};
|
|
22
|
+
}>> & Readonly<{
|
|
23
|
+
"onClosing-menu"?: (...args: any[]) => any;
|
|
24
|
+
}>, {
|
|
25
|
+
isMobile: boolean;
|
|
26
|
+
}, {}, {
|
|
27
|
+
KvHeaderMenuLink: any;
|
|
28
|
+
}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
29
|
+
export default _default;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { inject as t } from "vue";
|
|
2
|
+
import c from "../KvWwwHeader/KvHeaderMenuLink.js";
|
|
3
|
+
const n = [
|
|
4
|
+
{ label: "About us", href: "/about", action: "click-About-About us" },
|
|
5
|
+
{ label: "How Kiva works", href: "/about/how", action: "click-About-How Kiva works" },
|
|
6
|
+
{ label: "Where Kiva works", href: "/about/where-kiva-works", action: "click-About-Where Kiva works" },
|
|
7
|
+
{ label: "Impact", href: "/impact", action: "click-About-Impact" },
|
|
8
|
+
{ label: "Leadership", href: "/about/leadership", action: "click-About-Leadership" },
|
|
9
|
+
{ label: "Finances", href: "/about/finances", action: "click-About-Finances" },
|
|
10
|
+
{ label: "Press", href: "/about/press-center", action: "click-About-Press" },
|
|
11
|
+
{ label: "Due diligence", href: "/about/due-diligence", action: "click-About-Due diligence" }
|
|
12
|
+
], u = {
|
|
13
|
+
name: "AboutMenu",
|
|
14
|
+
components: { KvHeaderMenuLink: c },
|
|
15
|
+
props: {
|
|
16
|
+
isMobile: {
|
|
17
|
+
type: Boolean,
|
|
18
|
+
default: !1
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
emits: ["closing-menu"],
|
|
22
|
+
setup(l, { emit: e }) {
|
|
23
|
+
const o = t("$kvTrackEvent", () => {
|
|
24
|
+
});
|
|
25
|
+
function a(i) {
|
|
26
|
+
o("TopNav", i), e("closing-menu");
|
|
27
|
+
}
|
|
28
|
+
return { links: n, onLinkClick: a };
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
export {
|
|
32
|
+
u as default
|
|
33
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.header-fade-enter-active[data-v-eadac17f]{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.3s}.header-fade-leave-active[data-v-eadac17f]{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.1s}.header-fade-enter[data-v-eadac17f],.header-fade-leave-to[data-v-eadac17f]{opacity:0}.header-fade-leave[data-v-eadac17f],.header-fade-enter-to[data-v-eadac17f]{opacity:1}.bg-opacity-50[data-v-eadac17f]{background-color:rgba(var(--bg-action-highlight),.5)}
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import f from "./KvWwwHeaderBasic2.js";
|
|
2
|
+
import { resolveComponent as l, openBlock as d, createBlock as u, withCtx as a, createElementVNode as s, normalizeStyle as m, createVNode as r, Transition as g, withDirectives as b, vShow as v, normalizeClass as k, resolveDynamicComponent as y, withModifiers as M } from "vue";
|
|
3
|
+
import "./KvWwwHeaderBasic.css";
|
|
4
|
+
import C from "../../_virtual/_plugin-vue_export-helper.js";
|
|
5
|
+
function I(t, o, e, n, L, D) {
|
|
6
|
+
const w = l("link-bar"), h = l("kv-page-container"), c = l("kv-theme-provider");
|
|
7
|
+
return d(), u(c, {
|
|
8
|
+
tag: "div",
|
|
9
|
+
class: "tw-bg-primary"
|
|
10
|
+
}, {
|
|
11
|
+
default: a(() => [
|
|
12
|
+
s("nav", {
|
|
13
|
+
ref: "navRef",
|
|
14
|
+
class: "tw-font-medium tw-relative tw-border-b tw-border-tertiary",
|
|
15
|
+
style: m({ minHeight: n.MIN_HEADER_HEIGHT })
|
|
16
|
+
}, [
|
|
17
|
+
r(h, null, {
|
|
18
|
+
default: a(() => [
|
|
19
|
+
r(g, { name: "header-fade" }, {
|
|
20
|
+
default: a(() => [
|
|
21
|
+
b(r(w, {
|
|
22
|
+
"logged-in": e.loggedIn,
|
|
23
|
+
"basket-count": e.basketCount,
|
|
24
|
+
balance: e.balance,
|
|
25
|
+
"user-id": e.userId,
|
|
26
|
+
"is-borrower": e.isBorrower,
|
|
27
|
+
"is-trustee": e.isTrustee,
|
|
28
|
+
"lender-name": e.lenderName,
|
|
29
|
+
"lender-image-url": e.lenderImageUrl,
|
|
30
|
+
"is-user-data-loading": e.isUserDataLoading,
|
|
31
|
+
"is-basket-data-loading": e.isBasketDataLoading,
|
|
32
|
+
"show-m-g-upsell-link": e.showMGUpsellLink,
|
|
33
|
+
"login-url": e.loginUrl,
|
|
34
|
+
"my-dashboard-url": e.myDashboardUrl,
|
|
35
|
+
"countries-not-lent-to-url": e.countriesNotLentToUrl,
|
|
36
|
+
"app-origin": e.appOrigin,
|
|
37
|
+
"search-suggestions": e.searchSuggestions,
|
|
38
|
+
"is-mobile": n.isMobile,
|
|
39
|
+
"open-menu-item": n.menuComponent,
|
|
40
|
+
onItemHover: n.onItemHover,
|
|
41
|
+
onLoadSearchData: o[0] || (o[0] = (i) => t.$emit("load-search-data")),
|
|
42
|
+
onSearchSubmit: o[1] || (o[1] = (i) => t.$emit("search-submit", i))
|
|
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, n.linksVisible]
|
|
45
|
+
])
|
|
46
|
+
]),
|
|
47
|
+
_: 1
|
|
48
|
+
})
|
|
49
|
+
]),
|
|
50
|
+
_: 1
|
|
51
|
+
})
|
|
52
|
+
], 4),
|
|
53
|
+
r(g, { name: "header-fade" }, {
|
|
54
|
+
default: a(() => [
|
|
55
|
+
b(s("div", {
|
|
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: m({ top: n.navHeight }),
|
|
58
|
+
onTouchstart: o[8] || (o[8] = (...i) => n.handleOverlayClick && n.handleOverlayClick(...i))
|
|
59
|
+
}, [
|
|
60
|
+
s("div", {
|
|
61
|
+
ref: "menuPanelRef",
|
|
62
|
+
class: k(["tw-bg-primary tw-overflow-y-auto", n.menuPanelClass]),
|
|
63
|
+
style: m({
|
|
64
|
+
...n.menuPosition,
|
|
65
|
+
maxHeight: n.isMobileMenuActive ? "auto" : `calc(100dvh - ${n.navHeight})`
|
|
66
|
+
}),
|
|
67
|
+
onMouseenter: o[6] || (o[6] = (i) => n.setMenu(n.menuItem, n.menuComponent)),
|
|
68
|
+
onMouseleave: o[7] || (o[7] = (i) => n.setMenu())
|
|
69
|
+
}, [
|
|
70
|
+
(d(), u(y(n.menuComponent), {
|
|
71
|
+
ref: "menuComponentInstance",
|
|
72
|
+
"logged-in": e.loggedIn,
|
|
73
|
+
"login-url": e.loginUrl,
|
|
74
|
+
"user-id": e.userId,
|
|
75
|
+
"is-borrower": e.isBorrower,
|
|
76
|
+
"is-trustee": e.isTrustee,
|
|
77
|
+
"my-dashboard-url": e.myDashboardUrl,
|
|
78
|
+
"show-m-g-upsell-link": e.showMGUpsellLink,
|
|
79
|
+
"is-mobile": n.isMobile,
|
|
80
|
+
"countries-not-lent-to-url": e.countriesNotLentToUrl,
|
|
81
|
+
"use-mobile-mega-menu": !0,
|
|
82
|
+
"app-origin": e.appOrigin,
|
|
83
|
+
"search-suggestions": e.searchSuggestions,
|
|
84
|
+
onLoadLendMenuData: n.emitLendMenuEvent,
|
|
85
|
+
onLoadSearchData: o[2] || (o[2] = (i) => t.$emit("load-search-data")),
|
|
86
|
+
onSearchSubmit: o[3] || (o[3] = (i) => t.$emit("search-submit", i)),
|
|
87
|
+
onClosingMenu: o[4] || (o[4] = (i) => n.setMenu()),
|
|
88
|
+
onTouchstart: o[5] || (o[5] = M(() => {
|
|
89
|
+
}, ["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"]))
|
|
91
|
+
], 38)
|
|
92
|
+
], 36), [
|
|
93
|
+
[v, n.menuOpen]
|
|
94
|
+
])
|
|
95
|
+
]),
|
|
96
|
+
_: 1
|
|
97
|
+
})
|
|
98
|
+
]),
|
|
99
|
+
_: 1
|
|
100
|
+
});
|
|
101
|
+
}
|
|
102
|
+
const B = /* @__PURE__ */ C(f, [["render", I], ["__scopeId", "data-v-eadac17f"]]);
|
|
103
|
+
export {
|
|
104
|
+
B as default
|
|
105
|
+
};
|