{"version":3,"sources":["webpack:///./src/themes/connselmer2/views/buybox.view.tsx?45f9","webpack:///./src/modules/two-column-layout/two-column-layout.view.tsx?507e","webpack:///./src/modules/two-column-layout/two-column-layout.tsx?be0a","webpack:///./src/themes/connselmer/views/buybox.view.tsx?239e","webpack:///./src/themes/leblanc/views/buybox.view.tsx?21f6"],"names":["_renderConfigureDropdown","dropdown","ExtensionProps","count","ContainerProps","LabelContainerProps","heading","errors","select","headingLabel","React","Node","Object","assign","_renderShopSimilarItem","shopSimilarItem","input","BuyboxView","props","addToCart","addToOrderTemplate","addToWishlist","configure","findInStore","keyInPrice","price","ProductInfoContainerProps","quantity","shopSimilarLook","shopSimilarDescription","product","undefined","ExtensionProperties","final","ep_key","Key","ep_val","keys","Value","forEach","item","_getExtensionProperties","data","result","productAttribute","setProductAttribute","useState","_props$data$productDi","async","_props$data$product$r","getAttribute","getAttributeValuesAsync","callerContext","context","actionContext","RecordId","request","apiSettings","channelId","catalogId","_getAttributesAsync","productDimensions","dimension","_dimension$ExtensionP","dimension_type","DimensionTypeValue","dimension_values","value","_value$Value","StringValue","JSON","parse","dimensions","type_dimension","dropDowns","document","getElementsByClassName","valves","getElementById","material","i","length","_dropDowns$i$firstEle","dropDown_for","firstElementChild","search_against","slice","indexOf","toString","$element","lastChild","classList","contains","$options","children","z","is_exist","y","textContent","VALUE","remove","option_elem","createElement","setAttribute","add","appendChild","$select","options","text","inject_dimensions","id","className","mediaGallery","title","_renderSearchName","toLowerCase","_renderLevelScale","_formatPricing","includes","socialShare","slots","_renderConfigure","dropdowns","map","unitOfMeasure","bulkPurchaseLink","rating","_renderKeyInPrice","_renderQuantity","inventoryLabel","errorBlock","button","_renderAddToCart","storeSelector","description","modal","productPickupOptionList","_renderFindInStore","_renderAddToOrderTemplate","_renderAddToWishlist","href","_renderHtmlField","fieldKey","replace","ReactHtmlParser","attr","TextValue","scope","Name","config","cusLeftBootstrapClass","cusLeftTextfield","cusRightBootstrapClass","cusRightIframeHeading","src","cusRightIframeSrc","height","cusRightIframeAriaLabel","TwoColumnLayout","render","this","renderView","_renderLongFields","_product$ExtensionPro","_vals","_titles","_results","element","_element$Value","push","_renderCollapse","html","searchName","_product$ExtensionPro2","_element$Value2","_element$Value3","_renderCurrencyCode","_currencyCode","_product$ExtensionPro3","_element$Value4","_element$Value5","_element$Value6","scaleLevel","scaleClass","_product$ExtensionPro4","_element$Value7","_element$Value8","_element$Value9","toLocaleLowerCase","_showPrice","showPrice","_product$ExtensionPro5","_element$Value10","BooleanValue","parent_props","_renderSocialShare","counter","productDimensionColor","productDimensionSize","productDimensionType","_product$ExtensionPro6","_element$Value11","_element$Value13","_element$Value15","_element$Value12","_element$Value14","_element$Value16","recordID","channelID","catelogID","_getAttriAsync","attribute","_props$data$product$r2","PriceRaw","Price"],"mappings":";kQAuBA,MAqEMA,EAA2BA,CAChCC,EAAoDC,EAA6BC,KAEjF,MACM,eAACC,EAAc,oBAAEC,EAAmB,QAAEC,EAAO,OAAEC,EAAM,OAAEC,GAAUP,EAEjEQ,EAAgBP,GAAkBA,EAHV,CAAC,eAAgB,iBAAkB,iBAGYC,KAAYG,EAEzF,OACCI,gBAACC,OAAIC,OAAAC,OAAA,GAAKT,GACTM,gBAACC,OAAIC,OAAAC,OAAA,GAAKR,GAAsBI,EAAcF,GAC7CC,IAmDEM,EAA0BC,IAC/B,MAAM,eAAEX,EAAc,OAAEG,EAAM,MAAES,GAAUD,EAC1C,OAAOL,gBAACC,OAAIC,OAAAC,OAAA,GAAKT,GAAiBG,E,IAASS,IAgM7BC,UAvGgCC,IAG9C,MAAM,UACLC,EAAS,mBACTC,EAAkB,cAClBC,EAAa,UACbC,EAAS,YACTC,EAAW,WACXC,EAAU,MACVC,EAAK,0BACLC,EAAyB,SACzBC,EAAQ,gBACRC,EAAe,uBACfC,GACGX,EACEhB,EA9O0B4B,KAChC,QAAgBC,IAAZD,IAA0BA,EAAQE,oBAAqB,OAAO,KAElE,IAAI7B,EAAQ,EACR8B,EAAQ,GAEZ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AAOF,EAAKG,MACtB1I,gBAAA,UAAKuI,EAAKC,mBAlNS3B","file":"static/js/11.9947f46c27c90d9a3686.chunk.js","sourcesContent":["import {Node} from '@msdyn365-commerce-modules/utilities';\r\nimport * as React from 'react';\r\nimport {\r\n\tIBuyboxAddToCartViewProps,\r\n\tIBuyboxAddToOrderTemplateViewProps,\r\n\tIBuyboxAddToWishlistViewProps,\r\n\tIBuyboxKeyInPriceViewProps,\r\n\tIBuyboxProductConfigureDropdownViewProps,\r\n\tIBuyboxProductConfigureViewProps,\r\n\tIBuyboxProductQuantityViewProps,\r\n\tIBuyboxShopSimilarLookViewProps\r\n} from '@msdyn365-commerce-modules/buybox/src/common';\r\nimport { IBuyboxViewProps } from '@msdyn365-commerce-modules/buybox/src/modules/buybox/./buybox';\r\nimport {\r\n\tIBuyboxFindInStoreViewProps\r\n} from '@msdyn365-commerce-modules/buybox/src/modules/buybox/components/buybox-find-in-store';\r\nimport { AttributeValue, SimpleProduct } from '@msdyn365-commerce/retail-proxy';\r\nimport ReactHtmlParser from 'react-html-parser';\r\nimport {getAttributeValuesAsync} from \"@msdyn365-commerce/retail-proxy/dist/DataActions/ProductsDataActions.g\";\r\nimport {ReactNode, useState} from 'react';\r\n\r\n\r\n/* Private Functions */\r\nconst _getExtensionProperties = (product: SimpleProduct|undefined): null|{} => {\r\n\tif (product === undefined || !product.ExtensionProperties) return null;\r\n\t//we have product data, proceed to extract the usable attributes\r\n\tlet count = 0;\r\n\tlet final = {};\t\t//final return for our data\r\n\r\n\twhile (product.ExtensionProperties && product.ExtensionProperties[count] !== undefined){\r\n\t\tconst ep_key = product.ExtensionProperties[count].Key;\r\n\t\tlet ep_val: any;\r\n\r\n\t\tObject.keys(product.ExtensionProperties[count].Value!).forEach((item) => {\r\n\t\t\tif (product.ExtensionProperties![count].Value![item] !== undefined){\r\n\t\t\t\tep_val = product.ExtensionProperties![count].Value![item];\r\n\t\t\t}\r\n\t\t})\r\n\t\tif (ep_key && ep_val) final[ep_key] = ep_val;\t//false switches don't pass this\r\n\t\tcount++;\r\n\t}\r\n\treturn final;\r\n}\r\nconst _renderSearchName = (ExtensionProps: {}|null): JSX.Element|null => {\r\n\tif (ExtensionProps && ExtensionProps[\"SearchName\"]){\r\n\t\treturn

{ExtensionProps[\"SearchName\"]}

;\r\n\t} else {\r\n\t\treturn null\r\n\t}\r\n}\r\nconst _renderLevelScale = (ExtensionProps: {}|null): JSX.Element|null => {\r\n\tif (ExtensionProps && ExtensionProps[\"LevelId\"]){\r\n\t\treturn (\r\n\t\t\t
{ExtensionProps[\"LevelId\"]}
\r\n\t\t)\r\n\t} else {\r\n\t\treturn null\r\n\t}\r\n};\r\nconst _formatPricing = (ExtensionProps: {}|null, price: ReactNode|undefined, channelId:number) => {\r\n\t//if there's no price, break out / show nothing.\r\n\tif (!price) return null;\r\n\t//Check if the price needs to be suppressed (no data in EP, or Suppress flag is present)\r\n\tif (!ExtensionProps || ExtensionProps['IsSupressPrice']) return null;\r\n\tif([5637145352,5637145370].includes(channelId)){\r\n\t\treturn (\r\n\t\t\t<>\r\n\t\t\t\t
{price}
\r\n\t\t\t\t

Price includes VATS

\r\n\t\t\t\r\n\t\t)\r\n\t} else {\r\n\t\treturn
{price}
\r\n\t}\r\n}\r\nconst _renderSocialShare = (socialShare: React.ReactNode[]): JSX.Element|null => {\r\n\tif (!socialShare || socialShare.length === 0) return null;\r\n\treturn (<>\r\n\t\t{socialShare[0]}\r\n\t\t
\r\n\t);\r\n};\r\nconst _renderConfigure = (configure: IBuyboxProductConfigureViewProps, ExtensionProps: Object|null): JSX.Element => {\r\n\tconst {ContainerProps, dropdowns} = configure;\r\n\treturn (\r\n\t\t\r\n\t\t\t{dropdowns.map((dropdown: IBuyboxProductConfigureDropdownViewProps, i: number) => {\r\n\t\t\t\treturn _renderConfigureDropdown(dropdown, ExtensionProps, i);\r\n\t\t\t})}\r\n\t\t\r\n\t);\r\n};\r\nconst _renderConfigureDropdown = (\r\n\tdropdown: IBuyboxProductConfigureDropdownViewProps, ExtensionProps: Object|null, count: number,\r\n): JSX.Element => {\r\n\tconst dimensionOverrideKeys = ['DimensionOne', 'DimensionThree', 'DimensionFour'];\r\n\tconst {ContainerProps, LabelContainerProps, heading, errors, select} = dropdown;\r\n\t//if we have an overide use it, otherwise use the default\r\n\tconst headingLabel = (ExtensionProps && ExtensionProps[dimensionOverrideKeys[count]]) || heading;\r\n\r\n\treturn (\r\n\t\t\r\n\t\t\t{headingLabel}{errors}\r\n\t\t\t{select}\r\n\t\t\r\n\t);\r\n}\r\nconst _renderKeyInPrice = (keyInPrice: IBuyboxKeyInPriceViewProps): JSX.Element => {\r\n\tconst { ContainerProps, LabelContainerProps, heading, input } = keyInPrice;\r\n\treturn (\r\n\t\t\r\n\t\t\t{heading}\r\n\t\t\t{input}\r\n\t\t\r\n\t);\r\n};\r\nconst _renderQuantity = (quantity: IBuyboxProductQuantityViewProps): JSX.Element => {\r\n\tconst { ContainerProps, LabelContainerProps, heading, input, errors } = quantity;\r\n\treturn (\r\n\t\t\r\n\t\t\t{heading}{errors}\r\n\t\t\t{input}\r\n\t\t\r\n\t);\r\n};\r\nconst _renderAddToCart = (addToCart: IBuyboxAddToCartViewProps): JSX.Element => {\r\n\tconst { ContainerProps, errorBlock, button } = addToCart;\r\n\treturn {errorBlock} {button};\r\n};\r\nconst _renderAddToOrderTemplate = (addToOrderTemplate: IBuyboxAddToOrderTemplateViewProps): JSX.Element => {\r\n\tconst { ContainerProps, errorBlock, button } = addToOrderTemplate;\r\n\treturn {errorBlock} {button};\r\n};\r\nconst _renderAddToWishlist = (addToWishlist: IBuyboxAddToWishlistViewProps): JSX.Element => {\r\n\tconst { ContainerProps, errorBlock, button } = addToWishlist;\r\n\treturn {errorBlock} {button};\r\n};\r\nconst _renderFindInStore = (findInStore: IBuyboxFindInStoreViewProps): JSX.Element => {\r\n\tconst {\r\n\t\tContainerProps,\r\n\t\tstoreSelector,\r\n\t\theading,\r\n\t\tdescription,\r\n\t\terrors,\r\n\t\tbutton,\r\n\t\tmodal,\r\n\t\tproductPickupOptionList\r\n\t} = findInStore;\r\n\treturn (\r\n\t\t\r\n\t\t\t{storeSelector} {heading} {productPickupOptionList} {description} {errors} {button} {modal}\r\n\t\t\r\n\t);\r\n};\r\nconst _renderShopSimilarItem = (shopSimilarItem: IBuyboxShopSimilarLookViewProps): JSX.Element => {\r\n\tconst { ContainerProps, errors, input } = shopSimilarItem;\r\n\treturn {errors} {input};\r\n};\r\nconst _renderHtmlField = (fieldKey:string, ExtensionProps:Object|null):JSX.Element|null => {\r\n\tif(ExtensionProps === null) return null;\r\n\tif(ExtensionProps[fieldKey]){\r\n\r\n\t\treturn (\r\n\t\t\t
\r\n\t\t\t\t

{fieldKey.replace('Product','')}

\r\n\t\t\t\t{ReactHtmlParser(ExtensionProps[fieldKey])}\r\n\t\t\t
\r\n\t\t)\r\n\t} else {\r\n\t\treturn null;\r\n\t}\r\n}\r\n//Injection of deleted dimensions\r\nfunction inject_dimensions(dimensions: any, type_dimension: any) {\r\n\tlet dropDowns = document.getElementsByClassName('ms-buybox__dropdown');\r\n\t//Get the dropdown html by using ID\r\n\tconst valves = document.getElementById('valves');\r\n\tconst material = document.getElementById('material');\r\n\r\n\tfor (let i = 0; i < dropDowns.length; i++) {\r\n\t\tlet dropDown_for = dropDowns[i].firstElementChild?.getAttribute('for');\r\n\t\tlet dimension_type;\r\n\t\tif (dropDown_for != null) {\r\n\t\t\tlet search_against = 'ms-buybox__dropown-quantity-input-';\r\n\t\t\tdimension_type = dropDown_for.slice(dropDown_for.indexOf(search_against) + search_against.length);\r\n\t\t\tif (dimensions !== undefined && dimension_type == type_dimension.toString()) {\r\n\t\t\t\tlet $element = dropDowns[i].lastChild as HTMLDivElement;\r\n\t\t\t\tif ($element.classList.contains('msc-swatch-container')) {\r\n\t\t\t\t\t//SWATCH\r\n\t\t\t\t\tlet $options = $element.children as HTMLCollection;\r\n\t\t\t\t\tfor (let z = 0; z < dimensions.length; z++) {\r\n\t\t\t\t\t\tlet is_exist = false;\r\n\t\t\t\t\t\tfor (let y = 0; y < $options.length; y++) {\r\n\t\t\t\t\t\t\tif ($options[y].textContent == dimensions[z].VALUE) {\r\n\t\t\t\t\t\t\t\tis_exist = true;\r\n\t\t\t\t\t\t\t\t//Remove duplicate\r\n\t\t\t\t\t\t\t\tif ($options[y].textContent == material?.textContent) {\r\n\t\t\t\t\t\t\t\t\tmaterial && material.remove();\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif (!is_exist) {\r\n\t\t\t\t\t\t\t//PUSH the value\r\n\t\t\t\t\t\t\tlet option_elem = document.createElement('button');\r\n\t\t\t\t\t\t\toption_elem.textContent = dimensions[z].VALUE;\r\n\t\t\t\t\t\t\toption_elem.setAttribute('disabled', '');\r\n\t\t\t\t\t\t\toption_elem.classList.add('msc-swatch-container__item');\r\n\t\t\t\t\t\t\toption_elem.classList.add('msc-swatch-container__item__unselected');\r\n\t\t\t\t\t\t\toption_elem.classList.add('msc-swatch-container__item__uncolored');\r\n\t\t\t\t\t\t\toption_elem.setAttribute('id', 'material');\r\n\t\t\t\t\t\t\t$element.appendChild(option_elem);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\t//DROPDOWN\r\n\t\t\t\t\tlet $select = dropDowns[i].lastChild as HTMLSelectElement;\r\n\t\t\t\t\tlet $options = $select.options as HTMLOptionsCollection;\r\n\t\t\t\t\tfor (let z = 0; z < dimensions.length; z++) {\r\n\t\t\t\t\t\tlet is_exist = false;\r\n\t\t\t\t\t\tfor (let y = 0; y < $options.length; y++) {\r\n\t\t\t\t\t\t\tif ($options[y].text == dimensions[z].VALUE) {\r\n\t\t\t\t\t\t\t\tis_exist = true;\r\n\t\t\t\t\t\t\t\t//Remove duplicate\r\n\t\t\t\t\t\t\t\tif ($options[y].text == valves?.textContent) {\r\n\t\t\t\t\t\t\t\t\tvalves && valves.remove();\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif (!is_exist) {\r\n\t\t\t\t\t\t\t//PUSH the value in the dropDown\r\n\t\t\t\t\t\t\tlet option_elem = document.createElement('option');\r\n\t\t\t\t\t\t\toption_elem.text = dimensions[z].VALUE;\r\n\t\t\t\t\t\t\toption_elem.setAttribute('disabled', '');\r\n\t\t\t\t\t\t\toption_elem.setAttribute('id', 'valves');\r\n\t\t\t\t\t\t\t$select.options.add(option_elem);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}\r\n\r\n\r\n/* Main Exported Function */\r\nconst BuyboxView: React.FC = props => {\r\n\t/* Only destructuring repeated or complicated props\r\n\t * Totally removed MediaGalleryContainerProps & description (not using OOtB) */\r\n\tconst {\r\n\t\taddToCart,\r\n\t\taddToOrderTemplate,\r\n\t\taddToWishlist,\r\n\t\tconfigure,\r\n\t\tfindInStore,\r\n\t\tkeyInPrice,\r\n\t\tprice,\r\n\t\tProductInfoContainerProps,\r\n\t\tquantity,\r\n\t\tshopSimilarLook,\r\n\t\tshopSimilarDescription,\r\n\t} = props;\r\n\tconst ExtensionProps = _getExtensionProperties(props.data.product.result);\r\n\t//Attribute Function Chain\r\n\tconst [productAttribute, setProductAttribute] = useState([]);\r\n\tconst _getAttributesAsync = async (props: IBuyboxViewProps) => {\r\n\t\tconst getAttribute:AttributeValue[] = await getAttributeValuesAsync(\r\n\t\t\t{ callerContext: props.context.actionContext },\r\n\t\t\tprops.data.product.result?.RecordId!,\r\n\t\t\tprops.context.request.apiSettings.channelId,\r\n\t\t\tprops.context.request.apiSettings.catalogId\r\n\t\t);\r\n\t\tsetProductAttribute(getAttribute);\r\n\t}\r\n\tconst renderProductAttributes = () => {\r\n\t\treturn (\r\n\t\t\t<>\r\n\t\t\t\t

Product Attributes

\r\n\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t{productAttribute.map(attr => (\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t{attr.TextValue !== '' && (\r\n\t\t\t\t\t\t\t\t<>\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t)}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t))}\r\n\t\t\t\t\t\r\n\t\t\t\t
{attr.Name}{attr.TextValue}
\r\n\t\t\t\r\n\t\t);\r\n\t};\r\n\r\n\t// Get Attribute Call\r\n\tReact.useEffect(() => {\r\n\t\t _getAttributesAsync(props);\r\n\t\t props.data.productDimensions.result?.forEach(dimension => {\r\n\t\t\t let dimension_type = dimension.DimensionTypeValue;\r\n\t\t\t let dimension_values: any = '';\r\n\t\t\t dimension.ExtensionProperties?.forEach(value => {\r\n\t\t\t\t if (value.Key == 'AllDimensions') dimension_values = value.Value?.StringValue;\r\n\t\t\t });\r\n\t\t\t if (dimension_values !== '') {\r\n\t\t\t\t dimension_values = JSON.parse(dimension_values);\r\n\t\t\t\t inject_dimensions(dimension_values, dimension_type);\r\n\t\t\t }\r\n\t\t });\r\n\t });\r\n\r\n\treturn (\r\n\t\t
\r\n\t\t\t
\r\n\t\t\t\t
{props.mediaGallery}
\r\n\t\t\t\t\r\n\t\t\t\t\t
\r\n\t\t\t\t\t\t{props.title}\r\n\t\t\t\t\t\t{_renderSearchName(ExtensionProps)}\r\n\t\t\t\t\t\t{_renderLevelScale(ExtensionProps)}\r\n\t\t\t\t\t\t{_formatPricing(ExtensionProps, price, props.context.request.apiSettings.channelId)}\r\n\t\t\t\t\t\t{_renderSocialShare(props.slots && props.slots.socialShare)}\r\n\t\t\t\t\t\t{configure && _renderConfigure(configure, ExtensionProps)}\r\n\t\t\t\t\t\t{props.unitOfMeasure}\r\n\t\t\t\t\t\t{props.bulkPurchaseLink}\r\n\t\t\t\t\t\t{/*{description}*/}\r\n\t\t\t\t\t\t{props.rating}\r\n\t\t\t\t\t\t{keyInPrice && _renderKeyInPrice(keyInPrice)}\r\n\t\t\t\t\t\t{quantity && _renderQuantity(quantity)}\r\n\t\t\t\t\t\t{props.inventoryLabel}\r\n\t\t\t\t\t\t{addToCart && _renderAddToCart(addToCart)}\r\n\t\t\t\t\t\t{findInStore && _renderFindInStore(findInStore)}\r\n\t\t\t\t\t\t{addToOrderTemplate && _renderAddToOrderTemplate(addToOrderTemplate)}\r\n\t\t\t\t\t\t{addToWishlist && _renderAddToWishlist(addToWishlist)}\r\n\t\t\t\t\t\t{shopSimilarLook && _renderShopSimilarItem(shopSimilarLook)}\r\n\t\t\t\t\t\t{shopSimilarDescription && _renderShopSimilarItem(shopSimilarDescription)}\r\n\t\t\t\t\t\t
\r\n\t\t\t\t\t\tFind a Dealer\r\n\t\t\t\t\t
\r\n\t\t\t\t
\r\n\t\t\t\t{['ProductDescription', 'ProductFeatures', 'ProductSpecification'].map((item) => {\r\n\t\t\t\t\treturn _renderHtmlField(item, ExtensionProps)\r\n\t\t\t\t})}\r\n\t\t\t\t{productAttribute && renderProductAttributes()}\r\n\t\t\t
\r\n\t\t
\r\n\t)\r\n};\r\nexport default BuyboxView;","/*!\r\n * Copyright (c) Microsoft Corporation.\r\n * All rights reserved. See LICENSE in the project root for license information.\r\n */\r\n\r\nimport * as React from 'react';\r\nimport ReactHtmlParser from 'react-html-parser';\r\nimport { ITwoColumnLayoutViewProps } from './two-column-layout';\r\n\r\nexport default (props: ITwoColumnLayoutViewProps) => {\r\n return (\r\n
\r\n
\r\n
\r\n {ReactHtmlParser(`${props.config.cusLeftTextfield}`)}\r\n
\r\n
\r\n
\r\n

{props.config.cusRightIframeHeading}

\r\n \r\n
\r\n
\r\n
\r\n
\r\n );\r\n};\r\n","/*!\r\n * Copyright (c) Microsoft Corporation.\r\n * All rights reserved. See LICENSE in the project root for license information.\r\n */\r\n\r\nimport * as React from 'react';\r\n\r\nimport { ITwoColumnLayoutData } from './two-column-layout.data';\r\nimport { ITwoColumnLayoutProps } from './two-column-layout.props.autogenerated';\r\n\r\nexport interface ITwoColumnLayoutViewProps extends ITwoColumnLayoutProps {}\r\n\r\n/**\r\n *\r\n * TwoColumnLayout component\r\n * @extends {React.PureComponent>}\r\n */\r\nclass TwoColumnLayout extends React.PureComponent> {\r\n public render(): JSX.Element | null {\r\n return this.props.renderView(this.props);\r\n }\r\n}\r\n\r\nexport default TwoColumnLayout;\r\n","/*--------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * See License.txt in the project root for license information.\r\n *--------------------------------------------------------------*/\r\nimport { Node } from '@msdyn365-commerce-modules/utilities';\r\nimport * as React from 'react';\r\nimport {\r\n IBuyboxAddToCartViewProps,\r\n IBuyboxAddToOrderTemplateViewProps,\r\n IBuyboxAddToWishlistViewProps,\r\n IBuyboxKeyInPriceViewProps,\r\n IBuyboxProductConfigureDropdownViewProps,\r\n IBuyboxProductConfigureViewProps,\r\n IBuyboxProductQuantityViewProps,\r\n IBuyboxShopSimilarLookViewProps\r\n} from '@msdyn365-commerce-modules/buybox/src/modules/buybox/../../common';\r\nimport { IBuyboxViewProps } from '@msdyn365-commerce-modules/buybox/src/modules/buybox/./buybox';\r\nimport { IBuyboxFindInStoreViewProps } from '@msdyn365-commerce-modules/buybox/src/modules/buybox/./components/buybox-find-in-store';\r\n//import { getProductDimensions Async, getProductRefiners Async } from '../../../dataService/DataActionExtension.g';\r\nimport { AttributeValue, SimpleProduct } from '@msdyn365-commerce/retail-proxy';\r\nimport ReactHtmlParser from 'react-html-parser';\r\nimport { getAttributeValuesAsync } from '@msdyn365-commerce/retail-proxy/dist/DataActions/ProductsDataActions.g';\r\nimport { useState } from 'react';\r\n\r\n//Commented out Description (the OOtB desc) since we're not using it for now.\r\nconst BuyboxView: React.FC = props => {\r\n const {\r\n /*MediaGalleryContainerProps,*/ ProductInfoContainerProps,\r\n addToCart,\r\n addToOrderTemplate,\r\n addToWishlist,\r\n configure,\r\n /*description,*/ findInStore,\r\n quantity,\r\n price,\r\n title,\r\n rating,\r\n inventoryLabel,\r\n shopSimilarLook,\r\n keyInPrice,\r\n shopSimilarDescription,\r\n unitOfMeasure\r\n } = props;\r\n\r\n const [productAttribute, setProductAttribute] = useState([]);\r\n // Get Attribute Call\r\n const _getAttriAsync = async (props: IBuyboxViewProps) => {\r\n const context = props.context.actionContext;\r\n const recordID: number = props.data.product.result?.RecordId!;\r\n const channelID = props.context.request.apiSettings.channelId;\r\n const catelogID = props.context.request.apiSettings.catalogId;\r\n const getAttribute: AttributeValue[] = await getAttributeValuesAsync({ callerContext: context }, recordID, channelID, catelogID);\r\n\r\n setProductAttribute(getAttribute);\r\n };\r\n // Product Attribute Rendering HTML\r\n const renderProductAttributes = () => {\r\n return (\r\n <>\r\n

Product Attribtues

\r\n \r\n \r\n {productAttribute.map(attribute => (\r\n \r\n {attribute.TextValue !== '' && (\r\n <>\r\n \r\n \r\n \r\n )}\r\n \r\n ))}\r\n \r\n
{attribute.Name}{attribute.TextValue}
\r\n \r\n );\r\n };\r\n\r\n React.useEffect(() => {\r\n _getAttriAsync(props);\r\n\r\n props.data.productDimensions.result?.forEach(dimension => {\r\n let dimension_type = dimension.DimensionTypeValue;\r\n let dimension_values: any = '';\r\n dimension.ExtensionProperties?.forEach(value => {\r\n if (value.Key == 'AllDimensions') {\r\n dimension_values = value.Value?.StringValue;\r\n }\r\n });\r\n if (dimension_values !== '') {\r\n dimension_values = JSON.parse(dimension_values);\r\n inject_dimensions(dimension_values, dimension_type);\r\n }\r\n });\r\n\r\n function inject_dimensions(dimensions: any, type_dimension: any) {\r\n let dropDowns = document.getElementsByClassName('ms-buybox__dropdown');\r\n //Get the dropdown html by using ID\r\n const valves = document.getElementById('valves');\r\n const material = document.getElementById('material');\r\n for (let i = 0; i < dropDowns.length; i++) {\r\n let dropDown_for = dropDowns[i].firstElementChild?.getAttribute('for');\r\n let dimension_type;\r\n if (dropDown_for != null) {\r\n let search_against = 'ms-buybox__dropown-quantity-input-';\r\n dimension_type = dropDown_for.slice(dropDown_for.indexOf(search_against) + search_against.length);\r\n if (dimensions !== undefined && dimension_type == type_dimension.toString()) {\r\n let $element = dropDowns[i].lastChild as HTMLDivElement;\r\n if ($element.classList.contains('msc-swatch-container')) {\r\n //SWATCH\r\n let $options = $element.children as HTMLCollection;\r\n for (let z = 0; z < dimensions.length; z++) {\r\n let is_exist = false;\r\n for (let y = 0; y < $options.length; y++) {\r\n if ($options[y].textContent == dimensions[z].VALUE) {\r\n is_exist = true;\r\n //Remove duplicate\r\n if ($options[y].textContent == material?.textContent) {\r\n material && material.remove();\r\n }\r\n }\r\n }\r\n if (is_exist === false) {\r\n //PUSH the value\r\n let option_elem = document.createElement('button');\r\n option_elem.textContent = dimensions[z].VALUE;\r\n option_elem.setAttribute('disabled', '');\r\n option_elem.classList.add('msc-swatch-container__item');\r\n option_elem.classList.add('msc-swatch-container__item__unselected');\r\n option_elem.classList.add('msc-swatch-container__item__uncolored');\r\n option_elem.setAttribute('id', 'material');\r\n $element.appendChild(option_elem);\r\n }\r\n }\r\n } else {\r\n //DROPDOWN\r\n let $select = dropDowns[i].lastChild as HTMLSelectElement;\r\n let $options = $select.options as HTMLOptionsCollection;\r\n for (let z = 0; z < dimensions.length; z++) {\r\n let is_exist = false;\r\n for (let y = 0; y < $options.length; y++) {\r\n if ($options[y].text == dimensions[z].VALUE) {\r\n is_exist = true;\r\n //Remove duplicate\r\n if ($options[y].text == valves?.textContent) {\r\n valves && valves.remove();\r\n }\r\n }\r\n }\r\n if (is_exist === false) {\r\n //PUSH the value in the dropDown\r\n let option_elem = document.createElement('option');\r\n option_elem.text = dimensions[z].VALUE;\r\n option_elem.setAttribute('disabled', '');\r\n option_elem.setAttribute('id', 'valves');\r\n $select.options.add(option_elem);\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n });\r\n return (\r\n
\r\n
\r\n
{props.mediaGallery}
\r\n \r\n
\r\n {title}\r\n {_renderSearchName(props.data.product.result)}\r\n {_renderLevelScale(props, props.data.product.result)}\r\n
\r\n {_showPrice(props.data.product.result) && price}\r\n {_renderCurrencyCode(props.data.product.result)}\r\n
\r\n {_renderSocialShare(props.slots && props.slots.socialShare)}\r\n {configure && _renderConfigure(configure, props)}\r\n {unitOfMeasure}\r\n {props.bulkPurchaseLink}\r\n {/*{description}*/}\r\n {rating}\r\n {/*{getProductDimensions(props.context.actionContext.requestContext, \"PM-102\")}*/}\r\n {keyInPrice && _renderKeyInPrice(keyInPrice)}\r\n {quantity && _renderQuantity(quantity)}\r\n {inventoryLabel}\r\n {addToCart && _renderAddToCart(addToCart)}\r\n {findInStore && _renderFindInStore(findInStore)}\r\n {addToOrderTemplate && _renderAddToOrderTemplate(addToOrderTemplate)}\r\n {addToWishlist && _renderAddToWishlist(addToWishlist)}\r\n {shopSimilarLook && _renderShopSimilarItem(shopSimilarLook)}\r\n {shopSimilarDescription && _renderShopSimilarItem(shopSimilarDescription)}\r\n
\r\n \r\n Find a Dealer\r\n \r\n
\r\n
\r\n {_renderLongFields(props.data.product.result)}\r\n {productAttribute && renderProductAttributes()}\r\n
\r\n
\r\n );\r\n};\r\n\r\n//Loop through the 40+ ExtensionProperties only once (vs 3 times), & then map the 1-3 saved elements to the page.\r\nconst _renderLongFields = (product: SimpleProduct | undefined) => {\r\n if (product !== undefined) {\r\n const _vals: Array = ['ProductDescription', 'ProductFeatures', 'ProductSpecification'];\r\n const _titles: Array = ['Description', 'Features', 'Specifications'];\r\n let _results: JSX.Element[] = []; //create an empty array for stringified HTML\r\n //check for our three sought-after values, and then use the associated title\r\n product.ExtensionProperties?.forEach(element => {\r\n if (_vals.includes(element.Key as string) && element.Value?.StringValue) {\r\n _results.push(_renderCollapse(element.Value.StringValue, _titles[_vals.indexOf(element.Key as string)]));\r\n }\r\n });\r\n return
{_results.map(item => item)}
;\r\n } else {\r\n return <>;\r\n }\r\n};\r\n\r\nconst _renderCollapse = (html: string, title: string) => {\r\n return (\r\n
\r\n

{title}

\r\n {ReactHtmlParser(html)}\r\n
\r\n );\r\n //Didn't want to totally remove the collapse incase we need to revert\r\n /*if(html.length >= 300){\r\n\t\treturn (\r\n\t\t\t
\r\n\t\t\t\t
\r\n\t\t\t\t

{title}

\r\n\t\t\t\t
\r\n\t\t\t\t\t{ReactHtmlParser(html)}\r\n\t\t\t\t
\r\n\t\t\t\t
\r\n\t\t\t\t\t\r\n\t\t\t\t
\r\n\t\t\t
\r\n\t\t)\r\n\t} else {\r\n\t\treturn (\r\n\t\t\t<>\r\n\t\t\t\t
\r\n\t\t\t\t

{title}

\r\n\t\t\t\t{ReactHtmlParser(html)}\r\n\t\t\t\r\n\t\t)\r\n\t}*/\r\n};\r\n//Didn't want to totally remove the collapse incase we need to revert\r\n/*const _showMoreButtonClick = (e:React.MouseEvent) => {\r\n\te.stopPropagation();\r\n\tconsole.log(e.currentTarget.closest('.clps-short')?.classList.toggle('show'));\r\n}*/\r\n\r\nconst _renderSearchName = (product: SimpleProduct | undefined) => {\r\n let searchName = '';\r\n if (product != undefined) {\r\n product.ExtensionProperties?.forEach(element => {\r\n if (element.Key == 'SearchName' && element.Value?.StringValue != undefined) {\r\n searchName = element.Value?.StringValue;\r\n }\r\n });\r\n }\r\n return

{searchName}

;\r\n};\r\n\r\nconst _renderCurrencyCode = (product: SimpleProduct | undefined) => {\r\n let _currencyCode = '';\r\n if (product != undefined) {\r\n product.ExtensionProperties?.forEach(element => {\r\n if (element.Key == 'CurrencyCode' && element.Value?.StringValue != '' && element.Value?.StringValue != undefined) {\r\n _currencyCode = element.Value?.StringValue;\r\n }\r\n });\r\n }\r\n return {_currencyCode};\r\n};\r\n\r\nconst _renderLevelScale = (props: IBuyboxViewProps, product: SimpleProduct | undefined) => {\r\n let scaleLevel = null;\r\n let scaleClass = null;\r\n if (product != undefined) {\r\n product.ExtensionProperties?.forEach(element => {\r\n if (element.Key == 'LevelId' && element.Value?.StringValue != undefined) {\r\n scaleLevel = element.Value?.StringValue;\r\n scaleClass = element.Value?.StringValue?.toLocaleLowerCase();\r\n }\r\n });\r\n\r\n // Check if Product Sticker is available or not\r\n if(scaleLevel != null)\r\n {\r\n return
{scaleLevel}
;\r\n }\r\n else{\r\n return null;\r\n }\r\n //end\r\n \r\n } else {\r\n return
{scaleLevel}
;\r\n }\r\n};\r\n\r\nconst _showPrice = (product: SimpleProduct | undefined) => {\r\n let showPrice: boolean = true;\r\n if (product != undefined) {\r\n product.ExtensionProperties?.forEach(element => {\r\n if (element.Key == 'IsSupressPrice' && element.Value?.BooleanValue == true) {\r\n showPrice = false;\r\n }\r\n });\r\n }\r\n return showPrice;\r\n};\r\n\r\nconst _renderAddToCart = (addToCart: IBuyboxAddToCartViewProps): JSX.Element => {\r\n const { ContainerProps, errorBlock, button } = addToCart;\r\n\r\n return (\r\n \r\n {errorBlock}\r\n {button}\r\n \r\n );\r\n};\r\n\r\nconst _renderAddToOrderTemplate = (addToOrderTemplate: IBuyboxAddToOrderTemplateViewProps): JSX.Element => {\r\n const { ContainerProps, errorBlock, button } = addToOrderTemplate;\r\n\r\n return (\r\n \r\n {errorBlock}\r\n {button}\r\n \r\n );\r\n};\r\n\r\nconst _renderAddToWishlist = (addToWishlist: IBuyboxAddToWishlistViewProps): JSX.Element => {\r\n const { ContainerProps, errorBlock, button } = addToWishlist;\r\n\r\n return (\r\n \r\n {errorBlock}\r\n {button}\r\n \r\n );\r\n};\r\n\r\nconst _renderConfigure = (configure: IBuyboxProductConfigureViewProps, parent_props: IBuyboxViewProps): JSX.Element => {\r\n const { ContainerProps, dropdowns } = configure;\r\n return (\r\n \r\n {/* {dropdowns.map(_renderConfigureDropdown, productDimension)} */}\r\n {dropdowns.map((dropdown, i) => {\r\n return _renderConfigureDropdown(dropdown, parent_props, i);\r\n })}\r\n \r\n );\r\n};\r\n\r\nconst _renderSocialShare = (socialShare: React.ReactNode[]): JSX.Element | undefined => {\r\n if (!socialShare || socialShare.length === 0) return undefined;\r\n return (\r\n <>\r\n {socialShare[0]}\r\n
\r\n \r\n );\r\n};\r\n\r\nconst _renderConfigureDropdown = (\r\n dropdown: IBuyboxProductConfigureDropdownViewProps,\r\n parent_props: IBuyboxViewProps,\r\n counter: any\r\n): JSX.Element => {\r\n const { ContainerProps, LabelContainerProps, heading, errors, select } = dropdown;\r\n let productDimensionColor = '';\r\n let productDimensionSize = '';\r\n let productDimensionType = '';\r\n //console.log(dropdown.select == '
Color
');\r\n let product = parent_props.data.product.result;\r\n if (product != undefined) {\r\n product.ExtensionProperties?.forEach(element => {\r\n if (element.Key == 'DimensionOne' && element.Value?.StringValue != undefined) {\r\n productDimensionColor = element.Value?.StringValue;\r\n }\r\n if (element.Key == 'DimensionThree' && element.Value?.StringValue != undefined) {\r\n productDimensionSize = element.Value?.StringValue;\r\n }\r\n if (element.Key == 'DimensionFour' && element.Value?.StringValue != undefined) {\r\n productDimensionType = element.Value?.StringValue;\r\n }\r\n });\r\n return (\r\n \r\n \r\n {counter == 0 && productDimensionColor != ''\r\n ? productDimensionColor\r\n : counter == 1 && productDimensionSize != ''\r\n ? productDimensionSize\r\n : counter == 2 && productDimensionType != ''\r\n ? productDimensionType\r\n : heading}\r\n {errors}\r\n \r\n {select}\r\n \r\n );\r\n } else {\r\n return (\r\n \r\n \r\n {counter == 0 && productDimensionColor != ''\r\n ? productDimensionColor\r\n : counter == 1 && productDimensionSize != ''\r\n ? productDimensionSize\r\n : counter == 2 && productDimensionType != ''\r\n ? productDimensionType\r\n : heading}\r\n {errors}\r\n \r\n {select}\r\n \r\n );\r\n }\r\n};\r\n\r\nconst _renderFindInStore = (findInStore: IBuyboxFindInStoreViewProps): JSX.Element => {\r\n const { ContainerProps, storeSelector, heading, description, errors, button, modal, productPickupOptionList } = findInStore;\r\n return (\r\n \r\n {storeSelector}\r\n {heading}\r\n {productPickupOptionList}\r\n {description}\r\n {errors}\r\n {button}\r\n {modal}\r\n \r\n );\r\n};\r\n\r\nconst _renderQuantity = (quantity: IBuyboxProductQuantityViewProps): JSX.Element => {\r\n const { ContainerProps, LabelContainerProps, heading, input, errors } = quantity;\r\n return (\r\n \r\n \r\n {heading}\r\n {errors}\r\n \r\n {input}\r\n \r\n );\r\n};\r\n\r\nconst _renderKeyInPrice = (keyInPrice: IBuyboxKeyInPriceViewProps): JSX.Element => {\r\n const { ContainerProps, LabelContainerProps, heading, input } = keyInPrice;\r\n return (\r\n \r\n {heading}\r\n {input}\r\n \r\n );\r\n};\r\n\r\nconst _renderShopSimilarItem = (shopSimilarItem: IBuyboxShopSimilarLookViewProps): JSX.Element => {\r\n const { ContainerProps, errors, input } = shopSimilarItem;\r\n return (\r\n \r\n {errors}\r\n {input}\r\n \r\n );\r\n};\r\nexport default BuyboxView;\r\n","import {Node} from '@msdyn365-commerce-modules/utilities';\r\nimport * as React from 'react';\r\nimport {\r\n\tIBuyboxAddToCartViewProps,\r\n\tIBuyboxAddToOrderTemplateViewProps,\r\n\tIBuyboxAddToWishlistViewProps,\r\n\tIBuyboxKeyInPriceViewProps,\r\n\tIBuyboxProductConfigureDropdownViewProps,\r\n\tIBuyboxProductConfigureViewProps,\r\n\tIBuyboxProductQuantityViewProps,\r\n\tIBuyboxShopSimilarLookViewProps\r\n} from '@msdyn365-commerce-modules/buybox/src/common';\r\nimport { IBuyboxViewProps } from '@msdyn365-commerce-modules/buybox/src/modules/buybox/./buybox';\r\nimport {\r\n\tIBuyboxFindInStoreViewProps\r\n} from '@msdyn365-commerce-modules/buybox/src/modules/buybox/components/buybox-find-in-store';\r\nimport { AttributeValue, SimpleProduct } from '@msdyn365-commerce/retail-proxy';\r\nimport ReactHtmlParser from 'react-html-parser';\r\nimport {getAttributeValuesAsync} from \"@msdyn365-commerce/retail-proxy/dist/DataActions/ProductsDataActions.g\";\r\nimport {ReactNode, useState} from 'react';\r\n\r\n\r\n/* Private Functions */\r\nconst _getExtensionProperties = (product: SimpleProduct|undefined): null|{} => {\r\n\tif (product === undefined || !product.ExtensionProperties) return null;\r\n\t//we have product data, proceed to extract the usable attributes\r\n\tlet count = 0;\r\n\tlet final = {};\t\t//final return for our data\r\n\r\n\twhile (product.ExtensionProperties && product.ExtensionProperties[count] !== undefined){\r\n\t\tconst ep_key = product.ExtensionProperties[count].Key;\r\n\t\tlet ep_val: any;\r\n\r\n\t\tObject.keys(product.ExtensionProperties[count].Value!).forEach((item) => {\r\n\t\t\tif (product.ExtensionProperties![count].Value![item] !== undefined){\r\n\t\t\t\tep_val = product.ExtensionProperties![count].Value![item];\r\n\t\t\t}\r\n\t\t})\r\n\t\tif (ep_key && ep_val) final[ep_key] = ep_val;\t//false switches don't pass this\r\n\t\tcount++;\r\n\t}\r\n\treturn final;\r\n}\r\nconst _renderSearchName = (ExtensionProps: {}|null): JSX.Element|null => {\r\n\tif (ExtensionProps && ExtensionProps[\"SearchName\"]){\r\n\t\treturn

{ExtensionProps[\"SearchName\"]}

;\r\n\t} else {\r\n\t\treturn null\r\n\t}\r\n}\r\nconst _renderLevelScale = (ExtensionProps: {}|null): JSX.Element|null => {\r\n\tif (ExtensionProps && ExtensionProps[\"LevelId\"]){\r\n\t\treturn (\r\n\t\t\t
{ExtensionProps[\"LevelId\"]}
\r\n\t\t)\r\n\t} else {\r\n\t\treturn null\r\n\t}\r\n};\r\nconst _formatPricing = (PriceRaw:number|null, ExtensionProps: {}|null, price: ReactNode|undefined, channelId:number) => {\r\n\t//if there's no price object, price number, EP, or Suppress flag is here, show nothing\r\n\tif(!price || !PriceRaw) return null;\r\n\tif(ExtensionProps && ExtensionProps['IsSupressPrice']) return null;\r\n\tif([5637145352,5637145370].includes(channelId)){\r\n\t\treturn (\r\n\t\t\t<>\r\n\t\t\t\t
{price}
\r\n\t\t\t\t

Price includes VATS

\r\n\t\t\t\r\n\t\t)\r\n\t} else {\r\n\t\treturn
{price}
\r\n\t}\r\n}\r\nconst _renderSocialShare = (socialShare: React.ReactNode[]): JSX.Element|null => {\r\n\tif (!socialShare || socialShare.length === 0) return null;\r\n\treturn (<>\r\n\t\t{socialShare[0]}\r\n\t\t
\r\n\t);\r\n};\r\nconst _renderConfigure = (configure: IBuyboxProductConfigureViewProps, ExtensionProps: Object|null): JSX.Element => {\r\n\tconst {ContainerProps, dropdowns} = configure;\r\n\treturn (\r\n\t\t\r\n\t\t\t{dropdowns.map((dropdown: IBuyboxProductConfigureDropdownViewProps, i: number) => {\r\n\t\t\t\treturn _renderConfigureDropdown(dropdown, ExtensionProps, i);\r\n\t\t\t})}\r\n\t\t\r\n\t);\r\n};\r\nconst _renderConfigureDropdown = (\r\n\tdropdown: IBuyboxProductConfigureDropdownViewProps, ExtensionProps: Object|null, count: number,\r\n): JSX.Element => {\r\n\tconst dimensionOverrideKeys = ['DimensionOne', 'DimensionThree', 'DimensionFour'];\r\n\tconst {ContainerProps, LabelContainerProps, heading, errors, select} = dropdown;\r\n\t//if we have an overide use it, otherwise use the default\r\n\tconst headingLabel = (ExtensionProps && ExtensionProps[dimensionOverrideKeys[count]]) || heading;\r\n\r\n\treturn (\r\n\t\t\r\n\t\t\t{headingLabel}{errors}\r\n\t\t\t{select}\r\n\t\t\r\n\t);\r\n}\r\nconst _renderKeyInPrice = (keyInPrice: IBuyboxKeyInPriceViewProps): JSX.Element => {\r\n\tconst { ContainerProps, LabelContainerProps, heading, input } = keyInPrice;\r\n\treturn (\r\n\t\t\r\n\t\t\t{heading}\r\n\t\t\t{input}\r\n\t\t\r\n\t);\r\n};\r\nconst _renderQuantity = (quantity: IBuyboxProductQuantityViewProps): JSX.Element => {\r\n\tconst { ContainerProps, LabelContainerProps, heading, input, errors } = quantity;\r\n\treturn (\r\n\t\t\r\n\t\t\t{heading}{errors}\r\n\t\t\t{input}\r\n\t\t\r\n\t);\r\n};\r\nconst _renderAddToCart = (addToCart: IBuyboxAddToCartViewProps): JSX.Element => {\r\n\tconst { ContainerProps, errorBlock, button } = addToCart;\r\n\treturn {errorBlock} {button};\r\n};\r\nconst _renderAddToOrderTemplate = (addToOrderTemplate: IBuyboxAddToOrderTemplateViewProps): JSX.Element => {\r\n\tconst { ContainerProps, errorBlock, button } = addToOrderTemplate;\r\n\treturn {errorBlock} {button};\r\n};\r\nconst _renderAddToWishlist = (addToWishlist: IBuyboxAddToWishlistViewProps): JSX.Element => {\r\n\tconst { ContainerProps, errorBlock, button } = addToWishlist;\r\n\treturn {errorBlock} {button};\r\n};\r\nconst _renderFindInStore = (findInStore: IBuyboxFindInStoreViewProps): JSX.Element => {\r\n\tconst {\r\n\t\tContainerProps,\r\n\t\tstoreSelector,\r\n\t\theading,\r\n\t\tdescription,\r\n\t\terrors,\r\n\t\tbutton,\r\n\t\tmodal,\r\n\t\tproductPickupOptionList\r\n\t} = findInStore;\r\n\treturn (\r\n\t\t\r\n\t\t\t{storeSelector} {heading} {productPickupOptionList} {description} {errors} {button} {modal}\r\n\t\t\r\n\t);\r\n};\r\nconst _renderShopSimilarItem = (shopSimilarItem: IBuyboxShopSimilarLookViewProps): JSX.Element => {\r\n\tconst { ContainerProps, errors, input } = shopSimilarItem;\r\n\treturn {errors} {input};\r\n};\r\nconst _renderHtmlField = (fieldKey:string, ExtensionProps:Object|null):JSX.Element|null => {\r\n\tif(ExtensionProps === null) return null;\r\n\tif(ExtensionProps[fieldKey]){\r\n\r\n\t\treturn (\r\n\t\t\t
\r\n\t\t\t\t

{fieldKey.replace('Product','')}

\r\n\t\t\t\t{ReactHtmlParser(ExtensionProps[fieldKey])}\r\n\t\t\t
\r\n\t\t)\r\n\t} else {\r\n\t\treturn null;\r\n\t}\r\n}\r\n//Injection of deleted dimensions\r\nfunction inject_dimensions(dimensions: any, type_dimension: any) {\r\n\tlet dropDowns = document.getElementsByClassName('ms-buybox__dropdown');\r\n\t//Get the dropdown html by using ID\r\n\tconst valves = document.getElementById('valves');\r\n\tconst material = document.getElementById('material');\r\n\r\n\tfor (let i = 0; i < dropDowns.length; i++) {\r\n\t\tlet dropDown_for = dropDowns[i].firstElementChild?.getAttribute('for');\r\n\t\tlet dimension_type;\r\n\t\tif (dropDown_for != null) {\r\n\t\t\tlet search_against = 'ms-buybox__dropown-quantity-input-';\r\n\t\t\tdimension_type = dropDown_for.slice(dropDown_for.indexOf(search_against) + search_against.length);\r\n\t\t\tif (dimensions !== undefined && dimension_type == type_dimension.toString()) {\r\n\t\t\t\tlet $element = dropDowns[i].lastChild as HTMLDivElement;\r\n\t\t\t\tif ($element.classList.contains('msc-swatch-container')) {\r\n\t\t\t\t\t//SWATCH\r\n\t\t\t\t\tlet $options = $element.children as HTMLCollection;\r\n\t\t\t\t\tfor (let z = 0; z < dimensions.length; z++) {\r\n\t\t\t\t\t\tlet is_exist = false;\r\n\t\t\t\t\t\tfor (let y = 0; y < $options.length; y++) {\r\n\t\t\t\t\t\t\tif ($options[y].textContent == dimensions[z].VALUE) {\r\n\t\t\t\t\t\t\t\tis_exist = true;\r\n\t\t\t\t\t\t\t\t//Remove duplicate\r\n\t\t\t\t\t\t\t\tif ($options[y].textContent == material?.textContent) {\r\n\t\t\t\t\t\t\t\t\tmaterial && material.remove();\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif (!is_exist) {\r\n\t\t\t\t\t\t\t//PUSH the value\r\n\t\t\t\t\t\t\tlet option_elem = document.createElement('button');\r\n\t\t\t\t\t\t\toption_elem.textContent = dimensions[z].VALUE;\r\n\t\t\t\t\t\t\toption_elem.setAttribute('disabled', '');\r\n\t\t\t\t\t\t\toption_elem.classList.add('msc-swatch-container__item');\r\n\t\t\t\t\t\t\toption_elem.classList.add('msc-swatch-container__item__unselected');\r\n\t\t\t\t\t\t\toption_elem.classList.add('msc-swatch-container__item__uncolored');\r\n\t\t\t\t\t\t\toption_elem.setAttribute('id', 'material');\r\n\t\t\t\t\t\t\t$element.appendChild(option_elem);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\t//DROPDOWN\r\n\t\t\t\t\tlet $select = dropDowns[i].lastChild as HTMLSelectElement;\r\n\t\t\t\t\tlet $options = $select.options as HTMLOptionsCollection;\r\n\t\t\t\t\tfor (let z = 0; z < dimensions.length; z++) {\r\n\t\t\t\t\t\tlet is_exist = false;\r\n\t\t\t\t\t\tfor (let y = 0; y < $options.length; y++) {\r\n\t\t\t\t\t\t\tif ($options[y].text == dimensions[z].VALUE) {\r\n\t\t\t\t\t\t\t\tis_exist = true;\r\n\t\t\t\t\t\t\t\t//Remove duplicate\r\n\t\t\t\t\t\t\t\tif ($options[y].text == valves?.textContent) {\r\n\t\t\t\t\t\t\t\t\tvalves && valves.remove();\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif (!is_exist) {\r\n\t\t\t\t\t\t\t//PUSH the value in the dropDown\r\n\t\t\t\t\t\t\tlet option_elem = document.createElement('option');\r\n\t\t\t\t\t\t\toption_elem.text = dimensions[z].VALUE;\r\n\t\t\t\t\t\t\toption_elem.setAttribute('disabled', '');\r\n\t\t\t\t\t\t\toption_elem.setAttribute('id', 'valves');\r\n\t\t\t\t\t\t\t$select.options.add(option_elem);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}\r\n\r\n\r\n/* Main Exported Function */\r\nconst BuyboxView: React.FC = props => {\r\n\t/* Only destructuring repeated or complicated props\r\n\t * Totally removed MediaGalleryContainerProps & description (not using OOtB) */\r\n\tconst {\r\n\t\taddToCart,\r\n\t\taddToOrderTemplate,\r\n\t\taddToWishlist,\r\n\t\tconfigure,\r\n\t\tfindInStore,\r\n\t\tkeyInPrice,\r\n\t\tprice,\r\n\t\tProductInfoContainerProps,\r\n\t\tquantity,\r\n\t\tshopSimilarLook,\r\n\t\tshopSimilarDescription,\r\n\t} = props;\r\n\r\n\tconst ExtensionProps = _getExtensionProperties(props.data.product.result);\r\n\t//Attribute Function Chain\r\n\tconst [productAttribute, setProductAttribute] = useState([]);\r\n\tconst _getAttributesAsync = async (props: IBuyboxViewProps) => {\r\n\t\tconst getAttribute:AttributeValue[] = await getAttributeValuesAsync(\r\n\t\t\t{ callerContext: props.context.actionContext },\r\n\t\t\tprops.data.product.result?.RecordId!,\r\n\t\t\tprops.context.request.apiSettings.channelId,\r\n\t\t\tprops.context.request.apiSettings.catalogId\r\n\t\t);\r\n\t\tsetProductAttribute(getAttribute);\r\n\t}\r\n\tconst renderProductAttributes = () => {\r\n\t\treturn (\r\n\t\t\t<>\r\n\t\t\t\t

Product Attributes

\r\n\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t{productAttribute.map(attr => (\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t{attr.TextValue !== '' && (\r\n\t\t\t\t\t\t\t\t<>\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t)}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t))}\r\n\t\t\t\t\t\r\n\t\t\t\t
{attr.Name}{attr.TextValue}
\r\n\t\t\t\r\n\t\t);\r\n\t};\r\n\tconst PriceRaw = ( props.data.product.result?.Price || null);\r\n\r\n\t// Get Attribute Call\r\n\tReact.useEffect(() => {\r\n\t\t_getAttributesAsync(props);\r\n\t\tprops.data.productDimensions.result?.forEach(dimension => {\r\n\t\t\tlet dimension_type = dimension.DimensionTypeValue;\r\n\t\t\tlet dimension_values: any = '';\r\n\t\t\tdimension.ExtensionProperties?.forEach(value => {\r\n\t\t\t\tif (value.Key == 'AllDimensions') dimension_values = value.Value?.StringValue;\r\n\t\t\t});\r\n\t\t\tif (dimension_values !== '') {\r\n\t\t\t\tdimension_values = JSON.parse(dimension_values);\r\n\t\t\t\tinject_dimensions(dimension_values, dimension_type);\r\n\t\t\t}\r\n\t\t});\r\n\t});\r\n\r\n\treturn (\r\n\t\t
\r\n\t\t\t
\r\n\t\t\t\t
{props.mediaGallery}
\r\n\t\t\t\t\r\n\t\t\t\t\t
\r\n\t\t\t\t\t\t{props.title}\r\n\t\t\t\t\t\t{_renderSearchName(ExtensionProps)}\r\n\t\t\t\t\t\t{_renderLevelScale(ExtensionProps)}\r\n\t\t\t\t\t\t{_formatPricing(PriceRaw, ExtensionProps, price, props.context.request.apiSettings.channelId)}\r\n\t\t\t\t\t\t{_renderSocialShare(props.slots && props.slots.socialShare)}\r\n\t\t\t\t\t\t{configure && _renderConfigure(configure, ExtensionProps)}\r\n\t\t\t\t\t\t{props.unitOfMeasure}\r\n\t\t\t\t\t\t{props.bulkPurchaseLink}\r\n\t\t\t\t\t\t{/*{description}*/}\r\n\t\t\t\t\t\t{props.rating}\r\n\t\t\t\t\t\t{keyInPrice && _renderKeyInPrice(keyInPrice)}\r\n\t\t\t\t\t\t{quantity && _renderQuantity(quantity)}\r\n\t\t\t\t\t\t{props.inventoryLabel}\r\n\t\t\t\t\t\t{addToCart && _renderAddToCart(addToCart)}\r\n\t\t\t\t\t\t{findInStore && _renderFindInStore(findInStore)}\r\n\t\t\t\t\t\t{addToOrderTemplate && _renderAddToOrderTemplate(addToOrderTemplate)}\r\n\t\t\t\t\t\t{addToWishlist && _renderAddToWishlist(addToWishlist)}\r\n\t\t\t\t\t\t{shopSimilarLook && _renderShopSimilarItem(shopSimilarLook)}\r\n\t\t\t\t\t\t{shopSimilarDescription && _renderShopSimilarItem(shopSimilarDescription)}\r\n\t\t\t\t\t\t
\r\n\t\t\t\t\t\tFind a Dealer\r\n\t\t\t\t\t
\r\n\t\t\t\t
\r\n\t\t\t\t{['ProductDescription', 'ProductFeatures', 'ProductSpecification'].map((item) => {\r\n\t\t\t\t\treturn _renderHtmlField(item, ExtensionProps)\r\n\t\t\t\t})}\r\n\t\t\t\t{productAttribute && renderProductAttributes()}\r\n\t\t\t
\r\n\t\t
\r\n\t)\r\n};\r\nexport default BuyboxView;"],"sourceRoot":""}