@kiva/kv-components 6.52.8 → 6.52.10
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/vue/KvLendCta.css +1 -1
- package/dist/vue/KvLendCta.js +304 -186
- package/dist/vue/KvWwwHeader/LendMenu/KvLendListMenu.css +1 -1
- package/dist/vue/KvWwwHeader/LendMenu/KvLendListMenu.js +55 -51
- package/dist/vue/KvWwwHeader/LendMenu/KvLendMegaMenu.css +1 -1
- package/dist/vue/KvWwwHeader/LendMenu/KvLendMegaMenu.js +63 -59
- package/dist/vue/KvWwwHeader/LendMenu/KvLendMenu.js +54 -48
- package/dist/vue/KvWwwHeader.css +1 -1
- package/dist/vue/KvWwwHeader.js +43 -38
- package/package.json +2 -2
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { gql as f } from "@apollo/client/core";
|
|
2
|
-
import { toRefs as
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import { indexIn as
|
|
6
|
-
import { groupBy as
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
const
|
|
2
|
+
import { toRefs as S, ref as a, computed as L, onMounted as q, resolveComponent as h, openBlock as N, createBlock as x, withCtx as U, createVNode as w } from "vue";
|
|
3
|
+
import A from "./KvLendListMenu.js";
|
|
4
|
+
import B from "./KvLendMegaMenu.js";
|
|
5
|
+
import { indexIn as F } from "../../../utils/comparators.js";
|
|
6
|
+
import { groupBy as O, sortBy as k } from "../../../utils/arrayUtils.js";
|
|
7
|
+
import R from "../../KvPageContainer.js";
|
|
8
|
+
import K from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
9
|
+
const D = {
|
|
10
10
|
components: {
|
|
11
|
-
KvLendListMenu:
|
|
12
|
-
KvLendMegaMenu:
|
|
13
|
-
KvPageContainer:
|
|
11
|
+
KvLendListMenu: A,
|
|
12
|
+
KvLendMegaMenu: B,
|
|
13
|
+
KvPageContainer: R
|
|
14
14
|
},
|
|
15
15
|
props: {
|
|
16
16
|
userId: {
|
|
@@ -20,13 +20,17 @@ const E = {
|
|
|
20
20
|
showMGUpsellLink: {
|
|
21
21
|
type: Boolean,
|
|
22
22
|
default: !1
|
|
23
|
+
},
|
|
24
|
+
countriesNotLentToUrl: {
|
|
25
|
+
type: String,
|
|
26
|
+
default: "/lend/countries-not-lent"
|
|
23
27
|
}
|
|
24
28
|
},
|
|
25
29
|
emits: ["load-lend-menu-data"],
|
|
26
|
-
setup(
|
|
30
|
+
setup(y, { emit: p }) {
|
|
27
31
|
const {
|
|
28
32
|
userId: s
|
|
29
|
-
} =
|
|
33
|
+
} = S(y), e = a([]), g = a([]), m = a(0), u = a([]), v = [
|
|
30
34
|
"North America",
|
|
31
35
|
"Central America",
|
|
32
36
|
"South America",
|
|
@@ -35,9 +39,9 @@ const E = {
|
|
|
35
39
|
"Middle East",
|
|
36
40
|
"Asia",
|
|
37
41
|
"Oceania"
|
|
38
|
-
],
|
|
39
|
-
var
|
|
40
|
-
if (
|
|
42
|
+
], c = a(!0), C = a(!0), M = async (i) => {
|
|
43
|
+
var t, r, o, d;
|
|
44
|
+
if (i.watchQuery({
|
|
41
45
|
query: f`query countryFacets {
|
|
42
46
|
lend {
|
|
43
47
|
countryFacets {
|
|
@@ -54,9 +58,9 @@ const E = {
|
|
|
54
58
|
}).subscribe({
|
|
55
59
|
next: ({ data: n }) => {
|
|
56
60
|
var l;
|
|
57
|
-
g.value = ((l = n == null ? void 0 : n.lend) == null ? void 0 : l.countryFacets) ?? [],
|
|
61
|
+
g.value = ((l = n == null ? void 0 : n.lend) == null ? void 0 : l.countryFacets) ?? [], c.value = !1;
|
|
58
62
|
}
|
|
59
|
-
}),
|
|
63
|
+
}), i.watchQuery({
|
|
60
64
|
query: f`
|
|
61
65
|
query lendMenuData {
|
|
62
66
|
lend {
|
|
@@ -76,7 +80,7 @@ const E = {
|
|
|
76
80
|
e.value = ((_ = (l = n == null ? void 0 : n.lend) == null ? void 0 : l.loanChannels) == null ? void 0 : _.values) ?? [], C.value = !1;
|
|
77
81
|
}
|
|
78
82
|
}), s.value) {
|
|
79
|
-
const { data: n } = await
|
|
83
|
+
const { data: n } = await i.query({
|
|
80
84
|
query: f`
|
|
81
85
|
query lendMenuPrivateData($userId: Int!) {
|
|
82
86
|
lend {
|
|
@@ -102,46 +106,46 @@ const E = {
|
|
|
102
106
|
},
|
|
103
107
|
fetchPolicy: "network-only"
|
|
104
108
|
});
|
|
105
|
-
m.value = ((
|
|
109
|
+
m.value = ((r = (t = n == null ? void 0 : n.lend) == null ? void 0 : t.loans) == null ? void 0 : r.totalCount) ?? 0, u.value = ((d = (o = n == null ? void 0 : n.my) == null ? void 0 : o.savedSearches) == null ? void 0 : d.values) ?? [];
|
|
106
110
|
}
|
|
107
|
-
}, b =
|
|
108
|
-
const
|
|
111
|
+
}, b = L(() => {
|
|
112
|
+
const i = g.value.map((o) => ({
|
|
109
113
|
name: o.country.name,
|
|
110
114
|
region: o.country.region,
|
|
111
115
|
isoCode: o.country.isoCode.toLowerCase(),
|
|
112
116
|
count: o.count || 0
|
|
113
|
-
})),
|
|
114
|
-
for (const [o, d] of Object.entries(
|
|
115
|
-
|
|
117
|
+
})), t = O(i, "region"), r = [];
|
|
118
|
+
for (const [o, d] of Object.entries(t))
|
|
119
|
+
r.push({
|
|
116
120
|
name: o,
|
|
117
|
-
countries: d.sort(
|
|
121
|
+
countries: d.sort(k("name"))
|
|
118
122
|
});
|
|
119
|
-
return
|
|
120
|
-
}), I =
|
|
121
|
-
var
|
|
122
|
-
return ((
|
|
123
|
-
const o = JSON.parse(JSON.stringify(
|
|
123
|
+
return r.sort(F(v, "name"));
|
|
124
|
+
}), I = L(() => {
|
|
125
|
+
var t;
|
|
126
|
+
return ((t = e.value) == null ? void 0 : t.map((r) => {
|
|
127
|
+
const o = JSON.parse(JSON.stringify(r));
|
|
124
128
|
return o.url = o.url.replace("lend", "lend-by-category"), o;
|
|
125
|
-
})).sort(
|
|
129
|
+
})).sort(k("name"));
|
|
126
130
|
});
|
|
127
|
-
return
|
|
128
|
-
|
|
131
|
+
return q(() => {
|
|
132
|
+
p("load-lend-menu-data");
|
|
129
133
|
}), {
|
|
130
134
|
onLoad: M,
|
|
131
135
|
regions: b,
|
|
132
136
|
computedCategories: I,
|
|
133
137
|
isChannelsLoading: C,
|
|
134
|
-
isRegionsLoading:
|
|
135
|
-
savedSearches:
|
|
138
|
+
isRegionsLoading: c,
|
|
139
|
+
savedSearches: u,
|
|
136
140
|
favoritesCount: m
|
|
137
141
|
};
|
|
138
142
|
}
|
|
139
143
|
};
|
|
140
|
-
function
|
|
141
|
-
const
|
|
142
|
-
return
|
|
143
|
-
default:
|
|
144
|
-
|
|
144
|
+
function E(y, p, s, e, g, m) {
|
|
145
|
+
const u = h("kv-lend-list-menu"), v = h("kv-lend-mega-menu"), c = h("kv-page-container");
|
|
146
|
+
return N(), x(c, { class: "tw-pt-2 lg:tw-pt-0" }, {
|
|
147
|
+
default: U(() => [
|
|
148
|
+
w(u, {
|
|
145
149
|
class: "lg:tw-hidden",
|
|
146
150
|
categories: e.computedCategories,
|
|
147
151
|
regions: e.regions,
|
|
@@ -150,9 +154,10 @@ function G(p, y, s, e, g, m) {
|
|
|
150
154
|
searches: e.savedSearches,
|
|
151
155
|
"is-regions-loading": e.isRegionsLoading,
|
|
152
156
|
"is-channels-loading": e.isChannelsLoading,
|
|
153
|
-
"show-m-g-upsell-link": s.showMGUpsellLink
|
|
154
|
-
|
|
155
|
-
|
|
157
|
+
"show-m-g-upsell-link": s.showMGUpsellLink,
|
|
158
|
+
"countries-not-lent-to-url": s.countriesNotLentToUrl
|
|
159
|
+
}, null, 8, ["categories", "regions", "user-id", "favorites", "searches", "is-regions-loading", "is-channels-loading", "show-m-g-upsell-link", "countries-not-lent-to-url"]),
|
|
160
|
+
w(v, {
|
|
156
161
|
class: "tw-hidden lg:tw-block",
|
|
157
162
|
categories: e.computedCategories,
|
|
158
163
|
regions: e.regions,
|
|
@@ -161,13 +166,14 @@ function G(p, y, s, e, g, m) {
|
|
|
161
166
|
searches: e.savedSearches,
|
|
162
167
|
"is-regions-loading": e.isRegionsLoading,
|
|
163
168
|
"is-channels-loading": e.isChannelsLoading,
|
|
164
|
-
"show-m-g-upsell-link": s.showMGUpsellLink
|
|
165
|
-
|
|
169
|
+
"show-m-g-upsell-link": s.showMGUpsellLink,
|
|
170
|
+
"countries-not-lent-to-url": s.countriesNotLentToUrl
|
|
171
|
+
}, null, 8, ["categories", "regions", "user-id", "favorites", "searches", "is-regions-loading", "is-channels-loading", "show-m-g-upsell-link", "countries-not-lent-to-url"])
|
|
166
172
|
]),
|
|
167
173
|
_: 1
|
|
168
174
|
});
|
|
169
175
|
}
|
|
170
|
-
const
|
|
176
|
+
const H = /* @__PURE__ */ K(D, [["render", E]]);
|
|
171
177
|
export {
|
|
172
|
-
|
|
178
|
+
H as default
|
|
173
179
|
};
|
package/dist/vue/KvWwwHeader.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.header-fade-enter-active[data-v-
|
|
1
|
+
.header-fade-enter-active[data-v-c1223ffa]{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.3s}.header-fade-leave-active[data-v-c1223ffa]{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.1s}.header-fade-enter[data-v-c1223ffa],.header-fade-leave-to[data-v-c1223ffa]{opacity:0}.header-fade-leave[data-v-c1223ffa],.header-fade-enter-to[data-v-c1223ffa]{opacity:1}.bg-opacity-50[data-v-c1223ffa]{background-color:rgba(var(--bg-action-highlight),.5)}
|
package/dist/vue/KvWwwHeader.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ref as l, shallowRef as D, computed as
|
|
2
|
-
import
|
|
1
|
+
import { ref as l, shallowRef as D, computed as U, onMounted as B, onBeforeUnmount as N, resolveComponent as f, resolveDirective as x, openBlock as w, createBlock as M, withCtx as g, createElementVNode as k, normalizeStyle as _, createVNode as d, Transition as I, withDirectives as h, vShow as E, createElementBlock as A, normalizeClass as S, resolveDynamicComponent as G } from "vue";
|
|
2
|
+
import K from "@kiva/kv-tokens";
|
|
3
3
|
import z from "./KvWwwHeader/KvHeaderLinkBar.js";
|
|
4
4
|
import R from "./KvWwwHeader/KvHeaderLogo.js";
|
|
5
5
|
import P from "./KvThemeProvider.js";
|
|
@@ -58,48 +58,52 @@ const j = "3.75rem", q = {
|
|
|
58
58
|
showMGUpsellLink: {
|
|
59
59
|
type: Boolean,
|
|
60
60
|
default: !1
|
|
61
|
+
},
|
|
62
|
+
countriesNotLentToUrl: {
|
|
63
|
+
type: String,
|
|
64
|
+
default: "/lend/countries-not-lent"
|
|
61
65
|
}
|
|
62
66
|
},
|
|
63
67
|
emits: [
|
|
64
68
|
"load-lend-menu-data"
|
|
65
69
|
],
|
|
66
|
-
setup(
|
|
67
|
-
const o = l(!0), e = l(null),
|
|
68
|
-
let
|
|
69
|
-
const b =
|
|
70
|
+
setup(L, { emit: t }) {
|
|
71
|
+
const o = l(!0), e = l(null), r = l(!1), a = D(null), i = l(null), s = l({ left: 0, position: "relative" }), u = l(!1);
|
|
72
|
+
let c;
|
|
73
|
+
const b = U(() => {
|
|
70
74
|
var m, n;
|
|
71
|
-
return ((n = (m =
|
|
72
|
-
}),
|
|
73
|
-
n ? (clearTimeout(
|
|
74
|
-
...
|
|
75
|
+
return ((n = (m = i.value) == null ? void 0 : m.$options) == null ? void 0 : n.name) === "KvHeaderMobileMenu";
|
|
76
|
+
}), v = (m, n, p) => {
|
|
77
|
+
n ? (clearTimeout(c), a.value !== n && (s.value = { left: 0, position: "relative" }), a.value = n, r.value = !0, p && (s.value = {
|
|
78
|
+
...p,
|
|
75
79
|
position: "absolute"
|
|
76
|
-
})) :
|
|
77
|
-
|
|
80
|
+
})) : r.value && (c = setTimeout(() => {
|
|
81
|
+
r.value = !1, a.value = null;
|
|
78
82
|
}, 100));
|
|
79
|
-
},
|
|
83
|
+
}, T = (m) => {
|
|
80
84
|
var n;
|
|
81
|
-
(n =
|
|
82
|
-
},
|
|
85
|
+
(n = i.value) == null || n.onLoad(m);
|
|
86
|
+
}, C = () => {
|
|
83
87
|
t("load-lend-menu-data");
|
|
84
88
|
}, y = () => {
|
|
85
|
-
u.value = (window == null ? void 0 : window.innerWidth) <
|
|
86
|
-
},
|
|
87
|
-
return
|
|
88
|
-
y(), window.addEventListener("resize",
|
|
89
|
-
}),
|
|
90
|
-
window.removeEventListener("resize",
|
|
89
|
+
u.value = (window == null ? void 0 : window.innerWidth) < K.breakpoints.md;
|
|
90
|
+
}, H = O(y, 100);
|
|
91
|
+
return B(() => {
|
|
92
|
+
y(), window.addEventListener("resize", H);
|
|
93
|
+
}), N(() => {
|
|
94
|
+
window.removeEventListener("resize", H);
|
|
91
95
|
}), {
|
|
92
96
|
HEADER_HEIGHT: j,
|
|
93
|
-
emitLendMenuEvent:
|
|
97
|
+
emitLendMenuEvent: C,
|
|
94
98
|
isMobile: u,
|
|
95
99
|
linksVisible: o,
|
|
96
|
-
menuOpen:
|
|
100
|
+
menuOpen: r,
|
|
97
101
|
isMobileMenuActive: b,
|
|
98
|
-
onHover:
|
|
99
|
-
loadMenuData:
|
|
102
|
+
onHover: v,
|
|
103
|
+
loadMenuData: T,
|
|
100
104
|
activeHeaderItem: e,
|
|
101
|
-
menuComponent:
|
|
102
|
-
menuComponentInstance:
|
|
105
|
+
menuComponent: a,
|
|
106
|
+
menuComponentInstance: i,
|
|
103
107
|
menuPosition: s
|
|
104
108
|
};
|
|
105
109
|
}
|
|
@@ -107,9 +111,9 @@ const j = "3.75rem", q = {
|
|
|
107
111
|
href: "/",
|
|
108
112
|
class: "tw-px-1 tw-py-2 tw-cursor-pointer tw-absolute tw-top-1/2 tw-left-1/2 tw--translate-y-1/2 tw--translate-x-1/2 tw-transition-all tw-duration-300"
|
|
109
113
|
};
|
|
110
|
-
function J(
|
|
111
|
-
const
|
|
112
|
-
return w(), M(
|
|
114
|
+
function J(L, t, o, e, r, a) {
|
|
115
|
+
const i = f("kv-header-link-bar"), s = f("kv-header-logo"), u = f("kv-page-container"), c = f("kv-theme-provider"), b = x("kv-track-event");
|
|
116
|
+
return w(), M(c, {
|
|
113
117
|
tag: "div",
|
|
114
118
|
class: "tw-bg-primary"
|
|
115
119
|
}, {
|
|
@@ -122,7 +126,7 @@ function J(C, t, o, e, a, i) {
|
|
|
122
126
|
default: g(() => [
|
|
123
127
|
d(I, { name: "header-fade" }, {
|
|
124
128
|
default: g(() => [
|
|
125
|
-
h(d(
|
|
129
|
+
h(d(i, {
|
|
126
130
|
"logged-in": o.loggedIn,
|
|
127
131
|
"basket-count": o.basketCount,
|
|
128
132
|
"login-url": o.loginUrl,
|
|
@@ -155,15 +159,15 @@ function J(C, t, o, e, a, i) {
|
|
|
155
159
|
style: _({ top: e.HEADER_HEIGHT })
|
|
156
160
|
}, [
|
|
157
161
|
k("div", {
|
|
158
|
-
class:
|
|
162
|
+
class: S(["tw-bg-primary tw-overflow-y-auto", { "tw-min-h-dvh": e.isMobileMenuActive }]),
|
|
159
163
|
style: _({
|
|
160
164
|
...e.menuPosition,
|
|
161
165
|
maxHeight: e.isMobileMenuActive ? "auto" : `calc(100dvh - ${e.HEADER_HEIGHT})`
|
|
162
166
|
}),
|
|
163
|
-
onMouseover: t[1] || (t[1] = (
|
|
164
|
-
onMouseout: t[2] || (t[2] = (
|
|
167
|
+
onMouseover: t[1] || (t[1] = (v) => e.onHover(e.activeHeaderItem, e.menuComponent)),
|
|
168
|
+
onMouseout: t[2] || (t[2] = (v) => e.onHover())
|
|
165
169
|
}, [
|
|
166
|
-
(w(), M(
|
|
170
|
+
(w(), M(G(e.menuComponent), {
|
|
167
171
|
ref: "menuComponentInstance",
|
|
168
172
|
"logged-in": o.loggedIn,
|
|
169
173
|
"login-url": o.loginUrl,
|
|
@@ -173,9 +177,10 @@ function J(C, t, o, e, a, i) {
|
|
|
173
177
|
"my-dashboard-url": o.myDashboardUrl,
|
|
174
178
|
"show-m-g-upsell-link": o.showMGUpsellLink,
|
|
175
179
|
"is-mobile": e.isMobile,
|
|
180
|
+
"countries-not-lent-to-url": o.countriesNotLentToUrl,
|
|
176
181
|
onLoadLendMenuData: e.emitLendMenuEvent,
|
|
177
|
-
onClosingMenu: t[0] || (t[0] = (
|
|
178
|
-
}, null, 40, ["logged-in", "login-url", "user-id", "is-borrower", "is-trustee", "my-dashboard-url", "show-m-g-upsell-link", "is-mobile", "onLoadLendMenuData"]))
|
|
182
|
+
onClosingMenu: t[0] || (t[0] = (v) => e.onHover())
|
|
183
|
+
}, 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", "onLoadLendMenuData"]))
|
|
179
184
|
], 38)
|
|
180
185
|
], 4), [
|
|
181
186
|
[E, e.menuOpen]
|
|
@@ -187,7 +192,7 @@ function J(C, t, o, e, a, i) {
|
|
|
187
192
|
_: 1
|
|
188
193
|
});
|
|
189
194
|
}
|
|
190
|
-
const le = /* @__PURE__ */ W(q, [["render", J], ["__scopeId", "data-v-
|
|
195
|
+
const le = /* @__PURE__ */ W(q, [["render", J], ["__scopeId", "data-v-c1223ffa"]]);
|
|
191
196
|
export {
|
|
192
197
|
le as default
|
|
193
198
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kiva/kv-components",
|
|
3
|
-
"version": "6.52.
|
|
3
|
+
"version": "6.52.10",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -114,5 +114,5 @@
|
|
|
114
114
|
"embla-carousel-fade",
|
|
115
115
|
"popper.js"
|
|
116
116
|
],
|
|
117
|
-
"gitHead": "
|
|
117
|
+
"gitHead": "f7509c21acb1a45b5556219f4fdfde85e0fc7c9d"
|
|
118
118
|
}
|