@ikas/storefront 0.0.51 → 0.0.53
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/__generated__/global-types.d.ts +7 -2
- package/build/index.es.js +60 -48
- package/build/index.js +60 -48
- package/build/models/data/category/index.d.ts +8 -2
- package/build/models/data/product-filter/index.d.ts +2 -0
- package/build/models/ui/product-list/index.d.ts +3 -2
- package/package.json +1 -1
|
@@ -80,9 +80,14 @@ export declare enum OrderLineItemStatusEnum {
|
|
|
80
80
|
* Order Package Fulfill Status Enum
|
|
81
81
|
*/
|
|
82
82
|
export declare enum OrderPackageFulfillStatusEnum {
|
|
83
|
+
CANCELLED = "CANCELLED",
|
|
84
|
+
CANCEL_REJECTED = "CANCEL_REJECTED",
|
|
85
|
+
CANCEL_REQUESTED = "CANCEL_REQUESTED",
|
|
83
86
|
DELIVERED = "DELIVERED",
|
|
84
87
|
FULFILLED = "FULFILLED",
|
|
85
|
-
|
|
88
|
+
REFUNDED = "REFUNDED",
|
|
89
|
+
REFUND_REJECTED = "REFUND_REJECTED",
|
|
90
|
+
REFUND_REQUESTED = "REFUND_REQUESTED"
|
|
86
91
|
}
|
|
87
92
|
/**
|
|
88
93
|
* Order Package Status Enum
|
|
@@ -140,8 +145,8 @@ export declare enum ProductFilterDisplayTypeEnum {
|
|
|
140
145
|
BOX = "BOX",
|
|
141
146
|
DATE_RANGE = "DATE_RANGE",
|
|
142
147
|
LIST = "LIST",
|
|
143
|
-
NUMBER_LIST = "NUMBER_LIST",
|
|
144
148
|
NUMBER_RANGE = "NUMBER_RANGE",
|
|
149
|
+
NUMBER_RANGE_LIST = "NUMBER_RANGE_LIST",
|
|
145
150
|
SWATCH = "SWATCH"
|
|
146
151
|
}
|
|
147
152
|
/**
|
package/build/index.es.js
CHANGED
|
@@ -12438,7 +12438,7 @@ var IkasCategory = /** @class */ (function () {
|
|
|
12438
12438
|
? new IkasHTMLMetaData(data.metaData)
|
|
12439
12439
|
: undefined;
|
|
12440
12440
|
this.image = data.image ? new IkasImage(data.image.id) : null;
|
|
12441
|
-
this.path = data.path
|
|
12441
|
+
this.path = data.path ? data.path.map(function (p) { return new IkasCategoryPath(p); }) : [];
|
|
12442
12442
|
makeAutoObservable(this);
|
|
12443
12443
|
}
|
|
12444
12444
|
Object.defineProperty(IkasCategory.prototype, "href", {
|
|
@@ -12452,6 +12452,24 @@ var IkasCategory = /** @class */ (function () {
|
|
|
12452
12452
|
configurable: true
|
|
12453
12453
|
});
|
|
12454
12454
|
return IkasCategory;
|
|
12455
|
+
}());
|
|
12456
|
+
var IkasCategoryPath = /** @class */ (function () {
|
|
12457
|
+
function IkasCategoryPath(data) {
|
|
12458
|
+
this.id = data.id || "";
|
|
12459
|
+
this.name = data.name || "";
|
|
12460
|
+
this.slug = data.slug || "";
|
|
12461
|
+
makeAutoObservable(this);
|
|
12462
|
+
}
|
|
12463
|
+
Object.defineProperty(IkasCategoryPath.prototype, "href", {
|
|
12464
|
+
get: function () {
|
|
12465
|
+
if (!this.slug)
|
|
12466
|
+
return "";
|
|
12467
|
+
return "/" + this.slug;
|
|
12468
|
+
},
|
|
12469
|
+
enumerable: false,
|
|
12470
|
+
configurable: true
|
|
12471
|
+
});
|
|
12472
|
+
return IkasCategoryPath;
|
|
12455
12473
|
}());
|
|
12456
12474
|
|
|
12457
12475
|
var IkasOrderAddress = /** @class */ (function () {
|
|
@@ -13396,6 +13414,14 @@ var IkasProductFilter = /** @class */ (function () {
|
|
|
13396
13414
|
enumerable: false,
|
|
13397
13415
|
configurable: true
|
|
13398
13416
|
});
|
|
13417
|
+
Object.defineProperty(IkasProductFilter.prototype, "displayedValues", {
|
|
13418
|
+
get: function () {
|
|
13419
|
+
var _a;
|
|
13420
|
+
return (_a = this.values) === null || _a === void 0 ? void 0 : _a.filter(function (v) { return (!v.resultCount ? v.isSelected : true); });
|
|
13421
|
+
},
|
|
13422
|
+
enumerable: false,
|
|
13423
|
+
configurable: true
|
|
13424
|
+
});
|
|
13399
13425
|
IkasProductFilter.prototype.clear = function () {
|
|
13400
13426
|
var _a, _b;
|
|
13401
13427
|
this.numberRange = null;
|
|
@@ -13420,6 +13446,7 @@ var IkasApplicableProductFilterValue = /** @class */ (function () {
|
|
|
13420
13446
|
this.colorCode = null;
|
|
13421
13447
|
this.thumbnailImageId = null;
|
|
13422
13448
|
this.thumbnailImage = null;
|
|
13449
|
+
this.resultCount = null;
|
|
13423
13450
|
// Extra
|
|
13424
13451
|
this._isSelected = false;
|
|
13425
13452
|
this.id = data.id || "";
|
|
@@ -13430,6 +13457,7 @@ var IkasApplicableProductFilterValue = /** @class */ (function () {
|
|
|
13430
13457
|
if (this.thumbnailImageId)
|
|
13431
13458
|
this.thumbnailImage = new IkasImage(this.thumbnailImageId);
|
|
13432
13459
|
this._isSelected = data.isSelected || false;
|
|
13460
|
+
this.resultCount = data.resultCount || null;
|
|
13433
13461
|
makeAutoObservable(this);
|
|
13434
13462
|
}
|
|
13435
13463
|
Object.defineProperty(IkasApplicableProductFilterValue.prototype, "isSelected", {
|
|
@@ -15098,6 +15126,7 @@ var IkasProductList = /** @class */ (function () {
|
|
|
15098
15126
|
return new IkasProductDetail(product, product.variants[0].variantValues);
|
|
15099
15127
|
});
|
|
15100
15128
|
}
|
|
15129
|
+
this.applyFacets(response_1.facets);
|
|
15101
15130
|
this.data = data;
|
|
15102
15131
|
this._count = response_1.count;
|
|
15103
15132
|
this._initialized = true;
|
|
@@ -15255,7 +15284,6 @@ var IkasProductList = /** @class */ (function () {
|
|
|
15255
15284
|
: null;
|
|
15256
15285
|
this.router = router;
|
|
15257
15286
|
makeAutoObservable(this);
|
|
15258
|
-
console.log("constructor");
|
|
15259
15287
|
if (this.isBrowser() && location.search) {
|
|
15260
15288
|
var queryParams = this.getQueryParams();
|
|
15261
15289
|
this.getInitial(queryParams);
|
|
@@ -15438,7 +15466,6 @@ var IkasProductList = /** @class */ (function () {
|
|
|
15438
15466
|
return [4 /*yield*/, IkasProductSearchAPI.getProductFilterData()];
|
|
15439
15467
|
case 1:
|
|
15440
15468
|
_a.filters = _b.sent();
|
|
15441
|
-
// this._filterCategoryId ? [this._filterCategoryId] : undefined
|
|
15442
15469
|
if (this.filters)
|
|
15443
15470
|
this.filters.sort(function (f1, f2) { return (f1.order > f2.order ? 1 : -1); });
|
|
15444
15471
|
return [2 /*return*/];
|
|
@@ -15477,6 +15504,29 @@ var IkasProductList = /** @class */ (function () {
|
|
|
15477
15504
|
console.log(err);
|
|
15478
15505
|
}
|
|
15479
15506
|
};
|
|
15507
|
+
IkasProductList.prototype.applyFacets = function (facets) {
|
|
15508
|
+
var _a;
|
|
15509
|
+
(_a = this.filters) === null || _a === void 0 ? void 0 : _a.forEach(function (filter) {
|
|
15510
|
+
var _a;
|
|
15511
|
+
var facet = facets === null || facets === void 0 ? void 0 : facets.find(function (f) { return f.id === filter.id; });
|
|
15512
|
+
if (facet) {
|
|
15513
|
+
facet.values.forEach(function (facetValue) {
|
|
15514
|
+
var _a;
|
|
15515
|
+
try {
|
|
15516
|
+
var filterValue = (_a = filter.values) === null || _a === void 0 ? void 0 : _a.find(function (fv) { return fv.id === facetValue.id; });
|
|
15517
|
+
if (filterValue)
|
|
15518
|
+
filterValue.resultCount = facetValue.count;
|
|
15519
|
+
}
|
|
15520
|
+
catch (err) {
|
|
15521
|
+
console.log(err);
|
|
15522
|
+
}
|
|
15523
|
+
});
|
|
15524
|
+
}
|
|
15525
|
+
else {
|
|
15526
|
+
(_a = filter.values) === null || _a === void 0 ? void 0 : _a.forEach(function (v) { return (v.resultCount = null); });
|
|
15527
|
+
}
|
|
15528
|
+
});
|
|
15529
|
+
};
|
|
15480
15530
|
IkasProductList.prototype.toJSON = function () {
|
|
15481
15531
|
return {
|
|
15482
15532
|
data: this.data,
|
|
@@ -15488,8 +15538,8 @@ var IkasProductList = /** @class */ (function () {
|
|
|
15488
15538
|
searchKeyword: this._searchKeyword,
|
|
15489
15539
|
initialized: this._initialized,
|
|
15490
15540
|
minPage: this._minPage,
|
|
15491
|
-
|
|
15492
|
-
|
|
15541
|
+
filterBrandId: this._filterBrandId,
|
|
15542
|
+
filterCategoryId: this._filterCategoryId,
|
|
15493
15543
|
filters: this.filters,
|
|
15494
15544
|
recommendFor: this._recommendFor,
|
|
15495
15545
|
productListPropValue: this._productListPropValue,
|
|
@@ -23117,7 +23167,7 @@ function simpleToProduct(simple) {
|
|
|
23117
23167
|
return new IkasCategory({
|
|
23118
23168
|
id: c.id,
|
|
23119
23169
|
name: c.name,
|
|
23120
|
-
path: c.path,
|
|
23170
|
+
path: c.path.map(function (p) { return new IkasCategoryPath(p); }),
|
|
23121
23171
|
metaData: new IkasHTMLMetaData({
|
|
23122
23172
|
slug: c.slug || "",
|
|
23123
23173
|
}),
|
|
@@ -23174,59 +23224,21 @@ function simpleToProduct(simple) {
|
|
|
23174
23224
|
price: new IkasProductPrice((_c = v.prices) === null || _c === void 0 ? void 0 : _c.find(function (p) { return p.priceListId === null; })),
|
|
23175
23225
|
stock: v.stocks.length ? v.stocks[0].stockCount : 0,
|
|
23176
23226
|
variantValues: (_d = v.variantValues) === null || _d === void 0 ? void 0 : _d.map(function (vv) {
|
|
23177
|
-
var
|
|
23178
|
-
var variantValue = (
|
|
23179
|
-
.find(function (pvt) { return pvt.variantType.id === vv.variantTypeId; })) === null || _a === void 0 ? void 0 : _a.variantType.values.find(function (_vv) { return _vv.id === vv.variantValueId; });
|
|
23227
|
+
var pvt = simple.productVariantTypes.find(function (pvt) { return pvt.variantType.id === vv.variantTypeId; });
|
|
23228
|
+
var variantValue = pvt === null || pvt === void 0 ? void 0 : pvt.variantType.values.find(function (_vv) { return _vv.id === vv.variantValueId; });
|
|
23180
23229
|
return new IkasVariantValue({
|
|
23181
23230
|
id: vv.variantValueId,
|
|
23182
23231
|
name: variantValue === null || variantValue === void 0 ? void 0 : variantValue.name,
|
|
23183
23232
|
colorCode: variantValue === null || variantValue === void 0 ? void 0 : variantValue.colorCode,
|
|
23184
23233
|
thumbnailImageId: variantValue === null || variantValue === void 0 ? void 0 : variantValue.thumbnailImageId,
|
|
23234
|
+
variantTypeId: pvt === null || pvt === void 0 ? void 0 : pvt.variantType.id,
|
|
23185
23235
|
});
|
|
23186
23236
|
}),
|
|
23187
23237
|
});
|
|
23188
23238
|
}),
|
|
23189
23239
|
});
|
|
23190
23240
|
}
|
|
23191
|
-
var templateObject_1$e, templateObject_2$4;
|
|
23192
|
-
// type SearchInput = {
|
|
23193
|
-
// categoryIdList: string[] | null;
|
|
23194
|
-
// filterList: SearchInputFilter[] | null;
|
|
23195
|
-
// order: SearchInputOrder[] | null;
|
|
23196
|
-
// page: number | null;
|
|
23197
|
-
// perPage: number | null;
|
|
23198
|
-
// priceListId: string | null;
|
|
23199
|
-
// productId: string | null;
|
|
23200
|
-
// query: string | null;
|
|
23201
|
-
// slug: string | null;
|
|
23202
|
-
// };
|
|
23203
|
-
// type SearchInputFilter = {
|
|
23204
|
-
// id: string;
|
|
23205
|
-
// type: ProductFilterType;
|
|
23206
|
-
// valueList: string[];
|
|
23207
|
-
// };
|
|
23208
|
-
// export type SearchInputOrder = {
|
|
23209
|
-
// direction: SortByDirection;
|
|
23210
|
-
// type: SortByType;
|
|
23211
|
-
// };
|
|
23212
|
-
// enum SortByDirection {
|
|
23213
|
-
// ASC = "ASC",
|
|
23214
|
-
// DESC = "DESC",
|
|
23215
|
-
// }
|
|
23216
|
-
// enum SortByType {
|
|
23217
|
-
// CREATED_AT = "CREATED_AT",
|
|
23218
|
-
// DISCOUNT_RATIO = "DISCOUNT_RATIO",
|
|
23219
|
-
// PRICE = "PRICE",
|
|
23220
|
-
// }
|
|
23221
|
-
// export enum ProductFilterType {
|
|
23222
|
-
// ATTRIBUTE = "ATTRIBUTE",
|
|
23223
|
-
// BRAND = "BRAND",
|
|
23224
|
-
// DISCOUNT_RATIO = "DISCOUNT_RATIO",
|
|
23225
|
-
// PRICE = "PRICE",
|
|
23226
|
-
// STOCK_STATUS = "STOCK_STATUS",
|
|
23227
|
-
// TAG = "TAG",
|
|
23228
|
-
// VARIANT_TYPE = "VARIANT_TYPE",
|
|
23229
|
-
// }
|
|
23241
|
+
var templateObject_1$e, templateObject_2$4;
|
|
23230
23242
|
|
|
23231
23243
|
var IkasProductAttributeAPI = /** @class */ (function () {
|
|
23232
23244
|
function IkasProductAttributeAPI() {
|
package/build/index.js
CHANGED
|
@@ -12449,7 +12449,7 @@ var IkasCategory = /** @class */ (function () {
|
|
|
12449
12449
|
? new IkasHTMLMetaData(data.metaData)
|
|
12450
12450
|
: undefined;
|
|
12451
12451
|
this.image = data.image ? new IkasImage(data.image.id) : null;
|
|
12452
|
-
this.path = data.path
|
|
12452
|
+
this.path = data.path ? data.path.map(function (p) { return new IkasCategoryPath(p); }) : [];
|
|
12453
12453
|
mobx.makeAutoObservable(this);
|
|
12454
12454
|
}
|
|
12455
12455
|
Object.defineProperty(IkasCategory.prototype, "href", {
|
|
@@ -12463,6 +12463,24 @@ var IkasCategory = /** @class */ (function () {
|
|
|
12463
12463
|
configurable: true
|
|
12464
12464
|
});
|
|
12465
12465
|
return IkasCategory;
|
|
12466
|
+
}());
|
|
12467
|
+
var IkasCategoryPath = /** @class */ (function () {
|
|
12468
|
+
function IkasCategoryPath(data) {
|
|
12469
|
+
this.id = data.id || "";
|
|
12470
|
+
this.name = data.name || "";
|
|
12471
|
+
this.slug = data.slug || "";
|
|
12472
|
+
mobx.makeAutoObservable(this);
|
|
12473
|
+
}
|
|
12474
|
+
Object.defineProperty(IkasCategoryPath.prototype, "href", {
|
|
12475
|
+
get: function () {
|
|
12476
|
+
if (!this.slug)
|
|
12477
|
+
return "";
|
|
12478
|
+
return "/" + this.slug;
|
|
12479
|
+
},
|
|
12480
|
+
enumerable: false,
|
|
12481
|
+
configurable: true
|
|
12482
|
+
});
|
|
12483
|
+
return IkasCategoryPath;
|
|
12466
12484
|
}());
|
|
12467
12485
|
|
|
12468
12486
|
var IkasOrderAddress = /** @class */ (function () {
|
|
@@ -13390,6 +13408,14 @@ var IkasProductFilter = /** @class */ (function () {
|
|
|
13390
13408
|
enumerable: false,
|
|
13391
13409
|
configurable: true
|
|
13392
13410
|
});
|
|
13411
|
+
Object.defineProperty(IkasProductFilter.prototype, "displayedValues", {
|
|
13412
|
+
get: function () {
|
|
13413
|
+
var _a;
|
|
13414
|
+
return (_a = this.values) === null || _a === void 0 ? void 0 : _a.filter(function (v) { return (!v.resultCount ? v.isSelected : true); });
|
|
13415
|
+
},
|
|
13416
|
+
enumerable: false,
|
|
13417
|
+
configurable: true
|
|
13418
|
+
});
|
|
13393
13419
|
IkasProductFilter.prototype.clear = function () {
|
|
13394
13420
|
var _a, _b;
|
|
13395
13421
|
this.numberRange = null;
|
|
@@ -13414,6 +13440,7 @@ var IkasApplicableProductFilterValue = /** @class */ (function () {
|
|
|
13414
13440
|
this.colorCode = null;
|
|
13415
13441
|
this.thumbnailImageId = null;
|
|
13416
13442
|
this.thumbnailImage = null;
|
|
13443
|
+
this.resultCount = null;
|
|
13417
13444
|
// Extra
|
|
13418
13445
|
this._isSelected = false;
|
|
13419
13446
|
this.id = data.id || "";
|
|
@@ -13424,6 +13451,7 @@ var IkasApplicableProductFilterValue = /** @class */ (function () {
|
|
|
13424
13451
|
if (this.thumbnailImageId)
|
|
13425
13452
|
this.thumbnailImage = new IkasImage(this.thumbnailImageId);
|
|
13426
13453
|
this._isSelected = data.isSelected || false;
|
|
13454
|
+
this.resultCount = data.resultCount || null;
|
|
13427
13455
|
mobx.makeAutoObservable(this);
|
|
13428
13456
|
}
|
|
13429
13457
|
Object.defineProperty(IkasApplicableProductFilterValue.prototype, "isSelected", {
|
|
@@ -15080,6 +15108,7 @@ var IkasProductList = /** @class */ (function () {
|
|
|
15080
15108
|
return new IkasProductDetail(product, product.variants[0].variantValues);
|
|
15081
15109
|
});
|
|
15082
15110
|
}
|
|
15111
|
+
this.applyFacets(response_1.facets);
|
|
15083
15112
|
this.data = data;
|
|
15084
15113
|
this._count = response_1.count;
|
|
15085
15114
|
this._initialized = true;
|
|
@@ -15237,7 +15266,6 @@ var IkasProductList = /** @class */ (function () {
|
|
|
15237
15266
|
: null;
|
|
15238
15267
|
this.router = router;
|
|
15239
15268
|
mobx.makeAutoObservable(this);
|
|
15240
|
-
console.log("constructor");
|
|
15241
15269
|
if (this.isBrowser() && location.search) {
|
|
15242
15270
|
var queryParams = this.getQueryParams();
|
|
15243
15271
|
this.getInitial(queryParams);
|
|
@@ -15420,7 +15448,6 @@ var IkasProductList = /** @class */ (function () {
|
|
|
15420
15448
|
return [4 /*yield*/, IkasProductSearchAPI.getProductFilterData()];
|
|
15421
15449
|
case 1:
|
|
15422
15450
|
_a.filters = _b.sent();
|
|
15423
|
-
// this._filterCategoryId ? [this._filterCategoryId] : undefined
|
|
15424
15451
|
if (this.filters)
|
|
15425
15452
|
this.filters.sort(function (f1, f2) { return (f1.order > f2.order ? 1 : -1); });
|
|
15426
15453
|
return [2 /*return*/];
|
|
@@ -15459,6 +15486,29 @@ var IkasProductList = /** @class */ (function () {
|
|
|
15459
15486
|
console.log(err);
|
|
15460
15487
|
}
|
|
15461
15488
|
};
|
|
15489
|
+
IkasProductList.prototype.applyFacets = function (facets) {
|
|
15490
|
+
var _a;
|
|
15491
|
+
(_a = this.filters) === null || _a === void 0 ? void 0 : _a.forEach(function (filter) {
|
|
15492
|
+
var _a;
|
|
15493
|
+
var facet = facets === null || facets === void 0 ? void 0 : facets.find(function (f) { return f.id === filter.id; });
|
|
15494
|
+
if (facet) {
|
|
15495
|
+
facet.values.forEach(function (facetValue) {
|
|
15496
|
+
var _a;
|
|
15497
|
+
try {
|
|
15498
|
+
var filterValue = (_a = filter.values) === null || _a === void 0 ? void 0 : _a.find(function (fv) { return fv.id === facetValue.id; });
|
|
15499
|
+
if (filterValue)
|
|
15500
|
+
filterValue.resultCount = facetValue.count;
|
|
15501
|
+
}
|
|
15502
|
+
catch (err) {
|
|
15503
|
+
console.log(err);
|
|
15504
|
+
}
|
|
15505
|
+
});
|
|
15506
|
+
}
|
|
15507
|
+
else {
|
|
15508
|
+
(_a = filter.values) === null || _a === void 0 ? void 0 : _a.forEach(function (v) { return (v.resultCount = null); });
|
|
15509
|
+
}
|
|
15510
|
+
});
|
|
15511
|
+
};
|
|
15462
15512
|
IkasProductList.prototype.toJSON = function () {
|
|
15463
15513
|
return {
|
|
15464
15514
|
data: this.data,
|
|
@@ -15470,8 +15520,8 @@ var IkasProductList = /** @class */ (function () {
|
|
|
15470
15520
|
searchKeyword: this._searchKeyword,
|
|
15471
15521
|
initialized: this._initialized,
|
|
15472
15522
|
minPage: this._minPage,
|
|
15473
|
-
|
|
15474
|
-
|
|
15523
|
+
filterBrandId: this._filterBrandId,
|
|
15524
|
+
filterCategoryId: this._filterCategoryId,
|
|
15475
15525
|
filters: this.filters,
|
|
15476
15526
|
recommendFor: this._recommendFor,
|
|
15477
15527
|
productListPropValue: this._productListPropValue,
|
|
@@ -23096,7 +23146,7 @@ function simpleToProduct(simple) {
|
|
|
23096
23146
|
return new IkasCategory({
|
|
23097
23147
|
id: c.id,
|
|
23098
23148
|
name: c.name,
|
|
23099
|
-
path: c.path,
|
|
23149
|
+
path: c.path.map(function (p) { return new IkasCategoryPath(p); }),
|
|
23100
23150
|
metaData: new IkasHTMLMetaData({
|
|
23101
23151
|
slug: c.slug || "",
|
|
23102
23152
|
}),
|
|
@@ -23153,59 +23203,21 @@ function simpleToProduct(simple) {
|
|
|
23153
23203
|
price: new IkasProductPrice((_c = v.prices) === null || _c === void 0 ? void 0 : _c.find(function (p) { return p.priceListId === null; })),
|
|
23154
23204
|
stock: v.stocks.length ? v.stocks[0].stockCount : 0,
|
|
23155
23205
|
variantValues: (_d = v.variantValues) === null || _d === void 0 ? void 0 : _d.map(function (vv) {
|
|
23156
|
-
var
|
|
23157
|
-
var variantValue = (
|
|
23158
|
-
.find(function (pvt) { return pvt.variantType.id === vv.variantTypeId; })) === null || _a === void 0 ? void 0 : _a.variantType.values.find(function (_vv) { return _vv.id === vv.variantValueId; });
|
|
23206
|
+
var pvt = simple.productVariantTypes.find(function (pvt) { return pvt.variantType.id === vv.variantTypeId; });
|
|
23207
|
+
var variantValue = pvt === null || pvt === void 0 ? void 0 : pvt.variantType.values.find(function (_vv) { return _vv.id === vv.variantValueId; });
|
|
23159
23208
|
return new IkasVariantValue({
|
|
23160
23209
|
id: vv.variantValueId,
|
|
23161
23210
|
name: variantValue === null || variantValue === void 0 ? void 0 : variantValue.name,
|
|
23162
23211
|
colorCode: variantValue === null || variantValue === void 0 ? void 0 : variantValue.colorCode,
|
|
23163
23212
|
thumbnailImageId: variantValue === null || variantValue === void 0 ? void 0 : variantValue.thumbnailImageId,
|
|
23213
|
+
variantTypeId: pvt === null || pvt === void 0 ? void 0 : pvt.variantType.id,
|
|
23164
23214
|
});
|
|
23165
23215
|
}),
|
|
23166
23216
|
});
|
|
23167
23217
|
}),
|
|
23168
23218
|
});
|
|
23169
23219
|
}
|
|
23170
|
-
var templateObject_1$e, templateObject_2$4;
|
|
23171
|
-
// type SearchInput = {
|
|
23172
|
-
// categoryIdList: string[] | null;
|
|
23173
|
-
// filterList: SearchInputFilter[] | null;
|
|
23174
|
-
// order: SearchInputOrder[] | null;
|
|
23175
|
-
// page: number | null;
|
|
23176
|
-
// perPage: number | null;
|
|
23177
|
-
// priceListId: string | null;
|
|
23178
|
-
// productId: string | null;
|
|
23179
|
-
// query: string | null;
|
|
23180
|
-
// slug: string | null;
|
|
23181
|
-
// };
|
|
23182
|
-
// type SearchInputFilter = {
|
|
23183
|
-
// id: string;
|
|
23184
|
-
// type: ProductFilterType;
|
|
23185
|
-
// valueList: string[];
|
|
23186
|
-
// };
|
|
23187
|
-
// export type SearchInputOrder = {
|
|
23188
|
-
// direction: SortByDirection;
|
|
23189
|
-
// type: SortByType;
|
|
23190
|
-
// };
|
|
23191
|
-
// enum SortByDirection {
|
|
23192
|
-
// ASC = "ASC",
|
|
23193
|
-
// DESC = "DESC",
|
|
23194
|
-
// }
|
|
23195
|
-
// enum SortByType {
|
|
23196
|
-
// CREATED_AT = "CREATED_AT",
|
|
23197
|
-
// DISCOUNT_RATIO = "DISCOUNT_RATIO",
|
|
23198
|
-
// PRICE = "PRICE",
|
|
23199
|
-
// }
|
|
23200
|
-
// export enum ProductFilterType {
|
|
23201
|
-
// ATTRIBUTE = "ATTRIBUTE",
|
|
23202
|
-
// BRAND = "BRAND",
|
|
23203
|
-
// DISCOUNT_RATIO = "DISCOUNT_RATIO",
|
|
23204
|
-
// PRICE = "PRICE",
|
|
23205
|
-
// STOCK_STATUS = "STOCK_STATUS",
|
|
23206
|
-
// TAG = "TAG",
|
|
23207
|
-
// VARIANT_TYPE = "VARIANT_TYPE",
|
|
23208
|
-
// }
|
|
23220
|
+
var templateObject_1$e, templateObject_2$4;
|
|
23209
23221
|
|
|
23210
23222
|
var IkasProductAttributeAPI = /** @class */ (function () {
|
|
23211
23223
|
function IkasProductAttributeAPI() {
|
|
@@ -1,13 +1,19 @@
|
|
|
1
1
|
import { IkasImage } from "../image/index";
|
|
2
2
|
import { IkasHTMLMetaData } from "../html-meta-data/index";
|
|
3
|
-
import { ISimpleCategoryPath } from "../simple-product/index";
|
|
4
3
|
export declare class IkasCategory {
|
|
5
4
|
id: string;
|
|
6
5
|
name: string;
|
|
7
6
|
parentId: string | null;
|
|
8
7
|
metaData?: IkasHTMLMetaData | null;
|
|
9
8
|
image?: IkasImage | null;
|
|
10
|
-
path:
|
|
9
|
+
path: IkasCategoryPath[];
|
|
11
10
|
constructor(data: Partial<IkasCategory>);
|
|
12
11
|
get href(): string;
|
|
13
12
|
}
|
|
13
|
+
export declare class IkasCategoryPath {
|
|
14
|
+
id: string;
|
|
15
|
+
name: string;
|
|
16
|
+
slug?: string | null;
|
|
17
|
+
constructor(data: Partial<IkasCategoryPath>);
|
|
18
|
+
get href(): string;
|
|
19
|
+
}
|
|
@@ -17,6 +17,7 @@ export declare class IkasProductFilter {
|
|
|
17
17
|
get isCustomValueFilter(): boolean;
|
|
18
18
|
get valueList(): string[];
|
|
19
19
|
get keyList(): string[];
|
|
20
|
+
get displayedValues(): IkasApplicableProductFilterValue[] | undefined;
|
|
20
21
|
clear(): void;
|
|
21
22
|
toInput(): SearchInputFilterListInput;
|
|
22
23
|
private rangeToId;
|
|
@@ -28,6 +29,7 @@ export declare class IkasApplicableProductFilterValue {
|
|
|
28
29
|
colorCode?: string | null;
|
|
29
30
|
thumbnailImageId?: string | null;
|
|
30
31
|
thumbnailImage?: IkasImage | null;
|
|
32
|
+
resultCount?: number | null;
|
|
31
33
|
private _isSelected?;
|
|
32
34
|
constructor(data?: Partial<IkasApplicableProductFilterValue>);
|
|
33
35
|
get isSelected(): boolean | undefined;
|
|
@@ -41,6 +41,7 @@ export declare class IkasProductList {
|
|
|
41
41
|
clear(): void;
|
|
42
42
|
private getFilters;
|
|
43
43
|
private applyQueryParamFilters;
|
|
44
|
+
private applyFacets;
|
|
44
45
|
applyFilters: () => Promise<void>;
|
|
45
46
|
getInitial: (queryParams?: URLSearchParams | undefined) => Promise<void>;
|
|
46
47
|
getPrev: () => Promise<void>;
|
|
@@ -56,8 +57,8 @@ export declare class IkasProductList {
|
|
|
56
57
|
searchKeyword: string;
|
|
57
58
|
initialized: boolean;
|
|
58
59
|
minPage: number | null | undefined;
|
|
59
|
-
|
|
60
|
-
|
|
60
|
+
filterBrandId: string | null | undefined;
|
|
61
|
+
filterCategoryId: string | null | undefined;
|
|
61
62
|
filters: IkasProductFilter[] | null | undefined;
|
|
62
63
|
recommendFor: string | null | undefined;
|
|
63
64
|
productListPropValue: IkasProductListPropValue;
|