@stock-in-the-channel/sinch-vue-components 0.0.340 → 0.0.341
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/index.es.js
CHANGED
|
@@ -19944,7 +19944,7 @@ Ar.getSinchStore = function(e, t) {
|
|
|
19944
19944
|
} else
|
|
19945
19945
|
return Ar.sinch.stores.push(t), t;
|
|
19946
19946
|
};
|
|
19947
|
-
const X1 = window, vi = Qo(), Kv = { limit: 20 }, uu = {
|
|
19947
|
+
const X1 = window, vi = Qo(), Kv = { limit: 20 }, uu = { data: [] }, Yv = {}, Jv = null, Z1 = [], eC = [
|
|
19948
19948
|
{ urlParam: "brandId", filterName: "Brands" },
|
|
19949
19949
|
{ urlParam: "categoryId", filterName: "Categories" },
|
|
19950
19950
|
{ urlParam: "distributorId", filterName: "Distributors" }
|
|
@@ -20050,11 +20050,11 @@ const X1 = window, vi = Qo(), Kv = { limit: 20 }, uu = { filters: [] }, Yv = {},
|
|
|
20050
20050
|
});
|
|
20051
20051
|
this.filterResponse = uu;
|
|
20052
20052
|
const i = ["InStock", "ProductTypes", "PriceBand"];
|
|
20053
|
-
a && a.
|
|
20053
|
+
a && a.data && (this.filterResponse = a, this.filterResponse.data = this.filterResponse.data.filter(
|
|
20054
20054
|
(c) => !i.includes(c.name) && c.values.length > 0
|
|
20055
20055
|
)), this.filterLoading = !1;
|
|
20056
20056
|
const o = Object.entries(this.searchRequest).filter((c) => c[1] !== void 0), l = eC.filter((c) => o.find((s) => s[0] === c.urlParam)).map((c) => c.filterName), u = [];
|
|
20057
|
-
for (const c of this.filterResponse.
|
|
20057
|
+
for (const c of this.filterResponse.data) {
|
|
20058
20058
|
const s = c.values.find((d) => d.isSelected);
|
|
20059
20059
|
l.includes(c.name) && s && u.push(s.name);
|
|
20060
20060
|
}
|
|
@@ -24383,7 +24383,7 @@ const jT = { style: { "margin-left": "-31px" } }, zT = { key: 0 }, hu = 5, Wo =
|
|
|
24383
24383
|
a.subscribeToSearchResults(d);
|
|
24384
24384
|
});
|
|
24385
24385
|
function d() {
|
|
24386
|
-
f.value = a.searchResults && a.searchResults.data ? a.searchResults.data : Array(), i.value = a.filterResponse.
|
|
24386
|
+
f.value = a.searchResults && a.searchResults.data ? a.searchResults.data : Array(), i.value = a.filterResponse.data;
|
|
24387
24387
|
const b = {
|
|
24388
24388
|
rowsPerPage: a.searchResults.limit,
|
|
24389
24389
|
rowsNumber: a.searchResults.totalCount,
|
|
@@ -24769,7 +24769,7 @@ const jT = { style: { "margin-left": "-31px" } }, zT = { key: 0 }, hu = 5, Wo =
|
|
|
24769
24769
|
page: 1
|
|
24770
24770
|
}), i = n, o = r.memoryStoreName ?? "SearchByBrandAndCategory", l = Gi(o), u = D();
|
|
24771
24771
|
l.filterResponseCallBack = () => {
|
|
24772
|
-
u.value = l.filterResponse.
|
|
24772
|
+
u.value = l.filterResponse.data;
|
|
24773
24773
|
};
|
|
24774
24774
|
const c = D(!1), s = D({
|
|
24775
24775
|
data: [],
|
|
@@ -24789,7 +24789,7 @@ const jT = { style: { "margin-left": "-31px" } }, zT = { key: 0 }, hu = 5, Wo =
|
|
|
24789
24789
|
f(I), c.value = !1;
|
|
24790
24790
|
}
|
|
24791
24791
|
function f(x) {
|
|
24792
|
-
x || (x = {}), s.value = x, u.value = l.filterResponse.
|
|
24792
|
+
x || (x = {}), s.value = x, u.value = l.filterResponse.data;
|
|
24793
24793
|
const I = {
|
|
24794
24794
|
rowsPerPage: l.searchResults.limit,
|
|
24795
24795
|
rowsNumber: l.searchResults.totalCount,
|
|
@@ -25706,13 +25706,13 @@ const RF = (e, t, n, r, a, i, o) => {
|
|
|
25706
25706
|
function v(p, S) {
|
|
25707
25707
|
console.log("setResults"), i.value = !0, a.value && a.value.text != r.searchRequest.text || o.value ? (a.value = r.searchRequest, n.value = S, l = S) : l.data && (l.data = l.data.concat(S.data), n.value = l), S.totalCount > yu && mt(() => {
|
|
25708
25708
|
i.value = !1;
|
|
25709
|
-
}), r.filterResponse && r.filterResponse.
|
|
25709
|
+
}), r.filterResponse && r.filterResponse.data && (c.value = r.filterResponse.data.filter((k) => s.includes(k.name))), o.value = !1;
|
|
25710
25710
|
}
|
|
25711
25711
|
async function m(p, S) {
|
|
25712
25712
|
n.value.totalCount > yu && n.value.data.length < n.value.totalCount ? (r.searchRequest.offset = n.value.data.length, r.searchRequest.limit = yu, await r.performTextSearch(r.searchRequest), S(), i.value = !1) : i.value = !0, console.log(p);
|
|
25713
25713
|
}
|
|
25714
25714
|
async function b() {
|
|
25715
|
-
u.value = !0, c.value = r.filterResponse.
|
|
25715
|
+
u.value = !0, c.value = r.filterResponse.data, n.value = r.searchResults, u.value = !1, o.value = !0;
|
|
25716
25716
|
}
|
|
25717
25717
|
return (p, S) => {
|
|
25718
25718
|
const k = rr("q-spinner-dots"), h = rr("q-infinite-scroll");
|
|
@@ -27775,9 +27775,9 @@ const zy = (e, t) => {
|
|
|
27775
27775
|
c.value = R;
|
|
27776
27776
|
const A = R * l.value, $ = Math.min(A, I.offset);
|
|
27777
27777
|
$ > 0 ? u.value = $ / l.value + 1 : u.value = 1, r.value = I;
|
|
27778
|
-
for (let W = 0; W < a.filterResponse.
|
|
27779
|
-
a.filterResponse.
|
|
27780
|
-
o.value = a.filterResponse.
|
|
27778
|
+
for (let W = 0; W < a.filterResponse.data.length; W++)
|
|
27779
|
+
a.filterResponse.data[W].values = a.filterResponse.data[W].values.sort((Y, ee) => Y.name.localeCompare(ee.name));
|
|
27780
|
+
o.value = a.filterResponse.data, M && x(a.searchRequest), n.value = a.resultsFor;
|
|
27781
27781
|
}
|
|
27782
27782
|
async function b(I) {
|
|
27783
27783
|
const M = I.target;
|
|
@@ -27798,7 +27798,7 @@ const zy = (e, t) => {
|
|
|
27798
27798
|
s("redirectToProductDetails", I, M);
|
|
27799
27799
|
}
|
|
27800
27800
|
function T() {
|
|
27801
|
-
o.value = a.filterResponse.
|
|
27801
|
+
o.value = a.filterResponse.data, r.value = a.searchResults, x(a.searchRequest);
|
|
27802
27802
|
}
|
|
27803
27803
|
async function E(I) {
|
|
27804
27804
|
i.value = !0;
|
|
@@ -54,19 +54,21 @@ export interface FilterRequest {
|
|
|
54
54
|
inStock?: boolean;
|
|
55
55
|
}
|
|
56
56
|
export interface FilterResponse {
|
|
57
|
-
|
|
57
|
+
data: Filter[];
|
|
58
58
|
}
|
|
59
59
|
export interface Filter {
|
|
60
60
|
featureID: null;
|
|
61
61
|
name: string;
|
|
62
62
|
values: Value[];
|
|
63
63
|
type: number;
|
|
64
|
+
order: number;
|
|
64
65
|
}
|
|
65
66
|
export interface Value {
|
|
66
67
|
id: number;
|
|
67
68
|
name: string;
|
|
68
69
|
isSelected: boolean;
|
|
69
70
|
productCount: number;
|
|
71
|
+
order: number;
|
|
70
72
|
}
|
|
71
73
|
export declare class ProductConverter {
|
|
72
74
|
FromProductResult(p: ProductResult): Product;
|