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2O,+BAAgC/rB,EAC1G,CAEQqrB,iCAAiCI,GACrC,MAAMzrB,EAAQod,EAAoB4O,gBAAgBP,EAAerO,EAAoB2O,gCACrF,OAAKntC,EAAAA,gBAAgBC,YAAYmhB,GAG1BA,EAFI,EAGf,CAEQqrB,uBAAuBI,EAA+BQ,GAC1D,IAAKA,EACD,OAGJ,IAAKR,EAAcS,iBACf,OAKJ,OAFoBT,EAAcU,IAAoDF,GAEnEt+B,KACvB,CAEQ09B,sBAAsBI,EAA+BQ,EAAmBt+B,GACvEs+B,GAILR,EAAcjB,IAAIyB,EAAWt+B,EAAO,CAAEy+B,QAAQ,EAAMC,OAAQ,QAChE,EAnDwBjP,EAAA2O,+BAAyC","sources":["webpack://Citta2.0/./src/components/price-component.tsx?ed26","webpack://Citta2.0/./src/actions/utilities/utils.ts?cb7c","webpack://Citta2.0/./src/actions/get-selected-variant-v29.ts?793f","webpack://Citta2.0/./src/modules/citta-buybox/components/citta-buybox-find-in-store.tsx?333f","webpack://Citta2.0/./src/modules/citta-buybox/citta-buybox.tsx?0c39","webpack://Citta2.0/./src/modules/citta-buybox/citta-buybox.view.tsx?586e","webpack://Citta2.0/./src/themes/citta/utilities/quantity/Quantity.tsx?4279","webpack://Citta2.0/./src/themes/citta/views/components/layBuyPriceBreakdown.tsx?147b","webpack://Citta2.0/./src/themes/citta/views/buybox.view.tsx?10fd","webpack://Citta2.0/./src/themes/citta/views/components/afterpay_info.tsx?049f","webpack://Citta2.0/./src/themes/citta/views/components/buybox-find-in-store.tsx?ca0e","webpack://Citta2.0/./src/shared-utils/utilities.ts?3b7d","webpack://Citta2.0/./src/components/citta-dropdown/Dropdown.tsx?19db","webpack://Citta2.0/./src/components/citta-dropdown/DropdownItem.tsx?1c51","webpack://Citta2.0/./src/components/citta-dropdown/DropdownMenu.tsx?9d9a","webpack://Citta2.0/./src/components/citta-button/Button.tsx?7e09","webpack://Citta2.0/./src/components/citta-dropdown/DropdownProvider.tsx?b6f4","webpack://Citta2.0/./src/components/citta-dropdown/UncontrolledDropdown.tsx?004c","webpack://Citta2.0/./src/components/citta-dropdown/DropdownToggle.tsx?e5a5","webpack://Citta2.0/./src/components/citta-buybox/utilities.ts?0124","webpack://Citta2.0/./src/components/citta-buybox/rich-select/RichSelect.tsx?e43a","webpack://Citta2.0/./src/components/citta-buybox/dropdown/dropdown.tsx?d495","webpack://Citta2.0/./src/themes/citta/views/components/buybox-product-configure.tsx?ca59","webpack://Citta2.0/./src/themes/citta/views/components/buybox-small-components.tsx?19f8","webpack://Citta2.0/./src/themes/citta/views/components/sidebar.tsx?30ee","webpack://Citta2.0/./src/modules/bulk-purchase/bulk-purchase.tsx?9fd5","webpack://Citta2.0/./src/common/buybox-components.tsx?42b4","webpack://Citta2.0/./src/common/buybox-product-configure.tsx?139c","webpack://Citta2.0/./src/common/buyboxInterface.ts?9d60","webpack://Citta2.0/./src/common/dropdown/dropdown.tsx?f1d3","webpack://Citta2.0/./src/common/dropdown/dropdown.props.ts?7676","webpack://Citta2.0/./src/common/utilities/error-utilities.ts?bb69","webpack://Citta2.0/./src/modules/buybox/components/buybox-find-in-store.tsx?3ef8","webpack://Citta2.0/./src/modules/buybox/buybox.tsx?e22d","webpack://Citta2.0/./src/modules/buybox/buybox.view.tsx?376b","webpack://Citta2.0/./src/modules/quickview/utilities/helper.ts?f31d","webpack://Citta2.0/./src/modules/quickview/utilities/get-valid-product-images.ts?78b7","webpack://Citta2.0/./src/modules/quickview/quickview.tsx?4080","webpack://Citta2.0/./src/modules/quickview/utilities/get-product-details.ts?5cc2","webpack://Citta2.0/./src/modules/quickview/quickview.view.tsx?ee5b","webpack://Citta2.0/./src/modules/recently-viewed/base/recently-viewed-product-item.ts?4982","webpack://Citta2.0/./src/modules/recently-viewed/base/recently-viewed-item.ts?54c9","webpack://Citta2.0/./src/modules/recently-viewed/recently-viewed-state.ts?c73b","webpack://Citta2.0/./src/modules/recently-viewed/recently-viewed-manager.ts?a2a8"],"sourcesContent":["import { __assign } from \"tslib\";\r\nimport { msdyn365Commerce } from '@msdyn365-commerce/core';\r\nimport classnames from 'classnames';\r\nimport * as React from 'react';\r\n\r\nvar PriceComponentActions = {};\r\nvar Price = function (props: any) {\r\n if (props.data.price.CustomerContextualPrice === undefined) {\r\n return null;\r\n }\r\n return (React.createElement(\"span\", { className: classnames('msc-price', props.className) }, showStrikethroughPricing(props) ? renderCurrentPriceWithOriginalPrice(props) : renderCurrentPrice(props)));\r\n};\r\nvar showStrikethroughPricing = function (props: any) {\r\n var originalPrice = getOriginalPrice(props);\r\n if (originalPrice && props.data.price.CustomerContextualPrice) {\r\n return originalPrice > props.data.price.CustomerContextualPrice;\r\n }\r\n return false;\r\n};\r\nvar getOriginalPrice = function (props: any) {\r\n return Math.max(props.data.price.BasePrice || 0, props.data.price.TradeAgreementPrice || 0, props.data.price.AdjustedPrice || 0);\r\n};\r\nvar renderCurrentPrice = function (props: any) {\r\n var initialPrice = formatCurrency(props, props.data.price.CustomerContextualPrice);\r\n return (React.createElement(\"span\", { className: 'msc-price__actual', itemProp: 'price' }, initialPrice));\r\n};\r\nvar formatCurrency = function (props: any, price: any) {\r\n if (price === undefined) {\r\n return undefined;\r\n }\r\n if (price === 0 && props.freePriceText) {\r\n return props.freePriceText;\r\n }\r\n let returnPrice = `$${price}`;\r\n try {\r\n var formatter = new Intl.NumberFormat(props.context.cultureFormatter.locale, {\r\n style: 'currency',\r\n currency: props.context.cultureFormatter.currencyCode,\r\n currencyDisplay: 'narrowSymbol'\r\n });\r\n returnPrice = formatter.format(price)\r\n\r\n } catch {}\r\n return returnPrice;\r\n};\r\nvar renderCurrentPriceWithOriginalPrice = function (props: any) {\r\n var originalPrice = getOriginalPrice(props);\r\n var initialPrice = formatCurrency(props, originalPrice);\r\n return (React.createElement(React.Fragment, null,\r\n React.createElement(\"span\", { className: 'sr-only' },\r\n ' ',\r\n props.originalPriceText,\r\n ' ',\r\n initialPrice,\r\n ' ',\r\n props.currentPriceText,\r\n ' ',\r\n renderCurrentPrice(props)),\r\n React.createElement(\"span\", { className: 'msc-price__strikethrough', \"aria-hidden\": 'true' }, initialPrice),\r\n React.createElement(\"span\", { \"aria-hidden\": 'true' }, renderCurrentPrice(props)),\r\n props.savingsText && React.createElement(\"span\", { className: 'msc-price__savings' }, props.savingsText)));\r\n};\r\n\r\nconst PriceComponent: React.FunctionComponent = msdyn365Commerce.createComponent(\r\n 'Product',\r\n { component: msdyn365Commerce.createComponent('Price', __assign({ component: Price }, PriceComponentActions)) }\r\n);\r\n\r\nexport default PriceComponent","/* tslint:disable */\r\nimport { parseSearchData } from './input-data-parser';\r\nexport const wrapInResolvedAsyncResult = (input: any) => {\r\n return {\r\n status: 'SUCCESS',\r\n result: input,\r\n metadata: {}\r\n };\r\n};\r\nexport const wrapInRejectedAsyncResult = (input: any) => {\r\n return {\r\n status: 'FAILED',\r\n result: input,\r\n metadata: {}\r\n };\r\n};\r\nexport const buildQueryResultSettings = (inputData: any) => {\r\n try {\r\n const searchInputData = parseSearchData(inputData);\r\n const search = searchInputData.q;\r\n if (!search) {\r\n throw new Error('Query string ?q={searchText} is needed for search actions.');\r\n }\r\n const top = (searchInputData.maxItems && Number(searchInputData.maxItems)) || searchInputData.top;\r\n return { Paging: { Top: top, Skip: searchInputData.skip } };\r\n }\r\n catch (e) {\r\n return {};\r\n }\r\n};\r\n/**\r\n * Utility function to extract the active productId in the following priority:\r\n * First query param (productId), then UrlToken (itemId), then module config\r\n * @param inputData The Action Input data\r\n */\r\nexport const getSelectedProductIdFromActionInput = (inputData: any) => {\r\n if (inputData && inputData.requestContext && inputData.requestContext.query && inputData.requestContext.query.productId) {\r\n return inputData.requestContext.query.productId;\r\n }\r\n else if (inputData && inputData.requestContext && inputData.requestContext.urlTokens && inputData.requestContext.urlTokens.itemId) {\r\n return inputData.requestContext.urlTokens.itemId;\r\n }\r\n else if (inputData && inputData.config && inputData.config.productId) {\r\n return inputData.config.productId;\r\n }\r\n return undefined;\r\n};\r\n/**\r\n * Generates a Image URL based on data return from retail server\r\n * @param imageUrl The image url returned by Retail Server\r\n * @param ctx The request context\r\n */\r\nexport const generateImageUrl = (imageUrl: any, apiSettings: any) => {\r\n if (imageUrl) {\r\n // Images hosted in CMS include schema\r\n if (imageUrl.startsWith('http')) {\r\n return imageUrl;\r\n }\r\n // Images hosted in Retail Server must be encoded and joined with the base image url\r\n return apiSettings.baseImageUrl + encodeURIComponent(imageUrl);\r\n }\r\n else {\r\n // d365Commerce.telemetry.warning(`Unable to generate a proper Image URL for Product: ${product.RecordId}`);\r\n return undefined;\r\n }\r\n};\r\n/**\r\n *\r\n * Generates a Image URL for a product based on data return from retail server\r\n * @param product The Product returned by Retail Server\r\n * @param ctx The request context\r\n */\r\nexport const generateProductImageUrl = (product: any, apiSettings: any) => {\r\n return generateImageUrl(product.PrimaryImageUrl, apiSettings);\r\n};\r\n/**\r\n * Creates a CartLine object from the passed data\r\n * @param product The product\r\n * @param quantity The quantity\r\n * @param catalogId The catalog\r\n */\r\nexport const buildCartLine = (product: any, quantity: any, catalogId: any) => {\r\n return {\r\n CatalogId: catalogId || 0,\r\n Description: product.Description,\r\n // TODO: Investigate this value and what it represents\r\n EntryMethodTypeValue: 3,\r\n ItemId: product.ItemId,\r\n ProductId: product.RecordId,\r\n Quantity: quantity || 1,\r\n TrackingId: '',\r\n UnitOfMeasureSymbol: product.DefaultUnitOfMeasure\r\n };\r\n};\r\n/**\r\n * Creates a CommerceListLine (also know as WishlistLine) object from the passed data\r\n * @param productId The RecordId of the Product to be added\r\n * @param customerId The account number of the customer\r\n * @param wishlistId The Id of the commerce list\r\n */\r\nexport const buildWishlistLine = (productId: any, customerId: any, wishlistId: any) => {\r\n return {\r\n CommerceListId: wishlistId,\r\n ProductId: productId,\r\n CustomerId: customerId\r\n };\r\n};\r\n/**\r\n * Utility function to prepare the product details criteria before getting full product:\r\n * @param inputData The Action Input data\r\n */\r\nexport const getProductDetailsCriteriaFromActionInput = (inputData: any) => {\r\n if (inputData && inputData.config) {\r\n return {\r\n getPrice: !inputData.config.hidePrice,\r\n getRating: !inputData.config.hideRating\r\n };\r\n }\r\n return {\r\n getPrice: true,\r\n getRating: true\r\n };\r\n};\r\n/**\r\n * Transforms search text into the expected 'search terms' format, expected by refiner APIs.\r\n * @param searchText free-form text used for searching for products or categories of products\r\n */\r\nexport const ensureSearchTextIsFormedProperly = (searchText: any) => {\r\n const prefix = searchText.startsWith(`'`) ? '' : `'`;\r\n const suffix = searchText.endsWith(`'`) ? '' : `'`;\r\n return `${prefix}${searchText}${suffix}`;\r\n};\r\nexport const ensureSafeSearchText = (searchText: any) => {\r\n return searchText.replace(/[^0-9a-zA-Z\\s]+/g, '');\r\n};\r\nexport const buildCacheKey = (base: any, apiSettings: any, locale: any) => {\r\n return `${base}-chanId:${apiSettings.channelId}-catId:${apiSettings.catalogId}${locale ? `-${locale}` : ''}`;\r\n};\r\nexport const buildCacheKeyWithUrlTokens = (base: any, requestContext: any) => {\r\n const urlTokens = requestContext.urlTokens;\r\n const defaultCacheKey = buildCacheKey(base, requestContext.apiSettings, requestContext.locale);\r\n return urlTokens\r\n ? `${defaultCacheKey}-${urlTokens.itemId}-${urlTokens.recordId}-${urlTokens.pageType}`\r\n : defaultCacheKey;\r\n};\r\nexport const generateKey = (args: any, options: any) => {\r\n // @ts-ignore\r\n const { handler, separator } = { ...{ separator: '-', handler: undefined }, ...(options || {}) };\r\n return args\r\n .map((arg: any) => {\r\n if (arg === null || arg === undefined) {\r\n if (handler) {\r\n return handler(arg);\r\n }\r\n }\r\n return arg;\r\n })\r\n .join(separator);\r\n};\r\n/**\r\n * Gets the fall back image url for a variant image.\r\n * @param itemId Item id of a product.\r\n * @param apiSettings Api setting from request context.\r\n */\r\nexport const getFallbackImageUrl = (itemId: any, apiSettings: any) => {\r\n if (!itemId) {\r\n return '';\r\n }\r\n const productUrl = `Products/${itemId}_000_001.png`;\r\n return generateImageUrl(productUrl, apiSettings);\r\n};\r\n//# sourceMappingURL=utils.js.map","/*--------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * See License.txt in the project root for license information.\r\n *--------------------------------------------------------------*/\r\n\r\nimport { CacheType, createObservableDataAction, IAction, IActionContext, IActionInput, IAny, ICreateActionContext, IGeneric } from '@msdyn365-commerce/core';\r\nimport { BypassCache } from '@msdyn365-commerce/retail-proxy';\r\nimport { getByIdAsync, getVariantsByDimensionValuesAsync } from '@msdyn365-commerce/retail-proxy/dist/DataActions/ProductsDataActions.g';\r\nimport { ProductDimension, SimpleProduct } from '@msdyn365-commerce/retail-proxy/dist/Entities/CommerceTypes.g';\r\n\r\nimport { generateProductImageUrl, getSelectedProductIdFromActionInput } from './utilities/utils';\r\n\r\n/**\r\n * Get selected variant action input class.\r\n */\r\nexport class SelectedVariantInput implements IActionInput {\r\n public productId: number;\r\n\r\n public channelId: number;\r\n\r\n public matchingDimensionValues: ProductDimension[];\r\n\r\n public bypassCache? : BypassCache;\r\n \r\n\r\n constructor(productId: number, channelId: number, matchingDimensionValues?: ProductDimension[], bypassCache? : any) {\r\n this.productId = productId;\r\n this.channelId = channelId;\r\n this.matchingDimensionValues = matchingDimensionValues || [];\r\n this.bypassCache = bypassCache;\r\n }\r\n\r\n public getCacheKey = () => 'SelectedVariant';\r\n\r\n public getCacheObjectType = () => 'SimpleProduct';\r\n\r\n public dataCacheType = (): CacheType => 'none';\r\n}\r\n\r\n/**\r\n * CreateInput method for the getSelectedVariant data action.\r\n * @param inputData The input data passed to the createInput method.\r\n */\r\nconst createInput = (inputData: ICreateActionContext>): SelectedVariantInput => {\r\n const productId = getSelectedProductIdFromActionInput(inputData);\r\n\r\n if (productId) {\r\n return new SelectedVariantInput(+productId, +inputData.requestContext.apiSettings.channelId, []);\r\n }\r\n throw new Error('Unable to create SelectedVariantInput, no productId found on module config or query');\r\n\r\n};\r\n\r\n/**\r\n * Action method for the getSelectedVariant data aciton.\r\n * @param input The action input class.\r\n * @param ctx The action context.\r\n */\r\nasync function getSelectedVariantAction(input: SelectedVariantInput, ctx: IActionContext): Promise {\r\n let product: SimpleProduct | null = null;\r\n\r\n const response = await getByIdAsync({ callerContext: ctx, bypassCache: input.bypassCache }, input.productId, input.channelId);\r\n\r\n const baseProduct: SimpleProduct = Array.isArray(response) ? response[0] : response;\r\n\r\n // Need to dereference this before editing it. Otherwise we might not\r\n // properly get the mobx events because if things aren't properly observable\r\n // they won't fire when you set them, and then if you don't deref the value in\r\n // the cache will match the value when you try to save it, so it won't detect any\r\n // changes there either\r\n product = { ...baseProduct };\r\n\r\n if (product) {\r\n let baseProductHadUnmatchedDimension: boolean = false;\r\n if (product.Dimensions) {\r\n product.Dimensions.map(dimension => {\r\n const matchedTargetDimension = input.matchingDimensionValues.find(\r\n targetDimension => targetDimension.DimensionTypeValue === dimension.DimensionTypeValue\r\n );\r\n\r\n if (matchedTargetDimension) {\r\n dimension.DimensionValue = matchedTargetDimension.DimensionValue;\r\n } else {\r\n baseProductHadUnmatchedDimension = true;\r\n }\r\n });\r\n }\r\n\r\n if (!baseProductHadUnmatchedDimension && input.matchingDimensionValues.length > 0) {\r\n const variants = await getVariantsByDimensionValuesAsync(\r\n { callerContext: ctx, bypassCache: input.bypassCache, queryResultSettings: {} },\r\n baseProduct.RecordId,\r\n input.channelId,\r\n input.matchingDimensionValues\r\n );\r\n\r\n if (variants && variants.length > 0) {\r\n product = variants[0];\r\n }\r\n }\r\n\r\n const newImageUrl = generateProductImageUrl(product, ctx.requestContext.apiSettings);\r\n\r\n if (newImageUrl) {\r\n product.PrimaryImageUrl = newImageUrl;\r\n }\r\n }\r\n\r\n return product;\r\n}\r\n\r\n/**\r\n * The complete getSelectedVariant data action.\r\n */\r\nexport const getSelectedVariantActionDataAction = createObservableDataAction({\r\n id: '@msdyn365-commerce-modules/retail-actions/get-selected-variant-v29',\r\n action: >getSelectedVariantAction,\r\n input: createInput\r\n});\r\n\r\nexport default getSelectedVariantActionDataAction;\r\n","/*!\r\n * Copyright (c) Microsoft Corporation.\r\n * All rights reserved. See LICENSE in the project root for license information.\r\n */\r\n\r\n/* eslint-disable no-duplicate-imports */\r\nimport {\r\n AddToCartBehavior,\r\n IAddToCartFailureResult,\r\n IAddToCartResources,\r\n ItemSuccessfullyAddedToCartNotification,\r\n PriceComponent\r\n} from '@msdyn365-commerce/components';\r\nimport { getUrlSync, ICoreContext, IImageSettings } from '@msdyn365-commerce/core';\r\nimport { ICartActionResult } from '@msdyn365-commerce/global-state';\r\nimport { DeliveryOption, FeatureState, OrgUnitLocation, ProductAvailableQuantity, ProductDimension } from '@msdyn365-commerce/retail-proxy';\r\nimport { NotificationsManager } from '@msdyn365-commerce-modules/notifications-core';\r\nimport {\r\n ArrayExtensions,\r\n DeliveryMode,\r\n IProductInventoryInformation,\r\n isAggregatedInventory\r\n} from '@msdyn365-commerce-modules/retail-actions';\r\nimport { getTelemetryObject, Heading, INodeProps, IPopupProps, Popup } from '@msdyn365-commerce-modules/utilities';\r\nimport * as React from 'react';\r\n\r\nimport { BuyboxErrorBlock } from '@msdyn365-commerce-modules/buybox';\r\nimport { IBuyboxCallbacks, IBuyboxState } from '@msdyn365-commerce-modules/buybox';\r\nimport { getConfigureErrors, getGenericError } from '@msdyn365-commerce-modules/buybox';\r\nimport { ICittaBuyboxData } from '../citta-buybox.data';\r\nimport { ICittaBuyboxProps, ICittaBuyboxResources } from '../citta-buybox.props.autogenerated';\r\n\r\nconst modalCloseButtonReference: React.RefObject = React.createRef();\r\n\r\n/**\r\n * FindinStore failure Interface.\r\n */\r\nexport interface IFindInStoreFailureResult {\r\n missingDimensions?: ProductDimension[];\r\n}\r\n\r\n/**\r\n * BuyBoxFindinStore View Props Interface.\r\n */\r\nexport interface IBuyboxFindInStoreViewProps {\r\n storeSelector?: React.ReactNode;\r\n heading?: React.ReactNode;\r\n description?: React.ReactNode;\r\n errors?: React.ReactNode;\r\n button?: React.ReactNode;\r\n productPickupOptionList?: React.ReactNode;\r\n\r\n modal?: React.ReactNode;\r\n\r\n ContainerProps: INodeProps;\r\n\r\n openFindInStoreDialog(): Promise;\r\n}\r\n\r\n/**\r\n * On click find store handler.\r\n * @param props -Buybox data.\r\n * @param state -Buybox state.\r\n * @param callbacks -Buybox callbacks.\r\n * @returns Find in store.\r\n */\r\nconst onClickFindInStoreHandler = (props: ICittaBuyboxProps, state: IBuyboxState, callbacks: IBuyboxCallbacks) => async () => {\r\n await findInStoreOnClick(props, state, callbacks);\r\n};\r\n\r\n/**\r\n * Inventory settings based on the inventory policy for aggregated availability.\r\n */\r\ninterface IInventorySettingsProps {\r\n isSectionDisabled: boolean;\r\n description: string;\r\n buttonText: string;\r\n}\r\n\r\n/**\r\n * The function defines the settings values for a given inventory configuration.\r\n * @param context - The context.\r\n * @param isStockCheck - Flag to enable inventory validation.\r\n * @param productAvailability - The product inventory information.\r\n * @param buyboxResources - The buybox string resources.\r\n * @param isLoading - Is loading.\r\n * @returns Boolean.\r\n */\r\nfunction getFindInStoreInventorySettings(\r\n context: ICoreContext,\r\n isStockCheck: boolean,\r\n productAvailability: IProductInventoryInformation[] | undefined,\r\n buyboxResources: ICittaBuyboxResources,\r\n isLoading?: boolean\r\n): IInventorySettingsProps {\r\n // If shouldValidateAggregation is true then is required to check for the product inventory, based on this the messaging will change\r\n // and the find in store button will be ensbled or disabled\r\n\r\n let isSectionDisabled: boolean;\r\n let buttonText;\r\n let description: string;\r\n\r\n let pickupInventory: IProductInventoryInformation | undefined;\r\n\r\n if (!isStockCheck || isLoading) {\r\n return {\r\n isSectionDisabled: false,\r\n buttonText: buyboxResources.findInStoreLinkText,\r\n description: buyboxResources.findInStoreDescriptionText\r\n };\r\n }\r\n\r\n if (productAvailability) {\r\n pickupInventory = productAvailability.find(pickup => pickup.deliveryType === DeliveryMode.pickup);\r\n }\r\n\r\n // If aggregated is enabled, then we need to validate the inventor check for find in store.\r\n // If an individual is selected, then we will always show a find in store button.\r\n if (isAggregatedInventory(context.actionContext)) {\r\n if (productAvailability && pickupInventory?.IsProductAvailable) {\r\n isSectionDisabled = false;\r\n buttonText = buyboxResources.findInStoreLinkText;\r\n description = buyboxResources.findInStoreDescriptionText;\r\n } else {\r\n isSectionDisabled = true;\r\n buttonText = buyboxResources.findInStoreNotAvailableTextButton;\r\n description = buyboxResources.findInStoreNotAvailableDescription;\r\n }\r\n } else {\r\n isSectionDisabled = false;\r\n buttonText = buyboxResources.findInStoreLinkText;\r\n description = buyboxResources.findInStoreDescriptionText;\r\n }\r\n\r\n return {\r\n isSectionDisabled,\r\n description,\r\n buttonText\r\n };\r\n}\r\n\r\n/**\r\n * Method to check if we have atleast one common delivery code between product and channel.\r\n * @param productdeliveryOptions - Product DeliveryOption List.\r\n * @param storePickUpOptionList - Channel DeliveryOption List.\r\n * @returns Boolean flag.\r\n */\r\nconst matchDeliveryOptions = (\r\n productdeliveryOptions: DeliveryOption[] | undefined,\r\n storePickUpOptionList: string[] | undefined\r\n): boolean => {\r\n const deliveryOption: string[] = [];\r\n productdeliveryOptions?.map(delivery => {\r\n const pickup = storePickUpOptionList?.find(deliveryCode => deliveryCode === delivery.Code);\r\n if (pickup) {\r\n deliveryOption.push(pickup);\r\n }\r\n return deliveryOption;\r\n });\r\n\r\n return ArrayExtensions.hasElements(deliveryOption);\r\n};\r\n\r\nexport function getBuyboxFindInStore(\r\n props: ICittaBuyboxProps,\r\n state: IBuyboxState,\r\n callbacks: IBuyboxCallbacks\r\n): IBuyboxFindInStoreViewProps | undefined {\r\n const {\r\n data,\r\n slots: { storeSelector },\r\n resources: {\r\n priceFree,\r\n originalPriceText,\r\n currentPriceText,\r\n findInStoreHeaderText,\r\n buyBoxGoToCartText,\r\n buyBoxContinueShoppingText,\r\n closeNotificationLabel,\r\n buyBoxSingleItemText,\r\n buyBoxMultiLineItemFormatText,\r\n buyBoxHeaderMessageText,\r\n descriptionTextToShowAllPickupOptions\r\n },\r\n context: {\r\n request: { channel: { PickupDeliveryModeCode } = { PickupDeliveryModeCode: undefined } }\r\n }\r\n } = props;\r\n\r\n const multiplePickupStoreSwitchName = 'Dynamics.AX.Application.RetailMultiplePickupDeliveryModeFeature';\r\n const product = data?.product?.result;\r\n const price = data?.productPrice?.result;\r\n const cart = data?.cart?.result;\r\n const deliveryOptions = data?.deliveryOptions?.result;\r\n const productAvailability = data.productAvailableQuantity?.result;\r\n const retailMulitplePickupMFeatureState = data?.featureState?.result?.find(\r\n (featureState: FeatureState) => featureState.Name === multiplePickupStoreSwitchName\r\n )?.IsEnabled;\r\n const channelDeliveryOptionConfig = data?.channelDeliveryOptionConfig?.result;\r\n\r\n const missingDimensions = product?.Dimensions?.filter(dimension => !dimension.DimensionValue?.Value);\r\n\r\n const {\r\n errorState: { configureErrors, quantityError, otherError, errorHost },\r\n modalOpen,\r\n quantity\r\n } = state;\r\n\r\n const { isSectionDisabled, buttonText, description } = getFindInStoreInventorySettings(\r\n props.context,\r\n props.context.app.config.enableStockCheck,\r\n productAvailability,\r\n props.resources,\r\n props.data.productAvailableQuantity.status === 'LOADING' || ArrayExtensions.hasElements(missingDimensions)\r\n );\r\n\r\n if (!product || !ArrayExtensions.hasElements(storeSelector)) {\r\n return undefined;\r\n }\r\n\r\n if (!deliveryOptions || !deliveryOptions.DeliveryOptions) {\r\n return undefined;\r\n }\r\n\r\n // If no delivery options present on the product, or none of the delivery options\r\n // match the PickupDeliveryModeCode, that means the item cannot be used for BOPIS\r\n if (retailMulitplePickupMFeatureState && channelDeliveryOptionConfig) {\r\n if (!matchDeliveryOptions(deliveryOptions.DeliveryOptions, channelDeliveryOptionConfig?.PickupDeliveryModeCodes)) {\r\n return undefined;\r\n }\r\n } else if (\r\n !PickupDeliveryModeCode ||\r\n !deliveryOptions.DeliveryOptions.find((option: DeliveryOption) => option.Code === PickupDeliveryModeCode)\r\n ) {\r\n return undefined;\r\n }\r\n\r\n const dialogStrings = {\r\n goToCartText: buyBoxGoToCartText,\r\n continueShoppingText: buyBoxContinueShoppingText,\r\n closeNotificationLabel,\r\n headerItemOneText: buyBoxSingleItemText,\r\n headerItemFormatText: buyBoxMultiLineItemFormatText,\r\n headerMessageText: buyBoxHeaderMessageText,\r\n freePriceText: priceFree,\r\n originalPriceText,\r\n currentPriceText\r\n };\r\n\r\n const priceComponent = price ? (\r\n \r\n ) : (\r\n ''\r\n );\r\n\r\n const defaultImageSettings: IImageSettings = {\r\n viewports: {\r\n xs: { q: 'w=240&h=240&m=6', w: 0, h: 0 },\r\n lg: { q: 'w=240&h=240&m=6', w: 0, h: 0 },\r\n xl: { q: 'w=240&h=240&m=6', w: 0, h: 0 }\r\n },\r\n lazyload: true\r\n };\r\n\r\n const popupProps: IPopupProps = {\r\n context: props.context,\r\n className: 'ms-buybox',\r\n id: props.id,\r\n typeName: props.typeName,\r\n data: { product: props.data.product?.result, price: props.data.productPrice?.result },\r\n dialogStrings,\r\n imageSettings: defaultImageSettings,\r\n gridSettings: props.context.request.gridSettings,\r\n productQuantity: quantity,\r\n priceComponent,\r\n navigationUrl: getUrlSync('cart', props.context.actionContext),\r\n modalOpen,\r\n setModalOpen: callbacks.changeModalOpen\r\n };\r\n const renderModalPopup = ;\r\n\r\n return {\r\n ContainerProps: {\r\n className: 'ms-buybox__find-in-store'\r\n },\r\n\r\n storeSelector: storeSelector[0],\r\n\r\n openFindInStoreDialog: onClickFindInStoreHandler(props, state, callbacks),\r\n\r\n heading: ,\r\n\r\n description:

{description}

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

{descriptionTextToShowAllPickupOptions}

\r\n
    \r\n {deliveryOptions.DeliveryOptions.map((item: DeliveryOption) => {\r\n return (\r\n
  • \r\n {item.Description}\r\n
  • \r\n );\r\n })}\r\n
\r\n \r\n ) : null,\r\n errors: (\r\n \r\n ),\r\n\r\n button: (\r\n \r\n {buttonText}\r\n \r\n ),\r\n\r\n modal: renderModalPopup\r\n };\r\n}\r\n\r\n/**\r\n * Handler for find in store button.\r\n * @param props - BuyBox data.\r\n * @param state - BuyBox state.\r\n * @param callbacks - BuyBox callbacks.\r\n * @returns - Promise.\r\n */\r\nasync function findInStoreOnClick(props: ICittaBuyboxProps, state: IBuyboxState, callbacks: IBuyboxCallbacks): Promise {\r\n const {\r\n data: {\r\n storeSelectorStateManager: { result: storeSelectorStateManager },\r\n cart: { result: cart },\r\n productAvailableQuantity: { result: productAvailableQuantity }\r\n },\r\n resources,\r\n context,\r\n modules\r\n } = props;\r\n\r\n const { selectedProduct, quantity } = state;\r\n\r\n let dataProduct = props.data.product.result;\r\n const multiplePickupStoreSwitchName = 'Dynamics.AX.Application.RetailMultiplePickupDeliveryModeFeature';\r\n const retailMulitplePickupMFeatureState = props.data?.featureState?.result?.find(\r\n (featureState: FeatureState) => featureState.Name === multiplePickupStoreSwitchName\r\n )?.IsEnabled;\r\n\r\n if (selectedProduct) {\r\n dataProduct = (await selectedProduct) || dataProduct;\r\n }\r\n\r\n if (!dataProduct || !storeSelectorStateManager) {\r\n return;\r\n }\r\n\r\n const product = dataProduct;\r\n\r\n const missingDimensions =\r\n product.Dimensions &&\r\n product.Dimensions.filter((dimension: ProductDimension) => !(dimension.DimensionValue && dimension.DimensionValue.Value));\r\n\r\n let storeSelectorId: string = '';\r\n if (modules && Object.keys(modules).length > 0 && modules.storeSelector && modules.storeSelector.length > 0) {\r\n storeSelectorId = modules.storeSelector[0].id;\r\n }\r\n\r\n if (missingDimensions && missingDimensions.length > 0) {\r\n if (callbacks.updateErrorState) {\r\n callbacks.updateErrorState({\r\n errorHost: 'FINDINSTORE',\r\n configureErrors: getConfigureErrors(missingDimensions, resources)\r\n });\r\n }\r\n } else {\r\n storeSelectorStateManager\r\n .openDialog({\r\n product,\r\n id: storeSelectorId,\r\n parentElementRef: modalCloseButtonReference,\r\n deliveryOptions: retailMulitplePickupMFeatureState ? props.data.deliveryOptions.result : undefined,\r\n onLocationSelected: async (orgUnitLocation: OrgUnitLocation, deliveryMode: string) => {\r\n if (!cart) {\r\n return Promise.resolve();\r\n }\r\n\r\n const behavior = props.context?.app?.config?.addToCartBehavior;\r\n\r\n return cart\r\n .addProductToCart({ product, count: quantity, location: orgUnitLocation, deliveryMode })\r\n .then((result: ICartActionResult) => {\r\n if (result.status === 'FAILED' && result.substatus === 'MAXQUANTITY') {\r\n callbacks.changeModalOpen(false);\r\n let productAvailability: ProductAvailableQuantity | undefined;\r\n if (state.productAvailableQuantity) {\r\n productAvailability = state.productAvailableQuantity.ProductAvailableQuantity;\r\n } else if (productAvailableQuantity && ArrayExtensions.hasElements(productAvailableQuantity)) {\r\n const shippingInventory = productAvailableQuantity.find(\r\n shipping => shipping.deliveryType === DeliveryMode.pickup\r\n );\r\n productAvailability = shippingInventory?.ProductAvailableQuantity;\r\n } else {\r\n productAvailability = undefined;\r\n }\r\n const failureResult: IAddToCartFailureResult = {\r\n failureReason: 'CARTACTIONFAILED',\r\n cartActionResult: { status: result.status, substatus: result.substatus }\r\n };\r\n callbacks.updateErrorState({\r\n errorHost: 'ADDTOCART',\r\n configureErrors: {},\r\n otherError: getGenericError(\r\n failureResult,\r\n cart,\r\n resources,\r\n context,\r\n product,\r\n productAvailability,\r\n orgUnitLocation\r\n )\r\n });\r\n } else {\r\n callbacks.updateErrorState({\r\n configureErrors: {}\r\n });\r\n const navigationUrl = getUrlSync('cart', context.actionContext);\r\n if (behavior === undefined || behavior === AddToCartBehavior.goToCart) {\r\n if (result.status === 'SUCCESS' && navigationUrl) {\r\n window.location.assign(navigationUrl);\r\n }\r\n } else if (behavior === AddToCartBehavior.showModal) {\r\n callbacks.changeModalOpen(true);\r\n } else if (behavior === AddToCartBehavior.showNotification) {\r\n const defaultImageSettings: IImageSettings = {\r\n viewports: {\r\n xs: { q: 'w=240&h=240&m=6', w: 0, h: 0 },\r\n lg: { q: 'w=240&h=240&m=6', w: 0, h: 0 },\r\n xl: { q: 'w=240&h=240&m=6', w: 0, h: 0 }\r\n },\r\n lazyload: true\r\n };\r\n const telemetryContent = getTelemetryObject(\r\n props.context.request.telemetryPageName!,\r\n props.friendlyName,\r\n props.telemetry\r\n );\r\n const dialogStrings: IAddToCartResources = {\r\n goToCartText: resources.buyBoxGoToCartText,\r\n continueShoppingText: resources.buyBoxContinueShoppingText,\r\n closeNotificationLabel: resources.closeNotificationLabel,\r\n headerItemOneText: resources.buyBoxSingleItemText,\r\n headerItemFormatText: resources.buyBoxMultiLineItemFormatText,\r\n headerMessageText: resources.buyBoxHeaderMessageText,\r\n freePriceText: resources.priceFree,\r\n originalPriceText: resources.originalPriceText,\r\n currentPriceText: resources.currentPriceText,\r\n addedQuantityText: resources.addedQuantityText\r\n };\r\n const notification = new ItemSuccessfullyAddedToCartNotification(\r\n props.context,\r\n dialogStrings,\r\n defaultImageSettings,\r\n props.context.request.gridSettings,\r\n product,\r\n props.data.productPrice?.result,\r\n quantity,\r\n navigationUrl,\r\n telemetryContent,\r\n props.id,\r\n props.typeName\r\n );\r\n NotificationsManager.instance().addNotification(notification);\r\n }\r\n }\r\n })\r\n .catch((error: Error) => {\r\n if (props.telemetry) {\r\n props.telemetry.exception(error);\r\n props.telemetry.debug('Unable to add product to cart');\r\n }\r\n });\r\n }\r\n })\r\n .catch((error: Error) => {\r\n if (props.telemetry) {\r\n props.telemetry.error(error.message);\r\n props.telemetry.debug('Unable to find in store');\r\n }\r\n });\r\n }\r\n}\r\n","/*!\r\n * Copyright (c) Microsoft Corporation.\r\n * All rights reserved. See LICENSE in the project root for license information.\r\n */\r\n\r\n/* eslint-disable no-duplicate-imports */\r\nimport { ProductDimensionFull } from '@msdyn365-commerce/commerce-entities';\r\nimport { getCatalogId, ICoreContext, msdyn365Commerce } from '@msdyn365-commerce/core-internal';\r\nimport {\r\n ProductDeliveryOptions,\r\n ProductDimensionValue,\r\n ProductDimensionValueInventoryAvailability,\r\n ProductPrice,\r\n ReleasedProductType,\r\n SimpleProduct\r\n} from '@msdyn365-commerce/retail-proxy';\r\n\r\nimport { BulkPurchase } from '@msdyn365-commerce-modules/bulk-purchase';\r\nimport {\r\n ArrayExtensions,\r\n DeliveryMode,\r\n FinitePromiseQueue,\r\n FinitePromiseQueueError,\r\n getDeliveryOptionsForSelectedVariant,\r\n GetDeliveryOptionsForSelectedVariantInput,\r\n getDimensionsForSelectedVariant,\r\n GetDimensionsForSelectedVariantInput,\r\n getInventoryLevelCodeFromDimensionValue,\r\n getPriceForSelectedVariant,\r\n getProductAvailabilitiesForSelectedVariant,\r\n IDimensionsApp,\r\n InventoryLevelValues,\r\n IProductInventoryInformation,\r\n IPromiseQueue,\r\n PriceForSelectedVariantInput,\r\n ProductAvailabilitiesForSelectedVariantInput,\r\n SelectedVariantInput\r\n} from '@msdyn365-commerce-modules/retail-actions';\r\n\r\nimport getSelectedVariantV29 from '../../actions/get-selected-variant-v29'\r\nimport { Button, getTelemetryObject, IModuleProps, INodeProps, ITelemetryContent } from '@msdyn365-commerce-modules/utilities';\r\nimport classnames from 'classnames';\r\nimport * as React from 'react';\r\n\r\nimport {\r\n getBuyboxAddToCart,\r\n getBuyBoxInventoryLabel,\r\n getBuyboxKeyInPrice,\r\n getBuyboxProductAddToOrderTemplate,\r\n getBuyboxProductAddToWishlist,\r\n getBuyboxProductComparisonButton,\r\n getBuyboxProductDescription,\r\n getBuyboxProductPrice,\r\n getBuyboxProductQuantity,\r\n getBuyboxProductRating,\r\n getBuyboxProductTitle,\r\n getBuyboxProductUnitOfMeasure,\r\n getBuyboxShopSimilarButton,\r\n getQuantityLimitsMessages,\r\n RetailDefaultOrderQuantityLimitsFeatureName\r\n} from '@msdyn365-commerce-modules/buybox';\r\nimport { getBuyboxProductConfigure } from '@msdyn365-commerce-modules/buybox';\r\nimport {\r\n IBuyboxAddToCartViewProps,\r\n IBuyboxAddToOrderTemplateViewProps,\r\n IBuyboxAddToWishlistViewProps,\r\n IBuyboxCallbacks,\r\n IBuyboxCommonData,\r\n IBuyboxExtentedProps,\r\n IBuyboxKeyInPriceViewProps,\r\n IBuyboxProductConfigureViewProps,\r\n IBuyboxProductQuantityViewProps,\r\n IBuyboxShopSimilarLookViewProps,\r\n IBuyboxState,\r\n IErrorState,\r\n ShopSimiliarButtonType\r\n} from '@msdyn365-commerce-modules/buybox';\r\nimport { ICittaBuyboxData } from './citta-buybox.data';\r\nimport { ICittaBuyboxProps, ICittaBuyboxResources } from './citta-buybox.props.autogenerated';\r\nimport { getBuyboxFindInStore, IBuyboxFindInStoreViewProps } from './components/citta-buybox-find-in-store';\r\n\r\nexport interface IBuyboxViewProps extends ICittaBuyboxProps {\r\n state: IBuyboxState;\r\n ModuleProps: IModuleProps;\r\n ProductInfoContainerProps: INodeProps;\r\n MediaGalleryContainerProps: INodeProps;\r\n callbacks: IBuyboxCallbacks;\r\n mediaGallery?: React.ReactNode;\r\n title?: React.ReactNode;\r\n description?: React.ReactNode;\r\n rating?: React.ReactNode;\r\n price?: React.ReactNode;\r\n productComparisonButton?: React.ReactNode;\r\n bulkPurchaseLink?: React.ReactNode;\r\n addToOrderTemplate?: IBuyboxAddToOrderTemplateViewProps;\r\n addToWishlist?: IBuyboxAddToWishlistViewProps;\r\n max: number | undefined;\r\n addToCart: IBuyboxAddToCartViewProps;\r\n findInStore?: IBuyboxFindInStoreViewProps;\r\n quantity?: IBuyboxProductQuantityViewProps;\r\n configure?: IBuyboxProductConfigureViewProps;\r\n inventoryLabel?: React.ReactNode;\r\n stock?:React.ReactNode;\r\n shopSimilarLook?: IBuyboxShopSimilarLookViewProps;\r\n shopSimilarDescription?: IBuyboxShopSimilarLookViewProps;\r\n quantityLimitsMessages: React.ReactNode;\r\n telemetryContent?: ITelemetryContent;\r\n keyInPrice?: IBuyboxKeyInPriceViewProps;\r\n unitOfMeasure?: React.ReactNode;\r\n}\r\n\r\n/**\r\n * Buybox Module.\r\n */\r\nclass Buybox extends React.PureComponent, IBuyboxState> {\r\n /**\r\n * A queue of tasks of processing the changes in the dimensions.\r\n * Limit to two processes:\r\n * 1 - for the current process, which is under execution at the moment.\r\n * 2 - next process, which will process the latest version of data.\r\n * @remark Enqueueing new promises will discard the previous ones (except the one which is under processing).\r\n */\r\n private readonly dimensionUpdateQueue: IPromiseQueue = new FinitePromiseQueue(2);\r\n\r\n private dimensions: { [id: number]: string } = {};\r\n\r\n private readonly buyboxCallbacks: IBuyboxCallbacks = {\r\n updateQuantity: (newQuantity: number): boolean => {\r\n const errorState = { ...this.state.errorState };\r\n errorState.quantityError = undefined;\r\n errorState.otherError = undefined;\r\n\r\n this.setState({ quantity: newQuantity, errorState });\r\n return true;\r\n },\r\n updateErrorState: (newErrorState: IErrorState): void => {\r\n this.setState({ errorState: newErrorState });\r\n },\r\n updateSelectedProduct: (\r\n newSelectedProduct: Promise,\r\n newInventory: IProductInventoryInformation | undefined,\r\n newPrice: ProductPrice | undefined,\r\n newDeliveryOptions: ProductDeliveryOptions | undefined\r\n ): void => {\r\n this.setState({\r\n selectedProduct: newSelectedProduct,\r\n productAvailableQuantity: newInventory,\r\n productDeliveryOptions: newDeliveryOptions\r\n });\r\n this._updatePrice(newPrice);\r\n },\r\n dimensionSelectedAsync: async (selectedDimensionId: number, selectedDimensionValueId: string): Promise => {\r\n this.dimensions[selectedDimensionId] = selectedDimensionValueId;\r\n return this.dimensionUpdateQueue\r\n .enqueue(async () => {\r\n return this._updateDimensions();\r\n })\r\n .catch((error: unknown) => {\r\n // Ignore discarded processes.\r\n if (error !== FinitePromiseQueueError.ProcessWasDiscardedFromTheQueue) {\r\n throw error;\r\n }\r\n });\r\n },\r\n getDropdownName: (dimensionType: number, resources: ICittaBuyboxResources): string => {\r\n return this._getDropdownName(dimensionType, resources);\r\n },\r\n changeModalOpen: (isModalOpen: boolean): void => {\r\n this.setState({ modalOpen: isModalOpen });\r\n },\r\n changeUpdatingDimension: (isUpdatingDimension: boolean): void => {\r\n this.setState({ isUpdatingDimension });\r\n },\r\n\r\n /**\r\n * Update isUpdatingDeliveryOptions state.\r\n *\r\n * @param isUpdatingDeliveryOptions - The status of updating delivery options.\r\n */\r\n changeUpdatingDeliveryOptions: (isUpdatingDeliveryOptions: boolean): void => {\r\n this.setState({ isUpdatingDeliveryOptions });\r\n },\r\n\r\n updateKeyInPrice: (customPrice: number): void => {\r\n // Remove custom amount error when updating the custom price\r\n const errorState = { ...this.state.errorState };\r\n errorState.customAmountError = undefined;\r\n\r\n this.setState({ isPriceKeyedIn: true, keyInPriceAmount: customPrice, errorState });\r\n this._updatePrice(this.state.productPrice, customPrice);\r\n }\r\n };\r\n\r\n private readonly telemetryContent: ITelemetryContent;\r\n\r\n public constructor(props: ICittaBuyboxProps, state: IBuyboxState) {\r\n super(props);\r\n const isB2B = props.context?.request?.app?.platform?.enableDefaultOrderQuantityLimits === 'b2b';\r\n const eoqCount = isB2B ? props.data?.product?.result?.Behavior?.MultipleOfQuantity : 1;\r\n this.state = {\r\n errorState: {\r\n configureErrors: {}\r\n },\r\n quantity: eoqCount || 1,\r\n min: undefined,\r\n max: undefined,\r\n selectedProduct: undefined,\r\n productPrice: undefined,\r\n productDeliveryOptions: undefined,\r\n\r\n modalOpen: false,\r\n isUpdatingDimension: false,\r\n isUpdatingDeliveryOptions: false\r\n };\r\n this.telemetryContent = getTelemetryObject(props.context.request.telemetryPageName!, props.friendlyName, props.telemetry);\r\n }\r\n\r\n public async componentDidMount(): Promise {\r\n const {\r\n data: {\r\n product: { result: product },\r\n productPrice\r\n }\r\n } = this.props;\r\n\r\n productPrice.then(async result => {\r\n this._updatePrice(result);\r\n });\r\n\r\n if (product) {\r\n // Check if the product is service or not by product type\r\n if (product.ItemTypeValue === ReleasedProductType.Service) {\r\n this.setState({ isServiceItem: true });\r\n }\r\n await this._updateQuantitiesInState(product);\r\n }\r\n }\r\n\r\n public render(): JSX.Element | null {\r\n const {\r\n slots: { mediaGallery, productComparisonButton },\r\n data: {\r\n product: { result: product }\r\n },\r\n config: { className = '' }\r\n } = this.props;\r\n\r\n const { max } = this.state;\r\n\r\n if (!product) {\r\n this.props.context.telemetry.error('Product content is empty, module wont render');\r\n return null;\r\n }\r\n\r\n const props = this.props as IBuyboxExtentedProps;\r\n const defaultMinimumKeyInPrice = 10;\r\n const defaultMaximumKeyInPrice = 100;\r\n\r\n const context = this.props.context as ICoreContext;\r\n const inventoryLevel = context.app.config.inventoryLevel;\r\n const dimensionValuesWithInventory = ArrayExtensions.flatten(\r\n ArrayExtensions.validValues(this.props.data.productDimensions.result?.map(value => value.dimensionValuesWithInventory))\r\n );\r\n const hasAvailableProducts =\r\n !ArrayExtensions.hasElements(dimensionValuesWithInventory) ||\r\n dimensionValuesWithInventory.some((value: unknown) => {\r\n const inventoryLevelCode = getInventoryLevelCodeFromDimensionValue(\r\n value as ProductDimensionValueInventoryAvailability,\r\n inventoryLevel\r\n );\r\n return inventoryLevelCode !== InventoryLevelValues.outOfStock;\r\n });\r\n\r\n const viewProps: IBuyboxViewProps = {\r\n ...(this.props as ICittaBuyboxProps),\r\n state: this.state,\r\n mediaGallery: mediaGallery && mediaGallery.length > 0 ? mediaGallery[0] : undefined,\r\n ModuleProps: {\r\n moduleProps: this.props,\r\n className: classnames('ms-buybox', className)\r\n },\r\n ProductInfoContainerProps: {\r\n className: 'ms-buybox__content'\r\n },\r\n MediaGalleryContainerProps: {\r\n className: 'ms-buybox__media-gallery'\r\n },\r\n telemetryContent: this.telemetryContent,\r\n callbacks: this.buyboxCallbacks,\r\n title: getBuyboxProductTitle(props),\r\n description: getBuyboxProductDescription(props),\r\n bulkPurchaseLink: this._renderBuyboxBulkPurchaseLink(),\r\n unitOfMeasure: getBuyboxProductUnitOfMeasure(props),\r\n configure: getBuyboxProductConfigure(props, this.state, this.buyboxCallbacks),\r\n findInStore: getBuyboxFindInStore(this.props, this.state, this.buyboxCallbacks),\r\n price: getBuyboxProductPrice(props, this.state),\r\n addToCart: getBuyboxAddToCart(\r\n props,\r\n this.state,\r\n this.buyboxCallbacks,\r\n defaultMinimumKeyInPrice,\r\n defaultMaximumKeyInPrice,\r\n undefined,\r\n hasAvailableProducts\r\n ),\r\n productComparisonButton: ArrayExtensions.hasElements(productComparisonButton)\r\n ? getBuyboxProductComparisonButton(\r\n productComparisonButton[0],\r\n product,\r\n getCatalogId(this.props.context.request),\r\n this.state\r\n )\r\n : undefined,\r\n addToOrderTemplate: getBuyboxProductAddToOrderTemplate(props, this.state, this.buyboxCallbacks),\r\n addToWishlist: getBuyboxProductAddToWishlist(props, this.state, this.buyboxCallbacks),\r\n rating: !props.context.app.config.hideRating && getBuyboxProductRating(props),\r\n quantity: product.IsGiftCard ? undefined : getBuyboxProductQuantity(props, this.state, this.buyboxCallbacks),\r\n inventoryLabel: getBuyBoxInventoryLabel(props),\r\n stock: this._getBuyBoxStock(),\r\n shopSimilarLook:\r\n this.props.config.enableShopSimilarLooks && !product.IsGiftCard\r\n ? getBuyboxShopSimilarButton(props, ShopSimiliarButtonType.Looks)\r\n : undefined,\r\n shopSimilarDescription:\r\n this.props.config.enableShopSimilarDescription && !product.IsGiftCard\r\n ? getBuyboxShopSimilarButton(props, ShopSimiliarButtonType.Description)\r\n : undefined,\r\n keyInPrice:\r\n this.props.config.enableKeyInPrice && this.state.isCustomPriceSelected\r\n ? getBuyboxKeyInPrice(props, this.state, this.buyboxCallbacks)\r\n : undefined,\r\n quantityLimitsMessages: getQuantityLimitsMessages(props, this.state),\r\n max\r\n };\r\n\r\n return this.props.renderView(viewProps) as React.ReactElement;\r\n }\r\n\r\n\r\n private _getBuyBoxStock(): React.ReactNode{\r\n const {\r\n data: { productAvailableQuantity: { result: productAvailableQuantity} },\r\n } = this.props;\r\n const defaultOrderQuantityLimitsFeatureConfig = this.props.context?.request?.app?.platform?.enableDefaultOrderQuantityLimits;\r\n if(!productAvailableQuantity || !productAvailableQuantity.length) {\r\n return undefined;\r\n }\r\n if(productAvailableQuantity &&\r\n productAvailableQuantity.length&&\r\n productAvailableQuantity[0]&&productAvailableQuantity[0].ProductAvailableQuantity.AvailableQuantity && defaultOrderQuantityLimitsFeatureConfig === 'b2b') {\r\n return (
On hand:
{ productAvailableQuantity[0].ProductAvailableQuantity.AvailableQuantity}
);\r\n }\r\n return undefined;\r\n }\r\n\r\n /**\r\n * Handles anchor click event and scrolls to the given bulk purchase module.\r\n * @param bulkPurchaseModule - Bulk purchase module.\r\n * @returns Handler.\r\n */\r\n private readonly _onBulkPurchaseLinkClick = (bulkPurchaseModule: Element) => () => {\r\n const boundingRect = bulkPurchaseModule.getBoundingClientRect();\r\n window.scrollTo(boundingRect.left, boundingRect.top);\r\n };\r\n\r\n private _renderBuyboxBulkPurchaseLink(): React.ReactNode {\r\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access -- Temporary switch for the feature which is under development.\r\n if (!this.props.context.app.config.isBulkPurchaseEnabled) {\r\n return null;\r\n }\r\n\r\n if (!msdyn365Commerce.isBrowser) {\r\n return null;\r\n }\r\n\r\n const bulkPurchaseModules = Array.from(document.getElementsByClassName(BulkPurchase.className));\r\n\r\n if (!ArrayExtensions.hasElements(bulkPurchaseModules)) {\r\n return null;\r\n }\r\n\r\n return (\r\n \r\n {this.props.resources.bulkPurchaseLinkText}\r\n \r\n );\r\n }\r\n\r\n private _updatePrice(newPrice: ProductPrice | undefined, customPrice: number | undefined = this.state.keyInPriceAmount): void {\r\n if (this.state.isCustomPriceSelected && newPrice) {\r\n newPrice.CustomerContextualPrice = customPrice;\r\n }\r\n this.setState({ productPrice: newPrice });\r\n }\r\n\r\n \r\n private readonly _updateDimensionValue = (productDimensionFull: ProductDimensionFull, newValueId: string | undefined): ProductDimensionValue | undefined => {\r\n if (newValueId && productDimensionFull.DimensionValues) {\r\n return productDimensionFull.DimensionValues.find(dimension => dimension.RecordId === +newValueId);\r\n }\r\n\r\n return undefined;\r\n };\r\n\r\n private readonly _updateDimensions = async (): Promise => {\r\n const {\r\n data: {\r\n product: { result: product },\r\n productDimensions: { result: productDimensions }\r\n },\r\n context: {\r\n actionContext,\r\n request: {\r\n apiSettings: {\r\n channelId\r\n }\r\n }\r\n }\r\n } = this.props;\r\n\r\n if (!product || !productDimensions) {\r\n return;\r\n }\r\n\r\n const dimensionsToUpdate: { [id: number]: string } = { ...this.dimensions };\r\n this.setState({ isUpdatingDimension: true, isUpdatingDeliveryOptions: true });\r\n\r\n // Step 1: Clear error state to display relevant errors\r\n if (this.state.errorState.otherError || this.state.errorState.quantityError) {\r\n const clearErrorState = { ...this.state.errorState };\r\n clearErrorState.otherError = undefined;\r\n if (this.state.errorState.errorHost === 'ADDTOCART') {\r\n clearErrorState.quantityError = undefined;\r\n clearErrorState.errorHost = undefined;\r\n }\r\n this.setState({ errorState: clearErrorState });\r\n }\r\n\r\n // Step 2: Clear any errors indicating the dimension wasn't selected\r\n for (const key of Object.keys(dimensionsToUpdate)) {\r\n if (this.state.errorState.configureErrors[key]) {\r\n const errorState = { ...this.state.errorState };\r\n errorState.configureErrors[key] = undefined;\r\n\r\n this.setState({ errorState });\r\n }\r\n }\r\n\r\n // Step 3, Build the actually selected dimensions, prioritizing the information in state\r\n // over the information in data\r\n const mappedDimensions = productDimensions.map(dimension => {\r\n return {\r\n DimensionTypeValue: dimension.DimensionTypeValue,\r\n DimensionValue: this._updateDimensionValue(dimension, dimensionsToUpdate[dimension.DimensionTypeValue]) || dimension.DimensionValue,\r\n ExtensionProperties: dimension.ExtensionProperties\r\n };\r\n }).filter(dimension => {\r\n return dimension && dimension.DimensionValue;\r\n });\r\n\r\n const selectedProduct = new Promise(async (resolve, reject) => {\r\n const newProduct = (await getSelectedVariantV29(\r\n new SelectedVariantInput(\r\n product.MasterProductId ? product.MasterProductId : product.RecordId,\r\n channelId,\r\n mappedDimensions\r\n ),\r\n actionContext\r\n ));\r\n if (newProduct) {\r\n await getDimensionsForSelectedVariant(\r\n new GetDimensionsForSelectedVariantInput(\r\n newProduct.MasterProductId ? newProduct.MasterProductId : newProduct.RecordId,\r\n channelId,\r\n mappedDimensions\r\n ),\r\n actionContext\r\n );\r\n }\r\n\r\n resolve(newProduct);\r\n });\r\n this.setState({ selectedProduct });\r\n const variantProduct = await selectedProduct;\r\n\r\n if (variantProduct) {\r\n // Step 5. Use these dimensions hydrate the inventory. Wrap this in a promise\r\n // so that places like add to cart can await it\r\n const newAvailableQuantity = await getProductAvailabilitiesForSelectedVariant(\r\n new ProductAvailabilitiesForSelectedVariantInput(\r\n variantProduct.RecordId,\r\n channelId\r\n ),\r\n actionContext\r\n );\r\n\r\n const newShippingQuantity = newAvailableQuantity?.find(shipping => shipping.deliveryType === DeliveryMode.shipping);\r\n const isCustompriceSelected = variantProduct && variantProduct.Dimensions && variantProduct.Dimensions.find(dimension => dimension.DimensionTypeValue === 4 && dimension.DimensionValue && dimension.DimensionValue.Value === 'Custom');\r\n if (isCustompriceSelected) {\r\n this.setState({ isCustomPriceSelected: true });\r\n } else {\r\n // Remove custom amount error when unselect the custom amount\r\n const errorState = { ...this.state.errorState };\r\n errorState.customAmountError = undefined;\r\n\r\n this.setState({ isCustomPriceSelected: false, isPriceKeyedIn: false, errorState });\r\n }\r\n\r\n if (newShippingQuantity) {\r\n this.setState({ productAvailableQuantity: newShippingQuantity });\r\n } else {\r\n this.setState({ productAvailableQuantity: undefined });\r\n }\r\n\r\n // Step 6. Use these dimensions hydrate the product price.\r\n const newPrice = await getPriceForSelectedVariant(\r\n new PriceForSelectedVariantInput(\r\n variantProduct.RecordId,\r\n channelId\r\n ),\r\n actionContext\r\n );\r\n\r\n if (newPrice) {\r\n this._updatePrice(newPrice);\r\n }\r\n\r\n const RetailMulitplePickupMFeatureState = this.props.data.featureState.result?.find(featureState => featureState.Name === 'Dynamics.AX.Application.RetailMultiplePickupDeliveryModeFeature');\r\n\r\n // Step 7. Use these dimensions hydrate the product delivery options.\r\n const newDeliveryOptions = await getDeliveryOptionsForSelectedVariant(\r\n new GetDeliveryOptionsForSelectedVariantInput(\r\n variantProduct.RecordId,\r\n channelId,\r\n undefined,\r\n undefined,\r\n RetailMulitplePickupMFeatureState?.IsEnabled\r\n ),\r\n actionContext\r\n );\r\n\r\n if (newDeliveryOptions) {\r\n this.setState({ productDeliveryOptions: newDeliveryOptions });\r\n }\r\n\r\n await this._updateQuantitiesInState(variantProduct);\r\n }\r\n };\r\n\r\n\r\n private async _updateQuantitiesInState(product: SimpleProduct): Promise {\r\n const isOrderQuantityLimitsFeatureEnabled = await this._isOrderQuantityLimitsFeatureEnabled();\r\n const isB2B = this.props.context?.request?.app?.platform?.enableDefaultOrderQuantityLimits === 'b2b';\r\n const eoqCount = isB2B ? this.props.data?.product?.result?.Behavior?.MultipleOfQuantity : 1;\r\n if (isOrderQuantityLimitsFeatureEnabled && product) {\r\n isB2B? this.setState({\r\n quantity: eoqCount || 1,\r\n min: product.Behavior?.MinimumQuantity || 1,\r\n\r\n // If max by feature in default order settings is not defined then use max from site settings or default max 10.\r\n max:\r\n product.Behavior?.MaximumQuantity && product.Behavior?.MaximumQuantity > 0\r\n ? product.Behavior?.MaximumQuantity\r\n : this.props.context.app.config.maxQuantityForCartLineItem || 10\r\n })\r\n :\r\n this.setState({\r\n min: product.Behavior?.MinimumQuantity || 1,\r\n\r\n // If max by feature in default order settings is not defined then use max from site settings or default max 10.\r\n max:\r\n product.Behavior?.MaximumQuantity && product.Behavior?.MaximumQuantity > 0\r\n ? product.Behavior?.MaximumQuantity\r\n : this.props.context.app.config.maxQuantityForCartLineItem || 10\r\n });\r\n } else {\r\n this.setState({\r\n min: 1,\r\n max: this.props.context.app.config.maxQuantityForCartLineItem || 10\r\n });\r\n }\r\n }\r\n\r\n private readonly _getDropdownName = (dimensionType: number, resources: ICittaBuyboxResources): string => {\r\n const isGiftCard = this.props.data.product.result?.IsGiftCard;\r\n\r\n switch (dimensionType) {\r\n case 1: // ProductDimensionType.Color\r\n return resources.productDimensionTypeColor;\r\n case 2: // ProductDimensionType.Configuration\r\n return resources.productDimensionTypeConfiguration;\r\n case 3: // ProductDimensionType.Size\r\n return resources.productDimensionTypeSize;\r\n case 4: // ProductDimensionType.Style\r\n return isGiftCard ? resources.productDimensionTypeAmount : resources.productDimensionTypeStyle;\r\n default:\r\n return '';\r\n }\r\n };\r\n\r\n private async _isOrderQuantityLimitsFeatureEnabled(): Promise {\r\n const defaultOrderQuantityLimitsFeatureConfig = this.props.context?.request?.app?.platform?.enableDefaultOrderQuantityLimits;\r\n if (defaultOrderQuantityLimitsFeatureConfig === 'none') {\r\n return false;\r\n }\r\n\r\n const featureStatuses = await this.props.data.featureState;\r\n const isFeatureEnabledInHq = featureStatuses?.find(\r\n featureState => featureState.Name === RetailDefaultOrderQuantityLimitsFeatureName\r\n )?.IsEnabled;\r\n if (!isFeatureEnabledInHq) {\r\n return false;\r\n }\r\n\r\n if (defaultOrderQuantityLimitsFeatureConfig === 'all') {\r\n return true;\r\n }\r\n let customerInfo;\r\n try {\r\n customerInfo = await this.props.data.customerInformation;\r\n } catch (error) {\r\n /* @ts-ignore */\r\n this.props.telemetry.information(error);\r\n this.props.telemetry.debug('Unable to receive Customer Information. May be user is not authorized');\r\n return false;\r\n }\r\n\r\n return (\r\n customerInfo &&\r\n ((defaultOrderQuantityLimitsFeatureConfig === 'b2b' && customerInfo.IsB2b) ||\r\n (defaultOrderQuantityLimitsFeatureConfig === 'b2c' && !customerInfo.IsB2b))\r\n );\r\n }\r\n}\r\n\r\nexport default Buybox;\r\n","/*!\r\n * Copyright (c) Microsoft Corporation.\r\n * All rights reserved. See LICENSE in the project root for license information.\r\n */\r\n\r\n/* eslint-disable no-duplicate-imports */\r\n\r\nimport { Module, Node } from '@msdyn365-commerce-modules/utilities';\r\nimport * as React from 'react';\r\nimport { reaction } from 'mobx';\r\nimport {\r\n IBuyboxProductConfigureDropdownViewProps,\r\n IBuyboxProductConfigureViewProps,\r\n IBuyboxProductQuantityViewProps,\r\n IBuyboxState,\r\n // IBuyboxProps,\r\n IBuyboxCallbacks,\r\n // IBuyboxViewProps\r\n} from '@msdyn365-commerce-modules/buybox';\r\nimport PriceComponent from '../../components/price-component';\r\n\r\nimport { AttributeValue } from '@msdyn365-commerce/retail-proxy';\r\n// import { Module, Node } from '@msdyn365-commerce-modules/utilities';\r\nimport { getRichTextHtml } from '@msdyn365-commerce/core';\r\nimport { ICittaBuyboxData } from './citta-buybox.data';\r\nimport AfterPayInfo from '../../themes/citta/views/components/afterpay_info';\r\n\r\nimport Sidebar from '../../themes/citta/views/components/sidebar';\r\nimport { getBuyboxFindInStore } from '../../themes/citta/views/components/buybox-find-in-store';\r\n\r\nimport { getBuyboxProductConfigure } from '../../themes/citta/views/components/buybox-product-configure';\r\n// import LaybuyPriceBreakdown from '../../themes/citta/views/components/layBuyPriceBreakdown';\r\nimport { getBuyboxAddToCart, getBuyboxplacebackorderAddToCart, getBuyboxProductAddToWishlist, getBuyboxProductDescription } from '../../themes/citta/views/components/buybox-small-components';\r\n\r\nimport getAttributesForSelectedVariant, { AttributesForSelectedVariantInput } from '../../data-actions/accordion/get-attributes-for-selected-variant';\r\n\r\n\r\n\r\nimport { ICittaBuyboxProps as IBuyboxExtentionProps, ICittaBuyboxResources as IBuyboxExtentionResources } from './citta-buybox.props.autogenerated';\r\nimport { Quantity } from '../../themes/citta/utilities/quantity';\r\n\r\nimport { IBuyboxViewProps } from './citta-buybox';\r\nimport { IBuyboxProps } from '../../themes/citta/definition-extensions/buybox.ext.props.autogenerated';\r\n\r\nexport class BuyboxView extends React.PureComponent & IBuyboxExtentionProps> {\r\n public componentDidMount() {\r\n setTimeout(function () {\r\n var containerEl = document.getElementsByClassName(\"msc-ss-carousel-vert-slide\")[0];\r\n var elements = document.getElementsByClassName(\"msc-ss-carousel-vert-item\");\r\n\r\n if (elements) {\r\n for (var i = 0; i < elements.length; i++) {\r\n elements[i].addEventListener('click', (e: any) => {\r\n containerEl.scrollTo({ left: e.target.parentNode.closest(\".msc-ss-carousel-vert-item\").offsetLeft - 5, behavior: 'smooth' })\r\n })\r\n\r\n }\r\n }\r\n }, 3000);\r\n }\r\n\r\n public render(): JSX.Element | null {\r\n const props = this.props;\r\n\r\n // @ts-ignore: Compiler not recognizing condition check for function params\r\n reaction(\r\n () => (props.data.product.result ? props.data.product.result.RecordId : null),\r\n () => {\r\n if (props.context && props.data.product.result) {\r\n const actionInput = new AttributesForSelectedVariantInput(\r\n props.data.product.result.RecordId,\r\n // @ts-ignore\r\n +props.context.actionContext.requestContext.apiSettings.channelId,\r\n props.data.product.result\r\n );\r\n\r\n getAttributesForSelectedVariant(actionInput, props.context.actionContext).catch(error => {\r\n props.telemetry.warning('Unable to update attributes for Product');\r\n props.telemetry.error(error);\r\n });\r\n }\r\n }\r\n );\r\n const configure= getBuyboxProductConfigure(props, props.state,props.callbacks);\r\n const { ModuleProps, MediaGalleryContainerProps, ProductInfoContainerProps, quantity, title, rating, callbacks, state, resources, slots, stock } = props;\r\n const { productPrice } = props.data;\r\n\r\n const ChannelCountryRegionISOCode = props.data.channelConfiguration && props.data.channelConfiguration.result && props.data.channelConfiguration.result.ChannelCountryRegionISOCode;\r\n const prodPrice = productPrice && productPrice.result && productPrice.result.CustomerContextualPrice || 0;\r\n const productID = productPrice && productPrice.result && productPrice.result.ItemId || '';\r\n const isEnquireNow = productID.startsWith('CUS') || productID.startsWith('FWL') || productID.startsWith('EJP');\r\n // const laybuyImageUrl = props.config.laybuyImageUrl ? props.config.laybuyImageUrl : 'https://files-ap-prod.cms.commerce.dynamics.com/cms/api/tstpxgfmq/binary/MB3JAm';\r\n const afterpayImage = props.config.afterpayImage ? props.config.afterpayImage : 'https://files-ap-prod.cms.commerce.dynamics.com/cms/api/hdrzssjspt/binary/MFsJR';\r\n const afterpaydesktopImg = props.config.afterpaydesktopImg ? props.config.afterpaydesktopImg : 'https://images-ap-prod.cms.commerce.dynamics.com/cms/api/hdrzssjspt/imageFileData/MFsHS';\r\n const afterpaymobileImg = props.config.afterpaymobileImg ? props.config.afterpaymobileImg : 'https://images-ap-prod.cms.commerce.dynamics.com/cms/api/hdrzssjspt/imageFileData/MFsHV';\r\n const price = productPrice && _getBuyboxProductPrice(props, productPrice.result);\r\n const hidePayLaterOptions = props.config.hidePayLaterOptions;\r\n const hideInStoreOptions = props.config.hideInStoreOptions;\r\n if (slots.giftCard) {\r\n return (\r\n \r\n {slots.giftCard}\r\n \r\n );\r\n }\r\n\r\n const productAttributes = props.data && props.data.productAttributes && props.data.productAttributes.result;\r\n const imageOrientationProperty = productAttributes &&\r\n props.data?.productAttributes?.result?.filter(p => p.Name?.toLowerCase() === 'image orientation');\r\n const imageOrientation = imageOrientationProperty && imageOrientationProperty[0] ? imageOrientationProperty[0].TextValue! : 'portrait';\r\n\r\n const adjustedPrice = productPrice.result?.AdjustedPrice || 0;\r\n\r\n return (\r\n \r\n \r\n
\r\n {props.mediaGallery}\r\n
\r\n
\r\n \r\n {title}\r\n
{price}
\r\n {adjustedPrice < 2000 &&\r\n ChannelCountryRegionISOCode && (\r\n (isEnquireNow || hidePayLaterOptions) ?
:\r\n \r\n {ChannelCountryRegionISOCode && !isEnquireNow &&\r\n \r\n }\r\n {/* hidden the laybuy sidebar but still keep the code here */}\r\n {/* {!isEnquireNow && ChannelCountryRegionISOCode === 'NZ' &&\r\n \r\n } */}\r\n )}\r\n {ChannelCountryRegionISOCode && (
{getBuyboxProductDescription(props)}
)}\r\n\r\n {ChannelCountryRegionISOCode && _renderTextBlock(props.slots.textBlocks)}\r\n {ChannelCountryRegionISOCode && slots.productAttributeLink}\r\n {ChannelCountryRegionISOCode && rating}\r\n {ChannelCountryRegionISOCode && quantity && _renderQuantity(quantity, callbacks, props, state, resources)}\r\n {ChannelCountryRegionISOCode && configure && _renderConfigure(configure, props, state, callbacks)}\r\n {ChannelCountryRegionISOCode && configure && _renderSku(configure, props)}\r\n {ChannelCountryRegionISOCode && _renderEOQ(props)}\r\n {ChannelCountryRegionISOCode && _renderOriginPrice(props, productPrice)}\r\n {ChannelCountryRegionISOCode && stock}\r\n {hideInStoreOptions ?
: (ChannelCountryRegionISOCode === 'NZ' &&_renderBuyboxFindInStore(props, state, callbacks))}\r\n {ChannelCountryRegionISOCode && _renderCartAndWishlistDiv(props, state, callbacks)}\r\n {ChannelCountryRegionISOCode && slots.productAttributeCompantionProduct}\r\n {ChannelCountryRegionISOCode && _renderFreeShippingMessage(props, productAttributes)}\r\n {ChannelCountryRegionISOCode === 'NZ' && slots.freightCharges}\r\n {ChannelCountryRegionISOCode && slots.productEOQ}\r\n\r\n {ChannelCountryRegionISOCode && slots.accordion}\r\n {ChannelCountryRegionISOCode && slots.productPDFSpecification}\r\n {ChannelCountryRegionISOCode && slots.lightbox}\r\n {ChannelCountryRegionISOCode && slots.pageLink}\r\n {ChannelCountryRegionISOCode && props.shopSimilarLook && _renderShopSimilarItem(props.shopSimilarLook)}\r\n \r\n \r\n );\r\n }\r\n}\r\n\r\n\r\nconst _renderFreeShippingMessage = (props: IBuyboxViewProps & IBuyboxExtentionProps, productAttributes: AttributeValue[] | undefined) => {\r\n const freightItemAttr = productAttributes && productAttributes.find(attr => attr.Name === \"Freight Item\");\r\n if ((freightItemAttr && freightItemAttr.BooleanValue) || !props.config.freeShippingMessage) {\r\n return undefined;\r\n }\r\n /* @ts-ignore */\r\n const categoryPaths = props.data.categoryPaths && props.data.categoryPaths.result && props.data.categoryPaths.result;\r\n if (categoryPaths && categoryPaths[2] && categoryPaths[2].Name === \"Furniture\") {\r\n return undefined;\r\n }\r\n return (\r\n
\r\n \r\n
\r\n );\r\n}\r\n\r\nconst _renderOriginPrice = (props:any, productPrice:any) => {\r\n const defaultOrderQuantityLimitsFeatureConfig = props.context?.request?.app?.platform?.enableDefaultOrderQuantityLimits;\r\n const originalPrice = Math.max(productPrice && productPrice.result && productPrice.result.BasePrice || 0, productPrice && productPrice.result && productPrice.result.TradeAgreementPrice || 0, productPrice && productPrice.result && productPrice.result.AdjustedPrice || 0);\r\n if(!originalPrice) {\r\n return undefined;\r\n }\r\n if(originalPrice && defaultOrderQuantityLimitsFeatureConfig === 'b2b'){\r\n return (
RRP:
${originalPrice.toFixed(2)}
);\r\n }\r\n return undefined\r\n}\r\n\r\nconst _renderEOQ = (props:any) => {\r\n const defaultOrderQuantityLimitsFeatureConfig = props.context?.request?.app?.platform?.enableDefaultOrderQuantityLimits;\r\n const eoq = props.data?.product?.result?.Behavior?.MultipleOfQuantity;\r\n if(!eoq) {\r\n return undefined\r\n } \r\n if(eoq && defaultOrderQuantityLimitsFeatureConfig === 'b2b'){\r\n return(\r\n
EOQ:
{eoq}
\r\n )\r\n }\r\n return undefined\r\n\r\n} \r\n\r\n\r\nconst _getBuyboxProductPrice = (props: any, productPrice: any) => {\r\n const { id, typeName, context, resources } = props;\r\n return productPrice && (React.createElement(PriceComponent, { id: id, typeName: typeName, context: context, data: { price: productPrice }, freePriceText: resources.priceFree, originalPriceText: resources.originalPriceText, currentPriceText: resources.currentPriceText }));\r\n}\r\n\r\nconst _renderTextBlock = (textBlocks: React.ReactNode[]): JSX.Element | undefined => {\r\n if (!textBlocks || textBlocks.length === 0) {\r\n return undefined;\r\n }\r\n\r\n return (\r\n <>\r\n {textBlocks[0]}\r\n \r\n );\r\n};\r\n\r\n\r\nconst _renderCartAndWishlistDiv = (props: IBuyboxViewProps & IBuyboxProps, state: IBuyboxState, callbacks: IBuyboxCallbacks): JSX.Element | undefined => {\r\n if (!props.addToWishlist) {\r\n return undefined;\r\n }\r\n const addToCart = getBuyboxAddToCart(props, state, callbacks);\r\n const placebackorder = getBuyboxplacebackorderAddToCart(props, state, callbacks);\r\n const addToWishList = getBuyboxProductAddToWishlist(props, state, callbacks);\r\n const estimatedDateProperty = props.data.productAvailableQuantity\r\n && props.data.productAvailableQuantity.result && props.data.productAvailableQuantity.result[0].ProductAvailableQuantity\r\n && props.data.productAvailableQuantity.result[0].ProductAvailableQuantity.ExtensionProperties\r\n && props.data.productAvailableQuantity.result[0].ProductAvailableQuantity.ExtensionProperties.find((property => property.Key === 'EstimatedDate'));\r\n\r\n const estimatedDateValue = estimatedDateProperty && estimatedDateProperty.Value && estimatedDateProperty.Value.StringValue;\r\n\r\n let estimatedDate = \"\";\r\n if (estimatedDateValue == undefined) {\r\n estimatedDate = \"\";\r\n } else {\r\n estimatedDate = estimatedDateValue;\r\n }\r\n const HSOConfigprop = props.data.channelConfiguration.result\r\n && props.data.channelConfiguration.result.ExtensionProperties\r\n && props.data.channelConfiguration.result!.ExtensionProperties.find((property => property.Key === 'HSOConfig'));\r\n\r\n let HSOConfig = HSOConfigprop && HSOConfigprop.Value && HSOConfigprop.Value.IntegerValue;\r\n if (HSOConfig == undefined) {\r\n HSOConfig = 0;\r\n }\r\n\r\n const StockThresholdprop = props.data.productAvailableQuantity\r\n && props.data.productAvailableQuantity.result && props.data.productAvailableQuantity.result[0].ProductAvailableQuantity\r\n && props.data.productAvailableQuantity.result[0].ProductAvailableQuantity.ExtensionProperties\r\n && props.data.productAvailableQuantity.result[0].ProductAvailableQuantity.ExtensionProperties.find((property => property.Key === 'StockThreshold'));\r\n\r\n const StockThresholdpropval = StockThresholdprop && StockThresholdprop.Value && StockThresholdprop.Value.IntegerValue;\r\n let StockThreshold = 0;\r\n if (StockThresholdpropval != undefined) {\r\n StockThreshold = StockThresholdpropval;\r\n }\r\n\r\n const onhandpropval = props.data.productAvailableQuantity\r\n && props.data.productAvailableQuantity.result && props.data.productAvailableQuantity.result[0].ProductAvailableQuantity\r\n && props.data.productAvailableQuantity.result[0].ProductAvailableQuantity.AvailableQuantity\r\n let onhand = 0;\r\n if (onhandpropval != undefined) {\r\n onhand = Number(onhandpropval);\r\n }\r\n\r\n // return (\r\n //
\r\n // {estimatedDateValue ?\r\n //
Expected in Stock: {estimatedDateValue}
: null}\r\n // {addToCart && addToCart.errorBlock}\r\n // {addToWishList?.errorBlock}\r\n //
\r\n // {addToCart && addToCart.button}\r\n // {addToWishList?.button}\r\n //
\r\n //
\r\n // );\r\n if (HSOConfig === 0) {\r\n return (\r\n
\r\n {estimatedDateValue ?\r\n
Expected in Stock: {estimatedDateValue}
: null}\r\n {addToCart && addToCart.errorBlock}\r\n {addToWishList?.errorBlock}\r\n
\r\n {addToCart && addToCart.button}\r\n {addToWishList?.button}\r\n
\r\n
\r\n );\r\n } else {\r\n\r\n if (StockThreshold == 0) {\r\n return (\r\n
\r\n {estimatedDateValue ?\r\n
Expected in Stock: {estimatedDateValue}
: null}\r\n {addToCart && addToCart.errorBlock}\r\n {addToWishList?.errorBlock}\r\n
\r\n {addToCart && addToCart.button}\r\n {addToWishList?.button}\r\n
\r\n
\r\n );\r\n\r\n } else {\r\n if (onhand >= StockThreshold) {\r\n return (\r\n
\r\n {estimatedDateValue ?\r\n
Expected in Stock: {estimatedDateValue}
: null}\r\n {addToCart && addToCart.errorBlock}\r\n {addToWishList?.errorBlock}\r\n
\r\n {addToCart && addToCart.button}\r\n {addToWishList?.button}\r\n
\r\n
\r\n );\r\n\r\n } else {\r\n if (estimatedDate == \"\") {\r\n return (\r\n
\r\n
\r\n \r\n
\r\n
\r\n );\r\n }\r\n else {\r\n return (\r\n
\r\n {estimatedDateValue ?\r\n
Expected in Stock: {estimatedDateValue}
: null}\r\n
\r\n {placebackorder && placebackorder.button}\r\n
\r\n
\r\n );\r\n }\r\n }\r\n\r\n }\r\n }\r\n};\r\n\r\nconst _renderBuyboxFindInStore = (props: IBuyboxViewProps & IBuyboxProps, state: IBuyboxState, callbacks: IBuyboxCallbacks): JSX.Element | null => {\r\n const findInStore = getBuyboxFindInStore(props, state, callbacks);\r\n const { productPrice } = props.data;\r\n const uomSet = productPrice && productPrice.result && productPrice.result.UnitOfMeasure || '';\r\n let AvailabilitypProductTitleisSet = false;\r\n if (uomSet == 'SET4' || uomSet == 'SET6') {\r\n AvailabilitypProductTitleisSet = true;\r\n }\r\n return (\r\n findInStore ? (\r\n \r\n {findInStore.storeSelector}\r\n {findInStore.heading}\r\n {findInStore.description}\r\n {findInStore.errors}\r\n {AvailabilitypProductTitleisSet ?

Availability: Please contact your local store for product availability.

: findInStore.button}\r\n {findInStore.modal}\r\n
) : null\r\n );\r\n};\r\n\r\n\r\n\r\n\r\nconst _renderConfigure = (configure: IBuyboxProductConfigureViewProps, props: IBuyboxViewProps & IBuyboxExtentionProps, state: IBuyboxState, callbacks: IBuyboxCallbacks): JSX.Element | null => {\r\n const { ContainerProps } = configure;\r\n const dropdowns = getBuyboxProductConfigure(props, state, callbacks);\r\n if (dropdowns) {\r\n return (\r\n \r\n {dropdowns.dropdowns.map(_renderConfigureDropdown)}\r\n \r\n );\r\n } else {\r\n return null;\r\n }\r\n};\r\n\r\n\r\n\r\nconst _renderConfigureDropdown = (dropdown: IBuyboxProductConfigureDropdownViewProps): JSX.Element => {\r\n const { ContainerProps, LabelContainerProps, heading, errors, select } = dropdown;\r\n\r\n return (\r\n \r\n \r\n {heading}\r\n {errors}\r\n \r\n {select}\r\n \r\n );\r\n};\r\n\r\n\r\n\r\nconst _renderQuantity = (quantityComponent: IBuyboxProductQuantityViewProps, callbacks: IBuyboxCallbacks, props: IBuyboxProps, state: IBuyboxState, extentionResources: IBuyboxExtentionResources): JSX.Element | null => {\r\n const { ContainerProps, LabelContainerProps, heading, errors } = quantityComponent;\r\n\r\n const {\r\n resources,\r\n context: {\r\n app: {\r\n config: {\r\n maxQuantityForCartLineItem\r\n }\r\n }\r\n }\r\n } = props;\r\n\r\n const\r\n {\r\n quantity,\r\n } = state;\r\n\r\n const isProductAvailable: boolean = props.data.productAvailableQuantity.result && props.data.productAvailableQuantity.result[0] &&\r\n props.data.productAvailableQuantity.result[0].IsProductAvailable || false;\r\n \r\n const HSOConfigprop = props.data.channelConfiguration.result\r\n && props.data.channelConfiguration.result.ExtensionProperties\r\n && props.data.channelConfiguration.result!.ExtensionProperties.find((property => property.Key === 'HSOConfig'));\r\n\r\n let HSOConfig = HSOConfigprop && HSOConfigprop.Value && HSOConfigprop.Value.IntegerValue;\r\n if (HSOConfig == undefined) {\r\n HSOConfig = 0;\r\n }\r\n\r\n if (isProductAvailable) {\r\n const maxQuantity = props.data.productAvailableQuantity.result &&\r\n props.data.productAvailableQuantity.result[0] &&\r\n props.data.productAvailableQuantity.result[0].ProductAvailableQuantity.AvailableQuantity || maxQuantityForCartLineItem;\r\n\r\n const onChange = (newValue: number) => {\r\n if (callbacks.updateQuantity) {\r\n callbacks.updateQuantity(newValue);\r\n }\r\n };\r\n const isB2B = props.context?.request?.app?.platform?.enableDefaultOrderQuantityLimits === 'b2b';\r\n const eoqQuantity = isB2B ? props.data?.product?.result?.Behavior?.MultipleOfQuantity : 1;\r\n\r\n return (\r\n \r\n \r\n {heading}\r\n {errors}\r\n \r\n\r\n \r\n \r\n );\r\n }\r\n else if (HSOConfig == 1) {\r\n const estimatedDateProperty = props.data.productAvailableQuantity\r\n && props.data.productAvailableQuantity.result && props.data.productAvailableQuantity.result[0].ProductAvailableQuantity\r\n && props.data.productAvailableQuantity.result[0].ProductAvailableQuantity.ExtensionProperties\r\n && props.data.productAvailableQuantity.result[0].ProductAvailableQuantity.ExtensionProperties.find((property => property.Key === 'EstimatedDate'));\r\n const estimatedDateValue = estimatedDateProperty && estimatedDateProperty.Value && estimatedDateProperty.Value.StringValue;\r\n let estimatedDate = \"\";\r\n if (estimatedDateValue == undefined) {\r\n estimatedDate = \"\";\r\n } else {\r\n estimatedDate = estimatedDateValue;\r\n }\r\n const StockThresholdprop = props.data.productAvailableQuantity\r\n && props.data.productAvailableQuantity.result && props.data.productAvailableQuantity.result[0].ProductAvailableQuantity\r\n && props.data.productAvailableQuantity.result[0].ProductAvailableQuantity.ExtensionProperties\r\n && props.data.productAvailableQuantity.result[0].ProductAvailableQuantity.ExtensionProperties.find((property => property.Key === 'StockThreshold'));\r\n const StockThresholdpropval = StockThresholdprop && StockThresholdprop.Value && StockThresholdprop.Value.IntegerValue;\r\n let StockThreshold = 0;\r\n if (StockThresholdpropval != undefined) {\r\n StockThreshold = StockThresholdpropval;\r\n }\r\n const onhandpropval = props.data.productAvailableQuantity\r\n && props.data.productAvailableQuantity.result && props.data.productAvailableQuantity.result[0].ProductAvailableQuantity\r\n && props.data.productAvailableQuantity.result[0].ProductAvailableQuantity.AvailableQuantity\r\n let onhand = 0;\r\n if (onhandpropval != undefined) {\r\n onhand = Number(onhandpropval);\r\n }\r\n if (StockThreshold != 0 && onhand < StockThreshold && estimatedDate != \"\") {\r\n const maxQuantity = props.data.productAvailableQuantity.result &&\r\n props.data.productAvailableQuantity.result[0] &&\r\n props.data.productAvailableQuantity.result[0].ProductAvailableQuantity.AvailableQuantity || maxQuantityForCartLineItem;\r\n const onChange = (newValue: number) => {\r\n if (callbacks.updateQuantity) {\r\n callbacks.updateQuantity(newValue);\r\n }\r\n };\r\n const isB2B = props.context?.request?.app?.platform?.enableDefaultOrderQuantityLimits === 'b2b';\r\n const eoqQuantity = isB2B ? props.data?.product?.result?.Behavior?.MultipleOfQuantity : 1;\r\n return (\r\n \r\n \r\n {heading}\r\n {errors}\r\n \r\n \r\n \r\n );\r\n }\r\n }\r\n return ;\r\n};\r\n\r\nconst _renderSku = (configure: IBuyboxProductConfigureViewProps, props: IBuyboxViewProps & IBuyboxExtentionProps): JSX.Element | null => {\r\n const { ContainerProps } = configure;\r\n const { slots } = props;\r\n if (slots) {\r\n return (\r\n \r\n {slots.productSKU}\r\n \r\n );\r\n } else {\r\n return null;\r\n }\r\n}\r\n\r\n\r\n\r\nconst _renderShopSimilarItem = (shopSimilarItem: any) => {\r\n const { ContainerProps, errors, input } = shopSimilarItem;\r\n return (React.createElement(Node, Object.assign({}, ContainerProps),\r\n errors,\r\n input));\r\n};\r\n\r\nexport default BuyboxView;\r\n","import { debounce } from 'lodash';\r\nimport * as React from 'react';\r\nimport { IQuantityProps } from './Quantity.props';\r\n\r\ninterface IQuantityState {\r\n currentInput: number;\r\n}\r\n/**\r\n * Quantity Component - This component is used to add or remove quantity\r\n */\r\n\r\nexport default class Quantity extends React.PureComponent {\r\n public static defaultProps: Partial = {\r\n min: 1,\r\n decrementGlyphClass: 'fas fa-minus',\r\n incrementGlyphClass: 'fas fa-plus'\r\n };\r\n\r\n private inputRef: React.RefObject = React.createRef();\r\n\r\n constructor(props: IQuantityProps) {\r\n super(props);\r\n this.state = { currentInput: props.currentCount || 1 };\r\n this._onIncrement = this._onIncrement.bind(this);\r\n this._onDecrement = this._onDecrement.bind(this);\r\n this._handleChange = this._handleChange.bind(this);\r\n }\r\n\r\n public render(): JSX.Element {\r\n const glyphMinusClassName: string = `${this.props.decrementGlyphClass!} quantity__controls-glyph`;\r\n const glyphPlusClassName: string = `${this.props.incrementGlyphClass!} quantity__controls-glyph`;\r\n this.setState({\r\n currentInput: this.props.currentCount || 1\r\n })\r\n const disabled = this.state.currentInput === this.props.min;\r\n const incDisabled = this.state.currentInput === this.props.max;\r\n const currentValue = this.state.currentInput;\r\n\r\n return (\r\n <>\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n \r\n );\r\n }\r\n\r\n private _onIncrement(): void {\r\n let invokeCallback = false;\r\n let amount:number = this.props.min || 1;\r\n this.setState((prevState: IQuantityState) => {\r\n if (prevState.currentInput + amount <= this.props.max) {\r\n invokeCallback = true;\r\n return { currentInput: prevState.currentInput + amount};\r\n } else {\r\n invokeCallback = false;\r\n return { currentInput: prevState.currentInput };\r\n }\r\n // tslint:disable-next-line:align\r\n }, () => {\r\n invokeCallback && this.props.onChange && this.props.onChange(this.state.currentInput);\r\n });\r\n }\r\n\r\n private _onDecrement(): void {\r\n let invokeCallback = false;\r\n let amount:number = this.props.min || 1;\r\n this.setState((prevState: IQuantityState) => {\r\n if (prevState.currentInput > amount) {\r\n invokeCallback = true;\r\n return { currentInput: prevState.currentInput - amount };\r\n } else {\r\n invokeCallback = false;\r\n return { currentInput: amount };\r\n }\r\n // tslint:disable-next-line:align\r\n }, () => { invokeCallback && this.props.onChange && this.props.onChange(this.state.currentInput); });\r\n }\r\n\r\n private _handleChange(e: React.ChangeEvent): void {\r\n const currentValue = parseInt((e.target.value), 10);\r\n const minValue = this.props.min === undefined ? 1 : this.props.min;\r\n const inputElement = this.inputRef && this.inputRef.current && this.inputRef.current instanceof HTMLInputElement && this.inputRef.current;\r\n\r\n if (currentValue > this.props.max) {\r\n this.setState({ currentInput: this.props.max },\r\n () => {\r\n debounce(() => {\r\n this.props.onChange && this.props.onChange(this.state.currentInput);\r\n }, 200)();});\r\n } else {\r\n this.setState({ currentInput: currentValue },\r\n () => {\r\n debounce(() => {\r\n if(!isNaN(this.state.currentInput) && !(this.state.currentInput < minValue)) {\r\n this.props.onChange && this.props.onChange(this.state.currentInput);\r\n\r\n if (inputElement) {\r\n inputElement.setAttribute('aria-valuenow', currentValue.toString());\r\n inputElement.setAttribute('value', currentValue.toString());\r\n }\r\n }\r\n }, 200)();});\r\n }\r\n }\r\n\r\n private _validateMin = (): void => {\r\n const minValue = this.props.min === undefined ? 1 : this.props.min;\r\n if(isNaN(this.state.currentInput) || (this.state.currentInput < minValue)) {\r\n this.setState({ currentInput: minValue }, () => { this.props.onChange && this.props.onChange(this.state.currentInput); });\r\n } else {\r\n this.props.onChange && this.props.onChange(this.state.currentInput);\r\n }\r\n }\r\n}","import * as React from 'react';\r\nexport interface ILaybuyPriceBreakdownProps {\r\n title: React.ReactNode;\r\n price: number;\r\n imageUrl: string;\r\n}\r\n\r\n// tslint:disable-next-line:no-empty-interface\r\ninterface ILaybuyPriceBreakdownInfoState {\r\n laybuyPriceBreakdownInstalment: number | string;\r\n showLaybuyPriceBreakdownModal: boolean;\r\n}\r\n\r\n/**\r\n *\r\n * The PromoCode component renders the promocode section.\r\n * @extends {React.PureComponent}\r\n */\r\nclass LaybuyPriceBreakdown extends React.Component {\r\n constructor(props: ILaybuyPriceBreakdownProps, state: ILaybuyPriceBreakdownInfoState) {\r\n super(props);\r\n this.state = {\r\n laybuyPriceBreakdownInstalment: 0,\r\n showLaybuyPriceBreakdownModal: false,\r\n };\r\n this._toggleModal = this._toggleModal.bind(this);\r\n }\r\n\r\n public async componentDidMount(): Promise {\r\n if (this.props.price) {\r\n this._calculatelaybuyPriceBreakdownInstalment();\r\n }\r\n }\r\n public componentDidUpdate(): void {\r\n this._calculatelaybuyPriceBreakdownInstalment();\r\n }\r\n public render(): JSX.Element {\r\n // const TERMS_URL = 'https://www.laybuy.com/au/consumer-terms';\r\n const AMOUNT_OF_INSTALLMENTS = 6;\r\n // const ICON_PATH = this.props.imageUrl;\r\n const hasPrice: boolean = this.state.laybuyPriceBreakdownInstalment !== 0 ? true : false;\r\n const wrapperClassName = `laybuyPriceBreakdown-info ${hasPrice ? 'laybuyPriceBreakdown-loaded' : ''}`;\r\n return (\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
{this.props.title}
\r\n
${this.props.price}
\r\n
pay in 6 weekly payments from ${(this.props.price / 6).toFixed(2)}
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
EASY SIGN-UP
\r\n
Easy Sign-up: Just select \"Laybuy\" as your form of payment at checkout. All you need is a debit or credit card to create an account.
\r\n
\r\n
\r\n
\r\n
PAY IN {AMOUNT_OF_INSTALLMENTS} INSTALMENTS
\r\n
Choose your payment day, view your schedule and select pay now to complete your order.
\r\n
\r\n
\r\n
\r\n
INSTANT APPROVAL
\r\n
Once approved you will be able to complete purchases using Laybuy.
\r\n
\r\n
\r\n
\r\n
NOTHING EXTRA TO PAY
\r\n
Laybuy doesn't charge you any interest or upfront fees.
\r\n
\r\n
\r\n
\r\n
\r\n );\r\n }\r\n private _toggleModal(): void {\r\n this.setState({\r\n showLaybuyPriceBreakdownModal: !this.state.showLaybuyPriceBreakdownModal\r\n });\r\n }\r\n private _calculatelaybuyPriceBreakdownInstalment(): void {\r\n // compare product price to min and max laybuyPriceBreakdown prices\r\n const price = this.props.price ? this.props.price : null;\r\n const instalment = price ? (price / 6).toFixed(2) : 0;\r\n if (instalment !== this.state.laybuyPriceBreakdownInstalment) {\r\n this.setState({\r\n laybuyPriceBreakdownInstalment: price ? (price / 6).toFixed(2) : 0\r\n });\r\n }\r\n }\r\n\r\n}\r\n\r\nexport default LaybuyPriceBreakdown;","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport {\r\n IBuyboxCallbacks,\r\n IBuyboxData,\r\n IBuyboxProductConfigureDropdownViewProps,\r\n IBuyboxProductConfigureViewProps,\r\n IBuyboxProductQuantityViewProps,\r\n IBuyboxProps,\r\n IBuyboxState,\r\n IBuyboxViewProps\r\n} from '@msdyn365-commerce-modules/buybox';\r\nimport { AttributeValue } from '@msdyn365-commerce/retail-proxy';\r\nimport { Module, Node } from '@msdyn365-commerce-modules/utilities';\r\nimport { reaction } from 'mobx';\r\nimport * as React from 'react';\r\nimport { getRichTextHtml } from '@msdyn365-commerce/core';\r\nimport getAttributesForSelectedVariant, { AttributesForSelectedVariantInput } from '../../../data-actions/accordion/get-attributes-for-selected-variant';\r\nimport { IBuyboxProps as IBuyboxExtentionProps, IBuyboxResources as IBuyboxExtentionResources } from '../definition-extensions/buybox.ext.props.autogenerated';\r\nimport { Quantity } from '../utilities/quantity';\r\nimport { IBuyBoxData } from './buybox.data';\r\nimport AfterPayInfo from './components/afterpay_info';\r\nimport Sidebar from './components/sidebar';\r\nimport { getBuyboxFindInStore } from './components/buybox-find-in-store';\r\nimport { getBuyboxProductConfigure } from './components/buybox-product-configure';\r\nimport { getBuyboxAddToCart, getBuyboxProductAddToWishlist, getBuyboxProductDescription } from './components/buybox-small-components';\r\nimport LaybuyPriceBreakdown from './components/layBuyPriceBreakdown';\r\nimport PriceComponent from '../../../components/price-component';\r\nexport class BuyboxView extends React.PureComponent & IBuyboxExtentionProps> {\r\n public componentDidMount() {\r\n setTimeout(function() {\r\n var containerEl = document.getElementsByClassName(\"msc-ss-carousel-vert-slide\")[0];\r\n var elements = document.getElementsByClassName(\"msc-ss-carousel-vert-item\");\r\n \r\n if (elements) {\r\n for (var i = 0; i< elements.length; i++) {\r\n elements[i].addEventListener('click', (e: any) => {\r\n containerEl.scrollTo({left: e.target.parentNode.closest(\".msc-ss-carousel-vert-item\").offsetLeft - 5, behavior: 'smooth'})\r\n })\r\n\r\n }\r\n }\r\n }, 3000);\r\n }\r\n\r\n public render(): JSX.Element | null {\r\n const props = this.props;\r\n\r\n // @ts-ignore: Compiler not recognizing condition check for function params\r\n reaction(\r\n () => (props.data.product.result ? props.data.product.result.RecordId : null),\r\n () => {\r\n if (props.context && props.data.product.result) {\r\n const actionInput = new AttributesForSelectedVariantInput(\r\n props.data.product.result.RecordId,\r\n // @ts-ignore\r\n +props.context.actionContext.requestContext.apiSettings.channelId,\r\n props.data.product.result\r\n );\r\n \r\n getAttributesForSelectedVariant(actionInput, props.context.actionContext).catch(error => {\r\n props.telemetry.warning('Unable to update attributes for Product');\r\n props.telemetry.error(error);\r\n });\r\n }\r\n }\r\n );\r\n const configure= getBuyboxProductConfigure(props, props.state,props.callbacks);\r\n const { ModuleProps, MediaGalleryContainerProps, ProductInfoContainerProps, quantity, title, rating, callbacks, state, resources, slots } = props;\r\n const { productPrice } = props.data;\r\n\r\n const ChannelCountryRegionISOCode = props.data.channelConfiguration && props.data.channelConfiguration.result && props.data.channelConfiguration.result.ChannelCountryRegionISOCode;\r\n const prodPrice = productPrice && productPrice.result && productPrice.result.CustomerContextualPrice || 0;\r\n const productID = productPrice && productPrice.result && productPrice.result.ItemId || '';\r\n const isEnquireNow = productID.startsWith('CUS') || productID.startsWith('FWL') || productID.startsWith('EJP');\r\n const laybuyImageUrl = props.config.laybuyImageUrl ? props.config.laybuyImageUrl : 'https://files-ap-prod.cms.commerce.dynamics.com/cms/api/tstpxgfmq/binary/MB3JAm';\r\n const afterpayImage = props.config.afterpayImage ? props.config.afterpayImage : 'https://files-ap-prod.cms.commerce.dynamics.com/cms/api/hdrzssjspt/binary/MFsJR';\r\n const afterpaydesktopImg = props.config.afterpaydesktopImg ? props.config.afterpaydesktopImg : 'https://images-ap-prod.cms.commerce.dynamics.com/cms/api/hdrzssjspt/imageFileData/MFsHS';\r\n const afterpaymobileImg = props.config.afterpaymobileImg ? props.config.afterpaymobileImg : 'https://images-ap-prod.cms.commerce.dynamics.com/cms/api/hdrzssjspt/imageFileData/MFsHV';\r\n \r\n const price = productPrice && _getBuyboxProductPrice(props, productPrice.result);\r\n const hidePayLaterOptions = props.config.hidePayLaterOptions;\r\n const hideInStoreOptions = props.config.hideInStoreOptions;\r\n if (slots.giftCard) {\r\n return (\r\n \r\n {slots.giftCard}\r\n \r\n );\r\n }\r\n\r\n const productAttributes =props.data && props.data.productAttributes && props.data.productAttributes.result;\r\n const imageOrientationProperty = productAttributes &&\r\n props.data?.productAttributes?.result?.filter(p=> p.Name?.toLowerCase() === 'image orientation');\r\n const imageOrientation = imageOrientationProperty && imageOrientationProperty[0] ? imageOrientationProperty[0].TextValue! : 'portrait';\r\n\r\n const adjustedPrice = productPrice.result?.AdjustedPrice || 0;\r\n\r\n return (\r\n \r\n \r\n
\r\n {props.mediaGallery}\r\n
\r\n
\r\n \r\n {title}\r\n
{price}
\r\n { adjustedPrice < 2000 &&\r\n ChannelCountryRegionISOCode && (\r\n (isEnquireNow || hidePayLaterOptions) ?
:\r\n \r\n {ChannelCountryRegionISOCode && !isEnquireNow &&\r\n \r\n }\r\n {!isEnquireNow && ChannelCountryRegionISOCode === 'NZ' &&\r\n \r\n }\r\n )}\r\n {ChannelCountryRegionISOCode && (
{getBuyboxProductDescription(props)}
)}\r\n \r\n {ChannelCountryRegionISOCode && _renderTextBlock(props.slots.textBlocks)}\r\n {ChannelCountryRegionISOCode && slots.productAttributeLink}\r\n {ChannelCountryRegionISOCode && rating}\r\n {ChannelCountryRegionISOCode && quantity && _renderQuantity(quantity, callbacks, props, state, resources)}\r\n {ChannelCountryRegionISOCode && configure && _renderConfigure(configure, props, state, callbacks)}\r\n {ChannelCountryRegionISOCode && configure && _renderSku(configure, props)}\r\n {hideInStoreOptions ?
: (ChannelCountryRegionISOCode === 'NZ' &&_renderBuyboxFindInStore(props, state, callbacks))}\r\n {ChannelCountryRegionISOCode && _renderCartAndWishlistDiv(props, state, callbacks)}\r\n {ChannelCountryRegionISOCode && slots.productAttributeCompantionProduct}\r\n {ChannelCountryRegionISOCode && _renderFreeShippingMessage(props, productAttributes)}\r\n {ChannelCountryRegionISOCode === 'NZ' && slots.freightCharges}\r\n {ChannelCountryRegionISOCode && slots.productEOQ}\r\n\r\n {ChannelCountryRegionISOCode && slots.accordion}\r\n {ChannelCountryRegionISOCode && slots.productPDFSpecification}\r\n {ChannelCountryRegionISOCode && slots.lightbox}\r\n {ChannelCountryRegionISOCode && slots.pageLink}\r\n {ChannelCountryRegionISOCode && props.shopSimilarLook && _renderShopSimilarItem(props.shopSimilarLook)}\r\n \r\n \r\n );\r\n }\r\n}\r\nconst _renderFreeShippingMessage = (props: IBuyboxViewProps & IBuyboxExtentionProps, productAttributes: AttributeValue[] | undefined) => { \r\n const freightItemAttr = productAttributes && productAttributes.find(attr => attr.Name === \"Freight Item\");\r\n if ((freightItemAttr && freightItemAttr.BooleanValue) || !props.config.freeShippingMessage) {\r\n return undefined;\r\n }\r\n /* @ts-ignore */\r\n const categoryPaths = props.data.categoryPaths && props.data.categoryPaths.result && props.data.categoryPaths.result;\r\n if (categoryPaths && categoryPaths[2] && categoryPaths[2].Name === \"Furniture\") {\r\n return undefined;\r\n }\r\n return (\r\n
\r\n \r\n
\r\n );\r\n}\r\n\r\nconst _getBuyboxProductPrice = (props: any, productPrice: any) => {\r\n const { id, typeName, context, resources } = props;\r\n // @ts-ignore\r\n return productPrice && (React.createElement(PriceComponent, { id: id, typeName: typeName, context: context, data: { price: productPrice }, freePriceText: resources.priceFree, originalPriceText: resources.originalPriceText, currentPriceText: resources.currentPriceText }));\r\n}\r\n\r\nconst _renderTextBlock = (textBlocks: React.ReactNode[]): JSX.Element | undefined => {\r\n if (!textBlocks || textBlocks.length === 0) {\r\n return undefined;\r\n }\r\n\r\n return (\r\n <>\r\n {textBlocks[0]}\r\n \r\n );\r\n};\r\n\r\nconst _renderCartAndWishlistDiv = (props: IBuyboxViewProps & IBuyboxExtentionProps, state: IBuyboxState, callbacks: IBuyboxCallbacks): JSX.Element | undefined => {\r\n if (!props.addToWishlist) {\r\n return undefined;\r\n }\r\n const addToCart = getBuyboxAddToCart(props, state, callbacks);\r\n const addToWishList = getBuyboxProductAddToWishlist(props, state, callbacks);\r\n const estimatedDateProperty = props.data.productAvailableQuantity\r\n && props.data.productAvailableQuantity.result && props.data.productAvailableQuantity.result[0].ProductAvailableQuantity\r\n && props.data.productAvailableQuantity.result[0].ProductAvailableQuantity.ExtensionProperties\r\n && props.data.productAvailableQuantity.result[0].ProductAvailableQuantity.ExtensionProperties.find((property => property.Key === 'EstimatedDate'));\r\n\r\n const estimatedDateValue = estimatedDateProperty && estimatedDateProperty.Value && estimatedDateProperty.Value.StringValue;\r\n return (\r\n
\r\n {estimatedDateValue ?\r\n
Expected in Stock: {estimatedDateValue}
: null}\r\n {addToCart && addToCart.errorBlock}\r\n {addToWishList?.errorBlock}\r\n
\r\n {addToCart && addToCart.button}\r\n {addToWishList?.button}\r\n
\r\n
\r\n );\r\n};\r\n\r\nconst _renderBuyboxFindInStore = (props: IBuyboxViewProps & IBuyboxExtentionProps, state: IBuyboxState, callbacks: IBuyboxCallbacks): JSX.Element | null => {\r\n const findInStore = getBuyboxFindInStore(props, state, callbacks);\r\n const { productPrice } = props.data;\r\n const uomSet = productPrice && productPrice.result && productPrice.result.UnitOfMeasure || '';\r\n let AvailabilitypProductTitleisSet = false;\r\n if(uomSet == 'SET4' || uomSet == 'SET6'){\r\n AvailabilitypProductTitleisSet = true;\r\n }\r\n return (\r\n findInStore ? (\r\n \r\n {findInStore.storeSelector}\r\n {findInStore.heading}\r\n {findInStore.description}\r\n {findInStore.errors}\r\n {AvailabilitypProductTitleisSet?

Availability: Please contact your local store for product availability.

: findInStore.button}\r\n {findInStore.modal}\r\n
) : null\r\n );\r\n};\r\n\r\nconst _renderConfigure = (configure: IBuyboxProductConfigureViewProps, props: IBuyboxViewProps & IBuyboxExtentionProps, state: IBuyboxState, callbacks: IBuyboxCallbacks): JSX.Element | null => {\r\n const { ContainerProps } = configure;\r\n const dropdowns = getBuyboxProductConfigure(props, state, callbacks);\r\n if (dropdowns) {\r\n return (\r\n \r\n {dropdowns.dropdowns.map(_renderConfigureDropdown)}\r\n \r\n );\r\n } else {\r\n return null;\r\n }\r\n};\r\n\r\nconst _renderSku = (configure: IBuyboxProductConfigureViewProps, props: IBuyboxViewProps & IBuyboxExtentionProps ): JSX.Element | null => {\r\n const { ContainerProps } = configure;\r\n const { slots } = props;\r\n if (slots) {\r\n return (\r\n \r\n {slots.productSKU}\r\n \r\n );\r\n } else {\r\n return null;\r\n }\r\n}\r\n\r\nconst _renderConfigureDropdown = (dropdown: IBuyboxProductConfigureDropdownViewProps): JSX.Element => {\r\n const { ContainerProps, LabelContainerProps, heading, errors, select } = dropdown;\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 _renderShopSimilarItem = (shopSimilarItem: any) => {\r\n const { ContainerProps, errors, input } = shopSimilarItem;\r\n return (React.createElement(Node, Object.assign({}, ContainerProps),\r\n errors,\r\n input));\r\n};\r\n\r\nconst _renderQuantity = (quantityComponent: IBuyboxProductQuantityViewProps, callbacks: IBuyboxCallbacks, props: IBuyboxProps, state: IBuyboxState, extentionResources: IBuyboxExtentionResources): JSX.Element | null => {\r\n const { ContainerProps, LabelContainerProps, heading, errors } = quantityComponent;\r\n\r\n const {\r\n resources,\r\n context: {\r\n app: {\r\n config: {\r\n maxQuantityForCartLineItem\r\n }\r\n }\r\n }\r\n } = props;\r\n\r\n const\r\n {\r\n quantity,\r\n } = state;\r\n\r\n const isProductAvailable: boolean = props.data.productAvailableQuantity.result && props.data.productAvailableQuantity.result[0] &&\r\n props.data.productAvailableQuantity.result[0].IsProductAvailable || false;\r\n\r\n if (isProductAvailable) {\r\n const maxQuantity = props.data.productAvailableQuantity.result &&\r\n props.data.productAvailableQuantity.result[0] &&\r\n props.data.productAvailableQuantity.result[0].ProductAvailableQuantity.AvailableQuantity || maxQuantityForCartLineItem;\r\n\r\n const onChange = (newValue: number) => {\r\n if (callbacks.updateQuantity) {\r\n callbacks.updateQuantity(newValue);\r\n }\r\n };\r\n\r\n return (\r\n \r\n \r\n {heading}\r\n {errors}\r\n \r\n\r\n \r\n \r\n );\r\n }\r\n return ;\r\n};\r\n\r\nexport default BuyboxView;\r\n","import * as React from 'react';\r\nexport interface IAfterPayInfoProps {\r\n title: React.ReactNode;\r\n price:number;\r\n afterpayImage:string;\r\n afterpaydesktopImg:string;\r\n afterpaymobileImg:string;\r\n}\r\n\r\n// tslint:disable-next-line:no-empty-interface\r\ninterface IAfterPayInfoState {\r\n afterpayAvailable: boolean;\r\n afterpayInstalment: number | string;\r\n showAfterpayModal: boolean;\r\n afterpayMin: number;\r\n afterpayMax:number;\r\n}\r\n/**\r\n * Configuration entity interface.\r\n */\r\nexport interface IConfiguration {\r\n type?: string;\r\n description?: string;\r\n minimumAmount?: IMinimumAmount;\r\n maximumAmount?: IMaximumAmount;\r\n}\r\nexport interface IMinimumAmount {\r\n amount?: string;\r\n currency?: string;\r\n}\r\nexport interface IMaximumAmount {\r\n amount?: string;\r\n currency?: string;\r\n}\r\n// tslint:disable-next-line:class-name\r\nexport interface IDXC_GetConfigurationResponse {\r\n configuration?: IConfiguration[];\r\n success?: boolean;\r\n errorText?: string;\r\n}\r\n\r\n/**\r\n *\r\n * The PromoCode component renders the promocode section.\r\n * @extends {React.PureComponent}\r\n */\r\nclass AfterPayInfo extends React.Component {\r\n constructor(props: IAfterPayInfoProps, state: IAfterPayInfoState) {\r\n super(props);\r\n this.state = {\r\n afterpayAvailable: false,\r\n afterpayInstalment: 0,\r\n showAfterpayModal: false,\r\n afterpayMin: 0,\r\n afterpayMax: 0,\r\n };\r\n }\r\n\r\n public async componentDidMount(): Promise {\r\n\r\n // Afterpay get configuration\r\n // const afterpayConfig: IDXC_GetConfigurationResponse = await this._afterpayGetConfiguration();\r\n // TODO replace the below Mock with actual data action response\r\n const afterpayConfig: IDXC_GetConfigurationResponse = {\r\n configuration:[\r\n {\r\n type:'PAY_BY_INSTALLMENT',description:'Pay over time',minimumAmount:{\r\n amount:'',currency:''\r\n },maximumAmount:{\r\n amount:'2000.00',currency:'NZD'\r\n }\r\n }\r\n ],success:true,errorText:''\r\n };\r\n if (afterpayConfig && afterpayConfig.success && afterpayConfig.configuration) {\r\n const configResult = afterpayConfig.configuration[0];\r\n this._processAfterpayConfig(configResult);\r\n this._calculateAfterpayInstalment();\r\n }\r\n }\r\n public componentDidUpdate(): void {\r\n this._calculateAfterpayInstalment();\r\n }\r\n public render(): JSX.Element {\r\n const wrapperClassName = `afterpay-info ${this.state.afterpayAvailable ? 'afterpay-loaded' : ''}`;\r\n return (\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
{this.props.title}
\r\n
${this.props.price}
\r\n
pay in 4 fortnightly instalments ${(this.props.price / 4).toFixed(2)}
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
EASY SIGN-UP
\r\n
Easy Sign-up: Just select \"AfterPay\" as your form of payment at checkout. All you need is a debit or credit card to create an account.
\r\n
\r\n
\r\n
\r\n
PAY IN 4 INSTALMENTS
\r\n
You'll pay your first instalment at the time of purchase, and the remainder every fortnight.
\r\n
\r\n
\r\n
\r\n
INSTANT APPROVAL
\r\n
You’ll know you’ve been approved within seconds. Orders ship as they would with any other form of payment, as quickly as you choose.
\r\n
\r\n
\r\n
\r\n
NOTHING EXTRA TO PAY
\r\n
With interest-free instalments, the only fees are for late payments. You can find your payment schedule in the Afterpay app and we'll send you regular reminders.
\r\n
\r\n
\r\n
\r\n
\r\n );\r\n }\r\n private _processAfterpayConfig(configResult: IConfiguration): void {\r\n const min = configResult.minimumAmount && configResult.minimumAmount.amount && configResult.minimumAmount.amount !== '' ?\r\n +configResult.minimumAmount.amount : 0;\r\n const max = configResult.maximumAmount && configResult.maximumAmount.amount && configResult.maximumAmount.amount !== '' ?\r\n +configResult.maximumAmount.amount : 0;\r\n this.setState({\r\n afterpayMin: min,\r\n afterpayMax: max\r\n });\r\n }\r\n private _calculateAfterpayInstalment(): void {\r\n // compare product price to min and max afterpay prices\r\n const price = this.props.price ? this.props.price : null;\r\n const isAfterpayAvailable = price && price > this.state.afterpayMin && price <= this.state.afterpayMax || false;\r\n const instalment = price && isAfterpayAvailable ? (price / 4).toFixed(2) : 0;\r\n\r\n if (isAfterpayAvailable !== this.state.afterpayAvailable || instalment !== this.state.afterpayInstalment) {\r\n this.setState({\r\n afterpayAvailable: isAfterpayAvailable,\r\n afterpayInstalment: price && isAfterpayAvailable ? (price / 4).toFixed(2) : 0\r\n });\r\n }\r\n }\r\n\r\n}\r\n\r\nexport default AfterPayInfo;","import { BuyboxErrorBlock, getConfigureErrors, getGenericError, IBuyboxCallbacks, IBuyboxData, IBuyboxProps, IBuyboxState } from '@msdyn365-commerce-modules/buybox';\r\nimport { Heading, INodeProps, IPopupProps, Popup } from '@msdyn365-commerce-modules/utilities';\r\nimport { IAddToCartFailureResult, PriceComponent } from '@msdyn365-commerce/components';\r\nimport { getUrlSync, IImageSettings } from '@msdyn365-commerce/core';\r\nimport { DeliveryOption, ProductDimension } from '@msdyn365-commerce/retail-proxy';\r\nimport * as React from 'react';\r\n\r\nexport interface IFindInStoreFailureResult {\r\n missingDimensions?: ProductDimension[];\r\n}\r\n\r\nexport interface IBuyboxFindInStoreViewProps {\r\n storeSelector?: React.ReactNode;\r\n heading?: React.ReactNode;\r\n description?: React.ReactNode;\r\n errors?: React.ReactNode;\r\n button?: React.ReactNode;\r\n productPickupOptionList?: React.ReactNode;\r\n\r\n modal?: React.ReactNode;\r\n\r\n ContainerProps: INodeProps;\r\n\r\n openFindInStoreDialog(): Promise;\r\n}\r\n\r\n// tslint:disable-next-line:max-func-body-length\r\nexport function getBuyboxFindInStore(props: IBuyboxProps, state: IBuyboxState, callbacks: IBuyboxCallbacks): IBuyboxFindInStoreViewProps | undefined {\r\n const {\r\n data,\r\n slots: {\r\n // @ts-ignore\r\n cittaStoreSelector,\r\n storeSelector\r\n },\r\n resources : {\r\n priceFree,\r\n originalPriceText,\r\n currentPriceText,\r\n findInStoreHeaderText,\r\n findInStoreDescriptionText,\r\n findInStoreLinkText,\r\n buyBoxGoToCartText,\r\n buyBoxContinueShoppingText,\r\n buyBoxSingleItemText,\r\n buyBoxMultiLineItemFormatText,\r\n buyBoxHeaderMessageText,\r\n descriptionTextToShowAllPickupOptions\r\n }\r\n } = props;\r\n\r\n const multiplePickupStoreSwitchName = 'Dynamics.AX.Application.RetailMultiplePickupDeliveryModeFeature';\r\n const product = data?.product?.result;\r\n const price = data?.productPrice?.result;\r\n const storeSelectorStateManager = data?.storeSelectorStateManager?.result;\r\n const cart = data?.cart?.result;\r\n const deliveryOptions = data?.deliveryOptions?.result;\r\n const retailMulitplePickupMFeatureState = data?.featureState?.result?.\r\n find(featureState => featureState.Name === multiplePickupStoreSwitchName)?.IsEnabled;\r\n\r\n const\r\n {\r\n errorState: {\r\n configureErrors,\r\n quantityError,\r\n otherError,\r\n errorHost\r\n },\r\n modalOpen,\r\n quantity\r\n } = state;\r\n\r\n const onClick = () => findInStoreOnClick(props, state, callbacks);\r\n\r\n if (!product || !storeSelectorStateManager) {\r\n return undefined;\r\n }\r\n\r\n const dialogStrings = {\r\n goToCartText: buyBoxGoToCartText,\r\n continueShoppingText: buyBoxContinueShoppingText,\r\n headerItemOneText: buyBoxSingleItemText,\r\n headerItemFormatText: buyBoxMultiLineItemFormatText,\r\n headerMessageText: buyBoxHeaderMessageText,\r\n freePriceText: priceFree,\r\n originalPriceText: originalPriceText,\r\n currentPriceText: currentPriceText\r\n };\r\n\r\n const priceComponent = price ? (\r\n ) : '';\r\n\r\n const defaultImageSettings: IImageSettings = {\r\n viewports: {\r\n xs: { q: `w=240&h=240&m=6`, w: 0, h: 0 },\r\n lg: { q: `w=240&h=240&m=6`, w: 0, h: 0 },\r\n xl: { q: `w=240&h=240&m=6`, w: 0, h: 0 }\r\n },\r\n lazyload: true\r\n };\r\n\r\n const popupProps: IPopupProps = {\r\n context: props.context,\r\n className: 'ms-buybox',\r\n id: props.id,\r\n typeName: props.typeName,\r\n data: {product: props.data.product?.result, price: props.data.productPrice?.result},\r\n dialogStrings: dialogStrings,\r\n imageSettings: defaultImageSettings,\r\n gridSettings: props.context.request.gridSettings,\r\n productQuantity: quantity,\r\n priceComponent: priceComponent,\r\n navigationUrl: getUrlSync('cart', props.context.actionContext),\r\n modalOpen: modalOpen,\r\n setModalOpen: callbacks.changeModalOpen\r\n };\r\n const renderModalPopup = ;\r\n\r\n return {\r\n ContainerProps: {\r\n className: 'ms-buybox__find-in-store'\r\n },\r\n\r\n storeSelector: cittaStoreSelector ? cittaStoreSelector[0] : storeSelector,\r\n\r\n openFindInStoreDialog: onClick,\r\n\r\n heading: (\r\n \r\n ),\r\n\r\n description: (\r\n

\r\n {findInStoreDescriptionText}\r\n

\r\n ),\r\n productPickupOptionList: retailMulitplePickupMFeatureState ? (\r\n \r\n

\r\n {descriptionTextToShowAllPickupOptions}\r\n

\r\n
    \r\n {deliveryOptions && deliveryOptions.DeliveryOptions!.map((item:DeliveryOption) => {\r\n return
  • {item.Description}
  • ;\r\n })\r\n }\r\n
\r\n
\r\n ): null,\r\n errors: (\r\n \r\n ),\r\n\r\n button: (\r\n \r\n {findInStoreLinkText}\r\n \r\n ),\r\n\r\n modal: renderModalPopup\r\n };\r\n}\r\n\r\n// tslint:disable-next-line: max-func-body-length\r\nasync function findInStoreOnClick(props: IBuyboxProps, state: IBuyboxState, callbacks: IBuyboxCallbacks): Promise {\r\n const {\r\n data: {\r\n storeSelectorStateManager: {result: storeSelectorStateManager },\r\n cart: {result: cart },\r\n productAvailableQuantity: { result: productAvailableQuantity }\r\n },\r\n resources,\r\n context,\r\n modules,\r\n } = props;\r\n\r\n const {\r\n selectedProduct,\r\n quantity\r\n } = state;\r\n\r\n let dataProduct = props.data.product.result;\r\n const multiplePickupStoreSwitchName = 'Dynamics.AX.Application.RetailMultiplePickupDeliveryModeFeature';\r\n const retailMulitplePickupMFeatureState = props.data?.featureState?.result?.\r\n find(featureState => featureState.Name === multiplePickupStoreSwitchName)?.IsEnabled;\r\n\r\n if (selectedProduct) {\r\n dataProduct = (await selectedProduct) || dataProduct;\r\n }\r\n\r\n if (!dataProduct || !storeSelectorStateManager) {\r\n return;\r\n }\r\n\r\n const product = dataProduct;\r\n\r\n const missingDimensions = product.Dimensions && product.Dimensions.filter(dimension => !(dimension.DimensionValue && dimension.DimensionValue.Value));\r\n\r\n let storeSelectorId: string = '';\r\n if (modules && Object.keys(modules).length > 0 && modules.cittaStoreSelector && modules.cittaStoreSelector.length > 0) {\r\n storeSelectorId = modules.cittaStoreSelector[0].id;\r\n } else if (modules && Object.keys(modules).length > 0 && modules.storeSelector && modules.storeSelector.length > 0) {\r\n storeSelectorId = modules.storeSelector[0].id;\r\n }\r\n\r\n\r\n if (missingDimensions && missingDimensions.length > 0) {\r\n if (callbacks.updateErrorState) {\r\n callbacks.updateErrorState(\r\n {\r\n errorHost: 'FINDINSTORE',\r\n configureErrors: getConfigureErrors(missingDimensions, resources),\r\n }\r\n );\r\n }\r\n } else {\r\n storeSelectorStateManager.openDialog({\r\n product,\r\n id : storeSelectorId,\r\n deliveryOptions: retailMulitplePickupMFeatureState ? props.data.deliveryOptions.result: undefined,\r\n onLocationSelected: (orgUnitLocation, deliveryMode) => {\r\n if (!cart) {\r\n return Promise.resolve();\r\n }\r\n\r\n const behavior = props.context?.app?.config?.addToCartBehavior;\r\n\r\n return cart.addProductToCart({product: product, count: quantity, location: orgUnitLocation, deliveryMode: deliveryMode})\r\n .then(result => {\r\n if (result.status === 'FAILED' && result.substatus === 'MAXQUANTITY') {\r\n callbacks.changeModalOpen(false);\r\n\r\n const productAvailability = state.productAvailableQuantity ?\r\n state.productAvailableQuantity.ProductAvailableQuantity :\r\n productAvailableQuantity && productAvailableQuantity.length?\r\n productAvailableQuantity[0].ProductAvailableQuantity: undefined;\r\n\r\n const failureResult: IAddToCartFailureResult = {failureReason: 'CARTACTIONFAILED', cartActionResult: {status: result.status, substatus: result.substatus}};\r\n callbacks.updateErrorState({\r\n errorHost: 'ADDTOCART',\r\n configureErrors: {},\r\n otherError: getGenericError(failureResult, cart, resources, context, product, productAvailability, orgUnitLocation)\r\n });\r\n } else {\r\n if((behavior === undefined || behavior === 'goToCart')) {\r\n const navigationUrl = getUrlSync('cart', context.actionContext);\r\n\r\n if (result.status === 'SUCCESS' && navigationUrl) {\r\n window.location.assign(navigationUrl);\r\n }\r\n } else if (behavior === 'showModal') {\r\n callbacks.updateErrorState({\r\n configureErrors: {}\r\n });\r\n callbacks.changeModalOpen(true);\r\n }\r\n }\r\n }).catch((error: Error) => {\r\n if (props.telemetry) {\r\n props.telemetry.exception(error);\r\n props.telemetry.debug('Unable to add product to cart');\r\n }\r\n return;\r\n });\r\n }\r\n }).catch((error: Error) => {\r\n if (props.telemetry) {\r\n props.telemetry.error(error.message);\r\n props.telemetry.debug('Unable to find in store');\r\n }\r\n return;\r\n });\r\n }\r\n\r\n return;\r\n}","import MsDyn365 from '@msdyn365-commerce/core';\r\n\r\nexport interface IClientDimension {\r\n width: number;\r\n height: number;\r\n}\r\n\r\n/* A type safe Dictionary */\r\nexport interface IDictionaryStringString {\r\n [key: string]: string;\r\n}\r\n\r\n/*\r\n* @interface IGrid\r\n* @classdesc - The IGrid interface contract.\r\n* @export\r\n*/\r\nexport interface IGrid {\r\n rows: number;\r\n columns: number;\r\n}\r\n\r\n/**\r\n * Clamp position between a range\r\n * @param {number} - Value to be clamped\r\n * @param {number} - Minimum value in range\r\n * @param {number} - Maximum value in range\r\n * @returns the clap value if min passed is less than max else returns 0\r\n */\r\nexport function clamp(value: number, min:number, max:number): number {\r\n if (min <= max) {\r\n return Math.min(Math.max(value, min), max);\r\n } else {\r\n return 0;\r\n }\r\n}\r\n\r\n/**\r\n * upper case the first letter of the string, if only one char exists on the string, uppercase it\r\n * @param {string} - Value to be upper cased\r\n * @returns the upper cased string of the passed value, if it has just one char uppercase it\r\n */\r\nexport function toUpperCaseFirstChar(value: string): string {\r\n if(value.length > 1) {\r\n return value.charAt(0).toUpperCase() + value.substr(1);\r\n }\r\n if(value.length === 1) {\r\n return value.charAt(0).toUpperCase();\r\n } else {\r\n return '';\r\n }\r\n}\r\n\r\nexport function htmlCollectionToArray(nodeList: HTMLCollection): HTMLElement[] {\r\n return Array.prototype.slice.call(nodeList);\r\n}\r\n\r\nexport function getCSS(element: HTMLElement, property: string): string {\r\n let style = element.style[property];\r\n\r\n if (!style) {\r\n style = getComputedStyle(element)[property];\r\n }\r\n\r\n return style;\r\n}\r\n\r\nexport function createThrottledEvent(listener: EventListener, threshold: number):\r\n(event: Event) => void {\r\n // tslint:disable-next-line:no-any\r\n let timer: any;\r\n let last = 0;\r\n\r\n return (event: Event) => {\r\n const now = Date.now();\r\n\r\n if (timer) {\r\n clearTimeout(timer);\r\n timer = undefined;\r\n }\r\n\r\n if (!!last && (now < last + threshold)) {\r\n timer = setTimeout(() => {\r\n last = Date.now();\r\n listener(event);\r\n },\r\n threshold - (now - last));\r\n } else {\r\n last = now;\r\n listener(event);\r\n }\r\n };\r\n}\r\n\r\nexport function addThrottledEvent(target: EventTarget, name: string, listener: EventListener, threshold: number = 150):\r\n (event: Event) => void {\r\n\r\n const throttledEventHandler = createThrottledEvent(listener, threshold);\r\n target.addEventListener(name, throttledEventHandler, false);\r\n\r\n return throttledEventHandler;\r\n}\r\n\r\n/* RTS utilities */\r\n/* TODO: Using any here for now, need to convert cssmodules into a dictionary in all modules */\r\n/* tslint:disable:no-any */\r\nexport function mapToCssModules(className: string = '', cssModule: any): string {\r\n if (!cssModule) {\r\n return className;\r\n }\r\n\r\n return className\r\n .split(' ')\r\n .map((c: string) => cssModule[c] || c)\r\n .join(' ');\r\n}\r\n\r\nexport function isRef(target: any): boolean {\r\n if (!target) {\r\n return false;\r\n }\r\n\r\n return (>target).current !== undefined;\r\n}\r\n\r\nexport function isElement(target: any): boolean {\r\n if (!target) {\r\n return false;\r\n }\r\n\r\n return (target).addEventListener !== undefined;\r\n}\r\n/* tslint:enable:no-any */\r\n\r\nexport const keyCodes = {\r\n esc: 27,\r\n space: 32,\r\n tab: 9,\r\n up: 38,\r\n down: 40,\r\n enter: 13\r\n};\r\n\r\ninterface IMap {\r\n [key: string]: T;\r\n}\r\nconst warned: IMap = {};\r\n\r\n/* Disable typeof check: https://github.com/Microsoft/tslint-microsoft-contrib/issues/415 */\r\n/* tslint:disable:no-typeof-undefined */\r\nexport function warnOnce(message: string): void {\r\n if (!warned[message]) {\r\n if (typeof console !== 'undefined') {\r\n throw new Error(message);\r\n }\r\n warned[message] = true;\r\n }\r\n}\r\n\r\nexport const canUseDOM = !!(\r\n MsDyn365.isBrowser && typeof window !== 'undefined' &&\r\n window.document &&\r\n window.document.createElement\r\n);\r\n/* tslint:enable:no-typeof-undefined */\r\n\r\nexport function findDOMElements(target: string): NodeListOf | string | null {\r\n try {\r\n if (typeof target === 'string' && canUseDOM) {\r\n let selection = document.querySelectorAll(target);\r\n\r\n if (!selection.length) {\r\n selection = document.querySelectorAll(`#${target}`);\r\n }\r\n\r\n if (!selection.length) {\r\n throw new Error();\r\n }\r\n return selection;\r\n }\r\n\r\n return target;\r\n } catch {\r\n console.error(`The target '${target}' could not be identified in the dom, tip: check spelling`);\r\n return null;\r\n }\r\n }\r\n\r\nexport function getTarget(target: string | HTMLElement | React.Ref): HTMLElement | React.Ref | null | string {\r\n const selection = findDOMElements(target);\r\n if (selection && selection.length) {\r\n return selection[0];\r\n }\r\n\r\n return target;\r\n}\r\n\r\nexport function getTargetElement(target: string | HTMLElement | React.Ref): HTMLElement | null {\r\n const targetElement = getTarget(target);\r\n if (isRef(targetElement)) {\r\n return (>targetElement).current;\r\n }\r\n if (isElement(targetElement)) {\r\n return targetElement;\r\n }\r\n\r\n return null;\r\n}\r\n\r\nexport const TransitionTimeouts = {\r\n Fade: 150,\r\n Collapse: 350,\r\n Modal: 300,\r\n Carousel: 600\r\n};\r\n\r\nexport type TransitionStatuses = 'entering' | 'entered' | 'exiting' | 'exited';\r\n\r\nexport const focusableElements = [\r\n 'a[href]',\r\n 'area[href]',\r\n 'input:not([disabled]):not([type=hidden])',\r\n 'select:not([disabled])',\r\n 'textarea:not([disabled])',\r\n 'button:not([disabled])',\r\n 'iframe',\r\n 'object',\r\n 'embed',\r\n '[tabindex]:not(.modal)',\r\n 'audio[controls]',\r\n 'video[controls]',\r\n '[contenteditable]:not([contenteditable=\"false\"])',\r\n];\r\n\r\n/*\r\n* @name - extend\r\n* @description - extends an object with properties/values from one or more others.\r\n* @export\r\n* @public\r\n* @param {any[]} parameters - The objects to merge together.\r\n* @returns {any} - The extended object.\r\n*/\r\n\r\n// tslint:disable-next-line: cyclomatic-complexity tslint:disable-next-line: no-any\r\nexport function extend(...parameters: any[]): any {\r\n if (!parameters || !parameters.length) {\r\n return null;\r\n }\r\n\r\n const recursive = (typeof (parameters[0]) === 'boolean') && parameters[0];\r\n\r\n if (parameters.length < 2) {\r\n return recursive ? null : parameters[0];\r\n }\r\n\r\n if (recursive && (parameters.length < 3)) {\r\n return parameters[1];\r\n }\r\n\r\n const target = recursive ? parameters[1] : parameters[0];\r\n\r\n for (let paramIndex = recursive ? 2 : 1; paramIndex < parameters.length; paramIndex++) {\r\n if(parameters[paramIndex] !== undefined) {\r\n for (const key of Object.keys(parameters[paramIndex])) {\r\n if (parameters[paramIndex].hasOwnProperty(key)) {\r\n const source = parameters[paramIndex][key];\r\n\r\n if (recursive) {\r\n let isSourceArray = Array.isArray\r\n ? Array.isArray(source)\r\n : ({}).toString.call(source) === '[object Array]';\r\n let isTargetArray = !!target[key] && (Array.isArray\r\n ? Array.isArray(target[key])\r\n : ({}).toString.call(target[key]) === '[object Array]');\r\n let isSourceObject = !isSourceArray && (typeof source === 'object');\r\n let isTargetObject = !isTargetArray && !!target[key] && (typeof target[key] === 'object');\r\n\r\n if (isSourceArray && isTargetArray) {\r\n for (let arrayIndex = 0; arrayIndex < source.length; arrayIndex++) {\r\n isSourceArray = Array.isArray\r\n ? Array.isArray(source[arrayIndex])\r\n : ({}).toString.call(source[arrayIndex]) === '[object Array]';\r\n isTargetArray = !!target[key][arrayIndex] && (Array.isArray\r\n ? Array.isArray(target[key][arrayIndex])\r\n : ({}).toString.call(target[key][arrayIndex]) === '[object Array]');\r\n isSourceObject = !isSourceArray && (typeof source[arrayIndex] === 'object');\r\n isTargetObject = !isTargetArray && !!target[key][arrayIndex] && (typeof target[key][arrayIndex] === 'object');\r\n\r\n if (isSourceArray) {\r\n target[key][arrayIndex] = extend(true, isTargetArray ? target[key][arrayIndex] : [], source[arrayIndex]);\r\n } else if (isSourceObject) {\r\n target[key][arrayIndex] = extend(true, isTargetObject ? target[key][arrayIndex] : {}, source[arrayIndex]);\r\n } else {\r\n target[key][arrayIndex] = source[arrayIndex];\r\n }\r\n }\r\n continue;\r\n } else if (isSourceArray) {\r\n target[key] = extend(true, [], source);\r\n continue;\r\n } else if (isSourceObject) {\r\n target[key] = extend(true, isTargetObject ? target[key] : {}, source);\r\n continue;\r\n }\r\n }\r\n\r\n target[key] = source;\r\n }\r\n }\r\n }\r\n }\r\n\r\n return target;\r\n}\r\n\r\n/*\r\n* @name - getDimensions\r\n* @description - Gets the dimension of an element.\r\n* @export\r\n* @param {HTMLElement} containerElement - The container element.\r\n* @returns {IClientDimension} - The client dimension.\r\n* {IClientDimension.width} - The client width\r\n* {IClientDimension.height} - The client height\r\n*/\r\nexport function getDimensions(containerElement: HTMLElement): IClientDimension | null {\r\n if (containerElement === null) {\r\n return null;\r\n }\r\n return {\r\n width: containerElement.clientWidth,\r\n height: containerElement.clientHeight\r\n };\r\n}\r\n","import classNames from 'classnames';\r\nimport * as React from 'react';\r\nimport * as ReactDOM from 'react-dom';\r\nimport { Manager } from 'react-popper';\r\nimport { keyCodes, mapToCssModules } from '../../shared-utils/utilities';\r\nimport { IDropdownProps } from './Dropdown.props';\r\n\r\nexport type DropdownDirection = 'up' | 'down' | 'left' | 'right';\r\nexport type DropdownAddonType = 'prepend' | 'append';\r\n\r\nexport interface IDropdownState {\r\n dropdownOpen: boolean;\r\n example2?: boolean;\r\n ddDropup?: boolean;\r\n ddDropleft?: boolean;\r\n ddDropright?: boolean;\r\n ddModifiers?: boolean;\r\n}\r\n\r\n/**\r\n * Dropdown component\r\n */\r\nexport default class Dropdown extends React.Component {\r\n public static defaultProps: Partial = {\r\n isOpen: false,\r\n direction: 'down',\r\n nav: false,\r\n active: false,\r\n addonType: false,\r\n inNavbar: false,\r\n setActiveFromChild: false,\r\n };\r\n\r\n public props: IDropdownProps;\r\n\r\n constructor(props: IDropdownProps) {\r\n super(props);\r\n this.props = props;\r\n this.addEvents = this.addEvents.bind(this);\r\n this.handleFirstItemFocus=this.handleFirstItemFocus.bind(this);\r\n this.handleDocumentClick = this.handleDocumentClick.bind(this);\r\n this.handleKeyDown = this.handleKeyDown.bind(this);\r\n this.removeEvents = this.removeEvents.bind(this);\r\n this.toggle = this.props.toggle ? this.props.toggle.bind(this) : this.toggle.bind(this);\r\n }\r\n\r\n public componentDidMount(): void {\r\n this.handleProps();\r\n }\r\n\r\n public componentDidUpdate(prevProps: IDropdownProps): void {\r\n if (this.props.isOpen !== prevProps.isOpen) {\r\n this.handleProps();\r\n }\r\n }\r\n\r\n public componentWillUnmount(): void {\r\n this.removeEvents();\r\n }\r\n\r\n public getContainer(): Element {\r\n return ReactDOM.findDOMNode(this) as Element;\r\n }\r\n public handleFirstItemFocus(): void {\r\n const container = this.getContainer();\r\n const items = container.querySelectorAll(`.dropdown-item:not(.disabled)`);\r\n if (!items.length) { return; }\r\n const element = items[0] as HTMLElement;\r\n if (element) {\r\n element.focus();\r\n }\r\n }\r\n public addEvents = () => {\r\n ['click', 'touchstart', 'keyup'].forEach(\r\n (event: string) => document.addEventListener(event, this.handleDocumentClick, true)\r\n );\r\n }\r\n\r\n public removeEvents(): void {\r\n ['click', 'touchstart', 'keyup'].forEach(\r\n (event: string) => document.removeEventListener(event, this.handleDocumentClick, true)\r\n );\r\n }\r\n\r\n // tslint:disable-next-line:no-any\r\n public handleDocumentClick (e: any): void {\r\n if (e && (e.which === 3 || (e.type === 'keyup' && e.which !== keyCodes.tab))) { return; }\r\n const container = this.getContainer();\r\n\r\n if (container.contains(e.target) && container !== e.target && (e.type !== 'keyup' || e.which === keyCodes.tab)) {\r\n return;\r\n }\r\n\r\n this.toggle(e);\r\n }\r\n\r\n // tslint:disable-next-line:cyclomatic-complexity\r\n public handleKeyDown(\r\n // tslint:disable-next-line:no-any\r\n e: any\r\n ): void {\r\n\r\n const tagName = e.target.tagName;\r\n if ([keyCodes.esc, keyCodes.up, keyCodes.down, keyCodes.space, keyCodes.enter].indexOf(e.which) === -1 ||\r\n (tagName === 'BUTTON' && (e.which === keyCodes.space || e.which === keyCodes.enter)) ||\r\n (tagName === 'INPUT' || tagName === 'TEXTAREA')) {\r\n return;\r\n }\r\n\r\n e.preventDefault();\r\n if (this.props.disabled) { return; }\r\n\r\n const container = this.getContainer();\r\n\r\n if ((e.which === keyCodes.space || e.which === keyCodes.enter) && this.props.isOpen && container !== e.target) {\r\n e.target.click();\r\n }\r\n\r\n if (e.which === keyCodes.esc || !this.props.isOpen) {\r\n this.toggle(e);\r\n const expandedElement = container.querySelector('.dropdown-toggle') as HTMLElement;\r\n if (expandedElement) {\r\n expandedElement.focus();\r\n }\r\n return;\r\n }\r\n\r\n const menuClass = mapToCssModules('dropdown-menu', this.props.cssModule);\r\n const itemClass = mapToCssModules('dropdown-item', this.props.cssModule);\r\n const disabledClass = mapToCssModules('disabled', this.props.cssModule);\r\n\r\n const items = container.querySelectorAll(`.${menuClass} .${itemClass}:not(.${disabledClass})`);\r\n\r\n if (!items.length) { return; }\r\n\r\n let index = -1;\r\n for (let i = 0; i < items.length; i += 1) {\r\n if (items[i] === e.target) {\r\n index = i;\r\n break;\r\n }\r\n }\r\n\r\n if (e.which === keyCodes.up && index > 0) {\r\n index -= 1;\r\n }\r\n\r\n if (e.which === keyCodes.down && index < items.length - 1) {\r\n index += 1;\r\n }\r\n\r\n if (index < 0) {\r\n index = 0;\r\n }\r\n\r\n const element = items[index] as HTMLElement;\r\n\r\n if (element) {\r\n element.focus();\r\n }\r\n }\r\n\r\n public handleProps(): void {\r\n if (this.props.isOpen) {\r\n this.addEvents();\r\n this.handleFirstItemFocus();\r\n } else {\r\n this.removeEvents();\r\n }\r\n }\r\n\r\n public toggle(e: Event):void {\r\n\r\n if(!this.props.disabled) {\r\n this.props.toggle && this.props.toggle(e);\r\n } else {\r\n e.preventDefault();\r\n }\r\n }\r\n\r\n public render(): JSX.Element {\r\n const {\r\n className,\r\n cssModule,\r\n dropup,\r\n isOpen,\r\n group,\r\n size,\r\n nav,\r\n setActiveFromChild,\r\n active,\r\n addonType,\r\n toggle,\r\n disabled,\r\n direction,\r\n inNavbar,\r\n ...attrs\r\n } = this.props;\r\n\r\n const directionOrDefault = (direction === 'down' && dropup) ? 'up' : direction;\r\n\r\n attrs.tag = attrs.tag || (nav ? 'li' : 'div');\r\n\r\n let subItemIsActive = false;\r\n if (setActiveFromChild) {\r\n React.Children.map(\r\n this.props.children![1].props.children,\r\n // tslint:disable-next-line:no-any\r\n (dropdownItem: any) => {\r\n // tslint:disable-next-line:no-any\r\n const derefdropdownItem: any = dropdownItem;\r\n // tslint:disable-next-line:no-any\r\n const dropdownItemProps: any = derefdropdownItem.props;\r\n if (dropdownItemProps.active) {\r\n subItemIsActive = true;\r\n }\r\n }\r\n );\r\n }\r\n\r\n const classes = mapToCssModules(\r\n classNames(\r\n className,\r\n directionOrDefault !== 'down' && `drop${directionOrDefault}`,\r\n nav && active ? 'active' : false,\r\n setActiveFromChild && subItemIsActive ? 'active' : false,\r\n addonType ? `input-group-${addonType}` : false,\r\n group ? 'btn-group' : false,\r\n !!size ? `btn-group-${size}` : false,\r\n !group && !addonType ? 'dropdown' : false,\r\n isOpen ? 'show' : false,\r\n nav ? 'nav-item' : false\r\n ),\r\n cssModule\r\n );\r\n\r\n return ;\r\n }\r\n}\r\n","import classNames from 'classnames';\r\nimport * as React from 'react';\r\nimport { mapToCssModules } from '../../shared-utils/utilities';\r\n\r\nexport interface IDropdownItemProps {\r\n children?: Node | string;\r\n active?: boolean;\r\n disabled?: boolean;\r\n divider?: boolean;\r\n // @ts-ignore\r\n tag?: React.ReactType;\r\n header?: boolean;\r\n onClick?: Function;\r\n className?: string;\r\n cssModule?: object;\r\n toggle?: Function;\r\n href?:string;\r\n 'aria-setsize'?: number;\r\n 'aria-posinset'?: number;\r\n id?: string;\r\n}\r\n\r\n/**\r\n * Dropdown Item component\r\n */\r\nexport default class DropdownItem extends React.Component {\r\n public static defaultProps: Partial = {\r\n tag: 'button'\r\n };\r\n public props: IDropdownItemProps;\r\n\r\n constructor(props: IDropdownItemProps) {\r\n super(props);\r\n this.props = props;\r\n this.onClick = this.onClick.bind(this);\r\n this.getTabIndex = this.getTabIndex.bind(this);\r\n }\r\n\r\n public onClick(e: Event): void {\r\n if (this.props.disabled || this.props.header || this.props.divider) {\r\n e.preventDefault();\r\n\r\n return;\r\n }\r\n\r\n if (this.props.onClick) {\r\n this.props.onClick(e);\r\n }\r\n\r\n if (this.props.toggle) {\r\n this.props.toggle(e);\r\n }\r\n }\r\n\r\n public getTabIndex(): String {\r\n if (this.props.disabled || this.props.header || this.props.divider) {\r\n return '-1';\r\n }\r\n\r\n return '0';\r\n }\r\n\r\n public render(): JSX.Element {\r\n const tabIndex = this.getTabIndex();\r\n const {\r\n className,\r\n cssModule,\r\n divider,\r\n tag,\r\n header,\r\n active,\r\n toggle,\r\n ...props } = this.props;\r\n\r\n const toggleValue = toggle || false;\r\n const classes = mapToCssModules(\r\n classNames(\r\n className,\r\n {\r\n disabled: this.props.disabled,\r\n 'dropdown-item': !divider && !header,\r\n active: active,\r\n 'dropdown-header': header,\r\n 'dropdown-divider': divider\r\n }\r\n ),\r\n cssModule\r\n );\r\n\r\n let Tag = tag || 'button';\r\n if (Tag === 'button') {\r\n if (header) {\r\n Tag = 'h6';\r\n } else if (divider) {\r\n Tag = 'div';\r\n } else if (props.href) {\r\n Tag = 'a';\r\n }\r\n }\r\n\r\n return (\r\n \r\n );\r\n }\r\n}\r\n","import classNames from 'classnames';\r\nimport { Placement } from 'popper.js';\r\nimport * as React from 'react';\r\nimport { Popper } from 'react-popper';\r\nimport { mapToCssModules } from '../../shared-utils/utilities';\r\n\r\nconst noFlipModifier = { flip: { enabled: false } };\r\n\r\nexport interface IDropdownMenuProps extends React.DOMAttributes {\r\n // @ts-ignore\r\n component?: React.ReactType;\r\n right?: boolean;\r\n flip?: boolean;\r\n // tslint:disable-next-line:no-any\r\n popperModifiers?: any;\r\n className?: string;\r\n cssModule?: object;\r\n persist?: boolean;\r\n isOpen?: boolean;\r\n inNavbar?: boolean;\r\n placement?:Placement;\r\n // tslint:disable-next-line:no-any\r\n modifiers?: any;\r\n}\r\n\r\n/**\r\n * DropdownMenu component\r\n */\r\nexport default class DropdownMenu extends React.Component {\r\n public static defaultProps: Partial = {\r\n component: 'div',\r\n flip: true,\r\n inNavbar: false,\r\n isOpen: false\r\n };\r\n\r\n public props: IDropdownMenuProps;\r\n\r\n constructor(props: IDropdownMenuProps) {\r\n super(props);\r\n this.props = props;\r\n }\r\n\r\n public render(): JSX.Element {\r\n const {\r\n className,\r\n component,\r\n cssModule,\r\n right,\r\n flip,\r\n popperModifiers,\r\n persist,\r\n placement,\r\n isOpen,\r\n inNavbar,\r\n ...attrs\r\n } = this.props;\r\n const classes = mapToCssModules(\r\n classNames(className, 'dropdown-menu', {\r\n 'dropdown-menu-right': right,\r\n show: this.props.isOpen\r\n }),\r\n cssModule\r\n );\r\n\r\n if (persist || (this.props.isOpen && !this.props.inNavbar)) {\r\n attrs.modifiers = !flip\r\n ? {\r\n ...popperModifiers,\r\n ...noFlipModifier\r\n }\r\n : popperModifiers;\r\n\r\n return (\r\n \r\n );\r\n }\r\n // @ts-ignore\r\n const Tag: React.ReactType = this.props.component || 'div';\r\n\r\n return ;\r\n }\r\n}\r\n","import classNames from 'classnames';\r\nimport * as React from 'react';\r\nimport { mapToCssModules } from '../../shared-utils/utilities';\r\nimport { IButtonProps } from './Button.props';\r\n\r\n/**\r\n * Button component\r\n */\r\nexport default class Button extends React.Component {\r\n\r\n public static defaultProps: Partial = {\r\n tag: 'button',\r\n outline: false\r\n };\r\n public props: IButtonProps;\r\n\r\n constructor(props: IButtonProps) {\r\n super(props);\r\n this.props = props;\r\n this.onClick = this.onClick.bind(this); // put this in componentDidMount\r\n }\r\n\r\n public render(): JSX.Element {\r\n const {\r\n active,\r\n block,\r\n className,\r\n cssModule,\r\n color,\r\n outline,\r\n size,\r\n tag,\r\n innerRef,\r\n ...attributes\r\n } = this.props;\r\n const classes = mapToCssModules(\r\n classNames(\r\n className,\r\n 'btn',\r\n outline && color ? `btn-outline-${color}` : color && outline === false ? `btn-${color}` : color === undefined && outline === true ? `btn-outline` : '',\r\n size ? `btn-${size}` : false,\r\n block ? 'btn-block' : false,\r\n { active, disabled: this.props.disabled }\r\n ),\r\n cssModule\r\n );\r\n\r\n let Tag = tag || 'button';\r\n\r\n if (attributes.href && Tag === 'button') {\r\n Tag = 'a';\r\n }\r\n\r\n return (\r\n \r\n );\r\n }\r\n\r\n private onClick = (e: React.MouseEvent) => {\r\n if (this.props.disabled) {\r\n e.preventDefault();\r\n\r\n return;\r\n }\r\n\r\n if (this.props.onClick) {\r\n this.props.onClick(e);\r\n }\r\n }\r\n}\r\n","import * as React from 'react';\r\nimport { IDropdownState } from './Dropdown';\r\nimport { IDropdownProps } from './Dropdown.props';\r\nimport { DropdownContext } from './UncontrolledDropdown';\r\n\r\nexport interface IDropdownContextType {\r\n isOpen: boolean;\r\n inNavbar: boolean;\r\n // tslint:disable-next-line:prefer-method-signature\r\n toggle: () => void;\r\n}\r\n\r\n/**\r\n * Dropdown Provider\r\n */\r\nexport class DropdownContextProvider extends React.Component {\r\n\r\n constructor(props: IDropdownProps, state: IDropdownState) {\r\n super(props, state);\r\n this.state = {\r\n dropdownOpen: this.props.isOpen || false,\r\n };\r\n this.togglefn = this.togglefn.bind(this);\r\n }\r\n\r\n public render(): JSX.Element {\r\n\r\n return (\r\n \r\n {this.props.children}\r\n \r\n );\r\n }\r\n\r\n private togglefn = (): void => {\r\n this.setState((prevState: IDropdownState) => {\r\n return {\r\n dropdownOpen: !prevState.dropdownOpen\r\n };\r\n });\r\n }\r\n}\r\n","import * as React from 'react';\r\nimport Dropdown, { IDropdownState } from './Dropdown';\r\nimport { IDropdownProps } from './Dropdown.props';\r\nimport { DropdownContextProvider, IDropdownContextType } from './DropdownProvider';\r\n\r\n// tslint:disable-next-line:no-any no-empty\r\nexport const DropdownContext = React.createContext({ isOpen: false, toggle: () => {}, inNavbar: false });\r\n\r\n/**\r\n * Uncontrolled Dropdown component\r\n */\r\nexport default class UncontrolledDropdown extends React.Component {\r\n\r\n public render(): JSX.Element {\r\n return (\r\n \r\n \r\n {(context: IDropdownContextType) => {\r\n return(\r\n \r\n {this.props.children}\r\n \r\n );}}\r\n \r\n \r\n );\r\n }\r\n}\r\n","import classNames from 'classnames';\r\nimport * as React from 'react';\r\nimport { Target } from 'react-popper';\r\nimport { mapToCssModules } from '../../shared-utils/utilities';\r\nimport Button from '../citta-button/Button';\r\nimport { IDropdownContextType } from './DropdownProvider';\r\nimport { DropdownContext } from './UncontrolledDropdown';\r\n\r\nexport interface IDropdownToggleProps {\r\n caret?: boolean;\r\n color?: string;\r\n id?: string;\r\n children?: Node | string;\r\n className?: string;\r\n cssModule?: object;\r\n disabled?: boolean;\r\n onClick?: Function;\r\n 'aria-haspopup'?: boolean;\r\n split?: boolean;\r\n tag?: string;\r\n nav?: boolean;\r\n 'aria-label'?: string;\r\n href?: string;\r\n // tslint:disable-next-line:no-any prefer-method-signature\r\n toggle?: (e:any) => void;\r\n size?: string;\r\n useContext?: boolean;\r\n inNavbar?: boolean;\r\n isOpen?: boolean;\r\n 'aria-expanded'?: boolean;\r\n 'aria-labelledby'?: string;\r\n role?: string;\r\n}\r\n\r\n/**\r\n * Dropdown Toggle component\r\n */\r\nexport default class DropdownToggle extends React.Component {\r\n public static defaultProps: Partial = {\r\n 'aria-haspopup': true,\r\n color: 'secondary',\r\n isOpen: false\r\n };\r\n\r\n public context: IDropdownContextType | null;\r\n\r\n constructor(props: IDropdownToggleProps) {\r\n super(props);\r\n this._onClick = this._onClick.bind(this);\r\n this.context = null;\r\n }\r\n\r\n public render(): JSX.Element {\r\n // tslint:disable-next-line:prefer-const -- cannot make const as ...props gets reassigned later\r\n let { className, color, cssModule, caret, split, nav, tag, toggle, inNavbar, isOpen, useContext, ...props } = this.props;\r\n let destructProps = { ...props };\r\n const ariaLabel = props['aria-label'] || 'Toggle Dropdown';\r\n const classes = mapToCssModules(\r\n classNames(className, {\r\n 'dropdown-toggle': caret || split,\r\n 'dropdown-toggle-split': split,\r\n 'nav-link': nav\r\n }),\r\n cssModule\r\n );\r\n const children = props.children || {ariaLabel};\r\n\r\n let Tag: string | typeof Button;\r\n\r\n if (nav && !tag) {\r\n Tag = 'a';\r\n destructProps.href = '#';\r\n } else if (!tag) {\r\n Tag = Button;\r\n destructProps = {\r\n ...destructProps,\r\n // @ts-ignore -- color is missing from prop definition, where does this get applied to?\r\n color,\r\n cssModule\r\n };\r\n } else {\r\n Tag = tag;\r\n destructProps = {\r\n ...destructProps,\r\n // @ts-ignore -- tabIndex is missing from prop definition, need to extend htmlelement\r\n tabIndex: '0'\r\n };\r\n }\r\n\r\n if (useContext) {\r\n return (\r\n \r\n {(context: IDropdownContextType) => {\r\n this.context = context;\r\n return React.createElement(\r\n // tslint:disable-next-line:no-any\r\n context && context.inNavbar ? Tag : Target as any,\r\n {\r\n ...destructProps,\r\n className: classes,\r\n onClick: this._onClick,\r\n 'aria-expanded': this.context.isOpen,\r\n component: !(context && context.inNavbar) && Tag\r\n },\r\n // @ts-ignore\r\n children\r\n );\r\n }}\r\n \r\n );\r\n }\r\n return React.createElement(\r\n // tslint:disable-next-line:no-any\r\n inNavbar ? Tag : Target as any,\r\n {\r\n ...destructProps,\r\n className: classes,\r\n component: !inNavbar && Tag,\r\n onClick: this._onClick,\r\n 'aria-expanded': this.props.isOpen\r\n },\r\n // @ts-ignore\r\n children\r\n );\r\n }\r\n\r\n private _onClick(e: MouseEvent): void {\r\n if (this.props.disabled) {\r\n e.preventDefault();\r\n\r\n return;\r\n }\r\n\r\n if (this.props.nav && !this.props.tag) {\r\n e.preventDefault();\r\n }\r\n\r\n if (this.props.onClick) {\r\n this.props.onClick(e);\r\n }\r\n\r\n if (this.props.toggle) {\r\n this.props.toggle(e);\r\n } else if (this.context && this.context.toggle) {\r\n this.context.toggle();\r\n }\r\n }\r\n}\r\n","import { ITelemetry } from '@msdyn365-commerce/core';\r\nimport { ProductRefinerValue } from '@msdyn365-commerce/retail-proxy';\r\nimport { IRefineItemToggleNotification } from './refine-item-toggle-notification';\r\n\r\nexport function getText(element?: HTMLElement | Element): string {\r\n return !!element ? element.textContent || '' : '';\r\n}\r\n\r\nexport const enum KeyCodes {\r\n Back = 8,\r\n Tab = 9,\r\n Enter = 13,\r\n Shift = 16,\r\n Ctrl = 17,\r\n Alt = 18,\r\n Break = 19,\r\n CapsLock = 20,\r\n Escape = 27,\r\n Space = 32,\r\n PageUp = 33,\r\n PageDown = 34,\r\n End = 35,\r\n Home = 36,\r\n ArrowLeft = 37,\r\n ArrowUp = 38,\r\n ArrowRight = 39,\r\n ArrowDown = 40,\r\n Print = 44,\r\n Insert = 45,\r\n Delete = 46,\r\n Colon2 = 59, // Opera and Firefox\r\n Equals2 = 61, // Opera\r\n Equals3 = 107, // Firefox\r\n Minus2 = 109, // Opera and Firefox\r\n Period = 190,\r\n WindowsLeft = 91,\r\n WindowsRight = 92,\r\n WindowsOpera = 219, // Opera\r\n Menu = 93,\r\n NumPad0 = 96,\r\n NumPad1 = 97,\r\n NumPad2 = 98,\r\n NumPad3 = 99,\r\n NumPad4 = 100,\r\n NumPad5 = 101,\r\n NumPad6 = 102,\r\n NumPad7 = 103,\r\n NumPad8 = 104,\r\n NumPad9 = 105,\r\n NumPadMultiply = 106,\r\n NumPadPlus = 107,\r\n NumPadMinus = 109,\r\n NumPadDot = 110,\r\n NumPadDivide = 111,\r\n Function1 = 112,\r\n Function2 = 113,\r\n Function3 = 114,\r\n Function4 = 115,\r\n Function5 = 116,\r\n Function6 = 117,\r\n Function7 = 118,\r\n Function8 = 119,\r\n Function9 = 120,\r\n Function10 = 121,\r\n Function11 = 122,\r\n Function12 = 123,\r\n NavigationUp = 138,\r\n NavigationDown = 139,\r\n NavigationLeft = 140,\r\n NavigationRight = 141,\r\n NavigationAccept = 142,\r\n NumLock = 144,\r\n ScrollLock = 145,\r\n Colon = 186,\r\n Equals = 187,\r\n Comma = 188,\r\n Minus = 189,\r\n ForwardSlash = 191,\r\n Tilde = 192,\r\n GamepadA = 195,\r\n GamepadB = 196,\r\n GamepadX = 197,\r\n GamepadY = 198,\r\n GamepadRightButton = 199,\r\n GamepadLeftButton = 200,\r\n GamepadLeftTrigger = 201,\r\n GamepadRightTrigger = 202,\r\n GamepadDPadUp = 203,\r\n GamepadDPadDown = 204,\r\n GamepadDPadLeft = 205,\r\n GamepadDPadRight = 206,\r\n GamepadSelect = 207,\r\n GamepadStart = 208,\r\n GamepadLeftThumbstick = 209,\r\n GamepadRightThumbstick = 210,\r\n GamepadLeftThumbstickUp = 211,\r\n GamepadLeftThumbstickDown = 212,\r\n GamepadLeftThumbstickRight = 213,\r\n GamepadLeftThumbstickLeft = 214,\r\n GamepadRightThumbstickUp = 215,\r\n GamepadRightThumbstickDown = 216,\r\n GamepadRightThumbstickRight = 217,\r\n GamepadRightThumbstickLeft = 218,\r\n OpenBracket = 219,\r\n BackSlash = 220,\r\n CloseBracket = 221,\r\n Quote = 222\r\n}\r\n\r\n/**\r\n * Types of product refiner values\r\n */\r\nexport const enum ProductRefinerValueDataTypeValue {\r\n /**\r\n * Range slider is used for selections like price\r\n */\r\n Range = 1,\r\n\r\n /**\r\n * Range input is a different way to specify ranges and can be expressed with input boxes\r\n * as well as a set of discrete single-select type values\r\n */\r\n RangeInput = 4,\r\n\r\n /**\r\n * This is a discrete list item, either multi-select or single-select\r\n */\r\n List = 5,\r\n\r\n /**\r\n * Boolean types allows only single-select\r\n */\r\n Boolean = 6\r\n}\r\n\r\n/**\r\n * Types of product refiners\r\n */\r\nexport const enum ProductRefinerTypeValue {\r\n /**\r\n * Refiner values are single-select\r\n */\r\n Single = 0,\r\n\r\n /**\r\n * Refiner values are multi-select\r\n */\r\n Multi = 1\r\n}\r\n\r\n/**\r\n * ProductRefinerSource enum type.\r\n */\r\nexport const enum ProductRefinerSource {\r\n /**\r\n * The None member.\r\n */\r\n None = 0,\r\n /**\r\n * The Attribute member.\r\n */\r\n Attribute = 1,\r\n /**\r\n * The Category member.\r\n */\r\n Category = 2,\r\n /**\r\n * The Price member.\r\n */\r\n Price = 3,\r\n /**\r\n * The Rating member.\r\n */\r\n Rating = 4\r\n}\r\n\r\n/**\r\n * Find the refinement criterion associated with this product refiner value\r\n * @param productRefinerValue product refiner value to match\r\n * @param refinementCriteria selected refinement criteria\r\n */\r\nexport function findMatchingRefinementCriterion(\r\n productRefinerValue: ProductRefinerValue,\r\n refinementCriteria: ProductRefinerValue[]\r\n): ProductRefinerValue | undefined {\r\n // if the value is a range, then match only on data type value; otherwise match on item string\r\n return refinementCriteria.find(\r\n (refinementCriterion: ProductRefinerValue) => isMatchingRefinementCriterion(productRefinerValue, refinementCriterion)\r\n );\r\n}\r\n\r\n/**\r\n * Find the refinement criterion associated with this product refiner value\r\n * @param productRefinerValue product refiner value to match\r\n * @param refinementCriteria selected refinement criteria\r\n */\r\nexport function isMatchingRefinementCriterion(\r\n productRefinerValue: ProductRefinerValue,\r\n refinementCriterion: ProductRefinerValue\r\n): boolean {\r\n // if the value is a range, then match only on data type value; otherwise match on item string\r\n return (\r\n refinementCriterion.RefinerRecordId === productRefinerValue.RefinerRecordId &&\r\n refinementCriterion.RefinerSourceValue === productRefinerValue.RefinerSourceValue &&\r\n refinementCriterion.DataTypeValue === productRefinerValue.DataTypeValue &&\r\n (refinementCriterion.DataTypeValue === ProductRefinerValueDataTypeValue.Range ||\r\n refinementCriterion.LeftValueBoundString === productRefinerValue.LeftValueBoundString)\r\n );\r\n}\r\n\r\nexport function getUpdatedRefinementCriteria(\r\n itemToggleNotification: IRefineItemToggleNotification,\r\n currentRefinementCriteria: ProductRefinerValue[]): ProductRefinerValue[] {\r\n const updatedRefinementCriteria: ProductRefinerValue[] = [];\r\n let toggledItemFound = false;\r\n currentRefinementCriteria.forEach((selectedCriterion: ProductRefinerValue) => {\r\n if (isMatchingRefinementCriterion(itemToggleNotification.productRefinerValue, selectedCriterion)) {\r\n toggledItemFound = true;\r\n if (itemToggleNotification.isSelecting) {\r\n const next = {\r\n ...selectedCriterion,\r\n LeftValueBoundString: itemToggleNotification.rangeStart !== undefined && `${itemToggleNotification.rangeStart}` || selectedCriterion.LeftValueBoundString,\r\n RightValueBoundString: itemToggleNotification.rangeEnd !== undefined && `${itemToggleNotification.rangeEnd}` || selectedCriterion.RightValueBoundString,\r\n };\r\n updatedRefinementCriteria.push(next);\r\n\r\n } // else the item is being de-selected, so omit it from the refinement criteria\r\n } else {\r\n // keep existing criterion because it is not in the item toggle notification\r\n updatedRefinementCriteria.push(selectedCriterion);\r\n }\r\n });\r\n\r\n if (!toggledItemFound) {\r\n const next = {\r\n ...itemToggleNotification.productRefinerValue,\r\n LeftValueBoundString: itemToggleNotification.rangeStart !== undefined && `${itemToggleNotification.rangeStart}` || itemToggleNotification.productRefinerValue.LeftValueBoundString,\r\n RightValueBoundString: itemToggleNotification.rangeEnd !== undefined && `${itemToggleNotification.rangeEnd}` || itemToggleNotification.productRefinerValue.RightValueBoundString,\r\n };\r\n updatedRefinementCriteria.push(next);\r\n\r\n // If single select, then deselect any others in the parent refiner group\r\n if ((itemToggleNotification.productRefinerValue.DataTypeValue === ProductRefinerValueDataTypeValue.List || itemToggleNotification.productRefinerValue.DataTypeValue === ProductRefinerValueDataTypeValue.Boolean) &&\r\n itemToggleNotification.parentProductRefinerHierarchy.RefinerTypeValue === ProductRefinerTypeValue.Single) {\r\n itemToggleNotification.parentProductRefinerHierarchy.Values.forEach((child: ProductRefinerValue) => {\r\n if (child.RefinerRecordId === next.RefinerRecordId && child.LeftValueBoundString === next.LeftValueBoundString) {\r\n // do nothing\r\n } else {\r\n const matchingIndex = updatedRefinementCriteria.findIndex((criterion: ProductRefinerValue) => isMatchingRefinementCriterion(child, criterion));\r\n if (matchingIndex > -1) {\r\n updatedRefinementCriteria.splice(matchingIndex, 1);\r\n }\r\n }\r\n });\r\n }\r\n }\r\n\r\n return updatedRefinementCriteria;\r\n}\r\n\r\nexport function formatPrice(\r\n amount: string | undefined,\r\n currency: string | undefined,\r\n locale: string | undefined,\r\n telemetry: ITelemetry): string {\r\n if (!amount || !currency) {\r\n telemetry.trace(`[refine-menu.utilities.formatPrice] could not format price for ${amount} ${currency}`);\r\n return amount || '';\r\n }\r\n const priceAmount = (amount && Number(amount)) || 0;\r\n let result: string;\r\n\r\n try {\r\n result = new Intl.NumberFormat(locale, {\r\n style: 'currency',\r\n currencyDisplay: 'symbol',\r\n currency: currency\r\n }).format(priceAmount);\r\n } catch (e) {\r\n result = `${priceAmount} ${currency}`;\r\n telemetry.warning(`[refine-menu.utilities.formatPrice] Failed to format price for ${result}: ${e}`);\r\n }\r\n\r\n return result;\r\n}","import * as React from 'react';\r\nimport { IDropdownProps } from '../../citta-dropdown/Dropdown.props';\r\nimport { getText, KeyCodes } from '../utilities';\r\nimport { IRichSelectProps, IRichSelectSelectedItem } from './RichSelect.props';\r\n\r\nexport interface ISelectState {\r\n dropdownOpen: boolean;\r\n dropdownText: string;\r\n selectedIndices: number[];\r\n}\r\n\r\n/**\r\n * RichSelect - This component is a dropdown specifically created to mimic a select menu.\r\n * Can generate a native select for forms\r\n */\r\nexport default class RichSelect extends React.PureComponent {\r\n private ref: React.RefObject = React.createRef();\r\n private options: HTMLOptionElement[] = [];\r\n\r\n constructor(props: Readonly) {\r\n super(props);\r\n this._toggle = this._toggle.bind(this);\r\n this._click = this._click.bind(this);\r\n this._handleKeyDown = this._handleKeyDown.bind(this);\r\n // @ts-ignore\r\n const dropdown = React.Children.toArray(this.props.children)[0] as React.ReactElement;\r\n const toggle = dropdown.props.children![0];\r\n this.state = { dropdownOpen: !!dropdown.props.isOpen, dropdownText: toggle.props.children, selectedIndices: [] };\r\n }\r\n\r\n public componentDidMount(): void {\r\n if (this.props.form) {\r\n const select = document.createElement('select');\r\n select.setAttribute('aria-hidden', 'true');\r\n select.setAttribute('tabindex', '-1');\r\n select.setAttribute('name', this.props.name || this.props.id);\r\n select.className = 'sr-only';\r\n\r\n if (this.props.multiSelect) {\r\n select.setAttribute('multiple', 'true');\r\n }\r\n\r\n const items = this.ref.current!.getElementsByClassName('rich-select__item');\r\n\r\n for (let i = 0; i < items.length; i++) {\r\n const text = getText(items.item(i)!);\r\n const option = document.createElement('option');\r\n option.appendChild(document.createTextNode(text));\r\n this.options.push(option);\r\n select.appendChild(option);\r\n }\r\n\r\n this.ref.current!.children[0].appendChild(select);\r\n }\r\n }\r\n\r\n public render(): JSX.Element {\r\n // @ts-ignore\r\n let dropdown = React.Children.toArray(this.props.children)[0] as React.ReactElement;\r\n let toggle = dropdown.props.children![0];\r\n let menu = dropdown.props.children![1];\r\n let menuItems = React.Children.toArray(menu.props.children);\r\n // @ts-ignore\r\n menuItems = menuItems.map((item: React.ReactChild, index: number) => {\r\n item = item as React.ReactElement;\r\n return React.cloneElement(item, {\r\n 'aria-setsize': menuItems.length,\r\n 'aria-posinset': index + 1,\r\n 'data-index': index,\r\n id: item.props.id || `${this.props.id}-${index}`,\r\n active: this.state.selectedIndices.indexOf(index) > -1,\r\n onClick: this._click,\r\n onKeyDown: this._handleKeyDown,\r\n className: 'rich-select__item'\r\n });\r\n });\r\n\r\n toggle = React.cloneElement(toggle, {\r\n toggle: this._toggle,\r\n id: (this.props.id || ''),\r\n 'aria-expanded': this.state.dropdownOpen,\r\n isOpen: this.state.dropdownOpen,\r\n children: this.state.dropdownText,\r\n className: 'rich-select__toggle',\r\n onKeyDown: this._handleKeyDown,\r\n key: 'rich-select__toggle'\r\n });\r\n\r\n menu = React.cloneElement(menu, { isOpen: this.state.dropdownOpen, children: menuItems, className: 'rich-select__menu', key: 'rich-select__menu' });\r\n\r\n dropdown = React.cloneElement(dropdown, {\r\n toggle: this._toggle,\r\n className: 'rich-select',\r\n isOpen: this.state.dropdownOpen,\r\n children: [toggle, menu]\r\n });\r\n\r\n return
{dropdown}
;\r\n }\r\n\r\n private _toggle(): void {\r\n this.setState((prevState: ISelectState) => {\r\n return { dropdownOpen: !prevState.dropdownOpen };\r\n });\r\n }\r\n\r\n // tslint:disable-next-line:no-any\r\n private _handleKeyDown(event: any): void {\r\n // To handle focus on keydown event of toggle button\r\n if (event.target.className.includes('rich-select__toggle')) {\r\n event.stopPropagation();\r\n event.target.focus();\r\n }\r\n // To handle focus on keydown event of menu item\r\n if (event.target.className.includes('dropdown-item') && event.which === KeyCodes.Enter) {\r\n event.stopPropagation();\r\n this._click(event);\r\n this._toggle();\r\n }\r\n // To handle focus on toggle button on Escape key\r\n if (event.which === KeyCodes.Escape) {\r\n event.stopPropagation();\r\n this._toggle();\r\n const toggle = this.ref.current!.getElementsByClassName('rich-select__toggle').item(0) as HTMLElement;\r\n toggle.focus();\r\n }\r\n }\r\n\r\n private _click(event: Event): void {\r\n const target = event.target as HTMLElement;\r\n const index = parseInt(target.getAttribute('data-index')!, 10);\r\n const selectedIndices = this._toggleSelectIndex(target, index);\r\n const dropdownText = this.props.multiSelect ? this.state.dropdownText : getText(target);\r\n this._updateNativeSelect(index);\r\n\r\n this.setState((prevState: ISelectState) => {\r\n return { dropdownOpen: !prevState.dropdownOpen, dropdownText: dropdownText, selectedIndices: selectedIndices };\r\n });\r\n\r\n const toggle = this.ref.current!.getElementsByClassName('rich-select__toggle').item(0) as HTMLElement;\r\n toggle.focus();\r\n\r\n if (this.props.onChange) {\r\n const items = this.ref.current!.getElementsByClassName('rich-select__item');\r\n const selectedItems: IRichSelectSelectedItem[] = [];\r\n selectedIndices.forEach((selectedIndex: number) => {\r\n const element = items.item(selectedIndex)!;\r\n selectedItems.push({ id: element.getAttribute('id')!, value: getText(element), index: element.getAttribute('data-index')!});\r\n });\r\n\r\n this.props.onChange({ selectId: this.props.id, selectedItems: selectedItems });\r\n }\r\n }\r\n\r\n private _toggleSelectIndex(target: HTMLElement, index: number): number[] {\r\n if (this.props.multiSelect) {\r\n const selected = target.classList.contains('active');\r\n const selectedIndex = this.state.selectedIndices.indexOf(index);\r\n const indices = this.state.selectedIndices;\r\n\r\n if (selected) {\r\n indices.splice(selectedIndex, 1);\r\n } else {\r\n indices.push(index);\r\n }\r\n\r\n return indices;\r\n }\r\n\r\n return [index];\r\n }\r\n\r\n private _updateNativeSelect(index: number): void {\r\n if (this.props.form) {\r\n if (this.props.multiSelect) {\r\n if (this.options[index].getAttribute('selected')) {\r\n this.options[index].removeAttribute('selected');\r\n } else {\r\n this.options[index].setAttribute('selected', 'true');\r\n }\r\n } else {\r\n if (this.state.selectedIndices.length) {\r\n const currentIndex = this.state.selectedIndices[0];\r\n this.options[currentIndex].removeAttribute('selected');\r\n }\r\n\r\n this.options[index].setAttribute('selected', 'true');\r\n }\r\n }\r\n }\r\n}","/**\r\n * Copyright (c) 2018 Microsoft Corporation\r\n */\r\nimport {\r\n getPayloadObject,\r\n getTelemetryAttributes,\r\n IPayLoad,\r\n} from '@msdyn365-commerce-modules/utilities';\r\nimport * as React from 'react';\r\nimport {\r\n Dropdown as CittaDropdown,\r\n DropdownItem,\r\n DropdownMenu,\r\n DropdownToggle,\r\n} from '../../../components/citta-dropdown/index';\r\nimport RichSelect from '../rich-select/RichSelect';\r\nimport { IRichSelectOnChangeNotification } from '../rich-select/RichSelect.props';\r\nimport { IDropdownProps } from './';\r\nimport { IDropdownItemProps } from './dropdown.props';\r\n\r\ntype IDropdownState = {\r\n /**\r\n * @friendlyName selectedIndex\r\n * @description selected index\r\n */\r\n selectedIndex: string;\r\n};\r\n\r\n/**\r\n *\r\n * DropDown component\r\n * @extends {React.PureComponent}\r\n */\r\nexport class Dropdown extends React.PureComponent<\r\n IDropdownProps,\r\n IDropdownState\r\n> {\r\n private selectMenu: React.RefObject = React.createRef<\r\n HTMLSelectElement\r\n >();\r\n private payLoad: IPayLoad;\r\n\r\n constructor(props: IDropdownProps, state: IDropdownState) {\r\n super(props);\r\n this.state = {\r\n selectedIndex: '',\r\n };\r\n this.payLoad = getPayloadObject(\r\n 'click',\r\n props.telemetryContent!,\r\n this.props.dropdownName\r\n );\r\n }\r\n\r\n public componentDidMount(): void {\r\n if (this.selectMenu.current) {\r\n this.selectMenu.current.selectedIndex = 0;\r\n }\r\n }\r\n\r\n public render(): JSX.Element {\r\n const {\r\n dropdownId,\r\n dropdownList,\r\n dropdownName,\r\n dropdownToggleName,\r\n } = this.props;\r\n const attribute = getTelemetryAttributes(\r\n this.props.telemetryContent!,\r\n this.payLoad\r\n );\r\n return (\r\n // @ts-ignore\r\n \r\n \r\n \r\n {dropdownToggleName}\r\n \r\n \r\n {dropdownList.map(\r\n (item: IDropdownItemProps) =>\r\n item && (\r\n \r\n {item.value}\r\n \r\n )\r\n )}\r\n \r\n \r\n \r\n );\r\n }\r\n private _onChanged = async (\r\n notification: IRichSelectOnChangeNotification\r\n ) => {\r\n this.setState({\r\n selectedIndex:\r\n notification.selectedItems.length > 0\r\n ? notification.selectedItems[0].id\r\n : '',\r\n });\r\n if (this.props.onChange) {\r\n await this.props.onChange({\r\n dropdownId: this.props.dropdownId,\r\n selectId:\r\n notification.selectedItems.length > 0\r\n ? notification.selectedItems[0].id\r\n : '',\r\n selectedValue:\r\n notification.selectedItems.length > 0\r\n ? notification.selectedItems[0].value\r\n : '',\r\n });\r\n }\r\n };\r\n}\r\n","import * as React from 'react';\r\n\r\nimport { getTelemetryObject, INodeProps, ITelemetryContent } from '@msdyn365-commerce-modules/utilities';\r\nimport { ProductDimensionFull } from '@msdyn365-commerce/commerce-entities';\r\nimport { IActionContext } from '@msdyn365-commerce/core';\r\nimport { ProductDimension, SimpleProduct } from '@msdyn365-commerce/retail-proxy';\r\n\r\n\r\n// import { IBuyboxData, IBuyboxResources } from '@msdyn365-commerce-modules/buybox';\r\n\r\nimport { ICittaBuyboxData, ICittaBuyboxResources } from '../../../../../src/modules/citta-buybox'\r\n\r\n// @ts-ignore\r\nimport { Dropdown, IDropdownItemProps, IDropdownOnSelectionChangeNotification } from '../../../../components/citta-buybox/dropdown/dropdown';\r\n\r\nexport interface IBuyboxProductConfigureProps {\r\n product: SimpleProduct;\r\n productAttributes: SimpleProduct;\r\n channelConfiguration: SimpleProduct;\r\n\r\n productDimensions: ProductDimensionFull[];\r\n // resources: IBuyboxResources;\r\n resources: ICittaBuyboxResources;\r\n channelId: number;\r\n actionContext: IActionContext;\r\n errors: { [configureId: string]: string | undefined };\r\n\r\n dimensionChanged?(newValue: number): void;\r\n}\r\n\r\nexport interface IBuyboxProductConfigureDropdownViewProps {\r\n ContainerProps: INodeProps;\r\n LabelContainerProps: INodeProps;\r\n\r\n heading: React.ReactNode;\r\n errors?: React.ReactNode;\r\n\r\n select: React.ReactNode;\r\n}\r\n\r\nexport interface IBuyboxProductConfigureViewProps {\r\n ContainerProps: INodeProps;\r\n dropdowns: IBuyboxProductConfigureDropdownViewProps[];\r\n}\r\n\r\nlet telemetryContent: ITelemetryContent;\r\n\r\nexport function getBuyboxProductConfigure(props: any, state: any, callbacks: any): IBuyboxProductConfigureViewProps | undefined {\r\n const {\r\n data: {\r\n product: { result: product },\r\n productDimensions: { result: productDimensions },\r\n },\r\n resources,\r\n } = props;\r\n\r\n const\r\n {\r\n errorState: {\r\n configureErrors,\r\n }\r\n } = state;\r\n\r\n // console.log('productDimensions', productDimensions)\r\n\r\n const\r\n {\r\n getDropdownName\r\n } = callbacks;\r\n // console.log('callbacks', callbacks)\r\n\r\n if (!product || !productDimensions) {\r\n return undefined;\r\n }\r\n\r\n const onChanged = async (notification: IDropdownOnSelectionChangeNotification) =>\r\n _onChanged(notification, callbacks.dimensionSelectedAsync);\r\n\r\n telemetryContent = getTelemetryObject(props.context.request.telemetryPageName!, props.friendlyName, props.telemetry);\r\n const dropdowns = productDimensions.map((productDimensionFull: ProductDimensionFull, id: number) => _mapProductDimensionFullToDropdownViewProps(productDimensionFull, resources, configureErrors, getDropdownName, onChanged, props.data, id));\r\n // console.log(\"dropsowns\", dropdowns);\r\n if (!dropdowns || dropdowns.length === 0) {\r\n return undefined;\r\n }\r\n\r\n return {\r\n ContainerProps: {\r\n className: 'ms-buybox__configure'\r\n },\r\n dropdowns: dropdowns,\r\n\r\n };\r\n}\r\n\r\nconst _onChanged = async (\r\n notification: IDropdownOnSelectionChangeNotification,\r\n dimensionChanged: (newValue: number, selectedDimensionValue: string) => Promise,\r\n): Promise => {\r\n // console.log('notification.dropdownId', notification.dropdownId,'notification.selectId', notification.selectId);\r\n await dimensionChanged(+notification.dropdownId, notification.selectId);\r\n};\r\n\r\n\r\n\r\nconst _mapProductDimensionFullToDropdownViewProps =\r\n (\r\n productDimensionFull: ProductDimensionFull,\r\n // resources: IBuyboxResources,\r\n resources: ICittaBuyboxResources,\r\n configureErrors: { [configureId: string]: string | undefined },\r\n getDropdownName: (dimensionType: number, resources: ICittaBuyboxResources) => string,\r\n dropdownCallback: (notification: IDropdownOnSelectionChangeNotification) => Promise,\r\n // data: IBuyboxData,\r\n data: ICittaBuyboxData,\r\n id: number\r\n ): IBuyboxProductConfigureDropdownViewProps => {\r\n const dropdownName = getDropdownName(productDimensionFull.DimensionTypeValue, resources);\r\n // console.log('dropdownName', dropdownName)\r\n // console.log('dropdownCallback', dropdownCallback)\r\n const dropdownId = productDimensionFull.DimensionTypeValue.toString();\r\n\r\n let selectedDimensions: ProductDimension[] | undefined;\r\n selectedDimensions = data && data.product && data.product.result && data.product.result.Dimensions && data.product.result.Dimensions.length ? data.product.result.Dimensions : [];\r\n const dropdownToggleName = selectedDimensions && selectedDimensions[id] && selectedDimensions[id].DimensionValue &&\r\n selectedDimensions[id].DimensionValue!.Value || resources.selectDimensionFormatString.replace('{0}', dropdownName.toLocaleLowerCase());\r\n\r\n const result = data && data.productAttributes && data.productAttributes.result || [];\r\n let Onlinesizeimperial;\r\n let dropdownListStr: string | undefined = \"\";\r\n\r\n // result!.forEach(res => {\r\n // if(res.Name === \"Online size imperial\" && res.TextValue){\r\n // Onlinesizeimperial = res.TextValue;\r\n // }\r\n // });\r\n\r\n for (var i = 0; i < result!.length; i++) {\r\n if (result![i].Name === \"Size\" && result![i].TextValue) {\r\n Onlinesizeimperial = result![i].TextValue || \"\";\r\n }\r\n }\r\n\r\n\r\n // result?.forEach(res => {\r\n // if(res.Name === \"AssociatedVariantSizesImperial\" && res.TextValue){\r\n // dropdownListStr = res.TextValue\r\n // }\r\n // })\r\n\r\n\r\n for (var i = 0; i < result!.length; i++) {\r\n if (result![i].Name === \"AssociatedVariantSizesImperial\" && result![i].TextValue) {\r\n dropdownListStr = result![i].TextValue;\r\n }\r\n }\r\n\r\n\r\n const dropDownListArr = dropdownListStr?.split('|');\r\n const country = data && data.channelConfiguration && data.channelConfiguration.result && data.channelConfiguration.result.Currency;\r\n\r\n\r\n\r\n const dropdownList: IDropdownItemProps[] = productDimensionFull.DimensionValues\r\n ? productDimensionFull.DimensionValues.map(dimensionValue => {\r\n return {\r\n value: dimensionValue.Value || '',\r\n id: dimensionValue.RecordId.toString()\r\n };\r\n })\r\n : [];\r\n\r\n\r\n let dropdownListImperial = JSON.parse(JSON.stringify(dropdownList));\r\n\r\n for (var i = 0; i < dropdownList.length; i++) {\r\n dropdownListImperial[i].value = dropDownListArr && dropDownListArr[i]\r\n }\r\n\r\n // console.log('dropdownListImperial', dropdownListImperial)\r\n const errorMessage = configureErrors[dropdownId];\r\n\r\n return {\r\n ContainerProps: {\r\n className: 'ms-buybox__dropdown'\r\n },\r\n LabelContainerProps: {\r\n tag: 'label',\r\n className: 'ms-buybox__dropdown-quantity-label',\r\n htmlFor: `ms-buybox__dropown-quantity-input-${dropdownId}`\r\n },\r\n errors: errorMessage && (\r\n \r\n \r\n ),\r\n heading: (\r\n
{dropdownName}
\r\n ),\r\n select: (\r\n dropdownList.length <= 1 ? (\r\n
\r\n
\r\n {id === 1 && country === 'USD' && Onlinesizeimperial ? Onlinesizeimperial : dropdownToggleName}\r\n {/* {dropdownToggleName} */}\r\n
\r\n
) :\r\n (\r\n \r\n )\r\n )\r\n };\r\n };","import { getConfigureErrors, getGenericError, getQuantityError, IBuyboxCallbacks, IBuyboxData, IBuyboxProps, IBuyboxResources, IBuyboxState, IBuyboxViewProps } from '@msdyn365-commerce-modules/buybox';\r\nimport { Alert, Button, format, getTelemetryObject, Heading, INodeProps, ITelemetryContent, Quantity } from '@msdyn365-commerce-modules/utilities';\r\nimport {\r\n AddToWishlistComponent,\r\n IAddToCartFailureResult,\r\n IWishlistActionErrorResult,\r\n PriceComponent,\r\n RatingComponent\r\n} from '@msdyn365-commerce/components';\r\nimport { getUrlSync, IImageSettings } from '@msdyn365-commerce/core';\r\nimport { AttributeValue } from '@msdyn365-commerce/retail-proxy/dist/Entities/CommerceTypes.g';\r\nimport classnames from 'classnames';\r\nimport * as React from 'react';\r\nimport { IBuyboxProps as IBuyboxExtentionProps } from '../../definition-extensions/buybox.ext.props.autogenerated';\r\nimport { IBuyBoxData } from '../buybox.data';\r\nimport AddToCartComponent from './add-to-cart.component';\r\n\r\n\r\nexport function getBuyBoxInventoryLabel(props: IBuyboxProps): React.ReactElement | undefined {\r\n const {\r\n data: { productAvailableQuantity: { result: productAvailableQuantity} },\r\n } = props;\r\n if(!productAvailableQuantity || !productAvailableQuantity.length) {\r\n return undefined;\r\n }\r\n if(productAvailableQuantity &&\r\n productAvailableQuantity.length&&\r\n productAvailableQuantity[0].StockLevelLabel) {\r\n const inventoryClassName = productAvailableQuantity[0].StockLevelCode?\r\n `ms-buybox__inventory-label ms-buybox__inventory-code-${productAvailableQuantity[0].StockLevelCode.toLowerCase()}`:\r\n 'ms-buybox__inventory-label';\r\n return (
{productAvailableQuantity[0].StockLevelLabel}
);\r\n }\r\n\r\n return undefined;\r\n}\r\nexport function getBuyboxProductTitle(props: IBuyboxProps): React.ReactElement | undefined {\r\n const {\r\n data: { product: { result: product } },\r\n config: { titleHeadingTag = 'h1' }\r\n } = props;\r\n\r\n return product && (\r\n \r\n );\r\n}\r\n\r\nexport function getBuyboxProductDescription(props: IBuyboxProps & IBuyboxExtentionProps): React.ReactElement | undefined {\r\n const {\r\n data: { product: { result: product }, productAttributes: { result: productAttributes } }, config\r\n } = props;\r\n const isB2B = props.context?.request?.app?.platform?.enableDefaultOrderQuantityLimits === 'b2b';\r\n const description = product && product.Description ? product.Description.replace(/<[^>]+>/g, '') : '';\r\n const descriptionP2Name = config.webDescriptionP2Name && config.webDescriptionP2Name.toUpperCase() || 'WEB DESCRIPTION P2';\r\n const descriptionP3Name = config.webDescriptionP3Name && config.webDescriptionP3Name.toUpperCase() || 'WEB DESCRIPTION P3';\r\n const descriptionP4B2BName = config.webDescriptionP4B2BName && config.webDescriptionP4B2BName.toUpperCase() || 'WEB DESCRIPTION P4 B2B';\r\n const descriptionP2 = descriptionP2Name && getAttributeText(descriptionP2Name, productAttributes);\r\n const descriptionP3 = descriptionP3Name && getAttributeText(descriptionP3Name, productAttributes);\r\n const descriptionP4B2B = descriptionP4B2BName && getAttributeText(descriptionP4B2BName, productAttributes);\r\n return product && (\r\n
\r\n

{description}

\r\n {descriptionP2 &&\r\n

{descriptionP2}

\r\n }\r\n {descriptionP3 &&\r\n

{descriptionP3}

\r\n }\r\n {isB2B && descriptionP4B2B &&\r\n

{descriptionP4B2B}

\r\n }\r\n
\r\n );\r\n}\r\n\r\nfunction getAttributeText(attributeName: string, productAttributes: AttributeValue[] | undefined): string | undefined {\r\n if (productAttributes && productAttributes.length) {\r\n const filterAttributes = productAttributes.filter(\r\n attribute => attribute.Name && attribute.Name.toUpperCase() === attributeName\r\n );\r\n return filterAttributes &&\r\n filterAttributes.length > 0 &&\r\n filterAttributes[0].TextValue ? filterAttributes[0].TextValue : undefined;\r\n }\r\n return;\r\n}\r\n\r\nexport interface IBuyboxAddToCartViewProps {\r\n ContainerProps: INodeProps;\r\n errorBlock?: React.ReactNode;\r\n button?: React.ReactNode;\r\n}\r\n// tslint:disable-next-line:max-func-body-length\r\nexport function getBuyboxAddToCart(props: IBuyboxViewProps & IBuyboxExtentionProps, state: IBuyboxState, callbacks: IBuyboxCallbacks): IBuyboxAddToCartViewProps {\r\n const {\r\n id,\r\n typeName,\r\n context,\r\n data: { cart: { result: cart }, product: { result: product }, productPrice: { result: productPrice }, productAvailableQuantity: { result: productAvailableQuantity}, productDimensions: { result: productDimensions } },\r\n resources\r\n } = props;\r\n\r\n const\r\n {\r\n quantity,\r\n errorState: {\r\n configureErrors,\r\n quantityError,\r\n otherError,\r\n errorHost\r\n },\r\n selectedProduct,\r\n isUpdatingDimension\r\n } = state;\r\n\r\n const onAddToCartFailed = (result: IAddToCartFailureResult) => {\r\n let quantityErrorForState: string | undefined;\r\n let otherErrorForState: string | undefined = getGenericError(result, cart, resources, context, product, productAvailability, undefined);\r\n if (result.failureReason === 'OUTOFSTOCK') {\r\n quantityErrorForState = result.failureReason === 'OUTOFSTOCK' ? getQuantityError(result.stockLeft, resources) : undefined;\r\n } else if (result.failureReason === 'CARTACTIONFAILED'\r\n && result.cartActionResult\r\n && (result.cartActionResult.substatus === 'MAXQUANTITY' || result.cartActionResult.substatus === 'QUANTITYLIMITS')) {\r\n quantityErrorForState = getGenericError(result, cart, resources, context, product, productAvailability, undefined);\r\n otherErrorForState = undefined; // prevent error duplication in otherError and quantityError\r\n }\r\n\r\n callbacks.updateErrorState({\r\n errorHost: 'ADDTOCART',\r\n quantityError: quantityErrorForState,\r\n configureErrors: result.failureReason === 'MISSINGDIMENSION' ? getConfigureErrors(result.missingDimensions, resources) : {},\r\n otherError: otherErrorForState\r\n });\r\n };\r\n\r\n const dialogStrings = {\r\n goToCartText: resources.buyBoxGoToCartText,\r\n continueShoppingText: resources.buyBoxContinueShoppingText,\r\n headerItemOneText: resources.buyBoxSingleItemText,\r\n headerItemFormatText: resources.buyBoxMultiLineItemFormatText,\r\n headerMessageText: resources.buyBoxHeaderMessageText,\r\n freePriceText: resources.priceFree,\r\n originalPriceText: resources.originalPriceText,\r\n currentPriceText: resources.currentPriceText\r\n };\r\n\r\n const defaultImageSettings: IImageSettings = {\r\n viewports: {\r\n xs: { q: `w=240&h=240&m=6`, w: 0, h: 0 },\r\n lg: { q: `w=240&h=240&m=6`, w: 0, h: 0 },\r\n xl: { q: `w=240&h=240&m=6`, w: 0, h: 0 }\r\n },\r\n lazyload: true\r\n };\r\n const productAvailability = state.productAvailableQuantity ?\r\n state.productAvailableQuantity.ProductAvailableQuantity :\r\n productAvailableQuantity && productAvailableQuantity.length?\r\n productAvailableQuantity[0].ProductAvailableQuantity: undefined;\r\n\r\n const isLoading = props.data.productAvailableQuantity.status === 'LOADING';\r\n if (isLoading) {\r\n callbacks.changeUpdatingDimension(false);\r\n }\r\n const telemetryContent: ITelemetryContent = getTelemetryObject(props.context.request.telemetryPageName!,\r\n props.friendlyName,\r\n props.telemetry);\r\n return {\r\n ContainerProps: {\r\n className: 'ms-buybox__add-to-cart-container'\r\n },\r\n button: product && (\r\n \r\n ),\r\n errorBlock: (\r\n \r\n )\r\n };\r\n}\r\n\r\nexport function getBuyboxplacebackorderAddToCart(props: IBuyboxViewProps & IBuyboxExtentionProps, state: IBuyboxState, callbacks: IBuyboxCallbacks): IBuyboxAddToCartViewProps {\r\n const {\r\n id,\r\n typeName,\r\n context,\r\n data: { cart: { result: cart }, product: { result: product }, productPrice: { result: productPrice }, productAvailableQuantity: { result: productAvailableQuantity}, productDimensions: { result: productDimensions } },\r\n resources\r\n } = props;\r\n\r\n const\r\n {\r\n quantity,\r\n errorState: {\r\n configureErrors,\r\n quantityError,\r\n otherError,\r\n errorHost\r\n },\r\n selectedProduct,\r\n isUpdatingDimension\r\n } = state;\r\n\r\n const onAddToCartFailed = (result: IAddToCartFailureResult) => {\r\n let quantityErrorForState: string | undefined;\r\n let otherErrorForState: string | undefined = getGenericError(result, cart, resources, context, product, productAvailability, undefined);\r\n if (result.failureReason === 'OUTOFSTOCK') {\r\n quantityErrorForState = result.failureReason === 'OUTOFSTOCK' ? getQuantityError(result.stockLeft, resources) : undefined;\r\n } else if (result.failureReason === 'CARTACTIONFAILED'\r\n && result.cartActionResult\r\n && (result.cartActionResult.substatus === 'MAXQUANTITY' || result.cartActionResult.substatus === 'QUANTITYLIMITS')) {\r\n quantityErrorForState = getGenericError(result, cart, resources, context, product, productAvailability, undefined);\r\n otherErrorForState = undefined; // prevent error duplication in otherError and quantityError\r\n }\r\n\r\n callbacks.updateErrorState({\r\n errorHost: 'ADDTOCART',\r\n quantityError: quantityErrorForState,\r\n configureErrors: result.failureReason === 'MISSINGDIMENSION' ? getConfigureErrors(result.missingDimensions, resources) : {},\r\n otherError: otherErrorForState\r\n });\r\n };\r\n\r\n const dialogStrings = {\r\n goToCartText: resources.buyBoxGoToCartText,\r\n continueShoppingText: resources.buyBoxContinueShoppingText,\r\n headerItemOneText: resources.buyBoxSingleItemText,\r\n headerItemFormatText: resources.buyBoxMultiLineItemFormatText,\r\n headerMessageText: resources.buyBoxHeaderMessageText,\r\n freePriceText: resources.priceFree,\r\n originalPriceText: resources.originalPriceText,\r\n currentPriceText: resources.currentPriceText\r\n };\r\n\r\n const defaultImageSettings: IImageSettings = {\r\n viewports: {\r\n xs: { q: `w=240&h=240&m=6`, w: 0, h: 0 },\r\n lg: { q: `w=240&h=240&m=6`, w: 0, h: 0 },\r\n xl: { q: `w=240&h=240&m=6`, w: 0, h: 0 }\r\n },\r\n lazyload: true\r\n };\r\n const productAvailability = state.productAvailableQuantity ?\r\n state.productAvailableQuantity.ProductAvailableQuantity :\r\n productAvailableQuantity && productAvailableQuantity.length?\r\n productAvailableQuantity[0].ProductAvailableQuantity: undefined;\r\n\r\n const isLoading = props.data.productAvailableQuantity.status === 'LOADING';\r\n if (isLoading) {\r\n callbacks.changeUpdatingDimension(false);\r\n }\r\n const telemetryContent: ITelemetryContent = getTelemetryObject(props.context.request.telemetryPageName!,\r\n props.friendlyName,\r\n props.telemetry);\r\n return {\r\n ContainerProps: {\r\n className: 'ms-buybox__add-to-cart-container'\r\n },\r\n button: product && (\r\n \r\n ),\r\n errorBlock: (\r\n \r\n )\r\n };\r\n}\r\n\r\n\r\n\r\nexport function getBuyboxProductPrice(props: IBuyboxProps): React.ReactElement | undefined {\r\n const {\r\n id,\r\n typeName,\r\n context,\r\n data: { productPrice: { result: productPrice } },\r\n resources\r\n } = props;\r\n\r\n return productPrice && (\r\n \r\n );\r\n}\r\n\r\nexport function getBuyboxProductRating(props: IBuyboxProps): React.ReactElement | undefined {\r\n const {\r\n id,\r\n typeName,\r\n context,\r\n data: { ratingsSummary: { result: ratingsSummary } },\r\n resources\r\n } = props;\r\n\r\n const ratingComponent = ratingsSummary && ratingsSummary.averageRating && (\r\n \r\n ) || undefined ;\r\n\r\n return ratingsSummary && ratingComponent && (\r\n ratingComponent\r\n );\r\n}\r\n\r\nexport interface IBuyboxAddToWishlistViewProps {\r\n ContainerProps: INodeProps;\r\n errorBlock?: React.ReactNode;\r\n button?: React.ReactNode;\r\n}\r\nexport function getBuyboxProductAddToWishlist(props: IBuyboxProps, state: IBuyboxState, callbacks: IBuyboxCallbacks): IBuyboxAddToWishlistViewProps | undefined {\r\n const {\r\n id,\r\n typeName,\r\n context,\r\n data: {\r\n product: { result: product },\r\n wishlists: { result: wishlists }\r\n },\r\n resources\r\n } = props;\r\n\r\n const\r\n {\r\n errorState: {\r\n configureErrors,\r\n quantityError,\r\n otherError,\r\n errorHost\r\n },\r\n selectedProduct\r\n } = state;\r\n\r\n const onAddToWishlistFailed = (result: IWishlistActionErrorResult) => {\r\n callbacks.updateErrorState({\r\n errorHost: 'WISHLIST',\r\n configureErrors: result.status === 'MISSINGDIMENSION' ? getConfigureErrors(result.missingDimensions, resources) : {},\r\n });\r\n };\r\n\r\n return {\r\n ContainerProps: {\r\n className: 'ms-buybox__add-to-wishlist-container'\r\n },\r\n button: product && (\r\n \r\n ),\r\n errorBlock: (\r\n \r\n )\r\n };\r\n}\r\n\r\nexport interface IBuyboxProductQuantityViewProps {\r\n ContainerProps: INodeProps;\r\n LabelContainerProps: INodeProps;\r\n\r\n heading: React.ReactNode;\r\n errors?: React.ReactNode;\r\n\r\n input: React.ReactNode;\r\n}\r\nexport function getBuyboxProductQuantity(props: IBuyboxProps, state: IBuyboxState, callbacks: IBuyboxCallbacks): IBuyboxProductQuantityViewProps {\r\n const {\r\n resources,\r\n context: {\r\n app: {\r\n config: {\r\n maxQuantityForCartLineItem\r\n }\r\n }\r\n }\r\n } = props;\r\n\r\n const\r\n {\r\n quantity,\r\n errorState: {\r\n quantityError,\r\n }\r\n } = state;\r\n\r\n const onChange = (newValue: number) => {\r\n if (callbacks.updateQuantity) {\r\n callbacks.updateQuantity(newValue);\r\n }\r\n };\r\n\r\n return {\r\n ContainerProps: {\r\n className: 'ms-buybox__quantity'\r\n },\r\n LabelContainerProps: {\r\n tag: 'label',\r\n className: 'ms-buybox__product-quantity-label',\r\n htmlFor: 'ms-buybox__product-quantity-input'\r\n },\r\n heading: (\r\n
{resources.productQuantityHeading}
\r\n ),\r\n errors: quantityError && (\r\n \r\n \r\n ),\r\n input: (\r\n \r\n )\r\n };\r\n}\r\n\r\nexport interface IBuyboxShopSimilarLookViewProps {\r\n ContainerProps: INodeProps;\r\n errors?: React.ReactNode;\r\n input: React.ReactNode;\r\n}\r\n\r\nexport function getBuyboxShopSimilarLook(props: IBuyboxProps, state: IBuyboxState, callbacks: IBuyboxCallbacks): IBuyboxShopSimilarLookViewProps {\r\n const {\r\n resources,\r\n context,\r\n data: {\r\n product: { result: product }\r\n },\r\n } = props;\r\n\r\n const\r\n {\r\n errorState: {}\r\n } = state;\r\n\r\n const navigationUrl = () => {\r\n const searchURL = `${getUrlSync('search', context && context.actionContext)}?productId=${product && product.RecordId}`;\r\n document.location.href = searchURL;\r\n };\r\n\r\n return {\r\n ContainerProps: {\r\n className: 'ms-buybox__shopsimilarlooks'\r\n },\r\n input: (\r\n \r\n {resources.shopSimilarLooksText}\r\n \r\n )\r\n };\r\n}\r\n\r\nexport interface IBuyboxErrorBlockProps {\r\n configureErrors: { [configureId: string]: string | undefined };\r\n quantityError?: string;\r\n otherError?: string;\r\n resources: IBuyboxResources;\r\n showError: boolean;\r\n}\r\nexport const BuyboxErrorBlock: React.FC = ({ showError, configureErrors, quantityError, otherError, resources }) => {\r\n \r\n let errorMessages: (string | undefined)[] = [];\r\n\r\n errorMessages = Object.values(configureErrors).filter(message => message !== undefined);\r\n\r\n if (quantityError) {\r\n errorMessages.push(quantityError);\r\n }\r\n\r\n if (otherError) {\r\n errorMessages.push(otherError);\r\n }\r\n\r\n return (\r\n 0} color='danger' assertive={true} aria-label={resources.buyboxErrorMessageHeader} >\r\n \r\n {errorMessages.map((message) => {\r\n if (message) {\r\n return (\r\n
{message}
\r\n );\r\n } else {\r\n return null;\r\n }\r\n })}\r\n
\r\n );\r\n};","import * as React from 'react';\r\nimport { KeyCodes } from '@msdyn365-commerce-modules/utilities';\r\n\r\nexport interface ISidebarInfoProps {\r\n text: string;\r\n}\r\n\r\n// tslint:disable-next-line:no-empty-interface\r\ninterface ISidebarInfoState {\r\n showSidebar: boolean;\r\n}\r\n/**\r\n * Configuration entity interface.\r\n */\r\nexport interface IConfiguration {\r\n type?: string;\r\n description?: string;\r\n}\r\n// tslint:disable-next-line:class-name\r\nexport interface IDXC_GetConfigurationResponse {\r\n configuration?: IConfiguration[];\r\n success?: boolean;\r\n errorText?: string;\r\n}\r\n\r\n/**\r\n *\r\n * The PromoCode component renders the promocode section.\r\n * @extends {React.PureComponent}\r\n */\r\nclass SidebarInfo extends React.Component {\r\n private sidebarNode: React.RefObject;\r\n\r\n constructor(props: ISidebarInfoProps, state: ISidebarInfoState) {\r\n super(props);\r\n\r\n this.sidebarNode = React.createRef();\r\n this.state = {\r\n showSidebar: false\r\n };\r\n this._toggleSidebar = this._toggleSidebar.bind(this);\r\n }\r\n\r\n public componentDidMount(): void {\r\n window && window.addEventListener('keyup', this._keyup);\r\n document.body && document.addEventListener('mousedown', this._handleClickOutside);\r\n }\r\n\r\n public componentWillUnmount(): void {\r\n window && window.removeEventListener('keyup', this._keyup, false);\r\n document.body && document.removeEventListener('mousedown', this._handleClickOutside, false);\r\n }\r\n\r\n public render(): JSX.Element {\r\n \r\n const wrapperClassName = 'citta-sidebar';\r\n const { showSidebar } = this.state;\r\n const { text } = this.props\r\n if (!showSidebar) {\r\n return
\r\n Buy now pay later \r\n \r\n {text}\r\n \r\n
\r\n }\r\n return (\r\n
\r\n
\r\n
\r\n \r\n Buy now, pay later\r\n \r\n \r\n {text}\r\n \r\n
\r\n\r\n
\r\n x\r\n
\r\n { /* @ts-ignore */ }\r\n {this.props.children}\r\n
\r\n
\r\n
\r\n );\r\n }\r\n private _toggleSidebar(): void {\r\n window.document.body.classList.toggle('menu-open', !this.state.showSidebar);\r\n window.document.body.classList.toggle('sidebar', !this.state.showSidebar);\r\n this.setState({\r\n showSidebar: !this.state.showSidebar\r\n });\r\n }\r\n\r\n private _keyup = (e: KeyboardEvent): void => {\r\n const { showSidebar } = this.state; \r\n if (showSidebar && e.keyCode === KeyCodes.Escape) {\r\n this._toggleSidebar();\r\n } \r\n };\r\n\r\n // tslint:disable-next-line:no-any\r\n private _handleClickOutside = (event: any) => {\r\n if (this.sidebarNode.current && !this.sidebarNode.current.contains(event.target)) {\r\n this._toggleSidebar();\r\n }\r\n };\r\n\r\n}\r\n\r\nexport default SidebarInfo;","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { IProductDimensionsWithAvailabilitiesFull } from '@msdyn365-commerce/commerce-entities';\nimport { ProductDimensionsMatrix } from '@msdyn365-commerce/components';\nimport { RichTextComponent } from '@msdyn365-commerce/core';\nimport { ICoreContext, getCatalogId } from '@msdyn365-commerce/core-internal';\nimport { ArrayExtensions, IDimensionsApp, validateCatalogId } from '@msdyn365-commerce-modules/retail-actions';\nimport { Button, Collapse, IModuleProps, isMobile, VariantType } from '@msdyn365-commerce-modules/utilities';\nimport classnames from 'classnames';\nimport * as React from 'react';\n\nimport { FeatureState } from '@msdyn365-commerce/retail-proxy';\nimport { IBulkPurchaseData } from './bulk-purchase.data';\nimport { IBulkPurchaseProps } from './bulk-purchase.props.autogenerated';\n\n/**\n * Additional optional props for the bulk purchase.\n */\nexport interface IBulkPurchaseExtendedProps extends IBulkPurchaseProps {\n productDimensions?: IProductDimensionsWithAvailabilitiesFull[];\n}\n\n/**\n * View for the bulk purchase module.\n */\nexport interface IBulkPurchaseViewProps extends IBulkPurchaseProps {\n container: IModuleProps;\n content: React.ReactElement;\n}\n\n/**\n * View for the bulk purchase module.\n */\nexport interface IBulkPurchaseState {\n isExpanded: boolean;\n}\n\n/**\n * Bulk-purchase module.\n */\nexport class BulkPurchase extends React.PureComponent {\n public static readonly className = 'ms-bulk-purchase';\n private readonly collapseRef: React.RefObject = React.createRef();\n\n public constructor(props: IBulkPurchaseExtendedProps) {\n super(props);\n\n this.state = {\n isExpanded: false\n };\n }\n\n public render(): React.ReactElement | null {\n const hasDimensionsInProps = ArrayExtensions.hasElements(this.props.productDimensions);\n const hasDimensionsInData = ArrayExtensions.hasElements(this.props.data.productDimensions?.result);\n if (!hasDimensionsInProps && !hasDimensionsInData) {\n return null;\n }\n\n const viewProps: IBulkPurchaseViewProps = {\n ...this.props,\n container: {\n moduleProps: this.props,\n className: classnames(BulkPurchase.className, this.props.config.className)\n },\n content: this._renderCollapseContent(`${BulkPurchase.className}__content`)\n };\n\n return this.props.renderView(viewProps) as React.ReactElement;\n }\n\n private _renderCollapseContent(className: string): React.ReactElement {\n return (\n
\n {this._renderCollapseButton(`${className}__collapse-button`)}\n {this._renderCollapse(`${className}__collapse`)}\n
\n );\n }\n\n private _renderCollapseButton(className: string): React.ReactElement {\n return (\n \n {this.props.resources.bulkPurchaseHeaderTitle}\n \n );\n }\n\n /**\n *This function is being used to handel variant change dropdown.\n */\n private _dimensionDropDownChange = () => {\n this.collapseRef.current?.reEvaluateHeight();\n };\n\n private _renderCollapse(className: string): React.ReactElement {\n return (\n \n {this._renderMainContent(`${className}__main-content`)}\n \n );\n }\n\n private _renderMainContent(className: string): React.ReactElement {\n const isMobileDevice = isMobile({ variant: VariantType.Viewport, context: this.props.context.request }) === 'xs';\n\n return (\n
\n {!isMobileDevice && (\n
\n \n
\n )}\n {this._renderMatrix(`${className}__matrix-container`)}\n
\n );\n }\n\n private _renderMatrix(className: string): React.ReactElement {\n const hasDimensionsInProps = ArrayExtensions.hasElements(this.props.productDimensions);\n const channelMultipleCatalogsFeature = 'Dynamics.AX.Application.ChannelMultipleCatalogsFeature';\n const { featureState } = this.props.data;\n const isMultipleCatalogsFeatureEnabled =\n featureState?.result?.find((item: FeatureState) => item.Name === channelMultipleCatalogsFeature)?.IsEnabled || false;\n const catalogId = getCatalogId(this.props.context.request);\n validateCatalogId(catalogId);\n return (\n }\n data={{\n dimensions: hasDimensionsInProps ? this.props.productDimensions! : this.props.data.productDimensions!.result!,\n orderTemplates: this.props.data.orderTemplates?.result,\n customerInformation: this.props.data.customerInformation?.result\n }}\n resources={this.props.resources}\n dimensionOnChange={this._dimensionDropDownChange}\n isMultipleCatalogFeatureEnabledInHq={isMultipleCatalogsFeatureEnabled}\n catalogId={catalogId}\n />\n );\n }\n\n /**\n * Callback which toggles collapse mode.\n */\n private readonly _toggleCollapse = () => {\n this.setState(state => ({\n isExpanded: !state.isExpanded\n }));\n };\n}\n\nexport default BulkPurchase;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport {\n AddToCartComponent,\n AddToOrderTemplateComponent,\n AddToWishlistComponent,\n IAddToCartFailureResult,\n IAddToCartResources,\n IAddToOrderTemplateDialogResources,\n IDuplicateItemsWhenAddingToOrderTemplateDialogResources,\n IItemAddedToOrderTemplateDialogResources,\n IOrderTemplateActionErrorResult,\n IOrderTemplateNameDialogResources,\n IWishlistActionErrorResult,\n PriceComponent,\n RatingComponent\n} from '@msdyn365-commerce/components';\nimport { getUrlSync, IImageSettings } from '@msdyn365-commerce/core';\nimport { ICartActionResult, ICartState } from '@msdyn365-commerce/global-state';\nimport { ProductAvailableQuantity, SimpleProduct } from '@msdyn365-commerce/retail-proxy';\nimport { ArrayExtensions, DeliveryMode, validateCatalogId } from '@msdyn365-commerce-modules/retail-actions';\nimport {\n Alert,\n Button,\n format,\n getPayloadObject,\n getTelemetryAttributes,\n getTelemetryObject,\n Heading,\n ITelemetryContent,\n Node,\n Quantity,\n TelemetryConstant\n} from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport {\n IBuyboxAddToCartViewProps,\n IBuyboxAddToOrderTemplateViewProps,\n IBuyboxAddToWishlistViewProps,\n IBuyboxCallbacks,\n IBuyboxCommonData,\n IBuyboxCommonResources,\n IBuyboxErrorBlockProps,\n IBuyboxExtentedProps,\n IBuyboxKeyInPriceViewProps,\n IBuyboxProductQuantityViewProps,\n IBuyboxShopSimilarLookViewProps,\n IBuyboxState,\n IProductDetails,\n ShopSimiliarButtonType\n} from './buyboxInterface';\nimport { getConfigureErrors, getGenericError, getQuantityError } from './utilities/error-utilities';\n\nconst _getClassNamePrefix = (typeName: string): string => {\n return typeName.toLocaleLowerCase() === 'quickview' ? 'ms-quickView' : 'ms-buybox';\n};\n\nexport function getBuyBoxInventoryLabel(\n props: IBuyboxExtentedProps,\n productDetails?: IProductDetails\n): React.ReactElement | undefined {\n const { typeName } = props;\n\n // Since the data action can return no value, and the type is non-nullable due to backward compatibility reasons, the null check is required.\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- Explicitly check for null/undefined.\n const productAvailableQuantity = props.data.productAvailableQuantity?.result ?? productDetails?.productAvailableQuantity;\n\n const className = _getClassNamePrefix(typeName);\n if (!productAvailableQuantity || !ArrayExtensions.hasElements(productAvailableQuantity)) {\n return undefined;\n }\n const shippingInventory = productAvailableQuantity.find(shipping => shipping.deliveryType === DeliveryMode.shipping);\n\n if (shippingInventory) {\n let inventoryClassName: string;\n if (shippingInventory.StockLevelCode) {\n inventoryClassName = `${className}__inventory-label ${className}__inventory-code-${shippingInventory.StockLevelCode.toLowerCase()}`;\n } else {\n inventoryClassName = `${className}__inventory-label`;\n }\n return (\n
\n {shippingInventory.StockLevelLabel}\n
\n );\n }\n\n return undefined;\n}\n\nexport function getBuyboxProductTitle(\n props: IBuyboxExtentedProps,\n productDetails?: IProductDetails\n): React.ReactElement | undefined {\n const {\n config: { titleHeadingTag = 'h1' },\n typeName\n } = props;\n const className = _getClassNamePrefix(typeName);\n\n // Since the data action can return no value, and the type is non-nullable due to backward compatibility reasons, the null check is required.\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- Explicitly check for null/undefined.\n const product = props.data.product?.result ?? productDetails?.product ?? undefined;\n\n return product && ;\n}\n\nexport function getBuyboxProductDescription(\n props: IBuyboxExtentedProps,\n productDetails?: IProductDetails\n): React.ReactElement | undefined {\n const { typeName } = props;\n const className = _getClassNamePrefix(typeName);\n\n // Since the data action can return no value, and the type is non-nullable due to backward compatibility reasons, the null check is required.\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- Explicitly check for null/undefined.\n const product = props.data.product?.result ?? productDetails?.product ?? undefined;\n\n return product &&

{product.Description}

;\n}\n\n/**\n * Gets the react node for product unit of measure display.\n * @param {IBuyboxExtentedProps} props The buybox module props.\n * @param {IProductDetails} productDetails The product details to be displyed in buybox.\n * @returns {React.ReactElement} The node representing markup for unit of measure component.\n */\nexport function getBuyboxProductUnitOfMeasure(\n props: IBuyboxExtentedProps,\n productDetails?: IProductDetails\n): React.ReactElement | undefined {\n const { typeName } = props;\n const className = _getClassNamePrefix(typeName);\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access -- Do not need type check for appsettings\n if (\n props.context.app.config &&\n (!props.context.app.config.unitOfMeasureDisplayType || props.context.app.config.unitOfMeasureDisplayType === 'none')\n ) {\n return undefined;\n }\n\n // Since the data action can return no value, and the type is non-nullable due to backward compatibility reasons, the null check is required.\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- Explicitly check for null/undefined.\n const product = props.data.product?.result ?? productDetails?.product;\n if (!product || !product.DefaultUnitOfMeasure) {\n props.telemetry.warning('Missing defult unit of measureor theproduct');\n return undefined;\n }\n\n return (\n
\n {product.DefaultUnitOfMeasure}\n
\n );\n}\n\nlet telemetryContent: ITelemetryContent;\n\n/**\n * On add to cart failed function.\n * @param props -The buybox module props.\n * @param state -The buybox module state.\n * @param callbacks -The buybox module callbacks.\n * @param defaultMinimumKeyInPrice -The default minimum key in price.\n * @param defaultMaximumKeyInPrice -The default maximum key in price.\n * @param cart -The cart state.\n * @param product -The simple product.\n * @param productAvailability -The product available quantity.\n * @returns Update error state.\n */\nconst onAddToCartFailed = (\n props: IBuyboxExtentedProps,\n state: IBuyboxState,\n callbacks: IBuyboxCallbacks,\n defaultMinimumKeyInPrice: number,\n defaultMaximumKeyInPrice: number,\n cart: ICartState,\n product: SimpleProduct,\n productAvailability: ProductAvailableQuantity | undefined\n) => (result: IAddToCartFailureResult) => {\n let quantityErrorForState: string | undefined;\n let customAmountErrorForState: string | undefined;\n let otherErrorForState: string | undefined = getGenericError(\n result,\n cart,\n props.resources,\n props.context,\n product,\n productAvailability,\n undefined\n );\n\n if (result.failureReason === 'OUTOFSTOCK') {\n quantityErrorForState = result.failureReason === 'OUTOFSTOCK' ? getQuantityError(result.stockLeft, props.resources) : undefined;\n } else if (\n result.failureReason === 'CARTACTIONFAILED' &&\n result.cartActionResult &&\n (result.cartActionResult.substatus === 'MAXQUANTITY' || result.cartActionResult.substatus === 'QUANTITYLIMITS')\n ) {\n quantityErrorForState = getGenericError(result, cart, props.resources, props.context, product, productAvailability, undefined);\n otherErrorForState = undefined; // Prevent error duplication in otherError and quantityError\n }\n\n if (result.failureReason === 'INVALIDCUSTOMAMOUNT') {\n if (state.keyInPriceAmount === undefined || state.keyInPriceAmount < (props.config.minimumKeyInPrice || defaultMinimumKeyInPrice)) {\n const formatedAmountLimit = props.context.cultureFormatter.formatCurrency(\n props.config.minimumKeyInPrice || defaultMinimumKeyInPrice\n );\n customAmountErrorForState = props.resources.invalidSmallCustomAmountText.replace('{minAmount}', formatedAmountLimit);\n } else if (state.keyInPriceAmount > (props.config.maximumKeyInPrice || defaultMaximumKeyInPrice)) {\n const formatedAmountLimit = props.context.cultureFormatter.formatCurrency(\n props.config.maximumKeyInPrice || defaultMaximumKeyInPrice\n );\n customAmountErrorForState = props.resources.invalidLargeCustomAmountText.replace('{maxAmount}', formatedAmountLimit);\n }\n }\n\n callbacks.updateErrorState({\n errorHost: 'ADDTOCART',\n quantityError: quantityErrorForState,\n configureErrors:\n result.failureReason === 'MISSINGDIMENSION'\n ? getConfigureErrors(result.missingDimensions, props.resources, product?.IsGiftCard)\n : {},\n customAmountError: customAmountErrorForState,\n otherError: otherErrorForState\n });\n};\n\n/**\n * On Item Add To Cart function.\n * @param typeName -Type name.\n * @param callbacks -Buybox Callbacks.\n * @returns Change modal open.\n */\nconst onItemAddedToCart = (typeName: string, callbacks: IBuyboxCallbacks) => (result: ICartActionResult) => {\n if (typeName === 'quickview') {\n callbacks.changeModalOpen(false);\n }\n};\n\nexport function getBuyboxAddToCart(\n props: IBuyboxExtentedProps,\n state: IBuyboxState,\n callbacks: IBuyboxCallbacks,\n defaultMinimumKeyInPrice: number,\n defaultMaximumKeyInPrice: number,\n productDetails?: IProductDetails,\n hasAvailableProducts?: boolean\n): IBuyboxAddToCartViewProps {\n const { id, typeName, context, resources } = props;\n\n // Since the data action can return no value, and the type is non-nullable due to backward compatibility reasons, the null check is required.\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- Explicitly check for null/undefined.\n const product = props.data.product?.result ?? productDetails?.product;\n\n // Since the data action can return no value, and the type is non-nullable due to backward compatibility reasons, the null check is required.\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- Explicitly check for null/undefined.\n const cart = props.data.cart?.result ?? productDetails?.cart;\n\n // Since the data action can return no value, and the type is non-nullable due to backward compatibility reasons, the null check is required.\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- Explicitly check for null/undefined.\n const productAvailableQuantity = props.data.productAvailableQuantity?.result ?? productDetails?.productAvailableQuantity;\n\n const {\n quantity,\n errorState: { configureErrors, quantityError, customAmountError, otherError, errorHost },\n selectedProduct,\n isUpdatingDimension,\n isUpdatingDeliveryOptions,\n isServiceItem\n } = state;\n\n const productAvailability = state.productAvailableQuantity\n ? state.productAvailableQuantity.ProductAvailableQuantity\n : productAvailableQuantity && productAvailableQuantity.length > 0\n ? productAvailableQuantity[0].ProductAvailableQuantity\n : undefined;\n\n const dialogStrings: IAddToCartResources = {\n goToCartText: resources.buyBoxGoToCartText,\n continueShoppingText: resources.buyBoxContinueShoppingText,\n closeNotificationLabel: resources.closeNotificationLabel,\n headerItemOneText: resources.buyBoxSingleItemText,\n headerItemFormatText: resources.buyBoxMultiLineItemFormatText,\n headerMessageText: resources.buyBoxHeaderMessageText,\n freePriceText: resources.priceFree,\n originalPriceText: resources.originalPriceText,\n currentPriceText: resources.currentPriceText,\n addedQuantityText: resources.addedQuantityText\n };\n\n const defaultImageSettings: IImageSettings = {\n viewports: {\n xs: { q: 'w=240&h=240&m=6', w: 0, h: 0 },\n lg: { q: 'w=240&h=240&m=6', w: 0, h: 0 },\n xl: { q: 'w=240&h=240&m=6', w: 0, h: 0 }\n },\n lazyload: true\n };\n\n const isProductQuantityLoading = typeName !== 'quickview' && props.data.productAvailableQuantity.status === 'LOADING';\n if (isProductQuantityLoading) {\n callbacks.changeUpdatingDimension(false);\n }\n\n const isLoadingDeliveryOptions = typeName !== 'quickview' && props.data.deliveryOptions?.status === 'LOADING';\n if (isLoadingDeliveryOptions && callbacks.changeUpdatingDeliveryOptions) {\n callbacks.changeUpdatingDeliveryOptions(false);\n }\n\n telemetryContent = getTelemetryObject(props.context.request.telemetryPageName!, props.typeName, props.telemetry);\n\n // Check if the product delivery mode is electronic\n const emailDeliveryModeCode = props.context.actionContext.requestContext.channel?.EmailDeliveryModeCode;\n // from quickview we are not getting deliveryoptions in props.data hence getting it from quickview state\n const deliveryOptions = typeName === 'quickview' ? state.productDeliveryOptions : props.data.deliveryOptions?.result;\n const isEmailDelivery =\n ArrayExtensions.hasElements(deliveryOptions?.DeliveryOptions) && deliveryOptions!.DeliveryOptions[0].Code === emailDeliveryModeCode;\n const className = _getClassNamePrefix(typeName);\n const isDisabled = isUpdatingDimension && typeName === 'quickview';\n\n return {\n ContainerProps: {\n className: `${className}__add-to-cart-container`\n },\n button: product && (\n \n ),\n errorBlock: (\n \n )\n };\n}\n\n/**\n * Get the React.ReactElement contains price.\n * @param props - The IBuyboxExtentedProps.\n * @param state - The buybox state.\n * @returns The React.ReactElement.\n */\nexport function getBuyboxProductPrice(props: IBuyboxExtentedProps, state: IBuyboxState): React.ReactElement | undefined {\n const { id, typeName, context, resources } = props;\n\n return (\n state.productPrice && (\n featureState.Name === 'Dynamics.AX.Application.RetailSearchPriceRangeFeature'\n )?.IsEnabled\n }\n isSalesAgreementPriceFeatureEnabled={\n props.data.featureState.result?.find(\n featureState => featureState.Name === 'Dynamics.AX.Application.RetailSalesAgreementPriceSupportFeature'\n )?.IsEnabled\n }\n priceResources={{\n priceRangeSeparator: resources.priceRangeSeparator,\n salesAgreementPricePrompt: resources.salesAgreementPricePrompt,\n salesAgreementExpirationDatePrompt: resources.salesAgreementExpirationDatePrompt,\n salesAgreementCommittedQuantityPrompt: resources.salesAgreementCommittedQuantityPrompt,\n salesAgreementRemainingQuantityPrompt: resources.salesAgreementRemainingQuantityPrompt\n }}\n freePriceText={resources.priceFree}\n originalPriceText={resources.originalPriceText}\n currentPriceText={resources.currentPriceText}\n />\n )\n );\n}\n\nexport function getBuyboxProductRating(\n props: IBuyboxExtentedProps,\n productDetails?: IProductDetails\n): React.ReactElement | undefined {\n const { id, typeName, context, resources } = props;\n\n // Since the data action can return no value, and the type is non-nullable due to backward compatibility reasons, the null check is required.\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- Explicitly check for null/undefined.\n const ratingsSummary = props.data.ratingsSummary?.result ?? productDetails?.ratingsSummary;\n if (!ratingsSummary || !ratingsSummary.averageRating) {\n return
;\n }\n const ratingComponent = (\n \n );\n\n return ratingComponent;\n}\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\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\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\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 order template failed function.\n * @param callbacks -Buybox callbacks.\n * @param resources -Buybox common 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\nexport function getBuyboxProductAddToOrderTemplate(\n props: IBuyboxExtentedProps,\n state: IBuyboxState,\n callbacks: IBuyboxCallbacks,\n isMultipleCatalogsFeatureEnabled?: boolean,\n catalogId?: number\n): IBuyboxAddToOrderTemplateViewProps | undefined {\n const {\n id,\n typeName,\n context,\n data: {\n orderTemplates: { result: orderTemplates },\n customerInformation: { result: customerInformation }\n },\n resources\n } = props;\n\n const product = props.data.product?.result;\n\n const {\n errorState: { configureErrors, quantityError, customAmountError, otherError, errorHost },\n quantity\n } = state;\n\n // If custom amount is selected, add-to-orderTemplate is disabled\n if (state.isCustomPriceSelected) {\n return undefined;\n }\n const className = _getClassNamePrefix(typeName);\n\n return {\n ContainerProps: {\n className: `${className}__add-to-order-template-container`\n },\n button: product && orderTemplates && (\n \n ),\n errorBlock: (\n \n )\n };\n}\n\n/**\n * Renders add to comparison button for the given product.\n * @param productComparisonButton - React element of the button.\n * @param product - Product information.\n * @param catalogId - Current catalog.\n * @param state - Buybox state.\n * @returns React element of the button.\n */\nexport function getBuyboxProductComparisonButton(\n productComparisonButton: React.ReactNode,\n product: SimpleProduct,\n catalogId: number,\n state: IBuyboxState\n): JSX.Element | undefined {\n if (state.isCustomPriceSelected) {\n return undefined;\n }\n\n validateCatalogId(catalogId);\n return React.cloneElement(productComparisonButton as React.ReactElement, { product, catalogId });\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\nexport function getBuyboxProductAddToWishlist(\n props: IBuyboxExtentedProps,\n state: IBuyboxState,\n callbacks: IBuyboxCallbacks,\n productDetails?: IProductDetails\n): IBuyboxAddToWishlistViewProps | undefined {\n const {\n id,\n typeName,\n context,\n data: {\n wishlists: { result: wishlists }\n },\n resources\n } = props;\n\n const product = props.data.product?.result ? props.data.product.result : productDetails?.product;\n\n const {\n errorState: { configureErrors, quantityError, customAmountError, otherError, errorHost },\n selectedProduct\n } = state;\n\n // If custom amount is selected, add-to-wishlist is disabled\n if (state.isCustomPriceSelected) {\n return undefined;\n }\n\n const className = _getClassNamePrefix(typeName);\n\n return {\n ContainerProps: {\n className: `${className}__add-to-wishlist-container`\n },\n button: product && (\n \n ),\n errorBlock: (\n \n )\n };\n}\n\n/**\n * On quantity change function.\n * @param callbacks -Buybox callbacks.\n * @returns Update quantity.\n */\nconst onQuantityChangeHandler = (callbacks: IBuyboxCallbacks) => (newValue: number) => {\n if (callbacks.updateQuantity) {\n callbacks.updateQuantity(newValue);\n }\n};\n\nexport function getBuyboxProductQuantity(\n props: IBuyboxExtentedProps,\n state: IBuyboxState,\n callbacks: IBuyboxCallbacks\n): IBuyboxProductQuantityViewProps {\n const { resources, typeName } = props;\n\n const {\n quantity,\n min,\n max,\n errorState: { quantityError }\n } = state;\n\n const className = _getClassNamePrefix(typeName);\n\n return {\n ContainerProps: {\n className: `${className}__quantity`\n },\n LabelContainerProps: {\n tag: 'label',\n className: `${className}__product-quantity-label`,\n htmlFor: `${className}__product-quantity-input`\n },\n heading:
{resources.productQuantityHeading}
,\n errors: quantityError && (\n \n \n ),\n input: (\n \n )\n };\n}\n\nexport function getBuyboxShopSimilarButton(\n props: IBuyboxExtentedProps,\n buttonType: ShopSimiliarButtonType\n): IBuyboxShopSimilarLookViewProps {\n const { resources, context, typeName } = props;\n const product = props.data.product?.result;\n\n const className = _getClassNamePrefix(typeName);\n const navigationUrl = (shopSimiliarButtonType: ShopSimiliarButtonType) => () => {\n const searchURL = getUrlSync('search', context && context.actionContext);\n const separator = searchURL!.includes('?') ? '&' : '?';\n document.location.href = `${searchURL}${separator}productId=${product &&\n product.RecordId}&recommendation=${shopSimiliarButtonType}`;\n };\n const telemetryText =\n buttonType === ShopSimiliarButtonType.Looks ? TelemetryConstant.ShopSimliarLooks : TelemetryConstant.ShopSimliarDescription;\n const payLoad = getPayloadObject('click', telemetryContent, telemetryText);\n const attribute = getTelemetryAttributes(telemetryContent, payLoad);\n const text = buttonType === ShopSimiliarButtonType.Looks ? resources.shopSimilarLooksText : resources.shopSimilarDescriptionText;\n\n return {\n ContainerProps: {\n className: `${className}__shopsimilar${buttonType}`\n },\n input: (\n \n {text}\n \n )\n };\n}\n\n/**\n * On price change function.\n * @param callbacks -Buybox callbacks.\n * @returns Update key in price.\n */\nconst onPriceChangeHandler = (callbacks: IBuyboxCallbacks) => (event: React.ChangeEvent) => {\n const value = event.currentTarget.value;\n callbacks.updateKeyInPrice(value.length > 0 ? Number(value) : Number.parseFloat(value));\n};\n\nexport function getBuyboxKeyInPrice(\n props: IBuyboxExtentedProps,\n state: IBuyboxState,\n callbacks: IBuyboxCallbacks\n): IBuyboxKeyInPriceViewProps {\n const { config, resources } = props;\n\n const {\n errorState: {}\n } = state;\n\n const className = _getClassNamePrefix(props.typeName);\n\n return {\n ContainerProps: {\n className: `${className}__key_in_price`\n },\n LabelContainerProps: {\n tag: 'label',\n className: `${className}__key_in_price-label`,\n htmlFor: `${className}__key_in_price`\n },\n heading:
{resources.buyboxKeyInPriceLabelHeading}
,\n input: (\n \n )\n };\n}\n\nexport const BuyboxErrorBlock: React.FC = ({\n showError,\n configureErrors,\n quantityError,\n customAmountError,\n otherError,\n resources\n}) => {\n let errorMessages: (string | undefined)[] = [];\n\n errorMessages = Object.values(configureErrors).filter(message => message !== undefined);\n\n if (quantityError) {\n errorMessages.push(quantityError);\n }\n\n if (customAmountError) {\n errorMessages.push(customAmountError);\n }\n\n if (otherError) {\n errorMessages.push(otherError);\n }\n\n return (\n 0} color='danger' assertive aria-label={resources.buyboxErrorMessageHeader}>\n \n {errorMessages.map((message, index) => {\n return (\n
\n {message}\n
\n );\n })}\n
\n );\n};\n\nexport function getQuantityLimitsMessages(\n props: IBuyboxExtentedProps,\n state: IBuyboxState\n): React.ReactElement | undefined {\n const { resources } = props;\n\n const { min, max } = state;\n\n if (!_isOrderQuantityLimitsFeatureEnabled(props) && !_isChannelLimitsFeatureEnabled(props)) {\n return undefined;\n }\n\n return (\n \n {_renderMaxLabel(props, max, resources.maxQuantityText)}\n {_renderMinLabel(props, min, resources.minQuantityText)}\n \n );\n}\n\nexport const RetailDefaultOrderQuantityLimitsFeatureName: string = 'Dynamics.AX.Application.RetailDefaultOrderQuantityLimitsFeature';\nexport const EcommerceQuantityLimitConfigurationsFeatureName: string =\n 'Dynamics.AX.Application.EcommerceQuantityLimitConfigurationsFeature';\n\nconst _renderMaxLabel = (\n props: IBuyboxExtentedProps,\n max: number | undefined,\n maxQuantityText: string\n): React.ReactElement | undefined => {\n const { resources, typeName } = props;\n const className = _getClassNamePrefix(typeName);\n if (max && max !== 0 && max !== Number.MAX_VALUE) {\n return (\n

\n {resources.informationIconText}\n