@kiva/kv-shop 3.7.81 → 3.7.83

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.
Files changed (40) hide show
  1. package/dist/components/KvPaymentSelect2.js +13 -9
  2. package/dist/kv-components/dist/utils/attrs.js +19 -0
  3. package/dist/kv-components/dist/utils/comparators.js +17 -5
  4. package/dist/kv-components/dist/utils/markMatches.js +12 -0
  5. package/dist/kv-components/dist/utils/typeaheadSearchConfig.js +31 -0
  6. package/dist/kv-components/dist/utils/typeaheadSearchEngine.js +28 -0
  7. package/dist/kv-components/dist/utils/useTypeaheadSearch.js +64 -0
  8. package/dist/kv-components/dist/vue/KvTextInput.css +1 -0
  9. package/dist/kv-components/dist/vue/KvTextInput.js +66 -0
  10. package/dist/kv-components/dist/vue/KvTextInput2.js +126 -0
  11. package/dist/kv-components/dist/vue/KvWwwHeader/LendMenu/KvLendMenu.js +47 -31
  12. package/dist/kv-components/dist/vue/KvWwwHeader/LendMenu/KvLendMenu2.js +67 -41
  13. package/dist/kv-components/dist/vue/KvWwwHeaderBasic/AboutMenu.css +1 -0
  14. package/dist/kv-components/dist/vue/KvWwwHeaderBasic/AboutMenu.js +25 -0
  15. package/dist/kv-components/dist/vue/KvWwwHeaderBasic/AboutMenu2.js +33 -0
  16. package/dist/kv-components/dist/vue/KvWwwHeaderBasic/KvWwwHeaderBasic.css +1 -0
  17. package/dist/kv-components/dist/vue/KvWwwHeaderBasic/LinkBar.css +1 -0
  18. package/dist/kv-components/dist/vue/KvWwwHeaderBasic/LinkBar2.js +11 -0
  19. package/dist/kv-components/dist/vue/KvWwwHeaderBasic/MobileLendMenu/CategoriesPanel.css +1 -0
  20. package/dist/kv-components/dist/vue/KvWwwHeaderBasic/MobileLendMenu/CategoriesPanel.js +61 -0
  21. package/dist/kv-components/dist/vue/KvWwwHeaderBasic/MobileLendMenu/CategoriesPanel2.js +18 -0
  22. package/dist/kv-components/dist/vue/KvWwwHeaderBasic/MobileLendMenu/MobileLendMenu.css +1 -0
  23. package/dist/kv-components/dist/vue/KvWwwHeaderBasic/MobileLendMenu/MobileLendMenu.js +102 -0
  24. package/dist/kv-components/dist/vue/KvWwwHeaderBasic/MobileLendMenu/MobileLendMenu2.js +74 -0
  25. package/dist/kv-components/dist/vue/KvWwwHeaderBasic/MobileLendMenu/MyKivaPanel.css +1 -0
  26. package/dist/kv-components/dist/vue/KvWwwHeaderBasic/MobileLendMenu/MyKivaPanel.js +51 -0
  27. package/dist/kv-components/dist/vue/KvWwwHeaderBasic/MobileLendMenu/MyKivaPanel2.js +31 -0
  28. package/dist/kv-components/dist/vue/KvWwwHeaderBasic/MobileLendMenu/RegionsPanel.js +38 -0
  29. package/dist/kv-components/dist/vue/KvWwwHeaderBasic/MobileLendMenu/RegionsPanel2.js +24 -0
  30. package/dist/kv-components/dist/vue/KvWwwHeaderBasic/MobileLendMenu/SearchPanel.js +17 -0
  31. package/dist/kv-components/dist/vue/KvWwwHeaderBasic/MobileLendMenu/SearchPanel2.js +19 -0
  32. package/dist/kv-components/dist/vue/KvWwwHeaderBasic/MobileMenu.css +1 -0
  33. package/dist/kv-components/dist/vue/KvWwwHeaderBasic/MobileMenu.js +52 -0
  34. package/dist/kv-components/dist/vue/KvWwwHeaderBasic/MobileMenu2.js +36 -0
  35. package/dist/kv-components/dist/vue/KvWwwHeaderBasic/MyKivaMenu.css +1 -0
  36. package/dist/kv-components/dist/vue/KvWwwHeaderBasic/MyKivaMenu.js +90 -0
  37. package/dist/kv-components/dist/vue/KvWwwHeaderBasic/MyKivaMenu2.js +45 -0
  38. package/dist/kv-components/dist/vue/KvWwwHeaderBasic/SearchBar.js +73 -0
  39. package/dist/kv-components/dist/vue/KvWwwHeaderBasic/SearchBar2.js +84 -0
  40. package/package.json +3 -3
@@ -1,15 +1,17 @@
1
1
  import { gql as s } from "@apollo/client/core";
2
- import { toRefs as S, ref as r, computed as g, onMounted as w } from "vue";
2
+ import { toRefs as I, ref as r, computed as g, onMounted as w } from "vue";
3
3
  import A from "./KvLendListMenu.js";
4
4
  import N from "./KvLendMegaMenu.js";
5
+ import O from "../../KvWwwHeaderBasic/MobileLendMenu/MobileLendMenu.js";
5
6
  import { indexIn as x } from "../../../utils/comparators.js";
6
- import { groupBy as F, sortBy as C } from "../../../utils/arrayUtils.js";
7
- import O from "../../KvPageContainer.js";
8
- const k = {
7
+ import { groupBy as B, sortBy as h } from "../../../utils/arrayUtils.js";
8
+ import F from "../../KvPageContainer.js";
9
+ const J = {
9
10
  components: {
10
11
  KvLendListMenu: A,
11
12
  KvLendMegaMenu: N,
12
- KvPageContainer: O
13
+ MobileLendMenu: O,
14
+ KvPageContainer: F
13
15
  },
14
16
  props: {
15
17
  userId: {
@@ -23,13 +25,37 @@ const k = {
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: L }) {
54
+ emits: ["load-lend-menu-data", "load-search-data", "search-submit"],
55
+ setup(C, { emit: M }) {
30
56
  const {
31
57
  userId: i
32
- } = S(h), d = r([]), c = r([]), m = r(0), v = r([]), M = [
58
+ } = I(C), d = r([]), c = r([]), m = r(0), v = r([]), b = [
33
59
  "North America",
34
60
  "Central America",
35
61
  "South America",
@@ -38,9 +64,9 @@ const k = {
38
64
  "Middle East",
39
65
  "Asia",
40
66
  "Oceania"
41
- ], y = r(!0), p = r(!0), b = async (a) => {
42
- var t, n, o, l;
43
- if (a.watchQuery({
67
+ ], p = r(!0), y = r(!0), L = async (o) => {
68
+ var t, a, n, l;
69
+ if (o.watchQuery({
44
70
  query: s`query countryFacets {
45
71
  lend {
46
72
  countryFacets {
@@ -57,9 +83,9 @@ const k = {
57
83
  }).subscribe({
58
84
  next: ({ data: e }) => {
59
85
  var u;
60
- c.value = ((u = e == null ? void 0 : e.lend) == null ? void 0 : u.countryFacets) ?? [], y.value = !1;
86
+ c.value = ((u = e == null ? void 0 : e.lend) == null ? void 0 : u.countryFacets) ?? [], p.value = !1;
61
87
  }
62
- }), a.watchQuery({
88
+ }), o.watchQuery({
63
89
  query: s`
64
90
  query lendMenuData {
65
91
  lend {
@@ -76,10 +102,10 @@ const k = {
76
102
  }).subscribe({
77
103
  next: ({ data: e }) => {
78
104
  var u, f;
79
- d.value = ((f = (u = e == null ? void 0 : e.lend) == null ? void 0 : u.loanChannels) == null ? void 0 : f.values) ?? [], p.value = !1;
105
+ d.value = ((f = (u = e == null ? void 0 : e.lend) == null ? void 0 : u.loanChannels) == null ? void 0 : f.values) ?? [], y.value = !1;
80
106
  }
81
107
  }), i.value) {
82
- const { data: e } = await a.query({
108
+ const { data: e } = await o.query({
83
109
  query: s`
84
110
  query lendMenuPrivateData($userId: Int!) {
85
111
  lend {
@@ -105,41 +131,41 @@ const k = {
105
131
  },
106
132
  fetchPolicy: "network-only"
107
133
  });
108
- m.value = ((n = (t = e == null ? void 0 : e.lend) == null ? void 0 : t.loans) == null ? void 0 : n.totalCount) ?? 0, v.value = ((l = (o = e == null ? void 0 : e.my) == null ? void 0 : o.savedSearches) == null ? void 0 : l.values) ?? [];
134
+ m.value = ((a = (t = e == null ? void 0 : e.lend) == null ? void 0 : t.loans) == null ? void 0 : a.totalCount) ?? 0, v.value = ((l = (n = e == null ? void 0 : e.my) == null ? void 0 : n.savedSearches) == null ? void 0 : l.values) ?? [];
109
135
  }
110
- }, q = g(() => {
111
- const a = c.value.map((o) => ({
112
- name: o.country.name,
113
- region: o.country.region,
114
- isoCode: o.country.isoCode.toLowerCase(),
115
- count: o.count || 0
116
- })), t = F(a, "region"), n = [];
117
- for (const [o, l] of Object.entries(t))
118
- n.push({
119
- name: o,
120
- countries: l.sort(C("name"))
136
+ }, S = g(() => {
137
+ const o = c.value.map((n) => ({
138
+ name: n.country.name,
139
+ region: n.country.region,
140
+ isoCode: n.country.isoCode.toLowerCase(),
141
+ count: n.count || 0
142
+ })), t = B(o, "region"), a = [];
143
+ for (const [n, l] of Object.entries(t))
144
+ a.push({
145
+ name: n,
146
+ countries: l.sort(h("name"))
121
147
  });
122
- return n.sort(x(M, "name"));
123
- }), I = g(() => {
124
- var a;
125
- return ((a = d.value) == null ? void 0 : a.map((t) => {
126
- const n = JSON.parse(JSON.stringify(t));
127
- return n.url = n.url.replace("lend", "lend-by-category"), n;
128
- })).sort(C("name"));
148
+ return a.sort(x(b, "name"));
149
+ }), q = g(() => {
150
+ var o;
151
+ return ((o = d.value) == null ? void 0 : o.map((t) => {
152
+ const a = JSON.parse(JSON.stringify(t));
153
+ return a.url = a.url.replace("lend", "lend-by-category"), a;
154
+ })).sort(h("name"));
129
155
  });
130
156
  return w(() => {
131
- L("load-lend-menu-data");
157
+ M("load-lend-menu-data");
132
158
  }), {
133
- onLoad: b,
134
- regions: q,
135
- computedCategories: I,
136
- isChannelsLoading: p,
137
- isRegionsLoading: y,
159
+ onLoad: L,
160
+ regions: S,
161
+ computedCategories: q,
162
+ isChannelsLoading: y,
163
+ isRegionsLoading: p,
138
164
  savedSearches: v,
139
165
  favoritesCount: m
140
166
  };
141
167
  }
142
168
  };
143
169
  export {
144
- k as default
170
+ J as default
145
171
  };
@@ -0,0 +1 @@
1
+ [data-v-a681200e] a{padding-top:.5rem;padding-bottom:.5rem}
@@ -0,0 +1,25 @@
1
+ import i from "./AboutMenu2.js";
2
+ import { resolveComponent as a, createElementBlock as r, openBlock as e, normalizeClass as c, Fragment as m, renderList as s, createBlock as f, withCtx as k, createTextVNode as p, toDisplayString as w } from "vue";
3
+ import "./AboutMenu.css";
4
+ import d from "../../_virtual/_plugin-vue_export-helper.js";
5
+ function u(x, h, n, o, C, v) {
6
+ const l = a("kv-header-menu-link");
7
+ return e(), r("nav", {
8
+ class: c(["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
+ (e(!0), r(m, null, s(o.links, (t) => (e(), f(l, {
11
+ key: t.href,
12
+ href: t.href,
13
+ onClick: (b) => o.onLinkClick(t.action)
14
+ }, {
15
+ default: k(() => [
16
+ p(w(t.label), 1)
17
+ ]),
18
+ _: 2
19
+ }, 1032, ["href", "onClick"]))), 128))
20
+ ], 2);
21
+ }
22
+ const y = /* @__PURE__ */ d(i, [["render", u], ["__scopeId", "data-v-a681200e"]]);
23
+ export {
24
+ y as default
25
+ };
@@ -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
+ ], s = {
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 i(a) {
26
+ o("TopNav", a), e("closing-menu");
27
+ }
28
+ return { links: n, onLinkClick: i };
29
+ }
30
+ };
31
+ export {
32
+ s 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 @@
1
+ .link-bar[data-v-a53394e2]{display:flex;align-items:center;gap:.5rem}.link-bar__logo[data-v-a53394e2]{position:absolute;top:50%;left:50%;--tw-translate-x: -50%;--tw-translate-y: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.3s}@media (min-width: 45.875rem){.link-bar[data-v-a53394e2]{display:grid;-moz-column-gap:1rem;column-gap:1rem;grid-template-areas:"logo lend right" "search search search";grid-template-columns:1fr auto auto;grid-template-rows:4rem auto;row-gap:.5rem}.link-bar__logo[data-v-a53394e2]{position:static;--tw-translate-x: 0;--tw-translate-y: 0;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));grid-area:logo;justify-self:start}.link-bar__lend[data-v-a53394e2]{grid-area:lend}.link-bar__search[data-v-a53394e2]{grid-area:search;margin-bottom:.5rem}.link-bar__right[data-v-a53394e2]{grid-area:right}}@media (min-width: 64rem){.link-bar[data-v-a53394e2]{-moz-column-gap:1.25rem;column-gap:1.25rem;grid-template-areas:"logo lend search right";grid-template-columns:auto auto 1fr auto;grid-template-rows:4rem}.link-bar__search[data-v-a53394e2]{margin-bottom:0}}.header-link[data-v-a53394e2]{cursor:pointer;padding-top:1rem;padding-bottom:1rem;--tw-text-opacity: 1;color:rgba(var(--text-primary),var(--tw-text-opacity, 1));text-decoration-line:none}.header-link[data-v-a53394e2]:hover{--tw-text-opacity: 1;color:rgba(var(--text-action),var(--tw-text-opacity, 1));text-decoration-line:none}
@@ -0,0 +1,11 @@
1
+ import { defineAsyncComponent as o } from "vue";
2
+ import "@mdi/js";
3
+ import "numeral";
4
+ /* empty css */
5
+ /* empty css */
6
+ /* empty css */
7
+ import "fuse.js";
8
+ o(() => import("../KvWwwHeader/LendMenu/KvLendMenu.js"));
9
+ o(() => import("./AboutMenu.js"));
10
+ o(() => import("./MyKivaMenu.js"));
11
+ o(() => import("./MobileMenu.js"));
@@ -0,0 +1 @@
1
+ .lend-link[data-v-09a764b4]{display:block;width:100%;padding-top:.5rem;padding-bottom:.5rem;--tw-text-opacity: 1;color:rgba(var(--text-primary),var(--tw-text-opacity, 1));text-decoration-line:none}.lend-link[data-v-09a764b4]:hover{--tw-text-opacity: 1;color:rgba(var(--text-action),var(--tw-text-opacity, 1));text-decoration-line:underline}
@@ -0,0 +1,61 @@
1
+ import p from "./CategoriesPanel2.js";
2
+ import { resolveComponent as y, resolveDirective as g, createElementBlock as e, openBlock as l, createElementVNode as a, Fragment as s, renderList as d, createVNode as v, withDirectives as n, createTextVNode as c, toDisplayString as f } from "vue";
3
+ import "./CategoriesPanel.css";
4
+ import h from "../../../_virtual/_plugin-vue_export-helper.js";
5
+ const u = { class: "tw-font-medium" }, b = ["href"], w = { class: "tw-border-t tw-border-tertiary tw-mt-1" }, L = {
6
+ href: "/lend-by-category/recommended-by-lenders",
7
+ class: "lend-link tw-text-brand"
8
+ }, N = {
9
+ href: "/lend",
10
+ class: "lend-link"
11
+ }, T = {
12
+ href: "/categories",
13
+ class: "lend-link"
14
+ };
15
+ function A(C, r, i, x, D, _) {
16
+ const m = y("kv-loading-placeholder"), o = g("kv-track-event");
17
+ return l(), e("ul", u, [
18
+ i.isChannelsLoading ? (l(), e(s, { key: 0 }, d(12, (t) => a("li", {
19
+ key: t,
20
+ class: "tw-py-1"
21
+ }, [
22
+ v(m, { style: { height: "1rem", width: "11rem" } })
23
+ ])), 64)) : (l(!0), e(s, { key: 1 }, d(i.categories, (t, k) => (l(), e("li", {
24
+ key: t.url
25
+ }, [
26
+ n((l(), e("a", {
27
+ href: t.url,
28
+ class: "lend-link"
29
+ }, [
30
+ c(f(t.name), 1)
31
+ ], 8, b)), [
32
+ [o, ["TopNav", "click-Lend-Category", t.name, k + 1]]
33
+ ])
34
+ ]))), 128)),
35
+ a("li", w, [
36
+ n((l(), e("a", L, r[0] || (r[0] = [
37
+ c(" Recommended by lenders ")
38
+ ]))), [
39
+ [o, ["TopNav", "click-Lend-Recommended-by-lenders"]]
40
+ ])
41
+ ]),
42
+ a("li", null, [
43
+ n((l(), e("a", N, r[1] || (r[1] = [
44
+ c(" All loans ")
45
+ ]))), [
46
+ [o, ["TopNav", "click-Lend-All_Loans"]]
47
+ ])
48
+ ]),
49
+ a("li", null, [
50
+ n((l(), e("a", T, r[2] || (r[2] = [
51
+ c(" All categories ")
52
+ ]))), [
53
+ [o, ["TopNav", "click-Lend-All_Categories"]]
54
+ ])
55
+ ])
56
+ ]);
57
+ }
58
+ const F = /* @__PURE__ */ h(p, [["render", A], ["__scopeId", "data-v-09a764b4"]]);
59
+ export {
60
+ F as default
61
+ };
@@ -0,0 +1,18 @@
1
+ import e from "../../KvLoadingPlaceholder.js";
2
+ const o = {
3
+ name: "CategoriesPanel",
4
+ components: { KvLoadingPlaceholder: e },
5
+ props: {
6
+ categories: {
7
+ type: Array,
8
+ default: () => []
9
+ },
10
+ isChannelsLoading: {
11
+ type: Boolean,
12
+ default: !1
13
+ }
14
+ }
15
+ };
16
+ export {
17
+ o as default
18
+ };
@@ -0,0 +1 @@
1
+ [data-v-972cda69] [role=tab]{font-family:PostGrotesk,PostGrotesk-fallback,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif;font-weight:400;font-size:1.125rem;letter-spacing:0em;line-height:1.2777778em}@media (min-width: 45.875rem){[data-v-972cda69] [role=tab]{font-size:1.125rem;letter-spacing:0em;line-height:1.2777778em}}@media (min-width: 64rem){[data-v-972cda69] [role=tab]{font-size:1.25rem;letter-spacing:0em;line-height:1.3em}}
@@ -0,0 +1,102 @@
1
+ import T from "./MobileLendMenu2.js";
2
+ import { resolveComponent as t, resolveDirective as _, createElementBlock as N, openBlock as r, createVNode as i, withCtx as o, createBlock as s, createCommentVNode as m, withDirectives as d, createTextVNode as g } from "vue";
3
+ import "./MobileLendMenu.css";
4
+ import y from "../../../_virtual/_plugin-vue_export-helper.js";
5
+ const L = { class: "tw-px-0 tw-pt-1.5 tw-pb-2" };
6
+ function C(u, e, a, S, w, x) {
7
+ const l = t("kv-tab"), v = t("categories-panel"), n = t("kv-tab-panel"), f = t("regions-panel"), b = t("my-kiva-panel"), h = t("search-panel"), k = t("kv-tabs"), c = _("kv-track-event");
8
+ return r(), N("div", L, [
9
+ i(k, { ref: "tabsRef" }, {
10
+ tabNav: o(() => [
11
+ d((r(), s(l, {
12
+ "for-panel": "mobile-lend-categories",
13
+ selected: ""
14
+ }, {
15
+ default: o(() => e[2] || (e[2] = [
16
+ g(" Categories ")
17
+ ])),
18
+ _: 1
19
+ })), [
20
+ [c, ["TopNav", "click-Lend-Tab-Categories"]]
21
+ ]),
22
+ d((r(), s(l, { "for-panel": "mobile-lend-regions" }, {
23
+ default: o(() => e[3] || (e[3] = [
24
+ g(" Regions ")
25
+ ])),
26
+ _: 1
27
+ })), [
28
+ [c, ["TopNav", "click-Lend-Tab-Regions"]]
29
+ ]),
30
+ a.userId ? d((r(), s(l, {
31
+ key: 0,
32
+ "for-panel": "mobile-lend-my-kiva"
33
+ }, {
34
+ default: o(() => e[4] || (e[4] = [
35
+ g(" MyKiva ")
36
+ ])),
37
+ _: 1
38
+ })), [
39
+ [c, ["TopNav", "click-Lend-Tab-My-Kiva"]]
40
+ ]) : m("", !0),
41
+ d((r(), s(l, { "for-panel": "mobile-lend-search" }, {
42
+ default: o(() => e[5] || (e[5] = [
43
+ g(" Search ")
44
+ ])),
45
+ _: 1
46
+ })), [
47
+ [c, ["TopNav", "click-Lend-Tab-Search"]]
48
+ ])
49
+ ]),
50
+ tabPanels: o(() => [
51
+ i(n, { id: "mobile-lend-categories" }, {
52
+ default: o(() => [
53
+ i(v, {
54
+ categories: a.categories,
55
+ "is-channels-loading": a.isChannelsLoading
56
+ }, null, 8, ["categories", "is-channels-loading"])
57
+ ]),
58
+ _: 1
59
+ }),
60
+ i(n, { id: "mobile-lend-regions" }, {
61
+ default: o(() => [
62
+ i(f, {
63
+ regions: a.regions,
64
+ "is-regions-loading": a.isRegionsLoading
65
+ }, null, 8, ["regions", "is-regions-loading"])
66
+ ]),
67
+ _: 1
68
+ }),
69
+ a.userId ? (r(), s(n, {
70
+ key: 0,
71
+ id: "mobile-lend-my-kiva"
72
+ }, {
73
+ default: o(() => [
74
+ i(b, {
75
+ "user-id": a.userId,
76
+ favorites: a.favorites,
77
+ searches: a.searches,
78
+ "countries-not-lent-to-url": a.countriesNotLentToUrl
79
+ }, null, 8, ["user-id", "favorites", "searches", "countries-not-lent-to-url"])
80
+ ]),
81
+ _: 1
82
+ })) : m("", !0),
83
+ i(n, { id: "mobile-lend-search" }, {
84
+ default: o(() => [
85
+ i(h, {
86
+ "search-suggestions": a.searchSuggestions,
87
+ "app-origin": a.appOrigin,
88
+ onLoadSearchData: e[0] || (e[0] = (p) => u.$emit("load-search-data")),
89
+ onSearchSubmit: e[1] || (e[1] = (p) => u.$emit("search-submit", p))
90
+ }, null, 8, ["search-suggestions", "app-origin"])
91
+ ]),
92
+ _: 1
93
+ })
94
+ ]),
95
+ _: 1
96
+ }, 512)
97
+ ]);
98
+ }
99
+ const V = /* @__PURE__ */ y(T, [["render", C], ["__scopeId", "data-v-972cda69"]]);
100
+ export {
101
+ V as default
102
+ };
@@ -0,0 +1,74 @@
1
+ import { ref as n } from "vue";
2
+ import l from "../../KvTab.js";
3
+ import s from "../../KvTabPanel.js";
4
+ import i from "../../KvTabs.js";
5
+ import u from "./CategoriesPanel.js";
6
+ import p from "./RegionsPanel.js";
7
+ import f from "./MyKivaPanel.js";
8
+ import m from "./SearchPanel.js";
9
+ const P = {
10
+ name: "MobileLendMenu",
11
+ components: {
12
+ KvTab: l,
13
+ KvTabPanel: s,
14
+ KvTabs: i,
15
+ CategoriesPanel: u,
16
+ RegionsPanel: p,
17
+ MyKivaPanel: f,
18
+ SearchPanel: m
19
+ },
20
+ props: {
21
+ categories: {
22
+ type: Array,
23
+ default: () => []
24
+ },
25
+ regions: {
26
+ type: Array,
27
+ default: () => []
28
+ },
29
+ userId: {
30
+ type: Number,
31
+ default: null
32
+ },
33
+ favorites: {
34
+ type: Number,
35
+ default: 0
36
+ },
37
+ searches: {
38
+ type: Array,
39
+ default: () => []
40
+ },
41
+ isChannelsLoading: {
42
+ type: Boolean,
43
+ default: !1
44
+ },
45
+ isRegionsLoading: {
46
+ type: Boolean,
47
+ default: !1
48
+ },
49
+ countriesNotLentToUrl: {
50
+ type: String,
51
+ default: "/lend/countries-not-lent"
52
+ },
53
+ searchSuggestions: {
54
+ type: Array,
55
+ default: () => []
56
+ },
57
+ appOrigin: {
58
+ type: String,
59
+ default: ""
60
+ }
61
+ },
62
+ emits: ["load-search-data", "search-submit"],
63
+ setup() {
64
+ const t = n(null);
65
+ function r() {
66
+ var a, e, o;
67
+ (o = (e = (a = t.value) == null ? void 0 : a.tabContext) == null ? void 0 : e.setTab) == null || o.call(e, 0);
68
+ }
69
+ return { tabsRef: t, onClose: r };
70
+ }
71
+ };
72
+ export {
73
+ P as default
74
+ };
@@ -0,0 +1 @@
1
+ .lend-link[data-v-3e8e871e]{display:block;width:100%;padding-top:.5rem;padding-bottom:.5rem;--tw-text-opacity: 1;color:rgba(var(--text-primary),var(--tw-text-opacity, 1));text-decoration-line:none}.lend-link[data-v-3e8e871e]:hover{--tw-text-opacity: 1;color:rgba(var(--text-action),var(--tw-text-opacity, 1));text-decoration-line:underline}
@@ -0,0 +1,51 @@
1
+ import p from "./MyKivaPanel2.js";
2
+ import { resolveComponent as o, resolveDirective as k, createElementBlock as t, openBlock as r, createElementVNode as s, withDirectives as n, createTextVNode as c, createVNode as i, withCtx as d } from "vue";
3
+ import "./MyKivaPanel.css";
4
+ import u from "../../../_virtual/_plugin-vue_export-helper.js";
5
+ const f = { class: "tw-font-medium" }, w = ["href"], y = {
6
+ key: 1,
7
+ class: "tw-block tw-py-1 tw-text-tertiary"
8
+ }, N = { key: 0 }, x = { key: 1 }, S = ["href"];
9
+ function C(L, e, a, v, T, _) {
10
+ const m = o("kv-lend-menu-search-list"), h = o("kv-accordion-item"), l = k("kv-track-event");
11
+ return r(), t("ul", f, [
12
+ s("li", null, [
13
+ a.favorites > 0 ? n((r(), t("a", {
14
+ key: 0,
15
+ href: `/lend?lenderFavorite=${a.userId}`,
16
+ class: "lend-link"
17
+ }, e[0] || (e[0] = [
18
+ c(" Saved loans ")
19
+ ]), 8, w)), [
20
+ [l, ["TopNav", "click-Lend-Favorites"]]
21
+ ]) : (r(), t("span", y, "Saved loans"))
22
+ ]),
23
+ v.hasSearches ? (r(), t("li", N, [
24
+ i(h, { id: "mobile-lend-menu-saved-searches-panel" }, {
25
+ header: d(() => e[1] || (e[1] = [
26
+ s("p", { class: "tw-font-medium" }, " Saved searches ", -1)
27
+ ])),
28
+ default: d(() => [
29
+ i(m, { searches: a.searches }, null, 8, ["searches"])
30
+ ]),
31
+ _: 1
32
+ })
33
+ ])) : (r(), t("li", x, e[2] || (e[2] = [
34
+ s("span", { class: "tw-block tw-py-1 tw-text-tertiary" }, "Saved searches", -1)
35
+ ]))),
36
+ s("li", null, [
37
+ n((r(), t("a", {
38
+ href: a.countriesNotLentToUrl,
39
+ class: "lend-link"
40
+ }, e[3] || (e[3] = [
41
+ c(" Countries I haven't lent to ")
42
+ ]), 8, S)), [
43
+ [l, ["TopNav", "click-Lend-Countries_Not_Lent"]]
44
+ ])
45
+ ])
46
+ ]);
47
+ }
48
+ const B = /* @__PURE__ */ u(p, [["render", C], ["__scopeId", "data-v-3e8e871e"]]);
49
+ export {
50
+ B as default
51
+ };
@@ -0,0 +1,31 @@
1
+ import { computed as t } from "vue";
2
+ import r from "../../KvAccordionItem.js";
3
+ import o from "../../KvWwwHeader/LendMenu/KvLendMenuSearchList.js";
4
+ const u = {
5
+ name: "MyKivaPanel",
6
+ components: { KvAccordionItem: r, KvLendMenuSearchList: o },
7
+ props: {
8
+ userId: {
9
+ type: Number,
10
+ default: null
11
+ },
12
+ favorites: {
13
+ type: Number,
14
+ default: 0
15
+ },
16
+ searches: {
17
+ type: Array,
18
+ default: () => []
19
+ },
20
+ countriesNotLentToUrl: {
21
+ type: String,
22
+ default: "/lend/countries-not-lent"
23
+ }
24
+ },
25
+ setup(e) {
26
+ return { hasSearches: t(() => e.searches.length > 0) };
27
+ }
28
+ };
29
+ export {
30
+ u as default
31
+ };
@@ -0,0 +1,38 @@
1
+ import k from "./RegionsPanel2.js";
2
+ import { resolveComponent as r, resolveDirective as v, createElementBlock as n, openBlock as t, Fragment as c, renderList as d, createVNode as o, withCtx as i, withDirectives as h, createBlock as g, createElementVNode as y, toDisplayString as f } from "vue";
3
+ import w from "../../../_virtual/_plugin-vue_export-helper.js";
4
+ const x = { class: "tw-text-upper" };
5
+ function B(C, D, a, s, L, b) {
6
+ const m = r("kv-loading-placeholder"), l = r("kv-accordion-item"), p = r("kv-lend-menu-country-list"), u = v("kv-track-event");
7
+ return t(), n("div", null, [
8
+ a.isRegionsLoading ? (t(), n(c, { key: 0 }, d(8, (e) => o(l, {
9
+ id: `regions-panel-placeholder-${e}`,
10
+ key: e,
11
+ disabled: !0
12
+ }, {
13
+ header: i(() => [
14
+ o(m, { style: { height: "1rem", width: "8rem" } })
15
+ ]),
16
+ _: 2
17
+ }, 1032, ["id"])), 64)) : (t(!0), n(c, { key: 1 }, d(a.regions, (e) => h((t(), g(l, {
18
+ id: `mobile-lend-menu-${s.paramCase(e.name)}-panel`,
19
+ key: e.name
20
+ }, {
21
+ header: i(() => [
22
+ y("h3", x, f(e.name), 1)
23
+ ]),
24
+ default: i(() => [
25
+ o(p, {
26
+ countries: e.countries
27
+ }, null, 8, ["countries"])
28
+ ]),
29
+ _: 2
30
+ }, 1032, ["id"])), [
31
+ [u, ["TopNav", "click-Lend-Region", e.name]]
32
+ ])), 128))
33
+ ]);
34
+ }
35
+ const E = /* @__PURE__ */ w(k, [["render", B]]);
36
+ export {
37
+ E as default
38
+ };
@@ -0,0 +1,24 @@
1
+ import o from "../../KvAccordionItem.js";
2
+ import e from "../../KvLoadingPlaceholder.js";
3
+ import r from "../../KvWwwHeader/LendMenu/KvLendMenuCountryList.js";
4
+ import t from "../../../utils/paramCase.js";
5
+ const m = {
6
+ name: "RegionsPanel",
7
+ components: { KvAccordionItem: o, KvLoadingPlaceholder: e, KvLendMenuCountryList: r },
8
+ props: {
9
+ regions: {
10
+ type: Array,
11
+ default: () => []
12
+ },
13
+ isRegionsLoading: {
14
+ type: Boolean,
15
+ default: !1
16
+ }
17
+ },
18
+ setup() {
19
+ return { paramCase: t };
20
+ }
21
+ };
22
+ export {
23
+ m as default
24
+ };