@kiva/kv-components 9.0.2 → 9.1.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 +1 @@
|
|
|
1
|
-
.kiva-k__normal[data-v-
|
|
1
|
+
.kiva-k__normal[data-v-ff210636]{height:60%}.kiva-k__small[data-v-ff210636]{height:70%}.kiva-k__white[data-v-ff210636]{fill:#fff}.kiva-k__green-light[data-v-ff210636]{fill:#78c79f}
|
package/dist/vue/KvUserAvatar.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import w from "./KvUserAvatar2.js";
|
|
2
|
-
import { resolveComponent as s, openBlock as a, createElementBlock as t, normalizeClass as i, createBlock as h, createCommentVNode as r, createElementVNode as o, withDirectives as v, createVNode as
|
|
2
|
+
import { resolveComponent as s, openBlock as a, createElementBlock as t, normalizeClass as i, createBlock as h, createCommentVNode as r, createElementVNode as o, withDirectives as v, createVNode as f, vShow as _, normalizeStyle as c, toDisplayString as k } from "vue";
|
|
3
3
|
import "./KvUserAvatar.css";
|
|
4
4
|
import g from "../_virtual/_plugin-vue_export-helper.js";
|
|
5
5
|
const u = ["src"], y = ["viewBox"], I = {
|
|
@@ -9,19 +9,19 @@ const u = ["src"], y = ["viewBox"], I = {
|
|
|
9
9
|
"text-anchor": "middle"
|
|
10
10
|
};
|
|
11
11
|
function b(x, n, l, e, C, A) {
|
|
12
|
-
const
|
|
12
|
+
const m = s("kv-material-icon"), d = s("kv-loading-placeholder");
|
|
13
13
|
return a(), t("div", {
|
|
14
14
|
ref: "userAvatar",
|
|
15
15
|
class: i(["data-hj-suppress tw-flex tw-items-center tw-justify-center tw-rounded-full tw-overflow-hidden", {
|
|
16
16
|
"tw-bg-brand": e.isAnonymousUser && l.theme === "default" && !e.showIconFallback,
|
|
17
|
-
"tw-bg-brand-100": e.showIconFallback
|
|
17
|
+
"tw-bg-brand-100": !e.showIconFallback && e.isAnonymousUser && l.theme === "ecoGreenLight",
|
|
18
18
|
[e.avatarClass]: !e.isAnonymousUser && !e.showIconFallback
|
|
19
19
|
}])
|
|
20
20
|
}, [
|
|
21
|
-
e.showIconFallback ? (a(), h(
|
|
21
|
+
e.showIconFallback ? (a(), h(m, {
|
|
22
22
|
key: 0,
|
|
23
23
|
icon: e.mdiAccountCircle,
|
|
24
|
-
class: "tw-w-full tw-h-full tw-text-
|
|
24
|
+
class: "tw-w-full tw-h-full tw-text-primary",
|
|
25
25
|
"data-testid": "user-avatar-icon"
|
|
26
26
|
}, null, 8, ["icon"])) : r("", !0),
|
|
27
27
|
e.isAnonymousUser && !e.showIconFallback ? (a(), t("svg", {
|
|
@@ -39,8 +39,8 @@ function b(x, n, l, e, C, A) {
|
|
|
39
39
|
o("path", { d: "M10.1143 23.2751C21.9428 23.2751 24.6857 13.2126 24.6857 11.4626H23.6571C11.8286 11.4626 9.08569 21.5251 9.08569 23.2751H10.1143Z" }, null, -1),
|
|
40
40
|
o("path", { d: "M9.08569 24.2376C9.08569 26.0751 11.1428 36.3126 23.8285 36.3126H24.8571C24.8571 34.4751 22.8 24.2376 10.1143 24.2376H9.08569Z" }, null, -1)
|
|
41
41
|
]), 2)) : r("", !0),
|
|
42
|
-
v(
|
|
43
|
-
[
|
|
42
|
+
v(f(d, null, null, 512), [
|
|
43
|
+
[_, !e.isAnonymousUser && e.userHasImage && e.isImageLoading && !l.showCssPlaceholder]
|
|
44
44
|
]),
|
|
45
45
|
!e.isAnonymousUser && e.userHasImage ? (a(), t("div", {
|
|
46
46
|
key: 2,
|
|
@@ -68,7 +68,7 @@ function b(x, n, l, e, C, A) {
|
|
|
68
68
|
], 8, y)) : r("", !0)
|
|
69
69
|
], 2);
|
|
70
70
|
}
|
|
71
|
-
const V = /* @__PURE__ */ g(w, [["render", b], ["__scopeId", "data-v-
|
|
71
|
+
const V = /* @__PURE__ */ g(w, [["render", b], ["__scopeId", "data-v-ff210636"]]);
|
|
72
72
|
export {
|
|
73
73
|
V as default
|
|
74
74
|
};
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { gql as
|
|
2
|
-
import { toRefs as
|
|
3
|
-
import
|
|
1
|
+
import { gql as i } from "@apollo/client/core";
|
|
2
|
+
import { toRefs as q, ref as s, computed as g, onMounted as w } from "vue";
|
|
3
|
+
import I from "./KvLendListMenu.js";
|
|
4
4
|
import O from "./KvLendMegaMenu.js";
|
|
5
|
-
import
|
|
6
|
-
import { indexIn as
|
|
7
|
-
import { groupBy as
|
|
8
|
-
import
|
|
9
|
-
const
|
|
5
|
+
import A from "../../KvWwwHeaderBasic/MobileLendMenu/MobileLendMenu.js";
|
|
6
|
+
import { indexIn as F } from "../../../utils/comparators.js";
|
|
7
|
+
import { groupBy as N, sortBy as v } from "../../../utils/arrayUtils.js";
|
|
8
|
+
import x from "../../KvPageContainer.js";
|
|
9
|
+
const Q = {
|
|
10
10
|
components: {
|
|
11
|
-
KvLendListMenu:
|
|
11
|
+
KvLendListMenu: I,
|
|
12
12
|
KvLendMegaMenu: O,
|
|
13
|
-
MobileLendMenu:
|
|
14
|
-
KvPageContainer:
|
|
13
|
+
MobileLendMenu: A,
|
|
14
|
+
KvPageContainer: x
|
|
15
15
|
},
|
|
16
16
|
props: {
|
|
17
17
|
userId: {
|
|
@@ -52,10 +52,10 @@ const U = {
|
|
|
52
52
|
}
|
|
53
53
|
},
|
|
54
54
|
emits: ["load-lend-menu-data", "load-search-data", "search-submit"],
|
|
55
|
-
setup(
|
|
55
|
+
setup(C, { emit: h }) {
|
|
56
56
|
const {
|
|
57
|
-
userId:
|
|
58
|
-
} =
|
|
57
|
+
userId: l
|
|
58
|
+
} = q(C), c = s([]), m = s([]), d = s(0), y = s([]), M = [
|
|
59
59
|
"North America",
|
|
60
60
|
"Central America",
|
|
61
61
|
"South America",
|
|
@@ -64,10 +64,10 @@ const U = {
|
|
|
64
64
|
"Middle East",
|
|
65
65
|
"Asia",
|
|
66
66
|
"Oceania"
|
|
67
|
-
],
|
|
68
|
-
var o,
|
|
69
|
-
if (
|
|
70
|
-
query:
|
|
67
|
+
], p = s(!0), f = s(!0), b = async (n) => {
|
|
68
|
+
var o, r, t, a;
|
|
69
|
+
if (n.watchQuery({
|
|
70
|
+
query: i`query countryFacets {
|
|
71
71
|
lend {
|
|
72
72
|
countryFacets {
|
|
73
73
|
count
|
|
@@ -82,31 +82,32 @@ const U = {
|
|
|
82
82
|
}`
|
|
83
83
|
}).subscribe({
|
|
84
84
|
next: ({ data: e }) => {
|
|
85
|
-
var
|
|
86
|
-
|
|
85
|
+
var u;
|
|
86
|
+
m.value = ((u = e == null ? void 0 : e.lend) == null ? void 0 : u.countryFacets) ?? [], p.value = !1;
|
|
87
87
|
}
|
|
88
|
-
}),
|
|
89
|
-
query:
|
|
88
|
+
}), n.watchQuery({
|
|
89
|
+
query: i`
|
|
90
90
|
query lendMenuData {
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
91
|
+
browsingCategories(
|
|
92
|
+
filters: { popularOnly: true, applyMinimumLoanCount: true }
|
|
93
|
+
limit: 50
|
|
94
|
+
) {
|
|
95
|
+
values {
|
|
96
|
+
id
|
|
97
|
+
name
|
|
98
|
+
url
|
|
98
99
|
}
|
|
99
100
|
}
|
|
100
101
|
}
|
|
101
102
|
`
|
|
102
103
|
}).subscribe({
|
|
103
104
|
next: ({ data: e }) => {
|
|
104
|
-
var
|
|
105
|
-
c.value = ((
|
|
105
|
+
var u;
|
|
106
|
+
c.value = ((u = e == null ? void 0 : e.browsingCategories) == null ? void 0 : u.values) ?? [], f.value = !1;
|
|
106
107
|
}
|
|
107
|
-
}),
|
|
108
|
-
const { data: e } = await
|
|
109
|
-
query:
|
|
108
|
+
}), l.value) {
|
|
109
|
+
const { data: e } = await n.query({
|
|
110
|
+
query: i`
|
|
110
111
|
query lendMenuPrivateData($userId: Int!) {
|
|
111
112
|
lend {
|
|
112
113
|
loans(limit: 1, filters: {
|
|
@@ -127,45 +128,45 @@ const U = {
|
|
|
127
128
|
}
|
|
128
129
|
`,
|
|
129
130
|
variables: {
|
|
130
|
-
userId:
|
|
131
|
+
userId: l.value
|
|
131
132
|
},
|
|
132
133
|
fetchPolicy: "network-only"
|
|
133
134
|
});
|
|
134
|
-
|
|
135
|
+
d.value = ((r = (o = e == null ? void 0 : e.lend) == null ? void 0 : o.loans) == null ? void 0 : r.totalCount) ?? 0, y.value = ((a = (t = e == null ? void 0 : e.my) == null ? void 0 : t.savedSearches) == null ? void 0 : a.values) ?? [];
|
|
135
136
|
}
|
|
136
|
-
},
|
|
137
|
-
const
|
|
138
|
-
name:
|
|
139
|
-
region:
|
|
140
|
-
isoCode:
|
|
141
|
-
count:
|
|
142
|
-
})), o =
|
|
143
|
-
for (const [
|
|
144
|
-
|
|
145
|
-
name:
|
|
146
|
-
countries:
|
|
137
|
+
}, L = g(() => {
|
|
138
|
+
const n = m.value.map((t) => ({
|
|
139
|
+
name: t.country.name,
|
|
140
|
+
region: t.country.region,
|
|
141
|
+
isoCode: t.country.isoCode.toLowerCase(),
|
|
142
|
+
count: t.count || 0
|
|
143
|
+
})), o = N(n, "region"), r = [];
|
|
144
|
+
for (const [t, a] of Object.entries(o))
|
|
145
|
+
r.push({
|
|
146
|
+
name: t,
|
|
147
|
+
countries: a.sort(v("name"))
|
|
147
148
|
});
|
|
148
|
-
return
|
|
149
|
-
}),
|
|
149
|
+
return r.sort(F(M, "name"));
|
|
150
|
+
}), S = g(() => {
|
|
150
151
|
var o;
|
|
151
|
-
return ((o = c.value) == null ? void 0 : o.map((
|
|
152
|
-
const
|
|
153
|
-
return
|
|
154
|
-
})).sort(
|
|
152
|
+
return ((o = c.value) == null ? void 0 : o.map((r) => {
|
|
153
|
+
const t = JSON.parse(JSON.stringify(r));
|
|
154
|
+
return t.url = t.url.replace("lend", "lend-by-category"), t;
|
|
155
|
+
})).sort(v("name"));
|
|
155
156
|
});
|
|
156
157
|
return w(() => {
|
|
157
|
-
|
|
158
|
+
h("load-lend-menu-data");
|
|
158
159
|
}), {
|
|
159
|
-
onLoad:
|
|
160
|
-
regions:
|
|
161
|
-
computedCategories:
|
|
160
|
+
onLoad: b,
|
|
161
|
+
regions: L,
|
|
162
|
+
computedCategories: S,
|
|
162
163
|
isChannelsLoading: f,
|
|
163
|
-
isRegionsLoading:
|
|
164
|
-
savedSearches:
|
|
165
|
-
favoritesCount:
|
|
164
|
+
isRegionsLoading: p,
|
|
165
|
+
savedSearches: y,
|
|
166
|
+
favoritesCount: d
|
|
166
167
|
};
|
|
167
168
|
}
|
|
168
169
|
};
|
|
169
170
|
export {
|
|
170
|
-
|
|
171
|
+
Q as default
|
|
171
172
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.link-bar[data-v-
|
|
1
|
+
.link-bar[data-v-2b7a1e93]{display:flex;align-items:center;gap:.5rem}.link-bar__logo[data-v-2b7a1e93]{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-2b7a1e93]{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-2b7a1e93]{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-2b7a1e93]{grid-area:lend}.link-bar__search[data-v-2b7a1e93]{grid-area:search;margin-bottom:.5rem}.link-bar__right[data-v-2b7a1e93]{grid-area:right}}@media(min-width:64rem){.link-bar[data-v-2b7a1e93]{-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-2b7a1e93]{margin-bottom:0}}.header-link[data-v-2b7a1e93]{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-2b7a1e93]:hover{--tw-text-opacity: 1;color:rgba(var(--text-action),var(--tw-text-opacity, 1));text-decoration-line:none}.link-bar__basket-count-loader[data-v-2b7a1e93]{width:1.5ch;height:1.375em;height:1lh}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import x from "./LinkBar2.js";
|
|
2
|
-
import { resolveComponent as d, openBlock as o, createElementBlock as i, createElementVNode as l, withModifiers as b, createVNode as r, withCtx as k, createTextVNode as w, Fragment as
|
|
2
|
+
import { resolveComponent as d, openBlock as o, createElementBlock as i, createElementVNode as l, withModifiers as b, createVNode as r, withCtx as k, createTextVNode as w, Fragment as y, renderList as L, toDisplayString as m, createCommentVNode as s, withDirectives as B, normalizeStyle as u, vShow as O, createBlock as f } from "vue";
|
|
3
3
|
import "./LinkBar.css";
|
|
4
4
|
import S from "../../_virtual/_plugin-vue_export-helper.js";
|
|
5
5
|
const T = { class: "link-bar__right tw-flex tw-items-center tw-justify-end tw-ml-auto md:tw-ml-0 tw-gap-1 md:tw-gap-2 lg:tw-gap-2.5" }, D = ["href", "data-testid", "onClick"], U = ["href"], H = { class: "tw-hidden md:tw-flex tw-items-center" }, A = { class: "tw-bg-secondary tw-rounded-xs tw-py-0.5 tw-px-1 tw-mr-1 tw-leading-none tw-flex tw-items-center tw-justify-center" }, I = {
|
|
@@ -69,7 +69,7 @@ function X(h, t, a, e, z, F) {
|
|
|
69
69
|
onSearchSubmit: t[5] || (t[5] = (n) => h.$emit("search-submit", n))
|
|
70
70
|
}, null, 8, ["search-suggestions", "app-origin", "is-mobile"]),
|
|
71
71
|
l("div", T, [
|
|
72
|
-
(o(!0), i(
|
|
72
|
+
(o(!0), i(y, null, L(e.visiblePrimaryLinks, (n) => (o(), i("a", {
|
|
73
73
|
key: n.id,
|
|
74
74
|
href: n.href,
|
|
75
75
|
class: "header-link tw-hidden md:tw-block",
|
|
@@ -111,7 +111,7 @@ function X(h, t, a, e, z, F) {
|
|
|
111
111
|
l("span", A, [
|
|
112
112
|
a.isBasketDataLoading ? (o(), i("span", I, [
|
|
113
113
|
r(c)
|
|
114
|
-
])) : (o(), i(
|
|
114
|
+
])) : (o(), i(y, { key: 1 }, [
|
|
115
115
|
w(m(a.basketCount), 1)
|
|
116
116
|
], 64))
|
|
117
117
|
]),
|
|
@@ -155,17 +155,17 @@ function X(h, t, a, e, z, F) {
|
|
|
155
155
|
a.isUserDataLoading ? (o(), i("div", P, [
|
|
156
156
|
r(c)
|
|
157
157
|
])) : (o(), i("span", V, m(e.formattedBalance), 1)),
|
|
158
|
-
e.avatarMode === "esi" ? (o(),
|
|
158
|
+
e.avatarMode === "esi" ? (o(), f(v, {
|
|
159
159
|
key: 2,
|
|
160
160
|
icon: e.mdiAccountCircle,
|
|
161
|
-
class: "tw-w-3 tw-h-3",
|
|
161
|
+
class: "tw-w-3 tw-h-3 tw-text-primary",
|
|
162
162
|
"data-testid": "header-avatar-icon",
|
|
163
163
|
style: { display: "var(--user-avatar-legacy-display, inline-block)" }
|
|
164
164
|
}, null, 8, ["icon"])) : s("", !0),
|
|
165
165
|
e.avatarMode === "skeleton" ? (o(), i("div", j, [
|
|
166
166
|
r(c)
|
|
167
167
|
])) : s("", !0),
|
|
168
|
-
e.avatarMode !== "skeleton" ? (o(),
|
|
168
|
+
e.avatarMode !== "skeleton" ? (o(), f(p, {
|
|
169
169
|
key: 4,
|
|
170
170
|
class: "tw-w-3 tw-h-3",
|
|
171
171
|
"data-testid": e.avatarMode === "esi" ? "header-avatar-esi" : null,
|
|
@@ -180,7 +180,7 @@ function X(h, t, a, e, z, F) {
|
|
|
180
180
|
])
|
|
181
181
|
], 32);
|
|
182
182
|
}
|
|
183
|
-
const W = /* @__PURE__ */ S(x, [["render", X], ["__scopeId", "data-v-
|
|
183
|
+
const W = /* @__PURE__ */ S(x, [["render", X], ["__scopeId", "data-v-2b7a1e93"]]);
|
|
184
184
|
export {
|
|
185
185
|
W as default
|
|
186
186
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kiva/kv-components",
|
|
3
|
-
"version": "9.0
|
|
3
|
+
"version": "9.1.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -113,5 +113,5 @@
|
|
|
113
113
|
"dependencies": {
|
|
114
114
|
"fuse.js": "^7.1.0"
|
|
115
115
|
},
|
|
116
|
-
"gitHead": "
|
|
116
|
+
"gitHead": "ff6bd8a622403e32383ffb2d903bf850af5a70e7"
|
|
117
117
|
}
|