@ikas/storefront 0.0.150 → 0.0.151
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 +30 -47
- package/build/index.js +30 -47
- package/build/models/data/blog/index.d.ts +10 -10
- package/build/models/ui/product-list/index.d.ts +0 -3
- package/build/store/base.d.ts +0 -1
- package/package.json +1 -1
package/build/index.es.js
CHANGED
|
@@ -21138,7 +21138,7 @@ var IkasProductList = /** @class */ (function () {
|
|
|
21138
21138
|
_b.label = 1;
|
|
21139
21139
|
case 1:
|
|
21140
21140
|
_b.trys.push([1, 5, 6, 7]);
|
|
21141
|
-
page =
|
|
21141
|
+
page = 1;
|
|
21142
21142
|
limit = this._limit;
|
|
21143
21143
|
if (!(this.isFilterable && !this.filters)) return [3 /*break*/, 3];
|
|
21144
21144
|
return [4 /*yield*/, this.getFilters()];
|
|
@@ -21271,8 +21271,6 @@ var IkasProductList = /** @class */ (function () {
|
|
|
21271
21271
|
this.data = this.data.concat(data);
|
|
21272
21272
|
this._count = response.count;
|
|
21273
21273
|
this._page = this.page + 1;
|
|
21274
|
-
//@ts-ignore
|
|
21275
|
-
IkasStorefrontConfig.store.infiniteScrollPages[this._pageType] = this._page;
|
|
21276
21274
|
return [3 /*break*/, 5];
|
|
21277
21275
|
case 3:
|
|
21278
21276
|
err_3 = _a.sent();
|
|
@@ -21362,9 +21360,6 @@ var IkasProductList = /** @class */ (function () {
|
|
|
21362
21360
|
: null;
|
|
21363
21361
|
this.router = router;
|
|
21364
21362
|
makeAutoObservable(this);
|
|
21365
|
-
if (this.isBrowser()) {
|
|
21366
|
-
this.checkRestoreInfiniteScroll();
|
|
21367
|
-
}
|
|
21368
21363
|
if (this.isBrowser() &&
|
|
21369
21364
|
location.search &&
|
|
21370
21365
|
(this.isFilterable || this._type === IkasProductListType.SEARCH)) {
|
|
@@ -21386,13 +21381,6 @@ var IkasProductList = /** @class */ (function () {
|
|
|
21386
21381
|
enumerable: false,
|
|
21387
21382
|
configurable: true
|
|
21388
21383
|
});
|
|
21389
|
-
Object.defineProperty(IkasProductList.prototype, "pageType", {
|
|
21390
|
-
get: function () {
|
|
21391
|
-
return this._pageType;
|
|
21392
|
-
},
|
|
21393
|
-
enumerable: false,
|
|
21394
|
-
configurable: true
|
|
21395
|
-
});
|
|
21396
21384
|
Object.defineProperty(IkasProductList.prototype, "page", {
|
|
21397
21385
|
get: function () {
|
|
21398
21386
|
return this._page;
|
|
@@ -21784,22 +21772,6 @@ var IkasProductList = /** @class */ (function () {
|
|
|
21784
21772
|
productListPropValue: this._productListPropValue,
|
|
21785
21773
|
};
|
|
21786
21774
|
};
|
|
21787
|
-
IkasProductList.prototype.checkRestoreInfiniteScroll = function () {
|
|
21788
|
-
//@ts-ignore
|
|
21789
|
-
var infiniteScrollPages = IkasStorefrontConfig.store.infiniteScrollPages;
|
|
21790
|
-
var page = infiniteScrollPages[this._pageType];
|
|
21791
|
-
if (page) {
|
|
21792
|
-
if (this.hasForwardRoute()) {
|
|
21793
|
-
this._page = page;
|
|
21794
|
-
}
|
|
21795
|
-
else {
|
|
21796
|
-
delete infiniteScrollPages[this._pageType];
|
|
21797
|
-
}
|
|
21798
|
-
}
|
|
21799
|
-
};
|
|
21800
|
-
IkasProductList.prototype.hasForwardRoute = function () {
|
|
21801
|
-
return this.isBrowser() && !!window.history.forward;
|
|
21802
|
-
};
|
|
21803
21775
|
IkasProductList.prototype.getQueryParams = function () {
|
|
21804
21776
|
if (!this.isBrowser())
|
|
21805
21777
|
return;
|
|
@@ -26009,8 +25981,8 @@ var IkasBlog = /** @class */ (function () {
|
|
|
26009
25981
|
if (data === void 0) { data = {}; }
|
|
26010
25982
|
var _a;
|
|
26011
25983
|
this.id = data.id || Date.now() + "";
|
|
26012
|
-
this.createdAt = data.createdAt || Date.now()
|
|
26013
|
-
this.updatedAt = data.updatedAt || Date.now()
|
|
25984
|
+
this.createdAt = data.createdAt || Date.now();
|
|
25985
|
+
this.updatedAt = data.updatedAt || Date.now();
|
|
26014
25986
|
this.categoryId = data.categoryId || null;
|
|
26015
25987
|
this.category = data.category ? new IkasBlogCategory(data.category) : null;
|
|
26016
25988
|
this.imageId = data.imageId || null;
|
|
@@ -26046,8 +26018,8 @@ var IkasBlogContent = /** @class */ (function () {
|
|
|
26046
26018
|
function IkasBlogContent(data) {
|
|
26047
26019
|
if (data === void 0) { data = {}; }
|
|
26048
26020
|
this.id = data.id || Date.now() + "";
|
|
26049
|
-
this.createdAt = data.createdAt || Date.now()
|
|
26050
|
-
this.updatedAt = data.updatedAt || Date.now()
|
|
26021
|
+
this.createdAt = data.createdAt || Date.now();
|
|
26022
|
+
this.updatedAt = data.updatedAt || Date.now();
|
|
26051
26023
|
this.content = data.content || "";
|
|
26052
26024
|
makeAutoObservable(this);
|
|
26053
26025
|
}
|
|
@@ -26073,8 +26045,8 @@ var IkasBlogMetaData = /** @class */ (function () {
|
|
|
26073
26045
|
this.pageTitle = null;
|
|
26074
26046
|
this.description = null;
|
|
26075
26047
|
this.id = data.id || Date.now() + "";
|
|
26076
|
-
this.createdAt = data.createdAt || Date.now()
|
|
26077
|
-
this.updatedAt = data.updatedAt || Date.now()
|
|
26048
|
+
this.createdAt = data.createdAt || Date.now();
|
|
26049
|
+
this.updatedAt = data.updatedAt || Date.now();
|
|
26078
26050
|
this.description = data.description || "";
|
|
26079
26051
|
this.pageTitle = data.pageTitle || "";
|
|
26080
26052
|
this.slug = data.slug || "";
|
|
@@ -26088,8 +26060,8 @@ var IkasBlogCategory = /** @class */ (function () {
|
|
|
26088
26060
|
function IkasBlogCategory(data) {
|
|
26089
26061
|
if (data === void 0) { data = {}; }
|
|
26090
26062
|
this.id = data.id || "";
|
|
26091
|
-
this.createdAt = data.createdAt || Date.now()
|
|
26092
|
-
this.updatedAt = data.updatedAt || Date.now()
|
|
26063
|
+
this.createdAt = data.createdAt || Date.now();
|
|
26064
|
+
this.updatedAt = data.updatedAt || Date.now();
|
|
26093
26065
|
this.deleted = data.deleted || false;
|
|
26094
26066
|
this.name = data.name || "";
|
|
26095
26067
|
this.imageId = data.imageId || "";
|
|
@@ -26112,8 +26084,8 @@ var IkasBlogTag = /** @class */ (function () {
|
|
|
26112
26084
|
function IkasBlogTag(data) {
|
|
26113
26085
|
if (data === void 0) { data = {}; }
|
|
26114
26086
|
this.id = data.id || Date.now() + "";
|
|
26115
|
-
this.createdAt = data.createdAt || Date.now()
|
|
26116
|
-
this.updatedAt = data.updatedAt || Date.now()
|
|
26087
|
+
this.createdAt = data.createdAt || Date.now();
|
|
26088
|
+
this.updatedAt = data.updatedAt || Date.now();
|
|
26117
26089
|
this.deleted = data.deleted || false;
|
|
26118
26090
|
this.name = data.name || "";
|
|
26119
26091
|
makeAutoObservable(this);
|
|
@@ -26130,7 +26102,7 @@ var IkasBlogAPI = /** @class */ (function () {
|
|
|
26130
26102
|
return __generator(this, function (_b) {
|
|
26131
26103
|
switch (_b.label) {
|
|
26132
26104
|
case 0:
|
|
26133
|
-
QUERY = src(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n query listBlog(\n $id: StringFilterInput\n $categoryId: StringFilterInput\n $pagination: PaginationInput\n $storefrontId: StringFilterInput\n $tagId: StringFilterInput\n $title: StringFilterInput\n ) {\n listBlog(\n id: $id\n categoryId: $categoryId\n pagination: $pagination\n storefrontId: $storefrontId\n tagId: $tagId\n title: $title\n ) {\n count\n data {\n title\n categoryId\n category {\n createdAt\n deleted\n id\n
|
|
26105
|
+
QUERY = src(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n query listBlog(\n $id: StringFilterInput\n $categoryId: StringFilterInput\n $pagination: PaginationInput\n $storefrontId: StringFilterInput\n $tagId: StringFilterInput\n $title: StringFilterInput\n ) {\n listBlog(\n id: $id\n categoryId: $categoryId\n pagination: $pagination\n storefrontId: $storefrontId\n tagId: $tagId\n title: $title\n ) {\n count\n data {\n title\n categoryId\n category {\n createdAt\n updatedAt\n deleted\n id\n name\n imageId\n metadata {\n createdAt\n deleted\n description\n id\n pageTitle\n slug\n targetId\n targetType\n updatedAt\n }\n }\n tags {\n createdAt\n id\n name\n deleted\n updatedAt\n }\n createdAt\n deleted\n id\n imageId\n isPublished\n metadata {\n createdAt\n deleted\n description\n id\n pageTitle\n slug\n targetId\n targetType\n updatedAt\n }\n writer {\n firstName\n lastName\n }\n publishedAt\n shortDescription\n storefrontId\n tagIds\n updatedAt\n }\n hasNext\n limit\n page\n }\n }\n "], ["\n query listBlog(\n $id: StringFilterInput\n $categoryId: StringFilterInput\n $pagination: PaginationInput\n $storefrontId: StringFilterInput\n $tagId: StringFilterInput\n $title: StringFilterInput\n ) {\n listBlog(\n id: $id\n categoryId: $categoryId\n pagination: $pagination\n storefrontId: $storefrontId\n tagId: $tagId\n title: $title\n ) {\n count\n data {\n title\n categoryId\n category {\n createdAt\n updatedAt\n deleted\n id\n name\n imageId\n metadata {\n createdAt\n deleted\n description\n id\n pageTitle\n slug\n targetId\n targetType\n updatedAt\n }\n }\n tags {\n createdAt\n id\n name\n deleted\n updatedAt\n }\n createdAt\n deleted\n id\n imageId\n isPublished\n metadata {\n createdAt\n deleted\n description\n id\n pageTitle\n slug\n targetId\n targetType\n updatedAt\n }\n writer {\n firstName\n lastName\n }\n publishedAt\n shortDescription\n storefrontId\n tagIds\n updatedAt\n }\n hasNext\n limit\n page\n }\n }\n "])));
|
|
26134
26106
|
_b.label = 1;
|
|
26135
26107
|
case 1:
|
|
26136
26108
|
_b.trys.push([1, 3, , 4]);
|
|
@@ -26182,7 +26154,7 @@ var IkasBlogAPI = /** @class */ (function () {
|
|
|
26182
26154
|
return __generator(this, function (_b) {
|
|
26183
26155
|
switch (_b.label) {
|
|
26184
26156
|
case 0:
|
|
26185
|
-
QUERY = src(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n query getBlog(\n $id: StringFilterInput\n $pagination: PaginationInput\n $storefrontId: StringFilterInput\n ) {\n listBlog(\n id: $id\n pagination: $pagination\n storefrontId: $storefrontId\n ) {\n count\n data {\n title\n blogContent {\n content\n createdAt\n deleted\n id\n updatedAt\n }\n categoryId\n category {\n createdAt\n deleted\n id\n imageId\n metadata {\n createdAt\n deleted\n description\n id\n pageTitle\n slug\n targetId\n targetType\n updatedAt\n }\n }\n createdAt\n deleted\n id\n imageId\n isPublished\n metadata {\n createdAt\n deleted\n description\n id\n pageTitle\n slug\n targetId\n targetType\n updatedAt\n }\n writer {\n firstName\n lastName\n }\n publishedAt\n shortDescription\n storefrontId\n tagIds\n updatedAt\n }\n hasNext\n limit\n page\n }\n }\n "], ["\n query getBlog(\n $id: StringFilterInput\n $pagination: PaginationInput\n $storefrontId: StringFilterInput\n ) {\n listBlog(\n id: $id\n pagination: $pagination\n storefrontId: $storefrontId\n ) {\n count\n data {\n title\n blogContent {\n content\n createdAt\n deleted\n id\n updatedAt\n }\n categoryId\n category {\n createdAt\n deleted\n id\n imageId\n metadata {\n createdAt\n deleted\n description\n id\n pageTitle\n slug\n targetId\n targetType\n updatedAt\n }\n }\n createdAt\n deleted\n id\n imageId\n isPublished\n metadata {\n createdAt\n deleted\n description\n id\n pageTitle\n slug\n targetId\n targetType\n updatedAt\n }\n writer {\n firstName\n lastName\n }\n publishedAt\n shortDescription\n storefrontId\n tagIds\n updatedAt\n }\n hasNext\n limit\n page\n }\n }\n "])));
|
|
26157
|
+
QUERY = src(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n query getBlog(\n $id: StringFilterInput\n $pagination: PaginationInput\n $storefrontId: StringFilterInput\n ) {\n listBlog(\n id: $id\n pagination: $pagination\n storefrontId: $storefrontId\n ) {\n count\n data {\n title\n blogContent {\n content\n createdAt\n deleted\n id\n updatedAt\n }\n categoryId\n category {\n createdAt\n updatedAt\n deleted\n id\n name\n imageId\n metadata {\n createdAt\n deleted\n description\n id\n pageTitle\n slug\n targetId\n targetType\n updatedAt\n }\n }\n createdAt\n deleted\n id\n imageId\n isPublished\n metadata {\n createdAt\n deleted\n description\n id\n pageTitle\n slug\n targetId\n targetType\n updatedAt\n }\n writer {\n firstName\n lastName\n }\n publishedAt\n shortDescription\n storefrontId\n tagIds\n updatedAt\n }\n hasNext\n limit\n page\n }\n }\n "], ["\n query getBlog(\n $id: StringFilterInput\n $pagination: PaginationInput\n $storefrontId: StringFilterInput\n ) {\n listBlog(\n id: $id\n pagination: $pagination\n storefrontId: $storefrontId\n ) {\n count\n data {\n title\n blogContent {\n content\n createdAt\n deleted\n id\n updatedAt\n }\n categoryId\n category {\n createdAt\n updatedAt\n deleted\n id\n name\n imageId\n metadata {\n createdAt\n deleted\n description\n id\n pageTitle\n slug\n targetId\n targetType\n updatedAt\n }\n }\n createdAt\n deleted\n id\n imageId\n isPublished\n metadata {\n createdAt\n deleted\n description\n id\n pageTitle\n slug\n targetId\n targetType\n updatedAt\n }\n writer {\n firstName\n lastName\n }\n publishedAt\n shortDescription\n storefrontId\n tagIds\n updatedAt\n }\n hasNext\n limit\n page\n }\n }\n "])));
|
|
26186
26158
|
_b.label = 1;
|
|
26187
26159
|
case 1:
|
|
26188
26160
|
_b.trys.push([1, 3, , 4]);
|
|
@@ -29979,15 +29951,21 @@ var PageViewModel = /** @class */ (function () {
|
|
|
29979
29951
|
this.getPagePropValues = function () { return __awaiter(_this, void 0, void 0, function () {
|
|
29980
29952
|
var pageDataProvider;
|
|
29981
29953
|
var _this = this;
|
|
29982
|
-
var _a;
|
|
29983
|
-
return __generator(this, function (
|
|
29984
|
-
switch (
|
|
29954
|
+
var _a, _b, _c;
|
|
29955
|
+
return __generator(this, function (_d) {
|
|
29956
|
+
switch (_d.label) {
|
|
29985
29957
|
case 0:
|
|
29986
29958
|
pageDataProvider = new IkasPageDataProvider(this.theme, this.pageParams, (_a = this.page) === null || _a === void 0 ? void 0 : _a.type);
|
|
29959
|
+
if (((_b = this.pageParams) === null || _b === void 0 ? void 0 : _b.blogId) || ((_c = this.pageParams) === null || _c === void 0 ? void 0 : _c.blogCategoryId)) {
|
|
29960
|
+
pageDataProvider.possiblePageTypes = [
|
|
29961
|
+
IkasThemePageType.BLOG,
|
|
29962
|
+
IkasThemePageType.BLOG_CATEGORY,
|
|
29963
|
+
];
|
|
29964
|
+
}
|
|
29987
29965
|
this.isLoading = true;
|
|
29988
29966
|
return [4 /*yield*/, pageDataProvider.getPageData()];
|
|
29989
29967
|
case 1:
|
|
29990
|
-
|
|
29968
|
+
_d.sent();
|
|
29991
29969
|
pageDataProvider.pageComponentPropValues = IkasPageDataProvider.initPropValues(JSON.stringify(pageDataProvider.pageComponentPropValues), this.router, JSON.stringify(this.theme.settings));
|
|
29992
29970
|
runInAction(function () {
|
|
29993
29971
|
_this.pageDataProvider = pageDataProvider;
|
|
@@ -30172,7 +30150,7 @@ var PageViewModel = /** @class */ (function () {
|
|
|
30172
30150
|
Object.defineProperty(PageViewModel.prototype, "specification", {
|
|
30173
30151
|
get: function () {
|
|
30174
30152
|
var _this = this;
|
|
30175
|
-
var _a, _b, _c;
|
|
30153
|
+
var _a, _b, _c, _d, _e;
|
|
30176
30154
|
var selectedPage = this.page;
|
|
30177
30155
|
var specification;
|
|
30178
30156
|
if ((selectedPage === null || selectedPage === void 0 ? void 0 : selectedPage.type) === IkasThemePageType.PRODUCT) {
|
|
@@ -30184,6 +30162,12 @@ var PageViewModel = /** @class */ (function () {
|
|
|
30184
30162
|
if ((selectedPage === null || selectedPage === void 0 ? void 0 : selectedPage.type) === IkasThemePageType.BRAND) {
|
|
30185
30163
|
specification = (_c = selectedPage.specifications) === null || _c === void 0 ? void 0 : _c.find(function (s) { var _a; return s.id === ((_a = _this.pageParams) === null || _a === void 0 ? void 0 : _a.brandId); });
|
|
30186
30164
|
}
|
|
30165
|
+
if ((selectedPage === null || selectedPage === void 0 ? void 0 : selectedPage.type) === IkasThemePageType.BLOG) {
|
|
30166
|
+
specification = (_d = selectedPage.specifications) === null || _d === void 0 ? void 0 : _d.find(function (s) { var _a; return s.id === ((_a = _this.pageParams) === null || _a === void 0 ? void 0 : _a.blogId); });
|
|
30167
|
+
}
|
|
30168
|
+
if ((selectedPage === null || selectedPage === void 0 ? void 0 : selectedPage.type) === IkasThemePageType.BLOG_CATEGORY) {
|
|
30169
|
+
specification = (_e = selectedPage.specifications) === null || _e === void 0 ? void 0 : _e.find(function (s) { var _a; return s.id === ((_a = _this.pageParams) === null || _a === void 0 ? void 0 : _a.blogCategoryId); });
|
|
30170
|
+
}
|
|
30187
30171
|
return specification;
|
|
30188
30172
|
},
|
|
30189
30173
|
enumerable: false,
|
|
@@ -31393,7 +31377,6 @@ var IkasBaseStore = /** @class */ (function () {
|
|
|
31393
31377
|
this.showLocaleOptions = false;
|
|
31394
31378
|
this.localeChecked = false;
|
|
31395
31379
|
this.settingsSet = false;
|
|
31396
|
-
this.infiniteScrollPages = {}; // key is pageType
|
|
31397
31380
|
this.customerStore = new IkasCustomerStore(this);
|
|
31398
31381
|
this.cartStore = new IkasCartStore(this);
|
|
31399
31382
|
makeObservable(this, {
|
package/build/index.js
CHANGED
|
@@ -21121,7 +21121,7 @@ var IkasProductList = /** @class */ (function () {
|
|
|
21121
21121
|
_b.label = 1;
|
|
21122
21122
|
case 1:
|
|
21123
21123
|
_b.trys.push([1, 5, 6, 7]);
|
|
21124
|
-
page =
|
|
21124
|
+
page = 1;
|
|
21125
21125
|
limit = this._limit;
|
|
21126
21126
|
if (!(this.isFilterable && !this.filters)) return [3 /*break*/, 3];
|
|
21127
21127
|
return [4 /*yield*/, this.getFilters()];
|
|
@@ -21254,8 +21254,6 @@ var IkasProductList = /** @class */ (function () {
|
|
|
21254
21254
|
this.data = this.data.concat(data);
|
|
21255
21255
|
this._count = response.count;
|
|
21256
21256
|
this._page = this.page + 1;
|
|
21257
|
-
//@ts-ignore
|
|
21258
|
-
IkasStorefrontConfig.store.infiniteScrollPages[this._pageType] = this._page;
|
|
21259
21257
|
return [3 /*break*/, 5];
|
|
21260
21258
|
case 3:
|
|
21261
21259
|
err_3 = _a.sent();
|
|
@@ -21345,9 +21343,6 @@ var IkasProductList = /** @class */ (function () {
|
|
|
21345
21343
|
: null;
|
|
21346
21344
|
this.router = router;
|
|
21347
21345
|
mobx.makeAutoObservable(this);
|
|
21348
|
-
if (this.isBrowser()) {
|
|
21349
|
-
this.checkRestoreInfiniteScroll();
|
|
21350
|
-
}
|
|
21351
21346
|
if (this.isBrowser() &&
|
|
21352
21347
|
location.search &&
|
|
21353
21348
|
(this.isFilterable || this._type === exports.IkasProductListType.SEARCH)) {
|
|
@@ -21369,13 +21364,6 @@ var IkasProductList = /** @class */ (function () {
|
|
|
21369
21364
|
enumerable: false,
|
|
21370
21365
|
configurable: true
|
|
21371
21366
|
});
|
|
21372
|
-
Object.defineProperty(IkasProductList.prototype, "pageType", {
|
|
21373
|
-
get: function () {
|
|
21374
|
-
return this._pageType;
|
|
21375
|
-
},
|
|
21376
|
-
enumerable: false,
|
|
21377
|
-
configurable: true
|
|
21378
|
-
});
|
|
21379
21367
|
Object.defineProperty(IkasProductList.prototype, "page", {
|
|
21380
21368
|
get: function () {
|
|
21381
21369
|
return this._page;
|
|
@@ -21767,22 +21755,6 @@ var IkasProductList = /** @class */ (function () {
|
|
|
21767
21755
|
productListPropValue: this._productListPropValue,
|
|
21768
21756
|
};
|
|
21769
21757
|
};
|
|
21770
|
-
IkasProductList.prototype.checkRestoreInfiniteScroll = function () {
|
|
21771
|
-
//@ts-ignore
|
|
21772
|
-
var infiniteScrollPages = IkasStorefrontConfig.store.infiniteScrollPages;
|
|
21773
|
-
var page = infiniteScrollPages[this._pageType];
|
|
21774
|
-
if (page) {
|
|
21775
|
-
if (this.hasForwardRoute()) {
|
|
21776
|
-
this._page = page;
|
|
21777
|
-
}
|
|
21778
|
-
else {
|
|
21779
|
-
delete infiniteScrollPages[this._pageType];
|
|
21780
|
-
}
|
|
21781
|
-
}
|
|
21782
|
-
};
|
|
21783
|
-
IkasProductList.prototype.hasForwardRoute = function () {
|
|
21784
|
-
return this.isBrowser() && !!window.history.forward;
|
|
21785
|
-
};
|
|
21786
21758
|
IkasProductList.prototype.getQueryParams = function () {
|
|
21787
21759
|
if (!this.isBrowser())
|
|
21788
21760
|
return;
|
|
@@ -25989,8 +25961,8 @@ var IkasBlog = /** @class */ (function () {
|
|
|
25989
25961
|
if (data === void 0) { data = {}; }
|
|
25990
25962
|
var _a;
|
|
25991
25963
|
this.id = data.id || Date.now() + "";
|
|
25992
|
-
this.createdAt = data.createdAt || Date.now()
|
|
25993
|
-
this.updatedAt = data.updatedAt || Date.now()
|
|
25964
|
+
this.createdAt = data.createdAt || Date.now();
|
|
25965
|
+
this.updatedAt = data.updatedAt || Date.now();
|
|
25994
25966
|
this.categoryId = data.categoryId || null;
|
|
25995
25967
|
this.category = data.category ? new IkasBlogCategory(data.category) : null;
|
|
25996
25968
|
this.imageId = data.imageId || null;
|
|
@@ -26026,8 +25998,8 @@ var IkasBlogContent = /** @class */ (function () {
|
|
|
26026
25998
|
function IkasBlogContent(data) {
|
|
26027
25999
|
if (data === void 0) { data = {}; }
|
|
26028
26000
|
this.id = data.id || Date.now() + "";
|
|
26029
|
-
this.createdAt = data.createdAt || Date.now()
|
|
26030
|
-
this.updatedAt = data.updatedAt || Date.now()
|
|
26001
|
+
this.createdAt = data.createdAt || Date.now();
|
|
26002
|
+
this.updatedAt = data.updatedAt || Date.now();
|
|
26031
26003
|
this.content = data.content || "";
|
|
26032
26004
|
mobx.makeAutoObservable(this);
|
|
26033
26005
|
}
|
|
@@ -26052,8 +26024,8 @@ var IkasBlogMetaData = /** @class */ (function () {
|
|
|
26052
26024
|
this.pageTitle = null;
|
|
26053
26025
|
this.description = null;
|
|
26054
26026
|
this.id = data.id || Date.now() + "";
|
|
26055
|
-
this.createdAt = data.createdAt || Date.now()
|
|
26056
|
-
this.updatedAt = data.updatedAt || Date.now()
|
|
26027
|
+
this.createdAt = data.createdAt || Date.now();
|
|
26028
|
+
this.updatedAt = data.updatedAt || Date.now();
|
|
26057
26029
|
this.description = data.description || "";
|
|
26058
26030
|
this.pageTitle = data.pageTitle || "";
|
|
26059
26031
|
this.slug = data.slug || "";
|
|
@@ -26067,8 +26039,8 @@ var IkasBlogCategory = /** @class */ (function () {
|
|
|
26067
26039
|
function IkasBlogCategory(data) {
|
|
26068
26040
|
if (data === void 0) { data = {}; }
|
|
26069
26041
|
this.id = data.id || "";
|
|
26070
|
-
this.createdAt = data.createdAt || Date.now()
|
|
26071
|
-
this.updatedAt = data.updatedAt || Date.now()
|
|
26042
|
+
this.createdAt = data.createdAt || Date.now();
|
|
26043
|
+
this.updatedAt = data.updatedAt || Date.now();
|
|
26072
26044
|
this.deleted = data.deleted || false;
|
|
26073
26045
|
this.name = data.name || "";
|
|
26074
26046
|
this.imageId = data.imageId || "";
|
|
@@ -26091,8 +26063,8 @@ var IkasBlogTag = /** @class */ (function () {
|
|
|
26091
26063
|
function IkasBlogTag(data) {
|
|
26092
26064
|
if (data === void 0) { data = {}; }
|
|
26093
26065
|
this.id = data.id || Date.now() + "";
|
|
26094
|
-
this.createdAt = data.createdAt || Date.now()
|
|
26095
|
-
this.updatedAt = data.updatedAt || Date.now()
|
|
26066
|
+
this.createdAt = data.createdAt || Date.now();
|
|
26067
|
+
this.updatedAt = data.updatedAt || Date.now();
|
|
26096
26068
|
this.deleted = data.deleted || false;
|
|
26097
26069
|
this.name = data.name || "";
|
|
26098
26070
|
mobx.makeAutoObservable(this);
|
|
@@ -26109,7 +26081,7 @@ var IkasBlogAPI = /** @class */ (function () {
|
|
|
26109
26081
|
return __generator(this, function (_b) {
|
|
26110
26082
|
switch (_b.label) {
|
|
26111
26083
|
case 0:
|
|
26112
|
-
QUERY = src(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n query listBlog(\n $id: StringFilterInput\n $categoryId: StringFilterInput\n $pagination: PaginationInput\n $storefrontId: StringFilterInput\n $tagId: StringFilterInput\n $title: StringFilterInput\n ) {\n listBlog(\n id: $id\n categoryId: $categoryId\n pagination: $pagination\n storefrontId: $storefrontId\n tagId: $tagId\n title: $title\n ) {\n count\n data {\n title\n categoryId\n category {\n createdAt\n deleted\n id\n
|
|
26084
|
+
QUERY = src(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n query listBlog(\n $id: StringFilterInput\n $categoryId: StringFilterInput\n $pagination: PaginationInput\n $storefrontId: StringFilterInput\n $tagId: StringFilterInput\n $title: StringFilterInput\n ) {\n listBlog(\n id: $id\n categoryId: $categoryId\n pagination: $pagination\n storefrontId: $storefrontId\n tagId: $tagId\n title: $title\n ) {\n count\n data {\n title\n categoryId\n category {\n createdAt\n updatedAt\n deleted\n id\n name\n imageId\n metadata {\n createdAt\n deleted\n description\n id\n pageTitle\n slug\n targetId\n targetType\n updatedAt\n }\n }\n tags {\n createdAt\n id\n name\n deleted\n updatedAt\n }\n createdAt\n deleted\n id\n imageId\n isPublished\n metadata {\n createdAt\n deleted\n description\n id\n pageTitle\n slug\n targetId\n targetType\n updatedAt\n }\n writer {\n firstName\n lastName\n }\n publishedAt\n shortDescription\n storefrontId\n tagIds\n updatedAt\n }\n hasNext\n limit\n page\n }\n }\n "], ["\n query listBlog(\n $id: StringFilterInput\n $categoryId: StringFilterInput\n $pagination: PaginationInput\n $storefrontId: StringFilterInput\n $tagId: StringFilterInput\n $title: StringFilterInput\n ) {\n listBlog(\n id: $id\n categoryId: $categoryId\n pagination: $pagination\n storefrontId: $storefrontId\n tagId: $tagId\n title: $title\n ) {\n count\n data {\n title\n categoryId\n category {\n createdAt\n updatedAt\n deleted\n id\n name\n imageId\n metadata {\n createdAt\n deleted\n description\n id\n pageTitle\n slug\n targetId\n targetType\n updatedAt\n }\n }\n tags {\n createdAt\n id\n name\n deleted\n updatedAt\n }\n createdAt\n deleted\n id\n imageId\n isPublished\n metadata {\n createdAt\n deleted\n description\n id\n pageTitle\n slug\n targetId\n targetType\n updatedAt\n }\n writer {\n firstName\n lastName\n }\n publishedAt\n shortDescription\n storefrontId\n tagIds\n updatedAt\n }\n hasNext\n limit\n page\n }\n }\n "])));
|
|
26113
26085
|
_b.label = 1;
|
|
26114
26086
|
case 1:
|
|
26115
26087
|
_b.trys.push([1, 3, , 4]);
|
|
@@ -26161,7 +26133,7 @@ var IkasBlogAPI = /** @class */ (function () {
|
|
|
26161
26133
|
return __generator(this, function (_b) {
|
|
26162
26134
|
switch (_b.label) {
|
|
26163
26135
|
case 0:
|
|
26164
|
-
QUERY = src(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n query getBlog(\n $id: StringFilterInput\n $pagination: PaginationInput\n $storefrontId: StringFilterInput\n ) {\n listBlog(\n id: $id\n pagination: $pagination\n storefrontId: $storefrontId\n ) {\n count\n data {\n title\n blogContent {\n content\n createdAt\n deleted\n id\n updatedAt\n }\n categoryId\n category {\n createdAt\n deleted\n id\n imageId\n metadata {\n createdAt\n deleted\n description\n id\n pageTitle\n slug\n targetId\n targetType\n updatedAt\n }\n }\n createdAt\n deleted\n id\n imageId\n isPublished\n metadata {\n createdAt\n deleted\n description\n id\n pageTitle\n slug\n targetId\n targetType\n updatedAt\n }\n writer {\n firstName\n lastName\n }\n publishedAt\n shortDescription\n storefrontId\n tagIds\n updatedAt\n }\n hasNext\n limit\n page\n }\n }\n "], ["\n query getBlog(\n $id: StringFilterInput\n $pagination: PaginationInput\n $storefrontId: StringFilterInput\n ) {\n listBlog(\n id: $id\n pagination: $pagination\n storefrontId: $storefrontId\n ) {\n count\n data {\n title\n blogContent {\n content\n createdAt\n deleted\n id\n updatedAt\n }\n categoryId\n category {\n createdAt\n deleted\n id\n imageId\n metadata {\n createdAt\n deleted\n description\n id\n pageTitle\n slug\n targetId\n targetType\n updatedAt\n }\n }\n createdAt\n deleted\n id\n imageId\n isPublished\n metadata {\n createdAt\n deleted\n description\n id\n pageTitle\n slug\n targetId\n targetType\n updatedAt\n }\n writer {\n firstName\n lastName\n }\n publishedAt\n shortDescription\n storefrontId\n tagIds\n updatedAt\n }\n hasNext\n limit\n page\n }\n }\n "])));
|
|
26136
|
+
QUERY = src(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n query getBlog(\n $id: StringFilterInput\n $pagination: PaginationInput\n $storefrontId: StringFilterInput\n ) {\n listBlog(\n id: $id\n pagination: $pagination\n storefrontId: $storefrontId\n ) {\n count\n data {\n title\n blogContent {\n content\n createdAt\n deleted\n id\n updatedAt\n }\n categoryId\n category {\n createdAt\n updatedAt\n deleted\n id\n name\n imageId\n metadata {\n createdAt\n deleted\n description\n id\n pageTitle\n slug\n targetId\n targetType\n updatedAt\n }\n }\n createdAt\n deleted\n id\n imageId\n isPublished\n metadata {\n createdAt\n deleted\n description\n id\n pageTitle\n slug\n targetId\n targetType\n updatedAt\n }\n writer {\n firstName\n lastName\n }\n publishedAt\n shortDescription\n storefrontId\n tagIds\n updatedAt\n }\n hasNext\n limit\n page\n }\n }\n "], ["\n query getBlog(\n $id: StringFilterInput\n $pagination: PaginationInput\n $storefrontId: StringFilterInput\n ) {\n listBlog(\n id: $id\n pagination: $pagination\n storefrontId: $storefrontId\n ) {\n count\n data {\n title\n blogContent {\n content\n createdAt\n deleted\n id\n updatedAt\n }\n categoryId\n category {\n createdAt\n updatedAt\n deleted\n id\n name\n imageId\n metadata {\n createdAt\n deleted\n description\n id\n pageTitle\n slug\n targetId\n targetType\n updatedAt\n }\n }\n createdAt\n deleted\n id\n imageId\n isPublished\n metadata {\n createdAt\n deleted\n description\n id\n pageTitle\n slug\n targetId\n targetType\n updatedAt\n }\n writer {\n firstName\n lastName\n }\n publishedAt\n shortDescription\n storefrontId\n tagIds\n updatedAt\n }\n hasNext\n limit\n page\n }\n }\n "])));
|
|
26165
26137
|
_b.label = 1;
|
|
26166
26138
|
case 1:
|
|
26167
26139
|
_b.trys.push([1, 3, , 4]);
|
|
@@ -29958,15 +29930,21 @@ var PageViewModel = /** @class */ (function () {
|
|
|
29958
29930
|
this.getPagePropValues = function () { return __awaiter(_this, void 0, void 0, function () {
|
|
29959
29931
|
var pageDataProvider;
|
|
29960
29932
|
var _this = this;
|
|
29961
|
-
var _a;
|
|
29962
|
-
return __generator(this, function (
|
|
29963
|
-
switch (
|
|
29933
|
+
var _a, _b, _c;
|
|
29934
|
+
return __generator(this, function (_d) {
|
|
29935
|
+
switch (_d.label) {
|
|
29964
29936
|
case 0:
|
|
29965
29937
|
pageDataProvider = new IkasPageDataProvider(this.theme, this.pageParams, (_a = this.page) === null || _a === void 0 ? void 0 : _a.type);
|
|
29938
|
+
if (((_b = this.pageParams) === null || _b === void 0 ? void 0 : _b.blogId) || ((_c = this.pageParams) === null || _c === void 0 ? void 0 : _c.blogCategoryId)) {
|
|
29939
|
+
pageDataProvider.possiblePageTypes = [
|
|
29940
|
+
exports.IkasThemePageType.BLOG,
|
|
29941
|
+
exports.IkasThemePageType.BLOG_CATEGORY,
|
|
29942
|
+
];
|
|
29943
|
+
}
|
|
29966
29944
|
this.isLoading = true;
|
|
29967
29945
|
return [4 /*yield*/, pageDataProvider.getPageData()];
|
|
29968
29946
|
case 1:
|
|
29969
|
-
|
|
29947
|
+
_d.sent();
|
|
29970
29948
|
pageDataProvider.pageComponentPropValues = IkasPageDataProvider.initPropValues(JSON.stringify(pageDataProvider.pageComponentPropValues), this.router, JSON.stringify(this.theme.settings));
|
|
29971
29949
|
mobx.runInAction(function () {
|
|
29972
29950
|
_this.pageDataProvider = pageDataProvider;
|
|
@@ -30151,7 +30129,7 @@ var PageViewModel = /** @class */ (function () {
|
|
|
30151
30129
|
Object.defineProperty(PageViewModel.prototype, "specification", {
|
|
30152
30130
|
get: function () {
|
|
30153
30131
|
var _this = this;
|
|
30154
|
-
var _a, _b, _c;
|
|
30132
|
+
var _a, _b, _c, _d, _e;
|
|
30155
30133
|
var selectedPage = this.page;
|
|
30156
30134
|
var specification;
|
|
30157
30135
|
if ((selectedPage === null || selectedPage === void 0 ? void 0 : selectedPage.type) === exports.IkasThemePageType.PRODUCT) {
|
|
@@ -30163,6 +30141,12 @@ var PageViewModel = /** @class */ (function () {
|
|
|
30163
30141
|
if ((selectedPage === null || selectedPage === void 0 ? void 0 : selectedPage.type) === exports.IkasThemePageType.BRAND) {
|
|
30164
30142
|
specification = (_c = selectedPage.specifications) === null || _c === void 0 ? void 0 : _c.find(function (s) { var _a; return s.id === ((_a = _this.pageParams) === null || _a === void 0 ? void 0 : _a.brandId); });
|
|
30165
30143
|
}
|
|
30144
|
+
if ((selectedPage === null || selectedPage === void 0 ? void 0 : selectedPage.type) === exports.IkasThemePageType.BLOG) {
|
|
30145
|
+
specification = (_d = selectedPage.specifications) === null || _d === void 0 ? void 0 : _d.find(function (s) { var _a; return s.id === ((_a = _this.pageParams) === null || _a === void 0 ? void 0 : _a.blogId); });
|
|
30146
|
+
}
|
|
30147
|
+
if ((selectedPage === null || selectedPage === void 0 ? void 0 : selectedPage.type) === exports.IkasThemePageType.BLOG_CATEGORY) {
|
|
30148
|
+
specification = (_e = selectedPage.specifications) === null || _e === void 0 ? void 0 : _e.find(function (s) { var _a; return s.id === ((_a = _this.pageParams) === null || _a === void 0 ? void 0 : _a.blogCategoryId); });
|
|
30149
|
+
}
|
|
30166
30150
|
return specification;
|
|
30167
30151
|
},
|
|
30168
30152
|
enumerable: false,
|
|
@@ -31372,7 +31356,6 @@ var IkasBaseStore = /** @class */ (function () {
|
|
|
31372
31356
|
this.showLocaleOptions = false;
|
|
31373
31357
|
this.localeChecked = false;
|
|
31374
31358
|
this.settingsSet = false;
|
|
31375
|
-
this.infiniteScrollPages = {}; // key is pageType
|
|
31376
31359
|
this.customerStore = new IkasCustomerStore(this);
|
|
31377
31360
|
this.cartStore = new IkasCartStore(this);
|
|
31378
31361
|
mobx.makeObservable(this, {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { IkasImage } from "../image/index";
|
|
2
2
|
export declare class IkasBlog {
|
|
3
3
|
id: string;
|
|
4
|
-
createdAt:
|
|
5
|
-
updatedAt:
|
|
4
|
+
createdAt: number;
|
|
5
|
+
updatedAt: number;
|
|
6
6
|
categoryId: string | null;
|
|
7
7
|
category: IkasBlogCategory | null;
|
|
8
8
|
imageId: string | null;
|
|
@@ -21,8 +21,8 @@ export declare class IkasBlog {
|
|
|
21
21
|
}
|
|
22
22
|
export declare class IkasBlogContent {
|
|
23
23
|
id: string;
|
|
24
|
-
createdAt:
|
|
25
|
-
updatedAt:
|
|
24
|
+
createdAt: number;
|
|
25
|
+
updatedAt: number;
|
|
26
26
|
content: string;
|
|
27
27
|
constructor(data?: Partial<IkasBlogContent>);
|
|
28
28
|
}
|
|
@@ -37,8 +37,8 @@ export declare enum IkasBlogMetadataTargetType {
|
|
|
37
37
|
}
|
|
38
38
|
export declare class IkasBlogMetaData {
|
|
39
39
|
id: string;
|
|
40
|
-
createdAt:
|
|
41
|
-
updatedAt:
|
|
40
|
+
createdAt: number;
|
|
41
|
+
updatedAt: number;
|
|
42
42
|
pageTitle: string | null;
|
|
43
43
|
description: string | null;
|
|
44
44
|
slug: string;
|
|
@@ -48,8 +48,8 @@ export declare class IkasBlogMetaData {
|
|
|
48
48
|
}
|
|
49
49
|
export declare class IkasBlogCategory {
|
|
50
50
|
id: string;
|
|
51
|
-
createdAt:
|
|
52
|
-
updatedAt:
|
|
51
|
+
createdAt: number;
|
|
52
|
+
updatedAt: number;
|
|
53
53
|
deleted: boolean;
|
|
54
54
|
name: string;
|
|
55
55
|
imageId: string;
|
|
@@ -59,8 +59,8 @@ export declare class IkasBlogCategory {
|
|
|
59
59
|
}
|
|
60
60
|
export declare class IkasBlogTag {
|
|
61
61
|
id: string;
|
|
62
|
-
createdAt:
|
|
63
|
-
updatedAt:
|
|
62
|
+
createdAt: number;
|
|
63
|
+
updatedAt: number;
|
|
64
64
|
deleted: boolean;
|
|
65
65
|
name: string | null;
|
|
66
66
|
constructor(data?: Partial<IkasBlogTag>);
|
|
@@ -26,7 +26,6 @@ export declare class IkasProductList {
|
|
|
26
26
|
constructor(data: IkasProductListParams, router?: NextRouter);
|
|
27
27
|
get sort(): IkasProductListSortType;
|
|
28
28
|
get limit(): number;
|
|
29
|
-
get pageType(): IkasThemePageType;
|
|
30
29
|
get page(): number;
|
|
31
30
|
get count(): number;
|
|
32
31
|
get pageCount(): number;
|
|
@@ -76,8 +75,6 @@ export declare class IkasProductList {
|
|
|
76
75
|
recommendFor: string | null | undefined;
|
|
77
76
|
productListPropValue: IkasProductListPropValue;
|
|
78
77
|
};
|
|
79
|
-
private checkRestoreInfiniteScroll;
|
|
80
|
-
private hasForwardRoute;
|
|
81
78
|
private getQueryParams;
|
|
82
79
|
private isBrowser;
|
|
83
80
|
private searchDebouncer;
|
package/build/store/base.d.ts
CHANGED
|
@@ -10,7 +10,6 @@ export declare class IkasBaseStore {
|
|
|
10
10
|
showLocaleOptions: boolean;
|
|
11
11
|
private localeChecked;
|
|
12
12
|
private settingsSet;
|
|
13
|
-
private infiniteScrollPages;
|
|
14
13
|
constructor();
|
|
15
14
|
checkLocalization(): Promise<void>;
|
|
16
15
|
setLocalization(localeOption: IkasLocaleOption): void;
|