@ikas/storefront 0.0.2 → 0.0.4

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
@@ -1,4 +1,4 @@
1
- import { makeAutoObservable, toJS, runInAction, reaction, action, computed, configure } from 'mobx';
1
+ import { makeAutoObservable, toJS, runInAction, reaction, action, computed, makeObservable, observable, configure } from 'mobx';
2
2
  import queryString$1 from 'querystring';
3
3
  import React, { createElement, useState, useEffect, Fragment, useCallback, useRef } from 'react';
4
4
  import { observer } from 'mobx-react-lite';
@@ -22006,6 +22006,8 @@ var CHECKOUT_LS_KEY = "checkoutId";
22006
22006
  var IkasCartStore = /** @class */ (function () {
22007
22007
  function IkasCartStore(baseStore) {
22008
22008
  var _this = this;
22009
+ this.cart = null;
22010
+ this._checkoutId = null;
22009
22011
  this._isLoadingCart = false;
22010
22012
  this._cartLoadFinished = false;
22011
22013
  this.getCart = function () { return __awaiter(_this, void 0, void 0, function () {
@@ -22185,8 +22187,23 @@ var IkasCartStore = /** @class */ (function () {
22185
22187
  _this._checkoutId = undefined;
22186
22188
  };
22187
22189
  this.baseStore = baseStore;
22190
+ makeObservable(this, {
22191
+ cart: observable,
22192
+ //@ts-ignore
22193
+ baseStore: observable,
22194
+ //@ts-ignore
22195
+ _checkoutId: observable,
22196
+ //@ts-ignore
22197
+ _isLoadingCart: observable,
22198
+ //@ts-ignore
22199
+ _cartLoadFinished: observable,
22200
+ isBrowser: computed,
22201
+ isLoadingCart: computed,
22202
+ cartLoadFinished: computed,
22203
+ checkoutId: computed,
22204
+ checkoutUrl: computed,
22205
+ });
22188
22206
  this.getCart();
22189
- makeAutoObservable(this);
22190
22207
  }
22191
22208
  Object.defineProperty(IkasCartStore.prototype, "isBrowser", {
22192
22209
  get: function () {
package/build/index.js CHANGED
@@ -21992,6 +21992,8 @@ var CHECKOUT_LS_KEY = "checkoutId";
21992
21992
  var IkasCartStore = /** @class */ (function () {
21993
21993
  function IkasCartStore(baseStore) {
21994
21994
  var _this = this;
21995
+ this.cart = null;
21996
+ this._checkoutId = null;
21995
21997
  this._isLoadingCart = false;
21996
21998
  this._cartLoadFinished = false;
21997
21999
  this.getCart = function () { return __awaiter(_this, void 0, void 0, function () {
@@ -22171,8 +22173,23 @@ var IkasCartStore = /** @class */ (function () {
22171
22173
  _this._checkoutId = undefined;
22172
22174
  };
22173
22175
  this.baseStore = baseStore;
22176
+ mobx.makeObservable(this, {
22177
+ cart: mobx.observable,
22178
+ //@ts-ignore
22179
+ baseStore: mobx.observable,
22180
+ //@ts-ignore
22181
+ _checkoutId: mobx.observable,
22182
+ //@ts-ignore
22183
+ _isLoadingCart: mobx.observable,
22184
+ //@ts-ignore
22185
+ _cartLoadFinished: mobx.observable,
22186
+ isBrowser: mobx.computed,
22187
+ isLoadingCart: mobx.computed,
22188
+ cartLoadFinished: mobx.computed,
22189
+ checkoutId: mobx.computed,
22190
+ checkoutUrl: mobx.computed,
22191
+ });
22174
22192
  this.getCart();
22175
- mobx.makeAutoObservable(this);
22176
22193
  }
22177
22194
  Object.defineProperty(IkasCartStore.prototype, "isBrowser", {
22178
22195
  get: function () {
@@ -4,7 +4,7 @@ import { IkasBaseStore } from "./base";
4
4
  export declare const CART_LS_KEY = "cartId";
5
5
  export declare const CHECKOUT_LS_KEY = "checkoutId";
6
6
  export declare class IkasCartStore {
7
- cart?: IkasCart;
7
+ cart?: IkasCart | null;
8
8
  private baseStore;
9
9
  private _checkoutId?;
10
10
  private _isLoadingCart;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ikas/storefront",
3
- "version": "0.0.2",
3
+ "version": "0.0.4",
4
4
  "main": "./build/index.js",
5
5
  "module": "./build/index.es.js",
6
6
  "author": "Umut Ozan Yıldırım",