@ikas/storefront 0.0.157 → 0.0.158-alpha.1
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/build/index.es.js +23 -4
- package/build/index.js +23 -4
- package/build/models/ui/product-list/index.d.ts +2 -0
- package/package.json +1 -1
package/build/index.es.js
CHANGED
|
@@ -21465,13 +21465,25 @@ var IkasProductList = /** @class */ (function () {
|
|
|
21465
21465
|
if (location.search &&
|
|
21466
21466
|
(this.isFilterable || this._type === IkasProductListType.SEARCH)) {
|
|
21467
21467
|
var queryParams = this.getQueryParams();
|
|
21468
|
-
this.getInitial(queryParams);
|
|
21468
|
+
this.getInitial(queryParams, this._page > 1);
|
|
21469
21469
|
}
|
|
21470
21470
|
else if (this._page > 1) {
|
|
21471
21471
|
this.getInitial(undefined, true);
|
|
21472
21472
|
}
|
|
21473
21473
|
}
|
|
21474
21474
|
}
|
|
21475
|
+
Object.defineProperty(IkasProductList.prototype, "id", {
|
|
21476
|
+
get: function () {
|
|
21477
|
+
var id = this._productListPropValue.id;
|
|
21478
|
+
if (this._filterCategoryId)
|
|
21479
|
+
id += this._filterCategoryId;
|
|
21480
|
+
if (this._filterBrandId)
|
|
21481
|
+
id += this._filterBrandId;
|
|
21482
|
+
return id;
|
|
21483
|
+
},
|
|
21484
|
+
enumerable: false,
|
|
21485
|
+
configurable: true
|
|
21486
|
+
});
|
|
21475
21487
|
Object.defineProperty(IkasProductList.prototype, "sort", {
|
|
21476
21488
|
get: function () {
|
|
21477
21489
|
return this._sort;
|
|
@@ -21500,6 +21512,13 @@ var IkasProductList = /** @class */ (function () {
|
|
|
21500
21512
|
enumerable: false,
|
|
21501
21513
|
configurable: true
|
|
21502
21514
|
});
|
|
21515
|
+
Object.defineProperty(IkasProductList.prototype, "minPage", {
|
|
21516
|
+
get: function () {
|
|
21517
|
+
return this._minPage || 1;
|
|
21518
|
+
},
|
|
21519
|
+
enumerable: false,
|
|
21520
|
+
configurable: true
|
|
21521
|
+
});
|
|
21503
21522
|
Object.defineProperty(IkasProductList.prototype, "count", {
|
|
21504
21523
|
get: function () {
|
|
21505
21524
|
return this._count;
|
|
@@ -21867,7 +21886,7 @@ var IkasProductList = /** @class */ (function () {
|
|
|
21867
21886
|
IkasProductList.prototype.setVisibleInfiniteScrollPage = function (page) {
|
|
21868
21887
|
//@ts-ignore
|
|
21869
21888
|
var infiniteScrollPages = IkasStorefrontConfig.store.infiniteScrollPages;
|
|
21870
|
-
infiniteScrollPages[this.
|
|
21889
|
+
infiniteScrollPages[this.id] = page;
|
|
21871
21890
|
};
|
|
21872
21891
|
IkasProductList.prototype.toJSON = function () {
|
|
21873
21892
|
return {
|
|
@@ -21892,13 +21911,13 @@ var IkasProductList = /** @class */ (function () {
|
|
|
21892
21911
|
IkasProductList.prototype.checkRestoreInfiniteScroll = function () {
|
|
21893
21912
|
//@ts-ignore
|
|
21894
21913
|
var infiniteScrollPages = IkasStorefrontConfig.store.infiniteScrollPages;
|
|
21895
|
-
var page = infiniteScrollPages[this.
|
|
21914
|
+
var page = infiniteScrollPages[this.id];
|
|
21896
21915
|
if (page) {
|
|
21897
21916
|
if (this.hasForwardRoute()) {
|
|
21898
21917
|
this._page = page;
|
|
21899
21918
|
}
|
|
21900
21919
|
else {
|
|
21901
|
-
delete infiniteScrollPages[this.
|
|
21920
|
+
delete infiniteScrollPages[this.id];
|
|
21902
21921
|
}
|
|
21903
21922
|
}
|
|
21904
21923
|
};
|
package/build/index.js
CHANGED
|
@@ -21448,13 +21448,25 @@ var IkasProductList = /** @class */ (function () {
|
|
|
21448
21448
|
if (location.search &&
|
|
21449
21449
|
(this.isFilterable || this._type === exports.IkasProductListType.SEARCH)) {
|
|
21450
21450
|
var queryParams = this.getQueryParams();
|
|
21451
|
-
this.getInitial(queryParams);
|
|
21451
|
+
this.getInitial(queryParams, this._page > 1);
|
|
21452
21452
|
}
|
|
21453
21453
|
else if (this._page > 1) {
|
|
21454
21454
|
this.getInitial(undefined, true);
|
|
21455
21455
|
}
|
|
21456
21456
|
}
|
|
21457
21457
|
}
|
|
21458
|
+
Object.defineProperty(IkasProductList.prototype, "id", {
|
|
21459
|
+
get: function () {
|
|
21460
|
+
var id = this._productListPropValue.id;
|
|
21461
|
+
if (this._filterCategoryId)
|
|
21462
|
+
id += this._filterCategoryId;
|
|
21463
|
+
if (this._filterBrandId)
|
|
21464
|
+
id += this._filterBrandId;
|
|
21465
|
+
return id;
|
|
21466
|
+
},
|
|
21467
|
+
enumerable: false,
|
|
21468
|
+
configurable: true
|
|
21469
|
+
});
|
|
21458
21470
|
Object.defineProperty(IkasProductList.prototype, "sort", {
|
|
21459
21471
|
get: function () {
|
|
21460
21472
|
return this._sort;
|
|
@@ -21483,6 +21495,13 @@ var IkasProductList = /** @class */ (function () {
|
|
|
21483
21495
|
enumerable: false,
|
|
21484
21496
|
configurable: true
|
|
21485
21497
|
});
|
|
21498
|
+
Object.defineProperty(IkasProductList.prototype, "minPage", {
|
|
21499
|
+
get: function () {
|
|
21500
|
+
return this._minPage || 1;
|
|
21501
|
+
},
|
|
21502
|
+
enumerable: false,
|
|
21503
|
+
configurable: true
|
|
21504
|
+
});
|
|
21486
21505
|
Object.defineProperty(IkasProductList.prototype, "count", {
|
|
21487
21506
|
get: function () {
|
|
21488
21507
|
return this._count;
|
|
@@ -21850,7 +21869,7 @@ var IkasProductList = /** @class */ (function () {
|
|
|
21850
21869
|
IkasProductList.prototype.setVisibleInfiniteScrollPage = function (page) {
|
|
21851
21870
|
//@ts-ignore
|
|
21852
21871
|
var infiniteScrollPages = IkasStorefrontConfig.store.infiniteScrollPages;
|
|
21853
|
-
infiniteScrollPages[this.
|
|
21872
|
+
infiniteScrollPages[this.id] = page;
|
|
21854
21873
|
};
|
|
21855
21874
|
IkasProductList.prototype.toJSON = function () {
|
|
21856
21875
|
return {
|
|
@@ -21875,13 +21894,13 @@ var IkasProductList = /** @class */ (function () {
|
|
|
21875
21894
|
IkasProductList.prototype.checkRestoreInfiniteScroll = function () {
|
|
21876
21895
|
//@ts-ignore
|
|
21877
21896
|
var infiniteScrollPages = IkasStorefrontConfig.store.infiniteScrollPages;
|
|
21878
|
-
var page = infiniteScrollPages[this.
|
|
21897
|
+
var page = infiniteScrollPages[this.id];
|
|
21879
21898
|
if (page) {
|
|
21880
21899
|
if (this.hasForwardRoute()) {
|
|
21881
21900
|
this._page = page;
|
|
21882
21901
|
}
|
|
21883
21902
|
else {
|
|
21884
|
-
delete infiniteScrollPages[this.
|
|
21903
|
+
delete infiniteScrollPages[this.id];
|
|
21885
21904
|
}
|
|
21886
21905
|
}
|
|
21887
21906
|
};
|
|
@@ -24,10 +24,12 @@ export declare class IkasProductList {
|
|
|
24
24
|
private _fetchRequestTime;
|
|
25
25
|
private router?;
|
|
26
26
|
constructor(data: IkasProductListParams, router?: NextRouter);
|
|
27
|
+
private get id();
|
|
27
28
|
get sort(): IkasProductListSortType;
|
|
28
29
|
get limit(): number;
|
|
29
30
|
get pageType(): IkasThemePageType;
|
|
30
31
|
get page(): number;
|
|
32
|
+
get minPage(): number;
|
|
31
33
|
get count(): number;
|
|
32
34
|
get pageCount(): number;
|
|
33
35
|
get searchKeyword(): string;
|