@ikas/storefront 6.1.0-beta.43 → 6.1.0-beta.45

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*as e from"react";import{observer as t}from"mobx-react-lite";import s from"../../style.module.scss.js";import r from"../select-box/index.js";import{AddressForm as d}from"../address-form/index.js";import{Checkbox as i}from"../checkbox/index.js";import{FormItem as a}from"../form-item/index.js";import{FormItemType as o}from"../form-item/model.js";import n from"./style.module.scss.js";import l from"../../styles/common.module.scss.js";import{Button as c}from"../button/index.js";import{IkasStorefrontConfig as m}from"@ikas/storefront-config";import{useTranslation as u}from"../../../../utils/i18n.js";import v from"../delivery-methods/index.js";import{CheckoutStep as p}from"../../model.js";var h=t((function(t){var d,i=t.vm,a=u().t,o=e.useMemo((function(){return e.createElement("div",null,e.createElement(g,{vm:i}),e.createElement(k,{vm:i}))}),[i]),h=e.useMemo((function(){return e.createElement("div",null,e.createElement(E,{vm:i}))}),[i]),C=e.useState("-1"),f=C[0],A=C[1];e.useEffect((function(){i.vm.checkout.stockLocationId&&A(i.vm.checkout.stockLocationId)}),[]);var y=function(e){if(!e.address)return"";var t=[];return e.address.address&&t.push(e.address.address),e.address.postalCode&&t.push(e.address.postalCode),e.address.district&&e.address.district.name&&t.push(e.address.district.name),e.address.city&&e.address.city.name&&t.push(e.address.city.name),e.address.state&&e.address.state.name&&"Default"!==e.address.state.name&&t.push(e.address.state.name),e.address.country&&e.address.country.name&&t.push(e.address.country.name),t.join(", ")};return e.createElement(e.Fragment,null,!!m.getPickupStockLocationIds()&&!i.vm.isDigitalOnly&&i.vm.availableStockLocations.length>0&&i.vm.step!==p.PAYMENT&&e.createElement(e.Fragment,null,e.createElement("div",{className:l.FormSectionTitle},e.createElement("div",{className:l.Title},a("checkout-page:deliveryMethod"))),e.createElement(v,{deliveryMethod:i.vm.deliveryMethod,onClick:function(e){"address"===e&&A("-1"),i.vm.onDeliveryMethodChange(e)}})),e.createElement("div",{className:l.FormSectionTitle},"address"===i.vm.deliveryMethod?e.createElement("div",{className:l.Title},i.editingCustomerAddress?a("checkout-page:editAddress"):"billing"===i.addressType?a("checkout-page:billingAddress"):a("checkout-page:shippingAddress")):i.vm.step===p.PAYMENT?e.createElement("div",{className:l.Title},a("checkout-page:billingAddress")):e.createElement("div",{className:l.Title},a("checkout-page:pickUpLocation"),e.createElement("span",{className:n.ErrorMessage},i.vm.isErrorsVisible&&!i.vm.checkout.stockLocationId&&a("checkout-page:errorPickupLocationRequired"))),!!i.editingCustomerAddress&&e.createElement("div",{className:n.CancelEdit,onClick:i.onCancelEditAddressClick},a("checkout-page:actions.cancel"))),!!i.vm.store.customerStore.customer&&!i.editingCustomerAddress&&("address"===i.vm.deliveryMethod||i.vm.step===p.PAYMENT&&"in-store"===i.vm.deliveryMethod)&&e.createElement("div",{className:s.RowPB},null===(d=i.vm.customerAddresses)||void 0===d?void 0:d.map((function(t){return e.createElement(r,{key:t.id,label:t.title||"",isSelected:t.id===i.selectedAddressId,rightContent:e.createElement("div",{onClick:function(){return i.onEditAddressClick(t)}},a("checkout-page:actions.edit")),bottomContent:e.createElement("div",{className:n.AddressContent},e.createElement("div",{className:n.AddressText},t.firstName," ",t.lastName),e.createElement("div",{className:n.AddressText},t.addressText)),bottomContentVisible:!0,hasError:!t.isValidAddress,errorText:a("checkout-page:missingAddressFields"),onClick:function(){return t.id!==i.selectedAddressId&&i.onAddressSelect(t)}})})),e.createElement(r,{label:a("checkout-page:newAddress"),isSelected:"-1"===i.selectedAddressId,bottomContent:o,onClick:function(){return"-1"!==i.selectedAddressId&&i.onAddressSelect()}})),i.vm.store.customerStore.customer||i.vm.step!==p.INFO||"address"!==i.vm.deliveryMethod?i.vm.step===p.PAYMENT&&!i.vm.store.customerStore.customer&&o:o,"in-store"===i.vm.deliveryMethod&&e.createElement("div",{className:s.RowPB},i.vm.stockLocations.map((function(t){return function(e){return e.address&&e.address.address&&e.address.city&&e.address.country&&i.vm.availableStockLocations.find((function(t){return t.id===e.id}))}(t)&&e.createElement(r,{key:t.id,label:t.name||"",isSelected:f===t.id,bottomContent:e.createElement("div",null,e.createElement("div",{className:n.AddressText},y(t)),t.deliveryTime&&e.createElement("div",{className:n.DeliveryTime},a("checkout-page:stockLocation.deliveryTime.".concat(t.deliveryTime)))),bottomContentVisible:!0,onClick:function(){i.vm.onStockLocationChange(t),A(t.id)}})}))),"in-store"===i.vm.deliveryMethod&&i.vm.step!==p.PAYMENT&&e.createElement(e.Fragment,null,e.createElement("div",{className:l.FormSectionTitle},e.createElement("div",{className:l.Title},a("checkout-page:recipientsInfo"))),h),!!i.editingCustomerAddress&&e.createElement(g,{vm:i}),!!i.editingCustomerAddress&&e.createElement("div",{className:n.EditAddressActions},e.createElement(c,{style:{width:"100%"},text:a("checkout-page:deleteAddress"),isLine:!0,isLoading:i.isDeleteAddressLoading,isDisabled:i.isEditAddressLoading,onClick:i.onDeleteAddressClick}),e.createElement(c,{style:{width:"100%",marginTop:i.vm.store.customerStore.customer?"0px":"32px"},text:a("checkout-page:actions.save"),isLoading:i.isEditAddressLoading,isDisabled:i.isDeleteAddressLoading,onClick:i.onSaveAddressClick})))})),g=t((function(t){var s,r=t.vm,i=(!!(null===(s=r.vm.checkout.customer)||void 0===s?void 0:s.isGuestCheckout)||!!r.vm.store.customerStore.customer)&&r.vm.isCorporateInvoiceVisible&&!!r.vm.checkoutSettings.showCompanyInfoInShippingAddress;return e.createElement(d,{address:r.editingCustomerAddress||r.address,isErrorsVisible:r.isEditAddressErrorsVisible||r.vm.isErrorsVisible,allowedCountryIds:r.vm.shippingCountryIds||void 0,allowCorporateInfo:"billing"===r.addressType?!i:i,firstNameChangeCallback:r.firstNameChangeCallback,lastNameChangeCallback:r.lastNameChangeCallback,allowTitleChange:!!r.editingCustomerAddress,deliveryMethod:"address"})})),E=t((function(t){var s=t.vm;return e.createElement(d,{address:s.editingCustomerAddress||s.address,isErrorsVisible:s.isEditAddressErrorsVisible||s.vm.isErrorsVisible,firstNameChangeCallback:s.firstNameChangeCallback,lastNameChangeCallback:s.lastNameChangeCallback,deliveryMethod:"in-store"})})),k=t((function(t){var s=t.vm,r=u().t;return s.vm.store.customerStore.customer&&"-1"===s.selectedAddressId?e.createElement("div",{style:{marginTop:"12px"}},e.createElement(i,{value:s.vm.shouldSaveAddress,label:r("checkout-page:saveAddressCta"),onChange:s.vm.setShouldSaveAddress}),s.vm.shouldSaveAddress&&e.createElement("div",{style:{marginTop:"8px"}},e.createElement(a,{type:o.TEXT,label:r("checkout-page:addressTitle"),value:s.vm.addressTitle,onChange:s.vm.setAddressTitle}))):null}));export{g as CustomerAddressForm,E as RecipientForm,k as SaveAddressCheckboxAndTitle,h as default};
1
+ import*as e from"react";import{observer as t}from"mobx-react-lite";import s from"../../style.module.scss.js";import r from"../select-box/index.js";import{AddressForm as d}from"../address-form/index.js";import{Checkbox as i}from"../checkbox/index.js";import{FormItem as a}from"../form-item/index.js";import{FormItemType as o}from"../form-item/model.js";import n from"./style.module.scss.js";import l from"../../styles/common.module.scss.js";import{Button as c}from"../button/index.js";import{IkasStorefrontConfig as m}from"@ikas/storefront-config";import{useTranslation as u}from"../../../../utils/i18n.js";import v from"../delivery-methods/index.js";import{CheckoutStep as p}from"../../model.js";var h=t((function(t){var d,i=t.vm,a=u().t,o=e.useMemo((function(){return e.createElement("div",null,e.createElement(g,{vm:i}),e.createElement(k,{vm:i}))}),[i]),h=e.useMemo((function(){return e.createElement("div",null,e.createElement(E,{vm:i}))}),[i]),C=e.useState("-1"),f=C[0],A=C[1];e.useEffect((function(){i.vm.checkout.stockLocationId&&A(i.vm.checkout.stockLocationId)}),[]);var y=function(e){if(!e.address)return"";var t=[];return e.address.address&&t.push(e.address.address),e.address.postalCode&&t.push(e.address.postalCode),e.address.district&&e.address.district.name&&t.push(e.address.district.name),e.address.city&&e.address.city.name&&t.push(e.address.city.name),e.address.state&&e.address.state.name&&"Default"!==e.address.state.name&&t.push(e.address.state.name),e.address.country&&e.address.country.name&&t.push(e.address.country.name),t.join(", ")};return e.createElement(e.Fragment,null,!!m.getPickupStockLocationIds()&&!i.vm.isDigitalOnly&&i.vm.availableStockLocations.length>0&&i.vm.step!==p.PAYMENT&&e.createElement(e.Fragment,null,e.createElement("div",{className:l.FormSectionTitle},e.createElement("div",{className:l.Title},a("checkout-page:deliveryMethod"))),e.createElement(v,{deliveryMethod:i.vm.deliveryMethod,onClick:function(e){"address"===e&&A("-1"),i.vm.onDeliveryMethodChange(e)}})),e.createElement("div",{className:l.FormSectionTitle},"address"===i.vm.deliveryMethod?e.createElement("div",{className:l.Title},i.editingCustomerAddress?a("checkout-page:editAddress"):"billing"===i.addressType?a("checkout-page:billingAddress"):a("checkout-page:shippingAddress")):i.vm.step===p.PAYMENT?e.createElement("div",{className:l.Title},a("checkout-page:billingAddress")):e.createElement("div",{className:l.Title},a("checkout-page:pickUpLocation"),e.createElement("span",{className:n.ErrorMessage},i.vm.isErrorsVisible&&!i.vm.checkout.stockLocationId&&a("checkout-page:errorPickupLocationRequired"))),!!i.editingCustomerAddress&&e.createElement("div",{className:n.CancelEdit,onClick:i.onCancelEditAddressClick},a("checkout-page:actions.cancel"))),!!i.vm.store.customerStore.customer&&!i.editingCustomerAddress&&("address"===i.vm.deliveryMethod||i.vm.step===p.PAYMENT&&"in-store"===i.vm.deliveryMethod)&&e.createElement("div",{className:s.RowPB},null===(d=i.vm.customerAddresses)||void 0===d?void 0:d.map((function(t){return e.createElement(r,{key:t.id,label:t.title||"",isSelected:t.id===i.selectedAddressId,rightContent:e.createElement("div",{onClick:function(){return i.onEditAddressClick(t)}},a("checkout-page:actions.edit")),bottomContent:e.createElement("div",{className:n.AddressContent},e.createElement("div",{className:n.AddressText},t.firstName," ",t.lastName),e.createElement("div",{className:n.AddressText},t.addressText)),bottomContentVisible:!0,hasError:!t.isValidAddress,errorText:a("checkout-page:missingAddressFields"),onClick:function(){return t.id!==i.selectedAddressId&&i.onAddressSelect(t)}})})),e.createElement(r,{label:a("checkout-page:newAddress"),isSelected:"-1"===i.selectedAddressId,bottomContent:o,onClick:function(){return"-1"!==i.selectedAddressId&&i.onAddressSelect()}})),i.vm.store.customerStore.customer||i.vm.step!==p.INFO||"address"!==i.vm.deliveryMethod?i.vm.step===p.PAYMENT&&!i.vm.store.customerStore.customer&&o:o,"in-store"===i.vm.deliveryMethod&&e.createElement("div",{className:s.RowPB},i.vm.stockLocations.map((function(t){return function(e){return e.address&&e.address.address&&e.address.city&&e.address.country&&i.vm.availableStockLocations.find((function(t){return t.id===e.id}))}(t)&&e.createElement(r,{key:t.id,label:t.name||"",isSelected:f===t.id,bottomContent:e.createElement("div",null,e.createElement("div",{className:n.AddressText},y(t)),t.deliveryTime&&e.createElement("div",{className:n.DeliveryTime},a("checkout-page:stockLocation.deliveryTime.".concat(t.deliveryTime)))),bottomContentVisible:!0,onClick:function(){i.vm.onStockLocationChange(t),A(t.id)}})}))),"in-store"===i.vm.deliveryMethod&&i.vm.step!==p.PAYMENT&&e.createElement(e.Fragment,null,e.createElement("div",{className:l.FormSectionTitle},e.createElement("div",{className:l.Title},a("checkout-page:recipientsInfo"))),h),!!i.editingCustomerAddress&&e.createElement(g,{vm:i}),!!i.editingCustomerAddress&&e.createElement("div",{className:n.EditAddressActions},e.createElement(c,{style:{width:"100%"},text:a("checkout-page:deleteAddress"),isLine:!0,isLoading:i.isDeleteAddressLoading,isDisabled:i.isEditAddressLoading,onClick:i.onDeleteAddressClick}),e.createElement(c,{style:{width:"100%",marginTop:i.vm.store.customerStore.customer?"0px":"32px"},text:a("checkout-page:actions.save"),isLoading:i.isEditAddressLoading,isDisabled:i.isDeleteAddressLoading,onClick:i.onSaveAddressClick})))})),g=t((function(t){var s,r=t.vm,i=(!!(null===(s=r.vm.checkout.customer)||void 0===s?void 0:s.isGuestCheckout)||!!r.vm.store.customerStore.customer)&&r.vm.isCorporateInvoiceVisible&&!!r.vm.checkoutSettings.showCompanyInfoInShippingAddress;return e.createElement(d,{address:r.editingCustomerAddress||r.address,isErrorsVisible:r.isEditAddressErrorsVisible||r.vm.isErrorsVisible,allowedCountryIds:r.vm.shippingCountryIds||void 0,allowCorporateInfo:"billing"===r.addressType?"in-store"===r.vm.deliveryMethod||!i:i,firstNameChangeCallback:r.firstNameChangeCallback,lastNameChangeCallback:r.lastNameChangeCallback,allowTitleChange:!!r.editingCustomerAddress,deliveryMethod:"address"})})),E=t((function(t){var s=t.vm;return e.createElement(d,{address:s.editingCustomerAddress||s.address,isErrorsVisible:s.isEditAddressErrorsVisible||s.vm.isErrorsVisible,firstNameChangeCallback:s.firstNameChangeCallback,lastNameChangeCallback:s.lastNameChangeCallback,deliveryMethod:"in-store"})})),k=t((function(t){var s=t.vm,r=u().t;return s.vm.store.customerStore.customer&&"-1"===s.selectedAddressId?e.createElement("div",{style:{marginTop:"12px"}},e.createElement(i,{value:s.vm.shouldSaveAddress,label:r("checkout-page:saveAddressCta"),onChange:s.vm.setShouldSaveAddress}),s.vm.shouldSaveAddress&&e.createElement("div",{style:{marginTop:"8px"}},e.createElement(a,{type:o.TEXT,label:r("checkout-page:addressTitle"),value:s.vm.addressTitle,onChange:s.vm.setAddressTitle}))):null}));export{g as CustomerAddressForm,E as RecipientForm,k as SaveAddressCheckboxAndTitle,h as default};
@@ -1 +1 @@
1
- import{__extends as e,__assign as o}from'./../../ext/tslib/tslib.es6.js';import*as t from"react";import r from"./error/index.js";import{makeObservable as i,computed as n}from"mobx";import a from"../checkout/index.js";import{Observer as d}from"mobx-react-lite";import"../../models/data/blog/category/index.js";import"../../models/data/blog/content/index.js";import"../../models/data/blog/meta-data/index.js";import"../../models/data/blog/tag/index.js";import"../../models/data/blog/index.js";import"../../models/data/brand/index.js";import{IkasThemeJsonPageType as s,IkasOrderLineItemStatus as m,IkasCheckoutRequirement as p,IkasCouponCodeRequirement as l,IkasThemeJsonComponentPropType as u}from"@ikas/storefront-models";import"../../models/data/campaign-offer/index.js";import"../../models/data/cart/campaign-offer/index.js";import"../../models/data/cart/index.js";import"../../models/data/category/path-item/index.js";import"../../models/data/category/index.js";import{IkasCheckout as c}from"../../models/data/checkout/index.js";import{IkasCheckoutSettings as f}from"../../models/data/checkout-settings/index.js";import"../../models/data/city/index.js";import"../../models/data/country/index.js";import"../../models/data/customer/address/region/index.js";import"../../models/data/customer/address/index.js";import"../../models/data/customer/address/ikas-localized-customer-address.js";import"../../models/data/customer/attribute/index.js";import"../../models/data/customer/review/summary/index.js";import"../../models/data/customer/review/index.js";import"../../models/data/customer/index.js";import"../../models/data/customer-form-data-input/index.js";import"../../models/data/district/index.js";import"../../models/data/favorite-product/index.js";import"../../models/data/filter-category/index.js";import"../../models/data/html-meta-data/index.js";import"../../models/data/image/index.js";import"../../models/data/order/address/region/index.js";import"../../models/data/order/address/index.js";import"../../models/data/order/line-item/option/value/index.js";import"../../models/data/order/line-item/variant/value/index.js";import"../../models/data/order/line-item/variant/index.js";import{IkasOrderLineItem as j}from"../../models/data/order/line-item/index.js";import"../../models/data/order/order-transaction-with-prices/index.js";import"../../models/data/order/package/index.js";import"../../models/data/order/transaction/index.js";import"../../models/data/order/index.js";import"../../models/data/payment-gateway/index.js";import"../../models/data/product/attribute-value/index.js";import"../../models/data/product/filter/index.js";import"../../models/data/product/campaign-offer/index.js";import"../../models/data/product/option-set/option/index.js";import"../../models/data/product/option-set/index.js";import"../../models/data/product/stock-location/index.js";import"../../models/data/product/variant/price/index.js";import"../../models/data/product/variant/index.js";import"../../models/data/variant-type/index.js";import"../../models/data/product/index.js";import"../../models/data/raffle/index.js";import"../../models/data/shipping-zone/state/city/district/region/index.js";import"../../models/data/state/index.js";import"../../models/data/storefront-popup/storefront-popup-display-filter/index.js";import"../../models/data/storefront-popup/storefront-popup-display-settings/index.js";import"../../models/data/storefront-popup/storefront-popup-page-filter/index.js";import"../../models/data/storefront-popup/index.js";import"../../models/data/theme-json/index.js";import"../../models/data/theme-json/component/index.js";import"../../models/data/theme-json/custom-data/index.js";import"../../models/data/variant-type/variant-value/index.js";import"@ikas/localized-address";import"../../models/ui/blog-list/index.js";import"../../models/ui/blog-category-list/index.js";import"../../models/ui/brand-list/index.js";import"../../models/ui/category-list/index.js";import"../../models/ui/product-list/index.js";import"../../models/ui/product-attribute-detail/index.js";import"../../models/ui/product-attribute-list/index.js";import"../../models/ui/customer-review-list/index.js";import"../../models/ui/customer-review-summary-list/index.js";import"../../models/ui/validator/index.js";import"../../models/ui/validator/rules/index.js";import"../../models/ui/validator/form/login.js";import"../../models/ui/validator/form/address.js";import"../../models/ui/validator/form/ikas-address.js";import"../../models/ui/validator/form/register.js";import"../../models/ui/validator/form/contact-form.js";import"../../models/ui/validator/form/forgot-password.js";import"../../models/ui/validator/form/recover-password.js";import"../../models/ui/validator/form/account-info.js";import"../../models/ui/validator/form/raffle-form.js";import"../../models/ui/validator/form/customer-review.js";import"../../models/ui/raffle-list/index.js";import{IkasStorefrontConfig as v}from"@ikas/storefront-config";import{IkasPageDataInit as g}from"../../page-data-init/index.js";import{IkasBaseStore as x}from"../../store/base.js";import"../../store/customer/index.js";import"../../store/cart/index.js";var y=function(y){function h(e){var o=y.call(this,e)||this;return o.state={hasError:!1},o.onMouseEnter=function(){var e=o.props,t=e.vm,r=e.pageComponent;t.onMouseOver(r.id)},o.onMouseLeave=function(){var e=o.props,t=e.vm,r=e.pageComponent;t.onMouseLeave(r.id)},o.onClick=function(){var e=o.props,t=e.vm,r=e.pageComponent;t.onClick(r.id)},o.ref=t.createRef(),i(o,{pageComponentPropValue:n,propValues:n,isSelected:n,isHovered:n,hasNullValue:n,rendered:n,Component:n}),o}return e(h,y),h.prototype.componentDidMount=function(){var e=this.props,o=e.vm,t=e.pageComponent;o.setComponentRef(this.ref.current,t)},h.prototype.componentDidUpdate=function(){var e=this.props,o=e.vm,t=e.pageComponent;o.setComponentRef(this.ref.current,t)},h.getDerivedStateFromError=function(e){return console.error(e),{hasError:!0}},Object.defineProperty(h.prototype,"pageComponentPropValue",{get:function(){var e=this.props,o=e.vm,t=e.pageComponent;return o.initializedPropValues.find((function(e){return e.pageComponent.id===t.id}))},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"propValues",{get:function(){var e,t,r=this.props.vm,i=null===(e=this.pageComponentPropValue)||void 0===e?void 0:e.propValues;(null===(t=r.page)||void 0===t?void 0:t.type)===s.CHECKOUT&&(i={checkout:new c({currencyCode:"TRY",currencySymbol:"₺",orderLineItems:[new j({id:"",createdAt:0,updatedAt:0,currencyCode:"TRY",currencySymbol:"₺",discount:null,discountPrice:null,finalPrice:100,options:null,originalOrderLineItemId:null,price:100,quantity:1,status:m.UNFULFILLED,statusUpdatedAt:null,stockLocationId:null,taxValue:null,unitPrice:null,finalUnitPrice:null,variant:{barcodeList:null,brand:null,categories:null,fileId:null,id:null,mainImageId:null,name:"",prices:null,productId:null,sku:null,slug:null,tagIds:null,taxValue:null,type:null,weight:null,hsCode:null,variantValues:[],baseUnit:null,unit:null,tags:null,bundleProducts:null},orderedAt:0})]}),checkoutSettings:new f({createdAt:0,updatedAt:0,id:"",giftPackagePriceList:null,identityNumberRequirement:p.OPTIONAL,isAccountRequired:!1,isGiftPackageEnabled:!1,isQuickRegistrationEnabled:!1,isShowPostalCode:!0,isTermsAndConditionsDefaultChecked:null,options:null,phoneRequirement:p.OPTIONAL,postalCodeRequirement:p.OPTIONAL,showCheckoutNote:!0,showCompanyInfoInShippingAddress:null,showTermsAndConditionsCheckbox:!0,storefrontId:"",couponCodeRequirement:l.DEFAULT,corporateInvoiceRequirement:null}),customizationProps:o({},i),returnPolicy:"",privacyPolicy:"",termsOfService:"",imprint:"",shippingPolicy:""});return i},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"isSelected",{get:function(){var e=this.props,o=e.vm,t=e.pageComponent;return o.selectedPageComponentId===t.id},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"isHovered",{get:function(){var e=this.props,o=e.vm,t=e.pageComponent;return o.hoveredPageComponentId===t.id},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"hasNullValue",{get:function(){var e,o=this;return!!(null===(e=this.pageComponentPropValue)||void 0===e?void 0:e.component.props.some((function(e){var t;if(e.isRequired){var r=(o.propValues||{})[e.name],i=null===(t=o.pageComponentPropValue)||void 0===t?void 0:t.component.props.find((function(o){return o.id===e.requiredPropId}));if(i){var n=(o.propValues||{})[i.name];if(i.type===u.BOOLEAN&&!n||i.type===u.CUSTOM&&n!==e.requiredEnumOptionValue)return!1}return null===r||null==r}})))},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"rendered",{get:function(){var e,i,n=this.Component,a=this.props.vm;return this.hasNullValue||this.state.hasError?t.createElement(r,{name:null===(e=this.pageComponentPropValue)||void 0===e?void 0:e.component.displayName}):t.createElement(n,o({},this.propValues,{store:x.getInstance(),settings:null===(i=a.theme)||void 0===i?void 0:i.settings,pageSpecificData:g.pageSpecificData}))},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"Component",{get:function(){var e,o=this.props,t=o.vm,r=o.pageComponent,i=v.getCurrentPageComponents();if(!i)return null;var n=i[r.componentId];return(null===(e=t.page)||void 0===e?void 0:e.type)===s.CHECKOUT&&(n=a),n},enumerable:!1,configurable:!0}),h.prototype.render=function(){var e=this;return t.createElement(d,null,(function(){var o;return e.state.hasError?t.createElement("div",{ref:e.ref,style:{position:"relative"},onMouseEnter:e.onMouseEnter,onMouseLeave:e.onMouseLeave,onClick:e.onClick},t.createElement(r,{name:null===(o=e.pageComponentPropValue)||void 0===o?void 0:o.component.displayName})):v.getCurrentPageComponents()?t.createElement("div",{ref:e.ref,style:{position:"relative"},onMouseEnter:e.onMouseEnter,onMouseLeave:e.onMouseLeave},e.rendered):(console.error("Components for the page not found."),null)}))},h}(t.Component);export{y as ThemeEditorComponent};
1
+ import{__extends as e,__assign as o}from'./../../ext/tslib/tslib.es6.js';import*as t from"react";import r from"./error/index.js";import{makeObservable as i,computed as n}from"mobx";import a from"../checkout/index.js";import{Observer as d}from"mobx-react-lite";import"../../models/data/blog/category/index.js";import"../../models/data/blog/content/index.js";import"../../models/data/blog/meta-data/index.js";import"../../models/data/blog/tag/index.js";import"../../models/data/blog/index.js";import"../../models/data/brand/index.js";import{IkasThemeJsonPageType as s,IkasOrderLineItemStatus as m,IkasCheckoutRequirement as p,IkasCouponCodeRequirement as l,IkasThemeJsonComponentPropType as u}from"@ikas/storefront-models";import"../../models/data/campaign-offer/index.js";import"../../models/data/cart/campaign-offer/index.js";import"../../models/data/cart/index.js";import"../../models/data/category/path-item/index.js";import"../../models/data/category/index.js";import{IkasCheckout as c}from"../../models/data/checkout/index.js";import{IkasCheckoutSettings as f}from"../../models/data/checkout-settings/index.js";import"../../models/data/city/index.js";import"../../models/data/country/index.js";import"../../models/data/customer/address/region/index.js";import"../../models/data/customer/address/index.js";import"../../models/data/customer/address/ikas-localized-customer-address.js";import"../../models/data/customer/attribute/index.js";import"../../models/data/customer/review/summary/index.js";import"../../models/data/customer/review/index.js";import"../../models/data/customer/index.js";import"../../models/data/customer-form-data-input/index.js";import"../../models/data/district/index.js";import"../../models/data/favorite-product/index.js";import"../../models/data/filter-category/index.js";import"../../models/data/html-meta-data/index.js";import"../../models/data/image/index.js";import"../../models/data/order/address/region/index.js";import"../../models/data/order/address/index.js";import"../../models/data/order/line-item/option/value/index.js";import"../../models/data/order/line-item/variant/value/index.js";import"../../models/data/order/line-item/variant/index.js";import{IkasOrderLineItem as j}from"../../models/data/order/line-item/index.js";import"../../models/data/order/order-transaction-with-prices/index.js";import"../../models/data/order/package/index.js";import"../../models/data/order/transaction/index.js";import"../../models/data/order/index.js";import"../../models/data/payment-gateway/index.js";import"../../models/data/product/attribute-value/index.js";import"../../models/data/product/filter/index.js";import"../../models/data/product/campaign-offer/index.js";import"../../models/data/product/option-set/option/index.js";import"../../models/data/product/option-set/index.js";import"../../models/data/product/stock-location/index.js";import"../../models/data/product/variant/price/index.js";import"../../models/data/product/variant/index.js";import"../../models/data/variant-type/index.js";import"../../models/data/product/index.js";import"../../models/data/raffle/index.js";import"../../models/data/shipping-zone/state/city/district/region/index.js";import"../../models/data/state/index.js";import"../../models/data/storefront-popup/storefront-popup-display-filter/index.js";import"../../models/data/storefront-popup/storefront-popup-display-settings/index.js";import"../../models/data/storefront-popup/storefront-popup-page-filter/index.js";import"../../models/data/storefront-popup/index.js";import"../../models/data/theme-json/index.js";import"../../models/data/theme-json/component/index.js";import"../../models/data/theme-json/custom-data/index.js";import"../../models/data/variant-type/variant-value/index.js";import"@ikas/localized-address";import"../../models/ui/blog-list/index.js";import"../../models/ui/blog-category-list/index.js";import"../../models/ui/brand-list/index.js";import"../../models/ui/category-list/index.js";import"../../models/ui/product-list/index.js";import"../../models/ui/product-attribute-detail/index.js";import"../../models/ui/product-attribute-list/index.js";import"../../models/ui/customer-review-list/index.js";import"../../models/ui/customer-review-summary-list/index.js";import"../../models/ui/validator/index.js";import"../../models/ui/validator/rules/index.js";import"../../models/ui/validator/form/login.js";import"../../models/ui/validator/form/address.js";import"../../models/ui/validator/form/ikas-address.js";import"../../models/ui/validator/form/register.js";import"../../models/ui/validator/form/contact-form.js";import"../../models/ui/validator/form/forgot-password.js";import"../../models/ui/validator/form/recover-password.js";import"../../models/ui/validator/form/account-info.js";import"../../models/ui/validator/form/raffle-form.js";import"../../models/ui/validator/form/customer-review.js";import"../../models/ui/raffle-list/index.js";import{IkasStorefrontConfig as v}from"@ikas/storefront-config";import{IkasPageDataInit as g}from"../../page-data-init/index.js";import{IkasBaseStore as x}from"../../store/base.js";import"../../store/customer/index.js";import"../../store/cart/index.js";var y=function(y){function h(e){var o=y.call(this,e)||this;return o.state={hasError:!1},o.onMouseEnter=function(){var e=o.props,t=e.vm,r=e.pageComponent;t.onMouseOver(r.id)},o.onMouseLeave=function(){var e=o.props,t=e.vm,r=e.pageComponent;t.onMouseLeave(r.id)},o.onClick=function(){var e=o.props,t=e.vm,r=e.pageComponent;t.onClick(r.id)},o.ref=t.createRef(),i(o,{pageComponentPropValue:n,propValues:n,isSelected:n,isHovered:n,hasNullValue:n,rendered:n,Component:n}),o}return e(h,y),h.prototype.componentDidMount=function(){var e=this.props,o=e.vm,t=e.pageComponent;o.setComponentRef(this.ref.current,t)},h.prototype.componentDidUpdate=function(){var e=this.props,o=e.vm,t=e.pageComponent;o.setComponentRef(this.ref.current,t)},h.getDerivedStateFromError=function(e){return console.error(e),{hasError:!0}},Object.defineProperty(h.prototype,"pageComponentPropValue",{get:function(){var e=this.props,o=e.vm,t=e.pageComponent;return o.initializedPropValues.find((function(e){return e.pageComponent.id===t.id}))},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"propValues",{get:function(){var e,t,r=this.props.vm,i=null===(e=this.pageComponentPropValue)||void 0===e?void 0:e.propValues;(null===(t=r.page)||void 0===t?void 0:t.type)===s.CHECKOUT&&(i={checkout:new c({currencyCode:"TRY",currencySymbol:"₺",orderLineItems:[new j({id:"",createdAt:0,updatedAt:0,bundleProductSettings:null,currencyCode:"TRY",currencySymbol:"₺",discount:null,discountPrice:null,finalPrice:100,options:null,originalOrderLineItemId:null,price:100,quantity:1,status:m.UNFULFILLED,statusUpdatedAt:null,stockLocationId:null,taxValue:null,unitPrice:null,finalUnitPrice:null,variant:{barcodeList:null,brand:null,categories:null,fileId:null,id:null,mainImageId:null,name:"",prices:null,productId:null,sku:null,slug:null,tagIds:null,taxValue:null,type:null,weight:null,hsCode:null,variantValues:[],baseUnit:null,unit:null,tags:null,bundleProducts:null},orderedAt:0})]}),checkoutSettings:new f({createdAt:0,updatedAt:0,id:"",giftPackagePriceList:null,identityNumberRequirement:p.OPTIONAL,isAccountRequired:!1,isGiftPackageEnabled:!1,isQuickRegistrationEnabled:!1,isShowPostalCode:!0,isTermsAndConditionsDefaultChecked:null,options:null,phoneRequirement:p.OPTIONAL,postalCodeRequirement:p.OPTIONAL,showCheckoutNote:!0,showCompanyInfoInShippingAddress:null,showTermsAndConditionsCheckbox:!0,storefrontId:"",couponCodeRequirement:l.DEFAULT,corporateInvoiceRequirement:null}),customizationProps:o({},i),returnPolicy:"",privacyPolicy:"",termsOfService:"",imprint:"",shippingPolicy:""});return i},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"isSelected",{get:function(){var e=this.props,o=e.vm,t=e.pageComponent;return o.selectedPageComponentId===t.id},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"isHovered",{get:function(){var e=this.props,o=e.vm,t=e.pageComponent;return o.hoveredPageComponentId===t.id},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"hasNullValue",{get:function(){var e,o=this;return!!(null===(e=this.pageComponentPropValue)||void 0===e?void 0:e.component.props.some((function(e){var t;if(e.isRequired){var r=(o.propValues||{})[e.name],i=null===(t=o.pageComponentPropValue)||void 0===t?void 0:t.component.props.find((function(o){return o.id===e.requiredPropId}));if(i){var n=(o.propValues||{})[i.name];if(i.type===u.BOOLEAN&&!n||i.type===u.CUSTOM&&n!==e.requiredEnumOptionValue)return!1}return null===r||null==r}})))},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"rendered",{get:function(){var e,i,n=this.Component,a=this.props.vm;return this.hasNullValue||this.state.hasError?t.createElement(r,{name:null===(e=this.pageComponentPropValue)||void 0===e?void 0:e.component.displayName}):t.createElement(n,o({},this.propValues,{store:x.getInstance(),settings:null===(i=a.theme)||void 0===i?void 0:i.settings,pageSpecificData:g.pageSpecificData}))},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"Component",{get:function(){var e,o=this.props,t=o.vm,r=o.pageComponent,i=v.getCurrentPageComponents();if(!i)return null;var n=i[r.componentId];return(null===(e=t.page)||void 0===e?void 0:e.type)===s.CHECKOUT&&(n=a),n},enumerable:!1,configurable:!0}),h.prototype.render=function(){var e=this;return t.createElement(d,null,(function(){var o;return e.state.hasError?t.createElement("div",{ref:e.ref,style:{position:"relative"},onMouseEnter:e.onMouseEnter,onMouseLeave:e.onMouseLeave,onClick:e.onClick},t.createElement(r,{name:null===(o=e.pageComponentPropValue)||void 0===o?void 0:o.component.displayName})):v.getCurrentPageComponents()?t.createElement("div",{ref:e.ref,style:{position:"relative"},onMouseEnter:e.onMouseEnter,onMouseLeave:e.onMouseLeave},e.rendered):(console.error("Components for the page not found."),null)}))},h}(t.Component);export{y as ThemeEditorComponent};
@@ -0,0 +1,7 @@
1
+ import { IkasOrderLineBundleProductSettings as IOrderLineBundleProductSettings } from "@ikas/storefront-models";
2
+ export declare class IkasOrderLineBundleProductSettings implements IOrderLineBundleProductSettings {
3
+ bundleLineId: string;
4
+ bundleLineQuantity: number;
5
+ name: string | null;
6
+ constructor(data: IOrderLineBundleProductSettings);
7
+ }
@@ -0,0 +1 @@
1
+ import{makeAutoObservable as n}from"mobx";var i=function(i){this.bundleLineId=i.bundleLineId||"",this.bundleLineQuantity=i.bundleLineQuantity||0,this.name=i.name||null,n(this)};export{i as IkasOrderLineBundleProductSettings};
@@ -2,11 +2,13 @@ import { IkasOrderLineItem as IOrderLineItem, IkasOrderLineItemStatus } from "@i
2
2
  import { IkasOrderLineDiscount } from "./discount";
3
3
  import { IkasOrderLineVariant } from "./variant";
4
4
  import { IkasOrderLineItemOption } from "./option";
5
+ import { IkasOrderLineBundleProductSettings } from "./bundle-product-settings";
5
6
  import { IkasBaseModel } from "../../base";
6
7
  declare type IOrderLineItemConstructorParams = {
7
8
  refundQuantity?: number;
8
9
  } & IOrderLineItem;
9
10
  export declare class IkasOrderLineItem extends IkasBaseModel implements IOrderLineItem {
11
+ bundleProductSettings: IkasOrderLineBundleProductSettings | null;
10
12
  currencyCode: string | null;
11
13
  currencySymbol: string | null;
12
14
  discount: IkasOrderLineDiscount | null;
@@ -1 +1 @@
1
- import{__extends as t}from'./../../../../ext/tslib/tslib.es6.js';export{IkasOrderLineItemStatus}from"@ikas/storefront-models";import{IkasOrderLineDiscount as e}from"./discount/index.js";import{IkasOrderLineVariant as i}from"./variant/index.js";import{IkasOrderLineItemOption as r}from"./option/index.js";import{IkasBaseModel as n}from"../../base/index.js";import{makeObservable as o,observable as u,computed as c,action as a}from"mobx";import{IkasOrderLineItemFunctions as l}from"@ikas/storefront-model-functions";import{formatCurrency as d}from"../../../../utils/currency.js";import{IkasBaseStore as s}from"../../../../store/base.js";import"../../../../store/customer/index.js";import"../../../../store/cart/index.js";var f=function(n){function f(t){var l,d,s,f,y,m=this;return(m=n.call(this,t)||this).currencyCode=null,m.discount=null,m.discountPrice=null,m.finalPrice=null,m.options=null,m.originalOrderLineItemId=null,m.statusUpdatedAt=null,m.stockLocationId=null,m.taxValue=null,m._refundQuantity=null,m.currencyCode=t.currencyCode||null,m.currencySymbol=t.currencySymbol||null,m.discount=t.discount?new e(t.discount):null,m.discountPrice=null!==(l=t.discountPrice)&&void 0!==l?l:null,m.finalPrice=null!==(d=t.finalPrice)&&void 0!==d?d:null,m.finalUnitPrice=null!==(s=t.finalUnitPrice)&&void 0!==s?s:null,m.options=(null===(f=t.options)||void 0===f?void 0:f.map((function(t){return new r(t)})))||null,m.originalOrderLineItemId=t.originalOrderLineItemId||null,m.price=t.price,m.quantity=t.quantity,m.status=t.status,m.statusUpdatedAt=t.statusUpdatedAt,m.stockLocationId=t.stockLocationId,m.taxValue=t.taxValue,m.unitPrice=null!==(y=t.unitPrice)&&void 0!==y?y:null,m.variant=new i(t.variant),m.orderedAt=t.orderedAt,m.refundQuantity=t.refundQuantity,o(m,{currencyCode:u,currencySymbol:u,discount:u,discountPrice:u,finalPrice:u,finalUnitPrice:u,options:u,originalOrderLineItemId:u,price:u,quantity:u,status:u,statusUpdatedAt:u,stockLocationId:u,taxValue:u,unitPrice:u,variant:u,orderedAt:u,_refundQuantity:u,priceWithQuantity:c,formattedPriceWithQuantity:c,overridenPriceWithQuantity:c,formattedOverridenPriceWithQuantity:c,formattedFinalPrice:c,formattedUnitPrice:c,formattedFinalUnitPrice:c,formattedDiscountPrice:c,finalPriceWithQuantity:c,formattedFinalPriceWithQuantity:c,tax:c,formattedTax:c,refundQuantity:c,editLineItem:a.bound}),m}return t(f,n),Object.defineProperty(f.prototype,"priceWithQuantity",{get:function(){return l.getPriceWithQuantity(this)},enumerable:!1,configurable:!0}),Object.defineProperty(f.prototype,"formattedPriceWithQuantity",{get:function(){return d(this.priceWithQuantity,this.currencyCode||"",this.currencySymbol||"")},enumerable:!1,configurable:!0}),Object.defineProperty(f.prototype,"overridenPriceWithQuantity",{get:function(){return l.getOverridenPriceWithQuantity(this)},enumerable:!1,configurable:!0}),Object.defineProperty(f.prototype,"formattedOverridenPriceWithQuantity",{get:function(){return d(this.overridenPriceWithQuantity||0,this.currencyCode||"",this.currencySymbol||"")},enumerable:!1,configurable:!0}),Object.defineProperty(f.prototype,"formattedFinalPrice",{get:function(){return d(this.finalPrice||0,this.currencyCode||"",this.currencySymbol||"")},enumerable:!1,configurable:!0}),Object.defineProperty(f.prototype,"formattedUnitPrice",{get:function(){return d(this.unitPrice||0,this.currencyCode||"",this.currencySymbol||"")},enumerable:!1,configurable:!0}),Object.defineProperty(f.prototype,"formattedFinalUnitPrice",{get:function(){return d(this.finalUnitPrice||0,this.currencyCode||"",this.currencySymbol||"")},enumerable:!1,configurable:!0}),Object.defineProperty(f.prototype,"unitPriceText",{get:function(){var t,e,i,r;if(null!==this.finalUnitPrice){var n=null===(t=this.variant.baseUnit)||void 0===t?void 0:t.baseAmount,o=(null===(i=null===(e=this.variant.baseUnit)||void 0===e?void 0:e.unit)||void 0===i?void 0:i.name)||(null===(r=this.variant.baseUnit)||void 0===r?void 0:r.type);return"".concat(d(this.finalUnitPrice,this.currencyCode||"",this.currencySymbol||"")," / ").concat(n&&1!==n?n:"").concat(o)}},enumerable:!1,configurable:!0}),Object.defineProperty(f.prototype,"formattedDiscountPrice",{get:function(){return d(this.discountPrice||0,this.currencyCode||"",this.currencySymbol||"")},enumerable:!1,configurable:!0}),Object.defineProperty(f.prototype,"finalPriceWithQuantity",{get:function(){return l.getFinalPriceWithQuantity(this)},enumerable:!1,configurable:!0}),Object.defineProperty(f.prototype,"formattedFinalPriceWithQuantity",{get:function(){return d(this.finalPriceWithQuantity||0,this.currencyCode||"",this.currencySymbol||"")},enumerable:!1,configurable:!0}),Object.defineProperty(f.prototype,"tax",{get:function(){return l.getTax(this)},enumerable:!1,configurable:!0}),Object.defineProperty(f.prototype,"formattedTax",{get:function(){return d(this.tax,this.currencyCode||"",this.currencySymbol||"")},enumerable:!1,configurable:!0}),Object.defineProperty(f.prototype,"hasDiscount",{get:function(){return l.hasDiscount(this)},enumerable:!1,configurable:!0}),Object.defineProperty(f.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}),f.prototype.editLineItem=function(){var t,e=this.variant.href||"";e=e.includes("?")?e+"&editLineID="+this.id:e+"?editLineID="+this.id,null===(t=s.getInstance().router)||void 0===t||t.push(e)},f}(n);export{f as IkasOrderLineItem};
1
+ import{__extends as t}from'./../../../../ext/tslib/tslib.es6.js';export{IkasOrderLineItemStatus}from"@ikas/storefront-models";import{IkasOrderLineDiscount as e}from"./discount/index.js";import{IkasOrderLineVariant as i}from"./variant/index.js";import{IkasOrderLineItemOption as n}from"./option/index.js";import{IkasOrderLineBundleProductSettings as r}from"./bundle-product-settings/index.js";import{IkasBaseModel as o}from"../../base/index.js";import{makeObservable as u,observable as c,computed as a,action as l}from"mobx";import{IkasOrderLineItemFunctions as d}from"@ikas/storefront-model-functions";import{formatCurrency as s}from"../../../../utils/currency.js";import{IkasBaseStore as f}from"../../../../store/base.js";import"../../../../store/customer/index.js";import"../../../../store/cart/index.js";var y=function(o){function y(t){var d,s,f,y,m,p=this;return(p=o.call(this,t)||this).bundleProductSettings=null,p.currencyCode=null,p.discount=null,p.discountPrice=null,p.finalPrice=null,p.options=null,p.originalOrderLineItemId=null,p.statusUpdatedAt=null,p.stockLocationId=null,p.taxValue=null,p._refundQuantity=null,p.bundleProductSettings=t.bundleProductSettings?new r(t.bundleProductSettings):null,p.currencyCode=t.currencyCode||null,p.currencySymbol=t.currencySymbol||null,p.discount=t.discount?new e(t.discount):null,p.discountPrice=null!==(d=t.discountPrice)&&void 0!==d?d:null,p.finalPrice=null!==(s=t.finalPrice)&&void 0!==s?s:null,p.finalUnitPrice=null!==(f=t.finalUnitPrice)&&void 0!==f?f:null,p.options=(null===(y=t.options)||void 0===y?void 0:y.map((function(t){return new n(t)})))||null,p.originalOrderLineItemId=t.originalOrderLineItemId||null,p.price=t.price,p.quantity=t.quantity,p.status=t.status,p.statusUpdatedAt=t.statusUpdatedAt,p.stockLocationId=t.stockLocationId,p.taxValue=t.taxValue,p.unitPrice=null!==(m=t.unitPrice)&&void 0!==m?m:null,p.variant=new i(t.variant),p.orderedAt=t.orderedAt,p.refundQuantity=t.refundQuantity,u(p,{bundleProductSettings:c,currencyCode:c,currencySymbol:c,discount:c,discountPrice:c,finalPrice:c,finalUnitPrice:c,options:c,originalOrderLineItemId:c,price:c,quantity:c,status:c,statusUpdatedAt:c,stockLocationId:c,taxValue:c,unitPrice:c,variant:c,orderedAt:c,_refundQuantity:c,priceWithQuantity:a,formattedPriceWithQuantity:a,overridenPriceWithQuantity:a,formattedOverridenPriceWithQuantity:a,formattedFinalPrice:a,formattedUnitPrice:a,formattedFinalUnitPrice:a,formattedDiscountPrice:a,finalPriceWithQuantity:a,formattedFinalPriceWithQuantity:a,tax:a,formattedTax:a,refundQuantity:a,editLineItem:l.bound}),p}return t(y,o),Object.defineProperty(y.prototype,"priceWithQuantity",{get:function(){return d.getPriceWithQuantity(this)},enumerable:!1,configurable:!0}),Object.defineProperty(y.prototype,"formattedPriceWithQuantity",{get:function(){return s(this.priceWithQuantity,this.currencyCode||"",this.currencySymbol||"")},enumerable:!1,configurable:!0}),Object.defineProperty(y.prototype,"overridenPriceWithQuantity",{get:function(){return d.getOverridenPriceWithQuantity(this)},enumerable:!1,configurable:!0}),Object.defineProperty(y.prototype,"formattedOverridenPriceWithQuantity",{get:function(){return s(this.overridenPriceWithQuantity||0,this.currencyCode||"",this.currencySymbol||"")},enumerable:!1,configurable:!0}),Object.defineProperty(y.prototype,"formattedFinalPrice",{get:function(){return s(this.finalPrice||0,this.currencyCode||"",this.currencySymbol||"")},enumerable:!1,configurable:!0}),Object.defineProperty(y.prototype,"formattedUnitPrice",{get:function(){return s(this.unitPrice||0,this.currencyCode||"",this.currencySymbol||"")},enumerable:!1,configurable:!0}),Object.defineProperty(y.prototype,"formattedFinalUnitPrice",{get:function(){return s(this.finalUnitPrice||0,this.currencyCode||"",this.currencySymbol||"")},enumerable:!1,configurable:!0}),Object.defineProperty(y.prototype,"unitPriceText",{get:function(){var t,e,i,n;if(null!==this.finalUnitPrice){var r=null===(t=this.variant.baseUnit)||void 0===t?void 0:t.baseAmount,o=(null===(i=null===(e=this.variant.baseUnit)||void 0===e?void 0:e.unit)||void 0===i?void 0:i.name)||(null===(n=this.variant.baseUnit)||void 0===n?void 0:n.type);return"".concat(s(this.finalUnitPrice,this.currencyCode||"",this.currencySymbol||"")," / ").concat(r&&1!==r?r:"").concat(o)}},enumerable:!1,configurable:!0}),Object.defineProperty(y.prototype,"formattedDiscountPrice",{get:function(){return s(this.discountPrice||0,this.currencyCode||"",this.currencySymbol||"")},enumerable:!1,configurable:!0}),Object.defineProperty(y.prototype,"finalPriceWithQuantity",{get:function(){return d.getFinalPriceWithQuantity(this)},enumerable:!1,configurable:!0}),Object.defineProperty(y.prototype,"formattedFinalPriceWithQuantity",{get:function(){return s(this.finalPriceWithQuantity||0,this.currencyCode||"",this.currencySymbol||"")},enumerable:!1,configurable:!0}),Object.defineProperty(y.prototype,"tax",{get:function(){return d.getTax(this)},enumerable:!1,configurable:!0}),Object.defineProperty(y.prototype,"formattedTax",{get:function(){return s(this.tax,this.currencyCode||"",this.currencySymbol||"")},enumerable:!1,configurable:!0}),Object.defineProperty(y.prototype,"hasDiscount",{get:function(){return d.hasDiscount(this)},enumerable:!1,configurable:!0}),Object.defineProperty(y.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}),y.prototype.editLineItem=function(){var t,e=this.variant.href||"";e=e.includes("?")?e+"&editLineID="+this.id:e+"?editLineID="+this.id,null===(t=f.getInstance().router)||void 0===t||t.push(e)},y}(o);export{y as IkasOrderLineItem};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ikas/storefront",
3
- "version": "6.1.0-beta.43",
3
+ "version": "6.1.0-beta.45",
4
4
  "description": "Storefront functionality for ikas storefront themes.",
5
5
  "author": "ikas",
6
6
  "license": "ISC",
@@ -21,11 +21,11 @@
21
21
  "swiper": "11.0.6"
22
22
  },
23
23
  "devDependencies": {
24
- "@ikas/storefront-api": "^6.1.0-beta.43",
25
- "@ikas/storefront-config": "^6.1.0-beta.43",
26
- "@ikas/storefront-model-functions": "^6.1.0-beta.43",
27
- "@ikas/storefront-models": "^6.1.0-beta.43",
28
- "@ikas/storefront-providers": "^6.1.0-beta.43",
24
+ "@ikas/storefront-api": "^6.1.0-beta.45",
25
+ "@ikas/storefront-config": "^6.1.0-beta.45",
26
+ "@ikas/storefront-model-functions": "^6.1.0-beta.45",
27
+ "@ikas/storefront-models": "^6.1.0-beta.45",
28
+ "@ikas/storefront-providers": "^6.1.0-beta.45",
29
29
  "@ikas/localized-address": "1.0.0-beta.6",
30
30
  "@adyen/adyen-web": "^5.57.0",
31
31
  "@rollup/plugin-commonjs": "^22.0.0",
@@ -60,11 +60,11 @@
60
60
  },
61
61
  "peerDependencies": {
62
62
  "@ikas/localized-address": "1.0.0-beta.6",
63
- "@ikas/storefront-api": "^6.1.0-beta.43",
64
- "@ikas/storefront-config": "^6.1.0-beta.43",
65
- "@ikas/storefront-model-functions": "^6.1.0-beta.43",
66
- "@ikas/storefront-models": "^6.1.0-beta.43",
67
- "@ikas/storefront-providers": "^6.1.0-beta.43",
63
+ "@ikas/storefront-api": "^6.1.0-beta.45",
64
+ "@ikas/storefront-config": "^6.1.0-beta.45",
65
+ "@ikas/storefront-model-functions": "^6.1.0-beta.45",
66
+ "@ikas/storefront-models": "^6.1.0-beta.45",
67
+ "@ikas/storefront-providers": "^6.1.0-beta.45",
68
68
  "mobx": "^6.1.3",
69
69
  "mobx-react-lite": "^3.1.5",
70
70
  "next": "12.2.0",