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A3B8H,EAAAnP,KAAK5K,MAAMsG,KAAK2B,KAAK4C,cAAM,IAAAkP,GAA3BA,EAA6BG,QAAU,KAAOtP,KAAK5K,MAAMmS,eAC1D5Q,IAAAA,cAAC+U,EAAAA,KAAI,CAAC9U,UAAU,6BACgB,QAA3BwY,EAAApP,KAAK5K,MAAMsG,KAAK2B,KAAK4C,cAAM,IAAAmP,GAA3BA,EAA6BE,QAC1B3Y,IAAAA,cAAC8F,EAAAA,OAAM,CACH7F,UAAU,mCACV0E,MAAM6H,EAAAA,EAAAA,IAAW,OAAQnD,KAAK5K,MAAMyD,QAAQ+B,gBAE3CoF,KAAK5K,MAAMoB,UAAUyZ,6BAE1B,SAtIRC,IAACjM,EAAuD7O,GAoNhF,iBC/OA+a,EAAOC,QAAUzZ,cCAjBwZ,EAAOC,QAAUC","sources":["webpack://Msdyn365.Commerce.Online/./src/modules/cart-icon/cart-icon.props.autogenerated.ts?05ea","webpack://Msdyn365.Commerce.Online/./src/modules/cart-icon/components/flyout-cart-line-items.tsx?b492","webpack://Msdyn365.Commerce.Online/./src/modules/cart-icon/utils/get-products-in-mini-cart.ts?a1c2","webpack://Msdyn365.Commerce.Online/./src/modules/cart-icon/cart-icon.tsx?06e4","webpack://Msdyn365.Commerce.Online/./src/modules/cart-icon/cart-icon.view.tsx?8ffb","webpack://Msdyn365.Commerce.Online/./lib/cart-icon/module-registration.js?4d28","webpack://Msdyn365.Commerce.Online/./src/modules/cart-icon/cart-icon.view.tsx?f9dd","webpack://Msdyn365.Commerce.Online/./src/modules/adventureworks/views/cart-icon.view.tsx?7ec9","webpack://Msdyn365.Commerce.Online/external var \"React\"?0d3b","webpack://Msdyn365.Commerce.Online/external var \"ReactDOM\"?853b"],"sourcesContent":["/**\r\n * Copyright (c) Microsoft Corporation\r\n * All rights reserved. See License.txt in the project root for license information.\r\n * ICartIcon containerModule Interface Properties\r\n * THIS FILE IS AUTO-GENERATED - MANUAL MODIFICATIONS WILL BE LOST\r\n */\r\n\r\nimport * as Msdyn365 from '@msdyn365-commerce/core';\r\n\r\nexport const enum cartLinesSortOrder {\r\n ascending = 'ascending',\r\n descending = 'descending'\r\n}\r\n\r\nexport interface ICartIconConfig extends Msdyn365.IModuleConfig {\r\n imageSettings?: Msdyn365.IImageSettings;\r\n enableHoverCart?: boolean;\r\n cartLinesSortOrder?: cartLinesSortOrder;\r\n isAnonymousCheckout?: boolean;\r\n clientRender?: boolean;\r\n}\r\n\r\nexport interface ICartIconResources {\r\n goToCartButtonTitle: string;\r\n totalPriceFormatString: string;\r\n guestCheckoutButtonTitle: string;\r\n checkoutButtonTitle: string;\r\n productDimensionTypeColor: string;\r\n productDimensionTypeSize: string;\r\n productDimensionTypeStyle: string;\r\n productDimensionTypeConfiguration: string;\r\n quantityDisplayText: string;\r\n removeCartButtonText: string;\r\n cartLabel: string;\r\n cartQtyLabel: string;\r\n flyoutTitle: string;\r\n salesAgreementPricePrompt: string;\r\n shippingText: string;\r\n checkoutBlockedDueToUnavailableFundsTitle: string;\r\n checkoutBlockedDueToUnavailableFundsMessage: string;\r\n addToQuote: string;\r\n}\r\n\r\nexport interface ICartIconProps extends Msdyn365.IModule {\r\n resources: ICartIconResources;\r\n config: ICartIconConfig;\r\n}\r\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\n/* eslint-disable no-duplicate-imports */\nimport { CartLineItemComponent, ICartlineResourceString } from '@msdyn365-commerce/components';\nimport MsDyn365, { ICoreContext, IGridSettings, IImageSettings, ITelemetry, isChannelTypeB2B } from '@msdyn365-commerce/core';\nimport { ICartState } from '@msdyn365-commerce/global-state';\nimport {\n CartLine,\n ChannelDeliveryOptionConfiguration,\n OrgUnitLocation,\n ProductAvailableQuantity,\n ProductDeliveryOptions,\n SimpleProduct\n} from '@msdyn365-commerce/retail-proxy';\nimport { ProductCatalog, ReleasedProductType } from '@msdyn365-commerce/retail-proxy/dist/Entities/CommerceTypes.g';\nimport { getProductUrlSync, IProductInventoryInformation } from '@msdyn365-commerce-modules/retail-actions';\nimport {\n Button,\n getPayloadObject,\n getTelemetryAttributes,\n ITelemetryContent,\n TelemetryConstant\n} from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport { getProductByProductId, getProductByProductIdAndWarehouse } from '@msdyn365-commerce-modules/cart';\n\nexport interface IFlyoutCartLineItemsProps {\n cartlines: CartLine[];\n cartState: ICartState | undefined;\n orgUnitLocations: OrgUnitLocation[] | undefined;\n resources: ICartlineResourceString;\n productAvailabilites: IProductInventoryInformation[] | undefined;\n products: SimpleProduct[] | undefined;\n productDeliveryOptions: ProductDeliveryOptions[] | undefined;\n pickupDeliveryModeCode?: string;\n catalogs?: ProductCatalog[];\n\n /**\n * GridSettings for the product image in cartline\n */\n gridSettings: IGridSettings;\n\n /**\n * ImageSettings for the product image in cartline\n */\n imageSettings: IImageSettings;\n id: string;\n typeName: string;\n context: ICoreContext;\n telemetry: ITelemetry;\n removeButtonText: string;\n outOfStockText: string;\n outOfRangeOneText: string;\n outOfRangeFormatText: string;\n maxCartlineQuantity: number;\n channelDeliveryOptionConfig?: ChannelDeliveryOptionConfiguration;\n isQuantityLimitsFeatureEnabled: boolean;\n\n outOfStockThreshold: number;\n isStockCheckEnabled: boolean;\n telemetryContent?: ITelemetryContent;\n removeItemClickHandler(cartlineToRemove: CartLine): void;\n}\n\nexport interface IFlyoutCartLineItemViewProps {\n cartline: React.ReactNode;\n remove: React.ReactNode;\n storeLocation: React.ReactNode;\n hasError: boolean;\n\n data: {\n product: SimpleProduct;\n cartline: CartLine;\n };\n}\n\nconst _getCartItemAvailableQuantity = (\n isStockCheckEnabled: boolean,\n outOfStockThreshold: number,\n productAvailability?: ProductAvailableQuantity\n): number => {\n if (isStockCheckEnabled) {\n if (\n !productAvailability ||\n !productAvailability.AvailableQuantity ||\n productAvailability.AvailableQuantity <= 0 ||\n productAvailability.AvailableQuantity <= outOfStockThreshold\n ) {\n return 0;\n }\n return productAvailability.AvailableQuantity - outOfStockThreshold;\n }\n\n return 0;\n};\n\nconst _getCartItemMaxQuantity = (\n maxQuantityByConfig: number,\n isStockCheckEnabled: boolean,\n availableQuantityInStock: number,\n isQuantityLimitsFeatureEnabled: boolean,\n maxByQuantityLimitsFeature: number\n) => {\n if (isQuantityLimitsFeatureEnabled) {\n let maxByQuantityLimitsFeatureResult = maxByQuantityLimitsFeature;\n\n // If max by feature in not defined when feature is on then we suggest that there is no max by feature\n // and consider available qty if stock check enabled and max from config in site settings.\n if (!maxByQuantityLimitsFeature) {\n maxByQuantityLimitsFeatureResult = maxQuantityByConfig || 10;\n }\n\n return isStockCheckEnabled\n ? maxByQuantityLimitsFeatureResult < availableQuantityInStock\n ? maxByQuantityLimitsFeatureResult\n : availableQuantityInStock\n : maxByQuantityLimitsFeatureResult;\n }\n if (isStockCheckEnabled) {\n return availableQuantityInStock < maxQuantityByConfig ? availableQuantityInStock : maxQuantityByConfig;\n }\n return maxQuantityByConfig;\n};\n\n/**\n * On Remove Click functionality.\n * @param removeItemClickHandler -Remove item click function.\n * @param cartline -CartLine.\n * @returns Remove change value.\n */\nconst onRemoveClickFunction = (removeItemClickHandler: (cartlineToRemove: CartLine) => void, cartline: CartLine) => () => {\n removeItemClickHandler(cartline);\n};\nconst _assembleNode = (\n cartline: CartLine,\n product: SimpleProduct,\n props: IFlyoutCartLineItemsProps,\n index: number,\n foundProductAvailability?: ProductAvailableQuantity,\n foundProductDeliveryOptions?: ProductDeliveryOptions\n): IFlyoutCartLineItemViewProps => {\n const { imageSettings, gridSettings, id, typeName, context, resources, removeButtonText, removeItemClickHandler } = props;\n\n const availableQuantityInStock = _getCartItemAvailableQuantity(\n props.isStockCheckEnabled,\n props.outOfStockThreshold,\n foundProductAvailability\n );\n const maxQuantity =\n product &&\n _getCartItemMaxQuantity(\n props.maxCartlineQuantity,\n props.isStockCheckEnabled,\n availableQuantityInStock,\n props.isQuantityLimitsFeatureEnabled,\n product?.Behavior?.MaximumQuantity || 0\n );\n\n // Check if the product is service or not by product type\n const isServiceItem = product.ItemTypeValue === ReleasedProductType.Service;\n\n const onRemoveClickHandler = onRemoveClickFunction(removeItemClickHandler, cartline);\n const payLoad = getPayloadObject('click', props.telemetryContent!, TelemetryConstant.RemoveCartItem);\n const removeCartItemAttribute = getTelemetryAttributes(props.telemetryContent!, payLoad);\n\n let productUrl = getProductUrlSync(product, props.context.actionContext, undefined);\n if (MsDyn365.isBrowser && isChannelTypeB2B(props.context.actionContext.requestContext)) {\n const fullUrl = new URL(productUrl, window.location.href);\n fullUrl.searchParams.set('catalogid', `${cartline.CatalogId ?? 0}`);\n productUrl = fullUrl.href;\n }\n\n return {\n data: {\n product,\n cartline\n },\n hasError: !isServiceItem && props.isStockCheckEnabled ? cartline.Quantity! > maxQuantity : false,\n cartline: (\n \n ),\n remove: (\n \n {removeButtonText}\n \n ),\n storeLocation: _renderStoreLocation(cartline, props)\n };\n};\n\nconst _renderDeliveryLocation = (cartLine: CartLine | null | undefined, props: IFlyoutCartLineItemsProps): string | undefined => {\n let deliverylocation;\n if (cartLine && cartLine.FulfillmentStoreId) {\n const orgUnitName = _getOrgUnitName(cartLine.FulfillmentStoreId, props.orgUnitLocations);\n\n let foundProductDeliveryOption;\n if (props.productDeliveryOptions && props.productDeliveryOptions.length > 0) {\n foundProductDeliveryOption = props.productDeliveryOptions.find(deliveryOption => {\n return deliveryOption && deliveryOption.ProductId === cartLine.ProductId;\n });\n }\n const delivery = foundProductDeliveryOption?.DeliveryOptions?.find(option => option.Code === cartLine.DeliveryMode);\n const location = delivery?.Description;\n\n // eslint-disable-next-line @typescript-eslint/restrict-plus-operands\n if (location) {\n deliverylocation = `${location}, ${orgUnitName}`;\n } else {\n deliverylocation = `${orgUnitName}`;\n }\n } else {\n deliverylocation = props.resources.shippingText;\n }\n return deliverylocation;\n};\n\nconst _renderStoreLocation = (cartLine: CartLine | null | undefined, props: IFlyoutCartLineItemsProps): JSX.Element | null => {\n if (cartLine && cartLine.FulfillmentStoreId) {\n const orgUnitName = _getOrgUnitName(cartLine.FulfillmentStoreId, props.orgUnitLocations);\n\n if (orgUnitName) {\n return (\n
\n {orgUnitName}\n
\n );\n }\n }\n\n return null;\n};\n\nconst _getOrgUnitName = (fulfillmentStoreId: string | undefined, orgUnitLocations: OrgUnitLocation[] | undefined) => {\n if (!orgUnitLocations || !fulfillmentStoreId || orgUnitLocations.length === 0) {\n return '';\n }\n\n const foundLocation = orgUnitLocations.find(orgUnitLocation => {\n return orgUnitLocation.OrgUnitNumber === fulfillmentStoreId;\n });\n\n if (foundLocation) {\n return foundLocation.OrgUnitName;\n }\n return fulfillmentStoreId;\n};\n\nconst _assembleCartlines = (\n cartlines: CartLine[],\n products: SimpleProduct[] | undefined,\n props: IFlyoutCartLineItemsProps\n): IFlyoutCartLineItemViewProps[] | null => {\n const reactNodes: IFlyoutCartLineItemViewProps[] = [];\n\n if (!products || products.length === 0) {\n props.context.telemetry.error('Cartlines content is empty, module wont render');\n return null;\n }\n\n cartlines.map((cartline, index) => {\n let product;\n if (props.isQuantityLimitsFeatureEnabled) {\n // When feature is enabled the same products could have different quantity limits in Behavior so we need\n // to check productId and WarehouseId for identification.\n product = getProductByProductIdAndWarehouse(cartline.ProductId, products, cartline.WarehouseId, props.cartState);\n } else {\n product = getProductByProductId(cartline.ProductId, products);\n }\n let foundProductAvailability;\n if (props.productAvailabilites && props.productAvailabilites.length > 0) {\n foundProductAvailability = props.productAvailabilites.find(productAvailability => {\n return productAvailability.ProductAvailableQuantity?.ProductId! === cartline.ProductId;\n });\n }\n let foundProductDeliveryOption;\n if (props.productDeliveryOptions && props.productDeliveryOptions.length > 0) {\n foundProductDeliveryOption = props.productDeliveryOptions.find(deliveryOption => {\n return deliveryOption && deliveryOption.ProductId === cartline.ProductId;\n });\n }\n if (product) {\n reactNodes.push(\n _assembleNode(\n cartline,\n product,\n props,\n index,\n foundProductAvailability?.ProductAvailableQuantity,\n foundProductDeliveryOption\n )\n );\n }\n });\n\n return reactNodes;\n};\n\n/**\n * CartLineItems component.\n */\n\nexport const FlyoutCartLineItems = (props: IFlyoutCartLineItemsProps) => {\n const { products, cartlines } = props;\n return _assembleCartlines(cartlines, products, props);\n};\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\n/* eslint-disable no-duplicate-imports */\nimport { IActionContext } from '@msdyn365-commerce/core';\nimport { ICartState } from '@msdyn365-commerce/global-state';\nimport { ProductDeliveryOptions, SimpleProduct } from '@msdyn365-commerce/retail-proxy';\nimport {\n ActiveCartProductsInput,\n getActiveCartProductsAction,\n getAvailabilitiesForCartLineItems,\n getDeliveryOptionsForCartLineItems,\n IProductInventoryInformation,\n ProductAvailabilitiesForCartLineItems,\n ProductDeliveryOptionsForCartLineItems\n} from '@msdyn365-commerce-modules/retail-actions';\n\n/**\n * IMiniCartData entity interface.\n */\nexport interface IMiniCartData {\n products?: SimpleProduct[];\n productAvailabilites?: IProductInventoryInformation[];\n deliveryOptions?: ProductDeliveryOptions[];\n}\n\nexport const createInput = () => {\n return new ActiveCartProductsInput();\n};\n\n/**\n * Calls the Retail API and returns a mini cart data.\n * @param ctx\n * @param cartState\n */\nexport async function getMiniCartData(ctx: IActionContext, cartState: ICartState): Promise {\n const miniCartData: IMiniCartData = {};\n\n const cart = cartState.cart;\n\n // If there are cart lines, make call to get products\n // If there are invocie linese, then there is no products, so don't make call to get products\n if (cart && cart.CartLines && cart.CartLines.length > 0 && !cartState.hasInvoiceLine) {\n await getActiveCartProductsAction(new ActiveCartProductsInput(), ctx)\n .then(products => {\n if (products) {\n miniCartData.products = products;\n }\n })\n .catch(error => {\n ctx.telemetry.exception(error);\n throw new Error('[getActiveCartWithProdcuts]Unable to hydrate cart with product information');\n });\n\n await getAvailabilitiesForCartLineItems(new ProductAvailabilitiesForCartLineItems(ctx.requestContext.apiSettings), ctx)\n .then(availableQuantity => {\n if (availableQuantity) {\n miniCartData.productAvailabilites = availableQuantity;\n }\n })\n .catch(error => {\n ctx.telemetry.exception(error);\n throw new Error('[getActiveCartWithProdcuts]Unable to hydrate cart with product information');\n });\n\n await getDeliveryOptionsForCartLineItems(new ProductDeliveryOptionsForCartLineItems(ctx.requestContext.apiSettings), ctx)\n .then(deliveryOptions => {\n if (deliveryOptions) {\n miniCartData.deliveryOptions = deliveryOptions;\n }\n })\n .catch(error => {\n ctx.telemetry.exception(error);\n throw new Error('[getActiveCartWithProdcuts]Unable to hydrate cart with product information');\n });\n }\n\n return miniCartData;\n}\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\n/* eslint-disable no-duplicate-imports */\nimport { AddToCartBehavior, CartIconComponent } from '@msdyn365-commerce/components';\nimport { getUrlSync, IDictionary, IImageSettings, msdyn365Commerce, TelemetryEvent } from '@msdyn365-commerce/core';\nimport {\n CartLine,\n ChannelDeliveryOptionConfiguration,\n CartLineValidationResultsByLineId,\n OrgUnitLocation\n} from '@msdyn365-commerce/retail-proxy';\nimport { validateCartAsync } from '@msdyn365-commerce-modules/cart-utilities';\nimport { ArrayExtensions, validateCartLinesInventory } from '@msdyn365-commerce-modules/retail-actions';\nimport {\n Button,\n getPayloadObject,\n getTelemetryAttributes,\n getTelemetryObject,\n INodeProps,\n ITelemetryContent,\n TelemetryConstant,\n UncontrolledTooltip,\n updateMaxQuantityForCartLineItem,\n urlCheck\n} from '@msdyn365-commerce-modules/utilities';\nimport classnames from 'classnames';\nimport { reaction } from 'mobx';\nimport { observer } from 'mobx-react';\nimport React from 'react';\n\nimport { ICartIconData } from './cart-icon.data';\nimport { cartLinesSortOrder, ICartIconProps } from './cart-icon.props.autogenerated';\nimport { FlyoutCartLineItems, IFlyoutCartLineItemViewProps } from './components/flyout-cart-line-items';\nimport { getMiniCartData, IMiniCartData } from './utils/get-products-in-mini-cart';\n\nexport interface IMiniCartState {\n miniCartData: IMiniCartData;\n orgUnitLocations?: OrgUnitLocation[];\n isQuantityLimitsFeatureEnabled: boolean;\n isCartValid: boolean;\n}\n\nexport interface ICartIconViewProps extends ICartIconProps {\n className: string;\n cartIcon: React.ReactNode;\n FlyoutContainer?: INodeProps;\n CartlinesWrapper: INodeProps;\n miniCartWrapper: INodeProps;\n miniCartItemWrapper: INodeProps;\n cartlines?: IFlyoutCartLineItemViewProps[];\n flyoutTitle: React.ReactNode;\n totalPrice: React.ReactNode;\n checkoutAsGuestButton?: React.ReactNode;\n checkoutAsSignInUserButton?: React.ReactNode;\n goToCartButton?: React.ReactNode;\n waitingComponent?: React.ReactNode;\n isCartLoading: boolean;\n checkoutBlockedDueToUnavailableFunds?: React.ReactNode;\n\n removeItemClickHandler(cartlineToRemove: CartLine): void;\n}\n\n/**\n *\n * Cart component.\n * @extends {React.PureComponent>}\n */\n@observer\nclass CartIcon extends React.Component, IMiniCartState> {\n private readonly telemetryContent: ITelemetryContent;\n\n private readonly checkoutBySignInAttributes: IDictionary | undefined;\n\n private readonly checkoutByGuestAttributes: IDictionary | undefined;\n\n private readonly viewShoppingBagAttributes: IDictionary | undefined;\n\n private retailMultiplePickUpOptionEnabled?: boolean = false;\n\n private channelDeliveryOptionConfig?: ChannelDeliveryOptionConfiguration;\n\n private lastValidatedCartVersion: number | undefined;\n\n constructor(props: ICartIconProps) {\n super(props);\n this.state = {\n miniCartData: {},\n isCartValid: true,\n isQuantityLimitsFeatureEnabled: false\n };\n this.telemetryContent = getTelemetryObject(\n this.props.context.request.telemetryPageName!,\n this.props.friendlyName,\n this.props.telemetry\n );\n const payload = getPayloadObject(TelemetryEvent.CheckOut, this.telemetryContent, TelemetryConstant.Checkout);\n this.checkoutBySignInAttributes = getTelemetryAttributes(this.telemetryContent, payload);\n\n payload.contentAction.etext = TelemetryConstant.GuestCheckout;\n this.checkoutByGuestAttributes = getTelemetryAttributes(this.telemetryContent, payload);\n\n payload.contentAction.etext = TelemetryConstant.ViewShoppingBag;\n this.viewShoppingBagAttributes = getTelemetryAttributes(this.telemetryContent, payload);\n }\n\n public async componentDidMount(): Promise {\n const context = this.props.context.actionContext;\n\n reaction(\n () => this.props.data.cart.result?.cart.CartLines,\n async () => {\n this.setState({\n miniCartData: await getMiniCartData(context, this.props.data.cart.result!)\n });\n }\n );\n await this._setQuantityLimitsFeatureFlag();\n\n this.setState({\n orgUnitLocations: this.props.data.orgUnitLocations?.result\n });\n\n this._validateCart();\n }\n\n public componentDidUpdate(prevProps: ICartIconProps): void {\n this._validateCart();\n }\n\n public shouldComponentUpdate(nextProps: ICartIconProps, nextState: IMiniCartState): boolean {\n if (this.state === nextState && this.props.data === nextProps.data) {\n return false;\n }\n return true;\n }\n\n // eslint-disable-next-line complexity -- disabling the complexity for this method for now as its causing lot of other warnings\n public render(): JSX.Element | null {\n const {\n id,\n typeName,\n config: { enableHoverCart, isAnonymousCheckout },\n context: {\n request: {\n user: { isAuthenticated, signInUrl }\n }\n },\n context,\n resources\n } = this.props;\n\n const cart = (this.props.data.cart && this.props.data.cart.result) || undefined;\n const guestCheckoutUrl = getUrlSync('checkout', this.props.context.actionContext) || '';\n const cartUrl = getUrlSync('cart', this.props.context.actionContext) || '';\n const checkoutURL = this._getCheckoutURL(isAuthenticated, guestCheckoutUrl, signInUrl || '');\n const isCartEmpty = cart && cart.cart.CartLines && cart.cart.CartLines.length === 0;\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access -- check config.\n const shouldShowMiniCart =\n cart?.isProductAddedToCart && this.props.context.app.config.addToCartBehavior === AddToCartBehavior.showMiniCart;\n const hasInvoiceLine = cart?.hasInvoiceLine;\n const emailDeliveryModeCode = this.props.context.request.channel?.EmailDeliveryModeCode;\n const cartLines = this._getCartLines();\n const validInventoryAcrossCartLines = validateCartLinesInventory(\n cart?.cart.CartLines ?? [],\n this.state.miniCartData.productAvailabilites ?? [],\n this.props.context.actionContext,\n this.state.miniCartData.products ?? [],\n emailDeliveryModeCode\n );\n const hasError =\n !validInventoryAcrossCartLines?.isValid ||\n (!validInventoryAcrossCartLines && !this.state.isCartValid) ||\n (cartLines ? cartLines.some(cartline => cartline.hasError) : false);\n const includeFlyout = this.props.data.cart && this.props.data.cart.status === 'SUCCESS' && enableHoverCart;\n const totalItemsInCart = cart?.totalItemsInCart ? cart.totalItemsInCart : 0;\n const goToCartButtonText = resources.goToCartButtonTitle.replace('{count}', totalItemsInCart.toString());\n const flyoutTitle = resources.flyoutTitle;\n const flyoutTooltip = {\n tag: UncontrolledTooltip,\n shouldShowMiniCart,\n placement: 'bottom-end',\n hideArrow: true,\n className: 'ms-cart-icon__flyout-container',\n trigger: 'hover',\n displayMode: 'FLYOUT',\n target: id,\n shouldShowCloseButton: true,\n cartPageUrl: cartUrl,\n hideAriaHidden: true\n };\n\n // If there are invoice lines, don't update mini cart price\n const price = (cart && !cart.hasInvoiceLine && cart.cart.TotalAmount) || undefined;\n // AVA - 100% Discount Applied - Price Details as updated as 'Add to quote' - Start\n const priceString =\n price === 0\n ? resources.addToQuote\n : price\n ? resources.totalPriceFormatString.replace('{price}', context.cultureFormatter.formatCurrency(price))\n : '';\n // End\n const multiplePickupStoreSwitchName = 'Dynamics.AX.Application.RetailMultiplePickupDeliveryModeFeature';\n this.channelDeliveryOptionConfig = this.props.data.channelDeliveryOptionConfig?.result;\n this.retailMultiplePickUpOptionEnabled = this.props.data.featureState?.result?.find(\n feature => feature.Name === multiplePickupStoreSwitchName\n )?.IsEnabled;\n\n //NS AVA\n const isOnlyInstallationItemInCart = this.isOnlyInstallationServiceInCart(cart?.cart.CartLines ? cart.cart.CartLines : []);\n const disableCheckout = this.disableCheckoutButton(hasError, isOnlyInstallationItemInCart);\n //NE AVA\n\n const viewProps = {\n ...this.props,\n cartIcon: (\n \n ),\n cartlines: cartLines,\n FlyoutContainer: includeFlyout ? flyoutTooltip : undefined,\n CartlinesWrapper: {\n className: 'ms-cart-icon__cart-lines'\n },\n miniCartWrapper: {\n className: classnames('ms-cart-icon'),\n id: this.props.id\n },\n miniCartItemWrapper: {\n className: classnames('msc-cart-lines-item')\n },\n\n // If there are invoice lines, don't update mini cart checkout button\n // Checkout button will display by default to maintain backward compatibility. When Anonymous user checkout is enabled &&\n // user is authenticated then we will show the checkout button otherwise we will show the guest checkout button.\n checkoutAsSignInUserButton:\n !isCartEmpty && !hasInvoiceLine && (!isAnonymousCheckout || isAuthenticated) ? (\n \n {resources.checkoutButtonTitle}\n \n ) : null,\n checkoutAsGuestButton:\n isAnonymousCheckout && !isCartEmpty && !isAuthenticated ? (\n \n {resources.guestCheckoutButtonTitle}\n \n ) : null,\n goToCartButton: (\n \n {goToCartButtonText}\n \n ),\n checkoutBlockedDueToUnavailableFunds: null,\n flyoutTitle: {flyoutTitle},\n totalPrice:
{priceString}
\n };\n\n return this.props.renderView(viewProps) as React.ReactElement;\n }\n\n private _validateCart(): void {\n const {\n data: { cart }\n } = this.props;\n const cartVersion = cart.result?.cart?.Version ?? undefined;\n if (this.lastValidatedCartVersion === cartVersion) {\n return;\n }\n\n this.lastValidatedCartVersion = cartVersion; // This field is populated to block concurrent requests\n\n if (this.state.isQuantityLimitsFeatureEnabled) {\n validateCartAsync(cart, this.props.telemetry, this.props.context)\n .then((result: CartLineValidationResultsByLineId | undefined) => {\n this.setState({ isCartValid: !ArrayExtensions.hasElements(result?.ValidationResultsPairs) });\n })\n .catch(() => {\n this.setState({ isCartValid: false });\n });\n } else {\n this.setState({ isCartValid: true });\n }\n }\n\n private _getCheckoutURL(isAuthenticated: boolean, guestCheckoutUrl: string, signInUrl: string): string {\n if (isAuthenticated) {\n return guestCheckoutUrl;\n }\n\n const isAbsoluteUrl = urlCheck(guestCheckoutUrl);\n let returnURL = guestCheckoutUrl;\n if (msdyn365Commerce.isBrowser && !isAbsoluteUrl) {\n returnURL = `${window.location.origin}${guestCheckoutUrl}`;\n }\n\n return `${signInUrl}${!signInUrl.includes('?') ? '?' : '&'}ru=${returnURL}`;\n }\n // AVA Validate is the cart contains only installation service items or not.\n private isOnlyInstallationServiceInCart(cartLines: CartLine[]): boolean {\n let _isInstallationItem = false;\n if (cartLines && cartLines.length === 1) {\n if (cartLines[0].ExtensionProperties && cartLines[0].ExtensionProperties.length > 0) {\n if (cartLines[0].ExtensionProperties.find((item: any) => item.Key === 'IsServiceItem')) {\n _isInstallationItem = cartLines[0].ExtensionProperties.find((item: any) => item.Key === 'IsServiceItem')?.Value\n ?.BooleanValue\n ? true\n : false;\n }\n }\n }\n\n return _isInstallationItem;\n }\n // AVA Dissable the checkout button if the cart has any error or cart contains only installation service items.\n private disableCheckoutButton(hasError: boolean, hasOnlyInstallationService: boolean): boolean {\n let _dissableCheckoutButton = false;\n if (hasError || hasOnlyInstallationService) {\n _dissableCheckoutButton = true;\n }\n return _dissableCheckoutButton;\n }\n /**\n * Sort cartline items.\n * @param cartlines - Cartlines to be sorted.\n * @param sortOrder - Ascending or descending.\n * @returns - Sorted cartlines.\n */\n private readonly getSortedCartLines = (cartlines: CartLine[], sortOrder?: cartLinesSortOrder): CartLine[] => {\n const lines: CartLine[] = [...cartlines];\n const zero: number = 0;\n\n if (sortOrder === cartLinesSortOrder.descending) {\n return lines.sort((item1, item2) => (item2.LineNumber ?? zero) - (item1.LineNumber ?? zero));\n }\n return lines.sort((item1, item2) => (item1.LineNumber ?? zero) - (item2.LineNumber ?? zero));\n };\n\n private _getCartLines(): IFlyoutCartLineItemViewProps[] | null {\n const {\n context: {\n request: { channel: { PickupDeliveryModeCode } = { PickupDeliveryModeCode: undefined } }\n },\n config,\n telemetry,\n resources\n } = this.props;\n\n const imageSettings = this._getImageSettings(config.imageSettings);\n const cart = this.props.data.cart && this.props.data.cart.result;\n\n // Cart-icon could be placed in each page\n // so we check cart content to reduce number of RS calls\n return this.state.miniCartData.products && cart && cart.cart.CartLines && cart.cart.CartLines.length > 0\n ? FlyoutCartLineItems({\n cartlines: this.getSortedCartLines(cart.cart.CartLines, config.cartLinesSortOrder),\n products: this.state.miniCartData.products,\n productAvailabilites: this.state.miniCartData.productAvailabilites,\n productDeliveryOptions: this.state.miniCartData.deliveryOptions,\n imageSettings,\n outOfStockThreshold: this.props.context.app.config.outOfStockThreshold || 0,\n isStockCheckEnabled: this.props.context.app.config.enableStockCheck || false,\n maxCartlineQuantity: updateMaxQuantityForCartLineItem(this.props.context.app.config.maxQuantityForCartLineItem),\n gridSettings: this.props.context.request.gridSettings!,\n context: this.props.context,\n typeName: this.props.typeName,\n id: this.props.id,\n resources: {\n sizeString: resources.productDimensionTypeSize,\n colorString: resources.productDimensionTypeColor,\n configString: resources.productDimensionTypeConfiguration,\n styleString: resources.productDimensionTypeStyle,\n quantityDisplayString: resources.quantityDisplayText,\n salesAgreementPricePrompt: resources.salesAgreementPricePrompt,\n inputQuantityAriaLabel: '', // Not used\n discountStringText: '', // Not used\n originalPriceText: '',\n currentPriceText: '',\n shippingChargesText: '',\n shippingText: resources.shippingText\n },\n telemetry,\n removeButtonText: resources.removeCartButtonText,\n outOfStockText: '', // Not used\n outOfRangeOneText: '', // Not used\n outOfRangeFormatText: '', // Not used\n cartState: cart,\n orgUnitLocations: this.state.orgUnitLocations,\n removeItemClickHandler: this._removeItemFromCartHandler,\n pickupDeliveryModeCode: PickupDeliveryModeCode,\n telemetryContent: this.telemetryContent,\n channelDeliveryOptionConfig: this.retailMultiplePickUpOptionEnabled ? this.channelDeliveryOptionConfig : undefined,\n isQuantityLimitsFeatureEnabled: this.state.isQuantityLimitsFeatureEnabled,\n catalogs: this.props.data.catalogs?.result\n })\n : null;\n }\n\n private readonly _getImageSettings = (imageSettings: IImageSettings | undefined): IImageSettings => {\n return (\n imageSettings || {\n viewports: {\n xs: { q: 'w=80&h=94&m=6', w: 0, h: 0 },\n sm: { q: 'w=148&h=174&m=6', w: 0, h: 0 },\n lg: { q: 'w=148&h=174&m=6', w: 0, h: 0 }\n },\n lazyload: true\n }\n );\n };\n\n private readonly _removeItemFromCartHandler = (cartlineToRemove: CartLine) => {\n if (this.props.data.cart.result) {\n const input = {\n cartLineIds: [cartlineToRemove.LineId!.toString()]\n };\n this.props.data.cart.result.removeCartLines(input).catch(error => {\n this.props.telemetry.warning(error);\n this.props.telemetry.debug('Unable to Remove Cart Line');\n });\n }\n };\n\n private async _setQuantityLimitsFeatureFlag(): Promise {\n const featureStatuses = await this.props.data.featureState;\n\n const isChannelQuantityLimitsFeatureEnabledInHq =\n featureStatuses?.find(\n featureState => featureState.Name === 'Dynamics.AX.Application.EcommerceQuantityLimitConfigurationsFeature'\n )?.IsEnabled || false;\n if (isChannelQuantityLimitsFeatureEnabledInHq) {\n this.setState({ isQuantityLimitsFeatureEnabled: true });\n return;\n }\n const defaultOrderQuantityLimitsFeatureConfig = this.props.context?.request?.app?.platform?.enableDefaultOrderQuantityLimits;\n if (!defaultOrderQuantityLimitsFeatureConfig || defaultOrderQuantityLimitsFeatureConfig === 'none') {\n this.setState({ isQuantityLimitsFeatureEnabled: false });\n return;\n }\n\n try {\n const featureStatuses = await this.props.data.featureState;\n const isQuantityLimitsFeatureEnabledInHq =\n featureStatuses?.find(\n featureState => featureState.Name === 'Dynamics.AX.Application.RetailDefaultOrderQuantityLimitsFeature'\n )?.IsEnabled || false;\n if (!isQuantityLimitsFeatureEnabledInHq) {\n this.setState({ isQuantityLimitsFeatureEnabled: false });\n return;\n }\n } catch (error) {\n this.props.telemetry.warning(error);\n this.props.telemetry.debug('Unable to get feature states');\n this.setState({ isQuantityLimitsFeatureEnabled: false });\n return;\n }\n if (defaultOrderQuantityLimitsFeatureConfig === 'all') {\n this.setState({ isQuantityLimitsFeatureEnabled: true });\n } else {\n this.props.data.customerInformation\n .then(customerInfo => {\n const result =\n !!customerInfo &&\n ((defaultOrderQuantityLimitsFeatureConfig === 'b2b' && customerInfo.IsB2b) ||\n (defaultOrderQuantityLimitsFeatureConfig === 'b2c' && !customerInfo.IsB2b));\n this.setState({ isQuantityLimitsFeatureEnabled: result });\n })\n .catch(error => {\n this.props.telemetry.warning(error);\n this.props.telemetry.debug('Unable to get customer info');\n });\n }\n }\n}\n\nexport default CartIcon;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\n/* eslint-disable no-duplicate-imports */\nimport { Node } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport { ICartIconViewProps } from './cart-icon';\nimport { IFlyoutCartLineItemViewProps } from './components/flyout-cart-line-items';\n\nconst _renderCartlines = (cartLines: IFlyoutCartLineItemViewProps[] | undefined, props: ICartIconViewProps): JSX.Element[] | null => {\n if (!cartLines) {\n props.context.telemetry.error('Cartlines content is empty, module wont render');\n return null;\n }\n return cartLines.map((cartLine, index) => {\n return (\n \n {cartLine.cartline}\n {cartLine.storeLocation}\n {cartLine.remove}\n \n );\n });\n};\n\nconst CartIconView: React.FC = (props: ICartIconViewProps) => (\n \n {props.cartIcon}\n {props.FlyoutContainer ? (\n \n {props.flyoutTitle}\n {props.checkoutBlockedDueToUnavailableFunds}\n {_renderCartlines(props.cartlines, props)}\n {props.totalPrice}\n {props.checkoutAsSignInUserButton}\n {props.checkoutAsGuestButton}\n {props.goToCartButton}\n \n ) : (\n false\n )}\n \n);\n\nexport default CartIconView;\n","const binding = { modules: {}, dataActions: {} };\n\n const registerActionId = (actionPath) => {\n if (binding.dataActions[actionPath] &&\n binding.dataActions[actionPath].default &&\n binding.dataActions[actionPath].default.prototype &&\n binding.dataActions[actionPath].default.prototype.id) {\n binding.dataActions[binding.dataActions[actionPath].default.prototype.id] = binding.dataActions[actionPath];\n } else {\n Object.keys(binding.dataActions[actionPath] || {}).forEach(exportName => {\n if (binding.dataActions[actionPath][exportName] &&\n binding.dataActions[actionPath][exportName].prototype &&\n binding.dataActions[actionPath][exportName].prototype.Action) {\n binding.dataActions[binding.dataActions[actionPath][exportName].prototype.id] = binding.dataActions[actionPath][exportName];\n }\n })\n }\n };\n\n const registerSanitizedActionPath = (sanitizedActionPath, dataAction) => {\n if (process.env.NODE_ENV === 'development') {\n if (!dataAction.default) {\n throw new Error('Data action path does not have a default export');\n }\n if (!(dataAction.default.prototype.id && binding.dataActions[dataAction.default.prototype.id]) || !binding.dataActions[sanitizedActionPath]) {\n binding.dataActions[sanitizedActionPath] = dataAction;\n }\n } else {\n binding.dataActions[sanitizedActionPath] = dataAction;\n if (!binding.dataActions[sanitizedActionPath].default) {\n throw new Error('Data action path ' + sanitizedActionPath + ' does not have a default export');\n }\n binding.dataActions[sanitizedActionPath].default.prototype.RegistrationId = sanitizedActionPath;\n if (binding.dataActions[sanitizedActionPath].default.prototype.id) {\n binding.dataActions[binding.dataActions[sanitizedActionPath].default.prototype.id] = sanitizedActionPath;\n }\n }\n };\n \n\n (binding.modules['cart-icon'] = {\n c: () => require('partner/modules/cart-icon/cart-icon.tsx'),\n $type: 'containerModule',\n da: [{name:'cart', path:'@msdyn365-commerce/global-state/dist/lib/data-actions/get-cart-state-data-action', runOn: 1},{name:'catalogs', path:'@msdyn365-commerce-modules/retail-actions/dist/lib/get-catalogs', runOn: 0},{name:'channelDeliveryOptionConfig', path:'@msdyn365-commerce-modules/retail-actions/dist/lib/get-channel-delivery-option-configuration', runOn: 0},{name:'customerBalances', path:'@msdyn365-commerce-modules/retail-actions/dist/lib/get-customer-balance', runOn: 0},{name:'customerInformation', path:'@msdyn365-commerce-modules/retail-actions/dist/lib/get-customer', runOn: 0},{name:'featureState', path:'@msdyn365-commerce-modules/retail-actions/dist/lib/get-feature-state', runOn: 0},{name:'orgUnitLocations', path:'@msdyn365-commerce-modules/retail-actions/dist/lib/search-org-unit-locations', runOn: 0}],\n \n iNM: false,\n ns: '__local__',\n n: 'cart-icon',\n p: '__local__',\n \n pdp: '',\n \n \n md: 'src/modules/cart-icon'\n });\n \n\n {\n const sanitizedActionPath = '@msdyn365-commerce-modules/retail-actions/dist/lib/get-catalogs';\n let dataAction = require('@msdyn365-commerce-modules/retail-actions/dist/lib/get-catalogs');\n registerSanitizedActionPath(sanitizedActionPath, dataAction);\n }\n \n\n {\n const sanitizedActionPath = '@msdyn365-commerce-modules/retail-actions/dist/lib/get-channel-delivery-option-configuration';\n let dataAction = require('@msdyn365-commerce-modules/retail-actions/dist/lib/get-channel-delivery-option-configuration');\n registerSanitizedActionPath(sanitizedActionPath, dataAction);\n }\n \n\n {\n const sanitizedActionPath = '@msdyn365-commerce-modules/retail-actions/dist/lib/get-customer';\n let dataAction = require('@msdyn365-commerce-modules/retail-actions/dist/lib/get-customer');\n registerSanitizedActionPath(sanitizedActionPath, dataAction);\n }\n \n\n {\n const sanitizedActionPath = '@msdyn365-commerce-modules/retail-actions/dist/lib/get-customer-balance';\n let dataAction = require('@msdyn365-commerce-modules/retail-actions/dist/lib/get-customer-balance');\n registerSanitizedActionPath(sanitizedActionPath, dataAction);\n }\n \n\n {\n const sanitizedActionPath = '@msdyn365-commerce-modules/retail-actions/dist/lib/get-feature-state';\n let dataAction = require('@msdyn365-commerce-modules/retail-actions/dist/lib/get-feature-state');\n registerSanitizedActionPath(sanitizedActionPath, dataAction);\n }\n \n\n {\n const sanitizedActionPath = '@msdyn365-commerce-modules/retail-actions/dist/lib/search-org-unit-locations';\n let dataAction = require('@msdyn365-commerce-modules/retail-actions/dist/lib/search-org-unit-locations');\n registerSanitizedActionPath(sanitizedActionPath, dataAction);\n }\n \n\n {\n const sanitizedActionPath = '@msdyn365-commerce/global-state/dist/lib/data-actions/get-cart-state-data-action';\n let dataAction = require('@msdyn365-commerce/global-state/dist/lib/data-actions/get-cart-state-data-action');\n registerSanitizedActionPath(sanitizedActionPath, dataAction);\n }\n \n\n \n window.__bindings__ = window.__bindings__ || {};\n window.__bindings__.modules = {\n ...window.__bindings__.modules || {},\n ...binding.modules\n };\n \n window.__bindings__.dataActions = {\n ...window.__bindings__.dataActions || {},\n ...binding.dataActions\n };\n export const viewDictionary = {};\n viewDictionary['__local__|__local__|modules|cart-icon|cart-icon'] = {\n c: () => require('partner/modules/cart-icon/cart-icon.view.tsx'),\n cn: '__local__-__local__-cart-icon'\n };\nviewDictionary['@msdyn365-commerce-modules|cart|modules|cart-icon|cart-icon'] = {\n c: () => require('@msdyn365-commerce-modules/cart/dist/lib/modules/cart-icon/cart-icon.view.js'),\n cn: '@msdyn365-commerce-modules-cart-cart-icon'\n };\nviewDictionary['@msdyn365-commerce-theme|adventureworks-theme-kit|modules|adventureworks|views|cart-icon'] = {\n c: () => require('@msdyn365-commerce-theme/adventureworks-theme-kit/dist/lib/modules/adventureworks/views/cart-icon.view.js'),\n cn: '@msdyn365-commerce-theme-adventureworks-theme-kit-cart-icon'\n };\nwindow.__bindings__ = window.__bindings__ || {};\nwindow.__bindings__.viewDictionary = {\n ...window.__bindings__.viewDictionary || {},\n ...viewDictionary\n };","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { Node } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport { ICartIconViewProps } from './cart-icon';\nimport { IFlyoutCartLineItemViewProps } from './components/flyout-cart-line-items';\n\nconst _renderCartlines = (cartLines: IFlyoutCartLineItemViewProps[] | undefined, props: ICartIconViewProps): JSX.Element[] | null => {\n if (!cartLines) {\n props.context.telemetry.error('Cartlines content is empty, module wont render');\n return null;\n }\n return cartLines.map((cartLine, index) => {\n return (\n \n {cartLine.cartline}\n {cartLine.storeLocation}\n {cartLine.remove}\n \n );\n });\n};\n\nconst CartIconView: React.FC = (props: ICartIconViewProps) => (\n \n {props.cartIcon}\n {props.FlyoutContainer ? (\n \n {props.flyoutTitle}\n {props.checkoutBlockedDueToUnavailableFunds}\n {_renderCartlines(props.cartlines, props)}\n {props.totalPrice}\n {props.checkoutAsSignInUserButton}\n {props.checkoutAsGuestButton}\n {props.goToCartButton}\n \n ) : (\n false\n )}\n \n);\n\nexport default CartIconView;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { AddToCartBehavior } from '@msdyn365-commerce/components';\nimport MsDyn365, { getUrlSync } from '@msdyn365-commerce/core';\nimport { ICartIconViewProps, ICartViewProps, IFlyoutCartLineItemViewProps } from '@msdyn365-commerce-modules/cart';\nimport { Button, getPayloadObject, INodeProps, KeyCodes, Modal, Node, onTelemetryClick } from '@msdyn365-commerce-modules/utilities';\nimport classnames from 'classnames';\nimport React from 'react';\n\nimport { ICartIconProps as ICartIconExtensionProps } from '../definition-extensions/cart-icon.ext.props.autogenerated';\n\n/**\n * ICartIconViewState: Interface for Cart Icon View State.\n */\ninterface ICartIconViewState {\n isModalOpen: boolean;\n}\n\n/**\n * Render Cart lines.\n * @param cartLines - Flyout cart line view props.\n * @param props - Cart icon view props.-\n * @returns JSX Element.\n */\nconst renderCartlines = (cartLines: IFlyoutCartLineItemViewProps[] | undefined, props: ICartIconViewProps): JSX.Element[] | null => {\n if (!cartLines) {\n props.context.telemetry.error('Cartlines content is empty, module wont render');\n return null;\n }\n\n return cartLines.map((cartLine, index) => {\n const cartLineIndex = index;\n return (\n \n {cartLine.cartline}\n {cartLine.storeLocation}\n {cartLine.remove}\n \n );\n });\n};\n\n/**\n * Initiate total price.\n * @param props - Cart icon view props.\n * @returns JSX Element.\n */\nconst renderTotalPrice = (props: ICartIconViewProps & ICartIconExtensionProps<{}>): JSX.Element | null => {\n const cart = props.data.cart.result ?? undefined;\n const price = cart && !cart.hasInvoiceLine && (cart.cart.TotalAmount || undefined);\n const totalPrice = price\n ? props.context.cultureFormatter.formatCurrency(price)\n : props.context.cultureFormatter.formatCurrency(props.resources.emptyPrice);\n return cart && !cart.hasInvoiceLine ? (\n
\n \n {props.resources.totalPriceFormatString}\n {totalPrice}\n \n
\n ) : (\n <>\n );\n};\n\n/**\n * Initiate subtotal message.\n * @param props - Cart icon view props.\n * @returns JSX Element.\n */\nconst renderSubtotalMessage = (props: ICartIconViewProps & ICartIconExtensionProps<{}>): JSX.Element | null => {\n const cart = props.data.cart.result ?? undefined;\n return cart && !cart.hasInvoiceLine ?

{props.resources.subTotalMessage}

: null;\n};\n\n/**\n *\n * CartIconView component.\n * @extends {React.PureComponent}\n */\nexport class CartIconView extends React.PureComponent<\n ICartViewProps & ICartIconViewProps & ICartIconExtensionProps<{}>,\n ICartIconViewState\n> {\n private isAutoDisplayTriggered: boolean;\n\n private readonly cartIconRef: React.RefObject = React.createRef();\n\n public constructor(props: ICartViewProps & ICartIconViewState & ICartIconViewProps & ICartIconExtensionProps<{}>) {\n super(props);\n this.isAutoDisplayTriggered = false;\n this.state = {\n isModalOpen: false\n };\n }\n\n public componentDidMount(): void {\n if (MsDyn365.isBrowser) {\n window.addEventListener('keydown', this._escFunction, false);\n }\n }\n\n public componentWillUnmount(): void {\n if (MsDyn365.isBrowser) {\n window.removeEventListener('keydown', this._escFunction, false);\n }\n }\n\n /**\n * Render Cart Item count.\n * @returns JSX Element.\n */\n public render(): JSX.Element | null {\n const cart = this.props.data.cart.result ?? undefined;\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access -- check config.\n const shouldShowMiniCart =\n cart?.isProductAddedToCart && this.props.context.app.config.addToCartBehavior === AddToCartBehavior.showMiniCart;\n if (shouldShowMiniCart) {\n if (!this.isAutoDisplayTriggered) {\n // First time trigger auto mini cart.\n this.setState({ isModalOpen: true });\n this.isAutoDisplayTriggered = true;\n } else if (!this.state.isModalOpen) {\n // If modal is closed, reset the flag.\n this.isAutoDisplayTriggered = false;\n }\n }\n return (\n \n \n \n \n {this.props.flyoutTitle}\n {this._renderCartItemCount(this.props)}\n {this._renderCartCloseIcon()}\n \n \n {this.props.data.cart.result?.isEmpty ? this.props.slots.emptyCart : null}\n {this.props.checkoutBlockedDueToUnavailableFunds}\n {renderCartlines(this.props.cartlines, this.props)}\n \n \n {this.props.slots.promoContentItem}\n {renderTotalPrice(this.props)}\n {renderSubtotalMessage(this.props)}\n {this.props.checkoutAsSignInUserButton}\n {this.props.checkoutAsGuestButton}\n {this.props.data.cart.result?.isEmpty ? null : this.props.goToCartButton}\n \n {this.props.data.cart.result?.isEmpty ? (\n \n {this.props.resources.continueShoppingButtonTitle}\n \n ) : null}\n \n \n \n \n );\n }\n\n /**\n * Initiate modal container.\n * @returns Inode props.\n */\n private readonly _modalContainer = (): INodeProps => {\n return {\n tag: Modal,\n placement: 'bottom-end',\n hideArrow: true,\n className: 'ms-cart-icon__minicartmodal-container',\n wrapClassName: 'ms-cart-icon__minicartmodal',\n isOpen: this.state.isModalOpen,\n toggle: this.closeModal\n };\n };\n\n /**\n * Initiate open modal.\n */\n private readonly _openModal = (): void => {\n const payLoad = getPayloadObject('click', this.props.telemetryContent!, 'cart-icon', '');\n onTelemetryClick(this.props.telemetryContent!, payLoad, 'cart-icon');\n this.setState({\n isModalOpen: true\n });\n };\n\n /**\n * Initiate close modal.\n */\n private readonly closeModal = (): void => {\n this.cartIconRef.current?.focus();\n this.setState({\n isModalOpen: false\n });\n };\n\n /**\n * Initiate cart close Icon.\n * @returns JSX Element.\n */\n private readonly _renderCartCloseIcon = (): JSX.Element | null => {\n return