@ikas/storefront 4.15.22 → 4.15.23

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- import n from'./../../../../ext/style-inject/dist/style-inject.es.js';var e={AdyenContainer:"adyen-module_AdyenContainer__rZaiG"};n(".adyen-module_AdyenContainer__rZaiG .adyen-checkout__payment-method__radio--selected {\n background-color: #272727;\n}\n.adyen-module_AdyenContainer__rZaiG .adyen-checkout__button {\n display: none !important;\n}\n.adyen-module_AdyenContainer__rZaiG .adyen-checkout__input {\n border: 1px solid #e5e4e9;\n background-color: #fff;\n background-clip: padding-box;\n border-radius: 8px;\n display: block;\n width: 100%;\n height: 56px;\n padding: 8px 16px;\n outline: none !important;\n transition: padding 0.1s, border-color 0.5s, box-shadow 0.5s;\n box-shadow: 0 0 0 1px transparent;\n -moz-appearance: none;\n -webkit-appearance: none;\n margin: 5px 0;\n caret-color: black;\n}\n.adyen-module_AdyenContainer__rZaiG .adyen-checkout__input--focus.adyen-checkout__input--focus:hover {\n border: 1px solid black !important;\n box-shadow: 0 0 0 1px black !important;\n}\n.adyen-module_AdyenContainer__rZaiG .adyen-checkout__label--focused .adyen-checkout__label__text {\n color: #00112c;\n}\n.adyen-module_AdyenContainer__rZaiG .adyen-checkout__error-text {\n color: #fb4e4e;\n}\n.adyen-module_AdyenContainer__rZaiG .adyen-checkout__label__text--error {\n color: #fb4e4e;\n}\n.adyen-module_AdyenContainer__rZaiG .adyen-checkout__spinner {\n border: 3px solid rgb(0, 0, 0);\n border-radius: 50%;\n border-top-color: transparent;\n}");export{e as default};
1
+ import e from'./../../../../ext/style-inject/dist/style-inject.es.js';var n={AdyenContainer:"adyen-module_AdyenContainer__rZaiG",NotSelectedAdyenContainer:"adyen-module_NotSelectedAdyenContainer__DhQei"};e('.adyen-module_AdyenContainer__rZaiG .adyen-checkout__payment-method__radio--selected {\n background-color: #272727;\n width: 22px !important;\n height: 22px !important;\n transition: unset;\n}\n.adyen-module_AdyenContainer__rZaiG .adyen-checkout__button {\n display: none !important;\n}\n.adyen-module_AdyenContainer__rZaiG .adyen-checkout__input {\n border: 1px solid #e5e4e9;\n background-color: #fff;\n background-clip: padding-box;\n border-radius: 8px;\n display: block;\n width: 100%;\n height: 56px;\n padding: 8px 16px;\n outline: none !important;\n transition: padding 0.1s, border-color 0.5s, box-shadow 0.5s;\n box-shadow: 0 0 0 1px transparent;\n -moz-appearance: none;\n -webkit-appearance: none;\n margin: 5px 0;\n caret-color: black;\n}\n.adyen-module_AdyenContainer__rZaiG .adyen-checkout__input--focus.adyen-checkout__input--focus:hover {\n border: 1px solid black !important;\n box-shadow: 0 0 0 1px black !important;\n}\n.adyen-module_AdyenContainer__rZaiG .adyen-checkout__label--focused .adyen-checkout__label__text {\n color: #00112c;\n}\n.adyen-module_AdyenContainer__rZaiG .adyen-checkout__error-text {\n color: #fb4e4e;\n}\n.adyen-module_AdyenContainer__rZaiG .adyen-checkout__label__text--error {\n color: #fb4e4e;\n}\n.adyen-module_AdyenContainer__rZaiG .adyen-checkout__spinner {\n border: 3px solid rgb(0, 0, 0);\n border-radius: 50%;\n border-top-color: transparent;\n}\n.adyen-module_AdyenContainer__rZaiG .adyen-checkout__payment-method__radio {\n width: 20px;\n height: 20px;\n border: 1px solid var(--checkout-border-color);\n}\n.adyen-module_AdyenContainer__rZaiG .adyen-checkout__payment-method__header:hover\n .adyen-checkout__payment-method__radio {\n box-shadow: unset !important;\n border: 1px solid var(--checkout-border-color);\n outline: none !important;\n}\n.adyen-module_AdyenContainer__rZaiG .adyen-checkout__payment-method__header {\n padding-right: 16px;\n padding-top: 16px;\n padding-bottom: 16px;\n}\n.adyen-module_AdyenContainer__rZaiG .adyen-checkout__payment-method--selected\n + .adyen-checkout__payment-method {\n border-radius: 8px !important;\n}\n.adyen-module_AdyenContainer__rZaiG .adyen-checkout__payment-method:last-child {\n border-radius: 8px !important;\n margin-top: 16px;\n}\n.adyen-module_AdyenContainer__rZaiG .adyen-checkout__payment-method:first-child {\n border-radius: 8px !important;\n}\n.adyen-module_AdyenContainer__rZaiG .adyen-checkout__payment-method__radio--selected:after {\n content: "";\n width: 6px;\n background-color: #fff;\n height: 2px;\n rotate: 45deg;\n left: -8px;\n top: 11px;\n}\n.adyen-module_AdyenContainer__rZaiG .adyen-checkout__payment-method__radio--selected:before {\n content: "";\n width: 11px;\n background-color: #fff;\n height: 2px;\n rotate: 135deg;\n position: absolute;\n display: block;\n top: 9px;\n right: 3px;\n}\n.adyen-module_AdyenContainer__rZaiG .adyen-checkout__payment-method__name--selected {\n font-weight: normal;\n}\n.adyen-module_AdyenContainer__rZaiG .adyen-checkout__payment-method__header__title {\n padding: 0 4px;\n}\n.adyen-module_AdyenContainer__rZaiG .adyen-checkout__payment-method--selected {\n border: 1px solid var(--checkout-button-bg-color);\n box-shadow: 0 0 0 1px var(--checkout-button-bg-color);\n}\n\n.adyen-module_NotSelectedAdyenContainer__DhQei .adyen-checkout__payment-method__radio--selected:after {\n width: 0px;\n height: 0px;\n}\n.adyen-module_NotSelectedAdyenContainer__DhQei .adyen-checkout__payment-method__radio--selected:before {\n width: 0px;\n height: 0px;\n}\n.adyen-module_NotSelectedAdyenContainer__DhQei .adyen-checkout__payment-method__radio--selected {\n background-color: transparent;\n}\n.adyen-module_NotSelectedAdyenContainer__DhQei .adyen-checkout__payment-method--selected {\n background-color: transparent;\n max-height: 60px;\n border: 1px solid var(--checkout-border-color);\n box-shadow: unset;\n}\n.adyen-module_NotSelectedAdyenContainer__DhQei .adyen-checkout__payment-method {\n background-color: transparent;\n max-height: 60px;\n}\n.adyen-module_NotSelectedAdyenContainer__DhQei .adyen-checkout__payment-method__details {\n display: none;\n}');export{n as default};
@@ -3,6 +3,7 @@ import CheckoutViewModel from "../../model";
3
3
  import "@adyen/adyen-web/dist/adyen.css";
4
4
  declare type Props = {
5
5
  vm: CheckoutViewModel;
6
+ isSelected?: boolean;
6
7
  };
7
8
  export declare const Adyen: React.FC<Props>;
8
9
  export {};
@@ -1 +1 @@
1
- import{__awaiter as e,__generator as n}from'./../../../../ext/tslib/tslib.es6.js';import*as t from"react";import{observer as o}from"mobx-react-lite";import s from"@adyen/adyen-web";import"@adyen/adyen-web/dist/adyen.css";import r from"./adyen.module.scss.js";var i;!function(e){e.Authorised="Authorised",e.Cancelled="Cancelled"}(i||(i={}));var a=o((function(o){var a=o.vm,d=t.useRef(null);return t.useEffect((function(){e(void 0,void 0,void 0,(function(){var t,o,r;return n(this,(function(u){switch(u.label){case 0:return a.adyenResponse&&d.current?(t={environment:"live",clientKey:a.adyenResponse.clientKey,analytics:{enabled:!0},session:{id:a.adyenResponse.sessionId,sessionData:a.adyenResponse.sessionData},beforeSubmit:function(t,o,s){return e(void 0,void 0,void 0,(function(){return n(this,(function(e){return s.resolve(t),[2]}))}))},onPaymentCompleted:function(e,n){e.resultCode===i.Authorised&&a.adyenResponse?window.location.href="".concat(a.adyenResponse.returnUrl,"&redirectResult=").concat(e.sessionResult):(a.isStepLoading=!1,setTimeout((function(){r.setStatus("ready")}),3e3))},onError:function(e,n){a.isStepLoading=!1,setTimeout((function(){r.setStatus("ready")}),3e3)},paymentMethodsConfiguration:{card:{showPayButton:!1}}},[4,s(t)]):[3,2];case 1:o=u.sent(),r=o.create("dropin").mount(d.current),a.setAdyenDropinElement(r),u.label=2;case 2:return[2]}}))}))}),[a.adyenResponse]),a.adyenResponse?t.createElement("div",{className:r.AdyenContainer},t.createElement("div",{ref:d})):null}));export{a as Adyen};
1
+ import{__awaiter as e,__generator as n}from'./../../../../ext/tslib/tslib.es6.js';import*as t from"react";import{observer as o}from"mobx-react-lite";import s from"@adyen/adyen-web";import"@adyen/adyen-web/dist/adyen.css";import i from"./adyen.module.scss.js";var r;!function(e){e.Authorised="Authorised",e.Cancelled="Cancelled"}(r||(r={}));var a=o((function(o){var a=o.vm,d=o.isSelected,u=t.useRef(null);return t.useEffect((function(){e(void 0,void 0,void 0,(function(){var t,o,i;return n(this,(function(d){switch(d.label){case 0:return a.adyenResponse&&u.current?(t={environment:"live",clientKey:a.adyenResponse.clientKey,analytics:{enabled:!0},session:{id:a.adyenResponse.sessionId,sessionData:a.adyenResponse.sessionData},beforeSubmit:function(t,o,s){return e(void 0,void 0,void 0,(function(){return n(this,(function(e){return s.resolve(t),[2]}))}))},onPaymentCompleted:function(e,n){e.resultCode===r.Authorised&&a.adyenResponse?window.location.href="".concat(a.adyenResponse.returnUrl,"&redirectResult=").concat(e.sessionResult):(a.isStepLoading=!1,setTimeout((function(){i.setStatus("ready")}),3e3))},onError:function(e,n){a.isStepLoading=!1,setTimeout((function(){i.setStatus("ready")}),3e3)},paymentMethodsConfiguration:{card:{showPayButton:!1}}},[4,s(t)]):[3,2];case 1:o=d.sent(),i=o.create("dropin").mount(u.current),a.setAdyenDropinElement(i),d.label=2;case 2:return[2]}}))}))}),[a.adyenResponse]),a.adyenResponse?t.createElement("div",{className:[i.AdyenContainer,d?"":i.NotSelectedAdyenContainer].join(" ")},t.createElement("div",{ref:u})):null}));export{a as Adyen};
@@ -1 +1 @@
1
- import e from'./../../../../ext/style-inject/dist/style-inject.es.js';var o={SelectBoxContainer:"style-module_SelectBoxContainer__QRVTi",SelectBoxError:"style-module_SelectBoxError__-Ei-d",fadeInFromRight:"style-module_fadeInFromRight__DWxhH",SelectBox:"style-module_SelectBox__A1IpM",TopContent:"style-module_TopContent__-nzwg",Label:"style-module_Label__QKBWY",RightContent:"style-module_RightContent__4mFPN",BottomContent:"style-module_BottomContent__UQWJa",Selected:"style-module_Selected__RRHsP",Error:"style-module_Error__Xt7sr"};e(".style-module_SelectBoxContainer__QRVTi {\n margin-bottom: 16px;\n}\n\n.style-module_SelectBoxError__-Ei-d {\n color: var(--checkout-error-color);\n font-size: 12px;\n margin-top: 8px;\n animation-name: style-module_fadeInFromRight__DWxhH;\n animation-duration: 0.3s;\n}\n\n.style-module_SelectBox__A1IpM {\n padding: 16px;\n width: 100%;\n transition: all 0.2s;\n border-radius: 8px;\n cursor: pointer;\n border: 1px solid var(--checkout-border-color);\n box-shadow: 0 0 0 1px transparent;\n}\n.style-module_SelectBox__A1IpM .style-module_TopContent__-nzwg {\n display: flex;\n align-items: center;\n user-select: none;\n}\n.style-module_SelectBox__A1IpM .style-module_TopContent__-nzwg .style-module_Label__QKBWY {\n flex: 1 1 auto;\n margin-left: 16px;\n}\n.style-module_SelectBox__A1IpM .style-module_TopContent__-nzwg .style-module_RightContent__4mFPN {\n flex: 0 0 auto;\n margin-left: 16px;\n}\n.style-module_SelectBox__A1IpM .style-module_BottomContent__UQWJa {\n padding-top: 16px;\n width: 100%;\n}\n.style-module_SelectBox__A1IpM.style-module_Selected__RRHsP {\n box-shadow: 0 0 0 1px var(--checkout-button-bg-color);\n border-color: var(--checkout-button-bg-color);\n background-color: var(--checkout-card-bg-color);\n}\n.style-module_SelectBox__A1IpM.style-module_Selected__RRHsP.style-module_Error__Xt7sr {\n box-shadow: 0 0 0 1px var(--checkout-error-color);\n border-color: var(--checkout-error-color);\n}");export{o as default};
1
+ import e from'./../../../../ext/style-inject/dist/style-inject.es.js';var o={SelectBoxContainer:"style-module_SelectBoxContainer__QRVTi",SelectBoxError:"style-module_SelectBoxError__-Ei-d",fadeInFromRight:"style-module_fadeInFromRight__DWxhH",SelectBox:"style-module_SelectBox__A1IpM",TopContent:"style-module_TopContent__-nzwg",Label:"style-module_Label__QKBWY",RightContent:"style-module_RightContent__4mFPN",BottomContent:"style-module_BottomContent__UQWJa",Selected:"style-module_Selected__RRHsP",Error:"style-module_Error__Xt7sr",AdyenSelectBox:"style-module_AdyenSelectBox__8rI-I"};e(".style-module_SelectBoxContainer__QRVTi {\n margin-bottom: 16px;\n}\n\n.style-module_SelectBoxError__-Ei-d {\n color: var(--checkout-error-color);\n font-size: 12px;\n margin-top: 8px;\n animation-name: style-module_fadeInFromRight__DWxhH;\n animation-duration: 0.3s;\n}\n\n.style-module_SelectBox__A1IpM {\n padding: 16px;\n width: 100%;\n transition: all 0.2s;\n border-radius: 8px;\n cursor: pointer;\n border: 1px solid var(--checkout-border-color);\n box-shadow: 0 0 0 1px transparent;\n}\n.style-module_SelectBox__A1IpM .style-module_TopContent__-nzwg {\n display: flex;\n align-items: center;\n user-select: none;\n}\n.style-module_SelectBox__A1IpM .style-module_TopContent__-nzwg .style-module_Label__QKBWY {\n flex: 1 1 auto;\n margin-left: 16px;\n}\n.style-module_SelectBox__A1IpM .style-module_TopContent__-nzwg .style-module_RightContent__4mFPN {\n flex: 0 0 auto;\n margin-left: 16px;\n}\n.style-module_SelectBox__A1IpM .style-module_BottomContent__UQWJa {\n padding-top: 16px;\n width: 100%;\n}\n.style-module_SelectBox__A1IpM.style-module_Selected__RRHsP {\n box-shadow: 0 0 0 1px var(--checkout-button-bg-color);\n border-color: var(--checkout-button-bg-color);\n background-color: var(--checkout-card-bg-color);\n}\n.style-module_SelectBox__A1IpM.style-module_Selected__RRHsP.style-module_Error__Xt7sr {\n box-shadow: 0 0 0 1px var(--checkout-error-color);\n border-color: var(--checkout-error-color);\n}\n.style-module_SelectBox__A1IpM.style-module_AdyenSelectBox__8rI-I {\n border: 1px solid transparent;\n padding: 0;\n}");export{o as default};
@@ -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,IkasPaymentGatewayType as n,IkasPaymentGatewayTransactionFeeType as o,IkasPaymentGatewayAdditionalPriceType as r}from"@ikas/storefront-models";import"mobx";import"../../../../../models/data/campaign-offer/index.js";import"../../../../../models/data/cart/campaign-offer/index.js";import"../../../../../models/data/cart/index.js";import"../../../../../models/data/category/path-item/index.js";import"../../../../../models/data/category/index.js";import"../../../../../models/data/checkout/index.js";import"../../../../../models/data/checkout-settings/index.js";import"../../../../../models/data/city/index.js";import"../../../../../models/data/country/index.js";import"../../../../../models/data/customer/address/region/index.js";import"../../../../../models/data/customer/address/index.js";import"../../../../../models/data/customer/address/ikas-localized-customer-address.js";import"../../../../../models/data/customer/attribute/index.js";import"../../../../../models/data/customer/review/summary/index.js";import"../../../../../models/data/customer/review/index.js";import"../../../../../models/data/customer/index.js";import"../../../../../models/data/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/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-filter/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 d}from"../../../components/credit-card-form/index.js";import{Installments as m}from"./installments/index.js";import i from"../../../components/select-box/index.js";import l from"./style.module.scss.js";import"@ikas/storefront-config";import{formatCurrency as s}from"../../../../../utils/currency.js";import{useTranslation as c}from"../../../../../utils/i18n.js";import p from"../../../components/svg/external.js";import y from"next/dynamic";import u from"../../../components/credit-card-form/model.js";import x from"../../../components/master-pass/credit-card-form/index.js";import{Toggle as f}from"../../../components/toggle/index.js";import v from"../../../components/select-box/style.module.scss.js";import E from"../../../components/master-pass/payment-gateway/svg/master-card.js";import g from"../../../components/master-pass/payment-gateway/svg/troy.js";import j from"../../../components/master-pass/payment-gateway/svg/visa.js";var P=y((function(){return import("../../../components/stripe/index.js").then((function(e){return e.default}))})),w=y((function(){return import("../../../components/adyen/index.js").then((function(e){return e.Adyen}))})),C=y((function(){return import("../../../components/klarna/index.js").then((function(e){return e.Klarna}))})),h=t((function(t){var y=t.vm,h=c().t,G=function(t){return e.createElement("div",{style:{display:"flex",justifyContent:"flex-end",alignItems:"center",flexWrap:"wrap"}},t.children)},k=function(t){return e.createElement("div",{className:l.AdditionalPrice},t.children)},I=function(e){return 0===e.amount?"":"".concat(e.amountType===o.AMOUNT?s(e.amount,y.checkout.currencyCode,y.checkout.currencySymbol):" %"+e.amount).concat(e.type===r.DECREMENT?" "+h("checkout-page:paymentMethodDiscount"):" "+h("checkout-page:paymentMethodAdditionalPrice"))},N=function(e){return"STRIPE"===e.code},M=function(){var t,a=y.selectedPaymentGatewayIndex===y.klarnaPaymentGatewayIndex;return y.klarnaPaymentGateway?e.createElement("div",{className:v.SelectBoxContainer},e.createElement("div",{className:"".concat(v.SelectBox," ").concat(a?v.Selected:""),onClick:function(){y.setPaymentGateway(y.klarnaPaymentGatewayIndex),y.mpVM.selectedCard=void 0}},e.createElement("div",{className:v.TopContent},e.createElement(f,{value:a,label:y.klarnaPaymentGateway.name,removePadding:!0}),e.createElement("div",{className:v.RightContent},(null===(t=y.klarnaPaymentGateway.additionalPrices)||void 0===t?void 0:t.length)?e.createElement(k,null,I(y.klarnaPaymentGateway.additionalPrices[0])):e.createElement(G,null,!!y.klarnaPaymentGateway.logoUrl&&e.createElement("div",{className:l.PaymentLogoContainer},e.createElement("img",{src:y.klarnaPaymentGateway.logoUrl}))))),e.createElement("div",{className:"".concat(a?v.BottomContent:""," ").concat(a?"":l.Hidden)},e.createElement(C,{vm:y}),y.klarnaError&&e.createElement("div",{className:l.ErrorMessage},y.klarnaError.data)))):null},b=function(){var t,a=y.selectedPaymentGatewayIndex===y.adyenPaymentGatewayIndex;return y.adyenPaymentGateway?e.createElement("div",{className:v.SelectBoxContainer},e.createElement("div",{className:"".concat(v.SelectBox," ").concat(a?v.Selected:""),onClick:function(){y.setPaymentGateway(y.adyenPaymentGatewayIndex),y.mpVM.selectedCard=void 0}},e.createElement("div",{className:v.TopContent},e.createElement(f,{value:a,label:y.adyenPaymentGateway.name,removePadding:!0}),e.createElement("div",{className:v.RightContent},(null===(t=y.adyenPaymentGateway.additionalPrices)||void 0===t?void 0:t.length)?e.createElement(k,null,I(y.adyenPaymentGateway.additionalPrices[0])):e.createElement(G,null,!!y.adyenPaymentGateway.logoUrl&&e.createElement("div",{className:l.PaymentLogoContainer},e.createElement("img",{src:y.adyenPaymentGateway.logoUrl}))))),e.createElement("div",{className:"".concat(a?v.BottomContent:""," ").concat(a?"":l.Hidden),style:{paddingTop:0}},e.createElement(w,{vm:y})))):null},T=function(){var t,a=y.selectedPaymentGatewayIndex===y.payPalPaymentGatewayIndex;return y.payPalPaymentGateway?e.createElement("div",{className:v.SelectBoxContainer},e.createElement("div",{className:"".concat(v.SelectBox," ").concat(a?v.Selected:""),onClick:function(){y.setPaymentGateway(y.payPalPaymentGatewayIndex),y.mpVM.selectedCard=void 0}},e.createElement("div",{className:v.TopContent},e.createElement(f,{value:a,label:y.payPalPaymentGateway.name,removePadding:!0}),e.createElement("div",{className:v.RightContent},(null===(t=y.payPalPaymentGateway.additionalPrices)||void 0===t?void 0:t.length)?e.createElement(k,null,I(y.payPalPaymentGateway.additionalPrices[0])):e.createElement(G,null,!!y.payPalPaymentGateway.logoUrl&&e.createElement("div",{className:l.PaymentLogoContainer},e.createElement("img",{src:y.payPalPaymentGateway.logoUrl}))))))):null};return e.createElement(e.Fragment,null,!!y.mpVM.cards.length&&y.mpVM.cards.map((function(t,o){var r,d=y.paymentGateways.find((function(e){return e.id===t.paymentGatewayId})),s=e.createElement("button",{className:l.MasterPassSelectBoxDeleteButton,onClick:function(e){e.stopPropagation(),y.mpVM.deleteCard({store:y.store,checkout:y.checkout,card:t})}},h("checkout-page:masterPass.paymentGatewaySelectBox.delete")),c=function(e){return t.Value1.startsWith(e)},p=c("4"),x=c("5")||c("6"),f=c("9"),v=e.createElement("div",{style:{display:"flex",alignItems:"center"}},e.createElement("span",{className:l.MasterPassSelectBoxLabelLogo},p&&e.createElement(j,null),x&&e.createElement(E,null),f&&e.createElement(g,null)),t.Name," ",t.Value1),P=(null==d?void 0:d.id)&&d.paymentMethodType===a.CREDIT_CARD&&d.type===n.INTERNAL?y.installmentInfo&&e.createElement(m,{vm:y}):void 0;return e.createElement(i,{key:o,isSelected:(null===(r=y.mpVM.selectedCard)||void 0===r?void 0:r.UniqueId)===t.UniqueId,label:v,rightContent:s,bottomContent:P,onClick:function(){var e;(null===(e=y.mpVM.selectedCard)||void 0===e?void 0:e.UniqueId)!==t.UniqueId&&(y.checkout.selectedPaymentGateway=null,y.cardData=new u,y.installmentInfo=void 0,y.mpVM.selectedCard=t,t.Value1&&t.paymentGatewayId&&y.checkout.totalFinalPrice&&y.retrieveInstallmentInfo({input:{orderId:y.checkout.id,binNumber:t.Value1.slice(0,6),paymentGatewayId:t.paymentGatewayId,price:y.checkout.totalFinalPrice,currencyCode:y.checkout.currencyCode}}))}})})),y.paymentGateways.filter((function(e){return"in-store"!==y.deliveryMethod&&!y.isDigitalOnly||e.paymentMethodType!==a.CASH_ON_DELIVERY&&e.paymentMethodType!==a.CREDIT_CARD_ON_DELIVERY})).map((function(t,o){var r;if(function(e){return"KLARNA"===e.code}(t)&&y.klarnaPaymentGateway)return M();if(function(e){return"ADYEN_PLATFORM"===e.code}(t)&&y.adyenPaymentGateway)return b();if(function(e){return"PAYPAL"===e.code}(t)&&y.payPalPaymentGateway)return T();var s=t.paymentMethodType===a.CREDIT_CARD&&t.type===n.INTERNAL?e.createElement(e.Fragment,null,N(t)?e.createElement(e.Fragment,null,e.createElement(P,{vm:y,pg:t}),y.stripeError&&e.createElement("div",{className:l.ErrorMessage},y.stripeError.data)):e.createElement("div",null,e.createElement(d,{vm:y}),y.isPaymentGatewayHasMasterPass&&e.createElement(x,{vm:y}),y.installmentInfo&&e.createElement(m,{vm:y}))):t.description?e.createElement(e.Fragment,null,t.type===n.EXTERNAL&&e.createElement("div",{style:{height:"52px",display:"flex",justifyContent:"center",margin:"24px 0"}},e.createElement(p,null)),e.createElement("div",{dangerouslySetInnerHTML:{__html:t.description}})):void 0;return e.createElement(i,{key:t.id,label:t.paymentMethodType===a.CREDIT_CARD&&t.type===n.INTERNAL?N(t)?" ":h("checkout-page:creditCard"):t.name,isSelected:y.selectedPaymentGatewayIndex===o,rightContent:(null===(r=t.additionalPrices)||void 0===r?void 0:r.length)?e.createElement(k,null,I(t.additionalPrices[0])):e.createElement(G,null,!!t.logoUrl&&e.createElement("div",{className:l.PaymentLogoContainer},e.createElement("img",{src:t.logoUrl}))),bottomContent:s,onClick:function(){y.selectedPaymentGatewayIndex!==o&&(y.setPaymentGateway(o),y.mpVM.selectedCard=void 0)}})})))}));export{h as PaymentGateways};
1
+ import*as e from"react";import{observer as t}from"mobx-react-lite";import"../../../../../models/data/blog/category/index.js";import"../../../../../models/data/blog/content/index.js";import"../../../../../models/data/blog/meta-data/index.js";import"../../../../../models/data/blog/tag/index.js";import"../../../../../models/data/blog/index.js";import"../../../../../models/data/brand/index.js";import{IkasPaymentMethodType as a,IkasPaymentGatewayType as n,IkasPaymentGatewayTransactionFeeType as o,IkasPaymentGatewayAdditionalPriceType as r}from"@ikas/storefront-models";import"mobx";import"../../../../../models/data/campaign-offer/index.js";import"../../../../../models/data/cart/campaign-offer/index.js";import"../../../../../models/data/cart/index.js";import"../../../../../models/data/category/path-item/index.js";import"../../../../../models/data/category/index.js";import"../../../../../models/data/checkout/index.js";import"../../../../../models/data/checkout-settings/index.js";import"../../../../../models/data/city/index.js";import"../../../../../models/data/country/index.js";import"../../../../../models/data/customer/address/region/index.js";import"../../../../../models/data/customer/address/index.js";import"../../../../../models/data/customer/address/ikas-localized-customer-address.js";import"../../../../../models/data/customer/attribute/index.js";import"../../../../../models/data/customer/review/summary/index.js";import"../../../../../models/data/customer/review/index.js";import"../../../../../models/data/customer/index.js";import"../../../../../models/data/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/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-filter/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 d}from"../../../components/credit-card-form/index.js";import{Installments as m}from"./installments/index.js";import i from"../../../components/select-box/index.js";import s from"./style.module.scss.js";import"@ikas/storefront-config";import{formatCurrency as l}from"../../../../../utils/currency.js";import{useTranslation as c}from"../../../../../utils/i18n.js";import p from"../../../components/svg/external.js";import u from"next/dynamic";import y from"../../../components/credit-card-form/model.js";import x from"../../../components/master-pass/credit-card-form/index.js";import{Toggle as f}from"../../../components/toggle/index.js";import v from"../../../components/select-box/style.module.scss.js";import j from"../../../components/master-pass/payment-gateway/svg/master-card.js";import E from"../../../components/master-pass/payment-gateway/svg/troy.js";import g from"../../../components/master-pass/payment-gateway/svg/visa.js";var P=u((function(){return import("../../../components/stripe/index.js").then((function(e){return e.default}))})),w=u((function(){return import("../../../components/adyen/index.js").then((function(e){return e.Adyen}))})),C=u((function(){return import("../../../components/klarna/index.js").then((function(e){return e.Klarna}))})),h=t((function(t){var u=t.vm,h=c().t,k=function(t){return e.createElement("div",{style:{display:"flex",justifyContent:"flex-end",alignItems:"center",flexWrap:"wrap"}},t.children)},G=function(t){return e.createElement("div",{className:s.AdditionalPrice},t.children)},I=function(e){return 0===e.amount?"":"".concat(e.amountType===o.AMOUNT?l(e.amount,u.checkout.currencyCode,u.checkout.currencySymbol):" %"+e.amount).concat(e.type===r.DECREMENT?" "+h("checkout-page:paymentMethodDiscount"):" "+h("checkout-page:paymentMethodAdditionalPrice"))},N=function(e){return"STRIPE"===e.code},M=function(){var t,a=u.selectedPaymentGatewayIndex===u.klarnaPaymentGatewayIndex;return u.klarnaPaymentGateway?e.createElement("div",{className:v.SelectBoxContainer},e.createElement("div",{className:"".concat(v.SelectBox," ").concat(a?v.Selected:""),onClick:function(){u.setPaymentGateway(u.klarnaPaymentGatewayIndex),u.mpVM.selectedCard=void 0}},e.createElement("div",{className:v.TopContent},e.createElement(f,{value:a,label:u.klarnaPaymentGateway.name,removePadding:!0}),e.createElement("div",{className:v.RightContent},(null===(t=u.klarnaPaymentGateway.additionalPrices)||void 0===t?void 0:t.length)?e.createElement(G,null,I(u.klarnaPaymentGateway.additionalPrices[0])):e.createElement(k,null,!!u.klarnaPaymentGateway.logoUrl&&e.createElement("div",{className:s.PaymentLogoContainer},e.createElement("img",{src:u.klarnaPaymentGateway.logoUrl}))))),e.createElement("div",{className:"".concat(a?v.BottomContent:""," ").concat(a?"":s.Hidden)},e.createElement(C,{vm:u}),u.klarnaError&&e.createElement("div",{className:s.ErrorMessage},u.klarnaError.data)))):null},b=function(){var t=u.selectedPaymentGatewayIndex===u.adyenPaymentGatewayIndex;return u.adyenPaymentGateway?e.createElement("div",{className:v.SelectBoxContainer},e.createElement("div",{className:"".concat(v.SelectBox," ").concat(v.AdyenSelectBox),onClick:function(){u.setPaymentGateway(u.adyenPaymentGatewayIndex),u.mpVM.selectedCard=void 0}},e.createElement("div",{className:v.TopContent}),e.createElement("div",{className:"".concat(t?v.BottomContent:""," "),style:{paddingTop:0}},e.createElement(w,{vm:u,isSelected:t})))):null},T=function(){var t,a=u.selectedPaymentGatewayIndex===u.payPalPaymentGatewayIndex;return u.payPalPaymentGateway?e.createElement("div",{className:v.SelectBoxContainer},e.createElement("div",{className:"".concat(v.SelectBox," ").concat(a?v.Selected:""),onClick:function(){u.setPaymentGateway(u.payPalPaymentGatewayIndex),u.mpVM.selectedCard=void 0}},e.createElement("div",{className:v.TopContent},e.createElement(f,{value:a,label:u.payPalPaymentGateway.name,removePadding:!0}),e.createElement("div",{className:v.RightContent},(null===(t=u.payPalPaymentGateway.additionalPrices)||void 0===t?void 0:t.length)?e.createElement(G,null,I(u.payPalPaymentGateway.additionalPrices[0])):e.createElement(k,null,!!u.payPalPaymentGateway.logoUrl&&e.createElement("div",{className:s.PaymentLogoContainer},e.createElement("img",{src:u.payPalPaymentGateway.logoUrl}))))))):null};return e.createElement(e.Fragment,null,!!u.mpVM.cards.length&&u.mpVM.cards.map((function(t,o){var r,d=u.paymentGateways.find((function(e){return e.id===t.paymentGatewayId})),l=e.createElement("button",{className:s.MasterPassSelectBoxDeleteButton,onClick:function(e){e.stopPropagation(),u.mpVM.deleteCard({store:u.store,checkout:u.checkout,card:t})}},h("checkout-page:masterPass.paymentGatewaySelectBox.delete")),c=function(e){return t.Value1.startsWith(e)},p=c("4"),x=c("5")||c("6"),f=c("9"),v=e.createElement("div",{style:{display:"flex",alignItems:"center"}},e.createElement("span",{className:s.MasterPassSelectBoxLabelLogo},p&&e.createElement(g,null),x&&e.createElement(j,null),f&&e.createElement(E,null)),t.Name," ",t.Value1),P=(null==d?void 0:d.id)&&d.paymentMethodType===a.CREDIT_CARD&&d.type===n.INTERNAL?u.installmentInfo&&e.createElement(m,{vm:u}):void 0;return e.createElement(i,{key:o,isSelected:(null===(r=u.mpVM.selectedCard)||void 0===r?void 0:r.UniqueId)===t.UniqueId,label:v,rightContent:l,bottomContent:P,onClick:function(){var e;(null===(e=u.mpVM.selectedCard)||void 0===e?void 0:e.UniqueId)!==t.UniqueId&&(u.checkout.selectedPaymentGateway=null,u.cardData=new y,u.installmentInfo=void 0,u.mpVM.selectedCard=t,t.Value1&&t.paymentGatewayId&&u.checkout.totalFinalPrice&&u.retrieveInstallmentInfo({input:{orderId:u.checkout.id,binNumber:t.Value1.slice(0,6),paymentGatewayId:t.paymentGatewayId,price:u.checkout.totalFinalPrice,currencyCode:u.checkout.currencyCode}}))}})})),u.paymentGateways.filter((function(e){return"in-store"!==u.deliveryMethod&&!u.isDigitalOnly||e.paymentMethodType!==a.CASH_ON_DELIVERY&&e.paymentMethodType!==a.CREDIT_CARD_ON_DELIVERY})).map((function(t,o){var r;if(function(e){return"KLARNA"===e.code}(t)&&u.klarnaPaymentGateway)return M();if(function(e){return"ADYEN_PLATFORM"===e.code}(t)&&u.adyenPaymentGateway)return b();if(function(e){return"PAYPAL"===e.code}(t)&&u.payPalPaymentGateway)return T();var l=t.paymentMethodType===a.CREDIT_CARD&&t.type===n.INTERNAL?e.createElement(e.Fragment,null,N(t)?e.createElement(e.Fragment,null,e.createElement(P,{vm:u,pg:t}),u.stripeError&&e.createElement("div",{className:s.ErrorMessage},u.stripeError.data)):e.createElement("div",null,e.createElement(d,{vm:u}),u.isPaymentGatewayHasMasterPass&&e.createElement(x,{vm:u}),u.installmentInfo&&e.createElement(m,{vm:u}))):t.description?e.createElement(e.Fragment,null,t.type===n.EXTERNAL&&e.createElement("div",{style:{height:"52px",display:"flex",justifyContent:"center",margin:"24px 0"}},e.createElement(p,null)),e.createElement("div",{dangerouslySetInnerHTML:{__html:t.description}})):void 0;return e.createElement(i,{key:t.id,label:t.paymentMethodType===a.CREDIT_CARD&&t.type===n.INTERNAL?N(t)?" ":h("checkout-page:creditCard"):t.name,isSelected:u.selectedPaymentGatewayIndex===o,rightContent:(null===(r=t.additionalPrices)||void 0===r?void 0:r.length)?e.createElement(G,null,I(t.additionalPrices[0])):e.createElement(k,null,!!t.logoUrl&&e.createElement("div",{className:s.PaymentLogoContainer},e.createElement("img",{src:t.logoUrl}))),bottomContent:l,onClick:function(){u.selectedPaymentGatewayIndex!==o&&(u.setPaymentGateway(o),u.mpVM.selectedCard=void 0)}})})))}));export{h as PaymentGateways};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ikas/storefront",
3
- "version": "4.15.22",
3
+ "version": "4.15.23",
4
4
  "description": "Storefront functionality for ikas storefront themes.",
5
5
  "author": "ikas",
6
6
  "license": "ISC",
@@ -22,11 +22,11 @@
22
22
  "swiper": "11.0.6"
23
23
  },
24
24
  "devDependencies": {
25
- "@ikas/storefront-api": "^4.15.22",
26
- "@ikas/storefront-config": "^4.15.22",
27
- "@ikas/storefront-model-functions": "^4.15.22",
28
- "@ikas/storefront-models": "^4.15.22",
29
- "@ikas/storefront-providers": "^4.15.22",
25
+ "@ikas/storefront-api": "^4.15.23",
26
+ "@ikas/storefront-config": "^4.15.23",
27
+ "@ikas/storefront-model-functions": "^4.15.23",
28
+ "@ikas/storefront-models": "^4.15.23",
29
+ "@ikas/storefront-providers": "^4.15.23",
30
30
  "@ikas/localized-address": "1.0.0-beta.3",
31
31
  "@adyen/adyen-web": "^5.57.0",
32
32
  "@rollup/plugin-commonjs": "^22.0.0",
@@ -61,11 +61,11 @@
61
61
  },
62
62
  "peerDependencies": {
63
63
  "@ikas/localized-address": "1.0.0-beta.3",
64
- "@ikas/storefront-api": "^4.15.22",
65
- "@ikas/storefront-config": "^4.15.22",
66
- "@ikas/storefront-model-functions": "^4.15.22",
67
- "@ikas/storefront-models": "^4.15.22",
68
- "@ikas/storefront-providers": "^4.15.22",
64
+ "@ikas/storefront-api": "^4.15.23",
65
+ "@ikas/storefront-config": "^4.15.23",
66
+ "@ikas/storefront-model-functions": "^4.15.23",
67
+ "@ikas/storefront-models": "^4.15.23",
68
+ "@ikas/storefront-providers": "^4.15.23",
69
69
  "mobx": "^6.1.3",
70
70
  "mobx-react-lite": "^3.1.5",
71
71
  "next": "12.2.0",