@ikas/storefront 0.0.75 → 0.0.77

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
@@ -19818,6 +19818,8 @@ var IkasProductList = /** @class */ (function () {
19818
19818
  return new IkasProductDetail(product, product.variants[0].variantValues);
19819
19819
  });
19820
19820
  }
19821
+ console.log("getInitial data log");
19822
+ console.log(data);
19821
19823
  this.applyFacets(response_1.facets);
19822
19824
  this.data = data;
19823
19825
  this._count = response_1.count;
@@ -20023,6 +20025,8 @@ var IkasProductList = /** @class */ (function () {
20023
20025
  return this._searchKeyword;
20024
20026
  },
20025
20027
  set: function (value) {
20028
+ if (value === this._searchKeyword)
20029
+ return;
20026
20030
  this._searchKeyword = value;
20027
20031
  this.searchDebouncer();
20028
20032
  },
@@ -20259,7 +20263,8 @@ var IkasProductList = /** @class */ (function () {
20259
20263
  };
20260
20264
  IkasProductList.prototype.onFilterCategoryClick = function (filterCategory) {
20261
20265
  var _a;
20262
- (_a = this.router) === null || _a === void 0 ? void 0 : _a.push(filterCategory.href + window.location.search);
20266
+ (_a = this.router) === null || _a === void 0 ? void 0 : _a.push(filterCategory.href +
20267
+ (this.filterQueryParams ? "?" + this.filterQueryParams : ""));
20263
20268
  };
20264
20269
  IkasProductList.prototype.toJSON = function () {
20265
20270
  return {
@@ -27257,6 +27262,10 @@ var ThemeComponent = observer(function (_a) {
27257
27262
  var IkasPage = observer(function (_a) {
27258
27263
  var _b, _c;
27259
27264
  var propValues = _a.propValues, page = _a.page, pageSpecificDataStr = _a.pageSpecificDataStr, settingsStr = _a.settingsStr, merchantSettings = _a.merchantSettings, addOgpMetas = _a.addOgpMetas;
27265
+ var store = IkasStorefrontConfig.store;
27266
+ if (page) {
27267
+ store.currentPageType = page.type;
27268
+ }
27260
27269
  var renderComponent = function (pageComponent, index) {
27261
27270
  var pageComponentPropValue = propValues.find(function (pv) { return pv.pageComponent.id === pageComponent.id; });
27262
27271
  return (createElement(ThemeComponent, { key: pageComponent.id, index: index, pageComponentPropValue: pageComponentPropValue, pageComponent: pageComponent, settingsStr: settingsStr }));
@@ -28374,8 +28383,12 @@ configure({
28374
28383
  });
28375
28384
  var IkasBaseStore = /** @class */ (function () {
28376
28385
  function IkasBaseStore() {
28386
+ this.currentPageType = null;
28377
28387
  this.customerStore = new IkasCustomerStore(this);
28378
28388
  this.cartStore = new IkasCartStore(this);
28389
+ makeObservable(this, {
28390
+ currentPageType: observable,
28391
+ });
28379
28392
  }
28380
28393
  return IkasBaseStore;
28381
28394
  }());
package/build/index.js CHANGED
@@ -19801,6 +19801,8 @@ var IkasProductList = /** @class */ (function () {
19801
19801
  return new IkasProductDetail(product, product.variants[0].variantValues);
19802
19802
  });
19803
19803
  }
19804
+ console.log("getInitial data log");
19805
+ console.log(data);
19804
19806
  this.applyFacets(response_1.facets);
19805
19807
  this.data = data;
19806
19808
  this._count = response_1.count;
@@ -20006,6 +20008,8 @@ var IkasProductList = /** @class */ (function () {
20006
20008
  return this._searchKeyword;
20007
20009
  },
20008
20010
  set: function (value) {
20011
+ if (value === this._searchKeyword)
20012
+ return;
20009
20013
  this._searchKeyword = value;
20010
20014
  this.searchDebouncer();
20011
20015
  },
@@ -20242,7 +20246,8 @@ var IkasProductList = /** @class */ (function () {
20242
20246
  };
20243
20247
  IkasProductList.prototype.onFilterCategoryClick = function (filterCategory) {
20244
20248
  var _a;
20245
- (_a = this.router) === null || _a === void 0 ? void 0 : _a.push(filterCategory.href + window.location.search);
20249
+ (_a = this.router) === null || _a === void 0 ? void 0 : _a.push(filterCategory.href +
20250
+ (this.filterQueryParams ? "?" + this.filterQueryParams : ""));
20246
20251
  };
20247
20252
  IkasProductList.prototype.toJSON = function () {
20248
20253
  return {
@@ -27237,6 +27242,10 @@ var ThemeComponent = mobxReactLite.observer(function (_a) {
27237
27242
  var IkasPage = mobxReactLite.observer(function (_a) {
27238
27243
  var _b, _c;
27239
27244
  var propValues = _a.propValues, page = _a.page, pageSpecificDataStr = _a.pageSpecificDataStr, settingsStr = _a.settingsStr, merchantSettings = _a.merchantSettings, addOgpMetas = _a.addOgpMetas;
27245
+ var store = IkasStorefrontConfig.store;
27246
+ if (page) {
27247
+ store.currentPageType = page.type;
27248
+ }
27240
27249
  var renderComponent = function (pageComponent, index) {
27241
27250
  var pageComponentPropValue = propValues.find(function (pv) { return pv.pageComponent.id === pageComponent.id; });
27242
27251
  return (React.createElement(ThemeComponent, { key: pageComponent.id, index: index, pageComponentPropValue: pageComponentPropValue, pageComponent: pageComponent, settingsStr: settingsStr }));
@@ -28354,8 +28363,12 @@ mobx.configure({
28354
28363
  });
28355
28364
  var IkasBaseStore = /** @class */ (function () {
28356
28365
  function IkasBaseStore() {
28366
+ this.currentPageType = null;
28357
28367
  this.customerStore = new IkasCustomerStore(this);
28358
28368
  this.cartStore = new IkasCartStore(this);
28369
+ mobx.makeObservable(this, {
28370
+ currentPageType: mobx.observable,
28371
+ });
28359
28372
  }
28360
28373
  return IkasBaseStore;
28361
28374
  }());
@@ -1,7 +1,9 @@
1
1
  import { IkasCartStore } from "./cart";
2
2
  import { IkasCustomerStore } from "./customer";
3
+ import { IkasThemePageType } from "../models/index";
3
4
  export declare class IkasBaseStore {
4
5
  readonly customerStore: IkasCustomerStore;
5
6
  readonly cartStore: IkasCartStore;
7
+ currentPageType?: IkasThemePageType | null;
6
8
  constructor();
7
9
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ikas/storefront",
3
- "version": "0.0.75",
3
+ "version": "0.0.77",
4
4
  "main": "./build/index.js",
5
5
  "module": "./build/index.es.js",
6
6
  "author": "Umut Ozan Yıldırım",