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AAOC,aAAarB,aAAe,IACnCF,EAAQE,aAEY,MAAMsB,EAAiB,GAC9BA,EAAe,+FAAiG,CACxHd,EAAGA,IAAMC,EAAQ,MACjBc,GAAI,uDAEpBH,OAAOC,aAAeD,OAAOC,cAAgB,GAC7CD,OAAOC,aAAaC,eAAcvS,EAAAA,EAAA,GACPqS,OAAOC,aAAaC,gBAAkB,IACtCA,I,MC1F3BE,EAAOC,QAAUrN,O,OCAjBoN,EAAOC,QAAUC,W","sources":["webpack://Msdyn365.Commerce.Online/./src/components/sequenceproductitem.component.tsx?ee26","webpack://Msdyn365.Commerce.Online/./src/modules/moe-product-sequence-collection/moe-product-sequence-collection.props.autogenerated.ts?8fe9","webpack://Msdyn365.Commerce.Online/./src/modules/moe-product-sequence-collection/moe-product-sequence-collection.tsx?d78c","webpack://Msdyn365.Commerce.Online/./src/modules/moe-product-sequence-collection/moe-product-sequence-collection.view.tsx?6454","webpack://Msdyn365.Commerce.Online/./lib/moe-product-sequence-collection/module-registration.js?cb0f","webpack://Msdyn365.Commerce.Online/external var \"React\"?0d3b","webpack://Msdyn365.Commerce.Online/external var \"ReactDOM\"?853b"],"sourcesContent":["/*--------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * See License.txt in the project root for license information.\r\n *--------------------------------------------------------------*/\r\n\r\nimport { IProductsDimensionsAvailabilities } from '@msdyn365-commerce/commerce-entities';\r\nimport {\r\n IComponent,\r\n IComponentProps,\r\n ICoreContext,\r\n IGridSettings,\r\n IImageData,\r\n IImageProps,\r\n IImageSettings,\r\n Image,\r\n IRequestContext,\r\n msdyn365Commerce\r\n} from '@msdyn365-commerce/core';\r\nimport { IPriceComponentResources, ISwatchItem, ProductComponentSwatchComponent } from '@msdyn365-commerce/components';\r\nimport { AttributeSwatch, ProductSearchResult } from '@msdyn365-commerce/retail-proxy';\r\nimport {\r\n ArrayExtensions,\r\n checkIfShouldDisplayAsSwatch,\r\n Dictionary,\r\n DimensionSwatchDisplayTypes,\r\n DimensionTypes,\r\n generateImageUrl,\r\n getProductPageUrlSync,\r\n IDimensionsApp,\r\n StringExtensions\r\n} from '@msdyn365-commerce-modules/retail-actions';\r\nimport {\r\n format,\r\n getPayloadObject,\r\n getTelemetryAttributes,\r\n ITelemetryContent,\r\n onTelemetryClick\r\n} from '@msdyn365-commerce-modules/utilities';\r\nimport React, { useState } from 'react';\r\n\r\nexport interface IProductComponentProps extends IComponentProps<{ product?: ProductSearchResult }> {\r\n className?: string;\r\n imageSettings?: IImageSettings;\r\n savingsText?: string;\r\n freePriceText?: string;\r\n originalPriceText?: string;\r\n currentPriceText?: string;\r\n ratingAriaLabel?: string;\r\n ratingCountAriaLabel?: string;\r\n allowBack?: boolean;\r\n telemetryContent?: ITelemetryContent;\r\n quickViewButton?: React.ReactNode;\r\n inventoryLabel?: string;\r\n isPriceMinMaxEnabled?: boolean;\r\n priceResources?: IPriceComponentResources;\r\n dimensionAvailabilities?: IProductsDimensionsAvailabilities[];\r\n index?: number;\r\n totalNoOfProducts?: number;\r\n}\r\n\r\nexport interface IProductComponent extends IComponent {}\r\n\r\nconst PriceComponentActions = {};\r\n\r\nconst ProductCard: React.FC = ({\r\n data,\r\n context,\r\n imageSettings,\r\n savingsText,\r\n freePriceText,\r\n originalPriceText,\r\n currentPriceText,\r\n ratingAriaLabel,\r\n ratingCountAriaLabel,\r\n allowBack,\r\n typeName,\r\n id,\r\n telemetryContent,\r\n quickViewButton,\r\n inventoryLabel,\r\n isPriceMinMaxEnabled,\r\n priceResources,\r\n dimensionAvailabilities,\r\n index,\r\n totalNoOfProducts\r\n}) => {\r\n const product = data.product;\r\n\r\n // const descTemp = [\r\n // {\r\n // RecordId: 68719533154,\r\n // description:\r\n // 'Introduce the topic to students through a picture dictation task (ELP Years 9 to 13, page 48). Explain to students that over the course of this unit they will be exploring issues facing the earth and its inhabitants.'\r\n // },\r\n // {\r\n // RecordId: 68719533155,\r\n // description:\r\n // 'In this learning task students are exploring the question ‘Is the growing population really putting pressure on the earth or is it just a myth?’. Students will be exploring statistics, identifying reasons why the population has grown so rapidly, investigate the consequences of the growing population and ways in which different countries have tried to curb the growth using various methods.'\r\n // },\r\n // {\r\n // RecordId: 68719533156,\r\n // description:\r\n // 'In this learning task students are exploring the question ‘Is the growing population really putting pressure on the earth or is it just a myth?’. Students will be exploring statistics, identifying reasons why the population has grown so rapidly, investigate the consequences of the growing population and ways in which different countries have tried to curb the growth using various methods.'\r\n // },\r\n // {\r\n // RecordId: 68719533157,\r\n // description:\r\n // 'In this learning task students are expected to choose an environmental issue/topic of their choice and complete an inquiry in to their chosen issue. They are expected to write an essay response on their topic, as well as completing a presentation of their topic.'\r\n // },\r\n // {\r\n // RecordId: 68719533158,\r\n // description:\r\n // 'In this essay I will be talking about my topic, the Exxon Valdez oil spill. I will state why this was an issue, what the causes of this issue were, and ways this particular issue might have solved.'\r\n // },\r\n // {\r\n // RecordId: 68719533159,\r\n // description:\r\n // 'In this essay, my focus will be to explain the causes and effects of deforestation, and how it affects us. I will also state some ways we can help solve this worldwide issue.'\r\n // }\r\n // ];\r\n\r\n /**\r\n * Updates the product url link to product details page.\r\n * @param productDetailsPageUrl - Product page url.\r\n * @param coreContext - Context of the module using the component.\r\n * @param queryString - Querystring to be added to the URL.\r\n * @returns The update product page url.\r\n */\r\n function updateProductUrl(productDetailsPageUrl: string, coreContext: ICoreContext, queryString: string): string {\r\n const sourceUrl = new URL(productDetailsPageUrl, coreContext.request.apiSettings.baseUrl);\r\n if (sourceUrl.search) {\r\n sourceUrl.search += `&${queryString}`;\r\n } else {\r\n sourceUrl.search += queryString;\r\n }\r\n\r\n const updatedUrl = new URL(sourceUrl.href);\r\n return updatedUrl.pathname + sourceUrl.search;\r\n }\r\n\r\n /**\r\n * Gets the product page url from the default swatch selected.\r\n * @param productData - Product card to be rendered.\r\n * @returns The default color swatch selected if any.\r\n */\r\n function getDefaultColorSwatchSelected(productData?: ProductSearchResult): AttributeSwatch | null {\r\n if (!productData || !productData.AttributeValues) {\r\n return null;\r\n }\r\n\r\n const colorAttribute = productData.AttributeValues.find(\r\n attributeValue => attributeValue.KeyName?.toLocaleLowerCase() === DimensionTypes.color\r\n );\r\n if (!ArrayExtensions.hasElements(colorAttribute?.Swatches)) {\r\n return null;\r\n }\r\n\r\n const defaultSwatch = colorAttribute!.Swatches.find(item => item.IsDefault === true) ?? colorAttribute!.Swatches[0];\r\n return defaultSwatch;\r\n }\r\n\r\n /**\r\n * Gets the product image from the default swatch selected.\r\n * @param coreContext - Context of the module using the component.\r\n * @param productData - Product card to be rendered.\r\n * @returns The product card image url.\r\n */\r\n function getProductImageUrlFromDefaultColorSwatch(coreContext: ICoreContext, productData?: ProductSearchResult): string | undefined {\r\n const siteContext = coreContext as ICoreContext;\r\n const dimensionToPreSelectInProductCard = siteContext.app.config.dimensionToPreSelectInProductCard;\r\n if (dimensionToPreSelectInProductCard === DimensionTypes.none) {\r\n return productData?.PrimaryImageUrl;\r\n }\r\n const defaultSwatch = getDefaultColorSwatchSelected(productData);\r\n return defaultSwatch && ArrayExtensions.hasElements(defaultSwatch.ProductImageUrls)\r\n ? generateImageUrl(defaultSwatch.ProductImageUrls[0], coreContext.request.apiSettings)\r\n : productData?.PrimaryImageUrl;\r\n }\r\n\r\n /**\r\n * Gets the product page url from the default swatch selected.\r\n * @param coreContext - Context of the module using the component.\r\n * @param productUrl - Product page url for the product card.\r\n * @param productData - Product card to be rendered.\r\n * @returns The product card image url.\r\n */\r\n function getProductPageUrlFromDefaultSwatch(\r\n coreContext: ICoreContext,\r\n productUrl: string,\r\n productData?: ProductSearchResult\r\n ): string | undefined {\r\n const siteContext = coreContext as ICoreContext;\r\n const dimensionToPreSelectInProductCard = siteContext.app.config.dimensionToPreSelectInProductCard;\r\n if (dimensionToPreSelectInProductCard === DimensionTypes.none) {\r\n return productUrl;\r\n }\r\n const defaultSwatch = getDefaultColorSwatchSelected(productData);\r\n if (!defaultSwatch || !defaultSwatch.SwatchValue) {\r\n return productUrl;\r\n }\r\n\r\n const queryString = `color=${defaultSwatch.SwatchValue}`;\r\n return updateProductUrl(productUrl, coreContext, queryString);\r\n }\r\n\r\n let productUrl = product ? getProductPageUrlSync(product.Name ?? '', product.RecordId, context.actionContext, undefined) : '';\r\n if (allowBack && productUrl) {\r\n productUrl = updateProductUrl(productUrl, context, 'back=true');\r\n }\r\n const productImageUrlFromSwatch = getProductImageUrlFromDefaultColorSwatch(context, product) ?? product?.PrimaryImageUrl;\r\n const productPageUrlFromSwatch = getProductPageUrlFromDefaultSwatch(context, productUrl, product) ?? productUrl;\r\n const [productPageUrl = productPageUrlFromSwatch, setProductPageUrl] = useState();\r\n const [productImageUrl = productImageUrlFromSwatch, setProductImageUrl] = useState();\r\n const [selectedSwatchItems] = useState(new Dictionary());\r\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment,@typescript-eslint/no-unsafe-member-access -- app context is generic\r\n const enableStockCheck = context.app.config.enableStockCheck;\r\n\r\n /**\r\n * Updates the product page and Image url based on swatch selected.\r\n * @param coreContext - Context of the caller.\r\n * @param swatchItem - Dimension swatch selected.\r\n */\r\n const updatePageAndImageUrl = React.useCallback(\r\n (coreContext: ICoreContext, swatchItem: ISwatchItem) => {\r\n const dimensionType = swatchItem.dimensionType;\r\n selectedSwatchItems.setValue(dimensionType, swatchItem);\r\n if (StringExtensions.isNullOrWhitespace(swatchItem.value)) {\r\n return;\r\n }\r\n const queryString = `${dimensionType}=${swatchItem.value}`;\r\n let productPageUrlWithSwatch = '';\r\n if (productPageUrl.includes(dimensionType)) {\r\n const newUrl = new URL(productPageUrl, coreContext.request.apiSettings.baseUrl);\r\n newUrl.searchParams.delete(dimensionType);\r\n productPageUrlWithSwatch = updateProductUrl(newUrl.toString(), context, queryString);\r\n } else {\r\n productPageUrlWithSwatch = updateProductUrl(productPageUrl, context, queryString);\r\n }\r\n setProductPageUrl(productPageUrlWithSwatch);\r\n if (dimensionType === DimensionTypes.color) {\r\n const swatchProductImageUrl = ArrayExtensions.hasElements(swatchItem.productImageUrls)\r\n ? swatchItem.productImageUrls[0]\r\n : undefined;\r\n const newImageUrl = generateImageUrl(swatchProductImageUrl, coreContext.request.apiSettings);\r\n setProductImageUrl(newImageUrl);\r\n }\r\n },\r\n [selectedSwatchItems, context, productPageUrl]\r\n );\r\n\r\n if (!product) {\r\n return null;\r\n }\r\n\r\n const swatchItems = ArrayExtensions.validValues(\r\n product.AttributeValues?.map(item => {\r\n const dimensionTypeValue = item.KeyName?.toLocaleLowerCase() ?? '';\r\n const shouldDisplayAsSwatch = checkIfShouldDisplayAsSwatch(\r\n dimensionTypeValue as DimensionTypes,\r\n context as ICoreContext,\r\n DimensionSwatchDisplayTypes.productCard\r\n );\r\n if (!shouldDisplayAsSwatch) {\r\n return null;\r\n }\r\n\r\n const siteContext = context as ICoreContext;\r\n const dimensionToPreSelectInProductCard = siteContext.app.config.dimensionToPreSelectInProductCard;\r\n\r\n const dimensionType = dimensionTypeValue as DimensionTypes;\r\n const swatches =\r\n item.Swatches?.map(swatchItem => {\r\n return {\r\n itemId: `${item.RecordId ?? ''}-${dimensionTypeValue}-${swatchItem.SwatchValue ?? ''}`,\r\n value: swatchItem.SwatchValue ?? '',\r\n dimensionType,\r\n colorHexCode: swatchItem.SwatchColorHexCode,\r\n imageUrl: swatchItem.SwatchImageUrl,\r\n productImageUrls: swatchItem.ProductImageUrls,\r\n isDefault: swatchItem.IsDefault,\r\n isDisabled:\r\n enableStockCheck &&\r\n dimensionAvailabilities?.find(\r\n dimensionAvailability => dimensionAvailability.value === (swatchItem.SwatchValue ?? '')\r\n )?.isDisabled\r\n };\r\n }) ?? [];\r\n if (\r\n dimensionToPreSelectInProductCard !== DimensionTypes.none &&\r\n ArrayExtensions.hasElements(swatches) &&\r\n !swatches.some(swatch => swatch.isDefault) &&\r\n dimensionType === DimensionTypes.color\r\n ) {\r\n swatches[0].isDefault = true;\r\n }\r\n return { recordId: item.RecordId, swatches };\r\n })\r\n );\r\n\r\n // Construct telemetry attribute to render\r\n const payLoad = getPayloadObject('click', telemetryContent!, '', product.RecordId.toString());\r\n\r\n const attribute = getTelemetryAttributes(telemetryContent!, payLoad);\r\n\r\n /**\r\n * Gets the react node for product dimension as swatch.\r\n * @returns The node representing markup for unit of measure component.\r\n */\r\n function renderProductDimensions(): JSX.Element | null {\r\n if (!ArrayExtensions.hasElements(swatchItems)) {\r\n return null;\r\n }\r\n\r\n return (\r\n
\r\n {swatchItems.map(item => {\r\n return (\r\n \r\n );\r\n })}\r\n
\r\n );\r\n }\r\n\r\n /**\r\n * Gets the aria label for rating.\r\n * @param rating - Product rating.\r\n * @param ratingAriaLabelText - Aria label format for rating.\r\n * @returns The product rating aria label string.\r\n */\r\n function getRatingAriaLabel(rating?: number, ratingAriaLabelText?: string): string {\r\n if (rating && ratingAriaLabelText) {\r\n const roundedRating = rating.toFixed(2);\r\n return format(ratingAriaLabelText || '', roundedRating, '5');\r\n }\r\n return '';\r\n }\r\n\r\n /**\r\n * Gets the aria label for review count.\r\n * @param reviewCount - Product review count.\r\n * @param ratingCountAriaLabelText - Aria label format for review.\r\n * @returns The product review count aria label string.\r\n */\r\n function getReviewAriaLabel(reviewCount?: number, ratingCountAriaLabelText?: string): string {\r\n if (reviewCount && ratingCountAriaLabelText) {\r\n return format(ratingCountAriaLabelText || '', reviewCount);\r\n }\r\n return '';\r\n }\r\n\r\n /**\r\n * Gets the aria label string for product that includes product name with its price and rating.\r\n * @param name - Product name.\r\n * @param price - Product price.\r\n * @param rating - Product rating.\r\n * @param ratingAriaLabelText - Rating aria label text.\r\n * @param reviewCount - Product review count.\r\n * @param ratingCountAriaLabelText - Number of ratings.\r\n * @returns The aria label string for the product card.\r\n */\r\n function renderLabel(\r\n name?: string,\r\n price?: string,\r\n rating?: number,\r\n ratingAriaLabelText?: string,\r\n reviewCount?: number,\r\n ratingCountAriaLabelText?: string\r\n ): string {\r\n const reviewCountArialableText = getReviewAriaLabel(reviewCount, ratingCountAriaLabelText ?? '');\r\n return `${name ?? ''} ${price ?? ''} ${getRatingAriaLabel(rating, ratingAriaLabelText)}${\r\n reviewCountArialableText ? ` ${reviewCountArialableText}` : ''\r\n }`;\r\n }\r\n\r\n /**\r\n * Gets the react component for product rating.\r\n * @param productCardimageSettings - Module image settings for product card.\r\n * @param gridSettings - Grid settings defined in theme.\r\n * @param imageUrl - Image url.\r\n * @param fallbackImageUrl - Fallback url for imge.\r\n * @param altText - Image Alt text.\r\n * @param requestContext - Request context using the component.\r\n * @returns React component for product image.\r\n */\r\n function renderProductPlacementImage(\r\n productCardimageSettings?: IImageSettings,\r\n gridSettings?: IGridSettings,\r\n imageUrl?: string,\r\n fallbackImageUrl?: string,\r\n altText?: string,\r\n requestContext?: IRequestContext\r\n ): JSX.Element | null {\r\n console.log(imageUrl);\r\n if (!imageUrl || !gridSettings || !productCardimageSettings) {\r\n return null;\r\n }\r\n\r\n const image: IImageData = {\r\n src: imageUrl,\r\n altText: altText ? altText : '',\r\n fallBackSrc: fallbackImageUrl\r\n };\r\n const imageProps: IImageProps = { gridSettings };\r\n imageProps.gridSettings = gridSettings;\r\n imageProps.imageSettings = productCardimageSettings;\r\n imageProps.imageSettings.cropFocalRegion = true;\r\n return ;\r\n }\r\n\r\n /**\r\n * Gets the react node for product description.\r\n * @param description - Product description.\r\n * @returns The product description component.\r\n */\r\n function renderDescription(description?: string): JSX.Element | null {\r\n return (\r\n

\r\n {description && description?.length > 300 ? `${description.substring(0, 300)}...` : description}\r\n

\r\n );\r\n }\r\n\r\n return (\r\n <>\r\n \r\n
\r\n

\r\n {product.Name}\r\n

\r\n {renderDescription(product.Description)}\r\n {/* {renderDescription(descTemp.find(x => x.RecordId === product.RecordId)?.description)} */}\r\n
{`${index! + 1} of ${totalNoOfProducts}`}
\r\n {/* {product?.DisplayOrder &&
{`${product.DisplayOrder} of 6`}
} */}\r\n {renderProductDimensions()}\r\n
\r\n
\r\n {renderProductPlacementImage(\r\n imageSettings,\r\n context.request.gridSettings,\r\n productImageUrl,\r\n product.PrimaryImageUrl,\r\n product.Name,\r\n context.actionContext.requestContext\r\n )}\r\n
\r\n \r\n {/*
\r\n
\r\n
\r\n {renderProductAttributes()}\r\n
\r\n {quickViewButton && renderQuickView(quickViewButton, product.RecordId)}\r\n
\r\n
\r\n {renderPrice(\r\n context,\r\n typeName,\r\n id,\r\n product.BasePrice,\r\n product.Price,\r\n product.MaxVariantPrice,\r\n product.MinVariantPrice,\r\n savingsText,\r\n freePriceText,\r\n originalPriceText,\r\n currentPriceText\r\n )}\r\n
\r\n
*/}\r\n {/* {!context.app.config.hideRating &&\r\n renderRating(context, typeName, id, product.AverageRating, product.TotalRatings, ratingAriaLabel)}\r\n {renderProductAvailability(inventoryLabel)}\r\n {renderRightNavigationButton(product)} */}\r\n \r\n );\r\n};\r\n\r\nexport const ProductComponent: React.FunctionComponent = msdyn365Commerce.createComponentOverride<\r\n IProductComponent\r\n>('Product', { component: ProductCard, ...PriceComponentActions });\r\n\r\nexport default ProductComponent;\r\n","/**\r\n * Copyright (c) Microsoft Corporation\r\n * All rights reserved. See License.txt in the project root for license information.\r\n * IMoeProductSequenceCollection containerModule Interface Properties\r\n * THIS FILE IS AUTO-GENERATED - MANUAL MODIFICATIONS WILL BE LOST\r\n */\r\n\r\nimport * as Msdyn365 from '@msdyn365-commerce/core';\r\n\r\nexport const enum layout {\r\n carousel = 'carousel',\r\n grid = 'grid'\r\n}\r\n\r\nexport interface IMoeProductSequenceCollectionConfig extends Msdyn365.IModuleConfig {\r\n productCollection: Msdyn365.IProductList;\r\n heading?: IHeadingData;\r\n layout?: layout;\r\n allowBackNavigation?: boolean;\r\n imageSettings?: Msdyn365.IImageSettings;\r\n clientRender?: boolean;\r\n enableAffiliationBasedPricing?: boolean;\r\n className?: string;\r\n}\r\n\r\nexport interface IMoeProductSequenceCollectionResources {\r\n priceFree: string;\r\n priceRangeSeparator: string;\r\n ratingAriaLabel: string;\r\n flipperNext: string;\r\n flipperPrevious: string;\r\n originalPriceText: string;\r\n currentPriceText: string;\r\n ratingCountAriaLabel: string;\r\n ratingCountAriaLabelSingleUser: string;\r\n}\r\n\r\nexport const enum HeadingTag {\r\n h1 = 'h1',\r\n h2 = 'h2',\r\n h3 = 'h3',\r\n h4 = 'h4',\r\n h5 = 'h5',\r\n h6 = 'h6'\r\n}\r\n\r\nexport interface IHeadingData {\r\n text: string;\r\n tag?: HeadingTag;\r\n}\r\n\r\nexport interface IMoeProductSequenceCollectionProps extends Msdyn365.IModule {\r\n resources: IMoeProductSequenceCollectionResources;\r\n config: IMoeProductSequenceCollectionConfig;\r\n}\r\n","/* eslint-disable @typescript-eslint/no-floating-promises */\r\n/*--------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * See License.txt in the project root for license information.\r\n *--------------------------------------------------------------*/\r\n\r\n/* eslint-disable no-duplicate-imports */\r\nimport { IPriceComponentResources } from '@msdyn365-commerce/components';\r\nimport * as Msdyn365 from '@msdyn365-commerce/core';\r\nimport { ProductPrice, ProductSearchResult } from '@msdyn365-commerce/retail-proxy';\r\nimport {\r\n ArrayExtensions,\r\n getPriceForProductSearchResult,\r\n ObjectExtensions,\r\n PriceForProductSearchResultInput\r\n} from '@msdyn365-commerce-modules/retail-actions';\r\nimport {\r\n getTelemetryObject,\r\n IComponentNodeProps,\r\n IModuleProps,\r\n INodeProps,\r\n ISingleSlideCarouselProps,\r\n ITelemetryContent,\r\n NodeTag,\r\n SingleSlideCarousel\r\n} from '@msdyn365-commerce-modules/utilities';\r\nimport classnames from 'classnames';\r\nimport * as React from 'react';\r\n\r\nimport { IMoeProductSequenceCollectionData } from './moe-product-sequence-collection.data';\r\nimport { IMoeProductSequenceCollectionProps, layout } from './moe-product-sequence-collection.props.autogenerated';\r\nimport { ProductComponent } from './../../components/sequenceproductitem.component';\r\n\r\nexport interface IProductCollectionViewProps extends IMoeProductSequenceCollectionProps {\r\n heading?: React.ReactNode;\r\n ProductCollectionContainer: IModuleProps;\r\n SingleSlideCarouselComponentProps: INodeProps;\r\n GridComponentProps: INodeProps;\r\n products: IProductComponentViewProps[];\r\n isCarousel: boolean;\r\n productPrices?: ProductPrice[];\r\n}\r\n\r\nexport interface IProductComponentViewProps {\r\n ProductContainer: INodeProps;\r\n productComponent: React.ReactNode;\r\n}\r\nexport interface IProductComponentState {\r\n products: ProductSearchResult[];\r\n}\r\n\r\n/**\r\n * ProductCollection component.\r\n */\r\nclass ProductCollection extends React.PureComponent<\r\n IMoeProductSequenceCollectionProps,\r\n IProductComponentState\r\n> {\r\n private readonly telemetryContent: ITelemetryContent;\r\n\r\n private readonly productPrices: ProductPrice[];\r\n\r\n private currentProductRecordID: number | undefined;\r\n\r\n constructor(props: IMoeProductSequenceCollectionProps) {\r\n super(props);\r\n this.productPrices = [];\r\n this.state = {\r\n products: this.props.config.productCollection.products\r\n };\r\n this.telemetryContent = getTelemetryObject(\r\n this.props.context.request.telemetryPageName!,\r\n this.props.friendlyName,\r\n this.props.telemetry\r\n );\r\n this.currentProductRecordID = this.props.data.product.result?.RecordId;\r\n }\r\n\r\n public componentDidMount(): void {\r\n if (this.props.config.enableAffiliationBasedPricing && this.props.context.actionContext.requestContext?.user?.isAuthenticated) {\r\n this._getActivePrice();\r\n }\r\n }\r\n\r\n public render(): JSX.Element | null {\r\n const { heading, className } = this.props.config;\r\n const { resources } = this.props;\r\n\r\n // Initiallize state in case if the products were not found during initial module render\r\n this.initProductState(this.props.config.productCollection);\r\n\r\n const products = this.state.products;\r\n const isCarousel = this.props.config.layout === layout.carousel;\r\n const headingLabel = heading ? heading.text : '';\r\n const headingComponent = heading && (\r\n \r\n );\r\n\r\n console.log('currentProductRecordID', this.currentProductRecordID);\r\n console.log('products', this.props.config.productCollection);\r\n // const currentProductID = this.props.context.request.query && this.props.context.request.query?.\r\n\r\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- product check for safety.\r\n const updatedProducts = products\r\n ?.filter(item => item.RecordId !== this.currentProductRecordID)\r\n .map((item: ProductSearchResult, index: number) => {\r\n const getProductData = this._getProduct(item, index);\r\n return !ObjectExtensions.isNullOrUndefined(getProductData) ? getProductData : undefined;\r\n });\r\n console.log('updatedProducts', updatedProducts);\r\n\r\n const productCollectionViewProps = {\r\n ...this.props,\r\n heading: headingComponent,\r\n SingleSlideCarouselComponentProps: {\r\n tag: SingleSlideCarousel,\r\n className: 'moe-seq-products',\r\n flipperPrevLabel: `${headingLabel} ${resources.flipperPrevious}`,\r\n flipperNextLabel: `${headingLabel} ${resources.flipperNext}`,\r\n parentId: this.props.id,\r\n telemetryContent: this.telemetryContent\r\n } as IComponentNodeProps,\r\n ProductCollectionContainer: {\r\n moduleProps: this.props,\r\n className: classnames('ms-sequence-product-collection', className)\r\n },\r\n GridComponentProps: {\r\n tag: 'ul' as NodeTag,\r\n className: 'ms-sequence-product__items'\r\n },\r\n isCarousel,\r\n\r\n products:\r\n ArrayExtensions.hasElements(updatedProducts) &&\r\n updatedProducts.filter(item => {\r\n return item !== undefined;\r\n }),\r\n productPrices: this.productPrices\r\n };\r\n return this.props.renderView(productCollectionViewProps) as React.ReactElement;\r\n }\r\n\r\n public handleHeadingChange = (event: Msdyn365.ContentEditableEvent) => (this.props.config.heading!.text = event.target.value);\r\n\r\n /**\r\n * Helper method to initialize products state.\r\n * @param productCollection - List of products.\r\n */\r\n private readonly initProductState = (productCollection: Msdyn365.IProductList) => {\r\n if (!ArrayExtensions.hasElements(this.state.products) && ArrayExtensions.hasElements(productCollection.products)) {\r\n this.setState({ products: productCollection.products });\r\n }\r\n };\r\n\r\n private readonly _getProduct = (product: ProductSearchResult, index: number): IProductComponentViewProps | null => {\r\n if (!product || !product.Name) {\r\n this.props.telemetry.trace('[product-collection] Product or product name is null');\r\n return null;\r\n }\r\n const telemetryContent = getTelemetryObject(\r\n this.props.context.request.telemetryPageName!,\r\n this.props.friendlyName,\r\n this.props.telemetry\r\n );\r\n const { imageSettings, allowBackNavigation } = this.props.config;\r\n const resources = this.props.resources;\r\n const breaCrumbType = this.props.context.app.config.breadcrumbType;\r\n const allowBack = allowBackNavigation && (breaCrumbType === 'back' || breaCrumbType === 'categoryAndBack');\r\n const quickviewSlot =\r\n this.props.slots && this.props.slots.quickview && this.props.slots.quickview.length > 0 ? this.props.slots.quickview[0] : null;\r\n const reviewCount = 1;\r\n const reviewTotalRatings = Number(product.TotalRatings);\r\n const reviewCountAriaLabelValue =\r\n reviewTotalRatings > reviewCount ? resources.ratingCountAriaLabel : resources.ratingCountAriaLabelSingleUser;\r\n const isPriceMinMaxEnabled = this.props.data.featureState.result?.find(\r\n featureState => featureState.Name === 'Dynamics.AX.Application.RetailSearchPriceRangeFeature'\r\n );\r\n const priceResources: IPriceComponentResources = {\r\n priceRangeSeparator: resources.priceRangeSeparator\r\n };\r\n return {\r\n ProductContainer: {\r\n tag: 'li' as NodeTag,\r\n className: 'moe-seq-products__item',\r\n role: 'listitem',\r\n key: index\r\n },\r\n productComponent: (\r\n item.RecordId !== this.currentProductRecordID).length}\r\n />\r\n )\r\n };\r\n };\r\n\r\n /**\r\n * Get the active price for products.\r\n */\r\n private readonly _getActivePrice = async (): Promise => {\r\n const productsList = this.state.products;\r\n const products = await getPriceForProductSearchResult(\r\n new PriceForProductSearchResultInput(productsList),\r\n this.props.context.actionContext\r\n );\r\n\r\n this.setState({ products });\r\n };\r\n}\r\n\r\nexport default ProductCollection;\r\n","/*--------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * See License.txt in the project root for license information.\r\n *--------------------------------------------------------------*/\r\n\r\n/* eslint-disable no-duplicate-imports */\r\nimport { INodeProps, Module, Node } from '@msdyn365-commerce-modules/utilities';\r\nimport * as React from 'react';\r\n\r\nimport { IProductCollectionViewProps, IProductComponentViewProps } from './moe-product-sequence-collection';\r\n\r\nconst ProductCollectionView: React.FC = props => {\r\n const { heading, ProductCollectionContainer, products, SingleSlideCarouselComponentProps, GridComponentProps, isCarousel } = props;\r\n if (products) {\r\n return (\r\n \r\n {heading}\r\n {isCarousel ? _renderCarousel(SingleSlideCarouselComponentProps, products) : _renderGrid(GridComponentProps, products)}\r\n \r\n );\r\n }\r\n props.context.telemetry.error('Product collection content is empty, module wont render.');\r\n return null;\r\n};\r\n\r\nconst _renderCarousel = (carouselContainer: INodeProps, items: IProductComponentViewProps[]): JSX.Element => {\r\n return {items && items.map(_renderProduct)};\r\n};\r\n\r\nconst _renderGrid = (gridContainer: INodeProps, items: IProductComponentViewProps[]): JSX.Element => {\r\n return {items && items.map(_renderProduct)};\r\n};\r\n\r\nconst _renderProduct = (product: IProductComponentViewProps): JSX.Element => {\r\n const { ProductContainer, productComponent } = product;\r\n\r\n return {productComponent};\r\n};\r\n\r\nexport default ProductCollectionView;\r\n","const binding = { modules: {}, dataActions: {} };\n\n const registerActionId = (actionPath) => {\n if (binding.dataActions[actionPath] &&\n binding.dataActions[actionPath].default &&\n binding.dataActions[actionPath].default.prototype &&\n binding.dataActions[actionPath].default.prototype.id) {\n binding.dataActions[binding.dataActions[actionPath].default.prototype.id] = binding.dataActions[actionPath];\n } else {\n Object.keys(binding.dataActions[actionPath] || {}).forEach(exportName => {\n if (binding.dataActions[actionPath][exportName] &&\n binding.dataActions[actionPath][exportName].prototype &&\n binding.dataActions[actionPath][exportName].prototype.Action) {\n binding.dataActions[binding.dataActions[actionPath][exportName].prototype.id] = binding.dataActions[actionPath][exportName];\n }\n })\n }\n };\n\n const registerSanitizedActionPath = (sanitizedActionPath, dataAction) => {\n if (process.env.NODE_ENV === 'development') {\n if (!dataAction.default) {\n throw new Error('Data action path does not have a default export');\n }\n if (!(dataAction.default.prototype.id && binding.dataActions[dataAction.default.prototype.id]) || !binding.dataActions[sanitizedActionPath]) {\n binding.dataActions[sanitizedActionPath] = dataAction;\n }\n } else {\n binding.dataActions[sanitizedActionPath] = dataAction;\n if (!binding.dataActions[sanitizedActionPath].default) {\n throw new Error('Data action path ' + sanitizedActionPath + ' does not have a default export');\n }\n binding.dataActions[sanitizedActionPath].default.prototype.RegistrationId = sanitizedActionPath;\n if (binding.dataActions[sanitizedActionPath].default.prototype.id) {\n binding.dataActions[binding.dataActions[sanitizedActionPath].default.prototype.id] = sanitizedActionPath;\n }\n }\n };\n \n\n (binding.modules['moe-product-sequence-collection'] = {\n c: () => require('partner/modules/moe-product-sequence-collection/moe-product-sequence-collection.tsx'),\n $type: 'containerModule',\n da: [{name:'featureState', path:'@msdyn365-commerce-modules/retail-actions/dist/lib/get-feature-state', runOn: 0},{name:'product', path:'@msdyn365-commerce-modules/retail-actions/dist/lib/get-selected-variant', runOn: 0}],\n \n iNM: false,\n ns: '__local__',\n n: 'moe-product-sequence-collection',\n p: '__local__',\n \n pdp: '',\n \n \n md: 'src/modules/moe-product-sequence-collection'\n });\n \n\n {\n const sanitizedActionPath = '@msdyn365-commerce-modules/retail-actions/dist/lib/get-feature-state';\n let dataAction = require('@msdyn365-commerce-modules/retail-actions/dist/lib/get-feature-state');\n registerSanitizedActionPath(sanitizedActionPath, dataAction);\n }\n \n\n {\n const sanitizedActionPath = '@msdyn365-commerce-modules/retail-actions/dist/lib/get-selected-variant';\n let dataAction = require('@msdyn365-commerce-modules/retail-actions/dist/lib/get-selected-variant');\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|moe-product-sequence-collection|moe-product-sequence-collection'] = {\n c: () => require('partner/modules/moe-product-sequence-collection/moe-product-sequence-collection.view.tsx'),\n cn: '__local__-__local__-moe-product-sequence-collection'\n };\nwindow.__bindings__ = window.__bindings__ || {};\nwindow.__bindings__.viewDictionary = {\n ...window.__bindings__.viewDictionary || {},\n ...viewDictionary\n };","module.exports = React;","module.exports = ReactDOM;"],"names":["ProductComponent","msdyn365Commerce","createComponentOverride","_objectSpread","component","_ref","_product$Name","_getProductImageUrlFr","_getProductPageUrlFro","_product$AttributeVal","data","context","imageSettings","savingsText","freePriceText","originalPriceText","currentPriceText","ratingAriaLabel","ratingCountAriaLabel","allowBack","typeName","id","telemetryContent","quickViewButton","inventoryLabel","isPriceMinMaxEnabled","priceResources","dimensionAvailabilities","index","totalNoOfProducts","product","updateProductUrl","productDetailsPageUrl","coreContext","queryString","sourceUrl","URL","request","apiSettings","baseUrl","search","href","pathname","getDefaultColorSwatchSelected","productData","_colorAttribute$Swatc","AttributeValues","colorAttribute","find","attributeValue","_attributeValue$KeyNa","KeyName","toLocaleLowerCase","DimensionTypes","color","ArrayExtensions","hasElements","Swatches","item","IsDefault","productUrl","getProductPageUrlSync","Name","RecordId","actionContext","undefined","productImageUrlFromSwatch","app","config","dimensionToPreSelectInProductCard","none","PrimaryImageUrl","defaultSwatch","ProductImageUrls","generateImageUrl","getProductImageUrlFromDefaultColorSwatch","productPageUrlFromSwatch","SwatchValue","getProductPageUrlFromDefaultSwatch","productPageUrl","setProductPageUrl","useState","productImageUrl","setProductImageUrl","selectedSwatchItems","Dictionary","enableStockCheck","updatePageAndImageUrl","React","swatchItem","dimensionType","setValue","StringExtensions","isNullOrWhitespace","value","productPageUrlWithSwatch","includes","newUrl","searchParams","delete","toString","swatchProductImageUrl","productImageUrls","newImageUrl","swatchItems","validValues","map","_item$KeyName$toLocal","_item$KeyName","_item$Swatches$map","_item$Swatches","dimensionTypeValue","checkIfShouldDisplayAsSwatch","DimensionSwatchDisplayTypes","productCard","swatches","_item$RecordId","_swatchItem$SwatchVal","_swatchItem$SwatchVal2","_dimensionAvailabilit","itemId","colorHexCode","SwatchColorHexCode","imageUrl","SwatchImageUrl","isDefault","isDisabled","dimensionAvailability","_swatchItem$SwatchVal3","some","swatch","recordId","payLoad","getPayloadObject","attribute","getTelemetryAttributes","Object","assign","onClick","onTelemetryClick","name","price","rating","ratingAriaLabelText","reviewCount","ratingCountAriaLabelText","reviewCountArialableText","format","getReviewAriaLabel","roundedRating","toFixed","getRatingAriaLabel","renderLabel","cultureFormatter","formatCurrency","Price","AverageRating","TotalRatings","className","tabIndex","description","Description","length","substring","ProductComponentSwatchComponent","key","onSelectDimension","productCardimageSettings","gridSettings","fallbackImageUrl","altText","requestContext","console","log","image","src","fallBackSrc","imageProps","cropFocalRegion","Image","loadFailureBehavior","renderProductPlacementImage","layout","HeadingTag","ProductCollection","constructor","props","_this$props$data$prod","super","handleHeadingChange","event","this","heading","text","target","initProductState","productCollection","state","products","setState","_getProduct","_this$props$data$feat","_this$state$products","telemetry","trace","getTelemetryObject","telemetryPageName","friendlyName","allowBackNavigation","resources","breaCrumbType","breadcrumbType","quickviewSlot","slots","quickview","reviewCountAriaLabelValue","Number","ratingCountAriaLabelSingleUser","featureState","result","priceRangeSeparator","ProductContainer","tag","role","productComponent","priceFree","IsEnabled","filter","currentProductRecordID","_getActivePrice","async","productsList","getPriceForProductSearchResult","PriceForProductSearchResultInput","productPrices","componentDidMount","_this$props$context$a","enableAffiliationBasedPricing","user","isAuthenticated","render","isCarousel","carousel","headingLabel","headingComponent","Msdyn365","editProps","onEdit","updatedProducts","getProductData","ObjectExtensions","isNullOrUndefined","productCollectionViewProps","SingleSlideCarouselComponentProps","SingleSlideCarousel","flipperPrevLabel","flipperPrevious","flipperNextLabel","flipperNext","parentId","ProductCollectionContainer","moduleProps","classnames","GridComponentProps","renderView","_renderCarousel","carouselContainer","items","Node","_renderProduct","_renderGrid","gridContainer","Module","error","binding","modules","dataActions","registerSanitizedActionPath","sanitizedActionPath","dataAction","default","Error","prototype","RegistrationId","c","require","$type","da","path","runOn","iNM","ns","n","p","pdp","md","window","__bindings__","viewDictionary","cn","module","exports","ReactDOM"],"sourceRoot":""}