@kiva/kv-components 8.17.0 → 8.18.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.
@@ -1,15 +1,26 @@
1
- import { ref as a, computed as r, watch as P, nextTick as T, onMounted as D, onBeforeUnmount as K } from "vue";
2
- import O from "../KvThemeProvider.js";
3
- import _ from "../KvPageContainer.js";
4
- import { useBreakpoints as $ } from "../../utils/useBreakpoints.js";
5
- import { useHeaderBasicMenuState as E } from "../../utils/useHeaderBasicMenuState.js";
6
- import R from "./LinkBar.js";
7
- const w = "4rem", F = {
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: O,
11
- KvPageContainer: _,
12
- LinkBar: R
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(W, { emit: b }) {
34
- const { isMobile: y, checkIsMobile: g } = $(), {
35
- menuOpen: M,
36
- menuComponent: h,
37
- menuItem: B,
38
- menuPosition: m,
39
- setMenu: i,
40
- markMounted: k,
41
- pinMenuOpen: I
42
- } = E(), u = a(null), p = a(null), l = a(null), c = a(w), s = a(null), H = a(!0);
43
- let n = null;
44
- const d = r(() => {
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 = u.value) == null ? void 0 : t.$options) == null ? void 0 : e.name) === "MobileMenu";
47
- }), v = r(() => {
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 = u.value) == null ? void 0 : t.$options) == null ? void 0 : e.name) === "MyKivaMenu";
50
- }), S = r(() => {
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 = u.value) == null ? void 0 : t.$options) == null ? void 0 : e.name) === "AboutMenu";
53
- }), A = r(() => d.value ? "tw-w-full tw-min-h-dvh tw-rounded-none" : v.value ? "tw-w-auto tw-rounded-b tw-border tw-border-t-0 tw-border-tertiary" : S.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");
54
- function C(t, e, o, f = null) {
55
- s.value = f, i(t, e, o);
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
- P(v, async (t) => {
58
- if (!t || s.value == null) return;
59
- await T();
60
- const e = p.value;
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 o = e.offsetWidth, f = s.value, N = Math.max(0, window.innerWidth - (f + o / 2));
63
- m.value = { right: `${N}px`, position: "absolute" };
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 L() {
66
- b("load-lend-menu-data");
82
+ function E() {
83
+ M("load-lend-menu-data");
67
84
  }
68
- function U(t) {
69
- var e, o;
70
- (o = (e = u.value) == null ? void 0 : e.onLoad) == null || o.call(e, t);
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
- d.value || i();
102
+ g.value || f();
74
103
  }
75
- return D(() => {
76
- g(), k(), l.value && typeof ResizeObserver < "u" && (n = new ResizeObserver(() => {
77
- l.value && (c.value = `${l.value.offsetHeight}px`);
78
- }), n.observe(l.value));
79
- }), K(() => {
80
- n == null || n.disconnect(), n = null;
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: w,
83
- navHeight: c,
84
- navRef: l,
85
- linksVisible: H,
86
- isMobile: y,
87
- menuOpen: M,
88
- menuComponent: h,
89
- menuItem: B,
90
- menuPosition: m,
91
- isMobileMenuActive: d,
92
- menuPanelClass: A,
93
- menuComponentInstance: u,
94
- menuPanelRef: p,
95
- pinMenuOpen: I,
96
- setMenu: i,
97
- onItemHover: C,
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: L,
100
- loadMenuData: U
130
+ emitLendMenuEvent: E,
131
+ loadMenuData: T,
132
+ loadSearchSuggestions: _
101
133
  };
102
134
  }
103
135
  };
104
136
  export {
105
- F as default
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-8dbf5f0b] a{padding-top:.5rem;padding-bottom:.5rem}
1
+ [data-v-7b004666] a{padding-top:.5rem;padding-bottom:.5rem}
@@ -1,90 +1,132 @@
1
- import m from "./MyKivaMenu2.js";
2
- import { resolveComponent as a, openBlock as k, createElementBlock as u, createVNode as l, withCtx as i, createTextVNode as n, createBlock as d, createCommentVNode as s } from "vue";
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 C from "../../_virtual/_plugin-vue_export-helper.js";
5
- const w = { class: "tw-flex tw-flex-col tw-items-start tw-font-medium tw-mt-0.5 tw-pb-1 tw-px-2" };
6
- function b(v, o, f, t, y, P) {
7
- const r = a("kv-header-menu-link");
8
- return k(), u("nav", w, [
9
- l(r, {
10
- href: f.myDashboardUrl,
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] = (e) => t.onLinkClick("click-Dashboard"))
12
+ onClick: o[0] || (o[0] = (l) => t.onLinkClick("click-Dashboard"))
13
13
  }, {
14
- default: i(() => o[8] || (o[8] = [
15
- n(" My Dashboard ")
14
+ default: e(() => o[12] || (o[12] = [
15
+ i(" My Dashboard ")
16
16
  ])),
17
17
  _: 1
18
18
  }, 8, ["href"]),
19
- l(r, {
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[1] || (o[1] = (e) => t.onLinkClick("click-Portfolio-Portfolio"))
83
+ onClick: o[7] || (o[7] = (l) => t.onLinkClick("click-Portfolio-Portfolio"))
22
84
  }, {
23
- default: i(() => o[9] || (o[9] = [
24
- n(" Portfolio ")
85
+ default: e(() => o[19] || (o[19] = [
86
+ i(" Portfolio ")
25
87
  ])),
26
88
  _: 1
27
89
  }),
28
- l(r, {
90
+ r(n, {
29
91
  href: "/teams/my-teams",
30
- onClick: o[2] || (o[2] = (e) => t.onLinkClick("click-Portfolio-My teams"))
92
+ onClick: o[8] || (o[8] = (l) => t.onLinkClick("click-Portfolio-My teams"))
31
93
  }, {
32
- default: i(() => o[10] || (o[10] = [
33
- n(" My Teams ")
94
+ default: e(() => o[20] || (o[20] = [
95
+ i(" My Teams ")
34
96
  ])),
35
97
  _: 1
36
98
  }),
37
- l(r, {
99
+ r(n, {
38
100
  href: "/portfolio/donations",
39
- onClick: o[3] || (o[3] = (e) => t.onLinkClick("click-Portfolio-Donations"))
101
+ onClick: o[9] || (o[9] = (l) => t.onLinkClick("click-Portfolio-Donations"))
40
102
  }, {
41
- default: i(() => o[11] || (o[11] = [
42
- n(" Donations ")
103
+ default: e(() => o[21] || (o[21] = [
104
+ i(" Donations ")
43
105
  ])),
44
106
  _: 1
45
107
  }),
46
- l(r, {
108
+ r(n, {
47
109
  href: "/settings",
48
- onClick: o[4] || (o[4] = (e) => t.onLinkClick("click-Portfolio-Settings"))
110
+ onClick: o[10] || (o[10] = (l) => t.onLinkClick("click-Portfolio-Settings"))
49
111
  }, {
50
- default: i(() => o[12] || (o[12] = [
51
- n(" Settings ")
112
+ default: e(() => o[22] || (o[22] = [
113
+ i(" Settings ")
52
114
  ])),
53
115
  _: 1
54
116
  }),
55
- f.isBorrower ? (k(), d(r, {
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[7] || (o[7] = (e) => t.onLinkClick("click-Portfolio-Sign out"))
120
+ onClick: o[11] || (o[11] = (l) => t.onLinkClick("click-Portfolio-Sign out"))
79
121
  }, {
80
- default: i(() => o[15] || (o[15] = [
81
- n(" Sign out ")
122
+ default: e(() => o[23] || (o[23] = [
123
+ i(" Sign out ")
82
124
  ])),
83
125
  _: 1
84
126
  })
85
127
  ]);
86
128
  }
87
- const g = /* @__PURE__ */ C(m, [["render", b], ["__scopeId", "data-v-8dbf5f0b"]]);
129
+ const x = /* @__PURE__ */ y(u, [["render", w], ["__scopeId", "data-v-7b004666"]]);
88
130
  export {
89
- g as default
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 a } from "vue";
2
- import l from "../KvWwwHeader/KvHeaderMenuLink.js";
3
- const u = {
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: l },
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(r, { emit: e }) {
35
- const o = a("$kvTrackEvent", () => {
36
- });
37
- function n(t) {
38
- o("TopNav", t), e("closing-menu");
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: n };
50
+ return { trusteeLoansUrl: o, onLinkClick: a };
41
51
  }
42
52
  };
43
53
  export {
44
- u as default
54
+ f as default
45
55
  };
@@ -1,4 +1,4 @@
1
- import { inject as x, ref as m, toRef as B, computed as s } from "vue";
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 = x("$kvTrackEvent", () => {
26
- }), p = "kv-www-header-basic-search", n = m(!1), v = m(!1), {
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: d
31
- } = _(B(r, "searchSuggestions"), r.appOrigin), o = s(() => l.value.flatMap((e) => e.items)), u = s(() => a.value > -1 ? o.value[a.value] : void 0), g = s(() => {
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
- }), b = s(() => l.value.length > 0 && n.value);
35
- function y(e) {
34
+ }), y = s(() => l.value.length > 0 && n.value);
35
+ function S(e) {
36
36
  t.value = e;
37
37
  }
38
- function S() {
38
+ function k() {
39
39
  n.value = !0, v.value || (i("load-search-data"), v.value = !0), f("search", "focus");
40
40
  }
41
- function k() {
41
+ function w() {
42
42
  n.value = !1, a.value = -1;
43
43
  }
44
44
  function c(e) {
45
- const h = d(e);
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 w(e) {
48
+ function I(e) {
49
49
  c(e);
50
50
  }
51
- function I() {
51
+ function R() {
52
52
  u.value ? c(u.value) : c(t.value);
53
53
  }
54
- function R() {
54
+ function T() {
55
55
  a.value += 1, a.value >= o.value.length && (a.value = -1);
56
56
  }
57
- function T() {
57
+ function M() {
58
58
  a.value === -1 && (a.value = o.value.length), a.value -= 1;
59
59
  }
60
- function M(e) {
60
+ function x(e) {
61
61
  return O(e.label, e.matches);
62
62
  }
63
63
  return {
64
64
  mdiMagnify: E,
65
- inputId: p,
65
+ inputId: d,
66
66
  term: t,
67
- displayTerm: g,
67
+ displayTerm: b,
68
68
  groupedResults: l,
69
69
  highlighted: u,
70
- showResults: b,
71
- onInput: y,
72
- onFocus: S,
73
- onBlur: k,
74
- onSubmit: I,
75
- runSearch: w,
76
- listUp: T,
77
- listDown: R,
78
- formatResult: M
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
  };
@@ -27,6 +27,7 @@ export { default as KvExpandableQuestion } from './KvExpandableQuestion.vue';
27
27
  export { default as KvFlag } from './KvFlag.vue';
28
28
  export { default as KvGrid } from './KvGrid.vue';
29
29
  export { default as KvIconButton } from './KvIconButton.vue';
30
+ export { default as KvImageUpload } from './KvImageUpload.vue';
30
31
  export { default as KvImpactDashboardHeader } from './KvImpactDashboardHeader.vue';
31
32
  export { default as KvImpactVerticalSelector } from './KvImpactVerticalSelector.vue';
32
33
  export { default as KvInlineActivityCard } from './KvInlineActivityCard.vue';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kiva/kv-components",
3
- "version": "8.17.0",
3
+ "version": "8.18.0",
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": "c00bb6f8ab55a188247b085df65b8b7bbe79c3e4"
131
+ "gitHead": "34c0c8109e5d079a5d08fedda139c2ecee8fdc8e"
132
132
  }