@ikas/storefront 4.9.0-beta.6 → 4.9.0-beta.7
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";var k=t((function(t){var v,k,T,y,I,N,A,L=t.vm,C=u().t;e.useEffect((function(){if("undefined"!=typeof localStorage){var e=localStorage.getItem(o);e&&e===L.checkout.id&&(L.successTransaction&&h.purchase(L.checkout,L.successTransaction),localStorage.removeItem(o)),window&&window.handleKlarna&&window.handleKlarna(void 0)}}),[]);var R=((null===(v=L.checkout.customer)||void 0===v?void 0:v.firstName)||"")+" "+((null===(k=L.checkout.customer)||void 0===k?void 0:k.lastName)||""),D=((null===(T=L.checkout.shippingAddress)||void 0===T?void 0:T.firstName)||"")+" "+((null===(y=L.checkout.shippingAddress)||void 0===y?void 0:y.lastName)||""),S=L.paymentGateways.find((function(e){var t;return e.id===(null===(t=L.successTransaction)||void 0===t?void 0:t.paymentGatewayId)})),_=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""}},P=null===(I=L.successTransaction)||void 0===I?void 0:I.paymentMethodDetail,b=null===(N=L.successTransaction)||void 0===N?void 0:N.paymentGatewayCode,F=e.useMemo((function(){var t,a,o,r,i,u;return e.createElement("div",{className:[s.InfoGrid].join(" ")},!L.isFree&&e.createElement("div",null,e.createElement("div",{className:s.InfoTitle},C("checkout-page:paymentMethod")),S&&e.createElement(e.Fragment,null,!!S.logoUrl&&e.createElement("div",{className:s.PaymentLogoContainer},e.createElement("img",{src:S.logoUrl})),!S.logoUrl&&e.createElement("div",{className:s.InfoText},S.paymentMethodType===p.CREDIT_CARD&&S.type===E.INTERNAL?C("checkout-page:creditCard"):S.name),"STRIPE"===S.code||"PAYPAL"===S.code||"KLARNA"===S.code?e.createElement("div",{className:s.InfoText},_(S.paymentMethodType)):!!S.description&&S.type!==E.EXTERNAL&&e.createElement("div",{className:s.InfoText},e.createElement("div",{dangerouslySetInnerHTML:{__html:S.description}}))),"E_PAY_KOLAY"===b&&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===(t=L.successTransaction)||void 0===t?void 0:t.paymentMethod)&&e.createElement("div",{className:s.InfoText},_(null===(a=L.successTransaction)||void 0===a?void 0:a.paymentMethod))),"E_PAY_KOLAY"!==b&&"STRIPE"!==b&&"PAYPAL"!==b&&"KLARNA"!==b&&"CREDIT_CARD"===(null===(o=L.successTransaction)||void 0===o?void 0:o.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=L.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==P?void 0:P.lastFourDigits)||""))),(null===(r=null==P?void 0:P.installment)||void 0===r?void 0:r.installmentCount)&&P.installment.installmentCount>1&&e.createElement(e.Fragment,null,e.createElement("div",{className:s.InfoText},"".concat(P.installment.installmentCount," ").concat(C("checkout-page:installments"))),null!==P.installment.installmentPrice&&e.createElement("div",{className:s.InfoText},"".concat(P.installment.installmentCount," x ").concat(m(P.installment.installmentPrice,L.checkout.currencyCode,L.checkout.currencySymbol)))))),e.createElement("div",null,e.createElement("div",{className:s.InfoTitle},C("checkout-page:billingAddress")),!!(null===(i=L.checkout.billingAddress)||void 0===i?void 0:i.company)&&e.createElement("div",{className:[s.InfoText,s.InfoTextBold].join(" ")},L.checkout.billingAddress.company),e.createElement("div",{className:s.InfoText},null===(u=L.checkout.billingAddress)||void 0===u?void 0:u.addressText)))}),[]),w=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=L.checkout.customer)||void 0===t?void 0:t.email),e.createElement("div",{className:s.InfoText},R),!!(null===(a=L.checkout.shippingAddress)||void 0===a?void 0:a.phone)&&e.createElement("div",{className:s.InfoText},null===(o=L.checkout.shippingAddress)||void 0===o?void 0:o.phone)),e.createElement("div",null,"in-store"===L.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(" ")},D)),e.createElement("div",{className:s.InfoTitle},"address"===L.deliveryMethod?C("checkout-page:shippingAddress"):C("checkout-page:pickUpLocation")),!!(null===(r=L.checkout.shippingAddress)||void 0===r?void 0:r.company)&&e.createElement("div",{className:[s.InfoText,s.InfoTextBold].join(" ")},L.checkout.shippingAddress.company),e.createElement("div",{className:s.InfoText},null===(i=L.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("address"===L.deliveryMethod?"checkout-page:orderSuccessDescription":"checkout-page:orderSuccessInStoreDeliveryDescription",{customerName:R})),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(" ")},"#"+(L.checkout.orderNumber||"")),e.createElement("div",{className:s.InfoText},L.checkout.dateStr),e.createElement(j,{vm:L})),e.createElement("div",null,e.createElement("div",{className:s.InfoTitle},C("checkout-page:contactInfo")),e.createElement("div",{className:s.InfoText},null===(A=L.checkout.customer)||void 0===A?void 0:A.email),e.createElement("div",{className:s.InfoText},R))),L.postCheckoutCampaignOffer&&e.createElement(f,{vm:L,campaignOffer:L.postCheckoutCampaignOffer}),L.hasQuickRegistration&&e.createElement(x,{vm:L}),e.createElement(i,{title:C("checkout-page:paymentSummary")},F),!L.isDigitalOnly&&e.createElement(i,{title:C("checkout-page:shippingSummary")},w),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 L.setContactModalVisible(!0)}},C("checkout-page:helpCta"))),e.createElement(a,{text:C("checkout-page:actions.backToShopping"),onClick:L.onBackToShoppingClick,style:{flex:"0 0 auto"}})))})),j=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{k 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";var k=t((function(t){var v,k,T,y,I,N,A,L=t.vm,C=u().t;e.useEffect((function(){if("undefined"!=typeof localStorage){var e=localStorage.getItem(o);e&&e===L.checkout.id&&(L.successTransaction&&h.purchase(L.checkout,L.successTransaction),localStorage.removeItem(o)),window&&window.handleKlarna&&window.handleKlarna(void 0)}}),[]);var R=((null===(v=L.checkout.customer)||void 0===v?void 0:v.firstName)||"")+" "+((null===(k=L.checkout.customer)||void 0===k?void 0:k.lastName)||""),D=((null===(T=L.checkout.shippingAddress)||void 0===T?void 0:T.firstName)||"")+" "+((null===(y=L.checkout.shippingAddress)||void 0===y?void 0:y.lastName)||""),S=L.paymentGateways.find((function(e){var t;return e.id===(null===(t=L.successTransaction)||void 0===t?void 0:t.paymentGatewayId)})),_=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""}},P=null===(I=L.successTransaction)||void 0===I?void 0:I.paymentMethodDetail,b=null===(N=L.successTransaction)||void 0===N?void 0:N.paymentGatewayCode,F=e.useMemo((function(){var t,a,o,r,i,u,v;return e.createElement("div",{className:[s.InfoGrid].join(" ")},!L.isFree&&e.createElement("div",null,e.createElement("div",{className:s.InfoTitle},C("checkout-page:paymentMethod")),S&&e.createElement(e.Fragment,null,!!S.logoUrl&&e.createElement("div",{className:s.PaymentLogoContainer},e.createElement("img",{src:S.logoUrl})),!S.logoUrl&&e.createElement("div",{className:s.InfoText},S.paymentMethodType===p.CREDIT_CARD&&S.type===E.INTERNAL?C("checkout-page:creditCard"):S.name),"STRIPE"!==S.code&&"PAYPAL"!==S.code&&"KLARNA"!==S.code||!(null===(t=L.successTransaction)||void 0===t?void 0:t.paymentMethod)?!!S.description&&S.type!==E.EXTERNAL&&e.createElement("div",{className:s.InfoText},e.createElement("div",{dangerouslySetInnerHTML:{__html:S.description}})):e.createElement("div",{className:s.InfoText},_(L.successTransaction.paymentMethod))),"E_PAY_KOLAY"===b&&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=L.successTransaction)||void 0===a?void 0:a.paymentMethod)&&e.createElement("div",{className:s.InfoText},_(null===(o=L.successTransaction)||void 0===o?void 0:o.paymentMethod))),"E_PAY_KOLAY"!==b&&"STRIPE"!==b&&"PAYPAL"!==b&&"KLARNA"!==b&&"CREDIT_CARD"===(null===(r=L.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=L.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==P?void 0:P.lastFourDigits)||""))),(null===(i=null==P?void 0:P.installment)||void 0===i?void 0:i.installmentCount)&&P.installment.installmentCount>1&&e.createElement(e.Fragment,null,e.createElement("div",{className:s.InfoText},"".concat(P.installment.installmentCount," ").concat(C("checkout-page:installments"))),null!==P.installment.installmentPrice&&e.createElement("div",{className:s.InfoText},"".concat(P.installment.installmentCount," x ").concat(m(P.installment.installmentPrice,L.checkout.currencyCode,L.checkout.currencySymbol)))))),e.createElement("div",null,e.createElement("div",{className:s.InfoTitle},C("checkout-page:billingAddress")),!!(null===(u=L.checkout.billingAddress)||void 0===u?void 0:u.company)&&e.createElement("div",{className:[s.InfoText,s.InfoTextBold].join(" ")},L.checkout.billingAddress.company),e.createElement("div",{className:s.InfoText},null===(v=L.checkout.billingAddress)||void 0===v?void 0:v.addressText)))}),[]),w=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=L.checkout.customer)||void 0===t?void 0:t.email),e.createElement("div",{className:s.InfoText},R),!!(null===(a=L.checkout.shippingAddress)||void 0===a?void 0:a.phone)&&e.createElement("div",{className:s.InfoText},null===(o=L.checkout.shippingAddress)||void 0===o?void 0:o.phone)),e.createElement("div",null,"in-store"===L.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(" ")},D)),e.createElement("div",{className:s.InfoTitle},"address"===L.deliveryMethod?C("checkout-page:shippingAddress"):C("checkout-page:pickUpLocation")),!!(null===(r=L.checkout.shippingAddress)||void 0===r?void 0:r.company)&&e.createElement("div",{className:[s.InfoText,s.InfoTextBold].join(" ")},L.checkout.shippingAddress.company),e.createElement("div",{className:s.InfoText},null===(i=L.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("address"===L.deliveryMethod?"checkout-page:orderSuccessDescription":"checkout-page:orderSuccessInStoreDeliveryDescription",{customerName:R})),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(" ")},"#"+(L.checkout.orderNumber||"")),e.createElement("div",{className:s.InfoText},L.checkout.dateStr),e.createElement(j,{vm:L})),e.createElement("div",null,e.createElement("div",{className:s.InfoTitle},C("checkout-page:contactInfo")),e.createElement("div",{className:s.InfoText},null===(A=L.checkout.customer)||void 0===A?void 0:A.email),e.createElement("div",{className:s.InfoText},R))),L.postCheckoutCampaignOffer&&e.createElement(f,{vm:L,campaignOffer:L.postCheckoutCampaignOffer}),L.hasQuickRegistration&&e.createElement(x,{vm:L}),e.createElement(i,{title:C("checkout-page:paymentSummary")},F),!L.isDigitalOnly&&e.createElement(i,{title:C("checkout-page:shippingSummary")},w),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 L.setContactModalVisible(!0)}},C("checkout-page:helpCta"))),e.createElement(a,{text:C("checkout-page:actions.backToShopping"),onClick:L.onBackToShoppingClick,style:{flex:"0 0 auto"}})))})),j=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{k as StepSuccess};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ikas/storefront",
|
|
3
|
-
"version": "4.9.0-beta.
|
|
3
|
+
"version": "4.9.0-beta.7",
|
|
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.9.0-beta.
|
|
21
|
-
"@ikas/storefront-config": "^4.9.0-beta.
|
|
22
|
-
"@ikas/storefront-model-functions": "^4.9.0-beta.
|
|
23
|
-
"@ikas/storefront-models": "^4.9.0-beta.
|
|
24
|
-
"@ikas/storefront-providers": "^4.9.0-beta.
|
|
20
|
+
"@ikas/storefront-api": "^4.9.0-beta.7",
|
|
21
|
+
"@ikas/storefront-config": "^4.9.0-beta.7",
|
|
22
|
+
"@ikas/storefront-model-functions": "^4.9.0-beta.7",
|
|
23
|
+
"@ikas/storefront-models": "^4.9.0-beta.7",
|
|
24
|
+
"@ikas/storefront-providers": "^4.9.0-beta.7",
|
|
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.9.0-beta.
|
|
59
|
-
"@ikas/storefront-config": "^4.9.0-beta.
|
|
60
|
-
"@ikas/storefront-model-functions": "^4.9.0-beta.
|
|
61
|
-
"@ikas/storefront-models": "^4.9.0-beta.
|
|
62
|
-
"@ikas/storefront-providers": "^4.9.0-beta.
|
|
58
|
+
"@ikas/storefront-api": "^4.9.0-beta.7",
|
|
59
|
+
"@ikas/storefront-config": "^4.9.0-beta.7",
|
|
60
|
+
"@ikas/storefront-model-functions": "^4.9.0-beta.7",
|
|
61
|
+
"@ikas/storefront-models": "^4.9.0-beta.7",
|
|
62
|
+
"@ikas/storefront-providers": "^4.9.0-beta.7",
|
|
63
63
|
"mobx": "^6.1.3",
|
|
64
64
|
"mobx-react-lite": "^3.1.5",
|
|
65
65
|
"next": "12.2.0",
|