@ikas/storefront 0.0.42 → 0.0.43

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,14 @@ 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
+ }
10966
+ else {
10967
+ filters.category = null;
10968
+ }
10961
10969
  productList = new IkasProductList({
10962
10970
  productListPropValue: this.productListPropValue,
10963
10971
  filters: filters,
@@ -14081,6 +14089,7 @@ var IkasProductListType;
14081
14089
  IkasProductListType["STATIC"] = "STATIC";
14082
14090
  IkasProductListType["DISCOUNTED"] = "DISCOUNTED";
14083
14091
  IkasProductListType["RECOMMENDED"] = "RECOMMENDED";
14092
+ IkasProductListType["CATEGORY"] = "CATEGORY";
14084
14093
  })(IkasProductListType || (IkasProductListType = {}));
14085
14094
  var IkasProductListSortType;
14086
14095
  (function (IkasProductListSortType) {
@@ -19589,11 +19598,13 @@ var IkasProductListPropValue = /** @class */ (function () {
19589
19598
  // Only for collection and brand pages
19590
19599
  // Example collections/man -> lists products inside the "man" category
19591
19600
  this.usePageFilter = null;
19601
+ this.category = null;
19592
19602
  this.productListType = data.productListType || IkasProductListType.ALL;
19593
19603
  this.initialSort = data.initialSort || IkasProductListSortType.A_Z;
19594
19604
  this.initialLimit = data.initialLimit || 20;
19595
19605
  this.productCount = data.productCount;
19596
19606
  this.productIds = data.productIds;
19607
+ this.category = data.category;
19597
19608
  this.usePageFilter = data.usePageFilter;
19598
19609
  makeAutoObservable(this);
19599
19610
  }
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,14 @@ 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
+ }
10978
+ else {
10979
+ filters.category = null;
10980
+ }
10973
10981
  productList = new IkasProductList({
10974
10982
  productListPropValue: this.productListPropValue,
10975
10983
  filters: filters,
@@ -14065,6 +14073,7 @@ var IkasProductList = /** @class */ (function () {
14065
14073
  IkasProductListType["STATIC"] = "STATIC";
14066
14074
  IkasProductListType["DISCOUNTED"] = "DISCOUNTED";
14067
14075
  IkasProductListType["RECOMMENDED"] = "RECOMMENDED";
14076
+ IkasProductListType["CATEGORY"] = "CATEGORY";
14068
14077
  })(exports.IkasProductListType || (exports.IkasProductListType = {}));
14069
14078
  (function (IkasProductListSortType) {
14070
14079
  IkasProductListSortType["MOST_SOLD"] = "MOST_SOLD";
@@ -19571,11 +19580,13 @@ var IkasProductListPropValue = /** @class */ (function () {
19571
19580
  // Only for collection and brand pages
19572
19581
  // Example collections/man -> lists products inside the "man" category
19573
19582
  this.usePageFilter = null;
19583
+ this.category = null;
19574
19584
  this.productListType = data.productListType || exports.IkasProductListType.ALL;
19575
19585
  this.initialSort = data.initialSort || exports.IkasProductListSortType.A_Z;
19576
19586
  this.initialLimit = data.initialLimit || 20;
19577
19587
  this.productCount = data.productCount;
19578
19588
  this.productIds = data.productIds;
19589
+ this.category = data.category;
19579
19590
  this.usePageFilter = data.usePageFilter;
19580
19591
  mobx.makeAutoObservable(this);
19581
19592
  }
@@ -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.43",
4
4
  "main": "./build/index.js",
5
5
  "module": "./build/index.es.js",
6
6
  "author": "Umut Ozan Yıldırım",