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GACLE,GAEJG,IAoCkBmH,CAAkB7C,GAChCrS,GA5DO,EAACA,EAA2C4S,KAChE,MAAM,eAAEnF,EAAF,oBAAkBC,EAAlB,QAAuCE,EAAvC,MAAgDG,EAAhD,OAAuDD,GAAW9N,EAExE,OACIjB,EAAAA,cAACyV,EAAAA,KAAIrR,OAAAA,OAAAA,GAAKsK,GACN1O,EAAAA,cAACyV,EAAAA,KAAIrR,OAAAA,OAAAA,GAAKuK,GACLE,EACAE,GAEJC,EACA6E,IAkDgBrF,CAAgBvN,EAAU4S,GACtC9B,EACA0B,KAYJ2C,EAA+DlW,IACxE,MAAM,UAAEsQ,EAAF,gBAAaE,EAAb,YAA8BnO,EAA9B,eAA2C4N,GAAmBjQ,EACpE,OACIF,EAAAA,cAAC2V,EAAAA,OAAMvR,OAAAA,OAAAA,GAAKoM,IACNL,GAAkBO,EACnBnO,GAAemT,EAAsBxV,KAKlD","sources":["webpack://mattressfirm/./src/modules/quickview/utilities/get-valid-product-images.ts?78b7","webpack://mattressfirm/./src/modules/quickview/quickview.tsx?4080","webpack://mattressfirm/./src/modules/quickview/utilities/get-product-details.ts?5cc2","webpack://mattressfirm/./src/modules/quickview/quickview.view.tsx?ee5b"],"sourcesContent":["/*--------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * See License.txt in the project root for license information.\n *--------------------------------------------------------------*/\n\nimport { IActionContext, IImageData, IImageSettings } from '@msdyn365-commerce/core';\nimport { MediaLocation, SimpleProduct } from '@msdyn365-commerce/retail-proxy';\nimport { getMediaLocationsForSelectedVariant, MediaLocationsForSelectedVariantInput } from '@msdyn365-commerce-modules/retail-actions';\n\nexport async function getValidProductImages(\n productId: number, channelId: number,\n actionContext: IActionContext, imageSettings: IImageSettings,\n selectedProduct?: SimpleProduct): Promise {\n const actionInput = new MediaLocationsForSelectedVariantInput(\n productId,\n channelId,\n selectedProduct\n );\n\n return getMediaLocationsForSelectedVariant(actionInput, actionContext)\n .then(mediaLocations => {\n if (mediaLocations) {\n return Promise.all(mediaLocations.map(async (mediaLocation) => validateMediaLocaionAsync(mediaLocation, imageSettings)))\n .then(pairs => {\n return pairs.filter(pair => pair[1]).map(pair => pair[0]);\n });\n }\n return [];\n }).catch(error => {\n actionContext.telemetry.exception(error);\n actionContext.telemetry.debug('Unable to get Media Locations for Selected Variant');\n return [];\n });\n}\n\nasync function validateMediaLocaionAsync(mediaLocation: MediaLocation, imageSettings: IImageSettings): Promise<[IImageData, boolean]> {\n const imageData = {\n src: mediaLocation.Uri || '',\n altText: mediaLocation.AltText || ''\n };\n\n const imageSettingsVal = ((imageSettings.viewports.lg!.q!).replace(/[\"']+/g, ''));\n\n if (imageData.src === '') {\n return [imageData, false];\n }\n\n const imageConcatVal = `${imageData.src}` + '&' + `${imageSettingsVal}`;\n\n return new Promise<[IImageData, boolean]>((resolve) => {\n try {\n const http = new XMLHttpRequest();\n http.open('HEAD', imageConcatVal, true);\n\n http.addEventListener('load', () => {\n resolve([imageData, http.status === 200 || http.status === 201]);\n });\n\n http.addEventListener('error', () => {\n resolve([imageData, false]);\n });\n\n http.send();\n } catch {\n resolve([imageData, false]);\n }\n });\n}\n","/*--------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * See License.txt in the project root for license information.\n *--------------------------------------------------------------*/\n\nimport { ProductDimensionFull } from '@msdyn365-commerce/commerce-entities';\nimport { Carousel, ICarouselProps } from '@msdyn365-commerce/components';\nimport { IImageData, IImageSettings, Image } from '@msdyn365-commerce/core';\nimport {\n ProductDeliveryOptions, ProductDimension,\n ProductDimensionValue, ProductPrice, ReleasedProductType, SimpleProduct\n} from '@msdyn365-commerce/retail-proxy';\nimport {\n ArrayExtensions, FinitePromiseQueue, FinitePromiseQueueError,\n getDeliveryOptionsForSelectedVariant, GetDeliveryOptionsForSelectedVariantInput,\n getDimensionsForSelectedVariant, GetDimensionsForSelectedVariantInput, getPriceForSelectedVariant,\n getProductAvailabilitiesForSelectedVariant, getProductPageUrlSync, getSelectedVariant,\n IProductInventoryInformation, IPromiseQueue, ISelectedProduct, ObjectExtensions, PriceForSelectedVariantInput,\n ProductAvailabilitiesForSelectedVariantInput, SelectedVariantInput\n} from '@msdyn365-commerce-modules/retail-actions';\nimport { Button, format, getPayloadObject, getTelemetryAttributes, getTelemetryObject, IComponentNodeProps, IModuleProps, IncrementalQuantity, INodeProps,\n ISingleSlideCarouselProps, isMobile, ITelemetryContent, KeyCodes, Modal,\n ModalBody, ModalFooter, ModalHeader, NodeTag, onTelemetryClick, SingleSlideCarousel,\n TelemetryConstant, VariantType } from '@msdyn365-commerce-modules/utilities';\nimport classnames from 'classnames';\nimport { Spinner, SpinnerSize } from 'office-ui-fabric-react';\nimport React, { ReactNode } from 'react';\n\nimport {\n getBuyboxAddToCart, getBuyBoxInventoryLabel, getBuyboxKeyInPrice, getBuyboxProductAddToWishlist,\n getBuyboxProductDescription, getBuyboxProductPrice, getBuyboxProductRating, getBuyboxProductTitle,\n getBuyboxProductUnitOfMeasure, getQuantityLimitsMessages,\n IBuyboxAddToCartViewProps, IBuyboxAddToOrderTemplateViewProps, IBuyboxAddToWishlistViewProps,\n IBuyboxCallbacks, IBuyboxCommonData, IBuyboxExtentedProps, IBuyboxKeyInPriceViewProps,\n IBuyboxProductConfigureViewProps, IBuyboxProductQuantityViewProps,\n IBuyboxState, IErrorState, IProductDetails,\n RetailDefaultOrderQuantityLimitsFeatureName\n} from '../../common';\nimport { getBuyboxProductConfigure } from '../../common/buybox-product-configure';\nimport { IQuickviewData } from './quickview.data';\nimport { IQuickviewProps, IQuickviewResources } from './quickview.props.autogenerated';\nimport { getProductDetails } from './utilities/get-product-details';\nimport { getValidProductImages } from './utilities/get-valid-product-images';\n\n/**\n * QuickView props Interface.\n */\nexport interface IQuickviewViewProps extends IQuickviewProps {\n quickView: IModuleProps;\n quickViewButton: React.ReactNode;\n ModalContainer: IModuleProps;\n ModalHeaderContainer: INodeProps;\n ModalHeaderContent: React.ReactNode;\n ModalFooterContainer: INodeProps;\n ModalBodyContainer: INodeProps;\n cartContainerProps: INodeProps;\n state: IBuyboxState;\n ModuleProps?: IModuleProps;\n ProductInfoContainerProps: INodeProps;\n MediaGalleryContainerProps: INodeProps;\n callbacks?: IBuyboxCallbacks;\n title?: React.ReactNode;\n description?: React.ReactNode;\n configure?: IBuyboxProductConfigureViewProps;\n inventoryLabel?: React.ReactNode;\n rating?: React.ReactNode;\n price?: React.ReactNode;\n addToCart?: IBuyboxAddToCartViewProps;\n addToOrderTemplate?: IBuyboxAddToOrderTemplateViewProps;\n addToWishlist?: IBuyboxAddToWishlistViewProps;\n max: number | undefined;\n keyInPrice?: IBuyboxKeyInPriceViewProps;\n quantity?: IBuyboxProductQuantityViewProps;\n quantityLimitsMessages?: React.ReactNode;\n CarouselProps: INodeProps;\n Thumbnails: IQuickViewThumbnailsViewProps;\n seeDetailsbutton: React.ReactNode;\n isModalOpen: boolean;\n loading?: React.ReactNode;\n unitOfMeasure?: React.ReactNode;\n productDetails?: IProductDetails | undefined;\n isMobileDevice?: boolean;\n}\n\n/**\n * QuickView extend props Interface.\n */\nexport interface IQuickviewExtentedProps extends IQuickviewProps {\n selectedProductId?: number;\n selectedDimensions?: ProductDimension[];\n}\n\n/**\n * QuickView thumbnails props Interface.\n */\nexport interface IQuickViewThumbnailsViewProps {\n ThumbnailsContainerProps: INodeProps;\n SingleSlideCarouselComponentProps: INodeProps;\n items?: IQuickViewThumbnailItemViewProps[];\n}\n\n/**\n * QuickView thumbnail item view props Interface.\n */\nexport interface IQuickViewThumbnailItemViewProps {\n ThumbnailItemContainerProps: INodeProps;\n Picture: React.ReactElement;\n}\n\n/**\n * QuickView state Interface.\n */\nexport interface IQuickViewState extends IBuyboxState {\n isDataLoaded: boolean;\n}\n\n/**\n *\n * Quickview component.\n * @extends {React.Component>}\n */\nclass Quickview extends React.Component, IQuickViewState> {\n /**\n * A queue of tasks of processing the changes in the dimensions.\n * Limit to two processes:\n * 1 - for the current process, which is under execution at the moment.\n * 2 - next process, which will process the latest version of data.\n * @remark Enqueueing new promises will discard the previous ones (except the one which is under processing).\n */\n private readonly dimensionUpdateQueue: IPromiseQueue = new FinitePromiseQueue(2);\n\n private dimensions: { [id: number]: string } = {};\n\n private readonly telemetryContent: ITelemetryContent;\n\n private productDetails: IProductDetails | undefined;\n\n private readonly quickViewCallbacks: IBuyboxCallbacks = {\n updateQuantity: (newQuantity: number): boolean => {\n const errorState = { ...this.state.errorState };\n errorState.quantityError = undefined;\n errorState.otherError = undefined;\n\n this.setState({ quantity: newQuantity, errorState });\n return true;\n },\n updateErrorState: (newErrorState: IErrorState): void => {\n this.setState({ errorState: newErrorState });\n },\n updateSelectedProduct: (\n newSelectedProduct: Promise,\n newInventory: IProductInventoryInformation | undefined,\n newPrice: ProductPrice | undefined,\n newDeliveryOptions: ProductDeliveryOptions | undefined\n ): void => {\n this.setState({\n selectedProduct: newSelectedProduct,\n productAvailableQuantity: newInventory,\n productDeliveryOptions: newDeliveryOptions\n });\n this._updatePrice(newPrice);\n },\n dimensionSelectedAsync: async (selectedDimensionId: number, selectedDimensionValueId: string): Promise => {\n this.dimensions[selectedDimensionId] = selectedDimensionValueId;\n return this.dimensionUpdateQueue.enqueue(async () => {\n return this._updateDimensions();\n }).catch((error: any) => { // Ignore discarded processes.\n if (error !== FinitePromiseQueueError.ProcessWasDiscardedFromTheQueue) {\n throw error;\n }\n });\n },\n getDropdownName: (dimensionType: number, resources: IQuickviewResources): string => {\n return this._getDropdownName(dimensionType, resources);\n },\n changeModalOpen: (isModalOpen: boolean): void => {\n this._hideQuickViewDialog();\n },\n changeUpdatingDimension: (isUpdatingDimension: boolean): void => {\n this.setState({ isUpdatingDimension });\n },\n updateKeyInPrice: (customPrice: number): void => {\n // Remove custom amount error when updating the custom price\n const errorState = { ...this.state.errorState };\n errorState.customAmountError = undefined;\n\n this.setState({ isPriceKeyedIn: true, keyInPriceAmount: customPrice, errorState });\n this._updatePrice(this.state.productPrice, customPrice);\n }\n };\n\n private readonly defaultGalleryImageSettings: IImageSettings = {\n viewports: {\n xs: { q: 'w=767&h=767&m=8', w: 0, h: 0 },\n sm: { q: 'w=600&h=600&m=8', w: 0, h: 0 },\n md: { q: 'w=600&h=772&m=8', w: 0, h: 0 },\n lg: { q: 'h=772&m=8', w: 0, h: 0 }\n },\n lazyload: true,\n cropFocalRegion: true\n };\n\n private readonly defaultThumbnailImageSettings: IImageSettings = {\n viewports: {\n xs: { q: 'w=100&m=8', w: 100, h: 0 },\n lg: { q: 'w=100&m=8', w: 100, h: 0 }\n },\n lazyload: true,\n cropFocalRegion: true\n };\n\n public constructor(props: IQuickviewProps) {\n super(props);\n this.state = {\n modalOpen: false,\n quantity: 1,\n min: undefined,\n max: undefined,\n errorState: {\n configureErrors: {}\n },\n selectedProduct: undefined,\n productPrice: undefined,\n productDeliveryOptions: undefined,\n isUpdatingDimension: false,\n activeIndex: 0,\n animating: false,\n mediaGalleryItems: undefined,\n isDataLoaded: false\n };\n\n this._quickViewCloseButtonclick = this._quickViewCloseButtonclick.bind(this);\n this.telemetryContent = getTelemetryObject(props.context.request.telemetryPageName!, props.friendlyName, props.telemetry);\n }\n\n /**\n * React should component udpate function.\n * @param nextProps - Next Props.\n * @param nextState - Next State.\n * @returns Boolean - Whether the module will rerender or not.\n */\n public shouldComponentUpdate(nextProps: IQuickviewProps, nextState: IBuyboxState): boolean {\n if (this.state === nextState && this.props.data === nextProps.data) {\n return false;\n }\n return true;\n }\n\n public render(): JSX.Element | null {\n const {\n config: { className = '' },\n resources\n } = this.props;\n const { max } = this.state;\n const product = this.productDetails?.product ? this.productDetails.product : undefined;\n const props = this.props as IBuyboxExtentedProps;\n const defaultMinimumKeyInPrice = 10;\n const defaultMaximumKeyInPrice = 100;\n const isMobileDevice = isMobile({ variant: VariantType.Viewport, context: this.props.context.request }) === 'xs';\n const viewprops: IQuickviewViewProps = {\n ...(this.props as IQuickviewExtentedProps),\n state: this.state,\n productDetails: this.productDetails,\n isModalOpen: this.state.modalOpen!,\n quickView: {\n moduleProps: this.props,\n className: classnames('ms-quickView', className),\n tag: 'div'\n },\n isMobileDevice,\n quickViewButton: ,\n ModalContainer: {\n moduleProps: this.props,\n tag: Modal,\n className: 'ms-quickView__dialog',\n isOpen: this.state.modalOpen,\n 'aria-label': format(resources.quickViewAriaLabel, this.productDetails?.product?.Name),\n toggle: this._quickViewCloseButtonclick,\n modalTransition: { timeout: 0 },\n shouldUpdateFocusToFirstElement: this.state.isDataLoaded\n },\n ModalHeaderContainer: {\n tag: ModalHeader,\n className: 'ms-quickView__header',\n toggle: this._quickViewCloseButtonclick\n },\n ModalFooterContainer: {\n tag: ModalFooter,\n className: 'ms-quickView__footer'\n },\n ModalHeaderContent: '',\n ModalBodyContainer: {\n tag: ModalBody,\n className: 'ms-quickView__body'\n },\n cartContainerProps: {\n className: 'ms-quickView__product-add-to-cart'\n },\n ProductInfoContainerProps: {\n className: 'ms-quickView__content'\n },\n MediaGalleryContainerProps: {\n className: 'ms-quickView__media-gallery'\n },\n seeDetailsbutton: this._renderSeeDetailButton(product),\n loading: !this.state.isDataLoaded && ,\n callbacks: this.quickViewCallbacks,\n title: this.state.isDataLoaded && getBuyboxProductTitle(props, this.productDetails),\n description: this.state.isDataLoaded && getBuyboxProductDescription(props, this.productDetails),\n configure: this.state.isDataLoaded ? getBuyboxProductConfigure(\n props, this.state, this.quickViewCallbacks, this.productDetails, this.props.selectedDimensions) : undefined,\n price: this.state.isDataLoaded && getBuyboxProductPrice(props, this.state),\n unitOfMeasure: this.state.isDataLoaded && getBuyboxProductUnitOfMeasure(props, this.productDetails),\n rating: this.state.isDataLoaded && !this.props.context.app.config.hideRating && getBuyboxProductRating(props, this.productDetails),\n addToCart:\n this.state.isDataLoaded ? (\n getBuyboxAddToCart(props, this.state, this.quickViewCallbacks, defaultMinimumKeyInPrice, defaultMaximumKeyInPrice, this.productDetails)\n ) : undefined,\n keyInPrice:\n this.state.isDataLoaded && this.props.config.enableKeyInPrice &&\n this.state.isCustomPriceSelected ? getBuyboxKeyInPrice(props, this.state, this.quickViewCallbacks) : undefined,\n quantity: product?.IsGiftCard ? undefined : this._renderQuantity(this.props, this.state, this.quickViewCallbacks),\n inventoryLabel: this.state.isDataLoaded && getBuyBoxInventoryLabel(props, this.productDetails),\n addToWishlist: this.state.isDataLoaded ? getBuyboxProductAddToWishlist(props, this.state, this.quickViewCallbacks, this.productDetails) : undefined,\n quantityLimitsMessages: this.state.isDataLoaded && getQuantityLimitsMessages(props, this.state),\n max,\n CarouselProps: this._renderCarousel(),\n Thumbnails: this._renderThumbnails()\n };\n\n return this.props.renderView(viewprops) as React.ReactElement;\n }\n\n /**\n * Method to render detail button on quick view.\n * @param product - Simple product object.\n * @returns JSX element.\n */\n private readonly _renderSeeDetailButton = (product: SimpleProduct | undefined): JSX.Element => {\n const { config } = this.props;\n const payLoad = getPayloadObject('click', this.telemetryContent, TelemetryConstant.seeDetails, '');\n const attributes = getTelemetryAttributes(this.telemetryContent, payLoad);\n\n return (\n \n {config.seeDetailsLinkText}\n \n );\n };\n\n /**\n * Method to return carousel.\n * @returns Node props.\n */\n private readonly _renderCarousel = (): INodeProps => {\n const { config, resources } = this.props;\n let mediaGalleryItems: ReactNode[];\n let keys: (string | undefined)[];\n const galleryImageSettings = config.galleryImageSettings;\n if (galleryImageSettings) {\n galleryImageSettings.cropFocalRegion = true;\n }\n\n if (ArrayExtensions.hasElements(this.state.mediaGalleryItems)) {\n mediaGalleryItems = this.state.mediaGalleryItems.map((item: IImageData, index: number) => {\n return this._renderCarouselItemImageView(item, galleryImageSettings || this.defaultGalleryImageSettings, index);\n });\n keys = [...this.state.mediaGalleryItems.map(item => item.src)];\n } else {\n mediaGalleryItems = [this._renderEmptyImage(galleryImageSettings)];\n keys = ['empty'];\n }\n\n const props: IComponentNodeProps = {\n tag: Carousel,\n className: 'ms-media-gallery__carousel',\n items: mediaGalleryItems,\n activeIndex: this.state.activeIndex ?? 0,\n next: this.next,\n previous: this.previous,\n interval: false,\n directionTextPrev: resources.previousScreenshotFlipperText,\n directionTextNext: resources.nextScreenshotFlipperText,\n indicatorAriaText: resources.ariaLabelForSlide,\n onIndicatorsClickHandler: this.goToIndex,\n handleOnExited: this.onExited,\n handleOnExiting: this.onExiting,\n key: keys\n };\n\n return props;\n };\n\n /**\n * Method to render thumbnails.\n * @returns QuickView Thumbnails view props.\n */\n private readonly _renderThumbnails = (): IQuickViewThumbnailsViewProps => {\n const { config, id, resources } = this.props;\n\n const thumbnailImageSettings = config.thumbnailImageSettings;\n if (thumbnailImageSettings) {\n thumbnailImageSettings.cropFocalRegion = true;\n }\n\n let mediaGalleryItems: IQuickViewThumbnailItemViewProps[];\n let keys: (string | undefined)[];\n if (ArrayExtensions.hasElements(this.state.mediaGalleryItems)) {\n mediaGalleryItems = this.state.mediaGalleryItems.map((item: IImageData, index: number) => {\n return this._getThumbnailItem(\n item,\n thumbnailImageSettings ?? this.defaultThumbnailImageSettings,\n index,\n this.state.activeIndex!\n );\n });\n keys = [...this.state.mediaGalleryItems.map(item => item.src)];\n } else {\n mediaGalleryItems = [];\n keys = [];\n }\n\n return (\n {\n ThumbnailsContainerProps: { className: 'ms-media-gallery__thumbnails-container' },\n SingleSlideCarouselComponentProps: {\n tag: SingleSlideCarousel,\n className: 'ms-media-gallery__thumbnails',\n flipperPrevLabel: resources.previousScreenshotFlipperText,\n flipperNextLabel: resources.nextScreenshotFlipperText,\n parentId: id,\n useTabList: true,\n key: JSON.stringify(keys)\n } as IComponentNodeProps,\n items: mediaGalleryItems\n }\n );\n };\n\n private _updateMediaItems(lastUpdatedTime: number): void {\n const product = this.productDetails?.product;\n if (!this.state.mediaGalleryItems && product?.PrimaryImageUrl) {\n this.setState({\n mediaGalleryItems: [this._mapProductToImageData(product)],\n lastUpdate: lastUpdatedTime\n });\n }\n }\n\n private _updatePrice(\n newPrice: ProductPrice | undefined,\n customPrice: number | undefined = this.state.keyInPriceAmount): void {\n if (this.state.isCustomPriceSelected && newPrice) {\n newPrice.CustomerContextualPrice = customPrice;\n }\n this.setState({ productPrice: newPrice });\n }\n\n private readonly _updateDimensions = async (): Promise => {\n const {\n context: {\n actionContext,\n request: {\n apiSettings: { channelId }\n }\n }\n } = this.props;\n\n const { product, productDimensions } = this.productDetails!;\n\n if (!product || !productDimensions) {\n return;\n }\n\n const dimensionsToUpdate: { [id: number]: string } = { ...this.dimensions };\n this.setState({ isUpdatingDimension: true });\n\n // Step 1: Clear error state to display relevant errors\n if (this.state.errorState.otherError || this.state.errorState.quantityError) {\n const clearErrorState = { ...this.state.errorState };\n clearErrorState.otherError = undefined;\n if (this.state.errorState.errorHost === 'ADDTOCART') {\n clearErrorState.quantityError = undefined;\n clearErrorState.errorHost = undefined;\n }\n this.setState({ errorState: clearErrorState });\n }\n\n // Step 2: Clear any errors indicating the dimension wasn't selected\n for (const key of Object.keys(dimensionsToUpdate)) {\n if (this.state.errorState.configureErrors[key]) {\n const errorState = { ...this.state.errorState };\n errorState.configureErrors[key] = undefined;\n\n this.setState({ errorState });\n }\n }\n\n // Step 3, Build the actually selected dimensions, prioritizing the information in state\n // over the information in data\n const mappedDimensions = productDimensions.map(dimension => {\n return {\n DimensionTypeValue: dimension.DimensionTypeValue,\n DimensionValue: this._updateDimensionValue(dimension, dimensionsToUpdate[dimension.DimensionTypeValue]) || dimension.DimensionValue,\n ExtensionProperties: dimension.ExtensionProperties\n };\n }).filter(dimension => {\n return dimension && dimension.DimensionValue;\n });\n\n // Step 4. Use these dimensions hydrate the product. Wrap this in a promise\n // so that places like add to cart can await it\n const selectedProduct = new Promise(async (resolve) => {\n const newProduct = (await getSelectedVariant(\n new SelectedVariantInput(\n product.MasterProductId ? product.MasterProductId : product.RecordId,\n channelId,\n mappedDimensions\n ),\n actionContext\n ));\n if (newProduct) {\n // @ts-expect-error\n this.productDetails.productDimensions = await (getDimensionsForSelectedVariant(\n new GetDimensionsForSelectedVariantInput(\n newProduct.MasterProductId ? newProduct.MasterProductId : newProduct.RecordId,\n channelId,\n mappedDimensions\n ),\n actionContext\n ));\n }\n\n resolve(newProduct);\n });\n\n this.setState({ selectedProduct });\n const variantProduct = await selectedProduct;\n\n if (variantProduct && this.productDetails) {\n // Step 5. Use these dimensions hydrate the inventory. Wrap this in a promise\n // so that places like add to cart can await it\n this.productDetails.product = variantProduct;\n const images = await getValidProductImages(\n this.productDetails.product.RecordId || 0,\n +this.props.context.request.apiSettings.channelId,\n this.props.context.actionContext,\n this.props.config.thumbnailImageSettings || this.defaultThumbnailImageSettings,\n variantProduct.productVariant ?? variantProduct\n );\n this.setState({\n mediaGalleryItems: [...images],\n activeIndex: 0,\n lastUpdate: Date.now()\n });\n\n const newAvailableQuantity = await getProductAvailabilitiesForSelectedVariant(\n new ProductAvailabilitiesForSelectedVariantInput(\n variantProduct.RecordId,\n channelId\n ),\n actionContext\n );\n\n this.productDetails.productAvailableQuantity = newAvailableQuantity!;\n\n const isCustompriceSelected = variantProduct.Dimensions?.find(\n dimension => dimension.DimensionTypeValue === 4 && dimension.DimensionValue?.Value?.toLowerCase() === 'custom');\n\n if (isCustompriceSelected) {\n this.setState({ isCustomPriceSelected: true });\n } else {\n // Remove custom amount error when unselect the custom amount\n const errorState = { ...this.state.errorState };\n errorState.customAmountError = undefined;\n\n this.setState({ isCustomPriceSelected: false, isPriceKeyedIn: false, errorState });\n }\n\n if (newAvailableQuantity && newAvailableQuantity.length > 0) {\n this.setState({ productAvailableQuantity: newAvailableQuantity[0] });\n } else {\n this.setState({ productAvailableQuantity: undefined });\n }\n\n // Step 6. Use these dimensions hydrate the product price.\n const newPrice = await getPriceForSelectedVariant(\n new PriceForSelectedVariantInput(\n variantProduct.RecordId,\n channelId\n ),\n actionContext\n );\n\n if (newPrice) {\n this._updatePrice(newPrice);\n }\n\n const RetailMulitplePickupMFeatureState = this.props.data.featureState.result?.find(featureState => featureState.Name === 'Dynamics.AX.Application.RetailMultiplePickupDeliveryModeFeature');\n\n // Step 7. Use these dimensions hydrate the product delivery options.\n const newDeliveryOptions = await getDeliveryOptionsForSelectedVariant(\n new GetDeliveryOptionsForSelectedVariantInput(\n variantProduct.RecordId,\n channelId,\n undefined,\n undefined,\n RetailMulitplePickupMFeatureState?.IsEnabled\n ),\n actionContext\n );\n\n if (newDeliveryOptions) {\n this.setState({ productDeliveryOptions: newDeliveryOptions });\n }\n\n this.setState({ isUpdatingDimension: false });\n await this._updateQuantitiesInState(variantProduct);\n }\n };\n\n private _getProductURL(product: SimpleProduct | undefined): string {\n if (product) {\n let producturl = ' ';\n producturl = getProductPageUrlSync(product.Name || '', product.RecordId, this.props.context && this.props.context.actionContext, undefined);\n return producturl;\n }\n return '';\n }\n\n private async _updateQuantitiesInState(product: SimpleProduct): Promise {\n const isOrderQuantityLimitsFeatureEnabled = await this._isOrderQuantityLimitsFeatureEnabled();\n const defaultQuantity = 1;\n const defaultMaxQuantity = 10;\n if (isOrderQuantityLimitsFeatureEnabled && product) {\n\n // For some of the products the DefaultQuantity is zero\n this.setState({\n quantity: product.Behavior?.DefaultQuantity || defaultQuantity,\n min: product.Behavior?.MinimumQuantity || defaultQuantity,\n\n // If max by feature in default order settings is not defined then use max from site settings or default max 10.\n max: (product.Behavior?.MaximumQuantity && product.Behavior?.MaximumQuantity > 0) ? product.Behavior?.MaximumQuantity : this.props.context.app.config.maxQuantityForCartLineItem || defaultMaxQuantity\n });\n } else {\n this.setState({\n min: 1,\n max: this.props.context.app.config.maxQuantityForCartLineItem || 10\n });\n }\n }\n\n private readonly _updateDimensionValue = (productDimensionFull: ProductDimensionFull, newValueId: string | undefined): ProductDimensionValue | undefined => {\n if (newValueId && productDimensionFull.DimensionValues) {\n return productDimensionFull.DimensionValues.find(dimension => dimension.RecordId === +newValueId);\n }\n\n return undefined;\n };\n\n private readonly _getDropdownName = (dimensionType: number, resources: IQuickviewResources): string => {\n const isGiftCard = this.productDetails?.product?.IsGiftCard;\n\n switch (dimensionType) {\n case 1: // ProductDimensionType.Color\n return resources.productDimensionTypeColor;\n case 2: // ProductDimensionType.Configuration\n return resources.productDimensionTypeConfiguration;\n case 3: // ProductDimensionType.Size\n return resources.productDimensionTypeSize;\n case 4: // ProductDimensionType.Style\n return isGiftCard ? resources.productDimensionTypeAmount : resources.productDimensionTypeStyle;\n default:\n return '';\n }\n };\n\n private async _isOrderQuantityLimitsFeatureEnabled(): Promise {\n const defaultOrderQuantityLimitsFeatureConfig = this.props.context.request.app.platform?.enableDefaultOrderQuantityLimits;\n if (defaultOrderQuantityLimitsFeatureConfig === 'none') {\n return false;\n }\n\n const featureStatuses = await this.props.data.featureState;\n const isFeatureEnabledInHq = featureStatuses.find(featureState => featureState.Name === RetailDefaultOrderQuantityLimitsFeatureName)?.IsEnabled;\n if (!isFeatureEnabledInHq) {\n return false;\n }\n\n if (defaultOrderQuantityLimitsFeatureConfig === 'all') {\n return true;\n }\n let customerInfo;\n try {\n customerInfo = await this.props.data.customerInformation;\n } catch (error) {\n this.props.telemetry.information(error);\n this.props.telemetry.debug('Unable to receive Customer Information. May be user is not authorized');\n return false;\n }\n\n return customerInfo !== undefined &&\n ((defaultOrderQuantityLimitsFeatureConfig === 'b2b' && customerInfo.IsB2b) ||\n (defaultOrderQuantityLimitsFeatureConfig === 'b2c' && !customerInfo.IsB2b));\n }\n\n private readonly onExiting = () => {\n this.setState({ animating: true });\n };\n\n private readonly onExited = () => {\n this.setState({ animating: false });\n };\n\n private readonly next = (): void => {\n if (this.isLastItem() === undefined) {\n return;\n }\n\n const nextIndex = this.isLastItem() ? 0 : this.state.activeIndex! + 1;\n this.goToIndex(nextIndex);\n };\n\n private readonly previous = (): void => {\n const nextIndex = this.isFirstItem() ? (this.state.mediaGalleryItems ? this.state.mediaGalleryItems.length - 1 : 0) : this.state.activeIndex! - 1;\n this.goToIndex(nextIndex);\n };\n\n private readonly goToIndex = (index: number): void => {\n this.setState({ activeIndex: index });\n };\n\n private _renderCarouselItemImageView(image: IImageData, imageSettings: IImageSettings, index: number): React.ReactNode {\n return (<>\n {this._getCarouselItem(image, imageSettings, index)}\n );\n }\n\n private readonly _getCarouselItem = (image: IImageData, imageSettings: IImageSettings, index: number): React.ReactNode => (\n \n );\n\n private readonly _getThumbnailItem = (image: IImageData, imageSettings: IImageSettings, index: number, modifiedActiveIndex: number): IQuickViewThumbnailItemViewProps => {\n const classes = classnames(\n 'ms-media-gallery__thumbnail-item',\n modifiedActiveIndex === index ? 'ms-media-gallery__thumbnail-item-active' : ''\n );\n\n return {\n ThumbnailItemContainerProps: {\n tag: 'li' as NodeTag,\n className: classes,\n role: 'tab',\n tabIndex: 0,\n key: index,\n 'aria-label': image.altText,\n 'aria-selected': modifiedActiveIndex === index,\n 'aria-controls': `${this.props.id}__carousel-item__${index}`,\n onClick: this._generateOnThumbnailClick(index),\n onKeyDown: this._generateOnThumbnailKeyDown(index)\n },\n Picture: (\n \n )\n };\n };\n\n private readonly _generateOnThumbnailKeyDown = (index: number) => {\n return (event: React.KeyboardEvent) => {\n if (event.which === KeyCodes.Enter || event.which === KeyCodes.Space) {\n event.preventDefault();\n this.goToIndex(index);\n }\n };\n };\n\n private readonly _generateOnThumbnailClick = (index: number) => {\n return (event: React.MouseEvent) => {\n event.preventDefault();\n this.goToIndex(index);\n };\n };\n\n private _mapProductToImageData(product: SimpleProduct): IImageData {\n return {\n src: product.PrimaryImageUrl || '',\n altText: product.Name\n };\n }\n\n private readonly isFirstItem = () => this.state.activeIndex === 0;\n\n private readonly isLastItem = () => this.state.mediaGalleryItems && this.state.activeIndex === this.state.mediaGalleryItems.length - 1;\n\n private readonly onClickHandler = async (event: React.MouseEvent) => {\n return this._onClick(event, this.props);\n };\n\n private readonly _onClick = async (_event: React.MouseEvent, props: IQuickviewExtentedProps) => {\n if (!ObjectExtensions.isNullOrUndefined(props.selectedProductId)) {\n const {\n context: {\n actionContext,\n request: {\n apiSettings: { channelId }\n }\n }\n } = this.props;\n\n if (this.props.selectedProductId) {\n this.setState({ modalOpen: true });\n const productId = this.props.selectedProductId;\n const selectedDimensions = this.props.selectedDimensions;\n this.productDetails = await getProductDetails(productId, channelId, actionContext, selectedDimensions);\n const {\n product,\n productPrice\n } = this.productDetails;\n const currentTime: number = Date.now();\n this._updateMediaItems(currentTime);\n if (productPrice) {\n this._updatePrice(productPrice);\n }\n\n if (product) {\n // Check if the product is service or not by product type\n if (product.ItemTypeValue === ReleasedProductType.Service) {\n this.setState({ isServiceItem: true });\n }\n await this._updateQuantitiesInState(product);\n const images = await getValidProductImages(\n product.RecordId,\n +this.props.context.request.apiSettings.channelId,\n this.props.context.actionContext,\n this.props.config.thumbnailImageSettings || this.defaultThumbnailImageSettings,\n product.productVariant ?? product\n );\n\n this.setState({\n mediaGalleryItems: [...images],\n activeIndex: 0,\n lastUpdate: currentTime\n });\n }\n this.setState({ isDataLoaded: true });\n }\n }\n };\n\n private readonly _quickViewCloseButtonclick = () => {\n this._hideQuickViewDialog();\n };\n\n private _hideQuickViewDialog(): void {\n this.dimensions = [];\n this.setState({\n modalOpen: false,\n quantity: 1,\n min: undefined,\n max: undefined,\n errorState: {\n configureErrors: {}\n },\n selectedProduct: undefined,\n productPrice: undefined,\n productDeliveryOptions: undefined,\n isUpdatingDimension: false,\n productAvailableQuantity: undefined,\n lastUpdate: undefined,\n activeIndex: undefined,\n animating: undefined,\n mediaGalleryItems: [],\n isDataLoaded: false\n });\n\n }\n\n /**\n * Quantity Change Handler.\n * @param callbacks -Buybox callbacks.\n * @returns Update quantity.\n */\n private readonly onChangeHandler = (callbacks: IBuyboxCallbacks) => (newValue: number): boolean => {\n if (callbacks.updateQuantity) {\n return callbacks.updateQuantity(newValue);\n }\n return true;\n };\n\n private readonly _renderQuantity = (props: IQuickviewExtentedProps, state: IBuyboxState, callbacks: IBuyboxCallbacks): IBuyboxProductQuantityViewProps => {\n\n const {\n resources\n } = props;\n\n const\n {\n quantity,\n max,\n errorState: {\n quantityError\n }\n } = state;\n\n return {\n ContainerProps: {\n className: 'ms-quickView__quantity'\n },\n LabelContainerProps: {\n tag: 'label',\n className: 'ms-quickView__product-quantity-label',\n htmlFor: 'ms-quickView__product-quantity-input'\n },\n heading: (\n
\n {resources.productQuantityHeading}\n
\n ),\n errors: quantityError && (\n \n \n ),\n input: (\n \n )\n };\n };\n\n private _renderEmptyImage(imageSettings: IImageSettings | undefined): React.ReactNode {\n return (\n
\n \n
\n );\n }\n}\nexport default Quickview;\n","/*--------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * See License.txt in the project root for license information.\n *--------------------------------------------------------------*/\n\nimport { IActionContext } from '@msdyn365-commerce/core';\nimport { getCartStateData, GetCartStateDataInput } from '@msdyn365-commerce/global-state';\nimport { ProductDimension } from '@msdyn365-commerce/retail-proxy';\nimport {\n getDimensionsForSelectedVariant, GetDimensionsForSelectedVariantInput, getPriceForSelectedVariant, getProductAvailabilitiesForSelectedVariant, getRatingsSummary, GetRatingsSummaryInput,\n getRnrEndpointId, getRnrPartnerId, getSelectedVariant, PriceForSelectedVariantInput, ProductAvailabilitiesForSelectedVariantInput,\n SelectedVariantInput\n} from '@msdyn365-commerce-modules/retail-actions';\n\nimport { IProductDetails } from '../../../common/buyboxInterface';\n\n/**\n * Calls the Retail API and returns the product details.\n * @param productId\n * @param channelId\n * @param ctx\n * @param selectedDimensions - Dimensions previously selected for the product variant.\n */\nexport async function getProductDetails(\n productId: number, channelId: number, ctx: IActionContext, selectedDimensions?: ProductDimension[]): Promise {\n const productDetails: IProductDetails = {};\n\n if (productId > 0 && channelId > 0) {\n const tenantId = getRnrPartnerId(ctx);\n const serviceEndPoint = getRnrEndpointId(ctx);\n\n // Get Product Details\n await getSelectedVariant(\n new SelectedVariantInput(productId, channelId, selectedDimensions, 'get'),\n ctx\n ).then(async productResult => {\n if (productResult) {\n productDetails.product = productResult;\n }\n })\n .catch(error => {\n ctx.telemetry.exception(error);\n });\n\n // Get Product Availability\n await getProductAvailabilitiesForSelectedVariant(\n new ProductAvailabilitiesForSelectedVariantInput(\n productId,\n channelId\n ),\n ctx\n ).then(productAvailabilities => {\n if (productAvailabilities) {\n productDetails.productAvailableQuantity = productAvailabilities;\n }\n })\n .catch(error => {\n ctx.telemetry.exception(error);\n });\n\n // Get Product Price\n await getPriceForSelectedVariant(\n new PriceForSelectedVariantInput(productId, channelId, undefined),\n ctx\n ).then(productPrice => {\n if (productPrice) {\n productDetails.productPrice = productPrice;\n }\n })\n .catch(error => {\n ctx.telemetry.exception(error);\n });\n\n // Get product dimensions\n await getDimensionsForSelectedVariant(\n new GetDimensionsForSelectedVariantInput(productId, channelId, selectedDimensions),\n ctx\n ).then(productDimensions => {\n if (productDimensions) {\n productDetails.productDimensions = productDimensions;\n }\n })\n .catch(error => {\n ctx.telemetry.exception(error);\n });\n\n // Get Cart State\n await getCartStateData(\n new GetCartStateDataInput(ctx.requestContext.apiSettings),\n ctx\n ).then(cartState => {\n productDetails.cart = cartState;\n })\n .catch(error => {\n ctx.telemetry.exception(error);\n });\n\n // Get Product Ratings\n if (tenantId && serviceEndPoint) {\n await getRatingsSummary(\n new GetRatingsSummaryInput(productId.toString(), tenantId, serviceEndPoint),\n ctx\n ).then(ratingsSummaryData => {\n if (ratingsSummaryData) {\n productDetails.ratingsSummary = ratingsSummaryData;\n }\n })\n .catch(error => {\n ctx.telemetry.exception(error);\n });\n }\n\n }\n\n return productDetails;\n}\n","/*--------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * See License.txt in the project root for license information.\n *--------------------------------------------------------------*/\n\nimport { Module, Node } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport { IBuyboxAddToCartViewProps, IBuyboxAddToWishlistViewProps, IBuyboxKeyInPriceViewProps, IBuyboxProductConfigureDropdownViewProps, IBuyboxProductConfigureViewProps, IBuyboxProductQuantityViewProps } from '../../common';\nimport { IQuickviewViewProps } from './quickview';\n\nconst _renderAddToCart = (addToCart: IBuyboxAddToCartViewProps): JSX.Element => {\n const { ContainerProps, errorBlock, button } = addToCart;\n\n return (\n \n {errorBlock}\n {button}\n \n );\n};\n\nconst _renderAddToWishlist = (addToWishlist: IBuyboxAddToWishlistViewProps): JSX.Element => {\n const { ContainerProps, errorBlock, button } = addToWishlist;\n\n return (\n \n {errorBlock}\n {button}\n \n );\n};\n\nconst _renderConfigureDropdown = (dropdown: IBuyboxProductConfigureDropdownViewProps): JSX.Element => {\n const { ContainerProps, LabelContainerProps, heading, errors, select } = dropdown;\n\n return (\n \n \n {heading}\n {errors}\n \n {select}\n \n );\n};\n\nconst _renderQuickViewPopup = (props: IQuickviewViewProps): JSX.Element => {\n const { ModalContainer, ModalHeaderContainer, ModalFooterContainer, ModalHeaderContent, ModalBodyContainer, addToWishlist, addToCart,\n cartContainerProps } = props;\n\n return (\n \n \n {ModalHeaderContent}\n \n \n {_renderBodyContent(props)}\n \n \n \n {addToCart && _renderAddToCart(addToCart)}\n {addToWishlist && _renderAddToWishlist(addToWishlist)}\n \n \n \n );\n};\n\nconst _renderQuantity = (quantity: IBuyboxProductQuantityViewProps, quantityLimitsMessages: React.ReactNode): JSX.Element => {\n const { ContainerProps, LabelContainerProps, heading, input, errors } = quantity;\n\n return (\n \n \n {heading}\n {errors}\n \n {input}\n {quantityLimitsMessages}\n \n );\n};\n\nconst _renderKeyInPrice = (keyInPrice: IBuyboxKeyInPriceViewProps): JSX.Element => {\n const { ContainerProps, LabelContainerProps, heading, input } = keyInPrice;\n\n return (\n \n \n {heading}\n \n {input}\n \n );\n};\n\nconst _renderConfigure = (configure: IBuyboxProductConfigureViewProps): JSX.Element => {\n const { ContainerProps, dropdowns } = configure;\n\n return (\n \n {dropdowns.map(_renderConfigureDropdown)}\n \n );\n};\n\nconst _renderBodyContent = (props: IQuickviewViewProps): JSX.Element => {\n const { title, price, rating, keyInPrice, quantity, configure, inventoryLabel, quantityLimitsMessages, seeDetailsbutton, loading,\n ProductInfoContainerProps, MediaGalleryContainerProps, CarouselProps, unitOfMeasure } = props;\n if (loading) {\n return (\n <>\n {loading}\n \n );\n }\n return (\n <>\n \n \n \n \n {title}\n {price}\n {unitOfMeasure}\n {rating}\n {configure && _renderConfigure(configure)}\n {keyInPrice && _renderKeyInPrice(keyInPrice)}\n {quantity && _renderQuantity(quantity, quantityLimitsMessages)}\n {seeDetailsbutton}\n {inventoryLabel}\n \n \n );\n\n};\n\n/**\n * Functional component which renders quick view button and popup based by the given props file.\n * @param {IQuickviewViewProps} props - Configuration for the quick view component.\n * @returns {React.FC} - Functional component of the quick view.\n */\nexport const QuickViewFunctionalComponent: React.FC = (props: IQuickviewViewProps) => {\n const { quickView, quickViewButton, isModalOpen, isMobileDevice } = props;\n return (\n \n {!isMobileDevice && quickViewButton}\n {isModalOpen && _renderQuickViewPopup(props)}\n \n );\n};\n\nexport default QuickViewFunctionalComponent;\n"],"names":["async","getValidProductImages","productId","channelId","actionContext","imageSettings","selectedProduct","actionInput","MediaLocationsForSelectedVariantInput","getMediaLocationsForSelectedVariant","then","mediaLocations","Promise","all","map","mediaLocation","imageData","src","Uri","altText","AltText","imageSettingsVal","viewports","lg","q","replace","imageConcatVal","resolve","http","XMLHttpRequest","open","addEventListener","status","send","validateMediaLocaionAsync","pairs","filter","pair","catch","error","telemetry","exception","debug","Quickview","React","constructor","props","super","dimensionUpdateQueue","FinitePromiseQueue","dimensions","quickViewCallbacks","updateQuantity","newQuantity","errorState","this","state","quantityError","undefined","otherError","setState","quantity","updateErrorState","newErrorState","updateSelectedProduct","newSelectedProduct","newInventory","newPrice","newDeliveryOptions","productAvailableQuantity","productDeliveryOptions","_updatePrice","dimensionSelectedAsync","selectedDimensionId","selectedDimensionValueId","enqueue","_updateDimensions","FinitePromiseQueueError","getDropdownName","dimensionType","resources","_getDropdownName","changeModalOpen","isModalOpen","_hideQuickViewDialog","changeUpdatingDimension","isUpdatingDimension","updateKeyInPrice","customPrice","customAmountError","isPriceKeyedIn","keyInPriceAmount","productPrice","defaultGalleryImageSettings","xs","w","h","sm","md","lazyload","cropFocalRegion","defaultThumbnailImageSettings","_renderSeeDetailButton","product","config","payLoad","getPayloadObject","telemetryContent","TelemetryConstant","attributes","getTelemetryAttributes","Button","Object","className","onClick","onTelemetryClick","seeDetailsLinkText","href","_getProductURL","_renderCarousel","mediaGalleryItems","keys","galleryImageSettings","ArrayExtensions","item","index","_renderCarouselItemImageView","_renderEmptyImage","tag","Carousel","items","activeIndex","next","previous","interval","directionTextPrev","previousScreenshotFlipperText","directionTextNext","nextScreenshotFlipperText","indicatorAriaText","ariaLabelForSlide","onIndicatorsClickHandler","goToIndex","handleOnExited","onExited","handleOnExiting","onExiting","key","_renderThumbnails","id","thumbnailImageSettings","_getThumbnailItem","ThumbnailsContainerProps","SingleSlideCarouselComponentProps","SingleSlideCarousel","flipperPrevLabel","flipperNextLabel","parentId","useTabList","JSON","stringify","context","request","apiSettings","productDimensions","productDetails","dimensionsToUpdate","clearErrorState","errorHost","configureErrors","mappedDimensions","dimension","DimensionTypeValue","DimensionValue","_updateDimensionValue","ExtensionProperties","newProduct","getSelectedVariant","SelectedVariantInput","MasterProductId","RecordId","getDimensionsForSelectedVariant","GetDimensionsForSelectedVariantInput","variantProduct","images","productVariant","lastUpdate","Date","now","newAvailableQuantity","getProductAvailabilitiesForSelectedVariant","ProductAvailabilitiesForSelectedVariantInput","Dimensions","find","Value","toLowerCase","isCustomPriceSelected","length","getPriceForSelectedVariant","PriceForSelectedVariantInput","RetailMulitplePickupMFeatureState","data","featureState","result","Name","getDeliveryOptionsForSelectedVariant","GetDeliveryOptionsForSelectedVariantInput","IsEnabled","_updateQuantitiesInState","productDimensionFull","newValueId","DimensionValues","isGiftCard","IsGiftCard","productDimensionTypeColor","productDimensionTypeConfiguration","productDimensionTypeSize","productDimensionTypeAmount","productDimensionTypeStyle","animating","isLastItem","nextIndex","isFirstItem","_getCarouselItem","image","Image","requestContext","gridSettings","loadFailureBehavior","role","modifiedActiveIndex","ThumbnailItemContainerProps","classnames","tabIndex","_generateOnThumbnailClick","onKeyDown","_generateOnThumbnailKeyDown","Picture","event","which","KeyCodes","preventDefault","onClickHandler","_onClick","_event","ObjectExtensions","selectedProductId","modalOpen","selectedDimensions","ctx","tenantId","getRnrPartnerId","serviceEndPoint","getRnrEndpointId","productResult","productAvailabilities","getCartStateData","GetCartStateDataInput","cartState","cart","getRatingsSummary","GetRatingsSummaryInput","toString","ratingsSummaryData","ratingsSummary","getProductDetails","currentTime","_updateMediaItems","ItemTypeValue","ReleasedProductType","isServiceItem","isDataLoaded","_quickViewCloseButtonclick","onChangeHandler","callbacks","newValue","_renderQuantity","max","ContainerProps","LabelContainerProps","htmlFor","heading","productQuantityHeading","errors","input","IncrementalQuantity","currentCount","onChange","inputQuantityAriaLabel","decrementButtonAriaLabel","incrementButtonAriaLabel","minQuantityText","maxQuantityText","disabled","min","bind","getTelemetryObject","telemetryPageName","friendlyName","shouldComponentUpdate","nextProps","nextState","render","isMobileDevice","isMobile","variant","VariantType","viewprops","quickView","moduleProps","quickViewButton","quickViewbuttonText","ModalContainer","Modal","isOpen","format","quickViewAriaLabel","toggle","modalTransition","timeout","shouldUpdateFocusToFirstElement","ModalHeaderContainer","ModalHeader","ModalFooterContainer","ModalFooter","ModalHeaderContent","ModalBodyContainer","ModalBody","cartContainerProps","ProductInfoContainerProps","MediaGalleryContainerProps","seeDetailsbutton","loading","Spinner","label","loadingText","size","SpinnerSize","title","getBuyboxProductTitle","description","getBuyboxProductDescription","configure","getBuyboxProductConfigure","price","getBuyboxProductPrice","unitOfMeasure","getBuyboxProductUnitOfMeasure","rating","app","hideRating","getBuyboxProductRating","addToCart","getBuyboxAddToCart","keyInPrice","enableKeyInPrice","getBuyboxKeyInPrice","inventoryLabel","getBuyBoxInventoryLabel","addToWishlist","getBuyboxProductAddToWishlist","quantityLimitsMessages","getQuantityLimitsMessages","CarouselProps","Thumbnails","renderView","lastUpdatedTime","PrimaryImageUrl","_mapProductToImageData","CustomerContextualPrice","producturl","getProductPageUrlSync","_isOrderQuantityLimitsFeatureEnabled","Behavior","DefaultQuantity","MinimumQuantity","MaximumQuantity","maxQuantityForCartLineItem","defaultOrderQuantityLimitsFeatureConfig","platform","enableDefaultOrderQuantityLimits","RetailDefaultOrderQuantityLimitsFeatureName","customerInfo","customerInformation","information","IsB2b","_renderConfigureDropdown","dropdown","select","Node","_renderQuickViewPopup","Module","_renderBodyContent","errorBlock","button","_renderAddToCart","_renderAddToWishlist","dropdowns","_renderConfigure","_renderKeyInPrice","QuickViewFunctionalComponent"],"sourceRoot":""}