@kiva/kv-shop 3.7.86 → 3.7.88

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.
@@ -26,6 +26,7 @@ import "@vuepic/vue-datepicker/dist/main.css";
26
26
  /* empty css */
27
27
  import "change-case";
28
28
  /* empty css */
29
+ /* empty css */
29
30
  /* empty css */
30
31
  /* empty css */
31
32
  import "../kv-components/dist/vue/KvIntroductionLoanCard2.js";
@@ -62,8 +63,7 @@ import "../kv-components/dist/vue/KvWideLoanCard2.js";
62
63
  import "../kv-components/dist/vue/KvWwwHeader/KvHeaderLinkBar2.js";
63
64
  /* empty css */
64
65
  /* empty css */
65
- import "../kv-components/dist/vue/KvWwwHeaderBasic/LinkBar2.js";
66
- /* empty css */
66
+ import "../kv-components/dist/vue/KvWwwHeaderBasic/KvWwwHeaderBasic2.js";
67
67
  /* empty css */
68
68
  import "../kv-components/dist/utils/loanCard.js";
69
69
  import T, { defaultPaymentTypes as I } from "../useBraintreeDropIn.js";
@@ -1,64 +1,65 @@
1
- import { ref as o, watch as f, computed as v } from "vue";
2
- import h from "./typeaheadSearchEngine.js";
3
- import { GIFT_SUGGESTIONS as O, MAX_PER_GROUP as R, SECTION_ORDER as g } from "./typeaheadSearchConfig.js";
4
- const S = ["activity", "city_state", "loanTags", "state", "loanLimit"];
5
- function w(u) {
6
- return Object.keys(u).some((n) => S.includes(n));
1
+ import { ref as i, watch as m, computed as h, unref as O } from "vue";
2
+ import S from "./typeaheadSearchEngine.js";
3
+ import { GIFT_SUGGESTIONS as R, MAX_PER_GROUP as T, SECTION_ORDER as g } from "./typeaheadSearchConfig.js";
4
+ const _ = ["activity", "city_state", "loanTags", "state", "loanLimit"];
5
+ function q(n) {
6
+ return Object.keys(n).some((o) => _.includes(o));
7
7
  }
8
- function p(u) {
9
- return u && w(u) ? "/lend" : "/lend/filter";
8
+ function p(n) {
9
+ return n && q(n) ? "/lend" : "/lend/filter";
10
10
  }
11
- function T(u, n) {
12
- const a = new h(), s = o(""), i = o([]), l = o(-1);
13
- f(u, (e) => {
14
- a.reset([...e ?? [], ...O]);
15
- }, { immediate: !0 }), f(s, async (e) => {
16
- if (l.value = -1, !e) {
17
- i.value = [];
11
+ function $(n, o) {
12
+ const a = new S(), u = i(""), s = i([]), l = i(-1);
13
+ m(n, (t) => {
14
+ a.reset([...t ?? [], ...R]);
15
+ }, { immediate: !0 }), m(u, async (t) => {
16
+ if (l.value = -1, !t) {
17
+ s.value = [];
18
18
  return;
19
19
  }
20
- i.value = await a.search(e);
20
+ s.value = await a.search(t);
21
21
  });
22
- const y = v(() => {
23
- const e = /* @__PURE__ */ new Map();
24
- return i.value.forEach((t) => {
25
- const r = e.get(t.group) ?? [];
26
- r.length < R && 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) ?? [] }));
22
+ const y = h(() => {
23
+ const t = /* @__PURE__ */ new Map();
24
+ return s.value.forEach((e) => {
25
+ const r = t.get(e.group) ?? [];
26
+ r.length < T && r.push(e), t.set(e.group, r);
27
+ }), [...t.keys()].sort((e, r) => g.indexOf(e) - g.indexOf(r)).map((e) => ({ group: e, items: t.get(e) ?? [] }));
28
28
  });
29
- function d(e) {
30
- if (typeof e == "string") {
31
- const m = { queryString: e };
29
+ function d(t) {
30
+ const e = O(o);
31
+ if (typeof t == "string") {
32
+ const f = { queryString: t };
32
33
  return {
33
- url: `${n}${p(m)}`,
34
- query: m,
34
+ url: `${e}${p(f)}`,
35
+ query: f,
35
36
  suggestion: null,
36
- term: e
37
+ term: t
37
38
  };
38
39
  }
39
- if (e.url)
40
+ if (t.url)
40
41
  return {
41
- url: e.url,
42
+ url: t.url,
42
43
  query: null,
43
- suggestion: e,
44
- term: s.value
44
+ suggestion: t,
45
+ term: u.value
45
46
  };
46
- const [t, r] = (e.query ?? "").split("="), c = t ? { [t]: r } : null;
47
+ const [r, v] = (t.query ?? "").split("="), c = r ? { [r]: v } : null;
47
48
  return {
48
- url: `${n}${p(c)}`,
49
+ url: `${e}${p(c)}`,
49
50
  query: c,
50
- suggestion: e,
51
- term: s.value
51
+ suggestion: t,
52
+ term: u.value
52
53
  };
53
54
  }
54
55
  return {
55
- term: s,
56
- rawResults: i,
56
+ term: u,
57
+ rawResults: s,
57
58
  activeIndex: l,
58
59
  groupedResults: y,
59
60
  resolveSubmit: d
60
61
  };
61
62
  }
62
63
  export {
63
- T as useTypeaheadSearch
64
+ $ as useTypeaheadSearch
64
65
  };
@@ -0,0 +1 @@
1
+ .image-upload-icon[data-v-ea802cf6]{background-color:#ffffffbf;border-radius:9px;display:flex;align-items:center;justify-content:center;border-radius:.5rem}.image-upload-icon--circle[data-v-ea802cf6]{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1));--tw-shadow: 0 1px 4px 0 rgb(0 0 0 / .08);--tw-shadow-colored: 0 1px 4px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}
@@ -1 +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)}
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)}
@@ -0,0 +1,17 @@
1
+ import "vue";
2
+ import { gql as o } from "@apollo/client/core";
3
+ /* empty css */
4
+ import "@kiva/kv-tokens";
5
+ import "./LinkBar2.js";
6
+ /* empty css */
7
+ o`
8
+ query loanSearchSuggestions {
9
+ lend {
10
+ loanSearchSuggestions {
11
+ group
12
+ label
13
+ query
14
+ }
15
+ }
16
+ }
17
+ `;
@@ -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 f from "./MyKivaMenu2.js";
2
- import { resolveComponent as d, createElementBlock as m, openBlock as a, createVNode as n, createBlock as s, createCommentVNode as k, withCtx as r, createTextVNode as i } from "vue";
1
+ import d from "./MyKivaMenu2.js";
2
+ import { resolveComponent as u, createElementBlock as a, openBlock as s, createVNode as o, createCommentVNode as f, withCtx as t, createTextVNode as i, Fragment as k } from "vue";
3
3
  import "./MyKivaMenu.css";
4
- import u from "../../_virtual/_plugin-vue_export-helper.js";
5
- const h = { class: "tw-flex tw-flex-col tw-items-start tw-font-medium tw-mt-0.5 tw-pb-1 tw-px-2" };
6
- function C(w, e, c, t, b, y) {
7
- const o = d("kv-header-menu-link");
8
- return a(), m("nav", h, [
9
- n(o, {
4
+ import m from "../../_virtual/_plugin-vue_export-helper.js";
5
+ const C = { class: "tw-flex tw-flex-col tw-items-start tw-font-medium tw-mt-0.5 tw-pb-1 tw-px-2" };
6
+ function h(y, e, c, l, w, p) {
7
+ const r = u("kv-header-menu-link");
8
+ return s(), a("nav", C, [
9
+ o(r, {
10
10
  href: c.myDashboardUrl,
11
11
  class: "md:tw-hidden",
12
- onClick: e[0] || (e[0] = (l) => t.onLinkClick("click-Dashboard"))
12
+ onClick: e[0] || (e[0] = (n) => l.onLinkClick("click-Dashboard"))
13
13
  }, {
14
- default: r(() => e[8] || (e[8] = [
14
+ default: t(() => e[12] || (e[12] = [
15
15
  i(" My Dashboard ")
16
16
  ])),
17
17
  _: 1
18
18
  }, 8, ["href"]),
19
- n(o, {
19
+ c.isBorrower ? (s(), a(k, { key: 0 }, [
20
+ o(r, {
21
+ href: "/my/borrower",
22
+ onClick: e[1] || (e[1] = (n) => l.onLinkClick("click-Portfolio-My borrower dashboard"))
23
+ }, {
24
+ default: t(() => e[13] || (e[13] = [
25
+ i(" My borrower dashboard ")
26
+ ])),
27
+ _: 1
28
+ }),
29
+ c.mostRecentBorrowedLoanId !== null ? (s(), a(k, { key: 0 }, [
30
+ o(r, {
31
+ href: `/lend/${c.mostRecentBorrowedLoanId}`,
32
+ onClick: e[2] || (e[2] = (n) => l.onLinkClick("click-Portfolio-My loan page"))
33
+ }, {
34
+ default: t(() => e[14] || (e[14] = [
35
+ i(" My loan page ")
36
+ ])),
37
+ _: 1
38
+ }, 8, ["href"]),
39
+ o(r, {
40
+ href: `/lend-classic/${c.mostRecentBorrowedLoanId}#loanComments`,
41
+ onClick: e[3] || (e[3] = (n) => l.onLinkClick("click-Portfolio-My Conversations"))
42
+ }, {
43
+ default: t(() => e[15] || (e[15] = [
44
+ i(" My conversations ")
45
+ ])),
46
+ _: 1
47
+ }, 8, ["href"])
48
+ ], 64)) : f("", !0)
49
+ ], 64)) : f("", !0),
50
+ c.isTrustee ? (s(), a(k, { key: 1 }, [
51
+ c.isBorrower ? f("", !0) : (s(), a(k, { key: 0 }, [
52
+ o(r, {
53
+ href: l.trusteeLoansUrl,
54
+ onClick: e[4] || (e[4] = (n) => l.onLinkClick("click-Portfolio-My Trustee loans"))
55
+ }, {
56
+ default: t(() => e[16] || (e[16] = [
57
+ i(" My Trustee loans ")
58
+ ])),
59
+ _: 1
60
+ }, 8, ["href"]),
61
+ o(r, {
62
+ href: `/trustees/${c.trusteeId}`,
63
+ onClick: e[5] || (e[5] = (n) => l.onLinkClick("click-Portfolio-My public Trustee page"))
64
+ }, {
65
+ default: t(() => e[17] || (e[17] = [
66
+ i(" My public Trustee page ")
67
+ ])),
68
+ _: 1
69
+ }, 8, ["href"])
70
+ ], 64)),
71
+ o(r, {
72
+ href: "/my/trustee",
73
+ onClick: e[6] || (e[6] = (n) => l.onLinkClick("click-Portfolio-My Trustee dashboard"))
74
+ }, {
75
+ default: t(() => e[18] || (e[18] = [
76
+ i(" My Trustee dashboard ")
77
+ ])),
78
+ _: 1
79
+ })
80
+ ], 64)) : f("", !0),
81
+ o(r, {
20
82
  href: "/portfolio",
21
- onClick: e[1] || (e[1] = (l) => t.onLinkClick("click-Portfolio-Portfolio"))
83
+ onClick: e[7] || (e[7] = (n) => l.onLinkClick("click-Portfolio-Portfolio"))
22
84
  }, {
23
- default: r(() => e[9] || (e[9] = [
85
+ default: t(() => e[19] || (e[19] = [
24
86
  i(" Portfolio ")
25
87
  ])),
26
88
  _: 1
27
89
  }),
28
- n(o, {
90
+ o(r, {
29
91
  href: "/teams/my-teams",
30
- onClick: e[2] || (e[2] = (l) => t.onLinkClick("click-Portfolio-My teams"))
92
+ onClick: e[8] || (e[8] = (n) => l.onLinkClick("click-Portfolio-My teams"))
31
93
  }, {
32
- default: r(() => e[10] || (e[10] = [
94
+ default: t(() => e[20] || (e[20] = [
33
95
  i(" My Teams ")
34
96
  ])),
35
97
  _: 1
36
98
  }),
37
- n(o, {
99
+ o(r, {
38
100
  href: "/portfolio/donations",
39
- onClick: e[3] || (e[3] = (l) => t.onLinkClick("click-Portfolio-Donations"))
101
+ onClick: e[9] || (e[9] = (n) => l.onLinkClick("click-Portfolio-Donations"))
40
102
  }, {
41
- default: r(() => e[11] || (e[11] = [
103
+ default: t(() => e[21] || (e[21] = [
42
104
  i(" Donations ")
43
105
  ])),
44
106
  _: 1
45
107
  }),
46
- n(o, {
108
+ o(r, {
47
109
  href: "/settings",
48
- onClick: e[4] || (e[4] = (l) => t.onLinkClick("click-Portfolio-Settings"))
110
+ onClick: e[10] || (e[10] = (n) => l.onLinkClick("click-Portfolio-Settings"))
49
111
  }, {
50
- default: r(() => e[12] || (e[12] = [
112
+ default: t(() => e[22] || (e[22] = [
51
113
  i(" Settings ")
52
114
  ])),
53
115
  _: 1
54
116
  }),
55
- c.isBorrower ? (a(), s(o, {
56
- key: 0,
57
- href: "/my/borrower",
58
- onClick: e[5] || (e[5] = (l) => t.onLinkClick("click-Portfolio-My borrower dashboard"))
59
- }, {
60
- default: r(() => e[13] || (e[13] = [
61
- i(" Borrower Dashboard ")
62
- ])),
63
- _: 1
64
- })) : k("", !0),
65
- c.isTrustee ? (a(), s(o, {
66
- key: 1,
67
- href: "/my/trustee",
68
- onClick: e[6] || (e[6] = (l) => t.onLinkClick("click-Portfolio-My Trustee dashboard"))
69
- }, {
70
- default: r(() => e[14] || (e[14] = [
71
- i(" Trustee Dashboard ")
72
- ])),
73
- _: 1
74
- })) : k("", !0),
75
- n(o, {
117
+ o(r, {
76
118
  href: "/ui-logout",
77
119
  class: "tw-border-t tw-border-secondary tw-w-full",
78
- onClick: e[7] || (e[7] = (l) => t.onLinkClick("click-Portfolio-Sign out"))
120
+ onClick: e[11] || (e[11] = (n) => l.onLinkClick("click-Portfolio-Sign out"))
79
121
  }, {
80
- default: r(() => e[15] || (e[15] = [
122
+ default: t(() => e[23] || (e[23] = [
81
123
  i(" Sign out ")
82
124
  ])),
83
125
  _: 1
84
126
  })
85
127
  ]);
86
128
  }
87
- const g = /* @__PURE__ */ u(f, [["render", C], ["__scopeId", "data-v-8dbf5f0b"]]);
129
+ const P = /* @__PURE__ */ m(d, [["render", h], ["__scopeId", "data-v-7b004666"]]);
88
130
  export {
89
- g as default
131
+ P as default
90
132
  };
@@ -1,8 +1,8 @@
1
- import { inject as a } from "vue";
2
- import l from "../KvWwwHeader/KvHeaderMenuLink.js";
3
- const i = {
1
+ import { inject as u, computed as r } from "vue";
2
+ import s from "../KvWwwHeader/KvHeaderMenuLink.js";
3
+ const f = {
4
4
  name: "MyKivaMenu",
5
- components: { KvHeaderMenuLink: l },
5
+ components: { KvHeaderMenuLink: s },
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 i = {
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 i = {
31
39
  }
32
40
  },
33
41
  emits: ["closing-menu"],
34
- setup(r, { emit: e }) {
35
- const o = a("$kvTrackEvent", () => {
36
- });
37
- function t(n) {
38
- o("TopNav", n), e("closing-menu");
42
+ setup(e, { emit: t }) {
43
+ const n = u("$kvTrackEvent", () => {
44
+ }), o = r(
45
+ () => `/lend?trustee=${e.trusteeId}&status=fundraising&sortBy=newest`
46
+ );
47
+ function a(l) {
48
+ n("TopNav", l), t("closing-menu");
39
49
  }
40
- return { onLinkClick: t };
50
+ return { trusteeLoansUrl: o, onLinkClick: a };
41
51
  }
42
52
  };
43
53
  export {
44
- i 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 l } from "vue";
1
+ import { inject as B, ref as m, toRef as h, computed as l } from "vue";
2
2
  import { mdiMagnify as A } from "@mdi/js";
3
3
  import K from "../KvTextInput.js";
4
4
  import O from "../../utils/markMatches.js";
@@ -22,27 +22,27 @@ const q = {
22
22
  },
23
23
  emits: ["load-search-data", "search-submit"],
24
24
  setup(i, { emit: c }) {
25
- const v = x("$kvTrackEvent", () => {
26
- }), h = "kv-www-header-basic-search", n = m(!1), f = m(!1), {
25
+ const v = B("$kvTrackEvent", () => {
26
+ }), d = "kv-www-header-basic-search", n = m(!1), f = m(!1), {
27
27
  term: t,
28
28
  groupedResults: o,
29
29
  activeIndex: a,
30
- resolveSubmit: d
31
- } = j(B(i, "searchSuggestions"), i.appOrigin), r = l(() => o.value.flatMap((e) => e.items)), u = l(() => a.value > -1 ? r.value[a.value] : void 0), g = l(() => {
30
+ resolveSubmit: g
31
+ } = j(h(i, "searchSuggestions"), h(i, "appOrigin")), r = l(() => o.value.flatMap((e) => e.items)), u = l(() => a.value > -1 ? r.value[a.value] : void 0), y = l(() => {
32
32
  var e;
33
33
  return ((e = u.value) == null ? void 0 : e.label) ?? t.value;
34
- }), y = l(() => o.value.length > 0 && n.value);
35
- function b(e) {
34
+ }), b = l(() => o.value.length > 0 && n.value);
35
+ function S(e) {
36
36
  t.value = e;
37
37
  }
38
- function S() {
38
+ function w() {
39
39
  n.value = !0, f.value || (c("load-search-data"), f.value = !0), v("search", "focus");
40
40
  }
41
- function w() {
41
+ function I() {
42
42
  n.value = !1, a.value = -1;
43
43
  }
44
44
  function s(e) {
45
- const p = d(e);
45
+ const p = g(e);
46
46
  v("search", "click", p.suggestion ? "type-ahead-search" : "custom-search-option"), c("search-submit", p);
47
47
  }
48
48
  function R(e) {
@@ -51,31 +51,31 @@ const q = {
51
51
  function k() {
52
52
  u.value ? s(u.value) : s(t.value);
53
53
  }
54
- function I() {
54
+ function M() {
55
55
  a.value += 1, a.value >= r.value.length && (a.value = -1);
56
56
  }
57
- function M() {
57
+ function T() {
58
58
  a.value === -1 && (a.value = r.value.length), a.value -= 1;
59
59
  }
60
- function T(e) {
60
+ function x(e) {
61
61
  return O(e.label, e.matches);
62
62
  }
63
63
  return {
64
64
  mdiMagnify: A,
65
- inputId: h,
65
+ inputId: d,
66
66
  term: t,
67
- displayTerm: g,
67
+ displayTerm: y,
68
68
  groupedResults: o,
69
69
  highlighted: u,
70
- showResults: y,
71
- onInput: b,
72
- onFocus: S,
73
- onBlur: w,
70
+ showResults: b,
71
+ onInput: S,
72
+ onFocus: w,
73
+ onBlur: I,
74
74
  onSubmit: k,
75
75
  runSearch: R,
76
- listUp: M,
77
- listDown: I,
78
- formatResult: T
76
+ listUp: T,
77
+ listDown: M,
78
+ formatResult: x
79
79
  };
80
80
  }
81
81
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kiva/kv-shop",
3
- "version": "3.7.86",
3
+ "version": "3.7.88",
4
4
  "type": "module",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -34,7 +34,7 @@
34
34
  "devDependencies": {
35
35
  "@apollo/client": "^3.13.1",
36
36
  "@kiva/kv-analytics": "^1.3.1",
37
- "@kiva/kv-components": "^8.17.0",
37
+ "@kiva/kv-components": "^8.18.0",
38
38
  "@kiva/vite-plugin-vue-lib-css": "^2.0.0",
39
39
  "@types/braintree-web-drop-in": "^1.39.3",
40
40
  "@types/jest": "^29.5.14",
@@ -63,5 +63,5 @@
63
63
  "numeral": "2.x",
64
64
  "vue": "3.x"
65
65
  },
66
- "gitHead": "c00bb6f8ab55a188247b085df65b8b7bbe79c3e4"
66
+ "gitHead": "34c0c8109e5d079a5d08fedda139c2ecee8fdc8e"
67
67
  }