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A,EAAKlE,UAAWo5D,EAASp5D,WAAeo5D,GAC9C9U,EACAukD,EACA3wC,GAAqBu0C,GAClBttG,EAAAA,cAAC4a,EAAAA,KAAIrZ,OAAAC,OAAA,GAAK8rG,GACLv0C,EAAkB50D,KAAIm4C,GACZA,KAIlB6B,EACA/R,EACAO,EACAm9D,IAKb,EAxG6D5mG,IACzD,MAAM,cACF8mG,EAAa,OACbjvE,EAAM,cACNoW,EAAa,QACb9tC,EAAO,SACPgqG,EAAQ,SACRt7F,EAAQ,QACRkoD,EAAO,eACPnsB,EAAc,kBACdw/D,EAAiB,iBACjBtxF,EAAgB,uBAChBuxF,GACArqG,EAEJ,OACIlD,EAAAA,cAAC2a,EAAAA,OAAMpZ,OAAAC,OAAA,GAAKwoG,GACP3mG,EACAkqG,EACW,YAAXxyE,GAAwBoW,EACxBk8D,GAAYt7F,GAAYA,EAASkB,OAAS,GACvCjT,EAAAA,cAAC4a,EAAAA,KAAIrZ,OAAAC,OAAA,GAAK6rG,GACLt7F,GACGA,EAAS5N,KAAIvD,GACFA,GAAWixD,EAAYjxD,EAASq5D,EAASqzC,EAAmBx/D,EAAgB9xB","sources":["webpack://lds-commerce/./src/modules/active-image-utilities/active-product.tsx?69b2","webpack://lds-commerce/./src/modules/active-image-utilities/additional-content.tsx?6946","webpack://lds-commerce/./src/modules/active-image-utilities/image-mapper.tsx?dd86","webpack://lds-commerce/./src/modules/active-image/active-image.tsx?00d3","webpack://lds-commerce/./src/modules/active-image/active-image.view.tsx?a935","webpack://lds-commerce/./src/modules/carousel/carousel.tsx?80d4","webpack://lds-commerce/./src/modules/carousel/carousel.view.tsx?d82f","webpack://lds-commerce/./src/checkout-errors/checkout-errors.ts?a9e0","webpack://lds-commerce/./src/common/error.tsx?096f","webpack://lds-commerce/./src/common/waiting.tsx?8095","webpack://lds-commerce/./src/modules/gift-card-balance-check/components/get-form.tsx?e249","webpack://lds-commerce/./src/modules/gift-card-balance-check/components/get-item.tsx?4862","webpack://lds-commerce/./src/modules/gift-card-balance-check/gift-card-balance-check.tsx?d1f8","webpack://lds-commerce/./src/modules/gift-card-balance-check/gift-card-balance-check.view.tsx?a0c9","webpack://lds-commerce/./src/modules/header/components/header-preferred-store.tsx?ee9c","webpack://lds-commerce/./src/modules/header/components/logo.tsx?f27e","webpack://lds-commerce/./src/modules/header/components/nav-icon.tsx?2475","webpack://lds-commerce/./src/modules/header/header.tsx?e91a","webpack://lds-commerce/./src/modules/header/header.view.tsx?cf0f","webpack://lds-commerce/./src/modules/media-gallery/utils/helper.ts?b895","webpack://lds-commerce/./src/modules/media-gallery/utils/get-valid-product-images.ts?a364","webpack://lds-commerce/./src/modules/media-gallery/media-gallery.tsx?24d7","webpack://lds-commerce/./src/modules/media-gallery/media-gallery.view.tsx?5061","webpack://lds-commerce/./src/modules/order-template-list/components/order-template-list.tsx?86c4","webpack://lds-commerce/./src/modules/order-template-list/components/orderTemplateList-status-message.tsx?183c","webpack://lds-commerce/./src/modules/order-template-list/components/create-order-template.tsx?ea38","webpack://lds-commerce/./src/modules/order-template-list/order-template-list.tsx?18d0","webpack://lds-commerce/./src/modules/order-template-list/order-template-list.view.tsx?103b","webpack://lds-commerce/./src/modules/order-template/components/add-line/spinner.tsx?b423","webpack://lds-commerce/./src/modules/order-template/components/add-line/add-line.tsx?5f8a","webpack://lds-commerce/./src/modules/order-template/components/add-line/dropdown.tsx?1cba","webpack://lds-commerce/./src/modules/order-template/components/add-line/not-found.tsx?392d","webpack://lds-commerce/./src/modules/order-template/components/common/order-template-quantity.tsx?99a1","webpack://lds-commerce/./src/modules/order-template/components/add-line/product-configuration.tsx?b256","webpack://lds-commerce/./src/modules/order-template/components/add-line/product-list.tsx?4284","webpack://lds-commerce/./src/modules/order-template/components/bulk-actions.tsx?dbe8","webpack://lds-commerce/./src/modules/order-template/components/order-template-actions.tsx?8136","webpack://lds-commerce/./src/modules/order-template/components/order-template-lines.tsx?3703","webpack://lds-commerce/./src/modules/order-template/components/order-template-lines-status-message.tsx?2986","webpack://lds-commerce/./src/modules/order-template/components/order-template-table-heading.tsx?665c","webpack://lds-commerce/./src/modules/order-template/order-template.tsx?4ecb","webpack://lds-commerce/./src/modules/order-template/order-template.view.tsx?a45e","webpack://lds-commerce/./src/modules/quick-order/components/quick-order-drawer.tsx?f8b4","webpack://lds-commerce/./src/modules/quick-order/components/quick-order-form.tsx?eb54","webpack://lds-commerce/./src/modules/quick-order/components/quick-order-product.ts?7702","webpack://lds-commerce/./src/modules/quick-order/components/quick-order-table/components/quick-order-table-header-component.tsx?49e7","webpack://lds-commerce/./src/modules/quick-order/components/quick-order-table/components/quick-order-table-row-component.tsx?e487","webpack://lds-commerce/./src/modules/quick-order/components/quick-order-table/quick-order-table-component.tsx?46c1","webpack://lds-commerce/./src/modules/quick-order/quick-order.tsx?ef21","webpack://lds-commerce/./src/modules/quick-order/quick-order.view.tsx?a96d","webpack://lds-commerce/./src/actions/submit-user-review.ts?ac78","webpack://lds-commerce/./src/actions/inputs/submit-user-review-input.ts?3afb","webpack://lds-commerce/./src/common/review-modal.tsx?54a9","webpack://lds-commerce/./src/common/rnrInterface.ts?f761","webpack://lds-commerce/./src/modules/ratings-histogram/component/components.tsx?f324","webpack://lds-commerce/./src/modules/ratings-histogram/ratings-histogram.tsx?f6bc","webpack://lds-commerce/./src/modules/ratings-histogram/ratings-histogram.view.tsx?5bff","webpack://lds-commerce/./src/actions/report-review-concern.ts?bf43","webpack://lds-commerce/./src/actions/submit-helpfulness-vote.ts?a8ab","webpack://lds-commerce/./src/actions/inputs/report-review-concern-input.ts?b071","webpack://lds-commerce/./src/modules/reviews-list/components/components.tsx?033b","webpack://lds-commerce/./src/modules/reviews-list/components/report-review-modal.tsx?53d3","webpack://lds-commerce/./src/modules/reviews-list/components/review-card.tsx?6bbd","webpack://lds-commerce/./src/actions/inputs/submit-helpfulness-vote-input.ts?07aa","webpack://lds-commerce/./src/modules/reviews-list/reviews-list.tsx?37e8","webpack://lds-commerce/./src/modules/reviews-list/reviews-list.view.tsx?0e4a","webpack://lds-commerce/./src/modules/write-review/components/components.tsx?3575","webpack://lds-commerce/./src/modules/write-review/write-review.tsx?9afc","webpack://lds-commerce/./src/modules/write-review/write-review.view.tsx?b867","webpack://lds-commerce/./src/modules/search-result-container/components/utilities.ts?8569","webpack://lds-commerce/./src/modules/search-result-container/components/choice-summary.tsx?3f71","webpack://lds-commerce/./src/modules/search-result-container/components/error-message.tsx?6302","webpack://lds-commerce/./src/modules/search-result-container/components/feature-search-result-item.tsx?71fa","webpack://lds-commerce/./src/modules/search-result-container/components/link.tsx?52c2","webpack://lds-commerce/./src/modules/search-result-container/components/modal.tsx?d78e","webpack://lds-commerce/./src/modules/search-result-container/components/product-search-result-items.tsx?5174","webpack://lds-commerce/./src/modules/search-result-container/components/range-refine-item.tsx?6288","webpack://lds-commerce/./src/modules/search-result-container/components/refine-item.tsx?a594","webpack://lds-commerce/./src/modules/search-result-container/components/range-refine-item-input.tsx?09aa","webpack://lds-commerce/./src/modules/search-result-container/components/refine-submenu.tsx?1292","webpack://lds-commerce/./src/modules/search-result-container/components/separator.tsx?4ea6","webpack://lds-commerce/./src/modules/search-result-container/components/title.tsx?c269","webpack://lds-commerce/./src/modules/search-result-container/search-result-container.tsx?7500","webpack://lds-commerce/./src/modules/search-result-container/search-result-container.view.tsx?b779","webpack://lds-commerce/./src/search-state.ts?dd10","webpack://lds-commerce/./src/modules/search/actions/get-auto-suggest-suggestions.ts?4735","webpack://lds-commerce/./src/modules/search/components/search.categorysuggest.tsx?c65d","webpack://lds-commerce/./src/modules/search/components/search.form.tsx?25a5","webpack://lds-commerce/./src/modules/search/components/search.keywordsuggest.tsx?297c","webpack://lds-commerce/./src/modules/search/components/search.label.tsx?0c17","webpack://lds-commerce/./src/modules/search/components/search.productsuggest.tsx?2af9","webpack://lds-commerce/./src/modules/search/search.tsx?72fb","webpack://lds-commerce/./src/modules/search/search.view.tsx?1505","webpack://lds-commerce/./src/modules/social-share-item/social-share-item.tsx?bbcb","webpack://lds-commerce/./src/modules/social-share-item/social-share-item.view.tsx?2d3e","webpack://lds-commerce/./src/modules/video-player/components/additional-content.tsx?b368","webpack://lds-commerce/./src/modules/video-player/video-player.tsx?53e5","webpack://lds-commerce/./src/modules/video-player/video-player.view.tsx?fedb","webpack://lds-commerce/./src/modules/wishlist-items/components/wishlist-items-dimensions.tsx?15c5","webpack://lds-commerce/./src/modules/wishlist-items/components/wishlist-item.tsx?d2da","webpack://lds-commerce/./src/modules/wishlist-items/components/wishlist-items-status-message.tsx?cdb3","webpack://lds-commerce/./src/modules/wishlist-items/wishlist-items.tsx?df8b","webpack://lds-commerce/./src/modules/wishlist-items/wishlist-items.view.tsx?4d80"],"sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { PriceComponent, RatingComponent } from '@msdyn365-commerce/components';\nimport {\n IComponent,\n IComponentProps,\n ICoreContext,\n IGridSettings,\n IImageData,\n IImageSettings,\n Image,\n IRequestContext\n} from '@msdyn365-commerce/core';\nimport { ProductPrice, ProductSearchResult } from '@msdyn365-commerce/retail-proxy';\nimport { format } from '@msdyn365-commerce-modules/utilities';\nimport React from 'react';\n\n/**\n * IActiveProductProps interface.\n */\nexport interface IActiveProductProps extends IComponentProps<{ product?: ProductSearchResult }> {\n className?: string;\n imageSettings?: IImageSettings;\n savingsText?: string;\n freePriceText?: string;\n originalPriceText?: string;\n currentPriceText?: string;\n ratingAriaLabel?: string;\n}\n\n/**\n * IActiveProduct interface.\n */\nexport interface IActiveProduct extends IComponent {}\n\n/**\n * RenderDescription function.\n * @param description - Product description string.\n * @returns - Returns JSX.Element | null.\n */\nfunction renderDescription(description?: string): JSX.Element | null {\n return

{description}

;\n}\n\n/**\n * GetRatingAriaLabel function.\n * @param rating - Product rating number.\n * @param ratingAriaLabel - Product rating aria label.\n * @returns - Returns string.\n */\nfunction getRatingAriaLabel(rating?: number, ratingAriaLabel?: string): string {\n const numberTwo: number = 2;\n if (rating && ratingAriaLabel) {\n const roundedRating = rating.toFixed(numberTwo);\n return format(ratingAriaLabel || '', roundedRating, '5');\n }\n return '';\n}\n\n/**\n * RenderRating function.\n * @param context - The core context.\n * @param typeName - The type name of the module.\n * @param ratingId - The rating id.\n * @param avgRating - The average rating.\n * @param totalRatings - The total ratings.\n * @param ariaLabel - The rating aria label.\n * @returns - Returns JSX.Element | null.\n */\nfunction renderRating(\n context: ICoreContext,\n typeName: string,\n ratingId: string,\n avgRating?: number,\n totalRatings?: number,\n ariaLabel?: string\n): JSX.Element | null {\n if (!avgRating) {\n return null;\n }\n\n const numberRatings = totalRatings?.toString() ?? undefined;\n const ratingAriaLabel = getRatingAriaLabel(avgRating, ariaLabel);\n\n return (\n \n );\n}\n\n/**\n * RenderPrice function.\n * @param context - The core context.\n * @param typeName - The type name of the module.\n * @param productId - The product id.\n * @param basePrice - The base price of the product.\n * @param adjustedPrice - The adjusted price of the product.\n * @param savingsText - The savings text of the product.\n * @param freePriceText - The free price text.\n * @param originalPriceText - The original price text.\n * @returns - Returns JSX.Element | null.\n */\nfunction renderPrice(\n context: ICoreContext,\n typeName: string,\n productId: string,\n basePrice?: number,\n adjustedPrice?: number,\n savingsText?: string,\n freePriceText?: string,\n originalPriceText?: string\n): JSX.Element | null {\n const price: ProductPrice = {\n BasePrice: basePrice,\n AdjustedPrice: adjustedPrice,\n CustomerContextualPrice: adjustedPrice\n };\n\n return (\n \n );\n}\n\n/**\n * RenderProductPlacementImage function.\n * @param requestContext - RequestContext.\n * @param imageSettings - The product image settings.\n * @param gridSettings - The viewport gird settings.\n * @param imageUrl - The product image url.\n * @param altText - The product image alt text.\n * @returns - Returns JSX.Element | null.\n */\nfunction renderProductPlacementImage(\n requestContext: IRequestContext,\n imageSettings?: IImageSettings,\n gridSettings?: IGridSettings,\n imageUrl?: string,\n altText?: string\n): JSX.Element | null {\n if (!imageUrl || !gridSettings || !imageSettings) {\n return null;\n }\n const imgData: IImageData = {\n src: imageUrl,\n altText: altText ? altText : ''\n };\n const imageProps = {\n gridSettings,\n imageSettings\n };\n imageProps.imageSettings.cropFocalRegion = true;\n return ;\n}\n\n/**\n * ActiveProduct constant.\n * @param props - The active product props.\n * @param props.data - The product search result data.\n * @param props.context - The core context.\n * @param props.imageSettings - The prodcut image settings.\n * @param props.savingsText - The product savings text.\n * @param props.freePriceText - The free price text.\n * @param props.originalPriceText - The original price text.\n * @param props.ratingAriaLabel - The product rating aria label.\n * @param props.typeName - The type name of the module.\n * @param props.id - The id of the product.\n * @returns - Returns JSX.Element | null.\n */\nexport const ActiveProductComponent: React.FC = ({\n data,\n context,\n imageSettings,\n savingsText,\n freePriceText,\n originalPriceText,\n ratingAriaLabel,\n typeName,\n // eslint-disable-next-line @typescript-eslint/naming-convention -- Do not need naming convention check for library prameters\n id\n}) => {\n const product = data.product;\n if (!product) {\n return null;\n }\n\n return (\n <>\n
\n
\n {renderProductPlacementImage(\n context.actionContext.requestContext,\n imageSettings,\n context.request.gridSettings,\n product.PrimaryImageUrl,\n product.Name\n )}\n
\n
\n

{product.Name}

\n {renderPrice(context, typeName, id, product.BasePrice, product.Price, savingsText, freePriceText, originalPriceText)}\n {renderDescription(product.Description)}\n {!context.app.config.hideRating &&\n renderRating(context, typeName, id, product.AverageRating, product.TotalRatings, ratingAriaLabel)}\n
\n
\n \n );\n};\n\nexport default ActiveProductComponent;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport * as Msdyn365 from '@msdyn365-commerce/core';\nimport { INodeProps } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\n/**\n * ILinksData: Interface for\n * Additional content.\n */\ninterface ILinksData {\n linkText?: string;\n linkUrl: Msdyn365.ILinkData;\n ariaLabel?: string;\n isOpenInNewTab?: boolean;\n}\n\n/**\n * IAdditionalContentData: Interface for\n * Active content.\n */\ninterface IAdditionalContentData {\n heading?: string;\n subtext?: string;\n links?: ILinksData[];\n}\n\n/**\n * IActiveImageAdditionalContentProps: Interface for\n * Active Image Additional Content Component props.\n */\nexport interface IActiveImageAdditionalContentProps {\n requestContext: Msdyn365.IRequestContext;\n additionalContent: IAdditionalContentData | undefined;\n handleAdditionalTextChange(event: Msdyn365.ContentEditableEvent): void;\n handleAdditionalParagraphChange(event: Msdyn365.ContentEditableEvent): void;\n handleAdditionalLinkTextChange(linkIndex: number, event: Msdyn365.ContentEditableEvent): void;\n}\n\n/**\n * IActiveImageAdditionalContentViewProps: Interface for\n * Active Image Additional Content view props.\n */\nexport interface IActiveImageAdditionalContentViewProps {\n additionalContentNode: INodeProps;\n heading: React.ReactNode;\n text: React.ReactNode;\n links: React.ReactNode;\n additionalContentContainer: INodeProps;\n additionalContentItemLinks: INodeProps;\n}\n\n/**\n * Renders additional content heading.\n * @param additionalContentHeading - Additional content heading.\n * @param props - Active Image Additional content component props.\n * @returns Heading Node.\n */\nconst renderHeading = (additionalContentHeading: string, props: IActiveImageAdditionalContentProps) => {\n const requestContext = props.requestContext;\n return (\n {\n props.handleAdditionalTextChange(event);\n },\n requestContext\n }}\n />\n );\n};\n\n/**\n * Renders additional content heading.\n * @param additionalContentParagraphText - Additional content paragraph text.\n * @param props - Active Image Additional content component props.\n * @returns Paragraph Node.\n */\nconst renderParagraph = (additionalContentParagraphText: string, props: IActiveImageAdditionalContentProps) => {\n const requestContext = props.requestContext;\n return (\n {\n props.handleAdditionalTextChange(event);\n },\n requestContext\n }}\n />\n );\n};\n\n/**\n * Renders additional content heading.\n * @param ctaLink - Additional content link.\n * @param props - Active Image Additional content component props.\n * @param linkIndex - Additional content link index.\n * @returns Link Node.\n */\nconst renderLinks = (ctaLink: ILinksData, props: IActiveImageAdditionalContentProps, linkIndex: number) => {\n const editableLink: Msdyn365.ILinksData = {\n ariaLabel: ctaLink.ariaLabel,\n className: 'msc-active-image__details__additional-content__cta__links',\n linkText: ctaLink.linkText,\n linkUrl: ctaLink.linkUrl.destinationUrl,\n openInNewTab: ctaLink.isOpenInNewTab,\n role: 'button'\n };\n const requestContext = props.requestContext;\n return (\n {\n props.handleAdditionalLinkTextChange(linkIndex, event);\n },\n requestContext\n }}\n />\n );\n};\n\n/**\n * Create node for each additonal content item.\n * @param item - Active Image additonal content item props.\n * @param props - Active Image Additional content component props.\n * @returns IActiveImageAdditionalContentItemViewProps.\n */\nconst assembleNode = (item: IAdditionalContentData, props: IActiveImageAdditionalContentProps): IActiveImageAdditionalContentViewProps => {\n const headingNode = item.heading && renderHeading(item.heading, props);\n const paragraphNode = item.subtext && renderParagraph(item.subtext, props);\n const linksNode = item.links?.map((ctaLink: ILinksData, index: number) => {\n return renderLinks(ctaLink, props, index);\n });\n\n return {\n additionalContentNode: { className: 'msc-active-image__details__additional-content' },\n heading: headingNode,\n text: paragraphNode,\n links: linksNode,\n additionalContentContainer: { className: 'msc-active-image__details__additional-content__container' },\n additionalContentItemLinks: { className: 'msc-active-image__details__additional__content__cta' }\n };\n};\n\n/**\n * ActiveImageAdditionalContent component.\n * @param props - Active Image Additional content component props.\n * @returns Active Image Additional content view props.\n */\nexport const activeImageAdditionalContent = (\n props: IActiveImageAdditionalContentProps\n): IActiveImageAdditionalContentViewProps | undefined => {\n const { additionalContent } = props;\n if (!additionalContent) {\n return undefined;\n }\n\n return assembleNode(additionalContent, props);\n};\n\nexport default activeImageAdditionalContent;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport MsDyn365, { IImageData, Image, IRequestContext } from '@msdyn365-commerce/core';\nimport { ProductSearchResult } from '@msdyn365-commerce/retail-proxy';\nimport React from 'react';\n\n/**\n * @type AreaEvent for active points\n */\ntype AreaEvent = Event | React.MouseEvent | React.FocusEvent;\n\n/**\n * @interface IRgbColor\n * @description - The IRgbColor interface contract.\n */\nexport interface IRgbColor {\n rValue: number;\n gValue: number;\n bValue: number;\n}\n\n/**\n * @interface IArea\n * @description - The IArea interface contract.\n */\nexport interface IArea {\n areaId: string;\n coords: number[];\n href?: string;\n center?: number[];\n primaryImageUrl?: string;\n productUrl: string;\n productSearchResult?: ProductSearchResult;\n}\n\n/**\n * @interface IArea\n * @description - The IArea interface contract.\n */\nexport interface IAreaMap {\n name: string;\n areas: IArea[];\n}\n\n/**\n * @enum CanvasCalculations\n * @description - The canvas calculations enum.\n */\nexport enum CanvasCalculations {\n defaultWidth = 0,\n defaultHeight = 0,\n defaultPositionX = 0,\n defaultPositionY = 0,\n defaultScale = 1,\n halfDivisor = 2,\n doubleMultiplier = 2,\n buttonHeight = 30,\n buttonPadding = 30,\n paddingAdjustment = 3,\n expandAnimationStartWidth = 10,\n expandAnimationEndWidth = 40,\n collapseAnimationStartWidth = 40,\n collapseAnimationEndWidth = 8,\n expandRadius = 12,\n collapseRadius = 8,\n rotation = 1.57,\n startAngle = 0,\n endAngle = 7,\n clearMargin = 50,\n clearHeight = 100,\n clearWidth = 100,\n textFadeInStartValue = 0,\n textFadeOutStartValue = 0.5,\n textFadeInterval = 0.01\n}\n\n/**\n * @enum CanvasStyles\n * @description - The canvas styles enum.\n */\nexport enum CanvasStyles {\n color = '#FFFFFF',\n buttonTextClor = '#000000'\n}\n\n/**\n * @enum\n * @description - The canvas styles enum.\n */\nexport interface IImageMapperResources {\n buttonText?: string;\n altText?: string;\n}\n\n/**\n * @interface IImageMapperProps\n * @description - The IImageMapperProps interface contract.\n */\nexport interface IImageMapperProps {\n imageData: IImageData;\n areaMap: IAreaMap;\n viewPort: string;\n requestContext: IRequestContext;\n color?: string;\n buttonTextClor?: string;\n width?: number;\n imgWidth?: number;\n activeImageRefs: React.RefObject;\n imageMapperResources?: IImageMapperResources;\n onLoad?(): void;\n onClick?(area: IArea, index: number, event: AreaEvent): void;\n onFocus?(area: IArea, index: number, event: AreaEvent): void;\n onMouseEnter?(area: IArea, index: number, event: AreaEvent): void;\n onMouseLeave?(area: IArea, index: number, event: AreaEvent): void;\n}\n\n/**\n * ImageMapper.\n */\nexport class ImageMapper extends React.Component {\n private readonly _backgroundImage: React.RefObject;\n\n private readonly _container: React.RefObject;\n\n private readonly _canvas: React.RefObject;\n\n private _isDesktopViewPort: boolean = false;\n\n private _context: CanvasRenderingContext2D | null | undefined = null;\n\n public constructor(props: IImageMapperProps) {\n super(props);\n this._backgroundImage = React.createRef();\n this._container = React.createRef();\n this._canvas = React.createRef();\n }\n\n /**\n * ComponentDidMount method.\n */\n public componentDidMount(): void {\n const { viewPort } = this.props;\n this.initCanvas();\n this._isDesktopViewPort = viewPort === 'lg' || viewPort === 'xl';\n this.renderAreas();\n this._context = null;\n }\n\n /**\n * ComponentDidUpdate method.\n */\n public componentDidUpdate(): void {\n const { viewPort } = this.props;\n this.initCanvas();\n this._isDesktopViewPort = viewPort === 'lg' || viewPort === 'xl';\n }\n\n /**\n * ShouldComponentUpdate method.\n * @param nextProps - Next props.\n * @returns Returns boolean.\n */\n public shouldComponentUpdate(nextProps: IImageMapperProps): boolean {\n let shouldRender = false;\n if (nextProps !== this.props) {\n shouldRender = true;\n }\n return shouldRender;\n }\n\n /**\n * GetActiveImageWidth method - Gets the active image width.\n * @returns Returns number | undefined.\n */\n public getActiveImageWidth = (): number | undefined => {\n if (MsDyn365.isBrowser) {\n const activeImageReferenceValue = this.props.activeImageRefs;\n if (activeImageReferenceValue.current !== null) {\n return activeImageReferenceValue.current.clientWidth;\n }\n }\n return undefined;\n };\n\n /**\n * GetActiveImageHeight method - Gets the active image height.\n * @returns Returns number | undefined.\n */\n public getActiveImageHeight = (): number | undefined => {\n if (MsDyn365.isBrowser) {\n const activeImageReferenceValue = this.props.activeImageRefs;\n if (activeImageReferenceValue.current !== null) {\n return activeImageReferenceValue.current.clientHeight;\n }\n }\n return undefined;\n };\n\n /**\n * ConvertHexToRgb method - This method takes color in HEX format and returns IRgbColor color object.\n * @param hexColor -The color hex value.\n * @returns -Returns IRgbColor object.\n */\n public convertHexToRgb = (hexColor: string): IRgbColor => {\n // RegEx used to execute the conversion of the hex color to rgb value.\n const regEx = new RegExp('^#?([a-f\\\\d]{2})([a-f\\\\d]{2})([a-f\\\\d]{2})$', 'u');\n\n // RegEx.exec method executes a search for a match in a specified string. Returns a result array, or null.\n const result = regEx.exec(hexColor);\n const defaultValue = 0;\n return result\n ? {\n rValue: Number.parseInt(result[1], 16),\n gValue: Number.parseInt(result[2], 16),\n bValue: Number.parseInt(result[3], 16)\n }\n : {\n rValue: defaultValue,\n gValue: defaultValue,\n bValue: defaultValue\n };\n };\n\n /**\n * ApplyFadingTransition method - Applys fading transition to button text.\n * @param text -The button text.\n * @param coords -The coordinates.\n * @param rgbColor -The RGB color object.\n * @param alpha -The alpha value of the button text.\n */\n public applyFadingTransition = (text: string, coords: number[], rgbColor: IRgbColor, alpha: number): void => {\n const halfDivisor: number = CanvasCalculations.halfDivisor;\n const context = this._canvas.current?.getContext('2d') ?? this._context;\n if (context && this._isDesktopViewPort) {\n const buttonPadding = CanvasCalculations.buttonPadding;\n const paddingAdjustment = CanvasCalculations.paddingAdjustment;\n const buttonWidth = context.measureText(text).width + buttonPadding;\n context.fillStyle = `rgba(${rgbColor.rValue}, ${rgbColor.gValue}, ${rgbColor.bValue}, ${alpha} )`;\n if (MsDyn365.isBrowser && document.body.parentElement && document.body.parentElement.getAttribute('dir') === 'rtl') {\n context.fillText(text, coords[0] + buttonWidth / halfDivisor - buttonPadding / halfDivisor, coords[1] + paddingAdjustment);\n } else {\n context.fillText(text, coords[0] - buttonWidth / halfDivisor + buttonPadding / halfDivisor, coords[1] + paddingAdjustment);\n }\n }\n };\n\n /**\n * Draw button method - Draws button and contains fixed hight, padding values.\n * @param text -The button text.\n * @param coords -The coordinates.\n */\n public drawButton = (text: string, coords: number[]): void => {\n const { color = CanvasStyles.color, buttonTextClor = CanvasStyles.buttonTextClor } = this.props;\n const halfDivisor: number = CanvasCalculations.halfDivisor;\n const context = this._canvas.current?.getContext('2d') ?? this._context;\n if (context && this._isDesktopViewPort) {\n const buttonHeight = CanvasCalculations.buttonHeight;\n const buttonPadding = CanvasCalculations.buttonPadding;\n const paddingAdjustment = CanvasCalculations.paddingAdjustment;\n const buttonWidth = context.measureText(text).width + buttonPadding;\n const buttonPositionX = coords[0] - buttonWidth / halfDivisor;\n const buttonPositionY = coords[1] - buttonHeight / halfDivisor;\n const arcsize = buttonHeight / halfDivisor;\n\n context.beginPath();\n context.moveTo(buttonPositionX + arcsize, buttonPositionY);\n context.lineTo(buttonPositionX + buttonWidth - arcsize, buttonPositionY);\n context.arcTo(\n buttonPositionX + buttonWidth,\n buttonPositionY,\n buttonPositionX + buttonWidth,\n buttonPositionY + arcsize,\n arcsize\n );\n context.lineTo(buttonPositionX + buttonWidth, buttonPositionY + buttonHeight - arcsize);\n context.arcTo(\n buttonPositionX + buttonWidth,\n buttonPositionY + buttonHeight,\n buttonPositionX + buttonWidth - arcsize,\n buttonPositionY + buttonHeight,\n arcsize\n );\n context.lineTo(buttonPositionX + arcsize, buttonPositionY + buttonHeight);\n context.arcTo(buttonPositionX, buttonPositionY + buttonHeight, buttonPositionX, buttonPositionY - arcsize, arcsize);\n context.lineTo(buttonPositionX, buttonPositionY + arcsize);\n context.arcTo(buttonPositionX, buttonPositionY, buttonPositionX + arcsize, buttonPositionY, arcsize);\n context.lineTo(buttonPositionX + arcsize, buttonPositionY);\n context.stroke();\n context.closePath();\n context.fillStyle = color;\n context.fill();\n context.fillStyle = buttonTextClor;\n if (MsDyn365.isBrowser && document.body.parentElement && document.body.parentElement.getAttribute('dir') === 'rtl') {\n context.fillText(text, coords[0] + buttonWidth / halfDivisor - buttonPadding / halfDivisor, coords[1] + paddingAdjustment);\n } else {\n context.fillText(text, coords[0] - buttonWidth / halfDivisor + buttonPadding / halfDivisor, coords[1] + paddingAdjustment);\n }\n }\n };\n\n /**\n * ExpandAnimation method - Shows expand animation and contains fixed values to draw the circle and ellipse shapes.\n * @param coords -Coordinates.\n */\n public expandAnimation = (coords: number[]): void => {\n const { color = CanvasStyles.color, buttonTextClor = CanvasStyles.buttonTextClor } = this.props;\n const buttonText = this.props.imageMapperResources?.buttonText;\n let animationStartWidth = CanvasCalculations.expandAnimationStartWidth;\n const pointPositionX = coords[0];\n const pointPositionY = coords[1];\n const animationEndWidth = CanvasCalculations.expandAnimationEndWidth;\n const radius = CanvasCalculations.expandRadius;\n const rotation = CanvasCalculations.rotation;\n const startAngle = CanvasCalculations.startAngle;\n const endAngle = CanvasCalculations.endAngle;\n let textFadeInValue = CanvasCalculations.textFadeInStartValue;\n const buttonTextClorInRgb = this.convertHexToRgb(buttonTextClor.toLocaleLowerCase());\n\n /**\n * Animate method - Reders expand animation.\n */\n const animate = () => {\n const context = this._canvas.current?.getContext('2d') ?? this._context;\n if (!context) {\n return;\n }\n context.beginPath();\n context.ellipse(pointPositionX, pointPositionY, radius, animationStartWidth, rotation, startAngle, endAngle);\n context.fillStyle = color;\n context.fill();\n context.fillStyle = color;\n if (buttonText) {\n if (animationStartWidth < animationEndWidth) {\n requestAnimationFrame(animate);\n this.applyFadingTransition(buttonText, coords, buttonTextClorInRgb, textFadeInValue);\n textFadeInValue += CanvasCalculations.textFadeInterval;\n animationStartWidth++;\n } else {\n this.drawButton(buttonText, [pointPositionX, pointPositionY]);\n }\n }\n };\n\n if (this._isDesktopViewPort) {\n animate();\n }\n };\n\n /**\n * CollapseAnimation method - Shows collapse animation and contains fixed values to draw the circle and ellipse shapes.\n * @param coords -Coordinates.\n */\n public collapseAnimation = (coords: number[]): void => {\n const { color = CanvasStyles.color, buttonTextClor = CanvasStyles.buttonTextClor } = this.props;\n const buttonText = this.props.imageMapperResources?.buttonText;\n let animationStartWidth = CanvasCalculations.collapseAnimationStartWidth;\n const pointPositionX = coords[0];\n const pointPositionY = coords[1];\n const animationEndWidth = CanvasCalculations.collapseAnimationEndWidth;\n const rotation = CanvasCalculations.rotation;\n const clearMargin = CanvasCalculations.clearMargin;\n const clearHeight = CanvasCalculations.clearHeight;\n const clearWidth = CanvasCalculations.clearWidth;\n const radius = CanvasCalculations.collapseRadius;\n const startAngle = CanvasCalculations.startAngle;\n const endAngle = CanvasCalculations.endAngle;\n let textFadeOutValue = CanvasCalculations.textFadeOutStartValue;\n const buttonTextClorInRgb = this.convertHexToRgb(buttonTextClor.toLocaleLowerCase());\n\n /**\n * Animate method - Renders collapse animation.\n */\n const animate = () => {\n const context = this._canvas.current?.getContext('2d') ?? this._context;\n if (!context) {\n return;\n }\n context.beginPath();\n context.clearRect(pointPositionX - clearMargin, pointPositionY - clearMargin, clearWidth, clearHeight);\n context.ellipse(pointPositionX, pointPositionY, radius, animationStartWidth, rotation, startAngle, endAngle);\n context.fillStyle = color;\n context.fill();\n if (animationEndWidth < animationStartWidth && buttonText) {\n requestAnimationFrame(animate);\n this.applyFadingTransition(buttonText, coords, buttonTextClorInRgb, textFadeOutValue);\n textFadeOutValue -= CanvasCalculations.textFadeInterval;\n animationStartWidth--;\n }\n };\n\n if (this._isDesktopViewPort) {\n animate();\n }\n };\n\n /**\n * DrawCircle method - Renders active points.\n * @param coords -Coordinates.\n */\n public drawCircle = (coords: number[]): void => {\n const { color = CanvasStyles.color, viewPort } = this.props;\n const doubleMultiplier: number = CanvasCalculations.doubleMultiplier;\n const startAngle: number = CanvasCalculations.startAngle;\n const context = this._canvas.current?.getContext('2d') ?? this._context;\n const radius = viewPort === 'xs' || viewPort === 'sm' ? coords[2] * doubleMultiplier : coords[2];\n if (!context) {\n return;\n }\n context.fillStyle = color;\n context.beginPath();\n context.strokeStyle = color;\n context.arc(coords[0], coords[1], radius, startAngle, Math.PI * doubleMultiplier);\n context.closePath();\n context.stroke();\n context.fill();\n };\n\n /**\n * ScaleCoords method - To scale the active point coordinates based on the window size.\n * @param coords -Coordinates.\n * @returns -Returns number[].\n */\n public scaleCoords = (coords: number[]): number[] => {\n const { imgWidth } = this.props;\n const defaultWidth: number = CanvasCalculations.defaultWidth;\n const defaultScale: number = CanvasCalculations.defaultScale;\n\n // Calculate scale based on current 'width' and the original 'imgWidth'\n const width = this.getActiveImageWidth();\n const scale = width && imgWidth && imgWidth > defaultWidth ? width / imgWidth : defaultScale;\n return coords.map(coord => coord * scale);\n };\n\n /**\n * RenderPrefilledAreas method - To render active points in case of events.\n */\n public renderPrefilledAreas = (): void => {\n const { areaMap } = this.props;\n areaMap.areas.map(area => {\n this.drawCircle(this.scaleCoords(area.coords));\n return null;\n });\n };\n\n /**\n * ComputeCenter method - To re-calculate the center of active point based on window size.\n * @param area -IArea.\n * @returns -Returns number[].\n */\n public computeCenter = (area: IArea): number[] => {\n const scaledCoords = this.scaleCoords(area.coords);\n return [scaledCoords[0], scaledCoords[1]];\n };\n\n /**\n * HandleHoverOn method - To handle mouse hover on event.\n * @param area -IArea.\n */\n public handleHoverOn = (area: IArea): void => {\n if (area.center && this._canvas.current) {\n this.drawCircle(this.scaleCoords(area.coords));\n this.expandAnimation(area.center);\n }\n };\n\n /**\n * HandleHoverOff method - To handle mouse hover off event.\n * @param area -IArea.\n */\n public handleHoverOff = (area: IArea): void => {\n if (this._canvas.current) {\n const context = this._canvas.current.getContext('2d') ?? this._context;\n const canvasPositionX: number = CanvasCalculations.defaultPositionX;\n const canvasPositionY: number = CanvasCalculations.defaultPositionY;\n\n if (!context) {\n return;\n }\n context.clearRect(canvasPositionX, canvasPositionY, this._canvas.current.width, this._canvas.current.height);\n this.renderPrefilledAreas();\n if (area.center) {\n this.collapseAnimation(area.center);\n }\n }\n };\n\n /**\n * Click method - Mouse click event.\n * @param area -IArea.\n * @param index - Number.\n * @returns - Void.\n */\n public click = (area: IArea, index: number) => (event: AreaEvent): void => {\n const { onClick } = this.props;\n if (onClick) {\n event.preventDefault();\n onClick(area, index, event);\n }\n };\n\n /**\n * HoverOn method - Mouse hover on event.\n * @param area -IArea.\n * @param index - Number.\n * @returns - Void.\n */\n public hoverOn = (area: IArea, index: number) => (event: AreaEvent): void => {\n const { onMouseEnter } = this.props;\n this.handleHoverOn(area);\n if (onMouseEnter) {\n onMouseEnter(area, index, event);\n }\n };\n\n /**\n * HoverOff method - Mouse hover off event.\n * @param area - IArea.\n * @param index - Number.\n * @returns - Void.\n */\n public hoverOff = (area: IArea, index: number) => (event: AreaEvent): void => {\n const { onMouseLeave } = this.props;\n\n this.handleHoverOff(area);\n\n if (onMouseLeave) {\n onMouseLeave(area, index, event);\n }\n };\n\n /**\n * RenderAreas method - Renders active points at given coordinates.\n * @returns -Returns JSX.Element[].\n */\n public renderAreas = (): JSX.Element[] => {\n const { areaMap, viewPort } = this.props;\n const buttonText = this.props.imageMapperResources?.buttonText ? this.props.imageMapperResources.buttonText : '';\n const altText = this.props.imageMapperResources?.altText ? this.props.imageMapperResources.altText : '';\n const doubleMultiplier: number = CanvasCalculations.doubleMultiplier;\n\n return areaMap.areas.map((area, index) => {\n const scaledCoords = this.scaleCoords(area.coords);\n const xsRadius = area.coords[2] * doubleMultiplier;\n if (viewPort === 'xs') {\n scaledCoords[2] = xsRadius;\n }\n const center = this.computeCenter(area);\n const extendedArea = { ...area, scaledCoords, center };\n const areaKey = `area-${index}`;\n const altTextWithProductName = altText\n .replace('{buttonText}', buttonText ? buttonText : '')\n .replace('{productName}', area.productSearchResult?.Name ? area.productSearchResult.Name : '');\n return (\n \n );\n });\n };\n\n /**\n * InitCanvas method - To render the canvas.\n */\n public initCanvas = (): void => {\n if (!this._canvas.current || !this._backgroundImage.current || !this._container.current) {\n return;\n }\n\n const { color, onLoad } = this.props;\n const defaultWidth: number = CanvasCalculations.defaultWidth;\n const defaultHeight: number = CanvasCalculations.defaultHeight;\n\n const canvasWidth = this.getActiveImageWidth() ?? defaultWidth;\n const canvasHeight = this.getActiveImageHeight() ?? defaultHeight;\n\n this._canvas.current.width = canvasWidth;\n this._canvas.current.height = canvasHeight;\n this._container.current.style.width = `${canvasWidth}px`;\n\n const context = this._canvas.current.getContext('2d') ?? this._context;\n if (!context) {\n return;\n }\n context.fillStyle = color ?? '';\n\n if (onLoad) {\n onLoad();\n }\n\n this.renderPrefilledAreas();\n };\n\n /**\n * Render method - To render the image mapper component with active image, canvas and active points.\n * @returns -Returns JSX.Element | null.\n */\n public render(): JSX.Element | null {\n const { imageData, areaMap, requestContext } = this.props;\n\n return (\n
\n \n \n \n {this.renderAreas()}\n \n
\n );\n }\n}\n\nexport default ImageMapper;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport * as MsDyn365 from '@msdyn365-commerce/core';\nimport { ProductSearchResult } from '@msdyn365-commerce/retail-proxy';\nimport { ArrayExtensions, getProductPageUrlSync } from '@msdyn365-commerce-modules/retail-actions';\nimport {\n getPayloadObject,\n getTelemetryAttributes,\n getTelemetryObject,\n IModuleProps,\n INodeProps,\n isMobile,\n ITelemetryContent,\n VariantType\n} from '@msdyn365-commerce-modules/utilities';\nimport classnames from 'classnames';\nimport * as React from 'react';\n\nimport {\n activeImageAdditionalContent,\n ActiveProductComponent,\n IActiveImageAdditionalContentViewProps,\n IArea,\n IAreaMap,\n IImageMapperProps,\n ImageMapper\n} from '../active-image-utilities';\nimport { IActiveImageData } from './active-image.data';\nimport { IActiveImageProps } from './active-image.props.autogenerated';\n\n/**\n * @type AreaEvent for active points\n */\ntype AreaEvent = Event | React.MouseEvent | React.FocusEvent;\n\n/**\n * @interface IActiveImageViewProps\n * @classdesc - The IActiveImageViewProps interface contract.\n */\nexport interface IActiveImageViewProps extends IActiveImageProps<{}>, IImageMapperProps {\n activePointContainer: IModuleProps;\n activePointDetailsContainer: INodeProps;\n imageMapper: React.ReactNode;\n overlay: React.ReactNode;\n productCard: React.ReactNode;\n title?: React.ReactNode;\n text?: React.ReactNode;\n links?: React.ReactNode;\n detailsContainer?: INodeProps;\n detailsContainerCta?: INodeProps;\n additionalContent?: IActiveImageAdditionalContentViewProps;\n productCardleftPosition: number;\n productCardtopPosition: number;\n handleAdditionalText?(event: MsDyn365.ContentEditableEvent): void;\n handleAdditionalParagraph?(event: MsDyn365.ContentEditableEvent): void;\n handleAdditionalLinkText?(event: MsDyn365.ContentEditableEvent): void;\n}\n\n/**\n * @interface IActiveImageLinksData\n * @classdesc - The IActiveImageLinksData interface contract.\n */\nexport interface IActiveImageLinksData {\n linkText?: string;\n linkUrl: MsDyn365.ILinkData;\n ariaLabel?: string;\n willOpenInNewTab?: boolean;\n}\n\n/**\n * @interface IActiveImageState\n * @classdesc - The IActiveImageState interface contract.\n */\ninterface IActiveImageState {\n clientWidth: number;\n area: IArea | null;\n viewport: string;\n overlayClass: string;\n}\n\n/**\n * @enum ActiveImageConstants\n * @description - The active image constants enum.\n */\nexport enum ActiveImageConstants {\n timeoutInterval = 200,\n enterKey = 'Enter',\n escKey = 'Escape'\n}\n\n/**\n *\n * ActiveImage class.\n * @extends {React.PureComponent & IImageMapperProps, IActiveImageState>}\n */\nexport class ActiveImage extends React.PureComponent & IImageMapperProps, IActiveImageState> {\n private readonly _telemetryContent: ITelemetryContent;\n\n private _isDesktopViewPort: boolean;\n\n private readonly _defaultProductCardWidth: number = 315;\n\n private readonly _defaultProdutCardHight: number = 490;\n\n private readonly _activePoints: IArea[] = [];\n\n private readonly _activeImageRefs: React.RefObject;\n\n private readonly _activeImageClass: string;\n\n private readonly _productCardDivRef: React.RefObject;\n\n public constructor(props: IActiveImageProps & IImageMapperProps) {\n super(props);\n this._telemetryContent = getTelemetryObject(\n this.props.context.request.telemetryPageName!,\n this.props.friendlyName,\n this.props.telemetry\n );\n const viewport = isMobile({ variant: VariantType.Browser, context: this.props.context.request });\n this._activeImageClass = `msc-active-image-${this.getActiveImageId()}`;\n this.state = {\n clientWidth: 0,\n area: null,\n viewport,\n overlayClass: ''\n };\n this._isDesktopViewPort = viewport === 'lg' || viewport === 'xl';\n this._activeImageRefs = React.createRef();\n this._productCardDivRef = React.createRef();\n }\n\n public componentDidMount(): void {\n if (MsDyn365.msdyn365Commerce.isBrowser) {\n window.addEventListener('resize', this.updateClientWidth);\n document.addEventListener('keydown', this.keyDown, false);\n document.addEventListener('mousedown', this._handleOutsideClick);\n }\n setTimeout(() => {\n this.updateClientWidth();\n }, ActiveImageConstants.timeoutInterval);\n\n if (MsDyn365.msdyn365Commerce.isBrowser && this._activeImageRefs.current) {\n const images: HTMLCollectionOf = this._activeImageRefs.current.getElementsByClassName(\n 'msc-thumbnail_image msc-active-image-img'\n );\n if (ArrayExtensions.hasElements(Array.from(images))) {\n images[0].removeAttribute('usemap');\n }\n }\n }\n\n /**\n * AddActivePoints method - To handle add Active Points.\n * @param area - IArea.\n * @param product - ProductSearchResult.\n * @param coords - Coords.\n * @param productUrl - String.\n */\n public addActivePoints = (area: IArea | undefined, product: ProductSearchResult, coords: number[], productUrl: string): void => {\n if (!area) {\n this._activePoints.push({\n areaId: product.RecordId.toString(),\n coords,\n primaryImageUrl: product.PrimaryImageUrl ?? '',\n productUrl,\n productSearchResult: product\n });\n }\n };\n\n /**\n * ComponentWillUnmount method.\n */\n public componentWillUnmount(): void {\n if (MsDyn365.msdyn365Commerce.isBrowser) {\n window.removeEventListener('resize', this.updateClientWidth);\n document.removeEventListener('keydown', (this.keyDown as unknown) as EventListener, false);\n document.removeEventListener('mousedown', this._handleOutsideClick, false);\n }\n }\n\n /**\n * UpdateClientWidth method to update client width in state.\n */\n public updateClientWidth = (): void => {\n const viewport = isMobile({ variant: VariantType.Browser, context: this.props.context.request });\n this.setState({ clientWidth: this.getActiveImageWidth(), viewport });\n this._isDesktopViewPort = viewport === 'lg' || viewport === 'xl';\n };\n\n /**\n * Render method.\n * @returns - Returns JSX.Element | null.\n */\n public render(): JSX.Element | null {\n const viewProps: IActiveImageViewProps = {\n ...(this.props as IImageMapperProps & IActiveImageProps<{}>),\n activePointContainer: {\n moduleProps: this.props,\n className: classnames('msc-active-image', this._activeImageClass, this.props.config.className)\n },\n activePointDetailsContainer: {\n tag: 'div',\n className: classnames('msc-active-image-wrapper', this._activeImageClass, this.props.config.className),\n ref: this._activeImageRefs\n },\n imgWidth: this.props.config.canvasWidth,\n imageMapper: this.renderImageMapper(),\n overlay: this.renderOverlay(),\n productCard: this.renderProductCard(),\n productCardleftPosition: this.getProductCardPositionX(),\n productCardtopPosition: this.getProductCardPositionY(),\n title: this.renderActiveImageDetailsHeading(),\n text: this.renderActiveImageDetailsParagraph(),\n links: this.renderActiveImageDetailsLinks(),\n detailsContainer: { className: 'msc-active-image__details' },\n detailsContainerCta: { className: 'msc-active-image__details__cta' },\n additionalContent: activeImageAdditionalContent({\n requestContext: this.props.context.request,\n additionalContent: this.props.config.additionalContent,\n handleAdditionalTextChange: this.handleAdditionalTextChange,\n handleAdditionalParagraphChange: this.handleAdditionalParagraphChange,\n handleAdditionalLinkTextChange: this.handleAdditionalLinkTextChange\n }),\n handleAdditionalText: this.handleAdditionalTextChange,\n handleAdditionalParagraph: this.handleAdditionalParagraphChange,\n handleAdditionalLinkText: this.handleAdditionalTextChange\n };\n\n return this.props.renderView(viewProps);\n }\n\n /**\n * RenderImageMapper method - To render image mapper.\n * @returns - Returns React.ReactNode | null.\n */\n public renderImageMapper = (): React.ReactNode | null => {\n const { config, context } = this.props;\n const defaultPosition: number = 0;\n const defaultLength: number = 0;\n const productResults = this.props.data.products.result;\n if (config.activePoints && productResults) {\n for (const product of productResults) {\n for (const configProduct of config.activePoints) {\n if (product.ItemId === configProduct.itemId) {\n const productUrl = getProductPageUrlSync(product.Name ?? '', product.RecordId, context.actionContext, undefined);\n const coords = [\n configProduct.xPosition ?? defaultPosition,\n configProduct.yPosition ?? defaultPosition,\n configProduct.radius ?? defaultPosition\n ];\n const area = this._activePoints.find(activePoint => JSON.stringify(activePoint.coords) === JSON.stringify(coords));\n this.addActivePoints(area, product, coords, productUrl);\n }\n }\n }\n }\n const mappedArea: IAreaMap = {\n name: `map-${this._activeImageClass}`,\n areas: this._activePoints.length > defaultLength ? this._activePoints : []\n };\n\n // If image is null, we want to render the placeholder SVG - by passing image data with empty src\n return (\n \n );\n };\n\n /**\n * EnterArea method - To handle mouse enter event.\n * @param area - Active point area.\n * @param index - Active point index.\n * @param event - Active point AreaEvent.\n */\n public enterArea = (area: IArea, index: number, event: AreaEvent): void => {\n this.setState({ area, overlayClass: 'msc-active-image-overlay' });\n if (this.props.onMouseEnter) {\n this.props.onMouseEnter(area, index, event);\n }\n if (event.type.toLocaleLowerCase() === 'click' && this._isDesktopViewPort) {\n window.open(area.productUrl, '_self');\n }\n };\n\n /**\n * LeaveArea method - To handle mouse leave event.\n */\n public leaveArea = (): void => {\n if (this._isDesktopViewPort) {\n this.resetState();\n }\n };\n\n /**\n * ResetState method - To reset the state for area and overlayclass.\n */\n public resetState = (): void => {\n this.setState({ area: null, overlayClass: '' });\n };\n\n /**\n * RenderProductComponent method - To render the product card with product information.\n * @returns - Returns React.ReactNode.\n */\n public renderProductComponent = (): React.ReactNode => {\n if (this.state.area?.productSearchResult) {\n const baseImageUrl: string = this.props.context.request.apiSettings.baseImageUrl;\n const imageUrl: string = this.state.area.primaryImageUrl ?? '';\n const primaryImageUrl: string = `${baseImageUrl}${imageUrl}`;\n const product: ProductSearchResult = this.state.area.productSearchResult;\n product.PrimaryImageUrl = primaryImageUrl;\n\n return (\n \n );\n }\n return React.Fragment;\n };\n\n /**\n * RenderProductCard method - To render product cards.\n * @returns - Returns React.ReactNode.\n */\n public renderProductCard = (): React.ReactNode => {\n const { area } = this.state;\n\n return (\n <>\n {area?.center && (\n
\n
\n {!this._isDesktopViewPort &&
\n
\n )}\n \n );\n };\n\n /**\n * RenderOverlay method - To render overlay for non desktop viewports.\n * @returns - Returns React.ReactNode.\n */\n public renderOverlay = (): React.ReactNode => {\n return <>{!this._isDesktopViewPort &&
};\n };\n\n /**\n * GetProductCardPositionX method - Provides product card x position to the left or right of active point based on available space.\n * For xs, sm and md viewports it provides x position for the center alignment.\n * @returns - Returns number.\n */\n public getProductCardPositionX = (): number => {\n const defaultImageSettings = this.getDefaultImageSettings();\n const productImageSettingsWidth = this.props.config.productImageSettings?.viewports\n ? this.props.config.productImageSettings.viewports.lg?.w\n : defaultImageSettings.viewports.lg?.w;\n const defaultPositionX: number = 0;\n const halfDivisor: number = 2;\n const productCardWidth: number = productImageSettingsWidth ? productImageSettingsWidth : this._defaultProductCardWidth;\n const { area, clientWidth, viewport } = this.state;\n const pointPositionX = area?.center?.[0] ?? clientWidth / halfDivisor;\n const leftAllignPosition = pointPositionX - productCardWidth - productCardWidth / halfDivisor;\n const rightAllignPosition = pointPositionX + productCardWidth / halfDivisor;\n let position: number = (clientWidth - productCardWidth) / halfDivisor;\n if (viewport !== 'xs' && viewport !== 'sm' && viewport !== 'md') {\n if (leftAllignPosition < defaultPositionX) {\n position = rightAllignPosition;\n } else {\n position = leftAllignPosition;\n }\n }\n return position;\n };\n\n /**\n * GetProductCardPositionY method - Provides product card y position in center with respect to active point.\n * For xs, sm and md viewports it provides y position for the center alignment.\n * @returns - Returns number.\n */\n public getProductCardPositionY = (): number => {\n const defaultImageSettings = this.getDefaultImageSettings();\n const productImageSettingsHeight = this.props.config.productImageSettings?.viewports\n ? this.props.config.productImageSettings.viewports.lg?.h\n : defaultImageSettings.viewports.lg?.h;\n const halfDivisor: number = 2;\n const { area, viewport } = this.state;\n const produtCardHight: number = productImageSettingsHeight ? productImageSettingsHeight : this._defaultProdutCardHight;\n const pointPositionY = (this.getActiveImageHeight() - produtCardHight) / halfDivisor;\n let position: number = pointPositionY;\n if (viewport !== 'xs' && viewport !== 'sm' && viewport !== 'md') {\n position = (area?.center?.[1] ?? this.getActiveImageHeight() / halfDivisor) - produtCardHight / halfDivisor;\n }\n return position;\n };\n\n /**\n * GetDefaultImageSettings method.\n * @returns MsDyn365.IImageSettings.\n */\n public getDefaultImageSettings = (): MsDyn365.IImageSettings => {\n const defaultImageSettings: MsDyn365.IImageSettings = {\n viewports: {\n xs: { q: 'w=275&h=275&m=6', w: 275, h: 275 },\n lg: { q: 'w=275&h=275&m=6', w: 275, h: 275 },\n xl: { q: 'w=275&h=275&m=6', w: 275, h: 275 }\n },\n lazyload: true\n };\n\n return defaultImageSettings;\n };\n\n /**\n * KeyDown method - To handle keydown event.\n * @param event - KeyboardEvent.\n */\n public keyDown = (event: KeyboardEvent): void => {\n if (event.key === ActiveImageConstants.enterKey) {\n const target: HTMLElement = event.target as HTMLElement;\n if (target.nodeName === 'AREA') {\n const area: HTMLAreaElement = target as HTMLAreaElement;\n if (area.href) {\n window.open(area.href, '_self');\n }\n }\n }\n if (event.key === ActiveImageConstants.escKey) {\n this.resetState();\n }\n };\n\n /**\n * GetActiveImageWidth method - To get active image width.\n * @returns Returns number.\n */\n public getActiveImageWidth = (): number => {\n const defaultWidth: number = 0;\n if (MsDyn365.msdyn365Commerce.isBrowser) {\n const activeImageReferenceValue = this._activeImageRefs;\n if (activeImageReferenceValue.current !== null) {\n return activeImageReferenceValue.current.clientWidth;\n }\n }\n return defaultWidth;\n };\n\n /**\n * GetActiveImageHeight method - To get active image height.\n * @returns Returns number.\n */\n public getActiveImageHeight = (): number => {\n const defaultHeight: number = 0;\n if (MsDyn365.msdyn365Commerce.isBrowser) {\n const activeImageReferenceValue = this._activeImageRefs;\n if (activeImageReferenceValue.current !== null) {\n return activeImageReferenceValue.current.clientHeight;\n }\n }\n return defaultHeight;\n };\n\n /**\n * HandleLinkTextChange method - To handle link text change event.\n * @param linkIndex - The link index.\n * @param event - The dialog that is allowed to remain open.\n */\n public handleLinkTextChange(linkIndex: number, event: MsDyn365.ContentEditableEvent): void {\n if (this.props.config.links && this.props.config.links[Number(linkIndex)]) {\n this.props.config.links[Number(linkIndex)].linkText = event.target.value;\n }\n }\n\n /**\n * HandleTextChange method - To handle text change event.\n * @param event - The dialog that is allowed to remain open.\n */\n public handleTextChange = (event: MsDyn365.ContentEditableEvent): void => {\n this.props.config.heading!.text = event.target.value;\n };\n\n /**\n * HandleParagraphChange method - To handle paragraph change event.\n * @param event - The dialog that is allowed to remain open.\n */\n public handleParagraphChange = (event: MsDyn365.ContentEditableEvent): void => {\n this.props.config.paragraph = event.target.value;\n };\n\n /**\n * HandleAdditionalTextChange method - To handle additional text change event.\n * @param event - The dialog that is allowed to remain open.\n */\n public handleAdditionalTextChange(event: MsDyn365.ContentEditableEvent): void {\n if (this.props.config.additionalContent) {\n this.props.config.additionalContent.heading = event.target.value;\n }\n }\n\n /**\n * HandleAdditionalLinkTextChange method - To handle additional link text change event.\n * @param linkIndex - The link index.\n * @param event - The dialog that is allowed to remain open.\n */\n public handleAdditionalLinkTextChange(linkIndex: number, event: MsDyn365.ContentEditableEvent): void {\n const additionalContent = this.props.config.additionalContent ?? {};\n if (additionalContent.links) {\n additionalContent.links[Number(linkIndex)].linkText = event.target.value;\n }\n }\n\n /**\n * HandleAdditionalParagraphChange method - To handle additional paragraph change event.\n * @param event - The dialog that is allowed to remain open.\n */\n public handleAdditionalParagraphChange(event: MsDyn365.ContentEditableEvent): void {\n if (this.props.config.additionalContent) {\n this.props.config.additionalContent.subtext = event.target.value;\n }\n }\n\n /**\n * RenderActiveImageDetailsLinks method - To render active image details links.\n * @returns - React node.\n */\n public renderActiveImageDetailsLinks = (): React.ReactNode[] | undefined => {\n const { links } = this.props.config;\n const payLoad = getPayloadObject('click', this._telemetryContent, '');\n\n return links?.map((linkData: IActiveImageLinksData, index: number) => {\n payLoad.contentAction.etext = linkData.linkText;\n const attributes = getTelemetryAttributes(this._telemetryContent, payLoad);\n const linkId = index;\n const editableLink: MsDyn365.ILinksData = {\n ariaLabel: linkData.ariaLabel,\n className: 'msc-active-image__details__cta__link',\n linkText: linkData.linkText,\n linkUrl: linkData.linkUrl.destinationUrl,\n openInNewTab: linkData.willOpenInNewTab,\n role: 'button',\n additionalProperties: attributes\n };\n\n return (\n {\n this.handleLinkTextChange(index, event);\n },\n requestContext: this.props.context.request\n }}\n />\n );\n });\n };\n\n /**\n * RenderActiveImageDetailsHeading method - To render active image details heading.\n * @returns - React.ReactNode | undefined.\n */\n public renderActiveImageDetailsHeading = (): React.ReactNode | undefined => {\n const { heading } = this.props.config;\n\n return (\n heading && (\n \n )\n );\n };\n\n /**\n * RenderActiveImageDetailsParagraph method - To render active image details paragraph.\n * @returns - React.ReactNode | undefined.\n */\n public renderActiveImageDetailsParagraph = (): React.ReactNode | undefined => {\n const { paragraph } = this.props.config;\n\n return (\n paragraph && (\n \n )\n );\n };\n\n /**\n * GetActiveImageId - To get active image id from src.\n * @returns - String.\n */\n public getActiveImageId = (): string => {\n const { activeImage } = this.props.config;\n let activeImageId: string = '';\n if (activeImage?.src) {\n const activeImageSource = activeImage.src.split('/');\n const decrementOne: number = 1;\n const activeImageIdPart = activeImageSource[activeImageSource.length - decrementOne].split('?');\n activeImageId = activeImageIdPart[0] ?? '';\n }\n return activeImageId;\n };\n\n /**\n * Handle outside click method - To handle outside click of the active image product.\n * @param event - Mouse event.\n */\n private readonly _handleOutsideClick = (event: MouseEvent) => {\n if (this._productCardDivRef.current?.contains(event.target as Node)) {\n return;\n }\n this.resetState();\n };\n}\nexport default ActiveImage;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { Module, Node } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport { IActiveImageAdditionalContentViewProps } from '../active-image-utilities';\nimport { IActiveImageViewProps } from './active-image';\n\n/**\n * Render Additional Content.\n * @param additionalContent - Additional content view props.\n * @returns JSX Element.\n */\nconst renderAdditionalContent = (additionalContent: IActiveImageAdditionalContentViewProps) => {\n return (\n \n {additionalContent.heading}\n \n {additionalContent.text}\n {additionalContent.links}\n \n \n );\n};\n\n/**\n * Render View.\n * @param props - The view props.\n * @returns -The JSX Element.\n */\nexport const activeImageView: React.FC = props => {\n return (\n \n \n {props.imageMapper}\n \n {props.title}\n {props.text}\n {props.additionalContent && renderAdditionalContent(props.additionalContent)}\n \n {props.links}\n \n \n \n \n {props.overlay}\n {props.productCard}\n \n \n );\n};\n\nexport default activeImageView;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { getTelemetryObject, IModuleProps, ITelemetryContent } from '@msdyn365-commerce-modules/utilities';\nimport classnames from 'classnames';\nimport * as React from 'react';\n\nimport { ICarouselData } from './carousel.data';\nimport { ICarouselProps } from './carousel.props.autogenerated';\nimport { ICarouselState } from './carousel.state';\n\nexport interface ICarouselViewProps extends ICarouselProps<{}>, ICarouselState {\n closeAnimation: string;\n carouselContainer: IModuleProps;\n telemetryContent: ITelemetryContent;\n next(): void;\n previous(): void;\n onIndicatorsClickHandler(): void;\n handleDismissCarousel(): void;\n handleOnExited(): void;\n handleOnExiting(): void;\n}\n\n/**\n *\n * CarouselModule component.\n * @extends {React.PureComponent>}\n */\nclass CarouselModule extends React.PureComponent, ICarouselState> {\n private animating: boolean;\n\n private readonly telemetryContent: ITelemetryContent;\n\n constructor(props: ICarouselProps, state: ICarouselState) {\n super(props);\n this.state = { activeIndex: 0, closeNow: false, dismissCarousel: false };\n this.animating = false;\n this.telemetryContent = getTelemetryObject(\n this.props.context.request.telemetryPageName!,\n this.props.friendlyName,\n this.props.telemetry\n );\n }\n\n public componentDidMount(): void {\n if (this.props.context && this.props.context.request && this.props.context.request.cookies) {\n if (this.props.context.request.cookies.get(`CarouselDismiss_${this.props.id}`) === undefined) {\n this.props.context.request.cookies.set(`CarouselDismiss_${this.props.id}`, 'false');\n this.setState({ dismissCarousel: false });\n }\n }\n }\n\n public render(): JSX.Element | null {\n if (this.state.dismissCarousel) {\n return null;\n }\n\n const { className } = this.props.config;\n\n const viewProps = {\n // Context for telemetry and raw data for C1 to do customization\n // Including computed data, state data and methods\n ...this.props,\n ...this.state,\n telemetryContent: this.telemetryContent,\n carouselContainer: {\n moduleProps: this.props,\n className: classnames('ms-carousel', className)\n },\n closeAnimation: this.state.closeNow ? 'close-now' : '',\n next: this._next,\n previous: this._previous,\n onIndicatorsClickHandler: this._goToIndex,\n handleDismissCarousel: this._handleDismissCarousel,\n handleOnExited: this._onExited,\n handleOnExiting: this._onExiting\n };\n\n return this.props.renderView(viewProps) as React.ReactElement;\n }\n\n /**\n * Function implementation to dismiss the Carousel.\n */\n private readonly _handleDismissCarousel = (): void => {\n if (this.props.context && this.props.context.request && this.props.context.request.cookies) {\n this.props.context.request.cookies.set(`CarouselDismiss_${this.props.id}`, 'true');\n this.setState({ dismissCarousel: true });\n }\n };\n\n /**\n * Function implementation to move to next slide.\n */\n private readonly _next = (): void => {\n const { slots } = this.props;\n const nextIndex = this.state.activeIndex === (slots && slots.content && slots.content.length - 1) ? 0 : this.state.activeIndex + 1;\n\n if (this.animating) {\n this.setState({ closeNow: true, activeIndex: nextIndex });\n } else {\n this.setState({ activeIndex: nextIndex });\n }\n };\n\n /**\n * Function implementation to move to previous slide.\n */\n private readonly _previous = (): void => {\n const slots = this.props.slots && this.props.slots.content;\n const nextIndex = this.state.activeIndex === 0 ? (slots ? slots.length - 1 : 0) : this.state.activeIndex - 1;\n\n if (this.animating) {\n this.setState({ closeNow: true, activeIndex: nextIndex });\n } else {\n this.setState({ activeIndex: nextIndex });\n }\n };\n\n private readonly _onExiting = (): void => {\n this.animating = true;\n };\n\n private readonly _onExited = (): void => {\n this.animating = false;\n this.setState({ closeNow: false });\n };\n\n /**\n * Function implementation to move to a given slide.\n * @param newIndex\n */\n private readonly _goToIndex = (newIndex: number): void => {\n if (this.animating) {\n return;\n }\n this.setState({ activeIndex: newIndex });\n };\n}\n\nexport default CarouselModule;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { Carousel } from '@msdyn365-commerce/components';\nimport { Module } from '@msdyn365-commerce-modules/utilities';\nimport classnames from 'classnames';\nimport * as React from 'react';\n\nimport { ICarouselViewProps } from './carousel';\n\n/**\n * Returns item slots.\n * @returns Array of item slots.\n * @param props -Props.\n */\nconst retrieveItems = (props: ICarouselViewProps): React.ReactNode[] => {\n let items = [];\n items = props.slots && props.slots.content && props.slots.content.length > 0 ? props.slots.content : [];\n return items;\n};\nconst CarouselView: React.FC = props => (\n \n \n \n);\n\nexport default CarouselView;\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 {\n CheckoutModule,\n ErrorCode,\n ErrorLocation,\n ErrorMessageResource,\n getCheckoutState,\n ICheckoutError,\n ICheckoutState\n} from '@msdyn365-commerce/global-state/';\n\n// eslint-disable-next-line @typescript-eslint/no-extraneous-class -- create global class\nexport class CheckoutErrors {\n public static readonly ActionError: ICheckoutError = {\n errorCode: ErrorCode.ActionError,\n errorMessageResource: ErrorMessageResource.checkoutTimeoutErrorMessage,\n errorLocation: ErrorLocation.Checkout\n };\n\n public static readonly Microsoft_Dynamics_Commerce_Runtime_BlockedLoyaltyCard: ICheckoutError = {\n errorCode: ErrorCode.Microsoft_Dynamics_Commerce_Runtime_BlockedLoyaltyCard,\n errorMessageResource: ErrorMessageResource.blockedLoyaltyCardErrorMessage,\n errorLocation: ErrorLocation.CheckoutLoyalty\n };\n\n public static readonly Microsoft_Dynamics_Commerce_Runtime_CustomerAccountLimitSignDifferentFromAmountDue: ICheckoutError = {\n errorCode: ErrorCode.Microsoft_Dynamics_Commerce_Runtime_CustomerAccountLimitSignDifferentFromAmountDue,\n errorMessageResource: ErrorMessageResource.customerAccountLimitSignDifferentFromAmountDueErrorMessage,\n errorLocation: ErrorLocation.CheckoutCustomerAccountPayment\n };\n\n public static readonly Microsoft_Dynamics_Commerce_Runtime_CustomerAccountPaymentExceedsAvailableCreditLimit: ICheckoutError = {\n errorCode: ErrorCode.Microsoft_Dynamics_Commerce_Runtime_CustomerAccountPaymentExceedsAvailableCreditLimit,\n errorMessageResource: ErrorMessageResource.customerAccountPaymentExceedsAvailableCreditLimitErrorMessage,\n errorLocation: ErrorLocation.Checkout\n };\n\n public static readonly Microsoft_Dynamics_Commerce_Runtime_CustomerAccountPaymentExceedsCustomerAccountFloorLimit: ICheckoutError = {\n errorCode: ErrorCode.Microsoft_Dynamics_Commerce_Runtime_CustomerAccountPaymentExceedsCustomerAccountFloorLimit,\n errorMessageResource: ErrorMessageResource.customerAccountPaymentExceedsCustomerAccountFloorLimitErrorMessage,\n errorLocation: ErrorLocation.CheckoutCustomerAccountPayment\n };\n\n public static readonly Microsoft_Dynamics_Commerce_Runtime_CustomerAccountPaymentExceedsTotalAmountForCarryOutAndReturnItems: ICheckoutError = {\n errorCode: ErrorCode.Microsoft_Dynamics_Commerce_Runtime_CustomerAccountPaymentExceedsTotalAmountForCarryOutAndReturnItems,\n errorMessageResource: ErrorMessageResource.customerAccountPaymentExceedsTotalAmountForCarryOutAndReturnItemsErrorMessage,\n errorLocation: ErrorLocation.CheckoutCustomerAccountPayment\n };\n\n public static readonly Microsoft_Dynamics_Commerce_Runtime_CustomerAccountPaymentForCustomerWithoutAllowOnAccount: ICheckoutError = {\n errorCode: ErrorCode.Microsoft_Dynamics_Commerce_Runtime_CustomerAccountPaymentForCustomerWithoutAllowOnAccount,\n errorMessageResource: ErrorMessageResource.customerAccountPaymentForCustomerWithoutAllowOnAccountErrorMessage,\n errorLocation: ErrorLocation.CheckoutCustomerAccountPayment\n };\n\n public static readonly Microsoft_Dynamics_Commerce_Runtime_CustomerAccountPaymentNotAllowedForOpenInvoices: ICheckoutError = {\n errorCode: ErrorCode.Microsoft_Dynamics_Commerce_Runtime_CustomerAccountPaymentNotAllowedForOpenInvoices,\n errorMessageResource: ErrorMessageResource.customerAccountPaymentNotAllowedForOpenInvoicesErrorMessage,\n errorLocation: ErrorLocation.CheckoutCustomerAccountPayment\n };\n\n public static readonly Microsoft_Dynamics_Commerce_Runtime_FraudRisk: ICheckoutError = {\n errorCode: ErrorCode.Microsoft_Dynamics_Commerce_Runtime_FraudRisk,\n errorMessageResource: ErrorMessageResource.fraudRiskErrorMessage,\n errorLocation: ErrorLocation.CheckoutPaymentInstrument\n };\n\n public static readonly Microsoft_Dynamics_Commerce_Runtime_GiftCardBalanceInquiryFailed: ICheckoutError = {\n errorCode: ErrorCode.Microsoft_Dynamics_Commerce_Runtime_GiftCardBalanceInquiryFailed,\n errorMessageResource: ErrorMessageResource.giftCardBalanceInquiryFailedErrorMessage,\n errorLocation: ErrorLocation.CheckoutGiftCard\n };\n\n public static readonly Microsoft_Dynamics_Commerce_Runtime_GiftCardCurrencyMismatch: ICheckoutError = {\n errorCode: ErrorCode.Microsoft_Dynamics_Commerce_Runtime_GiftCardCurrencyMismatch,\n errorMessageResource: ErrorMessageResource.giftCardCurrencyMismatchErrorMessage,\n errorLocation: ErrorLocation.CheckoutGiftCard\n };\n\n public static readonly Microsoft_Dynamics_Commerce_Runtime_InvalidCartVersion: ICheckoutError = {\n errorCode: ErrorCode.Microsoft_Dynamics_Commerce_Runtime_InvalidCartVersion,\n errorMessageResource: ErrorMessageResource.invalidCartVersionErrorMessage,\n errorLocation: ErrorLocation.Checkout\n };\n\n public static readonly Microsoft_Dynamics_Commerce_Runtime_InvalidLoyaltyCardNumber: ICheckoutError = {\n errorCode: ErrorCode.Microsoft_Dynamics_Commerce_Runtime_InvalidLoyaltyCardNumber,\n errorMessageResource: ErrorMessageResource.invalidLoyaltyCardNumberErrorMessage,\n errorLocation: ErrorLocation.CheckoutLoyalty\n };\n\n public static readonly Microsoft_Dynamics_Commerce_Runtime_InvalidPaymentRequest: ICheckoutError = {\n errorCode: ErrorCode.Microsoft_Dynamics_Commerce_Runtime_InvalidPaymentRequest,\n errorMessageResource: ErrorMessageResource.invalidPaymentRequestErrorMessage,\n errorLocation: ErrorLocation.CheckoutPaymentInstrument\n };\n\n public static readonly Microsoft_Dynamics_Commerce_Runtime_InvalidPaymentRequest_Console: ICheckoutError = {\n errorCode: ErrorCode.Microsoft_Dynamics_Commerce_Runtime_InvalidPaymentRequest,\n errorMessageResource: ErrorMessageResource.invalidPaymentRequestConsoleErrorMessage,\n errorLocation: ErrorLocation.Console\n };\n\n public static readonly Microsoft_Dynamics_Commerce_Runtime_MissingRequiredCartTenderLines: ICheckoutError = {\n errorCode: ErrorCode.Microsoft_Dynamics_Commerce_Runtime_MissingRequiredCartTenderLines,\n errorMessageResource: ErrorMessageResource.missingRequiredCartTenderLinesErrorMessage,\n errorLocation: ErrorLocation.CheckoutPaymentInstrument\n };\n\n public static readonly Microsoft_Dynamics_Commerce_Runtime_MultipleCustomerAccountPaymentsNotAllowed: ICheckoutError = {\n errorCode: ErrorCode.Microsoft_Dynamics_Commerce_Runtime_MultipleCustomerAccountPaymentsNotAllowed,\n errorMessageResource: ErrorMessageResource.multipleCustomerAccountPaymentsNotAllowedErrorMessage,\n errorLocation: ErrorLocation.CheckoutCustomerAccountPayment\n };\n\n public static readonly Microsoft_Dynamics_Commerce_Runtime_NoMoreThanOneLoyaltyTender: ICheckoutError = {\n errorCode: ErrorCode.Microsoft_Dynamics_Commerce_Runtime_NoMoreThanOneLoyaltyTender,\n errorMessageResource: ErrorMessageResource.noMoreThanOneLoyaltyTenderErrorMessage,\n errorLocation: ErrorLocation.CheckoutLoyalty\n };\n\n public static readonly Microsoft_Dynamics_Commerce_Runtime_NoResponseFromGatewayForGiftCardBalanceInquiry: ICheckoutError = {\n errorCode: ErrorCode.Microsoft_Dynamics_Commerce_Runtime_NoResponseFromGatewayForGiftCardBalanceInquiry,\n errorMessageResource: ErrorMessageResource.noResponseFromGatewayForGiftCardBalanceInquiryErrorMessage,\n errorLocation: ErrorLocation.CheckoutGiftCard\n };\n\n public static readonly Microsoft_Dynamics_Commerce_Runtime_NoTenderLoyaltyCard: ICheckoutError = {\n errorCode: ErrorCode.Microsoft_Dynamics_Commerce_Runtime_NoTenderLoyaltyCard,\n errorMessageResource: ErrorMessageResource.noTenderLoyaltyCardErrorMessage,\n errorLocation: ErrorLocation.CheckoutLoyalty\n };\n\n public static readonly Microsoft_Dynamics_Commerce_Runtime_NotEnoughRewardPoints: ICheckoutError = {\n errorCode: ErrorCode.Microsoft_Dynamics_Commerce_Runtime_NotEnoughRewardPoints,\n errorMessageResource: ErrorMessageResource.notEnoughRewardPointsErrorMessage,\n errorLocation: ErrorLocation.CheckoutLoyalty\n };\n\n public static readonly Microsoft_Dynamics_Commerce_Runtime_PaymentAlreadyVoided: ICheckoutError = {\n errorCode: ErrorCode.Microsoft_Dynamics_Commerce_Runtime_PaymentAlreadyVoided,\n errorMessageResource: ErrorMessageResource.paymentAlreadyVoidedErrorMessage,\n errorLocation: ErrorLocation.CheckoutPaymentInstrument\n };\n\n public static readonly Microsoft_Dynamics_Commerce_Runtime_PaymentAmountExceedsGiftBalance: ICheckoutError = {\n errorCode: ErrorCode.Microsoft_Dynamics_Commerce_Runtime_PaymentAmountExceedsGiftBalance,\n errorMessageResource: ErrorMessageResource.paymentAmountExceedsGiftBalanceErrorMessage,\n errorLocation: ErrorLocation.CheckoutGiftCard\n };\n\n public static readonly Microsoft_Dynamics_Commerce_Runtime_PaymentRequiresMerchantProperties: ICheckoutError = {\n errorCode: ErrorCode.Microsoft_Dynamics_Commerce_Runtime_PaymentRequiresMerchantProperties,\n errorMessageResource: ErrorMessageResource.paymentRequiresMerchantPropertiesErrorMessage,\n errorLocation: ErrorLocation.CheckoutPaymentInstrument\n };\n\n public static readonly Microsoft_Dynamics_Commerce_Runtime_PaymentRequiresMerchantProperties_Console: ICheckoutError = {\n errorCode: ErrorCode.Microsoft_Dynamics_Commerce_Runtime_PaymentRequiresMerchantProperties,\n errorMessageResource: ErrorMessageResource.paymentRequiresMerchantPropertiesConsoleErrorMessage,\n errorLocation: ErrorLocation.Console\n };\n\n public static readonly Microsoft_Dynamics_Commerce_Runtime_PaymentUsingUnauthorizedAccount: ICheckoutError = {\n errorCode: ErrorCode.Microsoft_Dynamics_Commerce_Runtime_PaymentUsingUnauthorizedAccount,\n errorMessageResource: ErrorMessageResource.paymentUsingUnauthorizedAccountErrorMessage,\n errorLocation: ErrorLocation.CheckoutCustomerAccountPayment\n };\n\n public static readonly Microsoft_Dynamics_Commerce_Runtime_RefundAmountMoreThanAllowed: ICheckoutError = {\n errorCode: ErrorCode.Microsoft_Dynamics_Commerce_Runtime_RefundAmountMoreThanAllowed,\n errorMessageResource: ErrorMessageResource.refundAmountMoreThanAllowedErrorMessage,\n errorLocation: ErrorLocation.CheckoutLoyalty\n };\n\n public static readonly Microsoft_Dynamics_Commerce_Runtime_UnableToAuthorizePayment: ICheckoutError = {\n errorCode: ErrorCode.Microsoft_Dynamics_Commerce_Runtime_UnableToAuthorizePayment,\n errorMessageResource: ErrorMessageResource.unableToAuthorizePaymentErrorMessage,\n errorLocation: ErrorLocation.CheckoutPaymentInstrument\n };\n\n public static readonly Microsoft_Dynamics_Commerce_Runtime_UnableToAuthorizePaymentCardAdditionalContextRequired: ICheckoutError = {\n errorCode: ErrorCode.Microsoft_Dynamics_Commerce_Runtime_UnableToAuthorizePaymentCardAdditionalContextRequired,\n errorMessageResource: ErrorMessageResource.unableToAuthorizePaymentCardAdditionalContextRequiredErrorMessage,\n errorLocation: ErrorLocation.CheckoutPaymentInstrument\n };\n\n public static readonly Microsoft_Dynamics_Commerce_Runtime_UnableToAuthorizePaymentCardTypeMissingOrNotSupported: ICheckoutError = {\n errorCode: ErrorCode.Microsoft_Dynamics_Commerce_Runtime_UnableToAuthorizePaymentCardTypeMissingOrNotSupported,\n errorMessageResource: ErrorMessageResource.unableToAuthorizePaymentCardTypeMissingOrNotSupportedErrorMessage,\n errorLocation: ErrorLocation.CheckoutPaymentInstrument\n };\n\n public static readonly Microsoft_Dynamics_Commerce_Runtime_UnableToCancelPayment: ICheckoutError = {\n errorCode: ErrorCode.Microsoft_Dynamics_Commerce_Runtime_UnableToCancelPayment,\n errorMessageResource: ErrorMessageResource.unableToCancelPaymentErrorMessage,\n errorLocation: ErrorLocation.CheckoutPaymentInstrument\n };\n\n public static readonly Microsoft_Dynamics_Commerce_Runtime_UnableToReadCardTokenInfo: ICheckoutError = {\n errorCode: ErrorCode.Microsoft_Dynamics_Commerce_Runtime_UnableToReadCardTokenInfo,\n errorMessageResource: ErrorMessageResource.unableToReadCardTokenInfoErrorMessage,\n errorLocation: ErrorLocation.CheckoutPaymentInstrument\n };\n\n public static readonly Microsoft_Dynamics_Commerce_Runtime_UnableToRetrieveCardPaymentAcceptResult: ICheckoutError = {\n errorCode: ErrorCode.Microsoft_Dynamics_Commerce_Runtime_UnableToRetrieveCardPaymentAcceptResult,\n errorMessageResource: ErrorMessageResource.unableToRetrieveCardPaymentAcceptResultErrorMessage,\n errorLocation: ErrorLocation.CheckoutPaymentInstrument\n };\n\n public static readonly checkoutErrorsList: ICheckoutError[] = [\n CheckoutErrors.ActionError,\n CheckoutErrors.Microsoft_Dynamics_Commerce_Runtime_BlockedLoyaltyCard,\n CheckoutErrors.Microsoft_Dynamics_Commerce_Runtime_CustomerAccountLimitSignDifferentFromAmountDue,\n CheckoutErrors.Microsoft_Dynamics_Commerce_Runtime_CustomerAccountPaymentExceedsAvailableCreditLimit,\n CheckoutErrors.Microsoft_Dynamics_Commerce_Runtime_CustomerAccountPaymentExceedsCustomerAccountFloorLimit,\n CheckoutErrors.Microsoft_Dynamics_Commerce_Runtime_CustomerAccountPaymentExceedsTotalAmountForCarryOutAndReturnItems,\n CheckoutErrors.Microsoft_Dynamics_Commerce_Runtime_CustomerAccountPaymentForCustomerWithoutAllowOnAccount,\n CheckoutErrors.Microsoft_Dynamics_Commerce_Runtime_CustomerAccountPaymentNotAllowedForOpenInvoices,\n CheckoutErrors.Microsoft_Dynamics_Commerce_Runtime_FraudRisk,\n CheckoutErrors.Microsoft_Dynamics_Commerce_Runtime_GiftCardBalanceInquiryFailed,\n CheckoutErrors.Microsoft_Dynamics_Commerce_Runtime_GiftCardCurrencyMismatch,\n CheckoutErrors.Microsoft_Dynamics_Commerce_Runtime_InvalidCartVersion,\n CheckoutErrors.Microsoft_Dynamics_Commerce_Runtime_InvalidLoyaltyCardNumber,\n CheckoutErrors.Microsoft_Dynamics_Commerce_Runtime_InvalidPaymentRequest,\n CheckoutErrors.Microsoft_Dynamics_Commerce_Runtime_InvalidPaymentRequest_Console,\n CheckoutErrors.Microsoft_Dynamics_Commerce_Runtime_MissingRequiredCartTenderLines,\n CheckoutErrors.Microsoft_Dynamics_Commerce_Runtime_MultipleCustomerAccountPaymentsNotAllowed,\n CheckoutErrors.Microsoft_Dynamics_Commerce_Runtime_NoMoreThanOneLoyaltyTender,\n CheckoutErrors.Microsoft_Dynamics_Commerce_Runtime_NoResponseFromGatewayForGiftCardBalanceInquiry,\n CheckoutErrors.Microsoft_Dynamics_Commerce_Runtime_NoTenderLoyaltyCard,\n CheckoutErrors.Microsoft_Dynamics_Commerce_Runtime_NotEnoughRewardPoints,\n CheckoutErrors.Microsoft_Dynamics_Commerce_Runtime_PaymentAlreadyVoided,\n CheckoutErrors.Microsoft_Dynamics_Commerce_Runtime_PaymentAmountExceedsGiftBalance,\n CheckoutErrors.Microsoft_Dynamics_Commerce_Runtime_PaymentRequiresMerchantProperties,\n CheckoutErrors.Microsoft_Dynamics_Commerce_Runtime_PaymentRequiresMerchantProperties_Console,\n CheckoutErrors.Microsoft_Dynamics_Commerce_Runtime_PaymentUsingUnauthorizedAccount,\n CheckoutErrors.Microsoft_Dynamics_Commerce_Runtime_RefundAmountMoreThanAllowed,\n CheckoutErrors.Microsoft_Dynamics_Commerce_Runtime_UnableToAuthorizePayment,\n CheckoutErrors.Microsoft_Dynamics_Commerce_Runtime_UnableToAuthorizePaymentCardAdditionalContextRequired,\n CheckoutErrors.Microsoft_Dynamics_Commerce_Runtime_UnableToAuthorizePaymentCardTypeMissingOrNotSupported,\n CheckoutErrors.Microsoft_Dynamics_Commerce_Runtime_UnableToCancelPayment,\n CheckoutErrors.Microsoft_Dynamics_Commerce_Runtime_UnableToReadCardTokenInfo,\n CheckoutErrors.Microsoft_Dynamics_Commerce_Runtime_UnableToRetrieveCardPaymentAcceptResult\n ];\n}\n\nexport async function setCheckoutErrors(\n errorCode: string,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n resources: any,\n isExpressCheckoutApplied: boolean,\n ctx: IActionContext,\n apiError?: string | undefined\n): Promise {\n let clientCheckoutError: ICheckoutError | undefined;\n const consoleCheckoutErrors: ICheckoutError[] = [];\n\n const checkoutState: ICheckoutState = await getCheckoutState(ctx).catch((error: Error) => {\n ctx.telemetry.exception(error);\n throw error;\n });\n\n // find the checkout errors\n for (const checkoutError of CheckoutErrors.checkoutErrorsList) {\n if (errorCode === checkoutError.errorCode) {\n if (checkoutError.errorLocation === ErrorLocation.Console) {\n const consoleCheckoutError: ICheckoutError = {\n errorCode: checkoutError.errorCode,\n errorMessageResource: checkoutError.errorMessageResource,\n errorLocation: checkoutError.errorLocation\n };\n consoleCheckoutErrors.push(consoleCheckoutError);\n } else {\n if (clientCheckoutError) {\n ctx.telemetry.exception(new Error('Invalid number of client checkout errors.'));\n throw new Error('Invalid number of client checkout errors.');\n } else {\n clientCheckoutError = {\n errorCode: checkoutError.errorCode,\n errorMessageResource: checkoutError.errorMessageResource,\n errorLocation: checkoutError.errorLocation\n };\n }\n }\n }\n }\n\n // log the console checkout errors\n for (const consoleCheckoutError of consoleCheckoutErrors) {\n consoleCheckoutError.errorMessage = getCheckoutErrorMessage(resources, consoleCheckoutError.errorMessageResource!, apiError!);\n console.log(consoleCheckoutError.errorMessage);\n }\n\n // handle the client checkout error\n if (clientCheckoutError) {\n clientCheckoutError.errorMessage = getCheckoutErrorMessage(resources, clientCheckoutError.errorMessageResource!, apiError!);\n\n if (isExpressCheckoutApplied && clientCheckoutError.errorLocation === ErrorLocation.CheckoutPaymentInstrument) {\n clientCheckoutError.errorLocation = ErrorLocation.Checkout;\n }\n\n await checkoutState.updateCheckoutError({ newCheckoutError: clientCheckoutError });\n await checkoutState.updateShouldFocusOnCheckoutError({ newShouldFocusOnCheckoutError: true });\n } else {\n // if could not map to any checkout error(s), show the API error message over generic error\n if (consoleCheckoutErrors.length === 0) {\n const genericError = {\n errorLocation: ErrorLocation.Checkout\n };\n if (apiError) {\n genericError['errorMessage'] = apiError;\n } else {\n genericError['errorMessage'] = resources.genericErrorMessage;\n }\n\n await checkoutState.updateCheckoutError({ newCheckoutError: genericError });\n await checkoutState.updateShouldFocusOnCheckoutError({ newShouldFocusOnCheckoutError: true });\n }\n }\n}\n\nexport async function focusOnCheckoutError(checkoutErrorRef: React.RefObject, ctx: IActionContext): Promise {\n const checkoutState: ICheckoutState = await getCheckoutState(ctx).catch((error: Error) => {\n ctx.telemetry.exception(error);\n throw error;\n });\n\n checkoutErrorRef.current && checkoutErrorRef.current.scrollIntoView();\n\n await checkoutState.updateCheckoutErrorFocus({ newCheckoutErrorFocus: CheckoutModule.None });\n await checkoutState.updateShouldFocusOnCheckoutError({ newShouldFocusOnCheckoutError: false });\n}\n\nexport async function setCheckoutErrorFocus(checkoutModuleId: string, ctx: IActionContext): Promise {\n const checkoutState: ICheckoutState = await getCheckoutState(ctx).catch((error: Error) => {\n ctx.telemetry.exception(error);\n throw error;\n });\n\n for (const checkoutModule of Object.keys(CheckoutModule)) {\n if (checkoutModuleId.includes(CheckoutModule[checkoutModule])) {\n await checkoutState.updateCheckoutErrorFocus({ newCheckoutErrorFocus: CheckoutModule[checkoutModule] });\n return;\n }\n }\n}\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction getCheckoutErrorMessage(resources: any, errorMessageResource: ErrorMessageResource, errorMessageFromAPI: string): string {\n const errorResource = Object.keys(resources).find(resource => resource === errorMessageResource);\n // return API error when error resource string is not found in checkout definition file\n return errorResource !== undefined ? resources[errorResource] : errorMessageFromAPI;\n}\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport * as React from 'react';\n\n/**\n * The payment error.\n */\nexport interface IPaymentError {\n title: string;\n message: string;\n className?: string;\n}\n\n/**\n * The payment error.\n * @param param0 - First param.\n * @param param0.title - Title.\n * @param param0.message - Message.\n * @param param0.className - ClassName.\n * @returns React node.\n */\nexport const ErrorComponent: React.FC = ({ title, message, className = 'ms-checkout-payment-instrument' }) => (\n
\n

{title}

\n

{message}

\n
\n);\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { Waiting } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\n/**\n * Payment waiting props.\n */\nexport interface IPaymentWaitingProps {\n message: string;\n className?: string;\n}\n\n/**\n * Payment waiting.\n * @param param0 - First in param.\n * @param param0.message - Message.\n * @param param0.className - ClassName.\n * @returns React node.\n */\nexport const WaitingComponent: React.FC = ({ message, className = 'ms-checkout-payment-instrument' }) => (\n
\n \n {message}\n
\n);\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { Alert, Button, INodeProps, NodeTag } from '@msdyn365-commerce-modules/utilities';\nimport classnames from 'classnames';\nimport * as React from 'react';\n\nimport { showAdditionalFields } from '../gift-card-balance-check.props.autogenerated';\n\nexport interface IGetFormInput {\n errorMessage: string;\n giftCardNumber: string;\n giftCardPin: string;\n giftCardExp: string;\n inputRef?: React.RefObject;\n inputPinRef?: React.RefObject;\n inputExpRef?: React.RefObject;\n supportExternalGiftCard?: boolean;\n additionalFields?: showAdditionalFields;\n resources: {\n balanceCheckButton: string;\n giftCardFormLabel: string;\n giftCardNumberLabel: string;\n giftCardPinLabel: string;\n giftCardExpLabel: string;\n giftCardAlertLabel: string;\n giftCardPinPlaceholderText: string;\n giftCardExpPlaceholderText: string;\n };\n onEnterGiftCardNumber(giftCardNumber: string): void;\n onEnterGiftCardPin(giftCardPin: string): void;\n onEnterGiftCardExp(giftCardExp: string): void;\n onApplyGiftCard(): Promise;\n}\n\nexport interface IForm {\n formProps: INodeProps;\n label: React.ReactNode;\n inputPinLabel: React.ReactNode;\n inputExpLabel: React.ReactNode;\n alert: React.ReactNode;\n inputProps: INodeProps;\n inputNumProps: INodeProps;\n inputPinProps: INodeProps;\n inputExpProps: INodeProps;\n inputNumber: React.ReactNode;\n inputPin: React.ReactNode;\n inputExp: React.ReactNode;\n applyButton: React.ReactNode;\n supportExternalGiftCard: boolean | undefined;\n showGiftCardPinInput: boolean | undefined;\n showGiftCardExpInput: boolean | undefined;\n alertFieldLabel: React.ReactNode;\n}\n\n/**\n * On apply function.\n * @param onApplyGiftCard -On apply gift card.\n * @returns Apply gift card.\n */\nconst onApplyHandler = (onApplyGiftCard: () => Promise) => async (event: React.SyntheticEvent): Promise => {\n event.preventDefault();\n await onApplyGiftCard();\n};\n\n/**\n * On change number function.\n * @param onEnterGiftCardNumber -On enter gift card number.\n * @returns On gift card enter pin function result.\n */\nconst onChangeNumberHandler = (onEnterGiftCardNumber: (giftCardNumber: string) => void) => (event: React.ChangeEvent) => {\n const value = (event.target.value || '').replace(new RegExp('[<>]', 'gi'), '');\n onEnterGiftCardNumber(value);\n};\n\n/**\n * On change pin function.\n * @param onEnterGiftCardPin -On enter gift card pin.\n * @returns On enter gift card pin function result.\n */\nconst onChangePinHandler = (onEnterGiftCardPin: (giftCardPin: string) => void) => (event: React.ChangeEvent) => {\n const value = (event.target.value || '').replace(new RegExp('[<>]', 'gi'), '');\n onEnterGiftCardPin(value);\n};\n\n/**\n * On change exp function.\n * @param onEnterGiftCardExp -On enter gift card.\n * @returns On enter gift card function result.\n */\nconst onChangeExpHandler = (onEnterGiftCardExp: (giftCardExp: string) => void) => (event: React.ChangeEvent) => {\n const value = (event.target.value || '').replace(new RegExp('[<>]', 'gi'), '');\n onEnterGiftCardExp(value);\n};\n\nexport const getForm = (options: IGetFormInput): IForm => {\n const {\n errorMessage,\n inputRef,\n inputPinRef,\n inputExpRef,\n giftCardNumber,\n giftCardPin,\n giftCardExp,\n onEnterGiftCardNumber,\n onEnterGiftCardPin,\n onEnterGiftCardExp,\n onApplyGiftCard,\n supportExternalGiftCard,\n additionalFields,\n resources: {\n balanceCheckButton,\n giftCardFormLabel,\n giftCardNumberLabel,\n giftCardPinLabel,\n giftCardExpLabel,\n giftCardAlertLabel,\n giftCardPinPlaceholderText,\n giftCardExpPlaceholderText\n }\n } = options;\n\n const formProps = {\n className: classnames('ms-gift-card-balance-check__form', { 'is-invalid': !!errorMessage }),\n onSubmit: onApplyHandler(onApplyGiftCard),\n tag: 'form' as NodeTag\n };\n\n const label = (\n \n );\n\n const inputPinLabel = (\n \n );\n\n const inputExpLabel = (\n \n );\n\n const alertFieldLabel = (\n \n );\n\n const alert = (\n \n {errorMessage}\n \n );\n\n const inputProps = {\n className: 'ms-gift-card-balance-check__input-fields'\n };\n\n const inputNumProps = {\n className: 'ms-gift-card-balance-check__input-num-fields'\n };\n\n const inputPinProps = {\n className: 'ms-gift-card-balance-check__input-pin-fields'\n };\n\n const inputExpProps = {\n className: 'ms-gift-card-balance-check__input-exp-fields'\n };\n\n const inputNumber = (\n \n );\n\n const inputPin = (\n \n );\n\n const inputExp = (\n \n );\n\n const applyButton = (\n \n {balanceCheckButton}\n \n );\n\n let showGiftCardPinInput = false;\n let showGiftCardExpInput = false;\n\n switch (additionalFields) {\n case showAdditionalFields.pin:\n showGiftCardPinInput = true;\n break;\n case showAdditionalFields.expirationDate:\n showGiftCardExpInput = true;\n break;\n case showAdditionalFields.pinAndExpirationDate:\n showGiftCardPinInput = true;\n showGiftCardExpInput = true;\n break;\n default:\n }\n\n return {\n formProps,\n label,\n inputPinLabel,\n inputExpLabel,\n alert,\n inputProps,\n inputNumProps,\n inputPinProps,\n inputExpProps,\n inputNumber,\n inputPin,\n inputExp,\n applyButton,\n supportExternalGiftCard,\n showGiftCardPinInput,\n showGiftCardExpInput,\n alertFieldLabel\n };\n};\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { GiftCard } from '@msdyn365-commerce/retail-proxy/dist/Entities/CommerceTypes.g';\nimport { INodeProps } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nexport interface IGetItemInput {\n giftCard: GiftCard;\n resources: {\n enteredGiftCardLabel: string;\n giftCardAvailableBalanceLabel: string;\n };\n getFormattedPrice(price?: number, currencyCode?: string): string;\n}\n\nexport interface IItem {\n itemProps: INodeProps;\n id?: string;\n selectedGiftCard: React.ReactNode;\n removeButton?: React.ReactNode;\n}\n\n/**\n * GiftCardItem component.\n * @param root0\n * @param root0.giftCard\n * @param root0.getFormattedPrice\n * @param root0.resources\n * @param root0.resources.enteredGiftCardLabel\n * @param root0.resources.giftCardAvailableBalanceLabel\n * @extends {React.PureComponent}\n */\nexport const getItem = ({\n giftCard,\n getFormattedPrice,\n resources: { enteredGiftCardLabel, giftCardAvailableBalanceLabel }\n}: IGetItemInput): IItem => {\n const balance = getFormattedPrice(giftCard.Balance, giftCard.CardCurrencyCode);\n const giftCardLast4Digit = (giftCard.Id || '').substr(-4);\n\n const itemProps = {\n className: 'ms-gift-card-balance-check__item'\n };\n\n const selectedGiftCard = (\n \n {enteredGiftCardLabel}\n {` `}\n {giftCardLast4Digit}\n {` `}({giftCardAvailableBalanceLabel}\n {` `}\n {balance})\n \n );\n\n return {\n itemProps,\n id: giftCard && giftCard.Id,\n selectedGiftCard\n };\n};\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport {\n getGiftCardAsync,\n getTenderTypesAsync,\n resolveCardTypesAsync\n} from '@msdyn365-commerce/retail-proxy/dist/DataActions/StoreOperationsDataActions.g';\nimport {\n CardType,\n CardTypeInfo,\n GiftCard,\n RetailOperation,\n TenderType\n} from '@msdyn365-commerce/retail-proxy/dist/Entities/CommerceTypes.g';\nimport { IModuleProps } from '@msdyn365-commerce-modules/utilities';\nimport classname from 'classnames';\nimport * as React from 'react';\n\nimport { OPERATIONS } from '../checkout';\nimport { getForm, IForm } from './components/get-form';\nimport { getItem, IItem } from './components/get-item';\nimport { IGiftCardBalanceCheckProps } from './gift-card-balance-check.props.autogenerated';\n\ninterface IGiftCardBalanceCheckState {\n isFetchingGiftCard: boolean;\n errorMessage: string;\n giftCardNumber: string;\n giftCardPin: string;\n giftCardExp: string;\n giftCard?: GiftCard;\n}\n\nenum SupportedGiftCardType {\n Internal = 'internal',\n External = 'external',\n Both = 'both'\n}\n\nexport interface IGiftCardBalanceCheckModuleProps extends IGiftCardBalanceCheckProps<{}> {}\n\nexport interface IGiftCardBalanceCheckViewProps extends IGiftCardBalanceCheckProps<{}>, IGiftCardBalanceCheckState {\n className?: string;\n\n form: IForm;\n item?: IItem;\n\n giftCardBalanceCheckProps: IModuleProps;\n\n enterGiftCardNumber?(giftCardNumber: string): void;\n enterGiftCardPin?(giftCardPin: string): void;\n enterGiftCardExp?(giftCardExp: string): void;\n applyGiftCard?(): void;\n}\n\n/**\n *\n * GiftCardBalanceCheck component.\n * @extends {React.Component}\n */\nexport class GiftCardBalanceCheck extends React.Component {\n public state: IGiftCardBalanceCheckState = {\n isFetchingGiftCard: false,\n errorMessage: '',\n giftCardNumber: '',\n giftCardPin: '',\n giftCardExp: ''\n };\n\n private readonly inputRef: React.RefObject = React.createRef();\n\n private readonly inputPinRef: React.RefObject = React.createRef();\n\n private readonly inputExpRef: React.RefObject = React.createRef();\n\n public shouldComponentUpdate(nextProps: IGiftCardBalanceCheckModuleProps, nextState: IGiftCardBalanceCheckState): boolean {\n if (this.state === nextState && this.props.data === nextProps.data) {\n return false;\n }\n return true;\n }\n\n public render(): JSX.Element | null {\n const {\n config: { className, showAdditionalFields },\n resources\n } = this.props;\n const { errorMessage, giftCardNumber, giftCardPin, giftCardExp } = this.state;\n\n const supportedGiftCardType = this.props.context.app.config.giftCardSupported;\n\n if (!this._isEnabled()) {\n this.props.context.telemetry.error('Gift card balance check is not supported, module wont render');\n return null;\n }\n\n const supportExternalGiftCard = supportedGiftCardType !== SupportedGiftCardType.Internal;\n\n const moduleClassName = classname('ms-gift-card-balance-check', className);\n\n const viewProps: IGiftCardBalanceCheckViewProps = {\n ...this.props,\n ...this.state,\n className: moduleClassName,\n giftCardBalanceCheckProps: { moduleProps: this.props, className: moduleClassName },\n\n enterGiftCardNumber: this._enterGiftCardNumber,\n enterGiftCardPin: this._enterGiftCardPin,\n enterGiftCardExp: this._enterGiftCardExp,\n applyGiftCard: this._applyGiftCard,\n\n form: getForm({\n errorMessage,\n giftCardNumber,\n giftCardPin,\n giftCardExp,\n inputRef: this.inputRef,\n inputPinRef: this.inputPinRef,\n inputExpRef: this.inputExpRef,\n resources,\n supportExternalGiftCard,\n additionalFields: showAdditionalFields,\n onEnterGiftCardNumber: this._enterGiftCardNumber,\n onEnterGiftCardPin: this._enterGiftCardPin,\n onEnterGiftCardExp: this._enterGiftCardExp,\n onApplyGiftCard: this._applyGiftCard\n }),\n item:\n this.state.giftCard &&\n getItem({\n giftCard: this.state.giftCard,\n getFormattedPrice: this._getFormattedPrice,\n resources\n })\n };\n\n return this.props.renderView(viewProps) as React.ReactElement;\n }\n\n private readonly _isEnabled = (): boolean => {\n if (\n !this.props.context.request.user.isAuthenticated &&\n this.props.context.app.config.giftCardSupported !== SupportedGiftCardType.External &&\n !this.props.config.shouldBeEnabledForGuest\n ) {\n return false;\n }\n return true;\n };\n\n private readonly _getFormattedPrice = (price: number = 0, currencyCode: string = 'USD'): string => {\n return this.props.context.cultureFormatter.formatCurrency(price, currencyCode);\n };\n\n private readonly _enterGiftCardNumber = (giftCardNumber: string): void => {\n this.setState({\n giftCardNumber\n });\n this._clearError();\n };\n\n private readonly _enterGiftCardPin = (giftCardPin: string): void => {\n this.setState({\n giftCardPin\n });\n this._clearError();\n };\n\n private readonly _enterGiftCardExp = (giftCardExp: string): void => {\n this.setState({\n giftCardExp\n });\n this._clearError();\n };\n\n private readonly _clearError = (): void => {\n this.setState({\n errorMessage: ''\n });\n };\n\n private readonly _setError = (errorMessage: string): void => {\n this.props.telemetry.error('Error', errorMessage);\n this.props.telemetry.debug('Error', errorMessage);\n this.setState({\n errorMessage\n });\n };\n\n private readonly _applyGiftCard = async (): Promise => {\n if (this.state.isFetchingGiftCard) {\n return;\n }\n this.setState({\n isFetchingGiftCard: true\n });\n\n const giftCardNumber = this.state.giftCardNumber.trim();\n const giftCardPin = this.state.giftCardPin.trim();\n const giftCardExp = this.state.giftCardExp.trim();\n\n const giftCardTypes = await this._getGiftCardTypes(giftCardNumber);\n const giftCardType = giftCardTypes && giftCardTypes[0];\n const isPinRequired = giftCardType && giftCardType.IsPinRequired;\n const isExpRequired = giftCardType && giftCardType.IsExpirationDateRequired;\n const tenderTypeId = giftCardType && giftCardType.PaymentMethodId;\n const giftCard = await this._getGiftCard(giftCardNumber, giftCardPin, giftCardExp, isPinRequired, isExpRequired, tenderTypeId);\n\n if (giftCard) {\n this._clearError();\n this.setState({\n giftCardNumber: '',\n giftCardPin: '',\n giftCardExp: '',\n isFetchingGiftCard: false,\n giftCard\n });\n return Promise.resolve();\n }\n const input = this.inputRef && this.inputRef.current && this.inputRef.current.focus && (this.inputRef.current as HTMLElement);\n input && input.focus();\n this.setState({\n isFetchingGiftCard: false,\n giftCard: undefined\n });\n };\n\n private readonly _findGiftcardTenderTypes = (\n tenderTypes: TenderType[],\n operationId: RetailOperation,\n giftcardType: string\n ): string[] | undefined => {\n let matchedTenderTypes: TenderType[] | undefined;\n\n switch (giftcardType) {\n case SupportedGiftCardType.Internal:\n matchedTenderTypes = tenderTypes.filter(\n tenderType => tenderType.OperationId === operationId && tenderType.ConnectorId === ''\n );\n break;\n case SupportedGiftCardType.External:\n matchedTenderTypes = tenderTypes.filter(\n tenderType => tenderType.OperationId === operationId && tenderType.ConnectorId !== ''\n );\n break;\n default:\n throw new Error('Invalid gift card type');\n }\n\n if (matchedTenderTypes) {\n return matchedTenderTypes.map(tenderType => tenderType.TenderTypeId || '');\n }\n return;\n };\n\n private readonly _getGiftCard = async (\n giftCardNumber: string,\n giftCardPin: string,\n giftCardExp: string,\n isPinRequired: boolean | undefined,\n isExpRequired: boolean | undefined,\n tenderTypeId: string | undefined\n ): Promise => {\n const {\n resources: { invalidCardTypeError, noBalanceError, invalidCardInfoError, noCardPinError, noCardExpError }\n } = this.props;\n\n const supportedGiftCardType = this.props.context.app.config.giftCardSupported;\n\n if (!tenderTypeId) {\n return undefined;\n }\n\n const tenderTypes = await getTenderTypesAsync({ callerContext: this.props.context.actionContext, queryResultSettings: {} }).catch(\n error => {\n throw error;\n }\n );\n\n if (!tenderTypes) {\n throw new Error('Fail to get gift card tender line');\n }\n\n const internalGiftcardTenderTypes = this._findGiftcardTenderTypes(\n tenderTypes,\n OPERATIONS.PayGiftCertificate,\n SupportedGiftCardType.Internal\n );\n const externalGiftcardTenderTypes = this._findGiftcardTenderTypes(\n tenderTypes,\n OPERATIONS.PayGiftCertificate,\n SupportedGiftCardType.External\n );\n\n switch (supportedGiftCardType) {\n case undefined:\n case SupportedGiftCardType.Internal:\n if (!internalGiftcardTenderTypes?.includes(tenderTypeId)) {\n this._setError(invalidCardTypeError);\n return undefined;\n }\n break;\n case SupportedGiftCardType.External:\n if (!externalGiftcardTenderTypes?.includes(tenderTypeId)) {\n this._setError(invalidCardTypeError);\n return undefined;\n }\n break;\n case SupportedGiftCardType.Both:\n if (!internalGiftcardTenderTypes?.includes(tenderTypeId) && !externalGiftcardTenderTypes?.includes(tenderTypeId)) {\n this._setError(invalidCardTypeError);\n return undefined;\n }\n break;\n default:\n throw new Error('Unsupported gift card type');\n }\n\n if (!this.props.context.request.user.isAuthenticated && internalGiftcardTenderTypes?.includes(tenderTypeId)) {\n this._setError(invalidCardTypeError);\n return undefined;\n }\n\n if (isPinRequired && giftCardPin === '') {\n this._setError(noCardPinError);\n return undefined;\n }\n\n if (isExpRequired && giftCardExp === '') {\n this._setError(noCardExpError);\n return undefined;\n }\n\n const month = Number.parseInt(giftCardExp.split('/')[0], 10);\n const year = Number.parseInt(giftCardExp.split('/')[1], 10);\n\n return getGiftCardAsync({ callerContext: this.props.context.actionContext }, giftCardNumber, tenderTypeId, giftCardPin, month, year)\n .then(activeGiftCard => {\n if (!activeGiftCard.Balance || activeGiftCard.Balance === 0) {\n this._setError(noBalanceError);\n return;\n }\n return activeGiftCard;\n })\n .catch(error => {\n this._setError(invalidCardInfoError);\n return undefined;\n });\n };\n\n private readonly _getGiftCardTypes = async (giftCardNumber: string): Promise => {\n const {\n resources: { emptyInputError, invalidCodeError }\n } = this.props;\n\n if (!giftCardNumber) {\n this._setError(emptyInputError);\n return undefined;\n }\n\n return resolveCardTypesAsync({ callerContext: this.props.context.actionContext }, giftCardNumber, CardType.GiftCard)\n .then(giftCardTypes => {\n if (!giftCardTypes || giftCardTypes.length === 0 || giftCardTypes[0] === undefined) {\n this._setError(invalidCodeError);\n return;\n }\n return giftCardTypes;\n })\n .catch(error => {\n this._setError(invalidCodeError);\n return undefined;\n });\n };\n}\n\nexport default GiftCardBalanceCheck;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { Module, Node } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport { IForm, IItem, IGiftCardBalanceCheckViewProps } from './index';\n\nexport const Form: React.FC = ({\n formProps,\n label,\n inputPinLabel,\n inputExpLabel,\n alert,\n inputProps,\n inputNumProps,\n inputPinProps,\n inputExpProps,\n inputNumber,\n inputPin,\n inputExp,\n applyButton,\n supportExternalGiftCard,\n showGiftCardPinInput,\n showGiftCardExpInput,\n alertFieldLabel\n}) => (\n \n {alert}\n {supportExternalGiftCard ? (\n \n \n {label}\n {inputNumber}\n \n {showGiftCardPinInput && (\n \n {inputPinLabel}\n {inputPin}\n \n )}\n {showGiftCardExpInput && (\n \n {inputExpLabel}\n {inputExp}\n \n )}\n {(showGiftCardPinInput || showGiftCardExpInput) && alertFieldLabel}\n \n ) : (\n <>\n {label}\n {inputNumber}\n \n )}\n {applyButton}\n \n);\n\nexport const Item: React.FC = ({ itemProps, selectedGiftCard }) => {selectedGiftCard};\n\nconst GiftCardBalanceCheckView: React.FC = props => {\n const { giftCardBalanceCheckProps, form, item } = props;\n return (\n \n {form &&
}\n {item && }\n \n );\n};\n\nexport default GiftCardBalanceCheckView;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { ArrayExtensions } from '@msdyn365-commerce-modules/retail-actions';\nimport { observer } from 'mobx-react';\nimport * as React from 'react';\n\nimport { IHeaderData } from '../header.data';\nimport { IHeaderProps } from '../header.props.autogenerated';\n\n/**\n * The header preferred store component.\n */\n@observer\nexport class HeaderPreferredStore extends React.PureComponent> {\n private readonly modalCloseButtonRef: React.RefObject = React.createRef();\n\n /**\n * Handle click on the store selector.\n * @returns : Promise void.\n */\n public handleClick = () => {\n return this._findPreferredStoreOnClick(this.props);\n };\n\n public render(): JSX.Element | undefined {\n const {\n data: {\n storeSelectorStateManager: { result: storeSelectorStateManager }\n },\n slots,\n resources\n } = this.props;\n\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- slots can be undefined.\n if (ArrayExtensions.hasElements(slots?.storeSelector)) {\n const storeName =\n storeSelectorStateManager?.preferredStore && storeSelectorStateManager.preferredStore.StoreName\n ? storeSelectorStateManager.preferredStore.StoreName\n : resources.headerPreferredStoreText;\n\n return (\n
\n \n {storeName}\n \n {slots.storeSelector}\n
\n );\n }\n\n return undefined;\n }\n\n private async _findPreferredStoreOnClick(props: IHeaderProps): Promise {\n const {\n data: {\n storeSelectorStateManager: { result: storeSelectorStateManager }\n },\n modules\n } = props;\n if (!storeSelectorStateManager) {\n return;\n }\n let storeSelectorId: string = '';\n if (modules && Object.keys(modules).length > 0 && ArrayExtensions.hasElements(modules.storeSelector)) {\n storeSelectorId = modules.storeSelector[0].id;\n }\n await storeSelectorStateManager\n .openDialog({\n id: storeSelectorId,\n showMapViewLink: true,\n parentElementRef: this.modalCloseButtonRef,\n onLocationSelected: orgUnitLocation => {\n return Promise.resolve();\n }\n })\n .catch((error: Error) => {\n if (props.telemetry) {\n props.telemetry.error(error.message);\n props.telemetry.debug('Unable to set preferred store');\n }\n });\n }\n}\n\nexport default HeaderPreferredStore;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport * as Msdyn365 from '@msdyn365-commerce/core';\nimport { getPayloadObject, getTelemetryAttributes, ITelemetryContent, TelemetryConstant } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nexport interface ILogoProps {\n image: Msdyn365.IImageData;\n gridSettings?: Msdyn365.IGridSettings;\n link?: ILinkData;\n className?: string;\n telemetryContent?: ITelemetryContent;\n requestContext: Msdyn365.IRequestContext;\n typeName?: string;\n}\n\nexport interface ILinkData {\n linkUrl: Msdyn365.ILinkData;\n ariaLabel?: string;\n openInNewTab?: boolean;\n linkText?: string;\n}\n\n/**\n *\n * Logo component.\n * @extends {React.PureComponent}\n */\nexport class Logo extends React.PureComponent {\n private readonly attributes?: Msdyn365.IDictionary;\n\n constructor(props: ILogoProps) {\n super(props);\n const payLoad = getPayloadObject('click', props.telemetryContent!, TelemetryConstant.Logo);\n this.attributes = getTelemetryAttributes(props.telemetryContent!, payLoad);\n }\n\n public render(): JSX.Element {\n return
{this._renderLogo(this.props)}
;\n }\n\n private _renderLogo(config: ILogoProps): JSX.Element {\n if (config.link && config.link.linkUrl.destinationUrl) {\n return (\n \n {this._renderImage(config)}\n \n );\n }\n return this._renderImage(config);\n }\n\n private _renderImage(config: ILogoProps): JSX.Element {\n const defaultImageSettings: Msdyn365.IImageSettings = {\n viewports: {\n xs: { q: 'w=132&h=28&m=6', w: 0, h: 0 },\n lg: { q: 'w=160&h=48&m=6', w: 0, h: 0 }\n },\n lazyload: true\n };\n\n return (\n \n );\n }\n}\n\nexport default Logo;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport * as Msdyn365 from '@msdyn365-commerce/core';\nimport {\n Button,\n getPayloadObject,\n getTelemetryAttributes,\n ITelemetryContent,\n TelemetryConstant\n} from '@msdyn365-commerce-modules/utilities';\nimport { observer } from 'mobx-react';\nimport * as React from 'react';\n\nimport { IHeaderResources } from '../header.props.autogenerated';\n\nexport interface INavIconProps {\n resources: IHeaderResources;\n isExpanded: boolean;\n targetId: string;\n telemetryContent?: ITelemetryContent;\n toggleNavBar(): void;\n}\n\n/**\n *\n * NavIcon component.\n * @extends {React.PureComponent}\n */\n\n@observer\nexport class NavIcon extends React.PureComponent {\n private readonly attributes?: Msdyn365.IDictionary;\n\n constructor(props: INavIconProps) {\n super(props);\n const payLoad = getPayloadObject('click', props.telemetryContent!, TelemetryConstant.NavIcon);\n this.attributes = getTelemetryAttributes(props.telemetryContent!, payLoad);\n }\n\n public render(): JSX.Element {\n return (\n \n );\n }\n}\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { CartIconComponent, WishListIconComponent } from '@msdyn365-commerce/components';\nimport * as MsDyn365 from '@msdyn365-commerce/core';\nimport { ICartState } from '@msdyn365-commerce/global-state';\nimport { Customer } from '@msdyn365-commerce/retail-proxy';\nimport { ErrorNotification, NotificationsManager } from '@msdyn365-commerce-modules/notifications-core';\nimport { ArrayExtensions } from '@msdyn365-commerce-modules/retail-actions';\nimport {\n Button,\n format,\n getPayloadObject,\n getTelemetryAttributes,\n getTelemetryObject,\n IModuleProps,\n INodeProps,\n ITelemetryContent,\n KeyCodes,\n Modal,\n ModalBody,\n ModalHeader,\n onTelemetryClick,\n Popover,\n TelemetryConstant\n} from '@msdyn365-commerce-modules/utilities';\nimport classnames from 'classnames';\nimport { computed, reaction } from 'mobx';\nimport { observer } from 'mobx-react';\nimport * as React from 'react';\n\nimport { isChannelTypeB2B } from '@msdyn365-commerce/core';\nimport { HeaderPreferredStore, Logo, NavIcon } from './components';\nimport { IHeaderData } from './header.data';\nimport { IHeaderProps, IHeaderResources, IMyAccountLinksData } from './header.props.autogenerated';\n\nexport interface IHeaderState {\n mobileMenuCollapsed: boolean;\n signinPopoverOpen: boolean;\n hasSigninerror?: boolean;\n}\n\nexport interface IHeaderViewProps extends IHeaderProps, IHeaderState {\n logo: React.ReactNode;\n wishListIconDesktop: React.ReactNode;\n wishListIconMobile: React.ReactNode;\n cartIcon: React.ReactNode;\n navIcon: React.ReactNode;\n className: string;\n menuBar: React.ReactNode[];\n search: React.ReactNode[];\n siteOptions: React.ReactNode[];\n HeaderTag: IModuleProps;\n HeaderContainer: INodeProps;\n MobileMenuContainer: INodeProps;\n MobileMenuHeader: React.ReactNode;\n MobileMenuBodyContainer: INodeProps;\n MobileMenuLinksContainer: INodeProps;\n HeaderTopBarContainer: INodeProps;\n Divider: INodeProps;\n\n AccountInfoDropdownParentContainer?: INodeProps;\n AccountInfoDropdownPopoverConentContainer?: INodeProps;\n accountInfoDropdownButton?: React.ReactNode;\n\n signOutLink?: React.ReactNode;\n signInLink?: React.ReactNode;\n switchCustomerLink?: React.ReactNode;\n isOBORequest?: boolean;\n accountLinks?: React.ReactNode[];\n preferredStore?: React.ReactNode;\n currentDistributor?: React.ReactNode;\n}\n\n/**\n *\n * Header component.\n * @extends {React.PureComponent>}\n */\n@observer\nclass Header extends React.PureComponent, IHeaderState> {\n private readonly popOverRef: React.RefObject;\n\n private readonly telemetryContent: ITelemetryContent;\n\n private cart: ICartState | undefined;\n\n private isB2BSite: boolean = false;\n\n /**\n * The signed-in user name displayed in the header bar\n */\n @computed public get displayName(): Readonly {\n return (\n (MsDyn365.isOboRequest(this.props.context.request) ? this.workerName : this.customerName) ||\n this.props.context.request?.user?.name\n );\n }\n\n /**\n * OBO scenario. The name of worker who shops on behalf of customer.\n */\n @computed public get workerName(): Readonly {\n const worker = this.props.data.employee?.result;\n return worker?.Name;\n }\n\n @computed public get customerName(): Readonly {\n const customer = this.props.data.accountInformation?.result;\n if (MsDyn365.isOboRequest(this.props.context.request)) {\n // For OBO scenario, display full customer name because multiple customers may have the same first name.\n return customer ? customer.Name : undefined;\n } else {\n return customer ? customer.FirstName || customer.Name : undefined;\n }\n }\n\n public constructor(props: IHeaderProps) {\n super(props);\n this.popOverRef = React.createRef();\n this._toggleNavbar = this._toggleNavbar.bind(this);\n this._togglePopover = this._togglePopover.bind(this);\n this._keydown = this._keydown.bind(this);\n this.state = {\n mobileMenuCollapsed: true,\n signinPopoverOpen: false,\n hasSigninerror: false\n };\n this.telemetryContent = getTelemetryObject(\n this.props.context.request.telemetryPageName!,\n this.props.friendlyName,\n this.props.telemetry\n );\n this.isB2BSite = isChannelTypeB2B(this.props.context.request);\n }\n\n public componentDidMount(): void {\n if (MsDyn365.msdyn365Commerce.isBrowser) {\n window.addEventListener('keydown', this._keydown);\n }\n reaction(\n () => {\n this.props.data.cart.result;\n },\n () => {\n this.cart = this.props.data.cart.result;\n }\n );\n\n const {\n context: {\n request: { user }\n },\n resources: {\n signUpCustomerNotFoundTitle,\n signUpMultipleCustomerFoundTitle,\n signInCustomerNotAuthorizedTitle,\n closeNotificationLabel\n }\n } = this.props;\n\n const signinNotificationError = this._getSigninNotification(\n user,\n signUpMultipleCustomerFoundTitle,\n signUpCustomerNotFoundTitle,\n signInCustomerNotAuthorizedTitle\n );\n if (signinNotificationError !== undefined && this.state.hasSigninerror === false) {\n // For signup show simple error notification.\n NotificationsManager.instance().addNotification(new ErrorNotification(signinNotificationError, closeNotificationLabel));\n }\n }\n\n public componentWillUnmount(): void {\n if (MsDyn365.msdyn365Commerce.isBrowser) {\n window.removeEventListener('keydown', this._keydown, false);\n }\n }\n\n public render(): JSX.Element | null {\n const {\n id,\n typeName,\n data: { accountInformation, wishlists },\n context: {\n request: { user }\n },\n context,\n resources: { cartLabel, cartQtyLabel }\n } = this.props;\n const { logoLink, logoImage, shouldShowWishlistCount } = this.props.config;\n\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access -- app config is generic\n const disableTooltip = this.props.context.app.config.disableTooltip || false;\n const headerToggleClass = this.state.mobileMenuCollapsed ? '' : 'ms-header-open';\n const headerClassName = classnames('ms-header', this.props.config.className, headerToggleClass);\n const navbarKey = 'header-nav-mobile';\n const customer = accountInformation && accountInformation.result;\n const cartIconSlot = this._getSlot('cartIcon');\n const menuBarSlot = this._getSlot('menuBar');\n const searchSlot = this._getSlot('search');\n let wishlistCount = 0;\n const siteOptionsSlot = this._getSlot('siteOptions');\n const preferredStoreSlot = this._getSlot('storeSelector');\n const currentDistributorSlot = this._getSlot('distributorSelector');\n if (wishlists !== undefined) {\n if (\n !wishlists.result ||\n !ArrayExtensions.hasElements(wishlists.result) ||\n !wishlists.result[0].CommerceListLines ||\n !ArrayExtensions.hasElements(wishlists.result[0].CommerceListLines)\n ) {\n wishlistCount = 0;\n } else {\n wishlistCount = wishlists.result[0].CommerceListLines.length;\n }\n }\n const viewProps: IHeaderViewProps = {\n ...(this.props as IHeaderProps),\n ...this.state,\n logo: (\n \n ),\n wishListIconDesktop: (\n \n ),\n wishListIconMobile: (\n \n ),\n cartIcon: ArrayExtensions.hasElements(cartIconSlot) ? (\n cartIconSlot[0]\n ) : (\n \n ),\n navIcon: (\n \n ),\n menuBar: ArrayExtensions.hasElements(menuBarSlot) ? menuBarSlot : [],\n search: ArrayExtensions.hasElements(searchSlot) ? searchSlot : [],\n siteOptions: ArrayExtensions.hasElements(siteOptionsSlot) ? siteOptionsSlot : [],\n className: headerClassName,\n HeaderTag: {\n moduleProps: this.props,\n className: classnames(headerClassName),\n 'aria-label': this.props.resources.headerAriaLabel,\n tag: 'header'\n },\n HeaderContainer: {\n className: classnames('ms-header__container')\n },\n HeaderTopBarContainer: {\n className: classnames('ms-header__topbar')\n },\n Divider: {\n className: classnames('ms-header__divider')\n },\n MobileMenuContainer: {\n tag: Modal,\n id: navbarKey,\n className: 'ms-header__mobile-hamburger',\n isOpen: !this.state.mobileMenuCollapsed,\n wrapClassName: 'ms-header__modal',\n toggle: this._toggleNavbar\n },\n MobileMenuHeader: ,\n MobileMenuBodyContainer: {\n tag: ModalBody,\n className: 'ms-header__mobile-hamburger-menu-body'\n },\n MobileMenuLinksContainer: {\n className: 'ms-header__mobile-hamburger-menu-links'\n },\n AccountInfoDropdownParentContainer: {\n className: 'ms-header__account-info'\n },\n AccountInfoDropdownPopoverConentContainer: this.displayName\n ? {\n tag: Popover,\n id: 'myprofilePopover',\n className: 'ms-header__account-info-content',\n placement: 'bottom',\n isOpen: this.state.signinPopoverOpen,\n target: this.popOverRef,\n toggle: this._togglePopover\n }\n : undefined,\n signInLink: this._getSigninButton(user, this.props.resources),\n signOutLink: this._getSignOutButton(user, this.props.resources),\n isOBORequest: MsDyn365.isOboRequest(this.props.context.request),\n switchCustomerLink: this._getSwitchCustomerButton(user, this.props.resources),\n accountInfoDropdownButton: this._getAccountInfoDropdownButton(user, this.props.resources),\n accountLinks: this._getAccountLinks(customer),\n preferredStore: ArrayExtensions.hasElements(preferredStoreSlot) && ,\n currentDistributor: this.isB2BSite && ArrayExtensions.hasElements(currentDistributorSlot) ? currentDistributorSlot : undefined\n };\n\n return this.props.renderView(viewProps) as React.ReactElement;\n }\n\n /**\n * Handle link text change.\n * @param linkIndex - Link Index.\n * @returns : Void.\n */\n public handleLinkTextChange = (linkIndex: number) => (event: MsDyn365.ContentEditableEvent): void => {\n if (this.props.config.myAccountLinks?.[linkIndex]) {\n this.props.config.myAccountLinks[linkIndex].linkText = event.target.value;\n }\n };\n\n /**\n * Get the slot.\n * @param slotName - Name of the slot.\n * @returns The slot.\n */\n private _getSlot(slotName: string): React.ReactNode[] | null {\n const { slots } = this.props;\n return (slots && slots[slotName] && slots[slotName].length && slots[slotName]) || null;\n }\n\n /**\n * Renders the sign in button.\n * @param user - Request context user.\n * @param resources - Resources.\n * @returns React Node.\n */\n private _getSigninButton(user: MsDyn365.IRequestContextUser | undefined, resources: IHeaderResources): React.ReactNode | undefined {\n const payLoad = getPayloadObject('click', this.telemetryContent, TelemetryConstant.SignIn);\n const attributes = getTelemetryAttributes(this.telemetryContent, payLoad);\n return (\n !this.displayName && (\n \n \n {resources.signInLinkText}\n \n \n )\n );\n }\n\n /**\n * Renders the sign out button.\n * @param user - Request context user.\n * @param resources - Resources.\n * @returns React Node.\n */\n private _getSignOutButton(user: MsDyn365.IRequestContextUser | undefined, resources: IHeaderResources): React.ReactNode | undefined {\n const payLoad = getPayloadObject('click', this.telemetryContent, TelemetryConstant.SignOut);\n const attributes = getTelemetryAttributes(this.telemetryContent, payLoad);\n return (\n this.displayName && (\n \n \n {resources.signOutLinkText}\n \n \n )\n );\n }\n\n /**\n * Renders the sign out button.\n * @param user - Request context user.\n * @param resources - Resources.\n * @returns React Node.\n */\n private _getSwitchCustomerButton(\n user: MsDyn365.IRequestContextUser | undefined,\n resources: IHeaderResources\n ): React.ReactNode | undefined {\n const payLoad = getPayloadObject('click', this.telemetryContent, TelemetryConstant.SwitchCustomer);\n const attributes = getTelemetryAttributes(this.telemetryContent, payLoad);\n const isOBOAccountSelected =\n MsDyn365.isOboRequest(this.props.context.request) && this.props.context.request.cookies.getAccountSelectionCookie();\n return (\n this.displayName &&\n isOBOAccountSelected && (\n this.props.context.request.cookies.removeAccountSelectionCookie()}\n {...attributes}\n >\n
\n
{format(resources.shoppingAsText, this.customerName)}
\n
{resources.switchCustomerLinkText}
\n
\n \n )\n );\n }\n\n private getBusinessPartnerSelectionUrl(): string | undefined {\n const route = MsDyn365.getUrlSync('businessPartnerSelection', this.props.context.actionContext);\n if (!route || !MsDyn365.msdyn365Commerce.isBrowser) {\n return undefined;\n }\n\n // MsDyn365.getUrlSync persists some params in the route and remove other params.\n // Among the persisted params, we need to remove catalogid.\n const persistedParamToRemove = ['catalogid'];\n const url = new URL(route, window.location.href);\n persistedParamToRemove.forEach(param => url.searchParams.delete(param));\n return url.href;\n }\n\n private _getSigninNotification(\n user: MsDyn365.IRequestContextUser | undefined,\n signUpMultipleCustomerFoundTitle: string,\n signUpCustomerNotFoundTitle: string,\n signInCustomerNotAuthorizedTitle: string\n ): string | undefined {\n if (!user?.retailServerErrorCode) {\n return undefined;\n }\n\n const { signUpCustomerNotFound, signUpMultipleCustomerFound, signInCustomerNotAuthorized } = this.props.config;\n const notFoundError = 'Microsoft_Dynamics_Commerce_Runtime_CustomerNotFound_WhenAutoLinking';\n const multipleAccountError = 'Microsoft_Dynamics_Commerce_Runtime_MultipleCustomerAccountsFoundWithSameEmailAddress';\n const accountAuthorizationError = 'Microsoft_Dynamics_Commerce_Runtime_AuthorizationFailed';\n\n if (user?.retailServerErrorCode === notFoundError) {\n return signUpCustomerNotFound !== undefined ? signUpCustomerNotFound : signUpCustomerNotFoundTitle;\n } else if (user?.retailServerErrorCode === multipleAccountError) {\n return signUpMultipleCustomerFound !== undefined ? signUpMultipleCustomerFound : signUpMultipleCustomerFoundTitle;\n } else if (user?.retailServerErrorCode === accountAuthorizationError) {\n return signInCustomerNotAuthorized !== undefined ? signInCustomerNotAuthorized : signInCustomerNotAuthorizedTitle;\n }\n return user?.retailServerErrorMessage;\n }\n\n private _getAccountInfoDropdownButton(\n user: MsDyn365.IRequestContextUser | undefined,\n resources: IHeaderResources\n ): React.ReactNode | undefined {\n const payLoad = getPayloadObject('click', this.telemetryContent, TelemetryConstant.MyProfile);\n const attributes = getTelemetryAttributes(this.telemetryContent, payLoad);\n return (\n this.displayName && (\n \n
\n
{this.displayName}
\n {MsDyn365.isOboRequest(this.props.context.request) && this.customerName && (\n
{format(resources.shoppingAsText, this.customerName)}
\n )}\n
\n \n )\n );\n }\n\n private _getAccountLinks(customer: Customer | undefined): React.ReactNode[] | undefined {\n const { myAccountLinks } = this.props.config;\n const payLoad = getPayloadObject('click', this.telemetryContent, '');\n if (!this.displayName || !myAccountLinks || !ArrayExtensions.hasElements(myAccountLinks)) {\n return undefined;\n }\n return myAccountLinks.map((cta: IMyAccountLinksData, index: number) => {\n payLoad.contentAction.etext = cta.linkText;\n const attributes = getTelemetryAttributes(this.telemetryContent, payLoad);\n const editableLink: MsDyn365.ILinksData = {\n ariaLabel: cta.ariaLabel,\n className: 'ms-signin-info__account-link-button',\n linkText: cta.linkText,\n linkUrl: cta.linkUrl.destinationUrl,\n openInNewTab: cta.openInNewTab,\n role: 'link',\n additionalProperties: attributes\n };\n\n return (\n \n );\n });\n }\n\n private _toggleNavbar(): void {\n this.setState({\n mobileMenuCollapsed: !this.state.mobileMenuCollapsed\n });\n }\n\n private _togglePopover(): void {\n this.setState({\n signinPopoverOpen: !this.state.signinPopoverOpen\n });\n }\n\n private _keydown(event: KeyboardEvent): void {\n if (event.keyCode === KeyCodes.Escape) {\n this.setState({ mobileMenuCollapsed: true });\n }\n }\n}\n\nexport default Header;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { Module, Node } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport { IHeaderViewProps } from './header';\n\nconst headerView: React.FC = props => {\n const {\n HeaderTag,\n HeaderContainer,\n HeaderTopBarContainer,\n MobileMenuContainer,\n MobileMenuBodyContainer,\n MobileMenuLinksContainer,\n Divider\n } = props;\n return (\n \n \n \n {props.navIcon}\n {props.logo}\n {_renderReactFragment(props.search)}\n {props.preferredStore}\n {props.currentDistributor}\n {_renderDesktopAccountBlock(props)}\n {props.wishListIconDesktop}\n \n {props.cartIcon}\n {_renderReactFragment(props.siteOptions)}\n \n \n \n {props.MobileMenuHeader}\n {_renderReactFragment(props.menuBar)}\n \n {props.accountLinks ? props.accountLinks.map(link => link) : false}\n {props.siteOptions}\n {props.wishListIconMobile}\n {props.signInLink}\n {props.signOutLink}\n \n \n \n {_renderReactFragment(props.menuBar)}\n \n \n );\n};\n\nfunction _renderDesktopAccountBlock(props: IHeaderViewProps): JSX.Element | null {\n const {\n AccountInfoDropdownParentContainer,\n AccountInfoDropdownPopoverConentContainer,\n accountInfoDropdownButton,\n signOutLink,\n signInLink,\n accountLinks\n } = props;\n\n if (AccountInfoDropdownParentContainer) {\n if (AccountInfoDropdownPopoverConentContainer) {\n return (\n \n {accountInfoDropdownButton}\n \n {accountLinks ? accountLinks.map(link => link) : false}\n {signOutLink}\n \n \n );\n } else if (signInLink) {\n return {signInLink};\n }\n }\n props.context.telemetry.error('Header content is empty, module wont render.');\n return null;\n}\n\nfunction _renderReactFragment(items: React.ReactNode[]): JSX.Element | null {\n return (\n <>\n {items && items.length > 0\n ? items.map((slot: React.ReactNode, index: number) => {\n return {slot};\n })\n : null}\n \n );\n}\n\nexport default headerView;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { IImageData, IRequestContext, IVideoData } from '@msdyn365-commerce/core';\n\nexport enum MediaType {\n /**\n * The None.\n */\n None = 0,\n /**\n * The Image type.\n */\n Image = 1,\n /**\n * The video type.\n */\n Video = 2,\n /**\n * The file type.\n */\n File = 3\n}\n\nexport interface IMediaData extends IImageData {\n mediaTypeValue?: MediaType;\n displayOrder?: number;\n videoData?: IVideoData;\n}\n\n/**\n * Gets correct alt text for image based on configuration of site.\n * @param productName Product name.\n * @param context Current request context.\n * @param imageAltText Alt-text from CMS image.\n */\nexport function getAltText(\n context: IRequestContext,\n shouldUseCmsAltText: boolean,\n productName?: string,\n imageAltText?: string\n): string | undefined {\n if (!context?.app?.config?.OmniChannelMedia) {\n return productName;\n }\n if (shouldUseCmsAltText) {\n return imageAltText;\n }\n return productName;\n}\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport {\n commerceApiRequest,\n commerceVideoMetadataRequest,\n getCatalogId,\n IActionContext,\n IImageData,\n IImageSettings,\n IVideoData\n} from '@msdyn365-commerce/core';\nimport { MediaLocation, SimpleProduct } from '@msdyn365-commerce/retail-proxy';\nimport {\n ArrayExtensions,\n getMediaLocationsForSelectedVariant,\n MediaLocationsForSelectedVariantInput\n} from '@msdyn365-commerce-modules/retail-actions';\nimport { getAltText } from './helper';\n\nasync function validateMediaLocationAsync(mediaLocation: MediaLocation): Promise<[IImageData, boolean]> {\n const imageData: IImageData = {\n src: mediaLocation.Uri || '',\n altText: mediaLocation.AltText || ''\n };\n if (mediaLocation.IsApplicableForChildEntities) {\n imageData.additionalProperties = { isApplicableForChildEntities: 'true' };\n }\n\n if (imageData.src === '') {\n return [imageData, false];\n }\n\n return new Promise<[IImageData, boolean]>(resolve => {\n try {\n const http = new XMLHttpRequest();\n http.open('HEAD', imageData.src!, true);\n\n http.addEventListener('load', () => {\n resolve([imageData, http.status === 200 || http.status === 201]);\n });\n\n http.addEventListener('error', () => {\n resolve([imageData, false]);\n });\n\n http.send();\n } catch {\n resolve([imageData, false]);\n }\n });\n}\n\nexport async function getValidProductImages(\n productId: number,\n channelId: number,\n actionContext: IActionContext,\n imageSettings: IImageSettings,\n selectedProduct?: SimpleProduct\n): Promise {\n const catalogId = getCatalogId(actionContext.requestContext);\n const actionInput = new MediaLocationsForSelectedVariantInput(productId, channelId, selectedProduct, catalogId);\n\n return getMediaLocationsForSelectedVariant(actionInput, actionContext)\n .then(mediaLocations => {\n if (mediaLocations) {\n return Promise.all(mediaLocations.map(mediaLocation => validateMediaLocationAsync(mediaLocation))).then(pairs => {\n return pairs.filter(pair => pair[1]).map(pair => pair[0]);\n });\n }\n\n return [];\n })\n .catch(error => {\n actionContext.telemetry.exception(error);\n actionContext.telemetry.debug('Unable to get Media Locations for Selected Variant');\n return [];\n });\n}\n\n/**\n * Gets product variant images on dimension change of buy-box module for Omni scenario.\n * @param productId Product record id.\n * @param shouldUseCmsAltText Alt-text source to use.\n * @param channelId Current channel id.\n * @param actionContext Current action context.\n * @param productName Product name.\n * @param selectedProduct Currently selected variant product.\n * @returns List of images.\n */\n\nexport async function getProductImages(\n productId: number,\n shouldUseCmsAltText: boolean,\n channelId: number,\n actionContext: IActionContext,\n productName?: string,\n selectedProduct?: SimpleProduct\n): Promise {\n const catalogId = getCatalogId(actionContext.requestContext);\n if (actionContext.requestContext?.params?.isPreview) {\n const response = await commerceApiRequest(actionContext.requestContext, 'msdyn365-ochannel-product-info', 'post', {\n productId: productId,\n channelId: channelId,\n catalogId: catalogId\n });\n if (response.status !== 200) {\n actionContext.telemetry.debug('Unable to get Media Locations for Selected Variant for preview scenario');\n return [];\n }\n const previewImageData = response?.data as MediaLocation[];\n if (previewImageData) {\n return previewImageData.map(mediaLocation => {\n return {\n src: mediaLocation.Uri ?? '',\n altText: getAltText(actionContext.requestContext, shouldUseCmsAltText, productName, mediaLocation.AltText),\n displayOrder: mediaLocation.DisplayOrder,\n mediaTypeValue: mediaLocation.MediaTypeValue,\n additionalProperties: mediaLocation.IsApplicableForChildEntities\n ? {\n isApplicableForChildEntities: 'true'\n }\n : undefined\n };\n });\n }\n return [];\n }\n const actionInput = new MediaLocationsForSelectedVariantInput(productId, channelId, selectedProduct, catalogId);\n return getMediaLocationsForSelectedVariant(actionInput, actionContext)\n .then(mediaLocations => {\n if (mediaLocations) {\n return mediaLocations.map(mediaLocation => {\n return {\n src: mediaLocation.Uri ?? '',\n altText: getAltText(actionContext.requestContext, shouldUseCmsAltText, productName, mediaLocation.AltText),\n displayOrder: mediaLocation.DisplayOrder,\n mediaTypeValue: mediaLocation.MediaTypeValue,\n additionalProperties: mediaLocation.IsApplicableForChildEntities\n ? {\n isApplicableForChildEntities: 'true'\n }\n : undefined\n };\n });\n }\n return [];\n })\n .catch(error => {\n actionContext.telemetry.exception(error);\n actionContext.telemetry.debug('Unable to get Media Locations for Selected Variant');\n return [];\n });\n}\n\nexport async function validateProductImages(\n mediaLocations: MediaLocation[],\n actionContext: IActionContext,\n imageSettings: IImageSettings\n): Promise {\n return Promise.all(mediaLocations.map(mediaLocation => validateMediaLocationAsync(mediaLocation)))\n .then(pairs => {\n return pairs.filter(pair => pair[1]).map(pair => pair[0]);\n })\n .catch(error => {\n actionContext.telemetry.exception(error);\n actionContext.telemetry.debug('Unable to validate product images');\n return [];\n });\n}\n\n/**\n * GetVideoMetadataFromAPI - Makes API call to get video metadata.\n * @param videoId: Video Id\n * @param actionContext: Action context\n * @returns: Returns the meta data of the video.\n */\nexport async function getVideoMetadataFromApi(videoId: string, actionContext: IActionContext): Promise {\n let videoPlayerData: IVideoData | undefined;\n if (videoId) {\n const response = await commerceVideoMetadataRequest(actionContext.requestContext, [videoId]);\n\n if (response.status !== 200) {\n actionContext.telemetry.debug(`Unable to get video metadata for videoId: ${videoId}`);\n return;\n }\n\n const videoData = response.data as [];\n if (videoData && ArrayExtensions.hasElements(videoData)) {\n videoPlayerData = videoData[0];\n }\n }\n return videoPlayerData;\n}\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { Carousel, ICarouselProps, Player, IPlayerData, IPlayerOptions, IVideoMetadata } from '@msdyn365-commerce/components';\nimport { IImageData, IImageSettings, Image, Video } from '@msdyn365-commerce/core';\nimport { MediaLocation, MediaType, SimpleProduct } from '@msdyn365-commerce/retail-proxy';\nimport { ArrayExtensions, getFallbackImageUrl, ObjectExtensions } from '@msdyn365-commerce-modules/retail-actions';\nimport {\n defaultDataScale,\n IComponentNodeProps,\n ImagefullView,\n IModalViewProps,\n IModuleProps,\n inlineZoomImageOnHover,\n inlineZoomImageOnMouseMove,\n inlineZoomImageOnMouseOut,\n inlineZoomInitClick,\n INodeProps,\n ISingleSlideCarouselProps,\n isMobile,\n KeyCodes,\n NodeTag,\n onContainerZoomInit,\n onMouseMoveLensContainer,\n onMouseOutLensContainer,\n onMouseOverImageContainer,\n removeContainerZoomStyle,\n removeInlineZoomStyle,\n SingleSlideCarousel,\n VariantType\n} from '@msdyn365-commerce-modules/utilities';\nimport classnames from 'classnames';\nimport { reaction } from 'mobx';\nimport * as React from 'react';\n\nimport { IMediaGalleryData } from './media-gallery.data';\nimport { imageSource, imageZoom, IMediaGalleryProps, thumbnailsOrientation } from './media-gallery.props.autogenerated';\nimport { getProductImages, getValidProductImages, getVideoMetadataFromApi, validateProductImages } from './utils';\nimport { getAltText, IMediaData } from './utils/helper';\n\n/**\n * IMediaGalleryState Interface.\n */\nexport interface IMediaGalleryState {\n animating: boolean;\n activeIndex: number;\n isImageZoomed: boolean;\n modalIsOpen: boolean;\n lastUpdate?: number;\n isMobileImageZoomed?: boolean;\n mediaGalleryItems?: IMediaData[];\n isInitialLoad?: boolean;\n shouldUseOptimizedImage?: boolean;\n}\n\n/**\n * IMediaGalleryThumbnailsViewProps Interface.\n */\nexport interface IMediaGalleryThumbnailsViewProps {\n ThumbnailsContainerProps: INodeProps;\n SingleSlideCarouselComponentProps: INodeProps;\n items?: IMediaGalleryThumbnailItemViewProps[];\n}\n\n/**\n * IMediaGalleryThumbnailItemViewProps Interface.\n */\nexport interface IMediaGalleryThumbnailItemViewProps {\n ThumbnailItemContainerProps: INodeProps;\n Picture: React.ReactElement;\n}\n\n/**\n * IMediaGalleryViewProps Interface.\n */\nexport interface IMediaGalleryViewProps extends IMediaGalleryProps {\n state: IMediaGalleryState;\n MediaGallery: IModuleProps;\n CarouselProps: INodeProps;\n Thumbnails: IMediaGalleryThumbnailsViewProps;\n Modal?: React.ReactElement | null;\n callbackToggle?(): void;\n callbackThumbnailClick?(index: number): void;\n callbackThumbnailKeyDown?(index: number): void;\n}\n\n/**\n * Props for carousel.\n */\ninterface IMediaGalleryCarouselItems {\n items: ItemType[];\n keys: (string | undefined)[];\n}\n\n/**\n * Media gallery component.\n */\nclass MediaGallery extends React.Component, IMediaGalleryState> {\n private readonly _inlineZoomDivRef: Map = new Map();\n\n private readonly fullScreenOverlayButtonRef: React.RefObject = React.createRef();\n private readonly player: React.RefObject = React.createRef();\n private fallbackImage?: string;\n\n private readonly defaultGalleryImageSettings: IImageSettings = {\n viewports: {\n xs: { q: 'w=767&h=767&m=8', w: 0, h: 0 },\n sm: { q: 'w=600&h=600&m=8', w: 0, h: 0 },\n md: { q: 'w=600&h=772&m=8', w: 0, h: 0 },\n lg: { q: 'h=772&m=8', w: 0, h: 0 }\n },\n lazyload: true,\n cropFocalRegion: true\n };\n\n private readonly defaultThumbnailImageSettings: IImageSettings = {\n viewports: {\n xs: { q: 'w=100&m=8', w: 100, h: 0 },\n lg: { q: 'w=100&m=8', w: 100, h: 0 }\n },\n lazyload: true,\n cropFocalRegion: true\n };\n\n private readonly _zoomedImageSettings: IImageSettings;\n\n public constructor(props: IMediaGalleryProps) {\n super(props);\n this._toggleModal = this._toggleModal.bind(this);\n const mediaGalleryImages = this.getImagesData();\n this.state = {\n activeIndex: 0,\n animating: false,\n isImageZoomed: false,\n modalIsOpen: false,\n isInitialLoad: true,\n shouldUseOptimizedImage: !!this.props.config.skipImageValidation,\n mediaGalleryItems: mediaGalleryImages\n };\n\n this._zoomedImageSettings =\n props.config.zoomedImageSettings ?? props.config.galleryImageSettings ?? this.defaultGalleryImageSettings;\n\n this._onImageMouseOut = this._onImageMouseOut.bind(this);\n this._inlineZoomImageOnHover = this._inlineZoomImageOnHover.bind(this);\n this._onInlineImageClick = this._onInlineImageClick.bind(this);\n this._onContainerZoomImageClick = this._onContainerZoomImageClick.bind(this);\n this._onMouseOutLensContainer = this._onMouseOutLensContainer.bind(this);\n }\n\n public isMobile(): boolean {\n const size = isMobile({ variant: VariantType.Viewport, context: this.props.context.request });\n return size === 'xs';\n }\n\n public async componentDidMount(): Promise {\n const source = this.props.config.imageSource ?? imageSource.pageContext;\n const shouldUpdateOnPartialDimensionSelection = this.props.config.shouldUpdateOnPartialDimensionSelection;\n this._setRenderType();\n if (!this.props.context.request.app?.config?.OmniChannelMedia) {\n if (source === imageSource.pageContext) {\n if (this.state.mediaGalleryItems === undefined && this.props.data.mediaLocationsForSelectedVariant.result) {\n const images = await validateProductImages(\n this.props.data.mediaLocationsForSelectedVariant.result,\n this.props.context.actionContext,\n this.props.config.thumbnailImageSettings ?? this.defaultThumbnailImageSettings\n );\n await this._setImages(images);\n } else if (this.state.mediaGalleryItems === undefined && this.props.data.product.result) {\n const product = this.props.data.product.result;\n const images = await getValidProductImages(\n product.RecordId,\n +this.props.context.request.apiSettings.channelId,\n this.props.context.actionContext,\n this.props.config.thumbnailImageSettings ?? this.defaultThumbnailImageSettings,\n product.productVariant\n );\n\n await this._setImages(images);\n } else {\n await this._setImages([]);\n }\n }\n }\n\n reaction(\n () => {\n const product = this.props.data.product.result;\n if (!product) {\n return null;\n }\n\n if (!shouldUpdateOnPartialDimensionSelection || !product.productVariant?.RecordId) {\n return `${product.RecordId}`;\n }\n\n return `${product.RecordId}-${product.productVariant.RecordId}`;\n },\n async () => {\n const product = this.props.data.product.result;\n let images: IImageData[] = [];\n if (product) {\n if (this.props.context.app?.config?.OmniChannelMedia) {\n images = await getProductImages(\n product.RecordId,\n this.shouldUseCmsAltText(),\n +this.props.context.request.apiSettings.channelId,\n this.props.context.actionContext,\n product.Name,\n shouldUpdateOnPartialDimensionSelection ? product.productVariant : undefined\n );\n } else {\n images = await getValidProductImages(\n product.RecordId,\n +this.props.context.request.apiSettings.channelId,\n this.props.context.actionContext,\n this.props.config.thumbnailImageSettings ?? this.defaultThumbnailImageSettings,\n shouldUpdateOnPartialDimensionSelection ? product.productVariant : undefined\n );\n }\n await this._setImages(images);\n } else {\n await this._setImages([]);\n }\n },\n { fireImmediately: true }\n );\n\n if (source === imageSource.productId && this.props.data.mediaLocations.result) {\n const images = await validateProductImages(\n this.props.data.mediaLocations.result,\n this.props.context.actionContext,\n this.props.config.thumbnailImageSettings ?? this.defaultThumbnailImageSettings\n );\n await this._setImages(images);\n }\n }\n\n public shouldComponentUpdate(nextProps: IMediaGalleryProps, nextState: IMediaGalleryState): boolean {\n if (this.state === nextState && this.props.data === nextProps.data) {\n return false;\n }\n return true;\n }\n\n public render(): JSX.Element {\n const { id, config, resources } = this.props;\n\n const { className, showPaginationTooltip } = config;\n\n const isVertical: boolean = config.thumbnailsOrientation === thumbnailsOrientation.vertical;\n // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing -- || is required.\n const isFullscreenAllowed: boolean = this.isMobile() || config.allowFullScreen || false;\n const zoomViewMode: string =\n config.imageZoom === imageZoom.inline ? imageZoom.inline : config.imageZoom === imageZoom.container ? imageZoom.container : '';\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access -- Site level config can be of any type.\n const emptyPlaceHolderImage = this.props.context.app.config?.placeholderImageName as string;\n if (this.props.data.product.result) {\n this.fallbackImage = getFallbackImageUrl(\n this.props.data.product.result.ItemId,\n this.props.context.request.apiSettings,\n this.props.context.request.app?.config?.OmniChannelMedia\n );\n }\n if (emptyPlaceHolderImage && this.fallbackImage) {\n this.fallbackImage = `${this.fallbackImage},${emptyPlaceHolderImage}`;\n }\n\n const mediaGalleryCarouselItems = this._getMediaGalleryItems(isFullscreenAllowed, zoomViewMode);\n const mediaGalleryThumbnailCarouselItems = this._getMediaGalleryThumbnailItems();\n const viewProps: IMediaGalleryViewProps = {\n ...(this.props as IMediaGalleryProps),\n state: this.state,\n MediaGallery: {\n moduleProps: this.props,\n className: classnames(`ms-media-gallery ${isVertical ? 'vertical' : ''}`, className)\n },\n Modal: isFullscreenAllowed ? this.imageModalSlider(zoomViewMode) : null,\n callbackToggle: this.openModalDialog,\n callbackThumbnailClick: this._generateOnThumbnailClick,\n callbackThumbnailKeyDown: this._generateOnThumbnailKeyDown,\n CarouselProps: {\n tag: Carousel,\n className: 'ms-media-gallery__carousel',\n items: mediaGalleryCarouselItems.items,\n activeIndex: this.state.activeIndex,\n next: this.next,\n previous: this.previous,\n interval: false,\n directionTextPrev: resources.previousScreenshotFlipperText,\n directionTextNext: resources.nextScreenshotFlipperText,\n onIndicatorsClickHandler: this.goToIndex,\n showPaginationTooltip: showPaginationTooltip === true,\n indicatorAriaText: resources.ariaLabelForSlide,\n handleOnExited: this.onExited,\n handleOnExiting: this.onExiting,\n key: mediaGalleryCarouselItems.keys\n } as IComponentNodeProps,\n Thumbnails: {\n ThumbnailsContainerProps: { className: 'ms-media-gallery__thumbnails-container' },\n SingleSlideCarouselComponentProps: {\n tag: SingleSlideCarousel,\n className: 'ms-media-gallery__thumbnails',\n vertical: isVertical,\n flipperPrevLabel: resources.previousScreenshotFlipperText,\n flipperNextLabel: resources.nextScreenshotFlipperText,\n parentId: id,\n useTabList: true,\n key: JSON.stringify(mediaGalleryThumbnailCarouselItems.keys)\n } as IComponentNodeProps,\n items: mediaGalleryThumbnailCarouselItems.items\n }\n };\n\n return this.props.renderView(viewProps) as React.ReactElement;\n }\n\n /**\n * Zoomed out image on previous/next click.\n */\n public updateZoomedInImage(): void {\n this.setState({ isImageZoomed: false });\n }\n\n private readonly onExiting = () => {\n this.setState({ animating: true });\n };\n\n private readonly onExited = () => {\n this.setState({ animating: false });\n };\n\n /**\n * On click next in carousel.\n */\n private readonly next = (): void => {\n removeInlineZoomStyle();\n if (this.isLastItem() === undefined) {\n return;\n }\n\n const nextIndex = this.isLastItem() ? 0 : this.state.activeIndex + 1;\n this.goToIndex(nextIndex);\n\n this.updateZoomedInImage();\n };\n\n /**\n * On click previous in carousel.\n */\n private readonly previous = (): void => {\n removeInlineZoomStyle();\n const images = this.state.mediaGalleryItems;\n const nextIndex = this.isFirstItem() ? (images ? images.length - 1 : 0) : this.state.activeIndex - 1;\n this.goToIndex(nextIndex);\n this.updateZoomedInImage();\n };\n\n private readonly goToIndex = (index: number): void => {\n const { autoplay } = this.props.config;\n const currentIndex = this.state.activeIndex;\n const mediaItems = this.state.mediaGalleryItems;\n if (autoplay && mediaItems) {\n if (mediaItems[`${index}`]?.mediaTypeValue === MediaType.Video) {\n this.player.current?.play();\n } else if (mediaItems[`${currentIndex}`].mediaTypeValue === MediaType.Video) {\n this.player.current?.pause();\n }\n }\n this.setState({ activeIndex: index });\n };\n\n private _getMediaGalleryThumbnailItems(): IMediaGalleryCarouselItems {\n const mediaGalleryItems = this.state.mediaGalleryItems;\n const thumbnailImageSettings = this.props.config.thumbnailImageSettings;\n if (thumbnailImageSettings) {\n thumbnailImageSettings.cropFocalRegion = true;\n }\n\n const hasMediaGalleryItems = ArrayExtensions.hasElements(mediaGalleryItems);\n\n if (!hasMediaGalleryItems) {\n if (this.state.lastUpdate) {\n const defaultKey = 0;\n return {\n items: [this._getEmptyThumbnailItem(thumbnailImageSettings, defaultKey, this.state.activeIndex)],\n keys: ['empty']\n };\n }\n return { items: [], keys: [] };\n }\n\n return {\n items: [\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion\n ...mediaGalleryItems!.map((item: IMediaData, index: number) => {\n if (item.mediaTypeValue === MediaType.Video) {\n return this.getVideoThumbNailItem(\n item,\n thumbnailImageSettings ?? this.defaultThumbnailImageSettings,\n index,\n this.state.activeIndex\n );\n } else {\n return this._getThumbnailItem(\n item,\n thumbnailImageSettings ?? this.defaultThumbnailImageSettings,\n index,\n this.state.activeIndex\n );\n }\n })\n ],\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion\n keys: [...mediaGalleryItems!.map(item => item.src)]\n };\n }\n\n private getImagesData = (): IImageData[] => {\n if (this.props.config.skipImageValidation || this.props.context.request.app?.config?.OmniChannelMedia) {\n const source = this.props.config.imageSource ?? imageSource.pageContext;\n let images: IImageData[] = [];\n let mediaLocations: MediaLocation[] = [];\n if (source === imageSource.pageContext && this.props.data.mediaLocationsForSelectedVariant.result) {\n mediaLocations = this.props.data.mediaLocationsForSelectedVariant.result;\n } else if (source === imageSource.productId && this.props.data.mediaLocations.result) {\n mediaLocations = this.props.data.mediaLocations.result;\n }\n images = mediaLocations.map(mediaLocation => {\n return {\n src: mediaLocation.Uri ?? '',\n altText: getAltText(\n this.props.context.actionContext.requestContext,\n this.shouldUseCmsAltText(),\n this.props.data.product.result?.Name,\n mediaLocation.AltText\n ),\n additionalProperties: mediaLocation.IsApplicableForChildEntities\n ? {\n isApplicableForChildEntities: 'true'\n }\n : undefined\n };\n });\n const curatedImages = this.props.config.images ?? [];\n\n return [...this._filterMasterImageFromVariant(images), ...curatedImages];\n }\n return [];\n };\n\n private _getMediaGalleryItems(isFullscreenAllowed: boolean, zoomViewMode: string): IMediaGalleryCarouselItems {\n const mediaGalleryItems = this.state.mediaGalleryItems;\n const galleryImageSettings = this.props.config.galleryImageSettings;\n if (galleryImageSettings) {\n galleryImageSettings.cropFocalRegion = true;\n }\n\n const zoomView = isFullscreenAllowed ? 'fullscreen' : zoomViewMode;\n\n const hasMediaGalleryItems = ArrayExtensions.hasElements(mediaGalleryItems);\n\n if (!hasMediaGalleryItems) {\n if (this.state.lastUpdate) {\n return { items: [this._renderEmptyImage(galleryImageSettings)], keys: ['empty'] };\n }\n return { items: [], keys: [] };\n }\n\n return {\n items: [\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion\n ...mediaGalleryItems!.map((item: IMediaData, index: number) => {\n return this._renderCarouselItemImageView(\n zoomView,\n item,\n galleryImageSettings ?? this.defaultGalleryImageSettings,\n index\n );\n })\n ],\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion\n keys: [...mediaGalleryItems!.map(item => item.src)]\n };\n }\n\n private async _setImages(images?: IMediaData[]): Promise {\n const curatedImage = this.props.config.images || [];\n const mediaToSet: IMediaData[] = this._filterMasterImageFromVariant(images);\n\n void Promise.all(\n mediaToSet.map(async mediaData => {\n if (mediaData.mediaTypeValue === MediaType.Video && mediaData.src) {\n try {\n const url = new URL(mediaData.src);\n const videoId = url.searchParams.get('CVID');\n if (videoId) {\n mediaData.videoData = await getVideoMetadataFromApi(videoId, this.props.context.actionContext);\n }\n } catch (error) {\n if (this.props.telemetry) {\n this.props.telemetry.debug('Error while fetching videoId');\n }\n }\n }\n return mediaData;\n })\n ).then(mediaData => {\n const mediaItems = mediaData.filter(element => {\n return (\n element.mediaTypeValue !== MediaType.Video ||\n (element.mediaTypeValue === MediaType.Video && element.videoData !== undefined)\n );\n });\n\n this.setState({\n mediaGalleryItems: [...mediaItems, ...curatedImage],\n activeIndex: 0,\n lastUpdate: Date.now(),\n shouldUseOptimizedImage: false\n });\n });\n\n this.setState({\n mediaGalleryItems: [...mediaToSet, ...curatedImage],\n activeIndex: 0,\n lastUpdate: Date.now(),\n shouldUseOptimizedImage: false\n });\n }\n\n private _setRenderType(): void {\n this.setState({\n isInitialLoad: false\n });\n }\n\n private _renderCarouselItemImageView(\n zoomView: string,\n media: IMediaData,\n imageSettings: IImageSettings,\n index: number,\n isInPopup: boolean = false\n ): React.ReactNode {\n if (media.mediaTypeValue === MediaType.Video) {\n if (isInPopup || zoomView !== 'fullscreen') {\n return <>{this._renderCarouselItemVideo(media, index, imageSettings)};\n }\n return <>{this._renderVideoThumbnail(media, index, imageSettings)};\n } else {\n if (this.isMobile()) {\n if (isInPopup) {\n return this._renderImageInContainerOnZoom(media, this._zoomedImageSettings, index);\n }\n return this._renderImageFullScreenOnZoom(media, imageSettings, index);\n }\n\n switch (zoomView) {\n case 'container': {\n return this._renderImageInContainerOnZoom(media, this._zoomedImageSettings, index);\n }\n case 'inline': {\n return this._renderImageInlineOnZoom(media, this._zoomedImageSettings, index);\n }\n case 'fullscreen': {\n return this._renderImageFullScreenOnZoom(media, imageSettings, index);\n }\n\n // No default\n }\n return <>{this._getCarouselItem(media, imageSettings, index, isInPopup)};\n }\n }\n\n private _filterMasterImageFromVariant(images?: IImageData[]): IImageData[] {\n const shouldHidePrimaryImages = this.props.config.shouldHideMasterProductImagesForVariant ?? true;\n let variantImages = images ?? [];\n const isVariantProduct =\n !ObjectExtensions.isNullOrUndefined(this.props.data.product.result?.MasterProductId) ||\n !ObjectExtensions.isNullOrUndefined(this.props.data.product.result?.productVariant);\n const itemId = this.props.data.product.result?.ItemId;\n if (shouldHidePrimaryImages && isVariantProduct && itemId) {\n variantImages = variantImages.filter(item => {\n const isApplicableForChildEntities = item.additionalProperties?.isApplicableForChildEntities;\n return !isApplicableForChildEntities;\n });\n if (!ArrayExtensions.hasElements(variantImages)) {\n variantImages = images ?? [];\n }\n }\n return variantImages;\n }\n\n private readonly _renderCarouselItemVideo = (mediaData: IMediaData, index: number, imageSettings: IImageSettings): React.ReactNode => {\n const videoData = mediaData.videoData;\n if (videoData) {\n const options: IPlayerOptions = this.props.config as IPlayerOptions;\n const playerResources = this.props.resources;\n const videoMetaData: IVideoMetadata = {};\n videoMetaData.videoId = videoData.id;\n videoMetaData.title = videoData.title;\n videoMetaData.duration = videoData.playTime;\n if (videoData.thumbnail) {\n videoMetaData.posterframeUrl = videoData.thumbnail.src;\n }\n if (videoData._links?.binaryReferences) {\n videoMetaData.videoBinaryReferences = videoData._links.binaryReferences;\n }\n const videoPlayerData: IPlayerData = { options, metaData: videoMetaData };\n const attributes = {\n id: `${this.props.id}__carousel-item__${index}`\n };\n return (\n \n );\n }\n return this._renderEmptyImage(imageSettings);\n };\n\n private readonly _getCarouselItem = (\n image: IImageData,\n imageSettings: IImageSettings,\n index: number,\n isInPopup: boolean = false\n ): React.ReactNode => (\n \n );\n\n private readonly _getThumbnailItem = (\n image: IImageData,\n imageSettings: IImageSettings,\n index: number,\n modifiedActiveIndex: number\n ): IMediaGalleryThumbnailItemViewProps => {\n const classes = classnames(\n 'ms-media-gallery__thumbnail-item',\n modifiedActiveIndex === index ? 'ms-media-gallery__thumbnail-item-active' : ''\n );\n\n return {\n ThumbnailItemContainerProps: {\n tag: 'li' as NodeTag,\n className: classes,\n role: 'tab',\n tabIndex: 0,\n key: index,\n 'aria-label': image.altText,\n 'aria-selected': modifiedActiveIndex === index,\n onClick: this._generateOnThumbnailClick(index),\n onKeyDown: this._generateOnThumbnailKeyDown(index)\n },\n Picture: (\n \n )\n };\n };\n\n /**\n * Gets the video thumbnail item to display media gallery.\n * @param props - The Media gallery view props from business layer.\n * @returns Return thumbnail view props which will be used to render video.\n */\n private readonly getVideoThumbNailItem = (\n mediaData: IMediaData,\n imageSettings: IImageSettings,\n index: number,\n modifiedActiveIndex: number\n ): IMediaGalleryThumbnailItemViewProps => {\n const classes = classnames(\n 'ms-media-gallery__thumbnail-item',\n modifiedActiveIndex === index ? 'ms-media-gallery__thumbnail-item-active' : ''\n );\n\n const videoData = mediaData.videoData;\n let image: IImageData;\n if (videoData?.thumbnail) {\n image = videoData.thumbnail;\n } else {\n image = {\n src: 'empty'\n };\n }\n\n return {\n ThumbnailItemContainerProps: {\n tag: 'li' as NodeTag,\n className: classes,\n role: 'tab',\n tabIndex: 0,\n key: index,\n 'aria-label': image.altText,\n 'aria-selected': modifiedActiveIndex === index,\n onClick: this._generateOnThumbnailClick(index),\n onKeyDown: this._generateOnThumbnailKeyDown(index)\n },\n Picture: (\n \n )\n };\n };\n\n /**\n * Ref Handler.\n * @param index -Remove item click function.\n * @returns Set inline zoom.\n */\n private readonly _refHandler = (index: number) => (divRef: HTMLDivElement) => {\n this._inlineZoomDivRef.set(index, divRef);\n };\n\n private readonly _generateOnThumbnailKeyDown = (index: number) => {\n return (event: React.KeyboardEvent) => {\n if (event.which === KeyCodes.Enter || event.which === KeyCodes.Space) {\n event.preventDefault();\n\n this.goToIndex(index);\n }\n };\n };\n\n private readonly _generateOnThumbnailClick = (index: number) => {\n return (event: React.MouseEvent) => {\n event.preventDefault();\n\n this.goToIndex(index);\n };\n };\n\n private _renderImageInlineOnZoom(image: IImageData, imageSettings: IImageSettings, index: number): React.ReactNode {\n return (\n \n \n \n
\n );\n }\n\n private _inlineZoomImageOnHover(event: React.MouseEvent): void {\n inlineZoomImageOnHover(event, this.props.config.dataScale ?? String(defaultDataScale));\n }\n\n private _handleMobileViewZoomedImageClick(event: React.MouseEvent) {\n const target = this.state.shouldUseOptimizedImage ? (event.target as HTMLImageElement) : event.currentTarget;\n const mobileZoomedInImageClassName = 'msc-mobile-zoomed-in';\n if (!this.state.isMobileImageZoomed) {\n const bounds = target.getBoundingClientRect();\n const dataScale = Number(this.props.config.dataScale ?? defaultDataScale);\n\n const positionX = event.clientX - bounds.left;\n const positionY = event.clientY - bounds.top;\n const scaledPositionX = positionX * dataScale;\n const scaledPositionY = positionY * dataScale;\n\n target.style.transform = `scale(${dataScale})`;\n target.classList.add(mobileZoomedInImageClassName);\n target.parentElement!.style.overflow = 'auto';\n target.parentElement!.scrollTo(scaledPositionX - positionX, scaledPositionY - positionY);\n this.setState({\n isMobileImageZoomed: true\n });\n } else {\n target.style.transform = '';\n target.classList.remove(mobileZoomedInImageClassName);\n target.parentElement!.style.overflow = '';\n this.setState({\n isMobileImageZoomed: false\n });\n }\n }\n\n private _onInlineImageClick(event: React.MouseEvent): void {\n if (window.innerWidth <= 768) {\n // $msv-breakpoint-m\n this._handleMobileViewZoomedImageClick(event);\n return;\n }\n inlineZoomInitClick(event, this.props.config.dataScale ?? String(defaultDataScale));\n this.setState({\n isImageZoomed: true\n });\n }\n\n private _onImageMouseOut(event: React.MouseEvent): void {\n inlineZoomImageOnMouseOut(event);\n this.setState({\n isImageZoomed: false\n });\n }\n\n private _onContainerZoomImageClick(event: React.MouseEvent): void {\n if (window.innerWidth <= 768) {\n // $msv-breakpoint-m\n this._handleMobileViewZoomedImageClick(event);\n return;\n }\n\n onContainerZoomInit(event);\n\n this.setState({\n isImageZoomed: true\n });\n }\n\n private _onMouseOutLensContainer(event: React.MouseEvent): void {\n onMouseOutLensContainer(event);\n\n this.setState({\n isImageZoomed: false\n });\n }\n\n private _renderImageInContainerOnZoom(image: IImageData, imageSettings: IImageSettings, index: number): React.ReactNode {\n return (\n
\n \n \n
\n );\n }\n\n private _renderImageFullScreenOnZoom(image: IImageData, imageSettings: IImageSettings, index: number): React.ReactNode {\n return (\n
\n \n
\n {}\n \n
\n
\n );\n }\n\n /**\n * Render the video thumbnail in full screen.\n * @param mediaData - Media Data.\n * @param index - Index\n * @param imageSettings - Image settings.\n * @returns - JSX.Element\n */\n private readonly _renderVideoThumbnail = (mediaData: IMediaData, index: number, imageSettings: IImageSettings): React.ReactNode => {\n const videoData = mediaData.videoData;\n let image: IImageData;\n if (videoData?.thumbnail) {\n image = videoData.thumbnail;\n } else {\n image = {\n src: 'empty'\n };\n }\n\n return (\n
\n \n
\n {}\n \n
\n
\n );\n };\n\n private _mapProductToImageData(product: SimpleProduct): IImageData {\n return {\n src: product.PrimaryImageUrl ?? ''\n };\n }\n\n private _renderEmptyImage(imageSettings: IImageSettings | undefined): React.ReactNode {\n return (\n
\n \n
\n );\n }\n\n private _getEmptyThumbnailItem(\n imageSettings: IImageSettings | undefined,\n index: number,\n modifiedActiveIndex: number\n ): IMediaGalleryThumbnailItemViewProps {\n const classes = classnames(\n 'ms-media-gallery__thumbnail-item',\n modifiedActiveIndex === index ? 'ms-media-gallery__thumbnail-item-active' : ''\n );\n return {\n ThumbnailItemContainerProps: {\n tag: 'li' as NodeTag,\n className: classes,\n role: 'tab',\n tabIndex: 0,\n key: 'empty',\n 'aria-label': '',\n 'aria-selected': modifiedActiveIndex === index,\n onClick: this._generateOnThumbnailClick(index),\n onKeyDown: this._generateOnThumbnailKeyDown(index)\n },\n Picture: (\n \n )\n };\n }\n\n private readonly isFirstItem = () => this.state.activeIndex === 0;\n\n private readonly isLastItem = () => {\n const images = this.state.mediaGalleryItems;\n return images && this.state.activeIndex === images.length - 1;\n };\n\n private readonly openModalDialog = (): void => {\n this._toggleModal();\n };\n\n private _toggleModal(): void {\n if (this.state.modalIsOpen) {\n this.fullScreenOverlayButtonRef.current?.focus();\n const parentDiv = this._inlineZoomDivRef.get(this.state.activeIndex);\n if (parentDiv && parentDiv.children && parentDiv.children.length >= 2) {\n const image = parentDiv.children[1].querySelector('img');\n if (image) {\n image.removeAttribute('style');\n }\n }\n this.setState({\n isImageZoomed: false\n });\n }\n this.setState({\n isImageZoomed: false,\n modalIsOpen: !this.state.modalIsOpen\n });\n removeInlineZoomStyle();\n removeContainerZoomStyle();\n }\n\n private readonly imageModalSlider = (ZoomView: string): React.ReactElement => {\n const {\n data: {\n product: { result: product }\n },\n resources\n } = this.props;\n let mediaGalleryItems = this.state.mediaGalleryItems;\n\n if (!mediaGalleryItems && product) {\n mediaGalleryItems = [this._mapProductToImageData(product)];\n }\n const carouselprops = {\n tag: Carousel,\n className: 'ms-media-gallery__carousel',\n items:\n mediaGalleryItems &&\n mediaGalleryItems.map((item: IImageData, index: number) =>\n this._renderCarouselItemImageView(ZoomView, item, this._zoomedImageSettings, index, true)\n ),\n activeIndex: this.state.activeIndex,\n next: this.next,\n previous: this.previous,\n interval: false,\n directionTextPrev: resources.previousScreenshotFlipperText,\n directionTextNext: resources.nextScreenshotFlipperText,\n onIndicatorsClickHandler: this.goToIndex,\n showPaginationTooltip: true,\n hideIndicator: false,\n keyboard: false,\n handleOnExited: this.onExited,\n handleOnExiting: this.onExiting,\n isDisabledFunctionality: this.state.isMobileImageZoomed\n } as IComponentNodeProps;\n const carousel = ;\n\n const imageModalSliderProps: IModalViewProps = {\n modalIsOpen: this.state.modalIsOpen,\n ontoggle: this._toggleModal,\n galleryCarousel: carousel,\n classNames: classnames('ms-media-gallery__modal', 'msc-modal-input-required')\n };\n return ImagefullView(imageModalSliderProps) as React.ReactElement;\n };\n\n private shouldUseCmsAltText = (): boolean => {\n if (this.props.config.altTextSource === 'product') {\n return false;\n } else {\n return true;\n }\n };\n}\n\nexport default MediaGallery;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { Module, Node } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport { IMediaGalleryThumbnailItemViewProps, IMediaGalleryThumbnailsViewProps, IMediaGalleryViewProps } from '../..';\n\nconst MediaGalleryView: React.FC = props => {\n const { CarouselProps, Thumbnails, MediaGallery, Modal } = props;\n\n return (\n \n \n {Modal}\n {_renderThumbnails(Thumbnails)}\n \n );\n};\n\nconst _renderThumbnails = (thumbnails: IMediaGalleryThumbnailsViewProps): JSX.Element => {\n const { ThumbnailsContainerProps, SingleSlideCarouselComponentProps, items } = thumbnails;\n\n return (\n \n {items && items.map(_renderThumbnailItem)}\n \n );\n};\n\nconst _renderThumbnailItem = (thumbnail: IMediaGalleryThumbnailItemViewProps): JSX.Element => {\n const { ThumbnailItemContainerProps, Picture } = thumbnail;\n\n return {Picture};\n};\n\nexport default MediaGalleryView;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { AddOrderTemplateToCartComponent, ILinesAddedToCartDialogResources } from '@msdyn365-commerce/components';\nimport { getUrlSync, ICoreContext, IImageSettings, Image, ITelemetry } from '@msdyn365-commerce/core';\nimport { ProductList, SimpleProduct } from '@msdyn365-commerce/retail-proxy/dist/Entities/CommerceTypes.g';\nimport {\n getFallbackImageUrl,\n getProductUrlSync,\n OrderTemplate,\n OrderTemplateLine,\n StringExtensions\n} from '@msdyn365-commerce-modules/retail-actions';\nimport { Alert, Button, ITelemetryContent } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport { IOrderTemplateActionMessageState } from '../order-template-list';\n\nexport interface ISingleOrderTemplateProps extends ProductList {\n orderTemplateState: IOrderTemplateActionMessageState;\n name?: string;\n orderTemplate: OrderTemplate;\n context: ICoreContext;\n imageSettings?: IImageSettings;\n enableImageProductLink?: boolean;\n removeFromOrderTemplateListText: string;\n addToBagText: string;\n index: number;\n itemKey: string;\n telemetry: ITelemetry;\n moduleId: string;\n moduleTypeName: string;\n handlers: {\n onRemoveOrderTemplate(id: string): void | undefined;\n onDismiss(): void;\n };\n resources: {\n closeWindowButtonText: string;\n addToCartFailureMessage: string;\n addToCartSuccessMessage: string;\n addToCartProcessMessage: string;\n orderTemplateErrorMessage: string;\n linesAddedToCartDialogResources: ILinesAddedToCartDialogResources;\n };\n telemetryContent?: ITelemetryContent;\n isMultipleCatalogFeatureEnabledInHq?: boolean;\n}\n\nexport interface ISingleOrderTemplateViewProps {\n key: string;\n orderTemplateImage: React.ReactNode;\n addToCartButton?: React.ReactNode;\n removeButton?: React.ReactNode;\n orderTemplateStatusMessage?: React.ReactNode;\n orderTemplateName?: React.ReactNode;\n orderTemplateAriaLabel?: string;\n orderTemplateHeaderDivider?: React.ReactNode;\n}\n\nconst _removeItemFromOrderTemplateList = (props: ISingleOrderTemplateProps): void => {\n const { onRemoveOrderTemplate } = props.handlers;\n const { itemKey } = props;\n\n onRemoveOrderTemplate && itemKey && onRemoveOrderTemplate(itemKey);\n};\n\nconst OrderTemplateActions = {\n removeOrderTemplate: _removeItemFromOrderTemplateList\n};\n\n/**\n * Remove order template action.\n * @param input -Single order template props.\n * @returns Set remove order template.\n */\nconst removeOrderTemplateActionHandler = (input: ISingleOrderTemplateProps) => () => {\n OrderTemplateActions.removeOrderTemplate(input);\n};\n\nexport const OrderTemplateRender = (input: ISingleOrderTemplateProps): ISingleOrderTemplateViewProps | null => {\n const {\n Id,\n orderTemplate,\n removeFromOrderTemplateListText,\n orderTemplateState,\n handlers,\n name,\n imageSettings,\n context,\n telemetryContent,\n enableImageProductLink\n } = input;\n\n if (!Id) {\n return null;\n }\n\n const _getOrderTemplatePageUrl = (): string => {\n const url = getUrlSync('ordertemplate', context.actionContext) ?? '';\n const separator = url.includes('?') ? '&' : '?';\n if (Id) {\n return `${url}${separator}id=${Id}`;\n }\n return '';\n };\n\n const { onDismiss } = handlers;\n\n return {\n key: `${Id}-template`,\n orderTemplateImage: _renderOrderTemplateImages(context, orderTemplate.orderTemplateLines, imageSettings, enableImageProductLink),\n orderTemplateAriaLabel: _renderAriaLabel(input),\n orderTemplateName: (\n
\n \n
\n {orderTemplate.totalLines}\n {` `}\n line items\n
\n
\n
\n ),\n addToCartButton: (\n
\n \n
\n ),\n removeButton: (\n \n ),\n orderTemplateStatusMessage: orderTemplateState && orderTemplateState.isOpen && orderTemplateState.userMessage && (\n
\n \n {orderTemplateState.userMessage}\n \n
\n )\n };\n};\n\n/**\n * On image click handler.\n * @param productUrl -Product url value.\n * @returns Assign window location.\n */\nconst onClickHandler = (productUrl: string) => () => {\n window.location.assign(productUrl);\n};\n\nconst _renderOrderTemplateImages = (\n context: ICoreContext,\n orderTemplateLines?: OrderTemplateLine[],\n imageSettings?: IImageSettings,\n enableImageProductLink?: boolean\n): JSX.Element | null => {\n const defaultImageSettings: IImageSettings = {\n viewports: {\n xs: { q: 'w=140&h=140&m=6', w: 0, h: 0 },\n lg: { q: 'w=140&h=140&m=6', w: 0, h: 0 },\n xl: { q: 'w=140&h=140&m=6', w: 0, h: 0 }\n },\n lazyload: true\n };\n\n if (orderTemplateLines) {\n const count = orderTemplateLines.length < 4 ? orderTemplateLines.length : 4;\n\n return (\n
\n {orderTemplateLines?.slice(0, count).map(line => {\n const productUrl = line.fullProduct\n ? _updateProductUrlCatalog(line.fullProduct.ProductDetails, context, line?.productListLine?.CatalogId)\n : '';\n\n return (\n \n );\n })}\n
\n );\n }\n return
;\n};\n\n// This method is used to update the product url with the catalogId\nconst _updateProductUrlCatalog = (productDetails: SimpleProduct, context: ICoreContext, catalogId: number | undefined): string => {\n const productUrl = getProductUrlSync(productDetails, context.actionContext, undefined);\n if (!StringExtensions.isNullOrWhitespace(productUrl) && catalogId !== undefined) {\n const fullUrl = new URL(productUrl, window.location.href);\n fullUrl.searchParams.set('catalogid', `${catalogId ?? 0}`);\n return fullUrl.href;\n }\n return productUrl;\n};\n\nconst _renderAriaLabel = (props: ISingleOrderTemplateProps): string => {\n const { name } = props;\n return `${name}`;\n};\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport classnames from 'classnames';\nimport * as React from 'react';\n\nimport { orderTemplateListStatus } from '../order-template-list';\n\nexport interface IOrderTemplateListStatusMessageProps {\n className?: string;\n errorType: orderTemplateListStatus;\n text?: string;\n}\n\nexport const OrderTemplateListStatusMessage: React.FC = ({ className, errorType, text }) => {\n switch (errorType) {\n case 'EMPTY':\n return

{text}

;\n case 'FAILED':\n return

{text}

;\n case 'LOADING':\n default:\n return

{text}

;\n }\n};\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { IOrderTemplateNameDialogResources, OrderTemplateNameDialog } from '@msdyn365-commerce/components';\nimport { IComponentProps } from '@msdyn365-commerce/core';\nimport React, { useState } from 'react';\n\nconst modalCloseButtonReference: React.RefObject = React.createRef();\n\n/**\n * The Create Order Template Button Props.\n */\nexport interface ICreateOrderTemplateButtonProps extends IComponentProps {\n /**\n * The label for create order template.\n */\n createOrderTemplateText: string;\n\n /**\n * The create order template dialog resources.\n */\n createOrderTemplateDialogResources: IOrderTemplateNameDialogResources;\n\n /**\n * The delegate to fire when dialog captured any user entry.\n */\n onOrderTemplateCreated(): Promise;\n}\n\nconst CreateOrderTemplateButton: React.FC = props => {\n const onCancelHandler = React.useCallback(() => {\n return;\n }, []);\n const [isCreateOrderTemplateDialogOpen, setOrderTemplateNameDialogOpen] = useState(false);\n const onCreateButtonClick = React.useCallback(() => {\n setOrderTemplateNameDialogOpen(true);\n }, []);\n\n return (\n <>\n \n {props.createOrderTemplateText}\n \n \n \n );\n};\n\nexport default CreateOrderTemplateButton;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { IOrderTemplateNameDialogResources } from '@msdyn365-commerce/components';\nimport { deleteAsync } from '@msdyn365-commerce/retail-proxy/dist/DataActions/ProductListsDataActions.g';\nimport { OrderTemplate } from '@msdyn365-commerce-modules/retail-actions';\nimport { Alert, Heading, IModuleProps, INodeProps } from '@msdyn365-commerce-modules/utilities';\nimport classnames from 'classnames';\nimport { observer } from 'mobx-react';\nimport * as React from 'react';\n\nimport Spinner from '../order-template/components/add-line/spinner';\nimport {\n ISingleOrderTemplateProps,\n ISingleOrderTemplateViewProps,\n OrderTemplateListStatusMessage,\n OrderTemplateRender\n} from './components';\nimport CreateNewTemplateButtonComponent from './components/create-order-template';\nimport { IOrderTemplateListData } from './order-template-list.data';\nimport { HeadingTag, IOrderTemplateListProps, IOrderTemplateListResources } from './order-template-list.props.autogenerated';\n\nexport interface IOrderTemplateActionMessageState {\n itemKey: string;\n userMessage: string;\n statusCssString: string;\n messageGlyph: string;\n isOpen: boolean;\n headerStatusMessage: string;\n}\n\nexport type orderTemplateListStatus = 'LOADING' | 'SUCCESS' | 'FAILED' | 'EMPTY';\n\nexport interface IOrderTemplateListViewProps extends IOrderTemplateListProps {\n OrderTemplateList: IModuleProps;\n status?: orderTemplateListStatus;\n statusMessage?: React.ReactNode;\n heading?: React.ReactNode;\n OrderTemplates?: INodeProps;\n OrderTemplate?: INodeProps;\n orderTemplates?: ISingleOrderTemplateViewProps[];\n createOrderTemplateButton?: React.ReactNode;\n templateHeaderStatusMessage?: React.ReactNode;\n}\n\n/**\n *\n * OrderTemplateList component.\n * @extends {React.PureComponent, IOrderTemplateListActionMessageState>}\n */\n@observer\nclass OrderTemplateList extends React.Component, IOrderTemplateActionMessageState> {\n constructor(props: IOrderTemplateListProps) {\n super(props);\n this.state = {\n itemKey: '',\n userMessage: '',\n headerStatusMessage: '',\n statusCssString: 'success',\n messageGlyph: 'fas fa-check',\n isOpen: false\n };\n }\n\n public async componentDidMount(): Promise {\n this.setState({});\n }\n\n public shouldComponentUpdate(\n nextProps: IOrderTemplateListProps,\n nextState: IOrderTemplateActionMessageState\n ): boolean {\n if (this.state === nextState && this.props.data === nextProps.data) {\n return false;\n }\n return true;\n }\n\n public render(): JSX.Element | null {\n const { className, heading } = this.props.config;\n const { emptyOrderTemplateText, createNewTemplateButtonText } = this.props.resources;\n const { orderTemplates } = this.props.data;\n const orderTemplatesData = orderTemplates && orderTemplates.result;\n const orderTemplateListHeading = heading?.text ?? this.props.resources.orderTemplateListTitle;\n\n if (orderTemplates.status === 'LOADING') {\n const errorProps: IOrderTemplateListViewProps = {\n ...(this.props as IOrderTemplateListProps),\n OrderTemplateList: {\n moduleProps: this.props,\n className: classnames('ms-order-template', className)\n },\n status: 'LOADING',\n statusMessage: ,\n heading: (\n \n )\n };\n return this.props.renderView(errorProps);\n }\n\n if (orderTemplatesData && orderTemplatesData.length === 0) {\n // When no order templates are found for customer\n const emptyViewProps: IOrderTemplateListViewProps = {\n ...(this.props as IOrderTemplateListProps),\n OrderTemplateList: {\n moduleProps: this.props,\n className: classnames('ms-order-template', className)\n },\n status: 'EMPTY',\n statusMessage: ,\n createOrderTemplateButton: (\n \n ),\n heading: (\n \n )\n };\n\n return this.props.renderView(emptyViewProps);\n }\n\n const viewProps: IOrderTemplateListViewProps = {\n ...(this.props as IOrderTemplateListProps),\n OrderTemplateList: {\n moduleProps: this.props,\n className: classnames('ms-order-template', className)\n },\n status: 'SUCCESS',\n heading: ,\n createOrderTemplateButton: (\n \n ),\n templateHeaderStatusMessage: this.state.isOpen && this.state.headerStatusMessage && (\n
\n \n {this.state.headerStatusMessage}\n \n
\n ),\n OrderTemplates: {\n className: 'ms-order-template__list-item',\n tag: 'ul'\n },\n OrderTemplate: {\n className: 'ms-order-template__tile',\n tag: 'li'\n },\n orderTemplates: orderTemplatesData && this._renderOrderTemplateList(orderTemplatesData)\n };\n\n return this.props.renderView(viewProps) as React.ReactElement;\n }\n\n private _generateOrderTemplateNameDialogResources(resources: IOrderTemplateListResources): IOrderTemplateNameDialogResources {\n return {\n orderTemplateHeaderLabel: resources.createOrderTemplateHeader,\n orderTemplateTitleLabel: resources.orderTemplateTitle,\n orderTemplateNameAriaLabel: resources.orderTemplateNameAriaLabel,\n orderTemplateDescription: resources.createOrderTemplateDescription,\n\n defaultOrderTemplateName: resources.defaultOrderTemplateName,\n\n orderTemplateButtonLabel: resources.createOrderTemplateButtonText,\n orderTemplateCancelButtonLabel: resources.cancelNewOrderTemplateCreationButtonText\n };\n }\n\n private readonly _isChannelMultipleCatalogsFeatureEnabled = (): boolean => {\n let isMultipleCatalogFeatureEnabledInHq = false;\n if (this.props.data.featureState) {\n isMultipleCatalogFeatureEnabledInHq =\n this.props.data.featureState.result?.find(\n feature => feature.Name === 'Dynamics.AX.Application.ChannelMultipleCatalogsFeature'\n )?.IsEnabled || false;\n }\n return isMultipleCatalogFeatureEnabledInHq;\n };\n\n private _renderOrderTemplateList(orderTemplates: OrderTemplate[]): ISingleOrderTemplateViewProps[] {\n const { context, telemetry } = this.props;\n const { imageSettings, enableImageProductLink } = this.props.config;\n return orderTemplates.map((orderTemplate: OrderTemplate, index) => {\n const currentTemplateProps: ISingleOrderTemplateProps = {\n orderTemplateState: this.state,\n Id: orderTemplate.productList.Id,\n name: orderTemplate.productList.Name,\n orderTemplate,\n context,\n imageSettings,\n enableImageProductLink,\n removeFromOrderTemplateListText: 'remove',\n addToBagText: this.props.resources.addToBagButtonText,\n index,\n itemKey: orderTemplate.productList.Id,\n telemetry,\n moduleId: this.props.id,\n moduleTypeName: this.props.typeName,\n handlers: {\n onRemoveOrderTemplate: this._onRemoveFromOrderTemplateList,\n onDismiss: this._onDismiss\n },\n resources: {\n closeWindowButtonText: this.props.resources.closeWindowButtonText,\n addToCartFailureMessage: this.props.resources.addToCartFailureMessage,\n addToCartSuccessMessage: this.props.resources.addToCartSuccessMessage,\n addToCartProcessMessage: this.props.resources.addToCartProcessMessage,\n orderTemplateErrorMessage: this.props.resources.orderTemplateErrorMessage,\n linesAddedToCartDialogResources: {\n viewCartButtonText: this.props.resources.viewCartButtonText,\n orderTemplateCloseButtonText: this.props.resources.orderTemplateCloseButtonText,\n linesAddedToCartHeaderItemsOneText: this.props.resources.linesAddedToCartHeaderItemsOneText,\n linesAddedToCartHeaderLinesOneText: this.props.resources.linesAddedToCartHeaderLinesOneText,\n linesAddedToCartHeaderLinesFormatText: this.props.resources.linesAddedToCartHeaderLinesFormatText,\n linesAddedToCartHeaderMessageText: this.props.resources.linesAddedToCartHeaderMessageText\n }\n },\n isMultipleCatalogFeatureEnabledInHq: this._isChannelMultipleCatalogsFeatureEnabled()\n };\n\n return OrderTemplateRender(currentTemplateProps)!;\n });\n }\n\n private readonly _onDismiss = () => {\n this.setState({\n isOpen: false\n });\n };\n\n private readonly _reloadPage = async () => {\n window.location.reload();\n };\n\n private readonly _onRemoveFromOrderTemplateList = (productListId: string): void | undefined => {\n const { context, data, telemetry, resources } = this.props;\n const { orderTemplates } = data;\n\n if (context && context.actionContext) {\n const userToken = context.request.user.isAuthenticated && context.request.user.token;\n if (userToken && orderTemplates.result && orderTemplates.result[0] && productListId) {\n const orderTemplate = orderTemplates.result.find(p => p.productList.Id === productListId);\n if (orderTemplate) {\n deleteAsync({ callerContext: context.actionContext }, orderTemplate.productList)\n .then()\n .catch((error: string) => {\n telemetry.warning('[order-template-list] Unable to delete order template.');\n telemetry.error(error);\n this.setState({\n itemKey: productListId,\n headerStatusMessage: resources.deleteOrderTemplateFailedText,\n statusCssString: 'danger',\n messageGlyph: 'fas fa-exclamation-triangle',\n isOpen: true\n });\n })\n .then(this._reloadPage)\n .catch((error: string) => {\n telemetry.warning('[order-template-list] Unable to delete order template.');\n telemetry.error(error);\n });\n } else {\n telemetry.warning('[order-template-list] Failed to delete order template. Order template was not found');\n }\n } else {\n telemetry.warning('[order-template-list] Failed to delete order template.');\n }\n }\n };\n}\n\nexport default OrderTemplateList;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { INodeProps, Module, Node } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport { ISingleOrderTemplateViewProps } from './components';\nimport { IOrderTemplateListViewProps } from './order-template-list';\n\nexport const OrderTemplateListView: React.FC = props => {\n const {\n OrderTemplateList,\n status,\n statusMessage,\n heading,\n OrderTemplates,\n orderTemplates,\n OrderTemplate,\n createOrderTemplateButton,\n templateHeaderStatusMessage\n } = props;\n\n return (\n \n {heading}\n {status !== 'SUCCESS' && statusMessage}\n \n {createOrderTemplateButton}\n {templateHeaderStatusMessage}\n \n {OrderTemplates && orderTemplates && orderTemplates.length > 0 && (\n \n {orderTemplates &&\n orderTemplates.map(orderTemplate => {\n return _renderOrderTemplate(orderTemplate, OrderTemplate);\n })}\n \n )}\n \n );\n};\n\nconst _renderOrderTemplate = (orderTemplate: ISingleOrderTemplateViewProps, OrderTemplate?: INodeProps): JSX.Element | null => {\n const { key, addToCartButton, orderTemplateImage, orderTemplateStatusMessage, removeButton, orderTemplateName } = orderTemplate;\n return (\n \n {orderTemplateName}\n {orderTemplateImage}\n {addToCartButton}\n {removeButton}\n {orderTemplateStatusMessage}\n \n );\n};\n\nexport default OrderTemplateListView;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport * as React from 'react';\n\nexport default (props: { className: string; msg?: string }) => (\n <>\n
\n {props?.msg &&
{props?.msg}
}\n \n);\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { ProductDimensionFull } from '@msdyn365-commerce/commerce-entities';\nimport { getCatalogId, ICoreContext, IImageSettings } from '@msdyn365-commerce/core';\nimport { ProductListLine, ProductSearchCriteria, ProductSearchResult } from '@msdyn365-commerce/retail-proxy';\nimport { searchByCriteriaAsync } from '@msdyn365-commerce/retail-proxy/dist/DataActions/ProductsDataActions.g';\nimport { ProductCatalog, SimpleProduct } from '@msdyn365-commerce/retail-proxy/dist/Entities/CommerceTypes.g';\nimport {\n addItemToOrderTemplate,\n AddItemToOrderTemplateInput,\n ArrayExtensions,\n getDimensionsForSelectedVariant,\n GetDimensionsForSelectedVariantInput,\n getSelectedVariant,\n SelectedVariantInput,\n validateCatalogId\n} from '@msdyn365-commerce-modules/retail-actions';\nimport { Modal, ModalBody, ModalHeader, getPayloadObject, ITelemetryContent, onTelemetryClick } from '@msdyn365-commerce-modules/utilities';\nimport { get } from 'lodash';\nimport { computed } from 'mobx';\nimport React from 'react';\n\nimport { IProductConfigurationState, NotFoundComponent, ProductConfiguration, ProductList } from '.';\nimport Spinner from './spinner';\n\nexport interface IAddLineToTemplateProps {\n context: ICoreContext;\n resources: IAddLineToTemplateResources;\n orderTemplateId: string;\n imageSettings?: IImageSettings;\n isMultipleCatalogFeatureEnabledInHq: boolean;\n catalogs?: ProductCatalog[] | undefined;\n telemetryContent?: ITelemetryContent;\n}\n\nexport interface IAddLineToTemplateResources {\n addLineModalLinkText: string;\n searchButtonAriaLabel: string;\n searchInputAriaLabel: string;\n searchModalPlaceholderText: string;\n selectCatalogTitleText: string;\n selectProductButtonText: string;\n addItemToTemplateText: string;\n addLineProductUnitPricePrefix: string;\n backButtonText: string;\n decrementButtonAriaLabel: string;\n incrementButtonAriaLabel: string;\n quantitySelectLabel: string;\n addLineProductUnitOfMeasurePrefix: string;\n notFoundSearchErrorNotice: string;\n notFoundSearchErrorRedediation: string;\n searchErrorMessage: string;\n productDimensionTypeColor: string;\n productDimensionTypeConfiguration: string;\n productDimensionTypeSize: string;\n productDimensionTypeStyle: string;\n searchResultsCountVerbage: string;\n searchResultsCountSubject: string;\n addToTemplateConfirmation: string;\n totalPriceLabel: string;\n progressNotificationText: string;\n addToTemplateDuplicateError: string;\n addToTemplateGenericError: string;\n dimensionMissingError: string;\n backToResultsText?: string;\n}\n\nenum CONTENT {\n Search,\n ProductList,\n ProductConfiguration,\n NotFound,\n Error,\n Loading\n}\n\ninterface IAddLineToTemplateState {\n isOpen: boolean;\n query: string;\n products: ProductSearchResult[];\n productCatalogs: ProductCatalog[] | null;\n content: number;\n selectedProduct: SimpleProduct | null;\n selectedCatalogId: number | undefined;\n selectedProductDimensions?: ProductDimensionFull[];\n selectedQuantity?: number;\n reloadPage?: boolean;\n}\n\n/**\n * Add Lines to order template.\n */\nexport class AddLineToTemplate extends React.Component {\n public state: IAddLineToTemplateState = {\n isOpen: false,\n query: '',\n products: [],\n productCatalogs: [],\n content: CONTENT.Search,\n selectedProduct: null,\n selectedCatalogId: 0\n };\n\n public defaultImageSettings: IImageSettings = {\n viewports: {\n xs: { q: 'w=64&h=64&m=6', w: 0, h: 0 },\n lg: { q: 'w=64&h=64&m=6', w: 0, h: 0 },\n xl: { q: 'w=64&h=64&m=6', w: 0, h: 0 }\n },\n lazyload: true\n };\n\n public searchTextInput: React.RefObject = React.createRef(); // @TODO public/private\n\n private readonly addLineButtonRef: React.RefObject = React.createRef();\n\n constructor(props: IAddLineToTemplateProps) {\n super(props);\n }\n\n public onComponentDidMount(): void {\n this.searchTextInput.current?.focus();\n }\n\n public componentDidMount(): void {\n this._getCatalogs();\n }\n\n public onComponentDidUpdate(): void {\n this.searchTextInput.current?.focus();\n }\n\n @computed get showBackArrow(): boolean {\n return this.state.content === CONTENT.ProductConfiguration;\n }\n\n public shouldComponentUpdate(nextProps: IAddLineToTemplateProps, nextState: IAddLineToTemplateState): boolean {\n if (this.state === nextState && this.props === nextProps) {\n return false;\n }\n return true;\n }\n\n public render(): JSX.Element {\n const {\n resources: { addLineModalLinkText, backToResultsText }\n } = this.props;\n\n const modalProps = {\n ...this.props,\n className: 'msc-add-line-to-template',\n toggle: this._toggleModalHandler,\n isOpen: this.state.isOpen,\n ariaLabel: addLineModalLinkText\n };\n\n return (\n <>\n \n \n {this.showBackArrow && (\n \n )}\n {addLineModalLinkText}\n \n {this._renderContent()}\n \n \n \n {addLineModalLinkText}\n \n \n );\n }\n\n private readonly _renderSearchForm = () => {\n const {\n resources: { searchButtonAriaLabel, searchModalPlaceholderText, selectCatalogTitleText }\n } = this.props;\n\n return (\n \n {this.state.productCatalogs && ArrayExtensions.hasElements(this.state.productCatalogs) && (\n <>\n \n \n {this._getCatalogNodes()}\n \n \n )}\n
\n \n
\n \n );\n };\n\n private readonly _onSearchSubmit = (event: React.FormEvent): void => {\n event.preventDefault();\n\n const query = get(this, 'searchTextInput.current.value', null);\n\n if (!query) {\n return;\n }\n\n this.setState({\n content: CONTENT.Loading\n });\n\n this._getSearchResults(query)\n .then(result => {\n if (result.length === 0) {\n this.setState({\n products: result,\n content: CONTENT.NotFound\n });\n } else {\n this.setState({\n products: result,\n content: CONTENT.ProductList\n });\n }\n })\n .catch(error => {\n this.setState({\n content: CONTENT.Error\n });\n });\n };\n\n private readonly _onQuantityChangeHandler = (event: React.ChangeEvent) => {\n this.setState({\n selectedQuantity: +event.target.value\n });\n };\n\n private readonly _onSelectItem = async (product: ProductSearchResult): Promise => {\n const {\n actionContext,\n request: {\n apiSettings: { channelId }\n }\n } = this.props.context;\n const varianteInput = new SelectedVariantInput(product.RecordId, channelId, [], undefined, this.props.context.request);\n const productVariant = await getSelectedVariant(varianteInput, actionContext);\n\n if (!productVariant) {\n this.props.context.telemetry.error('Error retrieving product variant');\n return Promise.resolve([]);\n }\n\n const dimensions = await this._getProductDimensions(product as SimpleProduct);\n\n this.setState({\n selectedProductDimensions: dimensions,\n content: CONTENT.ProductConfiguration,\n selectedProduct: productVariant\n });\n\n return dimensions;\n };\n\n private readonly _onInputChange = (event: React.ChangeEvent): void => {\n this.setState({\n query: event.target.value\n });\n };\n\n private readonly _onBackButtonClickHandler = (): void => {\n this.setState({\n content: CONTENT.ProductList\n });\n };\n\n private readonly _highlightSearchTerm = (name: string) => {\n const parsedName = name && unescape(name.replace(new RegExp(this.state.query, 'i'), '$&'));\n\n return (\n \n );\n };\n\n private readonly _resultCountText = (): string => {\n return this.props.resources.searchResultsCountVerbage\n .replace('{count}', this.state.products.length.toString())\n .replace('{subject}', `${this.props.resources.searchResultsCountSubject}${this.state.products.length > 1 ? 's' : ''}`);\n };\n\n private _renderContent(): React.ReactNode | null {\n switch (this.state.content) {\n case CONTENT.ProductConfiguration:\n const { selectedProduct, selectedProductDimensions } = this.state;\n const viewProps = {\n ...this.props,\n imageSettings: this.props.imageSettings || this.defaultImageSettings,\n product: selectedProduct!,\n dimensions: selectedProductDimensions!,\n addToTemplateHandler: this._addItemToTemplateHandler,\n onQuantityChangeHandler: this._onQuantityChangeHandler,\n highlightSearchTerm: this._highlightSearchTerm,\n searchForm: this._renderSearchForm()\n };\n\n return ;\n\n case CONTENT.ProductList:\n const productProps = {\n ...this.props,\n imageSettings: this.props.imageSettings || this.defaultImageSettings,\n clickHandler: this._onSelectItem,\n products: this.state.products,\n highlightSearchTerm: this._highlightSearchTerm,\n searchForm: this._renderSearchForm(),\n renderResultCountText: this._resultCountText\n };\n\n return (\n \n \n \n );\n\n case CONTENT.Loading:\n return (\n \n {this._renderSearchForm()}\n \n \n );\n\n case CONTENT.NotFound:\n const { notFoundSearchErrorNotice, notFoundSearchErrorRedediation } = this.props.resources;\n\n return (\n \n

{this._resultCountText()}

\n {this._renderSearchForm()}\n \n
\n );\n\n case CONTENT.Error:\n return (\n \n {this._renderSearchForm()}\n
\n {this.props.resources.searchErrorMessage}\n
\n
\n );\n\n default:\n return {this._renderSearchForm()};\n }\n }\n\n private readonly _addItemToTemplateHandler = async (config: IProductConfigurationState): Promise => {\n const {\n orderTemplateId,\n context: { actionContext },\n isMultipleCatalogFeatureEnabledInHq\n } = this.props;\n const catalogId = this.state.selectedCatalogId;\n const input = isMultipleCatalogFeatureEnabledInHq\n ? new AddItemToOrderTemplateInput(\n orderTemplateId,\n config.product.RecordId,\n config.quantity,\n config.product.DefaultUnitOfMeasure || 'ea',\n isMultipleCatalogFeatureEnabledInHq,\n catalogId\n )\n : new AddItemToOrderTemplateInput(\n orderTemplateId,\n config.product.RecordId,\n config.quantity,\n config.product.DefaultUnitOfMeasure || 'ea'\n );\n const result = await addItemToOrderTemplate(input, actionContext);\n this.setState({\n isOpen: false,\n reloadPage: true\n });\n // reload when closing\n window.location.reload();\n return result;\n };\n\n /**\n *\n * Get all active product catalogs.\n */\n private _getCatalogs(): void {\n const { isMultipleCatalogFeatureEnabledInHq, catalogs } = this.props;\n\n // if Channel Multiple Catalogs Feature is enabled then show all catalogs.\n const productCatalogs = isMultipleCatalogFeatureEnabledInHq && catalogs ? catalogs : [];\n\n // get the current catalog id.\n const catalogId = getCatalogId(this.props.context.request);\n validateCatalogId(catalogId);\n // set the current catalog id as a default selected catalog id from the url\n this.setState({\n productCatalogs: productCatalogs,\n selectedCatalogId: catalogId\n });\n }\n\n private _getCatalogNodes(): JSX.Element[] | null {\n const { productCatalogs, selectedCatalogId } = this.state;\n if (productCatalogs && ArrayExtensions.hasElements(productCatalogs)) {\n return productCatalogs.map((productCatalog: ProductCatalog) => {\n // initially select default catalog in dropdown\n const isSelected = productCatalog.RecordId === selectedCatalogId;\n return (\n \n );\n });\n }\n return [];\n }\n\n private readonly _onCatalogSelectionChange = (event: React.ChangeEvent) => {\n this.setState({\n selectedCatalogId: Number.parseInt(event.target.value, 10)\n });\n };\n\n private _getSearchResults(searchText: string): Promise {\n const {\n context: {\n actionContext,\n request: {\n apiSettings: { channelId }\n }\n }\n } = this.props;\n const { selectedCatalogId } = this.state;\n const searchCriteriaInput: ProductSearchCriteria = {};\n\n searchCriteriaInput.Context = {\n ChannelId: channelId,\n CatalogId: selectedCatalogId\n };\n\n if (process.env.NODE_ENV === 'development' && process.env.ENABLE_CLOUD_SEARCH?.toLowerCase() !== 'true') {\n searchCriteriaInput.IncludeAttributes = false;\n } else {\n searchCriteriaInput.IncludeAttributes = true;\n }\n searchCriteriaInput.SearchCondition = searchText;\n\n return searchByCriteriaAsync({ callerContext: actionContext }, searchCriteriaInput);\n }\n\n private async _getProductDimensions(product: SimpleProduct): Promise {\n const {\n context: {\n actionContext,\n request: {\n apiSettings: { channelId }\n }\n }\n } = this.props;\n const id = product.MasterProductId ? product.MasterProductId : product.RecordId;\n\n return getDimensionsForSelectedVariant(\n new GetDimensionsForSelectedVariantInput(id, channelId, [], this.props.context.request),\n actionContext\n );\n }\n\n private readonly _toggleModalHandler = () => {\n if (this.state.isOpen) {\n const payLoad = getPayloadObject('click', this.props.telemetryContent!, 'add-item-to-template', '');\n onTelemetryClick(this.props.telemetryContent!, payLoad, 'add-item-to-template');\n this._getCatalogs();\n this.addLineButtonRef.current!.focus();\n }\n\n this.setState({\n isOpen: !this.state.isOpen,\n content: CONTENT.Search\n });\n\n if (this.state.reloadPage) {\n window.location.reload();\n this.setState({\n reloadPage: false\n });\n }\n };\n}\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { ITelemetryContent } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\ninterface IDropdownState {\n /**\n * @friendlyName selectedIndex\n * @description Selected index.\n */\n selectedIndex: string;\n}\n\nexport interface IDropdownProps {\n dropdownId: number;\n dropdownName: string;\n dropdownList: IDropdownItemProps[];\n telemetryContent?: ITelemetryContent;\n onChange?(selection: IDropdownOnSelection): void;\n}\n\nexport interface IDropdownItemProps {\n value: string;\n id: number;\n}\n\nexport interface IDropdownOnSelection {\n dropdownId: number;\n selectId: string;\n selectedValue: string;\n}\n\n/**\n *\n * DropDown component.\n * @extends {React.PureComponent}\n */\nexport class Dropdown extends React.PureComponent {\n private readonly selectMenu: React.RefObject = React.createRef();\n\n constructor(props: IDropdownProps, state: IDropdownState) {\n super(props);\n this.state = {\n selectedIndex: ''\n };\n }\n\n public componentDidMount(): void {\n if (this.selectMenu.current) {\n this.selectMenu.current.selectedIndex = 0;\n }\n }\n\n public render(): JSX.Element {\n const { dropdownId, dropdownList, dropdownName } = this.props;\n\n return (\n \n {dropdownList.map(\n (item: IDropdownItemProps) =>\n item && (\n \n {item.value}\n \n )\n )}\n \n );\n }\n\n private readonly _onChanged = (event: React.ChangeEvent): void => {\n this.setState({ selectedIndex: event.target.value });\n\n if (this.props.onChange) {\n this.props.onChange({\n dropdownId: this.props.dropdownId,\n selectId: event.target.value,\n selectedValue: event.target.innerText\n });\n }\n };\n}\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport * as React from 'react';\n\nexport const NotFoundComponent = (props: { error: string; msg: string }) => (\n <>\n
\n
{props.error}
\n
{props.msg}
\n \n);\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { debounce } from 'lodash';\nimport { reaction } from 'mobx';\nimport { observer } from 'mobx-react';\nimport * as React from 'react';\n\ninterface IQuantityProps {\n min?: number;\n max: number;\n currentCount?: number;\n disabled?: boolean;\n incrementGlyphClass?: string;\n decrementGlyphClass?: string;\n decrementButtonAriaLabel?: string;\n incrementButtonAriaLabel?: string;\n inputQuantityAriaLabel?: string;\n id?: string;\n onChange?(newValue: number): void;\n}\n\ninterface IQuantityState {\n currentInput: number;\n}\n\n/**\n * Quantity Component - This component is used to add or remove quantity.\n */\n@observer\nexport default class OrderTemplateQuantity extends React.PureComponent {\n public static defaultProps: Partial = {\n min: 1,\n decrementGlyphClass: 'fas fa-minus',\n incrementGlyphClass: 'fas fa-plus'\n };\n\n private readonly inputRef: React.RefObject = React.createRef();\n\n constructor(props: IQuantityProps) {\n super(props);\n this.state = { currentInput: props.currentCount || 1 };\n this._handleChange = this._handleChange.bind(this);\n\n reaction(\n () => this.props.currentCount,\n () => {\n this.setState({ currentInput: this.props.currentCount || 1 });\n }\n );\n }\n\n public render(): JSX.Element {\n const glyphMinusClassName: string = `${this.props.decrementGlyphClass!} quantity__controls-glyph`;\n const glyphPlusClassName: string = `${this.props.incrementGlyphClass!} quantity__controls-glyph`;\n const disabled = this.props.currentCount === this.props.min;\n const incDisabled = this.props.currentCount === this.props.max;\n const currentValue = this.state.currentInput;\n let extraClass = '';\n if (disabled) {\n // The quantity has reached its boundaries (max or min)\n extraClass = 'disabled';\n } else if (this.props.disabled) {\n // This.props.disabled shows if the state is not succeded yet\n extraClass = 'transition';\n }\n const getChangeHandler = (amount: number) => () => {\n this._onIncrementalChange(amount);\n };\n\n return (\n
\n \n \n \n \n \n \n \n
\n );\n }\n\n private _onIncrementalChange(amount: number): void {\n const updatedQuantity = this.state.currentInput + amount;\n\n if (updatedQuantity >= 1 && updatedQuantity <= this.props.max) {\n this.props.onChange && this.props.onChange(updatedQuantity);\n }\n }\n\n private _handleChange(e: React.ChangeEvent): void {\n const currentValue = Number.parseInt(e.target.value, 10);\n const minValue = this.props.min === undefined ? 1 : this.props.min;\n const inputElement =\n this.inputRef && this.inputRef.current && this.inputRef.current instanceof HTMLInputElement && this.inputRef.current;\n\n if (currentValue > this.props.max) {\n this.setState({ currentInput: this.props.max });\n } else {\n this.setState({ currentInput: currentValue }, () => {\n debounce(() => {\n if (!isNaN(this.state.currentInput) && !(this.state.currentInput < minValue) && inputElement) {\n inputElement.setAttribute('aria-valuenow', currentValue.toString());\n inputElement.setAttribute('value', currentValue.toString());\n }\n }, 200)();\n });\n }\n }\n\n private readonly _validateMin = (): void => {\n const minValue = this.props.min === undefined ? 1 : this.props.min;\n\n if (isNaN(this.state.currentInput) || this.state.currentInput < minValue) {\n this.props.onChange && this.props.onChange(minValue);\n } else {\n this.props.onChange && this.props.onChange(this.state.currentInput);\n }\n };\n}\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { ProductDimensionFull } from '@msdyn365-commerce/commerce-entities';\nimport { IImageSettings, Image } from '@msdyn365-commerce/core';\nimport { ProductDimensionValue, ProductListLine } from '@msdyn365-commerce/retail-proxy';\nimport { SimpleProduct } from '@msdyn365-commerce/retail-proxy/dist/Entities/CommerceTypes.g';\nimport {\n getDimensionsForSelectedVariant,\n GetDimensionsForSelectedVariantInput,\n getFallbackImageUrl,\n getPriceForSelectedVariant,\n getProductAvailabilitiesForSelectedVariant,\n getSelectedVariant,\n IProductInventoryInformation,\n PriceForSelectedVariantInput,\n ProductAvailabilitiesForSelectedVariantInput,\n SelectedVariantInput\n} from '@msdyn365-commerce-modules/retail-actions';\nimport { Alert, Button, ITelemetryContent, ModalBody, ModalFooter } from '@msdyn365-commerce-modules/utilities';\nimport classnames from 'classnames';\nimport React from 'react';\n\nimport OrderTemplateQuantity from '../common/order-template-quantity';\nimport { Dropdown, IAddLineToTemplateProps, IAddLineToTemplateResources, IDropdownItemProps, IDropdownOnSelection } from '.';\n\nexport interface IProductCnnfigurationProps extends IAddLineToTemplateProps {\n product: SimpleProduct;\n dimensions: ProductDimensionFull[];\n imageSettings: IImageSettings;\n telemetryContent?: ITelemetryContent;\n searchForm: React.ReactNode;\n addToTemplateHandler(params: IProductConfigurationState): Promise;\n highlightSearchTerm(name: string): React.ReactNode;\n}\n\nexport interface IProductConfigurationState {\n quantity: number;\n unitPrice: number;\n totalPrice: number;\n product: SimpleProduct;\n dimensions: ProductDimensionFull[];\n selectedDimensions: {};\n productAvailableQuantity?: IProductInventoryInformation;\n buttonDisabled: boolean;\n showAddConfirmation: boolean;\n errorMessage?: string;\n isBusy: boolean;\n errors: { dimension?: string[]; add?: string };\n}\n\n/**\n * Configure selected product for addition to order template.\n */\nexport class ProductConfiguration extends React.Component {\n private selectedDimensions: {} = {};\n\n constructor(props: IProductCnnfigurationProps) {\n super(props);\n\n this.state = {\n quantity: 1,\n unitPrice: props.product.Price,\n totalPrice: props.product.Price,\n product: props.product,\n dimensions: props.dimensions.sort((a, b) => a.DimensionTypeValue - b.DimensionTypeValue),\n selectedDimensions: {},\n buttonDisabled: false,\n showAddConfirmation: false\n } as IProductConfigurationState;\n }\n\n public shouldComponentUpdate(nextProps: IProductCnnfigurationProps, nextState: IProductConfigurationState): boolean {\n if (this.state === nextState && this.props === nextProps) {\n return false;\n }\n return true;\n }\n\n public render(): JSX.Element {\n const {\n context: {\n actionContext: {\n requestContext: { apiSettings }\n },\n request: { gridSettings }\n },\n resources: {\n addItemToTemplateText,\n addLineProductUnitPricePrefix,\n decrementButtonAriaLabel,\n incrementButtonAriaLabel,\n quantitySelectLabel,\n addLineProductUnitOfMeasurePrefix,\n totalPriceLabel\n },\n imageSettings,\n highlightSearchTerm\n } = this.props;\n const { buttonDisabled, product, quantity, unitPrice, totalPrice, showAddConfirmation, errors } = this.state;\n const isMultipleCatalogSelect = this.props.isMultipleCatalogFeatureEnabledInHq ? 'isMultipleCatalogSelect' : '';\n return (\n <>\n \n {this.props.searchForm}\n
\n
\n
\n \n
\n
{product?.ItemId}
\n {highlightSearchTerm(product?.Name ?? '')}\n
\n {addLineProductUnitPricePrefix}\n {` `}\n {this._formatPrice(unitPrice)}\n
\n
\n {addLineProductUnitOfMeasurePrefix}\n {` `}\n {product?.DefaultUnitOfMeasure}\n
\n
\n
\n
{this._getDimensionsNodes()}
\n
\n
\n
{quantitySelectLabel}
\n \n
\n
\n
\n {totalPriceLabel}\n {` `}\n {this._formatPrice(totalPrice)}\n
\n
\n \n {showAddConfirmation && (\n \n
\n )}\n {errors?.add && (\n
\n
\n )}\n \n {addItemToTemplateText}\n \n \n \n );\n }\n\n private _getConfirmationMessage(): string {\n const selectedDimensionNames = this.state.dimensions\n .map(dimension => {\n let variant = dimension.DimensionValues?.find(\n value => value.RecordId === this.selectedDimensions[dimension.DimensionTypeValue]\n )?.Value;\n if (dimension.DimensionTypeValue === 3) {\n variant = `size ${variant}`;\n }\n return variant;\n })\n .filter(value => value);\n\n return this.props.resources.addToTemplateConfirmation\n .replace('{count}', this.state.quantity.toString())\n .replace('{productAndDimensions}', `${this.state.product.Name}, ${Object.values(selectedDimensionNames).join(', ')}`);\n }\n\n private _getDimensionsNodes(): React.ReactElement[] {\n const { dimensions } = this.state;\n const { resources } = this.props;\n\n return dimensions?.map((dimension: ProductDimensionFull) => {\n const { DimensionValues, DimensionTypeValue } = dimension;\n const mapDimensions = (value: ProductDimensionValue): IDropdownItemProps => ({\n id: value.RecordId,\n value: value.Value || ''\n });\n const dimensionName = this._getDropdownName(DimensionTypeValue, resources);\n const dropdownList: IDropdownItemProps[] = DimensionValues ? DimensionValues.map(mapDimensions) : [];\n dropdownList.unshift({ id: 0, value: `Choose a ${dimensionName}` });\n\n return (\n
\n
{dimensionName}
\n {this.state.errors?.dimension?.includes(DimensionTypeValue.toString()) && (\n \n \n \n )}\n \n
\n );\n });\n }\n\n private readonly _getDimensionsError = (dimensionName: string) =>\n this.props.resources.dimensionMissingError.replace(/{dimensionName}/g, dimensionName);\n\n private readonly _addToTemplateHandler = async (event: React.MouseEvent) => {\n // Hide confirmation of previous addition when adding multiple items\n this.setState({\n isBusy: true,\n showAddConfirmation: false,\n errors: { ...this.state.errors, add: undefined }\n });\n\n const missingDimensions = this.state.dimensions\n .map(dimension => dimension.DimensionTypeValue.toString())\n .filter(type => !this.selectedDimensions[type]);\n\n this.setState({\n errors: { dimension: missingDimensions }\n });\n if (missingDimensions.length > 0) {\n this.setState({\n isBusy: false\n });\n return;\n }\n\n this.props\n .addToTemplateHandler({ ...this.state })\n .then(status => {\n // Validate against the existance of a ProductListId\n if (status.ProductListId) {\n this.setState({\n isBusy: false,\n showAddConfirmation: true\n });\n }\n })\n .catch(error => {\n const { addToTemplateDuplicateError, addToTemplateGenericError } = this.props.resources;\n let errorMessage;\n\n if (error.error.name === 'Microsoft_Dynamics_Commerce_Runtime_DuplicateObject') {\n errorMessage = addToTemplateDuplicateError;\n } else {\n errorMessage = addToTemplateGenericError;\n }\n\n this.setState({\n isBusy: false,\n errors: { ...this.state.errors, add: errorMessage }\n });\n this.props.context.telemetry.error('Error adding item to order template');\n });\n };\n\n private readonly _onQuantityChange = (newValue: number) => {\n this.setState({\n quantity: newValue,\n totalPrice: newValue * this.props.product.Price\n });\n };\n\n private readonly _updateDimensionValue = (\n productDimensionFull: ProductDimensionFull,\n newValueId: string | undefined\n ): ProductDimensionValue | undefined => {\n if (newValueId && productDimensionFull.DimensionValues) {\n return productDimensionFull.DimensionValues.find(dimension => dimension.RecordId === +newValueId);\n }\n\n return undefined;\n };\n\n // Rehydrate the selected variants price, available dimensions & sizes\n private readonly _onDimensionChanged = async (selection: IDropdownOnSelection): Promise => {\n const { product, dimensions, context } = this.props;\n const {\n actionContext,\n request: {\n apiSettings: { channelId }\n }\n } = context;\n\n // Remaining error notifications for missing dimensions\n const remainingDimensionsErrors = this.state.errors?.dimension?.filter(id => id !== selection.dropdownId.toString());\n\n this.setState({\n isBusy: false,\n showAddConfirmation: false,\n buttonDisabled: true,\n errors: { add: undefined, dimension: remainingDimensionsErrors }\n });\n\n // Update currently selected dimensions\n this.selectedDimensions[selection.dropdownId] = +selection.selectId;\n\n const mappedDimensions = dimensions\n ?.map(dimension => {\n return {\n DimensionTypeValue: dimension.DimensionTypeValue,\n DimensionValue:\n this._updateDimensionValue(dimension, this.selectedDimensions[dimension.DimensionTypeValue]) ||\n dimension.DimensionValue,\n ExtensionProperties: dimension.ExtensionProperties\n };\n })\n .filter(dimension => {\n return dimension && dimension.DimensionValue;\n });\n\n const variantProduct = await getSelectedVariant(\n new SelectedVariantInput(\n product.MasterProductId ? product.MasterProductId : product.RecordId,\n channelId,\n mappedDimensions,\n undefined,\n this.props.context.request\n ),\n actionContext\n );\n\n if (!variantProduct) {\n this.props.context.telemetry.error(\n `Error retrieving variant product for product ${product.MasterProductId ? product.MasterProductId : product.RecordId}`\n );\n return;\n }\n\n const dimensionInput = new GetDimensionsForSelectedVariantInput(\n variantProduct.RecordId,\n channelId,\n mappedDimensions,\n this.props.context.request\n );\n const variantDimensions = await getDimensionsForSelectedVariant(dimensionInput, actionContext);\n\n if (!variantDimensions) {\n this.props.context.telemetry.error('Error retrieving dimensions for reconfigured product variant');\n this.setState({\n buttonDisabled: false\n });\n return;\n }\n\n const availabilityInput = new ProductAvailabilitiesForSelectedVariantInput(\n product.MasterProductId ? product.MasterProductId : product.RecordId,\n channelId\n );\n\n // @TODO sync UX quantity w/ actual availability\n const newAvailableQuantity = await getProductAvailabilitiesForSelectedVariant(availabilityInput, actionContext);\n const priceInput = new PriceForSelectedVariantInput(product.RecordId, channelId);\n const productPrice = await getPriceForSelectedVariant(priceInput, actionContext);\n\n if (!productPrice) {\n this.props.context.telemetry.error('Error retrieving price for reconfigured product variant');\n this.setState({\n buttonDisabled: false\n });\n return;\n }\n\n this.setState({\n buttonDisabled: false,\n productAvailableQuantity: (newAvailableQuantity && newAvailableQuantity[0]) || undefined,\n unitPrice: +(productPrice.BasePrice || product.Price),\n dimensions: variantDimensions.sort((a, b) => a.DimensionTypeValue - b.DimensionTypeValue),\n product: variantProduct\n });\n };\n\n private readonly _getDropdownName = (dimensionType: number, resources: IAddLineToTemplateResources): string => {\n switch (dimensionType) {\n case 1: // Color\n return resources.productDimensionTypeColor;\n case 2: // Configuration\n return resources.productDimensionTypeConfiguration;\n case 3: // Size\n return resources.productDimensionTypeSize;\n case 4: // Style\n return resources.productDimensionTypeStyle;\n default:\n return '';\n }\n };\n\n private _formatPrice(price: number): string {\n const {\n context: {\n cultureFormatter: {\n formatCurrency,\n\n // @ts-expect-error\n currencyCode\n }\n }\n } = this.props;\n\n return formatCurrency(price.toFixed(2), currencyCode);\n }\n}\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { ProductDimensionFull } from '@msdyn365-commerce/commerce-entities';\nimport { IImageSettings, Image } from '@msdyn365-commerce/core';\nimport { ProductSearchResult } from '@msdyn365-commerce/retail-proxy';\nimport { getFallbackImageUrl, generateImageUrl } from '@msdyn365-commerce-modules/retail-actions';\nimport { Button } from '@msdyn365-commerce-modules/utilities';\nimport classnames from 'classnames';\nimport React, { useState } from 'react';\n\nimport { IAddLineToTemplateProps } from '.';\n\nexport interface IProductListProps extends IAddLineToTemplateProps {\n products: ProductSearchResult[];\n imageSettings: IImageSettings;\n searchForm: React.ReactNode;\n clickHandler(product: ProductSearchResult): Promise;\n highlightSearchTerm(name: string): React.ReactNode;\n renderResultCountText(): string;\n}\n\nexport const ProductList = (props: IProductListProps) => {\n const {\n products,\n context: {\n actionContext: {\n requestContext: { apiSettings }\n },\n request: { gridSettings },\n cultureFormatter: {\n formatCurrency,\n\n // @ts-expect-error\n currencyCode\n }\n },\n clickHandler,\n highlightSearchTerm,\n renderResultCountText,\n resources: { selectProductButtonText },\n imageSettings\n } = props;\n\n return (\n <>\n

\n {renderResultCountText()}\n

\n {props.searchForm}\n
\n {products.map((product: ProductSearchResult, index: number) => {\n const { Price, ItemId, Name, PrimaryImageUrl } = product;\n const price = formatCurrency(Price.toFixed(2), currencyCode);\n const primaryImageSource = generateImageUrl(PrimaryImageUrl ?? '', apiSettings) ?? '';\n const fallBackImg = getFallbackImageUrl(ItemId, apiSettings, props.context.request.app?.config?.OmniChannelMedia) ?? '';\n\n return (\n
\n
\n \n
\n
{ItemId}
\n {highlightSearchTerm(Name ?? '')}\n
\n
\n
\n {price}\n \n
\n
\n );\n })}\n
\n \n );\n};\n\ninterface IProductSelectButton {\n product: ProductSearchResult;\n buttonText: string;\n clickHandler(product: ProductSearchResult): Promise;\n}\n\nconst ProductSelectButton = (props: IProductSelectButton) => {\n const [isBusy, setBusy] = useState(false);\n const { product, buttonText, clickHandler } = props;\n const getClickHandler = React.useCallback(async () => {\n setBusy(!isBusy);\n await clickHandler(product);\n setBusy(!isBusy);\n }, [clickHandler, isBusy, product]);\n\n return (\n \n {buttonText}\n \n );\n};\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { Button, ITelemetryContent } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport { IOrderTemplateLineViewModel } from '../order-template';\nimport { IOrderTemplateData } from '../order-template.data';\nimport { IOrderTemplateProps } from '../order-template.props.autogenerated';\nimport { AddLineToTemplate } from '.';\n\ninterface IOrderTemplateBulkActionsProps extends IOrderTemplateProps {\n orderTemplateId: string;\n selectedLines: IOrderTemplateLineViewModel[];\n isMinifiedView: boolean;\n isMultipleCatalogFeatureEnabledInHq: boolean;\n telemetryContent?: ITelemetryContent;\n onAddSelectionToBag(): void;\n onRemoveSelection(): void;\n}\n\ninterface IOrderTemplateBulkActionsState {\n isAddDisabled: boolean;\n isRemoveDisabled: boolean;\n}\n\n/**\n * Bulk Order Template line actions.\n */\nexport class OrderTemplateBulkActions extends React.PureComponent {\n public state: IOrderTemplateBulkActionsState = {\n isAddDisabled: true,\n isRemoveDisabled: true\n };\n\n public static getDerivedStateFromProps(\n props: IOrderTemplateBulkActionsProps,\n state: IOrderTemplateBulkActionsState\n ): IOrderTemplateBulkActionsState {\n const selectedLines = props.selectedLines.length;\n let nextState = { ...state };\n nextState = {\n isAddDisabled: selectedLines === 0,\n isRemoveDisabled: selectedLines === 0\n };\n return nextState;\n }\n\n public render(): JSX.Element {\n const {\n addLineModalLinkText,\n searchButtonAriaLabel,\n searchInputAriaLabel,\n searchModalPlaceholderText,\n selectCatalogTitleText,\n selectProductButtonText,\n addItemToTemplateText,\n addLineProductUnitPricePrefix,\n backButtonText,\n decrementButtonAriaLabel,\n incrementButtonAriaLabel,\n quantitySelectLabel,\n addLineProductUnitOfMeasurePrefix,\n notFoundSearchErrorNotice,\n notFoundSearchErrorRedediation,\n searchErrorMessage,\n productDimensionTypeColor,\n productDimensionTypeConfiguration,\n productDimensionTypeSize,\n productDimensionTypeStyle,\n addSelectedToBagButtonText,\n removeSelectedToBagButtonText,\n searchResultsCountVerbage,\n searchResultsCountSubject,\n addToTemplateConfirmation,\n totalPriceLabel,\n progressNotificationText,\n addToTemplateDuplicateError,\n addToTemplateGenericError,\n dimensionMissingError\n } = this.props.resources;\n\n const addLineProps = {\n context: this.props.context,\n telemetryContent: this.props.telemetryContent,\n resources: {\n addLineModalLinkText,\n searchButtonAriaLabel,\n searchInputAriaLabel,\n searchModalPlaceholderText,\n selectCatalogTitleText,\n selectProductButtonText,\n addItemToTemplateText,\n addLineProductUnitPricePrefix,\n backButtonText,\n decrementButtonAriaLabel,\n incrementButtonAriaLabel,\n quantitySelectLabel,\n addLineProductUnitOfMeasurePrefix,\n notFoundSearchErrorNotice,\n notFoundSearchErrorRedediation,\n searchErrorMessage,\n productDimensionTypeColor,\n productDimensionTypeConfiguration,\n productDimensionTypeSize,\n productDimensionTypeStyle,\n searchResultsCountVerbage,\n searchResultsCountSubject,\n addToTemplateConfirmation,\n totalPriceLabel,\n progressNotificationText,\n addToTemplateDuplicateError,\n addToTemplateGenericError,\n dimensionMissingError\n },\n imageSettings: this.props.config.imageSettings,\n orderTemplateId: this.props.orderTemplateId,\n isMultipleCatalogFeatureEnabledInHq: this.props.isMultipleCatalogFeatureEnabledInHq,\n catalogs: this.props.data.catalogs?.result\n };\n\n return (\n <>\n \n \n \n {!this.props.isMinifiedView && addSelectedToBagButtonText}\n \n \n \n {!this.props.isMinifiedView && removeSelectedToBagButtonText}\n \n \n );\n }\n\n private readonly addHandler = (event: React.MouseEvent) => {\n this.setState({\n isAddDisabled: true\n });\n\n this.props.onAddSelectionToBag();\n\n this.setState({\n isAddDisabled: false\n });\n };\n\n private readonly removeHandler = (event: React.MouseEvent) => {\n this.setState({\n isRemoveDisabled: true\n });\n\n this.props.onRemoveSelection();\n };\n}\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport {\n AddOrderTemplateToCartComponent,\n ILinesAddedToCartDialogResources,\n IOrderTemplateNameDialogResources,\n RenameOrderTemplateComponent,\n OrderTemplateNameDialog\n} from '@msdyn365-commerce/components';\nimport { IComponentProps, ICoreContext } from '@msdyn365-commerce/core';\nimport { ProductList } from '@msdyn365-commerce/retail-proxy';\nimport { OrderTemplate, Random } from '@msdyn365-commerce-modules/retail-actions';\nimport { Button, ITelemetryContent, Popover } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\nimport { useState } from 'react';\n\nexport interface IOrderTemplateActionsData {\n orderTemplate: OrderTemplate;\n}\n\nexport interface IOrderTemplateActionsProps extends IComponentProps {\n context: ICoreContext;\n telemetryContent?: ITelemetryContent;\n handlers: {\n onRemoveTemplate(orderTemplateId: string): void;\n onRenameTemplate(orderTemplate: ProductList): Promise;\n };\n renameOrderTemplateDialogStrings: IOrderTemplateNameDialogResources;\n isMultipleCatalogFeatureEnabledInHq?: boolean;\n resources: {\n addTemplateToBagButtonText: string;\n renameTemplateButtonText: string;\n deleteTemplateButtonText: string;\n closeWindowButtonText: string;\n addToCartFailureMessage: string;\n addToCartSuccessMessage: string;\n addToCartProcessMessage: string;\n orderTemplateErrorMessage: string;\n linesAddedToCartDialogResources: ILinesAddedToCartDialogResources;\n };\n}\n\nexport interface IOrderTemplateActionsViewProps {\n addTemplateToBag: React.ReactNode;\n renameTemplate?: React.ReactNode;\n removeTemplate?: React.ReactNode;\n isMultipleCatalogsFeatureEnabled?: boolean;\n actionsSplitButton?: React.ReactNode;\n}\n\n/**\n * Remove Order Action.\n * @param props -Order template action props.\n * @returns Remove order template.\n */\nconst removeOrderActionHandler = (props: IOrderTemplateActionsProps) => () => {\n _removeOrderTemplate(props);\n};\n\nexport const OrderTemplateActionsView = (props: IOrderTemplateActionsProps): IOrderTemplateActionsViewProps => {\n const { resources, isMultipleCatalogFeatureEnabledInHq } = props;\n const { deleteTemplateButtonText } = resources;\n\n return {\n addTemplateToBag: _getOrderTemplateAddToCartDialog(props),\n renameTemplate: !isMultipleCatalogFeatureEnabledInHq && _getOrderTemplateRenameControl(props),\n removeTemplate: !isMultipleCatalogFeatureEnabledInHq && (\n \n ),\n actionsSplitButton: isMultipleCatalogFeatureEnabledInHq && \n };\n};\n\nconst _removeOrderTemplate = (props: IOrderTemplateActionsProps): void => {\n const {\n data: { orderTemplate },\n handlers\n } = props;\n const { onRemoveTemplate } = handlers;\n\n if (onRemoveTemplate) {\n onRemoveTemplate(orderTemplate.productList.Id);\n }\n};\n\nconst _getOrderTemplateAddToCartDialog = (props: IOrderTemplateActionsProps): React.ReactNode => {\n const {\n data: { orderTemplate },\n typeName,\n id,\n context,\n telemetryContent,\n resources,\n isMultipleCatalogFeatureEnabledInHq\n } = props;\n const {\n addTemplateToBagButtonText,\n closeWindowButtonText,\n addToCartFailureMessage,\n addToCartSuccessMessage,\n addToCartProcessMessage,\n orderTemplateErrorMessage,\n linesAddedToCartDialogResources\n } = resources;\n\n const dialogStrings = {\n closeWindowButtonText,\n addToCartFailureMessage,\n addToCartSuccessMessage,\n addToCartProcessMessage,\n orderTemplateErrorMessage,\n linesAddedToCartDialogResources\n };\n\n return (\n \n );\n};\n\nconst _getOrderTemplateRenameControl = (props: IOrderTemplateActionsProps): React.ReactNode => {\n const { renameOrderTemplateDialogStrings, resources, context, handlers } = props;\n return (\n \n );\n};\n\nlet buttonEventReference: HTMLButtonElement | undefined;\nexport const ActionsSplitButton: React.FC = (props: IOrderTemplateActionsProps) => {\n const [isStatementRequestAdminDropdownOpen, setIsStatementRequestAdminDropdownOpen] = useState(false);\n const [renameOrderTemplateDialogOpen, setOrderTemplateNameDialogOpen] = React.useState(false);\n\n const onOrderTemplateNameCancel = () => {\n context.telemetry.debug('Rename of template was canceled.');\n buttonEventReference?.focus();\n };\n\n const onRenameButtonClick = (event: React.MouseEvent) => {\n buttonEventReference = event.target as HTMLButtonElement;\n setOrderTemplateNameDialogOpen(true);\n event.preventDefault();\n };\n const onToggleDropdown1 = () => {\n setIsStatementRequestAdminDropdownOpen(!isStatementRequestAdminDropdownOpen);\n };\n const {\n data: { orderTemplate },\n resources,\n renameOrderTemplateDialogStrings,\n context\n } = props;\n\n const className = 'ms-order-template-action-bar';\n\n const popoverReference = React.createRef();\n const renderModalPopup = (\n \n );\n const requestStatementDropdownString = `request-statement-dropdown-id-${Random.Guid.generateGuid()}`;\n\n return (\n
\n {renderModalPopup}\n \n {'Options'}\n \n \n \n\n \n {'Delete'}\n \n \n
\n );\n};\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { PriceComponent } from '@msdyn365-commerce/components';\nimport { ICoreContext, IImageSettings, Image, ITelemetry } from '@msdyn365-commerce/core';\nimport { ProductListLine } from '@msdyn365-commerce/retail-proxy';\nimport { ProductCatalog, ProductPrice, SimpleProduct } from '@msdyn365-commerce/retail-proxy/dist/Entities/CommerceTypes.g';\nimport { ArrayExtensions, getFallbackImageUrl, validateCatalogId } from '@msdyn365-commerce-modules/retail-actions';\nimport { Button, INodeProps } from '@msdyn365-commerce-modules/utilities';\nimport React, { useState } from 'react';\n\nimport { IOrderTemplateLineViewModel } from '../order-template';\nimport OrderTemplateQuantity from './common/order-template-quantity';\n\nexport interface IOrderTemplateLineProps extends ProductListLine {\n orderTemplateLine: IOrderTemplateLineViewModel;\n productListLine: ProductListLine;\n price?: ProductPrice;\n context: ICoreContext;\n productUrl: string;\n imageSettings?: IImageSettings;\n telemetry: ITelemetry;\n moduleId: string;\n moduleTypeName: string;\n quantity: number;\n isQuantityDisabledForUpdate?: boolean;\n handlers: {\n onAddToBag(product: SimpleProduct, quantity: number, itemKey: string, catalogId?: number | undefined): void;\n onRemoveItem(line: IOrderTemplateLineViewModel): void;\n onChangeQuantity(orderTemplateLineId: string, quantity: number, props?: IOrderTemplateLineProps): void;\n onSelect(line: IOrderTemplateLineViewModel, isChecked: boolean): void;\n };\n resources: {\n selectOneRowText?: string;\n moreButtonText?: string;\n viewProductDetailsText?: string;\n productDimensionTypeColor: string;\n productDimensionTypeSize: string;\n productDimensionTypeStyle: string;\n originalPriceText: string;\n currentPriceText: string;\n freePriceText: string;\n inputQuantityAriaLabel: string;\n removeFromOrderTemplateLinesText: string;\n addToBagButtonText: string;\n deleteButtonText: string;\n incrementButtonAriaLabel?: string;\n decrementButtonAriaLabel?: string;\n editOrderTemplateLineQuantityError?: string;\n unavailableProductErrorMessage?: string;\n outOfStockProductErrorMessage?: string;\n };\n index: number;\n isMobile: boolean;\n productQuantityView?: React.ReactNode;\n addToBagButton?: React.ReactNode;\n removeButton?: React.ReactNode;\n toggleDetailsDisplayed(props: IOrderTemplateLineProps): void;\n isMultipleCatalogFeatureEnabledInHq?: boolean;\n catalogs?: ProductCatalog[];\n error?: string;\n shouldDisable?: boolean;\n}\n\nexport interface IOrderTemplateLineViewProps {\n key?: string;\n productImage: React.ReactNode;\n productPrice?: React.ReactNode;\n addToBagButton?: React.ReactNode;\n removeButton?: React.ReactNode;\n productName?: string;\n productNumber?: React.ReactNode;\n productInfo?: React.ReactNode;\n productLabel?: React.ReactNode;\n productUnitOfMeasure?: React.ReactNode;\n productQuantity?: number;\n productQuantityView?: React.ReactNode;\n productListId?: string;\n selectLine?: React.ReactNode;\n popUp?: JSX.Element;\n extraActionsPopup?: JSX.Element | null | undefined;\n isMobile?: boolean;\n isMultipleCatalogFeatureEnabledInHq?: boolean;\n productLineCatalog?: React.ReactNode;\n disabled?: boolean;\n}\n\ninterface IEventHandlerFactory {\n getAddToBag(): (event: React.MouseEvent) => void;\n getRemoveItem(): (event: React.MouseEvent) => void;\n}\n\nconst OrderTemplateLineActions = (props: IOrderTemplateLineProps): IEventHandlerFactory => {\n const { orderTemplateLine, productListLine, quantity, handlers } = props;\n const { LineId, CatalogId } = productListLine;\n const { onAddToBag, onRemoveItem } = handlers;\n\n return {\n getAddToBag: () => (event: React.MouseEvent) => {\n LineId &&\n orderTemplateLine.fullProduct &&\n onAddToBag(orderTemplateLine.fullProduct.ProductDetails, quantity, LineId, CatalogId);\n },\n getRemoveItem: () => (event: React.MouseEvent) => LineId && onRemoveItem(props.orderTemplateLine)\n };\n};\n\ninterface IPopupProps extends IOrderTemplateLineProps {\n addButtonClassName: string;\n removeButtonClassName: string;\n}\n\nconst PopUp = (props: IPopupProps): JSX.Element | null => {\n const { addToBagButtonText, removeFromOrderTemplateLinesText, moreButtonText, viewProductDetailsText } = props.resources;\n const [showMobile, setShowMobile] = useState(false);\n const componentClassName = 'ms-table';\n\n const getViewHandler = () => (event: React.MouseEvent) => {\n props.toggleDetailsDisplayed(props);\n };\n\n const toggle = React.useCallback(() => {\n setShowMobile(!showMobile);\n }, [showMobile]);\n\n return (\n
\n \n {showMobile && (\n
\n \n View\n \n {getActionButton(\n props.isMobile,\n props.removeButtonClassName,\n removeFromOrderTemplateLinesText,\n OrderTemplateLineActions(props).getRemoveItem()\n )}\n {getActionButton(\n props.isMobile,\n props.addButtonClassName,\n addToBagButtonText,\n OrderTemplateLineActions(props).getAddToBag()\n )}\n
\n )}\n
\n );\n};\n\nconst getActionButton = (\n isMobile: boolean,\n className: string,\n buttonText: string,\n clickHandler: (event: React.MouseEvent) => void\n): React.ReactNode => (\n \n);\n\nconst getDesktopActionButton = (\n className: string,\n buttonText: string,\n clickHandler: (event: React.MouseEvent) => void\n): React.ReactNode => (\n \n);\n/**\n * On Select line function.\n * @param orderTemplateLine -Order template line.\n * @param input -Order template line props.\n * @returns Set on select order template.\n */\nconst onSelectLineHandler = (orderTemplateLine: IOrderTemplateLineViewModel, input: IOrderTemplateLineProps) => (\n event: React.ChangeEvent\n) => {\n orderTemplateLine.isChecked = !orderTemplateLine.isChecked;\n\n input.handlers.onSelect(orderTemplateLine, event.target.checked);\n};\n\nexport const OrderTemplateLineView = (input: IOrderTemplateLineProps): IOrderTemplateLineViewProps | null => {\n const {\n orderTemplateLine,\n productListLine,\n price,\n context,\n imageSettings,\n quantity,\n resources,\n isMobile,\n isMultipleCatalogFeatureEnabledInHq\n } = input;\n const product = orderTemplateLine.fullProduct;\n const { LineId, UnitOfMeasure } = productListLine;\n const { removeFromOrderTemplateLinesText, addToBagButtonText, selectOneRowText } = resources;\n if (!product) {\n return null;\n }\n\n const { ItemId, PrimaryImageUrl } = product.ProductDetails;\n const fallbackImage = getFallbackImageUrl(\n ItemId,\n context.actionContext.requestContext.apiSettings,\n context.request.app?.config?.OmniChannelMedia\n );\n const addButtonClassName = input.isMobile ? 'ms-table__row-links-add' : 'ms-order-template-table-line__product-add-button';\n const removeButtonClassName = input.isMobile ? 'ms-table__row-links-delete' : 'ms-order-template-table-line__product-remove-button';\n\n return {\n isMobile,\n isMultipleCatalogFeatureEnabledInHq: isMultipleCatalogFeatureEnabledInHq,\n selectLine: (\n \n ),\n key: LineId!,\n productLineCatalog: isMultipleCatalogFeatureEnabledInHq && renderProductCatalog(input),\n productImage: _renderProductImage(\n 'ms-order-template-table-line__product-image',\n context,\n product.ProductDetails.Name!,\n PrimaryImageUrl,\n fallbackImage,\n imageSettings\n ),\n productInfo: renderProductInfo(input),\n productPrice: price && _renderPrice(input),\n productNumber: product && (\n <>\n
{ItemId}
\n {input.error !== 'NONE' ? (\n
{_renderProductError(input)}
\n ) : (\n undefined\n )}\n \n ),\n productUnitOfMeasure: price ? (\n
{UnitOfMeasure || price.UnitOfMeasure}
\n ) : (\n undefined\n ),\n productListId: LineId!,\n removeButton:\n !isMultipleCatalogFeatureEnabledInHq &&\n getActionButton(\n input.isMobile,\n removeButtonClassName,\n removeFromOrderTemplateLinesText,\n OrderTemplateLineActions(input).getRemoveItem()\n ),\n productQuantityView:
{_generateQuantity(input, LineId!)}
,\n productQuantity: quantity,\n addToBagButton:\n !isMultipleCatalogFeatureEnabledInHq &&\n getActionButton(input.isMobile, addButtonClassName, addToBagButtonText, OrderTemplateLineActions(input).getAddToBag()),\n extraActionsPopup:\n !isMobile && isMultipleCatalogFeatureEnabledInHq ? (\n \n ) : (\n undefined\n ),\n popUp: ,\n disabled: input.shouldDisable\n };\n};\n\nconst ExtraActionsPopup = (props: IPopupProps): JSX.Element | null => {\n const [showActions, setShowActions] = useState(false);\n const toggle = React.useCallback(() => {\n setShowActions(!showActions);\n }, [showActions]);\n\n const className = 'ms-order-template-table-line__extra-actions-cell';\n const actionsContainerClassName = `${className}__actions-container`;\n return (\n
\n
\n );\n};\n\nexport const OrderTemplateMobileLineView = (input: IOrderTemplateLineProps): IOrderTemplateLineViewProps | undefined => {\n const { orderTemplateLine, productListLine, price, context, imageSettings, isMultipleCatalogFeatureEnabledInHq } = input;\n const product = orderTemplateLine.fullProduct;\n const { LineId, UnitOfMeasure } = productListLine;\n if (!product) {\n return;\n }\n const { ItemId, PrimaryImageUrl } = product.ProductDetails;\n const fallbackImage = getFallbackImageUrl(\n ItemId,\n context.actionContext.requestContext.apiSettings,\n context.request.app?.config?.OmniChannelMedia\n );\n\n return {\n productLineCatalog: isMultipleCatalogFeatureEnabledInHq && renderProductCatalog(input),\n productImage: _renderProductImage(\n 'thumbnail',\n context,\n product.ProductDetails.Name!,\n PrimaryImageUrl,\n fallbackImage,\n imageSettings\n ),\n productInfo: renderProductInfo(input),\n productPrice: price && _renderPrice(input),\n productNumber: ItemId,\n productUnitOfMeasure: UnitOfMeasure || price?.UnitOfMeasure,\n productQuantityView: _generateQuantity(input, LineId!)\n };\n};\n\nexport interface IOrderTemplateProductQuantityViewProps {\n ContainerProps: INodeProps;\n input: React.ReactNode;\n}\n\n/**\n * On Change function.\n * @param onChangeQuantity -On change quantity function.\n * @param itemKey -String.\n * @param props -Order template line props.\n * @returns Set change quantity.\n */\nconst onChangeHandler = (\n onChangeQuantity: (orderTemplateLineId: string, quantity: number, props?: IOrderTemplateLineProps | undefined) => void,\n itemKey: string,\n props: IOrderTemplateLineProps\n) => (newValue: number) => {\n if (onChangeQuantity) {\n onChangeQuantity(itemKey, newValue, props);\n }\n};\n\nconst _generateQuantity = (props: IOrderTemplateLineProps, itemKey: string): React.ReactNode => {\n const { handlers, resources, quantity } = props;\n const { onChangeQuantity } = handlers;\n return (\n \n );\n};\n\nexport const _renderProductImage = (\n className: string,\n context: ICoreContext,\n heading: string,\n image?: string,\n fallbackImage?: string,\n imageSettings?: IImageSettings\n): JSX.Element | null => {\n const defaultImageSettings: IImageSettings = {\n viewports: {\n xs: { q: 'w=64&h=64&m=6', w: 0, h: 0 },\n lg: { q: 'w=64&h=64&m=6', w: 0, h: 0 },\n xl: { q: 'w=64&h=64&m=6', w: 0, h: 0 }\n },\n lazyload: true\n };\n\n return (\n \n );\n};\n\nexport const renderProductCatalog = (props: IOrderTemplateLineProps) => {\n const catalogId = props.productListLine.CatalogId;\n validateCatalogId(catalogId);\n\n if (!props.context.request.user.isB2b || !catalogId || !ArrayExtensions.hasElements(props.catalogs)) {\n return null;\n }\n\n const catalog = props.catalogs.find(item => item.RecordId === catalogId);\n\n if (!catalog || !catalog.Name) {\n return null;\n }\n\n return
{catalog.Name}
;\n};\n\nconst _renderPrice = (props: IOrderTemplateLineProps): JSX.Element | null => {\n const { price, context, moduleId, moduleTypeName, resources } = props;\n\n if (price) {\n return (\n \n );\n }\n return null;\n};\n\nconst _renderProductDimensions = (props: IOrderTemplateLineProps): (string | undefined)[] => {\n const { orderTemplateLine } = props;\n\n if (!orderTemplateLine.fullProduct || !orderTemplateLine.fullProduct.ProductDetails.Dimensions) {\n return [];\n }\n\n return orderTemplateLine.fullProduct.ProductDetails.Dimensions.map(dimension => {\n if (!dimension.DimensionValue || !dimension.DimensionValue.Value) {\n return undefined;\n }\n\n return dimension.DimensionValue.Value;\n });\n};\n\nconst _renderProductError = (props: IOrderTemplateLineProps) => {\n const { error, resources } = props;\n\n if (!error) {\n return '';\n }\n\n const errorMessages = {\n OOS: resources.outOfStockProductErrorMessage,\n UNASSORTED: resources.unavailableProductErrorMessage,\n NONE: ''\n };\n\n return errorMessages[error];\n};\n\nexport const renderProductInfo = (props: IOrderTemplateLineProps): React.ReactNode | undefined => {\n const { orderTemplateLine, productUrl } = props;\n const name = orderTemplateLine.fullProduct?.ProductDetails.Name;\n\n const dimensions = _renderProductDimensions(props);\n if (!orderTemplateLine.fullProduct) {\n return [];\n }\n\n const productName = productUrl ? (\n \n {name}\n \n ) : (\n
{name}
\n );\n\n const dimensionsLine: string = dimensions.join(', ');\n\n return (\n
\n
{productName}
\n
{dimensionsLine}
\n
\n );\n};\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport classnames from 'classnames';\nimport * as React from 'react';\n\nimport { orderTemplateLinesStatus } from '../order-template';\n\nexport interface IOrderTemplateLinesStatusMessageProps {\n className?: string;\n errorType: orderTemplateLinesStatus;\n text?: string;\n}\n\nexport const OrderTemplateLinesStatusMessage: React.FC = ({ className, errorType, text }) => {\n switch (errorType) {\n case 'EMPTY':\n return

{text}

;\n case 'FAILED':\n return

{text}

;\n case 'LOADING':\n default:\n return

{text}

;\n }\n};\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport * as React from 'react';\n\nimport { IOrderTemplateLineViewModel } from '../order-template';\n\nexport interface IOrderTemplateTableHeadingProps {\n selectAllRowsText?: string;\n productNumber: string;\n productName: string;\n productUnitPrice: string;\n productUOM: string;\n productQuantity: string;\n productActions: string;\n lines: IOrderTemplateLineViewModel[];\n isMobile: boolean;\n clickHandler(isChecked: boolean): void;\n productImage?: string;\n isMultipleCatalogFeatureEnabledInHq?: boolean;\n productLineCatalogName?: string;\n}\n\n/**\n * Order Template's table state.\n */\nexport interface IOrderTemplateTableHeadingState {\n isChecked: boolean;\n}\n\nexport interface IOrderTemplateTableShortHeading {\n productNumber: string;\n productActions: string;\n}\n\n/**\n * Order Template's table heading.\n */\nexport class OrderTemplateTableHeading extends React.PureComponent {\n public state: IOrderTemplateTableHeadingState = {\n isChecked: false\n };\n\n private readonly componentClassName: string = 'ms-table';\n\n public static getDerivedStateFromProps(\n props: IOrderTemplateTableHeadingProps,\n state: IOrderTemplateTableHeadingState\n ): IOrderTemplateTableHeadingState {\n const checkedLines = props.lines.filter(line => !line.isChecked).length;\n let nextState = { ...state };\n nextState = { isChecked: checkedLines === 0 };\n return nextState;\n }\n\n public getOnChange = () => (event: React.ChangeEvent) => {\n this.setState(\n {\n isChecked: this.state.isChecked\n },\n () => {\n this.props.clickHandler(!this.state.isChecked);\n }\n );\n };\n\n public render(): JSX.Element {\n return (\n \n \n \n \n \n {!this.props.isMobile && this.props.isMultipleCatalogFeatureEnabledInHq ? (\n {this.props.productLineCatalogName}\n ) : null}\n {!this.props.isMobile ? {this.props.productImage} : null}\n {this.props.productNumber}\n {!this.props.isMobile ? {this.props.productName} : null}\n {!this.props.isMobile ? {this.props.productUnitPrice} : null}\n {!this.props.isMobile ? {this.props.productUOM} : null}\n {!this.props.isMobile ? {this.props.productQuantity} : null}\n {!this.props.isMobile ? {this.props.productActions} : }\n \n \n );\n }\n}\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport {\n IItemAddedToCartDialogData,\n IItemAddedToCartDialogResources,\n ILinesAddedToCartDialogResources,\n IOrderTemplateNameDialogResources,\n ItemAddedToCartDialog\n} from '@msdyn365-commerce/components';\nimport MsDyn365, { AsyncResult, getCatalogId, getUrlSync, ICoreContext, IRequestContext } from '@msdyn365-commerce/core';\nimport { ICartActionResult } from '@msdyn365-commerce/global-state';\nimport { ProductList, ProductListLine } from '@msdyn365-commerce/retail-proxy';\nimport {\n deleteAsync,\n removeProductListLinesAsync,\n updateProductListLinesAsync\n} from '@msdyn365-commerce/retail-proxy/dist/DataActions/ProductListsDataActions.g';\nimport { FeatureState, SimpleProduct } from '@msdyn365-commerce/retail-proxy/dist/Entities/CommerceTypes.g';\nimport {\n ArrayExtensions,\n createGetFeatureStateInput,\n getFeatureState,\n getPriceForSelectedVariant,\n getProductUrlSync,\n ObjectExtensions,\n OrderTemplate,\n OrderTemplateLine,\n PriceForSelectedVariantInput,\n StringExtensions\n} from '@msdyn365-commerce-modules/retail-actions';\nimport {\n Alert,\n getTelemetryObject,\n Heading,\n IModuleProps,\n INodeProps,\n ITelemetryContent,\n UncontrolledPagination\n} from '@msdyn365-commerce-modules/utilities';\nimport classnames from 'classnames';\nimport debounce from 'lodash/debounce';\nimport { action, computed, observable } from 'mobx';\nimport { observer } from 'mobx-react';\nimport * as React from 'react';\n\nimport {\n IOrderTemplateActionsProps,\n IOrderTemplateActionsViewProps,\n IOrderTemplateLineProps,\n IOrderTemplateLineViewProps,\n IOrderTemplateTableHeadingProps,\n OrderTemplateActionsView,\n OrderTemplateLinesStatusMessage,\n OrderTemplateLineView,\n OrderTemplateMobileLineView,\n OrderTemplateTableHeading\n} from '../..';\nimport { ActiveOrderTemplateLinesInput } from './actions/get-order-template';\nimport { OrderTemplateBulkActions } from './components/bulk-actions';\nimport { IOrderTemplateData } from './order-template.data';\nimport { IOrderTemplateProps, IOrderTemplateResources } from './order-template.props.autogenerated';\nimport Spinner from './components/add-line/spinner';\n\nexport interface IOrderTemplateLineActionMessageState {\n itemKey: string;\n userMessage: string;\n statusCssString: string;\n messageGlyph: string;\n isOpen: boolean;\n isItemAddedToOrderTemplateOpen: boolean;\n isConfirmAddSelectionToBagModalOpen: boolean;\n itemAddedToCartDialogData?: IItemAddedToCartDialogData;\n productSelection: IOrderTemplateLineViewModel[];\n isDetailsDisplayed: boolean;\n detailedProductView?: IOrderTemplateLineViewProps;\n isQuantityDisabledForUpdate?: boolean;\n}\n\nexport type orderTemplateLinesStatus = 'LOADING' | 'SUCCESS' | 'FAILED' | 'EMPTY';\ntype GridSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';\n\nexport interface IOrderTemplateViewProps extends IOrderTemplateProps {\n OrderTemplateLines: IModuleProps;\n callbacks?: IOrderTemplateLinesCallbacks;\n status?: orderTemplateLinesStatus;\n statusMessage?: React.ReactNode;\n heading?: React.ReactNode;\n OrderTemplateActions?: INodeProps;\n ProductsTable?: INodeProps;\n ProductsTableRow?: INodeProps;\n ProductsTableHeading?: React.ReactNode;\n ProductDetails?: INodeProps;\n orderLines?: IOrderTemplateLineViewProps[];\n productListLines?: ProductListLine[];\n productsStatusMessage?: React.ReactNode;\n orderActions?: IOrderTemplateActionsViewProps | null;\n resources: IOrderTemplateResources;\n pagination?: React.ReactNode;\n itemAddedToCartDialog?: React.ReactNode;\n bulkOrderLineActions?: React.ReactNode;\n isDetailsDisplayed?: boolean;\n detailedProduct?: IOrderTemplateLineProps;\n detailedProductView?: IOrderTemplateLineViewProps;\n productQuantityView?: React.ReactNode;\n addButton?: React.ReactNode;\n isMobile?: boolean;\n toggleDetailsDisplayed?(props: IOrderTemplateLineProps | undefined): void;\n}\n\nexport interface IOrderTemplateLinesCallbacks {\n updateQuantity(itemKey: string, quantity: number): void;\n}\n\nexport interface IOrderTemplateLineViewModel extends OrderTemplateLine {\n isChecked: boolean;\n productQuantityView: React.ReactNode;\n}\n\n/**\n *\n * OrderTemplateLines component.\n * @extends {React.PureComponent, IOrderTemplateLineActionMessageState>}\n */\n@observer\nclass OrderTemplateLines extends React.Component, IOrderTemplateLineActionMessageState> {\n private readonly className: string;\n\n private readonly telemetryContent?: ITelemetryContent;\n\n @observable\n private _viewport: GridSize;\n\n @computed get isMobile(): boolean {\n return this._viewport === 'xs' || this._viewport === 'sm';\n }\n\n constructor(props: IOrderTemplateProps, state: IOrderTemplateLineActionMessageState) {\n super(props);\n this.className = 'ms-order-template';\n this._viewport =\n props.context.request && props.context.request.device && props.context.request.device.Type === 'Mobile' ? 'xs' : 'lg';\n this._updateViewport = this._updateViewport.bind(this);\n\n this.state = {\n itemKey: '',\n userMessage: '',\n statusCssString: 'success',\n messageGlyph: 'fas fa-check',\n isOpen: false,\n isItemAddedToOrderTemplateOpen: false,\n isConfirmAddSelectionToBagModalOpen: false,\n productSelection: [],\n isDetailsDisplayed: false,\n isQuantityDisabledForUpdate: false\n };\n this.telemetryContent = getTelemetryObject(\n this.props.context.request.telemetryPageName!,\n this.props.friendlyName,\n this.props.telemetry\n );\n this._updateViewport();\n\n if (MsDyn365.isBrowser && !this.props.context.request.user.isAuthenticated && !this.props.context.request.params.isEditor) {\n window.location.assign(this.props.context.request.user.signInUrl || '/');\n }\n }\n\n @action\n public async componentDidMount(): Promise {\n this.setState({});\n const orderTemplate = await this.props.data.orderTemplate;\n this.props.config.heading!.text = orderTemplate?.productList.Name || '';\n this.setState({\n productSelection: orderTemplate?.orderTemplateLines as IOrderTemplateLineViewModel[]\n });\n\n if (MsDyn365.isBrowser) {\n window.addEventListener('resize', this._updateViewport);\n this._updateViewport();\n }\n }\n\n public componentWillUnmount(): void {\n if (MsDyn365.isBrowser) {\n window.removeEventListener('resize', this._updateViewport);\n }\n }\n\n public shouldComponentUpdate(\n nextProps: IOrderTemplateProps,\n nextState: IOrderTemplateLineActionMessageState\n ): boolean {\n if (this.state === nextState && this.props === nextProps) {\n return false;\n }\n return true;\n }\n\n public render(): JSX.Element | null {\n const { heading, className } = this.props.config;\n const { emptyOrderTemplateLinesText, errorGettingOrderTemplateLines } = this.props.resources;\n const { orderTemplate, cart } = this.props.data;\n\n if (cart.status === 'LOADING' || ObjectExtensions.isNullOrUndefined(orderTemplate) || orderTemplate.status === 'LOADING') {\n const errorProps: IOrderTemplateViewProps = {\n ...(this.props as IOrderTemplateProps),\n OrderTemplateLines: {\n moduleProps: this.props,\n className: classnames(this.className, className)\n },\n status: 'LOADING',\n statusMessage: ,\n heading: heading && ,\n resources: this.props.resources\n };\n return this.props.renderView(errorProps);\n }\n\n if (cart.status === 'FAILED' || orderTemplate.status === 'FAILED') {\n const errorProps: IOrderTemplateViewProps = {\n ...(this.props as IOrderTemplateProps),\n OrderTemplateLines: {\n moduleProps: this.props,\n className: classnames(`${this.className}`, className)\n },\n status: 'FAILED',\n statusMessage: ,\n heading: heading && ,\n resources: this.props.resources\n };\n\n return this.props.renderView(errorProps);\n }\n\n const orderTemplateResult = orderTemplate && orderTemplate.result;\n const orderTemplateLines = orderTemplateResult && orderTemplateResult.orderTemplateLines;\n\n if (!orderTemplateResult || !orderTemplateLines || orderTemplateLines.length === 0) {\n if (orderTemplateResult && !this._isFirstPage() && MsDyn365.isBrowser) {\n window.location.href = this._getOrderTemplatePageUrl();\n return null;\n }\n\n const emptyViewProps: IOrderTemplateViewProps = {\n ...(this.props as IOrderTemplateProps),\n OrderTemplateLines: {\n moduleProps: this.props,\n className: classnames(`${this.className}`, className)\n },\n status: 'EMPTY',\n statusMessage: ,\n heading: heading && ,\n resources: this.props.resources,\n orderActions:\n orderTemplateResult &&\n this._renderOrderTemplateActions(orderTemplateResult, this._isChannelMultipleCatalogsFeatureEnabled()),\n bulkOrderLineActions: orderTemplateResult && this._getOrderTemplateLineActions(orderTemplateResult.productList.Id),\n OrderTemplateActions: {\n className: `${this.className}-action-bar`,\n tag: 'div'\n }\n };\n\n return this.props.renderView(emptyViewProps);\n }\n\n const viewProps: IOrderTemplateViewProps = {\n ...(this.props as IOrderTemplateProps),\n OrderTemplateLines: {\n moduleProps: this.props,\n className: classnames(`${this.className}`, className)\n },\n status: 'SUCCESS',\n productsStatusMessage: this.state.isOpen && (\n
\n \n {this.state.userMessage}\n \n
\n ),\n heading: heading && ,\n OrderTemplateActions: {\n className: `${this.className}-action-bar`,\n tag: 'div'\n },\n ProductsTable: {\n className: `${this.className}__table`,\n tag: 'table',\n role: 'grid'\n },\n ProductsTableRow: {\n className: `${this.className}-table-line`,\n tag: 'tr'\n },\n ProductsTableHeading: this._renderProductListHeader(this.props.resources),\n ProductDetails: {\n className: `${this.className}-table-line__link`,\n tag: 'a'\n },\n orderLines: this._renderProductList(),\n callbacks: { updateQuantity: debounce(this._changeQuantity, 2000) },\n orderActions: this._renderOrderTemplateActions(orderTemplateResult, this._isChannelMultipleCatalogsFeatureEnabled()),\n pagination: this._renderPagination(),\n itemAddedToCartDialog: this._renderItemAddedToCartDialog(),\n bulkOrderLineActions: this._getOrderTemplateLineActions(orderTemplateResult.productList.Id),\n isDetailsDisplayed: this.state.isDetailsDisplayed,\n toggleDetailsDisplayed: this._toggleDetailsDisplayed,\n detailedProductView: this.state.detailedProductView,\n isMobile: this.isMobile\n };\n\n return this.props.renderView(viewProps) as React.ReactElement;\n }\n\n public onSelect(line: IOrderTemplateLineViewModel, isChecked: boolean): void {\n line.isChecked = isChecked;\n\n const updated =\n this.state.productSelection.map(product => {\n if (product.fullProduct?.ProductDetails.ItemId === line.fullProduct?.ProductDetails.ItemId) {\n line.isChecked = isChecked;\n }\n return product;\n }) || [];\n\n this.setState({\n productSelection: updated\n });\n }\n\n public onSelectAll(isChecked: boolean): void {\n const updated =\n this.state.productSelection.map(line => {\n line.isChecked = isChecked;\n return line;\n }) || [];\n\n this.setState({\n productSelection: updated\n });\n }\n\n private _renderProductListHeader(resources: IOrderTemplateResources): React.ReactNode {\n const {\n productImage,\n productNumberText,\n productText,\n productUnitPriceText,\n productUOMText,\n productQuantityText,\n productActionsText,\n selectAllRowsText,\n productLineCatalogName\n } = resources;\n const headers: IOrderTemplateTableHeadingProps = {\n productImage: productImage,\n productNumber: productNumberText,\n productName: productText,\n productUnitPrice: productUnitPriceText,\n productUOM: productUOMText,\n productQuantity: productQuantityText,\n productActions: productActionsText,\n selectAllRowsText,\n lines: this.state.productSelection,\n isMobile: this.isMobile,\n clickHandler: (isChecked: boolean) => {\n this.onSelectAll(isChecked);\n },\n isMultipleCatalogFeatureEnabledInHq: this._isChannelMultipleCatalogsFeatureEnabled(),\n productLineCatalogName: productLineCatalogName\n };\n\n return ;\n }\n\n private _getOrderTemplateLineActions(orderTemplateId: string): React.ReactNode {\n return (\n line.isChecked)}\n onAddSelectionToBag={this._onAddSelectionToBag}\n onRemoveSelection={this._onRemoveSelection}\n isMinifiedView={this.isMobile}\n isMultipleCatalogFeatureEnabledInHq={this._isChannelMultipleCatalogsFeatureEnabled()}\n telemetryContent={this.telemetryContent}\n />\n );\n }\n\n private _generateLinesAddedToCartDialogResources(): ILinesAddedToCartDialogResources {\n return {\n viewCartButtonText: this.props.resources.viewCartButtonText,\n orderTemplateCloseButtonText: this.props.resources.orderTemplateCloseButtonText,\n linesAddedToCartHeaderItemsOneText: this.props.resources.linesAddedToCartHeaderItemsOneText,\n linesAddedToCartHeaderLinesOneText: this.props.resources.linesAddedToCartHeaderLinesOneText,\n linesAddedToCartHeaderLinesFormatText: this.props.resources.linesAddedToCartHeaderLinesFormatText,\n linesAddedToCartHeaderMessageText: this.props.resources.linesAddedToCartHeaderMessageText\n };\n }\n\n private _generateItemAddedToCartDialogResources(): IItemAddedToCartDialogResources {\n return {\n viewCartButtonText: this.props.resources.viewCartButtonText,\n orderTemplateCloseButtonText: this.props.resources.orderTemplateCloseButtonText,\n itemAddedToCartHeaderItemOneText: this.props.resources.itemAddedToCartHeaderItemOneText,\n itemAddedToCartHeaderItemFormatText: this.props.resources.itemAddedToCartHeaderItemFormatText,\n itemAddedToCartHeaderMessageText: this.props.resources.itemAddedToCartHeaderMessageText,\n freePriceText: this.props.resources.freePriceText,\n originalPriceText: this.props.resources.originalPriceText,\n currentPriceText: this.props.resources.currentPriceText\n };\n }\n\n private readonly _isChannelMultipleCatalogsFeatureEnabled = (): boolean => {\n let isMultipleCatalogFeatureEnabledInHq = false;\n if (this.props.data.featureState) {\n isMultipleCatalogFeatureEnabledInHq =\n this.props.data.featureState.result?.find(\n feature => feature.Name === 'Dynamics.AX.Application.ChannelMultipleCatalogsFeature'\n )?.IsEnabled || false;\n }\n return isMultipleCatalogFeatureEnabledInHq;\n };\n\n private readonly _onRemoveSelection = (): void => {\n const { context, resources } = this.props;\n const { telemetry } = context;\n const { removeSelectedFailureMessage, removeSelectedSuccessMessage } = resources;\n const lines = this.state.productSelection;\n const productListLines = lines && lines.length && lines.filter(line => line.isChecked).map(line => line.productListLine);\n\n if (productListLines && productListLines.length > 0) {\n const productListId = productListLines[0].ProductListId;\n\n const maxWaitTimeInMilliSeconds: number = 1000;\n removeProductListLinesAsync({ callerContext: context.actionContext }, productListId!, productListLines)\n .then(async () => {\n this.setState({\n userMessage: removeSelectedSuccessMessage,\n statusCssString: 'success',\n messageGlyph: 'fas fa-check',\n isOpen: true\n });\n // eslint-disable-next-line no-promise-executor-return -- fix\n await new Promise(resolve => setTimeout(resolve, maxWaitTimeInMilliSeconds));\n window.location.reload();\n })\n .catch(error => {\n telemetry.warning('[order-template-lines] Unable remove items from the order template lines');\n telemetry.error(error);\n this.setState({\n userMessage: removeSelectedFailureMessage,\n statusCssString: 'success',\n messageGlyph: 'fas fa-check',\n isOpen: true\n });\n });\n }\n };\n\n private readonly _getOrderTemplatePageUrl = (): string => {\n let url = getUrlSync('ordertemplate', this.props.context.actionContext) || '';\n url = url.includes('?') ? url.substr(0, url.indexOf('?')) : url;\n if (this.props.data.orderTemplate?.result?.productList.Id) {\n return `${url}?id=${this.props.data.orderTemplate.result.productList.Id}`;\n }\n return '';\n };\n\n private readonly _onAddSelectionToBag = async (): Promise => {\n const lines = this.state.productSelection;\n const selectedLines = lines.filter(line => line.isChecked);\n if (selectedLines.length > 0) {\n for (const productLine of selectedLines) {\n const itemKey = productLine.fullProduct?.ProductDetails.ItemId ?? '';\n const product = productLine.fullProduct?.ProductDetails ?? {\n RecordId: 0,\n ProductTypeValue: 0,\n BasePrice: 0,\n Price: 0,\n AdjustedPrice: 0\n };\n const quantity = productLine.productListLine.Quantity ?? 0;\n if (this._isChannelMultipleCatalogsFeatureEnabled()) {\n const catalogId = productLine.productListLine.CatalogId;\n await this._addItemToBag(product, quantity, itemKey, catalogId);\n } else {\n await this._addItemToBag(product, quantity, itemKey);\n }\n }\n }\n return Promise.resolve(void 0);\n };\n\n private _renderOrderTemplateActions(\n orderTemplate: OrderTemplate,\n isMultipleCatalogFeatureEnabledInHq: boolean\n ): IOrderTemplateActionsViewProps {\n const { id, typeName, context, resources } = this.props;\n const {\n addTemplateToBagButtonText,\n renameTemplateButtonText,\n deleteTemplateButtonText,\n closeWindowButtonText,\n addToCartFailureMessage,\n addToCartSuccessMessage,\n addToCartProcessMessage,\n orderTemplateErrorMessage\n } = resources;\n\n const orderTemplateActions: IOrderTemplateActionsProps = {\n data: { orderTemplate },\n id,\n typeName,\n context,\n telemetryContent: this.telemetryContent,\n handlers: {\n onRenameTemplate: this._renameTemplate,\n onRemoveTemplate: this._removeTemplate\n },\n isMultipleCatalogFeatureEnabledInHq,\n renameOrderTemplateDialogStrings: this._generateOrderTemplateNameDialogResources(resources),\n resources: {\n addTemplateToBagButtonText,\n renameTemplateButtonText,\n deleteTemplateButtonText,\n addToCartFailureMessage,\n addToCartSuccessMessage,\n addToCartProcessMessage,\n closeWindowButtonText,\n orderTemplateErrorMessage,\n linesAddedToCartDialogResources: this._generateLinesAddedToCartDialogResources()\n }\n };\n\n return OrderTemplateActionsView(orderTemplateActions);\n }\n\n private _generateOrderTemplateNameDialogResources(resources: IOrderTemplateResources): IOrderTemplateNameDialogResources {\n return {\n orderTemplateHeaderLabel: resources.renameOrderTemplateTitleText,\n orderTemplateTitleLabel: resources.orderTemplateTitle,\n orderTemplateNameAriaLabel: resources.orderTemplateTitle,\n orderTemplateDescription: '',\n defaultOrderTemplateName: resources.defaultOrderTemplateName,\n orderTemplateButtonLabel: resources.renameOrderTemplateButtonText,\n orderTemplateCancelButtonLabel: resources.cancelBtnLabel\n };\n }\n\n private readonly _getCurrentUrl = (reqContext: IRequestContext): URL => {\n if (MsDyn365.isBrowser) {\n return new URL(window.location.href);\n }\n return new URL(reqContext.url.requestUrl.href);\n };\n\n /**\n * On close handler.\n */\n private readonly onCloseHandler = () => {\n this.setState({\n itemKey: this.state.itemKey,\n userMessage: this.state.userMessage,\n statusCssString: this.state.statusCssString,\n messageGlyph: this.state.messageGlyph,\n isOpen: this.state.isOpen,\n isItemAddedToOrderTemplateOpen: false\n });\n };\n\n private readonly _renderItemAddedToCartDialog = (): React.ReactNode | null => {\n if (!this.state.itemAddedToCartDialogData) {\n return null;\n }\n const isMultipleCatalogFeatureEnabledInHq =\n this.props.data.featureState?.result?.find(feature => feature.Name === 'Dynamics.AX.Application.ChannelMultipleCatalogsFeature')\n ?.IsEnabled || false;\n\n return (\n \n );\n };\n\n private _isFirstPage(): boolean {\n return this._getCurrentPageNumber() === 0;\n }\n\n private _getCurrentPageNumber(): number {\n const itemsPerPage = this.props.config.itemsPerPage || 50;\n return (this.props.context.request.query && +this.props.context.request.query.skip / itemsPerPage) || 0;\n }\n\n private readonly _renderPagination = (): React.ReactNode | null => {\n const { config, context, data, resources } = this.props;\n const orderTemplate = data && data.orderTemplate && data.orderTemplate.result;\n if (!orderTemplate) {\n return null;\n }\n\n const fullUrl = this._getCurrentUrl(context.request);\n const itemsPerPage = config.itemsPerPage || 50;\n const currentPageNumber = this._getCurrentPageNumber();\n const skipCount = currentPageNumber * itemsPerPage;\n const totalItems = orderTemplate && orderTemplate.totalLines;\n const previousText = resources.flipperPrevious;\n const nextText = resources.flipperNext;\n\n if (totalItems <= itemsPerPage) {\n return null;\n }\n\n return (\n \n );\n };\n\n private _renderProductList(): IOrderTemplateLineViewProps[] {\n const {\n selectOneRowText,\n moreButtonText,\n viewProductDetailsText,\n priceFree,\n originalPriceText,\n currentPriceText,\n addOrderTemplateItemToBagButtonText,\n removeItemFromOrderTemplateButtonText,\n productDimensionTypeColor,\n productDimensionTypeSize,\n productDimensionTypeStyle,\n inputQuantityAriaLabel,\n deleteButtonText,\n incrementButtonAriaLabel,\n decrementButtonAriaLabel,\n unavailableProductErrorMessage,\n outOfStockProductErrorMessage\n } = this.props.resources;\n\n const { context, telemetry, data } = this.props;\n const { catalogs } = data;\n const { imageSettings } = this.props.config;\n\n return this.state.productSelection.map((line, index) => {\n const currentProductProps: IOrderTemplateLineProps = {\n orderTemplateLine: line,\n productListLine: line.productListLine,\n price: line.fullProduct?.ProductPrice,\n error: line.error,\n shouldDisable: line.shouldDisable,\n context,\n isQuantityDisabledForUpdate: this.state.isQuantityDisabledForUpdate,\n productUrl: line.fullProduct\n ? this._updateProductUrlCatalog(line.fullProduct.ProductDetails, context, line.productListLine.CatalogId)\n : '',\n imageSettings,\n telemetry,\n moduleId: this.props.id,\n moduleTypeName: this.props.typeName,\n quantity: line.productListLine.Quantity!,\n handlers: {\n onAddToBag: this._addItemToBag,\n onRemoveItem: this._removeItemFromOrderTemplateLines,\n onChangeQuantity: this._changeQuantity,\n onSelect: this.onSelect.bind(this)\n },\n resources: {\n selectOneRowText,\n moreButtonText,\n viewProductDetailsText,\n productDimensionTypeColor,\n productDimensionTypeSize,\n productDimensionTypeStyle,\n freePriceText: priceFree,\n originalPriceText,\n currentPriceText,\n inputQuantityAriaLabel,\n removeFromOrderTemplateLinesText: removeItemFromOrderTemplateButtonText,\n addToBagButtonText: addOrderTemplateItemToBagButtonText,\n deleteButtonText,\n incrementButtonAriaLabel,\n decrementButtonAriaLabel,\n unavailableProductErrorMessage,\n outOfStockProductErrorMessage\n },\n index,\n isMobile: this.isMobile,\n toggleDetailsDisplayed: this._toggleDetailsDisplayed,\n isMultipleCatalogFeatureEnabledInHq: this._isChannelMultipleCatalogsFeatureEnabled(),\n catalogs: catalogs && catalogs.result\n };\n\n return OrderTemplateLineView(currentProductProps)!;\n });\n }\n\n private readonly _toggleDetailsDisplayed = (props: IOrderTemplateLineProps): void => {\n let state = {\n isDetailsDisplayed: !this.state.isDetailsDisplayed\n };\n if (props) {\n state = {\n ...state,\n ...{\n detailedProductView: OrderTemplateMobileLineView(props)\n }\n };\n }\n this.setState(state);\n };\n\n // This method is used to update the product url with the catalogId\n private readonly _updateProductUrlCatalog = (\n productDetails: SimpleProduct,\n context: ICoreContext,\n catalogId: number | undefined\n ): string => {\n const productUrl = getProductUrlSync(productDetails, context.actionContext, undefined);\n if (!StringExtensions.isNullOrWhitespace(productUrl) && catalogId !== undefined) {\n const absoluteUrl = new URL(productUrl, window.location.href);\n absoluteUrl.searchParams.set('catalogid', `${catalogId ?? 0}`);\n return absoluteUrl.href;\n }\n\n return productUrl;\n };\n\n // Dismiss alert when addingToCart/removeItem\n private readonly _onDismiss = () => {\n this.setState({\n isOpen: false\n });\n };\n\n private readonly _changeQuantity = async (itemKey: string, quantity: number, props?: IOrderTemplateLineProps) => {\n const { context, data, telemetry, config, resources } = this.props;\n const { orderTemplate } = data;\n\n if (context) {\n if (orderTemplate?.result) {\n const orderTemplateLinesData = orderTemplate.result.orderTemplateLines;\n if (orderTemplateLinesData) {\n const orderLineIndex = orderTemplateLinesData.findIndex(\n (lines: OrderTemplateLine) => lines.productListLine.LineId === itemKey\n );\n const newProductListLine = { ...orderTemplateLinesData[orderLineIndex] };\n if (orderTemplateLinesData[orderLineIndex].productListLine.Quantity === quantity) {\n return;\n }\n const prevQuantity = newProductListLine.productListLine.Quantity;\n newProductListLine.productListLine.Quantity = quantity;\n const { fullProduct, ...line } = newProductListLine;\n\n // Update mobile modal\n if (props) {\n props.quantity = quantity;\n this.setState({\n detailedProductView: OrderTemplateMobileLineView(props)\n });\n }\n\n this.setState({\n isQuantityDisabledForUpdate: true\n });\n\n updateProductListLinesAsync({ callerContext: context.actionContext }, orderTemplate.result.productList.Id, [\n line.productListLine\n ])\n .then(list => {\n this.setState({\n itemKey,\n userMessage: '',\n statusCssString: 'success',\n messageGlyph: 'fas fa-check',\n isQuantityDisabledForUpdate: false,\n isOpen: false\n });\n if (list) {\n const newLine = list.find(lines => lines.LineId === itemKey);\n orderTemplateLinesData[orderLineIndex].productListLine = newLine!;\n const updatedLines = [...orderTemplateLinesData];\n updatedLines[orderLineIndex] = { fullProduct, productListLine: newLine! };\n const updatedOrderTemplate = { ...orderTemplate.result, ProductListLines: updatedLines };\n context.actionContext.update(\n new ActiveOrderTemplateLinesInput(context.actionContext.requestContext, config),\n updatedOrderTemplate\n );\n }\n })\n .catch(error => {\n telemetry.warning('[order-template-lines] Unable to update product quantity.');\n telemetry.error(error);\n const userMessage = resources.editOrderTemplateLineQuantityError;\n if (props) {\n props && (props.productListLine.Quantity = prevQuantity);\n this.setState({\n itemKey,\n userMessage,\n statusCssString: 'danger',\n messageGlyph: 'fas fa-exclamation-triangle',\n isQuantityDisabledForUpdate: false,\n isOpen: true,\n detailedProductView: OrderTemplateMobileLineView(props)\n });\n } else {\n newProductListLine.productListLine.Quantity = prevQuantity;\n this.setState({\n itemKey,\n userMessage,\n statusCssString: 'danger',\n messageGlyph: 'fas fa-exclamation-triangle',\n isQuantityDisabledForUpdate: false,\n isOpen: true\n });\n }\n });\n }\n }\n }\n };\n\n private readonly _addItemToBag = async (\n product: SimpleProduct,\n quantity: number,\n itemKey: string,\n catalogId?: number | undefined\n ): Promise => {\n const { context, data, resources, telemetry } = this.props;\n const { cart } = data;\n const { maxQuantityLimitText, addedToCartFailureMessage } = resources;\n\n if (context) {\n if (cart.result) {\n const addProductToCartInput = {\n product,\n count: quantity,\n catalogId\n };\n\n await cart.result\n .addProductToCart(addProductToCartInput)\n .then((result: ICartActionResult) => {\n if (result.status === 'SUCCESS') {\n return getPriceForSelectedVariant(\n new PriceForSelectedVariantInput(\n product.RecordId,\n this.props.context.actionContext.requestContext.apiSettings.channelId,\n product\n ),\n this.props.context.actionContext\n ).then(priceResult => {\n if (!priceResult) {\n return AsyncResult.reject('Failed to retrieve product price');\n }\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access -- read config file.\n const isMiniCart = context.app.config.addToCartBehavior === 'showMiniCart';\n this.setState({\n itemKey,\n userMessage: '',\n statusCssString: 'success',\n messageGlyph: 'fas fa-check',\n isOpen: false,\n isItemAddedToOrderTemplateOpen: !isMiniCart,\n itemAddedToCartDialogData: {\n product,\n productPrice: priceResult,\n quantity\n },\n isDetailsDisplayed: false\n });\n return AsyncResult.resolve();\n });\n } else {\n switch (result.substatus) {\n case 'MAXQUANTITY':\n if (context.app.config.maxQuantityForCartLineItem) {\n const cartLineQuantity: number | undefined =\n cart.result?.cart.CartLines &&\n cart.result?.cart.CartLines.find(result => result.ProductId === product.RecordId)?.Quantity;\n const defaultMessage = `You can only add ${context.app.config.maxQuantityForCartLineItem} of this item to your shopping bag`;\n this.setState({\n itemKey,\n userMessage:\n cartLineQuantity !== undefined\n ? maxQuantityLimitText\n .replace('{curQuantity}', cartLineQuantity.toString())\n .replace(\n '{maxQuantity}',\n context.app.config.maxQuantityForCartLineItem.toString()\n ) || defaultMessage\n : defaultMessage,\n statusCssString: 'danger',\n messageGlyph: 'fas fa-exclamation-triangle',\n isOpen: true\n });\n return AsyncResult.resolve();\n } else {\n const defaultMessage = `Max quantity for cart line item is undefined. Please define in configuration settings.`;\n this.setState({\n itemKey,\n userMessage: defaultMessage,\n statusCssString: 'danger',\n messageGlyph: 'fas fa-exclamation-triangle',\n isOpen: true\n });\n return AsyncResult.resolve();\n }\n case 'INVOICEINCART': {\n this.setState({\n itemKey,\n userMessage: result.errorDetails?.LocalizedMessage || addedToCartFailureMessage,\n statusCssString: 'danger',\n messageGlyph: 'fas fa-exclamation-triangle',\n isOpen: true\n });\n return AsyncResult.resolve();\n }\n default:\n telemetry.debug('[order-template-lines] Unable to Update Cart Line from the order template lines');\n this.setState({\n itemKey,\n userMessage: addedToCartFailureMessage,\n statusCssString: 'danger',\n messageGlyph: 'fas fa-exclamation-triangle',\n isOpen: true\n });\n return AsyncResult.resolve();\n }\n }\n })\n .catch((error: Error) => {\n telemetry.warning(error.message);\n telemetry.debug('[order-template-lines] Error trying to Update Cart Line from the order template lines');\n if (StringExtensions.isNullOrWhitespace(error.message)) {\n this.setState({\n itemKey,\n userMessage: error.message,\n statusCssString: 'danger',\n messageGlyph: 'fas fa-exclamation-triangle',\n isOpen: true\n });\n } else {\n this.setState({\n itemKey,\n userMessage: addedToCartFailureMessage,\n statusCssString: 'danger',\n messageGlyph: 'fas fa-exclamation-triangle',\n isOpen: true\n });\n }\n });\n }\n }\n };\n\n private readonly _removeItemFromOrderTemplateLines = async (line: IOrderTemplateLineViewModel) => {\n const { context, data, telemetry } = this.props;\n const { orderTemplate } = data;\n\n if (context && context.actionContext) {\n const maxWaitTimeInMilliSeconds: number = 1000;\n const userToken = context.request.user.isAuthenticated && context.request.user.token;\n if (userToken && orderTemplate?.result && line) {\n const featureStates = await getFeatureState(createGetFeatureStateInput(context.actionContext), context.actionContext);\n let isMultipleCatalogFeatureEnabledInHq = false;\n if (ArrayExtensions.hasElements(featureStates)) {\n isMultipleCatalogFeatureEnabledInHq =\n featureStates.find(\n (featureState: FeatureState) => featureState.Name === 'Dynamics.AX.Application.ChannelMultipleCatalogsFeature'\n )?.IsEnabled || false;\n }\n const catalogId = getCatalogId(context.actionContext.requestContext);\n if (isMultipleCatalogFeatureEnabledInHq) {\n line.productListLine.CatalogId = catalogId;\n }\n removeProductListLinesAsync({ callerContext: context.actionContext }, line.productListLine.ProductListId!, [\n line.productListLine\n ])\n .then(async () => {\n // eslint-disable-next-line no-promise-executor-return -- fix\n await new Promise(resolve => setTimeout(resolve, maxWaitTimeInMilliSeconds));\n window.location.reload();\n })\n .catch(error => {\n telemetry.warning('[order-template-lines] Unable remove items from the order template lines');\n telemetry.error(error);\n });\n } else {\n telemetry.warning(\n '[order-template-lines] Unable remove items from the order template lines user token or lineItemID was not found'\n );\n }\n }\n };\n\n private readonly _renameTemplate = async (_template: ProductList): Promise => {\n window.location.reload();\n return Promise.resolve();\n };\n\n private readonly _removeTemplate = () => {\n const { context, data, telemetry, resources } = this.props;\n const { orderTemplate } = data;\n\n if (context && context.actionContext) {\n const userToken = context.request.user.isAuthenticated && context.request.user.token;\n if (userToken && orderTemplate && orderTemplate.result) {\n deleteAsync({ callerContext: context.actionContext }, orderTemplate.result.productList)\n .then()\n .catch((error: string) => {\n telemetry.warning('[order-template] Unable to delete order template.');\n telemetry.error(error);\n this.setState({\n itemKey: orderTemplate.result?.productList.Id || '',\n userMessage: resources.deleteOrderTemplateFailedText,\n statusCssString: 'danger',\n messageGlyph: 'fas fa-exclamation-triangle',\n isOpen: true\n });\n });\n const newLink = getUrlSync('ordertemplatelist', this.props.context.actionContext);\n if (newLink) {\n window.location.assign(newLink);\n }\n } else {\n telemetry.warning('[order-template] Failed to delete order template. Order template was not found');\n }\n } else {\n telemetry.warning('[order-template] Failed to delete order template.');\n }\n };\n\n private _updateViewport(): void {\n this._viewport = this._getViewport();\n }\n\n private readonly _getViewport = (): GridSize => {\n const { context } = this.props;\n\n // Always render in mobile viewport on a mobile device\n if (context.request && context.request.device && context.request.device.Type === 'Mobile') {\n return 'xs';\n }\n\n if (MsDyn365.isBrowser && window.innerWidth) {\n const gridSettings = context.request.gridSettings;\n if (gridSettings) {\n if (gridSettings.xs && window.innerWidth <= gridSettings.xs.w) {\n return 'xs';\n } else if (gridSettings.sm && window.innerWidth <= gridSettings.sm.w) {\n return 'sm';\n } else if (gridSettings.md && window.innerWidth <= gridSettings.md.w) {\n return 'md';\n } else if (gridSettings.lg && window.innerWidth <= gridSettings.lg.w) {\n return 'lg';\n }\n return 'xl';\n }\n }\n\n return 'xs';\n };\n\n /**\n * Renders a Pagination previous text.\n * @param paginationPreviousText - Pagination previous text from resources.\n * @returns Previous text and flipper icon.\n */\n private readonly _renderPrev = (paginationPreviousText: string) => {\n return (\n
\n
\n );\n };\n\n /**\n * Renders a Pagination next text.\n * @param paginationNextText - Pagination next text from resources.\n * @returns Next text and flipper icon.\n */\n private readonly _renderNext = (paginationNextText: string) => {\n return (\n
\n {paginationNextText}\n
\n );\n };\n}\n\nexport default OrderTemplateLines;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { Button, INodeProps, Modal, ModalBody, ModalFooter, ModalHeader, Module, Node } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport { IOrderTemplateLineViewProps } from './components';\nimport { IOrderTemplateViewProps } from './order-template';\n\nconst OrderTemplateLinesView: React.FC = (props: IOrderTemplateViewProps) => {\n const {\n OrderTemplateLines,\n status,\n statusMessage,\n heading,\n ProductsTable,\n ProductsTableHeading,\n orderLines,\n ProductsTableRow,\n productsStatusMessage,\n OrderTemplateActions,\n orderActions,\n pagination,\n itemAddedToCartDialog,\n bulkOrderLineActions,\n isDetailsDisplayed,\n detailedProductView,\n toggleDetailsDisplayed,\n resources: {\n cancelBtnLabel,\n productNumberText,\n productText,\n productUnitPriceText,\n productUOMText,\n productQuantityText,\n productLineCatalogName\n }\n } = props;\n\n const toggleDetails = React.useCallback(() => {\n toggleDetailsDisplayed && toggleDetailsDisplayed(undefined);\n }, [toggleDetailsDisplayed]);\n\n return (\n \n {heading}\n {OrderTemplateActions && (\n \n {orderActions?.addTemplateToBag}\n {orderActions?.renameTemplate}\n {orderActions?.removeTemplate}\n {orderActions?.actionsSplitButton}\n {!isDetailsDisplayed && productsStatusMessage}\n \n )}\n {bulkOrderLineActions}\n {status !== 'SUCCESS' && statusMessage}\n {ProductsTable && orderLines && orderLines.length > 0 && (\n \n \n {ProductsTableHeading}\n \n {orderLines &&\n orderLines.map(product => {\n return _renderItem(product, productQuantityText, ProductsTableRow);\n })}\n \n \n {pagination}\n \n )}\n {itemAddedToCartDialog}\n \n Product Details\n \n
    \n
  • {detailedProductView?.productImage}
  • \n
  • \n {productText}:\n {detailedProductView?.productInfo}\n
  • \n
  • \n {productLineCatalogName}:\n {detailedProductView?.productLineCatalog}\n
  • \n
  • \n {productNumberText}:\n {detailedProductView?.productNumber}\n
  • \n
  • \n {productUnitPriceText}:\n {` `}\n {detailedProductView?.productPrice}\n
  • \n
  • \n {productUOMText}:\n {` `}\n {detailedProductView?.productUnitOfMeasure}\n
  • \n
  • \n {productQuantityText}:\n {detailedProductView?.productQuantityView}\n
  • \n {productsStatusMessage &&
  • {productsStatusMessage}
  • }\n
\n
\n \n \n \n \n
\n );\n};\n\nconst _renderItem = (product: IOrderTemplateLineViewProps, quantityLabel: string, ProductsTableRow?: INodeProps): JSX.Element | null => {\n if (!product) {\n return null;\n }\n\n const {\n key,\n selectLine,\n productLineCatalog,\n productImage,\n productPrice,\n productNumber,\n addToBagButton,\n removeButton,\n productInfo,\n productUnitOfMeasure,\n productQuantityView,\n productQuantity,\n popUp,\n isMobile,\n extraActionsPopup,\n isMultipleCatalogFeatureEnabledInHq,\n disabled\n } = product;\n\n const lineVisibility = disabled\n ? {\n pointerEvents: 'none',\n opacity: 0.5\n }\n : {\n pointerEvents: 'auto',\n opacity: 1\n };\n\n const disableElement: React.CSSProperties = lineVisibility as React.CSSProperties;\n\n return (\n \n {selectLine}\n {!isMobile && isMultipleCatalogFeatureEnabledInHq && {productLineCatalog}}\n {productImage}\n {isMobile ? (\n \n
{productNumber}
\n
\n {quantityLabel}:{` `}\n {productQuantity}\n
\n \n ) : (\n {productNumber}\n )}\n {!isMobile && {productInfo}}\n {!isMobile && {productPrice}}\n {!isMobile && {productUnitOfMeasure}}\n {!isMobile && {productQuantityView}}\n {isMobile && {popUp}}\n {!isMobile && !isMultipleCatalogFeatureEnabledInHq && (\n \n {addToBagButton}\n {removeButton}\n \n )}\n {extraActionsPopup}\n
\n );\n};\n\nexport default OrderTemplateLinesView;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { Button, Collapse, ICollapseProps } from '@msdyn365-commerce-modules/utilities';\nimport classnames from 'classnames';\nimport * as React from 'react';\n\nimport { IQuickOrderDrawerProps } from './quick-order-drawer-props';\n\nexport interface IQuickOrderDrawerState {\n isOpen: boolean;\n}\n\nexport type GlyphPlacement = 'start' | 'end';\n\n/**\n * Quick Order Drawer - This is a full width uncontrolled collapse where the button glyph changes\n * when the drawer is open and closed.\n */\n\nexport default class QuickOrderDrawer extends React.Component {\n public state: IQuickOrderDrawerState;\n\n private readonly drawerOpenGlyph: string;\n\n private readonly drawerCloseGlyph: string;\n\n private readonly drawerGlyphClass: string;\n\n private isManuallyToggled: boolean;\n\n constructor(props: IQuickOrderDrawerProps) {\n super(props);\n this._toggle = this._toggle.bind(this);\n this.isManuallyToggled = false;\n this.state = { isOpen: (props.collapseProps && props.collapseProps.isOpen) || false };\n this.drawerGlyphClass = classnames('drawer__glyph', this.props.toggleGlyphClassName ? this.props.toggleGlyphClassName : '');\n\n if (this.props.animateGlyph) {\n this.drawerOpenGlyph = classnames(\n this.drawerGlyphClass,\n this.props.openGlyph ? this.props.openGlyph : this.props.closeGlyph ? this.props.closeGlyph : ''\n );\n this.drawerCloseGlyph = this.drawerOpenGlyph;\n } else {\n this.drawerOpenGlyph = classnames(this.drawerGlyphClass, this.props.openGlyph ? this.props.openGlyph : '');\n this.drawerCloseGlyph = classnames(this.drawerGlyphClass, this.props.closeGlyph ? this.props.closeGlyph : '');\n }\n }\n\n public shouldComponentUpdate(nextProps: IQuickOrderDrawerProps, nextState: IQuickOrderDrawerState): boolean {\n if (this.state === nextState && this.props === nextProps) {\n return false;\n }\n return true;\n }\n\n public render(): JSX.Element {\n const collapseProps = { ...this.props.collapseProps } as ICollapseProps;\n\n // If the drawer is manually toggled by pressing the button, then we use the internal state\n if (collapseProps.isOpen === undefined || this.isManuallyToggled) {\n collapseProps.isOpen = this.state.isOpen;\n } else {\n // eslint-disable-next-line react/no-direct-mutation-state\n this.state.isOpen = collapseProps.isOpen;\n }\n collapseProps.children = this.props.children;\n const drawerClass = classnames('drawer', this.props.className ? this.props.className : '');\n this.isManuallyToggled = false;\n return (\n
\n \n {this._generateDrawerButtonInnerMarkup(collapseProps.isOpen)}\n \n \n
\n );\n }\n\n private _generateDrawerButtonInnerMarkup(collapseState: boolean): JSX.Element {\n const drawerButtonTextClass = classnames(\n 'drawer__buttontext',\n this.props.toggleButtonClassName ? this.props.toggleButtonClassName : ''\n );\n return (\n <>\n

{this.props.moduleHeadingText}

\n \n {this.props.moduleDescriptionText}\n \n {this._generateGlyphMarkup('drawer__glyph__end', collapseState)}\n \n );\n }\n\n private _generateGlyphMarkup(location: string, collapseState: boolean): JSX.Element {\n let glyphClass = collapseState ? this.drawerOpenGlyph : this.drawerCloseGlyph;\n glyphClass = `${glyphClass} ${location}`;\n return ;\n }\n\n private _toggle(e: React.MouseEvent | React.KeyboardEvent): void {\n e.preventDefault();\n this.setState({ isOpen: !this.state.isOpen });\n this.isManuallyToggled = true;\n if (this.props.onToggle) {\n this.props.onToggle(this.state);\n }\n }\n}\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { Alert, Button } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport { IQuickOrderState } from '../quick-order';\n\nexport interface IQuickOrderFormProps {\n disableAddtoCart: boolean | undefined;\n productTextInput: React.RefObject;\n quantityTextInput: React.RefObject;\n maxChars: number;\n maxQuantity?: number;\n ariaLabelQuantity: string;\n ariaLabelProduct: string;\n ariaLabelAddtoCart: string;\n addQuantityPlaceholderText: string;\n quickOrderState: IQuickOrderState;\n handleInputChange(query: string): void;\n handleQuantityChange(query: string): void;\n handleAddToCartClick(): Promise;\n}\n\nexport interface IQuickOrderFormViewProps {\n product: React.ReactNode;\n quantity: React.ReactNode;\n addToCartBtn: React.ReactNode;\n userMessage?: React.ReactNode;\n}\n\n/**\n * On Input Change functionality.\n * @param handleInputChange -Input change function.\n * @returns Input change value.\n */\nconst onInputChangeFunction = (handleInputChange: (query: string) => void) => (event: React.ChangeEvent) => {\n handleInputChange(event.target.value || '');\n};\n\n/**\n * On Quantity Change functionality.\n * @param handleQuantityChange -Quantity change function.\n * @returns Quantity change value.\n */\nconst onQuantityChangeFunction = (handleQuantityChange: (query: string) => void) => (event: React.ChangeEvent) => {\n handleQuantityChange(event.target.value || '');\n};\n\nexport const QuickOrderFormComponent = (props: IQuickOrderFormProps): IQuickOrderFormViewProps => {\n const {\n productTextInput,\n quantityTextInput,\n quickOrderState,\n maxChars,\n maxQuantity,\n disableAddtoCart,\n ariaLabelQuantity,\n ariaLabelProduct,\n ariaLabelAddtoCart,\n addQuantityPlaceholderText,\n handleQuantityChange,\n handleInputChange,\n handleAddToCartClick\n } = props;\n\n const onInputChange = onInputChangeFunction(handleInputChange);\n\n const onQuantityInputChange = onQuantityChangeFunction(handleQuantityChange);\n\n const productNode = (\n
\n

\n {ariaLabelProduct}\n

\n \n
\n );\n\n const quantityNode = (\n
\n

\n {ariaLabelQuantity}\n

\n \n
\n );\n\n const addtoCartNode = (\n
\n \n {ariaLabelAddtoCart}\n \n
\n );\n\n const userMessageNode =\n quickOrderState && quickOrderState.stateMessage ? (\n \n \n {quickOrderState.stateMessage.messageText}\n \n ) : (\n undefined\n );\n\n return {\n product: productNode,\n addToCartBtn: addtoCartNode,\n quantity: quantityNode,\n userMessage: userMessageNode\n };\n};\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { CartLine, SimpleProduct } from '@msdyn365-commerce/retail-proxy';\nimport { observable } from 'mobx';\n\n/**\n * Represents a product for quick order.\n */\nexport class QuickOrderProduct {\n @observable\n public isSelected: boolean;\n\n public readonly cartLine: CartLine;\n\n public readonly simpleProduct: SimpleProduct;\n\n public constructor(cartLine: CartLine, simpleProduct: SimpleProduct) {\n this.cartLine = cartLine;\n this.simpleProduct = simpleProduct;\n this.isSelected = false;\n }\n}\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { IComponent, IComponentProps, ICoreContext } from '@msdyn365-commerce/core';\nimport classnames from 'classnames';\nimport React from 'react';\n\n/**\n * Interface for quick order table header resources.\n */\nexport interface IQuickOrderTableHeaderResources {\n quickOrderProductNumberText: string;\n quickOrderProductText: string;\n quickOrderUnitPriceText: string;\n quickOrderUnitOfMeasureText: string;\n quickOrderQuantityText: string;\n quickOrderTotalText: string;\n quickOrderActionsText: string;\n}\n\n/**\n * Interface for quick order table props.\n */\nexport interface IQuickOrderTableHeaderProps extends IComponentProps {\n context: ICoreContext;\n className: string;\n\n isMobile: boolean;\n resources: IQuickOrderTableHeaderResources;\n}\n\n/**\n * Interface for quick order table header component.\n */\nexport interface IQuickOrderTableHeaderComponent extends IComponent {}\n\n/**\n * Get the quick order header cells for desktop.\n * @param props -- The quick order table header props.\n * @returns The list of cells for quick order header component in desktop version.\n */\nconst QuickOrderDesktopHeaderCellsComponent: React.FC = (props: IQuickOrderTableHeaderProps) => {\n const { resources } = props;\n const columnWithNumberClassName = `${props.className}__row__column-with-number`;\n return (\n <>\n \n \n \n {resources.quickOrderProductNumberText}\n {resources.quickOrderProductText}\n {resources.quickOrderUnitPriceText}\n {resources.quickOrderUnitOfMeasureText}\n {resources.quickOrderQuantityText}\n {resources.quickOrderTotalText}\n {resources.quickOrderActionsText}\n \n );\n};\n\n/**\n * Get the quick order header cells for mobile.\n * @param props -- The quick order table header props.\n * @returns The quick order header component in desktop version.\n */\nconst QuickOrderMobileHeaderCellsComponent: React.FC = (props: IQuickOrderTableHeaderProps) => {\n const { resources } = props;\n return (\n <>\n \n {resources.quickOrderProductNumberText}\n \n \n );\n};\n\n/**\n * Quick order table header component.\n * @param props - Configuration of the component.\n * @returns React node with the header.\n */\nexport const QuickOrderTableHeaderComponent: React.FC = (props: IQuickOrderTableHeaderProps) => {\n const rowClassName = `${props.className}__row`;\n\n let headerCells: JSX.Element;\n if (props.isMobile) {\n headerCells = ;\n } else {\n headerCells = ;\n }\n\n return (\n \n {headerCells}\n \n );\n};\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { IComponentProps, ICoreContext, IImageSettings, Image } from '@msdyn365-commerce/core';\nimport { CartLine, format, SimpleProduct } from '@msdyn365-commerce/retail-proxy';\nimport { getFallbackImageUrl, getProductPageUrlSync, ObjectExtensions, StringExtensions } from '@msdyn365-commerce-modules/retail-actions';\nimport { Button, IncrementalQuantity } from '@msdyn365-commerce-modules/utilities';\nimport React from 'react';\n\n/**\n * Data required to render each quick order row.\n */\nexport interface IQuickOrderTableRowData {\n cartLine: CartLine;\n product: SimpleProduct;\n}\n\n/**\n * Resources for quick order table rows.\n */\nexport interface IQuickOrderTableRowResources {\n quickOrderQuantityMobileText: string;\n quickOrderProductDimensionsSeparator: string;\n quickOrderViewDetailsButtonText: string;\n quickOrderViewDetailsButtonAriaLabel: string;\n quickOrderRemoveItemButtonAriaLabel: string;\n quickOrderInputQuantityAriaLabel: string;\n quickOrderDecrementButtonAriaLabel: string;\n quickOrderIncrementButtonAriaLabel: string;\n}\n\n/**\n * Interface for quick order table props.\n */\nexport interface IQuickOrderTableRowProps extends IComponentProps {\n context: ICoreContext;\n className: string;\n\n imageSettings?: IImageSettings;\n isMobile: boolean;\n resources: IQuickOrderTableRowResources;\n}\n\n/**\n * The default image settings for quick order table row.\n */\nconst defaultImageSettings: IImageSettings = {\n viewports: {\n xs: { q: 'w=80&h=80&m=6', w: 0, h: 0 },\n lg: { q: 'w=147&h=147&m=6', w: 0, h: 0 }\n },\n lazyload: true,\n cropFocalRegion: true\n};\n\n/**\n * Renders product image for quick order row.\n * @param props - Quick order table row props.\n * @returns React element.\n */\nconst QuickOrderTableRowProductImageComponent: React.FC = (props: IQuickOrderTableRowProps) => {\n const fallbackImageUrl = getFallbackImageUrl(\n props.data.product.ItemId,\n props.context.actionContext.requestContext.apiSettings,\n props.context.request.app?.config?.OmniChannelMedia\n );\n\n const containerClassName = `${props.className}__product-image-container`;\n\n return (\n
\n \n
\n );\n};\n\n/**\n * Renders actions popup for the mobile view.\n * @param props - Configuration for popup.\n * @returns A react node with actions..\n */\nconst QuickOrderExtraActionsPopupComponent: React.FC = (props: IQuickOrderTableRowProps): JSX.Element | null => {\n const product: SimpleProduct = props.data.product;\n\n let productUrl = '';\n if (!StringExtensions.isNullOrWhitespace(product.Name) && !ObjectExtensions.isNullOrUndefined(product.RecordId)) {\n productUrl = getProductPageUrlSync(product.Name!, product.RecordId, props.context.actionContext);\n }\n\n if (StringExtensions.isNullOrWhitespace(productUrl)) {\n return null;\n }\n\n const className = `${props.className}__extra-actions-cell`;\n\n return (\n
\n
\n );\n};\n\n/**\n * Renders quick order table rows for desktop view.\n * @param props - Configuration for the rows.\n * @returns A react node with a list of quick order rows for desktop view.\n */\nexport const QuickOrderDesktopTableRowCellComponent: React.FC = (props: IQuickOrderTableRowProps) => {\n const product: SimpleProduct = props.data.product;\n const cartLine: CartLine = props.data.cartLine;\n const columnWithNumberClassName = `${props.className}__column-with-number`;\n\n let productUrl = '';\n if (!StringExtensions.isNullOrWhitespace(product.Name) && !ObjectExtensions.isNullOrUndefined(product.RecordId)) {\n productUrl = getProductPageUrlSync(product.Name!, product.RecordId, props.context.actionContext);\n }\n\n return (\n <>\n \n \n \n {product.ItemId}\n \n
\n \n {product.Name}\n \n \n {product.Dimensions?.map(dimension => dimension.DimensionValue?.Value)\n .filter(dimensionValue => !StringExtensions.isNullOrWhitespace(dimensionValue))\n .join(props.resources.quickOrderProductDimensionsSeparator)}\n \n
\n \n {cartLine.Price}\n {cartLine.UnitOfMeasureSymbol}\n \n \n \n {cartLine.TotalAmount}\n \n \n ),\n submitButton: (\n \n {props.resources.submitReviewButtonText}\n \n ),\n rating: ratingsInput(props),\n ratingLabel: ratingsLabel(props),\n titleInput: titleInput(props),\n titleLabel: titleLabel(props),\n textInput: textInput(props),\n textLabel: textLabel(props),\n privacyPolicyUrl: privacyPolicyLink(props),\n form: { tag: 'form', className: 'ms-review-modal-form', autoComplete: 'off' },\n inputRow: { tag: 'div', className: 'ms-review-modal-row', autoComplete: 'off' },\n error: (\n \n {props.resources.errorMessageText}\n \n )\n };\n};\n\nconst modalHeaderNode = (props: IReviewModalProps) => {\n return (\n \n {props.userReview && props.userReview.reviewId ? props.resources.editReviewModalTitle : props.resources.writeReviewModalTitle}\n \n );\n};\n\nconst submitDisabled = (props: IReviewModalProps) => {\n return !props.rating || !stripWhiteSpacesFromString(props.reviewText) || !stripWhiteSpacesFromString(props.reviewTitle);\n};\n\nconst ratingsInput = (props: IReviewModalProps) => {\n return (\n \n );\n};\n\nconst ratingsLabel = (props: IReviewModalProps) => {\n return (\n \n );\n};\n\nconst titleInput = (props: IReviewModalProps) => {\n const maxLength = props.context.app.config.reviewTitleMaxLength;\n\n return (\n \n );\n};\n\nconst titleLabel = (props: IReviewModalProps) => {\n return (\n \n );\n};\n\nconst reviewTextWidth: number = 50;\n\nconst textInput = (props: IReviewModalProps) => {\n const maxLength = props.context.app.config.reviewTextMaxLength;\n return (\n \n );\n};\n\nconst textLabel = (props: IReviewModalProps) => {\n return (\n \n );\n};\n\nconst privacyPolicyLink = (props: IReviewModalProps) => {\n const policyTextBlocks = props.resources.privacyPolicyTextFormat.split('{0}');\n const isSeparatorAtStart = props.resources.privacyPolicyTextFormat.startsWith('{0}');\n const isSeparatorAtEnd = props.resources.privacyPolicyTextFormat.endsWith('{0}');\n const privacyPolicyUrl = getUrlSync('rnrPrivacyPolicy', props.context.actionContext);\n const payLoad = getPayloadObject('click', props.telemetryContent!, TelemetryConstant.PrivacyPolicy);\n const privacyPolicyAttribute = getTelemetryAttributes(props.telemetryContent!, payLoad);\n\n return (\n

\n {isSeparatorAtStart ? '' : policyTextBlocks[0]}\n \n {props.resources.privacyPolicyTitle}\n \n {isSeparatorAtEnd ? '' : isSeparatorAtStart ? policyTextBlocks[0] : policyTextBlocks[1]}\n

\n );\n};\n\nconst onSubmit = (props: IReviewModalProps): void => {\n if (props.product) {\n submitReview(\n props.product,\n props.reviewTitle,\n props.reviewText,\n props.rating,\n props.context,\n props.userReview,\n props.onReviewComplete\n );\n }\n};\n\n/**\n * This method strips content of extra white spaces.\n * @param text The text to be stripped of extra white spaces.\n */\nconst stripWhiteSpacesFromString = (text: string): string => {\n return text\n .replace(new RegExp('\\\\r?\\\\n|\\\\r+', 'g'), ' ')\n .replace(new RegExp('\\\\s+', 'g'), ' ')\n .trim();\n};\n\nexport const submitReview = (\n product: SimpleProduct,\n title: string,\n text: string,\n rating: number,\n context: ICoreContext,\n userReview?: Review,\n onReviewSubmission?: (isSuccessful: boolean) => void\n) => {\n const { request } = context;\n const { user } = request;\n if (user && request) {\n const input = new SubmitUserReviewInput(\n product.RecordId.toString(),\n getRnrPartnerId(context.actionContext),\n request.apiSettings.channelId.toString(),\n request.locale,\n {\n productName: product && product.Name,\n rating,\n reviewText: stripWhiteSpacesFromString(text),\n title: stripWhiteSpacesFromString(title),\n userEmail: user.emailAddress,\n userName: user.name\n },\n request.user.token,\n getRnrAuthEndpointId(context.actionContext)\n );\n\n submitUserReview(input, context.actionContext)\n .then(reviewId => {\n const review = reviewId\n ? {\n rating,\n title: stripWhiteSpacesFromString(title),\n reviewText: stripWhiteSpacesFromString(text),\n submittedDateTime: new Date(),\n helpfulPositive: userReview ? userReview.helpfulPositive : 0,\n helpfulNegative: userReview ? userReview.helpfulNegative : 0,\n reviewId,\n userName: request.user.firstName || request.user.name\n }\n : userReview;\n\n const getReviewInput = new GetUserReviewInput(input.productId!, input.tenantId, input.authorization, input.serviceEndpoint);\n context.actionContext.update(getReviewInput, review);\n\n if (onReviewSubmission) {\n onReviewSubmission(!!reviewId);\n }\n })\n .catch(() => {\n const productId = product.RecordId;\n context.telemetry.error(`Failed to submit review for product with recordId: ${productId}`);\n context.telemetry.debug(`Failed to submit review for product with recordId: ${productId}`);\n if (onReviewSubmission) {\n onReviewSubmission(false);\n }\n });\n }\n};\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { OrderBy } from '../actions/inputs/get-product-reviews-input';\n\nexport interface IRnrKeyValuePair {\n key: string;\n value: string;\n}\n\nexport interface IRnrOrderByKeyValuePair {\n key: OrderBy;\n value: string;\n}\n\nexport function setFocusOnElement(id: string): void {\n const element = document.getElementById(id);\n if (element) {\n element.focus();\n }\n}\n\nexport const TOGGLE_REVIEW_MODAL_BUTTON_ID: string = 'reviewproductid';\nexport const TOGGLE_EDIT_MODAL_BUTTON_ID: string = 'ms-write-review__edit';\nexport const TOGGLE_EDIT_MODAL_BUTTON_CARD_ID: string = 'ms-reviews-list__edit';\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { RatingsSummary } from '@msdyn365-commerce/commerce-entities';\nimport { format, INodeProps, Progress } from '@msdyn365-commerce-modules/utilities';\nimport React from 'react';\n\nexport interface IHistogramItemsProps {\n ratingsSummary: RatingsSummary;\n resources: IHistogramItemsResources;\n locale: string;\n onClick(stars: number): void;\n}\n\nexport interface IHistogramItemsResources {\n barItemAriaLabel: string;\n}\n\nexport interface IHistogramItemViewProps {\n starLabel: React.ReactElement;\n bar: React.ReactElement;\n percentage: React.ReactElement;\n buttonProps: INodeProps;\n}\n\n/**\n * CartLineItems component.\n */\n\nexport const HistogramItems = (props: IHistogramItemsProps): IHistogramItemViewProps[] => {\n const { ratingsSummary } = props;\n const totalRatingsCount: number = ratingsSummary.totalRatingsCount || 0;\n if (totalRatingsCount === 0) {\n return [];\n }\n return [\n renderItem(props, 5, ratingsSummary.star5Count, totalRatingsCount),\n renderItem(props, 4, ratingsSummary.star4Count, totalRatingsCount),\n renderItem(props, 3, ratingsSummary.star3Count, totalRatingsCount),\n renderItem(props, 2, ratingsSummary.star2Count, totalRatingsCount),\n renderItem(props, 1, ratingsSummary.star1Count, totalRatingsCount)\n ];\n};\n\nconst renderItem = (props: IHistogramItemsProps, stars: number, count?: number, totalCount?: number): IHistogramItemViewProps => {\n count = count || 0;\n totalCount = totalCount || 0;\n const percentage = totalCount === 0 ? 0 : count / totalCount;\n const formattedPercent = new Intl.NumberFormat(props.locale, { style: 'percent' }).format(percentage);\n const ariaLabel = format(props.resources.barItemAriaLabel, stars, formattedPercent);\n\n return {\n starLabel: (\n \n ),\n percentage: (\n \n ),\n bar: ,\n buttonProps: {\n tag: 'button',\n className: 'ms-ratings-histogram__item',\n onClick: () => {\n props.onClick(stars);\n }\n }\n };\n};\n\nexport const AverageRatingNumber: React.FC<{ summary: RatingsSummary }> = (props: { summary: RatingsSummary }) => {\n return (\n

\n {props.summary.averageRating}\n {` `}/ 5\n

\n );\n};\n\nexport const TotalReviews: React.FC<{ summary: RatingsSummary }> = (props: { summary: RatingsSummary }) => {\n return

{props.summary.totalRatingsCount}

;\n};\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { RatingComponent } from '@msdyn365-commerce/components';\nimport * as Msdyn365 from '@msdyn365-commerce/core';\nimport { format, IModuleProps, INodeProps } from '@msdyn365-commerce-modules/utilities';\nimport classname from 'classnames';\nimport { observer } from 'mobx-react';\nimport * as React from 'react';\n\nimport { createRatingsReviewsStateInput } from '../../actions/ratings-reviews-state-data-action';\nimport { AverageRatingNumber, HistogramItems, IHistogramItemViewProps, TotalReviews } from './component/components';\nimport { IRatingsHistogramData } from './ratings-histogram.data';\nimport { IRatingsHistogramProps } from './ratings-histogram.props.autogenerated';\n\nexport interface IRatingsHistogramViewProps extends IRatingsHistogramProps {\n className: string;\n histogramItems: IHistogramItemViewProps[];\n moduleProps: IModuleProps;\n heading: React.ReactNode;\n averageRating: React.ReactNode;\n averageNumber: React.ReactNode;\n totalReviews: React.ReactNode;\n histogramProps: INodeProps;\n ratingsSummaryProps: INodeProps;\n callbacks: IRatingsHistogramCallbacks;\n}\n\nexport interface IRatingsHistogramCallbacks {\n selectFilterBy(stars: number): void;\n}\n\n/**\n * RatingsHistogram component.\n * @extends {React.Component>}\n */\n@observer\nclass RatingsHistogram extends React.PureComponent> {\n constructor(props: IRatingsHistogramProps) {\n super(props);\n this.selectFilterBy = this.selectFilterBy.bind(this);\n }\n\n public render(): JSX.Element | null {\n const { resources } = this.props;\n const { className, heading } = this.props.config;\n const {\n ratingsSummary: { result: ratingsSummary }\n } = this.props.data;\n const ratingCount = ratingsSummary && ratingsSummary.totalRatingsCount ? `${ratingsSummary.totalRatingsCount}` : '0';\n\n const completeClass = classname('ms-ratings-histogram', className);\n const viewProps: IRatingsHistogramViewProps = {\n ...this.props,\n className: completeClass,\n callbacks: {\n selectFilterBy: this.selectFilterBy\n },\n moduleProps: {\n moduleProps: this.props,\n className: completeClass\n },\n histogramItems: ratingsSummary\n ? HistogramItems({\n ratingsSummary,\n resources: { ...resources },\n locale: this.props.context.request.locale,\n onClick: this.selectFilterBy\n })\n : [],\n averageRating: ratingsSummary && (\n \n ),\n averageNumber: ratingsSummary && ,\n totalReviews: ratingsSummary && ,\n ratingsSummaryProps: { className: 'ms-ratings-histogram__summary' },\n heading: heading && (\n \n ),\n histogramProps: { className: 'ms-ratings-histogram__histogram' }\n };\n\n return this.props.renderView(viewProps) as React.ReactElement;\n }\n\n public handleHeadingChange = (event: Msdyn365.ContentEditableEvent) => (this.props.config.heading!.text = event.target.value);\n\n public selectFilterBy(stars: number): void {\n const filterKey = `${stars}`;\n this.props.context.actionContext.update(createRatingsReviewsStateInput({ filterKey }), { filterKey });\n }\n}\n\nexport default RatingsHistogram;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { Module, Node } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport { IHistogramItemViewProps } from './component/components';\nimport { IRatingsHistogramViewProps } from './ratings-histogram';\n\nconst RatingsHistogramView: React.FC = props => {\n const { heading, histogramItems, histogramProps, moduleProps } = props;\n\n return (\n \n {heading}\n \n {histogramItems.map(item => {\n return histogramItem(item);\n })}\n \n \n );\n};\n\nconst histogramItem = (props: IHistogramItemViewProps) => {\n return (\n \n {props.starLabel}\n {props.bar}\n {props.percentage}\n \n );\n};\n\nexport default RatingsHistogramView;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { createObservableDataAction, IAction, IActionContext, sendRequest } from '@msdyn365-commerce/core';\n\nimport { ReportReviewConcernInput } from './inputs/report-review-concern-input';\n\nasync function reportReviewConcern(input: ReportReviewConcernInput, ctx: IActionContext): Promise {\n if (!inputIsValid(input)) {\n throw new Error(\n `[SubmitHelpfulnessVote] Invalid input. ReviewId=${input.reviewId},tenantId=${input.tenantId},locale= ${input.locale},`\n );\n }\n\n const requestUrl =\n `${input.serviceEndpoint}/v2.0/concerns/review/${input.reviewId}` + `?tenantId=${input.tenantId}` + `&locale=${input.locale}`;\n\n const requestBody = {\n concernCategory: input.concernCategory\n };\n\n const requestHeader = {\n headers: {\n Authorization: `id_token ${input.authToken}`\n }\n };\n\n return sendRequest(requestUrl, 'post', requestBody, requestHeader)\n .then(response => {\n return response.status === 200 || response.status === 201;\n })\n .catch(error => {\n ctx.trace('[ReportReviewConcernInput] Failed to report a concern');\n ctx.telemetry.exception(error);\n ctx.telemetry.debug('[ReportReviewConcernInput] Failed to report a concern');\n return false;\n });\n}\n\nfunction inputIsValid(input: ReportReviewConcernInput): boolean {\n return input && input.reviewId.length > 0 && input.tenantId.length > 0 && input.locale.length > 0 && input.authToken.length > 0;\n}\n\nexport const reportReviewConcernDataAction = createObservableDataAction({\n id: '@msdyn365-commerce-modules/ratings-reviews/report-review-concern',\n action: >reportReviewConcern\n});\n\nexport default reportReviewConcernDataAction;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { createObservableDataAction, IAction, IActionContext, sendRequest } from '@msdyn365-commerce/core';\n\nimport { SubmitHelpfulnessVoteInput } from './inputs/submit-helpfulness-vote-input';\n\nasync function submitHelpfulnessVote(input: SubmitHelpfulnessVoteInput, ctx: IActionContext): Promise {\n if (!inputIsValid(input)) {\n throw new Error(\n `[SubmitHelpfulnessVote] Invalid input. ReviewId=${input.reviewId},tenantId=${input.tenantId}, locale= ${input.locale},`\n );\n }\n\n const requestUrl =\n `${input.serviceEndpoint}/v2.0/votes/review/${input.reviewId}` + `?tenantId=${input.tenantId}` + `&locale=${input.locale}`;\n\n const requestBody = {\n isHelpful: !!input.isHelpful\n };\n\n const requestHeader = {\n headers: {\n Authorization: `id_token ${input.authToken}`\n }\n };\n\n return sendRequest(requestUrl, 'post', requestBody, requestHeader)\n .then(response => {\n return response.status === 200 || response.status === 201;\n })\n .catch(error => {\n ctx.trace('[SubmitHelpfulnessVote] Failed to vote on a review');\n ctx.telemetry.exception(error);\n ctx.telemetry.debug('[SubmitHelpfulnessVote] Failed to vote on a review');\n return false;\n });\n}\n\nfunction inputIsValid(input: SubmitHelpfulnessVoteInput): boolean {\n return input && input.reviewId.length > 0 && input.tenantId.length > 0 && input.locale.length > 0 && input.authToken.length > 0;\n}\n\nexport const submitHelpfulnessVoteDataAction = createObservableDataAction({\n id: '@msdyn365-commerce-modules/ratings-reviews/submit-helpfulness-vote',\n action: >submitHelpfulnessVote\n});\n\nexport default submitHelpfulnessVoteDataAction;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { CacheType, IActionInput } from '@msdyn365-commerce/core';\n\nexport enum ReviewConcernCategory {\n OffensiveContent = '1',\n ReviewResponse = '7',\n SpamAdvertising = '8',\n Profanity = '9'\n}\n\n/**\n * ReportReviewConcern Input Action.\n */\nexport class ReportReviewConcernInput implements IActionInput {\n public reviewId: string;\n\n public tenantId: string;\n\n public locale: string;\n\n public serviceEndpoint: string;\n\n public concernCategory: string;\n\n public authToken: string;\n\n constructor(reviewId: string, tenantId: string, locale: string, concernCategory: string, authToken: string, serviceEndpoint: string) {\n this.reviewId = reviewId;\n this.tenantId = tenantId;\n this.locale = locale;\n this.concernCategory = concernCategory;\n this.authToken = authToken;\n this.serviceEndpoint = serviceEndpoint;\n }\n\n public getCacheKey = () => 'ReportReviewConcern';\n\n public getCacheObjectType = () => 'ReportReviewConcern';\n\n public dataCacheType = (): CacheType => 'none';\n}\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport {\n format,\n getPayloadObject,\n getTelemetryAttributes,\n ILabeledDropdownOption,\n ITelemetryContent,\n TelemetryConstant\n} from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nexport interface IReviewCountResources {\n pageReviewCountText: string;\n}\n\nexport interface IReviewCountProps {\n resources: IReviewCountResources;\n currentPage: number;\n reviewsCount: number;\n reviewsShownOnEachPage: number;\n}\n\nexport const ReviewCount: React.FC = (props: IReviewCountProps) => {\n const { currentPage, resources, reviewsCount, reviewsShownOnEachPage } = props;\n\n return (\n \n {format(\n resources.pageReviewCountText,\n _getReviewStartNumber(currentPage, reviewsShownOnEachPage),\n _getReviewEndNumber(currentPage, reviewsCount, reviewsShownOnEachPage),\n reviewsCount\n )}\n \n );\n};\n\nexport interface IPageControlResources {\n previousButtonText: string;\n nextButtonText: string;\n pageReviewAriaLabel: string;\n}\n\nexport interface IPageControlsProps {\n resources: IPageControlResources;\n currentPage: number;\n reviewsCount: number;\n reviewsShownOnEachPage: number;\n selectedSortByOption: ILabeledDropdownOption;\n selectedFilterByOption: ILabeledDropdownOption;\n telemetryContent?: ITelemetryContent;\n updateReviews(\n skipItems: number,\n selectedSortByOption: ILabeledDropdownOption,\n selectedFilterByOption: ILabeledDropdownOption,\n currentPage: number,\n isFilterApplied: boolean\n ): Promise;\n}\n\nexport const PageControls: React.FC = (props: IPageControlsProps) => {\n const { currentPage, resources, reviewsCount, reviewsShownOnEachPage } = props;\n const previousPageClick = React.useCallback(() => {\n return _getPreviousPageData(props);\n }, [props]);\n const nextPageClick = React.useCallback(() => {\n return _getNextPageData(props);\n }, [props]);\n const payLoad = getPayloadObject('click', props.telemetryContent!, TelemetryConstant.Next);\n const nextAttribute = getTelemetryAttributes(props.telemetryContent!, payLoad);\n payLoad.contentAction.etext = TelemetryConstant.Previous;\n const previousAttribute = getTelemetryAttributes(props.telemetryContent!, payLoad);\n\n return (\n
\n {_hasPreviousPage(currentPage) && (\n \n {resources.previousButtonText}\n \n )}\n {_hasNextPage(currentPage, reviewsCount, reviewsShownOnEachPage) && (\n \n {resources.nextButtonText}\n \n )}\n
\n );\n};\n\nconst _hasPreviousPage = (currentPage: number): boolean => {\n return currentPage > 1;\n};\n\nconst _hasNextPage = (currentPage: number, reviewsCount: number, reviewsShownOnEachPage: number): boolean => {\n return _getPagesCount(reviewsCount, reviewsShownOnEachPage) > currentPage;\n};\n\nconst _getReviewsShown = (reviewsShownOnEachPage: number) => {\n return Math.min(25, reviewsShownOnEachPage);\n};\n\nconst _getPagesCount = (reviewsCount: number, reviewsShownOnEachPage: number): number => {\n return Math.ceil(reviewsCount / _getReviewsShown(reviewsShownOnEachPage));\n};\n\nconst _paginationAriaLabel = (\n pageReviewAriaLabel: string,\n currentPage: number,\n reviewsCount: number,\n reviewsShownOnEachPage: number,\n isNextPage: boolean,\n page?: number\n): string => {\n const pageModifier = isNextPage ? 1 : -1;\n return format(\n pageReviewAriaLabel,\n _getReviewStartNumber(currentPage, reviewsShownOnEachPage, currentPage + pageModifier),\n _getReviewEndNumber(currentPage, reviewsCount, reviewsShownOnEachPage, currentPage + pageModifier),\n reviewsCount\n );\n};\n\nconst _getReviewStartNumber = (currentPage: number, reviewsShownOnEachPage: number, page?: number): number => {\n return ((page || currentPage) - 1) * _getReviewsShown(reviewsShownOnEachPage) + 1;\n};\n\nconst _getReviewEndNumber = (currentPage: number, reviewsCount: number, reviewsShownOnEachPage: number, page?: number): number => {\n const pageUsed = page || currentPage;\n const pageReviewCount = pageUsed * _getReviewsShown(reviewsShownOnEachPage);\n return pageReviewCount < reviewsCount ? pageReviewCount : reviewsCount;\n};\n\nconst _getPreviousPageData = async (props: IPageControlsProps) => {\n await props.updateReviews(\n _getReviewStartNumber(props.currentPage, props.reviewsShownOnEachPage) - 1 - _getReviewsShown(props.reviewsShownOnEachPage),\n props.selectedSortByOption,\n props.selectedFilterByOption,\n props.currentPage - 1,\n false\n );\n};\n\nconst _getNextPageData = async (props: IPageControlsProps) => {\n await props.updateReviews(\n _getReviewEndNumber(props.currentPage, props.reviewsCount, props.reviewsShownOnEachPage),\n props.selectedSortByOption,\n props.selectedFilterByOption,\n props.currentPage + 1,\n false\n );\n};\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { IAny, ICoreContext, IGeneric } from '@msdyn365-commerce/core';\nimport {\n Alert,\n getPayloadObject,\n getTelemetryAttributes,\n INodeProps,\n ITelemetryContent,\n Modal,\n ModalBody,\n ModalFooter,\n ModalHeader,\n TelemetryConstant\n} from '@msdyn365-commerce-modules/utilities';\nimport React from 'react';\n\nimport { ReviewConcernCategory } from '../../../actions/inputs/report-review-concern-input';\nimport { IRnrKeyValuePair } from '../../../common/rnrInterface';\n\nexport interface IReportReviewModalProps {\n resources: IReportReviewModalResources;\n context: ICoreContext>;\n isOpen: boolean;\n returnRef: React.RefObject | undefined;\n reportedKey: string;\n hasError: boolean;\n telemetryContent?: ITelemetryContent;\n onModalToggle(): void;\n onRadioChange(event: React.ChangeEvent): void;\n reportReview(): void;\n}\n\nexport interface IReportReviewModalResources {\n reportConcernText: string;\n feedbackThankYouText: string;\n reportModalMessage: string;\n reportSubmittedMessage: string;\n reportSpamText: string;\n offensiveContentText: string;\n profanityContentText: string;\n okReportReviewText: string;\n cancelReportReviewText: string;\n reportReviewButtonText: string;\n errorMessageText: string;\n}\n\nexport interface IReportReviewModalViewProps {\n modal: INodeProps;\n modalHeader: INodeProps;\n modalFooter: INodeProps;\n modalBody: INodeProps;\n header: React.ReactElement;\n headerSubmitted: React.ReactElement;\n cancelButton: React.ReactElement;\n submitButton: React.ReactElement;\n succesfulButton: React.ReactElement;\n reportMessage: React.ReactElement;\n reportSubmittedMessage: React.ReactElement;\n radioButtons: React.ReactElement;\n error: React.ReactElement;\n}\n\nlet reportConcernDropdownOptions: IRnrKeyValuePair[];\n\n/**\n * CartLineItems component.\n */\n\nexport const ReportReviewModal = (props: IReportReviewModalProps): IReportReviewModalViewProps => {\n const payLoad = getPayloadObject('click', props.telemetryContent!, TelemetryConstant.SubmitReview);\n const submitReviewAttribute = getTelemetryAttributes(props.telemetryContent!, payLoad);\n payLoad.contentAction.etext = TelemetryConstant.SuccessButton;\n const successAttribute = getTelemetryAttributes(props.telemetryContent!, payLoad);\n payLoad.contentAction.etext = TelemetryConstant.Cancel;\n const cancelAttribute = getTelemetryAttributes(props.telemetryContent!, payLoad);\n\n reportConcernDropdownOptions = [\n { key: ReviewConcernCategory.SpamAdvertising, value: props.resources.reportSpamText },\n { key: ReviewConcernCategory.OffensiveContent, value: props.resources.offensiveContentText },\n { key: ReviewConcernCategory.Profanity, value: props.resources.profanityContentText }\n ];\n\n return {\n modal: {\n tag: Modal,\n className: 'ms-report-review-modal msc-modal-input-required',\n toggle: props.onModalToggle,\n applicationNode: 'renderPage',\n isOpen: props.isOpen,\n returnFocusRef: props.returnRef\n },\n modalHeader: { tag: ModalHeader, toggle: props.onModalToggle, className: 'ms-report-review-modal-header' },\n modalFooter: { tag: ModalFooter, className: 'ms-report-review-modal-footer' },\n modalBody: { tag: ModalBody, className: 'ms-report-review-modal-body' },\n header:

{props.resources.reportConcernText}

,\n headerSubmitted:

{props.resources.feedbackThankYouText}

,\n cancelButton: (\n \n ),\n submitButton: (\n \n ),\n succesfulButton: (\n \n ),\n reportMessage:

{props.resources.reportModalMessage}

,\n reportSubmittedMessage:

{props.resources.reportSubmittedMessage}

,\n radioButtons: radioPairs(props),\n error: (\n \n {props.resources.errorMessageText}\n \n )\n };\n};\n\nconst radioPairs = (props: IReportReviewModalProps) => {\n const pairs = [];\n for (const option of reportConcernDropdownOptions) {\n const inputId = `report-review-${option.key}`;\n const checked = option.key === props.reportedKey;\n pairs.push(\n
\n \n \n
\n );\n }\n\n return
{pairs}
;\n};\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { Review } from '@msdyn365-commerce/commerce-entities';\nimport { RatingComponent } from '@msdyn365-commerce/components';\nimport { IAny, ICoreContext, IGeneric, isOboRequest } from '@msdyn365-commerce/core';\nimport { Button, format, INodeProps } from '@msdyn365-commerce-modules/utilities';\nimport React from 'react';\n\nimport { TOGGLE_EDIT_MODAL_BUTTON_CARD_ID } from '../../../common/rnrInterface';\n\nexport interface IReviewCardResources {\n wasReviewHelpfulText: string;\n yesButtonText: string;\n noButtonText: string;\n editReviewCardText: string;\n reportedText: string;\n reportConcernText: string;\n reviewRatingNarratorText: string;\n}\n\nexport interface IReviewCardProps {\n review: Review;\n resources: IReviewCardResources;\n context: ICoreContext>;\n isUserReview?: boolean;\n parentId: string;\n parentType: string;\n reportedReviews: string[];\n returnRef: React.RefObject | undefined;\n reportedReviewId: string;\n votedReviews: { reviewId: string; approved: boolean }[];\n toggleWriteReviewModal?(): void;\n toggleReportReviewModal(reviewId: string): void;\n updateReviewHelpfulness(reviewId: string, isHelpful: boolean): void;\n}\n\nexport interface IReviewCardViewProps {\n cardProps: INodeProps;\n name: React.ReactElement;\n rating: React.ReactElement;\n date: React.ReactElement;\n reviewTitle: React.ReactElement;\n reviewText: React.ReactElement;\n ratingHelpfulLabel?: React.ReactElement;\n like?: React.ReactElement;\n dislike?: React.ReactElement;\n edit: React.ReactNode;\n report: React.ReactNode;\n responseName: React.ReactNode;\n responseDate: React.ReactNode;\n responseText: React.ReactNode;\n cardBodyProps: INodeProps;\n responseProps: INodeProps;\n reviewProps: INodeProps;\n controlsProps: INodeProps;\n headerProps: INodeProps;\n}\n\n/**\n * Review card component.\n */\n\nexport const ReviewCard = (props: IReviewCardProps): IReviewCardViewProps => {\n const className = props.isUserReview ? 'ms-reviews-list__card ms-reviews-list__user-review' : 'ms-reviews-list__card';\n return {\n cardProps: { className, key: props.review.reviewId },\n name:

{props.review.userName}

,\n rating: rating(props),\n date:

{renderDate(props, props.review.submittedDateTime)}

,\n reviewTitle:

{props.review.title}

,\n reviewText:

{props.review.reviewText}

,\n ratingHelpfulLabel: props.isUserReview ? (\n undefined\n ) : (\n

{props.resources.wasReviewHelpfulText}

\n ),\n like: props.isUserReview ? undefined : voteHelpfulButton(props, true),\n dislike: props.isUserReview ? undefined : voteHelpfulButton(props, false),\n edit: editButton(props),\n report: reportToggle(props),\n responseName: props.review.userResponse ? (\n

{props.review.userResponse.responderName}

\n ) : (\n undefined\n ),\n responseText: props.review.userResponse ? (\n

{props.review.userResponse.responseText}

\n ) : (\n undefined\n ),\n responseDate: props.review.userResponse ? (\n

{renderDate(props, props.review.userResponse.submittedDateTime)}

\n ) : (\n undefined\n ),\n cardBodyProps: { className: 'ms-reviews-list__card-body' },\n responseProps: { className: 'ms-reviews-list__response' },\n reviewProps: { className: 'ms-reviews-list__review' },\n controlsProps: { className: 'ms-reviews-list__card-controls' },\n headerProps: { className: 'ms-reviews-list__card-header' }\n };\n};\n\nconst rating = (props: IReviewCardProps) => {\n return (\n \n );\n};\n\nconst isVotedFor = (props: IReviewCardProps, isHelpful: boolean): boolean => {\n for (let i = 0; i < props.votedReviews.length; i++) {\n if (props.votedReviews[i].reviewId === props.review.reviewId) {\n return props.votedReviews[i].approved === isHelpful;\n }\n }\n\n return false;\n};\n\nconst voteHelpfulButton = (props: IReviewCardProps, isHelpful: boolean) => {\n const isVoted = isVotedFor(props, isHelpful);\n const isDisabled = props.isUserReview || isVoted || isOboRequest(props.context.request) ? 'disabled' : '';\n let className = isHelpful ? 'ms-reviews-list__like' : 'ms-reviews-list__dislike';\n className = `${className} ${isDisabled}`;\n const label = isHelpful ? props.resources.yesButtonText : props.resources.noButtonText;\n let voteCount = (isHelpful ? props.review.helpfulPositive : props.review.helpfulNegative) || 0;\n voteCount = isVoted ? voteCount + 1 : voteCount;\n const title = `(${voteCount})`;\n const user = props.context.request.user;\n const onClickMethod = () => {\n props.updateReviewHelpfulness(props.review.reviewId!, isHelpful);\n };\n const onClick = isDisabled ? undefined : onClickMethod;\n\n if (user.isAuthenticated) {\n return (\n \n );\n }\n return (\n \n );\n};\n\nconst editButton = (props: IReviewCardProps) => {\n if (props.isUserReview && !isOboRequest(props.context.request)) {\n return (\n \n );\n }\n\n return undefined;\n};\n\nconst renderDate = (props: IReviewCardProps, date?: Date): string | Date => {\n if (!date) {\n return '';\n }\n\n try {\n return new Intl.DateTimeFormat(props.context.request.locale, { month: 'long', day: 'numeric', year: 'numeric' }).format(\n new Date(date)\n );\n } catch {\n return date;\n }\n};\n\n/**\n * On Click Handler.\n * @param props -Review card props.\n * @returns Report review modal.\n */\nconst onClick = (props: IReviewCardProps) => () => {\n props.toggleReportReviewModal(props.review.reviewId!);\n};\n\nconst reportToggle = (props: IReviewCardProps) => {\n const user = props.context.request.user;\n if (props.isUserReview || isOboRequest(props.context.request)) {\n return undefined;\n } else if (!user.isAuthenticated) {\n return (\n \n );\n }\n\n if (props.reportedReviews.includes(props.review.reviewId!)) {\n return

{props.resources.reportedText}

;\n }\n\n const ref = props.review.reviewId === props.reportedReviewId ? props.returnRef : undefined;\n\n return (\n \n );\n};\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { CacheType, IActionInput } from '@msdyn365-commerce/core';\n\n/**\n * SubmitHelpfulnessVote Input Action.\n */\nexport class SubmitHelpfulnessVoteInput implements IActionInput {\n public reviewId: string;\n\n public tenantId: string;\n\n public locale: string;\n\n public serviceEndpoint: string;\n\n public isHelpful: boolean;\n\n public authToken: string;\n\n constructor(reviewId: string, tenantId: string, locale: string, isHelpful: boolean, authToken: string, serviceEndpoint: string) {\n this.reviewId = reviewId;\n this.tenantId = tenantId;\n this.locale = locale;\n this.isHelpful = isHelpful;\n this.authToken = authToken;\n this.serviceEndpoint = serviceEndpoint;\n }\n\n public getCacheKey = () => 'SubmitHelpfulnessVote';\n\n public getCacheObjectType = () => 'SubmitHelpfulnessVote';\n\n public dataCacheType = (): CacheType => 'none';\n}\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { Review } from '@msdyn365-commerce/commerce-entities';\nimport { RatingComponent } from '@msdyn365-commerce/components';\nimport * as Msdyn365 from '@msdyn365-commerce/core';\nimport { SimpleProduct } from '@msdyn365-commerce/retail-proxy';\nimport {\n getRnrAuthEndpointId,\n getRnrEndpointId,\n getRnrPartnerId,\n getSelectedProductIdFromActionInput\n} from '@msdyn365-commerce-modules/retail-actions';\nimport {\n format,\n getTelemetryObject,\n ILabeledDropdownOnChangeNotification,\n ILabeledDropdownOption,\n IModuleProps,\n INodeProps,\n ITelemetryContent,\n LabeledDropdown\n} from '@msdyn365-commerce-modules/utilities';\nimport classname from 'classnames';\nimport { reaction } from 'mobx';\nimport { observer } from 'mobx-react';\nimport * as React from 'react';\n\nimport { reportReviewConcern, submitHelpfulnessVote } from '../..';\nimport { getReviewsForGivenProduct } from '../../actions/get-product-reviews';\nimport { GetProductReviewsInput } from '../../actions/inputs/get-product-reviews-input';\nimport { ReportReviewConcernInput, ReviewConcernCategory } from '../../actions/inputs/report-review-concern-input';\nimport { SubmitHelpfulnessVoteInput } from '../../actions/inputs/submit-helpfulness-vote-input';\nimport { IReviewModalViewProps, ReviewModal, submitReview } from '../../common/review-modal';\nimport { IRnrKeyValuePair, IRnrOrderByKeyValuePair } from '../../common/rnrInterface';\nimport { PageControls, ReviewCount } from './components/components';\nimport { IReportReviewModalViewProps, ReportReviewModal } from './components/report-review-modal';\nimport { IReviewCardViewProps, ReviewCard } from './components/review-card';\nimport { IReviewsListData } from './reviews-list.data';\nimport { IReviewsListProps } from './reviews-list.props.autogenerated';\n\nexport interface IReviewsListState {\n skipItems: number;\n listOfReviews: Review[];\n currentPage: number;\n reviewsCount: number;\n showSpinner: boolean;\n isFilterApplied: boolean;\n selectedSortByOption: ILabeledDropdownOption;\n selectedFilterByOption: ILabeledDropdownOption;\n userReviewRating: number;\n userReviewTitle: string;\n userReviewText: string;\n isReviewModalOpen: boolean;\n hasReviewError: boolean;\n isReportModalOpen: boolean;\n hasReportError: boolean;\n reportingReviewId: string;\n reportedKey: string;\n reported: boolean;\n reportedReviews: string[];\n votedReviews: { reviewId: string; approved: boolean }[];\n}\n\nexport interface IReviewsListCallbacks {\n toggleModal(): void;\n updateReviewTitle(title: string): void;\n updateReviewText(text: string): void;\n updateRating(rating: number): void;\n onReviewSubmitted(isSuccessful: boolean): void;\n submitReview(\n product: SimpleProduct,\n title: string,\n text: string,\n rating: number,\n context: Msdyn365.ICoreContext,\n userReview?: Review,\n onReviewSubmission?: (isSuccessful: boolean) => void\n ): void;\n updateReviewHelpfulnessVote(reviewId: string, isHelpful: boolean): void;\n toggleReportModal(reviewId: string): void;\n reportReview(reviewId: string, reportedKey: string): void;\n updateSortByDropdown(notification: ILabeledDropdownOnChangeNotification): void;\n updateFilterByDropdown(notification: ILabeledDropdownOnChangeNotification): void;\n updateReviews(\n skipItems: number,\n selectedSortByOption: ILabeledDropdownOption,\n selectedFilterByOption: ILabeledDropdownOption,\n currentPage: number,\n isFilterApplied: boolean\n ): void;\n}\n\nexport interface IReviewsListViewProps extends IReviewsListProps {\n state: IReviewsListState;\n className: string;\n callbacks: IReviewsListCallbacks;\n moduleProps: IModuleProps;\n reviewModal: IReviewModalViewProps;\n reportReviewModal: IReportReviewModalViewProps;\n sortByDropdown: React.ReactNode;\n filterByDropdown: React.ReactNode;\n averageRating: React.ReactNode;\n reviewCount: React.ReactElement;\n refineReviewsProps: INodeProps;\n reviewsListProps: INodeProps;\n reviewCards: IReviewCardViewProps[];\n userReview?: IReviewCardViewProps;\n pageControls: React.ReactNode;\n noReviewsMessage: React.ReactElement;\n noReviewsWithFilterMessage: React.ReactElement;\n heading: React.ReactNode;\n sortByOptions: IRnrOrderByKeyValuePair[];\n filterByOptions: IRnrOrderByKeyValuePair[];\n}\n\n/**\n *\n * ReviewsList component.\n * @extends {React.Component, IReviewsListState>}\n */\n@observer\nclass ReviewsList extends React.Component, IReviewsListState> {\n public sortByDropdownOptions: IRnrOrderByKeyValuePair[] = [\n { key: 'MostHelpful', value: this.props.resources.mostHelpfulSortOptionText },\n { key: 'MostRecent', value: this.props.resources.mostRecentSortOptionText },\n { key: 'HighestRating', value: this.props.resources.highestRatedSortOptionText },\n { key: 'LowestRating', value: this.props.resources.lowestRatedSortOptionText }\n ];\n\n public filterByDropdownOptions: IRnrKeyValuePair[] = [\n { key: '1;2;3;4;5', value: this.props.resources.allRatinsFilterByOptionText },\n { key: '5', value: this.props.resources.fiveStarFilterByOptionText },\n { key: '4', value: this.props.resources.fourStarFilterByOptionText },\n { key: '3', value: this.props.resources.threeStarFilterByOptionText },\n { key: '2', value: this.props.resources.twoStarFilterByOptionText },\n { key: '1', value: this.props.resources.oneStarFilterByOptionText }\n ];\n\n private readonly _userReviewModalToggle: React.RefObject;\n\n private readonly _userReportModalToggle: React.RefObject;\n\n private readonly telemetryContent?: ITelemetryContent;\n private readonly reviewsListCallbacks: IReviewsListCallbacks = {\n updateReviewTitle: (title: string): void => {\n this.setState({ userReviewTitle: title });\n },\n updateReviewText: (text: string): void => {\n this.setState({ userReviewText: text });\n },\n updateRating: (rating: number): void => {\n this.setState({ userReviewRating: rating });\n },\n onReviewSubmitted: (isSuccessful: boolean): void => {\n if (isSuccessful) {\n this.setState({ isReviewModalOpen: false, hasReviewError: false });\n } else {\n this.setState({ hasReviewError: true });\n }\n },\n submitReview,\n // @ts-expect-error\n toggleModal: this._toggleReviewModal,\n // @ts-expect-error\n updateReviewHelpfulnessVote: this.updateReviewHelpfulnessVote,\n toggleReportModal: (reviewId: string): void => {\n this.state.isReportModalOpen ? this._onReportModalOpen(reviewId) : this._onReportModalClose();\n },\n // @ts-expect-error\n reportReview: this._reportReviewCallback,\n // @ts-expect-error\n updateFilterByDropdown: this.updateFilterByDropdown,\n // @ts-expect-error\n updateSortByDropdown: this.updateSortByDropdown,\n // @ts-expect-error\n updateReviews: this.updateReviews\n };\n constructor(props: IReviewsListProps) {\n super(props);\n const {\n userReview: { result: userReview }\n } = this.props.data;\n\n this.state = {\n skipItems: 0,\n reviewsCount: 0,\n listOfReviews: [],\n currentPage: 1,\n showSpinner: false,\n isFilterApplied: false,\n selectedSortByOption: this.sortByDropdownOptions[0],\n selectedFilterByOption: this.filterByDropdownOptions[0],\n userReviewRating: userReview ? userReview.rating : 0,\n userReviewText: userReview ? userReview.reviewText : '',\n userReviewTitle: userReview ? userReview.title : '',\n isReviewModalOpen: false,\n hasReviewError: false,\n isReportModalOpen: false,\n hasReportError: false,\n reported: false,\n reportedKey: ReviewConcernCategory.SpamAdvertising,\n reportingReviewId: '',\n reportedReviews: [],\n votedReviews: []\n };\n\n this._userReviewModalToggle = React.createRef();\n this._userReportModalToggle = React.createRef();\n this.telemetryContent = getTelemetryObject(\n this.props.context.request.telemetryPageName!,\n this.props.friendlyName,\n this.props.telemetry\n );\n }\n\n public shouldComponentUpdate(nextProps: IReviewsListProps, nextState: IReviewsListState): boolean {\n if (this.state === nextState && this.props.data === nextProps.data) {\n return false;\n }\n return true;\n }\n public componentDidMount = async () => {\n this.props.data.reviewsList.then(reviewsList => {\n if (\n reviewsList &&\n reviewsList.pagingInfo &&\n reviewsList.pagingInfo.totalItems &&\n reviewsList.items &&\n reviewsList.items.length > 0\n ) {\n this.setState({\n listOfReviews: reviewsList.items,\n reviewsCount: reviewsList.pagingInfo.totalItems\n });\n }\n });\n await this.updateReviews(0, this.state.selectedSortByOption, this.state.selectedFilterByOption, 1, this.state.isFilterApplied);\n\n reaction(\n () => this.props.data.ratingsReviewsState.result && this.props.data.ratingsReviewsState.result.filterKey,\n async (filterKey: string | undefined) => {\n const filterKeyValue = Number(filterKey);\n const dropdownItemsCount = this.filterByDropdownOptions.length;\n if (filterKey && !isNaN(filterKeyValue) && filterKeyValue < dropdownItemsCount) {\n const filterByOption = this.filterByDropdownOptions.find((option: IRnrKeyValuePair) => option.key === filterKey);\n if (!filterByOption) {\n this.props.telemetry.warning(`[reviews-list] cannot find filter with key ${filterKey}`);\n } else {\n await this.updateReviews(0, this.state.selectedSortByOption, filterByOption, 1, true);\n const selectedIndex = dropdownItemsCount - filterKeyValue;\n this.setState({\n selectedFilterByOption: this.filterByDropdownOptions[selectedIndex]\n });\n }\n }\n }\n );\n };\n public render(): JSX.Element | null {\n const { className, heading, reviewsShownOnEachPage } = this.props.config;\n const { currentPage, reviewsCount, selectedFilterByOption, selectedSortByOption } = this.state;\n const {\n ratingsSummary: { result: ratingsSummary }\n } = this.props.data;\n const resources = this.props.resources;\n const completeClass = classname('ms-reviews-list', className);\n const viewProps: IReviewsListViewProps = {\n ...this.props,\n state: this.state,\n className: completeClass,\n moduleProps: {\n moduleProps: this.props,\n className: completeClass\n },\n callbacks: this.reviewsListCallbacks,\n reviewModal: this._userReviewModal(),\n reportReviewModal: this._reportReviewModal(),\n filterByDropdown: (\n \n ),\n sortByDropdown: (\n \n ),\n averageRating: ratingsSummary && (\n \n ),\n reviewCount: (\n \n ),\n refineReviewsProps: { className: 'ms-reviews-list__refiners' },\n reviewsListProps: { className: 'ms-reviews-list__reviews' },\n reviewCards: this._reviewCards(this.state.listOfReviews),\n userReview: this._userReview(),\n pageControls: (\n \n ),\n noReviewsMessage: (\n \n {resources.noReviewsMessage}\n \n ),\n noReviewsWithFilterMessage: (\n \n {resources.noReviewsWithSelectedFilterMessage}\n \n ),\n heading: heading && heading.text && (\n \n ),\n sortByOptions: this.sortByDropdownOptions,\n filterByOptions: this.filterByDropdownOptions\n } as IReviewsListViewProps;\n\n return this.props.renderView(viewProps) as React.ReactElement;\n }\n public handleHeadingChange = (event: Msdyn365.ContentEditableEvent) => (this.props.config.heading!.text = event.target.value);\n private readonly _userReview = () => {\n const userReview = this.props.data.userReview.result;\n\n return userReview && this._reviewCard(userReview, true);\n };\n\n private readonly _reviewCards = (reviewList: Review[]) => {\n const userReview = this.props.data.userReview.result;\n const reviewElements: IReviewCardViewProps[] = [];\n\n for (const review of reviewList) {\n if (!review.isTakenDown && review.isPublished && userReview ? review.reviewId !== userReview.reviewId : true) {\n reviewElements.push(this._reviewCard(review, false));\n }\n }\n return reviewElements;\n };\n\n private readonly _reviewCard = (review: Review, userReview: boolean): IReviewCardViewProps => {\n return ReviewCard({\n review,\n resources: { ...this.props.resources },\n context: this.props.context,\n isUserReview: userReview,\n parentId: this.props.id,\n parentType: this.props.typeName,\n reportedReviews: this.state.reportedReviews,\n returnRef: this._userReportModalToggle,\n reportedReviewId: this.state.reportingReviewId,\n toggleWriteReviewModal: this._toggleReviewModal,\n toggleReportReviewModal: this._onReportModalOpen,\n updateReviewHelpfulness: this.updateReviewHelpfulnessVote,\n votedReviews: this.state.votedReviews\n });\n };\n\n private readonly _userReviewModal = (): IReviewModalViewProps => {\n return ReviewModal({\n userReview: this.props.data.userReview.result,\n product: this.props.data.product.result,\n resources: { ...this.props.resources },\n context: this.props.context,\n parentId: this.props.id,\n parentType: this.props.typeName,\n isOpen: this.state.isReviewModalOpen,\n rating: this.state.userReviewRating,\n reviewTitle: this.state.userReviewTitle,\n reviewText: this.state.userReviewText,\n onModalToggle: this._toggleReviewModal,\n onTitleChange: this._onTitleChange,\n onTextChange: this._onTextChange,\n onRatingChange: this._onRatingChange,\n onReviewComplete: this._onReviewComplete,\n renderContextId: 'writeReview-list',\n returnRef: this._userReviewModalToggle,\n hasError: this.state.hasReviewError,\n modalCSS: 'ms-reviews-list'\n });\n };\n\n private readonly _onTitleChange = (event: React.ChangeEvent): void => {\n this.reviewsListCallbacks.updateReviewTitle(event.target.value);\n };\n\n private readonly _onTextChange = (event: React.ChangeEvent): void => {\n this.reviewsListCallbacks.updateReviewText(event.target.value);\n };\n\n private readonly _onRatingChange = (value: number): void => {\n this.reviewsListCallbacks.updateRating(value);\n };\n\n private readonly _toggleReviewModal = (): void => {\n const userReview = this.props.data.userReview.result;\n if (this.state.isReviewModalOpen) {\n this.setState({ isReviewModalOpen: false, hasReviewError: false });\n } else {\n this.setState({\n isReviewModalOpen: true,\n userReviewText: userReview!.reviewText,\n userReviewTitle: userReview!.title,\n userReviewRating: userReview!.rating\n });\n }\n };\n\n private readonly _onReviewComplete = (isSuccess: boolean): void => {\n if (isSuccess) {\n this.setState({ isReviewModalOpen: false, hasReviewError: false });\n } else {\n this.setState({ hasReviewError: true });\n }\n };\n\n private readonly _reportReviewModal = () => {\n return ReportReviewModal({\n resources: { ...this.props.resources },\n context: this.props.context,\n isOpen: this.state.isReportModalOpen,\n returnRef: this._userReportModalToggle,\n reportedKey: this.state.reportedKey,\n onModalToggle: this._onReportModalClose,\n onRadioChange: this._onRadioChange,\n reportReview: this._reportReview,\n hasError: this.state.hasReportError,\n telemetryContent: this.telemetryContent\n });\n };\n\n private readonly _onReportModalOpen = (reviewId: string) => {\n this.setState({\n isReportModalOpen: true,\n reportingReviewId: reviewId,\n reported: false,\n reportedKey: ReviewConcernCategory.SpamAdvertising\n });\n };\n\n private readonly _onReportModalClose = () => {\n this.setState({ isReportModalOpen: false, hasReportError: false });\n };\n\n private readonly _onRadioChange = (event: React.ChangeEvent) => {\n this.setState({ reportedKey: event.currentTarget.getAttribute('data-key') || '' });\n };\n\n private readonly _reportReviewCallback = (reviewId: string, reportedKey: string) => {\n reportReviewConcern(\n new ReportReviewConcernInput(\n reviewId,\n getRnrPartnerId(this.props.context.actionContext),\n this.props.context.request.locale,\n reportedKey,\n this.getUserToken(this.props.context.request),\n getRnrAuthEndpointId(this.props.context.actionContext)\n ),\n this.props.context.actionContext\n )\n .then((_value: boolean) => {\n const reportedReview = this.state.reportedReviews;\n reportedReview.push(reviewId);\n this.setState({ reported: true, reportedReviews: reportedReview, hasReportError: false });\n })\n .catch((error: boolean) => {\n this.setState({ hasReportError: true });\n });\n };\n\n private readonly _reportReview = () => {\n this._reportReviewCallback(this.state.reportingReviewId, this.state.reportedKey);\n };\n\n private readonly updateSortByDropdown = async (notification: ILabeledDropdownOnChangeNotification) => {\n await this.updateReviews(0, notification.selectedOption, this.state.selectedFilterByOption, 1, this.state.isFilterApplied);\n };\n\n private readonly updateFilterByDropdown = async (notification: ILabeledDropdownOnChangeNotification) => {\n await this.updateReviews(0, this.state.selectedSortByOption, notification.selectedOption, 1, true);\n };\n\n private readonly updateReviews = async (\n skipItems: number | 0,\n selectedSortByOption: ILabeledDropdownOption,\n selectedFilterByOption: ILabeledDropdownOption,\n currentPage: number,\n isFilterApplied: boolean\n ) => {\n const productId = getSelectedProductIdFromActionInput(this.props.context.actionContext);\n if (productId === undefined) {\n return;\n }\n const result = await getReviewsForGivenProduct(\n // Task #211227597 Remove this hardcoded values.\n new GetProductReviewsInput(\n productId,\n getRnrPartnerId(this.props.context.actionContext),\n this.props.context.request.locale,\n getRnrEndpointId(this.props.context.actionContext),\n selectedSortByOption.key,\n selectedFilterByOption.key,\n skipItems < 0 ? 0 : skipItems,\n this.props.config.reviewsShownOnEachPage\n ),\n this.props.context.actionContext\n );\n if (result && result.items && result.pagingInfo && result.pagingInfo.totalItems !== undefined) {\n this.setState({\n currentPage,\n listOfReviews: result.items,\n selectedSortByOption,\n selectedFilterByOption,\n reviewsCount: result.pagingInfo.totalItems,\n isFilterApplied\n });\n }\n };\n\n private readonly _updateVoteUi = (reviewId: string, isHelpful: boolean): void => {\n let alreadyExists = false;\n let list = this.state.votedReviews.map(review => {\n if (review.reviewId === reviewId) {\n review.approved = isHelpful;\n alreadyExists = true;\n }\n return review;\n });\n\n if (!alreadyExists) {\n list = list.concat({ reviewId, approved: isHelpful });\n }\n\n this.setState({ votedReviews: list });\n };\n\n private readonly updateReviewHelpfulnessVote = (reviewId: string, isHelpful: boolean): void => {\n submitHelpfulnessVote(\n new SubmitHelpfulnessVoteInput(\n reviewId,\n getRnrPartnerId(this.props.context.actionContext),\n this.props.context.request.locale,\n isHelpful,\n this.getUserToken(this.props.context.request),\n getRnrAuthEndpointId(this.props.context.actionContext)\n ),\n this.props.context.actionContext\n )\n .then(() => {\n this._updateVoteUi(reviewId, isHelpful);\n })\n .catch((error: Error) => {\n throw new Error('[submitHelpfulnessVote]Error executing action');\n });\n };\n\n private readonly getUserToken = (context: Msdyn365.IRequestContext): string => {\n return context && context.user && context.user.token;\n };\n}\n\nexport default ReviewsList;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { IModuleProps, Module, Node } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport { IReviewModalViewProps } from '../../common/review-modal';\nimport { IReportReviewModalViewProps } from './components/report-review-modal';\nimport { IReviewCardViewProps } from './components/review-card';\nimport { IReviewsListState, IReviewsListViewProps } from './reviews-list';\n\nconst ReviewsListview: React.FC = props => {\n const {\n averageRating,\n filterByDropdown,\n heading,\n moduleProps,\n noReviewsMessage,\n noReviewsWithFilterMessage,\n pageControls,\n refineReviewsProps,\n reportReviewModal,\n reviewsListProps,\n reviewCards,\n reviewCount,\n reviewModal,\n sortByDropdown,\n state,\n userReview\n } = props;\n\n if (!userReview && reviewCards.length === 0 && !state.isFilterApplied) {\n return {noReviewsMessage};\n }\n\n return (\n \n {heading}\n {averageRating}\n {reviewCount}\n \n {sortByDropdown}\n {filterByDropdown}\n \n \n {userReview && buildReviewCard(userReview)}\n {reviewCards.map(review => {\n return buildReviewCard(review);\n })}\n \n {reviewCards.length === 0 && state.isFilterApplied && noReviewsWithFilterMessage}\n {pageControls}\n {createReviewModal(reviewModal, moduleProps)}\n {createReportModal(reportReviewModal, state)}\n \n );\n};\n\nconst buildReviewCard = (props: IReviewCardViewProps) => {\n return (\n \n \n {props.rating}\n {props.name}\n \n \n \n {props.reviewTitle}\n {props.date}\n {props.reviewText}\n \n \n {props.responseName}\n {props.responseDate}\n {props.responseText}\n \n \n {props.ratingHelpfulLabel}\n {props.like}\n {props.dislike}\n {props.edit}\n {props.report}\n \n \n \n );\n};\n\nconst createReviewModal = (props: IReviewModalViewProps, moduleProps: IModuleProps): JSX.Element => {\n return (\n \n {props.modalHeader}\n \n \n \n {props.rating}\n {props.ratingLabel}\n \n \n {props.titleLabel}\n {props.titleInput}\n \n \n {props.textLabel}\n {props.textInput}\n \n {props.privacyPolicyUrl}\n {props.error}\n \n \n \n {props.submitButton}\n {props.cancelButton}\n \n \n );\n};\n\nconst createReportModal = (props: IReportReviewModalViewProps, state: IReviewsListState): JSX.Element => {\n return (\n \n {state.reported ? props.headerSubmitted : props.header}\n \n {state.reported ? props.reportSubmittedMessage : [props.reportMessage, props.radioButtons, props.error]}\n \n {state.reported ? props.succesfulButton : [props.submitButton, props.cancelButton]}\n \n );\n};\n\nexport default ReviewsListview;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { getPayloadObject, getTelemetryAttributes, ITelemetryContent, TelemetryConstant } from '@msdyn365-commerce-modules/utilities';\nimport React from 'react';\n\nexport const SignInMessage: React.FC<{ text: string }> = (props: { text: string }) => {\n return

{props.text}

;\n};\n\nexport const SignInButton: React.FC<{ text: string; href: string; ariaLabel: string; telemetryContent?: ITelemetryContent }> = (props: {\n text: string;\n href: string;\n ariaLabel: string;\n telemetryContent?: ITelemetryContent;\n}) => {\n const { text, href, ariaLabel, telemetryContent } = props;\n const payLoad = getPayloadObject('click', telemetryContent!, TelemetryConstant.SignIn);\n const attributes = getTelemetryAttributes(telemetryContent!, payLoad);\n return (\n \n {text}\n \n );\n};\n\ninterface IModalToggleProps {\n innerRef: React.RefObject | undefined;\n id: string;\n text: string;\n ariaLabel: string;\n telemetryContent?: ITelemetryContent;\n onClick(): void;\n}\n\nexport const ModalToggle: React.FC = (props: IModalToggleProps) => {\n const { text, onClick, ariaLabel, innerRef, telemetryContent, id } = props;\n const payLoad = getPayloadObject('click', telemetryContent!, TelemetryConstant.WriteReview);\n const attributes = getTelemetryAttributes(telemetryContent!, payLoad);\n return (\n \n );\n};\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { Review } from '@msdyn365-commerce/commerce-entities';\nimport * as Msdyn365 from '@msdyn365-commerce/core';\nimport { SimpleProduct } from '@msdyn365-commerce/retail-proxy';\nimport { getTelemetryObject, IModuleProps, ITelemetryContent } from '@msdyn365-commerce-modules/utilities';\nimport classnames from 'classnames';\nimport React from 'react';\n\nimport { IReviewModalViewProps, ReviewModal, submitReview } from '../../common/review-modal';\nimport { TOGGLE_REVIEW_MODAL_BUTTON_ID } from '../../common/rnrInterface';\nimport { ModalToggle, SignInButton, SignInMessage } from './components/components';\nimport { IWriteReviewData } from './write-review.data';\nimport { IWriteReviewProps } from './write-review.props.autogenerated';\n\nexport interface IWriteReviewCallbacks {\n toggleModal(): void;\n updateReviewTitle(title: string): void;\n updateReviewText(text: string): void;\n updateRating(rating: number): void;\n onReviewSubmitted(isSuccessful: boolean): void;\n submitReview(\n product: SimpleProduct,\n title: string,\n text: string,\n rating: number,\n context: Msdyn365.ICoreContext,\n userReview?: Review,\n onReviewSubmission?: (isSuccessful: boolean) => void\n ): void;\n}\n\nexport interface IWriteReviewState {\n rating: number;\n reviewTitle: string;\n reviewText: string;\n isReviewModalOpen: boolean;\n hasReviewError: boolean;\n}\n\nexport interface IWriteReviewViewProps extends IWriteReviewProps {\n state: IWriteReviewState;\n className: string;\n callbacks: IWriteReviewCallbacks;\n signInMessage: React.ReactNode;\n signInButton: React.ReactNode;\n modalToggle: React.ReactNode;\n reviewModal: IReviewModalViewProps;\n moduleProps: IModuleProps;\n heading: React.ReactNode;\n}\n\n/**\n * This module is enables user's to leave ratings and reviews on a specific product\n * WriteReview module.\n * @extends {React.PureComponent>}\n */\nclass WriteReview extends React.PureComponent, IWriteReviewState> {\n private readonly _modalToggleRef: React.RefObject | undefined;\n\n private readonly telemetryContent: ITelemetryContent;\n private readonly writeReviewCallbacks: IWriteReviewCallbacks = {\n // @ts-expect-error\n toggleModal: this._toggleReviewModal,\n updateReviewTitle: (title: string): void => {\n this.setState({ reviewTitle: title });\n },\n updateReviewText: (text: string): void => {\n this.setState({ reviewText: text });\n },\n updateRating: (rating: number): void => {\n this.setState({ rating });\n },\n onReviewSubmitted: (isSuccessful: boolean): void => {\n if (isSuccessful) {\n this.setState({ isReviewModalOpen: false, hasReviewError: false });\n } else {\n this.setState({ hasReviewError: true });\n }\n },\n submitReview\n };\n public constructor(props: IWriteReviewProps) {\n super(props);\n const {\n userReview: { result: userReview }\n } = this.props.data;\n this._toggleReviewModal = this._toggleReviewModal.bind(this);\n this._modalToggleRef = React.createRef();\n const rating = userReview ? userReview.rating : 0;\n const reviewTitle = userReview ? userReview.title : '';\n const reviewText = userReview ? userReview.reviewText : '';\n\n this.state = {\n isReviewModalOpen: false,\n rating,\n reviewTitle,\n reviewText,\n hasReviewError: false\n };\n this.telemetryContent = getTelemetryObject(\n this.props.context.request.telemetryPageName!,\n this.props.friendlyName,\n this.props.telemetry\n );\n }\n\n public render(): JSX.Element {\n const { resources } = this.props;\n const { className, heading } = this.props.config;\n const {\n product: { result: product },\n userReview: { result: userReview }\n } = this.props.data;\n\n const userInfo = this.props.context && this.props.context.request && this.props.context.request.user;\n const completeClass = classnames('ms-write-review', 'msc-modal-input-required', className);\n const viewProps = {\n ...this.props,\n state: this.state,\n className: completeClass,\n moduleProps: {\n moduleProps: this.props,\n className: completeClass,\n id: null\n },\n callbacks: this.writeReviewCallbacks,\n signInMessage: ,\n signInButton: (\n \n ),\n modalToggle: !Msdyn365.isOboRequest(this.props.context.request) && product && (\n \n ),\n reviewModal: this._buildUserReviewModal(),\n heading: heading && heading.text && (\n \n )\n } as IWriteReviewViewProps;\n\n return this.props.renderView(viewProps) as React.ReactElement;\n }\n\n public handleHeadingChange = (event: Msdyn365.ContentEditableEvent) => (this.props.config.heading!.text = event.target.value);\n private readonly _onTitleChange = (event: React.ChangeEvent): void => {\n this.writeReviewCallbacks.updateReviewTitle(event.target.value);\n };\n\n private readonly _onTextChange = (event: React.ChangeEvent): void => {\n this.writeReviewCallbacks.updateReviewText(event.target.value);\n };\n\n private readonly _onRatingChange = (value: number): void => {\n this.writeReviewCallbacks.updateRating(value);\n };\n\n private readonly _toggleReviewModal = (): void => {\n const userReview = this.props.data.userReview.result;\n if (this.state.isReviewModalOpen) {\n this.setState({ isReviewModalOpen: false, hasReviewError: false });\n } else if (userReview) {\n this.setState({\n isReviewModalOpen: true,\n reviewText: userReview.reviewText,\n reviewTitle: userReview.title,\n rating: userReview.rating\n });\n } else {\n this.setState({\n isReviewModalOpen: true,\n reviewText: '',\n reviewTitle: '',\n rating: 0\n });\n }\n };\n\n /**\n * This method builds the user review modal.\n * @param config The module config.\n */\n private _buildUserReviewModal(): IReviewModalViewProps {\n return ReviewModal({\n userReview: this.props.data.userReview.result,\n product: this.props.data.product.result,\n resources: { ...this.props.resources },\n context: this.props.context,\n parentId: this.props.id,\n parentType: this.props.typeName,\n isOpen: this.state.isReviewModalOpen,\n rating: this.state.rating,\n reviewTitle: this.state.reviewTitle,\n reviewText: this.state.reviewText,\n onModalToggle: this._toggleReviewModal,\n onTitleChange: this._onTitleChange,\n onTextChange: this._onTextChange,\n onRatingChange: this._onRatingChange,\n onReviewComplete: this.writeReviewCallbacks.onReviewSubmitted,\n renderContextId: 'writeReview',\n returnRef: this._modalToggleRef,\n hasError: this.state.hasReviewError,\n telemetryContent: this.telemetryContent\n });\n }\n}\n\nexport default WriteReview;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { IModuleProps, Module, Node } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport { IReviewModalViewProps } from '../../common/review-modal';\nimport { IWriteReviewViewProps } from './write-review';\n\nconst WriteReviewView: React.FC = props => {\n const { heading, signInMessage, signInButton, modalToggle, reviewModal, moduleProps } = props;\n const isAuthenticated = props.context.request.user.isAuthenticated;\n return (\n \n {heading}\n {!isAuthenticated ? (\n <>\n {signInMessage}\n {signInButton}\n \n ) : (\n <>\n {modalToggle}\n {createReviewModal(reviewModal, moduleProps)}\n \n )}\n \n );\n};\n\nconst createReviewModal = (props: IReviewModalViewProps, moduleProps: IModuleProps): JSX.Element => {\n return (\n \n {props.modalHeader}\n \n \n \n {props.rating}\n {props.ratingLabel}\n \n \n {props.titleLabel}\n {props.titleInput}\n \n \n {props.textLabel}\n {props.textInput}\n \n {props.privacyPolicyUrl}\n {props.error}\n \n \n \n {props.submitButton}\n {props.cancelButton}\n \n \n );\n};\n\nexport default WriteReviewView;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { ITelemetry } from '@msdyn365-commerce/core';\nimport { AttributeDataType, DisplayTemplate, ProductRefinerValue, RefinerType } from '@msdyn365-commerce/retail-proxy';\n\nimport { IProductRefinerHierarchy } from '@msdyn365-commerce/commerce-entities';\nimport { DimensionTypes } from '@msdyn365-commerce-modules/retail-actions';\nimport { IRefineItemToggleNotification } from './refine-item-toggle-notification';\n\n/**\n * Types of product refiner values.\n * @deprecated This will be removed soon. Please, use `AttributeDataType` from `@msdyn365-commerce/retail-proxy` instead.\n * @example\n * ```\n * import { AttributeDataType } from `@msdyn365-commerce/retail-proxy`;\n * ```\n */\nexport enum ProductRefinerValueDataTypeValue {\n /**\n * Range slider is used for selections like price.\n * @deprecated This will be removed soon. Please, use `AttributeDataType` from `@msdyn365-commerce/retail-proxy` instead.\n * @example\n * ```\n * import { AttributeDataType } from `@msdyn365-commerce/retail-proxy`;\n * ```\n */\n Range = 1,\n\n /**\n * Range input is a different way to specify ranges and can be expressed with input boxes\n * as well as a set of discrete single-select type values.\n * @deprecated This will be removed soon. Please, use `AttributeDataType` from `@msdyn365-commerce/retail-proxy` instead.\n * @example\n * ```\n * import { AttributeDataType } from `@msdyn365-commerce/retail-proxy`;\n * ```\n */\n RangeInput = 4,\n\n /**\n * This is a discrete list item, either multi-select or single-select.\n * @deprecated This will be removed soon. Please, use `AttributeDataType` from `@msdyn365-commerce/retail-proxy` instead.\n * @example\n * ```\n * import { AttributeDataType } from `@msdyn365-commerce/retail-proxy`;\n * ```\n */\n List = 5,\n\n /**\n * Boolean types allows only single-select.\n * @deprecated This will be removed soon. Please, use `AttributeDataType` from `@msdyn365-commerce/retail-proxy` instead.\n * @example\n * ```\n * import { AttributeDataType } from `@msdyn365-commerce/retail-proxy`;\n * ```\n */\n Boolean = 6\n}\n\n/**\n * Types of product refiners.\n * @deprecated This will be removed soon. Please, use `RefinerType` from `@msdyn365-commerce/retail-proxy` instead.\n * @example\n * ```\n * import { RefinerType } from `@msdyn365-commerce/retail-proxy`;\n * ```\n */\nexport enum ProductRefinerTypeValue {\n /**\n * Refiner values are single-select.\n * @deprecated This will be removed soon. Please, use `RefinerType` from `@msdyn365-commerce/retail-proxy` instead.\n * @example\n * ```\n * import { RefinerType } from `@msdyn365-commerce/retail-proxy`;\n * ```\n */\n Single = 0,\n\n /**\n * Refiner values are multi-select.\n * @deprecated This will be removed soon. Please, use `RefinerType` from `@msdyn365-commerce/retail-proxy` instead.\n * @example\n * ```\n * import { RefinerType } from `@msdyn365-commerce/retail-proxy`;\n * ```\n */\n Multi = 1\n}\n\n/**\n * ProductRefinerSource enum type.\n * @deprecated This will be removed soon. Please, use `ProductRefinerSource` from `@msdyn365-commerce/retail-proxy` instead.\n * @example\n * ```\n * import { ProductRefinerSource } from `@msdyn365-commerce/retail-proxy`;\n * ```\n */\nexport enum ProductRefinerSource {\n /**\n * The None member.\n * @deprecated This will be removed soon. Please, use `ProductRefinerSource` from `@msdyn365-commerce/retail-proxy` instead.\n * @example\n * ```\n * import { ProductRefinerSource } from `@msdyn365-commerce/retail-proxy`;\n * ```\n */\n None = 0,\n\n /**\n * The Attribute member.\n * @deprecated This will be removed soon. Please, use `ProductRefinerSource` from `@msdyn365-commerce/retail-proxy` instead.\n * @example\n * ```\n * import { ProductRefinerSource } from `@msdyn365-commerce/retail-proxy`;\n * ```\n */\n Attribute = 1,\n\n /**\n * The Category member.\n * @deprecated This will be removed soon. Please, use `ProductRefinerSource` from `@msdyn365-commerce/retail-proxy` instead.\n * @example\n * ```\n * import { ProductRefinerSource } from `@msdyn365-commerce/retail-proxy`;\n * ```\n */\n Category = 2,\n\n /**\n * The Price member.\n * @deprecated This will be removed soon. Please, use `ProductRefinerSource` from `@msdyn365-commerce/retail-proxy` instead.\n * @example\n * ```\n * import { ProductRefinerSource } from `@msdyn365-commerce/retail-proxy`;\n * ```\n */\n Price = 3,\n\n /**\n * The Rating member.\n * @deprecated This will be removed soon. Please, use `ProductRefinerSource` from `@msdyn365-commerce/retail-proxy` instead.\n * @example\n * ```\n * import { ProductRefinerSource } from `@msdyn365-commerce/retail-proxy`;\n * ```\n */\n Rating = 4\n}\n\nexport interface IRefineItemData {\n sourceValue?: number;\n swatchImageUrl?: string;\n swatchColorHexCode?: string;\n refinerItemId: number;\n dataTypeValue?: number;\n name: string;\n label: string;\n count?: number;\n isChecked: boolean;\n refineItemUrl?: string;\n minValue?: string;\n maxValue?: string;\n dimensionType?: DimensionTypes;\n rowNumber?: number;\n unitText?: string;\n updatedSliderMaxValue?: string;\n updatedSliderMinValue?: string;\n}\n/**\n * Checks if the data type value corresponds to a slider.\n * @param dataTypeValue\n */\nexport function isRangeType(dataTypeValue: number | undefined): boolean {\n return dataTypeValue === AttributeDataType.Currency || dataTypeValue === AttributeDataType.Decimal;\n}\n\n/**\n * Checks if the data type value corresponds to a range type integer.\n * @param dataTypeValue\n */\nexport function isRangeTypeForInteger(dataTypeValue: number | undefined): boolean {\n return (\n dataTypeValue === AttributeDataType.Currency ||\n dataTypeValue === AttributeDataType.Decimal ||\n dataTypeValue === AttributeDataType.Integer\n );\n}\n\n/**\n * Checks if the data type value corresponds to a custom input box Range.\n * @param dataTypeValue\n */\nexport function isCustomRangeTypeIntegerSelected(\n selectedRefinementCriterion: ProductRefinerValue,\n parentProductRefinerHierarchy: IProductRefinerHierarchy\n): boolean {\n return (\n selectedRefinementCriterion?.RowNumber !== undefined &&\n selectedRefinementCriterion?.RowNumber !== null &&\n selectedRefinementCriterion?.DataTypeValue === AttributeDataType.Integer &&\n parentProductRefinerHierarchy.DisplayTemplateValue === DisplayTemplate.Range\n );\n}\n\n/**\n * Checks if the selectedRefinementCriterion is siingle type with API va;ues or custom type.\n * If custom type then RowNumber is null\n * @param dataTypeValue\n */\nexport function isSingleSelectRangeTypeIntegerSelected(\n selectedRefinementCriterion: ProductRefinerValue,\n productRefinerValue: ProductRefinerValue\n): boolean {\n return (\n productRefinerValue.LeftValueBoundString === selectedRefinementCriterion?.LeftValueBoundString &&\n productRefinerValue.RightValueBoundString === selectedRefinementCriterion?.RightValueBoundString &&\n selectedRefinementCriterion?.RowNumber !== undefined &&\n selectedRefinementCriterion?.RowNumber !== null &&\n selectedRefinementCriterion !== undefined\n );\n}\n\n/**\n * Find the refinement criterion associated with this product refiner value.\n * @param productRefinerValue Product refiner value to match.\n * @param refinementCriteria Selected refinement criteria.\n */\nexport function findMatchingRefinementCriterion(\n productRefinerValue: ProductRefinerValue,\n refinementCriteria: ProductRefinerValue[]\n): ProductRefinerValue | undefined {\n // If the value is a range, then match only on data type value; otherwise match on item string\n return refinementCriteria.find((refinementCriterion: ProductRefinerValue) =>\n isMatchingRefinementCriterion(productRefinerValue, refinementCriterion)\n );\n}\n\n/**\n * Find the refinement criterion associated with this product refiner value.\n * @param productRefinerValue Product refiner value to match.\n * @param refinementCriteria Selected refinement criteria.\n * @param refinementCriterion\n */\nexport function isMatchingRefinementCriterion(\n productRefinerValue: ProductRefinerValue,\n refinementCriterion: ProductRefinerValue,\n parent?: IProductRefinerHierarchy\n): boolean {\n // If the value is a range, then match only on data type value; otherwise match on item string\n // Distinguish by displaytype also\n return (\n refinementCriterion.RefinerRecordId === productRefinerValue.RefinerRecordId &&\n refinementCriterion.RefinerSourceValue === productRefinerValue.RefinerSourceValue &&\n refinementCriterion.DataTypeValue === productRefinerValue.DataTypeValue &&\n ((parent?.DisplayTemplateValue === DisplayTemplate.Range\n ? isRangeType(refinementCriterion.DataTypeValue)\n : isRangeTypeForInteger(refinementCriterion.DataTypeValue)) ||\n refinementCriterion.LeftValueBoundString === productRefinerValue.LeftValueBoundString)\n );\n}\n\nexport function getIntegerRangeName(productRefinerValue: ProductRefinerValue): string {\n let rangeValue = '';\n\n if (productRefinerValue.LeftValueBoundString === '' && productRefinerValue.RightValueBoundString !== '') {\n rangeValue = `< ${productRefinerValue.RightValueBoundLocalizedString || productRefinerValue.RightValueBoundString}`;\n } else if (productRefinerValue.RightValueBoundString === '' && productRefinerValue.LeftValueBoundString !== '') {\n rangeValue = `> ${productRefinerValue.LeftValueBoundLocalizedString || productRefinerValue.LeftValueBoundString}`;\n } else if (productRefinerValue.RightValueBoundString !== '' && productRefinerValue.LeftValueBoundString !== '') {\n rangeValue = `${productRefinerValue.LeftValueBoundLocalizedString ||\n productRefinerValue.LeftValueBoundString} - ${productRefinerValue.RightValueBoundString ||\n productRefinerValue.RightValueBoundString}`;\n }\n return rangeValue;\n}\n\n/**\n * Get input without formatting.\n * @param input - Input string.\n * @returns - Returns number.\n */\nexport function getInputWithoutFormatting(input: string): string {\n // First try to cast raw input to a number\n const inputAsNumber = Number(input);\n if (!Number.isNaN(inputAsNumber)) {\n return input;\n }\n\n // Otherwise try a reverse lookup and fall back to the raw input if all else fails\n // const reverseLookupResult = formattedPriceReverseLookup.get(input);\n // return reverseLookupResult || input;\n return input;\n}\n\nexport function getUpdatedRefinementCriteria(\n itemToggleNotification: IRefineItemToggleNotification,\n currentRefinementCriteria: ProductRefinerValue[]\n): ProductRefinerValue[] {\n const updatedRefinementCriteria: ProductRefinerValue[] = [];\n let toggledItemFound = false;\n\n // Keeping only itemToggled value for integer-range type in currentRefinementCriteria\n if (\n itemToggleNotification.parentProductRefinerHierarchy.DataTypeValue === AttributeDataType.Integer &&\n itemToggleNotification.parentProductRefinerHierarchy.DisplayTemplateValue === DisplayTemplate.Range\n ) {\n currentRefinementCriteria = currentRefinementCriteria.filter(r => {\n return r.RefinerRecordId !== itemToggleNotification.productRefinerValue.RefinerRecordId;\n });\n }\n\n currentRefinementCriteria.forEach((selectedCriterion: ProductRefinerValue) => {\n if (\n isMatchingRefinementCriterion(\n itemToggleNotification.productRefinerValue,\n selectedCriterion,\n itemToggleNotification.parentProductRefinerHierarchy\n )\n ) {\n toggledItemFound = true;\n if (itemToggleNotification.isSelecting) {\n const next = {\n ...selectedCriterion,\n LeftValueBoundString:\n (itemToggleNotification.rangeStart !== undefined && `${itemToggleNotification.rangeStart}`) ||\n selectedCriterion.LeftValueBoundString,\n RightValueBoundString:\n (itemToggleNotification.rangeEnd !== undefined && `${itemToggleNotification.rangeEnd}`) ||\n selectedCriterion.RightValueBoundString\n };\n updatedRefinementCriteria.push(next);\n } // Else the item is being de-selected, so omit it from the refinement criteria\n } else {\n // Keep existing criterion because it is not in the item toggle notification\n updatedRefinementCriteria.push(selectedCriterion);\n }\n });\n\n if (!toggledItemFound) {\n const next = {\n ...itemToggleNotification.productRefinerValue,\n LeftValueBoundString:\n (itemToggleNotification.rangeStart !== undefined && `${itemToggleNotification.rangeStart}`) ||\n itemToggleNotification.productRefinerValue.LeftValueBoundString,\n RightValueBoundString:\n (itemToggleNotification.rangeEnd !== undefined && `${itemToggleNotification.rangeEnd}`) ||\n itemToggleNotification.productRefinerValue.RightValueBoundString\n };\n updatedRefinementCriteria.push(next);\n\n // If single select, then deselect any others in the parent refiner group\n if (\n (itemToggleNotification.productRefinerValue.DataTypeValue === AttributeDataType.Text ||\n itemToggleNotification.productRefinerValue.DataTypeValue === AttributeDataType.TrueFalse) &&\n itemToggleNotification.parentProductRefinerHierarchy.RefinerTypeValue === RefinerType.SingleSelect\n ) {\n itemToggleNotification.parentProductRefinerHierarchy.Values.forEach((child: ProductRefinerValue) => {\n if (child.RefinerRecordId === next.RefinerRecordId && child.LeftValueBoundString === next.LeftValueBoundString) {\n // Do nothing\n } else {\n const matchingIndex = updatedRefinementCriteria.findIndex((criterion: ProductRefinerValue) =>\n isMatchingRefinementCriterion(child, criterion, itemToggleNotification.parentProductRefinerHierarchy)\n );\n if (matchingIndex > -1) {\n updatedRefinementCriteria.splice(matchingIndex, 1);\n }\n }\n });\n }\n }\n\n return updatedRefinementCriteria;\n}\n\nexport function formatPrice(\n amount: string | undefined,\n currency: string | undefined,\n locale: string | undefined,\n telemetry: ITelemetry\n): string {\n if (!amount || !currency) {\n telemetry.trace(`[refine-menu.utilities.formatPrice] could not format price for ${amount} ${currency}`);\n return amount || '';\n }\n const priceAmount = (amount && Number(amount)) || 0;\n let result: string;\n\n try {\n result = new Intl.NumberFormat(locale, {\n style: 'currency',\n currencyDisplay: 'symbol',\n currency,\n minimumFractionDigits: 0\n }).format(priceAmount);\n } catch (error) {\n result = `${priceAmount} ${currency}`;\n telemetry.warning(`[refine-menu.utilities.formatPrice] Failed to format price for ${result}: ${error}`);\n }\n\n return result;\n}\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { IProductRefinerHierarchy } from '@msdyn365-commerce/commerce-entities';\nimport { AttributeDataType, DisplayTemplate, ProductRefinerValue } from '@msdyn365-commerce/retail-proxy';\nimport { getPayloadObject, getTelemetryAttributes, IPayLoad } from '@msdyn365-commerce-modules/utilities';\nimport classnames from 'classnames';\nimport { computed } from 'mobx';\nimport { observer } from 'mobx-react';\nimport * as React from 'react';\n\nimport { ProductListInventoryFilteringOptions } from '../actions';\nimport { IChoiceSummaryProps } from './choice-summary.props';\nimport { getIntegerRangeName, isMatchingRefinementCriterion, isRangeType } from './utilities';\n\ninterface IRefinerMap {\n key: string;\n value: ProductRefinerValue;\n rangeDisplayType?: number | undefined;\n}\n\n/**\n * ChoiceSummary component.\n */\n@observer\nexport default class ChoiceSummary extends React.PureComponent {\n private readonly closeButtonGlyph: string = 'msi-close-btn';\n\n private readonly payLoad: IPayLoad;\n\n @computed get selectedRefinersMap(): IRefinerMap[] {\n let { selectedChoices } = this.props;\n const { channelInventoryConfigurationId, refinerHierarchy } = this.props;\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access -- app configs are of generic type\n if (this.props.context?.app.config.productListInventoryDisplay === ProductListInventoryFilteringOptions.HideOOS) {\n selectedChoices = selectedChoices.filter(choice => {\n const parent = refinerHierarchy.find(\n (hierarchy: IProductRefinerHierarchy) =>\n !!hierarchy.Values.find((value: ProductRefinerValue) => isMatchingRefinementCriterion(value, choice))\n );\n return parent && parent.RecordId !== channelInventoryConfigurationId;\n });\n }\n return selectedChoices.map((selectedRefiner: ProductRefinerValue, index) => {\n const rangeParentDisplay = refinerHierarchy.filter(p => p.RecordId === selectedRefiner.RefinerRecordId);\n return {\n key: this._getKeyForRefinerValue(selectedRefiner, index.toString()),\n value: selectedRefiner,\n // parameter to store Display Template type\n rangeDisplayType: rangeParentDisplay[0]?.DisplayTemplateValue || undefined\n } as IRefinerMap;\n });\n }\n\n constructor(props: Readonly) {\n super(props);\n this.payLoad = getPayloadObject('click', this.props.telemetryContent!, '');\n }\n\n public render(): JSX.Element {\n const { clearAllText, label, classNames, choiceAriaLabel, closeAriaLabel } = this.props;\n const items = this.selectedRefinersMap;\n this.payLoad.contentAction.etext = clearAllText;\n const clearAllAttributes = getTelemetryAttributes(this.props.telemetryContent!, this.payLoad);\n return (\n
\n {items.length > 0 && label && {label}}\n
    \n {items.map((item: IRefinerMap) => {\n this.payLoad.contentAction.etext = item.key;\n const attribute = getTelemetryAttributes(this.props.telemetryContent!, this.payLoad);\n // Get range value for Range display and integer type only (not for Integer with TextBox(4) display)\n const rangeInteger =\n item.value.DataTypeValue === AttributeDataType.Integer &&\n item.rangeDisplayType &&\n item.rangeDisplayType === DisplayTemplate.Range &&\n item.value.RefinerRecordId !== 0;\n const newIntRange = rangeInteger\n ? item.key\n : item.value.LeftValueBoundString && item.value.LeftValueBoundLocalizedString === ''\n ? item.value.LeftValueBoundString\n : (item.value.LeftValueBoundLocalizedString || item.value.LeftValueBoundLocalizedString === undefined) &&\n item.value.RefinerRecordId === 0\n ? item.key\n : item.value.LeftValueBoundString;\n return (\n
  • \n \n {newIntRange}\n \n \n
  • \n );\n })}\n
\n {items.length > 0 && clearAllText && (\n \n {clearAllText}\n \n )}\n
\n );\n }\n\n private _getKeyForRefinerValue(productRefinerValue: ProductRefinerValue, index: string): string {\n const { choiceFormat, choiceRangeValueFormat, refinerHierarchy, telemetry, refinerValues } = this.props;\n const overallFormat = choiceFormat || '{1}';\n const rangeFormat = choiceRangeValueFormat;\n let refinerName = '';\n let parent: IProductRefinerHierarchy | undefined;\n if (refinerHierarchy && refinerHierarchy.find) {\n parent = refinerHierarchy.find(\n (hierarchy: IProductRefinerHierarchy) =>\n !!hierarchy.Values.find((value: ProductRefinerValue) => isMatchingRefinementCriterion(value, productRefinerValue))\n );\n\n if (!parent) {\n telemetry.warning('[choice-summary] could not find parent of selected refiner value');\n } else {\n refinerName = parent.KeyName || '';\n }\n }\n\n let refinerValueName: string;\n if (isRangeType(productRefinerValue.DataTypeValue)) {\n refinerValueName = rangeFormat\n .replace('{0}', this._formatPrice(productRefinerValue.LeftValueBoundString, productRefinerValue.UnitText))\n .replace('{1}', this._formatPrice(productRefinerValue.RightValueBoundString, productRefinerValue.UnitText));\n } else if (productRefinerValue.RefinerRecordId === 0) {\n const filterValue = refinerValues?.Values.find(\n refiner => refiner.LeftValueBoundString === productRefinerValue.LeftValueBoundString\n );\n refinerValueName = (filterValue ? filterValue.LeftValueBoundLocalizedString : productRefinerValue.LeftValueBoundString) || '';\n } else {\n refinerValueName = productRefinerValue.LeftValueBoundLocalizedString || productRefinerValue.LeftValueBoundString || '';\n }\n\n if (refinerName === 'Rating' || refinerName === 'Price') {\n return overallFormat.replace('{0}', refinerName).replace('{1}', `${refinerValueName}`);\n }\n // Adding integer range format\n if (\n productRefinerValue.DataTypeValue === AttributeDataType.Integer &&\n parent?.DisplayTemplateValue === DisplayTemplate.Range &&\n productRefinerValue.RefinerRecordId !== 0\n ) {\n refinerValueName = getIntegerRangeName(productRefinerValue);\n return refinerValueName;\n }\n return overallFormat.replace('{0}', refinerName).replace('{1}', `${refinerValueName}_${refinerName}_${index}`);\n }\n\n private _formatPrice(amount: string | undefined, currency: string | undefined): string {\n if (!amount || !currency) {\n this.props.telemetry.trace('[choice-summary] could not format price');\n return amount || '';\n }\n let result = amount;\n\n try {\n result = this.props.context!.cultureFormatter.formatCurrency(Number(amount), currency);\n } catch (error) {\n this.props.telemetry.warning(`Failed to format price for ${result}: ${error}`);\n }\n\n return result;\n }\n\n private readonly _onClick = (e: React.MouseEvent): void => {\n e.preventDefault();\n e.stopPropagation();\n\n const target = e.currentTarget as HTMLElement;\n const clearAll = target.getAttribute('class')!.includes('choice-summary__clear-all');\n const selectedRefiner = clearAll ? undefined : this._getSelectedRefinerChoice(target);\n\n if (this.props.onChoiceClicked) {\n this.props.onChoiceClicked({\n clearAll,\n itemClicked: target,\n choiceClicked: selectedRefiner,\n nextItemToFocus: target.nextSibling as HTMLElement\n });\n }\n };\n\n private _getSelectedRefinerChoice(itemClicked: HTMLElement): ProductRefinerValue | undefined {\n const result = this.selectedRefinersMap.find(selected => itemClicked.id === selected.key);\n return (result && result.value) || undefined;\n }\n}\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport * as React from 'react';\n\ninterface IErrorMessage {\n text?: string;\n}\n\nexport const ErrorMessage: React.FC = ({ text }) => {\n return (\n \n
\n {` `}\n {text}\n {` `}\n
\n
\n );\n};\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { ICoreContext, IGridSettings, IImageData, IImageSettings, Image, IRequestContext } from '@msdyn365-commerce/core';\nimport { SimpleProduct } from '@msdyn365-commerce/retail-proxy';\nimport { getFallbackImageUrl, getProductPageUrlSync } from '@msdyn365-commerce-modules/retail-actions';\nimport { getPayloadObject, getTelemetryAttributes, ITelemetryContent, onTelemetryClick } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport { ISearchResultContainerResources } from '../search-result-container.props.autogenerated';\n\n// Import { IComponent, IComponentProps, ICoreContext, IGridSettings, IImageData, IImageSettings, Image, msdyn365Commerce } from '@msdyn365-commerce/core';\n\ninterface IFeatureSearchResultItem {\n product: SimpleProduct | null;\n context: ICoreContext;\n resources: ISearchResultContainerResources;\n imageSettings?: IImageSettings;\n moduleType: string;\n moduleId: string;\n telemetryContent?: ITelemetryContent;\n recommendation?: string;\n}\n\nexport const FeatureSearchResultItem: React.FC = ({\n product,\n context,\n imageSettings,\n resources,\n telemetryContent,\n recommendation\n}) => {\n if (product === null) {\n return null;\n }\n\n const productName = product.Name;\n const productRecordId = product && product.RecordId ? product.RecordId : 0;\n const productUrl = getProductPageUrlSync(product.Name || '', productRecordId, context && context.actionContext, undefined);\n const fallbackImage = getFallbackImageUrl(\n product.ItemId,\n context.actionContext.requestContext.apiSettings,\n context.request.app?.config?.OmniChannelMedia\n );\n const heading =\n recommendation && recommendation === 'descriptions' ? resources.featureSimilarDescriptionTitle : resources.featureSimilarLooksTitle;\n\n // Construct telemetry attribute to render\n const payLoad = getPayloadObject('click', telemetryContent!, productName!, productRecordId.toString());\n\n const attribute = getTelemetryAttributes(telemetryContent!, payLoad);\n return (\n
\n \n
\n {renderProductPlacementImage(\n imageSettings,\n context.request.gridSettings,\n product.PrimaryImageUrl,\n product.Name,\n fallbackImage,\n context.actionContext.requestContext\n )}\n
\n \n
\n

{heading}

\n {renderProductTitle(product?.Name)}\n
\n
\n );\n};\n\nfunction renderProductPlacementImage(\n imageSettings?: IImageSettings,\n gridSettings?: IGridSettings,\n imageUrl?: string,\n altText?: string,\n fallbackImage?: string,\n context?: IRequestContext\n): JSX.Element | null {\n if (!imageUrl || !gridSettings || !imageSettings) {\n return null;\n }\n const img: IImageData = {\n src: imageUrl,\n altText: altText ? altText : ''\n };\n const imageProps = {\n gridSettings,\n imageSettings,\n fallBackSrc: fallbackImage\n };\n return ;\n}\n\nfunction renderProductTitle(title?: string): JSX.Element | null {\n return

{title}

;\n}\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport * as React from 'react';\n\ninterface ILink {\n className?: string;\n text?: string;\n href?: string;\n ariaLabel?: string;\n}\n\nexport const Link: React.FC = ({ text, className, href, ariaLabel }) => (\n \n {' '}\n {text}{' '}\n \n);\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { Button, Modal, ModalBody, ModalFooter, ModalHeader } from '@msdyn365-commerce-modules/utilities';\nimport React from 'react';\n\nexport interface ISearchResultModalViewProps {\n modal: React.ReactElement;\n modalHeader: React.ReactElement;\n modalFooter: React.ReactElement;\n modalBody: React.ReactElement;\n}\n\ninterface IModalToggleProps {\n innerRef: React.RefObject | undefined;\n id: string;\n text: string;\n ariaLabel: string;\n onClick(): void;\n}\n\nexport interface ISearchResultModalResources {\n modalTitle: string;\n modalCloseButtonText: string;\n}\n\nexport interface ISearchResultModalProps {\n resources: ISearchResultModalResources;\n isOpen: boolean;\n returnRef: React.RefObject | undefined;\n onModalToggle(): void;\n}\n\nexport const ModalToggle: React.FC = (props: IModalToggleProps) => {\n const { text, onClick, ariaLabel, innerRef, id } = props;\n return (\n \n );\n};\n\nexport const SearchResultModal = (props: ISearchResultModalProps): ISearchResultModalViewProps => {\n return {\n modal: modalNode(props),\n modalHeader: modalHeaderNode(props),\n modalFooter: modalFooterNode(props),\n modalBody: \n };\n};\n\nconst modalNode = (props: ISearchResultModalProps) => {\n return (\n \n );\n};\n\nconst modalHeaderNode = (props: ISearchResultModalProps) => {\n return {props.resources.modalTitle};\n};\n\nconst modalFooterNode = (props: ISearchResultModalProps) => {\n return (\n \n \n \n );\n};\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { IProductsDimensionsAvailabilities } from '@msdyn365-commerce/commerce-entities';\nimport { IPriceComponentResources, ProductComponent } from '@msdyn365-commerce/components';\nimport { ICoreContext, IImageSettings } from '@msdyn365-commerce/core';\nimport { ProductSearchResult } from '@msdyn365-commerce/retail-proxy';\nimport { ArrayExtensions } from '@msdyn365-commerce-modules/retail-actions';\nimport { ITelemetryContent } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport { ISearchResultContainerResources } from '../search-result-container.props.autogenerated';\n\ninterface IProductSearchResultItems {\n products: ProductSearchResult[];\n context: ICoreContext;\n resources: ISearchResultContainerResources;\n imageSettings?: IImageSettings;\n moduleType: string;\n moduleId: string;\n allowBackNavigation?: boolean;\n telemetryContent: ITelemetryContent;\n quickviewSlot?: {} | null | undefined;\n productComparisonButton?: {} | null | undefined;\n channelInventoryConfigurationId?: number;\n isPriceMinMaxEnabled?: boolean;\n productsDimensionAvailabilities?: IProductsDimensionsAvailabilities[][];\n}\n\n/**\n * Returns the product inventory label.\n * @param channelInventoryConfigurationId - The channel configuration Id.\n * @param product - The product.\n * @returns The inventory label.\n */\nexport function getInventoryLabel(channelInventoryConfigurationId: number | undefined, product: ProductSearchResult): string | undefined {\n if (!channelInventoryConfigurationId || !ArrayExtensions.hasElements(product.AttributeValues)) {\n return undefined;\n }\n const inventoryAttribute = product.AttributeValues.find(attribute => attribute.RecordId === channelInventoryConfigurationId);\n if (inventoryAttribute) {\n return inventoryAttribute.TextValue;\n }\n return undefined;\n}\n\nexport const ProductSearchResultItems: React.FC = ({\n products,\n context,\n imageSettings,\n resources,\n moduleType,\n moduleId,\n allowBackNavigation,\n telemetryContent,\n quickviewSlot,\n productComparisonButton,\n channelInventoryConfigurationId,\n isPriceMinMaxEnabled,\n productsDimensionAvailabilities\n}) => {\n const priceResources: IPriceComponentResources = {\n priceRangeSeparator: resources.priceRangeSeparator\n };\n return (\n
    \n {products.map((product: ProductSearchResult, index: number) => (\n
  • \n \n ArrayExtensions.hasElements(dimensionAvailability) &&\n dimensionAvailability[0].masterProductId === product.MasterProductId\n )}\n />\n
  • \n ))}\n
\n );\n};\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { ISliderLabel, ISliderThumbProps, Slider } from '@msdyn365-commerce-modules/utilities';\nimport debounce from 'lodash/debounce';\nimport { computed } from 'mobx';\nimport { observer } from 'mobx-react';\nimport * as React from 'react';\n\nimport { IRefineItemProps, IRefineItemState } from './refine-item';\n\ntype InputType = 'Min' | 'Max';\n\nexport type RangeRefineItemType = 'slider' | 'input';\n\n/**\n * Range refine item properties.\n */\nexport interface IRangeRefineItemProps extends IRefineItemProps {\n rangeType: RangeRefineItemType;\n minValueSliderThumbAriaLabel?: string;\n maxValueSliderThumbAriaLabel?: string;\n sliderKey?: string;\n}\n\n/**\n * Range refine item state.\n */\nexport interface IRangeRefineItemState extends IRefineItemState {\n validationErrorMin: string | undefined;\n validationErrorMax: string | undefined;\n selectedMin: string | undefined;\n selectedMax: string | undefined;\n touchedMin: boolean;\n touchedMax: boolean;\n sliderId: string;\n minValue: string | undefined;\n maxValue: string | undefined;\n labels: ISliderLabel[];\n sliderThumbs: ISliderThumbProps[];\n}\n\n/**\n * RangeRefineItem component (controlled by RefineSubmenu).\n */\n@observer\nexport default class RangeRefineItem extends React.Component {\n private readonly _formattedPriceReverseLookup: Map = new Map();\n\n private readonly minInput: React.RefObject;\n\n private readonly maxInput: React.RefObject;\n\n @computed get currencyCode(): string {\n return this.props.productRefinerValue.UnitText || '';\n }\n\n public constructor(props: IRangeRefineItemProps) {\n super(props);\n this._onRangeUpdate = this._onRangeUpdate.bind(this);\n this._onRangeUpdateEnd = this._onRangeUpdateEnd.bind(this);\n this._handleRangeTooltipText = this._handleRangeTooltipText.bind(this);\n this._changeMin = this._changeMin.bind(this);\n this._changeMax = this._changeMax.bind(this);\n this._finishChangeMin = this._finishChangeMin.bind(this);\n this._finishChangeMax = this._finishChangeMax.bind(this);\n\n this.minInput = React.createRef();\n this.maxInput = React.createRef();\n\n const { selectedRefinementCriterion } = this.props;\n const initialMin = selectedRefinementCriterion?.LeftValueBoundString ?? '0';\n const initialMax = selectedRefinementCriterion?.RightValueBoundString;\n const sliderId = `slider_${String(this.props.parentProductRefinerHierarchy.RecordId)}_${String(\n this.props.productRefinerValue.RefinerRecordId\n )}`;\n const minValue = this.props.productRefinerValue.LeftValueBoundString;\n const maxValue = this.props.productRefinerValue.RightValueBoundString;\n const minPrice = this._formatPrice(minValue);\n const maxPrice = this._formatPrice(maxValue);\n const labels: ISliderLabel[] = this.getLabels(sliderId, minPrice, maxPrice);\n const selectedMin =\n this.props.selectedRefinementCriterion?.LeftValueBoundString ?? this.props.productRefinerValue.LeftValueBoundString ?? '0';\n const selectedMax =\n this.props.selectedRefinementCriterion?.RightValueBoundString ??\n this.props.productRefinerValue.RightValueBoundString ??\n maxValue;\n const selectedMinPrice = this._formatPrice(selectedMin);\n const selectedMaxPrice = this._formatPrice(selectedMax);\n const sliderKeyString = this.props.sliderKey ? `_${String(this.props.sliderKey)}` : '';\n const sliderThumbs: ISliderThumbProps[] = this.getSliderThumbs(\n sliderId,\n sliderKeyString,\n selectedMin,\n selectedMinPrice,\n selectedMax,\n selectedMaxPrice,\n maxPrice\n );\n this.state = {\n isChecked: false,\n validationErrorMin: undefined,\n validationErrorMax: undefined,\n selectedMin: initialMin,\n selectedMax: initialMax,\n touchedMin: false,\n touchedMax: false,\n sliderId,\n minValue,\n maxValue,\n labels,\n sliderThumbs\n };\n }\n\n public shouldComponentUpdate(nextProps: IRangeRefineItemProps, nextState: IRangeRefineItemState): boolean {\n if (this.state === nextState && this.props === nextProps) {\n return false;\n }\n return true;\n }\n\n public componentDidUpdate(previousProps: IRangeRefineItemProps): void {\n if (previousProps !== this.props) {\n this.updateSliderProps();\n }\n }\n\n public render(): JSX.Element | undefined {\n const { productRefinerValue, parentProductRefinerHierarchy, refineItemCommonProps } = this.props;\n\n if (!productRefinerValue || !parentProductRefinerHierarchy) {\n refineItemCommonProps.telemetry.error(\n 'Cannot render refine value range without productRefinerValue and parentProductRefinerHierarchy'\n );\n return undefined;\n }\n\n if (this.props.rangeType === 'input') {\n return this._renderInputFields();\n }\n\n return this._renderSlider();\n }\n\n /**\n * Function to update slider props.\n */\n private updateSliderProps(): void {\n const sliderId = `slider_${String(this.props.parentProductRefinerHierarchy.RecordId)}_${String(\n this.props.productRefinerValue.RefinerRecordId\n )}`;\n const minValue = this.props.productRefinerValue.LeftValueBoundString;\n const maxValue = this.props.productRefinerValue.RightValueBoundString;\n const minPrice = this._formatPrice(minValue);\n const maxPrice = this._formatPrice(maxValue);\n const labels: ISliderLabel[] = this.getLabels(sliderId, minPrice, maxPrice);\n const selectedMin =\n this.props.selectedRefinementCriterion?.LeftValueBoundString ?? this.props.productRefinerValue.LeftValueBoundString ?? '0';\n const selectedMax =\n this.props.selectedRefinementCriterion?.RightValueBoundString ??\n this.props.productRefinerValue.RightValueBoundString ??\n maxValue;\n const selectedMinPrice = this._formatPrice(selectedMin);\n const selectedMaxPrice = this._formatPrice(selectedMax);\n const sliderKeyString = this.props.sliderKey ? `_${String(this.props.sliderKey)}` : '';\n const sliderThumbs: ISliderThumbProps[] = this.getSliderThumbs(\n sliderId,\n sliderKeyString,\n selectedMin,\n selectedMinPrice,\n selectedMax,\n selectedMaxPrice,\n maxPrice\n );\n this.setState({ sliderId, minValue, maxValue, labels, sliderThumbs });\n }\n\n /**\n * Function to create the labels for slider.\n * @param sliderId - Slider element id for the DOM.\n * @param minPrice - Slider min value.\n * @param maxPrice - Slider max value.\n * @returns Array labels.\n */\n private readonly getLabels = (sliderId: string, minPrice: string, maxPrice: string): ISliderLabel[] => {\n return [\n {\n labelId: `${sliderId}_start`,\n labelString: `${minPrice}`,\n labelPositioning: 'start'\n },\n {\n labelId: `${sliderId}_end`,\n labelString: `${maxPrice}`,\n labelPositioning: 'end'\n }\n ];\n };\n\n /**\n * Function to create the slider thumbs for slider.\n * @param sliderId - Slider element id for the DOM.\n * @param sliderKey - Unique key for slider.\n * @param selectedMin - Slider selected min value.\n * @param selectedMinPrice - Slider selected min price.\n * @param selectedMax - Slider selected max value.\n * @param selectedMaxPrice - Slider selected max price..\n * @param maxPrice - Slider max price..\n * @returns Slider Thumb Props.\n */\n private readonly getSliderThumbs = (\n sliderId: string,\n sliderKey: string,\n selectedMin: string,\n selectedMinPrice: string,\n selectedMax: string | undefined,\n selectedMaxPrice: string,\n maxPrice: string\n ): ISliderThumbProps[] => {\n const sliderThumbDefaultValue = 0;\n return [\n {\n id: `${sliderId}${sliderKey}_slider_thumb_start`,\n value: (selectedMin && Number(selectedMin)) || sliderThumbDefaultValue,\n ariaLabel: `${this.props.minValueSliderThumbAriaLabel ?? ''} ${this.currencyCode}`,\n ariaValueText: `${selectedMinPrice}`\n },\n {\n id: `${sliderId}${sliderKey}_slider_thumb_end`,\n value: Number(selectedMax) || Number(maxPrice),\n ariaLabel: `${this.props.maxValueSliderThumbAriaLabel ?? ''} ${this.currencyCode}`,\n ariaValueText: `${selectedMaxPrice}`\n }\n ];\n };\n\n private _renderInputFields(): JSX.Element | undefined {\n const { isDisabled, parentProductRefinerHierarchy, refineItemCommonProps } = this.props;\n const { selectedMin, selectedMax, touchedMin, touchedMax, validationErrorMin, validationErrorMax } = this.state;\n\n const rangeAriaLabel = (refineItemCommonProps.rangeNameFormat || '{0}').replace('{0}', parentProductRefinerHierarchy.KeyName || '');\n const formAttrs = {\n 'aria-label': rangeAriaLabel,\n 'aria-disabled': isDisabled\n };\n\n // To enable price formatting of selected fields, this is the approach:\n // initial value: min=0 formatted as price, max=undefined\n // onFocus/onChange: convert to number (unformat) and mark as touched to indicate value is being edited\n // onBlur: validate and format entered value as price\n const minInputClassName = `ms-refine-submenu__input-range refine-submenu__input-range-min ${\n validationErrorMin ? 'refine-submenu__input-range--error' : ''\n }`;\n const maxInputClassName = `ms-refine-submenu__input-range refine-submenu__input-range-max ${\n validationErrorMax ? 'refine-submenu__input-range--error' : ''\n }`;\n const minLabelClassName = 'ms-refine-submenu__input-range-label refine-submenu__input-range-label-min';\n const maxLabelClassName = 'ms-refine-submenu__input-range-label refine-submenu__input-range-label-max';\n const formattedSelectedMin = this._getFormattedSelectedValue(selectedMin, touchedMin, validationErrorMin);\n const formattedSelectedMax = this._getFormattedSelectedValue(selectedMax, touchedMax, validationErrorMax);\n return (\n
\n \n \n {validationErrorMin && (\n \n {validationErrorMin}\n \n )}\n {validationErrorMax && validationErrorMin !== validationErrorMax && (\n \n {validationErrorMax}\n \n )}\n
\n );\n }\n\n private _renderSlider(): JSX.Element | undefined {\n const { isDisabled, sliderKey } = this.props;\n const ariaAttributes = {\n 'aria-disabled': isDisabled\n };\n\n return (\n \n );\n }\n\n private _changeMin(event: React.FocusEvent): void {\n this._changeValue(event, 'Min');\n }\n\n private _changeMax(event: React.FocusEvent): void {\n this._changeValue(event, 'Max');\n }\n\n private _changeValue(event: React.FocusEvent, inputType: InputType): void {\n const selectedKey = `selected${inputType}`;\n const touchedKey = `touched${inputType}`;\n this.setState({\n [selectedKey]: this._getInputWithoutFormatting(event.currentTarget.value),\n [touchedKey]: true\n });\n }\n\n private _finishChangeMin(event: React.FocusEvent): boolean {\n const selectedMinValue = this._getInputWithoutFormatting(event.currentTarget.value);\n this.setState({\n selectedMin: selectedMinValue,\n minTouched: false\n });\n const minInput = Number(selectedMinValue);\n const {\n onToggle,\n parentProductRefinerHierarchy,\n productRefinerValue,\n refineItemCommonProps,\n selectedRefinementCriterion\n } = this.props;\n const max = (selectedRefinementCriterion && selectedRefinementCriterion.RightValueBoundString) || undefined;\n\n const maxNum = max ? Number(max) : undefined;\n\n if (isNaN(minInput)) {\n this.setState({ validationErrorMin: refineItemCommonProps.validationErrorNaN });\n this._focus('Min');\n return false;\n }\n\n if (this._validateRange(minInput, maxNum)) {\n onToggle({\n parentProductRefinerHierarchy,\n productRefinerValue,\n isSelecting: true,\n rangeStart: minInput,\n rangeEnd: maxNum\n });\n return true;\n }\n this._focus('Min');\n\n return false;\n }\n\n private _finishChangeMax(event: React.FocusEvent): boolean {\n const selectedMaxValue = this._getInputWithoutFormatting(event.currentTarget.value);\n this.setState({\n selectedMax: selectedMaxValue,\n maxTouched: false\n });\n const maxInput = Number(selectedMaxValue);\n const {\n onToggle,\n parentProductRefinerHierarchy,\n productRefinerValue,\n refineItemCommonProps,\n selectedRefinementCriterion\n } = this.props;\n const min = (selectedRefinementCriterion && selectedRefinementCriterion.LeftValueBoundString) || '0';\n\n const minNum = Number(min);\n\n if (isNaN(maxInput)) {\n this.setState({ validationErrorMax: refineItemCommonProps.validationErrorNaN });\n this._focus('Max');\n return false;\n }\n\n if (this._validateRange(minNum, maxInput)) {\n if (productRefinerValue) {\n onToggle({\n parentProductRefinerHierarchy,\n productRefinerValue,\n isSelecting: true,\n rangeStart: minNum,\n rangeEnd: maxInput\n });\n } else {\n this._focus('Max');\n }\n return true;\n }\n\n return false;\n }\n\n private _focus(inputType: InputType): void {\n const ref = inputType === 'Max' ? this.maxInput : this.minInput;\n\n setTimeout(() => {\n if (ref && ref.current) {\n ref.current.focus();\n }\n }, 50);\n }\n\n private _getFormattedSelectedValue(\n selected: string | undefined,\n touched: boolean,\n validationError: string | undefined\n ): string | undefined {\n if (touched || validationError || selected === undefined) {\n return selected;\n }\n return this._formatPrice(selected);\n }\n\n private _validateRange(min: number, max: number | undefined): boolean {\n const { refineItemCommonProps } = this.props;\n if (max === undefined) {\n return true;\n }\n\n if (min > max) {\n this.setState({\n validationErrorMin: refineItemCommonProps.validationErrorRange,\n validationErrorMax: refineItemCommonProps.validationErrorRange\n });\n return false;\n }\n\n return true;\n }\n\n private _formatPrice(amount: string | undefined): string {\n if (this.props.productRefinerValue.RefinerRecordId === 0) {\n const result = this.props.context.cultureFormatter.formatCurrency(Number(amount), this.currencyCode);\n return result;\n }\n return amount || '';\n }\n\n private _getInputWithoutFormatting(input: string): string {\n // First try to cast raw input to a number\n const inputAsNum = Number(input);\n if (!isNaN(inputAsNum)) {\n return input;\n }\n\n // Otherwise try a reverse lookup and fall back to the raw input if all else fails\n const reverseLookupResult = this._formattedPriceReverseLookup.get(input);\n return reverseLookupResult || input;\n }\n\n // NOTE: Fix types once Shared Components build pipeline bug fixed\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private _onRangeUpdate(sliderChangeNotification: any): void {\n // Need to filter out mousemove events as these cause errors after the menu updates and slider re-renders\n if (sliderChangeNotification.eventType !== 'mousemove') {\n const { onToggle, parentProductRefinerHierarchy, productRefinerValue } = this.props;\n if (productRefinerValue && sliderChangeNotification) {\n onToggle({\n parentProductRefinerHierarchy,\n productRefinerValue,\n isSelecting: true,\n rangeStart: sliderChangeNotification.firstThumbValue,\n rangeEnd: sliderChangeNotification.secondThumbValue\n });\n\n this._focusOnSliderThumb(sliderChangeNotification);\n }\n }\n }\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private _onRangeUpdateEnd(sliderChangeNotification: any): void {\n const { onToggle, parentProductRefinerHierarchy, productRefinerValue } = this.props;\n if (productRefinerValue && sliderChangeNotification) {\n onToggle({\n parentProductRefinerHierarchy,\n productRefinerValue,\n isSelecting: true,\n rangeStart: sliderChangeNotification.firstThumbValue,\n rangeEnd: sliderChangeNotification.secondThumbValue\n });\n\n this._focusOnSliderThumb(sliderChangeNotification);\n }\n }\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private _focusOnSliderThumb(sliderChangeNotification: any): void {\n if (sliderChangeNotification.id) {\n const element = document.getElementById(`${sliderChangeNotification.id}range`);\n if (element) {\n setTimeout(() => {\n element.focus();\n }, 0);\n }\n }\n }\n\n private _handleRangeTooltipText(tooltip: number): string {\n return this._formatPrice(`${tooltip}`);\n }\n}\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { IProductRefinerHierarchy } from '@msdyn365-commerce/commerce-entities';\nimport { RatingComponent, SwatchComponent } from '@msdyn365-commerce/components';\nimport { IAny, ICoreContext, IGeneric } from '@msdyn365-commerce/core';\nimport {\n AttributeDataType,\n DisplayTemplate,\n ProductRefinerSource,\n ProductRefinerValue,\n RefinerType\n} from '@msdyn365-commerce/retail-proxy';\nimport { checkIfShouldDisplayAsSwatch, DimensionTypes, IDimensionsApp, StringExtensions } from '@msdyn365-commerce-modules/retail-actions';\nimport { format, getPayloadObject, getTelemetryAttributes, IPayLoad, ITelemetryContent } from '@msdyn365-commerce-modules/utilities';\nimport classnames from 'classnames';\nimport * as React from 'react';\n\nimport { IRefineItemCommonProps } from './refine-item.props.common';\nimport { IRefineItemToggleNotification } from './refine-item-toggle-notification';\nimport { getIntegerRangeName, isSingleSelectRangeTypeIntegerSelected } from './utilities';\n\n/**\n * RefineItem properties.\n */\nexport interface IRefineItemProps {\n parentProductRefinerHierarchy: IProductRefinerHierarchy;\n productRefinerValue: ProductRefinerValue;\n selectedRefinementCriterion: ProductRefinerValue | undefined;\n selectedRefinerValues?: ProductRefinerValue[];\n refineItemCommonProps: IRefineItemCommonProps;\n isDisabled: boolean;\n context: ICoreContext>;\n moduleId: string;\n moduleTypeName: string;\n index?: number;\n productCountAriaLabel?: string;\n singleProductCountAriaLabel?: string;\n refineItemAriaLabel?: string;\n refineItemsAriaLabel?: string;\n isMobileView?: boolean;\n\n /**\n * The telemetry content\n */\n telemetryContent?: ITelemetryContent;\n onToggle(notfication: Readonly): void;\n urlBuilder(refiner: IRefineItemToggleNotification): string;\n}\n\n/**\n * Refine item state.\n */\nexport interface IRefineItemState extends React.ComponentState {\n isChecked: boolean;\n renderingError?: object;\n}\n\n/**\n * Single-select and multi-select refine item component (controlled by RefineSubmenu).\n */\nexport default class RefineItem extends React.Component {\n private readonly anchorType: React.RefObject;\n\n private readonly payLoad: IPayLoad;\n\n public constructor(props: IRefineItemProps) {\n super(props);\n this._onClick = this._onClick.bind(this);\n this.state = {\n isChecked: !!this.props.selectedRefinementCriterion\n };\n this.anchorType = React.createRef();\n this.payLoad = getPayloadObject('click', this.props.telemetryContent!, '');\n }\n\n public shouldComponentUpdate(nextProps: IRefineItemProps, nextState: IRefineItemState): boolean {\n if (this.state === nextState && this.props === nextProps) {\n return false;\n }\n return true;\n }\n\n public render(): JSX.Element | undefined {\n const {\n isDisabled,\n refineItemCommonProps,\n parentProductRefinerHierarchy,\n productRefinerValue,\n selectedRefinementCriterion,\n productCountAriaLabel,\n singleProductCountAriaLabel,\n index,\n children,\n onToggle,\n context,\n telemetryContent,\n refineItemAriaLabel,\n refineItemsAriaLabel,\n ...attrs\n } = this.props;\n if (!productRefinerValue) {\n refineItemCommonProps.telemetry.error('[refine-item] Cannot render refineItem without productRefinerValue');\n return undefined;\n }\n if (!productRefinerValue.LeftValueBoundString) {\n refineItemCommonProps.telemetry.warning(\n `[refine-item] RefineItem without LeftValueBoundString: ${JSON.stringify(productRefinerValue)}`\n );\n }\n const isSingleSelect = parentProductRefinerHierarchy.RefinerTypeValue === RefinerType.SingleSelect;\n let itemTypeClassName = isSingleSelect ? 'single-select' : 'multi-select';\n itemTypeClassName = `ms-refine-submenu-item ${itemTypeClassName}`;\n const inputType = isSingleSelect ? 'radio' : 'checkbox';\n const isChecked = !!selectedRefinementCriterion;\n itemTypeClassName = isChecked ? `${itemTypeClassName}-checked` : itemTypeClassName;\n if (parentProductRefinerHierarchy.SourceValue === ProductRefinerSource.Rating) {\n return this._renderRating(\n productRefinerValue,\n parentProductRefinerHierarchy,\n isChecked,\n context,\n index,\n telemetryContent,\n productCountAriaLabel,\n singleProductCountAriaLabel\n );\n }\n this.payLoad.contentAction.etext = productRefinerValue.LeftValueBoundLocalizedString ?? productRefinerValue.LeftValueBoundString;\n const attribute = getTelemetryAttributes(telemetryContent!, this.payLoad);\n // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing -- Replace with actual value for empty string.\n const productText = productRefinerValue.LeftValueBoundLocalizedString || productRefinerValue.LeftValueBoundString || '';\n // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing -- Replace with actual value for empty string.\n const productCount = productRefinerValue.Count || 0;\n let refineMenuItemAriaLabel;\n if (productCount === 1) {\n refineMenuItemAriaLabel = refineItemAriaLabel\n ? format(refineItemAriaLabel, parentProductRefinerHierarchy.KeyName, productText)\n : '';\n } else {\n refineMenuItemAriaLabel = refineItemsAriaLabel\n ? format(refineItemsAriaLabel, parentProductRefinerHierarchy.KeyName, productText, productCount)\n : '';\n }\n\n const dimensionType = (this.props.parentProductRefinerHierarchy.KeyName?.toLocaleLowerCase() ?? '') as DimensionTypes;\n const shouldDisplayAsSwatch = this._getShouldDisplayAsSwatch(dimensionType);\n\n let className = 'ms-refine-submenu-item';\n if (shouldDisplayAsSwatch) {\n className = classnames(className, `ms-refine-submenu-item__dimension__${dimensionType}`);\n }\n\n // If the swatch has no color or image specified, it should be displayed as text.\n // We don't use swatch logic to display the number of the results found together with the text.\n const hasColor = !StringExtensions.isNullOrWhitespace(productRefinerValue.SwatchColorHexCode);\n const hasImage = !StringExtensions.isNullOrWhitespace(productRefinerValue.SwatchImageUrl);\n const hasContentSwatch = hasColor || hasImage;\n if (\n parentProductRefinerHierarchy.DataTypeValue === AttributeDataType.Integer &&\n parentProductRefinerHierarchy.DisplayTemplateValue === DisplayTemplate.Range\n ) {\n const rangeValue = getIntegerRangeName(productRefinerValue);\n return (\n
  • \n \n \n \n
  • \n );\n } else {\n return (\n
  • \n \n {hasContentSwatch && shouldDisplayAsSwatch && this._renderSwatch(dimensionType)}\n \n \n
  • \n );\n }\n }\n\n private _getShouldDisplayAsSwatch(dimensionType: DimensionTypes) {\n const shouldDisplayAsSwatch = checkIfShouldDisplayAsSwatch(dimensionType, this.props.context as ICoreContext);\n return shouldDisplayAsSwatch;\n }\n\n private _renderSwatch(dimensionType: DimensionTypes): JSX.Element | null {\n const productRefinerValue = this.props.productRefinerValue;\n\n // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing -- Replace with actual value for empty string.\n const text = productRefinerValue.LeftValueBoundLocalizedString || productRefinerValue.LeftValueBoundString || '';\n const swatchItems = [\n {\n itemId: `${productRefinerValue.RefinerRecordId ?? ''}-${dimensionType}-${text}`,\n value: text,\n dimensionType,\n colorHexCode: productRefinerValue.SwatchColorHexCode,\n imageUrl: productRefinerValue.SwatchImageUrl\n }\n ];\n\n return (\n \n );\n }\n\n private _getRefinerUrl(): string {\n const { urlBuilder, parentProductRefinerHierarchy, productRefinerValue, selectedRefinementCriterion } = this.props;\n\n if (productRefinerValue) {\n return urlBuilder({\n parentProductRefinerHierarchy,\n productRefinerValue,\n isSelecting: !selectedRefinementCriterion\n });\n }\n\n return '';\n }\n\n private readonly _onClick = (e: React.MouseEvent): void => {\n e.preventDefault();\n\n const { parentProductRefinerHierarchy, productRefinerValue, selectedRefinementCriterion } = this.props;\n if (productRefinerValue) {\n this.props.onToggle({\n parentProductRefinerHierarchy,\n productRefinerValue,\n isSelecting: !selectedRefinementCriterion\n });\n\n setTimeout(() => {\n this.anchorType.current && this.anchorType.current.focus();\n }, 0);\n }\n };\n\n private _renderRating(\n productRefinerValue: ProductRefinerValue,\n parentProductRefinerHierarchy: IProductRefinerHierarchy,\n isChecked: boolean,\n context: ICoreContext,\n index?: number,\n telemetryContent?: ITelemetryContent,\n ratingUserCountAriaLabel?: string,\n ratingSingleUserCountAriaLabel?: string\n ): JSX.Element | undefined {\n if (productRefinerValue.LeftValueBoundString) {\n this.payLoad.contentAction.etext = productRefinerValue.LeftValueBoundLocalizedString;\n const attribute = getTelemetryAttributes(telemetryContent!, this.payLoad);\n const refinerRating = Number.parseInt(productRefinerValue.LeftValueBoundString, 10);\n const ratingRefiner = this.props.selectedRefinerValues?.find(\n value => value.DataTypeValue === productRefinerValue.DataTypeValue\n );\n // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing -- Replace with actual value for empty string.\n const selectedRating = Number.parseInt(ratingRefiner?.LeftValueBoundString || '0', 10);\n const defaultChkProductCount = 1;\n let ratingComponentClass: string = 'ms-rating-component';\n if (refinerRating > selectedRating) {\n ratingComponentClass = `${ratingComponentClass}__up`;\n } else if (refinerRating < selectedRating) {\n ratingComponentClass = `${ratingComponentClass}__down`;\n } else {\n ratingComponentClass = `${ratingComponentClass}__current`;\n }\n const productCountAriaLabelValue =\n productRefinerValue.Count !== undefined && productRefinerValue.Count === defaultChkProductCount\n ? ratingSingleUserCountAriaLabel && format(ratingSingleUserCountAriaLabel, productRefinerValue.Count)\n : ratingUserCountAriaLabel && format(ratingUserCountAriaLabel, productRefinerValue.Count);\n return (\n \n \n \n \n {productRefinerValue.Count !== undefined && `(${productRefinerValue.Count})`}\n \n \n \n );\n }\n return undefined;\n }\n}\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { observer } from 'mobx-react';\nimport * as React from 'react';\n\nimport { isUndefined } from 'lodash';\nimport { ProductRefinerValue } from '@msdyn365-commerce/retail-proxy';\nimport { Button } from '@msdyn365-commerce-modules/utilities';\nimport { IRefineItemState } from './refine-item';\nimport { isCustomRangeTypeIntegerSelected } from './utilities';\nimport { IProductRefinerHierarchy } from '@msdyn365-commerce/commerce-entities';\nimport { IRefineItemCommonProps } from './refine-item.props.common';\nimport { IRefineItemToggleNotification } from './refine-item-toggle-notification';\n\nexport type RangeRefineItemInputType = 'slider' | 'input';\n\n/**\n * Range refine item properties.\n */\nexport interface IRangeRefineItemInputProps {\n parentProductRefinerHierarchy: IProductRefinerHierarchy;\n selectedRefinementCriterion: ProductRefinerValue | undefined;\n refineItemCommonProps: IRefineItemCommonProps;\n isDisabled: boolean;\n rangeType: RangeRefineItemInputType;\n\n /**\n * The telemetry content\n */\n onToggle(notfication: Readonly): void;\n}\n\n/**\n * Range refine item state.\n */\nexport interface IRangeRefineItemInputState extends IRefineItemState {\n validationErrorMin: string | undefined;\n validationErrorMax: string | undefined;\n selectedMin: string | undefined;\n selectedMax: string | undefined;\n invalidData: boolean | undefined;\n}\n\n/**\n * RangeRefineItem component (controlled by RefineSubmenu).\n */\n@observer\nexport default class RangeRefineItemInput extends React.Component {\n private readonly _formattedPriceReverseLookup: Map = new Map();\n\n private readonly minInput: React.RefObject;\n\n private readonly maxInput: React.RefObject;\n\n public constructor(props: IRangeRefineItemInputProps) {\n super(props);\n this._changeMinInputRange = this._changeMinInputRange.bind(this);\n this._changeMaxInputRange = this._changeMaxInputRange.bind(this);\n this._applyCustom = this._applyCustom.bind(this);\n\n this.minInput = React.createRef();\n this.maxInput = React.createRef();\n let initialMin = '';\n let initialMax = '';\n const { selectedRefinementCriterion, parentProductRefinerHierarchy } = this.props;\n if (selectedRefinementCriterion) {\n initialMin = isCustomRangeTypeIntegerSelected(selectedRefinementCriterion, parentProductRefinerHierarchy)\n ? ''\n : selectedRefinementCriterion?.LeftValueBoundString || '';\n initialMax = isCustomRangeTypeIntegerSelected(selectedRefinementCriterion, parentProductRefinerHierarchy)\n ? ''\n : selectedRefinementCriterion?.RightValueBoundString || '';\n }\n\n this.state = {\n validationErrorMin: undefined,\n validationErrorMax: undefined,\n selectedMin: initialMin,\n selectedMax: initialMax,\n invalidData: !(initialMin && initialMax),\n isChecked: false\n };\n }\n\n public shouldComponentUpdate(nextProps: IRangeRefineItemInputProps, nextState: IRangeRefineItemInputState): boolean {\n if (this.state === nextState && this.props === nextProps) {\n return false;\n }\n nextState.invalidData = !(nextState.selectedMin && nextState.selectedMax);\n return true;\n }\n\n public componentDidUpdate(previousProps: IRangeRefineItemInputProps): void {\n if (previousProps !== this.props) {\n this.updateInputRangerProps();\n }\n }\n\n public render(): JSX.Element | undefined {\n if (this.props.rangeType === 'input') {\n return this._renderInputFields();\n }\n return undefined;\n }\n\n // /**\n // * Function to update slider props.\n // */\n private updateInputRangerProps(): void {\n const selectedMin = !isUndefined(this.props.selectedRefinementCriterion?.RowNumber)\n ? ''\n : this.props.selectedRefinementCriterion?.LeftValueBoundString;\n const selectedMax = !isUndefined(this.props.selectedRefinementCriterion?.RowNumber)\n ? ''\n : this.props.selectedRefinementCriterion?.RightValueBoundString;\n this.setState({ selectedMin, selectedMax });\n }\n\n private _renderInputFields(): JSX.Element | undefined {\n const { isDisabled, parentProductRefinerHierarchy, refineItemCommonProps } = this.props;\n const { validationErrorMin, validationErrorMax } = this.state;\n\n const rangeAriaLabel = (refineItemCommonProps.rangeNameFormat || '{0}').replace('{0}', parentProductRefinerHierarchy.KeyName || '');\n const formAttrs = {\n 'aria-label': rangeAriaLabel,\n 'aria-disabled': isDisabled\n };\n\n const minInputClassName = `ms-refine-submenu__input-range refine-submenu__input-range-min ${\n validationErrorMin ? 'refine-submenu__input-range--error' : ''\n }`;\n const maxInputClassName = `ms-refine-submenu__input-range refine-submenu__input-range-max ${\n validationErrorMax ? 'refine-submenu__input-range--error' : ''\n }`;\n return (\n
  • \n
    \n
    \n \n {' - '}\n \n {validationErrorMin && (\n \n {validationErrorMin}\n \n )}\n {validationErrorMax && validationErrorMin !== validationErrorMax && (\n \n {validationErrorMax}\n \n )}\n
    \n
    \n \n
    \n
    \n
  • \n );\n }\n\n private _applyCustom(event: React.MouseEvent): void {\n const selectedMinValue = this._getInputWithoutFormatting(this.state.selectedMin || '');\n this.setState({\n selectedMin: selectedMinValue,\n minTouched: false\n });\n const minInput = Number(selectedMinValue);\n const { onToggle, parentProductRefinerHierarchy } = this.props;\n const max = this.state.selectedMax;\n\n const maxNum = max ? Number(max) : undefined;\n const productRefinerValue: ProductRefinerValue = {\n RefinerRecordId: parentProductRefinerHierarchy.Values[0].RefinerRecordId,\n LeftValueBoundString: this.state.selectedMin,\n RightValueBoundString: this.state.selectedMax,\n DataTypeValue: parentProductRefinerHierarchy.DataTypeValue,\n RefinerSourceValue: parentProductRefinerHierarchy.Values[0].RefinerSourceValue\n };\n\n if (this._validateRange(minInput, maxNum)) {\n onToggle({\n parentProductRefinerHierarchy,\n productRefinerValue,\n isSelecting: true\n });\n }\n }\n\n private _changeMinInputRange(event: React.ChangeEvent): void {\n this.setState({\n selectedMin: event.target.value.trim()\n });\n }\n\n private _changeMaxInputRange(event: React.ChangeEvent): void {\n this.setState({\n selectedMax: event.target.value.trim()\n });\n }\n\n private _validateRange(min: number, max: number | undefined): boolean {\n const { refineItemCommonProps } = this.props;\n if (max === undefined) {\n return true;\n }\n\n if (min > max) {\n this.setState({\n validationErrorMin: refineItemCommonProps.validationErrorRange,\n validationErrorMax: refineItemCommonProps.validationErrorRange\n });\n return false;\n }\n\n return true;\n }\n\n private _getInputWithoutFormatting(input: string): string {\n // First try to cast raw input to a number\n const inputAsNum = Number(input);\n if (!isNaN(inputAsNum)) {\n return input;\n }\n\n // Otherwise try a reverse lookup and fall back to the raw input if all else fails\n const reverseLookupResult = this._formattedPriceReverseLookup.get(input);\n return reverseLookupResult || input;\n }\n}\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { IProductRefinerHierarchy } from '@msdyn365-commerce/commerce-entities';\nimport { IAny, ICoreContext, IGeneric } from '@msdyn365-commerce/core';\nimport {\n AttributeDataType,\n DisplayTemplate,\n ProductRefinerSource,\n ProductRefinerValue,\n RefinerType\n} from '@msdyn365-commerce/retail-proxy';\nimport { Button, Collapse, ITelemetryContent } from '@msdyn365-commerce-modules/utilities';\nimport classnames from 'classnames';\nimport * as React from 'react';\n\nimport RangeRefineItem, { RangeRefineItemType } from './range-refine-item';\nimport RefineItem from './refine-item';\nimport { IRefineItemCommonProps } from './refine-item.props.common';\nimport { IRefineItemToggleNotification } from './refine-item-toggle-notification';\nimport { findMatchingRefinementCriterion, isRangeTypeForInteger } from './utilities';\nimport RangeRefineItemInput from './range-refine-item-input';\n\n/**\n * Properties associated with the RefineSubmenu component.\n */\nexport interface IRefineSubmenuProps {\n tempRangeTypeTODO: RangeRefineItemType;\n minValueSliderThumbAriaLabel?: string;\n maxValueSliderThumbAriaLabel?: string;\n productRefinerHierarchy: IProductRefinerHierarchy;\n selectedRefinerValues: ProductRefinerValue[];\n refineItemCommonProps: IRefineItemCommonProps;\n isDisabled: boolean;\n isExpandedOnInitialLoad: boolean;\n context: ICoreContext>;\n moduleId: string;\n moduleTypeName: string;\n productCountAriaLabel?: string;\n singleProductCountAriaLabel?: string;\n refineItemAriaLabel?: string;\n refineItemsAriaLabel?: string;\n isMobile?: boolean;\n\n /**\n * The telemetry content\n */\n telemetryContent?: ITelemetryContent;\n onUpdateRefiners(notfication: Readonly): void;\n urlBuilder(refiner: IRefineItemToggleNotification): string;\n}\n\n/**\n * Refine submenu state.\n */\nexport interface IRefineSubmenuState extends React.ComponentState {\n expanded: boolean;\n}\n\n/**\n *\n * The RefineSubmenu component renders the submenu category and child items.\n * This computed observes the stateful category hierarchy object.\n * @extends {React.PureComponent}\n */\nclass RefineSubmenu extends React.Component {\n constructor(props: IRefineSubmenuProps) {\n super(props);\n\n this._onToggleItem = this._onToggleItem.bind(this);\n this._onToggleSubmenu = this._onToggleSubmenu.bind(this);\n\n const isExpanded = this.props.isExpandedOnInitialLoad;\n\n this.state = {\n expanded: isExpanded\n };\n }\n\n public shouldComponentUpdate(nextProps: IRefineSubmenuProps, nextState: IRefineSubmenuState): boolean {\n if (this.state === nextState && this.props === nextProps) {\n return false;\n }\n return true;\n }\n\n public render(): JSX.Element | null {\n const { productRefinerHierarchy, refineItemCommonProps } = this.props;\n\n if (!productRefinerHierarchy) {\n refineItemCommonProps.telemetry.error('Cannot render submenu without refiner hierarchy data');\n }\n\n if (productRefinerHierarchy.SourceValue === ProductRefinerSource.Rating && this.props.context.app.config.hideRating) {\n return null;\n }\n\n const className = classnames(\n 'ms-refine-submenu',\n 'list-group',\n productRefinerHierarchy.KeyName // Deprecated because of the localization issues. Leaving for backward compatibility reasons.\n );\n\n return (\n
    \n \n {productRefinerHierarchy.KeyName}\n \n \n {this._renderChildItems(productRefinerHierarchy)}\n \n
    \n );\n }\n\n private _renderChildItems(productRefinerHierarchy: IProductRefinerHierarchy): JSX.Element | null {\n if (\n productRefinerHierarchy.DataTypeValue === AttributeDataType.Integer &&\n productRefinerHierarchy.DisplayTemplateValue === DisplayTemplate.Range\n ) {\n return this._renderSingleMultiSelect(productRefinerHierarchy);\n }\n // Check if is of integer range type\n if (isRangeTypeForInteger(productRefinerHierarchy.DataTypeValue)) {\n return this._renderRange(productRefinerHierarchy);\n }\n return this._renderSingleMultiSelect(productRefinerHierarchy);\n }\n\n private _renderSingleMultiSelect(productRefinerHierarchy: IProductRefinerHierarchy): JSX.Element | null {\n const {\n isDisabled,\n refineItemCommonProps,\n selectedRefinerValues,\n context,\n productCountAriaLabel,\n singleProductCountAriaLabel,\n refineItemAriaLabel,\n refineItemsAriaLabel,\n isMobile\n } = this.props;\n const isSingleSelect =\n productRefinerHierarchy.RefinerTypeValue === RefinerType.SingleSelect &&\n productRefinerHierarchy.SourceValue === ProductRefinerSource.Rating;\n const role = isSingleSelect ? { role: 'listbox' } : undefined;\n let selectedRefinementCriterion: ProductRefinerValue | undefined = {};\n const refinerValuesList = productRefinerHierarchy.Values || [];\n const listItems = refinerValuesList.map((child: ProductRefinerValue, index: number) => {\n if (!child) {\n refineItemCommonProps.telemetry.error(\n `[refine-submenu] Could not render refine item for refiner ${productRefinerHierarchy.RecordId} (${productRefinerHierarchy.KeyName})`\n );\n return null;\n }\n\n selectedRefinementCriterion = findMatchingRefinementCriterion(child, selectedRefinerValues);\n return (\n \n refinerValuesList.find(value => value.RefinerRecordId === selectedValue.RefinerRecordId)\n )}\n refineItemCommonProps={refineItemCommonProps}\n onToggle={this._onToggleItem}\n urlBuilder={this.props.urlBuilder}\n isDisabled={isDisabled}\n key={index}\n index={index}\n context={context}\n moduleId={this.props.moduleId}\n moduleTypeName={this.props.moduleTypeName}\n telemetryContent={this.props.telemetryContent}\n productCountAriaLabel={productCountAriaLabel}\n refineItemAriaLabel={refineItemAriaLabel}\n refineItemsAriaLabel={refineItemsAriaLabel}\n singleProductCountAriaLabel={singleProductCountAriaLabel}\n isMobileView={isMobile}\n />\n );\n });\n return (\n \n {listItems}\n {productRefinerHierarchy.DataTypeValue === AttributeDataType.Integer &&\n productRefinerHierarchy.DisplayTemplateValue === DisplayTemplate.Range && (\n \n )}\n \n );\n }\n\n private _getRangeType(productRefinerHierarchy: IProductRefinerHierarchy): 'input' | 'slider' {\n if (\n productRefinerHierarchy.DisplayTemplateValue === DisplayTemplate.Range ||\n productRefinerHierarchy.DisplayTemplateValue === DisplayTemplate.Slider ||\n productRefinerHierarchy.DisplayTemplateValue === DisplayTemplate.SliderWithBars\n ) {\n return 'slider';\n }\n return 'input';\n }\n\n private _renderRange(productRefinerHierarchy: IProductRefinerHierarchy): JSX.Element | null {\n const {\n isDisabled,\n refineItemCommonProps,\n selectedRefinerValues,\n context,\n minValueSliderThumbAriaLabel,\n maxValueSliderThumbAriaLabel\n } = this.props;\n const submenuClassNamePrefix = 'ms-refine-submenu__item list-group-item refine-submenu__item';\n const refinerValuesList = productRefinerHierarchy.Values || [];\n const listItems = refinerValuesList.map((child: ProductRefinerValue, index: number) => {\n if (!child) {\n refineItemCommonProps.telemetry.error(\n `Could not render refine item for refiner ${productRefinerHierarchy.RecordId} (${productRefinerHierarchy.KeyName})`\n );\n return null;\n }\n\n const selectedRefinementCriterion = findMatchingRefinementCriterion(child, selectedRefinerValues);\n\n const rangeType = this._getRangeType(productRefinerHierarchy);\n const key = selectedRefinementCriterion\n ? `${selectedRefinementCriterion.LeftValueBoundString}-${selectedRefinementCriterion.RightValueBoundString}`\n : `not-selected-${index}`;\n return (\n
  • \n \n
  • \n );\n });\n return
      {listItems}
    ;\n }\n\n private _onToggleItem(itemToggleNotification: IRefineItemToggleNotification): void {\n this.props.onUpdateRefiners(itemToggleNotification);\n }\n\n private _onToggleSubmenu(): void {\n this.setState(prevState => ({\n expanded: !prevState.expanded\n }));\n }\n}\n\nexport default RefineSubmenu;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport * as React from 'react';\n\ninterface ISeparator {\n separator: string;\n}\n\nexport const Separator: React.FC = ({ separator }) => (\n \n {` `}\n {separator}\n {` `}\n \n);\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport * as React from 'react';\n\ninterface ITitle {\n className: string;\n text: string;\n}\n\nexport const Title: React.FC = ({ text, className }) => (\n \n {` `}\n {text}\n {` `}\n \n);\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport {\n CategoryHierarchy as CategoryHierarchyData,\n IProductRefinerHierarchy,\n IProductsDimensionsAvailabilities\n} from '@msdyn365-commerce/commerce-entities';\nimport MsDyn365, { getCatalogId, ICoreContext } from '@msdyn365-commerce/core';\nimport {\n ChannelInventoryConfiguration,\n format,\n ProductPrice,\n ProductRefinerValue,\n SortColumn,\n StoreOperationsDataActions,\n TextValueTranslation\n} from '@msdyn365-commerce/retail-proxy';\nimport {\n ArrayExtensions,\n DimensionAvailabilitiesForProductSearchResultInput,\n DimensionTypes,\n DimensionSwatchDisplayTypes,\n getDimensionAvailabilitiesForProductSearchResultAction,\n getPriceForProductSearchResult,\n IDimensionsApp,\n PriceForProductSearchResultInput,\n ObjectExtensions\n} from '@msdyn365-commerce-modules/retail-actions';\nimport {\n getTelemetryObject,\n ILabeledDropdownOnChangeNotification,\n ILabeledDropdownOption,\n IModuleProps,\n INodeProps,\n isMobile,\n ITelemetryContent,\n LabeledDropdown,\n UncontrolledPagination,\n VariantType\n} from '@msdyn365-commerce-modules/utilities';\nimport classnames from 'classnames';\nimport { action, computed, observable, reaction, transaction } from 'mobx';\nimport { observer } from 'mobx-react';\nimport * as React from 'react';\n\nimport {\n buildListPageUrl,\n getCollectionProducts,\n getCollectionRefinersAction,\n getCurrentUrl,\n GetFullProductsByCollectionInput,\n IFullProductsSearchResultsWithCount,\n parseQueryParam,\n ProductListInventoryFilteringOptions,\n RefinersByCollectionInput,\n sortOptions\n} from './actions';\nimport { hydrateRefinersFromUrl } from './actions/url-utils';\nimport {\n ErrorMessage,\n FeatureSearchResultItem,\n getUpdatedRefinementCriteria,\n IChoiceSummaryClickNotification,\n IRefineItemCommonProps,\n IRefineItemToggleNotification,\n ISearchResultModalViewProps,\n isMatchingRefinementCriterion,\n Link,\n ModalToggle,\n ProductSearchResultItems,\n SearchResultModal,\n Separator,\n Title\n} from './components';\nimport ChoiceSummary from './components/choice-summary';\nimport RefineSubmenu from './components/refine-submenu';\nimport { ListPageState } from './list-page-state';\nimport { ISearchResultContainerData } from './search-result-container.data';\nimport { expandRefinersCount, ISearchResultContainerProps } from './search-result-container.props.autogenerated';\n\nexport interface ISearchResultContainerViewProps extends ISearchResultContainerProps {\n products?: React.ReactNode;\n className?: string;\n SearchResultContainer: IModuleProps;\n TitleViewProps: ITitleViewProps;\n categoryHierarchy: ICategoryHierarchyViewProps;\n pagination?: React.ReactNode;\n ProductsContainer: INodeProps;\n ProductSectionContainer: INodeProps;\n refineMenu: IRefineMenuViewProps;\n sortByOptions: ISortByViewProps;\n choiceSummary?: React.ReactNode;\n modalToggle: React.ReactNode;\n searchResultModal: ISearchResultModalViewProps;\n isMobile: boolean;\n CategoryNavContainer: INodeProps;\n RefineAndProductSectionContainer: INodeProps;\n errorMessage: React.ReactNode;\n FeatureSearchContainer: INodeProps;\n similarLookProduct?: React.ReactNode;\n productPrices?: ProductPrice[];\n productsDimensionAvailabilities?: IProductsDimensionsAvailabilities[][];\n}\n\nexport interface ITitleViewProps {\n TitleContainer: INodeProps;\n title: ISearchResultTitle;\n}\n\nexport interface IRefineMenuViewProps {\n RefineMenuContainer: INodeProps;\n RefinerSectionContainer: INodeProps;\n refiners?: React.ReactNode[];\n}\n\nexport interface ICategoryHierarchyViewProps {\n categoryHierarchyList?: React.ReactNode[];\n categoryHierarchySeparator?: React.ReactNode;\n CategoryHierarchyContainer: INodeProps;\n}\n\nexport interface ISortByViewProps {\n SortingContainer: INodeProps;\n sortByDropDown?: React.ReactNode;\n}\n\nexport type GridSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';\n\n/**\n * Title component for search result container.\n */\nexport interface ISearchResultTitle {\n titlePrefix?: React.ReactNode;\n titleText?: React.ReactNode;\n titleCount?: React.ReactNode;\n}\n\nexport interface ISearchResultContainerState {\n sortingState: ISortByCollectionState;\n modalIsOpen: boolean;\n refiners: IProductRefinerHierarchy[];\n productsDimensionAvailabilities?: IProductsDimensionsAvailabilities[][];\n channelInventoryConfiguration?: ChannelInventoryConfiguration;\n}\n\ninterface ISortByCollectionState {\n selectedSortByOption: ILabeledDropdownOption;\n pending: boolean;\n}\n\n/**\n *\n * SearchResultContainer component.\n * @extends {React.PureComponent>}\n */\n@observer\nexport default class SearchResultContainer extends React.PureComponent<\n ISearchResultContainerProps,\n ISearchResultContainerState\n> {\n @computed get isMobile(): boolean {\n return this._viewport === 'xs' || this._viewport === 'sm';\n }\n\n private readonly sortByDropdownOptions: ILabeledDropdownOption[] = [\n { key: sortOptions.sortByOptionRelevanceDesc, value: this.props.resources.sortByOptionRelevanceDesc },\n { key: sortOptions.sortByOptionNameAsc, value: this.props.resources.sortByOptionNameAsc },\n { key: sortOptions.sortByOptionNameDesc, value: this.props.resources.sortByOptionNameDesc },\n { key: sortOptions.sortByOptionPriceAsc, value: this.props.resources.sortByOptionPriceAsc },\n { key: sortOptions.sortByOptionPriceDesc, value: this.props.resources.sortByOptionPriceDesc },\n { key: sortOptions.sortByOptionRatingDesc, value: this.props.resources.sortByOptionRatingDesc },\n { key: sortOptions.sortByOptionBestSelling, value: this.props.resources.sortByOptionBestSelling },\n { key: sortOptions.sortByOptionNewScore, value: this.props.resources.sortByOptionNewScore },\n { key: sortOptions.sortByOptionTrendingScore, value: this.props.resources.sortByOptionTrendingScore }\n ];\n\n private readonly _refineItemCommonProps: IRefineItemCommonProps;\n\n private readonly _pageType: string | undefined = this.props.context.request.urlTokens.pageType;\n\n @observable\n private _viewport: GridSize = 'lg';\n\n private readonly _modalToggleRef: React.RefObject;\n\n private readonly _sortAndFilterContainerRef: React.RefObject;\n\n private expandrefinerCount: number | undefined = 0;\n\n private readonly telemetryContent: ITelemetryContent;\n\n private readonly productPrices: ProductPrice[];\n\n private readonly defaultPageNumber = 0;\n\n private readonly catalogId = getCatalogId(this.props.context.request);\n\n private isListPageStateUpdated: boolean = false;\n\n private _isMounted: boolean = false;\n\n public static getFriendlyName(locale: string, nameTranslations?: TextValueTranslation[]): string | undefined {\n let nameTranslation: TextValueTranslation | undefined;\n if (locale && nameTranslations && ArrayExtensions.hasElements(nameTranslations)) {\n nameTranslation = nameTranslations.find(item => item.Language!.toLowerCase() === locale.toLowerCase());\n }\n\n return nameTranslation?.Text;\n }\n\n public constructor(props: ISearchResultContainerProps, state: ISearchResultContainerState) {\n super(props);\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- Check required.\n this._viewport = props.context.request?.device?.Type === 'Mobile' ? 'xs' : 'lg';\n this._modalToggleRef = React.createRef();\n this._sortAndFilterContainerRef = React.createRef();\n this._toggleModal = this._toggleModal.bind(this);\n this._updateViewport = this._updateViewport.bind(this);\n this.productPrices = [];\n this.state = {\n sortingState: {\n pending: false,\n selectedSortByOption: this.sortByDropdownOptions[0]\n },\n modalIsOpen: false,\n refiners: [],\n channelInventoryConfiguration: undefined\n };\n const { placeholderTextMax, minLabel, maxLabel, rangeNameFormat } = this.props.resources;\n\n const locale = this.props.context.request.locale;\n const telemetry = this.props.telemetry;\n const validationErrorNaN = this.props.resources.validationErrorNotNumber;\n const validationErrorRange = this.props.resources.validationErrorNotRange;\n this._refineItemCommonProps = {\n telemetry,\n locale,\n placeholderTextMax,\n minLabel,\n maxLabel,\n rangeNameFormat,\n validationErrorNaN,\n validationErrorRange\n };\n this.telemetryContent = getTelemetryObject(\n this.props.context.request.telemetryPageName!,\n this.props.friendlyName,\n this.props.telemetry\n );\n this._updateViewport();\n }\n public async componentDidMount(): Promise {\n this._isMounted = true;\n if (MsDyn365.isBrowser && window.addEventListener) {\n window.addEventListener('resize', this._updateViewport);\n this._updateViewport();\n }\n\n const listPageState = await this.props.data.listPageState;\n const products = await this.props.data.products;\n const channelInventoryConfiguration = await StoreOperationsDataActions.getInventoryConfigurationAsync({\n callerContext: this.props.context.actionContext\n });\n if (this._isMounted) {\n this.setState({ channelInventoryConfiguration });\n }\n\n this._updateListPageState(listPageState, products);\n\n // Initialize reaction based on listPageState properties\n reaction(\n () => {\n return [\n listPageState.activeFilters?.length,\n listPageState.currentPageNumber,\n ArrayExtensions.hasElements(listPageState.sortingCritera?.Columns)\n ];\n },\n async () => {\n const newListPageState = await this.props.data.listPageState;\n const input = new GetFullProductsByCollectionInput(\n newListPageState.pageType,\n this.props.context.request.apiSettings,\n {\n Paging: {\n Top: this.props.config.itemsPerPage,\n Skip: Math.max(newListPageState.pageSize * (newListPageState.currentPageNumber ?? 0), 0)\n },\n count: true,\n Sorting: newListPageState.sortingCritera ?? {}\n },\n newListPageState.activeFilters ?? [],\n // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing -- RecordId is string. Check required.\n +(this.props.context.request.urlTokens.recordId || 0),\n\n // eslint-disable-next-line max-len -- existing code\n this.props.context.request.query?.q\n ? this.props.context.request.query.q\n : JSON.stringify({\n ProductId: this.props.context.request.query?.productId,\n Recommendation: this.props.context.request.query?.recommendation\n }),\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- Required check.\n !!this.props?.config?.includeAttributes,\n this.props.config.updateRefinerPanel,\n this.props.context.request.locale,\n this.catalogId,\n channelInventoryConfiguration\n );\n\n const productResults = await getCollectionProducts(input, this.props.context.actionContext);\n newListPageState.totalProductCount = productResults.count;\n newListPageState.activeProducts = productResults.products;\n\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- check is required.\n if (\n this.props.config.enableAffiliationBasedPricing &&\n this.props.context.actionContext.requestContext?.user?.isAuthenticated\n ) {\n // eslint-disable-next-line @typescript-eslint/no-floating-promises -- Call api to retrieve the availabilities data without blocking the UI.\n this._getActivePrice();\n }\n\n await this._updateVariantAvailability();\n\n if (this.props.config.updateRefinerPanel) {\n const refinerInput = new RefinersByCollectionInput(\n newListPageState.pageType,\n this.props.context.request.apiSettings,\n {\n Paging: {\n Top: this.props.config.itemsPerPage,\n Skip: Math.max(\n newListPageState.pageSize * (newListPageState.currentPageNumber ?? this.defaultPageNumber),\n this.defaultPageNumber\n )\n },\n count: true,\n Sorting: newListPageState.sortingCritera ?? {}\n },\n newListPageState.activeFilters ?? [],\n // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing -- RecordId is string. Check required.\n +(this.props.context.request.urlTokens.recordId || 0),\n this.props.context.request.query?.q\n ? this.props.context.request.query.q\n : this.props.context.request.query?.productId,\n false,\n this.props.config.updateRefinerPanel,\n undefined,\n this.catalogId,\n channelInventoryConfiguration\n );\n\n const refiners = await getCollectionRefinersAction(refinerInput, this.props.context.actionContext);\n this.setState({ refiners });\n }\n }\n );\n\n if (\n this.props.config.enableAffiliationBasedPricing &&\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- Condition required.\n this.props.context.actionContext.requestContext?.user?.isAuthenticated\n ) {\n // eslint-disable-next-line @typescript-eslint/no-floating-promises -- Call api to retrieve the availabilities data without blocking the UI.\n this._getActivePrice();\n }\n await this._updateVariantAvailability();\n }\n\n public componentWillUnmount(): void {\n this._isMounted = false;\n if (MsDyn365.isBrowser && window.removeEventListener) {\n window.removeEventListener('resize', this._updateViewport);\n }\n }\n\n public render(): JSX.Element {\n const {\n config: { imageSettings, className },\n resources,\n data: { listPageState, products: productCollection, featureProduct }\n } = this.props;\n\n if (!this.isListPageStateUpdated && listPageState.result && productCollection.result) {\n this._updateListPageState(listPageState.result, productCollection.result);\n this.isListPageStateUpdated = true;\n }\n\n const products = (this.props.data.listPageState.result && this.props.data.listPageState.result.activeProducts) || [];\n const searchProduct = listPageState.result?.featureProduct ?? featureProduct.result ?? null;\n let errorText = '';\n if (!ArrayExtensions.hasElements(products)) {\n errorText = this._pageType === 'Category' ? resources.resultCategoryNotFoundText : resources.resultSearchNotFoundText;\n }\n const productsComponent = this._getProducts();\n const featureComponent = (\n \n );\n\n const searchResultContainerViewProps = {\n ...this.props,\n products: productsComponent,\n TitleViewProps: this._getCollectionTitle(),\n categoryHierarchy: !this.props.config.disableHierarchy && this._getCategoryHierarchy(),\n refineMenu: this._getRefineMenu(),\n className: classnames('ms-search-result-container', className),\n SearchResultContainer: {\n moduleProps: this.props,\n className: classnames('ms-search-result-container', className)\n },\n sortByOptions: this.props.data.listPageState.result?.totalProductCount !== 0 ? this._getSortingDropDown() : null,\n pagination: this._getPagination(),\n ProductsContainer: { className: 'ms-search-result-container__Products' },\n ProductSectionContainer: { className: 'ms-search-result-container__product-section' },\n CategoryNavContainer: { className: 'ms-search-result-container__category-nav-section' },\n RefineAndProductSectionContainer: { className: 'ms-search-result-container__refine-product-section' },\n choiceSummary: this._getChoiceSummary(),\n modalToggle:\n this.props.data.listPageState.result?.totalProductCount !== 0 ? (\n \n ) : null,\n searchResultModal: this._getSearchResultModal(),\n isMobile: this.isMobile,\n errorMessage: errorText && ,\n FeatureSearchContainer: { className: 'ms-feature-search-result' },\n similarLookProduct: searchProduct ? featureComponent : null,\n productPrices: this.productPrices,\n productsDimensionAvailabilities: this.state.productsDimensionAvailabilities\n };\n return this.props.renderView(searchResultContainerViewProps) as React.ReactElement;\n }\n\n /**\n * Get products variants dimension availabilities.\n * @returns Void.\n */\n private readonly _updateVariantAvailability = async (): Promise => {\n const context = this.props.context as ICoreContext;\n const dimensionsToDisplayOnProductCard = context.app.config.dimensionsInProductCard;\n const dimensionsToDisplayAsSwatch = context.app.config.dimensionsAsSwatchType;\n if (\n ArrayExtensions.hasElements(dimensionsToDisplayOnProductCard) &&\n !dimensionsToDisplayOnProductCard.includes(DimensionTypes.none) &&\n ArrayExtensions.hasElements(dimensionsToDisplayAsSwatch) &&\n !dimensionsToDisplayAsSwatch.includes(DimensionTypes.none) &&\n this.props.config.includeAttributes\n ) {\n await this._getProductsDimensionsAvailabilities();\n }\n };\n\n /**\n * Update the list page state with initial data.\n * @param listPageState -- List page State.\n * @param products -- Products.\n */\n @action\n private readonly _updateListPageState = (listPageState: ListPageState, products: IFullProductsSearchResultsWithCount): void => {\n let querySorting: SortColumn[] = [];\n const defaultPageNumber: number = 10;\n\n if (this._pageType === 'Category') {\n listPageState.pageType = 'Category';\n } else {\n listPageState.pageType = 'Search';\n }\n\n if (this.props.context.request.query?.sorting) {\n querySorting = JSON.parse(decodeURIComponent(this.props.context.request.query.sorting)) as SortColumn[];\n }\n\n listPageState.currentPageNumber =\n (this.props.context.request.query?.skip &&\n +this.props.context.request.query.skip / (this.props.config.itemsPerPage ?? defaultPageNumber)) ||\n 0;\n listPageState.sortingCritera = { Columns: querySorting };\n listPageState.pageSize = this.props.config.itemsPerPage ?? defaultPageNumber;\n listPageState.activeProducts = products.products;\n listPageState.totalProductCount = products.count;\n listPageState.activeFilters = hydrateRefinersFromUrl(this.props.context.request) || [];\n if (this.props.context.request.query?.productId) {\n const featureProduct = this.props.data.featureProduct.result;\n if (featureProduct) {\n listPageState.featureProduct = featureProduct;\n }\n }\n };\n\n /**\n * Get products dimension availabilities.\n * @returns Void.\n */\n private readonly _getProductsDimensionsAvailabilities = async (): Promise => {\n const productsList = this.props.data.listPageState.result?.activeProducts ?? [];\n\n const productsDimensionAvailabilities = await getDimensionAvailabilitiesForProductSearchResultAction(\n new DimensionAvailabilitiesForProductSearchResultInput(\n productsList,\n this.props.context as ICoreContext,\n DimensionSwatchDisplayTypes.productCard\n ),\n this.props.context.actionContext\n );\n\n if (ArrayExtensions.hasElements(productsDimensionAvailabilities)) {\n this.setState({ productsDimensionAvailabilities });\n }\n };\n\n /**\n * Get the active price for the products.\n */\n private readonly _getActivePrice = async (): Promise => {\n const productsList = this.props.data.listPageState.result?.activeProducts ?? [];\n const products = await getPriceForProductSearchResult(\n new PriceForProductSearchResultInput(productsList),\n this.props.context.actionContext\n );\n\n const listPageState = await this.props.data.listPageState;\n listPageState.activeProducts = products;\n };\n\n private readonly _getSearchResultModal = (): ISearchResultModalViewProps => {\n const { resources } = this.props;\n return SearchResultModal({\n resources: {\n modalCloseButtonText: resources.modalCloseButtonText,\n modalTitle: resources.modalTitle\n },\n isOpen: this.state.modalIsOpen,\n returnRef: this._modalToggleRef,\n onModalToggle: this._toggleModal\n });\n };\n\n private readonly _getCollectionTitle = (): ITitleViewProps => {\n const { data, context, resources } = this.props;\n\n let collectionTitle: string | undefined = '';\n if (context && context.request && context.request.query && context.request.query.q) {\n collectionTitle = `\"${context.request.query.q}\"`;\n } else {\n collectionTitle =\n (data.category.result &&\n SearchResultContainer.getFriendlyName(context.request.locale, data.category.result.NameTranslations)) ||\n (data.category.result && data.category.result.Name) ||\n this.props.context.request.query?.title ||\n '';\n }\n let productCountText = '';\n let productCountNumber: number | undefined;\n if (data.listPageState && data.listPageState.result && data.listPageState.result.totalProductCount !== undefined) {\n productCountNumber = data.listPageState.result.totalProductCount;\n } else if (data.products && data.products.result) {\n productCountNumber = data.products.result.count;\n }\n\n if (productCountNumber && productCountNumber !== 0) {\n productCountText =\n productCountNumber !== 1\n ? format(this.props.resources.numberOfProducts, productCountNumber)\n : this.props.resources.oneProduct;\n } else {\n productCountText = format(this.props.resources.numberOfProducts, 0);\n }\n const pageName = context.request.telemetryPageName ? `result-count-${context.request.telemetryPageName.toLowerCase()}` : '';\n const titlePrefix = ;\n const titleText = collectionTitle && <Title className='ms-search-result__collection-title-text' text={collectionTitle} />;\n const titleCount = <Title className='ms-search-result__collection-title-count' text={productCountText} />;\n\n return {\n TitleContainer: { className: `ms-search-result-container__title ${pageName}` },\n title: {\n titlePrefix,\n titleText,\n titleCount\n }\n };\n };\n\n private readonly _getCategoryHierarchy = (): ICategoryHierarchyViewProps => {\n const { data } = this.props;\n const categoryHierarchy = data.categoryHierarchy.result;\n const categoryLinks =\n categoryHierarchy &&\n categoryHierarchy.map((value: CategoryHierarchyData, index: number) => {\n return (\n <Link\n key={index}\n text={value.Name}\n ariaLabel={`${this.props.resources.categoryLinkAriaLabel} ${value.Name}`}\n href={value.Url}\n />\n );\n });\n const categoryLinkSeparator = <Separator separator='/' />;\n\n return {\n CategoryHierarchyContainer: { tag: 'nav', className: 'ms-search-result-container__category-hierarchy' },\n categoryHierarchyList: categoryLinks,\n categoryHierarchySeparator: categoryLinkSeparator\n };\n };\n\n private readonly _getSortingDropDown = (): ISortByViewProps => {\n const { resources } = this.props;\n const activeDropdown = this._getCurrentlySelectedOption() || this.state.sortingState.selectedSortByOption;\n let dropdownOptions = this._getAllSortByOptions();\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access -- App config settings are of \"any\" value.\n if (this.props.context.app.config.hideRating) {\n dropdownOptions = dropdownOptions.filter(dropdownOption => dropdownOption.key !== sortOptions.sortByOptionRatingDesc);\n }\n\n const dropdown = (\n <LabeledDropdown\n labelClassname='reviews-list-sort-by'\n labelText={resources.sortByDropdownLabel}\n dropdownId='categorySortByDropdown'\n dropdownClassname='reviews-list-dropdown'\n toggleColor='link'\n dropdownOptions={dropdownOptions}\n selectedOption={activeDropdown}\n onSelectOption={this._updateSortByDropdown}\n ref={this._sortAndFilterContainerRef}\n />\n );\n return {\n SortingContainer: { className: 'ms-search-result-container__Sort-by-category' },\n sortByDropDown: dropdown\n };\n };\n\n private readonly _getPagination = (): React.ReactNode => {\n const { config, context, data, resources } = this.props;\n const listPageState = data.listPageState.result;\n const fullUrl = getCurrentUrl(context.request);\n const itemsPerPage = config.itemsPerPage || 10;\n // eslint-disable-next-line max-len -- existing code\n const skipCount = !ObjectExtensions.isNullOrUndefined(listPageState?.currentPageNumber)\n ? listPageState!.currentPageNumber * (this.props.config.itemsPerPage || 10)\n : (this.props.context.request.query && +this.props.context.request.query.skip) || 0;\n const totalItems = listPageState?.totalProductCount || 0;\n const previousText = resources.flipperPrevious;\n const nextText = resources.flipperNext;\n\n if (totalItems <= itemsPerPage) {\n return null;\n }\n return (\n <UncontrolledPagination\n className='ms-search-result-container__pagination'\n role='navigation'\n aria-label={resources.paginationAriaLabel}\n url={fullUrl.href}\n qsp='skip'\n items={totalItems}\n itemsPerPage={itemsPerPage}\n startingItem={skipCount}\n previousText={this._renderPrev(previousText)}\n nextText={this._renderNext(nextText)}\n previousAriaLabel={previousText}\n nextAriaLabel={nextText}\n telemetryContent={this.telemetryContent}\n />\n );\n };\n\n private readonly _getRefineMenu = (): IRefineMenuViewProps => {\n const { data, context, config } = this.props;\n const tempRangeTypeTODO = context.request.query && context.request.query.inputRange ? 'input' : 'slider';\n const validRefiners =\n this.props.config.updateRefinerPanel && ArrayExtensions.hasElements(this.state.refiners)\n ? this.state.refiners.filter(refiner => {\n return ArrayExtensions.hasElements(refiner.Values) && !this._shouldHideFromRefiners(refiner);\n })\n : data.refiners.result &&\n data.refiners.result.filter(refiner => {\n return ArrayExtensions.hasElements(refiner.Values) && !this._shouldHideFromRefiners(refiner);\n });\n\n const activeRefiners = (data.listPageState.result && data.listPageState.result.activeFilters) || [];\n\n this._getexpandRefinerCount(validRefiners && validRefiners.length, config.expandRefinersCount);\n const expandedRefiners = this.expandrefinerCount;\n const subMenus =\n validRefiners &&\n validRefiners.map((productRefinerHierarchy: IProductRefinerHierarchy, index: number) => {\n return (\n <RefineSubmenu\n productRefinerHierarchy={productRefinerHierarchy}\n selectedRefinerValues={activeRefiners}\n refineItemCommonProps={this._refineItemCommonProps}\n minValueSliderThumbAriaLabel={this.props.resources.minValueSliderThumbAriaLabel}\n maxValueSliderThumbAriaLabel={this.props.resources.maxValueSliderThumbAriaLabel}\n key={index}\n onUpdateRefiners={this._onUpdateRefiners}\n urlBuilder={this._buildRefinerUrl}\n isDisabled={false}\n isExpandedOnInitialLoad={!!(expandedRefiners && expandedRefiners > index)}\n tempRangeTypeTODO={tempRangeTypeTODO}\n context={context}\n moduleId={this.props.id}\n moduleTypeName={this.props.typeName}\n telemetryContent={this.telemetryContent}\n productCountAriaLabel={this.props.resources.productCountAriaLabel}\n refineItemAriaLabel={this.props.resources.refineItemAriaLabel}\n refineItemsAriaLabel={this.props.resources.refineItemsAriaLabel}\n singleProductCountAriaLabel={this.props.resources.singleProductCountAriaLabel}\n isMobile={this.isMobile}\n />\n );\n });\n\n return {\n RefineMenuContainer: { className: 'ms-search-result-container__refine-menu' },\n RefinerSectionContainer: { className: 'ms-search-result-container__refiner-section' },\n refiners: subMenus\n };\n };\n\n /**\n * Should hide from refiners.\n * @param refiner - The refiner.\n * @returns ShouldHideFromRefiners.\n */\n private readonly _shouldHideFromRefiners = (refiner: IProductRefinerHierarchy): boolean => {\n const { channelInventoryConfiguration } = this.state;\n const isInventorySortableAttribute =\n (this.props.data.products.result?.inventoryAwareSortableAttributeId !== 0 &&\n refiner.RecordId === this.props.data.products.result?.inventoryAwareSortableAttributeId) ||\n (channelInventoryConfiguration?.ProductAvailabilitySortableAttributeRecordId !== 0 &&\n refiner.RecordId === channelInventoryConfiguration?.ProductAvailabilitySortableAttributeRecordId);\n\n const isInventoryProductAttribute =\n (this.props.data.products.result?.channelInventoryConfigurationId !== 0 &&\n refiner.RecordId === this.props.data.products.result?.channelInventoryConfigurationId) ||\n (channelInventoryConfiguration?.InventoryProductAttributeRecordId !== 0 &&\n refiner.RecordId === channelInventoryConfiguration?.InventoryProductAttributeRecordId);\n\n // Always hide sortable attribute since it's just for sorting products in Azure search, not for customers\n return (\n isInventorySortableAttribute ||\n (this.props.context.app.config.productListInventoryDisplay === ProductListInventoryFilteringOptions.HideOOS &&\n isInventoryProductAttribute)\n );\n };\n\n private readonly _getChoiceSummary = (): React.ReactNode => {\n const { resources, data, telemetry } = this.props;\n const { channelInventoryConfiguration } = this.state;\n const selectedRefiners = (data.listPageState.result && data.listPageState.result.activeFilters) || [];\n const refinerValueName = this.props.data.refiners.result?.find(rating => rating.KeyName === 'Rating');\n return (\n <ChoiceSummary\n classNames='ms-choice-summary-by-category'\n clearAllText={resources.clearAllText}\n label={resources.choiceSummaryLabel}\n closeAriaLabel={resources.closeAriaLabel}\n selectedChoices={selectedRefiners}\n // @ts-expect-error: NOTE Type-unsafe line below, null refinersByCategoryHierarchy case not handled\n refinerHierarchy={data.refiners.result}\n choiceFormat={resources.choiceFormat}\n choiceRangeValueFormat={resources.choiceRangeValueFormat}\n telemetry={telemetry}\n onChoiceClicked={this._onChoiceClicked}\n urlBuilder={this._buildRefinerUrlForChoiceSummary}\n choiceAriaLabel={resources.choiceAriaLabel}\n telemetryContent={this.telemetryContent}\n context={this.props.context}\n channelInventoryConfigurationId={channelInventoryConfiguration?.InventoryProductAttributeRecordId}\n refinerValues={refinerValueName}\n />\n );\n };\n\n /**\n * Get Active products.\n * @returns - JSX Elements.\n */\n private readonly _getProducts = (): JSX.Element => {\n const {\n config: { imageSettings, allowBackNavigation: shouldAllowBackNavigation }\n } = this.props;\n const { resources } = this.props;\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access -- Reading config value.\n const breadCrumbType: string = this.props.context.app.config.breadcrumbType;\n const shouldAllowBack = shouldAllowBackNavigation && (breadCrumbType === 'back' || breadCrumbType === 'categoryAndBack');\n\n const products = (this.props.data.listPageState.result && this.props.data.listPageState.result.activeProducts) || [];\n const quickviewSlot = this.props.slots?.quickview?.[0];\n const productComparisonButton = ArrayExtensions.hasElements(this.props.slots.productComparisonButton)\n ? this.props.slots.productComparisonButton[0]\n : null;\n\n const isPriceMinMaxFeatureState = this.props.data.featureState.result?.find(\n featureState => featureState.Name === 'Dynamics.AX.Application.RetailSearchPriceRangeFeature'\n );\n return (\n <ProductSearchResultItems\n products={products}\n context={this.props.context}\n imageSettings={imageSettings}\n resources={resources}\n moduleType={this.props.typeName}\n moduleId={this.props.id}\n allowBackNavigation={shouldAllowBack}\n telemetryContent={this.telemetryContent}\n quickviewSlot={quickviewSlot}\n productComparisonButton={productComparisonButton}\n channelInventoryConfigurationId={this.props.data.products.result?.channelInventoryConfigurationId}\n isPriceMinMaxEnabled={isPriceMinMaxFeatureState?.IsEnabled}\n productsDimensionAvailabilities={this.state.productsDimensionAvailabilities}\n />\n );\n };\n\n private readonly _updateSortByDropdown = (notification: ILabeledDropdownOnChangeNotification): void => {\n const {\n context: { request: requestContext, actionContext }\n } = this.props;\n\n if (!requestContext || !actionContext || !this.props.data.listPageState.result) {\n // eslint-disable-next-line max-len -- existing code\n const error = `[sort-by-category] cannot sort without context: ${!requestContext ? 'requestContext ' : ''} ${\n !actionContext ? 'actionContext ' : ''\n } could not be found`;\n this.props.telemetry.warning(error);\n return;\n }\n\n window.history.pushState(\n {},\n '',\n buildListPageUrl(\n getCurrentUrl(this.props.context.request),\n undefined,\n [this._getSortColumnFromSelectedOption(notification.selectedOption)],\n undefined\n )\n );\n transaction(() => {\n this.props.data.listPageState.result!.currentPageNumber = 0;\n this.props.data.listPageState.result!.sortingCritera = {\n Columns: [this._getSortColumnFromSelectedOption(notification.selectedOption)]\n };\n });\n };\n\n private readonly _getSortColumnFromSelectedOption = (option: ILabeledDropdownOption): SortColumn => {\n const { data } = this.props;\n\n if (!data.searchConfiguration.result) {\n return {};\n }\n\n const mappedConfiguration = data.searchConfiguration.result.find(searchConfiguration => {\n return searchConfiguration.key === option.key;\n });\n\n if (mappedConfiguration) {\n return mappedConfiguration.sortColumn;\n }\n\n return {};\n };\n\n /**\n * Retrieves current sort criteria.\n * @returns Sort criteria column which is currently active or undefined if it's not specified.\n */\n private readonly _getSortCriteriaColumn = (): SortColumn | undefined => {\n const sortCriteria = this.props.data.listPageState.result?.sortingCritera;\n if (ArrayExtensions.hasElements(sortCriteria?.Columns)) {\n return sortCriteria!.Columns[0];\n }\n\n const queryColumns = parseQueryParam<SortColumn[]>('sorting', this.props.context.request);\n if (ArrayExtensions.hasElements(queryColumns)) {\n return queryColumns[0];\n }\n\n return undefined;\n };\n\n /**\n * Retrieves dropdown options.\n * @returns All dropdown options.\n */\n private readonly _getAllSortByOptions = (): ILabeledDropdownOption[] => {\n const searchConfiguration = this.props.data.searchConfiguration.result;\n\n if (!searchConfiguration) {\n return [];\n }\n\n const mappedSearchConfiguration = this.sortByDropdownOptions.filter(mappedSearchConfig =>\n searchConfiguration.find(item => mappedSearchConfig.key === item.key)\n );\n\n return ArrayExtensions.validValues(mappedSearchConfiguration);\n };\n\n /**\n * Retrieves current selected dropdown option based on the sort criteria.\n * @returns Current dropdown option.\n */\n private readonly _getCurrentlySelectedOption = (): ILabeledDropdownOption | undefined => {\n const activeSortColumn = this._getSortCriteriaColumn();\n\n const searchConfiguration = this.props.data.searchConfiguration.result;\n\n if (!activeSortColumn || !searchConfiguration) {\n return undefined;\n }\n\n const activeMappedConfig = searchConfiguration.find(\n mappedSearchConfig =>\n mappedSearchConfig.sortColumn.ColumnName === activeSortColumn.ColumnName &&\n mappedSearchConfig.sortColumn.IsDescending === activeSortColumn.IsDescending\n );\n if (!activeMappedConfig) {\n return undefined;\n }\n\n return this.sortByDropdownOptions.find(dropdownOption => dropdownOption.key === activeMappedConfig.key);\n };\n\n private readonly _onUpdateRefiners = (itemToggleNotification: IRefineItemToggleNotification): void => {\n const {\n context: { request: requestContext, actionContext }\n } = this.props;\n\n if (!requestContext || !actionContext || !this.props.data.listPageState.result) {\n const error = `Refine menu cannot refine search criteria: \n ${!requestContext ? 'requestContext ' : ''} ${!actionContext ? 'actionContext ' : ''} could not be found`;\n this.props.telemetry.warning(error);\n return;\n }\n\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- Server side the list PageState will not be called.\n const updatedRefinementCriteria = getUpdatedRefinementCriteria(\n itemToggleNotification,\n this.props.data.listPageState.result?.activeFilters || []\n );\n\n window.history.pushState({}, '', buildListPageUrl(getCurrentUrl(this.props.context.request), updatedRefinementCriteria));\n transaction(() => {\n this.props.data.listPageState.result!.currentPageNumber = 0;\n this.props.data.listPageState.result!.activeFilters = updatedRefinementCriteria;\n });\n };\n\n private readonly _buildRefinerUrl = (itemToggleNotification: IRefineItemToggleNotification): string => {\n if (this.props.data.listPageState.result) {\n const newRefinementCriteria = getUpdatedRefinementCriteria(\n itemToggleNotification,\n this.props.data.listPageState.result.activeFilters || []\n );\n\n return buildListPageUrl(getCurrentUrl(this.props.context.request), newRefinementCriteria);\n }\n this.props.telemetry.warning('[buildRefinerQueryString]List Page State Not available, unable to build refiner URL');\n return '';\n };\n\n private readonly _onChoiceClicked = (notification: IChoiceSummaryClickNotification): void => {\n const { data, telemetry } = this.props;\n\n if (!data.listPageState.result) {\n telemetry.warning('[choice-summary-by-category._onChoiceClicked]ListPageState unavailable, unable to update refiners.');\n return;\n }\n\n let currentRefinementCriteria = (data.listPageState.result && data.listPageState.result.activeFilters) || [];\n\n if (!notification.clearAll) {\n const selectedChoice = notification.choiceClicked;\n if (!selectedChoice) {\n telemetry.warning('[choice-summary-by-category._onChoiceClicked] Choice could not be determined');\n return;\n }\n currentRefinementCriteria = currentRefinementCriteria.filter(\n (selectedCriterion: ProductRefinerValue) => !isMatchingRefinementCriterion(selectedChoice, selectedCriterion)\n );\n } else {\n currentRefinementCriteria = [];\n\n // Set focus to sort and filter\n const dropdownElementId = this._sortAndFilterContainerRef.current && this._sortAndFilterContainerRef.current.props.dropdownId;\n const dropdownElement = dropdownElementId && document.getElementById(dropdownElementId);\n setTimeout(() => {\n dropdownElement && dropdownElement.focus();\n }, 50);\n }\n\n const fullUrl = getCurrentUrl(this.props.context.request);\n window.history.pushState({}, '', buildListPageUrl(fullUrl, currentRefinementCriteria));\n data.listPageState.result.currentPageNumber = 0;\n data.listPageState.result.activeFilters = currentRefinementCriteria;\n };\n\n private readonly _buildRefinerUrlForChoiceSummary = (selectedRefiner: ProductRefinerValue, isClearAll: boolean): string => {\n const { data, telemetry } = this.props;\n const fullUrl = getCurrentUrl(this.props.context.request);\n\n if (!data.listPageState.result) {\n telemetry.warning('[choice-summary-by-category._buildRefinerUrl]ListPageState unavailable, unable to create refiner URL.');\n return fullUrl.href;\n }\n\n let currentRefinementCriteria = (data.listPageState.result && data.listPageState.result.activeFilters) || [];\n\n if (!isClearAll) {\n if (!selectedRefiner) {\n telemetry.warning('[choice-summary-by-category._buildRefinerUrl] URL for Choice could not be determined');\n return fullUrl.href;\n }\n currentRefinementCriteria = currentRefinementCriteria.filter(\n (selectedCriterion: ProductRefinerValue) => !isMatchingRefinementCriterion(selectedRefiner, selectedCriterion)\n );\n } else {\n currentRefinementCriteria = [];\n }\n\n return buildListPageUrl(fullUrl, currentRefinementCriteria);\n };\n\n private _getViewport(): GridSize {\n if (MsDyn365.isBrowser) {\n return isMobile({ variant: VariantType.Browser, context: this.props.context.request });\n }\n return isMobile({ variant: VariantType.Viewport, context: this.props.context.request });\n }\n\n private _toggleModal(): void {\n this.setState({\n modalIsOpen: !this.state.modalIsOpen\n });\n }\n\n private _updateViewport(): void {\n this._viewport = this._getViewport();\n\n if (this.state.modalIsOpen && !this.isMobile) {\n this._toggleModal();\n }\n }\n\n private readonly _getexpandRefinerCount = (validRefiners?: number, refinerCount?: expandRefinersCount): void => {\n switch (refinerCount) {\n case expandRefinersCount.all:\n this.expandrefinerCount = validRefiners;\n break;\n case expandRefinersCount.one:\n this.expandrefinerCount = 1;\n break;\n case expandRefinersCount.two:\n this.expandrefinerCount = 2;\n break;\n case expandRefinersCount.three:\n this.expandrefinerCount = 3;\n break;\n case expandRefinersCount.four:\n this.expandrefinerCount = 4;\n break;\n default:\n this.expandrefinerCount = 0;\n }\n };\n\n /**\n * Renders a Pagination previous text.\n * @param paginationPreviousText - Pagination previous text from resources.\n * @returns Previous text and flipper icon.\n */\n private readonly _renderPrev = (paginationPreviousText: string) => {\n return (\n <div className='msc-pagination__prev'>\n <span className='ms-search-result__pagination-left' aria-hidden='true' />\n <span className='prev-text'>{paginationPreviousText}</span>\n </div>\n );\n };\n\n /**\n * Renders a Pagination next text.\n * @param paginationNextText - Pagination next text from resources.\n * @returns Next text and flipper icon.\n */\n private readonly _renderNext = (paginationNextText: string) => {\n return (\n <div className='msc-pagination__next'>\n <span className='next-text'>{paginationNextText}</span>\n <span className='ms-search-result__pagination-right' aria-hidden='true' />\n </div>\n );\n };\n}\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { Module, Node } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport { ISearchResultModalViewProps } from './components';\nimport {\n ICategoryHierarchyViewProps,\n IRefineMenuViewProps,\n ISearchResultContainerViewProps,\n ISortByViewProps,\n ITitleViewProps\n} from './search-result-container';\n\nconst SearchResultContainerView: React.FC<ISearchResultContainerViewProps> = props => {\n const {\n SearchResultContainer,\n products,\n pagination,\n ProductsContainer,\n ProductSectionContainer,\n choiceSummary,\n isMobile,\n modalToggle,\n searchResultModal,\n TitleViewProps,\n refineMenu,\n categoryHierarchy,\n sortByOptions,\n CategoryNavContainer,\n RefineAndProductSectionContainer,\n errorMessage,\n FeatureSearchContainer,\n similarLookProduct\n } = props;\n const isRecoSearchPage = props.context.actionContext.requestContext.query?.recommendation;\n if (isMobile) {\n return (\n <Module {...SearchResultContainer}>\n {renderCategoryHierarchy(categoryHierarchy)}\n {renderTitle(TitleViewProps)}\n {choiceSummary}\n {modalToggle}\n {createSearchResultModal(searchResultModal, refineMenu, sortByOptions, isRecoSearchPage)}\n <Node {...FeatureSearchContainer}>{similarLookProduct}</Node>\n <Node {...ProductsContainer}>\n {errorMessage}\n {products}\n </Node>\n {pagination}\n </Module>\n );\n }\n return (\n <Module {...SearchResultContainer}>\n <Node {...CategoryNavContainer}>\n {categoryHierarchy && renderCategoryHierarchy(categoryHierarchy)}\n {TitleViewProps && renderTitleCount(TitleViewProps)}\n </Node>\n <Node {...RefineAndProductSectionContainer}>\n {refineMenu && renderRefiner(refineMenu)}\n <Node {...ProductSectionContainer}>\n {TitleViewProps && renderTitle(TitleViewProps)}\n {choiceSummary}\n {sortByOptions && !isRecoSearchPage && renderSort(sortByOptions)}\n <Node {...FeatureSearchContainer}>{similarLookProduct}</Node>\n <Node {...ProductsContainer}>\n {errorMessage}\n {products}\n </Node>\n {pagination}\n </Node>\n </Node>\n </Module>\n );\n};\n\nconst createSearchResultModal = (\n modalProps: ISearchResultModalViewProps,\n refineMenu: IRefineMenuViewProps,\n sortByDropDown: ISortByViewProps,\n isRecoSearchPage?: string\n): JSX.Element => {\n return React.cloneElement(\n modalProps.modal,\n {},\n modalProps.modalHeader,\n createModalBody(modalProps, refineMenu, sortByDropDown, isRecoSearchPage),\n modalProps.modalFooter\n );\n};\n\nconst createModalBody = (\n props: ISearchResultModalViewProps,\n refineMenu: IRefineMenuViewProps,\n sortByDropDown: ISortByViewProps,\n isRecoSearchPage?: string\n): JSX.Element | null => {\n if (sortByDropDown) {\n return React.cloneElement(props.modalBody, {}, renderSort(sortByDropDown, isRecoSearchPage), renderRefiner(refineMenu));\n }\n return null;\n};\n\nconst renderRefiner = (props: IRefineMenuViewProps): JSX.Element | null => {\n const { refiners, RefineMenuContainer, RefinerSectionContainer } = props;\n if (refiners) {\n return (\n <Node {...RefinerSectionContainer}>\n <Node {...RefineMenuContainer}>\n {refiners.map((submenu, index) => (\n <React.Fragment key={index}>{submenu}</React.Fragment>\n ))}\n </Node>\n </Node>\n );\n }\n return null;\n};\n\nconst renderSort = (props: ISortByViewProps, isRecoSearchPage?: string): JSX.Element | null => {\n const { SortingContainer, sortByDropDown } = props;\n if (sortByDropDown && !isRecoSearchPage) {\n return <Node {...SortingContainer}>{sortByDropDown}</Node>;\n }\n return null;\n};\n\nconst renderCategoryHierarchy = (props: ICategoryHierarchyViewProps): JSX.Element | null => {\n const { CategoryHierarchyContainer, categoryHierarchyList, categoryHierarchySeparator } = props;\n if (categoryHierarchyList) {\n return (\n <Node {...CategoryHierarchyContainer}>\n {categoryHierarchyList.map((category, index) => (\n <React.Fragment key={index}>\n {category}\n {categoryHierarchyList && categoryHierarchyList[index + 1] && categoryHierarchySeparator}\n </React.Fragment>\n ))}\n </Node>\n );\n }\n\n return null;\n};\n\nconst renderTitle = (props: ITitleViewProps): JSX.Element | null => {\n const { title, TitleContainer } = props;\n if (title) {\n return (\n <Node {...TitleContainer}>\n <h2>\n {title.titlePrefix}\n {title.titleText}\n </h2>\n </Node>\n );\n }\n return null;\n};\n\nconst renderTitleCount = (props: ITitleViewProps): JSX.Element | null => {\n const { title, TitleContainer } = props;\n if (title) {\n return (\n <Node {...TitleContainer}>\n <h5>{title.titleCount}</h5>\n </Node>\n );\n }\n return null;\n};\n\nexport default SearchResultContainerView;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { observable } from 'mobx';\n\n/**\n * State information related to what is needed to succesfully perform a autosuggest.\n */\nexport class SearchState {\n @observable public searchText?: string;\n\n @observable public defaultBasicSearchUrl?: string;\n\n @observable public searchQueryStringParameter?: string;\n}\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { Autosuggestions } from '@msdyn365-commerce/commerce-entities';\nimport {\n CacheType,\n createObservableDataAction,\n getCatalogId,\n IAction,\n IActionContext,\n IActionInput,\n ICreateActionContext\n} from '@msdyn365-commerce/core';\nimport {\n AttributeDataType,\n ChannelInventoryConfiguration,\n ProductRefinerSource,\n ProductRefinerValue,\n ProductSearchCriteria,\n SearchSuggestion,\n SearchSuggestionCriteria\n} from '@msdyn365-commerce/retail-proxy';\nimport {\n getInventoryConfigurationAsync,\n getSearchSuggestionsAsync\n} from '@msdyn365-commerce/retail-proxy/dist/DataActions/StoreOperationsDataActions.g';\nimport { generateImageUrl } from '@msdyn365-commerce-modules/retail-actions';\n\nexport enum SuggestionType {\n Category = 'ScopedCategory',\n Keyword = 'Keyword',\n Product = 'Product',\n None = 'None'\n}\n\n/**\n * This setting defines inventory filtering options.\n */\nexport enum ProductListInventoryFilteringOptions {\n /**\n * Filter out all products out of stock.\n */\n HideOOS = 'hideOOS',\n\n /**\n * Sort products by availability, OOS goes last.\n */\n SortOOS = 'sortOOS',\n\n /**\n * No filtering selected.\n */\n Default = 'default'\n}\n\n/**\n * Input class for auto suggest search input.\n */\nexport class AutoSuggestInput implements IActionInput {\n public searchQuery?: string;\n\n public topResultsCount?: number;\n\n public suggestionType?: string;\n\n public hitPrefix?: string;\n\n public hitSuffix?: string;\n\n public constructor(searchText?: string, top?: number, suggestionType?: string, hitPrefix?: string, hitSuffix?: string) {\n this.searchQuery = searchText;\n this.topResultsCount = top;\n this.suggestionType = suggestionType;\n this.hitPrefix = hitPrefix;\n this.hitSuffix = hitSuffix;\n }\n\n public getCacheKey = () => 'AutoSuggestSearchSuggestions';\n\n public getCacheObjectType = () => 'AutoSuggestSearchSuggestions';\n\n public dataCacheType = (): CacheType => 'none';\n}\n\nconst createInput = (inputData: ICreateActionContext) => {\n return new AutoSuggestInput();\n};\n\n/**\n * Calls the Retail API and returns a auto-suggest suggestions.\n * @param input\n * @param ctx\n */\nexport async function getSearchSuggestionsAction(input: AutoSuggestInput, ctx: IActionContext): Promise<Autosuggestions | null> {\n // If no input is provided fail out\n if (!input || !input.searchQuery) {\n throw new Error('[getSearchSuggestionsAction]No valid Input was provided, failing');\n }\n\n const autosuggest: Autosuggestions = {};\n\n const autoSuggestPromises = [_getAutoSuggest(input, autosuggest, ctx)];\n return Promise.all(autoSuggestPromises).then(() => {\n return autosuggest;\n });\n}\n\n/**\n * Returns inventory in stock sortable refiner value.\n * @param channelInventoryConfiguration - The channelInventoryConfiguration.\n * @param isInStock - The flag indicating whether is getting in-stock refiner or out-of-stock refiner.\n * @returns Refiners.\n */\nconst getInventorySortableRefinerValue = (\n channelInventoryConfiguration: ChannelInventoryConfiguration,\n isInStock: boolean\n): ProductRefinerValue | undefined => {\n if (channelInventoryConfiguration && channelInventoryConfiguration.ProductAvailabilitySortableAttributeRecordId) {\n return {\n RefinerRecordId: channelInventoryConfiguration.ProductAvailabilitySortableAttributeRecordId,\n DataTypeValue: AttributeDataType.TrueFalse,\n LeftValueBoundString: isInStock ? 'true' : 'false',\n RightValueBoundString: isInStock ? 'true' : 'false',\n UnitText: '',\n RowNumber: 0,\n Count: 0,\n ExtensionProperties: [],\n RefinerSourceValue: ProductRefinerSource.Attribute\n };\n }\n return undefined;\n};\n\nasync function _getAutoSuggest(input: AutoSuggestInput, autosuggest: Autosuggestions, ctx: IActionContext): Promise<void> {\n const catalogId = getCatalogId(ctx.requestContext);\n let productSearchCriteria: ProductSearchCriteria = {\n SearchCondition: input.searchQuery && input.searchQuery.length > 0 ? input.searchQuery : '',\n Context: {\n ChannelId: +ctx.requestContext.apiSettings.channelId,\n CatalogId: catalogId\n }\n };\n\n if (ctx.requestContext.app.config?.productListInventoryDisplay === ProductListInventoryFilteringOptions.HideOOS) {\n const channelInventoryConfiguration = await getInventoryConfigurationAsync({ callerContext: ctx });\n const isInStockRefiner = true;\n const inventoryRefinerValue = getInventorySortableRefinerValue(channelInventoryConfiguration, isInStockRefiner);\n\n if (inventoryRefinerValue) {\n productSearchCriteria = {\n ...productSearchCriteria,\n Refinement: [inventoryRefinerValue]\n };\n }\n }\n\n const searchCriteria: SearchSuggestionCriteria = {\n ProductSearchCriteria: productSearchCriteria,\n HitPrefix: input.hitPrefix,\n HitSuffix: input.hitSuffix,\n SuggestionType: input.suggestionType\n };\n\n const searchSuggestions = await getSearchSuggestionsAsync(\n { callerContext: ctx, queryResultSettings: { Paging: { Top: input.topResultsCount } } },\n searchCriteria\n );\n\n if (searchSuggestions && searchSuggestions.length > 0) {\n // Generate image url\n searchSuggestions.map(\n (item: SearchSuggestion) =>\n (item.ImageUrl = item.ImageUrl ? generateImageUrl(item.ImageUrl, ctx.requestContext.apiSettings) : '')\n );\n\n autosuggest.AllSearchResults = searchSuggestions;\n } else {\n ctx.telemetry.error(\n `[getSearchSuggestionsAction] unable to get availabilites for search with suggestion type ${searchCriteria.SuggestionType}`\n );\n }\n}\n\nexport const getSearchSuggestionsActionDataAction = createObservableDataAction({\n id: '@msdyn365-commerce-modules/search/get-auto-suggest-suggestions',\n action: <IAction<Autosuggestions>>getSearchSuggestionsAction,\n input: createInput\n});\n\nexport default getSearchSuggestionsActionDataAction;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport MsDyn365, { getRichTextHtml } from '@msdyn365-commerce/core';\nimport { ProductRefiner, ProductRefinerSource, ProductRefinerValue, SearchSuggestion } from '@msdyn365-commerce/retail-proxy';\nimport { format, getPayloadObject, getTelemetryAttributes, IPayLoad, ITelemetryContent } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport { ISearchData } from '../search.data';\nimport { ISearchProps } from '../search.props.autogenerated';\n\nexport interface ISearchCategorySuggestProps {\n searchCategorySuggestClass: string;\n searchPageURL: string;\n searchQsp: string | undefined;\n hitPrefix: string;\n hitSuffix: string;\n autoSuggestProps: ISearchProps<ISearchData>;\n searchText: string;\n searchRefiners: ProductRefiner[] | undefined;\n suggestions: SearchSuggestion[] | undefined;\n telemetryContent?: ITelemetryContent;\n shouldShowFullPath?: boolean;\n}\n\nexport interface ISearchCategoryViewProps {\n title: React.ReactNode;\n text: React.ReactNode[];\n}\n\nlet payLoad: IPayLoad;\n\n/**\n * CategorySuggestionsComponent.\n * @param props\n */\nexport const CategorySuggestionsComponent = (props: ISearchCategorySuggestProps): ISearchCategoryViewProps | undefined => {\n const {\n suggestions,\n searchText,\n autoSuggestProps: {\n resources: { categorySuggestionHeading }\n }\n } = props;\n\n const reactNodes: React.ReactNode[] = [];\n payLoad = getPayloadObject('click', props.telemetryContent!, '');\n\n suggestions?.map(item => {\n reactNodes.push(_assembleNode(item, props));\n });\n\n const titleNode = _renderTitle(categorySuggestionHeading, searchText);\n\n return { title: titleNode, text: reactNodes };\n};\n\nconst _renderTitle = (categorySuggestionHeading: string, searchText: string) => {\n const categoryAutoSuggestionHeading = categorySuggestionHeading\n ? format(categorySuggestionHeading, searchText)\n : `Search \"${searchText}\" in categories`;\n\n return <li className='msc-autoSuggest__categoryResults-title'>{categoryAutoSuggestionHeading}</li>;\n};\n\nconst _assembleNode = (item: SearchSuggestion, props: ISearchCategorySuggestProps) => {\n const { searchText, hitPrefix, hitSuffix, shouldShowFullPath } = props;\n\n const splitValue = shouldShowFullPath ? item.Value : item.Value && item.Value.split('|').pop();\n const ariaLabel = splitValue\n ? splitValue.replace(new RegExp(`[${hitPrefix}]`, 'gi'), '').replace(new RegExp(`[${hitSuffix}]`, 'gi'), '')\n : item.Value && item.Value.replace(new RegExp(`[${hitPrefix}]`, 'gi'), '').replace(new RegExp(`[${hitSuffix}]`, 'gi'), '');\n payLoad.contentAction.etext = item.Value;\n const attribute = getTelemetryAttributes(props.telemetryContent!, payLoad);\n return (\n <li className='msc-autoSuggest__categoryResults-item' key={item.Id}>\n <a aria-label={ariaLabel} href={_generateLink(item, searchText, props)} {...attribute}>\n {_generateLink(item, searchText, props) && _getHighlightedText(splitValue ? splitValue : '', hitPrefix, hitSuffix)}\n </a>\n </li>\n );\n};\n\nconst _generateLink = (suggestion: SearchSuggestion, searchText: string, props: ISearchCategorySuggestProps): string => {\n return suggestion && suggestion.Id ? _getCategoryLink(suggestion.Id, searchText, props) : '';\n};\n\nconst _getCategoryLink = (id: string, searchText: string, props: ISearchCategorySuggestProps): string => {\n const { searchPageURL, searchQsp, searchRefiners } = props;\n\n if (!MsDyn365.isBrowser) {\n return '';\n }\n\n const queryUrl = new URL(searchPageURL, window.location.href);\n\n if (searchQsp && searchText) {\n queryUrl.searchParams.set(searchQsp, searchText);\n }\n\n const categoryRefiners = searchRefiners?.find(refiners => {\n return refiners.SourceValue === ProductRefinerSource.Category;\n });\n const refiner = categoryRefiners?.Values?.find(item => {\n return item.RefinerRecordId === Number.parseInt(id, 10);\n });\n\n const encodedRefiner = refiner && JSON.stringify(compressRefiners([refiner]));\n if (encodedRefiner) {\n queryUrl.searchParams.set('refiners', encodedRefiner);\n }\n\n return queryUrl.href;\n};\n\nconst _getHighlightedText = (suggestion: string, hitPrefix: string, hitSuffix: string): JSX.Element => {\n const formattedText = suggestion\n .replace(new RegExp(`[${hitPrefix}]`, 'gi'), '<strong>')\n .replace(new RegExp(`[${hitSuffix}]`, 'gi'), '</strong>');\n\n // eslint-disable-next-line react/no-danger\n return <span dangerouslySetInnerHTML={getRichTextHtml(formattedText)} />;\n};\n\n// TODO: This code is currently duplicated in categoryautosuggest need to either remove one of these files\n// or move this code to a common place\nconst compressedRefinerKeys = [\n 'DataTypeValue',\n 'LeftValueBoundString',\n 'RefinerRecordId',\n 'RefinerSourceValue',\n 'RightValueBoundString',\n 'UnitText'\n];\n\n/**\n * Compressed a list of refiners for use in URLs.\n * @param refiners The uncompressed refiners.\n */\nconst compressRefiners = (refiners: ProductRefinerValue[]) => {\n const compressedRefiners: (string | number)[][] = [];\n\n refiners.forEach(refiner => {\n const compressedRefiner: (string | number)[] = [];\n compressedRefinerKeys.forEach(refinerKey => {\n compressedRefiner.push(refiner[refinerKey]);\n });\n compressedRefiners.push(compressedRefiner);\n });\n\n return compressedRefiners;\n};\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { Button } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nexport interface ISearchFormProps {\n hideSearchLabel: boolean | undefined;\n isSearchFormExpanded?: boolean | undefined;\n disableSubmitSearch: boolean | undefined;\n searchTextInput: React.RefObject<HTMLInputElement>;\n maxChars: number;\n searchQsp: string;\n searchPlaceholder: string;\n query: string;\n ariaLabelCancel: string;\n ariaLabelSearch: string;\n ariaLabelSubmit: string;\n handleCancelSearchChange(): void;\n handleInputChange(query: string): void;\n}\n\nexport interface ISearchFormViewProps {\n input: React.ReactNode;\n submitBtn: React.ReactNode;\n cancelBtn: React.ReactNode;\n}\n\n/**\n * On Input Change functionality.\n * @param handleInputChange -Input change function.\n * @returns Set updated input value.\n */\nconst onInputChangeFunction = (handleInputChange: (query: string) => void) => (event: React.ChangeEvent<HTMLInputElement>) => {\n handleInputChange(event.target.value || '');\n};\nexport const FormComponent = (props: ISearchFormProps): ISearchFormViewProps => {\n const {\n searchQsp,\n searchPlaceholder,\n hideSearchLabel,\n searchTextInput,\n handleInputChange,\n maxChars,\n disableSubmitSearch,\n handleCancelSearchChange,\n query,\n ariaLabelCancel,\n ariaLabelSearch,\n ariaLabelSubmit\n } = props;\n\n const onInputChange = onInputChangeFunction(handleInputChange);\n\n const inputNode = !hideSearchLabel ? (\n <input\n className='ms-search__form-control'\n type='text'\n aria-label={ariaLabelSearch}\n name={searchQsp}\n placeholder={searchPlaceholder}\n ref={searchTextInput}\n onChange={onInputChange}\n maxLength={maxChars}\n value={query}\n />\n ) : (\n <input\n className='ms-search__form-control'\n type='text'\n aria-label={ariaLabelSearch}\n name={searchQsp}\n placeholder={searchPlaceholder}\n ref={searchTextInput}\n onChange={onInputChange}\n value={query}\n />\n );\n\n const submitBtnNode = !disableSubmitSearch && <Button className='ms-search__form-submitSearch' aria-label={ariaLabelSubmit} />;\n\n const cancelBtNoden = (\n <Button\n className={!disableSubmitSearch ? 'ms-search__form-cancelSearch' : 'ms-search__form-cancelSearchNoSumbit'}\n aria-label={ariaLabelCancel}\n onClick={handleCancelSearchChange}\n type='button'\n />\n );\n\n return { input: inputNode, cancelBtn: cancelBtNoden, submitBtn: submitBtnNode };\n};\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport MsDyn365, { getRichTextHtml } from '@msdyn365-commerce/core';\nimport { SearchSuggestion } from '@msdyn365-commerce/retail-proxy';\nimport { getPayloadObject, getTelemetryAttributes, IPayLoad, ITelemetryContent } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport { ISearchData } from '../search.data';\nimport { ISearchProps } from '../search.props.autogenerated';\n\nexport interface ISearchKeywordSuggestProps {\n searchKeywordSuggestClass: string;\n searchPageURL: string;\n searchQsp: string | undefined;\n hitPrefix: string;\n hitSuffix: string;\n autoSuggestProps: ISearchProps<ISearchData>;\n searchText: string;\n suggestions: SearchSuggestion[] | undefined;\n telemetryContent?: ITelemetryContent;\n}\n\nexport interface ISearchKeywordViewProps {\n text: React.ReactNode[];\n}\n\nlet payLoad: IPayLoad;\n\n/**\n * KeywordSuggestionsComponent.\n * @param props\n */\nexport const KeywordSuggestionsComponent = (props: ISearchKeywordSuggestProps): ISearchKeywordViewProps | undefined => {\n const { suggestions, hitPrefix, hitSuffix } = props;\n\n payLoad = getPayloadObject('click', props.telemetryContent!, '');\n\n const reactNodes: React.ReactNode[] = [];\n\n suggestions?.map(item => {\n reactNodes.push(_assembleNode(item, hitPrefix, hitSuffix, props));\n });\n\n return { text: reactNodes };\n};\n\nconst _assembleNode = (item: SearchSuggestion, hitPrefix: string, hitSuffix: string, props: ISearchKeywordSuggestProps) => {\n const ariaLabel =\n item.Value && item.Value.replace(new RegExp(`[${hitPrefix}]`, 'gi'), '').replace(new RegExp(`[${hitSuffix}]`, 'gi'), '');\n payLoad.contentAction.etext = ariaLabel;\n const attribute = getTelemetryAttributes(props.telemetryContent!, payLoad);\n return (\n <li className='msc-autoSuggest__keywordResults-item' key={item.Id}>\n <a aria-label={ariaLabel} href={_generateLink(item, hitPrefix, hitSuffix, props)} {...attribute}>\n {_generateLink(item, hitPrefix, hitSuffix, props) &&\n _getHighlightedText(item.Value ? item.Value : '', hitPrefix, hitSuffix)}\n </a>\n </li>\n );\n};\n\nconst _generateLink = (suggestion: SearchSuggestion, hitPrefix: string, hitSuffix: string, props: ISearchKeywordSuggestProps): string => {\n const { searchPageURL, searchQsp } = props;\n\n const formattedLink = (suggestion.Value as string)\n .replace(new RegExp(`[${hitPrefix}]`, 'gi'), '')\n .replace(new RegExp(`[${hitSuffix}]`, 'gi'), '');\n\n if (!MsDyn365.isBrowser) {\n return '';\n }\n\n const queryUrl = new URL(searchPageURL, window.location.href);\n if (searchQsp && formattedLink) {\n queryUrl.searchParams.set(searchQsp, formattedLink);\n }\n\n return queryUrl.href;\n};\n\nconst _getHighlightedText = (suggestion: string, hitPrefix: string, hitSuffix: string): JSX.Element => {\n const formattedText = suggestion\n .replace(new RegExp(`[${hitPrefix}]`, 'gi'), '<strong>')\n .replace(new RegExp(`[${hitSuffix}]`, 'gi'), '</strong>');\n\n // eslint-disable-next-line react/no-danger\n return <span dangerouslySetInnerHTML={getRichTextHtml(formattedText)} />;\n};\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { Button, getPayloadObject, getTelemetryAttributes, ITelemetryContent } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nexport interface ISearchLabelProps {\n isSearchFormExpanded: boolean;\n searchLabelClass: string;\n searchLabelArialLabel: string;\n searchtext: string;\n searchCollapsedLabel: React.RefObject<HTMLButtonElement>;\n hideSearchLabel?: boolean;\n telemetryContent: ITelemetryContent;\n handleCancelSearchChange(): void;\n}\n\nexport const LabelComponent = (props: ISearchLabelProps) => {\n const {\n searchLabelClass,\n searchLabelArialLabel,\n isSearchFormExpanded,\n searchtext,\n searchCollapsedLabel,\n hideSearchLabel,\n handleCancelSearchChange,\n telemetryContent\n } = props;\n const payLoad = getPayloadObject('click', telemetryContent, searchtext, '');\n const attributes = getTelemetryAttributes(telemetryContent, payLoad);\n\n return (\n <div className={searchLabelClass}>\n <Button\n className='ms-search__icon'\n aria-expanded={isSearchFormExpanded}\n aria-label={searchLabelArialLabel}\n onClick={handleCancelSearchChange}\n innerRef={searchCollapsedLabel}\n {...attributes}\n >\n {!hideSearchLabel && (\n <span className='ms-search__icon-text' aria-hidden>\n {searchtext}\n </span>\n )}\n </Button>\n </div>\n );\n};\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { PriceComponent } from '@msdyn365-commerce/components';\nimport { getRichTextHtml, IActionContext, IImageSettings, Image, ITelemetry } from '@msdyn365-commerce/core';\nimport { SearchSuggestion } from '@msdyn365-commerce/retail-proxy';\nimport { getProductPageUrlSync, ObjectExtensions } from '@msdyn365-commerce-modules/retail-actions';\nimport {\n getPayloadObject,\n getTelemetryAttributes,\n INodeProps,\n IPayLoad,\n ITelemetryContent,\n NodeTag\n} from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport { ISearchData } from '../search.data';\nimport { ISearchProps } from '../search.props.autogenerated';\n\n/**\n * Search product suggest resources.\n */\nexport interface ISearchProductSuggestResources {\n freePriceText: string;\n}\n\nexport interface ISearchProductSuggestProps {\n searchProductSuggestClass: string;\n searchPageURL: string;\n searchQsp: string | undefined;\n hitPrefix: string;\n hitSuffix: string;\n autoSuggestProps: ISearchProps<ISearchData>;\n searchText: string;\n suggestions: SearchSuggestion[] | undefined;\n telemetry: ITelemetry;\n moduleType: string;\n moduleId: string;\n telemetryContent?: ITelemetryContent;\n resources?: ISearchProductSuggestResources;\n}\n\nexport interface ISearchProductViewProps {\n title: React.ReactNode;\n items: ISearchProductItemViewProps[];\n}\n\nexport interface ISearchProductItemViewProps {\n text: React.ReactNode;\n thumbnail: React.ReactNode;\n price: React.ReactNode;\n LiProduct: INodeProps;\n AProduct: INodeProps;\n id: string | undefined;\n}\n\nlet payLoad: IPayLoad;\nlet telemetryContent: ITelemetryContent | undefined;\n\n/**\n * ProductSuggestionsComponent.\n * @param props\n */\nexport const ProductSuggestionsComponent = (props: ISearchProductSuggestProps): ISearchProductViewProps | undefined => {\n const {\n suggestions,\n hitSuffix,\n hitPrefix,\n autoSuggestProps: {\n context: { actionContext },\n resources: { productSuggestionHeading }\n },\n moduleType,\n moduleId\n } = props;\n const reactNodes: ISearchProductItemViewProps[] = [];\n telemetryContent = props.telemetryContent;\n payLoad = getPayloadObject('click', props.telemetryContent!, '');\n\n suggestions?.map(item => {\n reactNodes.push(_assembleNode(item, hitPrefix, hitSuffix, actionContext, props, moduleType, moduleId));\n });\n\n const titleNode = _renderTitle(productSuggestionHeading);\n\n return { title: titleNode, items: reactNodes };\n};\n\nconst _renderTitle = (productSuggestionHeading: string) => {\n const productAutoSuggestionHeading = productSuggestionHeading ? productSuggestionHeading : 'Go to products';\n\n return <li className='msc-autoSuggest__productResults-title'>{productAutoSuggestionHeading}</li>;\n};\n\nconst _assembleNode = (\n item: SearchSuggestion,\n hitPrefix: string,\n hitSuffix: string,\n actionContext: IActionContext,\n props: ISearchProductSuggestProps,\n moduleType: string,\n moduleId: string\n): ISearchProductItemViewProps => {\n const altText =\n item.Value && item.Value.replace(new RegExp(`[${hitPrefix}]`, 'gi'), '').replace(new RegExp(`[${hitSuffix}]`, 'gi'), '');\n\n const price = item.Value3?.Value?.DecimalValue;\n return {\n text: _getHighlightedText(item.Value ? item.Value : '', hitPrefix, hitSuffix),\n thumbnail: _renderThumbnail(item, altText ? altText : '', props),\n price: !ObjectExtensions.isNullOrUndefined(price) && _renderPrice(price, price, moduleId, moduleType, props),\n LiProduct: _getLiWrapper(),\n AProduct: _getAWrapper(item, hitPrefix, hitSuffix, actionContext, props),\n id: item.Id\n };\n};\n\nconst _getLiWrapper = () => {\n return {\n className: 'msc-autoSuggest__productResults-item',\n tag: 'li' as NodeTag\n };\n};\n\nconst _getAWrapper = (\n item: SearchSuggestion,\n hitPrefix: string,\n hitSuffix: string,\n actionContext: IActionContext,\n props: ISearchProductSuggestProps\n) => {\n const {\n autoSuggestProps: { context }\n } = props;\n const ariaLabel =\n item.Value && item.Value.replace(new RegExp(`[${hitPrefix}]`, 'gi'), '').replace(new RegExp(`[${hitSuffix}]`, 'gi'), '');\n\n payLoad.contentAction.recid = item.Id;\n const attribute = getTelemetryAttributes(telemetryContent!, payLoad);\n const productPrice = context.cultureFormatter.formatCurrency(item.Value3!.Value!.DecimalValue!);\n\n return {\n className: 'msc-autoSuggest__productResults-item',\n tag: 'a' as NodeTag,\n 'aria-label': `${ariaLabel!} ${productPrice}`,\n href: _generateLink(item, hitPrefix, hitSuffix, actionContext),\n ...attribute\n };\n};\n\nconst _generateLink = (suggestion: SearchSuggestion, hitPrefix: string, hitSuffix: string, actionContext: IActionContext) => {\n const formattedLink = (suggestion.Value as string)\n .replace(new RegExp(`[${hitPrefix}]`, 'gi'), '')\n .replace(new RegExp(`[${hitSuffix}]`, 'gi'), '');\n return suggestion.Value && suggestion.Id\n ? getProductPageUrlSync(formattedLink, (suggestion.Id as unknown) as number, actionContext, undefined)\n : '';\n};\n\nconst _getHighlightedText = (suggestion: string, hitPrefix: string, hitSuffix: string): JSX.Element => {\n const formattedText = suggestion\n .replace(new RegExp(`[${hitPrefix}]`, 'gi'), '<strong>')\n .replace(new RegExp(`[${hitSuffix}]`, 'gi'), '</strong>');\n\n return (\n // eslint-disable-next-line react/no-danger\n <span className='msc-price msc-autoSuggest__productResults-item-text' dangerouslySetInnerHTML={getRichTextHtml(formattedText)} />\n );\n};\n\nconst _renderPrice = (\n adjustedPrice: number,\n basePrice: number,\n moduleId: string,\n moduleType: string,\n props: ISearchProductSuggestProps\n): JSX.Element | null => {\n const {\n autoSuggestProps: { context }\n } = props;\n\n return (\n <PriceComponent\n id={moduleId}\n typeName={moduleType}\n context={context}\n data={{\n price: {\n CustomerContextualPrice: adjustedPrice,\n BasePrice: basePrice\n }\n }}\n className='msc-autoSuggest__productResults-item-price'\n freePriceText={props.resources?.freePriceText}\n />\n );\n};\n\nconst _renderThumbnail = (suggestion: SearchSuggestion, altText: string, props: ISearchProductSuggestProps): JSX.Element | null => {\n const {\n autoSuggestProps: {\n context: {\n request: { gridSettings }\n },\n config: { imageSettings }\n }\n } = props;\n if (imageSettings) {\n imageSettings.cropFocalRegion = true;\n }\n\n if (!suggestion || !suggestion.ImageUrl) {\n props.telemetry.error('Search suggestion content is empty, module wont render.');\n return null;\n }\n\n const defaultImageSettings: IImageSettings = {\n viewports: {\n xs: { q: 'w=40&h=40&m=6', w: 0, h: 0 },\n lg: { q: 'w=40&h=40&m=6', w: 0, h: 0 },\n xl: { q: 'w=40&h=40&m=6', w: 0, h: 0 }\n },\n lazyload: true,\n cropFocalRegion: true\n };\n\n return (\n <Image\n requestContext={props.autoSuggestProps.context.actionContext.requestContext}\n altText={altText}\n className='msc-autoSuggest__productResults-item-img'\n src={suggestion.ImageUrl}\n gridSettings={gridSettings!}\n imageSettings={imageSettings ? imageSettings : defaultImageSettings}\n loadFailureBehavior='empty'\n />\n );\n};\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { Autosuggestions } from '@msdyn365-commerce/commerce-entities';\nimport MsDyn365, { getCatalogId, getUrlSync } from '@msdyn365-commerce/core';\nimport { ProductRefiner, ProductRefinerSource, ProductsDataActions } from '@msdyn365-commerce/retail-proxy';\nimport { ArrayExtensions, ObjectExtensions, Random, validateCatalogId } from '@msdyn365-commerce-modules/retail-actions';\nimport { createSearchStateInput } from '@msdyn365-commerce-modules/search-utilities';\nimport { getTelemetryObject, IModuleProps, INodeProps, ITelemetryContent, KeyCodes } from '@msdyn365-commerce-modules/utilities';\nimport classnames from 'classnames';\nimport { debounce } from 'lodash';\nimport { Spinner, SpinnerSize } from 'office-ui-fabric-react';\nimport * as React from 'react';\n\nimport getSearchSuggestionsAction, { AutoSuggestInput, SuggestionType } from './actions/get-auto-suggest-suggestions';\nimport {\n CategorySuggestionsComponent,\n FormComponent,\n ISearchCategoryViewProps,\n ISearchKeywordViewProps,\n ISearchProductViewProps,\n KeywordSuggestionsComponent,\n LabelComponent,\n ProductSuggestionsComponent\n} from './components';\nimport { ISearchData } from './search.data';\nimport { ISearchProps, ISuggestionTypeCriterionData, SuggestionTypeCriterionSuggestionType } from './search.props.autogenerated';\n\nexport interface ISearchState {\n isSearchFormExpanded: boolean;\n searchText: string;\n searchKeywordSuggestClass: string;\n searchProductSuggestClass: string;\n searchCategorySuggestClass: string;\n suggestions: Autosuggestions | undefined;\n searchRefiners?: ProductRefiner[] | undefined;\n autoSuggestAriaLabel: string;\n isInitialState: boolean;\n isLoadingAutoSuggest?: boolean;\n}\n\nexport interface ISearchViewProps extends ISearchProps<ISearchData> {\n Search: IModuleProps;\n AutoSuggestAriaLabel: INodeProps;\n AutoSuggestAriaLabelText: string;\n searchText: string;\n AutoSuggest: INodeProps;\n KeywordSuggest: INodeProps;\n ProductSuggest: INodeProps;\n CategorySuggest: INodeProps;\n SearchForm: INodeProps;\n FormWrapper: INodeProps;\n UlKeyword: INodeProps;\n UlProduct: INodeProps;\n UlCategory: INodeProps;\n label: React.ReactNode;\n form: React.ReactNode;\n autosuggestKeyword?: ISearchKeywordViewProps;\n autosuggestProduct?: ISearchProductViewProps;\n autosuggestCategory?: ISearchCategoryViewProps;\n callbacks: {\n handleCancelSearchChange(): void;\n handleCancelSearchFocused?(): void;\n };\n isSearchFormExpanded: boolean;\n isLoadingAutoSuggest?: boolean;\n isLoadingNode?: React.ReactNode;\n}\n\n/**\n *\n * Search module.\n * @extends {React.Component<ISearchProps<ISearchData>, ISearchState>}\n */\nclass Search extends React.Component<ISearchProps<ISearchData>, ISearchState> {\n private readonly searchTextInput: React.RefObject<HTMLInputElement>;\n\n private readonly searchCollapsedLabel: React.RefObject<HTMLButtonElement>;\n\n private readonly formReference: React.RefObject<HTMLButtonElement>;\n\n private readonly maxChars: number;\n\n private readonly topResultsCount?: number;\n\n private readonly hitPrefix: string = '{';\n\n private readonly hitSuffix: string = '}';\n\n private readonly waitTime: number = 500;\n\n private readonly autoSuggestResultScreenReaderDiv: React.RefObject<HTMLDivElement>;\n\n private readonly autoSuggestResultDiv: React.RefObject<HTMLDivElement>;\n\n private readonly searchFormClass: string;\n\n private readonly searchLabelClass: string;\n\n private readonly telemetryContent: ITelemetryContent;\n\n private loadSuggestionsRequestId?: string;\n\n private inputSuggestionType: ISuggestionTypeCriterionData[];\n\n // @ts-expect-error\n private cancellabelDebounce: debounce;\n\n public constructor(props: ISearchProps<ISearchData>) {\n super(props);\n this.searchTextInput = React.createRef();\n this.searchCollapsedLabel = React.createRef();\n this.autoSuggestResultScreenReaderDiv = React.createRef();\n this.autoSuggestResultDiv = React.createRef();\n this.formReference = React.createRef();\n this.state = {\n isSearchFormExpanded: false,\n searchText: '',\n searchKeywordSuggestClass: 'ms-search__autoSuggest__keyword',\n searchProductSuggestClass: 'ms-search__autoSuggest__product',\n searchCategorySuggestClass: 'ms-search__autoSuggest__category',\n suggestions: undefined,\n searchRefiners: undefined,\n autoSuggestAriaLabel: '',\n isInitialState: true,\n isLoadingAutoSuggest: false\n };\n this.maxChars =\n (this.props.context &&\n this.props.context.app &&\n this.props.context.app.config &&\n this.props.context.app.config.searchInputMaxLength) ||\n 50;\n\n this.inputSuggestionType = [];\n this.topResultsCount = this.props.config && this.props.config.topResultsCount ? this.props.config.topResultsCount : 5;\n this.searchFormClass = 'ms-search__form';\n this.searchLabelClass = 'ms-search__label';\n this.telemetryContent = getTelemetryObject(\n this.props.context.request.telemetryPageName!,\n this.props.friendlyName,\n this.props.telemetry\n );\n\n this._initSuggestionTypes();\n }\n\n public async componentDidMount(): Promise<void> {\n document.body && document.body.addEventListener('mousedown', this._focusOutTarget);\n window && window.addEventListener('keyup', this._keyup);\n }\n\n public componentWillUnmount(): void {\n document.body && document.body.removeEventListener('mousedown', this._focusOutTarget, false);\n window && window.removeEventListener('keyup', this._keyup, false);\n }\n\n public componentDidUpdate(): void {\n const {\n config: { hideSearchLabel }\n } = this.props;\n const { isSearchFormExpanded, isInitialState } = this.state;\n\n if (!this.props.context.request.params.isEditor) {\n if (!hideSearchLabel && isSearchFormExpanded) {\n this.searchTextInput && this.searchTextInput.current && this.searchTextInput.current.focus();\n } else if (!isInitialState) {\n this.searchCollapsedLabel && this.searchCollapsedLabel.current && this.searchCollapsedLabel.current.focus();\n }\n }\n }\n\n public shouldComponentUpdate(nextProps: ISearchProps<ISearchData>, nextState: ISearchState): boolean {\n if (this.state === nextState && this.props === nextProps) {\n return false;\n }\n return true;\n }\n\n // eslint-disable-next-line complexity -- ignore complexity.\n public render(): JSX.Element {\n const {\n context,\n resources: { searchtext, searchLabelArialLabel, cancelBtnAriaLabel, searchBtnAriaLabel, submitBtnAriaLabel },\n config: { hideSearchLabel, disableSubmitSearch, searchplaceholderText, shouldShowFullCategoryPath, className = '' }\n } = this.props;\n\n const {\n isSearchFormExpanded,\n searchText,\n searchKeywordSuggestClass,\n searchProductSuggestClass,\n searchCategorySuggestClass,\n suggestions,\n searchRefiners,\n isLoadingAutoSuggest\n } = this.state;\n\n const searchQsp = (context && context.app && context.app.config && context.app.config.searchQueryStringParameter) || 'q';\n const searchPageURL = getUrlSync('search', context && context.actionContext) || '';\n const searchURL = this._appendQueryParams(searchPageURL, searchText, searchQsp);\n const searchPlaceholder = searchplaceholderText && searchplaceholderText.length > 0 ? searchplaceholderText : 'Search in Fabrikam';\n\n const keywordSuggestions = suggestions?.AllSearchResults?.filter(\n suggestion => suggestion.SuggestionType === SuggestionType.Keyword || suggestion.SuggestionType === SuggestionType.None\n );\n const productSuggestions = suggestions?.AllSearchResults?.filter(\n suggestion => suggestion.SuggestionType === SuggestionType.Product\n );\n const categoryRefiners = searchRefiners?.find(refiner => {\n return refiner.SourceValue === ProductRefinerSource.Category;\n });\n const categorySuggestions = suggestions?.AllSearchResults?.filter(suggestion => {\n if (suggestion.SuggestionType !== SuggestionType.Category) {\n return false;\n }\n const refiner = categoryRefiners?.Values?.find(item => {\n return `${item.RefinerRecordId ?? 0}` === suggestion.Id;\n });\n\n return !ObjectExtensions.isNullOrUndefined(refiner);\n });\n\n const viewProps: ISearchViewProps = {\n ...(this.props as ISearchProps<ISearchData>),\n\n Search: {\n moduleProps: this.props,\n className: `${classnames('ms-search', className)} ${disableSubmitSearch ? 'no-submit' : 'with-submit'}`\n },\n AutoSuggestAriaLabel: {\n tag: 'div',\n className: 'msc-autoSuggest__screen-reader',\n 'aria-live': 'assertive',\n ref: this.autoSuggestResultScreenReaderDiv\n },\n AutoSuggestAriaLabelText: this.state.autoSuggestAriaLabel,\n searchText: this.state.searchText,\n AutoSuggest: {\n ref: this.autoSuggestResultDiv,\n className: 'ms-search__autoSuggest'\n },\n KeywordSuggest: {\n className: searchKeywordSuggestClass\n },\n ProductSuggest: {\n className: searchProductSuggestClass\n },\n CategorySuggest: {\n className: searchCategorySuggestClass\n },\n SearchForm: {\n className: `${this.searchFormClass} ${isSearchFormExpanded ? 'bx-show' : 'bx-hide'}`\n },\n FormWrapper: {\n tag: 'form',\n ref: this.formReference,\n className: 'ms-search__searchForm',\n 'aria-label': 'Search',\n name: 'searchForm',\n role: 'search',\n action: searchURL,\n autoComplete: 'off',\n onSubmit: this._handleSubmit\n },\n UlKeyword: {\n tag: 'ul',\n className: classnames('msc-autoSuggest__keywordResults-items', className)\n },\n UlProduct: {\n tag: 'ul',\n className: classnames('msc-autoSuggest__productResults-items', className)\n },\n UlCategory: {\n tag: 'ul',\n className: classnames('msc-autoSuggest__categoryResults-items', className)\n },\n label: LabelComponent({\n isSearchFormExpanded,\n searchLabelClass: `${this.searchLabelClass} ${isSearchFormExpanded ? 'bx-hide' : 'bx-show'}`,\n searchtext,\n searchLabelArialLabel,\n searchCollapsedLabel: this.searchCollapsedLabel,\n hideSearchLabel,\n handleCancelSearchChange: this._handleCancelSearchChange,\n telemetryContent: this.telemetryContent\n }),\n form: FormComponent({\n ariaLabelCancel: cancelBtnAriaLabel,\n ariaLabelSearch: searchBtnAriaLabel,\n ariaLabelSubmit: submitBtnAriaLabel,\n hideSearchLabel,\n searchTextInput: this.searchTextInput,\n disableSubmitSearch,\n handleInputChange: this._handleInputChange,\n handleCancelSearchChange: this._handleCancelSearchChange,\n maxChars: this.maxChars,\n searchQsp,\n searchPlaceholder,\n query: searchText\n }),\n autosuggestKeyword:\n searchText &&\n searchText.length > 0 &&\n (isLoadingAutoSuggest || (keywordSuggestions && ArrayExtensions.hasElements(keywordSuggestions)))\n ? KeywordSuggestionsComponent({\n searchKeywordSuggestClass,\n searchPageURL,\n searchQsp,\n hitPrefix: this.hitPrefix,\n hitSuffix: this.hitSuffix,\n autoSuggestProps: this.props,\n searchText,\n suggestions: keywordSuggestions,\n telemetryContent: this.telemetryContent\n })\n : undefined,\n autosuggestProduct:\n searchText &&\n searchText.length > 0 &&\n (isLoadingAutoSuggest || (productSuggestions && ArrayExtensions.hasElements(productSuggestions)))\n ? ProductSuggestionsComponent({\n searchProductSuggestClass,\n searchPageURL,\n searchQsp,\n hitPrefix: this.hitPrefix,\n hitSuffix: this.hitSuffix,\n autoSuggestProps: this.props,\n searchText,\n suggestions: productSuggestions,\n telemetry: this.props.telemetry,\n moduleType: this.props.typeName,\n moduleId: this.props.id,\n telemetryContent: this.telemetryContent,\n resources: this.props.resources\n })\n : undefined,\n autosuggestCategory:\n searchText &&\n searchText.length > 0 &&\n (isLoadingAutoSuggest || (categorySuggestions && ArrayExtensions.hasElements(categorySuggestions)))\n ? CategorySuggestionsComponent({\n searchCategorySuggestClass,\n searchPageURL,\n searchQsp,\n hitPrefix: this.hitPrefix,\n hitSuffix: this.hitSuffix,\n autoSuggestProps: this.props,\n searchText,\n suggestions: categorySuggestions,\n searchRefiners,\n telemetryContent: this.telemetryContent,\n shouldShowFullPath: shouldShowFullCategoryPath\n })\n : undefined,\n callbacks: {\n handleCancelSearchChange: this._handleCancelSearchChange,\n handleCancelSearchFocused: this._handleCancelSearchFocused\n },\n isSearchFormExpanded: this.state.isSearchFormExpanded,\n isLoadingAutoSuggest,\n isLoadingNode: this._isLoadingNode()\n };\n\n return this.props.renderView(viewProps) as React.ReactElement;\n }\n\n private _initSuggestionTypes() {\n const suggestionTypes = this.props.config.suggestionTypeCriterion;\n\n const suggestions = ArrayExtensions.unique(ArrayExtensions.validValues(suggestionTypes));\n if (!ArrayExtensions.hasElements(suggestions)) {\n this.inputSuggestionType = [\n { SuggestionType: SuggestionTypeCriterionSuggestionType.keyword },\n { SuggestionType: SuggestionTypeCriterionSuggestionType.product },\n { SuggestionType: SuggestionTypeCriterionSuggestionType.scopedCategory }\n ];\n return;\n }\n\n const validSuggestions = suggestions.filter(suggestion => suggestion.SuggestionType);\n if (ArrayExtensions.hasElements(validSuggestions)) {\n this.inputSuggestionType = validSuggestions;\n return;\n }\n\n this.inputSuggestionType = [];\n }\n\n /**\n * Function to create the ReactNode for loading Autosuggest result.\n * @returns ReachNode for loading Autosuggest result.\n */\n private readonly _isLoadingNode = (): React.ReactNode => {\n const loadingText = this.props.resources.autoSuggestResultLoadingMessage;\n return <Spinner className='msc-autoSuggest__loadingResult' label={loadingText} size={SpinnerSize.medium} labelPosition='right' />;\n };\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private readonly _focusOutTarget = (e: any): void => {\n const { suggestions } = this.state;\n\n if (suggestions && suggestions.AllSearchResults && e.target.closest('.ms-search') === null) {\n this._clearAutoSuggestState();\n }\n };\n\n private readonly _keyup = (e: KeyboardEvent): void => {\n const { suggestions } = this.state;\n\n if (suggestions && suggestions.AllSearchResults && e.keyCode === KeyCodes.Escape) {\n this._clearAutoSuggestState();\n } else if (this.state.isSearchFormExpanded && e.keyCode === KeyCodes.Escape) {\n if (this.state.isSearchFormExpanded) {\n this.setState({ isSearchFormExpanded: false });\n }\n }\n\n if (\n !(\n (this.formReference.current && this.formReference.current.contains((e.target as unknown) as Node)) ||\n (this.autoSuggestResultDiv.current && this.autoSuggestResultDiv.current.contains((e.target as unknown) as Node))\n )\n ) {\n if (suggestions && suggestions.AllSearchResults) {\n this._clearAutoSuggestState();\n }\n\n if (this.state.isSearchFormExpanded) {\n this.setState({ isSearchFormExpanded: false });\n }\n }\n };\n\n private readonly _clearAutoSuggestState = (): void => {\n const {\n context: { actionContext },\n data: { searchState }\n } = this.props;\n\n if (this.searchTextInput.current && this.searchTextInput.current.value.length > 0) {\n searchState.searchText = '';\n searchState.defaultBasicSearchUrl = '';\n searchState.searchQueryStringParameter = '';\n actionContext ? actionContext.update(createSearchStateInput(searchState), searchState) : null;\n this.searchTextInput.current.value = '';\n }\n\n this.setState({ searchText: '', suggestions: undefined, searchRefiners: undefined });\n };\n\n private async _getSearchSuggestions(loadSuggestionsRequestId: string, query: string) {\n try {\n const searchSuggestions = await getSearchSuggestionsAction(\n new AutoSuggestInput(query, this.topResultsCount, this._getSuggestionType(), this.hitPrefix, this.hitSuffix),\n this.props.context.actionContext\n );\n if (loadSuggestionsRequestId !== this.loadSuggestionsRequestId) {\n return undefined;\n }\n return searchSuggestions;\n } catch (error) {\n if (loadSuggestionsRequestId !== this.loadSuggestionsRequestId) {\n return undefined;\n }\n this.setState({ suggestions: undefined, searchRefiners: undefined, autoSuggestAriaLabel: this._setAutoSuggestResultCount() });\n this.props.telemetry.exception(error);\n this.props.telemetry.debug('Unable to get auto suggest results');\n return undefined;\n }\n }\n\n private async _updateSearchRefiners(loadSuggestionsRequestId: string, query: string, suggestions: Autosuggestions | undefined) {\n try {\n const refiners = await this._getSearchRefiners(query);\n if (loadSuggestionsRequestId !== this.loadSuggestionsRequestId) {\n return;\n }\n this.setState({\n suggestions,\n searchRefiners: refiners,\n autoSuggestAriaLabel: this._setAutoSuggestResultCount(suggestions),\n isLoadingAutoSuggest: false\n });\n } catch (error) {\n if (loadSuggestionsRequestId !== this.loadSuggestionsRequestId) {\n return;\n }\n this.setState({ suggestions, searchRefiners: undefined, autoSuggestAriaLabel: this._setAutoSuggestResultCount(suggestions) });\n this.props.telemetry.exception(error);\n this.props.telemetry.debug('Unable to get refiners results');\n }\n }\n\n private _loadSuggestions(query: string) {\n this.cancellabelDebounce = debounce(async () => {\n this.setState({ isLoadingAutoSuggest: true });\n const loadSuggestionsRequestId = Random.Guid.generateGuid();\n this.loadSuggestionsRequestId = loadSuggestionsRequestId;\n const searchSuggestions = await this._getSearchSuggestions(loadSuggestionsRequestId, query);\n await this._updateSearchRefiners(loadSuggestionsRequestId, query, searchSuggestions);\n }, this.waitTime);\n\n setTimeout(() => {\n this.cancellabelDebounce();\n }, 0);\n }\n\n private readonly _handleInputChange = (query: string): void => {\n if (!query || query.length <= this.maxChars) {\n this.setState({ searchText: query });\n }\n\n if (this.cancellabelDebounce) {\n this.cancellabelDebounce.cancel();\n }\n\n const {\n context,\n data: { searchState }\n } = this.props;\n\n if (context) {\n if (query && query.length > 0) {\n if (query.length > this.maxChars) {\n return;\n }\n\n if (ArrayExtensions.hasElements(this.inputSuggestionType)) {\n this._loadSuggestions(query);\n }\n\n searchState.searchText = query;\n } else {\n this.setState({ suggestions: undefined, searchRefiners: undefined });\n searchState.searchText = '';\n }\n context.actionContext.update(createSearchStateInput(searchState), searchState);\n }\n };\n\n private _getSuggestionType(): string {\n const distinctSuggestionTypes: string[] = this.inputSuggestionType.map(\n suggestionTypeItem => suggestionTypeItem.SuggestionType!.charAt(0).toUpperCase() + suggestionTypeItem.SuggestionType!.slice(1)\n );\n return distinctSuggestionTypes.join(',');\n }\n\n private async _getSearchRefiners(searchText: string): Promise<ProductRefiner[]> {\n const { actionContext: ctx } = this.props.context;\n const catalogId = getCatalogId(ctx.requestContext);\n validateCatalogId(catalogId);\n return ProductsDataActions.getProductSearchRefinersAsync(\n { callerContext: ctx },\n {\n SearchCondition: searchText,\n Context: {\n ChannelId: +ctx.requestContext.apiSettings.channelId,\n CatalogId: catalogId\n }\n }\n );\n }\n\n private readonly _handleSubmit = (\n e: React.MouseEvent<HTMLElement> | React.KeyboardEvent<HTMLElement> | React.FormEvent<HTMLFormElement>\n ): void => {\n const {\n config: { disableSubmitSearch },\n context: {\n actionContext,\n app: {\n config: { searchQueryStringParameter }\n }\n }\n } = this.props;\n\n const query = this.searchTextInput.current && this.searchTextInput.current.value;\n e.preventDefault();\n\n if (!query || (query && query.length === 0) || disableSubmitSearch) {\n this.searchTextInput && this.searchTextInput.current && this.searchTextInput.current.focus();\n } else {\n const searchQsp = searchQueryStringParameter || 'q';\n const searchURL = this._appendQueryParams(getUrlSync('search', actionContext) || '', query, searchQsp);\n document.location.href = searchURL;\n }\n };\n\n private readonly _handleCancelSearchChange = (): void => {\n const { isSearchFormExpanded, suggestions } = this.state;\n\n if (!isSearchFormExpanded) {\n this.setState({\n isSearchFormExpanded: true,\n searchText: '',\n isInitialState: false\n });\n } else {\n if (suggestions && suggestions.AllSearchResults) {\n this._clearAutoSuggestState();\n }\n this.setState({ isSearchFormExpanded: false });\n }\n };\n\n private readonly _handleCancelSearchFocused = (): void => {\n const { suggestions } = this.state;\n if (!(suggestions && suggestions.AllSearchResults)) {\n this._clearAutoSuggestState();\n this.setState({ isSearchFormExpanded: false });\n }\n };\n\n private readonly _appendQueryParams = (route: string, query: string, qsp: string): string => {\n if (!MsDyn365.isBrowser) {\n return '';\n }\n\n const queryUrl = new URL(route, window.location.href);\n if (qsp && query) {\n queryUrl.searchParams.set(qsp, query);\n }\n\n return queryUrl.href;\n };\n\n private readonly _setAutoSuggestResultCount = (result?: Autosuggestions) => {\n if (this.autoSuggestResultScreenReaderDiv.current !== null) {\n const ariaLiveRegion = this.autoSuggestResultScreenReaderDiv.current;\n const suggestResultString = this.props.resources.autoSuggestFoundMessage;\n const emptyResultString = this.props.resources.noAutoSuggestionMessage;\n ariaLiveRegion.innerText =\n result && result.AllSearchResults && result.AllSearchResults.length > 0 ? suggestResultString : emptyResultString;\n ariaLiveRegion.setAttribute('aria-live', 'assertive');\n return ariaLiveRegion.innerText;\n }\n return '';\n };\n}\n\nexport default Search;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { INodeProps, Module, Node } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport { ISearchCategoryViewProps, ISearchFormViewProps, ISearchKeywordViewProps, ISearchProductViewProps } from './components';\nimport { ISearchViewProps } from './search';\n\nconst SearchView: React.FC<ISearchViewProps> = props => {\n const {\n Search,\n AutoSuggestAriaLabel,\n AutoSuggestAriaLabelText,\n searchText,\n AutoSuggest,\n KeywordSuggest,\n ProductSuggest,\n CategorySuggest,\n UlKeyword,\n UlProduct,\n UlCategory,\n form,\n autosuggestCategory,\n autosuggestKeyword,\n autosuggestProduct,\n SearchForm,\n FormWrapper,\n label,\n isLoadingAutoSuggest,\n isLoadingNode\n } = props;\n\n return (\n <Module {...Search}>\n {label}\n {_renderForm(form as ISearchFormViewProps, SearchForm, FormWrapper)}\n <Node {...AutoSuggest}>\n {searchText && searchText.length > 0 ? <Node {...AutoSuggestAriaLabel}>{AutoSuggestAriaLabelText}</Node> : ''}\n {_renderKeywordSuggestions(KeywordSuggest, UlKeyword, autosuggestKeyword, isLoadingAutoSuggest, isLoadingNode)}\n {_renderProductSuggestions(ProductSuggest, UlProduct, autosuggestProduct, isLoadingAutoSuggest, isLoadingNode)}\n {_renderCategorySuggestions(CategorySuggest, UlCategory, autosuggestCategory, isLoadingAutoSuggest, isLoadingNode)}\n </Node>\n </Module>\n );\n};\n\nconst _renderForm = (form: ISearchFormViewProps, SearchForm: INodeProps, FormWrapper: INodeProps) => {\n return (\n <Node {...SearchForm}>\n <Node {...FormWrapper}>\n {form.input}\n {form.cancelBtn}\n {form.submitBtn}\n </Node>\n </Node>\n );\n};\n\nconst _renderKeywordSuggestions = (\n KeywordSuggest: INodeProps,\n UlKeyword: INodeProps,\n keywordSuggestions?: ISearchKeywordViewProps,\n isLoadingAutoSuggest?: boolean,\n isLoadingNode?: React.ReactNode\n) => {\n return (\n keywordSuggestions && (\n <Node {...KeywordSuggest}>\n <Node {...UlKeyword}>\n {isLoadingAutoSuggest && isLoadingNode}\n {!isLoadingAutoSuggest &&\n keywordSuggestions.text.map(text => {\n return text;\n })}\n </Node>\n </Node>\n )\n );\n};\n\nconst _renderProductSuggestions = (\n ProductSuggest: INodeProps,\n UlProduct: INodeProps,\n productSuggestions?: ISearchProductViewProps,\n isLoadingAutoSuggest?: boolean,\n isLoadingNode?: React.ReactNode\n) => {\n return (\n productSuggestions && (\n <Node {...ProductSuggest}>\n <Node {...UlProduct}>\n {productSuggestions.title}\n {isLoadingAutoSuggest && isLoadingNode}\n {!isLoadingAutoSuggest &&\n productSuggestions.items.map((item, index) => {\n return (\n <Node {...item.LiProduct} key={item.id || index}>\n <Node {...item.AProduct}>\n {item.thumbnail}\n {item.text}\n {item.price}\n </Node>\n </Node>\n );\n })}\n </Node>\n </Node>\n )\n );\n};\n\nconst _renderCategorySuggestions = (\n CategorySuggest: INodeProps,\n UlCategory: INodeProps,\n categorySuggestions?: ISearchCategoryViewProps,\n isLoadingAutoSuggest?: boolean,\n isLoadingNode?: React.ReactNode\n) => {\n return (\n categorySuggestions && (\n <Node {...CategorySuggest}>\n <Node {...UlCategory}>\n {categorySuggestions.title}\n {isLoadingAutoSuggest && isLoadingNode}\n {!isLoadingAutoSuggest &&\n categorySuggestions.text.map(text => {\n return text;\n })}\n </Node>\n </Node>\n )\n );\n};\n\nexport default SearchView;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { SocialMedia, SocialMediaComponent } from '@msdyn365-commerce/components';\nimport MsDyn365 from '@msdyn365-commerce/core';\nimport { IModuleProps } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport { ISocialShareItemConfig, ISocialShareItemProps, socialMedia } from './social-share-item.props.autogenerated';\n\nexport interface ISocialShareItemViewProps extends ISocialShareItemProps<ISocialShareItemConfig> {\n SocialShareItemElement: React.ReactNode | null;\n SocialShareItem: IModuleProps;\n}\n\n/**\n *\n * SocialShareItem component.\n * @extends {React.PureComponent<ISocialShareItemProps<ISocialShareItemConfig>>}\n */\nclass SocialShareItem extends React.PureComponent<ISocialShareItemProps<ISocialShareItemConfig>> {\n constructor(props: ISocialShareItemProps<ISocialShareItemConfig>) {\n super(props);\n\n this._getSocialShareItem = this._getSocialShareItem.bind(this);\n }\n\n public render(): JSX.Element | null {\n const viewprops = {\n ...this.props,\n SocialShareItem: {\n moduleProps: this.props,\n className: 'ms-social-share-item'\n },\n SocialShareItemElement: this._getSocialShareItem()\n };\n\n return this.props.renderView(viewprops) as React.ReactElement;\n }\n\n private _getSocialShareItem(): React.ReactNode | null {\n const src = this.props.config.icon;\n if (MsDyn365.isBrowser) {\n switch (this.props.config.socialMedia) {\n case socialMedia.facebook:\n return (\n <SocialMediaComponent\n socialMedia={SocialMedia.Facebook}\n postUrl={document.URL}\n context={this.context}\n id={`${this.props.id}_facebook`}\n typeName={this.props.typeName}\n data={{}}\n src={src}\n />\n );\n case socialMedia.twitter:\n return (\n <SocialMediaComponent\n socialMedia={SocialMedia.Twitter}\n postUrl={document.URL}\n context={this.context}\n id={`${this.props.id}_twitter`}\n typeName={this.props.typeName}\n data={{}}\n src={src}\n />\n );\n case socialMedia.pinterest:\n return (\n <SocialMediaComponent\n socialMedia={SocialMedia.Pinterest}\n postUrl={document.URL}\n context={this.context}\n id={`${this.props.id}_pinterest`}\n typeName={this.props.typeName}\n data={{}}\n src={src}\n />\n );\n case socialMedia.linkedin:\n return (\n <SocialMediaComponent\n socialMedia={SocialMedia.Linkedin}\n postUrl={document.URL}\n context={this.context}\n id={`${this.props.id}_linkedin`}\n typeName={this.props.typeName}\n data={{}}\n src={src}\n />\n );\n case socialMedia.mail:\n return (\n <SocialMediaComponent\n socialMedia={SocialMedia.Mail}\n postUrl={document.URL}\n context={this.context}\n id={`${this.props.id}_mail`}\n typeName={this.props.typeName}\n data={{}}\n src={src}\n />\n );\n default:\n return null;\n }\n }\n return null;\n }\n}\n\nexport default SocialShareItem;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { Module } from '@msdyn365-commerce-modules/utilities';\nimport React from 'react';\n\nimport { ISocialShareItemViewProps } from './social-share-item';\n\nexport const SocialShareItemView: React.FC<ISocialShareItemViewProps> = props => {\n const { SocialShareItem, SocialShareItemElement } = props;\n\n if (!SocialShareItemElement) {\n props.context.telemetry.error('Social media is not valid, module wont render');\n return null;\n }\n return <Module {...SocialShareItem}>{SocialShareItemElement}</Module>;\n};\n\nexport default SocialShareItemView;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport * as Msdyn365 from '@msdyn365-commerce/core';\nimport { INodeProps } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport { IAdditionalContentData, ILinksData } from '../video-player.props.autogenerated';\n\n/**\n * IVideoPlayerAdditionalContentProps: Interface for\n * Video Player Additional Content Component props.\n */\nexport interface IVideoPlayerAdditionalContentProps {\n requestContext: Msdyn365.IRequestContext;\n additionalContent: IAdditionalContentData | undefined;\n handleAdditionalTextChange(event: Msdyn365.ContentEditableEvent): void;\n handleAdditionalParagraphChange(event: Msdyn365.ContentEditableEvent): void;\n handleAdditionalLinkTextChange(linkIndex: number, event: Msdyn365.ContentEditableEvent): void;\n}\n\n/**\n * IVideoPlayerAdditionalContentProps: Interface for\n * Video Player Additional Content view props.\n */\nexport interface IVideoPlayerAdditionalContentViewProps {\n additionalContentNode: INodeProps;\n additionalContentItems?: IVideoPlayerAdditionalContentItemViewProps;\n}\n\n/**\n * IVideoPlayerAdditionalContentProps: Interface for\n * Video Player Additional Content Item view props.\n */\nexport interface IVideoPlayerAdditionalContentItemViewProps {\n heading: React.ReactNode;\n text: React.ReactNode;\n links: React.ReactNode;\n additionalContentItemContainer: INodeProps;\n additionalContentItemLinks: INodeProps;\n}\n\n/**\n * Renders additional content heading.\n * @param additionalContentHeading - Additional content heading.\n * @param props - Video Player Additional content component props.\n * @returns Heading Node.\n */\nconst renderHeading = (additionalContentHeading: string, props: IVideoPlayerAdditionalContentProps) => {\n const requestContext = props.requestContext;\n return (\n <Msdyn365.Text\n text={additionalContentHeading}\n tag='p'\n className='ms-video-player__details__additional-content__text'\n editProps={{\n /**\n * On edit event for heading text change.\n * @param event - Change event.\n */\n onEdit: event => {\n props.handleAdditionalTextChange(event);\n },\n requestContext\n }}\n />\n );\n};\n\n/**\n * Renders additional content heading.\n * @param additionalContentParagraphText - Additional content paragraph text.\n * @param props - Video Player Additional content component props.\n * @returns Paragraph Node.\n */\nconst renderParagraph = (additionalContentParagraphText: string, props: IVideoPlayerAdditionalContentProps) => {\n const requestContext = props.requestContext;\n return (\n <Msdyn365.Text\n text={additionalContentParagraphText}\n tag='p'\n className='ms-video-player__details__additional-content__paragraph'\n editProps={{\n /**\n * On edit event for heading text change.\n * @param event - Change event.\n */\n onEdit: event => {\n props.handleAdditionalParagraphChange(event);\n },\n requestContext\n }}\n />\n );\n};\n\n/**\n * Renders additional content heading.\n * @param ctaLink - Additional content link.\n * @param props - Video Player Additional content component props.\n * @param linkIndex - Additional content link index.\n * @returns Link Node.\n */\nconst renderLinks = (ctaLink: ILinksData, props: IVideoPlayerAdditionalContentProps, linkIndex: number) => {\n const editableLink: Msdyn365.ILinksData = {\n ariaLabel: ctaLink.ariaLabel,\n className: 'ms-video-player__details__additional-content__cta__links',\n linkText: ctaLink.linkText,\n linkUrl: ctaLink.linkUrl.destinationUrl,\n openInNewTab: ctaLink.openInNewTab,\n role: 'link'\n };\n const requestContext = props.requestContext;\n return (\n <Msdyn365.Link\n key={linkIndex}\n link={editableLink}\n editProps={{\n /**\n * Handle additional Link Text change.\n * @param event - The keyboard event.\n */\n onTextChange: event => {\n props.handleAdditionalLinkTextChange(linkIndex, event);\n },\n requestContext\n }}\n />\n );\n};\n\n/**\n * Create node for each additonal content item.\n * @param item - Video Player additonal content item props.\n * @param props - Video Player Additional content component props.\n * @returns IVideoPlayerAdditionalContentItemViewProps.\n */\nconst getAdditionalContentItems = (\n item: IAdditionalContentData,\n props: IVideoPlayerAdditionalContentProps\n): IVideoPlayerAdditionalContentItemViewProps => {\n const headingNode = item.heading && renderHeading(item.heading, props);\n const paragraphNode = item.subtext && renderParagraph(item.subtext, props);\n const linksNode = item.links?.map((ctaLink: ILinksData, index: number) => {\n return renderLinks(ctaLink, props, index);\n });\n\n return {\n heading: headingNode,\n text: paragraphNode,\n links: linksNode,\n additionalContentItemContainer: { className: 'ms-video-player__details__additional-content__container' },\n additionalContentItemLinks: { className: 'ms-video-player__details__additional-content__cta' }\n };\n};\n\n/**\n * VideoPlayerAdditionalContent component.\n * @param props - Video Player Additional content component props.\n * @returns Video Player Additional content view props.\n */\nexport const videoPlayerAdditionalContent = (\n props: IVideoPlayerAdditionalContentProps\n): IVideoPlayerAdditionalContentViewProps | undefined => {\n const { additionalContent } = props;\n if (!additionalContent) {\n return undefined;\n }\n\n const reactNodes: IVideoPlayerAdditionalContentItemViewProps = getAdditionalContentItems(additionalContent, props);\n return {\n additionalContentNode: { className: 'ms-video-player__details__additional-content' },\n additionalContentItems: reactNodes\n };\n};\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { IPlayerData, IPlayerOptions, IPlayerResources, IVideoMetadata, Player } from '@msdyn365-commerce/components';\nimport * as MsDyn365 from '@msdyn365-commerce/core';\nimport {\n getPayloadObject,\n getTelemetryAttributes,\n getTelemetryObject,\n INodeProps,\n isMobile,\n ITelemetryContent,\n VariantType\n} from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport { IVideoPlayerAdditionalContentViewProps, videoPlayerAdditionalContent } from './components/additional-content';\nimport { ILinksData, IVideoPlayerConfig, IVideoPlayerProps } from './video-player.props.autogenerated';\n\nexport interface IVideoPlayerViewProps extends IVideoPlayerProps<{}> {\n player: React.ReactNode;\n title?: React.ReactNode;\n text?: React.ReactNode;\n links?: React.ReactNode;\n detailsContainer?: INodeProps;\n detailsContainerCta?: INodeProps;\n additionalContent?: IVideoPlayerAdditionalContentViewProps;\n handleText?(): void;\n handleParagraph?(): void;\n handleAdditionalText?(): void;\n handleAdditionalParagraph?(): void;\n handleLink?(): void;\n handleAdditionalLink?(): void;\n}\n\n/**\n *\n * VideoPlayer component.\n * @extends {React.PureComponent<IVideoPlayerProps<IVideoPlayerData>>}\n */\nclass VideoPlayer extends React.PureComponent<IVideoPlayerProps<IVideoPlayerConfig>> {\n private readonly telemetryContent: ITelemetryContent;\n\n private readonly isMobileDevice: boolean;\n\n public constructor(props: IVideoPlayerProps<IVideoPlayerConfig>) {\n super(props);\n this.isMobileDevice = isMobile({ variant: VariantType.Viewport, context: this.props.context.request }) === 'xs';\n this.telemetryContent = getTelemetryObject(\n this.props.context.request.telemetryPageName!,\n this.props.friendlyName,\n this.props.telemetry\n );\n }\n\n public render(): JSX.Element {\n const options = {\n ...this.props.config,\n isMobileDevice: this.isMobileDevice\n };\n const video: MsDyn365.IVideoData = this.props.config.video;\n const playerResources: IPlayerResources = {\n playAriaLabel: this.props.resources.playLabel,\n pauseAriaLabel: this.props.resources.pauseLabel,\n playingAriaLabel: this.props.resources.playingLabel,\n pausedAriaLabel: this.props.resources.pausedLabel,\n muteAriaLabel: this.props.resources.muteLabel,\n unMuteAriaLabel: this.props.resources.unMuteLabel,\n fullScreenAriaLabel: this.props.resources.fullScreenLabel,\n exitFullScreenAriaLabel: this.props.resources.exitFullScreenLabel,\n seekBarLabel: this.props.resources.seekBarLabel,\n videoTimeDurationLabel: this.props.resources.videoTimeDurationLabel,\n closedCaptionLabel: this.props.resources.closedCaptionLabel\n };\n const videoMetaData: IVideoMetadata = {};\n\n if (video) {\n videoMetaData.videoId = video.id;\n videoMetaData.title = video.title;\n videoMetaData.duration = video.playTime;\n\n if (video.thumbnail) {\n videoMetaData.posterframeUrl = video.thumbnail.src;\n }\n\n if (video._links?.binaryReferences) {\n videoMetaData.videoBinaryReferences = video._links.binaryReferences;\n }\n }\n const videoPlayerData: IPlayerData = { options: options as IPlayerOptions, metaData: videoMetaData };\n const viewProps = {\n // Context for telemetry and raw data for C1 to do customization\n // Including computed data, state data and methods\n ...this.props,\n\n player: (\n <MsDyn365.Video className='' editProps={{ key: this.props.config.video, requestContext: this.props.context.request }}>\n <Player\n playerData={videoPlayerData}\n playerResources={playerResources}\n telemetryContent={this.telemetryContent}\n isEditor={this.props.context.request.params.isEditor}\n />\n </MsDyn365.Video>\n ),\n title: this._getVideoDetailsHeading(),\n text: this._getVideoDetailsParagraph(),\n links: this._getVideoDetailsLinks(),\n detailsContainer: { className: 'ms-video-player__details' },\n detailsContainerCTA: { className: 'ms-video-player__details__cta' },\n additionalContent: videoPlayerAdditionalContent({\n requestContext: this.props.context.request,\n additionalContent: this.props.config.additionalContent,\n handleAdditionalTextChange: this.handleAdditionalTextChange,\n handleAdditionalParagraphChange: this.handleAdditionalParagraphChange,\n handleAdditionalLinkTextChange: this.handleAdditionalLinkTextChange\n }),\n handleText: this.handleTextChange,\n handleParagraph: this.handleParagraphChange,\n handleAdditionalText: this.handleAdditionalTextChange,\n handleAdditionalParagraph: this.handleAdditionalParagraphChange,\n handleLink: this.handleLinkTextChange,\n handleAdditionalLink: this.handleAdditionalTextChange\n };\n return this.props.renderView(viewProps) as React.ReactElement;\n }\n\n /**\n * Handle link text change.\n * @param linkIndex - The link index.\n * @param event - The dialog that is allowed to remain open.\n */\n public handleLinkTextChange(linkIndex: number, event: MsDyn365.ContentEditableEvent): void {\n if (this.props.config.links && this.props.config.links[Number(linkIndex)]) {\n this.props.config.links[Number(linkIndex)].linkText = event.target.value;\n }\n }\n\n /**\n * Handle text change.\n * @param event - The dialog that is allowed to remain open.\n */\n public handleTextChange = (event: MsDyn365.ContentEditableEvent): void => {\n this.props.config.heading!.text = event.target.value;\n };\n\n /**\n * Handle paragraph change.\n * @param event - The dialog that is allowed to remain open.\n */\n public handleParagraphChange = (event: MsDyn365.ContentEditableEvent): void => {\n this.props.config.paragraph = event.target.value;\n };\n\n /**\n * Handle additional text change.\n * @param event - The dialog that is allowed to remain open.\n */\n public handleAdditionalTextChange(event: MsDyn365.ContentEditableEvent): void {\n if (this.props.config.additionalContent) {\n this.props.config.additionalContent.heading = event.target.value;\n }\n }\n\n /**\n * Handle additional link text change.\n * @param linkIndex - The link index.\n * @param event - The dialog that is allowed to remain open.\n */\n public handleAdditionalLinkTextChange(linkIndex: number, event: MsDyn365.ContentEditableEvent): void {\n const additionalContent = this.props.config.additionalContent ?? {};\n if (additionalContent.links) {\n additionalContent.links[Number(linkIndex)].linkText = event.target.value;\n }\n }\n\n /**\n * Handle additional paragraph change.\n * @param event - The dialog that is allowed to remain open.\n */\n public handleAdditionalParagraphChange(event: MsDyn365.ContentEditableEvent): void {\n if (this.props.config.additionalContent) {\n this.props.config.additionalContent.subtext = event.target.value;\n }\n }\n\n /**\n * Get video details links.\n * @returns - React node.\n */\n private _getVideoDetailsLinks(): React.ReactNode[] | undefined {\n const { links } = this.props.config;\n const payLoad = getPayloadObject('click', this.telemetryContent, '');\n\n return links?.map((linkData: ILinksData, index: number) => {\n payLoad.contentAction.etext = linkData.linkText;\n const attributes = getTelemetryAttributes(this.telemetryContent, payLoad);\n const linkId = index;\n const editableLink: MsDyn365.ILinksData = {\n ariaLabel: linkData.ariaLabel,\n className: 'ms-video-player__details__cta__link',\n linkText: linkData.linkText,\n linkUrl: linkData.linkUrl.destinationUrl,\n openInNewTab: linkData.openInNewTab,\n role: 'button',\n additionalProperties: attributes\n };\n\n return (\n <MsDyn365.Link\n key={linkId}\n link={editableLink}\n editProps={{\n /**\n * Handle additional paragraph change.\n * @param event - The keyboard event.\n */\n onTextChange: event => {\n this.handleLinkTextChange(index, event);\n },\n requestContext: this.props.context.request\n }}\n />\n );\n });\n }\n\n private _getVideoDetailsHeading(): React.ReactNode | undefined {\n const { heading } = this.props.config;\n\n return (\n heading && (\n <MsDyn365.Text\n className='ms-video-player__details__title'\n tag={heading.tag ?? 'h1'}\n text={heading.text}\n editProps={{ onEdit: this.handleTextChange, requestContext: this.props.context.request }}\n />\n )\n );\n }\n\n private _getVideoDetailsParagraph(): React.ReactNode | undefined {\n const { paragraph } = this.props.config;\n\n return (\n paragraph && (\n <MsDyn365.RichTextComponent\n text={paragraph}\n className='ms-video-player__details__text'\n editProps={{ onEdit: this.handleParagraphChange, requestContext: this.props.context.request }}\n />\n )\n );\n }\n}\n\nexport default VideoPlayer;\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 { IVideoPlayerAdditionalContentViewProps, IVideoPlayerViewProps } from './index';\n\n/**\n * Render Additional Content.\n * @param additionalContent - Additional content view props.\n * @returns JSX Element.\n */\nconst renderAdditionalContent = (additionalContent: IVideoPlayerAdditionalContentViewProps) => {\n if (additionalContent.additionalContentItems) {\n return (\n <Node {...additionalContent.additionalContentNode}>\n <>\n {additionalContent.additionalContentItems.heading}\n <Node {...additionalContent.additionalContentItems.additionalContentItemContainer}>\n {additionalContent.additionalContentItems.text}\n <Node {...additionalContent.additionalContentItems.additionalContentItemLinks}>\n {additionalContent.additionalContentItems.links}\n </Node>\n </Node>\n </>\n </Node>\n );\n }\n\n return null;\n};\n\nconst VideoPlayerView: React.FC<IVideoPlayerViewProps> = props => {\n return (\n <div id={props.id} className='ms-video-player' {...props.renderModuleAttributes(props)}>\n {props.player}\n <Node {...props.detailsContainer} className={props.detailsContainer ? props.detailsContainer.className : ''}>\n {props.title}\n {props.text}\n {props.additionalContent && renderAdditionalContent(props.additionalContent)}\n <Node {...props.detailsContainerCta} className={props.detailsContainerCta ? props.detailsContainerCta.className : ''}>\n {props.links}\n </Node>\n </Node>\n </div>\n );\n};\n\nexport default VideoPlayerView;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport * as React from 'react';\n\nexport interface IWishlistItemDimension {\n key: string;\n className?: string;\n dimensionType: string;\n dimensionValue: string;\n}\n\nexport const WishlistItemDimension: React.FC<IWishlistItemDimension> = ({ key, className, dimensionType, dimensionValue }) => (\n <div key={key} className={className}>\n <span className='msc-wishlist-dimension__label'>{dimensionType}:</span>\n <span className='msc-wishlist-dimension__value'>{dimensionValue}</span>\n </div>\n);\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { PriceComponent } from '@msdyn365-commerce/components';\nimport { IAny, ICoreContext, IGeneric, IImageSettings, Image, ITelemetry, msdyn365Commerce } from '@msdyn365-commerce/core';\nimport {\n CommerceListLine,\n ProductPrice,\n ReleasedProductType,\n SimpleProduct\n} from '@msdyn365-commerce/retail-proxy/dist/Entities/CommerceTypes.g';\nimport {\n convertProductDimensionTypeToDimensionTypes,\n getFallbackImageUrl,\n StringExtensions\n} from '@msdyn365-commerce-modules/retail-actions';\nimport { Alert, Button, getPayloadObject, getTelemetryAttributes, ITelemetryContent } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport { IWishlistItemActionMessageState } from '../wishlist-items';\nimport { WishlistItemDimension } from './wishlist-items-dimensions';\n\nexport interface IWishlistItemProps extends CommerceListLine {\n product: SimpleProduct;\n wishlistState: IWishlistItemActionMessageState;\n price?: ProductPrice;\n context: ICoreContext<IGeneric<IAny>>;\n productUrl: string;\n imageSettings?: IImageSettings;\n removeFromWishlistText: string;\n isInStock: boolean;\n addToCartText: string;\n outOfStockText: string;\n index: number;\n itemKey: string;\n telemetry: ITelemetry;\n moduleId: string;\n moduleTypeName: string;\n enableImageProductLink?: boolean;\n inventoryInformationLabel?: string;\n inventoryLabelClassName?: string;\n telemetryContent?: ITelemetryContent;\n handlers: {\n onAddToCart(product: SimpleProduct, itemKey: string): void;\n onRemoveItem(productId: number): void | undefined;\n onDismiss(): void;\n };\n resources: {\n productDimensionTypeColor: string;\n productDimensionTypeSize: string;\n productDimensionTypeStyle: string;\n originalPriceText: string;\n currentPriceText: string;\n freePriceText: string;\n };\n}\n\nexport interface IWishlistItemViewProps {\n key: string;\n productImage: React.ReactNode;\n productLink: React.ReactNode;\n productDimensions?: React.ReactNode[];\n productPrice?: React.ReactNode;\n addToCartButton?: React.ReactNode;\n removeButton?: React.ReactNode;\n productStatusMessage?: React.ReactNode;\n productName?: React.ReactNode;\n productAriaLabel?: string;\n entireProductLink?: string;\n inventoryInformation?: React.ReactNode;\n productUnitOfMeasure?: React.ReactNode;\n}\n\nconst _addItemToCart = (props: IWishlistItemProps): void => {\n const { product, itemKey, handlers } = props;\n const { onAddToCart } = handlers;\n\n onAddToCart && product && itemKey && onAddToCart(product, itemKey);\n};\n\nconst _removeItemFromWishlist = (props: IWishlistItemProps): void => {\n const { onRemoveItem } = props.handlers;\n const { RecordId } = props.product;\n\n onRemoveItem && RecordId && onRemoveItem(RecordId);\n};\n\nconst WishListItemActions = {\n addToCart: _addItemToCart,\n removeItem: _removeItemFromWishlist\n};\n\nconst _getFullProductLink = (props: IWishlistItemProps): string => {\n if (!msdyn365Commerce.isBrowser) {\n return '';\n }\n\n const fullUrl = new URL(props.productUrl, window.location.href);\n for (const dimension of props.product.Dimensions ?? []) {\n const dimensionValue = dimension.DimensionValue?.Value;\n if (!StringExtensions.isNullOrWhitespace(dimensionValue)) {\n const dimensionName = convertProductDimensionTypeToDimensionTypes(dimension.DimensionTypeValue);\n fullUrl.searchParams.set(dimensionName, dimensionValue!);\n }\n }\n return fullUrl.href;\n // return updateProductUrl(productUrl, context, swatch);\n};\n\nconst _renderAriaLabel = (props: IWishlistItemProps): string => {\n const { product, price, context, resources } = props;\n\n const { Name, Dimensions } = product;\n const { productDimensionTypeColor, productDimensionTypeSize, productDimensionTypeStyle } = resources;\n\n let formattedPrice = 'Free';\n let dimensions = null;\n\n if (price) {\n formattedPrice =\n price.BasePrice === 0 ? resources.freePriceText : context.cultureFormatter.formatCurrency(price.BasePrice!, price.CurrencyCode);\n }\n\n if (Dimensions) {\n dimensions = Dimensions.map(productDimension => {\n switch (productDimension.DimensionTypeValue) {\n case 1:\n return `${productDimensionTypeColor}${productDimension.DimensionValue && productDimension.DimensionValue.Value}`;\n case 3:\n return `${productDimensionTypeSize}${productDimension.DimensionValue && productDimension.DimensionValue.Value}`;\n case 4:\n return `${productDimensionTypeStyle}${productDimension.DimensionValue && productDimension.DimensionValue.Value}`;\n default:\n return '';\n }\n });\n }\n\n return `${Name} ${formattedPrice} ${(dimensions && dimensions.join('')) || ''}`;\n};\n\n/**\n * Renders a link to a product based on the given props.\n * @param input - Wishlist item props with the info about the product.\n * @param productUrl - The url to the product.\n * @returns React component with a link to a product.\n */\nconst renderProductLink = (input: IWishlistItemProps, productUrl: string) => {\n const { telemetryContent } = input;\n const { RecordId: recordId, Name: productName } = input.product;\n const payLoad = getPayloadObject('click', telemetryContent!, '', recordId.toString());\n const productAttributes = getTelemetryAttributes(telemetryContent!, payLoad);\n const productPageUrlWithSwatch = productUrl;\n return (\n !StringExtensions.isNullOrWhitespace(productPageUrlWithSwatch) && (\n <a\n href={productPageUrlWithSwatch}\n className='ms-wishlist-items__product-link'\n {...productAttributes}\n aria-label={_renderAriaLabel(input)}\n >\n {productName}\n </a>\n )\n );\n};\n\n/**\n * Renders a product name box.\n * @param productName - The text to display.\n * @returns React component with a name of a product.\n */\nconst renderProductName = (productName: string) => {\n return <div className='ms-wishlist-items__product-title'>{productName}</div>;\n};\n\n/**\n * Renders inventory information.\n * @param inventoryInformationLabel - The text to display.\n * @param inventoryLabelClassName - The component class name.\n * @returns React component.\n */\nconst renderInventoryInformationLabel = (inventoryInformationLabel: string | undefined, inventoryLabelClassName: string | undefined) => {\n const inventoryCssName = inventoryLabelClassName\n ? `ms-wishlist-items__inventory-label ${inventoryLabelClassName}`\n : 'ms-wishlist-items__inventory-label';\n return (\n !StringExtensions.isNullOrWhitespace(inventoryInformationLabel) && (\n <span className={inventoryCssName}>{inventoryInformationLabel}</span>\n )\n );\n};\n\n/**\n * Renders add to cart button.\n * @param input - Wishlist item props with the configuration.\n * @returns React component.\n */\nconst WishlistItemAddToCartButtonComponent = (input: IWishlistItemProps) => {\n const { isInStock, addToCartText, outOfStockText } = input;\n\n // Check if the product is service or not by product type.\n const isServiceItem = input.product.ItemTypeValue === ReleasedProductType.Service;\n\n const addItemAction = React.useCallback(() => {\n WishListItemActions.addToCart(input);\n }, [input]);\n\n return (\n <Button\n className='ms-wishlist-items__product-add-button'\n title={((isServiceItem || isInStock) && addToCartText) || outOfStockText}\n onClick={addItemAction}\n disabled={!(isServiceItem || isInStock)}\n >\n {((isServiceItem || isInStock) && addToCartText) || outOfStockText}\n </Button>\n );\n};\n\n/**\n * Renders remove from wishlist button.\n * @param input - Wishlist item props with the configuration.\n * @returns React component.\n */\nconst WishlistItemRemoveFromWishlistButtonComponent = (input: IWishlistItemProps) => {\n const { removeFromWishlistText } = input;\n\n const removeItemAction = React.useCallback(() => {\n WishListItemActions.removeItem(input);\n }, [input]);\n\n return <button className='ms-wishlist-items__product-remove-button' aria-label={removeFromWishlistText} onClick={removeItemAction} />;\n};\n\n/**\n * Gets the react node for product unit of measure display.\n * @param context - Module context.\n * @param unitOfMeasure - Product unit of measure.\n * @returns The node representing markup for unit of measure component.\n */\nconst renderUnitOfMeasure = (context: ICoreContext<IGeneric<IAny>>, unitOfMeasure?: string) => {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access -- Do not need type check for appsettings\n if (context.app.config && (!context.app.config.unitOfMeasureDisplayType || context.app.config.unitOfMeasureDisplayType === 'none')) {\n return undefined;\n }\n\n if (!unitOfMeasure) {\n return undefined;\n }\n\n return (\n <div className='msc-wishlistitems__product-unit-of-measure'>\n <span>{unitOfMeasure}</span>\n </div>\n );\n};\n\nexport const WishlistItem = (input: IWishlistItemProps): IWishlistItemViewProps | null => {\n const {\n product,\n price,\n context,\n imageSettings,\n wishlistState,\n itemKey,\n handlers,\n inventoryInformationLabel,\n enableImageProductLink,\n inventoryLabelClassName\n } = input;\n\n if (!product) {\n return null;\n }\n\n const { RecordId, Name, PrimaryImageUrl, Dimensions } = product;\n if (product.RecordId) {\n const fallbackImage = getFallbackImageUrl(\n product.ItemId,\n context.actionContext.requestContext.apiSettings,\n context.request.app?.config?.OmniChannelMedia\n );\n const productUrl = _getFullProductLink(input);\n const productImage =\n Name &&\n _renderProductImage(\n context,\n product.Name!,\n PrimaryImageUrl === undefined ? fallbackImage : PrimaryImageUrl,\n fallbackImage,\n imageSettings\n );\n return {\n key: `${RecordId}-item`,\n productImage,\n productLink: renderProductLink(input, productUrl),\n productDimensions: Dimensions && _renderProductDimensions(input),\n productPrice: price && _renderPrice(input),\n productUnitOfMeasure: product.DefaultUnitOfMeasure && renderUnitOfMeasure(context, product.DefaultUnitOfMeasure),\n entireProductLink: enableImageProductLink ? productUrl : undefined,\n productAriaLabel: enableImageProductLink ? _renderAriaLabel(input) : undefined,\n productName: enableImageProductLink && Name && renderProductName(Name),\n\n addToCartButton: <WishlistItemAddToCartButtonComponent {...input} />,\n inventoryInformation: renderInventoryInformationLabel(inventoryInformationLabel, inventoryLabelClassName),\n removeButton: <WishlistItemRemoveFromWishlistButtonComponent {...input} />,\n productStatusMessage: wishlistState &&\n wishlistState.isOpen &&\n wishlistState.productId === RecordId &&\n wishlistState.itemKey === itemKey && (\n <div className='ms-wishlist-items__product-status'>\n <Alert color={wishlistState.statusCssString} isOpen={wishlistState.isOpen} toggle={handlers.onDismiss}>\n <span>{wishlistState.userMessage}</span>\n </Alert>\n </div>\n )\n };\n }\n return null;\n};\n\nconst _renderProductImage = (\n context: ICoreContext,\n heading: string,\n image?: string,\n fallbackImage?: string,\n imageSettings?: IImageSettings\n): JSX.Element | null => {\n const defaultImageSettings: IImageSettings = {\n viewports: {\n xs: { q: 'w=315&h=315&m=6', w: 0, h: 0 },\n lg: { q: 'w=315&h=315&m=6', w: 0, h: 0 },\n xl: { q: 'w=315&h=315&m=6', w: 0, h: 0 }\n },\n lazyload: true,\n cropFocalRegion: true\n };\n\n if (imageSettings) {\n imageSettings.cropFocalRegion = true;\n }\n\n if (image) {\n return (\n <Image\n requestContext={context.actionContext.requestContext}\n className='ms-wishlist-items__product-image'\n altText={heading}\n title={heading}\n src={image}\n fallBackSrc={fallbackImage}\n gridSettings={context.request.gridSettings!}\n imageSettings={imageSettings || defaultImageSettings}\n loadFailureBehavior='empty'\n />\n );\n }\n return null;\n};\n\nconst _renderPrice = (props: IWishlistItemProps): JSX.Element | null => {\n const { price, context, moduleId, moduleTypeName, resources } = props;\n\n if (price) {\n return (\n <PriceComponent\n id={moduleId}\n typeName={moduleTypeName}\n data={{ price }}\n className='ms-wishlist-items__product-price'\n freePriceText={resources.freePriceText}\n originalPriceText={resources.originalPriceText}\n currentPriceText={resources.currentPriceText}\n context={context}\n />\n );\n }\n return null;\n};\n\nconst _renderProductDimensions = (props: IWishlistItemProps): (React.ReactNode | undefined)[] => {\n const { product, resources } = props;\n\n if (!product || !product.Dimensions) {\n return [];\n }\n\n return product.Dimensions.map((dimension, index) => {\n if (!dimension.DimensionValue || !dimension.DimensionValue.Value) {\n return undefined;\n }\n\n let type = '';\n\n switch (dimension.DimensionTypeValue) {\n case 1: {\n type = resources.productDimensionTypeColor;\n break;\n }\n case 3: {\n type = resources.productDimensionTypeSize;\n break;\n }\n case 4: {\n type = resources.productDimensionTypeStyle;\n break;\n }\n default:\n return undefined;\n }\n\n return (\n <WishlistItemDimension\n key={`${product.RecordId}-dimensions-${index}`}\n className='msc-price ms-wishlist-items__product-dimension'\n dimensionType={type}\n dimensionValue={dimension.DimensionValue.Value}\n />\n );\n });\n};\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport classnames from 'classnames';\nimport * as React from 'react';\n\nimport { wishlistStatus } from '../wishlist-items';\n\nexport interface IWishlistItemsStatusMessageProps {\n className?: string;\n errorType: wishlistStatus;\n text?: string;\n}\n\nexport const WishlistItemsStatusMessage: React.FC<IWishlistItemsStatusMessageProps> = ({ className, errorType, text }) => {\n switch (errorType) {\n case 'EMPTY':\n return <p className={classnames('ms-wishlist-items__message-empty', className)}>{text}</p>;\n case 'FAILED':\n return <p className={classnames('ms-wishlist-items__message-failed', className)}>{text}</p>;\n case 'LOADING':\n default:\n return <p className={className ? 'ms-wishlist-items__message-exists-product' : 'ms-wishlist-items__message-waiting'}>{text}</p>;\n }\n};\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { FullProduct } from '@msdyn365-commerce/commerce-entities';\nimport * as MsDyn365 from '@msdyn365-commerce/core';\nimport { AsyncResult, CommerceList, CommerceListLine, SimpleProduct } from '@msdyn365-commerce/retail-proxy';\nimport { createGetByCustomerInput, removeLinesAsync } from '@msdyn365-commerce/retail-proxy/dist/DataActions/CommerceListsDataActions.g';\nimport { getDeliveryOptionsAsync } from '@msdyn365-commerce/retail-proxy/dist/DataActions/ProductsDataActions.g';\nimport {\n ArrayExtensions,\n getProductUrlSync,\n IProductInventoryInformation,\n QueryResultSettingsProxy\n} from '@msdyn365-commerce-modules/retail-actions';\nimport {\n getTelemetryObject,\n IModuleProps,\n INodeProps,\n ITelemetryContent,\n updateMaxQuantityForCartLineItem\n} from '@msdyn365-commerce-modules/utilities';\nimport classnames from 'classnames';\nimport { observer } from 'mobx-react';\nimport * as React from 'react';\n\nimport getItemsInWishlists, { ActiveWishlistInput } from './actions/get-items-in-wishlists';\nimport { IWishlistItemViewProps, WishlistItem, WishlistItemsStatusMessage } from './components';\nimport { IWishlistItemsData } from './wishlist-items.data';\nimport { IHeadingData, IWishlistItemsProps } from './wishlist-items.props.autogenerated';\n\nexport interface IWishlistItemActionMessageState {\n productId: number;\n itemKey: string;\n userMessage: string;\n statusCssString: string;\n messageGlyph: string;\n isOpen: boolean;\n isError: boolean;\n}\n\nexport type wishlistStatus = 'LOADING' | 'SUCCESS' | 'FAILED' | 'EMPTY';\n\nexport interface IWishlistItemsViewProps extends IWishlistItemsProps<IWishlistItemsData> {\n WishlistItems: IModuleProps;\n status?: wishlistStatus;\n statusMessage?: React.ReactNode;\n heading?: React.ReactNode;\n Products?: INodeProps;\n Product?: INodeProps;\n ProductDetails?: INodeProps;\n ProductDimensions?: INodeProps;\n products?: IWishlistItemViewProps[];\n telemetryContent?: ITelemetryContent;\n statusNotExistsMessage?: React.ReactNode;\n}\n\n/**\n *\n * WishlistItems component.\n * @extends {React.PureComponent<IWishlistItemsProps<IWishlistItemsData>, IWishlistItemActionMessageState>}\n */\n@observer\nclass WishlistItems extends React.Component<IWishlistItemsProps<IWishlistItemsData>, IWishlistItemActionMessageState> {\n private readonly telemetryContent: ITelemetryContent;\n constructor(props: IWishlistItemsProps<IWishlistItemsData>) {\n super(props);\n this.telemetryContent = getTelemetryObject(\n this.props.context.request.telemetryPageName!,\n this.props.friendlyName,\n this.props.telemetry\n );\n }\n\n public async componentDidMount(): Promise<void> {\n this.setState({ isError: false });\n }\n\n public shouldComponentUpdate(nextProps: IWishlistItemsProps<IWishlistItemsData>, nextState: IWishlistItemActionMessageState): boolean {\n if (this.state === nextState && this.props.data === nextProps.data) {\n return false;\n }\n return true;\n }\n\n public render(): JSX.Element | null {\n const { heading, className } = this.props.config;\n const { emptyWishlistText, wishlistErrorGettingWishlist, noLongerExitsWishlistItemText } = this.props.resources;\n const { cart, productAvailability, wishlists, products } = this.props.data;\n\n if (cart.status === 'LOADING' || productAvailability.status === 'LOADING' || wishlists.status === 'LOADING') {\n const errorProps: IWishlistItemsViewProps = {\n ...(this.props as IWishlistItemsProps<IWishlistItemsData>),\n WishlistItems: {\n moduleProps: this.props,\n className: classnames('ms-wishlist-items', className)\n },\n status: 'LOADING',\n\n statusMessage: <WishlistItemsStatusMessage errorType='LOADING' text='Loading...' />,\n heading: this._renderHeading(heading)\n };\n return this.props.renderView(errorProps);\n }\n\n if (cart.status === 'FAILED' || productAvailability.status === 'FAILED' || wishlists.status === 'FAILED') {\n const errorProps: IWishlistItemsViewProps = {\n ...(this.props as IWishlistItemsProps<IWishlistItemsData>),\n WishlistItems: {\n moduleProps: this.props,\n className: classnames('ms-wishlist-items', className)\n },\n status: 'FAILED',\n statusMessage: <WishlistItemsStatusMessage errorType='FAILED' text={wishlistErrorGettingWishlist} />,\n heading: this._renderHeading(heading)\n };\n\n return this.props.renderView(errorProps);\n }\n\n const productsList = products && (products as AsyncResult<FullProduct[]>).result;\n\n if (productsList && productsList.length === 0) {\n const emptyViewProps: IWishlistItemsViewProps = {\n ...(this.props as IWishlistItemsProps<IWishlistItemsData>),\n WishlistItems: {\n moduleProps: this.props,\n className: classnames('ms-wishlist-items', className)\n },\n status: 'EMPTY',\n statusMessage: <WishlistItemsStatusMessage errorType='EMPTY' text={emptyWishlistText} />,\n heading: this._renderHeading(heading)\n };\n\n return this.props.renderView(emptyViewProps);\n }\n\n const viewProps: IWishlistItemsViewProps = {\n ...(this.props as IWishlistItemsProps<IWishlistItemsData>),\n WishlistItems: {\n moduleProps: this.props,\n className: classnames('ms-wishlist-items', className)\n },\n status: 'SUCCESS',\n heading: this._renderHeading(heading),\n Products: {\n className: 'ms-wishlist-items__products',\n tag: 'ul'\n },\n Product: {\n className: 'ms-wishlist-items__product',\n tag: 'li'\n },\n ProductDetails: {\n className: 'ms-wishlist-items__product-link',\n tag: 'a'\n },\n telemetryContent: this.telemetryContent,\n ProductDimensions: {\n className: 'ms-wishlist-items__product-dimensions'\n },\n products: productsList && this._renderProductList(productsList),\n statusNotExistsMessage:\n productsList && this._getProductNotExists(productsList, emptyWishlistText, noLongerExitsWishlistItemText)\n };\n\n return this.props.renderView(viewProps) as React.ReactElement;\n }\n\n public handleHeadingChange = (event: MsDyn365.ContentEditableEvent) => (this.props.config.heading!.text = event.target.value);\n\n private _getProductNotExists(products: FullProduct[], emptytext: string, noLongerExisttext: string): JSX.Element | null {\n if (this.state && this.state.isError) {\n if (products.length === 0) {\n return <WishlistItemsStatusMessage errorType='SUCCESS' text={emptytext} />;\n }\n return (\n <WishlistItemsStatusMessage\n className={'ms-wishlist-items__message-exists-product'}\n errorType='SUCCESS'\n text={noLongerExisttext}\n />\n );\n }\n return null;\n }\n private _renderProductList(products: FullProduct[]): IWishlistItemViewProps[] {\n const {\n priceFree,\n originalPriceText,\n currentPriceText,\n addToCartButtonText,\n outOfStockText,\n removeButtonText,\n productDimensionTypeColor,\n productDimensionTypeSize,\n productDimensionTypeStyle,\n productDimensionTypeAmount\n } = this.props.resources;\n const { context, telemetry } = this.props;\n const { imageSettings, enableImageProductLink } = this.props.config;\n\n return products.map((product: FullProduct, index) => {\n const currentProductProps = {\n product: product.ProductDetails,\n price: product.ProductPrice,\n context,\n wishlistState: this.state,\n productUrl: getProductUrlSync(product.ProductDetails, context.actionContext, undefined),\n imageSettings,\n removeFromWishlistText: removeButtonText,\n isInStock: this._isProductInStock(product),\n addToCartText: addToCartButtonText,\n outOfStockText,\n index,\n itemKey: `${product.ProductDetails.RecordId}-${product.ProductDetails.ItemId}-${index}`,\n telemetry,\n moduleId: this.props.id,\n moduleTypeName: this.props.typeName,\n enableImageProductLink,\n inventoryInformationLabel: this._inventoryLabel(product),\n inventoryLabelClassName: this._inventoryClassName(product),\n telemetryContent: this.telemetryContent,\n handlers: {\n onAddToCart: this._addItemToCart,\n onRemoveItem: this._removeItemFromWishlist,\n onDismiss: this._onDismiss\n },\n resources: {\n productDimensionTypeColor,\n productDimensionTypeSize,\n productDimensionTypeStyle: product.ProductDetails.IsGiftCard ? productDimensionTypeAmount : productDimensionTypeStyle,\n freePriceText: priceFree,\n originalPriceText,\n currentPriceText\n }\n };\n return WishlistItem(currentProductProps)!;\n });\n }\n\n // Dismiss alert when addingToCart/removeItem\n private readonly _onDismiss = () => {\n this.setState({\n isOpen: false\n });\n };\n\n private readonly _renderHeading = (heading?: IHeadingData): JSX.Element | undefined => {\n if (!heading) {\n return undefined;\n }\n return (\n <MsDyn365.Text\n className='ms-wishlist-items__heading'\n tag={heading.tag || 'h2'}\n text={heading.text}\n editProps={{ onEdit: this.handleHeadingChange, requestContext: this.props.context.request }}\n />\n );\n };\n\n private readonly _addItemToCart = async (product: SimpleProduct, itemKey: string): Promise<void> => {\n const { context, data, resources, telemetry } = this.props;\n const { cart, productAvailability } = data;\n const { addedToCartSuccessMessage, addedToCartFailureMessage, invoiceInCartErrorMessage } = resources;\n\n const productInventoryInformation = this._getProductInventory({ ProductDetails: product }, productAvailability.result);\n\n if (context) {\n if (cart.result) {\n // Check if the product delivery mode is electronic\n const emailDeliveryModeCode = this.props.context.actionContext.requestContext.channel?.EmailDeliveryModeCode;\n\n const deliveryOptions = await getDeliveryOptionsAsync(\n {\n callerContext: this.props.context.actionContext,\n queryResultSettings: QueryResultSettingsProxy.getPagingFromInputDataOrDefaultValue(this.props.context.actionContext)\n },\n [product.RecordId]\n );\n const validateQuantity = this.isQuantityValidationRequired();\n const quantity = this.respectQuantityLimits() ? product?.Behavior?.MinimumQuantity ?? 1 : 1;\n\n const addProductToCartInput = {\n product,\n count: quantity,\n enableStockCheck: context.app.config.enableStockCheck,\n availableQuantity: productInventoryInformation\n ? productInventoryInformation.ProductAvailableQuantity.AvailableQuantity\n : 0,\n additionalProperties: { validateQuantity: validateQuantity },\n isAddEmailDeliveryItemToCart:\n ArrayExtensions.hasElements(deliveryOptions) &&\n ArrayExtensions.hasElements(deliveryOptions[0].DeliveryOptions) &&\n deliveryOptions[0].DeliveryOptions[0].Code === emailDeliveryModeCode\n };\n\n cart.result\n .addProductToCart(addProductToCartInput)\n .then(async result => {\n if (result.status === 'SUCCESS') {\n this.setState({\n productId: product.RecordId,\n itemKey,\n userMessage: addedToCartSuccessMessage,\n statusCssString: 'success',\n messageGlyph: 'fas fa-check',\n isOpen: true\n });\n } else if (result.substatus === 'MAXQUANTITY') {\n const curQuantity =\n (await cart).cart?.CartLines?.find(item => item.ProductId === product.RecordId)?.Quantity || 0;\n const maxQtyLimitReachedMessage = this._getInventoryValueMessage(productInventoryInformation, curQuantity);\n\n this.setState({\n productId: product.RecordId,\n itemKey,\n userMessage: maxQtyLimitReachedMessage,\n statusCssString: 'danger',\n messageGlyph: 'fas fa-exclamation-triangle',\n isOpen: true\n });\n } else if (result.substatus === 'QUANTITYLIMITS' && validateQuantity) {\n const maxQtyLimitReachedMessage = result.errorDetails?.LocalizedMessage!;\n\n this.setState({\n productId: product.RecordId,\n itemKey,\n userMessage: maxQtyLimitReachedMessage || addedToCartFailureMessage,\n statusCssString: 'danger',\n messageGlyph: 'fas fa-exclamation-triangle',\n isOpen: true\n });\n } else if (result.substatus === 'INVOICEINCART') {\n this.setState({\n productId: product.RecordId,\n itemKey,\n userMessage: result.errorDetails?.LocalizedMessage || invoiceInCartErrorMessage,\n statusCssString: 'danger',\n messageGlyph: 'fas fa-exclamation-triangle',\n isOpen: true\n });\n } else {\n this.props.telemetry.debug('[wishlist-items] Unable to Update Cart Line from the wishlist');\n this.setState({\n productId: product.RecordId,\n itemKey,\n userMessage: addedToCartFailureMessage,\n statusCssString: 'danger',\n messageGlyph: 'fas fa-exclamation-triangle',\n isOpen: true\n });\n }\n })\n .catch(error => {\n telemetry.warning(error);\n telemetry.debug('[wishlist-items] Error trying to Update Cart Line from the wishlist');\n this.setState({\n productId: product.RecordId,\n itemKey,\n userMessage: addedToCartFailureMessage,\n statusCssString: 'danger',\n messageGlyph: 'fas fa-exclamation-triangle',\n isOpen: true\n });\n });\n }\n }\n };\n\n private isQuantityValidationRequired = (): boolean => {\n const isChannelQuantityLimitsFeatureEnabledInHq =\n this.props.data.featureState.result?.find(\n featureState => featureState.Name === 'Dynamics.AX.Application.EcommerceQuantityLimitConfigurationsFeature'\n )?.IsEnabled || false;\n\n const isOrderQuantityLimitsFeatureEnabled = this.isOrderQuantityLimitsFeatureEnabled();\n return isOrderQuantityLimitsFeatureEnabled || isChannelQuantityLimitsFeatureEnabledInHq;\n };\n\n private respectQuantityLimits = (): boolean => {\n const isOrderQuantityLimitsFeatureEnabled = this.isOrderQuantityLimitsFeatureEnabled();\n const validateLimitsPerLine = this.props.data.cartConfiguration?.result?.ValidateDefaultOrderSettingsPerLine ?? false;\n return isOrderQuantityLimitsFeatureEnabled && validateLimitsPerLine;\n };\n\n private isOrderQuantityLimitsFeatureEnabled = (): boolean => {\n const isOrderQuantityLimitsFeatureEnabledInHq =\n this.props.data.featureState.result?.find(\n featureState => featureState.Name === 'Dynamics.AX.Application.RetailDefaultOrderQuantityLimitsFeature'\n )?.IsEnabled || false;\n\n if (!isOrderQuantityLimitsFeatureEnabledInHq) {\n return false;\n }\n\n const useSiteBuilderSettings = this.props.data.featureState.result?.find(\n featureState => featureState.Name === 'RevertToSiteBuilderOrderQuantityLimitsSettings'\n )?.IsEnabled;\n\n if (useSiteBuilderSettings) {\n const defaultOrderQuantityLimitsFeatureConfig = this.props.context?.request?.app?.platform?.enableDefaultOrderQuantityLimits;\n\n const customerInfo = this.props.data.customerInformation.result;\n\n const isOrderQuantityLimitsFeatureEnabledInSiteSettings =\n defaultOrderQuantityLimitsFeatureConfig === 'all' ||\n ((customerInfo &&\n ((defaultOrderQuantityLimitsFeatureConfig === 'b2b' && customerInfo.IsB2b) ||\n (defaultOrderQuantityLimitsFeatureConfig === 'b2c' && !customerInfo.IsB2b))) ??\n false);\n\n return isOrderQuantityLimitsFeatureEnabledInSiteSettings;\n } else {\n const cartConfiguration = this.props.data.cartConfiguration?.result;\n return !(cartConfiguration?.IgnoreOrderSettings ?? false);\n }\n };\n\n private readonly _removeItemFromWishlist = (productId: number): void => {\n const { context, data, telemetry } = this.props;\n const { wishlists } = data;\n let noLongerLineExist: CommerceListLine[] | undefined = [];\n if (context && context.actionContext) {\n const userToken = context.request.user.isAuthenticated && context.request.user.token;\n const wishlistLineId = this._getWishlistLineIdFromProductId(productId);\n if (userToken && wishlists.result && wishlists.result[0] && wishlistLineId) {\n removeLinesAsync({ callerContext: context.actionContext }, wishlists.result[0].Id, [{ LineId: wishlistLineId }])\n .then(commerceList => {\n const castCommerceList: CommerceList | null = commerceList as CommerceList | null;\n\n if (castCommerceList && castCommerceList.Id && context.request.user.isAuthenticated) {\n noLongerLineExist = this._getProductsNoLongerExists(castCommerceList);\n if (noLongerLineExist && noLongerLineExist.length > 0) {\n this._removeNoLongerExistsLines(noLongerLineExist);\n } else {\n context.actionContext.update(createGetByCustomerInput({}, null), [castCommerceList]);\n getItemsInWishlists(new ActiveWishlistInput(), context.actionContext)\n .then(products => {\n const castSimpleProducts: FullProduct[] | null = products as FullProduct[] | null;\n if (castSimpleProducts && castSimpleProducts.length > 0) {\n this.setState({ isError: false });\n context.actionContext.update(new ActiveWishlistInput(), castSimpleProducts);\n }\n })\n .catch(error => {\n telemetry.warning('[wishlist-items] Unable to hyderate the wishlist with product information');\n telemetry.error(error);\n });\n }\n }\n })\n .catch(error => {\n telemetry.warning('[wishlist-items] Unable remove items from the wishlist');\n telemetry.error(error);\n });\n } else {\n telemetry.warning(\"[wishlist-items] Unable remove items from the wishlist user token or lineItemID wasn't found\");\n }\n }\n };\n\n private _getInventoryValueMessage(product: IProductInventoryInformation | undefined, curQuantity: number): string {\n const { context, resources } = this.props;\n const { maxQuantityLimitText } = resources;\n\n const maxQuantityForLineItem = updateMaxQuantityForCartLineItem(context.app.config.maxQuantityForCartLineItem);\n\n if (!product || !product.ProductAvailableQuantity.AvailableQuantity || !context.app.config.enableStockCheck) {\n return maxQuantityLimitText\n .replace('{maxQuantity}', maxQuantityForLineItem.toString())\n .replace('{curQuantity}', curQuantity.toString());\n }\n\n const minInventory = Math.min(maxQuantityForLineItem, product.ProductAvailableQuantity.AvailableQuantity);\n\n return maxQuantityLimitText.replace('{maxQuantity}', minInventory.toString()).replace('{curQuantity}', curQuantity.toString());\n }\n\n private _getProductInventory(\n product: FullProduct,\n productInventoryCollection: IProductInventoryInformation[] | undefined\n ): IProductInventoryInformation | undefined {\n if (productInventoryCollection && productInventoryCollection.length > 0) {\n for (const productResult of productInventoryCollection) {\n if (product.ProductDetails.RecordId === productResult.ProductAvailableQuantity.ProductId) {\n return productResult;\n }\n }\n }\n return undefined;\n }\n\n private readonly _inventoryLabel = (product: FullProduct): string | undefined => {\n const { productAvailability } = this.props.data;\n if (productAvailability && productAvailability.result) {\n const productInventoryInformation = this._getProductInventory(product, productAvailability.result);\n if (productInventoryInformation) {\n return productInventoryInformation.StockLevelLabel;\n }\n }\n\n return undefined;\n };\n\n private readonly _inventoryClassName = (product: FullProduct): string | undefined => {\n const { productAvailability } = this.props.data;\n if (productAvailability && productAvailability.result) {\n const productInventoryInformation = this._getProductInventory(product, productAvailability.result);\n if (productInventoryInformation && productInventoryInformation.StockLevelCode) {\n return `ms-wishlist-items__${productInventoryInformation.StockLevelCode.toLowerCase()}`;\n }\n }\n\n return undefined;\n };\n\n private readonly _isProductInStock = (product: FullProduct): boolean => {\n const { data, context } = this.props;\n const { productAvailability } = data;\n\n if (!context.app.config.enableStockCheck) {\n return true;\n }\n\n if (!productAvailability.result || !product.ProductDetails) {\n return false;\n }\n\n for (const productResult of productAvailability.result) {\n if (\n productResult.ProductAvailableQuantity &&\n productResult.ProductAvailableQuantity.ProductId &&\n productResult.ProductAvailableQuantity.ProductId === product.ProductDetails.RecordId\n ) {\n return productResult.IsProductAvailable;\n }\n }\n\n return false;\n };\n\n private readonly _getWishlistLineIdFromProductId = (productId: number): number | null => {\n const { wishlists } = this.props.data;\n\n if (\n !wishlists.result ||\n wishlists.result.length === 0 ||\n !wishlists.result[0].CommerceListLines ||\n wishlists.result[0].CommerceListLines.length === 0\n ) {\n this.props.telemetry.error('Wishlist content is empty, module wont render.');\n return null;\n }\n\n const foundWishlistItem = wishlists.result[0].CommerceListLines.filter(commerceListLine => {\n return commerceListLine.ProductId === productId;\n });\n\n if (foundWishlistItem && foundWishlistItem[0].LineId) {\n return foundWishlistItem[0].LineId;\n }\n return null;\n };\n\n private readonly _getProductsNoLongerExists = (castCommerceList: CommerceList): CommerceListLine[] | undefined => {\n const noLongerExist: CommerceListLine[] | undefined = [];\n castCommerceList.CommerceListLines?.map(line => {\n const { products } = this.props.data;\n const productsList = products && (products as AsyncResult<FullProduct[]>).result!;\n\n const skipRemove = productsList.filter(product => product.ProductDetails.RecordId === line.ProductId);\n if (skipRemove.length === 0) {\n noLongerExist?.push({ LineId: line.LineId });\n }\n });\n return noLongerExist;\n };\n\n private readonly _removeNoLongerExistsLines = (noLongerLineExist: CommerceListLine[]) => {\n const { context, data, telemetry } = this.props;\n const { wishlists } = data;\n if (context && context.actionContext) {\n const userToken = context.request.user.isAuthenticated && context.request.user.token;\n if (userToken && wishlists.result && wishlists.result[0]) {\n removeLinesAsync({ callerContext: context.actionContext }, wishlists.result[0].Id, noLongerLineExist)\n .then(commerceList => {\n const castCommerceList: CommerceList | null = commerceList as CommerceList | null;\n if (castCommerceList && castCommerceList.Id && context.request.user.isAuthenticated) {\n context.actionContext.update(createGetByCustomerInput({}, null), [castCommerceList]);\n getItemsInWishlists(new ActiveWishlistInput(), context.actionContext)\n .then(products => {\n const castSimpleProducts: FullProduct[] | null = products as FullProduct[] | null;\n if (castSimpleProducts && castSimpleProducts.length > 0) {\n this.setState({ isError: true });\n context.actionContext.update(new ActiveWishlistInput(), castSimpleProducts);\n }\n })\n .catch(error => {\n telemetry.warning('[wishlist-items] Unable to hyderate the wishlist with product information');\n telemetry.error(error);\n });\n }\n })\n .catch(error => {\n telemetry.warning('[wishlist-items] Unable remove items from the wishlist');\n telemetry.error(error);\n });\n } else {\n telemetry.warning(\"[wishlist-items] Unable remove items from the wishlist user token or lineItemID wasn't found\");\n }\n }\n };\n}\n\nexport default WishlistItems;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport {\n getPayloadObject,\n getTelemetryAttributes,\n INodeProps,\n ITelemetryContent,\n Module,\n Node\n} from '@msdyn365-commerce-modules/utilities';\nimport classnames from 'classnames';\nimport * as React from 'react';\n\nimport { IWishlistItemViewProps } from '../..';\nimport { IWishlistItemsViewProps } from './wishlist-items';\n\nconst WishlistItemsView: React.FC<IWishlistItemsViewProps> = props => {\n const {\n WishlistItems,\n status,\n statusMessage,\n heading,\n Products,\n products,\n Product,\n ProductDetails,\n ProductDimensions,\n telemetryContent,\n statusNotExistsMessage\n } = props;\n\n return (\n <Module {...WishlistItems}>\n {heading}\n {statusNotExistsMessage}\n {status !== 'SUCCESS' && statusMessage}\n {Products && products && products.length > 0 && (\n <Node {...Products}>\n {products &&\n products.map(product => {\n return product && _renderItem(product, Product, ProductDimensions, ProductDetails, telemetryContent);\n })}\n </Node>\n )}\n </Module>\n );\n};\n\nconst _renderItem = (\n product: IWishlistItemViewProps,\n Product?: INodeProps,\n ProductDimensions?: INodeProps,\n ProductDetails?: INodeProps,\n telemetryContent?: ITelemetryContent\n): JSX.Element | null => {\n const {\n key,\n productImage,\n productLink,\n productPrice,\n productDimensions,\n addToCartButton,\n removeButton,\n productStatusMessage,\n entireProductLink,\n productName,\n productAriaLabel,\n inventoryInformation,\n productUnitOfMeasure\n } = product;\n const payLoad = getPayloadObject('click', telemetryContent!, '', key);\n const productAttributes = getTelemetryAttributes(telemetryContent!, payLoad);\n if (entireProductLink) {\n return (\n <Node key={key} className={Product!.className} {...Product}>\n <Node\n href={entireProductLink}\n className={classnames('entire-product-link ', ProductDetails!.className)}\n {...productAttributes}\n aria-label={productAriaLabel}\n tag={ProductDetails!.tag}\n >\n {productImage}\n {productName}\n {productDimensions && ProductDimensions && (\n <Node {...ProductDimensions}>\n {productDimensions.map(dimension => {\n return dimension;\n })}\n </Node>\n )}\n {productPrice}\n {productUnitOfMeasure}\n </Node>\n {inventoryInformation}\n {addToCartButton}\n {removeButton}\n {productStatusMessage}\n </Node>\n );\n }\n return (\n <Node key={key} className={Product!.className} {...Product}>\n {productImage}\n {productLink}\n {productDimensions && ProductDimensions && (\n <Node {...ProductDimensions}>\n {productDimensions.map(dimension => {\n return dimension;\n })}\n </Node>\n )}\n {productPrice}\n {addToCartButton}\n {removeButton}\n {productStatusMessage}\n </Node>\n );\n};\n\nexport default WishlistItemsView;\n"],"names":["renderRating","context","typeName","ratingId","avgRating","totalRatings","ariaLabel","_totalRatings$toStrin","numberRatings","toString","undefined","ratingAriaLabel","rating","roundedRating","toFixed","format","getRatingAriaLabel","React","RatingComponent","id","ratingCount","readOnly","data","ActiveProductComponent","_ref","imageSettings","savingsText","freePriceText","originalPriceText","product","className","requestContext","gridSettings","imageUrl","altText","imgData","src","imageProps","cropFocalRegion","Image","Object","assign","loadFailureBehavior","renderProductPlacementImage","actionContext","request","PrimaryImageUrl","Name","productId","basePrice","adjustedPrice","price","BasePrice","AdjustedPrice","CustomerContextualPrice","PriceComponent","renderPrice","Price","description","Description","app","config","hideRating","AverageRating","TotalRatings","assembleNode","item","props","_item$links","additionalContentNode","heading","renderHeading","additionalContentHeading","Msdyn365","text","tag","editProps","onEdit","event","handleAdditionalTextChange","subtext","renderParagraph","additionalContentParagraphText","links","map","ctaLink","index","renderLinks","linkIndex","editableLink","linkText","linkUrl","destinationUrl","openInNewTab","isOpenInNewTab","role","key","link","onTextChange","handleAdditionalLinkTextChange","additionalContentContainer","additionalContentItemLinks","activeImageAdditionalContent","additionalContent","CanvasCalculations","CanvasStyles","ImageMapper","constructor","super","_isDesktopViewPort","_context","getActiveImageWidth","MsDyn365","isBrowser","activeImageReferenceValue","this","activeImageRefs","current","clientWidth","getActiveImageHeight","clientHeight","convertHexToRgb","hexColor","result","RegExp","exec","rValue","Number","parseInt","gValue","bValue","applyFadingTransition","coords","rgbColor","alpha","_this$_canvas$current","_this$_canvas$current2","halfDivisor","_canvas","getContext","buttonPadding","paddingAdjustment","buttonWidth","measureText","width","fillStyle","document","body","parentElement","getAttribute","fillText","drawButton","_this$_canvas$current3","_this$_canvas$current4","color","buttonTextClor","buttonHeight","buttonPositionX","buttonPositionY","arcsize","beginPath","moveTo","lineTo","arcTo","stroke","closePath","fill","expandAnimation","_this$props$imageMapp","buttonText","imageMapperResources","animationStartWidth","expandAnimationStartWidth","pointPositionX","pointPositionY","animationEndWidth","expandAnimationEndWidth","radius","expandRadius","rotation","startAngle","endAngle","textFadeInValue","textFadeInStartValue","buttonTextClorInRgb","toLocaleLowerCase","animate","_this$_canvas$current5","_this$_canvas$current6","ellipse","requestAnimationFrame","textFadeInterval","collapseAnimation","_this$props$imageMapp2","collapseAnimationStartWidth","collapseAnimationEndWidth","clearMargin","clearHeight","clearWidth","collapseRadius","textFadeOutValue","textFadeOutStartValue","_this$_canvas$current7","_this$_canvas$current8","clearRect","drawCircle","_this$_canvas$current9","_this$_canvas$current10","viewPort","doubleMultiplier","strokeStyle","arc","Math","PI","scaleCoords","imgWidth","defaultWidth","defaultScale","scale","coord","renderPrefilledAreas","areaMap","areas","area","computeCenter","scaledCoords","handleHoverOn","center","handleHoverOff","_this$_canvas$current11","canvasPositionX","defaultPositionX","canvasPositionY","defaultPositionY","height","click","onClick","preventDefault","hoverOn","onMouseEnter","hoverOff","onMouseLeave","renderAreas","_this$props$imageMapp3","_this$props$imageMapp4","_area$productSearchRe","xsRadius","extendedArea","_objectSpread","areaKey","altTextWithProductName","replace","productSearchResult","shape","join","onFocus","onBlur","href","productUrl","tabIndex","alt","initCanvas","_this$getActiveImageW","_this$getActiveImageH","_this$_canvas$current12","_backgroundImage","_container","onLoad","defaultHeight","canvasWidth","canvasHeight","style","componentDidMount","componentDidUpdate","shouldComponentUpdate","nextProps","shouldRender","render","_requestContext$gridS","imageData","ref","useMap","name","ActiveImageConstants","ActiveImage","_defaultProductCardWidth","_defaultProdutCardHight","_activePoints","addActivePoints","_product$PrimaryImage","push","areaId","RecordId","primaryImageUrl","updateClientWidth","viewport","isMobile","variant","VariantType","Browser","setState","renderImageMapper","_this$props$config$ac","productResults","products","activePoints","configProduct","ItemId","itemId","_product$Name","_configProduct$xPosit","_configProduct$yPosit","_configProduct$radius","getProductPageUrlSync","xPosition","yPosition","find","activePoint","JSON","stringify","mappedArea","_activeImageClass","length","state","enterArea","leaveArea","activeImage","_activeImageRefs","resources","altTextForSeeMoreButtonWithProductName","seeMoreButtonText","overlayClass","type","window","open","resetState","renderProductComponent","_this$state$area","_this$state$area$prim","_product$ItemId","apiSettings","baseImageUrl","productImageSettings","renderProductCard","_productCardDivRef","renderOverlay","getProductCardPositionX","_this$props$config$pr","_this$props$config$pr2","_defaultImageSettings","_area$center$","_area$center","defaultImageSettings","getDefaultImageSettings","productImageSettingsWidth","viewports","lg","w","productCardWidth","leftAllignPosition","position","getProductCardPositionY","_this$props$config$pr3","_this$props$config$pr4","_defaultImageSettings2","productImageSettingsHeight","h","produtCardHight","_area$center$2","_area$center2","xs","q","xl","lazyload","keyDown","enterKey","target","nodeName","escKey","handleTextChange","value","handleParagraphChange","paragraph","renderActiveImageDetailsLinks","payLoad","getPayloadObject","_telemetryContent","linkData","contentAction","etext","attributes","getTelemetryAttributes","linkId","willOpenInNewTab","additionalProperties","handleLinkTextChange","renderActiveImageDetailsHeading","_heading$tag","renderActiveImageDetailsParagraph","getActiveImageId","activeImageId","_activeImageIdPart$","activeImageSource","split","decrementOne","_handleOutsideClick","_this$_productCardDiv","contains","getTelemetryObject","telemetryPageName","friendlyName","telemetry","addEventListener","setTimeout","timeoutInterval","images","getElementsByClassName","ArrayExtensions","hasElements","Array","from","removeAttribute","componentWillUnmount","removeEventListener","viewProps","activePointContainer","moduleProps","classnames","activePointDetailsContainer","imageMapper","overlay","productCard","productCardleftPosition","productCardtopPosition","title","detailsContainer","detailsContainerCta","handleAdditionalParagraphChange","handleAdditionalText","handleAdditionalParagraph","handleAdditionalLinkText","renderView","_this$props$config$ad","activeImageView","Module","Node","top","left","CarouselModule","_handleDismissCarousel","cookies","set","dismissCarousel","_next","slots","nextIndex","activeIndex","content","animating","closeNow","_previous","_onExiting","_onExited","_goToIndex","newIndex","telemetryContent","get","carouselContainer","closeAnimation","next","previous","onIndicatorsClickHandler","handleDismissCarousel","handleOnExited","handleOnExiting","retrieveItems","items","renderModuleAttributes","Carousel","pause","pauseOnHover","ride","autoplay","interval","transitionType","hideFlipper","dismissEnabled","dismissCarouselAriaText","ariaLabelForDismissButton","indicatorAriaText","ariaLabelForSlide","directionTextPrev","flipperPrevious","directionTextNext","flipperNext","keyboard","CheckoutErrors","async","setCheckoutErrors","errorCode","isExpressCheckoutApplied","ctx","apiError","clientCheckoutError","consoleCheckoutErrors","checkoutState","getCheckoutState","catch","error","exception","checkoutError","checkoutErrorsList","errorLocation","ErrorLocation","Console","consoleCheckoutError","errorMessageResource","Error","errorMessage","getCheckoutErrorMessage","console","log","CheckoutPaymentInstrument","Checkout","updateCheckoutError","newCheckoutError","updateShouldFocusOnCheckoutError","newShouldFocusOnCheckoutError","genericError","genericErrorMessage","focusOnCheckoutError","checkoutErrorRef","scrollIntoView","updateCheckoutErrorFocus","newCheckoutErrorFocus","CheckoutModule","None","setCheckoutErrorFocus","checkoutModuleId","checkoutModule","keys","includes","errorMessageFromAPI","errorResource","resource","ActionError","ErrorCode","ErrorMessageResource","checkoutTimeoutErrorMessage","Microsoft_Dynamics_Commerce_Runtime_BlockedLoyaltyCard","blockedLoyaltyCardErrorMessage","CheckoutLoyalty","Microsoft_Dynamics_Commerce_Runtime_CustomerAccountLimitSignDifferentFromAmountDue","customerAccountLimitSignDifferentFromAmountDueErrorMessage","CheckoutCustomerAccountPayment","Microsoft_Dynamics_Commerce_Runtime_CustomerAccountPaymentExceedsAvailableCreditLimit","customerAccountPaymentExceedsAvailableCreditLimitErrorMessage","Microsoft_Dynamics_Commerce_Runtime_CustomerAccountPaymentExceedsCustomerAccountFloorLimit","customerAccountPaymentExceedsCustomerAccountFloorLimitErrorMessage","Microsoft_Dynamics_Commerce_Runtime_CustomerAccountPaymentExceedsTotalAmountForCarryOutAndReturnItems","customerAccountPaymentExceedsTotalAmountForCarryOutAndReturnItemsErrorMessage","Microsoft_Dynamics_Commerce_Runtime_CustomerAccountPaymentForCustomerWithoutAllowOnAccount","customerAccountPaymentForCustomerWithoutAllowOnAccountErrorMessage","Microsoft_Dynamics_Commerce_Runtime_CustomerAccountPaymentNotAllowedForOpenInvoices","customerAccountPaymentNotAllowedForOpenInvoicesErrorMessage","Microsoft_Dynamics_Commerce_Runtime_FraudRisk","fraudRiskErrorMessage","Microsoft_Dynamics_Commerce_Runtime_GiftCardBalanceInquiryFailed","giftCardBalanceInquiryFailedErrorMessage","CheckoutGiftCard","Microsoft_Dynamics_Commerce_Runtime_GiftCardCurrencyMismatch","giftCardCurrencyMismatchErrorMessage","Microsoft_Dynamics_Commerce_Runtime_InvalidCartVersion","invalidCartVersionErrorMessage","Microsoft_Dynamics_Commerce_Runtime_InvalidLoyaltyCardNumber","invalidLoyaltyCardNumberErrorMessage","Microsoft_Dynamics_Commerce_Runtime_InvalidPaymentRequest","invalidPaymentRequestErrorMessage","Microsoft_Dynamics_Commerce_Runtime_InvalidPaymentRequest_Console","invalidPaymentRequestConsoleErrorMessage","Microsoft_Dynamics_Commerce_Runtime_MissingRequiredCartTenderLines","missingRequiredCartTenderLinesErrorMessage","Microsoft_Dynamics_Commerce_Runtime_MultipleCustomerAccountPaymentsNotAllowed","multipleCustomerAccountPaymentsNotAllowedErrorMessage","Microsoft_Dynamics_Commerce_Runtime_NoMoreThanOneLoyaltyTender","noMoreThanOneLoyaltyTenderErrorMessage","Microsoft_Dynamics_Commerce_Runtime_NoResponseFromGatewayForGiftCardBalanceInquiry","noResponseFromGatewayForGiftCardBalanceInquiryErrorMessage","Microsoft_Dynamics_Commerce_Runtime_NoTenderLoyaltyCard","noTenderLoyaltyCardErrorMessage","Microsoft_Dynamics_Commerce_Runtime_NotEnoughRewardPoints","notEnoughRewardPointsErrorMessage","Microsoft_Dynamics_Commerce_Runtime_PaymentAlreadyVoided","paymentAlreadyVoidedErrorMessage","Microsoft_Dynamics_Commerce_Runtime_PaymentAmountExceedsGiftBalance","paymentAmountExceedsGiftBalanceErrorMessage","Microsoft_Dynamics_Commerce_Runtime_PaymentRequiresMerchantProperties","paymentRequiresMerchantPropertiesErrorMessage","Microsoft_Dynamics_Commerce_Runtime_PaymentRequiresMerchantProperties_Console","paymentRequiresMerchantPropertiesConsoleErrorMessage","Microsoft_Dynamics_Commerce_Runtime_PaymentUsingUnauthorizedAccount","paymentUsingUnauthorizedAccountErrorMessage","Microsoft_Dynamics_Commerce_Runtime_RefundAmountMoreThanAllowed","refundAmountMoreThanAllowedErrorMessage","Microsoft_Dynamics_Commerce_Runtime_UnableToAuthorizePayment","unableToAuthorizePaymentErrorMessage","Microsoft_Dynamics_Commerce_Runtime_UnableToAuthorizePaymentCardAdditionalContextRequired","unableToAuthorizePaymentCardAdditionalContextRequiredErrorMessage","Microsoft_Dynamics_Commerce_Runtime_UnableToAuthorizePaymentCardTypeMissingOrNotSupported","unableToAuthorizePaymentCardTypeMissingOrNotSupportedErrorMessage","Microsoft_Dynamics_Commerce_Runtime_UnableToCancelPayment","unableToCancelPaymentErrorMessage","Microsoft_Dynamics_Commerce_Runtime_UnableToReadCardTokenInfo","unableToReadCardTokenInfoErrorMessage","Microsoft_Dynamics_Commerce_Runtime_UnableToRetrieveCardPaymentAcceptResult","unableToRetrieveCardPaymentAcceptResultErrorMessage","ErrorComponent","message","WaitingComponent","Waiting","onApplyHandler","onApplyGiftCard","onChangeNumberHandler","onEnterGiftCardNumber","onChangePinHandler","onEnterGiftCardPin","onChangeExpHandler","onEnterGiftCardExp","getForm","options","inputRef","inputPinRef","inputExpRef","giftCardNumber","giftCardPin","giftCardExp","supportExternalGiftCard","additionalFields","balanceCheckButton","giftCardFormLabel","giftCardNumberLabel","giftCardPinLabel","giftCardExpLabel","giftCardAlertLabel","giftCardPinPlaceholderText","giftCardExpPlaceholderText","formProps","onSubmit","label","inputPinLabel","inputExpLabel","alertFieldLabel","alert","Alert","assertive","fade","includeAlertClass","isOpen","inputNumber","onChange","inputPin","placeholder","inputExp","applyButton","Button","disabled","showGiftCardPinInput","showGiftCardExpInput","inputProps","inputNumProps","inputPinProps","inputExpProps","getItem","giftCard","getFormattedPrice","enteredGiftCardLabel","giftCardAvailableBalanceLabel","balance","Balance","CardCurrencyCode","giftCardLast4Digit","Id","substr","selectedGiftCard","itemProps","SupportedGiftCardType","GiftCardBalanceCheck","_this","isFetchingGiftCard","_isEnabled","user","isAuthenticated","giftCardSupported","External","shouldBeEnabledForGuest","_getFormattedPrice","arguments","currencyCode","cultureFormatter","formatCurrency","_enterGiftCardNumber","_clearError","_enterGiftCardPin","_enterGiftCardExp","_setError","debug","_applyGiftCard","trim","giftCardTypes","_getGiftCardTypes","giftCardType","isPinRequired","IsPinRequired","isExpRequired","IsExpirationDateRequired","tenderTypeId","PaymentMethodId","_getGiftCard","Promise","resolve","input","focus","_findGiftcardTenderTypes","tenderTypes","operationId","giftcardType","matchedTenderTypes","Internal","filter","tenderType","OperationId","ConnectorId","TenderTypeId","invalidCardTypeError","noBalanceError","invalidCardInfoError","noCardPinError","noCardExpError","supportedGiftCardType","getTenderTypesAsync","callerContext","queryResultSettings","internalGiftcardTenderTypes","OPERATIONS","PayGiftCertificate","externalGiftcardTenderTypes","Both","month","year","getGiftCardAsync","then","activeGiftCard","emptyInputError","invalidCodeError","resolveCardTypesAsync","CardType","GiftCard","nextState","showAdditionalFields","moduleClassName","classname","giftCardBalanceCheckProps","enterGiftCardNumber","enterGiftCardPin","enterGiftCardExp","applyGiftCard","form","Form","Item","_ref2","HeaderPreferredStore","modalCloseButtonRef","handleClick","_findPreferredStoreOnClick","storeSelectorStateManager","storeSelector","storeName","preferredStore","StoreName","headerPreferredStoreText","headerPreferredStoreAriaLabel","modules","storeSelectorId","openDialog","showMapViewLink","parentElementRef","onLocationSelected","orgUnitLocation","__decorate","observer","Logo","TelemetryConstant","_renderLogo","rel","_renderImage","image","moduleType","imagePropertyName","shouldSkipToMainImage","NavIcon","toggleNavBar","mobileHamburgerAriaLabel","isExpanded","targetId","Header","isB2BSite","_this$props$config$my","myAccountLinks","popOverRef","_toggleNavbar","bind","_togglePopover","_keydown","mobileMenuCollapsed","signinPopoverOpen","hasSigninerror","isChannelTypeB2B","_this$props$context$r","workerName","customerName","_this$props$data$empl","worker","employee","_this$props$data$acco","customer","accountInformation","FirstName","reaction","cart","signUpCustomerNotFoundTitle","signUpMultipleCustomerFoundTitle","signInCustomerNotAuthorizedTitle","closeNotificationLabel","signinNotificationError","_getSigninNotification","NotificationsManager","instance","addNotification","ErrorNotification","wishlists","cartLabel","cartQtyLabel","logoLink","logoImage","shouldShowWishlistCount","disableTooltip","headerToggleClass","headerClassName","navbarKey","cartIconSlot","_getSlot","menuBarSlot","searchSlot","wishlistCount","siteOptionsSlot","preferredStoreSlot","currentDistributorSlot","CommerceListLines","logo","wishListIconDesktop","WishListIconComponent","showButtonTooltip","wishlistTooltipText","wishlistCountLabel","isDispayWishlistCount","wishListIconMobile","cartIcon","CartIconComponent","navIcon","menuBar","search","siteOptions","HeaderTag","headerAriaLabel","HeaderContainer","HeaderTopBarContainer","Divider","MobileMenuContainer","Modal","wrapClassName","toggle","MobileMenuHeader","ModalHeader","MobileMenuBodyContainer","ModalBody","MobileMenuLinksContainer","AccountInfoDropdownParentContainer","AccountInfoDropdownPopoverConentContainer","displayName","Popover","placement","signInLink","_getSigninButton","signOutLink","_getSignOutButton","isOBORequest","switchCustomerLink","_getSwitchCustomerButton","accountInfoDropdownButton","_getAccountInfoDropdownButton","accountLinks","_getAccountLinks","currentDistributor","slotName","SignIn","signInLinkText","signInUrl","signInLinkAriaText","onTelemetryClick","_user$signOutUrl","SignOut","signOutLinkText","signOutUrl","signOutLinkAriaText","SwitchCustomer","isOBOAccountSelected","getAccountSelectionCookie","switchCustomerLinkAriaText","switchCustomerLinkText","getBusinessPartnerSelectionUrl","removeAccountSelectionCookie","shoppingAsText","route","url","URL","location","forEach","param","searchParams","delete","retailServerErrorCode","signUpCustomerNotFound","signUpMultipleCustomerFound","signInCustomerNotAuthorized","retailServerErrorMessage","MyProfile","innerRef","cta","keyCode","KeyCodes","Escape","computed","_renderReactFragment","slot","_renderDesktopAccountBlock","MediaType","getAltText","shouldUseCmsAltText","productName","imageAltText","_context$app","OmniChannelMedia","validateMediaLocationAsync","mediaLocation","Uri","AltText","IsApplicableForChildEntities","isApplicableForChildEntities","http","XMLHttpRequest","status","send","_unused","getValidProductImages","channelId","selectedProduct","catalogId","getCatalogId","actionInput","MediaLocationsForSelectedVariantInput","getMediaLocationsForSelectedVariant","mediaLocations","all","pairs","pair","validateProductImages","MediaGallery","_props$config$zoomedI","_inlineZoomDivRef","Map","fullScreenOverlayButtonRef","player","defaultGalleryImageSettings","sm","md","defaultThumbnailImageSettings","onExiting","onExited","removeInlineZoomStyle","isLastItem","goToIndex","updateZoomedInImage","mediaGalleryItems","isFirstItem","currentIndex","mediaItems","_mediaItems","_this$player$current","mediaTypeValue","Video","play","_this$player$current2","getImagesData","skipImageValidation","_this$props$config$im","_this$props$config$im2","source","imageSource","mediaLocationsForSelectedVariant","_mediaLocation$Uri","_this$props$data$prod","curatedImages","_filterMasterImageFromVariant","_renderCarouselItemVideo","mediaData","videoData","_videoData$_links","playerResources","videoMetaData","videoId","duration","playTime","thumbnail","posterframeUrl","_links","binaryReferences","videoBinaryReferences","videoPlayerData","metaData","Player","playerData","isEditor","params","_renderEmptyImage","_getCarouselItem","_this$props$context$r2","isInPopup","fallBackSrc","fallbackImage","bypassHideOnFailure","_getThumbnailItem","modifiedActiveIndex","ThumbnailItemContainerProps","_generateOnThumbnailClick","onKeyDown","_generateOnThumbnailKeyDown","Picture","imageFallbackOptimize","shouldUseOptimizedImage","getVideoThumbNailItem","classes","_refHandler","divRef","which","Enter","Space","_renderVideoThumbnail","fullScreenTitleText","openModalDialog","_toggleModal","imageModalSlider","ZoomView","_mapProductToImageData","carouselprops","_renderCarouselItemImageView","_zoomedImageSettings","previousScreenshotFlipperText","nextScreenshotFlipperText","showPaginationTooltip","hideIndicator","isDisabledFunctionality","isMobileImageZoomed","carousel","imageModalSliderProps","modalIsOpen","ontoggle","galleryCarousel","classNames","ImagefullView","altTextSource","mediaGalleryImages","isImageZoomed","isInitialLoad","zoomedImageSettings","galleryImageSettings","_onImageMouseOut","_inlineZoomImageOnHover","_onInlineImageClick","_onContainerZoomImageClick","_onMouseOutLensContainer","Viewport","_this$props$config$im3","_this$props$context$r3","shouldUpdateOnPartialDimensionSelection","_setRenderType","_this$props$config$th","thumbnailImageSettings","_setImages","_this$props$config$th2","productVariant","_product$productVaria","_this$props$context$a","_this$props$config$th3","_actionContext$reques","isPreview","response","commerceApiRequest","previewImageData","displayOrder","DisplayOrder","MediaTypeValue","_mediaLocation$Uri2","getProductImages","fireImmediately","_this$props$config$th4","_this$props$context$a2","isVertical","thumbnailsOrientation","isFullscreenAllowed","allowFullScreen","zoomViewMode","imageZoom","emptyPlaceHolderImage","placeholderImageName","_this$props$context$r4","getFallbackImageUrl","mediaGalleryCarouselItems","_getMediaGalleryItems","mediaGalleryThumbnailCarouselItems","_getMediaGalleryThumbnailItems","callbackToggle","callbackThumbnailClick","callbackThumbnailKeyDown","CarouselProps","Thumbnails","ThumbnailsContainerProps","SingleSlideCarouselComponentProps","SingleSlideCarousel","vertical","flipperPrevLabel","flipperNextLabel","parentId","useTabList","lastUpdate","defaultKey","_getEmptyThumbnailItem","zoomView","curatedImage","mediaToSet","commerceVideoMetadataRequest","getVideoMetadataFromApi","element","Date","now","media","_renderImageInContainerOnZoom","_renderImageFullScreenOnZoom","_renderImageInlineOnZoom","_this$props$config$sh","_this$props$data$prod2","_this$props$data$prod3","_this$props$data$prod4","shouldHidePrimaryImages","shouldHideMasterProductImagesForVariant","variantImages","isVariantProduct","ObjectExtensions","isNullOrUndefined","MasterProductId","_item$additionalPrope","_this$props$config$da","dataScale","defaultDataScale","onMouseOver","onMouseMove","inlineZoomImageOnMouseMove","_this$props$config$da2","inlineZoomImageOnHover","String","_handleMobileViewZoomedImageClick","currentTarget","mobileZoomedInImageClassName","transform","classList","remove","overflow","_this$props$config$da3","bounds","getBoundingClientRect","positionX","clientX","positionY","clientY","scaledPositionX","scaledPositionY","add","scrollTo","_this$props$config$da4","innerWidth","inlineZoomInitClick","inlineZoomImageOnMouseOut","onContainerZoomInit","onMouseOutLensContainer","_this$props$config$da5","onMouseOut","onMouseMoveLensContainer","onMouseOverImageContainer","_this$fullScreenOverl","parentDiv","children","querySelector","removeContainerZoomStyle","_renderThumbnails","thumbnails","_renderThumbnailItem","OrderTemplateActions","onRemoveOrderTemplate","handlers","itemKey","removeOrderTemplateActionHandler","OrderTemplateRender","orderTemplate","removeFromOrderTemplateListText","orderTemplateState","enableImageProductLink","onDismiss","orderTemplateImage","_renderOrderTemplateImages","orderTemplateLines","orderTemplateAriaLabel","_renderAriaLabel","orderTemplateName","_getOrderTemplatePageUrl","_getUrlSync","getUrlSync","separator","totalLines","addToCartButton","AddOrderTemplateToCartComponent","moduleTypeName","addToCartText","addToBagText","dialogStrings","isMultipleCatalogFeatureEnabledInHq","removeButton","orderTemplateStatusMessage","userMessage","statusCssString","onClickHandler","count","slice","line","_line$productListLine","_line$fullProduct$Pro","_line$fullProduct","_line$fullProduct2","_line$fullProduct$Pro2","_line$fullProduct3","_getFallbackImageUrl","_line$fullProduct4","_context$request$app","fullProduct","_updateProductUrlCatalog","ProductDetails","productListLine","CatalogId","productDetails","getProductUrlSync","StringExtensions","isNullOrWhitespace","fullUrl","OrderTemplateListStatusMessage","errorType","modalCloseButtonReference","onCancelHandler","isCreateOrderTemplateDialogOpen","setOrderTemplateNameDialogOpen","useState","onCreateButtonClick","createOrderTemplateText","OrderTemplateNameDialog","modalOpen","isUpdateDialog","setModalOpen","createOrderTemplateDialogResources","onCancel","onSuccess","onOrderTemplateCreated","OrderTemplateList","_isChannelMultipleCatalogsFeatureEnabled","_this$props$data$feat","featureState","feature","IsEnabled","_onDismiss","_reloadPage","reload","_onRemoveFromOrderTemplateList","productListId","orderTemplates","token","p","productList","deleteAsync","warning","headerStatusMessage","deleteOrderTemplateFailedText","messageGlyph","_heading$text","_heading$tag3","emptyOrderTemplateText","createNewTemplateButtonText","orderTemplatesData","orderTemplateListHeading","orderTemplateListTitle","errorProps","statusMessage","Spinner","msg","progressNotificationText","Heading","_heading$tag2","emptyViewProps","createOrderTemplateButton","CreateNewTemplateButtonComponent","_generateOrderTemplateNameDialogResources","templateHeaderStatusMessage","OrderTemplates","OrderTemplate","_renderOrderTemplateList","orderTemplateHeaderLabel","createOrderTemplateHeader","orderTemplateTitleLabel","orderTemplateTitle","orderTemplateNameAriaLabel","orderTemplateDescription","createOrderTemplateDescription","defaultOrderTemplateName","orderTemplateButtonLabel","createOrderTemplateButtonText","orderTemplateCancelButtonLabel","cancelNewOrderTemplateCreationButtonText","currentTemplateProps","addToBagButtonText","moduleId","closeWindowButtonText","addToCartFailureMessage","addToCartSuccessMessage","addToCartProcessMessage","orderTemplateErrorMessage","linesAddedToCartDialogResources","viewCartButtonText","orderTemplateCloseButtonText","linesAddedToCartHeaderItemsOneText","linesAddedToCartHeaderLinesOneText","linesAddedToCartHeaderLinesFormatText","linesAddedToCartHeaderMessageText","OrderTemplateListView","_renderOrderTemplate","CONTENT","AddLineToTemplate","query","productCatalogs","Search","selectedCatalogId","searchTextInput","addLineButtonRef","_renderSearchForm","searchButtonAriaLabel","searchModalPlaceholderText","selectCatalogTitleText","autoComplete","_onSearchSubmit","htmlFor","_onCatalogSelectionChange","_getCatalogNodes","autoFocus","_onInputChange","maxLength","_get","Loading","_getSearchResults","NotFound","ProductList","_onQuantityChangeHandler","selectedQuantity","_onSelectItem","varianteInput","SelectedVariantInput","getSelectedVariant","dimensions","_getProductDimensions","selectedProductDimensions","ProductConfiguration","_onBackButtonClickHandler","_highlightSearchTerm","parsedName","unescape","dangerouslySetInnerHTML","__html","_resultCountText","searchResultsCountVerbage","searchResultsCountSubject","_addItemToTemplateHandler","orderTemplateId","AddItemToOrderTemplateInput","quantity","DefaultUnitOfMeasure","addItemToOrderTemplate","reloadPage","_toggleModalHandler","_getCatalogs","onComponentDidMount","_this$searchTextInput","onComponentDidUpdate","_this$searchTextInput2","addLineModalLinkText","backToResultsText","modalProps","showBackArrow","_renderContent","addToTemplateHandler","onQuantityChangeHandler","highlightSearchTerm","searchForm","productProps","clickHandler","renderResultCountText","notFoundSearchErrorNotice","notFoundSearchErrorRedediation","NotFoundComponent","searchErrorMessage","catalogs","validateCatalogId","productCatalog","isSelected","selected","searchText","searchCriteriaInput","Context","ChannelId","IncludeAttributes","SearchCondition","searchByCriteriaAsync","getDimensionsForSelectedVariant","GetDimensionsForSelectedVariantInput","Dropdown","selectMenu","_onChanged","selectedIndex","dropdownId","selectId","selectedValue","innerText","dropdownList","dropdownName","OrderTemplateQuantity","_validateMin","minValue","min","isNaN","currentInput","currentCount","_handleChange","glyphMinusClassName","decrementGlyphClass","glyphPlusClassName","incrementGlyphClass","incDisabled","max","currentValue","extraClass","getChangeHandler","amount","_onIncrementalChange","decrementButtonAriaLabel","pattern","inputQuantityAriaLabel","incrementButtonAriaLabel","updatedQuantity","e","inputElement","HTMLInputElement","_debounce","setAttribute","defaultProps","selectedDimensions","_getDimensionsError","dimensionName","dimensionMissingError","_addToTemplateHandler","isBusy","showAddConfirmation","errors","missingDimensions","dimension","DimensionTypeValue","ProductListId","addToTemplateDuplicateError","addToTemplateGenericError","_onQuantityChange","newValue","totalPrice","_updateDimensionValue","productDimensionFull","newValueId","DimensionValues","_onDimensionChanged","_this$state$errors","remainingDimensionsErrors","selection","buttonDisabled","mappedDimensions","DimensionValue","ExtensionProperties","variantProduct","dimensionInput","variantDimensions","availabilityInput","ProductAvailabilitiesForSelectedVariantInput","newAvailableQuantity","getProductAvailabilitiesForSelectedVariant","priceInput","PriceForSelectedVariantInput","productPrice","getPriceForSelectedVariant","productAvailableQuantity","unitPrice","sort","a","b","_getDropdownName","dimensionType","productDimensionTypeColor","productDimensionTypeConfiguration","productDimensionTypeSize","productDimensionTypeStyle","_product$Name2","addItemToTemplateText","addLineProductUnitPricePrefix","quantitySelectLabel","addLineProductUnitOfMeasurePrefix","totalPriceLabel","isMultipleCatalogSelect","_formatPrice","_getDimensionsNodes","ModalFooter","_getConfirmationMessage","selectedDimensionNames","_dimension$DimensionV","Value","addToTemplateConfirmation","values","_this$state$errors2","unshift","selectProductButtonText","_generateImageUrl","_props$context$reques","primaryImageSource","generateImageUrl","fallBackImg","ProductSelectButton","setBusy","getClickHandler","OrderTemplateBulkActions","isAddDisabled","isRemoveDisabled","addHandler","onAddSelectionToBag","removeHandler","onRemoveSelection","selectedLines","_this$props$data$cata","searchInputAriaLabel","backButtonText","addSelectedToBagButtonText","removeSelectedToBagButtonText","addLineProps","isMinifiedView","removeOrderActionHandler","_removeOrderTemplate","onRemoveTemplate","_getOrderTemplateAddToCartDialog","addTemplateToBagButtonText","_getOrderTemplateRenameControl","renameOrderTemplateDialogStrings","RenameOrderTemplateComponent","onRenameTemplate","renameOrderTemplateButtonText","renameTemplateButtonText","buttonEventReference","ActionsSplitButton","isStatementRequestAdminDropdownOpen","setIsStatementRequestAdminDropdownOpen","renameOrderTemplateDialogOpen","onToggleDropdown1","popoverReference","renderModalPopup","existingOrderTemplate","onOrderTemplateNameCancel","_buttonEventReference","requestStatementDropdownString","Random","Guid","generateGuid","OrderTemplateLineActions","orderTemplateLine","LineId","onAddToBag","onRemoveItem","getAddToBag","getRemoveItem","PopUp","removeFromOrderTemplateLinesText","moreButtonText","viewProductDetailsText","showMobile","setShowMobile","toggleDetailsDisplayed","getActionButton","removeButtonClassName","addButtonClassName","getDesktopActionButton","onSelectLineHandler","isChecked","onSelect","checked","ExtraActionsPopup","showActions","setShowActions","actionsContainerClassName","OrderTemplateMobileLineView","_context$request$app2","UnitOfMeasure","productLineCatalog","renderProductCatalog","productImage","_renderProductImage","productInfo","renderProductInfo","_renderPrice","productNumber","productUnitOfMeasure","productQuantityView","_generateQuantity","onChangeHandler","onChangeQuantity","isQuantityDisabledForUpdate","_context$actionContex","_context$request","isB2b","catalog","currentPriceText","_renderProductError","OOS","outOfStockProductErrorMessage","UNASSORTED","unavailableProductErrorMessage","NONE","_orderTemplateLine$fu","Dimensions","_renderProductDimensions","dimensionsLine","OrderTemplateLinesStatusMessage","OrderTemplateTableHeading","componentClassName","getOnChange","checkedLines","lines","scope","selectAllRowsText","productLineCatalogName","productUnitPrice","productUOM","productQuantity","productActions","OrderTemplateLines","_onRemoveSelection","removeSelectedFailureMessage","removeSelectedSuccessMessage","productSelection","productListLines","maxWaitTimeInMilliSeconds","removeProductListLinesAsync","_this$props$data$orde","indexOf","_onAddSelectionToBag","productLine","_productLine$fullProd","_productLine$fullProd2","_productLine$fullProd3","_productLine$fullProd4","_productLine$productL","ProductTypeValue","Quantity","_addItemToBag","_getCurrentUrl","reqContext","requestUrl","onCloseHandler","isItemAddedToOrderTemplateOpen","_renderItemAddedToCartDialog","_this$props$data$feat2","itemAddedToCartDialogData","ItemAddedToCartDialog","_generateItemAddedToCartDialogResources","onClose","_renderPagination","itemsPerPage","skipCount","_getCurrentPageNumber","totalItems","previousText","nextText","UncontrolledPagination","paginationAriaLabel","qsp","startingItem","_renderPrev","_renderNext","previousAriaLabel","nextAriaLabel","_toggleDetailsDisplayed","isDetailsDisplayed","detailedProductView","absoluteUrl","_changeQuantity","orderTemplateLinesData","orderLineIndex","findIndex","newProductListLine","prevQuantity","_objectWithoutProperties","_excluded","updateProductListLinesAsync","list","newLine","updatedLines","updatedOrderTemplate","ProductListLines","update","ActiveOrderTemplateLinesInput","editOrderTemplateLineQuantityError","maxQuantityLimitText","addedToCartFailureMessage","addProductToCartInput","addProductToCart","priceResult","AsyncResult","reject","isMiniCart","addToCartBehavior","substatus","maxQuantityForCartLineItem","_cart$result","_cart$result2","cartLineQuantity","CartLines","ProductId","defaultMessage","_result$errorDetails","errorDetails","LocalizedMessage","_removeItemFromOrderTemplateLines","userToken","featureStates","getFeatureState","createGetFeatureStateInput","_featureStates$find","_renameTemplate","_removeTemplate","_orderTemplate$result","newLink","_getViewport","device","Type","paginationPreviousText","paginationNextText","_viewport","_updateViewport","isConfirmAddSelectionToBagModalOpen","emptyOrderTemplateLinesText","errorGettingOrderTemplateLines","orderTemplateResult","_isFirstPage","orderActions","_renderOrderTemplateActions","bulkOrderLineActions","_getOrderTemplateLineActions","productsStatusMessage","ProductsTable","ProductsTableRow","ProductsTableHeading","_renderProductListHeader","orderLines","_renderProductList","callbacks","updateQuantity","debounce","pagination","itemAddedToCartDialog","updated","_product$fullProduct","onSelectAll","productNumberText","productText","productUnitPriceText","productUOMText","productQuantityText","productActionsText","headers","_generateLinesAddedToCartDialogResources","itemAddedToCartHeaderItemOneText","itemAddedToCartHeaderItemFormatText","itemAddedToCartHeaderMessageText","deleteTemplateButtonText","addTemplateToBag","renameTemplate","removeTemplate","actionsSplitButton","OrderTemplateActionsView","renameOrderTemplateTitleText","cancelBtnLabel","skip","selectOneRowText","priceFree","addOrderTemplateItemToBagButtonText","removeItemFromOrderTemplateButtonText","deleteButtonText","selectLine","addToBagButton","extraActionsPopup","popUp","shouldDisable","OrderTemplateLineView","ProductPrice","observable","action","_renderItem","quantityLabel","disableElement","pointerEvents","opacity","toggleDetails","applicationNode","QuickOrderDrawer","_toggle","isManuallyToggled","collapseProps","drawerGlyphClass","toggleGlyphClassName","animateGlyph","drawerOpenGlyph","openGlyph","closeGlyph","drawerCloseGlyph","drawerClass","toggleButtonProps","block","_generateDrawerButtonInnerMarkup","Collapse","collapseState","drawerButtonTextClass","toggleButtonClassName","moduleHeadingText","moduleDescriptionText","_generateGlyphMarkup","glyphClass","onToggle","QuickOrderFormComponent","productTextInput","quantityTextInput","quickOrderState","maxChars","maxQuantity","disableAddtoCart","ariaLabelQuantity","ariaLabelProduct","ariaLabelAddtoCart","addQuantityPlaceholderText","handleQuantityChange","handleInputChange","handleAddToCartClick","onInputChange","onInputChangeFunction","onQuantityInputChange","onQuantityChangeFunction","productNode","quantityNode","addToCartBtn","stateMessage","messageText","QuickOrderProduct","cartLine","simpleProduct","QuickOrderDesktopHeaderCellsComponent","columnWithNumberClassName","quickOrderProductNumberText","quickOrderProductText","quickOrderUnitPriceText","quickOrderUnitOfMeasureText","quickOrderQuantityText","quickOrderTotalText","quickOrderActionsText","QuickOrderMobileHeaderCellsComponent","QuickOrderTableHeaderComponent","rowClassName","headerCells","QuickOrderTableRowProductImageComponent","_props$data$product$P","_props$imageSettings","fallbackImageUrl","containerClassName","QuickOrderExtraActionsPopupComponent","QuickOrderDesktopTableRowCellComponent","_product$Dimensions","_cartLine$LineId","dimensionValue","quickOrderProductDimensionsSeparator","UnitOfMeasureSymbol","IncrementalQuantity","quickOrderInputQuantityAriaLabel","quickOrderDecrementButtonAriaLabel","quickOrderIncrementButtonAriaLabel","isGiftCard","IsGiftCard","TotalAmount","quickOrderRemoveItemButtonAriaLabel","QuickOrderMobileTableRowCellComponent","quickOrderQuantityMobileText","QuickOrderTableRowComponent","QuickOrderTableComponent","setIsMobile","isMobileView","quickOrderProducts","updateViewport","quickOrderProduct","QuickOrder","waitTime","dimensionUpdateQueue","FinitePromiseQueue","initializedDimensions","Set","cssClassNameConfigure","quickOrderCallbacks","initializeDimension","initializedDimension","dimensionSelectedAsync","selectedDimensionId","selectedDimensionValueId","_this$state$productDi","size","productDimensions","enqueue","_updateDimensions","FinitePromiseQueueError","ProcessWasDiscardedFromTheQueue","getDropdownName","changeUpdatingDimension","isUpdatingDimension","_handleInputChange","productResponse","inputQuantityText","quantityInput","cancellableDebounce","cancel","isQuickOrderFormExpanded","getScanResult","GetScanResultInput","results","Product","ProductDimensionFull","_addItemToCart","quickOrderAddedToCartSuccessMessage","quickOrderAddedToCartFailureMessage","_validateCart","deliveryOptions","getDeliveryOptionsAsync","QueryResultSettingsProxy","getPagingFromInputDataOrDefaultValue","emailDeliveryModeCode","channel","EmailDeliveryModeCode","defaultDeliveryOption","DeliveryOptions","Code","_updateAvailability","shouldValidateQuantityLimits","_shouldValidateQuantityLimits","enableStockCheck","availableQuantity","ProductAvailableQuantity","AvailableQuantity","orderQuantityLimitsFeatureIsEnabled","isAddEmailDeliveryItemToCart","deliveryMode","inputProductText","maxQtyLimitReachedMessage","_getMaxQtyMessage","_featureStatuses$find","_featureStatuses$find2","_featureStatuses$find3","featureStatuses","defaultOrderQuantityLimitsFeatureConfig","platform","enableDefaultOrderQuantityLimits","customerInfo","customerInformation","isOrderQuantityLimitsFeatureEnabledInSiteSettings","IsB2b","_this$props$data$cart","_cartConfiguration$Ig","cartConfiguration","IgnoreOrderSettings","_getConcatenatedMaxQtyMessage","currentQuantity","quickOrderMaxQuantityLimitText","quickOrderAlreadyItemQuantityText","_handleQuantityChange","_this$state$productRe","productDimensionTypeAmount","dimensionsToUpdate","productDimensionErrorState","otherError","clearOtherErrorState","configureErrors","errorState","newProduct","productAvailable","_getDimensionErrorString","dimensionTypeValue","quickOrderproductDimensionTypeColorErrorMessage","quickOrderproductDimensionTypeConfigurationErrorMessage","quickOrderproductDimensionTypeSizeErrorMessage","quickOrderproductDimensionTypeAmountErrorMessage","quickOrderproductDimensionTypeStyleErrorMessage","_updateProductAvailability","_productResponse$Dime","_getConfigureErrors","quickOrderWrongQuantityErrorMsg","quickOrderOutofStockErrorMsg","quickOrderFormClass","quickOrderFormProductContent","quickOrderFormMsgContent","quickOrderModuleHeading","quickOrderModuleDescription","quickOrderAddtobag","quickOrderProductQuantityInputLabel","quickOrderProductInputLabel","quickOrderProductDimensionTypeColor","quickOrderProductDimensionTypeConfiguration","quickOrderSelectDimensionFormatString","quickOrderProductDimensionTypeSize","quickOrderProductDimensionTypeStyle","quickOrderProductDimensionTypeAmount","quickAddQuantityPlaceholderText","productConfigureResources","selectDimensionFormatString","quickOrderProps","contentProps","isB2B","drawer","quickOrderForm","quickOrderList","_renderQuickOrderTable","configure","getProductConfigure","_initQuickOrderProducts","_cart$cart$CartLines","validValues","tableClassName","productInventoryInfo","maxQuantityForLineItem","updateMaxQuantityForCartLineItem","addedQuantity","_item$ItemId","_this$state$productRe2","minInventory","renderConfigure","containerProps","dropdowns","renderConfigureDropdown","dropdown","labelContainerProps","select","renderForm","quickOrderProductContent","quickOrderMsgContent","createObservableDataAction","tenantId","inputIsValid","trace","serviceEndpoint","locale","sendRequest","userReviewData","Authorization","authorization","SubmitUserReviewInput","getCacheKey","getCacheObjectType","dataCacheType","onClickSubmit","ReviewModal","SubmitReview","submitButtonAttribute","Cancel","cancelButtonAttribute","modal","modalCSS","onModalToggle","returnFocusRef","returnRef","modalHeader","modalHeaderNode","modalFooter","modalBody","cancelButton","discardReviewButtonText","submitButton","submitDisabled","submitReviewButtonText","ratingsInput","ratingLabel","ratingsLabel","titleInput","titleLabel","textInput","textLabel","privacyPolicyUrl","privacyPolicyLink","inputRow","hasError","errorMessageText","userReview","reviewId","editReviewModalTitle","writeReviewModalTitle","stripWhiteSpacesFromString","reviewText","reviewTitle","selectRatingAriaLabel","initialRating","parentType","onRatingChange","selectRatingLabel","reviewTitleMaxLength","renderContextId","onTitleChange","reviewTitleAriaLabel","reviewTitleLabel","reviewTextMaxLength","rows","reviewAriaLabel","reviewTextLabel","policyTextBlocks","privacyPolicyTextFormat","isSeparatorAtStart","startsWith","isSeparatorAtEnd","endsWith","PrivacyPolicy","privacyPolicyAttribute","privacyPolicyTitle","submitReview","onReviewComplete","onReviewSubmission","getRnrPartnerId","userEmail","emailAddress","userName","getRnrAuthEndpointId","submitUserReview","review","submittedDateTime","helpfulPositive","helpfulNegative","firstName","getReviewInput","GetUserReviewInput","TOGGLE_REVIEW_MODAL_BUTTON_ID","TOGGLE_EDIT_MODAL_BUTTON_CARD_ID","HistogramItems","ratingsSummary","totalRatingsCount","renderItem","star5Count","star4Count","star3Count","star2Count","star1Count","stars","totalCount","percentage","formattedPercent","Intl","NumberFormat","barItemAriaLabel","starLabel","bar","Progress","buttonProps","AverageRatingNumber","summary","averageRating","TotalReviews","RatingsHistogram","handleHeadingChange","selectFilterBy","completeClass","histogramItems","averageRatingAriaLabel","hideCount","averageNumber","totalReviews","ratingsSummaryProps","histogramProps","filterKey","createRatingsReviewsStateInput","histogramItem","authToken","requestBody","concernCategory","requestHeader","isHelpful","ReviewConcernCategory","ReportReviewConcernInput","ReviewCount","currentPage","reviewsCount","reviewsShownOnEachPage","pageReviewCountText","_getReviewStartNumber","_getReviewEndNumber","PageControls","previousPageClick","_getPreviousPageData","nextPageClick","_getNextPageData","Next","nextAttribute","Previous","previousAttribute","_hasPreviousPage","_paginationAriaLabel","pageReviewAriaLabel","previousButtonText","_hasNextPage","nextButtonText","_getPagesCount","_getReviewsShown","ceil","isNextPage","page","pageModifier","pageReviewCount","updateReviews","selectedSortByOption","selectedFilterByOption","reportConcernDropdownOptions","radioPairs","option","inputId","reportedKey","onRadioChange","reviewRatingNarratorText","voteHelpfulButton","isVoted","isVotedFor","i","votedReviews","approved","isDisabled","isUserReview","isOboRequest","yesButtonText","noButtonText","voteCount","onClickMethod","updateReviewHelpfulness","editButton","toggleWriteReviewModal","editReviewCardText","renderDate","date","DateTimeFormat","day","toggleReportReviewModal","reportToggle","reportConcernText","reportedReviews","reportedText","reportedReviewId","SubmitHelpfulnessVoteInput","ReviewsList","sortByDropdownOptions","mostHelpfulSortOptionText","mostRecentSortOptionText","highestRatedSortOptionText","lowestRatedSortOptionText","filterByDropdownOptions","allRatinsFilterByOptionText","fiveStarFilterByOptionText","fourStarFilterByOptionText","threeStarFilterByOptionText","twoStarFilterByOptionText","oneStarFilterByOptionText","reviewsListCallbacks","updateReviewTitle","userReviewTitle","updateReviewText","userReviewText","updateRating","userReviewRating","onReviewSubmitted","isSuccessful","isReviewModalOpen","hasReviewError","toggleModal","_toggleReviewModal","updateReviewHelpfulnessVote","toggleReportModal","isReportModalOpen","_onReportModalOpen","_onReportModalClose","reportReview","_reportReviewCallback","updateFilterByDropdown","updateSortByDropdown","reviewsList","pagingInfo","listOfReviews","isFilterApplied","ratingsReviewsState","filterKeyValue","dropdownItemsCount","filterByOption","_userReview","_reviewCard","_reviewCards","reviewList","reviewElements","isTakenDown","isPublished","cardProps","ratingHelpfulLabel","wasReviewHelpfulText","like","dislike","edit","report","responseName","userResponse","responderName","responseText","responseDate","cardBodyProps","responseProps","reviewProps","controlsProps","headerProps","ReviewCard","_userReportModalToggle","reportingReviewId","_userReviewModal","_onTitleChange","_onTextChange","_onRatingChange","_onReviewComplete","_userReviewModalToggle","isSuccess","_reportReviewModal","submitReviewAttribute","SuccessButton","successAttribute","cancelAttribute","SpamAdvertising","reportSpamText","OffensiveContent","offensiveContentText","Profanity","profanityContentText","header","headerSubmitted","feedbackThankYouText","cancelReportReviewText","reportReviewButtonText","succesfulButton","okReportReviewText","reportMessage","reportModalMessage","reportSubmittedMessage","radioButtons","ReportReviewModal","_onRadioChange","_reportReview","hasReportError","reported","reportReviewConcern","getUserToken","_value","reportedReview","notification","selectedOption","skipItems","getSelectedProductIdFromActionInput","getReviewsForGivenProduct","GetProductReviewsInput","getRnrEndpointId","_updateVoteUi","alreadyExists","concat","submitHelpfulnessVote","showSpinner","reviewModal","reportReviewModal","filterByDropdown","LabeledDropdown","labelText","filterByDropdownText","dropdownOptions","onSelectOption","controlledByParent","sortByDropdown","sortByDropdownText","reviewCount","refineReviewsProps","reviewsListProps","reviewCards","pageControls","noReviewsMessage","noReviewsWithFilterMessage","noReviewsWithSelectedFilterMessage","sortByOptions","filterByOptions","buildReviewCard","createReviewModal","createReportModal","SignInMessage","SignInButton","ModalToggle","WriteReview","writeReviewCallbacks","_modalToggleRef","userInfo","signInMessage","signInButton","signInLabel","signInAriaLabel","modalToggle","editReviewButtonText","reviewButtonLabel","_buildUserReviewModal","ProductRefinerValueDataTypeValue","ProductRefinerTypeValue","ProductRefinerSource","isRangeType","dataTypeValue","AttributeDataType","Currency","Decimal","isRangeTypeForInteger","Integer","isCustomRangeTypeIntegerSelected","selectedRefinementCriterion","parentProductRefinerHierarchy","RowNumber","DataTypeValue","DisplayTemplateValue","DisplayTemplate","Range","isSingleSelectRangeTypeIntegerSelected","productRefinerValue","LeftValueBoundString","RightValueBoundString","findMatchingRefinementCriterion","refinementCriteria","refinementCriterion","isMatchingRefinementCriterion","parent","RefinerRecordId","RefinerSourceValue","getIntegerRangeName","rangeValue","RightValueBoundLocalizedString","LeftValueBoundLocalizedString","getUpdatedRefinementCriteria","itemToggleNotification","currentRefinementCriteria","updatedRefinementCriteria","toggledItemFound","r","selectedCriterion","isSelecting","rangeStart","rangeEnd","Text","TrueFalse","RefinerTypeValue","RefinerType","SingleSelect","Values","child","matchingIndex","criterion","splice","ChoiceSummary","closeButtonGlyph","_onClick","stopPropagation","clearAll","selectedRefiner","_getSelectedRefinerChoice","onChoiceClicked","itemClicked","choiceClicked","nextItemToFocus","nextSibling","_this$props$context","selectedChoices","channelInventoryConfigurationId","refinerHierarchy","productListInventoryDisplay","ProductListInventoryFilteringOptions","HideOOS","choice","hierarchy","_rangeParentDisplay$","rangeParentDisplay","_getKeyForRefinerValue","rangeDisplayType","clearAllText","choiceAriaLabel","closeAriaLabel","selectedRefinersMap","clearAllAttributes","attribute","newIntRange","urlBuilder","_parent","choiceFormat","choiceRangeValueFormat","refinerValues","overallFormat","rangeFormat","refinerValueName","refinerName","KeyName","UnitText","filterValue","refiner","currency","ErrorMessage","FeatureSearchResultItem","recommendation","productRecordId","featureSimilarDescriptionTitle","featureSimilarLooksTitle","img","Link","modalNode","zIndex","modalTitle","modalFooterNode","modalCloseButtonText","getInventoryLabel","AttributeValues","inventoryAttribute","TextValue","ProductSearchResultItems","allowBackNavigation","quickviewSlot","productComparisonButton","isPriceMinMaxEnabled","productsDimensionAvailabilities","priceResources","priceRangeSeparator","ProductComponent","allowBack","quickViewButton","inventoryLabel","swatchItemAriaLabel","dimensionAvailabilities","dimensionAvailability","masterProductId","RangeRefineItem","_selectedRefinementCr","_this$props$selectedR","_this$props$selectedR2","_this$props$selectedR3","_this$props$selectedR4","_formattedPriceReverseLookup","getLabels","sliderId","minPrice","maxPrice","labelId","labelString","labelPositioning","getSliderThumbs","sliderKey","selectedMin","selectedMinPrice","selectedMax","selectedMaxPrice","_this$props$minValueS","_this$props$maxValueS","minValueSliderThumbAriaLabel","ariaValueText","maxValueSliderThumbAriaLabel","_onRangeUpdate","_onRangeUpdateEnd","_handleRangeTooltipText","_changeMin","_changeMax","_finishChangeMin","_finishChangeMax","minInput","maxInput","initialMin","initialMax","maxValue","labels","sliderKeyString","sliderThumbs","validationErrorMin","validationErrorMax","touchedMin","touchedMax","previousProps","updateSliderProps","refineItemCommonProps","rangeType","_renderInputFields","_renderSlider","_ref3","_this$props$selectedR5","_this$props$selectedR6","_ref4","_this$props$selectedR7","_this$props$selectedR8","formAttrs","rangeNameFormat","minInputClassName","maxInputClassName","formattedSelectedMin","_getFormattedSelectedValue","formattedSelectedMax","minLabel","maxLabel","placeholderTextMax","ariaAttributes","Slider","inForm","step","orientation","showLabels","showTooltip","onChangeEnd","handleTooltipText","_changeValue","inputType","selectedKey","touchedKey","_getInputWithoutFormatting","selectedMinValue","minTouched","maxNum","validationErrorNaN","_focus","_validateRange","selectedMaxValue","maxTouched","minNum","touched","validationError","validationErrorRange","inputAsNum","sliderChangeNotification","eventType","firstThumbValue","secondThumbValue","_focusOnSliderThumb","getElementById","tooltip","RefineItem","anchorType","_productRefinerValue$","_this$props$parentPro","_this$props$parentPro2","_this$props","productCountAriaLabel","singleProductCountAriaLabel","refineItemAriaLabel","refineItemsAriaLabel","attrs","isSingleSelect","itemTypeClassName","SourceValue","Rating","_renderRating","productCount","Count","refineMenuItemAriaLabel","shouldDisplayAsSwatch","_getShouldDisplayAsSwatch","hasColor","SwatchColorHexCode","hasImage","SwatchImageUrl","hasContentSwatch","_getRefinerUrl","_renderSwatch","checkIfShouldDisplayAsSwatch","_productRefinerValue$2","swatchItems","colorHexCode","SwatchComponent","isSelectionEnabled","isRefineItem","ratingUserCountAriaLabel","ratingSingleUserCountAriaLabel","_productRefinerValue$3","refinerRating","ratingRefiner","selectedRefinerValues","selectedRating","defaultChkProductCount","ratingComponentClass","productCountAriaLabelValue","RangeRefineItemInput","_changeMinInputRange","_changeMaxInputRange","_applyCustom","invalidData","updateInputRangerProps","_isUndefined","RefineSubmenu","_onToggleItem","_onToggleSubmenu","isExpandedOnInitialLoad","expanded","productRefinerHierarchy","timeout","_renderChildItems","_renderSingleMultiSelect","_renderRange","refinerValuesList","listItems","_getRangeType","SliderWithBars","onUpdateRefiners","prevState","Separator","Title","SearchResultContainer","SearchResultContainer_1","sortOptions","sortByOptionRelevanceDesc","sortByOptionNameAsc","sortByOptionNameDesc","sortByOptionPriceAsc","sortByOptionPriceDesc","sortByOptionRatingDesc","sortByOptionBestSelling","sortByOptionNewScore","sortByOptionTrendingScore","_pageType","urlTokens","pageType","expandrefinerCount","defaultPageNumber","isListPageStateUpdated","_isMounted","_updateVariantAvailability","dimensionsToDisplayOnProductCard","dimensionsInProductCard","dimensionsToDisplayAsSwatch","dimensionsAsSwatchType","DimensionTypes","none","includeAttributes","_getProductsDimensionsAvailabilities","_updateListPageState","listPageState","_this$props$config$it","_this$props$config$it2","querySorting","sorting","parse","decodeURIComponent","currentPageNumber","sortingCritera","Columns","pageSize","activeProducts","totalProductCount","activeFilters","hydrateRefinersFromUrl","featureProduct","_this$props$data$list","_this$props$data$list2","productsList","getDimensionAvailabilitiesForProductSearchResultAction","DimensionAvailabilitiesForProductSearchResultInput","DimensionSwatchDisplayTypes","_getActivePrice","_this$props$data$list3","_this$props$data$list4","getPriceForProductSearchResult","PriceForProductSearchResultInput","_getSearchResultModal","SearchResultModal","_getCollectionTitle","collectionTitle","category","getFriendlyName","NameTranslations","productCountNumber","productCountText","numberOfProducts","oneProduct","TitleContainer","toLowerCase","titlePrefix","searchTextPrefix","titleText","titleCount","_getCategoryHierarchy","categoryHierarchy","CategoryHierarchyContainer","categoryHierarchyList","categoryLinkAriaLabel","Url","categoryHierarchySeparator","_getSortingDropDown","activeDropdown","_getCurrentlySelectedOption","sortingState","_getAllSortByOptions","dropdownOption","SortingContainer","sortByDropDown","labelClassname","sortByDropdownLabel","dropdownClassname","toggleColor","_updateSortByDropdown","_sortAndFilterContainerRef","_getPagination","getCurrentUrl","_getRefineMenu","tempRangeTypeTODO","inputRange","validRefiners","updateRefinerPanel","refiners","_shouldHideFromRefiners","activeRefiners","_getexpandRefinerCount","expandRefinersCount","expandedRefiners","RefineMenuContainer","RefinerSectionContainer","_refineItemCommonProps","_onUpdateRefiners","_buildRefinerUrl","channelInventoryConfiguration","isInventorySortableAttribute","inventoryAwareSortableAttributeId","ProductAvailabilitySortableAttributeRecordId","isInventoryProductAttribute","InventoryProductAttributeRecordId","_getChoiceSummary","_this$props$data$refi","selectedRefiners","choiceSummaryLabel","_onChoiceClicked","_buildRefinerUrlForChoiceSummary","_getProducts","_this$props$slots","_this$props$data$prod5","shouldAllowBackNavigation","breadCrumbType","breadcrumbType","shouldAllowBack","quickview","isPriceMinMaxFeatureState","history","pushState","buildListPageUrl","_getSortColumnFromSelectedOption","transaction","searchConfiguration","mappedConfiguration","sortColumn","_getSortCriteriaColumn","_this$props$data$list5","sortCriteria","queryColumns","parseQueryParam","mappedSearchConfiguration","mappedSearchConfig","activeSortColumn","activeMappedConfig","ColumnName","IsDescending","_this$props$data$list6","newRefinementCriteria","dropdownElementId","dropdownElement","selectedChoice","isClearAll","refinerCount","productPrices","pending","validationErrorNotNumber","validationErrorNotRange","nameTranslations","_nameTranslation","nameTranslation","Language","StoreOperationsDataActions","_listPageState$active","_listPageState$sortin","_newListPageState$cur","_newListPageState$sor","_newListPageState$act","_this$props$context$r5","_this$props$context$r6","_this$props$context$r7","newListPageState","GetFullProductsByCollectionInput","Paging","Top","Skip","Sorting","recordId","Recommendation","getCollectionProducts","enableAffiliationBasedPricing","_newListPageState$cur2","_newListPageState$sor2","_newListPageState$act2","_this$props$context$r8","_this$props$context$r9","refinerInput","RefinersByCollectionInput","getCollectionRefinersAction","_listPageState$result","_listPageState$result2","_this$props$context$r10","_this$props$data$list7","_this$props$data$list8","productCollection","searchProduct","errorText","resultCategoryNotFoundText","resultSearchNotFoundText","productsComponent","featureComponent","searchResultContainerViewProps","TitleViewProps","disableHierarchy","refineMenu","ProductsContainer","ProductSectionContainer","CategoryNavContainer","RefineAndProductSectionContainer","choiceSummary","searchResultModal","FeatureSearchContainer","similarLookProduct","createSearchResultModal","isRecoSearchPage","createModalBody","renderSort","renderRefiner","submenu","renderCategoryHierarchy","renderTitle","renderTitleCount","_props$context$action","SearchState","SuggestionType","AutoSuggestInput","suggestionType","hitPrefix","hitSuffix","searchQuery","topResultsCount","_getAutoSuggest","autosuggest","_ctx$requestContext$a","productSearchCriteria","inventoryRefinerValue","getInventorySortableRefinerValue","isInStock","Attribute","getInventoryConfigurationAsync","Refinement","searchCriteria","ProductSearchCriteria","HitPrefix","HitSuffix","searchSuggestions","getSearchSuggestionsAsync","ImageUrl","AllSearchResults","autoSuggestPromises","inputData","CategorySuggestionsComponent","suggestions","autoSuggestProps","categorySuggestionHeading","reactNodes","_assembleNode","_renderTitle","categoryAutoSuggestionHeading","shouldShowFullPath","splitValue","pop","_generateLink","_getHighlightedText","suggestion","_getCategoryLink","_categoryRefiners$Val","searchPageURL","searchQsp","searchRefiners","queryUrl","categoryRefiners","Category","encodedRefiner","compressRefiners","formattedText","getRichTextHtml","compressedRefinerKeys","compressedRefiners","compressedRefiner","refinerKey","FormComponent","searchPlaceholder","hideSearchLabel","disableSubmitSearch","handleCancelSearchChange","ariaLabelCancel","ariaLabelSearch","ariaLabelSubmit","inputNode","submitBtnNode","cancelBtn","submitBtn","KeywordSuggestionsComponent","formattedLink","LabelComponent","searchLabelClass","searchLabelArialLabel","isSearchFormExpanded","searchtext","searchCollapsedLabel","ProductSuggestionsComponent","productSuggestionHeading","productAutoSuggestionHeading","_item$Value","Value3","DecimalValue","_renderThumbnail","LiProduct","_getLiWrapper","AProduct","_getAWrapper","recid","_props$resources","_isLoadingNode","loadingText","autoSuggestResultLoadingMessage","SpinnerSize","medium","labelPosition","_focusOutTarget","closest","_clearAutoSuggestState","_keyup","formReference","autoSuggestResultDiv","searchState","defaultBasicSearchUrl","searchQueryStringParameter","createSearchStateInput","cancellabelDebounce","inputSuggestionType","_loadSuggestions","_handleSubmit","searchURL","_appendQueryParams","_handleCancelSearchChange","isInitialState","_handleCancelSearchFocused","_setAutoSuggestResultCount","autoSuggestResultScreenReaderDiv","ariaLiveRegion","suggestResultString","autoSuggestFoundMessage","emptyResultString","noAutoSuggestionMessage","searchKeywordSuggestClass","searchProductSuggestClass","searchCategorySuggestClass","autoSuggestAriaLabel","isLoadingAutoSuggest","searchInputMaxLength","searchFormClass","_initSuggestionTypes","_suggestions$AllSearc","_suggestions$AllSearc2","_suggestions$AllSearc3","cancelBtnAriaLabel","searchBtnAriaLabel","submitBtnAriaLabel","searchplaceholderText","shouldShowFullCategoryPath","keywordSuggestions","Keyword","productSuggestions","categorySuggestions","_item$RefinerRecordId","AutoSuggestAriaLabel","AutoSuggestAriaLabelText","AutoSuggest","KeywordSuggest","ProductSuggest","CategorySuggest","SearchForm","FormWrapper","UlKeyword","UlProduct","UlCategory","autosuggestKeyword","autosuggestProduct","autosuggestCategory","handleCancelSearchFocused","isLoadingNode","suggestionTypes","suggestionTypeCriterion","unique","validSuggestions","loadSuggestionsRequestId","getSearchSuggestionsAction","_getSuggestionType","_getSearchRefiners","_getSearchSuggestions","_updateSearchRefiners","suggestionTypeItem","charAt","toUpperCase","ProductsDataActions","_renderForm","_renderKeywordSuggestions","_renderProductSuggestions","_renderCategorySuggestions","SocialShareItem","_getSocialShareItem","viewprops","SocialShareItemElement","icon","socialMedia","SocialMediaComponent","SocialMedia","Facebook","postUrl","Twitter","Pinterest","Linkedin","Mail","SocialShareItemView","getAdditionalContentItems","additionalContentItemContainer","videoPlayerAdditionalContent","additionalContentItems","VideoPlayer","isMobileDevice","video","playAriaLabel","playLabel","pauseAriaLabel","pauseLabel","playingAriaLabel","playingLabel","pausedAriaLabel","pausedLabel","muteAriaLabel","muteLabel","unMuteAriaLabel","unMuteLabel","fullScreenAriaLabel","fullScreenLabel","exitFullScreenAriaLabel","exitFullScreenLabel","seekBarLabel","videoTimeDurationLabel","closedCaptionLabel","_video$_links","_getVideoDetailsHeading","_getVideoDetailsParagraph","_getVideoDetailsLinks","detailsContainerCTA","handleText","handleParagraph","handleLink","handleAdditionalLink","WishlistItemDimension","WishListItemActions","onAddToCart","formattedPrice","CurrencyCode","productDimension","renderProductLink","productAttributes","productPageUrlWithSwatch","renderInventoryInformationLabel","inventoryInformationLabel","inventoryLabelClassName","inventoryCssName","WishlistItemAddToCartButtonComponent","outOfStockText","isServiceItem","ItemTypeValue","ReleasedProductType","Service","addItemAction","WishlistItemRemoveFromWishlistButtonComponent","removeFromWishlistText","removeItemAction","renderUnitOfMeasure","unitOfMeasure","unitOfMeasureDisplayType","WishlistItem","wishlistState","msdyn365Commerce","_props$product$Dimens","convertProductDimensionTypeToDimensionTypes","_getFullProductLink","productLink","entireProductLink","productAriaLabel","inventoryInformation","productStatusMessage","WishlistItemsStatusMessage","WishlistItems","_renderHeading","productAvailability","addedToCartSuccessMessage","invoiceInCartErrorMessage","productInventoryInformation","_getProductInventory","_product$Behavior$Min","_product$Behavior","validateQuantity","isQuantityValidationRequired","respectQuantityLimits","Behavior","MinimumQuantity","_await$cart$cart","curQuantity","_getInventoryValueMessage","_result$errorDetails2","isChannelQuantityLimitsFeatureEnabledInHq","isOrderQuantityLimitsFeatureEnabled","_this$props$data$cart2","validateLimitsPerLine","ValidateDefaultOrderSettingsPerLine","_this$props$data$feat3","_this$props$data$cart3","_removeItemFromWishlist","noLongerLineExist","wishlistLineId","_getWishlistLineIdFromProductId","removeLinesAsync","commerceList","castCommerceList","_getProductsNoLongerExists","_removeNoLongerExistsLines","createGetByCustomerInput","getItemsInWishlists","ActiveWishlistInput","castSimpleProducts","isError","_inventoryLabel","StockLevelLabel","_inventoryClassName","StockLevelCode","_isProductInStock","productResult","IsProductAvailable","foundWishlistItem","commerceListLine","_castCommerceList$Com","noLongerExist","emptyWishlistText","wishlistErrorGettingWishlist","noLongerExitsWishlistItemText","Products","ProductDimensions","statusNotExistsMessage","_getProductNotExists","emptytext","noLongerExisttext","addToCartButtonText","removeButtonText","currentProductProps","productInventoryCollection"],"sourceRoot":""}