@ikas/storefront 4.15.0-beta.145 → 4.15.0-beta.147
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/components/checkout/components/expandable-section/index.d.ts +1 -0
- package/build/components/checkout/components/expandable-section/index.js +1 -1
- package/build/components/checkout/steps/step-success/index.js +1 -1
- package/build/ext/@ikas/popup-renderer/build/popup-renderer/components/product-list-renderer/index.js +1 -1
- package/package.json +12 -12
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as e from"react";import{observer as t}from"mobx-react-lite";import r from"./style.module.scss.js";import"@ikas/storefront-config";import{useTranslation as a}from"../../../../utils/i18n.js";import
|
|
1
|
+
import*as e from"react";import{observer as t}from"mobx-react-lite";import r from"./style.module.scss.js";import"@ikas/storefront-config";import{useTranslation as a}from"../../../../utils/i18n.js";import n from"../svg/chevron-down.js";var m=t((function(t){var m=t.title,s=t.children,o=t.expanded;a().t;var l=e.useState(o||!1),i=l[0],c=l[1];return e.createElement("div",{className:r.ExpandableSection},e.createElement("div",{className:r.Top,onClick:function(){return c(!i)}},e.createElement("div",{className:r.Title},m),e.createElement("div",{className:r.HideBtn},i?e.createElement(n,{className:r.TransForm}):e.createElement(n,null))),i&&!!s&&e.createElement("div",{className:r.Content},s))}));export{m as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__spreadArray as e}from'./../../../../ext/tslib/tslib.es6.js';import*as t from"react";import{observer as a}from"mobx-react-lite";import{Button as o}from"../../components/button/index.js";import{CART_LS_KEY as r}from"../../../../store/cart/index.js";import s from"./style.module.scss.js";import i from"../../components/svg/success-circle.js";import n from"../../components/expandable-section/index.js";import c from"../../components/credit-card-form/svg/amex.js";import d from"../../components/credit-card-form/svg/master-card.js";import l from"../../components/credit-card-form/svg/troy.js";import m from"../../components/credit-card-form/svg/visa.js";import"@ikas/storefront-config";import{formatCurrency as p}from"../../../../utils/currency.js";import{useTranslation as u}from"../../../../utils/i18n.js";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{IkasPaymentMethodType as f,IkasPaymentGatewayType as v,IkasOrderPackageStatus as g,IkasTransactionCardAssociation as E}from"@ikas/storefront-models";import"mobx";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/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"../../../../models/data/order/line-item/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 h from"../../components/offer-product/index.js";import{Analytics as x}from"../../../../analytics/analytics.js";import"../../../../analytics/head/index.js";import{QuickRegistration as j}from"../../components/quick-registration/index.js";import{ProductFiles as k}from"../../components/product-files/index.js";import y from"../../components/offer-product/offer-arrows/index.js";import I from"../../components/offer-product/offer-dots/index.js";import N from"../../components/svg/shopping-bag.js";import{CartSummary as T}from"../../components/cart-summary/index.js";import A from"../../components/offer-product/useCampaignOffer.js";var L="eventSentCartIds",S=a((function(a){var g,L,S,C,P,D,R,O,_,b,M,w=a.vm,F=u().t,Y=A(w,!0),U=Y.setActiveIndex,B=Y.setIsActiveOverlay,V=Y.handlePrev,z=Y.handleNext,K=Y.isActiveOverlay,G=Y.activeIndex,H=Y.isMobile;t.useEffect((function(){if("undefined"!=typeof localStorage){var t=localStorage.getItem(r),a=localStorage.getItem("eventSentCartIds");if(t&&t===w.checkout.id){if(w.successTransaction){var o=JSON.parse(a||"[]");if(!o.some((function(e){return e===w.checkout.id}))){var s=w.checkout.orderedAt,i=Date.now();Math.floor(Math.abs(i-s)/1e3)<30&&x.purchase(w.checkout,w.successTransaction),localStorage.setItem("eventSentCartIds",JSON.stringify(e(e([],o,!0),[w.checkout.id],!1)))}}localStorage.removeItem(r)}window&&window.handleKlarna&&window.handleKlarna(void 0)}}),[]);var Q=((null===(g=w.checkout.customer)||void 0===g?void 0:g.firstName)||"")+" "+((null===(L=w.checkout.customer)||void 0===L?void 0:L.lastName)||""),J=((null===(S=w.checkout.shippingAddress)||void 0===S?void 0:S.firstName)||"")+" "+((null===(C=w.checkout.shippingAddress)||void 0===C?void 0:C.lastName)||""),q=w.paymentGateways.find((function(e){var t;return e.id===(null===(t=w.successTransaction)||void 0===t?void 0:t.paymentGatewayId)})),X=function(e){switch(e){case f.APP_PAYMENT:return F("checkout-page:appPayment");case f.BANK_REDIRECT:return F("checkout-page:bankRedirect");case f.BUY_ONLINE_PAY_AT_STORE:return F("checkout-page:buyOnlinePayAtStore");case f.CASH:return F("checkout-page:cash");case f.CASH_ON_DELIVERY:return F("checkout-page:cashOnDelivery");case f.CREDIT_CARD:return F("checkout-page:creditCard");case f.CREDIT_CARD_ON_DELIVERY:return F("checkout-page:creditCardOnDelivery");case f.DIRECT_DEBIT:return F("checkout-page:directDebit");case f.GIFT_CARD:return F("checkout-page:giftCard");case f.MONEY_ORDER:return F("checkout-page:moneyOrder");case f.OTHER:return F("checkout-page:other");case f.PAY_LATER:return F("checkout-page:payLater");case f.SLICE_IT:return F("checkout-page:sliceIt");case f.WALLET:return F("checkout-page:wallet");default:return""}},W=null===(P=w.successTransaction)||void 0===P?void 0:P.paymentMethodDetail,Z=null===(D=w.successTransaction)||void 0===D?void 0:D.paymentGatewayCode,$=t.useMemo((function(){var e,a,o,r,i,n,u;return t.createElement("div",{className:[s.InfoGrid].join(" ")},!w.isFree&&t.createElement("div",null,t.createElement("div",{className:s.InfoTitle},F("checkout-page:paymentMethod")),q&&t.createElement(t.Fragment,null,!!q.logoUrl&&t.createElement("div",{className:s.PaymentLogoContainer},t.createElement("img",{src:q.logoUrl})),!q.logoUrl&&t.createElement("div",{className:s.InfoText},q.paymentMethodType===f.CREDIT_CARD&&q.type===v.INTERNAL?F("checkout-page:creditCard"):q.name),"STRIPE"!==q.code&&"PAYPAL"!==q.code&&"KLARNA"!==q.code||!(null===(e=w.successTransaction)||void 0===e?void 0:e.paymentMethod)?!!q.description&&q.type!==v.EXTERNAL&&t.createElement("div",{className:s.InfoText},t.createElement("div",{dangerouslySetInnerHTML:{__html:q.description}})):t.createElement("div",{className:s.InfoText},X(w.successTransaction.paymentMethod))),"E_PAY_KOLAY"===Z&&t.createElement(t.Fragment,null,t.createElement("div",{className:s.EPayKolayLogoContainer},t.createElement("img",{src:"https://cdn.myikas.com/sf/assets/payment/epaykolay.png"})),!!(null===(a=w.successTransaction)||void 0===a?void 0:a.paymentMethod)&&t.createElement("div",{className:s.InfoText},X(null===(o=w.successTransaction)||void 0===o?void 0:o.paymentMethod))),"E_PAY_KOLAY"!==Z&&"STRIPE"!==Z&&"PAYPAL"!==Z&&"KLARNA"!==Z&&"CREDIT_CARD"===(null===(r=w.successTransaction)||void 0===r?void 0:r.paymentMethod)&&t.createElement(t.Fragment,null,t.createElement("div",{className:s.InfoText},t.createElement("div",{className:s.CardLogoContainer},function(){var e,a;switch(null===(a=null===(e=w.successTransaction)||void 0===e?void 0:e.paymentMethodDetail)||void 0===a?void 0:a.cardAssociation){case E.AMERICAN_EXPRESS:return t.createElement(c,null);case E.MASTER_CARD:return t.createElement(d,null);case E.TROY:return t.createElement(l,null);case E.VISA:return t.createElement(m,null);default:return t.createElement("div",null)}}()),t.createElement("span",null,"**** ".concat((null==W?void 0:W.lastFourDigits)||""))),(null===(i=null==W?void 0:W.installment)||void 0===i?void 0:i.installmentCount)&&W.installment.installmentCount>1&&t.createElement(t.Fragment,null,t.createElement("div",{className:s.InfoText},"".concat(W.installment.installmentCount," ").concat(F("checkout-page:installments"))),null!==W.installment.installmentPrice&&t.createElement("div",{className:s.InfoText},"".concat(W.installment.installmentCount," x ").concat(p(W.installment.installmentPrice,w.checkout.currencyCode,w.checkout.currencySymbol)))))),t.createElement("div",null,t.createElement("div",{className:s.InfoTitle},F("checkout-page:billingAddress")),!!(null===(n=w.checkout.billingAddress)||void 0===n?void 0:n.company)&&t.createElement("div",{className:[s.InfoText,s.InfoTextBold].join(" ")},w.checkout.billingAddress.company),t.createElement("div",{className:s.InfoText},null===(u=w.checkout.billingAddress)||void 0===u?void 0:u.addressText)))}),[]),ee=t.useMemo((function(){return t.createElement(T,{vm:w,isSuccessPageSummary:!0})}),[]),te=t.useMemo((function(){var e,a,o,r,i;return t.createElement("div",{className:[s.InfoGrid].join(" ")},t.createElement("div",null,t.createElement("div",{className:s.InfoTitle},F("checkout-page:contactInfo")),t.createElement("div",{className:s.InfoText},null===(e=w.checkout.customer)||void 0===e?void 0:e.email),t.createElement("div",{className:s.InfoText},Q),!!(null===(a=w.checkout.shippingAddress)||void 0===a?void 0:a.phone)&&t.createElement("div",{className:s.InfoText},null===(o=w.checkout.shippingAddress)||void 0===o?void 0:o.phone)),t.createElement("div",null,"in-store"===w.deliveryMethod&&t.createElement(t.Fragment,null,t.createElement("div",{className:s.InfoTitle},F("checkout-page:receiver")),t.createElement("div",{className:[s.InfoText,s.withMBottom].join(" ")},J)),t.createElement("div",{className:s.InfoTitle},"address"===w.deliveryMethod?F("checkout-page:shippingAddress"):F("checkout-page:pickUpLocation")),!!(null===(r=w.checkout.shippingAddress)||void 0===r?void 0:r.company)&&t.createElement("div",{className:[s.InfoText,s.InfoTextBold].join(" ")},w.checkout.shippingAddress.company),t.createElement("div",{className:s.InfoText},null===(i=w.checkout.shippingAddress)||void 0===i?void 0:i.addressText)))}),[]),ae=!!(null===(R=w.customizationProps)||void 0===R?void 0:R.campaignOffersEnableMiddlePhase)&&!!(null===(O=w.customizationProps)||void 0===O?void 0:O.showCampaignIsBiggerImage)&&H&&K,oe=!!(null===(_=w.customizationProps)||void 0===_?void 0:_.campaignOffersEnableMiddlePhase)&&!!(null===(b=w.customizationProps)||void 0===b?void 0:b.showCampaignIsBiggerImage)&&H&&!K;return t.createElement(t.Fragment,null,!!(null===(M=w.customizationProps)||void 0===M?void 0:M.campaignOffersEnableMiddlePhase)&&K&&w.campaignOffers&&w.campaignOffers.length>0&&H&&t.createElement("div",{className:[s.MiddlePhaseOverlay,ae?s.MiddlePhaseOverlayPopup:""].join(" ")}),w.campaignOffers&&!!w.campaignOffers.length&&w.isCampaignOfferLoaded&&t.createElement("div",{className:[s.CampaignOfferMain,ae?s.OverlayPopupMain:""].join(" ")},t.createElement("div",{className:s.OfferSlider},w.campaignOffers.map((function(e,a){var o;return t.createElement(h,{vm:w,campaignOffer:e,index:a,activeIndex:G,offersLength:(null===(o=w.campaignOffers)||void 0===o?void 0:o.length)||0,handlePrev:V,handleNext:z,setActiveIndex:function(e){return U(e)},isPopupShow:ae,closePopup:function(){return B(!1)},isPopupClosed:oe,showPopup:function(){return B(!0)},step:w.step})}))),w.campaignOffers.length>1&&t.createElement(y,{handlePrev:V,handleNext:z}),w.campaignOffers.length>1&&t.createElement(I,{isPopupShow:ae,vm:w,activeIndex:G})),t.createElement("div",{className:s.StepSuccess},t.createElement("div",{className:s.SuccessTitleContainer},t.createElement(i,{className:s.SuccessCircle}),t.createElement("span",{className:s.SuccessTitle},F("checkout-page:orderSuccessTitle"))),t.createElement("div",{className:s.SuccessSubTitle},F(w.isDigitalOnly?"checkout-page:orderSuccessDigitalOnlyDescription":"address"===w.deliveryMethod?"checkout-page:orderSuccessDescription":"checkout-page:orderSuccessInStoreDeliveryDescription",{customerName:Q})),w.productFiles.length>0&&t.createElement(k,{vm:w}),t.createElement("div",null,t.createElement("div",{className:s.OrderSummaryMain},t.createElement("div",null,t.createElement("span",{className:s.InfoTitle},F("checkout-page:orderNo")),t.createElement("span",{className:s.InfoText},"#"+(w.checkout.orderNumber||""))),t.createElement("div",null,t.createElement("span",{className:s.InfoTitle},F("checkout-page:orderDate")),t.createElement("span",{className:s.InfoText},w.checkout.dateStr)),t.createElement("div",{className:s.OrderAmountInfoMain},t.createElement("span",{className:s.InfoTitle},F("checkout-page:orderAmount")),t.createElement("span",{className:s.OrderAmountInfo},t.createElement("span",null,"".concat(p(w.finalPrice||0,w.checkout.currencyCode,w.checkout.currencySymbol))),t.createElement("span",{className:s.Slash},"/"),t.createElement("span",{className:s.OrderItemCount},t.createElement(N,null),t.createElement("span",null," ",w.checkout.itemQuantity," ",F("checkout-page:cartItemProduct"))))))),w.hasQuickRegistration&&t.createElement(j,{vm:w}),t.createElement("div",{className:s.HideOnDesktop},t.createElement(n,{title:F("checkout-page:summary")},ee)),t.createElement(n,{title:F("checkout-page:paymentSummary")},$),!w.isDigitalOnly&&t.createElement(n,{title:F("checkout-page:shippingSummary")},te),t.createElement("div",{className:s.Actions},t.createElement("div",{className:s.HelpText},t.createElement("span",null,F("checkout-page:helpCtaQuestion")),t.createElement("span",{style:{marginLeft:"4px"},className:s.Cta,onClick:function(){return w.setContactModalVisible(!0)}},F("checkout-page:helpCta"))),t.createElement(o,{text:F("checkout-page:actions.backToShopping"),onClick:w.onBackToShoppingClick,style:{flex:"0 0 auto"}}))))}));a((function(e){var a,o=e.vm,r=u().t,i=s.Yellow;switch(o.checkout.orderPackageStatus){case g.FULFILLED:case g.PARTIALLY_FULFILLED:case g.DELIVERED:case g.PARTIALLY_DELIVERED:i=s.Green;break;case g.CANCELLED:case g.PARTIALLY_CANCELLED:case g.CANCEL_REJECTED:case g.CANCEL_REQUESTED:i=s.Red}return t.createElement("div",{className:[s.OrderStatus,i].join(" ")},o.checkout.orderPackageStatus?null===(a=[{types:[g.UNFULFILLED],text:r("checkout-page:orderPackageStatus.unfulfilled")},{types:[g.READY_FOR_SHIPMENT],text:r("checkout-page:orderPackageStatus.readyForShipment")},{types:[g.PARTIALLY_FULFILLED],text:r("checkout-page:orderPackageStatus.partiallyFulfilled")},{types:[g.FULFILLED],text:r("checkout-page:orderPackageStatus.fulfilled")},{types:[g.DELIVERED],text:r("checkout-page:orderPackageStatus.delivered")},{types:[g.PARTIALLY_DELIVERED],text:r("checkout-page:orderPackageStatus.partiallyDelivered")},{types:[g.UNABLE_TO_DELIVER],text:r("checkout-page:orderPackageStatus.unableToDeliver")},{types:[g.CANCELLED,g.PARTIALLY_CANCELLED],text:r("checkout-page:orderPackageStatus.cancelled")},{types:[g.CANCEL_REJECTED],text:r("checkout-page:orderPackageStatus.cancelRejected")},{types:[g.REFUNDED,g.PARTIALLY_REFUNDED],text:r("checkout-page:orderPackageStatus.refunded")},{types:[g.REFUND_REQUEST_ACCEPTED],text:r("checkout-page:orderPackageStatus.refundRequestAccepted")},{types:[g.REFUND_REJECTED],text:r("checkout-page:orderPackageStatus.refundRejected")},{types:[g.REFUND_REQUESTED],text:r("checkout-page:orderPackageStatus.refundRequested")}].find((function(e){return e.types.includes(o.checkout.orderPackageStatus)})))||void 0===a?void 0:a.text:"")}));export{L as SENT_CART_IDS_LS_KEY,S as StepSuccess};
|
|
1
|
+
import{__spreadArray as e}from'./../../../../ext/tslib/tslib.es6.js';import*as t from"react";import{observer as a}from"mobx-react-lite";import{Button as o}from"../../components/button/index.js";import{CART_LS_KEY as r}from"../../../../store/cart/index.js";import s from"./style.module.scss.js";import i from"../../components/svg/success-circle.js";import n from"../../components/expandable-section/index.js";import c from"../../components/credit-card-form/svg/amex.js";import d from"../../components/credit-card-form/svg/master-card.js";import l from"../../components/credit-card-form/svg/troy.js";import m from"../../components/credit-card-form/svg/visa.js";import"@ikas/storefront-config";import{formatCurrency as p}from"../../../../utils/currency.js";import{useTranslation as u}from"../../../../utils/i18n.js";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{IkasPaymentMethodType as f,IkasPaymentGatewayType as v,IkasOrderPackageStatus as g,IkasTransactionCardAssociation as E}from"@ikas/storefront-models";import"mobx";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/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"../../../../models/data/order/line-item/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 h from"../../components/offer-product/index.js";import{Analytics as x}from"../../../../analytics/analytics.js";import"../../../../analytics/head/index.js";import{QuickRegistration as j}from"../../components/quick-registration/index.js";import{ProductFiles as k}from"../../components/product-files/index.js";import y from"../../components/offer-product/offer-arrows/index.js";import I from"../../components/offer-product/offer-dots/index.js";import N from"../../components/svg/shopping-bag.js";import{CartSummary as T}from"../../components/cart-summary/index.js";import A from"../../components/offer-product/useCampaignOffer.js";var L="eventSentCartIds",S=a((function(a){var g,L,S,C,P,D,R,O,_,b,M,w=a.vm,F=u().t,Y=A(w,!0),U=Y.setActiveIndex,B=Y.setIsActiveOverlay,V=Y.handlePrev,z=Y.handleNext,K=Y.isActiveOverlay,G=Y.activeIndex,H=Y.isMobile;t.useEffect((function(){if("undefined"!=typeof localStorage){var t=localStorage.getItem(r),a=localStorage.getItem("eventSentCartIds");if(t&&t===w.checkout.id){if(w.successTransaction){var o=JSON.parse(a||"[]");if(!o.some((function(e){return e===w.checkout.id}))){var s=w.checkout.orderedAt,i=Date.now();Math.floor(Math.abs(i-s)/1e3)<30&&x.purchase(w.checkout,w.successTransaction),localStorage.setItem("eventSentCartIds",JSON.stringify(e(e([],o,!0),[w.checkout.id],!1)))}}localStorage.removeItem(r)}window&&window.handleKlarna&&window.handleKlarna(void 0)}}),[]);var Q=((null===(g=w.checkout.customer)||void 0===g?void 0:g.firstName)||"")+" "+((null===(L=w.checkout.customer)||void 0===L?void 0:L.lastName)||""),J=((null===(S=w.checkout.shippingAddress)||void 0===S?void 0:S.firstName)||"")+" "+((null===(C=w.checkout.shippingAddress)||void 0===C?void 0:C.lastName)||""),q=w.paymentGateways.find((function(e){var t;return e.id===(null===(t=w.successTransaction)||void 0===t?void 0:t.paymentGatewayId)})),X=function(e){switch(e){case f.APP_PAYMENT:return F("checkout-page:appPayment");case f.BANK_REDIRECT:return F("checkout-page:bankRedirect");case f.BUY_ONLINE_PAY_AT_STORE:return F("checkout-page:buyOnlinePayAtStore");case f.CASH:return F("checkout-page:cash");case f.CASH_ON_DELIVERY:return F("checkout-page:cashOnDelivery");case f.CREDIT_CARD:return F("checkout-page:creditCard");case f.CREDIT_CARD_ON_DELIVERY:return F("checkout-page:creditCardOnDelivery");case f.DIRECT_DEBIT:return F("checkout-page:directDebit");case f.GIFT_CARD:return F("checkout-page:giftCard");case f.MONEY_ORDER:return F("checkout-page:moneyOrder");case f.OTHER:return F("checkout-page:other");case f.PAY_LATER:return F("checkout-page:payLater");case f.SLICE_IT:return F("checkout-page:sliceIt");case f.WALLET:return F("checkout-page:wallet");default:return""}},W=null===(P=w.successTransaction)||void 0===P?void 0:P.paymentMethodDetail,Z=null===(D=w.successTransaction)||void 0===D?void 0:D.paymentGatewayCode,$=t.useMemo((function(){var e,a,o,r,i,n,u;return t.createElement("div",{className:[s.InfoGrid].join(" ")},!w.isFree&&t.createElement("div",null,t.createElement("div",{className:s.InfoTitle},F("checkout-page:paymentMethod")),q&&t.createElement(t.Fragment,null,!!q.logoUrl&&t.createElement("div",{className:s.PaymentLogoContainer},t.createElement("img",{src:q.logoUrl})),!q.logoUrl&&t.createElement("div",{className:s.InfoText},q.paymentMethodType===f.CREDIT_CARD&&q.type===v.INTERNAL?F("checkout-page:creditCard"):q.name),"STRIPE"!==q.code&&"PAYPAL"!==q.code&&"KLARNA"!==q.code||!(null===(e=w.successTransaction)||void 0===e?void 0:e.paymentMethod)?!!q.description&&q.type!==v.EXTERNAL&&t.createElement("div",{className:s.InfoText},t.createElement("div",{dangerouslySetInnerHTML:{__html:q.description}})):t.createElement("div",{className:s.InfoText},X(w.successTransaction.paymentMethod))),"E_PAY_KOLAY"===Z&&t.createElement(t.Fragment,null,t.createElement("div",{className:s.EPayKolayLogoContainer},t.createElement("img",{src:"https://cdn.myikas.com/sf/assets/payment/epaykolay.png"})),!!(null===(a=w.successTransaction)||void 0===a?void 0:a.paymentMethod)&&t.createElement("div",{className:s.InfoText},X(null===(o=w.successTransaction)||void 0===o?void 0:o.paymentMethod))),"E_PAY_KOLAY"!==Z&&"STRIPE"!==Z&&"PAYPAL"!==Z&&"KLARNA"!==Z&&"CREDIT_CARD"===(null===(r=w.successTransaction)||void 0===r?void 0:r.paymentMethod)&&t.createElement(t.Fragment,null,t.createElement("div",{className:s.InfoText},t.createElement("div",{className:s.CardLogoContainer},function(){var e,a;switch(null===(a=null===(e=w.successTransaction)||void 0===e?void 0:e.paymentMethodDetail)||void 0===a?void 0:a.cardAssociation){case E.AMERICAN_EXPRESS:return t.createElement(c,null);case E.MASTER_CARD:return t.createElement(d,null);case E.TROY:return t.createElement(l,null);case E.VISA:return t.createElement(m,null);default:return t.createElement("div",null)}}()),t.createElement("span",null,"**** ".concat((null==W?void 0:W.lastFourDigits)||""))),(null===(i=null==W?void 0:W.installment)||void 0===i?void 0:i.installmentCount)&&W.installment.installmentCount>1&&t.createElement(t.Fragment,null,t.createElement("div",{className:s.InfoText},"".concat(W.installment.installmentCount," ").concat(F("checkout-page:installments"))),null!==W.installment.installmentPrice&&t.createElement("div",{className:s.InfoText},"".concat(W.installment.installmentCount," x ").concat(p(W.installment.installmentPrice,w.checkout.currencyCode,w.checkout.currencySymbol)))))),t.createElement("div",null,t.createElement("div",{className:s.InfoTitle},F("checkout-page:billingAddress")),!!(null===(n=w.checkout.billingAddress)||void 0===n?void 0:n.company)&&t.createElement("div",{className:[s.InfoText,s.InfoTextBold].join(" ")},w.checkout.billingAddress.company),t.createElement("div",{className:s.InfoText},null===(u=w.checkout.billingAddress)||void 0===u?void 0:u.addressText)))}),[]),ee=t.useMemo((function(){return t.createElement(T,{vm:w,isSuccessPageSummary:!0})}),[]),te=t.useMemo((function(){var e,a,o,r,i;return t.createElement("div",{className:[s.InfoGrid].join(" ")},t.createElement("div",null,t.createElement("div",{className:s.InfoTitle},F("checkout-page:contactInfo")),t.createElement("div",{className:s.InfoText},null===(e=w.checkout.customer)||void 0===e?void 0:e.email),t.createElement("div",{className:s.InfoText},Q),!!(null===(a=w.checkout.shippingAddress)||void 0===a?void 0:a.phone)&&t.createElement("div",{className:s.InfoText},null===(o=w.checkout.shippingAddress)||void 0===o?void 0:o.phone)),t.createElement("div",null,"in-store"===w.deliveryMethod&&t.createElement(t.Fragment,null,t.createElement("div",{className:s.InfoTitle},F("checkout-page:receiver")),t.createElement("div",{className:[s.InfoText,s.withMBottom].join(" ")},J)),t.createElement("div",{className:s.InfoTitle},"address"===w.deliveryMethod?F("checkout-page:shippingAddress"):F("checkout-page:pickUpLocation")),!!(null===(r=w.checkout.shippingAddress)||void 0===r?void 0:r.company)&&t.createElement("div",{className:[s.InfoText,s.InfoTextBold].join(" ")},w.checkout.shippingAddress.company),t.createElement("div",{className:s.InfoText},null===(i=w.checkout.shippingAddress)||void 0===i?void 0:i.addressText)))}),[]),ae=!!(null===(R=w.customizationProps)||void 0===R?void 0:R.campaignOffersEnableMiddlePhase)&&!!(null===(O=w.customizationProps)||void 0===O?void 0:O.showCampaignIsBiggerImage)&&H&&K,oe=!!(null===(_=w.customizationProps)||void 0===_?void 0:_.campaignOffersEnableMiddlePhase)&&!!(null===(b=w.customizationProps)||void 0===b?void 0:b.showCampaignIsBiggerImage)&&H&&!K;return t.createElement(t.Fragment,null,!!(null===(M=w.customizationProps)||void 0===M?void 0:M.campaignOffersEnableMiddlePhase)&&K&&w.campaignOffers&&w.campaignOffers.length>0&&H&&t.createElement("div",{className:[s.MiddlePhaseOverlay,ae?s.MiddlePhaseOverlayPopup:""].join(" ")}),w.campaignOffers&&!!w.campaignOffers.length&&w.isCampaignOfferLoaded&&t.createElement("div",{className:[s.CampaignOfferMain,ae?s.OverlayPopupMain:""].join(" ")},t.createElement("div",{className:s.OfferSlider},w.campaignOffers.map((function(e,a){var o;return t.createElement(h,{vm:w,campaignOffer:e,index:a,activeIndex:G,offersLength:(null===(o=w.campaignOffers)||void 0===o?void 0:o.length)||0,handlePrev:V,handleNext:z,setActiveIndex:function(e){return U(e)},isPopupShow:ae,closePopup:function(){return B(!1)},isPopupClosed:oe,showPopup:function(){return B(!0)},step:w.step})}))),w.campaignOffers.length>1&&t.createElement(y,{handlePrev:V,handleNext:z}),w.campaignOffers.length>1&&t.createElement(I,{isPopupShow:ae,vm:w,activeIndex:G})),t.createElement("div",{className:s.StepSuccess},t.createElement("div",{className:s.SuccessTitleContainer},t.createElement(i,{className:s.SuccessCircle}),t.createElement("span",{className:s.SuccessTitle},F("checkout-page:orderSuccessTitle"))),t.createElement("div",{className:s.SuccessSubTitle},F(w.isDigitalOnly?"checkout-page:orderSuccessDigitalOnlyDescription":"address"===w.deliveryMethod?"checkout-page:orderSuccessDescription":"checkout-page:orderSuccessInStoreDeliveryDescription",{customerName:Q})),w.productFiles.length>0&&t.createElement(k,{vm:w}),t.createElement("div",null,t.createElement("div",{className:s.OrderSummaryMain},t.createElement("div",null,t.createElement("span",{className:s.InfoTitle},F("checkout-page:orderNo")),t.createElement("span",{className:s.InfoText},"#"+(w.checkout.orderNumber||""))),t.createElement("div",null,t.createElement("span",{className:s.InfoTitle},F("checkout-page:orderDate")),t.createElement("span",{className:s.InfoText},w.checkout.dateStr)),t.createElement("div",{className:s.OrderAmountInfoMain},t.createElement("span",{className:s.InfoTitle},F("checkout-page:orderAmount")),t.createElement("span",{className:s.OrderAmountInfo},t.createElement("span",null,"".concat(p(w.finalPrice||0,w.checkout.currencyCode,w.checkout.currencySymbol))),t.createElement("span",{className:s.Slash},"/"),t.createElement("span",{className:s.OrderItemCount},t.createElement(N,null),t.createElement("span",null," ",w.checkout.itemQuantity," ",F("checkout-page:cartItemProduct"))))))),w.hasQuickRegistration&&t.createElement(j,{vm:w}),t.createElement("div",{className:s.HideOnDesktop},t.createElement(n,{title:F("checkout-page:summary")},ee)),t.createElement(n,{expanded:!0,title:F("checkout-page:paymentSummary")},$),!w.isDigitalOnly&&t.createElement(n,{title:F("checkout-page:shippingSummary")},te),t.createElement("div",{className:s.Actions},t.createElement("div",{className:s.HelpText},t.createElement("span",null,F("checkout-page:helpCtaQuestion")),t.createElement("span",{style:{marginLeft:"4px"},className:s.Cta,onClick:function(){return w.setContactModalVisible(!0)}},F("checkout-page:helpCta"))),t.createElement(o,{text:F("checkout-page:actions.backToShopping"),onClick:w.onBackToShoppingClick,style:{flex:"0 0 auto"}}))))}));a((function(e){var a,o=e.vm,r=u().t,i=s.Yellow;switch(o.checkout.orderPackageStatus){case g.FULFILLED:case g.PARTIALLY_FULFILLED:case g.DELIVERED:case g.PARTIALLY_DELIVERED:i=s.Green;break;case g.CANCELLED:case g.PARTIALLY_CANCELLED:case g.CANCEL_REJECTED:case g.CANCEL_REQUESTED:i=s.Red}return t.createElement("div",{className:[s.OrderStatus,i].join(" ")},o.checkout.orderPackageStatus?null===(a=[{types:[g.UNFULFILLED],text:r("checkout-page:orderPackageStatus.unfulfilled")},{types:[g.READY_FOR_SHIPMENT],text:r("checkout-page:orderPackageStatus.readyForShipment")},{types:[g.PARTIALLY_FULFILLED],text:r("checkout-page:orderPackageStatus.partiallyFulfilled")},{types:[g.FULFILLED],text:r("checkout-page:orderPackageStatus.fulfilled")},{types:[g.DELIVERED],text:r("checkout-page:orderPackageStatus.delivered")},{types:[g.PARTIALLY_DELIVERED],text:r("checkout-page:orderPackageStatus.partiallyDelivered")},{types:[g.UNABLE_TO_DELIVER],text:r("checkout-page:orderPackageStatus.unableToDeliver")},{types:[g.CANCELLED,g.PARTIALLY_CANCELLED],text:r("checkout-page:orderPackageStatus.cancelled")},{types:[g.CANCEL_REJECTED],text:r("checkout-page:orderPackageStatus.cancelRejected")},{types:[g.REFUNDED,g.PARTIALLY_REFUNDED],text:r("checkout-page:orderPackageStatus.refunded")},{types:[g.REFUND_REQUEST_ACCEPTED],text:r("checkout-page:orderPackageStatus.refundRequestAccepted")},{types:[g.REFUND_REJECTED],text:r("checkout-page:orderPackageStatus.refundRejected")},{types:[g.REFUND_REQUESTED],text:r("checkout-page:orderPackageStatus.refundRequested")}].find((function(e){return e.types.includes(o.checkout.orderPackageStatus)})))||void 0===a?void 0:a.text:"")}));export{L as SENT_CART_IDS_LS_KEY,S as StepSuccess};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__spreadArray as t,__assign as e,__awaiter as o,__generator as n}from"../../../ext/tslib/tslib.es6.mjs.js";import i from"react";import{observer as l}from"../../../../../../mobx-react/dist/mobxreact.esm.js";import{getHorizontalAlignment as r,injectFontScript as a}from"../../helpers/index.js";import{ProductListTypeEnum as d,ProductListLayoutEnum as c}from"../../models/modal/step/elements/product/index.js";import s from"../button-element-renderer/index.js";import u from"../../../../../../swiper/modules/navigation.mjs.js";import m from"../../../../../../swiper/modules/scrollbar.mjs.js";import{Swiper as p,SwiperSlide as v}from"../../../../../../swiper/swiper-react.mjs.js";import g from"../../assets/left-arrow.js";import f from"../../assets/right-arrow.js";import{ProductActionTypeEnum as b}from"../../models/modal/step/elements/product/detail-settings/index.js";import{ComponentHorizontalAlignmentEnum as x}from"../../models/modal/step/elements/base/index.js";var h=l((function(l){var h,y=l.element,E=l.products,P=l.popup,w=l.editModeChildren,C=l.isPreviewMode,S=l.sfProps,z=l.onClose,j=i.useState(null),R=j[0],A=j[1],D=i.useState(!1),I=D[0],W=D[1],_=i.useState(!1),F=_[0],T=_[1],k=y,L=[];if(E&&(L=k.listType===d.SPECIFIC?(null===(h=k.variantPairs)||void 0===h?void 0:h.length)?E.slice().sort((function(t,e){return k.variantPairs.findIndex((function(e){return e.variantId===t.variantId}))-k.variantPairs.findIndex((function(t){return t.variantId===e.variantId}))})):[]:t([],E,!0)),L.length>k.maxProductsToShow&&(L.length=k.maxProductsToShow),!(L&&L.length||!P.isPreviewMode)&&w)return w;if(!L||!L.length)return null;k.gapBetweenProductElements;var H=k.productDetailSettings.image,
|
|
1
|
+
import{__spreadArray as t,__assign as e,__awaiter as o,__generator as n}from"../../../ext/tslib/tslib.es6.mjs.js";import i from"react";import{observer as l}from"../../../../../../mobx-react/dist/mobxreact.esm.js";import{getHorizontalAlignment as r,injectFontScript as a}from"../../helpers/index.js";import{ProductListTypeEnum as d,ProductListLayoutEnum as c}from"../../models/modal/step/elements/product/index.js";import s from"../button-element-renderer/index.js";import u from"../../../../../../swiper/modules/navigation.mjs.js";import m from"../../../../../../swiper/modules/scrollbar.mjs.js";import{Swiper as p,SwiperSlide as v}from"../../../../../../swiper/swiper-react.mjs.js";import g from"../../assets/left-arrow.js";import f from"../../assets/right-arrow.js";import{ProductActionTypeEnum as b}from"../../models/modal/step/elements/product/detail-settings/index.js";import{ComponentHorizontalAlignmentEnum as x}from"../../models/modal/step/elements/base/index.js";var h=l((function(l){var h,y=l.element,E=l.products,P=l.popup,w=l.editModeChildren,C=l.isPreviewMode,S=l.sfProps,z=l.onClose,j=i.useState(null),R=j[0],A=j[1],D=i.useState(!1),I=D[0],W=D[1],_=i.useState(!1),F=_[0],T=_[1],k=y,L=[];if(E&&(L=k.listType===d.SPECIFIC?(null===(h=k.variantPairs)||void 0===h?void 0:h.length)?E.slice().sort((function(t,e){return k.variantPairs.findIndex((function(e){return e.variantId===t.variantId}))-k.variantPairs.findIndex((function(t){return t.variantId===e.variantId}))})):[]:t([],E,!0)),L.length>k.maxProductsToShow&&(L.length=k.maxProductsToShow),!(L&&L.length||!P.isPreviewMode)&&w)return w;if(!L||!L.length)return null;k.gapBetweenProductElements;var H=k.productDetailSettings.image,B=k.productDetailSettings.button,M=k.buttonSettings,N=k.productDetailSettings.discountRatio,O=k.productDetailSettings.finalPrice,U=k.productDetailSettings.originalPrice,V=k.productDetailSettings.name,$=r(k.horizontalAlignment),q=1;k.layout===c.ONE_COLUMN?q=1:k.layout===c.TWO_COLUMN?q=2:k.layout===c.THREE_COLUMN&&(q=3);var G={padding:"".concat(k.outerVerticalPadding,"px ").concat(k.outerHorizontalPadding,"px"),backgroundColor:k.productBgColor,width:"100%",height:"max-content"},J={display:"flex",flexDirection:"column",justifyContent:"space-between",alignItems:"center",height:"100%"},K={display:"flex",justifyContent:$,alignItems:"center",width:"100%",backgroundColor:null==H?void 0:H.bgColor,borderRadius:(null==H?void 0:H.borderRadius)?"".concat(H.borderRadius,"px"):void 0},Q={width:"".concat(null==H?void 0:H.maxWidth,"%"),objectFit:"contain",borderRadius:(null==H?void 0:H.borderRadius)?"".concat(H.borderRadius,"px"):void 0},X={display:"flex",flexDirection:"column",width:"100%"},Y={display:"flex",flexDirection:"column"},Z={backgroundColor:null==V?void 0:V.bgColor,color:null==V?void 0:V.color,fontFamily:V?a(V.fontFamily):void 0,fontSize:null==V?void 0:V.fontSize,fontWeight:null==V?void 0:V.fontWeight,padding:"".concat(null==V?void 0:V.verticalPadding,"px ").concat(null==V?void 0:V.horizontalPadding,"px"),width:"100%",textAlign:null==V?void 0:V.horizontalAlignment,border:"".concat(null==V?void 0:V.borderWidth,"px ").concat(null==V?void 0:V.borderStyle," ").concat(null==V?void 0:V.borderColor),borderRadius:null==V?void 0:V.borderRadius},tt={backgroundColor:null==N?void 0:N.bgColor,color:null==N?void 0:N.color,fontFamily:N?a(N.fontFamily):void 0,fontSize:null==N?void 0:N.fontSize,fontWeight:null==N?void 0:N.fontWeight,padding:"".concat(null==N?void 0:N.verticalPadding,"px ").concat(null==N?void 0:N.horizontalPadding,"px"),width:"fit-content !important",border:"".concat(null==N?void 0:N.borderWidth,"px ").concat(null==N?void 0:N.borderStyle," ").concat(null==N?void 0:N.borderColor),borderRadius:null==N?void 0:N.borderRadius},et={textDecoration:"line-through",backgroundColor:null==U?void 0:U.bgColor,color:null==U?void 0:U.color,fontFamily:U?a(U.fontFamily):void 0,fontSize:null==U?void 0:U.fontSize,fontWeight:null==U?void 0:U.fontWeight,padding:"".concat(null==U?void 0:U.verticalPadding,"px ").concat(null==U?void 0:U.horizontalPadding,"px"),width:"100%",textAlign:null==U?void 0:U.horizontalAlignment,border:"".concat(null==U?void 0:U.borderWidth,"px ").concat(null==U?void 0:U.borderStyle," ").concat(null==U?void 0:U.borderColor),borderRadius:null==U?void 0:U.borderRadius},ot={backgroundColor:null==O?void 0:O.bgColor,color:null==O?void 0:O.color,fontFamily:O?a(O.fontFamily):void 0,fontSize:null==O?void 0:O.fontSize,fontWeight:null==O?void 0:O.fontWeight,padding:"".concat(null==O?void 0:O.verticalPadding,"px ").concat(null==O?void 0:O.horizontalPadding,"px"),width:"100%",textAlign:null==O?void 0:O.horizontalAlignment,border:"".concat(null==O?void 0:O.borderWidth,"px ").concat(null==O?void 0:O.borderStyle," ").concat(null==O?void 0:O.borderColor),borderRadius:null==O?void 0:O.borderRadius},nt={width:"".concat(M.width,"%"),minWidth:"fit-content"},it=e({display:"flex",justifyContent:"center",width:"100%",gap:"10px"},1===q?{position:"absolute",top:"calc(50% - 25px)",alignItems:"center",justifyContent:"space-between",zIndex:10}:void 0),lt={padding:10,display:"flex",justifyContent:"center",alignItems:"center",borderRadius:"100%",border:"1px solid #EEF2F6",cursor:"pointer"};return i.createElement("div",{style:G},i.createElement(p,{onSwiper:A,modules:[u,m],spaceBetween:k.gapBetweenProducts,slidesPerView:q,navigation:{nextEl:".custom-next-button",prevEl:".custom-prev-button"},scrollbar:void 0},L.map((function(t,e){return i.createElement(v,{style:{height:"auto"},key:t.variantId},i.createElement("div",{style:J,onClick:function(){return function(t){return o(void 0,void 0,void 0,(function(){var e,o;return n(this,(function(n){switch(n.label){case 0:return C||!t.url?[3,4]:(null===(o=k.productDetailSettings.button)||void 0===o?void 0:o.action)===b.ADD_TO_CART&&S?[4,S.addProductToCart(t)]:[3,2];case 1:return n.sent()&&((e=document.createElement("a")).href="".concat(P.storeUrl,"/cart"),e.target="_self",e.click()),[3,3];case 2:(e=document.createElement("a")).href=t.url,e.target="_self",e.click(),n.label=3;case 3:z(!0),n.label=4;case 4:return[2]}}))}))}(t)}},i.createElement("div",{style:X},!!H&&t.imageURL&&i.createElement("div",{style:K},i.createElement("img",{src:t.imageURL||void 0,alt:t.name||void 0,style:Q})),!!V&&i.createElement("div",{style:Y},!!V&&i.createElement("div",{style:Z},t.name)),(!!U||!!O||!!N)&&i.createElement("div",{style:{display:"flex",flexDirection:"column",gap:2}},!!N&&!!t.discountPrice&&i.createElement("div",{style:{padding:"".concat(N.outerVerticalPadding,"px ").concat(N.outerHorizontalPadding,"px"),width:"100% !important",display:"flex",justifyContent:r(N.horizontalAlignment),alignItems:"center"}},i.createElement("div",{style:tt},function(t){return t.$discountRatio?k.productDetailSettings.discountRatioText?"".concat(t.$discountRatio," ").concat(k.productDetailSettings.discountRatioText):t.$discountRatio:null}(t))),i.createElement("div",{style:{display:"flex",gap:4,flexWrap:"wrap",overflow:"hidden",width:"100%",justifyContent:r((null==U?void 0:U.horizontalAlignment)||(null==O?void 0:O.horizontalAlignment)||x.LEFT),alignItems:"center"}},!!U&&!!t.discountPrice&&i.createElement("div",{style:{padding:"".concat(U.outerVerticalPadding,"px ").concat(U.outerHorizontalPadding,"px")}},i.createElement("div",{style:et},t.price)),!!O&&i.createElement("div",{style:{padding:"".concat(O.outerVerticalPadding,"px ").concat(O.outerHorizontalPadding,"px")}},i.createElement("div",{style:ot},t.discountPrice||t.price))))),!!B&&i.createElement("div",{style:nt}," ",i.createElement(s,{element:M})," ")))})),L.length>1&&i.createElement("div",{style:it},i.createElement("div",{className:"custom-prev-button",style:e(e({},lt),I?{opacity:.5,cursor:"not-allowed"}:{}),onClick:function(){R&&(T(R.isEnd),W(R.isBeginning))}},i.createElement(g,null)),i.createElement("div",{className:"custom-next-button",style:e(e({},lt),F?{opacity:.5,cursor:"not-allowed"}:{}),onClick:function(){R&&(T(R.isEnd),W(R.isBeginning))}},i.createElement(f,null)))))}));export{h as default};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ikas/storefront",
|
|
3
|
-
"version": "4.15.0-beta.
|
|
3
|
+
"version": "4.15.0-beta.147",
|
|
4
4
|
"description": "Storefront functionality for ikas storefront themes.",
|
|
5
5
|
"author": "ikas",
|
|
6
6
|
"license": "ISC",
|
|
@@ -17,15 +17,15 @@
|
|
|
17
17
|
"build": "rm -rf build && rollup -c"
|
|
18
18
|
},
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"@ikas/popup-renderer": "^1.0.
|
|
20
|
+
"@ikas/popup-renderer": "^1.0.176",
|
|
21
21
|
"swiper": "11.0.6"
|
|
22
22
|
},
|
|
23
23
|
"devDependencies": {
|
|
24
|
-
"@ikas/storefront-api": "^4.15.0-beta.
|
|
25
|
-
"@ikas/storefront-config": "^4.15.0-beta.
|
|
26
|
-
"@ikas/storefront-model-functions": "^4.15.0-beta.
|
|
27
|
-
"@ikas/storefront-models": "^4.15.0-beta.
|
|
28
|
-
"@ikas/storefront-providers": "^4.15.0-beta.
|
|
24
|
+
"@ikas/storefront-api": "^4.15.0-beta.147",
|
|
25
|
+
"@ikas/storefront-config": "^4.15.0-beta.147",
|
|
26
|
+
"@ikas/storefront-model-functions": "^4.15.0-beta.147",
|
|
27
|
+
"@ikas/storefront-models": "^4.15.0-beta.147",
|
|
28
|
+
"@ikas/storefront-providers": "^4.15.0-beta.147",
|
|
29
29
|
"@ikas/localized-address": "1.0.0-beta.3",
|
|
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.3",
|
|
63
|
-
"@ikas/storefront-api": "^4.15.0-beta.
|
|
64
|
-
"@ikas/storefront-config": "^4.15.0-beta.
|
|
65
|
-
"@ikas/storefront-model-functions": "^4.15.0-beta.
|
|
66
|
-
"@ikas/storefront-models": "^4.15.0-beta.
|
|
67
|
-
"@ikas/storefront-providers": "^4.15.0-beta.
|
|
63
|
+
"@ikas/storefront-api": "^4.15.0-beta.147",
|
|
64
|
+
"@ikas/storefront-config": "^4.15.0-beta.147",
|
|
65
|
+
"@ikas/storefront-model-functions": "^4.15.0-beta.147",
|
|
66
|
+
"@ikas/storefront-models": "^4.15.0-beta.147",
|
|
67
|
+
"@ikas/storefront-providers": "^4.15.0-beta.147",
|
|
68
68
|
"mobx": "^6.1.3",
|
|
69
69
|
"mobx-react-lite": "^3.1.5",
|
|
70
70
|
"next": "12.2.0",
|