@kiva/kv-shop 3.7.81 → 3.7.82

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
@@ -0,0 +1,17 @@
1
+ import t from "./SearchPanel2.js";
2
+ import { resolveComponent as i, createBlock as n, openBlock as c } from "vue";
3
+ import m from "../../../_virtual/_plugin-vue_export-helper.js";
4
+ function p(r, o, a, g, u, l) {
5
+ const s = i("search-bar");
6
+ return c(), n(s, {
7
+ "search-suggestions": a.searchSuggestions,
8
+ "app-origin": a.appOrigin,
9
+ "is-mobile": "",
10
+ onLoadSearchData: o[0] || (o[0] = (e) => r.$emit("load-search-data")),
11
+ onSearchSubmit: o[1] || (o[1] = (e) => r.$emit("search-submit", e))
12
+ }, null, 8, ["search-suggestions", "app-origin"]);
13
+ }
14
+ const f = /* @__PURE__ */ m(t, [["render", p]]);
15
+ export {
16
+ f as default
17
+ };
@@ -0,0 +1,19 @@
1
+ import a from "../SearchBar.js";
2
+ const r = {
3
+ name: "SearchPanel",
4
+ components: { SearchBar: a },
5
+ props: {
6
+ searchSuggestions: {
7
+ type: Array,
8
+ default: () => []
9
+ },
10
+ appOrigin: {
11
+ type: String,
12
+ default: ""
13
+ }
14
+ },
15
+ emits: ["load-search-data", "search-submit"]
16
+ };
17
+ export {
18
+ r as default
19
+ };
@@ -0,0 +1 @@
1
+ .mobile-link[data-v-e3e9102f]{--tw-text-opacity: 1;color:rgba(var(--text-primary),var(--tw-text-opacity, 1));text-decoration-line:none}.mobile-link[data-v-e3e9102f]:hover{--tw-text-opacity: 1;color:rgba(var(--text-action),var(--tw-text-opacity, 1));text-decoration-line:underline}#header-basic-mobile-about-container[data-v-e3e9102f] button{padding-top:0;padding-bottom:0}#header-basic-mobile-about-container[data-v-e3e9102f] nav{padding-bottom:0}
@@ -0,0 +1,52 @@
1
+ import s from "./MobileMenu2.js";
2
+ import { resolveComponent as l, createElementBlock as w, openBlock as m, createVNode as i, createElementVNode as t, withCtx as r } from "vue";
3
+ import "./MobileMenu.css";
4
+ import u from "../../_virtual/_plugin-vue_export-helper.js";
5
+ const b = {
6
+ id: "header-basic-mobile-about-container",
7
+ class: "tw-flex tw-flex-col tw-items-stretch tw-font-medium tw-p-2.5 md:tw-hidden"
8
+ }, d = {
9
+ "aria-label": "Mobile menu",
10
+ class: "tw-flex tw-flex-col tw-gap-2 tw-pt-1.5"
11
+ };
12
+ function k(p, e, f, o, C, h) {
13
+ const a = l("about-menu"), c = l("kv-accordion-item");
14
+ return m(), w("div", b, [
15
+ i(c, {
16
+ id: "kv-www-header-basic-about",
17
+ class: "tw-w-full tw-border-b-0"
18
+ }, {
19
+ header: r(() => e[3] || (e[3] = [
20
+ t("span", { class: "tw-text-button tw-pb-0.5" }, " About ", -1)
21
+ ])),
22
+ default: r(() => [
23
+ i(a, {
24
+ "is-mobile": "",
25
+ onClosingMenu: o.onClose
26
+ }, null, 8, ["onClosingMenu"])
27
+ ]),
28
+ _: 1
29
+ }),
30
+ t("nav", d, [
31
+ t("a", {
32
+ href: "/about/partner-with-us",
33
+ class: "mobile-link",
34
+ onClick: e[0] || (e[0] = (n) => o.onLinkClick("click-Partner"))
35
+ }, "Partner"),
36
+ t("a", {
37
+ href: "/donate/supportus",
38
+ class: "mobile-link",
39
+ onClick: e[1] || (e[1] = (n) => o.onLinkClick("click-Support-Kiva"))
40
+ }, "Support Kiva"),
41
+ t("a", {
42
+ href: "/borrow",
43
+ class: "mobile-link",
44
+ onClick: e[2] || (e[2] = (n) => o.onLinkClick("click-Borrow"))
45
+ }, "Borrow")
46
+ ])
47
+ ]);
48
+ }
49
+ const g = /* @__PURE__ */ u(s, [["render", k], ["__scopeId", "data-v-e3e9102f"]]);
50
+ export {
51
+ g as default
52
+ };
@@ -0,0 +1,36 @@
1
+ import { inject as l } from "vue";
2
+ import m from "../KvAccordionItem.js";
3
+ import u from "./AboutMenu.js";
4
+ const p = {
5
+ name: "MobileMenu",
6
+ components: { KvAccordionItem: m, AboutMenu: u },
7
+ props: {
8
+ loggedIn: {
9
+ type: Boolean,
10
+ default: !1
11
+ },
12
+ loginUrl: {
13
+ type: String,
14
+ default: "/ui-login"
15
+ },
16
+ isMobile: {
17
+ type: Boolean,
18
+ default: !1
19
+ }
20
+ },
21
+ emits: ["closing-menu"],
22
+ setup(c, { emit: o }) {
23
+ const e = l("$kvTrackEvent", () => {
24
+ });
25
+ function n() {
26
+ o("closing-menu");
27
+ }
28
+ function t(i) {
29
+ e("TopNav", i), o("closing-menu");
30
+ }
31
+ return { onClose: n, onLinkClick: t };
32
+ }
33
+ };
34
+ export {
35
+ p as default
36
+ };
@@ -0,0 +1 @@
1
+ [data-v-8dbf5f0b] a{padding-top:.5rem;padding-bottom:.5rem}
@@ -0,0 +1,90 @@
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";
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, {
10
+ href: c.myDashboardUrl,
11
+ class: "md:tw-hidden",
12
+ onClick: e[0] || (e[0] = (l) => t.onLinkClick("click-Dashboard"))
13
+ }, {
14
+ default: r(() => e[8] || (e[8] = [
15
+ i(" My Dashboard ")
16
+ ])),
17
+ _: 1
18
+ }, 8, ["href"]),
19
+ n(o, {
20
+ href: "/portfolio",
21
+ onClick: e[1] || (e[1] = (l) => t.onLinkClick("click-Portfolio-Portfolio"))
22
+ }, {
23
+ default: r(() => e[9] || (e[9] = [
24
+ i(" Portfolio ")
25
+ ])),
26
+ _: 1
27
+ }),
28
+ n(o, {
29
+ href: "/teams/my-teams",
30
+ onClick: e[2] || (e[2] = (l) => t.onLinkClick("click-Portfolio-My teams"))
31
+ }, {
32
+ default: r(() => e[10] || (e[10] = [
33
+ i(" My Teams ")
34
+ ])),
35
+ _: 1
36
+ }),
37
+ n(o, {
38
+ href: "/portfolio/donations",
39
+ onClick: e[3] || (e[3] = (l) => t.onLinkClick("click-Portfolio-Donations"))
40
+ }, {
41
+ default: r(() => e[11] || (e[11] = [
42
+ i(" Donations ")
43
+ ])),
44
+ _: 1
45
+ }),
46
+ n(o, {
47
+ href: "/settings",
48
+ onClick: e[4] || (e[4] = (l) => t.onLinkClick("click-Portfolio-Settings"))
49
+ }, {
50
+ default: r(() => e[12] || (e[12] = [
51
+ i(" Settings ")
52
+ ])),
53
+ _: 1
54
+ }),
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, {
76
+ href: "/ui-logout",
77
+ class: "tw-border-t tw-border-secondary tw-w-full",
78
+ onClick: e[7] || (e[7] = (l) => t.onLinkClick("click-Portfolio-Sign out"))
79
+ }, {
80
+ default: r(() => e[15] || (e[15] = [
81
+ i(" Sign out ")
82
+ ])),
83
+ _: 1
84
+ })
85
+ ]);
86
+ }
87
+ const g = /* @__PURE__ */ u(f, [["render", C], ["__scopeId", "data-v-8dbf5f0b"]]);
88
+ export {
89
+ g as default
90
+ };
@@ -0,0 +1,45 @@
1
+ import { inject as a } from "vue";
2
+ import l from "../KvWwwHeader/KvHeaderMenuLink.js";
3
+ const i = {
4
+ name: "MyKivaMenu",
5
+ components: { KvHeaderMenuLink: l },
6
+ props: {
7
+ // Accepts the orchestrator's user props; loggedIn/userId are part of the shared menu contract.
8
+ loggedIn: {
9
+ type: Boolean,
10
+ default: !1
11
+ },
12
+ userId: {
13
+ type: Number,
14
+ default: null
15
+ },
16
+ isBorrower: {
17
+ type: Boolean,
18
+ default: !1
19
+ },
20
+ isTrustee: {
21
+ type: Boolean,
22
+ default: !1
23
+ },
24
+ myDashboardUrl: {
25
+ type: String,
26
+ default: "/mykiva"
27
+ },
28
+ isMobile: {
29
+ type: Boolean,
30
+ default: !1
31
+ }
32
+ },
33
+ 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");
39
+ }
40
+ return { onLinkClick: t };
41
+ }
42
+ };
43
+ export {
44
+ i as default
45
+ };
@@ -0,0 +1,73 @@
1
+ import h from "./SearchBar2.js";
2
+ import { resolveComponent as f, createElementBlock as r, openBlock as n, withModifiers as l, createElementVNode as o, createVNode as v, withDirectives as y, withKeys as u, normalizeClass as d, Fragment as p, renderList as w, toDisplayString as g, vShow as S } from "vue";
3
+ import k from "../../_virtual/_plugin-vue_export-helper.js";
4
+ const M = ["for"], x = ["data-testid"], B = { class: "tw-text-base tw-py-0.5" }, I = ["data-testid", "onClick"], C = ["innerHTML"];
5
+ function F(K, s, c, e, D, L) {
6
+ const m = f("kv-text-input");
7
+ return n(), r("form", {
8
+ class: "tw-relative",
9
+ autocomplete: "off",
10
+ onSubmit: s[1] || (s[1] = l((...t) => e.onSubmit && e.onSubmit(...t), ["prevent"]))
11
+ }, [
12
+ o("label", {
13
+ for: e.inputId,
14
+ class: "tw-sr-only"
15
+ }, "Search all loans", 8, M),
16
+ v(m, {
17
+ id: e.inputId,
18
+ type: "search",
19
+ name: "queryString",
20
+ "data-testid": "header-basic-search-input",
21
+ icon: e.mdiMagnify,
22
+ "model-value": e.displayTerm,
23
+ "can-clear": !0,
24
+ class: "tw-w-full",
25
+ placeholder: "Search all loans",
26
+ onInput: e.onInput,
27
+ onFocus: e.onFocus,
28
+ onBlur: e.onBlur,
29
+ onKeydown: [
30
+ u(l(e.listUp, ["prevent"]), ["up"]),
31
+ u(l(e.listDown, ["prevent"]), ["down"]),
32
+ u(l(e.onSubmit, ["prevent"]), ["enter"])
33
+ ]
34
+ }, null, 8, ["id", "icon", "model-value", "onInput", "onFocus", "onBlur", "onKeydown"]),
35
+ y(o("ol", {
36
+ class: d(["tw-w-full tw-bg-primary tw-p-2.5 tw-border tw-border-tertiary tw-overflow-auto", c.isMobile ? "tw-mt-2" : "tw-absolute tw-z-popover tw-inset-x-0 md:tw-rounded-b"])
37
+ }, [
38
+ (n(!0), r(p, null, w(e.groupedResults, (t) => (n(), r("li", {
39
+ key: t.group,
40
+ "data-testid": `header-basic-search-results-${t.group}`
41
+ }, [
42
+ o("h2", B, g(t.group), 1),
43
+ o("ol", null, [
44
+ (n(!0), r(p, null, w(t.items, (a, b) => {
45
+ var i;
46
+ return n(), r("li", {
47
+ key: a.label
48
+ }, [
49
+ o("button", {
50
+ type: "button",
51
+ class: d(["tw-w-full tw-text-left tw-pl-1.5 tw-py-0.5 tw-rounded-xs tw-font-medium tw-cursor-pointer hover:tw-bg-secondary hover:tw-underline", { "tw-bg-secondary tw-underline": a.label === ((i = e.highlighted) == null ? void 0 : i.label) }]),
52
+ "data-testid": `header-basic-search-result-item-${t.group}-${b}`,
53
+ onMousedown: s[0] || (s[0] = l(() => {
54
+ }, ["prevent"])),
55
+ onClick: (E) => e.runSearch(a)
56
+ }, [
57
+ o("span", {
58
+ innerHTML: e.formatResult(a)
59
+ }, null, 8, C)
60
+ ], 42, I)
61
+ ]);
62
+ }), 128))
63
+ ])
64
+ ], 8, x))), 128))
65
+ ], 2), [
66
+ [S, e.showResults]
67
+ ])
68
+ ], 32);
69
+ }
70
+ const z = /* @__PURE__ */ k(h, [["render", F]]);
71
+ export {
72
+ z as default
73
+ };
@@ -0,0 +1,84 @@
1
+ import { inject as x, ref as m, toRef as B, computed as l } from "vue";
2
+ import { mdiMagnify as A } from "@mdi/js";
3
+ import K from "../KvTextInput.js";
4
+ import O from "../../utils/markMatches.js";
5
+ import { useTypeaheadSearch as j } from "../../utils/useTypeaheadSearch.js";
6
+ const q = {
7
+ name: "SearchBar",
8
+ components: { KvTextInput: K },
9
+ props: {
10
+ searchSuggestions: {
11
+ type: Array,
12
+ default: () => []
13
+ },
14
+ appOrigin: {
15
+ type: String,
16
+ default: ""
17
+ },
18
+ isMobile: {
19
+ type: Boolean,
20
+ default: !1
21
+ }
22
+ },
23
+ emits: ["load-search-data", "search-submit"],
24
+ setup(i, { emit: c }) {
25
+ const v = x("$kvTrackEvent", () => {
26
+ }), h = "kv-www-header-basic-search", n = m(!1), f = m(!1), {
27
+ term: t,
28
+ groupedResults: o,
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(() => {
32
+ var e;
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) {
36
+ t.value = e;
37
+ }
38
+ function S() {
39
+ n.value = !0, f.value || (c("load-search-data"), f.value = !0), v("search", "focus");
40
+ }
41
+ function w() {
42
+ n.value = !1, a.value = -1;
43
+ }
44
+ function s(e) {
45
+ const p = d(e);
46
+ v("search", "click", p.suggestion ? "type-ahead-search" : "custom-search-option"), c("search-submit", p);
47
+ }
48
+ function R(e) {
49
+ s(e);
50
+ }
51
+ function k() {
52
+ u.value ? s(u.value) : s(t.value);
53
+ }
54
+ function I() {
55
+ a.value += 1, a.value >= r.value.length && (a.value = -1);
56
+ }
57
+ function M() {
58
+ a.value === -1 && (a.value = r.value.length), a.value -= 1;
59
+ }
60
+ function T(e) {
61
+ return O(e.label, e.matches);
62
+ }
63
+ return {
64
+ mdiMagnify: A,
65
+ inputId: h,
66
+ term: t,
67
+ displayTerm: g,
68
+ groupedResults: o,
69
+ highlighted: u,
70
+ showResults: y,
71
+ onInput: b,
72
+ onFocus: S,
73
+ onBlur: w,
74
+ onSubmit: k,
75
+ runSearch: R,
76
+ listUp: M,
77
+ listDown: I,
78
+ formatResult: T
79
+ };
80
+ }
81
+ };
82
+ export {
83
+ q as default
84
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kiva/kv-shop",
3
- "version": "3.7.81",
3
+ "version": "3.7.82",
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.14.2",
37
+ "@kiva/kv-components": "^8.15.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": "3286625d2cdc74397aeb3902a6dcce330f070071"
66
+ "gitHead": "d615c83ca4ae49487e28a78a5c8f2b060633299a"
67
67
  }