@ikas/storefront 4.0.0-alpha.71 → 4.0.0-alpha.72

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 e from'./../../../../../ext/style-inject/dist/style-inject.es.js';var t={CheckoutItem:"style-module_CheckoutItem__DaU-Y",ImageContainer:"style-module_ImageContainer__Nr1VF",Image:"style-module_Image__EskwT",QuantityCircle:"style-module_QuantityCircle__sv1mk",Center:"style-module_Center__ZOloc",Name:"style-module_Name__z-5-n",OptionsText:"style-module_OptionsText__7Gcy6",Right:"style-module_Right__WoFoc",Price:"style-module_Price__4WmJv",GrayPrice:"style-module_GrayPrice__Gtch1",LightText:"style-module_LightText__uO43H",Small:"style-module_Small__peZjv",OptionRow:"style-module_OptionRow__lt6CJ",OptionName:"style-module_OptionName__09oij",OptionValue:"style-module_OptionValue__4fCYP",OptionsHorContainer:"style-module_OptionsHorContainer__eTmOO",OptionColorValue:"style-module_OptionColorValue__oNEyN"};e(".style-module_CheckoutItem__DaU-Y {\n display: flex;\n width: 100%;\n margin-bottom: 24px;\n}\n.style-module_CheckoutItem__DaU-Y:last-child {\n margin-bottom: 0;\n}\n.style-module_CheckoutItem__DaU-Y .style-module_ImageContainer__Nr1VF {\n flex: 0 0 auto;\n width: 80px;\n height: 74px;\n position: relative;\n padding-right: 16px;\n overflow: hidden;\n padding-top: 10px;\n}\n@media only screen and (max-width: 375px) {\n .style-module_CheckoutItem__DaU-Y .style-module_ImageContainer__Nr1VF {\n width: 72px;\n height: 66px;\n }\n}\n.style-module_CheckoutItem__DaU-Y .style-module_ImageContainer__Nr1VF .style-module_Image__EskwT {\n object-fit: contain;\n border-radius: 8px;\n width: 64px;\n height: 64px;\n}\n@media only screen and (max-width: 375px) {\n .style-module_CheckoutItem__DaU-Y .style-module_ImageContainer__Nr1VF .style-module_Image__EskwT {\n width: 56px;\n height: 56px;\n }\n}\n.style-module_CheckoutItem__DaU-Y .style-module_ImageContainer__Nr1VF .style-module_QuantityCircle__sv1mk {\n width: 20px;\n height: 20px;\n border-radius: 10px;\n background-color: var(--checkout-button-bg-color);\n color: var(--checkout-button-text-color);\n display: flex;\n justify-content: center;\n align-items: center;\n font-size: 12px;\n font-weight: 500;\n position: absolute;\n top: 0px;\n right: 8px;\n}\n.style-module_CheckoutItem__DaU-Y .style-module_Center__ZOloc {\n position: relative;\n flex: 1 1 auto;\n}\n.style-module_CheckoutItem__DaU-Y .style-module_Center__ZOloc .style-module_Name__z-5-n {\n font-size: 14px;\n font-weight: 600;\n color: var(--checkout-primary-text-color);\n line-height: 20px;\n max-height: 40px;\n overflow: hidden;\n text-overflow: ellipsis;\n display: -webkit-box;\n -webkit-line-clamp: 2;\n -webkit-box-orient: vertical;\n}\n.style-module_CheckoutItem__DaU-Y .style-module_Center__ZOloc .style-module_OptionsText__7Gcy6 {\n font-size: 12px;\n color: var(--checkout-primary-text-color);\n line-height: 16px;\n margin-top: 2px;\n user-select: none;\n}\n.style-module_CheckoutItem__DaU-Y .style-module_Center__ZOloc .style-module_OptionsText__7Gcy6:hover {\n cursor: pointer;\n text-decoration: underline;\n}\n.style-module_CheckoutItem__DaU-Y .style-module_Right__WoFoc {\n flex: 0 0 auto;\n display: flex;\n flex-direction: column;\n align-items: flex-end;\n padding-left: 12px;\n}\n.style-module_CheckoutItem__DaU-Y .style-module_Right__WoFoc .style-module_Price__4WmJv {\n font-size: 14px;\n display: flex;\n flex-direction: column;\n align-items: flex-end;\n color: var(--checkout-primary-text-color);\n}\n.style-module_CheckoutItem__DaU-Y .style-module_Right__WoFoc .style-module_GrayPrice__Gtch1 {\n font-size: 14px;\n color: var(--checkout-secondary-text-color);\n text-decoration: line-through;\n}\n.style-module_CheckoutItem__DaU-Y .style-module_LightText__uO43H {\n font-size: 14px;\n color: var(--checkout-secondary-text-color);\n line-height: 20px;\n margin-top: 2px;\n}\n.style-module_CheckoutItem__DaU-Y .style-module_LightText__uO43H.style-module_Small__peZjv {\n font-size: 12px;\n}\n.style-module_CheckoutItem__DaU-Y .style-module_OptionRow__lt6CJ {\n display: flex;\n flex-direction: column;\n margin-bottom: 24px;\n max-width: 400px;\n}\n.style-module_CheckoutItem__DaU-Y .style-module_OptionRow__lt6CJ .style-module_OptionName__09oij {\n font-size: 14px;\n color: var(--checkout-primary-text-color);\n margin-right: 8px;\n font-weight: 500;\n}\n.style-module_CheckoutItem__DaU-Y .style-module_OptionRow__lt6CJ .style-module_OptionValue__4fCYP {\n font-size: 14px;\n color: var(--checkout-secondary-text-color);\n}\n.style-module_CheckoutItem__DaU-Y .style-module_OptionRow__lt6CJ .style-module_OptionsHorContainer__eTmOO {\n display: flex;\n align-items: center;\n flex-wrap: wrap;\n}\n.style-module_CheckoutItem__DaU-Y .style-module_OptionRow__lt6CJ .style-module_OptionColorValue__oNEyN {\n width: 24px;\n height: 24px;\n border-radius: 4px;\n margin-right: 4px;\n}");export{t as default};
1
+ import e from'./../../../../../ext/style-inject/dist/style-inject.es.js';var t={CheckoutItem:"style-module_CheckoutItem__DaU-Y",ImageContainer:"style-module_ImageContainer__Nr1VF",Image:"style-module_Image__EskwT",QuantityCircle:"style-module_QuantityCircle__sv1mk",Center:"style-module_Center__ZOloc",Name:"style-module_Name__z-5-n",OptionsText:"style-module_OptionsText__7Gcy6",Right:"style-module_Right__WoFoc",Price:"style-module_Price__4WmJv",GrayPrice:"style-module_GrayPrice__Gtch1",LightText:"style-module_LightText__uO43H",Small:"style-module_Small__peZjv",OptionRow:"style-module_OptionRow__lt6CJ",OptionName:"style-module_OptionName__09oij",OptionValue:"style-module_OptionValue__4fCYP",OptionsHorContainer:"style-module_OptionsHorContainer__eTmOO",OptionColorValue:"style-module_OptionColorValue__oNEyN"};e(".style-module_CheckoutItem__DaU-Y {\n display: flex;\n width: 100%;\n margin-bottom: 24px;\n}\n.style-module_CheckoutItem__DaU-Y:last-child {\n margin-bottom: 0;\n}\n.style-module_CheckoutItem__DaU-Y .style-module_ImageContainer__Nr1VF {\n flex: 0 0 auto;\n width: 80px;\n height: 74px;\n position: relative;\n padding-right: 16px;\n overflow: hidden;\n padding-top: 10px;\n}\n@media only screen and (max-width: 375px) {\n .style-module_CheckoutItem__DaU-Y .style-module_ImageContainer__Nr1VF {\n width: 72px;\n height: 66px;\n }\n}\n.style-module_CheckoutItem__DaU-Y .style-module_ImageContainer__Nr1VF .style-module_Image__EskwT {\n object-fit: contain;\n border-radius: 8px;\n width: 64px;\n height: 64px;\n}\n@media only screen and (max-width: 375px) {\n .style-module_CheckoutItem__DaU-Y .style-module_ImageContainer__Nr1VF .style-module_Image__EskwT {\n width: 56px;\n height: 56px;\n }\n}\n.style-module_CheckoutItem__DaU-Y .style-module_ImageContainer__Nr1VF .style-module_QuantityCircle__sv1mk {\n width: 20px;\n height: 20px;\n border-radius: 10px;\n background-color: var(--checkout-button-bg-color);\n color: var(--checkout-button-text-color);\n display: flex;\n justify-content: center;\n align-items: center;\n font-size: 12px;\n font-weight: 500;\n position: absolute;\n top: 0px;\n right: 8px;\n}\n.style-module_CheckoutItem__DaU-Y .style-module_Center__ZOloc {\n position: relative;\n flex: 1 1 auto;\n padding-top: 10px;\n}\n.style-module_CheckoutItem__DaU-Y .style-module_Center__ZOloc .style-module_Name__z-5-n {\n font-size: 14px;\n font-weight: 600;\n color: var(--checkout-primary-text-color);\n line-height: 20px;\n max-height: 40px;\n overflow: hidden;\n text-overflow: ellipsis;\n display: -webkit-box;\n -webkit-line-clamp: 2;\n -webkit-box-orient: vertical;\n}\n.style-module_CheckoutItem__DaU-Y .style-module_Center__ZOloc .style-module_OptionsText__7Gcy6 {\n font-size: 12px;\n color: var(--checkout-primary-text-color);\n line-height: 16px;\n margin-top: 2px;\n user-select: none;\n}\n.style-module_CheckoutItem__DaU-Y .style-module_Center__ZOloc .style-module_OptionsText__7Gcy6:hover {\n cursor: pointer;\n text-decoration: underline;\n}\n.style-module_CheckoutItem__DaU-Y .style-module_Right__WoFoc {\n flex: 0 0 auto;\n display: flex;\n flex-direction: column;\n align-items: flex-end;\n padding-left: 12px;\n padding-top: 10px;\n}\n.style-module_CheckoutItem__DaU-Y .style-module_Right__WoFoc .style-module_Price__4WmJv {\n font-size: 14px;\n display: flex;\n flex-direction: column;\n align-items: flex-end;\n color: var(--checkout-primary-text-color);\n}\n.style-module_CheckoutItem__DaU-Y .style-module_Right__WoFoc .style-module_GrayPrice__Gtch1 {\n font-size: 14px;\n color: var(--checkout-secondary-text-color);\n text-decoration: line-through;\n}\n.style-module_CheckoutItem__DaU-Y .style-module_LightText__uO43H {\n font-size: 14px;\n color: var(--checkout-secondary-text-color);\n line-height: 20px;\n margin-top: 2px;\n}\n.style-module_CheckoutItem__DaU-Y .style-module_LightText__uO43H.style-module_Small__peZjv {\n font-size: 12px;\n}\n.style-module_CheckoutItem__DaU-Y .style-module_OptionRow__lt6CJ {\n display: flex;\n flex-direction: column;\n margin-bottom: 24px;\n max-width: 400px;\n}\n.style-module_CheckoutItem__DaU-Y .style-module_OptionRow__lt6CJ .style-module_OptionName__09oij {\n font-size: 14px;\n color: var(--checkout-primary-text-color);\n margin-right: 8px;\n font-weight: 500;\n}\n.style-module_CheckoutItem__DaU-Y .style-module_OptionRow__lt6CJ .style-module_OptionValue__4fCYP {\n font-size: 14px;\n color: var(--checkout-secondary-text-color);\n}\n.style-module_CheckoutItem__DaU-Y .style-module_OptionRow__lt6CJ .style-module_OptionsHorContainer__eTmOO {\n display: flex;\n align-items: center;\n flex-wrap: wrap;\n}\n.style-module_CheckoutItem__DaU-Y .style-module_OptionRow__lt6CJ .style-module_OptionColorValue__oNEyN {\n width: 24px;\n height: 24px;\n border-radius: 4px;\n margin-right: 4px;\n}");export{t as default};
@@ -1 +1 @@
1
- import{__awaiter as e,__generator as t}from'./../../../../ext/tslib/tslib.es6.js';import*as o from"react";import{observer as n}from"mobx-react-lite";import a from"lodash/sortBy";import c from"../input-with-button/index.js";import l from"../notification-box/index.js";import{CheckoutStep as r}from"../../model.js";import{IkasStorefrontConfig as i}from"@ikas/storefront-config";import{formatCurrency as m}from"../../../../utils/currency.js";import{useTranslation as u}from"../../../../utils/i18n.js";import{CartItem as s}from"./cart-item/index.js";import{FormItem as d}from"../form-item/index.js";import{FormItemType as p}from"../form-item/model.js";import E from"../tooltip/index.js";import v from"../svg/arrow-down.js";import h from"../svg/cross.js";import C from"../svg/gift.js";import f from"./style.module.scss.js";import k from"../svg/ikas.js";var g=n((function(e){var t,n,a=e.vm,c=e.allowExpand,d=a.checkout,p=u().t,E=o.useState(!c),h=E[0],C=E[1],g=o.useState(!1),x=g[0],j=g[1],w=o.useState(0),A=w[0],P=w[1],I=o.useState(null),L=I[0],R=I[1],D=o.useState(!1),B=D[0],U=D[1],F=o.useState(!1),V=F[0],M=F[1];o.useEffect((function(){c&&(h?L&&P(L.getBoundingClientRect().height):P(0))}),[h,L,c,B,V,x]);var O=[f.CartSummary,c?f.HideOnDesktop:""].join(" "),_=c?{height:A+"px"}:void 0,z=[f.ArrowDown,h?f.Rotated:""].join(" ");return d?o.createElement(o.Fragment,null,!!c&&o.createElement(o.Fragment,null,o.createElement("div",{id:"checkout-mobile-summary-header"}),o.createElement("div",{className:f.ExpandHeader,onClick:function(){if(!h){var e=document.getElementById("Checkout"),t=document.getElementById("checkout-mobile-summary-header");e&&t&&e.scrollTo({top:t.offsetTop,behavior:"smooth"})}C(!h)}},o.createElement("div",{className:f.Left},p("checkout-page:summary")),o.createElement("div",{className:f.Price},o.createElement("span",{className:f.PriceText},"".concat(m(a.finalPrice||0,d.currencyCode,d.currencySymbol)," (").concat(d.items.length," ").concat(p("checkout-page:cartItemProduct"),")")),o.createElement("span",{className:z},o.createElement(v,null))))),o.createElement("div",{className:O},o.createElement("div",{className:f.DetailsContainer,style:_},o.createElement("div",{className:f.Details,ref:R},o.createElement("div",{className:f.ItemsContainer},d.items.map((function(e,t){return o.createElement(s,{key:t,vm:a,cartItem:e,currencyCode:d.currencyCode})}))),o.createElement("div",{className:f.Divider}),o.createElement("div",{className:f.SubTotalInfo},x&&o.createElement("div",{className:f.NotificationContainer},o.createElement(l,{type:"warning",title:p("checkout-page:giftCodeErrorTitle"),content:p("checkout-page:giftCodeErrorDescription"),onClose:function(){return j(!1)}})),o.createElement(N,{label:p("checkout-page:subtotal"),value:d.formattedTotalPrice,tooltipText:p("checkout-page:subtotalTooltip")}),!!(null===(t=d.shippingLines)||void 0===t?void 0:t.length)&&o.createElement(N,{label:p("checkout-page:cartShippingTitle"),value:d.shippingTotal?d.formattedShippingTotal:p("checkout-page:free")}),!!a.installmentExtraPrice&&o.createElement(N,{label:p("checkout-page:cartInterest"),value:m(a.installmentExtraPrice,d.currencyCode,d.currencySymbol)}),o.createElement(y,{vm:a}),o.createElement(S,{vm:a}),(a.step===r.SUCCESS&&(!!a.checkout.note||!!a.checkout.appliedCouponCode)||a.step!==r.SUCCESS)&&o.createElement("div",{className:f.Divider,style:{marginTop:"24px",marginBottom:"24px"}}),o.createElement(b,{vm:a,isAddingCoupon:V,setAddingCoupon:M,setCouponError:j}),o.createElement(T,{vm:a,isAddingNote:B,setAddingNote:U})),o.createElement("div",{className:f.TotalContainer},o.createElement("div",{className:f.TitleContainer},o.createElement("div",{className:f.Title},p("checkout-page:total"))),o.createElement("div",null,o.createElement("div",{className:f.TotalPricesContainer},o.createElement("div",{className:f.TotalPrice},m(a.finalPrice||0,d.currencyCode,d.currencySymbol)),!!d.$totalTax&&!!(null===(n=a.customizationProps)||void 0===n?void 0:n.showTax)&&o.createElement("div",{className:[f.TotalTax].join(" ")},p("checkout-page:cartTaxTitle")+" "+d.$formattedTotalTax)))),o.createElement("div",{className:f.PoweredBy},o.createElement("span",null,"powered by"),o.createElement("a",{href:"https://ikas.com"+("tr"===i.getCurrentLocale()?"/tr":""),target:"_blank"},o.createElement(k,null))))))):null})),N=n((function(e){var t=e.label,n=e.value,a=e.tooltipText;return o.createElement("div",{className:f.InfoRow},o.createElement("div",{className:f.Label},o.createElement("span",null,t),!!a&&o.createElement(E,{text:a,style:{marginLeft:"8px"}})),o.createElement("div",{className:f.Value},n))})),y=n((function(e){var t=e.vm,n=u().t;return t.checkout?o.createElement(o.Fragment,null,a(t.checkout.nonCouponAdjustments||[],"order").map((function(e,a){return o.createElement("div",{className:f.InfoRow,key:a},o.createElement("div",{className:f.Label},"INTEREST"===e.name?n("checkout-page:cartInterest"):e.name),o.createElement("div",{className:f.Value},o.createElement("span",null,"DECREMENT"===e.type?"- ":"")," ",o.createElement("span",null,m(e.amount,t.checkout.currencyCode,t.checkout.currencySymbol))))}))):null})),S=n((function(e){var t,n,a=e.vm,c=u().t;return a.checkout?o.createElement(o.Fragment,null,a.step!==r.SUCCESS&&((null===(t=a.checkout.selectedPaymentGateway)||void 0===t?void 0:t.getCalculatedAdditionalPrices(a.checkout.totalFinalPrice||0,a.checkout.shippingLines||null))||[]).filter((function(e){return 0!==e.amount})).map((function(e,t){return o.createElement("div",{className:f.InfoRow,key:t},o.createElement("div",{className:f.Label},e.name),o.createElement("div",{className:f.Value},o.createElement("span",null,"DECREMENT"===e.type?"- ":"")," ",o.createElement("span",null,m(e.amount,a.checkout.currencyCode,a.checkout.currencySymbol))))})),null===(n=a.checkout.giftPackageLines)||void 0===n?void 0:n.map((function(e,t){return o.createElement("div",{className:f.InfoRow,key:t},o.createElement("div",{className:f.Label},o.createElement("div",{className:f.GiftLabel},o.createElement(C,{style:{position:"relative",top:"-1px"}}),o.createElement("span",null,c("checkout-page:giftPackage")))),o.createElement("div",{className:f.Value},o.createElement("span",null,m(e.price,a.checkout.currencyCode,a.checkout.currencySymbol))))}))):null})),b=n((function(n){var a=n.vm,l=n.isAddingCoupon,i=n.setAddingCoupon,s=n.setCouponError,d=u().t,p=o.useState(""),E=p[0],v=p[1],C=o.useState(!1),k=C[0],g=C[1];if(a.step===r.SUCCESS&&!a.checkout.appliedCouponCode)return null;var N=a.checkout.couponAdjustment;return o.createElement("div",{className:f.InfoRow},!a.checkout.appliedCouponCode&&!l&&o.createElement("div",{className:f.ActionTextBtn,onClick:function(){return i(!0)}},d("checkout-page:addCouponCode")),l&&o.createElement(c,{value:E,placeholder:d("checkout-page:couponCode"),buttonLabel:d("checkout-page:actions.apply"),onClick:function(){return e(void 0,void 0,void 0,(function(){return t(this,(function(e){switch(e.label){case 0:return a.checkout.couponCode=E,g(!0),[4,a.onCouponCodeApply()];case 1:return e.sent(),g(!1),v(""),a.checkout.appliedCouponCode?(i(!1),s(!1)):(s(!0),a.checkout.couponCode=null),[2]}}))}))},isLoading:k,onChange:v}),!!a.checkout.appliedCouponCode&&!l&&o.createElement("div",{className:[f.ActionTextBtn,f.NoUnderline,f.Light].join(" ")},d("checkout-page:couponCode"),o.createElement("span",{className:f.AppliedCoupon},o.createElement("span",{className:f.CouponCode},a.checkout.appliedCouponCode),a.step!==r.SUCCESS&&o.createElement("span",{className:f.ClearCoupon,onClick:function(){return e(void 0,void 0,void 0,(function(){return t(this,(function(e){switch(e.label){case 0:return a.checkout.couponCode=null,g(!0),[4,a.onCouponCodeApply()];case 1:return e.sent(),g(!1),[2]}}))}))}},o.createElement(h,null)))),!!a.checkout.appliedCouponCode&&!l&&o.createElement("div",{className:f.Value},o.createElement("span",null,"DECREMENT"===(null==N?void 0:N.type)?"- ":"")," ",o.createElement("span",null,m((null==N?void 0:N.amount)||0,a.checkout.currencyCode,a.checkout.currencySymbol))))})),T=n((function(e){var t=e.vm,n=e.isAddingNote,a=e.setAddingNote,c=u().t,l=o.useState(t.checkout.note?c("checkout-page:editOrderNote"):c("checkout-page:addOrderNote"))[0],i=o.useCallback((function(){a(!0)}),[]),m=o.useCallback((function(e){t.checkout.note=e}),[t,t.checkout]);if(!t.checkoutSettings.showCheckoutNote)return null;var s=t.step===r.SUCCESS;return s&&!t.checkout.note?null:o.createElement("div",{className:f.InfoRow},!n&&!s&&o.createElement("div",{className:f.ActionTextBtn,onClick:i},l),(n||s)&&o.createElement("div",{className:[f.CheckoutNoteContainer,s?f.Success:""].join(" ")},o.createElement("div",{className:f.Title},c("checkout-page:orderNote")),s?o.createElement("div",{className:f.CheckoutNoteDisplay},t.checkout.note):o.createElement(d,{style:{width:"100%"},type:p.TEXT_AREA,disableResize:!0,label:"",value:t.checkout.note||"",onChange:m})))}));export{g as CartSummary};
1
+ import{__awaiter as e,__generator as t}from'./../../../../ext/tslib/tslib.es6.js';import*as o from"react";import{observer as n}from"mobx-react-lite";import a from"lodash/sortBy";import c from"../input-with-button/index.js";import l from"../notification-box/index.js";import{CheckoutStep as r}from"../../model.js";import{IkasStorefrontConfig as i}from"@ikas/storefront-config";import{formatCurrency as m}from"../../../../utils/currency.js";import{useTranslation as u}from"../../../../utils/i18n.js";import{CartItem as s}from"./cart-item/index.js";import{FormItem as d}from"../form-item/index.js";import{FormItemType as p}from"../form-item/model.js";import E from"../tooltip/index.js";import v from"../svg/arrow-down.js";import h from"../svg/cross.js";import C from"../svg/gift.js";import f from"./style.module.scss.js";import k from"../svg/ikas.js";var g=n((function(e){var t,n,a=e.vm,c=e.allowExpand,d=a.checkout,p=u().t,E=o.useState(!c),h=E[0],C=E[1],g=o.useState(!1),x=g[0],j=g[1],w=o.useState(0),A=w[0],P=w[1],I=o.useState(null),L=I[0],R=I[1],D=o.useState(!1),B=D[0],U=D[1],F=o.useState(!1),V=F[0],M=F[1];o.useEffect((function(){c&&(h?L&&P(L.getBoundingClientRect().height):P(0))}),[h,L,c,B,V,x]);var O=[f.CartSummary,c?f.HideOnDesktop:""].join(" "),_=c?{height:A+"px"}:void 0,z=[f.ArrowDown,h?f.Rotated:""].join(" ");return d?o.createElement(o.Fragment,null,!!c&&o.createElement(o.Fragment,null,o.createElement("div",{id:"checkout-mobile-summary-header"}),o.createElement("div",{className:f.ExpandHeader,onClick:function(){if(!h){var e=document.getElementById("Checkout"),t=document.getElementById("checkout-mobile-summary-header");e&&t&&e.scrollTo({top:t.offsetTop,behavior:"smooth"})}C(!h)}},o.createElement("div",{className:f.Left},p("checkout-page:summary")),o.createElement("div",{className:f.Price},o.createElement("span",{className:f.PriceText},"".concat(m(a.finalPrice||0,d.currencyCode,d.currencySymbol)," (").concat(d.itemQuantity," ").concat(p("checkout-page:cartItemProduct"),")")),o.createElement("span",{className:z},o.createElement(v,null))))),o.createElement("div",{className:O},o.createElement("div",{className:f.DetailsContainer,style:_},o.createElement("div",{className:f.Details,ref:R},o.createElement("div",{className:f.ItemsContainer},d.items.map((function(e,t){return o.createElement(s,{key:t,vm:a,cartItem:e,currencyCode:d.currencyCode})}))),o.createElement("div",{className:f.Divider}),o.createElement("div",{className:f.SubTotalInfo},x&&o.createElement("div",{className:f.NotificationContainer},o.createElement(l,{type:"warning",title:p("checkout-page:giftCodeErrorTitle"),content:p("checkout-page:giftCodeErrorDescription"),onClose:function(){return j(!1)}})),o.createElement(N,{label:p("checkout-page:subtotal"),value:d.formattedTotalPrice,tooltipText:p("checkout-page:subtotalTooltip")}),!!(null===(t=d.shippingLines)||void 0===t?void 0:t.length)&&o.createElement(N,{label:p("checkout-page:cartShippingTitle"),value:d.shippingTotal?d.formattedShippingTotal:p("checkout-page:free")}),!!a.installmentExtraPrice&&o.createElement(N,{label:p("checkout-page:cartInterest"),value:m(a.installmentExtraPrice,d.currencyCode,d.currencySymbol)}),o.createElement(y,{vm:a}),o.createElement(S,{vm:a}),(a.step===r.SUCCESS&&(!!a.checkout.note||!!a.checkout.appliedCouponCode)||a.step!==r.SUCCESS)&&o.createElement("div",{className:f.Divider,style:{marginTop:"24px",marginBottom:"24px"}}),o.createElement(b,{vm:a,isAddingCoupon:V,setAddingCoupon:M,setCouponError:j}),o.createElement(T,{vm:a,isAddingNote:B,setAddingNote:U})),o.createElement("div",{className:f.TotalContainer},o.createElement("div",{className:f.TitleContainer},o.createElement("div",{className:f.Title},p("checkout-page:total"))),o.createElement("div",null,o.createElement("div",{className:f.TotalPricesContainer},o.createElement("div",{className:f.TotalPrice},m(a.finalPrice||0,d.currencyCode,d.currencySymbol)),!!d.$totalTax&&!!(null===(n=a.customizationProps)||void 0===n?void 0:n.showTax)&&o.createElement("div",{className:[f.TotalTax].join(" ")},p("checkout-page:cartTaxTitle")+" "+d.$formattedTotalTax)))),o.createElement("div",{className:f.PoweredBy},o.createElement("span",null,"powered by"),o.createElement("a",{href:"https://ikas.com"+("tr"===i.getCurrentLocale()?"/tr":""),target:"_blank"},o.createElement(k,null))))))):null})),N=n((function(e){var t=e.label,n=e.value,a=e.tooltipText;return o.createElement("div",{className:f.InfoRow},o.createElement("div",{className:f.Label},o.createElement("span",null,t),!!a&&o.createElement(E,{text:a,style:{marginLeft:"8px"}})),o.createElement("div",{className:f.Value},n))})),y=n((function(e){var t=e.vm,n=u().t;return t.checkout?o.createElement(o.Fragment,null,a(t.checkout.nonCouponAdjustments||[],"order").map((function(e,a){return o.createElement("div",{className:f.InfoRow,key:a},o.createElement("div",{className:f.Label},"INTEREST"===e.name?n("checkout-page:cartInterest"):e.name),o.createElement("div",{className:f.Value},o.createElement("span",null,"DECREMENT"===e.type?"- ":"")," ",o.createElement("span",null,m(e.amount,t.checkout.currencyCode,t.checkout.currencySymbol))))}))):null})),S=n((function(e){var t,n,a=e.vm,c=u().t;return a.checkout?o.createElement(o.Fragment,null,a.step!==r.SUCCESS&&((null===(t=a.checkout.selectedPaymentGateway)||void 0===t?void 0:t.getCalculatedAdditionalPrices(a.checkout.totalFinalPrice||0,a.checkout.shippingLines||null))||[]).filter((function(e){return 0!==e.amount})).map((function(e,t){return o.createElement("div",{className:f.InfoRow,key:t},o.createElement("div",{className:f.Label},e.name),o.createElement("div",{className:f.Value},o.createElement("span",null,"DECREMENT"===e.type?"- ":"")," ",o.createElement("span",null,m(e.amount,a.checkout.currencyCode,a.checkout.currencySymbol))))})),null===(n=a.checkout.giftPackageLines)||void 0===n?void 0:n.map((function(e,t){return o.createElement("div",{className:f.InfoRow,key:t},o.createElement("div",{className:f.Label},o.createElement("div",{className:f.GiftLabel},o.createElement(C,{style:{position:"relative",top:"-1px"}}),o.createElement("span",null,c("checkout-page:giftPackage")))),o.createElement("div",{className:f.Value},o.createElement("span",null,m(e.price,a.checkout.currencyCode,a.checkout.currencySymbol))))}))):null})),b=n((function(n){var a=n.vm,l=n.isAddingCoupon,i=n.setAddingCoupon,s=n.setCouponError,d=u().t,p=o.useState(""),E=p[0],v=p[1],C=o.useState(!1),k=C[0],g=C[1];if(a.step===r.SUCCESS&&!a.checkout.appliedCouponCode)return null;var N=a.checkout.couponAdjustment;return o.createElement("div",{className:f.InfoRow},!a.checkout.appliedCouponCode&&!l&&o.createElement("div",{className:f.ActionTextBtn,onClick:function(){return i(!0)}},d("checkout-page:addCouponCode")),l&&o.createElement(c,{value:E,placeholder:d("checkout-page:couponCode"),buttonLabel:d("checkout-page:actions.apply"),onClick:function(){return e(void 0,void 0,void 0,(function(){return t(this,(function(e){switch(e.label){case 0:return a.checkout.couponCode=E,g(!0),[4,a.onCouponCodeApply()];case 1:return e.sent(),g(!1),v(""),a.checkout.appliedCouponCode?(i(!1),s(!1)):(s(!0),a.checkout.couponCode=null),[2]}}))}))},isLoading:k,onChange:v}),!!a.checkout.appliedCouponCode&&!l&&o.createElement("div",{className:[f.ActionTextBtn,f.NoUnderline,f.Light].join(" ")},d("checkout-page:couponCode"),o.createElement("span",{className:f.AppliedCoupon},o.createElement("span",{className:f.CouponCode},a.checkout.appliedCouponCode),a.step!==r.SUCCESS&&o.createElement("span",{className:f.ClearCoupon,onClick:function(){return e(void 0,void 0,void 0,(function(){return t(this,(function(e){switch(e.label){case 0:return a.checkout.couponCode=null,g(!0),[4,a.onCouponCodeApply()];case 1:return e.sent(),g(!1),[2]}}))}))}},o.createElement(h,null)))),!!a.checkout.appliedCouponCode&&!l&&o.createElement("div",{className:f.Value},o.createElement("span",null,"DECREMENT"===(null==N?void 0:N.type)?"- ":"")," ",o.createElement("span",null,m((null==N?void 0:N.amount)||0,a.checkout.currencyCode,a.checkout.currencySymbol))))})),T=n((function(e){var t=e.vm,n=e.isAddingNote,a=e.setAddingNote,c=u().t,l=o.useState(t.checkout.note?c("checkout-page:editOrderNote"):c("checkout-page:addOrderNote"))[0],i=o.useCallback((function(){a(!0)}),[]),m=o.useCallback((function(e){t.checkout.note=e}),[t,t.checkout]);if(!t.checkoutSettings.showCheckoutNote)return null;var s=t.step===r.SUCCESS;return s&&!t.checkout.note?null:o.createElement("div",{className:f.InfoRow},!n&&!s&&o.createElement("div",{className:f.ActionTextBtn,onClick:i},l),(n||s)&&o.createElement("div",{className:[f.CheckoutNoteContainer,s?f.Success:""].join(" ")},o.createElement("div",{className:f.Title},c("checkout-page:orderNote")),s?o.createElement("div",{className:f.CheckoutNoteDisplay},t.checkout.note):o.createElement(d,{style:{width:"100%"},type:p.TEXT_AREA,disableResize:!0,label:"",value:t.checkout.note||"",onChange:m})))}));export{g as CartSummary};
@@ -1 +1 @@
1
- import{__assign as t}from'./../../ext/tslib/tslib.es6.js';import*as e from"react";import{observer as o}from"mobx-react-lite";import r from"next/head.js";import{useRouter as i}from"next/router";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"mobx";import"../../models/data/blog/index.js";import"../../models/data/brand/index.js";import{IkasThemeJsonPageType as a}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"../../models/data/checkout/index.js";import"../../models/data/checkout-settings/index.js";import"../../models/data/city/index.js";import"../../models/data/country/index.js";import"../../models/data/customer/address/index.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/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/index.js";import"../../models/data/order/line-item/variant/value/index.js";import"../../models/data/order/line-item/variant/index.js";import"../../models/data/order/line-item/index.js";import"../../models/data/order/package/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/option-set/option/index.js";import"../../models/data/product/option-set/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/state/index.js";import"../../models/data/theme-json/index.js";import"../../models/data/theme-json/custom-data/index.js";import"../../models/data/variant-type/variant-value/index.js";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/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 s}from"@ikas/storefront-config";import"../../analytics/analytics.js";import"../../analytics/head/index.js";import"./index.js";import"next/image.js";import"@ikas/storefront-model-functions";import"../link/index.js";import"../page-editor/loader/style.module.scss.js";import"../google-captcha/index.js";import"../../pages/home.js";import"../../pages/_slug_/index.js";import"../../pages/pages/_slug_.js";import"../../pages/checkout.js";import"../../pages/account/index.js";import"../../pages/account/addresses.js";import"../../pages/account/orders/index.js";import"../../pages/account/orders/_id_.js";import"../../pages/account/login.js";import"../../pages/account/register.js";import"../../pages/account/forgot-password.js";import"../../pages/account/recover-password.js";import"../../pages/cart.js";import"../../pages/editor.js";import"../../pages/account/favorite-products.js";import"../../pages/search.js";import"next/error.js";import"../../pages/blog/index.js";import"../../pages/blog/_slug_.js";import"../../pages/raffle/_slug_.js";import"../../pages/raffle/index.js";import"../../pages/account/raffles.js";import{IkasBaseStore as n}from"../../store/base.js";import"../../store/customer/index.js";import"../../store/cart/index.js";import"lodash/get";var d=o((function(o){var n=o.pageType,d=o.pageTitle,p=o.pageDescription,l=o.canonicals,c=o.disableIndex,u=o.pageSpecificData,g=o.merchantSettings,j=o.addOgpMetas,f=o.productReviewSummary,h=i(),v="undefined"!=typeof window,x="local"===process.env.NEXT_PUBLIC_ENV,y=h.asPath.split("?")[0].replace("/",""),b=s.getRoutings().filter((function(t){return t.id!==s.getStorefrontRoutingId()})),k=s.getCurrentRouting(),w=(null==k?void 0:k.path)?"/"+k.path:"",D=x?"http://localhost:3333":"https://"+s.getDomain();e.useEffect((function(){document.documentElement.lang=s.getCurrentLocale()}),[n,u]);var E=e.useMemo((function(){if(u&&u.href)return"".concat(D).concat(u.href)}),[u]),_=e.useMemo((function(){var t=[];if(j)if(t.push({property:"og:type",content:"website"}),t.push({property:"og:site_name",content:"https://"+s.getDomain()}),d&&t.push({property:"og:title",content:d}),p&&t.push({property:"og:description",content:p}),t.push({property:"og:url",content:E||(v?window.location.href:"")||"https://".concat(s.getDomain())}),u&&n===a.PRODUCT){var e=u.selectedVariant.mainImage;(null==e?void 0:e.image)&&t.push({property:"og:image",content:e.image.src})}else(null==g?void 0:g.logo)&&t.push({property:"og:image",content:g.logo.src});return t}),[d,u,E,p,g,j,g]),C=e.useMemo((function(){var e=[];if(g){var o={"@context":"https://schema.org","@type":"Website",url:"https://"+s.getDomain()},r=function(e){var o,r,i,a,n,d,m=(null==e?void 0:e.logo)?e.logo.src:void 0;return{"@context":"https://schema.org","@type":"Store",name:null==e?void 0:e.merchantName,logo:m,image:m,url:"https://"+s.getDomain(),telephone:null==e?void 0:e.phone,address:t(t({"@type":"PostalAddress",streetAddress:null===(o=e.address)||void 0===o?void 0:o.addressLine1,addressLocality:null===(i=null===(r=e.address)||void 0===r?void 0:r.city)||void 0===i?void 0:i.name},e.address&&e.address.state&&{addressRegion:e.address.state.code}),{postalCode:null===(a=e.address)||void 0===a?void 0:a.postalCode,addressCountry:null===(d=null===(n=e.address)||void 0===n?void 0:n.country)||void 0===d?void 0:d.code})}}(g);e.push(o),e.push(r)}if(u&&n===a.PRODUCT){var i=u,d=function(e,o){var r,i,a,n;try{var d="https://".concat(s.getDomain()).concat(e.href),m=e.selectedVariant;return t(t({"@context":"https://schema.org/","@type":"Product",name:e.name,description:null===(r=e.metaData)||void 0===r?void 0:r.description,image:null===(i=m.images)||void 0===i?void 0:i.map((function(t){return t.image?t.image.src:""})),productId:m.id,sku:m.sku,mpn:(null===(a=m.barcodeList)||void 0===a?void 0:a.length)?m.barcodeList[0]:"",brand:{"@type":"Brand",name:null===(n=e.brand)||void 0===n?void 0:n.name}},o&&{aggregateRating:{"@type":"AggregateRating",ratingValue:o.averageStar,reviewCount:o.totalReview}}),{offers:{"@type":"Offer",url:d,priceCurrency:m.price.currency||"TRY",price:m.price.finalPrice,priceValidUntil:"",itemCondition:"https://schema.org/NewCondition",availability:m.stock>0?"https://schema.org/InStock":"https://schema.org/OutOfStock"}})}catch(t){}}(i,f||null);if(d&&e.push(d),i.categories.length)(l=m(i.categories[0]))&&e.push(l)}if(u&&n===a.CATEGORY){var p=function(t){var e,o;try{return{"@context":"http://schema.org","@type":"CollectionPage",url:"https://".concat(s.getDomain()).concat(t.href),name:null===(e=t.metaData)||void 0===e?void 0:e.pageTitle,description:null===(o=t.metaData)||void 0===o?void 0:o.description,image:t.image?t.image.src:void 0}}catch(t){}}(u),l=m(u);p&&e.push(p),l&&e.push(l)}return e}),[u,g]);return e.createElement(r,null,e.createElement("title",null,d||""),e.createElement("meta",{name:"description",content:p||""}),b.map((function(t){return e.createElement("link",{key:t.id,rel:"alternate",hrefLang:t.locale,href:"".concat(D+(t.path?"/"+t.path:""),"/").concat(y)})})),!!k&&!!b.length&&e.createElement("link",{key:"current-routing-hreflang",rel:"alternate",hrefLang:k.locale,href:"".concat(D).concat(w,"/").concat(y)}),!!c&&e.createElement("meta",{name:"robots",content:"noindex"}),!!j&&_.map((function(t,o){return e.createElement("meta",{key:"".concat(t.content,"-").concat(o),property:t.property,content:t.content})})),!!l&&l.map((function(t,o){return e.createElement("link",{key:o+"url",rel:"canonical",href:"".concat(D).concat(w).concat(t)})})),e.createElement("link",{rel:"canonical",href:"".concat(D).concat(w,"/").concat(y)}),!!C.length&&C.map((function(t,o){return e.createElement("script",{key:o,type:"application/ld+json",dangerouslySetInnerHTML:{__html:JSON.stringify(t)}})})))}));function m(t){try{var e=n.getInstance(),o=t.categoryPathItems.map((function(t,e){return{"@type":"ListItem",position:e+1,name:t.name,item:"https://"+s.getDomain()+t.href}}));return e.currentPageType===a.CATEGORY&&o.push({"@type":"ListItem",position:t.categoryPathItems.length+1,name:t.name,item:"https://"+s.getDomain()+t.href}),{"@context":"http://schema.org","@type":"BreadcrumbList",itemListElement:t.categoryPathItems.length?o:[{"@type":"ListItem",position:1,name:t.name,item:"https://"+s.getDomain()+t.href}]}}catch(t){}}export{d as IkasPageHead};
1
+ import{__assign as e}from'./../../ext/tslib/tslib.es6.js';import*as t from"react";import{observer as o}from"mobx-react-lite";import a from"next/head.js";import{useRouter as r}from"next/router";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"mobx";import"../../models/data/blog/index.js";import"../../models/data/brand/index.js";import{IkasThemeJsonPageType as i}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"../../models/data/checkout/index.js";import"../../models/data/checkout-settings/index.js";import"../../models/data/city/index.js";import"../../models/data/country/index.js";import"../../models/data/customer/address/index.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/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/index.js";import"../../models/data/order/line-item/variant/value/index.js";import"../../models/data/order/line-item/variant/index.js";import"../../models/data/order/line-item/index.js";import"../../models/data/order/package/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/option-set/option/index.js";import"../../models/data/product/option-set/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/state/index.js";import"../../models/data/theme-json/index.js";import"../../models/data/theme-json/custom-data/index.js";import"../../models/data/variant-type/variant-value/index.js";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/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 s}from"@ikas/storefront-config";import"../../analytics/analytics.js";import"../../analytics/head/index.js";import"./index.js";import"next/image.js";import"@ikas/storefront-model-functions";import"../link/index.js";import"../page-editor/loader/style.module.scss.js";import"../google-captcha/index.js";import"../../pages/home.js";import"../../pages/_slug_/index.js";import"../../pages/pages/_slug_.js";import"../../pages/checkout.js";import"../../pages/account/index.js";import"../../pages/account/addresses.js";import"../../pages/account/orders/index.js";import"../../pages/account/orders/_id_.js";import"../../pages/account/login.js";import"../../pages/account/register.js";import"../../pages/account/forgot-password.js";import"../../pages/account/recover-password.js";import"../../pages/cart.js";import"../../pages/editor.js";import"../../pages/account/favorite-products.js";import"../../pages/search.js";import"next/error.js";import"../../pages/blog/index.js";import"../../pages/blog/_slug_.js";import"../../pages/raffle/_slug_.js";import"../../pages/raffle/index.js";import"../../pages/account/raffles.js";import{IkasBaseStore as n}from"../../store/base.js";import"../../store/customer/index.js";import"../../store/cart/index.js";import"lodash/get";var d=o((function(o){var n=o.pageType,d=o.pageTitle,p=o.pageDescription,c=o.canonicals,u=o.disableIndex,g=o.pageSpecificData,f=o.merchantSettings,j=o.addOgpMetas,v=o.productReviewSummary,h=r(),x="undefined"!=typeof window,y="local"===process.env.NEXT_PUBLIC_ENV,b=h.asPath.split("?")[0].replace("/",""),k=s.getRoutings().filter((function(e){return e.id!==s.getStorefrontRoutingId()})),w=s.getCurrentRouting(),C=(null==w?void 0:w.path)?"/"+w.path:"",E=y?"http://localhost:3333":"https://"+s.getDomain();t.useEffect((function(){document.documentElement.lang=s.getCurrentLocale()}),[n,g]);var L=t.useMemo((function(){if(g&&g.href)return"".concat(E).concat(g.href)}),[g]),T=t.useMemo((function(){var e=[];if(j)if(e.push({property:"og:type",content:"website"}),e.push({property:"og:site_name",content:"https://"+s.getDomain()}),d&&e.push({property:"og:title",content:d}),p&&e.push({property:"og:description",content:p}),e.push({property:"og:url",content:L||(x?window.location.href:"")||"https://".concat(s.getDomain())}),g&&n===i.PRODUCT){var t=g.selectedVariant.mainImage;(null==t?void 0:t.image)&&e.push({property:"og:image",content:t.image.src})}else(null==f?void 0:f.logo)&&e.push({property:"og:image",content:f.logo.src});return e}),[d,g,L,p,f,j,f]),D=t.useMemo((function(){var t=[];if(f){var o={"@context":"https://schema.org","@type":"Website",url:"https://"+s.getDomain()},a=function(t){var o,a,r,i,n,d,m=(null==t?void 0:t.logo)?t.logo.src:void 0;return{"@context":"https://schema.org","@type":"Store",name:null==t?void 0:t.merchantName,logo:m,image:m,url:"https://"+s.getDomain(),telephone:null==t?void 0:t.phone,address:e(e({"@type":"PostalAddress",streetAddress:null===(o=t.address)||void 0===o?void 0:o.addressLine1,addressLocality:null===(r=null===(a=t.address)||void 0===a?void 0:a.city)||void 0===r?void 0:r.name},t.address&&t.address.state&&{addressRegion:t.address.state.code}),{postalCode:null===(i=t.address)||void 0===i?void 0:i.postalCode,addressCountry:null===(d=null===(n=t.address)||void 0===n?void 0:n.country)||void 0===d?void 0:d.code})}}(f);t.push(o),t.push(a)}if(g&&n===i.PRODUCT){var r=g,d=function(t,o){var a,r,i,n;try{var d="https://".concat(s.getDomain()).concat(t.href),m=t.selectedVariant;return e(e({"@context":"https://schema.org/","@type":"Product",name:t.name,description:null===(a=t.metaData)||void 0===a?void 0:a.description,image:null===(r=m.images)||void 0===r?void 0:r.map((function(e){return e.image?e.image.src:""})),productId:m.id,sku:m.sku,mpn:(null===(i=m.barcodeList)||void 0===i?void 0:i.length)?m.barcodeList[0]:"",brand:{"@type":"Brand",name:null===(n=t.brand)||void 0===n?void 0:n.name}},o&&{aggregateRating:{"@type":"AggregateRating",ratingValue:o.averageStar,reviewCount:o.totalReview}}),{offers:{"@type":"Offer",url:d,priceCurrency:m.price.currency||"TRY",price:m.price.finalPrice,priceValidUntil:"",itemCondition:"https://schema.org/NewCondition",availability:m.stock>0?"https://schema.org/InStock":"https://schema.org/OutOfStock"}})}catch(e){}}(r,v||null);if(d&&t.push(d),r.categories.length)(p=m(r.categories[0]))&&t.push(p)}if(g&&n===i.CATEGORY){var l=function(e){var t,o;try{return{"@context":"http://schema.org","@type":"CollectionPage",url:"https://".concat(s.getDomain()).concat(e.href),name:null===(t=e.metaData)||void 0===t?void 0:t.pageTitle,description:null===(o=e.metaData)||void 0===o?void 0:o.description,image:e.image?e.image.src:void 0}}catch(e){}}(g),p=m(g);l&&t.push(l),p&&t.push(p)}return t}),[g,f]),R=t.useMemo((function(){var e,t=null===(e=s.getMetaTemplates())||void 0===e?void 0:e.find((function(e){return e.locale===s.getCurrentLocale()&&e.pageType===n}));return t?l(g,n,t.titleTemplate||""):null}),[n,g]),_=t.useMemo((function(){var e,t=null===(e=s.getMetaTemplates())||void 0===e?void 0:e.find((function(e){return e.locale===s.getCurrentLocale()&&e.pageType===n}));return t?l(g,n,t.descriptionTemplate||""):null}),[n,g]);return t.createElement(a,null,t.createElement("title",null,d||R||""),t.createElement("meta",{name:"description",content:p||_||""}),k.map((function(e){return t.createElement("link",{key:e.id,rel:"alternate",hrefLang:e.locale,href:"".concat(E+(e.path?"/"+e.path:""),"/").concat(b)})})),!!w&&!!k.length&&t.createElement("link",{key:"current-routing-hreflang",rel:"alternate",hrefLang:w.locale,href:"".concat(E).concat(C,"/").concat(b)}),!!u&&t.createElement("meta",{name:"robots",content:"noindex"}),!!j&&T.map((function(e,o){return t.createElement("meta",{key:"".concat(e.content,"-").concat(o),property:e.property,content:e.content})})),!!c&&c.map((function(e,o){return t.createElement("link",{key:o+"url",rel:"canonical",href:"".concat(E).concat(C).concat(e)})})),t.createElement("link",{rel:"canonical",href:"".concat(E).concat(C,"/").concat(b)}),!!D.length&&D.map((function(e,o){return t.createElement("script",{key:o,type:"application/ld+json",dangerouslySetInnerHTML:{__html:JSON.stringify(e)}})})))}));function m(e){try{var t=n.getInstance(),o=e.categoryPathItems.map((function(e,t){return{"@type":"ListItem",position:t+1,name:e.name,item:"https://"+s.getDomain()+e.href}}));return t.currentPageType===i.CATEGORY&&o.push({"@type":"ListItem",position:e.categoryPathItems.length+1,name:e.name,item:"https://"+s.getDomain()+e.href}),{"@context":"http://schema.org","@type":"BreadcrumbList",itemListElement:e.categoryPathItems.length?o:[{"@type":"ListItem",position:1,name:e.name,item:"https://"+s.getDomain()+e.href}]}}catch(e){}}function l(e,t,o){var a,r,s=o;try{switch(t){case i.PRODUCT:var n=e,d=n.name,m=(null===(a=n.brand)||void 0===a?void 0:a.name)||"",l=n.selectedVariant.sku||"",p=(null===(r=n.selectedVariant.barcodeList)||void 0===r?void 0:r.length)?n.selectedVariant.barcodeList[0]:"";s.includes("{{name}}")&&(s=s.replace("{{name}}",d)),s.includes("{{brand}}")&&(s=s.replace("{{brand}}",m)),s.includes("{{sku}}")&&(s=s.replace("{{sku}}",l)),s.includes("{{barcode}}")&&(s=s.replace("{{barcode}}",p));break;case i.BRAND:case i.CATEGORY:case i.BLOG_CATEGORY:var c=e.name||"";s.includes("{{name}}")&&(s=s.replace("{{name}}",c));break;case i.BLOG:var u=e.title;s.includes("{{name}}")&&(s=s.replace("{{name}}",u))}}catch(e){}return s.trimEnd()}export{d as IkasPageHead};
@@ -47,6 +47,7 @@ export declare class IkasOrder extends IkasBaseModel implements IOrder {
47
47
  constructor(data: Partial<IOrderConstructorData>);
48
48
  get items(): IkasOrderLineItem[];
49
49
  get itemCount(): number;
50
+ get itemQuantity(): number;
50
51
  get refundableItems(): IkasOrderLineItem[];
51
52
  get unfullfilledItems(): IkasOrderLineItem[];
52
53
  get refundedItems(): IkasOrderLineItem[];
@@ -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 l}from"./invoice/index.js";import{IkasOrderPaymentMethod as u}from"./payment-method/index.js";import{IkasOrderAdjustment as s}from"./adjustment/index.js";import{IkasOrderPackage as a}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){var y,h,P,j,k,A,S,v,x,I,O=this;return(O=c.call(this,e)||this).billingAddress=null,O.cancelReason=null,O.cancelledAt=null,O.currencySymbol=null,O.customer=null,O.customerId=null,O.giftPackageLines=null,O.giftPackageNote=null,O.invoices=null,O.isGiftPackage=null,O.note=null,O.orderAdjustments=null,O.orderNumber=null,O.orderPackageStatus=null,O.orderPackages=null,O.orderPaymentStatus=null,O.orderedAt=null,O.paymentMethods=null,O.shippingAddress=null,O.shippingLines=null,O.taxLines=null,O.billingAddress=e.billingAddress?new t(e.billingAddress):null,O.cancelReason=e.cancelReason||null,O.cancelledAt=e.cancelledAt||null,O.currencyCode=e.currencyCode||"",O.currencySymbol=e.currencySymbol||null,O.customer=e.customer?new o(e.customer):null,O.customerId=e.customerId||null,O.giftPackageLines=(null===(y=e.giftPackageLines)||void 0===y?void 0:y.map((function(e){return new i(e)})))||null,O.giftPackageNote=e.giftPackageNote||null,O.invoices=(null===(h=e.invoices)||void 0===h?void 0:h.map((function(e){return new l(e)})))||null,O.isGiftPackage=e.isGiftPackage||null,O.note=e.note||null,O.orderAdjustments=(null===(P=e.orderAdjustments)||void 0===P?void 0:P.map((function(e){return new s(e)})))||null,O.orderLineItems=(null===(j=e.orderLineItems)||void 0===j?void 0:j.map((function(e){return new r(e)})).filter((function(e){return!e.deleted})))||[],O.orderNumber=e.orderNumber||null,O.orderPackageStatus=e.orderPackageStatus||null,O.orderPackages=(null===(k=e.orderPackages)||void 0===k?void 0:k.map((function(e){return new a(e)})))||null,O.orderPaymentStatus=e.orderPaymentStatus||null,O.orderedAt=e.orderedAt||null,O.paymentMethods=(null===(A=e.paymentMethods)||void 0===A?void 0:A.map((function(e){return new u(e)})))||null,O.shippingAddress=e.shippingAddress?new t(e.shippingAddress):null,O.shippingLines=(null===(S=e.shippingLines)||void 0===S?void 0:S.map((function(e){return new n(e)})))||null,O.shippingMethod=e.shippingMethod||m.SHIPMENT,O.status=e.status||p.CREATED,O.taxLines=(null===(v=e.taxLines)||void 0===v?void 0:v.map((function(e){return new d(e)})))||null,O.totalFinalPrice=null!==(x=e.totalFinalPrice)&&void 0!==x?x:0,O.totalPrice=null!==(I=e.totalPrice)&&void 0!==I?I:0,O.refundSettings=e.refundSettings,f(O,{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}),O}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,"refundableItems",{get:function(){return this.refundSettings?y.getRefundableItems(this,this.refundSettings):[]},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};
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 f}from"@ikas/storefront-models";export{IkasOrderCancelReason,IkasOrderPackageStatus,IkasOrderPaymentStatus,IkasOrderShippingMethod,IkasOrderStatus}from"@ikas/storefront-models";import{makeObservable as p,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){var y,h,P,j,k,A,S,v,x,I,O=this;return(O=c.call(this,e)||this).billingAddress=null,O.cancelReason=null,O.cancelledAt=null,O.currencySymbol=null,O.customer=null,O.customerId=null,O.giftPackageLines=null,O.giftPackageNote=null,O.invoices=null,O.isGiftPackage=null,O.note=null,O.orderAdjustments=null,O.orderNumber=null,O.orderPackageStatus=null,O.orderPackages=null,O.orderPaymentStatus=null,O.orderedAt=null,O.paymentMethods=null,O.shippingAddress=null,O.shippingLines=null,O.taxLines=null,O.billingAddress=e.billingAddress?new t(e.billingAddress):null,O.cancelReason=e.cancelReason||null,O.cancelledAt=e.cancelledAt||null,O.currencyCode=e.currencyCode||"",O.currencySymbol=e.currencySymbol||null,O.customer=e.customer?new o(e.customer):null,O.customerId=e.customerId||null,O.giftPackageLines=(null===(y=e.giftPackageLines)||void 0===y?void 0:y.map((function(e){return new i(e)})))||null,O.giftPackageNote=e.giftPackageNote||null,O.invoices=(null===(h=e.invoices)||void 0===h?void 0:h.map((function(e){return new u(e)})))||null,O.isGiftPackage=e.isGiftPackage||null,O.note=e.note||null,O.orderAdjustments=(null===(P=e.orderAdjustments)||void 0===P?void 0:P.map((function(e){return new a(e)})))||null,O.orderLineItems=(null===(j=e.orderLineItems)||void 0===j?void 0:j.map((function(e){return new r(e)})).filter((function(e){return!e.deleted})))||[],O.orderNumber=e.orderNumber||null,O.orderPackageStatus=e.orderPackageStatus||null,O.orderPackages=(null===(k=e.orderPackages)||void 0===k?void 0:k.map((function(e){return new s(e)})))||null,O.orderPaymentStatus=e.orderPaymentStatus||null,O.orderedAt=e.orderedAt||null,O.paymentMethods=(null===(A=e.paymentMethods)||void 0===A?void 0:A.map((function(e){return new l(e)})))||null,O.shippingAddress=e.shippingAddress?new t(e.shippingAddress):null,O.shippingLines=(null===(S=e.shippingLines)||void 0===S?void 0:S.map((function(e){return new n(e)})))||null,O.shippingMethod=e.shippingMethod||m.SHIPMENT,O.status=e.status||f.CREATED,O.taxLines=(null===(v=e.taxLines)||void 0===v?void 0:v.map((function(e){return new d(e)})))||null,O.totalFinalPrice=null!==(x=e.totalFinalPrice)&&void 0!==x?x:0,O.totalPrice=null!==(I=e.totalPrice)&&void 0!==I?I:0,O.refundSettings=e.refundSettings,p(O,{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}),O}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,"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};
@@ -4,11 +4,13 @@ import { IkasStorefrontRouting } from "./routing";
4
4
  import { IkasStorefrontTheme } from "./theme";
5
5
  import { IkasStorefrontStatus } from "@ikas/storefront-models";
6
6
  import { IkasStorefront as IStorefront } from "@ikas/storefront-models";
7
+ import { IkasStorefontMetaTemplates } from "./meta-templates";
7
8
  export declare class IkasStorefront implements IStorefront {
8
9
  id: string;
9
10
  name: string;
10
11
  status: IkasStorefrontStatus;
11
12
  mainStorefrontThemeId: string | null;
13
+ metaTemplates: IkasStorefontMetaTemplates[] | null;
12
14
  pickUpStockLocationIds: string[] | null;
13
15
  emailSettingsId: string | null;
14
16
  salesChannelId: string | null;
@@ -18,6 +20,7 @@ export declare class IkasStorefront implements IStorefront {
18
20
  universalAnalyticsId: string | null;
19
21
  tiktokPixelId: string | null;
20
22
  token: string | null;
23
+ robotsTxt: string | null;
21
24
  localizations: IkasStorefrontLocalization[];
22
25
  routings: IkasStorefrontRouting[];
23
26
  domains: IkasStorefrontDomain[];
@@ -1 +1 @@
1
- import{IkasStorefrontLocalization as t}from"./localization/index.js";import{IkasStorefrontDomain as i}from"./domain/index.js";import{IkasStorefrontRouting as n}from"./routing/index.js";import{IkasStorefrontTheme as o}from"./theme/index.js";import{IkasStorefrontStatus as s}from"@ikas/storefront-models";export{IkasStorefrontStatus}from"@ikas/storefront-models";import{makeAutoObservable as e}from"mobx";var l=function(l){void 0===l&&(l={}),this.id=l.id||"",this.name=l.name||"",this.status=l.status||s.WAITING,this.mainStorefrontThemeId=l.mainStorefrontThemeId||null,this.pickUpStockLocationIds=l.pickUpStockLocationIds||null,this.emailSettingsId=l.emailSettingsId||null,this.salesChannelId=l.salesChannelId||null,this.gtmId=l.gtmId||null,this.fbpId=l.fbpId||null,this.analytics4Id=l.analytics4Id||null,this.universalAnalyticsId=l.universalAnalyticsId||null,this.tiktokPixelId=l.tiktokPixelId||null,this.token=l.token||null,this.localizations=l.localizations?l.localizations.map((function(i){return new t(i)})):[],this.routings=l.routings?l.routings.map((function(t){return new n(t)})):[],this.domains=l.domains?l.domains.map((function(t){return new i(t)})):[],this.themes=l.themes?l.themes.map((function(t){return new o(t)})):[],e(this)};export{l as IkasStorefront};
1
+ import{IkasStorefrontLocalization as t}from"./localization/index.js";import{IkasStorefrontDomain as i}from"./domain/index.js";import{IkasStorefrontRouting as n}from"./routing/index.js";import{IkasStorefrontTheme as s}from"./theme/index.js";import{IkasStorefrontStatus as o}from"@ikas/storefront-models";export{IkasStorefrontStatus}from"@ikas/storefront-models";import{makeAutoObservable as e}from"mobx";import{IkasStorefontMetaTemplates as a}from"./meta-templates/index.js";var l=function(l){void 0===l&&(l={}),this.id=l.id||"",this.name=l.name||"",this.status=l.status||o.WAITING,this.mainStorefrontThemeId=l.mainStorefrontThemeId||null,this.pickUpStockLocationIds=l.pickUpStockLocationIds||null,this.emailSettingsId=l.emailSettingsId||null,this.salesChannelId=l.salesChannelId||null,this.gtmId=l.gtmId||null,this.fbpId=l.fbpId||null,this.analytics4Id=l.analytics4Id||null,this.universalAnalyticsId=l.universalAnalyticsId||null,this.tiktokPixelId=l.tiktokPixelId||null,this.token=l.token||null,this.robotsTxt=l.robotsTxt||null,this.metaTemplates=l.metaTemplates?l.metaTemplates.map((function(t){return new a(t)})):null,this.localizations=l.localizations?l.localizations.map((function(i){return new t(i)})):[],this.routings=l.routings?l.routings.map((function(t){return new n(t)})):[],this.domains=l.domains?l.domains.map((function(t){return new i(t)})):[],this.themes=l.themes?l.themes.map((function(t){return new s(t)})):[],e(this)};export{l as IkasStorefront};
@@ -0,0 +1,8 @@
1
+ import { IkasStorefontMetaTemplates as IStorefontMetaTemplates, StorefrontPageTypesEnum } from "@ikas/storefront-models";
2
+ export declare class IkasStorefontMetaTemplates implements IStorefontMetaTemplates {
3
+ descriptionTemplate: string | null;
4
+ locale: string | null;
5
+ pageType: StorefrontPageTypesEnum | null;
6
+ titleTemplate: string | null;
7
+ constructor(data: IStorefontMetaTemplates);
8
+ }
@@ -0,0 +1 @@
1
+ import{makeAutoObservable as e}from"mobx";var t=function(t){this.descriptionTemplate=t.descriptionTemplate,this.locale=t.locale,this.pageType=t.pageType,this.titleTemplate=t.titleTemplate,e(this)};export{t as IkasStorefontMetaTemplates};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ikas/storefront",
3
- "version": "4.0.0-alpha.71",
3
+ "version": "4.0.0-alpha.72",
4
4
  "description": "Storefront functionality for ikas storefront themes.",
5
5
  "author": "Umut Ozan Yıldırım",
6
6
  "license": "ISC",
@@ -23,11 +23,11 @@
23
23
  "libphonenumber-js": "^1.10.6"
24
24
  },
25
25
  "devDependencies": {
26
- "@ikas/storefront-api": "^4.0.0-alpha.71",
27
- "@ikas/storefront-config": "^4.0.0-alpha.71",
28
- "@ikas/storefront-model-functions": "^4.0.0-alpha.71",
29
- "@ikas/storefront-models": "^4.0.0-alpha.71",
30
- "@ikas/storefront-providers": "^4.0.0-alpha.71",
26
+ "@ikas/storefront-api": "^4.0.0-alpha.72",
27
+ "@ikas/storefront-config": "^4.0.0-alpha.72",
28
+ "@ikas/storefront-model-functions": "^4.0.0-alpha.72",
29
+ "@ikas/storefront-models": "^4.0.0-alpha.72",
30
+ "@ikas/storefront-providers": "^4.0.0-alpha.72",
31
31
  "@rollup/plugin-commonjs": "^22.0.0",
32
32
  "@rollup/plugin-json": "^4.1.0",
33
33
  "@rollup/plugin-node-resolve": "^13.3.0",
@@ -53,11 +53,11 @@
53
53
  "query-string": "^6.13.8"
54
54
  },
55
55
  "peerDependencies": {
56
- "@ikas/storefront-api": "^4.0.0-alpha.71",
57
- "@ikas/storefront-config": "^4.0.0-alpha.71",
58
- "@ikas/storefront-model-functions": "^4.0.0-alpha.71",
59
- "@ikas/storefront-models": "^4.0.0-alpha.71",
60
- "@ikas/storefront-providers": "^4.0.0-alpha.71",
56
+ "@ikas/storefront-api": "^4.0.0-alpha.72",
57
+ "@ikas/storefront-config": "^4.0.0-alpha.72",
58
+ "@ikas/storefront-model-functions": "^4.0.0-alpha.72",
59
+ "@ikas/storefront-models": "^4.0.0-alpha.72",
60
+ "@ikas/storefront-providers": "^4.0.0-alpha.72",
61
61
  "mobx": "^6.1.3",
62
62
  "mobx-react-lite": "^3.1.5",
63
63
  "next": "12.2.0",