@ikas/storefront 2.0.37-alpha.5 → 2.0.37-alpha.6

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.
@@ -1 +1 @@
1
- import{IkasOrderLineDiscount as t}from"./discount/index.js";import{IkasOrderLineVariant as i}from"./variant/index.js";import{makeAutoObservable as e}from"mobx";import"../../../../storefront/index.js";import'../../../../ext/lodash/isArguments.js';import'../../../../ext/lodash/isBuffer.js';import'../../../../ext/lodash/isTypedArray.js';import'../../../../ext/lodash/_baseGetTag.js';import{getCurrencySymbol as n}from"../../../../utils/currency.js";import"../../../../utils/i18n.js";import{IkasOrderLineOptions as r}from"./options/index.js";var o,u=function(){function u(u){this.discount=null,this.discountPrice=null,this.originalOrderLineItemId=null,this.taxValue=null,this._refundQuantity=null,this.id=u.id||"",this.createdAt=u.createdAt||"",this.updatedAt=u.updatedAt||"",this.orderedAt=u.orderedAt||0,this.deleted=u.deleted||!1,this.currencyCode=u.currencyCode||"",this.currencySymbol=n(this.currencyCode),this.discount=u.discount?new t(u.discount):void 0,this.discountPrice=u.discountPrice,this.finalPrice=u.finalPrice||0,this.originalOrderLineItemId=u.originalOrderLineItemId,this.price=u.price||0,this.quantity=u.quantity||0,this.taxValue=u.taxValue,this.variant=u.variant?new i(u.variant):new i,this.status=u.status||o.FULFILLED,this.options=u.options?u.options.map((function(t){return new r(t)})):null,e(this)}return Object.defineProperty(u.prototype,"priceWithQuantity",{get:function(){return this.price*this.quantity},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"overridenPriceWithQuantity",{get:function(){return void 0!==this.discountPrice&&null!==this.discountPrice?this.price*this.quantity:null},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"finalPriceWithQuantity",{get:function(){return(void 0!==this.discountPrice&&null!==this.discountPrice?this.discountPrice:this.price)*this.quantity},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"tax",{get:function(){var t=this.taxValue||0;return this.finalPrice*this.quantity/(100+t)*t},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"refundQuantity",{get:function(){return this._refundQuantity},set:function(t){t?(t>this.quantity&&(t=this.quantity),t<=0&&(t=null),this._refundQuantity=t):this._refundQuantity=null},enumerable:!1,configurable:!0}),u}();!function(t){t.FULFILLED="FULFILLED",t.UNFULFILLED="UNFULFILLED",t.DELIVERED="DELIVERED",t.CANCELLED="CANCELLED",t.CANCEL_REQUESTED="CANCEL_REQUESTED",t.CANCEL_REJECTED="CANCEL_REJECTED",t.REFUND_REQUESTED="REFUND_REQUESTED",t.REFUND_REQUEST_ACCEPTED="REFUND_REQUEST_ACCEPTED",t.REFUNDED="REFUNDED",t.REFUND_REJECTED="REFUND_REJECTED"}(o||(o={}));export{u as IkasOrderLineItem,o as OrderLineItemStatusEnum};
1
+ import{IkasOrderLineDiscount as t}from"./discount/index.js";import{IkasOrderLineVariant as i}from"./variant/index.js";import{makeAutoObservable as e}from"mobx";import"../../../../storefront/index.js";import'../../../../ext/lodash/isArguments.js';import'../../../../ext/lodash/isBuffer.js';import'../../../../ext/lodash/isTypedArray.js';import'../../../../ext/lodash/_baseGetTag.js';import{getCurrencySymbol as n}from"../../../../utils/currency.js";import"../../../../utils/i18n.js";import{IkasOrderLineOptions as r}from"./options/index.js";var o,u=function(){function u(u){this.discount=null,this.discountPrice=null,this.originalOrderLineItemId=null,this.taxValue=null,this._refundQuantity=null,this.id=u.id||"",this.createdAt=u.createdAt||"",this.updatedAt=u.updatedAt||"",this.orderedAt=u.orderedAt||0,this.deleted=u.deleted||!1,this.currencyCode=u.currencyCode||"",this.currencySymbol=n(this.currencyCode),this.discount=u.discount?new t(u.discount):void 0,this.discountPrice=u.discountPrice,this.finalPrice=u.finalPrice||0,this.originalOrderLineItemId=u.originalOrderLineItemId,this.price=u.price||0,this.quantity=u.quantity||0,this.taxValue=u.taxValue,this.variant=u.variant?new i(u.variant):new i,this.status=u.status||o.FULFILLED,this.options=u.options?u.options.map((function(t){return new r(t)})):null,e(this)}return Object.defineProperty(u.prototype,"priceWithQuantity",{get:function(){return this.price*this.quantity},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"overridenPriceWithQuantity",{get:function(){var t=void 0!==this.discountPrice&&null!==this.discountPrice?this.price*this.quantity:null;return null!==t&&t<0?0:t},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"finalPriceWithQuantity",{get:function(){var t=(void 0!==this.discountPrice&&null!==this.discountPrice?this.discountPrice:this.price)*this.quantity;return t<0?0:t},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"tax",{get:function(){var t=this.taxValue||0;return this.finalPrice*this.quantity/(100+t)*t},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"refundQuantity",{get:function(){return this._refundQuantity},set:function(t){t?(t>this.quantity&&(t=this.quantity),t<=0&&(t=null),this._refundQuantity=t):this._refundQuantity=null},enumerable:!1,configurable:!0}),u}();!function(t){t.FULFILLED="FULFILLED",t.UNFULFILLED="UNFULFILLED",t.DELIVERED="DELIVERED",t.CANCELLED="CANCELLED",t.CANCEL_REQUESTED="CANCEL_REQUESTED",t.CANCEL_REJECTED="CANCEL_REJECTED",t.REFUND_REQUESTED="REFUND_REQUESTED",t.REFUND_REQUEST_ACCEPTED="REFUND_REQUEST_ACCEPTED",t.REFUNDED="REFUNDED",t.REFUND_REJECTED="REFUND_REJECTED"}(o||(o={}));export{u as IkasOrderLineItem,o as OrderLineItemStatusEnum};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ikas/storefront",
3
- "version": "2.0.37-alpha.5",
3
+ "version": "2.0.37-alpha.6",
4
4
  "main": "./build/index.js",
5
5
  "module": "./build/index.js",
6
6
  "author": "Umut Ozan Yıldırım",