@ikas/storefront 4.4.0-beta.2 → 4.4.0-beta.3
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/models/data/order/index.js +1 -1
- package/package.json +11 -11
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__extends as e}from'./../../../ext/tslib/tslib.es6.js';import{IkasOrderAddress as t}from"./address/index.js";import{IkasOrderShippingLine as n}from"./shipping-line/index.js";import{IkasOrderLineItem as r}from"./line-item/index.js";import{IkasOrderCustomer as o}from"./customer/index.js";import{IkasOrderGiftPackageLine as i}from"./gift-line/index.js";import{IkasInvoice as u}from"./invoice/index.js";import{IkasOrderPaymentMethod as l}from"./payment-method/index.js";import{IkasOrderAdjustment as
|
|
1
|
+
import{__extends as e}from'./../../../ext/tslib/tslib.es6.js';import{IkasOrderAddress as t}from"./address/index.js";import{IkasOrderShippingLine as n}from"./shipping-line/index.js";import{IkasOrderLineItem as r}from"./line-item/index.js";import{IkasOrderCustomer as o}from"./customer/index.js";import{IkasOrderGiftPackageLine as i}from"./gift-line/index.js";import{IkasInvoice as u}from"./invoice/index.js";import{IkasOrderPaymentMethod as l}from"./payment-method/index.js";import{IkasOrderAdjustment as a}from"./adjustment/index.js";import{IkasOrderPackage as s}from"./package/index.js";import{IkasOrderTaxLine as d}from"./tax-line/index.js";import{IkasBaseModel as c}from"../base/index.js";import{IkasOrderShippingMethod as m,IkasOrderStatus as p}from"@ikas/storefront-models";export{IkasOrderCancelReason,IkasOrderPackageStatus,IkasOrderPaymentStatus,IkasOrderShippingMethod,IkasOrderStatus}from"@ikas/storefront-models";import{makeObservable as f,observable as g,computed as b}from"mobx";import{IkasOrderFunctions as y}from"@ikas/storefront-model-functions";import{formatCurrency as h}from"../../../utils/currency.js";var P=function(c){function P(e,y){var h,P,j,k,A,v,S,x,O,I,C=this;(C=c.call(this,e)||this).billingAddress=null,C.cancelReason=null,C.cancelledAt=null,C.currencySymbol=null,C.customer=null,C.customerId=null,C.giftPackageLines=null,C.giftPackageNote=null,C.invoices=null,C.isGiftPackage=null,C.note=null,C.orderAdjustments=null,C.orderNumber=null,C.orderPackageStatus=null,C.orderPackages=null,C.orderPaymentStatus=null,C.orderedAt=null,C.paymentMethods=null,C.shippingAddress=null,C.shippingLines=null,C.taxLines=null,C.billingAddress=e.billingAddress?new t(e.billingAddress):null,C.cancelReason=e.cancelReason||null,C.cancelledAt=e.cancelledAt||null,C.currencyCode=e.currencyCode||"",C.currencySymbol=e.currencySymbol||null,C.customer=e.customer?new o(e.customer):null,C.customerId=e.customerId||null,C.giftPackageLines=(null===(h=e.giftPackageLines)||void 0===h?void 0:h.map((function(e){return new i(e)})))||null,C.giftPackageNote=e.giftPackageNote||null,C.invoices=(null===(P=e.invoices)||void 0===P?void 0:P.map((function(e){return new u(e)})))||null,C.isGiftPackage=e.isGiftPackage||null,C.note=e.note||null,C.orderAdjustments=(null===(j=e.orderAdjustments)||void 0===j?void 0:j.map((function(e){return new a(e)})))||null,C.orderLineItems=(null===(k=e.orderLineItems)||void 0===k?void 0:k.map((function(e){return new r(e)})).filter((function(e){return!e.deleted})))||[],C.orderNumber=e.orderNumber||null,C.orderPackageStatus=e.orderPackageStatus||null,C.orderPackages=(null===(A=e.orderPackages)||void 0===A?void 0:A.map((function(e){return new s(e)})))||null,C.orderPaymentStatus=e.orderPaymentStatus||null,C.orderedAt=e.orderedAt||null,C.paymentMethods=(null===(v=e.paymentMethods)||void 0===v?void 0:v.map((function(e){return new l(e)})))||null,C.shippingAddress=e.shippingAddress?new t(e.shippingAddress):null,C.shippingLines=(null===(S=e.shippingLines)||void 0===S?void 0:S.map((function(e){return new n(e)})))||null,C.shippingMethod=e.shippingMethod||m.SHIPMENT,C.status=e.status||p.CREATED,C.taxLines=(null===(x=e.taxLines)||void 0===x?void 0:x.map((function(e){return new d(e)})))||null,C.totalFinalPrice=null!==(O=e.totalFinalPrice)&&void 0!==O?O:0,C.totalPrice=null!==(I=e.totalPrice)&&void 0!==I?I:0,C.refundSettings=e.refundSettings;var T={billingAddress:g,cancelReason:g,cancelledAt:g,currencyCode:g,currencySymbol:g,customer:g,customerId:g,giftPackageLines:g,giftPackageNote:g,invoices:g,isGiftPackage:g,note:g,orderAdjustments:g,orderLineItems:g,orderNumber:g,orderPackageStatus:g,orderPackages:g,orderPaymentStatus:g,orderedAt:g,paymentMethods:g,shippingAddress:g,shippingLines:g,shippingMethod:g,status:g,taxLines:g,totalFinalPrice:g,totalPrice:g,refundSettings:g,items:b,itemCount:b,refundableItems:b,unfullfilledItems:b,refundedItems:b,totalTax:b,formattedTotalTax:b,shippingTotal:b,formattedShippingTotal:b,formattedTotalFinalPrice:b,formattedTotalPrice:b,hasCustomer:b,hasValidCustomerEmail:b,customerFullName:b,formattedDate:b,couponAdjustment:b,nonCouponAdjustments:b};return y&&(delete T.billingAddress,delete T.shippingAddress),f(C,T),C}return e(P,c),Object.defineProperty(P.prototype,"items",{get:function(){return this.orderLineItems},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"itemCount",{get:function(){var e;return(null===(e=this.items)||void 0===e?void 0:e.length)||0},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"itemQuantity",{get:function(){return this.items.reduce((function(e,t){return e+t.quantity}),0)},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"refundableItems",{get:function(){return this.refundSettings?y.getRefundableItems(this,this.refundSettings):[]},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"displayedPackages",{get:function(){return y.getDisplayedPackages(this).map((function(e){return new s(e)}))},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"unfullfilledItems",{get:function(){return y.getUnfullfilledItems(this)},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"refundedItems",{get:function(){return y.getRefundedItems(this)},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"totalTax",{get:function(){return y.getTotalTax(this)},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"formattedTotalTax",{get:function(){return h(this.totalTax,this.currencyCode,this.currencySymbol||"")},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"shippingTotal",{get:function(){return y.getShippingTotal(this)},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"formattedShippingTotal",{get:function(){return h(this.shippingTotal,this.currencyCode,this.currencySymbol||"")},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"formattedTotalFinalPrice",{get:function(){return h(this.totalFinalPrice,this.currencyCode,this.currencySymbol||"")},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"formattedTotalPrice",{get:function(){return h(this.totalPrice,this.currencyCode,this.currencySymbol||"")},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"hasCustomer",{get:function(){return y.hasCustomer(this)},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"hasValidCustomerEmail",{get:function(){return y.hasValidCustomerEmail(this)},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"customerFullName",{get:function(){return y.getCustomerFullName(this)},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"formattedDate",{get:function(){return y.getFormattedDate(this)},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"couponAdjustment",{get:function(){return y.getCouponAdjustment(this)},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"nonCouponAdjustments",{get:function(){return y.getNonCouponAdjustments(this)},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"isRefundEnabled",{get:function(){return this.refundableItems.some((function(e){return null!==e.refundQuantity}))},enumerable:!1,configurable:!0}),P}(c);export{P as IkasOrder};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ikas/storefront",
|
|
3
|
-
"version": "4.4.0-beta.
|
|
3
|
+
"version": "4.4.0-beta.3",
|
|
4
4
|
"description": "Storefront functionality for ikas storefront themes.",
|
|
5
5
|
"author": "ikas",
|
|
6
6
|
"license": "ISC",
|
|
@@ -17,11 +17,11 @@
|
|
|
17
17
|
"build": "rm -rf build && rollup -c"
|
|
18
18
|
},
|
|
19
19
|
"devDependencies": {
|
|
20
|
-
"@ikas/storefront-api": "^4.4.0-beta.
|
|
21
|
-
"@ikas/storefront-config": "^4.4.0-beta.
|
|
22
|
-
"@ikas/storefront-model-functions": "^4.4.0-beta.
|
|
23
|
-
"@ikas/storefront-models": "^4.4.0-beta.
|
|
24
|
-
"@ikas/storefront-providers": "^4.4.0-beta.
|
|
20
|
+
"@ikas/storefront-api": "^4.4.0-beta.3",
|
|
21
|
+
"@ikas/storefront-config": "^4.4.0-beta.3",
|
|
22
|
+
"@ikas/storefront-model-functions": "^4.4.0-beta.3",
|
|
23
|
+
"@ikas/storefront-models": "^4.4.0-beta.3",
|
|
24
|
+
"@ikas/storefront-providers": "^4.4.0-beta.3",
|
|
25
25
|
"@adyen/adyen-web": "^5.28.2",
|
|
26
26
|
"@rollup/plugin-commonjs": "^22.0.0",
|
|
27
27
|
"@rollup/plugin-json": "^4.1.0",
|
|
@@ -52,11 +52,11 @@
|
|
|
52
52
|
"libphonenumber-js": "^1.10.6"
|
|
53
53
|
},
|
|
54
54
|
"peerDependencies": {
|
|
55
|
-
"@ikas/storefront-api": "^4.4.0-beta.
|
|
56
|
-
"@ikas/storefront-config": "^4.4.0-beta.
|
|
57
|
-
"@ikas/storefront-model-functions": "^4.4.0-beta.
|
|
58
|
-
"@ikas/storefront-models": "^4.4.0-beta.
|
|
59
|
-
"@ikas/storefront-providers": "^4.4.0-beta.
|
|
55
|
+
"@ikas/storefront-api": "^4.4.0-beta.3",
|
|
56
|
+
"@ikas/storefront-config": "^4.4.0-beta.3",
|
|
57
|
+
"@ikas/storefront-model-functions": "^4.4.0-beta.3",
|
|
58
|
+
"@ikas/storefront-models": "^4.4.0-beta.3",
|
|
59
|
+
"@ikas/storefront-providers": "^4.4.0-beta.3",
|
|
60
60
|
"mobx": "^6.1.3",
|
|
61
61
|
"mobx-react-lite": "^3.1.5",
|
|
62
62
|
"next": "12.2.0",
|