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Q,kCACR+H,EAAiC,mBACjCU,EAAkB,WAClBzB,EAAU,aACV0B,EAAY,UACZlG,GACAxD,EAEJ,OAAIgB,EAEIjB,EAAAA,cAAC2P,EAAAA,OAAMJ,OAAAC,OAAA,GAAKjG,GACPlJ,EACAsJ,EACA1B,EAAaiH,EAAgBlG,EAAmC/H,GAAYoO,EAAY3F,EAAoBzI,IAMzE,gBAA5ChB,EAAM9C,OAAO6E,kBAAkBI,SAE3BpC,EAAAA,cAAC2P,EAAAA,OAAMJ,OAAAC,OAAA,GAAKjG,GACPlJ,EACAsJ,EACA8F,EAAiBhM,KAI9BxD,EAAMS,QAAQ1B,UAAUD,MAAM,4DACvB,cC5CXga,EAAOC,QAAUhZ,cCAjB+Y,EAAOC,QAAUC","sources":["webpack://jansen-adventureworks/./src/actions/get-product-availabilities-for-selected-variant-copy.action.ts?e41c","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 in the project root for license information.\r\n */\r\n\r\nimport {\r\n ArrayExtensions,\r\n createInventoryAvailabilitySearchCriteria,\r\n DeliveryMode,\r\n getSelectedProductIdFromActionInput,\r\n getSelectedVariant,\r\n IProductInventoryInformation,\r\n mapAggregatedProductInventoryInformation,\r\n SelectedVariantInput\r\n} from '@msdyn365-commerce-modules/retail-actions';\r\nimport {\r\n CacheType,\r\n createObservableDataAction,\r\n IAction,\r\n IActionContext,\r\n IActionInput,\r\n IAny,\r\n ICreateActionContext,\r\n IGeneric\r\n} from '@msdyn365-commerce/core';\r\nimport {\r\n ProductAvailableQuantity,\r\n ProductsDataActions,\r\n ProductType,\r\n ProductWarehouseInventoryAvailability,\r\n ReleasedProductType,\r\n SimpleProduct\r\n} from '@msdyn365-commerce/retail-proxy';\r\n\r\nexport enum Availability {\r\n outOfStock = 'Out of stock',\r\n available = 'Available',\r\n outOfStockClass = 'out-of-stock',\r\n availableClass = 'available',\r\n loading = 'loading',\r\n loadingClass = 'loading'\r\n}\r\n\r\n/**\r\n * Input class for the getProductAvailabilitiesForSelectedVariant Data Action.\r\n */\r\nexport class ProductAvailabilitiesForSelectedVariantInput implements IActionInput {\r\n public productId: number;\r\n\r\n public channelId: number;\r\n\r\n public selectedProduct: SimpleProduct | undefined;\r\n\r\n public constructor(productId: number | string, channelId: number, selectedProduct?: SimpleProduct) {\r\n this.productId = typeof productId === 'string' ? +productId : productId;\r\n this.channelId = channelId;\r\n this.selectedProduct = selectedProduct;\r\n }\r\n\r\n /**\r\n * GetCacheKey.\r\n * @returns - Returns string.\r\n */\r\n public getCacheKey = (): string => 'ProductAvailabilitiesForSelectedVariant';\r\n\r\n /**\r\n * GetCacheObjectType.\r\n * @returns - Cache Object Type string.\r\n */\r\n public getCacheObjectType = (): string => 'ProductAvailabilities';\r\n\r\n /**\r\n * DataCacheType.\r\n * @returns - CacheType string.\r\n */\r\n public dataCacheType = (): CacheType => 'none';\r\n}\r\n\r\n/**\r\n * CreateInput method for the getProductAvailabilitiesForSelectedVariant data action.\r\n * @param inputData - The input data passed to the createInput method.\r\n * @returns - ProductAvailabilitiesForSelectedVariant or error.\r\n */\r\nexport const createProductAvailabilitiesForSelectedVariantInput = (\r\n inputData: ICreateActionContext>\r\n): ProductAvailabilitiesForSelectedVariantInput => {\r\n const productId = getSelectedProductIdFromActionInput(inputData);\r\n\r\n if (productId) {\r\n return new ProductAvailabilitiesForSelectedVariantInput(+productId, +inputData.requestContext.apiSettings.channelId);\r\n }\r\n throw new Error('Unable to create ProductAvailabilitiesForSelectedVariantInput, no productId found on module config or query');\r\n};\r\n\r\n/**\r\n * The action method for the getProductAvailabilitiesForSelectedVariant data action.\r\n * @param input - ProductAvailabilitiesForSelectedVariant.\r\n * @param ctx - Action Context.\r\n * @returns - Product inventory information.\r\n */\r\nexport async function getProductAvailabilitiesForSelectedVariantAction(\r\n input: ProductAvailabilitiesForSelectedVariantInput,\r\n ctx: IActionContext\r\n): Promise {\r\n const productInventoryInformation: IProductInventoryInformation[] = [];\r\n try {\r\n let productResult: SimpleProduct | null = input.selectedProduct ?? null;\r\n\r\n if (!productResult) {\r\n const selectedVariantInput = new SelectedVariantInput(\r\n input.productId,\r\n input.channelId,\r\n undefined,\r\n undefined,\r\n ctx.requestContext\r\n );\r\n\r\n productResult = await getSelectedVariant(selectedVariantInput, ctx);\r\n }\r\n\r\n // Don't get availability if it is service item && enableStockCheck is disbaled.\r\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access -- Reading config.\r\n if (\r\n ctx.requestContext.app.config.enableStockCheck &&\r\n productResult &&\r\n productResult.ItemTypeValue !== ReleasedProductType.Service &&\r\n productResult.ProductTypeValue !== ProductType.Master\r\n ) {\r\n const shippingSearchCriteria = createInventoryAvailabilitySearchCriteria(\r\n ctx,\r\n [productResult.RecordId],\r\n true,\r\n undefined,\r\n undefined,\r\n DeliveryMode.shipping\r\n );\r\n const pickupSearchCriteria = createInventoryAvailabilitySearchCriteria(\r\n ctx,\r\n [input.productId],\r\n false,\r\n true,\r\n undefined,\r\n DeliveryMode.pickup\r\n );\r\n const shippingAvailability = await ProductsDataActions.getEstimatedAvailabilityAsync(\r\n { callerContext: ctx },\r\n shippingSearchCriteria\r\n );\r\n if (shippingAvailability.ProductWarehouseInventoryAvailabilities) {\r\n const shippingInventory = mapAggregatedProductInventoryInformation(ctx, shippingAvailability);\r\n if (ArrayExtensions.hasElements(shippingInventory)) {\r\n shippingInventory[0].deliveryType = DeliveryMode.shipping;\r\n productInventoryInformation.push(shippingInventory[0]);\r\n }\r\n }\r\n const pickupAvailability = await ProductsDataActions.getEstimatedAvailabilityAsync(\r\n { callerContext: ctx },\r\n pickupSearchCriteria\r\n );\r\n if (pickupAvailability.ProductWarehouseInventoryAvailabilities) {\r\n const pickupInventory = mapAggregatedProductInventoryInformation(ctx, pickupAvailability);\r\n if (ArrayExtensions.hasElements(pickupInventory)) {\r\n pickupInventory[0].deliveryType = DeliveryMode.pickup;\r\n productInventoryInformation.push(pickupInventory[0]);\r\n }\r\n }\r\n return productInventoryInformation;\r\n } else if (\r\n productResult &&\r\n productResult.ItemTypeValue !== ReleasedProductType.Service &&\r\n productResult.ProductTypeValue !== ProductType.Master\r\n ) {\r\n const shippingSearchCriteria = createInventoryAvailabilitySearchCriteria(\r\n ctx,\r\n [productResult.RecordId],\r\n true,\r\n undefined,\r\n undefined,\r\n DeliveryMode.shipping\r\n );\r\n const shippingAvailability = await ProductsDataActions.getEstimatedAvailabilityAsync(\r\n { callerContext: ctx },\r\n shippingSearchCriteria\r\n );\r\n if (\r\n shippingAvailability.ProductWarehouseInventoryAvailabilities &&\r\n shippingAvailability.AggregatedProductInventoryAvailabilities\r\n ) {\r\n return shippingAvailability.AggregatedProductInventoryAvailabilities[0];\r\n }\r\n }\r\n return undefined;\r\n } catch (error) {\r\n // eslint-disable-next-line @typescript-eslint/no-unsafe-argument -- cann't assign type to the error variable.\r\n // ctx.telemetry.exception(error);\r\n ctx.telemetry.debug('[getPriceForSelectedVariantAction]Error executing action');\r\n return undefined;\r\n }\r\n}\r\n\r\n/**\r\n * The function that maps a ProductWareHouse object into a ProductAvailabilityQuantity.\r\n * @param productsWarehouseInventory - Product warehouse inventory.\r\n * @returns Product Available quantity.\r\n */\r\nexport function mergeProductWarehouseToProductAvailabities(\r\n productsWarehouseInventory: ProductWarehouseInventoryAvailability[]\r\n): ProductAvailableQuantity[] {\r\n const productAvailable: ProductAvailableQuantity[] = [];\r\n if (ArrayExtensions.hasElements(productsWarehouseInventory)) {\r\n for (const product of productsWarehouseInventory) {\r\n if (product.TotalAvailable !== undefined && product.ProductId !== undefined) {\r\n productAvailable.push({ ProductId: product.ProductId, AvailableQuantity: product.TotalAvailable });\r\n }\r\n }\r\n }\r\n return productAvailable;\r\n}\r\n\r\n/**\r\n * The complete getProductAvailabilitiesForSelectedVariant data action\r\n * Get the currently selected variant via the getSelectedVariant data action, and\r\n * then gets the availabilities for the variant via the getProductAvailabilities RetailServer API.\r\n */\r\nexport const getProductAvailabilitiesForSelectedVariantActionDataAction = createObservableDataAction({\r\n id: '@msdyn365-commerce-modules/retail-actions/get-product-availabilities-for-selected-variant',\r\n action: >getProductAvailabilitiesForSelectedVariantAction,\r\n input: createProductAvailabilitiesForSelectedVariantInput\r\n});\r\n\r\nexport default getProductAvailabilitiesForSelectedVariantActionDataAction;\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 * 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 availabilityIndicatorOutOfStock: string;\r\n availabilityIndicatorAvailable: 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 React, { useEffect } from 'react';\r\n\r\nimport { IProductCollectionViewProps, IProductComponentViewProps } from './product-collection';\r\nimport { IProductCollectionResources } from './product-collection.props.autogenerated';\r\nimport { AsyncResult, 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 {\r\n getProductAvailabilitiesForSelectedVariant,\r\n getProductPageUrlSync,\r\n getSimpleProductsAction,\r\n ProductInput\r\n} from '@msdyn365-commerce-modules/retail-actions';\r\nimport { Availability } from '../../actions/get-product-availabilities-for-selected-variant-copy.action';\r\nimport { ProductAvailabilitiesForSelectedVariantInput } 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 products = items;\r\n const [quantities, setQuantities] = useState(new Array(items?.length).fill(1));\r\n const [availabilities, setAvailabilities] = useState(Array(products?.length).fill(Availability.loading));\r\n const [FullProducts, setFullProducts] = useState([]);\r\n\r\n useEffect(() => {\r\n const fetchProducts = async () => {\r\n const simpleProducts = await _getProducts(products);\r\n setFullProducts(simpleProducts);\r\n simpleProducts.map((simpleProduct: SimpleProduct, i) => {\r\n const minQuantity = simpleProduct.Behavior?.MinimumQuantity ?? 0;\r\n const multipleOfQuantity = simpleProduct.Behavior?.MultipleOfQuantity ?? 0;\r\n const quantityToSet = minQuantity > 0 ? minQuantity : multipleOfQuantity > 0 ? multipleOfQuantity : 1;\r\n\r\n handleQuantityChange(i, quantityToSet);\r\n });\r\n };\r\n const fetchAvailabilities = async () => {\r\n for (let index = 0; index < products.length; index++) {\r\n const product = products[index];\r\n if (product) {\r\n const availability = await newAvailableQuantity(product, context);\r\n setAvailabilities(prevAvailabilities => {\r\n const updatedAvailabilities = [...prevAvailabilities];\r\n updatedAvailabilities[index] =\r\n availability?.TotalAvailableInventoryLevelLabel === Availability.available\r\n ? Availability.available\r\n : Availability.outOfStock;\r\n return updatedAvailabilities;\r\n });\r\n }\r\n }\r\n };\r\n\r\n fetchProducts();\r\n fetchAvailabilities();\r\n }, [products, context]);\r\n\r\n const _getProducts = (products: ProductSearchResult[] = []): Promise => {\r\n const productInputs = products\r\n .filter(product => product.RecordId)\r\n .map(product => new ProductInput(product.RecordId, props.context.request.apiSettings));\r\n return getSimpleProductsAction(productInputs, props.context.actionContext);\r\n };\r\n\r\n const newAvailableQuantity = async (product: any, context: any): Promise | null> => {\r\n try {\r\n const availability = await getProductAvailabilitiesForSelectedVariant(\r\n new ProductAvailabilitiesForSelectedVariantInput(\r\n Number(product.RecordId),\r\n Number(context.actionContext.requestContext.channel.RecordId),\r\n product\r\n ),\r\n context.actionContext\r\n );\r\n return availability;\r\n } catch (error) {\r\n return null;\r\n }\r\n };\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 {FullProducts.length > 0 && (\r\n {\r\n handleQuantityChange(index, value);\r\n return true;\r\n }}\r\n productBehavior={\r\n FullProducts.find(productResult => product.RecordId === productResult.RecordId)\r\n ?.Behavior\r\n }\r\n />\r\n )}\r\n \r\n {availabilities[index] === Availability.loading ? (\r\n \r\n ) : (\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\nimport { ProductBehavior } from '@msdyn365-commerce/retail-proxy';\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 multipleOfQuantity: 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 productBehavior: ProductBehavior;\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 max: 999,\r\n multipleOfQuantity: 0.01,\r\n decrementGlyphClass: 'fas fa-minus',\r\n incrementGlyphClass: 'fas fa-plus'\r\n };\r\n\r\n private _minValue: number;\r\n private _maxValue: number;\r\n private _multipleQuantityValue: 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.0 &&\r\n props.currentCount &&\r\n props.currentCount > IncrementalQuantity.defaultProps.min!)\r\n ) {\r\n updatedValue = props.currentCount ?? 1.0;\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\r\n let minQuantity = IncrementalQuantity.defaultProps.min!;\r\n let maxQuantity = IncrementalQuantity.defaultProps.max!;\r\n let multipleOfQuantity = IncrementalQuantity.defaultProps.multipleOfQuantity!;\r\n\r\n if (props.productBehavior) {\r\n minQuantity = props.productBehavior.MinimumQuantity ?? IncrementalQuantity.defaultProps.min!;\r\n multipleOfQuantity = props.productBehavior.MultipleOfQuantity ?? IncrementalQuantity.defaultProps.multipleOfQuantity!;\r\n }\r\n\r\n this.state = {\r\n isUpdating: false,\r\n currentInput: props.productBehavior\r\n ? minQuantity > 0\r\n ? minQuantity.toFixed(2)\r\n : multipleOfQuantity > 0\r\n ? multipleOfQuantity.toFixed(2)\r\n : '1.00'\r\n : props.currentCount?.toFixed(2) ?? '1.00'\r\n };\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 = minQuantity ?? IncrementalQuantity.defaultProps.min!;\r\n this._maxValue = maxQuantity ?? IncrementalQuantity.defaultProps.max!;\r\n this._multipleQuantityValue = multipleOfQuantity ?? IncrementalQuantity.defaultProps.multipleOfQuantity!;\r\n }\r\n\r\n public render(): JSX.Element {\r\n const currentValue1 = this.state.currentInput;\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 nextDecrementValue = parseFloat(currentValue1) - this._multipleQuantityValue;\r\n const decrementDisabled = parseFloat(currentValue1) <= this._minValue + 1 || this.props.isGiftCard || nextDecrementValue === 0;\r\n const incrementDisabled = parseFloat(currentValue1) >= Number(this._maxValue) || 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 (this._multipleQuantityValue && updatedQuantity % this._multipleQuantityValue !== 0) {\r\n updatedQuantity = Math.ceil(updatedQuantity / this._multipleQuantityValue) * this._multipleQuantityValue;\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 (this._multipleQuantityValue && updatedQuantity % this._multipleQuantityValue !== 0) {\r\n updatedQuantity = Math.floor(updatedQuantity / this._multipleQuantityValue) * this._multipleQuantityValue;\r\n if (updatedQuantity < this._minValue) {\r\n updatedQuantity = this._minValue;\r\n }\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 let validValue = Math.min(this.props.max, Math.max(this._minValue, currentValue));\r\n\r\n // Check if the value is a multiple of multipleOfQuantity\r\n if (this._multipleQuantityValue && validValue % this._multipleQuantityValue !== 0) {\r\n validValue = Math.ceil(validValue / this._multipleQuantityValue) * this._multipleQuantityValue;\r\n }\r\n\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":["Availability","ProductAvailabilitiesForSelectedVariantInput","constructor","productId","channelId","selectedProduct","getCacheKey","getCacheObjectType","dataCacheType","this","createProductAvailabilitiesForSelectedVariantInput","inputData","getSelectedProductIdFromActionInput","requestContext","apiSettings","Error","async","getProductAvailabilitiesForSelectedVariantAction","input","ctx","productInventoryInformation","_input$selectedProduc","productResult","selectedVariantInput","SelectedVariantInput","undefined","getSelectedVariant","app","config","enableStockCheck","ItemTypeValue","ReleasedProductType","Service","ProductTypeValue","ProductType","Master","shippingSearchCriteria","createInventoryAvailabilitySearchCriteria","RecordId","DeliveryMode","shipping","pickupSearchCriteria","pickup","shippingAvailability","ProductsDataActions","callerContext","ProductWarehouseInventoryAvailabilities","shippingInventory","mapAggregatedProductInventoryInformation","ArrayExtensions","hasElements","deliveryType","push","pickupAvailability","pickupInventory","AggregatedProductInventoryAvailabilities","error","telemetry","debug","mergeProductWarehouseToProductAvailabities","productsWarehouseInventory","productAvailable","product","TotalAvailable","ProductId","AvailableQuantity","getProductAvailabilitiesForSelectedVariantActionDataAction","createObservableDataAction","id","action","layout","HeadingTag","ProductCollection","React","props","super","handleHeadingChange","event","heading","text","target","value","_getProductsDimensionsAvailabilities","context","dimensionsToDisplayOnProductCard","dimensionsInProductCard","dimensionsToDisplayAsSwatch","dimensionsAsSwatchType","validProducts","validValues","products","includes","DimensionTypes","none","productsDimensionAvailabilities","getDimensionAvailabilitiesForProductSearchResultAction","DimensionAvailabilitiesForProductSearchResultInput","DimensionSwatchDisplayTypes","productCard","actionContext","setState","initProductState","state","productPrices","productCollectionProducts","productCollection","equals","Msdyn365","isBrowser","listType","getProductPriceForSelectedProducts","ProductPriceForSelectedProductsInput","filter","p","IsMasterProduct","map","_getProduct","index","productPrice","_this$props$data$feat","_this$state$productsD","Name","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","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","user","isAuthenticated","render","shouldDisplaySeeAllButton","recommendationListId","isCarousel","carousel","isList","list","headingComponent","editProps","onEdit","updatedProducts","item","getProductData","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","availabilities","setAvailabilities","loading","FullProducts","setFullProducts","useEffect","simpleProducts","_getProducts","simpleProduct","i","_simpleProduct$Behavi","_simpleProduct$Behavi2","_simpleProduct$Behavi3","_simpleProduct$Behavi4","minQuantity","Behavior","MinimumQuantity","multipleOfQuantity","MultipleOfQuantity","handleQuantityChange","fetchProducts","availability","newAvailableQuantity","prevAvailabilities","updatedAvailabilities","TotalAvailableInventoryLevelLabel","available","outOfStock","fetchAvailabilities","arguments","productInputs","ProductInput","getSimpleProductsAction","getProductAvailabilitiesForSelectedVariant","channel","newQuantities","Toaster","richColors","position","toastOptions","classNames","Node","_product$Name","_FullProducts$find","productUrl","getProductPageUrlSync","Price","BasePrice","AdjustedPrice","ProductPopover","IncrementalQuantity","min","max","currentCount","onChange","productBehavior","availableClass","outOfStockClass","availabilityIndicatorAvailable","availabilityIndicatorOutOfStock","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","_minQuantity","_multipleOfQuantity","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","_multipleQuantityValue","ceil","defaultProps","maxQuantity","_props$productBehavio","_props$productBehavio2","eventType","isUpdating","_onIncrement","bind","_onDecrement","_handleChange","contentCategory","pgname","pageName","mname","moduleName","etype","_maxValue","_props$applyDefaultOr","nextState","updatedValue","_props$currentCount2","applyDefaultOrderSettings","_this$props$inputQuan","_this$props$inputQuan2","currentValue1","glyphMinusClassName","decrementGlyphClass","glyphPlusClassName","incrementGlyphClass","nextDecrementValue","decrementDisabled","isGiftCard","incrementDisabled","DecrementQuantity","decrementAttributes","IncrementQuantity","incrementAttributes","ariaLablelText","inputQuantityAriaLabel","extraClassDecrement","extraClassIncrement","decrementButtonAriaLabel","onClick","color","type","onBlur","ref","incrementButtonAriaLabel","invokeCallback","currQuantity","updatedQuantity","floor","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","prototype","RegistrationId","__bindings__","viewDictionary","cn","module","exports","ReactDOM"],"sourceRoot":""}