{"version":3,"sources":["webpack:///./Scripts/constants.js","webpack:///./Scripts/Components/Cart.js","webpack:///./Scripts/Components/Checkout.PrivateCustomerInfo.js","webpack:///./Scripts/Components/Checkout.BusinessCustomerInfo.js","webpack:///./Scripts/Components/Checkout.DeliveryMethods.js","webpack:///./Scripts/Components/Checkout.PaymentMethods.js","webpack:///./Scripts/Components/Payments/PaymentWidget.js","webpack:///./Scripts/Muurikka/Components/PaytrailPaymentProviders.js","webpack:///./Scripts/Containers/Checkout.container.js"],"names":["window","__litium","upsellConfig","breakpoint","settings","itemsToShow","Cart","props","_context","_useState","useState","_useState2","_slicedToArray","setState","onQuantityChange","value","i","rowSystemId","orderRows","currentQuantity","quantity","inStockQuantity","_parseInt","updateOrderRowQuantity","React","createElement","Fragment","className","id","translate","length","_mapInstanceProperty","call","orderRow","key","href","url","src","image","alt","name","articleNumber","split","isFreeGift","onClick","removeOrderRow","campaignPrice","totalPrice","totalRegularPrice","QuantityStepperCart","index","orderTotal","deliveryCost","hasDiscount","discount","grandTotal","vat","isMuurikka","defaultValue","campaignCode","placeholder","onChange","event","onCampaignCodeChange","target","onSubmitCampaignCode","isFreeGiftCampaignActive","hasFreeGift","FreeGift","isCheckout","campaignText","freeGiftCampaignText","FreeShippingBar","shippingBarAmount","shippingBarText","percentage","percentageFilled","place","Upsell","responsiveConfig","heading","parentClass","openMiniCartAtCheckout","CheckoutPrivateCustomerInfo","_context7","_context8","_props$customerDetail","customerDetails","_props$alternativeAdd","alternativeAddress","signUp","authenticated","_props$errors","onSignUpChange","errors","input","cssClass","stateKey","_context2","_context3","_context4","_context5","_context6","autoComplete","arguments","undefined","type","htmlFor","_concatInstanceProperty","concat","toLowerCase","data-error-for","country","disabled","constants","countries","_ref","text","checked","showAlternativeAddress","_ref2","CheckoutBusinessCustomerInfo","_props$companyAddress","companyAddresses","companyName","selectedCompanyAddressId","setSelectedCompanyAddress","selectedAddress","_findInstanceProperty","address","systemId","_context9","_context10","zipCode","city","addressCountry","getCountry","phoneNumber","CheckoutDeliveryMethods","deliveryMethods","selectedId","method","formattedPrice","description","CheckoutPaymentMethods","paymentMethods","scriptPattern","PaymentWidget","_PureComponent","_classCallCheck","_callSuper","_inherits","_createClass","_this$props","this","responseString","renderKlarna","paymentSession","KlarnaCheckout","DynamicComponent","loader","args","extractScripts","executeScript","domString","matches","html","scripts","exec","replace","push","domId","scriptContent","script","document","appendChild","createTextNode","e","getElementById","PureComponent","PaymentProviderItem","provider","dispatch","useDispatch","selectedPaymentSubProvider","useSelector","state","checkout","payload","_ref3","selectedProviderId","selectedProviderName","isSelected","setSelectedPaymentSubProvider","svg","PaymentProviderGroup","_ref4","group","_ref4$openByDefault","openByDefault","providers","isOpen","setIsOpen","_useState3","_useState4","showingLess","setShowingLess","enableShowMoreFeature","showMoreTextPartialKey","extraClasses","toggleShowMore","useCallback","stopPropagation","Svg","icon","extraClass","label","LoadingOverlay","PaytrailPaymentProviders","_useSelector2","checkoutPayload","isSubmitting","paymentSubProviders","useEffect","firstProvider","providerGroups","_step","_iterator","_createForOfIteratorHelper","s","n","done","_Array$isArray","err","f","findFirstPaymentProvider","privateCustomerAdditionalDetailsSchema","object","shape","acceptTermsOfCondition","boolean","required","oneOf","selectedDeliveryMethod","string","privateCustomerAddressSchema","email","mixed","notOneOf","lastName","firstName","privateCustomerAlternativeAddressSchema","businessCustomerDetailsSchema","CheckoutContainer","_Component","_this","cartChanged","_this$props$checkout$","selectedPaymentMethod","setPayment","d","setDelivery","_this$props$checkout$2","onCustomerDetailsChange","_this2","_this$props$checkout$3","isBusinessCustomer","notCustomerDetailFields","onError","error","addressPath","path","_indexOfInstanceProperty","submitError","submitRequest","validate","_objectSpread","then","submit","checkAltAddress","_this3","cart","_URL","location","paymentFailed","_URLSearchParams","search","get","_checkout$errors","paymentWidget","orderNote","checkoutMode","validCheckout","_includesInstanceProperty","extraStyling","opacity","pointerEvents","isChangeable","renderCartSection","renderDeliveryMethodsSection","renderPaymentMethodsSection","renderCustomerDetailsSection","renderPaytrailProvidersSection","_extends","verify","style","termsUrl","companyCustomers","preventDefault","placeOrder","loginUrl","general","prevProps","result","redirectUrl","errorKeys","_Object$keys","errorNode","querySelector","inputNode","parentElement","_setTimeout","focus","scrollIntoView","behavior","_checkout$errors2","setCampaignCode","submitCampaignCode","_this4","_checkout$errors3","privateCustomerInfoComponent","businessCustomerInfoComponent","both","setBusinessCustomer","_checkout$errors4","_checkout$errors5","Component","connect","code","setOrderNote","note","accept","orderId","setSignUp","submitDone","companyId","propName","setCustomerDetails","setAlternativeAddress","rowId","reloadPayment"],"mappings":"2FAAeA,WAAOC,SAAkB,W,gcCYlCC,EAAe,CACjB,CACIC,WAAY,EACZC,SAAU,CACNC,YAAa,OAGrB,CACIF,WAAY,IACZC,SAAU,CACNC,YAAa,MAGrB,CACIF,WAAY,KACZC,SAAU,CACNC,YAAa,OAmMVC,EA9LF,SAACC,GAAU,IAAAC,EAAAC,EACMC,mBAAS,IAAGC,EAAAC,IAAAH,EAAA,GAAxBI,GAAFF,EAAA,GAAUA,EAAA,IAEtB,SAASG,EAAiBC,EAAOC,GAC7B,IAAMC,EAAcV,EAAMW,UAAUF,GAAGC,YACjCE,EAAkBZ,EAAMW,UAAUF,GAAGI,SACrCC,EAAkBd,EAAMW,UAAUF,GAAGK,gBAEvCC,IAASH,IAAoBG,IAASD,KACtCd,EAAMgB,uBAAuBN,EAAaF,GAC1CF,EAAS,KAIjB,OACIW,IAAAC,cAAAD,IAAAE,SAAA,KACIF,IAAAC,cAAA,OAAKE,UAAU,yBAAyBC,GAAG,iBACvCJ,IAAAC,cAAA,OAAKE,UAAU,mCACXH,IAAAC,cAAA,MAAIE,UAAU,wBACTE,YAAU,6BAEfL,IAAAC,cAAA,MAAIE,UAAU,iBACTpB,EAAMW,UAAUY,OAAS,GACtBC,IAAAvB,EAAAD,EAAMW,WAASc,KAAAxB,GAAK,SAACyB,EAAUjB,GAAC,OAC5BQ,IAAAC,cAAA,MAAIS,IAAK,KAAOlB,GACZQ,IAA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BACDuK,EAASsK,aAAsBF,EAAU3U,MAKrDQ,uBAAwB,SAACsU,EAAOzU,GAAQ,OAAKkK,EAAS/J,aAAuBsU,EAAOzU,IAAWiQ,MAAK,kBAAM/F,EAASwK,oBACnHjT,eAAgB,SAACgT,GAAK,OAAKvK,EAAS/J,aAAuBsU,EAAO,IAAIxE,MAAK,kBAAM/F,EAASwK,uBAInFb,CAA6CpF","file":"5.c0484d8a103abc2219a2.js","sourcesContent":["export default window.__litium.constants;","import React, { useState } from \"react\";\r\nimport { translate } from \"../Services/translation\";\r\nimport { isMuurikka } from \"./MiscellaneousMenu\";\r\nimport QuantityStepperCart from \"./QuantitystepperCart\";\r\nimport FreeShippingBar from \"../Muurikka/FreeShippingBar\";\r\nimport FreeGift from \"../Muurikka/FreeGift.container\";\r\nimport Upsell from \"../Muurikka/Components/Upsell\";\r\n\r\n/**\r\n * Breakpoint here is NOT window viewport size, but the container size where the scroll container is, how much space the scoll container has.\r\n * So for Muurikkas checkout page, it'll cap around 1110px in available width.\r\n */\r\nconst upsellConfig = [\r\n {\r\n breakpoint: 0,\r\n settings: {\r\n itemsToShow: 1.75\r\n }\r\n },\r\n {\r\n breakpoint: 640,\r\n settings: {\r\n itemsToShow: 2.6\r\n }\r\n },\r\n {\r\n breakpoint: 1024,\r\n settings: {\r\n itemsToShow: 3.5\r\n }\r\n }\r\n];\r\n\r\nconst Cart = (props) => {\r\n const [state, setState] = useState({});\r\n\r\n function onQuantityChange(value, i) {\r\n const rowSystemId = props.orderRows[i].rowSystemId;\r\n const currentQuantity = props.orderRows[i].quantity;\r\n const inStockQuantity = props.orderRows[i].inStockQuantity;\r\n\r\n if (parseInt(currentQuantity) <= parseInt(inStockQuantity)) {\r\n props.updateOrderRowQuantity(rowSystemId, value);\r\n setState({});\r\n }\r\n }\r\n\r\n return (\r\n <>\r\n
\r\n
\r\n

\r\n {translate(\"checkout.products.header\")}\r\n

\r\n
\r\n \r\n ))}\r\n \r\n
\r\n
\r\n

\r\n {translate(\"checkout.summary.header\")}\r\n

\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n {isMuurikka && (\r\n
\r\n \r\n props.onCampaignCodeChange(event.target.value)\r\n }\r\n />\r\n props.onSubmitCampaignCode()}\r\n >\r\n {translate(\"checkout.code.add\")}\r\n \r\n
\r\n )}\r\n {!isMuurikka && (\r\n
\r\n \r\n props.onCampaignCodeChange(event.target.value)\r\n }\r\n />\r\n props.onSubmitCampaignCode()}\r\n >\r\n {translate(\"checkout.code.add\")}\r\n \r\n
\r\n )}\r\n
\r\n
\r\n \r\n {(props.isFreeGiftCampaignActive && !props.hasFreeGift) && (\r\n \r\n )}\r\n \r\n\r\n
\r\n \r\n
\r\n \r\n );\r\n}\r\n\r\nexport default Cart;\r\n","import React from 'react';\r\nimport constants from '../constants';\r\nimport { translate } from '../Services/translation';\r\n\r\nconst CheckoutPrivateCustomerInfo = (props) => {\r\n const { customerDetails = {}, alternativeAddress = [], signUp, authenticated, onChange, onSignUpChange, errors = {} } = props;\r\n const input = (cssClass, stateKey, id, autoComplete = 'on', placeholder = null, type = 'text') => (\r\n
\r\n \r\n onChange(stateKey, id, event.target.value)}/>\r\n {errors[`${stateKey}-${id}`] &&\r\n {errors[`${stateKey}-${id}`][0]}\r\n }\r\n
\r\n );\r\n return (\r\n
\r\n
\r\n
\r\n {input('small-6 columns', 'customerDetails', 'firstName', 'billing given-name')}\r\n {input('small-6 columns', 'customerDetails', 'lastName', 'billing family-name')}\r\n {input('small-12 columns', 'customerDetails', 'careOf')}\r\n {input('small-12 columns', 'customerDetails', 'address', 'billing street-address')}\r\n {input('small-6 columns', 'customerDetails', 'zipCode', 'billing postal-code')}\r\n {input('small-6 columns', 'customerDetails', 'city', 'billing address-level2')}\r\n
\r\n \r\n \r\n
\r\n {input('small-12 columns', 'customerDetails', 'phoneNumber', 'billing tel')}\r\n
\r\n
\r\n
\r\n
\r\n
\r\n onChange('alternativeAddress', 'showAlternativeAddress', event.target.checked)}\r\n />\r\n \r\n
\r\n
\r\n {alternativeAddress.showAlternativeAddress && (
\r\n {input('small-6 columns', 'alternativeAddress', 'firstName', 'shipping given-name')}\r\n {input('small-6 columns', 'alternativeAddress', 'lastName', 'shipping family-name')}\r\n {input('small-12 columns', 'alternativeAddress', 'careOf')}\r\n {input('small-12 columns', 'alternativeAddress', 'address', 'shipping street-address')}\r\n {input('small-6 columns', 'alternativeAddress', 'zipCode', 'shipping postal-code')}\r\n {input('small-6 columns', 'alternativeAddress', 'city', 'shipping address-level2')}\r\n
\r\n \r\n \r\n
\r\n {input('small-12 columns', 'alternativeAddress', 'phoneNumber', 'shipping tel')}\r\n
)}\r\n
\r\n
\r\n
\r\n {input('small-12 medium-6 columns', 'customerDetails', 'email', 'email')}\r\n
\r\n
\r\n
\r\n )\r\n}\r\n\r\nexport default CheckoutPrivateCustomerInfo;\r\n","import React from 'react';\r\nimport { translate } from '../Services/translation';\r\nimport constants from '../constants';\r\n\r\nconst CheckoutBusinessCustomerInfo = (props) => {\r\n const { customerDetails = {}, companyAddresses = [], companyName, authenticated, selectedCompanyAddressId, onChange, setSelectedCompanyAddress, errors = {} } = props;\r\n const input = (cssClass, stateKey, id, autoComplete = null, placeholder = null, type = 'text') => (\r\n
\r\n \r\n onChange(stateKey, id, event.target.value)}/>\r\n {errors[`${stateKey}-${id}`] &&\r\n {errors[`${stateKey}-${id}`][0]}\r\n }\r\n
\r\n );\r\n const selectedAddress = selectedCompanyAddressId && companyAddresses ? companyAddresses.find(address => address.systemId === selectedCompanyAddressId) : null;\r\n const getCountry = (address) => {\r\n const addressCountry = constants.countries ? constants.countries.find(country => country.value === address.country) : null;\r\n return addressCountry ? addressCountry.text : address.country;\r\n };\r\n return (\r\n
\r\n
\r\n
\r\n
{translate('checkout.customerinfo.reference')}
\r\n
\r\n
\r\n {input('small-6 columns', 'customerDetails', 'firstName', 'billing given-name')}\r\n {input('small-6 columns', 'customerDetails', 'lastName', 'billing family-name')}\r\n
\r\n
\r\n {input('small-12 columns', 'customerDetails', 'phoneNumber', 'billing tel')}\r\n
\r\n
\r\n {input('small-6 columns', 'customerDetails', 'email', 'email')}\r\n
\r\n
\r\n
\r\n
\r\n
{translate('checkout.customerinfo.address')}
\r\n
\r\n \r\n \r\n {errors['selectedCompanyAddressId'] &&\r\n {errors['selectedCompanyAddressId'][0]}\r\n }\r\n
\r\n
\r\n { selectedAddress &&\r\n
\r\n
{translate('checkout.customerinfo.companyname')}
\r\n
{selectedAddress.address}
\r\n
\r\n {selectedAddress.zipCode} \r\n {selectedAddress.city}\r\n
\r\n
{selectedAddress.country}
\r\n
\r\n {translate('checkout.customerinfo.phone')} \r\n {selectedAddress.phoneNumber}\r\n
\r\n
\r\n }\r\n
\r\n
\r\n )\r\n}\r\n\r\nexport default CheckoutBusinessCustomerInfo;\r\n","import React from 'react'; \r\nimport { translate } from '../Services/translation';\r\n\r\nconst CheckoutDeliveryMethods = ({ deliveryMethods, selectedId, onChange }) => (\r\n
\r\n

{translate('checkout.delivery.title')}

\r\n
\r\n
    \r\n { deliveryMethods && deliveryMethods.map(method => (\r\n
  • \r\n \r\n
  • \r\n ))}\r\n
\r\n
\r\n
\r\n)\r\n\r\nexport default CheckoutDeliveryMethods;\r\n","import React from 'react';\r\nimport { translate } from '../Services/translation';\r\n\r\nconst CheckoutPaymentMethods = ({ paymentMethods, selectedId, onChange, onCampaignCodeChange, onSubmitCampaignCode, errors }) => (\r\n
\r\n { paymentMethods && paymentMethods.map(method => (\r\n \r\n )) }\r\n
\r\n)\r\n\r\nexport default CheckoutPaymentMethods;\r\n","import React, { PureComponent } from 'react';\r\nimport DynamicComponent from '../DynamicComponent';\r\nconst scriptPattern = /]*>([\\s\\S]*?)<\\/script>/gi;\r\n\r\nclass PaymentWidget extends PureComponent {\r\n render() {\r\n const { id, responseString } = this.props;\r\n if (id === 'KlarnaCheckout' || id === \"KLARNA_CHECKOUT\") {\r\n return this.renderKlarna(responseString);\r\n }\r\n return ;\r\n }\r\n\r\n renderKlarna(paymentSession) {\r\n const KlarnaCheckout = DynamicComponent({\r\n loader: () => import('./KlarnaCheckout')\r\n });\r\n const args = { paymentSession, extractScripts: this.extractScripts, executeScript: this.executeScript };\r\n return (\r\n \r\n );\r\n }\r\n\r\n extractScripts(domString) {\r\n var matches, html = domString;\r\n const scripts = [];\r\n while ((matches = scriptPattern.exec(domString)) !== null) {\r\n html = html.replace(matches[0], '');\r\n scripts.push(matches[1]);\r\n }\r\n return {\r\n html,\r\n scripts,\r\n };\r\n }\r\n\r\n executeScript(domId, scriptContent) {\r\n const script = document.createElement(\"script\");\r\n script.type = \"text/javascript\";\r\n try {\r\n script.appendChild(document.createTextNode(scriptContent)); \r\n } catch(e) {\r\n // to support IE\r\n script.text = scriptContent;\r\n }\r\n document.getElementById(domId).appendChild(script);\r\n }\r\n}\r\n\r\nexport default PaymentWidget;","import React, { Fragment, useCallback, useEffect, useState } from \"react\";\r\nimport { useDispatch, useSelector } from \"react-redux\";\r\nimport { translate } from \"../../Services/translation\";\r\nimport { setSelectedPaymentSubProvider } from \"../../Actions/Checkout.action\";\r\nimport Svg from \"../../Components/Svg\";\r\n\r\n/**\r\n * @typedef {Object} PaymentMethodGroup\r\n * @property {number} id - The unique identifier of the payment method group (enum value as a number).\r\n * @property {string} name - The name of the payment method group (e.g., \"Pankkimaksutavat\").\r\n * @property {string} icon - The icon/png URL for the payment method group.\r\n * @property {string} svg - The SVG URL for the payment method group.\r\n * @property {Array} providers - The list of providers within this payment method group.\r\n */\r\n\r\n/**\r\n * @typedef {Object} Provider\r\n * @property {string|null} url - The URL of the provider (can be null).\r\n * @property {string} icon - The icon/png URL of the provider.\r\n * @property {string} svg - The SVG URL of the provider.\r\n * @property {string} name - The name of the provider (e.g., \"OP\").\r\n * @property {number} group - The unique identifier (enum value as a number) of the payment method group to which the provider belongs.\r\n * @property {string} id - The unique identifier of the provider (e.g., \"osuuspankki\").\r\n */\r\n\r\n/**\r\n * Finds the first available payment provider from grouped providers.\r\n *\r\n * @param {Array} providerGroups - The groups of payment methods to search.\r\n * @returns {Provider|null} The first available provider or null if none exist.\r\n */\r\nconst findFirstPaymentProvider = (providerGroups) => {\r\n for (const group of providerGroups) {\r\n if (Array.isArray(group.providers) && group.providers.length > 0) {\r\n return group.providers[0];\r\n }\r\n }\r\n\r\n return null;\r\n}\r\n\r\n/**\r\n * @param {Provider} provider\r\n * @returns {JSX.Element}\r\n * @constructor\r\n */\r\nconst PaymentProviderItem = function({ provider }) {\r\n if (!provider) return null;\r\n\r\n const dispatch = useDispatch();\r\n const { selectedPaymentSubProvider } = useSelector(state => state.checkout.payload);\r\n const [selectedProviderId, selectedProviderName] = selectedPaymentSubProvider && selectedPaymentSubProvider.split(';') || [null, null];\r\n\r\n const isSelected =\r\n selectedProviderId &&\r\n selectedProviderName &&\r\n selectedProviderId === provider.id &&\r\n selectedProviderName === provider.name;\r\n\r\n return
{\r\n !isSelected && dispatch(setSelectedPaymentSubProvider(provider));\r\n }}>\r\n
\r\n
{provider.name}
\r\n
\r\n {provider.name}\r\n
\r\n
\r\n}\r\n\r\n/**\r\n * @param {PaymentMethodGroup} group\r\n * @param {boolean} openByDefault\r\n * @returns {JSX.Element}\r\n * @constructor\r\n */\r\nconst PaymentProviderGroup = function ({ group, openByDefault = false }) {\r\n if (!group || !group.providers.length) {\r\n return
{translate('checkout.paytrail.group.noproviders')}
\r\n }\r\n\r\n // Enable logic even for desktop, but styling will only be available for mobile.\r\n const [isOpen, setIsOpen] = useState(openByDefault);\r\n const [showingLess, setShowingLess] = useState(true);\r\n const enableShowMoreFeature = group.providers.length > 4;\r\n const showMoreTextPartialKey = showingLess ? 'showmore' : 'showless';\r\n\r\n const extraClasses =\r\n (isOpen ? ' is-open' : '') +\r\n (showingLess ? ' is-showing-less' : '');\r\n\r\n const toggleShowMore = useCallback(e => {\r\n if (!enableShowMoreFeature) return;\r\n e.stopPropagation();\r\n setShowingLess(!showingLess);\r\n }, [showingLess])\r\n\r\n return \r\n
setIsOpen(!isOpen)}>\r\n

{group.name}

\r\n \r\n
\r\n\r\n
\r\n {group.providers.map((provider, index) =>\r\n \r\n \r\n \r\n )}\r\n\r\n {enableShowMoreFeature &&\r\n \r\n {translate(`muha.checkout.paytrail.group.${showMoreTextPartialKey}`)}\r\n \r\n }\r\n
\r\n \r\n}\r\n\r\nconst PaytrailPaymentProviders = function () {\r\n const dispatch = useDispatch();\r\n const { payload: checkoutPayload, isSubmitting } = useSelector(state => state.checkout);\r\n\r\n const paymentSubProviders = checkoutPayload.paymentSubProviders;\r\n useEffect(() => {\r\n const firstProvider = findFirstPaymentProvider(paymentSubProviders);\r\n if (firstProvider) {\r\n dispatch(setSelectedPaymentSubProvider(firstProvider));\r\n }\r\n }, [paymentSubProviders]);\r\n\r\n /**\r\n * @type {PaymentMethodGroup[]}\r\n */\r\n if (!paymentSubProviders || !paymentSubProviders.length) {\r\n return
{translate('muha.checkout.paytrail.noproviders')}
\r\n }\r\n\r\n return
\r\n {paymentSubProviders.map((group, index) =>\r\n \r\n \r\n \r\n )}\r\n\r\n {isSubmitting && }\r\n
\r\n}\r\n\r\nconst LoadingOverlay = function() {\r\n return
\r\n}\r\n\r\nexport default PaytrailPaymentProviders;\r\n","import React, { Component, Fragment } from 'react';\r\nimport { connect, useDispatch } from 'react-redux';\r\n\r\nimport Cart from '../Components/Cart';\r\nimport CheckoutPrivateCustomerInfo from '../Components/Checkout.PrivateCustomerInfo';\r\nimport CheckoutBusinessCustomerInfo from '../Components/Checkout.BusinessCustomerInfo';\r\nimport CheckoutDeliveryMethods from '../Components/Checkout.DeliveryMethods';\r\nimport CheckoutPaymentMethods from '../Components/Checkout.PaymentMethods';\r\nimport PaymentWidget from '../Components/Payments/PaymentWidget';\r\n\r\nimport constants from '../constants';\r\n\r\nimport {\r\n acceptTermsOfCondition,\r\n setBusinessCustomer,\r\n setCampaignCode,\r\n setDelivery,\r\n setPayment,\r\n setOrderNote,\r\n submit,\r\n verify,\r\n setCustomerDetails,\r\n setAlternativeAddress,\r\n setSignUp,\r\n setSelectedCompanyAddress,\r\n submitError,\r\n reloadPayment,\r\n submitCampaignCode,\r\n submitRequest,\r\n submitDone,\r\n} from '../Actions/Checkout.action';\r\nimport { update as updateOrderRowQuantity } from '../Actions/Cart.action';\r\n\r\nimport { translate } from '../Services/translation';\r\nimport { string, object, boolean, mixed } from 'yup';\r\nimport PaytrailPaymentProviders from \"../Muurikka/Components/PaytrailPaymentProviders\";\r\n\r\nconst privateCustomerAdditionalDetailsSchema = object().shape({\r\n acceptTermsOfCondition: boolean().required(translate(`validation.checkrequired`)).oneOf([true], translate(`validation.checkrequired`)),\r\n selectedDeliveryMethod: string().required(translate(`validation.required`)),\r\n});\r\n\r\nconst privateCustomerAddressSchema = object().shape({\r\n email: string().required(translate(`validation.required`)).email(translate(`validation.email`)),\r\n phoneNumber: string().required(translate(`validation.required`)),\r\n country: mixed().required(translate(`validation.required`)).notOneOf([''], translate('validation.required')),\r\n city: string().required(translate(`validation.required`)),\r\n zipCode: string().required(translate(`validation.required`)),\r\n address: string().required(translate(`validation.required`)),\r\n lastName: string().required(translate(`validation.required`)),\r\n firstName: string().required(translate(`validation.required`)),\r\n});\r\n\r\nconst privateCustomerAlternativeAddressSchema = object().shape({\r\n phoneNumber: string().required(translate(`validation.required`)),\r\n country: mixed().required(translate(`validation.required`)).notOneOf([''], translate('validation.required')),\r\n city: string().required(translate(`validation.required`)),\r\n zipCode: string().required(translate(`validation.required`)),\r\n address: string().required(translate(`validation.required`)),\r\n lastName: string().required(translate(`validation.required`)),\r\n firstName: string().required(translate(`validation.required`)),\r\n});\r\n\r\nconst businessCustomerDetailsSchema = object().shape({\r\n acceptTermsOfCondition: boolean().required(translate(`validation.checkrequired`)).oneOf([true], translate(`validation.checkrequired`)),\r\n selectedDeliveryMethod: string().required(translate(`validation.required`)),\r\n email: string().required(translate(`validation.required`)).email(translate(`validation.email`)),\r\n phoneNumber: string().required(translate(`validation.required`)),\r\n lastName: string().required(translate(`validation.required`)),\r\n firstName: string().required(translate(`validation.required`)),\r\n selectedCompanyAddressId: string().required(translate(`validation.required`)),\r\n});\r\n\r\nclass CheckoutContainer extends Component {\r\n constructor(props) {\r\n super(props);\r\n this.state = {\r\n cartChanged: false,\r\n };\r\n }\r\n\r\n componentDidMount() {\r\n if (!this.props || !this.props.checkout) {\r\n return;\r\n }\r\n\r\n // set selected value for payment method on load.\r\n const { selectedPaymentMethod, deliveryMethods, selectedDeliveryMethod } = this.props.checkout.payload;\r\n selectedPaymentMethod && this.props.setPayment(selectedPaymentMethod);\r\n\r\n if (!selectedDeliveryMethod || deliveryMethods.length > 0 && !deliveryMethods.find(d => d.id === selectedDeliveryMethod)) {\r\n this.props.setDelivery(deliveryMethods[0].id);\r\n }\r\n\r\n // fill default select value to the state\r\n const { customerDetails, alternativeAddress } = this.props.checkout.payload;\r\n (!customerDetails || !customerDetails.country) && constants.countries && constants.countries[0] && this.props.onCustomerDetailsChange('customerDetails', 'country', constants.countries[0].value);\r\n (!alternativeAddress || !alternativeAddress.country) && constants.countries && constants.countries[0] && this.props.onCustomerDetailsChange('alternativeAddress', 'country', constants.countries[0].value);\r\n }\r\n\r\n placeOrder() {\r\n const { payload } = this.props.checkout,\r\n { isBusinessCustomer, selectedCompanyAddressId, acceptTermsOfCondition,\r\n selectedPaymentMethod, selectedDeliveryMethod } = this.props.checkout.payload;\r\n\r\n const notCustomerDetailFields = ['selectedCompanyAddressId', 'selectedPaymentMethod', 'selectedDeliveryMethod', 'acceptTermsOfCondition'];\r\n const onError = (error, addressPath = 'customerDetails') => {\r\n error.path = notCustomerDetailFields.indexOf(error.path) >= 0 ? error.path : `${addressPath}-${error.path}`;\r\n this.props.submitError(error)\r\n };\r\n this.props.submitRequest();\r\n if (isBusinessCustomer) {\r\n businessCustomerDetailsSchema.validate({\r\n ...payload.customerDetails,\r\n selectedCompanyAddressId,\r\n selectedPaymentMethod,\r\n selectedDeliveryMethod,\r\n acceptTermsOfCondition\r\n })\r\n .then(() => {\r\n this.props.submit();\r\n })\r\n .catch(onError);\r\n } else {\r\n const checkAltAddress = payload.alternativeAddress.showAlternativeAddress;\r\n\r\n privateCustomerAddressSchema.validate({\r\n ...payload.customerDetails\r\n })\r\n .then(() => {\r\n if (checkAltAddress) {\r\n privateCustomerAlternativeAddressSchema.validate({\r\n ...payload.alternativeAddress\r\n })\r\n .then(() => {\r\n privateCustomerAdditionalDetailsSchema.validate({\r\n selectedPaymentMethod,\r\n selectedDeliveryMethod,\r\n acceptTermsOfCondition\r\n })\r\n .then(() => {\r\n this.props.submit();\r\n })\r\n .catch(onError);\r\n })\r\n .catch((error) => { onError(error, 'alternativeAddress') })\r\n } else {\r\n privateCustomerAdditionalDetailsSchema.validate({\r\n selectedPaymentMethod,\r\n selectedDeliveryMethod,\r\n acceptTermsOfCondition\r\n })\r\n .then(() => {\r\n this.props.submit();\r\n })\r\n .catch(onError);\r\n }\r\n })\r\n .catch(onError);\r\n }\r\n }\r\n\r\n render() {\r\n const { cart } = this.props;\r\n if (!cart || !cart.orderRows || cart.orderRows.length < 1) {\r\n return (\r\n
\r\n
\r\n

{translate(`checkout.cart.empty`)}

\r\n
\r\n
\r\n );\r\n }\r\n\r\n const url = new URL(window.location.href);\r\n const params = new URLSearchParams(url.search);\r\n const successQuery = params.get('success');\r\n const paymentFailed = successQuery === 'false';\r\n\r\n const { checkout } = this.props,\r\n { payload, isSubmitting, errors = {} } = checkout,\r\n { orderNote, paymentWidget, paymentMethods, authenticated, isBusinessCustomer, checkoutMode, selectedPaymentSubProvider, selectedPaymentMethod } = payload;\r\n\r\n let validCheckout = true;\r\n const isPaytrail = selectedPaymentMethod.toLowerCase().includes('paytrail');\r\n if (isPaytrail) {\r\n validCheckout = selectedPaymentSubProvider && selectedPaymentSubProvider.length > 0;\r\n }\r\n\r\n let extraStyling = !validCheckout ? { opacity: 0.5, pointerEvents: 'none' } : null;\r\n\r\n return (\r\n
\r\n {paymentFailed && \r\n
{translate('payment.error')}
\r\n }\r\n\r\n {(!paymentWidget || paymentWidget.isChangeable) && this.renderCartSection()}\r\n {this.renderDeliveryMethodsSection()}\r\n {paymentMethods && paymentMethods.length > 1 && (!paymentWidget || paymentWidget.isChangeable) && this.renderPaymentMethodsSection()}\r\n {!paymentWidget && this.renderCustomerDetailsSection()}\r\n {!paymentWidget && this.renderPaytrailProvidersSection()}\r\n \r\n\r\n {!paymentWidget && \r\n
\r\n
\r\n

{translate('checkout.order.title')}

\r\n
\r\n\r\n
\r\n this.props.acceptTermsOfCondition(event.target.checked)}/>\r\n \r\n {errors.acceptTermsOfCondition &&\r\n {errors.acceptTermsOfCondition[0]}\r\n }\r\n
\r\n\r\n
\r\n {!authenticated && (isBusinessCustomer || checkoutMode === constants.checkoutMode.companyCustomers) ?\r\n \r\n : \r\n }\r\n
\r\n
\r\n }\r\n\r\n
\r\n {errors && errors.general &&\r\n
{errors.general[0]}
\r\n }\r\n
\r\n
\r\n );\r\n }\r\n\r\n componentDidUpdate(prevProps) {\r\n if (this.props.checkout.result && this.props.checkout.result.redirectUrl) {\r\n window.location = this.props.checkout.result.redirectUrl;\r\n return;\r\n }\r\n\r\n const { checkout } = this.props;\r\n if (!checkout.isSubmitting || !checkout.errors) {\r\n return;\r\n }\r\n\r\n const errorKeys = Object.keys(checkout.errors);\r\n if (!errorKeys || errorKeys.length < 1) {\r\n return;\r\n }\r\n\r\n const errorNode = document.querySelector(`[data-error-for=\"${errorKeys[0]}\"]`);\r\n if (!errorNode) {\r\n return;\r\n }\r\n\r\n const inputNode = errorNode.parentElement.querySelector('input');\r\n if (inputNode) {\r\n setTimeout(() => inputNode.focus(), 1000);\r\n inputNode.scrollIntoView({ behavior: 'smooth' });\r\n } else {\r\n errorNode.scrollIntoView({ behavior: 'smooth' });\r\n }\r\n }\r\n\r\n renderCartSection() {\r\n const { checkout } = this.props,\r\n { errors = {} } = checkout;\r\n return (\r\n \r\n

{translate('checkout.title')}

\r\n
\r\n {errors && errors.cart &&

{errors.cart[0]}

}\r\n
\r\n \r\n
\r\n );\r\n }\r\n\r\n renderPaytrailProvidersSection() {\r\n const { checkout } = this.props;\r\n const { selectedPaymentMethod } = checkout.payload;\r\n const isPaytrail = selectedPaymentMethod.toLowerCase().includes('paytrail');\r\n if (!isPaytrail) return null;\r\n\r\n return \r\n
\r\n

{translate('muha.checkout.paytrail.paymentproviders')}

\r\n
\r\n\r\n
\r\n \r\n
\r\n
\r\n }\r\n\r\n renderCustomerDetailsSection() {\r\n const { checkout, onCustomerDetailsChange, onSignUpChange, setSelectedCompanyAddress } = this.props,\r\n { payload, errors = {} } = checkout,\r\n {\r\n companyName,\r\n authenticated,\r\n customerDetails,\r\n alternativeAddress,\r\n companyAddresses,\r\n selectedCompanyAddressId,\r\n isBusinessCustomer,\r\n signUp,\r\n checkoutMode\r\n } = payload;\r\n const privateCustomerInfoComponent = ;\r\n const businessCustomerInfoComponent = ;\r\n if (!authenticated) {\r\n return (\r\n \r\n
\r\n

{translate('checkout.customerinfo.title')}

\r\n {isBusinessCustomer && checkoutMode === constants.checkoutMode.both && this.props.setBusinessCustomer(false)} className=\"checkout__link\">{translate('checkout.customerinfo.privatecustomer')}}\r\n
\r\n {!isBusinessCustomer && checkoutMode !== constants.checkoutMode.companyCustomers && privateCustomerInfoComponent}\r\n {(isBusinessCustomer || checkoutMode === constants.checkoutMode.companyCustomers) && businessCustomerInfoComponent}\r\n
\r\n );\r\n }\r\n if (isBusinessCustomer) {\r\n return (\r\n \r\n
\r\n

{translate('checkout.customerinfo.title')}

\r\n
\r\n {authenticated && businessCustomerInfoComponent}\r\n
\r\n );\r\n }\r\n\r\n return (\r\n \r\n
\r\n

{translate('checkout.customerinfo.title')}

\r\n
\r\n {privateCustomerInfoComponent}\r\n
\r\n );\r\n }\r\n\r\n renderDeliveryMethodsSection() {\r\n const { checkout } = this.props,\r\n { payload, errors = {} } = checkout,\r\n { deliveryMethods } = payload;\r\n\r\n return (\r\n \r\n \r\n {errors.selectedDeliveryMethod &&\r\n {errors.selectedDeliveryMethod[0]}\r\n }\r\n \r\n );\r\n }\r\n\r\n renderPaymentMethodsSection() {\r\n const { checkout } = this.props,\r\n { payload, errors = {} } = checkout,\r\n { paymentMethods } = payload;\r\n return (\r\n \r\n
\r\n

{translate('checkout.payment.title')}

\r\n
\r\n \r\n {errors.selectedPaymentMethod &&\r\n {errors.selectedPaymentMethod[0]}\r\n }\r\n
\r\n );\r\n }\r\n}\r\n\r\nconst mapStateToProps = state => {\r\n const { cart, checkout } = state;\r\n return {\r\n cart,\r\n checkout,\r\n }\r\n}\r\n\r\nconst mapDispatchToProps = dispatch => {\r\n return {\r\n submit: () => dispatch(submit()),\r\n setBusinessCustomer: (value) => dispatch(setBusinessCustomer(value)),\r\n setCampaignCode: (code) => dispatch(setCampaignCode(code)),\r\n setDelivery: (systemId) => dispatch(setDelivery(systemId)),\r\n setPayment: (systemId) => dispatch(setPayment(systemId)),\r\n setOrderNote: (note) => dispatch(setOrderNote(note)),\r\n acceptTermsOfCondition: (accept) => dispatch(acceptTermsOfCondition(accept)),\r\n verify: (url, orderId, payload) => dispatch(verify(url, orderId, payload)),\r\n onSignUpChange: (signUp) => dispatch(setSignUp(signUp)),\r\n submitCampaignCode: () => dispatch(submitCampaignCode()),\r\n submitRequest: () => dispatch(submitRequest()),\r\n submitError: (error) => {\r\n dispatch(submitError(error));\r\n dispatch(submitDone(null));\r\n },\r\n setSelectedCompanyAddress: (companyId) => dispatch(setSelectedCompanyAddress(companyId)),\r\n onCustomerDetailsChange: (stateKey, propName, value) => {\r\n switch (stateKey) {\r\n case 'customerDetails':\r\n dispatch(setCustomerDetails(propName, value));\r\n break;\r\n case 'alternativeAddress':\r\n dispatch(setAlternativeAddress(propName, value));\r\n break;\r\n }\r\n },\r\n\r\n updateOrderRowQuantity: (rowId, quantity) => dispatch(updateOrderRowQuantity(rowId, quantity)).then(() => dispatch(reloadPayment())),\r\n removeOrderRow: (rowId) => dispatch(updateOrderRowQuantity(rowId, 0)).then(() => dispatch(reloadPayment())),\r\n }\r\n}\r\n\r\nexport default connect(mapStateToProps, mapDispatchToProps)(CheckoutContainer);\r\n"],"sourceRoot":""}