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B1D,SAAWhM,GACPkE,EvBhVGwL,KAAD,CAClChM,KAAMqa,EAAAA,GACNna,QAAS,CACL8L,4BuB8UgCA,CACI1P,EAAMiM,OAAOiD,YAK7B,yBACIlI,UAAU,gCACVkG,QAAQ,2BAEP/F,EAAAA,EAAAA,GACG,yCACD,IACH,qBACIH,UAAU,iBACVpG,KAAMgD,GAAQoa,SACd/R,OAAO,SACPgS,IAAI,eAEH9W,EAAAA,EAAAA,GAAU,yBAGlBwF,GAAM,wBACH,wBACI3F,UAAU,qDACV,iBAAe,0BAEd2F,GAAM,uBAA2B,MAMlD,uBAAK3F,UAAU,wBACX,uBAAKA,UAAU,oCACTmH,KACG1K,IACGqN,KACAtD,EAAAA,GAAUsD,aAAamB,iBAU3B,gBAAC,EAAD,CACIlL,UAAWzC,EAASoC,oBACpBM,UAAU,iCACVF,QAASiV,GACT7a,OAAOiG,EAAAA,EAAAA,GAAU,uBACjBzD,KAAK,WAdT,gBAAC,EAAD,CACIsD,UAAU,iCACVF,QAAS,IACJnG,SAASC,KAAOgD,GAAQiN,SAE7B3P,OAAOiG,EAAAA,EAAAA,GAAU,qCA0BzC,uBAAKH,UAAU,OACV2F,IAAUA,GAAM,SACb,qBAAG3F,UAAU,8BACR2F,GAAM,QAAY,IAG1BA,IAAUA,GAAM,SACb,qBAAG3F,UAAU,8BACR2F,GAAM,QAAY,KAnKvC,C","sources":["webpack:///./Scripts/Actions/Conversion.action.js","webpack:///./Scripts/Actions/Gtm.action.js","webpack:///./Scripts/Actions/Checkout.action.js","webpack:///./Scripts/Components/Button.js","webpack:///./Scripts/Components/ComplimentaryProducts.js","webpack:///./Scripts/Components/Hillerstorp/Cart.js","webpack:///./Scripts/Components/Hillerstorp/Checkout.Cart.js","webpack:///./Scripts/Components/InputField.js","webpack:///./Scripts/Components/InfoField.js","webpack:///./Scripts/Components/Checkout.BusinessCustomerInfo.js","webpack:///./Scripts/Components/Checkout.PrivateCustomerInfo.js","webpack:///./Scripts/Components/Checkout.ValidationSchema.js","webpack:///./Scripts/Components/Checkout.CustomerInfo.js","webpack:///./Scripts/Components/Checkout.DeliveryMethods.js","webpack:///./Scripts/Components/Checkout.DiscountCodes.js","webpack:///./Scripts/Components/Checkout.OrderInfo.js","webpack:///./Scripts/Components/Checkout.OrderNote.js","webpack:///./Scripts/Components/Checkout.PaymentMethods.js","webpack:///./Scripts/Components/Payments/PaymentWidget.js","webpack:///./Scripts/Components/Checkout.BusinessCustomerDropShip.js","webpack:///./Scripts/Components/Checkout.BusinessCustomerShippingAddress.js","webpack:///./Scripts/Components/Checkout.BusinessCustomerShippingInfo.js","webpack:///./Scripts/Components/Ingrid/api.ts","webpack:///./Scripts/Components/Ingrid/utils.ts","webpack:///./Scripts/Components/Ingrid/IngridApp.tsx","webpack:///./Scripts/Components/Hillerstorp/Checkout.js"],"sourcesContent":["import { post } from '../Services/http';\r\n\r\nexport const postConversionEvent = async (\r\n event,\r\n eventName,\r\n cDetails = null\r\n) => {\r\n await post(`/api/conversion`, {\r\n event_id: event.ecommerce.transaction_id\r\n ? event.ecommerce.transaction_id\r\n : event.fb_event_id,\r\n event_name: eventName,\r\n event_source_url: window.location.href,\r\n custom_data: {\r\n ...(event.ecommerce.value && { value: event.ecommerce.value }),\r\n currency: event.ecommerce.currency,\r\n content_name: document.title,\r\n content_ids: event.ecommerce.items.map((x) => x.item_id),\r\n content_type: 'product_group',\r\n },\r\n\r\n user_data: {\r\n ...(cDetails && cDetails.email && { em: cDetails.email }),\r\n ...(cDetails && cDetails.firstName && { fn: cDetails.firstName }),\r\n ...(cDetails && cDetails.lastName && { ln: cDetails.lastName }),\r\n ...(cDetails &&\r\n cDetails.phoneNumber && { ph: cDetails.phoneNumber }),\r\n },\r\n })\r\n .then((response) => response.json())\r\n .then((d) => {\r\n console.log(d);\r\n })\r\n .catch((error) => {\r\n if (error.message) {\r\n console.log(error.message);\r\n }\r\n });\r\n};\r\n\r\nconst getCookieValue = (cname) => {\r\n let name = cname + '=';\r\n let decodedCookie = decodeURIComponent(document.cookie);\r\n let ca = decodedCookie.split(';');\r\n for (let i = 0; i < ca.length; i++) {\r\n let c = ca[i];\r\n while (c.charAt(0) == ' ') {\r\n c = c.substring(1);\r\n }\r\n if (c.indexOf(name) == 0) {\r\n return c.substring(name.length, c.length);\r\n }\r\n }\r\n return '';\r\n};\r\n\r\nexport const cookieAccepted = () => {\r\n const val = getCookieValue('cookie_consent_level');\r\n if (val) {\r\n const valObj = JSON.parse(val);\r\n if (typeof valObj.targeting != 'undefined') {\r\n return valObj.targeting;\r\n }\r\n }\r\n return false;\r\n};\r\n","import { post } from '../Services/http';\r\nconst rootRoute = '/api/gtm';\r\nimport { postConversionEvent } from './Conversion.action';\r\n\r\nexport const addToCartEvent = async (articleNumber, quantity = 1) => {\r\n try {\r\n const response = await post(`${rootRoute}/add-to-cart`, {\r\n articleNumber,\r\n quantity,\r\n });\r\n const event = await response.json();\r\n addToDataLayer(event);\r\n if (\r\n window.Cookiebot &&\r\n window.Cookiebot.consent &&\r\n window.Cookiebot.consent.marketing\r\n )\r\n await postConversionEvent(event, 'AddToCart');\r\n } catch (error) {\r\n console.error(error);\r\n }\r\n};\r\n\r\nexport const removeFromCartEvent = async (articleNumber) => {\r\n try {\r\n const response = await post(`${rootRoute}/remove-from-cart`, {\r\n articleNumber,\r\n });\r\n const event = await response.json();\r\n addToDataLayer(event);\r\n } catch (error) {\r\n console.error(error);\r\n }\r\n};\r\n\r\nexport const beginCheckoutEvent = async () => {\r\n try {\r\n const response = await post(`${rootRoute}/begin-checkout`);\r\n const event = await response.json();\r\n addToDataLayer(event);\r\n if (\r\n window.Cookiebot &&\r\n window.Cookiebot.consent &&\r\n window.Cookiebot.consent.marketing\r\n )\r\n await postConversionEvent(event, 'InitiateCheckout');\r\n } catch (error) {\r\n console.error(error);\r\n }\r\n};\r\n\r\nconst addToDataLayer = (data) => {\r\n dataLayer = window.dataLayer || [];\r\n dataLayer.push({ ecommerce: null });\r\n dataLayer.push(data);\r\n};\r\n","import { post, put, remove } from '../Services/http';\r\nimport { load as loadCart } from './Cart.action';\r\nimport { catchError } from './Error.action';\r\n\r\nimport {\r\n CHECKOUT_SET_SELECTED_COMPANY_ADDRESS,\r\n CHECKOUT_SET_PRIVATE_CUSTOMER,\r\n CHECKOUT_SET_SIGN_UP,\r\n CHECKOUT_SET_DELIVERY,\r\n CHECKOUT_SET_COUNTRY,\r\n CHECKOUT_SET_PAYMENT,\r\n CHECKOUT_SET_DISCOUNT_CODE,\r\n CHECKOUT_SET_ORDER_NOTE,\r\n CHECKOUT_ACCEPT_TERMS_OF_CONDITION,\r\n CHECKOUT_SUBMIT,\r\n CHECKOUT_SUBMIT_ERROR,\r\n CHECKOUT_SET_PAYMENT_WIDGET,\r\n CHECKOUT_SET_USED_DISCOUNT_CODE,\r\n CHECKOUT_USER_SUBSCRIBE,\r\n CHECKOUT_SET_SELECTED_SHIPPING_TYPE,\r\n CHECKOUT_SET_SELECTED_SHIPPING_ADDRESS,\r\n CHECKOUT_UPDATE_CUSTOMER_INFO,\r\n CHECKOUT_SET_SHOW_ALTERNATIVE_ADDRESS,\r\n CLEAR_ERROR,\r\n CHECKOUT_SET_STATUS_SUBMIT_BUTTON,\r\n CHECKOUT_VALIDATE_ADDRESS,\r\n} from '../constants';\r\nimport { beginCheckoutEvent } from './Gtm.action';\r\nconst rootRoute = \"/api/checkout\";\r\nexport const setBusinessCustomer = (isBusinessCustomer) => ({\r\n type: CHECKOUT_SET_PRIVATE_CUSTOMER,\r\n payload: {\r\n isBusinessCustomer,\r\n },\r\n});\r\n\r\nexport const setSignUp = (signUp) => ({\r\n type: CHECKOUT_SET_SIGN_UP,\r\n payload: {\r\n signUp,\r\n },\r\n});\r\n\r\nexport const updateCustomerDetails = (key, data) => ({\r\n type: CHECKOUT_UPDATE_CUSTOMER_INFO,\r\n payload: {\r\n key,\r\n data,\r\n },\r\n});\r\n\r\nexport const setShippingAddress = (propName, value) => ({\r\n type: CHECKOUT_SET_CUSTOMER_INFO,\r\n payload: {\r\n key: 'shippingAddress',\r\n data: {\r\n [propName]: value,\r\n },\r\n },\r\n});\r\n\r\nexport const setSelectedCompanyAddress = (selectedCompanyAddressId) => ({\r\n type: CHECKOUT_SET_SELECTED_COMPANY_ADDRESS,\r\n payload: {\r\n selectedCompanyAddressId,\r\n },\r\n});\r\n\r\nexport const setSelectedShippingAddress = (selectedShippingAddressId) => ({\r\n type: CHECKOUT_SET_SELECTED_SHIPPING_ADDRESS,\r\n payload: {\r\n selectedShippingAddressId,\r\n },\r\n});\r\n\r\nexport const setDropShipping = (dropShipping) => (\r\n dispatch,\r\n getState\r\n) => {\r\n dispatch({\r\n type: CHECKOUT_SET_SELECTED_SHIPPING_TYPE,\r\n payload: {\r\n dropShipping,\r\n },\r\n });\r\n const { payload } = getState().checkout;\r\n return post(`${rootRoute}/shippingtype`, payload).catch((ex) =>\r\n dispatch(catchError(ex, (error) => submitError(error)))\r\n );\r\n};\r\n\r\nexport const setDelivery = (method) => (dispatch, getState) => {\r\n dispatch({\r\n type: CHECKOUT_SET_DELIVERY,\r\n payload: {\r\n selectedDeliveryMethod: method,\r\n },\r\n });\r\n const { payload } = getState().checkout;\r\n return put('/api/checkout/setDeliveryProvider', payload)\r\n .then((response) => response.json())\r\n .then((result) => {\r\n dispatch(loadCart());\r\n if (result !== null && result.paymentWidget) {\r\n dispatch(setPaymentWidget(result.paymentWidget));\r\n }\r\n })\r\n .catch((ex) => dispatch(catchError(ex, (error) => submitError(error))));\r\n};\r\n\r\nexport const setCountry = (systemId) => (dispatch, getState) => {\r\n dispatch({\r\n type: CHECKOUT_SET_COUNTRY,\r\n payload: {\r\n selectedCountry: systemId,\r\n },\r\n });\r\n const { payload } = getState().checkout;\r\n\r\n // reset paymentWidget to null to avoid sending unnecessary request to payment provider\r\n dispatch(setPaymentWidget(null));\r\n\r\n return put('/api/checkout/setCountry', payload)\r\n .then((response) => response.json())\r\n .then((result) => {\r\n dispatch(loadCart());\r\n dispatch(setPaymentWidget(result.paymentWidget));\r\n dispatch({\r\n type: CHECKOUT_SET_DELIVERY,\r\n payload: {\r\n deliveryMethods: result.deliveryMethods,\r\n selectedDeliveryMethod: result.selectedDeliveryMethod,\r\n },\r\n });\r\n dispatch({\r\n type: CHECKOUT_SET_PAYMENT,\r\n payload: {\r\n paymentMethods: result.paymentMethods,\r\n selectedPaymentMethod: result.selectedPaymentMethod,\r\n },\r\n });\r\n })\r\n .catch((ex) => dispatch(catchError(ex, (error) => submitError(error))));\r\n};\r\n\r\nexport const setPayment = (method) => (dispatch, getState) => {\r\n dispatch({\r\n type: CHECKOUT_SET_PAYMENT,\r\n payload: {\r\n selectedPaymentMethod: method,\r\n },\r\n });\r\n const { payload } = getState().checkout;\r\n // reset paymentWidget to null to avoid sending unnecessary request to payment provider\r\n dispatch(setPaymentWidget(null));\r\n // reset payment error on the checkout\r\n dispatch(\r\n submitError({\r\n modelState: {\r\n payment: [],\r\n },\r\n })\r\n );\r\n return put('/api/checkout/setPaymentProvider', payload)\r\n .then((response) => response.json())\r\n .then((result) => {\r\n dispatch(loadCart());\r\n dispatch(setPaymentWidget(result.paymentWidget));\r\n })\r\n .catch((ex) => dispatch(catchError(ex, (error) => submitError(error))));\r\n};\r\n\r\nexport const reloadPayment = () => (dispatch, getState) => {\r\n const { payload } = getState().checkout;\r\n return put('/api/checkout/reloadPaymentWidget', payload)\r\n .then((response) => response.json())\r\n .then((result) => {\r\n if (result && result.paymentWidget) {\r\n dispatch(setPaymentWidget(result.paymentWidget));\r\n }\r\n })\r\n .catch((ex) => dispatch(catchError(ex, (error) => submitError(error))));\r\n};\r\n\r\nconst setPaymentWidget = (paymentWidget) => ({\r\n type: CHECKOUT_SET_PAYMENT_WIDGET,\r\n payload: {\r\n paymentWidget,\r\n },\r\n});\r\n\r\n\r\nexport const setOrderNote = (orderNote) => ({\r\n type: CHECKOUT_SET_ORDER_NOTE,\r\n payload: {\r\n orderNote,\r\n },\r\n});\r\n\r\nexport const acceptTermsOfCondition = (acceptTermsOfCondition) => ({\r\n type: CHECKOUT_ACCEPT_TERMS_OF_CONDITION,\r\n payload: {\r\n acceptTermsOfCondition,\r\n },\r\n});\r\nexport const userSubscribe = (userSubscribe) => ({\r\n type: CHECKOUT_USER_SUBSCRIBE,\r\n payload: {\r\n userSubscribe,\r\n },\r\n});\r\n\r\nexport const setDiscountCode = (discountCode) => ({\r\n type: CHECKOUT_SET_DISCOUNT_CODE,\r\n payload: {\r\n discountCode,\r\n },\r\n});\r\n\r\nexport const submitDiscountCode = () => (dispatch, getState) => {\r\n const { payload } = getState().checkout;\r\n return put('/api/checkout/setDiscountCode', payload)\r\n .then((response) => response.json())\r\n .then((result) => {\r\n dispatch(setUsedDiscountCodes(result.usedDiscountCodes));\r\n dispatch(loadCart());\r\n dispatch(setPaymentWidget(result.paymentWidget));\r\n beginCheckoutEvent();\r\n // reset error of campaign code\r\n dispatch(\r\n submitError({\r\n modelState: {\r\n discountCode: [],\r\n },\r\n })\r\n );\r\n })\r\n .catch((ex) => {\r\n dispatch(catchError(ex, (error) => submitError(error)));\r\n // restore the initial cart\r\n dispatch(loadCart());\r\n });\r\n};\r\n\r\nexport const deleteDiscountCode = (discountCode) => (dispatch, getState) => {\r\n const { payload } = getState().checkout;\r\n payload.discountCode = discountCode;\r\n return remove('/api/checkout/deleteDiscountCode', payload)\r\n .then((response) => response.json())\r\n .then((result) => {\r\n dispatch(setUsedDiscountCodes(result.usedDiscountCodes));\r\n dispatch(loadCart());\r\n dispatch(setPaymentWidget(result.paymentWidget));\r\n dispatch(setDiscountCode(''));\r\n // reset error of campaign code\r\n dispatch(\r\n submitError({\r\n modelState: {\r\n discountCode: [],\r\n },\r\n })\r\n );\r\n })\r\n .catch((ex) => {\r\n dispatch(catchError(ex, (error) => submitError(error)));\r\n // restore the initial cart\r\n dispatch(loadCart());\r\n });\r\n};\r\n\r\nconst setUsedDiscountCodes = (usedDiscountCodes) => ({\r\n type: CHECKOUT_SET_USED_DISCOUNT_CODE,\r\n payload: {\r\n usedDiscountCodes,\r\n },\r\n});\r\n\r\nexport const submit = () => (dispatch, getState) => {\r\n const { payload } = getState().checkout;\r\n return _submit('/api/checkout', payload, dispatch);\r\n};\r\n\r\nexport const SaveShippingType = async () => {\r\n try {\r\n const { payload } = getState().checkout;\r\n const response = await post(`${rootRoute}/set-shippingtype-additionalinfo`, { payload });\r\n\r\n } catch (error) {\r\n console.error(error);\r\n }\r\n};\r\n\r\nconst _submit = (url, model, dispatch) => {\r\n return post(url, model)\r\n .then((response) => response.json())\r\n .then((result) => {\r\n dispatch(submitDone(result));\r\n })\r\n .catch((ex) => {\r\n if (ex.response) {\r\n ex.response.json().then((error) => {\r\n dispatch(submitError(error));\r\n dispatch(submitDone(null));\r\n // reload the cart, it might be changed after validation\r\n dispatch(loadCart());\r\n });\r\n } else {\r\n dispatch(submitError(ex));\r\n }\r\n dispatch(setStatusSubmitButton(true));\r\n });\r\n};\r\n\r\nexport const saveCustomerDetail = (data) => (dispatch, getState) => {\r\n const { payload } = getState().checkout;\r\n const updatedData = { ...payload, ...data };\r\n return put('/api/checkout/setCustomerDetail', updatedData)\r\n .then((response) => response.json())\r\n .then(() => dispatch(setStatusSubmitButton(true)))\r\n .catch((ex) => {\r\n if (ex.response) {\r\n ex.response.json().then((error) => {\r\n dispatch(submitError(error));\r\n dispatch(setStatusSubmitButton(false));\r\n });\r\n } else {\r\n dispatch(submitError(ex));\r\n }\r\n throw ex;\r\n });\r\n};\r\n\r\nexport const clearError = () => ({\r\n type: CLEAR_ERROR,\r\n payload: {\r\n errors: [],\r\n },\r\n});\r\n\r\nexport const submitDone = (result) => ({\r\n type: CHECKOUT_SUBMIT,\r\n payload: {\r\n result,\r\n },\r\n});\r\n\r\nexport const submitError = (error) => ({\r\n type: CHECKOUT_SUBMIT_ERROR,\r\n payload: {\r\n error,\r\n },\r\n});\r\n\r\nexport const setStatusSubmitButton = (value) => ({\r\n type: CHECKOUT_SET_STATUS_SUBMIT_BUTTON,\r\n payload: {\r\n enableConfirmButton: value,\r\n },\r\n});\r\n\r\nexport const setShowAlternativeAddress = (showAlternativeAddress) => ({\r\n type: CHECKOUT_SET_SHOW_ALTERNATIVE_ADDRESS,\r\n payload: {\r\n showAlternativeAddress,\r\n },\r\n});\r\nexport const setValidateStatus = (isValidating) => ({\r\n type: CHECKOUT_VALIDATE_ADDRESS,\r\n payload: {\r\n isValidating,\r\n },\r\n});\r\n","import React from 'react';\r\nimport { useCallback } from 'react';\r\nconst Button = ({\r\n onClick,\r\n title,\r\n disabled = false,\r\n type = 'button',\r\n className,\r\n}) => {\r\n return (\r\n <button\r\n className={className}\r\n onClick={onClick}\r\n disabled={disabled}\r\n type={type}\r\n >\r\n {title}\r\n </button>\r\n );\r\n};\r\nexport default Button;\r\n","import React from 'react';\r\nimport { translate } from '../Services/translation';\r\nconst ComplimentaryProducts = ({ complimentary }) => {\r\n return (\r\n complimentary && complimentary.length > 0 &&\r\n <div>\r\n {translate('checkout.complimentaryproduct')}\r\n {/* *TODO: modify styles in MidaqTheme/productHorizontalList.scss */}\r\n <div className=\"row product__vertical-list\">\r\n <ul className=\"product__vertical-list-container\">\r\n {complimentary &&\r\n complimentary.map((product, index) => (\r\n <li className=\"product__vertical-list-item\" key={index}>\r\n <div className=\"product__vertical-list-price-container\" >\r\n <div className=\"product__vertical-list-img-container\">\r\n <img src={product.imageUrl} />\r\n </div>\r\n <div className=\"product__vertical-list-info-container\">\r\n <a href={product.url}>\r\n <span className=\"product__vertical-list-name\">{product.name}</span>\r\n <span className=\"product__vertical-list-price\">\r\n {\r\n (product.price != undefined && product.price.campaignPrice != undefined || '') &&\r\n <div>\r\n <span className=\"product__campaign-price\">\r\n {product.price.formattedCampaignPrice}\r\n </span> \r\n <span className=\"product__old-price\">\r\n {product.price.formattedPrice}\r\n </span>\r\n </div>\r\n }\r\n {product.price != undefined && product.price.campaignPrice == undefined &&\r\n <div>\r\n <span className=\"product__campaign-price\">\r\n {product.price.formattedPrice}\r\n </span>\r\n </div>\r\n }\r\n </span>\r\n </a>\r\n </div>\r\n </div>\r\n <div className=\"product__vertical-list-button-container\">\r\n <button className=\"button-pill button-pill--primary\" onClick={() => {\r\n location.href = product.url\r\n }} >Visa</button>\r\n </div>\r\n </li>\r\n ))\r\n }\r\n </ul>\r\n </div>\r\n </div>\r\n );\r\n};\r\nexport default ComplimentaryProducts;\r\n","import React, { useState, Fragment, useCallback, useEffect } from 'react';\r\nimport { translate } from '../../Services/translation';\r\nimport { useDispatch, useSelector } from 'react-redux';\r\nimport {\r\n reloadPayment,\r\n //upgrade8.7 submitRequest,\r\n submitDone,\r\n} from '../../Actions/Checkout.action';\r\nimport { update, loadError, reloadIngrid } from '../../Actions/Cart.action';\r\nimport { beginCheckoutEvent, removeFromCartEvent } from '../../Actions/Gtm.action';\r\nimport CoreComplimentaryProducts from '../ComplimentaryProducts';\r\n//upgrade8.7 import * as debounce from 'lodash.debounce';\r\nimport { debounce } from 'lodash-es';\r\nimport { catchError } from '../../Actions/Error.action';\r\n\r\nconst mapCartToAbort = {};\r\n\r\nconst quantityDispatch = debounce((articleNumber, quantity, dispatch) => {\r\n mapCartToAbort[articleNumber] = new AbortController();\r\n dispatch(update(articleNumber, quantity, mapCartToAbort[articleNumber]))\r\n .then(() => {\r\n dispatch(reloadPayment());\r\n dispatch(reloadIngrid());\r\n beginCheckoutEvent();\r\n })\r\n .catch((ex) => dispatch(catchError(ex, (error) => loadError(error))));\r\n}, 500);\r\n\r\nconst Cart = () => {\r\n const dispatch = useDispatch();\r\n const [removingRow, setRemovingRow] = useState({});\r\n const [showProductsInPackage, setShowProductsInPackage] = useState({});\r\n const cart = useSelector((state) => state.cart);\r\n const [orderRows, setOrderRows] = useState(cart?.orderRows);\r\n const { discountRows } = cart;\r\n const { complimentaryProducts } = cart;\r\n useEffect(() => {\r\n setOrderRows(cart?.orderRows);\r\n }, [cart]);\r\n\r\n const removeOrderRow = useCallback(\r\n (articleNumber) =>\r\n dispatch(update(articleNumber, 0)).then(() => {\r\n dispatch(reloadPayment());\r\n dispatch(reloadIngrid());\r\n beginCheckoutEvent();\r\n }\r\n )[dispatch]\r\n );\r\n\r\n const errorQuantity = (articleNumber, errorName) => {\r\n document.getElementById(articleNumber).innerText = errorName;\r\n // //upgrade8.7 dispatch(submitRequest());\r\n };\r\n const handleQuantityInput = useCallback(\r\n (\r\n articleNumber,\r\n quantity,\r\n minimumQuantity,\r\n maximumQuantity,\r\n quantityStepping,\r\n rowSystemId,\r\n ensureCorrectness = true\r\n ) => {\r\n const re = /^[0-9\\b]+$/;\r\n if (quantity === '' || re.test(quantity)) {\r\n // In case of onBlur event, we need ensureCorrectness as true in order to ensure if the value is a valid float number\r\n // In case of onChange event, we accept invalid float number, but we don't send any request to the server.\r\n //upgrade8.7 mapCartToAbort[articleNumber] && mapCartToAbort[articleNumber].abort();\r\n quantityDispatch && quantityDispatch.cancel();\r\n\r\n let floatQuantity = parseFloat(quantity);\r\n let validValue = !isNaN(floatQuantity) && floatQuantity > 0;\r\n if (ensureCorrectness) {\r\n quantity = validValue ? floatQuantity : 1;\r\n floatQuantity = quantity;\r\n validValue = true;\r\n }\r\n document.getElementById(articleNumber).innerText = '';\r\n if (\r\n parseInt(minimumQuantity) > 0 &&\r\n parseInt(floatQuantity) < parseInt(minimumQuantity)\r\n ) {\r\n errorQuantity(\r\n articleNumber,\r\n translate('product.minimumquantity') +\r\n ' ' +\r\n minimumQuantity\r\n );\r\n } else if (\r\n parseInt(maximumQuantity) > 0 &&\r\n parseInt(floatQuantity) > parseInt(maximumQuantity)\r\n ) {\r\n errorQuantity(\r\n articleNumber,\r\n translate('product.maximumquantity') +\r\n ' ' +\r\n maximumQuantity\r\n );\r\n } else if (\r\n parseInt(quantityStepping) > 0 &&\r\n parseInt(floatQuantity) % parseInt(quantityStepping) !== 0\r\n ) {\r\n var addQty =\r\n parseInt(floatQuantity) % parseInt(quantityStepping);\r\n errorQuantity(\r\n articleNumber,\r\n translate('product.multiplequantity') +\r\n ' ' +\r\n quantityStepping +\r\n ' add ' +\r\n addQty\r\n );\r\n } else {\r\n dispatch(submitDone());\r\n }\r\n const index = orderRows.findIndex(\r\n (item) => item.rowSystemId === rowSystemId\r\n );\r\n const oldQuantity = parseFloat(orderRows[index].quantity);\r\n if (floatQuantity !== oldQuantity) {\r\n mapCartToAbort[articleNumber] &&\r\n mapCartToAbort[articleNumber].abort();\r\n quantityDispatch && quantityDispatch.cancel();\r\n validValue &&\r\n quantityDispatch(articleNumber, quantity, dispatch);\r\n }\r\n const tempOrderRows = [...orderRows];\r\n tempOrderRows[index] = {\r\n ...tempOrderRows[index],\r\n quantity,\r\n };\r\n setOrderRows(tempOrderRows);\r\n }\r\n },\r\n [dispatch, orderRows]\r\n );\r\n\r\n const ProductImage = useCallback(({ order }) => {\r\n return (\r\n <img\r\n className=\"checkout-cart__image\"\r\n src={order.image}\r\n alt={order.name}\r\n />\r\n );\r\n }, []);\r\n\r\n const ProductName = useCallback(({ order }) => {\r\n return (\r\n <Fragment>\r\n <a href={order.url}>{order.name}</a>\r\n <span className=\"checkout-cart__art-nr\">\r\n {translate('order.articlenumber')} {order.articleNumber}\r\n </span>\r\n {order.bundleVariants && order.bundleVariants.length > 0 &&\r\n <div className=\"checkout-cart__package\">\r\n <a\r\n role=\"button\"\r\n className=\"checkout-cart__package-label\"\r\n onClick={() =>\r\n setShowProductsInPackage({\r\n ...showProductsInPackage,\r\n [order.rowSystemId]: !showProductsInPackage[order.rowSystemId],\r\n })\r\n }\r\n >{translate('product.packages.label')}\r\n <span className={`checkout-cart__package-label-icon ${showProductsInPackage[order.rowSystemId] ? \"checkout-cart__package-label-icon--open\" : \"\"}`}></span>\r\n </a>\r\n {showProductsInPackage[order.rowSystemId] &&\r\n order.bundleVariants.map((value, key) => {\r\n return (\r\n <span className='checkout-cart__package-item' key={key} >{value}</span>\r\n );\r\n })\r\n }\r\n </div >\r\n }\r\n <span className=\"checkout-cart__brand-name\">{order.brand}</span>\r\n </Fragment >\r\n );\r\n }, [showProductsInPackage]);\r\n\r\n const Complimentary = useCallback(({ order }) => {\r\n const cartProductComplimentary = complimentaryProducts.filter((x) => {\r\n return x.complimentaryBaseArticleNumber == order.articleNumber;\r\n });\r\n return (\r\n <Fragment>\r\n <CoreComplimentaryProducts\r\n complimentary={cartProductComplimentary}\r\n />\r\n </Fragment>\r\n );\r\n }, []);\r\n\r\n const ProductPrice = useCallback(({ order }) => {\r\n return (\r\n <Fragment>\r\n {order.campaignPrice ? (\r\n <Fragment>\r\n <div className=\"checkout-cart__campaign-price\">\r\n {order.campaignPrice}\r\n </div>\r\n <div className=\"checkout-cart__original-price\">\r\n {' '}\r\n ({order.price})\r\n </div>\r\n </Fragment>\r\n ) : (\r\n order.price\r\n )}\r\n </Fragment>\r\n );\r\n }, []);\r\n\r\n const ProductQuantity = useCallback(\r\n (order) => {\r\n return (\r\n <Fragment>\r\n {order.isFreeGift ? (\r\n <div>{order.quantity}</div>\r\n ) : (\r\n <div className=\"checkout-flex\">\r\n <input\r\n className=\"checkout-cart__input\"\r\n type=\"number\"\r\n id={order.rowSystemId}\r\n min={\r\n order.minimumQuantity > 0\r\n ? order.minimumQuantity\r\n : 1\r\n }\r\n maxLength={3}\r\n max={\r\n order.maximumQuantity > 0\r\n ? order.maximumQuantity\r\n : 999\r\n }\r\n value={order.quantity.toString()}\r\n step={\r\n order.quantityStepping > 0\r\n ? order.quantityStepping\r\n : 1\r\n }\r\n onChange={(event) =>\r\n handleQuantityInput(\r\n order.articleNumber,\r\n event.target.value,\r\n order.minimumQuantity,\r\n order.maximumquantity,\r\n order.quantitystepping,\r\n order.rowSystemId,\r\n false\r\n )\r\n }\r\n onBlur={(event) =>\r\n handleQuantityInput(\r\n order.articleNumber,\r\n event.target.value,\r\n order.minimumQuantity,\r\n order.maximumQuantity,\r\n order.quantityStepping,\r\n order.rowSystemId\r\n )\r\n }\r\n />\r\n <span\r\n id={order.articleNumber}\r\n className=\"quantity-error\"\r\n ></span>\r\n </div>\r\n )}\r\n </Fragment>\r\n );\r\n },\r\n [handleQuantityInput]\r\n );\r\n\r\n const ProductTotalPrice = ({ order }) => {\r\n return (\r\n <Fragment>\r\n {order.totalCampaignPrice ? (\r\n <Fragment>\r\n <div className=\"checkout-cart__campaign-price\">\r\n {order.totalCampaignPrice}\r\n </div>\r\n <div className=\"checkout-cart__original-price\">\r\n {' '}\r\n ({order.totalPrice})\r\n </div>\r\n </Fragment>\r\n ) : (\r\n order.totalPrice\r\n )}\r\n </Fragment>\r\n );\r\n };\r\n\r\n const RemoveBtn = useCallback(\r\n ({ order }) => {\r\n return (\r\n <Fragment>\r\n {!order.isFreeGift && !removingRow[order.rowSystemId] && (\r\n <a\r\n className=\"table__icon table__icon--delete\"\r\n onClick={() =>\r\n setRemovingRow({\r\n ...removingRow,\r\n [order.rowSystemId]: true,\r\n })\r\n }\r\n title={translate('general.remove')}\r\n ></a>\r\n )}\r\n {!order.isFreeGift && removingRow[order.rowSystemId] && (\r\n <Fragment>\r\n <a\r\n className=\"table__icon table__icon--accept\"\r\n onClick={async () => {\r\n await removeFromCartEvent(\r\n order.articleNumber\r\n );\r\n removeOrderRow(order.articleNumber);\r\n }}\r\n title={translate('general.ok')}\r\n ></a>\r\n <a\r\n className=\"table__icon table__icon--cancel\"\r\n onClick={() =>\r\n setRemovingRow({\r\n ...removingRow,\r\n [order.rowSystemId]: false,\r\n })\r\n }\r\n title={translate('general.cancel')}\r\n ></a>\r\n </Fragment>\r\n )}\r\n </Fragment>\r\n );\r\n },\r\n [removeOrderRow, removingRow]\r\n );\r\n\r\n const CartTotal = useCallback(({ cart }) => {\r\n return (\r\n <h3 className=\"text--right\">\r\n {translate('checkout.cart.total')}: {cart.orderTotal}\r\n </h3>\r\n );\r\n }, []);\r\n\r\n return (\r\n <div className=\"row checkout__container\">\r\n <div className=\"checkout-column small-12\">\r\n <div className=\"simple-table hide-for-small-only\">\r\n <div className=\"row small-unstack no-margin\">\r\n <div className=\"columns small-12 medium-4 large-5\"></div>\r\n <div className=\"columns small-3 medium-2 large-2\">\r\n {translate('checkout.cart.header.price')}\r\n </div>\r\n <div className=\"columns small-4 medium-2 large-2\">\r\n {translate('checkout.cart.header.quantity')}\r\n </div>\r\n <div className=\"columns small-5 medium-3 large-3\">\r\n {translate('checkout.cart.header.total')}\r\n </div>\r\n </div>\r\n {orderRows.map((order, index) => (\r\n <div\r\n className=\"row small-unstack no-margin checkout-cart__row\"\r\n key={order.rowSystemId}\r\n >\r\n <div className=\"columns small-12 medium-4 large-5 checkout-cart__image-container checkout-cart__column\">\r\n <div className=\"checkout-cart__image-wrapper\">\r\n <ProductImage key={'checkout-cart-row-image' + index} order={order} />\r\n </div>\r\n <div className=\"checkout-cart__image-info checkout-cart__column\">\r\n <ProductName key={'checkout-cart-row-info' + index} order={order} />\r\n </div>\r\n </div>\r\n <div className=\"columns small-3 medium-2 large-2 simple-table__cell--no-break-word checkout-cart__column\">\r\n <ProductPrice order={order} />\r\n </div>\r\n <div className=\"columns checkout-flex small-2 medium-2 large-2 checkout-cart__column\">\r\n {ProductQuantity(order)}\r\n </div>\r\n <div className=\"checkout-cart__total-price columns small-2 medium-3 large-2 simple-table__cell--no-break-word checkout-cart__column\">\r\n <ProductTotalPrice order={order} />\r\n </div>\r\n <div className=\"columns small-3 medium-1 large-1 checkout-cart__column checkout-cart__column--remove\">\r\n <RemoveBtn order={order} />\r\n </div>\r\n {/* <div className='row'>\r\n <Complimentary order={order} />\r\n </div> */}\r\n </div>\r\n ))}\r\n <div className=\"row small-unstack no-margin checkout-cart__row\">\r\n <div className=\"columns\">\r\n <CartTotal cart={cart} />\r\n </div>\r\n </div>\r\n </div>\r\n <div className=\"small-12 simple-table checkout-mobile show-for-small-only\">\r\n {orderRows.map((order, index) => (\r\n <div className=\"row no-margin\" key={order.rowSystemId}>\r\n <div className=\"columns small-3\">\r\n <ProductImage order={order} />\r\n </div>\r\n <div className=\"columns small-9\">\r\n <div className=\"row\">\r\n <div className=\"small-8 columns\">\r\n <div className=\"flex-container flex-dir-column align-center\">\r\n <ProductName key={'checkout-cart-row-mobile' + index} order={order} />\r\n </div>\r\n </div>\r\n <div className=\"small-4 columns flex-container align-right\">\r\n <RemoveBtn order={order} />\r\n </div>\r\n </div>\r\n <div className=\"row\">\r\n <div className=\"small-12 columns flex-container align-justify\">\r\n <div>\r\n <ProductPrice order={order} />\r\n </div>\r\n <div>{ProductQuantity(order)}</div>\r\n </div>\r\n </div>\r\n <div className=\"row\">\r\n <div className=\"checkout-cart__total-price small-12 columns text--right\">\r\n <ProductTotalPrice order={order} />\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n ))}\r\n {discountRows.map((order, index) => (\r\n <div className=\"row no-margin\" key={order.rowSystemId}>\r\n <div className=\"columns\">\r\n <div>\r\n <ProductName key={'checkout-cart-norow' + index} order={order} />\r\n </div>\r\n <div className=\"checkout-cart__total-price text--right\">\r\n <ProductTotalPrice order={order} />\r\n </div>\r\n </div>\r\n </div>\r\n ))}\r\n <div className=\"row no-margin\">\r\n <div className=\"columns\">\r\n <CartTotal cart={cart} />\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n );\r\n};\r\n\r\nexport default Cart;\r\n","import React, { Fragment } from 'react';\r\nimport Cart from './Cart';\r\nimport { translate } from '../../Services/translation';\r\n\r\nconst CheckoutCart = ({ errors }) => {\r\n return (\r\n <Fragment>\r\n <div className=\"row\">\r\n <div className=\"small-12\">\r\n <h2 className=\"checkout__title\">\r\n {translate('checkout.title')}\r\n </h2>\r\n </div>\r\n </div>\r\n <div className=\"row\">\r\n <div className=\"columns checkout-column small-12\">\r\n <h3 className=\"checkout__section-title\">\r\n {translate('checkout.cart.title')}\r\n </h3>\r\n </div>\r\n </div>\r\n <div className=\"row\">\r\n {errors && errors['cart'] && (\r\n <p className=\"checkout__validator--error\">\r\n {errors['cart'][0]}\r\n </p>\r\n )}\r\n </div>\r\n {<div className=\"row\">\r\n <div className=\"columns small-12\">\r\n {window.__litium.preloadState.checkout.errors && window.__litium.preloadState.checkout.errors['cart'] && (\r\n <p className=\"checkout__validator--error\">\r\n {window.__litium.preloadState.checkout.errors['cart'][0]}\r\n </p>\r\n )}\r\n </div>\r\n </div>\r\n }\r\n <Cart />\r\n </Fragment>\r\n );\r\n};\r\n\r\nexport default CheckoutCart;\r\n","import React from 'react';\r\n\r\nconst InputField = ({\r\n cssClass,\r\n name,\r\n id,\r\n autoComplete = null,\r\n placeholder = null,\r\n type = 'text',\r\n maxLength = 200,\r\n disabled,\r\n onChange,\r\n value,\r\n label,\r\n errors,\r\n}) => {\r\n return (\r\n <div className={cssClass}>\r\n <label className=\"form__label\" htmlFor={id}>\r\n {label}\r\n </label>\r\n <input\r\n className=\"form__input\"\r\n disabled={disabled}\r\n id={id}\r\n name={name}\r\n type={type}\r\n value={value}\r\n placeholder={placeholder}\r\n autoComplete={autoComplete}\r\n onChange={(event) => onChange(event.target.value)}\r\n maxLength={maxLength}\r\n />\r\n {errors[id] && (\r\n <span\r\n className=\"form__validator--error form__validator--top-narrow\"\r\n data-error-for={id}\r\n >\r\n {errors[id][0]}\r\n </span>\r\n )}\r\n </div>\r\n );\r\n};\r\n\r\nexport default InputField;\r\n","import React, { Fragment } from 'react';\r\n\r\nfunction InfoField({ values }) {\r\n return (\r\n <div className=\"small-12 medium-12 columns info-field\">\r\n {values.map((item, idx) => (\r\n <Fragment key={idx}>\r\n <span>{item}</span> \r\n </Fragment>\r\n ))}\r\n </div>\r\n );\r\n}\r\n\r\nexport default InfoField;\r\n","import React, { Fragment, useMemo } from 'react';\r\nimport { useSelector } from 'react-redux';\r\nimport constants from '../constants';\r\nimport { translate } from '../Services/translation';\r\nimport InputField from './InputField';\r\nimport InfoField from './InfoField';\r\nimport Button from './Button';\r\n\r\nconst getCountry = (address) => {\r\n const addressCountry = constants.countries\r\n ? constants.countries.find(\r\n (country) => country.value === address.country\r\n )\r\n : null;\r\n return addressCountry ? addressCountry.text : address.country;\r\n};\r\n\r\nconst CheckoutBusinessCustomerInfo = ({\r\n onChange,\r\n onSave,\r\n onCompanyAddressChange,\r\n valueForm,\r\n isEditingAddress,\r\n}) => {\r\n const { payload, errors = {} } = useSelector((state) => state.checkout);\r\n const { companyAddresses = [], companyName, authenticated } = payload;\r\n\r\n const input = (\r\n cssClass,\r\n stateKey,\r\n id,\r\n autoComplete = 'on',\r\n type = 'text'\r\n ) => (\r\n <InputField\r\n cssClass={cssClass}\r\n id={`${stateKey}-${id}`}\r\n name={`${stateKey}-${id}`}\r\n autoComplete={autoComplete}\r\n disabled={!authenticated}\r\n value={(valueForm[stateKey] || {})[id] || ''}\r\n onChange={(value) => onChange(stateKey, id, value)}\r\n label={translate(`checkout.customerinfo.${id.toLowerCase()}`)}\r\n errors={errors}\r\n type={type}\r\n />\r\n );\r\n\r\n const selectedAddress = useMemo(() => {\r\n return valueForm.selectedCompanyAddressId && companyAddresses\r\n ? companyAddresses.find(\r\n (address) =>\r\n address.systemId === valueForm.selectedCompanyAddressId\r\n )\r\n : null;\r\n }, [valueForm.selectedCompanyAddressId, companyAddresses]);\r\n\r\n const formattedAddress = (address) => {\r\n return [\r\n address.address,\r\n address.zipCode,\r\n address.city,\r\n getCountry(address),\r\n ]\r\n .filter((x) => !!x)\r\n .join(', ');\r\n };\r\n\r\n return (\r\n <div className=\"row checkout-info__container\">\r\n {isEditingAddress ? (\r\n <Fragment>\r\n <div className=\"small-12 medium-6 checkout-column-left columns\">\r\n <div className=\"row-inner\">\r\n {input(\r\n 'small-6 columns',\r\n 'customerDetails',\r\n 'firstName',\r\n 'billing given-name'\r\n )}\r\n\r\n {input(\r\n 'small-6 columns',\r\n 'customerDetails',\r\n 'lastName',\r\n 'billing family-name'\r\n )}\r\n </div>\r\n <div className=\"row-inner\">\r\n {input(\r\n 'small-12 columns',\r\n 'customerDetails',\r\n 'phoneNumber',\r\n 'billing tel',\r\n 'tel'\r\n )}\r\n </div>\r\n <div className=\"row-inner\">\r\n {input(\r\n 'small-12 columns',\r\n 'customerDetails',\r\n 'email',\r\n 'email',\r\n 'email'\r\n )}\r\n </div>\r\n </div>\r\n <div className=\"small-12 medium-6 columns checkout-column-right\">\r\n <div className=\"row-inner\">\r\n <div className=\"small-12 columns\">\r\n <label\r\n className=\"form__label\"\r\n htmlFor=\"address\"\r\n >\r\n {translate('checkout.customerinfo.address')}\r\n </label>\r\n\r\n <select\r\n className=\"form__input\"\r\n value={\r\n valueForm.selectedCompanyAddressId || ''\r\n }\r\n disabled={!authenticated}\r\n onChange={(event) =>\r\n onCompanyAddressChange(\r\n event.target.value,\r\n companyAddresses.find(\r\n (address) =>\r\n address.systemId ===\r\n event.target.value\r\n ).country\r\n )\r\n }\r\n >\r\n <option value=\"\" disabled>\r\n {translate(\r\n 'checkout.customerinfo.companyaddress.placeholder'\r\n )}\r\n </option>\r\n {companyAddresses &&\r\n companyAddresses.map((address) => (\r\n <option\r\n value={address.systemId}\r\n key={`companyAddress-${address.systemId}`}\r\n >\r\n {formattedAddress(address)}\r\n </option>\r\n ))}\r\n </select>\r\n {errors['selectedCompanyAddressId'] && (\r\n <span\r\n className=\"form__validator--error form__validator--top-narrow\"\r\n data-error-for=\"selectedCompanyAddressId\"\r\n >\r\n {errors['selectedCompanyAddressId'][0]}\r\n </span>\r\n )}\r\n </div>\r\n </div>\r\n {selectedAddress && (\r\n <div className=\"row-inner\">\r\n <div className=\"small-12 columns\">\r\n {companyName}\r\n </div>\r\n <div className=\"small-12 columns\">\r\n {selectedAddress.address}\r\n </div>\r\n <div className=\"small-12 columns\">\r\n {selectedAddress.zipCode && (\r\n <span>{selectedAddress.zipCode}</span>\r\n )}\r\n \r\n {selectedAddress.city && (\r\n <span>{selectedAddress.city}</span>\r\n )}\r\n </div>\r\n <div className=\"small-12 columns\">\r\n {getCountry(selectedAddress)}\r\n </div>\r\n </div>\r\n )}\r\n </div>\r\n <div className=\"small-12 columns flex-container align-right\">\r\n <Button\r\n onClick={onSave}\r\n title={translate('checkout.continue')}\r\n className={\"button checkout__continue-button\"}\r\n />\r\n </div>\r\n </Fragment>\r\n ) : (\r\n <Fragment>\r\n <InfoField\r\n values={[\r\n valueForm['customerDetails']['firstName'],\r\n valueForm['customerDetails']['lastName'],\r\n ]}\r\n />\r\n <InfoField values={[companyName]} />\r\n <InfoField values={[selectedAddress.address]} />\r\n <InfoField\r\n values={[selectedAddress.zipCode, selectedAddress.city]}\r\n />\r\n <InfoField values={[getCountry(selectedAddress)]} />\r\n <InfoField\r\n values={[valueForm['customerDetails']['phoneNumber']]}\r\n />\r\n <InfoField\r\n values={[valueForm['customerDetails']['email']]}\r\n />\r\n </Fragment>\r\n )}\r\n </div>\r\n );\r\n};\r\n\r\nexport default CheckoutBusinessCustomerInfo;\r\nexport { getCountry };\r\n","import React from 'react';\r\nimport { useSelector, useDispatch } from 'react-redux';\r\nimport constants from '../constants';\r\nimport { translate } from '../Services/translation';\r\nimport {\r\n setSignUp,\r\n setShowAlternativeAddress,\r\n} from '../Actions/Checkout.action';\r\nimport InputField from './InputField';\r\nimport { Fragment } from 'react';\r\nimport InfoField from './InfoField';\r\nimport { getCountry } from './Checkout.BusinessCustomerInfo';\r\nimport Button from './Button';\r\n\r\nconst CheckoutPrivateCustomerInfo = ({\r\n onChange,\r\n onSave,\r\n valueForm,\r\n isEditingAddress,\r\n signUpCheckboxVisibility,\r\n}) => {\r\n const dispatch = useDispatch();\r\n const { payload, errors = {} } = useSelector((state) => state.checkout);\r\n const { authenticated, signUp, isValidating } = payload;\r\n const { customerDetails = {}, alternativeAddress = {} } = valueForm;\r\n\r\n const input = (\r\n cssClass,\r\n stateKey,\r\n id,\r\n autoComplete = 'on',\r\n placeholder = null,\r\n type = 'text',\r\n maxLength = 200\r\n ) => (\r\n <InputField\r\n cssClass={cssClass}\r\n id={`${stateKey}-${id}`}\r\n name={`${stateKey}-${id}`}\r\n autoComplete={autoComplete}\r\n value={(valueForm[stateKey] || {})[id] || ''}\r\n onChange={(value) => onChange(stateKey, id, value)}\r\n label={translate(`checkout.customerinfo.${id.toLowerCase()}`)}\r\n errors={errors}\r\n placeholder={placeholder}\r\n type={type}\r\n maxLength={maxLength}\r\n />\r\n );\r\n\r\n return (\r\n <div className=\"row checkout-info__container\">\r\n {isEditingAddress ? (\r\n <Fragment>\r\n <div className=\"small-12 medium-6 columns\">\r\n <div className=\"row-inner\">\r\n <div className=\"small-12 columns checkout-info__placeholder-container\"></div>\r\n </div>\r\n <div className=\"row-inner\">\r\n {input(\r\n 'small-6 columns',\r\n 'customerDetails',\r\n 'firstName',\r\n 'billing given-name'\r\n )}\r\n {input(\r\n 'small-6 columns',\r\n 'customerDetails',\r\n 'lastName',\r\n 'billing family-name'\r\n )}\r\n {input(\r\n 'small-12 columns',\r\n 'customerDetails',\r\n 'careOf',\r\n 'on',\r\n null,\r\n 'text',\r\n 100\r\n )}\r\n {input(\r\n 'small-12 columns',\r\n 'customerDetails',\r\n 'address',\r\n 'billing street-address'\r\n )}\r\n {input(\r\n 'small-6 columns',\r\n 'customerDetails',\r\n 'zipCode',\r\n 'billing postal-code',\r\n null,\r\n 'text',\r\n 50\r\n )}\r\n {input(\r\n 'small-6 columns',\r\n 'customerDetails',\r\n 'city',\r\n 'billing address-level2',\r\n null,\r\n 'text',\r\n 100\r\n )}\r\n <div className=\"small-12 columns\">\r\n <label\r\n className=\"form__label\"\r\n htmlFor=\"country\"\r\n >\r\n {translate('checkout.customerinfo.country')}\r\n </label>\r\n <select\r\n className=\"form__input\"\r\n id=\"country\"\r\n value={customerDetails.country}\r\n autoComplete=\"country\"\r\n onChange={(event) => {\r\n onChange(\r\n 'alternativeAddress',\r\n 'country',\r\n event.target.value\r\n );\r\n onChange(\r\n 'customerDetails',\r\n 'country',\r\n event.target.value\r\n );\r\n }}\r\n >\r\n <option value=\"\" disabled>\r\n {translate(\r\n 'checkout.customerinfo.country.placeholder'\r\n )}\r\n </option>\r\n {constants.countries &&\r\n constants.countries.map(\r\n ({ text, value }) => (\r\n <option\r\n value={value}\r\n key={`country-${value}`}\r\n >\r\n {text}\r\n </option>\r\n )\r\n )}\r\n </select>\r\n </div>\r\n {input(\r\n 'small-12 columns',\r\n 'customerDetails',\r\n 'phoneNumber',\r\n 'billing tel',\r\n null,\r\n 'tel'\r\n )}\r\n </div>\r\n </div>\r\n <div className=\"small-12 medium-6 columns\">\r\n <div className=\"row-inner\">\r\n <div className=\"small-12 columns\">\r\n <input\r\n className=\"checkout-info__checkbox-input\"\r\n type=\"checkbox\"\r\n id=\"showAlternativeAddress\"\r\n name=\"showAlternativeAddress\"\r\n checked={\r\n alternativeAddress.showAlternativeAddress ||\r\n false\r\n }\r\n onChange={(event) => {\r\n onChange(\r\n 'alternativeAddress',\r\n 'showAlternativeAddress',\r\n event.target.checked\r\n );\r\n dispatch(\r\n setShowAlternativeAddress(\r\n event.target.checked\r\n )\r\n );\r\n }}\r\n />\r\n <label\r\n className=\"checkout-info__checkbox-label\"\r\n htmlFor=\"showAlternativeAddress\"\r\n >\r\n {translate(\r\n 'checkout.customerinfo.showAlternativeAddress'\r\n )}\r\n </label>\r\n </div>\r\n </div>\r\n {alternativeAddress.showAlternativeAddress && (\r\n <div className=\"row-inner\">\r\n {input(\r\n 'small-6 columns',\r\n 'alternativeAddress',\r\n 'firstName',\r\n 'shipping given-name'\r\n )}\r\n {input(\r\n 'small-6 columns',\r\n 'alternativeAddress',\r\n 'lastName',\r\n 'shipping family-name'\r\n )}\r\n {input(\r\n 'small-12 columns',\r\n 'alternativeAddress',\r\n 'careOf',\r\n 'on',\r\n null,\r\n 'text',\r\n 100\r\n )}\r\n {input(\r\n 'small-12 columns',\r\n 'alternativeAddress',\r\n 'address',\r\n 'shipping street-address'\r\n )}\r\n {input(\r\n 'small-6 columns',\r\n 'alternativeAddress',\r\n 'zipCode',\r\n 'shipping postal-code',\r\n null,\r\n 'text',\r\n 50\r\n )}\r\n {input(\r\n 'small-6 columns',\r\n 'alternativeAddress',\r\n 'city',\r\n 'shipping address-level2',\r\n null,\r\n 'text',\r\n 100\r\n )}\r\n <div className=\"small-12 columns\">\r\n <label\r\n className=\"form__label\"\r\n htmlFor=\"country2\"\r\n >\r\n {translate(\r\n 'checkout.customerinfo.country'\r\n )}\r\n </label>\r\n <select\r\n className=\"form__input\"\r\n id=\"country2\"\r\n value={alternativeAddress.country}\r\n autoComplete=\"country\"\r\n onChange={(event) => {\r\n onChange(\r\n 'alternativeAddress',\r\n 'country',\r\n event.target.value\r\n );\r\n onChange(\r\n 'customerDetails',\r\n 'country',\r\n event.target.value\r\n );\r\n }}\r\n >\r\n <option value=\"\" disabled>\r\n {translate(\r\n 'checkout.customerinfo.country.placeholder'\r\n )}\r\n </option>\r\n {constants.countries &&\r\n constants.countries.map(\r\n ({ text, value }) => (\r\n <option\r\n value={value}\r\n key={`country2-${value}`}\r\n >\r\n {text}\r\n </option>\r\n )\r\n )}\r\n </select>\r\n </div>\r\n {input(\r\n 'small-12 columns',\r\n 'alternativeAddress',\r\n 'phoneNumber',\r\n 'shipping tel',\r\n null,\r\n 'tel'\r\n )}\r\n </div>\r\n )}\r\n </div>\r\n <div className=\"small-12 medium-6 columns\">\r\n <div className=\"row-inner\">\r\n {input(\r\n 'small-12 columns',\r\n 'customerDetails',\r\n 'email',\r\n 'email',\r\n null,\r\n 'email'\r\n )}\r\n </div>\r\n </div>\r\n <div\r\n className={`small-12 columns flex-container ${\r\n authenticated ? 'align-right' : 'align-justify'\r\n }`}\r\n >\r\n <div>\r\n {!authenticated && signUpCheckboxVisibility && (\r\n <>\r\n <input\r\n className=\"checkout-info__checkbox-input\"\r\n type=\"checkbox\"\r\n id=\"signupandlogin\"\r\n checked={signUp}\r\n onChange={(event) =>\r\n dispatch(\r\n setSignUp(event.target.checked)\r\n )\r\n }\r\n />\r\n <label\r\n className=\"checkout-info__checkbox-label\"\r\n htmlFor=\"signupandlogin\"\r\n >\r\n {translate(\r\n 'checkout.customerinfo.signupandlogin'\r\n )}\r\n </label>\r\n </>\r\n )}\r\n </div>\r\n <Button\r\n onClick={onSave}\r\n title={translate('checkout.continue')}\r\n className={\"button checkout__continue-button\"}\r\n disabled={isValidating}\r\n />\r\n </div>\r\n </Fragment>\r\n ) : (\r\n <Fragment>\r\n <InfoField\r\n values={[\r\n valueForm['customerDetails']['firstName'],\r\n valueForm['customerDetails']['lastName'],\r\n ]}\r\n />\r\n {valueForm['customerDetails']['careOf'] && (\r\n <InfoField\r\n values={[valueForm['customerDetails']['careOf']]}\r\n />\r\n )}\r\n <InfoField\r\n values={[valueForm['customerDetails']['address']]}\r\n />\r\n <InfoField\r\n values={[\r\n valueForm['customerDetails']['zipCode'],\r\n valueForm['customerDetails']['city'],\r\n ]}\r\n />\r\n <InfoField values={[getCountry(customerDetails)]} />\r\n\r\n <InfoField\r\n values={[valueForm['customerDetails']['phoneNumber']]}\r\n />\r\n <InfoField\r\n values={[valueForm['customerDetails']['email']]}\r\n />\r\n </Fragment>\r\n )}\r\n </div>\r\n );\r\n};\r\n\r\nexport default CheckoutPrivateCustomerInfo;\r\n","import { string, object, boolean, mixed } from 'yup';\r\nimport { translate } from '../Services/translation';\r\n\r\nconst privateCustomerAdditionalDetailsSchema = object().shape({\r\n acceptTermsOfCondition: boolean()\r\n .required(translate(`validation.checkrequired`))\r\n .oneOf([true], translate(`validation.checkrequired`)),\r\n selectedDeliveryMethod: object().required(translate(`validation.required`)),\r\n selectedPaymentMethod: object().required(translate(`validation.required`)),\r\n});\r\n\r\nconst privateCustomerAddressSchema = object().shape({\r\n email: string()\r\n .required(translate(`validation.required`))\r\n .email(translate(`validation.email`)),\r\n phoneNumber: string().required(translate(`validation.required`)),\r\n country: mixed()\r\n .required(translate(`validation.required`))\r\n .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()\r\n .required(translate(`validation.required`))\r\n .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 email: string()\r\n .required(translate(`validation.required`))\r\n .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(\r\n translate(`validation.required`)\r\n ),\r\n});\r\n\r\nconst businessCustomerAdditionalDetailsSchema = object().shape({\r\n acceptTermsOfCondition: boolean()\r\n .required(translate(`validation.checkrequired`))\r\n .oneOf([true], translate(`validation.checkrequired`)),\r\n selectedDeliveryMethod: object().required(translate(`validation.required`)),\r\n selectedPaymentMethod: object().required(translate(`validation.required`)),\r\n});\r\n\r\nconst businessCustomerAlternativeAddressSchema = object().shape({\r\n phoneNumber: string().required(translate(`validation.required`)),\r\n country: mixed()\r\n .required(translate(`validation.required`))\r\n .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 email: string()\r\n .required(translate(`validation.required`))\r\n .email(translate(`validation.email`)),\r\n});\r\n\r\nexport {\r\n privateCustomerAdditionalDetailsSchema,\r\n privateCustomerAddressSchema,\r\n privateCustomerAlternativeAddressSchema,\r\n businessCustomerDetailsSchema,\r\n businessCustomerAdditionalDetailsSchema,\r\n businessCustomerAlternativeAddressSchema\r\n};\r\n","import React, { Fragment, useCallback } from 'react';\r\nimport { useDispatch } from 'react-redux';\r\nimport {\r\n clearError,\r\n setBusinessCustomer,\r\n setSelectedCompanyAddress,\r\n submitError,\r\n updateCustomerDetails,\r\n setCountry,\r\n saveCustomerDetail,\r\n setValidateStatus,\r\n} from '../Actions/Checkout.action';\r\nimport CheckoutBusinessCustomerInfo from './Checkout.BusinessCustomerInfo';\r\nimport CheckoutPrivateCustomerInfo from './Checkout.PrivateCustomerInfo';\r\nimport {\r\n businessCustomerDetailsSchema,\r\n privateCustomerAddressSchema,\r\n privateCustomerAlternativeAddressSchema,\r\n} from './Checkout.ValidationSchema';\r\nimport constants from '../constants';\r\nimport { translate } from '../Services/translation';\r\nimport Button from './Button';\r\n\r\nconst validateAlternativeAddress = (alternativeAddress) => {\r\n return (\r\n alternativeAddress &&\r\n alternativeAddress.showAlternativeAddress &&\r\n (alternativeAddress.firstName ||\r\n alternativeAddress.lastName ||\r\n alternativeAddress.address ||\r\n alternativeAddress.zipCode ||\r\n alternativeAddress.city ||\r\n alternativeAddress.phoneNumber)\r\n );\r\n};\r\n\r\nconst validateCustomerInfo = (result, isBusinessCustomer) => {\r\n const {\r\n customerDetails,\r\n selectedCompanyAddressId,\r\n alternativeAddress,\r\n } = result;\r\n\r\n if (isBusinessCustomer) {\r\n return businessCustomerDetailsSchema.validate({\r\n ...customerDetails,\r\n selectedCompanyAddressId,\r\n });\r\n }\r\n\r\n return privateCustomerAddressSchema\r\n .validate({\r\n ...customerDetails,\r\n })\r\n .then((result) => {\r\n if (validateAlternativeAddress(alternativeAddress)) {\r\n return privateCustomerAlternativeAddressSchema\r\n .validate({\r\n ...alternativeAddress,\r\n })\r\n .catch((error) => {\r\n error.addressPath = 'alternativeAddress';\r\n throw error;\r\n });\r\n } else {\r\n return result;\r\n }\r\n });\r\n};\r\n\r\nconst CheckoutCustomerInfo = ({\r\n checkout,\r\n addressFormValue,\r\n setAddressFormValue,\r\n isEditingAddress,\r\n setIsEditingAddress,\r\n signUpCheckboxVisibility,\r\n}) => {\r\n const dispatch = useDispatch();\r\n const {\r\n payload: { loginUrl, authenticated, isBusinessCustomer, checkoutMode },\r\n } = checkout;\r\n\r\n const onCustomerInfoChange = useCallback(\r\n (stateKey, id, value) => {\r\n setAddressFormValue((previousState) => ({\r\n ...previousState,\r\n [stateKey]: {\r\n ...previousState[stateKey],\r\n [id]: value,\r\n },\r\n }));\r\n },\r\n [setAddressFormValue]\r\n );\r\n const onCompanyAddressChange = useCallback(\r\n (companyAddressId, country) => {\r\n setAddressFormValue((previousState) => ({\r\n ...previousState,\r\n selectedCompanyAddressId: companyAddressId,\r\n customerDetails: {\r\n ...previousState.customerDetails,\r\n country,\r\n },\r\n }));\r\n },\r\n [setAddressFormValue]\r\n );\r\n\r\n const onEditForm = useCallback(() => {\r\n setIsEditingAddress(true);\r\n }, [setIsEditingAddress]);\r\n\r\n const onUpdateCustomerDetails = useCallback(() => {\r\n const notCustomerDetailFields = ['selectedCompanyAddressId'];\r\n\r\n const onValid = () => {\r\n const { payload } = checkout,\r\n { isBusinessCustomer, channelTwoLetterIsoCode } = payload;\r\n const {\r\n customerDetails,\r\n selectedCompanyAddressId,\r\n alternativeAddress,\r\n } = addressFormValue;\r\n\r\n dispatch(updateCustomerDetails('customerDetails', customerDetails));\r\n if (isBusinessCustomer) {\r\n dispatch(setSelectedCompanyAddress(selectedCompanyAddressId));\r\n const companyAddress = payload.companyAddresses.find(\r\n (c) => c.systemId === selectedCompanyAddressId\r\n );\r\n dispatch(setCountry(channelTwoLetterIsoCode));\r\n } else {\r\n dispatch(\r\n updateCustomerDetails(\r\n 'alternativeAddress',\r\n alternativeAddress\r\n )\r\n );\r\n dispatch(setCountry(customerDetails.country));\r\n }\r\n setIsEditingAddress(false);\r\n };\r\n\r\n const onSetCustomerDetail = () =>\r\n dispatch(saveCustomerDetail(addressFormValue));\r\n\r\n const onError = (error) => {\r\n error.path =\r\n notCustomerDetailFields.indexOf(error.path) >= 0\r\n ? error.path\r\n : `${error?.addressPath || 'customerDetails'}-${\r\n error.path\r\n }`;\r\n dispatch(submitError(error));\r\n };\r\n\r\n dispatch(setValidateStatus(true));\r\n dispatch(clearError());\r\n\r\n validateCustomerInfo(addressFormValue, isBusinessCustomer)\r\n .then(onSetCustomerDetail)\r\n .then(onValid)\r\n .catch(onError)\r\n .finally(() => {\r\n dispatch(setValidateStatus(false));\r\n });\r\n }, [\r\n dispatch,\r\n addressFormValue,\r\n isBusinessCustomer,\r\n checkout,\r\n setIsEditingAddress,\r\n ]);\r\n\r\n const privateCustomerInfoComponent = useCallback(() => {\r\n return (\r\n <CheckoutPrivateCustomerInfo\r\n onSave={onUpdateCustomerDetails}\r\n onChange={onCustomerInfoChange}\r\n valueForm={addressFormValue}\r\n isEditingAddress={isEditingAddress}\r\n signUpCheckboxVisibility={signUpCheckboxVisibility}\r\n />\r\n );\r\n }, [\r\n addressFormValue,\r\n isEditingAddress,\r\n onCustomerInfoChange,\r\n onUpdateCustomerDetails,\r\n signUpCheckboxVisibility,\r\n ]);\r\n\r\n const businessCustomerInfoComponent = useCallback(() => {\r\n return (\r\n <CheckoutBusinessCustomerInfo\r\n onChange={onCustomerInfoChange}\r\n onCompanyAddressChange={onCompanyAddressChange}\r\n onSave={onUpdateCustomerDetails}\r\n valueForm={addressFormValue}\r\n isEditingAddress={isEditingAddress}\r\n />\r\n );\r\n }, [\r\n addressFormValue,\r\n isEditingAddress,\r\n onCompanyAddressChange,\r\n onCustomerInfoChange,\r\n onUpdateCustomerDetails,\r\n ]);\r\n\r\n if (!authenticated) {\r\n return (\r\n <Fragment>\r\n <div className=\"row align-justify\">\r\n <div className=\"flex-container checkout__flex-wrapper\">\r\n <h3 className=\"checkout__section-title\">\r\n {translate('checkout.customerinfo.title')}\r\n </h3>\r\n {isEditingAddress && (\r\n <Fragment>\r\n <label className=\"checkout__text--in-line\">\r\n {translate(\r\n 'checkout.customerinfo.existingcustomer'\r\n )}\r\n </label>\r\n \r\n <a href={loginUrl} className=\"checkout__link\">\r\n {translate(\r\n 'checkout.customerinfo.clicktologin'\r\n )}\r\n </a>\r\n \r\n {!isBusinessCustomer &&\r\n checkoutMode ===\r\n constants.checkoutMode.both && (\r\n <a\r\n onClick={() =>\r\n dispatch(\r\n setBusinessCustomer(true)\r\n )\r\n }\r\n className=\"checkout__link\"\r\n >\r\n {translate(\r\n 'checkout.customerinfo.businesscustomer'\r\n )}\r\n </a>\r\n )}\r\n {isBusinessCustomer &&\r\n checkoutMode ===\r\n constants.checkoutMode.both && (\r\n <a\r\n onClick={() =>\r\n dispatch(\r\n setBusinessCustomer(false)\r\n )\r\n }\r\n className=\"checkout__link\"\r\n >\r\n {translate(\r\n 'checkout.customerinfo.privatecustomer'\r\n )}\r\n </a>\r\n )}\r\n </Fragment>\r\n )}\r\n </div>\r\n {!isEditingAddress && (\r\n <Button\r\n onClick={onEditForm}\r\n title={translate('checkout.edit')}\r\n className={'button checkout__continue-button'}\r\n />\r\n )}\r\n </div>\r\n {!isBusinessCustomer &&\r\n checkoutMode !== constants.checkoutMode.companyCustomers &&\r\n privateCustomerInfoComponent()}\r\n {(isBusinessCustomer ||\r\n checkoutMode === constants.checkoutMode.companyCustomers) &&\r\n businessCustomerInfoComponent()}\r\n </Fragment>\r\n );\r\n }\r\n\r\n return (\r\n <Fragment>\r\n <div className=\"row align-justify\">\r\n <h3 className=\"checkout__section-title\">\r\n {translate('checkout.customerinfo.title')}\r\n </h3>\r\n {!isEditingAddress && (\r\n <Button\r\n onClick={onEditForm}\r\n title=\"edit\"\r\n className={'button checkout__continue-button'}\r\n />\r\n )}\r\n </div>\r\n {!isBusinessCustomer && privateCustomerInfoComponent()}\r\n {isBusinessCustomer && businessCustomerInfoComponent()}\r\n </Fragment>\r\n );\r\n};\r\n\r\nexport default CheckoutCustomerInfo;\r\nexport { validateAlternativeAddress, validateCustomerInfo };\r\n","import React, { Fragment } from 'react';\r\nimport { useSelector, useDispatch } from 'react-redux';\r\nimport { setDelivery } from '../Actions/Checkout.action';\r\nimport { translate } from '../Services/translation';\r\n\r\nconst CheckoutDeliveryMethods = ({ errors }) => {\r\n const dispatch = useDispatch();\r\n const { deliveryMethods, selectedDeliveryMethod } = useSelector(\r\n (state) => state.checkout.payload\r\n );\r\n \r\n if (!deliveryMethods || deliveryMethods.length === 0) {\r\n return null;\r\n }\r\n \r\n if (deliveryMethods.length === 1) {\r\n return (\r\n <section className=\"row checkout-info__container\">\r\n <div className=\"columns checkout-column small-12\">\r\n {deliveryMethods.map((method) => (\r\n <span\r\n className=\"columns checkout-column\"\r\n key={method.id}\r\n >\r\n <b>{method.name}</b>\r\n </span>\r\n ))}\r\n </div>\r\n </section>\r\n );\r\n }\r\n\r\n return (\r\n <Fragment>\r\n <div className=\"row\">\r\n <h3 className=\"checkout__section-title\">\r\n {translate('checkout.delivery.title')}\r\n </h3>\r\n </div>\r\n\r\n<div className=\"row column\">\r\n {window.location.search.indexOf('CanConfirmOrderError') != -1 && window.__litium.preloadState.checkout.errors && window.__litium.preloadState.checkout.errors['selectedDeliveryMethod'] && ( \r\n <span className=\"checkout__validator--error\">\r\n {window.__litium.preloadState.checkout.errors['selectedDeliveryMethod'][0]} \r\n </span>\r\n )} \r\n </div> \r\n \r\n {deliveryMethods && deliveryMethods.length > 0 && (\r\n <section className=\"row checkout-info__container\">\r\n <div className=\"columns small-12\">\r\n {deliveryMethods.map((method) => (\r\n <label className=\"row no-margin checkout-info__radio-label\" key={method.id}>\r\n <input\r\n type=\"radio\"\r\n name=\"deliveryMethods\"\r\n className=\"checkout-info__checkbox-radio\"\r\n value={method.id}\r\n checked={\r\n method.id === selectedDeliveryMethod?.id\r\n }\r\n onChange={() =>\r\n dispatch(setDelivery(method))\r\n }\r\n />\r\n <span className=\"columns\">\r\n <b> {method.name} {method.formattedPrice}</b>\r\n </span>\r\n </label>\r\n ))}\r\n </div>\r\n </section>\r\n )}\r\n <div className=\"row\">\r\n {errors['selectedDeliveryMethod'] && (\r\n <span className=\"form__validator--error form__validator--top-narrow\">\r\n {errors['selectedDeliveryMethod'][0]}\r\n </span>\r\n )}\r\n </div>\r\n </Fragment>\r\n );\r\n};\r\n\r\nexport default CheckoutDeliveryMethods;\r\n","import React, { Fragment, useEffect, useRef } from 'react';\r\nimport { useSelector, useDispatch } from 'react-redux';\r\nimport { translate } from '../Services/translation';\r\nimport {\r\n setDiscountCode,\r\n submitDiscountCode,\r\n deleteDiscountCode,\r\n} from '../Actions/Checkout.action';\r\n\r\nconst CheckoutPaymentMethods = () => {\r\n const dispatch = useDispatch();\r\n const { payload, errors = {} } = useSelector((state) => state.checkout);\r\n const { usedDiscountCodes } = payload;\r\n const discountCodeEl = useRef(null);\r\n\r\n useEffect(() => {\r\n if (errors && !errors['discountCode']?.length) {\r\n discountCodeEl.current.value = '';\r\n }\r\n }, [errors]);\r\n\r\n return (\r\n <Fragment>\r\n <section className=\"row checkout-info__container\">\r\n <div className=\"columns checkout-column small-12\">\r\n <h3 className=\"checkout__section-title\">\r\n {translate('checkout.discountcode')}\r\n </h3>\r\n </div>\r\n <div className=\"columns checkout-column small-12\">\r\n <div className=\"row no-margin\">\r\n <div className=\"small-6 medium-4\">\r\n <input\r\n ref={discountCodeEl}\r\n className=\"form__input\"\r\n id=\"campaign-code\"\r\n placeholder={translate('checkout.discountcode')}\r\n onChange={(event) =>\r\n dispatch(\r\n setDiscountCode(event.target.value)\r\n )\r\n }\r\n />\r\n {errors && errors['discountCode'] && (\r\n <span\r\n className=\"form__validator--error form__validator--top-narrow\"\r\n data-error-for=\"campaign-code\"\r\n >\r\n {errors['discountCode'][0]}\r\n </span>\r\n )}\r\n </div>\r\n <div className=\"small-5 medium-4 columns\">\r\n <button\r\n className=\"button checkout-info__campaign-button\"\r\n onClick={() => dispatch(submitDiscountCode())}\r\n >\r\n {translate('checkout.usediscountcode')}\r\n </button>\r\n </div>\r\n </div>\r\n <div className=\"row no-margin\">\r\n <div className=\"chip__container\">\r\n {usedDiscountCodes &&\r\n usedDiscountCodes.map((discountCode) => (\r\n <div className=\"chip\" key={discountCode}>\r\n <span className=\"chip__label checkout-discount-codes\">\r\n {translate(\r\n 'checkout.discountcodesuccess'\r\n )}{' '}\r\n \"{discountCode}\"\r\n </span>\r\n <i\r\n className=\"fa fw fa-remove\"\r\n onClick={() =>\r\n dispatch(\r\n deleteDiscountCode(\r\n discountCode\r\n )\r\n )\r\n }\r\n title={translate('general.remove')}\r\n ></i>\r\n </div>\r\n ))}\r\n </div>\r\n </div>\r\n </div>\r\n </section>\r\n </Fragment>\r\n );\r\n};\r\n\r\nexport default CheckoutPaymentMethods;\r\n","import React from 'react';\r\nimport { useSelector } from 'react-redux';\r\nimport { translate } from '../Services/translation';\r\n\r\nconst CheckoutOrderInfo = () => {\r\n const cart = useSelector((state) => state.cart);\r\n\r\n return (\r\n <div className=\"columns checkout-column-right small-12 medium-6 checkout-info__summary--full-row\">\r\n <div>\r\n {translate('checkout.order.productstotal')}{' '}\r\n <span className=\"checkout-info__summary--expand\"></span>{' '}\r\n {cart.orderTotal}\r\n </div>\r\n <div>\r\n {translate('checkout.order.discount')}{' '}\r\n <span className=\"checkout-info__summary--expand\"></span>{' '}\r\n {cart.discount}\r\n </div>\r\n <div>\r\n {translate('checkout.order.deliverycost')}{' '}\r\n <span className=\"checkout-info__summary--expand\"></span>{' '}\r\n {cart.deliveryCost}\r\n </div>\r\n <div>\r\n {translate('checkout.order.paymentcost')}{' '}\r\n <span className=\"checkout-info__summary--expand\"></span>{' '}\r\n {cart.paymentCost}\r\n </div>\r\n <h3>\r\n {translate('checkout.order.grandTotal')}{' '}\r\n <span className=\"checkout-info__summary--expand\"></span>{' '}\r\n {cart.grandTotal}\r\n </h3>\r\n <div>\r\n {translate('checkout.order.vat')}{' '}\r\n <span className=\"checkout-info__summary--expand\"></span>{' '}\r\n {cart.vat}\r\n </div>\r\n </div>\r\n );\r\n};\r\n\r\nexport default CheckoutOrderInfo;\r\n","import React from 'react';\r\nimport { useSelector, useDispatch } from 'react-redux';\r\nimport { translate } from '../Services/translation';\r\nimport { setOrderNote } from '../Actions/Checkout.action';\r\n\r\nconst CheckoutOrderNote = () => {\r\n const dispatch = useDispatch();\r\n const orderNote = useSelector((state) => state.checkout.payload.orderNote);\r\n\r\n return (\r\n <div className=\"columns checkout-column-left small-12 medium-6 checkout-info__summary--full-height\">\r\n {translate('checkout.order.message')}\r\n <textarea\r\n className=\"form__input checkout-info__messages\"\r\n value={orderNote}\r\n onChange={(event) => dispatch(setOrderNote(event.target.value))}\r\n ></textarea>\r\n </div>\r\n );\r\n};\r\n\r\nexport default CheckoutOrderNote;\r\n","import React, { Fragment } from 'react';\r\nimport { useSelector, useDispatch } from 'react-redux';\r\nimport { setPayment } from '../Actions/Checkout.action';\r\nimport { translate } from '../Services/translation';\r\n\r\nconst CheckoutPaymentMethods = ({ errors }) => {\r\n const dispatch = useDispatch();\r\n const { payload } = useSelector((state) => state.checkout);\r\n const { paymentMethods, selectedPaymentMethod } = payload;\r\n\r\n return (\r\n <Fragment>\r\n <div className=\"row\">\r\n <h3 className=\"checkout__section-title\">\r\n {translate('checkout.payment.title')}\r\n </h3>\r\n </div>\r\n {paymentMethods && paymentMethods.length > 0 && (\r\n <section className=\"row checkout-info__container\">\r\n <div className=\"columns checkout-column small-12\">\r\n {paymentMethods.map((method,index) => (\r\n <label className=\"row no-margin\" key={index + method.id}>\r\n <input\r\n type=\"radio\"\r\n name=\"paymentMethods\"\r\n className=\"checkout-info__checkbox-radio\"\r\n value={method.id}\r\n checked={\r\n method.id === selectedPaymentMethod.id\r\n }\r\n onChange={() =>\r\n dispatch(setPayment(method))\r\n }\r\n />\r\n <span className=\"columns checkout-column\">\r\n <b> {method.name} </b>\r\n </span>\r\n </label>\r\n ))}\r\n </div>\r\n </section>\r\n )}\r\n <div className=\"row\">\r\n {errors['selectedPaymentMethod'] && (\r\n <span className=\"form__validator--error form__validator--top-narrow\">\r\n {errors['selectedPaymentMethod'][0]}\r\n </span>\r\n )}\r\n </div>\r\n </Fragment>\r\n );\r\n};\r\n\r\nexport default CheckoutPaymentMethods;\r\n","import React from 'react';\r\nimport DynamicComponent from '../DynamicComponent';\r\nconst scriptPattern = /<script\\b[^>]*>([\\s\\S]*?)<\\/script>/gi;\r\nconst scriptFilePattern = /<script.*?src=[\"'](.*?)[\"']/gi;\r\n\r\nconst extractScripts = (domString) => {\r\n let matches,\r\n html = domString;\r\n const scripts = [],\r\n scriptFiles = [];\r\n while ((matches = scriptPattern.exec(domString)) !== null) {\r\n html = html.replace(matches[0], '');\r\n matches[1] && matches[1].trim() !== '' && scripts.push(matches[1]);\r\n }\r\n while ((matches = scriptFilePattern.exec(domString)) !== null) {\r\n matches[1] && matches[1].trim() !== '' && scriptFiles.push(matches[1]);\r\n }\r\n\r\n return {\r\n html,\r\n scripts,\r\n scriptFiles,\r\n };\r\n};\r\n\r\nconst 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\nconst includeScript = (domId, srciptUrl) => {\r\n const script = document.createElement('script');\r\n script.type = 'text/javascript';\r\n script.src = srciptUrl;\r\n document.getElementById(domId).appendChild(script);\r\n};\r\n\r\nconst PaymentWidget = React.memo(function PaymentWidget({ responseString }) {\r\n const renderWidget = (paymentSession) => {\r\n const WidgetCheckout = DynamicComponent({\r\n loader: () => import('./CheckoutWidget'),\r\n });\r\n const args = {\r\n paymentSession,\r\n extractScripts,\r\n executeScript,\r\n includeScript,\r\n };\r\n return <WidgetCheckout {...args} />;\r\n };\r\n\r\n return renderWidget(responseString);\r\n});\r\n\r\nexport default PaymentWidget;\r\n","import React from 'react';\r\nimport { translate } from '../Services/translation';\r\nimport constants from '../constants';\r\nimport { useSelector, useDispatch } from 'react-redux';\r\nimport { setCountry } from '../Actions/Checkout.action'; ////upgrade8.7 setAlternativeAddress\r\n\r\nconst BusinessCustomerDropShip = () => {\r\n const dispatch = useDispatch();\r\n const { payload, errors = {} } = useSelector((state) => state.checkout);\r\n const { customerDetails = {} } = payload;\r\n // //upgrade8.7 const onChange = (propName, value) => {\r\n // dispatch(setAlternativeAddress(propName, value));\r\n // };\r\n const stateKey = 'alternativeAddress';\r\n\r\n const input = (\r\n cssClass,\r\n id,\r\n autoComplete = 'on',\r\n placeholder = null,\r\n type = 'text',\r\n maxLength = 200\r\n ) => (\r\n <div className={cssClass}>\r\n <label className=\"form__label\" htmlFor={`${stateKey}-${id}`}>\r\n {translate(`checkout.shippingAddress.${id.toLowerCase()}`)}\r\n </label>\r\n <input\r\n className=\"form__input\"\r\n id={`${stateKey}-${id}`}\r\n name={`${stateKey}-${id}`}\r\n type={type}\r\n value={(payload[stateKey] || {})[id] || ''}\r\n placeholder={placeholder}\r\n autoComplete={autoComplete}\r\n onChange={(event) => onChange(id, event.target.value)}\r\n maxLength={maxLength}\r\n />\r\n {errors[`${stateKey}-${id}`] && (\r\n <span\r\n className=\"form__validator--error form__validator--top-narrow\"\r\n data-error-for={`${stateKey}-${id}`}\r\n >\r\n {errors[`${stateKey}-${id}`][0]}\r\n </span>\r\n )}\r\n </div>\r\n );\r\n return (\r\n <div className=\"checkout-info__container\">\r\n {\r\n <div className=\"row-inner\">\r\n {input(\r\n 'small-6 columns',\r\n 'firstName',\r\n 'shipping given-name'\r\n )}\r\n {input(\r\n 'small-6 columns',\r\n 'lastName',\r\n 'shipping family-name'\r\n )}\r\n {input(\r\n 'small-12 columns',\r\n 'address',\r\n 'shipping street-address'\r\n )}\r\n {input(\r\n 'small-6 columns',\r\n 'zipCode',\r\n 'shipping postal-code',\r\n null,\r\n 'text',\r\n 50\r\n )}\r\n {input(\r\n 'small-6 columns',\r\n 'city',\r\n 'shipping address-level2',\r\n null,\r\n 'text',\r\n 100\r\n )}\r\n <div className=\"small-12 columns\">\r\n <label className=\"form__label\" htmlFor=\"country2\">\r\n {translate('checkout.customerinfo.country')}\r\n </label>\r\n <select\r\n className=\"form__input\"\r\n id=\"country2\"\r\n value={customerDetails.country}\r\n onChange={(event) => {\r\n onChange('country', event.target.value);\r\n dispatch(setCountry(event.target.value));\r\n }}\r\n >\r\n <option value=\"\" disabled>\r\n {translate(\r\n 'checkout.customerinfo.country.placeholder'\r\n )}\r\n </option>\r\n {constants.countries &&\r\n constants.countries.map(({ text, value }) => (\r\n <option\r\n value={value}\r\n key={`country2-${value}`}\r\n >\r\n {text}\r\n </option>\r\n ))}\r\n </select>\r\n </div>\r\n {input('small-12 columns', 'phoneNumber', 'shipping tel')}\r\n {input('small-12 columns', 'email', 'shipping email')}\r\n </div>\r\n }\r\n </div>\r\n );\r\n};\r\n\r\nexport default BusinessCustomerDropShip;\r\n","import React, { Fragment } from 'react';\r\nimport { useSelector, useDispatch } from 'react-redux';\r\nimport { setSelectedShippingAddress } from '../Actions/Checkout.action';\r\nimport { translate } from '../Services/translation';\r\nimport constants from '../constants';\r\n\r\nconst BusinessCustomerShippingAddress = () => {\r\n const dispatch = useDispatch();\r\n const { payload } = useSelector((state) => state.checkout);\r\n const { shippingAddresses = [], selectedShippingAddressId } = payload;\r\n\r\n const onShippingAddressChange = (addressId) => {\r\n dispatch(setSelectedShippingAddress(addressId));\r\n };\r\n\r\n const getCountry = (address) => {\r\n const country = constants.countries ? constants.countries.find((x) => x.value === address.country) : null;\r\n return country ? country.text : address.country;\r\n };\r\n\r\n const formattedAddress = (address) => {\r\n return [address.address, address.zipCode, address.city, getCountry(address)].filter((x) => !!x).join(', ');\r\n };\r\n\r\n if (!shippingAddresses || shippingAddresses.length === 0) {\r\n return null;\r\n }\r\n\r\n return (\r\n <Fragment>\r\n <label htmlFor=\"checkout.shippinginfo.address\" className=\"form__label\">\r\n {translate('checkout.shippinginfo.address')}\r\n </label>\r\n <select\r\n id=\"checkout.shippinginfo.address\"\r\n className=\"form__input\"\r\n value={selectedShippingAddressId}\r\n onChange={(event) => onShippingAddressChange(event.target.value)}\r\n >\r\n {shippingAddresses.map((address) => (\r\n <option value={address.systemId} key={address.systemId}>\r\n {formattedAddress(address)}\r\n </option>\r\n ))}\r\n </select>\r\n </Fragment>\r\n );\r\n};\r\n\r\nexport default BusinessCustomerShippingAddress;\r\n","import React, { useState, useEffect } from 'react';\r\nimport { useSelector, useDispatch } from 'react-redux';\r\nimport { translate } from '../Services/translation';\r\nimport BusinessCustomerDropShip from './Checkout.BusinessCustomerDropShip';\r\nimport BusinessCustomerShippingAddress from './Checkout.BusinessCustomerShippingAddress';\r\nimport { setDropShipping } from '../Actions/Checkout.action';\r\n\r\nconst CheckoutBusinessCustomerShippingInfo = () => {\r\n const dispatch = useDispatch();\r\n const { payload, errors = {} } = useSelector((state) => state.checkout);\r\n const [isDropShipSelected, setDropShipSelected] = useState(false);\r\n const [isStoreSelected, setStoreSelected] = useState(true);\r\n const [shipping, setShipping] = useState(false);\r\n const { authenticated, shippingTypes, dropShipping } = payload;\r\n\r\n const onShippingTypeChange = (value) => {\r\n const dropShipping = value === 'true';\r\n setShipping(dropShipping);\r\n dispatch(setDropShipping(dropShipping));\r\n };\r\n\r\n useEffect(() => {\r\n setDropShipSelected(shipping);\r\n setStoreSelected(!shipping);\r\n }, [shipping]);\r\n\r\n return (\r\n <div className=\"row checkout-info__container\">\r\n <div className=\"small-12 medium-6 checkout-column columns\">\r\n <div className=\"row-inner\">\r\n <div className=\"small-12 columns\">\r\n {translate('checkout.shipping.type')}\r\n </div>\r\n <div className=\"small-12 columns\">\r\n <label\r\n className=\"form__label\"\r\n htmlFor=\"checkout.shipping.shippingtype\"\r\n >\r\n {translate(\r\n 'checkout.shipping.shippingtype.placeholder'\r\n )}\r\n </label>\r\n <select\r\n className=\"form__input\"\r\n id=\"checkout.shipping.shippingtype\"\r\n value={dropShipping}\r\n disabled={!authenticated}\r\n onChange={(event) =>\r\n onShippingTypeChange(event.target.value)\r\n }\r\n >\r\n {shippingTypes &&\r\n shippingTypes.map((type) => (\r\n <option\r\n value={type.dropShipping}\r\n key={type.name}\r\n >\r\n {type.name}\r\n </option>\r\n ))}\r\n </select>\r\n {errors['dropShipping'] && (\r\n <span\r\n className=\"form__validator--error form__validator--top-narrow\"\r\n data-error-for=\"dropShipping\"\r\n >\r\n {errors['dropShipping'][0]}\r\n </span>\r\n )}\r\n </div>\r\n </div>\r\n {isDropShipSelected && !isStoreSelected && (\r\n <BusinessCustomerDropShip />\r\n )}\r\n {isStoreSelected && !isDropShipSelected && (\r\n <BusinessCustomerShippingAddress />\r\n )}\r\n </div>\r\n </div>\r\n );\r\n};\r\n\r\nexport default CheckoutBusinessCustomerShippingInfo;\r\n","import axios from \"axios\";\r\nimport { SIWSessionDTO } from \"./types\";\r\nconst token = window.localStorage.getItem('requestVerificationToken');\r\nconst serviceURL = \"/api/ingrid\";\r\n\r\n// checkout-demo-backend-stage service simulates the shops backend\r\n// It holds a mocked cart and passes requests to SIW service.\r\n// Your actual setup should look similar - You shouldn't call SIW directly from FE in order not to expose the private keys.\r\n\r\n// Creates a session with a basic cart, calls siw/session.create under the hood\r\nexport const createSession = () => {\r\n return (\r\n axios.post<{ session: SIWSessionDTO; html_snippet: string }>(\r\n `${serviceURL}/session.create`, null, {\r\n headers: {\r\n 'litium-request-context': window.localStorage.getItem('requestContext'),\r\n 'RequestVerificationToken': token\r\n },\r\n },\r\n ).catch(error => {\r\n console.warn(error);\r\n }))\r\n}\r\n//Returns an existing session, calls siw/session.get under the hood\r\n\r\nexport const getSession = (sessionID: string) => {\r\n return (\r\n axios.get<{ session: SIWSessionDTO; html_snippet: string }>(`${serviceURL}/session.get?sessionId=` + sessionID, {\r\n headers: {\r\n 'litium-request-context': window.localStorage.getItem('requestContext'),\r\n 'RequestVerificationToken': token\r\n }\r\n }).catch(error => {\r\n console.warn(error);\r\n }))\r\n \r\n}\r\n//Adds a new product the the cart and bumps the price, calls siw/session.update under the hood\r\nexport const updateSession = (sessionID: string) => {\r\n return (\r\n axios.post<{ session: SIWSessionDTO; html_snippet: string }>(`${serviceURL}/session.update?sessionId=` + sessionID,\r\n null,\r\n {\r\n headers: {\r\n 'litium-request-context': window.localStorage.getItem('requestContext'),\r\n 'RequestVerificationToken': token\r\n }\r\n }\r\n )\r\n .catch(error => {\r\n console.warn(error);\r\n }))\r\n \r\n}\r\n","const isScriptNode = (node: HTMLScriptElement) => {\r\n return node.tagName === \"SCRIPT\";\r\n };\r\n \r\n const isExternalScript = (node: HTMLScriptElement) => {\r\n return !!node.src && node.src !== \"\";\r\n };\r\n \r\n const cloneScriptNode = (node: HTMLScriptElement) => {\r\n const script = document.createElement(\"script\");\r\n script.text = node.innerHTML;\r\n for (let i = node.attributes.length - 1; i >= 0; i--) {\r\n script.setAttribute(node.attributes[i].name, node.attributes[i].value);\r\n }\r\n return script;\r\n };\r\n \r\n export const replaceScriptNode = (node: any) => {\r\n if (isScriptNode(node) && !isExternalScript(node)) {\r\n if (node.parentNode) {\r\n node.parentNode.replaceChild(cloneScriptNode(node), node);\r\n }\r\n } else {\r\n let i = 0;\r\n const children = node.childNodes;\r\n while (i < children.length) {\r\n replaceScriptNode(children[i++]);\r\n }\r\n }\r\n return node;\r\n };\r\n \r\n export const setupGeneralJSListeners = () => {\r\n if (window._sw) {\r\n window._sw((api) => {\r\n api.on(\"door_code_changed\", (doorCode) =>\r\n console.log(\"door code changed: \", doorCode)\r\n );\r\n api.on(\"courier_instructions_changed\", (courierInstructions) =>\r\n console.log(\"courier instructions changed: \", courierInstructions)\r\n );\r\n \r\n api.on(\"data_changed\", (data, meta) => {\r\n console.log(\"data changed\", { data, meta });\r\n });\r\n });\r\n }\r\n };\r\n ","/* eslint-disable */\r\nimport React, { CSSProperties } from \"react\";\r\nimport { Button, Card, Col, Row, Space, Statistic, Typography } from \"antd\";\r\nimport ReactJson from \"react-json-view\";\r\nimport { useSelector, useDispatch } from 'react-redux';\r\nimport { update as deliveryCostUpdate } from '../../Actions/Cart.action';\r\nimport { reloadPayment } from '../../Actions/Checkout.action';\r\nimport {\r\n createSession,\r\n updateSession,\r\n getSession,\r\n} from \"./api\";\r\nimport { replaceScriptNode, setupGeneralJSListeners } from \"./utils\";\r\nimport { SIWSessionDTO } from \"./types\";\r\nimport { RootState } from \"./store\";\r\n\r\nconst localStorageSessionIDKey = \"ingrid-session-id\";\r\nconst statusComplete = \"COMPLETE\";\r\nexport default function IngridApp() {\r\n // This is where the Delivery Checkout will get injected\r\n const widgetWrapperRef = React.useRef<HTMLDivElement>(null);\r\n // Used to show the shipping price in 'total cost' section\r\n const [shippingPrice, setShippingPrice] = React.useState<null | number>(null);\r\n // Used to show the 'cart value' in 'total cost' for the user,\r\n const [session, setSession] = React.useState<SIWSessionDTO | null>(null);\r\n const [htmlSnippet, sethtmlSnippet] = React.useState<string | null>('');\r\n // Used to show the final result after session is completed\r\n const [sessionResult, setSessionResult] = React.useState<\r\n SIWSessionDTO[\"result\"] | null\r\n >(null);\r\n // Just to lock the buttons while requests are pending\r\n const [isLoading, setIsLoading] = React.useState(false);\r\n const dispatch = useDispatch();\r\n // const sessionResponse = useSelector((state) => state.ingrid);\r\n const mapCartToAbort = {};\r\n const firstRender = React.useRef(true);\r\n const cart = (state: RootState) => state.cart\r\n let cartObj = useSelector(cart);\r\n const ingrid = (state: RootState) => state.ingrid\r\n const ingridObj = useSelector(ingrid);\r\n const [isReload, setReLoad] = React.useState(ingridObj.showInfo)\r\n mapCartToAbort[cartObj.articleNumber] = new AbortController();\r\n\r\n React.useEffect(() => {\r\n if (firstRender.current) {\r\n firstRender.current = false;\r\n return;\r\n }\r\n handleUpdateSession(session, true);\r\n }, [ingridObj.showInfo]);\r\n\r\n React.useEffect(() => {\r\n initDeliveryCheckout();\r\n }, []);\r\n\r\n const initDeliveryCheckout = async () => {\r\n\r\n // The user might leave the checkout page and come back again after some time\r\n // In that case, want to restore the previous session instead of creating a new one\r\n const existingSessionID = window.localStorage.getItem(\r\n localStorageSessionIDKey\r\n );\r\n if (existingSessionID) {\r\n setIsLoading(true);\r\n try {\r\n const getSessionResponse = await getSession(existingSessionID);\r\n if (getSessionResponse != undefined) {\r\n //if status is completed remove localstorage item\r\n if (!getSessionResponse.data || getSessionResponse.data.session.status.toUpperCase() == statusComplete) {\r\n throw new Error('Ingrid Session is corrupt');\r\n }\r\n handleIngridInitialize(\r\n getSessionResponse?.data.session,\r\n getSessionResponse?.data.html_snippet\r\n );\r\n }\r\n else {\r\n throw new Error('Ingrid Session is corrupt');\r\n }\r\n }\r\n catch {\r\n // If problem with session it is best to clear and generate new session.\r\n handleClearSession();\r\n handleCreateSession();\r\n }\r\n finally {\r\n setIsLoading(false);\r\n }\r\n }\r\n else {\r\n handleCreateSession();\r\n }\r\n };\r\n\r\n const handleIngridInitialize = (\r\n session: SIWSessionDTO,\r\n HTMLSnippet: string\r\n ) => {\r\n setSession(session);\r\n sethtmlSnippet(htmlSnippet)\r\n // Injecting the HTMLSnippet into the dom will setup the app via iframes\r\n // and secure channels of communication between the iframes and the page\r\n widgetWrapperRef.current!.innerHTML = HTMLSnippet;\r\n\r\n // Most browsers will not automatically run an injected script\r\n // We have to clone it, to trick the browser into runing it\r\n replaceScriptNode(document.getElementById(\"shipwallet-container\"));\r\n\r\n // Whenever the user selects a different shipping option,\r\n // we want to update the shipping price in the 'total cost' section\r\n window._sw!((api) => {\r\n api.on(\"data_changed\", (data, meta) => {\r\n if (meta.price_changed) {\r\n setShippingPrice(data.price);\r\n }\r\n });\r\n });\r\n\r\n // The function below will setup listeners that just console log the received values\r\n // The events include, for example, address changes or courier instructions change\r\n //setupGeneralJSListeners();\r\n\r\n if (window._sw) {\r\n window._sw((api) => {\r\n api.on(\"door_code_changed\", (doorCode) =>\r\n console.log(\"door code changed: \", doorCode)\r\n );\r\n api.on(\"courier_instructions_changed\", (courierInstructions) =>\r\n console.log(\"courier instructions changed: \", courierInstructions)\r\n );\r\n\r\n api.on(\"data_changed\", (data, meta) => {\r\n console.log(\"data changed\", { data, meta });\r\n handleUpdateSession(session)\r\n });\r\n });\r\n }\r\n };\r\n\r\n const handleCreateSession = async () => {\r\n setIsLoading(true);\r\n\r\n try {\r\n const sessionResponse = await createSession();\r\n handleIngridInitialize(\r\n sessionResponse?.data.session,\r\n sessionResponse?.data.html_snippet\r\n );\r\n // Save session ID in case user leaves the checkout without finishing the purchase\r\n // We will use it on next checkout init to GET session instead of CREATING a new one\r\n window.localStorage.setItem(\r\n localStorageSessionIDKey,\r\n sessionResponse.data.session.id\r\n );\r\n } finally {\r\n setIsLoading(false);\r\n }\r\n };\r\n\r\n const handleUpdateSession = async (session, isChange = false) => {\r\n\r\n setIsLoading(true);\r\n try {\r\n // We need to suspend the widget, so the user cannot change anything while we're updating the session\r\n window._sw!((api) => api.suspend());\r\n\r\n // We update the session by simply adding another item to the cart and bumping the price\r\n if (session != null) {\r\n const updateSessionResponse = await updateSession(session!.id);\r\n\r\n setSession(updateSessionResponse?.data?.session);\r\n // Resuming the widget will make it interactive again\r\n // And cause it to sync with our backend, So that whatever changes you made\r\n // via `session.update`are visible on the widget now\r\n window._sw!((api) => api.resume());\r\n if (!isChange) {\r\n dispatch(\r\n deliveryCostUpdate(cartObj.articleNumber, cartObj.quantity, mapCartToAbort[cartObj.articleNumber])\r\n )\r\n dispatch(reloadPayment());\r\n }\r\n }\r\n\r\n } finally {\r\n setIsLoading(false);\r\n }\r\n\r\n };\r\n\r\n const handleClearSession = () => {\r\n window.localStorage.removeItem(localStorageSessionIDKey);\r\n setShippingPrice(null);\r\n widgetWrapperRef.current!.innerHTML = \"\";\r\n setSession(null);\r\n setSessionResult(null);\r\n };\r\n\r\n return (\r\n <div\r\n style={{\r\n textAlign: \"center\",\r\n width: \"100%\",\r\n // maxWidth: \"610px\", \r\n // paddingBottom: \"30px\",\r\n // paddingTop: \"15px\",\r\n }}\r\n >\r\n <Space direction=\"vertical\" align=\"center\" size=\"middle\">\r\n <div\r\n ref={widgetWrapperRef}\r\n // style={{ width: \"100%\", maxWidth: \"610px\" }}\r\n style={{ width: \"100%\" }}\r\n />\r\n\r\n\r\n {sessionResult && (\r\n <Card\r\n title=\"Session result\"\r\n style={cardStyle}\r\n headStyle={cardHeaderStyle}\r\n >\r\n <ReactJson\r\n collapsed={1}\r\n src={sessionResult}\r\n theme=\"grayscale:inverted\"\r\n style={{ textAlign: \"left\" }}\r\n />\r\n </Card>\r\n )}\r\n </Space>\r\n </div>\r\n );\r\n}\r\n\r\n// const cardStyle = { maxWidth: 610, width: \"100%\" };\r\nconst cardStyle = { width: \"100%\" };\r\nconst cardHeaderStyle: CSSProperties = {\r\n textAlign: \"left\",\r\n fontWeight: 500,\r\n};\r\n","import React, {\r\n Fragment,\r\n useCallback,\r\n useEffect,\r\n useRef,\r\n useState,\r\n} from 'react';\r\nimport { useDispatch, useSelector } from 'react-redux';\r\nimport {\r\n acceptTermsOfCondition,\r\n //upgrade8.7 setBusinessCustomer,\r\n setDelivery,\r\n setPayment,\r\n //upgrade8.7 reloadPayment,\r\n setStatusSubmitButton,\r\n submit,\r\n //upgrade8.7 setCustomerDetails,\r\n //upgrade8.7 setAlternativeAddress,\r\n //upgrade8.7 submitRequest,\r\n submitDone,\r\n submitError,\r\n userSubscribe,\r\n} from '../../Actions/Checkout.action';\r\n\r\n//upgrade8.7 import Cart from './Cart';\r\n\r\nimport constants, {\r\n PaymentIntegrationType,\r\n ShippingIntegrationType,\r\n} from '../../constants';\r\nimport { translate } from '../../Services/translation';\r\nimport Button from '../Button';\r\nimport CheckoutCart from './Checkout.Cart';\r\nimport CheckoutCustomerInfo, {\r\n validateAlternativeAddress,\r\n validateCustomerInfo,\r\n} from '../Checkout.CustomerInfo';\r\nimport CheckoutDeliveryMethods from '../Checkout.DeliveryMethods';\r\nimport CheckoutDiscountCodes from '../Checkout.DiscountCodes';\r\nimport CheckoutOrderInfo from '../Checkout.OrderInfo';\r\nimport CheckoutOrderNote from '../Checkout.OrderNote';\r\nimport CheckoutPaymentMethods from '../Checkout.PaymentMethods';\r\nimport {\r\n businessCustomerAdditionalDetailsSchema,\r\n businessCustomerDetailsSchema,\r\n privateCustomerAdditionalDetailsSchema,\r\n privateCustomerAddressSchema,\r\n privateCustomerAlternativeAddressSchema,\r\n businessCustomerAlternativeAddressSchema,\r\n} from '../Checkout.ValidationSchema';\r\nimport PaymentWidget from '../Payments/PaymentWidget';\r\nimport CheckoutBusinessCustomerShippingInfo from '../Checkout.BusinessCustomerShippingInfo';\r\nimport BusinessCustomerShippingAddress from '../Checkout.BusinessCustomerShippingAddress';\r\nimport IngridApp from '../Ingrid/IngridApp';\r\n\r\nconst Checkout = () => {\r\n const dispatch = useDispatch();\r\n const cart = useSelector((state) => state.cart);\r\n const checkout = useSelector((state) => state.checkout);\r\n\r\n const [shippingOptionVisibility, setShippingOptionVisibility] = useState(\r\n true\r\n );\r\n const [paymentOptionVisibility, setPaymentOptionVisibility] = useState(\r\n true\r\n );\r\n const [customerDetailsVisibility, setCustomerDetailsVisibility] = useState(\r\n true\r\n );\r\n const [deliveryWidgetVisibility, setDeliveryWidgetVisibility] = useState(\r\n true\r\n );\r\n const [paymentWidgetVisibility, setPaymentWidgetVisibility] = useState(\r\n true\r\n );\r\n const [orderSummaryVisibility, setOrderSummaryVisibility] = useState(true);\r\n const [signUpCheckboxVisibility, setSignUpCheckboxVisibility] = useState(\r\n true\r\n );\r\n\r\n const {\r\n payload: {\r\n customerDetails,\r\n alternativeAddress,\r\n selectedCompanyAddressId,\r\n selectedDeliveryMethod,\r\n selectedPaymentMethod,\r\n deliveryMethods,\r\n paymentMethods,\r\n },\r\n } = checkout;\r\n const [isEditingAddress, setIsEditingAddress] = useState(true);\r\n const [addressFormValue, setAddressFormValue] = useState({\r\n customerDetails,\r\n alternativeAddress,\r\n selectedCompanyAddressId,\r\n });\r\n const onSubmit = useCallback(() => dispatch(submit()), [dispatch]);\r\n const onSubmitError = useCallback(\r\n (error) => {\r\n dispatch(submitError(error));\r\n dispatch(submitDone(null));\r\n },\r\n [dispatch]\r\n );\r\n // upgrade8.7\r\n // const onCustomerDetailsChangeCb = useCallback(\r\n // (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 // // case 'shippingAddress':\r\n // // dispatch(setShippingAddress(propName, value));\r\n // // break;\r\n // }\r\n // },\r\n // [dispatch]\r\n // );\r\n\r\n const placeOrder = useCallback(() => {\r\n const { payload } = checkout,\r\n {\r\n isBusinessCustomer,\r\n selectedCompanyAddressId,\r\n acceptTermsOfCondition,\r\n selectedPaymentMethod,\r\n selectedDeliveryMethod,\r\n dropShipping,\r\n userSubscribe,\r\n } = payload;\r\n const notCustomerDetailFields = [\r\n 'selectedCompanyAddressId',\r\n 'selectedPaymentMethod',\r\n 'selectedDeliveryMethod',\r\n 'acceptTermsOfCondition',\r\n 'userSubscribe',\r\n ];\r\n const onError = (error, addressPath = 'customerDetails') => {\r\n error.path =\r\n notCustomerDetailFields.indexOf(error.path) >= 0\r\n ? error.path\r\n : `${addressPath}-${error.path}`;\r\n onSubmitError(error);\r\n dispatch(setStatusSubmitButton(true));\r\n };\r\n\r\n dispatch(setStatusSubmitButton(false));\r\n if (isBusinessCustomer) {\r\n if (dropShipping) {\r\n businessCustomerAlternativeAddressSchema\r\n .validate({\r\n ...payload.alternativeAddress,\r\n })\r\n .then(() => {\r\n dropShipDetailsSchema\r\n .validate({\r\n selectedCompanyAddressId,\r\n selectedPaymentMethod,\r\n selectedDeliveryMethod,\r\n acceptTermsOfCondition,\r\n userSubscribe,\r\n })\r\n .then(() => {\r\n onSubmit();\r\n })\r\n .catch((error) => {\r\n onError(error, 'dropShipDetails');\r\n });\r\n })\r\n .catch((error) => {\r\n onError(error, 'alternativeAddress');\r\n });\r\n } else {\r\n businessCustomerDetailsSchema\r\n .validate({\r\n ...payload.customerDetails,\r\n selectedCompanyAddressId,\r\n })\r\n .then(() => {\r\n businessCustomerAdditionalDetailsSchema\r\n .validate({\r\n selectedPaymentMethod,\r\n selectedDeliveryMethod,\r\n acceptTermsOfCondition,\r\n userSubscribe,\r\n })\r\n .then(() => {\r\n onSubmit();\r\n })\r\n .catch(onError);\r\n })\r\n .catch(onError);\r\n }\r\n } else {\r\n privateCustomerAddressSchema\r\n .validate({\r\n ...payload.customerDetails,\r\n })\r\n .then(() => {\r\n if (\r\n validateAlternativeAddress(payload.alternativeAddress)\r\n ) {\r\n privateCustomerAlternativeAddressSchema\r\n .validate({\r\n ...payload.alternativeAddress,\r\n })\r\n .then(() => {\r\n privateCustomerAdditionalDetailsSchema\r\n .validate({\r\n selectedPaymentMethod,\r\n selectedDeliveryMethod,\r\n acceptTermsOfCondition,\r\n userSubscribe,\r\n })\r\n .then(() => {\r\n onSubmit();\r\n })\r\n .catch(onError);\r\n })\r\n .catch((error) => {\r\n onError(error, 'alternativeAddress');\r\n });\r\n } else {\r\n privateCustomerAdditionalDetailsSchema\r\n .validate({\r\n selectedPaymentMethod,\r\n selectedDeliveryMethod,\r\n acceptTermsOfCondition,\r\n userSubscribe,\r\n })\r\n .then(() => {\r\n onSubmit();\r\n })\r\n .catch(onError);\r\n }\r\n })\r\n .catch(onError);\r\n }\r\n }, [checkout, dispatch, onSubmit, onSubmitError]);\r\n\r\n const resetVisibilityValues = useCallback(() => {\r\n setShippingOptionVisibility(true);\r\n setPaymentOptionVisibility(true);\r\n setCustomerDetailsVisibility(true);\r\n setDeliveryWidgetVisibility(true);\r\n setPaymentWidgetVisibility(true);\r\n setOrderSummaryVisibility(true);\r\n setSignUpCheckboxVisibility(true);\r\n }, []);\r\n\r\n const checkIntegrationTypeExist = useCallback(\r\n (integrationTypeCheck) => {\r\n return deliveryMethods.find(\r\n (method) => method.integrationType === integrationTypeCheck\r\n );\r\n },\r\n [deliveryMethods]\r\n );\r\n\r\n const firstRender = useRef(true);\r\n\r\n // Sets default value on first load.\r\n useEffect(() => {\r\n if (!firstRender.current) {\r\n return;\r\n }\r\n firstRender.current = false;\r\n\r\n if (!checkout) {\r\n return;\r\n }\r\n\r\n const {\r\n selectedPaymentMethod,\r\n selectedDeliveryMethod,\r\n customerDetails,\r\n alternativeAddress,\r\n shippingAddresses,\r\n } = checkout.payload;\r\n\r\n // set selected value for payment method on load.\r\n selectedPaymentMethod && dispatch(setPayment(selectedPaymentMethod));\r\n // set selected value for delivery method on load.\r\n selectedDeliveryMethod && dispatch(setDelivery(selectedDeliveryMethod));\r\n // fill default select value to the state\r\n setAddressFormValue((previousState) => ({\r\n ...previousState,\r\n customerDetails: {\r\n ...(customerDetails ?? {}),\r\n country:\r\n customerDetails?.country ?? constants.countries[0].value,\r\n },\r\n alternativeAddress: {\r\n ...(alternativeAddress ?? {}),\r\n country:\r\n alternativeAddress?.country ?? constants.countries[0].value,\r\n },\r\n }));\r\n }, [checkout, dispatch]);\r\n\r\n // Show or hide different sections depending on payment and delivery methods.\r\n useEffect(() => {\r\n resetVisibilityValues();\r\n switch (selectedPaymentMethod?.integrationType) {\r\n case PaymentIntegrationType.IframeCheckout:\r\n setCustomerDetailsVisibility(false);\r\n setOrderSummaryVisibility(false);\r\n break;\r\n case PaymentIntegrationType.PaymentWidgets:\r\n if (isEditingAddress) {\r\n setPaymentWidgetVisibility(false);\r\n }\r\n setOrderSummaryVisibility(false);\r\n setSignUpCheckboxVisibility(false);\r\n break;\r\n case PaymentIntegrationType.DirectPayment:\r\n if (isEditingAddress) {\r\n setOrderSummaryVisibility(false);\r\n }\r\n setPaymentWidgetVisibility(false);\r\n break;\r\n }\r\n if (\r\n checkIntegrationTypeExist(ShippingIntegrationType.DeliveryCheckout)\r\n ) {\r\n return setShippingOptionVisibility(false);\r\n }\r\n if (\r\n checkIntegrationTypeExist(ShippingIntegrationType.PaymentCheckout)\r\n ) {\r\n return (\r\n setShippingOptionVisibility(false) &&\r\n setDeliveryWidgetVisibility(false)\r\n );\r\n }\r\n if (\r\n selectedDeliveryMethod?.integrationType ===\r\n ShippingIntegrationType.Inline\r\n ) {\r\n setDeliveryWidgetVisibility(false);\r\n }\r\n }, [\r\n selectedDeliveryMethod,\r\n selectedPaymentMethod,\r\n deliveryMethods,\r\n paymentMethods,\r\n resetVisibilityValues,\r\n checkIntegrationTypeExist,\r\n isEditingAddress,\r\n ]);\r\n\r\n // Update place order button's status when the state of Customer Information form is changed.\r\n useEffect(() => {\r\n dispatch(setStatusSubmitButton(false));\r\n if (isEditingAddress) {\r\n return;\r\n }\r\n validateCustomerInfo(\r\n addressFormValue,\r\n checkout.payload.isBusinessCustomer\r\n )\r\n .then(() => {\r\n dispatch(setStatusSubmitButton(true));\r\n })\r\n .catch(() => {\r\n dispatch(setStatusSubmitButton(false));\r\n });\r\n }, [\r\n dispatch,\r\n isEditingAddress,\r\n addressFormValue,\r\n checkout.payload.isBusinessCustomer,\r\n ]);\r\n\r\n // Scroll the the first field that has validation error when saving the form.\r\n useEffect(() => {\r\n if (checkout.result && checkout.result.redirectUrl) {\r\n window.location = checkout.result.redirectUrl;\r\n return;\r\n }\r\n\r\n if (!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(\r\n `[data-error-for=\"${errorKeys[0]}\"]`\r\n );\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 }, [checkout.result, checkout.errors]);\r\n\r\n if (!cart || !cart.orderRows || cart.orderRows.length < 1) {\r\n return (\r\n <div className=\"row\">\r\n <div className=\"columns small-12\">\r\n <h2 className=\"checkout__title checkout__title--empty\">\r\n {translate(`checkout.cart.empty`)}\r\n </h2>\r\n </div>\r\n </div>\r\n );\r\n }\r\n\r\n const { payload, errors = {} } = checkout,\r\n {\r\n paymentWidget,\r\n authenticated,\r\n isBusinessCustomer,\r\n checkoutMode,\r\n showDeliveryMethods,\r\n isDropShippingEnabled,\r\n // selectedCompanyAddressId,\r\n companyAddresses,\r\n companyName,\r\n } = payload;\r\n const responseString = paymentWidget ? paymentWidget.responseString : null;\r\n const updateKey = paymentWidget ? paymentWidget._force_update : null;\r\n const selectedAddress =\r\n selectedCompanyAddressId && companyAddresses\r\n ? companyAddresses.find(\r\n (address) => address.systemId === selectedCompanyAddressId\r\n )\r\n : null;\r\n const getCountry = (address) => {\r\n const addressCountry = constants.countries\r\n ? constants.countries.find(\r\n (country) => country.value === address.country\r\n )\r\n : null;\r\n return addressCountry ? addressCountry.text : address.country;\r\n };\r\n\r\n return (\r\n <Fragment>\r\n <CheckoutCart errors={errors} />\r\n {<CheckoutDiscountCodes />}\r\n\r\n {shippingOptionVisibility &&\r\n isBusinessCustomer && ( ////upgrade8.7 showDeliveryMethods\r\n <Fragment>\r\n <div className=\"row\">\r\n <div className=\"columns checkout-column small-12\">\r\n <h3 className=\"checkout__section-title\">\r\n {translate('checkout.delivery.title')}\r\n </h3>\r\n </div>\r\n </div>\r\n <CheckoutDeliveryMethods errors={errors} />\r\n </Fragment>\r\n )}\r\n\r\n {isBusinessCustomer && isDropShippingEnabled && (\r\n <CheckoutBusinessCustomerShippingInfo />\r\n )}\r\n\r\n {customerDetailsVisibility && (\r\n <CheckoutCustomerInfo\r\n checkout={checkout}\r\n addressFormValue={addressFormValue}\r\n isEditingAddress={isEditingAddress}\r\n setAddressFormValue={setAddressFormValue}\r\n setIsEditingAddress={setIsEditingAddress}\r\n signUpCheckboxVisibility={signUpCheckboxVisibility}\r\n />\r\n )}\r\n\r\n {isBusinessCustomer && !isDropShippingEnabled && (\r\n <section className=\"row checkout-info__container1111\">\r\n <div className=\"small-12 medium-6\">\r\n <BusinessCustomerShippingAddress />\r\n </div>\r\n </section>\r\n )}\r\n\r\n {!isBusinessCustomer && (\r\n <section className=\"row checkout-info__container1234\">\r\n <div className=\"small-12\">\r\n <IngridApp />\r\n </div>\r\n </section>\r\n )}\r\n\r\n {isBusinessCustomer && paymentOptionVisibility && (\r\n <CheckoutPaymentMethods errors={errors} />\r\n )}\r\n\r\n {paymentWidget && paymentWidgetVisibility && (\r\n <PaymentWidget\r\n key={updateKey}\r\n responseString={responseString}\r\n />\r\n )}\r\n\r\n {orderSummaryVisibility && (\r\n <Fragment>\r\n <div className=\"row\">\r\n <div className=\"columns checkout-column small-12\">\r\n <h3 className=\"checkout__section-title\">\r\n {translate('checkout.order.title')}\r\n </h3>\r\n </div>\r\n </div>\r\n\r\n <section className=\"row checkout-info__container checkout-info__summary\">\r\n <CheckoutOrderNote />\r\n <CheckoutOrderInfo />\r\n </section>\r\n\r\n <div className=\"row\">\r\n <div className=\"columns checkout-column small-12\">\r\n <input\r\n className=\"checkout-info__checkbox-input\"\r\n type=\"checkbox\"\r\n id=\"acceptTermsOfCondition\"\r\n checked={payload.acceptTermsOfCondition}\r\n onChange={(event) =>\r\n dispatch(\r\n acceptTermsOfCondition(\r\n event.target.checked\r\n )\r\n )\r\n }\r\n />\r\n <label\r\n className=\"checkout-info__checkbox-label\"\r\n htmlFor=\"acceptTermsOfCondition\"\r\n >\r\n {translate(\r\n 'checkout.terms.acceptTermsOfCondition'\r\n )}{' '}\r\n <a\r\n className=\"checkout__link\"\r\n href={payload.termsUrl}\r\n target=\"_blank\"\r\n rel=\"noreferrer\"\r\n >\r\n {translate('checkout.terms.link')}\r\n </a>\r\n </label>\r\n {errors['acceptTermsOfCondition'] && (\r\n <span\r\n className=\"form__validator--error form__validator--top-narrow\"\r\n data-error-for=\"acceptTermsOfCondition\"\r\n >\r\n {errors['acceptTermsOfCondition'][0]}\r\n </span>\r\n )}\r\n </div>\r\n </div>\r\n\r\n <div className=\"row checkout__submit\">\r\n <div className=\"columns checkout-column small-12\">\r\n {!authenticated &&\r\n (isBusinessCustomer ||\r\n checkoutMode ===\r\n constants.checkoutMode.companyCustomers) ? (\r\n <Button\r\n className=\"button checkout__submit-button\"\r\n onClick={() =>\r\n (location.href = payload.loginUrl)\r\n }\r\n title={translate('checkout.login.to.placeorder')}\r\n >\r\n </Button>\r\n ) : (\r\n <Button\r\n disabled={!checkout.enableConfirmButton}\r\n className=\"button checkout__submit-button\"\r\n onClick={placeOrder}\r\n title={translate('checkout.placeorder')}\r\n type=\"submit\"\r\n />\r\n\r\n ////upgrade8.7 <button\r\n // type=\"submit\"\r\n // className=\"button checkout__submit-button\"\r\n // disabled={checkout.isSubmitting}\r\n // onClick={placeOrder}\r\n // >\r\n // {translate('checkout.placeorder')}\r\n // </button>\r\n )}\r\n </div>\r\n </div>\r\n </Fragment>\r\n )}\r\n\r\n <div className=\"row\">\r\n {errors && errors['general'] && (\r\n <p className=\"checkout__validator--error\">\r\n {errors['general'][0]}\r\n </p>\r\n )}\r\n {errors && errors['payment'] && (\r\n <p className=\"checkout__validator--error\">\r\n {errors['payment'][0]}\r\n </p>\r\n )}\r\n </div>\r\n </Fragment>\r\n );\r\n};\r\n\r\nexport default Checkout;\r\n"],"names":["postConversionEvent","async","event","eventName","cDetails","post","event_id","ecommerce","transaction_id","fb_event_id","event_name","event_source_url","window","location","href","custom_data","value","currency","content_name","document","title","content_ids","items","map","x","item_id","content_type","user_data","email","em","firstName","fn","lastName","ln","phoneNumber","ph","then","response","json","d","console","log","catch","error","message","rootRoute","addToCartEvent","articleNumber","quantity","addToDataLayer","Cookiebot","consent","marketing","removeFromCartEvent","beginCheckoutEvent","data","dataLayer","push","setBusinessCustomer","isBusinessCustomer","type","CHECKOUT_SET_PRIVATE_CUSTOMER","payload","updateCustomerDetails","key","CHECKOUT_UPDATE_CUSTOMER_INFO","setDelivery","method","dispatch","getState","CHECKOUT_SET_DELIVERY","selectedDeliveryMethod","checkout","put","result","loadCart","paymentWidget","setPaymentWidget","ex","catchError","submitError","setCountry","systemId","CHECKOUT_SET_COUNTRY","selectedCountry","deliveryMethods","CHECKOUT_SET_PAYMENT","paymentMethods","selectedPaymentMethod","setPayment","modelState","payment","reloadPayment","CHECKOUT_SET_PAYMENT_WIDGET","setDiscountCode","discountCode","CHECKOUT_SET_DISCOUNT_CODE","setUsedDiscountCodes","usedDiscountCodes","CHECKOUT_SET_USED_DISCOUNT_CODE","_submit","url","model","submitDone","setStatusSubmitButton","CHECKOUT_SUBMIT","CHECKOUT_SUBMIT_ERROR","CHECKOUT_SET_STATUS_SUBMIT_BUTTON","enableConfirmButton","setValidateStatus","isValidating","CHECKOUT_VALIDATE_ADDRESS","onClick","disabled","className","complimentary","length","translate","product","index","src","imageUrl","name","undefined","price","campaignPrice","formattedCampaignPrice","formattedPrice","mapCartToAbort","quantityDispatch","debounce","AbortController","update","reloadIngrid","loadError","useDispatch","removingRow","setRemovingRow","useState","showProductsInPackage","setShowProductsInPackage","cart","useSelector","state","orderRows","setOrderRows","discountRows","complimentaryProducts","useEffect","removeOrderRow","useCallback","errorQuantity","errorName","getElementById","innerText","handleQuantityInput","minimumQuantity","maximumQuantity","quantityStepping","rowSystemId","ensureCorrectness","test","cancel","floatQuantity","parseFloat","validValue","isNaN","parseInt","addQty","findIndex","item","abort","tempOrderRows","ProductImage","order","image","alt","ProductName","Fragment","bundleVariants","role","brand","ProductPrice","cartProductComplimentary","filter","complimentaryBaseArticleNumber","ProductQuantity","isFreeGift","id","min","maxLength","max","toString","step","onChange","target","maximumquantity","quantitystepping","onBlur","ProductTotalPrice","totalCampaignPrice","totalPrice","RemoveBtn","CartTotal","orderTotal","errors","__litium","preloadState","cssClass","autoComplete","placeholder","label","htmlFor","values","idx","getCountry","address","addressCountry","constants","countries","find","country","text","onSave","onCompanyAddressChange","valueForm","isEditingAddress","companyAddresses","companyName","authenticated","input","stateKey","toLowerCase","selectedAddress","useMemo","selectedCompanyAddressId","zipCode","city","join","formattedAddress","signUpCheckboxVisibility","signUp","customerDetails","alternativeAddress","checked","showAlternativeAddress","CHECKOUT_SET_SHOW_ALTERNATIVE_ADDRESS","CHECKOUT_SET_SIGN_UP","setSignUp","privateCustomerAdditionalDetailsSchema","object","shape","acceptTermsOfCondition","boolean","required","oneOf","privateCustomerAddressSchema","string","mixed","notOneOf","privateCustomerAlternativeAddressSchema","businessCustomerDetailsSchema","businessCustomerAdditionalDetailsSchema","businessCustomerAlternativeAddressSchema","validateAlternativeAddress","validateCustomerInfo","validate","addressPath","addressFormValue","setAddressFormValue","setIsEditingAddress","loginUrl","checkoutMode","onCustomerInfoChange","previousState","companyAddressId","onEditForm","onUpdateCustomerDetails","notCustomerDetailFields","CLEAR_ERROR","updatedData","channelTwoLetterIsoCode","CHECKOUT_SET_SELECTED_COMPANY_ADDRESS","setSelectedCompanyAddress","c","path","indexOf","finally","privateCustomerInfoComponent","businessCustomerInfoComponent","both","companyCustomers","search","discountCodeEl","useRef","current","ref","remove","deleteDiscountCode","discount","deliveryCost","paymentCost","grandTotal","vat","orderNote","CHECKOUT_SET_ORDER_NOTE","setOrderNote","scriptPattern","scriptFilePattern","extractScripts","domString","matches","html","scripts","scriptFiles","exec","replace","trim","executeScript","domId","scriptContent","script","createElement","appendChild","createTextNode","e","includeScript","srciptUrl","React","responseString","paymentSession","WidgetCheckout","DynamicComponent","loader","args","renderWidget","shippingAddresses","selectedShippingAddressId","onShippingAddressChange","addressId","CHECKOUT_SET_SELECTED_SHIPPING_ADDRESS","setSelectedShippingAddress","isDropShipSelected","setDropShipSelected","isStoreSelected","setStoreSelected","shipping","setShipping","shippingTypes","dropShipping","onShippingTypeChange","CHECKOUT_SET_SELECTED_SHIPPING_TYPE","setDropShipping","token","localStorage","getItem","serviceURL","replaceScriptNode","node","tagName","isScriptNode","isExternalScript","parentNode","replaceChild","innerHTML","i","attributes","setAttribute","cloneScriptNode","children","childNodes","localStorageSessionIDKey","IngridApp","widgetWrapperRef","shippingPrice","setShippingPrice","session","setSession","htmlSnippet","sethtmlSnippet","sessionResult","setSessionResult","isLoading","setIsLoading","firstRender","cartObj","ingridObj","ingrid","isReload","setReLoad","showInfo","handleUpdateSession","initDeliveryCheckout","existingSessionID","getSessionResponse","sessionID","axios","headers","warn","Error","status","toUpperCase","handleIngridInitialize","html_snippet","handleClearSession","handleCreateSession","HTMLSnippet","_sw","api","on","meta","price_changed","doorCode","courierInstructions","sessionResponse","setItem","isChange","suspend","updateSessionResponse","resume","deliveryCostUpdate","removeItem","style","textAlign","width","direction","align","size","cardStyle","headStyle","cardHeaderStyle","collapsed","theme","fontWeight","shippingOptionVisibility","setShippingOptionVisibility","paymentOptionVisibility","setPaymentOptionVisibility","customerDetailsVisibility","setCustomerDetailsVisibility","deliveryWidgetVisibility","setDeliveryWidgetVisibility","paymentWidgetVisibility","setPaymentWidgetVisibility","orderSummaryVisibility","setOrderSummaryVisibility","setSignUpCheckboxVisibility","onSubmit","onSubmitError","placeOrder","userSubscribe","onError","dropShipDetailsSchema","resetVisibilityValues","checkIntegrationTypeExist","integrationTypeCheck","integrationType","PaymentIntegrationType","IframeCheckout","PaymentWidgets","DirectPayment","ShippingIntegrationType","DeliveryCheckout","PaymentCheckout","Inline","redirectUrl","errorKeys","Object","keys","errorNode","querySelector","inputNode","parentElement","setTimeout","focus","scrollIntoView","behavior","showDeliveryMethods","isDropShippingEnabled","updateKey","_force_update","CHECKOUT_ACCEPT_TERMS_OF_CONDITION","termsUrl","rel"],"sourceRoot":""}