@ikas/storefront 4.10.0-beta.42 → 4.10.0-beta.43
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as e from"react";import{observer as t}from"mobx-react-lite";import{Button as a}from"../../components/button/index.js";import{CART_LS_KEY as o}from"../../../../store/cart/index.js";import s from"./style.module.scss.js";import r from"../../components/svg/success-circle.js";import i from"../../components/expandable-section/index.js";import c from"../../components/credit-card-form/svg/amex.js";import n from"../../components/credit-card-form/svg/master-card.js";import d from"../../components/credit-card-form/svg/troy.js";import l from"../../components/credit-card-form/svg/visa.js";import"@ikas/storefront-config";import{formatCurrency as m}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 p,IkasPaymentGatewayType as E,IkasOrderPackageStatus as v,IkasTransactionCardAssociation as g}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/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/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/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 f from"../../components/offer-product/index.js";import{Analytics as h}from"../../../../analytics/analytics.js";import"../../../../analytics/head/index.js";import{QuickRegistration as x}from"../../components/quick-registration/index.js";import{ProductFiles as k}from"../../components/product-files/index.js";var j=t((function(t){var v,j,y,I,N,A,L,C=t.vm,R=u().t;e.useEffect((function(){if("undefined"!=typeof localStorage){var e=localStorage.getItem(o);e&&e===C.checkout.id&&(C.successTransaction&&h.purchase(C.checkout,C.successTransaction),localStorage.removeItem(o)),window&&window.handleKlarna&&window.handleKlarna(void 0)}}),[]);var D=((null===(v=C.checkout.customer)||void 0===v?void 0:v.firstName)||"")+" "+((null===(j=C.checkout.customer)||void 0===j?void 0:j.lastName)||""),S=((null===(y=C.checkout.shippingAddress)||void 0===y?void 0:y.firstName)||"")+" "+((null===(I=C.checkout.shippingAddress)||void 0===I?void 0:I.lastName)||""),_=C.paymentGateways.find((function(e){var t;return e.id===(null===(t=C.successTransaction)||void 0===t?void 0:t.paymentGatewayId)})),P=function(e){switch(e){case p.APP_PAYMENT:return R("checkout-page:appPayment");case p.BANK_REDIRECT:return R("checkout-page:bankRedirect");case p.BUY_ONLINE_PAY_AT_STORE:return R("checkout-page:buyOnlinePayAtStore");case p.CASH:return R("checkout-page:cash");case p.CASH_ON_DELIVERY:return R("checkout-page:cashOnDelivery");case p.CREDIT_CARD:return R("checkout-page:creditCard");case p.CREDIT_CARD_ON_DELIVERY:return R("checkout-page:creditCardOnDelivery");case p.DIRECT_DEBIT:return R("checkout-page:directDebit");case p.GIFT_CARD:return R("checkout-page:giftCard");case p.MONEY_ORDER:return R("checkout-page:moneyOrder");case p.OTHER:return R("checkout-page:other");case p.PAY_LATER:return R("checkout-page:payLater");case p.SLICE_IT:return R("checkout-page:sliceIt");case p.WALLET:return R("checkout-page:wallet");default:return""}},b=null===(N=C.successTransaction)||void 0===N?void 0:N.paymentMethodDetail,F=null===(A=C.successTransaction)||void 0===A?void 0:A.paymentGatewayCode,w=e.useMemo((function(){var t,a,o,r,i,u,v;return e.createElement("div",{className:[s.InfoGrid].join(" ")},!C.isFree&&e.createElement("div",null,e.createElement("div",{className:s.InfoTitle},R("checkout-page:paymentMethod")),_&&e.createElement(e.Fragment,null,!!_.logoUrl&&e.createElement("div",{className:s.PaymentLogoContainer},e.createElement("img",{src:_.logoUrl})),!_.logoUrl&&e.createElement("div",{className:s.InfoText},_.paymentMethodType===p.CREDIT_CARD&&_.type===E.INTERNAL?R("checkout-page:creditCard"):_.name),"STRIPE"!==_.code&&"PAYPAL"!==_.code&&"KLARNA"!==_.code||!(null===(t=C.successTransaction)||void 0===t?void 0:t.paymentMethod)?!!_.description&&_.type!==E.EXTERNAL&&e.createElement("div",{className:s.InfoText},e.createElement("div",{dangerouslySetInnerHTML:{__html:_.description}})):e.createElement("div",{className:s.InfoText},P(C.successTransaction.paymentMethod))),"E_PAY_KOLAY"===F&&e.createElement(e.Fragment,null,e.createElement("div",{className:s.EPayKolayLogoContainer},e.createElement("img",{src:"https://cdn.myikas.com/sf/assets/payment/epaykolay.png"})),!!(null===(a=C.successTransaction)||void 0===a?void 0:a.paymentMethod)&&e.createElement("div",{className:s.InfoText},P(null===(o=C.successTransaction)||void 0===o?void 0:o.paymentMethod))),"E_PAY_KOLAY"!==F&&"STRIPE"!==F&&"PAYPAL"!==F&&"KLARNA"!==F&&"CREDIT_CARD"===(null===(r=C.successTransaction)||void 0===r?void 0:r.paymentMethod)&&e.createElement(e.Fragment,null,e.createElement("div",{className:s.InfoText},e.createElement("div",{className:s.CardLogoContainer},function(){var t,a;switch(null===(a=null===(t=C.successTransaction)||void 0===t?void 0:t.paymentMethodDetail)||void 0===a?void 0:a.cardAssociation){case g.AMERICAN_EXPRESS:return e.createElement(c,null);case g.MASTER_CARD:return e.createElement(n,null);case g.TROY:return e.createElement(d,null);case g.VISA:return e.createElement(l,null);default:return e.createElement("div",null)}}()),e.createElement("span",null,"**** ".concat((null==b?void 0:b.lastFourDigits)||""))),(null===(i=null==b?void 0:b.installment)||void 0===i?void 0:i.installmentCount)&&b.installment.installmentCount>1&&e.createElement(e.Fragment,null,e.createElement("div",{className:s.InfoText},"".concat(b.installment.installmentCount," ").concat(R("checkout-page:installments"))),null!==b.installment.installmentPrice&&e.createElement("div",{className:s.InfoText},"".concat(b.installment.installmentCount," x ").concat(m(b.installment.installmentPrice,C.checkout.currencyCode,C.checkout.currencySymbol)))))),e.createElement("div",null,e.createElement("div",{className:s.InfoTitle},R("checkout-page:billingAddress")),!!(null===(u=C.checkout.billingAddress)||void 0===u?void 0:u.company)&&e.createElement("div",{className:[s.InfoText,s.InfoTextBold].join(" ")},C.checkout.billingAddress.company),e.createElement("div",{className:s.InfoText},null===(v=C.checkout.billingAddress)||void 0===v?void 0:v.addressText)))}),[]),Y=e.useMemo((function(){var t,a,o,r,i;return e.createElement("div",{className:[s.InfoGrid].join(" ")},e.createElement("div",null,e.createElement("div",{className:s.InfoTitle},R("checkout-page:contactInfo")),e.createElement("div",{className:s.InfoText},null===(t=C.checkout.customer)||void 0===t?void 0:t.email),e.createElement("div",{className:s.InfoText},D),!!(null===(a=C.checkout.shippingAddress)||void 0===a?void 0:a.phone)&&e.createElement("div",{className:s.InfoText},null===(o=C.checkout.shippingAddress)||void 0===o?void 0:o.phone)),e.createElement("div",null,"in-store"===C.deliveryMethod&&e.createElement(e.Fragment,null,e.createElement("div",{className:s.InfoTitle},R("checkout-page:receiver")),e.createElement("div",{className:[s.InfoText,s.withMBottom].join(" ")},S)),e.createElement("div",{className:s.InfoTitle},"address"===C.deliveryMethod?R("checkout-page:shippingAddress"):R("checkout-page:pickUpLocation")),!!(null===(r=C.checkout.shippingAddress)||void 0===r?void 0:r.company)&&e.createElement("div",{className:[s.InfoText,s.InfoTextBold].join(" ")},C.checkout.shippingAddress.company),e.createElement("div",{className:s.InfoText},null===(i=C.checkout.shippingAddress)||void 0===i?void 0:i.addressText)))}),[]);return e.createElement("div",{className:s.StepSuccess},e.createElement("div",{className:s.SuccessTitleContainer},e.createElement(r,{className:s.SuccessCircle}),e.createElement("span",{className:s.SuccessTitle},R("checkout-page:orderSuccessTitle"))),e.createElement("div",{className:s.SuccessSubTitle},R("address"===C.deliveryMethod?"checkout-page:orderSuccessDescription":"checkout-page:orderSuccessInStoreDeliveryDescription",{customerName:D})),C.productFiles.length>0&&e.createElement(k,{vm:C}),e.createElement("div",{className:[s.InfoGrid,s.WithBorder].join(" ")},e.createElement("div",null,e.createElement("div",{className:s.InfoTitle},R("checkout-page:orderNoAndDate")),e.createElement("div",{className:[s.InfoText,s.InfoTextBold].join(" ")},"#"+(C.checkout.orderNumber||"")),e.createElement("div",{className:s.InfoText},C.checkout.dateStr),e.createElement(T,{vm:C})),e.createElement("div",null,e.createElement("div",{className:s.InfoTitle},R("checkout-page:contactInfo")),e.createElement("div",{className:s.InfoText},null===(L=C.checkout.customer)||void 0===L?void 0:L.email),e.createElement("div",{className:s.InfoText},D))),C.postCheckoutCampaignOffer&&e.createElement(f,{vm:C,campaignOffer:C.postCheckoutCampaignOffer}),C.hasQuickRegistration&&e.createElement(x,{vm:C}),e.createElement(i,{title:R("checkout-page:paymentSummary")},w),!C.isDigitalOnly&&e.createElement(i,{title:R("checkout-page:shippingSummary")},Y),e.createElement("div",{className:s.Actions},e.createElement("div",{className:s.HelpText},e.createElement("span",null,R("checkout-page:helpCtaQuestion")),e.createElement("span",{className:s.Cta,onClick:function(){return C.setContactModalVisible(!0)}},R("checkout-page:helpCta"))),e.createElement(a,{text:R("checkout-page:actions.backToShopping"),onClick:C.onBackToShoppingClick,style:{flex:"0 0 auto"}})))})),T=t((function(t){var a,o=t.vm,r=u().t,i=s.Yellow;switch(o.checkout.orderPackageStatus){case v.FULFILLED:case v.PARTIALLY_FULFILLED:case v.DELIVERED:case v.PARTIALLY_DELIVERED:i=s.Green;break;case v.CANCELLED:case v.PARTIALLY_CANCELLED:case v.CANCEL_REJECTED:case v.CANCEL_REQUESTED:i=s.Red}return e.createElement("div",{className:[s.OrderStatus,i].join(" ")},o.checkout.orderPackageStatus?null===(a=[{types:[v.UNFULFILLED],text:r("checkout-page:orderPackageStatus.unfulfilled")},{types:[v.READY_FOR_SHIPMENT],text:r("checkout-page:orderPackageStatus.readyForShipment")},{types:[v.PARTIALLY_FULFILLED],text:r("checkout-page:orderPackageStatus.partiallyFulfilled")},{types:[v.FULFILLED],text:r("checkout-page:orderPackageStatus.fulfilled")},{types:[v.DELIVERED,v.PARTIALLY_DELIVERED],text:r("checkout-page:orderPackageStatus.delivered")},{types:[v.UNABLE_TO_DELIVER],text:r("checkout-page:orderPackageStatus.unableToDeliver")},{types:[v.CANCELLED,v.PARTIALLY_CANCELLED],text:r("checkout-page:orderPackageStatus.cancelled")},{types:[v.CANCEL_REJECTED],text:r("checkout-page:orderPackageStatus.cancelRejected")},{types:[v.REFUNDED,v.PARTIALLY_REFUNDED],text:r("checkout-page:orderPackageStatus.refunded")},{types:[v.REFUND_REQUEST_ACCEPTED],text:r("checkout-page:orderPackageStatus.refundRequestAccepted")},{types:[v.REFUND_REJECTED],text:r("checkout-page:orderPackageStatus.refundRejected")},{types:[v.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{j as StepSuccess};
|
|
1
|
+
import*as e from"react";import{observer as t}from"mobx-react-lite";import{Button as a}from"../../components/button/index.js";import{CART_LS_KEY as o}from"../../../../store/cart/index.js";import s from"./style.module.scss.js";import r from"../../components/svg/success-circle.js";import i from"../../components/expandable-section/index.js";import c from"../../components/credit-card-form/svg/amex.js";import n from"../../components/credit-card-form/svg/master-card.js";import d from"../../components/credit-card-form/svg/troy.js";import l from"../../components/credit-card-form/svg/visa.js";import"@ikas/storefront-config";import{formatCurrency as m}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 p,IkasPaymentGatewayType as E,IkasOrderPackageStatus as v,IkasTransactionCardAssociation as g}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/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/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/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 f from"../../components/offer-product/index.js";import{Analytics as h}from"../../../../analytics/analytics.js";import"../../../../analytics/head/index.js";import{QuickRegistration as x}from"../../components/quick-registration/index.js";import{ProductFiles as k}from"../../components/product-files/index.js";var j=t((function(t){var v,j,y,I,N,A,L,D=t.vm,C=u().t;e.useEffect((function(){if("undefined"!=typeof localStorage){var e=localStorage.getItem(o);e&&e===D.checkout.id&&(D.successTransaction&&h.purchase(D.checkout,D.successTransaction),localStorage.removeItem(o)),window&&window.handleKlarna&&window.handleKlarna(void 0)}}),[]);var R=((null===(v=D.checkout.customer)||void 0===v?void 0:v.firstName)||"")+" "+((null===(j=D.checkout.customer)||void 0===j?void 0:j.lastName)||""),S=((null===(y=D.checkout.shippingAddress)||void 0===y?void 0:y.firstName)||"")+" "+((null===(I=D.checkout.shippingAddress)||void 0===I?void 0:I.lastName)||""),_=D.paymentGateways.find((function(e){var t;return e.id===(null===(t=D.successTransaction)||void 0===t?void 0:t.paymentGatewayId)})),P=function(e){switch(e){case p.APP_PAYMENT:return C("checkout-page:appPayment");case p.BANK_REDIRECT:return C("checkout-page:bankRedirect");case p.BUY_ONLINE_PAY_AT_STORE:return C("checkout-page:buyOnlinePayAtStore");case p.CASH:return C("checkout-page:cash");case p.CASH_ON_DELIVERY:return C("checkout-page:cashOnDelivery");case p.CREDIT_CARD:return C("checkout-page:creditCard");case p.CREDIT_CARD_ON_DELIVERY:return C("checkout-page:creditCardOnDelivery");case p.DIRECT_DEBIT:return C("checkout-page:directDebit");case p.GIFT_CARD:return C("checkout-page:giftCard");case p.MONEY_ORDER:return C("checkout-page:moneyOrder");case p.OTHER:return C("checkout-page:other");case p.PAY_LATER:return C("checkout-page:payLater");case p.SLICE_IT:return C("checkout-page:sliceIt");case p.WALLET:return C("checkout-page:wallet");default:return""}},b=null===(N=D.successTransaction)||void 0===N?void 0:N.paymentMethodDetail,F=null===(A=D.successTransaction)||void 0===A?void 0:A.paymentGatewayCode,w=e.useMemo((function(){var t,a,o,r,i,u,v;return e.createElement("div",{className:[s.InfoGrid].join(" ")},!D.isFree&&e.createElement("div",null,e.createElement("div",{className:s.InfoTitle},C("checkout-page:paymentMethod")),_&&e.createElement(e.Fragment,null,!!_.logoUrl&&e.createElement("div",{className:s.PaymentLogoContainer},e.createElement("img",{src:_.logoUrl})),!_.logoUrl&&e.createElement("div",{className:s.InfoText},_.paymentMethodType===p.CREDIT_CARD&&_.type===E.INTERNAL?C("checkout-page:creditCard"):_.name),"STRIPE"!==_.code&&"PAYPAL"!==_.code&&"KLARNA"!==_.code||!(null===(t=D.successTransaction)||void 0===t?void 0:t.paymentMethod)?!!_.description&&_.type!==E.EXTERNAL&&e.createElement("div",{className:s.InfoText},e.createElement("div",{dangerouslySetInnerHTML:{__html:_.description}})):e.createElement("div",{className:s.InfoText},P(D.successTransaction.paymentMethod))),"E_PAY_KOLAY"===F&&e.createElement(e.Fragment,null,e.createElement("div",{className:s.EPayKolayLogoContainer},e.createElement("img",{src:"https://cdn.myikas.com/sf/assets/payment/epaykolay.png"})),!!(null===(a=D.successTransaction)||void 0===a?void 0:a.paymentMethod)&&e.createElement("div",{className:s.InfoText},P(null===(o=D.successTransaction)||void 0===o?void 0:o.paymentMethod))),"E_PAY_KOLAY"!==F&&"STRIPE"!==F&&"PAYPAL"!==F&&"KLARNA"!==F&&"CREDIT_CARD"===(null===(r=D.successTransaction)||void 0===r?void 0:r.paymentMethod)&&e.createElement(e.Fragment,null,e.createElement("div",{className:s.InfoText},e.createElement("div",{className:s.CardLogoContainer},function(){var t,a;switch(null===(a=null===(t=D.successTransaction)||void 0===t?void 0:t.paymentMethodDetail)||void 0===a?void 0:a.cardAssociation){case g.AMERICAN_EXPRESS:return e.createElement(c,null);case g.MASTER_CARD:return e.createElement(n,null);case g.TROY:return e.createElement(d,null);case g.VISA:return e.createElement(l,null);default:return e.createElement("div",null)}}()),e.createElement("span",null,"**** ".concat((null==b?void 0:b.lastFourDigits)||""))),(null===(i=null==b?void 0:b.installment)||void 0===i?void 0:i.installmentCount)&&b.installment.installmentCount>1&&e.createElement(e.Fragment,null,e.createElement("div",{className:s.InfoText},"".concat(b.installment.installmentCount," ").concat(C("checkout-page:installments"))),null!==b.installment.installmentPrice&&e.createElement("div",{className:s.InfoText},"".concat(b.installment.installmentCount," x ").concat(m(b.installment.installmentPrice,D.checkout.currencyCode,D.checkout.currencySymbol)))))),e.createElement("div",null,e.createElement("div",{className:s.InfoTitle},C("checkout-page:billingAddress")),!!(null===(u=D.checkout.billingAddress)||void 0===u?void 0:u.company)&&e.createElement("div",{className:[s.InfoText,s.InfoTextBold].join(" ")},D.checkout.billingAddress.company),e.createElement("div",{className:s.InfoText},null===(v=D.checkout.billingAddress)||void 0===v?void 0:v.addressText)))}),[]),O=e.useMemo((function(){var t,a,o,r,i;return e.createElement("div",{className:[s.InfoGrid].join(" ")},e.createElement("div",null,e.createElement("div",{className:s.InfoTitle},C("checkout-page:contactInfo")),e.createElement("div",{className:s.InfoText},null===(t=D.checkout.customer)||void 0===t?void 0:t.email),e.createElement("div",{className:s.InfoText},R),!!(null===(a=D.checkout.shippingAddress)||void 0===a?void 0:a.phone)&&e.createElement("div",{className:s.InfoText},null===(o=D.checkout.shippingAddress)||void 0===o?void 0:o.phone)),e.createElement("div",null,"in-store"===D.deliveryMethod&&e.createElement(e.Fragment,null,e.createElement("div",{className:s.InfoTitle},C("checkout-page:receiver")),e.createElement("div",{className:[s.InfoText,s.withMBottom].join(" ")},S)),e.createElement("div",{className:s.InfoTitle},"address"===D.deliveryMethod?C("checkout-page:shippingAddress"):C("checkout-page:pickUpLocation")),!!(null===(r=D.checkout.shippingAddress)||void 0===r?void 0:r.company)&&e.createElement("div",{className:[s.InfoText,s.InfoTextBold].join(" ")},D.checkout.shippingAddress.company),e.createElement("div",{className:s.InfoText},null===(i=D.checkout.shippingAddress)||void 0===i?void 0:i.addressText)))}),[]);return e.createElement("div",{className:s.StepSuccess},e.createElement("div",{className:s.SuccessTitleContainer},e.createElement(r,{className:s.SuccessCircle}),e.createElement("span",{className:s.SuccessTitle},C("checkout-page:orderSuccessTitle"))),e.createElement("div",{className:s.SuccessSubTitle},C(D.isDigitalOnly?"checkout-page:orderSuccessDigitalOnlyDescription":"address"===D.deliveryMethod?"checkout-page:orderSuccessDescription":"checkout-page:orderSuccessInStoreDeliveryDescription",{customerName:R})),D.productFiles.length>0&&e.createElement(k,{vm:D}),e.createElement("div",{className:[s.InfoGrid,s.WithBorder].join(" ")},e.createElement("div",null,e.createElement("div",{className:s.InfoTitle},C("checkout-page:orderNoAndDate")),e.createElement("div",{className:[s.InfoText,s.InfoTextBold].join(" ")},"#"+(D.checkout.orderNumber||"")),e.createElement("div",{className:s.InfoText},D.checkout.dateStr),e.createElement(T,{vm:D})),e.createElement("div",null,e.createElement("div",{className:s.InfoTitle},C("checkout-page:contactInfo")),e.createElement("div",{className:s.InfoText},null===(L=D.checkout.customer)||void 0===L?void 0:L.email),e.createElement("div",{className:s.InfoText},R))),D.postCheckoutCampaignOffer&&e.createElement(f,{vm:D,campaignOffer:D.postCheckoutCampaignOffer}),D.hasQuickRegistration&&e.createElement(x,{vm:D}),e.createElement(i,{title:C("checkout-page:paymentSummary")},w),!D.isDigitalOnly&&e.createElement(i,{title:C("checkout-page:shippingSummary")},O),e.createElement("div",{className:s.Actions},e.createElement("div",{className:s.HelpText},e.createElement("span",null,C("checkout-page:helpCtaQuestion")),e.createElement("span",{className:s.Cta,onClick:function(){return D.setContactModalVisible(!0)}},C("checkout-page:helpCta"))),e.createElement(a,{text:C("checkout-page:actions.backToShopping"),onClick:D.onBackToShoppingClick,style:{flex:"0 0 auto"}})))})),T=t((function(t){var a,o=t.vm,r=u().t,i=s.Yellow;switch(o.checkout.orderPackageStatus){case v.FULFILLED:case v.PARTIALLY_FULFILLED:case v.DELIVERED:case v.PARTIALLY_DELIVERED:i=s.Green;break;case v.CANCELLED:case v.PARTIALLY_CANCELLED:case v.CANCEL_REJECTED:case v.CANCEL_REQUESTED:i=s.Red}return e.createElement("div",{className:[s.OrderStatus,i].join(" ")},o.checkout.orderPackageStatus?null===(a=[{types:[v.UNFULFILLED],text:r("checkout-page:orderPackageStatus.unfulfilled")},{types:[v.READY_FOR_SHIPMENT],text:r("checkout-page:orderPackageStatus.readyForShipment")},{types:[v.PARTIALLY_FULFILLED],text:r("checkout-page:orderPackageStatus.partiallyFulfilled")},{types:[v.FULFILLED],text:r("checkout-page:orderPackageStatus.fulfilled")},{types:[v.DELIVERED,v.PARTIALLY_DELIVERED],text:r("checkout-page:orderPackageStatus.delivered")},{types:[v.UNABLE_TO_DELIVER],text:r("checkout-page:orderPackageStatus.unableToDeliver")},{types:[v.CANCELLED,v.PARTIALLY_CANCELLED],text:r("checkout-page:orderPackageStatus.cancelled")},{types:[v.CANCEL_REJECTED],text:r("checkout-page:orderPackageStatus.cancelRejected")},{types:[v.REFUNDED,v.PARTIALLY_REFUNDED],text:r("checkout-page:orderPackageStatus.refunded")},{types:[v.REFUND_REQUEST_ACCEPTED],text:r("checkout-page:orderPackageStatus.refundRequestAccepted")},{types:[v.REFUND_REJECTED],text:r("checkout-page:orderPackageStatus.refundRejected")},{types:[v.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{j as StepSuccess};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ikas/storefront",
|
|
3
|
-
"version": "4.10.0-beta.
|
|
3
|
+
"version": "4.10.0-beta.43",
|
|
4
4
|
"description": "Storefront functionality for ikas storefront themes.",
|
|
5
5
|
"author": "ikas",
|
|
6
6
|
"license": "ISC",
|
|
@@ -17,11 +17,11 @@
|
|
|
17
17
|
"build": "rm -rf build && rollup -c"
|
|
18
18
|
},
|
|
19
19
|
"devDependencies": {
|
|
20
|
-
"@ikas/storefront-api": "^4.10.0-beta.
|
|
21
|
-
"@ikas/storefront-config": "^4.10.0-beta.
|
|
22
|
-
"@ikas/storefront-model-functions": "^4.10.0-beta.
|
|
23
|
-
"@ikas/storefront-models": "^4.10.0-beta.
|
|
24
|
-
"@ikas/storefront-providers": "^4.10.0-beta.
|
|
20
|
+
"@ikas/storefront-api": "^4.10.0-beta.43",
|
|
21
|
+
"@ikas/storefront-config": "^4.10.0-beta.43",
|
|
22
|
+
"@ikas/storefront-model-functions": "^4.10.0-beta.43",
|
|
23
|
+
"@ikas/storefront-models": "^4.10.0-beta.43",
|
|
24
|
+
"@ikas/storefront-providers": "^4.10.0-beta.43",
|
|
25
25
|
"@ikas/localized-address": "^1.0.0-beta.3",
|
|
26
26
|
"@adyen/adyen-web": "^5.28.2",
|
|
27
27
|
"@rollup/plugin-commonjs": "^22.0.0",
|
|
@@ -55,11 +55,11 @@
|
|
|
55
55
|
},
|
|
56
56
|
"peerDependencies": {
|
|
57
57
|
"@ikas/localized-address": "^1.0.0-beta.3",
|
|
58
|
-
"@ikas/storefront-api": "^4.10.0-beta.
|
|
59
|
-
"@ikas/storefront-config": "^4.10.0-beta.
|
|
60
|
-
"@ikas/storefront-model-functions": "^4.10.0-beta.
|
|
61
|
-
"@ikas/storefront-models": "^4.10.0-beta.
|
|
62
|
-
"@ikas/storefront-providers": "^4.10.0-beta.
|
|
58
|
+
"@ikas/storefront-api": "^4.10.0-beta.43",
|
|
59
|
+
"@ikas/storefront-config": "^4.10.0-beta.43",
|
|
60
|
+
"@ikas/storefront-model-functions": "^4.10.0-beta.43",
|
|
61
|
+
"@ikas/storefront-models": "^4.10.0-beta.43",
|
|
62
|
+
"@ikas/storefront-providers": "^4.10.0-beta.43",
|
|
63
63
|
"mobx": "^6.1.3",
|
|
64
64
|
"mobx-react-lite": "^3.1.5",
|
|
65
65
|
"next": "12.2.0",
|