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,IAC5BA,EAAgBK,QAAOrL,QACHjC,IAATiC,IAEfwZ,cAAelV,KAAKkV,cACpBmB,aACI7B,GAAkBe,GAA6B3C,EAAAA,gBAAgBE,YAAYpM,GACrE1G,KAAKuU,iBAAiBC,EAAgBC,QACtChb,IAEd,OAAOuG,KAAK8F,MAAMwQ,WAAWT,IAoLrC,+EC3TA,MAwBMxF,EAAkBA,CAACxG,EAA+BrN,IAC7CyM,EAAAA,cAACa,EAAAA,KAAItR,OAAAuR,OAAA,GAAKF,GAAoBrN,GAASA,EAAMC,IAAIoQ,IAGtDF,EAAcA,CAACC,EAA2BpQ,IACrCyM,EAAAA,cAACa,EAAAA,KAAItR,OAAAuR,OAAA,GAAK6C,GAAgBpQ,GAASA,EAAMC,IAAIoQ,IAGlDA,EAAkB7F,IACpB,MAAM,iBAAE4B,EAAgB,iBAAEI,GAAqBhC,EAE/C,OAAOiC,EAAAA,cAACa,EAAAA,KAAItR,OAAAuR,OAAA,GAAKnB,GAAmBI,IAGxC,EAtCqElD,IACjE,MAAM,QACFmE,EAAO,2BACPC,EAA0B,SAC1BhO,EAAQ,kCACRiO,EAAiC,mBACjCC,EAAkB,WAClBqL,EAAU,aACVY,GACAvQ,EAEJ,OAAI5J,EAEI+M,EAAAA,cAACqH,EAAAA,OAAM9X,OAAAuR,OAAA,GAAKG,GACPD,EACAoM,EACAZ,EAAapF,EAAgBlG,EAAmCjO,GAAYyQ,EAAYvC,EAAoBlO,KAIzH4J,EAAM3J,QAAQ+K,UAAU5J,MAAM,4DACvB,cC/BXiZ,EAAOC,QAAUvN,cCAjBsN,EAAOC,QAAUC","sources":["webpack://mattressfirm/./src/Utilities/analytics/utagCaller.ts?3814","webpack://mattressfirm/./src/Utilities/constants.ts?8bdf","webpack://mattressfirm/./src/Utilities/emtpyChecker.ts?e2f5","webpack://mattressfirm/./src/Utilities/get-page-path.ts?590a","webpack://mattressfirm/./src/Utilities/get-product-brand.tsx?2b65","webpack://mattressfirm/./src/Utilities/product-search-result-utils.tsx?58f2","webpack://mattressfirm/./src/actions/EyebrowMessageDataServiceEntities.g.ts?c30c","webpack://mattressfirm/./src/actions/EyebrowMessageDataActionExtension.g.ts?1765","webpack://mattressfirm/./src/actions/get-eyebrow-message.action.ts?b0a0","webpack://mattressfirm/./src/actions/get-mfrm-products-category-paths.action.ts?dc81","webpack://mattressfirm/./src/data-actions/utilities/utils.ts?7452","webpack://mattressfirm/./src/themes/mattressfirm/views/product-collection.view.tsx?e9f1","webpack://mattressfirm/./lib/product-collection/module-registration.js?36d3","webpack://mattressfirm/./src/modules/product-collection/product-collection.tsx?4008","webpack://mattressfirm/./src/modules/product-collection/product-collection.view.tsx?5d36","webpack://mattressfirm/external var \"React\"?0d3b","webpack://mattressfirm/external var \"ReactDOM\"?853b"],"sourcesContent":["import { IAnalyticsConfiguration } from './clickTrack';\r\n\r\n// Interface for 3rd-party function. AKA utag.\r\ninterface ITealium {\r\n link(data: {}): void | false;\r\n view(data: {}): void | false;\r\n data(data: {}): void | false;\r\n}\r\n\r\nexport interface IPromotionConfig {\r\n event?: string | null;\r\n event_name?: string | null;\r\n search_term?: string | null;\r\n search_type?: string | null;\r\n event_category?: string | null;\r\n event_action?: string | null;\r\n event_label?: string | null;\r\n event_type?: string | null;\r\n event_noninteraction?: string;\r\n enhanced_action?: string | null;\r\n customer_email?: string | undefined;\r\n customer_phone_number?: string | undefined;\r\n first_name?: string | undefined;\r\n last_name?: string | undefined;\r\n address1?: string | undefined;\r\n address2?: string | undefined;\r\n city?: string | undefined;\r\n state?: string | undefined;\r\n zip_code?: string | undefined;\r\n order_subtotal?: string | undefined;\r\n order_currency?: string | undefined;\r\n country?: string | undefined;\r\n // productConfig?: IProductDataConfig;\r\n checkout_step?: string;\r\n checkout_option?:(string | undefined)[];\r\n checkout_type?:(string | undefined)[];\r\n product_id?: (string | undefined)[];\r\n product_name?: (string | undefined)[];\r\n product_category?: (string | undefined)[];\r\n product_brand?: (string | undefined)[];\r\n product_variant?: (string | undefined | number)[];\r\n product_price?: (string | undefined)[];\r\n product_quantity?: (string | undefined)[];\r\n product_url?: (string | undefined)[];\r\n product_size?: (string | undefined)[];\r\n product_image_url?: (string | undefined)[];\r\n core_item_flag?: string | null;\r\n funnel_type?: string | null;\r\n ga_title?: string | null;\r\n ga_location?: string | null;\r\n order_quantity?: string | null;\r\n}\r\n\r\ninterface IProductDataConfig {\r\n product_variant?: (string | undefined)[];\r\n product_price?: (string | undefined)[];\r\n}\r\n\r\nexport interface IAnalyticsConfigurationData {\r\n productConfig?: IProductDataConfig;\r\n}\r\n\r\n\r\n// Legacy function\r\nexport const callUtag = async (objToCall: IPromotionConfig) => {\r\n void await callUtagLink(objToCall);\r\n};\r\n\r\n/**\r\n * Tealium dispatch click tracking.\r\n * @param objToCall\r\n */\r\nexport const callUtagLink = async (objToCall: IPromotionConfig | IAnalyticsConfiguration) => {\r\n try {\r\n Object.keys(objToCall).forEach(\r\n key => {\r\n if (objToCall[key] === null) {\r\n delete objToCall[key];\r\n }\r\n }\r\n );\r\n // If utag doesn't exist in the global scope, set as false.\r\n const utag: ITealium = global.hasOwnProperty('utag') ? global[\"utag\"] : false;\r\n if(utag) { utag.link(objToCall); }\r\n\r\n } catch (e) {\r\n console.log('Utag Error', e);\r\n }\r\n};\r\n\r\n/**\r\n * Tealium dispatch view tracking.\r\n * @param objToCall\r\n */\r\nexport const callUtagView = async (objToCall: {}) => {\r\n try {\r\n // If utag doesn't exist in the global scope, set as false.\r\n const utag: ITealium = global.hasOwnProperty('utag') ? global[\"utag\"] : false;\r\n if(utag) { utag.view(objToCall); }\r\n } catch (e) {\r\n console.log('utag View Error', e);\r\n }\r\n};\r\n\r\n/**\r\n * Not currently implemented.\r\n * @param objToCall\r\n * @param dataType\r\n */\r\nexport const callUtagData = ({ productConfig = {} }: IAnalyticsConfigurationData , dataType: string) => {\r\n try {\r\n // If utag doesn't exist in the global scope, set as false.\r\n const utag: ITealium = global.hasOwnProperty('utag') ? global[\"utag\"] : false;\r\n switch (dataType) {\r\n case 'data':\r\n // @ts-ignore\r\n if('utag' in window) { utag.data = {...utag.data, ...productConfig}; }\r\n break;\r\n case '_data':\r\n // @ts-ignore\r\n utag_data = {...utag_data , ...productConfig};\r\n break;\r\n default:\r\n null;\r\n }\r\n } catch (e) {\r\n console.log('Utag Error', e);\r\n }\r\n};","export const variantQueryStringName = 'variantid';","// tslint:disable\r\nexport const hasArray = (values: any): any[] | undefined => {\r\n return (typeof values !== 'string') && values && values.length ? values : undefined;\r\n};","import MsDyn365 from '@msdyn365-commerce/core';\r\n\r\nexport const getPagePath = (): string => {\r\n return MsDyn365.isBrowser\r\n ? window.location.href.split(location.host)[1].includes('?')\r\n ? window.location.href.split(location.host)[1].split('?')[0]\r\n : window.location.href.split(location.host)[1]\r\n : '';\r\n};","import { IGridSettings, IImageSettings, Image } from '@msdyn365-commerce/core';\r\nimport { AttributeValue } from '@msdyn365-commerce/retail-proxy';\r\nimport React from 'react';\r\nimport { IBrandListData } from '../modules/mfrm-buybox/mfrm-buybox.view';\r\nimport { IProductBonusWithBrandName } from '../modules/mfrm-cart/mfrm-cart';\r\nimport {hasArray} from './emtpyChecker';\r\nimport MsDyn365 from '@msdyn365-commerce/core';\r\n\r\nconst fallBackBrandAttribute = 'VENDOR BRAND';\r\n\r\n// tslint:disable-next-line: cyclomatic-complexity\r\nexport const parseBrandData = (\r\n attributes: AttributeValue[] | undefined,\r\n backendAttribute: string,\r\n gridSettings: IGridSettings,\r\n renderBrandNameOnly: Boolean = false,\r\n brandList: IBrandListData[],\r\n imageSettings?: IImageSettings\r\n): JSX.Element | undefined => {\r\n const attribute = backendAttribute || fallBackBrandAttribute;\r\n const productBrandName =\r\n attributes &&\r\n attributes.find(currAttribute => currAttribute.Name && currAttribute.Name.toLowerCase().trim() === attribute.toLowerCase().trim())\r\n ?.TextValue;\r\n\r\n if (renderBrandNameOnly) {\r\n return {productBrandName};\r\n }\r\n\r\n const selectedBrand =\r\n (brandList &&\r\n productBrandName &&\r\n brandList.find(\r\n (brand: IBrandListData) => brand && brand.brandName.toLowerCase().trim() === productBrandName.toLowerCase().trim()\r\n )) ||\r\n undefined;\r\n\r\n if (!selectedBrand) {\r\n return undefined;\r\n }\r\n\r\n const copySelectedBrand: IBrandListData = selectedBrand;\r\n // set alt text to brand name if no alt text is configured\r\n if (copySelectedBrand && _useDefaultAltText(copySelectedBrand) && copySelectedBrand.brandLogo) {\r\n copySelectedBrand.brandLogo.altText = productBrandName;\r\n }\r\n\r\n // set height to configured value or the default\r\n const height = copySelectedBrand && copySelectedBrand.logoHeight !== undefined ? copySelectedBrand.logoHeight : 22;\r\n const brandImageSettings: IImageSettings = {\r\n viewports: {\r\n xs: { q: `w=0&h=25&m=6`, w: 0, h: 25 },\r\n lg: { q: `w=0&h=25&m=6`, w: 0, h: 25 },\r\n xl: { q: `w=0&h=25&m=6`, w: 0, h: 25 }\r\n },\r\n lazyload: false\r\n };\r\n\r\n const brandLogo = copySelectedBrand && copySelectedBrand.brandLogo && (\r\n \r\n );\r\n // place logo inside a link if configured to\r\n const brandLink =\r\n copySelectedBrand &&\r\n copySelectedBrand.brandLink &&\r\n copySelectedBrand.brandLink.linkUrl &&\r\n copySelectedBrand.brandLink.linkUrl.destinationUrl &&\r\n copySelectedBrand.brandLink;\r\n const linkElement = brandLink && (\r\n \r\n {brandLogo}\r\n \r\n );\r\n\r\n return linkElement || brandLogo;\r\n};\r\n// get only brandName\r\nexport const parseBrandName = (attributes: AttributeValue[] | undefined, backendAttribute: string, recordId?: number): string | undefined => {\r\n const attribute = backendAttribute || fallBackBrandAttribute;\r\n let productBrandName = hasArray(attributes)?.find((currAttribute: AttributeValue) => currAttribute?.Name?.toLowerCase().trim() === attribute?.toLowerCase().trim())?.TextValue;\r\n if (!productBrandName && MsDyn365.isBrowser) {\r\n const getLocalStorage = localStorage.getItem('bonusItmesWithBrand');\r\n let bonusItemArray: IProductBonusWithBrandName[] = [];\r\n if (getLocalStorage) {\r\n bonusItemArray = JSON.parse(getLocalStorage);\r\n }\r\n const checkBrandName = bonusItemArray.find(item => item.productId === recordId)?.brandName;\r\n if(checkBrandName) {\r\n productBrandName = checkBrandName;\r\n } else {\r\n return undefined;\r\n }\r\n }\r\n return productBrandName;\r\n};\r\n\r\nexport const parseBrandNameUnbxd = (attributes: any | undefined, backendAttribute: string, recordId?: number): string | undefined => {\r\n const attribute = backendAttribute || fallBackBrandAttribute;\r\n // let productBrandName = hasArray(attributes)?.find((currAttribute: AttributeValue) => currAttribute?.Name?.toLowerCase().trim() === attribute?.toLowerCase().trim())?.TextValue;\r\n let productBrandName = attributes && attributes[attribute];\r\n if (!productBrandName && MsDyn365.isBrowser) {\r\n const getLocalStorage = localStorage.getItem('bonusItmesWithBrand');\r\n let bonusItemArray: IProductBonusWithBrandName[] = [];\r\n if (getLocalStorage) {\r\n bonusItemArray = JSON.parse(getLocalStorage);\r\n }\r\n const checkBrandName = bonusItemArray.find(item => item.productId === recordId)?.brandName;\r\n if(checkBrandName) {\r\n productBrandName = checkBrandName;\r\n } else {\r\n return undefined;\r\n }\r\n }\r\n return productBrandName;\r\n};\r\n\r\n// get only brandName\r\nexport const getBrandNameCheck = (attributes: AttributeValue[] | undefined, backendAttribute: string): string | undefined => {\r\n const productBrandName =\r\n attributes &&\r\n attributes.find(\r\n currAttribute => currAttribute.Name && currAttribute.Name.toLowerCase().trim() === backendAttribute.toLowerCase().trim()\r\n )?.TextValue;\r\n if (!productBrandName) {\r\n return undefined;\r\n }\r\n return productBrandName;\r\n};\r\n\r\n// get the appropriate image alt text\r\nconst _useDefaultAltText = (selectedBrand: IBrandListData): boolean => {\r\n const configuredAltText = selectedBrand.brandLogo?.altText;\r\n return !(configuredAltText && configuredAltText.trim() && configuredAltText !== 'No Data Available');\r\n};\r\n","import { IAny, ICoreContext, IGeneric } from '@msdyn365-commerce/core';\r\nimport dayjs from 'dayjs';\r\nimport Cookies from 'universal-cookie';\r\nimport { IMFIATPInventoryEntity, IMFICartLine, IMFICLDeliveryScheduleParameters } from '../actions/CoreProductDataServiceEntities.g';\r\nimport { IMFIAvailablePromotionDescription, IMFIItem } from '../actions/EyebrowMessageDataServiceEntities.g';\r\nimport getEyebrowAction, { GetEyebrowMessageInput } from '../actions/get-eyebrow-message.action';\r\nimport _getDeliveryByMessage from './get-delivery-by-message';\r\nimport { IMFIATPInventoryEntityPLP } from '../actions/BatchCoreProductDataServiceEntities.g';\r\n\r\nexport const _getEyebrowMessage = async (products: IMFIItem[], context: ICoreContext>) => {\r\n const priceGroupForAPICall = context.app && context.app.config.priceGroup;\r\n if (products && products.length > 0 && (priceGroupForAPICall !== '' || priceGroupForAPICall !== undefined)) {\r\n const items: IMFIItem[] | undefined = [];\r\n products.map(item => {\r\n const singleItem: IMFIItem = {\r\n ItemId: item.ItemId,\r\n DistinctProductVariant: item.DistinctProductVariant\r\n };\r\n items.push(singleItem);\r\n });\r\n\r\n const requestBody: IMFIAvailablePromotionDescription = {\r\n PriceGroup: priceGroupForAPICall,\r\n Items: items\r\n };\r\n const getEyebrowMessageInput = new GetEyebrowMessageInput(requestBody, undefined, true);\r\n try {\r\n const result = await getEyebrowAction(getEyebrowMessageInput, context.actionContext);\r\n if (result) {\r\n return result;\r\n }\r\n } catch (error) {\r\n console.log('Error', error);\r\n }\r\n }\r\n return null;\r\n};\r\n\r\nexport const _makeDeliveryMessage = (days: string) => {\r\n if (days === '' || days === undefined || days === null) {\r\n return '';\r\n }\r\n\r\n let deliveryByMessage = '';\r\n let date = new Date();\r\n const daysSpan = days.split('-');\r\n let deliveryDate = Date.now();\r\n if (daysSpan && daysSpan[1] !== undefined && daysSpan.length) {\r\n let deliveryByMessageRange = '';\r\n daysSpan.map((item: string) => {\r\n date = new Date();\r\n deliveryDate = Date.now();\r\n if (parseInt(item, 10) > 0) {\r\n let numberOfDays = parseInt(item, 10);\r\n let newDate = deliveryDate;\r\n while (numberOfDays > 0) {\r\n newDate = date.setDate(date.getDate() + 1);\r\n if (dayjs(newDate).format('d') !== '0' && dayjs(newDate).format('d') !== '6') {\r\n numberOfDays--;\r\n }\r\n }\r\n deliveryByMessage = dayjs(newDate).format('MMM D');\r\n if (deliveryByMessageRange !== '') {\r\n deliveryByMessageRange = `${deliveryByMessageRange} to ${deliveryByMessage}`;\r\n } else {\r\n deliveryByMessageRange = deliveryByMessage;\r\n newDate = date.setDate(date.getDate() - parseInt(item[0], 10));\r\n }\r\n }\r\n });\r\n return `Delivery by ${deliveryByMessageRange}`;\r\n } else {\r\n deliveryByMessage = dayjs(deliveryDate).format('MMM D');\r\n let numberOfDays = parseInt(days, 10);\r\n let newDate = deliveryDate;\r\n let flag = true;\r\n while (numberOfDays > 0) {\r\n newDate = date.setDate(date.getDate() + 1);\r\n if (dayjs(newDate).format('d') !== '0' && dayjs(newDate).format('d') !== '6') {\r\n numberOfDays--;\r\n } else {\r\n flag = false;\r\n }\r\n }\r\n deliveryByMessage =\r\n flag && days === '1'\r\n ? `Tomorrow ${dayjs(Date.now()).format('MMM D')}`\r\n : dayjs(newDate).format('ddd MMM, D');\r\n return `Delivery by ${deliveryByMessage}`;\r\n }\r\n};\r\n\r\n// tslint:disable-next-line: no-any\r\nexport const _coreProductATPCall = async (\r\n itemLines: IMFICartLine[],\r\n setCoreProductATPData: React.Dispatch,\r\n context: ICoreContext>\r\n) => {\r\n const cookies = new Cookies();\r\n const zipcode = cookies.get('zip_code');\r\n if (itemLines && itemLines.length === 0) {\r\n setCoreProductATPData([]);\r\n }\r\n const currentDate = Date.now();\r\n const requestBody: IMFICLDeliveryScheduleParameters = {\r\n InventoryType: 'Delivery',\r\n Weeks: context.app.config.weeksPDPforATPCall,\r\n StoreId: '',\r\n Page: 'plp',\r\n RequestedDate: dayjs(currentDate).format('MM/DD/YYYY'),\r\n ZipCode: zipcode,\r\n ItemLines: itemLines\r\n };\r\n const getDeliveryByMessage = _getDeliveryByMessage(requestBody, context);\r\n getDeliveryByMessage\r\n .then(result => {\r\n if (result !== undefined && result?.ATPInventoryData && result?.ATPInventoryData.length > 0) {\r\n setCoreProductATPData(result?.ATPInventoryData);\r\n } else {\r\n setCoreProductATPData([]);\r\n }\r\n })\r\n .catch(e => {\r\n console.log('Error', e);\r\n });\r\n};\r\n\r\nconst _setTime = (time: string | undefined) => {\r\n if (time !== undefined && time !== '') {\r\n const temp = time.split(' ');\r\n if (temp && temp.length > 0) {\r\n let newDatewithTime = dayjs(Date.now()).format('M/D/YYYY');\r\n newDatewithTime = `${newDatewithTime} ${temp[0]}:00 ${temp[1].toUpperCase()}`;\r\n return newDatewithTime;\r\n }\r\n }\r\n return '';\r\n};\r\n\r\nexport interface IATPInventoryData {\r\n deliveryByMessage: string;\r\n locationId: string;\r\n}\r\n\r\nexport const _getSoonestDeliveryDate = (coreProductATPData: IMFIATPInventoryEntity[]): IATPInventoryData => {\r\n let deliveryDetails = {\r\n deliveryByMessage: '',\r\n locationId: ''\r\n };\r\n if (!coreProductATPData || !coreProductATPData.length) {\r\n return deliveryDetails;\r\n }\r\n for (let index = 0; index < coreProductATPData.length; index++) {\r\n const item = coreProductATPData[index];\r\n if (item.Available === 'YES' && item.ATPQuantity !== undefined && parseInt(item.ATPQuantity, 10) > 0) {\r\n const date = new Date();\r\n const today = dayjs(Date.now()).format('D M YY');\r\n const deliveryDate = dayjs(item.SlotDate).format('D M YY');\r\n const currHour = dayjs(Date.now()).format('H');\r\n if (today === deliveryDate) {\r\n const deliveryMessage =\r\n _setTime(item.StartTime) !== ''\r\n ? parseInt(dayjs(_setTime(item.StartTime)).format('H'), 10) < 14 && parseInt(currHour, 10) < 14\r\n ? `Delivery by Today ${dayjs(Date.now()).format('MMM D')}`\r\n : `Delivery by Tomorrow ${dayjs(date.setDate(date.getDate() + 1)).format('MMM D')}`\r\n : '';\r\n deliveryDetails = {\r\n deliveryByMessage: deliveryMessage,\r\n locationId: item.Location1!\r\n };\r\n break;\r\n } else {\r\n const deliveryMessage = `Delivery by ${dayjs(item.SlotDate).format('MMM D')}`;\r\n deliveryDetails = {\r\n deliveryByMessage: deliveryMessage,\r\n locationId: item.Location1!\r\n };\r\n break;\r\n }\r\n }\r\n }\r\n return deliveryDetails;\r\n};\r\n\r\nexport const _getDeliveryDate = (coreProductATPData: IMFIATPInventoryEntityPLP) => {\r\n let deliveryDetails = {\r\n deliveryByMessage: '',\r\n locationId: ''\r\n };\r\n const item = coreProductATPData;\r\n if (item.Available === 'YES' && item.ATPQuantity !== undefined && parseInt(item.ATPQuantity, 10) > 0) {\r\n const date = new Date();\r\n const today = dayjs(Date.now()).format('D M YY');\r\n const deliveryDate = dayjs(item.SlotDate).format('D M YY');\r\n const currHour = dayjs(Date.now()).format('H');\r\n const startTimeHour = item.StartTime?.substring(0,2) || \"14\";\r\n if (today === deliveryDate) {\r\n const deliveryMessage =\r\n parseInt(startTimeHour, 10) < 14 && parseInt(currHour, 10) < 14\r\n ? `Delivery by Today ${dayjs(Date.now()).format('MMM D')}`\r\n : `Delivery by Tomorrow ${dayjs(date.setDate(date.getDate() + 1)).format('MMM D')}`;\r\n deliveryDetails = {\r\n deliveryByMessage: deliveryMessage,\r\n locationId: item.Location1!\r\n };\r\n } else {\r\n const deliveryMessage = `Delivery by ${dayjs(item.SlotDate).format('MMM D')}`;\r\n deliveryDetails = {\r\n deliveryByMessage: deliveryMessage,\r\n locationId: item.Location1!\r\n };\r\n }\r\n }\r\n return deliveryDetails;\r\n};\r\n\r\n","// tslint:disable\r\nimport * as EntityClasses from '@msdyn365-commerce/retail-proxy/dist/Entities/CommerceModels.g';\r\nimport * as Entities from '@msdyn365-commerce/retail-proxy/dist/Entities/CommerceTypes.g';\r\n\r\n/**\r\n * MFIPromotion entity interface.\r\n */\r\nexport interface IMFIPromotion {\r\n ItemId: string;\r\n DistinctProductVariant?: string;\r\n EyeBrows?: Entities.Promotion[];\r\n ExtensionProperties?: Entities.CommerceProperty[];\r\n}\r\n\r\n/**\r\n * MFIAvailablePromotionDescription entity interface.\r\n */\r\nexport interface IMFIAvailablePromotionDescription {\r\n PriceGroup?: string;\r\n Items?: IMFIItem[];\r\n}\r\n\r\n/**\r\n * MFIItem entity interface.\r\n */\r\nexport interface IMFIItem {\r\n ItemId?: string;\r\n DistinctProductVariant?: string;\r\n}\r\n\r\n/**\r\n * MFIPromotion entity class.\r\n */\r\nexport class MFIPromotionExtensionClass implements IMFIPromotion {\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n public ItemId: string;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n public DistinctProductVariant: string;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n public EyeBrows: Entities.Promotion[];\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n public ExtensionProperties: Entities.CommerceProperty[];\r\n\r\n // Navigation properties names\r\n\r\n /**\r\n * Construct an object from odata response.\r\n * @param {any} odataObject The odata result object.\r\n */\r\n constructor(odataObject?: any) {\r\n odataObject = odataObject || {};\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.ItemId = odataObject.ItemId;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.DistinctProductVariant = odataObject.DistinctProductVariant;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.EyeBrows = undefined;\r\n if (odataObject.EyeBrows) {\r\n this.EyeBrows = [];\r\n for (let i = 0; i < odataObject.EyeBrows.length; i++) {\r\n if (odataObject.EyeBrows[i]) {\r\n if (odataObject.EyeBrows[i]['@odata.type']) {\r\n let className: string = odataObject.EyeBrows[i]['@odata.type'];\r\n className = className.substr(className.lastIndexOf('.') + 1).concat('Class');\r\n if (EntityClasses[className]) {\r\n this.EyeBrows[i] = new EntityClasses[className](odataObject.EyeBrows[i]);\r\n }\r\n } else {\r\n this.EyeBrows[i] = new EntityClasses.PromotionClass(odataObject.EyeBrows[i]);\r\n }\r\n } else {\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.EyeBrows[i] = undefined;\r\n }\r\n }\r\n }\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.ExtensionProperties = undefined;\r\n if (odataObject.ExtensionProperties) {\r\n this.ExtensionProperties = [];\r\n for (let i = 0; i < odataObject.ExtensionProperties.length; i++) {\r\n if (odataObject.ExtensionProperties[i]) {\r\n if (odataObject.ExtensionProperties[i]['@odata.type']) {\r\n let className: string = odataObject.ExtensionProperties[i]['@odata.type'];\r\n className = className.substr(className.lastIndexOf('.') + 1).concat('Class');\r\n if (EntityClasses[className]) {\r\n this.ExtensionProperties[i] = new EntityClasses[className](odataObject.ExtensionProperties[i]);\r\n }\r\n } else {\r\n this.ExtensionProperties[i] = new EntityClasses.CommercePropertyClass(odataObject.ExtensionProperties[i]);\r\n }\r\n } else {\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.ExtensionProperties[i] = undefined;\r\n }\r\n }\r\n }\r\n }\r\n}\r\n\r\n/**\r\n * MFIAvailablePromotionDescription entity class.\r\n */\r\nexport class MFIAvailablePromotionDescriptionExtensionClass implements IMFIAvailablePromotionDescription {\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n public PriceGroup: string;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n public Items: IMFIItem[];\r\n\r\n // Navigation properties names\r\n\r\n /**\r\n * Construct an object from odata response.\r\n * @param {any} odataObject The odata result object.\r\n */\r\n constructor(odataObject?: any) {\r\n odataObject = odataObject || {};\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.PriceGroup = odataObject.PriceGroup;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.Items = undefined;\r\n if (odataObject.Items) {\r\n this.Items = [];\r\n for (let i = 0; i < odataObject.Items.length; i++) {\r\n if (odataObject.Items[i]) {\r\n if (odataObject.Items[i]['@odata.type']) {\r\n let className: string = odataObject.Items[i]['@odata.type'];\r\n className = className.substr(className.lastIndexOf('.') + 1).concat('Class');\r\n if (EntityClasses[className]) {\r\n this.Items[i] = new EntityClasses[className](odataObject.Items[i]);\r\n }\r\n } else {\r\n this.Items[i] = new MFIItemExtensionClass(odataObject.Items[i]);\r\n }\r\n } else {\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.Items[i] = undefined;\r\n }\r\n }\r\n }\r\n }\r\n}\r\n\r\n/**\r\n * MFIItem entity class.\r\n */\r\nexport class MFIItemExtensionClass implements IMFIItem {\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n public ItemId: string;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n public DistinctProductVariant: string;\r\n\r\n // Navigation properties names\r\n\r\n /**\r\n * Construct an object from odata response.\r\n * @param {any} odataObject The odata result object.\r\n */\r\n constructor(odataObject?: any) {\r\n odataObject = odataObject || {};\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.ItemId = odataObject.ItemId;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.DistinctProductVariant = odataObject.DistinctProductVariant;\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 * THIS FILE IS AN AUTOGENERATED TYPESCRIPT PROXY EXTENSION.\r\n * TO USE THIS FILE, IT MUST BE ADDED TO A D365COMMERCE APPLICATION\r\n */\r\n// tslint:disable\r\nimport {\r\n AsyncResult,\r\n callActionOrExecute,\r\n DataServiceQuery,\r\n IContext,\r\n IDataServiceRequest,\r\n IQueryResultSettings\r\n} from '@msdyn365-commerce/retail-proxy';\r\n// @ts-ignore\r\nimport * as EntityClasses from '@msdyn365-commerce/retail-proxy/dist/Entities/CommerceModels.g';\r\nimport * as DataServiceEntities from './EyebrowMessageDataServiceEntities.g';\r\n\r\n// @ts-ignore\r\nfunction availablePromotionsDescriptionsQuery(itemId?: string): DataServiceQuery {\r\n const key = itemId ? { ItemId: itemId } : null;\r\n return new DataServiceQuery('AvailablePromotionsDescriptions', 'MFIPromotion', DataServiceEntities.MFIPromotionExtensionClass, key);\r\n}\r\n\r\nexport function createMFIGetAvailablePromotionsDescriptionInput(\r\n queryResultSettings: IQueryResultSettings,\r\n availablePromotionsDescription: DataServiceEntities.IMFIAvailablePromotionDescription\r\n): IDataServiceRequest {\r\n const query = availablePromotionsDescriptionsQuery().resultSettings(queryResultSettings);\r\n return query.createDataServiceRequestForOperation(\r\n 'MFIGetAvailablePromotionsDescription',\r\n true,\r\n DataServiceEntities.MFIPromotionExtensionClass,\r\n 'true',\r\n { bypassCache: 'get', returnEntity: 'DataServiceEntities.IMFIPromotion' },\r\n { availablePromotionsDescription: availablePromotionsDescription }\r\n );\r\n}\r\n\r\nexport function mFIGetAvailablePromotionsDescriptionAsync(\r\n context: IContext,\r\n availablePromotionsDescription: DataServiceEntities.IMFIAvailablePromotionDescription\r\n): AsyncResult {\r\n const request = createMFIGetAvailablePromotionsDescriptionInput(context.queryResultSettings || {}, availablePromotionsDescription);\r\n return callActionOrExecute(request, context.callerContext);\r\n}\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\nimport * as Msdyn365 from '@msdyn365-commerce/core';\r\n// tslint:disable-next-line: no-duplicate-imports\r\nimport { IActionContext } from '@msdyn365-commerce/core';\r\nimport { CacheType } from '@msdyn365-commerce/retail-proxy';\r\nimport { mFIGetAvailablePromotionsDescriptionAsync } from './EyebrowMessageDataActionExtension.g';\r\nimport { IMFIAvailablePromotionDescription, IMFIPromotion } from './EyebrowMessageDataServiceEntities.g';\r\n/**\r\n * GetEyebrowMessage Input Action\r\n */\r\n\r\nexport class GetEyebrowMessageInput implements Msdyn365.IActionInput {\r\n // Construct the input needed to run the action\r\n public item: IMFIAvailablePromotionDescription;\r\n public isCached?: boolean;\r\n public pageType?: string;\r\n private readonly createCacheKey: string | '';\r\n constructor(item: IMFIAvailablePromotionDescription, pageType?: string, isCached?: boolean) {\r\n this.item = item;\r\n this.isCached = isCached;\r\n this.pageType = pageType;\r\n // incase of pdp cache key will be based on variantId and on PLP will be basded on ItemId\r\n this.createCacheKey =\r\n this.item.Items?.map(obj => (this.pageType === 'pdp' ? obj?.DistinctProductVariant : obj?.ItemId))\r\n .join('-')\r\n .toString() || '';\r\n }\r\n\r\n // Determine if the results of this get action should cache the results and if so provide\r\n // a cache object type and an appropriate cache key\r\n public getCacheKey = () => `Get-Eyebrow-Message-${this.createCacheKey}`;\r\n // public getCacheKey = () => 'EyebrowMessage';\r\n public getCacheObjectType = () => 'EyebrowMessage';\r\n public dataCacheType = (): CacheType => (this.isCached ? 'application' : 'application');\r\n}\r\n\r\n// Create a data model here or import one to capture the response of the action\r\n\r\n/**\r\n * Use this function to create the input required to make the action call\r\n */\r\n\r\n/**\r\n * Use this function to call your action and process the results as needed\r\n */\r\nasync function getEyebrowAction(input: GetEyebrowMessageInput, ctx: IActionContext): Promise {\r\n try {\r\n const result = await mFIGetAvailablePromotionsDescriptionAsync(\r\n { callerContext: ctx, queryResultSettings: { Paging: { Top: 50 } } },\r\n input.item\r\n );\r\n if (result) {\r\n return result;\r\n }\r\n } catch (error) {\r\n console.log('Error', error);\r\n }\r\n return null;\r\n}\r\n\r\nexport default Msdyn365.createObservableDataAction({\r\n action: >getEyebrowAction,\r\n // Give your data action a unique id\r\n id: 'GetEyebrowMessage'\r\n // Uncomment the below line if this is a meant to be a batched data action\r\n // isBatched: true\r\n});\r\n","import {\r\n CacheType,\r\n createObservableDataAction,\r\n IAction,\r\n IActionContext,\r\n IActionInput,\r\n IAny,\r\n ICommerceApiSettings,\r\n ICreateActionContext,\r\n IGeneric,\r\n IRequestContext\r\n} from '@msdyn365-commerce/core';\r\n// import { ICategoryPath, ICategoryUrl } from '@msdyn365-commerce/core-internal/dist/types/interfaces/ICategoryPathInterfaces';\r\nimport { getCategoryPathsAsync } from '@msdyn365-commerce/retail-proxy/dist/DataActions/ProductsDataActions.g';\r\nimport { CategoryPathLookup, CategoryPathResult } from '@msdyn365-commerce/retail-proxy/dist/Entities/CommerceTypes.g';\r\nimport { hasArray } from '../Utilities/emtpyChecker';\r\n\r\n/**\r\n * Category path input\r\n */\r\nexport class GetCategoryPathsInput implements IActionInput {\r\n public readonly ChannelId: number;\r\n public CatalogId?: number;\r\n public productIds?: number[];\r\n // public readonly categoryPathLooksups: CategoryPathLookup[];\r\n public readonly apiSettings: ICommerceApiSettings;\r\n // @ts-ignore\r\n private constructedCacheKey: string | undefined;\r\n\r\n constructor(context: IRequestContext, catalogId?: number, productIds?: number[]) {\r\n this.ChannelId = context.apiSettings.channelId;\r\n this.CatalogId = catalogId; // context.apiSettings.catalogId || 0;\r\n this.productIds = productIds;\r\n // this.categoryPathLooksups = categoryPathLooksups;\r\n this.apiSettings = context.apiSettings;\r\n this.constructedCacheKey = '';\r\n // categoryPathLooksups.forEach(categoryPath=> {\r\n // this.constructedCacheKey+=`${categoryPath.ProductId && categoryPath.ProductId.toString()}|`;\r\n // });\r\n this.constructedCacheKey = this.productIds?.map(ids => ids).join('-').toString();\r\n this.constructedCacheKey += `${this.ChannelId?.toString()}|`;\r\n this.constructedCacheKey += `${this.CatalogId?.toString()}|`;\r\n }\r\n\r\n public getCacheKey = () => `MFRMProductCategoryPath-${this.constructedCacheKey}`;\r\n public getCacheObjectType = () => 'MFRMProductCategoryPath';\r\n public dataCacheType = (): CacheType => 'application';\r\n}\r\n\r\n/**\r\n * Creates the input required to make the getCategoryPath retail api call\r\n */\r\nexport const createGetCategoryPathsInput = (\r\n inputData: GetCategoryPathsInput,\r\n context: ICreateActionContext>\r\n): IActionInput => {\r\n const productId = inputData.productIds;\r\n if (productId) {\r\n return new GetCategoryPathsInput(context.requestContext, inputData.CatalogId, inputData.productIds);\r\n } else {\r\n throw new Error('Unable to create SelectedVariantInput, no productId found on module config or query');\r\n }\r\n};\r\n\r\n/**\r\n * Calls the Retail API and returns the category path for a product\r\n */\r\nexport async function getProductsCategoryPathsAction(input: GetCategoryPathsInput, ctx: IActionContext): Promise {\r\n const catPaths: CategoryPathLookup[] = [];\r\n if (!hasArray(input.productIds)) {\r\n return [];\r\n }\r\n for (let productsIter = 0; productsIter < input.productIds!.length; productsIter++) {\r\n catPaths.push({ ProductId: input.productIds![productsIter] });\r\n }\r\n try {\r\n return await getCategoryPathsAsync({ callerContext: ctx, queryResultSettings: { Paging: { Top: input.productIds!.length }, Sorting: {} } }, input.ChannelId, input.CatalogId!, catPaths);\r\n } catch (err) {\r\n console.log(err);\r\n return [];\r\n }\r\n}\r\n\r\nexport const getCategoryPathsActionDataAction = createObservableDataAction({\r\n id: 'GetMFRMProductsCategoryPaths',\r\n action: >getProductsCategoryPathsAction,\r\n input: createGetCategoryPathsInput\r\n});\r\n\r\nexport default getCategoryPathsActionDataAction;\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\n\r\nimport { IAny, ICommerceApiSettings, ICoreContext, ICreateActionContext, IGeneric, IRequestContext } from '@msdyn365-commerce/core';\r\nimport {\r\n AsyncResult, CartLine, CommerceListLine, ProductDimension,\r\n ProductDimensionType, ProductSearchResult, SimpleProduct\r\n} from '@msdyn365-commerce/retail-proxy';\r\n\r\nimport { ProductDetailsCriteria, InventoryLevels, ArrayExtensions } from '@msdyn365-commerce-modules/retail-actions';\r\nimport { variantQueryStringName } from '../../Utilities/constants';\r\n// import { parseSearchData } from '@msdyn365-commerce-modules/retail-actions/src/utilities/input-data-parser';\r\n\r\nexport const wrapInResolvedAsyncResult = (input: T | null | undefined): AsyncResult => {\r\n return >{\r\n status: 'SUCCESS',\r\n result: input,\r\n metadata: {}\r\n };\r\n};\r\n\r\nexport const wrapInRejectedAsyncResult = (input: T | null | undefined): AsyncResult => {\r\n return >{\r\n status: 'FAILED',\r\n result: input,\r\n metadata: {}\r\n };\r\n};\r\n\r\n\r\n/**\r\n * Utility function to extract the active productId in the following priority:\r\n * First query param (productId), then UrlToken (itemId), then module config.\r\n * @param inputData - The Action Input data.\r\n * @returns Productid or undefined.\r\n */\r\nexport const getSelectedProductIdFromActionInput = (inputData: ICreateActionContext>): string | undefined => {\r\n const context = inputData.requestContext;\r\n const variantId = context.app.config.queryBasedVariantSelection ? getQueryParamsFromQueryByName(context.url.requestUrl, variantQueryStringName) : undefined;\r\n\r\n if (variantId) {\r\n return variantId;\r\n } else if (context.query?.productId) {\r\n return context.query.productId;\r\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- Exsiting code.\r\n } else if (context.urlTokens && inputData.requestContext.urlTokens.itemId && inputData.requestContext.urlTokens.pageType === 'Product') {\r\n return context.urlTokens.itemId;\r\n } else if (inputData && inputData.config && inputData.config.productId) {\r\n return inputData.config.productId;\r\n }\r\n return undefined;\r\n};\r\n\r\nexport const getQueryParamsFromQueryByName = (inputUrl: URL, queryParamName: string) => {\r\n const urlWithIgnoredCase = new URL(inputUrl.toString().toLocaleLowerCase());\r\n const urlParameters = urlWithIgnoredCase.searchParams;\r\n const value = urlParameters.get(queryParamName.trim().toLocaleLowerCase());\r\n if (!value || Number.isNaN(Number(value))) {\r\n return undefined;\r\n }\r\n return value;\r\n};\r\n/**\r\n * Generates a Image URL based on data return from retail server.\r\n * @param imageUrl The image url returned by Retail Server.\r\n * @param ctx The request context.\r\n * @param apiSettings\r\n */\r\nexport const generateImageUrl = (imageUrl: string | undefined, apiSettings: ICommerceApiSettings): string | undefined => {\r\n if (imageUrl) {\r\n // Images hosted in CMS include schema\r\n if (imageUrl.startsWith('http')) {\r\n return imageUrl;\r\n }\r\n\r\n // Images hosted in Retail Server must be encoded and joined with the base image url\r\n return apiSettings.baseImageUrl + encodeURIComponent(imageUrl);\r\n }\r\n\r\n // D365Commerce.telemetry.warning(`Unable to generate a proper Image URL for Product: ${product.RecordId}`);\r\n return undefined;\r\n\r\n};\r\n\r\n/**\r\n * Represents app configuration for dimensions.\r\n */\r\nexport interface IDimensionsConfig {\r\n dimensionsAsSwatchType?: DimensionTypes[];\r\n dimensionsInProductCard?: DimensionTypes[];\r\n inventoryLevel?: InventoryLevels;\r\n dimensionToPreSelectInProductCard?: DimensionTypes;\r\n}\r\n\r\n/**\r\n * Represents app configuration for dimensions.\r\n */\r\nexport interface IDimensionsApp {\r\n config: IDimensionsConfig;\r\n}\r\n\r\n/**\r\n * Represents product dimension types.\r\n */\r\nexport enum DimensionTypes {\r\n none = 'none',\r\n color = 'color',\r\n configuration = 'configuration',\r\n size = 'size',\r\n style = 'style'\r\n}\r\n\r\n/**\r\n * Defines display configuration types.\r\n */\r\nexport enum DimensionSwatchDisplayTypes {\r\n default = 'default',\r\n productCard = 'productCard'\r\n}\r\n\r\n/**\r\n * Checks if rendering the particular dimensions is allowed.\r\n * @param dimensionType - Dimension to be displayed.\r\n * @param context - Core application context.\r\n * @param displayType - The swatch location, the component from which it comes from.\r\n * @returns Updates the state with new product page url.\r\n */\r\nexport const checkIfShouldDisplayAsSwatch = (\r\n dimensionType: DimensionTypes,\r\n context: ICoreContext,\r\n displayType: DimensionSwatchDisplayTypes = DimensionSwatchDisplayTypes.default): boolean => {\r\n\r\n // Additional checks for the product card since it has a separate config setting.\r\n if (displayType === DimensionSwatchDisplayTypes.productCard) {\r\n const dimensionsToDisplayOnProductCard = context.app.config.dimensionsInProductCard;\r\n if (!ArrayExtensions.hasElements(dimensionsToDisplayOnProductCard) ||\r\n dimensionsToDisplayOnProductCard.includes(DimensionTypes.none) ||\r\n !dimensionsToDisplayOnProductCard.includes(dimensionType)) {\r\n return false;\r\n }\r\n }\r\n\r\n const dimensionsToDisplayAsSwatch = context.app.config.dimensionsAsSwatchType;\r\n return ArrayExtensions.hasElements(dimensionsToDisplayAsSwatch) &&\r\n !dimensionsToDisplayAsSwatch.includes(DimensionTypes.none) &&\r\n dimensionsToDisplayAsSwatch.includes(dimensionType);\r\n};\r\n\r\n/**\r\n * Generates an image URL for a swatch.\r\n * @param imageUrl - The image url returned by Retail Server.\r\n * @param apiSettings - The request context.\r\n * @returns Full image url.\r\n */\r\nexport const generateSwatchImageUrl = (imageUrl: string, apiSettings: ICommerceApiSettings): string => {\r\n if (imageUrl.startsWith('http')) {\r\n return imageUrl;\r\n }\r\n\r\n return apiSettings.baseImageUrl + encodeURIComponent(imageUrl);\r\n};\r\n\r\n/**\r\n * Generates a Image URL for a product based on data return from retail server.\r\n * @param product The Product returned by Retail Server.\r\n * @param ctx The request context.\r\n * @param apiSettings\r\n */\r\nexport const generateProductImageUrl = (\r\n product: SimpleProduct | ProductSearchResult,\r\n apiSettings: ICommerceApiSettings\r\n): string | undefined => {\r\n return generateImageUrl(product.PrimaryImageUrl, apiSettings);\r\n};\r\n\r\n/**\r\n * Creates a CartLine object from the passed data.\r\n * @param product The product.\r\n * @param quantity The quantity.\r\n * @param catalogId The catalog.\r\n */\r\nexport const buildCartLine = (product: SimpleProduct, quantity?: number, catalogId?: number): CartLine => {\r\n return {\r\n CatalogId: catalogId || 0,\r\n Description: product.Description,\r\n\r\n // TODO: Investigate this value and what it represents\r\n EntryMethodTypeValue: 3,\r\n ItemId: product.ItemId,\r\n ProductId: product.RecordId,\r\n Quantity: quantity || 1,\r\n TrackingId: '',\r\n UnitOfMeasureSymbol: product.DefaultUnitOfMeasure\r\n };\r\n};\r\n\r\n/**\r\n * Creates a CommerceListLine (also know as WishlistLine) object from the passed data.\r\n * @param productId The RecordId of the Product to be added.\r\n * @param customerId The account number of the customer.\r\n * @param wishlistId The Id of the commerce list.\r\n */\r\nexport const buildWishlistLine = (productId: number, customerId: string, wishlistId: number): CommerceListLine => {\r\n return {\r\n CommerceListId: wishlistId,\r\n ProductId: productId,\r\n CustomerId: customerId\r\n };\r\n};\r\n\r\n/**\r\n * Utility function to prepare the product details criteria before getting full product:\r\n * @param inputData The Action Input data\r\n */\r\nexport const getProductDetailsCriteriaFromActionInput = (inputData: ICreateActionContext>): ProductDetailsCriteria => {\r\n if (inputData && inputData.config) {\r\n return {\r\n getPrice: !inputData.config.hidePrice,\r\n getRating: !inputData.config.hideRating\r\n };\r\n }\r\n return {\r\n getPrice: true,\r\n getRating: true\r\n };\r\n};\r\n\r\n/**\r\n * Transforms search text into the expected 'search terms' format, expected by refiner APIs.\r\n * @param searchText Free-form text used for searching for products or categories of products.\r\n */\r\nexport const ensureSearchTextIsFormedProperly = (searchText: string): string => {\r\n const prefix = searchText.startsWith('\\'') ? '' : '\\'';\r\n const suffix = searchText.endsWith('\\'') ? '' : '\\'';\r\n return `${prefix}${searchText}${suffix}`;\r\n};\r\n\r\nexport const ensureSafeSearchText = (searchText: string): string => {\r\n return searchText?.replace(/[^\\d\\sA-Za-z]+/g, '');\r\n};\r\n\r\nexport const buildCacheKey = (base: string, apiSettings: ICommerceApiSettings, locale?: string): string => {\r\n return `${base}-chanId:${apiSettings.channelId}-catId:${apiSettings.catalogId}${locale ? `-${locale}` : ''}`;\r\n};\r\n\r\nexport const buildCacheKeyWithUrlTokens = (base: string, requestContext: IRequestContext): string => {\r\n const urlTokens = requestContext.urlTokens;\r\n const defaultCacheKey = buildCacheKey(base, requestContext.apiSettings, requestContext.locale);\r\n return urlTokens ? `${defaultCacheKey}-${urlTokens.itemId}-${urlTokens.recordId}-${urlTokens.pageType}` : defaultCacheKey;\r\n};\r\n\r\n/**\r\n * Generates a key from set of arguments as inputs.\r\n *\r\n * @param args Argument list of pivots to generate key from.\r\n * @param handler Handler function for null/undefined values.\r\n */\r\n\r\ntype TKeyTypes = string | number | boolean | null | undefined;\r\ninterface IGenerateKeyOptions {\r\n separator?: string;\r\n handler?(input: null | undefined): string;\r\n}\r\nexport const generateKey = (args: TKeyTypes[], options?: IGenerateKeyOptions): string => {\r\n const { handler, separator }: IGenerateKeyOptions = { ...{ separator: '-', handler: undefined }, ...(options || {}) };\r\n return args\r\n .map(arg => {\r\n if (arg === null || arg === undefined) {\r\n if (handler) {\r\n return handler(arg);\r\n }\r\n }\r\n return arg;\r\n })\r\n .join(separator);\r\n};\r\n\r\n/**\r\n * Gets the fall back image url for a variant image.\r\n * @param itemId Item id of a product.\r\n * @param apiSettings Api setting from request context.\r\n */\r\nexport const getFallbackImageUrl = (itemId: string | undefined, apiSettings: ICommerceApiSettings): string | undefined => {\r\n if (!itemId) {\r\n return '';\r\n }\r\n\r\n const parsedItemId = itemId.trim().split(' ')[0];\r\n\r\n const productUrl = `Products/${parsedItemId}_000_001.png`;\r\n return generateImageUrl(productUrl, apiSettings);\r\n};\r\n\r\n/**\r\n * Converts retail proxy product dimension type to display dimension type.\r\n * @param productDimensionType - Product dimension type from retail proxy.\r\n * @returns Local dimension type.\r\n */\r\nexport const convertProductDimensionTypeToDimensionTypes = (productDimensionType: ProductDimensionType): DimensionTypes => {\r\n switch (productDimensionType) {\r\n case ProductDimensionType.Color:\r\n return DimensionTypes.color;\r\n case ProductDimensionType.Configuration:\r\n return DimensionTypes.configuration;\r\n case ProductDimensionType.Size:\r\n return DimensionTypes.size;\r\n case ProductDimensionType.Style:\r\n return DimensionTypes.style;\r\n default:\r\n return DimensionTypes.none;\r\n }\r\n};\r\n\r\n/**\r\n * Converts display dimension type to retail proxy product dimension type.\r\n * @param dimensionType - Local dimension type.\r\n * @returns Product dimension type from retail proxy.\r\n */\r\nexport const convertDimensionTypeToProductDimensionType = (dimensionType: DimensionTypes): ProductDimensionType => {\r\n switch (dimensionType) {\r\n case DimensionTypes.color:\r\n return ProductDimensionType.Color;\r\n case DimensionTypes.configuration:\r\n return ProductDimensionType.Configuration;\r\n case DimensionTypes.size:\r\n return ProductDimensionType.Size;\r\n case DimensionTypes.style:\r\n return ProductDimensionType.Style;\r\n default:\r\n return ProductDimensionType.None;\r\n }\r\n};\r\n\r\n/**\r\n * Sets dimensions to url.\r\n * @param inputUrl - Url to update.\r\n * @param productDimensions - Dimensions to set.\r\n */\r\nexport const setDimensionValuesToQuery = (inputUrl: URL, productDimensions: ProductDimension[]): void => {\r\n for (const dimension of productDimensions) {\r\n inputUrl.searchParams.set(\r\n convertProductDimensionTypeToDimensionTypes(dimension.DimensionTypeValue), dimension.DimensionValue?.Value ?? '');\r\n }\r\n\r\n window.history?.replaceState(window.history.state, '', inputUrl.toString()?.replace(inputUrl.host, window.location.host));\r\n};\r\n\r\n/**\r\n * Retrieves dimension value stored in url.\r\n * @param urlParameters - Url parameters.\r\n * @param productDimensionType - The dimension type to retrieve.\r\n * @returns Product dimension item.\r\n */\r\nconst parseDimensionFromUrl = (urlParameters: URLSearchParams, productDimensionType: ProductDimensionType): ProductDimension | undefined => {\r\n const localDimensionType = convertProductDimensionTypeToDimensionTypes(productDimensionType);\r\n const value = urlParameters.get(localDimensionType);\r\n if (!value) {\r\n return undefined;\r\n }\r\n return {\r\n DimensionTypeValue: productDimensionType,\r\n DimensionValue: {\r\n RecordId: 0,\r\n Value: value\r\n }\r\n };\r\n};\r\n\r\n/**\r\n * Retrieves all dimensions from URL.\r\n * @param urlParameters - Url parameters.\r\n * @returns Product dimensions stored in url.\r\n */\r\nconst parseDimensionsFromUrl = (urlParameters: URLSearchParams): ProductDimension[] => {\r\n const dimensionsToParse: ProductDimensionType[] = [\r\n ProductDimensionType.Color,\r\n ProductDimensionType.Configuration,\r\n ProductDimensionType.Size,\r\n ProductDimensionType.Style\r\n ];\r\n const parsedDimensions = dimensionsToParse.map(dimension => parseDimensionFromUrl(urlParameters, dimension));\r\n return ArrayExtensions.validValues(parsedDimensions);\r\n};\r\n\r\n/**\r\n * Utility function to extract the dimension values from input url querystring.\r\n * @param inputUrl - The request url.\r\n * @returns The selected dimension values.\r\n */\r\nexport const getDimensionValuesFromQuery = (inputUrl: URL): ProductDimension[] => {\r\n const urlWithIgnoredCase = new URL(inputUrl.toString().toLocaleLowerCase());\r\n const urlParameters = urlWithIgnoredCase.searchParams;\r\n const dimensions: ProductDimension[] = parseDimensionsFromUrl(urlParameters);\r\n return dimensions;\r\n};\r\n","import get from 'lodash/get';\r\nimport * as React from 'react';\r\nimport { useInView } from 'react-intersection-observer';\r\nimport { ObjectExtensions } from '@msdyn365-commerce-modules/retail-actions';\r\nimport { IProductCollectionViewProps, IProductComponentViewProps } from '@msdyn365-commerce-modules/product-collection';\r\nimport { INodeProps, Module, Node, getTelemetryObject, NodeTag } from '@msdyn365-commerce-modules/utilities';\r\nimport MsDyn365 from '@msdyn365-commerce/core';\r\nimport { AttributeValue, CommerceProperty, ProductSearchResult } from '@msdyn365-commerce/retail-proxy';\r\nimport { IPriceComponentResources } from '@msdyn365-commerce/components';\r\nimport { GetCategoryPathsInput, getProductsCategoryPathsAction } from '../../../actions/get-mfrm-products-category-paths.action';\r\nimport { getBrandNameCheck } from '../../../Utilities/get-product-brand';\r\nimport { IProductCollectionProps } from '../definition-extensions/product-collection.ext.props.autogenerated';\r\nimport { hasArray } from '../../../Utilities/emtpyChecker';\r\nimport { getPagePath } from '../../../Utilities/get-page-path';\r\nimport ProductComponent from './components/product.component';\r\nimport classnames from 'classnames';\r\n\r\ninterface IFetchedCategoryIds {\r\n productId?: number | undefined;\r\n categoryId?: number | undefined;\r\n categoryName?: string | undefined;\r\n brand: string | undefined;\r\n variantID: string | undefined;\r\n}\r\nexport type GridSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';\r\n// tslint:disable:cyclomatic-complexity\r\nconst getProductsCategories = async (\r\n props: IProductCollectionViewProps & IProductCollectionProps<{}>,\r\n products: IProductComponentViewProps[] | undefined\r\n): Promise => {\r\n if (products && products.length > 0) {\r\n const productIds: number[] = [];\r\n const catalogId = props.context.actionContext.requestContext.apiSettings.catalogId;\r\n for (let productPricesIter = 0; productPricesIter < products.length; productPricesIter++) {\r\n const prodId = get(products[productPricesIter].productComponent, 'props.data.product.RecordId');\r\n productIds.push(prodId);\r\n }\r\n if (!hasArray(productIds)) {\r\n return [];\r\n }\r\n const productsCategories = await getProductsCategoryPathsAction(\r\n new GetCategoryPathsInput(props.context.request, catalogId, productIds),\r\n props.context.actionContext\r\n );\r\n const categoryIds: IFetchedCategoryIds[] = [];\r\n for (let productCategoriesIter = 0; productCategoriesIter < productsCategories.length; productCategoriesIter++) {\r\n if (\r\n productsCategories[productCategoriesIter] &&\r\n productsCategories[productCategoriesIter].CategoryPath &&\r\n productsCategories[productCategoriesIter].CategoryPath!.length > 0\r\n ) {\r\n const catPath = productsCategories[productCategoriesIter].CategoryPath;\r\n const catPathSegments = catPath![0].Segments;\r\n if (catPathSegments && catPathSegments.length > 0) {\r\n const catId = catPathSegments.length > 0 ? catPathSegments[catPathSegments.length - 1].CategoryId : -1;\r\n const catName = catPathSegments.length > 0 ? catPathSegments[catPathSegments.length - 1].CategoryName : '';\r\n const collectionProductAttributes: AttributeValue[] = get(\r\n products[productCategoriesIter].productComponent,\r\n 'props.data.product.AttributeValues'\r\n );\r\n let variantId: string | undefined;\r\n const configVendorNamePlp = props.context.app.config.brandBackofficeAttributePlp;\r\n const configVendorNamePdp = props.context.app.config.brandBackofficeAttributePdp;\r\n let brandName: string | undefined = getBrandNameCheck(collectionProductAttributes, configVendorNamePlp);\r\n if (!brandName) {\r\n brandName = getBrandNameCheck(collectionProductAttributes, configVendorNamePdp);\r\n }\r\n if (!brandName) {\r\n brandName = undefined;\r\n }\r\n const eProps: CommerceProperty[] = get(\r\n products[productCategoriesIter].productComponent,\r\n 'props.data.product.ExtensionProperties'\r\n );\r\n if (eProps && eProps.length > 0) {\r\n for (let ePropsIter = 0; ePropsIter < eProps.length; ePropsIter++) {\r\n if (eProps[ePropsIter].Key === 'RetailVariantId') {\r\n variantId = eProps[ePropsIter].Value?.StringValue === 'null' ? undefined : eProps[ePropsIter].Value?.StringValue;\r\n break;\r\n }\r\n }\r\n }\r\n\r\n categoryIds.push({\r\n productId: productsCategories[productCategoriesIter].ProductId,\r\n categoryId: catId,\r\n categoryName: catName,\r\n brand: brandName,\r\n variantID: variantId\r\n });\r\n }\r\n }\r\n }\r\n return categoryIds;\r\n }\r\n return [];\r\n};\r\n\r\nconst callTelium = (\r\n props: IProductCollectionViewProps & IProductCollectionProps<{}>,\r\n categoryID: IFetchedCategoryIds[],\r\n productIDList: number[]\r\n): void => {\r\n const { products } = props;\r\n const categoryListArray = categoryID.filter(item1 => productIDList.some(item2 => item1.productId === item2));\r\n const categoryList: string[] = [];\r\n const brandNameArr: (string | undefined)[] = [];\r\n const productVariantArr: (string | undefined)[] = [];\r\n categoryListArray.forEach((item: IFetchedCategoryIds) => {\r\n categoryList.push(item.categoryName!);\r\n brandNameArr.push(item.brand);\r\n productVariantArr.push(item.variantID);\r\n });\r\n const listName = props.config.productRecommendationImpressionListName\r\n ? `${props.config.productRecommendationImpressionListName}`\r\n : undefined;\r\n const pagePath = getPagePath();\r\n const productNameArr: string[] = [];\r\n const productIdArr: string[] = [];\r\n const productPositionArr: number[] = [];\r\n const productPriceArr: number[] = [];\r\n const productListArray =\r\n products &&\r\n products.filter((item1, index) => {\r\n return productIDList.some(item2 => {\r\n const productID = get(item1.productComponent, 'props.data.product.RecordId');\r\n if (productID === item2) {\r\n productPositionArr.push(index + 1);\r\n }\r\n return productID === item2; // return the ones with equal id\r\n });\r\n });\r\n productListArray &&\r\n productListArray.forEach((item: IProductComponentViewProps, index: number) => {\r\n const { productComponent } = item;\r\n productNameArr.push(get(productComponent, 'props.data.product.Name'));\r\n productIdArr.push(get(productComponent, 'props.data.product.ItemId'));\r\n productPriceArr.push(get(productComponent, 'props.data.product.Price'));\r\n });\r\n // @ts-ignore\r\n if ('utag' in window) {\r\n // @ts-ignore\r\n // tslint:disable-next-line: object-literal-key-quotes\r\n utag.link({\r\n event: 'product-impression',\r\n event_category: 'ecommerce',\r\n event_action: 'product impression',\r\n enhanced_action: 'product_impression',\r\n event_label: `${pagePath}`,\r\n event_noninteraction: 'true',\r\n product_impression_list_name: [`${listName}`],\r\n product_impression_position: productPositionArr,\r\n product_impression_id: productIdArr,\r\n product_impression_name: productNameArr,\r\n product_impression_category: categoryList,\r\n product_impression_brand: brandNameArr,\r\n product_impression_variant: productVariantArr,\r\n product_impression_price: productPriceArr\r\n });\r\n }\r\n};\r\n\r\nconst callTeliumOnClick = (\r\n props: IProductCollectionViewProps & IProductCollectionProps<{}>,\r\n categoryID: IFetchedCategoryIds[],\r\n product: IProductComponentViewProps\r\n): void => {\r\n const { productComponent } = product;\r\n const { heading } = props;\r\n const productHeading = get(heading, 'props.text');\r\n const productName = get(productComponent, 'props.data.product.Name');\r\n const productPositionArr: number[] = [];\r\n const productRecordID = get(productComponent, 'props.data.product.RecordId');\r\n const categoryListArr: string[] = [];\r\n const brandNameArr: (string | undefined)[] = [];\r\n const productVariantArr: (string | undefined)[] = [];\r\n const pagePath = getPagePath();\r\n const productId = get(productComponent, 'props.data.product.ItemId');\r\n categoryID?.forEach((item, index) => {\r\n if (productRecordID === item.productId) {\r\n productPositionArr.push(index + 1);\r\n categoryListArr.push(item.categoryName!);\r\n brandNameArr.push(item.brand);\r\n productVariantArr.push(item.variantID);\r\n }\r\n });\r\n // @ts-ignore\r\n if ('utag' in window) {\r\n // @ts-ignore\r\n // tslint:disable-next-line: object-literal-key-quotes\r\n utag.link({\r\n event: 'product-click',\r\n enhanced_action: 'product_click',\r\n event_category: 'ecommerce',\r\n event_action: 'product click',\r\n event_label: `${productId}: ${productName}`,\r\n event_noninteraction: 'false',\r\n product_list_name: [`${productHeading}-${pagePath}`],\r\n product_position: productPositionArr,\r\n product_id: [`${productId}`],\r\n product_name: [`${productName}`],\r\n product_category: categoryListArr,\r\n product_brand: brandNameArr,\r\n product_variant: productVariantArr\r\n });\r\n }\r\n const singlePosition = productPositionArr[0];\r\n // @ts-ignore\r\n if ('utag' in window) {\r\n // @ts-ignore\r\n // tslint:disable-next-line: object-literal-key-quotes\r\n utag.link({\r\n event: 'product-recommendations',\r\n event_category: productHeading,\r\n event_action: singlePosition,\r\n event_label: productName,\r\n event_noninteraction: 'false'\r\n });\r\n }\r\n};\r\n\r\nconst getSkipProductValue = (props: IProductCollectionViewProps, teliumCall: number): number => {\r\n let skipProducts: number = 0;\r\n const viewPortCode = getViewport(props);\r\n if (viewPortCode === 'xs' || viewPortCode === 'sm' || viewPortCode === 'md') {\r\n skipProducts = 1;\r\n } else if (viewPortCode === 'lg') {\r\n if (MsDyn365.isBrowser && window.innerWidth) {\r\n if (window.innerWidth >= 1070 && window.innerWidth < 1112) {\r\n skipProducts = 2;\r\n } else {\r\n skipProducts = 3;\r\n }\r\n }\r\n } else if (viewPortCode === 'xl') {\r\n if (teliumCall === 2) {\r\n skipProducts = 1;\r\n } else {\r\n skipProducts = 3;\r\n }\r\n }\r\n return skipProducts;\r\n};\r\n\r\nconst getViewport = (props: IProductCollectionViewProps): GridSize => {\r\n const { context } = props;\r\n // always render in mobile viewport on a mobile device\r\n if (context.request && context.request.device && context.request.device.Type === 'Mobile') {\r\n return 'xs';\r\n }\r\n if (MsDyn365.isBrowser && window.innerWidth) {\r\n const gridSettings = context.request.gridSettings;\r\n if (gridSettings) {\r\n if (gridSettings.xs && window.innerWidth <= gridSettings.xs.w) {\r\n return 'xs';\r\n } else if (gridSettings.sm && window.innerWidth <= gridSettings.sm.w) {\r\n return 'sm';\r\n } else if (gridSettings.md && window.innerWidth <= gridSettings.md.w) {\r\n return 'md';\r\n } else if (gridSettings.lg && window.innerWidth <= gridSettings.lg.w) {\r\n return 'lg';\r\n } else {\r\n return 'xl';\r\n }\r\n }\r\n }\r\n\r\n return 'lg';\r\n};\r\n\r\nconst ProductCollectionView: React.FC> = props => {\r\n const { heading, ProductCollectionContainer, products, SingleSlideCarouselComponentProps, GridComponentProps } = props;\r\n const layoutType = props.config.layout;\r\n\r\n const [productIDList, setproductIDList] = React.useState([]);\r\n const [categoryID, setCategoryID] = React.useState([]);\r\n const [teliumCall, setteliumCall] = React.useState(0);\r\n React.useEffect(() => {\r\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\r\n getProductsCategories(props, products).then(result => {\r\n // tslint:disable-next-line: no-floating-promises\r\n setCategoryID(result);\r\n });\r\n }, []);\r\n\r\n const handleProductId = (productID: number): void => {\r\n setproductIDList(prevArray => [...prevArray, productID]);\r\n };\r\n const _renderCarousel = (carouselContainer: INodeProps, items: (IProductComponentViewProps | undefined)[]): JSX.Element => {\r\n return {items && items.map(item => _renderProduct(item))};\r\n };\r\n const _renderGrid = (gridContainer: INodeProps, items: (IProductComponentViewProps | undefined)[]): JSX.Element => {\r\n return {items && items.map(item => _renderProduct(item))};\r\n };\r\n\r\n const _renderProduct = (product: IProductComponentViewProps | undefined): JSX.Element | null => {\r\n if (!product) {\r\n return null;\r\n }\r\n const { ProductContainer, productComponent } = product;\r\n const [ref, inView] = useInView({\r\n triggerOnce: true\r\n });\r\n\r\n React.useEffect(() => {\r\n if (MsDyn365.isBrowser && productComponent && inView) {\r\n const productID = get(productComponent, 'props.data.product.RecordId');\r\n handleProductId(productID);\r\n }\r\n }, [inView]);\r\n\r\n return (\r\n // tslint:disable-next-line: jsx-no-lambda react-this-binding-issue\r\n callTeliumOnClick(props, categoryID, product)} {...ProductContainer}>\r\n
{productComponent}
\r\n
\r\n );\r\n };\r\n const skipProductsVal = getSkipProductValue(props, teliumCall);\r\n if (productIDList.length > skipProductsVal) {\r\n if (categoryID.length > 0) {\r\n callTelium(props, categoryID, productIDList);\r\n setproductIDList([]);\r\n setteliumCall(teliumCall + 1);\r\n }\r\n }\r\n // Use customized configuration for product component in case of Cart page\r\n const updatedProducts = props.config.displayShopNow ? _getProductsList(props) : products;\r\n\r\n let layout;\r\n if (layoutType === 'carousel') {\r\n layout = _renderCarousel(SingleSlideCarouselComponentProps, updatedProducts);\r\n } else if (layoutType === 'simple product') {\r\n layout = _renderSimpleCarousel(SingleSlideCarouselComponentProps, updatedProducts, props);\r\n } else if (layoutType === 'grid') {\r\n layout = _renderGrid(GridComponentProps, updatedProducts);\r\n } else {\r\n layout = _renderGrid(GridComponentProps, updatedProducts);\r\n }\r\n if (updatedProducts) {\r\n return (\r\n \r\n {heading}\r\n {layout}\r\n \r\n );\r\n }\r\n props.context.telemetry.warning('Product collection content is empty, module wont render.');\r\n return null;\r\n};\r\n/* VSI Customization - START */\r\nconst _getProductsList = (props: IProductCollectionViewProps & IProductCollectionProps<{}>): (IProductComponentViewProps | undefined)[] => {\r\n const { config: { productCollection } } = props;\r\n const products = productCollection.products;\r\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- product check for safety.\r\n const updatedProducts = products?.map(\r\n (item: ProductSearchResult, index: number) => {\r\n const getProductData = _getProduct(item, index, props);\r\n return !ObjectExtensions.isNullOrUndefined(getProductData) ? getProductData : undefined;\r\n }\r\n );\r\n const productsList = updatedProducts?.filter(item => item !== undefined);\r\n return productsList;\r\n};\r\n\r\nconst _getProduct = (product: ProductSearchResult, index: number, props: IProductCollectionViewProps & IProductCollectionProps<{}>): IProductComponentViewProps | null => {\r\n if (!product || !product.Name) {\r\n props.telemetry.trace('[product-collection] Product or product name is null');\r\n return null;\r\n }\r\n const { context, resources, id, typeName, friendlyName, telemetry,\r\n config: { imageSettings, allowBackNavigation, displayShopNow },\r\n slots: { quickview: quickviewSlot } } = props;\r\n\r\n const breaCrumbType = context.app.config.breadcrumbType;\r\n const priceResources: IPriceComponentResources = {\r\n priceRangeSeparator: resources.priceRangeSeparator\r\n };\r\n const telemetryContent = getTelemetryObject(context.request.telemetryPageName!,\r\n friendlyName,\r\n telemetry);\r\n const reviewTotalRatings = Number(product.TotalRatings);\r\n const reviewCount = 1;\r\n const reviewCountAriaLabelValue = reviewTotalRatings > reviewCount ? resources.ratingCountAriaLabel : resources.ratingCountAriaLabelSingleUser;\r\n const allowBack = allowBackNavigation && (breaCrumbType === 'back' || breaCrumbType === 'categoryAndBack');\r\n const isPriceMinMaxEnabled = props.data.featureState.result?.find(\r\n featureState => featureState.Name === 'Dynamics.AX.Application.RetailSearchPriceRangeFeature');\r\n\r\n return {\r\n ProductContainer: {\r\n tag: 'li' as NodeTag,\r\n className: classnames('ms-product-collection__item', displayShopNow ? 'msc-product__with-cta' : ''),\r\n role: 'listitem',\r\n key: index\r\n },\r\n productComponent: (\r\n \r\n )\r\n };\r\n};\r\n/* VSI Customization - END */\r\nconst _renderSimpleCarousel = (carouselContainer: INodeProps, items: (IProductComponentViewProps | undefined)[], props: IProductCollectionViewProps & IProductCollectionProps<{}>): JSX.Element => {\r\n return (\r\n \r\n {items && items.map(item => _renderSimpleProduct(item, props))}\r\n \r\n );\r\n};\r\n\r\nconst _renderSimpleProduct = (product: IProductComponentViewProps | undefined, props: IProductCollectionViewProps & IProductCollectionProps<{}>): JSX.Element | null => {\r\n if (!product) {\r\n return null;\r\n }\r\n const { ProductContainer, productComponent } = product;\r\n return {productComponent};\r\n};\r\n\r\nexport default ProductCollectionView;\r\n","const binding = { modules: {}, dataActions: {} };\n\n const registerActionId = (actionPath) => {\n if (binding.dataActions[actionPath] &&\n binding.dataActions[actionPath].default &&\n binding.dataActions[actionPath].default.prototype &&\n binding.dataActions[actionPath].default.prototype.id) {\n binding.dataActions[binding.dataActions[actionPath].default.prototype.id] = binding.dataActions[actionPath];\n } else {\n Object.keys(binding.dataActions[actionPath] || {}).forEach(exportName => {\n if (binding.dataActions[actionPath][exportName] &&\n binding.dataActions[actionPath][exportName].prototype &&\n binding.dataActions[actionPath][exportName].prototype.Action) {\n binding.dataActions[binding.dataActions[actionPath][exportName].prototype.id] = binding.dataActions[actionPath][exportName];\n }\n })\n }\n };\n\n const registerSanitizedActionPath = (sanitizedActionPath, dataAction) => {\n if (process.env.NODE_ENV === 'development') {\n if (!dataAction.default) {\n throw new Error('Data action path does not have a default export');\n }\n if (!(dataAction.default.prototype.id && binding.dataActions[dataAction.default.prototype.id]) || !binding.dataActions[sanitizedActionPath]) {\n binding.dataActions[sanitizedActionPath] = dataAction;\n }\n } else {\n binding.dataActions[sanitizedActionPath] = dataAction;\n if (!binding.dataActions[sanitizedActionPath].default) {\n throw new Error('Data action path ' + sanitizedActionPath + ' does not have a default export');\n }\n binding.dataActions[sanitizedActionPath].default.prototype.RegistrationId = sanitizedActionPath;\n if (binding.dataActions[sanitizedActionPath].default.prototype.id) {\n binding.dataActions[binding.dataActions[sanitizedActionPath].default.prototype.id] = sanitizedActionPath;\n }\n }\n };\n \n\n (binding.modules['product-collection'] = {\n c: () => require('@msdyn365-commerce-modules/product-collection/dist/lib/modules/product-collection/product-collection'),\n $type: 'containerModule',\n da: [{name:'featureState', path:'@msdyn365-commerce-modules/retail-actions/dist/lib/get-feature-state', runOn: 0}],\n \n iNM: true,\n ns: '@msdyn365-commerce-modules',\n n: 'product-collection',\n p: 'product-collection',\n \n pdp: '',\n \n \n md: 'node_modules/@msdyn365-commerce-modules/product-collection/dist/lib/modules/product-collection'\n });\n \n\n {\n const sanitizedActionPath = '@msdyn365-commerce-modules/retail-actions/dist/lib/get-feature-state';\n let dataAction = require('@msdyn365-commerce-modules/retail-actions/dist/lib/get-feature-state');\n registerSanitizedActionPath(sanitizedActionPath, dataAction);\n }\n \n\n \n window.__bindings__ = window.__bindings__ || {};\n window.__bindings__.modules = {\n ...window.__bindings__.modules || {},\n ...binding.modules\n };\n \n window.__bindings__.dataActions = {\n ...window.__bindings__.dataActions || {},\n ...binding.dataActions\n };\n export const viewDictionary = {};\n viewDictionary['__local__|__local__|themes|mattressfirm|views|product-collection'] = {\n c: () => require('partner/themes/mattressfirm/views/product-collection.view.tsx'),\n cn: '__local__-__local__-product-collection'\n };\nviewDictionary['@msdyn365-commerce-modules|product-collection|modules|product-collection|product-collection'] = {\n c: () => require('@msdyn365-commerce-modules/product-collection/dist/lib/modules/product-collection/product-collection.view.js'),\n cn: '@msdyn365-commerce-modules-product-collection-product-collection'\n };\nwindow.__bindings__ = window.__bindings__ || {};\nwindow.__bindings__.viewDictionary = {\n ...window.__bindings__.viewDictionary || {},\n ...viewDictionary\n };","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { IProductsDimensionsAvailabilities } from '@msdyn365-commerce/commerce-entities';\nimport { IPriceComponentResources, ProductComponent } from '@msdyn365-commerce/components';\nimport * as Msdyn365 from '@msdyn365-commerce/core';\nimport { getCatalogId, getUrlSync, ICoreContext } from '@msdyn365-commerce/core';\nimport { ProductPrice, ProductSearchResult } from '@msdyn365-commerce/retail-proxy';\nimport {\n ArrayExtensions,\n DimensionAvailabilitiesForProductSearchResultInput,\n DimensionTypes,\n DimensionSwatchDisplayTypes,\n getDimensionAvailabilitiesForProductSearchResultAction,\n getPriceForProductSearchResult,\n IDimensionsApp,\n ObjectExtensions,\n PriceForProductSearchResultInput,\n validateCatalogId\n} from '@msdyn365-commerce-modules/retail-actions';\nimport {\n Button,\n getTelemetryObject,\n IComponentNodeProps,\n IModuleProps,\n INodeProps,\n ISingleSlideCarouselProps,\n ITelemetryContent,\n NodeTag,\n SingleSlideCarousel\n} from '@msdyn365-commerce-modules/utilities';\nimport classnames from 'classnames';\nimport * as React from 'react';\n\nimport { IProductCollectionData } from './product-collection.data';\nimport { IProductCollectionProps, layout } from './product-collection.props.autogenerated';\n\nexport interface IProductCollectionViewProps extends IProductCollectionProps {\n heading?: React.ReactNode;\n ProductCollectionContainer: IModuleProps;\n SingleSlideCarouselComponentProps: INodeProps;\n GridComponentProps: INodeProps;\n products: IProductComponentViewProps[];\n isCarousel: boolean;\n productPrices?: ProductPrice[];\n seeAllButton?: React.ReactNode;\n}\n\nexport interface IProductComponentViewProps {\n ProductContainer: INodeProps;\n productComponent: React.ReactNode;\n}\nexport interface IProductComponentState {\n products: ProductSearchResult[];\n productsDimensionAvailabilities?: IProductsDimensionsAvailabilities[][];\n}\n\n/**\n * ProductCollection component.\n */\nclass ProductCollection extends React.PureComponent, IProductComponentState> {\n private readonly telemetryContent: ITelemetryContent;\n\n private readonly productPrices: ProductPrice[];\n\n constructor(props: IProductCollectionProps) {\n super(props);\n this.productPrices = [];\n this.state = {\n products: this.props.config.productCollection.products || []\n };\n this.telemetryContent = getTelemetryObject(\n this.props.context.request.telemetryPageName!,\n this.props.friendlyName,\n this.props.telemetry\n );\n }\n\n public async componentDidMount(): Promise {\n if (this.props.config.enableAffiliationBasedPricing && this.props.context.actionContext.requestContext.user.isAuthenticated) {\n await this._getActivePrice();\n }\n }\n\n public render(): JSX.Element | null {\n const { heading, className, shouldDisplaySeeAllButton } = this.props.config;\n const { resources } = this.props;\n const recommendation = this.props.config.productCollection.recommendationListId;\n\n // Initialize state in case if the products were not found during initial module render\n // eslint-disable-next-line @typescript-eslint/no-floating-promises -- Initialize data if not there.\n this.initProductState(this.props.config.productCollection);\n\n const products = this.state.products;\n const isCarousel = this.props.config.layout === layout.carousel;\n const headingLabel = heading ? heading.text : '';\n const headingComponent = heading && (\n \n );\n\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- product check for safety.\n const updatedProducts = products?.map((item: ProductSearchResult, index: number) => {\n const getProductData = this._getProduct(item, index);\n return !ObjectExtensions.isNullOrUndefined(getProductData) ? getProductData : undefined;\n });\n\n const productCollectionViewProps = {\n ...this.props,\n heading: headingComponent,\n SingleSlideCarouselComponentProps: {\n tag: SingleSlideCarousel,\n className: '',\n flipperPrevLabel: `${headingLabel} ${resources.flipperPrevious}`,\n flipperNextLabel: `${headingLabel} ${resources.flipperNext}`,\n parentId: this.props.id,\n telemetryContent: this.telemetryContent\n } as IComponentNodeProps,\n ProductCollectionContainer: {\n moduleProps: this.props,\n className: classnames('ms-product-collection', className)\n },\n GridComponentProps: {\n tag: 'ul' as NodeTag,\n className: 'ms-product-collection__items'\n },\n isCarousel,\n\n products:\n ArrayExtensions.hasElements(updatedProducts) &&\n updatedProducts.filter(item => {\n return item !== undefined;\n }),\n productPrices: this.productPrices,\n seeAllButton:\n recommendation && shouldDisplaySeeAllButton && ArrayExtensions.hasElements(updatedProducts)\n ? this._getSeeAllButton(recommendation, headingLabel)\n : undefined\n };\n return this.props.renderView(productCollectionViewProps) as React.ReactElement;\n }\n\n public handleHeadingChange = (event: Msdyn365.ContentEditableEvent) => (this.props.config.heading!.text = event.target.value);\n\n /**\n * Get products dimension availabilities.\n * @param products - Products.\n * @returns Promise.\n */\n private readonly _getProductsDimensionsAvailabilities = async (products: ProductSearchResult[]): Promise => {\n const context = this.props.context as ICoreContext;\n const dimensionsToDisplayOnProductCard = context.app.config.dimensionsInProductCard;\n const dimensionsToDisplayAsSwatch = context.app.config.dimensionsAsSwatchType;\n const validProducts = ArrayExtensions.validValues(products);\n if (\n ArrayExtensions.hasElements(validProducts) &&\n ArrayExtensions.hasElements(dimensionsToDisplayOnProductCard) &&\n !dimensionsToDisplayOnProductCard.includes(DimensionTypes.none) &&\n ArrayExtensions.hasElements(dimensionsToDisplayAsSwatch) &&\n !dimensionsToDisplayAsSwatch.includes(DimensionTypes.none)\n ) {\n const productsDimensionAvailabilities = await getDimensionAvailabilitiesForProductSearchResultAction(\n new DimensionAvailabilitiesForProductSearchResultInput(\n validProducts,\n this.props.context as ICoreContext,\n DimensionSwatchDisplayTypes.productCard\n ),\n this.props.context.actionContext\n );\n\n if (ArrayExtensions.hasElements(productsDimensionAvailabilities)) {\n this.setState({ productsDimensionAvailabilities });\n }\n }\n };\n\n /**\n * Helper method to initialize products state.\n * @param productCollection - List of products.\n */\n private readonly initProductState = async (productCollection: Msdyn365.IProductList) => {\n let products = this.state.products;\n const productCollectionProducts = productCollection.products;\n if (!ArrayExtensions.hasElements(products) && ArrayExtensions.hasElements(productCollectionProducts)) {\n products = productCollectionProducts;\n this.setState({ products });\n } else if (\n ArrayExtensions.hasElements(products) &&\n ArrayExtensions.hasElements(productCollectionProducts) &&\n !ArrayExtensions.equals(products, productCollectionProducts)\n ) {\n products = productCollectionProducts;\n this.setState({ products });\n } else if (productCollectionProducts === undefined && ArrayExtensions.hasElements(this.state.products)) {\n products = [];\n this.setState({ products: products });\n }\n\n if (Msdyn365.msdyn365Commerce.isBrowser && !ArrayExtensions.hasElements(this.state.productsDimensionAvailabilities)) {\n await this._getProductsDimensionsAvailabilities(products);\n }\n };\n\n private readonly _getProduct = (product: ProductSearchResult, index: number): IProductComponentViewProps | null => {\n if (!product || !product.Name) {\n this.props.telemetry.trace('[product-collection] Product or product name is null');\n return null;\n }\n const telemetryContent = getTelemetryObject(\n this.props.context.request.telemetryPageName!,\n this.props.friendlyName,\n this.props.telemetry\n );\n const { imageSettings, allowBackNavigation } = this.props.config;\n const resources = this.props.resources;\n const breaCrumbType = this.props.context.app.config.breadcrumbType;\n const allowBack = allowBackNavigation && (breaCrumbType === 'back' || breaCrumbType === 'categoryAndBack');\n const quickviewSlot =\n this.props.slots && this.props.slots.quickview && this.props.slots.quickview.length > 0 ? this.props.slots.quickview[0] : null;\n const productComparisonButtonSlot = ArrayExtensions.hasElements(this.props.slots.productComparisonButton)\n ? this.props.slots.productComparisonButton[0]\n : null;\n\n const reviewCount = 1;\n const reviewTotalRatings = Number(product.TotalRatings);\n const reviewCountAriaLabelValue =\n reviewTotalRatings > reviewCount ? resources.ratingCountAriaLabel : resources.ratingCountAriaLabelSingleUser;\n const isPriceMinMaxEnabled = this.props.data.featureState.result?.find(\n featureState => featureState.Name === 'Dynamics.AX.Application.RetailSearchPriceRangeFeature'\n );\n const priceResources: IPriceComponentResources = {\n priceRangeSeparator: resources.priceRangeSeparator\n };\n return {\n ProductContainer: {\n tag: 'li' as NodeTag,\n className: 'ms-product-collection__item',\n role: 'listitem',\n key: index\n },\n productComponent: (\n \n ArrayExtensions.hasElements(dimensionAvailability) &&\n dimensionAvailability[0].masterProductId === (product.MasterProductId ?? product.RecordId)\n )}\n />\n )\n };\n };\n\n /**\n * Get the active price for products.\n */\n private readonly _getActivePrice = async (): Promise => {\n const productsList = this.state.products;\n const products = await getPriceForProductSearchResult(\n new PriceForProductSearchResultInput(productsList),\n this.props.context.actionContext\n );\n if (Msdyn365.msdyn365Commerce.isBrowser) {\n await this._getProductsDimensionsAvailabilities(products);\n }\n\n this.setState({ products });\n };\n\n /**\n * Get the see all button.\n * @param recommendation - Recommendation.\n * @param headingLabel - Heading label.\n * @returns IProductComponentSeeAllViewProps - Product component see all view props.\n */\n private readonly _getSeeAllButton = (recommendation: string, headingLabel: string): React.ReactNode => {\n if (!Msdyn365.msdyn365Commerce.isBrowser) {\n return null;\n }\n\n const catalogId = getCatalogId(this.props.context.request);\n validateCatalogId(catalogId);\n const searchPageLink = getUrlSync('search', this.props.context.actionContext);\n if (!searchPageLink) {\n return null;\n }\n\n const url = new URL(searchPageLink, window.location.href);\n url.searchParams.set('recommendation', recommendation);\n url.searchParams.set('title', headingLabel);\n url.searchParams.set('catalogid', `${catalogId}`);\n\n return (\n \n {this.props.resources.seeAllButtonText}\n \n );\n };\n}\n\nexport default ProductCollection;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { INodeProps, Module, Node } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport { IProductCollectionViewProps, IProductComponentViewProps } from './product-collection';\n\nconst ProductCollectionView: React.FC = props => {\n const {\n heading,\n ProductCollectionContainer,\n products,\n SingleSlideCarouselComponentProps,\n GridComponentProps,\n isCarousel,\n seeAllButton\n } = props;\n\n if (products) {\n return (\n \n {heading}\n {seeAllButton}\n {isCarousel ? _renderCarousel(SingleSlideCarouselComponentProps, products) : _renderGrid(GridComponentProps, products)}\n \n );\n }\n props.context.telemetry.error('Product collection content is empty, module wont render.');\n return null;\n};\n\nconst _renderCarousel = (carouselContainer: INodeProps, items: IProductComponentViewProps[]): JSX.Element => {\n return {items && items.map(_renderProduct)};\n};\n\nconst _renderGrid = (gridContainer: INodeProps, items: IProductComponentViewProps[]): JSX.Element => {\n return {items && items.map(_renderProduct)};\n};\n\nconst _renderProduct = (product: IProductComponentViewProps): JSX.Element => {\n const { ProductContainer, productComponent } = product;\n\n return {productComponent};\n};\n\nexport default ProductCollectionView;\n","module.exports = React;","module.exports = ReactDOM;"],"names":["callUtag","async","callUtagLink","objToCall","Object","keys","forEach","key","utag","global","hasOwnProperty","link","e","console","log","callUtagView","view","variantQueryStringName","hasArray","values","length","undefined","getPagePath","MsDyn365","isBrowser","window","location","href","split","host","includes","fallBackBrandAttribute","parseBrandName","attributes","backendAttribute","recordId","_hasArray","attribute","productBrandName","find","currAttribute","_currAttribute$Name","Name","toLowerCase","trim","TextValue","_bonusItemArray$find","getLocalStorage","localStorage","getItem","bonusItemArray","JSON","parse","checkBrandName","item","productId","brandName","parseBrandNameUnbxd","_bonusItemArray$find2","getBrandNameCheck","_attributes$find2","_getEyebrowMessage","products","context","priceGroupForAPICall","app","config","priceGroup","items","map","singleItem","ItemId","DistinctProductVariant","push","requestBody","PriceGroup","Items","getEyebrowMessageInput","GetEyebrowMessageInput","result","getEyebrowAction","actionContext","error","_makeDeliveryMessage","days","deliveryByMessage","date","Date","daysSpan","deliveryDate","now","deliveryByMessageRange","parseInt","numberOfDays","newDate","setDate","getDate","dayjs","format","flag","_setTime","time","temp","newDatewithTime","toUpperCase","_getSoonestDeliveryDate","coreProductATPData","deliveryDetails","locationId","index","Available","ATPQuantity","today","SlotDate","currHour","StartTime","Location1","_getDeliveryDate","_item$StartTime","startTimeHour","substring","MFIPromotionExtensionClass","constructor","odataObject","this","EyeBrows","i","className","substr","lastIndexOf","concat","EntityClasses","ExtensionProperties","createMFIGetAvailablePromotionsDescriptionInput","queryResultSettings","availablePromotionsDescription","itemId","DataServiceQuery","DataServiceEntities","availablePromotionsDescriptionsQuery","resultSettings","createDataServiceRequestForOperation","bypassCache","returnEntity","pageType","isCached","_this$item$Items","getCacheKey","createCacheKey","getCacheObjectType","dataCacheType","obj","join","toString","Msdyn365","action","input","ctx","request","callActionOrExecute","callerContext","mFIGetAvailablePromotionsDescriptionAsync","Paging","Top","id","GetCategoryPathsInput","catalogId","productIds","_this$productIds","_this$ChannelId","_this$CatalogId","constructedCacheKey","ChannelId","apiSettings","channelId","CatalogId","ids","createGetCategoryPathsInput","inputData","requestContext","Error","getProductsCategoryPathsAction","catPaths","productsIter","ProductId","getCategoryPathsAsync","Sorting","err","getCategoryPathsActionDataAction","createObservableDataAction","getSelectedProductIdFromActionInput","_context$query","variantId","queryBasedVariantSelection","getQueryParamsFromQueryByName","url","requestUrl","query","urlTokens","inputUrl","queryParamName","value","URL","toLocaleLowerCase","searchParams","get","Number","isNaN","generateImageUrl","imageUrl","startsWith","baseImageUrl","encodeURIComponent","DimensionTypes","DimensionSwatchDisplayTypes","getFallbackImageUrl","parsedItemId","getViewport","props","device","Type","innerWidth","gridSettings","xs","w","sm","md","lg","_getProductsList","productCollection","updatedProducts","getProductData","_getProduct","ObjectExtensions","isNullOrUndefined","filter","product","_props$data$featureSt","telemetry","trace","resources","typeName","friendlyName","imageSettings","allowBackNavigation","displayShopNow","slots","quickview","quickviewSlot","breaCrumbType","breadcrumbType","priceResources","priceRangeSeparator","telemetryContent","getTelemetryObject","telemetryPageName","reviewCountAriaLabelValue","TotalRatings","ratingCountAriaLabel","ratingCountAriaLabelSingleUser","allowBack","isPriceMinMaxEnabled","data","featureState","ProductContainer","tag","classnames","role","productComponent","React","ProductComponent","freePriceText","priceFree","originalPriceText","currentPriceText","ratingAriaLabel","quickViewButton","IsEnabled","shopNowBtnText","shopNowButtonText","_renderSimpleCarousel","carouselContainer","Node","assign","_renderSimpleProduct","heading","ProductCollectionContainer","SingleSlideCarouselComponentProps","GridComponentProps","layoutType","layout","productIDList","setproductIDList","categoryID","setCategoryID","teliumCall","setteliumCall","productPricesIter","prodId","productsCategories","categoryIds","productCategoriesIter","CategoryPath","catPathSegments","Segments","catId","CategoryId","catName","CategoryName","collectionProductAttributes","configVendorNamePlp","brandBackofficeAttributePlp","configVendorNamePdp","brandBackofficeAttributePdp","eProps","ePropsIter","Key","_eProps$ePropsIter$Va","_eProps$ePropsIter$Va2","Value","StringValue","categoryId","categoryName","brand","variantID","getProductsCategories","then","_renderGrid","gridContainer","_renderProduct","ref","inView","useInView","triggerOnce","productID","prevArray","handleProductId","onClick","callTeliumOnClick","productHeading","productName","productPositionArr","productRecordID","categoryListArr","brandNameArr","productVariantArr","pagePath","event","enhanced_action","event_category","event_action","event_label","event_noninteraction","product_list_name","product_position","product_id","product_name","product_category","product_brand","product_variant","singlePosition","skipProductsVal","getSkipProductValue","skipProducts","viewPortCode","callTelium","categoryListArray","item1","some","item2","categoryList","listName","productRecommendationImpressionListName","productNameArr","productIdArr","productPriceArr","productListArray","product_impression_list_name","product_impression_position","product_impression_id","product_impression_name","product_impression_category","product_impression_brand","product_impression_variant","product_impression_price","_renderCarousel","Module","warning","binding","modules","dataActions","c","require","$type","da","name","path","runOn","iNM","ns","n","p","pdp","registerSanitizedActionPath","sanitizedActionPath","dataAction","default","prototype","RegistrationId","__bindings__","_objectSpread","viewDictionary","cn","ProductCollection","super","handleHeadingChange","text","target","_getProductsDimensionsAvailabilities","dimensionsToDisplayOnProductCard","dimensionsInProductCard","dimensionsToDisplayAsSwatch","dimensionsAsSwatchType","validProducts","ArrayExtensions","validValues","hasElements","none","productsDimensionAvailabilities","getDimensionAvailabilitiesForProductSearchResultAction","DimensionAvailabilitiesForProductSearchResultInput","productCard","setState","initProductState","state","productCollectionProducts","equals","_this$props$data$feat","_this$state$productsD","productComparisonButtonSlot","productComparisonButton","dimensionAvailabilities","dimensionAvailability","_product$MasterProduc","masterProductId","MasterProductId","RecordId","_getActivePrice","productsList","getPriceForProductSearchResult","PriceForProductSearchResultInput","_getSeeAllButton","recommendation","headingLabel","getCatalogId","validateCatalogId","searchPageLink","getUrlSync","set","Button","title","seeAllButtonText","productPrices","enableAffiliationBasedPricing","user","isAuthenticated","render","shouldDisplaySeeAllButton","recommendationListId","isCarousel","headingComponent","editProps","onEdit","productCollectionViewProps","SingleSlideCarousel","flipperPrevLabel","flipperPrevious","flipperNextLabel","flipperNext","parentId","moduleProps","seeAllButton","renderView","module","exports","ReactDOM"],"sourceRoot":""}