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AAUrf,cCAjBof,EAAOC,QAAUC","sources":["webpack://bju-press/./src/themes/base/views/buybox.view.tsx?0647","webpack://bju-press/./src/themes/christian-school/views/buybox.view.tsx?e537","webpack://bju-press/./src/themes/homeschool/views/buybox.view.tsx?e8a4","webpack://bju-press/./src/utilities/analytics/analytics-dispatcher.ts?75be","webpack://bju-press/./src/utilities/data-attribute-parser.ts?7345","webpack://bju-press/./src/utilities/global-constants.ts?5882","webpack://bju-press/./src/utilities/variable-replacer.ts?aee0","webpack://bju-press/./lib/buybox/module-registration.js?bcce","webpack://bju-press/./src/store-selector-state-manager/base-store-selector-state-manager.ts?281e","webpack://bju-press/./src/store-selector-state-manager/map-store-selector-state-manager.ts?2ae0","webpack://bju-press/./src/store-selector-state-manager/store-selector-state-manager-data-action.ts?bd3e","webpack://bju-press/./src/modules/fabrikam/views/buybox.view.tsx?aec4","webpack://bju-press/./src/modules/adventureworks/views/components/buybox-add-to-order-template.tsx?ceb4","webpack://bju-press/./src/modules/adventureworks/views/buybox.view.tsx?98cf","webpack://bju-press/external var \"React\"?0d3b","webpack://bju-press/external var \"ReactDOM\"?853b"],"sourcesContent":["/*!\r\n * Copyright (c) Microsoft Corporation.\r\n * All rights reserved. See LICENSE in the project root for license information.\r\n */\r\n\r\nimport { Module, Node } from '@msdyn365-commerce-modules/utilities';\r\nimport * as React from 'react';\r\n\r\nimport {\r\n IBuyboxAddToCartViewProps,\r\n IBuyboxAddToOrderTemplateViewProps,\r\n IBuyboxAddToWishlistViewProps,\r\n IBuyboxKeyInPriceViewProps,\r\n IBuyboxProductConfigureDropdownViewProps,\r\n IBuyboxProductConfigureViewProps,\r\n IBuyboxProductQuantityViewProps,\r\n IBuyboxShopSimilarLookViewProps\r\n} from '@msdyn365-commerce-modules/buybox';\r\nimport { IBuyboxViewProps } from '@msdyn365-commerce-modules/buybox';\r\nimport { IBuyboxFindInStoreViewProps } from '@msdyn365-commerce-modules/buybox';\r\n\r\n//----------------------------------------------------------\r\n// @CUSTOM: Utility imports for customizations\r\n//----------------------------------------------------------\r\nimport { convertProductAttributes } from '../../../utilities/data-attribute-parser';\r\nimport { attrNames, labelResources } from '../../../utilities/global-constants';\r\nimport { varReplace } from '../../../utilities/variable-replacer';\r\n//----------------------------------------------------------\r\n\r\n//----------------------------------------------------------\r\n// @CUSTOM: Added imports for additional config from\r\n// extended definition\r\n//----------------------------------------------------------\r\nimport { IProductInventoryInformation } from '@msdyn365-commerce-modules/retail-actions';\r\nimport { RichText, RichTextComponent } from '@msdyn365-commerce/core';\r\nimport { IBuyboxProps } from '../definition-extensions/buybox.ext.props.autogenerated';\r\nimport { IBuyboxData } from './buybox.data';\r\n//----------------------------------------------------------\r\n\r\n// @CUSTOM: imports analytics\r\nimport { publish } from '../../../utilities/analytics/analytics-dispatcher';\r\nimport { SingleProductEvent } from '../../../utilities/analytics/analytics-events';\r\n\r\nlet sentAnalytics = false;\r\n//----------------------------------------------------------\r\n\r\nconst BuyboxView: React.FC> = props => { // @CUSTOM: Added extended definition props and data\r\n const {\r\n ModuleProps,\r\n MediaGalleryContainerProps,\r\n ProductInfoContainerProps,\r\n addToCart,\r\n addToOrderTemplate,\r\n addToWishlist,\r\n configure,\r\n description,\r\n findInStore,\r\n quantity,\r\n price,\r\n title,\r\n rating,\r\n inventoryLabel,\r\n shopSimilarLook,\r\n keyInPrice,\r\n shopSimilarDescription,\r\n unitOfMeasure,\r\n productComparisonButton,\r\n slots, // @CUSTOM: Added extended definition slots\r\n data // @CUSTOM: To get product data for description and item ID\r\n } = props;\r\n\r\n // @CUSTOM: PDP view analytics\r\n if (!sentAnalytics && typeof window !== 'undefined') {\r\n\r\n const product = props.data.product.result;\r\n\r\n setTimeout(() => {\r\n // @CUSTOM: send pdpview event here to ensure subscribe has fired\r\n if (product && !sentAnalytics) {\r\n sentAnalytics = true;\r\n\r\n const productPrice = props.data.productPrice.result;\r\n\r\n const analyticsProductData: SingleProductEvent = {\r\n itemID: product.ItemId || '',\r\n name: product.Name || '',\r\n discount: productPrice?.DiscountAmount,\r\n variant: '',\r\n quantity: 1,\r\n price: productPrice?.BasePrice || product.Price,\r\n currency: props.context.request.channel?.Currency || 'USD'\r\n };\r\n publish('productDetailView', analyticsProductData);\r\n }\r\n }, 0);\r\n }\r\n\r\n //------------------------------------------------------\r\n // @CUSTOM: Get converted product attributes\r\n //------------------------------------------------------\r\n const productSpecificationData = data?.productSpecificationData?.result;\r\n const productAttributes = productSpecificationData && convertProductAttributes(productSpecificationData);\r\n //-------------------------------------------------------\r\n\r\n // @CUSTOM: override short description field with product attribute\r\n let productDescriptionOverride;\r\n if (props.config.descriptionOverride && productAttributes) {\r\n const productDescriptionOverrideText = productAttributes[props.config.descriptionOverride];\r\n if (productDescriptionOverrideText) {\r\n productDescriptionOverride =

{productDescriptionOverrideText}

;\r\n }\r\n }\r\n\r\n //------------------------------------------------------\r\n // @CUSTOM: Getting product item ID for SKU display\r\n //------------------------------------------------------\r\n const productData = data?.product?.result;\r\n const itemId = productData?.ItemId;\r\n const skuDisplay = (\r\n
\r\n {labelResources.sku}\r\n {itemId}\r\n
\r\n );\r\n //------------------------------------------------------\r\n\r\n // @CUSTOM: backorder customization\r\n const productAvail = props.data.backorderAvail.result;\r\n\r\n // @CUSTOM: unbuyable customization\r\n const unbuyable = productAttributes && productAttributes[attrNames.notBuyable] as string;\r\n\r\n return (\r\n \r\n {props.mediaGallery}\r\n \r\n {title}\r\n {/* @CUSTOM: price moved to below description */}\r\n {/* @CUSTOM: PowerReviews slot */}\r\n {slots.reviewSnippet?.length && _renderSlotItems(slots.reviewSnippet)}\r\n {unitOfMeasure}\r\n {props.bulkPurchaseLink}\r\n {/* @CUSTOM: override short description field with product attribute */}\r\n {productDescriptionOverride || description}\r\n {/* @CUSTOM: Kit selector module slot */}\r\n {slots.kitSelector?.length && _renderSlotItems(slots.kitSelector)}\r\n {slots.kitCustomizer?.length && _renderSlotItems(slots.kitCustomizer)}\r\n {/* @CUSTOM: Product SKU display */}\r\n {skuDisplay}\r\n {price}\r\n {rating}\r\n {configure && _renderConfigure(configure)}\r\n {keyInPrice && _renderKeyInPrice(keyInPrice)}\r\n {/* @CUSTOM: backorder customization */}\r\n {productAvail && _renderBackOrder(productAvail, props.config.backOrderText)}\r\n {/* @CUSTOM: Unbuyable customization */}\r\n {unbuyable && (\r\n
\r\n \r\n
\r\n )}\r\n\r\n {/* @CUSTOM: Moved elements below inside a container div */}\r\n {!unbuyable &&
\r\n {quantity && _renderQuantity(quantity)}\r\n {inventoryLabel}\r\n {addToCart && _renderAddToCart(addToCart)}\r\n {findInStore && _renderFindInStore(findInStore)}\r\n {addToOrderTemplate && _renderAddToOrderTemplate(addToOrderTemplate)}\r\n {addToWishlist && _renderAddToWishlist(addToWishlist)}\r\n
}\r\n {/* @CUSTOM: Blacklisted shipping areas */}\r\n {props.config.blacklistedShippingAreasText && productAttributes && productAttributes[attrNames.blacklistedShippingAreas] && (\r\n
\r\n \r\n
\r\n )}\r\n {_renderSocialShare(props.slots && props.slots.socialShare)}\r\n {productComparisonButton}\r\n {shopSimilarLook && _renderShopSimilarItem(shopSimilarLook)}\r\n {shopSimilarDescription && _renderShopSimilarItem(shopSimilarDescription)}\r\n {/* @CUSTOM: Installment calculator */}\r\n {slots.installmentCal?.length && _renderSlotItems(slots.installmentCal)}\r\n
\r\n
\r\n );\r\n};\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 _renderAddToOrderTemplate = (addToOrderTemplate: IBuyboxAddToOrderTemplateViewProps): JSX.Element => {\r\n const { ContainerProps, errorBlock, button } = addToOrderTemplate;\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 _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 _renderSocialShare = (socialShare: React.ReactNode[]): JSX.Element | undefined => {\r\n if (!socialShare || socialShare.length === 0) {\r\n return undefined;\r\n }\r\n\r\n return <>{socialShare[0]};\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 _renderFindInStore = (findInStore: IBuyboxFindInStoreViewProps): JSX.Element => {\r\n const { ContainerProps, storeSelector, heading, description, errors, button, modal, productPickupOptionList } = findInStore;\r\n\r\n return (\r\n \r\n {storeSelector}\r\n {heading}\r\n {productPickupOptionList}\r\n {description}\r\n {errors}\r\n {button}\r\n {modal}\r\n \r\n );\r\n};\r\n\r\n// @CUSTOM: backorder customization\r\nconst _renderBackOrder = (productAvailableQuantity: IProductInventoryInformation[], text: RichText | undefined): JSX.Element | null => {\r\n\r\n const isAvail = productAvailableQuantity?.find(avail => {\r\n return avail.IsProductAvailable\r\n });\r\n\r\n if (isAvail) {\r\n return null;\r\n }\r\n\r\n return (\r\n \r\n );\r\n};\r\n//----------------------------------------------------------\r\n\r\nconst _renderQuantity = (quantity: IBuyboxProductQuantityViewProps): 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 \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 _renderShopSimilarItem = (shopSimilarItem: IBuyboxShopSimilarLookViewProps): JSX.Element => {\r\n const { ContainerProps, errors, input } = shopSimilarItem;\r\n\r\n return (\r\n \r\n {errors}\r\n {input}\r\n \r\n );\r\n};\r\n\r\n//----------------------------------------------------------\r\n// @CUSTOM: Render slot items\r\n//----------------------------------------------------------\r\nconst _renderSlotItems = (items: React.ReactNode[]): JSX.Element => {\r\n return (\r\n <>\r\n {items.map((slot: React.ReactNode, index: number) => (\r\n \r\n {slot}\r\n \r\n ))}\r\n \r\n );\r\n}\r\n//----------------------------------------------------------\r\n\r\nexport default BuyboxView;\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 { Module, Node } from '@msdyn365-commerce-modules/utilities';\r\nimport * as React from 'react';\r\n\r\nimport {\r\n IBuyboxAddToCartViewProps,\r\n IBuyboxAddToOrderTemplateViewProps,\r\n IBuyboxAddToWishlistViewProps,\r\n IBuyboxKeyInPriceViewProps,\r\n IBuyboxProductConfigureDropdownViewProps,\r\n IBuyboxProductConfigureViewProps,\r\n IBuyboxProductQuantityViewProps,\r\n IBuyboxShopSimilarLookViewProps\r\n} from '@msdyn365-commerce-modules/buybox';\r\nimport { IBuyboxViewProps } from '@msdyn365-commerce-modules/buybox';\r\nimport { IBuyboxFindInStoreViewProps } from '@msdyn365-commerce-modules/buybox';\r\n\r\n//----------------------------------------------------------\r\n// @CUSTOM: Utility imports for customizations\r\n//----------------------------------------------------------\r\nimport { convertProductAttributes } from '../../../utilities/data-attribute-parser';\r\nimport { attrNames, labelResources } from '../../../utilities/global-constants';\r\nimport { varReplace } from '../../../utilities/variable-replacer';\r\n//----------------------------------------------------------\r\n\r\n//----------------------------------------------------------\r\n// @CUSTOM: Added imports for additional config from\r\n// extended definition\r\n//----------------------------------------------------------\r\nimport { IProductInventoryInformation } from '@msdyn365-commerce-modules/retail-actions';\r\nimport { RichText, RichTextComponent } from '@msdyn365-commerce/core';\r\nimport { IBuyboxProps } from '../definition-extensions/buybox.ext.props.autogenerated';\r\nimport { IBuyboxData } from './buybox.data';\r\n//----------------------------------------------------------\r\n\r\n// @CUSTOM: imports analytics\r\nimport { publish } from '../../../utilities/analytics/analytics-dispatcher';\r\nimport { SingleProductEvent } from '../../../utilities/analytics/analytics-events';\r\n\r\nlet sentAnalytics = false;\r\n//----------------------------------------------------------\r\n\r\nconst BuyboxView: React.FC> = props => { // @CUSTOM: Added extended definition props and data\r\n const {\r\n ModuleProps,\r\n MediaGalleryContainerProps,\r\n ProductInfoContainerProps,\r\n addToCart,\r\n addToOrderTemplate,\r\n addToWishlist,\r\n configure,\r\n description,\r\n findInStore,\r\n quantity,\r\n price,\r\n title,\r\n rating,\r\n inventoryLabel,\r\n shopSimilarLook,\r\n keyInPrice,\r\n shopSimilarDescription,\r\n unitOfMeasure,\r\n productComparisonButton,\r\n slots, // @CUSTOM: Added extended definition slots\r\n data // @CUSTOM: To get product data for description and item ID\r\n } = props;\r\n\r\n // @CUSTOM: PDP view analytics\r\n if (!sentAnalytics && typeof window !== 'undefined') {\r\n\r\n const product = props.data.product.result;\r\n\r\n setTimeout(() => {\r\n // @CUSTOM: send pdpview event here to ensure subscribe has fired\r\n if (product && !sentAnalytics) {\r\n sentAnalytics = true;\r\n\r\n const productPrice = props.data.productPrice.result;\r\n\r\n const analyticsProductData: SingleProductEvent = {\r\n itemID: product.ItemId || '',\r\n name: product.Name || '',\r\n discount: productPrice?.DiscountAmount,\r\n variant: '',\r\n quantity: 1,\r\n price: productPrice?.BasePrice || product.Price,\r\n currency: props.context.request.channel?.Currency || 'USD'\r\n };\r\n publish('productDetailView', analyticsProductData);\r\n }\r\n }, 0);\r\n }\r\n\r\n //------------------------------------------------------\r\n // @CUSTOM: Get converted product attributes\r\n //------------------------------------------------------\r\n const productSpecificationData = data?.productSpecificationData?.result;\r\n const productAttributes = productSpecificationData && convertProductAttributes(productSpecificationData);\r\n //-------------------------------------------------------\r\n\r\n // @CUSTOM: override short description field with product attribute\r\n let productDescriptionOverride;\r\n if (props.config.descriptionOverride && productAttributes) {\r\n const productDescriptionOverrideText = productAttributes[props.config.descriptionOverride];\r\n if (productDescriptionOverrideText) {\r\n productDescriptionOverride =

{productDescriptionOverrideText}

;\r\n }\r\n }\r\n\r\n //------------------------------------------------------\r\n // @CUSTOM: Getting product item ID for SKU display\r\n //------------------------------------------------------\r\n const productData = data?.product?.result;\r\n const itemId = productData?.ItemId;\r\n const skuDisplay = (\r\n
\r\n {labelResources.sku}\r\n {itemId}\r\n
\r\n );\r\n //------------------------------------------------------\r\n\r\n // @CUSTOM: backorder customization\r\n const productAvail = props.data.backorderAvail.result;\r\n\r\n // @CUSTOM: unbuyable customization\r\n const unbuyable = productAttributes && productAttributes[attrNames.notBuyable] as string;\r\n\r\n return (\r\n \r\n {props.mediaGallery}\r\n \r\n {title}\r\n {/* @CUSTOM: price moved to below description */}\r\n {/* @CUSTOM: PowerReviews slot */}\r\n {slots.reviewSnippet?.length && _renderSlotItems(slots.reviewSnippet)}\r\n {unitOfMeasure}\r\n {props.bulkPurchaseLink}\r\n {/* @CUSTOM: override short description field with product attribute */}\r\n {productDescriptionOverride || description}\r\n {/* @CUSTOM: Kit selector module slot */}\r\n {slots.kitSelector?.length && _renderSlotItems(slots.kitSelector)}\r\n {slots.kitCustomizer?.length && _renderSlotItems(slots.kitCustomizer)}\r\n {/* @CUSTOM: Product SKU display */}\r\n {skuDisplay}\r\n {price}\r\n {rating}\r\n {configure && _renderConfigure(configure)}\r\n {keyInPrice && _renderKeyInPrice(keyInPrice)}\r\n {/* @CUSTOM: backorder customization */}\r\n {productAvail && _renderBackOrder(productAvail, props.config.backOrderText)}\r\n {/* @CUSTOM: Unbuyable customization */}\r\n {unbuyable && (\r\n
\r\n \r\n
\r\n )}\r\n\r\n {/* @CUSTOM: Moved elements below inside a container div */}\r\n {!unbuyable &&
\r\n {quantity && _renderQuantity(quantity)}\r\n {inventoryLabel}\r\n {addToCart && _renderAddToCart(addToCart)}\r\n {findInStore && _renderFindInStore(findInStore)}\r\n {addToOrderTemplate && _renderAddToOrderTemplate(addToOrderTemplate)}\r\n {addToWishlist && _renderAddToWishlist(addToWishlist)}\r\n
}\r\n {/* @CUSTOM: Blacklisted shipping areas */}\r\n {props.config.blacklistedShippingAreasText && productAttributes && productAttributes[attrNames.blacklistedShippingAreas] && (\r\n
\r\n \r\n
\r\n )}\r\n {_renderSocialShare(props.slots && props.slots.socialShare)}\r\n {productComparisonButton}\r\n {shopSimilarLook && _renderShopSimilarItem(shopSimilarLook)}\r\n {shopSimilarDescription && _renderShopSimilarItem(shopSimilarDescription)}\r\n {/* @CUSTOM: Installment calculator */}\r\n {slots.installmentCal?.length && _renderSlotItems(slots.installmentCal)}\r\n
\r\n
\r\n );\r\n};\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 _renderAddToOrderTemplate = (addToOrderTemplate: IBuyboxAddToOrderTemplateViewProps): JSX.Element => {\r\n const { ContainerProps, errorBlock, button } = addToOrderTemplate;\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 _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 _renderSocialShare = (socialShare: React.ReactNode[]): JSX.Element | undefined => {\r\n if (!socialShare || socialShare.length === 0) {\r\n return undefined;\r\n }\r\n\r\n return <>{socialShare[0]};\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 _renderFindInStore = (findInStore: IBuyboxFindInStoreViewProps): JSX.Element => {\r\n const { ContainerProps, storeSelector, heading, description, errors, button, modal, productPickupOptionList } = findInStore;\r\n\r\n return (\r\n \r\n {storeSelector}\r\n {heading}\r\n {productPickupOptionList}\r\n {description}\r\n {errors}\r\n {button}\r\n {modal}\r\n \r\n );\r\n};\r\n\r\n// @CUSTOM: backorder customization\r\nconst _renderBackOrder = (productAvailableQuantity: IProductInventoryInformation[], text: RichText | undefined): JSX.Element | null => {\r\n\r\n const isAvail = productAvailableQuantity?.find(avail => {\r\n return avail.IsProductAvailable\r\n });\r\n\r\n if (isAvail) {\r\n return null;\r\n }\r\n\r\n return (\r\n \r\n );\r\n};\r\n//----------------------------------------------------------\r\n\r\nconst _renderQuantity = (quantity: IBuyboxProductQuantityViewProps): 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 \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 _renderShopSimilarItem = (shopSimilarItem: IBuyboxShopSimilarLookViewProps): JSX.Element => {\r\n const { ContainerProps, errors, input } = shopSimilarItem;\r\n\r\n return (\r\n \r\n {errors}\r\n {input}\r\n \r\n );\r\n};\r\n\r\n//----------------------------------------------------------\r\n// @CUSTOM: Render slot items\r\n//----------------------------------------------------------\r\nconst _renderSlotItems = (items: React.ReactNode[]): JSX.Element => {\r\n return (\r\n <>\r\n {items.map((slot: React.ReactNode, index: number) => (\r\n \r\n {slot}\r\n \r\n ))}\r\n \r\n );\r\n}\r\n//----------------------------------------------------------\r\n\r\nexport default BuyboxView;\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 { Module, Node } from '@msdyn365-commerce-modules/utilities';\r\nimport * as React from 'react';\r\n\r\nimport {\r\n IBuyboxAddToCartViewProps,\r\n IBuyboxAddToOrderTemplateViewProps,\r\n IBuyboxAddToWishlistViewProps,\r\n IBuyboxKeyInPriceViewProps,\r\n IBuyboxProductConfigureDropdownViewProps,\r\n IBuyboxProductConfigureViewProps,\r\n IBuyboxProductQuantityViewProps,\r\n IBuyboxShopSimilarLookViewProps\r\n} from '@msdyn365-commerce-modules/buybox';\r\nimport { IBuyboxViewProps } from '@msdyn365-commerce-modules/buybox';\r\nimport { IBuyboxFindInStoreViewProps } from '@msdyn365-commerce-modules/buybox';\r\n\r\n//----------------------------------------------------------\r\n// @CUSTOM: Utility imports for customizations\r\n//----------------------------------------------------------\r\nimport { convertProductAttributes } from '../../../utilities/data-attribute-parser';\r\nimport { attrNames, labelResources } from '../../../utilities/global-constants';\r\nimport { varReplace } from '../../../utilities/variable-replacer';\r\n//----------------------------------------------------------\r\n\r\n//----------------------------------------------------------\r\n// @CUSTOM: Added imports for additional config from\r\n// extended definition\r\n//----------------------------------------------------------\r\nimport { IProductInventoryInformation } from '@msdyn365-commerce-modules/retail-actions';\r\nimport { RichText, RichTextComponent } from '@msdyn365-commerce/core';\r\nimport { IBuyboxProps } from '../definition-extensions/buybox.ext.props.autogenerated';\r\nimport { IBuyboxData } from './buybox.data';\r\n//----------------------------------------------------------\r\n\r\n// @CUSTOM: imports analytics\r\nimport { publish } from '../../../utilities/analytics/analytics-dispatcher';\r\nimport { SingleProductEvent } from '../../../utilities/analytics/analytics-events';\r\n\r\nlet sentAnalytics = false;\r\n//----------------------------------------------------------\r\n\r\nconst BuyboxView: React.FC> = props => { // @CUSTOM: Added extended definition props and data\r\n const {\r\n ModuleProps,\r\n MediaGalleryContainerProps,\r\n ProductInfoContainerProps,\r\n addToCart,\r\n addToOrderTemplate,\r\n addToWishlist,\r\n configure,\r\n description,\r\n findInStore,\r\n quantity,\r\n price,\r\n title,\r\n rating,\r\n inventoryLabel,\r\n shopSimilarLook,\r\n keyInPrice,\r\n shopSimilarDescription,\r\n unitOfMeasure,\r\n productComparisonButton,\r\n slots, // @CUSTOM: Added extended definition slots\r\n data // @CUSTOM: To get product data for description and item ID\r\n } = props;\r\n\r\n // @CUSTOM: PDP view analytics\r\n if (!sentAnalytics && typeof window !== 'undefined') {\r\n\r\n const product = props.data.product.result;\r\n\r\n setTimeout(() => {\r\n // @CUSTOM: send pdpview event here to ensure subscribe has fired\r\n if (product && !sentAnalytics) {\r\n sentAnalytics = true;\r\n\r\n const productPrice = props.data.productPrice.result;\r\n\r\n const analyticsProductData: SingleProductEvent = {\r\n itemID: product.ItemId || '',\r\n name: product.Name || '',\r\n discount: productPrice?.DiscountAmount,\r\n variant: '',\r\n quantity: 1,\r\n price: productPrice?.BasePrice || product.Price,\r\n currency: props.context.request.channel?.Currency || 'USD'\r\n };\r\n publish('productDetailView', analyticsProductData);\r\n }\r\n }, 0);\r\n }\r\n\r\n //------------------------------------------------------\r\n // @CUSTOM: Get converted product attributes\r\n //------------------------------------------------------\r\n const productSpecificationData = data?.productSpecificationData?.result;\r\n const productAttributes = productSpecificationData && convertProductAttributes(productSpecificationData);\r\n //-------------------------------------------------------\r\n\r\n // @CUSTOM: override short description field with product attribute\r\n let productDescriptionOverride;\r\n if (props.config.descriptionOverride && productAttributes) {\r\n const productDescriptionOverrideText = productAttributes[props.config.descriptionOverride];\r\n if (productDescriptionOverrideText) {\r\n productDescriptionOverride =

{productDescriptionOverrideText}

;\r\n }\r\n }\r\n\r\n //------------------------------------------------------\r\n // @CUSTOM: Getting product item ID for SKU display\r\n //------------------------------------------------------\r\n const productData = data?.product?.result;\r\n const itemId = productData?.ItemId;\r\n const skuDisplay = (\r\n
\r\n {labelResources.sku}\r\n {itemId}\r\n
\r\n );\r\n //------------------------------------------------------\r\n\r\n // @CUSTOM: backorder customization\r\n const productAvail = props.data.backorderAvail.result;\r\n\r\n // @CUSTOM: unbuyable customization\r\n const unbuyable = productAttributes && productAttributes[attrNames.notBuyable] as string;\r\n\r\n return (\r\n \r\n {props.mediaGallery}\r\n \r\n {title}\r\n {/* @CUSTOM: price moved to below description */}\r\n {/* @CUSTOM: PowerReviews slot */}\r\n {slots.reviewSnippet?.length && _renderSlotItems(slots.reviewSnippet)}\r\n {unitOfMeasure}\r\n {props.bulkPurchaseLink}\r\n {/* @CUSTOM: override short description field with product attribute */}\r\n {productDescriptionOverride || description}\r\n {/* @CUSTOM: Kit selector module slot */}\r\n {slots.kitSelector?.length && _renderSlotItems(slots.kitSelector)}\r\n {slots.kitCustomizer?.length && _renderSlotItems(slots.kitCustomizer)}\r\n {/* @CUSTOM: Product SKU display */}\r\n {skuDisplay}\r\n {price}\r\n {rating}\r\n {configure && _renderConfigure(configure)}\r\n {keyInPrice && _renderKeyInPrice(keyInPrice)}\r\n {/* @CUSTOM: backorder customization */}\r\n {productAvail && _renderBackOrder(productAvail, props.config.backOrderText)}\r\n {/* @CUSTOM: Unbuyable customization */}\r\n {unbuyable && (\r\n
\r\n \r\n
\r\n )}\r\n\r\n {/* @CUSTOM: Moved elements below inside a container div */}\r\n {!unbuyable &&
\r\n {quantity && _renderQuantity(quantity)}\r\n {inventoryLabel}\r\n {addToCart && _renderAddToCart(addToCart)}\r\n {findInStore && _renderFindInStore(findInStore)}\r\n {addToOrderTemplate && _renderAddToOrderTemplate(addToOrderTemplate)}\r\n {addToWishlist && _renderAddToWishlist(addToWishlist)}\r\n
}\r\n {/* @CUSTOM: Blacklisted shipping areas */}\r\n {props.config.blacklistedShippingAreasText && productAttributes && productAttributes[attrNames.blacklistedShippingAreas] && (\r\n
\r\n \r\n
\r\n )}\r\n {_renderSocialShare(props.slots && props.slots.socialShare)}\r\n {productComparisonButton}\r\n {shopSimilarLook && _renderShopSimilarItem(shopSimilarLook)}\r\n {shopSimilarDescription && _renderShopSimilarItem(shopSimilarDescription)}\r\n {/* @CUSTOM: Installment calculator */}\r\n {slots.installmentCal?.length && _renderSlotItems(slots.installmentCal)}\r\n
\r\n
\r\n );\r\n};\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 _renderAddToOrderTemplate = (addToOrderTemplate: IBuyboxAddToOrderTemplateViewProps): JSX.Element => {\r\n const { ContainerProps, errorBlock, button } = addToOrderTemplate;\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 _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 _renderSocialShare = (socialShare: React.ReactNode[]): JSX.Element | undefined => {\r\n if (!socialShare || socialShare.length === 0) {\r\n return undefined;\r\n }\r\n\r\n return <>{socialShare[0]};\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 _renderFindInStore = (findInStore: IBuyboxFindInStoreViewProps): JSX.Element => {\r\n const { ContainerProps, storeSelector, heading, description, errors, button, modal, productPickupOptionList } = findInStore;\r\n\r\n return (\r\n \r\n {storeSelector}\r\n {heading}\r\n {productPickupOptionList}\r\n {description}\r\n {errors}\r\n {button}\r\n {modal}\r\n \r\n );\r\n};\r\n\r\n// @CUSTOM: backorder customization\r\nconst _renderBackOrder = (productAvailableQuantity: IProductInventoryInformation[], text: RichText | undefined): JSX.Element | null => {\r\n\r\n const isAvail = productAvailableQuantity?.find(avail => {\r\n return avail.IsProductAvailable\r\n });\r\n\r\n if (isAvail) {\r\n return null;\r\n }\r\n\r\n return (\r\n \r\n );\r\n};\r\n//----------------------------------------------------------\r\n\r\nconst _renderQuantity = (quantity: IBuyboxProductQuantityViewProps): 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 \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 _renderShopSimilarItem = (shopSimilarItem: IBuyboxShopSimilarLookViewProps): JSX.Element => {\r\n const { ContainerProps, errors, input } = shopSimilarItem;\r\n\r\n return (\r\n \r\n {errors}\r\n {input}\r\n \r\n );\r\n};\r\n\r\n//----------------------------------------------------------\r\n// @CUSTOM: Render slot items\r\n//----------------------------------------------------------\r\nconst _renderSlotItems = (items: React.ReactNode[]): JSX.Element => {\r\n return (\r\n <>\r\n {items.map((slot: React.ReactNode, index: number) => (\r\n \r\n {slot}\r\n \r\n ))}\r\n \r\n );\r\n}\r\n//----------------------------------------------------------\r\n\r\nexport default BuyboxView;\r\n","//==============================================================================\r\n// Analytics Event Dispatcher (Simple Pub-Sub system)\r\n//\r\n// This module receives events and forwards them to the appropriate handlers\r\n// Subscriptions are managed using a subscriber ID to aid in unsubscribing\r\n//\r\n// NOTE: Singletons aren't compatible with SSR. This module acts as a singleton,\r\n// maintaining its data as a global. Modules MUST call subscribe on the client\r\n// ONLY (via componentDidMount).\r\n//\r\n// @TODO: Currently, only client-side events will be processed. Events generated\r\n// during server-side renders will be lost. If we move data to a data action\r\n// it can be persisted from server to client. That will allow us to queue up\r\n// events generated on the server or before subscriptions occur, and emit\r\n// them immediately upon subscription.\r\n//==============================================================================\r\nimport { EventHandler } from \"./analytics-events\";\r\n\r\n//==============================================================================\r\n// INTERFACES\r\n//==============================================================================\r\n\r\n// List of subscribers to a single event\r\ninterface EventSubscribers {\r\n [subscriber: string]: EventHandler;\r\n}\r\n\r\n//==============================================================================\r\n// GLOBALS\r\n//==============================================================================\r\n\r\n// List of subscriptions, organized by event name and then subscriber name\r\nconst subscriptions: { [eventName: string]: EventSubscribers } = {};\r\n\r\n//==============================================================================\r\n// FUNCTIONS\r\n//==============================================================================\r\n\r\n//==========================================================\r\n// Called by event emitters when an event occurs\r\n//\r\n// NOTE: This should only be called on the client! Events on\r\n// the server will be lost. They should instead be queued\r\n// via a data action cache.\r\n//==========================================================\r\nexport function publish(eventName: string, eventData: unknown): void {\r\n\r\n // Get the list of subscribers for this event\r\n const subscribers = Object.keys(subscriptions[eventName] || {});\r\n\r\n // Notify each subscriber\r\n subscribers.forEach(subscriber => subscriptions[eventName][subscriber](eventData));\r\n}\r\n\r\n//==========================================================\r\n// Called by event handlers when they self-register for events\r\n//==========================================================\r\nexport function subscribe(subscriber: string, eventName: string, handler: EventHandler): void {\r\n\r\n // If it's a new event, create an entry\r\n subscriptions[eventName] = subscriptions[eventName] || {};\r\n\r\n // Ensure this subscriber isn't already subscribed to this event\r\n if (subscriptions[eventName][subscriber]) {\r\n throw new Error(`Duplicate subscription request for ${subscriber}: ${eventName}`);\r\n }\r\n\r\n // Add the subscription\r\n subscriptions[eventName][subscriber] = handler;\r\n}\r\n\r\n//==========================================================\r\n// Unsubscribe from a single event\r\n//==========================================================\r\nexport function unsubscribe(subscriber: string, eventName: string): void {\r\n if (subscriptions[eventName] && subscriptions[eventName][subscriber]) {\r\n delete subscriptions[eventName][subscriber];\r\n }\r\n}\r\n","//==============================================================================\r\n// D365 OData Attribute Parser\r\n//\r\n// In creating this, it became clear that \"attributes\" is a general term.\r\n//\r\n// Product attributes are a first-class entity. They have their own dedicated\r\n// fields and schema.\r\n//\r\n// The more generic term \"attributes\" is used as a generic extension system.\r\n// Almost every entity (including Product Attributes) has an ExtensionProperties\r\n// field for jamming extra information into. In some cases, D365 handles these\r\n// natively, such as sales order line and header attributes, or customer\r\n// attributes. Attributes using ExtensionProperties use the\r\n// CommerceProperty and CommercePropertyValue types.\r\n//\r\n// A major note about ExtensionProperty-based attributes: they have fields\r\n// for many different data types, but there's no indicator as to which\r\n// of the fields is actually used. The consumer of the data is expected to\r\n// know the data type ahead of time. In the case of D365-native attribute users\r\n// such as customers and sales orders, only the string type appears to work.\r\n//\r\n// This module includes parsers for generic ExtensionProperties-based attributes\r\n// and Product Attributes. Though different Product Attribute retail server\r\n// calls use the same AttributeValue entity to transmit the data, they appear\r\n// to return different fields from that entity. Because of this, two different\r\n// parser calls are included here. They currently share the same implementation,\r\n// but by including different call signatures we have the ability to diverge\r\n// the implementations if the need arises.\r\n//\r\n// A note about Product Attributes: These contain both a friendly name,\r\n// displayed to users in back office, and an internal name. The internal name\r\n// can be the same as the friendly name, but by convention we've been pushing\r\n// for a PascalCase scheme. At present, the searchByCriteria call returns only\r\n// the unfriendly name, and the GetAttributeValues call returns only the\r\n// friendly name. We don't have a known method of correlating the two. That may\r\n// be an argument for keeping the friendly and unfriendly names identical.\r\n//==============================================================================\r\nimport {\r\n CommerceProperty, // Generic attributes stored in ExtensionProperties\r\n CommercePropertyValue, // Generic attributes stored in AttributeValue\r\n AttributeValue, AttributeDataType, // Product attributes or Product Search Result attributes\r\n CustomerAttribute, // Customer attributes\r\n IDictionary,\r\n} from '@msdyn365-commerce/retail-proxy';\r\n\r\n//==============================================================================\r\n// INTERFACES AND CONSTANTS\r\n//==============================================================================\r\nexport type CommerceValueTypes = string | number | boolean | Date;\r\n\r\n// This is me giving up on proper typing. If doing this in TypeScript is possible, I don't know how.\r\n// For the key \"meta\", the type should be a hash of strings.\r\n// For all other keys, the type is a CommerceValueType.\r\nexport type AttributesWithMetadata = {\r\n [key: string]: CommerceValueTypes | IDictionary\r\n};\r\n\r\n// Type to support both internal and friendly name for attributes\r\nexport type AttributesLocalized = {\r\n [key: string]: {\r\n friendlyName?: string,\r\n value?: CommerceValueTypes | IDictionary\r\n }\r\n};\r\n\r\n// Return type for getTypeInfo()\r\ntype TypeData = {\r\n source: keyof AttributeValue,\r\n type: string,\r\n\r\n customerSource?: keyof CommercePropertyValue,\r\n};\r\n\r\n//==============================================================================\r\n// FUNCTIONS\r\n//==============================================================================\r\n\r\n//----------------------------------------------------------\r\n// This version handles ExtensionProperties conversion.\r\n//\r\n// While these have a bunch of potential fields, the value\r\n// is always stored within StringValue.\r\n// There isn't a data type field, so if the content wasn't\r\n// in StringValue we wouldn't know where to find it.\r\n//----------------------------------------------------------\r\nexport function convertExtensionProperties(attributeList: CommerceProperty[]): IDictionary {\r\n const output = {};\r\n\r\n attributeList.forEach(entry => {\r\n if (entry.Key) {\r\n output[entry.Key] = entry.Value?.StringValue; // Ecommerce seems to always use strings.\r\n }\r\n });\r\n\r\n return output;\r\n}\r\n\r\n//----------------------------------------------------------\r\n// For these attributes, the Name is always the friendly\r\n// name.\r\n// KeyName and ExtensionProperties aren't defined.\r\n//\r\n// These results seem to be missing CurrencyValue,\r\n// FloatValue, DateTimeOffsetValue\r\n// I don't know if those data types aren't allowed here.\r\n//\r\n// Return value: Hash of key: property values with variable\r\n// types. There is also a \"meta\" key containing a hash of\r\n// all the attribute keys and their corresponding types.\r\n//\r\n// Example:\r\n// {\r\n// flavor: 'bland',\r\n// calories: 5300,\r\n// meta: {\r\n// flavor: 'string',\r\n// calories: 'number'\r\n// }\r\n// }\r\n//----------------------------------------------------------\r\nexport function convertProductAttributes(attributeList: AttributeValue[]): AttributesWithMetadata {\r\n const output = {\r\n meta: {}\r\n };\r\n\r\n attributeList.forEach(attribute => {\r\n // These should always be present, but TypeScript insists they can be undefined.\r\n if (attribute.Name && attribute.DataTypeValue) {\r\n const typeData = getTypeInfo(attribute.DataTypeValue);\r\n output[attribute.Name] = attribute[typeData.source]; // Ecommerce seems to require strings\r\n output.meta[attribute.Name] = typeData.type;\r\n }\r\n });\r\n\r\n return output;\r\n}\r\n\r\n//----------------------------------------------------------\r\n// For these attributes, the Name is the friendly\r\n// name while KeyName is the internal name.\r\n//\r\n// This makes use of combined attributes containing both\r\n// internal and friendly name to support localization.\r\n//\r\n// Return value: Hash of internal name keys containing an object with both the\r\n// friendly name and attribute value There is also a \"meta\" key containing a\r\n// hash of all the attribute keys and their corresponding types.\r\n//\r\n// Example:\r\n// {\r\n// flavor: {\r\n// friendlyName: Flavor,\r\n// value: 'bland'\r\n// },\r\n// calories: {\r\n// friendlyName: Calories,\r\n// value: 5300\r\n// },\r\n// meta: {\r\n// flavor: 'string',\r\n// calories: 'number'\r\n// }\r\n// }\r\n//----------------------------------------------------------\r\nexport function convertProductAttributesLocalized(attributeList: AttributeValue[]): AttributesLocalized {\r\n const output = {\r\n meta: {}\r\n };\r\n\r\n attributeList.forEach(attribute => {\r\n if (attribute.KeyName && attribute.DataTypeValue) {\r\n const typeData = getTypeInfo(attribute.DataTypeValue);\r\n output[attribute.KeyName] = {\r\n friendlyName: attribute.Name,\r\n value: attribute[typeData.source]\r\n };\r\n output.meta[attribute.KeyName] = typeData.type;\r\n }\r\n });\r\n\r\n return output;\r\n}\r\n\r\n//----------------------------------------------------------\r\n// For these attributes, the\r\n// Name/KeyName/ExtensionProperties is always the unfriendly\r\n// name.\r\n//\r\n// These results are only missing the Swatches field.\r\n//\r\n// Though the returned value is a bit different, at present\r\n// the implementation for convertProductAttributes works for\r\n// search results.\r\n// If they diverge in the future, extend this function.\r\n//----------------------------------------------------------\r\nexport function convertSearchAttributes(attributeList: AttributeValue[]): AttributesWithMetadata {\r\n return convertProductAttributes(attributeList);\r\n}\r\n\r\n//----------------------------------------------------------\r\n// For these attributes, the Name is always the friendly\r\n// name. Value is always Text, and DataTypeValue is not\r\n// present here.\r\n//----------------------------------------------------------\r\nexport function convertCartAttributes(attributeList: AttributeValue[]): AttributesWithMetadata {\r\n const output = {};\r\n\r\n attributeList.forEach(attribute => {\r\n if (attribute.Name) {\r\n output[attribute.Name] = attribute.TextValue;\r\n }\r\n });\r\n\r\n return output;\r\n}\r\n\r\n//----------------------------------------------------------\r\n//----------------------------------------------------------\r\nexport function convertCustomerAttributes(attributeList: CustomerAttribute[] | undefined): AttributesWithMetadata {\r\n const output = {\r\n meta: {}\r\n };\r\n\r\n attributeList?.forEach(attribute => {\r\n // These should always be present, but TypeScript insists they can be undefined.\r\n if (attribute.Name && attribute.DataTypeValue) {\r\n const typeData = getTypeInfo(attribute.DataTypeValue);\r\n output[attribute.Name] = attribute.AttributeValue && typeData.customerSource && attribute.AttributeValue[typeData.customerSource];\r\n output.meta[attribute.Name] = typeData.type;\r\n }\r\n });\r\n\r\n return output;\r\n}\r\n\r\n//----------------------------------------------------------\r\n// Finds the source field and type for an attribute\r\n//\r\n// This should probably be extended to better support\r\n// currency, which seems to be two fields glued together.\r\n//----------------------------------------------------------\r\nfunction getTypeInfo(type: AttributeDataType): TypeData {\r\n\r\n // Awkward, but this helps TypeScript enforce strict type checking\r\n type TypeMapType = {\r\n [key in AttributeDataType]: TypeData\r\n };\r\n\r\n const typeMap: TypeMapType = {\r\n [AttributeDataType.None]: {source: 'TextValue', type: 'string'}, // We need to choose something\r\n [AttributeDataType.Currency]: {source: 'CurrencyValue', type: 'number'}, // Should also include CurrencyCode, which is a string?\r\n [AttributeDataType.DateTime]: {source: 'DateTimeOffsetValue', type: 'Date'},\r\n [AttributeDataType.Decimal]: {source: 'FloatValue', type: 'number'},\r\n [AttributeDataType.Integer]: {source: 'IntegerValue', type: 'number', customerSource: 'IntegerValue'},\r\n [AttributeDataType.Text]: {source: 'TextValue', type: 'string', customerSource: 'StringValue'},\r\n [AttributeDataType.TrueFalse]: {source: 'BooleanValue', type: 'boolean', customerSource: 'BooleanValue'},\r\n [AttributeDataType.Video]: {source: 'TextValue', type: 'string'},\r\n [AttributeDataType.Image]: {source: 'TextValue', type: 'string'}\r\n };\r\n\r\n return typeMap[type];\r\n}\r\n","//==============================================================================\r\n// Global Constants\r\n//\r\n// Consolidated list of constants reused across different modules and extensions\r\n//==============================================================================\r\n\r\n//----------------------------------------------------------\r\n// Attribute names list\r\n//----------------------------------------------------------\r\nexport const attrNames = {\r\n productType: 'Item Type',\r\n lineAttributes: 'LineAttributes',\r\n blacklistedShippingAreas: 'Embargoed shipping locations',\r\n kitConfigurator: 'KitConfigurator',\r\n kitContents: 'eCommBurstoutKitContents',\r\n kitFormats: 'eCommBurstoutKitFormats',\r\n kitElectives: 'eCommBurstoutKitElectives',\r\n kitSubstitutions: 'eCommBurstoutKitSubstitutions',\r\n kitLineSubstitutions: 'eCommBurstoutKitLineDetails',\r\n kitLineParentAssociation: 'eCommBurstoutKitOrderLineParentAssociation',\r\n kitLineChildAssociation: 'eCommBurstoutKitOrderLineChildAssociation',\r\n instructors: 'eCommInstructors',\r\n consultantCartAttribute: 'eCommConsultantId',\r\n isInstallmentEligible: 'eCommItemIsPPEligible',\r\n cashForCollege: 'eCommCash4College',\r\n dropShip: 'eCommDropShip',\r\n scoringType: 'TestScoring',\r\n studentId: 'eCommPTEStudentId',\r\n schoolIdPP: 'eCommPPSchoolId',\r\n testCoordinator: 'PTETestCoordinator',\r\n testEnrollment: 'PTESchoolEnrollment',\r\n testType: 'Test Type',\r\n testFormat: 'Test Format',\r\n testDate: 'eCommPTETestDate',\r\n testDateId: 'eCommPTETestDateId',\r\n testAdmin: 'eCommPTEAdminCustAccount',\r\n testProctorEmail: 'PTEProctorEmail',\r\n testProctorName: 'PTEProctorName',\r\n testProctorPhone: 'PTEProctorPhone',\r\n testProctorTimeZone: 'PTEProctorTimeZone',\r\n userAgreement: 'eCommUserAgreement',\r\n umbrellaGroup: 'UmbrellaGroupID',\r\n gradeLvl: 'Grade level',\r\n isNotTest: 'Other',\r\n onlineTest: 'Online test',\r\n purchaseItemType: 'TestBklt',\r\n notBuyable: 'Not Buyable',\r\n billingCountry: 'eCommBillingCountryCode',\r\n billingZipCode: 'eCommBillingZipPostalCode',\r\n paymentScheduleName: 'PaymentScheduleName'\r\n};\r\n\r\n//----------------------------------------------------------\r\n// Global label resources\r\n//----------------------------------------------------------\r\nexport const labelResources = {\r\n sku: 'SKU'\r\n};\r\n","//==============================================================================\r\n// Variable Replacer\r\n//\r\n// General purpose tool to replace variables within a string\r\n//==============================================================================\r\n\r\nexport function varReplace(text: string, vars: {[key: string]: string}): string {\r\n return text.replace(/{(.+?)}/g, (_, match) => vars[match] || '');\r\n}\r\n","const binding = { modules: {}, dataActions: {} };\n\n const registerActionId = (actionPath) => {\n if (binding.dataActions[actionPath] &&\n binding.dataActions[actionPath].default &&\n binding.dataActions[actionPath].default.prototype &&\n binding.dataActions[actionPath].default.prototype.id) {\n binding.dataActions[binding.dataActions[actionPath].default.prototype.id] = binding.dataActions[actionPath];\n } else {\n Object.keys(binding.dataActions[actionPath] || {}).forEach(exportName => {\n if (binding.dataActions[actionPath][exportName] &&\n binding.dataActions[actionPath][exportName].prototype &&\n binding.dataActions[actionPath][exportName].prototype.Action) {\n binding.dataActions[binding.dataActions[actionPath][exportName].prototype.id] = binding.dataActions[actionPath][exportName];\n }\n })\n }\n };\n\n const registerSanitizedActionPath = (sanitizedActionPath, dataAction) => {\n if (process.env.NODE_ENV === 'development') {\n if (!dataAction.default) {\n throw new Error('Data action path does not have a default export');\n }\n if (!(dataAction.default.prototype.id && binding.dataActions[dataAction.default.prototype.id]) || !binding.dataActions[sanitizedActionPath]) {\n binding.dataActions[sanitizedActionPath] = dataAction;\n }\n } else {\n binding.dataActions[sanitizedActionPath] = dataAction;\n if (!binding.dataActions[sanitizedActionPath].default) {\n throw new Error('Data action path ' + sanitizedActionPath + ' does not have a default export');\n }\n binding.dataActions[sanitizedActionPath].default.prototype.RegistrationId = sanitizedActionPath;\n if (binding.dataActions[sanitizedActionPath].default.prototype.id) {\n binding.dataActions[binding.dataActions[sanitizedActionPath].default.prototype.id] = sanitizedActionPath;\n }\n }\n };\n \n\n (binding.modules['buybox'] = {\n c: () => require('@msdyn365-commerce-modules/buybox/dist/lib/modules/buybox/buybox'),\n $type: 'containerModule',\n da: [{name:'cart', path:'@msdyn365-commerce/global-state/dist/lib/data-actions/cart-state-data-action', runOn: 0},{name:'catalogs', path:'@msdyn365-commerce-modules/retail-actions/dist/lib/get-catalogs', runOn: 0},{name:'channelDeliveryOptionConfig', path:'@msdyn365-commerce-modules/retail-actions/dist/lib/get-channel-delivery-option-configuration', runOn: 0},{name:'customerInformation', path:'@msdyn365-commerce-modules/retail-actions/dist/lib/get-customer', runOn: 0},{name:'deliveryOptions', path:'@msdyn365-commerce-modules/retail-actions/dist/lib/get-delivery-options-for-selected-variant', runOn: 0},{name:'featureState', path:'@msdyn365-commerce-modules/retail-actions/dist/lib/get-feature-state', runOn: 0},{name:'orderTemplates', path:'@msdyn365-commerce-modules/retail-actions/dist/lib/order-templates/get-order-templates-preview', runOn: 1},{name:'product', path:'@msdyn365-commerce-modules/retail-actions/dist/lib/get-selected-variant', runOn: 0},{name:'productAvailableQuantity', path:'@msdyn365-commerce-modules/retail-actions/dist/lib/get-product-availabilities-for-selected-variant', runOn: 0},{name:'productDimensions', path:'@msdyn365-commerce-modules/retail-actions/dist/lib/get-dimensions-for-selected-variant', runOn: 0},{name:'productPrice', path:'@msdyn365-commerce-modules/retail-actions/dist/lib/get-price-for-selected-variant', runOn: 0},{name:'ratingsSummary', path:'@msdyn365-commerce-modules/retail-actions/dist/lib/get-ratings-summary', runOn: 1},{name:'storeSelectorStateManager', path:'@msdyn365-commerce-modules/bopis-utilities/dist/lib/store-selector-state-manager/store-selector-state-manager-data-action', runOn: 1},{name:'wishlists', path:'@msdyn365-commerce-modules/retail-actions/dist/lib/get-wishlist-by-customer-id', runOn: 0}],\n \n iNM: true,\n ns: '@msdyn365-commerce-modules',\n n: 'buybox',\n p: 'buybox',\n \n pdp: '',\n \n \n md: 'node_modules/@msdyn365-commerce-modules/buybox/dist/lib/modules/buybox'\n });\n \n\n {\n const sanitizedActionPath = '@msdyn365-commerce-modules/bopis-utilities/dist/lib/store-selector-state-manager/store-selector-state-manager-data-action';\n let dataAction = require('@msdyn365-commerce-modules/bopis-utilities/dist/lib/store-selector-state-manager/store-selector-state-manager-data-action');\n registerSanitizedActionPath(sanitizedActionPath, dataAction);\n }\n \n\n {\n const sanitizedActionPath = '@msdyn365-commerce-modules/retail-actions/dist/lib/get-catalogs';\n let dataAction = require('@msdyn365-commerce-modules/retail-actions/dist/lib/get-catalogs');\n registerSanitizedActionPath(sanitizedActionPath, dataAction);\n }\n \n\n {\n const sanitizedActionPath = '@msdyn365-commerce-modules/retail-actions/dist/lib/get-channel-delivery-option-configuration';\n let dataAction = require('@msdyn365-commerce-modules/retail-actions/dist/lib/get-channel-delivery-option-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-delivery-options-for-selected-variant';\n let dataAction = require('@msdyn365-commerce-modules/retail-actions/dist/lib/get-delivery-options-for-selected-variant');\n registerSanitizedActionPath(sanitizedActionPath, dataAction);\n }\n \n\n {\n const sanitizedActionPath = '@msdyn365-commerce-modules/retail-actions/dist/lib/get-dimensions-for-selected-variant';\n let dataAction = require('@msdyn365-commerce-modules/retail-actions/dist/lib/get-dimensions-for-selected-variant');\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-price-for-selected-variant';\n let dataAction = require('@msdyn365-commerce-modules/retail-actions/dist/lib/get-price-for-selected-variant');\n registerSanitizedActionPath(sanitizedActionPath, dataAction);\n }\n \n\n {\n const sanitizedActionPath = '@msdyn365-commerce-modules/retail-actions/dist/lib/get-product-availabilities-for-selected-variant';\n let dataAction = require('@msdyn365-commerce-modules/retail-actions/dist/lib/get-product-availabilities-for-selected-variant');\n registerSanitizedActionPath(sanitizedActionPath, dataAction);\n }\n \n\n {\n const sanitizedActionPath = '@msdyn365-commerce-modules/retail-actions/dist/lib/get-ratings-summary';\n let dataAction = require('@msdyn365-commerce-modules/retail-actions/dist/lib/get-ratings-summary');\n registerSanitizedActionPath(sanitizedActionPath, dataAction);\n }\n \n\n {\n const sanitizedActionPath = '@msdyn365-commerce-modules/retail-actions/dist/lib/get-selected-variant';\n let dataAction = require('@msdyn365-commerce-modules/retail-actions/dist/lib/get-selected-variant');\n registerSanitizedActionPath(sanitizedActionPath, dataAction);\n }\n \n\n {\n const sanitizedActionPath = '@msdyn365-commerce-modules/retail-actions/dist/lib/get-wishlist-by-customer-id';\n let dataAction = require('@msdyn365-commerce-modules/retail-actions/dist/lib/get-wishlist-by-customer-id');\n registerSanitizedActionPath(sanitizedActionPath, dataAction);\n }\n \n\n {\n const sanitizedActionPath = '@msdyn365-commerce-modules/retail-actions/dist/lib/order-templates/get-order-templates-preview';\n let dataAction = require('@msdyn365-commerce-modules/retail-actions/dist/lib/order-templates/get-order-templates-preview');\n registerSanitizedActionPath(sanitizedActionPath, dataAction);\n }\n \n\n {\n const sanitizedActionPath = '@msdyn365-commerce/global-state/dist/lib/data-actions/cart-state-data-action';\n let dataAction = require('@msdyn365-commerce/global-state/dist/lib/data-actions/cart-state-data-action');\n registerSanitizedActionPath(sanitizedActionPath, dataAction);\n }\n \n\n \n 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__|themes|base|views|buybox'] = {\n c: () => require('partner/themes/base/views/buybox.view.tsx'),\n cn: '__local__-__local__-buybox'\n };\nviewDictionary['__local__|__local__|themes|christian-school|views|buybox'] = {\n c: () => require('partner/themes/christian-school/views/buybox.view.tsx'),\n cn: '__local__-__local__-buybox'\n };\nviewDictionary['__local__|__local__|themes|homeschool|views|buybox'] = {\n c: () => require('partner/themes/homeschool/views/buybox.view.tsx'),\n cn: '__local__-__local__-buybox'\n };\nviewDictionary['@msdyn365-commerce-modules|buybox|modules|buybox|buybox'] = {\n c: () => require('@msdyn365-commerce-modules/buybox/dist/lib/modules/buybox/buybox.view.js'),\n cn: '@msdyn365-commerce-modules-buybox-buybox'\n };\nviewDictionary['@msdyn365-commerce-modules|fabrikam-design-kit|modules|fabrikam|views|buybox'] = {\n c: () => require('@msdyn365-commerce-modules/fabrikam-design-kit/dist/lib/modules/fabrikam/views/buybox.view.js'),\n cn: '@msdyn365-commerce-modules-fabrikam-design-kit-buybox'\n };\nviewDictionary['@msdyn365-commerce-theme|adventureworks-theme-kit|modules|adventureworks|views|buybox'] = {\n c: () => require('@msdyn365-commerce-theme/adventureworks-theme-kit/dist/lib/modules/adventureworks/views/buybox.view.js'),\n cn: '@msdyn365-commerce-theme-adventureworks-theme-kit-buybox'\n };\nwindow.__bindings__ = window.__bindings__ || {};\nwindow.__bindings__.viewDictionary = {\n ...window.__bindings__.viewDictionary || {},\n ...viewDictionary\n };","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport MsDyn365, { IActionContext } from '@msdyn365-commerce/core';\nimport { action, computed, observable } from 'mobx';\n\nimport {\n IListMapViewState,\n ILoadMapApiInput,\n IStoreInfo,\n IStoreSelectionStateContext,\n IStoreSelectorLocation,\n IStoreSelectorStateManager\n} from './i-store-selection-state-manager';\n\n/**\n * Abstract instance of IStoreSelectorStateManager with base implementation\n * of everything except the geoLocate function.\n */\nexport abstract class BaseStoreSelectorStateManager implements IStoreSelectorStateManager {\n @computed public get isDialogOpen(): Readonly {\n return this._context !== undefined;\n }\n\n @computed public get context(): Readonly {\n return this._context;\n }\n\n @observable public isMapApiLoaded?: boolean;\n\n @observable public selectedStoreLocationId?: string;\n\n @observable public preferredStore?: IStoreInfo;\n\n @observable public listMapViewState: IListMapViewState = { displayList: true, displayMap: false };\n\n @observable public isMapModuleLoaded?: boolean;\n\n @observable public lastInlineShownStoreInfo?: IStoreInfo;\n\n @observable protected _context?: IStoreSelectionStateContext;\n\n private readonly preferredStoreLocalStorageKey: string = '_msdyn365__preferredStore_';\n\n constructor() {\n this.isMapModuleLoaded = false;\n const value = this._readFromToCookie(this.preferredStoreLocalStorageKey);\n try {\n const storeInfo: IStoreInfo | undefined = value ? JSON.parse(value) : undefined;\n if (storeInfo) {\n this.preferredStore = storeInfo;\n }\n } catch {\n this.preferredStore = undefined;\n }\n }\n\n public abstract geoLocate(searchTerm: string, actionContext: IActionContext): Promise;\n\n public abstract loadMapApi(input: ILoadMapApiInput): Promise;\n\n @action\n public async toggleListMapViewState(): Promise {\n this.listMapViewState = {\n displayList: !this.listMapViewState.displayList,\n displayMap: !this.listMapViewState.displayMap\n };\n }\n\n @action\n public async setMapModuleLoaded(input: boolean): Promise {\n this.isMapModuleLoaded = input;\n }\n\n @action\n public async setOrgUnitStoreInformation(input: IStoreSelectionStateContext): Promise {\n this._context = input;\n }\n\n @action\n public async setSelectedStoreLocationId(storeId: string | undefined): Promise {\n this.selectedStoreLocationId = storeId;\n }\n\n @action\n public async setPreferredStoreLocation(\n storeId?: string,\n storeName?: string | undefined,\n writeToCookie: boolean = false,\n latitude?: number,\n longitude?: number\n ): Promise {\n const storeInfo: IStoreInfo = { StoreId: storeId, StoreName: storeName, Latitude: latitude, Longitude: longitude };\n this.preferredStore = storeInfo;\n if (writeToCookie) {\n this._writeToCookie(this.preferredStoreLocalStorageKey, JSON.stringify(storeInfo));\n }\n }\n\n @action\n public async setLastInlineStoreInfo(latitude?: number, longitude?: number): Promise {\n const storeInfo: IStoreInfo = { StoreId: '', StoreName: '', Latitude: latitude, Longitude: longitude };\n this.lastInlineShownStoreInfo = storeInfo;\n }\n\n @action\n public async clearPreferredStore(writeToCookie: boolean): Promise {\n this.preferredStore = undefined;\n if (writeToCookie) {\n this._removeCookie(this.preferredStoreLocalStorageKey);\n }\n }\n\n @action\n public async openDialog(input: IStoreSelectionStateContext): Promise {\n if (this._context && this._context.id === input.id) {\n throw new Error('Dialog is already opened');\n }\n\n this._context = input;\n }\n\n @action\n public async closeDialog(): Promise {\n this._context = undefined;\n }\n\n private _removeCookie(key: string): void {\n if (!key) {\n return;\n }\n if (MsDyn365.isBrowser) {\n const storage = window.localStorage;\n storage.removeItem(key);\n }\n }\n\n private _writeToCookie(key: string, value: string | undefined): void {\n if (!key || !value) {\n return;\n }\n if (MsDyn365.isBrowser) {\n const storage = window.localStorage;\n storage.setItem(key, value);\n }\n }\n\n private _readFromToCookie(key: string): string | undefined {\n if (!key) {\n return undefined;\n }\n if (MsDyn365.isBrowser) {\n const storage = window.localStorage;\n const cookieValue = storage.getItem(key);\n if (cookieValue) {\n return cookieValue;\n }\n }\n\n return undefined;\n }\n}\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { IActionContext } from '@msdyn365-commerce/core';\nimport { StringExtensions } from '@msdyn365-commerce-modules/retail-actions';\nimport { action } from 'mobx';\n\nimport { BaseStoreSelectorStateManager } from './base-store-selector-state-manager';\nimport { ILoadMapApiInput, IStoreSelectorLocation } from './i-store-selection-state-manager';\nimport { IMapWindow, MapLocationsResult } from './models/map-data';\n\ndeclare const window: IMapWindow;\n\n/**\n * Instance of IStoreSelectorStateManager manager that uses Map service\n * for geo location.\n */\nexport class MapStoreSelectorStateManager extends BaseStoreSelectorStateManager {\n private readonly SERVICE_ENDPOINT: string = 'https://dev.virtualearth.net/REST/v1/';\n\n private readonly MAP_API_ENDPOINT: string = 'https://www.bing.com/api/maps/mapcontrol?callback=mapAPIReady';\n\n @action\n public async geoLocate(searchTerm: string, actionContext: IActionContext): Promise {\n if (\n !searchTerm ||\n !actionContext.requestContext.channel ||\n !actionContext.requestContext.channel.BingMapsApiKey ||\n !actionContext.requestContext.channel.BingMapsEnabled\n ) {\n return undefined;\n }\n\n let searchContent: string = searchTerm;\n\n const jsonp = `mapSearchCallback_${crypto.getRandomValues(new Uint32Array(1))[0]}`;\n\n if (actionContext.requestContext.channel.ChannelCountryRegionISOCode) {\n searchContent = `${searchTerm.trim()} ${actionContext.requestContext.channel.ChannelCountryRegionISOCode}`;\n }\n\n const query = encodeURI(searchContent);\n const key = encodeURI(actionContext.requestContext.channel.BingMapsApiKey);\n\n const geolocationApiUrl =\n actionContext.requestContext.app &&\n actionContext.requestContext.app.config &&\n actionContext.requestContext.app.config.geolocationApiUrl;\n const requestUrl = `${\n geolocationApiUrl ? geolocationApiUrl : this.SERVICE_ENDPOINT\n }/Locations?query=${query}&key=${key}&jsonp=${jsonp}`;\n\n return new Promise(resolve => {\n const script = document.createElement('script');\n script.setAttribute('type', 'text/javascript');\n script.setAttribute('src', requestUrl);\n\n window[jsonp] = (data: MapLocationsResult) => {\n delete window[jsonp];\n script.remove();\n\n if (data && data.resourceSets && data.resourceSets.length > 0 && data.resourceSets[0].resources.length > 0) {\n resolve({\n latitude: data.resourceSets[0].resources[0].point.coordinates[0],\n longitude: data.resourceSets[0].resources[0].point.coordinates[1]\n });\n }\n\n resolve(undefined);\n };\n\n document.body.appendChild(script);\n });\n }\n\n @action\n public async loadMapApi(input: ILoadMapApiInput): Promise {\n if (StringExtensions.isNullOrEmpty(input.key)) {\n return Promise.resolve();\n }\n\n const isScriptAlreadyLoaded = !!document?.getElementById('msdyn_map-api-script');\n\n if (isScriptAlreadyLoaded) {\n // Prevents from loading multiple script into the body\n return Promise.resolve();\n }\n\n const url = `${this.MAP_API_ENDPOINT}${input.key ? `&key=${input.key}` : ''}${input.lang ? `&setLang=${input.lang}` : ''}${\n input.market ? `&setMkt=${input.market}` : ''\n }`;\n\n return new Promise((resolve, reject) => {\n const script = document?.createElement('script');\n script.type = 'text/javascript';\n script.async = true;\n script.defer = true;\n script.src = url;\n script.id = 'msdyn_map-api-script';\n if (window) {\n window.mapAPIReady = () => {\n this.isMapApiLoaded = true;\n resolve();\n };\n }\n script.addEventListener('error', (error: string | Event) => {\n reject(error);\n });\n document?.body?.appendChild(script);\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 { createObservableDataAction, IAction, IActionInput, IAny, ICreateActionContext, IGeneric } from '@msdyn365-commerce/core';\nimport { GenericInput, getGenericAction } from '@msdyn365-commerce-modules/retail-actions';\n\nimport { IStoreSelectorStateManager } from './i-store-selection-state-manager';\nimport { MapStoreSelectorStateManager } from './map-store-selector-state-manager';\n\nexport function createStoreSelectorStateInput(result: IStoreSelectorStateManager): GenericInput {\n return new GenericInput('mapSSSM', result, 'IStoreSelectorStateManager');\n}\n\nconst createStoreSelectorStateInputInternal = (inputData: ICreateActionContext>): IActionInput => {\n return createStoreSelectorStateInput(new MapStoreSelectorStateManager());\n};\n\nexport const getGenericActionDataAction = createObservableDataAction({\n action: >getGenericAction,\n input: createStoreSelectorStateInputInternal\n});\n\nexport default getGenericActionDataAction;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport {\n IBuyboxAddToCartViewProps,\n IBuyboxAddToOrderTemplateViewProps,\n IBuyboxAddToWishlistViewProps,\n IBuyboxCallbacks,\n IBuyboxData,\n IBuyboxFindInStoreViewProps,\n IBuyboxKeyInPriceViewProps,\n IBuyboxProductConfigureDropdownViewProps,\n IBuyboxProductConfigureViewProps,\n IBuyboxProductQuantityViewProps,\n IBuyboxProps,\n IBuyboxShopSimilarLookViewProps,\n IBuyboxState,\n IBuyboxViewProps\n} from '@msdyn365-commerce-modules/buybox';\nimport { IncrementalQuantity, ITelemetryContent, Module, Node } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport {\n IBuyboxProps as IBuyboxExtentionProps,\n IBuyboxResources as IBuyboxExtentionResources\n} from '../definition-extensions/buybox.ext.props.autogenerated';\n\nconst BuyboxView: React.FC> = props => {\n const {\n ModuleProps,\n MediaGalleryContainerProps,\n ProductInfoContainerProps,\n addToCart,\n addToOrderTemplate,\n addToWishlist,\n telemetryContent,\n configure,\n description,\n findInStore,\n quantity,\n price,\n title,\n rating,\n callbacks,\n state,\n resources,\n inventoryLabel,\n shopSimilarLook,\n keyInPrice,\n quantityLimitsMessages,\n max,\n shopSimilarDescription,\n unitOfMeasure\n } = props;\n\n return (\n \n {props.mediaGallery}\n \n {title}\n {price}\n {unitOfMeasure}\n {props.bulkPurchaseLink}\n {description}\n {_renderTextBlock(props.slots.textBlocks)}\n {rating}\n {configure && _renderConfigure(configure)}\n {keyInPrice && _renderKeyInPrice(keyInPrice)}\n {quantity && _renderQuantity(quantity, callbacks, props, state, resources, quantityLimitsMessages, max, telemetryContent)}\n {inventoryLabel}\n {_renderCartAndActions(addToCart, addToOrderTemplate, addToWishlist)}\n {findInStore && _renderFindInStore(findInStore)}\n {_renderSocialShare(props.slots && props.slots.socialShare)}\n {shopSimilarLook && _renderShopSimilarItem(shopSimilarLook)}\n {shopSimilarDescription && _renderShopSimilarItem(shopSimilarDescription)}\n \n \n );\n};\n\nconst _renderTextBlock = (textBlocks: React.ReactNode[]): JSX.Element | undefined => {\n if (!textBlocks || textBlocks.length === 0) {\n return undefined;\n }\n\n return <>{textBlocks[0]};\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 _renderCartAndActions = (\n addToCart?: IBuyboxAddToCartViewProps,\n addToOrderTemplate?: IBuyboxAddToOrderTemplateViewProps,\n addToWishlist?: IBuyboxAddToWishlistViewProps\n): JSX.Element | undefined => {\n if (!addToCart && !addToWishlist) {\n return undefined;\n }\n\n return (\n
\n {addToCart && addToCart.errorBlock}\n {addToOrderTemplate && addToOrderTemplate.errorBlock}\n {addToWishlist && addToWishlist.errorBlock}\n
\n {addToCart && addToCart.button}\n {addToOrderTemplate && addToOrderTemplate.button}\n {addToWishlist && addToWishlist.button}\n
\n
\n );\n};\n\nconst _renderConfigure = (configure: IBuyboxProductConfigureViewProps): JSX.Element => {\n const { ContainerProps, dropdowns } = configure;\n\n return {dropdowns.map(_renderConfigureDropdown)};\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\n/**\n * On Change function.\n * @param callbacks -Callbacks.\n * @returns Update quantity.\n */\nconst onChangeHandler = (callbacks: IBuyboxCallbacks) => (newValue: number): boolean => {\n if (callbacks.updateQuantity) {\n return callbacks.updateQuantity(newValue);\n }\n return true;\n};\n\nconst _renderQuantity = (\n quantityComponent: IBuyboxProductQuantityViewProps,\n callbacks: IBuyboxCallbacks,\n props: IBuyboxProps,\n state: IBuyboxState,\n extentionResources: IBuyboxExtentionResources,\n quantityLimitsMessages: React.ReactNode,\n max: number | undefined,\n telemetryContent?: ITelemetryContent\n): JSX.Element => {\n const { ContainerProps, LabelContainerProps, heading, errors } = quantityComponent;\n\n const { resources } = props;\n\n const { quantity } = state;\n\n return (\n \n \n {heading}\n {errors}\n \n\n \n {quantityLimitsMessages}\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};\n\nexport default BuyboxView;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport {\n AddToOrderTemplateComponent,\n IAddToOrderTemplateDialogResources,\n IDuplicateItemsWhenAddingToOrderTemplateDialogResources,\n IItemAddedToOrderTemplateDialogResources,\n IOrderTemplateActionErrorResult,\n IOrderTemplateNameDialogResources\n} from '@msdyn365-commerce/components';\nimport { SimpleProduct } from '@msdyn365-commerce/retail-proxy';\nimport {\n getConfigureErrors,\n IBuyboxCallbacks,\n IBuyboxCommonResources,\n IBuyboxData,\n IBuyboxState,\n IBuyboxViewProps\n} from '@msdyn365-commerce-modules/buybox';\nimport * as React from 'react';\n\nimport { IBuyboxProps as IBuyboxExtentionProps } from '../../definition-extensions/buybox.ext.props.autogenerated';\n\n/**\n * To generate AddToOrderTemplateDialog resources.\n * @param resources - The resources.\n * @returns -- Returns the list of AddToOrderTemplateDialog resources..\n */\nfunction generateAddToOrderTemplateDialogResources(resources: IBuyboxCommonResources): IAddToOrderTemplateDialogResources {\n return {\n addToOrderTemplateHeader: resources.addToOrderTemplateHeader,\n\n noOrderTemplatesMessage: resources.noOrderTemplatesMessage,\n noOrderTemplatesDescription: resources.noOrderTemplatesDescription,\n\n createAnOrderTemplateButtonText: resources.createAnOrderTemplateButtonText,\n createNewOrderTemplateButtonText: resources.createNewOrderTemplateButtonText,\n cancelOrderTemplateCreationButtonText: resources.cancelOrderTemplateCreationButtonText,\n\n selectTemplatesText: resources.selectTemplatesText,\n addToTemplateButtonText: resources.addToTemplateButtonText,\n lineItemsText: resources.lineItemsText\n };\n}\n\n/**\n * To generate OrderTemplateNameDialog resources.\n * @param resources - The resources.\n * @returns -- Returns the list of OrderTemplateNameDialog resources..\n */\nfunction generateOrderTemplateNameDialogResources(resources: IBuyboxCommonResources): IOrderTemplateNameDialogResources {\n return {\n orderTemplateHeaderLabel: resources.createOrderTemplateHeader,\n orderTemplateTitleLabel: resources.orderTemplateTitle,\n orderTemplateNameAriaLabel: resources.orderTemplateNameAriaLabel,\n orderTemplateDescription: resources.createOrderTemplateDescription,\n\n defaultOrderTemplateName: resources.defaultOrderTemplateName,\n\n orderTemplateButtonLabel: resources.createOrderTemplateButtonText,\n orderTemplateCancelButtonLabel: resources.cancelNewOrderTemplateCreationButtonText\n };\n}\n\n/**\n * To generate ItemAddedToOrderTemplateDialog resources.\n * @param resources - The resources.\n * @returns -- Returns the list of ItemAddedToOrderTemplateDialog resources..\n */\nfunction generateItemAddedToOrderTemplateDialogResources(resources: IBuyboxCommonResources): IItemAddedToOrderTemplateDialogResources {\n return {\n viewOrderTemplateButtonText: resources.viewOrderTemplateButtonText,\n continueShoppingButtonText: resources.continueShoppingButtonText,\n itemAddedToOrderTemplateHeaderItemOneText: resources.itemAddedToOrderTemplateHeaderItemOneText,\n itemAddedToOrderTemplateHeaderItemFormatText: resources.itemAddedToOrderTemplateHeaderItemFormatText,\n itemAddedToOrderTemplateHeaderMessageText: resources.itemAddedToOrderTemplateHeaderMessageText,\n freePriceText: resources.priceFree,\n originalPriceText: resources.originalPriceText,\n currentPriceText: resources.currentPriceText\n };\n}\n\n/**\n * To generate DuplicateItemsWhenAddingToOrderTemplateDialog resources.\n * @param resources - The resources.\n * @returns -- Returns the list of DuplicateItemsWhenAddingToOrderTemplateDialog resources..\n */\nfunction generateDuplicateItemsWhenAddingToOrderTemplateDialogResources(\n resources: IBuyboxCommonResources\n): IDuplicateItemsWhenAddingToOrderTemplateDialogResources {\n return {\n duplicatedProductsHeader: resources.duplicatedProductsHeader,\n duplicatedProductsDescription: resources.duplicatedProductsDescription,\n updateQuantityButtonText: resources.updateQuantityButtonText,\n cancelDuplicateItemsButtonText: resources.cancelDuplicateItemsButtonText\n };\n}\n\n/**\n * Add to wishlist failed function.\n * @param callbacks -Buybox callbacks.\n * @param resources -Buybox resources.\n * @param product -Simple product.\n * @returns Update error state.\n */\nconst onAddToOrderTemplateFailed = (callbacks: IBuyboxCallbacks, resources: IBuyboxCommonResources, product: SimpleProduct | undefined) => (\n result: IOrderTemplateActionErrorResult\n) => {\n callbacks.updateErrorState({\n errorHost: 'ORDER_TEMPLATE',\n configureErrors:\n result.status === 'MISSING_DIMENSION' ? getConfigureErrors(result.missingDimensions, resources, product?.IsGiftCard) : {}\n });\n};\n\n/**\n * RenderAddToOrderTemplateButton.\n * @param props - Buybox view props.\n * @param state - Buybox state.\n * @param callbacks - Buybox callbacks.\n * @param product - Product data.\n * @returns -- Returns JSX element.\n */\nexport const renderAddToOrderTemplateButton = (\n props: IBuyboxViewProps & IBuyboxExtentionProps,\n state: IBuyboxState,\n callbacks: IBuyboxCallbacks,\n product: SimpleProduct\n): React.ReactNode => {\n const {\n // eslint-disable-next-line @typescript-eslint/naming-convention -- Dependency from module file.\n id,\n typeName,\n context,\n data: {\n orderTemplates: { result: orderTemplates },\n customerInformation: { result: customerInformation }\n },\n resources,\n config\n } = props;\n\n const { quantity } = state;\n\n const isShowButtonText = true;\n const isMultipleCatalogsFeatureEnabled = props.isChannelMultipleCatalogsFeatureEnabled || false;\n return (\n orderTemplates && (\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 { AddToWishlistComponent, IWishlistActionErrorResult } from '@msdyn365-commerce/components';\nimport { format, ItemAvailability, SimpleProduct } from '@msdyn365-commerce/retail-proxy';\nimport { IStoreInfo } from '@msdyn365-commerce-modules/bopis-utilities';\nimport {\n getConfigureErrors,\n IBuyboxAddToCartViewProps,\n IBuyboxCallbacks,\n IBuyboxCommonResources,\n IBuyboxData,\n IBuyboxFindInStoreViewProps,\n IBuyboxKeyInPriceViewProps,\n IBuyboxProductConfigureDropdownViewProps,\n IBuyboxProductConfigureViewProps,\n IBuyboxProductQuantityViewProps,\n IBuyboxResources as IBuyboxExtentionResources,\n IBuyboxShopSimilarLookViewProps,\n IBuyboxState,\n IBuyboxViewProps\n} from '@msdyn365-commerce-modules/buybox';\nimport {\n ArrayExtensions,\n getFullAvailableInventoryNearby,\n GetFullAvailableInventoryNearbyInput,\n IFullOrgUnitAvailability\n} from '@msdyn365-commerce-modules/retail-actions';\nimport { IncrementalQuantity, INodeProps, ITelemetryContent, Module, Node } from '@msdyn365-commerce-modules/utilities';\nimport { reaction } from 'mobx';\nimport * as React from 'react';\n\nimport { IBuyboxProps as IBuyboxExtentionProps, IBuyboxProps } from '../definition-extensions/buybox.ext.props.autogenerated';\nimport { renderAddToOrderTemplateButton } from './components/buybox-add-to-order-template';\n\n/**\n * BuyBoxConstants enum.\n */\nexport enum BuyBoxConstants {\n zero = 0\n}\n\n/**\n * On Change function.\n * @param callbacks -Callbacks.\n * @returns Update quantity.\n */\nconst onChangeHandler = (callbacks: IBuyboxCallbacks) => (newValue: number): boolean => {\n if (callbacks.updateQuantity) {\n return callbacks.updateQuantity(newValue);\n }\n return true;\n};\n\n/**\n * RenderQuantity.\n * @param quantityComponent - QuantityComponent.\n * @param callbacks - Callbacks.\n * @param props - Props.\n * @param state - State.\n * @param extentionResources - ExtentionResources.\n * @param quantityLimitsMessages - QuantityLimitsMessages.\n * @param max - Max.\n * @param telemetryContent - TelemetryContent.\n * @param unitOfMeasure - Unit Of Measure.\n * @returns -- Returns.\n */\nconst renderQuantity = (\n quantityComponent: IBuyboxProductQuantityViewProps,\n callbacks: IBuyboxCallbacks,\n props: IBuyboxProps,\n state: IBuyboxState,\n extentionResources: IBuyboxExtentionResources,\n quantityLimitsMessages: React.ReactNode,\n\n // eslint-disable-next-line @typescript-eslint/naming-convention -- Dependency from Buybox.tsx file\n max: number | undefined,\n telemetryContent?: ITelemetryContent,\n unitOfMeasure?: React.ReactNode\n): JSX.Element => {\n // eslint-disable-next-line @typescript-eslint/naming-convention -- Dependency from Buybox.tsx file\n const { ContainerProps, LabelContainerProps, heading, errors } = quantityComponent;\n\n const { resources } = props;\n\n const { quantity } = state;\n\n return (\n \n \n {heading}\n {errors}\n \n\n \n {unitOfMeasure}\n {quantityLimitsMessages}\n \n );\n};\n\n/**\n * Render key in price function.\n * @param keyInPrice - KeyInPrice.\n * @returns -- Returns.\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\n/**\n * RenderAddToCart.\n * @param addToCart - AddToCart.\n * @returns -- Returns.\n */\nconst renderAddToCart = (addToCart: IBuyboxAddToCartViewProps): JSX.Element => {\n // eslint-disable-next-line @typescript-eslint/naming-convention -- Dependency from Buybox.tsx file\n const { ContainerProps, errorBlock, button } = addToCart;\n\n return (\n \n {errorBlock}\n {button}\n \n );\n};\n\n/**\n * RenderFindInStore.\n * @param findInStore - FindInStore.\n * @returns -- Returns.\n */\nconst renderFindInStore = (findInStore: IBuyboxFindInStoreViewProps): JSX.Element => {\n // eslint-disable-next-line @typescript-eslint/naming-convention -- Dependency from Buybox.tsx file\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\n/**\n * RenderAddToOrderTemplate.\n * @param props - Buybox view props.\n * @param state - Buybox state.\n * @param callbacks - Buybox callbacks.\n * @returns -- Returns.\n */\nconst renderAddToOrderTemplate = (\n props: IBuyboxViewProps & IBuyboxExtentionProps,\n state: IBuyboxState,\n callbacks: IBuyboxCallbacks\n): JSX.Element | null => {\n const product = props.data.product.result;\n if (!props.addToOrderTemplate || !product) {\n return null;\n }\n\n const orderTemplateButton = renderAddToOrderTemplateButton(props, state, callbacks, product);\n\n return (\n \n {props.addToOrderTemplate.errorBlock}\n {orderTemplateButton}\n \n );\n};\n\n/**\n * Add to wishlist failed function.\n * @param callbacks -Buybox callbacks.\n * @param resources -Buybox resources.\n * @param product -Simple product.\n * @returns Update error state.\n */\nconst onAddToWishlistFailed = (callbacks: IBuyboxCallbacks, resources: IBuyboxCommonResources, product: SimpleProduct | undefined) => (\n result: IWishlistActionErrorResult\n) => {\n callbacks.updateErrorState({\n errorHost: 'WISHLIST',\n configureErrors:\n result.status === 'MISSINGDIMENSION' ? getConfigureErrors(result.missingDimensions, resources, product?.IsGiftCard) : {}\n });\n};\n\n/**\n * RenderAddToWishlist.\n * @param props - Buybox view props.\n * @param state - Buybox state.\n * @param callbacks - Buybox callbacks.\n * @param product - Product data.\n * @returns -- Returns.\n */\nconst renderAddtoWishlistButton = (\n props: IBuyboxViewProps & IBuyboxExtentionProps,\n state: IBuyboxState,\n callbacks: IBuyboxCallbacks,\n product: SimpleProduct\n): React.ReactNode => {\n const { context, resources } = props;\n const wishlists = props.data.wishlists.result;\n const isShowWishlitButtonText = true;\n return (\n \n );\n};\n\n/**\n * RenderAddToWishlist.\n * @param props - Buybox viewprops.\n * @param state - Buybox state.\n * @param callbacks - Buybox callbacks.\n * @returns -- Returns.\n */\nconst renderAddToWishlist = (\n props: IBuyboxViewProps & IBuyboxExtentionProps,\n state: IBuyboxState,\n callbacks: IBuyboxCallbacks\n): JSX.Element | null => {\n const product = props.data.product.result;\n if (!props.addToWishlist || !product) {\n return null;\n }\n\n if (!props.config.enableWishlist) {\n return null;\n }\n\n const wishlistButton = renderAddtoWishlistButton(props, state, callbacks, product);\n return (\n \n {props.addToWishlist.errorBlock}\n {wishlistButton}\n \n );\n};\n\n/**\n * RRenderShopSimilarItem.\n * @param shopSimilarItem - ShopSimilarItem.\n * @returns -- Returns.\n */\nconst renderShopSimilarItem = (shopSimilarItem: IBuyboxShopSimilarLookViewProps): JSX.Element => {\n // eslint-disable-next-line @typescript-eslint/naming-convention -- Dependency from Buybox.tsx file\n const { ContainerProps, errors, input } = shopSimilarItem;\n\n return (\n \n {errors}\n {input}\n \n );\n};\n\n/**\n * RenderSocialShare.\n * @param socialShare - Social share react node array.\n * @returns -- Returns.\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\n/**\n * RenderConfigureDropdown.\n * @param dropdown - Buybox product configure dropdown view props.\n * @returns -- Returns JSX.Element.\n */\nconst renderConfigureDropdown = (dropdown: IBuyboxProductConfigureDropdownViewProps): JSX.Element => {\n const { ContainerProps, LabelContainerProps, heading, errors, select } = dropdown;\n\n return (\n \n {heading}\n {select}\n {errors}\n \n );\n};\n\n/**\n * RenderConfigure.\n * @param configure - Buybox product configure view props.\n * @returns -- Returns JSX.Element.\n */\nconst renderConfigure = (configure: IBuyboxProductConfigureViewProps): JSX.Element => {\n const { ContainerProps, dropdowns } = configure;\n\n return {dropdowns.map(renderConfigureDropdown)};\n};\n\n/**\n * BuyboxView.\n * @param props - Props.\n * @returns -- Returns.\n */\nconst BuyboxView: React.FC> = props => {\n // eslint-disable-next-line @typescript-eslint/naming-convention -- Dependency from Buybox.tsx file\n const {\n ModuleProps,\n // eslint-disable-next-line @typescript-eslint/naming-convention -- Dependency from Buybox.tsx file\n MediaGalleryContainerProps,\n // eslint-disable-next-line @typescript-eslint/naming-convention -- Dependency from Buybox.tsx file\n ProductInfoContainerProps,\n addToCart,\n addToOrderTemplate,\n addToWishlist,\n productComparisonButton,\n configure,\n description,\n findInStore,\n quantity,\n price,\n title,\n rating,\n inventoryLabel,\n shopSimilarLook,\n keyInPrice,\n shopSimilarDescription,\n // eslint-disable-next-line @typescript-eslint/naming-convention -- Dependency from Buybox.tsx file\n max,\n unitOfMeasure,\n callbacks,\n state,\n resources,\n quantityLimitsMessages,\n telemetryContent,\n app: { config: appConfig },\n catalogs\n } = props;\n let skuText: string = props.resources.skuText;\n skuText += props.data.product.result?.ItemId;\n const preferredStoreInfo: IStoreInfo | undefined = props.data.storeSelectorStateManager.result?.preferredStore;\n const preferredStoreId = preferredStoreInfo?.StoreId ? preferredStoreInfo.StoreId : '';\n const preferredStoreName = preferredStoreInfo?.StoreName ? preferredStoreInfo.StoreName : '';\n\n const [availability, setAvailability] = React.useState('');\n const [isStoreChange, setIsStoreChange] = React.useState(false);\n\n /**\n * GetStockInventoryLabel.\n * @param availabilityWithHours - Stock availability with hours.\n * @returns -- Returns.\n */\n const getStockInventoryLabel = (availabilityWithHours: IFullOrgUnitAvailability | undefined): string | undefined => {\n if (availabilityWithHours && ArrayExtensions.hasElements(availabilityWithHours.ProductInventoryInformation)) {\n for (const productInventoryInformation of availabilityWithHours.ProductInventoryInformation) {\n if (\n availabilityWithHours.OrgUnitAvailability?.OrgUnitLocation?.InventoryLocationId ===\n productInventoryInformation.InventLocationId\n ) {\n return productInventoryInformation.StockLevelLabel;\n }\n }\n }\n\n return undefined;\n };\n\n const getInventory = React.useCallback(async () => {\n const input = new GetFullAvailableInventoryNearbyInput(\n props.data.product.result?.RecordId,\n BuyBoxConstants.zero,\n BuyBoxConstants.zero,\n BuyBoxConstants.zero,\n BuyBoxConstants.zero,\n true\n );\n\n /**\n * IsProductInStock.\n * @param itemAvailabilities - Item availability array.\n * @returns -- Returns.\n */\n const isProductInStock = (itemAvailabilities: ItemAvailability[] | undefined): boolean => {\n if (!appConfig.enableStockCheck) {\n return true;\n }\n\n if (ArrayExtensions.hasElements(itemAvailabilities)) {\n return itemAvailabilities[BuyBoxConstants.zero].AvailableQuantity! > BuyBoxConstants.zero;\n }\n\n return false;\n };\n\n await getFullAvailableInventoryNearby(input, props.context.actionContext)\n .catch((error: Error) => {\n props.telemetry.error(error.message);\n })\n .then(response => {\n if (response && ArrayExtensions.hasElements(response)) {\n const isPreferredStore = (value: IFullOrgUnitAvailability) =>\n value.OrgUnitAvailability?.OrgUnitLocation?.OrgUnitNumber === preferredStoreId;\n const filteredFullOrgUnitAvailability = response.filter(isPreferredStore);\n const preferredStoreAvailability = ArrayExtensions.hasElements(filteredFullOrgUnitAvailability)\n ? filteredFullOrgUnitAvailability[BuyBoxConstants.zero]\n : undefined;\n const stockStatusLabel: string | undefined = getStockInventoryLabel(preferredStoreAvailability);\n const isInStock = isProductInStock(preferredStoreAvailability?.OrgUnitAvailability?.ItemAvailabilities);\n const resourceLabel = isInStock ? props.resources.inStockText : props.resources.outOfStockText;\n const stockText: string | undefined = stockStatusLabel ? stockStatusLabel : resourceLabel;\n const preferredStoreAvailabilityText = `${format(\n props.resources.availabilityAtPreferredStoreText,\n preferredStoreName\n )} ${stockText}`;\n setAvailability(preferredStoreAvailabilityText);\n }\n });\n\n setIsStoreChange(false);\n }, [\n props.data.product.result?.RecordId,\n appConfig.enableStockCheck,\n preferredStoreId,\n preferredStoreName,\n props.context.actionContext,\n props.resources.availabilityAtPreferredStoreText,\n props.resources.inStockText,\n props.resources.outOfStockText,\n props.telemetry\n ]);\n\n React.useEffect(() => {\n if (props.config.displayStockAvailability) {\n getInventory().catch((error: Error) => {\n props.telemetry.error(error.message);\n });\n }\n }, [getInventory, isStoreChange, props.telemetry, props.config.displayStockAvailability]);\n\n reaction(\n () => props.data.storeSelectorStateManager.result?.selectedStoreLocationId,\n () => {\n setIsStoreChange(true);\n }\n );\n\n /**\n * RenderAvailabiltyAtPreferredStore.\n * @returns -- Returns.\n */\n const renderAvailabilityAtPreferredStore = (): JSX.Element | undefined => {\n const hasProductDimensions = ArrayExtensions.hasElements(props.data.product.result?.Dimensions);\n if (hasProductDimensions && props.data.product.result?.MasterProductId === undefined) {\n return undefined;\n }\n const containerProps: INodeProps = {\n className: 'ms-buybox__preferred-store-availability',\n tag: 'span'\n };\n\n return {availability};\n };\n return (\n \n {props.mediaGallery}\n \n {catalogs && catalogs[0].Name}\n {title}\n \n
{skuText}
\n {rating}\n
\n \n
{props.resources.priceText}
\n {price}\n
\n {configure && renderConfigure(configure)}\n {keyInPrice && renderKeyInPrice(keyInPrice)}\n \n
\n {quantity &&\n renderQuantity(\n quantity,\n callbacks,\n props,\n state,\n resources,\n quantityLimitsMessages,\n max,\n telemetryContent,\n unitOfMeasure\n )}\n {props.bulkPurchaseLink}\n
\n
\n {props.config.displayStockAvailability && preferredStoreId && renderAvailabilityAtPreferredStore()}\n {inventoryLabel}\n {renderAddToCart(addToCart)}\n {findInStore && renderFindInStore(findInStore)}\n {addToWishlist && renderAddToWishlist(props, state, callbacks)}\n {productComparisonButton}\n {addToOrderTemplate && renderAddToOrderTemplate(props, state, callbacks)}\n {findInStore?.productPickupOptionList ? (\n
{findInStore.productPickupOptionList}
\n ) : null}\n {_renderSocialShare(props.slots && props.slots.socialShare)}\n
{props.resources.shopText}
\n \n {shopSimilarLook && renderShopSimilarItem(shopSimilarLook)}\n {shopSimilarDescription && renderShopSimilarItem(shopSimilarDescription)}\n \n \n
{props.resources.descriptionText}
\n {description}\n
\n {ArrayExtensions.hasElements(props.slots.productSpecification) ? (\n {props.slots.productSpecification[0]}\n ) : null}\n
\n
\n );\n};\n\nexport default BuyboxView;\n","module.exports = React;","module.exports = ReactDOM;"],"names":["sentAnalytics","_renderAddToCart","addToCart","ContainerProps","errorBlock","button","React","Node","Object","assign","_renderAddToOrderTemplate","addToOrderTemplate","_renderAddToWishlist","addToWishlist","_renderConfigure","configure","dropdowns","map","_renderConfigureDropdown","_renderSocialShare","socialShare","length","dropdown","LabelContainerProps","heading","errors","select","_renderFindInStore","findInStore","storeSelector","description","modal","productPickupOptionList","_renderBackOrder","productAvailableQuantity","text","find","avail","IsProductAvailable","RichTextComponent","className","_renderQuantity","quantity","input","_renderKeyInPrice","keyInPrice","_renderShopSimilarItem","shopSimilarItem","_renderSlotItems","items","slot","index","key","props","_data$productSpecific","_data$product","_slots$reviewSnippet","_slots$kitSelector","_slots$kitCustomizer","_slots$installmentCal","ModuleProps","MediaGalleryContainerProps","ProductInfoContainerProps","price","title","rating","inventoryLabel","shopSimilarLook","shopSimilarDescription","unitOfMeasure","productComparisonButton","slots","data","window","product","result","setTimeout","_props$context$reques","productPrice","analyticsProductData","itemID","ItemId","name","Name","discount","DiscountAmount","variant","BasePrice","Price","currency","context","request","channel","Currency","publish","productSpecificationData","productAttributes","convertProductAttributes","productDescriptionOverride","config","descriptionOverride","productDescriptionOverrideText","productData","itemId","skuDisplay","labelResources","sku","productAvail","backorderAvail","unbuyable","attrNames","notBuyable","Module","mediaGallery","reviewSnippet","bulkPurchaseLink","kitSelector","kitCustomizer","backOrderText","blacklistedShippingAreasText","blacklistedShippingAreas","varReplace","areas","installmentCal","subscriptions","eventName","eventData","keys","forEach","subscriber","subscribe","handler","Error","attributeList","output","meta","attribute","DataTypeValue","typeData","getTypeInfo","source","type","convertCartAttributes","TextValue","AttributeDataType","None","DateTime","Decimal","Integer","customerSource","Text","TrueFalse","Video","Image","productType","lineAttributes","kitConfigurator","kitContents","kitFormats","kitElectives","kitSubstitutions","kitLineSubstitutions","kitLineParentAssociation","kitLineChildAssociation","instructors","consultantCartAttribute","isInstallmentEligible","cashForCollege","dropShip","scoringType","studentId","schoolIdPP","testCoordinator","testEnrollment","testType","testFormat","testDate","testDateId","testAdmin","testProctorEmail","testProctorName","testProctorPhone","testProctorTimeZone","userAgreement","umbrellaGroup","gradeLvl","isNotTest","onlineTest","purchaseItemType","billingCountry","billingZipCode","paymentScheduleName","vars","replace","_","match","binding","modules","dataActions","registerSanitizedActionPath","sanitizedActionPath","dataAction","default","prototype","RegistrationId","id","c","require","$type","da","path","runOn","iNM","ns","n","p","pdp","md","__bindings__","_objectSpread","viewDictionary","cn","BaseStoreSelectorStateManager","constructor","listMapViewState","displayList","displayMap","preferredStoreLocalStorageKey","this","isMapModuleLoaded","value","_readFromToCookie","storeInfo","JSON","parse","undefined","preferredStore","_unused","_context","storeId","selectedStoreLocationId","storeName","writeToCookie","arguments","StoreId","StoreName","Latitude","Longitude","_writeToCookie","stringify","latitude","longitude","lastInlineShownStoreInfo","_removeCookie","MsDyn365","isBrowser","localStorage","removeItem","setItem","cookieValue","getItem","__decorate","computed","observable","action","MapStoreSelectorStateManager","SERVICE_ENDPOINT","MAP_API_ENDPOINT","searchTerm","actionContext","requestContext","BingMapsApiKey","BingMapsEnabled","searchContent","jsonp","crypto","getRandomValues","Uint32Array","ChannelCountryRegionISOCode","trim","query","encodeURI","geolocationApiUrl","app","requestUrl","Promise","resolve","script","document","createElement","setAttribute","remove","resourceSets","resources","point","coordinates","body","appendChild","_document","StringExtensions","isNullOrEmpty","getElementById","url","lang","market","reject","_document2","_document3","async","defer","src","mapAPIReady","isMapApiLoaded","addEventListener","error","createStoreSelectorStateInput","GenericInput","getGenericActionDataAction","createObservableDataAction","getGenericAction","inputData","_renderTextBlock","textBlocks","_renderCartAndActions","onChangeHandler","callbacks","newValue","updateQuantity","quantityComponent","state","extentionResources","quantityLimitsMessages","max","telemetryContent","IncrementalQuantity","currentCount","onChange","inputQuantityAriaLabel","decrementButtonAriaLabel","incrementButtonAriaLabel","minQuantityText","maxQuantityText","generateAddToOrderTemplateDialogResources","addToOrderTemplateHeader","noOrderTemplatesMessage","noOrderTemplatesDescription","createAnOrderTemplateButtonText","createNewOrderTemplateButtonText","cancelOrderTemplateCreationButtonText","selectTemplatesText","addToTemplateButtonText","lineItemsText","generateOrderTemplateNameDialogResources","orderTemplateHeaderLabel","createOrderTemplateHeader","orderTemplateTitleLabel","orderTemplateTitle","orderTemplateNameAriaLabel","orderTemplateDescription","createOrderTemplateDescription","defaultOrderTemplateName","orderTemplateButtonLabel","createOrderTemplateButtonText","orderTemplateCancelButtonLabel","cancelNewOrderTemplateCreationButtonText","generateItemAddedToOrderTemplateDialogResources","viewOrderTemplateButtonText","continueShoppingButtonText","itemAddedToOrderTemplateHeaderItemOneText","itemAddedToOrderTemplateHeaderItemFormatText","itemAddedToOrderTemplateHeaderMessageText","freePriceText","priceFree","originalPriceText","currentPriceText","generateDuplicateItemsWhenAddingToOrderTemplateDialogResources","duplicatedProductsHeader","duplicatedProductsDescription","updateQuantityButtonText","cancelDuplicateItemsButtonText","onAddToOrderTemplateFailed","updateErrorState","errorHost","configureErrors","status","getConfigureErrors","missingDimensions","IsGiftCard","BuyBoxConstants","renderAddToOrderTemplate","orderTemplateButton","renderAddToOrderTemplateButton","typeName","orderTemplates","customerInformation","isMultipleCatalogsFeatureEnabled","isChannelMultipleCatalogsFeatureEnabled","AddToOrderTemplateComponent","addToOrderTemplateButtonText","addToOrderTemplateButtonTooltip","addToOrderTemplateDialogResources","createOrderTemplateDialogResources","itemAddedToOrderTemplateDialogResources","duplicateItemsWhenAddingToOrderTemplateDialogResources","onError","shouldShowButtonFailedTooltip","isCustomPriceSelected","showButtonTooltip","showButtonText","imageSettings","isMultipleCatalogFeatureEnabledInHq","catalogId","currentCatalogId","onAddToWishlistFailed","renderAddToWishlist","enableWishlist","wishlistButton","renderAddtoWishlistButton","wishlists","AddToWishlistComponent","addToWishlistButtonText","removeFromWishlistButtonText","addToWishlistMessage","removedFromWishlistMessage","addItemToWishlistError","removeItemFromWishlistError","nameOfWishlist","ariaRole","getSelectedProduct","selectedProduct","renderShopSimilarItem","renderConfigureDropdown","_props$data$product$r","_props$data$storeSele","_props$data$product$r3","appConfig","catalogs","skuText","preferredStoreInfo","storeSelectorStateManager","preferredStoreId","preferredStoreName","availability","setAvailability","isStoreChange","setIsStoreChange","getInventory","_props$data$product$r2","GetFullAvailableInventoryNearbyInput","RecordId","zero","getFullAvailableInventoryNearby","catch","telemetry","message","then","response","ArrayExtensions","hasElements","_preferredStoreAvaila","isPreferredStore","_value$OrgUnitAvailab","OrgUnitAvailability","OrgUnitLocation","OrgUnitNumber","filteredFullOrgUnitAvailability","filter","preferredStoreAvailability","stockStatusLabel","availabilityWithHours","ProductInventoryInformation","productInventoryInformation","_availabilityWithHour","InventoryLocationId","InventLocationId","StockLevelLabel","getStockInventoryLabel","resourceLabel","itemAvailabilities","ItemAvailabilities","enableStockCheck","AvailableQuantity","inStockText","outOfStockText","stockText","preferredStoreAvailabilityText","format","availabilityAtPreferredStoreText","displayStockAvailability","reaction","_props$data$storeSele2","priceText","renderConfigure","renderKeyInPrice","renderQuantity","renderAvailabilityAtPreferredStore","_props$data$product$r4","_props$data$product$r5","Dimensions","MasterProductId","tag","renderAddToCart","renderFindInStore","shopText","descriptionText","productSpecification","module","exports","ReactDOM"],"sourceRoot":""}