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AAIwC,OAAAC,OAAA,GAAKL,GAAoBhD,GAASA,EAAM1H,IAAI2K,IAGtDC,EAAcA,CAACC,EAA2BnD,IACrC5K,EAAAA,cAACwL,EAAAA,KAAIwC,OAAAC,OAAA,GAAKF,GAAgBnD,GAASA,EAAM1H,IAAI2K,IAGlDK,EAAoB9J,GAElBpE,EAAAA,cAACwL,EAAAA,KAAI,CAAC5F,UAAW,IACb5F,EAAAA,cAAA,SAAIoE,EAAU+J,wBAKpBN,EAAkBxK,IACpB,MAAM,iBAAEqC,EAAgB,iBAAEK,GAAqB1C,EAE/C,OAAOrD,EAAAA,cAACwL,EAAAA,KAAIwC,OAAAC,OAAA,GAAKvI,GAAmBK,IAGxC,EA1DqE7F,IACjE,MAAM,QACFM,EAAO,2BACP6J,EAA0B,SAC1B9I,EAAQ,kCACRuI,EAAiC,mBACjCU,EAAkB,WAClB1B,EAAU,aACV2B,EAAY,UACZrG,GACAlE,EAEJ,OAAIqB,EAEIvB,EAAAA,cAACoO,EAAAA,OAAMJ,OAAAC,OAAA,GAAK5D,GACP7J,EACAiK,EACA3B,EAAa6E,EAAgB7D,EAAmCvI,GAAYuM,EAAYtD,EAAoBjJ,IAMzE,gBAA5CrB,EAAMK,OAAOgC,kBAAkBK,SAE3B5C,EAAAA,cAACoO,EAAAA,OAAMJ,OAAAC,OAAA,GAAK5D,GACP7J,EACAiK,EACAyD,EAAiB9J,KAI9BlE,EAAMY,QAAQ6C,UAAU4H,MAAM,4DACvB,cC5CXyL,EAAOC,QAAUjX,cCAjBgX,EAAOC,QAAUC","sources":["webpack://jansen-adventureworks/./src/modules/product-collection/product-collection.props.autogenerated.ts?4a6d","webpack://jansen-adventureworks/./src/modules/product-collection/product-collection.tsx?7fd4","webpack://jansen-adventureworks/./src/modules/product-collection/product-collection.view.tsx?e55e","webpack://jansen-adventureworks/./src/themes/jansen-adventureworks/views/components/IncrementalQuantity.tsx?9858","webpack://jansen-adventureworks/./src/themes/jansen-adventureworks/views/components/product-popover.component.tsx?6b34","webpack://jansen-adventureworks/./lib/product-collection/module-registration.js?36d3","webpack://jansen-adventureworks/./src/modules/product-collection/product-collection.view.tsx?5d36","webpack://jansen-adventureworks/external var \"React\"?0d3b","webpack://jansen-adventureworks/external var \"ReactDOM\"?853b"],"sourcesContent":["/**\r\n * Copyright (c) Microsoft Corporation\r\n * All rights reserved. See License.txt in the project root for license information.\r\n * IProductCollection 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\nimport * as React from 'react';\r\n\r\nexport const enum layout {\r\n carousel = 'carousel',\r\n grid = 'grid',\r\n list = 'list'\r\n}\r\n\r\nexport interface IProductCollectionConfig 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 shouldDisplaySeeAllButton?: boolean;\r\n className?: string;\r\n}\r\n\r\nexport interface IProductCollectionResources {\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 seeAllButtonText: string;\r\n noProductToRenderText: string;\r\n addToCartText: string;\r\n moreInformationText: string;\r\n errorMessageForQtyValidation: 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 IProductCollectionProps extends Msdyn365.IModule {\r\n resources: IProductCollectionResources;\r\n config: IProductCollectionConfig;\r\n slots: {\r\n quickview: React.ReactNode[];\r\n productComparisonButton: React.ReactNode[];\r\n };\r\n}\r\n","/*!\r\n * Copyright (c) Microsoft Corporation.\r\n * All rights reserved. See LICENSE in the project root for license information.\r\n */\r\n\r\n/* eslint-disable no-duplicate-imports */\r\nimport { IProductsDimensionsAvailabilities } from '@msdyn365-commerce/commerce-entities';\r\nimport { IPriceComponentResources, ProductComponent } from '@msdyn365-commerce/components';\r\nimport * as Msdyn365 from '@msdyn365-commerce/core';\r\nimport { getCatalogId, getUrlSync, ICoreContext } from '@msdyn365-commerce/core';\r\nimport { ProductPrice, ProductSearchResult } from '@msdyn365-commerce/retail-proxy';\r\nimport {\r\n ArrayExtensions,\r\n DimensionAvailabilitiesForProductSearchResultInput,\r\n DimensionTypes,\r\n DimensionSwatchDisplayTypes,\r\n getDimensionAvailabilitiesForProductSearchResultAction,\r\n getPriceForProductSearchResult,\r\n IDimensionsApp,\r\n ObjectExtensions,\r\n PriceForProductSearchResultInput,\r\n ProductPriceForSelectedProductsInput,\r\n validateCatalogId,\r\n getProductPriceForSelectedProducts\r\n} from '@msdyn365-commerce-modules/retail-actions';\r\nimport {\r\n Button,\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 { IProductCollectionData } from './product-collection.data';\r\nimport { IProductCollectionProps, layout } from './product-collection.props.autogenerated';\r\n\r\nexport interface IProductCollectionViewProps extends IProductCollectionProps {\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 seeAllButton?: React.ReactNode;\r\n isList?: boolean;\r\n productsWithOutComponent: ProductSearchResult[];\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 productPrices: ProductPrice[];\r\n productsDimensionAvailabilities?: IProductsDimensionsAvailabilities[][];\r\n}\r\n\r\n/**\r\n * ProductCollection component.\r\n */\r\nclass ProductCollection extends React.PureComponent, IProductComponentState> {\r\n private readonly telemetryContent: ITelemetryContent;\r\n\r\n private readonly productPrices: ProductPrice[];\r\n\r\n constructor(props: IProductCollectionProps) {\r\n super(props);\r\n this.productPrices = [];\r\n this.state = {\r\n products: this.props.config.productCollection.products || [],\r\n productPrices: this.productPrices || []\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 }\r\n\r\n public async componentDidMount(): Promise {\r\n if (this.props.config.enableAffiliationBasedPricing && this.props.context.actionContext.requestContext.user.isAuthenticated) {\r\n await this._getActivePrice();\r\n }\r\n }\r\n\r\n public render(): JSX.Element | null {\r\n const { heading, className, shouldDisplaySeeAllButton } = this.props.config;\r\n const { resources } = this.props;\r\n const recommendation = this.props.config.productCollection.recommendationListId;\r\n const discountIds = this.props.config.productCollection.discountIds;\r\n\r\n // Initialize state in case if the products were not found during initial module render\r\n // eslint-disable-next-line @typescript-eslint/no-floating-promises -- Initialize data if not there.\r\n this.initProductState(this.props.config.productCollection);\r\n\r\n const products = this.state.products;\r\n const productPrices = this.state.productPrices;\r\n\r\n const isCarousel = this.props.config.layout === layout.carousel;\r\n const isList = this.props.config.layout === layout.list;\r\n const headingLabel = heading ? heading.text : '';\r\n const headingComponent = heading && (\r\n \r\n );\r\n\r\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- product check for safety.\r\n const updatedProducts = products?.map((item: ProductSearchResult, index: number) => {\r\n const getProductData = this._getProduct(\r\n item,\r\n index,\r\n productPrices ? productPrices.find(p => p.ProductId === item.RecordId) : undefined\r\n );\r\n return !ObjectExtensions.isNullOrUndefined(getProductData) ? getProductData : undefined;\r\n });\r\n\r\n const productCollectionViewProps = {\r\n ...this.props,\r\n heading: headingComponent,\r\n productsWithOutComponent: products,\r\n SingleSlideCarouselComponentProps: {\r\n tag: SingleSlideCarousel,\r\n className: '',\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-product-collection', className)\r\n },\r\n GridComponentProps: {\r\n tag: 'ul' as NodeTag,\r\n className: 'ms-product-collection__items'\r\n },\r\n isCarousel,\r\n isList,\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 seeAllButton:\r\n (recommendation || discountIds) &&\r\n shouldDisplaySeeAllButton &&\r\n (ArrayExtensions.hasElements(updatedProducts) || this.props.config.productCollection.listType === 'promotional')\r\n ? this._getSeeAllButton(headingLabel, recommendation, discountIds)\r\n : undefined,\r\n resources: resources\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 * Get products dimension availabilities.\r\n * @param products - Products.\r\n * @returns Promise.\r\n */\r\n private readonly _getProductsDimensionsAvailabilities = async (products: ProductSearchResult[]): Promise => {\r\n const context = this.props.context as ICoreContext;\r\n const dimensionsToDisplayOnProductCard = context.app.config.dimensionsInProductCard;\r\n const dimensionsToDisplayAsSwatch = context.app.config.dimensionsAsSwatchType;\r\n const validProducts = ArrayExtensions.validValues(products);\r\n if (\r\n ArrayExtensions.hasElements(validProducts) &&\r\n ArrayExtensions.hasElements(dimensionsToDisplayOnProductCard) &&\r\n !dimensionsToDisplayOnProductCard.includes(DimensionTypes.none) &&\r\n ArrayExtensions.hasElements(dimensionsToDisplayAsSwatch) &&\r\n !dimensionsToDisplayAsSwatch.includes(DimensionTypes.none)\r\n ) {\r\n const productsDimensionAvailabilities = await getDimensionAvailabilitiesForProductSearchResultAction(\r\n new DimensionAvailabilitiesForProductSearchResultInput(\r\n validProducts,\r\n this.props.context as ICoreContext,\r\n DimensionSwatchDisplayTypes.productCard\r\n ),\r\n this.props.context.actionContext\r\n );\r\n\r\n if (ArrayExtensions.hasElements(productsDimensionAvailabilities)) {\r\n this.setState({ productsDimensionAvailabilities });\r\n }\r\n }\r\n };\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 = async (productCollection: Msdyn365.IProductList) => {\r\n let products = this.state.products;\r\n let productPrices = this.state.productPrices;\r\n const productCollectionProducts = productCollection.products;\r\n if (!ArrayExtensions.hasElements(products) && ArrayExtensions.hasElements(productCollectionProducts)) {\r\n products = productCollectionProducts;\r\n this.setState({ products });\r\n } else if (\r\n ArrayExtensions.hasElements(products) &&\r\n ArrayExtensions.hasElements(productCollectionProducts) &&\r\n !ArrayExtensions.equals(products, productCollectionProducts)\r\n ) {\r\n products = productCollectionProducts;\r\n this.setState({ products });\r\n } else if (productCollectionProducts === undefined && ArrayExtensions.hasElements(this.state.products)) {\r\n products = [];\r\n this.setState({ products: products });\r\n }\r\n\r\n if (Msdyn365.msdyn365Commerce.isBrowser && !ArrayExtensions.hasElements(this.state.productsDimensionAvailabilities)) {\r\n await this._getProductsDimensionsAvailabilities(products);\r\n }\r\n\r\n if (this.props.config.productCollection.listType === 'promotional') {\r\n productPrices = await getProductPriceForSelectedProducts(\r\n new ProductPriceForSelectedProductsInput(products.filter(p => !p.IsMasterProduct).map(p => p.RecordId)),\r\n this.props.context.actionContext\r\n );\r\n\r\n this.setState({ productPrices: productPrices });\r\n }\r\n };\r\n\r\n private readonly _getProduct = (\r\n product: ProductSearchResult,\r\n index: number,\r\n productPrice?: ProductPrice\r\n ): 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 productComparisonButtonSlot = ArrayExtensions.hasElements(this.props.slots.productComparisonButton)\r\n ? this.props.slots.productComparisonButton[0]\r\n : null;\r\n\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: 'ms-product-collection__item',\r\n role: 'listitem',\r\n key: index\r\n },\r\n productComponent: (\r\n \r\n ArrayExtensions.hasElements(dimensionAvailability) &&\r\n dimensionAvailability[0].masterProductId === (product.MasterProductId ?? product.RecordId)\r\n )}\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 if (Msdyn365.msdyn365Commerce.isBrowser) {\r\n await this._getProductsDimensionsAvailabilities(products);\r\n }\r\n\r\n this.setState({ products });\r\n };\r\n\r\n /**\r\n * Get the see all button.\r\n * @param headingLabel - Heading label.\r\n * @param recommendation - Recommendation.\r\n * @param discountIds - Discount Ids.\r\n * @returns IProductComponentSeeAllViewProps - Product component see all view props.\r\n */\r\n private readonly _getSeeAllButton = (headingLabel: string, recommendation?: string, discountIds?: string[]): React.ReactNode => {\r\n if (!Msdyn365.msdyn365Commerce.isBrowser) {\r\n return null;\r\n }\r\n\r\n if (!recommendation && !discountIds) {\r\n return null;\r\n }\r\n\r\n const catalogId = getCatalogId(this.props.context.request);\r\n validateCatalogId(catalogId);\r\n const searchPageLink = getUrlSync('search', this.props.context.actionContext);\r\n if (!searchPageLink) {\r\n return null;\r\n }\r\n\r\n const url = new URL(searchPageLink, window.location.href);\r\n\r\n if (discountIds) {\r\n // see all button for promotion page\r\n url.searchParams.set('discountIds', discountIds.toString());\r\n url.searchParams.set('title', headingLabel);\r\n url.searchParams.set('catalogid', `${catalogId}`);\r\n } else if (recommendation) {\r\n // See all button for recommendation\r\n url.searchParams.set('recommendation', recommendation);\r\n url.searchParams.set('title', headingLabel);\r\n url.searchParams.set('catalogid', `${catalogId}`);\r\n }\r\n\r\n return (\r\n \r\n {this.props.resources.seeAllButtonText}\r\n \r\n );\r\n };\r\n}\r\n\r\nexport default ProductCollection;\r\n","/* eslint-disable security/detect-object-injection */\r\n/* eslint-disable radix */\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\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 './product-collection';\r\nimport { IProductCollectionResources } from './product-collection.props.autogenerated';\r\nimport { ProductSearchResult, SimpleProduct } from '@msdyn365-commerce/retail-proxy';\r\nimport ProductPopover from '../../themes/jansen-adventureworks/views/components/product-popover.component';\r\nimport { AddToCartComponent } from '@msdyn365-commerce/components';\r\nimport { useState } from 'react';\r\nimport IncrementalQuantity from '../../themes/jansen-adventureworks/views/components/IncrementalQuantity';\r\n\r\nimport { Toaster, toast } from 'sonner';\r\nimport Button from 'reactstrap/lib/Button';\r\nimport { getProductPageUrlSync } from '@msdyn365-commerce-modules/retail-actions';\r\n\r\nconst _showToast = (heading: string, description: string) => {\r\n toast.error(\r\n
\r\n
\r\n

{heading}

\r\n
\r\n
\r\n {description}\r\n
\r\n
\r\n );\r\n};\r\n\r\nconst ProductCollectionView: React.FC = props => {\r\n const {\r\n heading,\r\n productsWithOutComponent,\r\n ProductCollectionContainer,\r\n products,\r\n SingleSlideCarouselComponentProps,\r\n GridComponentProps,\r\n isCarousel,\r\n isList,\r\n seeAllButton,\r\n resources\r\n } = props;\r\n\r\n if (products) {\r\n return (\r\n \r\n {heading}\r\n {seeAllButton}\r\n {isList\r\n ? _renderList(productsWithOutComponent, props)\r\n : isCarousel\r\n ? _renderCarousel(SingleSlideCarouselComponentProps, products)\r\n : _renderGrid(GridComponentProps, products)}\r\n \r\n );\r\n }\r\n\r\n // If no products are retrieved and the list type is promotional, still render the module to keep the entry of promotion page\r\n if (props.config.productCollection.listType === 'promotional') {\r\n return (\r\n \r\n {heading}\r\n {seeAllButton}\r\n {_renderNoProduct(resources)}\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\ninterface errorMessage {\r\n LocalizedMessageParameters: string;\r\n}\r\n\r\nconst _renderList = (items: ProductSearchResult[], props: React.PropsWithChildren): JSX.Element => {\r\n const { context, typeName, id, resources } = props;\r\n const [quantities, setQuantities] = useState(new Array(items?.length).fill(1));\r\n\r\n const handleQuantityChange = (index: number, value: number) => {\r\n const newQuantities = [...quantities];\r\n // eslint-disable-next-line security/detect-object-injection\r\n newQuantities[index] = value < 1 ? 1 : value; // Ensure quantity is at least 1\r\n setQuantities(newQuantities);\r\n };\r\n return (\r\n <>\r\n \r\n \r\n
\r\n \r\n {items.map((product: ProductSearchResult, index: number) => {\r\n const productUrl = product\r\n ? getProductPageUrlSync(product.Name ?? '', product.RecordId, context.actionContext, undefined)\r\n : '';\r\n const simpleProduct: SimpleProduct = {\r\n RecordId: product.RecordId,\r\n Price: product.Price,\r\n ProductTypeValue: 0,\r\n BasePrice: product.BasePrice || 0,\r\n AdjustedPrice: product.Price\r\n };\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n })}\r\n
\r\n \r\n \r\n {\r\n handleQuantityChange(index, value);\r\n return true;\r\n }}\r\n />\r\n \r\n \r\n \r\n {\r\n const obj = error.cartActionResult?.validationResults?.find(\r\n x =>\r\n x.ErrorResourceId ===\r\n 'Microsoft_Dynamics_Commerce_Runtime_ItemQuantityViolatesMultiplicityOfConfiguredNumber'\r\n );\r\n const object: errorMessage = obj as errorMessage;\r\n const param = object.LocalizedMessageParameters[0];\r\n\r\n if (param !== undefined) {\r\n _showToast(\r\n product.Name!,\r\n props.resources.errorMessageForQtyValidation.replace('{param}', param)\r\n );\r\n }\r\n }}\r\n >\r\n
\r\n
\r\n
\r\n \r\n );\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 _renderNoProduct = (resources: IProductCollectionResources): JSX.Element => {\r\n return (\r\n \r\n

{resources.noProductToRenderText}

\r\n
\r\n );\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","/*!\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 { IRequestContext } from '@msdyn365-commerce/core';\r\nimport { debounce } from 'lodash';\r\nimport { observer } from 'mobx-react';\r\nimport * as React from 'react';\r\nimport { ITelemetry } from '@msdyn365-commerce/telemetry-internal';\r\nimport { IDictionary } from '@msdyn365-commerce/core';\r\nimport MsDyn365 from '@msdyn365-commerce/core';\r\n\r\nexport enum VariantType {\r\n Browser,\r\n Viewport\r\n}\r\n\r\n/**\r\n * Returns the payload Object.\r\n * @param {string} contentCategory - Content Category.\r\n * @param {IModule} props - Module props.\r\n * @param {string} moduleName - Module Name.\r\n * @param eventType\r\n * @param telemetryContent\r\n * @param {string} etext - Etext Name.\r\n * @param {string} recid - Recid Name.\r\n */\r\nexport function getPayloadObject(eventType: string, telemetryContent: ITelemetryContent, etext: string, recid?: string): IPayLoad {\r\n const pageName = telemetryContent && telemetryContent.pageName ? telemetryContent.pageName : '';\r\n const moduleName = telemetryContent && telemetryContent.moduleName ? telemetryContent.moduleName : '';\r\n const payload: IPayLoad = {\r\n contentCategory: eventType,\r\n contentAction: {\r\n pgname: pageName,\r\n mname: moduleName,\r\n etext,\r\n recid,\r\n etype: eventType\r\n }\r\n };\r\n return payload;\r\n}\r\n\r\nexport interface IMobileProps {\r\n variant?: VariantType;\r\n context?: IRequestContext;\r\n}\r\n\r\nexport const isMobile = (props: IMobileProps) => {\r\n const { variant, context } = props;\r\n switch (variant) {\r\n case VariantType.Browser:\r\n if (MsDyn365.isBrowser && window.innerWidth) {\r\n const gridSettings = context?.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 }\r\n return 'xl';\r\n }\r\n }\r\n\r\n return 'lg';\r\n case VariantType.Viewport:\r\n const viewport = context?.device?.Type === 'Mobile' ? 'xs' : 'lg';\r\n return viewport;\r\n default:\r\n return 'lg';\r\n }\r\n};\r\n\r\n/**\r\n * Returns the telemetry Attributes.\r\n * @param {IModule} props - Module Props.\r\n * @param telemetryContent\r\n * @param {IPayLoad} payLoad - Pay Load.\r\n */\r\nexport function getTelemetryAttributes(telemetryContent: ITelemetryContent, payLoad: IPayLoad): IDictionary | undefined {\r\n const contentData = payLoad.contentAction.recid ? payLoad.contentAction.recid : payLoad.contentAction.etext;\r\n const attributes: IDictionary | undefined =\r\n telemetryContent &&\r\n telemetryContent.telemetry &&\r\n telemetryContent.telemetry.setTelemetryAttribute &&\r\n telemetryContent.telemetry.setTelemetryAttribute(contentData!, payLoad.contentAction);\r\n return attributes;\r\n}\r\n\r\nexport interface IContentAction {\r\n pgname: string;\r\n mname: string;\r\n etext?: string;\r\n recid?: string;\r\n etype?: string;\r\n}\r\n\r\nexport interface IPayLoad {\r\n contentCategory: string;\r\n contentAction: IContentAction;\r\n}\r\n\r\nexport enum TelemetryConstant {\r\n ShopSimliarLooks = 'shop similar looks',\r\n ShopSimliarDescription = 'shop similar description',\r\n PickupInStore = 'pick up in store',\r\n PreferredStore = 'set as preferred store',\r\n RemovePreferredStore = 'remove preferred store',\r\n IncrementQuantity = 'Increment quantity',\r\n DecrementQuantity = 'Decrement quantity',\r\n Checkout = 'Checkout',\r\n GuestCheckout = 'Guest checkout',\r\n BackToShopping = 'Back to shopping',\r\n ApplyPromoCode = 'Apply promo code',\r\n ViewMore = 'View more',\r\n OrderDetails = 'Order details',\r\n AvailablePoints = 'Available points',\r\n ExpiringPoints = 'Expiring points',\r\n AddUser = 'Add user',\r\n BuyItAgain = 'Buy it again',\r\n ContactNumber = 'ContactNumber',\r\n CheckoutChange = 'Change',\r\n Save = 'Save',\r\n SaveContinue = 'Save and Continue',\r\n Cancel = 'Cancel',\r\n DeliveryOptions = 'Delivery options',\r\n CheckoutTermsAndConditions = 'Checkout terms and conditions',\r\n ExpandAll = 'Expand all',\r\n CollapseAll = 'Collapse all',\r\n Expand = 'Expand',\r\n Collapse = 'Collapse',\r\n SignIn = 'Sign in',\r\n SignUp = 'Sign up',\r\n SignOut = 'Sign out',\r\n SwitchCustomer = 'Switch Customer',\r\n LoyaltyDetailLink = 'Loyalty detail ink',\r\n LoyaltyTermsLink = 'Loyalty terms link',\r\n LoyaltyTermsCancel = 'Loyalty terms cancel',\r\n LoyaltyTermsSubmit = 'Loyalty terms submit',\r\n LoyaltyTermsAgree = 'Loyalty terms agree',\r\n RemoveCartItem = 'Remove cart item',\r\n EditCart = 'Edit cart',\r\n BackToTop = 'Back to top',\r\n Logo = 'Logo',\r\n NavIcon = 'Navigation icon',\r\n ViewBagAndCheckout = 'View bag and checkout',\r\n ContinueShopping = 'Continue shopping',\r\n AddOrderTemplateToCart = 'Add order template to cart',\r\n PromoBannerClose = 'Close promo banner',\r\n WriteReview = 'Write Review',\r\n Next = 'Next',\r\n Previous = 'Previous',\r\n SubmitReview = 'Submit review',\r\n SuccessButton = 'Success',\r\n SearchStore = 'Search store',\r\n ShowAllStore = 'Show all store',\r\n ToggleMapView = 'Toggle map view',\r\n PrivacyPolicy = 'Privacy policy',\r\n ViewShoppingBag = 'View shopping bag',\r\n MyProfile = 'My profile',\r\n seeDetails = 'See Details',\r\n CurrentDistributor = 'Set as current distributor',\r\n ViewMode = 'View mode',\r\n ApplyRefiner = 'Apply Refiner',\r\n Search = 'Search'\r\n}\r\n\r\ninterface ITelemetryContent {\r\n pageName: string;\r\n moduleName: string;\r\n telemetry?: ITelemetry;\r\n}\r\n\r\ninterface IIncrementalQuantityState {\r\n isUpdating: boolean;\r\n currentInput: string;\r\n}\r\n\r\ninterface IIncrementalQuantityProps {\r\n min?: number;\r\n max: number;\r\n currentCount?: number;\r\n disabled?: boolean;\r\n incrementGlyphClass?: string;\r\n decrementGlyphClass?: string;\r\n decrementButtonAriaLabel?: string;\r\n incrementButtonAriaLabel?: string;\r\n minQuantityText: string;\r\n maxQuantityText: string;\r\n inputQuantityAriaLabel?: string;\r\n isGiftCard?: boolean;\r\n id?: string;\r\n telemetryContent?: ITelemetryContent;\r\n applyDefaultOrderSettings?: boolean;\r\n onChange?(newValue: number): boolean;\r\n}\r\n/**\r\n * Quantity Component - This component is used to add or remove quantity.\r\n */\r\n@observer\r\nexport default class IncrementalQuantity extends React.PureComponent {\r\n public static defaultProps: Partial = {\r\n min: 1,\r\n decrementGlyphClass: 'fas fa-minus',\r\n incrementGlyphClass: 'fas fa-plus'\r\n };\r\n\r\n private _minValue: number;\r\n\r\n private readonly inputRef: React.RefObject = React.createRef();\r\n\r\n private readonly payLoad: IPayLoad;\r\n\r\n public static getDerivedStateFromProps(\r\n props: Readonly,\r\n state: IIncrementalQuantityState\r\n ): IIncrementalQuantityState {\r\n const nextState = { ...state };\r\n\r\n if (props.disabled && !state.isUpdating) {\r\n nextState.isUpdating = true;\r\n }\r\n\r\n let updatedValue = parseFloat(state.currentInput);\r\n\r\n if (\r\n (!props.disabled && state.isUpdating) ||\r\n ((props.applyDefaultOrderSettings ?? false) &&\r\n updatedValue === 1.00 &&\r\n props.currentCount &&\r\n props.currentCount > IncrementalQuantity.defaultProps.min!)\r\n ) {\r\n updatedValue = props.currentCount ?? 1.00;\r\n nextState.isUpdating = false;\r\n }\r\n\r\n return nextState;\r\n }\r\n\r\n constructor(props: IIncrementalQuantityProps) {\r\n super(props);\r\n this.state = { isUpdating: false, currentInput: props.currentCount?.toFixed(2) ?? '1.00' };\r\n this._onIncrement = this._onIncrement.bind(this);\r\n this._onDecrement = this._onDecrement.bind(this);\r\n this._handleChange = this._handleChange.bind(this);\r\n this.payLoad = getPayloadObject('click', this.props.telemetryContent!, '');\r\n this._minValue = this.props.min ?? IncrementalQuantity.defaultProps.min!;\r\n }\r\n\r\n public render(): JSX.Element {\r\n const { min, max } = this.props;\r\n\r\n this._minValue = min ?? IncrementalQuantity.defaultProps.min!;\r\n const currentValue1 = this.state.currentInput;\r\n\r\n const glyphMinusClassName: string = `${this.props.decrementGlyphClass!} quantity__controls-glyph`;\r\n const glyphPlusClassName: string = `${this.props.incrementGlyphClass!} quantity__controls-glyph`;\r\n const decrementDisabled = parseFloat(currentValue1) <= this._minValue || this.props.isGiftCard;\r\n const incrementDisabled = parseFloat(currentValue1) >= max || this.props.isGiftCard;\r\n const currentValue = parseFloat(currentValue1);\r\n this.payLoad.contentAction.etext = TelemetryConstant.DecrementQuantity;\r\n const decrementAttributes = getTelemetryAttributes(this.props.telemetryContent!, this.payLoad);\r\n this.payLoad.contentAction.etext = TelemetryConstant.IncrementQuantity;\r\n const incrementAttributes = getTelemetryAttributes(this.props.telemetryContent!, this.payLoad);\r\n const ariaLablelText = `${this.props.inputQuantityAriaLabel ?? ''} ${parseFloat(currentValue1)}`;\r\n\r\n let extraClassDecrement = '';\r\n if (decrementDisabled) {\r\n // The quantity has reached its boundaries (max or min)\r\n extraClassDecrement = 'disabled';\r\n } else if (this.props.disabled) {\r\n // This.props.disabled shows if the state is not succeded yet\r\n extraClassDecrement = 'transition';\r\n }\r\n let extraClassIncrement = '';\r\n if (incrementDisabled) {\r\n // The quantity has reached its boundaries (max or min)\r\n extraClassIncrement = 'disabled';\r\n } else if (this.props.disabled) {\r\n // This.props.disabled shows if the state is not succeded yet\r\n extraClassIncrement = 'transition';\r\n }\r\n\r\n return (\r\n <>\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n \r\n );\r\n }\r\n\r\n /**\r\n * It checks if its in mobile view or not.\r\n * @returns Boolean.\r\n */\r\n private readonly isMobileView = (): boolean => {\r\n // eslint-disable-next-line @typescript-eslint/consistent-type-assertions -- Added gridsetting values.\r\n const context = {\r\n gridSettings: {\r\n xs: { w: 767 },\r\n sm: { w: 991 },\r\n md: { w: 1199 },\r\n lg: { w: 1599 },\r\n xl: { w: 1600 }\r\n }\r\n } as IRequestContext;\r\n\r\n const isMobileCheck = isMobile({ variant: VariantType.Browser, context });\r\n return isMobileCheck === 'xs' || isMobileCheck === 'sm';\r\n };\r\n\r\n private _onIncrement(): void {\r\n let invokeCallback = false;\r\n const currQuantity = parseFloat(this.state.currentInput)\r\n \r\n let updatedQuantity: number;\r\n \r\n if (currQuantity < this.props.max) {\r\n invokeCallback = true;\r\n updatedQuantity = currQuantity + 1;\r\n } else {\r\n invokeCallback = false;\r\n updatedQuantity = this.props.max;\r\n }\r\n\r\n if (invokeCallback && this.props.onChange) {\r\n if (this.props.onChange(updatedQuantity)) {\r\n this.setState({ currentInput: updatedQuantity.toFixed(2) });\r\n }\r\n }\r\n }\r\n\r\n private _onDecrement(): void {\r\n let invokeCallback = false;\r\n const currQuantity = parseFloat(this.state.currentInput)\r\n let updatedQuantity: number;\r\n\r\n if (currQuantity >= this._minValue) {\r\n invokeCallback = true;\r\n updatedQuantity = currQuantity - 1;\r\n } else {\r\n invokeCallback = false;\r\n updatedQuantity = this._minValue;\r\n }\r\n\r\n if (invokeCallback && this.props.onChange) {\r\n if (this.props.onChange(updatedQuantity)) {\r\n this.setState({ currentInput: updatedQuantity.toFixed(2) });\r\n }\r\n }\r\n }\r\n\r\n private _handleChange(e: React.ChangeEvent): void {\r\n let value = e.target.value;\r\n \r\n // If the input field is empty, we update the state to an empty field.\r\n if (value === '') {\r\n this.setState({ currentInput: '' });\r\n } else if (/^[0-9]*[.]?[0-9]{0,2}$/.test(value)) {\r\n // Converts the comma to a dot and stores the valid value in the state.\r\n const formattedValue = value.replace(\",\", \".\");\r\n this.setState({ currentInput: formattedValue });\r\n \r\n debounce(() => {\r\n this.props.onChange && this.props.onChange(parseFloat(this.state.currentInput));\r\n \r\n const inputElement =\r\n this.inputRef && this.inputRef.current && this.inputRef.current instanceof HTMLInputElement && this.inputRef.current;\r\n if (inputElement) {\r\n inputElement.setAttribute('aria-valuenow', this.state.currentInput);\r\n inputElement.setAttribute('value', this.state.currentInput);\r\n }\r\n }, 1000)();\r\n }\r\n }\r\n\r\n /**\r\n * Validates min and updates.\r\n */\r\n private readonly _validateMin = (): void => {\r\n // If the input field is empty, we update the state to an empty field.\r\n if (this.state.currentInput === '') {\r\n this.setState({ currentInput: '1' });\r\n }\r\n \r\n const currentValue = parseFloat(this.state.currentInput);\r\n \r\n if (isNaN(currentValue)) {\r\n // If the value is invalid, we set it to the minimum value.\r\n this.setState({ currentInput: this._minValue.toFixed(2) });\r\n } else {\r\n const validValue = Math.min(this.props.max, Math.max(this._minValue, currentValue));\r\n if (validValue !== currentValue) {\r\n this.setState({ currentInput: validValue.toFixed(2) });\r\n }\r\n }\r\n };\r\n}\r\n","import React, { useState } from 'react';\r\nimport { Popover, PopoverHeader, PopoverBody } from 'reactstrap';\r\nimport { ProductSearchResult } from '@msdyn365-commerce/retail-proxy';\r\nimport { ICoreContext } from '@msdyn365-commerce/core';\r\nimport { getProductPageUrlSync } from '@msdyn365-commerce-modules/retail-actions';\r\n\r\nconst ProductPopover = ({ product, index, context, layout }: { product: ProductSearchResult; index: number; context: ICoreContext; layout: String }) => {\r\n const productUrl = product ? getProductPageUrlSync(product.Name ?? '', product.RecordId, context.actionContext, undefined) : '';\r\n const [popoverOpen, setPopoverOpen] = useState(false);\r\n const zIndex = index + 1;\r\n\r\n const togglePopover = (isVisible: boolean) => {\r\n setPopoverOpen(isVisible);\r\n };\r\n\r\n return (\r\n <>\r\n togglePopover(false)}\r\n onMouseLeave={() => togglePopover(false)}\r\n style={{ position: 'relative', zIndex: zIndex }}\r\n onClick={() => window.location.href = productUrl}\r\n >\r\n {layout === 'imagelist' ? {product.Name}{product.Name} :\r\n {product.Name}}\r\n \r\n togglePopover(!popoverOpen)}\r\n style={{ zIndex: zIndex + 1 }}\r\n >\r\n \r\n togglePopover(false)}\r\n onMouseLeave={() => togglePopover(false)}\r\n >\r\n {product.Name}\r\n \r\n \r\n \r\n );\r\n};\r\n\r\nexport default ProductPopover;\r\n","const binding = { modules: {}, dataActions: {} };\n\n const registerActionId = (actionPath) => {\n if (binding.dataActions[actionPath] &&\n binding.dataActions[actionPath].default &&\n binding.dataActions[actionPath].default.prototype &&\n binding.dataActions[actionPath].default.prototype.id) {\n binding.dataActions[binding.dataActions[actionPath].default.prototype.id] = binding.dataActions[actionPath];\n } else {\n Object.keys(binding.dataActions[actionPath] || {}).forEach(exportName => {\n if (binding.dataActions[actionPath][exportName] &&\n binding.dataActions[actionPath][exportName].prototype &&\n binding.dataActions[actionPath][exportName].prototype.Action) {\n binding.dataActions[binding.dataActions[actionPath][exportName].prototype.id] = binding.dataActions[actionPath][exportName];\n }\n })\n }\n };\n\n const registerSanitizedActionPath = (sanitizedActionPath, dataAction) => {\n if (process.env.NODE_ENV === 'development') {\n if (!dataAction.default) {\n throw new Error('Data action path does not have a default export');\n }\n if (!(dataAction.default.prototype.id && binding.dataActions[dataAction.default.prototype.id]) || !binding.dataActions[sanitizedActionPath]) {\n binding.dataActions[sanitizedActionPath] = dataAction;\n }\n } else {\n binding.dataActions[sanitizedActionPath] = dataAction;\n if (!binding.dataActions[sanitizedActionPath].default) {\n throw new Error('Data action path ' + sanitizedActionPath + ' does not have a default export');\n }\n binding.dataActions[sanitizedActionPath].default.prototype.RegistrationId = sanitizedActionPath;\n if (binding.dataActions[sanitizedActionPath].default.prototype.id) {\n binding.dataActions[binding.dataActions[sanitizedActionPath].default.prototype.id] = sanitizedActionPath;\n }\n }\n };\n \n\n (binding.modules['product-collection'] = {\n c: () => require('partner/modules/product-collection/product-collection.tsx'),\n $type: 'containerModule',\n da: [{name:'featureState', path:'@msdyn365-commerce-modules/retail-actions/dist/lib/get-feature-state', runOn: 0}],\n \n iNM: false,\n ns: '__local__',\n n: 'product-collection',\n p: '__local__',\n \n pdp: '',\n \n \n md: 'src/modules/product-collection'\n });\n \n\n {\n const sanitizedActionPath = '@msdyn365-commerce-modules/retail-actions/dist/lib/get-feature-state';\n let dataAction = require('@msdyn365-commerce-modules/retail-actions/dist/lib/get-feature-state');\n registerSanitizedActionPath(sanitizedActionPath, dataAction);\n }\n \n\n \n window.__bindings__ = window.__bindings__ || {};\n window.__bindings__.modules = {\n ...window.__bindings__.modules || {},\n ...binding.modules\n };\n \n window.__bindings__.dataActions = {\n ...window.__bindings__.dataActions || {},\n ...binding.dataActions\n };\n export const viewDictionary = {};\n viewDictionary['__local__|__local__|modules|product-collection|product-collection'] = {\n c: () => require('partner/modules/product-collection/product-collection.view.tsx'),\n cn: '__local__-__local__-product-collection'\n };\nviewDictionary['@msdyn365-commerce-modules|product-collection|modules|product-collection|product-collection'] = {\n c: () => require('@msdyn365-commerce-modules/product-collection/dist/lib/modules/product-collection/product-collection.view.js'),\n cn: '@msdyn365-commerce-modules-product-collection-product-collection'\n };\nwindow.__bindings__ = window.__bindings__ || {};\nwindow.__bindings__.viewDictionary = {\n ...window.__bindings__.viewDictionary || {},\n ...viewDictionary\n };","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { INodeProps, Module, Node } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport { IProductCollectionViewProps, IProductComponentViewProps } from './product-collection';\nimport { IProductCollectionResources } from './product-collection.props.autogenerated';\n\nconst ProductCollectionView: React.FC = props => {\n const {\n heading,\n ProductCollectionContainer,\n products,\n SingleSlideCarouselComponentProps,\n GridComponentProps,\n isCarousel,\n seeAllButton,\n resources\n } = props;\n\n if (products) {\n return (\n \n {heading}\n {seeAllButton}\n {isCarousel ? _renderCarousel(SingleSlideCarouselComponentProps, products) : _renderGrid(GridComponentProps, products)}\n \n );\n }\n\n // If no products are retrieved and the list type is promotional, still render the module to keep the entry of promotion page\n if (props.config.productCollection.listType === 'promotional') {\n return (\n \n {heading}\n {seeAllButton}\n {_renderNoProduct(resources)}\n \n );\n }\n props.context.telemetry.error('Product collection content is empty, module wont render.');\n return null;\n};\n\nconst _renderCarousel = (carouselContainer: INodeProps, items: IProductComponentViewProps[]): JSX.Element => {\n return {items && items.map(_renderProduct)};\n};\n\nconst _renderGrid = (gridContainer: INodeProps, items: IProductComponentViewProps[]): JSX.Element => {\n return {items && items.map(_renderProduct)};\n};\n\nconst _renderNoProduct = (resources: IProductCollectionResources): JSX.Element => {\n return (\n \n

{resources.noProductToRenderText}

\n
\n );\n};\n\nconst _renderProduct = (product: IProductComponentViewProps): JSX.Element => {\n const { ProductContainer, productComponent } = product;\n\n return {productComponent};\n};\n\nexport default ProductCollectionView;\n","module.exports = React;","module.exports = ReactDOM;"],"names":["layout","HeadingTag","ProductCollection","React","constructor","props","super","handleHeadingChange","event","this","config","heading","text","target","value","_getProductsDimensionsAvailabilities","async","context","dimensionsToDisplayOnProductCard","app","dimensionsInProductCard","dimensionsToDisplayAsSwatch","dimensionsAsSwatchType","validProducts","ArrayExtensions","validValues","products","hasElements","includes","DimensionTypes","none","productsDimensionAvailabilities","getDimensionAvailabilitiesForProductSearchResultAction","DimensionAvailabilitiesForProductSearchResultInput","DimensionSwatchDisplayTypes","productCard","actionContext","setState","initProductState","state","productPrices","productCollectionProducts","productCollection","equals","undefined","Msdyn365","isBrowser","listType","getProductPriceForSelectedProducts","ProductPriceForSelectedProductsInput","filter","p","IsMasterProduct","map","RecordId","_getProduct","product","index","productPrice","_this$props$data$feat","_this$state$productsD","Name","telemetry","trace","telemetryContent","getTelemetryObject","request","telemetryPageName","friendlyName","imageSettings","allowBackNavigation","resources","breaCrumbType","breadcrumbType","allowBack","quickviewSlot","slots","quickview","length","productComparisonButtonSlot","productComparisonButton","reviewCountAriaLabelValue","Number","TotalRatings","ratingCountAriaLabel","ratingCountAriaLabelSingleUser","isPriceMinMaxEnabled","data","featureState","result","find","priceResources","priceRangeSeparator","ProductContainer","tag","className","role","key","productComponent","ProductComponent","freePriceText","priceFree","originalPriceText","currentPriceText","ratingAriaLabel","id","typeName","quickViewButton","IsEnabled","dimensionAvailabilities","dimensionAvailability","_product$MasterProduc","masterProductId","MasterProductId","_getActivePrice","productsList","getPriceForProductSearchResult","PriceForProductSearchResultInput","_getSeeAllButton","headingLabel","recommendation","discountIds","catalogId","getCatalogId","validateCatalogId","searchPageLink","getUrlSync","url","URL","window","location","href","searchParams","set","toString","Button","title","seeAllButtonText","enableAffiliationBasedPricing","requestContext","user","isAuthenticated","render","shouldDisplaySeeAllButton","recommendationListId","isCarousel","carousel","isList","list","headingComponent","editProps","onEdit","updatedProducts","item","getProductData","ProductId","ObjectExtensions","isNullOrUndefined","productCollectionViewProps","_objectSpread","productsWithOutComponent","SingleSlideCarouselComponentProps","SingleSlideCarousel","flipperPrevLabel","flipperPrevious","flipperNextLabel","flipperNext","parentId","ProductCollectionContainer","moduleProps","classnames","GridComponentProps","seeAllButton","renderView","_renderList","items","quantities","setQuantities","useState","Array","fill","Toaster","richColors","position","toastOptions","classNames","error","Node","_product$Name","productUrl","getProductPageUrlSync","simpleProduct","Price","ProductTypeValue","BasePrice","AdjustedPrice","ProductPopover","IncrementalQuantity","min","max","currentCount","onChange","handleQuantityChange","newQuantities","moreInformationText","AddToCartComponent","quantity","addToCartText","disabled","onError","_error$cartActionResu","param","cartActionResult","validationResults","x","ErrorResourceId","LocalizedMessageParameters","_showToast","description","errorMessageForQtyValidation","replace","toast","_renderCarousel","carouselContainer","_renderProduct","_renderGrid","gridContainer","Object","assign","_renderNoProduct","noProductToRenderText","Module","VariantType","getTelemetryAttributes","payLoad","contentData","contentAction","recid","etext","setTelemetryAttribute","TelemetryConstant","IncrementalQuantity_1","_props$currentCount$t","_props$currentCount","_this$props$min","eventType","inputRef","isMobileView","isMobileCheck","_context$device","variant","Browser","MsDyn365","innerWidth","gridSettings","xs","w","sm","md","lg","Viewport","device","Type","isMobile","xl","_validateMin","currentInput","currentValue","parseFloat","isNaN","_minValue","toFixed","validValue","Math","isUpdating","_onIncrement","bind","_onDecrement","_handleChange","contentCategory","pgname","pageName","mname","moduleName","etype","defaultProps","_props$applyDefaultOr","nextState","updatedValue","_props$currentCount2","applyDefaultOrderSettings","_this$props$inputQuan","_this$props$inputQuan2","currentValue1","glyphMinusClassName","decrementGlyphClass","glyphPlusClassName","incrementGlyphClass","decrementDisabled","isGiftCard","incrementDisabled","DecrementQuantity","decrementAttributes","IncrementQuantity","incrementAttributes","ariaLablelText","inputQuantityAriaLabel","extraClassDecrement","extraClassIncrement","decrementButtonAriaLabel","onClick","color","type","onBlur","ref","incrementButtonAriaLabel","invokeCallback","currQuantity","updatedQuantity","e","test","formattedValue","_debounce","inputElement","current","HTMLInputElement","setAttribute","__decorate","observer","_ref","popoverOpen","setPopoverOpen","zIndex","togglePopover","isVisible","onMouseEnter","onMouseLeave","style","src","PrimaryImageUrl","alt","Popover","placement","isOpen","toggle","PopoverHeader","PopoverBody","binding","modules","dataActions","c","require","$type","da","name","path","runOn","iNM","ns","n","pdp","registerSanitizedActionPath","sanitizedActionPath","dataAction","default","Error","prototype","RegistrationId","__bindings__","viewDictionary","cn","module","exports","ReactDOM"],"sourceRoot":""}