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AS,IAA7G,OAAkHzZ,EAAM0Z,OAAN,kBAA0B1Z,EAAM0Z,QAAW,IAEtK,OAAO,IAAIjB,SAAQ,CAACC,EAASiB,KAAU,UACnC,MAAMhB,EAAM,UAAGC,gBAAH,aAAG,EAAUC,cAAc,UACvCF,EAAOjF,KAAO,kBACdiF,EAAOnmB,OAAQ,EACfmmB,EAAOiB,OAAQ,EACfjB,EAAO7iB,IAAM0jB,EACbb,EAAOxa,GAAK,uBACR/G,SACAA,OAAOyiB,YAAc,KACjBle,KAAKme,gBAAiB,EACtBpB,MAGRC,EAAO1T,iBAAiB,SAAUhS,IAC9B0mB,EAAO1mB,MAEH,QAAR,EAAA2lB,gBAAA,mBAAUQ,YAAV,SAAgBC,YAAYV,OC3FjC,SAASoB,EAA8BjnB,GAC1C,OAAO,IAAIknB,EAAAA,aAAyC,UAAWlnB,EAAQ,+BDavE4d,EAAAA,EAAAA,IAAAA,CADC9P,EAAAA,IACD,+BA+CA8P,EAAAA,EAAAA,IAAAA,CADC9P,EAAAA,IACD,+BCzDJ,MAIaqZ,GAA6BtZ,EAAAA,EAAAA,IAA2B,CACjEC,OAA6CsZ,EAAAA,iBAC7Cla,MAN2CH,GACpCka,EAA8B,IAAItC,KAQ7C,WCxBA0C,EAAOC,QAAU7jB,cCAjB4jB,EAAOC,QAAUC","sources":["webpack://mattressfirm/./src/Utilities/get-delivery-by-message.tsx?05db","webpack://mattressfirm/./src/Utilities/get-product-badge.tsx?635b","webpack://mattressfirm/./src/Utilities/get-view-port.tsx?4210","webpack://mattressfirm/./src/Utilities/get-zipcode.ts?4f03","webpack://mattressfirm/./src/Utilities/product-search-result-utils.tsx?58f2","webpack://mattressfirm/./src/actions/BatchCoreProductDataServiceEntities.g.ts?0bd4","webpack://mattressfirm/./src/actions/BatchCoreProductDataActionExtension.g.ts?1ee7","webpack://mattressfirm/./src/actions/get-mfrm-products-category-paths.action.ts?dc81","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/data-actions/store-selector-state-data-action.ts?6df6","webpack://mattressfirm/./src/actions/ProductRecommendationDataServiceEntities.g.ts?8590","webpack://mattressfirm/./src/actions/ProductRecommendationDataActionExtension.g.ts?8c1d","webpack://mattressfirm/./src/modules/mfrm-product-recommendations/featured-content.tsx?59e9","webpack://mattressfirm/./src/modules/mfrm-product-recommendations/mfrm-product-recommendations.tsx?d3c1","webpack://mattressfirm/./src/modules/mfrm-product-recommendations/mfrm-product-recommendations.view.tsx?ecbf","webpack://mattressfirm/./src/themes/mattressfirm/views/components/rating.component.tsx?6883","webpack://mattressfirm/./lib/mfrm-product-recommendations/module-registration.js?e542","webpack://mattressfirm/./src/store-selector-state-manager/base-store-selector-state-manager.ts?281e","webpack://mattressfirm/./src/store-selector-state-manager/map-store-selector-state-manager.ts?2ae0","webpack://mattressfirm/./src/store-selector-state-manager/store-selector-state-manager-data-action.ts?bd3e","webpack://mattressfirm/external var \"React\"?0d3b","webpack://mattressfirm/external var \"ReactDOM\"?853b"],"sourcesContent":["import { IAny, ICoreContext, IGeneric } from '@msdyn365-commerce/core';\r\nimport { IMFICLDeliveryScheduleParameters } from '../actions/CoreProductDataServiceEntities.g';\r\nimport getDeliveryMessageAction, { GetDeliveryMessageInput } from '../actions/get-delivery-message.action';\r\n\r\nconst _getDeliveryByMessage = async (request: IMFICLDeliveryScheduleParameters, context: ICoreContext>, isCached?: boolean) => {\r\n if (request) {\r\n const getDeliveryMessageActionInput = new GetDeliveryMessageInput(request, isCached);\r\n try {\r\n let result;\r\n // eslint-disable-next-line prefer-const\r\n result = await getDeliveryMessageAction(getDeliveryMessageActionInput, 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 _getDeliveryByMessage;\r\n","import { IImageSettings, Image, IRequestContext } from '@msdyn365-commerce/core';\r\nimport dayjs from 'dayjs';\r\nimport tz from 'dayjs/plugin/timezone';\r\nimport utc from 'dayjs/plugin/utc';\r\nimport isBetween from 'dayjs/plugin/isBetween';\r\ndayjs.extend(tz);\r\ndayjs.extend(utc);\r\ndayjs.extend(isBetween);\r\nimport React from 'react';\r\nimport { AttributeValue } from '@msdyn365-commerce/retail-proxy';\r\nconst format = 'M/D/YYYY H:m:s';\r\n\r\nexport interface IBadgeData {\r\n src: string;\r\n alt: string;\r\n start: dayjs.Dayjs;\r\n end: dayjs.Dayjs;\r\n}\r\n\r\nconst defaultImageSettings: IImageSettings = {\r\n viewports: {\r\n xs: { q: `m=6`, w: 0, h: 0 }\r\n },\r\n disableLazyLoad: true\r\n};\r\n\r\nexport const parseBadgeData = (badgeData: string, requestContext: IRequestContext): IBadgeData | undefined => {\r\n let dataSegments;\r\n let scheduleStart;\r\n let scheduleEnd;\r\n let badgeType;\r\n let parsedScheduleStart;\r\n let startDate;\r\n let startTime;\r\n let parsedScheduleEnd;\r\n let endDate;\r\n let endTime;\r\n\r\n try {\r\n // split the data into its segments\r\n dataSegments = badgeData.split('#');\r\n scheduleStart = dataSegments[0];\r\n scheduleEnd = dataSegments[1];\r\n badgeType = dataSegments[2];\r\n\r\n // parse schedule start\r\n parsedScheduleStart = scheduleStart.split('_');\r\n startDate = parsedScheduleStart[0];\r\n startTime = parsedScheduleStart[1];\r\n\r\n // parse schedule end\r\n parsedScheduleEnd = scheduleEnd.split('_');\r\n endDate = parsedScheduleEnd[0];\r\n endTime = parsedScheduleEnd[1];\r\n } catch (e) {\r\n return;\r\n }\r\n\r\n const startMoment = `${startDate} ${startTime.replace(/-/g, \":\")}`;\r\n const endMoment = `${endDate} ${endTime.replace(/-/g, \":\")}`;\r\n\r\n const startMomentFormatted = dayjs(startMoment.replace(/-/g, \"/\"));\r\n const endMomentFormatted = dayjs(endMoment.replace(/-/g, \"/\"));\r\n\r\n // check if schedule is valid\r\n if (!(startMomentFormatted.isValid() && endMomentFormatted.isValid())) {\r\n return;\r\n }\r\n\r\n // parse badge type and create image src\r\n const baseUrl = requestContext.apiSettings.baseImageUrl.substring(0, requestContext.apiSettings.baseImageUrl.length - 1);\r\n if (badgeType) {\r\n const removed$ = badgeType.substring(1, badgeType.length - 1);\r\n const parsedBadgeType = removed$.replace(' ', '-').toLowerCase();\r\n\r\n // remove page name portion\r\n const altText = removed$.split('-')[0];\r\n\r\n const src = `${baseUrl}${parsedBadgeType}.png`;\r\n return {\r\n src: src,\r\n alt: altText,\r\n start: convertTimeZone(startMomentFormatted),\r\n end: convertTimeZone(endMomentFormatted)\r\n };\r\n } else {\r\n return;\r\n }\r\n};\r\n\r\n// convert given time to Central Time (CT)\r\nconst convertTimeZone = (time: dayjs.Dayjs): dayjs.Dayjs => {\r\n return dayjs(time.format(format), format).tz('America/Chicago').local();\r\n};\r\n\r\nexport const buildProductBadge = (parsedBadgeData: IBadgeData, requestContext: IRequestContext): JSX.Element | undefined => {\r\n // only build image if it is scheduled\r\n const isScheduled = dayjs().isBetween(parsedBadgeData.start, parsedBadgeData.end);\r\n\r\n if (isScheduled) {\r\n return (\r\n \r\n );\r\n }\r\n\r\n return undefined;\r\n};\r\n\r\nexport const renderProductBadge = (\r\n attributeName: string | undefined,\r\n requestContext: IRequestContext\r\n): JSX.Element | undefined => {\r\n const badgeData = attributeName;\r\n if (!badgeData) {\r\n return;\r\n }\r\n // split badge data into its separate badges\r\n const badges = badgeData.split(',');\r\n // parse badge data to get its schedule and image src\r\n const parsedBadges = badges.map(badge => parseBadgeData(badge, requestContext));\r\n\r\n // build product badge image components\r\n const finalizedBadges = parsedBadges.map(parsedBadge => parsedBadge && buildProductBadge(parsedBadge, requestContext));\r\n\r\n return finalizedBadges ? <>{finalizedBadges} : <>;\r\n};\r\n\r\nexport const renderProductBadgeByFilteringAttributes = (\r\n attributeName: string | undefined,\r\n attributes: AttributeValue[] | undefined,\r\n requestContext: IRequestContext\r\n): JSX.Element | undefined => {\r\n const badgeData =\r\n attributeName &&\r\n attributes?.find(\r\n currAttribute => currAttribute.Name && currAttribute.Name.toLowerCase().trim() === attributeName.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 => parseBadgeData(badge, requestContext));\r\n // build product badge image components\r\n const finalizedBadges = parsedBadges.map(parsedBadge => parsedBadge && buildProductBadge(parsedBadge, requestContext));\r\n\r\n return finalizedBadges && <>{finalizedBadges};\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 { IAny, ICoreContext, IGeneric } from '@msdyn365-commerce/core';\r\nimport dayjs from 'dayjs';\r\nimport Cookies from 'universal-cookie';\r\nimport { IMFIATPInventoryEntity, IMFICartLine, IMFICLDeliveryScheduleParameters } from '../actions/CoreProductDataServiceEntities.g';\r\nimport { IMFIAvailablePromotionDescription, IMFIItem } from '../actions/EyebrowMessageDataServiceEntities.g';\r\nimport getEyebrowAction, { GetEyebrowMessageInput } from '../actions/get-eyebrow-message.action';\r\nimport _getDeliveryByMessage from './get-delivery-by-message';\r\nimport { IMFIATPInventoryEntityPLP } from '../actions/BatchCoreProductDataServiceEntities.g';\r\n\r\nexport const _getEyebrowMessage = async (products: IMFIItem[], context: ICoreContext>) => {\r\n const priceGroupForAPICall = context.app && context.app.config.priceGroup;\r\n if (products && products.length > 0 && (priceGroupForAPICall !== '' || priceGroupForAPICall !== undefined)) {\r\n const items: IMFIItem[] | undefined = [];\r\n products.map(item => {\r\n const singleItem: IMFIItem = {\r\n ItemId: item.ItemId,\r\n DistinctProductVariant: item.DistinctProductVariant\r\n };\r\n items.push(singleItem);\r\n });\r\n\r\n const requestBody: IMFIAvailablePromotionDescription = {\r\n PriceGroup: priceGroupForAPICall,\r\n Items: items\r\n };\r\n const getEyebrowMessageInput = new GetEyebrowMessageInput(requestBody, undefined, true);\r\n try {\r\n const result = await getEyebrowAction(getEyebrowMessageInput, context.actionContext);\r\n if (result) {\r\n return result;\r\n }\r\n } catch (error) {\r\n console.log('Error', error);\r\n }\r\n }\r\n return null;\r\n};\r\n\r\nexport const _makeDeliveryMessage = (days: string) => {\r\n if (days === '' || days === undefined || days === null) {\r\n return '';\r\n }\r\n\r\n let deliveryByMessage = '';\r\n let date = new Date();\r\n const daysSpan = days.split('-');\r\n let deliveryDate = Date.now();\r\n if (daysSpan && daysSpan[1] !== undefined && daysSpan.length) {\r\n let deliveryByMessageRange = '';\r\n daysSpan.map((item: string) => {\r\n date = new Date();\r\n deliveryDate = Date.now();\r\n if (parseInt(item, 10) > 0) {\r\n let numberOfDays = parseInt(item, 10);\r\n let newDate = deliveryDate;\r\n while (numberOfDays > 0) {\r\n newDate = date.setDate(date.getDate() + 1);\r\n if (dayjs(newDate).format('d') !== '0' && dayjs(newDate).format('d') !== '6') {\r\n numberOfDays--;\r\n }\r\n }\r\n deliveryByMessage = dayjs(newDate).format('MMM D');\r\n if (deliveryByMessageRange !== '') {\r\n deliveryByMessageRange = `${deliveryByMessageRange} to ${deliveryByMessage}`;\r\n } else {\r\n deliveryByMessageRange = deliveryByMessage;\r\n newDate = date.setDate(date.getDate() - parseInt(item[0], 10));\r\n }\r\n }\r\n });\r\n return `Delivery by ${deliveryByMessageRange}`;\r\n } else {\r\n deliveryByMessage = dayjs(deliveryDate).format('MMM D');\r\n let numberOfDays = parseInt(days, 10);\r\n let newDate = deliveryDate;\r\n let flag = true;\r\n while (numberOfDays > 0) {\r\n newDate = date.setDate(date.getDate() + 1);\r\n if (dayjs(newDate).format('d') !== '0' && dayjs(newDate).format('d') !== '6') {\r\n numberOfDays--;\r\n } else {\r\n flag = false;\r\n }\r\n }\r\n deliveryByMessage =\r\n flag && days === '1'\r\n ? `Tomorrow ${dayjs(Date.now()).format('MMM D')}`\r\n : dayjs(newDate).format('ddd MMM, D');\r\n return `Delivery by ${deliveryByMessage}`;\r\n }\r\n};\r\n\r\n// tslint:disable-next-line: no-any\r\nexport const _coreProductATPCall = async (\r\n itemLines: IMFICartLine[],\r\n setCoreProductATPData: React.Dispatch,\r\n context: ICoreContext>\r\n) => {\r\n const cookies = new Cookies();\r\n const zipcode = cookies.get('zip_code');\r\n if (itemLines && itemLines.length === 0) {\r\n setCoreProductATPData([]);\r\n }\r\n const currentDate = Date.now();\r\n const requestBody: IMFICLDeliveryScheduleParameters = {\r\n InventoryType: 'Delivery',\r\n Weeks: context.app.config.weeksPDPforATPCall,\r\n StoreId: '',\r\n Page: 'plp',\r\n RequestedDate: dayjs(currentDate).format('MM/DD/YYYY'),\r\n ZipCode: zipcode,\r\n ItemLines: itemLines\r\n };\r\n const getDeliveryByMessage = _getDeliveryByMessage(requestBody, context);\r\n getDeliveryByMessage\r\n .then(result => {\r\n if (result !== undefined && result?.ATPInventoryData && result?.ATPInventoryData.length > 0) {\r\n setCoreProductATPData(result?.ATPInventoryData);\r\n } else {\r\n setCoreProductATPData([]);\r\n }\r\n })\r\n .catch(e => {\r\n console.log('Error', e);\r\n });\r\n};\r\n\r\nconst _setTime = (time: string | undefined) => {\r\n if (time !== undefined && time !== '') {\r\n const temp = time.split(' ');\r\n if (temp && temp.length > 0) {\r\n let newDatewithTime = dayjs(Date.now()).format('M/D/YYYY');\r\n newDatewithTime = `${newDatewithTime} ${temp[0]}:00 ${temp[1].toUpperCase()}`;\r\n return newDatewithTime;\r\n }\r\n }\r\n return '';\r\n};\r\n\r\nexport interface IATPInventoryData {\r\n deliveryByMessage: string;\r\n locationId: string;\r\n}\r\n\r\nexport const _getSoonestDeliveryDate = (coreProductATPData: IMFIATPInventoryEntity[]): IATPInventoryData => {\r\n let deliveryDetails = {\r\n deliveryByMessage: '',\r\n locationId: ''\r\n };\r\n if (!coreProductATPData || !coreProductATPData.length) {\r\n return deliveryDetails;\r\n }\r\n for (let index = 0; index < coreProductATPData.length; index++) {\r\n const item = coreProductATPData[index];\r\n if (item.Available === 'YES' && item.ATPQuantity !== undefined && parseInt(item.ATPQuantity, 10) > 0) {\r\n const date = new Date();\r\n const today = dayjs(Date.now()).format('D M YY');\r\n const deliveryDate = dayjs(item.SlotDate).format('D M YY');\r\n const currHour = dayjs(Date.now()).format('H');\r\n if (today === deliveryDate) {\r\n const deliveryMessage =\r\n _setTime(item.StartTime) !== ''\r\n ? parseInt(dayjs(_setTime(item.StartTime)).format('H'), 10) < 14 && parseInt(currHour, 10) < 14\r\n ? `Delivery by Today ${dayjs(Date.now()).format('MMM D')}`\r\n : `Delivery by Tomorrow ${dayjs(date.setDate(date.getDate() + 1)).format('MMM D')}`\r\n : '';\r\n deliveryDetails = {\r\n deliveryByMessage: deliveryMessage,\r\n locationId: item.Location1!\r\n };\r\n break;\r\n } else {\r\n const deliveryMessage = `Delivery by ${dayjs(item.SlotDate).format('MMM D')}`;\r\n deliveryDetails = {\r\n deliveryByMessage: deliveryMessage,\r\n locationId: item.Location1!\r\n };\r\n break;\r\n }\r\n }\r\n }\r\n return deliveryDetails;\r\n};\r\n\r\nexport const _getDeliveryDate = (coreProductATPData: IMFIATPInventoryEntityPLP) => {\r\n let deliveryDetails = {\r\n deliveryByMessage: '',\r\n locationId: ''\r\n };\r\n const item = coreProductATPData;\r\n if (item.Available === 'YES' && item.ATPQuantity !== undefined && parseInt(item.ATPQuantity, 10) > 0) {\r\n const date = new Date();\r\n const today = dayjs(Date.now()).format('D M YY');\r\n const deliveryDate = dayjs(item.SlotDate).format('D M YY');\r\n const currHour = dayjs(Date.now()).format('H');\r\n const startTimeHour = item.StartTime?.substring(0,2) || \"14\";\r\n if (today === deliveryDate) {\r\n const deliveryMessage =\r\n parseInt(startTimeHour, 10) < 14 && parseInt(currHour, 10) < 14\r\n ? `Delivery by Today ${dayjs(Date.now()).format('MMM D')}`\r\n : `Delivery by Tomorrow ${dayjs(date.setDate(date.getDate() + 1)).format('MMM D')}`;\r\n deliveryDetails = {\r\n deliveryByMessage: deliveryMessage,\r\n locationId: item.Location1!\r\n };\r\n } else {\r\n const deliveryMessage = `Delivery by ${dayjs(item.SlotDate).format('MMM D')}`;\r\n deliveryDetails = {\r\n deliveryByMessage: deliveryMessage,\r\n locationId: item.Location1!\r\n };\r\n }\r\n }\r\n return deliveryDetails;\r\n};\r\n\r\n","/* eslint-disable security/detect-object-injection */\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/**\r\n* MFIDeliveryScheduleParameters entity interface.\r\n*/\r\nexport interface IMFIDeliveryScheduleParameters {\r\n ZipCode?: string;\r\n RequestedDate?: string;\r\n StoreId?: string;\r\n InventoryType?: string;\r\n Weeks: number;\r\n NoOfPriorityDC: number;\r\n Page?: string;\r\n SourceSystem?: string;\r\n CustomerRequestTime?: string;\r\n Id: number;\r\n ExtensionProperties?: Entities.CommerceProperty[];\r\n ItemLines?: IMFICartLine[];\r\n}\r\n\r\n/**\r\n* MFICartLine entity interface.\r\n*/\r\nexport interface IMFICartLine {\r\n ItemId?: string;\r\n VariantRecordId?: string;\r\n ProductId?: string;\r\n Quantity: number;\r\n QuantityOrdered?: number;\r\n IsVoided?: boolean;\r\n Id?: number;\r\n ExtensionProperties?: Entities.CommerceProperty[];\r\n}\r\n\r\n/**\r\n* MFIATPInventoryEntity entity interface.\r\n*/\r\nexport interface IMFIATPInventoryEntity {\r\n Location1?: string;\r\n Location2?: string;\r\n Zone?: string;\r\n ZoneId?: string;\r\n SlotDate?: string;\r\n StartTime?: string;\r\n EndTime?: string;\r\n Slots?: string;\r\n MFIATPLeadDate?: string;\r\n Available?: string;\r\n ATPQuantity?: string;\r\n SourceSystem?: string;\r\n IsTranscity?: boolean;\r\n IsNationWide?: boolean;\r\n}\r\n\r\n/**\r\n* MFIATPInventoryEntityPLP entity interface.\r\n*/\r\nexport interface IMFIATPInventoryEntityPLP {\r\n Location1?: string;\r\n ItemId?: string;\r\n Variant?: string;\r\n VariantRecordId?: string;\r\n Zone?: string;\r\n ZoneId?: string;\r\n SlotDate?: string;\r\n StartTime?: string;\r\n EndTime?: string;\r\n Slots?: string;\r\n MFIATPLeadDate?: string;\r\n Available?: string;\r\n ATPQuantity?: string;\r\n SourceSystem?: string;\r\n IsTranscity?: boolean;\r\n IsNationWide?: boolean;\r\n ZipCodeGroupId?: string;\r\n ZoneLineId?: string;\r\n}\r\n\r\n/**\r\n* MFIATPInventoryDynamicEntity entity interface.\r\n*/\r\nexport interface IMFIATPInventoryDynamicEntity {\r\n Date?: string;\r\n AvailableSlots?: string;\r\n ATPSlots?: IMFIATPInventoryEntity[];\r\n}\r\n\r\n/**\r\n* MFIATPInventoryStatusEntity entity interface.\r\n*/\r\nexport interface IMFIATPInventoryStatusEntity {\r\n Location?: string;\r\n ProductId?: string;\r\n ItemId?: string;\r\n VariantRecordId?: string;\r\n Date?: string;\r\n Available?: string;\r\n Quantity?: string;\r\n SourceSystem?: string;\r\n}\r\n\r\n/**\r\n* MFIATPInventoryResponse entity interface.\r\n*/\r\nexport interface IMFIATPInventoryResponse {\r\n ATPInventoryData?: IMFIATPInventoryEntity[];\r\n Message?: string;\r\n}\r\n\r\n/**\r\n* MFIATPInventoryPLPResponse entity interface.\r\n*/\r\nexport interface IMFIATPInventoryPLPResponse {\r\n ATPInventoryPLPData?: IMFIATPInventoryEntityPLP[];\r\n Message?: string;\r\n}\r\n\r\n/**\r\n* MFIATPInventoryDynamicResponse entity interface.\r\n*/\r\nexport interface IMFIATPInventoryDynamicResponse {\r\n ATPInventoryDynamicData?: IMFIATPInventoryDynamicEntity[];\r\n Message?: string;\r\n}\r\n\r\n/**\r\n* MFIATPInventoryStatusResponse entity interface.\r\n*/\r\nexport interface IMFIATPInventoryStatusResponse {\r\n ATPInventoryStatusData?: IMFIATPInventoryStatusEntity[];\r\n Message?: string;\r\n}\r\n\r\n/**\r\n * MFIDeliveryScheduleParameters entity class.\r\n */\r\nexport class MFIDeliveryScheduleParametersExtensionClass implements IMFIDeliveryScheduleParameters {\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 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 RequestedDate: 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 InventoryType: 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 Weeks: 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 NoOfPriorityDC: 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 Page: 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 SourceSystem: 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 CustomerRequestTime: 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 Id: 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 // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n public ItemLines:\r\n IMFICartLine[];\r\n\r\n // Navigation properties names\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 static itemLinesPropertyName: string = \"ItemLines\";\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.RequestedDate = odataObject.RequestedDate;\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.InventoryType = odataObject.InventoryType;\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.Weeks = odataObject.Weeks;\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.NoOfPriorityDC = odataObject.NoOfPriorityDC;\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.Page = odataObject.Page;\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.SourceSystem = odataObject.SourceSystem;\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.CustomerRequestTime = odataObject.CustomerRequestTime;\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.Id = odataObject.Id;\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 (var i = 0; i < odataObject.ExtensionProperties.length; i++) {\r\n if (odataObject.ExtensionProperties[i]) {\r\n if (odataObject.ExtensionProperties[i]['@odata.type']) {\r\n var 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\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 // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.ItemLines = undefined;\r\n if (odataObject.ItemLines) {\r\n this.ItemLines = [];\r\n for (var i = 0; i < odataObject.ItemLines.length; i++) {\r\n if (odataObject.ItemLines[i]) {\r\n if (odataObject.ItemLines[i]['@odata.type']) {\r\n var className: string = odataObject.ItemLines[i]['@odata.type'];\r\n className = className.substr(className.lastIndexOf('.') + 1).concat(\"Class\");\r\n if (EntityClasses[className]) {\r\n this.ItemLines[i] = new EntityClasses[className](odataObject.ItemLines[i]);\r\n }\r\n } else {\r\n this.ItemLines[i] = new MFICartLineExtensionClass(odataObject.ItemLines[i]);\r\n }\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.ItemLines[i] = undefined;\r\n }\r\n }\r\n }\r\n\r\n }\r\n}\r\n\r\n/**\r\n * MFICartLine entity class.\r\n */\r\nexport class MFICartLineExtensionClass implements IMFICartLine {\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 ItemId: string;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n public VariantRecordId: 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 ProductId: 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 Quantity: 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 QuantityOrdered: 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 IsVoided: boolean;\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 Id: 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.ItemId = odataObject.ItemId;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.VariantRecordId = odataObject.VariantRecordId;\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.ProductId = odataObject.ProductId;\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.Quantity = (odataObject.Quantity) ? parseFloat(odataObject.Quantity) : 0;\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.QuantityOrdered = (odataObject.QuantityOrdered) ? parseFloat(odataObject.QuantityOrdered) : 0;\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.IsVoided = odataObject.IsVoided;\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.Id = odataObject.Id;\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 (var i = 0; i < odataObject.ExtensionProperties.length; i++) {\r\n if (odataObject.ExtensionProperties[i]) {\r\n if (odataObject.ExtensionProperties[i]['@odata.type']) {\r\n var 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\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/**\r\n * MFIATPInventoryEntity entity class.\r\n */\r\nexport class MFIATPInventoryEntityExtensionClass implements IMFIATPInventoryEntity {\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 Location1: 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 Location2: 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 Zone: 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 ZoneId: 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 SlotDate: 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 StartTime: 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 EndTime: 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 Slots: 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 MFIATPLeadDate: 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 Available: 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 ATPQuantity: 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 SourceSystem: 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 IsTranscity: boolean;\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 IsNationWide: boolean;\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.Location1 = odataObject.Location1;\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.Location2 = odataObject.Location2;\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.Zone = odataObject.Zone;\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.ZoneId = odataObject.ZoneId;\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.SlotDate = odataObject.SlotDate;\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.StartTime = odataObject.StartTime;\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.EndTime = odataObject.EndTime;\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.Slots = odataObject.Slots;\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.MFIATPLeadDate = odataObject.MFIATPLeadDate;\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.Available = odataObject.Available;\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.ATPQuantity = odataObject.ATPQuantity;\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.SourceSystem = odataObject.SourceSystem;\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.IsTranscity = odataObject.IsTranscity;\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.IsNationWide = odataObject.IsNationWide;\r\n\r\n }\r\n}\r\n\r\n/**\r\n * MFIATPInventoryEntityPLP entity class.\r\n */\r\nexport class MFIATPInventoryEntityPLPExtensionClass implements IMFIATPInventoryEntityPLP {\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 Location1: 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 ItemId: string;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n public Variant: 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 VariantRecordId: 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 Zone: 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 ZoneId: 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 SlotDate: 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 StartTime: 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 EndTime: 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 Slots: 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 MFIATPLeadDate: 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 Available: 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 ATPQuantity: 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 SourceSystem: 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 IsTranscity: boolean;\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 IsNationWide: boolean;\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 ZipCodeGroupId: 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 ZoneLineId: 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.Location1 = odataObject.Location1;\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.ItemId = odataObject.ItemId;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.Variant = odataObject.Variant;\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.VariantRecordId = odataObject.VariantRecordId;\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.Zone = odataObject.Zone;\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.ZoneId = odataObject.ZoneId;\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.SlotDate = odataObject.SlotDate;\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.StartTime = odataObject.StartTime;\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.EndTime = odataObject.EndTime;\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.Slots = odataObject.Slots;\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.MFIATPLeadDate = odataObject.MFIATPLeadDate;\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.Available = odataObject.Available;\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.ATPQuantity = odataObject.ATPQuantity;\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.SourceSystem = odataObject.SourceSystem;\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.IsTranscity = odataObject.IsTranscity;\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.IsNationWide = odataObject.IsNationWide;\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.ZipCodeGroupId = odataObject.ZipCodeGroupId;\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.ZoneLineId = odataObject.ZoneLineId;\r\n\r\n }\r\n}\r\n\r\n/**\r\n * MFIATPInventoryDynamicEntity entity class.\r\n */\r\nexport class MFIATPInventoryDynamicEntityExtensionClass implements IMFIATPInventoryDynamicEntity {\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 Date: 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 AvailableSlots: 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 ATPSlots:\r\n IMFIATPInventoryEntity[];\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.Date = odataObject.Date;\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.AvailableSlots = odataObject.AvailableSlots;\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.ATPSlots = undefined;\r\n if (odataObject.ATPSlots) {\r\n this.ATPSlots = [];\r\n for (var i = 0; i < odataObject.ATPSlots.length; i++) {\r\n if (odataObject.ATPSlots[i]) {\r\n if (odataObject.ATPSlots[i]['@odata.type']) {\r\n var className: string = odataObject.ATPSlots[i]['@odata.type'];\r\n className = className.substr(className.lastIndexOf('.') + 1).concat(\"Class\");\r\n if (EntityClasses[className]) {\r\n this.ATPSlots[i] = new EntityClasses[className](odataObject.ATPSlots[i]);\r\n }\r\n } else {\r\n this.ATPSlots[i] = new MFIATPInventoryEntityExtensionClass(odataObject.ATPSlots[i]);\r\n }\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.ATPSlots[i] = undefined;\r\n }\r\n }\r\n }\r\n\r\n }\r\n}\r\n\r\n/**\r\n * MFIATPInventoryStatusEntity entity class.\r\n */\r\nexport class MFIATPInventoryStatusEntityExtensionClass implements IMFIATPInventoryStatusEntity {\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 Location: 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 ProductId: 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 ItemId: string;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n public VariantRecordId: 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 Date: 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 Available: 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 Quantity: 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 SourceSystem: 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.Location = odataObject.Location;\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.ProductId = odataObject.ProductId;\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.ItemId = odataObject.ItemId;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.VariantRecordId = odataObject.VariantRecordId;\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.Date = odataObject.Date;\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.Available = odataObject.Available;\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.Quantity = odataObject.Quantity;\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.SourceSystem = odataObject.SourceSystem;\r\n\r\n }\r\n}\r\n\r\n/**\r\n * MFIATPInventoryResponse entity class.\r\n */\r\nexport class MFIATPInventoryResponseExtensionClass implements IMFIATPInventoryResponse {\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 ATPInventoryData:\r\n IMFIATPInventoryEntity[];\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 // 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.ATPInventoryData = undefined;\r\n if (odataObject.ATPInventoryData) {\r\n this.ATPInventoryData = [];\r\n for (var i = 0; i < odataObject.ATPInventoryData.length; i++) {\r\n if (odataObject.ATPInventoryData[i]) {\r\n if (odataObject.ATPInventoryData[i]['@odata.type']) {\r\n var className: string = odataObject.ATPInventoryData[i]['@odata.type'];\r\n className = className.substr(className.lastIndexOf('.') + 1).concat(\"Class\");\r\n if (EntityClasses[className]) {\r\n this.ATPInventoryData[i] = new EntityClasses[className](odataObject.ATPInventoryData[i]);\r\n }\r\n } else {\r\n this.ATPInventoryData[i] = new MFIATPInventoryEntityExtensionClass(odataObject.ATPInventoryData[i]);\r\n }\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.ATPInventoryData[i] = undefined;\r\n }\r\n }\r\n }\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.Message = odataObject.Message;\r\n\r\n }\r\n}\r\n\r\n/**\r\n * MFIATPInventoryPLPResponse entity class.\r\n */\r\nexport class MFIATPInventoryPLPResponseExtensionClass implements IMFIATPInventoryPLPResponse {\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 ATPInventoryPLPData:\r\n IMFIATPInventoryEntityPLP[];\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 // 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.ATPInventoryPLPData = undefined;\r\n if (odataObject.ATPInventoryPLPData) {\r\n this.ATPInventoryPLPData = [];\r\n for (var i = 0; i < odataObject.ATPInventoryPLPData.length; i++) {\r\n if (odataObject.ATPInventoryPLPData[i]) {\r\n if (odataObject.ATPInventoryPLPData[i]['@odata.type']) {\r\n var className: string = odataObject.ATPInventoryPLPData[i]['@odata.type'];\r\n className = className.substr(className.lastIndexOf('.') + 1).concat(\"Class\");\r\n if (EntityClasses[className]) {\r\n this.ATPInventoryPLPData[i] = new EntityClasses[className](odataObject.ATPInventoryPLPData[i]);\r\n }\r\n } else {\r\n this.ATPInventoryPLPData[i] = new MFIATPInventoryEntityPLPExtensionClass(odataObject.ATPInventoryPLPData[i]);\r\n }\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.ATPInventoryPLPData[i] = undefined;\r\n }\r\n }\r\n }\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.Message = odataObject.Message;\r\n\r\n }\r\n}\r\n\r\n/**\r\n * MFIATPInventoryDynamicResponse entity class.\r\n */\r\nexport class MFIATPInventoryDynamicResponseExtensionClass implements IMFIATPInventoryDynamicResponse {\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 ATPInventoryDynamicData:\r\n IMFIATPInventoryDynamicEntity[];\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 // 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.ATPInventoryDynamicData = undefined;\r\n if (odataObject.ATPInventoryDynamicData) {\r\n this.ATPInventoryDynamicData = [];\r\n for (var i = 0; i < odataObject.ATPInventoryDynamicData.length; i++) {\r\n if (odataObject.ATPInventoryDynamicData[i]) {\r\n if (odataObject.ATPInventoryDynamicData[i]['@odata.type']) {\r\n var className: string = odataObject.ATPInventoryDynamicData[i]['@odata.type'];\r\n className = className.substr(className.lastIndexOf('.') + 1).concat(\"Class\");\r\n if (EntityClasses[className]) {\r\n this.ATPInventoryDynamicData[i] = new EntityClasses[className](odataObject.ATPInventoryDynamicData[i]);\r\n }\r\n } else {\r\n this.ATPInventoryDynamicData[i] = new MFIATPInventoryDynamicEntityExtensionClass(odataObject.ATPInventoryDynamicData[i]);\r\n }\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.ATPInventoryDynamicData[i] = undefined;\r\n }\r\n }\r\n }\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.Message = odataObject.Message;\r\n\r\n }\r\n}\r\n\r\n/**\r\n * MFIATPInventoryStatusResponse entity class.\r\n */\r\nexport class MFIATPInventoryStatusResponseExtensionClass implements IMFIATPInventoryStatusResponse {\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 ATPInventoryStatusData:\r\n IMFIATPInventoryStatusEntity[];\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 // 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.ATPInventoryStatusData = undefined;\r\n if (odataObject.ATPInventoryStatusData) {\r\n this.ATPInventoryStatusData = [];\r\n for (var i = 0; i < odataObject.ATPInventoryStatusData.length; i++) {\r\n if (odataObject.ATPInventoryStatusData[i]) {\r\n if (odataObject.ATPInventoryStatusData[i]['@odata.type']) {\r\n var className: string = odataObject.ATPInventoryStatusData[i]['@odata.type'];\r\n className = className.substr(className.lastIndexOf('.') + 1).concat(\"Class\");\r\n if (EntityClasses[className]) {\r\n this.ATPInventoryStatusData[i] = new EntityClasses[className](odataObject.ATPInventoryStatusData[i]);\r\n }\r\n } else {\r\n this.ATPInventoryStatusData[i] = new MFIATPInventoryStatusEntityExtensionClass(odataObject.ATPInventoryStatusData[i]);\r\n }\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.ATPInventoryStatusData[i] = undefined;\r\n }\r\n }\r\n }\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.Message = odataObject.Message;\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 './BatchCoreProductDataServiceEntities.g';\r\n\r\n// @ts-ignore\r\nfunction aTPQuery(id?: number): DataServiceQuery {\r\n const key = (id) ? { Id: id } : null;\r\n return new DataServiceQuery(\"ATP\", \"MFIDeliveryScheduleParameters\", DataServiceEntities.MFIDeliveryScheduleParametersExtensionClass, key);\r\n}\r\n\r\n\r\nexport function createMFIATPInventoryInput(deliveryScheduleParam: DataServiceEntities.IMFIDeliveryScheduleParameters): IDataServiceRequest {\r\n const query = aTPQuery();\r\n return query.createDataServiceRequestForOperation('MFIATPInventory', true, DataServiceEntities.MFIATPInventoryResponseExtensionClass, 'false', { bypassCache: 'get', returnEntity: 'DataServiceEntities.IMFIATPInventoryResponse' }, { deliveryScheduleParam: deliveryScheduleParam });\r\n}\r\n\r\n\r\nexport function mFIATPInventoryAsync(context: IContext, deliveryScheduleParam: DataServiceEntities.IMFIDeliveryScheduleParameters): AsyncResult {\r\n const request = createMFIATPInventoryInput(deliveryScheduleParam);\r\n return callActionOrExecute(request, context.callerContext);\r\n}\r\n\r\nexport function createMFIATPInventoryPLPInput(deliveryScheduleParam: DataServiceEntities.IMFIDeliveryScheduleParameters): IDataServiceRequest {\r\n const query = aTPQuery();\r\n return query.createDataServiceRequestForOperation('MFIATPInventoryPLP', true, DataServiceEntities.MFIATPInventoryPLPResponseExtensionClass, 'false', { bypassCache: 'get', returnEntity: 'DataServiceEntities.IMFIATPInventoryPLPResponse' }, { deliveryScheduleParam: deliveryScheduleParam });\r\n}\r\n\r\n\r\nexport function mFIATPInventoryPLPAsync(context: IContext, deliveryScheduleParam: DataServiceEntities.IMFIDeliveryScheduleParameters): AsyncResult {\r\n const request = createMFIATPInventoryPLPInput(deliveryScheduleParam);\r\n return callActionOrExecute(request, context.callerContext);\r\n}\r\n\r\nexport function createMFIATPInventoryDynamicInput(deliveryScheduleParam: DataServiceEntities.IMFIDeliveryScheduleParameters): IDataServiceRequest {\r\n const query = aTPQuery();\r\n return query.createDataServiceRequestForOperation('MFIATPInventoryDynamic', true, DataServiceEntities.MFIATPInventoryDynamicResponseExtensionClass, 'false', { bypassCache: 'get', returnEntity: 'DataServiceEntities.IMFIATPInventoryDynamicResponse' }, { deliveryScheduleParam: deliveryScheduleParam });\r\n}\r\n\r\n\r\nexport function mFIATPInventoryDynamicAsync(context: IContext, deliveryScheduleParam: DataServiceEntities.IMFIDeliveryScheduleParameters): AsyncResult {\r\n const request = createMFIATPInventoryDynamicInput(deliveryScheduleParam);\r\n return callActionOrExecute(request, context.callerContext);\r\n}\r\n\r\nexport function createMFIATPInventoryStatusInput(deliveryScheduleParam: DataServiceEntities.IMFIDeliveryScheduleParameters): IDataServiceRequest {\r\n const query = aTPQuery();\r\n return query.createDataServiceRequestForOperation('MFIATPInventoryStatus', true, DataServiceEntities.MFIATPInventoryStatusResponseExtensionClass, 'false', { bypassCache: 'get', returnEntity: 'DataServiceEntities.IMFIATPInventoryStatusResponse' }, { deliveryScheduleParam: deliveryScheduleParam });\r\n}\r\n\r\n\r\nexport function mFIATPInventoryStatusAsync(context: IContext, deliveryScheduleParam: DataServiceEntities.IMFIDeliveryScheduleParameters): AsyncResult {\r\n const request = createMFIATPInventoryStatusInput(deliveryScheduleParam);\r\n return callActionOrExecute(request, context.callerContext);\r\n}\r\n","import {\r\n CacheType,\r\n createObservableDataAction,\r\n IAction,\r\n IActionContext,\r\n IActionInput,\r\n IAny,\r\n ICommerceApiSettings,\r\n ICreateActionContext,\r\n IGeneric,\r\n IRequestContext\r\n} from '@msdyn365-commerce/core';\r\n// import { ICategoryPath, ICategoryUrl } from '@msdyn365-commerce/core-internal/dist/types/interfaces/ICategoryPathInterfaces';\r\nimport { getCategoryPathsAsync } from '@msdyn365-commerce/retail-proxy/dist/DataActions/ProductsDataActions.g';\r\nimport { CategoryPathLookup, CategoryPathResult } from '@msdyn365-commerce/retail-proxy/dist/Entities/CommerceTypes.g';\r\nimport { hasArray } from '../Utilities/emtpyChecker';\r\n\r\n/**\r\n * Category path input\r\n */\r\nexport class GetCategoryPathsInput implements IActionInput {\r\n public readonly ChannelId: number;\r\n public CatalogId?: number;\r\n public productIds?: number[];\r\n // public readonly categoryPathLooksups: CategoryPathLookup[];\r\n public readonly apiSettings: ICommerceApiSettings;\r\n // @ts-ignore\r\n private constructedCacheKey: string | undefined;\r\n\r\n constructor(context: IRequestContext, catalogId?: number, productIds?: number[]) {\r\n this.ChannelId = context.apiSettings.channelId;\r\n this.CatalogId = catalogId; // context.apiSettings.catalogId || 0;\r\n this.productIds = productIds;\r\n // this.categoryPathLooksups = categoryPathLooksups;\r\n this.apiSettings = context.apiSettings;\r\n this.constructedCacheKey = '';\r\n // categoryPathLooksups.forEach(categoryPath=> {\r\n // this.constructedCacheKey+=`${categoryPath.ProductId && categoryPath.ProductId.toString()}|`;\r\n // });\r\n this.constructedCacheKey = this.productIds?.map(ids => ids).join('-').toString();\r\n this.constructedCacheKey += `${this.ChannelId?.toString()}|`;\r\n this.constructedCacheKey += `${this.CatalogId?.toString()}|`;\r\n }\r\n\r\n public getCacheKey = () => `MFRMProductCategoryPath-${this.constructedCacheKey}`;\r\n public getCacheObjectType = () => 'MFRMProductCategoryPath';\r\n public dataCacheType = (): CacheType => 'application';\r\n}\r\n\r\n/**\r\n * Creates the input required to make the getCategoryPath retail api call\r\n */\r\nexport const createGetCategoryPathsInput = (\r\n inputData: GetCategoryPathsInput,\r\n context: ICreateActionContext>\r\n): IActionInput => {\r\n const productId = inputData.productIds;\r\n if (productId) {\r\n return new GetCategoryPathsInput(context.requestContext, inputData.CatalogId, inputData.productIds);\r\n } else {\r\n throw new Error('Unable to create SelectedVariantInput, no productId found on module config or query');\r\n }\r\n};\r\n\r\n/**\r\n * Calls the Retail API and returns the category path for a product\r\n */\r\nexport async function getProductsCategoryPathsAction(input: GetCategoryPathsInput, ctx: IActionContext): Promise {\r\n const catPaths: CategoryPathLookup[] = [];\r\n if (!hasArray(input.productIds)) {\r\n return [];\r\n }\r\n for (let productsIter = 0; productsIter < input.productIds!.length; productsIter++) {\r\n catPaths.push({ ProductId: input.productIds![productsIter] });\r\n }\r\n try {\r\n return await getCategoryPathsAsync({ callerContext: ctx, queryResultSettings: { Paging: { Top: input.productIds!.length }, Sorting: {} } }, input.ChannelId, input.CatalogId!, catPaths);\r\n } catch (err) {\r\n console.log(err);\r\n return [];\r\n }\r\n}\r\n\r\nexport const getCategoryPathsActionDataAction = createObservableDataAction({\r\n id: 'GetMFRMProductsCategoryPaths',\r\n action: >getProductsCategoryPathsAction,\r\n input: createGetCategoryPathsInput\r\n});\r\n\r\nexport default getCategoryPathsActionDataAction;\r\n","// 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 // TODO: 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 // TODO: 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// TODO: Create a data model here or import one to capture the response of the action\r\n/**\r\n * TODO: 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 * TODO: 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 // TODO: Give your data action a unique id\r\n id: 'GetTryInStoreInfo'\r\n // input: createInput\r\n // TODO: Uncomment the below line if this is a meant to be a batched data action\r\n // isBatched: true\r\n});\r\n","import MsDyn365, {\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 { OrgUnitLocation } from '@msdyn365-commerce/retail-proxy/dist/Entities/CommerceTypes.g';\r\nimport { IStoreSelectorState } from './store-selector-state';\r\n/**\r\n * storeSelectorState - action input\r\n */\r\nexport class StoreSelectorStateInput implements IActionInput {\r\n public getCacheKey = () => `storeSelectorState`;\r\n public getCacheObjectType = () => 'storeSelectorState';\r\n public dataCacheType = (): CacheType => 'application';\r\n}\r\n\r\n/**\r\n * StoreSelectorStateInput - action\r\n */\r\nexport async function storeSelectorStateAction(input: StoreSelectorStateInput, ctx: IActionContext): Promise {\r\n const prefferedStore: OrgUnitLocation =\r\n MsDyn365.isBrowser && localStorage.getItem('_mfrm__prefferedStore_')\r\n ? JSON.parse(localStorage.getItem('_mfrm__prefferedStore_') || '')\r\n : {};\r\n return { isModalOpen: false, prefferedStore: prefferedStore };\r\n}\r\n\r\n/**\r\n * StoreSelectorStateInput - create new input for create action\r\n */\r\nconst createInput = (inputData: ICreateActionContext>): IActionInput => {\r\n return new StoreSelectorStateInput();\r\n};\r\n\r\n/**\r\n * StoreSelectorStateInput - create action\r\n */\r\nexport default createObservableDataAction({\r\n action: >storeSelectorStateAction,\r\n input: createInput\r\n});\r\n","\r\n // tslint:disable\r\n import * as EntityClasses from '@msdyn365-commerce/retail-proxy/dist/Entities/CommerceModels.g';\r\n import * as Entities from '@msdyn365-commerce/retail-proxy/dist/Entities/CommerceTypes.g';\r\n\r\n\r\n /**\r\n * MFIGetProductRecommendationByStoreIdParameters entity interface.\r\n */\r\n export interface IMFIGetProductRecommendationByStoreIdParameters {\r\n StoreId?: string;\r\n NumberOfProducts: number;\r\n Id?: number;\r\n ExtensionProperties?: Entities.CommerceProperty[];\r\n }\r\n\r\n /**\r\n * MFIGetProductRecommendationByStoreIdResponse entity interface.\r\n */\r\n export interface IMFIGetProductRecommendationByStoreIdResponse {\r\n ProuctdRecommendationsData?: Entities.ProductSearchResult[];\r\n Message?: string;\r\n }\r\n\r\n /**\r\n * MFIGetProductRecommendationByStoreIdParameters entity class.\r\n */\r\n export class MFIGetProductRecommendationByStoreIdParametersExtensionClass implements IMFIGetProductRecommendationByStoreIdParameters {\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 NumberOfProducts: 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 Id: 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.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.NumberOfProducts = odataObject.NumberOfProducts;\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.Id = odataObject.Id;\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 (var i = 0; i < odataObject.ExtensionProperties.length; i++) {\r\n if (odataObject.ExtensionProperties[i]) {\r\n if (odataObject.ExtensionProperties[i]['@odata.type']) {\r\n var 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\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 /**\r\n * MFIGetProductRecommendationByStoreIdResponse entity class.\r\n */\r\n export class MFIGetProductRecommendationByStoreIdResponseExtensionClass implements IMFIGetProductRecommendationByStoreIdResponse {\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 ProuctdRecommendationsData: Entities.ProductSearchResult[];\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 // 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.ProuctdRecommendationsData = undefined;\r\n if (odataObject.ProuctdRecommendationsData) {\r\n this.ProuctdRecommendationsData = [];\r\n for (var i = 0; i < odataObject.ProuctdRecommendationsData.length; i++) {\r\n if (odataObject.ProuctdRecommendationsData[i]) {\r\n if (odataObject.ProuctdRecommendationsData[i]['@odata.type']) {\r\n var className: string = odataObject.ProuctdRecommendationsData[i]['@odata.type'];\r\n className = className.substr(className.lastIndexOf('.') + 1).concat(\"Class\");\r\n if (EntityClasses[className]) {\r\n this.ProuctdRecommendationsData[i] = new EntityClasses[className](odataObject.ProuctdRecommendationsData[i]);\r\n }\r\n } else {\r\n this.ProuctdRecommendationsData[i] = new EntityClasses.ProductSearchResultClass(odataObject.ProuctdRecommendationsData[i]);\r\n }\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.ProuctdRecommendationsData[i] = undefined;\r\n }\r\n }\r\n }\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.Message = odataObject.Message;\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\n import { AsyncResult, callActionOrExecute, DataServiceQuery, IContext, IDataServiceRequest } from '@msdyn365-commerce/retail-proxy';\r\n // @ts-ignore\r\n import * as EntityClasses from '@msdyn365-commerce/retail-proxy/dist/Entities/CommerceModels.g';\r\n import * as DataServiceEntities from './ProductRecommendationDataServiceEntities.g';\r\n\r\n // @ts-ignore\r\n function productRecommendationsQuery(id?: number): DataServiceQuery {\r\n const key = (id) ? { Id: id } :null;\r\n return new DataServiceQuery(\"ProductRecommendations\", \"MFIGetProductRecommendationByStoreIdParameters\", DataServiceEntities.MFIGetProductRecommendationByStoreIdParametersExtensionClass, key);\r\n }\r\n\r\n export function createMFIGetProductRecommendationByStoreIdInput(productRecommendationParam: DataServiceEntities.IMFIGetProductRecommendationByStoreIdParameters): IDataServiceRequest {\r\n const query = productRecommendationsQuery();\r\n return query.createDataServiceRequestForOperation('MFIGetProductRecommendationByStoreId', true, DataServiceEntities.MFIGetProductRecommendationByStoreIdResponseExtensionClass, 'false', {bypassCache: 'get', returnEntity: 'DataServiceEntities.IMFIGetProductRecommendationByStoreIdResponse'}, {productRecommendationParam: productRecommendationParam });\r\n }\r\n\r\n export function mFIGetProductRecommendationByStoreIdAsync(context: IContext, productRecommendationParam: DataServiceEntities.IMFIGetProductRecommendationByStoreIdParameters): AsyncResult {\r\n const request = createMFIGetProductRecommendationByStoreIdInput(productRecommendationParam);\r\n return callActionOrExecute(request, context.callerContext);\r\n }","/*!\r\n * Copyright (c) Microsoft Corporation.\r\n * All rights reserved. See LICENSE in the project root for license information.\r\n */\r\n\r\nimport MsDyn365, { RichTextComponent } from '@msdyn365-commerce/core';\r\n\r\nimport * as React from 'react';\r\nimport classname from 'classnames';\r\nimport { useInView } from 'react-intersection-observer';\r\n\r\ninterface IProductData {\r\n image: JSX.Element | null;\r\n price: number | undefined;\r\n carouselIndex: number;\r\n description: string | undefined;\r\n ratingComp: JSX.Element | null;\r\n promoBadge: JSX.Element | undefined;\r\n linkTo: string | undefined;\r\n productID: string | undefined;\r\n productCategory: string | undefined;\r\n productBrand: string | undefined;\r\n productVariant: string | undefined;\r\n enhancedEcommTracking: string | undefined;\r\n productListName: string | undefined;\r\n deliveryMessage: string | undefined;\r\n availableInStoreMessage: string | undefined;\r\n productInventoryLoadStatus: boolean;\r\n}\r\n\r\nexport default (props: IProductData) => {\r\n const styles = 'mfrm-recommendation-module__';\r\n\r\n const {\r\n image,\r\n description,\r\n promoBadge,\r\n linkTo,\r\n price,\r\n ratingComp,\r\n productBrand,\r\n productCategory,\r\n productID,\r\n carouselIndex,\r\n productVariant,\r\n enhancedEcommTracking,\r\n productListName,\r\n deliveryMessage,\r\n availableInStoreMessage,\r\n productInventoryLoadStatus\r\n } = props;\r\n\r\n const listProductName = productListName ? productListName : 'Most Popular Mattresses Module';\r\n\r\n const handleClick = () => {\r\n // @ts-ignore\r\n if ('utag' in window) {\r\n //@ts-ignore\r\n utag.link({\r\n event: 'product-click',\r\n enhanced_action: 'product_click',\r\n event_category: 'ecommerce',\r\n event_action: 'product click',\r\n event_label: `${productID}: ${description}`,\r\n event_noninteraction: 'false',\r\n product_list_name: [listProductName],\r\n product_position: [carouselIndex + 1],\r\n product_id: [productID],\r\n product_name: [description],\r\n product_category: [productCategory],\r\n product_brand: [productBrand],\r\n product_variant: [productVariant]\r\n });\r\n }\r\n if (MsDyn365.isBrowser && linkTo) {\r\n window.location.href = linkTo;\r\n }\r\n };\r\n\r\n const productRecommendationref = React.useRef();\r\n React.useEffect(() => {\r\n productCategory && productRecommendationref.current && productRecommendationref.current.addEventListener('click', handleClick);\r\n }, [productCategory]);\r\n\r\n const [productRecommendationViewRef, inView] = useInView({\r\n triggerOnce: true,\r\n rootMargin: '25px'\r\n });\r\n\r\n const isProduct = enhancedEcommTracking === 'product';\r\n\r\n React.useEffect(() => {\r\n if (isProduct && inView && productCategory) {\r\n const pagePath = MsDyn365.isBrowser\r\n ? window.location.href.split(location.host)[1].includes('?')\r\n ? window.location.href.split(location.host)[1].split('?')[0]\r\n : window.location.href.split(location.host)[1]\r\n : '';\r\n //@ts-ignore\r\n utag.link({\r\n event: 'product-impression',\r\n event_category: 'ecommerce',\r\n event_action: 'product impression',\r\n event_label: `${pagePath}`,\r\n event_noninteraction: 'true',\r\n product_impression_list_name: [listProductName],\r\n product_impression_position: [carouselIndex + 1],\r\n product_impression_id: [productID],\r\n product_impression_name: [description],\r\n product_impression_category: [productCategory],\r\n product_impression_brand: [productBrand],\r\n product_impression_variant: [productVariant],\r\n product_impression_price: [price]\r\n });\r\n }\r\n }, [inView, productCategory]);\r\n\r\n const devlieryIndicator = deliveryMessage !== 'Delivery in 6+ Weeks' ?
\r\n :
;\r\n const availableInStoreIndicator = availableInStoreMessage?.slice(0,9) === 'Available' ?
\r\n :
;\r\n\r\n return (\r\n \r\n );\r\n};\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\nimport MsDyn365 from '@msdyn365-commerce/core';\r\nimport { ICoreContext, IRequestContext, IImageData, IImageSettings, IGridSettings, Image, IAny, IGeneric } from '@msdyn365-commerce/core';\r\nimport { format } from '@msdyn365-commerce-modules/utilities';\r\nimport { getProductPageUrlSync } from '@msdyn365-commerce-modules/retail-actions';\r\nimport { mFIGetProductRecommendationByStoreIdAsync } from '../../actions/ProductRecommendationDataActionExtension.g';\r\nimport { AttributeValue, ProductSearchResult } from '@msdyn365-commerce/retail-proxy/dist/Entities/CommerceTypes.g';\r\nimport { getOrgUnitLocationsByArea, GetOrgUnitLocationsByAreaInput } from '@msdyn365-commerce-modules/retail-actions';\r\nimport { ProductsDataActions } from '@msdyn365-commerce/retail-proxy';\r\nimport dayjs from 'dayjs';\r\nimport { observer } from 'mobx-react';\r\nimport { reaction, observable } from 'mobx';\r\nimport FeaturedSale from './featured-content';\r\nimport { RatingComponent } from '../../themes/mattressfirm/views/components/rating.component';\r\nimport { IMfrmProductRecommendationsData } from './mfrm-product-recommendations.data';\r\nimport { IMfrmProductRecommendationsProps } from './mfrm-product-recommendations.props.autogenerated';\r\nimport * as DataServiceEntities from '../../actions/ProductRecommendationDataServiceEntities.g';\r\nimport { GetCategoryPathsInput, getProductsCategoryPathsAction } from './../../actions/get-mfrm-products-category-paths.action';\r\nimport { IMFITryInStore, IMFITryInStoreInfoResponse } from '../../actions/TryInStoreDataServiceEntities.g';\r\nimport getTryInStoreAction, { GetTryInStoreInfoInput } from '../../actions/get-try-in-store-info.action';\r\nimport { buildProductBadge, parseBadgeData } from '../../Utilities/get-product-badge';\r\nimport { _getDeliveryDate } from '../../Utilities/product-search-result-utils';\r\nimport { getZipCode, getGeoLocationZipCode } from '../../Utilities/get-zipcode';\r\nimport { mFIATPInventoryPLPAsync } from '../../actions/BatchCoreProductDataActionExtension.g';\r\nimport { IMFIATPInventoryPLPResponse, IMFICartLine, IMFIDeliveryScheduleParameters } from '../../actions/BatchCoreProductDataServiceEntities.g';\r\nimport { getAttributeValuesAsync } from '@msdyn365-commerce/retail-proxy/dist/DataActions/ProductsDataActions.g';\r\n\r\nexport interface IMfrmProductRecommendationsViewProps extends IMfrmProductRecommendationsProps {\r\n carouselItems: React.ReactNode[] | null;\r\n}\r\nexport interface IFetchedCategoryIds {\r\n productId?: number;\r\n categoryId?: number;\r\n categoryName?: string;\r\n}\r\nexport interface IProductAvailability {\r\n productId?: string;\r\n deliveryMessage?: string;\r\n availableInStore?: boolean;\r\n}\r\n\r\nexport interface IproductInventoryData {\r\n StoreId?: string;\r\n productId?: string;\r\n availableInStore?: boolean;\r\n}\r\n\r\nexport interface IProductRecommendationState {\r\n categoryData: IFetchedCategoryIds[];\r\n productData: ProductSearchResult[] | undefined;\r\n productAvailabilityData: IProductAvailability[];\r\n productInventoryData: IproductInventoryData[];\r\n productInventoryLoadStatus: boolean;\r\n}\r\n@observer\r\nclass MfrmProductRecommendations extends React.PureComponent<\r\n IMfrmProductRecommendationsProps,\r\n IProductRecommendationState\r\n> {\r\n constructor(props: IMfrmProductRecommendationsProps) {\r\n super(props);\r\n\r\n this.state = {\r\n categoryData: [],\r\n productData: [],\r\n productAvailabilityData: [],\r\n productInventoryData: [],\r\n productInventoryLoadStatus: false\r\n };\r\n }\r\n public async componentDidMount() {\r\n await this.getModuleData();\r\n\r\n const {\r\n data: { storeSelectorStateManager: storeSelectorStateManager }\r\n } = this.props;\r\n\r\n reaction(\r\n () => storeSelectorStateManager.result && storeSelectorStateManager.result.preferredStore?.StoreId,\r\n async () => {\r\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\r\n await this.getModuleData();\r\n }\r\n );\r\n }\r\n\r\n public getModuleData = async (): Promise => {\r\n this.setState({\r\n categoryData: [],\r\n productData: [],\r\n productAvailabilityData: [],\r\n productInventoryLoadStatus: false\r\n });\r\n\r\n const getManualProductData = async () => {\r\n const actionContext = this.props.context.actionContext;\r\n const apiSettings = actionContext.requestContext.apiSettings;\r\n const pIds =\r\n this.props.config.featuredProductList &&\r\n this.props.config.featuredProductList.map(function (product) {\r\n return {\r\n ItemId: product.productID\r\n };\r\n });\r\n\r\n const pIdsSorted =\r\n this.props.config.featuredProductList &&\r\n this.props.config.featuredProductList.map(function (product) {\r\n return product.productID;\r\n });\r\n\r\n const searchCriteriaInput: any = {\r\n Context: {\r\n ChannelId: apiSettings.channelId,\r\n CatalogId: apiSettings.catalogId\r\n },\r\n IncludeAttributes: true,\r\n SkipVariantExpansion: true,\r\n SearchCondition: '*',\r\n ItemIds: pIds\r\n };\r\n\r\n const searchResult = await ProductsDataActions.searchByCriteriaAsync(\r\n { callerContext: actionContext },\r\n searchCriteriaInput\r\n );\r\n const sortedSearchResult = searchResult.sort((a, b) => pIdsSorted.indexOf(a.ItemId) - pIdsSorted.indexOf(b.ItemId));\r\n this.setState({ productData: sortedSearchResult });\r\n };\r\n\r\n const categoryNameFromSlug = (this.props?.data?.category?.result?.Name && this.props?.data?.category?.result?.Name) || '';\r\n const displayManualProduct = this.props?.config.displayMethod === 'manual';\r\n try {\r\n if (displayManualProduct) {\r\n await getManualProductData();\r\n } else {\r\n var productRecommendationParam: DataServiceEntities.IMFIGetProductRecommendationByStoreIdParameters =\r\n {\r\n NumberOfProducts: this.props.config.numberOfProducts,\r\n StoreId: await this.getStoreID()\r\n };\r\n await mFIGetProductRecommendationByStoreIdAsync(\r\n { callerContext: this.props.context.actionContext },\r\n productRecommendationParam\r\n ).then(async response => {\r\n if (response.ProuctdRecommendationsData && response.ProuctdRecommendationsData?.length > 3) {\r\n this.setState({ productData: response.ProuctdRecommendationsData });\r\n } else {\r\n await getManualProductData();\r\n }\r\n });\r\n }\r\n await this.getProductsCategories(this.props.context, this._getIsCategoryPage(), categoryNameFromSlug).then(result => {\r\n this.setState({\r\n categoryData: result\r\n });\r\n });\r\n await this.getStoreInventoryData();\r\n await this.getDeliveryMessageData();\r\n } catch (error) {\r\n console.log('Error loading Product Recommendation Module');\r\n }\r\n };\r\n\r\n public getStoreInventoryData = async (): Promise => {\r\n const { context: { app, actionContext } } = this.props;\r\n const ZipCode = getZipCode(actionContext) || '';\r\n const products = this.state.productData;\r\n const result: IproductInventoryData[] = [];\r\n const StoreId = await this.getStoreID() || '';\r\n\r\n products?.map(async (product) => {\r\n const { AttributeValues, ItemId } = product;\r\n const itemLinesArray: IMFICartLine[] = [];\r\n const lowestPriceVariantRecordId = AttributeValues?.find(\r\n attr => attr.Name?.trim() === app.config.EcomLowestPriceVariantRecIdKey\r\n )?.TextValue;\r\n const itemLine: IMFICartLine = {\r\n ItemId: ItemId,\r\n Quantity: 1,\r\n VariantRecordId: lowestPriceVariantRecordId\r\n };\r\n itemLinesArray.push(itemLine);\r\n\r\n const tryInStoreProductIDs: IMFITryInStore = {\r\n ZipCode,\r\n StoreId,\r\n Products: ItemId,\r\n Limit: app.config.tryInStoreLimit || 10,\r\n Radius: app.config.tryInStoreLookupRadius || 50\r\n };\r\n\r\n const getTryInStoreInfoInput = new GetTryInStoreInfoInput(tryInStoreProductIDs);\r\n await getTryInStoreAction(getTryInStoreInfoInput, actionContext).then(response => {\r\n const data: IMFITryInStoreInfoResponse = response;\r\n result.push({StoreId: StoreId,productId: ItemId,availableInStore: data.Inventory && data.Inventory.length > 0 });\r\n });\r\n this.setState({ productInventoryData: result });\r\n });\r\n };\r\n\r\n public getDeliveryMessageData = async (): Promise => {\r\n const { context: { app, actionContext } } = this.props;\r\n const ZipCode = getZipCode(actionContext) || '';\r\n const products = this.state.productData;\r\n const result: IProductAvailability[] = [];\r\n const itemLinesArray: IMFICartLine[] = [];\r\n\r\n products?.map(async product => {\r\n const { AttributeValues, ItemId } = product;\r\n const lowestPriceVariantRecordId = AttributeValues?.find(\r\n attr => attr.Name?.trim() === app.config.EcomLowestPriceVariantRecIdKey\r\n )?.TextValue;\r\n\r\n const itemLine: IMFICartLine = {\r\n ItemId: ItemId,\r\n Quantity: 1,\r\n VariantRecordId: lowestPriceVariantRecordId\r\n };\r\n itemLinesArray.push(itemLine);\r\n });\r\n\r\n const requestBody: IMFIDeliveryScheduleParameters = {\r\n CustomerRequestTime: dayjs().format('MM/DD/YY HH:MM:ss'),\r\n Id: 0,\r\n InventoryType: 'Delivery',\r\n Weeks: 6,\r\n StoreId: '',\r\n NoOfPriorityDC: 0,\r\n RequestedDate: dayjs().format('MM/DD/YYYY'),\r\n ZipCode,\r\n ItemLines: itemLinesArray\r\n };\r\n await mFIATPInventoryPLPAsync({ callerContext: this.props.context.actionContext }, requestBody).then((response: IMFIATPInventoryPLPResponse) => {\r\n const ATPInventoryPLPData = response.ATPInventoryPLPData;\r\n ATPInventoryPLPData?.map(product => {\r\n result.push({ productId: product.ItemId, deliveryMessage: _getDeliveryDate(product).deliveryByMessage, availableInStore: false });\r\n });\r\n });\r\n this.setState({ productAvailabilityData: result, productInventoryLoadStatus: true });\r\n\r\n products?.map(async product => {\r\n const massterProductId = product.MasterProductId ? product.MasterProductId : 0;\r\n const productSpecificationData : AttributeValue [] = await getAttributeValuesAsync(\r\n { callerContext: this.props.context.actionContext, queryResultSettings: {} },\r\n massterProductId,\r\n this.props.context.request.apiSettings.channelId,\r\n 0\r\n );\r\n const shippingInformation = productSpecificationData.find(attr => attr.Name?.trim() === \"shippingInformation\");\r\n if(shippingInformation?.TextValue === \"Drop Ship\"){\r\n var foundIndex = result.findIndex(item => item.productId === product.ItemId);\r\n\r\n const leadTime = productSpecificationData.find(attr => attr.Name?.trim() === \"leadTime\");\r\n const date = new Date();\r\n const deliveryDate = date.setDate(date.getDate());\r\n\r\n let firstDeliveryDate = deliveryDate;\r\n let lastDeliveryDate = deliveryDate;\r\n let firstDayInt = (leadTime?.TextValue?.split(\"-\")[0] && parseInt(leadTime?.TextValue?.split(\"-\")[0], 10));\r\n let secondDayInt = leadTime?.TextValue?.split(\"-\")[1] && parseInt(leadTime?.TextValue?.split(\"-\")[1], 10);\r\n\r\n while (firstDayInt && firstDayInt > 0 && secondDayInt && secondDayInt> 0) {\r\n firstDeliveryDate = date.setDate(date.getDate() + 1);\r\n if (dayjs(firstDeliveryDate).format('d') !== '0' && dayjs(firstDeliveryDate).format('d') !== '6') {\r\n firstDayInt--;\r\n secondDayInt--;\r\n }\r\n }\r\n\r\n while (secondDayInt && secondDayInt > 0) {\r\n lastDeliveryDate = date.setDate(date.getDate() + 1);\r\n if (dayjs(lastDeliveryDate).format('d') !== '0' && dayjs(lastDeliveryDate).format('d') !== '6') {\r\n secondDayInt--;\r\n }\r\n }\r\n\r\n const newDeliveryMessage = `Delivery by ${dayjs(firstDeliveryDate).format('MMM D')} to ${dayjs(lastDeliveryDate).format('MMM D')}`;\r\n result[foundIndex].deliveryMessage = newDeliveryMessage;\r\n this.setState({ productAvailabilityData: result });\r\n }\r\n });\r\n };\r\n\r\n @observable\r\n public getStoreID = async (): Promise => {\r\n const {\r\n context: { actionContext },\r\n data: { storeSelectorStateManager }\r\n } = this.props;\r\n let defaultStoreId: string | undefined;\r\n const storeObj = localStorage.getItem('_msdyn365__preferredStore_');\r\n const selectedStoreID = storeObj && JSON.parse(storeObj);\r\n\r\n if (selectedStoreID) {\r\n defaultStoreId = selectedStoreID.StoreId;\r\n } else {\r\n const zipCode = getGeoLocationZipCode(actionContext) || '';\r\n\r\n const location = await (await storeSelectorStateManager).geoLocate(zipCode, actionContext);\r\n const lat = location?.latitude || 0;\r\n const long = location?.longitude || 0;\r\n const calRadius = 50;\r\n const distanceUnitValue = 0;\r\n const orgUnitLocationsInput = new GetOrgUnitLocationsByAreaInput(lat, long, calRadius, distanceUnitValue);\r\n\r\n const orgUnitLocations = await getOrgUnitLocationsByArea(orgUnitLocationsInput, actionContext);\r\n if (orgUnitLocations) {\r\n defaultStoreId =\r\n orgUnitLocations &&\r\n orgUnitLocations[0]?.OrgUnitAvailability &&\r\n orgUnitLocations[0].OrgUnitAvailability?.OrgUnitLocation?.OrgUnitNumber;\r\n }\r\n }\r\n return defaultStoreId;\r\n };\r\n\r\n public getRatingAriaLabel = (rating?: number, ratingAriaLabel?: string): string => {\r\n if (rating && ratingAriaLabel) {\r\n const roundedRating = rating.toFixed(2);\r\n return format(ratingAriaLabel || '', roundedRating, '5');\r\n }\r\n return '';\r\n };\r\n\r\n public renderRating = (\r\n context: ICoreContext,\r\n typeName: string,\r\n id: string,\r\n avgRating?: number,\r\n totalRatings?: number,\r\n ariaLabel?: string\r\n ): JSX.Element | null => {\r\n if (avgRating || avgRating === 0) {\r\n const numRatings = (totalRatings && totalRatings.toString()) || '0';\r\n const ratingAriaLabel = this.getRatingAriaLabel(avgRating, ariaLabel);\r\n\r\n return (\r\n \r\n );\r\n } else {\r\n return null;\r\n }\r\n };\r\n\r\n public _getIsCategoryPage(): boolean {\r\n const { context } = this.props;\r\n const requestContext = context && context.request;\r\n const pageType =\r\n requestContext.urlTokens.pageType === 'Category' || (requestContext.query && requestContext.query.categoryId)\r\n ? 'Category'\r\n : 'Search';\r\n return pageType?.toLowerCase() === 'search' ? false : true;\r\n }\r\n\r\n public getProductsCategories = async (\r\n context: ICoreContext>,\r\n isCategoryPage: boolean,\r\n categoryNameFromSlug: string | undefined\r\n ): Promise => {\r\n if (this.state.productData && this.state.productData.length > 0) {\r\n let catName: string | undefined = '';\r\n if (isCategoryPage) {\r\n catName = categoryNameFromSlug;\r\n }\r\n // VSI Customization End - 42859\r\n const productIds: number[] = [];\r\n this.state.productData.forEach(prod => {\r\n const prodId = prod.AttributeValues?.find(attr => attr.KeyName?.trim() === 'EcomLowestPriceVariantRec')?.TextValue;\r\n prodId && productIds.push(Number(prodId));\r\n });\r\n\r\n const catalogId = context.actionContext.requestContext.apiSettings.catalogId;\r\n const productsCategories = await getProductsCategoryPathsAction(\r\n new GetCategoryPathsInput(context.request, catalogId, productIds),\r\n context.actionContext\r\n );\r\n const categoryIds: IFetchedCategoryIds[] = [];\r\n for (let productCategoriesIter = 0; productCategoriesIter < productsCategories.length; productCategoriesIter++) {\r\n if (\r\n productsCategories[productCategoriesIter] &&\r\n productsCategories[productCategoriesIter].CategoryPath &&\r\n productsCategories[productCategoriesIter].CategoryPath!.length > 0\r\n ) {\r\n const catPath = productsCategories[productCategoriesIter].CategoryPath;\r\n const catPathSegments = catPath![0].Segments;\r\n if (catPathSegments && catPathSegments.length > 0) {\r\n const catId = catPathSegments.length > 0 ? catPathSegments[catPathSegments.length - 1].CategoryId : -1;\r\n if (!isCategoryPage) {\r\n catName = catPathSegments.length > 0 ? catPathSegments[catPathSegments.length - 1].CategoryName : '';\r\n }\r\n\r\n categoryIds.push({\r\n productId: productsCategories[productCategoriesIter].ProductId,\r\n categoryId: catId,\r\n categoryName: catName\r\n });\r\n }\r\n }\r\n }\r\n return categoryIds;\r\n }\r\n return [];\r\n };\r\n\r\n public render(): JSX.Element | null {\r\n if (!this.state.productData) {\r\n return null;\r\n }\r\n\r\n const viewProps: IMfrmProductRecommendationsViewProps = {\r\n ...(this.props as IMfrmProductRecommendationsProps),\r\n carouselItems: this._getCarouselItems()\r\n };\r\n return this.props.renderView(viewProps);\r\n }\r\n\r\n private _getCarouselItems = (): React.ReactNode[] | null => {\r\n const storeObj = MsDyn365.isBrowser && localStorage.getItem('_mfrm__prefferedStore_');\r\n const selectedStoreCity = storeObj && (JSON.parse(storeObj)).city;\r\n\r\n if (this.state.productData?.length === 0) {\r\n return null;\r\n }\r\n return this.state.productData!.map((product, index) => {\r\n const { Name, AverageRating, TotalRatings, Price, AttributeValues, PrimaryImageUrl, ItemId } = product;\r\n const { context, id, typeName, config } = this.props;\r\n const lowestPriceVariantRecordId = AttributeValues?.find(\r\n attr => attr.Name?.trim() === context.app.config.EcomLowestPriceVariantRecIdKey\r\n )?.TextValue;\r\n const isMasterProduct = product.IsMasterProduct;\r\n if (isMasterProduct && lowestPriceVariantRecordId !== undefined && lowestPriceVariantRecordId !== '') {\r\n product.RecordId = parseInt(lowestPriceVariantRecordId, 10);\r\n }\r\n const queryBasedSelection = context.app.config.queryBasedVariantSelection;\r\n let productUrl = getProductPageUrlSync(\r\n product.Name || '',\r\n queryBasedSelection ? product.MasterProductId || product.RecordId : product.RecordId,\r\n context && context.actionContext,\r\n undefined\r\n );\r\n if (queryBasedSelection) {\r\n const variantIdQueryParams = productUrl.includes('?') ? `&variantid=${product.RecordId}` : `?variantid=${product.RecordId}`;\r\n productUrl += variantIdQueryParams;\r\n }\r\n\r\n const renderProductBadge = (\r\n attributeName: string | undefined,\r\n attributes: AttributeValue[] | undefined,\r\n requestContext: IRequestContext\r\n ): JSX.Element | undefined => {\r\n const badgeData =\r\n attributeName &&\r\n attributes?.find(\r\n currAttribute =>\r\n currAttribute.Name && currAttribute.Name.toLowerCase().trim() === attributeName.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 => parseBadgeData(badge, requestContext));\r\n // build product badge image components\r\n const finalizedBadges = parsedBadges.map(parsedBadge => parsedBadge && buildProductBadge(parsedBadge, requestContext));\r\n\r\n return finalizedBadges && <>{finalizedBadges};\r\n };\r\n\r\n const renderProductPlacementImage = (\r\n imageSettings?: IImageSettings,\r\n gridSettings?: IGridSettings,\r\n imageUrl?: string,\r\n altText?: string\r\n ): JSX.Element | null => {\r\n if (!imageUrl || !gridSettings || !imageSettings) {\r\n return null;\r\n }\r\n const img: IImageData = {\r\n src: imageUrl,\r\n altText: altText ? altText : ''\r\n };\r\n const imageProps = {\r\n gridSettings,\r\n imageSettings\r\n };\r\n imageProps.imageSettings.cropFocalRegion = true;\r\n return ;\r\n };\r\n\r\n const badgeAttributeToUse = context.app.config.productBadgeAttribute;\r\n const brand = AttributeValues?.find(attr => attr.KeyName?.trim() === 'VendorBrand')?.TextValue;\r\n const productVariant = AttributeValues?.find(attr => attr.Name?.trim() === 'ProductVariant')?.TextValue;\r\n\r\n const matchedDeliveryProduct = this.state.productAvailabilityData.find(item => item.productId === ItemId);\r\n const matchedInventoryProduct = this.state.productInventoryData.find(item => item.productId === ItemId);\r\n\r\n const deliveryInfomation = matchedDeliveryProduct?.deliveryMessage ?\r\n matchedDeliveryProduct?.deliveryMessage\r\n : 'Delivery in 6+ Weeks';\r\n const availableInStoreInformation = matchedInventoryProduct?.availableInStore ?\r\n `Available to try in ${selectedStoreCity}`\r\n : `Not available to try in ${selectedStoreCity}`;\r\n\r\n return (\r\n \r\n );\r\n });\r\n };\r\n}\r\n\r\nexport default MfrmProductRecommendations;\r\n\r\n","/*!\r\n * Copyright (c) Microsoft Corporation.\r\n * All rights reserved. See LICENSE in the project root for license information.\r\n */\r\n\r\nimport Carousel from 'mfcl/Carousel';\r\nimport * as React from 'react';\r\nimport _getViewPort from '../../Utilities/get-view-port';\r\nimport { IMfrmProductRecommendationsViewProps } from './mfrm-product-recommendations';\r\nimport { Image } from '@msdyn365-commerce/core';\r\n\r\nexport default (props: IMfrmProductRecommendationsViewProps) => {\r\n const styles = 'mfrm-recommendation-module__';\r\n const [loaded, setIsLoaded] = React.useState(false);\r\n const hideLoader = () => {\r\n setIsLoaded(true);\r\n };\r\n const { carouselItems } = props;\r\n const minDesktop = carouselItems && carouselItems.length === 4 ? 'min-desktop' : '';\r\n const mobile = _getViewPort(props.context) === 'sm';\r\n\r\n React.useEffect(hideLoader, []);\r\n return (\r\n carouselItems &&\r\n carouselItems.length > 3 && (\r\n <>\r\n {props.config.avatarImage &&
\r\n
\r\n {props.config.avatarImage && (\r\n
\r\n \r\n
\r\n )}\r\n
\r\n {props.config.heading &&
{props.config.heading.text}
}\r\n {props.config.subHeading && (\r\n
{props.config.subHeading.text}
\r\n )}\r\n {props.config.link && (\r\n \r\n {props.config.link?.linkText}\r\n \r\n )}\r\n
\r\n
\r\n
}\r\n
\r\n
\r\n {mobile ? (\r\n
\r\n \r\n {carouselItems}\r\n \r\n
\r\n ) : (\r\n \r\n {carouselItems}\r\n \r\n )}\r\n
\r\n
\r\n \r\n )\r\n );\r\n};\r\n","import React, { useEffect, useState } from 'react';\r\n\r\nimport { IComponent, IComponentProps, msdyn365Commerce } from '@msdyn365-commerce/core';\r\n\r\nexport interface IRatingComponentProps extends IComponentProps<{}> {\r\n readOnly: boolean;\r\n ariaLabel: string;\r\n avgRating: number;\r\n ratingCount?: string;\r\n initialRating?: number;\r\n hideCount?: boolean;\r\n className?: string;\r\n onChange?(value: number): void;\r\n}\r\nexport interface IRatingComponent extends IComponent {\r\n onSliderChanged(): (\r\n event: React.ChangeEvent,\r\n props: IRatingComponentProps,\r\n setRating: (rating: IRatingState) => void\r\n ) => void;\r\n onMouseOver(): (event: React.MouseEvent, rating: IRatingState, setRating: (rating: IRatingState) => void) => void;\r\n onClick(): (event: React.MouseEvent, props: IRatingComponentProps, setRating: (rating: IRatingState) => void) => void;\r\n onMouseLeave(): (event: React.MouseEvent, rating: IRatingState, setRating: (rating: IRatingState) => void) => void;\r\n}\r\n\r\ninterface IRatingState {\r\n rating: number;\r\n lastSelectedRating: number;\r\n}\r\n\r\nconst roundUpMin: number = 0.75;\r\nconst roundMidMin: number = 0.25;\r\nconst maxRating: number = 5;\r\n\r\nconst RatingComponentActions = {\r\n onSliderChanged(\r\n event: React.ChangeEvent,\r\n props: IRatingComponentProps,\r\n setRating: (rating: IRatingState) => void\r\n ): void {\r\n const value = Number.parseInt(event.target.value, 10);\r\n setRating({ rating: value, lastSelectedRating: value });\r\n\r\n if (props.onChange) {\r\n props.onChange(value);\r\n }\r\n },\r\n onMouseLeave(_event: React.MouseEvent, rating: IRatingState, setRating: (rating: IRatingState) => void): void {\r\n setRating({ rating: rating.lastSelectedRating, lastSelectedRating: rating.lastSelectedRating });\r\n },\r\n onMouseOver(event: React.MouseEvent, rating: IRatingState, setRating: (rating: IRatingState) => void): void {\r\n setRating({ rating: getIndex(event), lastSelectedRating: rating.lastSelectedRating });\r\n },\r\n onClick(event: React.MouseEvent, props: IRatingComponentProps, setRating: (rating: IRatingState) => void): void {\r\n if (!props.readOnly) {\r\n const index = getIndex(event);\r\n setRating({ rating: index, lastSelectedRating: index });\r\n\r\n if (props.onChange) {\r\n props.onChange(index);\r\n }\r\n }\r\n }\r\n};\r\n\r\nconst Rating: React.FC = (props: IRatingComponentProps) => {\r\n const initialRating = props.readOnly ? props.avgRating : props.initialRating || 0;\r\n const [rating, setRating] = useState({ rating: initialRating, lastSelectedRating: initialRating });\r\n useEffect(() => {\r\n const newRating = props.readOnly ? props.avgRating : props.initialRating || 0;\r\n setRating({ rating: newRating, lastSelectedRating: newRating });\r\n }, [props]);\r\n const onChange = (event: React.ChangeEvent) => {\r\n RatingComponentActions.onSliderChanged(event, props, setRating);\r\n };\r\n const onMouseLeave = (event: React.MouseEvent) => {\r\n RatingComponentActions.onMouseLeave(event, rating, setRating);\r\n };\r\n const onMouseOver = (event: React.MouseEvent) => {\r\n RatingComponentActions.onMouseOver(event, rating, setRating);\r\n };\r\n const onClick = (event: React.MouseEvent) => {\r\n RatingComponentActions.onClick(event, props, setRating);\r\n };\r\n\r\n return (\r\n
0 ? 'msc-no-ratings' : ''} ${props.className ? props.className : ''}`}>\r\n {starControl(props.readOnly, rating.rating, props.ariaLabel, onChange)}\r\n
\r\n {renderStars(rating.rating, props, onMouseOver, onClick)}\r\n
\r\n {/* VSI Customization - START */}\r\n \r\n {props.avgRating}/5 ({props.ratingCount})\r\n \r\n {/* VSI Customization - END */}\r\n
\r\n );\r\n};\r\n\r\n// Set default props\r\nRating.defaultProps = {\r\n avgRating: 0\r\n} as Partial;\r\n\r\nconst starControl = (\r\n readOnly: boolean,\r\n currentRating: number,\r\n ariaLabel: string,\r\n onChange: (event: React.ChangeEvent) => void\r\n): JSX.Element => {\r\n if (readOnly) {\r\n return
{ariaLabel}
;\r\n }\r\n\r\n return (\r\n \r\n );\r\n};\r\n\r\nconst renderStars = (\r\n rating: number,\r\n props: IRatingComponentProps,\r\n mouseOver: (event: React.MouseEvent) => void,\r\n onClick: (event: React.MouseEvent) => void\r\n): JSX.Element[] => {\r\n const floor = Math.floor(rating);\r\n const remainder = rating - floor;\r\n const filled = remainder < roundUpMin ? floor : floor + 1;\r\n const half = roundMidMin <= remainder && remainder < roundUpMin ? filled + 1 : 0;\r\n const stars = [];\r\n\r\n for (let i = 1; i <= maxRating; i++) {\r\n const glyphClass = filled >= i ? 'msc-rating__star' : half === i ? 'msc-rating__half-star' : 'msc-rating__empty-star';\r\n stars.push(\r\n \r\n );\r\n }\r\n\r\n return stars;\r\n};\r\n\r\nconst getIndex = (event: React.MouseEvent): number => {\r\n const target = event.target as HTMLElement;\r\n return Number.parseInt(target.getAttribute('data-index')!, 10);\r\n};\r\n\r\n// @ts-ignore\r\nexport const RatingComponent: React.FunctionComponent = msdyn365Commerce.createComponentOverride(\r\n 'Rating',\r\n { component: Rating, ...RatingComponentActions }\r\n);\r\n\r\nexport default RatingComponent;\r\n","const binding = { modules: {}, dataActions: {} };\n\n const registerActionId = (actionPath) => {\n if (binding.dataActions[actionPath] &&\n binding.dataActions[actionPath].default &&\n binding.dataActions[actionPath].default.prototype &&\n binding.dataActions[actionPath].default.prototype.id) {\n binding.dataActions[binding.dataActions[actionPath].default.prototype.id] = binding.dataActions[actionPath];\n } else {\n Object.keys(binding.dataActions[actionPath] || {}).forEach(exportName => {\n if (binding.dataActions[actionPath][exportName] &&\n binding.dataActions[actionPath][exportName].prototype &&\n binding.dataActions[actionPath][exportName].prototype.Action) {\n binding.dataActions[binding.dataActions[actionPath][exportName].prototype.id] = binding.dataActions[actionPath][exportName];\n }\n })\n }\n };\n\n const registerSanitizedActionPath = (sanitizedActionPath, dataAction) => {\n if (process.env.NODE_ENV === 'development') {\n if (!dataAction.default) {\n throw new Error('Data action path does not have a default export');\n }\n if (!(dataAction.default.prototype.id && binding.dataActions[dataAction.default.prototype.id]) || !binding.dataActions[sanitizedActionPath]) {\n binding.dataActions[sanitizedActionPath] = dataAction;\n }\n } else {\n binding.dataActions[sanitizedActionPath] = dataAction;\n if (!binding.dataActions[sanitizedActionPath].default) {\n throw new Error('Data action path ' + sanitizedActionPath + ' does not have a default export');\n }\n binding.dataActions[sanitizedActionPath].default.prototype.RegistrationId = sanitizedActionPath;\n if (binding.dataActions[sanitizedActionPath].default.prototype.id) {\n binding.dataActions[binding.dataActions[sanitizedActionPath].default.prototype.id] = sanitizedActionPath;\n }\n }\n };\n \n\n (binding.modules['mfrm-product-recommendations'] = {\n c: () => require('partner/modules/mfrm-product-recommendations/mfrm-product-recommendations.tsx'),\n $type: 'contentModule',\n da: [{name:'category', path:'@msdyn365-commerce-modules/retail-actions/dist/lib/get-current-category', runOn: 0},{name:'storeSelectorState', path:'data-actions/store-selector-state-data-action', runOn: 0},{name:'storeSelectorStateManager', path:'@msdyn365-commerce-modules/bopis-utilities/dist/lib/store-selector-state-manager/store-selector-state-manager-data-action', runOn: 1}],\n \n iNM: false,\n ns: '__local__',\n n: 'mfrm-product-recommendations',\n p: '__local__',\n \n pdp: '',\n \n \n md: 'src/modules/mfrm-product-recommendations'\n });\n \n\n {\n const sanitizedActionPath = '@msdyn365-commerce-modules/bopis-utilities/dist/lib/store-selector-state-manager/store-selector-state-manager-data-action';\n let dataAction = require('@msdyn365-commerce-modules/bopis-utilities/dist/lib/store-selector-state-manager/store-selector-state-manager-data-action');\n registerSanitizedActionPath(sanitizedActionPath, dataAction);\n }\n \n\n {\n const sanitizedActionPath = '@msdyn365-commerce-modules/retail-actions/dist/lib/get-current-category';\n let dataAction = require('@msdyn365-commerce-modules/retail-actions/dist/lib/get-current-category');\n registerSanitizedActionPath(sanitizedActionPath, dataAction);\n }\n \n\n {\n const sanitizedActionPath = 'data-actions/store-selector-state-data-action';\n let dataAction = require('partner/data-actions/store-selector-state-data-action');\n registerSanitizedActionPath(sanitizedActionPath, dataAction);\n }\n \n\n \n window.__bindings__ = window.__bindings__ || {};\n window.__bindings__.modules = {\n ...window.__bindings__.modules || {},\n ...binding.modules\n };\n \n window.__bindings__.dataActions = {\n ...window.__bindings__.dataActions || {},\n ...binding.dataActions\n };\n export const viewDictionary = {};\n viewDictionary['__local__|__local__|modules|mfrm-product-recommendations|mfrm-product-recommendations'] = {\n c: () => require('partner/modules/mfrm-product-recommendations/mfrm-product-recommendations.view.tsx'),\n cn: '__local__-__local__-mfrm-product-recommendations'\n };\nwindow.__bindings__ = window.__bindings__ || {};\nwindow.__bindings__.viewDictionary = {\n ...window.__bindings__.viewDictionary || {},\n ...viewDictionary\n };","/*--------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * See License.txt in the project root for license information.\n *--------------------------------------------------------------*/\n\nimport MsDyn365, { IActionContext } from '@msdyn365-commerce/core';\nimport { action, computed, observable } from 'mobx';\n\nimport { IListMapViewState, ILoadMapApiInput, IStoreInfo, IStoreSelectionStateContext, IStoreSelectorLocation, IStoreSelectorStateManager } from './i-store-selection-state-manager';\n\n/**\n * Abstract instance of IStoreSelectorStateManager with base implementation\n * of everything except the geoLocate function.\n */\nexport abstract class BaseStoreSelectorStateManager implements IStoreSelectorStateManager {\n\n @computed public get isDialogOpen(): Readonly {\n return this._context !== undefined;\n }\n\n @computed public get context(): Readonly {\n return this._context;\n }\n\n @observable public isMapApiLoaded?: boolean;\n\n @observable public selectedStoreLocationId?: string;\n\n @observable public preferredStore?: IStoreInfo;\n\n @observable public listMapViewState: IListMapViewState = { displayList: true, displayMap: false };\n\n @observable public isMapModuleLoaded?: boolean;\n\n @observable public lastInlineShownStoreInfo?: IStoreInfo;\n\n @observable protected _context?: IStoreSelectionStateContext;\n\n private readonly preferredStoreLocalStorageKey: string = '_msdyn365__preferredStore_';\n\n constructor() {\n this.isMapModuleLoaded = false;\n const value = this._readFromToCookie(this.preferredStoreLocalStorageKey);\n try {\n const storeInfo: IStoreInfo | undefined = value ? JSON.parse(value) : undefined;\n if (storeInfo) {\n this.preferredStore = storeInfo;\n }\n } catch {\n this.preferredStore = undefined;\n }\n\n }\n\n public abstract geoLocate(searchTerm: string, actionContext: IActionContext): Promise;\n\n public abstract loadMapApi(input: ILoadMapApiInput): Promise;\n\n @action\n public async toggleListMapViewState(): Promise {\n this.listMapViewState = {\n displayList: !this.listMapViewState.displayList,\n displayMap: !this.listMapViewState.displayMap\n };\n }\n\n @action\n public async setMapModuleLoaded(input: boolean): Promise {\n this.isMapModuleLoaded = input;\n }\n\n @action\n public async setOrgUnitStoreInformation(input: IStoreSelectionStateContext): Promise {\n this._context = input;\n }\n\n @action\n public async setSelectedStoreLocationId(storeId: string | undefined): Promise {\n this.selectedStoreLocationId = storeId;\n }\n\n @action\n public async setPreferredStoreLocation(storeId?: string, storeName?: string | undefined, writeToCookie: boolean = false, latitude?: number, longitude?: number): Promise {\n const storeInfo: IStoreInfo = { StoreId: storeId, StoreName: storeName, Latitude: latitude, Longitude: longitude };\n this.preferredStore = storeInfo;\n if (writeToCookie) {\n this._writeToCookie(this.preferredStoreLocalStorageKey, JSON.stringify(storeInfo));\n }\n }\n\n @action\n public async setLastInlineStoreInfo(latitude?: number, longitude?: number): Promise {\n const storeInfo: IStoreInfo = { StoreId: '', StoreName: '', Latitude: latitude, Longitude: longitude };\n this.lastInlineShownStoreInfo = storeInfo;\n }\n\n @action\n public async clearPreferredStore(writeToCookie: boolean): Promise {\n this.preferredStore = undefined;\n if (writeToCookie) {\n this._removeCookie(this.preferredStoreLocalStorageKey);\n }\n }\n\n @action\n public async openDialog(input: IStoreSelectionStateContext): Promise {\n if (this._context && this._context.id === input.id) {\n throw new Error('Dialog is already opened');\n }\n\n this._context = input;\n }\n\n @action\n public async closeDialog(): Promise {\n this._context = undefined;\n }\n\n private _removeCookie(key: string): void {\n if (!key) {\n return;\n }\n if (MsDyn365.isBrowser) {\n const storage = window.localStorage;\n storage.removeItem(key);\n }\n }\n\n private _writeToCookie(key: string, value: string | undefined): void {\n if (!key || !value) {\n return;\n }\n if (MsDyn365.isBrowser) {\n const storage = window.localStorage;\n storage.setItem(key, value);\n }\n }\n\n private _readFromToCookie(key: string): string | undefined {\n if (!key) {\n return undefined;\n }\n if (MsDyn365.isBrowser) {\n const storage = window.localStorage;\n const cookieValue = storage.getItem(key);\n if (cookieValue) {\n return cookieValue;\n }\n }\n\n return undefined;\n }\n}\n","/*--------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * See License.txt in the project root for license information.\n *--------------------------------------------------------------*/\n\nimport { IActionContext } from '@msdyn365-commerce/core';\nimport { StringExtensions } from '@msdyn365-commerce-modules/retail-actions';\nimport { action } from 'mobx';\n\nimport { BaseStoreSelectorStateManager } from './base-store-selector-state-manager';\nimport { ILoadMapApiInput, IStoreSelectorLocation } from './i-store-selection-state-manager';\nimport { IMapWindow, MapLocationsResult } from './models/map-data';\n\ndeclare const window: IMapWindow;\n\n/**\n * Instance of IStoreSelectorStateManager manager that uses Map service\n * for geo location.\n */\nexport class MapStoreSelectorStateManager extends BaseStoreSelectorStateManager {\n private readonly SERVICE_ENDPOINT: string = 'https://dev.virtualearth.net/REST/v1/';\n\n private readonly MAP_API_ENDPOINT: string = 'https://www.bing.com/api/maps/mapcontrol?callback=mapAPIReady';\n\n @action\n public async geoLocate(searchTerm: string, actionContext: IActionContext): Promise {\n if (!searchTerm ||\n !actionContext.requestContext.channel ||\n !actionContext.requestContext.channel.BingMapsApiKey ||\n !actionContext.requestContext.channel.BingMapsEnabled) {\n return undefined;\n }\n\n let searchContent: string = searchTerm;\n\n const jsonp = `mapSearchCallback_${crypto.getRandomValues(new Uint32Array(1))[0]}`;\n\n if (actionContext.requestContext.channel.ChannelCountryRegionISOCode) {\n searchContent = `${searchTerm.trim()} ${actionContext.requestContext.channel.ChannelCountryRegionISOCode}`;\n }\n\n const query = encodeURI(searchContent);\n const key = encodeURI(actionContext.requestContext.channel.BingMapsApiKey);\n\n const geolocationApiUrl = actionContext.requestContext.app && actionContext.requestContext.app.config && actionContext.requestContext.app.config.geolocationApiUrl;\n const requestUrl = `${geolocationApiUrl ? geolocationApiUrl : this.SERVICE_ENDPOINT}/Locations?query=${query}&key=${key}&jsonp=${jsonp}`;\n\n return new Promise((resolve) => {\n const script = document.createElement('script');\n script.setAttribute('type', 'text/javascript');\n script.setAttribute('src', requestUrl);\n\n window[jsonp] = (data: MapLocationsResult) => {\n delete window[jsonp];\n script.remove();\n\n if (data && data.resourceSets && data.resourceSets.length > 0 && data.resourceSets[0].resources.length > 0) {\n resolve({\n latitude: data.resourceSets[0].resources[0].point.coordinates[0],\n longitude: data.resourceSets[0].resources[0].point.coordinates[1]\n });\n }\n\n resolve(undefined);\n };\n\n document.body.appendChild(script);\n });\n\n }\n\n @action\n public async loadMapApi(input: ILoadMapApiInput): Promise {\n if (StringExtensions.isNullOrEmpty(input.key)) {\n return Promise.resolve();\n }\n\n const isScriptAlreadyLoaded = !!document?.getElementById('msdyn_map-api-script');\n\n if (isScriptAlreadyLoaded) {\n // Prevents from loading multiple script into the body\n return Promise.resolve();\n }\n\n const url = `${this.MAP_API_ENDPOINT}${input.key ? `&key=${input.key}` : ''}${input.lang ? `&setLang=${input.lang}` : ''}${input.market ? `&setMkt=${input.market}` : ''}`;\n\n return new Promise((resolve, reject) => {\n const script = document?.createElement('script');\n script.type = 'text/javascript';\n script.async = true;\n script.defer = true;\n script.src = url;\n script.id = 'msdyn_map-api-script';\n if (window) {\n window.mapAPIReady = () => {\n this.isMapApiLoaded = true;\n resolve();\n };\n }\n script.addEventListener('error', (error: string | Event) => {\n reject(error);\n });\n document?.body?.appendChild(script);\n });\n }\n\n}\n","/*--------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * See License.txt in the project root for license information.\n *--------------------------------------------------------------*/\n\nimport { createObservableDataAction, IAction, IActionInput, IAny, ICreateActionContext, IGeneric } from '@msdyn365-commerce/core';\nimport { GenericInput, getGenericAction } from '@msdyn365-commerce-modules/retail-actions';\n\nimport { IStoreSelectorStateManager } from './i-store-selection-state-manager';\nimport { MapStoreSelectorStateManager } from './map-store-selector-state-manager';\n\nexport function createStoreSelectorStateInput(result: IStoreSelectorStateManager): GenericInput {\n return new GenericInput('mapSSSM', result, 'IStoreSelectorStateManager');\n}\n\nconst createStoreSelectorStateInputInternal = (inputData: ICreateActionContext>): IActionInput => {\n return createStoreSelectorStateInput(new MapStoreSelectorStateManager());\n};\n\nexport const getGenericActionDataAction = createObservableDataAction({\n action: >getGenericAction,\n input: createStoreSelectorStateInputInternal\n});\n\nexport default getGenericActionDataAction;\n","module.exports = React;","module.exports = ReactDOM;"],"names":["async","request","context","isCached","getDeliveryMessageActionInput","GetDeliveryMessageInput","result","getDeliveryMessageAction","actionContext","error","console","log","dayjs","tz","utc","isBetween","format","defaultImageSettings","viewports","xs","q","w","h","disableLazyLoad","parseBadgeData","badgeData","requestContext","dataSegments","scheduleStart","scheduleEnd","badgeType","parsedScheduleStart","startDate","startTime","parsedScheduleEnd","endDate","endTime","split","e","startMoment","replace","endMoment","startMomentFormatted","endMomentFormatted","isValid","baseUrl","apiSettings","baseImageUrl","substring","length","removed$","parsedBadgeType","toLowerCase","altText","src","alt","start","convertTimeZone","end","time","local","buildProductBadge","parsedBadgeData","React","Image","className","gridSettings","title","imageSettings","renderProductBadge","attributeName","finalizedBadges","map","badge","parsedBadge","MsDyn365","window","innerWidth","sm","md","lg","getZipCode","ctx","geolocationZipCode","geoLocation","zipCode","res","cookie","Cookies","zipcode","get","undefined","getGeoLocationZipCode","_getEyebrowMessage","products","priceGroupForAPICall","app","config","priceGroup","items","item","singleItem","ItemId","DistinctProductVariant","push","requestBody","PriceGroup","Items","getEyebrowMessageInput","GetEyebrowMessageInput","getEyebrowAction","_makeDeliveryMessage","days","deliveryByMessage","date","Date","daysSpan","deliveryDate","now","deliveryByMessageRange","parseInt","numberOfDays","newDate","setDate","getDate","flag","_setTime","temp","newDatewithTime","toUpperCase","_getSoonestDeliveryDate","coreProductATPData","deliveryDetails","locationId","index","Available","ATPQuantity","today","SlotDate","currHour","StartTime","Location1","_getDeliveryDate","startTimeHour","MFIDeliveryScheduleParametersExtensionClass","constructor","odataObject","this","ZipCode","RequestedDate","StoreId","InventoryType","Weeks","NoOfPriorityDC","Page","SourceSystem","CustomerRequestTime","Id","ExtensionProperties","i","substr","lastIndexOf","concat","EntityClasses","ItemLines","MFICartLineExtensionClass","VariantRecordId","ProductId","Quantity","parseFloat","QuantityOrdered","IsVoided","MFIATPInventoryEntityPLPExtensionClass","Variant","Zone","ZoneId","EndTime","Slots","MFIATPLeadDate","IsTranscity","IsNationWide","ZipCodeGroupId","ZoneLineId","MFIATPInventoryPLPResponseExtensionClass","ATPInventoryPLPData","Message","aTPQuery","id","key","DataServiceQuery","DataServiceEntities","mFIATPInventoryPLPAsync","deliveryScheduleParam","createDataServiceRequestForOperation","bypassCache","returnEntity","createMFIATPInventoryPLPInput","callActionOrExecute","callerContext","GetCategoryPathsInput","catalogId","productIds","getCacheKey","constructedCacheKey","getCacheObjectType","dataCacheType","ChannelId","channelId","CatalogId","ids","join","toString","createGetCategoryPathsInput","inputData","Error","getProductsCategoryPathsAction","input","catPaths","hasArray","productsIter","getCategoryPathsAsync","queryResultSettings","Paging","Top","Sorting","err","getCategoryPathsActionDataAction","createObservableDataAction","action","MFITryInStoreExtensionClass","Products","Limit","Radius","MFITryInStoreInfoResponseExtensionClass","Status","Inventory","createMFIGetTryInStoreInfoInput","tryInStoreProductIDs","storeId","tryInStoresQuery","GetTryInStoreInfoInput","Msdyn365","mFIGetTryInStoreInfoAsync","StoreSelectorStateInput","storeSelectorStateAction","isModalOpen","prefferedStore","localStorage","getItem","JSON","parse","MFIGetProductRecommendationByStoreIdParametersExtensionClass","NumberOfProducts","MFIGetProductRecommendationByStoreIdResponseExtensionClass","ProuctdRecommendationsData","createMFIGetProductRecommendationByStoreIdInput","productRecommendationParam","productRecommendationsQuery","props","styles","image","description","promoBadge","linkTo","price","ratingComp","productBrand","productCategory","productID","carouselIndex","productVariant","enhancedEcommTracking","productListName","deliveryMessage","availableInStoreMessage","productInventoryLoadStatus","listProductName","handleClick","utag","link","event","enhanced_action","event_category","event_action","event_label","event_noninteraction","product_list_name","product_position","product_id","product_name","product_category","product_brand","product_variant","location","href","productRecommendationref","current","addEventListener","productRecommendationViewRef","inView","useInView","triggerOnce","rootMargin","isProduct","pagePath","host","includes","product_impression_list_name","product_impression_position","product_impression_id","product_impression_name","product_impression_category","product_impression_brand","product_impression_variant","product_impression_price","devlieryIndicator","availableInStoreIndicator","slice","ref","classname","RichTextComponent","text","MfrmProductRecommendations","super","getModuleData","setState","categoryData","productData","productAvailabilityData","getManualProductData","pIds","featuredProductList","product","pIdsSorted","searchCriteriaInput","Context","IncludeAttributes","SkipVariantExpansion","SearchCondition","ItemIds","sortedSearchResult","ProductsDataActions","sort","a","b","indexOf","categoryNameFromSlug","data","category","Name","displayManualProduct","displayMethod","numberOfProducts","getStoreID","mFIGetProductRecommendationByStoreIdAsync","then","response","getProductsCategories","_getIsCategoryPage","getStoreInventoryData","getDeliveryMessageData","state","AttributeValues","lowestPriceVariantRecordId","find","attr","trim","EcomLowestPriceVariantRecIdKey","TextValue","tryInStoreLimit","tryInStoreLookupRadius","getTryInStoreInfoInput","getTryInStoreAction","productId","availableInStore","productInventoryData","itemLinesArray","itemLine","massterProductId","MasterProductId","productSpecificationData","getAttributeValuesAsync","shippingInformation","foundIndex","findIndex","leadTime","firstDeliveryDate","lastDeliveryDate","firstDayInt","secondDayInt","newDeliveryMessage","storeSelectorStateManager","defaultStoreId","storeObj","selectedStoreID","geoLocate","lat","latitude","long","longitude","calRadius","distanceUnitValue","orgUnitLocationsInput","GetOrgUnitLocationsByAreaInput","orgUnitLocations","getOrgUnitLocationsByArea","OrgUnitAvailability","OrgUnitLocation","OrgUnitNumber","getRatingAriaLabel","rating","ratingAriaLabel","roundedRating","toFixed","renderRating","typeName","avgRating","totalRatings","ariaLabel","numRatings","RatingComponent","ratingCount","readOnly","isCategoryPage","catName","forEach","prod","prodId","KeyName","Number","productsCategories","categoryIds","productCategoriesIter","CategoryPath","catPathSegments","Segments","catId","CategoryId","CategoryName","categoryId","categoryName","_getCarouselItems","selectedStoreCity","city","AverageRating","TotalRatings","Price","PrimaryImageUrl","IsMasterProduct","RecordId","queryBasedSelection","queryBasedVariantSelection","productUrl","getProductPageUrlSync","variantIdQueryParams","badgeAttributeToUse","productBadgeAttribute","brand","matchedDeliveryProduct","matchedInventoryProduct","deliveryInfomation","availableInStoreInformation","FeaturedSale","imageUrl","img","imageProps","cropFocalRegion","Object","loadFailureBehavior","renderProductPlacementImage","URL","attributes","currAttribute","reaction","preferredStore","pageType","urlTokens","query","render","viewProps","carouselItems","renderView","__decorate","observable","observer","loaded","setIsLoaded","minDesktop","mobile","_getViewPort","avatarImage","heading","subHeading","linkUrl","destinationUrl","target","openInNewTab","linkText","Carousel","itemsToShow","hideIndicators","hideControls","controlStyle","controlClass","disableEndButtons","variableWidth","responsive","breakpoint","layoutGap","RatingComponentActions","onSliderChanged","setRating","value","lastSelectedRating","onChange","onMouseLeave","_event","onMouseOver","getIndex","onClick","Rating","initialRating","useState","useEffect","newRating","starControl","renderStars","tabIndex","defaultProps","currentRating","type","min","max","step","mouseOver","floor","Math","remainder","filled","half","stars","glyphClass","role","getAttribute","msdyn365Commerce","component","binding","modules","dataActions","registerSanitizedActionPath","sanitizedActionPath","dataAction","default","prototype","RegistrationId","c","require","$type","da","name","path","runOn","iNM","ns","n","p","pdp","__bindings__","viewDictionary","cn","BaseStoreSelectorStateManager","listMapViewState","displayList","displayMap","preferredStoreLocalStorageKey","isMapModuleLoaded","_readFromToCookie","storeInfo","_context","selectedStoreLocationId","storeName","writeToCookie","StoreName","Latitude","Longitude","_writeToCookie","stringify","lastInlineShownStoreInfo","_removeCookie","removeItem","setItem","cookieValue","computed","MapStoreSelectorStateManager","SERVICE_ENDPOINT","MAP_API_ENDPOINT","searchTerm","channel","BingMapsApiKey","BingMapsEnabled","searchContent","jsonp","crypto","getRandomValues","Uint32Array","ChannelCountryRegionISOCode","encodeURI","geolocationApiUrl","requestUrl","Promise","resolve","script","document","createElement","setAttribute","remove","resourceSets","resources","point","coordinates","body","appendChild","StringExtensions","getElementById","url","lang","market","reject","defer","mapAPIReady","isMapApiLoaded","createStoreSelectorStateInput","GenericInput","getGenericActionDataAction","getGenericAction","module","exports","ReactDOM"],"sourceRoot":""}