@ikas/storefront 4.9.0-beta.3 → 4.9.0-beta.5

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"../../../../../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 a,IkasPaymentGatewayTransactionFeeType as n,IkasPaymentGatewayAdditionalPriceType as o,IkasPaymentGatewayType as r}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{CreditCardForm as m}from"../../../components/credit-card-form/index.js";import{Installments as d}from"./installments/index.js";import i from"../../../components/select-box/index.js";import l from"./style.module.scss.js";import"@ikas/storefront-config";import{formatCurrency as s}from"../../../../../utils/currency.js";import{useTranslation as c}from"../../../../../utils/i18n.js";import p from"../../../components/svg/external.js";import y from"next/dynamic";import u from"../../../components/credit-card-form/model.js";import x from"../../../components/master-pass/credit-card-form/index.js";import{Klarna as v}from"../../../components/klarna/index.js";import{Adyen as f}from"../../../components/adyen/index.js";import{Toggle as g}from"../../../components/toggle/index.js";import j from"../../../components/select-box/style.module.scss.js";import E from"../../../components/master-pass/payment-gateway/svg/master-card.js";import P from"../../../components/master-pass/payment-gateway/svg/troy.js";import w from"../../../components/master-pass/payment-gateway/svg/visa.js";var C=y((function(){return import("../../../components/stripe/index.js").then((function(e){return e.default}))})),G=t((function(t){var y=t.vm,G=c().t,h=function(t){return e.createElement("div",{style:{display:"flex",justifyContent:"flex-end",alignItems:"center",flexWrap:"wrap"}},t.children)},k=function(t){return e.createElement("div",{className:l.AdditionalPrice},t.children)},I=function(e){return 0===e.amount?"":"".concat(e.amountType===n.AMOUNT?s(e.amount,y.checkout.currencyCode,y.checkout.currencySymbol):" %"+e.amount).concat(e.type===o.DECREMENT?" "+G("checkout-page:paymentMethodDiscount"):" "+G("checkout-page:paymentMethodAdditionalPrice"))},N=function(e){var t;return"STRIPE"===e.code&&(null===(t=e.settings)||void 0===t?void 0:t.find((function(e){return"allow_custom_flow"===e.label&&"1"===e.value})))};return e.createElement(e.Fragment,null,!!y.mpVM.cards.length&&y.mpVM.cards.map((function(t,n){var o,m=y.paymentGateways.find((function(e){return e.id===t.paymentGatewayId})),s=e.createElement("button",{className:l.MasterPassSelectBoxDeleteButton,onClick:function(e){e.stopPropagation(),y.mpVM.deleteCard({store:y.store,checkout:y.checkout,card:t})}},G("checkout-page:masterPass.paymentGatewaySelectBox.delete")),c=function(e){return t.Value1.startsWith(e)},p=c("4"),x=c("5")||c("6"),v=c("9"),f=e.createElement("div",{style:{display:"flex",alignItems:"center"}},e.createElement("span",{className:l.MasterPassSelectBoxLabelLogo},p&&e.createElement(w,null),x&&e.createElement(E,null),v&&e.createElement(P,null)),t.Name," ",t.Value1),g=(null==m?void 0:m.id)&&m.paymentMethodType===a.CREDIT_CARD&&m.type===r.INTERNAL?y.installmentInfo&&e.createElement(d,{vm:y}):void 0;return e.createElement(i,{key:n,isSelected:(null===(o=y.mpVM.selectedCard)||void 0===o?void 0:o.UniqueId)===t.UniqueId,label:f,rightContent:s,bottomContent:g,onClick:function(){var e;(null===(e=y.mpVM.selectedCard)||void 0===e?void 0:e.UniqueId)!==t.UniqueId&&(y.checkout.selectedPaymentGateway=null,y.cardData=new u,y.installmentInfo=void 0,y.mpVM.selectedCard=t,t.Value1&&t.paymentGatewayId&&y.checkout.totalFinalPrice&&y.retrieveInstallmentInfo({input:{binNumber:t.Value1.slice(0,6),paymentGatewayId:t.paymentGatewayId,price:y.checkout.totalFinalPrice}}))}})})),y.paymentGateways.filter((function(e){return"in-store"!==y.deliveryMethod&&!y.isDigitalOnly||e.paymentMethodType!==a.CASH_ON_DELIVERY&&e.paymentMethodType!==a.CREDIT_CARD_ON_DELIVERY})).map((function(t,n){var o;if(function(e){return"KLARNA"===e.code}(t)||function(e){return"ADYEN"===e.code}(t)||function(e){return"PAYPAL"===e.code}(t))return null;var s=t.paymentMethodType===a.CREDIT_CARD&&t.type===r.INTERNAL?e.createElement(e.Fragment,null,N(t)?e.createElement(C,{vm:y,pg:t}):e.createElement("div",null,e.createElement(m,{vm:y}),y.isPaymentGatewayHasMasterPass&&e.createElement(x,{vm:y}),y.installmentInfo&&e.createElement(d,{vm:y}))):t.description?e.createElement(e.Fragment,null,t.type===r.EXTERNAL&&e.createElement("div",{style:{height:"52px",display:"flex",justifyContent:"center",margin:"24px 0"}},e.createElement(p,null)),e.createElement("div",{dangerouslySetInnerHTML:{__html:t.description}})):void 0;return e.createElement(i,{key:t.id,label:t.paymentMethodType===a.CREDIT_CARD&&t.type===r.INTERNAL?N(t)?" ":G("checkout-page:creditCard"):t.name,isSelected:y.selectedPaymentGatewayIndex===n,rightContent:(null===(o=t.additionalPrices)||void 0===o?void 0:o.length)?e.createElement(k,null,I(t.additionalPrices[0])):e.createElement(h,null,!!t.logoUrl&&e.createElement("div",{className:l.PaymentLogoContainer},e.createElement("img",{src:t.logoUrl}))),bottomContent:s,onClick:function(){y.selectedPaymentGatewayIndex!==n&&(y.setPaymentGateway(n),y.mpVM.selectedCard=void 0)}})})),y.klarnaPaymentGateway&&function(){var t,a=y.selectedPaymentGatewayIndex===y.klarnaPaymentGatewayIndex;return y.klarnaPaymentGateway?e.createElement("div",{className:j.SelectBoxContainer},e.createElement("div",{className:"".concat(j.SelectBox," ").concat(a?j.Selected:""),onClick:function(){y.setPaymentGateway(y.klarnaPaymentGatewayIndex),y.mpVM.selectedCard=void 0}},e.createElement("div",{className:j.TopContent},e.createElement(g,{value:a,label:y.klarnaPaymentGateway.name,removePadding:!0}),e.createElement("div",{className:j.RightContent},(null===(t=y.klarnaPaymentGateway.additionalPrices)||void 0===t?void 0:t.length)?e.createElement(k,null,I(y.klarnaPaymentGateway.additionalPrices[0])):e.createElement(h,null,!!y.klarnaPaymentGateway.logoUrl&&e.createElement("div",{className:l.PaymentLogoContainer},e.createElement("img",{src:y.klarnaPaymentGateway.logoUrl}))))),e.createElement("div",{className:"".concat(a?j.BottomContent:""," ").concat(a?"":l.Hidden)},e.createElement(v,{vm:y})))):null}(),y.adyenPaymentGateway&&function(){var t,a=y.selectedPaymentGatewayIndex===y.adyenPaymentGatewayIndex;return y.adyenPaymentGateway?e.createElement("div",{className:j.SelectBoxContainer},e.createElement("div",{className:"".concat(j.SelectBox," ").concat(a?j.Selected:""),onClick:function(){y.setPaymentGateway(y.adyenPaymentGatewayIndex),y.mpVM.selectedCard=void 0}},e.createElement("div",{className:j.TopContent},e.createElement(g,{value:a,label:y.adyenPaymentGateway.name,removePadding:!0}),e.createElement("div",{className:j.RightContent},(null===(t=y.adyenPaymentGateway.additionalPrices)||void 0===t?void 0:t.length)?e.createElement(k,null,I(y.adyenPaymentGateway.additionalPrices[0])):e.createElement(h,null,!!y.adyenPaymentGateway.logoUrl&&e.createElement("div",{className:l.PaymentLogoContainer},e.createElement("img",{src:y.adyenPaymentGateway.logoUrl}))))),e.createElement("div",{className:"".concat(a?j.BottomContent:""," ").concat(a?"":l.Hidden)},e.createElement(f,{vm:y})))):null}(),y.payPalPaymentGateway&&function(){var t,a=y.selectedPaymentGatewayIndex===y.payPalPaymentGatewayIndex;return y.payPalPaymentGateway?e.createElement("div",{className:j.SelectBoxContainer},e.createElement("div",{className:"".concat(j.SelectBox," ").concat(a?j.Selected:""),onClick:function(){y.setPaymentGateway(y.payPalPaymentGatewayIndex),y.mpVM.selectedCard=void 0}},e.createElement("div",{className:j.TopContent},e.createElement(g,{value:a,label:y.payPalPaymentGateway.name,removePadding:!0}),e.createElement("div",{className:j.RightContent},(null===(t=y.payPalPaymentGateway.additionalPrices)||void 0===t?void 0:t.length)?e.createElement(k,null,I(y.payPalPaymentGateway.additionalPrices[0])):e.createElement(h,null,!!y.payPalPaymentGateway.logoUrl&&e.createElement("div",{className:l.PaymentLogoContainer},e.createElement("img",{src:y.payPalPaymentGateway.logoUrl}))))))):null}())}));export{G as PaymentGateways};
1
+ import*as e from"react";import{observer as t}from"mobx-react-lite";import"../../../../../models/data/blog/category/index.js";import"../../../../../models/data/blog/content/index.js";import"../../../../../models/data/blog/meta-data/index.js";import"../../../../../models/data/blog/tag/index.js";import"../../../../../models/data/blog/index.js";import"../../../../../models/data/brand/index.js";import{IkasPaymentMethodType as a,IkasPaymentGatewayType as n,IkasPaymentGatewayTransactionFeeType as o,IkasPaymentGatewayAdditionalPriceType as r}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{CreditCardForm as m}from"../../../components/credit-card-form/index.js";import{Installments as d}from"./installments/index.js";import i from"../../../components/select-box/index.js";import l from"./style.module.scss.js";import"@ikas/storefront-config";import{formatCurrency as s}from"../../../../../utils/currency.js";import{useTranslation as c}from"../../../../../utils/i18n.js";import p from"../../../components/svg/external.js";import y from"next/dynamic";import u from"../../../components/credit-card-form/model.js";import x from"../../../components/master-pass/credit-card-form/index.js";import{Klarna as v}from"../../../components/klarna/index.js";import{Adyen as f}from"../../../components/adyen/index.js";import{Toggle as g}from"../../../components/toggle/index.js";import j from"../../../components/select-box/style.module.scss.js";import E from"../../../components/master-pass/payment-gateway/svg/master-card.js";import P from"../../../components/master-pass/payment-gateway/svg/troy.js";import w from"../../../components/master-pass/payment-gateway/svg/visa.js";var C=y((function(){return import("../../../components/stripe/index.js").then((function(e){return e.default}))})),G=t((function(t){var y=t.vm,G=c().t,h=function(t){return e.createElement("div",{style:{display:"flex",justifyContent:"flex-end",alignItems:"center",flexWrap:"wrap"}},t.children)},k=function(t){return e.createElement("div",{className:l.AdditionalPrice},t.children)},I=function(e){return 0===e.amount?"":"".concat(e.amountType===o.AMOUNT?s(e.amount,y.checkout.currencyCode,y.checkout.currencySymbol):" %"+e.amount).concat(e.type===r.DECREMENT?" "+G("checkout-page:paymentMethodDiscount"):" "+G("checkout-page:paymentMethodAdditionalPrice"))},N=function(e){var t;return"STRIPE"===e.code&&(null===(t=e.settings)||void 0===t?void 0:t.find((function(e){return"allow_custom_flow"===e.label&&"1"===e.value})))},b=function(){var t,a=y.selectedPaymentGatewayIndex===y.klarnaPaymentGatewayIndex;return y.klarnaPaymentGateway?e.createElement("div",{className:j.SelectBoxContainer},e.createElement("div",{className:"".concat(j.SelectBox," ").concat(a?j.Selected:""),onClick:function(){y.setPaymentGateway(y.klarnaPaymentGatewayIndex),y.mpVM.selectedCard=void 0}},e.createElement("div",{className:j.TopContent},e.createElement(g,{value:a,label:y.klarnaPaymentGateway.name,removePadding:!0}),e.createElement("div",{className:j.RightContent},(null===(t=y.klarnaPaymentGateway.additionalPrices)||void 0===t?void 0:t.length)?e.createElement(k,null,I(y.klarnaPaymentGateway.additionalPrices[0])):e.createElement(h,null,!!y.klarnaPaymentGateway.logoUrl&&e.createElement("div",{className:l.PaymentLogoContainer},e.createElement("img",{src:y.klarnaPaymentGateway.logoUrl}))))),e.createElement("div",{className:"".concat(a?j.BottomContent:""," ").concat(a?"":l.Hidden)},e.createElement(v,{vm:y})))):null},M=function(){var t,a=y.selectedPaymentGatewayIndex===y.adyenPaymentGatewayIndex;return y.adyenPaymentGateway?e.createElement("div",{className:j.SelectBoxContainer},e.createElement("div",{className:"".concat(j.SelectBox," ").concat(a?j.Selected:""),onClick:function(){y.setPaymentGateway(y.adyenPaymentGatewayIndex),y.mpVM.selectedCard=void 0}},e.createElement("div",{className:j.TopContent},e.createElement(g,{value:a,label:y.adyenPaymentGateway.name,removePadding:!0}),e.createElement("div",{className:j.RightContent},(null===(t=y.adyenPaymentGateway.additionalPrices)||void 0===t?void 0:t.length)?e.createElement(k,null,I(y.adyenPaymentGateway.additionalPrices[0])):e.createElement(h,null,!!y.adyenPaymentGateway.logoUrl&&e.createElement("div",{className:l.PaymentLogoContainer},e.createElement("img",{src:y.adyenPaymentGateway.logoUrl}))))),e.createElement("div",{className:"".concat(a?j.BottomContent:""," ").concat(a?"":l.Hidden)},e.createElement(f,{vm:y})))):null},T=function(){var t,a=y.selectedPaymentGatewayIndex===y.payPalPaymentGatewayIndex;return y.payPalPaymentGateway?e.createElement("div",{className:j.SelectBoxContainer},e.createElement("div",{className:"".concat(j.SelectBox," ").concat(a?j.Selected:""),onClick:function(){y.setPaymentGateway(y.payPalPaymentGatewayIndex),y.mpVM.selectedCard=void 0}},e.createElement("div",{className:j.TopContent},e.createElement(g,{value:a,label:y.payPalPaymentGateway.name,removePadding:!0}),e.createElement("div",{className:j.RightContent},(null===(t=y.payPalPaymentGateway.additionalPrices)||void 0===t?void 0:t.length)?e.createElement(k,null,I(y.payPalPaymentGateway.additionalPrices[0])):e.createElement(h,null,!!y.payPalPaymentGateway.logoUrl&&e.createElement("div",{className:l.PaymentLogoContainer},e.createElement("img",{src:y.payPalPaymentGateway.logoUrl}))))))):null};return e.createElement(e.Fragment,null,!!y.mpVM.cards.length&&y.mpVM.cards.map((function(t,o){var r,m=y.paymentGateways.find((function(e){return e.id===t.paymentGatewayId})),s=e.createElement("button",{className:l.MasterPassSelectBoxDeleteButton,onClick:function(e){e.stopPropagation(),y.mpVM.deleteCard({store:y.store,checkout:y.checkout,card:t})}},G("checkout-page:masterPass.paymentGatewaySelectBox.delete")),c=function(e){return t.Value1.startsWith(e)},p=c("4"),x=c("5")||c("6"),v=c("9"),f=e.createElement("div",{style:{display:"flex",alignItems:"center"}},e.createElement("span",{className:l.MasterPassSelectBoxLabelLogo},p&&e.createElement(w,null),x&&e.createElement(E,null),v&&e.createElement(P,null)),t.Name," ",t.Value1),g=(null==m?void 0:m.id)&&m.paymentMethodType===a.CREDIT_CARD&&m.type===n.INTERNAL?y.installmentInfo&&e.createElement(d,{vm:y}):void 0;return e.createElement(i,{key:o,isSelected:(null===(r=y.mpVM.selectedCard)||void 0===r?void 0:r.UniqueId)===t.UniqueId,label:f,rightContent:s,bottomContent:g,onClick:function(){var e;(null===(e=y.mpVM.selectedCard)||void 0===e?void 0:e.UniqueId)!==t.UniqueId&&(y.checkout.selectedPaymentGateway=null,y.cardData=new u,y.installmentInfo=void 0,y.mpVM.selectedCard=t,t.Value1&&t.paymentGatewayId&&y.checkout.totalFinalPrice&&y.retrieveInstallmentInfo({input:{binNumber:t.Value1.slice(0,6),paymentGatewayId:t.paymentGatewayId,price:y.checkout.totalFinalPrice}}))}})})),y.paymentGateways.filter((function(e){return"in-store"!==y.deliveryMethod&&!y.isDigitalOnly||e.paymentMethodType!==a.CASH_ON_DELIVERY&&e.paymentMethodType!==a.CREDIT_CARD_ON_DELIVERY})).map((function(t,o){var r;if(function(e){return"KLARNA"===e.code}(t)&&y.klarnaPaymentGateway)return b();if(function(e){return"ADYEN"===e.code}(t)&&y.adyenPaymentGateway)return M();if(function(e){return"PAYPAL"===e.code}(t)&&y.payPalPaymentGateway)return T();var s=t.paymentMethodType===a.CREDIT_CARD&&t.type===n.INTERNAL?e.createElement(e.Fragment,null,N(t)?e.createElement(C,{vm:y,pg:t}):e.createElement("div",null,e.createElement(m,{vm:y}),y.isPaymentGatewayHasMasterPass&&e.createElement(x,{vm:y}),y.installmentInfo&&e.createElement(d,{vm:y}))):t.description?e.createElement(e.Fragment,null,t.type===n.EXTERNAL&&e.createElement("div",{style:{height:"52px",display:"flex",justifyContent:"center",margin:"24px 0"}},e.createElement(p,null)),e.createElement("div",{dangerouslySetInnerHTML:{__html:t.description}})):void 0;return e.createElement(i,{key:t.id,label:t.paymentMethodType===a.CREDIT_CARD&&t.type===n.INTERNAL?N(t)?" ":G("checkout-page:creditCard"):t.name,isSelected:y.selectedPaymentGatewayIndex===o,rightContent:(null===(r=t.additionalPrices)||void 0===r?void 0:r.length)?e.createElement(k,null,I(t.additionalPrices[0])):e.createElement(h,null,!!t.logoUrl&&e.createElement("div",{className:l.PaymentLogoContainer},e.createElement("img",{src:t.logoUrl}))),bottomContent:s,onClick:function(){y.selectedPaymentGatewayIndex!==o&&(y.setPaymentGateway(o),y.mpVM.selectedCard=void 0)}})})))}));export{G as PaymentGateways};
@@ -1 +1 @@
1
- import*as e from"react";import{observer as t}from"mobx-react-lite";import{Button as o}from"../../components/button/index.js";import{CART_LS_KEY as a}from"../../../../store/cart/index.js";import i from"./style.module.scss.js";import s from"../../components/svg/success-circle.js";import r from"../../components/expandable-section/index.js";import d from"../../components/credit-card-form/svg/amex.js";import n from"../../components/credit-card-form/svg/master-card.js";import c 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 v,IkasOrderPackageStatus as E,IkasTransactionCardAssociation as f}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 g 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";var h=t((function(t){var E,h,y,T,N,I,L=t.vm,A=u().t;e.useEffect((function(){if("undefined"!=typeof localStorage){var e=localStorage.getItem(a);e&&e===L.checkout.id&&(L.successTransaction&&x.purchase(L.checkout,L.successTransaction),localStorage.removeItem(a)),window&&window.handleKlarna&&window.handleKlarna(void 0)}}),[]);var C=((null===(E=L.checkout.customer)||void 0===E?void 0:E.firstName)||"")+" "+((null===(h=L.checkout.customer)||void 0===h?void 0:h.lastName)||""),D=((null===(y=L.checkout.shippingAddress)||void 0===y?void 0:y.firstName)||"")+" "+((null===(T=L.checkout.shippingAddress)||void 0===T?void 0:T.lastName)||""),S=L.paymentGateways.find((function(e){var t;return e.id===(null===(t=L.successTransaction)||void 0===t?void 0:t.paymentGatewayId)})),R=null===(N=L.successTransaction)||void 0===N?void 0:N.paymentMethodDetail,b=e.useMemo((function(){var t,o,a,s;return e.createElement("div",{className:[i.InfoGrid].join(" ")},!L.isFree&&e.createElement("div",null,e.createElement("div",{className:i.InfoTitle},A("checkout-page:paymentMethod")),S&&e.createElement(e.Fragment,null,!!S.logoUrl&&e.createElement("div",{className:i.PaymentLogoContainer},e.createElement("img",{src:S.logoUrl})),!S.logoUrl&&e.createElement("div",{className:i.InfoText},S.paymentMethodType===p.CREDIT_CARD&&S.type===v.INTERNAL?A("checkout-page:creditCard"):S.name),!!S.description&&S.type!==v.EXTERNAL&&e.createElement("div",{className:i.InfoText},e.createElement("div",{dangerouslySetInnerHTML:{__html:S.description}}))),"CREDIT_CARD"===(null===(t=L.successTransaction)||void 0===t?void 0:t.paymentMethod)&&e.createElement(e.Fragment,null,e.createElement("div",{className:i.InfoText},e.createElement("div",{className:i.CardLogoContainer},function(){var t,o;switch(null===(o=null===(t=L.successTransaction)||void 0===t?void 0:t.paymentMethodDetail)||void 0===o?void 0:o.cardAssociation){case f.AMERICAN_EXPRESS:return e.createElement(d,null);case f.MASTER_CARD:return e.createElement(n,null);case f.TROY:return e.createElement(c,null);case f.VISA:return e.createElement(l,null);default:return e.createElement("div",null)}}()),e.createElement("span",null,"**** ".concat((null==R?void 0:R.lastFourDigits)||""))),(null===(o=null==R?void 0:R.installment)||void 0===o?void 0:o.installmentCount)&&R.installment.installmentCount>1&&e.createElement(e.Fragment,null,e.createElement("div",{className:i.InfoText},"".concat(R.installment.installmentCount," ").concat(A("checkout-page:installments"))),null!==R.installment.installmentPrice&&e.createElement("div",{className:i.InfoText},"".concat(R.installment.installmentCount," x ").concat(m(R.installment.installmentPrice,L.checkout.currencyCode,L.checkout.currencySymbol)))))),e.createElement("div",null,e.createElement("div",{className:i.InfoTitle},A("checkout-page:billingAddress")),!!(null===(a=L.checkout.billingAddress)||void 0===a?void 0:a.company)&&e.createElement("div",{className:[i.InfoText,i.InfoTextBold].join(" ")},L.checkout.billingAddress.company),e.createElement("div",{className:i.InfoText},null===(s=L.checkout.billingAddress)||void 0===s?void 0:s.addressText)))}),[]),P=e.useMemo((function(){var t,o,a,s,r;return e.createElement("div",{className:[i.InfoGrid].join(" ")},e.createElement("div",null,e.createElement("div",{className:i.InfoTitle},A("checkout-page:contactInfo")),e.createElement("div",{className:i.InfoText},null===(t=L.checkout.customer)||void 0===t?void 0:t.email),e.createElement("div",{className:i.InfoText},C),!!(null===(o=L.checkout.shippingAddress)||void 0===o?void 0:o.phone)&&e.createElement("div",{className:i.InfoText},null===(a=L.checkout.shippingAddress)||void 0===a?void 0:a.phone)),e.createElement("div",null,"in-store"===L.deliveryMethod&&e.createElement(e.Fragment,null,e.createElement("div",{className:i.InfoTitle},A("checkout-page:receiver")),e.createElement("div",{className:[i.InfoText,i.withMBottom].join(" ")},D)),e.createElement("div",{className:i.InfoTitle},"address"===L.deliveryMethod?A("checkout-page:shippingAddress"):A("checkout-page:pickUpLocation")),!!(null===(s=L.checkout.shippingAddress)||void 0===s?void 0:s.company)&&e.createElement("div",{className:[i.InfoText,i.InfoTextBold].join(" ")},L.checkout.shippingAddress.company),e.createElement("div",{className:i.InfoText},null===(r=L.checkout.shippingAddress)||void 0===r?void 0:r.addressText)))}),[]);return e.createElement("div",{className:i.StepSuccess},e.createElement("div",{className:i.SuccessTitleContainer},e.createElement(s,{className:i.SuccessCircle}),e.createElement("span",{className:i.SuccessTitle},A("checkout-page:orderSuccessTitle"))),e.createElement("div",{className:i.SuccessSubTitle},A("address"===L.deliveryMethod?"checkout-page:orderSuccessDescription":"checkout-page:orderSuccessInStoreDeliveryDescription",{customerName:C})),e.createElement("div",{className:[i.InfoGrid,i.WithBorder].join(" ")},e.createElement("div",null,e.createElement("div",{className:i.InfoTitle},A("checkout-page:orderNoAndDate")),e.createElement("div",{className:[i.InfoText,i.InfoTextBold].join(" ")},"#"+(L.checkout.orderNumber||"")),e.createElement("div",{className:i.InfoText},L.checkout.dateStr),e.createElement(k,{vm:L})),e.createElement("div",null,e.createElement("div",{className:i.InfoTitle},A("checkout-page:contactInfo")),e.createElement("div",{className:i.InfoText},null===(I=L.checkout.customer)||void 0===I?void 0:I.email),e.createElement("div",{className:i.InfoText},C))),L.postCheckoutCampaignOffer&&e.createElement(g,{vm:L,campaignOffer:L.postCheckoutCampaignOffer}),L.hasQuickRegistration&&e.createElement(j,{vm:L}),e.createElement(r,{title:A("checkout-page:paymentSummary")},b),!L.isDigitalOnly&&e.createElement(r,{title:A("checkout-page:shippingSummary")},P),e.createElement("div",{className:i.Actions},e.createElement("div",{className:i.HelpText},e.createElement("span",null,A("checkout-page:helpCtaQuestion")),e.createElement("span",{className:i.Cta,onClick:function(){return L.setContactModalVisible(!0)}},A("checkout-page:helpCta"))),e.createElement(o,{text:A("checkout-page:actions.backToShopping"),onClick:L.onBackToShoppingClick,style:{flex:"0 0 auto"}})))})),k=t((function(t){var o,a=t.vm,s=u().t,r=i.Yellow;switch(a.checkout.orderPackageStatus){case E.FULFILLED:case E.PARTIALLY_FULFILLED:case E.DELIVERED:case E.PARTIALLY_DELIVERED:r=i.Green;break;case E.CANCELLED:case E.PARTIALLY_CANCELLED:case E.CANCEL_REJECTED:case E.CANCEL_REQUESTED:r=i.Red}return e.createElement("div",{className:[i.OrderStatus,r].join(" ")},a.checkout.orderPackageStatus?null===(o=[{types:[E.UNFULFILLED],text:s("checkout-page:orderPackageStatus.unfulfilled")},{types:[E.READY_FOR_SHIPMENT],text:s("checkout-page:orderPackageStatus.readyForShipment")},{types:[E.PARTIALLY_FULFILLED],text:s("checkout-page:orderPackageStatus.partiallyFulfilled")},{types:[E.FULFILLED],text:s("checkout-page:orderPackageStatus.fulfilled")},{types:[E.DELIVERED,E.PARTIALLY_DELIVERED],text:s("checkout-page:orderPackageStatus.delivered")},{types:[E.UNABLE_TO_DELIVER],text:s("checkout-page:orderPackageStatus.unableToDeliver")},{types:[E.CANCELLED,E.PARTIALLY_CANCELLED],text:s("checkout-page:orderPackageStatus.cancelled")},{types:[E.CANCEL_REJECTED],text:s("checkout-page:orderPackageStatus.cancelRejected")},{types:[E.REFUNDED,E.PARTIALLY_REFUNDED],text:s("checkout-page:orderPackageStatus.refunded")},{types:[E.REFUND_REQUEST_ACCEPTED],text:s("checkout-page:orderPackageStatus.refundRequestAccepted")},{types:[E.REFUND_REJECTED],text:s("checkout-page:orderPackageStatus.refundRejected")},{types:[E.REFUND_REQUESTED],text:s("checkout-page:orderPackageStatus.refundRequested")}].find((function(e){return e.types.includes(a.checkout.orderPackageStatus)})))||void 0===o?void 0:o.text:"")}));export{h 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;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 +1 @@
1
- import e from'./../../../../ext/style-inject/dist/style-inject.es.js';var t={StepSuccess:"style-module_StepSuccess__Z1fJf",SuccessTitleContainer:"style-module_SuccessTitleContainer__nuvae",SuccessCircle:"style-module_SuccessCircle__bU5W0",SuccessTitle:"style-module_SuccessTitle__5KjBJ",SuccessSubTitle:"style-module_SuccessSubTitle__ToDuD",InfoGrid:"style-module_InfoGrid__XrEQa",InfoTitle:"style-module_InfoTitle__AHygg",InfoText:"style-module_InfoText__4oiHL",InfoTextBold:"style-module_InfoTextBold__LVBB6",WithBorder:"style-module_WithBorder__JQ5Qf",CardLogoContainer:"style-module_CardLogoContainer__upSYf",PaymentLogoContainer:"style-module_PaymentLogoContainer__loO75",Actions:"style-module_Actions__RCwtF",HelpText:"style-module_HelpText__xrYQr",Cta:"style-module_Cta__rhsFl",OrderStatus:"style-module_OrderStatus__377-N",Yellow:"style-module_Yellow__gF1-u",Green:"style-module_Green__-80q-",Red:"style-module_Red__zXV4o",withMBottom:"style-module_withMBottom__8N71-"};e(".style-module_StepSuccess__Z1fJf {\n padding-top: 24px;\n}\n.style-module_StepSuccess__Z1fJf .style-module_SuccessTitleContainer__nuvae {\n margin-bottom: 24px;\n display: flex;\n align-items: center;\n}\n.style-module_StepSuccess__Z1fJf .style-module_SuccessTitleContainer__nuvae .style-module_SuccessCircle__bU5W0 {\n color: #2DCA73;\n}\n.style-module_StepSuccess__Z1fJf .style-module_SuccessTitleContainer__nuvae .style-module_SuccessTitle__5KjBJ {\n font-size: 28px;\n font-weight: 600;\n margin-left: 16px;\n}\n.style-module_StepSuccess__Z1fJf .style-module_SuccessSubTitle__ToDuD {\n margin: auto;\n margin-bottom: 32px;\n}\n.style-module_StepSuccess__Z1fJf .style-module_InfoGrid__XrEQa {\n display: grid;\n grid-template-columns: 1fr 1fr;\n grid-gap: 48px;\n}\n.style-module_StepSuccess__Z1fJf .style-module_InfoGrid__XrEQa .style-module_InfoTitle__AHygg {\n font-size: 16px;\n line-height: 24px;\n margin-bottom: 12px;\n}\n.style-module_StepSuccess__Z1fJf .style-module_InfoGrid__XrEQa .style-module_InfoText__4oiHL {\n font-size: 14px;\n color: var(--checkout-secondary-text-color);\n display: flex;\n align-items: center;\n}\n.style-module_StepSuccess__Z1fJf .style-module_InfoGrid__XrEQa .style-module_InfoTextBold__LVBB6 {\n font-weight: 600;\n color: var(--checkout-primary-text-color);\n}\n.style-module_StepSuccess__Z1fJf .style-module_InfoGrid__XrEQa.style-module_WithBorder__JQ5Qf {\n border-bottom: 1px solid var(--checkout-border-color);\n padding-bottom: 24px;\n}\n.style-module_StepSuccess__Z1fJf .style-module_InfoGrid__XrEQa .style-module_CardLogoContainer__upSYf {\n display: flex;\n align-items: center;\n margin-right: 4px;\n}\n.style-module_StepSuccess__Z1fJf .style-module_InfoGrid__XrEQa .style-module_PaymentLogoContainer__loO75 img {\n height: 20px;\n}\n.style-module_StepSuccess__Z1fJf .style-module_Actions__RCwtF {\n width: 100%;\n display: flex;\n justify-content: space-between;\n margin: auto;\n margin-top: 24px;\n}\n.style-module_StepSuccess__Z1fJf .style-module_Actions__RCwtF .style-module_HelpText__xrYQr {\n display: flex;\n align-items: center;\n color: var(--checkout-secondary-text-color);\n flex-wrap: wrap;\n}\n.style-module_StepSuccess__Z1fJf .style-module_Actions__RCwtF .style-module_HelpText__xrYQr .style-module_Cta__rhsFl {\n color: var(--checkout-primary-text-color);\n margin-left: 4px;\n}\n.style-module_StepSuccess__Z1fJf .style-module_Actions__RCwtF .style-module_HelpText__xrYQr .style-module_Cta__rhsFl:hover {\n cursor: pointer;\n text-decoration: underline;\n}\n@media only screen and (max-width: 400px) {\n .style-module_StepSuccess__Z1fJf .style-module_Actions__RCwtF {\n flex-direction: column;\n }\n .style-module_StepSuccess__Z1fJf .style-module_Actions__RCwtF .style-module_HelpText__xrYQr {\n margin-bottom: 12px;\n }\n .style-module_StepSuccess__Z1fJf .style-module_Actions__RCwtF .style-module_HelpText__xrYQr .style-module_Cta__rhsFl {\n margin-left: 0;\n }\n}\n.style-module_StepSuccess__Z1fJf .style-module_OrderStatus__377-N {\n padding: 4px 8px;\n border-radius: 6px;\n margin-top: 8px;\n font-size: 14px;\n font-weight: 500;\n display: inline-flex;\n}\n.style-module_StepSuccess__Z1fJf .style-module_OrderStatus__377-N.style-module_Yellow__gF1-u {\n color: var(--checkout-warning-color);\n background-color: var(--checkout-warning-light-color);\n border: 1px solid var(--checkout-warning-color);\n}\n.style-module_StepSuccess__Z1fJf .style-module_OrderStatus__377-N.style-module_Green__-80q- {\n color: var(--checkout-success-color);\n background-color: var(--checkout-success-light-color);\n border: 1px solid var(--checkout-success-color);\n}\n.style-module_StepSuccess__Z1fJf .style-module_OrderStatus__377-N.style-module_Red__zXV4o {\n color: var(--checkout-error-color);\n background-color: var(--checkout-error-light-color);\n border: 1px solid var(--checkout-error-color);\n}\n@media only screen and (max-width: 1000px) {\n .style-module_StepSuccess__Z1fJf {\n padding-left: 24px;\n padding-right: 24px;\n }\n .style-module_StepSuccess__Z1fJf .style-module_SuccessTitleContainer__nuvae {\n margin-bottom: 12px;\n }\n .style-module_StepSuccess__Z1fJf .style-module_SuccessTitleContainer__nuvae .style-module_SuccessTitle__5KjBJ {\n font-size: 20px;\n }\n .style-module_StepSuccess__Z1fJf .style-module_SuccessSubTitle__ToDuD {\n max-width: 400px;\n margin-left: 56px;\n }\n}\n@media only screen and (max-width: 400px) {\n .style-module_StepSuccess__Z1fJf .style-module_InfoGrid__XrEQa {\n grid-template-columns: 1fr;\n grid-gap: 24px;\n }\n .style-module_StepSuccess__Z1fJf .style-module_SuccessSubTitle__ToDuD {\n margin-left: 0;\n }\n}\n\n.style-module_withMBottom__8N71- {\n margin-bottom: 12px;\n}");export{t as default};
1
+ import e from'./../../../../ext/style-inject/dist/style-inject.es.js';var t={StepSuccess:"style-module_StepSuccess__Z1fJf",SuccessTitleContainer:"style-module_SuccessTitleContainer__nuvae",SuccessCircle:"style-module_SuccessCircle__bU5W0",SuccessTitle:"style-module_SuccessTitle__5KjBJ",SuccessSubTitle:"style-module_SuccessSubTitle__ToDuD",InfoGrid:"style-module_InfoGrid__XrEQa",InfoTitle:"style-module_InfoTitle__AHygg",InfoText:"style-module_InfoText__4oiHL",InfoTextBold:"style-module_InfoTextBold__LVBB6",WithBorder:"style-module_WithBorder__JQ5Qf",CardLogoContainer:"style-module_CardLogoContainer__upSYf",PaymentLogoContainer:"style-module_PaymentLogoContainer__loO75",EPayKolayLogoContainer:"style-module_EPayKolayLogoContainer__3tYQj",Actions:"style-module_Actions__RCwtF",HelpText:"style-module_HelpText__xrYQr",Cta:"style-module_Cta__rhsFl",OrderStatus:"style-module_OrderStatus__377-N",Yellow:"style-module_Yellow__gF1-u",Green:"style-module_Green__-80q-",Red:"style-module_Red__zXV4o",withMBottom:"style-module_withMBottom__8N71-"};e(".style-module_StepSuccess__Z1fJf {\n padding-top: 24px;\n}\n.style-module_StepSuccess__Z1fJf .style-module_SuccessTitleContainer__nuvae {\n margin-bottom: 24px;\n display: flex;\n align-items: center;\n}\n.style-module_StepSuccess__Z1fJf .style-module_SuccessTitleContainer__nuvae .style-module_SuccessCircle__bU5W0 {\n color: #2DCA73;\n}\n.style-module_StepSuccess__Z1fJf .style-module_SuccessTitleContainer__nuvae .style-module_SuccessTitle__5KjBJ {\n font-size: 28px;\n font-weight: 600;\n margin-left: 16px;\n}\n.style-module_StepSuccess__Z1fJf .style-module_SuccessSubTitle__ToDuD {\n margin: auto;\n margin-bottom: 32px;\n}\n.style-module_StepSuccess__Z1fJf .style-module_InfoGrid__XrEQa {\n display: grid;\n grid-template-columns: 1fr 1fr;\n grid-gap: 48px;\n}\n.style-module_StepSuccess__Z1fJf .style-module_InfoGrid__XrEQa .style-module_InfoTitle__AHygg {\n font-size: 16px;\n line-height: 24px;\n margin-bottom: 12px;\n}\n.style-module_StepSuccess__Z1fJf .style-module_InfoGrid__XrEQa .style-module_InfoText__4oiHL {\n font-size: 14px;\n color: var(--checkout-secondary-text-color);\n display: flex;\n align-items: center;\n}\n.style-module_StepSuccess__Z1fJf .style-module_InfoGrid__XrEQa .style-module_InfoTextBold__LVBB6 {\n font-weight: 600;\n color: var(--checkout-primary-text-color);\n}\n.style-module_StepSuccess__Z1fJf .style-module_InfoGrid__XrEQa.style-module_WithBorder__JQ5Qf {\n border-bottom: 1px solid var(--checkout-border-color);\n padding-bottom: 24px;\n}\n.style-module_StepSuccess__Z1fJf .style-module_InfoGrid__XrEQa .style-module_CardLogoContainer__upSYf {\n display: flex;\n align-items: center;\n margin-right: 4px;\n}\n.style-module_StepSuccess__Z1fJf .style-module_InfoGrid__XrEQa .style-module_PaymentLogoContainer__loO75 img {\n height: 20px;\n}\n.style-module_StepSuccess__Z1fJf .style-module_InfoGrid__XrEQa .style-module_EPayKolayLogoContainer__3tYQj img {\n height: 36px;\n}\n.style-module_StepSuccess__Z1fJf .style-module_Actions__RCwtF {\n width: 100%;\n display: flex;\n justify-content: space-between;\n margin: auto;\n margin-top: 24px;\n}\n.style-module_StepSuccess__Z1fJf .style-module_Actions__RCwtF .style-module_HelpText__xrYQr {\n display: flex;\n align-items: center;\n color: var(--checkout-secondary-text-color);\n flex-wrap: wrap;\n}\n.style-module_StepSuccess__Z1fJf .style-module_Actions__RCwtF .style-module_HelpText__xrYQr .style-module_Cta__rhsFl {\n color: var(--checkout-primary-text-color);\n margin-left: 4px;\n}\n.style-module_StepSuccess__Z1fJf .style-module_Actions__RCwtF .style-module_HelpText__xrYQr .style-module_Cta__rhsFl:hover {\n cursor: pointer;\n text-decoration: underline;\n}\n@media only screen and (max-width: 400px) {\n .style-module_StepSuccess__Z1fJf .style-module_Actions__RCwtF {\n flex-direction: column;\n }\n .style-module_StepSuccess__Z1fJf .style-module_Actions__RCwtF .style-module_HelpText__xrYQr {\n margin-bottom: 12px;\n }\n .style-module_StepSuccess__Z1fJf .style-module_Actions__RCwtF .style-module_HelpText__xrYQr .style-module_Cta__rhsFl {\n margin-left: 0;\n }\n}\n.style-module_StepSuccess__Z1fJf .style-module_OrderStatus__377-N {\n padding: 4px 8px;\n border-radius: 6px;\n margin-top: 8px;\n font-size: 14px;\n font-weight: 500;\n display: inline-flex;\n}\n.style-module_StepSuccess__Z1fJf .style-module_OrderStatus__377-N.style-module_Yellow__gF1-u {\n color: var(--checkout-warning-color);\n background-color: var(--checkout-warning-light-color);\n border: 1px solid var(--checkout-warning-color);\n}\n.style-module_StepSuccess__Z1fJf .style-module_OrderStatus__377-N.style-module_Green__-80q- {\n color: var(--checkout-success-color);\n background-color: var(--checkout-success-light-color);\n border: 1px solid var(--checkout-success-color);\n}\n.style-module_StepSuccess__Z1fJf .style-module_OrderStatus__377-N.style-module_Red__zXV4o {\n color: var(--checkout-error-color);\n background-color: var(--checkout-error-light-color);\n border: 1px solid var(--checkout-error-color);\n}\n@media only screen and (max-width: 1000px) {\n .style-module_StepSuccess__Z1fJf {\n padding-left: 24px;\n padding-right: 24px;\n }\n .style-module_StepSuccess__Z1fJf .style-module_SuccessTitleContainer__nuvae {\n margin-bottom: 12px;\n }\n .style-module_StepSuccess__Z1fJf .style-module_SuccessTitleContainer__nuvae .style-module_SuccessTitle__5KjBJ {\n font-size: 20px;\n }\n .style-module_StepSuccess__Z1fJf .style-module_SuccessSubTitle__ToDuD {\n max-width: 400px;\n margin-left: 56px;\n }\n}\n@media only screen and (max-width: 400px) {\n .style-module_StepSuccess__Z1fJf .style-module_InfoGrid__XrEQa {\n grid-template-columns: 1fr;\n grid-gap: 24px;\n }\n .style-module_StepSuccess__Z1fJf .style-module_SuccessSubTitle__ToDuD {\n margin-left: 0;\n }\n}\n\n.style-module_withMBottom__8N71- {\n margin-bottom: 12px;\n}");export{t as default};
@@ -11,6 +11,7 @@ export declare class IkasOrderTransaction implements IOrderTransaction {
11
11
  error: IkasTransactionError | null;
12
12
  id: string | null;
13
13
  orderId: string | null;
14
+ paymentGatewayCode: string | null;
14
15
  paymentGatewayId: string | null;
15
16
  paymentGatewayName: string | null;
16
17
  paymentMethod: IkasPaymentMethodType | null;
@@ -1 +1 @@
1
- export{IkasTransactionStatus,IkasTransactionType}from"@ikas/storefront-models";import{makeAutoObservable as t}from"mobx";import{formatCurrency as e}from"../../../../utils/currency.js";import{IkasTransactionError as r}from"./error/index.js";var o=function(){function o(e){this.amount=e.amount||null,this.checkoutId=e.checkoutId||null,this.createdAt=e.createdAt||null,this.currencyCode=e.currencyCode||null,this.currencySymbol=e.currencySymbol||null,this.customerId=e.customerId||null,this.error=e.error?new r(e.error):null,this.id=e.id,this.orderId=e.orderId,this.paymentGatewayId=e.paymentGatewayId,this.paymentGatewayName=e.paymentGatewayName,this.paymentMethod=e.paymentMethod,this.paymentMethodDetail=e.paymentMethodDetail,this.processedAt=e.processedAt,this.refundReason=e.refundReason,this.status=e.status,this.type=e.type,this.updatedAt=e.updatedAt,t(this)}return Object.defineProperty(o.prototype,"formattedAmount",{get:function(){return e(this.amount||0,this.currencyCode||"",this.currencySymbol||"")},enumerable:!1,configurable:!0}),o}();export{o as IkasOrderTransaction};
1
+ export{IkasTransactionStatus,IkasTransactionType}from"@ikas/storefront-models";import{makeAutoObservable as t}from"mobx";import{formatCurrency as e}from"../../../../utils/currency.js";import{IkasTransactionError as r}from"./error/index.js";var o=function(){function o(e){this.amount=e.amount||null,this.checkoutId=e.checkoutId||null,this.createdAt=e.createdAt||null,this.currencyCode=e.currencyCode||null,this.currencySymbol=e.currencySymbol||null,this.customerId=e.customerId||null,this.error=e.error?new r(e.error):null,this.id=e.id,this.orderId=e.orderId,this.paymentGatewayCode=e.paymentGatewayCode,this.paymentGatewayId=e.paymentGatewayId,this.paymentGatewayName=e.paymentGatewayName,this.paymentMethod=e.paymentMethod,this.paymentMethodDetail=e.paymentMethodDetail,this.processedAt=e.processedAt,this.refundReason=e.refundReason,this.status=e.status,this.type=e.type,this.updatedAt=e.updatedAt,t(this)}return Object.defineProperty(o.prototype,"formattedAmount",{get:function(){return e(this.amount||0,this.currencyCode||"",this.currencySymbol||"")},enumerable:!1,configurable:!0}),o}();export{o as IkasOrderTransaction};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ikas/storefront",
3
- "version": "4.9.0-beta.3",
3
+ "version": "4.9.0-beta.5",
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.3",
21
- "@ikas/storefront-config": "^4.9.0-beta.3",
22
- "@ikas/storefront-model-functions": "^4.9.0-beta.3",
23
- "@ikas/storefront-models": "^4.9.0-beta.3",
24
- "@ikas/storefront-providers": "^4.9.0-beta.3",
20
+ "@ikas/storefront-api": "^4.9.0-beta.5",
21
+ "@ikas/storefront-config": "^4.9.0-beta.5",
22
+ "@ikas/storefront-model-functions": "^4.9.0-beta.5",
23
+ "@ikas/storefront-models": "^4.9.0-beta.5",
24
+ "@ikas/storefront-providers": "^4.9.0-beta.5",
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.3",
59
- "@ikas/storefront-config": "^4.9.0-beta.3",
60
- "@ikas/storefront-model-functions": "^4.9.0-beta.3",
61
- "@ikas/storefront-models": "^4.9.0-beta.3",
62
- "@ikas/storefront-providers": "^4.9.0-beta.3",
58
+ "@ikas/storefront-api": "^4.9.0-beta.5",
59
+ "@ikas/storefront-config": "^4.9.0-beta.5",
60
+ "@ikas/storefront-model-functions": "^4.9.0-beta.5",
61
+ "@ikas/storefront-models": "^4.9.0-beta.5",
62
+ "@ikas/storefront-providers": "^4.9.0-beta.5",
63
63
  "mobx": "^6.1.3",
64
64
  "mobx-react-lite": "^3.1.5",
65
65
  "next": "12.2.0",