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,aAC9ChI,EACAuC,GAAmBiG,EAAuBjG,GAC1CK,GAA0B4F,EAAuB5F","sources":["webpack://mattressfirm/./src/modules/bulk-purchase/bulk-purchase.tsx?9fd5","webpack://mattressfirm/./src/modules/buybox/components/buybox-find-in-store.tsx?3ef8","webpack://mattressfirm/./src/modules/buybox/buybox.tsx?e22d","webpack://mattressfirm/./src/modules/buybox/buybox.view.tsx?376b"],"sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { IProductDimensionsWithAvailabilitiesFull } from '@msdyn365-commerce/commerce-entities';\nimport { ProductDimensionsMatrix } from '@msdyn365-commerce/components';\nimport { RichTextComponent } from '@msdyn365-commerce/core';\nimport { ICoreContext } from '@msdyn365-commerce/core-internal';\nimport { ArrayExtensions, IDimensionsApp } from '@msdyn365-commerce-modules/retail-actions';\nimport { Button, Collapse, IModuleProps, isMobile, VariantType } from '@msdyn365-commerce-modules/utilities';\nimport classnames from 'classnames';\nimport * as React from 'react';\n\nimport { IBulkPurchaseData } from './bulk-purchase.data';\nimport { IBulkPurchaseProps } from './bulk-purchase.props.autogenerated';\n\n/**\n * Additional optional props for the bulk purchase.\n */\nexport interface IBulkPurchaseExtendedProps extends IBulkPurchaseProps {\n productDimensions?: IProductDimensionsWithAvailabilitiesFull[];\n}\n\n/**\n * View for the bulk purchase module.\n */\nexport interface IBulkPurchaseViewProps extends IBulkPurchaseProps {\n container: IModuleProps;\n content: React.ReactElement;\n}\n\n/**\n * View for the bulk purchase module.\n */\nexport interface IBulkPurchaseState {\n isExpanded: boolean;\n}\n\n/**\n * Bulk-purchase module.\n */\nexport class BulkPurchase extends React.PureComponent {\n public static readonly className = 'ms-bulk-purchase';\n private readonly collapseRef: React.RefObject = React.createRef();\n\n public constructor(props: IBulkPurchaseExtendedProps) {\n super(props);\n\n this.state = {\n isExpanded: false\n };\n }\n\n public render(): React.ReactElement | null {\n const hasDimensionsInProps = ArrayExtensions.hasElements(this.props.productDimensions);\n const hasDimensionsInData = ArrayExtensions.hasElements(this.props.data.productDimensions?.result);\n if (!hasDimensionsInProps && !hasDimensionsInData) {\n return null;\n }\n\n const viewProps: IBulkPurchaseViewProps = {\n ...this.props,\n container: {\n moduleProps: this.props,\n className: classnames(BulkPurchase.className, this.props.config.className)\n },\n content: this._renderCollapseContent(`${BulkPurchase.className}__content`)\n };\n\n return this.props.renderView(viewProps) as React.ReactElement;\n }\n\n private _renderCollapseContent(className: string): React.ReactElement {\n return (\n
\n {this._renderCollapseButton(`${className}__collapse-button`)}\n {this._renderCollapse(`${className}__collapse`)}\n
\n );\n }\n\n private _renderCollapseButton(className: string): React.ReactElement {\n return (\n \n {this.props.resources.bulkPurchaseHeaderTitle}\n \n );\n }\n\n /**\n *This function is being used to handel variant change dropdown.\n */\n private _dimensionDropDownChange = () => {\n this.collapseRef.current?.reEvaluateHeight();\n };\n\n private _renderCollapse(className: string): React.ReactElement {\n return (\n \n {this._renderMainContent(`${className}__main-content`)}\n \n );\n }\n\n private _renderMainContent(className: string): React.ReactElement {\n const isMobileDevice = isMobile({ variant: VariantType.Viewport, context: this.props.context.request }) === 'xs';\n\n return (\n
\n {!isMobileDevice && (\n
\n \n
\n )}\n {this._renderMatrix(`${className}__matrix-container`)}\n
\n );\n }\n\n private _renderMatrix(className: string): React.ReactElement {\n const hasDimensionsInProps = ArrayExtensions.hasElements(this.props.productDimensions);\n\n return (\n }\n data={{\n dimensions: hasDimensionsInProps ? this.props.productDimensions! : this.props.data.productDimensions!.result!,\n orderTemplates: this.props.data.orderTemplates?.result,\n customerInformation: this.props.data.customerInformation?.result\n }}\n resources={this.props.resources}\n dimensionOnChange={this._dimensionDropDownChange}\n />\n );\n }\n\n /**\n * Callback which toggles collapse mode.\n */\n private readonly _toggleCollapse = () => {\n this.setState(state => ({\n isExpanded: !state.isExpanded\n }));\n };\n}\n\nexport default BulkPurchase;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport {\n AddToCartBehavior,\n IAddToCartFailureResult,\n IAddToCartResources,\n ItemSuccessfullyAddedToCartNotification,\n PriceComponent\n} from '@msdyn365-commerce/components';\nimport { getUrlSync, ICoreContext, IImageSettings } from '@msdyn365-commerce/core';\nimport { ICartActionResult } from '@msdyn365-commerce/global-state';\nimport { DeliveryOption, FeatureState, OrgUnitLocation, ProductAvailableQuantity, ProductDimension } from '@msdyn365-commerce/retail-proxy';\nimport { NotificationsManager } from '@msdyn365-commerce-modules/notifications-core';\nimport {\n ArrayExtensions,\n DeliveryMode,\n IProductInventoryInformation,\n isAggregatedInventory\n} from '@msdyn365-commerce-modules/retail-actions';\nimport { getTelemetryObject, Heading, INodeProps, IPopupProps, Popup } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport { BuyboxErrorBlock } from '../../../common/buybox-components';\nimport { IBuyboxCallbacks, IBuyboxState } from '../../../common/buyboxInterface';\nimport { getConfigureErrors, getGenericError } from '../../../common/utilities/error-utilities';\nimport { IBuyboxData } from '../buybox.data';\nimport { IBuyboxProps, IBuyboxResources } from '../buybox.props.autogenerated';\n\nconst modalCloseButtonReference: React.RefObject = React.createRef();\n\n/**\n * FindinStore failure Interface.\n */\nexport interface IFindInStoreFailureResult {\n missingDimensions?: ProductDimension[];\n}\n\n/**\n * BuyBoxFindinStore View Props Interface.\n */\nexport interface IBuyboxFindInStoreViewProps {\n storeSelector?: React.ReactNode;\n heading?: React.ReactNode;\n description?: React.ReactNode;\n errors?: React.ReactNode;\n button?: React.ReactNode;\n productPickupOptionList?: React.ReactNode;\n\n modal?: React.ReactNode;\n\n ContainerProps: INodeProps;\n\n openFindInStoreDialog(): Promise;\n}\n\n/**\n * On click find store handler.\n * @param props -Buybox data.\n * @param state -Buybox state.\n * @param callbacks -Buybox callbacks.\n * @returns Find in store.\n */\nconst onClickFindInStoreHandler = (props: IBuyboxProps, state: IBuyboxState, callbacks: IBuyboxCallbacks) => async () => {\n await findInStoreOnClick(props, state, callbacks);\n};\n\n/**\n * Inventory settings based on the inventory policy for aggregated availability.\n */\ninterface IInventorySettingsProps {\n isSectionDisabled: boolean;\n description: string;\n buttonText: string;\n}\n\n/**\n * The function defines the settings values for a given inventory configuration.\n * @param context - The context.\n * @param isStockCheck - Flag to enable inventory validation.\n * @param productAvailability - The product inventory information.\n * @param buyboxResources - The buybox string resources.\n * @param isLoading - Is loading.\n * @returns Boolean.\n */\nfunction getFindInStoreInventorySettings(\n context: ICoreContext,\n isStockCheck: boolean,\n productAvailability: IProductInventoryInformation[] | undefined,\n buyboxResources: IBuyboxResources,\n isLoading?: boolean\n): IInventorySettingsProps {\n // If shouldValidateAggregation is true then is required to check for the product inventory, based on this the messaging will change\n // and the find in store button will be ensbled or disabled\n\n let isSectionDisabled: boolean;\n let buttonText;\n let description: string;\n\n let pickupInventory: IProductInventoryInformation | undefined;\n\n if (!isStockCheck || isLoading) {\n return {\n isSectionDisabled: false,\n buttonText: buyboxResources.findInStoreLinkText,\n description: buyboxResources.findInStoreDescriptionText\n };\n }\n\n if (productAvailability) {\n pickupInventory = productAvailability.find(pickup => pickup.deliveryType === DeliveryMode.pickup);\n }\n\n // If aggregated is enabled, then we need to validate the inventor check for find in store.\n // If an individual is selected, then we will always show a find in store button.\n if (isAggregatedInventory(context.actionContext)) {\n if (productAvailability && pickupInventory?.IsProductAvailable) {\n isSectionDisabled = false;\n buttonText = buyboxResources.findInStoreLinkText;\n description = buyboxResources.findInStoreDescriptionText;\n } else {\n isSectionDisabled = true;\n buttonText = buyboxResources.findInStoreNotAvailableTextButton;\n description = buyboxResources.findInStoreNotAvailableDescription;\n }\n } else {\n isSectionDisabled = false;\n buttonText = buyboxResources.findInStoreLinkText;\n description = buyboxResources.findInStoreDescriptionText;\n }\n\n return {\n isSectionDisabled,\n description,\n buttonText\n };\n}\n\n/**\n * Method to check if we have atleast one common delivery code between product and channel.\n * @param productdeliveryOptions - Product DeliveryOption List.\n * @param storePickUpOptionList - Channel DeliveryOption List.\n * @returns Boolean flag.\n */\nconst matchDeliveryOptions = (\n productdeliveryOptions: DeliveryOption[] | undefined,\n storePickUpOptionList: string[] | undefined\n): boolean => {\n const deliveryOption: string[] = [];\n productdeliveryOptions?.map(delivery => {\n const pickup = storePickUpOptionList?.find(deliveryCode => deliveryCode === delivery.Code);\n if (pickup) {\n deliveryOption.push(pickup);\n }\n return deliveryOption;\n });\n\n return ArrayExtensions.hasElements(deliveryOption);\n};\n\nexport function getBuyboxFindInStore(\n props: IBuyboxProps,\n state: IBuyboxState,\n callbacks: IBuyboxCallbacks\n): IBuyboxFindInStoreViewProps | undefined {\n const {\n data,\n slots: { storeSelector },\n resources: {\n priceFree,\n originalPriceText,\n currentPriceText,\n findInStoreHeaderText,\n buyBoxGoToCartText,\n buyBoxContinueShoppingText,\n closeNotificationLabel,\n buyBoxSingleItemText,\n buyBoxMultiLineItemFormatText,\n buyBoxHeaderMessageText,\n descriptionTextToShowAllPickupOptions\n },\n context: {\n request: { channel: { PickupDeliveryModeCode } = { PickupDeliveryModeCode: undefined } }\n }\n } = props;\n\n const multiplePickupStoreSwitchName = 'Dynamics.AX.Application.RetailMultiplePickupDeliveryModeFeature';\n const product = data?.product?.result;\n const price = data?.productPrice?.result;\n const cart = data?.cart?.result;\n const deliveryOptions = data?.deliveryOptions?.result;\n const productAvailability = data.productAvailableQuantity?.result;\n const retailMulitplePickupMFeatureState = data?.featureState?.result?.find(\n (featureState: FeatureState) => featureState.Name === multiplePickupStoreSwitchName\n )?.IsEnabled;\n const channelDeliveryOptionConfig = data?.channelDeliveryOptionConfig?.result;\n\n const missingDimensions = product?.Dimensions?.filter(dimension => !dimension.DimensionValue?.Value);\n\n const {\n errorState: { configureErrors, quantityError, otherError, errorHost },\n modalOpen,\n quantity\n } = state;\n\n const { isSectionDisabled, buttonText, description } = getFindInStoreInventorySettings(\n props.context,\n props.context.app.config.enableStockCheck,\n productAvailability,\n props.resources,\n props.data.productAvailableQuantity.status === 'LOADING' || ArrayExtensions.hasElements(missingDimensions)\n );\n\n if (!product || !ArrayExtensions.hasElements(storeSelector)) {\n return undefined;\n }\n\n if (!deliveryOptions || !deliveryOptions.DeliveryOptions) {\n return undefined;\n }\n\n // If no delivery options present on the product, or none of the delivery options\n // match the PickupDeliveryModeCode, that means the item cannot be used for BOPIS\n if (retailMulitplePickupMFeatureState && channelDeliveryOptionConfig) {\n if (!matchDeliveryOptions(deliveryOptions.DeliveryOptions, channelDeliveryOptionConfig?.PickupDeliveryModeCodes)) {\n return undefined;\n }\n } else if (\n !PickupDeliveryModeCode ||\n !deliveryOptions.DeliveryOptions.find((option: DeliveryOption) => option.Code === PickupDeliveryModeCode)\n ) {\n return undefined;\n }\n\n const dialogStrings = {\n goToCartText: buyBoxGoToCartText,\n continueShoppingText: buyBoxContinueShoppingText,\n closeNotificationLabel,\n headerItemOneText: buyBoxSingleItemText,\n headerItemFormatText: buyBoxMultiLineItemFormatText,\n headerMessageText: buyBoxHeaderMessageText,\n freePriceText: priceFree,\n originalPriceText,\n currentPriceText\n };\n\n const priceComponent = price ? (\n \n ) : (\n ''\n );\n\n const defaultImageSettings: IImageSettings = {\n viewports: {\n xs: { q: 'w=240&h=240&m=6', w: 0, h: 0 },\n lg: { q: 'w=240&h=240&m=6', w: 0, h: 0 },\n xl: { q: 'w=240&h=240&m=6', w: 0, h: 0 }\n },\n lazyload: true\n };\n\n const popupProps: IPopupProps = {\n context: props.context,\n className: 'ms-buybox',\n id: props.id,\n typeName: props.typeName,\n data: { product: props.data.product?.result, price: props.data.productPrice?.result },\n dialogStrings,\n imageSettings: defaultImageSettings,\n gridSettings: props.context.request.gridSettings,\n productQuantity: quantity,\n priceComponent,\n navigationUrl: getUrlSync('cart', props.context.actionContext),\n modalOpen,\n setModalOpen: callbacks.changeModalOpen\n };\n const renderModalPopup = ;\n\n return {\n ContainerProps: {\n className: 'ms-buybox__find-in-store'\n },\n\n storeSelector: storeSelector[0],\n\n openFindInStoreDialog: onClickFindInStoreHandler(props, state, callbacks),\n\n heading: ,\n\n description:

{description}

,\n productPickupOptionList:\n retailMulitplePickupMFeatureState && !isSectionDisabled ? (\n <>\n

{descriptionTextToShowAllPickupOptions}

\n
    \n {deliveryOptions.DeliveryOptions.map((item: DeliveryOption) => {\n return (\n
  • \n {item.Description}\n
  • \n );\n })}\n
\n \n ) : null,\n errors: (\n \n ),\n\n button: (\n \n {buttonText}\n \n ),\n\n modal: renderModalPopup\n };\n}\n\n/**\n * Handler for find in store button.\n * @param props - BuyBox data.\n * @param state - BuyBox state.\n * @param callbacks - BuyBox callbacks.\n * @returns - Promise.\n */\nasync function findInStoreOnClick(props: IBuyboxProps, state: IBuyboxState, callbacks: IBuyboxCallbacks): Promise {\n const {\n data: {\n storeSelectorStateManager: { result: storeSelectorStateManager },\n cart: { result: cart },\n productAvailableQuantity: { result: productAvailableQuantity }\n },\n resources,\n context,\n modules\n } = props;\n\n const { selectedProduct, quantity } = state;\n\n let dataProduct = props.data.product.result;\n const multiplePickupStoreSwitchName = 'Dynamics.AX.Application.RetailMultiplePickupDeliveryModeFeature';\n const retailMulitplePickupMFeatureState = props.data?.featureState?.result?.find(\n (featureState: FeatureState) => featureState.Name === multiplePickupStoreSwitchName\n )?.IsEnabled;\n\n if (selectedProduct) {\n dataProduct = (await selectedProduct) || dataProduct;\n }\n\n if (!dataProduct || !storeSelectorStateManager) {\n return;\n }\n\n const product = dataProduct;\n\n const missingDimensions =\n product.Dimensions &&\n product.Dimensions.filter((dimension: ProductDimension) => !(dimension.DimensionValue && dimension.DimensionValue.Value));\n\n let storeSelectorId: string = '';\n if (modules && Object.keys(modules).length > 0 && modules.storeSelector && modules.storeSelector.length > 0) {\n storeSelectorId = modules.storeSelector[0].id;\n }\n\n if (missingDimensions && missingDimensions.length > 0) {\n if (callbacks.updateErrorState) {\n callbacks.updateErrorState({\n errorHost: 'FINDINSTORE',\n configureErrors: getConfigureErrors(missingDimensions, resources)\n });\n }\n } else {\n storeSelectorStateManager\n .openDialog({\n product,\n id: storeSelectorId,\n parentElementRef: modalCloseButtonReference,\n deliveryOptions: retailMulitplePickupMFeatureState ? props.data.deliveryOptions.result : undefined,\n onLocationSelected: async (orgUnitLocation: OrgUnitLocation, deliveryMode: string) => {\n if (!cart) {\n return Promise.resolve();\n }\n\n const behavior = props.context?.app?.config?.addToCartBehavior;\n\n return cart\n .addProductToCart({ product, count: quantity, location: orgUnitLocation, deliveryMode })\n .then((result: ICartActionResult) => {\n if (result.status === 'FAILED' && result.substatus === 'MAXQUANTITY') {\n callbacks.changeModalOpen(false);\n let productAvailability: ProductAvailableQuantity | undefined;\n if (state.productAvailableQuantity) {\n productAvailability = state.productAvailableQuantity.ProductAvailableQuantity;\n } else if (productAvailableQuantity && ArrayExtensions.hasElements(productAvailableQuantity)) {\n const shippingInventory = productAvailableQuantity.find(\n shipping => shipping.deliveryType === DeliveryMode.pickup\n );\n productAvailability = shippingInventory?.ProductAvailableQuantity;\n } else {\n productAvailability = undefined;\n }\n const failureResult: IAddToCartFailureResult = {\n failureReason: 'CARTACTIONFAILED',\n cartActionResult: { status: result.status, substatus: result.substatus }\n };\n callbacks.updateErrorState({\n errorHost: 'ADDTOCART',\n configureErrors: {},\n otherError: getGenericError(\n failureResult,\n cart,\n resources,\n context,\n product,\n productAvailability,\n orgUnitLocation\n )\n });\n } else {\n callbacks.updateErrorState({\n configureErrors: {}\n });\n const navigationUrl = getUrlSync('cart', context.actionContext);\n if (behavior === undefined || behavior === AddToCartBehavior.goToCart) {\n if (result.status === 'SUCCESS' && navigationUrl) {\n window.location.assign(navigationUrl);\n }\n } else if (behavior === AddToCartBehavior.showModal) {\n callbacks.changeModalOpen(true);\n } else if (behavior === AddToCartBehavior.showNotification) {\n const defaultImageSettings: IImageSettings = {\n viewports: {\n xs: { q: 'w=240&h=240&m=6', w: 0, h: 0 },\n lg: { q: 'w=240&h=240&m=6', w: 0, h: 0 },\n xl: { q: 'w=240&h=240&m=6', w: 0, h: 0 }\n },\n lazyload: true\n };\n const telemetryContent = getTelemetryObject(\n props.context.request.telemetryPageName!,\n props.friendlyName,\n props.telemetry\n );\n const dialogStrings: IAddToCartResources = {\n goToCartText: resources.buyBoxGoToCartText,\n continueShoppingText: resources.buyBoxContinueShoppingText,\n closeNotificationLabel: resources.closeNotificationLabel,\n headerItemOneText: resources.buyBoxSingleItemText,\n headerItemFormatText: resources.buyBoxMultiLineItemFormatText,\n headerMessageText: resources.buyBoxHeaderMessageText,\n freePriceText: resources.priceFree,\n originalPriceText: resources.originalPriceText,\n currentPriceText: resources.currentPriceText,\n addedQuantityText: resources.addedQuantityText\n };\n const notification = new ItemSuccessfullyAddedToCartNotification(\n props.context,\n dialogStrings,\n defaultImageSettings,\n props.context.request.gridSettings,\n product,\n props.data.productPrice?.result,\n quantity,\n navigationUrl,\n telemetryContent,\n props.id,\n props.typeName\n );\n NotificationsManager.instance().addNotification(notification);\n }\n }\n })\n .catch((error: Error) => {\n if (props.telemetry) {\n props.telemetry.exception(error);\n props.telemetry.debug('Unable to add product to cart');\n }\n });\n }\n })\n .catch((error: Error) => {\n if (props.telemetry) {\n props.telemetry.error(error.message);\n props.telemetry.debug('Unable to find in store');\n }\n });\n }\n}\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { getCatalogId, ICoreContext, msdyn365Commerce } from '@msdyn365-commerce/core-internal';\nimport {\n CommerceProperty,\n ProductCatalog,\n ProductDeliveryOptions,\n ProductDimensionValue,\n ProductDimensionValueInventoryAvailability,\n ProductPrice,\n ReleasedProductType,\n SimpleProduct\n} from '@msdyn365-commerce/retail-proxy';\nimport { BulkPurchase } from '@msdyn365-commerce-modules/bulk-purchase';\nimport {\n ArrayExtensions,\n DeliveryMode,\n FinitePromiseQueue,\n FinitePromiseQueueError,\n getDeliveryOptionsForSelectedVariant,\n GetDeliveryOptionsForSelectedVariantInput,\n getDimensionsForSelectedVariant,\n GetDimensionsForSelectedVariantInput,\n getInventoryLevelCodeFromDimensionValue,\n getPriceForSelectedVariant,\n getProductAvailabilitiesForSelectedVariant,\n getSelectedVariant,\n IDimensionsApp,\n IDimensionValueForSelectedVariant,\n InventoryLevelValues,\n IProductInventoryInformation,\n IPromiseQueue,\n PriceForSelectedVariantInput,\n ProductAvailabilitiesForSelectedVariantInput,\n SelectedVariantInput,\n setDimensionValuesToQuery\n} from '@msdyn365-commerce-modules/retail-actions';\nimport {\n Button,\n getTelemetryObject,\n IModuleProps,\n INodeProps,\n ITelemetryContent,\n updateMaxQuantityForCartLineItem\n} from '@msdyn365-commerce-modules/utilities';\nimport classnames from 'classnames';\nimport * as React from 'react';\n\nimport {\n getBuyboxAddToCart,\n getBuyBoxInventoryLabel,\n getBuyboxKeyInPrice,\n getBuyboxProductAddToOrderTemplate,\n getBuyboxProductAddToWishlist,\n getBuyboxProductComparisonButton,\n getBuyboxProductDescription,\n getBuyboxProductPrice,\n getBuyboxProductQuantity,\n getBuyboxProductRating,\n getBuyboxProductTitle,\n getBuyboxProductUnitOfMeasure,\n getBuyboxShopSimilarButton,\n getQuantityLimitsMessages,\n RetailDefaultOrderQuantityLimitsFeatureName\n} from '../../common/buybox-components';\nimport { getBuyboxProductConfigure } from '../../common/buybox-product-configure';\nimport {\n IBuyboxAddToCartViewProps,\n IBuyboxAddToOrderTemplateViewProps,\n IBuyboxAddToWishlistViewProps,\n IBuyboxCallbacks,\n IBuyboxCommonData,\n IBuyboxExtentedProps,\n IBuyboxKeyInPriceViewProps,\n IBuyboxProductConfigureViewProps,\n IBuyboxProductQuantityViewProps,\n IBuyboxShopSimilarLookViewProps,\n IBuyboxState,\n IErrorState,\n ShopSimiliarButtonType\n} from '../../common/buyboxInterface';\nimport { IBuyboxData } from './buybox.data';\nimport { IBuyboxProps, IBuyboxResources } from './buybox.props.autogenerated';\nimport { getBuyboxFindInStore, IBuyboxFindInStoreViewProps } from './components/buybox-find-in-store';\nimport { RecentlyViewedState } from '../recently-viewed';\n\nexport interface IBuyboxViewProps extends IBuyboxProps {\n state: IBuyboxState;\n ModuleProps: IModuleProps;\n ProductInfoContainerProps: INodeProps;\n MediaGalleryContainerProps: INodeProps;\n callbacks: IBuyboxCallbacks;\n mediaGallery?: React.ReactNode;\n title?: React.ReactNode;\n description?: React.ReactNode;\n rating?: React.ReactNode;\n price?: React.ReactNode;\n productComparisonButton?: React.ReactNode;\n bulkPurchaseLink?: React.ReactNode;\n addToOrderTemplate?: IBuyboxAddToOrderTemplateViewProps;\n addToWishlist?: IBuyboxAddToWishlistViewProps;\n max: number | undefined;\n addToCart: IBuyboxAddToCartViewProps;\n findInStore?: IBuyboxFindInStoreViewProps;\n quantity?: IBuyboxProductQuantityViewProps;\n configure?: IBuyboxProductConfigureViewProps;\n inventoryLabel?: React.ReactNode;\n shopSimilarLook?: IBuyboxShopSimilarLookViewProps;\n shopSimilarDescription?: IBuyboxShopSimilarLookViewProps;\n quantityLimitsMessages: React.ReactNode;\n telemetryContent?: ITelemetryContent;\n keyInPrice?: IBuyboxKeyInPriceViewProps;\n unitOfMeasure?: React.ReactNode;\n catalogs?: ProductCatalog[] | undefined;\n}\n\n/**\n * Buybox Module.\n */\nclass Buybox extends React.PureComponent, IBuyboxState> {\n /**\n * A queue of tasks of processing the changes in the dimensions.\n * Limit to two processes:\n * 1 - for the current process, which is under execution at the moment.\n * 2 - next process, which will process the latest version of data.\n * @remark Enqueueing new promises will discard the previous ones (except the one which is under processing).\n */\n private readonly dimensionUpdateQueue: IPromiseQueue = new FinitePromiseQueue(2);\n\n private dimensions: { [id: number]: string } = {};\n\n private readonly buyboxCallbacks: IBuyboxCallbacks = {\n updateQuantity: (newQuantity: number): boolean => {\n const errorState = { ...this.state.errorState };\n errorState.quantityError = undefined;\n errorState.otherError = undefined;\n\n this.setState({ quantity: newQuantity, errorState });\n return true;\n },\n updateErrorState: (newErrorState: IErrorState): void => {\n this.setState({ errorState: newErrorState });\n },\n updateSelectedProduct: (\n newSelectedProduct: Promise,\n newInventory: IProductInventoryInformation | undefined,\n newPrice: ProductPrice | undefined,\n newDeliveryOptions: ProductDeliveryOptions | undefined\n ): void => {\n this.setState({\n selectedProduct: newSelectedProduct,\n productAvailableQuantity: newInventory,\n productDeliveryOptions: newDeliveryOptions\n });\n this._updatePrice(newPrice);\n },\n dimensionSelectedAsync: async (selectedDimensionId: number, selectedDimensionValueId: string): Promise => {\n this.dimensions[selectedDimensionId] = selectedDimensionValueId;\n return this.dimensionUpdateQueue\n .enqueue(async () => {\n return this._updateDimensions();\n })\n .catch((error: unknown) => {\n // Ignore discarded processes.\n if (error !== FinitePromiseQueueError.ProcessWasDiscardedFromTheQueue) {\n throw error;\n }\n });\n },\n getDropdownName: (dimensionType: number, resources: IBuyboxResources): string => {\n return this._getDropdownName(dimensionType, resources);\n },\n changeModalOpen: (isModalOpen: boolean): void => {\n this.setState({ modalOpen: isModalOpen });\n },\n changeUpdatingDimension: (isUpdatingDimension: boolean): void => {\n this.setState({ isUpdatingDimension });\n },\n\n /**\n * Update isUpdatingDeliveryOptions state.\n *\n * @param isUpdatingDeliveryOptions - The status of updating delivery options.\n */\n changeUpdatingDeliveryOptions: (isUpdatingDeliveryOptions: boolean): void => {\n this.setState({ isUpdatingDeliveryOptions });\n },\n\n updateKeyInPrice: (customPrice: number): void => {\n // Remove custom amount error when updating the custom price\n const errorState = { ...this.state.errorState };\n errorState.customAmountError = undefined;\n\n this.setState({ isPriceKeyedIn: true, keyInPriceAmount: customPrice, errorState });\n this._updatePrice(this.state.productPrice, customPrice);\n }\n };\n\n private readonly telemetryContent: ITelemetryContent;\n\n public constructor(props: IBuyboxProps, state: IBuyboxState) {\n super(props);\n this.state = {\n errorState: {\n configureErrors: {}\n },\n quantity: 1,\n min: undefined,\n max: undefined,\n selectedProduct: undefined,\n productPrice: undefined,\n productDeliveryOptions: undefined,\n\n modalOpen: false,\n isUpdatingDimension: false,\n isUpdatingDeliveryOptions: false\n };\n this.telemetryContent = getTelemetryObject(props.context.request.telemetryPageName!, props.friendlyName, props.telemetry);\n }\n\n public async componentDidMount(): Promise {\n const {\n data: {\n product: { result: product },\n productPrice\n },\n context\n } = this.props;\n\n productPrice.then(async result => {\n this._updatePrice(result);\n });\n\n if (product) {\n // Check if the product is service or not by product type\n if (product.ItemTypeValue === ReleasedProductType.Service) {\n this.setState({ isServiceItem: true });\n }\n await this._updateQuantitiesInState(product);\n }\n\n if (product && context.app.config.maxRecentlyViewedItemsCount > 0) {\n RecentlyViewedState.instance(this.props.context, context.app.config.maxRecentlyViewedItemsCount, product.RecordId);\n }\n }\n\n public render(): JSX.Element | null {\n const {\n slots: { mediaGallery, productComparisonButton },\n data: {\n product: { result: product }\n },\n config: { className = '' }\n } = this.props;\n\n const { max } = this.state;\n\n if (!product) {\n this.props.context.telemetry.error('Product content is empty, module wont render');\n return null;\n }\n\n const props = this.props as IBuyboxExtentedProps;\n const defaultMinimumKeyInPrice = 10;\n const defaultMaximumKeyInPrice = 100;\n\n const context = this.props.context as ICoreContext;\n const inventoryLevel = context.app.config.inventoryLevel;\n const dimensionValuesWithInventory = ArrayExtensions.flatten(\n ArrayExtensions.validValues(this.props.data.productDimensions.result?.map(value => value.dimensionValuesWithInventory))\n );\n const hasAvailableProducts =\n !ArrayExtensions.hasElements(dimensionValuesWithInventory) ||\n dimensionValuesWithInventory.some((value: unknown) => {\n const inventoryLevelCode = getInventoryLevelCodeFromDimensionValue(\n value as ProductDimensionValueInventoryAvailability,\n inventoryLevel\n );\n return inventoryLevelCode !== InventoryLevelValues.outOfStock;\n });\n const catalogId = getCatalogId(this.props.context.request);\n\n const viewProps: IBuyboxViewProps = {\n ...(this.props as IBuyboxProps),\n state: this.state,\n mediaGallery: mediaGallery && mediaGallery.length > 0 ? mediaGallery[0] : undefined,\n ModuleProps: {\n moduleProps: this.props,\n className: classnames('ms-buybox', className)\n },\n ProductInfoContainerProps: {\n className: 'ms-buybox__content'\n },\n MediaGalleryContainerProps: {\n className: 'ms-buybox__media-gallery'\n },\n telemetryContent: this.telemetryContent,\n callbacks: this.buyboxCallbacks,\n title: getBuyboxProductTitle(props),\n description: getBuyboxProductDescription(props),\n bulkPurchaseLink: this._renderBuyboxBulkPurchaseLink(),\n unitOfMeasure: getBuyboxProductUnitOfMeasure(props),\n configure: getBuyboxProductConfigure(props, this.state, this.buyboxCallbacks),\n findInStore: getBuyboxFindInStore(this.props, this.state, this.buyboxCallbacks),\n price: getBuyboxProductPrice(props, this.state),\n addToCart: getBuyboxAddToCart(\n props,\n this.state,\n this.buyboxCallbacks,\n defaultMinimumKeyInPrice,\n defaultMaximumKeyInPrice,\n undefined,\n hasAvailableProducts\n ),\n productComparisonButton: ArrayExtensions.hasElements(productComparisonButton)\n ? getBuyboxProductComparisonButton(\n productComparisonButton[0],\n product,\n getCatalogId(this.props.context.request),\n this.state\n )\n : undefined,\n addToOrderTemplate: getBuyboxProductAddToOrderTemplate(props, this.state, this.buyboxCallbacks),\n addToWishlist: getBuyboxProductAddToWishlist(props, this.state, this.buyboxCallbacks),\n rating: !props.context.app.config.hideRating && getBuyboxProductRating(props),\n quantity: product.IsGiftCard ? undefined : getBuyboxProductQuantity(props, this.state, this.buyboxCallbacks),\n inventoryLabel: getBuyBoxInventoryLabel(props),\n shopSimilarLook:\n this.props.config.enableShopSimilarLooks && !product.IsGiftCard\n ? getBuyboxShopSimilarButton(props, ShopSimiliarButtonType.Looks)\n : undefined,\n shopSimilarDescription:\n this.props.config.enableShopSimilarDescription && !product.IsGiftCard\n ? getBuyboxShopSimilarButton(props, ShopSimiliarButtonType.Description)\n : undefined,\n keyInPrice:\n this.props.config.enableKeyInPrice && this.state.isCustomPriceSelected\n ? getBuyboxKeyInPrice(props, this.state, this.buyboxCallbacks)\n : undefined,\n quantityLimitsMessages: getQuantityLimitsMessages(props, this.state),\n max,\n catalogs: this._validateCatalogDetails(catalogId)\n };\n\n return this.props.renderView(viewProps) as React.ReactElement;\n }\n\n /**\n * Handles anchor click event and scrolls to the given bulk purchase module.\n * @param bulkPurchaseModule - Bulk purchase module.\n * @returns Handler.\n */\n private readonly _onBulkPurchaseLinkClick = (bulkPurchaseModule: Element) => () => {\n const boundingRect = bulkPurchaseModule.getBoundingClientRect();\n window.scrollTo(boundingRect.left, boundingRect.top);\n };\n\n private _renderBuyboxBulkPurchaseLink(): React.ReactNode {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access -- Temporary switch for the feature which is under development.\n if (!this.props.context.app.config.isBulkPurchaseEnabled) {\n return null;\n }\n\n if (!msdyn365Commerce.isBrowser) {\n return null;\n }\n\n const bulkPurchaseModules = Array.from(document.getElementsByClassName(BulkPurchase.className));\n\n if (!ArrayExtensions.hasElements(bulkPurchaseModules)) {\n return null;\n }\n\n return (\n \n {this.props.resources.bulkPurchaseLinkText}\n \n );\n }\n\n private _updatePrice(newPrice: ProductPrice | undefined, customPrice: number | undefined = this.state.keyInPriceAmount): void {\n if (this.state.isCustomPriceSelected && newPrice) {\n newPrice.CustomerContextualPrice = customPrice;\n }\n this.setState({ productPrice: newPrice });\n }\n\n private _getProductVariant(dimensionsToUpdate: { [id: number]: string }) {\n const {\n data: {\n product: { result: product }\n },\n context: {\n actionContext,\n request: {\n apiSettings: { channelId }\n }\n }\n } = this.props;\n\n const productDimensions = this.props.data.productDimensions.result!;\n\n // Step 3, Build the actually selected dimensions, prioritizing the information in state\n // over the information in data\n const mappedDimensions = productDimensions\n .map(dimension => {\n const dimensions = (dimension.dimensionValuesWithInventory ??\n dimension.DimensionValues ??\n []) as IDimensionValueForSelectedVariant[];\n return {\n DimensionTypeValue: dimension.DimensionTypeValue,\n DimensionValue:\n dimensions.find(\n value => value.DimensionValue?.RecordId.toString() === dimensionsToUpdate[dimension.DimensionTypeValue]\n )?.DimensionValue ?? dimension.DimensionValue,\n ExtensionProperties: dimension.ExtensionProperties\n };\n })\n .filter(dimension => dimension.DimensionValue);\n setDimensionValuesToQuery(this.props.context.actionContext.requestContext.url.requestUrl, mappedDimensions);\n\n // Step 4. Use these dimensions hydrate the product. Wrap this in a promise\n // so that places like add to cart can await it\n const selectedProductPromise = getSelectedVariant(\n new SelectedVariantInput(\n product!.MasterProductId ? product!.MasterProductId : product!.RecordId,\n channelId,\n undefined,\n undefined,\n this.props.context.request\n ),\n actionContext\n );\n this.setState({ selectedProduct: selectedProductPromise });\n\n return { productVariantPromise: selectedProductPromise, mappedDimensions };\n }\n\n private readonly _updateDimensions = async (): Promise => {\n const product = this.props.data.product.result;\n\n const productDimensions = this.props.data.productDimensions.result;\n\n const hasProductDimensions = ArrayExtensions.hasElements(productDimensions);\n\n if (!product || !hasProductDimensions) {\n return;\n }\n\n const dimensionsToUpdate: { [id: number]: string } = { ...this.dimensions };\n this.setState({ isUpdatingDimension: true, isUpdatingDeliveryOptions: true });\n\n // Step 1: Clear error state to display relevant errors\n if (this.state.errorState.otherError || this.state.errorState.quantityError) {\n const clearErrorState = { ...this.state.errorState };\n clearErrorState.otherError = undefined;\n if (this.state.errorState.errorHost === 'ADDTOCART') {\n clearErrorState.quantityError = undefined;\n clearErrorState.errorHost = undefined;\n }\n this.setState({ errorState: clearErrorState });\n }\n\n // Step 2: Clear any errors indicating the dimension wasn't selected\n for (const key of Object.keys(dimensionsToUpdate)) {\n if (this.state.errorState.configureErrors[key]) {\n this.setState(previousState => {\n const errorState = previousState.errorState;\n errorState.configureErrors[key] = undefined;\n return { errorState };\n });\n }\n }\n\n const data = this._getProductVariant(dimensionsToUpdate);\n const productVariant: SimpleProduct | null = await data.productVariantPromise;\n\n if (!productVariant) {\n return;\n }\n\n const promises: Promise[] = [\n this._getDimensionsForSelectedVariant(productVariant, data.mappedDimensions),\n this._hydrateInventoryInfo(productVariant),\n this._hydratePrice(productVariant),\n this._hydrateDeliveryOptions(productVariant),\n this._updateQuantitiesInState(productVariant)\n ];\n\n await Promise.all(promises);\n };\n\n private async _getDimensionsForSelectedVariant(\n productVariant: SimpleProduct,\n mappedDimensions: {\n /* eslint-disable @typescript-eslint/naming-convention -- Retail proxy values */\n DimensionTypeValue: number;\n DimensionValue: ProductDimensionValue | undefined;\n ExtensionProperties: CommerceProperty[] | undefined;\n /* eslint-enable @typescript-eslint/naming-convention -- Retail proxy values */\n }[]\n ): Promise {\n await getDimensionsForSelectedVariant(\n new GetDimensionsForSelectedVariantInput(\n productVariant.MasterProductId ? productVariant.MasterProductId : productVariant.RecordId,\n this.props.context.request.apiSettings.channelId,\n mappedDimensions,\n this.props.context.request\n ),\n this.props.context.actionContext\n );\n }\n\n private async _hydrateInventoryInfo(productVariant: SimpleProduct): Promise {\n // Step 5. Use these dimensions hydrate the inventory. Wrap this in a promise\n // so that places like add to cart can await it\n const newAvailableQuantity = await getProductAvailabilitiesForSelectedVariant(\n new ProductAvailabilitiesForSelectedVariantInput(productVariant.RecordId, this.props.context.request.apiSettings.channelId),\n this.props.context.actionContext\n );\n\n const newShippingQuantity = newAvailableQuantity?.find(\n // @ts-expect-error\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n (shipping: { deliveryType: any }) => shipping.deliveryType === DeliveryMode.shipping\n );\n const isCustomPriceSelected = productVariant.Dimensions?.find(\n dimension =>\n dimension.DimensionTypeValue === 4 && dimension.DimensionValue && dimension.DimensionValue.Value?.toLowerCase() === 'custom'\n );\n if (isCustomPriceSelected) {\n this.setState({ isCustomPriceSelected: true });\n } else {\n this.setState(previousState => {\n const errorState = previousState.errorState;\n errorState.customAmountError = undefined;\n return { isCustomPriceSelected: false, isPriceKeyedIn: false, errorState };\n });\n }\n\n if (newShippingQuantity) {\n this.setState({ productAvailableQuantity: newShippingQuantity });\n } else {\n this.setState({ productAvailableQuantity: undefined });\n }\n }\n\n private async _hydratePrice(productVariant: SimpleProduct): Promise {\n // Step 6. Use these dimensions hydrate the product price.\n const newPrice = await getPriceForSelectedVariant(\n new PriceForSelectedVariantInput(productVariant.RecordId, this.props.context.request.apiSettings.channelId),\n this.props.context.actionContext\n );\n\n if (newPrice) {\n this._updatePrice(newPrice);\n }\n }\n\n private async _hydrateDeliveryOptions(productVariant: SimpleProduct): Promise {\n const retailMultiplePickupFeatureState = this.props.data.featureState.result?.find(\n featureState => featureState.Name === 'Dynamics.AX.Application.RetailMultiplePickupDeliveryModeFeature'\n );\n\n // Step 7. Use these dimensions hydrate the product delivery options.\n const newDeliveryOptions = await getDeliveryOptionsForSelectedVariant(\n new GetDeliveryOptionsForSelectedVariantInput(\n productVariant.RecordId,\n this.props.context.request.apiSettings.channelId,\n undefined,\n undefined,\n retailMultiplePickupFeatureState?.IsEnabled\n ),\n this.props.context.actionContext\n );\n\n if (newDeliveryOptions) {\n this.setState({ productDeliveryOptions: newDeliveryOptions });\n }\n }\n\n private async _updateQuantitiesInState(product: SimpleProduct): Promise {\n const isOrderQuantityLimitsFeatureEnabled = await this._isOrderQuantityLimitsFeatureEnabled();\n if (isOrderQuantityLimitsFeatureEnabled && product) {\n this.setState({\n min: product.Behavior?.MinimumQuantity || 1,\n\n // If max by feature in default order settings is not defined then use max from site settings or default max 10.\n max:\n product.Behavior?.MaximumQuantity && product.Behavior?.MaximumQuantity > 0\n ? product.Behavior?.MaximumQuantity\n : updateMaxQuantityForCartLineItem(this.props.context.app.config.maxQuantityForCartLineItem)\n });\n } else {\n this.setState({\n min: 1,\n max: updateMaxQuantityForCartLineItem(this.props.context.app.config.maxQuantityForCartLineItem)\n });\n }\n }\n\n private readonly _getDropdownName = (dimensionType: number, resources: IBuyboxResources): string => {\n const isGiftCard = this.props.data.product.result?.IsGiftCard;\n\n switch (dimensionType) {\n case 1: // ProductDimensionType.Color\n return resources.productDimensionTypeColor;\n case 2: // ProductDimensionType.Configuration\n return resources.productDimensionTypeConfiguration;\n case 3: // ProductDimensionType.Size\n return resources.productDimensionTypeSize;\n case 4: // ProductDimensionType.Style\n return isGiftCard ? resources.productDimensionTypeAmount : resources.productDimensionTypeStyle;\n default:\n return '';\n }\n };\n\n private async _isOrderQuantityLimitsFeatureEnabled(): Promise {\n const defaultOrderQuantityLimitsFeatureConfig = this.props.context?.request?.app?.platform?.enableDefaultOrderQuantityLimits;\n if (defaultOrderQuantityLimitsFeatureConfig === 'none') {\n return false;\n }\n\n const featureStatuses = await this.props.data.featureState;\n const isFeatureEnabledInHq = featureStatuses?.find(\n featureState => featureState.Name === RetailDefaultOrderQuantityLimitsFeatureName\n )?.IsEnabled;\n if (!isFeatureEnabledInHq) {\n return false;\n }\n\n if (defaultOrderQuantityLimitsFeatureConfig === 'all') {\n return true;\n }\n let customerInfo;\n try {\n customerInfo = await this.props.data.customerInformation;\n } catch (error) {\n this.props.telemetry.information(error);\n this.props.telemetry.debug('Unable to receive Customer Information. May be user is not authorized');\n return false;\n }\n\n return (\n customerInfo &&\n ((defaultOrderQuantityLimitsFeatureConfig === 'b2b' && customerInfo.IsB2b) ||\n (defaultOrderQuantityLimitsFeatureConfig === 'b2c' && !customerInfo.IsB2b))\n );\n }\n\n private _validateCatalogDetails(catalogId: number): ProductCatalog[] | undefined {\n const catalogs = this.props.data.catalogs?.result?.filter(item => item.RecordId === catalogId);\n if (ArrayExtensions.hasElements(catalogs) && catalogs[0].RecordId === 0) {\n return;\n }\n\n return catalogs;\n }\n}\n\nexport default Buybox;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { Module, Node } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport {\n IBuyboxAddToCartViewProps,\n IBuyboxAddToOrderTemplateViewProps,\n IBuyboxAddToWishlistViewProps,\n IBuyboxKeyInPriceViewProps,\n IBuyboxProductConfigureDropdownViewProps,\n IBuyboxProductConfigureViewProps,\n IBuyboxProductQuantityViewProps,\n IBuyboxShopSimilarLookViewProps\n} from '../../common';\nimport { IBuyboxViewProps } from './buybox';\nimport { IBuyboxFindInStoreViewProps } from './components/buybox-find-in-store';\n\nconst BuyboxView: React.FC = props => {\n const {\n ModuleProps,\n MediaGalleryContainerProps,\n ProductInfoContainerProps,\n addToCart,\n addToOrderTemplate,\n addToWishlist,\n configure,\n description,\n findInStore,\n quantity,\n price,\n title,\n rating,\n inventoryLabel,\n shopSimilarLook,\n keyInPrice,\n shopSimilarDescription,\n unitOfMeasure,\n productComparisonButton\n } = props;\n\n return (\n \n {props.mediaGallery}\n \n {title}\n {price}\n {unitOfMeasure}\n {props.bulkPurchaseLink}\n {description}\n {rating}\n {configure && _renderConfigure(configure)}\n {keyInPrice && _renderKeyInPrice(keyInPrice)}\n {quantity && _renderQuantity(quantity)}\n {inventoryLabel}\n {addToCart && _renderAddToCart(addToCart)}\n {findInStore && _renderFindInStore(findInStore)}\n {addToOrderTemplate && _renderAddToOrderTemplate(addToOrderTemplate)}\n {addToWishlist && _renderAddToWishlist(addToWishlist)}\n {_renderSocialShare(props.slots && props.slots.socialShare)}\n {productComparisonButton}\n {shopSimilarLook && _renderShopSimilarItem(shopSimilarLook)}\n {shopSimilarDescription && _renderShopSimilarItem(shopSimilarDescription)}\n \n \n );\n};\n\nconst _renderAddToCart = (addToCart: IBuyboxAddToCartViewProps): JSX.Element => {\n const { ContainerProps, errorBlock, button } = addToCart;\n\n return (\n \n {errorBlock}\n {button}\n \n );\n};\n\nconst _renderAddToOrderTemplate = (addToOrderTemplate: IBuyboxAddToOrderTemplateViewProps): JSX.Element => {\n const { ContainerProps, errorBlock, button } = addToOrderTemplate;\n\n return (\n \n {errorBlock}\n {button}\n \n );\n};\n\nconst _renderAddToWishlist = (addToWishlist: IBuyboxAddToWishlistViewProps): JSX.Element => {\n const { ContainerProps, errorBlock, button } = addToWishlist;\n\n return (\n \n {errorBlock}\n {button}\n \n );\n};\n\nconst _renderConfigure = (configure: IBuyboxProductConfigureViewProps): JSX.Element => {\n const { ContainerProps, dropdowns } = configure;\n\n return {dropdowns.map(_renderConfigureDropdown)};\n};\n\nconst _renderSocialShare = (socialShare: React.ReactNode[]): JSX.Element | undefined => {\n if (!socialShare || socialShare.length === 0) {\n return undefined;\n }\n\n return <>{socialShare[0]};\n};\n\nconst _renderConfigureDropdown = (dropdown: IBuyboxProductConfigureDropdownViewProps): JSX.Element => {\n const { ContainerProps, LabelContainerProps, heading, errors, select } = dropdown;\n\n return (\n \n \n {heading}\n {errors}\n \n {select}\n \n );\n};\n\nconst _renderFindInStore = (findInStore: IBuyboxFindInStoreViewProps): JSX.Element => {\n const { ContainerProps, storeSelector, heading, description, errors, button, modal, productPickupOptionList } = findInStore;\n\n return (\n \n {storeSelector}\n {heading}\n {productPickupOptionList}\n {description}\n {errors}\n {button}\n {modal}\n \n );\n};\n\nconst _renderQuantity = (quantity: IBuyboxProductQuantityViewProps): JSX.Element => {\n const { ContainerProps, LabelContainerProps, heading, input, errors } = quantity;\n\n return (\n \n \n {heading}\n {errors}\n \n {input}\n \n );\n};\n\nconst _renderKeyInPrice = (keyInPrice: IBuyboxKeyInPriceViewProps): JSX.Element => {\n const { ContainerProps, LabelContainerProps, heading, input } = keyInPrice;\n\n return (\n \n {heading}\n {input}\n \n );\n};\n\nconst _renderShopSimilarItem = (shopSimilarItem: IBuyboxShopSimilarLookViewProps): JSX.Element => {\n const { ContainerProps, errors, input } = shopSimilarItem;\n\n return (\n \n {errors}\n {input}\n \n );\n};\nexport default BuyboxView;\n"],"names":["BulkPurchase","React","constructor","props","super","collapseRef","_dimensionDropDownChange","_this$collapseRef$cur","this","current","reEvaluateHeight","_toggleCollapse","setState","state","isExpanded","render","_this$props$data$prod","hasDimensionsInProps","ArrayExtensions","hasElements","productDimensions","hasDimensionsInData","data","result","viewProps","_objectSpread","container","moduleProps","className","classnames","config","content","_renderCollapseContent","renderView","_renderCollapseButton","_renderCollapse","Button","onClick","title","resources","bulkPurchaseHeaderTitle","Collapse","isOpen","ref","_renderMainContent","isMobileDevice","isMobile","variant","VariantType","Viewport","context","request","RichTextComponent","text","bulkPurchaseDescriptionText","_renderMatrix","_this$props$data$orde","_this$props$data$cust","ProductDimensionsMatrix","dimensions","orderTemplates","customerInformation","dimensionOnChange","modalCloseButtonReference","onClickFindInStoreHandler","callbacks","async","_props$data","storeSelectorStateManager","cart","productAvailableQuantity","modules","selectedProduct","quantity","dataProduct","product","multiplePickupStoreSwitchName","retailMulitplePickupMFeatureState","featureState","find","Name","IsEnabled","missingDimensions","Dimensions","filter","dimension","DimensionValue","Value","storeSelectorId","Object","keys","length","storeSelector","id","updateErrorState","errorHost","configureErrors","getConfigureErrors","openDialog","parentElementRef","deliveryOptions","undefined","onLocationSelected","orgUnitLocation","deliveryMode","_props$context","Promise","resolve","behavior","app","addToCartBehavior","addProductToCart","count","location","then","status","substatus","productAvailability","changeModalOpen","ProductAvailableQuantity","shippingInventory","shipping","deliveryType","DeliveryMode","pickup","failureResult","failureReason","cartActionResult","otherError","getGenericError","navigationUrl","getUrlSync","actionContext","AddToCartBehavior","goToCart","window","assign","showModal","showNotification","_props$data$productPr2","defaultImageSettings","viewports","xs","q","w","h","lg","xl","lazyload","telemetryContent","getTelemetryObject","telemetryPageName","friendlyName","telemetry","dialogStrings","goToCartText","buyBoxGoToCartText","continueShoppingText","buyBoxContinueShoppingText","closeNotificationLabel","headerItemOneText","buyBoxSingleItemText","headerItemFormatText","buyBoxMultiLineItemFormatText","headerMessageText","buyBoxHeaderMessageText","freePriceText","priceFree","originalPriceText","currentPriceText","addedQuantityText","notification","ItemSuccessfullyAddedToCartNotification","gridSettings","productPrice","typeName","NotificationsManager","instance","addNotification","catch","error","exception","debug","message","findInStoreOnClick","getBuyboxFindInStore","_data$product","_data$productPrice","_data$cart","_data$deliveryOptions","_data$productAvailabl","_data$featureState","_data$channelDelivery","_product$Dimensions","_props$data$product","_props$data$productPr","slots","findInStoreHeaderText","descriptionTextToShowAllPickupOptions","channel","PickupDeliveryModeCode","price","channelDeliveryOptionConfig","_dimension$DimensionV","errorState","quantityError","modalOpen","isSectionDisabled","buttonText","description","isStockCheck","buyboxResources","isLoading","pickupInventory","findInStoreLinkText","findInStoreDescriptionText","isAggregatedInventory","_pickupInventory","IsProductAvailable","findInStoreNotAvailableTextButton","findInStoreNotAvailableDescription","getFindInStoreInventorySettings","enableStockCheck","DeliveryOptions","matchDeliveryOptions","productdeliveryOptions","storePickUpOptionList","deliveryOption","map","delivery","deliveryCode","Code","push","PickupDeliveryModeCodes","option","priceComponent","PriceComponent","popupProps","imageSettings","productQuantity","setModalOpen","renderModalPopup","Popup","ContainerProps","openFindInStoreDialog","heading","Heading","headingTag","productPickupOptionList","item","Description","key","errors","BuyboxErrorBlock","showError","button","color","disabled","modal","Buybox","dimensionUpdateQueue","FinitePromiseQueue","buyboxCallbacks","updateQuantity","newQuantity","newErrorState","updateSelectedProduct","newSelectedProduct","newInventory","newPrice","newDeliveryOptions","productDeliveryOptions","_updatePrice","dimensionSelectedAsync","selectedDimensionId","selectedDimensionValueId","enqueue","_updateDimensions","FinitePromiseQueueError","ProcessWasDiscardedFromTheQueue","getDropdownName","dimensionType","_getDropdownName","isModalOpen","changeUpdatingDimension","isUpdatingDimension","changeUpdatingDeliveryOptions","isUpdatingDeliveryOptions","updateKeyInPrice","customPrice","customAmountError","isPriceKeyedIn","keyInPriceAmount","_onBulkPurchaseLinkClick","bulkPurchaseModule","boundingRect","getBoundingClientRect","scrollTo","left","top","hasProductDimensions","dimensionsToUpdate","clearErrorState","previousState","_getProductVariant","productVariant","productVariantPromise","promises","_getDimensionsForSelectedVariant","mappedDimensions","_hydrateInventoryInfo","_hydratePrice","_hydrateDeliveryOptions","_updateQuantitiesInState","all","isGiftCard","IsGiftCard","productDimensionTypeColor","productDimensionTypeConfiguration","productDimensionTypeSize","productDimensionTypeAmount","productDimensionTypeStyle","min","max","ItemTypeValue","ReleasedProductType","Service","isServiceItem","maxRecentlyViewedItemsCount","RecentlyViewedState","RecordId","_this$props$data$prod2","mediaGallery","productComparisonButton","inventoryLevel","dimensionValuesWithInventory","flatten","validValues","value","hasAvailableProducts","some","getInventoryLevelCodeFromDimensionValue","InventoryLevelValues","outOfStock","catalogId","getCatalogId","ModuleProps","ProductInfoContainerProps","MediaGalleryContainerProps","getBuyboxProductTitle","getBuyboxProductDescription","bulkPurchaseLink","_renderBuyboxBulkPurchaseLink","unitOfMeasure","getBuyboxProductUnitOfMeasure","configure","getBuyboxProductConfigure","findInStore","getBuyboxProductPrice","addToCart","getBuyboxAddToCart","getBuyboxProductComparisonButton","addToOrderTemplate","getBuyboxProductAddToOrderTemplate","addToWishlist","getBuyboxProductAddToWishlist","rating","hideRating","getBuyboxProductRating","getBuyboxProductQuantity","inventoryLabel","getBuyBoxInventoryLabel","shopSimilarLook","enableShopSimilarLooks","getBuyboxShopSimilarButton","ShopSimiliarButtonType","Looks","shopSimilarDescription","enableShopSimilarDescription","keyInPrice","enableKeyInPrice","isCustomPriceSelected","getBuyboxKeyInPrice","quantityLimitsMessages","getQuantityLimitsMessages","catalogs","_validateCatalogDetails","isBulkPurchaseEnabled","msdyn365Commerce","isBrowser","bulkPurchaseModules","Array","from","document","getElementsByClassName","bulkPurchaseLinkText","arguments","CustomerContextualPrice","apiSettings","channelId","_ref","_dimension$dimensionV","_dimensions$find$Dime","_dimensions$find","DimensionValues","DimensionTypeValue","_value$DimensionValue","toString","ExtensionProperties","setDimensionValuesToQuery","requestContext","url","requestUrl","selectedProductPromise","getSelectedVariant","SelectedVariantInput","MasterProductId","getDimensionsForSelectedVariant","GetDimensionsForSelectedVariantInput","_productVariant$Dimen","newAvailableQuantity","getProductAvailabilitiesForSelectedVariant","ProductAvailabilitiesForSelectedVariantInput","newShippingQuantity","toLowerCase","getPriceForSelectedVariant","PriceForSelectedVariantInput","_this$props$data$feat","retailMultiplePickupFeatureState","getDeliveryOptionsForSelectedVariant","GetDeliveryOptionsForSelectedVariantInput","_product$Behavior","_product$Behavior2","_product$Behavior3","_product$Behavior4","_isOrderQuantityLimitsFeatureEnabled","Behavior","MinimumQuantity","MaximumQuantity","updateMaxQuantityForCartLineItem","maxQuantityForCartLineItem","_this$props$context","_featureStatuses$find","defaultOrderQuantityLimitsFeatureConfig","platform","enableDefaultOrderQuantityLimits","featureStatuses","RetailDefaultOrderQuantityLimitsFeatureName","customerInfo","information","IsB2b","_this$props$data$cata","_renderAddToCart","errorBlock","Node","_renderAddToOrderTemplate","_renderAddToWishlist","_renderConfigure","dropdowns","_renderConfigureDropdown","_renderSocialShare","socialShare","dropdown","LabelContainerProps","select","_renderFindInStore","_renderQuantity","input","_renderKeyInPrice","_renderShopSimilarItem","shopSimilarItem","Module"],"sourceRoot":""}