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AChE,MAAM,eAAEvkB,EAAc,oBAAE4C,EAAmB,QAAEG,EAAO,MAAErW,EAAK,OAAEub,GAAWnL,EAExE,OACIjB,EAAAA,cAACwI,EAAAA,KAAI,iBAAKrE,GACNnE,EAAAA,cAACwI,EAAAA,KAAI,iBAAKzB,GACLG,EACAkF,GAEJvb,EACA63B,IAsDgB8Q,CAAgBv4B,EAAUynB,GACtC8S,EACArT,KAWJqV,EAA+Dj+B,IACxE,MAAM,UAAE+6B,EAAS,gBAAEC,EAAe,YAAE5jB,EAAW,eAAEujB,GAAmB36B,EACpE,OACIS,EAAAA,cAACi9B,EAAAA,OAAM,iBAAK3C,IACNJ,GAAkBK,EACnB5jB,GAAeqmB,EAAsBz9B,KAKlD","sources":["webpack://mattressfirm/./src/Utilities/cart-utils.ts?6ba1","webpack://mattressfirm/./src/Utilities/enum.ts?dc36","webpack://mattressfirm/./src/Utilities/get-utag-product-category.ts?a69d","webpack://mattressfirm/./src/Utilities/get-utag-variant-id.ts?ea12","webpack://mattressfirm/./src/Utilities/get-view-port.tsx?4210","webpack://mattressfirm/./src/Utilities/get-zipcode.ts?4f03","webpack://mattressfirm/./src/Utilities/plp-url-utils.ts?728b","webpack://mattressfirm/./src/actions/TryInStoreDataServiceEntities.g.ts?ea57","webpack://mattressfirm/./src/actions/TryInStoreDataActionExtension.g.ts?c8db","webpack://mattressfirm/./src/actions/get-try-in-store-info.action.ts?dff9","webpack://mattressfirm/./src/common/cookies/cookie-utils.ts?68f7","webpack://mattressfirm/./src/data-actions/buybox-get-all-variants-list.ts?6ad4","webpack://mattressfirm/./src/Utilities/get-eyebrow-message.tsx?2bcd","webpack://mattressfirm/./src/modules/mfrm-buybox/common/utilities/error-utilities.ts?bd84","webpack://mattressfirm/./src/modules/mfrm-buybox/common/buybox-components.tsx?bf31","webpack://mattressfirm/./src/modules/mfrm-buybox/components/mfrm-buybox-find-in-store.tsx?97b6","webpack://mattressfirm/./src/common/hooks/useIsDesktop.tsx?34b6","webpack://mattressfirm/./src/modules/mfrm-buybox/components/buybox-shop-similar-items.tsx?5f22","webpack://mattressfirm/./src/modules/mfrm-buybox/components/buybox-key-in-price.tsx?8f0c","webpack://mattressfirm/./src/modules/mfrm-buybox/components/buybox-customer-satisfaction-score/buybox-customer-satisfaction-score.tsx?80f4","webpack://mattressfirm/./src/Utilities/getProductSpecificationDataAttributeValue.ts?7e14","webpack://mattressfirm/./src/common/hooks/useClickOutside.tsx?c8a5","webpack://mattressfirm/./src/modules/mfrm-buybox/components/buybox-store-hours/buybox-store-hours.tsx?e128","webpack://mattressfirm/./src/modules/mfrm-buybox/components/buybox-store-details/buybox-store-details.tsx?972c","webpack://mattressfirm/./src/modules/mfrm-buybox/components/buybox-try-in-store-redesign/open.tsx?c9c5","webpack://mattressfirm/./src/modules/mfrm-buybox/components/buybox-try-in-store-redesign/buybox-try-in-store-redesign.tsx?5696","webpack://mattressfirm/./src/modules/mfrm-buybox/components/buybox-product-rating/buybox-product-rating.tsx?98b4","webpack://mattressfirm/./src/modules/mfrm-buybox/mfrm-buybox.tsx?cc50","webpack://mattressfirm/./src/modules/mfrm-store-selector/components/store-selector-location-line-item/date-time-helpers.ts?8535","webpack://mattressfirm/./src/modules/mfrm-store-selector/components/store-selector-location-line-item/mfrm-store-selector-location-line-item.components.tsx?9f8c","webpack://mattressfirm/./src/themes/mattressfirm/views/components/addtocart/addtocart.component.tsx?5783","webpack://mattressfirm/./src/modules/quickview/utilities/get-valid-product-images.ts?78b7","webpack://mattressfirm/./src/modules/quickview/quickview.tsx?4080","webpack://mattressfirm/./src/modules/quickview/utilities/get-product-details.ts?5cc2","webpack://mattressfirm/./src/modules/quickview/quickview.view.tsx?ee5b"],"sourcesContent":["import MsDyn365 from '@msdyn365-commerce/core';\r\nimport {IProductDetails,IProductBonusItems, IProductBonusWithBrandName } from '../modules/mfrm-cart/mfrm-cart';\r\nimport {IMFIBonusItemsResponse, IMFIGetBonusCouponsDetailsResponse} from '../actions/BonusItemDataServiceEntities.g';\r\nimport { SimpleProduct } from '@msdyn365-commerce/retail-proxy/dist/Entities/CommerceTypes.g';\r\nimport { setCookie } from '../common/cookies/cookie-utils';\r\nimport { MFRMProductTypes } from './enum';\r\n\r\nexport interface IMFRMDateGroupedProducts {\r\n dateStr: string;\r\n days?: string;\r\n productVariantRecordIds: number[];\r\n productItemIds: string[];\r\n productsType: string;\r\n}\r\n\r\nexport interface IExpressFlow {\r\n paymentEdit: boolean\r\n}\r\n\r\nexport interface ICartProductPrice {\r\n variantRecordId?: number;\r\n price?: number;\r\n}\r\n\r\n/** interface for parcel inventory details */\r\nexport interface IParcelInventoryDetails {\r\n itemId: string | undefined;\r\n location: string | undefined;\r\n productId: string | undefined;\r\n quantity: string | undefined;\r\n}\r\n\r\nconst getSetLocalStorage = (key: string, getSet: string, valueToSet?: any, returnType?: any) => {\r\n if (MsDyn365.isBrowser) {\r\n switch (getSet) {\r\n case 'set':\r\n return localStorage.setItem(key, JSON.stringify(valueToSet || returnType));\r\n case 'get':\r\n return JSON.parse(localStorage.getItem(key) || '[]');\r\n default:\r\n return returnType;\r\n }\r\n } else {\r\n return returnType;\r\n }\r\n};\r\n\r\nexport const getSetProductData = (getSet: string, products?: IProductDetails[]) => {\r\n products?.length && products.length > 0 && setCoreProductCookie(products); // Set cookie if it has core products\r\n return getSetLocalStorage('product_details', getSet, products, []);\r\n};\r\n\r\n// Following function sets cookie to check if cart has core item; Cookie is needed to access it on server side for skeleton on checkout\r\nconst setCoreProductCookie = (products: IProductDetails[]) => {\r\n for (const psp of products) {\r\n if (psp.typeOfProduct.toLowerCase().trim() === MFRMProductTypes.core) {\r\n setCookie('has-core-product', true);\r\n return;\r\n }\r\n }\r\n setCookie('has-core-product', false);\r\n};\r\n\r\nexport const getSetProductSpec = (getSet: string, products?: IProductDetails[]) => {\r\n return getSetLocalStorage('product_specification', getSet, products, []);\r\n};\r\n\r\nexport const getSetPromoCodeApplyList = (getSet: string) => {\r\n return getSetLocalStorage('promo_code_apply_list', getSet, [], []);\r\n};\r\n\r\nexport const getSetPromoCode = (getSet: string) => {\r\n return getSetLocalStorage('promoCode', getSet, [], []);\r\n};\r\n\r\nexport const getSetGrandTotal = (getSet: string, total?: string) => {\r\n return getSetLocalStorage('grand_total', getSet, total, 0);\r\n};\r\n\r\nexport const getSetBonusItemProd = (getSet: string, globalBonusItems?: IMFIBonusItemsResponse[])=>{\r\n return getSetLocalStorage('BonusItemProduct', getSet, globalBonusItems, []);\r\n};\r\n\r\nexport const getSetSelectedBonasItem = (getSet: string, bonusItemArray?: IProductBonusItems[]) => {\r\n return getSetLocalStorage('selectedBonasItems', getSet, bonusItemArray, []);\r\n};\r\n\r\nexport const getSetBonusCouponDetail = (getSet: string, getCoupons?: IMFIGetBonusCouponsDetailsResponse[])=>{\r\n return getSetLocalStorage('bonusCouponsDetail', getSet, getCoupons, []);\r\n};\r\n\r\nexport const getSetPrevBonasModalState = (getSet: string, previousBonasModal?: IProductBonusItems[]) => {\r\n return getSetLocalStorage('previousBonasModalState', getSet, previousBonasModal, []);\r\n};\r\n\r\nexport const getSetBonusItemBrandName = (getSet: string, bonusItemsBrandName?: IProductBonusWithBrandName[]) => {\r\n return getSetLocalStorage('bonusItmesWithBrand', getSet, bonusItemsBrandName, []);\r\n};\r\n\r\nexport const getSetDateGroupedProducts = (getSet: string, products?: IMFRMDateGroupedProducts[]) => {\r\n return getSetLocalStorage('date_grouped_products', getSet, products, []);\r\n};\r\n\r\nexport const getSetExpressFlow = (getSet: string, express?: IExpressFlow) => {\r\n return getSetLocalStorage('express_flow', getSet, express, []);\r\n};\r\nexport const getSetWmapCartLines = (getSet: string, products?: { product: SimpleProduct, count: number }[]) => {\r\n return getSetLocalStorage('wmapCartLines', getSet, products, []);\r\n};\r\n\r\nexport const getSetCartProductPrice = (getSet: string, priceDetails?: ICartProductPrice[]) => {\r\n return getSetLocalStorage('cart_product_price', getSet, priceDetails, []);\r\n};\r\nexport const getSetParcelInventoryData = (getSet: string, details?: IParcelInventoryDetails[]) => {\r\n return getSetLocalStorage('parcel_inventory_details', getSet, details, []);\r\n};","/* MFRMProductTypes enum is used to check/compare the product type with product_details cookie\r\nby converting it to lower case used mainly in \"conditional statements\" */\r\nexport enum MFRMProductTypes {\r\n core = 'core',\r\n smallParcel = 'parcel',\r\n dropShip = 'drop ship'\r\n}\r\n\r\n// DeliveryModes enum is used to pass the modOfDelivery value in \"API payloads\"\r\nexport enum DeliveryModes {\r\n core = 'Delivery',\r\n smallParcel = 'Parcel',\r\n dropShip = 'Drop Ship'\r\n}\r\n\r\n// coreItemShippingType constant value is used to compare the shipping type of core products\r\nexport const coreItemShippingType = 'delivery';","import { getCategoryPathsAsync } from '@msdyn365-commerce/retail-proxy/dist/DataActions/ProductsDataActions.g';\r\nimport { IActionContext } from '@msdyn365-commerce/core-internal';\r\nexport const getUtagProductCategory = async (actionContext: IActionContext, channelId: number, catalogId: number = 0, RecordId: number) => {\r\n //context, channelId, catalogId, categoryPathLookups\r\n const categoryPathResults = await getCategoryPathsAsync(\r\n { callerContext: actionContext, queryResultSettings: {} },\r\n channelId,\r\n catalogId,\r\n [{ ProductId: RecordId }]\r\n );\r\n const categoryPath = categoryPathResults[0]?.CategoryPath?.[0] && categoryPathResults[0].CategoryPath[0];\r\n if (!categoryPath?.Segments?.length) {\r\n return [];\r\n }\r\n return [categoryPath.Segments[categoryPath.Segments.length - 1].CategoryName!];\r\n};\r\n","import { SimpleProduct } from '@msdyn365-commerce/retail-proxy';\r\nimport getAllProductVariants, { BuyboxGetDimensionVariantAvailabilityInput } from '../data-actions/buybox-get-all-variants-list';\r\nimport { IActionContext } from '@msdyn365-commerce/core-internal';\r\n\r\nexport const getUtagVariantId = async (\r\n MasterProductId: number,\r\n channelId: number,\r\n actionContext: IActionContext,\r\n RecordId: number,\r\n ItemId: string\r\n) => {\r\n if (MasterProductId && MasterProductId > 0) {\r\n const input = new BuyboxGetDimensionVariantAvailabilityInput(MasterProductId, channelId);\r\n const variantsResp: SimpleProduct[] = await getAllProductVariants(input, actionContext);\r\n for (let variantIter = 0; variantIter < variantsResp.length; variantIter++) {\r\n if (variantsResp[variantIter].RecordId === RecordId) {\r\n const ePropsVariant = variantsResp[variantIter].ExtensionProperties!;\r\n if (ePropsVariant?.length > 0) {\r\n for (let eIter = 0; eIter < ePropsVariant?.length; eIter++) {\r\n if (ePropsVariant[eIter].Key === 'RetailVariantId') {\r\n return [ePropsVariant[eIter].Value?.StringValue];\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n const variantofId = `V000${ItemId}`;\r\n return [variantofId?.slice(0, -1)];\r\n};\r\n\r\nexport const getUtagRetailVariantIdAndRecId = async (\r\n MasterProductId: number,\r\n channelId: number,\r\n actionContext: IActionContext,\r\n RecordId: number,\r\n ItemId: string\r\n) => {\r\n if (MasterProductId && MasterProductId > 0) {\r\n const input = new BuyboxGetDimensionVariantAvailabilityInput(MasterProductId, channelId);\r\n const variantsResp: SimpleProduct[] = await getAllProductVariants(input, actionContext);\r\n for (let variantIter = 0; variantIter < variantsResp.length; variantIter++) {\r\n if (variantsResp[variantIter].RecordId === RecordId) {\r\n const ePropsVariant = variantsResp[variantIter].ExtensionProperties!;\r\n if (ePropsVariant?.length > 0) {\r\n for (let eIter = 0; eIter < ePropsVariant?.length; eIter++) {\r\n if (ePropsVariant[eIter].Key === 'RetailVariantId') {\r\n return { 'retailVariantId': ePropsVariant[eIter].Value?.StringValue, 'recordId': RecordId };\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n const variantofId = `V000${ItemId}`;\r\n return { 'retailVariantId': variantofId?.slice(0, -1), 'recordId': RecordId };\r\n};\r\n","import MsDyn365, { ICoreContext } from '@msdyn365-commerce/core';\r\nexport type GridSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';\r\n\r\nconst _getViewPort = (context: ICoreContext): GridSize => {\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 return 'xs';\r\n};\r\n\r\nexport default _getViewPort;\r\n","import { IActionContext } from '@msdyn365-commerce/core';\r\nimport Cookies from 'universal-cookie';\r\nexport const getZipCode = (ctx: IActionContext): string | undefined => {\r\n //@ts-ignore\r\n const geolocationZipCode = ctx.requestContext.geoLocation?.zipCode ? ctx.requestContext.geoLocation.zipCode : ctx.requestContext.geoLocation?.res?.zipCode;\r\n const cookie = new Cookies();\r\n const zipcode = cookie.get('zip_code') ? cookie.get('zip_code') : geolocationZipCode;\r\n return zipcode ?? undefined;\r\n};\r\nexport const getGeoLocationZipCode = (ctx: IActionContext): string | undefined => {\r\n //@ts-ignore\r\n const zipCode = ctx.requestContext.geoLocation?.zipCode ? ctx.requestContext.geoLocation.zipCode : ctx.requestContext.geoLocation?.res?.zipCode;\r\n return zipCode ?? null;\r\n};\r\n","import { IProductRefinerHierarchy } from '@msdyn365-commerce/commerce-entities';\r\nimport { IRequestContext } from '@msdyn365-commerce/core';\r\nimport { ProductRefinerValue } from '@msdyn365-commerce/retail-proxy';\r\nexport interface IVirtualRefinersConfig {\r\n order: number;\r\n refinerName: string;\r\n enableForMattresses: boolean;\r\n enableForOtherCategories: boolean;\r\n allowDuplicate: boolean;\r\n}\r\n\r\n/**\r\n * This will create the canonicalURL as per 7924 requirement\r\n * @param requestContext\r\n * @returns string of canonical URL\r\n */\r\nexport const canonicalURL = (requestContext: IRequestContext): string => {\r\n const requestUrl = requestContext.url.requestUrl;\r\n const origin = requestUrl.origin;\r\n const path = requestUrl.pathname.toLowerCase();\r\n\r\n // separate out url parts split on forward / and remove first empty index\r\n let urlParts = path?.split('/').splice(1);\r\n\r\n // remove double values containing pipe sign\r\n if (path.match(/%7c/)) {\r\n urlParts = removePipeSignValue(urlParts);\r\n }\r\n\r\n // remove unwanted keywords from url\r\n urlParts = removeKeywords(urlParts, requestContext);\r\n\r\n const filteredPath = urlParts?.join('/');\r\n\r\n return `${origin}/${filteredPath}`;\r\n};\r\n\r\nexport const filteredURL = (requestContext: IRequestContext): string => {\r\n const requestUrl = requestContext.url.requestUrl;\r\n const path = requestUrl.pathname.toLowerCase();\r\n\r\n // separate out url parts split on forward / and remove first empty index\r\n let urlParts = path?.split('/').splice(1);\r\n\r\n // remove unwanted keywords from url\r\n urlParts = removeKeywords(urlParts, requestContext);\r\n\r\n const filteredPath = urlParts?.join('/');\r\n\r\n return `/${filteredPath}`;\r\n};\r\n\r\n/**\r\n * This will create the canonicalURL as per 7924 requirement\r\n * @param requestContext\r\n * @returns string of canonical URL\r\n */\r\nexport const canonicalURLWithoutBaseUrl = (requestContext: IRequestContext): string => {\r\n const requestUrl = requestContext.url.requestUrl;\r\n const path = requestUrl.pathname.toLowerCase();\r\n\r\n // separate out url parts split on forward / and remove first empty index\r\n let urlParts = path?.split('\\/').splice(1);\r\n\r\n // remove double values containing pipe sign\r\n if (path.match(/%7c/)) {\r\n urlParts = removePipeSignValue(urlParts);\r\n }\r\n\r\n // remove unwanted keywords from url\r\n urlParts = removeKeywords(urlParts, requestContext);\r\n\r\n return urlParts?.join('\\/');\r\n};\r\n\r\n/**\r\n * This will remove the Pipe sign value set from urlParts\r\n * @param urlParts\r\n * @returns\r\n */\r\nexport const removePipeSignValue = (urlParts: string[]) => {\r\n // urlParts.forEach((part, index) => {\r\n // const indexOfValue = urlParts.indexOf('%7c');\r\n // if (indexOfValue !== -1) {\r\n // urlParts.splice(indexOfValue, 1);\r\n // }\r\n // });\r\n\r\n if (urlParts !== undefined && urlParts.length > 0) {\r\n urlParts = urlParts.filter(urlPart => urlPart.indexOf('%7c') === -1);\r\n }\r\n\r\n return urlParts;\r\n};\r\n\r\n/**\r\n * This will remove the keywords from urlParts array which were received from\r\n * the app.settings.json/CMS Extensions\r\n * @param urlParts\r\n * @param requestContext\r\n * @returns urlParts array filtered\r\n */\r\nexport const removeKeywords = (urlParts: string[], requestContext: IRequestContext): string[] => {\r\n const removeKeywordFromUrl = requestContext.app.config.removeKeywordFromUrl;\r\n\r\n if (urlParts.length > 0 && removeKeywordFromUrl && removeKeywordFromUrl.length > 0) {\r\n const removeKeywordFromUrlArray: string[] = removeKeywordFromUrl?.trim().split(',');\r\n removeKeywordFromUrlArray?.length > 0 &&\r\n urlParts.forEach(_part => {\r\n removeKeywordFromUrlArray.forEach(removeKeyword => {\r\n const trimmedKeyword = removeKeyword.trim().toLowerCase();\r\n const indexOfValue = urlParts.indexOf(trimmedKeyword);\r\n if (trimmedKeyword.length > 0 && indexOfValue !== -1) {\r\n urlParts.splice(indexOfValue, 1);\r\n }\r\n });\r\n });\r\n }\r\n\r\n return urlParts;\r\n};\r\n\r\n/**\r\n * This will sort the Virtual refiner config based on order and return\r\n * only active virtual refiner configs based on isMattress category will\r\n * be returned\r\n * @param requestContext\r\n * @param isMattressesCategory boolean | undefined\r\n * @returns IVirtualRefinersConfig[] | undefined\r\n */\r\nexport const getSortedVirtualRefinerConfig = (\r\n requestContext: IRequestContext,\r\n isMattressesCategory: boolean | undefined\r\n): IVirtualRefinersConfig[] | undefined => {\r\n let appConfigSorted = getVirtualRefinerConfig(requestContext);\r\n\r\n // sort the config by provided config\r\n if (appConfigSorted) {\r\n if (isMattressesCategory === true) {\r\n appConfigSorted = appConfigSorted.filter(appConfig => {\r\n return appConfig.enableForMattresses;\r\n });\r\n } else if (isMattressesCategory === false) {\r\n appConfigSorted = appConfigSorted.filter(appConfig => {\r\n return appConfig.enableForOtherCategories;\r\n });\r\n }\r\n appConfigSorted.sort((a: IVirtualRefinersConfig, b: IVirtualRefinersConfig) => {\r\n return a.order - b.order;\r\n });\r\n }\r\n\r\n return appConfigSorted;\r\n};\r\n\r\n/**\r\n * Virtual refiner names from the app.settings.json will be returned which can be used\r\n * to filter out refiners data based upon active virtual refiners\r\n * @param requestContext\r\n * @param isMattressesCategory boolean | undefined\r\n * @returns string[]\r\n */\r\nexport const getVirtualRefinerNames = (requestContext: IRequestContext, isMattressesCategory: boolean | undefined): string[] => {\r\n const sortedVirtualRefinerConfig = getSortedVirtualRefinerConfig(requestContext, isMattressesCategory);\r\n\r\n const appConfigRefinerNames: string[] = [];\r\n\r\n sortedVirtualRefinerConfig &&\r\n sortedVirtualRefinerConfig.forEach(sortedConfig => {\r\n appConfigRefinerNames.push(sortedConfig.refinerName.trim().toLowerCase());\r\n });\r\n\r\n return appConfigRefinerNames;\r\n};\r\n\r\n/**\r\n * This will return the value of virtual refiner configuration\r\n * @param requestContext\r\n * @returns IVirtualRefinersConfig[] | undefined\r\n */\r\nexport const getVirtualRefinerConfig = (requestContext: IRequestContext): IVirtualRefinersConfig[] => {\r\n return requestContext.app.config.urlModifications;\r\n};\r\n\r\nexport async function getVirtualRefinerValues(\r\n requestContext: IRequestContext,\r\n virtualRefiners: IProductRefinerHierarchy[]\r\n): Promise {\r\n const virtualRefinerValues: ProductRefinerValue[] = [];\r\n if (virtualRefiners.length === 0) {\r\n return virtualRefinerValues;\r\n }\r\n const requestUrl = requestContext.url.requestUrl;\r\n // const origin = requestUrl.origin;\r\n const path = requestUrl.pathname;\r\n\r\n // separate out url parts split on forward / and remove first empty index\r\n let urlParts = path?.split('/').splice(1);\r\n\r\n // remove unwanted keywords from url\r\n urlParts = removeKeywords(urlParts, requestContext);\r\n\r\n // remove category id {categoryid}.c\r\n const categoryIdToken = requestContext.urlTokens.recordId;\r\n const categoryId = categoryIdToken ? `${categoryIdToken}.c` : undefined;\r\n\r\n if (categoryId) {\r\n urlParts.splice(-1);\r\n }\r\n\r\n // run loop for each url part and get values from refiners for further usage\r\n const finalizedUrlParts: string[] = [];\r\n urlParts.forEach(plainUrlPart => {\r\n const urlPart = decodeURIComponent(plainUrlPart);\r\n if (urlPart.indexOf('|') !== -1) {\r\n const splitOnPipeSign = urlPart?.split('|');\r\n const filteredParts = splitOnPipeSign.filter(part => part.length > 0);\r\n filteredParts.forEach(filteredPart => {\r\n finalizedUrlParts.push(filteredPart.toLowerCase().trim());\r\n });\r\n }\r\n finalizedUrlParts.push(urlPart);\r\n });\r\n finalizedUrlParts.forEach((urlPart) => {\r\n virtualRefiners.forEach((mainRefiner) => {\r\n mainRefiner.Values.forEach((refinerValue) => {\r\n const refinerValueKeyName = refinerValue.LeftValueBoundString?.toLowerCase().trim().split(' ')?.join('-')?.replace(/\\&/g, 'and')?.replace(regExSpecialChars(requestContext.app.config.canonicalUrlspecialCharIncludeList), '-');\r\n if (refinerValueKeyName && refinerValueKeyName === urlPart) {\r\n virtualRefinerValues.push(refinerValue);\r\n }\r\n });\r\n });\r\n });\r\n\r\n return virtualRefinerValues;\r\n}\r\n\r\n/**\r\n * For navigation menu links, it will remove keywords configured in global configurations from the navigation link\r\n * and clp link and return url path string\r\n * @param link\r\n * @param requestContext\r\n * @returns string\r\n */\r\nexport const navLinkKeywordRemoval = (link: string, requestContext: IRequestContext): string => {\r\n // Using the rest operator in case there is a weirdly formatted URL with multiple question marks.\r\n const [linkBase, ...linkParams] = link?.split('?');\r\n\r\n // Only apply to category links and product links, which end in .c or .p. Check that a keyword is configured.\r\n if (!linkBase.endsWith('.c') && !linkBase.endsWith('.p') || !requestContext.app.config) {\r\n return link;\r\n }\r\n\r\n // Separate out url parts split on forward /\r\n let urlParts = linkBase?.split('\\/');\r\n\r\n // Remove unwanted keywords from url\r\n urlParts = removeKeywords(urlParts, requestContext);\r\n\r\n // Glue the URL params back together\r\n const linkParam = linkParams.map(param => `?${param}`)?.join('');\r\n\r\n // Rebuild URL by joining with forward slash and appending any URL parameters\r\n const filteredLink = `${urlParts?.join('/')}${linkParam}`;\r\n return `${filteredLink}`;\r\n};\r\nexport const regExSpecialChars = (includeConfigList: string): RegExp => {\r\n let includeConfig = '';\r\n if (includeConfigList !== undefined && includeConfigList !== '') {\r\n includeConfig = includeConfigList?.trim().split(',')?.join('\\\\\\\\');\r\n includeConfig = includeConfig && includeConfig !== '' ? `\\\\\\\\${includeConfig}` : '';\r\n const pattern = `[^\\\\w\\\\&\\\\|${includeConfig}]`;\r\n // eslint-disable-next-line security/detect-non-literal-regexp\r\n return new RegExp(pattern, 'gi');\r\n } else {\r\n\r\n const pattern = `[^\\\\w\\\\&\\\\|]`;\r\n // eslint-disable-next-line security/detect-non-literal-regexp\r\n return new RegExp(pattern, 'gi');\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 * MFITryInStore entity interface.\r\n */\r\nexport interface IMFITryInStore {\r\n ZipCode?: string;\r\n StoreId: string;\r\n Products?: string;\r\n Limit: number;\r\n Radius: number;\r\n ExtensionProperties?: Entities.CommerceProperty[];\r\n}\r\n\r\n/**\r\n * MFITryInStoreInfoResponse entity interface.\r\n */\r\nexport interface IMFITryInStoreInfoResponse {\r\n Status?: string;\r\n Message?: string;\r\n StoreId?: string;\r\n Inventory?: string[];\r\n}\r\n\r\n/**\r\n * MFITryInStore entity class.\r\n */\r\nexport class MFITryInStoreExtensionClass implements IMFITryInStore {\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n public ZipCode: 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 StoreId: 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 Products: 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 Limit: number;\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 Radius: number;\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.ZipCode = odataObject.ZipCode;\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.StoreId = odataObject.StoreId;\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.Products = odataObject.Products;\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.Limit = odataObject.Limit;\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.Radius = odataObject.Radius;\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 * MFITryInStoreInfoResponse entity class.\r\n */\r\nexport class MFITryInStoreInfoResponseExtensionClass implements IMFITryInStoreInfoResponse {\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n public Status: 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 Message: 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 StoreId: 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 Inventory: 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.Status = odataObject.Status;\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.Message = odataObject.Message;\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.StoreId = odataObject.StoreId;\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.Inventory = undefined;\r\n if (odataObject.Inventory) {\r\n this.Inventory = [];\r\n for (let i = 0; i < odataObject.Inventory.length; i++) {\r\n if (odataObject.Inventory[i]) {\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.Inventory[i] = odataObject.Inventory[i];\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.Inventory[i] = undefined;\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 * 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 { AsyncResult, callActionOrExecute, DataServiceQuery, IContext, IDataServiceRequest } 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 './TryInStoreDataServiceEntities.g';\r\n\r\n// @ts-ignore\r\nfunction tryInStoresQuery(storeId?: string): DataServiceQuery {\r\n const key = storeId ? { StoreId: storeId } : null;\r\n return new DataServiceQuery('TryInStores', 'MFITryInStore', DataServiceEntities.MFITryInStoreExtensionClass, key);\r\n}\r\n\r\nexport function createMFIGetTryInStoreInfoInput(tryInStoreProductIDs: DataServiceEntities.IMFITryInStore): IDataServiceRequest {\r\n const query = tryInStoresQuery();\r\n return query.createDataServiceRequestForOperation(\r\n 'MFIGetTryInStoreInfo',\r\n true,\r\n DataServiceEntities.MFITryInStoreInfoResponseExtensionClass,\r\n 'false',\r\n { bypassCache: 'get', returnEntity: 'DataServiceEntities.IMFITryInStoreInfoResponse' },\r\n { tryInStoreProductIDs: tryInStoreProductIDs }\r\n );\r\n}\r\n\r\nexport function mFIGetTryInStoreInfoAsync(\r\n context: IContext,\r\n tryInStoreProductIDs: DataServiceEntities.IMFITryInStore\r\n): AsyncResult {\r\n const request = createMFIGetTryInStoreInfoInput(tryInStoreProductIDs);\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\nimport { mFIGetTryInStoreInfoAsync } from './TryInStoreDataActionExtension.g';\r\nimport { IMFITryInStore, IMFITryInStoreInfoResponse } from './TryInStoreDataServiceEntities.g';\r\n\r\n/**\r\n * GetTryInStoreInfo Input Action\r\n */\r\n\r\nexport class GetTryInStoreInfoInput implements Msdyn365.IActionInput {\r\n // Construct the input needed to run the action\r\n public input: IMFITryInStore;\r\n constructor(input: IMFITryInStore) {\r\n this.input = input;\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 = () =>\r\n `Try-In-Store${this.input.StoreId}-${this.input.ZipCode}-${this.input.Radius}-${this.input.Limit}-${this.input.Products}`;\r\n public getCacheObjectType = () => 'GetTryInStoreInfo';\r\n public dataCacheType = (): Msdyn365.CacheType => 'request';\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 * Use this function to create the input required to make the action call\r\n */\r\n// const createInput = (args: Msdyn365.ICreateActionContext): Msdyn365.IActionInput => {\r\n// return new GetTryInStoreInfoInput();\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 getTryInStoreAction(\r\n request: GetTryInStoreInfoInput,\r\n ctx: Msdyn365.IActionContext\r\n): Promise {\r\n if (request.input) {\r\n try {\r\n const result = await mFIGetTryInStoreInfoAsync({ callerContext: ctx }, request.input);\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 {};\r\n}\r\n\r\nexport default Msdyn365.createObservableDataAction({\r\n action: >getTryInStoreAction,\r\n // Give your data action a unique id\r\n id: 'GetTryInStoreInfo'\r\n // input: createInput\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 Cookies from 'universal-cookie';\r\nconst cookies = new Cookies();\r\n\r\n// use this function to get cookie\r\nexport function getCookie(cookieName: string): string | undefined {\r\n return cookies.get(cookieName);\r\n}\r\n\r\n// use this function to set cookie\r\nexport function setCookie(cookieName: string, cookieValue: any, options?: any): void {\r\n cookies.set(cookieName, cookieValue, options);\r\n}\r\n\r\n// use this function to remove cookie\r\nexport function removeCookie(cookieName: string, options?: any): void {\r\n cookies.remove(cookieName, options);\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 {\r\n CacheType,\r\n createObservableDataAction,\r\n IAction,\r\n IActionContext,\r\n IActionInput,\r\n IAny,\r\n ICreateActionContext,\r\n IGeneric\r\n} from '@msdyn365-commerce/core';\r\nimport { getByIdAsync, getVariantsByDimensionValuesAsync } from '@msdyn365-commerce/retail-proxy/dist/DataActions/ProductsDataActions.g';\r\nimport { SimpleProduct } from '@msdyn365-commerce/retail-proxy/dist/Entities/CommerceTypes.g';\r\n\r\n// tslint:disable-next-line: completed-docs\r\nexport class BuyboxGetDimensionVariantAvailabilityInput implements IActionInput {\r\n public channelId: number;\r\n public productId: number;\r\n constructor(productId: number, channelId: number) {\r\n this.channelId = channelId;\r\n this.productId = productId;\r\n }\r\n public getCacheKey = () => `AllMFRMProductVariantIDs-${this.productId}`;\r\n public getCacheObjectType = () => 'AllMFRMProductVariantIDs';\r\n public dataCacheType = (): CacheType => 'application';\r\n}\r\n\r\nexport interface IBuyboxGetDimensionVariantAvailabilityActionData {\r\n variantID: number;\r\n dimensionRecordID: number;\r\n itemID: string;\r\n sizeValue: string;\r\n isAvailable: boolean;\r\n}\r\n\r\nconst createInput = (inputData: ICreateActionContext>): IActionInput => {\r\n if (inputData && inputData.requestContext && inputData.requestContext.query && inputData.requestContext.query.productId) {\r\n return new BuyboxGetDimensionVariantAvailabilityInput(\r\n +inputData.requestContext.query.productId,\r\n +inputData.requestContext.apiSettings.channelId\r\n );\r\n } else if (inputData && inputData.requestContext && inputData.requestContext.urlTokens && inputData.requestContext.urlTokens.itemId) {\r\n return new BuyboxGetDimensionVariantAvailabilityInput(\r\n +inputData.requestContext.urlTokens.itemId,\r\n +inputData.requestContext.apiSettings.channelId\r\n );\r\n } else if (inputData && inputData.config && inputData.config.productId) {\r\n return new BuyboxGetDimensionVariantAvailabilityInput(inputData.config.productId, inputData.requestContext.apiSettings.channelId);\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\nexport async function getAllVariantsForProduct(\r\n input: BuyboxGetDimensionVariantAvailabilityInput,\r\n ctx: IActionContext\r\n): Promise {\r\n const productResponse = await getByIdAsync(\r\n { callerContext: ctx, queryResultSettings: { Paging: { Top: 1 } } },\r\n input.productId,\r\n input.channelId\r\n );\r\n const baseProduct = Array.isArray(productResponse) ? productResponse[0] : productResponse;\r\n try {\r\n return await getVariantsByDimensionValuesAsync(\r\n { callerContext: ctx, queryResultSettings: { Paging: { Top: 500 } } },\r\n baseProduct.MasterProductId || input.productId,\r\n input.channelId,\r\n []\r\n );\r\n } catch (error) {\r\n ctx.telemetry.exception(error);\r\n throw new Error('[IBuyboxGetDimensionPricingActionData]Unable to retieve data');\r\n }\r\n}\r\n\r\nexport default createObservableDataAction({\r\n id: 'AllMFRMProductVariantIDs',\r\n action: >getAllVariantsForProduct,\r\n input: createInput\r\n});\r\n","import { IAny, ICoreContext, IGeneric } from '@msdyn365-commerce/core';\r\nimport { IMFIAvailablePromotionDescription, IMFIItem } from '../actions/EyebrowMessageDataServiceEntities.g';\r\nimport getEyebrowAction, { GetEyebrowMessageInput } from '../actions/get-eyebrow-message.action';\r\n\r\nconst _getEyebrowMessage = async (products: IMFIItem[], context: ICoreContext>, isCached?: boolean, pageType?: string) => {\r\n const priceGroupForAPICall = context.app && context.app.config.priceGroup;\r\n if (products?.length > 0 && priceGroupForAPICall) {\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, pageType, isCached);\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 default _getEyebrowMessage;\r\n","import { IBuyboxCommonResources } from '@msdyn365-commerce-modules/buybox';\r\nimport { IAddToCartFailureResult } from '@msdyn365-commerce/components';\r\nimport { IAny, ICoreContext, IGeneric } from '@msdyn365-commerce/core';\r\nimport { ICartState } from '@msdyn365-commerce/global-state';\r\nimport { OrgUnitLocation, ProductAvailableQuantity, ProductDimension, SimpleProduct } from '@msdyn365-commerce/retail-proxy';\r\n\r\nexport function getQuantityError(stockLeft: number | undefined, resources: IBuyboxCommonResources): string | undefined {\r\n if (!stockLeft || stockLeft <= 0) {\r\n return resources.errorMessageOutOfStock;\r\n } else if (stockLeft === 1) {\r\n return resources.errorMessageOutOfRangeOneLeft;\r\n } else {\r\n return resources.errorMessageOutOfRangeFormat?.replace('{numLeft}', stockLeft.toString());\r\n }\r\n}\r\n\r\n// tslint:disable-next-line:cyclomatic-complexity\r\nexport function getGenericError(\r\n result: IAddToCartFailureResult,\r\n cart: ICartState | undefined,\r\n resources: IBuyboxCommonResources,\r\n context: ICoreContext>,\r\n product: SimpleProduct | undefined,\r\n productAvailability: ProductAvailableQuantity | undefined,\r\n location: OrgUnitLocation | undefined)\r\n : string | undefined {\r\n if (result.failureReason === 'EMPTYINPUT') {\r\n return resources.addedToCartFailureMessage;\r\n } else if (result.failureReason === 'CARTACTIONFAILED') {\r\n if (result.cartActionResult && result.cartActionResult.substatus === 'MAXQUANTITY') {\r\n // get the quantity of the product in cart\r\n let elementFoundAt: number = -1;\r\n const productIdToFind = product?.RecordId;\r\n\r\n for (let i = 0; i < cart!.cart.CartLines!.length; i++) {\r\n if (cart!.cart.CartLines![i].ProductId === productIdToFind &&\r\n (cart!.cart.CartLines![i].DeliveryMode || '') === (location && context.actionContext.requestContext.channel?.PickupDeliveryModeCode || '') &&\r\n (cart!.cart.CartLines![i].FulfillmentStoreId || '') === (location?.OrgUnitNumber || '')) {\r\n elementFoundAt = i;\r\n\r\n break;\r\n }\r\n }\r\n\r\n let curQuantity: number = 0;\r\n\r\n if (elementFoundAt !== -1) {\r\n const cartLineToUpdate = { ...cart!.cart.CartLines![elementFoundAt] };\r\n curQuantity = cartLineToUpdate.Quantity || 0;\r\n }\r\n\r\n // get the quantity limit for the product\r\n const maxQuantityForCartLineItem = context.app.config.maxQuantityForCartLineItem;\r\n const availableQty = productAvailability?.AvailableQuantity;\r\n\r\n let quantityLimit: number;\r\n\r\n if (maxQuantityForCartLineItem === undefined && availableQty === undefined) {\r\n quantityLimit = 10;\r\n } else if (availableQty === undefined) {\r\n quantityLimit = maxQuantityForCartLineItem;\r\n } else if (maxQuantityForCartLineItem === undefined) {\r\n quantityLimit = availableQty;\r\n } else {\r\n quantityLimit = Math.min(maxQuantityForCartLineItem, availableQty);\r\n }\r\n\r\n return resources.maxQuantityLimitText?.replace('{curQuantity}', curQuantity.toString())?.replace('{maxQuantity}', quantityLimit.toString());\r\n } else if (result.cartActionResult && (result.cartActionResult.substatus === 'QUANTITYLIMITS' || result.cartActionResult.substatus === 'INVOICEINCART')) {\r\n return result.cartActionResult?.errorDetails?.LocalizedMessage;\r\n }\r\n\r\n return resources.addedToCartFailureMessage;\r\n }\r\n\r\n return undefined;\r\n}\r\n\r\nexport function getConfigureErrors(result: ProductDimension[] | undefined, resources: IBuyboxCommonResources, isGiftCard?: Boolean): { [configureId: string]: string | undefined } {\r\n if (!result) {\r\n return {};\r\n }\r\n\r\n const dimensions: { [configureId: string]: string | undefined } = {};\r\n\r\n result.forEach(dimension => {\r\n dimensions[dimension.DimensionTypeValue] = getDimensionErrorString(dimension.DimensionTypeValue, resources, isGiftCard);\r\n });\r\n\r\n return dimensions;\r\n}\r\n\r\nexport function getDimensionErrorString(dimensionTypeValue: number, resources: IBuyboxCommonResources, isGiftCard?: Boolean): string {\r\n switch (dimensionTypeValue) {\r\n case 1: // ProductDimensionType.Color\r\n return resources.productDimensionTypeColorErrorMessage;\r\n case 2: // ProductDimensionType.Configuration\r\n return resources.productDimensionTypeConfigurationErrorMessage;\r\n case 3: // ProductDimensionType.Size\r\n return resources.productDimensionTypeSizeErrorMessage;\r\n case 4: // ProductDimensionType.Style\r\n return isGiftCard ? resources.productDimensionTypeAmountErrorMessage : resources.productDimensionTypeStyleErrorMessage;\r\n default:\r\n return '';\r\n }\r\n}","import { ArrayExtensions } from '@msdyn365-commerce-modules/retail-actions';\r\nimport { Alert, Button, format, getPayloadObject, getTelemetryAttributes, getTelemetryObject, Heading, ITelemetryContent, Node, TelemetryConstant } from '@msdyn365-commerce-modules/utilities';\r\nimport {\r\n AddToCartComponent, IAddToCartFailureResult, IAddToCartResources,\r\n PriceComponent, RatingComponent\r\n} from '@msdyn365-commerce/components';\r\nimport MSDyn365, { getUrlSync, IImageSettings } from '@msdyn365-commerce/core';\r\nimport { ICartActionResult } from '@msdyn365-commerce/global-state';\r\nimport * as React from 'react';\r\nimport { getConfigureErrors, getGenericError, getQuantityError } from './utilities/error-utilities';\r\n\r\nimport {\r\n IBuyboxAddToCartViewProps, IBuyboxCommonData,\r\n IBuyboxErrorBlockProps, IBuyboxExtentedProps, IBuyboxKeyInPriceViewProps, IBuyboxShopSimilarLookViewProps, IBuyboxState,\r\n IProductDetails, ShopSimiliarButtonType\r\n} from '@msdyn365-commerce-modules/buybox';\r\n\r\nimport { IBuyboxCallbacksLite, IBuyboxModulePropsExtended } from '../types';\r\n\r\nexport function getBuyBoxInventoryLabel(props: IBuyboxModulePropsExtended, productDetails?: IProductDetails): React.ReactElement | undefined {\r\n const { typeName } = props;\r\n const productAvailableQuantity = props.data.productAvailableQuantity?.result ? props.data.productAvailableQuantity?.result : productDetails?.productAvailableQuantity!;\r\n\r\n const className = _getClassNamePrefix(typeName);\r\n if (!productAvailableQuantity || !productAvailableQuantity.length) {\r\n return undefined;\r\n }\r\n if (productAvailableQuantity &&\r\n productAvailableQuantity.length &&\r\n productAvailableQuantity[0].StockLevelLabel) {\r\n const inventoryClassName = productAvailableQuantity[0].StockLevelCode ?\r\n `${className}__inventory-label ${className}__inventory-code-${productAvailableQuantity[0].StockLevelCode.toLowerCase()}` :\r\n `${className}__inventory-label`;\r\n return (
{productAvailableQuantity[0].StockLevelLabel}
);\r\n }\r\n\r\n return undefined;\r\n\r\n}\r\n\r\nexport function getBuyboxProductTitle(props: IBuyboxModulePropsExtended, productDetails?: IProductDetails, brandName?: string): React.ReactElement | undefined {\r\n const {\r\n config: { titleHeadingTag = 'h1' },\r\n typeName\r\n } = props;\r\n const className = typeName && _getClassNamePrefix(typeName);\r\n\r\n const product = props.data.product?.result ? props.data.product.result : productDetails?.product!;\r\n const title = brandName ? `${brandName} ${product.Name}` : product.Name;\r\n return product && (\r\n \r\n );\r\n}\r\n\r\nexport function getBuyboxProductDescription(props: IBuyboxModulePropsExtended, productDetails?: IProductDetails): React.ReactElement | undefined {\r\n const { typeName } = props;\r\n const className = _getClassNamePrefix(typeName);\r\n const product = props.data.product?.result ? props.data.product?.result : productDetails?.product!;\r\n\r\n return product && (\r\n

{product.Description}

\r\n );\r\n}\r\n\r\nlet telemetryContent: ITelemetryContent;\r\n\r\n// tslint:disable-next-line:max-func-body-length\r\nexport function getBuyboxAddToCart(props: IBuyboxModulePropsExtended, state: IBuyboxState, callbacks: IBuyboxCallbacksLite,\r\n defaultMinimumKeyInPrice: number, defaultMaximumKeyInPrice: number, productDetails?: IProductDetails): IBuyboxAddToCartViewProps {\r\n const {\r\n id,\r\n typeName,\r\n context,\r\n resources,\r\n config: { minimumKeyInPrice, maximumKeyInPrice }\r\n } = props;\r\n\r\n const product = props.data?.product?.result ? props.data.product.result : productDetails?.product!;\r\n const cart = props.data?.cart?.result ? props.data.cart.result : productDetails?.cart!;\r\n const productAvailableQuantity = props.data?.productAvailableQuantity?.result ? props.data.productAvailableQuantity.result : productDetails?.productAvailableQuantity!;\r\n\r\n const {\r\n quantity,\r\n errorState: {\r\n configureErrors,\r\n quantityError,\r\n customAmountError,\r\n otherError,\r\n errorHost\r\n },\r\n selectedProduct,\r\n isUpdatingDimension,\r\n isUpdatingDeliveryOptions,\r\n isServiceItem,\r\n keyInPriceAmount\r\n } = state;\r\n\r\n const productAvailability = state.productAvailableQuantity ?\r\n state.productAvailableQuantity.ProductAvailableQuantity :\r\n productAvailableQuantity && productAvailableQuantity.length ?\r\n productAvailableQuantity[0].ProductAvailableQuantity : undefined;\r\n\r\n const onAddToCartFailed = (result: IAddToCartFailureResult) => {\r\n let quantityErrorForState: string | undefined;\r\n let customAmountErrorForState: string | undefined;\r\n let otherErrorForState: string | undefined = getGenericError(result, cart, resources, context, product, productAvailability, undefined);\r\n\r\n if (result?.failureReason === 'OUTOFSTOCK') {\r\n quantityErrorForState = result.failureReason === 'OUTOFSTOCK' ? getQuantityError(result.stockLeft, resources) : undefined;\r\n } else if (result && result.failureReason === 'CARTACTIONFAILED'\r\n && result.cartActionResult\r\n && (result.cartActionResult.substatus === 'MAXQUANTITY' || result.cartActionResult?.substatus === 'QUANTITYLIMITS')) {\r\n quantityErrorForState = getGenericError(result, cart, resources, context, product, productAvailability, undefined);\r\n otherErrorForState = undefined; // prevent error duplication in otherError and quantityError\r\n }\r\n\r\n if (result?.failureReason === 'INVALIDCUSTOMAMOUNT') {\r\n if (keyInPriceAmount === undefined || keyInPriceAmount < (minimumKeyInPrice || defaultMinimumKeyInPrice)) {\r\n const formatedAmountLimit = props.context.cultureFormatter?.formatCurrency(minimumKeyInPrice || defaultMinimumKeyInPrice);\r\n customAmountErrorForState = resources.invalidSmallCustomAmountText?.replace('{minAmount}', formatedAmountLimit);\r\n } else if (keyInPriceAmount > (maximumKeyInPrice || defaultMaximumKeyInPrice)) {\r\n const formatedAmountLimit = props.context.cultureFormatter?.formatCurrency(maximumKeyInPrice || defaultMaximumKeyInPrice);\r\n customAmountErrorForState = resources.invalidLargeCustomAmountText?.replace('{maxAmount}', formatedAmountLimit);\r\n }\r\n }\r\n\r\n callbacks.updateErrorState({\r\n errorHost: 'ADDTOCART',\r\n quantityError: quantityErrorForState,\r\n configureErrors: result?.failureReason === 'MISSINGDIMENSION' ? getConfigureErrors(result?.missingDimensions, resources, product?.IsGiftCard) : {},\r\n customAmountError: customAmountErrorForState,\r\n otherError: otherErrorForState\r\n });\r\n };\r\n\r\n const dialogStrings: IAddToCartResources = {\r\n goToCartText: resources.buyBoxGoToCartText,\r\n continueShoppingText: resources.buyBoxContinueShoppingText,\r\n headerItemOneText: resources.buyBoxSingleItemText,\r\n headerItemFormatText: resources.buyBoxMultiLineItemFormatText,\r\n headerMessageText: resources.buyBoxHeaderMessageText,\r\n freePriceText: resources.priceFree,\r\n originalPriceText: resources.originalPriceText,\r\n currentPriceText: resources.currentPriceText,\r\n addedQuantityText: resources.addedQuantityText,\r\n closeNotificationLabel: resources.closeNotificationLabel\r\n };\r\n\r\n const defaultImageSettings: IImageSettings = {\r\n viewports: {\r\n xs: { q: `w=240&h=240&m=6`, w: 0, h: 0 },\r\n lg: { q: `w=240&h=240&m=6`, w: 0, h: 0 },\r\n xl: { q: `w=240&h=240&m=6`, w: 0, h: 0 }\r\n },\r\n lazyload: true\r\n };\r\n\r\n const isLoading = typeName !== 'quickview' && props.data.productAvailableQuantity?.status === 'LOADING';\r\n if (isLoading) {\r\n callbacks.changeUpdatingDimension(false);\r\n }\r\n\r\n const isLoadingDeliveryOptions = typeName !== 'quickview' && props.data.deliveryOptions?.status === 'LOADING';\r\n if (isLoadingDeliveryOptions && callbacks.changeUpdatingDeliveryOptions) {\r\n callbacks.changeUpdatingDeliveryOptions(false);\r\n }\r\n\r\n telemetryContent = getTelemetryObject(props.context.request.telemetryPageName!, props.typeName, props.telemetry);\r\n\r\n // check if the product delivery mode is electronic\r\n const emailDeliveryModeCode = props.context.actionContext.requestContext.channel?.EmailDeliveryModeCode;\r\n const deliveryOptions = props.data.deliveryOptions?.result;\r\n const isEmailDelivery = ArrayExtensions.hasElements(deliveryOptions?.DeliveryOptions) && deliveryOptions!.DeliveryOptions[0].Code === emailDeliveryModeCode;\r\n const className = _getClassNamePrefix(typeName);\r\n\r\n const onItemAddedToCart = (result: ICartActionResult) => {\r\n if (typeName === 'quickview') {\r\n callbacks.changeModalOpen(false);\r\n }\r\n };\r\n\r\n return {\r\n ContainerProps: {\r\n className: `${className}__add-to-cart-container`\r\n },\r\n button: product && (\r\n \r\n ),\r\n errorBlock: (\r\n \r\n )\r\n };\r\n}\r\n\r\nexport function getBuyboxProductPrice(props: IBuyboxExtentedProps, state: IBuyboxState): React.ReactElement | undefined {\r\n const {\r\n id,\r\n typeName,\r\n context,\r\n resources\r\n } = props;\r\n\r\n return state.productPrice && (\r\n \r\n );\r\n}\r\n\r\nexport function getBuyboxProductRating(props: IBuyboxExtentedProps, productDetails?: IProductDetails): React.ReactElement | undefined {\r\n const {\r\n id,\r\n typeName,\r\n context,\r\n resources\r\n } = props;\r\n\r\n const ratingsSummary = props.data.ratingsSummary?.result ? props.data.ratingsSummary?.result : productDetails?.ratingsSummary!;\r\n\r\n const ratingComponent = ratingsSummary?.averageRating && (\r\n \r\n ) || undefined;\r\n\r\n return ratingsSummary && ratingComponent && (\r\n ratingComponent\r\n );\r\n}\r\n\r\nexport function getBuyboxShopSimilarButton(props: IBuyboxExtentedProps, buttonType: ShopSimiliarButtonType): IBuyboxShopSimilarLookViewProps {\r\n const {\r\n resources,\r\n context,\r\n data: {\r\n product: { result: product }\r\n },\r\n typeName\r\n } = props;\r\n\r\n const className = _getClassNamePrefix(typeName);\r\n const navigationUrl = (shopSimiliarButtonType: ShopSimiliarButtonType) => () => {\r\n const searchURL = getUrlSync('search', context?.actionContext);\r\n const separator = searchURL!.includes('?') ? '&' : '?';\r\n if (MSDyn365.isBrowser) {\r\n document.location.href = `${searchURL}${separator}productId=${product?.RecordId}&recommendation=${shopSimiliarButtonType}`;\r\n }\r\n };\r\n const telemetryText = buttonType === ShopSimiliarButtonType.Looks ? TelemetryConstant.ShopSimliarLooks : TelemetryConstant.ShopSimliarDescription;\r\n const payLoad = getPayloadObject('click', telemetryContent, telemetryText);\r\n const attribute = getTelemetryAttributes(telemetryContent, payLoad);\r\n const text = buttonType === ShopSimiliarButtonType.Looks ? resources.shopSimilarLooksText : resources.shopSimilarDescriptionText;\r\n\r\n return {\r\n ContainerProps: {\r\n className: `${className}__shopsimilar${buttonType}`\r\n },\r\n input: (\r\n \r\n {text}\r\n \r\n )\r\n };\r\n}\r\n\r\nexport function getBuyboxKeyInPrice(props: IBuyboxExtentedProps, state: IBuyboxState, callbacks: IBuyboxCallbacksLite): IBuyboxKeyInPriceViewProps {\r\n const {\r\n config,\r\n resources\r\n } = props;\r\n\r\n const\r\n {\r\n errorState: { }\r\n } = state;\r\n\r\n const className = _getClassNamePrefix(props.typeName);\r\n const onChange = (e: React.ChangeEvent) => {\r\n const value = e.currentTarget.value;\r\n callbacks.updateKeyInPrice(value.length ? Number(value) : parseFloat(value));\r\n };\r\n\r\n return {\r\n ContainerProps: {\r\n className: `${className}__key_in_price`\r\n },\r\n LabelContainerProps: {\r\n tag: 'label',\r\n className: `${className}__key_in_price-label`,\r\n htmlFor: `${className}__key_in_price`\r\n },\r\n heading: (\r\n
{resources.buyboxKeyInPriceLabelHeading}
\r\n ),\r\n input: (\r\n \r\n )\r\n };\r\n\r\n}\r\n\r\nexport const BuyboxErrorBlock: React.FC = ({ showError, configureErrors, quantityError, customAmountError, otherError, resources }) => {\r\n let errorMessages: (string | undefined)[] = [];\r\n\r\n errorMessages = Object.values(configureErrors).filter(message => message !== undefined);\r\n\r\n if (quantityError) {\r\n errorMessages.push(quantityError);\r\n }\r\n\r\n if (customAmountError) {\r\n errorMessages.push(customAmountError);\r\n }\r\n\r\n if (otherError) {\r\n errorMessages.push(otherError);\r\n }\r\n\r\n return (\r\n 0} color='danger' assertive={true} aria-label={resources.buyboxErrorMessageHeader} >\r\n \r\n {errorMessages.map((message, index) => {\r\n return (\r\n
{message}
\r\n );\r\n })}\r\n
\r\n );\r\n};\r\n\r\nexport function getQuantityLimitsMessages(props: IBuyboxModulePropsExtended, state: IBuyboxState): React.ReactElement | undefined {\r\n const {\r\n resources\r\n } = props;\r\n\r\n const\r\n {\r\n min,\r\n max\r\n } = state;\r\n\r\n if (!_isOrderQuantityLimitsFeatureEnabled(props)) {\r\n return undefined;\r\n }\r\n\r\n return (\r\n \r\n {_renderMaxLabel(max, resources.maxQuantityText)}\r\n {_renderMinLabel(min, resources.minQuantityText)}\r\n \r\n );\r\n}\r\n\r\nconst _renderMaxLabel = (max: number | undefined, maxQuantityText: string, typeName?: string): React.ReactElement | undefined => {\r\n const className = _getClassNamePrefix(typeName ? typeName : '');\r\n if (max && max !== 0 && max !== Number.MAX_VALUE) {\r\n return (\r\n

\r\n {maxQuantityText?.replace('{max}', max.toString())}\r\n

\r\n );\r\n } else {\r\n return undefined;\r\n }\r\n};\r\n\r\nconst _renderMinLabel = (min: number | undefined, minQuantityText: string, typeName?: string): JSX.Element | undefined => {\r\n const className = _getClassNamePrefix(typeName ? typeName : '');\r\n if (min && min > 1) {\r\n return (\r\n

\r\n {minQuantityText?.replace('{min}', min.toString())}\r\n

\r\n );\r\n } else {\r\n return undefined;\r\n }\r\n};\r\n\r\nconst _isOrderQuantityLimitsFeatureEnabled = (props: IBuyboxModulePropsExtended): boolean | undefined => {\r\n const defaultOrderQuantityLimitsFeatureConfig = props.context?.request?.app?.platform?.enableDefaultOrderQuantityLimits;\r\n if (defaultOrderQuantityLimitsFeatureConfig === 'none') {\r\n return false;\r\n }\r\n\r\n if (defaultOrderQuantityLimitsFeatureConfig === 'all') {\r\n return true;\r\n }\r\n\r\n const customerInfo = props.data.customerInformation.result;\r\n return customerInfo &&\r\n ((defaultOrderQuantityLimitsFeatureConfig === 'b2b' && customerInfo.IsB2b) ||\r\n (defaultOrderQuantityLimitsFeatureConfig === 'b2c' && !customerInfo.IsB2b));\r\n};\r\n\r\nconst _getClassNamePrefix = (typeName: string | undefined): string => {\r\n return typeName?.toLowerCase() === 'quickview' ? 'ms-quickView' : 'ms-buybox';\r\n};\r\n","/* tslint:disable: no-duplicate-imports */\r\nimport { IBuyboxState } from '@msdyn365-commerce-modules/buybox';\r\nimport { NotificationsManager } from '@msdyn365-commerce-modules/notifications-core';\r\nimport { ArrayExtensions } from '@msdyn365-commerce-modules/retail-actions';\r\nimport { getTelemetryObject, Heading, INodeProps, IPopupProps, Popup } from '@msdyn365-commerce-modules/utilities';\r\nimport { AddToCartBehavior, IAddToCartFailureResult, IAddToCartResources, ItemSuccessfullyAddedToCartNotification, PriceComponent } from '@msdyn365-commerce/components';\r\nimport MsDyn365, { getUrlSync, IImageSettings } from '@msdyn365-commerce/core';\r\nimport { DeliveryOption, OrgUnitLocation, ProductDimension } from '@msdyn365-commerce/retail-proxy';\r\nimport * as React from 'react';\r\nimport { IMfrmBuyboxData } from '../mfrm-buybox.data';\r\nimport { IMfrmBuyboxProps } from '../mfrm-buybox.props.autogenerated';\r\n\r\nimport { BuyboxErrorBlock } from '@msdyn365-commerce-modules/buybox';\r\nimport { getConfigureErrors, getGenericError } from '@msdyn365-commerce-modules/buybox';\r\n\r\nimport { ICartActionResult } from '@msdyn365-commerce/global-state';\r\nimport { IBuyboxCallbacksLite } from '../types';\r\n\r\nexport interface IFindInStoreFailureResult {\r\n missingDimensions?: ProductDimension[];\r\n}\r\n\r\nexport interface IBuyboxFindInStoreViewProps {\r\n storeSelector?: React.ReactNode;\r\n heading?: React.ReactNode;\r\n description?: React.ReactNode;\r\n errors?: React.ReactNode;\r\n button?: React.ReactNode;\r\n productPickupOptionList?: React.ReactNode;\r\n\r\n modal?: React.ReactNode;\r\n\r\n ContainerProps: INodeProps;\r\n\r\n openFindInStoreDialog(): Promise;\r\n}\r\n\r\n// tslint:disable-next-line:max-func-body-length\r\nexport function getBuyboxFindInStore(props: IMfrmBuyboxProps, state: IBuyboxState, callbacks: IBuyboxCallbacksLite): IBuyboxFindInStoreViewProps | undefined {\r\n const {\r\n data,\r\n slots: {\r\n storeSelector\r\n },\r\n resources: {\r\n priceFree,\r\n originalPriceText,\r\n currentPriceText,\r\n findInStoreHeaderText,\r\n findInStoreDescriptionText,\r\n findInStoreLinkText,\r\n buyBoxGoToCartText,\r\n buyBoxContinueShoppingText,\r\n buyBoxSingleItemText,\r\n buyBoxMultiLineItemFormatText,\r\n buyBoxHeaderMessageText\r\n /*descriptionTextToShowAllPickupOptions*/\r\n },\r\n context: {\r\n request: {\r\n channel: {\r\n PickupDeliveryModeCode\r\n } = { PickupDeliveryModeCode: undefined }\r\n }\r\n }\r\n } = props;\r\n const product = data?.product?.result;\r\n const price = data?.productPrice?.result;\r\n const storeSelectorStateManager = data?.storeSelectorStateManager?.result;\r\n const cart = data?.cart?.result;\r\n const deliveryOptions = data?.deliveryOptions?.result;\r\n const\r\n {\r\n errorState: {\r\n configureErrors,\r\n quantityError,\r\n otherError,\r\n errorHost\r\n },\r\n modalOpen,\r\n quantity\r\n } = state;\r\n\r\n const onClick = () => findInStoreOnClick(props, state, callbacks);\r\n\r\n if (!product || !storeSelectorStateManager || !ArrayExtensions.hasElements(storeSelector)) {\r\n return undefined;\r\n }\r\n\r\n // If no delivery options present on the product, or none of the delivery options\r\n // match the PickupDeliveryModeCode, that means the item cannot be used for BOPIS\r\n if (!deliveryOptions ||\r\n !deliveryOptions.DeliveryOptions ||\r\n !PickupDeliveryModeCode ||\r\n !deliveryOptions.DeliveryOptions.find((option: DeliveryOption) => option.Code === PickupDeliveryModeCode)) {\r\n return undefined;\r\n }\r\n\r\n const dialogStrings = {\r\n goToCartText: buyBoxGoToCartText,\r\n continueShoppingText: buyBoxContinueShoppingText,\r\n headerItemOneText: buyBoxSingleItemText,\r\n headerItemFormatText: buyBoxMultiLineItemFormatText,\r\n headerMessageText: buyBoxHeaderMessageText,\r\n freePriceText: priceFree,\r\n originalPriceText: originalPriceText,\r\n currentPriceText: currentPriceText\r\n };\r\n\r\n const priceComponent = price ? (\r\n ) : '';\r\n\r\n const defaultImageSettings: IImageSettings = {\r\n viewports: {\r\n xs: { q: `w=240&h=240&m=6`, w: 0, h: 0 },\r\n lg: { q: `w=240&h=240&m=6`, w: 0, h: 0 },\r\n xl: { q: `w=240&h=240&m=6`, w: 0, h: 0 }\r\n },\r\n lazyload: true\r\n };\r\n\r\n const popupProps: IPopupProps = {\r\n context: props.context,\r\n className: 'ms-buybox',\r\n id: props.id,\r\n typeName: props.typeName,\r\n data: { product: props.data.product?.result, price: props.data.productPrice?.result },\r\n dialogStrings: dialogStrings,\r\n imageSettings: defaultImageSettings,\r\n gridSettings: props.context.request.gridSettings,\r\n productQuantity: quantity,\r\n priceComponent: priceComponent,\r\n navigationUrl: getUrlSync('cart', props.context.actionContext),\r\n modalOpen: modalOpen,\r\n setModalOpen: callbacks.changeModalOpen\r\n };\r\n const renderModalPopup = ;\r\n\r\n return {\r\n ContainerProps: {\r\n className: 'ms-buybox__find-in-store'\r\n },\r\n\r\n storeSelector: storeSelector[0],\r\n\r\n openFindInStoreDialog: onClick,\r\n\r\n heading: (\r\n \r\n ),\r\n\r\n description: (\r\n

\r\n {findInStoreDescriptionText}\r\n

\r\n ),\r\n productPickupOptionList: null,\r\n errors: (\r\n \r\n ),\r\n\r\n button: (\r\n \r\n {findInStoreLinkText}\r\n \r\n ),\r\n\r\n modal: renderModalPopup\r\n };\r\n}\r\n\r\n// tslint:disable-next-line: max-func-body-length\r\nasync function findInStoreOnClick(props: IMfrmBuyboxProps, state: IBuyboxState, callbacks: IBuyboxCallbacksLite): Promise {\r\n const {\r\n data: {\r\n storeSelectorStateManager: { result: storeSelectorStateManager },\r\n cart: { result: cart },\r\n productAvailableQuantity: { result: productAvailableQuantity }\r\n },\r\n resources,\r\n context,\r\n modules\r\n } = props;\r\n\r\n const {\r\n selectedProduct,\r\n quantity\r\n } = state;\r\n\r\n let dataProduct = props.data.product.result;\r\n if (selectedProduct) {\r\n dataProduct = (await selectedProduct) || dataProduct;\r\n }\r\n\r\n if (!dataProduct || !storeSelectorStateManager) {\r\n return;\r\n }\r\n\r\n const product = dataProduct;\r\n\r\n const missingDimensions = product.Dimensions && product.Dimensions.filter((dimension: ProductDimension) => !(dimension.DimensionValue && dimension.DimensionValue.Value));\r\n\r\n let storeSelectorId: string = '';\r\n if (modules && Object.keys(modules).length > 0 && modules.storeSelector && modules.storeSelector.length > 0) {\r\n storeSelectorId = modules.storeSelector[0].id;\r\n }\r\n\r\n if (missingDimensions && missingDimensions.length > 0) {\r\n if (callbacks.updateErrorState) {\r\n callbacks.updateErrorState(\r\n {\r\n errorHost: 'FINDINSTORE',\r\n configureErrors: getConfigureErrors(missingDimensions, resources)\r\n }\r\n );\r\n }\r\n } else {\r\n storeSelectorStateManager.openDialog({\r\n product,\r\n id: storeSelectorId,\r\n deliveryOptions: undefined,\r\n onLocationSelected: (orgUnitLocation: OrgUnitLocation, deliveryMode: string) => {\r\n if (!cart) {\r\n return Promise.resolve();\r\n }\r\n\r\n const behavior = props.context?.app?.config?.addToCartBehavior;\r\n\r\n return cart.addProductToCart({ product: product, count: quantity, location: orgUnitLocation, deliveryMode: deliveryMode })\r\n .then((result: ICartActionResult) => {\r\n if (result.status === 'FAILED' && result.substatus === 'MAXQUANTITY') {\r\n callbacks.changeModalOpen(false);\r\n\r\n const productAvailability = state.productAvailableQuantity ?\r\n state.productAvailableQuantity.ProductAvailableQuantity :\r\n productAvailableQuantity && productAvailableQuantity.length ?\r\n productAvailableQuantity[0].ProductAvailableQuantity : undefined;\r\n\r\n const failureResult: IAddToCartFailureResult = { failureReason: 'CARTACTIONFAILED', cartActionResult: { status: result.status, substatus: result.substatus } };\r\n callbacks.updateErrorState({\r\n errorHost: 'ADDTOCART',\r\n configureErrors: {},\r\n otherError: getGenericError(failureResult, cart, resources, context, product, productAvailability, orgUnitLocation)\r\n });\r\n } else {\r\n callbacks.updateErrorState({\r\n configureErrors: {}\r\n });\r\n const navigationUrl = getUrlSync('cart', context.actionContext);\r\n if ((behavior === undefined || behavior === AddToCartBehavior.goToCart)) {\r\n if (result.status === 'SUCCESS' && navigationUrl && MsDyn365.isBrowser) {\r\n window.location.assign(navigationUrl);\r\n }\r\n } else if (behavior === AddToCartBehavior.showModal) {\r\n callbacks.changeModalOpen(true);\r\n } else if (behavior === AddToCartBehavior.showNotification) {\r\n const defaultImageSettings: IImageSettings = {\r\n viewports: {\r\n xs: { q: `w=240&h=240&m=6`, w: 0, h: 0 },\r\n lg: { q: `w=240&h=240&m=6`, w: 0, h: 0 },\r\n xl: { q: `w=240&h=240&m=6`, w: 0, h: 0 }\r\n },\r\n lazyload: true\r\n };\r\n const telemetryContent = getTelemetryObject(props.context.request.telemetryPageName!, props.friendlyName, props.telemetry);\r\n const dialogStrings: IAddToCartResources = {\r\n goToCartText: resources.buyBoxGoToCartText,\r\n continueShoppingText: resources.buyBoxContinueShoppingText,\r\n headerItemOneText: resources.buyBoxSingleItemText,\r\n headerItemFormatText: resources.buyBoxMultiLineItemFormatText,\r\n headerMessageText: resources.buyBoxHeaderMessageText,\r\n freePriceText: resources.priceFree,\r\n originalPriceText: resources.originalPriceText,\r\n currentPriceText: resources.currentPriceText,\r\n addedQuantityText: resources.addedQuantityText,\r\n closeNotificationLabel: resources.closeNotificationLabel\r\n };\r\n const notification = new ItemSuccessfullyAddedToCartNotification(\r\n props.context,\r\n dialogStrings,\r\n defaultImageSettings,\r\n props.context.request.gridSettings,\r\n product,\r\n props.data.productPrice?.result,\r\n quantity,\r\n navigationUrl,\r\n telemetryContent,\r\n props.id,\r\n props.typeName\r\n );\r\n NotificationsManager.instance().addNotification(notification);\r\n }\r\n }\r\n }).catch((error: Error) => {\r\n if (props.telemetry) {\r\n props.telemetry.exception(error);\r\n props.telemetry.debug('Unable to add product to cart');\r\n }\r\n return;\r\n });\r\n }\r\n }).catch((error: Error) => {\r\n if (props.telemetry) {\r\n props.telemetry.error(error.message);\r\n props.telemetry.debug('Unable to find in store');\r\n }\r\n return;\r\n });\r\n }\r\n\r\n return;\r\n}","import React, {useState, useEffect, useRef} from \"react\";\r\nimport _getViewPort from \"../../Utilities/get-view-port\";\r\nimport MsDyn365, { ICoreContext, IModule } from '@msdyn365-commerce/core';\r\nimport { addThrottledEvent } from '@msdyn365-commerce-modules/utilities';\r\n\r\nconst updateViewPort = (context: ICoreContext): boolean => {\r\n const viewport = _getViewPort(context);\r\n if (viewport === 'lg' || viewport === 'xl') {\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n};\r\n\r\n\r\nexport const useIsDesktop = (context: ICoreContext): boolean => {\r\n const [isDesktop, setIsDesktop] = useState(false);\r\n const resizeThrottledEventHandler = useRef<(this: Window, ev: UIEvent) => any>(() => {});\r\n useEffect(()=>{\r\n if (MsDyn365.isBrowser) {\r\n setIsDesktop(updateViewPort(context));\r\n resizeThrottledEventHandler.current = addThrottledEvent(window, 'resize', () => setIsDesktop(updateViewPort(context)));\r\n }\r\n return ()=>{\r\n MsDyn365.isBrowser && window.removeEventListener('resize', resizeThrottledEventHandler.current, false);\r\n };\r\n },[]);\r\n return isDesktop;\r\n};\r\n\r\nexport interface IWithIsDesktopProps {\r\n isDesktop: boolean;\r\n}\r\n\r\nexport const withIsDesktop =

(Component: React.ComponentType

) => {\r\n\r\n return (props:P) => {\r\n const isDesktop = useIsDesktop(props.context);\r\n return ;\r\n };\r\n};\r\n","import React from 'react';\r\nimport { Node } from '@msdyn365-commerce-modules/utilities';\r\nimport {\r\n IBuyboxShopSimilarLookViewProps\r\n} from '@msdyn365-commerce-modules/buybox';\r\n\r\nexport const BuyboxShopSimilarItems = (props: IBuyboxShopSimilarLookViewProps): JSX.Element => {\r\n const { ContainerProps, errors, input } = props;\r\n\r\n return (\r\n \r\n {errors}\r\n {input}\r\n \r\n );\r\n};","import React from 'react';\r\nimport { Node } from '@msdyn365-commerce-modules/utilities';\r\nimport {\r\n IBuyboxKeyInPriceViewProps\r\n} from '@msdyn365-commerce-modules/buybox';\r\n\r\nexport const BuyboxKeyInPrice = (props: IBuyboxKeyInPriceViewProps): JSX.Element => {\r\n const { ContainerProps, LabelContainerProps, heading, input } = props;\r\n\r\n return (\r\n \r\n {heading}\r\n {input}\r\n \r\n );\r\n};\r\n","import { Tooltip, Rating } from 'mfcl';\r\nimport Info from 'mfcl/Icons/Info';\r\nimport React from 'react';\r\nimport { BuyboxCustomerSatisfactionScoreProps } from './buybox-customer-satisfaction-score.props';\r\nimport { Node } from '@msdyn365-commerce-modules/utilities';\r\n\r\nexport const BuyboxCustomerSatisfactionScore = ({\r\n unitsReturned,\r\n unitsSold,\r\n headingText,\r\n popoverText,\r\n tooltipHover\r\n}: BuyboxCustomerSatisfactionScoreProps) => {\r\n if (!unitsSold) {\r\n return null;\r\n }\r\n\r\n const percentNotReturned: number = Math.round(100 - (Number(unitsReturned) / Number(unitsSold)) * 100);\r\n const unitsNotReturend = Number(unitsSold) - Number(unitsReturned);\r\n const avgRating = (unitsNotReturend * 5) / Number(unitsSold);\r\n return (\r\n \r\n {headingText?.replace('{perNotReturned}', `${percentNotReturned}%`)}\r\n } position='bottom-left' hover={tooltipHover}>\r\n

\r\n \r\n {popoverText\r\n ?.replace('{unitsNotReturend}', unitsNotReturend.toLocaleString())\r\n ?.replace('{unitsSold}', Number(unitsSold).toLocaleString())}\r\n \r\n \r\n \r\n
\r\n {`${percentNotReturned}%`}\r\n {`(${unitsNotReturend.toLocaleString()})`}\r\n
\r\n
\r\n
\r\n \r\n \r\n );\r\n};\r\n\r\nBuyboxCustomerSatisfactionScore.displayName = 'BuyboxCustomerSatisfactionScore';\r\n","import { AsyncResult, AttributeValue } from '@msdyn365-commerce/retail-proxy';\r\n\r\nexport function getProductSpecText(productSpecificationData: AsyncResult | undefined, Name: string): string | undefined {\r\n return productSpecificationData?.result?.find(e => e.Name?.trim().toLowerCase() === Name?.trim().toLowerCase())?.TextValue;\r\n}\r\n\r\nexport function getProductSpecNumber( // Alt name: getProductSpecTextToNumber\r\n productSpecificationData: AsyncResult | undefined,\r\n Name: string\r\n): number | undefined {\r\n const rawValue = getProductSpecText(productSpecificationData, Name);\r\n if (typeof rawValue === 'undefined') {\r\n return NaN;\r\n } else {\r\n return parseFloat(rawValue);\r\n }\r\n}\r\n\r\nexport function getProductSpecBoolean(\r\n productSpecificationData: AsyncResult | undefined,\r\n Name: string\r\n): boolean | undefined {\r\n return productSpecificationData?.result?.find(e => e.Name?.trim().toLowerCase() === Name?.trim().toLowerCase())?.BooleanValue;\r\n}","import { useRef, useEffect } from 'react';\r\n\r\ninterface Props {\r\n onClickOutside: (event: MouseEvent) => void;\r\n}\r\n\r\nconst useClickOutside = (props: Props) => {\r\n const ref = useRef(null);\r\n\r\n const handleClick = (event: MouseEvent) => {\r\n if (ref.current && !ref.current.contains(event.target as Node)) {\r\n props.onClickOutside(event);\r\n }\r\n };\r\n\r\n useEffect(() => {\r\n document.addEventListener('click', handleClick);\r\n return () => {\r\n document.removeEventListener('click', handleClick);\r\n };\r\n });\r\n\r\n return ref;\r\n};\r\n\r\nexport default useClickOutside;\r\n","import React from 'react';\r\nimport {\r\n getTimeZoneAbbr,\r\n secondsToTime\r\n} from '../../../mfrm-store-selector/components/store-selector-location-line-item/date-time-helpers';\r\nimport { Node } from '@msdyn365-commerce-modules/utilities';\r\nimport { BuyboxStoreHoursProps } from './types';\r\nexport const BuyboxStoreHours = ({\r\n location,\r\n storeHoursClosedText,\r\n storeCloseAtHours,\r\n storeOpenAtHours\r\n}: BuyboxStoreHoursProps): JSX.Element | null => {\r\n const isClosedToday = location.ExtensionProperties?.find(x => x.Key === 'Yext_Today_IsClosed')?.Value?.BooleanValue;\r\n const isClosed = location.ExtensionProperties?.find(x => x.Key === 'Yext_Is_Store_Closed')?.Value?.BooleanValue;\r\n const startTime = location.ExtensionProperties?.find(x => x.Key === 'Yext_Today_OpenFrom')?.Value?.IntegerValue;\r\n const endTime = location.ExtensionProperties?.find(x => x.Key === 'Yext_Today_OpenTo')?.Value?.IntegerValue;\r\n const timeZone = location.ExtensionProperties?.find(x => x.Key === 'Channel_TimeZone_InfoId')?.Value?.StringValue;\r\n const timeZoneAbbr = getTimeZoneAbbr(timeZone);\r\n if (isClosedToday && isClosedToday !== null) {\r\n return (\r\n \r\n Today: {storeHoursClosedText}\r\n \r\n );\r\n } else if (startTime !== null || endTime !== null) {\r\n return (\r\n \r\n Today:{' '}\r\n {!isClosed\r\n ? `${storeCloseAtHours} ${secondsToTime(endTime)} ${timeZoneAbbr}`\r\n : `${storeOpenAtHours} ${secondsToTime(startTime)} ${timeZoneAbbr}`}\r\n \r\n );\r\n } else {\r\n return null;\r\n }\r\n};\r\n\r\nBuyboxStoreHours.displayName = 'BuyboxStoreHours';\r\n","import React from 'react';\r\nimport { Node } from '@msdyn365-commerce-modules/utilities';\r\nimport { BuyboxStoreHours } from '../buybox-store-hours/buybox-store-hours';\r\nimport { BuyboxStoreDetailsProps } from './types';\r\n\r\nexport const BuyboxStoreDetails = ({\r\n isSociEnabled,\r\n sociPrefferedStore,\r\n storeAddressLine1,\r\n storeAddressLine2,\r\n phoneNumber,\r\n preferredStore,\r\n storeHoursClosedText,\r\n storeCloseAtHours,\r\n storeOpenAtHours,\r\n sociStoreLocatorUrl,\r\n storeLocatorUrl,\r\n onClickNameOrDetails,\r\n viewStoreDetailsText,\r\n onClickChangeStore,\r\n changeStoreText\r\n}: BuyboxStoreDetailsProps) => {\r\n return (\r\n \r\n {isSociEnabled && sociPrefferedStore ? (\r\n \r\n \r\n {storeAddressLine1}\r\n \r\n \r\n {storeAddressLine2}\r\n \r\n {sociPrefferedStore && (\r\n {`${sociPrefferedStore.city}, ${sociPrefferedStore.state} ${sociPrefferedStore.postalcode}`}\r\n )}\r\n \r\n ) : (\r\n \r\n \r\n {storeAddressLine1}\r\n \r\n \r\n {storeAddressLine2}\r\n \r\n \r\n )}\r\n {phoneNumber && (\r\n \r\n {phoneNumber}\r\n \r\n )}\r\n {!isSociEnabled && (\r\n \r\n )}\r\n \r\n onClickNameOrDetails(event)}\r\n target='_blank'\r\n >\r\n {viewStoreDetailsText}\r\n \r\n \r\n {changeStoreText}\r\n \r\n \r\n \r\n );\r\n};\r\n\r\nBuyboxStoreDetails.displayName = 'BuyboxStoreDetails';\r\n","import React from \"react\";\r\nimport { Node } from '@msdyn365-commerce-modules/utilities';\r\n\r\ninterface OpenProps {\r\n children: React.ReactNode;\r\n isOpen: boolean;\r\n}\r\n\r\nexport const Open = React.forwardRef(({ isOpen, children }: OpenProps, ref) => {\r\n if (isOpen) {\r\n return (\r\n \r\n {children}\r\n \r\n );\r\n } else {\r\n return <>{children};\r\n }\r\n});\r\n","import React from 'react';\r\nimport { Node } from '@msdyn365-commerce-modules/utilities';\r\nimport useClickOutside from '../../../../common/hooks/useClickOutside';\r\nimport { BuyboxStoreDetails } from '../buybox-store-details/buybox-store-details';\r\nimport { extractPhoneNumber } from '../../../mfrm-store-selector/components/store-selector-location-line-item';\r\nimport { Open } from './open';\r\nimport { BuyboxTryInStoreRedesignProps } from './types';\r\n\r\nexport const BuyboxTryInStoreRedesign = ({\r\n isSociEnabled,\r\n preferredStore,\r\n sociPrefferedStore,\r\n isOnlineOnly,\r\n availableInStoresTextV2,\r\n notAvailableInStoresTextV2,\r\n viewStoreDetailsText,\r\n changeStoreText,\r\n canTryInStores,\r\n onClickChangeStore,\r\n tryInStoresResults,\r\n isStoreDetailsOpen,\r\n storeHoursClosedText,\r\n storeCloseAtHours,\r\n storeOpenAtHours,\r\n onClickNameOrDetails,\r\n onClickOutside\r\n}: BuyboxTryInStoreRedesignProps): JSX.Element | null => {\r\n const ref = useClickOutside({\r\n onClickOutside: event => {\r\n if (isStoreDetailsOpen) {\r\n onClickOutside(event);\r\n }\r\n }\r\n });\r\n\r\n if (Object.keys(sociPrefferedStore)?.length === 0 && Object.keys(preferredStore)?.length === 0) {\r\n return null;\r\n }\r\n const sociStoreName = (isSociEnabled && sociPrefferedStore?.name) || '';\r\n const storeName: string | undefined =\r\n preferredStore &&\r\n (preferredStore.ExtensionProperties?.find(x => x.Key === 'Yext_Store_Name')?.Value?.StringValue || preferredStore?.OrgUnitName);\r\n const storeNameWithState = isSociEnabled ? `${sociStoreName}, ${sociPrefferedStore?.state}` : `${storeName}, ${preferredStore?.State}`;\r\n const { Inventory, Status } = { ...tryInStoresResults };\r\n const isAvailable = !!(Status === 'Success' && canTryInStores && Inventory?.length !== 0);\r\n\r\n if (\r\n !isAvailable &&\r\n !(Status === 'Success' && canTryInStores && Inventory?.length === 0) &&\r\n !(storeName && !canTryInStores && isOnlineOnly)\r\n ) {\r\n return null;\r\n }\r\n\r\n const storeLocatorContext =\r\n preferredStore && preferredStore.Contacts ? preferredStore.Contacts.find(url => url.ContactTypeValue === 3) : undefined;\r\n\r\n // VSI Customization - ends\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n {isAvailable ? availableInStoresTextV2 : notAvailableInStoresTextV2}\r\n onClickNameOrDetails(isAvailable)}\r\n href='javascript:void(0)'\r\n >\r\n {storeNameWithState}\r\n \r\n \r\n \r\n {isStoreDetailsOpen && (\r\n onClickNameOrDetails(isAvailable)}\r\n viewStoreDetailsText={viewStoreDetailsText}\r\n onClickChangeStore={onClickChangeStore}\r\n changeStoreText={changeStoreText}\r\n />\r\n )}\r\n \r\n \r\n );\r\n};\r\n\r\nBuyboxTryInStoreRedesign.displayName = 'BuyboxTryInStoreRedesign';\r\n","import React from 'react';\r\nimport { BVRatingSummary } from '../../../../Utilities/components/BVRatingSummary';\r\nimport MsDyn365, { ICoreContext } from '@msdyn365-commerce/core';\r\nimport { getBVAttributeValues } from '../../../../Utilities/get-bv-attributes';\r\nimport { RatingComponent } from '@msdyn365-commerce/components';\r\nimport { format } from '@msdyn365-commerce-modules/utilities';\r\nimport { Node } from '@msdyn365-commerce-modules/utilities';\r\nimport { AttributeValue } from '@msdyn365-commerce/retail-proxy';\r\nimport { IMfrmBuyboxResources } from '../../mfrm-buybox.props.autogenerated';\r\n\r\ninterface Props {\r\n hideRating: boolean;\r\n isBazaarVoice: boolean | undefined;\r\n itemId: string | undefined;\r\n variantId: number | undefined;\r\n id: string;\r\n typeName: string;\r\n context: ICoreContext<{\r\n [x: string]: any;\r\n }>;\r\n productSpecification: AttributeValue[] | undefined;\r\n resources: IMfrmBuyboxResources;\r\n}\r\n\r\nconst _scrollToBVHosted = () => {\r\n if (MsDyn365.isBrowser) {\r\n const ratingSection = document?.getElementById('writeFirstReview');\r\n const isRatingReviewsLoaded = ratingSection?.getElementsByTagName('div')[0]?.getAttribute('data-bv-ready');\r\n isRatingReviewsLoaded && ratingSection?.scrollIntoView({ behavior: 'smooth' });\r\n }\r\n};\r\n\r\nexport const BuyboxProductRating = ({\r\n hideRating,\r\n isBazaarVoice,\r\n itemId,\r\n variantId,\r\n id,\r\n typeName,\r\n context,\r\n productSpecification,\r\n resources\r\n}: Props) => {\r\n if (hideRating) {\r\n return null;\r\n }\r\n if (isBazaarVoice) {\r\n return ;\r\n }\r\n if (!productSpecification) {\r\n return null;\r\n }\r\n\r\n const averageRating = getBVAttributeValues(productSpecification, 'BVAverageOverallRating');\r\n const reviewsCount = getBVAttributeValues(productSpecification, 'BVTotalReviewCount');\r\n return (\r\n \r\n \r\n {!(productSpecification && (averageRating || reviewsCount)) && (\r\n \r\n Write the first review\r\n \r\n )}\r\n \r\n );\r\n};\r\n","import {\r\n getBuyboxProductDescription,\r\n getBuyboxShopSimilarButton,\r\n IErrorState,\r\n ShopSimiliarButtonType\r\n} from '@msdyn365-commerce-modules/buybox';\r\nimport {\r\n FinitePromiseQueue,\r\n FinitePromiseQueueError,\r\n getDeliveryOptionsForSelectedVariant,\r\n GetDeliveryOptionsForSelectedVariantInput,\r\n getPriceForSelectedVariant,\r\n getProductPageUrlSync,\r\n getProductAvailabilitiesForSelectedVariant,\r\n IPromiseQueue,\r\n PriceForSelectedVariantInput,\r\n ProductAvailabilitiesForSelectedVariantInput\r\n} from '@msdyn365-commerce-modules/retail-actions';\r\nimport { IBuyboxGetDimensionVariantAvailabilityActionData } from '../../data-actions/buybox-get-dimension-variants-availability-action';\r\nimport { getTelemetryObject, ITelemetryContent } from '@msdyn365-commerce-modules/utilities';\r\nimport { ProductDimensionFull } from '@msdyn365-commerce/commerce-entities';\r\nimport MsDyn365, { getUrlSync, ICoreContext } from '@msdyn365-commerce/core';\r\n\r\nimport {\r\n ProductDimensionValue,\r\n ProductPrice,\r\n SimpleProduct\r\n} from '@msdyn365-commerce/retail-proxy';\r\nimport { getAttributeValuesAsync, getDimensionValuesAsync, getVariantsByDimensionValuesAsync } from '@msdyn365-commerce/retail-proxy/dist/DataActions/ProductsDataActions.g';\r\nimport { AttributeValue, OrgUnitLocation } from '@msdyn365-commerce/retail-proxy/dist/Entities/CommerceTypes.g';\r\nimport classnames from 'classnames';\r\nimport dayjs from 'dayjs';\r\nimport * as React from 'react';\r\nimport Cookies from 'universal-cookie';\r\nimport _getViewPort from '../../Utilities/get-view-port';\r\nimport {\r\n IMFICartLine,\r\n IMFICLDeliveryScheduleParameters\r\n} from '../../actions/CoreProductDataServiceEntities.g';\r\nimport { IMFIItem, IMFIPromotion } from '../../actions/EyebrowMessageDataServiceEntities.g';\r\nimport getTryInStoreAction, { GetTryInStoreInfoInput } from '../../actions/get-try-in-store-info.action';\r\nimport { IMFITryInStore } from '../../actions/TryInStoreDataServiceEntities.g';\r\nimport getAllProductVariants, { BuyboxGetDimensionVariantAvailabilityInput } from '../../data-actions/buybox-get-all-variants-list';\r\nimport { IBuyboxGetDimensionPricingActionData } from '../../data-actions/buybox-get-dimension-pricing-action';\r\nimport { fireAnalyticsLink } from '../../Utilities/analytics/clickTrack';\r\nimport _getDeliveryByMessage from '../../Utilities/get-delivery-by-message';\r\nimport _getEyebrowMessage from '../../Utilities/get-eyebrow-message';\r\nimport _getInventoryQuantity from '../../Utilities/get-inventory-quantity';\r\nimport { buildProductBadge, parseBadgeData } from '../../Utilities/get-product-badge';\r\nimport { _coreProductATPCallForInventoryStatusForAllVariants, _getActivePrices } from '../../Utilities/mfrm-buybox-utils';\r\nimport { _getSoonestDeliveryDate } from '../../Utilities/product-search-result-utils';\r\nimport {\r\n getBuyboxAddToCart,\r\n getBuyBoxInventoryLabel,\r\n getBuyboxKeyInPrice,\r\n getBuyboxProductPrice,\r\n getBuyboxProductTitle,\r\n getQuantityLimitsMessages\r\n} from './common/buybox-components';\r\nimport { getBuyboxFindInStore } from './components/mfrm-buybox-find-in-store';\r\nimport { IMfrmBuyboxProps as IBuyboxModuleProps, IMfrmBuyboxResources } from './mfrm-buybox.props.autogenerated';\r\nimport { IVariantStockInfo } from './mfrm-buybox.view';\r\nimport { parseBrandName } from '../../Utilities/get-product-brand';\r\nimport { variantQueryStringName } from '../../Utilities/constants';\r\nimport { getZipCode } from '../../Utilities/get-zipcode';\r\nimport { withIsDesktop } from '../../common/hooks/useIsDesktop';\r\nimport {\r\n IBuyboxModulePropsExtended,\r\n IBuyboxCallbacksLite,\r\n IBuyboxStateExtended,\r\n IBuyboxViewPropsExtended,\r\n ISimpleProductExtended\r\n} from './types';\r\nimport { IMfrmBuyboxData } from './mfrm-buybox.data';\r\nimport { BuyboxShopSimilarItems } from './components/buybox-shop-similar-items';\r\nimport { BuyboxKeyInPrice } from './components/buybox-key-in-price';\r\nimport { BuyboxCustomerSatisfactionScore } from './components/buybox-customer-satisfaction-score/buybox-customer-satisfaction-score';\r\nimport { getProductSpecNumber } from '../../Utilities/getProductSpecificationDataAttributeValue';\r\nimport { BuyboxTryInStoreRedesign } from './components/buybox-try-in-store-redesign/buybox-try-in-store-redesign';\r\nimport { BuyboxProductRating } from './components/buybox-product-rating/buybox-product-rating';\r\n\r\nexport const getProductURLForUtag = (product: SimpleProduct | undefined, context: ICoreContext): string => {\r\n const productUrl = getProductPageUrlSync(product?.Name || '', product?.RecordId || 0, context?.actionContext, undefined);\r\n return `${context.request.url.requestUrl.origin}${productUrl}?variantid=${product?.RecordId}`;\r\n};\r\n\r\nexport const getProductSizeForUTag = (product: SimpleProduct | undefined): string | undefined => {\r\n //TODO remove magic numbers like 3 and use constant like DIMENSION_SIZE_TYPE\r\n return product?.Dimensions?.find(item => item.DimensionTypeValue === 3)?.DimensionValue?.Value?.toLowerCase();\r\n};\r\n\r\n/**\r\n * Buybox Module\r\n */\r\nclass Buybox extends React.PureComponent {\r\n /**\r\n * A queue of tasks of processing the changes in the dimensions.\r\n * Limit to two processes:\r\n * 1 - for the current process, which is under execution at the moment.\r\n * 2 - next process, which will process the latest version of data.\r\n * @remark Enqueueing new promises will discard the previous ones (except the one which is under processing).\r\n */\r\n //Constructor\r\n constructor(props: IBuyboxModulePropsExtended) {\r\n super(props);\r\n this.state = {\r\n errorState: {\r\n configureErrors: {}\r\n },\r\n quantity: 1,\r\n min: undefined,\r\n max: undefined,\r\n selectedProduct: undefined,\r\n productPrice: undefined,\r\n productDeliveryOptions: undefined,\r\n modalOpen: false,\r\n isUpdatingDimension: false,\r\n isUpdatingDeliveryOptions: false,\r\n smallParcelATCallMade: false,\r\n StatusATPCall: false,\r\n ATPCall: false,\r\n recordId: this.props.data.product.result?.RecordId,\r\n itemId: this.props.data.product.result?.ItemId,\r\n masterProductId: this.props.data.product.result?.MasterProductId,\r\n extensionProps: [],\r\n eyebrowMessageResultState: null,\r\n deliveryMessage: '',\r\n deliveryMessageATPResultState: null,\r\n inventoryStatusATPResultState: null,\r\n successfulATC: false,\r\n currentProduct: undefined,\r\n currentProductDimensions: undefined,\r\n variantAvailibilityList: [],\r\n variantAvailibilityUpdating: false,\r\n batchedAtpInventoryStatusData: null,\r\n variantIdForTracking: '',\r\n ecomAllVairantStockInfoConcatenated: [],\r\n showViewCartLink: false,\r\n isStoreDetailsOpen: false,\r\n zipCode: '',\r\n isEyeBrowLoading: true,\r\n isStoreLoading: true,\r\n preferredStore: {},\r\n tealiumRecordIdFor: ''\r\n };\r\n this.telemetryContent = getTelemetryObject(props.context.request.telemetryPageName!, props.friendlyName, props.telemetry);\r\n this.updateSuccessfulATC = this.updateSuccessfulATC.bind(this);\r\n this._setAllProductVariantsResult = this._setAllProductVariantsResult.bind(this);\r\n this.timer = null;\r\n this._updateUtagDataOnInitialLoad().catch(e => {\r\n throw e;\r\n });\r\n }\r\n //React Lifecycle methods\r\n public async componentDidMount(): Promise {\r\n const {\r\n data: {\r\n product: { result: product },\r\n productPrice,\r\n cart: { result: cart }\r\n },\r\n context: {\r\n request: { }\r\n }\r\n } = this.props;\r\n // set availability list for all variants\r\n if (this.props.data.productSpecificationData.result?.length) {\r\n this.props.data.allVariants.result &&\r\n this._updateAvailbilityForVariantsUpdated(\r\n this.props.data.allVariants.result,\r\n this.props,\r\n this.props.data.productSpecificationData.result\r\n );\r\n }\r\n this._updatePrice(await productPrice);\r\n if (product) {\r\n // check if the product is service or not by product type\r\n const PRODUCTASSERVICE = 2;\r\n\r\n if (product.ItemTypeValue === PRODUCTASSERVICE) {\r\n this.setState({ isServiceItem: true });\r\n }\r\n await this._updateQuantitiesInState(product);\r\n // VSI - Customization Start 48959\r\n if (product.MasterProductId) {\r\n await this._eyeBrowMessageAsyncFunc(true);\r\n }\r\n // VSI - Customization End 48959\r\n const canTryInStores = this._getProductSpecificationAttributeByKeyName('try in store');\r\n !canTryInStores && this.setState({ isStoreLoading: false });\r\n canTryInStores && (await this._tryInStoreAsyncCall());\r\n }\r\n if (\r\n this.props.data.product.result?.RecordId !== this.state.recordId ||\r\n this.props.data.product.result?.ItemId !== this.state.itemId\r\n ) {\r\n this.setState({\r\n recordId: this.props.data.product.result!.RecordId,\r\n masterProductId: this.props.data.product.result!.MasterProductId,\r\n itemId: this.props.data.product.result!.ItemId\r\n });\r\n }\r\n if (this.state.recordId && this.state.masterProductId && this.state.itemId) {\r\n this._setRecentlyViewProducts(this.state.recordId, this.state.masterProductId);\r\n }\r\n const newCartTotalItems = cart && cart.totalItemsInCart ? cart.totalItemsInCart : 0;\r\n if (newCartTotalItems && newCartTotalItems > 0) {\r\n this.setState({\r\n showViewCartLink: true\r\n });\r\n }\r\n else {\r\n this.setState({\r\n showViewCartLink: false\r\n });\r\n\r\n }\r\n const zipCode = getZipCode(this.props.context.actionContext);\r\n zipCode && this.setState({ zipCode: zipCode });\r\n\r\n const isSociEnabled = this.props.app.config.enableSociLocations || false;\r\n const preferredStore = isSociEnabled ? this._getSociPreferredStore() : this._getPreferredStore();\r\n (!preferredStore || Object.keys(preferredStore).length === 0) && this.setState({ isStoreLoading: false });\r\n preferredStore && this.setState({ preferredStore: preferredStore });\r\n }\r\n\r\n // tslint:disable-next-line: cyclomatic-complexity\r\n public async componentDidUpdate(prevProps: IBuyboxModuleProps, prevState: IBuyboxStateExtended): Promise {\r\n const {\r\n data: {\r\n product: { result: product },\r\n cart: { result: cart }\r\n }\r\n } = this.props;\r\n prevState.selectedProduct?.then(selProd => {\r\n this.state.selectedProduct?.then(async currSelProd => {\r\n if (selProd?.RecordId !== currSelProd?.RecordId) {\r\n this.setState({ smallParcelATCallMade: false });\r\n }\r\n });\r\n });\r\n\r\n if (\r\n this.props.data.product.result?.RecordId !== this.state.recordId ||\r\n this.props.data.product.result?.ItemId !== this.state.itemId\r\n ) {\r\n this.setState(\r\n {\r\n currentProduct: this.props.data.product.result,\r\n recordId: this.props.data.product.result!.RecordId,\r\n masterProductId: this.props.data.product.result!.MasterProductId,\r\n itemId: this.props.data.product.result!.ItemId,\r\n StatusATPCall: false,\r\n ATPCall: false\r\n },\r\n async () => {\r\n this.state.recordId && this._setRecentlyViewProducts(this.state.recordId, this.state.masterProductId);\r\n // VSI - Customization Start 48959\r\n const allVariants = this.props?.data?.allVariants?.result ? this.props?.data?.allVariants?.result : [];\r\n await this.setDefaultOOSVariant(allVariants);\r\n await this._eyeBrowMessageAsyncFunc(true);\r\n // VSI - Customization End 48959\r\n }\r\n );\r\n }\r\n const canTryInStores = this._getProductSpecificationAttributeByKeyName('try in store');\r\n const isSociEnabled = this.props.app.config.enableSociLocations || false;\r\n if (canTryInStores) {\r\n if (isSociEnabled) {\r\n await this._tryInStoreAsyncCall();\r\n } else {\r\n const preferredStore = this._getPreferredStore();\r\n if (preferredStore?.OrgUnitNumber && this.state.OrgUnitNumber && this.state.OrgUnitNumber !== preferredStore.OrgUnitNumber) {\r\n await this._tryInStoreAsyncCall();\r\n }\r\n }\r\n }\r\n\r\n if (this.state.extensionProps.length <= 0 && this.props.data.product.result) {\r\n if (this.props.data.product?.result?.ExtensionProperties && this.props.data.product?.result?.ExtensionProperties.length >= 1) {\r\n this.setState({ extensionProps: this.props.data.product.result.ExtensionProperties });\r\n }\r\n }\r\n const newCartTotalItems = cart && cart.totalItemsInCart ? cart.totalItemsInCart : 0;\r\n if (newCartTotalItems && newCartTotalItems > 0) {\r\n this.setState({\r\n showViewCartLink: true\r\n });\r\n }\r\n else {\r\n this.setState({\r\n showViewCartLink: false\r\n });\r\n }\r\n\r\n if (this.state.tealiumRecordIdFor === '' || (this.props.data.product.result?.RecordId !== this.state.recordId)) {\r\n for (const element of this.state.ecomAllVairantStockInfoConcatenated) {\r\n const [recordId, isInStock] = element && element.split('|');\r\n if (product?.RecordId.toString() === recordId && isInStock === '0') {\r\n // product found that is in stock then no need to loop through other values\r\n await this._sendProductDataToTealium(this.props, product);\r\n break;\r\n } else if (product?.RecordId.toString() === recordId && isInStock === '1') {\r\n break;\r\n }\r\n }\r\n }\r\n const zipCode = getZipCode(this.props.context.actionContext);\r\n zipCode && zipCode !== this.state.zipCode && this.setState({ zipCode: zipCode });\r\n\r\n if (this.state.zipCode !== prevState.zipCode) {\r\n this.props.data.allVariants.result && this.props.data.productSpecificationData.result?.length &&\r\n this._updateAvailbilityForVariantsUpdated(\r\n this.props.data.allVariants.result,\r\n this.props,\r\n this.props.data.productSpecificationData.result\r\n );\r\n }\r\n }\r\n\r\n public async componentWillUnmount(): Promise {\r\n if (this.timer) {\r\n clearTimeout(this.timer);\r\n }\r\n }\r\n\r\n //Public methods\r\n public updateSuccessfulATC = (): void => {\r\n this.setState({ successfulATC: true });\r\n this.timer = setTimeout(() => {\r\n this.setState({ successfulATC: false });\r\n }, 4500);\r\n };\r\n\r\n public extendAllProductVariants(\r\n allProductVariants: SimpleProduct[] | undefined,\r\n prices: IBuyboxGetDimensionPricingActionData[]\r\n ): ISimpleProductExtended[] | undefined {\r\n let extendedAllProductVariants: ISimpleProductExtended[] | undefined =\r\n allProductVariants &&\r\n allProductVariants?.map(variant => {\r\n let extendedObj: ISimpleProductExtended = { ...variant };\r\n variant.Dimensions?.forEach(dimension => {\r\n if (dimension.DimensionTypeValue === 3) {\r\n extendedObj = { productSizeName: dimension.DimensionValue?.Value, ...variant };\r\n }\r\n });\r\n return extendedObj;\r\n });\r\n extendedAllProductVariants =\r\n extendedAllProductVariants &&\r\n extendedAllProductVariants.map(variant => {\r\n let extendedObj: ISimpleProductExtended = { ...variant };\r\n prices?.forEach(dimensionPrice => {\r\n if (dimensionPrice?.discountAmount && dimensionPrice?.name === variant?.productSizeName) {\r\n const priceAfterDiscount = Math.round(dimensionPrice?.price - dimensionPrice?.discountAmount);\r\n extendedObj = {\r\n discount: dimensionPrice?.discountAmount,\r\n price: dimensionPrice?.price,\r\n priceAfterDiscount: priceAfterDiscount,\r\n ...variant\r\n };\r\n }\r\n });\r\n return extendedObj;\r\n });\r\n return extendedAllProductVariants;\r\n }\r\n\r\n //Public async methods\r\n public async getNextInventoryProduct(\r\n product: SimpleProduct | undefined,\r\n productSpecificationData: AttributeValue[] | undefined,\r\n allProductVariants: ISimpleProductExtended[] | undefined,\r\n context: ICoreContext<{\r\n [x: string]: any;\r\n }>,\r\n variantAvailibilityList: IBuyboxGetDimensionVariantAvailabilityActionData[]\r\n ): Promise {\r\n const {\r\n app: {\r\n config: { smallParcelAttributeKey }\r\n }\r\n } = context;\r\n\r\n const smallParcelVariantsListObj = {};\r\n variantAvailibilityList?.forEach(obj => {\r\n const key = obj?.variantID;\r\n smallParcelVariantsListObj[key] = obj;\r\n });\r\n\r\n const shippingInformation = productSpecificationData\r\n ?.find(attr => attr.Name?.trim() === smallParcelAttributeKey)\r\n ?.TextValue?.toLowerCase();\r\n const productType = this._getProductType(shippingInformation).toLowerCase();\r\n let isProductFound = false;\r\n let inStockLowestPriceVariant;\r\n\r\n // to check that if current loaded variant is OOS or not\r\n for (const element of this.state.ecomAllVairantStockInfoConcatenated) {\r\n const [recordId, isInStock] = element && element.split('|');\r\n if (product?.RecordId.toString() === recordId && isInStock === '0') {\r\n // product found that is in stock then no need to loop through other values\r\n inStockLowestPriceVariant = product;\r\n isProductFound = true;\r\n break;\r\n } else if (product?.RecordId.toString() === recordId && isInStock === '1') {\r\n break;\r\n }\r\n }\r\n\r\n // if current loaded variant is OOS then check the others\r\n !isProductFound &&\r\n allProductVariants?.filter(variantObj => {\r\n if (!isProductFound) {\r\n for (const element of this.state.ecomAllVairantStockInfoConcatenated) {\r\n const [recordId, isInStock] = element && element.split('|');\r\n if (variantObj?.RecordId.toString() === recordId && isInStock === '0') {\r\n // product found that is in stock then no need to loop through other values\r\n const smallParcelProduct = smallParcelVariantsListObj[variantObj?.RecordId];\r\n if (productType === 'small parcel') {\r\n if (smallParcelProduct?.isAvailable === true &&\r\n variantObj?.RecordId === smallParcelProduct?.variantID) {\r\n inStockLowestPriceVariant = variantObj;\r\n isProductFound = true;\r\n break;\r\n }\r\n } else {\r\n inStockLowestPriceVariant = variantObj;\r\n isProductFound = true;\r\n break;\r\n }\r\n } else if (variantObj.RecordId.toString() === recordId) {\r\n // isInStock is 0 but record id is matched then no need to loop through other values\r\n break;\r\n }\r\n }\r\n }\r\n });\r\n return inStockLowestPriceVariant;\r\n }\r\n\r\n public async makeCoreProductDeliveryMessage(str: string): Promise {\r\n const {\r\n data: {\r\n productSpecificationData: { result: productSpecificationData }\r\n },\r\n context: {\r\n app: {\r\n config: { smallParcelAttributeKey }\r\n }\r\n }\r\n } = this.props;\r\n const outOfStock = productSpecificationData?.find(\r\n attr => attr.Name?.trim().toLowerCase() === this.props.context.app.config.outOfStockProductKey?.trim().toLowerCase()\r\n )?.BooleanValue;\r\n const shippingInformation = productSpecificationData\r\n ?.find(attr => attr.Name?.trim() === smallParcelAttributeKey)\r\n ?.TextValue?.toLowerCase();\r\n\r\n if (this._getProductType(shippingInformation).toLowerCase() === 'core' && !this.state.ATPCall && !outOfStock) {\r\n this.setState({ ATPCall: true });\r\n await this.getDeliverySlotFromATP(true);\r\n } else if (this._getProductType(shippingInformation).toLowerCase() === 'small parcel' && !outOfStock) {\r\n this.setState({ StatusATPCall: true });\r\n // await this.getInventoryStatusCall(true);\r\n const inventoryStatusData = this.state.batchedAtpInventoryStatusData?.ATPInventoryStatusData\r\n ? this.state.batchedAtpInventoryStatusData?.ATPInventoryStatusData\r\n : null;\r\n let selectedObj = inventoryStatusData\r\n ? inventoryStatusData?.find(item => item.VariantRecordId?.toString() === this.state.currentProduct?.RecordId?.toString())\r\n : null;\r\n selectedObj = selectedObj ? { ...selectedObj, zipCode: inventoryStatusData![0]?.zipCode } : null;\r\n this.setState({ inventoryStatusATPResultState: selectedObj });\r\n }\r\n }\r\n\r\n public async getVariantID(updatedProduct?: SimpleProduct | undefined): Promise {\r\n const {\r\n data: {\r\n product: { result: product }\r\n },\r\n context: { actionContext, request }\r\n } = this.props;\r\n const { RecordId, ItemId } = updatedProduct && updatedProduct !== undefined ? updatedProduct : product || {};\r\n let variantId: string | undefined;\r\n if (product?.MasterProductId && product?.MasterProductId > 0) {\r\n const input = new BuyboxGetDimensionVariantAvailabilityInput(product.MasterProductId, request.apiSettings.channelId);\r\n const variantsResp: SimpleProduct[] = await getAllProductVariants(input, actionContext);\r\n for (let variantIter = 0; variantIter < variantsResp.length; variantIter++) {\r\n if (variantsResp[variantIter].RecordId === RecordId) {\r\n const ePropsVariant = variantsResp[variantIter].ExtensionProperties!;\r\n if (ePropsVariant?.length > 0) {\r\n for (let eIter = 0; eIter < ePropsVariant?.length; eIter++) {\r\n if (ePropsVariant[eIter].Key === 'RetailVariantId') {\r\n variantId = ePropsVariant[eIter].Value?.StringValue;\r\n break;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n } else {\r\n const variantofId = `V000${ItemId}`;\r\n variantId = variantofId?.slice(0, -1);\r\n }\r\n\r\n return variantId;\r\n }\r\n\r\n //Private methods\r\n private dimensionUpdateQueue: IPromiseQueue = new FinitePromiseQueue(2);\r\n private dimensions: { [id: number]: string } = {};\r\n private telemetryContent: ITelemetryContent;\r\n private timer: NodeJS.Timeout | null;\r\n\r\n private buyboxCallbacks: IBuyboxCallbacksLite = {\r\n updateQuantity: (newQuantity: number): boolean => {\r\n const errorState = { ...this.state.errorState };\r\n errorState.quantityError = undefined;\r\n errorState.otherError = undefined;\r\n if (this.state.quantity !== newQuantity) {\r\n fireAnalyticsLink({\r\n eventName: 'PDP-card-action',\r\n eventCategory: 'PDP Card Action',\r\n eventAction: 'Change Quantity',\r\n eventLabel: 'Change Quantity PDP',\r\n eventNoninteraction: 'false',\r\n generalConfig: { enhanced_action: 'change_quantity' }\r\n });\r\n }\r\n\r\n this.setState({ quantity: newQuantity, errorState: errorState });\r\n return true;\r\n },\r\n updateErrorState: (newErrorState: IErrorState): void => {\r\n this.setState({ errorState: newErrorState });\r\n },\r\n dimensionSelectedAsync: (selectedDimensionId: number, selectedDimensionValueId: string): Promise => {\r\n this.dimensions[selectedDimensionId] = selectedDimensionValueId;\r\n return this.dimensionUpdateQueue\r\n .enqueue(() => {\r\n return this._updateDimensions();\r\n })\r\n .catch((reason: any) => {\r\n // tslint:disable-line:no-any\r\n // Ignore discarded processes.\r\n if (reason !== FinitePromiseQueueError.ProcessWasDiscardedFromTheQueue) {\r\n throw reason;\r\n }\r\n });\r\n },\r\n getDropdownName: (dimensionType: number, resources: IMfrmBuyboxResources): string => {\r\n return this._getDropdownName(dimensionType, resources);\r\n },\r\n changeModalOpen: (isModalOpen: boolean): void => {\r\n this.setState({ modalOpen: isModalOpen });\r\n },\r\n changeUpdatingDimension: (isUpdatingDimension: boolean): void => {\r\n this.setState({ isUpdatingDimension: isUpdatingDimension });\r\n },\r\n /**\r\n * Update isUpdatingDeliveryOptions state.\r\n *\r\n * @param isUpdatingDeliveryOptions - The status of updating delivery options.\r\n */\r\n changeUpdatingDeliveryOptions: (isUpdatingDeliveryOptions: boolean): void => {\r\n this.setState({ isUpdatingDeliveryOptions });\r\n },\r\n updateKeyInPrice: (customPrice: number): void => {\r\n // Remove custom amount error when updating the custom price\r\n const errorState = { ...this.state.errorState };\r\n errorState.customAmountError = undefined;\r\n\r\n this.setState({ isPriceKeyedIn: true, keyInPriceAmount: customPrice, errorState: errorState });\r\n this._updatePrice(this.state.productPrice, customPrice);\r\n }\r\n };\r\n\r\n private _updateURLWithoutReloading(product: SimpleProduct | undefined) {\r\n if (this.props.context.app.config.queryBasedVariantSelection) {\r\n try {\r\n if (MsDyn365.isBrowser) {\r\n const queryParamValue = variantQueryStringName;\r\n const masterId = product?.MasterProductId;\r\n const currUrl = window.location.href;\r\n const urlWithIgnoredCase = new URL(currUrl.toString().toLocaleLowerCase());\r\n if (masterId && currUrl.indexOf(`${masterId}.p`) !== -1) {\r\n if (urlWithIgnoredCase.searchParams.has(queryParamValue)) {\r\n if (urlWithIgnoredCase.searchParams.get(queryParamValue) === product?.RecordId?.toString()) {\r\n return;\r\n }\r\n }\r\n urlWithIgnoredCase.searchParams.set(queryParamValue, product?.RecordId.toString() || '');\r\n window.history?.replaceState(window.history.state, '', urlWithIgnoredCase.toString()?.replace(urlWithIgnoredCase.host, window.location.host));\r\n } else if (masterId && currUrl.indexOf(`${masterId}.p`) === -1) {\r\n const productUrl = getProductPageUrlSync(\r\n product?.Name || '',\r\n masterId || 0,\r\n this.props.context && this.props.context.actionContext,\r\n undefined\r\n );\r\n if (urlWithIgnoredCase.searchParams.has(queryParamValue)) {\r\n if (urlWithIgnoredCase.searchParams.get(queryParamValue) === product?.RecordId?.toString()) {\r\n //pushstate only in this case, as here we need to update url with masterid\r\n window.history.pushState({}, '', urlWithIgnoredCase.search ? `${productUrl}${urlWithIgnoredCase.search}` : productUrl);\r\n return;\r\n }\r\n }\r\n urlWithIgnoredCase.searchParams.set(queryParamValue, product?.RecordId.toString() || '');\r\n window.history.pushState({}, '', urlWithIgnoredCase.search ? `${productUrl}${urlWithIgnoredCase.search}` : productUrl);\r\n }\r\n }\r\n } catch (error) {\r\n console.log('Error [_updateURLWithoutReloading]', error);\r\n }\r\n } else {\r\n const currUrl = window.location.href;\r\n let queryParams = '';\r\n if (currUrl.indexOf('?') !== -1) {\r\n queryParams = currUrl.split('?')[1];\r\n }\r\n const productUrl = getProductPageUrlSync(\r\n product?.Name || '',\r\n product?.RecordId || 0,\r\n this.props.context && this.props.context.actionContext,\r\n undefined\r\n );\r\n if (MsDyn365.isBrowser) {\r\n window.history.pushState({}, '', queryParams ? `${productUrl}?${queryParams}` : productUrl);\r\n }\r\n }\r\n }\r\n\r\n private _updateQueryParamVariantId = (variantId: Number | undefined) => {\r\n if (MsDyn365.isBrowser) {\r\n const currUrl = window.location.href;\r\n const urlWithIgnoredCase = new URL(currUrl.toString().toLocaleLowerCase());\r\n if (urlWithIgnoredCase.searchParams.has(variantQueryStringName)) {\r\n if (urlWithIgnoredCase.searchParams.get(variantQueryStringName) === variantId?.toString()) {\r\n return;\r\n }\r\n }\r\n // url is containing variantId\r\n urlWithIgnoredCase.searchParams.set(variantQueryStringName, variantId?.toString() || '');\r\n window.history?.replaceState(window.history.state, '', urlWithIgnoredCase.toString()?.replace(urlWithIgnoredCase.host, window.location.host));\r\n // window.history.pushState({}, '', urlWithIgnoredCase.href);\r\n }\r\n };\r\n private _setAllProductVariantsResult(result: IBuyboxGetDimensionVariantAvailabilityActionData[]) {\r\n this.setState({ variantAvailibilityList: result });\r\n }\r\n\r\n /** Method for setting cookies for recently viewed products */\r\n private _setRecentlyViewProducts = (recordId: number, masterProductId: number | undefined): void => {\r\n const cookies = new Cookies();\r\n const date = new Date(); // Now\r\n date.setDate(date.getDate() + 30); // Set now + 30 days as the new date\r\n\r\n const product = {\r\n masterProductId: masterProductId,\r\n recordId: recordId,\r\n expiry: date\r\n };\r\n\r\n interface IRecentlyViewedProducts {\r\n masterProductId: number;\r\n recordId: number;\r\n expiry: number;\r\n }\r\n let inserted = false;\r\n\r\n let recentlyViewedProductsStored = cookies.get(`RecentlyViewedProducts`);\r\n if (masterProductId !== undefined) {\r\n if (recentlyViewedProductsStored === undefined || recentlyViewedProductsStored.length === 0) {\r\n const recentlyViewedProducts = [];\r\n recentlyViewedProducts.push(product);\r\n cookies.set(`RecentlyViewedProducts`, recentlyViewedProducts, { path: '/' });\r\n } else {\r\n recentlyViewedProductsStored?.map((item: IRecentlyViewedProducts, index: number) => {\r\n if (item.masterProductId === masterProductId) {\r\n recentlyViewedProductsStored?.splice(index, 1);\r\n recentlyViewedProductsStored = [product]?.concat(recentlyViewedProductsStored);\r\n cookies.set(`RecentlyViewedProducts`, recentlyViewedProductsStored, { path: '/' });\r\n inserted = true;\r\n }\r\n });\r\n\r\n if (!inserted) {\r\n if (recentlyViewedProductsStored.length >= 6) {\r\n recentlyViewedProductsStored?.splice(0, 1);\r\n recentlyViewedProductsStored = [product]?.concat(recentlyViewedProductsStored);\r\n cookies.set(`RecentlyViewedProducts`, recentlyViewedProductsStored, { path: '/' });\r\n } else {\r\n recentlyViewedProductsStored = [product]?.concat(recentlyViewedProductsStored);\r\n cookies.set(`RecentlyViewedProducts`, recentlyViewedProductsStored, { path: '/' });\r\n }\r\n inserted = false;\r\n }\r\n }\r\n }\r\n };\r\n private _setSmallParcelATPCallMade = (atpCallMade: boolean) => {\r\n this.setState({ smallParcelATCallMade: atpCallMade });\r\n };\r\n private _setStatusATPCall = (atpCallMade: boolean) => {\r\n this.setState({ StatusATPCall: atpCallMade });\r\n };\r\n private _setZipCode = (zipCode: string) => {\r\n this.setState({ zipCode: zipCode });\r\n };\r\n private _setATPCall = (atpCallMade: boolean) => {\r\n this.setState({ ATPCall: atpCallMade });\r\n };\r\n\r\n private _updatePrice(newPrice: ProductPrice | undefined, customPrice: number | undefined = this.state.keyInPriceAmount): void {\r\n if (this.state.isCustomPriceSelected && newPrice) {\r\n newPrice.CustomerContextualPrice = customPrice;\r\n }\r\n this.setState({ productPrice: newPrice });\r\n this._updateUtagData(this.props.data?.product?.result, newPrice?.CustomerContextualPrice).catch(e => {\r\n throw e;\r\n });\r\n }\r\n\r\n private _updateDimensionValue = (\r\n productDimensionFull: ProductDimensionFull,\r\n newValueId: string | undefined\r\n ): ProductDimensionValue | undefined => {\r\n if (newValueId && productDimensionFull.DimensionValues) {\r\n return productDimensionFull.DimensionValues.find(dimension => dimension.RecordId === +newValueId);\r\n }\r\n\r\n return undefined;\r\n };\r\n\r\n private _getDropdownName = (dimensionType: number, resources: IMfrmBuyboxResources): string => {\r\n const isGiftCard = this.props.data.product.result?.IsGiftCard;\r\n\r\n switch (dimensionType) {\r\n case 1: // ProductDimensionType.Color\r\n return resources.productDimensionTypeColor;\r\n case 2: // ProductDimensionType.Configuration\r\n return resources.productDimensionTypeConfiguration;\r\n case 3: // ProductDimensionType.Size\r\n return resources.productDimensionTypeSize;\r\n case 4: // ProductDimensionType.Style\r\n return isGiftCard ? resources.productDimensionTypeAmount : resources.productDimensionTypeStyle;\r\n default:\r\n return '';\r\n }\r\n };\r\n\r\n private _getPreferredStore = (): OrgUnitLocation => {\r\n if (!MsDyn365.isBrowser || typeof localStorage === 'undefined') {\r\n return {};\r\n } else {\r\n const localStoragePreferredStore = localStorage.getItem('_mfrm__prefferedStore_');\r\n if (localStoragePreferredStore) {\r\n return JSON.parse(localStoragePreferredStore);\r\n } else {\r\n return {};\r\n }\r\n }\r\n };\r\n\r\n private _getSociPreferredStore = (): any => {\r\n let preferredStore = {};\r\n if (MsDyn365.isBrowser && localStorage.getItem('_mfrm__prefferedStore_')) {\r\n preferredStore = JSON.parse(localStorage.getItem('_mfrm__prefferedStore_') || '');\r\n } else {\r\n preferredStore = {};\r\n }\r\n return preferredStore;\r\n };\r\n\r\n private _getProductSpecificationAttributeByKeyName = (attrName: string): boolean | undefined => {\r\n return (\r\n this.props.data.productSpecificationData &&\r\n this.props.data.productSpecificationData.result?.find(attr => attr.Name?.trim().toLowerCase() === attrName.trim().toLowerCase())\r\n ?.BooleanValue\r\n );\r\n };\r\n\r\n private _getProductType = (shippingInformation: string | undefined): string => {\r\n if (shippingInformation && shippingInformation.toLowerCase() === 'delivery') {\r\n return 'Core';\r\n }\r\n if (shippingInformation && shippingInformation.toLowerCase() === 'parcel') {\r\n return 'Small Parcel';\r\n }\r\n if (shippingInformation && shippingInformation.toLowerCase() === 'drop ship') {\r\n return 'Drop Ship';\r\n }\r\n return '';\r\n };\r\n\r\n private _updateUtagDataOnInitialLoad = async () => {\r\n const productprice = await this.props.data.productPrice;\r\n const product = await this.props.data.product;\r\n const category = await this.props.data.categoryPaths;\r\n const allCategoriesArr = category;\r\n const categoryObj = allCategoriesArr && allCategoriesArr[allCategoriesArr?.length - 1];\r\n const categoryName: string | undefined = categoryObj ? `${categoryObj?.Name}` : undefined;\r\n const fallBackBrandAttribute = 'BRAND';\r\n const attribute = this.props.context.app.config.brandBackofficeAttributePdp || fallBackBrandAttribute;\r\n let productBrandName =\r\n (await this.props.data.productSpecificationData).find(\r\n currAttribute =>\r\n currAttribute.Name && currAttribute.Name.toLowerCase().trim() === attribute.toLowerCase().trim()\r\n )?.TextValue;\r\n productBrandName = productBrandName ? `${productBrandName}` : undefined;\r\n const productSize = product?.Dimensions?.find(item => item.DimensionTypeValue === 3)?.DimensionValue?.Value?.toLowerCase();\r\n const item = await this.props.data.listPageStateBuyBox;\r\n item.itemId = product.ItemId;\r\n item.variantId = this._getVariantIDOnLoad();\r\n item.name = product.Name;\r\n item.categoryName = categoryName;\r\n item.productBrandName = productBrandName;\r\n item.price = productprice.CustomerContextualPrice ? productprice.CustomerContextualPrice.toString() : product.BasePrice.toString();\r\n item.productUrl = getProductURLForUtag(product, this.props.context);\r\n item.productImageUrl = `${product?.PrimaryImageUrl}`;\r\n item.productSize = productSize;\r\n };\r\n\r\n private _getVariantIDOnLoad = (): string | undefined => {\r\n const {\r\n data: {\r\n product: { result: product }\r\n }\r\n } = this.props;\r\n const { RecordId, ItemId } = product || {};\r\n let variantId: string | undefined;\r\n const variantsResp: SimpleProduct[] | undefined = this.props.data.allProductVariants?.result;\r\n if (variantsResp) {\r\n for (let variantIter = 0; variantIter < variantsResp.length; variantIter++) {\r\n if (variantsResp[variantIter].RecordId === RecordId) {\r\n const ePropsVariant = variantsResp[variantIter].ExtensionProperties!;\r\n if (ePropsVariant?.length > 0) {\r\n for (let eIter = 0; eIter < ePropsVariant?.length; eIter++) {\r\n if (ePropsVariant[eIter].Key === 'RetailVariantId') {\r\n variantId = ePropsVariant[eIter].Value?.StringValue;\r\n break;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n } else {\r\n const variantofId = `V000${ItemId}`;\r\n variantId = variantofId?.slice(0, -1);\r\n }\r\n return variantId;\r\n };\r\n\r\n private _getProductAttributeUpdated = (productSpecificationData: AttributeValue[], props: IBuyboxModuleProps) => {\r\n // shippingInformation product attribute value\r\n const shippingInformationSmall = productSpecificationData\r\n .find(attr => attr.Name?.trim() === props.context.app.config.smallParcelAttributeKey)\r\n ?.TextValue?.toLowerCase();\r\n\r\n return this._getProductType(shippingInformationSmall);\r\n };\r\n\r\n //private async methods\r\n // tslint:disable-next-line: max-line-length\r\n private _updateAvailbilityForVariantsUpdated = async (\r\n allVariants: IBuyboxGetDimensionVariantAvailabilityActionData[],\r\n props: IBuyboxModuleProps,\r\n productSpecificationData: AttributeValue[]\r\n ) => {\r\n const variantsResult: IBuyboxGetDimensionVariantAvailabilityActionData[] = allVariants;\r\n const availableVariantIDs: number[] = [];\r\n const itemId = props?.data?.product?.result?.ItemId;\r\n const {\r\n context: {\r\n app: {\r\n config: {\r\n eComAllVariantsOOSMultiAttr,\r\n ecomAllVairantStockInfoKey,\r\n ecomAllVairantStockInfoKey1,\r\n ecomAllVairantStockInfoKey2,\r\n ecomAllVairantStockInfoKey3\r\n }\r\n }\r\n }\r\n } = this.props;\r\n let count = 0;\r\n if (this.state.masterProductId) {\r\n //calling this to get masterProductAttribute data when PDP is loading from variantId\r\n productSpecificationData = await getAttributeValuesAsync(\r\n { callerContext: props.context.actionContext, queryResultSettings: {} },\r\n this.state.masterProductId,\r\n props.context.request.apiSettings.channelId,\r\n 0\r\n );\r\n }\r\n let ecomAllVairantStockInfoConcatenated: any[] = [];\r\n // for backward compatiblity\r\n if (!eComAllVariantsOOSMultiAttr || eComAllVariantsOOSMultiAttr === undefined) {\r\n try {\r\n const eComJsonData = productSpecificationData.find(attr => attr.Name?.trim() === ecomAllVairantStockInfoKey)?.TextValue;\r\n const newAllVariantStockInfo = eComJsonData && JSON.parse(eComJsonData);\r\n ecomAllVairantStockInfoConcatenated = [\r\n ...ecomAllVairantStockInfoConcatenated,\r\n ...newAllVariantStockInfo.VariantList.map(\r\n (item: IVariantStockInfo) => `${item.VariantRecID}|${item.OutOfStock ? '1' : '0'}`\r\n )\r\n ];\r\n } catch (error) {\r\n this.telemetryContent.telemetry?.error(`Error ${error} [OOS Checking] ecomAllVairantStockInfoKey`);\r\n console.log(`Error ${error} [OOS Checking] ecomAllVairantStockInfoKey`);\r\n }\r\n } else {\r\n const ecomVairantStockInfoKey1 = ecomAllVairantStockInfoKey1 ? ecomAllVairantStockInfoKey1 : 'EcomAllVariantOOSInfo1';\r\n const ecomVairantStockInfoKey2 = ecomAllVairantStockInfoKey2 ? ecomAllVairantStockInfoKey2 : 'EcomAllVariantOOSInfo2';\r\n const ecomVairantStockInfoKey3 = ecomAllVairantStockInfoKey3 ? ecomAllVairantStockInfoKey3 : 'EcomAllVariantOOSInfo3';\r\n const ecomAllVairantStockInfo1 = productSpecificationData.find(attr => attr.Name?.trim() === ecomVairantStockInfoKey1)\r\n ?.TextValue;\r\n const ecomAllVairantStockInfo2 = productSpecificationData.find(attr => attr.Name?.trim() === ecomVairantStockInfoKey2)\r\n ?.TextValue;\r\n const ecomAllVairantStockInfo3 = productSpecificationData.find(attr => attr.Name?.trim() === ecomVairantStockInfoKey3)\r\n ?.TextValue;\r\n\r\n if (ecomAllVairantStockInfo1) {\r\n try {\r\n ecomAllVairantStockInfoConcatenated = [...ecomAllVairantStockInfoConcatenated, ...JSON.parse(ecomAllVairantStockInfo1)];\r\n } catch (error) {\r\n this.telemetryContent.telemetry?.error(`Error ${error} [OOS Checking] ecomAllVairantStockInfoKey1`);\r\n console.log(`Error ${error} [OOS Checking] ecomAllVairantStockInfoKey1`);\r\n }\r\n }\r\n if (ecomAllVairantStockInfo2) {\r\n try {\r\n ecomAllVairantStockInfoConcatenated = [...ecomAllVairantStockInfoConcatenated, ...JSON.parse(ecomAllVairantStockInfo2)];\r\n } catch (error) {\r\n this.telemetryContent.telemetry?.error(`Error ${error} [OOS Checking] ecomAllVairantStockInfoKey2`);\r\n console.log(`Error ${error} [OOS Checking] ecomAllVairantStockInfoKey2`);\r\n }\r\n }\r\n if (ecomAllVairantStockInfo3) {\r\n try {\r\n ecomAllVairantStockInfoConcatenated = [...ecomAllVairantStockInfoConcatenated, ...JSON.parse(ecomAllVairantStockInfo3)];\r\n } catch (error) {\r\n this.telemetryContent.telemetry?.error(`Error ${error} [OOS Checking] ecomAllVairantStockInfoKey3`);\r\n console.log(`Error ${error} [OOS Checking] ecomAllVairantStockInfoKey3`);\r\n }\r\n }\r\n }\r\n this.setState({ ecomAllVairantStockInfoConcatenated });\r\n try {\r\n variantsResult &&\r\n variantsResult.forEach(async variant => {\r\n // get specfication data for each variant\r\n count++;\r\n if (!productSpecificationData) {\r\n return;\r\n }\r\n let outOfStockBoolean = null;\r\n for (let i = 0; i < ecomAllVairantStockInfoConcatenated.length; i++) {\r\n if (\r\n ecomAllVairantStockInfoConcatenated &&\r\n ecomAllVairantStockInfoConcatenated[i].split('|')[0] === variant.variantID.toString()\r\n ) {\r\n outOfStockBoolean = !!Number(ecomAllVairantStockInfoConcatenated[i].split('|')[1]);\r\n break;\r\n }\r\n }\r\n outOfStockBoolean ? (variant.isAvailable = false) : (variant.isAvailable = true);\r\n if (outOfStockBoolean === null || outOfStockBoolean === undefined) {\r\n variant.isAvailable = false;\r\n }\r\n // get product type for each\r\n const productType = this._getProductAttributeUpdated(productSpecificationData, props);\r\n // set availability for each\r\n if (productType === 'Core') {\r\n if (outOfStockBoolean) {\r\n variant.isAvailable = false;\r\n } else {\r\n variant.isAvailable = true;\r\n }\r\n } else if (productType === 'Small Parcel') {\r\n if (outOfStockBoolean) {\r\n variant.isAvailable = false;\r\n } else {\r\n availableVariantIDs.push(variant.variantID);\r\n variant.isAvailable = true;\r\n }\r\n }\r\n else if (productType === 'Drop Ship') {\r\n if (outOfStockBoolean) {\r\n variant.isAvailable = false;\r\n } else {\r\n variant.isAvailable = true;\r\n }\r\n }\r\n // update the state\r\n if (availableVariantIDs.length > 0 && count === variantsResult.length) {\r\n const batchedAtp = await _coreProductATPCallForInventoryStatusForAllVariants(\r\n props,\r\n availableVariantIDs,\r\n itemId,\r\n variantsResult\r\n );\r\n this.setState({ batchedAtpInventoryStatusData: batchedAtp });\r\n await this.setDefaultOOSVariant(variantsResult);\r\n } else if (count === variantsResult.length) {\r\n await this.setDefaultOOSVariant(variantsResult);\r\n }\r\n\r\n this.setState({ variantAvailibilityList: variantsResult });\r\n });\r\n } catch (error) {\r\n console.error(\"Variant result is not defined or empty\", error);\r\n }\r\n\r\n };\r\n\r\n private _updateUtagData = async (updatedProduct: SimpleProduct | undefined, updatedPrice?: number) => {\r\n const variantId = await this.getVariantID(updatedProduct);\r\n const price = await this.props.data.productPrice;\r\n const finalPrice = updatedPrice ? updatedPrice : price?.CustomerContextualPrice;\r\n try {\r\n // @ts-ignore\r\n if (utag.data) {\r\n // @ts-ignore\r\n utag.data = {\r\n // @ts-ignore\r\n ...utag.data,\r\n product_price: [`${finalPrice}`],\r\n product_variant: [`${variantId}`],\r\n product_url: [getProductURLForUtag(updatedProduct, this.props.context)],\r\n product_image_url: [`${updatedProduct?.PrimaryImageUrl}`],\r\n product_size: [getProductSizeForUTag(updatedProduct)]\r\n };\r\n }\r\n // @ts-ignore\r\n if (utag_data) {\r\n // @ts-ignore\r\n utag_data = {\r\n // @ts-ignore\r\n ...utag_data,\r\n product_price: [`${finalPrice}`],\r\n product_variant: [`${variantId}`],\r\n product_url: [getProductURLForUtag(updatedProduct, this.props.context)],\r\n product_image_url: [`${updatedProduct?.PrimaryImageUrl}`],\r\n product_size: [getProductSizeForUTag(updatedProduct)]\r\n };\r\n }\r\n } catch (error) {\r\n console.log(error, '[utag_data not found]');\r\n }\r\n };\r\n\r\n private _sendProductDataToTealium = async (props: IBuyboxModuleProps, product: SimpleProduct | undefined) => {\r\n const {\r\n data: {\r\n productSpecificationData: { result: productSpecificationData },\r\n productPrice,\r\n categoryPaths\r\n },\r\n context: {\r\n request: { }\r\n },\r\n app: {\r\n config: { brandBackofficeAttributePdp }\r\n }\r\n } = props;\r\n this.setState({ tealiumRecordIdFor: product?.RecordId.toString() });\r\n const allCategoriesArr = categoryPaths?.result;\r\n const categoryObj = allCategoriesArr && allCategoriesArr[allCategoriesArr?.length - 1];\r\n const categoryName: string | undefined = categoryObj ? `${categoryObj?.Name}` : undefined;\r\n const fallBackBrandAttribute = 'VENDOR BRAND';\r\n const attribute = brandBackofficeAttributePdp || fallBackBrandAttribute;\r\n let productBrandName =\r\n productSpecificationData &&\r\n productSpecificationData?.find(\r\n currAttribute => currAttribute.Name && currAttribute.Name.toLowerCase().trim() === attribute.toLowerCase().trim()\r\n )?.TextValue;\r\n productBrandName = productBrandName ? `${productBrandName}` : undefined;\r\n const variantsResp = await this.getVariantID();\r\n // @ts-ignore\r\n if ('utag' in window) {\r\n const { ItemId, Name } = product || {};\r\n // @ts-ignore\r\n // tslint:disable-next-line: object-literal-key-quotes\r\n utag.link({\r\n event: 'product-detail-view',\r\n event_category: 'ecommerce',\r\n event_action: 'product detail view',\r\n enhanced_action: 'detail',\r\n event_label: `${ItemId}:${Name}`,\r\n event_noninteraction: 'true',\r\n product_id: [`${ItemId}`],\r\n product_name: [`${Name}`],\r\n product_category: [categoryName],\r\n product_brand: [productBrandName],\r\n product_variant: [variantsResp],\r\n product_price: [`${(await productPrice)?.CustomerContextualPrice}`],\r\n product_url: [getProductURLForUtag(product, this.props.context)],\r\n product_image_url: [`${product?.PrimaryImageUrl}`],\r\n product_size: [getProductSizeForUTag(product)]\r\n });\r\n }\r\n // VSI - Customization Start - 47480\r\n this.setState({ variantIdForTracking: variantsResp ? variantsResp : '' });\r\n // VSI - Customization End - 47480\r\n };\r\n\r\n private async setDefaultOOSVariant(\r\n variantAvailibilityList: IBuyboxGetDimensionVariantAvailabilityActionData[],\r\n updatedProductSpecificationData?: AttributeValue[] | undefined\r\n ) {\r\n if (variantAvailibilityList?.length > 0) {\r\n const {\r\n data: {\r\n product: { result: product },\r\n allProductVariants: { result: allProductVariants },\r\n productSpecificationData: { result: productSpecificationData },\r\n productDimensions: { result: productDimensions },\r\n dimensionPrices: { result: dimensionPrices }\r\n },\r\n context: {\r\n actionContext,\r\n request: {\r\n apiSettings: { channelId }\r\n }\r\n }\r\n } = this.props;\r\n const prodSpecficationData = updatedProductSpecificationData ? updatedProductSpecificationData : productSpecificationData;\r\n\r\n // VSI - Customization Start 42852\r\n const prices: IBuyboxGetDimensionPricingActionData[] | undefined =\r\n dimensionPrices && (await _getActivePrices(dimensionPrices, actionContext));\r\n let extendedAllProductVariants: ISimpleProductExtended[] | undefined =\r\n prices && prices[0].discountAmount ? this.extendAllProductVariants(allProductVariants, prices) : allProductVariants;\r\n extendedAllProductVariants =\r\n extendedAllProductVariants &&\r\n extendedAllProductVariants.sort(\r\n (a, b) =>\r\n (a?.priceAfterDiscount ? a?.priceAfterDiscount : a?.Price) -\r\n (b?.priceAfterDiscount ? b?.priceAfterDiscount : b?.Price)\r\n );\r\n const updatedProduct = await this.getNextInventoryProduct(\r\n product,\r\n prodSpecficationData,\r\n extendedAllProductVariants,\r\n this.props.context,\r\n this.state.variantAvailibilityList ?? variantAvailibilityList\r\n );\r\n if (updatedProduct && updatedProduct.Dimensions && updatedProduct.Dimensions.length > 0) {\r\n const dimensions: ProductDimensionFull[] = [];\r\n for (const dimension of updatedProduct.Dimensions) {\r\n const dimensionValues = await getDimensionValuesAsync(\r\n { callerContext: actionContext, queryResultSettings: {} },\r\n updatedProduct.MasterProductId ? updatedProduct.MasterProductId : updatedProduct.RecordId,\r\n channelId,\r\n dimension.DimensionTypeValue,\r\n [],\r\n null\r\n );\r\n const fullDimension = {\r\n ...dimension,\r\n DimensionValues: dimensionValues\r\n };\r\n dimensions.push(fullDimension);\r\n }\r\n this.setState({\r\n currentProduct: updatedProduct,\r\n currentProductDimensions: dimensions\r\n });\r\n // updated Product is a different product than product in props\r\n if (product?.RecordId !== updatedProduct?.RecordId) {\r\n await this._updateDimensions(updatedProduct, dimensions);\r\n await this._updateUtagData(updatedProduct);\r\n } else {\r\n this._updateURLWithoutReloading(updatedProduct);\r\n }\r\n } else {\r\n console.log('updated product doesnt have dimesions=>');\r\n this.setState({\r\n currentProduct: product,\r\n currentProductDimensions: productDimensions\r\n });\r\n this._updateURLWithoutReloading(product);\r\n await this._sendProductDataToTealium(this.props, product);\r\n }\r\n }\r\n }\r\n\r\n private async _isOrderQuantityLimitsFeatureEnabled(): Promise {\r\n const defaultOrderQuantityLimitsFeatureConfig = this.props.context?.request?.app?.platform?.enableDefaultOrderQuantityLimits;\r\n if (defaultOrderQuantityLimitsFeatureConfig === 'none') {\r\n return false;\r\n }\r\n\r\n if (defaultOrderQuantityLimitsFeatureConfig === 'all') {\r\n return true;\r\n }\r\n let customerInfo;\r\n try {\r\n customerInfo = await this.props.data.customerInformation;\r\n } catch (error) {\r\n // this.props.telemetry.information(error);\r\n this.props.telemetry.debug('Unable to receive Customer Information. May be user is not authorized');\r\n return false;\r\n }\r\n\r\n return (\r\n customerInfo &&\r\n ((defaultOrderQuantityLimitsFeatureConfig === 'b2b' && customerInfo.IsB2b) ||\r\n (defaultOrderQuantityLimitsFeatureConfig === 'b2c' && !customerInfo.IsB2b))\r\n );\r\n }\r\n\r\n private async _updateQuantitiesInState(product: SimpleProduct): Promise {\r\n const isOrderQuantityLimitsFeatureEnabled = await this._isOrderQuantityLimitsFeatureEnabled();\r\n if (isOrderQuantityLimitsFeatureEnabled && product) {\r\n this.setState({\r\n quantity: product.Behavior?.DefaultQuantity || 1,\r\n min: product.Behavior?.MinimumQuantity || 1,\r\n // If max by feature in default order settings is not defined then use max from site settings or default max 10.\r\n max:\r\n product.Behavior?.MaximumQuantity && product.Behavior?.MaximumQuantity > 0\r\n ? product.Behavior?.MaximumQuantity\r\n : this.props.context.app.config.maxQuantityForCartLineItem || 10\r\n });\r\n } else {\r\n this.setState({\r\n min: 1,\r\n max: this.props.context.app.config.maxQuantityForCartLineItem || 10\r\n });\r\n }\r\n }\r\n\r\n private async _updateVariantIDForTracking(): Promise {\r\n const variantId = await this.getVariantID();\r\n this.setState({ variantIdForTracking: variantId ? variantId : '' });\r\n }\r\n\r\n private _eyeBrowMessageAsyncFunc = async (isCached: boolean): Promise => {\r\n const {\r\n context,\r\n data: {\r\n product: { result }\r\n }\r\n } = this.props;\r\n const priceGroupForAPICall = context.app.config.priceGroup;\r\n if (priceGroupForAPICall) {\r\n const productIdsArray: IMFIItem[] | undefined = [];\r\n const eyebrowMessageObj: IMFIItem = {\r\n ItemId: result?.ItemId === undefined ? '' : result?.ItemId,\r\n DistinctProductVariant: result?.RecordId?.toString()\r\n };\r\n productIdsArray.push(eyebrowMessageObj);\r\n if (productIdsArray && productIdsArray.length > 0) {\r\n const eyebrowMessageResult = _getEyebrowMessage(productIdsArray, context, isCached, 'pdp');\r\n eyebrowMessageResult\r\n ?.then((data: IMFIPromotion[] | null) => {\r\n this.setState({ eyebrowMessageResultState: data, isEyeBrowLoading: false });\r\n })\r\n .catch(e => {\r\n this.setState({ isEyeBrowLoading: false });\r\n console.log('Error', e);\r\n });\r\n }\r\n } else {\r\n this.setState({ isEyeBrowLoading: false });\r\n }\r\n };\r\n\r\n private getDeliverySlotFromATP = async (isCached: boolean): Promise => {\r\n const itemLinesArray = [];\r\n const {\r\n data: {\r\n product: { result: product }\r\n },\r\n context: {\r\n app: {\r\n config: { weeksPDPforATPCall }\r\n }\r\n }\r\n } = this.props;\r\n const cookies = new Cookies();\r\n const zipcode = cookies.get('zip_code');\r\n if (product) {\r\n const itemLines: IMFICartLine = {\r\n ItemId: product.ItemId,\r\n Quantity: 1,\r\n VariantRecordId: product.RecordId.toString()\r\n };\r\n itemLinesArray.push(itemLines);\r\n const currentDate = Date.now();\r\n const requestBody: IMFICLDeliveryScheduleParameters = {\r\n InventoryType: 'Delivery',\r\n Weeks: weeksPDPforATPCall,\r\n StoreId: '',\r\n Page: 'pdp',\r\n RequestedDate: dayjs(currentDate).format('MM/DD/YYYY'),\r\n ZipCode: zipcode,\r\n ItemLines: itemLinesArray\r\n };\r\n _getDeliveryByMessage(requestBody, this.props.context, isCached)\r\n .then(result => {\r\n if (result !== undefined && result?.ATPInventoryData) {\r\n // setCoreProductATPData(result?.ATPInventoryData);\r\n this.setState({\r\n deliveryMessageATPResultState: result?.ATPInventoryData\r\n });\r\n }\r\n })\r\n .catch(e => {\r\n console.log('Error', e);\r\n });\r\n }\r\n };\r\n\r\n private _tryInStoreAsyncCall = async () => {\r\n const {\r\n context: { actionContext, app },\r\n data: {\r\n product: { result: product }\r\n }\r\n } = this.props;\r\n // VSI Customization - Start\r\n const isSociEnabled = this.props.app.config.enableSociLocations || false;\r\n const preferredStore = this._getPreferredStore();\r\n const sociPreferredStore = this._getSociPreferredStore();\r\n\r\n // Todo: Zip code is being modified as we are not getting proper zip code.. It will be reverted back as it get modified/validate from backoffice\r\n const zipCodeModified = preferredStore && (!isSociEnabled ? preferredStore.Zip?.split('-')[0] : preferredStore?.Zip);\r\n const projectMetaSoci = isSociEnabled && sociPreferredStore?.project_meta ? JSON.parse(sociPreferredStore?.project_meta) : '';\r\n const sociStore = projectMetaSoci ? projectMetaSoci['Corporate ID'] : '';\r\n const sociStoreID = sociStore && (sociStore?.length > 6 ? sociStore : `000000${sociStore}`?.slice(-6));\r\n const StoreId = isSociEnabled ? sociStoreID : preferredStore?.OrgUnitNumber!;\r\n if (StoreId && zipCodeModified && product?.ItemId?.toString()) {\r\n const tryInStoreProductIDs: IMFITryInStore = {\r\n ZipCode: zipCodeModified,\r\n StoreId: isSociEnabled ? sociStoreID : preferredStore?.OrgUnitNumber!,\r\n Products: product?.ItemId?.toString(),\r\n Limit: app.config.tryInStoreLimit || 10,\r\n Radius: app.config.tryInStoreLookupRadius || 50\r\n };\r\n const getTryInStoreInfoInput = new GetTryInStoreInfoInput(tryInStoreProductIDs);\r\n try {\r\n const response = await getTryInStoreAction(getTryInStoreInfoInput, actionContext);\r\n this.setState({\r\n tryInStoresResults: response,\r\n OrgUnitNumber: isSociEnabled ? sociStoreID : preferredStore && preferredStore.OrgUnitNumber ? preferredStore.OrgUnitNumber : '0',\r\n isStoreLoading: false\r\n });\r\n } catch (error) {\r\n this.setState({ isStoreLoading: false });\r\n console.log(error);\r\n }\r\n }\r\n };\r\n // tslint:disable-next-line:max-func-body-length\r\n private _updateDimensions = async (updatedProduct?: SimpleProduct, dimensions?: ProductDimensionFull[] | undefined): Promise => {\r\n const {\r\n data: {\r\n product: { result: prevProduct },\r\n productDimensions: { result: dimensionsArr }\r\n },\r\n context: {\r\n actionContext,\r\n request: {\r\n apiSettings: { channelId }\r\n }\r\n }\r\n } = this.props;\r\n const product = updatedProduct ? updatedProduct : prevProduct;\r\n const productDimensions = dimensions ? dimensions : dimensionsArr;\r\n if (!product || !productDimensions) {\r\n return;\r\n }\r\n\r\n const dimensionsToUpdate: { [id: number]: string } = { ...this.dimensions };\r\n // this._setSmallParcelATPCallMade(true);\r\n this.setState({ isUpdatingDimension: true, isUpdatingDeliveryOptions: true });\r\n // Step 1: Clear error state to display relevant errors\r\n if (this.state.errorState.otherError || this.state.errorState.quantityError) {\r\n const clearErrorState = { ...this.state.errorState };\r\n clearErrorState.otherError = undefined;\r\n if (this.state.errorState.errorHost === 'ADDTOCART') {\r\n clearErrorState.quantityError = undefined;\r\n clearErrorState.errorHost = undefined;\r\n }\r\n this.setState({ errorState: clearErrorState });\r\n }\r\n\r\n // Step 2: Clear any errors indicating the dimension wasn't selected\r\n for (const key of Object.keys(dimensionsToUpdate)) {\r\n if (this.state.errorState.configureErrors[key]) {\r\n const errorState = { ...this.state.errorState };\r\n errorState.configureErrors[key] = undefined;\r\n\r\n this.setState({ errorState: errorState });\r\n }\r\n }\r\n\r\n // Step 3, Build the actually selected dimensions, prioritizing the information in state\r\n // over the information in data\r\n const nextProductDimensions: ProductDimensionFull[] = [];\r\n const mappedDimensions =\r\n productDimensions?.length > 0\r\n ? productDimensions\r\n ?.map(dimension => {\r\n const obj = dimension && {\r\n DimensionTypeValue: dimension.DimensionTypeValue,\r\n DimensionValue:\r\n this._updateDimensionValue(dimension, dimensionsToUpdate[dimension.DimensionTypeValue]) ??\r\n dimension.DimensionValue ?? product.Dimensions?.find(dim => dim.DimensionTypeValue === dimension.DimensionTypeValue)?.DimensionValue,\r\n ExtensionProperties: dimension.ExtensionProperties,\r\n DimensionValues: dimension.DimensionValues\r\n };\r\n nextProductDimensions.push(obj);\r\n return (\r\n dimension && {\r\n DimensionTypeValue: dimension.DimensionTypeValue,\r\n DimensionValue:\r\n this._updateDimensionValue(dimension, dimensionsToUpdate[dimension.DimensionTypeValue]) ??\r\n dimension.DimensionValue ?? product.Dimensions?.find(dim => dim.DimensionTypeValue === dimension.DimensionTypeValue)?.DimensionValue,\r\n ExtensionProperties: dimension.ExtensionProperties\r\n }\r\n );\r\n })\r\n .filter(dimension => {\r\n return dimension?.DimensionValue;\r\n })\r\n : [];\r\n const variants = getVariantsByDimensionValuesAsync(\r\n { callerContext: actionContext, queryResultSettings: {} },\r\n product.MasterProductId ? product.MasterProductId : product.RecordId,\r\n channelId,\r\n mappedDimensions\r\n );\r\n\r\n // Step 4. Use these dimensions hydrate the product. Wrap this in a promise\r\n // so that places like add to cart can await it\r\n const selectedProduct = await variants;\r\n this.props.context.app.config.queryBasedVariantSelection && this._updateQueryParamVariantId(selectedProduct[0]?.RecordId);\r\n\r\n this.setState({ selectedProduct: variants[0] });\r\n const variantProduct = selectedProduct[0];\r\n\r\n if (variantProduct) {\r\n // Step 5. Use these dimensions hydrate the inventory. Wrap this in a promise\r\n // so that places like add to cart can await it\r\n const newAvailableQuantity = await getProductAvailabilitiesForSelectedVariant(\r\n new ProductAvailabilitiesForSelectedVariantInput(variantProduct.RecordId, channelId),\r\n actionContext\r\n );\r\n\r\n const isCustompriceSelected =\r\n variantProduct &&\r\n variantProduct.Dimensions &&\r\n variantProduct.Dimensions.find(\r\n dimension =>\r\n dimension.DimensionTypeValue === 4 && dimension.DimensionValue && dimension.DimensionValue.Value === 'Custom'\r\n );\r\n if (isCustompriceSelected) {\r\n this.setState({ isCustomPriceSelected: true });\r\n } else {\r\n // Remove custom amount error when unselect the custom amount\r\n const errorState = { ...this.state.errorState };\r\n errorState.customAmountError = undefined;\r\n\r\n this.setState({ isCustomPriceSelected: false, isPriceKeyedIn: false, errorState: errorState });\r\n }\r\n\r\n if (newAvailableQuantity?.length) {\r\n this.setState({ productAvailableQuantity: newAvailableQuantity[0] });\r\n } else {\r\n this.setState({ productAvailableQuantity: undefined });\r\n }\r\n\r\n // Step 6. Use these dimensions hydrate the product price.\r\n const newPrice = await getPriceForSelectedVariant(\r\n new PriceForSelectedVariantInput(variantProduct.RecordId, channelId),\r\n actionContext\r\n );\r\n\r\n if (newPrice) {\r\n this._updatePrice(newPrice);\r\n }\r\n\r\n // const RetailMulitplePickupMFeatureState = this.props.data.featureState.result?.find(featureState => featureState.Name === 'Dynamics.AX.Application.RetailMultiplePickupDeliveryModeFeature');\r\n // Step 7. Use these dimensions hydrate the product delivery options.\r\n const newDeliveryOptions = await getDeliveryOptionsForSelectedVariant(\r\n new GetDeliveryOptionsForSelectedVariantInput(\r\n variantProduct.RecordId,\r\n channelId,\r\n undefined,\r\n undefined\r\n // RetailMulitplePickupMFeatureState?.IsEnabled\r\n ),\r\n actionContext\r\n );\r\n\r\n if (newDeliveryOptions) {\r\n this.setState({ productDeliveryOptions: newDeliveryOptions });\r\n }\r\n this.setState({\r\n currentProduct: variantProduct,\r\n currentProductDimensions: nextProductDimensions\r\n });\r\n await this._updateQuantitiesInState(variantProduct);\r\n await this.makeCoreProductDeliveryMessage('ATP update dimnesions');\r\n // VSI - Customization Start - 47480\r\n await this._updateVariantIDForTracking();\r\n // VSI - Customization End - 47480\r\n // VSI - Customization Start - 27818\r\n // VSI - Customization End - 27818\r\n // VSI - Customization Start - 42674\r\n this._updateURLWithoutReloading(variantProduct);\r\n // VSI - Customization End - 42674\r\n }\r\n };\r\n\r\n private findPreferredStore = async (): Promise => {\r\n const {\r\n data: {\r\n storeSelectorStateManager: { result: storeSelectorStateManager }\r\n },\r\n modules\r\n } = this.props;\r\n if (!storeSelectorStateManager) {\r\n return;\r\n }\r\n let storeSelectorId: string = '';\r\n if (modules && Object.keys(modules).length > 0 && modules.mfrmStoreSelector && modules.mfrmStoreSelector.length > 0) {\r\n storeSelectorId = modules.mfrmStoreSelector[0].id;\r\n }\r\n MsDyn365.isBrowser && document.body.classList.add('modal-store-locator-toggle-pdp');\r\n this.setState({ isStoreDetailsOpen: false });\r\n storeSelectorStateManager\r\n ?.openDialog({\r\n id: storeSelectorId,\r\n showMapViewLink: false,\r\n onLocationSelected: () => {\r\n return Promise.resolve();\r\n }\r\n })\r\n .catch((error: Error) => {\r\n if (this.props.telemetry) {\r\n this.props.telemetry.error(error.message);\r\n this.props.telemetry.debug('Unable to set preferred store');\r\n }\r\n return;\r\n });\r\n };\r\n\r\n\r\n public render(): JSX.Element | null {\r\n const {\r\n slots: { mediaGallery },\r\n data: {\r\n product: { result: product },\r\n productSpecificationData: { result: productSpecificationData },\r\n selectedFoundation: { result: adjustableItem },\r\n completeYourBedPillow: { result: pillow },\r\n completeYourBedProtector: { result: protector }\r\n },\r\n config: { className = '' },\r\n app: { config: { brandBackofficeAttributePdp } }\r\n } = this.props;\r\n const { max } = this.state;\r\n if (!product) {\r\n this.props.context.telemetry.error('Product content is empty, module wont render');\r\n return null;\r\n }\r\n const props = this.props;\r\n const defaultMinimumKeyInPrice = 10;\r\n const defaultMaximumKeyInPrice = 100;\r\n const brandName = parseBrandName(productSpecificationData, brandBackofficeAttributePdp) || '';\r\n\r\n const viewProps: IBuyboxViewPropsExtended = {\r\n ...this.props,\r\n state: this.state,\r\n mediaGallery: mediaGallery?.length > 0 ? mediaGallery[0] : undefined,\r\n ModuleProps: {\r\n moduleProps: this.props,\r\n className: classnames('ms-buybox', className)\r\n },\r\n ProductInfoContainerProps: {\r\n className: 'ms-buybox__content'\r\n },\r\n MediaGalleryContainerProps: {\r\n className: 'ms-buybox__media-gallery'\r\n },\r\n telemetryContent: this.telemetryContent,\r\n callbacks: this.buyboxCallbacks,\r\n title: getBuyboxProductTitle(props, undefined, brandName),\r\n description: getBuyboxProductDescription({ ...props, config: {} }),\r\n findInStore: getBuyboxFindInStore(this.props, this.state, this.buyboxCallbacks),\r\n price: getBuyboxProductPrice({ ...props, config: {} }, this.state),\r\n addToCart: getBuyboxAddToCart(props, this.state, this.buyboxCallbacks, defaultMinimumKeyInPrice, defaultMaximumKeyInPrice),\r\n viewCartLink: getUrlSync('cart', props.context.actionContext),\r\n inventoryLabel: getBuyBoxInventoryLabel(props),\r\n shopSimilarLook:\r\n this.props.config.enableShopSimilarLooks\r\n && !product.IsGiftCard\r\n && ,\r\n keyInPrice:\r\n this.props.config.enableKeyInPrice && this.state.isCustomPriceSelected\r\n && ,\r\n quantityLimitsMessages: getQuantityLimitsMessages(props, this.state),\r\n max: max,\r\n smallParcelATCallMade: this.state.smallParcelATCallMade,\r\n setSmallParcelATPCallMade: this._setSmallParcelATPCallMade,\r\n StatusATPCall: this.state.StatusATPCall,\r\n setStatusATPCall: this._setStatusATPCall,\r\n setZipCode: this._setZipCode,\r\n ATPCall: this.state.ATPCall,\r\n setATPCall: this._setATPCall,\r\n extensionProps: this.state.extensionProps,\r\n productBadges:\r\n props.app.config.productBadgeAttribute &&\r\n this.props.data.productSpecificationData?.result?.length &&\r\n this._getProductBadges(),\r\n ratingComponent: ,\r\n tryInStoreComponent: this.findPreferredStore()}\r\n onClickNameOrDetails={async (isAvailable) => {\r\n if (isAvailable) {\r\n this.setState(prevState => ({ isStoreDetailsOpen: !prevState.isStoreDetailsOpen }));\r\n } else {\r\n await this.findPreferredStore();\r\n }\r\n }}\r\n onClickOutside={() => {\r\n this.setState({ isStoreDetailsOpen: false });\r\n }}\r\n />,\r\n promotionalMessage: this.state?.eyebrowMessageResultState?.[0]?.EyeBrows?.[0].Description?.split(\"|\")[1],\r\n deliveryMessage: this.state.deliveryMessage,\r\n ATPDataFromBusiness: this.state.deliveryMessageATPResultState,\r\n updateDimension: this.state.isUpdatingDimension,\r\n showViewCartLink: this.state.showViewCartLink,\r\n updateSuccessfulATC: this.updateSuccessfulATC,\r\n getProductType: this._getProductType,\r\n setAllProductVariantsResult: this._setAllProductVariantsResult,\r\n ecomAllVairantStockInfoConcatenated: this.state.ecomAllVairantStockInfoConcatenated,\r\n customerSatisfactionScore: ,\r\n adjustableItem,\r\n pillow,\r\n protector\r\n };\r\n return this.props.renderView(viewProps);\r\n }\r\n\r\n private _getProductBadges = (): JSX.Element | undefined => {\r\n // find the configured backend attribute\r\n const {\r\n context: { request },\r\n data: { productSpecificationData },\r\n app: {\r\n config: { productBadgeAttribute: attribute }\r\n }\r\n } = this.props;\r\n const badgeData =\r\n attribute &&\r\n productSpecificationData.result?.find(\r\n currAttribute => currAttribute.Name && currAttribute.Name.toLowerCase().trim() === attribute.toLowerCase().trim()\r\n )?.TextValue;\r\n if (!badgeData) {\r\n return;\r\n }\r\n\r\n // split badge data into its separate badges\r\n const badges = badgeData?.split(',');\r\n\r\n // parse badge data to get its schedule and image src\r\n const parsedBadges = badges?.map((badge: string) => parseBadgeData(badge, request));\r\n\r\n // build product badge image components\r\n // tslint:disable-next-line: no-any\r\n const finalizedBadges =\r\n parsedBadges && parsedBadges.map((parsedBadge: any) => parsedBadge && buildProductBadge(parsedBadge, request));\r\n return finalizedBadges && <>{finalizedBadges};\r\n };\r\n}\r\n\r\nexport default withIsDesktop(Buybox);","/*---------------------------------------------------------------------------------------------\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 { RegularStoreHours } from '@msdyn365-commerce/retail-proxy';\r\nimport get from 'lodash/get';\r\nimport { IStoreSelectorLocationLineItemResources } from '.';\r\n\r\nexport interface IHoursDisplayInfo {\r\n startDayShort: string;\r\n startDayFull: string;\r\n endDayShort?: string;\r\n endDayFull?: string;\r\n timeRange: string;\r\n}\r\n\r\nexport interface IHoursInfo {\r\n isClosed: boolean;\r\n openTime?: number;\r\n closeTime?: number;\r\n}\r\n\r\ntype DayType = 'MON' | 'TUE' | 'WED' | 'THU' | 'FRI' | 'SAT' | 'SUN';\r\n\r\nexport const secondsToTime = (seconds: number | undefined): string | undefined => {\r\n if (seconds === undefined) {\r\n return undefined;\r\n } else {\r\n let hours = Math.floor(seconds / (60 * 60));\r\n const ampm = hours >= 12 ? 'pm' : 'am';\r\n hours = hours % 12;\r\n hours = hours ? hours : 12;\r\n const divisorForMinutes = seconds % (60 * 60);\r\n const minutes =\r\n Math.floor(divisorForMinutes / 60) < 10 ? `0${Math.floor(divisorForMinutes / 60)}` : Math.floor(divisorForMinutes / 60);\r\n return `${hours}:${minutes} ${ampm}`;\r\n }\r\n};\r\n\r\nexport const getTimeZoneAbbr = (timeZone: string | undefined): string | undefined => {\r\n switch (timeZone) {\r\n case 'EASTERN STANDARD TIME':\r\n return 'EST';\r\n case 'EASTERN DAYLIGHT TIME':\r\n return 'EDT';\r\n case 'CENTRAL STANDARD TIME':\r\n return 'CST';\r\n case 'CENTRAL DAYLIGHT TIME':\r\n return 'CDT';\r\n case 'MOUNTAIN STANDARD TIME':\r\n return 'MST';\r\n case 'MOUNTAIN DAYLIGHT TIME':\r\n return 'MDT';\r\n case 'PACIFIC STANDARD TIME':\r\n return 'PST';\r\n case 'PACIFIC DAYLIGHT TIME':\r\n return 'PDT';\r\n default: // any other than USA TimeZone:\r\n return timeZone;\r\n }\r\n};\r\nconst getShortTimeString = (day: DayType, resources: IStoreSelectorLocationLineItemResources): string => {\r\n switch (day) {\r\n case 'MON':\r\n return resources.days.monday;\r\n case 'TUE':\r\n return resources.days.tuesday;\r\n case 'WED':\r\n return resources.days.wednesday;\r\n case 'THU':\r\n return resources.days.thursday;\r\n case 'FRI':\r\n return resources.days.friday;\r\n case 'SAT':\r\n return resources.days.saturday;\r\n default: // case 'SUN':\r\n return resources.days.sunday;\r\n }\r\n};\r\n\r\nconst getFullTimeString = (day: DayType, resources: IStoreSelectorLocationLineItemResources): string => {\r\n switch (day) {\r\n case 'MON':\r\n return resources.days.mondayFull;\r\n case 'TUE':\r\n return resources.days.tuesdayFull;\r\n case 'WED':\r\n return resources.days.wednesdayFull;\r\n case 'THU':\r\n return resources.days.thursdayFull;\r\n case 'FRI':\r\n return resources.days.fridayFull;\r\n case 'SAT':\r\n return resources.days.saturdayFull;\r\n default: // case 'SUN':\r\n return resources.days.sundayFull;\r\n }\r\n};\r\n\r\nconst buildHoursDisplayInfo = (startDay: DayType, endDay: DayType, hoursInfo: string, resources: IStoreSelectorLocationLineItemResources): IHoursDisplayInfo => {\r\n return {\r\n startDayShort: getShortTimeString(startDay, resources),\r\n startDayFull: getFullTimeString(startDay, resources),\r\n endDayShort: startDay !== endDay ? getShortTimeString(endDay, resources) : undefined,\r\n endDayFull: startDay !== endDay ? getFullTimeString(endDay, resources) : undefined,\r\n timeRange: hoursInfo\r\n };\r\n};\r\n\r\nconst shouldMergeLines = (firstLine: IHoursInfo, secondLine: IHoursInfo): boolean => {\r\n if (firstLine.isClosed && secondLine.isClosed) {\r\n return true;\r\n }\r\n\r\n if (!firstLine.isClosed && !secondLine.isClosed) {\r\n return firstLine.openTime === secondLine.openTime && firstLine.closeTime === secondLine.closeTime;\r\n }\r\n\r\n return false;\r\n};\r\n\r\nexport const getStoreHoursData = (storeHours: RegularStoreHours, dateForLookup: string): IHoursInfo => {\r\n return {\r\n isClosed: get(storeHours, `IsClosedOn${dateForLookup}`, false),\r\n openTime: get(storeHours, `${dateForLookup}OpenTime`, undefined),\r\n closeTime: get(storeHours, `${dateForLookup}CloseTime`, undefined)\r\n };\r\n};\r\n\r\nconst buildStoreHoursString = (hoursInfo: IHoursInfo, resources: IStoreSelectorLocationLineItemResources): string => {\r\n if (hoursInfo.isClosed) {\r\n return resources.closedText;\r\n } else {\r\n const openFrom: string | undefined = secondsToTime(hoursInfo.openTime);\r\n const openTo: string | undefined = secondsToTime(hoursInfo.closeTime);\r\n\r\n return `${openFrom}–${openTo}`;\r\n }\r\n};\r\n\r\nexport const buildStoreHours = (storeHours: RegularStoreHours, resources: IStoreSelectorLocationLineItemResources): IHoursDisplayInfo[] => {\r\n const storeHoursList: IHoursDisplayInfo[] = [];\r\n\r\n const mondayHours = getStoreHoursData(storeHours, 'Monday');\r\n const tuesdayHours = getStoreHoursData(storeHours, 'Tuesday');\r\n const wednesdayHours = getStoreHoursData(storeHours, 'Wednesday');\r\n const thursdayHours = getStoreHoursData(storeHours, 'Thursday');\r\n const fridayHours = getStoreHoursData(storeHours, 'Friday');\r\n const saturdayHours = getStoreHoursData(storeHours, 'Saturday');\r\n const sundayHours = getStoreHoursData(storeHours, 'Sunday');\r\n\r\n let periodStart: DayType = 'MON';\r\n let periodEnd: DayType = 'MON';\r\n\r\n if (!shouldMergeLines(mondayHours, tuesdayHours)) {\r\n storeHoursList.push(buildHoursDisplayInfo(periodStart, periodEnd, buildStoreHoursString(mondayHours, resources), resources));\r\n\r\n periodStart = 'TUE';\r\n }\r\n periodEnd = 'TUE';\r\n\r\n if (!shouldMergeLines(tuesdayHours, wednesdayHours)) {\r\n storeHoursList.push(buildHoursDisplayInfo(periodStart, periodEnd, buildStoreHoursString(tuesdayHours, resources), resources));\r\n\r\n periodStart = 'WED';\r\n }\r\n periodEnd = 'WED';\r\n\r\n if (!shouldMergeLines(wednesdayHours, thursdayHours)) {\r\n storeHoursList.push(buildHoursDisplayInfo(periodStart, periodEnd, buildStoreHoursString(wednesdayHours, resources), resources));\r\n\r\n periodStart = 'THU';\r\n }\r\n periodEnd = 'THU';\r\n\r\n if (!shouldMergeLines(thursdayHours, fridayHours)) {\r\n storeHoursList.push(buildHoursDisplayInfo(periodStart, periodEnd, buildStoreHoursString(thursdayHours, resources), resources));\r\n\r\n periodStart = 'FRI';\r\n }\r\n periodEnd = 'FRI';\r\n\r\n if (!shouldMergeLines(fridayHours, saturdayHours)) {\r\n storeHoursList.push(buildHoursDisplayInfo(periodStart, periodEnd, buildStoreHoursString(fridayHours, resources), resources));\r\n\r\n periodStart = 'SAT';\r\n }\r\n periodEnd = 'SAT';\r\n\r\n if (!shouldMergeLines(saturdayHours, sundayHours)) {\r\n storeHoursList.push(buildHoursDisplayInfo(periodStart, periodEnd, buildStoreHoursString(saturdayHours, resources), resources));\r\n\r\n periodStart = 'SUN';\r\n }\r\n periodEnd = 'SUN';\r\n\r\n storeHoursList.push(buildHoursDisplayInfo(periodStart, periodEnd, buildStoreHoursString(sundayHours, resources), resources));\r\n\r\n return storeHoursList;\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 React from 'react';\r\n\r\nimport {\r\n getPayloadObject,\r\n getTelemetryAttributes,\r\n IPayLoad,\r\n ITelemetryContent,\r\n TelemetryConstant\r\n} from '@msdyn365-commerce-modules/utilities';\r\nimport MsDyn365 from '@msdyn365-commerce/core';\r\n// VSI Customization - starts\r\nimport { OrgUnitContact, OrgUnitLocation, StoreHours } from '@msdyn365-commerce/retail-proxy';\r\nimport { getTimeZoneAbbr, secondsToTime } from './date-time-helpers';\r\n// VSI Customization - ends\r\n\r\nexport interface IStoreSelectorLocationLineItemResources {\r\n contactInfoHeader: string;\r\n storeHoursHeader: string;\r\n availabilityInfoHeader: string;\r\n\r\n closedText: string;\r\n\r\n outOfStock: string;\r\n inStock: string;\r\n currentLocation: string;\r\n selectLocation: string;\r\n selectLocationAriaLabelFormat: string;\r\n setAsPreferredStoreText: string;\r\n setAsPreferredStoreTextAriaLabel: string;\r\n preferredStoreText: string;\r\n preferredStoreAriaLabel: string;\r\n\r\n days: {\r\n monday: string;\r\n tuesday: string;\r\n wednesday: string;\r\n thursday: string;\r\n friday: string;\r\n saturday: string;\r\n sunday: string;\r\n mondayFull: string;\r\n tuesdayFull: string;\r\n wednesdayFull: string;\r\n thursdayFull: string;\r\n fridayFull: string;\r\n saturdayFull: string;\r\n sundayFull: string;\r\n };\r\n // VSI Customization - starts\r\n viewStoreDetails: string;\r\n storeOpenAtHours: string;\r\n storeCloseAtHours: string;\r\n // VSI Customization - ends\r\n}\r\n\r\nexport interface IStoreSelectorLocationLineItemProps {\r\n location: OrgUnitLocation;\r\n storeHours?: StoreHours;\r\n\r\n hideStockStatus?: boolean;\r\n isInStock?: boolean;\r\n isCurrentLocation?: boolean;\r\n resources: IStoreSelectorLocationLineItemResources;\r\n stockStatusLabel?: string;\r\n storeLocatorView?: boolean;\r\n isPreferredStoreEnabled?: boolean;\r\n index: string;\r\n preferredStoreLocationId: string | null;\r\n /** The telemetry content */\r\n telemetryContent?: ITelemetryContent;\r\n preferredDistanceUnit: string;\r\n isLocationDisabled?: boolean;\r\n handlers: {\r\n onSelected(location: OrgUnitLocation): void;\r\n onSetAsPreferredStore(locationId: string | undefined): void;\r\n onRemovePreferredStore(): void;\r\n };\r\n}\r\n\r\nconst StoreSelectorLocationLineItemComponentActions = {\r\n onLocationSelected(props: IStoreSelectorLocationLineItemProps): void {\r\n props.handlers.onSelected(props.location);\r\n },\r\n onSetAsPreferredStore(props: IStoreSelectorLocationLineItemProps): void {\r\n props.handlers.onSetAsPreferredStore(props.location.OrgUnitNumber);\r\n },\r\n onRemovePreferredStore(props: IStoreSelectorLocationLineItemProps): void {\r\n props.handlers.onRemovePreferredStore();\r\n }\r\n};\r\n\r\nconst renderStoreHours = (\r\n location: OrgUnitLocation,\r\n resources: IStoreSelectorLocationLineItemResources,\r\n distanceAsString: string | undefined\r\n): JSX.Element | null => {\r\n const isClosedToday = location.ExtensionProperties?.find(x => x.Key === 'Yext_Today_IsClosed')?.Value?.BooleanValue;\r\n const isClosed = location.ExtensionProperties?.find(x => x.Key === 'Yext_Is_Store_Closed')?.Value?.BooleanValue;\r\n const startTime = location.ExtensionProperties?.find(x => x.Key === 'Yext_Today_OpenFrom')?.Value?.IntegerValue;\r\n const endTime = location.ExtensionProperties?.find(x => x.Key === 'Yext_Today_OpenTo')?.Value?.IntegerValue;\r\n const timeZone = location.ExtensionProperties?.find(x => x.Key === 'Channel_TimeZone_InfoId')?.Value?.StringValue;\r\n const timeZoneAbbr = getTimeZoneAbbr(timeZone);\r\n if (isClosedToday && isClosedToday !== null) {\r\n return (\r\n
\r\n
{resources.closedText}
\r\n
\r\n );\r\n } else if (startTime !== null || endTime !== null) {\r\n return (\r\n
\r\n
\r\n {!isClosed\r\n ? `${resources.storeCloseAtHours} ${secondsToTime(endTime)} ${timeZoneAbbr}`\r\n : `${resources.storeOpenAtHours} ${secondsToTime(startTime)} ${timeZoneAbbr}`}\r\n
\r\n
\r\n );\r\n } else {\r\n return null;\r\n }\r\n};\r\n\r\nconst buildDistanceString = (\r\n distance: number | undefined,\r\n preferredDistanceUnit: string,\r\n isLocationDisabled?: boolean\r\n): string | undefined => {\r\n if (distance === undefined || isLocationDisabled) {\r\n return undefined;\r\n } else if (distance < 1) {\r\n // VSI Customization - starts\r\n return `<1 ${preferredDistanceUnit}`;\r\n } else {\r\n return `${Math.floor(distance)} ${preferredDistanceUnit}`;\r\n // VSI Customization - ends\r\n }\r\n};\r\n\r\nexport const extractPhoneNumber = (contacts: OrgUnitContact[] | undefined): string | undefined => {\r\n if (!contacts) {\r\n return undefined;\r\n }\r\n\r\n const allPhoneContacts = contacts.filter(contact => contact.ContactTypeValue === 1 && !contact.IsPrivate);\r\n\r\n if (allPhoneContacts && allPhoneContacts.length > 0) {\r\n const primaryPhoneContact = allPhoneContacts.find(contact => contact.IsPrimary);\r\n\r\n if (primaryPhoneContact) {\r\n return primaryPhoneContact.Locator;\r\n }\r\n\r\n return allPhoneContacts[0].Locator;\r\n }\r\n\r\n return undefined;\r\n};\r\n\r\n// tslint:disable-next-line: cyclomatic-complexity max-func-body-length\r\nconst StoreSelectorLocationLineItem: React.FC = (props: IStoreSelectorLocationLineItemProps) => {\r\n const onClick = () => StoreSelectorLocationLineItemComponentActions.onLocationSelected(props);\r\n const _storeDetailsTracking = () => {\r\n // @ts-ignore\r\n if ('utag' in window) {\r\n const pageURL = MsDyn365.isBrowser && window.location.pathname;\r\n // @ts-ignore\r\n utag.link({\r\n event: \"store-locator-slideout-store-details\",\r\n event_category: \"store locator slideout\",\r\n event_action: \"store details link click\",\r\n event_label: `from: ${pageURL}`,\r\n event_noninteraction: \"false\"\r\n });\r\n }\r\n };\r\n const {\r\n hideStockStatus,\r\n isCurrentLocation,\r\n isInStock,\r\n location,\r\n resources,\r\n // storeHours,\r\n stockStatusLabel,\r\n storeLocatorView,\r\n index,\r\n preferredStoreLocationId,\r\n isPreferredStoreEnabled,\r\n isLocationDisabled,\r\n telemetryContent\r\n } = props;\r\n\r\n const storeName: string | undefined =\r\n location.ExtensionProperties?.find(x => x.Key === 'Yext_Store_Name')?.Value?.StringValue || location.OrgUnitName;\r\n const storeLocatorContext = location && location.Contacts ? location.Contacts.find(url => url.ContactTypeValue === 3) : undefined;\r\n const storeLocatorUrl: string | undefined = storeLocatorContext\r\n ? storeLocatorContext.Locator\r\n : `https://bing.com/maps/default.aspx?where1=${location.Address}`;\r\n const distanceAsString: string | undefined = buildDistanceString(location.Distance, props.preferredDistanceUnit, isLocationDisabled);\r\n const storeAddress: string | undefined = location.Address;\r\n // VSI Customization - starts\r\n const storeAddressLine1: string | undefined = location.Street;\r\n const storeAddressLine2: string | undefined = `${location.City}, ${location.State} ${location.Zip}`;\r\n // VSI Customization - ends\r\n const phoneNumber: string | undefined = extractPhoneNumber(location.Contacts);\r\n\r\n const resourceLabel = isInStock ? resources.inStock : resources.outOfStock;\r\n const stockLabel = stockStatusLabel ? stockStatusLabel : undefined;\r\n const stockText: string | undefined = hideStockStatus ? undefined : stockLabel ? stockLabel : resourceLabel;\r\n const canSelectLocation = hideStockStatus || isInStock;\r\n const pickupInStoreButtonText: string = resources.selectLocation;\r\n const pickupInStoreAriaLabel: string = resources.selectLocationAriaLabelFormat?.replace('{StoreName}', storeName || '');\r\n const isPreferredStore = preferredStoreLocationId === location.OrgUnitNumber;\r\n const payLoad: IPayLoad = getPayloadObject('click', telemetryContent!, TelemetryConstant.PickupInStore);\r\n const attributes = getTelemetryAttributes(telemetryContent!, payLoad);\r\n payLoad.contentAction.etext = TelemetryConstant.PreferredStore;\r\n const preferredStoreAttr = getTelemetryAttributes(telemetryContent!, payLoad);\r\n payLoad.contentAction.etext = TelemetryConstant.RemovePreferredStore;\r\n const RemovePreferredStoreAttr = getTelemetryAttributes(telemetryContent!, payLoad);\r\n const setAsPreferredStore = () => StoreSelectorLocationLineItemComponentActions.onSetAsPreferredStore(props);\r\n const removePreferredStore = () => StoreSelectorLocationLineItemComponentActions.onRemovePreferredStore(props);\r\n\r\n return (\r\n
\r\n
\r\n {storeLocatorView && {index}}\r\n {storeName}\r\n
\r\n {/* VSI Customization - starts */}\r\n
\r\n

{resources.storeHoursHeader}

\r\n {renderStoreHours(location, resources, distanceAsString)}\r\n {distanceAsString ? {distanceAsString} : false}\r\n
\r\n {/* VSI Customization - starts */}\r\n
\r\n
\r\n

{resources.contactInfoHeader}

\r\n {storeAddress && (\r\n
\r\n \r\n
\r\n

{storeAddressLine1}

\r\n

{storeAddressLine2}

\r\n
\r\n
\r\n )}\r\n {phoneNumber && (\r\n
\r\n \r\n {phoneNumber}\r\n
\r\n )}\r\n
\r\n {!storeLocatorView && (\r\n
\r\n

{resources.availabilityInfoHeader}

\r\n {stockText &&

{stockText}

}\r\n {isCurrentLocation ? (\r\n

{resources.currentLocation}

\r\n ) : canSelectLocation ? (\r\n \r\n {pickupInStoreButtonText}\r\n \r\n ) : (\r\n false\r\n )}\r\n
\r\n )}\r\n
\r\n {isPreferredStoreEnabled ? (\r\n isPreferredStore ? (\r\n \r\n {resources.preferredStoreText}\r\n \r\n ) : (\r\n \r\n {resources.setAsPreferredStoreText}\r\n \r\n )\r\n ) : null}\r\n \r\n {resources.viewStoreDetails}\r\n \r\n
\r\n
\r\n
\r\n );\r\n};\r\n\r\nexport const StoreSelectorLocationLineItemComponent = StoreSelectorLocationLineItem as (\r\n props: IStoreSelectorLocationLineItemProps\r\n) => JSX.Element;\r\n","import classnames from 'classnames';\r\nimport React, { useState } from 'react';\r\n\r\nimport {\r\n getPayloadObject,\r\n getTelemetryAttributes,\r\n IPopupProps,\r\n ITelemetryContent,\r\n Popup\r\n} from '@msdyn365-commerce-modules/utilities';\r\nimport { PriceComponent } from '@msdyn365-commerce/components';\r\nimport MsDyn365, {\r\n IComponent,\r\n IComponentProps,\r\n IGridSettings,\r\n IImageSettings,\r\n msdyn365Commerce,\r\n TelemetryEvent\r\n} from '@msdyn365-commerce/core';\r\nimport { getCartState, ICartActionResult } from '@msdyn365-commerce/global-state';\r\nimport { CommerceProperty, ProductAvailableQuantity, ProductDimension, ProductPrice, SimpleProduct } from '@msdyn365-commerce/retail-proxy';\r\nimport { navLinkKeywordRemoval } from '../../../../../Utilities/plp-url-utils';\r\nimport { getProductURLForUtag, getProductSizeForUTag } from '../../../../../modules/mfrm-buybox/mfrm-buybox';\r\nimport { getAttributeValuesAsync } from '@msdyn365-commerce/retail-proxy/dist/DataActions/ProductsDataActions.g';\r\nimport { getUtagProductCategory } from '../../../../../Utilities/get-utag-product-category';\r\nimport { getUtagVariantId } from '../../../../../Utilities/get-utag-variant-id';\r\nimport { getSetCartProductPrice, ICartProductPrice } from '../../../../../Utilities/cart-utils';\r\nexport interface IAddToCartComponentProps extends IComponentProps<{ product: SimpleProduct; price?: ProductPrice; productPrice?: ProductPrice }> {\r\n className?: string;\r\n addToCartText: string;\r\n addToCartProductsText: string;\r\n outOfStockText: string;\r\n disabled?: boolean;\r\n quantity?: number;\r\n navigationUrl?: string;\r\n productAvailability?: ProductAvailableQuantity;\r\n getSelectedProduct?: Promise;\r\n imageSettings?: IImageSettings;\r\n gridSettings?: IGridSettings;\r\n isLoading?: boolean;\r\n isUpdatingDimension?: boolean;\r\n isLoadingDeliveryOptions?: boolean;\r\n isUpdatingDeliveryOptions?: boolean;\r\n isAddServiceItemToCart?: boolean;\r\n isAddEmailDeliveryItemToCart?: boolean;\r\n isPriceKeyedIn?: boolean;\r\n customPriceAmount?: number;\r\n isOrderQuantityLimitsFeatureEnabled?: boolean;\r\n productIdPrefix?: string;\r\n dialogStrings?: {\r\n goToCartText: string;\r\n continueShoppingText: string;\r\n headerItemOneText: string;\r\n headerItemFormatText: string;\r\n headerMessageText: string;\r\n freePriceText: string;\r\n originalPriceText: string;\r\n currentPriceText: string;\r\n };\r\n telemetryContent?: ITelemetryContent;\r\n\r\n isCustomPriceSelected?: boolean;\r\n maximumKeyInPrice?: number;\r\n minimumKeyInPrice?: number;\r\n defaultMaximumKeyInPrice?: number;\r\n defaultMinimumKeyInPrice?: number;\r\n /** VSI Customization - Start */\r\n outOfStockBooleanValue?: boolean;\r\n outOfStockSmallParcel?: boolean;\r\n mfrmOutOfStockCustomText?: string;\r\n mfrmContinueShoppingText?: string;\r\n mfrmOutOfStockSmallParcell?: boolean;\r\n mfrmAddToCartDisableByState?: boolean;\r\n mfrmContinueShoppingLink?: IMfrmCategoryPath;\r\n itemOutOfMarket?: boolean;\r\n variantOutOfStock?: boolean;\r\n extensionProps?: CommerceProperty[];\r\n allProductVariants?: SimpleProduct[];\r\n productCategoryName?: string | undefined;\r\n productBrand?: string | undefined;\r\n successfulATC?: boolean;\r\n variantIdForTracking?: string;\r\n adjustableItem?: any;\r\n pillow?: any;\r\n protector?: any;\r\n updateSuccessfulATC?(): void;\r\n /** VSI Customization - End */\r\n onAdd?(result: ICartActionResult): void;\r\n onError?(result: IAddToCartFailureResult): void;\r\n changeUpdatingDimension?(isUpdatingDimension: boolean): void;\r\n changeUpdatingDeliveryOptions?(isUpdatingDeliveryOptions: boolean): void;\r\n allVariantOOS: boolean;\r\n}\r\n\r\n/** VSI Customization - Start */\r\nexport interface IMfrmCategoryPath {\r\n Name?: string;\r\n Url?: string;\r\n}\r\n\r\nexport interface IMfrmAtpObject {\r\n itemId: string;\r\n recordId: string;\r\n date: string;\r\n zipCode: string;\r\n weeks: number;\r\n}\r\n/** VSI Customization - End */\r\n\r\nexport declare type ICartActionFailureReason =\r\n | 'EMPTYINPUT'\r\n | 'MISSINGDIMENSION'\r\n | 'OUTOFSTOCK'\r\n | 'CARTACTIONFAILED'\r\n | 'INVALIDCUSTOMAMOUNT';\r\nexport interface IAddToCartFailureResult {\r\n failureReason: ICartActionFailureReason;\r\n\r\n stockLeft?: number;\r\n cartActionResult?: ICartActionResult;\r\n missingDimensions?: ProductDimension[];\r\n}\r\n\r\nexport interface IAddtoCartComponent extends IComponent {\r\n onClick(): (event: React.MouseEvent, props: IAddToCartComponentProps) => void;\r\n}\r\n\r\nexport interface UTAGAdjBaseAddToCart {\r\n event: string;\r\n enhanced_action: string;\r\n event_category: string;\r\n event_action: string;\r\n event_label: string;\r\n event_noninteraction: string;\r\n product_id: string[];\r\n product_name: string[];\r\n product_price: string[]\r\n product_quantity: string[];\r\n product_url: string[];\r\n product_image_url: string[];\r\n product_size: (string | undefined)[];\r\n product_list_name: string[];\r\n product_list_position: string[];\r\n product_brand?: string[];\r\n product_category?: string[];\r\n product_variant?: (string | undefined)[];\r\n}\r\nexport interface UTAGCompleteYourBedPillowAddToCart {\r\n event: string;\r\n enhanced_action: string;\r\n event_category: string;\r\n event_action: string;\r\n event_label: string;\r\n event_noninteraction: string;\r\n product_id: string[];\r\n product_name: string[];\r\n product_price: string[]\r\n product_quantity: string[];\r\n product_url: string[];\r\n product_image_url: string[];\r\n product_size: (string | undefined)[];\r\n product_brand?: string[];\r\n product_category?: string[];\r\n product_variant?: (string | undefined)[];\r\n}\r\n// tslint:disable: no-any\r\nconst onClick = async (\r\n _event: React.MouseEvent,\r\n props: IAddToCartComponentProps,\r\n setDisabled: (disabled: boolean) => void,\r\n openModal: (opened: boolean) => void,\r\n setSuccess: () => void\r\n): Promise => {\r\n const cartError = addToCartError(props);\r\n let productToAdd = props.data.product;\r\n const productBrand = `${props.productBrand}`;\r\n const productPrice = props.data.price;\r\n const productCategory = `${props.productCategoryName}`;\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: 'add-to-cart',\r\n enhanced_action: 'add',\r\n event_category: 'ecommerce',\r\n event_action: 'add to cart',\r\n event_label: `${productToAdd?.ItemId}: ${productToAdd?.Name}`,\r\n event_noninteraction: 'false',\r\n product_id: [`${productToAdd?.ItemId}`],\r\n product_name: [`${productToAdd?.Name}`],\r\n product_category: [productCategory],\r\n product_brand: [productBrand],\r\n product_variant: [`${props?.variantIdForTracking}`],\r\n product_price: [`${productPrice?.CustomerContextualPrice}`],\r\n product_quantity: [`${props.quantity}`],\r\n product_url: [`${getProductURLForUtag(productToAdd, props.context)}`],\r\n product_image_url: [`${productToAdd?.PrimaryImageUrl}`],\r\n product_size: [getProductSizeForUTag(productToAdd)]\r\n });\r\n if (props?.adjustableItem?.foundation) {\r\n const { ItemId, Name, CustomerContextualPrice, PrimaryImageUrl, Dimensions, RecordId, MasterProductId } = props.adjustableItem.foundation;\r\n const listPosition = props.adjustableItem.listPosition;\r\n const productSpecificationData = await getAttributeValuesAsync(\r\n { callerContext: props.context.actionContext, queryResultSettings: {} },\r\n RecordId,\r\n props.context.request.apiSettings.channelId,\r\n props.context.request.apiSettings.catalogId || 0\r\n );\r\n\r\n\r\n const dimension = Dimensions?.find((Dimension: { DimensionTypeValue: number }) => Dimension.DimensionTypeValue === 3);\r\n const product_size = dimension?.DimensionValue?.Value;\r\n\r\n const utag_obj: UTAGAdjBaseAddToCart = {\r\n event: 'add-to-cart',\r\n enhanced_action: 'add',\r\n event_category: 'ecommerce',\r\n event_action: 'add to cart',\r\n event_label: `${ItemId}: ${Name}`,\r\n event_noninteraction: 'false',\r\n product_id: [`${ItemId}`],\r\n product_category: await getUtagProductCategory(\r\n props.context.actionContext,\r\n props.context.request.apiSettings.channelId,\r\n props.context.request.apiSettings.catalogId,\r\n RecordId\r\n ),\r\n product_name: [`${Name}`],\r\n product_price: [`${CustomerContextualPrice}`],\r\n product_quantity: ['1'],\r\n product_url: [getProductURLForUtag(props.adjustableItem.foundation, props.context)],\r\n product_image_url: [`${PrimaryImageUrl}`],\r\n product_size: [\r\n product_size\r\n ],\r\n product_list_name: ['PDP Add Base/Foundation'],\r\n product_list_position: [`${listPosition}`],\r\n product_variant: (MasterProductId && ItemId) ? await getUtagVariantId(MasterProductId, props.context.request.apiSettings.channelId, props.context.actionContext, RecordId, ItemId) : undefined\r\n };\r\n\r\n\r\n const brand = productSpecificationData.find(e => e.Name === 'Brand')?.TextValue;\r\n if (brand) {\r\n utag_obj.product_brand = [brand];\r\n }\r\n\r\n // @ts-ignore\r\n utag.link(utag_obj);\r\n }\r\n if (props?.pillow?.pillow) {\r\n const { ItemId, Name, CustomerContextualPrice, PrimaryImageUrl, Dimensions, RecordId, MasterProductId } = props.pillow.pillow;\r\n const productSpecificationData = await getAttributeValuesAsync(\r\n { callerContext: props.context.actionContext, queryResultSettings: {} },\r\n RecordId,\r\n props.context.request.apiSettings.channelId,\r\n props.context.request.apiSettings.catalogId || 0\r\n );\r\n const dimension = Dimensions?.find((Dimension: { DimensionTypeValue: number }) => Dimension.DimensionTypeValue === 3);\r\n const product_size = dimension?.DimensionValue?.Value;\r\n const utag_obj: UTAGCompleteYourBedPillowAddToCart = {\r\n event: 'add-to-cart',\r\n enhanced_action: 'add',\r\n event_category: 'ecommerce',\r\n event_action: 'add to cart',\r\n event_label: `${ItemId}: ${Name}`,\r\n event_noninteraction: 'false',\r\n product_id: [`${ItemId}`],\r\n product_category: await getUtagProductCategory(\r\n props.context.actionContext,\r\n props.context.request.apiSettings.channelId,\r\n props.context.request.apiSettings.catalogId,\r\n RecordId\r\n ),\r\n product_name: [`${Name}`],\r\n product_price: [`${CustomerContextualPrice}`],\r\n product_quantity: ['1'],\r\n product_url: [getProductURLForUtag(props.pillow.pillow, props.context)],\r\n product_image_url: [`${PrimaryImageUrl}`],\r\n product_size: [\r\n product_size\r\n ],\r\n product_variant: (MasterProductId && ItemId) ? await getUtagVariantId(MasterProductId, props.context.request.apiSettings.channelId, props.context.actionContext, RecordId, ItemId) : undefined\r\n };\r\n const brand = productSpecificationData.find(e => e.Name === 'Brand')?.TextValue;\r\n if (brand) {\r\n utag_obj.product_brand = [brand];\r\n }\r\n // @ts-ignore\r\n utag.link(utag_obj);\r\n }\r\n if (props?.protector?.protector) {\r\n const { ItemId, Name, CustomerContextualPrice, PrimaryImageUrl, Dimensions, RecordId, MasterProductId } = props.protector.protector;\r\n const productSpecificationData = await getAttributeValuesAsync(\r\n { callerContext: props.context.actionContext, queryResultSettings: {} },\r\n RecordId,\r\n props.context.request.apiSettings.channelId,\r\n props.context.request.apiSettings.catalogId || 0\r\n );\r\n const dimension = Dimensions?.find((Dimension: { DimensionTypeValue: number }) => Dimension.DimensionTypeValue === 3);\r\n const product_size = dimension?.DimensionValue?.Value;\r\n const utag_obj: UTAGCompleteYourBedPillowAddToCart = {\r\n event: 'add-to-cart',\r\n enhanced_action: 'add',\r\n event_category: 'ecommerce',\r\n event_action: 'add to cart',\r\n event_label: `${ItemId}: ${Name}`,\r\n event_noninteraction: 'false',\r\n product_id: [`${ItemId}`],\r\n product_category: await getUtagProductCategory(\r\n props.context.actionContext,\r\n props.context.request.apiSettings.channelId,\r\n props.context.request.apiSettings.catalogId,\r\n RecordId\r\n ),\r\n product_name: [`${Name}`],\r\n product_price: [`${CustomerContextualPrice}`],\r\n product_quantity: ['1'],\r\n product_url: [getProductURLForUtag(props.protector.protector, props.context)],\r\n product_image_url: [`${PrimaryImageUrl}`],\r\n product_size: [\r\n product_size\r\n ],\r\n product_variant: (MasterProductId && ItemId) ? await getUtagVariantId(MasterProductId, props.context.request.apiSettings.channelId, props.context.actionContext, RecordId, ItemId) : undefined\r\n };\r\n const brand = productSpecificationData.find(e => e.Name === 'Brand')?.TextValue;\r\n if (brand) {\r\n utag_obj.product_brand = [brand];\r\n }\r\n // @ts-ignore\r\n utag.link(utag_obj);\r\n }\r\n\r\n }\r\n if (cartError) {\r\n propagateError(props, cartError);\r\n return;\r\n }\r\n if (!(props.getSelectedProduct === undefined)) {\r\n productToAdd = (await props.getSelectedProduct) || props.data.product;\r\n // if props.getSelectedProduct has master product, than take it from data.product\r\n if (!productToAdd?.MasterProductId) {\r\n productToAdd = props.data.product;\r\n }\r\n }\r\n\r\n const productsToAdd: any = [\r\n {\r\n product: productToAdd,\r\n count: props.quantity,\r\n availableQuantity: props.productAvailability?.AvailableQuantity,\r\n additionalProperties: { orderQuantityLimitsFeatureIsEnabled: props.isOrderQuantityLimitsFeatureEnabled },\r\n enableStockCheck: props.context.app.config.enableStockCheck,\r\n isPriceKeyedIn: props.isPriceKeyedIn,\r\n customPrice: props.customPriceAmount,\r\n isAddEmailDeliveryItemToCart: props.isAddEmailDeliveryItemToCart\r\n }, ...(props.adjustableItem?.foundation ? [{\r\n product: props.adjustableItem?.foundation,\r\n count: props.adjustableItem?.foundation.quantity\r\n }] : []), ...(props.pillow?.pillow ? [{\r\n product: props.pillow?.pillow,\r\n count: props.quantity\r\n }] : []), ...(props.protector?.protector ? [{\r\n product: props.protector?.protector,\r\n count: props.quantity\r\n }] : [])\r\n ];\r\n const cartState = await getCartState(props.context.actionContext);\r\n // VSI CUSTOMIZATION - starts\r\n // Add product separately clear and the delivery information on retail server, so GetDeliveryOptions charge calculation works correctly\r\n const cart = cartState.cart;\r\n await cartState.clearCartLinesDeliveryInformation({ cart });\r\n productPriceHandler(productPrice);\r\n // VSI CUSTOMIZATION - ends\r\n await cartState\r\n .addProductsToCart(productsToAdd)\r\n .then(result => {\r\n if (result.status === 'SUCCESS') {\r\n if (props.dialogStrings && props.context.app.config.addToCartBehavior === 'showModal') {\r\n setDisabled(false);\r\n openModal(true);\r\n } else if (\r\n MsDyn365.isBrowser &&\r\n props.navigationUrl &&\r\n (props.context.app.config.addToCartBehavior === undefined || props.context.app.config.addToCartBehavior === 'goToCart')\r\n ) {\r\n // MsDyn365.isBrowser && window.location.assign(props.navigationUrl);\r\n if (MsDyn365.isBrowser) {\r\n window.location.href = props.navigationUrl;\r\n }\r\n // VSI CUSTOMIZATION - starts\r\n setDisabled(true);\r\n // VSI CUSTOMIZATION - ends\r\n }\r\n propagateResult(props, result);\r\n setSuccess();\r\n } else {\r\n propagateError(props, { failureReason: 'CARTACTIONFAILED', cartActionResult: result });\r\n setDisabled(false);\r\n }\r\n })\r\n .catch(error => console.log('error[addProductToCart]', error));\r\n};\r\n\r\nconst AddToCartComponentActions = {\r\n onClick: onClick\r\n};\r\n\r\n/*** VSI Customization - Buy side Save data custom event for check price mismatch details. * ticket - 95129 End. */\r\n const productPriceHandler = (productPrice?: ProductPrice) => {\r\n const getCartProductPriceArray = getSetCartProductPrice('get');\r\n const priceDetails: ICartProductPrice[] = [{variantRecordId: productPrice?.ProductId, price: productPrice?.AdjustedPrice}];\r\n getSetCartProductPrice('set', [...getCartProductPriceArray, ...priceDetails]);\r\n};\r\n// tslint:disable: cyclomatic-complexity\r\n// tslint:disable: max-func-body-length\r\n// tslint:disable: react-no-dangerous-html\r\nconst AddToCart: React.FC = (props: IAddToCartComponentProps) => {\r\n const [disabled, setDisabled] = useState(false);\r\n const [modalOpen, setModalOpen] = useState(false);\r\n\r\n const onClickHandler = async (event: React.MouseEvent) => {\r\n const setSuccess = props.updateSuccessfulATC ? props.updateSuccessfulATC : () => null;\r\n await AddToCartComponentActions.onClick(event, props, setDisabled, setModalOpen, setSuccess);\r\n };\r\n\r\n const priceComponent = props.data.price ? (\r\n \r\n ) : (\r\n ''\r\n );\r\n\r\n const popupProps: IPopupProps = {\r\n context: props.context,\r\n className: 'msc-add-to-cart',\r\n id: props.id,\r\n typeName: props.typeName,\r\n data: { product: props.data.product, price: props.data.price },\r\n dialogStrings: props.dialogStrings,\r\n imageSettings: props.imageSettings,\r\n gridSettings: props.context.request?.gridSettings,\r\n productQuantity: props.quantity !== undefined ? props.quantity : 1,\r\n priceComponent: priceComponent,\r\n navigationUrl: props.navigationUrl,\r\n modalOpen: modalOpen,\r\n setModalOpen: setModalOpen,\r\n telemetryContent: props.telemetryContent\r\n };\r\n\r\n const renderModalPopup = ;\r\n const label = getLinkText(props);\r\n const payload = getPayloadObject(TelemetryEvent.AddToCart, props.telemetryContent!, label, '');\r\n const attributes = getTelemetryAttributes(props.telemetryContent!, payload);\r\n\r\n // Todo: bug#22002 - Will be resolved later on - temp fix\r\n // const classToApply = props.mfrmOutOfStockSmallParcell ? 'out-of-stock msc-add-to-cart' : 'msc-add-to-cart';\r\n const classToApply = 'msc-add-to-cart';\r\n const OOMClass = props.itemOutOfMarket || props.variantOutOfStock || props.mfrmOutOfStockSmallParcell || props.allVariantOOS ? 'out-of-market disabled' : '';\r\n let disabledSmallParcel = false;\r\n // tslint:disable-next-line: max-line-length\r\n\r\n if (\r\n (props.disabled !== undefined ? props.disabled : false) ||\r\n disabled ||\r\n isIntermediateState(props) ||\r\n shouldShowOutOfStock(props, false) ||\r\n (props.mfrmAddToCartDisableByState !== undefined ? props.mfrmAddToCartDisableByState : false) ||\r\n props.itemOutOfMarket ||\r\n props.variantOutOfStock\r\n ) {\r\n disabledSmallParcel = true;\r\n }\r\n\r\n return (\r\n
\r\n {renderModalPopup}\r\n \r\n {props.mfrmOutOfStockSmallParcell || props.allVariantOOS ? props.mfrmOutOfStockCustomText : label}\r\n \r\n {props.mfrmOutOfStockSmallParcell && (\r\n \r\n {props.mfrmContinueShoppingText}\r\n \r\n )}\r\n {/** VSI Customization - End */}\r\n
\r\n );\r\n};\r\n\r\n// Set default props\r\nAddToCart.defaultProps = {\r\n quantity: 1\r\n};\r\n\r\nexport const getLinkText = (props: IAddToCartComponentProps): string => {\r\n if (props.itemOutOfMarket || props.variantOutOfStock) {\r\n return 'Item not available';\r\n }\r\n let productToAdd = props.data.product;\r\n if (!(props.getSelectedProduct === undefined)) {\r\n props.getSelectedProduct.\r\n then((product) => {\r\n productToAdd = product || props.data.product;\r\n }).\r\n catch((err) => console.log(err));\r\n // if props.getSelectedProduct has master product, than take it from data.product\r\n if (!productToAdd?.MasterProductId) {\r\n productToAdd = props.data.product;\r\n }\r\n }\r\n const getCount = [productToAdd, ...(props.adjustableItem.foundation ? [props.adjustableItem.foundation] : []), ...(props.pillow?.pillow ? [props.pillow.pillow] : []), ...(props.protector?.protector ? [props.protector.protector] : [])].length;\r\n return shouldShowOutOfStock(props, false) ? props.outOfStockText : (getCount > 1 ? props.addToCartProductsText?.replace('{itemcount}', getCount.toString()) : props.addToCartText);\r\n};\r\n\r\nconst addToCartError = (props: IAddToCartComponentProps): IAddToCartFailureResult | undefined => {\r\n const {\r\n data,\r\n productAvailability,\r\n isCustomPriceSelected,\r\n customPriceAmount,\r\n maximumKeyInPrice,\r\n minimumKeyInPrice,\r\n defaultMaximumKeyInPrice = 100,\r\n defaultMinimumKeyInPrice = 10\r\n } = props;\r\n\r\n if (!data || !data.product.RecordId) {\r\n // No product exists, won't be able to add to cart\r\n return { failureReason: 'EMPTYINPUT' };\r\n }\r\n\r\n if (data.product?.Dimensions) {\r\n const missingDimensions = data.product.Dimensions.filter(\r\n dimension => !(dimension.DimensionValue && dimension.DimensionValue?.Value)\r\n );\r\n\r\n if (missingDimensions?.length > 0) {\r\n // At least one dimension with no value exists on the product, won't be able to add to cart\r\n return { failureReason: 'MISSINGDIMENSION', missingDimensions: missingDimensions };\r\n }\r\n }\r\n\r\n if (shouldShowOutOfStock(props, true)) {\r\n const availableQuantity = (productAvailability && productAvailability.AvailableQuantity) || 0;\r\n const stockLeft = Math.max(availableQuantity, 0);\r\n\r\n return { failureReason: 'OUTOFSTOCK', stockLeft: stockLeft };\r\n }\r\n\r\n // When Custom price is selected, if there is no keyed-in price or keyed-in price is out of limit, should return error.\r\n if (\r\n isCustomPriceSelected &&\r\n (!customPriceAmount ||\r\n customPriceAmount > (maximumKeyInPrice || defaultMaximumKeyInPrice) ||\r\n customPriceAmount < (minimumKeyInPrice || defaultMinimumKeyInPrice))\r\n ) {\r\n return { failureReason: 'INVALIDCUSTOMAMOUNT' };\r\n }\r\n\r\n // Only allow adding to cart if not showing out of stock\r\n return undefined;\r\n};\r\n\r\nconst shouldShowOutOfStock = (props: IAddToCartComponentProps, includeCurrentQuantity: boolean): boolean => {\r\n if (\r\n props.context.app.config.enableStockCheck === undefined ||\r\n props.context.app.config.enableStockCheck === false ||\r\n props.isLoading ||\r\n props.isUpdatingDimension ||\r\n props.isAddServiceItemToCart\r\n ) {\r\n // Out of stock turn off, don't bother showing out of stock\r\n return false;\r\n }\r\n\r\n if (!props.data || !props.data.product.RecordId) {\r\n // No product exists, don't bother showing out of stock\r\n return false;\r\n }\r\n\r\n if (props.data.product?.Dimensions) {\r\n if (props.data.product.Dimensions?.find(dimension => !(dimension.DimensionValue && dimension.DimensionValue.Value))) {\r\n // At least one dimension with no value exists on the product, so also don't show out of stock\r\n return false;\r\n }\r\n }\r\n const includedQuantityNumber = includeCurrentQuantity && props.quantity ? props.quantity : 1;\r\n\r\n return props.productAvailability &&\r\n props.productAvailability.AvailableQuantity !== undefined &&\r\n props.productAvailability.AvailableQuantity >= includedQuantityNumber\r\n ? false\r\n : true;\r\n};\r\n\r\nconst isIntermediateState = (props: IAddToCartComponentProps): boolean => {\r\n if (props.data.product?.Dimensions) {\r\n if (props.data.product.Dimensions?.find(dimension => !(dimension.DimensionValue && dimension.DimensionValue.Value))) {\r\n // At least one dimension with no value exists on the product, so also not in intermediate state\r\n /** VSI Customization - Start */\r\n return true;\r\n /** VSI Customization - End */\r\n }\r\n }\r\n\r\n if (!props.isLoading && !props.isUpdatingDimension) {\r\n return false;\r\n }\r\n\r\n return true;\r\n};\r\n\r\nconst propagateResult = (props: IAddToCartComponentProps, result: ICartActionResult): void => {\r\n if (props.onAdd) {\r\n props.onAdd(result);\r\n }\r\n};\r\n\r\nconst propagateError = (props: IAddToCartComponentProps, result: IAddToCartFailureResult): void => {\r\n if (props.onError) {\r\n props.onError(result);\r\n }\r\n};\r\n\r\nexport const AddToCartComponent: React.FunctionComponent = msdyn365Commerce.createComponentOverride<\r\n // @ts-ignore\r\n IAddtoCartComponent\r\n>('AddToCart', { component: AddToCart, ...AddToCartComponentActions });\r\n\r\nexport default AddToCartComponent;\r\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { getCatalogId, IActionContext, IImageData, IImageSettings } from '@msdyn365-commerce/core';\nimport { MediaLocation, SimpleProduct } from '@msdyn365-commerce/retail-proxy';\nimport { getMediaLocationsForSelectedVariant, MediaLocationsForSelectedVariantInput } from '@msdyn365-commerce-modules/retail-actions';\n\nexport async function getValidProductImages(\n productId: number,\n channelId: number,\n actionContext: IActionContext,\n imageSettings: IImageSettings,\n selectedProduct?: SimpleProduct\n): Promise {\n const catalogId = getCatalogId(actionContext.requestContext);\n const actionInput = new MediaLocationsForSelectedVariantInput(productId, channelId, selectedProduct, catalogId);\n\n return getMediaLocationsForSelectedVariant(actionInput, actionContext)\n .then(mediaLocations => {\n if (mediaLocations) {\n return Promise.all(mediaLocations.map(async mediaLocation => validateMediaLocaionAsync(mediaLocation, imageSettings))).then(\n pairs => {\n return pairs.filter(pair => pair[1]).map(pair => pair[0]);\n }\n );\n }\n return [];\n })\n .catch(error => {\n actionContext.telemetry.exception(error);\n actionContext.telemetry.debug('Unable to get Media Locations for Selected Variant');\n return [];\n });\n}\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars, @typescript-eslint/no-unused-vars-experimental -- .\nasync function validateMediaLocaionAsync(mediaLocation: MediaLocation, imageSettings?: IImageSettings): Promise<[IImageData, boolean]> {\n const imageData = {\n src: mediaLocation.Uri || '',\n altText: mediaLocation.AltText || ''\n };\n\n if (imageData.src === '') {\n return [imageData, false];\n }\n\n return new Promise<[IImageData, boolean]>(resolve => {\n try {\n const http = new XMLHttpRequest();\n http.open('HEAD', imageData.src, true);\n\n http.addEventListener('load', () => {\n resolve([imageData, http.status === 200 || http.status === 201]);\n });\n\n http.addEventListener('error', () => {\n resolve([imageData, false]);\n });\n\n http.send();\n } catch {\n resolve([imageData, false]);\n }\n });\n}\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { ProductDimensionFull } from '@msdyn365-commerce/commerce-entities';\nimport { Carousel, ICarouselProps } from '@msdyn365-commerce/components';\nimport { IImageData, IImageSettings, Image } from '@msdyn365-commerce/core';\nimport {\n ProductDeliveryOptions,\n ProductDimension,\n ProductDimensionValue,\n ProductPrice,\n ReleasedProductType,\n SimpleProduct\n} from '@msdyn365-commerce/retail-proxy';\nimport {\n ArrayExtensions,\n FinitePromiseQueue,\n FinitePromiseQueueError,\n getDeliveryOptionsForSelectedVariant,\n GetDeliveryOptionsForSelectedVariantInput,\n getDimensionsForSelectedVariant,\n GetDimensionsForSelectedVariantInput,\n getPriceForSelectedVariant,\n getProductAvailabilitiesForSelectedVariant,\n getProductPageUrlSync,\n getSelectedVariant,\n IProductInventoryInformation,\n IPromiseQueue,\n ISelectedProduct,\n ObjectExtensions,\n PriceForSelectedVariantInput,\n ProductAvailabilitiesForSelectedVariantInput,\n SelectedVariantInput\n} from '@msdyn365-commerce-modules/retail-actions';\nimport {\n Button,\n format,\n getPayloadObject,\n getTelemetryAttributes,\n getTelemetryObject,\n IComponentNodeProps,\n IModuleProps,\n IncrementalQuantity,\n INodeProps,\n ISingleSlideCarouselProps,\n isMobile,\n ITelemetryContent,\n KeyCodes,\n Modal,\n ModalBody,\n ModalFooter,\n ModalHeader,\n NodeTag,\n onTelemetryClick,\n SingleSlideCarousel,\n TelemetryConstant,\n VariantType\n} from '@msdyn365-commerce-modules/utilities';\nimport classnames from 'classnames';\nimport { Spinner, SpinnerSize } from 'office-ui-fabric-react';\nimport React, { ReactNode } from 'react';\n\nimport {\n getBuyboxAddToCart,\n getBuyBoxInventoryLabel,\n getBuyboxKeyInPrice,\n getBuyboxProductAddToWishlist,\n getBuyboxProductDescription,\n getBuyboxProductPrice,\n getBuyboxProductRating,\n getBuyboxProductTitle,\n getBuyboxProductUnitOfMeasure,\n getQuantityLimitsMessages,\n IBuyboxAddToCartViewProps,\n IBuyboxAddToOrderTemplateViewProps,\n IBuyboxAddToWishlistViewProps,\n IBuyboxCallbacks,\n IBuyboxCommonData,\n IBuyboxExtentedProps,\n IBuyboxKeyInPriceViewProps,\n IBuyboxProductConfigureViewProps,\n IBuyboxProductQuantityViewProps,\n IBuyboxState,\n IErrorState,\n IProductDetails,\n RetailDefaultOrderQuantityLimitsFeatureName\n} from '../../common';\nimport { getBuyboxProductConfigure } from '../../common/buybox-product-configure';\nimport { IQuickviewData } from './quickview.data';\nimport { IQuickviewProps, IQuickviewResources } from './quickview.props.autogenerated';\nimport { getProductDetails } from './utilities/get-product-details';\nimport { getValidProductImages } from './utilities/get-valid-product-images';\nimport { RecentlyViewedState } from '../recently-viewed';\n\n/**\n * QuickView props Interface.\n */\nexport interface IQuickviewViewProps extends IQuickviewProps {\n quickView: IModuleProps;\n quickViewButton: React.ReactNode;\n ModalContainer: IModuleProps;\n ModalHeaderContainer: INodeProps;\n ModalHeaderContent: React.ReactNode;\n ModalFooterContainer: INodeProps;\n ModalBodyContainer: INodeProps;\n cartContainerProps: INodeProps;\n state: IBuyboxState;\n ModuleProps?: IModuleProps;\n ProductInfoContainerProps: INodeProps;\n MediaGalleryContainerProps: INodeProps;\n callbacks?: IBuyboxCallbacks;\n title?: React.ReactNode;\n description?: React.ReactNode;\n configure?: IBuyboxProductConfigureViewProps;\n inventoryLabel?: React.ReactNode;\n rating?: React.ReactNode;\n price?: React.ReactNode;\n addToCart?: IBuyboxAddToCartViewProps;\n addToOrderTemplate?: IBuyboxAddToOrderTemplateViewProps;\n addToWishlist?: IBuyboxAddToWishlistViewProps;\n max: number | undefined;\n keyInPrice?: IBuyboxKeyInPriceViewProps;\n quantity?: IBuyboxProductQuantityViewProps;\n quantityLimitsMessages?: React.ReactNode;\n CarouselProps: INodeProps;\n Thumbnails: IQuickViewThumbnailsViewProps;\n seeDetailsbutton: React.ReactNode;\n isModalOpen: boolean;\n loading?: React.ReactNode;\n unitOfMeasure?: React.ReactNode;\n productDetails?: IProductDetails | undefined;\n isMobileDevice?: boolean;\n}\n\n/**\n * QuickView extend props Interface.\n */\nexport interface IQuickviewExtentedProps extends IQuickviewProps {\n selectedProductId?: number;\n selectedDimensions?: ProductDimension[];\n}\n\n/**\n * QuickView thumbnails props Interface.\n */\nexport interface IQuickViewThumbnailsViewProps {\n ThumbnailsContainerProps: INodeProps;\n SingleSlideCarouselComponentProps: INodeProps;\n items?: IQuickViewThumbnailItemViewProps[];\n}\n\n/**\n * QuickView thumbnail item view props Interface.\n */\nexport interface IQuickViewThumbnailItemViewProps {\n ThumbnailItemContainerProps: INodeProps;\n Picture: React.ReactElement;\n}\n\n/**\n * QuickView state Interface.\n */\nexport interface IQuickViewState extends IBuyboxState {\n isDataLoaded: boolean;\n}\n\n/**\n *\n * Quickview component.\n * @extends {React.Component>}\n */\nclass Quickview extends React.Component, IQuickViewState> {\n /**\n * A queue of tasks of processing the changes in the dimensions.\n * Limit to two processes:\n * 1 - for the current process, which is under execution at the moment.\n * 2 - next process, which will process the latest version of data.\n * @remark Enqueueing new promises will discard the previous ones (except the one which is under processing).\n */\n private readonly dimensionUpdateQueue: IPromiseQueue = new FinitePromiseQueue(2);\n\n private dimensions: { [id: number]: string } = {};\n\n private readonly telemetryContent: ITelemetryContent;\n\n private productDetails: IProductDetails | undefined;\n\n private readonly quickViewCallbacks: IBuyboxCallbacks = {\n updateQuantity: (newQuantity: number): boolean => {\n const errorState = { ...this.state.errorState };\n errorState.quantityError = undefined;\n errorState.otherError = undefined;\n\n this.setState({ quantity: newQuantity, errorState });\n return true;\n },\n updateErrorState: (newErrorState: IErrorState): void => {\n this.setState({ errorState: newErrorState });\n },\n updateSelectedProduct: (\n newSelectedProduct: Promise,\n newInventory: IProductInventoryInformation | undefined,\n newPrice: ProductPrice | undefined,\n newDeliveryOptions: ProductDeliveryOptions | undefined\n ): void => {\n this.setState({\n selectedProduct: newSelectedProduct,\n productAvailableQuantity: newInventory,\n productDeliveryOptions: newDeliveryOptions\n });\n this._updatePrice(newPrice);\n },\n dimensionSelectedAsync: async (selectedDimensionId: number, selectedDimensionValueId: string): Promise => {\n this.dimensions[selectedDimensionId] = selectedDimensionValueId;\n return this.dimensionUpdateQueue\n .enqueue(async () => {\n return this._updateDimensions();\n })\n .catch((error: unknown) => {\n // Ignore discarded processes.\n if (error !== FinitePromiseQueueError.ProcessWasDiscardedFromTheQueue) {\n throw error;\n }\n });\n },\n getDropdownName: (dimensionType: number, resources: IQuickviewResources): string => {\n return this._getDropdownName(dimensionType, resources);\n },\n changeModalOpen: (isModalOpen: boolean): void => {\n this._hideQuickViewDialog();\n },\n changeUpdatingDimension: (isUpdatingDimension: boolean): void => {\n this.setState({ isUpdatingDimension });\n },\n updateKeyInPrice: (customPrice: number): void => {\n // Remove custom amount error when updating the custom price\n const errorState = { ...this.state.errorState };\n errorState.customAmountError = undefined;\n\n this.setState({ isPriceKeyedIn: true, keyInPriceAmount: customPrice, errorState });\n this._updatePrice(this.state.productPrice, customPrice);\n }\n };\n\n private readonly defaultGalleryImageSettings: IImageSettings = {\n viewports: {\n xs: { q: 'w=767&h=767&m=8', w: 0, h: 0 },\n sm: { q: 'w=600&h=600&m=8', w: 0, h: 0 },\n md: { q: 'w=600&h=772&m=8', w: 0, h: 0 },\n lg: { q: 'h=772&m=8', w: 0, h: 0 }\n },\n lazyload: true,\n cropFocalRegion: true\n };\n\n private readonly defaultThumbnailImageSettings: IImageSettings = {\n viewports: {\n xs: { q: 'w=100&m=8', w: 100, h: 0 },\n lg: { q: 'w=100&m=8', w: 100, h: 0 }\n },\n lazyload: true,\n cropFocalRegion: true\n };\n\n public constructor(props: IQuickviewProps) {\n super(props);\n this.state = {\n modalOpen: false,\n quantity: 1,\n min: undefined,\n max: undefined,\n errorState: {\n configureErrors: {}\n },\n selectedProduct: undefined,\n productPrice: undefined,\n productDeliveryOptions: undefined,\n isUpdatingDimension: false,\n activeIndex: 0,\n animating: false,\n mediaGalleryItems: undefined,\n isDataLoaded: false\n };\n\n this._quickViewCloseButtonclick = this._quickViewCloseButtonclick.bind(this);\n this.telemetryContent = getTelemetryObject(props.context.request.telemetryPageName!, props.friendlyName, props.telemetry);\n }\n\n /**\n * React should component udpate function.\n * @param nextProps - Next Props.\n * @param nextState - Next State.\n * @returns Boolean - Whether the module will rerender or not.\n */\n public shouldComponentUpdate(nextProps: IQuickviewProps, nextState: IBuyboxState): boolean {\n if (this.state === nextState && this.props.data === nextProps.data) {\n return false;\n }\n return true;\n }\n\n public render(): JSX.Element | null {\n const {\n config: { className = '' },\n resources\n } = this.props;\n const { max } = this.state;\n const product = this.productDetails?.product ? this.productDetails.product : undefined;\n const props = this.props as IBuyboxExtentedProps;\n const defaultMinimumKeyInPrice = 10;\n const defaultMaximumKeyInPrice = 100;\n const isMobileDevice = isMobile({ variant: VariantType.Viewport, context: this.props.context.request }) === 'xs';\n const viewprops: IQuickviewViewProps = {\n ...(this.props as IQuickviewExtentedProps),\n state: this.state,\n productDetails: this.productDetails,\n isModalOpen: this.state.modalOpen!,\n quickView: {\n moduleProps: this.props,\n className: classnames('ms-quickView', className),\n tag: 'div'\n },\n isMobileDevice,\n quickViewButton: (\n \n ),\n ModalContainer: {\n moduleProps: this.props,\n tag: Modal,\n className: 'ms-quickView__dialog',\n isOpen: this.state.modalOpen,\n 'aria-label': format(resources.quickViewAriaLabel, this.productDetails?.product?.Name),\n toggle: this._quickViewCloseButtonclick,\n modalTransition: { timeout: 0 },\n shouldUpdateFocusToFirstElement: this.state.isDataLoaded\n },\n ModalHeaderContainer: {\n tag: ModalHeader,\n className: 'ms-quickView__header',\n toggle: this._quickViewCloseButtonclick\n },\n ModalFooterContainer: {\n tag: ModalFooter,\n className: 'ms-quickView__footer'\n },\n ModalHeaderContent: '',\n ModalBodyContainer: {\n tag: ModalBody,\n className: 'ms-quickView__body'\n },\n cartContainerProps: {\n className: 'ms-quickView__product-add-to-cart'\n },\n ProductInfoContainerProps: {\n className: 'ms-quickView__content'\n },\n MediaGalleryContainerProps: {\n className: 'ms-quickView__media-gallery'\n },\n seeDetailsbutton: this._renderSeeDetailButton(product),\n loading: !this.state.isDataLoaded && (\n \n ),\n callbacks: this.quickViewCallbacks,\n title: this.state.isDataLoaded && getBuyboxProductTitle(props, this.productDetails),\n description: this.state.isDataLoaded && getBuyboxProductDescription(props, this.productDetails),\n configure: this.state.isDataLoaded\n ? getBuyboxProductConfigure(props, this.state, this.quickViewCallbacks, this.productDetails, this.props.selectedDimensions)\n : undefined,\n price: this.state.isDataLoaded && getBuyboxProductPrice(props, this.state),\n unitOfMeasure: this.state.isDataLoaded && getBuyboxProductUnitOfMeasure(props, this.productDetails),\n rating:\n this.state.isDataLoaded && !this.props.context.app.config.hideRating && getBuyboxProductRating(props, this.productDetails),\n addToCart: this.state.isDataLoaded\n ? getBuyboxAddToCart(\n props,\n this.state,\n this.quickViewCallbacks,\n defaultMinimumKeyInPrice,\n defaultMaximumKeyInPrice,\n this.productDetails\n )\n : undefined,\n keyInPrice:\n this.state.isDataLoaded && this.props.config.enableKeyInPrice && this.state.isCustomPriceSelected\n ? getBuyboxKeyInPrice(props, this.state, this.quickViewCallbacks)\n : undefined,\n quantity: product?.IsGiftCard ? undefined : this._renderQuantity(this.props, this.state, this.quickViewCallbacks),\n inventoryLabel: this.state.isDataLoaded && getBuyBoxInventoryLabel(props, this.productDetails),\n addToWishlist: this.state.isDataLoaded\n ? getBuyboxProductAddToWishlist(props, this.state, this.quickViewCallbacks, this.productDetails)\n : undefined,\n quantityLimitsMessages: this.state.isDataLoaded && getQuantityLimitsMessages(props, this.state),\n max,\n CarouselProps: this._renderCarousel(),\n Thumbnails: this._renderThumbnails()\n };\n\n return this.props.renderView(viewprops) as React.ReactElement;\n }\n\n /**\n * Method to render detail button on quick view.\n * @param product - Simple product object.\n * @returns JSX element.\n */\n private readonly _renderSeeDetailButton = (product: SimpleProduct | undefined): JSX.Element => {\n const { config } = this.props;\n const payLoad = getPayloadObject('click', this.telemetryContent, TelemetryConstant.seeDetails, '');\n const attributes = getTelemetryAttributes(this.telemetryContent, payLoad);\n\n return (\n \n {config.seeDetailsLinkText}\n \n );\n };\n\n /**\n * Method to return carousel.\n * @returns Node props.\n */\n private readonly _renderCarousel = (): INodeProps => {\n const { config, resources } = this.props;\n let mediaGalleryItems: ReactNode[];\n let keys: (string | undefined)[];\n const galleryImageSettings = config.galleryImageSettings;\n if (galleryImageSettings) {\n galleryImageSettings.cropFocalRegion = true;\n }\n\n if (ArrayExtensions.hasElements(this.state.mediaGalleryItems)) {\n mediaGalleryItems = this.state.mediaGalleryItems.map((item: IImageData, index: number) => {\n return this._renderCarouselItemImageView(item, galleryImageSettings || this.defaultGalleryImageSettings, index);\n });\n keys = [...this.state.mediaGalleryItems.map(item => item.src)];\n } else {\n mediaGalleryItems = [this._renderEmptyImage(galleryImageSettings)];\n keys = ['empty'];\n }\n\n const props: IComponentNodeProps = {\n tag: Carousel,\n className: 'ms-media-gallery__carousel',\n items: mediaGalleryItems,\n activeIndex: this.state.activeIndex ?? 0,\n next: this.next,\n previous: this.previous,\n interval: false,\n directionTextPrev: resources.previousScreenshotFlipperText,\n directionTextNext: resources.nextScreenshotFlipperText,\n indicatorAriaText: resources.ariaLabelForSlide,\n onIndicatorsClickHandler: this.goToIndex,\n handleOnExited: this.onExited,\n handleOnExiting: this.onExiting,\n key: keys\n };\n\n return props;\n };\n\n /**\n * Method to render thumbnails.\n * @returns QuickView Thumbnails view props.\n */\n private readonly _renderThumbnails = (): IQuickViewThumbnailsViewProps => {\n const { config, id, resources } = this.props;\n\n const thumbnailImageSettings = config.thumbnailImageSettings;\n if (thumbnailImageSettings) {\n thumbnailImageSettings.cropFocalRegion = true;\n }\n\n let mediaGalleryItems: IQuickViewThumbnailItemViewProps[];\n let keys: (string | undefined)[];\n if (ArrayExtensions.hasElements(this.state.mediaGalleryItems)) {\n mediaGalleryItems = this.state.mediaGalleryItems.map((item: IImageData, index: number) => {\n return this._getThumbnailItem(\n item,\n thumbnailImageSettings ?? this.defaultThumbnailImageSettings,\n index,\n this.state.activeIndex!\n );\n });\n keys = [...this.state.mediaGalleryItems.map(item => item.src)];\n } else {\n mediaGalleryItems = [];\n keys = [];\n }\n\n return {\n ThumbnailsContainerProps: { className: 'ms-media-gallery__thumbnails-container' },\n SingleSlideCarouselComponentProps: {\n tag: SingleSlideCarousel,\n className: 'ms-media-gallery__thumbnails',\n flipperPrevLabel: resources.previousScreenshotFlipperText,\n flipperNextLabel: resources.nextScreenshotFlipperText,\n parentId: id,\n useTabList: true,\n key: JSON.stringify(keys)\n } as IComponentNodeProps,\n items: mediaGalleryItems\n };\n };\n\n private _updateMediaItems(lastUpdatedTime: number): void {\n const product = this.productDetails?.product;\n if (!this.state.mediaGalleryItems && product?.PrimaryImageUrl) {\n this.setState({\n mediaGalleryItems: [this._mapProductToImageData(product)],\n lastUpdate: lastUpdatedTime\n });\n }\n }\n\n private _updatePrice(newPrice: ProductPrice | undefined, customPrice: number | undefined = this.state.keyInPriceAmount): void {\n if (this.state.isCustomPriceSelected && newPrice) {\n newPrice.CustomerContextualPrice = customPrice;\n }\n this.setState({ productPrice: newPrice });\n }\n\n private readonly _updateDimensions = async (): Promise => {\n const {\n context: {\n actionContext,\n request: {\n apiSettings: { channelId }\n }\n }\n } = this.props;\n\n const { product, productDimensions } = this.productDetails!;\n\n if (!product || !productDimensions) {\n return;\n }\n\n const dimensionsToUpdate: { [id: number]: string } = { ...this.dimensions };\n this.setState({ isUpdatingDimension: true });\n\n // Step 1: Clear error state to display relevant errors\n if (this.state.errorState.otherError || this.state.errorState.quantityError) {\n const clearErrorState = { ...this.state.errorState };\n clearErrorState.otherError = undefined;\n if (this.state.errorState.errorHost === 'ADDTOCART') {\n clearErrorState.quantityError = undefined;\n clearErrorState.errorHost = undefined;\n }\n this.setState({ errorState: clearErrorState });\n }\n\n // Step 2: Clear any errors indicating the dimension wasn't selected\n for (const key of Object.keys(dimensionsToUpdate)) {\n if (this.state.errorState.configureErrors[key]) {\n const errorState = { ...this.state.errorState };\n errorState.configureErrors[key] = undefined;\n\n this.setState({ errorState });\n }\n }\n\n // Step 3, Build the actually selected dimensions, prioritizing the information in state\n // over the information in data\n const mappedDimensions = productDimensions\n .map(dimension => {\n return {\n DimensionTypeValue: dimension.DimensionTypeValue,\n DimensionValue:\n this._updateDimensionValue(dimension, dimensionsToUpdate[dimension.DimensionTypeValue]) || dimension.DimensionValue,\n ExtensionProperties: dimension.ExtensionProperties\n };\n })\n .filter(dimension => {\n return dimension && dimension.DimensionValue;\n });\n\n // Step 4. Use these dimensions hydrate the product. Wrap this in a promise\n // so that places like add to cart can await it\n const selectedProduct = new Promise(async resolve => {\n const newProduct = await getSelectedVariant(\n new SelectedVariantInput(\n product.MasterProductId ? product.MasterProductId : product.RecordId,\n channelId,\n mappedDimensions,\n undefined,\n this.props.context.request\n ),\n actionContext\n );\n if (newProduct) {\n // @ts-expect-error\n this.productDetails.productDimensions = await getDimensionsForSelectedVariant(\n new GetDimensionsForSelectedVariantInput(\n newProduct.MasterProductId ? newProduct.MasterProductId : newProduct.RecordId,\n channelId,\n mappedDimensions,\n this.props.context.request\n ),\n actionContext\n );\n }\n\n resolve(newProduct);\n });\n\n this.setState({ selectedProduct });\n const variantProduct = await selectedProduct;\n\n if (variantProduct && this.productDetails) {\n // Step 5. Use these dimensions hydrate the inventory. Wrap this in a promise\n // so that places like add to cart can await it\n this.productDetails.product = variantProduct;\n const images = await getValidProductImages(\n this.productDetails.product.RecordId || 0,\n +this.props.context.request.apiSettings.channelId,\n this.props.context.actionContext,\n this.props.config.thumbnailImageSettings || this.defaultThumbnailImageSettings,\n variantProduct.productVariant ?? variantProduct\n );\n this.setState({\n mediaGalleryItems: [...images],\n activeIndex: 0,\n lastUpdate: Date.now()\n });\n\n const newAvailableQuantity = await getProductAvailabilitiesForSelectedVariant(\n new ProductAvailabilitiesForSelectedVariantInput(variantProduct.RecordId, channelId),\n actionContext\n );\n\n this.productDetails.productAvailableQuantity = newAvailableQuantity!;\n\n const isCustompriceSelected = variantProduct.Dimensions?.find(\n dimension => dimension.DimensionTypeValue === 4 && dimension.DimensionValue?.Value?.toLowerCase() === 'custom'\n );\n\n if (isCustompriceSelected) {\n this.setState({ isCustomPriceSelected: true });\n } else {\n // Remove custom amount error when unselect the custom amount\n const errorState = { ...this.state.errorState };\n errorState.customAmountError = undefined;\n\n this.setState({ isCustomPriceSelected: false, isPriceKeyedIn: false, errorState });\n }\n\n if (newAvailableQuantity && newAvailableQuantity.length > 0) {\n this.setState({ productAvailableQuantity: newAvailableQuantity[0] });\n } else {\n this.setState({ productAvailableQuantity: undefined });\n }\n\n // Step 6. Use these dimensions hydrate the product price.\n const newPrice = await getPriceForSelectedVariant(\n new PriceForSelectedVariantInput(variantProduct.RecordId, channelId),\n actionContext\n );\n\n if (newPrice) {\n this._updatePrice(newPrice);\n }\n\n const RetailMulitplePickupMFeatureState = this.props.data.featureState.result?.find(\n featureState => featureState.Name === 'Dynamics.AX.Application.RetailMultiplePickupDeliveryModeFeature'\n );\n\n // Step 7. Use these dimensions hydrate the product delivery options.\n const newDeliveryOptions = await getDeliveryOptionsForSelectedVariant(\n new GetDeliveryOptionsForSelectedVariantInput(\n variantProduct.RecordId,\n channelId,\n undefined,\n undefined,\n RetailMulitplePickupMFeatureState?.IsEnabled\n ),\n actionContext\n );\n\n if (newDeliveryOptions) {\n this.setState({ productDeliveryOptions: newDeliveryOptions });\n }\n\n this.setState({ isUpdatingDimension: false });\n await this._updateQuantitiesInState(variantProduct);\n }\n };\n\n private _getProductURL(product: SimpleProduct | undefined): string {\n if (product) {\n let producturl = ' ';\n producturl = getProductPageUrlSync(\n product.Name || '',\n product.RecordId,\n this.props.context && this.props.context.actionContext,\n undefined\n );\n return producturl;\n }\n return '';\n }\n\n private async _updateQuantitiesInState(product: SimpleProduct): Promise {\n const isOrderQuantityLimitsFeatureEnabled = await this._isOrderQuantityLimitsFeatureEnabled();\n const defaultQuantity = 1;\n const defaultMaxQuantity = 10;\n if (isOrderQuantityLimitsFeatureEnabled && product) {\n // For some of the products the DefaultQuantity is zero\n this.setState({\n min: product.Behavior?.MinimumQuantity || defaultQuantity,\n\n // If max by feature in default order settings is not defined then use max from site settings or default max 10.\n max:\n product.Behavior?.MaximumQuantity && product.Behavior?.MaximumQuantity > 0\n ? product.Behavior?.MaximumQuantity\n : this.props.context.app.config.maxQuantityForCartLineItem || defaultMaxQuantity\n });\n } else {\n this.setState({\n min: 1,\n max: this.props.context.app.config.maxQuantityForCartLineItem || 10\n });\n }\n }\n\n private readonly _updateDimensionValue = (\n productDimensionFull: ProductDimensionFull,\n newValueId: string | undefined\n ): ProductDimensionValue | undefined => {\n if (newValueId && productDimensionFull.DimensionValues) {\n return productDimensionFull.DimensionValues.find(dimension => dimension.RecordId === +newValueId);\n }\n\n return undefined;\n };\n\n private readonly _getDropdownName = (dimensionType: number, resources: IQuickviewResources): string => {\n const isGiftCard = this.productDetails?.product?.IsGiftCard;\n\n switch (dimensionType) {\n case 1: // ProductDimensionType.Color\n return resources.productDimensionTypeColor;\n case 2: // ProductDimensionType.Configuration\n return resources.productDimensionTypeConfiguration;\n case 3: // ProductDimensionType.Size\n return resources.productDimensionTypeSize;\n case 4: // ProductDimensionType.Style\n return isGiftCard ? resources.productDimensionTypeAmount : resources.productDimensionTypeStyle;\n default:\n return '';\n }\n };\n\n private async _isOrderQuantityLimitsFeatureEnabled(): Promise {\n const defaultOrderQuantityLimitsFeatureConfig = this.props.context.request.app.platform?.enableDefaultOrderQuantityLimits;\n if (defaultOrderQuantityLimitsFeatureConfig === 'none') {\n return false;\n }\n\n const featureStatuses = await this.props.data.featureState;\n const isFeatureEnabledInHq = featureStatuses.find(featureState => featureState.Name === RetailDefaultOrderQuantityLimitsFeatureName)\n ?.IsEnabled;\n if (!isFeatureEnabledInHq) {\n return false;\n }\n\n if (defaultOrderQuantityLimitsFeatureConfig === 'all') {\n return true;\n }\n let customerInfo;\n try {\n customerInfo = await this.props.data.customerInformation;\n } catch (error) {\n this.props.telemetry.information(error);\n this.props.telemetry.debug('Unable to receive Customer Information. May be user is not authorized');\n return false;\n }\n\n return (\n customerInfo !== undefined &&\n ((defaultOrderQuantityLimitsFeatureConfig === 'b2b' && customerInfo.IsB2b) ||\n (defaultOrderQuantityLimitsFeatureConfig === 'b2c' && !customerInfo.IsB2b))\n );\n }\n\n private readonly onExiting = () => {\n this.setState({ animating: true });\n };\n\n private readonly onExited = () => {\n this.setState({ animating: false });\n };\n\n private readonly next = (): void => {\n if (this.isLastItem() === undefined) {\n return;\n }\n\n const nextIndex = this.isLastItem() ? 0 : this.state.activeIndex! + 1;\n this.goToIndex(nextIndex);\n };\n\n private readonly previous = (): void => {\n const nextIndex = this.isFirstItem()\n ? this.state.mediaGalleryItems\n ? this.state.mediaGalleryItems.length - 1\n : 0\n : this.state.activeIndex! - 1;\n this.goToIndex(nextIndex);\n };\n\n private readonly goToIndex = (index: number): void => {\n this.setState({ activeIndex: index });\n };\n\n private _renderCarouselItemImageView(image: IImageData, imageSettings: IImageSettings, index: number): React.ReactNode {\n return <>{this._getCarouselItem(image, imageSettings, index)};\n }\n\n private readonly _getCarouselItem = (image: IImageData, imageSettings: IImageSettings, index: number): React.ReactNode => (\n \n );\n\n private readonly _getThumbnailItem = (\n image: IImageData,\n imageSettings: IImageSettings,\n index: number,\n modifiedActiveIndex: number\n ): IQuickViewThumbnailItemViewProps => {\n const classes = classnames(\n 'ms-media-gallery__thumbnail-item',\n modifiedActiveIndex === index ? 'ms-media-gallery__thumbnail-item-active' : ''\n );\n\n return {\n ThumbnailItemContainerProps: {\n tag: 'li' as NodeTag,\n className: classes,\n role: 'tab',\n tabIndex: 0,\n key: index,\n 'aria-label': image.altText,\n 'aria-selected': modifiedActiveIndex === index,\n 'aria-controls': `${this.props.id}__carousel-item__${index}`,\n onClick: this._generateOnThumbnailClick(index),\n onKeyDown: this._generateOnThumbnailKeyDown(index)\n },\n Picture: (\n \n )\n };\n };\n\n private readonly _generateOnThumbnailKeyDown = (index: number) => {\n return (event: React.KeyboardEvent) => {\n if (event.which === KeyCodes.Enter || event.which === KeyCodes.Space) {\n event.preventDefault();\n this.goToIndex(index);\n }\n };\n };\n\n private readonly _generateOnThumbnailClick = (index: number) => {\n return (event: React.MouseEvent) => {\n event.preventDefault();\n this.goToIndex(index);\n };\n };\n\n private _mapProductToImageData(product: SimpleProduct): IImageData {\n return {\n src: product.PrimaryImageUrl || '',\n altText: product.Name\n };\n }\n\n private readonly isFirstItem = () => this.state.activeIndex === 0;\n\n private readonly isLastItem = () => this.state.mediaGalleryItems && this.state.activeIndex === this.state.mediaGalleryItems.length - 1;\n\n private readonly onClickHandler = async (event: React.MouseEvent) => {\n return this._onClick(event, this.props);\n };\n\n private readonly _onClick = async (_event: React.MouseEvent, props: IQuickviewExtentedProps) => {\n if (!ObjectExtensions.isNullOrUndefined(props.selectedProductId)) {\n const {\n context: {\n actionContext,\n request: {\n apiSettings: { channelId }\n }\n }\n } = this.props;\n\n if (this.props.selectedProductId) {\n this.setState({ modalOpen: true });\n const productId = this.props.selectedProductId;\n const selectedDimensions = this.props.selectedDimensions;\n this.productDetails = await getProductDetails(productId, channelId, actionContext, selectedDimensions);\n const { product, productPrice } = this.productDetails;\n const currentTime: number = Date.now();\n this._updateMediaItems(currentTime);\n if (productPrice) {\n this._updatePrice(productPrice);\n }\n\n if (product) {\n const { context } = this.props;\n if (context.app.config.maxRecentlyViewedItemsCount > 0) {\n RecentlyViewedState.instance(this.props.context, context.app.config.maxRecentlyViewedItemsCount, product.RecordId);\n }\n // Check if the product is service or not by product type\n if (product.ItemTypeValue === ReleasedProductType.Service) {\n this.setState({ isServiceItem: true });\n }\n await this._updateQuantitiesInState(product);\n const images = await getValidProductImages(\n product.RecordId,\n +this.props.context.request.apiSettings.channelId,\n this.props.context.actionContext,\n this.props.config.thumbnailImageSettings || this.defaultThumbnailImageSettings,\n product.productVariant ?? product\n );\n\n this.setState({\n mediaGalleryItems: [...images],\n activeIndex: 0,\n lastUpdate: currentTime\n });\n }\n this.setState({ isDataLoaded: true });\n }\n }\n };\n\n private readonly _quickViewCloseButtonclick = () => {\n this._hideQuickViewDialog();\n };\n\n private _hideQuickViewDialog(): void {\n this.dimensions = [];\n this.setState({\n modalOpen: false,\n quantity: 1,\n min: undefined,\n max: undefined,\n errorState: {\n configureErrors: {}\n },\n selectedProduct: undefined,\n productPrice: undefined,\n productDeliveryOptions: undefined,\n isUpdatingDimension: false,\n productAvailableQuantity: undefined,\n lastUpdate: undefined,\n activeIndex: undefined,\n animating: undefined,\n mediaGalleryItems: [],\n isDataLoaded: false\n });\n }\n\n /**\n * Quantity Change Handler.\n * @param callbacks -Buybox callbacks.\n * @returns Update quantity.\n */\n private readonly onChangeHandler = (callbacks: IBuyboxCallbacks) => (newValue: number): boolean => {\n if (callbacks.updateQuantity) {\n return callbacks.updateQuantity(newValue);\n }\n return true;\n };\n\n private readonly _renderQuantity = (\n props: IQuickviewExtentedProps,\n state: IBuyboxState,\n callbacks: IBuyboxCallbacks\n ): IBuyboxProductQuantityViewProps => {\n const { resources } = props;\n\n const {\n quantity,\n max,\n errorState: { quantityError }\n } = state;\n\n return {\n ContainerProps: {\n className: 'ms-quickView__quantity'\n },\n LabelContainerProps: {\n tag: 'label',\n className: 'ms-quickView__product-quantity-label',\n htmlFor: 'ms-quickView__product-quantity-input'\n },\n heading:
{resources.productQuantityHeading}
,\n errors: quantityError && (\n \n \n ),\n input: (\n \n )\n };\n };\n\n private _renderEmptyImage(imageSettings: IImageSettings | undefined): React.ReactNode {\n return (\n
\n \n
\n );\n }\n}\nexport default Quickview;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { IActionContext } from '@msdyn365-commerce/core';\nimport { getCartStateData, GetCartStateDataInput } from '@msdyn365-commerce/global-state';\nimport { ProductDimension } from '@msdyn365-commerce/retail-proxy';\nimport {\n getDimensionsForSelectedVariant,\n GetDimensionsForSelectedVariantInput,\n getPriceForSelectedVariant,\n getProductAvailabilitiesForSelectedVariant,\n getRatingsSummary,\n GetRatingsSummaryInput,\n getRnrEndpointId,\n getRnrPartnerId,\n getSelectedVariant,\n PriceForSelectedVariantInput,\n ProductAvailabilitiesForSelectedVariantInput,\n SelectedVariantInput\n} from '@msdyn365-commerce-modules/retail-actions';\n\nimport { IProductDetails } from '../../../common/buyboxInterface';\n\n/**\n * Calls the Retail API and returns the product details.\n * @param productId\n * @param channelId\n * @param ctx\n * @param selectedDimensions - Dimensions previously selected for the product variant.\n */\nexport async function getProductDetails(\n productId: number,\n channelId: number,\n ctx: IActionContext,\n selectedDimensions?: ProductDimension[]\n): Promise {\n const productDetails: IProductDetails = {};\n\n if (productId > 0 && channelId > 0) {\n const tenantId = getRnrPartnerId(ctx);\n const serviceEndPoint = getRnrEndpointId(ctx);\n\n // Get Product Details\n await getSelectedVariant(new SelectedVariantInput(productId, channelId, selectedDimensions, 'get', ctx.requestContext), ctx)\n .then(async productResult => {\n if (productResult) {\n productDetails.product = productResult;\n }\n })\n .catch(error => {\n ctx.telemetry.exception(error);\n });\n\n // Get Product Availability\n await getProductAvailabilitiesForSelectedVariant(new ProductAvailabilitiesForSelectedVariantInput(productId, channelId), ctx)\n .then(productAvailabilities => {\n if (productAvailabilities) {\n productDetails.productAvailableQuantity = productAvailabilities;\n }\n })\n .catch(error => {\n ctx.telemetry.exception(error);\n });\n\n // Get Product Price\n await getPriceForSelectedVariant(new PriceForSelectedVariantInput(productId, channelId, undefined), ctx)\n .then(productPrice => {\n if (productPrice) {\n productDetails.productPrice = productPrice;\n }\n })\n .catch(error => {\n ctx.telemetry.exception(error);\n });\n\n // Get product dimensions\n await getDimensionsForSelectedVariant(\n new GetDimensionsForSelectedVariantInput(productId, channelId, selectedDimensions, ctx.requestContext),\n ctx\n )\n .then(productDimensions => {\n if (productDimensions) {\n productDetails.productDimensions = productDimensions;\n }\n })\n .catch(error => {\n ctx.telemetry.exception(error);\n });\n\n // Get Cart State\n await getCartStateData(new GetCartStateDataInput(ctx.requestContext.apiSettings, ctx.requestContext), ctx)\n .then(cartState => {\n productDetails.cart = cartState;\n })\n .catch(error => {\n ctx.telemetry.exception(error);\n });\n\n // Get Product Ratings\n if (tenantId && serviceEndPoint) {\n await getRatingsSummary(new GetRatingsSummaryInput(productId.toString(), tenantId, serviceEndPoint), ctx)\n .then(ratingsSummaryData => {\n if (ratingsSummaryData) {\n productDetails.ratingsSummary = ratingsSummaryData;\n }\n })\n .catch(error => {\n ctx.telemetry.exception(error);\n });\n }\n }\n\n return productDetails;\n}\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { Module, Node } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport {\n IBuyboxAddToCartViewProps,\n IBuyboxAddToWishlistViewProps,\n IBuyboxKeyInPriceViewProps,\n IBuyboxProductConfigureDropdownViewProps,\n IBuyboxProductConfigureViewProps,\n IBuyboxProductQuantityViewProps\n} from '../../common';\nimport { IQuickviewViewProps } from './quickview';\n\nconst _renderAddToCart = (addToCart: IBuyboxAddToCartViewProps): JSX.Element => {\n const { ContainerProps, errorBlock, button } = addToCart;\n\n return (\n \n {errorBlock}\n {button}\n \n );\n};\n\nconst _renderAddToWishlist = (addToWishlist: IBuyboxAddToWishlistViewProps): JSX.Element => {\n const { ContainerProps, errorBlock, button } = addToWishlist;\n\n return (\n \n {errorBlock}\n {button}\n \n );\n};\n\nconst _renderConfigureDropdown = (dropdown: IBuyboxProductConfigureDropdownViewProps): JSX.Element => {\n const { ContainerProps, LabelContainerProps, heading, errors, select } = dropdown;\n\n return (\n \n \n {heading}\n {errors}\n \n {select}\n \n );\n};\n\nconst _renderQuickViewPopup = (props: IQuickviewViewProps): JSX.Element => {\n const {\n ModalContainer,\n ModalHeaderContainer,\n ModalFooterContainer,\n ModalHeaderContent,\n ModalBodyContainer,\n addToWishlist,\n addToCart,\n cartContainerProps\n } = props;\n\n return (\n \n {ModalHeaderContent}\n {_renderBodyContent(props)}\n \n \n {addToCart && _renderAddToCart(addToCart)}\n {addToWishlist && _renderAddToWishlist(addToWishlist)}\n \n \n \n );\n};\n\nconst _renderQuantity = (quantity: IBuyboxProductQuantityViewProps, quantityLimitsMessages: React.ReactNode): JSX.Element => {\n const { ContainerProps, LabelContainerProps, heading, input, errors } = quantity;\n\n return (\n \n \n {heading}\n {errors}\n \n {input}\n {quantityLimitsMessages}\n \n );\n};\n\nconst _renderKeyInPrice = (keyInPrice: IBuyboxKeyInPriceViewProps): JSX.Element => {\n const { ContainerProps, LabelContainerProps, heading, input } = keyInPrice;\n\n return (\n \n {heading}\n {input}\n \n );\n};\n\nconst _renderConfigure = (configure: IBuyboxProductConfigureViewProps): JSX.Element => {\n const { ContainerProps, dropdowns } = configure;\n\n return {dropdowns.map(_renderConfigureDropdown)};\n};\n\nconst _renderBodyContent = (props: IQuickviewViewProps): JSX.Element => {\n const {\n title,\n price,\n rating,\n keyInPrice,\n quantity,\n configure,\n inventoryLabel,\n quantityLimitsMessages,\n seeDetailsbutton,\n loading,\n ProductInfoContainerProps,\n MediaGalleryContainerProps,\n CarouselProps,\n unitOfMeasure\n } = props;\n if (loading) {\n return <>{loading};\n }\n return (\n <>\n \n \n \n \n {title}\n {price}\n {unitOfMeasure}\n {rating}\n {configure && _renderConfigure(configure)}\n {keyInPrice && _renderKeyInPrice(keyInPrice)}\n {quantity && _renderQuantity(quantity, quantityLimitsMessages)}\n {seeDetailsbutton}\n {inventoryLabel}\n \n \n );\n};\n\n/**\n * Functional component which renders quick view button and popup based by the given props file.\n * @param {IQuickviewViewProps} props - Configuration for the quick view component.\n * @returns {React.FC} - Functional component of the quick view.\n */\nexport const QuickViewFunctionalComponent: React.FC = (props: IQuickviewViewProps) => {\n const { quickView, quickViewButton, isModalOpen, isMobileDevice } = props;\n return (\n \n {!isMobileDevice && quickViewButton}\n {isModalOpen && _renderQuickViewPopup(props)}\n \n );\n};\n\nexport default QuickViewFunctionalComponent;\n"],"names":["getSetLocalStorage","key","getSet","valueToSet","returnType","MsDyn365","localStorage","setItem","JSON","stringify","parse","getItem","getSetProductData","products","length","setCoreProductCookie","psp","typeOfProduct","toLowerCase","trim","MFRMProductTypes","setCookie","getSetProductSpec","getSetPromoCodeApplyList","getSetPromoCode","getSetGrandTotal","total","getSetBonusItemProd","globalBonusItems","getSetSelectedBonasItem","bonusItemArray","getSetBonusCouponDetail","getCoupons","getSetPrevBonasModalState","previousBonasModal","getSetBonusItemBrandName","bonusItemsBrandName","getSetDateGroupedProducts","getSetExpressFlow","express","getSetWmapCartLines","getSetCartProductPrice","priceDetails","getSetParcelInventoryData","details","DeliveryModes","coreItemShippingType","getUtagProductCategory","async","actionContext","channelId","catalogId","RecordId","categoryPathResults","getCategoryPathsAsync","callerContext","queryResultSettings","ProductId","categoryPath","CategoryPath","Segments","CategoryName","getUtagVariantId","MasterProductId","ItemId","input","BuyboxGetDimensionVariantAvailabilityInput","variantsResp","getAllProductVariants","variantIter","ePropsVariant","ExtensionProperties","eIter","Key","Value","StringValue","variantofId","slice","context","window","innerWidth","gridSettings","request","xs","w","sm","md","lg","getZipCode","ctx","geolocationZipCode","requestContext","geoLocation","zipCode","res","cookie","Cookies","zipcode","get","undefined","getGeoLocationZipCode","canonicalURL","requestUrl","url","origin","path","pathname","urlParts","split","splice","match","removePipeSignValue","removeKeywords","join","filteredURL","filter","urlPart","indexOf","removeKeywordFromUrl","app","config","removeKeywordFromUrlArray","forEach","_part","removeKeyword","trimmedKeyword","indexOfValue","getSortedVirtualRefinerConfig","isMattressesCategory","appConfigSorted","getVirtualRefinerConfig","appConfig","enableForMattresses","enableForOtherCategories","sort","a","b","order","getVirtualRefinerNames","sortedVirtualRefinerConfig","appConfigRefinerNames","sortedConfig","push","refinerName","urlModifications","getVirtualRefinerValues","virtualRefiners","virtualRefinerValues","categoryIdToken","urlTokens","recordId","finalizedUrlParts","plainUrlPart","decodeURIComponent","part","filteredPart","mainRefiner","Values","refinerValue","refinerValueKeyName","LeftValueBoundString","replace","regExSpecialChars","canonicalUrlspecialCharIncludeList","navLinkKeywordRemoval","link","linkBase","linkParams","endsWith","linkParam","map","param","includeConfigList","includeConfig","RegExp","MFITryInStoreExtensionClass","constructor","odataObject","this","ZipCode","StoreId","Products","Limit","Radius","i","className","substr","lastIndexOf","concat","EntityClasses","MFITryInStoreInfoResponseExtensionClass","Status","Message","Inventory","createMFIGetTryInStoreInfoInput","tryInStoreProductIDs","storeId","DataServiceQuery","DataServiceEntities","tryInStoresQuery","createDataServiceRequestForOperation","bypassCache","returnEntity","GetTryInStoreInfoInput","getCacheKey","getCacheObjectType","dataCacheType","Msdyn365","action","result","callActionOrExecute","mFIGetTryInStoreInfoAsync","error","console","log","id","cookies","getCookie","cookieName","cookieValue","options","set","removeCookie","remove","productId","getAllVariantsForProduct","productResponse","getByIdAsync","Paging","Top","baseProduct","Array","isArray","getVariantsByDimensionValuesAsync","telemetry","exception","Error","createObservableDataAction","inputData","query","apiSettings","itemId","isCached","pageType","priceGroupForAPICall","priceGroup","items","item","singleItem","DistinctProductVariant","requestBody","PriceGroup","Items","getEyebrowMessageInput","GetEyebrowMessageInput","getEyebrowAction","getGenericError","cart","resources","product","productAvailability","location","failureReason","addedToCartFailureMessage","cartActionResult","substatus","elementFoundAt","productIdToFind","CartLines","DeliveryMode","channel","PickupDeliveryModeCode","FulfillmentStoreId","OrgUnitNumber","curQuantity","Quantity","maxQuantityForCartLineItem","availableQty","AvailableQuantity","quantityLimit","Math","min","maxQuantityLimitText","toString","errorDetails","LocalizedMessage","getConfigureErrors","isGiftCard","dimensions","dimension","DimensionTypeValue","dimensionTypeValue","productDimensionTypeColorErrorMessage","productDimensionTypeConfigurationErrorMessage","productDimensionTypeSizeErrorMessage","productDimensionTypeAmountErrorMessage","productDimensionTypeStyleErrorMessage","getDimensionErrorString","getBuyBoxInventoryLabel","props","productDetails","typeName","productAvailableQuantity","data","_getClassNamePrefix","StockLevelLabel","inventoryClassName","StockLevelCode","React","getBuyboxProductTitle","brandName","titleHeadingTag","title","Name","Heading","headingTag","text","telemetryContent","getBuyboxAddToCart","state","callbacks","defaultMinimumKeyInPrice","defaultMaximumKeyInPrice","minimumKeyInPrice","maximumKeyInPrice","quantity","errorState","configureErrors","quantityError","customAmountError","otherError","errorHost","selectedProduct","isUpdatingDimension","isUpdatingDeliveryOptions","isServiceItem","keyInPriceAmount","ProductAvailableQuantity","dialogStrings","goToCartText","buyBoxGoToCartText","continueShoppingText","buyBoxContinueShoppingText","headerItemOneText","buyBoxSingleItemText","headerItemFormatText","buyBoxMultiLineItemFormatText","headerMessageText","buyBoxHeaderMessageText","freePriceText","priceFree","originalPriceText","currentPriceText","addedQuantityText","closeNotificationLabel","defaultImageSettings","viewports","q","h","xl","lazyload","isLoading","status","changeUpdatingDimension","isLoadingDeliveryOptions","deliveryOptions","changeUpdatingDeliveryOptions","getTelemetryObject","telemetryPageName","emailDeliveryModeCode","EmailDeliveryModeCode","isEmailDelivery","ArrayExtensions","DeliveryOptions","Code","ContainerProps","button","AddToCartComponent","addToCartText","outOfStockText","navigationUrl","getUrlSync","price","productPrice","onError","quantityErrorForState","customAmountErrorForState","otherErrorForState","stockLeft","errorMessageOutOfStock","errorMessageOutOfRangeOneLeft","errorMessageOutOfRangeFormat","getQuantityError","formatedAmountLimit","cultureFormatter","formatCurrency","invalidSmallCustomAmountText","invalidLargeCustomAmountText","updateErrorState","missingDimensions","IsGiftCard","getSelectedProduct","imageSettings","isAddServiceItemToCart","isPriceKeyedIn","customPriceAmount","isCustomPriceSelected","isOrderQuantityLimitsFeatureEnabled","_isOrderQuantityLimitsFeatureEnabled","isAddEmailDeliveryItemToCart","onAdd","changeModalOpen","isNavigationToCartPageDisabled","errorBlock","BuyboxErrorBlock","showError","getBuyboxProductPrice","PriceComponent","getBuyboxKeyInPrice","LabelContainerProps","tag","htmlFor","heading","buyboxKeyInPriceLabelHeading","type","onChange","e","value","currentTarget","updateKeyInPrice","Number","parseFloat","max","errorMessages","Object","values","message","Alert","isOpen","color","assertive","buyboxErrorMessageHeader","index","getQuantityLimitsMessages","Node","_renderMaxLabel","maxQuantityText","_renderMinLabel","minQuantityText","MAX_VALUE","defaultOrderQuantityLimitsFeatureConfig","platform","enableDefaultOrderQuantityLimits","customerInfo","customerInformation","IsB2b","getBuyboxFindInStore","slots","storeSelector","findInStoreHeaderText","findInStoreDescriptionText","findInStoreLinkText","storeSelectorStateManager","modalOpen","onClick","modules","dataProduct","Dimensions","DimensionValue","storeSelectorId","keys","openDialog","onLocationSelected","orgUnitLocation","deliveryMode","Promise","resolve","behavior","addToCartBehavior","addProductToCart","count","then","failureResult","AddToCartBehavior","assign","friendlyName","notification","ItemSuccessfullyAddedToCartNotification","NotificationsManager","addNotification","catch","debug","findInStoreOnClick","find","option","priceComponent","popupProps","productQuantity","setModalOpen","renderModalPopup","Popup","openFindInStoreDialog","description","productPickupOptionList","errors","disabled","modal","updateViewPort","viewport","_getViewPort","BuyboxShopSimilarItems","BuyboxKeyInPrice","BuyboxCustomerSatisfactionScore","unitsReturned","unitsSold","headingText","popoverText","tooltipHover","percentNotReturned","round","unitsNotReturend","avgRating","Tooltip","trigger","Info","height","width","position","hover","toLocaleString","Rating","name","defaultValue","readOnly","precision","getProductSpecNumber","productSpecificationData","rawValue","TextValue","getProductSpecText","NaN","displayName","ref","useRef","handleClick","event","current","contains","target","onClickOutside","useEffect","document","addEventListener","removeEventListener","BuyboxStoreHours","storeHoursClosedText","storeCloseAtHours","storeOpenAtHours","isClosedToday","x","BooleanValue","isClosed","startTime","IntegerValue","endTime","timeZone","timeZoneAbbr","getTimeZoneAbbr","secondsToTime","BuyboxStoreDetails","isSociEnabled","sociPrefferedStore","storeAddressLine1","storeAddressLine2","phoneNumber","preferredStore","sociStoreLocatorUrl","storeLocatorUrl","onClickNameOrDetails","viewStoreDetailsText","onClickChangeStore","changeStoreText","city","postalcode","href","role","Open","children","BuyboxTryInStoreRedesign","isOnlineOnly","availableInStoresTextV2","notAvailableInStoresTextV2","canTryInStores","tryInStoresResults","isStoreDetailsOpen","useClickOutside","sociStoreName","storeName","OrgUnitName","storeNameWithState","State","isAvailable","storeLocatorContext","Contacts","ContactTypeValue","tabIndex","address1","Street","address2","City","Zip","phone","extractPhoneNumber","website_url","Locator","Address","_scrollToBVHosted","ratingSection","getElementById","getElementsByTagName","getAttribute","scrollIntoView","BuyboxProductRating","hideRating","isBazaarVoice","variantId","productSpecification","BVRatingSummary","averageRating","getBVAttributeValues","reviewsCount","RatingComponent","ariaLabel","format","averageRatingAriaLabel","ratingCount","getProductURLForUtag","productUrl","getProductPageUrlSync","getProductSizeForUTag","Buybox","super","updateSuccessfulATC","setState","successfulATC","timer","setTimeout","dimensionUpdateQueue","FinitePromiseQueue","buyboxCallbacks","updateQuantity","newQuantity","fireAnalyticsLink","eventName","eventCategory","eventAction","eventLabel","eventNoninteraction","generalConfig","enhanced_action","newErrorState","dimensionSelectedAsync","selectedDimensionId","selectedDimensionValueId","enqueue","_updateDimensions","reason","FinitePromiseQueueError","getDropdownName","dimensionType","_getDropdownName","isModalOpen","customPrice","_updatePrice","_updateQueryParamVariantId","currUrl","urlWithIgnoredCase","URL","toLocaleLowerCase","searchParams","has","variantQueryStringName","history","replaceState","host","_setRecentlyViewProducts","masterProductId","date","Date","setDate","getDate","expiry","inserted","recentlyViewedProductsStored","recentlyViewedProducts","_setSmallParcelATPCallMade","atpCallMade","smallParcelATCallMade","_setStatusATPCall","StatusATPCall","_setZipCode","_setATPCall","ATPCall","_updateDimensionValue","productDimensionFull","newValueId","DimensionValues","productDimensionTypeColor","productDimensionTypeConfiguration","productDimensionTypeSize","productDimensionTypeAmount","productDimensionTypeStyle","_getPreferredStore","localStoragePreferredStore","_getSociPreferredStore","_getProductSpecificationAttributeByKeyName","attrName","attr","_getProductType","shippingInformation","_updateUtagDataOnInitialLoad","productprice","allCategoriesArr","categoryPaths","categoryObj","categoryName","attribute","brandBackofficeAttributePdp","productBrandName","currAttribute","productSize","listPageStateBuyBox","_getVariantIDOnLoad","CustomerContextualPrice","BasePrice","productImageUrl","PrimaryImageUrl","allProductVariants","_getProductAttributeUpdated","shippingInformationSmall","smallParcelAttributeKey","_updateAvailbilityForVariantsUpdated","allVariants","variantsResult","availableVariantIDs","eComAllVariantsOOSMultiAttr","ecomAllVairantStockInfoKey","ecomAllVairantStockInfoKey1","ecomAllVairantStockInfoKey2","ecomAllVairantStockInfoKey3","getAttributeValuesAsync","ecomAllVairantStockInfoConcatenated","ecomVairantStockInfoKey1","ecomVairantStockInfoKey2","ecomVairantStockInfoKey3","ecomAllVairantStockInfo1","ecomAllVairantStockInfo2","ecomAllVairantStockInfo3","eComJsonData","newAllVariantStockInfo","VariantList","VariantRecID","OutOfStock","outOfStockBoolean","variant","variantID","productType","batchedAtp","_coreProductATPCallForInventoryStatusForAllVariants","batchedAtpInventoryStatusData","setDefaultOOSVariant","variantAvailibilityList","_updateUtagData","updatedProduct","updatedPrice","getVariantID","finalPrice","utag","product_price","product_variant","product_url","product_image_url","product_size","utag_data","_sendProductDataToTealium","tealiumRecordIdFor","event_category","event_action","event_label","event_noninteraction","product_id","product_name","product_category","product_brand","variantIdForTracking","_eyeBrowMessageAsyncFunc","productIdsArray","eyebrowMessageObj","eyebrowMessageResult","_getEyebrowMessage","eyebrowMessageResultState","isEyeBrowLoading","getDeliverySlotFromATP","itemLinesArray","weeksPDPforATPCall","itemLines","VariantRecordId","currentDate","now","InventoryType","Weeks","Page","RequestedDate","dayjs","ItemLines","_getDeliveryByMessage","ATPInventoryData","deliveryMessageATPResultState","_tryInStoreAsyncCall","enableSociLocations","sociPreferredStore","zipCodeModified","projectMetaSoci","project_meta","sociStore","sociStoreID","tryInStoreLimit","tryInStoreLookupRadius","getTryInStoreInfoInput","response","getTryInStoreAction","isStoreLoading","prevProduct","productDimensions","dimensionsArr","dimensionsToUpdate","clearErrorState","nextProductDimensions","mappedDimensions","obj","dim","variants","queryBasedVariantSelection","variantProduct","newAvailableQuantity","getProductAvailabilitiesForSelectedVariant","ProductAvailabilitiesForSelectedVariantInput","newPrice","getPriceForSelectedVariant","PriceForSelectedVariantInput","newDeliveryOptions","getDeliveryOptionsForSelectedVariant","GetDeliveryOptionsForSelectedVariantInput","productDeliveryOptions","currentProduct","currentProductDimensions","_updateQuantitiesInState","makeCoreProductDeliveryMessage","_updateVariantIDForTracking","_updateURLWithoutReloading","findPreferredStore","mfrmStoreSelector","body","classList","add","showMapViewLink","_getProductBadges","productBadgeAttribute","badgeData","badges","parsedBadges","badge","parseBadgeData","finalizedBadges","parsedBadge","buildProductBadge","extensionProps","deliveryMessage","inventoryStatusATPResultState","variantAvailibilityUpdating","showViewCartLink","bind","_setAllProductVariantsResult","PRODUCTASSERVICE","ItemTypeValue","newCartTotalItems","totalItemsInCart","prevProps","prevState","selProd","currSelProd","element","isInStock","clearTimeout","extendAllProductVariants","prices","extendedAllProductVariants","extendedObj","productSizeName","dimensionPrice","discountAmount","priceAfterDiscount","discount","smallParcelVariantsListObj","inStockLowestPriceVariant","isProductFound","variantObj","smallParcelProduct","str","outOfStock","outOfStockProductKey","inventoryStatusData","ATPInventoryStatusData","selectedObj","queryParamValue","masterId","pushState","search","queryParams","updatedProductSpecificationData","dimensionPrices","prodSpecficationData","_getActivePrices","Price","getNextInventoryProduct","dimensionValues","getDimensionValuesAsync","fullDimension","Behavior","DefaultQuantity","MinimumQuantity","MaximumQuantity","render","mediaGallery","selectedFoundation","adjustableItem","completeYourBedPillow","pillow","completeYourBedProtector","protector","parseBrandName","viewProps","ModuleProps","moduleProps","classnames","ProductInfoContainerProps","MediaGalleryContainerProps","getBuyboxProductDescription","findInStore","addToCart","viewCartLink","inventoryLabel","shopSimilarLook","enableShopSimilarLooks","getBuyboxShopSimilarButton","ShopSimiliarButtonType","keyInPrice","enableKeyInPrice","quantityLimitsMessages","setSmallParcelATPCallMade","setStatusATPCall","setZipCode","setATPCall","productBadges","ratingComponent","showBVRatings","tryInStoreComponent","onlineOnlyBackOfficeAttribute","promotionalMessage","EyeBrows","Description","ATPDataFromBusiness","updateDimension","getProductType","setAllProductVariantsResult","customerSatisfactionScore","cSatRatingHeadingText","cSatRatingPopoverText","isDesktop","renderView","Component","setIsDesktop","useState","resizeThrottledEventHandler","addThrottledEvent","useIsDesktop","seconds","hours","floor","ampm","divisorForMinutes","StoreSelectorLocationLineItemComponentActions","handlers","onSelected","onSetAsPreferredStore","onRemovePreferredStore","contacts","allPhoneContacts","contact","IsPrivate","primaryPhoneContact","IsPrimary","StoreSelectorLocationLineItemComponent","hideStockStatus","isCurrentLocation","stockStatusLabel","storeLocatorView","preferredStoreLocationId","isPreferredStoreEnabled","isLocationDisabled","distanceAsString","distance","preferredDistanceUnit","buildDistanceString","Distance","storeAddress","resourceLabel","inStock","stockLabel","stockText","canSelectLocation","pickupInStoreButtonText","selectLocation","pickupInStoreAriaLabel","selectLocationAriaLabelFormat","isPreferredStore","payLoad","getPayloadObject","TelemetryConstant","attributes","getTelemetryAttributes","contentAction","etext","preferredStoreAttr","RemovePreferredStoreAttr","storeHoursHeader","closedText","renderStoreHours","contactInfoHeader","availabilityInfoHeader","currentLocation","preferredStoreAriaLabel","preferredStoreText","setAsPreferredStoreTextAriaLabel","setAsPreferredStoreText","pageURL","viewStoreDetails","AddToCartComponentActions","_event","setDisabled","openModal","setSuccess","cartError","addToCartError","productToAdd","productBrand","productCategory","productCategoryName","product_quantity","foundation","listPosition","Dimension","utag_obj","product_list_name","product_list_position","brand","propagateError","productsToAdd","availableQuantity","additionalProperties","orderQuantityLimitsFeatureIsEnabled","enableStockCheck","cartState","getCartState","clearCartLinesDeliveryInformation","productPriceHandler","addProductsToCart","propagateResult","getCartProductPriceArray","variantRecordId","AdjustedPrice","AddToCart","label","getLinkText","payload","TelemetryEvent","OOMClass","itemOutOfMarket","variantOutOfStock","mfrmOutOfStockSmallParcell","allVariantOOS","disabledSmallParcel","isIntermediateState","shouldShowOutOfStock","mfrmAddToCartDisableByState","mfrmOutOfStockCustomText","mfrmContinueShoppingLink","Url","mfrmContinueShoppingText","defaultProps","err","getCount","addToCartProductsText","includeCurrentQuantity","includedQuantityNumber","msdyn365Commerce","component","getValidProductImages","getCatalogId","actionInput","MediaLocationsForSelectedVariantInput","getMediaLocationsForSelectedVariant","mediaLocations","all","mediaLocation","imageData","src","Uri","altText","AltText","http","XMLHttpRequest","open","send","validateMediaLocaionAsync","pairs","pair","Quickview","quickViewCallbacks","updateSelectedProduct","newSelectedProduct","newInventory","_hideQuickViewDialog","defaultGalleryImageSettings","cropFocalRegion","defaultThumbnailImageSettings","_renderSeeDetailButton","Button","onTelemetryClick","seeDetailsLinkText","_getProductURL","_renderCarousel","mediaGalleryItems","galleryImageSettings","_renderCarouselItemImageView","_renderEmptyImage","Carousel","activeIndex","next","previous","interval","directionTextPrev","previousScreenshotFlipperText","directionTextNext","nextScreenshotFlipperText","indicatorAriaText","ariaLabelForSlide","onIndicatorsClickHandler","goToIndex","handleOnExited","onExited","handleOnExiting","onExiting","_renderThumbnails","thumbnailImageSettings","_getThumbnailItem","ThumbnailsContainerProps","SingleSlideCarouselComponentProps","SingleSlideCarousel","flipperPrevLabel","flipperNextLabel","parentId","useTabList","newProduct","getSelectedVariant","SelectedVariantInput","getDimensionsForSelectedVariant","GetDimensionsForSelectedVariantInput","images","productVariant","lastUpdate","RetailMulitplePickupMFeatureState","featureState","IsEnabled","animating","isLastItem","nextIndex","isFirstItem","_getCarouselItem","image","Image","loadFailureBehavior","modifiedActiveIndex","ThumbnailItemContainerProps","_generateOnThumbnailClick","onKeyDown","_generateOnThumbnailKeyDown","Picture","which","KeyCodes","preventDefault","onClickHandler","_onClick","ObjectExtensions","selectedProductId","selectedDimensions","tenantId","getRnrPartnerId","serviceEndPoint","getRnrEndpointId","productResult","productAvailabilities","getCartStateData","GetCartStateDataInput","getRatingsSummary","GetRatingsSummaryInput","ratingsSummaryData","ratingsSummary","getProductDetails","currentTime","_updateMediaItems","maxRecentlyViewedItemsCount","RecentlyViewedState","ReleasedProductType","isDataLoaded","_quickViewCloseButtonclick","onChangeHandler","newValue","_renderQuantity","productQuantityHeading","IncrementalQuantity","currentCount","inputQuantityAriaLabel","decrementButtonAriaLabel","incrementButtonAriaLabel","shouldComponentUpdate","nextProps","nextState","isMobileDevice","isMobile","VariantType","viewprops","quickView","quickViewButton","quickViewbuttonText","ModalContainer","Modal","quickViewAriaLabel","toggle","modalTransition","timeout","shouldUpdateFocusToFirstElement","ModalHeaderContainer","ModalHeader","ModalFooterContainer","ModalFooter","ModalHeaderContent","ModalBodyContainer","ModalBody","cartContainerProps","seeDetailsbutton","loading","Spinner","loadingText","size","SpinnerSize","configure","getBuyboxProductConfigure","unitOfMeasure","getBuyboxProductUnitOfMeasure","rating","getBuyboxProductRating","addToWishlist","getBuyboxProductAddToWishlist","CarouselProps","Thumbnails","lastUpdatedTime","_mapProductToImageData","producturl","RetailDefaultOrderQuantityLimitsFeatureName","information","_renderConfigureDropdown","dropdown","select","_renderQuickViewPopup","Module","_renderBodyContent","_renderAddToCart","_renderAddToWishlist","dropdowns","_renderConfigure","_renderKeyInPrice","QuickViewFunctionalComponent"],"sourceRoot":""}