@ikas/storefront 0.0.42 → 0.0.44

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 CHANGED
@@ -10944,8 +10944,8 @@ var IkasProductListPropValueProvider = /** @class */ (function () {
10944
10944
  return __generator(this, function (_a) {
10945
10945
  switch (_a.label) {
10946
10946
  case 0:
10947
+ filters = new IkasProductListFilter();
10947
10948
  if (this.productListPropValue.productListType === IkasProductListType.ALL) {
10948
- filters = new IkasProductListFilter();
10949
10949
  // TODO use pageParams to insert filters
10950
10950
  if (this.productListPropValue.usePageFilter) {
10951
10951
  if (this.pageType === IkasThemePageType.CATEGORY) {
@@ -10958,6 +10958,11 @@ var IkasProductListPropValueProvider = /** @class */ (function () {
10958
10958
  }
10959
10959
  }
10960
10960
  }
10961
+ if (this.productListPropValue.productListType === IkasProductListType.CATEGORY) {
10962
+ if (this.productListPropValue.category) {
10963
+ filters.category = this.productListPropValue.category;
10964
+ }
10965
+ }
10961
10966
  productList = new IkasProductList({
10962
10967
  productListPropValue: this.productListPropValue,
10963
10968
  filters: filters,
@@ -14081,6 +14086,7 @@ var IkasProductListType;
14081
14086
  IkasProductListType["STATIC"] = "STATIC";
14082
14087
  IkasProductListType["DISCOUNTED"] = "DISCOUNTED";
14083
14088
  IkasProductListType["RECOMMENDED"] = "RECOMMENDED";
14089
+ IkasProductListType["CATEGORY"] = "CATEGORY";
14084
14090
  })(IkasProductListType || (IkasProductListType = {}));
14085
14091
  var IkasProductListSortType;
14086
14092
  (function (IkasProductListSortType) {
@@ -19589,11 +19595,13 @@ var IkasProductListPropValue = /** @class */ (function () {
19589
19595
  // Only for collection and brand pages
19590
19596
  // Example collections/man -> lists products inside the "man" category
19591
19597
  this.usePageFilter = null;
19598
+ this.category = null;
19592
19599
  this.productListType = data.productListType || IkasProductListType.ALL;
19593
19600
  this.initialSort = data.initialSort || IkasProductListSortType.A_Z;
19594
19601
  this.initialLimit = data.initialLimit || 20;
19595
19602
  this.productCount = data.productCount;
19596
19603
  this.productIds = data.productIds;
19604
+ this.category = data.category;
19597
19605
  this.usePageFilter = data.usePageFilter;
19598
19606
  makeAutoObservable(this);
19599
19607
  }
package/build/index.js CHANGED
@@ -10956,8 +10956,8 @@ var IkasProductListPropValueProvider = /** @class */ (function () {
10956
10956
  return __generator(this, function (_a) {
10957
10957
  switch (_a.label) {
10958
10958
  case 0:
10959
+ filters = new IkasProductListFilter();
10959
10960
  if (this.productListPropValue.productListType === exports.IkasProductListType.ALL) {
10960
- filters = new IkasProductListFilter();
10961
10961
  // TODO use pageParams to insert filters
10962
10962
  if (this.productListPropValue.usePageFilter) {
10963
10963
  if (this.pageType === exports.IkasThemePageType.CATEGORY) {
@@ -10970,6 +10970,11 @@ var IkasProductListPropValueProvider = /** @class */ (function () {
10970
10970
  }
10971
10971
  }
10972
10972
  }
10973
+ if (this.productListPropValue.productListType === exports.IkasProductListType.CATEGORY) {
10974
+ if (this.productListPropValue.category) {
10975
+ filters.category = this.productListPropValue.category;
10976
+ }
10977
+ }
10973
10978
  productList = new IkasProductList({
10974
10979
  productListPropValue: this.productListPropValue,
10975
10980
  filters: filters,
@@ -14065,6 +14070,7 @@ var IkasProductList = /** @class */ (function () {
14065
14070
  IkasProductListType["STATIC"] = "STATIC";
14066
14071
  IkasProductListType["DISCOUNTED"] = "DISCOUNTED";
14067
14072
  IkasProductListType["RECOMMENDED"] = "RECOMMENDED";
14073
+ IkasProductListType["CATEGORY"] = "CATEGORY";
14068
14074
  })(exports.IkasProductListType || (exports.IkasProductListType = {}));
14069
14075
  (function (IkasProductListSortType) {
14070
14076
  IkasProductListSortType["MOST_SOLD"] = "MOST_SOLD";
@@ -19571,11 +19577,13 @@ var IkasProductListPropValue = /** @class */ (function () {
19571
19577
  // Only for collection and brand pages
19572
19578
  // Example collections/man -> lists products inside the "man" category
19573
19579
  this.usePageFilter = null;
19580
+ this.category = null;
19574
19581
  this.productListType = data.productListType || exports.IkasProductListType.ALL;
19575
19582
  this.initialSort = data.initialSort || exports.IkasProductListSortType.A_Z;
19576
19583
  this.initialLimit = data.initialLimit || 20;
19577
19584
  this.productCount = data.productCount;
19578
19585
  this.productIds = data.productIds;
19586
+ this.category = data.category;
19579
19587
  this.usePageFilter = data.usePageFilter;
19580
19588
  mobx.makeAutoObservable(this);
19581
19589
  }
@@ -6,6 +6,7 @@ export declare class IkasProductListPropValue {
6
6
  productCount?: number | null;
7
7
  productIds?: IkasProductVariantId[] | null;
8
8
  usePageFilter?: boolean | null;
9
+ category?: string | null;
9
10
  constructor(data: Partial<IkasProductListPropValue>);
10
11
  }
11
12
  declare type IkasProductVariantId = {
@@ -62,7 +62,8 @@ export declare enum IkasProductListType {
62
62
  ALL = "ALL",
63
63
  STATIC = "STATIC",
64
64
  DISCOUNTED = "DISCOUNTED",
65
- RECOMMENDED = "RECOMMENDED"
65
+ RECOMMENDED = "RECOMMENDED",
66
+ CATEGORY = "CATEGORY"
66
67
  }
67
68
  export declare enum IkasProductListSortType {
68
69
  MOST_SOLD = "MOST_SOLD",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ikas/storefront",
3
- "version": "0.0.42",
3
+ "version": "0.0.44",
4
4
  "main": "./build/index.js",
5
5
  "module": "./build/index.es.js",
6
6
  "author": "Umut Ozan Yıldırım",