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actions/get-product-warranty-icon.action.ts?d623","webpack://Msdyn365.Commerce.Online.Memx/./src/modules/mmx-quickview/utilities/helper.ts?c18f","webpack://Msdyn365.Commerce.Online.Memx/./src/modules/mmx-quickview/utilities/get-valid-product-images.ts?8cc5","webpack://Msdyn365.Commerce.Online.Memx/./src/modules/mmx-quickview/mmx-quickview.tsx?c62b","webpack://Msdyn365.Commerce.Online.Memx/./src/modules/mmx-quickview/utilities/get-product-details.ts?982e","webpack://Msdyn365.Commerce.Online.Memx/./src/modules/mmx-quickview/mmx-quickview.view.tsx?6d8d","webpack://Msdyn365.Commerce.Online.Memx/./src/themes/memoryexpress/views/mmx-quickview.view.tsx?614c","webpack://Msdyn365.Commerce.Online.Memx/./lib/mmx-quickview/module-registration.js?45cf","webpack://Msdyn365.Commerce.Online.Memx/external var \"React\"?0d3b","webpack://Msdyn365.Commerce.Online.Memx/external var \"ReactDOM\"?853b"],"sourcesContent":["import {\r\n CacheType,\r\n createObservableDataAction,\r\n IAction,\r\n ICreateActionContext,\r\n IActionContext,\r\n IActionInput,\r\n IGeneric,\r\n IAny\r\n} from '@msdyn365-commerce/core';\r\nimport { getProductWarrantiesAsync } from './DataActionExtension.g';\r\nimport { IProductWarranties, IProductDefaultVariant } from './DataServiceEntities.g';\r\nimport { getProductDefaultVariantAction, ProductDefaultVariantInput } from './get-product-default-variant.action';\r\nimport { getSelectedProductIdFromActionInput } from '../utilities/utils';\r\n\r\n/*\r\n * Input class for the getProductWarranties data action\r\n */\r\nexport class ProductWarrantiesInput implements IActionInput {\r\n public productId: number;\r\n constructor(productId: number) {\r\n this.productId = productId;\r\n }\r\n public getCacheKey = () => `mmx-productwarranties-${this.productId}`;\r\n public getCacheObjectType = () => 'IProductWarranties';\r\n public dataCacheType = (): CacheType => 'application';\r\n}\r\n\r\n/**\r\n * Create input method for the getProductWarranties data action.\r\n * @param inputData The input data passed to the createInput method.\r\n */\r\nexport const createProductWarrantiesInput = (inputData: ICreateActionContext>): ProductWarrantiesInput[] => {\r\n const productIds: string[] = [];\r\n const selectedId = getSelectedProductIdFromActionInput(inputData);\r\n if (selectedId) {\r\n productIds.push(selectedId);\r\n if (Array.isArray(productIds) && productIds.length > 0) {\r\n return productIds.map((productId: string) => {\r\n return new ProductWarrantiesInput(+productId);\r\n });\r\n }\r\n }\r\n throw new Error('Unable to find product warranties, no productId found on module config or query');\r\n};\r\n\r\n/**\r\n * Action method for the getProductWarranties data action.\r\n * @param inputs\r\n * @param ctx\r\n */\r\nexport async function getProductWarrantiesAction(input: ProductWarrantiesInput[], ctx: IActionContext): Promise {\r\n if (!Array.isArray(input) || input.length === 0) {\r\n ctx.telemetry.trace('[getProductWarranties] Invalid or empty input.');\r\n return {};\r\n }\r\n\r\n const productDefaultVariantInputs: ProductDefaultVariantInput[] = input.map(\r\n (input: ProductWarrantiesInput): ProductDefaultVariantInput => {\r\n return new ProductDefaultVariantInput(input.productId);\r\n }\r\n );\r\n\r\n return getProductDefaultVariantAction(productDefaultVariantInputs, ctx).then((response: IProductDefaultVariant[]) => {\r\n const defaultProductMasterIds: number[] = [];\r\n const defaultVariantIds: number[] = [];\r\n\r\n response.map(response => {\r\n defaultProductMasterIds.push(response.MasterId);\r\n defaultVariantIds.push(response.DefaultProductId);\r\n });\r\n\r\n // Product Ids not accounted for by the getProductDefaultVariantAction response\r\n const missingInputIds = input\r\n .filter(input => !defaultProductMasterIds.includes(input.productId))\r\n .map(input => {\r\n return input.productId;\r\n });\r\n\r\n const allProductIds = [...new Set([...defaultVariantIds, ...missingInputIds])];\r\n\r\n return getProductWarrantiesAsync({ callerContext: ctx }, allProductIds).then((response: IProductWarranties[]) => {\r\n return response;\r\n });\r\n });\r\n}\r\n\r\n/**\r\n * The GetProductWarranties data action\r\n * Finds variants from product masters or uses\r\n * Then finds the applicable warranties via the getProductWarranties RetailServer API.\r\n */\r\nexport default createObservableDataAction({\r\n id: 'get-product-warranties',\r\n action: >getProductWarrantiesAction,\r\n input: createProductWarrantiesInput,\r\n isBatched: true\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\nimport * as Msdyn365 from '@msdyn365-commerce/core';\r\nimport { getWarrantyIconsAsync } from './DataActionExtension.g';\r\nimport { IWarrantyIcon } from './DataServiceEntities.g';\r\n\r\n/**\r\n * GetWarrantyIcon Input Action\r\n */\r\nexport class GetProductWarrantyIconInput implements Msdyn365.IActionInput {\r\n constructor() {}\r\n\r\n public getCacheKey = () => `mmx-productwarranty-icons`;\r\n public getCacheObjectType = () => 'IWarrantyIcon';\r\n public dataCacheType = (): Msdyn365.CacheType => 'application';\r\n}\r\n\r\nconst createInput = (args: Msdyn365.ICreateActionContext): Msdyn365.IActionInput => {\r\n return new GetProductWarrantyIconInput();\r\n};\r\n\r\nasync function action(input: GetProductWarrantyIconInput, ctx: Msdyn365.IActionContext): Promise {\r\n return getWarrantyIconsAsync({ callerContext: ctx });\r\n}\r\n\r\nexport default Msdyn365.createObservableDataAction({\r\n action: >action,\r\n id: 'GetWarrantyIcon',\r\n input: createInput\r\n});\r\n","/*!\r\n * Copyright (c) Microsoft Corporation.\r\n * All rights reserved. See LICENSE in the project root for license information.\r\n */\r\n\r\n/* eslint-disable no-duplicate-imports */\r\nimport { IRequestContext } from '@msdyn365-commerce/core';\r\n\r\n/**\r\n * Gets correct alt text for image based on configuration of site.\r\n * @param context Current request context.\r\n * @param shouldUseCmsAltText Should use CMS alt text.\r\n * @param productName Product name.\r\n * @param imageAltText Alt-text from CMS image.\r\n */\r\nexport function getAltText(\r\n context: IRequestContext,\r\n shouldUseCmsAltText: boolean,\r\n productName?: string,\r\n imageAltText?: string\r\n): string | undefined {\r\n if (!context?.app?.config?.OmniChannelMedia) {\r\n return productName;\r\n }\r\n if (shouldUseCmsAltText) {\r\n return imageAltText;\r\n }\r\n return productName;\r\n}\r\n","/*!\r\n * Copyright (c) Microsoft Corporation.\r\n * All rights reserved. See LICENSE in the project root for license information.\r\n */\r\n\r\n/* eslint-disable no-duplicate-imports */\r\nimport { commerceApiRequest, getCatalogId, IActionContext, IImageData, IImageSettings } from '@msdyn365-commerce/core';\r\nimport { MediaLocation, SimpleProduct } from '@msdyn365-commerce/retail-proxy';\r\nimport { getMediaLocationsForSelectedVariant, MediaLocationsForSelectedVariantInput } from '@msdyn365-commerce-modules/retail-actions';\r\nimport { getAltText } from './helper';\r\n\r\nexport async function getValidProductImages(\r\n productId: number,\r\n channelId: number,\r\n actionContext: IActionContext,\r\n imageSettings: IImageSettings,\r\n selectedProduct?: SimpleProduct\r\n): Promise {\r\n const catalogId = getCatalogId(actionContext.requestContext);\r\n const actionInput = new MediaLocationsForSelectedVariantInput(productId, channelId, selectedProduct, catalogId);\r\n\r\n return getMediaLocationsForSelectedVariant(actionInput, actionContext)\r\n .then(mediaLocations => {\r\n if (mediaLocations) {\r\n return Promise.all(mediaLocations.map(async mediaLocation => validateMediaLocaionAsync(mediaLocation, imageSettings))).then(\r\n pairs => {\r\n return pairs.filter(pair => pair[1]).map(pair => pair[0]);\r\n }\r\n );\r\n }\r\n return [];\r\n })\r\n .catch(error => {\r\n actionContext.telemetry.exception(error);\r\n actionContext.telemetry.debug('Unable to get Media Locations for Selected Variant');\r\n return [];\r\n });\r\n}\r\n\r\n// eslint-disable-next-line @typescript-eslint/no-unused-vars, @typescript-eslint/no-unused-vars-experimental -- .\r\nasync function validateMediaLocaionAsync(mediaLocation: MediaLocation, imageSettings?: IImageSettings): Promise<[IImageData, boolean]> {\r\n const imageData = {\r\n src: mediaLocation.Uri || '',\r\n altText: mediaLocation.AltText || ''\r\n };\r\n\r\n if (imageData.src === '') {\r\n return [imageData, false];\r\n }\r\n\r\n return new Promise<[IImageData, boolean]>(resolve => {\r\n try {\r\n const http = new XMLHttpRequest();\r\n http.open('HEAD', imageData.src, true);\r\n\r\n http.addEventListener('load', () => {\r\n resolve([imageData, http.status === 200 || http.status === 201]);\r\n });\r\n\r\n http.addEventListener('error', () => {\r\n resolve([imageData, false]);\r\n });\r\n\r\n http.send();\r\n } catch {\r\n resolve([imageData, false]);\r\n }\r\n });\r\n}\r\n\r\n/**\r\n * Gets product variant images on dimension change of buy-box module for Omni scenario.\r\n * @param productId Product record id.\r\n * @param shouldUseCmsAltText Alt-text source to use.\r\n * @param channelId Current channel id.\r\n * @param actionContext Current action context.\r\n * @param productName Product name.\r\n * @param selectedProduct Currently selected variant product.\r\n * @returns List of images.\r\n */\r\n\r\nexport async function getProductImages(\r\n productId: number,\r\n shouldUseCmsAltText: boolean,\r\n channelId: number,\r\n actionContext: IActionContext,\r\n productName?: string,\r\n selectedProduct?: SimpleProduct\r\n): Promise {\r\n const catalogId = getCatalogId(actionContext.requestContext);\r\n if (actionContext.requestContext?.params?.isPreview) {\r\n const response = await commerceApiRequest(actionContext.requestContext, 'msdyn365-ochannel-product-info', 'post', {\r\n productId: productId,\r\n channelId: channelId,\r\n catalogId: catalogId\r\n });\r\n if (response.status !== 200) {\r\n actionContext.telemetry.debug('Unable to get Media Locations for Selected Variant for preview scenario');\r\n return [];\r\n }\r\n const previewImageData = response?.data as MediaLocation[];\r\n if (previewImageData) {\r\n return previewImageData.map(mediaLocation => {\r\n return {\r\n src: mediaLocation.Uri ?? '',\r\n altText: getAltText(actionContext.requestContext, shouldUseCmsAltText, productName, mediaLocation.AltText),\r\n additionalProperties: mediaLocation.IsApplicableForChildEntities\r\n ? {\r\n isApplicableForChildEntities: 'true'\r\n }\r\n : undefined\r\n };\r\n });\r\n }\r\n return [];\r\n }\r\n const actionInput = new MediaLocationsForSelectedVariantInput(productId, channelId, selectedProduct, catalogId);\r\n return getMediaLocationsForSelectedVariant(actionInput, actionContext)\r\n .then(mediaLocations => {\r\n if (mediaLocations) {\r\n return mediaLocations.map(mediaLocation => {\r\n return {\r\n src: mediaLocation.Uri ?? '',\r\n altText: getAltText(actionContext.requestContext, shouldUseCmsAltText, productName, mediaLocation.AltText),\r\n additionalProperties: mediaLocation.IsApplicableForChildEntities\r\n ? {\r\n isApplicableForChildEntities: 'true'\r\n }\r\n : undefined\r\n };\r\n });\r\n }\r\n return [];\r\n })\r\n .catch(error => {\r\n actionContext.telemetry.exception(error);\r\n actionContext.telemetry.debug('Unable to get Media Locations for Selected Variant');\r\n return [];\r\n });\r\n}\r\n","/*!\r\n * Copyright (c) Microsoft Corporation.\r\n * All rights reserved. See LICENSE in the project root for license information.\r\n */\r\n\r\n/* eslint-disable no-duplicate-imports */\r\nimport { ProductDimensionFull } from '@msdyn365-commerce/commerce-entities';\r\nimport { Carousel, ICarouselProps } from '@msdyn365-commerce/components';\r\nimport msdyn365Commerce, { IImageData, IImageSettings, Image } from '@msdyn365-commerce/core';\r\nimport {\r\n ProductDeliveryOptions,\r\n ProductDimension,\r\n ProductDimensionValue,\r\n ProductPrice,\r\n ReleasedProductType,\r\n SimpleProduct\r\n} from '@msdyn365-commerce/retail-proxy';\r\nimport {\r\n ArrayExtensions,\r\n convertProductDimensionTypeToDimensionTypes,\r\n FinitePromiseQueue,\r\n FinitePromiseQueueError,\r\n getDeliveryOptionsForSelectedVariant,\r\n GetDeliveryOptionsForSelectedVariantInput,\r\n getDimensionsForSelectedVariant,\r\n GetDimensionsForSelectedVariantInput,\r\n getPriceForSelectedVariant,\r\n getProductAvailabilitiesForSelectedVariant,\r\n getProductPageUrlSync,\r\n getSelectedVariant,\r\n IProductInventoryInformation,\r\n IPromiseQueue,\r\n ISelectedProduct,\r\n ObjectExtensions,\r\n PriceForSelectedVariantInput,\r\n ProductAvailabilitiesForSelectedVariantInput,\r\n SelectedVariantInput,\r\n StringExtensions\r\n} from '@msdyn365-commerce-modules/retail-actions';\r\nimport {\r\n Button,\r\n format,\r\n getPayloadObject,\r\n getTelemetryAttributes,\r\n getTelemetryObject,\r\n IComponentNodeProps,\r\n IModuleProps,\r\n IncrementalQuantity,\r\n INodeProps,\r\n ISingleSlideCarouselProps,\r\n isMobile,\r\n ITelemetryContent,\r\n KeyCodes,\r\n Modal,\r\n ModalBody,\r\n ModalFooter,\r\n ModalHeader,\r\n NodeTag,\r\n onTelemetryClick,\r\n SingleSlideCarousel,\r\n TelemetryConstant,\r\n updateMaxQuantityForCartLineItem,\r\n VariantType\r\n} from '@msdyn365-commerce-modules/utilities';\r\nimport classnames from 'classnames';\r\nimport { Spinner, SpinnerSize } from 'office-ui-fabric-react';\r\nimport React, { ReactNode } from 'react';\r\n\r\n//mmx-feature: quickview clone --start\r\n/*\r\nimport {\r\n getBuyboxAddToCart,\r\n getBuyBoxInventoryLabel,\r\n getBuyboxKeyInPrice,\r\n getBuyboxProductAddToWishlist,\r\n getBuyboxProductDescription,\r\n getBuyboxProductPrice,\r\n getBuyboxProductRating,\r\n getBuyboxProductTitle,\r\n getBuyboxProductUnitOfMeasure,\r\n getQuantityLimitsMessages,\r\n IBuyboxAddToCartViewProps,\r\n IBuyboxAddToOrderTemplateViewProps,\r\n IBuyboxAddToWishlistViewProps,\r\n IBuyboxCallbacks,\r\n IBuyboxCommonData,\r\n IBuyboxExtentedProps,\r\n IBuyboxKeyInPriceViewProps,\r\n IBuyboxProductConfigureViewProps,\r\n IBuyboxProductQuantityViewProps,\r\n IBuyboxState,\r\n IErrorState,\r\n IProductDetails,\r\n RetailDefaultOrderQuantityLimitsFeatureName,\r\n EcommerceQuantityLimitConfigurationsFeatureName,\r\n RevertToSiteBuilderOrderQuantityLimitsSettingsCRTFeatureName\r\n} from '@msdyn365-commerce-modules/buybox';\r\nimport { getBuyboxProductConfigure } from '@msdyn365-commerce-modules/buybox';\r\nimport { IMmxQuickviewData } from './mmx-quickview.data';\r\nimport { IMmxQuickviewProps, IMmxQuickviewResources } from './mmx-quickview.props.autogenerated';\r\n*/\r\nimport {\r\n getBuyboxAddToCart,\r\n getBuyBoxInventoryLabel,\r\n getBuyboxKeyInPrice,\r\n getBuyboxProductAddToWishlist,\r\n getBuyboxProductDescription,\r\n getBuyboxProductPrice,\r\n getBuyboxProductRating,\r\n getBuyboxProductTitle,\r\n getBuyboxProductUnitOfMeasure,\r\n getQuantityLimitsMessages,\r\n RetailDefaultOrderQuantityLimitsFeatureName,\r\n EcommerceQuantityLimitConfigurationsFeatureName,\r\n RevertToSiteBuilderOrderQuantityLimitsSettingsCRTFeatureName\r\n} from '../mmx-buybox/common/buybox-components';\r\nimport {\r\n IBuyboxAddToCartViewProps,\r\n IBuyboxAddToOrderTemplateViewProps,\r\n IBuyboxAddToWishlistViewProps,\r\n IBuyboxCallbacks,\r\n IBuyboxCommonData,\r\n IBuyboxExtentedProps,\r\n IBuyboxKeyInPriceViewProps,\r\n IBuyboxProductConfigureViewProps,\r\n IBuyboxProductQuantityViewProps,\r\n IBuyboxState,\r\n IErrorState,\r\n IProductDetails as IProductDetailsBase\r\n } from '../mmx-buybox/common/buyboxInterface';\r\nimport { IMmxQuickviewData } from './mmx-quickview.data';\r\n import {\r\n IMmxQuickviewProps,\r\n IMmxQuickviewResources,\r\n} from './mmx-quickview.props.autogenerated';\r\n//mmx-feature: quickview clone --end\r\nimport { getProductDetails } from './utilities/get-product-details';\r\nimport { getProductImages, getValidProductImages } from './utilities/get-valid-product-images';\r\nimport { RecentlyViewedState } from '@msdyn365-commerce-modules/buybox';\r\n//mmx-feature: product warranties --start\r\nimport { getBuyboxProductConfigure } from '@msdyn365-commerce-modules/buybox';\r\nimport { IProductDefaultVariant, IProductWarranties, IWarrantyOption } from '../../actions/DataServiceEntities.g';\r\nimport { getByIdAsync } from '@msdyn365-commerce/retail-proxy/dist/DataActions/ProductsDataActions.g';\r\nimport getProductDefaultVariantAction, { ProductDefaultVariantInput } from '../../actions/get-product-default-variant.action';\r\nimport { IProductWarrantyComponentProps } from '../../components/product-warranty/product-warranty.props';\r\nimport { ProductWarrantyStateInput } from '../../actions/state-data-actions/product-warranty-state.action';\r\nimport { ProductQuantityStateInput } from '../../actions/state-data-actions/product-quantity-state.action';\r\nimport { getEmptyWarrantyOption } from '../../utilities/warranty/utils';\r\n//mmx-feature: product warranties --end\r\n\r\n/**\r\n * QuickView props Interface.\r\n */\r\nexport interface IQuickviewViewProps extends IMmxQuickviewProps {\r\n quickView: IModuleProps;\r\n quickViewButton: React.ReactNode;\r\n ModalContainer: IModuleProps;\r\n ModalHeaderContainer: INodeProps;\r\n ModalHeaderContent: React.ReactNode;\r\n ModalFooterContainer: INodeProps;\r\n ModalBodyContainer: INodeProps;\r\n cartContainerProps: INodeProps;\r\n state: IBuyboxState;\r\n ModuleProps?: IModuleProps;\r\n ProductInfoContainerProps: INodeProps;\r\n MediaGalleryContainerProps: INodeProps;\r\n callbacks?: IBuyboxCallbacks;\r\n title?: React.ReactNode;\r\n description?: React.ReactNode;\r\n configure?: IBuyboxProductConfigureViewProps;\r\n inventoryLabel?: React.ReactNode;\r\n rating?: React.ReactNode;\r\n price?: React.ReactNode;\r\n addToCart?: IBuyboxAddToCartViewProps;\r\n addToOrderTemplate?: IBuyboxAddToOrderTemplateViewProps;\r\n addToWishlist?: IBuyboxAddToWishlistViewProps;\r\n max: number | undefined;\r\n keyInPrice?: IBuyboxKeyInPriceViewProps;\r\n quantity?: IBuyboxProductQuantityViewProps;\r\n quantityLimitsMessages?: React.ReactNode;\r\n CarouselProps: INodeProps;\r\n Thumbnails: IQuickViewThumbnailsViewProps;\r\n seeDetailsbutton: React.ReactNode;\r\n isModalOpen: boolean;\r\n loading?: React.ReactNode;\r\n unitOfMeasure?: React.ReactNode;\r\n productDetails?: IProductDetails | undefined;\r\n isMobileDevice?: boolean;\r\n //mmx-feature: product warranties --start\r\n productWarrantyComponentProps?: IProductWarrantyComponentProps;\r\n //mmx-feature: product warranties --end\r\n}\r\n\r\n/**\r\n * QuickView extend props Interface.\r\n */\r\nexport interface IQuickviewExtentedProps extends IMmxQuickviewProps {\r\n selectedProductId?: number;\r\n selectedDimensions?: ProductDimension[];\r\n //mmx-feature: clone --start\r\n //semi-duplicate identifier, but needed as this is the value passed in from the buybox.\r\n //functions throw errors otherwise\r\n productId?: number;\r\n //mmx-feature: clone --end\r\n}\r\n\r\n/**\r\n * QuickView thumbnails props Interface.\r\n */\r\nexport interface IQuickViewThumbnailsViewProps {\r\n ThumbnailsContainerProps: INodeProps;\r\n SingleSlideCarouselComponentProps: INodeProps;\r\n items?: IQuickViewThumbnailItemViewProps[];\r\n}\r\n\r\n/**\r\n * QuickView thumbnail item view props Interface.\r\n */\r\nexport interface IQuickViewThumbnailItemViewProps {\r\n ThumbnailItemContainerProps: INodeProps;\r\n Picture: React.ReactElement;\r\n}\r\n\r\n/**\r\n * QuickView state Interface.\r\n */\r\nexport interface IQuickViewState extends IBuyboxState {\r\n //mmx-feature: default variant --start\r\n productDefaultVariant?: IProductDefaultVariant,\r\n productWarranties?: IProductWarranties,\r\n selectedWarrantyOption?: IWarrantyOption | undefined,\r\n //mmx-feature: default variant --end\r\n isDataLoaded: boolean;\r\n}\r\n\r\n//mmx-feature: product warranties --start\r\n/**\r\n * QuickView extension of IProductDetails to include warranties\r\n */\r\nexport interface IProductDetails extends IProductDetailsBase {\r\n productWarranties?: IProductWarranties;\r\n}\r\n//mmx-feature: product warranties --end\r\n\r\n/**\r\n *\r\n * Quickview component.\r\n * @extends {React.Component>}\r\n */\r\nclass Quickview extends React.Component, IQuickViewState> {\r\n /**\r\n * A queue of tasks of processing the changes in the dimensions.\r\n * Limit to two processes:\r\n * 1 - for the current process, which is under execution at the moment.\r\n * 2 - next process, which will process the latest version of data.\r\n * @remark Enqueueing new promises will discard the previous ones (except the one which is under processing).\r\n */\r\n private readonly dimensionUpdateQueue: IPromiseQueue = new FinitePromiseQueue(2);\r\n\r\n private dimensions: { [id: number]: string } = {};\r\n\r\n private initializedDimensions: Set = new Set();\r\n\r\n private readonly telemetryContent: ITelemetryContent;\r\n\r\n private productDetails: IProductDetails | undefined;\r\n\r\n private readonly quickViewCallbacks: IBuyboxCallbacks = {\r\n updateQuantity: (newQuantity: number): boolean => {\r\n const errorState = { ...this.state.errorState };\r\n errorState.quantityError = undefined;\r\n errorState.otherError = undefined;\r\n\r\n this.setState({ quantity: newQuantity, errorState });\r\n return true;\r\n },\r\n updateErrorState: (newErrorState: IErrorState): void => {\r\n this.setState({ errorState: newErrorState });\r\n },\r\n updateSelectedProduct: (\r\n newSelectedProduct: Promise,\r\n newInventory: IProductInventoryInformation | undefined,\r\n newPrice: ProductPrice | undefined,\r\n newDeliveryOptions: ProductDeliveryOptions | undefined\r\n ): void => {\r\n this.setState({\r\n selectedProduct: newSelectedProduct,\r\n productAvailableQuantity: newInventory,\r\n productDeliveryOptions: newDeliveryOptions\r\n });\r\n this._updatePrice(newPrice);\r\n },\r\n initializeDimension: (initializedDimension: string): void => {\r\n if (initializedDimension) {\r\n this.initializedDimensions.add(initializedDimension);\r\n }\r\n },\r\n dimensionSelectedAsync: async (selectedDimensionId: number, selectedDimensionValueId: string): Promise => {\r\n this.dimensions[selectedDimensionId] = selectedDimensionValueId;\r\n // Only trigger _updateDimensions when all dimensions are initialized\r\n if (this.initializedDimensions.size === this.productDetails?.product?.Dimensions?.length) {\r\n return this.dimensionUpdateQueue\r\n .enqueue(async () => {\r\n return this._updateDimensions();\r\n })\r\n .catch((error: unknown) => {\r\n // Ignore discarded processes.\r\n if (error !== FinitePromiseQueueError.ProcessWasDiscardedFromTheQueue) {\r\n throw error;\r\n }\r\n });\r\n }\r\n },\r\n getDropdownName: (dimensionType: number, resources: IMmxQuickviewResources): string => {\r\n return this._getDropdownName(dimensionType, resources);\r\n },\r\n changeModalOpen: (isModalOpen: boolean): void => {\r\n this._hideQuickViewDialog();\r\n },\r\n changeUpdatingDimension: (isUpdatingDimension: boolean): void => {\r\n this.setState({ isUpdatingDimension });\r\n },\r\n updateKeyInPrice: (customPrice: number): void => {\r\n // Remove custom amount error when updating the custom price\r\n const errorState = { ...this.state.errorState };\r\n errorState.customAmountError = undefined;\r\n\r\n this.setState({ isPriceKeyedIn: true, keyInPriceAmount: customPrice, errorState });\r\n this._updatePrice(this.state.productPrice, customPrice);\r\n }\r\n };\r\n\r\n private readonly defaultGalleryImageSettings: IImageSettings = {\r\n viewports: {\r\n xs: { q: 'w=767&h=767&m=8', w: 0, h: 0 },\r\n sm: { q: 'w=600&h=600&m=8', w: 0, h: 0 },\r\n md: { q: 'w=600&h=772&m=8', w: 0, h: 0 },\r\n lg: { q: 'h=772&m=8', w: 0, h: 0 }\r\n },\r\n lazyload: true,\r\n cropFocalRegion: true\r\n };\r\n\r\n private readonly defaultThumbnailImageSettings: IImageSettings = {\r\n viewports: {\r\n xs: { q: 'w=100&m=8', w: 100, h: 0 },\r\n lg: { q: 'w=100&m=8', w: 100, h: 0 }\r\n },\r\n lazyload: true,\r\n cropFocalRegion: true\r\n };\r\n\r\n public constructor(props: IMmxQuickviewProps) {\r\n super(props);\r\n this.state = {\r\n //mmx-feature: default variant --start\r\n productDefaultVariant: undefined,\r\n productWarranties: undefined,\r\n selectedWarrantyOption: undefined,\r\n //mmx-feature: default variant --end\r\n modalOpen: false,\r\n quantity: 1,\r\n min: undefined,\r\n max: undefined,\r\n errorState: {\r\n configureErrors: {}\r\n },\r\n selectedProduct: undefined,\r\n productPrice: undefined,\r\n productDeliveryOptions: undefined,\r\n isUpdatingDimension: false,\r\n activeIndex: 0,\r\n animating: false,\r\n mediaGalleryItems: undefined,\r\n isDataLoaded: false\r\n };\r\n\r\n this._quickViewCloseButtonclick = this._quickViewCloseButtonclick.bind(this);\r\n this.telemetryContent = getTelemetryObject(props.context.request.telemetryPageName!, props.friendlyName, props.telemetry);\r\n }\r\n\r\n /**\r\n * React should component udpate function.\r\n * @param nextProps - Next Props.\r\n * @param nextState - Next State.\r\n * @returns Boolean - Whether the module will rerender or not.\r\n */\r\n public shouldComponentUpdate(nextProps: IMmxQuickviewProps, nextState: IBuyboxState): boolean {\r\n if (this.state === nextState && this.props.data === nextProps.data) {\r\n return false;\r\n }\r\n return true;\r\n }\r\n\r\n public render(): JSX.Element | null {\r\n const {\r\n config: { className = '' },\r\n resources\r\n } = this.props;\r\n const { max } = this.state;\r\n const product = this.productDetails?.product ? this.productDetails.product : undefined;\r\n const props = this.props as IBuyboxExtentedProps;\r\n const defaultMinimumKeyInPrice = 10;\r\n const defaultMaximumKeyInPrice = 100;\r\n const isMobileDevice = isMobile({ variant: VariantType.Viewport, context: this.props.context.request }) === 'xs';\r\n const viewprops: IQuickviewViewProps = {\r\n ...(this.props as IQuickviewExtentedProps),\r\n //mmx-feature: product warranties --start\r\n productWarrantyComponentProps: (this.state.isDataLoaded && this.state.productWarranties)\r\n ? {\r\n design: this.props.context.app.config.productWarrantySelectorDesign,\r\n className: 'mmx-product-warranty-module',\r\n productWarranties: this.state.productWarranties,\r\n selectedWarranty: getEmptyWarrantyOption(product?.MasterProductId ?? 0),\r\n isSelectWarrantyDisabled: false,\r\n warrantyIcons: this.props.data.warrantyIcons?.result,\r\n learnMoreLink: this.props.context.app.config.productWarrantyLearnMoreLink,\r\n onSelectWarrantyOption: this._setSelectedWarrantyOption\r\n } : undefined,\r\n //mmx-feature: product warranties --end\r\n state: this.state,\r\n productDetails: this.productDetails,\r\n isModalOpen: this.state.modalOpen!,\r\n quickView: {\r\n moduleProps: this.props,\r\n className: classnames('ms-quickView', className),\r\n tag: 'div'\r\n },\r\n isMobileDevice,\r\n quickViewButton: (\r\n \r\n ),\r\n ModalContainer: {\r\n moduleProps: this.props,\r\n tag: Modal,\r\n className: 'ms-quickView__dialog',\r\n isOpen: this.state.modalOpen,\r\n 'aria-label': format(resources.quickViewAriaLabel, this.productDetails?.product?.Name),\r\n toggle: this._quickViewCloseButtonclick,\r\n modalTransition: { timeout: 0 },\r\n shouldUpdateFocusToFirstElement: this.state.isDataLoaded\r\n },\r\n ModalHeaderContainer: {\r\n tag: ModalHeader,\r\n className: 'ms-quickView__header',\r\n toggle: this._quickViewCloseButtonclick\r\n },\r\n ModalFooterContainer: {\r\n tag: ModalFooter,\r\n className: 'ms-quickView__footer'\r\n },\r\n ModalHeaderContent: '',\r\n ModalBodyContainer: {\r\n tag: ModalBody,\r\n className: 'ms-quickView__body'\r\n },\r\n cartContainerProps: {\r\n className: 'ms-quickView__product-add-to-cart'\r\n },\r\n ProductInfoContainerProps: {\r\n className: 'ms-quickView__content'\r\n },\r\n MediaGalleryContainerProps: {\r\n className: 'ms-quickView__media-gallery'\r\n },\r\n seeDetailsbutton: this._renderSeeDetailButton(product),\r\n loading: !this.state.isDataLoaded && (\r\n \r\n ),\r\n callbacks: this.quickViewCallbacks,\r\n title: this.state.isDataLoaded && getBuyboxProductTitle(props, this.productDetails),\r\n description: this.state.isDataLoaded && getBuyboxProductDescription(props, this.productDetails),\r\n configure: this.state.isDataLoaded\r\n ? getBuyboxProductConfigure(props, this.state, this.quickViewCallbacks, this.productDetails, this.props.selectedDimensions)\r\n : undefined,\r\n price: this.state.isDataLoaded && getBuyboxProductPrice(props, this.state),\r\n unitOfMeasure: this.state.isDataLoaded && getBuyboxProductUnitOfMeasure(props, this.productDetails),\r\n rating:\r\n this.state.isDataLoaded && !this.props.context.app.config.hideRating && getBuyboxProductRating(props, this.productDetails),\r\n addToCart: this.state.isDataLoaded\r\n ? getBuyboxAddToCart(\r\n props,\r\n this.state,\r\n this.quickViewCallbacks,\r\n defaultMinimumKeyInPrice,\r\n defaultMaximumKeyInPrice,\r\n this.productDetails\r\n )\r\n : undefined,\r\n keyInPrice:\r\n this.state.isDataLoaded && this.props.config.enableKeyInPrice && this.state.isCustomPriceSelected\r\n ? getBuyboxKeyInPrice(props, this.state, this.quickViewCallbacks)\r\n : undefined,\r\n quantity: product?.IsGiftCard ? undefined : this._renderQuantity(this.props, this.state, this.quickViewCallbacks),\r\n inventoryLabel: this.state.isDataLoaded && getBuyBoxInventoryLabel(props, this.productDetails),\r\n addToWishlist: this.state.isDataLoaded\r\n ? getBuyboxProductAddToWishlist(props, this.state, this.quickViewCallbacks, this.productDetails)\r\n : undefined,\r\n quantityLimitsMessages: this.state.isDataLoaded && getQuantityLimitsMessages(props, this.state),\r\n max,\r\n CarouselProps: this._renderCarousel(),\r\n Thumbnails: this._renderThumbnails()\r\n };\r\n\r\n return this.props.renderView(viewprops) as React.ReactElement;\r\n }\r\n\r\n /**\r\n * Method to render detail button on quick view.\r\n * @param product - Simple product object.\r\n * @returns JSX element.\r\n */\r\n private readonly _renderSeeDetailButton = (product: SimpleProduct | undefined): JSX.Element => {\r\n const { config } = this.props;\r\n const payLoad = getPayloadObject('click', this.telemetryContent, TelemetryConstant.seeDetails, '');\r\n const attributes = getTelemetryAttributes(this.telemetryContent, payLoad);\r\n\r\n return (\r\n \r\n {config.seeDetailsLinkText}\r\n \r\n );\r\n };\r\n\r\n /**\r\n * Method to return carousel.\r\n * @returns Node props.\r\n */\r\n private readonly _renderCarousel = (): INodeProps => {\r\n const { config, resources } = this.props;\r\n let mediaGalleryItems: ReactNode[];\r\n let keys: (string | undefined)[];\r\n const galleryImageSettings = config.galleryImageSettings;\r\n if (galleryImageSettings) {\r\n galleryImageSettings.cropFocalRegion = true;\r\n }\r\n\r\n if (ArrayExtensions.hasElements(this.state.mediaGalleryItems)) {\r\n mediaGalleryItems = this.state.mediaGalleryItems.map((item: IImageData, index: number) => {\r\n return this._renderCarouselItemImageView(item, galleryImageSettings || this.defaultGalleryImageSettings, index);\r\n });\r\n keys = [...this.state.mediaGalleryItems.map(item => item.src)];\r\n } else {\r\n mediaGalleryItems = [this._renderEmptyImage(galleryImageSettings)];\r\n keys = ['empty'];\r\n }\r\n\r\n const props: IComponentNodeProps = {\r\n tag: Carousel,\r\n className: 'ms-media-gallery__carousel',\r\n items: mediaGalleryItems,\r\n activeIndex: this.state.activeIndex ?? 0,\r\n next: this.next,\r\n previous: this.previous,\r\n interval: false,\r\n directionTextPrev: resources.previousScreenshotFlipperText,\r\n directionTextNext: resources.nextScreenshotFlipperText,\r\n indicatorAriaText: resources.ariaLabelForSlide,\r\n onIndicatorsClickHandler: this.goToIndex,\r\n handleOnExited: this.onExited,\r\n handleOnExiting: this.onExiting,\r\n key: keys\r\n };\r\n\r\n return props;\r\n };\r\n\r\n /**\r\n * Method to render thumbnails.\r\n * @returns QuickView Thumbnails view props.\r\n */\r\n private readonly _renderThumbnails = (): IQuickViewThumbnailsViewProps => {\r\n const { config, id, resources } = this.props;\r\n\r\n const thumbnailImageSettings = config.thumbnailImageSettings;\r\n if (thumbnailImageSettings) {\r\n thumbnailImageSettings.cropFocalRegion = true;\r\n }\r\n\r\n let mediaGalleryItems: IQuickViewThumbnailItemViewProps[];\r\n let keys: (string | undefined)[];\r\n if (ArrayExtensions.hasElements(this.state.mediaGalleryItems)) {\r\n mediaGalleryItems = this.state.mediaGalleryItems.map((item: IImageData, index: number) => {\r\n return this._getThumbnailItem(\r\n item,\r\n thumbnailImageSettings ?? this.defaultThumbnailImageSettings,\r\n index,\r\n this.state.activeIndex!\r\n );\r\n });\r\n keys = [...this.state.mediaGalleryItems.map(item => item.src)];\r\n } else {\r\n mediaGalleryItems = [];\r\n keys = [];\r\n }\r\n\r\n return {\r\n ThumbnailsContainerProps: { className: 'ms-media-gallery__thumbnails-container' },\r\n SingleSlideCarouselComponentProps: {\r\n tag: SingleSlideCarousel,\r\n className: 'ms-media-gallery__thumbnails',\r\n flipperPrevLabel: resources.previousScreenshotFlipperText,\r\n flipperNextLabel: resources.nextScreenshotFlipperText,\r\n parentId: id,\r\n useTabList: true,\r\n key: JSON.stringify(keys)\r\n } as IComponentNodeProps,\r\n items: mediaGalleryItems\r\n };\r\n };\r\n\r\n private _updateMediaItems(lastUpdatedTime: number): void {\r\n const product = this.productDetails?.product;\r\n if (!this.state.mediaGalleryItems && product?.PrimaryImageUrl) {\r\n this.setState({\r\n mediaGalleryItems: [this._mapProductToImageData(product)],\r\n lastUpdate: lastUpdatedTime\r\n });\r\n }\r\n }\r\n\r\n private _updatePrice(newPrice: ProductPrice | undefined, customPrice: number | undefined = this.state.keyInPriceAmount): void {\r\n if (this.state.isCustomPriceSelected && newPrice) {\r\n newPrice.CustomerContextualPrice = customPrice;\r\n }\r\n this.setState({ productPrice: newPrice });\r\n }\r\n\r\n private readonly _updateDimensions = async (): Promise => {\r\n const {\r\n context: {\r\n actionContext,\r\n request: {\r\n apiSettings: { channelId }\r\n }\r\n }\r\n } = this.props;\r\n\r\n const { product, productDimensions } = this.productDetails!;\r\n\r\n if (!product || !productDimensions) {\r\n return;\r\n }\r\n\r\n const dimensionsToUpdate: { [id: number]: string } = { ...this.dimensions };\r\n this.setState({ isUpdatingDimension: true });\r\n\r\n // Step 1: Clear error state to display relevant errors\r\n if (this.state.errorState.otherError || this.state.errorState.quantityError) {\r\n const clearErrorState = { ...this.state.errorState };\r\n clearErrorState.otherError = undefined;\r\n if (this.state.errorState.errorHost === 'ADDTOCART') {\r\n clearErrorState.quantityError = undefined;\r\n clearErrorState.errorHost = undefined;\r\n }\r\n this.setState({ errorState: clearErrorState });\r\n }\r\n\r\n // Step 2: Clear any errors indicating the dimension wasn't selected\r\n for (const key of Object.keys(dimensionsToUpdate)) {\r\n if (this.state.errorState.configureErrors[key]) {\r\n const errorState = { ...this.state.errorState };\r\n errorState.configureErrors[key] = undefined;\r\n\r\n this.setState({ errorState });\r\n }\r\n }\r\n\r\n // Step 3, Build the actually selected dimensions, prioritizing the information in state\r\n // over the information in data\r\n const mappedDimensions = productDimensions\r\n .map(dimension => {\r\n return {\r\n DimensionTypeValue: dimension.DimensionTypeValue,\r\n DimensionValue:\r\n this._updateDimensionValue(dimension, dimensionsToUpdate[dimension.DimensionTypeValue]) || dimension.DimensionValue,\r\n ExtensionProperties: dimension.ExtensionProperties\r\n };\r\n })\r\n .filter(dimension => {\r\n return dimension && dimension.DimensionValue;\r\n });\r\n\r\n // Step 4. Use these dimensions hydrate the product. Wrap this in a promise\r\n // so that places like add to cart can await it\r\n // mmx-feature: default product variant --begin\r\n /*\r\n const selectedProduct = new Promise(async resolve => {\r\n const newProduct = await getSelectedVariant(\r\n new SelectedVariantInput(\r\n product.MasterProductId ? product.MasterProductId : product.RecordId,\r\n channelId,\r\n mappedDimensions,\r\n undefined,\r\n this.props.context.request\r\n ),\r\n actionContext\r\n );\r\n if (newProduct) {\r\n // @ts-expect-error\r\n this.productDetails.productDimensions = await getDimensionsForSelectedVariant(\r\n new GetDimensionsForSelectedVariantInput(\r\n newProduct.MasterProductId ? newProduct.MasterProductId : newProduct.RecordId,\r\n channelId,\r\n mappedDimensions,\r\n this.props.context.request\r\n ),\r\n actionContext\r\n );\r\n }\r\n\r\n resolve(newProduct);\r\n });\r\n\r\n this.setState({ selectedProduct });\r\n const variantProduct = await selectedProduct;\r\n */\r\n const defaultVariant: IProductDefaultVariant | null = await this._getProductDefaultVariant();\r\n let selectedProduct: Promise;\r\n if (defaultVariant && defaultVariant.DefaultProductId) {\r\n const defaultProduct = await getByIdAsync({ callerContext: actionContext }, defaultVariant.DefaultProductId, channelId);\r\n selectedProduct = new Promise(async (resolve) => {\r\n const newProduct = (await getSelectedVariant(\r\n new SelectedVariantInput(defaultProduct.MasterProductId ?? defaultProduct.RecordId, channelId, mappedDimensions),\r\n actionContext\r\n ));\r\n if (newProduct) {\r\n // @ts-expect-error\r\n this.productDetails.productDimensions = await (getDimensionsForSelectedVariant(\r\n new GetDimensionsForSelectedVariantInput(\r\n newProduct.MasterProductId ? newProduct.MasterProductId : newProduct.RecordId,\r\n channelId,\r\n mappedDimensions,\r\n this.props.context.request\r\n ),\r\n actionContext\r\n ));\r\n }\r\n resolve(newProduct);\r\n });\r\n } else {\r\n selectedProduct = new Promise(async (resolve) => {\r\n const newProduct = (await getSelectedVariant(\r\n new SelectedVariantInput(\r\n product.MasterProductId ? product.MasterProductId : product.RecordId,\r\n channelId,\r\n mappedDimensions, undefined,\r\n this.props.context.request\r\n ),\r\n actionContext\r\n ));\r\n if (newProduct) {\r\n // @ts-expect-error\r\n this.productDetails.productDimensions = await (getDimensionsForSelectedVariant(\r\n new GetDimensionsForSelectedVariantInput(\r\n newProduct.MasterProductId ? newProduct.MasterProductId : newProduct.RecordId,\r\n channelId,\r\n mappedDimensions,\r\n this.props.context.request\r\n ),\r\n actionContext\r\n ));\r\n }\r\n resolve(newProduct);\r\n });\r\n }\r\n // mmx-feature: default product variant --end\r\n this.setState({ selectedProduct });\r\n const variantProduct = await selectedProduct;\r\n\r\n if (variantProduct && this.productDetails) {\r\n // Step 5. Use these dimensions hydrate the inventory. Wrap this in a promise\r\n // so that places like add to cart can await it\r\n this.productDetails.product = variantProduct;\r\n let images: IImageData[] = await this.getImagesForProduct(product, variantProduct);\r\n images = this._filterMasterImageFromVariant(images, variantProduct);\r\n this.setState({\r\n mediaGalleryItems: [...images],\r\n activeIndex: 0,\r\n lastUpdate: Date.now()\r\n });\r\n\r\n const newAvailableQuantity = await getProductAvailabilitiesForSelectedVariant(\r\n new ProductAvailabilitiesForSelectedVariantInput(variantProduct.RecordId, channelId),\r\n actionContext\r\n );\r\n\r\n this.productDetails.productAvailableQuantity = newAvailableQuantity!;\r\n\r\n const isCustompriceSelected = variantProduct.Dimensions?.find(\r\n dimension => dimension.DimensionTypeValue === 4 && dimension.DimensionValue?.Value?.toLowerCase() === 'custom'\r\n );\r\n\r\n if (isCustompriceSelected) {\r\n this.setState({ isCustomPriceSelected: true });\r\n } else {\r\n // Remove custom amount error when unselect the custom amount\r\n const errorState = { ...this.state.errorState };\r\n errorState.customAmountError = undefined;\r\n\r\n this.setState({ isCustomPriceSelected: false, isPriceKeyedIn: false, errorState });\r\n }\r\n\r\n if (newAvailableQuantity && newAvailableQuantity.length > 0) {\r\n this.setState({ productAvailableQuantity: newAvailableQuantity[0] });\r\n } else {\r\n this.setState({ productAvailableQuantity: undefined });\r\n }\r\n\r\n // Step 6. Use these dimensions hydrate the product price.\r\n const newPrice = await getPriceForSelectedVariant(\r\n new PriceForSelectedVariantInput(variantProduct.RecordId, channelId),\r\n actionContext\r\n );\r\n\r\n if (newPrice) {\r\n this._updatePrice(newPrice);\r\n }\r\n\r\n const RetailMulitplePickupMFeatureState = this.props.data.featureState.result?.find(\r\n featureState => featureState.Name === 'Dynamics.AX.Application.RetailMultiplePickupDeliveryModeFeature'\r\n );\r\n\r\n // Step 7. Use these dimensions hydrate the product delivery options.\r\n const newDeliveryOptions = await getDeliveryOptionsForSelectedVariant(\r\n new GetDeliveryOptionsForSelectedVariantInput(\r\n variantProduct.RecordId,\r\n channelId,\r\n undefined,\r\n undefined,\r\n RetailMulitplePickupMFeatureState?.IsEnabled\r\n ),\r\n actionContext\r\n );\r\n\r\n if (newDeliveryOptions) {\r\n this.setState({ productDeliveryOptions: newDeliveryOptions });\r\n }\r\n\r\n this.setState({ isUpdatingDimension: false });\r\n await this._updateQuantitiesInState(variantProduct);\r\n }\r\n };\r\n\r\n //mmx-feature: default product variant --start\r\n private async _getProductDefaultVariant(): Promise {\r\n if (this.state.productDefaultVariant) {\r\n return this.state.productDefaultVariant\r\n } else {\r\n if (this.props.productId) {\r\n const actionResult = await getProductDefaultVariantAction(\r\n new ProductDefaultVariantInput(this.props.productId),\r\n this.props.context.actionContext\r\n )\r\n if (actionResult && actionResult.length > 0) {\r\n return actionResult[0];\r\n }\r\n }\r\n }\r\n return null;\r\n }\r\n //mmx-feature: default product variant --end\r\n\r\n private _getProductURL(product: SimpleProduct | undefined): string {\r\n if (!product || !msdyn365Commerce.isBrowser) {\r\n return '';\r\n }\r\n\r\n let productUrl = '';\r\n productUrl = getProductPageUrlSync(product.Name || '', product.RecordId, this.props.context.actionContext, undefined);\r\n\r\n const fullUrl = new URL(productUrl, window.location.href);\r\n product.Dimensions?.map(dimension => {\r\n const dimensionValue = dimension.DimensionValue?.Value;\r\n if (!StringExtensions.isNullOrWhitespace(dimensionValue)) {\r\n const dimensionName = convertProductDimensionTypeToDimensionTypes(dimension.DimensionTypeValue);\r\n fullUrl.searchParams.set(dimensionName, dimensionValue!);\r\n }\r\n });\r\n return fullUrl.href;\r\n }\r\n\r\n private shouldUseCmsAltText = (): boolean => {\r\n if (this.props.config.altTextSource === 'product') {\r\n return false;\r\n } else {\r\n return true;\r\n }\r\n };\r\n\r\n //mmx-feature: product warranties --start\r\n public _setSelectedWarrantyOption = (selectedWarrantyOption: IWarrantyOption | undefined) => {\r\n this.setState({\r\n selectedWarrantyOption: selectedWarrantyOption\r\n });\r\n if (selectedWarrantyOption?.WarrantableProduct) {\r\n this.props.context.actionContext.update(\r\n new ProductWarrantyStateInput(selectedWarrantyOption?.WarrantableProduct),\r\n selectedWarrantyOption\r\n );\r\n }\r\n };\r\n //mmx-feature: product warranties --end\r\n\r\n private async _updateQuantitiesInState(product: SimpleProduct): Promise {\r\n const isOrderQuantityLimitsFeatureEnabled = await this._isOrderQuantityLimitsFeatureEnabled();\r\n const isChannelLimitsFeatureEnabled = await this._isChannelLimitsFeatureEnabled();\r\n\r\n const min: number = this._getMinQuantityForCartLineItem(isOrderQuantityLimitsFeatureEnabled, product);\r\n const max: number = this._getMaxQuantityForCartLineItem(\r\n isChannelLimitsFeatureEnabled || isOrderQuantityLimitsFeatureEnabled,\r\n product\r\n );\r\n let quantity: number = this._getQuantity(product, isOrderQuantityLimitsFeatureEnabled);\r\n quantity = Math.max(quantity, min);\r\n\r\n this.setState({\r\n min,\r\n max,\r\n quantity\r\n });\r\n }\r\n\r\n private _getMinQuantityForCartLineItem(isOrderQuantityLimitsFeatureEnabled: boolean, product: SimpleProduct): number {\r\n if (isOrderQuantityLimitsFeatureEnabled && product?.Behavior?.MinimumQuantity && product.Behavior.MinimumQuantity > 0) {\r\n return product.Behavior.MinimumQuantity;\r\n }\r\n\r\n return 1;\r\n }\r\n\r\n private _getMaxQuantityForCartLineItem(isQuantityLimitsFeatureEnabled: boolean, product: SimpleProduct): number {\r\n if (isQuantityLimitsFeatureEnabled && product?.Behavior?.MaximumQuantity && product.Behavior.MaximumQuantity > 0) {\r\n return product.Behavior.MaximumQuantity;\r\n }\r\n\r\n return updateMaxQuantityForCartLineItem(this.props.context.app.config.maxQuantityForCartLineItem);\r\n }\r\n\r\n private _getQuantity(product: SimpleProduct, isOrderQuantityLimitsFeatureEnabled: boolean): number {\r\n const { quantity } = this.state;\r\n let defaultQuantity = 1;\r\n\r\n if (quantity !== defaultQuantity || !isOrderQuantityLimitsFeatureEnabled) {\r\n return quantity;\r\n }\r\n\r\n const cartConfiguration = this.props.data.cartConfiguration;\r\n const applyDefaultOrderSettingsForCartLine = cartConfiguration?.result?.ValidateDefaultOrderSettingsPerLine ?? false;\r\n if (!applyDefaultOrderSettingsForCartLine) {\r\n return quantity;\r\n }\r\n\r\n if (product?.Behavior?.DefaultQuantity && product.Behavior.DefaultQuantity > 0) {\r\n defaultQuantity = product.Behavior.DefaultQuantity;\r\n }\r\n\r\n return defaultQuantity;\r\n }\r\n\r\n private _filterMasterImageFromVariant(images?: IImageData[], product?: ISelectedProduct | null): IImageData[] {\r\n const shouldHidePrimaryImages = this.props.config.shouldHideMasterProductImagesForVariant ?? true;\r\n let variantImages = images ?? [];\r\n const isVariantProduct =\r\n !ObjectExtensions.isNullOrUndefined(product?.MasterProductId) || !ObjectExtensions.isNullOrUndefined(product?.productVariant);\r\n const itemId = product?.ItemId;\r\n if (shouldHidePrimaryImages && isVariantProduct && itemId) {\r\n variantImages = variantImages.filter(item => {\r\n const isApplicableForChildEntities = item.additionalProperties?.isApplicableForChildEntities;\r\n return !isApplicableForChildEntities;\r\n });\r\n if (!ArrayExtensions.hasElements(variantImages)) {\r\n variantImages = images ?? [];\r\n }\r\n }\r\n return variantImages;\r\n }\r\n\r\n private readonly _updateDimensionValue = (\r\n productDimensionFull: ProductDimensionFull,\r\n newValueId: string | undefined\r\n ): ProductDimensionValue | undefined => {\r\n if (newValueId && productDimensionFull.DimensionValues) {\r\n return productDimensionFull.DimensionValues.find(dimension => dimension.RecordId === +newValueId);\r\n }\r\n\r\n return undefined;\r\n };\r\n\r\n private readonly _getDropdownName = (dimensionType: number, resources: IMmxQuickviewResources): string => {\r\n const isGiftCard = this.productDetails?.product?.IsGiftCard;\r\n\r\n switch (dimensionType) {\r\n case 1: // ProductDimensionType.Color\r\n return resources.productDimensionTypeColor;\r\n case 2: // ProductDimensionType.Configuration\r\n return resources.productDimensionTypeConfiguration;\r\n case 3: // ProductDimensionType.Size\r\n return resources.productDimensionTypeSize;\r\n case 4: // ProductDimensionType.Style\r\n return isGiftCard ? resources.productDimensionTypeAmount : resources.productDimensionTypeStyle;\r\n default:\r\n return '';\r\n }\r\n };\r\n\r\n private async _isOrderQuantityLimitsFeatureEnabled(): Promise {\r\n const featureStatuses = await this.props.data.featureState;\r\n\r\n const isFeatureEnabledInHq = featureStatuses?.find(\r\n featureState => featureState.Name === RetailDefaultOrderQuantityLimitsFeatureName\r\n )?.IsEnabled;\r\n if (!isFeatureEnabledInHq) {\r\n return false;\r\n }\r\n const useSiteBuilderSettings = featureStatuses?.find(\r\n featureState => featureState.Name === RevertToSiteBuilderOrderQuantityLimitsSettingsCRTFeatureName\r\n )?.IsEnabled;\r\n\r\n if (useSiteBuilderSettings) {\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 if (defaultOrderQuantityLimitsFeatureConfig === 'all') {\r\n return true;\r\n }\r\n let customerInfo;\r\n try {\r\n customerInfo = await this.props.data.customerInformation;\r\n } catch (error) {\r\n this.props.telemetry.information(error);\r\n this.props.telemetry.debug('Unable to receive Customer Information. May be user is not authorized');\r\n return false;\r\n }\r\n\r\n return (\r\n customerInfo &&\r\n ((defaultOrderQuantityLimitsFeatureConfig === 'b2b' && customerInfo.IsB2b) ||\r\n (defaultOrderQuantityLimitsFeatureConfig === 'b2c' && !customerInfo.IsB2b))\r\n );\r\n } else {\r\n const cartConfiguration = await this.props.data.cartConfiguration;\r\n return !(cartConfiguration?.IgnoreOrderSettings ?? false);\r\n }\r\n }\r\n\r\n private async _isChannelLimitsFeatureEnabled(): Promise {\r\n const featureStatuses = await this.props.data.featureState;\r\n\r\n const isChannelLimitsFeatureEnabledInHq = featureStatuses?.find(\r\n featureState => featureState.Name === EcommerceQuantityLimitConfigurationsFeatureName\r\n )?.IsEnabled;\r\n\r\n return isChannelLimitsFeatureEnabledInHq ?? false;\r\n }\r\n\r\n private readonly onExiting = () => {\r\n this.setState({ animating: true });\r\n };\r\n\r\n private readonly onExited = () => {\r\n this.setState({ animating: false });\r\n };\r\n\r\n private readonly next = (): void => {\r\n if (this.isLastItem() === undefined) {\r\n return;\r\n }\r\n\r\n const nextIndex = this.isLastItem() ? 0 : this.state.activeIndex! + 1;\r\n this.goToIndex(nextIndex);\r\n };\r\n\r\n private readonly previous = (): void => {\r\n const nextIndex = this.isFirstItem()\r\n ? this.state.mediaGalleryItems\r\n ? this.state.mediaGalleryItems.length - 1\r\n : 0\r\n : this.state.activeIndex! - 1;\r\n this.goToIndex(nextIndex);\r\n };\r\n\r\n private readonly goToIndex = (index: number): void => {\r\n this.setState({ activeIndex: index });\r\n };\r\n\r\n private _renderCarouselItemImageView(image: IImageData, imageSettings: IImageSettings, index: number): React.ReactNode {\r\n return <>{this._getCarouselItem(image, imageSettings, index)};\r\n }\r\n\r\n private readonly _getCarouselItem = (image: IImageData, imageSettings: IImageSettings, index: number): React.ReactNode => (\r\n \r\n );\r\n\r\n private readonly _getThumbnailItem = (\r\n image: IImageData,\r\n imageSettings: IImageSettings,\r\n index: number,\r\n modifiedActiveIndex: number\r\n ): IQuickViewThumbnailItemViewProps => {\r\n const classes = classnames(\r\n 'ms-media-gallery__thumbnail-item',\r\n modifiedActiveIndex === index ? 'ms-media-gallery__thumbnail-item-active' : ''\r\n );\r\n\r\n return {\r\n ThumbnailItemContainerProps: {\r\n tag: 'li' as NodeTag,\r\n className: classes,\r\n role: 'tab',\r\n tabIndex: 0,\r\n key: index,\r\n 'aria-label': image.altText,\r\n 'aria-selected': modifiedActiveIndex === index,\r\n 'aria-controls': `${this.props.id}__carousel-item__${index}`,\r\n onClick: this._generateOnThumbnailClick(index),\r\n onKeyDown: this._generateOnThumbnailKeyDown(index)\r\n },\r\n Picture: (\r\n \r\n )\r\n };\r\n };\r\n\r\n private readonly _generateOnThumbnailKeyDown = (index: number) => {\r\n return (event: React.KeyboardEvent) => {\r\n if (event.which === KeyCodes.Enter || event.which === KeyCodes.Space) {\r\n event.preventDefault();\r\n this.goToIndex(index);\r\n }\r\n };\r\n };\r\n\r\n private readonly _generateOnThumbnailClick = (index: number) => {\r\n return (event: React.MouseEvent) => {\r\n event.preventDefault();\r\n this.goToIndex(index);\r\n };\r\n };\r\n\r\n private _mapProductToImageData(product: SimpleProduct): IImageData {\r\n return {\r\n src: product.PrimaryImageUrl || '',\r\n altText: product.Name\r\n };\r\n }\r\n\r\n private readonly isFirstItem = () => this.state.activeIndex === 0;\r\n\r\n private readonly isLastItem = () => this.state.mediaGalleryItems && this.state.activeIndex === this.state.mediaGalleryItems.length - 1;\r\n\r\n private readonly onClickHandler = async (event: React.MouseEvent) => {\r\n return this._onClick(event, this.props);\r\n };\r\n\r\n private readonly _onClick = async (_event: React.MouseEvent, props: IQuickviewExtentedProps) => {\r\n if (!ObjectExtensions.isNullOrUndefined(props.selectedProductId)) {\r\n const {\r\n context: {\r\n actionContext,\r\n request: {\r\n apiSettings: { channelId }\r\n }\r\n }\r\n } = this.props;\r\n\r\n if (this.props.selectedProductId) {\r\n this.setState({ modalOpen: true });\r\n const productId = this.props.selectedProductId;\r\n const selectedDimensions = this.props.selectedDimensions;\r\n this.productDetails = await getProductDetails(productId, channelId, actionContext, selectedDimensions);\r\n //mmx-feature: product warranties --start\r\n /*\r\n const { product, productPrice } = this.productDetails;\r\n */\r\n const { productWarranties, product, productPrice } = this.productDetails;\r\n //mmx-feature: product warranties --end\r\n const currentTime: number = Date.now();\r\n this._updateMediaItems(currentTime);\r\n if (productPrice) {\r\n this._updatePrice(productPrice);\r\n }\r\n\r\n if (product) {\r\n const { context } = this.props;\r\n if (context.app.config.maxRecentlyViewedItemsCount > 0) {\r\n RecentlyViewedState.instance(this.props.context, context.app.config.maxRecentlyViewedItemsCount, product.RecordId);\r\n }\r\n // Check if the product is service or not by product type\r\n if (product.ItemTypeValue === ReleasedProductType.Service) {\r\n this.setState({ isServiceItem: true });\r\n }\r\n await this._updateQuantitiesInState(product);\r\n let images = await this.getImagesForProduct(product, product);\r\n images = this._filterMasterImageFromVariant(images);\r\n this.setState({\r\n //mmx-feature: product warranties --start\r\n productWarranties: productWarranties,\r\n //mmx-feature: product warranties --start\r\n mediaGalleryItems: [...images],\r\n activeIndex: 0,\r\n lastUpdate: currentTime\r\n });\r\n }\r\n this.setState({ isDataLoaded: true });\r\n }\r\n }\r\n };\r\n\r\n private getImagesForProduct = async (product: ISelectedProduct, variantProduct: ISelectedProduct): Promise => {\r\n let images: IImageData[];\r\n if (this.props.context.app?.config?.OmniChannelMedia) {\r\n images = await getProductImages(\r\n product.RecordId,\r\n this.shouldUseCmsAltText(),\r\n +this.props.context.request.apiSettings.channelId,\r\n this.props.context.actionContext,\r\n product.Name,\r\n product.productVariant ?? variantProduct\r\n );\r\n } else {\r\n images = await getValidProductImages(\r\n product.RecordId || 0,\r\n +this.props.context.request.apiSettings.channelId,\r\n this.props.context.actionContext,\r\n this.props.config.thumbnailImageSettings ?? this.defaultThumbnailImageSettings,\r\n product.productVariant ?? variantProduct\r\n );\r\n }\r\n return images;\r\n };\r\n\r\n private readonly _quickViewCloseButtonclick = () => {\r\n this._hideQuickViewDialog();\r\n };\r\n\r\n private _hideQuickViewDialog(): void {\r\n //mmx-feature: product warranty --start\r\n const selectedProductId = this.props.selectedProductId;\r\n if (selectedProductId) {\r\n this.props.context.actionContext.update(new ProductQuantityStateInput(selectedProductId), 1);\r\n const emptyWarrantyOption = getEmptyWarrantyOption(selectedProductId, undefined, undefined);\r\n this.props.context.actionContext.update(new ProductWarrantyStateInput(selectedProductId), emptyWarrantyOption);\r\n };\r\n //mmx-feature: product warranty --end\r\n this.dimensions = [];\r\n this.setState({\r\n //mmx-feature: product warranty --start\r\n productDefaultVariant: undefined,\r\n productWarranties: undefined,\r\n selectedWarrantyOption: undefined,\r\n //mmx-feature: product warranty --end\r\n modalOpen: false,\r\n quantity: 1,\r\n min: undefined,\r\n max: undefined,\r\n errorState: {\r\n configureErrors: {}\r\n },\r\n selectedProduct: undefined,\r\n productPrice: undefined,\r\n productDeliveryOptions: undefined,\r\n isUpdatingDimension: false,\r\n productAvailableQuantity: undefined,\r\n lastUpdate: undefined,\r\n activeIndex: undefined,\r\n animating: undefined,\r\n mediaGalleryItems: [],\r\n isDataLoaded: false\r\n });\r\n }\r\n\r\n /**\r\n * Quantity Change Handler.\r\n * @param callbacks -Buybox callbacks.\r\n * @returns Update quantity.\r\n */\r\n private readonly onChangeHandler = (callbacks: IBuyboxCallbacks) => (newValue: number): boolean => {\r\n if (callbacks.updateQuantity) {\r\n return callbacks.updateQuantity(newValue);\r\n }\r\n return true;\r\n };\r\n\r\n private readonly _renderQuantity = (\r\n props: IQuickviewExtentedProps,\r\n state: IBuyboxState,\r\n callbacks: IBuyboxCallbacks\r\n ): IBuyboxProductQuantityViewProps => {\r\n const { resources } = props;\r\n\r\n const {\r\n quantity,\r\n min,\r\n max,\r\n errorState: { quantityError }\r\n } = state;\r\n\r\n return {\r\n ContainerProps: {\r\n className: 'ms-quickView__quantity'\r\n },\r\n LabelContainerProps: {\r\n tag: 'label',\r\n className: 'ms-quickView__product-quantity-label',\r\n htmlFor: 'ms-quickView__product-quantity-input'\r\n },\r\n heading:
{resources.productQuantityHeading}
,\r\n errors: quantityError && (\r\n \r\n \r\n ),\r\n input: (\r\n \r\n )\r\n };\r\n };\r\n\r\n private _renderEmptyImage(imageSettings: IImageSettings | undefined): React.ReactNode {\r\n return (\r\n
\r\n \r\n
\r\n );\r\n }\r\n}\r\nexport default Quickview;\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 { IActionContext } from '@msdyn365-commerce/core';\r\nimport { getCartStateData, GetCartStateDataInput } from '@msdyn365-commerce/global-state';\r\nimport { ProductDimension } from '@msdyn365-commerce/retail-proxy';\r\nimport {\r\n getDimensionsForSelectedVariant,\r\n GetDimensionsForSelectedVariantInput,\r\n getPriceForSelectedVariant,\r\n getProductAvailabilitiesForSelectedVariant,\r\n getRatingsSummary,\r\n GetRatingsSummaryInput,\r\n getRnrEndpointId,\r\n getRnrPartnerId,\r\n getSelectedVariant,\r\n PriceForSelectedVariantInput,\r\n ProductAvailabilitiesForSelectedVariantInput,\r\n SelectedVariantInput\r\n} from '@msdyn365-commerce-modules/retail-actions';\r\n\r\n// mmx-feature: default configuration --start\r\n/*\r\nimport { IProductDetails } from '@msdyn365-commerce-modules/buybox';\r\n*/\r\nimport { IProductDetails } from '../../mmx-quickview';\r\nimport getProductDefaultVariantAction, { createProductDefaultVariantInput } from '../../../actions/get-product-default-variant.action';\r\nimport getProductWarrantiesAction, { createProductWarrantiesInput } from '../../../actions/get-product-warranties.action';\r\n// mmx-feature: default configuration --end\r\n\r\n/**\r\n * Calls the Retail API and returns the product details.\r\n * @param productId\r\n * @param channelId\r\n * @param ctx\r\n * @param selectedDimensions - Dimensions previously selected for the product variant.\r\n */\r\nexport async function getProductDetails(\r\n productId: number,\r\n channelId: number,\r\n ctx: IActionContext,\r\n selectedDimensions?: ProductDimension[]\r\n): Promise {\r\n const productDetails: IProductDetails = {};\r\n\r\n if (productId > 0 && channelId > 0) {\r\n const tenantId = getRnrPartnerId(ctx);\r\n const serviceEndPoint = getRnrEndpointId(ctx);\r\n\r\n // mmx-feature: default configuration --start\r\n /*\r\n // Get Product Details\r\n await getSelectedVariant(new SelectedVariantInput(productId, channelId, selectedDimensions, 'get', ctx.requestContext), ctx)\r\n .then(async productResult => {\r\n if (productResult) {\r\n productDetails.product = productResult;\r\n }\r\n })\r\n .catch(error => {\r\n ctx.telemetry.exception(error);\r\n });\r\n */\r\n let productDefaultVariantId : number | null = null;\r\n await getProductDefaultVariantAction(\r\n createProductDefaultVariantInput({\r\n requestContext: ctx.requestContext,\r\n config: {\r\n productId: productId\r\n }\r\n }),\r\n ctx\r\n ).then(async productDefaultVariant => {\r\n if (productDefaultVariant && productDefaultVariant.length > 0 && productDefaultVariant[0].DefaultProductId) {\r\n productDefaultVariantId = productDefaultVariant[0].DefaultProductId;\r\n await getProductWarrantiesAction(\r\n createProductWarrantiesInput({\r\n requestContext: ctx.requestContext,\r\n config: {\r\n productId: productId\r\n }\r\n }),\r\n ctx\r\n ).then(async productWarranties => {\r\n if (productWarranties && productWarranties.length > 0) {\r\n productDetails.productWarranties = productWarranties[0];\r\n }\r\n })\r\n .catch(error => {\r\n ctx.telemetry.exception(error);\r\n });\r\n }\r\n })\r\n .catch(error => {\r\n ctx.telemetry.exception(error);\r\n });\r\n \r\n // Get Product Details\r\n await getSelectedVariant(\r\n new SelectedVariantInput(productDefaultVariantId ?? productId, channelId, selectedDimensions, 'get',\r\n ctx.requestContext),\r\n ctx\r\n ).then(async productResult => {\r\n if (productResult) {\r\n productDetails.product = productResult;\r\n }\r\n })\r\n .catch(error => {\r\n ctx.telemetry.exception(error);\r\n });\r\n // mmx-feature: default configuration --end\r\n\r\n //mmx-feature: default variant --start\r\n /*\r\n // Get Product Availability\r\n await getProductAvailabilitiesForSelectedVariant(new ProductAvailabilitiesForSelectedVariantInput(productId, channelId), ctx)\r\n */\r\n // Get Product Availability\r\n await getProductAvailabilitiesForSelectedVariant(new ProductAvailabilitiesForSelectedVariantInput(\r\n productDefaultVariantId ?? productId, channelId), ctx)\r\n //mmx-feature: default variant --end\r\n .then(productAvailabilities => {\r\n if (productAvailabilities) {\r\n productDetails.productAvailableQuantity = productAvailabilities;\r\n }\r\n })\r\n .catch(error => {\r\n ctx.telemetry.exception(error);\r\n });\r\n\r\n // Get Product Price\r\n await getPriceForSelectedVariant(new PriceForSelectedVariantInput(productId, channelId, undefined), ctx)\r\n .then(productPrice => {\r\n if (productPrice) {\r\n productDetails.productPrice = productPrice;\r\n }\r\n })\r\n .catch(error => {\r\n ctx.telemetry.exception(error);\r\n });\r\n\r\n // Get product dimensions\r\n await getDimensionsForSelectedVariant(\r\n new GetDimensionsForSelectedVariantInput(productId, channelId, selectedDimensions, ctx.requestContext),\r\n ctx\r\n )\r\n .then(productDimensions => {\r\n if (productDimensions) {\r\n productDetails.productDimensions = productDimensions;\r\n }\r\n })\r\n .catch(error => {\r\n ctx.telemetry.exception(error);\r\n });\r\n\r\n // Get Cart State\r\n await getCartStateData(new GetCartStateDataInput(ctx.requestContext.apiSettings, ctx.requestContext), ctx)\r\n .then(cartState => {\r\n productDetails.cart = cartState;\r\n })\r\n .catch(error => {\r\n ctx.telemetry.exception(error);\r\n });\r\n\r\n // Get Product Ratings\r\n if (tenantId && serviceEndPoint) {\r\n await getRatingsSummary(new GetRatingsSummaryInput(productId.toString(), tenantId, serviceEndPoint), ctx)\r\n .then(ratingsSummaryData => {\r\n if (ratingsSummaryData) {\r\n productDetails.ratingsSummary = ratingsSummaryData;\r\n }\r\n })\r\n .catch(error => {\r\n ctx.telemetry.exception(error);\r\n });\r\n }\r\n }\r\n\r\n return productDetails;\r\n}\r\n","/*!\r\n * Copyright (c) Microsoft Corporation.\r\n * All rights reserved. See LICENSE in the project root for license information.\r\n */\r\n\r\n/* eslint-disable no-duplicate-imports */\r\nimport { Module, Node } from '@msdyn365-commerce-modules/utilities';\r\nimport * as React from 'react';\r\n\r\nimport {\r\n IBuyboxAddToCartViewProps,\r\n IBuyboxAddToWishlistViewProps,\r\n IBuyboxKeyInPriceViewProps,\r\n IBuyboxProductConfigureDropdownViewProps,\r\n IBuyboxProductConfigureViewProps,\r\n IBuyboxProductQuantityViewProps\r\n//mmx-feature: quickview clone --start\r\n/*\r\n} from '@msdyn365-commerce-modules/buybox';\r\n*/\r\n} from '../mmx-buybox/common';\r\n//mmx-feature: quickview clone --end\r\nimport { IQuickviewViewProps } from './mmx-quickview';\r\n\r\nconst _renderAddToCart = (addToCart: IBuyboxAddToCartViewProps): JSX.Element => {\r\n const { ContainerProps, errorBlock, button } = addToCart;\r\n\r\n return (\r\n \r\n {errorBlock}\r\n {button}\r\n \r\n );\r\n};\r\n\r\nconst _renderAddToWishlist = (addToWishlist: IBuyboxAddToWishlistViewProps): JSX.Element => {\r\n const { ContainerProps, errorBlock, button } = addToWishlist;\r\n\r\n return (\r\n \r\n {errorBlock}\r\n {button}\r\n \r\n );\r\n};\r\n\r\nconst _renderConfigureDropdown = (dropdown: IBuyboxProductConfigureDropdownViewProps): JSX.Element => {\r\n const { ContainerProps, LabelContainerProps, heading, errors, select } = dropdown;\r\n\r\n return (\r\n \r\n \r\n {heading}\r\n {errors}\r\n \r\n {select}\r\n \r\n );\r\n};\r\n\r\nconst _renderQuickViewPopup = (props: IQuickviewViewProps): JSX.Element => {\r\n const {\r\n ModalContainer,\r\n ModalHeaderContainer,\r\n ModalFooterContainer,\r\n ModalHeaderContent,\r\n ModalBodyContainer,\r\n addToWishlist,\r\n addToCart,\r\n cartContainerProps\r\n } = props;\r\n\r\n return (\r\n \r\n {ModalHeaderContent}\r\n {_renderBodyContent(props)}\r\n \r\n \r\n {addToCart && _renderAddToCart(addToCart)}\r\n {addToWishlist && _renderAddToWishlist(addToWishlist)}\r\n \r\n \r\n \r\n );\r\n};\r\n\r\nconst _renderQuantity = (quantity: IBuyboxProductQuantityViewProps, quantityLimitsMessages: React.ReactNode): JSX.Element => {\r\n const { ContainerProps, LabelContainerProps, heading, input, errors } = quantity;\r\n\r\n return (\r\n \r\n \r\n {heading}\r\n {errors}\r\n \r\n {input}\r\n {quantityLimitsMessages}\r\n \r\n );\r\n};\r\n\r\nconst _renderKeyInPrice = (keyInPrice: IBuyboxKeyInPriceViewProps): JSX.Element => {\r\n const { ContainerProps, LabelContainerProps, heading, input } = keyInPrice;\r\n\r\n return (\r\n \r\n {heading}\r\n {input}\r\n \r\n );\r\n};\r\n\r\nconst _renderConfigure = (configure: IBuyboxProductConfigureViewProps): JSX.Element => {\r\n const { ContainerProps, dropdowns } = configure;\r\n\r\n return {dropdowns.map(_renderConfigureDropdown)};\r\n};\r\n\r\nconst _renderBodyContent = (props: IQuickviewViewProps): JSX.Element => {\r\n const {\r\n title,\r\n price,\r\n rating,\r\n keyInPrice,\r\n quantity,\r\n configure,\r\n inventoryLabel,\r\n quantityLimitsMessages,\r\n seeDetailsbutton,\r\n loading,\r\n ProductInfoContainerProps,\r\n MediaGalleryContainerProps,\r\n CarouselProps,\r\n unitOfMeasure\r\n } = props;\r\n if (loading) {\r\n return <>{loading};\r\n }\r\n return (\r\n <>\r\n \r\n \r\n \r\n \r\n {title}\r\n {price}\r\n {unitOfMeasure}\r\n {rating}\r\n {configure && _renderConfigure(configure)}\r\n {keyInPrice && _renderKeyInPrice(keyInPrice)}\r\n {quantity && _renderQuantity(quantity, quantityLimitsMessages)}\r\n {seeDetailsbutton}\r\n {inventoryLabel}\r\n \r\n \r\n );\r\n};\r\n\r\n/**\r\n * Functional component which renders quick view button and popup based by the given props file.\r\n * @param {IQuickviewViewProps} props - Configuration for the quick view component.\r\n * @returns {React.FC} - Functional component of the quick view.\r\n */\r\nexport const QuickViewFunctionalComponent: React.FC = (props: IQuickviewViewProps) => {\r\n const { quickView, quickViewButton, isModalOpen, isMobileDevice } = props;\r\n return (\r\n \r\n {!isMobileDevice && quickViewButton}\r\n {isModalOpen && _renderQuickViewPopup(props)}\r\n \r\n );\r\n};\r\n\r\nexport default QuickViewFunctionalComponent;\r\n","/*!\r\n * Copyright (c) Microsoft Corporation.\r\n * All rights reserved. See LICENSE in the project root for license information.\r\n */\r\n\r\nimport { AddToWishlistComponent, IWishlistActionErrorResult } from '@msdyn365-commerce/components';\r\nimport { SimpleProduct } from '@msdyn365-commerce/retail-proxy';\r\n//mmx-feature: imports --start\r\n/*\r\nimport {\r\n getConfigureErrors,\r\n IBuyboxAddToCartViewProps,\r\n IBuyboxCallbacks,\r\n IBuyboxCommonResources,\r\n IBuyboxKeyInPriceViewProps,\r\n IBuyboxProductConfigureDropdownViewProps,\r\n IBuyboxProductConfigureViewProps,\r\n IBuyboxProductQuantityViewProps,\r\n IBuyboxState,\r\n IQuickviewViewProps\r\n} from '@msdyn365-commerce-modules/buybox';\r\n*/\r\n\r\nimport {\r\n getConfigureErrors,\r\n IBuyboxAddToCartViewProps,\r\n IBuyboxCallbacks,\r\n IBuyboxCommonResources,\r\n IBuyboxKeyInPriceViewProps,\r\n IBuyboxProductQuantityViewProps,\r\n IBuyboxState\r\n} from '../../../modules/mmx-buybox/common';\r\nimport { IMmxQuickviewData, IQuickviewViewProps } from '../../../modules/mmx-quickview';\r\nimport ProductWarrantyComponent from '../../../components/product-warranty/product-warranty';\r\nimport { IWarrantyOption } from '../../../actions/DataServiceEntities.g';\r\nimport { getSelectedProductIdFromActionInput } from '../../../utilities/utils';\r\nimport { getEmptyWarrantyOption } from '../../../utilities/warranty/utils';\r\nimport { IProductWarrantyComponentProps } from '../../../components/product-warranty/product-warranty.props';\r\nimport { ProductWarrantyStateInput } from '../../../actions/state-data-actions/product-warranty-state.action';\r\n//mmx-feature: imports --end\r\nimport { StringExtensions } from '@msdyn365-commerce-modules/retail-actions';\r\nimport { IModuleProps, Module, Node } from '@msdyn365-commerce-modules/utilities';\r\nimport * as React from 'react';\r\n\r\n//mmx-feature: imports --start\r\n/*\r\nimport { IQuickviewProps as IQuickviewPropsExtend } from '../definition-extensions/quickview.ext.props.autogenerated';\r\n*/\r\nimport { IMmxQuickviewProps as IQuickviewExtentedProps } from '../definition-extensions/mmx-quickview.ext.props.autogenerated';\r\n//mmx-features: imports --end\r\n\r\n/**\r\n * RenderAddToCart.\r\n * @param addToCart - AddToCart.\r\n * @returns -- Returns.\r\n */\r\n//mmx-feature: add to cart --begin\r\n/*\r\nconst renderAddToCart = (addToCart: IBuyboxAddToCartViewProps): JSX.Element => {\r\n*/\r\nconst renderAddToCart = (addToCart: IBuyboxAddToCartViewProps, storeSelector: React.ReactNode): JSX.Element => {\r\n//mmx-feature: add to cart --end\r\n // eslint-disable-next-line @typescript-eslint/naming-convention -- Dependency from Quickview.tsx file\r\n const { ContainerProps, errorBlock, button } = addToCart;\r\n\r\n return (\r\n \r\n {errorBlock}\r\n {/*mmx-feature: add to cart --start*/\r\n storeSelector\r\n /*mmx-features: add to cart --end*/}\r\n {button}\r\n \r\n );\r\n};\r\n\r\n/**\r\n * Add to wishlist failed function.\r\n * @param callbacks -Buybox callbacks.\r\n * @param resources -Buybox resources.\r\n * @param product -Simple product.\r\n * @returns Update error state.\r\n */\r\nconst onAddToWishlistFailed = (\r\n callbacks: IBuyboxCallbacks | undefined,\r\n resources: IBuyboxCommonResources,\r\n product: SimpleProduct | undefined\r\n) => (result: IWishlistActionErrorResult) => {\r\n callbacks?.updateErrorState({\r\n errorHost: 'WISHLIST',\r\n configureErrors:\r\n result.status === 'MISSINGDIMENSION' ? getConfigureErrors(result.missingDimensions, resources, product?.IsGiftCard) : {}\r\n });\r\n};\r\n\r\n/**\r\n * RenderAddToWishlist.\r\n * @param props - Buybox viewprops.\r\n * @param state - Buybox state.\r\n * @param callbacks - Buybox callbacks.\r\n * @param product - Product data.\r\n * @returns -- Returns.\r\n */\r\nconst renderAddtoWishlistButton = (\r\n props: IQuickviewViewProps,\r\n state: IBuyboxState,\r\n callbacks: IBuyboxCallbacks | undefined,\r\n product: SimpleProduct\r\n): React.ReactNode => {\r\n const { context, resources } = props;\r\n const wishlists = props.data.wishlists.result;\r\n const isShowWishlitButtonText = true;\r\n return (\r\n \r\n );\r\n};\r\n\r\n/**\r\n * RenderAddToWishlist.\r\n * @param props - Buybox viewprops.\r\n * @param state - Buybox state.\r\n * @param callbacks - Buybox callbacks.\r\n * @returns -- Returns.\r\n */\r\nconst renderAddToWishlist = (\r\n props: IQuickviewViewProps,\r\n state: IBuyboxState,\r\n callbacks: IBuyboxCallbacks | undefined\r\n): JSX.Element | null => {\r\n const product = props.productDetails?.product;\r\n if (!props.addToWishlist || !product) {\r\n return null;\r\n }\r\n\r\n const wishlistButton = renderAddtoWishlistButton(props, state, callbacks, product);\r\n return (\r\n \r\n {props.addToWishlist.errorBlock}\r\n {wishlistButton}\r\n \r\n );\r\n};\r\n\r\n/**\r\n * RenderQuantity.\r\n * @param quantity - Quantity.\r\n * @param quantityLimitsMessages - QuantityLimitsMessages.\r\n * @param props - Props.\r\n * @returns -- Returns.\r\n */\r\n//mmx-feature: quantity disable --start\r\n/*\r\nconst renderQuantity = (\r\n quantity: IBuyboxProductQuantityViewProps,\r\n quantityLimitsMessages: React.ReactNode,\r\n props: IQuickviewViewProps\r\n): JSX.Element => {\r\n*/\r\nconst renderQuantity = (\r\n quantity: IBuyboxProductQuantityViewProps, \r\n quantityLimitsMessages: React.ReactNode, \r\n props: IQuickviewViewProps & IQuickviewExtentedProps,\r\n): JSX.Element => {\r\n //mmx-feature: quantity disable --end\r\n // eslint-disable-next-line @typescript-eslint/naming-convention -- Dependency from Quickview.tsx file\r\n const { ContainerProps, LabelContainerProps, heading, input, errors } = quantity;\r\n const { unitOfMeasure } = props;\r\n\r\n //mmx-feature: quantity disable --start\r\n const selectedWarranty = props.state.selectedWarrantyOption;\r\n if (props?.context.app.config.disableWarrantyOnMultipleQuantityProducts && selectedWarranty && selectedWarranty.Period > 0) {\r\n //@ts-ignore-error\r\n const quantity = input?.props?.currentCount;\r\n return Quantity: {quantity};\r\n }\r\n //mmx-feature: quantity disable --end\r\n\r\n return (\r\n \r\n {heading}\r\n {input}\r\n {unitOfMeasure}\r\n {quantityLimitsMessages}\r\n {errors}\r\n \r\n );\r\n};\r\n\r\n/**\r\n * KenderKeyInPrice.\r\n * @param keyInPrice - KeyInPrice.\r\n * @returns -- Returns.\r\n */\r\nconst renderKeyInPrice = (keyInPrice: IBuyboxKeyInPriceViewProps): JSX.Element => {\r\n // eslint-disable-next-line @typescript-eslint/naming-convention -- Dependency from Quickview.tsx file\r\n const { ContainerProps, LabelContainerProps, heading, input } = keyInPrice;\r\n\r\n return (\r\n \r\n {heading}\r\n {input}\r\n \r\n );\r\n};\r\n\r\n//mmx-feature: default variant --start\r\n/**\r\n * RenderConfigureDropdown.\r\n * @param dropdown - Buybox product configure dropdown view props.\r\n * @returns -- Returns JSX.Element.\r\n */\r\n/*\r\nconst renderConfigureDropdown = (dropdown: IBuyboxProductConfigureDropdownViewProps): JSX.Element => {\r\n const { ContainerProps, LabelContainerProps, heading, errors, select } = dropdown;\r\n\r\n return (\r\n \r\n {heading}\r\n {select}\r\n {errors}\r\n \r\n );\r\n};\r\n*/\r\n\r\n/**\r\n * RenderConfigure.\r\n * @param configure - Buybox product configure view props.\r\n * @returns -- Returns JSX.Element.\r\n */\r\n//mmx-feature: default configuration --start\r\n/*\r\nconst renderConfigure = (configure: IBuyboxProductConfigureViewProps): JSX.Element => {\r\n const { ContainerProps, dropdowns } = configure;\r\n\r\n return {dropdowns.map(renderConfigureDropdown)};\r\n};\r\n*/\r\n//mmx-feature: default configuration --end\r\n\r\n//mmx-feature: product warranty --start\r\nconst renderWarrantySelectorComponentByQuantity = (\r\n productWarrantyComponentProps: IProductWarrantyComponentProps,\r\n props: IQuickviewViewProps & IQuickviewExtentedProps,\r\n state: any,\r\n isMultipleQuantity: boolean,\r\n setIsMultipleQuantity: any\r\n): JSX.Element | undefined => {\r\n if (props?.context.app.config.disableWarrantyOnMultipleQuantityProducts && state.quantity > 1) {\r\n if (!isMultipleQuantity) {\r\n let productId = getSelectedProductIdFromActionInput(props.context.actionContext);\r\n if (productId && productWarrantyComponentProps?.productWarranties?.WarrantyGroups) {\r\n const warrantyOptions = productWarrantyComponentProps?.productWarranties?.WarrantyGroups\r\n ? productWarrantyComponentProps.productWarranties.WarrantyGroups[0].WarrantyOptions\r\n : undefined;\r\n let emptyWarranty = getEmptyWarrantyOption(+productId, warrantyOptions);\r\n props.context.actionContext.update(new ProductWarrantyStateInput(+productId), emptyWarranty);\r\n }\r\n setIsMultipleQuantity(true);\r\n }\r\n productWarrantyComponentProps.isSelectWarrantyDisabled = true;\r\n return ;\r\n } else {\r\n if (props?.context.app.config.disableWarrantyOnMultipleQuantityProducts && isMultipleQuantity) {\r\n setIsMultipleQuantity(false);\r\n }\r\n return renderWarrantySelectorComponent(productWarrantyComponentProps);\r\n }\r\n};\r\n\r\nconst renderWarrantySelectorComponent = (productWarrantyComponentProps: IProductWarrantyComponentProps) => {\r\n return ;\r\n};\r\n//mmx-feature: product warranty --end\r\n\r\n/**\r\n * RenderBodyContent.\r\n * @param props - Props.\r\n * @returns -- Returns.\r\n */\r\n//mmx-feature: product warranty/quantity --start\r\n/*\r\nconst renderBodyContent = (props: IQuickviewViewProps & IQuickviewPropsExtend<{}>): JSX.Element => {\r\n const {\r\n price,\r\n keyInPrice,\r\n quantity,\r\n inventoryLabel,\r\n quantityLimitsMessages,\r\n loading,\r\n // eslint-disable-next-line @typescript-eslint/naming-convention -- Dependency from Quickview.tsx file\r\n ProductInfoContainerProps,\r\n MediaGalleryContainerProps,\r\n CarouselProps,\r\n addToWishlist,\r\n configure,\r\n callbacks,\r\n state\r\n } = props;\r\n */\r\nconst renderBodyContent = (props: IQuickviewViewProps & IQuickviewExtentedProps): JSX.Element => {\r\n const {\r\n price,\r\n keyInPrice,\r\n quantity,\r\n inventoryLabel,\r\n quantityLimitsMessages,\r\n loading,\r\n // eslint-disable-next-line @typescript-eslint/naming-convention -- Dependency from Quickview.tsx file\r\n ProductInfoContainerProps,\r\n MediaGalleryContainerProps,\r\n CarouselProps,\r\n productWarrantyComponentProps,\r\n addToWishlist,\r\n callbacks,\r\n state\r\n } = props;\r\n const [isMultipleQuantity, setIsMultipleQuantity] = React.useState(false);\r\n //mmx-feature: selected warranty disable function --end\r\n if (loading) {\r\n return <>{loading};\r\n }\r\n\r\n return (\r\n <>\r\n \r\n \r\n \r\n \r\n \r\n \r\n {props.resources.priceText}\r\n {price}\r\n \r\n {addToWishlist && renderAddToWishlist(props, state, callbacks)}\r\n \r\n {//mmx-feature: pickup option --start\r\n /*\r\n {configure && renderConfigure(configure)}\r\n */\r\n props.context.app.config.productWarrantyEnabled && productWarrantyComponentProps\r\n ? renderWarrantySelectorComponentByQuantity(\r\n productWarrantyComponentProps,\r\n props,\r\n props.state,\r\n isMultipleQuantity,\r\n setIsMultipleQuantity\r\n )\r\n : <>\r\n //mmx-feature: pickup option --end\r\n }\r\n {keyInPrice && renderKeyInPrice(keyInPrice)}\r\n {quantity && renderQuantity(quantity, quantityLimitsMessages, props)}\r\n {inventoryLabel}\r\n \r\n \r\n );\r\n};\r\n\r\n/**\r\n * RenderQuickViewPopup.\r\n * @param props - Props.\r\n * @returns -- Returns.\r\n */\r\n//mmx-feature: product warranty --start\r\n/*\r\nconst renderQuickViewPopup = (props: IQuickviewViewProps & IQuickviewPropsExtend<{}>): JSX.Element => {\r\n*/\r\nconst renderQuickViewPopup = (props: IQuickviewViewProps & IQuickviewExtentedProps): JSX.Element => {\r\n //mmx-feature: product warranty --end\r\n // eslint-disable-next-line @typescript-eslint/naming-convention -- Dependency from Quickview.tsx file\r\n const {\r\n ModalContainer,\r\n ModalHeaderContainer,\r\n ModalFooterContainer,\r\n ModalHeaderContent,\r\n ModalBodyContainer,\r\n addToCart,\r\n cartContainerProps,\r\n seeDetailsbutton\r\n } = props;\r\n\r\n return (\r\n \r\n \r\n {ModalHeaderContent}\r\n \r\n {props.title}\r\n {!props.loading && !StringExtensions.isNullOrEmpty(props.state.productPrice?.ItemId) ? (\r\n \r\n {props.resources.skuText}\r\n {props.state.productPrice?.ItemId}\r\n \r\n ) : (\r\n ''\r\n )}\r\n {props.rating}\r\n \r\n \r\n {renderBodyContent(props)}\r\n \r\n \r\n {addToCart && seeDetailsbutton}\r\n {/*mmx-feature: product warranty --start*/\r\n /*\r\n {addToCart && renderAddToCart(addToCart)}\r\n */\r\n addToCart && renderAddToCart(addToCart, props.slots.storeSelector)\r\n /*mmx-feature: product warranty --end*/}\r\n \r\n \r\n \r\n );\r\n};\r\n\r\n/**\r\n * Functional component which renders quick view button and popup based by the given props file.\r\n * @param props - Configuration for the quick view component.\r\n * @returns - Functional component of the quick view.\r\n */\r\n//mmx-feature: extended properties --start\r\n/*\r\nexport const QuickViewFunctionalComponent: React.FC> = (\r\n props: IQuickviewViewProps & IQuickviewPropsExtend<{}>\r\n) => {\r\n*/\r\nexport const QuickViewFunctionalComponent: React.FC> = (\r\n props: IQuickviewViewProps & IQuickviewExtentedProps) => {\r\n //mmx-feature: extended properties --end\r\n const { quickView, quickViewButton, isModalOpen } = props;\r\n const quickViewUpdatedProps: IModuleProps = { ...quickView, title: props.resources.quickViewbuttonText };\r\n return (\r\n \r\n {quickViewButton}\r\n {isModalOpen && renderQuickViewPopup(props)}\r\n \r\n );\r\n};\r\n\r\nexport default QuickViewFunctionalComponent;\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['mmx-quickview'] = {\n c: () => require('partner/modules/mmx-quickview/mmx-quickview.tsx'),\n $type: 'containerModule',\n da: [{name:'cartConfiguration', path:'@msdyn365-commerce-modules/retail-actions/dist/lib/get-cart-configuration', 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:'productWarrantyState', path:'actions/state-data-actions/product-warranty-state.action', runOn: 0},{name:'warrantyIcons', path:'actions/get-product-warranty-icon.action', runOn: 0},{name:'wishlists', path:'@msdyn365-commerce-modules/retail-actions/dist/lib/get-wishlist-by-customer-id', runOn: 0}],\n \n iNM: false,\n ns: '__local__',\n n: 'mmx-quickview',\n p: '__local__',\n \n pdp: '',\n \n \n md: 'src/modules/mmx-quickview'\n });\n \n\n {\n const sanitizedActionPath = '@msdyn365-commerce-modules/retail-actions/dist/lib/get-cart-configuration';\n let dataAction = require('@msdyn365-commerce-modules/retail-actions/dist/lib/get-cart-configuration');\n registerSanitizedActionPath(sanitizedActionPath, dataAction);\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 = 'actions/get-product-warranty-icon.action';\n let dataAction = require('partner/actions/get-product-warranty-icon.action');\n registerSanitizedActionPath(sanitizedActionPath, dataAction);\n }\n \n\n {\n const sanitizedActionPath = 'actions/state-data-actions/product-warranty-state.action';\n let dataAction = require('partner/actions/state-data-actions/product-warranty-state.action');\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|mmx-quickview|mmx-quickview'] = {\n c: () => require('partner/modules/mmx-quickview/mmx-quickview.view.tsx'),\n cn: '__local__-__local__-mmx-quickview'\n };\nviewDictionary['__local__|__local__|themes|memoryexpress|views|mmx-quickview'] = {\n c: () => require('partner/themes/memoryexpress/views/mmx-quickview.view.tsx'),\n cn: '__local__-__local__-mmx-quickview'\n };\nwindow.__bindings__ = window.__bindings__ || {};\nwindow.__bindings__.viewDictionary = {\n ...window.__bindings__.viewDictionary || {},\n ...viewDictionary\n };","module.exports = React;","module.exports = ReactDOM;"],"names":["ProductWarrantiesInput","constructor","productId","getCacheKey","this","getCacheObjectType","dataCacheType","createProductWarrantiesInput","inputData","productIds","selectedId","getSelectedProductIdFromActionInput","push","Array","isArray","length","map","Error","async","getProductWarrantiesAction","input","ctx","telemetry","trace","productDefaultVariantInputs","ProductDefaultVariantInput","getProductDefaultVariantAction","then","response","defaultProductMasterIds","defaultVariantIds","MasterId","DefaultProductId","missingInputIds","filter","includes","allProductIds","Set","getProductWarrantiesAsync","callerContext","createObservableDataAction","id","action","isBatched","GetProductWarrantyIconInput","Msdyn365","getWarrantyIconsAsync","args","getAltText","context","shouldUseCmsAltText","productName","imageAltText","_context$app","app","config","OmniChannelMedia","getValidProductImages","channelId","actionContext","imageSettings","selectedProduct","catalogId","getCatalogId","requestContext","actionInput","MediaLocationsForSelectedVariantInput","getMediaLocationsForSelectedVariant","mediaLocations","Promise","all","mediaLocation","imageData","src","Uri","altText","AltText","resolve","http","XMLHttpRequest","open","addEventListener","status","send","_unused","validateMediaLocaionAsync","pairs","pair","catch","error","exception","debug","Quickview","React","props","super","dimensionUpdateQueue","FinitePromiseQueue","dimensions","initializedDimensions","quickViewCallbacks","updateQuantity","newQuantity","errorState","_objectSpread","state","quantityError","undefined","otherError","setState","quantity","updateErrorState","newErrorState","updateSelectedProduct","newSelectedProduct","newInventory","newPrice","newDeliveryOptions","productAvailableQuantity","productDeliveryOptions","_updatePrice","initializeDimension","initializedDimension","add","dimensionSelectedAsync","selectedDimensionId","selectedDimensionValueId","_this$productDetails","size","productDetails","product","Dimensions","enqueue","_updateDimensions","FinitePromiseQueueError","ProcessWasDiscardedFromTheQueue","getDropdownName","dimensionType","resources","_getDropdownName","changeModalOpen","isModalOpen","_hideQuickViewDialog","changeUpdatingDimension","isUpdatingDimension","updateKeyInPrice","customPrice","customAmountError","isPriceKeyedIn","keyInPriceAmount","productPrice","defaultGalleryImageSettings","viewports","xs","q","w","h","sm","md","lg","lazyload","cropFocalRegion","defaultThumbnailImageSettings","_renderSeeDetailButton","payLoad","getPayloadObject","telemetryContent","TelemetryConstant","seeDetails","attributes","getTelemetryAttributes","Button","Object","assign","className","onClick","onTelemetryClick","seeDetailsLinkText","href","_getProductURL","_renderCarousel","_this$state$activeInd","mediaGalleryItems","keys","galleryImageSettings","ArrayExtensions","hasElements","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","thumbnailImageSettings","_getThumbnailItem","ThumbnailsContainerProps","SingleSlideCarouselComponentProps","SingleSlideCarousel","flipperPrevLabel","flipperNextLabel","parentId","useTabList","JSON","stringify","request","apiSettings","productDimensions","dimensionsToUpdate","clearErrorState","errorHost","configureErrors","mappedDimensions","dimension","DimensionTypeValue","DimensionValue","_updateDimensionValue","ExtensionProperties","defaultVariant","_getProductDefaultVariant","defaultProduct","getByIdAsync","_defaultProduct$Maste","newProduct","getSelectedVariant","SelectedVariantInput","MasterProductId","RecordId","getDimensionsForSelectedVariant","GetDimensionsForSelectedVariantInput","variantProduct","_variantProduct$Dimen","_this$props$data$feat","images","getImagesForProduct","_filterMasterImageFromVariant","lastUpdate","Date","now","newAvailableQuantity","getProductAvailabilitiesForSelectedVariant","ProductAvailabilitiesForSelectedVariantInput","find","_dimension$DimensionV","Value","toLowerCase","isCustomPriceSelected","getPriceForSelectedVariant","PriceForSelectedVariantInput","RetailMulitplePickupMFeatureState","data","featureState","result","Name","getDeliveryOptionsForSelectedVariant","GetDeliveryOptionsForSelectedVariantInput","IsEnabled","_updateQuantitiesInState","altTextSource","_setSelectedWarrantyOption","selectedWarrantyOption","WarrantableProduct","update","ProductWarrantyStateInput","productDimensionFull","newValueId","DimensionValues","_this$productDetails2","isGiftCard","IsGiftCard","productDimensionTypeColor","productDimensionTypeConfiguration","productDimensionTypeSize","productDimensionTypeAmount","productDimensionTypeStyle","animating","isLastItem","nextIndex","isFirstItem","_getCarouselItem","image","Image","gridSettings","loadFailureBehavior","role","modifiedActiveIndex","ThumbnailItemContainerProps","classnames","tabIndex","_generateOnThumbnailClick","onKeyDown","_generateOnThumbnailKeyDown","Picture","event","which","KeyCodes","Enter","Space","preventDefault","onClickHandler","_onClick","_event","ObjectExtensions","isNullOrUndefined","selectedProductId","modalOpen","selectedDimensions","_productDefaultVarian","_productDefaultVarian2","tenantId","getRnrPartnerId","serviceEndPoint","getRnrEndpointId","productDefaultVariantId","createProductDefaultVariantInput","productDefaultVariant","productWarranties","productResult","productAvailabilities","getCartStateData","GetCartStateDataInput","cartState","cart","getRatingsSummary","GetRatingsSummaryInput","toString","ratingsSummaryData","ratingsSummary","getProductDetails","currentTime","_updateMediaItems","maxRecentlyViewedItemsCount","RecentlyViewedState","instance","ItemTypeValue","ReleasedProductType","Service","isServiceItem","isDataLoaded","_this$props$context$a","_product$productVaria","_this$props$config$th","_product$productVaria2","_actionContext$reques","params","isPreview","commerceApiRequest","previewImageData","_mediaLocation$Uri","additionalProperties","IsApplicableForChildEntities","isApplicableForChildEntities","_mediaLocation$Uri2","getProductImages","productVariant","_quickViewCloseButtonclick","onChangeHandler","callbacks","newValue","_renderQuantity","min","max","ContainerProps","LabelContainerProps","htmlFor","heading","productQuantityHeading","errors","IncrementalQuantity","currentCount","onChange","inputQuantityAriaLabel","decrementButtonAriaLabel","incrementButtonAriaLabel","minQuantityText","maxQuantityText","disabled","bind","getTelemetryObject","telemetryPageName","friendlyName","shouldComponentUpdate","nextProps","nextState","render","_this$productDetails3","_product$MasterProduc","_this$props$data$warr","_this$productDetails4","isMobileDevice","isMobile","variant","VariantType","Viewport","viewprops","productWarrantyComponentProps","design","productWarrantySelectorDesign","selectedWarranty","getEmptyWarrantyOption","isSelectWarrantyDisabled","warrantyIcons","learnMoreLink","productWarrantyLearnMoreLink","onSelectWarrantyOption","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","SpinnerSize","large","title","getBuyboxProductTitle","description","getBuyboxProductDescription","configure","getBuyboxProductConfigure","price","getBuyboxProductPrice","unitOfMeasure","getBuyboxProductUnitOfMeasure","rating","hideRating","getBuyboxProductRating","addToCart","getBuyboxAddToCart","keyInPrice","enableKeyInPrice","getBuyboxKeyInPrice","inventoryLabel","getBuyBoxInventoryLabel","addToWishlist","getBuyboxProductAddToWishlist","quantityLimitsMessages","getQuantityLimitsMessages","CarouselProps","Thumbnails","renderView","lastUpdatedTime","_this$productDetails5","PrimaryImageUrl","_mapProductToImageData","arguments","CustomerContextualPrice","actionResult","_product$Dimensions","msdyn365Commerce","isBrowser","productUrl","getProductPageUrlSync","fullUrl","URL","window","location","_dimension$DimensionV2","dimensionValue","StringExtensions","isNullOrWhitespace","dimensionName","convertProductDimensionTypeToDimensionTypes","searchParams","set","isOrderQuantityLimitsFeatureEnabled","_isOrderQuantityLimitsFeatureEnabled","isChannelLimitsFeatureEnabled","_isChannelLimitsFeatureEnabled","_getMinQuantityForCartLineItem","_getMaxQuantityForCartLineItem","_getQuantity","Math","_product$Behavior","Behavior","MinimumQuantity","isQuantityLimitsFeatureEnabled","_product$Behavior2","MaximumQuantity","updateMaxQuantityForCartLineItem","maxQuantityForCartLineItem","_cartConfiguration$re","_cartConfiguration$re2","_product$Behavior3","defaultQuantity","cartConfiguration","ValidateDefaultOrderSettingsPerLine","DefaultQuantity","_this$props$config$sh","shouldHidePrimaryImages","shouldHideMasterProductImagesForVariant","variantImages","isVariantProduct","itemId","ItemId","_item$additionalPrope","_featureStatuses$find","_featureStatuses$find2","featureStatuses","RetailDefaultOrderQuantityLimitsFeatureName","RevertToSiteBuilderOrderQuantityLimitsSettingsCRTFeatureName","_this$props$context","defaultOrderQuantityLimitsFeatureConfig","platform","enableDefaultOrderQuantityLimits","customerInfo","customerInformation","information","IsB2b","_cartConfiguration$Ig","IgnoreOrderSettings","_featureStatuses$find3","isChannelLimitsFeatureEnabledInHq","EcommerceQuantityLimitConfigurationsFeatureName","ProductQuantityStateInput","emptyWarrantyOption","_renderConfigureDropdown","dropdown","select","Node","_renderQuickViewPopup","Module","_renderBodyContent","errorBlock","button","_renderAddToCart","_renderAddToWishlist","dropdowns","_renderConfigure","_renderKeyInPrice","QuickViewFunctionalComponent","onAddToWishlistFailed","getConfigureErrors","missingDimensions","renderAddToWishlist","_props$productDetails","wishlistButton","renderAddtoWishlistButton","wishlists","AddToWishlistComponent","addToWishlistButtonText","removeFromWishlistButtonText","addToWishlistMessage","removedFromWishlistMessage","addItemToWishlistError","removeItemFromWishlistError","nameOfWishlist","typeName","onError","getSelectedProduct","showButtonText","showButtonTooltip","renderWarrantySelectorComponent","ProductWarrantyComponent","renderBodyContent","isMultipleQuantity","setIsMultipleQuantity","priceText","productWarrantyEnabled","renderWarrantySelectorComponentByQuantity","disableWarrantyOnMultipleQuantityProducts","_productWarrantyCompo","WarrantyGroups","_productWarrantyCompo2","warrantyOptions","WarrantyOptions","emptyWarranty","productQuantity","renderKeyInPrice","renderQuantity","Period","_input$props","renderQuickViewPopup","_props$state$productP","_props$state$productP2","isNullOrEmpty","skuText","renderAddToCart","storeSelector","slots","quickViewUpdatedProps","binding","modules","dataActions","registerSanitizedActionPath","sanitizedActionPath","dataAction","default","prototype","RegistrationId","c","require","$type","da","name","path","runOn","iNM","ns","n","p","pdp","__bindings__","viewDictionary","cn","module","exports","ReactDOM"],"sourceRoot":""}