@ikas/storefront 2.0.29-alpha.4 → 2.0.29-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.
- package/build/_virtual/index.js_commonjs-proxy2.js +1 -1
- package/build/_virtual/index.js_commonjs-proxy3.js +1 -1
- package/build/_virtual/index.js_commonjs-proxy4.js +1 -1
- package/build/components/checkout/components/cart-summary/index.js +1 -1
- package/build/components/checkout/components/error/index.js +1 -1
- package/build/components/checkout/components/error/no-shipping-error/index.d.ts +3 -5
- package/build/components/checkout/components/error/no-shipping-error/index.js +1 -1
- package/build/components/checkout/model.js +1 -1
- package/build/ikas.js +1 -1
- package/build/models/data/checkout/index.js +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{makeAutoObservable as t}from"mobx";import{IkasOrderAddress as e}from"../order/address/index.js";import{IkasCart as i}from"../cart/index.js";import{IkasPaymentMethodAdditionalPriceType as n}from"../payment-gateway/index.js";import{formatDate as o}from"../../../utils/helper.js";var r,s,l,u,
|
|
1
|
+
import{makeAutoObservable as t}from"mobx";import{IkasOrderAddress as e}from"../order/address/index.js";import{IkasCart as i}from"../cart/index.js";import{IkasPaymentMethodAdditionalPriceType as n}from"../payment-gateway/index.js";import{formatDate as o}from"../../../utils/helper.js";var r,s,l,a,u,d,c=function(){function l(n){void 0===n&&(n={}),this.id=null,this.createdAt=null,this.updatedAt=null,this.cartId=null,this.cart=null,this.orderId=null,this.orderNumber=null,this.merchantId=null,this.shippingSettingsId=null,this.shippingZoneRateId=null,this.customer=null,this.billingAddress=null,this.shippingAddress=null,this.shippingLines=null,this.shippingMethod=null,this.status=null,this.couponCode=null,this.recoverEmailStatus=null,this.recoveryStatus=null,this.totalFinalPrice=null,this.adjustments=null,this.note=null,this.giftPackageLines=null,this.giftPackageNote=null,this.appliedCouponCode=null,this.selectedPaymentGateway=null,this.id=n.id,this.createdAt=n.createdAt,this.updatedAt=n.updatedAt,this.cartId=n.cartId,this.cart=n.cart?new i(n.cart):void 0,this.orderId=n.orderId,this.orderNumber=n.orderNumber,this.merchantId=n.merchantId,this.shippingSettingsId=n.shippingSettingsId,this.shippingZoneRateId=n.shippingZoneRateId,this.availableShippingMethods=n.availableShippingMethods||[],this.customer=n.customer?new p(n.customer):null,this.billingAddress=n.billingAddress?new e(n.billingAddress):null,this.shippingAddress=n.shippingAddress?new e(n.shippingAddress):null,this.shippingLines=n.shippingLines||[],this.shippingMethod=n.shippingMethod||r.NO_SHIPMENT,this.status=n.status||s.OPEN,this.couponCode=n.couponCode,this.appliedCouponCode=n.couponCode,this.recoverEmailStatus=n.recoverEmailStatus,this.recoveryStatus=n.recoveryStatus,this.totalFinalPrice=n.totalFinalPrice,this.adjustments=n.adjustments,this.note=n.note||null,this.isGiftPackage=n.isGiftPackage||!1,this.giftPackageLines=n.giftPackageLines||null,this.giftPackageNote=n.giftPackageNote||null,this.appliedCouponCode=n.appliedCouponCode,this.selectedPaymentGateway=n.selectedPaymentGateway,t(this)}return Object.defineProperty(l.prototype,"isComplete",{get:function(){return!!this.orderId},enumerable:!1,configurable:!0}),Object.defineProperty(l.prototype,"totalTax",{get:function(){var t;return(null===(t=this.cart)||void 0===t?void 0:t.totalTax)||0},enumerable:!1,configurable:!0}),Object.defineProperty(l.prototype,"shippingTotal",{get:function(){var t;return(null===(t=this.shippingLines)||void 0===t?void 0:t.reduce((function(t,e){return t+e.price}),0))||0},enumerable:!1,configurable:!0}),Object.defineProperty(l.prototype,"hasCustomer",{get:function(){var t;return!!(null===(t=this.customer)||void 0===t?void 0:t.id)},enumerable:!1,configurable:!0}),Object.defineProperty(l.prototype,"hasValidCustomer",{get:function(){var t;return!!(null===(t=this.customer)||void 0===t?void 0:t.email)},enumerable:!1,configurable:!0}),Object.defineProperty(l.prototype,"customerFullName",{get:function(){var t,e;return"".concat((null===(t=this.customer)||void 0===t?void 0:t.firstName)||""," ").concat((null===(e=this.customer)||void 0===e?void 0:e.lastName)||"")},enumerable:!1,configurable:!0}),Object.defineProperty(l.prototype,"customerEmail",{get:function(){var t;return"".concat((null===(t=this.customer)||void 0===t?void 0:t.email)||"")},enumerable:!1,configurable:!0}),Object.defineProperty(l.prototype,"dateStr",{get:function(){var t=new Date;return t.setTime(parseFloat(this.updatedAt)),o(t)},enumerable:!1,configurable:!0}),Object.defineProperty(l.prototype,"$totalFinalPrice",{get:function(){var t,e=null===(t=this.selectedPaymentGateway)||void 0===t?void 0:t.getCalculatedAdditionalPrices(this.totalFinalPrice||0,this.shippingLines||null),i=this.totalFinalPrice||0;return null==e||e.forEach((function(t){t.type===n.DECREMENT?i-=t.amount:i+=t.amount})),i},enumerable:!1,configurable:!0}),Object.defineProperty(l.prototype,"couponAdjustment",{get:function(){var t;return null===(t=this.adjustments)||void 0===t?void 0:t.find((function(t){return!!t.couponId}))},enumerable:!1,configurable:!0}),Object.defineProperty(l.prototype,"nonCouponAdjustments",{get:function(){var t;return null===(t=this.adjustments)||void 0===t?void 0:t.filter((function(t){return!t.couponId}))},enumerable:!1,configurable:!0}),l}(),p=function(e){this.id=e.id||"",this.email=e.email||"",this.firstName=e.firstName||"",this.lastName=e.lastName||"",this.notificationsAccepted=e.notificationsAccepted||!1,t(this)};!function(t){t.CLICK_AND_COLLECT="CLICK_AND_COLLECT",t.NO_SHIPMENT="NO_SHIPMENT",t.SHIPMENT="SHIPMENT"}(r||(r={})),function(t){t.COMPLETED="COMPLETED",t.OPEN="OPEN"}(s||(s={})),function(t){t.NOT_SENT="NOT_SENT",t.SENT="SENT"}(l||(l={})),function(t){t.NOT_RECOVERED="NOT_RECOVERED",t.RECOVERED="RECOVERED"}(a||(a={})),function(t){t.BUY_ONLINE_PAY_AT_STORE="BUY_ONLINE_PAY_AT_STORE",t.CASH="CASH",t.CASH_ON_DELIVERY="CASH_ON_DELIVERY",t.CREDIT_CARD="CREDIT_CARD",t.GIFT_CARD="GIFT_CARD",t.MONEY_ORDER="MONEY_ORDER",t.OTHER="OTHER"}(u||(u={})),function(t){t.CLICK_AND_COLLECT="CLICK_AND_COLLECT",t.NO_SHIPMENT="NO_SHIPMENT",t.SHIPMENT="SHIPMENT"}(d||(d={}));export{c as IkasCheckout,p as IkasCheckoutCustomer,l as IkasCheckoutRecoveryEmailStatus,a as IkasCheckoutRecoveryStatus,s as IkasCheckoutStatus,u as IkasPaymentMethod,r as IkasShippingMethod,d as IkasShippingMethodEnum};
|