@ikas/storefront 0.0.160-alpha.11 → 0.0.160-alpha.13
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/api/product-search/index.d.ts +1 -1
- package/build/index.es.js +13 -10
- package/build/index.js +13 -10
- package/package.json +1 -1
|
@@ -4,7 +4,7 @@ import * as SearchProductTypes from "./__generated__/searchProducts";
|
|
|
4
4
|
import { IkasProductFilter } from "../../models/data/product-filter/index";
|
|
5
5
|
import { IkasFilterCategory } from "../../models/data/category/index";
|
|
6
6
|
export declare class IkasProductSearchAPI {
|
|
7
|
-
static searchProducts(input: SearchInput): Promise<{
|
|
7
|
+
static searchProducts(input: SearchInput, useStockFilter?: boolean): Promise<{
|
|
8
8
|
data: IkasProduct[];
|
|
9
9
|
__typename: "ProductSearchResponse";
|
|
10
10
|
count: number;
|
package/build/index.es.js
CHANGED
|
@@ -28318,13 +28318,13 @@ var IkasProductList = /** @class */ (function () {
|
|
|
28318
28318
|
displayType: filter.displayType,
|
|
28319
28319
|
valueList: filter.valueList,
|
|
28320
28320
|
}));
|
|
28321
|
-
|
|
28322
|
-
|
|
28323
|
-
|
|
28324
|
-
|
|
28325
|
-
|
|
28326
|
-
|
|
28327
|
-
}
|
|
28321
|
+
}
|
|
28322
|
+
if (filter.isFacetFilter) {
|
|
28323
|
+
facetList.push({
|
|
28324
|
+
id: filter.id,
|
|
28325
|
+
type: filter.type,
|
|
28326
|
+
displayType: filter.displayType,
|
|
28327
|
+
});
|
|
28328
28328
|
}
|
|
28329
28329
|
});
|
|
28330
28330
|
selectedCategoryIds = (_b = this._filterCategories) === null || _b === void 0 ? void 0 : _b.filter(function (fc) { return fc.isSelected; }).map(function (fc) { return fc.id; });
|
|
@@ -28348,7 +28348,7 @@ var IkasProductList = /** @class */ (function () {
|
|
|
28348
28348
|
salesChannelId: IkasStorefrontConfig.salesChannelId,
|
|
28349
28349
|
query: this._searchKeyword,
|
|
28350
28350
|
order: [this.getSortParams()],
|
|
28351
|
-
})];
|
|
28351
|
+
}, true)];
|
|
28352
28352
|
case 1: return [2 /*return*/, _d.sent()];
|
|
28353
28353
|
}
|
|
28354
28354
|
});
|
|
@@ -35019,7 +35019,8 @@ var IkasProductAttributeTableTemplate = /** @class */ (function () {
|
|
|
35019
35019
|
var IkasProductSearchAPI = /** @class */ (function () {
|
|
35020
35020
|
function IkasProductSearchAPI() {
|
|
35021
35021
|
}
|
|
35022
|
-
IkasProductSearchAPI.searchProducts = function (input) {
|
|
35022
|
+
IkasProductSearchAPI.searchProducts = function (input, useStockFilter) {
|
|
35023
|
+
if (useStockFilter === void 0) { useStockFilter = false; }
|
|
35023
35024
|
return __awaiter(this, void 0, void 0, function () {
|
|
35024
35025
|
var SEARCH_PRODUCTS, _a, data, errors, err_1;
|
|
35025
35026
|
return __generator(this, function (_b) {
|
|
@@ -35032,7 +35033,9 @@ var IkasProductSearchAPI = /** @class */ (function () {
|
|
|
35032
35033
|
.query({
|
|
35033
35034
|
query: SEARCH_PRODUCTS,
|
|
35034
35035
|
variables: {
|
|
35035
|
-
input: __assign(__assign({}, input), { showStockOption:
|
|
35036
|
+
input: __assign(__assign({}, input), { showStockOption: useStockFilter
|
|
35037
|
+
? IkasStorefrontConfig.stockPreference
|
|
35038
|
+
: IkasThemeStockPreference.SHOW_ALL }),
|
|
35036
35039
|
},
|
|
35037
35040
|
})];
|
|
35038
35041
|
case 1:
|
package/build/index.js
CHANGED
|
@@ -28299,13 +28299,13 @@ var IkasProductList = /** @class */ (function () {
|
|
|
28299
28299
|
displayType: filter.displayType,
|
|
28300
28300
|
valueList: filter.valueList,
|
|
28301
28301
|
}));
|
|
28302
|
-
|
|
28303
|
-
|
|
28304
|
-
|
|
28305
|
-
|
|
28306
|
-
|
|
28307
|
-
|
|
28308
|
-
}
|
|
28302
|
+
}
|
|
28303
|
+
if (filter.isFacetFilter) {
|
|
28304
|
+
facetList.push({
|
|
28305
|
+
id: filter.id,
|
|
28306
|
+
type: filter.type,
|
|
28307
|
+
displayType: filter.displayType,
|
|
28308
|
+
});
|
|
28309
28309
|
}
|
|
28310
28310
|
});
|
|
28311
28311
|
selectedCategoryIds = (_b = this._filterCategories) === null || _b === void 0 ? void 0 : _b.filter(function (fc) { return fc.isSelected; }).map(function (fc) { return fc.id; });
|
|
@@ -28329,7 +28329,7 @@ var IkasProductList = /** @class */ (function () {
|
|
|
28329
28329
|
salesChannelId: IkasStorefrontConfig.salesChannelId,
|
|
28330
28330
|
query: this._searchKeyword,
|
|
28331
28331
|
order: [this.getSortParams()],
|
|
28332
|
-
})];
|
|
28332
|
+
}, true)];
|
|
28333
28333
|
case 1: return [2 /*return*/, _d.sent()];
|
|
28334
28334
|
}
|
|
28335
28335
|
});
|
|
@@ -34996,7 +34996,8 @@ var IkasProductAttributeTableTemplate = /** @class */ (function () {
|
|
|
34996
34996
|
var IkasProductSearchAPI = /** @class */ (function () {
|
|
34997
34997
|
function IkasProductSearchAPI() {
|
|
34998
34998
|
}
|
|
34999
|
-
IkasProductSearchAPI.searchProducts = function (input) {
|
|
34999
|
+
IkasProductSearchAPI.searchProducts = function (input, useStockFilter) {
|
|
35000
|
+
if (useStockFilter === void 0) { useStockFilter = false; }
|
|
35000
35001
|
return __awaiter(this, void 0, void 0, function () {
|
|
35001
35002
|
var SEARCH_PRODUCTS, _a, data, errors, err_1;
|
|
35002
35003
|
return __generator(this, function (_b) {
|
|
@@ -35009,7 +35010,9 @@ var IkasProductSearchAPI = /** @class */ (function () {
|
|
|
35009
35010
|
.query({
|
|
35010
35011
|
query: SEARCH_PRODUCTS,
|
|
35011
35012
|
variables: {
|
|
35012
|
-
input: __assign(__assign({}, input), { showStockOption:
|
|
35013
|
+
input: __assign(__assign({}, input), { showStockOption: useStockFilter
|
|
35014
|
+
? IkasStorefrontConfig.stockPreference
|
|
35015
|
+
: IkasThemeStockPreference.SHOW_ALL }),
|
|
35013
35016
|
},
|
|
35014
35017
|
})];
|
|
35015
35018
|
case 1:
|