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AK,OAASiM,KAAK,+EAAgFC,MAAO,GAAG,CAAClM,KAAK,kBAAoBiM,KAAK,2BAA4BC,MAAO,GAAG,CAAClM,KAAK,sBAAwBiM,KAAK,kEAAmEC,MAAO,GAAG,CAAClM,KAAK,eAAiBiM,KAAK,uEAAwEC,MAAO,GAAG,CAAClM,KAAK,6BAA+BiM,KAAK,uCAAwCC,MAAO,GAAG,CAAClM,KAAK,YAAciM,KAAK,iFAAkFC,MAAO,IAEpmBC,KAAK,EACLC,GAAI,YACJC,EAAG,6BACH5iB,EAAG,YAEH6iB,IAAK,GAGLC,GAAI,0CAOAf,EAF4B,kEACXM,EAAQ,KAQzBN,EAF4B,uEACXM,EAAQ,KAQzBN,EAF4B,iFACXM,EAAQ,KAQzBN,EAF4B,+EACXM,EAAQ,KAQzBN,EAF4B,2BACXM,EAAQ,MAQzBN,EAF4B,uCACXM,EAAQ,MAMjCjU,OAAO2U,aAAe3U,OAAO2U,cAAgB,GAC7C3U,OAAO2U,aAAalB,QAAOvf,EAAAA,EAAA,GACpB8L,OAAO2U,aAAalB,SAAW,IAC/BD,EAAQC,SAGXzT,OAAO2U,aAAajB,YAAWxf,EAAAA,EAAA,GAC5B8L,OAAO2U,aAAajB,aAAe,IACnCF,EAAQE,aAEY,MAAMkB,EAAiB,GAC9BA,EAAe,qFAAuF,CAC9GxjB,EAAGA,IAAM6iB,EAAQ,MACjBY,GAAI,kDAEpB7U,OAAO2U,aAAe3U,OAAO2U,cAAgB,GAC7C3U,OAAO2U,aAAaC,eAAc1gB,EAAAA,EAAA,GACP8L,OAAO2U,aAAaC,gBAAkB,IACtCA,UCtH3BE,EAAOC,QAAUtoB,cCAjBqoB,EAAOC,QAAUC","sources":["webpack://Dobbies.Commerce/./src/actions/get-plant-pots-product-count.ts?cf83","webpack://Dobbies.Commerce/./src/modules/dobbies-product-collection/dobbies-product-collection.props.autogenerated.ts?d60b","webpack://Dobbies.Commerce/./src/modules/dobbies-product-collection/dobbies-product-collection.tsx?ae9b","webpack://Dobbies.Commerce/./src/modules/dobbies-product-collection/dobbies-product-collection.view.tsx?797c","webpack://Dobbies.Commerce/./src/themes/dobbies/utilities/inventory/product-inventory-utils.ts?3772","webpack://Dobbies.Commerce/./lib/dobbies-product-collection/module-registration.js?9ef8","webpack://Dobbies.Commerce/external var \"React\"?0d3b","webpack://Dobbies.Commerce/external var \"ReactDOM\"?853b"],"sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\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\n\r\n/**\r\n * CheckoutModulesStateShare Input Action\r\n */\r\n\r\nexport class GetPlantPotsProductCountInput implements IActionInput {\r\n public getCacheKey = () => `plantPotsProductCount`;\r\n public getCacheObjectType = () => 'plantPotsProductCount';\r\n public dataCacheType = (): CacheType => 'request';\r\n}\r\n\r\n// TODO: Create a data model here or import one to capture the response of the action\r\nexport interface IGetPlantPotsProductCountState {\r\n potsProductCount?: number; // Share the plantProductsIds accross checkout modules to not check categories again & again\r\n}\r\n\r\n/**\r\n * TODO: Use this function to create the input required to make the action call\r\n */\r\nconst createInput = (inputData: ICreateActionContext>): IActionInput => {\r\n return new GetPlantPotsProductCountInput();\r\n};\r\n/**\r\n * TODO: Use this function to call your action and process the results as needed\r\n */\r\nexport async function sampleStateAction(\r\n input: GetPlantPotsProductCountInput,\r\n ctx: IActionContext\r\n): Promise {\r\n return { potsProductCount: 0 };\r\n}\r\n\r\n/**\r\n * SampleState - create action\r\n */\r\nexport default createObservableDataAction({\r\n action: >sampleStateAction,\r\n input: createInput\r\n});\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 * IDobbiesProductCollection 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}\r\n\r\nexport interface IDobbiesProductCollectionConfig extends Msdyn365.IModuleConfig {\r\n productCollection: Msdyn365.IProductList;\r\n heading?: IHeadingData;\r\n allowedRelationType?: string;\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 redirectToCart?: boolean;\r\n isProductBundles?: boolean;\r\n isBundlesModal?: boolean;\r\n isNotificationModal?: boolean;\r\n discountAppliedInCartMessage?: string;\r\n maxQuantityReachedInBundlesmsg?: string;\r\n}\r\n\r\nexport interface IDobbiesProductCollectionResources {\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 addToCartButtonText: string;\r\n addedToCartSuccessMessage: string;\r\n addedToCartFailureMessage: string;\r\n maxQuantityLimitText: 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 IDobbiesProductCollectionProps extends Msdyn365.IModule {\r\n resources: IDobbiesProductCollectionResources;\r\n config: IDobbiesProductCollectionConfig;\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\n/* eslint-disable security/detect-object-injection */\r\nimport {\r\n ArrayExtensions,\r\n IProductInventoryInformation,\r\n validateCatalogId,\r\n getFallbackImageUrl\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 { ProductComponent } from '../../themes/dobbies/views/components/product.component';\r\nimport * as Msdyn365 from '@msdyn365-commerce/core';\r\nimport {\r\n ProductPrice,\r\n ProductSearchResult,\r\n ProjectionDomain,\r\n ProductWarehouseInventoryAvailability\r\n} from '@msdyn365-commerce/retail-proxy';\r\nimport {\r\n getActivePricesAsync,\r\n getByIdAsync,\r\n getDeliveryOptionsAsync,\r\n getEstimatedAvailabilityAsync,\r\n searchByCriteriaAsync,\r\n getVariantsByDimensionValuesAsync\r\n} from '@msdyn365-commerce/retail-proxy/dist/DataActions/ProductsDataActions.g';\r\nimport { ProductSearchCriteria, SimpleProduct } from '@msdyn365-commerce/retail-proxy/dist/Entities/CommerceTypes.g';\r\nimport classnames from 'classnames';\r\nimport * as React from 'react';\r\nimport { GetPlantPotsProductCountInput } from '../../actions/get-plant-pots-product-count';\r\nimport { mapProductInventoryInformation } from '../../themes/dobbies/utilities/inventory/product-inventory-utils';\r\nimport { IDobbiesProductCollectionData } from './dobbies-product-collection.data';\r\nimport { IDobbiesProductCollectionProps, layout } from './dobbies-product-collection.props.autogenerated';\r\nimport { CartModulesStateShareInput } from '../../actions/cart-state-share';\r\nimport { reaction } from 'mobx';\r\nimport { DiscountLine } from '@msdyn365-commerce/retail-proxy';\r\nimport { getByIdsAsync } from '@msdyn365-commerce/retail-proxy/dist/DataActions/ProductsDataActions.g';\r\nimport { QueryResultSettingsProxy } from '@msdyn365-commerce-modules/retail-actions';\r\nimport { _getCartItemMaxQuantity } from '../dobbies-cart/components/dobbies-cart-line-items';\r\nimport { getCatalogId } from '@msdyn365-commerce/core';\r\nimport { IActivePointsData } from '../dobbies-active-image';\r\nimport { IDobbiesMiniCartSummaryProduct } from '../../themes/dobbies/views/buybox.view';\r\n\r\nexport interface IProductCollectionViewProps extends IDobbiesProductCollectionProps<{}> {\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 shouldShowAddAllProducts?: boolean;\r\n addAllProductsOnClick?: Button;\r\n pdpProduct?: SimpleProduct;\r\n pdpProductComponent?: React.ReactNode;\r\n isBundlesModal?: boolean;\r\n state: IProductComponentState;\r\n notificationModalProducts?: IDobbiesMiniCartSummaryProduct[];\r\n data: IDobbiesProductCollectionData;\r\n}\r\n\r\nexport interface IProductBundlesMaxAvailableQuantities {\r\n productId: number;\r\n maxQuantity: number;\r\n}\r\n\r\nexport interface IProductComponentViewProps {\r\n ProductContainer: INodeProps;\r\n productComponent: React.ReactNode;\r\n addToCartButton: React.ReactNode;\r\n}\r\nexport interface IProductComponentState {\r\n products: ProductSearchResult[];\r\n /* VSI Customization - START - 13/04/21 */\r\n inventoryInformation: IProductInventoryInformation[];\r\n productCount?: number;\r\n allProducts?: ProductSearchResult[];\r\n listType?: string; // Check if listType is not plants pots, return\r\n isSharedStateSet?: boolean; // Check if shared state is set no need to reset it again and again\r\n /* VSI Customization - END */\r\n addedProductIdsToBundles: number[];\r\n currQuantities: number[][];\r\n pdpProduct?: SimpleProduct;\r\n pdpSearchResultProduct?: ProductSearchResult;\r\n discountLines?: (DiscountLine[] | undefined)[];\r\n nonClubPlusDiscount?: ProductPrice[];\r\n simpleProductObjs?: SimpleProduct[];\r\n}\r\nexport interface IAddToBagActionMessageState {\r\n productId?: number;\r\n itemKey?: string;\r\n userMessage?: string;\r\n statusCssString?: string;\r\n messageGlyph?: string;\r\n isOpen?: boolean;\r\n}\r\n\r\nexport interface IProductWithModes extends ProductSearchResult {\r\n isCnC: boolean;\r\n isHomeDelivery: boolean;\r\n}\r\nexport interface IDobbiesAddedProductToBundle {\r\n productId?: number;\r\n quantity?: number;\r\n price?: number;\r\n maxQuantity?: number;\r\n}\r\n/**\r\n * ProductCollection component\r\n */\r\nclass ProductCollection extends React.PureComponent<\r\n IDobbiesProductCollectionProps,\r\n IProductComponentState & IAddToBagActionMessageState\r\n> {\r\n private telemetryContent: ITelemetryContent;\r\n private productPrices: ProductPrice[];\r\n constructor(\r\n props: IDobbiesProductCollectionProps,\r\n state: IProductComponentState & IAddToBagActionMessageState\r\n ) {\r\n super(props);\r\n const {\r\n config: { productCollection }\r\n } = this.props;\r\n this.productPrices = [];\r\n this.state = {\r\n products: productCollection && productCollection.products,\r\n inventoryInformation: [],\r\n productCount: 0,\r\n listType: productCollection && productCollection.listType,\r\n allProducts: [],\r\n addedProductIdsToBundles: [],\r\n currQuantities: [],\r\n discountLines: [],\r\n nonClubPlusDiscount: []\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 if (this.props.config.isNotificationModal) {\r\n this.getActiveImageproductAction();\r\n }\r\n }\r\n private getActiveImageproductAction = async () => {\r\n const {\r\n context: {\r\n actionContext: {\r\n requestContext: { cookies }\r\n }\r\n }\r\n } = this.props;\r\n const cookienotificationValue = cookies.get('notification_products');\r\n if (cookienotificationValue && Array.isArray(cookienotificationValue.value) && cookienotificationValue.value['length'] > 0) {\r\n const activePoints = cookienotificationValue.value;\r\n const itemIds: number[] = [];\r\n if (activePoints) {\r\n activePoints.map((activePointData: IActivePointsData) => itemIds.push(+activePointData.itemId!));\r\n }\r\n const searchCriteriaInput: ProductSearchCriteria = {};\r\n const catalogId = getCatalogId(this.props.context.actionContext.requestContext);\r\n validateCatalogId(catalogId);\r\n\r\n searchCriteriaInput.Context = {\r\n ChannelId: this.props.context.actionContext.requestContext.apiSettings.channelId,\r\n CatalogId: catalogId\r\n };\r\n searchCriteriaInput.IncludeAttributes = true;\r\n searchCriteriaInput.Ids = itemIds;\r\n if (!activePoints || !ArrayExtensions.hasElements(activePoints)) {\r\n throw new Error('Fail to call ActiveImage API no active points configured.');\r\n }\r\n // eslint-disable-next-line no-return-await -- Disable because we want to return the promise.\r\n const products = await searchByCriteriaAsync({ callerContext: this.props.context.actionContext }, searchCriteriaInput);\r\n this.setState({ products: products });\r\n // return products\r\n }\r\n };\r\n\r\n public componentDidMount(): void {\r\n const {\r\n config: { allowedRelationType, productCollection },\r\n context: { actionContext }\r\n } = this.props;\r\n if (!this.props.config.isProductBundles) {\r\n void this.getNonClubPlusDiscountPrices();\r\n }\r\n /* VSI Customization - START - 13/04/21 */\r\n // Check if listType is not plants pots, return\r\n if (!this.state.isSharedStateSet) {\r\n if (this.state.listType?.toLowerCase() === allowedRelationType?.toLowerCase() && productCollection?.products?.length > 0) {\r\n this._getProductAvailability()\r\n .then(res => {\r\n const cookies = this.props.context.actionContext.requestContext.cookies;\r\n const maxQData: IProductBundlesMaxAvailableQuantities[] = [];\r\n for (const sp of this.state.products) {\r\n const maxQ = this.getMaxAvailableQuantityForProduct(sp.RecordId);\r\n const maxQObj: IProductBundlesMaxAvailableQuantities = { productId: sp.RecordId, maxQuantity: maxQ };\r\n maxQData.push(maxQObj);\r\n }\r\n cookies.set('product_bundles_maximum_available_quantities', maxQData);\r\n })\r\n .catch(error => error);\r\n } else {\r\n actionContext.update(new GetPlantPotsProductCountInput(), { potsProductCount: 0 });\r\n this.setState({ isSharedStateSet: true });\r\n }\r\n }\r\n /* VSI Customization - END */\r\n\r\n this.setState({ addedProductIdsToBundles: [] });\r\n this.updateAddedProductsList();\r\n reaction(\r\n () => this.props.data.cartSharedState.result?.isCartUpdated,\r\n () => {\r\n if (this.props.data.cartSharedState.result?.isCartUpdated) {\r\n this.updateAddedProductsList();\r\n }\r\n }\r\n );\r\n if (this.props.config.isProductBundles && window && !this.props.config.isNotificationModal) {\r\n const splittedUrl = window.location.href.split('/');\r\n const prodIdStr = splittedUrl[splittedUrl.length - 1];\r\n const prodIdStrSplitted = prodIdStr.split('.p');\r\n let prodId = '';\r\n if (prodIdStrSplitted.length > 1) {\r\n prodId = prodIdStrSplitted[0];\r\n }\r\n if (prodId) {\r\n getByIdAsync(\r\n { callerContext: this.props.context.actionContext },\r\n Number(prodId),\r\n this.props.context.request.apiSettings.channelId\r\n )\r\n .then(resp => {\r\n const pdpProd: SimpleProduct = Array.isArray(resp) ? resp[0] : resp;\r\n this.setState({ pdpProduct: pdpProd });\r\n const searchCriteriaInput: ProductSearchCriteria = {};\r\n searchCriteriaInput.Context = {\r\n ChannelId: this.props.context.actionContext.requestContext.apiSettings.channelId,\r\n CatalogId: this.props.context.actionContext.requestContext.apiSettings.catalogId\r\n };\r\n const productId = pdpProd.MasterProductId ? pdpProd.MasterProductId : pdpProd.RecordId;\r\n searchCriteriaInput.Ids = [productId];\r\n searchCriteriaInput.IncludeAttributes = true;\r\n searchByCriteriaAsync(\r\n {\r\n callerContext: this.props.context.actionContext,\r\n queryResultSettings: {}\r\n },\r\n searchCriteriaInput\r\n )\r\n .then(searchByCriteriaResp => {\r\n if (searchByCriteriaResp && searchByCriteriaResp.length > 0) {\r\n const searchByCriteriaItem = searchByCriteriaResp[0];\r\n searchByCriteriaItem.RecordId = pdpProd.RecordId;\r\n if (searchByCriteriaItem.IsMasterProduct) {\r\n getVariantsByDimensionValuesAsync(\r\n { callerContext: this.props.context.actionContext, queryResultSettings: {} },\r\n searchByCriteriaItem.RecordId,\r\n this.props.context.request.apiSettings.channelId,\r\n []\r\n ).then(variants => {\r\n if (variants && variants.length) {\r\n const variant = variants[0];\r\n const fallbackImageUrl = getFallbackImageUrl(\r\n variant.ItemId,\r\n this.props.context.actionContext.requestContext.apiSettings\r\n );\r\n if (!variant.PrimaryImageUrl?.includes('http')) {\r\n variant.PrimaryImageUrl = fallbackImageUrl;\r\n }\r\n this.setState({ pdpSearchResultProduct: variant });\r\n void this.getNonClubPlusDiscountPrices();\r\n void this.getAllSimpleProducts();\r\n }\r\n });\r\n } else {\r\n this.setState({ pdpSearchResultProduct: searchByCriteriaItem });\r\n void this.getNonClubPlusDiscountPrices();\r\n void this.getAllSimpleProducts();\r\n }\r\n }\r\n })\r\n .catch(e => {});\r\n })\r\n .catch(ex => {});\r\n }\r\n }\r\n }\r\n public checkDifference = (array1: ProductSearchResult[], array2: ProductSearchResult[]) => {\r\n if (!array1 || !array2) {\r\n return true;\r\n }\r\n if (array1?.length !== array2?.length) {\r\n return true;\r\n }\r\n for (let i = 0; i < array1.length; i++) {\r\n if (array1[i].RecordId !== array2[i].RecordId) {\r\n return true;\r\n }\r\n }\r\n return false;\r\n };\r\n\r\n public componentDidUpdate(\r\n prevProps: Readonly>,\r\n prevState: Readonly,\r\n snapshot?: any\r\n ): void {\r\n if (this.checkDifference(prevState.products, this.state.products)) {\r\n if (this.state.products && this.props.config.isNotificationModal && this.props.config.isProductBundles) {\r\n this._getProductAvailabilityNotification()\r\n .then(res => {\r\n const cookies = this.props.context.actionContext.requestContext.cookies;\r\n const maxQData: IProductBundlesMaxAvailableQuantities[] = [];\r\n for (const sp of this.state.products) {\r\n const maxQ = this.getMaxAvailableQuantityForProduct(sp.RecordId);\r\n const maxQObj: IProductBundlesMaxAvailableQuantities = { productId: sp.RecordId, maxQuantity: maxQ };\r\n maxQData.push(maxQObj);\r\n }\r\n cookies.set('product_notification_maximum_available_quantities', maxQData);\r\n void this.getNonClubPlusDiscountPrices();\r\n void this.getAllSimpleProducts();\r\n })\r\n .catch(error => error);\r\n }\r\n }\r\n }\r\n private async getProductsListWithKitProductsHandled(products: ProductSearchResult[]): Promise {\r\n const kitProductIds = products.map(prod => {\r\n if (prod.IsMasterProduct) {\r\n return prod.RecordId;\r\n }\r\n return undefined;\r\n });\r\n if (kitProductIds && kitProductIds.length) {\r\n for (const kpId of kitProductIds) {\r\n if (kpId) {\r\n const variants = await getVariantsByDimensionValuesAsync(\r\n { callerContext: this.props.context.actionContext, queryResultSettings: {} },\r\n kpId,\r\n this.props.context.request.apiSettings.channelId,\r\n []\r\n );\r\n if (variants && variants.length) {\r\n products = products.filter(p => p.RecordId !== kpId);\r\n products.push(variants[0]);\r\n }\r\n }\r\n }\r\n }\r\n return products;\r\n }\r\n private async getAllSimpleProducts(): Promise {\r\n const cookies = this.props.context.actionContext.requestContext.cookies;\r\n let products = this.props.config.isNotificationModal\r\n ? this.state.products\r\n : this.props.config.productCollection && this.props.config.productCollection.products;\r\n products = await this.getProductsListWithKitProductsHandled(products);\r\n\r\n if (!this.props.config.isNotificationModal) {\r\n const productCollectionProducts = products.map(pros => ({ itemId: pros.RecordId }));\r\n cookies.set('productBundle_products', productCollectionProducts);\r\n }\r\n const productRecIds = ArrayExtensions.hasElements(products) ? products.map(prod => prod.RecordId) : [];\r\n const simpleProds = await getByIdsAsync(\r\n {\r\n callerContext: this.props.context.actionContext,\r\n queryResultSettings: QueryResultSettingsProxy.getPagingFromInputDataOrDefaultValue(this.props.context.actionContext)\r\n },\r\n this.props.context.request.apiSettings.channelId,\r\n productRecIds,\r\n null,\r\n this.props.context.request.apiSettings.catalogId ?? 0\r\n );\r\n this.setState({ simpleProductObjs: simpleProds });\r\n }\r\n\r\n private _getNotificationModalProducts(): IDobbiesMiniCartSummaryProduct[] {\r\n const addedToSummaryProducts: IDobbiesMiniCartSummaryProduct[] = [];\r\n const cookies = this.props.context.actionContext.requestContext.cookies;\r\n const addedProductsToCollection =\r\n cookies.get(this.props.config.isNotificationModal ? 'notification_added_products' : 'added_products_bundles')?.value || [];\r\n if (Array.isArray(addedProductsToCollection)) {\r\n for (const obj of addedProductsToCollection) {\r\n const product = this.state.simpleProductObjs?.find(prod => prod.RecordId === obj['productId']);\r\n if (product) {\r\n const miniCartProduct: IDobbiesMiniCartSummaryProduct = { ...product };\r\n miniCartProduct.quantity = obj['quantity'];\r\n addedToSummaryProducts.push(miniCartProduct);\r\n }\r\n }\r\n }\r\n return addedToSummaryProducts;\r\n }\r\n\r\n public render(): JSX.Element | null {\r\n const { heading, className } = this.props.config;\r\n const { resources } = this.props;\r\n const { products, inventoryInformation } = this.state;\r\n // Return if there are no products\r\n if (!products || products.length === 0 || inventoryInformation.length === 0) {\r\n return null;\r\n }\r\n const isCarousel = this.props.config.layout === layout.carousel;\r\n const headingComponent = heading && (\r\n \r\n );\r\n\r\n const productCollectionViewProps = {\r\n ...this.props,\r\n state: this.state,\r\n heading: headingComponent,\r\n SingleSlideCarouselComponentProps: {\r\n tag: SingleSlideCarousel,\r\n className: '',\r\n flipperPrevLabel: resources.flipperPrevious,\r\n flipperNextLabel: 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 product-bundles', className)\r\n },\r\n GridComponentProps: {\r\n tag: 'ul' as NodeTag,\r\n className: 'ms-product-collection__items'\r\n },\r\n isCarousel: isCarousel,\r\n products:\r\n products &&\r\n products.length > 0 &&\r\n products\r\n .filter(item => {\r\n // Check if product doesn't have inventory, dont dislay it\r\n const itemInventory = inventoryInformation.find(\r\n inventory => inventory.ProductAvailableQuantity.ProductId === item.RecordId\r\n );\r\n\r\n return itemInventory && itemInventory.IsProductAvailable === true;\r\n })\r\n .map((item: ProductSearchResult, index: number) => this._getProduct(item, index)),\r\n productPrices: this.productPrices,\r\n shouldShowAddAllProducts: this.props.config.isProductBundles,\r\n pdpProduct: this.props.config.isProductBundles && this.state.pdpProduct ? this.state.pdpProduct : undefined,\r\n pdpProductComponent:\r\n this.props.config.isProductBundles &&\r\n this.state.pdpSearchResultProduct &&\r\n this._getPDPProduct(this.state.pdpSearchResultProduct, this.state.pdpSearchResultProduct.RecordId),\r\n isBundlesModal: this.props.config.isBundlesModal,\r\n notificationModalProducts: this._getNotificationModalProducts()\r\n };\r\n return this.props.renderView(productCollectionViewProps) as React.ReactElement;\r\n }\r\n public handleHeadingChange = (event: Msdyn365.ContentEditableEvent) => (this.props.config.heading!.text = event.target.value);\r\n\r\n private updateAddedProductsList = () => {\r\n const cookies = this.props.context.actionContext.requestContext.cookies;\r\n const addedProductsToCollection =\r\n cookies.get(this.props.config.isNotificationModal ? 'notification_added_products' : 'added_products_bundles')?.value || [];\r\n const addedProductsIds: number[] = [];\r\n if (Array.isArray(addedProductsToCollection)) {\r\n for (const obj of addedProductsToCollection) {\r\n addedProductsIds.push(obj['productId']);\r\n }\r\n this.setState({ addedProductIdsToBundles: addedProductsIds });\r\n }\r\n if (\r\n this.props.config.isNotificationModal &&\r\n this.props.config.isProductBundles &&\r\n this.props.context.request.telemetryPageName !== 'DefaultPdp'\r\n ) {\r\n this.props.context.actionContext.update(new CartModulesStateShareInput(), { isCartUpdated: false });\r\n }\r\n };\r\n private getPDPProductMaxQ = () => {\r\n const cookies = this.props.context.actionContext.requestContext.cookies;\r\n return cookies.get('pdp_product_quantity_for_bundles').value;\r\n };\r\n private onBundleProductCheckBoxSelected = (productId: number) => {\r\n const cl = this.props.data.cart.result?.cart.CartLines?.find(c => c.ProductId === productId);\r\n const maxPDPQ = this.getPDPProductMaxQ();\r\n const maxPDPQNumber = maxPDPQ ? Number(maxPDPQ) : 0;\r\n if (productId === this.state.pdpSearchResultProduct?.RecordId && !(cl && cl.Quantity && cl.Quantity >= maxPDPQNumber)) {\r\n this._updateCookiesForAddedProducts(this.state.pdpSearchResultProduct);\r\n } else {\r\n const prods = this.state.products;\r\n const prod = prods.find(p => p.RecordId === productId);\r\n if (prod) {\r\n void this._addItemToCart(prod, prod.RecordId.toString());\r\n }\r\n }\r\n };\r\n private _getPDPProduct = (product: ProductSearchResult, index: number): React.ReactNode => {\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 { addToCartButtonText } = 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 resources = this.props.resources;\r\n // 9.33 SDK Update\r\n const quickviewSlot =\r\n this.props.slots && this.props.slots.quickview && this.props.slots.quickview.length > 0 ? this.props.slots.quickview[0] : null;\r\n const reviewCount = 1;\r\n const reviewTotalRatings = Number(product.TotalRatings);\r\n const reviewCountAriaLabelValue =\r\n reviewTotalRatings > reviewCount ? resources.ratingCountAriaLabel : resources.ratingCountAriaLabelSingleUser;\r\n const isPriceMinMaxEnabled = this.props.data.featureState.result?.find(\r\n featureState => featureState.Name === 'Dynamics.AX.Application.RetailSearchPriceRangeFeature'\r\n );\r\n console.log(reviewCountAriaLabelValue);\r\n // VSI - CUSTOMIZATION 04/02/2022 - To hide the Mode Of Delivery icons from modal for related products / delivery cart upsells\r\n const productWithModes: IProductWithModes = { ...product, isCnC: false, isHomeDelivery: false };\r\n let shouldNotShowAddToCartButton =\r\n this.props.config.isProductBundles && this.state.addedProductIdsToBundles.includes(product.RecordId);\r\n const maxAvailableQ = this.getPDPProductMaxQ(); //this.getMaxAvailableQuantityForProduct(productWithModes.RecordId);\r\n if (this.props.config.isProductBundles && this.props.config.isBundlesModal) {\r\n const cl = this.props.data.cart.result?.cart.CartLines?.find(c => c.ProductId === product.RecordId);\r\n if (cl) {\r\n shouldNotShowAddToCartButton = true;\r\n } else {\r\n shouldNotShowAddToCartButton = false;\r\n }\r\n }\r\n if (this.props.config.isProductBundles && this.props.config.isNotificationModal) {\r\n const cl = this.props.data.cart.result?.cart.CartLines?.find(c => c.ProductId === product.RecordId);\r\n if (cl) {\r\n shouldNotShowAddToCartButton = true;\r\n } else {\r\n shouldNotShowAddToCartButton = false;\r\n }\r\n }\r\n // VSI - CUSTOMIZATION - END\r\n return (\r\n
\r\n 0 ? this.state.discountLines[index] : []}\r\n nonClubPlusDiscount={this.state.nonClubPlusDiscount?.filter(item => item.ProductId === productWithModes.RecordId)[0]}\r\n simpleProduct={this.state.simpleProductObjs?.find(sp => sp.RecordId === productWithModes.RecordId)}\r\n />\r\n {shouldNotShowAddToCartButton ? (\r\n <>\r\n ) : (\r\n \r\n Add\r\n \r\n )}\r\n
\r\n );\r\n };\r\n\r\n private _getProduct = (product: ProductSearchResult, index: number): IProductComponentViewProps | null => {\r\n if (!product || !product.Name) {\r\n this.props.telemetry.trace('[product-collection] Product or product name is null');\r\n return null;\r\n }\r\n const telemetryContent = getTelemetryObject(\r\n this.props.context.request.telemetryPageName!,\r\n this.props.friendlyName,\r\n this.props.telemetry\r\n );\r\n const { imageSettings, allowBackNavigation } = this.props.config;\r\n const { addToCartButtonText } = this.props.resources;\r\n const breaCrumbType = this.props.context.app.config.breadcrumbType;\r\n\r\n const allowBack = allowBackNavigation && (breaCrumbType === 'back' || breaCrumbType === 'categoryAndBack');\r\n\r\n const resources = this.props.resources;\r\n // 9.33 SDK Update\r\n const quickviewSlot =\r\n this.props.slots && this.props.slots.quickview && this.props.slots.quickview.length > 0 ? this.props.slots.quickview[0] : null;\r\n const reviewCount = 1;\r\n const reviewTotalRatings = Number(product.TotalRatings);\r\n const reviewCountAriaLabelValue =\r\n reviewTotalRatings > reviewCount ? resources.ratingCountAriaLabel : resources.ratingCountAriaLabelSingleUser;\r\n const isPriceMinMaxEnabled = this.props.data.featureState.result?.find(\r\n featureState => featureState.Name === 'Dynamics.AX.Application.RetailSearchPriceRangeFeature'\r\n );\r\n\r\n console.log(reviewCountAriaLabelValue);\r\n // VSI - CUSTOMIZATION 04/02/2022 - To hide the Mode Of Delivery icons from modal for related products / delivery cart upsells\r\n const productWithModes: IProductWithModes = { ...product, isCnC: false, isHomeDelivery: false };\r\n let shouldNotShowAddToCartButton =\r\n this.props.config.isProductBundles && this.state.addedProductIdsToBundles.includes(product.RecordId);\r\n if (this.props.config.isProductBundles && this.props.config.isBundlesModal) {\r\n const cl = this.props.data.cart.result?.cart.CartLines?.find(c => c.ProductId === product.RecordId);\r\n if (cl) {\r\n shouldNotShowAddToCartButton = true;\r\n } else {\r\n shouldNotShowAddToCartButton = false;\r\n }\r\n }\r\n if (this.props.config.isProductBundles && this.props.config.isNotificationModal) {\r\n const cl = this.props.data.cart.result?.cart.CartLines?.find(c => c.ProductId === product.RecordId);\r\n if (cl) {\r\n shouldNotShowAddToCartButton = true;\r\n } else {\r\n shouldNotShowAddToCartButton = false;\r\n }\r\n }\r\n // VSI - CUSTOMIZATION - END\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 0 ? this.state.discountLines[index] : []}\r\n nonClubPlusDiscount={this.state.nonClubPlusDiscount?.filter(item => item.ProductId === productWithModes.RecordId)[0]}\r\n simpleProduct={this.state.simpleProductObjs?.find(sp => sp.RecordId === productWithModes.RecordId)}\r\n />\r\n ),\r\n addToCartButton: shouldNotShowAddToCartButton ? (\r\n <>\r\n ) : (\r\n \r\n Add\r\n \r\n )\r\n };\r\n };\r\n\r\n private onQuantityChangeListener = (productId: number, newQuantity: number): void => {\r\n const currQuantityData = this.state.currQuantities;\r\n let productFound = false;\r\n for (const qd of currQuantityData) {\r\n if (qd[0] === productId) {\r\n qd[1] = newQuantity;\r\n productFound = true;\r\n }\r\n }\r\n if (!productFound) {\r\n currQuantityData.push([productId, newQuantity]);\r\n }\r\n this.setState({ currQuantities: currQuantityData });\r\n if (this.props.config.isNotificationModal && this.props.config.isProductBundles) {\r\n this.props.context.actionContext.update(new CartModulesStateShareInput(), { isCartUpdated: false });\r\n }\r\n };\r\n\r\n private _getProductAvailabilityNotification = async (): Promise => {\r\n const { products } = this.state;\r\n const {\r\n context: { actionContext }\r\n } = this.props;\r\n\r\n if (!products) {\r\n return;\r\n }\r\n\r\n const validProducts: number[] = [];\r\n\r\n for (const product of products) {\r\n if (product.RecordId) {\r\n validProducts.push(product.RecordId);\r\n }\r\n }\r\n\r\n if (validProducts.length === 0) {\r\n return;\r\n }\r\n\r\n const callerContext = actionContext;\r\n const {\r\n requestContext: {\r\n apiSettings: { channelId, catalogId }\r\n }\r\n } = actionContext;\r\n const searchCriteriaInput: ProductSearchCriteria = {};\r\n searchCriteriaInput.Context = { ChannelId: channelId, CatalogId: catalogId };\r\n searchCriteriaInput.Ids = validProducts;\r\n searchCriteriaInput.IncludeAttributes = true;\r\n const productData = await searchByCriteriaAsync({ callerContext, queryResultSettings: {} }, searchCriteriaInput);\r\n\r\n this.setState({\r\n allProducts: productData\r\n });\r\n const attributeName = 'fulfillmenttype';\r\n const attributeTextValue = 'plants';\r\n\r\n const plantProducts: ProductSearchResult[] = [];\r\n const nonPlantProducts: ProductSearchResult[] = [];\r\n\r\n this.state.allProducts &&\r\n this.state.allProducts.map(product => {\r\n const fulfillmentTypeAttribute =\r\n product.AttributeValues &&\r\n product.AttributeValues.find(attribute => {\r\n return attribute?.Name?.toLowerCase() === attributeName;\r\n });\r\n const isPlantFulfillment =\r\n fulfillmentTypeAttribute && fulfillmentTypeAttribute.TextValue?.toLowerCase() === attributeTextValue;\r\n const isPlantCategory = isPlantFulfillment ? true : false;\r\n\r\n if (isPlantCategory) {\r\n plantProducts.push(product);\r\n } else {\r\n nonPlantProducts.push(product);\r\n }\r\n });\r\n\r\n const prodIds = this.state.allProducts && this.state.allProducts.map(prod => prod.RecordId);\r\n if (prodIds && prodIds.length <= 0) {\r\n return;\r\n }\r\n\r\n const productAvailabilitesPlants = await getEstimatedAvailabilityAsync(\r\n { callerContext: actionContext },\r\n { ProductIds: prodIds, DefaultWarehouseOnly: false, FilterByChannelFulfillmentGroup: true }\r\n );\r\n\r\n const deliveryOptions = await getDeliveryOptionsAsync(\r\n { callerContext: actionContext, queryResultSettings: {} },\r\n prodIds ? prodIds : []\r\n );\r\n const productsWithPlantsDelivery: IProductWithModes[] = await Promise.all(\r\n plantProducts.map(async (prod, idx) => {\r\n let isCnC = false;\r\n let isHomeDelivery = false;\r\n\r\n if (productAvailabilitesPlants && productAvailabilitesPlants.ProductWarehouseInventoryAvailabilities) {\r\n productAvailabilitesPlants.ProductWarehouseInventoryAvailabilities?.map(\r\n (item: ProductWarehouseInventoryAvailability) => {\r\n if (item.InventLocationId === 'P001' || item.InventLocationId === 'S059') {\r\n if (item.PhysicalAvailableInventoryLevelCode !== 'OOS') {\r\n isHomeDelivery = true;\r\n }\r\n } else {\r\n if (item.PhysicalAvailableInventoryLevelCode !== 'OOS') {\r\n deliveryOptions[idx].DeliveryOptions?.map(option => {\r\n if (option.Code === 'ClickCol') {\r\n isCnC = true;\r\n }\r\n });\r\n }\r\n }\r\n }\r\n );\r\n }\r\n\r\n // If product has vendorship === \"yes\" then show it as available\r\n const isVendorShipAttribute = prod.AttributeValues?.find(attribute => {\r\n const attributeName = attribute.Name && attribute.Name.trim().toLowerCase();\r\n return attributeName === 'isvendershipproduct';\r\n });\r\n\r\n if (isVendorShipAttribute && isVendorShipAttribute.TextValue && isVendorShipAttribute.TextValue.toLowerCase() === 'yes') {\r\n isHomeDelivery = true;\r\n isCnC = false;\r\n }\r\n\r\n return { ...prod, isHomeDelivery, isCnC };\r\n })\r\n );\r\n\r\n // Not Plants API since the warehouse storage is different\r\n const productAvailabilitesNonPlantsHD = await getEstimatedAvailabilityAsync(\r\n { callerContext: actionContext },\r\n { ProductIds: prodIds, DefaultWarehouseOnly: true, FilterByChannelFulfillmentGroup: false }\r\n );\r\n const productAvailabilitesNonPlantsCNC = await getEstimatedAvailabilityAsync(\r\n { callerContext: actionContext },\r\n { ProductIds: prodIds, DefaultWarehouseOnly: false, FilterByChannelFulfillmentGroup: true }\r\n );\r\n\r\n const productsWithNonPlantsDelivery: IProductWithModes[] = await Promise.all(\r\n nonPlantProducts.map(async (prod, idx) => {\r\n let isCnC = false;\r\n let isHomeDelivery = false;\r\n\r\n if (productAvailabilitesNonPlantsHD && productAvailabilitesNonPlantsHD.AggregatedProductInventoryAvailabilities) {\r\n productAvailabilitesNonPlantsHD.AggregatedProductInventoryAvailabilities.map(stores => {\r\n if (stores.ProductId === prod.RecordId && stores.PhysicalAvailableInventoryLevelCode !== 'OOS') {\r\n isHomeDelivery = true;\r\n }\r\n });\r\n }\r\n\r\n if (productAvailabilitesNonPlantsCNC && productAvailabilitesNonPlantsCNC.AggregatedProductInventoryAvailabilities) {\r\n productAvailabilitesNonPlantsCNC.AggregatedProductInventoryAvailabilities.map(stores => {\r\n if (stores.ProductId === prod.RecordId && stores.PhysicalAvailableInventoryLevelCode !== 'OOS') {\r\n deliveryOptions[idx].DeliveryOptions?.map(option => {\r\n if (option.Code === 'ClickCol') {\r\n isCnC = true;\r\n }\r\n });\r\n }\r\n });\r\n }\r\n\r\n // If product has vendorship === \"yes\" then show it as available\r\n const isVendorShipAttribute = prod.AttributeValues?.find(attribute => {\r\n const attributeName = attribute.Name && attribute.Name.trim().toLowerCase();\r\n return attributeName === 'isvendershipproduct';\r\n });\r\n\r\n if (isVendorShipAttribute && isVendorShipAttribute.TextValue && isVendorShipAttribute.TextValue.toLowerCase() === 'yes') {\r\n isHomeDelivery = true;\r\n isCnC = false;\r\n }\r\n\r\n return { ...prod, isHomeDelivery, isCnC };\r\n })\r\n );\r\n\r\n const totalProducts = [...productsWithPlantsDelivery, ...productsWithNonPlantsDelivery];\r\n\r\n const allProducts: any = [];\r\n products.map(prod => {\r\n totalProducts.find(item => {\r\n if (item.RecordId === prod.RecordId) {\r\n allProducts.push(item);\r\n }\r\n });\r\n });\r\n\r\n if (plantProducts.length > 0) {\r\n const inventoryInformation = mapProductInventoryInformation(\r\n actionContext,\r\n productAvailabilitesPlants?.ProductWarehouseInventoryAvailabilities ?? []\r\n );\r\n this.setState({ inventoryInformation: inventoryInformation, productCount: plantProducts.length });\r\n\r\n // Check if product shared state is not set, set it\r\n if (!this.state.isSharedStateSet) {\r\n this.props.context.actionContext.update(new GetPlantPotsProductCountInput(), {\r\n potsProductCount: plantProducts.length\r\n });\r\n this.setState({ isSharedStateSet: true });\r\n }\r\n } else if (nonPlantProducts.length > 0) {\r\n const inventoryInformation = mapProductInventoryInformation(\r\n actionContext,\r\n productAvailabilitesNonPlantsHD?.ProductWarehouseInventoryAvailabilities ?? []\r\n );\r\n this.setState({\r\n inventoryInformation: inventoryInformation,\r\n productCount: nonPlantProducts.length\r\n });\r\n // Check if product shared state is not set, set it\r\n if (!this.state.isSharedStateSet) {\r\n this.props.context.actionContext.update(new GetPlantPotsProductCountInput(), {\r\n potsProductCount: nonPlantProducts.length\r\n });\r\n this.setState({ isSharedStateSet: true });\r\n }\r\n }\r\n };\r\n\r\n /* VSI Customization - START - 13/04/21 */\r\n private _getProductAvailability = async (): Promise => {\r\n const { products } = this.state;\r\n const {\r\n context: { actionContext }\r\n } = this.props;\r\n\r\n if (!products) {\r\n return;\r\n }\r\n\r\n const validProducts: number[] = [];\r\n\r\n for (const product of products) {\r\n if (product.RecordId) {\r\n validProducts.push(product.RecordId);\r\n }\r\n }\r\n\r\n if (validProducts.length === 0) {\r\n return;\r\n }\r\n\r\n const callerContext = actionContext;\r\n const {\r\n requestContext: {\r\n apiSettings: { channelId, catalogId }\r\n }\r\n } = actionContext;\r\n const searchCriteriaInput: ProductSearchCriteria = {};\r\n searchCriteriaInput.Context = { ChannelId: channelId, CatalogId: catalogId };\r\n searchCriteriaInput.Ids = validProducts;\r\n searchCriteriaInput.IncludeAttributes = true;\r\n const productData = await searchByCriteriaAsync({ callerContext, queryResultSettings: {} }, searchCriteriaInput);\r\n\r\n this.setState({\r\n allProducts: productData\r\n });\r\n const attributeName = 'fulfillmenttype';\r\n const attributeTextValue = 'plants';\r\n\r\n const plantProducts: ProductSearchResult[] = [];\r\n const nonPlantProducts: ProductSearchResult[] = [];\r\n\r\n this.state.allProducts &&\r\n this.state.allProducts.map(product => {\r\n const fulfillmentTypeAttribute =\r\n product.AttributeValues &&\r\n product.AttributeValues.find(attribute => {\r\n return attribute?.Name?.toLowerCase() === attributeName;\r\n });\r\n const isPlantFulfillment =\r\n fulfillmentTypeAttribute && fulfillmentTypeAttribute.TextValue?.toLowerCase() === attributeTextValue;\r\n const isPlantCategory = isPlantFulfillment ? true : false;\r\n\r\n if (isPlantCategory) {\r\n plantProducts.push(product);\r\n } else {\r\n nonPlantProducts.push(product);\r\n }\r\n });\r\n\r\n const prodIds = this.state.allProducts && this.state.allProducts.map(prod => prod.RecordId);\r\n if (prodIds && prodIds.length <= 0) {\r\n return;\r\n }\r\n\r\n const productAvailabilitesPlants = await getEstimatedAvailabilityAsync(\r\n { callerContext: actionContext },\r\n { ProductIds: prodIds, DefaultWarehouseOnly: false, FilterByChannelFulfillmentGroup: true }\r\n );\r\n\r\n const deliveryOptions = await getDeliveryOptionsAsync(\r\n { callerContext: actionContext, queryResultSettings: {} },\r\n prodIds ? prodIds : []\r\n );\r\n const productsWithPlantsDelivery: IProductWithModes[] = await Promise.all(\r\n plantProducts.map(async (prod, idx) => {\r\n let isCnC = false;\r\n let isHomeDelivery = false;\r\n\r\n if (productAvailabilitesPlants && productAvailabilitesPlants.ProductWarehouseInventoryAvailabilities) {\r\n productAvailabilitesPlants.ProductWarehouseInventoryAvailabilities?.map(\r\n (item: ProductWarehouseInventoryAvailability) => {\r\n if (item.InventLocationId === 'P001' || item.InventLocationId === 'S059') {\r\n if (item.PhysicalAvailableInventoryLevelCode !== 'OOS') {\r\n isHomeDelivery = true;\r\n }\r\n } else {\r\n if (item.PhysicalAvailableInventoryLevelCode !== 'OOS') {\r\n deliveryOptions[idx].DeliveryOptions?.map(option => {\r\n if (option.Code === 'ClickCol') {\r\n isCnC = true;\r\n }\r\n });\r\n }\r\n }\r\n }\r\n );\r\n }\r\n\r\n // If product has vendorship === \"yes\" then show it as available\r\n const isVendorShipAttribute = prod.AttributeValues?.find(attribute => {\r\n const attributeName = attribute.Name && attribute.Name.trim().toLowerCase();\r\n return attributeName === 'isvendershipproduct';\r\n });\r\n\r\n if (isVendorShipAttribute && isVendorShipAttribute.TextValue && isVendorShipAttribute.TextValue.toLowerCase() === 'yes') {\r\n isHomeDelivery = true;\r\n isCnC = false;\r\n }\r\n\r\n return { ...prod, isHomeDelivery, isCnC };\r\n })\r\n );\r\n\r\n // Not Plants API since the warehouse storage is different\r\n const productAvailabilitesNonPlantsHD = await getEstimatedAvailabilityAsync(\r\n { callerContext: actionContext },\r\n { ProductIds: prodIds, DefaultWarehouseOnly: true, FilterByChannelFulfillmentGroup: false }\r\n );\r\n const productAvailabilitesNonPlantsCNC = await getEstimatedAvailabilityAsync(\r\n { callerContext: actionContext },\r\n { ProductIds: prodIds, DefaultWarehouseOnly: false, FilterByChannelFulfillmentGroup: true }\r\n );\r\n\r\n const productsWithNonPlantsDelivery: IProductWithModes[] = await Promise.all(\r\n nonPlantProducts.map(async (prod, idx) => {\r\n let isCnC = false;\r\n let isHomeDelivery = false;\r\n\r\n if (productAvailabilitesNonPlantsHD && productAvailabilitesNonPlantsHD.AggregatedProductInventoryAvailabilities) {\r\n productAvailabilitesNonPlantsHD.AggregatedProductInventoryAvailabilities.map(stores => {\r\n if (stores.ProductId === prod.RecordId && stores.PhysicalAvailableInventoryLevelCode !== 'OOS') {\r\n isHomeDelivery = true;\r\n }\r\n });\r\n }\r\n\r\n if (productAvailabilitesNonPlantsCNC && productAvailabilitesNonPlantsCNC.AggregatedProductInventoryAvailabilities) {\r\n productAvailabilitesNonPlantsCNC.AggregatedProductInventoryAvailabilities.map(stores => {\r\n if (stores.ProductId === prod.RecordId && stores.PhysicalAvailableInventoryLevelCode !== 'OOS') {\r\n deliveryOptions[idx].DeliveryOptions?.map(option => {\r\n if (option.Code === 'ClickCol') {\r\n isCnC = true;\r\n }\r\n });\r\n }\r\n });\r\n }\r\n\r\n // If product has vendorship === \"yes\" then show it as available\r\n const isVendorShipAttribute = prod.AttributeValues?.find(attribute => {\r\n const attributeName = attribute.Name && attribute.Name.trim().toLowerCase();\r\n return attributeName === 'isvendershipproduct';\r\n });\r\n\r\n if (isVendorShipAttribute && isVendorShipAttribute.TextValue && isVendorShipAttribute.TextValue.toLowerCase() === 'yes') {\r\n isHomeDelivery = true;\r\n isCnC = false;\r\n }\r\n\r\n return { ...prod, isHomeDelivery, isCnC };\r\n })\r\n );\r\n\r\n const totalProducts = [...productsWithPlantsDelivery, ...productsWithNonPlantsDelivery];\r\n\r\n const allProducts: any = [];\r\n products.map(prod => {\r\n totalProducts.find(item => {\r\n if (item.RecordId === prod.RecordId) {\r\n allProducts.push(item);\r\n }\r\n });\r\n });\r\n\r\n if (plantProducts.length > 0) {\r\n const inventoryInformation = mapProductInventoryInformation(\r\n actionContext,\r\n productAvailabilitesPlants?.ProductWarehouseInventoryAvailabilities ?? []\r\n );\r\n this.setState({ inventoryInformation: inventoryInformation, productCount: plantProducts.length });\r\n\r\n // Check if product shared state is not set, set it\r\n if (!this.state.isSharedStateSet) {\r\n this.props.context.actionContext.update(new GetPlantPotsProductCountInput(), {\r\n potsProductCount: plantProducts.length\r\n });\r\n this.setState({ isSharedStateSet: true });\r\n }\r\n } else if (nonPlantProducts.length > 0) {\r\n const inventoryInformation = mapProductInventoryInformation(\r\n actionContext,\r\n productAvailabilitesNonPlantsHD?.ProductWarehouseInventoryAvailabilities ?? []\r\n );\r\n this.setState({\r\n inventoryInformation: inventoryInformation,\r\n productCount: nonPlantProducts.length\r\n });\r\n // Check if product shared state is not set, set it\r\n if (!this.state.isSharedStateSet) {\r\n this.props.context.actionContext.update(new GetPlantPotsProductCountInput(), {\r\n potsProductCount: nonPlantProducts.length\r\n });\r\n this.setState({ isSharedStateSet: true });\r\n }\r\n }\r\n };\r\n // Following function adds product to cart\r\n private _getAddToCart = (product: ProductSearchResult, itemKey: string) => () => {\r\n this._addItemToCart(product, itemKey).catch(error => `[addItemToCart] unable to add to cart`);\r\n };\r\n\r\n private getOrderQuantityLimitsFeatureFlag(): boolean {\r\n const defaultOrderQuantityLimitsFeatureConfig = this.props.context?.request?.app?.platform?.enableDefaultOrderQuantityLimits;\r\n if (defaultOrderQuantityLimitsFeatureConfig === 'none') {\r\n return false;\r\n }\r\n\r\n try {\r\n const featureStatuses = this.props.data.featureState.result;\r\n const isQuantityLimitsFeatureEnabledInHq =\r\n featureStatuses?.find(\r\n featureState => featureState.Name === 'Dynamics.AX.Application.RetailDefaultOrderQuantityLimitsFeature'\r\n )?.IsEnabled || false;\r\n if (!isQuantityLimitsFeatureEnabledInHq) {\r\n return false;\r\n }\r\n } catch (error) {\r\n this.props.telemetry.warning(error as string);\r\n this.props.telemetry.debug('Unable to get feature states');\r\n return false;\r\n }\r\n\r\n if (defaultOrderQuantityLimitsFeatureConfig === 'all') {\r\n return true;\r\n }\r\n try {\r\n const customerInfo = this.props.data.customerInformation.result;\r\n return (\r\n !!customerInfo &&\r\n ((defaultOrderQuantityLimitsFeatureConfig === 'b2b' && customerInfo.IsB2b) ||\r\n (defaultOrderQuantityLimitsFeatureConfig === 'b2c' && !customerInfo.IsB2b))\r\n );\r\n } catch (error) {\r\n this.props.telemetry.warning(error as string);\r\n this.props.telemetry.debug('Unable to get customer info');\r\n return false;\r\n }\r\n }\r\n\r\n private _updateCookiesForAddedProducts = (product: ProductSearchResult) => {\r\n const cookies = this.props.context.actionContext.requestContext.cookies;\r\n const addedProducts: IDobbiesAddedProductToBundle[] = [];\r\n const addedProductsToCollection =\r\n cookies.get(this.props.config.isNotificationModal ? 'notification_added_products' : 'added_products_bundles')?.value || [];\r\n const maxPDPQuantity = this.getPDPProductMaxQ();\r\n const maxPDPQNumber = maxPDPQuantity ? Number(maxPDPQuantity) : 0;\r\n if (Array.isArray(addedProductsToCollection)) {\r\n for (const obj of addedProductsToCollection) {\r\n addedProducts.push({\r\n productId: obj['productId'],\r\n quantity: obj['quantity'],\r\n price: obj['price'],\r\n maxQuantity: obj['maxQuantity']\r\n });\r\n }\r\n }\r\n let productAddedAlready = false;\r\n for (const ap of addedProducts) {\r\n if (ap.productId === product.RecordId) {\r\n ap.quantity = ap.quantity ? ap.quantity + 1 : 1;\r\n productAddedAlready = true;\r\n }\r\n }\r\n if (!productAddedAlready) {\r\n const prodQD = this.state.currQuantities.find(qd => qd[0] === product.RecordId);\r\n if (prodQD) {\r\n const quantityToBeAdded = prodQD[1];\r\n addedProducts.push({\r\n productId: product.RecordId,\r\n quantity: quantityToBeAdded,\r\n price: product.Price ? product.Price : product.BasePrice,\r\n maxQuantity:\r\n product.RecordId === this.state.pdpSearchResultProduct?.RecordId\r\n ? maxPDPQNumber\r\n : this.getMaxAvailableQuantityForProduct(product.RecordId)\r\n });\r\n } else {\r\n addedProducts.push({\r\n productId: product.RecordId,\r\n quantity: 1,\r\n price: product.Price ? product.Price : product.BasePrice,\r\n maxQuantity:\r\n product.RecordId === this.state.pdpSearchResultProduct?.RecordId\r\n ? maxPDPQNumber\r\n : this.getMaxAvailableQuantityForProduct(product.RecordId)\r\n });\r\n }\r\n }\r\n\r\n const cookieName = this.props.config.isNotificationModal ? 'notification_added_products' : 'added_products_bundles';\r\n cookies.set(cookieName, addedProducts);\r\n this.props.context.actionContext.update(new CartModulesStateShareInput(), { isCartUpdated: true });\r\n if (this.props.config.isNotificationModal) {\r\n this.updateAddedProductsList();\r\n this.props.context.actionContext.update(new CartModulesStateShareInput(), { isCartUpdated: false });\r\n }\r\n };\r\n private getMaxAvailableQuantityForProduct = (productId: number): number => {\r\n let quantity = 0;\r\n const inventoryInformation = this.state.inventoryInformation;\r\n const productInvInfo =\r\n inventoryInformation && inventoryInformation.find(inventory => inventory.ProductAvailableQuantity.ProductId === productId);\r\n quantity =\r\n productInvInfo && productInvInfo.ProductAvailableQuantity.AvailableQuantity\r\n ? productInvInfo.ProductAvailableQuantity.AvailableQuantity\r\n : 0;\r\n const product = this.state.simpleProductObjs?.find(prod => prod.RecordId === productId);\r\n quantity = _getCartItemMaxQuantity(\r\n this.props.context.app.config.maxQuantityForCartLineItem,\r\n this.props.context.app.config.enableStockCheck || false,\r\n quantity,\r\n this.getOrderQuantityLimitsFeatureFlag(),\r\n product?.Behavior?.MaximumQuantity || 0\r\n );\r\n return quantity;\r\n };\r\n\r\n private _addItemToCart = async (product: ProductSearchResult, itemKey: string): Promise => {\r\n const { context, data, resources, telemetry } = this.props;\r\n const { cart, featureState } = data;\r\n const { addedToCartSuccessMessage, addedToCartFailureMessage } = resources;\r\n const { inventoryInformation } = this.state;\r\n const productInventoryInformation =\r\n inventoryInformation &&\r\n inventoryInformation.find(inventory => inventory.ProductAvailableQuantity.ProductId === product.RecordId);\r\n const navigationUrl = Msdyn365.getUrlSync('cart', context.actionContext);\r\n if (this.props.config.isProductBundles && !this.props.config.isBundlesModal && !this.props.config.isNotificationModal) {\r\n this._updateCookiesForAddedProducts(product);\r\n return;\r\n }\r\n if (this.props.config.isProductBundles && this.props.config.isBundlesModal) {\r\n const productList = new Array();\r\n const p = await this._convertToSimpleProduct(product);\r\n const prodQD = this.state.currQuantities.find(qd => qd[0] === product.RecordId);\r\n let quantityToBeAdded = 1;\r\n if (prodQD) {\r\n quantityToBeAdded = prodQD[1];\r\n const cl = this.props.data.cart.result?.cart.CartLines?.find(c => c.ProductId === product.RecordId);\r\n if (cl && cl.Quantity && cl.Quantity < quantityToBeAdded) {\r\n quantityToBeAdded = quantityToBeAdded - cl.Quantity;\r\n }\r\n }\r\n productList.push({\r\n product: p,\r\n count: quantityToBeAdded,\r\n enableStockCheck: this.props.context.app.config.enableStockCheck\r\n });\r\n cart.result\r\n ?.addProductsToCart(productList)\r\n .then(result => {\r\n if (result.status === 'SUCCESS') {\r\n this.setState({\r\n productId: product.RecordId,\r\n itemKey: itemKey,\r\n userMessage: addedToCartSuccessMessage,\r\n statusCssString: 'success',\r\n messageGlyph: 'fas fa-check',\r\n isOpen: true\r\n });\r\n if (this.props.config.isProductBundles && this.props.config.isBundlesModal) {\r\n this.props.context.actionContext.update(new CartModulesStateShareInput(), { isCartUpdated: true });\r\n }\r\n }\r\n })\r\n .catch(e => {});\r\n return;\r\n }\r\n if (this.props.config.isProductBundles && this.props.config.isNotificationModal) {\r\n const productList = new Array();\r\n const p = await this._convertToSimpleProduct(product);\r\n const prodQD = this.state.currQuantities.find(qd => qd[0] === product.RecordId);\r\n let quantityToBeAdded = 1;\r\n if (prodQD) {\r\n quantityToBeAdded = prodQD[1];\r\n const cl = this.props.data.cart.result?.cart.CartLines?.find(c => c.ProductId === product.RecordId);\r\n if (cl && cl.Quantity && cl.Quantity < quantityToBeAdded) {\r\n quantityToBeAdded = quantityToBeAdded - cl.Quantity;\r\n }\r\n }\r\n productList.push({\r\n product: p,\r\n count: quantityToBeAdded,\r\n enableStockCheck: this.props.context.app.config.enableStockCheck\r\n });\r\n cart.result\r\n ?.addProductsToCart(productList)\r\n .then(result => {\r\n if (result.status === 'SUCCESS') {\r\n this.setState({\r\n productId: product.RecordId,\r\n itemKey: itemKey,\r\n userMessage: addedToCartSuccessMessage,\r\n statusCssString: 'success',\r\n messageGlyph: 'fas fa-check',\r\n isOpen: true\r\n });\r\n if (this.props.config.isProductBundles && this.props.config.isBundlesModal) {\r\n this.props.context.actionContext.update(new CartModulesStateShareInput(), { isCartUpdated: true });\r\n }\r\n if (this.props.config.isProductBundles && this.props.config.isNotificationModal) {\r\n this.props.context.actionContext.update(new CartModulesStateShareInput(), { isCartUpdated: true });\r\n }\r\n }\r\n })\r\n .catch(e => {});\r\n return;\r\n }\r\n if (context) {\r\n if (cart.result) {\r\n const isOrderQuantityLimitsFeatureEnabledInHq =\r\n featureState.result?.find(\r\n featuresState => featuresState.Name === 'Dynamics.AX.Application.RetailDefaultOrderQuantityLimitsFeature'\r\n )?.IsEnabled || false;\r\n const defaultOrderQuantityLimitsFeatureConfig = this.props.context?.request?.app?.platform\r\n ?.enableDefaultOrderQuantityLimits;\r\n\r\n const isOrderQuantityLimitsFeatureEnabledInSiteSettings = defaultOrderQuantityLimitsFeatureConfig === 'all';\r\n\r\n const isOrderQuantityLimitsFeatureEnabled =\r\n isOrderQuantityLimitsFeatureEnabledInHq && isOrderQuantityLimitsFeatureEnabledInSiteSettings;\r\n // check if the product delivery mode is electronic\r\n const emailDeliveryModeCode = this.props.context.actionContext.requestContext.channel?.EmailDeliveryModeCode;\r\n const deliveryOptions = await getDeliveryOptionsAsync(\r\n { callerContext: this.props.context.actionContext, queryResultSettings: {} },\r\n [product.RecordId]\r\n );\r\n\r\n const simpleProduct = await this._convertToSimpleProduct(product);\r\n\r\n const addProductToCartInput = {\r\n product: simpleProduct,\r\n quantity: 1,\r\n enableStockCheck: context.app.config.enableStockCheck,\r\n availableQuantity: productInventoryInformation\r\n ? productInventoryInformation.ProductAvailableQuantity.AvailableQuantity\r\n : 0,\r\n additionalProperties: { orderQuantityLimitsFeatureIsEnabled: isOrderQuantityLimitsFeatureEnabled },\r\n isAddEmailDeliveryItemToCart:\r\n ArrayExtensions.hasElements(deliveryOptions) &&\r\n ArrayExtensions.hasElements(deliveryOptions[0].DeliveryOptions) &&\r\n deliveryOptions[0].DeliveryOptions[0].Code === emailDeliveryModeCode\r\n };\r\n cart.result\r\n .addProductToCart(addProductToCartInput)\r\n .then(async result => {\r\n if (result.status === 'SUCCESS') {\r\n this.setState({\r\n productId: product.RecordId,\r\n itemKey: itemKey,\r\n userMessage: addedToCartSuccessMessage,\r\n statusCssString: 'success',\r\n messageGlyph: 'fas fa-check',\r\n isOpen: true\r\n });\r\n if (this.props.config.isProductBundles && this.props.config.isBundlesModal) {\r\n this.props.context.actionContext.update(new CartModulesStateShareInput(), { isCartUpdated: true });\r\n }\r\n if (this.props.config.isProductBundles && this.props.config.isNotificationModal) {\r\n this.props.context.actionContext.update(new CartModulesStateShareInput(), { isCartUpdated: true });\r\n }\r\n !this.props.config.isProductBundles &&\r\n !this.props.config.isBundlesModal &&\r\n navigationUrl &&\r\n window &&\r\n window.location.assign(navigationUrl);\r\n } else if (result.substatus === 'MAXQUANTITY') {\r\n const curQuantity =\r\n (await cart).cart?.CartLines?.find(item => item.ProductId === product.RecordId)?.Quantity || 0;\r\n const maxQtyLimitReachedMessage = this._getInventoryValueMessage(productInventoryInformation, curQuantity);\r\n this.setState({\r\n productId: product.RecordId,\r\n itemKey: itemKey,\r\n userMessage: maxQtyLimitReachedMessage,\r\n statusCssString: 'danger',\r\n messageGlyph: 'fas fa-exclamation-triangle',\r\n isOpen: true\r\n });\r\n } else if (result.substatus === 'QUANTITYLIMITS' && isOrderQuantityLimitsFeatureEnabled) {\r\n const maxQtyLimitReachedMessage = result.errorDetails?.LocalizedMessage;\r\n this.setState({\r\n productId: product.RecordId,\r\n itemKey: itemKey,\r\n userMessage: maxQtyLimitReachedMessage || addedToCartFailureMessage,\r\n statusCssString: 'danger',\r\n messageGlyph: 'fas fa-exclamation-triangle',\r\n isOpen: true\r\n });\r\n } else {\r\n this.props.telemetry.debug('[wishlist-items] Unable to Update Cart Line from Pots Collection');\r\n this.setState({\r\n productId: product.RecordId,\r\n itemKey: itemKey,\r\n userMessage: addedToCartFailureMessage,\r\n statusCssString: 'danger',\r\n messageGlyph: 'fas fa-exclamation-triangle',\r\n isOpen: true\r\n });\r\n }\r\n })\r\n .catch(error => {\r\n telemetry.warning(error);\r\n telemetry.debug('[wishlist-items] Error trying to Update Cart Line from Pots Collection');\r\n this.setState({\r\n productId: product.RecordId,\r\n itemKey: itemKey,\r\n userMessage: addedToCartFailureMessage,\r\n statusCssString: 'danger',\r\n messageGlyph: 'fas fa-exclamation-triangle',\r\n isOpen: true\r\n });\r\n });\r\n }\r\n }\r\n };\r\n\r\n private readonly getNonClubPlusDiscountPrices = async (): Promise => {\r\n const products = this.state.products || [];\r\n if (this.props.config.isProductBundles && this.state.pdpSearchResultProduct) {\r\n products.push(this.state.pdpSearchResultProduct);\r\n }\r\n const productRecIds = ArrayExtensions.hasElements(products) ? products.map(prod => prod.RecordId) : [];\r\n const projectDomain: ProjectionDomain = {\r\n ChannelId: this.props.context.request.apiSettings.channelId,\r\n CatalogId: this.props.context.request.apiSettings.catalogId\r\n };\r\n await getActivePricesAsync(\r\n {\r\n callerContext: this.props.context.actionContext,\r\n queryResultSettings: {}\r\n },\r\n projectDomain,\r\n productRecIds,\r\n new Date(),\r\n null,\r\n null,\r\n true\r\n )\r\n .then(async (activePricesResponse: ProductPrice[]) => {\r\n if (activePricesResponse && activePricesResponse.length > 0) {\r\n this.setState({\r\n nonClubPlusDiscount: activePricesResponse\r\n });\r\n const productsListWithKitScenarioHandled = await this.getProductsListWithKitProductsHandled(\r\n this.state.products ? this.state.products : []\r\n );\r\n const updatedProducts = productsListWithKitScenarioHandled.map(prod => {\r\n const activePrice = activePricesResponse.find(price => price.ProductId === prod.RecordId);\r\n if (activePrice) {\r\n prod.Price = activePrice.CustomerContextualPrice ?? prod.Price;\r\n prod.BasePrice = Math.max(\r\n activePrice.BasePrice || 0,\r\n activePrice.TradeAgreementPrice || 0,\r\n activePrice.AdjustedPrice || 0\r\n );\r\n }\r\n return prod;\r\n });\r\n const productPricesforcookies = updatedProducts.map(prod => {\r\n return {\r\n recordId: prod.RecordId,\r\n price: prod.Price,\r\n basePrice: prod.BasePrice\r\n };\r\n });\r\n if (updatedProducts) {\r\n const cookieName = this.props.config.isNotificationModal ? 'notification_products_prices' : '';\r\n if (cookieName) {\r\n this.props.context.actionContext.requestContext.cookies.set(cookieName, productPricesforcookies);\r\n }\r\n this.setState({ products: updatedProducts });\r\n }\r\n const activePrice = activePricesResponse.find(price => price.ProductId === this.state.pdpSearchResultProduct?.RecordId);\r\n if (activePrice) {\r\n const pdpProd = this.state.pdpSearchResultProduct;\r\n if (pdpProd) {\r\n pdpProd.Price = activePrice.CustomerContextualPrice ?? pdpProd.Price;\r\n pdpProd.BasePrice = Math.max(\r\n activePrice.BasePrice || 0,\r\n activePrice.TradeAgreementPrice || 0,\r\n activePrice.AdjustedPrice || 0\r\n );\r\n this.setState({ pdpSearchResultProduct: pdpProd });\r\n if (this.props.config.isProductBundles && !this.props.config.isBundlesModal) {\r\n const cookies = this.props.context.actionContext.requestContext.cookies;\r\n const addedProductsToCollection =\r\n cookies.get(\r\n this.props.config.isNotificationModal ? 'notification_added_products' : 'added_products_bundles'\r\n )?.value || [];\r\n let pdpProductAlreadyAdded = false;\r\n if (Array.isArray(addedProductsToCollection)) {\r\n for (const obj of addedProductsToCollection) {\r\n if (pdpProd.RecordId === obj['productId']) {\r\n pdpProductAlreadyAdded = true;\r\n }\r\n }\r\n }\r\n if (!pdpProductAlreadyAdded) {\r\n if (this.props.config.isProductBundles && !this.props.config.isBundlesModal) {\r\n this._addItemToCart(pdpProd, pdpProd.RecordId.toString()).catch(\r\n error => `[addItemToCart] unable to add to cart`\r\n );\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n })\r\n .catch((error: Error) => {\r\n this.props.context.actionContext.trace(error.message);\r\n this.props.context.actionContext.telemetry.exception(error);\r\n this.props.context.actionContext.telemetry.debug(\r\n '[get Affiliation based price on search result container ]Error executing action'\r\n );\r\n throw new Error('[get Affiliation based price on search result container]Error executing action');\r\n });\r\n };\r\n\r\n // Following function converts ProductSearchResult into SimpleProduct\r\n private async _convertToSimpleProduct(product: ProductSearchResult): Promise {\r\n const {\r\n context: {\r\n actionContext: {\r\n requestContext: {\r\n apiSettings: { channelId }\r\n }\r\n }\r\n }\r\n } = this.props;\r\n\r\n const response = await getByIdAsync({ callerContext: this.props.context.actionContext }, product.RecordId, channelId);\r\n return Array.isArray(response) ? response[0] : response;\r\n }\r\n\r\n // Followig function returns inventory messages\r\n private _getInventoryValueMessage(product: IProductInventoryInformation | undefined, curQuantity: number): string {\r\n const { context, resources } = this.props;\r\n const { maxQuantityLimitText } = resources;\r\n\r\n const maxQuantityForLineItem = context.app.config.maxQuantityForCartLineItem || 10;\r\n\r\n if (!product || !product.ProductAvailableQuantity.AvailableQuantity || !context.app.config.enableStockCheck) {\r\n return maxQuantityLimitText\r\n .replace('{maxQuantity}', maxQuantityForLineItem.toString())\r\n .replace('{curQuantity}', curQuantity.toString());\r\n }\r\n\r\n const minInventory = Math.min(maxQuantityForLineItem, product.ProductAvailableQuantity.AvailableQuantity);\r\n\r\n return maxQuantityLimitText.replace('{maxQuantity}', minInventory.toString()).replace('{curQuantity}', curQuantity.toString());\r\n }\r\n /* VSI Customization - END */\r\n // private _getActivePrice = async (): Promise => {\r\n // let products = this.state.products || [];\r\n // const productRecIds = products && products.length > 0 ? products.map(prod => prod.RecordId) : [];\r\n // const projectDomain: ProjectionDomain = {\r\n // ChannelId: this.props.context.request.apiSettings.channelId,\r\n // CatalogId: this.props.context.request.apiSettings.catalogId\r\n // };\r\n // const affliations: AffiliationLoyaltyTier[] = [];\r\n // const customerInput = new GetCustomerInput(this.props.context.actionContext.requestContext.apiSettings);\r\n // const customer = await getCustomer(customerInput, this.props.context.actionContext);\r\n\r\n // if (customer && customer.CustomerAffiliations) {\r\n // customer.CustomerAffiliations.forEach((affliation: CustomerAffiliation) => {\r\n // const aff: AffiliationLoyaltyTier = { AffiliationId: affliation.RetailAffiliationId, CustomerId: customer.AccountNumber };\r\n // affliations.push(aff);\r\n // });\r\n // }\r\n\r\n // await getActivePricesAsync(\r\n // { callerContext: this.props.context.actionContext, queryResultSettings: {} },\r\n // projectDomain,\r\n // productRecIds,\r\n // new Date(),\r\n // null,\r\n // affliations,\r\n // true\r\n // )\r\n // .then((activePricesResponse: ProductPrice[]) => {\r\n // this.productPrices = activePricesResponse;\r\n // products = products.map(prod => {\r\n // const activePrice = activePricesResponse.find(price => price.ProductId === prod.RecordId);\r\n // if (activePrice) {\r\n // prod.Price = activePrice.CustomerContextualPrice ?? prod.Price;\r\n // prod.BasePrice = Math.max(\r\n // activePrice.BasePrice || 0,\r\n // activePrice.TradeAgreementPrice || 0,\r\n // activePrice.AdjustedPrice || 0\r\n // );\r\n // }\r\n // return prod;\r\n // });\r\n // this.setState({\r\n // products: products\r\n // });\r\n // })\r\n // .catch((error: Error) => {\r\n // this.props.context.actionContext.trace(error.message);\r\n // this.props.context.actionContext.telemetry.exception(error);\r\n // this.props.context.actionContext.telemetry.debug(\r\n // `[get Affiliation based price on Product Collection]Error executing action`\r\n // );\r\n // throw new Error('[get Affiliation based price on Product Collection]Error executing action');\r\n // });\r\n // };\r\n}\r\n\r\nexport default ProductCollection;\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, Button } from '@msdyn365-commerce-modules/utilities';\r\nimport * as React from 'react';\r\n\r\nimport { IDobbiesAddedProductToBundle, IProductCollectionViewProps, IProductComponentViewProps } from './dobbies-product-collection';\r\nimport { IDobbiesMiniCartSummaryProduct } from '../../themes/dobbies/views/buybox.view';\r\nimport MsDyn365 from '@msdyn365-commerce/core';\r\nimport { ProductPrice, SimpleProduct, ProjectionDomain } from '@msdyn365-commerce/retail-proxy';\r\nimport { CartModulesStateShareInput } from '../../actions/cart-state-share';\r\nimport { Quantity } from '../../themes/dobbies/utilities/quantity';\r\nimport { getCartState } from '@msdyn365-commerce/global-state';\r\nimport {\r\n getByIdsAsync,\r\n getDeliveryOptionsAsync,\r\n getActivePricesAsync\r\n} from '@msdyn365-commerce/retail-proxy/dist/DataActions/ProductsDataActions.g';\r\nimport { ArrayExtensions, QueryResultSettingsProxy } from '@msdyn365-commerce-modules/retail-actions';\r\nimport { cartLineQuantityUpdatedAsync } from '@msdyn365-commerce-modules/cart-utilities';\r\nimport { ICartActionResult } from '@msdyn365-commerce/global-state';\r\nimport * as Msdyn365 from '@msdyn365-commerce/core';\r\nimport PriceComponent from '../../themes/dobbies/views/custom-components/product-price-component';\r\nconst ProductCollectionView: React.FC = props => {\r\n const [cartProducts, setCartProducts] = React.useState([]);\r\n const [bundlesSummaryScrollPos, setBundlesSummaryScrollPos] = React.useState(0);\r\n const [bundlesModalSummaryScrollPos, setBundlesModalSummaryScrollPos] = React.useState(0);\r\n\r\n const {\r\n heading,\r\n ProductCollectionContainer,\r\n products,\r\n SingleSlideCarouselComponentProps,\r\n GridComponentProps,\r\n isCarousel,\r\n pdpProduct,\r\n pdpProductComponent\r\n } = props;\r\n\r\n const equalsCheck = (a: number[], b: number[]) => {\r\n return a.length === b.length && a.every((v, i) => v === b[i]);\r\n };\r\n const updateCartProduct = async () => {\r\n const productIds: number[] = props.data.cart.result?.cart.CartLines\r\n ? props.data.cart.result?.cart.CartLines?.map(cartline => cartline.ProductId || -1)\r\n : [];\r\n const cookies = props.context.actionContext.requestContext.cookies;\r\n const addedProducts =\r\n cookies.get(props.config.isNotificationModal ? 'notification_added_products' : 'added_products_bundles')?.value || [];\r\n if (Array.isArray(addedProducts)) {\r\n for (const ap of addedProducts) {\r\n if (!productIds.includes(ap['productId'])) {\r\n productIds.push(ap['productId']);\r\n }\r\n }\r\n }\r\n const productBundleProducts = cookies.get('notification_products');\r\n const updatedProductIds: number[] = [];\r\n if (Array.isArray(productIds)) {\r\n for (const prodId of productIds) {\r\n if (productBundleProducts && Array.isArray(productBundleProducts.value) && productBundleProducts.value['length'] > 0) {\r\n for (const prodBP of productBundleProducts.value) {\r\n if (+prodBP.itemId === prodId) {\r\n updatedProductIds.push(prodId);\r\n }\r\n }\r\n }\r\n }\r\n }\r\n const simpleProductsData = ArrayExtensions.validValues(\r\n await getByIdsAsync(\r\n {\r\n callerContext: props.context.actionContext,\r\n queryResultSettings: QueryResultSettingsProxy.getPagingFromInputDataOrDefaultValue(props.context.actionContext)\r\n },\r\n props.context.actionContext.requestContext.apiSettings.channelId\r\n ? props.context.actionContext.requestContext.apiSettings.channelId\r\n : -1,\r\n updatedProductIds,\r\n null,\r\n props.context.actionContext.requestContext.apiSettings.catalogId\r\n )\r\n );\r\n\r\n let simpleProductsWithQuantities = simpleProductsData.map(sp => {\r\n const prodWithQuantity: IDobbiesMiniCartSummaryProduct = { ...sp, quantity: 1 };\r\n const cl = props.data.cart.result?.cart.CartLines?.find(c => c.ProductId === prodWithQuantity.RecordId);\r\n if (Array.isArray(addedProducts)) {\r\n for (const ap of addedProducts) {\r\n if (prodWithQuantity.RecordId === ap['productId']) {\r\n prodWithQuantity.quantity = ap['quantity'];\r\n if (cl && prodWithQuantity.quantity && cl.Quantity) {\r\n prodWithQuantity.quantity += cl.Quantity;\r\n }\r\n }\r\n }\r\n }\r\n if (cl && cl.Quantity && prodWithQuantity.quantity && prodWithQuantity.quantity <= cl.Quantity) {\r\n prodWithQuantity.quantity = cl.Quantity;\r\n }\r\n return prodWithQuantity;\r\n });\r\n const simpleProdIds = simpleProductsWithQuantities.map(prod => prod.RecordId);\r\n const cartProductIds = cartProducts.map(cartProd => cartProd.RecordId);\r\n\r\n if (!equalsCheck(simpleProdIds, cartProductIds)) {\r\n const projectDomain: ProjectionDomain = {\r\n ChannelId: props.context.request.apiSettings.channelId,\r\n CatalogId: props.context.request.apiSettings.catalogId\r\n };\r\n const pIds = simpleProductsWithQuantities.map(p => p.RecordId);\r\n await getActivePricesAsync(\r\n {\r\n callerContext: props.context.actionContext,\r\n queryResultSettings: {}\r\n },\r\n projectDomain,\r\n pIds,\r\n new Date(),\r\n null,\r\n null,\r\n true\r\n )\r\n .then((activePricesResponse: ProductPrice[]) => {\r\n if (activePricesResponse && activePricesResponse.length > 0) {\r\n simpleProductsWithQuantities = simpleProductsWithQuantities.map(sp => {\r\n const activePrice = activePricesResponse.find(price => price.ProductId === sp.RecordId);\r\n if (activePrice) {\r\n sp.Price = activePrice.CustomerContextualPrice ?? sp.Price;\r\n sp.BasePrice = Math.max(\r\n activePrice.BasePrice || 0,\r\n activePrice.TradeAgreementPrice || 0,\r\n activePrice.AdjustedPrice || 0\r\n );\r\n }\r\n return sp;\r\n });\r\n }\r\n })\r\n .catch((error: Error) => {});\r\n const updatedSimpleProductsWithQuantities = simpleProductsWithQuantities.filter(item => {\r\n // Check if product doesn't have inventory, dont dislay it\r\n const itemInventory = props.state.inventoryInformation.find(\r\n inventory => inventory.ProductAvailableQuantity.ProductId === item.RecordId\r\n );\r\n\r\n return itemInventory && itemInventory.IsProductAvailable === true;\r\n });\r\n setCartProducts(updatedSimpleProductsWithQuantities);\r\n } else {\r\n if (simpleProductsWithQuantities) {\r\n let needsUpdate = false;\r\n for (const cp of cartProducts) {\r\n const ap = simpleProductsWithQuantities.find(p => p.RecordId === cp.RecordId);\r\n if (ap?.quantity !== cp.quantity) {\r\n needsUpdate = true;\r\n }\r\n }\r\n if (needsUpdate) {\r\n const projectDomain: ProjectionDomain = {\r\n ChannelId: props.context.request.apiSettings.channelId,\r\n CatalogId: props.context.request.apiSettings.catalogId\r\n };\r\n const pIds = simpleProductsWithQuantities.map(p => p.RecordId);\r\n await getActivePricesAsync(\r\n {\r\n callerContext: props.context.actionContext,\r\n queryResultSettings: {}\r\n },\r\n projectDomain,\r\n pIds,\r\n new Date(),\r\n null,\r\n null,\r\n true\r\n )\r\n .then((activePricesResponse: ProductPrice[]) => {\r\n if (activePricesResponse && activePricesResponse.length > 0) {\r\n simpleProductsWithQuantities = simpleProductsWithQuantities.map(sp => {\r\n const activePrice = activePricesResponse.find(price => price.ProductId === sp.RecordId);\r\n if (activePrice) {\r\n sp.Price = activePrice.CustomerContextualPrice ?? sp.Price;\r\n sp.BasePrice = Math.max(\r\n activePrice.BasePrice || 0,\r\n activePrice.TradeAgreementPrice || 0,\r\n activePrice.AdjustedPrice || 0\r\n );\r\n }\r\n return sp;\r\n });\r\n }\r\n })\r\n .catch((error: Error) => {});\r\n const updatedSimpleProductsWithQuantities = simpleProductsWithQuantities.filter(item => {\r\n // Check if product doesn't have inventory, dont dislay it\r\n const itemInventory = props.state.inventoryInformation.find(\r\n inventory => inventory.ProductAvailableQuantity.ProductId === item.RecordId\r\n );\r\n\r\n return itemInventory && itemInventory.IsProductAvailable === true;\r\n });\r\n setCartProducts(updatedSimpleProductsWithQuantities);\r\n }\r\n }\r\n }\r\n props.context.actionContext.update(new CartModulesStateShareInput(), { isCartUpdated: false });\r\n };\r\n React.useEffect(() => {\r\n updateCartProduct();\r\n }, [props.data.cart.result?.cart.CartLines]);\r\n React.useEffect(() => {\r\n if (props.data.cartSharedState?.result?.isCartUpdated) {\r\n updateCartProduct();\r\n }\r\n }, [props.data.cartSharedState.result?.isCartUpdated]);\r\n if (products) {\r\n if (props.config.isNotificationModal) {\r\n return (\r\n <>\r\n \r\n {heading}\r\n {isCarousel\r\n ? _renderCarousel(SingleSlideCarouselComponentProps, products)\r\n : _renderGrid(GridComponentProps, products)}\r\n\r\n {props.shouldShowAddAllProducts && props.addAllProductsOnClick}\r\n \r\n
\r\n
\r\n

Your basket

\r\n {_renderCartLines(\r\n props,\r\n cartProducts,\r\n setCartProducts,\r\n bundlesSummaryScrollPos,\r\n setBundlesSummaryScrollPos,\r\n bundlesModalSummaryScrollPos,\r\n setBundlesModalSummaryScrollPos,\r\n true\r\n )}\r\n {\r\n const notifiCheck = props.context.request.user.isAuthenticated ? 'signedin' : 'signedout';\r\n setCookie(props, 'notification_popup', notifiCheck, 1);\r\n MsDyn365.isBrowser && window && window.location.assign('/cart');\r\n }}\r\n >\r\n {!props.data.cart.result?.cart.CartLines?.length ? 'Add an item' : 'View your basket'}\r\n \r\n

\r\n {props.config.discountAppliedInCartMessage\r\n ? props.config.discountAppliedInCartMessage\r\n : 'Any offers/discounts will be applied at checkout'}\r\n

\r\n
\r\n
\r\n \r\n );\r\n } else if (pdpProduct && pdpProductComponent && !props.isBundlesModal) {\r\n return (\r\n <>\r\n {pdpProductComponent}\r\n
\r\n \r\n {heading}\r\n {isCarousel\r\n ? _renderCarousel(SingleSlideCarouselComponentProps, products)\r\n : _renderGrid(GridComponentProps, products)}\r\n\r\n {props.shouldShowAddAllProducts && props.addAllProductsOnClick}\r\n \r\n \r\n );\r\n } else {\r\n return (\r\n \r\n {heading}\r\n {isCarousel ? _renderCarousel(SingleSlideCarouselComponentProps, products) : _renderGrid(GridComponentProps, products)}\r\n {props.shouldShowAddAllProducts && props.addAllProductsOnClick}\r\n \r\n );\r\n }\r\n }\r\n props.context.telemetry.error('Product collection content is empty, module wont render.');\r\n return null;\r\n};\r\n\r\nconst setCookie = (props: IProductCollectionViewProps, name: string, value: string, deltaDaysFromToday: number) => {\r\n const { cookies } = props.context.request;\r\n const expirationDate = new Date(Date.now());\r\n expirationDate.setTime(expirationDate.getTime() + deltaDaysFromToday * 24 * 60 * 60 * 1000);\r\n\r\n cookies.set(name, value, {\r\n expires: deltaDaysFromToday ? expirationDate : null,\r\n isEssential: true\r\n } as {});\r\n};\r\n\r\nconst changeQinBundlesModalSummary = async (\r\n props: IProductCollectionViewProps,\r\n productId: number,\r\n newValue: number,\r\n cartProducts: IDobbiesMiniCartSummaryProduct[],\r\n setCartProducts: React.Dispatch>,\r\n isSummaryInModal: boolean,\r\n maxQuantityForBundle: number\r\n) => {\r\n const cartState = await getCartState(props.context.actionContext);\r\n const cl = cartState.cart.CartLines?.find(c => c.ProductId === productId);\r\n const simpleProduct: SimpleProduct | undefined = cartProducts.find(c => c.RecordId === productId);\r\n if (maxQuantityForBundle <= 0) {\r\n const cookies = props.context.actionContext.requestContext.cookies;\r\n const maxQuantities =\r\n cookies.get(\r\n props.config.isNotificationModal\r\n ? 'product_notification_maximum_available_quantities'\r\n : 'product_bundles_maximum_available_quantities'\r\n )?.value || [];\r\n if (Array.isArray(maxQuantities)) {\r\n for (const maxQ of maxQuantities) {\r\n if (maxQ.productId === productId) {\r\n maxQuantityForBundle = maxQ.maxQuantity;\r\n break;\r\n }\r\n }\r\n }\r\n }\r\n if (cl && cl.Quantity && maxQuantityForBundle && simpleProduct) {\r\n if (newValue > maxQuantityForBundle) {\r\n return;\r\n }\r\n const diffInQuantity = newValue - cl.Quantity;\r\n const deliveryOptions = await getDeliveryOptionsAsync({ callerContext: props.context.actionContext, queryResultSettings: {} }, [\r\n productId\r\n ]);\r\n const emailDeliveryModeCode = props.context.actionContext.requestContext.channel?.EmailDeliveryModeCode;\r\n if (diffInQuantity > 0) {\r\n const addProductToCartInput = {\r\n product: simpleProduct,\r\n quantity: diffInQuantity,\r\n enableStockCheck: props.context.app.config.enableStockCheck,\r\n availableQuantity: maxQuantityForBundle,\r\n isAddEmailDeliveryItemToCart:\r\n ArrayExtensions.hasElements(deliveryOptions) &&\r\n ArrayExtensions.hasElements(deliveryOptions[0].DeliveryOptions) &&\r\n deliveryOptions[0].DeliveryOptions[0].Code === emailDeliveryModeCode\r\n };\r\n cartState\r\n .addProductToCart(addProductToCartInput)\r\n .then(async result => {\r\n if (result.status === 'SUCCESS') {\r\n props.context.actionContext.update(new CartModulesStateShareInput(), { isQuantityUpdated: true });\r\n }\r\n })\r\n .catch(e => {});\r\n } else if (diffInQuantity < 0) {\r\n cartLineQuantityUpdatedAsync(true, cartState, props.context.actionContext.telemetry, [simpleProduct], cl, newValue)\r\n .then((cartActionResult: ICartActionResult | undefined): boolean => {\r\n if (cartActionResult?.status === 'SUCCESS') {\r\n props.context.actionContext.update(new CartModulesStateShareInput(), { isQuantityUpdated: true });\r\n return true;\r\n }\r\n return false;\r\n })\r\n .catch(e => {});\r\n }\r\n }\r\n};\r\nconst onQuantityChange = async (\r\n props: IProductCollectionViewProps,\r\n productId: number,\r\n newValue: number,\r\n cartProducts: IDobbiesMiniCartSummaryProduct[],\r\n setCartProducts: React.Dispatch>,\r\n isSummaryInModal: boolean,\r\n maxQuantityForBundle: number\r\n) => {\r\n if (isSummaryInModal) {\r\n changeQinBundlesModalSummary(props, productId, newValue, cartProducts, setCartProducts, isSummaryInModal, maxQuantityForBundle);\r\n return;\r\n }\r\n props.context.actionContext.update(new CartModulesStateShareInput(), { isQuantityUpdated: false });\r\n const cookies = props.context.actionContext.requestContext.cookies;\r\n const addedProductsToCollection =\r\n cookies.get(props.config.isNotificationModal ? 'notification_added_products' : 'added_products_bundles')?.value || [];\r\n const cartProductsCopy = cartProducts.map(cp => cp);\r\n const updatedProducts: IDobbiesAddedProductToBundle[] = [];\r\n if (Array.isArray(addedProductsToCollection)) {\r\n for (const obj of addedProductsToCollection) {\r\n if (obj['productId'] === productId) {\r\n const valueToBeUpdated = newValue;\r\n if (valueToBeUpdated > 0) {\r\n updatedProducts.push({\r\n productId: obj['productId'],\r\n price: obj['price'],\r\n quantity: valueToBeUpdated,\r\n maxQuantity: obj['maxQuantity']\r\n });\r\n for (const cp of cartProductsCopy) {\r\n if (cp.RecordId === obj['productId']) {\r\n cp.quantity = valueToBeUpdated;\r\n }\r\n }\r\n }\r\n } else {\r\n updatedProducts.push({\r\n productId: obj['productId'],\r\n price: obj['price'],\r\n quantity: obj['quantity'],\r\n maxQuantity: obj['maxQuantity']\r\n });\r\n }\r\n }\r\n const cookieName = props.config.isNotificationModal ? 'notification_added_products' : 'added_products_bundles';\r\n cookies.set(cookieName, updatedProducts);\r\n setCartProducts(cartProductsCopy);\r\n props.context.actionContext.update(new CartModulesStateShareInput(), { isQuantityUpdated: true });\r\n }\r\n};\r\nconst _renderCartLines = (\r\n props: IProductCollectionViewProps,\r\n cartProducts: IDobbiesMiniCartSummaryProduct[],\r\n setCartProducts: React.Dispatch>,\r\n bundlesSummaryScrollPos: number,\r\n setBundlesSummaryScrollPos: React.Dispatch>,\r\n bundlesModalSummaryScrollPos: number,\r\n setBundlesModalSummaryScrollPos: React.Dispatch>,\r\n isSummaryInModal: boolean\r\n) => {\r\n let totalPrice = 0.0;\r\n const cookies = props.context.actionContext.requestContext.cookies;\r\n const productsAddedInBundles = cookies.get('notification_added_products')?.value || [];\r\n const elemId = 'notification_product_summary';\r\n const elem = MsDyn365.isBrowser && window && window.document.getElementById(elemId);\r\n const rowHeight = 116;\r\n const minProductsToScroll =\r\n isSummaryInModal ||\r\n (MsDyn365.isBrowser && window && window.innerWidth >= 768 && MsDyn365.isBrowser && window && window.innerWidth <= 2500)\r\n ? 2\r\n : 3;\r\n const upArrowId = isSummaryInModal ? 'up-arrow-btn-modal' : 'up-arrow-btn';\r\n const downArrowId = isSummaryInModal ? 'down-arrow-btn-modal' : 'down-arrow-btn';\r\n let scrollPos = isSummaryInModal ? bundlesModalSummaryScrollPos : bundlesSummaryScrollPos;\r\n const rowHeightForCalc = 90;\r\n const maxQuantityReachedMsg = props.config.maxQuantityReachedInBundlesmsg\r\n ? props.config.maxQuantityReachedInBundlesmsg\r\n : `There is only 1 product left. Please choose quantity within the available range`;\r\n if (isSummaryInModal) {\r\n cartProducts = cartProducts.filter(cp =>\r\n props.data.cart.result?.cart.CartLines?.find(cl => cl.ProductId === cp.RecordId) ? true : false\r\n );\r\n if (cartProducts && props.data.cart.result?.cart.CartLines && props.data.cart.result?.cart.CartLines.length) {\r\n for (const c of props.data.cart.result?.cart.CartLines) {\r\n for (const cp of cartProducts) {\r\n if (c.ProductId === cp.RecordId) {\r\n cp.quantity = c.Quantity;\r\n }\r\n }\r\n }\r\n }\r\n } else {\r\n cartProducts = cartProducts.filter(\r\n cp => Array.isArray(productsAddedInBundles) && productsAddedInBundles.find(p => p['productId'] === cp.RecordId)\r\n );\r\n }\r\n return (\r\n <>\r\n {cartProducts && cartProducts.length > minProductsToScroll ? (\r\n {\r\n if (elem) {\r\n if (elem.scrollTop - rowHeight > 0) {\r\n elem.scrollTop -= rowHeight;\r\n } else {\r\n elem.scrollTop = 0;\r\n }\r\n if (isSummaryInModal) {\r\n setBundlesModalSummaryScrollPos(elem.scrollTop);\r\n } else {\r\n setBundlesSummaryScrollPos(elem.scrollTop);\r\n }\r\n }\r\n }}\r\n hidden={elem && scrollPos < 50 ? true : false}\r\n >\r\n ) : (\r\n <>\r\n )}\r\n {\r\n if (elem && Math.abs(Math.ceil(elem.scrollTop) - Math.ceil(scrollPos)) > rowHeightForCalc) {\r\n if (!isSummaryInModal) {\r\n if (elem.scrollTop >= (cartProducts.length - (minProductsToScroll + 1)) * rowHeightForCalc) {\r\n setBundlesSummaryScrollPos(elem?.scrollTop);\r\n } else if (elem.scrollTop < 50) {\r\n setBundlesSummaryScrollPos(elem?.scrollTop);\r\n }\r\n } else {\r\n if (elem.scrollTop >= (cartProducts.length - minProductsToScroll + 1) * rowHeightForCalc) {\r\n setBundlesModalSummaryScrollPos(elem?.scrollTop);\r\n } else if (elem.scrollTop < 50) {\r\n setBundlesModalSummaryScrollPos(elem?.scrollTop);\r\n }\r\n const upArrow = MsDyn365.isBrowser && window && window.document.getElementById(upArrowId);\r\n const downArrow = MsDyn365.isBrowser && window && window.document.getElementById(downArrowId);\r\n\r\n if (elem.scrollTop < 50) {\r\n if (upArrow) {\r\n upArrow.hidden = true;\r\n }\r\n } else {\r\n if (upArrow) {\r\n upArrow.hidden = false;\r\n }\r\n }\r\n if (elem.scrollTop > (cartProducts.length - minProductsToScroll) * rowHeightForCalc) {\r\n if (downArrow) {\r\n downArrow.hidden = true;\r\n }\r\n } else {\r\n if (downArrow) {\r\n downArrow.hidden = false;\r\n }\r\n }\r\n }\r\n scrollPos = elem.scrollTop;\r\n }\r\n }}\r\n >\r\n {cartProducts.map((product, index) => {\r\n let prodInBundles;\r\n let cookiePrice;\r\n let maxQuantityForBundle = 0;\r\n let shouldShowQuantityReachedErrorMsg = false;\r\n const cl = props.data.cart?.result?.cart.CartLines?.find(c => c.ProductId === product.RecordId);\r\n if (Array.isArray(productsAddedInBundles)) {\r\n prodInBundles = productsAddedInBundles.find(p => p['productId'] === product.RecordId);\r\n if (prodInBundles) {\r\n cookiePrice = prodInBundles['price'];\r\n maxQuantityForBundle = prodInBundles['maxQuantity'];\r\n if (!isSummaryInModal) {\r\n product.quantity = prodInBundles['quantity'];\r\n if (cl && cl.Quantity && product.quantity && maxQuantityForBundle) {\r\n shouldShowQuantityReachedErrorMsg = product.quantity + cl.Quantity > maxQuantityForBundle;\r\n }\r\n }\r\n }\r\n }\r\n if (maxQuantityForBundle <= 0) {\r\n const cookies = props.context.actionContext.requestContext.cookies;\r\n const maxQuantities =\r\n cookies.get(\r\n props.config.isNotificationModal\r\n ? 'product_notification_maximum_available_quantities'\r\n : 'product_bundles_maximum_available_quantities'\r\n )?.value || [];\r\n if (Array.isArray(maxQuantities)) {\r\n for (const maxQ of maxQuantities) {\r\n if (maxQ.productId === product.RecordId) {\r\n maxQuantityForBundle = maxQ.maxQuantity;\r\n break;\r\n }\r\n }\r\n }\r\n }\r\n if (product.quantity && product.quantity >= maxQuantityForBundle) {\r\n shouldShowQuantityReachedErrorMsg = true;\r\n }\r\n const priceObj: ProductPrice = {\r\n BasePrice: product.BasePrice,\r\n AdjustedPrice: cookiePrice ? cookiePrice : product.Price,\r\n CustomerContextualPrice: cookiePrice ? cookiePrice : product.Price\r\n };\r\n totalPrice =\r\n totalPrice + (cookiePrice ? Number(cookiePrice) : product.Price) * (product.quantity ? product.quantity : 0);\r\n const imageSettings = {\r\n viewports: {\r\n xs: { q: 'w=80&h=94&m=6', w: 0, h: 0 },\r\n sm: { q: 'w=148&h=174&m=6', w: 0, h: 0 },\r\n lg: { q: 'w=148&h=174&m=6', w: 0, h: 0 }\r\n },\r\n lazyload: true\r\n };\r\n const baseImageUrl: string = props.context.request.apiSettings.baseImageUrl;\r\n
;\r\n const currQ = product.quantity;\r\n return (\r\n <>\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n

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

\r\n \r\n {/*

Quantity: {product.quantity}

*/}\r\n

Quantity:

\r\n {\r\n onQuantityChange(\r\n props,\r\n product.RecordId,\r\n newVal,\r\n cartProducts,\r\n setCartProducts,\r\n isSummaryInModal,\r\n maxQuantityForBundle\r\n );\r\n }}\r\n hideQuantityControls={false}\r\n disabledInput={false}\r\n max={maxQuantityForBundle}\r\n min={1}\r\n />\r\n {shouldShowQuantityReachedErrorMsg &&

{maxQuantityReachedMsg}

}\r\n
\r\n
\r\n {\r\n if (!isSummaryInModal) {\r\n const cookies = props.context.actionContext.requestContext.cookies;\r\n const productsAddedInBundles =\r\n cookies.get(\r\n props.config.isNotificationModal\r\n ? 'notification_added_products'\r\n : 'added_products_bundles'\r\n )?.value || [];\r\n if (Array.isArray(productsAddedInBundles)) {\r\n for (let i = 0; i < productsAddedInBundles.length; i++) {\r\n if (productsAddedInBundles[i]['productId'] === product.RecordId) {\r\n delete productsAddedInBundles[i];\r\n }\r\n }\r\n const updatedProductsAddedInBundles: IDobbiesAddedProductToBundle[] = [];\r\n productsAddedInBundles.map(prod => {\r\n if (prod && prod['productId']) {\r\n const dobbiesProductData: IDobbiesAddedProductToBundle = {};\r\n dobbiesProductData.productId = prod['productId'];\r\n dobbiesProductData.quantity = prod['quantity'];\r\n dobbiesProductData.price = prod['price'];\r\n dobbiesProductData.maxQuantity = prod['maxQuantity'];\r\n updatedProductsAddedInBundles.push(dobbiesProductData);\r\n }\r\n });\r\n const cookieName = props.config.isNotificationModal\r\n ? 'notification_added_products'\r\n : 'added_products_bundles';\r\n cookies.set(cookieName, updatedProductsAddedInBundles);\r\n props.context.actionContext.update(new CartModulesStateShareInput(), {\r\n isCartUpdated: true\r\n });\r\n }\r\n return;\r\n }\r\n const cartlineToRemove = props.data.cart.result?.cart.CartLines?.find(\r\n cl => cl.ProductId === product.RecordId\r\n );\r\n if (cartlineToRemove) {\r\n const input = {\r\n cartLineIds: [cartlineToRemove.LineId!.toString()]\r\n };\r\n props.data.cart.result\r\n ?.removeCartLines(input)\r\n .then(() => {\r\n props.context.actionContext.update(new CartModulesStateShareInput(), {\r\n isCartUpdated: true\r\n });\r\n })\r\n .catch(error => {\r\n props.telemetry.warning(error);\r\n props.telemetry.debug('Unable to Remove Cart Line');\r\n });\r\n } else {\r\n props.context.actionContext.update(new CartModulesStateShareInput(), { isCartUpdated: true });\r\n }\r\n }}\r\n >\r\n
\r\n \r\n );\r\n })}\r\n \r\n\r\n {cartProducts && cartProducts.length > minProductsToScroll ? (\r\n {\r\n if (elem) {\r\n elem.scrollTop += rowHeight;\r\n if (isSummaryInModal) {\r\n setBundlesModalSummaryScrollPos(elem.scrollTop);\r\n } else {\r\n setBundlesSummaryScrollPos(elem.scrollTop);\r\n }\r\n }\r\n }}\r\n hidden={elem && scrollPos > (cartProducts.length - minProductsToScroll) * rowHeightForCalc ? true : false}\r\n >\r\n ) : (\r\n <>\r\n )}\r\n

\r\n {'Total price:'}\r\n \r\n {' '}\r\n {new Intl.NumberFormat('en-US', {\r\n style: 'currency',\r\n currencyDisplay: 'symbol',\r\n currency: 'GBP',\r\n minimumFractionDigits: 2\r\n }).format(totalPrice)}\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 _renderProduct = (product: IProductComponentViewProps): JSX.Element => {\r\n const { ProductContainer, productComponent, addToCartButton } = product;\r\n\r\n return (\r\n \r\n {productComponent}\r\n {addToCartButton}\r\n \r\n );\r\n};\r\n\r\nexport default ProductCollectionView;\r\n","import { IActionContext } from '@msdyn365-commerce/core';\r\nimport { ProductAvailableQuantity, ProductSearchResult, ProductWarehouseInventoryAvailability } from '@msdyn365-commerce/retail-proxy';\r\n/**\r\n * Product inventory information class\r\n */\r\nexport interface IProductInventoryInformation {\r\n ProductAvailableQuantity: ProductAvailableQuantity;\r\n StockLevelCode?: string;\r\n StockLevelLabel?: string;\r\n IsProductAvailable: boolean;\r\n InventLocationId?: string;\r\n}\r\n/**\r\n * The function that maps a ProductWareHouse object into a ProductAvailabilityQuantity\r\n */\r\nexport const mapProductInventoryInformation = (\r\n ctx: IActionContext,\r\n productsWarehouseInventory: ProductWarehouseInventoryAvailability[],\r\n isPreSale?: string,\r\n dobbiesProductsData?: ProductSearchResult[]\r\n): IProductInventoryInformation[] => {\r\n const {\r\n requestContext: {\r\n app: {\r\n config: { enableStockCheck, inventoryLevel }\r\n }\r\n }\r\n } = ctx;\r\n\r\n const productInventoryInformation: IProductInventoryInformation[] = [];\r\n\r\n if (enableStockCheck === undefined || enableStockCheck === false) {\r\n return productInventoryInformation;\r\n }\r\n\r\n if (productsWarehouseInventory && productsWarehouseInventory.length > 0) {\r\n for (const product of productsWarehouseInventory) {\r\n const filteredProduct = dobbiesProductsData?.find(prod => prod.RecordId === product.ProductId);\r\n const presell = filteredProduct?.AttributeValues?.find(proAttr => proAttr.Name === \"PreSale\" && proAttr.TextValue === \"Yes\")\r\n const IsVendershipProduct = filteredProduct?.AttributeValues?.find(proAttr => proAttr.Name === \"IsVendershipProduct\" && proAttr.TextValue === \"No\")\r\n const FulfillmentType = filteredProduct?.AttributeValues?.find(proAttr => proAttr.Name === \"FulfillmentType\" && proAttr.TextValue !== \"Plants\")\r\n switch (isPreSale ? \"totalAvailable\" : (presell && IsVendershipProduct && FulfillmentType) ? \"totalAvailable\" : inventoryLevel) {\r\n case 'physicalAvailable':\r\n // Inventory level is enabled with Physical inventory\r\n const physicalProductMap = mapInventoryWithPhysicalBufferEnabled(ctx, product);\r\n if (physicalProductMap) {\r\n productInventoryInformation.push(physicalProductMap);\r\n }\r\n break;\r\n case 'totalAvailable':\r\n // Inventory level is enabled with Total available inventory\r\n const totalAvailableProductMap = mapInventoryWithTotalAvailableBufferEnabled(ctx, product);\r\n if (totalAvailableProductMap) {\r\n productInventoryInformation.push(totalAvailableProductMap);\r\n }\r\n break;\r\n default:\r\n // when inventory level is inventoryThreshold or not defined\r\n const productMap = mapInventoryWithThresholdEnabled(ctx, product);\r\n if (productMap) {\r\n productInventoryInformation.push(productMap);\r\n }\r\n }\r\n }\r\n }\r\n return productInventoryInformation;\r\n};\r\n\r\nexport const mapInventoryWithThresholdEnabled = (\r\n ctx: IActionContext,\r\n productWarehouseInventoryAvailability: ProductWarehouseInventoryAvailability\r\n) => {\r\n if (\r\n productWarehouseInventoryAvailability &&\r\n productWarehouseInventoryAvailability.ProductId &&\r\n productWarehouseInventoryAvailability.TotalAvailable !== undefined\r\n ) {\r\n const productQty = productWarehouseInventoryAvailability.TotalAvailable - ctx.requestContext.app.config.outOfStockThreshold;\r\n const productAvailableQuantity = {\r\n ProductId: productWarehouseInventoryAvailability.ProductId,\r\n AvailableQuantity: productQty > 0 ? productQty : 0\r\n };\r\n return {\r\n ProductAvailableQuantity: productAvailableQuantity,\r\n IsProductAvailable: productAvailableQuantity.AvailableQuantity && productAvailableQuantity.AvailableQuantity > 0 ? true : false,\r\n InventLocationId: productWarehouseInventoryAvailability.InventLocationId\r\n };\r\n }\r\n return null;\r\n};\r\n\r\nexport const mapInventoryWithPhysicalBufferEnabled = (\r\n ctx: IActionContext,\r\n productWarehouseInventoryAvailability: ProductWarehouseInventoryAvailability\r\n) => {\r\n const shouldRenderLabel = displayLabelEnabled(ctx, productWarehouseInventoryAvailability.PhysicalAvailableInventoryLevelCode);\r\n if (\r\n productWarehouseInventoryAvailability &&\r\n productWarehouseInventoryAvailability.ProductId &&\r\n productWarehouseInventoryAvailability.TotalAvailable !== undefined\r\n ) {\r\n // As per the new buffer logic from RS,\r\n // if code is out of stock then we set the available quantity to 0 regardless of the actual value from API\r\n const productQuantity =\r\n productWarehouseInventoryAvailability.PhysicalAvailableInventoryLevelCode === 'OOS'\r\n ? 0\r\n : productWarehouseInventoryAvailability.PhysicalAvailable;\r\n const productAvailableQuantity = {\r\n ProductId: productWarehouseInventoryAvailability.ProductId,\r\n AvailableQuantity: productQuantity\r\n };\r\n return {\r\n ProductAvailableQuantity: productAvailableQuantity,\r\n StockLevelCode: shouldRenderLabel ? productWarehouseInventoryAvailability.PhysicalAvailableInventoryLevelCode : undefined,\r\n StockLevelLabel: shouldRenderLabel ? productWarehouseInventoryAvailability.PhysicalAvailableInventoryLevelLabel : undefined,\r\n IsProductAvailable: productAvailableQuantity.AvailableQuantity !== undefined && productAvailableQuantity.AvailableQuantity > 0,\r\n InventLocationId: productWarehouseInventoryAvailability.InventLocationId\r\n };\r\n }\r\n return null;\r\n};\r\n\r\nexport const mapInventoryWithTotalAvailableBufferEnabled = (\r\n ctx: IActionContext,\r\n productWarehouseInventoryAvailability: ProductWarehouseInventoryAvailability\r\n) => {\r\n const shouldRenderLabel = displayLabelEnabled(ctx, productWarehouseInventoryAvailability.TotalAvailableInventoryLevelCode);\r\n if (\r\n productWarehouseInventoryAvailability &&\r\n productWarehouseInventoryAvailability.ProductId &&\r\n productWarehouseInventoryAvailability.TotalAvailable !== undefined\r\n ) {\r\n // As per the new buffer logic from RS,\r\n // if code is out of stock then we set the available quantity to 0 regardless of the actual value from API\r\n const productQuantity =\r\n productWarehouseInventoryAvailability.TotalAvailableInventoryLevelCode === 'OOS'\r\n ? 0\r\n : productWarehouseInventoryAvailability.TotalAvailable;\r\n const productAvailableQuantity = {\r\n ProductId: productWarehouseInventoryAvailability.ProductId,\r\n AvailableQuantity: productQuantity\r\n };\r\n return {\r\n ProductAvailableQuantity: productAvailableQuantity,\r\n StockLevelCode: shouldRenderLabel ? productWarehouseInventoryAvailability.TotalAvailableInventoryLevelCode : undefined,\r\n StockLevelLabel: shouldRenderLabel ? productWarehouseInventoryAvailability.TotalAvailableInventoryLevelLabel : undefined,\r\n IsProductAvailable: productAvailableQuantity.AvailableQuantity !== undefined && productAvailableQuantity.AvailableQuantity > 0,\r\n InventLocationId: productWarehouseInventoryAvailability.InventLocationId\r\n };\r\n }\r\n return null;\r\n};\r\n\r\nexport const displayLabelEnabled = (ctx: IActionContext, inventoryCode: string | undefined) => {\r\n if (!inventoryCode) {\r\n return false;\r\n }\r\n switch (ctx.requestContext.app.config.inventoryRanges) {\r\n case 'lowAndOutofStock':\r\n if (inventoryCode !== 'AVAIL') {\r\n return true;\r\n }\r\n break;\r\n case 'outOfStock':\r\n if (inventoryCode === 'OOS') {\r\n return true;\r\n }\r\n break;\r\n case 'all':\r\n return true;\r\n default:\r\n return false;\r\n }\r\n return false;\r\n};\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['dobbies-product-collection'] = {\n c: () => require('partner/modules/dobbies-product-collection/dobbies-product-collection.tsx'),\n $type: 'containerModule',\n da: [{name:'cart', path:'@msdyn365-commerce/global-state/dist/lib/data-actions/cart-state-data-action', runOn: 0},{name:'cartSharedState', path:'actions/cart-state-share', runOn: 0},{name:'customerInformation', path:'@msdyn365-commerce-modules/retail-actions/dist/lib/get-customer', runOn: 0},{name:'featureState', path:'@msdyn365-commerce-modules/retail-actions/dist/lib/get-feature-state', runOn: 0},{name:'plantPotsProductCountState', path:'actions/get-plant-pots-product-count', runOn: 0},{name:'wishlists', path:'@msdyn365-commerce-modules/retail-actions/dist/lib/get-wishlist-by-customer-id', runOn: 1}],\n \n iNM: false,\n ns: '__local__',\n n: 'dobbies-product-collection',\n p: '__local__',\n \n pdp: '',\n \n \n md: 'src/modules/dobbies-product-collection'\n });\n \n\n {\n const sanitizedActionPath = '@msdyn365-commerce-modules/retail-actions/dist/lib/get-customer';\n let dataAction = require('@msdyn365-commerce-modules/retail-actions/dist/lib/get-customer');\n registerSanitizedActionPath(sanitizedActionPath, dataAction);\n }\n \n\n {\n const sanitizedActionPath = '@msdyn365-commerce-modules/retail-actions/dist/lib/get-feature-state';\n let dataAction = require('@msdyn365-commerce-modules/retail-actions/dist/lib/get-feature-state');\n registerSanitizedActionPath(sanitizedActionPath, dataAction);\n }\n \n\n {\n const sanitizedActionPath = '@msdyn365-commerce-modules/retail-actions/dist/lib/get-wishlist-by-customer-id';\n let dataAction = require('@msdyn365-commerce-modules/retail-actions/dist/lib/get-wishlist-by-customer-id');\n registerSanitizedActionPath(sanitizedActionPath, dataAction);\n }\n \n\n {\n const sanitizedActionPath = '@msdyn365-commerce/global-state/dist/lib/data-actions/cart-state-data-action';\n let dataAction = require('@msdyn365-commerce/global-state/dist/lib/data-actions/cart-state-data-action');\n registerSanitizedActionPath(sanitizedActionPath, dataAction);\n }\n \n\n {\n const sanitizedActionPath = 'actions/cart-state-share';\n let dataAction = require('partner/actions/cart-state-share');\n registerSanitizedActionPath(sanitizedActionPath, dataAction);\n }\n \n\n {\n const sanitizedActionPath = 'actions/get-plant-pots-product-count';\n let dataAction = require('partner/actions/get-plant-pots-product-count');\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|dobbies-product-collection|dobbies-product-collection'] = {\n c: () => require('partner/modules/dobbies-product-collection/dobbies-product-collection.view.tsx'),\n cn: '__local__-__local__-dobbies-product-collection'\n };\nwindow.__bindings__ = window.__bindings__ || {};\nwindow.__bindings__.viewDictionary = {\n ...window.__bindings__.viewDictionary || {},\n ...viewDictionary\n };","module.exports = React;","module.exports = ReactDOM;"],"names":["GetPlantPotsProductCountInput","constructor","getCacheKey","getCacheObjectType","dataCacheType","async","sampleStateAction","input","ctx","potsProductCount","createObservableDataAction","action","inputData","layout","HeadingTag","ProductCollection","React","props","state","super","getActiveImageproductAction","context","actionContext","requestContext","cookies","this","cookienotificationValue","get","Array","isArray","value","activePoints","itemIds","map","activePointData","push","itemId","searchCriteriaInput","catalogId","getCatalogId","validateCatalogId","Context","ChannelId","apiSettings","channelId","CatalogId","IncludeAttributes","Ids","ArrayExtensions","hasElements","Error","products","searchByCriteriaAsync","callerContext","setState","checkDifference","array1","array2","length","i","RecordId","handleHeadingChange","event","config","heading","text","target","updateAddedProductsList","_cookies$get","addedProductsToCollection","isNotificationModal","addedProductsIds","obj","addedProductIdsToBundles","isProductBundles","request","telemetryPageName","update","CartModulesStateShareInput","isCartUpdated","getPDPProductMaxQ","onBundleProductCheckBoxSelected","productId","_this$props$data$cart","_this$state$pdpSearch","cl","data","cart","result","CartLines","find","c","ProductId","maxPDPQ","maxPDPQNumber","Number","pdpSearchResultProduct","Quantity","prod","p","_addItemToCart","toString","_updateCookiesForAddedProducts","_getPDPProduct","product","index","_this$props$data$feat","_this$props$data$wish","_this$props$data$cart4","_this$state$nonClubPl","_this$state$simplePro","Name","telemetry","trace","telemetryContent","getTelemetryObject","friendlyName","imageSettings","allowBackNavigation","addToCartButtonText","resources","breaCrumbType","app","breadcrumbType","allowBack","quickviewSlot","slots","quickview","reviewCountAriaLabelValue","TotalRatings","ratingCountAriaLabel","ratingCountAriaLabelSingleUser","isPriceMinMaxEnabled","featureState","console","log","productWithModes","_objectSpread","isCnC","isHomeDelivery","shouldNotShowAddToCartButton","includes","maxAvailableQ","isBundlesModal","_this$props$data$cart2","_this$props$data$cart3","className","ProductComponent","freePriceText","priceFree","originalPriceText","currentPriceText","ratingAriaLabel","id","typeName","quickViewButton","IsEnabled","showDeliveryIcons","wishlists","isProductAddedToBundles","maxQuantityForBundle","redirectToCartEnabled","redirectToCart","onQuantityChangeListener","isQuantityUpdated","cartSharedState","discountLine","discountLines","nonClubPlusDiscount","filter","item","simpleProduct","simpleProductObjs","sp","Button","title","onClick","_getAddToCart","_getProduct","_this$props$data$feat2","_this$props$data$wish2","_this$props$data$cart7","_this$state$nonClubPl2","_this$state$simplePro2","_this$props$data$cart5","_this$props$data$cart6","ProductContainer","tag","role","key","productComponent","getMaxAvailableQuantityForProduct","addToCartButton","newQuantity","currQuantityData","currQuantities","productFound","qd","_getProductAvailabilityNotification","validProducts","productData","queryResultSettings","allProducts","plantProducts","nonPlantProducts","_fulfillmentTypeAttri","fulfillmentTypeAttribute","AttributeValues","attribute","_attribute$Name","toLowerCase","TextValue","prodIds","productAvailabilitesPlants","getEstimatedAvailabilityAsync","ProductIds","DefaultWarehouseOnly","FilterByChannelFulfillmentGroup","deliveryOptions","getDeliveryOptionsAsync","productsWithPlantsDelivery","Promise","all","idx","_prod$AttributeValues","_productAvailabilites","ProductWarehouseInventoryAvailabilities","_deliveryOptions$idx$","InventLocationId","PhysicalAvailableInventoryLevelCode","DeliveryOptions","option","Code","isVendorShipAttribute","trim","productAvailabilitesNonPlantsHD","productAvailabilitesNonPlantsCNC","totalProducts","_prod$AttributeValues2","AggregatedProductInventoryAvailabilities","stores","_deliveryOptions$idx$2","_productAvailabilites2","inventoryInformation","mapProductInventoryInformation","productCount","isSharedStateSet","_productAvailabilites3","_getProductAvailability","_fulfillmentTypeAttri2","_attribute$Name2","_prod$AttributeValues3","_productAvailabilites4","_deliveryOptions$idx$3","_prod$AttributeValues4","_deliveryOptions$idx$4","_productAvailabilites5","_productAvailabilites6","itemKey","catch","error","_cookies$get2","addedProducts","maxPDPQuantity","quantity","price","maxQuantity","productAddedAlready","ap","prodQD","_this$state$pdpSearch2","quantityToBeAdded","Price","BasePrice","_this$state$pdpSearch3","cookieName","set","_this$state$simplePro3","_product$Behavior","productInvInfo","inventory","ProductAvailableQuantity","AvailableQuantity","_getCartItemMaxQuantity","maxQuantityForCartLineItem","enableStockCheck","getOrderQuantityLimitsFeatureFlag","Behavior","MaximumQuantity","addedToCartSuccessMessage","addedToCartFailureMessage","productInventoryInformation","navigationUrl","Msdyn365","_cart$result","productList","_convertToSimpleProduct","_this$props$data$cart8","count","addProductsToCart","then","status","userMessage","statusCssString","messageGlyph","isOpen","e","_cart$result2","_this$props$data$cart9","_featureState$result","_this$props$context","_this$props$context$a","isOrderQuantityLimitsFeatureEnabledInHq","featuresState","isOrderQuantityLimitsFeatureEnabledInSiteSettings","platform","enableDefaultOrderQuantityLimits","isOrderQuantityLimitsFeatureEnabled","emailDeliveryModeCode","channel","EmailDeliveryModeCode","addProductToCartInput","availableQuantity","additionalProperties","orderQuantityLimitsFeatureIsEnabled","isAddEmailDeliveryItemToCart","addProductToCart","window","location","assign","substatus","_await$cart$cart","curQuantity","maxQtyLimitReachedMessage","_getInventoryValueMessage","_result$errorDetails","errorDetails","LocalizedMessage","debug","warning","getNonClubPlusDiscountPrices","productRecIds","projectDomain","getActivePricesAsync","Date","activePricesResponse","updatedProducts","getProductsListWithKitProductsHandled","activePrice","_activePrice$Customer","CustomerContextualPrice","Math","max","TradeAgreementPrice","AdjustedPrice","productPricesforcookies","recordId","basePrice","_this$state$pdpSearch4","pdpProd","_activePrice$Customer2","_cookies$get3","pdpProductAlreadyAdded","message","exception","productCollection","productPrices","listType","componentDidMount","allowedRelationType","_this$state$listType","_productCollection$pr","res","maxQData","maxQ","maxQObj","reaction","_this$props$data$cart10","_this$props$data$cart11","splittedUrl","href","split","prodIdStrSplitted","prodId","getByIdAsync","resp","pdpProduct","MasterProductId","searchByCriteriaResp","searchByCriteriaItem","IsMasterProduct","getVariantsByDimensionValuesAsync","variants","_variant$PrimaryImage","variant","fallbackImageUrl","getFallbackImageUrl","ItemId","PrimaryImageUrl","getAllSimpleProducts","ex","componentDidUpdate","prevProps","prevState","snapshot","kitProductIds","kpId","_this$props$context$r","productCollectionProducts","pros","simpleProds","getByIdsAsync","QueryResultSettingsProxy","getPagingFromInputDataOrDefaultValue","_getNotificationModalProducts","_cookies$get4","addedToSummaryProducts","_this$state$simplePro4","miniCartProduct","render","isCarousel","carousel","headingComponent","editProps","onEdit","productCollectionViewProps","SingleSlideCarouselComponentProps","SingleSlideCarousel","flipperPrevLabel","flipperPrevious","flipperNextLabel","flipperNext","parentId","ProductCollectionContainer","moduleProps","classnames","GridComponentProps","itemInventory","IsProductAvailable","shouldShowAddAllProducts","undefined","pdpProductComponent","notificationModalProducts","renderView","_this$props$context2","defaultOrderQuantityLimitsFeatureConfig","_featureStatuses$find","featureStatuses","customerInfo","customerInformation","IsB2b","response","maxQuantityLimitText","maxQuantityForLineItem","replace","minInventory","min","setCookie","name","deltaDaysFromToday","expirationDate","now","setTime","getTime","expires","isEssential","onQuantityChange","newValue","cartProducts","setCartProducts","isSummaryInModal","_cartState$cart$CartL","cartState","getCartState","maxQuantities","_props$context$action","diffInQuantity","cartLineQuantityUpdatedAsync","cartActionResult","changeQinBundlesModalSummary","cartProductsCopy","cp","valueToBeUpdated","_renderCartLines","bundlesSummaryScrollPos","setBundlesSummaryScrollPos","bundlesModalSummaryScrollPos","setBundlesModalSummaryScrollPos","totalPrice","productsAddedInBundles","elemId","elem","MsDyn365","isBrowser","document","getElementById","minProductsToScroll","innerWidth","upArrowId","downArrowId","scrollPos","maxQuantityReachedMsg","maxQuantityReachedInBundlesmsg","_props$data$cart$resu9","_props$data$cart$resu10","_props$data$cart$resu8","_props$data$cart$resu11","scrollTop","hidden","onScroll","abs","ceil","upArrow","downArrow","_props$data$cart","prodInBundles","cookiePrice","shouldShowQuantityReachedErrorMsg","_cookies$get5","priceObj","baseImageUrl","currQ","src","fallBackSrc","altText","gridSettings","viewports","xs","q","w","h","sm","lg","lazyload","loadFailureBehavior","PriceComponent","savingsText","updatedPrice","getTierId","clubPlusDiscountsOfferId","currentCount","onChange","newVal","hideQuantityControls","disabledInput","_props$data$cart$resu12","_cookies$get6","updatedProductsAddedInBundles","dobbiesProductData","cartlineToRemove","_props$data$cart$resu13","cartLineIds","LineId","removeCartLines","Intl","NumberFormat","style","currencyDisplay","currency","minimumFractionDigits","format","_renderCarousel","carouselContainer","items","Node","Object","_renderProduct","_renderGrid","gridContainer","_props$data$cart$resu4","_props$data$cartShare2","updateCartProduct","_props$data$cart$resu","_props$data$cart$resu2","productIds","cartline","productBundleProducts","updatedProductIds","prodBP","simpleProductsWithQuantities","validValues","_props$data$cart$resu3","prodWithQuantity","simpleProdIds","cartProductIds","cartProd","b","a","every","v","needsUpdate","pIds","updatedSimpleProductsWithQuantities","equalsCheck","_props$data$cart$resu5","_props$data$cart$resu6","_props$data$cart$resu7","_props$data$cartShare","Module","addAllProductsOnClick","disabled","notifiCheck","user","isAuthenticated","discountAppliedInCartMessage","productsWarehouseInventory","isPreSale","dobbiesProductsData","inventoryLevel","_filteredProduct$Attr","_filteredProduct$Attr2","_filteredProduct$Attr3","filteredProduct","presell","proAttr","IsVendershipProduct","FulfillmentType","physicalProductMap","mapInventoryWithPhysicalBufferEnabled","totalAvailableProductMap","mapInventoryWithTotalAvailableBufferEnabled","productMap","mapInventoryWithThresholdEnabled","productWarehouseInventoryAvailability","TotalAvailable","productQty","outOfStockThreshold","productAvailableQuantity","shouldRenderLabel","displayLabelEnabled","productQuantity","PhysicalAvailable","StockLevelCode","StockLevelLabel","PhysicalAvailableInventoryLevelLabel","TotalAvailableInventoryLevelCode","TotalAvailableInventoryLevelLabel","inventoryCode","inventoryRanges","binding","modules","dataActions","registerSanitizedActionPath","sanitizedActionPath","dataAction","default","prototype","RegistrationId","require","$type","da","path","runOn","iNM","ns","n","pdp","md","__bindings__","viewDictionary","cn","module","exports","ReactDOM"],"sourceRoot":""}