@ikas/storefront 6.1.0-beta.390 → 6.1.0-beta.391
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/components/checkout/components/cart-summary/loyalty/index.js +1 -1
- package/build/components/checkout/components/secure-card-form/protocol.d.ts +2 -0
- package/build/components/checkout/components/toggle/index.d.ts +2 -0
- package/build/components/checkout/components/toggle/index.js +1 -1
- package/build/components/checkout/components/toggle/style.module.scss.js +1 -1
- package/build/components/checkout/model.d.ts +30 -1
- package/build/components/checkout/model.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/installments/index.js +1 -1
- package/build/components/checkout/steps/step-payment/payment-gateways/saved-cards/index.d.ts +10 -0
- package/build/components/checkout/steps/step-payment/payment-gateways/saved-cards/index.js +1 -0
- package/build/components/checkout/steps/step-payment/payment-gateways/saved-cards/style.module.scss.js +1 -0
- package/build/components/checkout/steps/step-payment/payment-gateways/style.module.scss.js +1 -1
- package/build/pages/checkout.js +1 -1
- package/build/store/checkout/index.d.ts +2 -1
- package/build/store/checkout/index.js +1 -1
- package/build/store/customer/api.d.ts +2 -0
- package/build/store/customer/api.js +1 -1
- package/build/store/customer/index.d.ts +14 -1
- package/build/store/customer/index.js +1 -1
- package/package.json +11 -11
|
@@ -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{SecureCardForm as c}from"../../../components/secure-card-form/index.js";import{Installments as l}from"./installments/index.js";import m from"../../../components/select-box/index.js";import s from"./style.module.scss.js";import{IkasStorefrontConfig as d}from"@ikas/storefront-config";import{formatCurrency as y}from"../../../../../utils/currency.js";import{createTranslationInputData as p,useTranslation as u}from"../../../../../utils/i18n.js";import v from"../../../components/svg/external.js";import P from"next/dynamic";import E from"../../../components/credit-card-form/model.js";import f from"../../../components/master-pass/credit-card-form/index.js";import{Toggle as g}from"../../../components/toggle/index.js";import x from"../../../components/select-box/style.module.scss.js";import C from"../../../components/master-pass/payment-gateway/svg/master-card.js";import k from"../../../components/master-pass/payment-gateway/svg/troy.js";import h from"../../../components/master-pass/payment-gateway/svg/visa.js";import{Checkbox as j}from"../../../components/checkbox/index.js";import w from"../../../components/svg/info.js";var G=P((function(){return import("../../../components/stripe/index.js").then((function(e){return e.default}))})),T=P((function(){return import("../../../components/adyen/index.js").then((function(e){return e.Adyen}))})),N=P((function(){return import("../../../components/klarna/index.js").then((function(e){return e.Klarna}))})),I=P((function(){return import("../../../components/hepsipay/index.js").then((function(e){return e.HepsiPay}))})),S=P((function(){return import("../../../components/iyzico/index.js").then((function(e){return e.Iyzico}))})),b=P((function(){return import("../../../components/tkpay/index.js").then((function(e){return e.TkPay}))})),M=t((function(P){var M=P.vm,A=u().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:s.AdditionalPrice},t.children)},V=function(e){return 0===e.amount?"":"".concat(e.amountType===n.AMOUNT?y(e.amount,M.checkout.currencyCode,M.checkout.currencySymbol):" %"+e.amount).concat(e.type===o.DECREMENT?" "+A("checkout-page:paymentMethodDiscount"):" "+A("checkout-page:paymentMethodAdditionalPrice"))},D=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:x.SelectBoxContainer},e.createElement("div",{className:"".concat(x.SelectBox," ").concat(a?x.Selected:""),onClick:function(){M.setPaymentGateway(M.klarnaPaymentGatewayIndex),M.mpVM.selectedCard=void 0}},e.createElement("div",{className:x.TopContent},e.createElement(g,{value:a,label:M.klarnaPaymentGateway.name,removePadding:!0}),e.createElement("div",{className:x.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:s.PaymentLogoContainer},e.createElement("img",{src:M.klarnaPaymentGateway.logoUrl}))))),e.createElement("div",{className:"".concat(a?x.BottomContent:""," ").concat(a?"":s.Hidden)},e.createElement(N,{vm:M}),M.klarnaError&&e.createElement("div",{className:s.ErrorMessage},M.klarnaError.data)))):null},L=function(){var t,a=M.selectedPaymentGatewayIndex===M.hepsiPayPaymentGatewayIndex;return M.hepsiPayPaymentGateway?e.createElement("div",{className:x.SelectBoxContainer},e.createElement("div",{className:"".concat(x.SelectBox," ").concat(a?x.Selected:""),onClick:function(){M.setPaymentGateway(M.hepsiPayPaymentGatewayIndex),M.mpVM.selectedCard=void 0}},e.createElement("div",{className:x.TopContent},e.createElement(g,{value:a,label:"Kredi / Banka Kartı - Hepsipay",removePadding:!0}),e.createElement("div",{className:x.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:s.PaymentLogoContainer},e.createElement("img",{src:M.hepsiPayPaymentGateway.logoUrl}))))),e.createElement("div",{className:"".concat(a?x.BottomContent:""," ").concat(a?"":s.Hidden)},e.createElement(I,{vm:M})))):null},U=function(){var t=M.selectedPaymentGatewayIndex===M.adyenPaymentGatewayIndex;return M.adyenPaymentGateway?e.createElement("div",{className:x.SelectBoxContainer},e.createElement("div",{className:"".concat(x.SelectBox," ").concat(x.AdyenSelectBox),onClick:function(){M.setPaymentGateway(M.adyenPaymentGatewayIndex),M.mpVM.selectedCard=void 0}},e.createElement("div",{className:x.TopContent}),e.createElement("div",{className:"".concat(t?x.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:x.SelectBoxContainer},e.createElement("div",{className:"".concat(x.SelectBox," ").concat(a?x.Selected:""),onClick:function(){M.setPaymentGateway(M.payPalPaymentGatewayIndex),M.mpVM.selectedCard=void 0}},e.createElement("div",{className:x.TopContent},e.createElement(g,{value:a,label:M.payPalPaymentGateway.name,removePadding:!0}),e.createElement("div",{className:x.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:s.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=d.getTranslations()["checkout-page"],c=p(r.ackPoliciesSentence).map((function(t){return t.isVariable?e.createElement("span",{className:[s.TermsLabelSpan,n.isErrorsVisible&&!n.isTermsAndConditionsChecked?s.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:x.SelectBoxContainer},e.createElement("div",{className:"".concat(x.SelectBox," ").concat(l?x.Selected:""," ").concat(s.IyzicoBottomContent),onClick:function(){n.setPaymentGateway(n.iyzicoPaymentGatewayIndex),n.mpVM.selectedCard=void 0}},e.createElement("div",{className:x.TopContent},e.createElement(g,{value:l,label:A("checkout-page:creditCard"),removePadding:!0}),e.createElement("div",{className:x.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:s.PaymentLogoContainer},e.createElement("img",{src:n.iyzicoPaymentGateway.logoUrl}))))),e.createElement("div",{className:"".concat(l?x.BottomContent:""," ").concat(l?"":s.Hidden," ")},e.createElement("div",{className:s.IyzicoCheckboxContainer},e.createElement(j,{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:[s.IyzicoDescription,n.iyzicoResponse?s.WithBottomMargin:""].join(" ")},e.createElement(w,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=d.getTranslations()["checkout-page"],c=p(r.ackPoliciesSentence).map((function(t){return t.isVariable?e.createElement("span",{className:[s.TermsLabelSpan,n.isErrorsVisible&&!n.isTermsAndConditionsChecked?s.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:x.SelectBoxContainer},e.createElement("div",{className:"".concat(x.SelectBox," ").concat(l?x.Selected:""," ").concat(s.TkPayBottomContent),onClick:function(){n.setPaymentGateway(n.tkPayPaymentGatewayIndex),n.mpVM.selectedCard=void 0}},e.createElement("div",{className:x.TopContent},e.createElement(g,{value:l,label:n.tkPayPaymentGateway.name,removePadding:!0}),e.createElement("div",{className:x.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:s.PaymentLogoContainer},e.createElement("img",{src:n.tkPayPaymentGateway.logoUrl}))))),e.createElement("div",{className:"".concat(l?x.BottomContent:""," ").concat(l?"":s.Hidden," ")},e.createElement("div",{className:s.TkPayCheckboxContainer},e.createElement(j,{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:[s.TkPayDescription,n.tkPayResponse?s.WithBottomMargin:""].join(" ")},e.createElement(w,null),A("checkout-page:tkPayDescription")),n.isTermsAndConditionsChecked&&n.isMilesSmilesTermsMissing&&e.createElement("div",{className:s.TkPayDescription},e.createElement(w,null),A("checkout-page:milesSmilesTermsRequiredError")),n.tkPayResponse&&!n.isMilesSmilesTermsMissing&&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})),c=e.createElement("button",{className:s.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:s.MasterPassSelectBoxLabelLogo},y&&e.createElement(h,null),p&&e.createElement(C,null),u&&e.createElement(k,null)),t.Name," ",t.Value1),P=(null==r?void 0:r.id)&&r.paymentMethodType===a.CREDIT_CARD&&r.type===i.INTERNAL?M.installmentInfo&&e.createElement(l,{vm:M}):void 0;return e.createElement(m,{key:n,isSelected:(null===(o=M.mpVM.selectedCard)||void 0===o?void 0:o.UniqueId)===t.UniqueId,label:v,rightContent:c,bottomContent:P,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 E,M.secureCard.reset(),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,d;if(M.useMilesSmiles&&t.id!==(null===(o=M.milesSmilesPaymentGateway)||void 0===o?void 0:o.id))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 L();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 y=t.paymentMethodType===a.CREDIT_CARD&&t.type===i.INTERNAL?e.createElement(e.Fragment,null,D(t)?e.createElement(e.Fragment,null,e.createElement(G,{vm:M,pg:t}),M.stripeError&&e.createElement("div",{className:s.ErrorMessage},M.stripeError.data)):e.createElement("div",null,M.isSecureCardEnabled?e.createElement(c,{vm:M}):e.createElement(r,{vm:M}),M.isPaymentGatewayHasMasterPass&&e.createElement(f,{vm:M}),M.installmentInfo&&e.createElement(l,{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(v,null)),e.createElement("div",{dangerouslySetInnerHTML:{__html:t.description}})):void 0;return e.createElement(m,{key:t.id,label:t.paymentMethodType===a.CREDIT_CARD&&t.type===i.INTERNAL?D(t)?t.name:A("checkout-page:creditCard"):t.name,isSelected:M.selectedPaymentGatewayIndex===n,rightContent:(null===(d=t.additionalPrices)||void 0===d?void 0:d.length)?e.createElement(B,null,V(t.additionalPrices[0])):e.createElement(R,null,!!t.logoUrl&&e.createElement("div",{className:s.PaymentLogoContainer},e.createElement("img",{src:t.logoUrl}))),bottomContent:y,keepBottomContentMounted:M.isSecureCardEnabled&&t.id===M.secureCardGatewayId,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{SecureCardForm as c}from"../../../components/secure-card-form/index.js";import{Installments as l}from"./installments/index.js";import{SavedCards as m,SaveCardCheckbox as s}from"./saved-cards/index.js";import d from"../../../components/select-box/index.js";import y from"./style.module.scss.js";import{IkasStorefrontConfig as p}from"@ikas/storefront-config";import{formatCurrency as u}from"../../../../../utils/currency.js";import{createTranslationInputData as v,useTranslation as P}from"../../../../../utils/i18n.js";import E from"../../../components/svg/external.js";import f from"next/dynamic";import g from"../../../components/credit-card-form/model.js";import x from"../../../components/master-pass/credit-card-form/index.js";import{Toggle as C}from"../../../components/toggle/index.js";import k from"../../../components/select-box/style.module.scss.js";import h from"../../../components/master-pass/payment-gateway/svg/master-card.js";import j from"../../../components/master-pass/payment-gateway/svg/troy.js";import w from"../../../components/master-pass/payment-gateway/svg/visa.js";import{Checkbox as G}from"../../../components/checkbox/index.js";import T from"../../../components/svg/info.js";var N=f((function(){return import("../../../components/stripe/index.js").then((function(e){return e.default}))})),I=f((function(){return import("../../../components/adyen/index.js").then((function(e){return e.Adyen}))})),S=f((function(){return import("../../../components/klarna/index.js").then((function(e){return e.Klarna}))})),b=f((function(){return import("../../../components/hepsipay/index.js").then((function(e){return e.HepsiPay}))})),M=f((function(){return import("../../../components/iyzico/index.js").then((function(e){return e.Iyzico}))})),A=f((function(){return import("../../../components/tkpay/index.js").then((function(e){return e.TkPay}))})),R=t((function(f){var R=f.vm,B=P().t,V=function(t){return e.createElement("div",{style:{display:"flex",justifyContent:"flex-end",alignItems:"center",flexWrap:"wrap"}},t.children)},D=function(t){return e.createElement("div",{className:y.AdditionalPrice},t.children)},z=function(e){return 0===e.amount?"":"".concat(e.amountType===n.AMOUNT?u(e.amount,R.checkout.currencyCode,R.checkout.currencySymbol):" %"+e.amount).concat(e.type===o.DECREMENT?" "+B("checkout-page:paymentMethodDiscount"):" "+B("checkout-page:paymentMethodAdditionalPrice"))},L=function(e){return"STRIPE"===e.code||"STRIPE_EU"===e.code},U=function(){var t,a=R.selectedPaymentGatewayIndex===R.klarnaPaymentGatewayIndex;return R.klarnaPaymentGateway?e.createElement("div",{className:k.SelectBoxContainer},e.createElement("div",{className:"".concat(k.SelectBox," ").concat(a?k.Selected:""),onClick:function(){R.setPaymentGateway(R.klarnaPaymentGatewayIndex),R.mpVM.selectedCard=void 0}},e.createElement("div",{className:k.TopContent},e.createElement(C,{value:a,label:R.klarnaPaymentGateway.name,removePadding:!0}),e.createElement("div",{className:k.RightContent},(null===(t=R.klarnaPaymentGateway.additionalPrices)||void 0===t?void 0:t.length)?e.createElement(D,null,z(R.klarnaPaymentGateway.additionalPrices[0])):e.createElement(V,null,!!R.klarnaPaymentGateway.logoUrl&&e.createElement("div",{className:y.PaymentLogoContainer},e.createElement("img",{src:R.klarnaPaymentGateway.logoUrl}))))),e.createElement("div",{className:"".concat(a?k.BottomContent:""," ").concat(a?"":y.Hidden)},e.createElement(S,{vm:R}),R.klarnaError&&e.createElement("div",{className:y.ErrorMessage},R.klarnaError.data)))):null},_=function(){var t,a=R.selectedPaymentGatewayIndex===R.hepsiPayPaymentGatewayIndex;return R.hepsiPayPaymentGateway?e.createElement("div",{className:k.SelectBoxContainer},e.createElement("div",{className:"".concat(k.SelectBox," ").concat(a?k.Selected:""),onClick:function(){R.setPaymentGateway(R.hepsiPayPaymentGatewayIndex),R.mpVM.selectedCard=void 0}},e.createElement("div",{className:k.TopContent},e.createElement(C,{value:a,label:"Kredi / Banka Kartı - Hepsipay",removePadding:!0}),e.createElement("div",{className:k.RightContent},(null===(t=R.hepsiPayPaymentGateway.additionalPrices)||void 0===t?void 0:t.length)?e.createElement(D,null,z(R.hepsiPayPaymentGateway.additionalPrices[0])):e.createElement(V,null,!!R.hepsiPayPaymentGateway.logoUrl&&e.createElement("div",{className:y.PaymentLogoContainer},e.createElement("img",{src:R.hepsiPayPaymentGateway.logoUrl}))))),e.createElement("div",{className:"".concat(a?k.BottomContent:""," ").concat(a?"":y.Hidden)},e.createElement(b,{vm:R})))):null},O=function(){var t=R.selectedPaymentGatewayIndex===R.adyenPaymentGatewayIndex;return R.adyenPaymentGateway?e.createElement("div",{className:k.SelectBoxContainer},e.createElement("div",{className:"".concat(k.SelectBox," ").concat(k.AdyenSelectBox),onClick:function(){R.setPaymentGateway(R.adyenPaymentGatewayIndex),R.mpVM.selectedCard=void 0}},e.createElement("div",{className:k.TopContent}),e.createElement("div",{className:"".concat(t?k.BottomContent:""," "),style:{paddingTop:0}},e.createElement(I,{vm:R,isSelected:t})))):null},F=function(){var t,a=R.selectedPaymentGatewayIndex===R.payPalPaymentGatewayIndex;return R.payPalPaymentGateway?e.createElement("div",{className:k.SelectBoxContainer},e.createElement("div",{className:"".concat(k.SelectBox," ").concat(a?k.Selected:""),onClick:function(){R.setPaymentGateway(R.payPalPaymentGatewayIndex),R.mpVM.selectedCard=void 0}},e.createElement("div",{className:k.TopContent},e.createElement(C,{value:a,label:R.payPalPaymentGateway.name,removePadding:!0}),e.createElement("div",{className:k.RightContent},(null===(t=R.payPalPaymentGateway.additionalPrices)||void 0===t?void 0:t.length)?e.createElement(D,null,z(R.payPalPaymentGateway.additionalPrices[0])):e.createElement(V,null,!!R.payPalPaymentGateway.logoUrl&&e.createElement("div",{className:y.PaymentLogoContainer},e.createElement("img",{src:R.payPalPaymentGateway.logoUrl}))))))):null},H=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=B("checkout-page:privacyPolicy"),n.policyModalText=n.privacyPolicy}),[n,n.privacyPolicy]),i=e.useCallback((function(e){e.stopPropagation(),n.policyModalTitle=B("checkout-page:termsOfService"),n.policyModalText=n.termsOfService}),[n,n.termsOfService]),r=p.getTranslations()["checkout-page"],c=v(r.ackPoliciesSentence).map((function(t){return t.isVariable?e.createElement("span",{className:[y.TermsLabelSpan,n.isErrorsVisible&&!n.isTermsAndConditionsChecked?y.Error:""].join(" "),onClick:"{{ ackPrivacyPolicy }}"===t.value?o:i},"{{ ackPrivacyPolicy }}"===t.value?B("checkout-page:ackPrivacyPolicy"):B("checkout-page:ackTermsOfService")):t.value})),l=n.selectedPaymentGatewayIndex===n.iyzicoPaymentGatewayIndex;return n.iyzicoPaymentGateway?e.createElement("div",{className:k.SelectBoxContainer},e.createElement("div",{className:"".concat(k.SelectBox," ").concat(l?k.Selected:""," ").concat(y.IyzicoBottomContent),onClick:function(){n.setPaymentGateway(n.iyzicoPaymentGatewayIndex),n.mpVM.selectedCard=void 0}},e.createElement("div",{className:k.TopContent},e.createElement(C,{value:l,label:B("checkout-page:creditCard"),removePadding:!0}),e.createElement("div",{className:k.RightContent},(null===(a=n.iyzicoPaymentGateway.additionalPrices)||void 0===a?void 0:a.length)?e.createElement(D,null,z(n.iyzicoPaymentGateway.additionalPrices[0])):e.createElement(V,null,!!n.iyzicoPaymentGateway.logoUrl&&e.createElement("div",{className:y.PaymentLogoContainer},e.createElement("img",{src:n.iyzicoPaymentGateway.logoUrl}))))),e.createElement("div",{className:"".concat(l?k.BottomContent:""," ").concat(l?"":y.Hidden," ")},e.createElement("div",{className:y.IyzicoCheckboxContainer},e.createElement(G,{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:[y.IyzicoDescription,n.iyzicoResponse?y.WithBottomMargin:""].join(" ")},e.createElement(T,null),B("checkout-page:iyzicoDescription")),n.iyzicoResponse&&e.createElement(M,{vm:n})))):null})),Y=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=B("checkout-page:privacyPolicy"),n.policyModalText=n.privacyPolicy}),[n,n.privacyPolicy]),i=e.useCallback((function(e){e.stopPropagation(),n.policyModalTitle=B("checkout-page:termsOfService"),n.policyModalText=n.termsOfService}),[n,n.termsOfService]),r=p.getTranslations()["checkout-page"],c=v(r.ackPoliciesSentence).map((function(t){return t.isVariable?e.createElement("span",{className:[y.TermsLabelSpan,n.isErrorsVisible&&!n.isTermsAndConditionsChecked?y.Error:""].join(" "),onClick:"{{ ackPrivacyPolicy }}"===t.value?o:i},"{{ ackPrivacyPolicy }}"===t.value?B("checkout-page:ackPrivacyPolicy"):B("checkout-page:ackTermsOfService")):t.value})),l=n.selectedPaymentGatewayIndex===n.tkPayPaymentGatewayIndex;return n.tkPayPaymentGateway?e.createElement("div",{className:k.SelectBoxContainer},e.createElement("div",{className:"".concat(k.SelectBox," ").concat(l?k.Selected:""," ").concat(y.TkPayBottomContent),onClick:function(){n.setPaymentGateway(n.tkPayPaymentGatewayIndex),n.mpVM.selectedCard=void 0}},e.createElement("div",{className:k.TopContent},e.createElement(C,{value:l,label:n.tkPayPaymentGateway.name,removePadding:!0}),e.createElement("div",{className:k.RightContent},(null===(a=n.tkPayPaymentGateway.additionalPrices)||void 0===a?void 0:a.length)?e.createElement(D,null,z(n.tkPayPaymentGateway.additionalPrices[0])):e.createElement(V,null,!!n.tkPayPaymentGateway.logoUrl&&e.createElement("div",{className:y.PaymentLogoContainer},e.createElement("img",{src:n.tkPayPaymentGateway.logoUrl}))))),e.createElement("div",{className:"".concat(l?k.BottomContent:""," ").concat(l?"":y.Hidden," ")},e.createElement("div",{className:y.TkPayCheckboxContainer},e.createElement(G,{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:[y.TkPayDescription,n.tkPayResponse?y.WithBottomMargin:""].join(" ")},e.createElement(T,null),B("checkout-page:tkPayDescription")),n.isTermsAndConditionsChecked&&n.isMilesSmilesTermsMissing&&e.createElement("div",{className:y.TkPayDescription},e.createElement(T,null),B("checkout-page:milesSmilesTermsRequiredError")),n.tkPayResponse&&!n.isMilesSmilesTermsMissing&&e.createElement(A,{vm:n})))):null}));return e.createElement(e.Fragment,null,!!R.mpVM.cards.length&&R.mpVM.cards.map((function(t,n){var o,r=R.paymentGateways.find((function(e){return e.id===t.paymentGatewayId})),c=e.createElement("button",{className:y.MasterPassSelectBoxDeleteButton,onClick:function(e){e.stopPropagation(),R.mpVM.deleteCard({store:R.store,checkout:R.checkout,card:t})}},B("checkout-page:masterPass.paymentGatewaySelectBox.delete")),m=function(e){return t.Value1.startsWith(e)},s=m("4"),p=m("5")||m("6"),u=m("9"),v=e.createElement("div",{style:{display:"flex",alignItems:"center"}},e.createElement("span",{className:y.MasterPassSelectBoxLabelLogo},s&&e.createElement(w,null),p&&e.createElement(h,null),u&&e.createElement(j,null)),t.Name," ",t.Value1),P=(null==r?void 0:r.id)&&r.paymentMethodType===a.CREDIT_CARD&&r.type===i.INTERNAL?R.installmentInfo&&e.createElement(l,{vm:R}):void 0;return e.createElement(d,{key:n,isSelected:(null===(o=R.mpVM.selectedCard)||void 0===o?void 0:o.UniqueId)===t.UniqueId,label:v,rightContent:c,bottomContent:P,onClick:function(){var e;(null===(e=R.mpVM.selectedCard)||void 0===e?void 0:e.UniqueId)!==t.UniqueId&&(R.checkout.selectedPaymentGateway=null,R.cardData=new g,R.secureCard.reset(),R.installmentInfo=void 0,R.mpVM.selectedCard=t,t.Value1&&t.paymentGatewayId&&R.checkout.totalFinalPrice&&R.retrieveInstallmentInfo({input:{orderId:R.checkout.id,binNumber:t.Value1.slice(0,8),paymentGatewayId:t.paymentGatewayId,price:R.checkout.totalFinalPrice,currencyCode:R.checkout.currencyCode}}))}})})),R.paymentGateways.filter((function(e){return"in-store"!==R.deliveryMethod&&!R.isDigitalOnly||e.paymentMethodType!==a.CASH_ON_DELIVERY&&e.paymentMethodType!==a.CREDIT_CARD_ON_DELIVERY})).map((function(t,n){var o,p;if(R.useMilesSmiles&&t.id!==(null===(o=R.milesSmilesPaymentGateway)||void 0===o?void 0:o.id))return null;if(function(e){return"KLARNA"===e.code}(t)&&R.klarnaPaymentGateway)return U();if(function(e){return"ADYEN_PLATFORM"===e.code}(t)&&R.adyenPaymentGateway)return O();if(function(e){return"PAYPAL"===e.code}(t)&&R.payPalPaymentGateway)return F();if(function(e){return"HEPSIPAY"===e.code}(t)&&R.hepsiPayPaymentGateway)return _();if(function(e){return"IYZICO"===e.code}(t)&&R.iyzicoPaymentGateway)return e.createElement(H,{vm:R,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)&&R.tkPayPaymentGateway)return e.createElement(Y,{vm:R,key:t.id});var u=R.selectedPaymentGatewayIndex===n,v=u&&R.visibleSavedCards.length>0,P=u&&!!R.selectedSavedCard,f=t.paymentMethodType===a.CREDIT_CARD&&t.type===i.INTERNAL?e.createElement(e.Fragment,null,L(t)?e.createElement(e.Fragment,null,e.createElement(N,{vm:R,pg:t}),R.stripeError&&e.createElement("div",{className:y.ErrorMessage},R.stripeError.data)):e.createElement("div",null,v&&e.createElement(m,{vm:R}),!P&&e.createElement("div",{className:v?y.NewCardForm:""},R.isSecureCardEnabled?e.createElement(c,{vm:R}):e.createElement(r,{vm:R}),u&&R.isCardStorageEnabled&&e.createElement(s,{vm:R}),R.isPaymentGatewayHasMasterPass&&e.createElement(x,{vm:R})),R.installmentInfo&&e.createElement(l,{vm:R}))):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(E,null)),e.createElement("div",{dangerouslySetInnerHTML:{__html:t.description}})):void 0;return e.createElement(d,{key:t.id,label:t.paymentMethodType===a.CREDIT_CARD&&t.type===i.INTERNAL?L(t)?t.name:B("checkout-page:creditCard"):t.name,isSelected:R.selectedPaymentGatewayIndex===n,rightContent:(null===(p=t.additionalPrices)||void 0===p?void 0:p.length)?e.createElement(D,null,z(t.additionalPrices[0])):e.createElement(V,null,!!t.logoUrl&&e.createElement("div",{className:y.PaymentLogoContainer},e.createElement("img",{src:t.logoUrl}))),bottomContent:f,keepBottomContentMounted:R.isSecureCardEnabled&&t.id===R.secureCardGatewayId,onClick:function(){R.selectedPaymentGatewayIndex!==n&&(R.setPaymentGateway(n),R.mpVM.selectedCard=void 0)}})})))}));export{R as PaymentGateways};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as e from"react";import{observer as t}from"mobx-react-lite";import"@ikas/storefront-config";import{formatCurrency as n}from"../../../../../../utils/currency.js";import{useTranslation as l}from"../../../../../../utils/i18n.js";import
|
|
1
|
+
import*as e from"react";import{observer as t}from"mobx-react-lite";import"@ikas/storefront-config";import{formatCurrency as n}from"../../../../../../utils/currency.js";import{useTranslation as l}from"../../../../../../utils/i18n.js";import a from"./style.module.scss.js";import{Toggle as c}from"../../../../components/toggle/index.js";var o=t((function(t){var o,m,s=t.vm,r=l().t;return e.createElement("div",{className:a.Installments},e.createElement("div",{className:a.Title},r("checkout-page:installmentOptions")),e.createElement("div",{className:a.Container},null===(m=null===(o=s.installmentInfo)||void 0===o?void 0:o.installmentPrices)||void 0===m?void 0:m.map((function(t,l){return e.createElement("div",{key:t.installmentCount||l,className:a.Row,onClick:function(){return s.setInstallmentCount(t.installmentCount||1)}},e.createElement(c,{variant:"radio",value:s.selectedInstallmentIndex===l}),e.createElement("div",{className:a.InstallmentInfo},e.createElement("div",{className:a.InstallmentCount},1===t.installmentCount?r("checkout-page:singleInstallment"):"".concat(t.installmentCount," ").concat(r("checkout-page:installments"))),1!==t.installmentCount&&e.createElement("div",{className:a.InstallmentPrice},n(t.installmentPrice,s.checkout.currencyCode,s.checkout.currencySymbol))),e.createElement("div",{className:a.Price},n(t.totalPrice,s.checkout.currencyCode,s.checkout.currencySymbol)))}))))}));export{o as Installments};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import CheckoutViewModel from "../../../../model";
|
|
3
|
+
declare type Props = {
|
|
4
|
+
vm: CheckoutViewModel;
|
|
5
|
+
};
|
|
6
|
+
/** PayTR saved cards inside the card box, with "pay with a new card" last. */
|
|
7
|
+
export declare const SavedCards: React.FC<Props>;
|
|
8
|
+
/** PayTR "save my card": only sends `storeCard`, carries no card data. */
|
|
9
|
+
export declare const SaveCardCheckbox: React.FC<Props>;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import*as e from"react";import{observer as a}from"mobx-react-lite";import{IkasTransactionCardAssociation as t}from"@ikas/storefront-models";import"@ikas/storefront-config";import{useTranslation as r}from"../../../../../../utils/i18n.js";import{Toggle as n}from"../../../../components/toggle/index.js";import{Checkbox as o}from"../../../../components/checkbox/index.js";import{FormItem as c}from"../../../../components/form-item/index.js";import{FormItemInputMode as s,FormItemType as l}from"../../../../components/form-item/model.js";import m from"../../../../components/credit-card-form/svg/amex.js";import i from"../../../../components/credit-card-form/svg/master-card.js";import d from"../../../../components/credit-card-form/svg/troy.js";import v from"../../../../components/credit-card-form/svg/visa.js";import p from"../installments/style.module.scss.js";import u from"./style.module.scss.js";var C=function(e){return e.trim().slice(-2).padStart(2,"0")},E=a((function(a){var o=a.vm,E=r().t,f=o.selectedSavedCard;return e.createElement(e.Fragment,null,e.createElement("div",{className:[p.Installments,u.SavedCards].join(" ")},e.createElement("div",{className:p.Title},E("checkout-page:savedCards.title")),e.createElement("div",{className:p.Container},o.visibleSavedCards.map((function(a){var r,c=function(a){switch(a){case t.AMERICAN_EXPRESS:return e.createElement(m,null);case t.MASTER_CARD:return e.createElement(i,null);case t.TROY:return e.createElement(d,null);case t.VISA:return e.createElement(v,null);default:return null}}(a.cardAssociation),s=function(e){return e.expiryMonth&&e.expiryYear?"".concat(C(e.expiryMonth),"/").concat(C(e.expiryYear)):""}(a);return e.createElement("div",{key:a.id,className:[p.Row,u.CardRow].join(" "),onClick:function(){return o.selectSavedCard(a.id)}},e.createElement(n,{variant:"radio",value:(null==f?void 0:f.id)===a.id}),e.createElement("div",{className:u.Card},!!c&&e.createElement("span",{className:u.Logo},c),e.createElement("span",{className:u.CardText},e.createElement("span",null,[a.cardBankName,(r=a.cardFamily,r?r.charAt(0).toLocaleUpperCase("tr")+r.slice(1):r)].filter(Boolean).join(" ")),e.createElement("span",{className:u.Mask},"•••• ",a.lastFourDigits||""))),!!s&&e.createElement("div",{className:u.Expiry},s))})),e.createElement("div",{className:[p.Row,u.CardRow].join(" "),onClick:function(){return o.selectSavedCard(null)}},e.createElement(n,{variant:"radio",value:!f}),e.createElement("div",{className:u.Card},E("checkout-page:savedCards.payWithNewCard"))))),!!(null==f?void 0:f.requireCvv)&&e.createElement("div",{className:[p.Installments,u.Cvv].join(" ")},e.createElement("div",{className:p.Title},E("checkout-page:savedCards.cvvTitle")),e.createElement("div",{className:u.CvvField},e.createElement(c,{name:"saved-card-cvc",autocomplete:"cc-csc",inputMode:s.NUMERIC,type:l.TEXT,label:E("checkout-page:cardCVC"),value:o.savedCardCvv,onChange:o.onSavedCardCvvChange,errorText:E("checkout-page:cardCVCError"),tooltipText:E("checkout-page:savedCards.cvvTooltip"),hasError:o.isErrorsVisible&&!o.isSavedCardCvvValid}))))})),f=a((function(a){var t=a.vm,n=r().t;return e.createElement("div",{className:u.SaveCard},e.createElement(o,{value:t.storeCard,onChange:t.setStoreCard,label:e.createElement(e.Fragment,null,n("checkout-page:saveCard.label"),e.createElement("span",{className:u.SaveCardDescription},n("checkout-page:saveCard.description")))}))}));export{f as SaveCardCheckbox,E as SavedCards};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import e from'./../../../../../../ext/style-inject/dist/style-inject.es.js';var n={SavedCards:"style-module_SavedCards__smLCd",CardRow:"style-module_CardRow__qBoM9",Card:"style-module_Card__7cOQk",Logo:"style-module_Logo__7BKFX",CardText:"style-module_CardText__KepsM",Mask:"style-module_Mask__GAiMH",Expiry:"style-module_Expiry__sx383",Cvv:"style-module_Cvv__0bm1d",CvvField:"style-module_CvvField__OSvJr",SaveCard:"style-module_SaveCard__OGyvZ",SaveCardDescription:"style-module_SaveCardDescription__WvOC-"};e(".style-module_SavedCards__smLCd {\n margin-top: 8px;\n}\n\n.style-module_CardRow__qBoM9 {\n height: auto !important;\n min-height: 56px;\n padding-top: 8px !important;\n padding-bottom: 8px !important;\n cursor: pointer;\n}\n\n.style-module_Card__7cOQk {\n flex: 1 1 auto;\n min-width: 0;\n display: flex;\n align-items: center;\n font-size: 16px;\n color: var(--checkout-primary-text-color);\n}\n\n.style-module_Logo__7BKFX {\n flex: none;\n display: inline-flex;\n align-items: center;\n margin-right: 10px;\n}\n\n.style-module_CardText__KepsM {\n display: flex;\n flex-wrap: wrap;\n column-gap: 6px;\n min-width: 0;\n}\n\n.style-module_Mask__GAiMH {\n white-space: nowrap;\n letter-spacing: 0.04em;\n}\n\n.style-module_Expiry__sx383 {\n flex: none;\n padding-left: 12px;\n font-size: 14px;\n color: var(--checkout-secondary-text-color);\n white-space: nowrap;\n}\n\n.style-module_Cvv__0bm1d {\n margin-top: 24px;\n}\n\n.style-module_CvvField__OSvJr {\n max-width: 50%;\n}\n@media only screen and (max-width: 1000px) {\n .style-module_CvvField__OSvJr {\n max-width: none;\n }\n}\n\n.style-module_SaveCard__OGyvZ {\n margin-top: 12px;\n}\n.style-module_SaveCard__OGyvZ > div {\n align-items: flex-start;\n}\n.style-module_SaveCard__OGyvZ > div > div:first-child {\n flex: none;\n margin-top: 2px;\n}\n\n.style-module_SaveCardDescription__WvOC- {\n display: block;\n margin-top: 2px;\n font-size: 0.85em;\n line-height: 1.4;\n color: var(--checkout-secondary-text-color);\n}");export{n as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from'./../../../../../ext/style-inject/dist/style-inject.es.js';var o={PaymentLogoContainer:"style-module_PaymentLogoContainer__h4VF0",AdditionalPrice:"style-module_AdditionalPrice__42TO1",MasterPassSelectBoxDeleteButton:"style-module_MasterPassSelectBoxDeleteButton__J1RSJ",MasterPassSelectBoxLabelLogo:"style-module_MasterPassSelectBoxLabelLogo__fIhG7",Hidden:"style-module_Hidden__5-IfX",ErrorMessage:"style-module_ErrorMessage__nCpW4",TermsLabelSpan:"style-module_TermsLabelSpan__JUlDd",Error:"style-module_Error__-TdLv",IyzicoDescription:"style-module_IyzicoDescription__eN-pP",TkPayDescription:"style-module_TkPayDescription__spvVL",WithBottomMargin:"style-module_WithBottomMargin__Wwm6R",IyzicoLoader:"style-module_IyzicoLoader__40O8l",TkPayLoader:"style-module_TkPayLoader__om86k",load8:"style-module_load8__LStqF",IyzicoLoaderContainer:"style-module_IyzicoLoaderContainer__TNm4N",TkPayLoaderContainer:"style-module_TkPayLoaderContainer__V5TCY",IyzicoBottomContent:"style-module_IyzicoBottomContent__AMo4Q",TkPayBottomContent:"style-module_TkPayBottomContent__-deCh",IyzicoCheckboxContainer:"style-module_IyzicoCheckboxContainer__dvYnN",TkPayCheckboxContainer:"style-module_TkPayCheckboxContainer__LEW1Q"};e(".style-module_PaymentLogoContainer__h4VF0 {\n margin-left: 10px;\n font-size: 0.7em;\n}\n.style-module_PaymentLogoContainer__h4VF0 img {\n height: 20px;\n}\n\n.style-module_AdditionalPrice__42TO1 {\n color: var(--checkout-primary-text-color);\n font-weight: 600;\n}\n\n.style-module_MasterPassSelectBoxDeleteButton__J1RSJ {\n font-size: 14px;\n line-height: 20px;\n color: var(--checkout-primary-text-color);\n padding: 4px 8px;\n margin-right: -8px;\n background-color: transparent;\n border: none;\n outline: none;\n cursor: pointer;\n}\n.style-module_MasterPassSelectBoxDeleteButton__J1RSJ:hover {\n text-decoration: underline;\n}\n\n.style-module_MasterPassSelectBoxLabelLogo__fIhG7 {\n display: inline-flex;\n margin-right: 12px;\n width: 32px;\n}\n.style-module_MasterPassSelectBoxLabelLogo__fIhG7 svg {\n width: 100%;\n height: 100%;\n}\n\n.style-module_Hidden__5-IfX {\n display: none;\n}\n\n.style-module_ErrorMessage__nCpW4 {\n font-size: 14px;\n color: var(--checkout-error-color);\n}\n\n.style-module_TermsLabelSpan__JUlDd {\n color: var(--checkout-primary-text-color);\n font-weight: 500;\n}\n.style-module_TermsLabelSpan__JUlDd:hover {\n text-decoration: underline;\n}\n.style-module_TermsLabelSpan__JUlDd.style-module_Error__-TdLv {\n color: var(--checkout-error-color);\n}\n\n.style-module_IyzicoDescription__eN-pP,\n.style-module_TkPayDescription__spvVL {\n color: var(--checkout-primary-text-color);\n font-size: 16px;\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 12px;\n flex-direction: column;\n font-weight: 400;\n line-height: 24px;\n width: 75%;\n margin: 0 auto;\n text-align: center;\n padding: 24px;\n}\n@media only screen and (max-width: 1280px) {\n .style-module_IyzicoDescription__eN-pP,\n.style-module_TkPayDescription__spvVL {\n width: 100%;\n }\n}\n.style-module_IyzicoDescription__eN-pP.style-module_WithBottomMargin__Wwm6R,\n.style-module_TkPayDescription__spvVL.style-module_WithBottomMargin__Wwm6R {\n margin-bottom: 12px;\n}\n\n.style-module_IyzicoLoader__40O8l,\n.style-module_IyzicoLoader__40O8l:after,\n.style-module_TkPayLoader__om86k,\n.style-module_TkPayLoader__om86k:after {\n border-radius: 50%;\n width: 5em;\n height: 5em;\n}\n\n.style-module_IyzicoLoader__40O8l,\n.style-module_TkPayLoader__om86k {\n font-size: 6px;\n position: relative;\n text-indent: -9999em;\n border-top: 0.5em solid rgba(255, 255, 255, 0.2);\n border-right: 0.5em solid rgba(255, 255, 255, 0.2);\n border-bottom: 0.5em solid rgba(255, 255, 255, 0.2);\n border-left: 0.5em solid var(--checkout-primary-text-color);\n -webkit-transform: translateZ(0);\n -ms-transform: translateZ(0);\n transform: translateZ(0);\n -webkit-animation: style-module_load8__LStqF 1.1s infinite linear;\n animation: style-module_load8__LStqF 1.1s infinite linear;\n}\n\n@keyframes style-module_load8__LStqF {\n 0% {\n -webkit-transform: rotate(0deg);\n transform: rotate(0deg);\n }\n 100% {\n -webkit-transform: rotate(360deg);\n transform: rotate(360deg);\n }\n}\n.style-module_IyzicoLoaderContainer__TNm4N,\n.style-module_TkPayLoaderContainer__V5TCY {\n display: flex;\n justify-content: center;\n align-items: center;\n margin-top: 12px;\n}\n\n.style-module_IyzicoBottomContent__AMo4Q,\n.style-module_TkPayBottomContent__-deCh {\n background-color: var(--checkout-primary-bg-color) !important;\n}\n\n.style-module_IyzicoCheckboxContainer__dvYnN,\n.style-module_TkPayCheckboxContainer__LEW1Q {\n margin-bottom: 16px;\n}");export{o as default};
|
|
1
|
+
import e from'./../../../../../ext/style-inject/dist/style-inject.es.js';var o={PaymentLogoContainer:"style-module_PaymentLogoContainer__h4VF0",AdditionalPrice:"style-module_AdditionalPrice__42TO1",MasterPassSelectBoxDeleteButton:"style-module_MasterPassSelectBoxDeleteButton__J1RSJ",MasterPassSelectBoxLabelLogo:"style-module_MasterPassSelectBoxLabelLogo__fIhG7",Hidden:"style-module_Hidden__5-IfX",ErrorMessage:"style-module_ErrorMessage__nCpW4",TermsLabelSpan:"style-module_TermsLabelSpan__JUlDd",Error:"style-module_Error__-TdLv",IyzicoDescription:"style-module_IyzicoDescription__eN-pP",TkPayDescription:"style-module_TkPayDescription__spvVL",WithBottomMargin:"style-module_WithBottomMargin__Wwm6R",IyzicoLoader:"style-module_IyzicoLoader__40O8l",TkPayLoader:"style-module_TkPayLoader__om86k",load8:"style-module_load8__LStqF",IyzicoLoaderContainer:"style-module_IyzicoLoaderContainer__TNm4N",TkPayLoaderContainer:"style-module_TkPayLoaderContainer__V5TCY",IyzicoBottomContent:"style-module_IyzicoBottomContent__AMo4Q",TkPayBottomContent:"style-module_TkPayBottomContent__-deCh",IyzicoCheckboxContainer:"style-module_IyzicoCheckboxContainer__dvYnN",TkPayCheckboxContainer:"style-module_TkPayCheckboxContainer__LEW1Q",NewCardForm:"style-module_NewCardForm__XB6Q5"};e(".style-module_PaymentLogoContainer__h4VF0 {\n margin-left: 10px;\n font-size: 0.7em;\n}\n.style-module_PaymentLogoContainer__h4VF0 img {\n height: 20px;\n}\n\n.style-module_AdditionalPrice__42TO1 {\n color: var(--checkout-primary-text-color);\n font-weight: 600;\n}\n\n.style-module_MasterPassSelectBoxDeleteButton__J1RSJ {\n font-size: 14px;\n line-height: 20px;\n color: var(--checkout-primary-text-color);\n padding: 4px 8px;\n margin-right: -8px;\n background-color: transparent;\n border: none;\n outline: none;\n cursor: pointer;\n}\n.style-module_MasterPassSelectBoxDeleteButton__J1RSJ:hover {\n text-decoration: underline;\n}\n\n.style-module_MasterPassSelectBoxLabelLogo__fIhG7 {\n display: inline-flex;\n margin-right: 12px;\n width: 32px;\n}\n.style-module_MasterPassSelectBoxLabelLogo__fIhG7 svg {\n width: 100%;\n height: 100%;\n}\n\n.style-module_Hidden__5-IfX {\n display: none;\n}\n\n.style-module_ErrorMessage__nCpW4 {\n font-size: 14px;\n color: var(--checkout-error-color);\n}\n\n.style-module_TermsLabelSpan__JUlDd {\n color: var(--checkout-primary-text-color);\n font-weight: 500;\n}\n.style-module_TermsLabelSpan__JUlDd:hover {\n text-decoration: underline;\n}\n.style-module_TermsLabelSpan__JUlDd.style-module_Error__-TdLv {\n color: var(--checkout-error-color);\n}\n\n.style-module_IyzicoDescription__eN-pP,\n.style-module_TkPayDescription__spvVL {\n color: var(--checkout-primary-text-color);\n font-size: 16px;\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 12px;\n flex-direction: column;\n font-weight: 400;\n line-height: 24px;\n width: 75%;\n margin: 0 auto;\n text-align: center;\n padding: 24px;\n}\n@media only screen and (max-width: 1280px) {\n .style-module_IyzicoDescription__eN-pP,\n.style-module_TkPayDescription__spvVL {\n width: 100%;\n }\n}\n.style-module_IyzicoDescription__eN-pP.style-module_WithBottomMargin__Wwm6R,\n.style-module_TkPayDescription__spvVL.style-module_WithBottomMargin__Wwm6R {\n margin-bottom: 12px;\n}\n\n.style-module_IyzicoLoader__40O8l,\n.style-module_IyzicoLoader__40O8l:after,\n.style-module_TkPayLoader__om86k,\n.style-module_TkPayLoader__om86k:after {\n border-radius: 50%;\n width: 5em;\n height: 5em;\n}\n\n.style-module_IyzicoLoader__40O8l,\n.style-module_TkPayLoader__om86k {\n font-size: 6px;\n position: relative;\n text-indent: -9999em;\n border-top: 0.5em solid rgba(255, 255, 255, 0.2);\n border-right: 0.5em solid rgba(255, 255, 255, 0.2);\n border-bottom: 0.5em solid rgba(255, 255, 255, 0.2);\n border-left: 0.5em solid var(--checkout-primary-text-color);\n -webkit-transform: translateZ(0);\n -ms-transform: translateZ(0);\n transform: translateZ(0);\n -webkit-animation: style-module_load8__LStqF 1.1s infinite linear;\n animation: style-module_load8__LStqF 1.1s infinite linear;\n}\n\n@keyframes style-module_load8__LStqF {\n 0% {\n -webkit-transform: rotate(0deg);\n transform: rotate(0deg);\n }\n 100% {\n -webkit-transform: rotate(360deg);\n transform: rotate(360deg);\n }\n}\n.style-module_IyzicoLoaderContainer__TNm4N,\n.style-module_TkPayLoaderContainer__V5TCY {\n display: flex;\n justify-content: center;\n align-items: center;\n margin-top: 12px;\n}\n\n.style-module_IyzicoBottomContent__AMo4Q,\n.style-module_TkPayBottomContent__-deCh {\n background-color: var(--checkout-primary-bg-color) !important;\n}\n\n.style-module_IyzicoCheckboxContainer__dvYnN,\n.style-module_TkPayCheckboxContainer__LEW1Q {\n margin-bottom: 16px;\n}\n\n.style-module_NewCardForm__XB6Q5 {\n margin-top: 16px;\n}");export{o as default};
|
package/build/pages/checkout.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__rest as o,__awaiter as e,__generator as t,__assign as r}from'./../ext/tslib/tslib.es6.js';import*as i from"react";import{observer as s}from"mobx-react-lite";import n from"../components/checkout/index.js";import{useRouter as d}from"next/router.js";import{FullscreenLoading as a}from"../components/checkout/components/fullscreen-loading/index.js";import{CheckoutLoadFailed as m,getCheckoutHomeHref as c}from"../components/checkout/components/checkout-load-failed/index.js";import{CheckoutStep as l}from"../components/checkout/model.js";import{setAPIClientConfig as u,getCartById as p,CampaignOfferTargetPageTypeEnum as f}from"@ikas/storefront-api";import{IkasStorefrontConfig as j}from"@ikas/storefront-config";import"../analytics/analytics.js";import"../analytics/head/index.js";import"../components/page/index.js";import"../components/page/head.js";import"next/image.js";import"@ikas/storefront-model-functions";import"../components/link/index.js";import"../components/page-editor/loader/style.module.scss.js";import"../components/google-captcha/index.js";import"../components/paypal-express-checkout/index.js";import{IkasBaseStore as g}from"../store/base.js";import"mobx";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"@ikas/storefront-models";import"../models/data/campaign-offer/index.js";import"../models/data/cart/campaign-offer/index.js";import{IkasCart as y}from"../models/data/cart/index.js";import"../models/data/category/path-item/index.js";import"../models/data/category/index.js";import{IkasCheckout as x}from"../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{LocalizedAddressConfig as v}from"@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"./home.js";import"./_slug_/index.js";import"./pages/_slug_.js";import"./account/index.js";import"./account/addresses.js";import"./account/orders/index.js";import"./account/orders/_id_.js";import"./account/login.js";import"./account/register.js";import"./account/forgot-password.js";import"./account/recover-password.js";import"./cart.js";import"./editor.js";import"./account/favorite-products.js";import"./search.js";import"next/error.js";import"./blog/index.js";import"./blog/_slug_.js";import"./raffle/_slug_.js";import"./raffle/index.js";import"./account/raffles.js";import"./account/activate.js";import"../store/customer/index.js";import"../store/cart/index.js";import"lodash/get";import{initIkasEvents as h}from"../analytics/events.js";import{APIErrorCode as C}from'./../ext/@ikas/fe-api-client/build/utils/api.js';import'./../ext/axios/index.js';import'./../ext/@ikas/fe-api-client/build/ext/lodash/_defineProperty.js';import'./../ext/@ikas/fe-api-client/build/ext/lodash/_baseGetTag.js';import'./../ext/@ikas/fe-api-client/build/ext/lodash/_stringToPath.js';import'./../ext/@ikas/fe-api-client/build/ext/lodash/_baseToString.js';import E from"../store/checkout/index.js";var k=s((function(s){var k=s.customizationProps,b=s.configJson,P=o(s,["customizationProps","configJson"]),F=d(),w=i.useState(),_=w[0],T=w[1],S=i.useState(P.checkoutSettings),B=S[0],I=S[1],O=i.useState(!1),D=O[0],L=O[1];j.init(b),v.setCDNUrl(process.env.NEXT_PUBLIC_SETTINGS_CDN_URL),u(),i.useEffect((function(){!function(o){document.documentElement.style.setProperty("--checkout-button-bg-color",(null==o?void 0:o.buttonBgColor)||"#272727"),document.documentElement.style.setProperty("--checkout-button-text-color",(null==o?void 0:o.buttonTextColor)||"#FFFFFF"),document.documentElement.style.setProperty("--checkout-button-disabled-bg-color",(null==o?void 0:o.buttonDisabledBgColor)||"#F7F7F9"),document.documentElement.style.setProperty("--checkout-button-disabled-text-color",(null==o?void 0:o.buttonDisabledTextColor)||"#8A8B94"),document.documentElement.style.setProperty("--checkout-primary-text-color",(null==o?void 0:o.primaryTextColor)||"#272727"),document.documentElement.style.setProperty("--checkout-secondary-text-color",(null==o?void 0:o.secondaryTextColor)||"#8A8B94"),document.documentElement.style.setProperty("--checkout-primary-bg-color",(null==o?void 0:o.primaryBgColor)||"#FFFFFF"),document.documentElement.style.setProperty("--checkout-secondary-bg-color",(null==o?void 0:o.secondaryBgColor)||"#F7F7F9"),document.documentElement.style.setProperty("--checkout-border-color",(null==o?void 0:o.borderColor)||"#E5E4E9"),document.documentElement.style.setProperty("--checkout-card-bg-color",(null==o?void 0:o.cardBgColor)||"#F7F7F9"),document.documentElement.style.setProperty("--checkout-error-color",(null==o?void 0:o.errorColor)||"#FB4E4E"),document.documentElement.style.setProperty("--checkout-error-light-color",(null==o?void 0:o.errorLightColor)||"#FCF3F4"),document.documentElement.style.setProperty("--checkout-warning-color",(null==o?void 0:o.warningColor)||"#FFBC1F"),document.documentElement.style.setProperty("--checkout-warning-light-color",(null==o?void 0:o.warningLightColor)||"#FFFAEE"),document.documentElement.style.setProperty("--checkout-success-color",(null==o?void 0:o.successColor)||"#2DCA73"),document.documentElement.style.setProperty("--checkout-success-light-color",(null==o?void 0:o.successLightColor)||"#F6FFED"),document.documentElement.style.setProperty("--checkout-secondary-button-bg-color",(null==o?void 0:o.secondaryButtonBgColor)||"#ffffff00"),document.documentElement.style.setProperty("--checkout-secondary-button-text-color",(null==o?void 0:o.secondaryButtonTextColor)||"#272727"),document.documentElement.style.setProperty("--checkout-secondary-button-border-color",(null==o?void 0:o.secondaryButtonBorderColor)||"#E5E4E9"),document.documentElement.style.setProperty("--checkout-loyalty-icon-color",(null==o?void 0:o.loyaltyIconColor)||"#F5B53F"),document.documentElement.style.setProperty("--checkout-campaign-title-color",(null==o?void 0:o.campaignOffersTitleColor)||"#272727"),document.documentElement.style.setProperty("--checkout-campaign-description-color",(null==o?void 0:o.campaignOffersDescriptionColor)||"#272727"),document.documentElement.style.setProperty("--checkout-campaign-container-bg-color",(null==o?void 0:o.campaignOffersContainerBgColor)||"#ffffff"),document.documentElement.style.setProperty("--checkout-campaign-discount-percentage-color",(null==o?void 0:o.campaignOffersDiscountPercentageColor)||"#272727"),document.documentElement.style.setProperty("--checkout-campaign-discount-percentage-bg-color",(null==o?void 0:o.campaignOffersDiscountPercentageBgColor)||"#FFF1BD"),document.documentElement.style.setProperty("--checkout-campaign-countdown-text-color",(null==o?void 0:o.campaignOffersCountdownTextColor)||"#272727"),document.documentElement.style.setProperty("--checkout-campaign-countdown-time-color",(null==o?void 0:o.campaignOffersCountdownTimeColor)||"#FB4E4E"),document.documentElement.style.setProperty("--checkout-campaign-countdown-bg-color",(null==o?void 0:o.campaignOffersCountdownBgColor)||"#FFF5F6"),document.documentElement.style.setProperty("--checkout-campaign-middle-phase-overlay-color",(null==o?void 0:o.campaignOffersMiddlePhaseOverlayColor)||"#292727ad"),document.documentElement.style.lineHeight="1.5"}(k)}),[k]),i.useEffect((function(){g.getInstance().checkLocalization(),U(),h()}),[]);var U=i.useCallback((function(){return e(void 0,void 0,void 0,(function(){var o,e,r,i,s,n,d,a,m,c,u,v,h,k,b,P,w,_,S,O,D,U;return t(this,(function(t){switch(t.label){case 0:if(o=new URLSearchParams(window.location.search),e=o.get("id"),r=o.get("step"),i=o.get("lines"),s=o.get("couponCode"),n=o.get("miniCart"),!i)return[3,5];t.label=1;case 1:return t.trys.push([1,3,,4]),(d=g.getInstance().cartStore).removeCart(),a=i.split(","),m=a.map((function(o){var e=o.split(":"),t=e[0],r=e[1];return{variantId:t,quantity:parseInt(r)}})),c={variantLines:m,couponCode:s||void 0},[4,d.createCart(c)];case 2:return(u=t.sent()).success&&(v=j.getCurrentRouting(),h=(null==v?void 0:v.path)?"/".concat(v.path):"",k=n?"&miniCart=".concat(encodeURIComponent(n)):"",window.location.href="".concat(h,"/checkout?id=").concat(null===(D=u.response.data)||void 0===D?void 0:D.id,"&step=info").concat(k)),[3,4];case 3:return b=t.sent(),console.error("Error creating cart:",b),[3,4];case 4:return[2];case 5:return e?(P=!1,r&&r===l.SUCCESS&&(P=!0),[4,p({id:e,getCompletedCart:P,targetPageType:f.CHECKOUT})]):[2,F.replace("/")];case 6:if(w=t.sent(),B)return[3,10];t.label=7;case 7:return t.trys.push([7,9,,10]),[4,Promise.race([E.listCheckoutSettings({}),new Promise((function(o,e){return setTimeout((function(){return e(new Error("timeout"))}),1e4)}))])];case 8:return(_=t.sent()).isSuccess&&(null===(U=_.data)||void 0===U?void 0:U.length)?(I(_.data[0]),[3,10]):(console.error("CHECKOUT SETTINGS FETCH FAILED!"),L(!0),[2]);case 9:return S=t.sent(),console.error("CHECKOUT SETTINGS FETCH FAILED!",S),L(!0),[2];case 10:return w.isSuccess&&w.data?(O=w.data,T(new x(O)),g.getInstance().cartStore.setCart(new y(O))):w.errorCodes.some((function(o){return o===C.LOGIN_REQUIRED}))?F.replace("/account/login?redirect="+encodeURIComponent(window.location.href)):F.replace("/"),[2]}}))}))}),[]);if(D){var N=j.getMerchantSettings();return i.createElement(m,{logo:(null==k?void 0:k.logo)||(null==N?void 0:N.logo),merchantName:null==N?void 0:N.merchantName,backHref:c(),returnPolicy:P.returnPolicy,privacyPolicy:P.privacyPolicy,termsOfService:P.termsOfService,imprint:P.imprint,shippingPolicy:P.shippingPolicy})}return _&&B?i.createElement(n,r({checkout:_,customizationProps:k},P,{checkoutSettings:B})):i.createElement(a,null)}));export{k as default};
|
|
1
|
+
import{__rest as o,__awaiter as e,__generator as t,__assign as r}from'./../ext/tslib/tslib.es6.js';import*as i from"react";import{observer as s}from"mobx-react-lite";import n from"../components/checkout/index.js";import{useRouter as d}from"next/router.js";import{FullscreenLoading as a}from"../components/checkout/components/fullscreen-loading/index.js";import{CheckoutLoadFailed as m,getCheckoutHomeHref as c}from"../components/checkout/components/checkout-load-failed/index.js";import{CheckoutStep as l}from"../components/checkout/model.js";import{setAPIClientConfig as u,getCartById as p,CampaignOfferTargetPageTypeEnum as f}from"@ikas/storefront-api";import{IkasStorefrontConfig as j}from"@ikas/storefront-config";import"../analytics/analytics.js";import"../analytics/head/index.js";import"../components/page/index.js";import"../components/page/head.js";import"next/image.js";import"@ikas/storefront-model-functions";import"../components/link/index.js";import"../components/page-editor/loader/style.module.scss.js";import"../components/google-captcha/index.js";import"../components/paypal-express-checkout/index.js";import{IkasBaseStore as g}from"../store/base.js";import"mobx";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"@ikas/storefront-models";import"../models/data/campaign-offer/index.js";import"../models/data/cart/campaign-offer/index.js";import{IkasCart as y}from"../models/data/cart/index.js";import"../models/data/category/path-item/index.js";import"../models/data/category/index.js";import{IkasCheckout as x}from"../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{LocalizedAddressConfig as v}from"@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"./home.js";import"./_slug_/index.js";import"./pages/_slug_.js";import"./account/index.js";import"./account/addresses.js";import"./account/orders/index.js";import"./account/orders/_id_.js";import"./account/login.js";import"./account/register.js";import"./account/forgot-password.js";import"./account/recover-password.js";import"./cart.js";import"./editor.js";import"./account/favorite-products.js";import"./search.js";import"next/error.js";import"./blog/index.js";import"./blog/_slug_.js";import"./raffle/_slug_.js";import"./raffle/index.js";import"./account/raffles.js";import"./account/activate.js";import"../store/customer/index.js";import"../store/cart/index.js";import"lodash/get";import{initIkasEvents as h}from"../analytics/events.js";import{APIErrorCode as C}from'./../ext/@ikas/fe-api-client/build/utils/api.js';import'./../ext/axios/index.js';import'./../ext/@ikas/fe-api-client/build/ext/lodash/_defineProperty.js';import'./../ext/@ikas/fe-api-client/build/ext/lodash/_baseGetTag.js';import'./../ext/@ikas/fe-api-client/build/ext/lodash/_stringToPath.js';import'./../ext/@ikas/fe-api-client/build/ext/lodash/_baseToString.js';import E from"../store/checkout/index.js";var k=s((function(s){var k=s.customizationProps,b=s.configJson,P=o(s,["customizationProps","configJson"]),F=d(),w=i.useState(),_=w[0],T=w[1],S=i.useState(P.checkoutSettings),B=S[0],I=S[1],O=i.useState(!1),D=O[0],L=O[1];"undefined"==typeof window&&b&&j.clear(),j.init(b),v.setCDNUrl(process.env.NEXT_PUBLIC_SETTINGS_CDN_URL),u(),i.useEffect((function(){!function(o){document.documentElement.style.setProperty("--checkout-button-bg-color",(null==o?void 0:o.buttonBgColor)||"#272727"),document.documentElement.style.setProperty("--checkout-button-text-color",(null==o?void 0:o.buttonTextColor)||"#FFFFFF"),document.documentElement.style.setProperty("--checkout-button-disabled-bg-color",(null==o?void 0:o.buttonDisabledBgColor)||"#F7F7F9"),document.documentElement.style.setProperty("--checkout-button-disabled-text-color",(null==o?void 0:o.buttonDisabledTextColor)||"#8A8B94"),document.documentElement.style.setProperty("--checkout-primary-text-color",(null==o?void 0:o.primaryTextColor)||"#272727"),document.documentElement.style.setProperty("--checkout-secondary-text-color",(null==o?void 0:o.secondaryTextColor)||"#8A8B94"),document.documentElement.style.setProperty("--checkout-primary-bg-color",(null==o?void 0:o.primaryBgColor)||"#FFFFFF"),document.documentElement.style.setProperty("--checkout-secondary-bg-color",(null==o?void 0:o.secondaryBgColor)||"#F7F7F9"),document.documentElement.style.setProperty("--checkout-border-color",(null==o?void 0:o.borderColor)||"#E5E4E9"),document.documentElement.style.setProperty("--checkout-card-bg-color",(null==o?void 0:o.cardBgColor)||"#F7F7F9"),document.documentElement.style.setProperty("--checkout-error-color",(null==o?void 0:o.errorColor)||"#FB4E4E"),document.documentElement.style.setProperty("--checkout-error-light-color",(null==o?void 0:o.errorLightColor)||"#FCF3F4"),document.documentElement.style.setProperty("--checkout-warning-color",(null==o?void 0:o.warningColor)||"#FFBC1F"),document.documentElement.style.setProperty("--checkout-warning-light-color",(null==o?void 0:o.warningLightColor)||"#FFFAEE"),document.documentElement.style.setProperty("--checkout-success-color",(null==o?void 0:o.successColor)||"#2DCA73"),document.documentElement.style.setProperty("--checkout-success-light-color",(null==o?void 0:o.successLightColor)||"#F6FFED"),document.documentElement.style.setProperty("--checkout-secondary-button-bg-color",(null==o?void 0:o.secondaryButtonBgColor)||"#ffffff00"),document.documentElement.style.setProperty("--checkout-secondary-button-text-color",(null==o?void 0:o.secondaryButtonTextColor)||"#272727"),document.documentElement.style.setProperty("--checkout-secondary-button-border-color",(null==o?void 0:o.secondaryButtonBorderColor)||"#E5E4E9"),document.documentElement.style.setProperty("--checkout-loyalty-icon-color",(null==o?void 0:o.loyaltyIconColor)||"#F5B53F"),document.documentElement.style.setProperty("--checkout-campaign-title-color",(null==o?void 0:o.campaignOffersTitleColor)||"#272727"),document.documentElement.style.setProperty("--checkout-campaign-description-color",(null==o?void 0:o.campaignOffersDescriptionColor)||"#272727"),document.documentElement.style.setProperty("--checkout-campaign-container-bg-color",(null==o?void 0:o.campaignOffersContainerBgColor)||"#ffffff"),document.documentElement.style.setProperty("--checkout-campaign-discount-percentage-color",(null==o?void 0:o.campaignOffersDiscountPercentageColor)||"#272727"),document.documentElement.style.setProperty("--checkout-campaign-discount-percentage-bg-color",(null==o?void 0:o.campaignOffersDiscountPercentageBgColor)||"#FFF1BD"),document.documentElement.style.setProperty("--checkout-campaign-countdown-text-color",(null==o?void 0:o.campaignOffersCountdownTextColor)||"#272727"),document.documentElement.style.setProperty("--checkout-campaign-countdown-time-color",(null==o?void 0:o.campaignOffersCountdownTimeColor)||"#FB4E4E"),document.documentElement.style.setProperty("--checkout-campaign-countdown-bg-color",(null==o?void 0:o.campaignOffersCountdownBgColor)||"#FFF5F6"),document.documentElement.style.setProperty("--checkout-campaign-middle-phase-overlay-color",(null==o?void 0:o.campaignOffersMiddlePhaseOverlayColor)||"#292727ad"),document.documentElement.style.lineHeight="1.5"}(k)}),[k]),i.useEffect((function(){g.getInstance().checkLocalization(),U(),h()}),[]);var U=i.useCallback((function(){return e(void 0,void 0,void 0,(function(){var o,e,r,i,s,n,d,a,m,c,u,v,h,k,b,P,w,_,S,O,D,U;return t(this,(function(t){switch(t.label){case 0:if(o=new URLSearchParams(window.location.search),e=o.get("id"),r=o.get("step"),i=o.get("lines"),s=o.get("couponCode"),n=o.get("miniCart"),!i)return[3,5];t.label=1;case 1:return t.trys.push([1,3,,4]),(d=g.getInstance().cartStore).removeCart(),a=i.split(","),m=a.map((function(o){var e=o.split(":"),t=e[0],r=e[1];return{variantId:t,quantity:parseInt(r)}})),c={variantLines:m,couponCode:s||void 0},[4,d.createCart(c)];case 2:return(u=t.sent()).success&&(v=j.getCurrentRouting(),h=(null==v?void 0:v.path)?"/".concat(v.path):"",k=n?"&miniCart=".concat(encodeURIComponent(n)):"",window.location.href="".concat(h,"/checkout?id=").concat(null===(D=u.response.data)||void 0===D?void 0:D.id,"&step=info").concat(k)),[3,4];case 3:return b=t.sent(),console.error("Error creating cart:",b),[3,4];case 4:return[2];case 5:return e?(P=!1,r&&r===l.SUCCESS&&(P=!0),[4,p({id:e,getCompletedCart:P,targetPageType:f.CHECKOUT})]):[2,F.replace("/")];case 6:if(w=t.sent(),B)return[3,10];t.label=7;case 7:return t.trys.push([7,9,,10]),[4,Promise.race([E.listCheckoutSettings({}),new Promise((function(o,e){return setTimeout((function(){return e(new Error("timeout"))}),1e4)}))])];case 8:return(_=t.sent()).isSuccess&&(null===(U=_.data)||void 0===U?void 0:U.length)?(I(_.data[0]),[3,10]):(console.error("CHECKOUT SETTINGS FETCH FAILED!"),L(!0),[2]);case 9:return S=t.sent(),console.error("CHECKOUT SETTINGS FETCH FAILED!",S),L(!0),[2];case 10:return w.isSuccess&&w.data?(O=w.data,T(new x(O)),g.getInstance().cartStore.setCart(new y(O))):w.errorCodes.some((function(o){return o===C.LOGIN_REQUIRED}))?F.replace("/account/login?redirect="+encodeURIComponent(window.location.href)):F.replace("/"),[2]}}))}))}),[]);if(D){var N=j.getMerchantSettings();return i.createElement(m,{logo:(null==k?void 0:k.logo)||(null==N?void 0:N.logo),merchantName:null==N?void 0:N.merchantName,backHref:c(),returnPolicy:P.returnPolicy,privacyPolicy:P.privacyPolicy,termsOfService:P.termsOfService,imprint:P.imprint,shippingPolicy:P.shippingPolicy})}return _&&B?i.createElement(n,r({checkout:_,customizationProps:k},P,{checkoutSettings:B})):i.createElement(a,null)}));export{k as default};
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { APIResponse } from "@ikas/fe-api-client";
|
|
2
|
-
import { CheckStocksQueryParams, CreateKlarnaClientTokenParams, CreateSaleTransactionQueryParams, CreateStripePaymentIntentParams, GetAvailableShippingCountriesQueryParams, GetAvailableStockLocationQueryParams, ListCheckoutSettingsQueryParams, ListPaymentGatewayQueryParams, ListProductFileQueryParams, ListStockLocationQueryParams, RetrieveInstallmentInfoQueryParams, GetPayPalClientIdTokenParams, CreatePayPalOrderParams, GetDigitalProductFileDownloadUrlQueryParams, CheckCartStocksQueryParams, CreateAdyenBalancePlatformPaymentParams, UpdatePayPalOrderParams, HepsipayFrameInitParams, CreateIyzicoCheckoutFormParams, CreateStripeExpressCheckoutSessionParams, UpdateStripeExpressCheckoutSessionParams, GetOrderInvoicePdfUrlQueryParams, CreateTkPayCheckoutFormParams } from "@ikas/storefront-api";
|
|
2
|
+
import { CheckStocksQueryParams, CreateKlarnaClientTokenParams, CreateSaleTransactionQueryParams, CreateStripePaymentIntentParams, GetAvailableShippingCountriesQueryParams, GetAvailableStockLocationQueryParams, ListCheckoutSettingsQueryParams, ListPaymentGatewayQueryParams, ListProductFileQueryParams, ListStockLocationQueryParams, RetrieveInstallmentInfoQueryParams, GetPayPalClientIdTokenParams, CreatePayPalOrderParams, GetDigitalProductFileDownloadUrlQueryParams, CheckCartStocksQueryParams, CreateAdyenBalancePlatformPaymentParams, UpdatePayPalOrderParams, HepsipayFrameInitParams, CreateIyzicoCheckoutFormParams, CreateStripeExpressCheckoutSessionParams, UpdateStripeExpressCheckoutSessionParams, GetOrderInvoicePdfUrlQueryParams, CreateTkPayCheckoutFormParams, ListPaymentSavedCardQueryParams } from "@ikas/storefront-api";
|
|
3
3
|
import { IkasAvailableStockLocation, IkasCheckoutSettings, IkasPaymentGateway, IkasStockLocation, IkasProductFile } from "../../models/data";
|
|
4
4
|
export default class CheckoutStore {
|
|
5
5
|
static createSaleTransactionWithCart(params: CreateSaleTransactionQueryParams): Promise<APIResponse<import("@ikas/storefront-api").TransactionResponse> | APIResponse<undefined>>;
|
|
6
6
|
static listPaymentGateway(params: ListPaymentGatewayQueryParams): Promise<APIResponse<IkasPaymentGateway[]>>;
|
|
7
7
|
static getStoreCreditBalance(): Promise<APIResponse<import("@ikas/storefront-models").IkasStoreCreditBalance | null>>;
|
|
8
|
+
static listPaymentSavedCard(params: ListPaymentSavedCardQueryParams): Promise<APIResponse<import("@ikas/storefront-api").SavedCard[]>>;
|
|
8
9
|
static listProductFile(params: ListProductFileQueryParams): Promise<APIResponse<IkasProductFile[]>>;
|
|
9
10
|
static getDigitalProductFileDownloadUrl(params: GetDigitalProductFileDownloadUrlQueryParams): Promise<APIResponse<string>>;
|
|
10
11
|
static getOrderInvoicePdfUrl(params: GetOrderInvoicePdfUrlQueryParams): Promise<APIResponse<string>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__awaiter as t,__generator as e}from'./../../ext/tslib/tslib.es6.js';import{APIResponse as r}from'./../../ext/@ikas/fe-api-client/build/utils/api.js';import'./../../ext/axios/index.js';import'./../../ext/@ikas/fe-api-client/build/ext/lodash/_defineProperty.js';import'./../../ext/@ikas/fe-api-client/build/ext/lodash/_baseGetTag.js';import'./../../ext/@ikas/fe-api-client/build/ext/lodash/_stringToPath.js';import'./../../ext/@ikas/fe-api-client/build/ext/lodash/_baseToString.js';import{createSaleTransactionWithCart as n,listPaymentGateway as i,getStoreCreditBalance as o,listProductFile as a,getDigitalProductFileDownloadUrl as s,getOrderInvoicePdfUrl as d,retrieveInstallmentInfo as u,checkStocks as c,checkCartStocks as l,listCheckoutSettings as m,getAvailableShippingCountries as p,listStockLocations as f,getAvailableStockLocations as h,createStripePaymentIntent as v,createKlarnaClientToken as j,createAdyenBalancePlatformPaymentSession as x,getPayPalClientId as g,createPayPalOrder as w,updatePaypalOrder as b,hepsipayFrameInit as k,createIyzicoCheckoutForm as y,createStripeExpressCheckoutSession as E,updateStripeExpressCheckoutSession as L,createTkPayCheckoutForm as Q}from"@ikas/storefront-api";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"@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{IkasCheckoutSettings as P}from"../../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{IkasPaymentGateway as S}from"../../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{IkasProductFile as C}from"../../models/data/product-file/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{IkasAvailableStockLocation as _}from"../../models/data/stock-location/available/index.js";import{IkasStockLocation as I}from"../../models/data/stock-location/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";var T=function(){function T(){}return T.createSaleTransactionWithCart=function(r){return t(this,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return[4,n(r)];case 1:return[2,t.sent()]}}))}))},T.listPaymentGateway=function(n){var o;return t(this,void 0,void 0,(function(){var t;return e(this,(function(e){switch(e.label){case 0:return[4,i(n)];case 1:return t=e.sent(),[2,new r(null===(o=t.data)||void 0===o?void 0:o.map((function(t){return new S(t)})),t.graphQLErrors)]}}))}))},T.getStoreCreditBalance=function(){return t(this,void 0,void 0,(function(){var t;return e(this,(function(e){switch(e.label){case 0:return[4,o()];case 1:return t=e.sent(),[2,new r(t.data,t.graphQLErrors)]}}))}))},T.listProductFile=function(n){var i;return t(this,void 0,void 0,(function(){var t;return e(this,(function(e){switch(e.label){case 0:return[4,a(n)];case 1:return t=e.sent(),[2,new r(null===(i=t.data)||void 0===i?void 0:i.map((function(t){return new C(t)})),t.graphQLErrors)]}}))}))},T.getDigitalProductFileDownloadUrl=function(n){return t(this,void 0,void 0,(function(){var t;return e(this,(function(e){switch(e.label){case 0:return[4,s(n)];case 1:return t=e.sent(),[2,new r(t.data,t.graphQLErrors)]}}))}))},T.getOrderInvoicePdfUrl=function(n){return t(this,void 0,void 0,(function(){var t;return e(this,(function(e){switch(e.label){case 0:return[4,d(n)];case 1:return t=e.sent(),[2,new r(t.data,t.graphQLErrors)]}}))}))},T.retrieveInstallmentInfo=function(r){return t(this,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return[4,u(r)];case 1:return[2,t.sent()]}}))}))},T.checkStocks=function(r){return t(this,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return[4,c(r)];case 1:return[2,t.sent()]}}))}))},T.checkCartStocks=function(r){return t(this,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return[4,l(r)];case 1:return[2,t.sent()]}}))}))},T.listCheckoutSettings=function(n){var i;return t(this,void 0,void 0,(function(){var t;return e(this,(function(e){switch(e.label){case 0:return[4,m(n)];case 1:return t=e.sent(),[2,new r(null===(i=t.data)||void 0===i?void 0:i.map((function(t){return new P(t)})),t.graphQLErrors)]}}))}))},T.getAvailableShippingCountries=function(r){return t(this,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return[4,p(r)];case 1:return[2,t.sent()]}}))}))},T.listStockLocation=function(n){var i;return t(this,void 0,void 0,(function(){var t;return e(this,(function(e){switch(e.label){case 0:return[4,f(n)];case 1:return t=e.sent(),[2,new r(null===(i=t.data)||void 0===i?void 0:i.map((function(t){return new I(t)})),t.graphQLErrors)]}}))}))},T.getAvailableStockLocations=function(n){var i;return t(this,void 0,void 0,(function(){var t;return e(this,(function(e){switch(e.label){case 0:return[4,h(n)];case 1:return t=e.sent(),[2,new r(null===(i=t.data)||void 0===i?void 0:i.map((function(t){return new _(t)})),t.graphQLErrors)]}}))}))},T.createStripePaymentIntent=function(n){return t(this,void 0,void 0,(function(){var t;return e(this,(function(e){switch(e.label){case 0:return[4,v(n)];case 1:return t=e.sent(),[2,new r(t.data,t.graphQLErrors)]}}))}))},T.createKlarnaClientToken=function(n){return t(this,void 0,void 0,(function(){var t;return e(this,(function(e){switch(e.label){case 0:return[4,j(n)];case 1:return t=e.sent(),[2,new r(t.data,t.graphQLErrors)]}}))}))},T.createAdyenBalancePlatformPaymentSession=function(n){return t(this,void 0,void 0,(function(){var t;return e(this,(function(e){switch(e.label){case 0:return[4,x(n)];case 1:return t=e.sent(),[2,new r(t.data,t.graphQLErrors)]}}))}))},T.getPayPalClientId=function(n){return t(this,void 0,void 0,(function(){var t;return e(this,(function(e){switch(e.label){case 0:return[4,g(n)];case 1:return t=e.sent(),[2,new r(t.data,t.graphQLErrors)]}}))}))},T.createPayPalOrder=function(n){return t(this,void 0,void 0,(function(){var t;return e(this,(function(e){switch(e.label){case 0:return[4,w(n)];case 1:return t=e.sent(),[2,new r(t.data,t.graphQLErrors)]}}))}))},T.updatePaypalOrder=function(n){return t(this,void 0,void 0,(function(){var t;return e(this,(function(e){switch(e.label){case 0:return[4,b(n)];case 1:return t=e.sent(),[2,new r(t.data,t.graphQLErrors)]}}))}))},T.hepsipayFrameInit=function(n){return t(this,void 0,void 0,(function(){var t;return e(this,(function(e){switch(e.label){case 0:return[4,k(n)];case 1:return t=e.sent(),[2,new r(t.data,t.graphQLErrors)]}}))}))},T.createIyzicoCheckoutForm=function(n){return t(this,void 0,void 0,(function(){var t;return e(this,(function(e){switch(e.label){case 0:return[4,y(n)];case 1:return t=e.sent(),[2,new r(t.data,t.graphQLErrors)]}}))}))},T.createStripeExpressCheckoutSession=function(n){return t(this,void 0,void 0,(function(){var t;return e(this,(function(e){switch(e.label){case 0:return[4,E(n)];case 1:return t=e.sent(),[2,new r(t.data,t.graphQLErrors)]}}))}))},T.updateStripeExpressCheckoutSession=function(n){return t(this,void 0,void 0,(function(){var t;return e(this,(function(e){switch(e.label){case 0:return[4,L(n)];case 1:return t=e.sent(),[2,new r(t.data,t.graphQLErrors)]}}))}))},T.createTkPayCheckoutForm=function(n){return t(this,void 0,void 0,(function(){var t;return e(this,(function(e){switch(e.label){case 0:return[4,Q(n)];case 1:return t=e.sent(),[2,new r(t.data,t.graphQLErrors)]}}))}))},T}();export{T as default};
|
|
1
|
+
import{__awaiter as t,__generator as e}from'./../../ext/tslib/tslib.es6.js';import{APIResponse as r}from'./../../ext/@ikas/fe-api-client/build/utils/api.js';import'./../../ext/axios/index.js';import'./../../ext/@ikas/fe-api-client/build/ext/lodash/_defineProperty.js';import'./../../ext/@ikas/fe-api-client/build/ext/lodash/_baseGetTag.js';import'./../../ext/@ikas/fe-api-client/build/ext/lodash/_stringToPath.js';import'./../../ext/@ikas/fe-api-client/build/ext/lodash/_baseToString.js';import{createSaleTransactionWithCart as n,listPaymentGateway as i,getStoreCreditBalance as o,listPaymentSavedCard as a,listProductFile as s,getDigitalProductFileDownloadUrl as d,getOrderInvoicePdfUrl as u,retrieveInstallmentInfo as c,checkStocks as l,checkCartStocks as m,listCheckoutSettings as p,getAvailableShippingCountries as f,listStockLocations as h,getAvailableStockLocations as v,createStripePaymentIntent as j,createKlarnaClientToken as x,createAdyenBalancePlatformPaymentSession as w,getPayPalClientId as g,createPayPalOrder as b,updatePaypalOrder as k,hepsipayFrameInit as y,createIyzicoCheckoutForm as E,createStripeExpressCheckoutSession as L,updateStripeExpressCheckoutSession as Q,createTkPayCheckoutForm as P}from"@ikas/storefront-api";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"@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{IkasCheckoutSettings as S}from"../../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{IkasPaymentGateway as C}from"../../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{IkasProductFile as _}from"../../models/data/product-file/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{IkasAvailableStockLocation as I}from"../../models/data/stock-location/available/index.js";import{IkasStockLocation as T}from"../../models/data/stock-location/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";var F=function(){function F(){}return F.createSaleTransactionWithCart=function(r){return t(this,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return[4,n(r)];case 1:return[2,t.sent()]}}))}))},F.listPaymentGateway=function(n){var o;return t(this,void 0,void 0,(function(){var t;return e(this,(function(e){switch(e.label){case 0:return[4,i(n)];case 1:return t=e.sent(),[2,new r(null===(o=t.data)||void 0===o?void 0:o.map((function(t){return new C(t)})),t.graphQLErrors)]}}))}))},F.getStoreCreditBalance=function(){return t(this,void 0,void 0,(function(){var t;return e(this,(function(e){switch(e.label){case 0:return[4,o()];case 1:return t=e.sent(),[2,new r(t.data,t.graphQLErrors)]}}))}))},F.listPaymentSavedCard=function(r){return t(this,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return[4,a(r)];case 1:return[2,t.sent()]}}))}))},F.listProductFile=function(n){var i;return t(this,void 0,void 0,(function(){var t;return e(this,(function(e){switch(e.label){case 0:return[4,s(n)];case 1:return t=e.sent(),[2,new r(null===(i=t.data)||void 0===i?void 0:i.map((function(t){return new _(t)})),t.graphQLErrors)]}}))}))},F.getDigitalProductFileDownloadUrl=function(n){return t(this,void 0,void 0,(function(){var t;return e(this,(function(e){switch(e.label){case 0:return[4,d(n)];case 1:return t=e.sent(),[2,new r(t.data,t.graphQLErrors)]}}))}))},F.getOrderInvoicePdfUrl=function(n){return t(this,void 0,void 0,(function(){var t;return e(this,(function(e){switch(e.label){case 0:return[4,u(n)];case 1:return t=e.sent(),[2,new r(t.data,t.graphQLErrors)]}}))}))},F.retrieveInstallmentInfo=function(r){return t(this,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return[4,c(r)];case 1:return[2,t.sent()]}}))}))},F.checkStocks=function(r){return t(this,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return[4,l(r)];case 1:return[2,t.sent()]}}))}))},F.checkCartStocks=function(r){return t(this,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return[4,m(r)];case 1:return[2,t.sent()]}}))}))},F.listCheckoutSettings=function(n){var i;return t(this,void 0,void 0,(function(){var t;return e(this,(function(e){switch(e.label){case 0:return[4,p(n)];case 1:return t=e.sent(),[2,new r(null===(i=t.data)||void 0===i?void 0:i.map((function(t){return new S(t)})),t.graphQLErrors)]}}))}))},F.getAvailableShippingCountries=function(r){return t(this,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return[4,f(r)];case 1:return[2,t.sent()]}}))}))},F.listStockLocation=function(n){var i;return t(this,void 0,void 0,(function(){var t;return e(this,(function(e){switch(e.label){case 0:return[4,h(n)];case 1:return t=e.sent(),[2,new r(null===(i=t.data)||void 0===i?void 0:i.map((function(t){return new T(t)})),t.graphQLErrors)]}}))}))},F.getAvailableStockLocations=function(n){var i;return t(this,void 0,void 0,(function(){var t;return e(this,(function(e){switch(e.label){case 0:return[4,v(n)];case 1:return t=e.sent(),[2,new r(null===(i=t.data)||void 0===i?void 0:i.map((function(t){return new I(t)})),t.graphQLErrors)]}}))}))},F.createStripePaymentIntent=function(n){return t(this,void 0,void 0,(function(){var t;return e(this,(function(e){switch(e.label){case 0:return[4,j(n)];case 1:return t=e.sent(),[2,new r(t.data,t.graphQLErrors)]}}))}))},F.createKlarnaClientToken=function(n){return t(this,void 0,void 0,(function(){var t;return e(this,(function(e){switch(e.label){case 0:return[4,x(n)];case 1:return t=e.sent(),[2,new r(t.data,t.graphQLErrors)]}}))}))},F.createAdyenBalancePlatformPaymentSession=function(n){return t(this,void 0,void 0,(function(){var t;return e(this,(function(e){switch(e.label){case 0:return[4,w(n)];case 1:return t=e.sent(),[2,new r(t.data,t.graphQLErrors)]}}))}))},F.getPayPalClientId=function(n){return t(this,void 0,void 0,(function(){var t;return e(this,(function(e){switch(e.label){case 0:return[4,g(n)];case 1:return t=e.sent(),[2,new r(t.data,t.graphQLErrors)]}}))}))},F.createPayPalOrder=function(n){return t(this,void 0,void 0,(function(){var t;return e(this,(function(e){switch(e.label){case 0:return[4,b(n)];case 1:return t=e.sent(),[2,new r(t.data,t.graphQLErrors)]}}))}))},F.updatePaypalOrder=function(n){return t(this,void 0,void 0,(function(){var t;return e(this,(function(e){switch(e.label){case 0:return[4,k(n)];case 1:return t=e.sent(),[2,new r(t.data,t.graphQLErrors)]}}))}))},F.hepsipayFrameInit=function(n){return t(this,void 0,void 0,(function(){var t;return e(this,(function(e){switch(e.label){case 0:return[4,y(n)];case 1:return t=e.sent(),[2,new r(t.data,t.graphQLErrors)]}}))}))},F.createIyzicoCheckoutForm=function(n){return t(this,void 0,void 0,(function(){var t;return e(this,(function(e){switch(e.label){case 0:return[4,E(n)];case 1:return t=e.sent(),[2,new r(t.data,t.graphQLErrors)]}}))}))},F.createStripeExpressCheckoutSession=function(n){return t(this,void 0,void 0,(function(){var t;return e(this,(function(e){switch(e.label){case 0:return[4,L(n)];case 1:return t=e.sent(),[2,new r(t.data,t.graphQLErrors)]}}))}))},F.updateStripeExpressCheckoutSession=function(n){return t(this,void 0,void 0,(function(){var t;return e(this,(function(e){switch(e.label){case 0:return[4,Q(n)];case 1:return t=e.sent(),[2,new r(t.data,t.graphQLErrors)]}}))}))},F.createTkPayCheckoutForm=function(n){return t(this,void 0,void 0,(function(){var t;return e(this,(function(e){switch(e.label){case 0:return[4,P(n)];case 1:return t=e.sent(),[2,new r(t.data,t.graphQLErrors)]}}))}))},F}();export{F as default};
|
|
@@ -44,6 +44,8 @@ export default class CustomerStoreAPI {
|
|
|
44
44
|
static sendContactFormToMerchant(params: SendContactFormToMerchantQueryParams): Promise<APIResponse<boolean> | APIResponse<undefined>>;
|
|
45
45
|
static listFavoriteProducts(): Promise<APIResponse<IkasFavoriteProduct[]>>;
|
|
46
46
|
static saveFavoriteProduct(params: SaveFavoriteProductQueryParams): Promise<APIResponse<boolean> | APIResponse<undefined>>;
|
|
47
|
+
static listPaymentSavedCard(): Promise<APIResponse<import("@ikas/storefront-api").SavedCard[]>>;
|
|
48
|
+
static deletePaymentSavedCard(id: string): Promise<APIResponse<boolean> | APIResponse<undefined>>;
|
|
47
49
|
static isFavoriteProduct(params: IsFavoriteProductQueryParams): Promise<APIResponse<boolean> | APIResponse<undefined>>;
|
|
48
50
|
static createCustomerReview(params: CreateCustomerReviewQueryParams): Promise<APIResponse<IkasCustomerReview | null>>;
|
|
49
51
|
static listCustomerReviews(params: ListCustomerReviewsQueryParams): Promise<APIResponse<{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__awaiter as t,__generator as e,__assign as r}from'./../../ext/tslib/tslib.es6.js';import{APIResponse as n}from'./../../ext/@ikas/fe-api-client/build/utils/api.js';import'./../../ext/axios/index.js';import'./../../ext/@ikas/fe-api-client/build/ext/lodash/_defineProperty.js';import'./../../ext/@ikas/fe-api-client/build/ext/lodash/_baseGetTag.js';import'./../../ext/@ikas/fe-api-client/build/ext/lodash/_stringToPath.js';import'./../../ext/@ikas/fe-api-client/build/ext/lodash/_baseToString.js';import{login as i,getExternalAccountLink as o,unlinkExternalAccount as s,socialLogin as a,register as d,refreshToken as u,forgotPassword as c,recoverPassword as l,checkEmail as m,getCustomer as f,saveCustomer as h,getOrders as p,getOrderByEmail as v,listOrderTransactions as w,listOrderTransactionsWithPrices as j,getRefundableLines as x,createOrderRefundRequest as b,subscribeToMarketingNotifications as g,getLastViewedProducts as L,saveLastViewedProducts as y,listOrderRefundSettings as E,sendContactFormToMerchant as Q,listFavoriteProducts as C,saveFavoriteProduct as P,isFavoriteProduct as k,createCustomerReview as _,listCustomerReviews as T,listCustomerReviewSummary as R,listCustomerAttribute as O,activateCustomer as A,resendCustomerActivationMail as F,resendCustomerPhoneVerificationCode as I,validateCustomerPhoneVerificationCode as M,validateOTPCode as S,saveCustomerFormData as V,exportCustomerPersonelData as z,deactivateCustomer as B,getLoyaltyCustomerInfo as D,listLoyaltyProgramPointHistory as q,listLoyaltyProgramTiers as G,listEarningMethods as H,listSpendingMethodsByCartId as N,useLoyaltyPoints as W}from"@ikas/storefront-api";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"@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{IkasCustomerAttribute as J}from"../../models/data/customer/attribute/index.js";import{IkasCustomerReviewSummary as K}from"../../models/data/customer/review/summary/index.js";import{IkasCustomerReview as U}from"../../models/data/customer/review/index.js";import{IkasCustomer as X}from"../../models/data/customer/index.js";import"../../models/data/customer-form-data-input/index.js";import"../../models/data/district/index.js";import{IkasFavoriteProduct as Y}from"../../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{IkasLastViewedProduct as Z}from"../../models/data/last-viewed-product/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{IkasOrderTransactionWithPrices as $}from"../../models/data/order/order-transaction-with-prices/index.js";import"../../models/data/order/package/index.js";import{IkasRefundableLines as tt}from"../../models/data/order/refund/refundable-lines/index.js";import{IkasOrderRefundSettings as et}from"../../models/data/order/refund/settings/index.js";import{IkasOrderTransaction as rt}from"../../models/data/order/transaction/index.js";import{IkasOrder as nt}from"../../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";var it=function(){function it(){}return it.login=function(o){return t(this,void 0,void 0,(function(){var t;return e(this,(function(e){switch(e.label){case 0:return[4,i(o)];case 1:return t=e.sent(),[2,new n(t.data?r(r({},t.data),{customer:t.data.customer?new X(t.data.customer):null}):null,t.graphQLErrors)]}}))}))},it.getExternalAccountLink=function(r){var i;return t(this,void 0,void 0,(function(){var t;return e(this,(function(e){switch(e.label){case 0:return[4,o(r)];case 1:return t=e.sent(),[2,new n(null!==(i=t.data)&&void 0!==i?i:null,t.graphQLErrors)]}}))}))},it.unlinkExternalAccount=function(r){return t(this,void 0,void 0,(function(){var t;return e(this,(function(e){switch(e.label){case 0:return[4,s(r)];case 1:return t=e.sent(),[2,new n(!!t.data,t.graphQLErrors)]}}))}))},it.socialLogin=function(i){return t(this,void 0,void 0,(function(){var t;return e(this,(function(e){switch(e.label){case 0:return[4,a(i)];case 1:return t=e.sent(),[2,new n(t.data?r(r({},t.data),{customer:t.data.customer?new X(t.data.customer):null}):null,t.graphQLErrors)]}}))}))},it.register=function(i){return t(this,void 0,void 0,(function(){var t;return e(this,(function(e){switch(e.label){case 0:return[4,d(i)];case 1:return t=e.sent(),[2,new n(t.data?r(r({},t.data),{customer:t.data.customer?new X(t.data.customer):null}):null,t.graphQLErrors)]}}))}))},it.refreshToken=function(r){return t(this,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return[4,u(r)];case 1:return[2,t.sent()]}}))}))},it.forgotPassword=function(r){return t(this,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return[4,c(r)];case 1:return[2,t.sent()]}}))}))},it.recoverPassword=function(r){return t(this,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return[4,l(r)];case 1:return[2,t.sent()]}}))}))},it.checkEmail=function(r){return t(this,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return[4,m(r)];case 1:return[2,t.sent()]}}))}))},it.getCustomer=function(){return t(this,void 0,void 0,(function(){var t;return e(this,(function(e){switch(e.label){case 0:return[4,f()];case 1:return t=e.sent(),[2,new n(t.data?new X(t.data):null,t.graphQLErrors)]}}))}))},it.saveCustomer=function(r){return t(this,void 0,void 0,(function(){var t;return e(this,(function(e){switch(e.label){case 0:return[4,h(r)];case 1:return t=e.sent(),[2,new n(t.data?new X(t.data):null,t.graphQLErrors)]}}))}))},it.getOrders=function(r){var i;return t(this,void 0,void 0,(function(){var t;return e(this,(function(e){switch(e.label){case 0:return[4,p(r)];case 1:return t=e.sent(),[2,new n(null===(i=t.data)||void 0===i?void 0:i.map((function(t){return new nt(t)})),t.graphQLErrors)]}}))}))},it.getOrderByEmail=function(r){return t(this,void 0,void 0,(function(){var t;return e(this,(function(e){switch(e.label){case 0:return[4,v(r)];case 1:return t=e.sent(),[2,new n(t.data?new nt(t.data):null,t.graphQLErrors)]}}))}))},it.listOrderTransactions=function(r){var i;return t(this,void 0,void 0,(function(){var t;return e(this,(function(e){switch(e.label){case 0:return[4,w(r)];case 1:return t=e.sent(),[2,new n(null===(i=t.data)||void 0===i?void 0:i.map((function(t){return new rt(t)})),t.graphQLErrors)]}}))}))},it.listOrderTransactionsWithPrices=function(r){return t(this,void 0,void 0,(function(){var t;return e(this,(function(e){switch(e.label){case 0:return[4,j(r)];case 1:return t=e.sent(),[2,new n(t.data?new $(t.data):null,t.graphQLErrors)]}}))}))},it.getRefundableLines=function(r){return t(this,void 0,void 0,(function(){var t;return e(this,(function(e){switch(e.label){case 0:return[4,x(r)];case 1:return t=e.sent(),[2,new n(t.data?new tt(t.data):null,t.graphQLErrors)]}}))}))},it.createOrderRefundRequest=function(r){return t(this,void 0,void 0,(function(){var t;return e(this,(function(e){switch(e.label){case 0:return[4,b(r)];case 1:return t=e.sent(),[2,new n(t.data?new nt(t.data):null,t.graphQLErrors)]}}))}))},it.subscribeToMarketingNotifications=function(r){return t(this,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return[4,g(r)];case 1:return[2,t.sent()]}}))}))},it.getLastViewedProducts=function(r){var i;return t(this,void 0,void 0,(function(){var t;return e(this,(function(e){switch(e.label){case 0:return[4,L(r)];case 1:return t=e.sent(),[2,new n(null===(i=t.data)||void 0===i?void 0:i.map((function(t){return new Z(t)})),t.graphQLErrors)]}}))}))},it.saveLastViewedProducts=function(r){return t(this,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return[4,y(r)];case 1:return[2,t.sent()]}}))}))},it.listOrderRefundSettings=function(r){var i;return t(this,void 0,void 0,(function(){var t;return e(this,(function(e){switch(e.label){case 0:return[4,E(r)];case 1:return t=e.sent(),[2,new n(null===(i=t.data)||void 0===i?void 0:i.map((function(t){return new et(t)})),t.graphQLErrors)]}}))}))},it.sendContactFormToMerchant=function(r){return t(this,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return[4,Q(r)];case 1:return[2,t.sent()]}}))}))},it.listFavoriteProducts=function(){var r;return t(this,void 0,void 0,(function(){var t;return e(this,(function(e){switch(e.label){case 0:return[4,C()];case 1:return t=e.sent(),[2,new n(null===(r=t.data)||void 0===r?void 0:r.map((function(t){return new Y(t)})),t.graphQLErrors)]}}))}))},it.saveFavoriteProduct=function(r){return t(this,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return[4,P(r)];case 1:return[2,t.sent()]}}))}))},it.isFavoriteProduct=function(r){return t(this,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return[4,k({productId:r.productId})];case 1:return[2,t.sent()]}}))}))},it.createCustomerReview=function(r){return t(this,void 0,void 0,(function(){var t;return e(this,(function(e){switch(e.label){case 0:return[4,_(r)];case 1:return t=e.sent(),[2,new n(t.data?new U(t.data):null,t.graphQLErrors)]}}))}))},it.listCustomerReviews=function(i){return t(this,void 0,void 0,(function(){var t;return e(this,(function(e){switch(e.label){case 0:return[4,T(r({},i))];case 1:return t=e.sent(),[2,new n(t.data?r(r({},t.data),{data:t.data.data.map((function(t){return new U(t)}))}):null,t.graphQLErrors)]}}))}))},it.listCustomerReviewSummary=function(i){var o;return t(this,void 0,void 0,(function(){var t;return e(this,(function(e){switch(e.label){case 0:return[4,R(i)];case 1:return t=e.sent(),[2,new n(r(r({},t.data),{data:null===(o=t.data)||void 0===o?void 0:o.data.map((function(t){return new K(t)}))}),t.graphQLErrors)]}}))}))},it.listCustomerAttribute=function(){var r;return t(this,void 0,void 0,(function(){var t;return e(this,(function(e){switch(e.label){case 0:return[4,O()];case 1:return t=e.sent(),[2,new n(null===(r=t.data)||void 0===r?void 0:r.sort((function(t,e){return t.order&&e.order?t.order-e.order:-1})).map((function(t){return new J(t)}),t.graphQLErrors))]}}))}))},it.activateCustomer=function(r){return t(this,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return[4,A(r)];case 1:return[2,t.sent()]}}))}))},it.resendCustomerActivationMail=function(r){return t(this,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return[4,F(r)];case 1:return[2,t.sent()]}}))}))},it.resendCustomerPhoneVerificationCode=function(){return t(this,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return[4,I()];case 1:return[2,t.sent()]}}))}))},it.validateCustomerPhoneVerificationCode=function(r){return t(this,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return[4,M(r)];case 1:return[2,t.sent()]}}))}))},it.validateOTPCode=function(i){return t(this,void 0,void 0,(function(){var t;return e(this,(function(e){switch(e.label){case 0:return[4,S(i)];case 1:return t=e.sent(),[2,new n(t.data?r(r({},t.data),{customer:t.data.customer?new X(t.data.customer):null}):null,t.graphQLErrors)]}}))}))},it.saveCustomerFormData=function(r){return t(this,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return[4,V(r)];case 1:return[2,t.sent()]}}))}))},it.exportCustomerPersonelData=function(){return t(this,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return[4,z()];case 1:return[2,t.sent()]}}))}))},it.deactivateCustomer=function(r){return t(this,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return[4,B(r)];case 1:return[2,t.sent()]}}))}))},it.getLoyaltyCustomerInfo=function(r){return t(this,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return[4,D(r)];case 1:return[2,t.sent()]}}))}))},it.listLoyaltyProgramPointHistory=function(r){return t(this,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return[4,q(r)];case 1:return[2,t.sent()]}}))}))},it.listLoyaltyProgramTiers=function(){return t(this,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return[4,G()];case 1:return[2,t.sent()]}}))}))},it.listEarningMethods=function(){return t(this,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return[4,H()];case 1:return[2,t.sent()]}}))}))},it.listSpendingMethodsByCartId=function(r){return t(this,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return[4,N(r)];case 1:return[2,t.sent()]}}))}))},it.useLoyaltyPoints=function(r){return t(this,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return[4,W(r)];case 1:return[2,t.sent()]}}))}))},it}();export{it as default};
|
|
1
|
+
import{__awaiter as t,__generator as e,__assign as r}from'./../../ext/tslib/tslib.es6.js';import{APIResponse as n}from'./../../ext/@ikas/fe-api-client/build/utils/api.js';import'./../../ext/axios/index.js';import'./../../ext/@ikas/fe-api-client/build/ext/lodash/_defineProperty.js';import'./../../ext/@ikas/fe-api-client/build/ext/lodash/_baseGetTag.js';import'./../../ext/@ikas/fe-api-client/build/ext/lodash/_stringToPath.js';import'./../../ext/@ikas/fe-api-client/build/ext/lodash/_baseToString.js';import{login as i,getExternalAccountLink as o,unlinkExternalAccount as s,socialLogin as a,register as d,refreshToken as u,forgotPassword as c,recoverPassword as l,checkEmail as m,getCustomer as f,saveCustomer as h,getOrders as v,getOrderByEmail as p,listOrderTransactions as w,listOrderTransactionsWithPrices as j,getRefundableLines as x,createOrderRefundRequest as b,subscribeToMarketingNotifications as g,getLastViewedProducts as L,saveLastViewedProducts as y,listOrderRefundSettings as E,sendContactFormToMerchant as C,listFavoriteProducts as P,saveFavoriteProduct as Q,listPaymentSavedCard as k,deletePaymentSavedCard as _,isFavoriteProduct as T,createCustomerReview as R,listCustomerReviews as O,listCustomerReviewSummary as S,listCustomerAttribute as A,activateCustomer as F,resendCustomerActivationMail as I,resendCustomerPhoneVerificationCode as M,validateCustomerPhoneVerificationCode as V,validateOTPCode as z,saveCustomerFormData as B,exportCustomerPersonelData as D,deactivateCustomer as q,getLoyaltyCustomerInfo as G,listLoyaltyProgramPointHistory as H,listLoyaltyProgramTiers as N,listEarningMethods as W,listSpendingMethodsByCartId as J,useLoyaltyPoints as K}from"@ikas/storefront-api";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"@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{IkasCustomerAttribute as U}from"../../models/data/customer/attribute/index.js";import{IkasCustomerReviewSummary as X}from"../../models/data/customer/review/summary/index.js";import{IkasCustomerReview as Y}from"../../models/data/customer/review/index.js";import{IkasCustomer as Z}from"../../models/data/customer/index.js";import"../../models/data/customer-form-data-input/index.js";import"../../models/data/district/index.js";import{IkasFavoriteProduct as $}from"../../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{IkasLastViewedProduct as tt}from"../../models/data/last-viewed-product/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{IkasOrderTransactionWithPrices as et}from"../../models/data/order/order-transaction-with-prices/index.js";import"../../models/data/order/package/index.js";import{IkasRefundableLines as rt}from"../../models/data/order/refund/refundable-lines/index.js";import{IkasOrderRefundSettings as nt}from"../../models/data/order/refund/settings/index.js";import{IkasOrderTransaction as it}from"../../models/data/order/transaction/index.js";import{IkasOrder as ot}from"../../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";var st=function(){function st(){}return st.login=function(o){return t(this,void 0,void 0,(function(){var t;return e(this,(function(e){switch(e.label){case 0:return[4,i(o)];case 1:return t=e.sent(),[2,new n(t.data?r(r({},t.data),{customer:t.data.customer?new Z(t.data.customer):null}):null,t.graphQLErrors)]}}))}))},st.getExternalAccountLink=function(r){var i;return t(this,void 0,void 0,(function(){var t;return e(this,(function(e){switch(e.label){case 0:return[4,o(r)];case 1:return t=e.sent(),[2,new n(null!==(i=t.data)&&void 0!==i?i:null,t.graphQLErrors)]}}))}))},st.unlinkExternalAccount=function(r){return t(this,void 0,void 0,(function(){var t;return e(this,(function(e){switch(e.label){case 0:return[4,s(r)];case 1:return t=e.sent(),[2,new n(!!t.data,t.graphQLErrors)]}}))}))},st.socialLogin=function(i){return t(this,void 0,void 0,(function(){var t;return e(this,(function(e){switch(e.label){case 0:return[4,a(i)];case 1:return t=e.sent(),[2,new n(t.data?r(r({},t.data),{customer:t.data.customer?new Z(t.data.customer):null}):null,t.graphQLErrors)]}}))}))},st.register=function(i){return t(this,void 0,void 0,(function(){var t;return e(this,(function(e){switch(e.label){case 0:return[4,d(i)];case 1:return t=e.sent(),[2,new n(t.data?r(r({},t.data),{customer:t.data.customer?new Z(t.data.customer):null}):null,t.graphQLErrors)]}}))}))},st.refreshToken=function(r){return t(this,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return[4,u(r)];case 1:return[2,t.sent()]}}))}))},st.forgotPassword=function(r){return t(this,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return[4,c(r)];case 1:return[2,t.sent()]}}))}))},st.recoverPassword=function(r){return t(this,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return[4,l(r)];case 1:return[2,t.sent()]}}))}))},st.checkEmail=function(r){return t(this,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return[4,m(r)];case 1:return[2,t.sent()]}}))}))},st.getCustomer=function(){return t(this,void 0,void 0,(function(){var t;return e(this,(function(e){switch(e.label){case 0:return[4,f()];case 1:return t=e.sent(),[2,new n(t.data?new Z(t.data):null,t.graphQLErrors)]}}))}))},st.saveCustomer=function(r){return t(this,void 0,void 0,(function(){var t;return e(this,(function(e){switch(e.label){case 0:return[4,h(r)];case 1:return t=e.sent(),[2,new n(t.data?new Z(t.data):null,t.graphQLErrors)]}}))}))},st.getOrders=function(r){var i;return t(this,void 0,void 0,(function(){var t;return e(this,(function(e){switch(e.label){case 0:return[4,v(r)];case 1:return t=e.sent(),[2,new n(null===(i=t.data)||void 0===i?void 0:i.map((function(t){return new ot(t)})),t.graphQLErrors)]}}))}))},st.getOrderByEmail=function(r){return t(this,void 0,void 0,(function(){var t;return e(this,(function(e){switch(e.label){case 0:return[4,p(r)];case 1:return t=e.sent(),[2,new n(t.data?new ot(t.data):null,t.graphQLErrors)]}}))}))},st.listOrderTransactions=function(r){var i;return t(this,void 0,void 0,(function(){var t;return e(this,(function(e){switch(e.label){case 0:return[4,w(r)];case 1:return t=e.sent(),[2,new n(null===(i=t.data)||void 0===i?void 0:i.map((function(t){return new it(t)})),t.graphQLErrors)]}}))}))},st.listOrderTransactionsWithPrices=function(r){return t(this,void 0,void 0,(function(){var t;return e(this,(function(e){switch(e.label){case 0:return[4,j(r)];case 1:return t=e.sent(),[2,new n(t.data?new et(t.data):null,t.graphQLErrors)]}}))}))},st.getRefundableLines=function(r){return t(this,void 0,void 0,(function(){var t;return e(this,(function(e){switch(e.label){case 0:return[4,x(r)];case 1:return t=e.sent(),[2,new n(t.data?new rt(t.data):null,t.graphQLErrors)]}}))}))},st.createOrderRefundRequest=function(r){return t(this,void 0,void 0,(function(){var t;return e(this,(function(e){switch(e.label){case 0:return[4,b(r)];case 1:return t=e.sent(),[2,new n(t.data?new ot(t.data):null,t.graphQLErrors)]}}))}))},st.subscribeToMarketingNotifications=function(r){return t(this,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return[4,g(r)];case 1:return[2,t.sent()]}}))}))},st.getLastViewedProducts=function(r){var i;return t(this,void 0,void 0,(function(){var t;return e(this,(function(e){switch(e.label){case 0:return[4,L(r)];case 1:return t=e.sent(),[2,new n(null===(i=t.data)||void 0===i?void 0:i.map((function(t){return new tt(t)})),t.graphQLErrors)]}}))}))},st.saveLastViewedProducts=function(r){return t(this,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return[4,y(r)];case 1:return[2,t.sent()]}}))}))},st.listOrderRefundSettings=function(r){var i;return t(this,void 0,void 0,(function(){var t;return e(this,(function(e){switch(e.label){case 0:return[4,E(r)];case 1:return t=e.sent(),[2,new n(null===(i=t.data)||void 0===i?void 0:i.map((function(t){return new nt(t)})),t.graphQLErrors)]}}))}))},st.sendContactFormToMerchant=function(r){return t(this,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return[4,C(r)];case 1:return[2,t.sent()]}}))}))},st.listFavoriteProducts=function(){var r;return t(this,void 0,void 0,(function(){var t;return e(this,(function(e){switch(e.label){case 0:return[4,P()];case 1:return t=e.sent(),[2,new n(null===(r=t.data)||void 0===r?void 0:r.map((function(t){return new $(t)})),t.graphQLErrors)]}}))}))},st.saveFavoriteProduct=function(r){return t(this,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return[4,Q(r)];case 1:return[2,t.sent()]}}))}))},st.listPaymentSavedCard=function(){return t(this,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return[4,k({})];case 1:return[2,t.sent()]}}))}))},st.deletePaymentSavedCard=function(r){return t(this,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return[4,_({id:r})];case 1:return[2,t.sent()]}}))}))},st.isFavoriteProduct=function(r){return t(this,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return[4,T({productId:r.productId})];case 1:return[2,t.sent()]}}))}))},st.createCustomerReview=function(r){return t(this,void 0,void 0,(function(){var t;return e(this,(function(e){switch(e.label){case 0:return[4,R(r)];case 1:return t=e.sent(),[2,new n(t.data?new Y(t.data):null,t.graphQLErrors)]}}))}))},st.listCustomerReviews=function(i){return t(this,void 0,void 0,(function(){var t;return e(this,(function(e){switch(e.label){case 0:return[4,O(r({},i))];case 1:return t=e.sent(),[2,new n(t.data?r(r({},t.data),{data:t.data.data.map((function(t){return new Y(t)}))}):null,t.graphQLErrors)]}}))}))},st.listCustomerReviewSummary=function(i){var o;return t(this,void 0,void 0,(function(){var t;return e(this,(function(e){switch(e.label){case 0:return[4,S(i)];case 1:return t=e.sent(),[2,new n(r(r({},t.data),{data:null===(o=t.data)||void 0===o?void 0:o.data.map((function(t){return new X(t)}))}),t.graphQLErrors)]}}))}))},st.listCustomerAttribute=function(){var r;return t(this,void 0,void 0,(function(){var t;return e(this,(function(e){switch(e.label){case 0:return[4,A()];case 1:return t=e.sent(),[2,new n(null===(r=t.data)||void 0===r?void 0:r.sort((function(t,e){return t.order&&e.order?t.order-e.order:-1})).map((function(t){return new U(t)}),t.graphQLErrors))]}}))}))},st.activateCustomer=function(r){return t(this,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return[4,F(r)];case 1:return[2,t.sent()]}}))}))},st.resendCustomerActivationMail=function(r){return t(this,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return[4,I(r)];case 1:return[2,t.sent()]}}))}))},st.resendCustomerPhoneVerificationCode=function(){return t(this,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return[4,M()];case 1:return[2,t.sent()]}}))}))},st.validateCustomerPhoneVerificationCode=function(r){return t(this,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return[4,V(r)];case 1:return[2,t.sent()]}}))}))},st.validateOTPCode=function(i){return t(this,void 0,void 0,(function(){var t;return e(this,(function(e){switch(e.label){case 0:return[4,z(i)];case 1:return t=e.sent(),[2,new n(t.data?r(r({},t.data),{customer:t.data.customer?new Z(t.data.customer):null}):null,t.graphQLErrors)]}}))}))},st.saveCustomerFormData=function(r){return t(this,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return[4,B(r)];case 1:return[2,t.sent()]}}))}))},st.exportCustomerPersonelData=function(){return t(this,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return[4,D()];case 1:return[2,t.sent()]}}))}))},st.deactivateCustomer=function(r){return t(this,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return[4,q(r)];case 1:return[2,t.sent()]}}))}))},st.getLoyaltyCustomerInfo=function(r){return t(this,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return[4,G(r)];case 1:return[2,t.sent()]}}))}))},st.listLoyaltyProgramPointHistory=function(r){return t(this,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return[4,H(r)];case 1:return[2,t.sent()]}}))}))},st.listLoyaltyProgramTiers=function(){return t(this,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return[4,N()];case 1:return[2,t.sent()]}}))}))},st.listEarningMethods=function(){return t(this,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return[4,W()];case 1:return[2,t.sent()]}}))}))},st.listSpendingMethodsByCartId=function(r){return t(this,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return[4,J(r)];case 1:return[2,t.sent()]}}))}))},st.useLoyaltyPoints=function(r){return t(this,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return[4,K(r)];case 1:return[2,t.sent()]}}))}))},st}();export{st as default};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { IkasContactForm, IkasCustomer, IkasCustomerAttributeValue, IkasFavoriteProduct, IkasOrderTransaction, IkasOrderTransactionWithPrices, IkasProduct, IkasOrder, IkasRaffleParticipant, IkasProductFile } from "../../models/data";
|
|
2
2
|
import { APIResponse } from "@ikas/fe-api-client";
|
|
3
|
-
import { ExternalAccountLink, IkasLoginError, IkasRefundRequestError, IkasRegisterError } from "@ikas/storefront-api";
|
|
3
|
+
import { ExternalAccountLink, IkasLoginError, IkasRefundRequestError, IkasRegisterError, SavedCard } from "@ikas/storefront-api";
|
|
4
4
|
import { IkasBaseStore } from "../base";
|
|
5
5
|
import { AddLoyaltyToCartInput, SaveCustomerFormDataInput } from "@ikas/storefront-api/src/__api/types";
|
|
6
6
|
export declare type SocialLoginProvider = "facebook" | "google" | "twitch" | "apple";
|
|
@@ -126,6 +126,19 @@ export declare class IkasCustomerStore {
|
|
|
126
126
|
getFavoriteProducts: () => Promise<IkasProduct[]>;
|
|
127
127
|
addProductToFavorites: (productId: string) => Promise<boolean>;
|
|
128
128
|
removeProductFromFavorites: (productId: string) => Promise<boolean>;
|
|
129
|
+
/**
|
|
130
|
+
* PayTR saved cards of the logged in customer, for the account page. Empty
|
|
131
|
+
* when card storage is off or the customer has no cards.
|
|
132
|
+
*/
|
|
133
|
+
getSavedCards: () => Promise<SavedCard[]>;
|
|
134
|
+
/**
|
|
135
|
+
* Deletes the card at PayTR and here. errorCode is e.g.
|
|
136
|
+
* SAVED_CARD_IN_USE_BY_SUBSCRIPTION or SAVED_CARD_DELETE_FAILED.
|
|
137
|
+
*/
|
|
138
|
+
deleteSavedCard: (id: string) => Promise<{
|
|
139
|
+
isSuccess: boolean;
|
|
140
|
+
errorCode?: string | undefined;
|
|
141
|
+
}>;
|
|
129
142
|
isProductFavorite: (productId: string) => Promise<boolean>;
|
|
130
143
|
createEmailSubscription: (email: string) => Promise<boolean>;
|
|
131
144
|
saveCustomerFormData: (input: SaveCustomerFormDataInput) => Promise<boolean>;
|