@ikas/storefront 0.0.55 → 0.0.57

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.
Files changed (30) hide show
  1. package/build/api/brand/__generated__/listProductBrand.d.ts +1 -1
  2. package/build/api/cart/__generated__/getCart.d.ts +2 -2
  3. package/build/api/cart/__generated__/saveItemToCart.d.ts +2 -2
  4. package/build/api/category/__generated__/listCategory.d.ts +2 -1
  5. package/build/api/checkout/__generated__/getCheckoutByCartId.d.ts +1 -1
  6. package/build/api/checkout/__generated__/getCheckoutById.d.ts +3 -3
  7. package/build/api/checkout/__generated__/listPaymentGateway.d.ts +1 -1
  8. package/build/api/checkout/__generated__/saveCheckout.d.ts +1 -1
  9. package/build/api/city/__generated__/listCity.d.ts +1 -1
  10. package/build/api/country/__generated__/listCountry.d.ts +1 -1
  11. package/build/api/customer/__generated__/customerLogin.d.ts +2 -2
  12. package/build/api/customer/__generated__/getCustomerOrders.d.ts +3 -3
  13. package/build/api/customer/__generated__/getMyCustomer.d.ts +2 -2
  14. package/build/api/customer/__generated__/listOrderTransactions.d.ts +1 -1
  15. package/build/api/customer/__generated__/registerCustomer.d.ts +2 -2
  16. package/build/api/customer/__generated__/saveMyCustomer.d.ts +2 -2
  17. package/build/api/district/__generated__/listDistrict.d.ts +1 -1
  18. package/build/api/favorite-product/__generated__/listFavoriteProducts.d.ts +1 -1
  19. package/build/api/product/__generated__/listProduct.d.ts +2 -2
  20. package/build/api/product-attribute/__generated__/listProductAttribute.d.ts +2 -2
  21. package/build/api/product-search/__generated__/getProductFilterData.d.ts +23 -8
  22. package/build/api/product-search/index.d.ts +5 -1
  23. package/build/api/state/__generated__/listState.d.ts +1 -1
  24. package/build/api/stock-location/__generated__/listStockLocation.d.ts +1 -1
  25. package/build/api/storefront/__generated__/getStorefront.d.ts +2 -2
  26. package/build/api/variant-type/__generated__/listVariantType.d.ts +2 -2
  27. package/build/index.es.js +94 -25
  28. package/build/index.js +94 -25
  29. package/build/models/ui/product-list/index.d.ts +4 -0
  30. package/package.json +1 -1
@@ -10,7 +10,7 @@ export interface listProductBrand_listProductBrand_data_metaData {
10
10
  }
11
11
  export interface listProductBrand_listProductBrand_data {
12
12
  __typename: "ProductBrand";
13
- id: string | null;
13
+ id: string;
14
14
  name: string;
15
15
  imageId: string | null;
16
16
  metaData: listProductBrand_listProductBrand_data_metaData | null;
@@ -32,7 +32,7 @@ export interface getCart_getCart_items {
32
32
  discount: getCart_getCart_items_discount | null;
33
33
  discountPrice: number | null;
34
34
  finalPrice: number | null;
35
- id: string | null;
35
+ id: string;
36
36
  originalOrderLineItemId: string | null;
37
37
  price: number;
38
38
  quantity: number;
@@ -50,7 +50,7 @@ export interface getCart_getCart {
50
50
  currencyCode: string | null;
51
51
  customerId: string | null;
52
52
  dueDate: any;
53
- id: string | null;
53
+ id: string;
54
54
  itemCount: number;
55
55
  items: getCart_getCart_items[];
56
56
  merchantId: string;
@@ -33,7 +33,7 @@ export interface saveItemToCart_saveItemToCart_items {
33
33
  discount: saveItemToCart_saveItemToCart_items_discount | null;
34
34
  discountPrice: number | null;
35
35
  finalPrice: number | null;
36
- id: string | null;
36
+ id: string;
37
37
  originalOrderLineItemId: string | null;
38
38
  price: number;
39
39
  quantity: number;
@@ -46,7 +46,7 @@ export interface saveItemToCart_saveItemToCart_items {
46
46
  }
47
47
  export interface saveItemToCart_saveItemToCart {
48
48
  __typename: "Cart";
49
- id: string | null;
49
+ id: string;
50
50
  createdAt: any | null;
51
51
  updatedAt: any | null;
52
52
  dueDate: any;
@@ -10,7 +10,7 @@ export interface listCategory_listCategory_data_metaData {
10
10
  }
11
11
  export interface listCategory_listCategory_data {
12
12
  __typename: "Category";
13
- id: string | null;
13
+ id: string;
14
14
  createdAt: any | null;
15
15
  updatedAt: any | null;
16
16
  deleted: boolean | null;
@@ -18,6 +18,7 @@ export interface listCategory_listCategory_data {
18
18
  parentId: string | null;
19
19
  imageId: string | null;
20
20
  metaData: listCategory_listCategory_data_metaData | null;
21
+ categoryPath: string[] | null;
21
22
  }
22
23
  export interface listCategory_listCategory {
23
24
  __typename: "CategoryPaginationResponse";
@@ -1,6 +1,6 @@
1
1
  export interface getCheckoutByCartId_getCheckoutByCartId {
2
2
  __typename: "Checkout";
3
- id: string | null;
3
+ id: string;
4
4
  }
5
5
  export interface getCheckoutByCartId {
6
6
  getCheckoutByCartId: getCheckoutByCartId_getCheckoutByCartId;
@@ -138,7 +138,7 @@ export interface getCheckoutById_getCheckoutById_cart_items {
138
138
  discount: getCheckoutById_getCheckoutById_cart_items_discount | null;
139
139
  discountPrice: number | null;
140
140
  finalPrice: number | null;
141
- id: string | null;
141
+ id: string;
142
142
  originalOrderLineItemId: string | null;
143
143
  price: number;
144
144
  quantity: number;
@@ -156,7 +156,7 @@ export interface getCheckoutById_getCheckoutById_cart {
156
156
  currencyCode: string | null;
157
157
  customerId: string | null;
158
158
  dueDate: any;
159
- id: string | null;
159
+ id: string;
160
160
  itemCount: number;
161
161
  items: getCheckoutById_getCheckoutById_cart_items[];
162
162
  merchantId: string;
@@ -182,7 +182,7 @@ export interface getCheckoutById_getCheckoutById {
182
182
  createdAt: any | null;
183
183
  customer: getCheckoutById_getCheckoutById_customer | null;
184
184
  deleted: boolean | null;
185
- id: string | null;
185
+ id: string;
186
186
  merchantId: string;
187
187
  orderId: string | null;
188
188
  orderNumber: string | null;
@@ -8,7 +8,7 @@ export interface listPaymentGateway_listPaymentGateway {
8
8
  __typename: "PaymentGateway";
9
9
  paymentMethods: listPaymentGateway_listPaymentGateway_paymentMethods[];
10
10
  paymentMethodType: PaymentMethodEnum;
11
- id: string | null;
11
+ id: string;
12
12
  name: string;
13
13
  testMode: boolean | null;
14
14
  }
@@ -1,7 +1,7 @@
1
1
  import { SaveCheckoutInput } from "../../../__generated__/global-types";
2
2
  export interface saveCheckout_saveCheckout {
3
3
  __typename: "Checkout";
4
- id: string | null;
4
+ id: string;
5
5
  }
6
6
  export interface saveCheckout {
7
7
  saveCheckout: saveCheckout_saveCheckout;
@@ -1,7 +1,7 @@
1
1
  import { StringFilterInput } from "../../../__generated__/global-types";
2
2
  export interface listCity_listCity {
3
3
  __typename: "City";
4
- id: string | null;
4
+ id: string;
5
5
  name: string;
6
6
  order: number | null;
7
7
  }
@@ -5,7 +5,7 @@ export interface listCountry_listCountry_locationTranslations {
5
5
  }
6
6
  export interface listCountry_listCountry {
7
7
  __typename: "Country";
8
- id: string | null;
8
+ id: string;
9
9
  name: string;
10
10
  iso3: string | null;
11
11
  phoneCode: string | null;
@@ -31,7 +31,7 @@ export interface customerLogin_customerLogin_customer_addresses {
31
31
  company: string | null;
32
32
  country: customerLogin_customerLogin_customer_addresses_country;
33
33
  district: customerLogin_customerLogin_customer_addresses_district | null;
34
- id: string | null;
34
+ id: string;
35
35
  firstName: string;
36
36
  isDefault: boolean | null;
37
37
  lastName: string;
@@ -43,7 +43,7 @@ export interface customerLogin_customerLogin_customer_addresses {
43
43
  }
44
44
  export interface customerLogin_customerLogin_customer {
45
45
  __typename: "Customer";
46
- id: string | null;
46
+ id: string;
47
47
  isEmailVerified: boolean | null;
48
48
  isPhoneVerified: boolean | null;
49
49
  lastName: string | null;
@@ -95,7 +95,7 @@ export interface getCustomerOrders_getCustomerOrders_orderLineItems {
95
95
  discount: getCustomerOrders_getCustomerOrders_orderLineItems_discount | null;
96
96
  discountPrice: number | null;
97
97
  finalPrice: number | null;
98
- id: string | null;
98
+ id: string;
99
99
  originalOrderLineItemId: string | null;
100
100
  price: number;
101
101
  quantity: number;
@@ -121,7 +121,7 @@ export interface getCustomerOrders_getCustomerOrders_orderPackages {
121
121
  orderPackageNumber: string;
122
122
  orderPackageFulfillStatus: OrderPackageFulfillStatusEnum;
123
123
  orderLineItemIds: string[];
124
- id: string | null;
124
+ id: string;
125
125
  deleted: boolean | null;
126
126
  createdAt: any | null;
127
127
  }
@@ -188,7 +188,7 @@ export interface getCustomerOrders_getCustomerOrders {
188
188
  currencyRates: getCustomerOrders_getCustomerOrders_currencyRates[];
189
189
  customer: getCustomerOrders_getCustomerOrders_customer | null;
190
190
  deleted: boolean | null;
191
- id: string | null;
191
+ id: string;
192
192
  merchantId: string;
193
193
  note: string | null;
194
194
  orderedAt: any | null;
@@ -31,7 +31,7 @@ export interface getMyCustomer_getMyCustomer_addresses {
31
31
  company: string | null;
32
32
  country: getMyCustomer_getMyCustomer_addresses_country;
33
33
  district: getMyCustomer_getMyCustomer_addresses_district | null;
34
- id: string | null;
34
+ id: string;
35
35
  firstName: string;
36
36
  isDefault: boolean | null;
37
37
  lastName: string;
@@ -44,7 +44,7 @@ export interface getMyCustomer_getMyCustomer_addresses {
44
44
  }
45
45
  export interface getMyCustomer_getMyCustomer {
46
46
  __typename: "Customer";
47
- id: string | null;
47
+ id: string;
48
48
  isEmailVerified: boolean | null;
49
49
  isPhoneVerified: boolean | null;
50
50
  lastName: string | null;
@@ -31,7 +31,7 @@ export interface listOrderTransactions_listOrderTransactions {
31
31
  customerId: string | null;
32
32
  deleted: boolean | null;
33
33
  error: listOrderTransactions_listOrderTransactions_error | null;
34
- id: string | null;
34
+ id: string;
35
35
  orderId: string | null;
36
36
  paymentGatewayId: string;
37
37
  paymentGatewayName: string;
@@ -31,7 +31,7 @@ export interface registerCustomer_registerCustomer_customer_addresses {
31
31
  company: string | null;
32
32
  country: registerCustomer_registerCustomer_customer_addresses_country;
33
33
  district: registerCustomer_registerCustomer_customer_addresses_district | null;
34
- id: string | null;
34
+ id: string;
35
35
  firstName: string;
36
36
  isDefault: boolean | null;
37
37
  lastName: string;
@@ -43,7 +43,7 @@ export interface registerCustomer_registerCustomer_customer_addresses {
43
43
  }
44
44
  export interface registerCustomer_registerCustomer_customer {
45
45
  __typename: "Customer";
46
- id: string | null;
46
+ id: string;
47
47
  isEmailVerified: boolean | null;
48
48
  isPhoneVerified: boolean | null;
49
49
  lastName: string | null;
@@ -31,7 +31,7 @@ export interface saveMyCustomer_saveMyCustomer_addresses {
31
31
  company: string | null;
32
32
  country: saveMyCustomer_saveMyCustomer_addresses_country;
33
33
  district: saveMyCustomer_saveMyCustomer_addresses_district | null;
34
- id: string | null;
34
+ id: string;
35
35
  firstName: string;
36
36
  isDefault: boolean | null;
37
37
  lastName: string;
@@ -44,7 +44,7 @@ export interface saveMyCustomer_saveMyCustomer_addresses {
44
44
  }
45
45
  export interface saveMyCustomer_saveMyCustomer {
46
46
  __typename: "Customer";
47
- id: string | null;
47
+ id: string;
48
48
  isEmailVerified: boolean | null;
49
49
  isPhoneVerified: boolean | null;
50
50
  lastName: string | null;
@@ -1,7 +1,7 @@
1
1
  import { StringFilterInput } from "../../../__generated__/global-types";
2
2
  export interface listDistrict_listDistrict {
3
3
  __typename: "District";
4
- id: string | null;
4
+ id: string;
5
5
  name: string;
6
6
  }
7
7
  export interface listDistrict {
@@ -1,6 +1,6 @@
1
1
  export interface listFavoriteProducts_listFavoriteProducts {
2
2
  __typename: "CustomerFavoriteProduct";
3
- id: string | null;
3
+ id: string;
4
4
  createdAt: any | null;
5
5
  updatedAt: any | null;
6
6
  deleted: boolean | null;
@@ -40,7 +40,7 @@ export interface listProduct_listProduct_data_variants_prices {
40
40
  }
41
41
  export interface listProduct_listProduct_data_variants {
42
42
  __typename: "Variant";
43
- id: string | null;
43
+ id: string;
44
44
  createdAt: any | null;
45
45
  updatedAt: any | null;
46
46
  deleted: boolean | null;
@@ -60,7 +60,7 @@ export interface listProduct_listProduct_data_attributes {
60
60
  }
61
61
  export interface listProduct_listProduct_data {
62
62
  __typename: "Product";
63
- id: string | null;
63
+ id: string;
64
64
  createdAt: any | null;
65
65
  updatedAt: any | null;
66
66
  deleted: boolean | null;
@@ -1,7 +1,7 @@
1
1
  import { StringFilterInput, ProductAttributeTypeEnum } from "../../../__generated__/global-types";
2
2
  export interface listProductAttribute_listProductAttribute_options {
3
3
  __typename: "ProductAttributeOption";
4
- id: string | null;
4
+ id: string;
5
5
  createdAt: any | null;
6
6
  updatedAt: any | null;
7
7
  deleted: boolean | null;
@@ -9,7 +9,7 @@ export interface listProductAttribute_listProductAttribute_options {
9
9
  }
10
10
  export interface listProductAttribute_listProductAttribute {
11
11
  __typename: "ProductAttribute";
12
- id: string | null;
12
+ id: string;
13
13
  createdAt: any | null;
14
14
  updatedAt: any | null;
15
15
  deleted: boolean | null;
@@ -1,5 +1,5 @@
1
1
  import { ProductFilterDisplayTypeEnum, ProductFilterTypeEnum, ProductFilterSortTypeEnum } from "../../../__generated__/global-types";
2
- export interface getProductFilterData_getProductFilterData_values {
2
+ export interface getProductFilterData_getProductFilterData_filters_values {
3
3
  __typename: "ApplicableProductFilterValue";
4
4
  colorCode: string | null;
5
5
  id: string;
@@ -7,15 +7,15 @@ export interface getProductFilterData_getProductFilterData_values {
7
7
  name: string;
8
8
  thumbnailImageId: string | null;
9
9
  }
10
- export interface getProductFilterData_getProductFilterData_settings {
10
+ export interface getProductFilterData_getProductFilterData_filters_settings {
11
11
  __typename: "ProductFilterSettings";
12
12
  showCollapsedOnDesktop: boolean;
13
13
  showCollapsedOnMobile: boolean;
14
14
  sortType: ProductFilterSortTypeEnum;
15
15
  useAndFilter: boolean | null;
16
16
  }
17
- export interface getProductFilterData_getProductFilterData {
18
- __typename: "ProductFilterData";
17
+ export interface getProductFilterData_getProductFilterData_filters {
18
+ __typename: "ProductFilterDataFilter";
19
19
  customValues: string[] | null;
20
20
  displayType: ProductFilterDisplayTypeEnum;
21
21
  id: string;
@@ -24,12 +24,27 @@ export interface getProductFilterData_getProductFilterData {
24
24
  name: string;
25
25
  order: number;
26
26
  type: ProductFilterTypeEnum;
27
- values: getProductFilterData_getProductFilterData_values[] | null;
28
- settings: getProductFilterData_getProductFilterData_settings | null;
27
+ values: getProductFilterData_getProductFilterData_filters_values[] | null;
28
+ settings: getProductFilterData_getProductFilterData_filters_settings | null;
29
+ }
30
+ export interface getProductFilterData_getProductFilterData_categories_metaData {
31
+ __typename: "HTMLMetaData";
32
+ slug: string;
33
+ }
34
+ export interface getProductFilterData_getProductFilterData_categories {
35
+ __typename: "Category";
36
+ id: string;
37
+ name: string;
38
+ metaData: getProductFilterData_getProductFilterData_categories_metaData | null;
39
+ }
40
+ export interface getProductFilterData_getProductFilterData {
41
+ __typename: "ProductFilterData";
42
+ filters: getProductFilterData_getProductFilterData_filters[];
43
+ categories: getProductFilterData_getProductFilterData_categories[] | null;
29
44
  }
30
45
  export interface getProductFilterData {
31
- getProductFilterData: getProductFilterData_getProductFilterData[];
46
+ getProductFilterData: getProductFilterData_getProductFilterData;
32
47
  }
33
48
  export interface getProductFilterDataVariables {
34
- categoryIds?: string[] | null;
49
+ categoryId?: string | null;
35
50
  }
@@ -2,6 +2,7 @@ import { SearchInput } from "../../__generated__/global-types";
2
2
  import { IkasProduct } from "../../models/index";
3
3
  import * as SearchProductTypes from "./__generated__/searchProducts";
4
4
  import { IkasProductFilter } from "../../models/data/product-filter/index";
5
+ import { IkasCategoryPath } from "../../models/data/category/index";
5
6
  export declare class IkasProductSearchAPI {
6
7
  static searchProducts(input: SearchInput): Promise<{
7
8
  data: IkasProduct[];
@@ -12,5 +13,8 @@ export declare class IkasProductSearchAPI {
12
13
  page: number;
13
14
  totalCount: number;
14
15
  } | undefined>;
15
- static getProductFilterData(categoryIds?: string[]): Promise<IkasProductFilter[] | undefined>;
16
+ static getProductFilterData(categoryId?: string): Promise<{
17
+ filters: IkasProductFilter[];
18
+ categories: IkasCategoryPath[] | null;
19
+ } | undefined>;
16
20
  }
@@ -1,7 +1,7 @@
1
1
  import { StringFilterInput } from "../../../__generated__/global-types";
2
2
  export interface listState_listState {
3
3
  __typename: "State";
4
- id: string | null;
4
+ id: string;
5
5
  name: string;
6
6
  stateCode: string | null;
7
7
  }
@@ -1,6 +1,6 @@
1
1
  export interface listStockLocation_listStockLocation {
2
2
  __typename: "StockLocation";
3
- id: string | null;
3
+ id: string;
4
4
  }
5
5
  export interface listStockLocation {
6
6
  listStockLocation: listStockLocation_listStockLocation[];
@@ -1,6 +1,6 @@
1
1
  export interface getStorefront_getStorefront_regions {
2
2
  __typename: "StorefrontRegion";
3
- id: string | null;
3
+ id: string;
4
4
  locale: string;
5
5
  privacyPolicy: string | null;
6
6
  returnPolicy: string | null;
@@ -8,7 +8,7 @@ export interface getStorefront_getStorefront_regions {
8
8
  }
9
9
  export interface getStorefront_getStorefront {
10
10
  __typename: "Storefront";
11
- id: string | null;
11
+ id: string;
12
12
  name: string;
13
13
  themeId: string;
14
14
  themeVersionId: string;
@@ -1,7 +1,7 @@
1
1
  import { StringFilterInput, VariantSelectionTypeEnum } from "../../../__generated__/global-types";
2
2
  export interface listVariantType_listVariantType_values {
3
3
  __typename: "VariantValue";
4
- id: string | null;
4
+ id: string;
5
5
  createdAt: any | null;
6
6
  updatedAt: any | null;
7
7
  deleted: boolean | null;
@@ -11,7 +11,7 @@ export interface listVariantType_listVariantType_values {
11
11
  }
12
12
  export interface listVariantType_listVariantType {
13
13
  __typename: "VariantType";
14
- id: string | null;
14
+ id: string;
15
15
  createdAt: any | null;
16
16
  updatedAt: any | null;
17
17
  deleted: boolean | null;
package/build/index.es.js CHANGED
@@ -18512,6 +18512,7 @@ var IkasProductList = /** @class */ (function () {
18512
18512
  function IkasProductList(data, router) {
18513
18513
  var _this = this;
18514
18514
  this.filters = null;
18515
+ this.filterCategories = null;
18515
18516
  this._initialized = false;
18516
18517
  this._minPage = null;
18517
18518
  this._filterBrandId = null;
@@ -18748,6 +18749,9 @@ var IkasProductList = /** @class */ (function () {
18748
18749
  this.filters = data.filters
18749
18750
  ? data.filters.map(function (f) { return new IkasProductFilter(f); })
18750
18751
  : null;
18752
+ this.filterCategories = data.filterCategories
18753
+ ? data.filterCategories.map(function (c) { return new IkasCategoryPath(c); })
18754
+ : null;
18751
18755
  this.router = router;
18752
18756
  makeAutoObservable(this);
18753
18757
  if (this.isBrowser() && location.search) {
@@ -18924,14 +18928,14 @@ var IkasProductList = /** @class */ (function () {
18924
18928
  };
18925
18929
  IkasProductList.prototype.getFilters = function () {
18926
18930
  return __awaiter(this, void 0, void 0, function () {
18927
- var _a;
18928
- return __generator(this, function (_b) {
18929
- switch (_b.label) {
18930
- case 0:
18931
- _a = this;
18932
- return [4 /*yield*/, IkasProductSearchAPI.getProductFilterData()];
18931
+ var getFiltersResponse;
18932
+ return __generator(this, function (_a) {
18933
+ switch (_a.label) {
18934
+ case 0: return [4 /*yield*/, IkasProductSearchAPI.getProductFilterData(this._filterCategoryId ? this._filterCategoryId : undefined)];
18933
18935
  case 1:
18934
- _a.filters = _b.sent();
18936
+ getFiltersResponse = _a.sent();
18937
+ this.filters = getFiltersResponse === null || getFiltersResponse === void 0 ? void 0 : getFiltersResponse.filters;
18938
+ this.filterCategories = getFiltersResponse === null || getFiltersResponse === void 0 ? void 0 : getFiltersResponse.categories;
18935
18939
  if (this.filters)
18936
18940
  this.filters.sort(function (f1, f2) { return (f1.order > f2.order ? 1 : -1); });
18937
18941
  return [2 /*return*/];
@@ -18959,7 +18963,8 @@ var IkasProductList = /** @class */ (function () {
18959
18963
  }
18960
18964
  else {
18961
18965
  (_c = filter.values) === null || _c === void 0 ? void 0 : _c.forEach(function (filterValue) {
18962
- if (valueKeys.includes(filterValue.key))
18966
+ if (valueKeys.includes(filterValue.key) &&
18967
+ filterValue.resultCount !== 0)
18963
18968
  filterValue.isSelected = true;
18964
18969
  });
18965
18970
  }
@@ -18994,6 +18999,10 @@ var IkasProductList = /** @class */ (function () {
18994
18999
  }
18995
19000
  });
18996
19001
  };
19002
+ IkasProductList.prototype.onFilterCategoryClick = function (category) {
19003
+ var _a;
19004
+ (_a = this.router) === null || _a === void 0 ? void 0 : _a.push(category.href + window.location.search);
19005
+ };
18997
19006
  IkasProductList.prototype.toJSON = function () {
18998
19007
  return {
18999
19008
  data: this.data,
@@ -21781,14 +21790,14 @@ var IkasCategoryAPI = /** @class */ (function () {
21781
21790
  }
21782
21791
  IkasCategoryAPI.listCategories = function (params) {
21783
21792
  return __awaiter(this, void 0, void 0, function () {
21784
- var LIST_QUERY, _a, data, errors, count, categories, err_1;
21793
+ var LIST_QUERY, _a, data, errors, count, categories, _loop_1, this_1, i, err_1, err_2;
21785
21794
  return __generator(this, function (_b) {
21786
21795
  switch (_b.label) {
21787
21796
  case 0:
21788
- LIST_QUERY = src(templateObject_1$2 || (templateObject_1$2 = __makeTemplateObject(["\n query listCategory(\n $id: StringFilterInput\n $pagination: PaginationInput\n $name: StringFilterInput\n ) {\n listCategory(id: $id, pagination: $pagination, name: $name) {\n data {\n id\n createdAt\n updatedAt\n deleted\n name\n parentId\n imageId\n metaData {\n slug\n pageTitle\n description\n targetId\n targetType\n redirectTo\n }\n }\n count\n }\n }\n "], ["\n query listCategory(\n $id: StringFilterInput\n $pagination: PaginationInput\n $name: StringFilterInput\n ) {\n listCategory(id: $id, pagination: $pagination, name: $name) {\n data {\n id\n createdAt\n updatedAt\n deleted\n name\n parentId\n imageId\n metaData {\n slug\n pageTitle\n description\n targetId\n targetType\n redirectTo\n }\n }\n count\n }\n }\n "])));
21797
+ LIST_QUERY = src(templateObject_1$2 || (templateObject_1$2 = __makeTemplateObject(["\n query listCategory(\n $id: StringFilterInput\n $pagination: PaginationInput\n $name: StringFilterInput\n ) {\n listCategory(id: $id, pagination: $pagination, name: $name) {\n data {\n id\n createdAt\n updatedAt\n deleted\n name\n parentId\n imageId\n metaData {\n slug\n pageTitle\n description\n targetId\n targetType\n redirectTo\n }\n categoryPath\n }\n count\n }\n }\n "], ["\n query listCategory(\n $id: StringFilterInput\n $pagination: PaginationInput\n $name: StringFilterInput\n ) {\n listCategory(id: $id, pagination: $pagination, name: $name) {\n data {\n id\n createdAt\n updatedAt\n deleted\n name\n parentId\n imageId\n metaData {\n slug\n pageTitle\n description\n targetId\n targetType\n redirectTo\n }\n categoryPath\n }\n count\n }\n }\n "])));
21789
21798
  _b.label = 1;
21790
21799
  case 1:
21791
- _b.trys.push([1, 3, , 4]);
21800
+ _b.trys.push([1, 10, , 11]);
21792
21801
  return [4 /*yield*/, apollo
21793
21802
  .getClient()
21794
21803
  .query({
@@ -21828,18 +21837,66 @@ var IkasCategoryAPI = /** @class */ (function () {
21828
21837
  image: c.imageId ? new IkasImage(c.imageId) : undefined,
21829
21838
  });
21830
21839
  });
21831
- return [2 /*return*/, {
21832
- categories: categories,
21833
- count: count,
21834
- }];
21840
+ _b.label = 3;
21835
21841
  case 3:
21842
+ _b.trys.push([3, 8, , 9]);
21843
+ _loop_1 = function (i) {
21844
+ var categoryPath, path_1, listCategoriesResult_1;
21845
+ return __generator(this, function (_a) {
21846
+ switch (_a.label) {
21847
+ case 0:
21848
+ categoryPath = data.listCategory.data[i].categoryPath;
21849
+ if (!(categoryPath && categoryPath.length)) return [3 /*break*/, 2];
21850
+ path_1 = [];
21851
+ return [4 /*yield*/, this_1.listCategories({
21852
+ idList: categoryPath,
21853
+ })];
21854
+ case 1:
21855
+ listCategoriesResult_1 = _a.sent();
21856
+ categoryPath.forEach(function (categoryId) {
21857
+ var _a;
21858
+ var category = listCategoriesResult_1.categories.find(function (c) { return c.id === categoryId; });
21859
+ path_1.push(new IkasCategoryPath({
21860
+ id: category.id,
21861
+ name: category.name,
21862
+ slug: (_a = category.metaData) === null || _a === void 0 ? void 0 : _a.slug,
21863
+ }));
21864
+ });
21865
+ categories[i].path = path_1;
21866
+ _a.label = 2;
21867
+ case 2: return [2 /*return*/];
21868
+ }
21869
+ });
21870
+ };
21871
+ this_1 = this;
21872
+ i = 0;
21873
+ _b.label = 4;
21874
+ case 4:
21875
+ if (!(i < data.listCategory.data.length)) return [3 /*break*/, 7];
21876
+ return [5 /*yield**/, _loop_1(i)];
21877
+ case 5:
21878
+ _b.sent();
21879
+ _b.label = 6;
21880
+ case 6:
21881
+ i++;
21882
+ return [3 /*break*/, 4];
21883
+ case 7: return [3 /*break*/, 9];
21884
+ case 8:
21836
21885
  err_1 = _b.sent();
21837
21886
  console.log(err_1);
21887
+ return [3 /*break*/, 9];
21888
+ case 9: return [2 /*return*/, {
21889
+ categories: categories,
21890
+ count: count,
21891
+ }];
21892
+ case 10:
21893
+ err_2 = _b.sent();
21894
+ console.log(err_2);
21838
21895
  return [2 /*return*/, {
21839
21896
  categories: [],
21840
21897
  count: 0,
21841
21898
  }];
21842
- case 4: return [2 /*return*/];
21899
+ case 11: return [2 /*return*/];
21843
21900
  }
21844
21901
  });
21845
21902
  });
@@ -23144,20 +23201,20 @@ var IkasProductSearchAPI = /** @class */ (function () {
23144
23201
  });
23145
23202
  });
23146
23203
  };
23147
- IkasProductSearchAPI.getProductFilterData = function (categoryIds) {
23204
+ IkasProductSearchAPI.getProductFilterData = function (categoryId) {
23148
23205
  return __awaiter(this, void 0, void 0, function () {
23149
23206
  var QUERY, _a, data, errors, err_2;
23150
23207
  return __generator(this, function (_b) {
23151
23208
  switch (_b.label) {
23152
23209
  case 0:
23153
23210
  _b.trys.push([0, 2, , 3]);
23154
- QUERY = src(templateObject_2$4 || (templateObject_2$4 = __makeTemplateObject(["\n query getProductFilterData($categoryIds: [String!]) {\n getProductFilterData(categoryIds: $categoryIds) {\n customValues\n displayType\n id\n isMultiSelect\n key\n name\n order\n type\n values {\n colorCode\n id\n key\n name\n thumbnailImageId\n }\n settings {\n showCollapsedOnDesktop\n showCollapsedOnMobile\n sortType\n useAndFilter\n }\n }\n }\n "], ["\n query getProductFilterData($categoryIds: [String!]) {\n getProductFilterData(categoryIds: $categoryIds) {\n customValues\n displayType\n id\n isMultiSelect\n key\n name\n order\n type\n values {\n colorCode\n id\n key\n name\n thumbnailImageId\n }\n settings {\n showCollapsedOnDesktop\n showCollapsedOnMobile\n sortType\n useAndFilter\n }\n }\n }\n "])));
23211
+ QUERY = src(templateObject_2$4 || (templateObject_2$4 = __makeTemplateObject(["\n query getProductFilterData($categoryId: String) {\n getProductFilterData(categoryId: $categoryId) {\n filters {\n customValues\n displayType\n id\n isMultiSelect\n key\n name\n order\n type\n values {\n colorCode\n id\n key\n name\n thumbnailImageId\n }\n settings {\n showCollapsedOnDesktop\n showCollapsedOnMobile\n sortType\n useAndFilter\n }\n }\n categories {\n id\n name\n metaData {\n slug\n }\n }\n }\n }\n "], ["\n query getProductFilterData($categoryId: String) {\n getProductFilterData(categoryId: $categoryId) {\n filters {\n customValues\n displayType\n id\n isMultiSelect\n key\n name\n order\n type\n values {\n colorCode\n id\n key\n name\n thumbnailImageId\n }\n settings {\n showCollapsedOnDesktop\n showCollapsedOnMobile\n sortType\n useAndFilter\n }\n }\n categories {\n id\n name\n metaData {\n slug\n }\n }\n }\n }\n "])));
23155
23212
  return [4 /*yield*/, apollo
23156
23213
  .getClient()
23157
23214
  .query({
23158
23215
  query: QUERY,
23159
23216
  variables: {
23160
- categoryIds: categoryIds || null,
23217
+ categoryId: categoryId || null,
23161
23218
  },
23162
23219
  })];
23163
23220
  case 1:
@@ -23166,12 +23223,24 @@ var IkasProductSearchAPI = /** @class */ (function () {
23166
23223
  console.log(errors);
23167
23224
  return [2 /*return*/];
23168
23225
  }
23169
- return [2 /*return*/, data.getProductFilterData.map(function (d) {
23170
- var _a;
23171
- return new IkasProductFilter(__assign(__assign({}, d), { displayType: d.displayType, type: d.type, values: (_a = d.values) === null || _a === void 0 ? void 0 : _a.map(function (v) { return new IkasApplicableProductFilterValue(v); }), settings: d.settings
23172
- ? new IkasProductFilterSettings(__assign(__assign({}, d.settings), { sortType: d.settings.sortType }))
23173
- : null }));
23174
- })];
23226
+ return [2 /*return*/, {
23227
+ filters: data.getProductFilterData.filters.map(function (d) {
23228
+ var _a;
23229
+ return new IkasProductFilter(__assign(__assign({}, d), { displayType: d.displayType, type: d.type, values: (_a = d.values) === null || _a === void 0 ? void 0 : _a.map(function (v) { return new IkasApplicableProductFilterValue(v); }), settings: d.settings
23230
+ ? new IkasProductFilterSettings(__assign(__assign({}, d.settings), { sortType: d.settings.sortType }))
23231
+ : null }));
23232
+ }),
23233
+ categories: data.getProductFilterData.categories
23234
+ ? data.getProductFilterData.categories.map(function (c) {
23235
+ var _a;
23236
+ return new IkasCategoryPath({
23237
+ id: c.id,
23238
+ name: c.name,
23239
+ slug: (_a = c.metaData) === null || _a === void 0 ? void 0 : _a.slug,
23240
+ });
23241
+ })
23242
+ : null,
23243
+ }];
23175
23244
  case 2:
23176
23245
  err_2 = _b.sent();
23177
23246
  console.log(err_2);
package/build/index.js CHANGED
@@ -18493,6 +18493,7 @@ var IkasProductList = /** @class */ (function () {
18493
18493
  function IkasProductList(data, router) {
18494
18494
  var _this = this;
18495
18495
  this.filters = null;
18496
+ this.filterCategories = null;
18496
18497
  this._initialized = false;
18497
18498
  this._minPage = null;
18498
18499
  this._filterBrandId = null;
@@ -18729,6 +18730,9 @@ var IkasProductList = /** @class */ (function () {
18729
18730
  this.filters = data.filters
18730
18731
  ? data.filters.map(function (f) { return new IkasProductFilter(f); })
18731
18732
  : null;
18733
+ this.filterCategories = data.filterCategories
18734
+ ? data.filterCategories.map(function (c) { return new IkasCategoryPath(c); })
18735
+ : null;
18732
18736
  this.router = router;
18733
18737
  mobx.makeAutoObservable(this);
18734
18738
  if (this.isBrowser() && location.search) {
@@ -18905,14 +18909,14 @@ var IkasProductList = /** @class */ (function () {
18905
18909
  };
18906
18910
  IkasProductList.prototype.getFilters = function () {
18907
18911
  return __awaiter(this, void 0, void 0, function () {
18908
- var _a;
18909
- return __generator(this, function (_b) {
18910
- switch (_b.label) {
18911
- case 0:
18912
- _a = this;
18913
- return [4 /*yield*/, IkasProductSearchAPI.getProductFilterData()];
18912
+ var getFiltersResponse;
18913
+ return __generator(this, function (_a) {
18914
+ switch (_a.label) {
18915
+ case 0: return [4 /*yield*/, IkasProductSearchAPI.getProductFilterData(this._filterCategoryId ? this._filterCategoryId : undefined)];
18914
18916
  case 1:
18915
- _a.filters = _b.sent();
18917
+ getFiltersResponse = _a.sent();
18918
+ this.filters = getFiltersResponse === null || getFiltersResponse === void 0 ? void 0 : getFiltersResponse.filters;
18919
+ this.filterCategories = getFiltersResponse === null || getFiltersResponse === void 0 ? void 0 : getFiltersResponse.categories;
18916
18920
  if (this.filters)
18917
18921
  this.filters.sort(function (f1, f2) { return (f1.order > f2.order ? 1 : -1); });
18918
18922
  return [2 /*return*/];
@@ -18940,7 +18944,8 @@ var IkasProductList = /** @class */ (function () {
18940
18944
  }
18941
18945
  else {
18942
18946
  (_c = filter.values) === null || _c === void 0 ? void 0 : _c.forEach(function (filterValue) {
18943
- if (valueKeys.includes(filterValue.key))
18947
+ if (valueKeys.includes(filterValue.key) &&
18948
+ filterValue.resultCount !== 0)
18944
18949
  filterValue.isSelected = true;
18945
18950
  });
18946
18951
  }
@@ -18975,6 +18980,10 @@ var IkasProductList = /** @class */ (function () {
18975
18980
  }
18976
18981
  });
18977
18982
  };
18983
+ IkasProductList.prototype.onFilterCategoryClick = function (category) {
18984
+ var _a;
18985
+ (_a = this.router) === null || _a === void 0 ? void 0 : _a.push(category.href + window.location.search);
18986
+ };
18978
18987
  IkasProductList.prototype.toJSON = function () {
18979
18988
  return {
18980
18989
  data: this.data,
@@ -21759,14 +21768,14 @@ var IkasCategoryAPI = /** @class */ (function () {
21759
21768
  }
21760
21769
  IkasCategoryAPI.listCategories = function (params) {
21761
21770
  return __awaiter(this, void 0, void 0, function () {
21762
- var LIST_QUERY, _a, data, errors, count, categories, err_1;
21771
+ var LIST_QUERY, _a, data, errors, count, categories, _loop_1, this_1, i, err_1, err_2;
21763
21772
  return __generator(this, function (_b) {
21764
21773
  switch (_b.label) {
21765
21774
  case 0:
21766
- LIST_QUERY = src(templateObject_1$2 || (templateObject_1$2 = __makeTemplateObject(["\n query listCategory(\n $id: StringFilterInput\n $pagination: PaginationInput\n $name: StringFilterInput\n ) {\n listCategory(id: $id, pagination: $pagination, name: $name) {\n data {\n id\n createdAt\n updatedAt\n deleted\n name\n parentId\n imageId\n metaData {\n slug\n pageTitle\n description\n targetId\n targetType\n redirectTo\n }\n }\n count\n }\n }\n "], ["\n query listCategory(\n $id: StringFilterInput\n $pagination: PaginationInput\n $name: StringFilterInput\n ) {\n listCategory(id: $id, pagination: $pagination, name: $name) {\n data {\n id\n createdAt\n updatedAt\n deleted\n name\n parentId\n imageId\n metaData {\n slug\n pageTitle\n description\n targetId\n targetType\n redirectTo\n }\n }\n count\n }\n }\n "])));
21775
+ LIST_QUERY = src(templateObject_1$2 || (templateObject_1$2 = __makeTemplateObject(["\n query listCategory(\n $id: StringFilterInput\n $pagination: PaginationInput\n $name: StringFilterInput\n ) {\n listCategory(id: $id, pagination: $pagination, name: $name) {\n data {\n id\n createdAt\n updatedAt\n deleted\n name\n parentId\n imageId\n metaData {\n slug\n pageTitle\n description\n targetId\n targetType\n redirectTo\n }\n categoryPath\n }\n count\n }\n }\n "], ["\n query listCategory(\n $id: StringFilterInput\n $pagination: PaginationInput\n $name: StringFilterInput\n ) {\n listCategory(id: $id, pagination: $pagination, name: $name) {\n data {\n id\n createdAt\n updatedAt\n deleted\n name\n parentId\n imageId\n metaData {\n slug\n pageTitle\n description\n targetId\n targetType\n redirectTo\n }\n categoryPath\n }\n count\n }\n }\n "])));
21767
21776
  _b.label = 1;
21768
21777
  case 1:
21769
- _b.trys.push([1, 3, , 4]);
21778
+ _b.trys.push([1, 10, , 11]);
21770
21779
  return [4 /*yield*/, apollo
21771
21780
  .getClient()
21772
21781
  .query({
@@ -21806,18 +21815,66 @@ var IkasCategoryAPI = /** @class */ (function () {
21806
21815
  image: c.imageId ? new IkasImage(c.imageId) : undefined,
21807
21816
  });
21808
21817
  });
21809
- return [2 /*return*/, {
21810
- categories: categories,
21811
- count: count,
21812
- }];
21818
+ _b.label = 3;
21813
21819
  case 3:
21820
+ _b.trys.push([3, 8, , 9]);
21821
+ _loop_1 = function (i) {
21822
+ var categoryPath, path_1, listCategoriesResult_1;
21823
+ return __generator(this, function (_a) {
21824
+ switch (_a.label) {
21825
+ case 0:
21826
+ categoryPath = data.listCategory.data[i].categoryPath;
21827
+ if (!(categoryPath && categoryPath.length)) return [3 /*break*/, 2];
21828
+ path_1 = [];
21829
+ return [4 /*yield*/, this_1.listCategories({
21830
+ idList: categoryPath,
21831
+ })];
21832
+ case 1:
21833
+ listCategoriesResult_1 = _a.sent();
21834
+ categoryPath.forEach(function (categoryId) {
21835
+ var _a;
21836
+ var category = listCategoriesResult_1.categories.find(function (c) { return c.id === categoryId; });
21837
+ path_1.push(new IkasCategoryPath({
21838
+ id: category.id,
21839
+ name: category.name,
21840
+ slug: (_a = category.metaData) === null || _a === void 0 ? void 0 : _a.slug,
21841
+ }));
21842
+ });
21843
+ categories[i].path = path_1;
21844
+ _a.label = 2;
21845
+ case 2: return [2 /*return*/];
21846
+ }
21847
+ });
21848
+ };
21849
+ this_1 = this;
21850
+ i = 0;
21851
+ _b.label = 4;
21852
+ case 4:
21853
+ if (!(i < data.listCategory.data.length)) return [3 /*break*/, 7];
21854
+ return [5 /*yield**/, _loop_1(i)];
21855
+ case 5:
21856
+ _b.sent();
21857
+ _b.label = 6;
21858
+ case 6:
21859
+ i++;
21860
+ return [3 /*break*/, 4];
21861
+ case 7: return [3 /*break*/, 9];
21862
+ case 8:
21814
21863
  err_1 = _b.sent();
21815
21864
  console.log(err_1);
21865
+ return [3 /*break*/, 9];
21866
+ case 9: return [2 /*return*/, {
21867
+ categories: categories,
21868
+ count: count,
21869
+ }];
21870
+ case 10:
21871
+ err_2 = _b.sent();
21872
+ console.log(err_2);
21816
21873
  return [2 /*return*/, {
21817
21874
  categories: [],
21818
21875
  count: 0,
21819
21876
  }];
21820
- case 4: return [2 /*return*/];
21877
+ case 11: return [2 /*return*/];
21821
21878
  }
21822
21879
  });
21823
21880
  });
@@ -23122,20 +23179,20 @@ var IkasProductSearchAPI = /** @class */ (function () {
23122
23179
  });
23123
23180
  });
23124
23181
  };
23125
- IkasProductSearchAPI.getProductFilterData = function (categoryIds) {
23182
+ IkasProductSearchAPI.getProductFilterData = function (categoryId) {
23126
23183
  return __awaiter(this, void 0, void 0, function () {
23127
23184
  var QUERY, _a, data, errors, err_2;
23128
23185
  return __generator(this, function (_b) {
23129
23186
  switch (_b.label) {
23130
23187
  case 0:
23131
23188
  _b.trys.push([0, 2, , 3]);
23132
- QUERY = src(templateObject_2$4 || (templateObject_2$4 = __makeTemplateObject(["\n query getProductFilterData($categoryIds: [String!]) {\n getProductFilterData(categoryIds: $categoryIds) {\n customValues\n displayType\n id\n isMultiSelect\n key\n name\n order\n type\n values {\n colorCode\n id\n key\n name\n thumbnailImageId\n }\n settings {\n showCollapsedOnDesktop\n showCollapsedOnMobile\n sortType\n useAndFilter\n }\n }\n }\n "], ["\n query getProductFilterData($categoryIds: [String!]) {\n getProductFilterData(categoryIds: $categoryIds) {\n customValues\n displayType\n id\n isMultiSelect\n key\n name\n order\n type\n values {\n colorCode\n id\n key\n name\n thumbnailImageId\n }\n settings {\n showCollapsedOnDesktop\n showCollapsedOnMobile\n sortType\n useAndFilter\n }\n }\n }\n "])));
23189
+ QUERY = src(templateObject_2$4 || (templateObject_2$4 = __makeTemplateObject(["\n query getProductFilterData($categoryId: String) {\n getProductFilterData(categoryId: $categoryId) {\n filters {\n customValues\n displayType\n id\n isMultiSelect\n key\n name\n order\n type\n values {\n colorCode\n id\n key\n name\n thumbnailImageId\n }\n settings {\n showCollapsedOnDesktop\n showCollapsedOnMobile\n sortType\n useAndFilter\n }\n }\n categories {\n id\n name\n metaData {\n slug\n }\n }\n }\n }\n "], ["\n query getProductFilterData($categoryId: String) {\n getProductFilterData(categoryId: $categoryId) {\n filters {\n customValues\n displayType\n id\n isMultiSelect\n key\n name\n order\n type\n values {\n colorCode\n id\n key\n name\n thumbnailImageId\n }\n settings {\n showCollapsedOnDesktop\n showCollapsedOnMobile\n sortType\n useAndFilter\n }\n }\n categories {\n id\n name\n metaData {\n slug\n }\n }\n }\n }\n "])));
23133
23190
  return [4 /*yield*/, apollo
23134
23191
  .getClient()
23135
23192
  .query({
23136
23193
  query: QUERY,
23137
23194
  variables: {
23138
- categoryIds: categoryIds || null,
23195
+ categoryId: categoryId || null,
23139
23196
  },
23140
23197
  })];
23141
23198
  case 1:
@@ -23144,12 +23201,24 @@ var IkasProductSearchAPI = /** @class */ (function () {
23144
23201
  console.log(errors);
23145
23202
  return [2 /*return*/];
23146
23203
  }
23147
- return [2 /*return*/, data.getProductFilterData.map(function (d) {
23148
- var _a;
23149
- return new IkasProductFilter(__assign(__assign({}, d), { displayType: d.displayType, type: d.type, values: (_a = d.values) === null || _a === void 0 ? void 0 : _a.map(function (v) { return new IkasApplicableProductFilterValue(v); }), settings: d.settings
23150
- ? new IkasProductFilterSettings(__assign(__assign({}, d.settings), { sortType: d.settings.sortType }))
23151
- : null }));
23152
- })];
23204
+ return [2 /*return*/, {
23205
+ filters: data.getProductFilterData.filters.map(function (d) {
23206
+ var _a;
23207
+ return new IkasProductFilter(__assign(__assign({}, d), { displayType: d.displayType, type: d.type, values: (_a = d.values) === null || _a === void 0 ? void 0 : _a.map(function (v) { return new IkasApplicableProductFilterValue(v); }), settings: d.settings
23208
+ ? new IkasProductFilterSettings(__assign(__assign({}, d.settings), { sortType: d.settings.sortType }))
23209
+ : null }));
23210
+ }),
23211
+ categories: data.getProductFilterData.categories
23212
+ ? data.getProductFilterData.categories.map(function (c) {
23213
+ var _a;
23214
+ return new IkasCategoryPath({
23215
+ id: c.id,
23216
+ name: c.name,
23217
+ slug: (_a = c.metaData) === null || _a === void 0 ? void 0 : _a.slug,
23218
+ });
23219
+ })
23220
+ : null,
23221
+ }];
23153
23222
  case 2:
23154
23223
  err_2 = _b.sent();
23155
23224
  console.log(err_2);
@@ -2,9 +2,11 @@ import { IkasProductListPropValue } from "../../theme/index";
2
2
  import { IkasProductDetail } from "../product-detail/index";
3
3
  import { IkasProductFilter } from "../../data/product-filter/index";
4
4
  import { NextRouter } from "next/router";
5
+ import { IkasCategoryPath } from "../../data/category/index";
5
6
  export declare class IkasProductList {
6
7
  data: IkasProductDetail[];
7
8
  filters?: IkasProductFilter[] | null;
9
+ filterCategories?: IkasCategoryPath[] | null;
8
10
  private _type;
9
11
  private _sort;
10
12
  private _limit;
@@ -47,6 +49,7 @@ export declare class IkasProductList {
47
49
  getPrev: () => Promise<void>;
48
50
  getNext: () => Promise<void>;
49
51
  getPage: (page: number) => Promise<void>;
52
+ onFilterCategoryClick(category: IkasCategoryPath): void;
50
53
  toJSON(): {
51
54
  data: IkasProductDetail[];
52
55
  type: IkasProductListType;
@@ -79,6 +82,7 @@ export declare type IkasProductListParams = {
79
82
  filterBrandId?: string;
80
83
  filterCategoryId?: string;
81
84
  filters?: IkasProductFilter[];
85
+ filterCategories?: IkasCategoryPath[];
82
86
  recommendFor?: string;
83
87
  productListPropValue: IkasProductListPropValue;
84
88
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ikas/storefront",
3
- "version": "0.0.55",
3
+ "version": "0.0.57",
4
4
  "main": "./build/index.js",
5
5
  "module": "./build/index.es.js",
6
6
  "author": "Umut Ozan Yıldırım",