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D9H,IAAAA,cAACiD,EAAAA,KAAI,CAACvC,UAAU,6BACgB,QAA3ByD,EAAAvD,KAAKV,MAAMvB,KAAKU,KAAKC,cAAM,IAAA6E,GAA3BA,EAA6BsB,QAC1BzF,IAAAA,cAAC8B,EAAAA,OAAM,CACHpB,UAAU,mCACVqH,MAAMC,EAAAA,EAAAA,IAAW,OAAQpH,KAAKV,MAAMoE,QAAQ2D,gBAE3CrH,KAAKV,MAAM6C,UAAUmF,6BAE1B,SAtIRC,IAACjK,EAAuDgC,GAoNhF,iBC/OAmd,EAAOC,QAAUtd,cCAjBqd,EAAOC,QAAUC","sources":["webpack://bju-press/./src/themes/base/views/cart-icon.view.tsx?2879","webpack://bju-press/./lib/cart-icon/module-registration.js?4d28","webpack://bju-press/./src/validate-cart.ts?cd50","webpack://bju-press/./src/Common/get-product.ts?0a21","webpack://bju-press/./src/modules/cart-icon/components/flyout-cart-line-items.tsx?f2c4","webpack://bju-press/./src/modules/cart-icon/utils/get-products-in-mini-cart.ts?3c15","webpack://bju-press/./src/modules/cart-icon/cart-icon.tsx?4ae8","webpack://bju-press/./src/modules/cart-icon/cart-icon.view.tsx?f9dd","webpack://bju-press/../../src/search-org-unit-locations.ts?d18d","webpack://bju-press/./src/modules/adventureworks/views/cart-icon.view.tsx?7ec9","webpack://bju-press/external var \"React\"?0d3b","webpack://bju-press/external var \"ReactDOM\"?853b"],"sourcesContent":["// @CUSTOM: The view and accompanying definition extensions are from adventureworks@9.47. Any custom changes noted are\r\n// edits to the adventureworks version, not core.\r\n\r\n/*!\r\n * Copyright (c) Microsoft Corporation.\r\n * All rights reserved. See LICENSE in the project root for license information.\r\n */\r\n\r\nimport { AddToCartBehavior } from '@msdyn365-commerce/components';\r\nimport MsDyn365, { getUrlSync } from '@msdyn365-commerce/core';\r\nimport { ICartIconViewProps, ICartViewProps, IFlyoutCartLineItemViewProps } from '@msdyn365-commerce-modules/cart';\r\nimport { Button, getPayloadObject, INodeProps, KeyCodes, Modal, Node, onTelemetryClick } from '@msdyn365-commerce-modules/utilities';\r\nimport classnames from 'classnames';\r\nimport React from 'react';\r\n\r\nimport { ICartIconProps as ICartIconExtensionProps } from '../definition-extensions/cart-icon.ext.props.autogenerated';\r\n\r\n//----------------------------------------------------------\r\n// @CUSTOM: Kit custom imports\r\n//----------------------------------------------------------\r\nimport { ICartIconData } from '@msdyn365-commerce-modules/cart/src/modules/cart-icon/cart-icon.data';\r\nimport { attrNames } from '../../../utilities/global-constants';\r\nimport { convertCartAttributes } from '../../../utilities/data-attribute-parser';\r\nimport { CartIconComponent } from './components/carticon.component';\r\nimport { CartLineItemComponent} from './components/cartlineitem.component';\r\n//----------------------------------------------------------\r\n\r\n//----------------------------------------------------------\r\n// @CUSTOM: Kit display - get elective cart lines tied to\r\n// kit item\r\n//----------------------------------------------------------\r\nconst getElectiveCartLines = (kitCartLine: IFlyoutCartLineItemViewProps, cartLines: IFlyoutCartLineItemViewProps[]) => {\r\n return cartLines.filter(cartLine => {\r\n const kitAttributes = kitCartLine.data?.cartline.AttributeValues;\r\n const parsedKitAttributes = kitAttributes && convertCartAttributes(kitAttributes);\r\n const attributes = cartLine.data?.cartline.AttributeValues;\r\n const parsedAttributes = attributes && convertCartAttributes(attributes);\r\n return parsedKitAttributes && parsedAttributes && parsedKitAttributes[attrNames.kitLineChildAssociation] === parsedAttributes[attrNames.kitLineParentAssociation];\r\n });\r\n};\r\n//----------------------------------------------------------\r\n\r\n//----------------------------------------------------------\r\n// @CUSTOM: Kit display - remove kit item alongside tied\r\n// elective items\r\n//----------------------------------------------------------\r\nconst removeKitItem = async (kitCartLine: IFlyoutCartLineItemViewProps, cartLines: IFlyoutCartLineItemViewProps[], cartData: ICartIconData) => {\r\n const electiveCartLines = getElectiveCartLines(kitCartLine, cartLines);\r\n\r\n if (cartData.cart.result) {\r\n const input = {\r\n cartLineIds: [kitCartLine.data.cartline.LineId!.toString()]\r\n };\r\n\r\n if (electiveCartLines) {\r\n electiveCartLines.forEach(electiveCartLine => {\r\n input.cartLineIds.push(electiveCartLine.data.cartline.LineId!.toString());\r\n });\r\n }\r\n\r\n cartData.cart.result.removeCartLines(input);\r\n }\r\n};\r\n//----------------------------------------------------------\r\n\r\n/**\r\n * ICartIconViewState: Interface for Cart Icon View State.\r\n */\r\ninterface ICartIconViewState {\r\n isModalOpen: boolean;\r\n}\r\n\r\n/**\r\n * Render Cart lines.\r\n * @param cartLines - Flyout cart line view props.\r\n * @param props - Cart icon view props.-\r\n * @returns JSX Element.\r\n */\r\nconst renderCartlines = (cartLines: IFlyoutCartLineItemViewProps[] | undefined, props: ICartIconViewProps): (JSX.Element | null)[] | null => { // @CUSTOM: Kit display - updated return type to account for no cart lines being returned\r\n if (!cartLines) {\r\n props.context.telemetry.error('Cartlines content is empty, module wont render');\r\n return null;\r\n }\r\n\r\n return cartLines.map((cartLine, index) => {\r\n //--------------------------------------------------\r\n // @CUSTOM: Kit display\r\n //--------------------------------------------------\r\n\r\n // Minicart does not use cartlineitem.component extension by default on other themes extended from base, so\r\n // have to force import it and replace the original component\r\n const cartLineProps = React.isValidElement(cartLine.cartline) && cartLine.cartline.props;\r\n const cartLineOverride = ;\r\n\r\n const cartLineData = cartLine.data?.cartline;\r\n const lineAttributes = cartLineData?.AttributeValues && convertCartAttributes(cartLineData.AttributeValues);\r\n const kitElectives = lineAttributes && lineAttributes[attrNames.kitElectives];\r\n\r\n // Do not return kit elective cart lines\r\n if (lineAttributes && lineAttributes[attrNames.kitLineParentAssociation]) {\r\n return null;\r\n }\r\n\r\n const removeProps = React.isValidElement(cartLine.remove) && cartLine.remove.props;\r\n //--------------------------------------------------\r\n\r\n const cartLineIndex = index;\r\n return (\r\n \r\n {/* @CUSTOM: Replace original cartlineitem component {cartLine.cartline} with extended one to show cartline customizations */}\r\n {cartLineOverride}\r\n {cartLine.storeLocation}\r\n {/* @CUSTOM: Replaced Remove button below with custom remove cartline handler if item is a kit with electives */}\r\n {kitElectives\r\n ? \r\n \r\n \r\n {this.props.flyoutTitle}\r\n {this._renderCartItemCount(this.props)}\r\n {this._renderCartCloseIcon()}\r\n {/* @CUSTOM: Sign-in warning */}\r\n {!this.props.context.request.user.emailAddress && this.props.config.signInWarning &&
{this.props.config.signInWarning}
}\r\n
\r\n \r\n {this.props.data.cart.result?.isEmpty ? this.props.slots.emptyCart : null}\r\n {this.props.checkoutBlockedDueToUnavailableFunds}\r\n {renderCartlines(this.props.cartlines, this.props)}\r\n \r\n \r\n {this.props.slots.promoContentItem}\r\n {renderTotalPrice(this.props)}\r\n {renderSubtotalMessage(this.props)}\r\n {/* @CUSTOM: Moved Checkout, Guest Checkout, Go to Cart buttons to btn-section div below */}\r\n \r\n {this.props.checkoutAsSignInUserButton}\r\n {/* @CUSTOM Removed Guest Checkout {this.props.checkoutAsGuestButton} */}\r\n {this.props.data.cart.result?.isEmpty ? null : this.props.goToCartButton}\r\n {this.props.data.cart.result?.isEmpty ? (\r\n \r\n {this.props.resources.continueShoppingButtonTitle}\r\n \r\n ) : null}\r\n \r\n \r\n
\r\n
\r\n );\r\n }\r\n\r\n /**\r\n * Initiate modal container.\r\n * @returns Inode props.\r\n */\r\n private readonly _modalContainer = (): INodeProps => {\r\n return {\r\n tag: Modal,\r\n placement: 'bottom-end',\r\n hideArrow: true,\r\n className: classnames('ms-cart-icon__minicartmodal-container', this.props.config.className), // @CUSTOM: Added config CSS class\r\n wrapClassName: 'ms-cart-icon__minicartmodal',\r\n isOpen: this.state.isModalOpen,\r\n toggle: this.closeModal\r\n };\r\n };\r\n\r\n /**\r\n * Initiate open modal.\r\n */\r\n private readonly _openModal = (): void => {\r\n const payLoad = getPayloadObject('click', this.props.telemetryContent!, 'cart-icon', '');\r\n onTelemetryClick(this.props.telemetryContent!, payLoad, 'cart-icon');\r\n this.setState({\r\n isModalOpen: true\r\n });\r\n };\r\n\r\n /**\r\n * Initiate close modal.\r\n */\r\n private readonly closeModal = (): void => {\r\n this.cartIconRef.current?.focus();\r\n this.setState({\r\n isModalOpen: false\r\n });\r\n };\r\n\r\n /**\r\n * Initiate cart close Icon.\r\n * @returns JSX Element.\r\n */\r\n private readonly _renderCartCloseIcon = (): JSX.Element | null => {\r\n return \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\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\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 const priceString = price\n ? resources.totalPriceFormatString.replace('{price}', context.cultureFormatter.formatCurrency(price))\n : '';\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 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\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\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 {\n CacheType,\n createObservableDataAction,\n IAction,\n IAny,\n IActionContext,\n IActionInput,\n ICreateActionContext,\n IGeneric\n} from '@msdyn365-commerce/core';\nimport { OrgUnitLocation } from '@msdyn365-commerce/retail-proxy';\nimport { searchOrgUnitLocationsAsync } from '@msdyn365-commerce/retail-proxy/dist/DataActions/OrgUnitsDataActions.g';\n\n/**\n * Input for search-org-unit-locations data action.\n */\nexport class SearchOrgUnitLocationsInput implements IActionInput {\n public getCacheKey = () => 'SearchOrgUnitLocations';\n\n public getCacheObjectType = () => 'SearchOrgUnitLocations';\n\n public dataCacheType = (): CacheType => 'request';\n}\n\n/**\n * Creates the input required to make the retail api call.\n * @param inputData -- Input data.\n * @returns -- IActionInput.\n */\nexport const createSearchOrgUnitLocationsInputFunc = (inputData: ICreateActionContext>): IActionInput => {\n return new SearchOrgUnitLocationsInput();\n};\n\n/**\n * Calls the Retail API and returns all the orgUnitLocations as array.\n * @param input - Input.\n * @param ctx - Context.\n * @returns - orgUnitLocations.\n */\nexport async function getSearchOrgUnitLocationsAction(\n input: SearchOrgUnitLocationsInput,\n context: IActionContext\n): Promise {\n const OrgUnitLocations = await searchOrgUnitLocationsAsync(\n {\n callerContext: context\n },\n {}\n );\n\n return OrgUnitLocations;\n}\n\nexport const retailActionDataAction = createObservableDataAction({\n id: '@msdyn365-commerce-modules/retail-actions/search-org-unit-locations',\n action: >getSearchOrgUnitLocationsAction,\n input: createSearchOrgUnitLocationsInputFunc\n});\n\nexport default retailActionDataAction;\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