@ikas/storefront 4.15.99 → 4.16.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/analytics/facebookPixel.js +1 -1
- package/build/components/checkout/components/cart-summary/index.js +1 -1
- package/build/components/checkout/components/cart-summary/style.module.scss.js +1 -1
- package/build/components/checkout/components/checkout-load-failed/index.d.ts +14 -0
- package/build/components/checkout/components/checkout-load-failed/index.js +1 -0
- package/build/components/checkout/components/checkout-load-failed/style.module.scss.js +1 -0
- package/build/components/checkout/components/form-item/index.js +1 -1
- package/build/components/checkout/components/svg/refresh.d.ts +6 -0
- package/build/components/checkout/components/svg/refresh.js +1 -0
- package/build/components/checkout/components/tkpay/index.js +1 -1
- package/build/components/checkout/index.js +1 -1
- package/build/components/checkout/model.d.ts +64 -1
- package/build/components/checkout/model.js +1 -1
- package/build/components/checkout/steps/step-info/index.js +1 -1
- package/build/components/checkout/steps/step-info/style.module.scss.js +1 -0
- package/build/components/checkout/steps/step-payment/index.js +1 -1
- package/build/components/checkout/steps/step-payment/payment-gateways/index.js +1 -1
- package/build/components/checkout/steps/step-payment/payment-gateways/miles-smiles/index.d.ts +7 -0
- package/build/components/checkout/steps/step-payment/payment-gateways/miles-smiles/index.js +1 -1
- package/build/components/checkout/steps/step-payment/payment-gateways/miles-smiles/login-required.d.ts +6 -0
- package/build/components/checkout/steps/step-payment/payment-gateways/miles-smiles/login-required.js +1 -1
- package/build/components/checkout/steps/step-payment/payment-gateways/miles-smiles/style.module.scss.js +1 -1
- package/build/components/checkout/steps/step-success/index.js +1 -1
- package/build/components/page/widgets/loyaltyWidget.js +1 -1
- package/build/index.js +1 -1
- package/build/models/data/index.d.ts +5 -0
- package/build/models/data/order/index.d.ts +16 -2
- package/build/models/data/order/index.js +1 -1
- package/build/models/data/order/line-item/index.d.ts +5 -1
- package/build/models/data/order/line-item/index.js +1 -1
- package/build/models/data/order/refund/reason/index.d.ts +8 -0
- package/build/models/data/order/refund/reason/index.js +1 -0
- package/build/models/data/order/refund/reason/translation/index.d.ts +6 -0
- package/build/models/data/order/refund/reason/translation/index.js +1 -0
- package/build/models/data/order/refund/refundable-line/index.d.ts +10 -0
- package/build/models/data/order/refund/refundable-line/index.js +1 -0
- package/build/models/data/order/refund/refundable-lines/index.d.ts +10 -0
- package/build/models/data/order/refund/refundable-lines/index.js +1 -0
- package/build/models/data/order/refund/settings/translation/index.d.ts +6 -0
- package/build/models/data/order/refund/settings/translation/index.js +1 -0
- package/build/models/data/payment-gateway/index.d.ts +1 -2
- package/build/models/data/payment-gateway/index.js +1 -1
- package/build/pages/checkout.js +1 -1
- package/build/store/customer/api.d.ts +14 -11
- package/build/store/customer/api.js +1 -1
- package/build/store/customer/index.d.ts +39 -3
- package/build/store/customer/index.js +1 -1
- package/build/store/index.d.ts +1 -0
- package/build/utils/miles-smiles.d.ts +19 -0
- package/build/utils/miles-smiles.js +1 -0
- package/package.json +12 -12
|
@@ -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 i}from"@ikas/storefront-models";import"mobx";import"../../../../../models/data/campaign-offer/index.js";import"../../../../../models/data/cart/campaign-offer/index.js";import"../../../../../models/data/cart/index.js";import"../../../../../models/data/category/path-item/index.js";import"../../../../../models/data/category/index.js";import"../../../../../models/data/checkout/index.js";import"../../../../../models/data/checkout-settings/index.js";import"../../../../../models/data/city/index.js";import"../../../../../models/data/country/index.js";import"../../../../../models/data/customer/address/region/index.js";import"../../../../../models/data/customer/address/index.js";import"../../../../../models/data/customer/address/ikas-localized-customer-address.js";import"../../../../../models/data/customer/attribute/index.js";import"../../../../../models/data/customer/review/summary/index.js";import"../../../../../models/data/customer/review/index.js";import"../../../../../models/data/customer/index.js";import"../../../../../models/data/customer-form-data-input/index.js";import"../../../../../models/data/district/index.js";import"../../../../../models/data/favorite-product/index.js";import"../../../../../models/data/filter-category/index.js";import"../../../../../models/data/html-meta-data/index.js";import"../../../../../models/data/image/index.js";import"../../../../../models/data/order/address/region/index.js";import"../../../../../models/data/order/address/index.js";import"../../../../../models/data/order/line-item/option/value/index.js";import"../../../../../models/data/order/line-item/variant/value/index.js";import"../../../../../models/data/order/line-item/variant/index.js";import"../../../../../models/data/order/line-item/index.js";import"../../../../../models/data/order/order-transaction-with-prices/index.js";import"../../../../../models/data/order/package/index.js";import"../../../../../models/data/order/transaction/index.js";import"../../../../../models/data/order/index.js";import"../../../../../models/data/payment-gateway/index.js";import"../../../../../models/data/product/attribute-value/index.js";import"../../../../../models/data/product/filter/index.js";import"../../../../../models/data/product/campaign-offer/index.js";import"../../../../../models/data/product/option-set/option/index.js";import"../../../../../models/data/product/option-set/index.js";import"../../../../../models/data/product/stock-location/index.js";import"../../../../../models/data/product/variant/price/index.js";import"../../../../../models/data/product/variant/index.js";import"../../../../../models/data/variant-type/index.js";import"../../../../../models/data/product/index.js";import"../../../../../models/data/raffle/index.js";import"../../../../../models/data/shipping-zone/state/city/district/region/index.js";import"../../../../../models/data/state/index.js";import"../../../../../models/data/storefront-popup/storefront-popup-display-settings/index.js";import"../../../../../models/data/storefront-popup/storefront-popup-page-filter/index.js";import"../../../../../models/data/storefront-popup/index.js";import"../../../../../models/data/theme-json/index.js";import"../../../../../models/data/theme-json/component/index.js";import"../../../../../models/data/theme-json/custom-data/index.js";import"../../../../../models/data/variant-type/variant-value/index.js";import"@ikas/localized-address";import{CreditCardForm as r}from"../../../components/credit-card-form/index.js";import{Installments as c}from"./installments/index.js";import l from"../../../components/select-box/index.js";import m from"./style.module.scss.js";import{IkasStorefrontConfig as s}from"@ikas/storefront-config";import{formatCurrency as d}from"../../../../../utils/currency.js";import{createTranslationInputData as y,useTranslation as p}from"../../../../../utils/i18n.js";import u from"../../../components/svg/external.js";import v from"next/dynamic";import P from"../../../components/credit-card-form/model.js";import E from"../../../components/master-pass/credit-card-form/index.js";import{Toggle as f}from"../../../components/toggle/index.js";import g from"../../../components/select-box/style.module.scss.js";import x from"../../../components/master-pass/payment-gateway/svg/master-card.js";import C from"../../../components/master-pass/payment-gateway/svg/troy.js";import k from"../../../components/master-pass/payment-gateway/svg/visa.js";import{Checkbox as h}from"../../../components/checkbox/index.js";import j from"../../../components/svg/info.js";import{RewardSourceEnum as w}from"@ikas/storefront-api";var G=v((function(){return import("../../../components/stripe/index.js").then((function(e){return e.default}))})),T=v((function(){return import("../../../components/adyen/index.js").then((function(e){return e.Adyen}))})),N=v((function(){return import("../../../components/klarna/index.js").then((function(e){return e.Klarna}))})),I=v((function(){return import("../../../components/hepsipay/index.js").then((function(e){return e.HepsiPay}))})),S=v((function(){return import("../../../components/iyzico/index.js").then((function(e){return e.Iyzico}))})),b=v((function(){return import("../../../components/tkpay/index.js").then((function(e){return e.TkPay}))})),M=t((function(v){var M=v.vm,A=p().t,R=function(t){return e.createElement("div",{style:{display:"flex",justifyContent:"flex-end",alignItems:"center",flexWrap:"wrap"}},t.children)},B=function(t){return e.createElement("div",{className:m.AdditionalPrice},t.children)},V=function(e){return 0===e.amount?"":"".concat(e.amountType===n.AMOUNT?d(e.amount,M.checkout.currencyCode,M.checkout.currencySymbol):" %"+e.amount).concat(e.type===o.DECREMENT?" "+A("checkout-page:paymentMethodDiscount"):" "+A("checkout-page:paymentMethodAdditionalPrice"))},L=function(e){return"STRIPE"===e.code||"STRIPE_EU"===e.code},z=function(){var t,a=M.selectedPaymentGatewayIndex===M.klarnaPaymentGatewayIndex;return M.klarnaPaymentGateway?e.createElement("div",{className:g.SelectBoxContainer},e.createElement("div",{className:"".concat(g.SelectBox," ").concat(a?g.Selected:""),onClick:function(){M.setPaymentGateway(M.klarnaPaymentGatewayIndex),M.mpVM.selectedCard=void 0}},e.createElement("div",{className:g.TopContent},e.createElement(f,{value:a,label:M.klarnaPaymentGateway.name,removePadding:!0}),e.createElement("div",{className:g.RightContent},(null===(t=M.klarnaPaymentGateway.additionalPrices)||void 0===t?void 0:t.length)?e.createElement(B,null,V(M.klarnaPaymentGateway.additionalPrices[0])):e.createElement(R,null,!!M.klarnaPaymentGateway.logoUrl&&e.createElement("div",{className:m.PaymentLogoContainer},e.createElement("img",{src:M.klarnaPaymentGateway.logoUrl}))))),e.createElement("div",{className:"".concat(a?g.BottomContent:""," ").concat(a?"":m.Hidden)},e.createElement(N,{vm:M}),M.klarnaError&&e.createElement("div",{className:m.ErrorMessage},M.klarnaError.data)))):null},D=function(){var t,a=M.selectedPaymentGatewayIndex===M.hepsiPayPaymentGatewayIndex;return M.hepsiPayPaymentGateway?e.createElement("div",{className:g.SelectBoxContainer},e.createElement("div",{className:"".concat(g.SelectBox," ").concat(a?g.Selected:""),onClick:function(){M.setPaymentGateway(M.hepsiPayPaymentGatewayIndex),M.mpVM.selectedCard=void 0}},e.createElement("div",{className:g.TopContent},e.createElement(f,{value:a,label:"Kredi / Banka Kartı - Hepsipay",removePadding:!0}),e.createElement("div",{className:g.RightContent},(null===(t=M.hepsiPayPaymentGateway.additionalPrices)||void 0===t?void 0:t.length)?e.createElement(B,null,V(M.hepsiPayPaymentGateway.additionalPrices[0])):e.createElement(R,null,!!M.hepsiPayPaymentGateway.logoUrl&&e.createElement("div",{className:m.PaymentLogoContainer},e.createElement("img",{src:M.hepsiPayPaymentGateway.logoUrl}))))),e.createElement("div",{className:"".concat(a?g.BottomContent:""," ").concat(a?"":m.Hidden)},e.createElement(I,{vm:M})))):null},U=function(){var t=M.selectedPaymentGatewayIndex===M.adyenPaymentGatewayIndex;return M.adyenPaymentGateway?e.createElement("div",{className:g.SelectBoxContainer},e.createElement("div",{className:"".concat(g.SelectBox," ").concat(g.AdyenSelectBox),onClick:function(){M.setPaymentGateway(M.adyenPaymentGatewayIndex),M.mpVM.selectedCard=void 0}},e.createElement("div",{className:g.TopContent}),e.createElement("div",{className:"".concat(t?g.BottomContent:""," "),style:{paddingTop:0}},e.createElement(T,{vm:M,isSelected:t})))):null},_=function(){var t,a=M.selectedPaymentGatewayIndex===M.payPalPaymentGatewayIndex;return M.payPalPaymentGateway?e.createElement("div",{className:g.SelectBoxContainer},e.createElement("div",{className:"".concat(g.SelectBox," ").concat(a?g.Selected:""),onClick:function(){M.setPaymentGateway(M.payPalPaymentGatewayIndex),M.mpVM.selectedCard=void 0}},e.createElement("div",{className:g.TopContent},e.createElement(f,{value:a,label:M.payPalPaymentGateway.name,removePadding:!0}),e.createElement("div",{className:g.RightContent},(null===(t=M.payPalPaymentGateway.additionalPrices)||void 0===t?void 0:t.length)?e.createElement(B,null,V(M.payPalPaymentGateway.additionalPrices[0])):e.createElement(R,null,!!M.payPalPaymentGateway.logoUrl&&e.createElement("div",{className:m.PaymentLogoContainer},e.createElement("img",{src:M.payPalPaymentGateway.logoUrl}))))))):null},O=t((function(t){var a,n=t.vm;e.useEffect((function(){n.isTermsAndConditionsChecked&&n.setShowIyzicoContainer(!0)}),[n.isTermsAndConditionsChecked]);var o=e.useCallback((function(e){e.stopPropagation(),n.policyModalTitle=A("checkout-page:privacyPolicy"),n.policyModalText=n.privacyPolicy}),[n,n.privacyPolicy]),i=e.useCallback((function(e){e.stopPropagation(),n.policyModalTitle=A("checkout-page:termsOfService"),n.policyModalText=n.termsOfService}),[n,n.termsOfService]),r=s.getTranslations()["checkout-page"],c=y(r.ackPoliciesSentence).map((function(t){return t.isVariable?e.createElement("span",{className:[m.TermsLabelSpan,n.isErrorsVisible&&!n.isTermsAndConditionsChecked?m.Error:""].join(" "),onClick:"{{ ackPrivacyPolicy }}"===t.value?o:i},"{{ ackPrivacyPolicy }}"===t.value?A("checkout-page:ackPrivacyPolicy"):A("checkout-page:ackTermsOfService")):t.value})),l=n.selectedPaymentGatewayIndex===n.iyzicoPaymentGatewayIndex;return n.iyzicoPaymentGateway?e.createElement("div",{className:g.SelectBoxContainer},e.createElement("div",{className:"".concat(g.SelectBox," ").concat(l?g.Selected:""," ").concat(m.IyzicoBottomContent),onClick:function(){n.setPaymentGateway(n.iyzicoPaymentGatewayIndex),n.mpVM.selectedCard=void 0}},e.createElement("div",{className:g.TopContent},e.createElement(f,{value:l,label:A("checkout-page:creditCard"),removePadding:!0}),e.createElement("div",{className:g.RightContent},(null===(a=n.iyzicoPaymentGateway.additionalPrices)||void 0===a?void 0:a.length)?e.createElement(B,null,V(n.iyzicoPaymentGateway.additionalPrices[0])):e.createElement(R,null,!!n.iyzicoPaymentGateway.logoUrl&&e.createElement("div",{className:m.PaymentLogoContainer},e.createElement("img",{src:n.iyzicoPaymentGateway.logoUrl}))))),e.createElement("div",{className:"".concat(l?g.BottomContent:""," ").concat(l?"":m.Hidden," ")},e.createElement("div",{className:m.IyzicoCheckboxContainer},e.createElement(h,{value:n.isTermsAndConditionsChecked,hasError:n.isErrorsVisible&&!n.isTermsAndConditionsChecked,label:e.createElement(e.Fragment,null,c),removePadding:!0,onChange:n.onTermsAndConditionsCheckedChange})),!n.isTermsAndConditionsChecked&&e.createElement("div",{className:[m.IyzicoDescription,n.iyzicoResponse?m.WithBottomMargin:""].join(" ")},e.createElement(j,null),A("checkout-page:iyzicoDescription")),n.iyzicoResponse&&e.createElement(S,{vm:n})))):null})),H=t((function(t){var a,n=t.vm;e.useEffect((function(){n.isTermsAndConditionsChecked&&n.setShowTkPayContainer(!0)}),[n.isTermsAndConditionsChecked]);var o=e.useCallback((function(e){e.stopPropagation(),n.policyModalTitle=A("checkout-page:privacyPolicy"),n.policyModalText=n.privacyPolicy}),[n,n.privacyPolicy]),i=e.useCallback((function(e){e.stopPropagation(),n.policyModalTitle=A("checkout-page:termsOfService"),n.policyModalText=n.termsOfService}),[n,n.termsOfService]),r=s.getTranslations()["checkout-page"],c=y(r.ackPoliciesSentence).map((function(t){return t.isVariable?e.createElement("span",{className:[m.TermsLabelSpan,n.isErrorsVisible&&!n.isTermsAndConditionsChecked?m.Error:""].join(" "),onClick:"{{ ackPrivacyPolicy }}"===t.value?o:i},"{{ ackPrivacyPolicy }}"===t.value?A("checkout-page:ackPrivacyPolicy"):A("checkout-page:ackTermsOfService")):t.value})),l=n.selectedPaymentGatewayIndex===n.tkPayPaymentGatewayIndex;return n.tkPayPaymentGateway?e.createElement("div",{className:g.SelectBoxContainer},e.createElement("div",{className:"".concat(g.SelectBox," ").concat(l?g.Selected:""," ").concat(m.TkPayBottomContent),onClick:function(){n.setPaymentGateway(n.tkPayPaymentGatewayIndex),n.mpVM.selectedCard=void 0}},e.createElement("div",{className:g.TopContent},e.createElement(f,{value:l,label:n.tkPayPaymentGateway.name,removePadding:!0}),e.createElement("div",{className:g.RightContent},(null===(a=n.tkPayPaymentGateway.additionalPrices)||void 0===a?void 0:a.length)?e.createElement(B,null,V(n.tkPayPaymentGateway.additionalPrices[0])):e.createElement(R,null,!!n.tkPayPaymentGateway.logoUrl&&e.createElement("div",{className:m.PaymentLogoContainer},e.createElement("img",{src:n.tkPayPaymentGateway.logoUrl}))))),e.createElement("div",{className:"".concat(l?g.BottomContent:""," ").concat(l?"":m.Hidden," ")},e.createElement("div",{className:m.TkPayCheckboxContainer},e.createElement(h,{value:n.isTermsAndConditionsChecked,hasError:n.isErrorsVisible&&!n.isTermsAndConditionsChecked,label:e.createElement(e.Fragment,null,c),removePadding:!0,onChange:n.onTermsAndConditionsCheckedChange})),!n.isTermsAndConditionsChecked&&e.createElement("div",{className:[m.TkPayDescription,n.tkPayResponse?m.WithBottomMargin:""].join(" ")},e.createElement(j,null),A("checkout-page:tkPayDescription")),n.tkPayResponse&&e.createElement(b,{vm:n})))):null}));return e.createElement(e.Fragment,null,!!M.mpVM.cards.length&&M.mpVM.cards.map((function(t,n){var o,r=M.paymentGateways.find((function(e){return e.id===t.paymentGatewayId})),s=e.createElement("button",{className:m.MasterPassSelectBoxDeleteButton,onClick:function(e){e.stopPropagation(),M.mpVM.deleteCard({store:M.store,checkout:M.checkout,card:t})}},A("checkout-page:masterPass.paymentGatewaySelectBox.delete")),d=function(e){return t.Value1.startsWith(e)},y=d("4"),p=d("5")||d("6"),u=d("9"),v=e.createElement("div",{style:{display:"flex",alignItems:"center"}},e.createElement("span",{className:m.MasterPassSelectBoxLabelLogo},y&&e.createElement(k,null),p&&e.createElement(x,null),u&&e.createElement(C,null)),t.Name," ",t.Value1),E=(null==r?void 0:r.id)&&r.paymentMethodType===a.CREDIT_CARD&&r.type===i.INTERNAL?M.installmentInfo&&e.createElement(c,{vm:M}):void 0;return e.createElement(l,{key:n,isSelected:(null===(o=M.mpVM.selectedCard)||void 0===o?void 0:o.UniqueId)===t.UniqueId,label:v,rightContent:s,bottomContent:E,onClick:function(){var e;(null===(e=M.mpVM.selectedCard)||void 0===e?void 0:e.UniqueId)!==t.UniqueId&&(M.checkout.selectedPaymentGateway=null,M.cardData=new P,M.installmentInfo=void 0,M.mpVM.selectedCard=t,t.Value1&&t.paymentGatewayId&&M.checkout.totalFinalPrice&&M.retrieveInstallmentInfo({input:{orderId:M.checkout.id,binNumber:t.Value1.slice(0,8),paymentGatewayId:t.paymentGatewayId,price:M.checkout.totalFinalPrice,currencyCode:M.checkout.currencyCode}}))}})})),M.paymentGateways.filter((function(e){return"in-store"!==M.deliveryMethod&&!M.isDigitalOnly||e.paymentMethodType!==a.CASH_ON_DELIVERY&&e.paymentMethodType!==a.CREDIT_CARD_ON_DELIVERY})).map((function(t,n){var o,s;if(M.useMilesSmiles&&!(null===(o=t.enabledRewardSources)||void 0===o?void 0:o.includes(w.MILES_SMILES)))return null;if(function(e){return"KLARNA"===e.code}(t)&&M.klarnaPaymentGateway)return z();if(function(e){return"ADYEN_PLATFORM"===e.code}(t)&&M.adyenPaymentGateway)return U();if(function(e){return"PAYPAL"===e.code}(t)&&M.payPalPaymentGateway)return _();if(function(e){return"HEPSIPAY"===e.code}(t)&&M.hepsiPayPaymentGateway)return D();if(function(e){return"IYZICO"===e.code}(t)&&M.iyzicoPaymentGateway)return e.createElement(O,{vm:M,key:t.id});if(function(e){var t,a;return"TK_PAY"===e.code&&"true"===(null===(a=null===(t=e.settings)||void 0===t?void 0:t.find((function(e){return"tkpay_use_checkout_form"===e.label})))||void 0===a?void 0:a.value)}(t)&&M.tkPayPaymentGateway)return e.createElement(H,{vm:M,key:t.id});var d=t.paymentMethodType===a.CREDIT_CARD&&t.type===i.INTERNAL?e.createElement(e.Fragment,null,L(t)?e.createElement(e.Fragment,null,e.createElement(G,{vm:M,pg:t}),M.stripeError&&e.createElement("div",{className:m.ErrorMessage},M.stripeError.data)):e.createElement("div",null,e.createElement(r,{vm:M}),M.isPaymentGatewayHasMasterPass&&e.createElement(E,{vm:M}),M.installmentInfo&&e.createElement(c,{vm:M}))):t.description?e.createElement(e.Fragment,null,t.type===i.EXTERNAL&&e.createElement("div",{style:{height:"52px",display:"flex",justifyContent:"center",margin:"24px 0"}},e.createElement(u,null)),e.createElement("div",{dangerouslySetInnerHTML:{__html:t.description}})):void 0;return e.createElement(l,{key:t.id,label:t.paymentMethodType===a.CREDIT_CARD&&t.type===i.INTERNAL?L(t)?t.name:A("checkout-page:creditCard"):t.name,isSelected:M.selectedPaymentGatewayIndex===n,rightContent:(null===(s=t.additionalPrices)||void 0===s?void 0:s.length)?e.createElement(B,null,V(t.additionalPrices[0])):e.createElement(R,null,!!t.logoUrl&&e.createElement("div",{className:m.PaymentLogoContainer},e.createElement("img",{src:t.logoUrl}))),bottomContent:d,onClick:function(){M.selectedPaymentGatewayIndex!==n&&(M.setPaymentGateway(n),M.mpVM.selectedCard=void 0)}})})))}));export{M 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,IkasPaymentGatewayTransactionFeeType as n,IkasPaymentGatewayAdditionalPriceType as o,IkasPaymentGatewayType as i}from"@ikas/storefront-models";import"mobx";import"../../../../../models/data/campaign-offer/index.js";import"../../../../../models/data/cart/campaign-offer/index.js";import"../../../../../models/data/cart/index.js";import"../../../../../models/data/category/path-item/index.js";import"../../../../../models/data/category/index.js";import"../../../../../models/data/checkout/index.js";import"../../../../../models/data/checkout-settings/index.js";import"../../../../../models/data/city/index.js";import"../../../../../models/data/country/index.js";import"../../../../../models/data/customer/address/region/index.js";import"../../../../../models/data/customer/address/index.js";import"../../../../../models/data/customer/address/ikas-localized-customer-address.js";import"../../../../../models/data/customer/attribute/index.js";import"../../../../../models/data/customer/review/summary/index.js";import"../../../../../models/data/customer/review/index.js";import"../../../../../models/data/customer/index.js";import"../../../../../models/data/customer-form-data-input/index.js";import"../../../../../models/data/district/index.js";import"../../../../../models/data/favorite-product/index.js";import"../../../../../models/data/filter-category/index.js";import"../../../../../models/data/html-meta-data/index.js";import"../../../../../models/data/image/index.js";import"../../../../../models/data/order/address/region/index.js";import"../../../../../models/data/order/address/index.js";import"../../../../../models/data/order/line-item/option/value/index.js";import"../../../../../models/data/order/line-item/variant/value/index.js";import"../../../../../models/data/order/line-item/variant/index.js";import"../../../../../models/data/order/line-item/index.js";import"../../../../../models/data/order/order-transaction-with-prices/index.js";import"../../../../../models/data/order/package/index.js";import"../../../../../models/data/order/transaction/index.js";import"../../../../../models/data/order/index.js";import"../../../../../models/data/payment-gateway/index.js";import"../../../../../models/data/product/attribute-value/index.js";import"../../../../../models/data/product/filter/index.js";import"../../../../../models/data/product/campaign-offer/index.js";import"../../../../../models/data/product/option-set/option/index.js";import"../../../../../models/data/product/option-set/index.js";import"../../../../../models/data/product/stock-location/index.js";import"../../../../../models/data/product/variant/price/index.js";import"../../../../../models/data/product/variant/index.js";import"../../../../../models/data/variant-type/index.js";import"../../../../../models/data/product/index.js";import"../../../../../models/data/raffle/index.js";import"../../../../../models/data/shipping-zone/state/city/district/region/index.js";import"../../../../../models/data/state/index.js";import"../../../../../models/data/storefront-popup/storefront-popup-display-settings/index.js";import"../../../../../models/data/storefront-popup/storefront-popup-page-filter/index.js";import"../../../../../models/data/storefront-popup/index.js";import"../../../../../models/data/theme-json/index.js";import"../../../../../models/data/theme-json/component/index.js";import"../../../../../models/data/theme-json/custom-data/index.js";import"../../../../../models/data/variant-type/variant-value/index.js";import"@ikas/localized-address";import{CreditCardForm as r}from"../../../components/credit-card-form/index.js";import{Installments as c}from"./installments/index.js";import l from"../../../components/select-box/index.js";import m from"./style.module.scss.js";import{IkasStorefrontConfig as s}from"@ikas/storefront-config";import{formatCurrency as d}from"../../../../../utils/currency.js";import{createTranslationInputData as y,useTranslation as p}from"../../../../../utils/i18n.js";import u from"../../../components/svg/external.js";import v from"next/dynamic";import P from"../../../components/credit-card-form/model.js";import E from"../../../components/master-pass/credit-card-form/index.js";import{Toggle as f}from"../../../components/toggle/index.js";import g from"../../../components/select-box/style.module.scss.js";import x from"../../../components/master-pass/payment-gateway/svg/master-card.js";import C from"../../../components/master-pass/payment-gateway/svg/troy.js";import k from"../../../components/master-pass/payment-gateway/svg/visa.js";import{Checkbox as h}from"../../../components/checkbox/index.js";import j from"../../../components/svg/info.js";var w=v((function(){return import("../../../components/stripe/index.js").then((function(e){return e.default}))})),G=v((function(){return import("../../../components/adyen/index.js").then((function(e){return e.Adyen}))})),T=v((function(){return import("../../../components/klarna/index.js").then((function(e){return e.Klarna}))})),N=v((function(){return import("../../../components/hepsipay/index.js").then((function(e){return e.HepsiPay}))})),I=v((function(){return import("../../../components/iyzico/index.js").then((function(e){return e.Iyzico}))})),S=v((function(){return import("../../../components/tkpay/index.js").then((function(e){return e.TkPay}))})),b=t((function(v){var b=v.vm,M=p().t,A=function(t){return e.createElement("div",{style:{display:"flex",justifyContent:"flex-end",alignItems:"center",flexWrap:"wrap"}},t.children)},R=function(t){return e.createElement("div",{className:m.AdditionalPrice},t.children)},B=function(e){return 0===e.amount?"":"".concat(e.amountType===n.AMOUNT?d(e.amount,b.checkout.currencyCode,b.checkout.currencySymbol):" %"+e.amount).concat(e.type===o.DECREMENT?" "+M("checkout-page:paymentMethodDiscount"):" "+M("checkout-page:paymentMethodAdditionalPrice"))},V=function(e){return"STRIPE"===e.code||"STRIPE_EU"===e.code},z=function(){var t,a=b.selectedPaymentGatewayIndex===b.klarnaPaymentGatewayIndex;return b.klarnaPaymentGateway?e.createElement("div",{className:g.SelectBoxContainer},e.createElement("div",{className:"".concat(g.SelectBox," ").concat(a?g.Selected:""),onClick:function(){b.setPaymentGateway(b.klarnaPaymentGatewayIndex),b.mpVM.selectedCard=void 0}},e.createElement("div",{className:g.TopContent},e.createElement(f,{value:a,label:b.klarnaPaymentGateway.name,removePadding:!0}),e.createElement("div",{className:g.RightContent},(null===(t=b.klarnaPaymentGateway.additionalPrices)||void 0===t?void 0:t.length)?e.createElement(R,null,B(b.klarnaPaymentGateway.additionalPrices[0])):e.createElement(A,null,!!b.klarnaPaymentGateway.logoUrl&&e.createElement("div",{className:m.PaymentLogoContainer},e.createElement("img",{src:b.klarnaPaymentGateway.logoUrl}))))),e.createElement("div",{className:"".concat(a?g.BottomContent:""," ").concat(a?"":m.Hidden)},e.createElement(T,{vm:b}),b.klarnaError&&e.createElement("div",{className:m.ErrorMessage},b.klarnaError.data)))):null},D=function(){var t,a=b.selectedPaymentGatewayIndex===b.hepsiPayPaymentGatewayIndex;return b.hepsiPayPaymentGateway?e.createElement("div",{className:g.SelectBoxContainer},e.createElement("div",{className:"".concat(g.SelectBox," ").concat(a?g.Selected:""),onClick:function(){b.setPaymentGateway(b.hepsiPayPaymentGatewayIndex),b.mpVM.selectedCard=void 0}},e.createElement("div",{className:g.TopContent},e.createElement(f,{value:a,label:"Kredi / Banka Kartı - Hepsipay",removePadding:!0}),e.createElement("div",{className:g.RightContent},(null===(t=b.hepsiPayPaymentGateway.additionalPrices)||void 0===t?void 0:t.length)?e.createElement(R,null,B(b.hepsiPayPaymentGateway.additionalPrices[0])):e.createElement(A,null,!!b.hepsiPayPaymentGateway.logoUrl&&e.createElement("div",{className:m.PaymentLogoContainer},e.createElement("img",{src:b.hepsiPayPaymentGateway.logoUrl}))))),e.createElement("div",{className:"".concat(a?g.BottomContent:""," ").concat(a?"":m.Hidden)},e.createElement(N,{vm:b})))):null},L=function(){var t=b.selectedPaymentGatewayIndex===b.adyenPaymentGatewayIndex;return b.adyenPaymentGateway?e.createElement("div",{className:g.SelectBoxContainer},e.createElement("div",{className:"".concat(g.SelectBox," ").concat(g.AdyenSelectBox),onClick:function(){b.setPaymentGateway(b.adyenPaymentGatewayIndex),b.mpVM.selectedCard=void 0}},e.createElement("div",{className:g.TopContent}),e.createElement("div",{className:"".concat(t?g.BottomContent:""," "),style:{paddingTop:0}},e.createElement(G,{vm:b,isSelected:t})))):null},U=function(){var t,a=b.selectedPaymentGatewayIndex===b.payPalPaymentGatewayIndex;return b.payPalPaymentGateway?e.createElement("div",{className:g.SelectBoxContainer},e.createElement("div",{className:"".concat(g.SelectBox," ").concat(a?g.Selected:""),onClick:function(){b.setPaymentGateway(b.payPalPaymentGatewayIndex),b.mpVM.selectedCard=void 0}},e.createElement("div",{className:g.TopContent},e.createElement(f,{value:a,label:b.payPalPaymentGateway.name,removePadding:!0}),e.createElement("div",{className:g.RightContent},(null===(t=b.payPalPaymentGateway.additionalPrices)||void 0===t?void 0:t.length)?e.createElement(R,null,B(b.payPalPaymentGateway.additionalPrices[0])):e.createElement(A,null,!!b.payPalPaymentGateway.logoUrl&&e.createElement("div",{className:m.PaymentLogoContainer},e.createElement("img",{src:b.payPalPaymentGateway.logoUrl}))))))):null},_=t((function(t){var a,n=t.vm;e.useEffect((function(){n.isTermsAndConditionsChecked&&n.setShowIyzicoContainer(!0)}),[n.isTermsAndConditionsChecked]);var o=e.useCallback((function(e){e.stopPropagation(),n.policyModalTitle=M("checkout-page:privacyPolicy"),n.policyModalText=n.privacyPolicy}),[n,n.privacyPolicy]),i=e.useCallback((function(e){e.stopPropagation(),n.policyModalTitle=M("checkout-page:termsOfService"),n.policyModalText=n.termsOfService}),[n,n.termsOfService]),r=s.getTranslations()["checkout-page"],c=y(r.ackPoliciesSentence).map((function(t){return t.isVariable?e.createElement("span",{className:[m.TermsLabelSpan,n.isErrorsVisible&&!n.isTermsAndConditionsChecked?m.Error:""].join(" "),onClick:"{{ ackPrivacyPolicy }}"===t.value?o:i},"{{ ackPrivacyPolicy }}"===t.value?M("checkout-page:ackPrivacyPolicy"):M("checkout-page:ackTermsOfService")):t.value})),l=n.selectedPaymentGatewayIndex===n.iyzicoPaymentGatewayIndex;return n.iyzicoPaymentGateway?e.createElement("div",{className:g.SelectBoxContainer},e.createElement("div",{className:"".concat(g.SelectBox," ").concat(l?g.Selected:""," ").concat(m.IyzicoBottomContent),onClick:function(){n.setPaymentGateway(n.iyzicoPaymentGatewayIndex),n.mpVM.selectedCard=void 0}},e.createElement("div",{className:g.TopContent},e.createElement(f,{value:l,label:M("checkout-page:creditCard"),removePadding:!0}),e.createElement("div",{className:g.RightContent},(null===(a=n.iyzicoPaymentGateway.additionalPrices)||void 0===a?void 0:a.length)?e.createElement(R,null,B(n.iyzicoPaymentGateway.additionalPrices[0])):e.createElement(A,null,!!n.iyzicoPaymentGateway.logoUrl&&e.createElement("div",{className:m.PaymentLogoContainer},e.createElement("img",{src:n.iyzicoPaymentGateway.logoUrl}))))),e.createElement("div",{className:"".concat(l?g.BottomContent:""," ").concat(l?"":m.Hidden," ")},e.createElement("div",{className:m.IyzicoCheckboxContainer},e.createElement(h,{value:n.isTermsAndConditionsChecked,hasError:n.isErrorsVisible&&!n.isTermsAndConditionsChecked,label:e.createElement(e.Fragment,null,c),removePadding:!0,onChange:n.onTermsAndConditionsCheckedChange})),!n.isTermsAndConditionsChecked&&e.createElement("div",{className:[m.IyzicoDescription,n.iyzicoResponse?m.WithBottomMargin:""].join(" ")},e.createElement(j,null),M("checkout-page:iyzicoDescription")),n.iyzicoResponse&&e.createElement(I,{vm:n})))):null})),O=t((function(t){var a,n=t.vm;e.useEffect((function(){n.isTermsAndConditionsChecked&&n.setShowTkPayContainer(!0)}),[n.isTermsAndConditionsChecked]);var o=e.useCallback((function(e){e.stopPropagation(),n.policyModalTitle=M("checkout-page:privacyPolicy"),n.policyModalText=n.privacyPolicy}),[n,n.privacyPolicy]),i=e.useCallback((function(e){e.stopPropagation(),n.policyModalTitle=M("checkout-page:termsOfService"),n.policyModalText=n.termsOfService}),[n,n.termsOfService]),r=s.getTranslations()["checkout-page"],c=y(r.ackPoliciesSentence).map((function(t){return t.isVariable?e.createElement("span",{className:[m.TermsLabelSpan,n.isErrorsVisible&&!n.isTermsAndConditionsChecked?m.Error:""].join(" "),onClick:"{{ ackPrivacyPolicy }}"===t.value?o:i},"{{ ackPrivacyPolicy }}"===t.value?M("checkout-page:ackPrivacyPolicy"):M("checkout-page:ackTermsOfService")):t.value})),l=n.selectedPaymentGatewayIndex===n.tkPayPaymentGatewayIndex;return n.tkPayPaymentGateway?e.createElement("div",{className:g.SelectBoxContainer},e.createElement("div",{className:"".concat(g.SelectBox," ").concat(l?g.Selected:""," ").concat(m.TkPayBottomContent),onClick:function(){n.setPaymentGateway(n.tkPayPaymentGatewayIndex),n.mpVM.selectedCard=void 0}},e.createElement("div",{className:g.TopContent},e.createElement(f,{value:l,label:n.tkPayPaymentGateway.name,removePadding:!0}),e.createElement("div",{className:g.RightContent},(null===(a=n.tkPayPaymentGateway.additionalPrices)||void 0===a?void 0:a.length)?e.createElement(R,null,B(n.tkPayPaymentGateway.additionalPrices[0])):e.createElement(A,null,!!n.tkPayPaymentGateway.logoUrl&&e.createElement("div",{className:m.PaymentLogoContainer},e.createElement("img",{src:n.tkPayPaymentGateway.logoUrl}))))),e.createElement("div",{className:"".concat(l?g.BottomContent:""," ").concat(l?"":m.Hidden," ")},e.createElement("div",{className:m.TkPayCheckboxContainer},e.createElement(h,{value:n.isTermsAndConditionsChecked,hasError:n.isErrorsVisible&&!n.isTermsAndConditionsChecked,label:e.createElement(e.Fragment,null,c),removePadding:!0,onChange:n.onTermsAndConditionsCheckedChange})),!n.isTermsAndConditionsChecked&&e.createElement("div",{className:[m.TkPayDescription,n.tkPayResponse?m.WithBottomMargin:""].join(" ")},e.createElement(j,null),M("checkout-page:tkPayDescription")),n.tkPayResponse&&e.createElement(S,{vm:n})))):null}));return e.createElement(e.Fragment,null,!!b.mpVM.cards.length&&b.mpVM.cards.map((function(t,n){var o,r=b.paymentGateways.find((function(e){return e.id===t.paymentGatewayId})),s=e.createElement("button",{className:m.MasterPassSelectBoxDeleteButton,onClick:function(e){e.stopPropagation(),b.mpVM.deleteCard({store:b.store,checkout:b.checkout,card:t})}},M("checkout-page:masterPass.paymentGatewaySelectBox.delete")),d=function(e){return t.Value1.startsWith(e)},y=d("4"),p=d("5")||d("6"),u=d("9"),v=e.createElement("div",{style:{display:"flex",alignItems:"center"}},e.createElement("span",{className:m.MasterPassSelectBoxLabelLogo},y&&e.createElement(k,null),p&&e.createElement(x,null),u&&e.createElement(C,null)),t.Name," ",t.Value1),E=(null==r?void 0:r.id)&&r.paymentMethodType===a.CREDIT_CARD&&r.type===i.INTERNAL?b.installmentInfo&&e.createElement(c,{vm:b}):void 0;return e.createElement(l,{key:n,isSelected:(null===(o=b.mpVM.selectedCard)||void 0===o?void 0:o.UniqueId)===t.UniqueId,label:v,rightContent:s,bottomContent:E,onClick:function(){var e;(null===(e=b.mpVM.selectedCard)||void 0===e?void 0:e.UniqueId)!==t.UniqueId&&(b.checkout.selectedPaymentGateway=null,b.cardData=new P,b.installmentInfo=void 0,b.mpVM.selectedCard=t,t.Value1&&t.paymentGatewayId&&b.checkout.totalFinalPrice&&b.retrieveInstallmentInfo({input:{orderId:b.checkout.id,binNumber:t.Value1.slice(0,8),paymentGatewayId:t.paymentGatewayId,price:b.checkout.totalFinalPrice,currencyCode:b.checkout.currencyCode}}))}})})),b.paymentGateways.filter((function(e){return"in-store"!==b.deliveryMethod&&!b.isDigitalOnly||e.paymentMethodType!==a.CASH_ON_DELIVERY&&e.paymentMethodType!==a.CREDIT_CARD_ON_DELIVERY})).map((function(t,n){var o,s;if(b.useMilesSmiles&&t.id!==(null===(o=b.milesSmilesPaymentGateway)||void 0===o?void 0:o.id))return null;if(function(e){return"KLARNA"===e.code}(t)&&b.klarnaPaymentGateway)return z();if(function(e){return"ADYEN_PLATFORM"===e.code}(t)&&b.adyenPaymentGateway)return L();if(function(e){return"PAYPAL"===e.code}(t)&&b.payPalPaymentGateway)return U();if(function(e){return"HEPSIPAY"===e.code}(t)&&b.hepsiPayPaymentGateway)return D();if(function(e){return"IYZICO"===e.code}(t)&&b.iyzicoPaymentGateway)return e.createElement(_,{vm:b,key:t.id});if(function(e){var t,a;return"TK_PAY"===e.code&&"true"===(null===(a=null===(t=e.settings)||void 0===t?void 0:t.find((function(e){return"tkpay_use_checkout_form"===e.label})))||void 0===a?void 0:a.value)}(t)&&b.tkPayPaymentGateway)return e.createElement(O,{vm:b,key:t.id});var d=t.paymentMethodType===a.CREDIT_CARD&&t.type===i.INTERNAL?e.createElement(e.Fragment,null,V(t)?e.createElement(e.Fragment,null,e.createElement(w,{vm:b,pg:t}),b.stripeError&&e.createElement("div",{className:m.ErrorMessage},b.stripeError.data)):e.createElement("div",null,e.createElement(r,{vm:b}),b.isPaymentGatewayHasMasterPass&&e.createElement(E,{vm:b}),b.installmentInfo&&e.createElement(c,{vm:b}))):t.description?e.createElement(e.Fragment,null,t.type===i.EXTERNAL&&e.createElement("div",{style:{height:"52px",display:"flex",justifyContent:"center",margin:"24px 0"}},e.createElement(u,null)),e.createElement("div",{dangerouslySetInnerHTML:{__html:t.description}})):void 0;return e.createElement(l,{key:t.id,label:t.paymentMethodType===a.CREDIT_CARD&&t.type===i.INTERNAL?V(t)?t.name:M("checkout-page:creditCard"):t.name,isSelected:b.selectedPaymentGatewayIndex===n,rightContent:(null===(s=t.additionalPrices)||void 0===s?void 0:s.length)?e.createElement(R,null,B(t.additionalPrices[0])):e.createElement(A,null,!!t.logoUrl&&e.createElement("div",{className:m.PaymentLogoContainer},e.createElement("img",{src:t.logoUrl}))),bottomContent:d,onClick:function(){b.selectedPaymentGatewayIndex!==n&&(b.setPaymentGateway(n),b.mpVM.selectedCard=void 0)}})})))}));export{b as PaymentGateways};
|
package/build/components/checkout/steps/step-payment/payment-gateways/miles-smiles/index.d.ts
CHANGED
|
@@ -3,5 +3,12 @@ import CheckoutViewModel from "../../../../model";
|
|
|
3
3
|
declare type Props = {
|
|
4
4
|
vm: CheckoutViewModel;
|
|
5
5
|
};
|
|
6
|
+
/**
|
|
7
|
+
* Miles&Smiles block on the payment step.
|
|
8
|
+
*
|
|
9
|
+
* Miles are a second SALE on the synthetic MILES_SMILES gateway, charged
|
|
10
|
+
* before the TK_PAY card. The TRY figure shown here is an estimate; the
|
|
11
|
+
* server converts with the merchant's rate when charging.
|
|
12
|
+
*/
|
|
6
13
|
export declare const MilesSmiles: React.FC<Props>;
|
|
7
14
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import
|
|
1
|
+
import*as e from"react";import{observer as l}from"mobx-react-lite";import"@ikas/storefront-config";import{formatCurrency as s}from"../../../../../../utils/currency.js";import{useTranslation as i}from"../../../../../../utils/i18n.js";import m from"./style.module.scss.js";import t from"./thy-logo.js";var a=function(e){return e?e.toLocaleString("en-US"):""},r=l((function(l){var r,n=l.vm,o=i().t,u=n.milesSmilesAvailableMiles,S=n.milesSmilesMaxRedeemable,p=n.milesSmilesRedeemValue,d=n.milesToRedeem>u;return e.createElement("div",{className:m.MilesSmiles},e.createElement("div",{className:m.MilesSmilesHeader},e.createElement("div",{className:m.MilesSmilesHeaderLeft},e.createElement(t,{className:m.MilesSmilesLogo}),e.createElement("div",{className:m.MilesSmilesTitleWrapper},e.createElement("div",{className:m.MilesSmilesTitle},e.createElement("span",{className:m.MilesSmilesTitleBold},"Miles & Smiles")," ",e.createElement("span",null,o("checkout-page:milesSmilesUseMyMiles"))),e.createElement("div",{className:m.MilesSmilesSubtitle},o("checkout-page:milesSmilesAvailableTotal",{miles:a(u)}),(null===(r=n.milesSmilesDetails)||void 0===r?void 0:r.memberId)?" · ".concat(n.milesSmilesDetails.memberId):""))),e.createElement(c,{value:n.useMilesSmiles,onChange:function(e){n.setUseMilesSmiles(e)}})),n.useMilesSmiles&&e.createElement(e.Fragment,null,e.createElement("div",{className:m.MilesSmilesInputRow},e.createElement("div",{className:[m.MilesSmilesInputWrapper,d?m.MilesSmilesInputError:""].join(" ")},e.createElement("input",{className:m.MilesSmilesInput,type:"text",inputMode:"numeric",value:a(n.milesToRedeem),onChange:function(e){var l=e.target.value.replace(/[^\d]/g,"");n.setMilesToRedeem(l?parseInt(l,10):0)},onBlur:function(){n.clampMilesToRedeem()},max:S}),e.createElement("span",{className:m.MilesSmilesInputUnit},o("checkout-page:milesSmilesUnit"))),e.createElement("span",{className:m.MilesSmilesApprox},"≈"),e.createElement("div",{className:m.MilesSmilesPriceBox},s(p,n.checkout.currencyCode,n.checkout.currencySymbol))),d?e.createElement("div",{className:m.MilesSmilesErrorText},o("checkout-page:milesSmilesExceedError")):e.createElement("div",{className:m.MilesSmilesNote},o("checkout-page:milesSmilesApproxNote"))),n.milesSmilesError&&e.createElement("div",{className:m.MilesSmilesErrorText},n.getMilesSmilesErrorMessage(n.milesSmilesError)))})),c=function(l){var s=l.value,i=l.onChange;return e.createElement("div",{role:"switch","aria-checked":s,onClick:function(){i(!s)},className:[m.ToggleSwitch,s?m.ToggleSwitchActive:""].join(" ")},e.createElement("div",{className:[m.ToggleSwitchThumb,s?m.ToggleSwitchThumbActive:""].join(" ")}))};export{r as MilesSmiles};
|
|
@@ -3,5 +3,11 @@ import CheckoutViewModel from "../../../../model";
|
|
|
3
3
|
declare type Props = {
|
|
4
4
|
vm: CheckoutViewModel;
|
|
5
5
|
};
|
|
6
|
+
/**
|
|
7
|
+
* "Continue with Miles&Smiles" CTA. Shown when the customer is a guest, has
|
|
8
|
+
* no Miles&Smiles link yet, or the short-lived checkout session expired
|
|
9
|
+
* (MILES_SMILES_LOGIN_REQUIRED). Also used as the retry surface for
|
|
10
|
+
* bind / member-details failures.
|
|
11
|
+
*/
|
|
6
12
|
export declare const MilesSmilesLoginRequired: React.FC<Props>;
|
|
7
13
|
export default MilesSmilesLoginRequired;
|
package/build/components/checkout/steps/step-payment/payment-gateways/miles-smiles/login-required.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as e from"react";import"@ikas/storefront-config";import{useTranslation as
|
|
1
|
+
import*as e from"react";import{observer as s}from"mobx-react-lite";import"@ikas/storefront-config";import{useTranslation as i}from"../../../../../../utils/i18n.js";import t from"./style.module.scss.js";import l from"./thy-logo.js";var m=s((function(s){var m=s.vm,o=i().t,r=!m.store.customerStore.customer;return e.createElement("div",{className:t.MilesSmilesLogin},e.createElement("div",{className:t.MilesSmilesLoginLeft},e.createElement(l,{className:t.MilesSmilesLogo}),e.createElement("div",{className:t.MilesSmilesLoginText},e.createElement("span",{className:t.MilesSmilesTitleBold},"Miles & Smiles")," ",e.createElement("span",null,o(r?"checkout-page:milesSmilesLoginPrompt":"checkout-page:milesSmilesBindPrompt")),m.milesSmilesError&&e.createElement("div",{className:t.MilesSmilesErrorText},m.getMilesSmilesErrorMessage(m.milesSmilesError)))),e.createElement("button",{type:"button",className:[t.MilesSmilesLoginButton,m.isMilesSmilesBindLoading?t.MilesSmilesLoginButtonBusy:""].join(" "),disabled:m.isMilesSmilesBindLoading,onClick:function(){return m.startMilesSmilesBind()}},o(r?"checkout-page:milesSmilesLoginButton":"checkout-page:milesSmilesBindButton")))}));export{m as MilesSmilesLoginRequired,m as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from'./../../../../../../ext/style-inject/dist/style-inject.es.js';var l={MilesSmiles:"style-module_MilesSmiles__-4b7k",MilesSmilesHeader:"style-module_MilesSmilesHeader__2wEKO",MilesSmilesHeaderLeft:"style-module_MilesSmilesHeaderLeft__azBmf",MilesSmilesLogo:"style-module_MilesSmilesLogo__Cttfa",MilesSmilesTitleWrapper:"style-module_MilesSmilesTitleWrapper__iGOg2",MilesSmilesTitle:"style-module_MilesSmilesTitle__ClDIS",MilesSmilesTitleBold:"style-module_MilesSmilesTitleBold__tSEX5",MilesSmilesSubtitle:"style-module_MilesSmilesSubtitle__4XQe2",MilesSmilesInputRow:"style-module_MilesSmilesInputRow__rgpyr",MilesSmilesInputWrapper:"style-module_MilesSmilesInputWrapper__cMQ9K",MilesSmilesInputError:"style-module_MilesSmilesInputError__tidH-",MilesSmilesInput:"style-module_MilesSmilesInput__-ADNL",MilesSmilesInputUnit:"style-module_MilesSmilesInputUnit__vza1O",MilesSmilesApprox:"style-module_MilesSmilesApprox__3P4Nr",MilesSmilesPriceBox:"style-module_MilesSmilesPriceBox__Clpc3",MilesSmilesErrorText:"style-module_MilesSmilesErrorText__02yD-",ToggleSwitch:"style-module_ToggleSwitch__fSVrp",ToggleSwitchActive:"style-module_ToggleSwitchActive__vd83i",ToggleSwitchThumb:"style-module_ToggleSwitchThumb__PiPwV",ToggleSwitchThumbActive:"style-module_ToggleSwitchThumbActive__RjbIp",MilesSmilesLogin:"style-module_MilesSmilesLogin__sPao6",MilesSmilesLoginLeft:"style-module_MilesSmilesLoginLeft__gL6xo",MilesSmilesLoginText:"style-module_MilesSmilesLoginText__Jlxn4",MilesSmilesLoginButton:"style-module_MilesSmilesLoginButton__w82W4"};e(".style-module_MilesSmiles__-4b7k {\n padding: 12px;\n border-radius: 8px;\n border: 1px solid var(--checkout-border-color);\n margin-bottom: 16px;\n}\n.style-module_MilesSmiles__-4b7k .style-module_MilesSmilesHeader__2wEKO {\n display: flex;\n justify-content: space-between;\n align-items: flex-start;\n gap: 10px;\n}\n.style-module_MilesSmiles__-4b7k .style-module_MilesSmilesHeader__2wEKO .style-module_MilesSmilesHeaderLeft__azBmf {\n display: flex;\n gap: 10px;\n align-items: center;\n flex: 1;\n min-width: 0;\n}\n.style-module_MilesSmiles__-4b7k .style-module_MilesSmilesHeader__2wEKO .style-module_MilesSmilesLogo__Cttfa {\n flex-shrink: 0;\n width: 24px;\n height: 24px;\n}\n.style-module_MilesSmiles__-4b7k .style-module_MilesSmilesHeader__2wEKO .style-module_MilesSmilesTitleWrapper__iGOg2 {\n display: flex;\n flex-direction: column;\n gap: 2px;\n min-width: 0;\n}\n.style-module_MilesSmiles__-4b7k .style-module_MilesSmilesHeader__2wEKO .style-module_MilesSmilesTitle__ClDIS {\n font-size: 16px;\n line-height: 24px;\n font-weight: 500;\n color: var(--checkout-primary-text-color);\n}\n.style-module_MilesSmiles__-4b7k .style-module_MilesSmilesHeader__2wEKO .style-module_MilesSmilesTitleBold__tSEX5 {\n font-weight: 600;\n}\n.style-module_MilesSmiles__-4b7k .style-module_MilesSmilesHeader__2wEKO .style-module_MilesSmilesSubtitle__4XQe2 {\n font-size: 14px;\n line-height: 20px;\n color: var(--checkout-secondary-text-color);\n}\n.style-module_MilesSmiles__-4b7k .style-module_MilesSmilesInputRow__rgpyr {\n display: flex;\n align-items: center;\n gap: 10px;\n margin-top: 12px;\n}\n.style-module_MilesSmiles__-4b7k .style-module_MilesSmilesInputWrapper__cMQ9K {\n display: flex;\n align-items: center;\n border: 1px solid var(--checkout-border-color);\n border-radius: 8px;\n overflow: hidden;\n background-color: var(--checkout-primary-bg-color);\n transition: border-color 0.15s ease;\n}\n.style-module_MilesSmiles__-4b7k .style-module_MilesSmilesInputWrapper__cMQ9K.style-module_MilesSmilesInputError__tidH- {\n border-color: var(--checkout-error-color);\n}\n.style-module_MilesSmiles__-4b7k .style-module_MilesSmilesInput__-ADNL {\n width: 100%;\n max-width: 140px;\n padding: 6px 10px;\n border: none;\n outline: none;\n background: transparent;\n font-size: 15px;\n line-height: 20px;\n color: var(--checkout-primary-text-color);\n font-family: inherit;\n text-align: center;\n}\n.style-module_MilesSmiles__-4b7k .style-module_MilesSmilesInput__-ADNL::placeholder {\n color: var(--checkout-secondary-text-color);\n}\n.style-module_MilesSmiles__-4b7k .style-module_MilesSmilesInputUnit__vza1O {\n padding: 6px 10px;\n font-size: 14px;\n line-height: 20px;\n color: var(--checkout-secondary-text-color);\n border-left: 1px solid var(--checkout-border-color);\n background-color: var(--checkout-primary-bg-color);\n white-space: nowrap;\n}\n.style-module_MilesSmiles__-4b7k .style-module_MilesSmilesApprox__3P4Nr {\n font-size: 16px;\n color: var(--checkout-secondary-text-color);\n}\n.style-module_MilesSmiles__-4b7k .style-module_MilesSmilesPriceBox__Clpc3 {\n padding: 6px 10px;\n border-radius: 8px;\n background-color: var(--checkout-secondary-bg-color);\n font-size: 15px;\n line-height: 20px;\n color: var(--checkout-primary-text-color);\n white-space: nowrap;\n}\n.style-module_MilesSmiles__-4b7k .style-module_MilesSmilesErrorText__02yD- {\n margin-top: 10px;\n font-size: 14px;\n line-height: 20px;\n color: var(--checkout-error-color);\n}\n.style-module_MilesSmiles__-4b7k .style-module_ToggleSwitch__fSVrp {\n position: relative;\n width: 40px;\n height: 22px;\n background-color: #cdd5df;\n border-radius: 12px;\n cursor: pointer;\n transition: background-color 0.2s ease;\n display: flex;\n align-items: center;\n padding: 3px;\n box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);\n flex-shrink: 0;\n}\n.style-module_MilesSmiles__-4b7k .style-module_ToggleSwitch__fSVrp.style-module_ToggleSwitchActive__vd83i {\n background-color: #1f2a37;\n}\n.style-module_MilesSmiles__-4b7k .style-module_ToggleSwitchThumb__PiPwV {\n width: 16px;\n height: 16px;\n background-color: white;\n border-radius: 50%;\n transform: translateX(0px);\n transition: transform 0.2s ease;\n box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);\n position: absolute;\n}\n.style-module_MilesSmiles__-4b7k .style-module_ToggleSwitchThumb__PiPwV.style-module_ToggleSwitchThumbActive__RjbIp {\n transform: translateX(18px);\n}\n\n.style-module_MilesSmilesLogin__sPao6 {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 12px;\n padding: 12px;\n border-radius: 8px;\n border: 1px solid var(--checkout-border-color);\n margin-bottom: 16px;\n background-color: var(--checkout-card-bg-color);\n}\n.style-module_MilesSmilesLogin__sPao6 .style-module_MilesSmilesLoginLeft__gL6xo {\n display: flex;\n align-items: center;\n gap: 10px;\n flex: 1;\n min-width: 0;\n}\n.style-module_MilesSmilesLogin__sPao6 .style-module_MilesSmilesLogo__Cttfa {\n flex-shrink: 0;\n width: 24px;\n height: 24px;\n}\n.style-module_MilesSmilesLogin__sPao6 .style-module_MilesSmilesLoginText__Jlxn4 {\n font-size: 16px;\n line-height: 24px;\n color: var(--checkout-primary-text-color);\n min-width: 0;\n}\n.style-module_MilesSmilesLogin__sPao6 .style-module_MilesSmilesTitleBold__tSEX5 {\n font-weight: 600;\n}\n.style-module_MilesSmilesLogin__sPao6 .style-module_MilesSmilesLoginButton__w82W4 {\n flex-shrink: 0;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n padding: 8px 16px;\n background-color: #c90019;\n color: #fff;\n font-size: 16px;\n line-height: 24px;\n font-weight: 500;\n border-radius: 8px;\n text-decoration: none;\n}\n.style-module_MilesSmilesLogin__sPao6 .style-module_MilesSmilesLoginButton__w82W4:hover {\n background-color: #c90019;\n color: #fff;\n}");export{l as default};
|
|
1
|
+
import e from'./../../../../../../ext/style-inject/dist/style-inject.es.js';var l={MilesSmiles:"style-module_MilesSmiles__-4b7k",MilesSmilesHeader:"style-module_MilesSmilesHeader__2wEKO",MilesSmilesHeaderLeft:"style-module_MilesSmilesHeaderLeft__azBmf",MilesSmilesLogo:"style-module_MilesSmilesLogo__Cttfa",MilesSmilesTitleWrapper:"style-module_MilesSmilesTitleWrapper__iGOg2",MilesSmilesTitle:"style-module_MilesSmilesTitle__ClDIS",MilesSmilesTitleBold:"style-module_MilesSmilesTitleBold__tSEX5",MilesSmilesSubtitle:"style-module_MilesSmilesSubtitle__4XQe2",MilesSmilesInputRow:"style-module_MilesSmilesInputRow__rgpyr",MilesSmilesInputWrapper:"style-module_MilesSmilesInputWrapper__cMQ9K",MilesSmilesInputError:"style-module_MilesSmilesInputError__tidH-",MilesSmilesInput:"style-module_MilesSmilesInput__-ADNL",MilesSmilesInputUnit:"style-module_MilesSmilesInputUnit__vza1O",MilesSmilesApprox:"style-module_MilesSmilesApprox__3P4Nr",MilesSmilesPriceBox:"style-module_MilesSmilesPriceBox__Clpc3",MilesSmilesErrorText:"style-module_MilesSmilesErrorText__02yD-",MilesSmilesNote:"style-module_MilesSmilesNote__xnNic",ToggleSwitch:"style-module_ToggleSwitch__fSVrp",ToggleSwitchActive:"style-module_ToggleSwitchActive__vd83i",ToggleSwitchThumb:"style-module_ToggleSwitchThumb__PiPwV",ToggleSwitchThumbActive:"style-module_ToggleSwitchThumbActive__RjbIp",MilesSmilesLogin:"style-module_MilesSmilesLogin__sPao6",MilesSmilesLoginLeft:"style-module_MilesSmilesLoginLeft__gL6xo",MilesSmilesLoginText:"style-module_MilesSmilesLoginText__Jlxn4",MilesSmilesLoginButtonBusy:"style-module_MilesSmilesLoginButtonBusy__m7rkq",MilesSmilesLoginButton:"style-module_MilesSmilesLoginButton__w82W4"};e(".style-module_MilesSmiles__-4b7k {\n padding: 12px;\n border-radius: 8px;\n border: 1px solid var(--checkout-border-color);\n margin-bottom: 16px;\n}\n.style-module_MilesSmiles__-4b7k .style-module_MilesSmilesHeader__2wEKO {\n display: flex;\n justify-content: space-between;\n align-items: flex-start;\n gap: 10px;\n}\n.style-module_MilesSmiles__-4b7k .style-module_MilesSmilesHeader__2wEKO .style-module_MilesSmilesHeaderLeft__azBmf {\n display: flex;\n gap: 10px;\n align-items: center;\n flex: 1;\n min-width: 0;\n}\n.style-module_MilesSmiles__-4b7k .style-module_MilesSmilesHeader__2wEKO .style-module_MilesSmilesLogo__Cttfa {\n flex-shrink: 0;\n width: 24px;\n height: 24px;\n}\n.style-module_MilesSmiles__-4b7k .style-module_MilesSmilesHeader__2wEKO .style-module_MilesSmilesTitleWrapper__iGOg2 {\n display: flex;\n flex-direction: column;\n gap: 2px;\n min-width: 0;\n}\n.style-module_MilesSmiles__-4b7k .style-module_MilesSmilesHeader__2wEKO .style-module_MilesSmilesTitle__ClDIS {\n font-size: 16px;\n line-height: 24px;\n font-weight: 500;\n color: var(--checkout-primary-text-color);\n}\n.style-module_MilesSmiles__-4b7k .style-module_MilesSmilesHeader__2wEKO .style-module_MilesSmilesTitleBold__tSEX5 {\n font-weight: 600;\n}\n.style-module_MilesSmiles__-4b7k .style-module_MilesSmilesHeader__2wEKO .style-module_MilesSmilesSubtitle__4XQe2 {\n font-size: 14px;\n line-height: 20px;\n color: var(--checkout-secondary-text-color);\n}\n.style-module_MilesSmiles__-4b7k .style-module_MilesSmilesInputRow__rgpyr {\n display: flex;\n align-items: center;\n gap: 10px;\n margin-top: 12px;\n}\n.style-module_MilesSmiles__-4b7k .style-module_MilesSmilesInputWrapper__cMQ9K {\n display: flex;\n align-items: center;\n border: 1px solid var(--checkout-border-color);\n border-radius: 8px;\n overflow: hidden;\n background-color: var(--checkout-primary-bg-color);\n transition: border-color 0.15s ease;\n}\n.style-module_MilesSmiles__-4b7k .style-module_MilesSmilesInputWrapper__cMQ9K.style-module_MilesSmilesInputError__tidH- {\n border-color: var(--checkout-error-color);\n}\n.style-module_MilesSmiles__-4b7k .style-module_MilesSmilesInput__-ADNL {\n width: 100%;\n max-width: 140px;\n padding: 6px 10px;\n border: none;\n outline: none;\n background: transparent;\n font-size: 15px;\n line-height: 20px;\n color: var(--checkout-primary-text-color);\n font-family: inherit;\n text-align: center;\n}\n.style-module_MilesSmiles__-4b7k .style-module_MilesSmilesInput__-ADNL::placeholder {\n color: var(--checkout-secondary-text-color);\n}\n.style-module_MilesSmiles__-4b7k .style-module_MilesSmilesInputUnit__vza1O {\n padding: 6px 10px;\n font-size: 14px;\n line-height: 20px;\n color: var(--checkout-secondary-text-color);\n border-left: 1px solid var(--checkout-border-color);\n background-color: var(--checkout-primary-bg-color);\n white-space: nowrap;\n}\n.style-module_MilesSmiles__-4b7k .style-module_MilesSmilesApprox__3P4Nr {\n font-size: 16px;\n color: var(--checkout-secondary-text-color);\n}\n.style-module_MilesSmiles__-4b7k .style-module_MilesSmilesPriceBox__Clpc3 {\n padding: 6px 10px;\n border-radius: 8px;\n background-color: var(--checkout-secondary-bg-color);\n font-size: 15px;\n line-height: 20px;\n color: var(--checkout-primary-text-color);\n white-space: nowrap;\n}\n.style-module_MilesSmiles__-4b7k .style-module_MilesSmilesErrorText__02yD- {\n margin-top: 10px;\n font-size: 14px;\n line-height: 20px;\n color: var(--checkout-error-color);\n}\n.style-module_MilesSmiles__-4b7k .style-module_MilesSmilesNote__xnNic {\n margin-top: 8px;\n font-size: 13px;\n line-height: 18px;\n color: var(--checkout-secondary-text-color);\n}\n.style-module_MilesSmiles__-4b7k .style-module_ToggleSwitch__fSVrp {\n position: relative;\n width: 40px;\n height: 22px;\n background-color: #cdd5df;\n border-radius: 12px;\n cursor: pointer;\n transition: background-color 0.2s ease;\n display: flex;\n align-items: center;\n padding: 3px;\n box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);\n flex-shrink: 0;\n}\n.style-module_MilesSmiles__-4b7k .style-module_ToggleSwitch__fSVrp.style-module_ToggleSwitchActive__vd83i {\n background-color: #1f2a37;\n}\n.style-module_MilesSmiles__-4b7k .style-module_ToggleSwitchThumb__PiPwV {\n width: 16px;\n height: 16px;\n background-color: white;\n border-radius: 50%;\n transform: translateX(0px);\n transition: transform 0.2s ease;\n box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);\n position: absolute;\n}\n.style-module_MilesSmiles__-4b7k .style-module_ToggleSwitchThumb__PiPwV.style-module_ToggleSwitchThumbActive__RjbIp {\n transform: translateX(18px);\n}\n\n.style-module_MilesSmilesLogin__sPao6 {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 12px;\n padding: 12px;\n border-radius: 8px;\n border: 1px solid var(--checkout-border-color);\n margin-bottom: 16px;\n background-color: var(--checkout-card-bg-color);\n}\n.style-module_MilesSmilesLogin__sPao6 .style-module_MilesSmilesLoginLeft__gL6xo {\n display: flex;\n align-items: center;\n gap: 10px;\n flex: 1;\n min-width: 0;\n}\n.style-module_MilesSmilesLogin__sPao6 .style-module_MilesSmilesLogo__Cttfa {\n flex-shrink: 0;\n width: 24px;\n height: 24px;\n}\n.style-module_MilesSmilesLogin__sPao6 .style-module_MilesSmilesLoginText__Jlxn4 {\n font-size: 16px;\n line-height: 24px;\n color: var(--checkout-primary-text-color);\n min-width: 0;\n}\n.style-module_MilesSmilesLogin__sPao6 .style-module_MilesSmilesTitleBold__tSEX5 {\n font-weight: 600;\n}\n.style-module_MilesSmilesLogin__sPao6 .style-module_MilesSmilesErrorText__02yD- {\n margin-top: 4px;\n font-size: 14px;\n line-height: 20px;\n color: var(--checkout-error-color);\n}\n.style-module_MilesSmilesLogin__sPao6 .style-module_MilesSmilesLoginButtonBusy__m7rkq {\n opacity: 0.6;\n pointer-events: none;\n}\n.style-module_MilesSmilesLogin__sPao6 .style-module_MilesSmilesLoginButton__w82W4 {\n flex-shrink: 0;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n padding: 8px 16px;\n background-color: #c90019;\n color: #fff;\n font-size: 16px;\n line-height: 24px;\n font-weight: 500;\n border-radius: 8px;\n text-decoration: none;\n}\n.style-module_MilesSmilesLogin__sPao6 .style-module_MilesSmilesLoginButton__w82W4:hover {\n background-color: #c90019;\n color: #fff;\n}");export{l as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__spreadArray as e}from'./../../../../ext/tslib/tslib.es6.js';import*as t from"react";import{observer as a}from"mobx-react-lite";import{Button as o}from"../../components/button/index.js";import{CART_LS_KEY as s}from"../../../../store/cart/index.js";import n 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 l from"../../components/credit-card-form/svg/master-card.js";import d from"../../components/credit-card-form/svg/troy.js";import m from"../../components/credit-card-form/svg/visa.js";import"@ikas/storefront-config";import{formatCurrency as u}from"../../../../utils/currency.js";import{useTranslation as p}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 v,IkasPaymentGatewayType as f,IkasOrderPackageStatus as g,IkasTransactionCardAssociation as E}from"@ikas/storefront-models";import"mobx";import"../../../../models/data/campaign-offer/index.js";import"../../../../models/data/cart/campaign-offer/index.js";import"../../../../models/data/cart/index.js";import"../../../../models/data/category/path-item/index.js";import"../../../../models/data/category/index.js";import"../../../../models/data/checkout/index.js";import"../../../../models/data/checkout-settings/index.js";import"../../../../models/data/city/index.js";import"../../../../models/data/country/index.js";import"../../../../models/data/customer/address/region/index.js";import"../../../../models/data/customer/address/index.js";import"../../../../models/data/customer/address/ikas-localized-customer-address.js";import"../../../../models/data/customer/attribute/index.js";import"../../../../models/data/customer/review/summary/index.js";import"../../../../models/data/customer/review/index.js";import"../../../../models/data/customer/index.js";import"../../../../models/data/customer-form-data-input/index.js";import"../../../../models/data/district/index.js";import"../../../../models/data/favorite-product/index.js";import"../../../../models/data/filter-category/index.js";import"../../../../models/data/html-meta-data/index.js";import"../../../../models/data/image/index.js";import"../../../../models/data/order/address/region/index.js";import"../../../../models/data/order/address/index.js";import"../../../../models/data/order/line-item/option/value/index.js";import"../../../../models/data/order/line-item/variant/value/index.js";import"../../../../models/data/order/line-item/variant/index.js";import"../../../../models/data/order/line-item/index.js";import"../../../../models/data/order/order-transaction-with-prices/index.js";import"../../../../models/data/order/package/index.js";import"../../../../models/data/order/transaction/index.js";import"../../../../models/data/order/index.js";import"../../../../models/data/payment-gateway/index.js";import"../../../../models/data/product/attribute-value/index.js";import"../../../../models/data/product/filter/index.js";import"../../../../models/data/product/campaign-offer/index.js";import"../../../../models/data/product/option-set/option/index.js";import"../../../../models/data/product/option-set/index.js";import"../../../../models/data/product/stock-location/index.js";import"../../../../models/data/product/variant/price/index.js";import"../../../../models/data/product/variant/index.js";import"../../../../models/data/variant-type/index.js";import"../../../../models/data/product/index.js";import"../../../../models/data/raffle/index.js";import"../../../../models/data/shipping-zone/state/city/district/region/index.js";import"../../../../models/data/state/index.js";import"../../../../models/data/storefront-popup/storefront-popup-display-settings/index.js";import"../../../../models/data/storefront-popup/storefront-popup-page-filter/index.js";import"../../../../models/data/storefront-popup/index.js";import"../../../../models/data/theme-json/index.js";import"../../../../models/data/theme-json/component/index.js";import"../../../../models/data/theme-json/custom-data/index.js";import"../../../../models/data/variant-type/variant-value/index.js";import"@ikas/localized-address";import"../../../../models/ui/blog-list/index.js";import"../../../../models/ui/blog-category-list/index.js";import"../../../../models/ui/brand-list/index.js";import"../../../../models/ui/category-list/index.js";import"../../../../models/ui/product-list/index.js";import"../../../../models/ui/product-attribute-detail/index.js";import"../../../../models/ui/product-attribute-list/index.js";import"../../../../models/ui/customer-review-list/index.js";import"../../../../models/ui/customer-review-summary-list/index.js";import"../../../../models/ui/validator/index.js";import"../../../../models/ui/validator/rules/index.js";import"../../../../models/ui/validator/form/login.js";import"../../../../models/ui/validator/form/address.js";import"../../../../models/ui/validator/form/ikas-address.js";import"../../../../models/ui/validator/form/register.js";import"../../../../models/ui/validator/form/contact-form.js";import"../../../../models/ui/validator/form/forgot-password.js";import"../../../../models/ui/validator/form/recover-password.js";import"../../../../models/ui/validator/form/account-info.js";import"../../../../models/ui/validator/form/raffle-form.js";import"../../../../models/ui/validator/form/customer-review.js";import"../../../../models/ui/raffle-list/index.js";import h from"../../components/offer-product/index.js";import{Analytics as x}from"../../../../analytics/analytics.js";import"../../../../analytics/head/index.js";import{QuickRegistration as k}from"../../components/quick-registration/index.js";import{ProductFiles as y}from"../../components/product-files/index.js";import j from"../../components/offer-product/offer-arrows/index.js";import N from"../../components/offer-product/offer-dots/index.js";import I from"../../components/svg/shopping-bag.js";import{CartSummary as T}from"../../components/cart-summary/index.js";import A from"../../components/offer-product/useCampaignOffer.js";var C="eventSentCartIds",D=a((function(a){var g,C,D,P,S,L,R,M,b,O,_,F,w=a.vm,Y=p().t,U=A(w,!0),V=U.setActiveIndex,z=U.setIsActiveOverlay,B=U.handlePrev,G=U.handleNext,H=U.isActiveOverlay,K=U.activeIndex,Q=U.isMobile;t.useEffect((function(){if("undefined"!=typeof localStorage){var t=localStorage.getItem(s),a=localStorage.getItem("eventSentCartIds");if(t&&t===w.checkout.id){if(w.successTransaction){var o=JSON.parse(a||"[]");if(!o.some((function(e){return e===w.checkout.id}))){var n=w.checkout.orderedAt,r=Date.now();Math.floor(Math.abs(r-n)/1e3)<30&&x.purchase(w.checkout,w.successTransaction),localStorage.setItem("eventSentCartIds",JSON.stringify(e(e([],o,!0),[w.checkout.id],!1)))}}localStorage.removeItem(s)}window&&window.handleKlarna&&window.handleKlarna(void 0)}}),[]);var J=((null===(g=w.checkout.customer)||void 0===g?void 0:g.firstName)||"")+" "+((null===(C=w.checkout.customer)||void 0===C?void 0:C.lastName)||""),q=((null===(D=w.checkout.shippingAddress)||void 0===D?void 0:D.firstName)||"")+" "+((null===(P=w.checkout.shippingAddress)||void 0===P?void 0:P.lastName)||""),X=w.paymentGateways.find((function(e){var t;return e.id===(null===(t=w.successTransaction)||void 0===t?void 0:t.paymentGatewayId)})),W=function(e){var a,o;switch(e||(null===(o=null===(a=w.successTransaction)||void 0===a?void 0:a.paymentMethodDetail)||void 0===o?void 0:o.cardAssociation)){case E.AMERICAN_EXPRESS:return t.createElement(c,null);case E.MASTER_CARD:return t.createElement(l,null);case E.TROY:return t.createElement(d,null);case E.VISA:return t.createElement(m,null);default:return t.createElement("div",null)}},Z=function(e){switch(e){case v.APP_PAYMENT:return Y("checkout-page:appPayment");case v.BANK_REDIRECT:return Y("checkout-page:bankRedirect");case v.BUY_ONLINE_PAY_AT_STORE:return Y("checkout-page:buyOnlinePayAtStore");case v.CASH:return Y("checkout-page:cash");case v.CASH_ON_DELIVERY:return Y("checkout-page:cashOnDelivery");case v.CREDIT_CARD:return Y("checkout-page:creditCard");case v.CREDIT_CARD_ON_DELIVERY:return Y("checkout-page:creditCardOnDelivery");case v.DIRECT_DEBIT:return Y("checkout-page:directDebit");case v.GIFT_CARD:return Y("checkout-page:giftCard");case v.MONEY_ORDER:return Y("checkout-page:moneyOrder");case v.OTHER:return Y("checkout-page:other");case v.PAY_LATER:return Y("checkout-page:payLater");case v.SLICE_IT:return Y("checkout-page:sliceIt");case v.WALLET:return Y("checkout-page:wallet");default:return""}},$=null===(S=w.successTransaction)||void 0===S?void 0:S.paymentMethodDetail,ee=null===(L=w.successTransaction)||void 0===L?void 0:L.paymentGatewayCode,te=null===(R=w.successTransactions)||void 0===R?void 0:R.some((function(e){return e.paymentMethod===v.GIFT_CARD})),ae=t.useMemo((function(){var e;return null===(e=w.successTransactions)||void 0===e?void 0:e.map((function(e){var a,o,s;return t.createElement(t.Fragment,null,t.createElement("div",{className:n.InfoText},Z(e.paymentMethod)),e.paymentMethod===v.CREDIT_CARD&&t.createElement(t.Fragment,null,t.createElement("div",{className:n.InfoText},t.createElement("div",{className:n.CardLogoContainer},W(null===(a=e.paymentMethodDetail)||void 0===a?void 0:a.cardAssociation)),t.createElement("span",null,"**** ".concat((null==$?void 0:$.lastFourDigits)||""))),(null===(s=null===(o=e.paymentMethodDetail)||void 0===o?void 0:o.installment)||void 0===s?void 0:s.installmentCount)&&e.paymentMethodDetail.installment.installmentCount>1&&t.createElement(t.Fragment,null,t.createElement("div",{className:n.InfoText},"".concat(e.paymentMethodDetail.installment.installmentCount," ").concat(Y("checkout-page:installments"))),null!==e.paymentMethodDetail.installment.installmentPrice&&t.createElement("div",{className:n.InfoText},"".concat(e.paymentMethodDetail.installment.installmentCount," x ").concat(u(e.paymentMethodDetail.installment.installmentPrice,w.checkout.currencyCode,w.checkout.currencySymbol))))))}))}),[]),oe=t.useMemo((function(){var e,a,o,s,r,i,c,l,d,m;return t.createElement("div",{className:[n.InfoGrid].join(" ")},!w.isFree&&t.createElement("div",{className:n.PaymentMethodMain},t.createElement("div",{className:n.InfoTitle},Y("checkout-page:paymentMethod")),te?ae:t.createElement(t.Fragment,null,X&&t.createElement(t.Fragment,null,!!X.logoUrl&&t.createElement("div",{className:n.PaymentLogoContainer},t.createElement("img",{src:X.logoUrl})),!X.logoUrl&&t.createElement("div",{className:n.InfoText},X.paymentMethodType===v.CREDIT_CARD&&X.type===f.INTERNAL?Y("checkout-page:creditCard"):X.name),"STRIPE"!==X.code&&"STRIPE_EU"!==X.code&&"PAYPAL"!==X.code&&"KLARNA"!==X.code||!(null===(e=w.successTransaction)||void 0===e?void 0:e.paymentMethod)?!!X.description&&X.type!==f.EXTERNAL&&t.createElement("div",{className:n.InfoText},t.createElement("div",{dangerouslySetInnerHTML:{__html:X.description}})):t.createElement("div",{className:n.InfoText},Z(w.successTransaction.paymentMethod))),"E_PAY_KOLAY"===ee&&t.createElement(t.Fragment,null,t.createElement("div",{className:n.EPayKolayLogoContainer},t.createElement("img",{src:"https://cdn.myikas.com/sf/assets/payment/epaykolay.png"})),!!(null===(a=w.successTransaction)||void 0===a?void 0:a.paymentMethod)&&t.createElement("div",{className:n.InfoText},Z(null===(o=w.successTransaction)||void 0===o?void 0:o.paymentMethod))),"E_PAY_KOLAY"!==ee&&"STRIPE"!==ee&&"STRIPE_EU"!==ee&&"PAYPAL"!==ee&&"KLARNA"!==ee&&"CREDIT_CARD"===(null===(s=w.successTransaction)||void 0===s?void 0:s.paymentMethod)&&t.createElement(t.Fragment,null,t.createElement("div",{className:n.InfoText},t.createElement("div",{className:n.CardLogoContainer},W()),t.createElement("span",null,"**** ".concat((null==$?void 0:$.lastFourDigits)||""))),(null===(r=null==$?void 0:$.installment)||void 0===r?void 0:r.installmentCount)&&$.installment.installmentCount>1&&t.createElement(t.Fragment,null,t.createElement("div",{className:n.InfoText},"".concat($.installment.installmentCount," ").concat(Y("checkout-page:installments"))),null!==$.installment.installmentPrice&&t.createElement("div",{className:n.InfoText},"".concat($.installment.installmentCount," x ").concat(u($.installment.installmentPrice,w.checkout.currencyCode,w.checkout.currencySymbol))))))),!!w.isFree&&!!te&&t.createElement("div",{className:n.PaymentMethodMain},t.createElement("div",{className:n.InfoTitle},Y("checkout-page:paymentMethod")),ae),t.createElement("div",null,t.createElement("div",{className:n.InfoTitle},Y("checkout-page:billingAddress")),!!(null===(i=w.checkout.billingAddress)||void 0===i?void 0:i.firstName)&&t.createElement("div",{className:[n.InfoText,n.InfoTextPrimary].join(" ")},w.checkout.billingAddress.firstName," ",w.checkout.billingAddress.lastName),!!(null===(c=w.checkout.billingAddress)||void 0===c?void 0:c.company)&&t.createElement("div",{className:n.InfoText},w.checkout.billingAddress.company),(!!(null===(l=w.checkout.billingAddress)||void 0===l?void 0:l.taxOffice)||!!(null===(d=w.checkout.billingAddress)||void 0===d?void 0:d.taxNumber))&&t.createElement("div",{className:n.InfoText},w.checkout.billingAddress.taxOffice," ",w.checkout.billingAddress.taxNumber),t.createElement("div",{className:n.InfoText},null===(m=w.checkout.billingAddress)||void 0===m?void 0:m.addressText)))}),[]),se=t.useMemo((function(){return t.createElement(T,{vm:w,isSuccessPageSummary:!0})}),[]),ne=t.useMemo((function(){var e,a,o,s,r,i;return t.createElement("div",{className:[n.InfoGrid].join(" ")},t.createElement("div",null,t.createElement("div",{className:n.InfoTitle},Y("checkout-page:contactInfo")),t.createElement("div",{className:n.InfoText},null===(e=w.checkout.customer)||void 0===e?void 0:e.email),t.createElement("div",{className:n.InfoText},J),!!(null===(a=w.checkout.shippingAddress)||void 0===a?void 0:a.phone)&&t.createElement("div",{className:n.InfoText},null===(o=w.checkout.shippingAddress)||void 0===o?void 0:o.phone)),t.createElement("div",null,"in-store"===w.deliveryMethod&&t.createElement(t.Fragment,null,t.createElement("div",{className:n.InfoTitle},Y("checkout-page:receiver")),t.createElement("div",{className:[n.InfoText,n.withMBottom].join(" ")},q)),t.createElement("div",{className:n.InfoTitle},"address"===w.deliveryMethod?Y("checkout-page:shippingAddress"):Y("checkout-page:pickUpLocation")),!!(null===(s=w.checkout.shippingAddress)||void 0===s?void 0:s.firstName)&&t.createElement("div",{className:[n.InfoText,n.InfoTextPrimary].join(" ")},w.checkout.shippingAddress.firstName," ",w.checkout.shippingAddress.lastName),!!(null===(r=w.checkout.shippingAddress)||void 0===r?void 0:r.company)&&t.createElement("div",{className:n.InfoText},w.checkout.shippingAddress.company),t.createElement("div",{className:n.InfoText},null===(i=w.checkout.shippingAddress)||void 0===i?void 0:i.addressText)))}),[]),re=!!(null===(M=w.customizationProps)||void 0===M?void 0:M.campaignOffersEnableMiddlePhase)&&!!(null===(b=w.customizationProps)||void 0===b?void 0:b.showCampaignIsBiggerImage)&&Q&&H,ie=!!(null===(O=w.customizationProps)||void 0===O?void 0:O.campaignOffersEnableMiddlePhase)&&!!(null===(_=w.customizationProps)||void 0===_?void 0:_.showCampaignIsBiggerImage)&&Q&&!H;return t.createElement(t.Fragment,null,!!(null===(F=w.customizationProps)||void 0===F?void 0:F.campaignOffersEnableMiddlePhase)&&H&&w.campaignOffers&&w.campaignOffers.length>0&&Q&&t.createElement("div",{className:[n.MiddlePhaseOverlay,re?n.MiddlePhaseOverlayPopup:""].join(" ")}),w.campaignOffers&&!!w.campaignOffers.length&&w.isCampaignOfferLoaded&&t.createElement("div",{className:[n.CampaignOfferMain,re?n.OverlayPopupMain:""].join(" ")},t.createElement("div",{className:n.OfferSlider},w.campaignOffers.map((function(e,a){var o;return t.createElement(h,{vm:w,campaignOffer:e,index:a,activeIndex:K,offersLength:(null===(o=w.campaignOffers)||void 0===o?void 0:o.length)||0,handlePrev:B,handleNext:G,setActiveIndex:function(e){return V(e)},isPopupShow:re,closePopup:function(){return z(!1)},isPopupClosed:ie,showPopup:function(){return z(!0)},step:w.step})}))),w.campaignOffers.length>1&&t.createElement(j,{handlePrev:B,handleNext:G}),w.campaignOffers.length>1&&t.createElement(N,{isPopupShow:re,vm:w,activeIndex:K})),t.createElement("div",{className:n.StepSuccess},t.createElement("div",{className:n.SuccessTitleContainer},t.createElement(r,{className:n.SuccessCircle}),t.createElement("span",{className:n.SuccessTitle},Y("checkout-page:orderSuccessTitle"))),t.createElement("div",{className:n.SuccessSubTitle},Y(w.isDigitalOnly?"checkout-page:orderSuccessDigitalOnlyDescription":"address"===w.deliveryMethod?"checkout-page:orderSuccessDescription":"checkout-page:orderSuccessInStoreDeliveryDescription",{customerName:J})),w.productFiles.length>0&&t.createElement(y,{vm:w}),t.createElement("div",null,t.createElement("div",{className:n.OrderSummaryMain},t.createElement("div",null,t.createElement("span",{className:n.InfoTitle},Y("checkout-page:orderNo")),t.createElement("span",{className:n.InfoText},"#"+(w.checkout.orderNumber||""))),t.createElement("div",null,t.createElement("span",{className:n.InfoTitle},Y("checkout-page:orderDate")),t.createElement("span",{className:n.InfoText},w.checkout.dateStr)),t.createElement("div",{className:n.OrderAmountInfoMain},t.createElement("span",{className:n.InfoTitle},Y("checkout-page:orderAmount")),t.createElement("span",{className:n.OrderAmountInfo},t.createElement("span",null,"".concat(u(w.finalPrice||0,w.checkout.currencyCode,w.checkout.currencySymbol))),t.createElement("span",{className:n.Slash},"/"),t.createElement("span",{className:n.OrderItemCount},t.createElement(I,null),t.createElement("span",null," ",w.checkout.itemQuantity," ",Y("checkout-page:cartItemProduct"))))))),w.hasQuickRegistration&&t.createElement(k,{vm:w}),t.createElement("div",{className:n.HideOnDesktop},t.createElement(i,{title:Y("checkout-page:summary")},se)),t.createElement(i,{expanded:!0,title:Y("checkout-page:paymentSummary")},oe),!w.isDigitalOnly&&t.createElement(i,{title:Y("checkout-page:shippingSummary")},ne),t.createElement("div",{className:n.Actions},t.createElement("div",{className:n.HelpText},t.createElement("span",null,Y("checkout-page:helpCtaQuestion")),t.createElement("span",{style:{marginLeft:"4px"},className:n.Cta,onClick:function(){return w.setContactModalVisible(!0)}},Y("checkout-page:helpCta"))),t.createElement(o,{href:w.getBackToShoppingHref(),text:Y("checkout-page:actions.backToShopping"),style:{flex:"0 0 auto"}}))))}));a((function(e){var a,o=e.vm,s=p().t,r=n.Yellow;switch(o.checkout.orderPackageStatus){case g.FULFILLED:case g.PARTIALLY_FULFILLED:case g.DELIVERED:case g.PARTIALLY_DELIVERED:r=n.Green;break;case g.CANCELLED:case g.PARTIALLY_CANCELLED:case g.CANCEL_REJECTED:case g.CANCEL_REQUESTED:r=n.Red}return t.createElement("div",{className:[n.OrderStatus,r].join(" ")},o.checkout.orderPackageStatus?null===(a=[{types:[g.UNFULFILLED],text:s("checkout-page:orderPackageStatus.unfulfilled")},{types:[g.READY_FOR_SHIPMENT],text:s("checkout-page:orderPackageStatus.readyForShipment")},{types:[g.PARTIALLY_FULFILLED],text:s("checkout-page:orderPackageStatus.partiallyFulfilled")},{types:[g.FULFILLED],text:s("checkout-page:orderPackageStatus.fulfilled")},{types:[g.DELIVERED],text:s("checkout-page:orderPackageStatus.delivered")},{types:[g.PARTIALLY_DELIVERED],text:s("checkout-page:orderPackageStatus.partiallyDelivered")},{types:[g.UNABLE_TO_DELIVER],text:s("checkout-page:orderPackageStatus.unableToDeliver")},{types:[g.CANCELLED,g.PARTIALLY_CANCELLED],text:s("checkout-page:orderPackageStatus.cancelled")},{types:[g.CANCEL_REJECTED],text:s("checkout-page:orderPackageStatus.cancelRejected")},{types:[g.REFUNDED,g.PARTIALLY_REFUNDED],text:s("checkout-page:orderPackageStatus.refunded")},{types:[g.REFUND_REQUEST_ACCEPTED],text:s("checkout-page:orderPackageStatus.refundRequestAccepted")},{types:[g.REFUND_REJECTED],text:s("checkout-page:orderPackageStatus.refundRejected")},{types:[g.REFUND_REQUESTED],text:s("checkout-page:orderPackageStatus.refundRequested")}].find((function(e){return e.types.includes(o.checkout.orderPackageStatus)})))||void 0===a?void 0:a.text:"")}));export{C as SENT_CART_IDS_LS_KEY,D as StepSuccess};
|
|
1
|
+
import{__spreadArray as e}from'./../../../../ext/tslib/tslib.es6.js';import*as t from"react";import{observer as a}from"mobx-react-lite";import{Button as o}from"../../components/button/index.js";import{CART_LS_KEY as s}from"../../../../store/cart/index.js";import n 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 l from"../../components/credit-card-form/svg/master-card.js";import d from"../../components/credit-card-form/svg/troy.js";import m from"../../components/credit-card-form/svg/visa.js";import"@ikas/storefront-config";import{formatCurrency as u}from"../../../../utils/currency.js";import{useTranslation as p}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 v,IkasPaymentGatewayType as f,IkasOrderPackageStatus as g,IkasTransactionCardAssociation as E}from"@ikas/storefront-models";import"mobx";import"../../../../models/data/campaign-offer/index.js";import"../../../../models/data/cart/campaign-offer/index.js";import"../../../../models/data/cart/index.js";import"../../../../models/data/category/path-item/index.js";import"../../../../models/data/category/index.js";import"../../../../models/data/checkout/index.js";import"../../../../models/data/checkout-settings/index.js";import"../../../../models/data/city/index.js";import"../../../../models/data/country/index.js";import"../../../../models/data/customer/address/region/index.js";import"../../../../models/data/customer/address/index.js";import"../../../../models/data/customer/address/ikas-localized-customer-address.js";import"../../../../models/data/customer/attribute/index.js";import"../../../../models/data/customer/review/summary/index.js";import"../../../../models/data/customer/review/index.js";import"../../../../models/data/customer/index.js";import"../../../../models/data/customer-form-data-input/index.js";import"../../../../models/data/district/index.js";import"../../../../models/data/favorite-product/index.js";import"../../../../models/data/filter-category/index.js";import"../../../../models/data/html-meta-data/index.js";import"../../../../models/data/image/index.js";import"../../../../models/data/order/address/region/index.js";import"../../../../models/data/order/address/index.js";import"../../../../models/data/order/line-item/option/value/index.js";import"../../../../models/data/order/line-item/variant/value/index.js";import"../../../../models/data/order/line-item/variant/index.js";import"../../../../models/data/order/line-item/index.js";import"../../../../models/data/order/order-transaction-with-prices/index.js";import"../../../../models/data/order/package/index.js";import"../../../../models/data/order/transaction/index.js";import"../../../../models/data/order/index.js";import"../../../../models/data/payment-gateway/index.js";import"../../../../models/data/product/attribute-value/index.js";import"../../../../models/data/product/filter/index.js";import"../../../../models/data/product/campaign-offer/index.js";import"../../../../models/data/product/option-set/option/index.js";import"../../../../models/data/product/option-set/index.js";import"../../../../models/data/product/stock-location/index.js";import"../../../../models/data/product/variant/price/index.js";import"../../../../models/data/product/variant/index.js";import"../../../../models/data/variant-type/index.js";import"../../../../models/data/product/index.js";import"../../../../models/data/raffle/index.js";import"../../../../models/data/shipping-zone/state/city/district/region/index.js";import"../../../../models/data/state/index.js";import"../../../../models/data/storefront-popup/storefront-popup-display-settings/index.js";import"../../../../models/data/storefront-popup/storefront-popup-page-filter/index.js";import"../../../../models/data/storefront-popup/index.js";import"../../../../models/data/theme-json/index.js";import"../../../../models/data/theme-json/component/index.js";import"../../../../models/data/theme-json/custom-data/index.js";import"../../../../models/data/variant-type/variant-value/index.js";import"@ikas/localized-address";import"../../../../models/ui/blog-list/index.js";import"../../../../models/ui/blog-category-list/index.js";import"../../../../models/ui/brand-list/index.js";import"../../../../models/ui/category-list/index.js";import"../../../../models/ui/product-list/index.js";import"../../../../models/ui/product-attribute-detail/index.js";import"../../../../models/ui/product-attribute-list/index.js";import"../../../../models/ui/customer-review-list/index.js";import"../../../../models/ui/customer-review-summary-list/index.js";import"../../../../models/ui/validator/index.js";import"../../../../models/ui/validator/rules/index.js";import"../../../../models/ui/validator/form/login.js";import"../../../../models/ui/validator/form/address.js";import"../../../../models/ui/validator/form/ikas-address.js";import"../../../../models/ui/validator/form/register.js";import"../../../../models/ui/validator/form/contact-form.js";import"../../../../models/ui/validator/form/forgot-password.js";import"../../../../models/ui/validator/form/recover-password.js";import"../../../../models/ui/validator/form/account-info.js";import"../../../../models/ui/validator/form/raffle-form.js";import"../../../../models/ui/validator/form/customer-review.js";import"../../../../models/ui/raffle-list/index.js";import h from"../../components/offer-product/index.js";import{MILES_SMILES_PAYMENT_GATEWAY_CODE as x}from"@ikas/storefront-api";import{Analytics as k}from"../../../../analytics/analytics.js";import"../../../../analytics/head/index.js";import{QuickRegistration as y}from"../../components/quick-registration/index.js";import{ProductFiles as j}from"../../components/product-files/index.js";import N from"../../components/offer-product/offer-arrows/index.js";import I from"../../components/offer-product/offer-dots/index.js";import T from"../../components/svg/shopping-bag.js";import{CartSummary as A}from"../../components/cart-summary/index.js";import C from"../../components/offer-product/useCampaignOffer.js";var D="eventSentCartIds",P=a((function(a){var g,D,P,S,L,R,b,M,O,_,F,w,Y,U=a.vm,G=p().t,V=C(U,!0),z=V.setActiveIndex,B=V.setIsActiveOverlay,H=V.handlePrev,K=V.handleNext,Q=V.isActiveOverlay,J=V.activeIndex,q=V.isMobile;t.useEffect((function(){if("undefined"!=typeof localStorage){var t=localStorage.getItem(s),a=localStorage.getItem("eventSentCartIds");if(t&&t===U.checkout.id){if(U.successTransaction){var o=JSON.parse(a||"[]");if(!o.some((function(e){return e===U.checkout.id}))){var n=U.checkout.orderedAt,r=Date.now();Math.floor(Math.abs(r-n)/1e3)<30&&k.purchase(U.checkout,U.successTransaction),localStorage.setItem("eventSentCartIds",JSON.stringify(e(e([],o,!0),[U.checkout.id],!1)))}}localStorage.removeItem(s)}window&&window.handleKlarna&&window.handleKlarna(void 0)}}),[]);var X=((null===(g=U.checkout.customer)||void 0===g?void 0:g.firstName)||"")+" "+((null===(D=U.checkout.customer)||void 0===D?void 0:D.lastName)||""),W=((null===(P=U.checkout.shippingAddress)||void 0===P?void 0:P.firstName)||"")+" "+((null===(S=U.checkout.shippingAddress)||void 0===S?void 0:S.lastName)||""),Z=U.paymentGateways.find((function(e){var t;return e.id===(null===(t=U.successTransaction)||void 0===t?void 0:t.paymentGatewayId)})),$=function(e){var a,o;switch(e||(null===(o=null===(a=U.successTransaction)||void 0===a?void 0:a.paymentMethodDetail)||void 0===o?void 0:o.cardAssociation)){case E.AMERICAN_EXPRESS:return t.createElement(c,null);case E.MASTER_CARD:return t.createElement(l,null);case E.TROY:return t.createElement(d,null);case E.VISA:return t.createElement(m,null);default:return t.createElement("div",null)}},ee=function(e){switch(e){case v.APP_PAYMENT:return G("checkout-page:appPayment");case v.BANK_REDIRECT:return G("checkout-page:bankRedirect");case v.BUY_ONLINE_PAY_AT_STORE:return G("checkout-page:buyOnlinePayAtStore");case v.CASH:return G("checkout-page:cash");case v.CASH_ON_DELIVERY:return G("checkout-page:cashOnDelivery");case v.CREDIT_CARD:return G("checkout-page:creditCard");case v.CREDIT_CARD_ON_DELIVERY:return G("checkout-page:creditCardOnDelivery");case v.DIRECT_DEBIT:return G("checkout-page:directDebit");case v.GIFT_CARD:return G("checkout-page:giftCard");case v.MONEY_ORDER:return G("checkout-page:moneyOrder");case v.OTHER:return G("checkout-page:other");case v.PAY_LATER:return G("checkout-page:payLater");case v.SLICE_IT:return G("checkout-page:sliceIt");case v.WALLET:return G("checkout-page:wallet");default:return""}},te=null===(L=U.successTransaction)||void 0===L?void 0:L.paymentMethodDetail,ae=null===(R=U.successTransaction)||void 0===R?void 0:R.paymentGatewayCode,oe=null===(b=U.successTransactions)||void 0===b?void 0:b.some((function(e){return e.paymentMethod===v.GIFT_CARD})),se=null===(M=U.successTransactions)||void 0===M?void 0:M.some((function(e){return e.paymentGatewayCode===x})),ne=t.useMemo((function(){var e;return null===(e=U.successTransactions)||void 0===e?void 0:e.map((function(e){var a,o,s;return t.createElement(t.Fragment,null,t.createElement("div",{className:n.InfoText},e.paymentGatewayCode===x?"".concat(G("checkout-page:milesSmilesPaymentLabel")," · ").concat(e.formattedAmount):ee(e.paymentMethod)),e.paymentMethod===v.CREDIT_CARD&&t.createElement(t.Fragment,null,t.createElement("div",{className:n.InfoText},t.createElement("div",{className:n.CardLogoContainer},$(null===(a=e.paymentMethodDetail)||void 0===a?void 0:a.cardAssociation)),t.createElement("span",null,"**** ".concat((null==te?void 0:te.lastFourDigits)||""))),(null===(s=null===(o=e.paymentMethodDetail)||void 0===o?void 0:o.installment)||void 0===s?void 0:s.installmentCount)&&e.paymentMethodDetail.installment.installmentCount>1&&t.createElement(t.Fragment,null,t.createElement("div",{className:n.InfoText},"".concat(e.paymentMethodDetail.installment.installmentCount," ").concat(G("checkout-page:installments"))),null!==e.paymentMethodDetail.installment.installmentPrice&&t.createElement("div",{className:n.InfoText},"".concat(e.paymentMethodDetail.installment.installmentCount," x ").concat(u(e.paymentMethodDetail.installment.installmentPrice,U.checkout.currencyCode,U.checkout.currencySymbol))))))}))}),[]),re=t.useMemo((function(){var e,a,o,s,r,i,c,l,d,m;return t.createElement("div",{className:[n.InfoGrid].join(" ")},(!U.isFree||se)&&t.createElement("div",{className:n.PaymentMethodMain},t.createElement("div",{className:n.InfoTitle},G("checkout-page:paymentMethod")),oe||se?ne:t.createElement(t.Fragment,null,Z&&t.createElement(t.Fragment,null,!!Z.logoUrl&&t.createElement("div",{className:n.PaymentLogoContainer},t.createElement("img",{src:Z.logoUrl})),!Z.logoUrl&&t.createElement("div",{className:n.InfoText},Z.paymentMethodType===v.CREDIT_CARD&&Z.type===f.INTERNAL?G("checkout-page:creditCard"):Z.name),"STRIPE"!==Z.code&&"STRIPE_EU"!==Z.code&&"PAYPAL"!==Z.code&&"KLARNA"!==Z.code||!(null===(e=U.successTransaction)||void 0===e?void 0:e.paymentMethod)?!!Z.description&&Z.type!==f.EXTERNAL&&t.createElement("div",{className:n.InfoText},t.createElement("div",{dangerouslySetInnerHTML:{__html:Z.description}})):t.createElement("div",{className:n.InfoText},ee(U.successTransaction.paymentMethod))),"E_PAY_KOLAY"===ae&&t.createElement(t.Fragment,null,t.createElement("div",{className:n.EPayKolayLogoContainer},t.createElement("img",{src:"https://cdn.myikas.com/sf/assets/payment/epaykolay.png"})),!!(null===(a=U.successTransaction)||void 0===a?void 0:a.paymentMethod)&&t.createElement("div",{className:n.InfoText},ee(null===(o=U.successTransaction)||void 0===o?void 0:o.paymentMethod))),"E_PAY_KOLAY"!==ae&&"STRIPE"!==ae&&"STRIPE_EU"!==ae&&"PAYPAL"!==ae&&"KLARNA"!==ae&&"CREDIT_CARD"===(null===(s=U.successTransaction)||void 0===s?void 0:s.paymentMethod)&&t.createElement(t.Fragment,null,t.createElement("div",{className:n.InfoText},t.createElement("div",{className:n.CardLogoContainer},$()),t.createElement("span",null,"**** ".concat((null==te?void 0:te.lastFourDigits)||""))),(null===(r=null==te?void 0:te.installment)||void 0===r?void 0:r.installmentCount)&&te.installment.installmentCount>1&&t.createElement(t.Fragment,null,t.createElement("div",{className:n.InfoText},"".concat(te.installment.installmentCount," ").concat(G("checkout-page:installments"))),null!==te.installment.installmentPrice&&t.createElement("div",{className:n.InfoText},"".concat(te.installment.installmentCount," x ").concat(u(te.installment.installmentPrice,U.checkout.currencyCode,U.checkout.currencySymbol))))))),!!U.isFree&&!!oe&&t.createElement("div",{className:n.PaymentMethodMain},t.createElement("div",{className:n.InfoTitle},G("checkout-page:paymentMethod")),ne),t.createElement("div",null,t.createElement("div",{className:n.InfoTitle},G("checkout-page:billingAddress")),!!(null===(i=U.checkout.billingAddress)||void 0===i?void 0:i.firstName)&&t.createElement("div",{className:[n.InfoText,n.InfoTextPrimary].join(" ")},U.checkout.billingAddress.firstName," ",U.checkout.billingAddress.lastName),!!(null===(c=U.checkout.billingAddress)||void 0===c?void 0:c.company)&&t.createElement("div",{className:n.InfoText},U.checkout.billingAddress.company),(!!(null===(l=U.checkout.billingAddress)||void 0===l?void 0:l.taxOffice)||!!(null===(d=U.checkout.billingAddress)||void 0===d?void 0:d.taxNumber))&&t.createElement("div",{className:n.InfoText},U.checkout.billingAddress.taxOffice," ",U.checkout.billingAddress.taxNumber),t.createElement("div",{className:n.InfoText},null===(m=U.checkout.billingAddress)||void 0===m?void 0:m.addressText)))}),[]),ie=t.useMemo((function(){return t.createElement(A,{vm:U,isSuccessPageSummary:!0})}),[]),ce=t.useMemo((function(){var e,a,o,s,r,i;return t.createElement("div",{className:[n.InfoGrid].join(" ")},t.createElement("div",null,t.createElement("div",{className:n.InfoTitle},G("checkout-page:contactInfo")),t.createElement("div",{className:n.InfoText},null===(e=U.checkout.customer)||void 0===e?void 0:e.email),t.createElement("div",{className:n.InfoText},X),!!(null===(a=U.checkout.shippingAddress)||void 0===a?void 0:a.phone)&&t.createElement("div",{className:n.InfoText},null===(o=U.checkout.shippingAddress)||void 0===o?void 0:o.phone)),t.createElement("div",null,"in-store"===U.deliveryMethod&&t.createElement(t.Fragment,null,t.createElement("div",{className:n.InfoTitle},G("checkout-page:receiver")),t.createElement("div",{className:[n.InfoText,n.withMBottom].join(" ")},W)),t.createElement("div",{className:n.InfoTitle},"address"===U.deliveryMethod?G("checkout-page:shippingAddress"):G("checkout-page:pickUpLocation")),!!(null===(s=U.checkout.shippingAddress)||void 0===s?void 0:s.firstName)&&t.createElement("div",{className:[n.InfoText,n.InfoTextPrimary].join(" ")},U.checkout.shippingAddress.firstName," ",U.checkout.shippingAddress.lastName),!!(null===(r=U.checkout.shippingAddress)||void 0===r?void 0:r.company)&&t.createElement("div",{className:n.InfoText},U.checkout.shippingAddress.company),t.createElement("div",{className:n.InfoText},null===(i=U.checkout.shippingAddress)||void 0===i?void 0:i.addressText)))}),[]),le=!!(null===(O=U.customizationProps)||void 0===O?void 0:O.campaignOffersEnableMiddlePhase)&&!!(null===(_=U.customizationProps)||void 0===_?void 0:_.showCampaignIsBiggerImage)&&q&&Q,de=!!(null===(F=U.customizationProps)||void 0===F?void 0:F.campaignOffersEnableMiddlePhase)&&!!(null===(w=U.customizationProps)||void 0===w?void 0:w.showCampaignIsBiggerImage)&&q&&!Q;return t.createElement(t.Fragment,null,!!(null===(Y=U.customizationProps)||void 0===Y?void 0:Y.campaignOffersEnableMiddlePhase)&&Q&&U.campaignOffers&&U.campaignOffers.length>0&&q&&t.createElement("div",{className:[n.MiddlePhaseOverlay,le?n.MiddlePhaseOverlayPopup:""].join(" ")}),U.campaignOffers&&!!U.campaignOffers.length&&U.isCampaignOfferLoaded&&t.createElement("div",{className:[n.CampaignOfferMain,le?n.OverlayPopupMain:""].join(" ")},t.createElement("div",{className:n.OfferSlider},U.campaignOffers.map((function(e,a){var o;return t.createElement(h,{vm:U,campaignOffer:e,index:a,activeIndex:J,offersLength:(null===(o=U.campaignOffers)||void 0===o?void 0:o.length)||0,handlePrev:H,handleNext:K,setActiveIndex:function(e){return z(e)},isPopupShow:le,closePopup:function(){return B(!1)},isPopupClosed:de,showPopup:function(){return B(!0)},step:U.step})}))),U.campaignOffers.length>1&&t.createElement(N,{handlePrev:H,handleNext:K}),U.campaignOffers.length>1&&t.createElement(I,{isPopupShow:le,vm:U,activeIndex:J})),t.createElement("div",{className:n.StepSuccess},t.createElement("div",{className:n.SuccessTitleContainer},t.createElement(r,{className:n.SuccessCircle}),t.createElement("span",{className:n.SuccessTitle},G("checkout-page:orderSuccessTitle"))),t.createElement("div",{className:n.SuccessSubTitle},G(U.isDigitalOnly?"checkout-page:orderSuccessDigitalOnlyDescription":"address"===U.deliveryMethod?"checkout-page:orderSuccessDescription":"checkout-page:orderSuccessInStoreDeliveryDescription",{customerName:X})),U.productFiles.length>0&&t.createElement(j,{vm:U}),t.createElement("div",null,t.createElement("div",{className:n.OrderSummaryMain},t.createElement("div",null,t.createElement("span",{className:n.InfoTitle},G("checkout-page:orderNo")),t.createElement("span",{className:n.InfoText},"#"+(U.checkout.orderNumber||""))),t.createElement("div",null,t.createElement("span",{className:n.InfoTitle},G("checkout-page:orderDate")),t.createElement("span",{className:n.InfoText},U.checkout.dateStr)),t.createElement("div",{className:n.OrderAmountInfoMain},t.createElement("span",{className:n.InfoTitle},G("checkout-page:orderAmount")),t.createElement("span",{className:n.OrderAmountInfo},t.createElement("span",null,"".concat(u(U.finalPrice||0,U.checkout.currencyCode,U.checkout.currencySymbol))),t.createElement("span",{className:n.Slash},"/"),t.createElement("span",{className:n.OrderItemCount},t.createElement(T,null),t.createElement("span",null," ",U.checkout.itemQuantity," ",G("checkout-page:cartItemProduct"))))))),U.hasQuickRegistration&&t.createElement(y,{vm:U}),t.createElement("div",{className:n.HideOnDesktop},t.createElement(i,{title:G("checkout-page:summary")},ie)),t.createElement(i,{expanded:!0,title:G("checkout-page:paymentSummary")},re),!U.isDigitalOnly&&t.createElement(i,{title:G("checkout-page:shippingSummary")},ce),t.createElement("div",{className:n.Actions},t.createElement("div",{className:n.HelpText},t.createElement("span",null,G("checkout-page:helpCtaQuestion")),t.createElement("span",{style:{marginLeft:"4px"},className:n.Cta,onClick:function(){return U.setContactModalVisible(!0)}},G("checkout-page:helpCta"))),t.createElement(o,{href:U.getBackToShoppingHref(),text:G("checkout-page:actions.backToShopping"),style:{flex:"0 0 auto"}}))))}));a((function(e){var a,o=e.vm,s=p().t,r=n.Yellow;switch(o.checkout.orderPackageStatus){case g.FULFILLED:case g.PARTIALLY_FULFILLED:case g.DELIVERED:case g.PARTIALLY_DELIVERED:r=n.Green;break;case g.CANCELLED:case g.PARTIALLY_CANCELLED:case g.CANCEL_REJECTED:case g.CANCEL_REQUESTED:r=n.Red}return t.createElement("div",{className:[n.OrderStatus,r].join(" ")},o.checkout.orderPackageStatus?null===(a=[{types:[g.UNFULFILLED],text:s("checkout-page:orderPackageStatus.unfulfilled")},{types:[g.READY_FOR_SHIPMENT],text:s("checkout-page:orderPackageStatus.readyForShipment")},{types:[g.PARTIALLY_FULFILLED],text:s("checkout-page:orderPackageStatus.partiallyFulfilled")},{types:[g.FULFILLED],text:s("checkout-page:orderPackageStatus.fulfilled")},{types:[g.DELIVERED],text:s("checkout-page:orderPackageStatus.delivered")},{types:[g.PARTIALLY_DELIVERED],text:s("checkout-page:orderPackageStatus.partiallyDelivered")},{types:[g.UNABLE_TO_DELIVER],text:s("checkout-page:orderPackageStatus.unableToDeliver")},{types:[g.CANCELLED,g.PARTIALLY_CANCELLED],text:s("checkout-page:orderPackageStatus.cancelled")},{types:[g.CANCEL_REJECTED],text:s("checkout-page:orderPackageStatus.cancelRejected")},{types:[g.REFUNDED,g.PARTIALLY_REFUNDED],text:s("checkout-page:orderPackageStatus.refunded")},{types:[g.REFUND_REQUEST_ACCEPTED],text:s("checkout-page:orderPackageStatus.refundRequestAccepted")},{types:[g.REFUND_REJECTED],text:s("checkout-page:orderPackageStatus.refundRejected")},{types:[g.REFUND_REQUESTED],text:s("checkout-page:orderPackageStatus.refundRequested")}].find((function(e){return e.types.includes(o.checkout.orderPackageStatus)})))||void 0===a?void 0:a.text:"")}));export{D as SENT_CART_IDS_LS_KEY,P as StepSuccess};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__awaiter as t,__generator as n}from'./../../../ext/tslib/tslib.es6.js';import*as e from"react";import{StorefrontWidgetSettingsStatusEnum as r,getStorefrontWidgetSettings as i,listEarningMethods as o,
|
|
1
|
+
import{__awaiter as t,__generator as n}from'./../../../ext/tslib/tslib.es6.js';import*as e from"react";import{StorefrontWidgetSettingsStatusEnum as r,getStorefrontWidgetSettings as i,listEarningMethods as o,getLoyaltyProgram as a,listLoyaltyProgramTiers as s,listSpendingMethodsByCartId as u,getLoyaltyCustomerInfo as c,listLoyaltyProgramPointHistory as d,useLoyaltyPoints as l,removeLoyaltyPointsFromCart as v}from"@ikas/storefront-api";import{IkasStorefrontConfig as f}from"@ikas/storefront-config";import{IkasBaseStore as g}from"../../../store/base.js";import"../../../store/customer/index.js";import"../../../store/cart/index.js";import m from"../../../store/product/index.js";import h from"../../../store/category/index.js";import y from"../../../store/brand/index.js";import{resolveStoreUrl as p}from"./common.js";import{formatCurrency as w}from"../../../utils/currency.js";import"lodash/get";function I(e){var r,p=this,I=g.getInstance(),S=function(){var t;return null===(t=I.cartStore.cart)||void 0===t?void 0:t.id},b=function(){var t;return!!(null===(t=I.customerStore.customer)||void 0===t?void 0:t.id)},L=function(t){var n,e=null!==(n=null==t?void 0:t.themeSettingsJson)&&void 0!==n?n:t;if(!e)throw new Error("Loyalty widget settings not found");if("string"==typeof e)try{return JSON.parse(e)}catch(t){throw new Error("Loyalty widget settings format is invalid")}return e};return{getLoyaltyWidget:function(){return t(p,void 0,void 0,(function(){var t;return n(this,(function(n){switch(n.label){case 0:return e?[2,L(e)]:[4,i()];case 1:if((t=n.sent()).isSuccess&&t.data)return[2,L(t.data)];throw new Error("Loyalty widget settings not found")}}))}))},subscribeToMarketingNotifications:function(){return t(p,void 0,void 0,(function(){var t;return n(this,(function(n){switch(n.label){case 0:return[4,g.getInstance().customerStore.createEmailSubscription((null===(t=g.getInstance().customerStore.customer)||void 0===t?void 0:t.email)||"")];case 1:return[2,n.sent()]}}))}))},listEarningMethods:function(){return t(p,void 0,void 0,(function(){return n(this,(function(t){switch(t.label){case 0:return[4,o()];case 1:return[2,t.sent().data||[]]}}))}))},getLoyaltyProgram:function(){return t(p,void 0,void 0,(function(){var t;return n(this,(function(n){switch(n.label){case 0:return[4,a()];case 1:return[2,(t=n.sent()).data?{id:t.data.id,waitingPeriodDays:t.data.waitingPeriodDays}:null]}}))}))},listLoyaltyProgramTier:function(e){return t(p,void 0,void 0,(function(){return n(this,(function(t){switch(t.label){case 0:return[4,s()];case 1:return[2,t.sent().data||[]]}}))}))},listSpendingMethodsByCartId:function(e){return t(p,void 0,void 0,(function(){return n(this,(function(t){switch(t.label){case 0:return b()?[4,u({cartId:e||S()})]:[2,[]];case 1:return[2,t.sent().data||[]]}}))}))},getLoyaltyCustomerInfo:function(){return t(p,void 0,void 0,(function(){return n(this,(function(t){switch(t.label){case 0:return b()?[4,c({cartId:S()||null})]:[2,null];case 1:return[2,t.sent().data||null]}}))}))},listLoyaltyProgramPointHistory:function(e){return t(p,void 0,void 0,(function(){var t,r;return n(this,(function(n){switch(n.label){case 0:return b()?(t={},(r=null==e?void 0:e.type)&&(t.type=Array.isArray(r)?{in:r}:{eq:r}),[4,d(t)]):[2,[]];case 1:return[2,n.sent().data||[]]}}))}))},useLoyaltyPoints:function(e){return t(p,void 0,void 0,(function(){var t;return n(this,(function(n){switch(n.label){case 0:return b()?[4,l({input:e})]:[2,!1];case 1:return(t=n.sent()).isSuccess?(r=e.loyaltySpendingMethodId,[4,I.cartStore.getCart()]):[3,3];case 2:n.sent(),n.label=3;case 3:return[2,!!t.isSuccess]}}))}))},removeLoyaltyPointsFromCart:function(){return t(p,void 0,void 0,(function(){var t,e,i,o,a;return n(this,(function(n){switch(n.label){case 0:return b()?(t=S(),e=r||(null===(a=null===(o=null===(i=I.cartStore.cart)||void 0===i?void 0:i.loyaltyLines)||void 0===o?void 0:o[0])||void 0===a?void 0:a.loyaltySpendingMethodId),t&&e?[4,v({cartId:t,loyaltySpendingMethodId:e})]:[2]):[2];case 1:return n.sent().isSuccess?[4,I.cartStore.getCart()]:[3,3];case 2:n.sent(),n.label=3;case 3:return[2]}}))}))},getProducts:function(e){return t(p,void 0,void 0,(function(){var t,r;return n(this,(function(n){switch(n.label){case 0:return(null==e?void 0:e.length)?[4,m.searchProducts({input:{productIdList:e,page:1,perPage:e.length,priceListId:f.getPriceListId(),salesChannelId:f.getSalesChannelId()}},[])]:[2,[]];case 1:return t=n.sent(),[2,((null===(r=t.data)||void 0===r?void 0:r.data)||[]).map((function(t){var n,e,r,i,o,a,s;return{id:t.id,name:t.name,mainImageSrc:(null===(o=null===(i=null===(r=null===(e=null===(n=t.variants)||void 0===n?void 0:n[0])||void 0===e?void 0:e.images)||void 0===r?void 0:r.find((function(t){return t.isMain})))||void 0===i?void 0:i.image)||void 0===o?void 0:o.thumbnailSrc)||null,variants:(null===(a=t.variants)||void 0===a?void 0:a.map((function(t){var n,e,r,i;return{id:t.id,mainImageSrc:(null===(r=null===(e=null===(n=t.images)||void 0===n?void 0:n.find((function(t){return t.isMain})))||void 0===e?void 0:e.image)||void 0===r?void 0:r.thumbnailSrc)||null,variantText:(null===(i=t.variantValues)||void 0===i?void 0:i.map((function(t){return t.name})).join(" / "))||null}})))||[],url:null===(s=t.metaData)||void 0===s?void 0:s.slug}}))]}}))}))},getCategories:function(e){return t(p,void 0,void 0,(function(){var t,r,i;return n(this,(function(n){switch(n.label){case 0:return(null==e?void 0:e.length)?(t={id:{in:e},pagination:{limit:e.length,page:1}},[4,h.listCategory(t)]):[2,[]];case 1:return r=n.sent(),[2,(null===(i=r.data)||void 0===i?void 0:i.data)||[]]}}))}))},getBrands:function(e){return t(p,void 0,void 0,(function(){var t,r,i;return n(this,(function(n){switch(n.label){case 0:return(null==e?void 0:e.length)?(t={id:{in:e},pagination:{limit:e.length,page:1}},[4,y.listProductBrand(t)]):[2,[]];case 1:return r=n.sent(),[2,(null===(i=r.data)||void 0===i?void 0:i.data)||[]]}}))}))},getTags:function(e){return t(p,void 0,void 0,(function(){return n(this,(function(t){return[2,[]]}))}))},formatCurrency:function(t){return w(t,f.getDefaultCurrencyCode()||"TRY",f.getDefaultCurrencySymbol()||"TRY")}}}var S=function(){e.useEffect((function(){if("undefined"!=typeof window&&"undefined"!=typeof document){var e=!1,o=function(t){if("function"==typeof window.startIkasLoyaltyWidget)try{window.startIkasLoyaltyWidget(t)}catch(t){console.error("[@ikas/storefront] Failed to start loyalty widget",t)}},a=function(t){var n,r=(n=Date.now(),[window.location.href.includes("http://localhost:3333/")?"http://localhost:3000/storefront-widget-script-injector.iife.js":"".concat("/sf/assets/popup/storefront-widget-script-injector.iife.js","?v=").concat(n)])[0];if(r){var i=document.querySelector('script[data-ikas-loyalty-widget="true"]');if(i)"true"===i.dataset.loaded?o(t):i.addEventListener("load",(function(){return o(t)}),{once:!0});else{var a=document.createElement("script");a.src=r,a.defer=!0,a.setAttribute("data-ikas-loyalty-widget","true"),a.addEventListener("load",(function(){a.dataset.loaded="true",e||o(t)}),{once:!0}),a.addEventListener("error",(function(t){console.error("[@ikas/storefront] Failed to load loyalty widget script",r,t)}),{once:!0}),document.body.appendChild(a)}}};return t(void 0,void 0,void 0,(function(){var e,o,s,u,c,d;return n(this,(function(l){switch(l.label){case 0:return l.trys.push([0,3,,4]),(e=f.getLoyaltyPrograms()).length?(o=f.getStorefrontRoutingId(),s=[],e.forEach((function(t){var n;null===(n=t.salesChannels)||void 0===n||n.forEach((function(t){var n;null===(n=t.routingIds)||void 0===n||n.forEach((function(t){s.push(t)}))}))})),e.length>0&&o&&!s.some((function(t){return t===o}))?[2]:[4,i()]):[2];case 1:return(null==(u=l.sent())?void 0:u.isSuccess)&&u.data&&u.data.status===r.ACTIVE?[4,(v=u.data,t(void 0,void 0,void 0,(function(){var e,r,i,o,a,s,u;return n(this,(function(c){switch(c.label){case 0:return e={cdnURL:f.getCdnUrl()||"",merchantId:(null===(a=f.getMerchantSettings())||void 0===a?void 0:a.merchantId)||"",currency:f.getDefaultCurrencySymbol()||"TRY",callbacks:I(v),position:"fixed",storeURL:p()},[4,new Promise((function(t){var n=setInterval((function(){var e=f.getSessionId();e&&(clearInterval(n),t(e))}),100)}))];case 1:return c.sent(),[4,t(void 0,void 0,void 0,(function(){var t;return n(this,(function(n){switch(n.label){case 0:return(t=g.getInstance().cartStore).isCartLoadFinished?[2]:t.isLoadingCart?[4,new Promise((function(n){var e=setInterval((function(){t.isCartLoadFinished&&(clearInterval(e),n(null))}),100)}))]:[3,2];case 1:case 3:return n.sent(),[2];case 2:return[4,t.getCart()]}}))}))];case 2:return c.sent(),r=g.getInstance(),(i=null===(s=r.cartStore.cart)||void 0===s?void 0:s.id)&&(e.cartId=i),[4,r.customerStore.waitUntilInitialized()];case 3:return c.sent(),(o=null===(u=r.customerStore.customer)||void 0===u?void 0:u.id)&&(e.userId=o),v&&(e.widgetSettings=v),[2,e]}}))})))]:[2];case 2:return c=l.sent(),window.ikasLoyaltyWidgetConfig=c,a(c),[3,4];case 3:return d=l.sent(),console.error("[@ikas/storefront] Failed to initialize loyalty widget",d),[3,4];case 4:return[2]}var v}))})),function(){e=!0}}}),[])};export{S as useLoyaltyWidget};
|
package/build/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{Analytics}from"./analytics/analytics.js";export{AnalyticsBody,AnalyticsHead}from"./analytics/head/index.js";export{IkasPage}from"./components/page/index.js";export{IkasPageHead}from"./components/page/head.js";export{Image}from"./components/image/index.js";export{PlainImage}from"./components/plain-image/index.js";export{default as Link}from"./components/link/index.js";export{IkasEditorComponentLoader}from"./components/page-editor/loader/index.js";export{GoogleCaptcha}from"./components/google-captcha/index.js";export{PaypalExpressCheckout}from"./components/paypal-express-checkout/index.js";export{PayWithIkas}from"./components/pay-with-ikas/index.js";export{useStore}from"./hooks/useStore.js";export{useCustomerReviews}from"./hooks/useCustomerReviews.js";import"react";export{IkasBaseModel}from"./models/data/base/index.js";export{IkasBlogCategory}from"./models/data/blog/category/index.js";export{IkasBlogContent}from"./models/data/blog/content/index.js";export{IkasBlogMetaData,IkasBlogMetaDataTargetType}from"./models/data/blog/meta-data/index.js";export{IkasBlogTag}from"./models/data/blog/tag/index.js";export{IkasBlogWriter}from"./models/data/blog/writer/index.js";export{IkasBlog}from"./models/data/blog/index.js";export{IkasProductBrandTranslation}from"./models/data/brand/translation/index.js";export{IkasBrand,IkasBrandOrderType}from"./models/data/brand/index.js";export{IkasCampaignOfferProduct,IkasCampaignOfferProductTranslation}from"./models/data/campaign-offer/product/index.js";export{IkasCampaignOffer,IkasCampaignOfferTriggerSettings}from"./models/data/campaign-offer/index.js";export{IkasAvailableShippingMethod}from"./models/data/cart/available-shipping-method/index.js";export{IkasCartCampaignOffer}from"./models/data/cart/campaign-offer/index.js";export{IkasCart}from"./models/data/cart/index.js";export{IkasCategoryPathItem}from"./models/data/category/path-item/index.js";export{IkasCategoryTranslation}from"./models/data/category/translations/index.js";export{IkasCategory}from"./models/data/category/index.js";export{IkasCheckout}from"./models/data/checkout/index.js";export{IkasCheckoutOption}from"./models/data/checkout-settings/option/index.js";export{IkasCheckoutSettingsPrice}from"./models/data/checkout-settings/price/index.js";export{IkasCheckoutSettings}from"./models/data/checkout-settings/index.js";export{IkasCity}from"./models/data/city/index.js";export{IkasContactForm}from"./models/data/contact-form/index.js";export{IkasCountry}from"./models/data/country/index.js";export{IkasCustomerAddressCity}from"./models/data/customer/address/city/index.js";export{IkasCustomerAddressCountry}from"./models/data/customer/address/country/index.js";export{IkasCustomerAddressDistrict}from"./models/data/customer/address/district/index.js";export{IkasCustomerAddressRegion}from"./models/data/customer/address/region/index.js";export{IkasCustomerAddressState}from"./models/data/customer/address/state/index.js";export{IkasCustomerAddress}from"./models/data/customer/address/index.js";export{IkasLocalizedCustomerAddress}from"./models/data/customer/address/ikas-localized-customer-address.js";export{IkasCustomerAttributeOption}from"./models/data/customer/attribute/option/index.js";export{IkasCustomerAttributeSalesChannel}from"./models/data/customer/attribute/sales-channel/index.js";export{IkasCustomerAttributeOptionTranslation}from"./models/data/customer/attribute/translation/option/index.js";export{IkasCustomerAttributeTranslation}from"./models/data/customer/attribute/translation/index.js";export{IkasCustomerAttributeValue}from"./models/data/customer/attribute/value/index.js";export{IkasCustomerAttribute}from"./models/data/customer/attribute/index.js";export{IkasCustomerPriceListRuleFilter}from"./models/data/customer/price-list-rule/filter/index.js";export{IkasCustomerPriceListRule}from"./models/data/customer/price-list-rule/index.js";export{IkasCustomerReviewSettings}from"./models/data/customer/review/settings/index.js";export{IkasCustomerReviewSummaryStar}from"./models/data/customer/review/summary/star/index.js";export{IkasCustomerReviewSummary}from"./models/data/customer/review/summary/index.js";export{IkasCustomerReview}from"./models/data/customer/review/index.js";export{IkasCustomer}from"./models/data/customer/index.js";export{IkasCustomerRegisterSubscriptionInput}from"./models/data/customer-form-data-input/customer-register-subscription-input/index.js";export{IkasCustomerGenderTypeEnum,IkasSaveCustomerFormDataInput}from"./models/data/customer-form-data-input/index.js";export{IkasDistrict}from"./models/data/district/index.js";export{IkasFavoriteProduct}from"./models/data/favorite-product/index.js";export{IkasFilterCategory}from"./models/data/filter-category/index.js";export{IkasHTMLMetaDataTranslations}from"./models/data/html-meta-data/translations/index.js";export{IkasHTMLMetaData,IkasHTMLMetaDataOverride,IkasHTMLMetaDataTargetType}from"./models/data/html-meta-data/index.js";export{IkasImage}from"./models/data/image/index.js";export{IkasLastViewedProduct}from"./models/data/last-viewed-product/index.js";export{IkasMerchantSettings}from"./models/data/merchant-settings/index.js";export{IkasOrderAddressCity}from"./models/data/order/address/city/index.js";export{IkasOrderAddressCountry}from"./models/data/order/address/country/index.js";export{IkasOrderAddressDistrict}from"./models/data/order/address/district/index.js";export{IkasOrderAddressRegion}from"./models/data/order/address/region/index.js";export{IkasOrderAddressState}from"./models/data/order/address/state/index.js";export{IkasOrderAddress}from"./models/data/order/address/index.js";export{IkasOrderAdjustmentAppliedOrderLine}from"./models/data/order/adjustment/applied-order-line/index.js";export{IkasOrderAdjustment}from"./models/data/order/adjustment/index.js";export{IkasOrderCustomer}from"./models/data/order/customer/index.js";export{IkasOrderGiftPackageLine}from"./models/data/order/gift-line/index.js";export{IkasInvoice}from"./models/data/order/invoice/index.js";export{IkasOrderLineDiscount}from"./models/data/order/line-item/discount/index.js";export{IkasOrderLineItemOptionValue}from"./models/data/order/line-item/option/value/index.js";export{IkasOrderLineItemOption}from"./models/data/order/line-item/option/index.js";export{IkasOrderLineVariantBrand}from"./models/data/order/line-item/variant/brand/index.js";export{IkasOrderLineVariantCategory,IkasOrderLineVariantCategoryPath}from"./models/data/order/line-item/variant/category/index.js";export{IkasOrderLineVariantPrice}from"./models/data/order/line-item/variant/price/index.js";export{IkasOrderLineVariantVariantValue}from"./models/data/order/line-item/variant/value/index.js";export{IkasOrderLineVariant}from"./models/data/order/line-item/variant/index.js";export{IkasOrderLineItem}from"./models/data/order/line-item/index.js";export{IkasOrderTransactionWithPrices}from"./models/data/order/order-transaction-with-prices/index.js";export{IkasTrackingInfo}from"./models/data/order/package/tracking-info/index.js";export{IkasOrderPackage}from"./models/data/order/package/index.js";export{IkasOrderPaymentMethod}from"./models/data/order/payment-method/index.js";export{IkasOrderRefundOrderLineInput}from"./models/data/order/refund/line-item/index.js";export{IkasOrderRefundSettings}from"./models/data/order/refund/settings/index.js";export{IkasRefund}from"./models/data/order/refund/index.js";export{IkasOrderShippingLine}from"./models/data/order/shipping-line/index.js";export{IkasOrderTaxLine}from"./models/data/order/tax-line/index.js";export{IkasTransactionError}from"./models/data/order/transaction/error/index.js";export{IkasTransactionInstallmentPrice}from"./models/data/order/transaction/payment-method-detail/installment-price/index.js";export{IkasTransactionPaymentMethodDetail}from"./models/data/order/transaction/payment-method-detail/index.js";export{IkasOrderTransaction}from"./models/data/order/transaction/index.js";export{IkasOrder}from"./models/data/order/index.js";export{IkasPaymentGatewayAdditionalPrice}from"./models/data/payment-gateway/additional-price/index.js";export{IkasPaymentGatewaySettings}from"./models/data/payment-gateway/settings/index.js";export{IkasPaymentGatewayTranslation}from"./models/data/payment-gateway/translation/index.js";export{IkasPaymentGateway}from"./models/data/payment-gateway/index.js";export{IkasProductAttributeOption}from"./models/data/product/attribute/option/index.js";export{IkasProductAttributeTableCell}from"./models/data/product/attribute/table-cell/index.js";export{IkasProductAttributeTableTemplate}from"./models/data/product/attribute/table-template/index.js";export{IkasProductAttributeOptionTranslation,IkasProductAttributeTranslation}from"./models/data/product/attribute/translation/index.js";export{IkasProductAttribute}from"./models/data/product/attribute/index.js";export{IkasAttributeTableCellValue,IkasProductAttributeMap,IkasProductAttributeValue}from"./models/data/product/attribute-value/index.js";export{IkasProductBackInStockSettings}from"./models/data/product/back-in-stock-settings/index.js";export{IkasApplicableProductFilterValue,IkasFilterRangeValue,IkasProductFilter,IkasProductFilterNumberRangeListOption,IkasProductFilterSettings,IkasProductFilterValue,parseRangeStr}from"./models/data/product/filter/index.js";export{IkasProductCampaignData}from"./models/data/product/campaign/data/index.js";export{IkasProductCampaignFilter}from"./models/data/product/campaign/filter/index.js";export{IkasProductBuyX,IkasProductBuyXThenGetY,IkasProductGetY}from"./models/data/product/campaign/product-buyx-then-gety/index.js";export{IkasProductCampaignDateRangeField}from"./models/data/product/campaign/product-campaign-date-range-field/index.js";export{IkasCampaignMinMaxRangeField,IkasProductFixedDiscount}from"./models/data/product/campaign/product-fixed-discount/index.js";export{IkasProductCampaign}from"./models/data/product/campaign/index.js";export{IkasProductCampaignOffer,IkasProductOffer}from"./models/data/product/campaign-offer/index.js";export{IkasProductImage}from"./models/data/product/image/index.js";export{IkasProductOption,IkasProductOptionDateSettings,IkasProductOptionFileSettings,IkasProductOptionOtherPrice,IkasProductOptionSelectSettings,IkasProductOptionSelectValue,IkasProductOptionTextSettings}from"./models/data/product/option-set/option/index.js";export{IkasProductOptionSelectValueTranslations,IkasProductOptionSet,IkasProductOptionSetTranslations,IkasProductOptionTranslations}from"./models/data/product/option-set/index.js";export{IkasProductStockLocations}from"./models/data/product/stock-location/index.js";export{IkasProductTag}from"./models/data/product/tag/index.js";export{IkasProductPrice}from"./models/data/product/variant/price/index.js";export{IkasProductVariant}from"./models/data/product/variant/index.js";export{IkasProductVariantType}from"./models/data/product/variant-type/index.js";export{IkasProduct}from"./models/data/product/index.js";export{IkasProductFile}from"./models/data/product-file/index.js";export{IkasRaffle,IkasRaffleAppliedProduct,IkasRaffleDateRangeField,IkasRaffleMetaData,IkasRaffleParticipant}from"./models/data/raffle/index.js";export{IkasSalesChannel,IkasSalesChannelPaymentGateway,IkasSalesChannelStockLocation}from"./models/data/sales-channel/index.js";export{IkasShippingZoneRegion}from"./models/data/shipping-zone/state/city/district/region/index.js";export{IkasShippingZoneDistrict}from"./models/data/shipping-zone/state/city/district/index.js";export{IkasShippingZoneCity}from"./models/data/shipping-zone/state/city/index.js";export{IkasShippingZoneState}from"./models/data/shipping-zone/state/index.js";export{IkasShippingZone}from"./models/data/shipping-zone/index.js";export{IkasState}from"./models/data/state/index.js";export{IkasStockLocationAddressCity}from"./models/data/stock-location/address/city/index.js";export{IkasStockLocationAddressCountry}from"./models/data/stock-location/address/country/index.js";export{IkasStockLocationAddressDistrict}from"./models/data/stock-location/address/district/index.js";export{IkasStockLocationAddressState}from"./models/data/stock-location/address/state/index.js";export{IkasStockLocationAddress}from"./models/data/stock-location/address/index.js";export{IkasAvailableStockLocation}from"./models/data/stock-location/available/index.js";export{IkasStockLocation}from"./models/data/stock-location/index.js";export{IkasStoreCredit,IkasStoreCreditBalance,IkasStoreCreditSalesChannel}from"./models/data/store-credit-balance/index.js";export{IkasStorefrontPopupAnalytics}from"./models/data/storefront-popup/storefront-popup-analytics/index.js";export{IkasStorefrontPopupDateFilter}from"./models/data/storefront-popup/storefront-popup-date-filter/index.js";export{IkasStorefrontPopupDisplayFilter}from"./models/data/storefront-popup/storefront-popup-display-filter/index.js";export{IkasStorefrontPopupDisplayFrequencyEnum,IkasStorefrontPopupDisplaySettings,IkasStorefrontPopupDisplayTriggerTypeEnum}from"./models/data/storefront-popup/storefront-popup-display-settings/index.js";export{IkasStorefrontPopupPageFilter,IkasStorefrontPopupPageFilterTypeEnum}from"./models/data/storefront-popup/storefront-popup-page-filter/index.js";export{IkasStorefrontPopupRouting}from"./models/data/storefront-popup/storefront-popup-routing/index.js";export{IkasStorefrontPopup,IkasStorefrontPopupDeviceTypeEnum,IkasStorefrontPopupStatusEnum,IkasStorefrontPopupTypeEnum}from"./models/data/storefront-popup/index.js";export{IkasStorefrontB2BSettings}from"./models/data/storefront/b2b-settings/index.js";export{IkasStorefrontDomain}from"./models/data/storefront/domain/index.js";export{IkasIndexPageSeoSetting}from"./models/data/storefront/index-page-seo-setting/index.js";export{IkasStorefrontLocalization}from"./models/data/storefront/localization/index.js";export{IkasStorefrontDynamicCurrencySettings}from"./models/data/storefront/routing/dynamic-currency/index.js";export{IkasStorefrontRouting}from"./models/data/storefront/routing/index.js";export{IkasStorefrontTheme}from"./models/data/storefront/theme/index.js";export{IkasStorefrontThemeLocalization}from"./models/data/storefront/theme-localization/index.js";export{IkasStorefront}from"./models/data/storefront/index.js";export{IkasThemeJsonComponentProp}from"./models/data/theme-json/component/prop/index.js";export{ComponentTranslation,IkasThemeJsonComponent}from"./models/data/theme-json/component/index.js";export{IkasThemeJsonCustomData,IkasThemeJsonCustomDataEnumOptionTranslation,IkasThemeJsonCustomDataTranslation,IkasThemeJsonEnumOption}from"./models/data/theme-json/custom-data/index.js";export{IkasThemeJsonPageComponent}from"./models/data/theme-json/page/component/index.js";export{IkasThemeJsonPage,IkasThemeJsonPageSpecification}from"./models/data/theme-json/page/index.js";export{IkasThemeJsonColor,IkasThemeJsonColorTranslation}from"./models/data/theme-json/settings/color/index.js";export{IkasThemeJsonFavicon}from"./models/data/theme-json/settings/favicon/index.js";export{IkasThemeJsonFontFamily}from"./models/data/theme-json/settings/font-family/index.js";export{IkasThemeJsonSettings}from"./models/data/theme-json/settings/index.js";export{CHECKOUT_ID,IkasThemeJson}from"./models/data/theme-json/index.js";export{IkasVariantValue}from"./models/data/variant-type/variant-value/index.js";export{IkasVariantType}from"./models/data/variant-type/index.js";export{IkasVideo}from"./models/data/video/index.js";export{AddressFormItem,BillingFormItem}from"@ikas/localized-address";export{IkasBlogList,IkasBlogListType}from"./models/ui/blog-list/index.js";export{IkasBlogCategoryList,IkasBlogCategoryListType}from"./models/ui/blog-category-list/index.js";export{IkasBrandList,IkasBrandListSortType,IkasBrandListType}from"./models/ui/brand-list/index.js";export{IkasCategoryList,IkasCategoryListSortType,IkasCategoryListType}from"./models/ui/category-list/index.js";export{IkasNavigationLink}from"./models/ui/navigation-link/index.js";export{IkasProductList,IkasProductListSortByTypeEnum,IkasProductListSortType,IkasProductListType,IkasRelatedProductsType}from"./models/ui/product-list/index.js";export{IkasAttributeDetail}from"./models/ui/product-attribute-detail/index.js";export{IkasAttributeList}from"./models/ui/product-attribute-list/index.js";export{IkasCustomerReviewList}from"./models/ui/customer-review-list/index.js";export{IkasCustomerReviewSummaryList}from"./models/ui/customer-review-summary-list/index.js";export{Validator}from"./models/ui/validator/index.js";export{EmailRule,EqualsRule,IdentityNumberRule,LessThanRule,MaxRule,MinRule,PhoneRule,RequiredRule,ValidationRule,ValidatorErrorType}from"./models/ui/validator/rules/index.js";export{LoginForm}from"./models/ui/validator/form/login.js";export{AddressForm}from"./models/ui/validator/form/address.js";export{IkasAddressForm}from"./models/ui/validator/form/ikas-address.js";export{RegisterForm}from"./models/ui/validator/form/register.js";export{ContactForm}from"./models/ui/validator/form/contact-form.js";export{ForgotPasswordForm}from"./models/ui/validator/form/forgot-password.js";export{RecoverPasswordForm}from"./models/ui/validator/form/recover-password.js";export{AccountInfoForm}from"./models/ui/validator/form/account-info.js";export{RaffleForm}from"./models/ui/validator/form/raffle-form.js";export{CustomerReviewForm}from"./models/ui/validator/form/customer-review.js";export{IkasComponentRenderer}from"./models/ui/component-renderer/index.js";export{IkasRaffleList}from"./models/ui/raffle-list/index.js";import*as e from"./pages/home.js";export{e as IndexPage};import*as t from"./pages/_slug_/index.js";export{t as SlugPage};import*as o from"./pages/pages/_slug_.js";export{o as CustomPage};import*as a from"./pages/checkout.js";export{a as CheckoutPage};import*as r from"./pages/account/index.js";export{r as AccountPage};import*as s from"./pages/account/addresses.js";export{s as AddressesPage};import*as d from"./pages/account/orders/index.js";export{d as OrdersPage};import*as i from"./pages/account/orders/_id_.js";export{i as OrderDetailPage};import*as n from"./pages/account/login.js";export{n as LoginPage};import*as m from"./pages/account/register.js";export{m as RegisterPage};import*as p from"./pages/account/forgot-password.js";export{p as ForgotPasswordPage};import*as l from"./pages/account/recover-password.js";export{l as RecoverPasswordPage};import*as x from"./pages/cart.js";export{x as CartPage};import*as u from"./pages/editor.js";export{u as EditorPage};import*as c from"./pages/account/favorite-products.js";export{c as FavoriteProductsPage};import*as f from"./pages/search.js";export{f as SearchPage};import*as k from"./pages/404.js";export{k as NotFoundPage};import*as I from"./pages/blog/index.js";export{I as BlogPage};import*as g from"./pages/blog/_slug_.js";export{g as BlogSlugPage};import*as j from"./pages/raffle/_slug_.js";export{j as RafflePage};import*as y from"./pages/raffle/index.js";export{y as RafflesPage};import*as P from"./pages/account/raffles.js";export{P as AccountRafflesPage};import*as S from"./pages/account/activate.js";export{S as ActivateCustomerPage};export{IkasBaseStore}from"./store/base.js";export{IkasCustomerStore}from"./store/customer/index.js";export{IkasCartStore}from"./store/cart/index.js";export{formatDate}from"./utils/helper.js";export{formatCurrency}from"./utils/currency.js";export{createTranslationInputData,useTranslation}from"./utils/i18n.js";export{IkasAdjustmentType,IkasAmountType,IkasCampaignApplicablePrice,IkasCampaignCreatedFor,IkasCampaignFilterType,IkasCampaignOfferProductShowCriteria,IkasCampaignOfferTargetPageType,IkasCampaignType,IkasCartCampaignOfferStatus,IkasCategoryProductsOrderType as IkasCategoryOrderType,IkasCheckoutRequirement,IkasCustomerAccountStatus,IkasCustomerAttributeType,IkasCustomerEmailSubscriptionStatus,IkasCustomerPriceListRuleFilterType,IkasCustomerPriceListRuleValueType,IkasCustomerRegistrationSource,IkasCustomerReviewStatus,IkasInvoiceType,IkasOrderCancelReason,IkasOrderLineItemStatus,IkasOrderPackageFullfillStatus,IkasOrderPackageStatus,IkasOrderPaymentStatus,IkasOrderShippingMethod,IkasOrderStatus,IkasPaymentGatewayAdditionalPriceType,IkasPaymentGatewaySettingsType,IkasPaymentGatewayTransactionFeeType,IkasPaymentGatewayType,IkasPaymentMethodType,IkasPaymentMethodTypeWithPrices,IkasProductAttributeType,IkasProductFilterDisplayType,IkasProductFilterSortType,IkasProductFilterType,IkasProductOptionSelectType,IkasProductOptionType,IkasProductStockFilterValue,IkasProductType,IkasRaffleMetadataTargetType,IkasRaffleVerificationType,IkasShippingMethod,IkasStockLocationDeliveryTime,IkasStockLocationType,IkasStorefrontB2BShowPricesEnum,IkasStorefrontB2BShowProductsEnum,IkasStorefrontPopupDisplayFilterOperatorEnum,IkasStorefrontPopupDisplayFilterTypeEnum,IkasStorefrontStatus,IkasThemeJsonComponentPropType,IkasThemeJsonPageType,IkasThemeJsonStockPreference,IkasTransactionSourceWithPrices,IkasTransactionStatus,IkasTransactionStatusWithPrices,IkasTransactionType,IkasTransactionTypeWithPrices,IkasVariantSelectionType}from"@ikas/storefront-models";export{IkasTransactionWithPrices}from"./models/data/order/order-transaction-with-prices/transaction-with-prices/index.js";
|
|
1
|
+
export{Analytics}from"./analytics/analytics.js";export{AnalyticsBody,AnalyticsHead}from"./analytics/head/index.js";export{IkasPage}from"./components/page/index.js";export{IkasPageHead}from"./components/page/head.js";export{Image}from"./components/image/index.js";export{PlainImage}from"./components/plain-image/index.js";export{default as Link}from"./components/link/index.js";export{IkasEditorComponentLoader}from"./components/page-editor/loader/index.js";export{GoogleCaptcha}from"./components/google-captcha/index.js";export{PaypalExpressCheckout}from"./components/paypal-express-checkout/index.js";export{PayWithIkas}from"./components/pay-with-ikas/index.js";export{useStore}from"./hooks/useStore.js";export{useCustomerReviews}from"./hooks/useCustomerReviews.js";import"react";export{IkasBaseModel}from"./models/data/base/index.js";export{IkasBlogCategory}from"./models/data/blog/category/index.js";export{IkasBlogContent}from"./models/data/blog/content/index.js";export{IkasBlogMetaData,IkasBlogMetaDataTargetType}from"./models/data/blog/meta-data/index.js";export{IkasBlogTag}from"./models/data/blog/tag/index.js";export{IkasBlogWriter}from"./models/data/blog/writer/index.js";export{IkasBlog}from"./models/data/blog/index.js";export{IkasProductBrandTranslation}from"./models/data/brand/translation/index.js";export{IkasBrand,IkasBrandOrderType}from"./models/data/brand/index.js";export{IkasCampaignOfferProduct,IkasCampaignOfferProductTranslation}from"./models/data/campaign-offer/product/index.js";export{IkasCampaignOffer,IkasCampaignOfferTriggerSettings}from"./models/data/campaign-offer/index.js";export{IkasAvailableShippingMethod}from"./models/data/cart/available-shipping-method/index.js";export{IkasCartCampaignOffer}from"./models/data/cart/campaign-offer/index.js";export{IkasCart}from"./models/data/cart/index.js";export{IkasCategoryPathItem}from"./models/data/category/path-item/index.js";export{IkasCategoryTranslation}from"./models/data/category/translations/index.js";export{IkasCategory}from"./models/data/category/index.js";export{IkasCheckout}from"./models/data/checkout/index.js";export{IkasCheckoutOption}from"./models/data/checkout-settings/option/index.js";export{IkasCheckoutSettingsPrice}from"./models/data/checkout-settings/price/index.js";export{IkasCheckoutSettings}from"./models/data/checkout-settings/index.js";export{IkasCity}from"./models/data/city/index.js";export{IkasContactForm}from"./models/data/contact-form/index.js";export{IkasCountry}from"./models/data/country/index.js";export{IkasCustomerAddressCity}from"./models/data/customer/address/city/index.js";export{IkasCustomerAddressCountry}from"./models/data/customer/address/country/index.js";export{IkasCustomerAddressDistrict}from"./models/data/customer/address/district/index.js";export{IkasCustomerAddressRegion}from"./models/data/customer/address/region/index.js";export{IkasCustomerAddressState}from"./models/data/customer/address/state/index.js";export{IkasCustomerAddress}from"./models/data/customer/address/index.js";export{IkasLocalizedCustomerAddress}from"./models/data/customer/address/ikas-localized-customer-address.js";export{IkasCustomerAttributeOption}from"./models/data/customer/attribute/option/index.js";export{IkasCustomerAttributeSalesChannel}from"./models/data/customer/attribute/sales-channel/index.js";export{IkasCustomerAttributeOptionTranslation}from"./models/data/customer/attribute/translation/option/index.js";export{IkasCustomerAttributeTranslation}from"./models/data/customer/attribute/translation/index.js";export{IkasCustomerAttributeValue}from"./models/data/customer/attribute/value/index.js";export{IkasCustomerAttribute}from"./models/data/customer/attribute/index.js";export{IkasCustomerPriceListRuleFilter}from"./models/data/customer/price-list-rule/filter/index.js";export{IkasCustomerPriceListRule}from"./models/data/customer/price-list-rule/index.js";export{IkasCustomerReviewSettings}from"./models/data/customer/review/settings/index.js";export{IkasCustomerReviewSummaryStar}from"./models/data/customer/review/summary/star/index.js";export{IkasCustomerReviewSummary}from"./models/data/customer/review/summary/index.js";export{IkasCustomerReview}from"./models/data/customer/review/index.js";export{IkasCustomer}from"./models/data/customer/index.js";export{IkasCustomerRegisterSubscriptionInput}from"./models/data/customer-form-data-input/customer-register-subscription-input/index.js";export{IkasCustomerGenderTypeEnum,IkasSaveCustomerFormDataInput}from"./models/data/customer-form-data-input/index.js";export{IkasDistrict}from"./models/data/district/index.js";export{IkasFavoriteProduct}from"./models/data/favorite-product/index.js";export{IkasFilterCategory}from"./models/data/filter-category/index.js";export{IkasHTMLMetaDataTranslations}from"./models/data/html-meta-data/translations/index.js";export{IkasHTMLMetaData,IkasHTMLMetaDataOverride,IkasHTMLMetaDataTargetType}from"./models/data/html-meta-data/index.js";export{IkasImage}from"./models/data/image/index.js";export{IkasLastViewedProduct}from"./models/data/last-viewed-product/index.js";export{IkasMerchantSettings}from"./models/data/merchant-settings/index.js";export{IkasOrderAddressCity}from"./models/data/order/address/city/index.js";export{IkasOrderAddressCountry}from"./models/data/order/address/country/index.js";export{IkasOrderAddressDistrict}from"./models/data/order/address/district/index.js";export{IkasOrderAddressRegion}from"./models/data/order/address/region/index.js";export{IkasOrderAddressState}from"./models/data/order/address/state/index.js";export{IkasOrderAddress}from"./models/data/order/address/index.js";export{IkasOrderAdjustmentAppliedOrderLine}from"./models/data/order/adjustment/applied-order-line/index.js";export{IkasOrderAdjustment}from"./models/data/order/adjustment/index.js";export{IkasOrderCustomer}from"./models/data/order/customer/index.js";export{IkasOrderGiftPackageLine}from"./models/data/order/gift-line/index.js";export{IkasInvoice}from"./models/data/order/invoice/index.js";export{IkasOrderLineDiscount}from"./models/data/order/line-item/discount/index.js";export{IkasOrderLineItemOptionValue}from"./models/data/order/line-item/option/value/index.js";export{IkasOrderLineItemOption}from"./models/data/order/line-item/option/index.js";export{IkasOrderLineVariantBrand}from"./models/data/order/line-item/variant/brand/index.js";export{IkasOrderLineVariantCategory,IkasOrderLineVariantCategoryPath}from"./models/data/order/line-item/variant/category/index.js";export{IkasOrderLineVariantPrice}from"./models/data/order/line-item/variant/price/index.js";export{IkasOrderLineVariantVariantValue}from"./models/data/order/line-item/variant/value/index.js";export{IkasOrderLineVariant}from"./models/data/order/line-item/variant/index.js";export{IkasOrderLineItem}from"./models/data/order/line-item/index.js";export{IkasOrderTransactionWithPrices}from"./models/data/order/order-transaction-with-prices/index.js";export{IkasTrackingInfo}from"./models/data/order/package/tracking-info/index.js";export{IkasOrderPackage}from"./models/data/order/package/index.js";export{IkasOrderPaymentMethod}from"./models/data/order/payment-method/index.js";export{IkasOrderRefundOrderLineInput}from"./models/data/order/refund/line-item/index.js";export{IkasOrderRefundReasonTranslation}from"./models/data/order/refund/reason/translation/index.js";export{IkasOrderRefundReason}from"./models/data/order/refund/reason/index.js";export{IkasRefundableLine}from"./models/data/order/refund/refundable-line/index.js";export{IkasRefundableLines}from"./models/data/order/refund/refundable-lines/index.js";export{IkasOrderRefundSettingsTranslation}from"./models/data/order/refund/settings/translation/index.js";export{IkasOrderRefundSettings}from"./models/data/order/refund/settings/index.js";export{IkasRefund}from"./models/data/order/refund/index.js";export{IkasOrderShippingLine}from"./models/data/order/shipping-line/index.js";export{IkasOrderTaxLine}from"./models/data/order/tax-line/index.js";export{IkasTransactionError}from"./models/data/order/transaction/error/index.js";export{IkasTransactionInstallmentPrice}from"./models/data/order/transaction/payment-method-detail/installment-price/index.js";export{IkasTransactionPaymentMethodDetail}from"./models/data/order/transaction/payment-method-detail/index.js";export{IkasOrderTransaction}from"./models/data/order/transaction/index.js";export{IkasOrder}from"./models/data/order/index.js";export{IkasPaymentGatewayAdditionalPrice}from"./models/data/payment-gateway/additional-price/index.js";export{IkasPaymentGatewaySettings}from"./models/data/payment-gateway/settings/index.js";export{IkasPaymentGatewayTranslation}from"./models/data/payment-gateway/translation/index.js";export{IkasPaymentGateway}from"./models/data/payment-gateway/index.js";export{IkasProductAttributeOption}from"./models/data/product/attribute/option/index.js";export{IkasProductAttributeTableCell}from"./models/data/product/attribute/table-cell/index.js";export{IkasProductAttributeTableTemplate}from"./models/data/product/attribute/table-template/index.js";export{IkasProductAttributeOptionTranslation,IkasProductAttributeTranslation}from"./models/data/product/attribute/translation/index.js";export{IkasProductAttribute}from"./models/data/product/attribute/index.js";export{IkasAttributeTableCellValue,IkasProductAttributeMap,IkasProductAttributeValue}from"./models/data/product/attribute-value/index.js";export{IkasProductBackInStockSettings}from"./models/data/product/back-in-stock-settings/index.js";export{IkasApplicableProductFilterValue,IkasFilterRangeValue,IkasProductFilter,IkasProductFilterNumberRangeListOption,IkasProductFilterSettings,IkasProductFilterValue,parseRangeStr}from"./models/data/product/filter/index.js";export{IkasProductCampaignData}from"./models/data/product/campaign/data/index.js";export{IkasProductCampaignFilter}from"./models/data/product/campaign/filter/index.js";export{IkasProductBuyX,IkasProductBuyXThenGetY,IkasProductGetY}from"./models/data/product/campaign/product-buyx-then-gety/index.js";export{IkasProductCampaignDateRangeField}from"./models/data/product/campaign/product-campaign-date-range-field/index.js";export{IkasCampaignMinMaxRangeField,IkasProductFixedDiscount}from"./models/data/product/campaign/product-fixed-discount/index.js";export{IkasProductCampaign}from"./models/data/product/campaign/index.js";export{IkasProductCampaignOffer,IkasProductOffer}from"./models/data/product/campaign-offer/index.js";export{IkasProductImage}from"./models/data/product/image/index.js";export{IkasProductOption,IkasProductOptionDateSettings,IkasProductOptionFileSettings,IkasProductOptionOtherPrice,IkasProductOptionSelectSettings,IkasProductOptionSelectValue,IkasProductOptionTextSettings}from"./models/data/product/option-set/option/index.js";export{IkasProductOptionSelectValueTranslations,IkasProductOptionSet,IkasProductOptionSetTranslations,IkasProductOptionTranslations}from"./models/data/product/option-set/index.js";export{IkasProductStockLocations}from"./models/data/product/stock-location/index.js";export{IkasProductTag}from"./models/data/product/tag/index.js";export{IkasProductPrice}from"./models/data/product/variant/price/index.js";export{IkasProductVariant}from"./models/data/product/variant/index.js";export{IkasProductVariantType}from"./models/data/product/variant-type/index.js";export{IkasProduct}from"./models/data/product/index.js";export{IkasProductFile}from"./models/data/product-file/index.js";export{IkasRaffle,IkasRaffleAppliedProduct,IkasRaffleDateRangeField,IkasRaffleMetaData,IkasRaffleParticipant}from"./models/data/raffle/index.js";export{IkasSalesChannel,IkasSalesChannelPaymentGateway,IkasSalesChannelStockLocation}from"./models/data/sales-channel/index.js";export{IkasShippingZoneRegion}from"./models/data/shipping-zone/state/city/district/region/index.js";export{IkasShippingZoneDistrict}from"./models/data/shipping-zone/state/city/district/index.js";export{IkasShippingZoneCity}from"./models/data/shipping-zone/state/city/index.js";export{IkasShippingZoneState}from"./models/data/shipping-zone/state/index.js";export{IkasShippingZone}from"./models/data/shipping-zone/index.js";export{IkasState}from"./models/data/state/index.js";export{IkasStockLocationAddressCity}from"./models/data/stock-location/address/city/index.js";export{IkasStockLocationAddressCountry}from"./models/data/stock-location/address/country/index.js";export{IkasStockLocationAddressDistrict}from"./models/data/stock-location/address/district/index.js";export{IkasStockLocationAddressState}from"./models/data/stock-location/address/state/index.js";export{IkasStockLocationAddress}from"./models/data/stock-location/address/index.js";export{IkasAvailableStockLocation}from"./models/data/stock-location/available/index.js";export{IkasStockLocation}from"./models/data/stock-location/index.js";export{IkasStoreCredit,IkasStoreCreditBalance,IkasStoreCreditSalesChannel}from"./models/data/store-credit-balance/index.js";export{IkasStorefrontPopupAnalytics}from"./models/data/storefront-popup/storefront-popup-analytics/index.js";export{IkasStorefrontPopupDateFilter}from"./models/data/storefront-popup/storefront-popup-date-filter/index.js";export{IkasStorefrontPopupDisplayFilter}from"./models/data/storefront-popup/storefront-popup-display-filter/index.js";export{IkasStorefrontPopupDisplayFrequencyEnum,IkasStorefrontPopupDisplaySettings,IkasStorefrontPopupDisplayTriggerTypeEnum}from"./models/data/storefront-popup/storefront-popup-display-settings/index.js";export{IkasStorefrontPopupPageFilter,IkasStorefrontPopupPageFilterTypeEnum}from"./models/data/storefront-popup/storefront-popup-page-filter/index.js";export{IkasStorefrontPopupRouting}from"./models/data/storefront-popup/storefront-popup-routing/index.js";export{IkasStorefrontPopup,IkasStorefrontPopupDeviceTypeEnum,IkasStorefrontPopupStatusEnum,IkasStorefrontPopupTypeEnum}from"./models/data/storefront-popup/index.js";export{IkasStorefrontB2BSettings}from"./models/data/storefront/b2b-settings/index.js";export{IkasStorefrontDomain}from"./models/data/storefront/domain/index.js";export{IkasIndexPageSeoSetting}from"./models/data/storefront/index-page-seo-setting/index.js";export{IkasStorefrontLocalization}from"./models/data/storefront/localization/index.js";export{IkasStorefrontDynamicCurrencySettings}from"./models/data/storefront/routing/dynamic-currency/index.js";export{IkasStorefrontRouting}from"./models/data/storefront/routing/index.js";export{IkasStorefrontTheme}from"./models/data/storefront/theme/index.js";export{IkasStorefrontThemeLocalization}from"./models/data/storefront/theme-localization/index.js";export{IkasStorefront}from"./models/data/storefront/index.js";export{IkasThemeJsonComponentProp}from"./models/data/theme-json/component/prop/index.js";export{ComponentTranslation,IkasThemeJsonComponent}from"./models/data/theme-json/component/index.js";export{IkasThemeJsonCustomData,IkasThemeJsonCustomDataEnumOptionTranslation,IkasThemeJsonCustomDataTranslation,IkasThemeJsonEnumOption}from"./models/data/theme-json/custom-data/index.js";export{IkasThemeJsonPageComponent}from"./models/data/theme-json/page/component/index.js";export{IkasThemeJsonPage,IkasThemeJsonPageSpecification}from"./models/data/theme-json/page/index.js";export{IkasThemeJsonColor,IkasThemeJsonColorTranslation}from"./models/data/theme-json/settings/color/index.js";export{IkasThemeJsonFavicon}from"./models/data/theme-json/settings/favicon/index.js";export{IkasThemeJsonFontFamily}from"./models/data/theme-json/settings/font-family/index.js";export{IkasThemeJsonSettings}from"./models/data/theme-json/settings/index.js";export{CHECKOUT_ID,IkasThemeJson}from"./models/data/theme-json/index.js";export{IkasVariantValue}from"./models/data/variant-type/variant-value/index.js";export{IkasVariantType}from"./models/data/variant-type/index.js";export{IkasVideo}from"./models/data/video/index.js";export{AddressFormItem,BillingFormItem}from"@ikas/localized-address";export{IkasBlogList,IkasBlogListType}from"./models/ui/blog-list/index.js";export{IkasBlogCategoryList,IkasBlogCategoryListType}from"./models/ui/blog-category-list/index.js";export{IkasBrandList,IkasBrandListSortType,IkasBrandListType}from"./models/ui/brand-list/index.js";export{IkasCategoryList,IkasCategoryListSortType,IkasCategoryListType}from"./models/ui/category-list/index.js";export{IkasNavigationLink}from"./models/ui/navigation-link/index.js";export{IkasProductList,IkasProductListSortByTypeEnum,IkasProductListSortType,IkasProductListType,IkasRelatedProductsType}from"./models/ui/product-list/index.js";export{IkasAttributeDetail}from"./models/ui/product-attribute-detail/index.js";export{IkasAttributeList}from"./models/ui/product-attribute-list/index.js";export{IkasCustomerReviewList}from"./models/ui/customer-review-list/index.js";export{IkasCustomerReviewSummaryList}from"./models/ui/customer-review-summary-list/index.js";export{Validator}from"./models/ui/validator/index.js";export{EmailRule,EqualsRule,IdentityNumberRule,LessThanRule,MaxRule,MinRule,PhoneRule,RequiredRule,ValidationRule,ValidatorErrorType}from"./models/ui/validator/rules/index.js";export{LoginForm}from"./models/ui/validator/form/login.js";export{AddressForm}from"./models/ui/validator/form/address.js";export{IkasAddressForm}from"./models/ui/validator/form/ikas-address.js";export{RegisterForm}from"./models/ui/validator/form/register.js";export{ContactForm}from"./models/ui/validator/form/contact-form.js";export{ForgotPasswordForm}from"./models/ui/validator/form/forgot-password.js";export{RecoverPasswordForm}from"./models/ui/validator/form/recover-password.js";export{AccountInfoForm}from"./models/ui/validator/form/account-info.js";export{RaffleForm}from"./models/ui/validator/form/raffle-form.js";export{CustomerReviewForm}from"./models/ui/validator/form/customer-review.js";export{IkasComponentRenderer}from"./models/ui/component-renderer/index.js";export{IkasRaffleList}from"./models/ui/raffle-list/index.js";import*as e from"./pages/home.js";export{e as IndexPage};import*as t from"./pages/_slug_/index.js";export{t as SlugPage};import*as o from"./pages/pages/_slug_.js";export{o as CustomPage};import*as a from"./pages/checkout.js";export{a as CheckoutPage};import*as r from"./pages/account/index.js";export{r as AccountPage};import*as s from"./pages/account/addresses.js";export{s as AddressesPage};import*as d from"./pages/account/orders/index.js";export{d as OrdersPage};import*as i from"./pages/account/orders/_id_.js";export{i as OrderDetailPage};import*as n from"./pages/account/login.js";export{n as LoginPage};import*as m from"./pages/account/register.js";export{m as RegisterPage};import*as p from"./pages/account/forgot-password.js";export{p as ForgotPasswordPage};import*as l from"./pages/account/recover-password.js";export{l as RecoverPasswordPage};import*as x from"./pages/cart.js";export{x as CartPage};import*as u from"./pages/editor.js";export{u as EditorPage};import*as c from"./pages/account/favorite-products.js";export{c as FavoriteProductsPage};import*as f from"./pages/search.js";export{f as SearchPage};import*as k from"./pages/404.js";export{k as NotFoundPage};import*as I from"./pages/blog/index.js";export{I as BlogPage};import*as g from"./pages/blog/_slug_.js";export{g as BlogSlugPage};import*as j from"./pages/raffle/_slug_.js";export{j as RafflePage};import*as y from"./pages/raffle/index.js";export{y as RafflesPage};import*as P from"./pages/account/raffles.js";export{P as AccountRafflesPage};import*as S from"./pages/account/activate.js";export{S as ActivateCustomerPage};export{IkasBaseStore}from"./store/base.js";export{IkasCustomerStore}from"./store/customer/index.js";export{IkasCartStore}from"./store/cart/index.js";export{formatDate}from"./utils/helper.js";export{formatCurrency}from"./utils/currency.js";export{createTranslationInputData,useTranslation}from"./utils/i18n.js";export{IkasAdjustmentType,IkasAmountType,IkasCampaignApplicablePrice,IkasCampaignCreatedFor,IkasCampaignFilterType,IkasCampaignOfferProductShowCriteria,IkasCampaignOfferTargetPageType,IkasCampaignType,IkasCartCampaignOfferStatus,IkasCategoryProductsOrderType as IkasCategoryOrderType,IkasCheckoutRequirement,IkasCustomerAccountStatus,IkasCustomerAttributeType,IkasCustomerEmailSubscriptionStatus,IkasCustomerPriceListRuleFilterType,IkasCustomerPriceListRuleValueType,IkasCustomerRegistrationSource,IkasCustomerReviewStatus,IkasInvoiceType,IkasOrderCancelReason,IkasOrderLineItemStatus,IkasOrderPackageFullfillStatus,IkasOrderPackageStatus,IkasOrderPaymentStatus,IkasOrderRefundFlow,IkasOrderShippingMethod,IkasOrderStatus,IkasPaymentGatewayAdditionalPriceType,IkasPaymentGatewaySettingsType,IkasPaymentGatewayTransactionFeeType,IkasPaymentGatewayType,IkasPaymentMethodType,IkasPaymentMethodTypeWithPrices,IkasProductAttributeType,IkasProductFilterDisplayType,IkasProductFilterSortType,IkasProductFilterType,IkasProductOptionSelectType,IkasProductOptionType,IkasProductStockFilterValue,IkasProductType,IkasRaffleMetadataTargetType,IkasRaffleVerificationType,IkasShippingMethod,IkasStockLocationDeliveryTime,IkasStockLocationType,IkasStorefrontB2BShowPricesEnum,IkasStorefrontB2BShowProductsEnum,IkasStorefrontPopupDisplayFilterOperatorEnum,IkasStorefrontPopupDisplayFilterTypeEnum,IkasStorefrontStatus,IkasThemeJsonComponentPropType,IkasThemeJsonPageType,IkasThemeJsonStockPreference,IkasTransactionSourceWithPrices,IkasTransactionStatus,IkasTransactionStatusWithPrices,IkasTransactionType,IkasTransactionTypeWithPrices,IkasVariantSelectionType}from"@ikas/storefront-models";export{IkasTransactionWithPrices}from"./models/data/order/order-transaction-with-prices/transaction-with-prices/index.js";export{IkasRefundRequestError}from"@ikas/storefront-api";
|
|
@@ -77,6 +77,11 @@ export * from "./order/package/tracking-info";
|
|
|
77
77
|
export * from "./order/package";
|
|
78
78
|
export * from "./order/payment-method";
|
|
79
79
|
export * from "./order/refund/line-item";
|
|
80
|
+
export * from "./order/refund/reason/translation";
|
|
81
|
+
export * from "./order/refund/reason";
|
|
82
|
+
export * from "./order/refund/refundable-line";
|
|
83
|
+
export * from "./order/refund/refundable-lines";
|
|
84
|
+
export * from "./order/refund/settings/translation";
|
|
80
85
|
export * from "./order/refund/settings";
|
|
81
86
|
export * from "./order/refund";
|
|
82
87
|
export * from "./order/shipping-line";
|
|
@@ -2,6 +2,9 @@ import { IkasOrderAddress } from "./address";
|
|
|
2
2
|
import { IkasOrderShippingLine } from "./shipping-line";
|
|
3
3
|
import { IkasOrderLineItem } from "./line-item";
|
|
4
4
|
import { IkasOrderRefundSettings } from "./refund/settings";
|
|
5
|
+
import { IkasRefundableLine } from "./refund/refundable-line";
|
|
6
|
+
import { IkasOrderRefundReason } from "./refund/reason";
|
|
7
|
+
import { IkasRefundableLines } from "./refund/refundable-lines";
|
|
5
8
|
import { IkasOrderCustomer } from "./customer";
|
|
6
9
|
import { IkasOrderGiftPackageLine } from "./gift-line";
|
|
7
10
|
import { IkasInvoice } from "./invoice";
|
|
@@ -10,8 +13,7 @@ import { IkasOrderAdjustment } from "./adjustment";
|
|
|
10
13
|
import { IkasOrderPackage } from "./package";
|
|
11
14
|
import { IkasOrderTaxLine } from "./tax-line";
|
|
12
15
|
import { IkasBaseModel } from "../base";
|
|
13
|
-
import { IkasOrderCancelReason, IkasOrderPackageStatus, IkasOrderPaymentStatus, IkasOrderShippingMethod, IkasOrderStatus } from "@ikas/storefront-models";
|
|
14
|
-
import { IkasOrder as IOrder } from "@ikas/storefront-models";
|
|
16
|
+
import { IkasOrder as IOrder, IkasOrderCancelReason, IkasOrderPackageStatus, IkasOrderPaymentStatus, IkasOrderShippingMethod, IkasOrderStatus } from "@ikas/storefront-models";
|
|
15
17
|
import { IkasOrderGiftCardLine } from "./gift-card-line";
|
|
16
18
|
import { IkasOrderLoyaltyLine } from "./loyalty-line";
|
|
17
19
|
declare type IOrderConstructorData = {
|
|
@@ -51,11 +53,23 @@ export declare class IkasOrder extends IkasBaseModel implements IOrder {
|
|
|
51
53
|
totalFinalPrice: number;
|
|
52
54
|
totalPrice: number;
|
|
53
55
|
refundSettings?: IkasOrderRefundSettings | null;
|
|
56
|
+
refundableLineItems: IkasRefundableLine[] | null;
|
|
57
|
+
private _refundReasonId;
|
|
58
|
+
private _refundReason;
|
|
59
|
+
private _refundReasons;
|
|
60
|
+
private _refundTranslations;
|
|
54
61
|
constructor(data: Partial<IOrderConstructorData>, removeObservableAddresses?: boolean);
|
|
55
62
|
get items(): IkasOrderLineItem[];
|
|
56
63
|
get itemCount(): number;
|
|
57
64
|
get itemQuantity(): number;
|
|
58
65
|
get refundableItems(): IkasOrderLineItem[];
|
|
66
|
+
applyRefundableLines(data: IkasRefundableLines): void;
|
|
67
|
+
get refundReasonId(): string | null;
|
|
68
|
+
set refundReasonId(value: string | null);
|
|
69
|
+
get reason(): string | null;
|
|
70
|
+
set reason(value: string | null);
|
|
71
|
+
get refundReasons(): IkasOrderRefundReason[];
|
|
72
|
+
get returnMethodDescription(): string | null;
|
|
59
73
|
get displayedPackages(): IkasOrderPackage[];
|
|
60
74
|
get unfullfilledItems(): IkasOrderLineItem[];
|
|
61
75
|
get refundedItems(): IkasOrderLineItem[];
|