{"version":3,"sources":["webpack:///./Scripts/Actions/Stockinformation.action.js","webpack:///./Scripts/Components/BuyButton.js","webpack:///./Scripts/Components/Product/PickupOnly.js","webpack:///./Scripts/Components/Product/ProductOption.js","webpack:///./Scripts/Components/FormElements/TextInput.js","webpack:///./Scripts/Actions/ClickAndCollect.action.js","webpack:///./Scripts/Components/Product/ClickAndCollect.js","webpack:///./Scripts/Components/AddToCart.js","webpack:///./Scripts/Components/Product/ProductOptionContainer.js","webpack:///./Scripts/Components/Product/ProductPrice.js","webpack:///./Scripts/Components/withReactiveStyleBuyButton.js","webpack:///./images/warning-yellow.svg"],"names":["getStockInformation","articleNumber","quantity","dispatch","get","then","response","json","data","receive","catch","ex","catchError","error","loadError","type","STOCKINFORMATION_RECEIVE","payload","BuyButton","label","quantityFieldId","href","cssClass","onClick","trackingProduct","checkoutProducts","isQuickBuy","Fragment","className","e","preventDefault","rel","props","checkoutUrl","useSelector","state","cart","useDispatch","configurator","goToCheckout","window","location","Button","withReactiveStyleBuyButton","async","document","getElementById","value","trackAddToCart","trackCheckoutFromQuickBuy","isConfiguratorProduct","preConfiguredArticleNumbers","currentProduct","baseArticleNumber","priceData","id","selectedModules","length","addToCartBulk","map","module","configurationArticleNumber","price","listPrice","priceBasedArticleNumber","addToCart","setTimeout","addToCartService","submitPrepaymentAmount","prepaymentAmount","cartToggle","addedProduct","setQuantityValue","reloadShipment","PickupOnly","small","iconClassName","src","warningSvg","alt","translate","productOption","sections","filter","s","options","section","sectionIndex","key","open","name","option","index","optionValue","showImages","url","image","height","width","PlaceholderImg","checked","selected","onChange","placeholder","cssBlock","minlength","maxlength","onKeyPress","onBlur","minLength","maxLength","event","add","post","ok","clickAndCollectSubmitted","console","PRODUCT_LOAD_ERROR","PRODUCT_CLICK_AND_COLLECT_SUBMITTED","orderSubmitted","product","stockStatus","showModal","setShowModal","useState","inputValues","setinputValues","validationErrors","setValidationErrors","clickAndCollect","isLoading","setIsLoading","scrollbarWidth","innerWidth","documentElement","clientWidth","toggleShowModal","body","querySelector","style","marginRight","classList","remove","handleInputChange","target","updatedValue","formSchema","object","shape","customerName","string","required","telephone","test","email","main","inStock","inStockQuantity","thumbnail","ProductPrice","variantCount","match","role","validate","abortEarly","collectData","baseProductId","configuratorPrice","setSubmitData","parseFloat","addToCollectService","errors","updatedValidationErrors","inner","forEach","i","path","message","setQuantity","minValue","maxValue","min","max","parseInt","prop","availableOptions","moduleOptions","stockInformationState","setProductOption","JSON","parse","setProduct","setPrice","hasClubPrice","constants","dangerouslySetInnerHTML","__html","replace","temporarilyDisabledText","enableBuyButton","showBuyButton","checkedOptions","Object","keys","oversellEnabled","soldOut","ProductStockInformationContainer","stockInformation","isOnDisplay","ReactHtmlParser","productOnDisplayShelfText","isPickupOnly","isLoaded","pricePrefix","isCampaignActive","isCampaignPrice","setPricePrefix","hasOwnProperty","hasCampaignPrice","campaignPrice","clubPrice","itemProp","currencyFormat","hasRetailPrice","retailPrice","getPriceComponent","content","unitOfMeasurementTitle","currency","StateStyles","WrappedComponent","stylePrefix","stateClass","setStateClass","startTime","useRef","useEffect","changeState","complete","autoReset","current","resetTimeout","onButtonClick","params","Date","now","loadingDuration","minimumLoadingTime","onComplete","exports"],"mappings":"yJAQO,MAAMA,EAAsB,CAACC,EAAeC,IAAcC,IACtDC,QAAK,gCAA+BH,cAA0BC,KAChEG,MAAMC,GAAaA,EAASC,SAC5BF,MAAMG,GAASL,EAASM,EAAQD,MAChCE,OAAOC,GAAOR,GAASS,OAAWD,GAAKE,IAAUC,QAAUD,QAG9DJ,EAAWD,IAAD,CACZO,KAAMC,KACNC,QAAS,CACLT,W,uLCFR,MAAMU,EAAY,EAChBC,QACAlB,gBACAmB,kBACAC,OACAC,WACAC,UACAC,kBACAC,mBACAC,gBAGE,gBAAC,EAAAC,SAAD,KACG1B,EACC,qBACE2B,UAAWN,EACXC,QAAUM,IACRA,EAAEC,iBACFP,EAAQ,CACNtB,gBACAmB,kBACAI,kBACAC,mBACAC,gBAGJL,KAAMA,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EAAW,UAAY,MACxEsH,OAAehK,EAAMkK,YAAYlK,cAJvC,EAeGmK,CAxFH9K,EAA4BsK,eAAerK,EAAenD,eAAiBkD,EAA4BC,EAAenD,eAAiB6D,GA2FzIA,EAAMiK,gBACH,wBAAMF,SAAS,MAAMK,QAASpK,EAAMkK,YAAYlK,MAAMqK,yBAEzDrK,EAAMsK,SAAS7K,IACZ,wBAAMsK,SAAS,gBAAgBK,QAASpK,EAAMsK,SAAS7K,Q,4QCjHvE,MAAM8K,EACO,YADPA,EAEO,YAFPA,EAGK,UAgBI,SAAS1L,EACpB2L,EACA/M,EACAgN,GAEA,OAAQvM,IACJ,MAAOwM,EAAYC,IAAiB7G,cAAS,IACvC8G,GAAYC,YAAO,IAEzBC,gBAAU,IACC,KACHH,EAAc,MAEnB,IAYH,MAAMI,EAAeC,IACjBL,EACK,GAAEF,IACCO,EAAWT,EAAsBA,MAMrB,IAApBrM,EAAM+M,WACF7K,YAAW,KAnBfuK,EAAc,IACdC,EAAUM,QAAU,IAoBbhN,EAAMiN,cAAgB,MAiBjCrM,eAAesM,EAAcC,GAjCzBV,EAAe,GAAEF,IAAcF,KAC/BK,EAAUM,QAAUI,KAAKC,OAkB7B,SAAoBP,GAChB,MAAMQ,EAAkBF,KAAKC,MAAQX,EAAUM,QACzCO,EAAqBvN,EAAMuN,oBAAsB,IAGnDD,GAAmBC,EACnBV,EAAYC,GAEZ5K,YAAW,KACP2K,EAAYC,KACbS,EAAqBD,GAO5BE,OADmBjO,EAAQ4N,IAI/B,OACI,wBAAMvN,UAAW4M,GACb,gBAACF,EAAD,GACI/M,QAAU4N,GAAWD,EAAcC,IAC/BnN,Q,UCrFxB4B,EAAO6L,QAAU","file":"649.695a3cd9016175a58a6c.js","sourcesContent":["import { get } from '../Services/http';\r\nimport { catchError } from './Error.action';\r\n\r\nimport {\r\n STOCKINFORMATION_RECEIVE,\r\n} from '../constants';\r\nimport {loadError} from \"./Configurator.action\";\r\n\r\nexport const getStockInformation = (articleNumber, quantity) => (dispatch) => {\r\n return get(`/api/productstockinformation/${articleNumber}?quantity=${quantity}`)\r\n .then((response) => response.json())\r\n .then((data) => dispatch(receive(data)))\r\n .catch((ex) => dispatch(catchError(ex, (error) => loadError(error))));\r\n}\r\n\r\nconst receive = (data) => ({\r\n type: STOCKINFORMATION_RECEIVE,\r\n payload: {\r\n data\r\n }\r\n})","import React, { Fragment } from 'react';\r\nimport { add as addToCartService } from '../Services/Cart.service';\r\nimport withReactiveStyleBuyButton from './withReactiveStyleBuyButton';\r\nimport { receive, loadError, show as cartToggle } from '../Actions/Cart.action';\r\nimport { catchError } from '../Actions/Error.action';\r\nimport { useDispatch, useSelector } from 'react-redux';\r\nimport { addToCart, addToCartBulk } from '../Actions/Configurator.action';\r\nimport { getStockInformation } from '../Actions/Stockinformation.action';\r\n\r\nimport {\r\n trackAddToCart,\r\n trackCheckoutFromQuickBuy,\r\n} from '../Services/tracking';\r\nimport { reloadShipment } from '../Actions/NShift.action';\r\nimport { submitPrepaymentAmount } from '../Actions/Checkout.action';\r\n\r\nconst BuyButton = ({\r\n label,\r\n articleNumber,\r\n quantityFieldId,\r\n href,\r\n cssClass,\r\n onClick,\r\n trackingProduct,\r\n checkoutProducts,\r\n isQuickBuy,\r\n}) => {\r\n return (\r\n <Fragment>\r\n {articleNumber ? (\r\n <a\r\n className={cssClass}\r\n onClick={(e) => {\r\n e.preventDefault();\r\n onClick({\r\n articleNumber,\r\n quantityFieldId,\r\n trackingProduct,\r\n checkoutProducts,\r\n isQuickBuy,\r\n });\r\n }}\r\n href={href || '#'}\r\n rel=\"nofollow\"\r\n >\r\n {label}\r\n </a>\r\n ) : (\r\n <a className={cssClass} href={href || '#'} rel=\"nofollow\">\r\n {label}\r\n </a>\r\n )}\r\n </Fragment>\r\n );\r\n};\r\n\r\nconst StyledButton = (props) => {\r\n const { checkoutUrl } = useSelector((state) => state.cart);\r\n const dispatch = useDispatch();\r\n const { configurator } = useSelector((state) => state);\r\n\r\n const goToCheckout = () => {\r\n return (window.location.href = checkoutUrl);\r\n };\r\n\r\n const onClick = async ({\r\n articleNumber,\r\n quantityFieldId,\r\n trackingProduct,\r\n checkoutProducts,\r\n isQuickBuy,\r\n }) => {\r\n const quantity = quantityFieldId\r\n ? document.getElementById(quantityFieldId).value\r\n : 1;\r\n\r\n if (trackingProduct) {\r\n trackAddToCart(trackingProduct, quantity);\r\n }\r\n if (isQuickBuy) {\r\n trackCheckoutFromQuickBuy(checkoutProducts, trackingProduct);\r\n }\r\n if (props.isConfiguratorProduct && !configurator.preConfiguredArticleNumbers[configurator.currentProduct.articleNumber]) {\r\n let baseArticleNumber = configurator.priceData.id;\r\n\r\n // Modules\r\n if (configurator.selectedModules.length > 0) {\r\n dispatch(\r\n addToCartBulk(\r\n configurator.selectedModules.map((module) => {\r\n return {\r\n baseArticleNumber,\r\n configurationArticleNumber: module.articleNumber,\r\n quantity: 1,\r\n price: module.price.listPrice,\r\n priceBasedArticleNumber: module.articleNumber\r\n };\r\n })\r\n )\r\n );\r\n }\r\n //No modules\r\n else {\r\n let configurationArticleNumber =\r\n configurator.currentProduct.articleNumber;\r\n let price = configurator.currentProduct.price.listPrice;\r\n\r\n dispatch(\r\n addToCart({\r\n baseArticleNumber,\r\n configurationArticleNumber,\r\n quantity,\r\n price,\r\n priceBasedArticleNumber: configurationArticleNumber\r\n })\r\n );\r\n setTimeout(() => {\r\n if (props.goToCheckout) {\r\n goToCheckout();\r\n }\r\n }, 4000);\r\n }\r\n } else {\r\n try {\r\n const cart = await addToCartService({ articleNumber, quantity });\r\n dispatch(submitPrepaymentAmount(cart?.prepaymentAmount))\r\n dispatch(cartToggle(true));\r\n setTimeout(() => {\r\n dispatch(cartToggle(false));\r\n }, 2000);\r\n const addedProduct = articleNumber;\r\n props.setQuantityValue(1)\r\n dispatch(getStockInformation(articleNumber, 1));\r\n dispatch(receive({ ...cart, addedProduct }));\r\n if (props.goToCheckout) {\r\n goToCheckout();\r\n }\r\n if (isQuickBuy) {\r\n dispatch(reloadShipment());\r\n }\r\n\r\n return true;\r\n } catch (ex) {\r\n dispatch(catchError(ex, (error) => loadError(error)));\r\n return false;\r\n }\r\n }\r\n };\r\n const Button = withReactiveStyleBuyButton(BuyButton, onClick, 'buy-button');\r\n return <Button {...props} />;\r\n};\r\n\r\nexport default StyledButton;\r\n","import React from \"react\"\r\nimport { translate } from \"../../Services/translation\"\r\nimport warningSvg from \"../../../images/warning-yellow.svg\"\r\nexport default function PickupOnly({ small = false }) {\r\n\r\n const className = `pickup-only ${small ? 'small' : ''}`\r\n const iconClassName = `${small ? 'w-4 h-4' : 'w-6 h-6'}`\r\n return (\r\n <div className={className}>\r\n <img src={warningSvg} alt={`warning`} className={iconClassName} /><span>{translate('product.delivery.pickup-only')}</span>\r\n </div>\r\n )\r\n}\r\n","import React, { Fragment } from 'react';\r\nimport PlaceholderImg from '../../../images/bilde-mangler.svg';\r\n\r\nconst ProductOption = ({ productOption }) => {\r\n \r\n return (\r\n <Fragment>\r\n <ul className=\"config-section-list\">\r\n {productOption &&\r\n productOption.sections &&\r\n productOption.sections\r\n .filter((s) => s.options.length)\r\n .map((section, sectionIndex) => {\r\n return (\r\n <li key={`section-${section.id}`}>\r\n <div className=\"product-detail__configure\">\r\n <details open>\r\n <summary>\r\n <span className=\"config-section__title\">\r\n {section.name}\r\n </span>\r\n </summary>\r\n\r\n <div className=\"product-detail__configure--content\">\r\n {section &&\r\n section.options.map((option, index) => {\r\n return (\r\n <div className=\"config-groups__group\" key={option.optionValue + \"-\" + index}>\r\n { (option.showImages) &&\r\n <a href={option.url}>\r\n {option.image ?\r\n <img src={option.image} height=\"85\" width=\"120\" alt={option.name} />\r\n :\r\n <img src={PlaceholderImg} height=\"85\" width=\"120\" alt={option.name}/>\r\n }\r\n </a>\r\n }\r\n <label className={`vardim-checkbox`}>\r\n <a href={option.url} className=\"config-section__subtitle\">{option.name}</a>\r\n <Fragment>\r\n <input \r\n type=\"checkbox\" \r\n checked={option.selected} \r\n className=\"vardim-checkbox__input\" \r\n onChange={() => window.location.href = option.url}\r\n />\r\n <span className={`vardim-checkbox__checkmark`}></span>\r\n </Fragment>\r\n </label>\r\n </div>\r\n );\r\n })}\r\n </div>\r\n </details>\r\n </div>\r\n </li>\r\n );\r\n })}\r\n </ul>\r\n </Fragment>\r\n );\r\n};\r\n\r\nexport default ProductOption;\r\n","import React from 'react';\r\n\r\nexport const TextInput = ({\r\n name = \"\",\r\n placeholder = \"\",\r\n id = \"\",\r\n cssBlock = \"\",\r\n label = \"\",\r\n value = \"\",\r\n minlength = \"\",\r\n maxlength = \"\",\r\n type = \"text\",\r\n onChange = {},\r\n onKeyPress = {},\r\n onBlur = {},\r\n error = \"\",\r\n}) => {\r\n const handleChange = (event) => {\r\n if (typeof onChange === \"function\") {\r\n onChange(event);\r\n }\r\n };\r\n const handleKeyPress = (event) => {\r\n if (typeof onKeyPress === \"function\") {\r\n onKeyPress(event);\r\n }\r\n };\r\n const handleBlur = (event) => {\r\n if (typeof onBlur === \"function\") {\r\n onBlur(event);\r\n }\r\n };\r\n\r\n return (\r\n <div className={`${cssBlock}__input-wrapper`}>\r\n {label && <label className={`form__label ${cssBlock}__input-label`}>{label}</label>}\r\n <input\r\n id={id}\r\n name={name}\r\n type={type}\r\n className={`form__input ${cssBlock}__input ${error ? \"form__input--error\" : \"\"}`}\r\n placeholder={placeholder}\r\n value={value}\r\n minLength={minlength}\r\n maxLength={maxlength}\r\n onKeyPress={handleKeyPress}\r\n onBlur={handleBlur}\r\n onChange={handleChange}\r\n />\r\n {error && <span className=\"form__validator--error form__validator--top-narrow\">{error}</span>}\r\n </div>\r\n );\r\n};\r\n\r\nexport default TextInput;","import { post } from '../Services/http';\r\nimport { translate } from '../Services/translation';\r\nimport { PRODUCT_LOAD_ERROR, PRODUCT_CLICK_AND_COLLECT_SUBMITTED } from '../constants';\r\nimport {getStockInformation} from \"./Stockinformation.action\";\r\n\r\nexport const addToCollect = (data) => (dispatch) => {\r\n if (data.isConfiguratorProduct) {\r\n return post('/api/configurator/addVariant', {\r\n baseArticleNumber: data.baseProductId,\r\n configurationArticleNumber: data.articleNumber,\r\n price: data.price,\r\n quantity: parseFloat(data.quantity),\r\n })\r\n .then(() => dispatch(add(data)))\r\n .catch((ex) => dispatch(loadError(translate(`product.clickandcollect.error`))));\r\n } else {\r\n return dispatch(add(data));\r\n }\r\n};\r\n\r\nexport const add = (data) => async (dispatch) => {\r\n try {\r\n const response = await post(\"/api/productcollect/add\", {\r\n ...data\r\n });\r\n if (response.ok) {\r\n dispatch(clickAndCollectSubmitted(true));\r\n dispatch(getStockInformation(data.articleNumber, data.quantity));\r\n }\r\n } catch (ex) {\r\n console.error(ex);\r\n dispatch(loadError(translate(`product.clickandcollect.error`)));\r\n }\r\n};\r\n\r\nexport const loadError = (error) => ({\r\n type: PRODUCT_LOAD_ERROR,\r\n payload: {\r\n error,\r\n },\r\n});\r\n\r\nexport const clickAndCollectSubmitted = (value) => ({\r\n type: PRODUCT_CLICK_AND_COLLECT_SUBMITTED,\r\n payload: {\r\n orderSubmitted: value,\r\n },\r\n});\r\n\r\n\r\n","import React, { useState } from 'react';\r\nimport { string, object } from 'yup';\r\nimport { useDispatch, useSelector } from 'react-redux';\r\nimport { translate } from '../../Services/translation';\r\nimport TextInput from '../FormElements/TextInput';\r\nimport ProductPrice from './ProductPrice';\r\nimport {\r\n addToCollect,\r\n add as addToCollectService,\r\n clickAndCollectSubmitted,\r\n} from '../../Actions/ClickAndCollect.action';\r\n\r\nconst ClickAndCollect = ({\r\n product,\r\n stockStatus,\r\n isConfiguratorProduct,\r\n articleNumber,\r\n quantity\r\n}) => {\r\n const [showModal, setShowModal] = useState(false);\r\n const [inputValues, setinputValues] = useState({});\r\n const [validationErrors, setValidationErrors] = useState({});\r\n const { configurator } = useSelector((state) => state);\r\n const { clickAndCollect } = useSelector((state) => state);\r\n const [isLoading, setIsLoading] = useState(false);\r\n const dispatch = useDispatch();\r\n \r\n const scrollbarWidth =\r\n window.innerWidth - document.documentElement.clientWidth;\r\n\r\n const closeModal = () => {\r\n dispatch(clickAndCollectSubmitted(false));\r\n toggleShowModal();\r\n setIsLoading(false);\r\n };\r\n\r\n const toggleShowModal = () => {\r\n const body = document.querySelector('.js-body');\r\n\r\n if (!showModal) {\r\n body.style.marginRight = scrollbarWidth + 'px'; //avoid page jumping when scrollbar disapear\r\n body.classList.add('disable-scroll');\r\n } else {\r\n body.style.marginRight = '0px';\r\n body.classList.remove('disable-scroll');\r\n }\r\n setShowModal(!showModal);\r\n };\r\n\r\n const handleInputChange = (e) => {\r\n const name = e.target.name;\r\n const value = e.target.value;\r\n\r\n let updatedValue = {};\r\n updatedValue = {\r\n [name]: value,\r\n };\r\n setinputValues((inputValues) => ({\r\n ...inputValues,\r\n ...updatedValue,\r\n }));\r\n };\r\n\r\n const onInputKeyPressPhoneNumber = (event) => {\r\n //accept only digits\r\n if (!event.key.match(/[0-9]/)) {\r\n event.preventDefault();\r\n }\r\n };\r\n\r\n const isEmailValid = (email) => {\r\n return /\\S+@\\S+\\.\\S+/.test(email);\r\n };\r\n\r\n const setSubmitData = (inputValues) => {\r\n if (isConfiguratorProduct) {\r\n return {\r\n ...inputValues,\r\n articleNumber,\r\n isConfiguratorProduct,\r\n baseProductId: product.baseProductId,\r\n configuratorPrice: configurator.currentProduct.price,\r\n quantity: quantity,\r\n };\r\n } else {\r\n return {\r\n ...inputValues,\r\n articleNumber,\r\n isConfiguratorProduct,\r\n quantity: quantity,\r\n price: product.price,\r\n baseProductId: product.baseProductId,\r\n };\r\n }\r\n };\r\n\r\n const handleSubmit = () => {\r\n formSchema\r\n .validate(\r\n {\r\n ...inputValues,\r\n },\r\n { abortEarly: false }\r\n )\r\n .then(() => {\r\n setValidationErrors({}); //reset old validation errors\r\n\r\n const collectData = setSubmitData(inputValues);\r\n if (isConfiguratorProduct) {\r\n dispatch(addToCollect(collectData));\r\n } else {\r\n try {\r\n const collect = dispatch(addToCollectService(collectData));\r\n setIsLoading(true);\r\n return true;\r\n } catch (ex) {\r\n return false;\r\n }\r\n }\r\n })\r\n .catch((errors) => {\r\n setValidationErrors({}); //reset old validation errors\r\n let updatedValidationErrors = {};\r\n\r\n errors.inner.forEach((error, i) => {\r\n updatedValidationErrors[error.path] = error.message;\r\n });\r\n setValidationErrors((validationErrors) => ({\r\n ...validationErrors,\r\n ...updatedValidationErrors,\r\n }));\r\n });\r\n };\r\n\r\n const formSchema = object().shape({\r\n customerName: string().required(translate(`validation.required`)),\r\n telephone: string()\r\n .required(translate(`validation.required`))\r\n .test(\r\n 'test-phonenumber',\r\n () => translate(`validation.phonenumber`),\r\n (value) => value && value.length >= 8\r\n ),\r\n email: string()\r\n .required(translate(`validation.required`))\r\n .email(translate(`validation.email`))\r\n .test(\r\n 'test-email',\r\n () => translate(`validation.email`),\r\n (value) => isEmailValid(value)\r\n ),\r\n });\r\n \r\n return (\r\n <>\r\n {stockStatus && stockStatus.main.inStock && (stockStatus.main.inStockQuantity >= quantity) && (\r\n <button\r\n onClick={toggleShowModal}\r\n className=\"button button--expanded\"\r\n >\r\n {translate(`product.clickandcollect`)}\r\n </button>\r\n )}\r\n {showModal && (\r\n <div className=\"click-and-collect\">\r\n <div\r\n className=\"click-and-collect__overlay\"\r\n onClick={toggleShowModal}\r\n />\r\n <div className=\"click-and-collect__modal\">\r\n {clickAndCollect && clickAndCollect.orderSubmitted ? (\r\n <>\r\n <section className=\"click-and-collect__submitted-section\">\r\n <p className=\"click-and-collect__submitted-text h2\">\r\n {translate(`product.clickandcollect.submitted`)}\r\n </p>\r\n <button className=\"button\" onClick={closeModal}>\r\n {translate(`product.clickandcollect.close`)}\r\n </button>\r\n </section>\r\n </>\r\n ) : (\r\n <>\r\n <section className=\"click-and-collect__header\">\r\n <h3 className=\"click-and-collect__title h4 header-decorated\">\r\n {translate(`product.clickandcollect.title`)}\r\n </h3>\r\n <svg\r\n className=\"click-and-collect__close-icon\"\r\n onClick={toggleShowModal}\r\n >\r\n <use href=\"/ui/images/sprites/a-mobler.svg#close\"></use>\r\n </svg>\r\n <p className=\"click-and-collect__text\">\r\n {translate(`product.clickandcollect.description`)}\r\n </p>\r\n </section>\r\n <section className=\"click-and-collect__product\">\r\n {product.thumbnail && (\r\n <figure className=\"click-and-collect__figure\">\r\n <img\r\n src={product.thumbnail}\r\n alt={product.name}\r\n className=\"click-and-collect__image\"\r\n />\r\n </figure>\r\n )}\r\n <div className=\"click-and-collect__product-info\">\r\n <h4 className=\"click-and-collect__product-title\">\r\n {product.name}\r\n </h4>\r\n <ProductPrice\r\n price={product.price}\r\n variantCount={product.variantCount}\r\n cssBlock=\"click-and-collect\"\r\n isConfiguratorProduct={isConfiguratorProduct}\r\n />\r\n </div>\r\n </section>\r\n <section className=\"click-and-collect__form\">\r\n <TextInput\r\n label=\"Ditt navn:\"\r\n name=\"customerName\"\r\n cssBlock=\"click-and-collect\"\r\n onChange={handleInputChange}\r\n value={inputValues.customerName}\r\n error={validationErrors.customerName}\r\n />\r\n <TextInput\r\n label=\"Telefon:\"\r\n name=\"telephone\"\r\n type=\"tel\"\r\n cssBlock=\"click-and-collect\"\r\n onChange={handleInputChange}\r\n value={inputValues.telephone}\r\n error={validationErrors.telephone}\r\n onKeyPress={onInputKeyPressPhoneNumber}\r\n />\r\n <TextInput\r\n label=\"E-post:\"\r\n name=\"email\"\r\n type=\"email\"\r\n cssBlock=\"click-and-collect\"\r\n onChange={handleInputChange}\r\n value={inputValues.email}\r\n error={validationErrors.email}\r\n />\r\n <a\r\n className=\"button button--expanded click-and-collect__submit\"\r\n role=\"button\"\r\n rel=\"nofollow\"\r\n onClick={handleSubmit}\r\n >\r\n {!isLoading ? (\r\n <div>{translate(`product.clickandcollect.add`)}</div>\r\n ) : (\r\n <div className=\"click-and-collect__loader-wrapper\">\r\n <div className=\"lds-ring\">\r\n <div></div>\r\n <div></div>\r\n <div></div>\r\n <div></div>\r\n </div>\r\n </div>\r\n )}\r\n </a>\r\n {clickAndCollect && clickAndCollect.error && (\r\n <span className=\"form__message--error\">\r\n {clickAndCollect.error}\r\n </span>\r\n )}\r\n </section>\r\n </>\r\n )}\r\n </div>\r\n </div>\r\n )}\r\n </>\r\n );\r\n};\r\n\r\nexport default ClickAndCollect;\r\n","import React, { Fragment, useState } from 'react';\r\nimport BuyButton from './BuyButton';\r\nimport { translate } from '../Services/translation';\r\nimport { getStockInformation } from '../Actions/Stockinformation.action';\r\nimport { useDispatch, useSelector } from 'react-redux';\r\n\r\nconst AddToCart = ({\r\n articleNumber,\r\n isConfiguratorProduct,\r\n className,\r\n trackingProduct,\r\n setQuantity,\r\n quantity,\r\n minValue = 1,\r\n maxValue = 999,\r\n label = translate('button.addtocart'),\r\n}) => {\r\n \r\n const dispatch = useDispatch();\r\n\r\n const handleChange = (event) => {\r\n\r\n if (event.target.value != \"\") {\r\n if (parseInt(event.target.value) < parseInt(event.target.min)) {\r\n event.target.value = event.target.min;\r\n }\r\n if (parseInt(event.target.value) > parseInt(event.target.max)) {\r\n event.target.value = event.target.max;\r\n }\r\n }\r\n\r\n setQuantity(event.target.value);\r\n dispatch(getStockInformation(articleNumber, event.target.value));\r\n\r\n if (isConfiguratorProduct) return;\r\n };\r\n\r\n return (\r\n <>\r\n <div className=\"addtocart__wrapper\">\r\n <input\r\n id=\"addtocart-product-quantity\"\r\n type=\"number\"\r\n maxLength=\"3\"\r\n min={minValue}\r\n max={maxValue}\r\n className=\"product-detail__quantity-input\"\r\n value={quantity}\r\n onChange={handleChange}\r\n />\r\n\r\n <BuyButton\r\n label={label}\r\n articleNumber={articleNumber}\r\n isConfiguratorProduct={isConfiguratorProduct}\r\n quantityFieldId=\"addtocart-product-quantity\"\r\n cssClass={className}\r\n trackingProduct={trackingProduct}\r\n setQuantityValue={setQuantity}\r\n />\r\n </div>\r\n </>\r\n );\r\n};\r\n\r\nexport default AddToCart;\r\n","import React, { Fragment, useState } from 'react';\r\nimport { translate } from '../../Services/translation';\r\nimport ProductOption from './ProductOption';\r\nimport ProductPrice from './ProductPrice';\r\nimport ClickAndCollect from './ClickAndCollect';\r\nimport AddToCart from '../AddToCart';\r\nimport ProductStockInformationContainer from './ProductStockInformationContainer';\r\nimport { useSelector } from 'react-redux';\r\nimport ReactHtmlParser from 'react-html-parser';\r\nimport constants from '../../constants';\r\nimport PickupOnly from './PickupOnly';\r\n\r\nconst ProductOptionContainer = (prop) => {\r\n const {\r\n availableOptions,\r\n currentProduct,\r\n selectedModules,\r\n moduleOptions,\r\n } = useSelector((state) => state.configurator);\r\n const { stockInformationState } = useSelector((state) => state);\r\n const [productOption, setProductOption] = useState(\r\n prop.productOption && JSON.parse(prop.productOption)\r\n );\r\n const [product, setProduct] = useState(\r\n prop.product && JSON.parse(prop.product)\r\n );\r\n const [price, setPrice] = useState(product.price);\r\n\r\n const [quantity, setQuantity] = useState(1);\r\n\r\n const isBuyButtonEnabled = () => {\r\n if (prop.isConfiguratorProduct) {\r\n return (\r\n product.enableBuyButton &&\r\n product.showBuyButton &&\r\n currentProduct.checkedOptions &&\r\n availableOptions.length ===\r\n Object.keys(currentProduct.checkedOptions).length &&\r\n (moduleOptions.length === 0 || selectedModules.length > 0)\r\n );\r\n } else {\r\n return (\r\n product.oversellEnabled ||\r\n (product.enableBuyButton &&\r\n product.showBuyButton &&\r\n !stockInformationState.soldOut)\r\n );\r\n }\r\n };\r\n\r\n const getArticleNumber = () => {\r\n if (!prop.isConfiguratorProduct) return product.id;\r\n\r\n return selectedModules.length > 0\r\n ? selectedModules[0].articleNumber\r\n : currentProduct.articleNumber;\r\n };\r\n\r\n return (\r\n <Fragment>\r\n {!prop.isConfiguratorProduct && (\r\n <div className=\"color-block\">\r\n <div className=\"product-options__variant-picker\">\r\n <ProductOption productOption={productOption} />\r\n </div>\r\n </div>\r\n )}\r\n <div className=\"color-block color-block--gray\">\r\n <div className=\"product-options__container\">\r\n {price && (\r\n <div>\r\n <ProductPrice\r\n price={price}\r\n variantCount={product.variantCount}\r\n isConfiguratorProduct={prop.isConfiguratorProduct}\r\n />\r\n </div>\r\n )}\r\n {price.hasClubPrice && !constants.isClubMember && (\r\n <div className=\"product-options__member-link\">\r\n <p\r\n dangerouslySetInnerHTML={{\r\n __html: translate('member.link')\r\n .replace('loginUrl', constants.loginUrl)\r\n .replace('registerUrl', constants.registerUrl),\r\n }}\r\n ></p>\r\n </div>\r\n )}\r\n\r\n {product.temporarilyDisabledText ? (\r\n <div className=\"temporarily-disabled\">\r\n <span className=\"temporarily-disabled__icon\"></span><span>{product.temporarilyDisabledText}</span>\r\n </div>\r\n ) : (\r\n <Fragment>\r\n {product.quantityFieldId && (\r\n <div\r\n className=\"row product-detail__quantity-container\"\r\n id=\"BuyProductContainer\"\r\n >\r\n <div className=\"small-12 product-detail__buy\">\r\n <AddToCart\r\n articleNumber={getArticleNumber()}\r\n isConfiguratorProduct={prop.isConfiguratorProduct}\r\n className={`button buy-button product-detail__buy-button ${isBuyButtonEnabled() ? '' : 'disabled'\r\n }`}\r\n trackingProduct={\r\n product && product.trackingProduct\r\n ? product.trackingProduct\r\n : null\r\n }\r\n setQuantity={setQuantity}\r\n quantity={quantity}\r\n />\r\n </div>\r\n {!moduleOptions ||\r\n (moduleOptions.length == 0 && (\r\n <ClickAndCollect\r\n stockStatus={stockInformationState}\r\n product={product}\r\n isConfiguratorProduct={prop.isConfiguratorProduct}\r\n articleNumber={\r\n prop.isConfiguratorProduct\r\n ? currentProduct.articleNumber\r\n : product.id\r\n }\r\n quantity={quantity}\r\n />\r\n ))}\r\n </div>\r\n )}\r\n\r\n <div className=\"product-detail__stockandshowroom\">\r\n <ProductStockInformationContainer\r\n stockInformation={stockInformationState}\r\n />\r\n <div className=\"product__stockvariant--showroom\">\r\n <svg>\r\n <use href=\"/ui/images/sprites/a-mobler.svg#home\" />\r\n </svg>\r\n <div>\r\n <span className=\"product__stockvariant-label\">\r\n {product.isOnDisplay\r\n ? translate('product.inshowroom')\r\n : translate('product.notinshowroom')}\r\n </span>\r\n {ReactHtmlParser(product.productOnDisplayShelfText)}\r\n </div>\r\n </div>\r\n </div>\r\n\r\n {product.isPickupOnly && <PickupOnly />}\r\n\r\n <div>\r\n\r\n </div>\r\n </Fragment>\r\n )}\r\n\r\n </div>\r\n </div>\r\n </Fragment>\r\n );\r\n};\r\n\r\nexport default ProductOptionContainer;\r\n","import React, { Fragment } from 'react';\r\nimport { translate } from '../../Services/translation';\r\nimport { currencyFormat } from '../../Services/formatting';\r\nimport { useSelector } from \"react-redux\";\r\nimport ConfiguratorProductPrice from './Configurator/ConfiguratorProductPrice';\r\n\r\nconst ProductPrice = ({ price, variantCount = 0, isConfiguratorProduct, cssBlock }) => {\r\n\r\n const { configurator } = useSelector((state) => state);\r\n const { preConfiguredArticleNumbers, currentProduct, isLoaded} = configurator;\r\n\r\n const showConfiguratorPrice = () => {\r\n\r\n if(isConfiguratorProduct && !isLoaded)\r\n return true \r\n\r\n return isConfiguratorProduct && !preConfiguredArticleNumbers.hasOwnProperty(currentProduct.articleNumber) && isLoaded;\r\n }\r\n\r\n const getLitiumPrice = () => {\r\n return preConfiguredArticleNumbers.hasOwnProperty(currentProduct.articleNumber) ? preConfiguredArticleNumbers[currentProduct.articleNumber] : price;\r\n }\r\n\r\n const pricePrefix = (isCampaignActive, isCampaignPrice) => {\r\n return isCampaignActive\r\n ? isCampaignPrice\r\n ? translate(`product.price.now`)\r\n : translate(`product.price.before`)\r\n : false\r\n\r\n // if (variantCount > 1) {\r\n // return isFrom\r\n // ? isCampaign\r\n // ? translate(`product.price.now`)\r\n // : translate(`product.price.from`)\r\n // : translate(`product.price.before`);\r\n // } else if ((variantCount = 1)) {\r\n // return isFrom\r\n // ? isCampaign\r\n // ? translate(`product.price.now`)\r\n // : false\r\n // : isCampaign\r\n // ? translate(`product.price.before`)\r\n // : false;\r\n // } else {\r\n // return false;\r\n // }\r\n };\r\n\r\n const setPricePrefix = (isCampaignActive, isCampaignPrice = false) => {\r\n return (\r\n pricePrefix(isCampaignActive, isCampaignPrice) && (\r\n <span className=\"product__price--label\">\r\n {pricePrefix(isCampaignActive, isCampaignPrice)}\r\n </span>\r\n )\r\n );\r\n };\r\n\r\n const getPriceComponent = (price) => {\r\n if (price.hasCampaignPrice && (!price.hasClubPrice || price.campaignPrice.price < price.clubPrice.price)) {\r\n return (\r\n <Fragment>\r\n <span itemProp=\"price\" className={`product__campaign-price ${cssBlock ? cssBlock + \"__campaign-price\" : \"\"}`}>\r\n {setPricePrefix(true, true)}\r\n {currencyFormat(price.campaignPrice.price)}\r\n </span>\r\n {price.hasRetailPrice && (\r\n <span className={`product__old-price ${cssBlock ? cssBlock + \"__old-price\" : \"\"}`}>\r\n {setPricePrefix(true, false)}\r\n {currencyFormat(price.retailPrice.price)}\r\n </span>\r\n )}\r\n </Fragment>\r\n )\r\n } else if (price.hasClubPrice) {\r\n return (\r\n <Fragment>\r\n <span itemProp=\"price\" className={`product__club-price ${cssBlock ? cssBlock + \"__club-price\" : \"\"}`}>\r\n {setPricePrefix(false, false)}\r\n {currencyFormat(price.clubPrice.price)}\r\n <div className=\"product__club-price-text\">{translate(`product.price.club.member`)}</div>\r\n </span>\r\n {price.hasRetailPrice && (\r\n <span className={`product__old-price ${cssBlock ? cssBlock + \"__old-price\" : \"\"}`}>\r\n {setPricePrefix(false, false)}\r\n {currencyFormat(price.retailPrice.price)}\r\n <div className={`product__club-price-text ${cssBlock ? cssBlock + \"__club-price-text\" : \"\"}`}>{translate(`product.price.noclub.member`)}</div>\r\n </span>\r\n )\r\n }\r\n </Fragment >\r\n )\r\n } else if (price.hasRetailPrice) {\r\n return (<Fragment>\r\n {setPricePrefix(false, false)}\r\n <span itemProp=\"price\" className={`price ${cssBlock ? cssBlock + \"__price\" : \"\"}`}>\r\n {currencyFormat(price.retailPrice.price)}\r\n </span>\r\n </Fragment>\r\n )\r\n }\r\n }\r\n\r\n return (\r\n <div className={`product-detail__price-info ${cssBlock ? cssBlock + \"__price-info\" : \"\"}`}>\r\n { showConfiguratorPrice()\r\n ? <ConfiguratorProductPrice cssBlock={cssBlock} />\r\n : getPriceComponent(getLitiumPrice())\r\n }\r\n\r\n {price.hasRetailPrice && (\r\n <meta itemProp=\"sku\" content={price.retailPrice.price.unitOfMeasurementTitle} />\r\n )}\r\n {price.currency.id && (\r\n <meta itemProp=\"priceCurrency\" content={price.currency.id} />\r\n )}\r\n </div>\r\n );\r\n};\r\n\r\nexport default ProductPrice;\r\n","import React, { useState, useRef, useEffect } from 'react';\r\n\r\nconst StateStyles = {\r\n LOADING: '--loading',\r\n SUCCESS: '--success',\r\n ERROR: '--error',\r\n};\r\n\r\n/**\r\n * Represents a HOC which wraps a BuyButton or ReorderButton and applies diffrent styles to it\r\n * depending on its click state.\r\n * @param {*} WrappedComponent The button component.\r\n * @param {*} onClick The async button's onClick event. It should return true if everything is OK, or false if there is any error.\r\n * @param {*} stylePrefix The style prefix to append state's modifiers. For\r\n * example, 'button' will result as 'button--loading'.\r\n *\r\n * Some available props that the HOC component supports:\r\n * autoReset : it is true by default. Not its value, but the behaviour is like that. Unless people set it as false, by default, button is always reset to neutral state after the request is completed.\r\n * resetTimeout: Number milisecond after the complete state, the style of button will be reset. If don't set, it is 2000\r\n * minimumLoadingTime: Mininum milisecond to display the loading state. If don't set, it is 1000\r\n */\r\nexport default function withReactiveStyleBuyButton(\r\n WrappedComponent,\r\n onClick,\r\n stylePrefix\r\n) {\r\n return (props) => {\r\n const [stateClass, setStateClass] = useState('');\r\n const startTime = useRef(0);\r\n\r\n useEffect(() => {\r\n return () => {\r\n setStateClass('');\r\n };\r\n }, []);\r\n\r\n function onNeutralState() {\r\n setStateClass('');\r\n startTime.current = 0;\r\n }\r\n\r\n function onLoadingState() {\r\n setStateClass(`${stylePrefix}${StateStyles.LOADING}`);\r\n startTime.current = Date.now();\r\n }\r\n\r\n const changeState = (complete) => {\r\n setStateClass(\r\n `${stylePrefix}${\r\n complete ? StateStyles.SUCCESS : StateStyles.ERROR\r\n }`\r\n );\r\n\r\n // if `autoReset` is true, which is default, the style will be changed\r\n // to neutral after a `resetTimeout` amount of time (2 seconds by default).\r\n props.autoReset !== false &&\r\n setTimeout(() => {\r\n onNeutralState();\r\n }, props.resetTimeout || 2000);\r\n };\r\n\r\n function onComplete(complete) {\r\n const loadingDuration = Date.now() - startTime.current;\r\n const minimumLoadingTime = props.minimumLoadingTime || 30000;\r\n // ensure the loading indicator is displayed at least a `minimumLoadingTime`\r\n // amount of time before changing it to Success or Error.\r\n if (loadingDuration >= minimumLoadingTime) {\r\n changeState(complete);\r\n } else {\r\n setTimeout(() => {\r\n changeState(complete);\r\n }, minimumLoadingTime - loadingDuration);\r\n }\r\n }\r\n\r\n async function onButtonClick(params) {\r\n onLoadingState();\r\n const data = await onClick(params);\r\n onComplete(data);\r\n }\r\n\r\n return (\r\n <span className={stateClass}>\r\n <WrappedComponent\r\n onClick={(params) => onButtonClick(params)}\r\n {...props}\r\n />\r\n </span>\r\n );\r\n };\r\n}\r\n","module.exports = \"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' height='24px' viewBox='0 -960 960 960' width='24px' fill='%23B89230'%3e%3cpath d='m40-120 440-760 440 760H40Zm138-80h604L480-720 178-200Zm302-40q17 0 28.5-11.5T520-280q0-17-11.5-28.5T480-320q-17 0-28.5 11.5T440-280q0 17 11.5 28.5T480-240Zm-40-120h80v-200h-80v200Zm40-100Z'/%3e%3c/svg%3e\""],"sourceRoot":""}