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ExCyuD,EAA2C","sources":["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/modules/order-template/order-template.view.tsx?a45e","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/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/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/carousel/carousel.tsx?80d4","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/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/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/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/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/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-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/social-share-item/social-share-item.tsx?bbcb","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/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/active-image/active-image.view.tsx?a935","webpack://lds-commerce/./src/modules/carousel/carousel.view.tsx?d82f","webpack://lds-commerce/./src/modules/header/header.view.tsx?cf0f","webpack://lds-commerce/./src/modules/media-gallery/media-gallery.view.tsx?5061","webpack://lds-commerce/./src/modules/quick-order/quick-order.view.tsx?a96d","webpack://lds-commerce/./src/modules/search-result-container/search-result-container.view.tsx?b779","webpack://lds-commerce/./src/modules/search/search.view.tsx?1505","webpack://lds-commerce/./src/modules/social-share-item/social-share-item.view.tsx?2d3e","webpack://lds-commerce/./src/modules/video-player/video-player.view.tsx?fedb","webpack://lds-commerce/./src/modules/wishlist-items/wishlist-items.view.tsx?4d80","webpack://lds-commerce/./src/modules/order-template/components/add-line/spinner.tsx?b423","webpack://lds-commerce/./src/modules/ratings-histogram/component/components.tsx?f324","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/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/actions/submit-user-review.ts?ac78","webpack://lds-commerce/./src/common/rnrInterface.ts?f761"],"sourcesContent":["/*!\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 { 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 { 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 { 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 { 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 { 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 { 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 { 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}&fallback=${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 { 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, 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 {_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 { 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 {\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 {\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: >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;\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
  • {categoryAutoSuggestionHeading}
  • ;\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
  • \n \n {_generateLink(item, searchText, props) && _getHighlightedText(splitValue ? splitValue : '', hitPrefix, hitSuffix)}\n \n
  • \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'), '')\n .replace(new RegExp(`[${hitSuffix}]`, 'gi'), '');\n\n // eslint-disable-next-line react/no-danger\n return ;\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;\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) => {\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 \n ) : (\n \n );\n\n const submitBtnNode = !disableSubmitSearch && \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 { 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;\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
  • {productAutoSuggestionHeading}
  • ;\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'), '')\n .replace(new RegExp(`[${hitSuffix}]`, 'gi'), '');\n\n return (\n // eslint-disable-next-line react/no-danger\n \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 \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 \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 {\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, ISearchState>}\n */\nclass Search extends React.Component, ISearchState> {\n private readonly searchTextInput: React.RefObject;\n\n private readonly searchCollapsedLabel: React.RefObject;\n\n private readonly formReference: React.RefObject;\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;\n\n private readonly autoSuggestResultDiv: React.RefObject;\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) {\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 {\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, 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),\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 ;\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 {\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 | React.KeyboardEvent | React.FormEvent\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 { 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 { 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 * 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 * 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 { 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 <Node {...additionalContent.additionalContentNode}>\n {additionalContent.heading}\n <Node {...additionalContent.additionalContentContainer}>\n {additionalContent.text}\n <Node {...additionalContent.additionalContentItemLinks}>{additionalContent.links}</Node>\n </Node>\n </Node>\n );\n};\n\n/**\n * Render View.\n * @param props - The view props.\n * @returns -The JSX Element.\n */\nexport const activeImageView: React.FC<IActiveImageViewProps> = props => {\n return (\n <Module {...props.activePointContainer}>\n <Node {...props.activePointDetailsContainer}>\n {props.imageMapper}\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 </Node>\n <Node\n className='msc-active-image-product-card-container'\n style={{ top: `${props.productCardtopPosition}px`, left: `${props.productCardleftPosition}px` }}\n >\n {props.overlay}\n {props.productCard}\n </Node>\n </Module>\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 { 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<ICarouselViewProps> = props => (\n <Module {...props.carouselContainer} {...props.renderModuleAttributes(props)}>\n <Carousel\n className={classnames(props.closeAnimation)}\n activeIndex={props.activeIndex}\n next={props.next}\n previous={props.previous}\n pause={props.config.pauseOnHover ? 'hover' : false}\n ride={props.config.autoplay ? 'carousel' : undefined}\n autoplay={props.config.autoplay}\n interval={props.config.interval}\n transitionType={props.config.transitionType ? props.config.transitionType : undefined}\n items={retrieveItems(props)}\n hideFlipper={props.config.hideFlipper}\n dismissEnabled={props.config.dismissEnabled}\n onIndicatorsClickHandler={props.onIndicatorsClickHandler}\n handleDismissCarousel={props.handleDismissCarousel}\n dismissCarouselAriaText={props.resources && props.resources.ariaLabelForDismissButton}\n indicatorAriaText={props.resources && props.resources.ariaLabelForSlide}\n directionTextPrev={props.resources && props.resources.flipperPrevious}\n directionTextNext={props.resources && props.resources.flipperNext}\n handleOnExited={props.handleOnExited}\n handleOnExiting={props.handleOnExiting}\n telemetryContent={props.telemetryContent}\n keyboard={props.config.keyboard}\n />\n </Module>\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 { Module, Node } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport { IHeaderViewProps } from './header';\n\nconst headerView: React.FC<IHeaderViewProps> = props => {\n const {\n HeaderTag,\n HeaderContainer,\n HeaderTopBarContainer,\n MobileMenuContainer,\n MobileMenuBodyContainer,\n MobileMenuLinksContainer,\n Divider\n } = props;\n return (\n <Module {...HeaderTag}>\n <Node {...HeaderContainer}>\n <Node {...HeaderTopBarContainer}>\n {props.navIcon}\n {props.logo}\n {_renderReactFragment(props.search)}\n {props.preferredStore}\n {props.currentDistributor}\n {_renderDesktopAccountBlock(props)}\n {props.wishListIconDesktop}\n <Node {...Divider} />\n {props.cartIcon}\n {_renderReactFragment(props.siteOptions)}\n </Node>\n <Node {...MobileMenuContainer}>\n <Node {...MobileMenuBodyContainer}>\n {props.MobileMenuHeader}\n {_renderReactFragment(props.menuBar)}\n <Node {...MobileMenuLinksContainer}>\n {props.accountLinks ? props.accountLinks.map(link => link) : false}\n {props.siteOptions}\n {props.wishListIconMobile}\n {props.signInLink}\n {props.signOutLink}\n </Node>\n </Node>\n </Node>\n {_renderReactFragment(props.menuBar)}\n </Node>\n </Module>\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 <Node {...AccountInfoDropdownParentContainer}>\n {accountInfoDropdownButton}\n <Node {...AccountInfoDropdownPopoverConentContainer}>\n {accountLinks ? accountLinks.map(link => link) : false}\n {signOutLink}\n </Node>\n </Node>\n );\n } else if (signInLink) {\n return <Node {...AccountInfoDropdownParentContainer}>{signInLink}</Node>;\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 <React.Fragment key={index}>{slot}</React.Fragment>;\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 { Module, Node } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport { IMediaGalleryThumbnailItemViewProps, IMediaGalleryThumbnailsViewProps, IMediaGalleryViewProps } from '../..';\n\nconst MediaGalleryView: React.FC<IMediaGalleryViewProps> = props => {\n const { CarouselProps, Thumbnails, MediaGallery, Modal } = props;\n\n return (\n <Module {...MediaGallery}>\n <Node {...CarouselProps} />\n {Modal}\n {_renderThumbnails(Thumbnails)}\n </Module>\n );\n};\n\nconst _renderThumbnails = (thumbnails: IMediaGalleryThumbnailsViewProps): JSX.Element => {\n const { ThumbnailsContainerProps, SingleSlideCarouselComponentProps, items } = thumbnails;\n\n return (\n <Node {...ThumbnailsContainerProps}>\n <Node {...SingleSlideCarouselComponentProps}>{items && items.map(_renderThumbnailItem)}</Node>\n </Node>\n );\n};\n\nconst _renderThumbnailItem = (thumbnail: IMediaGalleryThumbnailItemViewProps): JSX.Element => {\n const { ThumbnailItemContainerProps, Picture } = thumbnail;\n\n return <Node {...ThumbnailItemContainerProps}>{Picture}</Node>;\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 { IProductDimensionConfigureDropdownViewProps, IProductDimensionConfigureViewProps } from '@msdyn365-commerce/components';\nimport { INodeProps, Module, Node } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport { IQuickOrderFormViewProps, IQuickOrderViewProps } from './index';\n\n/**\n * Render product dimension/configure container.\n * @param configure -- Product dimension configuration.\n * @returns Container to have dimension dropdown.\n */\nconst renderConfigure = (configure?: IProductDimensionConfigureViewProps): JSX.Element | null => {\n if (configure !== undefined) {\n const { containerProps, dropdowns } = configure;\n\n return <Node {...containerProps}>{dropdowns.map(renderConfigureDropdown)}</Node>;\n }\n return null;\n};\n\n/**\n * Render product dimension/configure dropdown.\n * @param dropdown -- Product dimension drop down.\n * @returns Dropdown.\n */\nconst renderConfigureDropdown = (dropdown: IProductDimensionConfigureDropdownViewProps): JSX.Element => {\n const { containerProps, labelContainerProps, heading, errors, select } = dropdown;\n\n return (\n <Node {...containerProps}>\n <Node {...labelContainerProps}>{heading}</Node>\n {errors}\n {select}\n </Node>\n );\n};\n\nconst renderForm = (\n form: IQuickOrderFormViewProps,\n isMobileView: boolean,\n quickOrderForm: INodeProps,\n quickOrderProductContent: INodeProps,\n quickOrderMsgContent: INodeProps,\n configure?: IProductDimensionConfigureViewProps\n) => {\n return isMobileView ? (\n <Node {...quickOrderForm}>\n <Node {...quickOrderProductContent}>\n {form.product}\n {renderConfigure(configure)}\n {form.quantity}\n <Node {...quickOrderMsgContent}>{form.userMessage}</Node>\n {form.addToCartBtn}\n </Node>\n </Node>\n ) : (\n <Node {...quickOrderForm}>\n <Node {...quickOrderMsgContent}>{form.userMessage}</Node>\n <Node {...quickOrderProductContent}>\n {form.product}\n {renderConfigure(configure)}\n {form.quantity}\n {form.addToCartBtn}\n </Node>\n </Node>\n );\n};\n\nconst quickOrderView: React.FC<IQuickOrderViewProps> = props => {\n const {\n quickOrderProps,\n contentProps,\n form,\n quickOrderForm,\n drawer,\n configure,\n quickOrderFormProductContent,\n quickOrderFormMsgContent,\n quickOrderList,\n isMobileView\n } = props;\n\n return (\n <Module {...quickOrderProps}>\n <Node {...drawer}>\n <Node {...contentProps}>\n {renderForm(\n form as IQuickOrderFormViewProps,\n isMobileView,\n quickOrderForm,\n quickOrderFormProductContent,\n quickOrderFormMsgContent,\n configure\n )}\n </Node>\n </Node>\n\n {quickOrderList}\n </Module>\n );\n};\nexport default quickOrderView;\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 { 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 { 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 { 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 {\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","/*!\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 <div className={`${props.className}__loading__icon`} />\n {props?.msg && <div className={`${props.className}__loading__msg`}>{props?.msg}</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 { 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 <span aria-hidden='true' className='ms-ratings-histogram__star'>\n {stars}\n </span>\n ),\n percentage: (\n <span aria-hidden='true' className='ms-ratings-histogram__percentage'>\n {formattedPercent}\n </span>\n ),\n bar: <Progress value={percentage * 100} max={100} ariaLabel={ariaLabel} className='ms-ratings-histogram__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 <p className='ms-ratings-histogram__average'>\n {props.summary.averageRating}\n {` `}/ 5\n </p>\n );\n};\n\nexport const TotalReviews: React.FC<{ summary: RatingsSummary }> = (props: { summary: RatingsSummary }) => {\n return <p className='ms-ratings-histogram__total'>{props.summary.totalRatingsCount}</p>;\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\nimport { IUserReviewData } from './submit-user-review-input-data';\n\n/**\n * SubmitUserReview Input Action.\n */\nexport class SubmitUserReviewInput implements IActionInput {\n /**\n * The Id representing the product to get the ratings for.\n */\n public productId?: string;\n\n /**\n * The ID representing the tenant.\n */\n public tenantId: string;\n\n /**\n * The calling organization's channel id.\n */\n public channelId: string;\n\n /**\n * The locale for which to get the ratings from.\n */\n public locale: string;\n\n /**\n * The user's review data.\n */\n public userReviewData: IUserReviewData;\n\n /**\n * The user's authorization token.\n */\n public authorization: string;\n\n /**\n * The ratings and reviews service endpoint.\n */\n public serviceEndpoint: string;\n\n constructor(\n productId: string | undefined,\n tenantId: string,\n channelId: string,\n locale: string,\n userReviewData: IUserReviewData,\n authorization: string,\n serviceEndpoint: string\n ) {\n this.productId = productId;\n this.tenantId = tenantId;\n this.channelId = channelId;\n this.locale = locale;\n this.userReviewData = userReviewData;\n this.authorization = authorization;\n this.serviceEndpoint = serviceEndpoint;\n }\n\n public getCacheKey = () => 'SubmitUserReview';\n\n public getCacheObjectType = () => 'SubmitUserReview';\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 { getUrlSync, IAny, ICoreContext, IGeneric } from '@msdyn365-commerce/core';\nimport { SimpleProduct } from '@msdyn365-commerce/retail-proxy';\nimport { getRnrAuthEndpointId, getRnrPartnerId } from '@msdyn365-commerce-modules/retail-actions';\nimport {\n Alert,\n Button,\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 classNames from 'classnames';\nimport { GetUserReviewInput } from '../actions/inputs/get-user-review-input';\nimport { SubmitUserReviewInput } from '../actions/inputs/submit-user-review-input';\nimport submitUserReview from '../actions/submit-user-review';\n\nexport interface IReviewModalProps {\n userReview?: Review;\n product?: SimpleProduct;\n renderContextId: string;\n resources: IReviewModalResources;\n context: ICoreContext<IGeneric<IAny>>;\n parentId: string;\n parentType: string;\n isOpen: boolean;\n rating: number;\n reviewTitle: string;\n reviewText: string;\n returnRef: React.RefObject<HTMLButtonElement> | undefined;\n hasError: boolean;\n telemetryContent?: ITelemetryContent;\n onModalToggle(): void;\n onTitleChange(event: React.ChangeEvent<HTMLInputElement>): void;\n onTextChange(event: React.ChangeEvent<HTMLTextAreaElement>): void;\n onRatingChange(value: number): void;\n onReviewComplete?(isSuccess: boolean): void;\n modalCSS?: string;\n}\n\nexport interface IReviewModalResources {\n selectRatingAriaLabel: string;\n selectRatingLabel: string;\n reviewTitleLabel: string;\n reviewTextLabel: string;\n privacyPolicyTitle: string;\n privacyPolicyTextFormat: string;\n writeReviewModalTitle: string;\n editReviewModalTitle: string;\n submitReviewButtonText: string;\n discardReviewButtonText: string;\n errorMessageText: string;\n reviewTitleAriaLabel?: string;\n reviewAriaLabel?: string;\n}\n\nexport interface IReviewModalViewProps {\n modal: INodeProps;\n modalHeader: React.ReactElement;\n modalFooter: INodeProps;\n modalBody: INodeProps;\n cancelButton: React.ReactElement;\n submitButton: React.ReactElement;\n rating: React.ReactElement;\n ratingLabel: React.ReactElement;\n titleInput: React.ReactElement;\n titleLabel: React.ReactElement;\n textInput: React.ReactElement;\n textLabel: React.ReactElement;\n privacyPolicyUrl: React.ReactElement;\n form: INodeProps;\n inputRow: INodeProps;\n error: React.ReactElement;\n}\n\n/**\n * On Click Submit.\n * @param props -Review Modal props.\n * @returns On submit.\n */\nconst onClickSubmit = (props: IReviewModalProps) => () => {\n onSubmit(props);\n};\n\n/**\n * CartLineItems component.\n */\n\nexport const ReviewModal = (props: IReviewModalProps): IReviewModalViewProps => {\n const payLoad = getPayloadObject('click', props.telemetryContent!, TelemetryConstant.SubmitReview);\n const submitButtonAttribute = getTelemetryAttributes(props.telemetryContent!, payLoad);\n payLoad.contentAction.etext = TelemetryConstant.Cancel;\n const cancelButtonAttribute = getTelemetryAttributes(props.telemetryContent!, payLoad);\n return {\n modal: {\n tag: Modal,\n className: props.modalCSS ? classNames(props.modalCSS, 'msc-modal-input-required') : 'ms-review-modal msc-modal-input-required',\n toggle: props.onModalToggle,\n applicationNode: 'renderPage',\n isOpen: props.isOpen,\n returnFocusRef: props.returnRef\n },\n modalHeader: modalHeaderNode(props),\n modalFooter: { tag: ModalFooter, className: 'ms-review-modal-footer' },\n modalBody: { tag: ModalBody, className: 'ms-review-modal-body' },\n cancelButton: (\n <Button className='ms-review-modal-cancel' onClick={props.onModalToggle} {...submitButtonAttribute}>\n {props.resources.discardReviewButtonText}\n </Button>\n ),\n submitButton: (\n <Button\n className='ms-review-modal-submit'\n onClick={onClickSubmit(props)}\n {...cancelButtonAttribute}\n disabled={submitDisabled(props)}\n >\n {props.resources.submitReviewButtonText}\n </Button>\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 <Alert className='ms-review-modal-error' isOpen={props.hasError} color='danger'>\n {props.resources.errorMessageText}\n </Alert>\n )\n };\n};\n\nconst modalHeaderNode = (props: IReviewModalProps) => {\n return (\n <ModalHeader toggle={props.onModalToggle} className='ms-review-modal-header'>\n {props.userReview && props.userReview.reviewId ? props.resources.editReviewModalTitle : props.resources.writeReviewModalTitle}\n </ModalHeader>\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 <RatingComponent\n readOnly={false}\n avgRating={0}\n ariaLabel={props.resources.selectRatingAriaLabel}\n initialRating={props.rating}\n context={props.context}\n id={props.parentId}\n typeName={props.parentType}\n data={{}}\n key='ratings'\n onChange={props.onRatingChange}\n />\n );\n};\n\nconst ratingsLabel = (props: IReviewModalProps) => {\n return (\n <label className='ms-review-modal-rating-label' key='ratingsLabel'>\n {props.resources.selectRatingLabel}*\n </label>\n );\n};\n\nconst titleInput = (props: IReviewModalProps) => {\n const maxLength = props.context.app.config.reviewTitleMaxLength;\n\n return (\n <input\n maxLength={maxLength}\n id={`reviewTitle-${props.renderContextId}`}\n onChange={props.onTitleChange}\n value={props.reviewTitle}\n aria-required='true'\n className='ms-review-modal-title'\n aria-label={props.resources.reviewTitleAriaLabel}\n />\n );\n};\n\nconst titleLabel = (props: IReviewModalProps) => {\n return (\n <label className='ms-review-modal-title-label' htmlFor={`reviewTitle-${props.renderContextId}`}>\n {props.resources.reviewTitleLabel}\n </label>\n );\n};\n\nconst reviewTextWidth: number = 50;\n\nconst textInput = (props: IReviewModalProps) => {\n const maxLength = props.context.app.config.reviewTextMaxLength;\n return (\n <textarea\n maxLength={maxLength}\n className='ms-review-modal-text'\n id={`reviewTextArea-${props.renderContextId}`}\n onChange={props.onTextChange}\n rows={maxLength / reviewTextWidth}\n value={props.reviewText}\n aria-required='true'\n aria-label={props.resources.reviewAriaLabel}\n />\n );\n};\n\nconst textLabel = (props: IReviewModalProps) => {\n return (\n <label htmlFor={`reviewTextArea-${props.renderContextId}`} className='ms-review-modal-text-label'>\n {props.resources.reviewTextLabel}\n </label>\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 <p className='ms-review-modal-policy'>\n {isSeparatorAtStart ? '' : policyTextBlocks[0]}\n <a href={privacyPolicyUrl} rel='noreferrer' target='_blank' className='msc-link' {...privacyPolicyAttribute}>\n {props.resources.privacyPolicyTitle}\n </a>\n {isSeparatorAtEnd ? '' : isSeparatorAtStart ? policyTextBlocks[0] : policyTextBlocks[1]}\n </p>\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 { 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 <div>\n <div className='ms-order-template__list-item-title'>\n <a href={_getOrderTemplatePageUrl()} aria-label={name}>\n {name}\n </a>\n </div>\n <div className='ms-order-template__line-count'>\n {orderTemplate.totalLines}\n {` `}\n line items\n </div>\n <hr color='#F9F9F9' />\n </div>\n ),\n addToCartButton: (\n <div className='ms-order-template__add-to-bag-button-div'>\n <AddOrderTemplateToCartComponent\n id={Id}\n context={context}\n typeName={input.moduleTypeName}\n data={{\n orderTemplate: input.orderTemplate\n }}\n className='ms-order-template__add-to-bag-button'\n addToCartText={input.addToBagText}\n dialogStrings={input.resources}\n telemetryContent={telemetryContent}\n isMultipleCatalogFeatureEnabledInHq={input.isMultipleCatalogFeatureEnabledInHq}\n />\n </div>\n ),\n removeButton: (\n <Button\n className='ms-order-template__remove-list'\n aria-label={removeFromOrderTemplateListText}\n onClick={removeOrderTemplateActionHandler(input)}\n />\n ),\n orderTemplateStatusMessage: orderTemplateState && orderTemplateState.isOpen && orderTemplateState.userMessage && (\n <div className='ms-orderTemplate__status'>\n <Alert color={orderTemplateState.statusCssString} isOpen={orderTemplateState.isOpen} toggle={onDismiss}>\n <span>{orderTemplateState.userMessage}</span>\n </Alert>\n </div>\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 <div className='ms-order-template__image-container'>\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 <Image\n altText={line.fullProduct?.ProductDetails.Name ?? 'image'}\n requestContext={context.actionContext.requestContext}\n key={line.fullProduct?.ProductDetails.Name}\n src={line.fullProduct?.ProductDetails.PrimaryImageUrl ?? ''}\n fallBackSrc={\n getFallbackImageUrl(\n line.fullProduct?.ProductDetails.ItemId,\n context.actionContext.requestContext.apiSettings,\n context.request.app?.config?.OmniChannelMedia\n ) ?? ''\n }\n gridSettings={context.request.gridSettings!}\n imageSettings={imageSettings ?? defaultImageSettings}\n loadFailureBehavior='empty'\n onClick={enableImageProductLink && onClickHandler(productUrl)}\n className={enableImageProductLink ? 'product-link' : ''}\n />\n );\n })}\n </div>\n );\n }\n return <div className='ms-order-template__image-container' />;\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<IOrderTemplateListStatusMessageProps> = ({ className, errorType, text }) => {\n switch (errorType) {\n case 'EMPTY':\n return <p className={classnames('ms-orderTemplateList__message-empty', className)}>{text}</p>;\n case 'FAILED':\n return <p className={classnames('ms-orderTemplateList__message-failed', className)}>{text}</p>;\n case 'LOADING':\n default:\n return <p className='ms-orderTemplateList__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 { createObservableDataAction, IAction, IActionContext, sendRequest } from '@msdyn365-commerce/core';\n\nimport { SubmitUserReviewInput } from './inputs/submit-user-review-input';\n\n/**\n * This data action allows submitting review to the reviews service.\n * @param input This user review submission text.\n * @param ctx The data action context.\n */\nasync function submitReview(input: SubmitUserReviewInput, ctx: IActionContext): Promise<string> {\n if (!inputIsValid(input)) {\n ctx.trace(`[SubmitUserReview] Failed to submit reviews for product due to bad input ${input}`);\n return '';\n }\n\n const requestUrl =\n `${input.serviceEndpoint}/v2.0/reviews/product/${input.productId}/user?` +\n `tenantId=${input.tenantId}&` +\n `channelId=${input.channelId}&` +\n `locale=${input.locale}`;\n\n return sendRequest<string>(requestUrl, 'post', input.userReviewData, { headers: { Authorization: `id_token ${input.authorization}` } })\n .then(response => {\n if (response.status !== 200 && response.status !== 201) {\n ctx.trace('[SubmitUserReview] Failed to submit reviews for product');\n ctx.trace(response.data);\n return '';\n }\n return response.data;\n })\n .catch(error => {\n ctx.trace('[SubmitUserReview] Failed to submit reviews for product');\n ctx.telemetry.exception(error);\n ctx.telemetry.debug('[SubmitUserReview] Failed to submit reviews for product');\n ctx.trace(error);\n return '';\n });\n}\n\nfunction inputIsValid(input: SubmitUserReviewInput): boolean {\n return input && !!input.productId && !!input.tenantId;\n}\n\nexport const submitReviewDataAction = createObservableDataAction({\n id: '@msdyn365-commerce-modules/ratings-reviews/submit-user-review',\n action: <IAction<string>>submitReview\n});\n\nexport default submitReviewDataAction;\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"],"names":["RatingsHistogram","React","constructor","props","super","handleHeadingChange","event","this","config","heading","text","target","value","selectFilterBy","bind","render","resources","className","ratingsSummary","result","data","ratingCount","totalRatingsCount","completeClass","classname","viewProps","_objectSpread","callbacks","moduleProps","histogramItems","HistogramItems","locale","context","request","onClick","averageRating","RatingComponent","avgRating","ariaLabel","format","averageRatingAriaLabel","readOnly","hideCount","id","typeName","averageNumber","AverageRatingNumber","summary","totalReviews","TotalReviews","ratingsSummaryProps","Msdyn365","tag","editProps","onEdit","requestContext","histogramProps","renderView","stars","filterKey","actionContext","update","createRatingsReviewsStateInput","__decorate","observer","histogramItem","Node","Object","assign","buttonProps","starLabel","bar","percentage","Module","map","item","_renderItem","product","quantityLabel","ProductsTableRow","key","selectLine","productLineCatalog","productImage","productPrice","productNumber","addToBagButton","removeButton","productInfo","productUnitOfMeasure","productQuantityView","productQuantity","popUp","isMobile","extraActionsPopup","isMultipleCatalogFeatureEnabledInHq","disabled","disableElement","pointerEvents","opacity","style","OrderTemplateLines","status","statusMessage","ProductsTable","ProductsTableHeading","orderLines","productsStatusMessage","OrderTemplateActions","orderActions","pagination","itemAddedToCartDialog","bulkOrderLineActions","isDetailsDisplayed","detailedProductView","toggleDetailsDisplayed","cancelBtnLabel","productNumberText","productText","productUnitPriceText","productUOMText","productQuantityText","productLineCatalogName","toggleDetails","undefined","addTemplateToBag","renameTemplate","removeTemplate","actionsSplitButton","length","Modal","wrapClassName","autoFocus","fade","applicationNode","isOpen","toggle","ModalHeader","ModalBody","ModalFooter","Button","buildReviewCard","cardProps","headerProps","rating","name","cardBodyProps","reviewProps","reviewTitle","date","reviewText","responseProps","responseName","responseDate","responseText","controlsProps","ratingHelpfulLabel","like","dislike","edit","report","createReviewModal","modal","modalHeader","modalBody","form","inputRow","ratingLabel","titleLabel","titleInput","textLabel","textInput","privacyPolicyUrl","error","modalFooter","submitButton","cancelButton","createReportModal","state","reported","headerSubmitted","header","reportSubmittedMessage","reportMessage","radioButtons","succesfulButton","filterByDropdown","noReviewsMessage","noReviewsWithFilterMessage","pageControls","refineReviewsProps","reportReviewModal","reviewsListProps","reviewCards","reviewCount","reviewModal","sortByDropdown","userReview","isFilterApplied","review","SignInMessage","SignInButton","href","telemetryContent","payLoad","getPayloadObject","TelemetryConstant","SignIn","attributes","getTelemetryAttributes","ModalToggle","innerRef","WriteReview","ref","writeReviewCallbacks","toggleModal","_toggleReviewModal","updateReviewTitle","title","setState","updateReviewText","updateRating","onReviewSubmitted","isSuccessful","isReviewModalOpen","hasReviewError","submitReview","_onTitleChange","_onTextChange","_onRatingChange","_modalToggleRef","getTelemetryObject","telemetryPageName","friendlyName","telemetry","userInfo","user","classnames","signInMessage","signInButton","signInLabel","signInAriaLabel","signInUrl","modalToggle","editReviewButtonText","reviewButtonLabel","TOGGLE_REVIEW_MODAL_BUTTON_ID","_buildUserReviewModal","ReviewModal","parentId","parentType","onModalToggle","onTitleChange","onTextChange","onRatingChange","onReviewComplete","renderContextId","returnRef","hasError","isAuthenticated","modalCloseButtonReference","onCancelHandler","isCreateOrderTemplateDialogOpen","setOrderTemplateNameDialogOpen","useState","onCreateButtonClick","color","createOrderTemplateText","OrderTemplateNameDialog","modalOpen","isUpdateDialog","setModalOpen","dialogStrings","createOrderTemplateDialogResources","onCancel","onSuccess","onOrderTemplateCreated","parentElementRef","OrderTemplateList","_isChannelMultipleCatalogsFeatureEnabled","_this$props$data$feat","featureState","find","feature","Name","IsEnabled","_onDismiss","_reloadPage","async","window","location","reload","_onRemoveFromOrderTemplateList","productListId","orderTemplates","token","orderTemplate","p","productList","Id","deleteAsync","callerContext","then","catch","warning","itemKey","headerStatusMessage","deleteOrderTemplateFailedText","statusCssString","messageGlyph","userMessage","shouldComponentUpdate","nextProps","nextState","_heading$text","_heading$tag3","emptyOrderTemplateText","createNewTemplateButtonText","orderTemplatesData","orderTemplateListHeading","orderTemplateListTitle","_heading$tag","errorProps","Spinner","msg","progressNotificationText","Heading","_heading$tag2","emptyViewProps","OrderTemplateListStatusMessage","errorType","createOrderTemplateButton","CreateNewTemplateButtonComponent","_generateOrderTemplateNameDialogResources","templateHeaderStatusMessage","Alert","OrderTemplates","OrderTemplate","_renderOrderTemplateList","orderTemplateHeaderLabel","createOrderTemplateHeader","orderTemplateTitleLabel","orderTemplateTitle","orderTemplateNameAriaLabel","orderTemplateDescription","createOrderTemplateDescription","defaultOrderTemplateName","orderTemplateButtonLabel","createOrderTemplateButtonText","orderTemplateCancelButtonLabel","cancelNewOrderTemplateCreationButtonText","imageSettings","enableImageProductLink","index","currentTemplateProps","orderTemplateState","removeFromOrderTemplateListText","addToBagText","addToBagButtonText","moduleId","moduleTypeName","handlers","onRemoveOrderTemplate","onDismiss","closeWindowButtonText","addToCartFailureMessage","addToCartSuccessMessage","addToCartProcessMessage","orderTemplateErrorMessage","linesAddedToCartDialogResources","viewCartButtonText","orderTemplateCloseButtonText","linesAddedToCartHeaderItemsOneText","linesAddedToCartHeaderLinesOneText","linesAddedToCartHeaderLinesFormatText","linesAddedToCartHeaderMessageText","OrderTemplateRender","OrderTemplateListView","_renderOrderTemplate","addToCartButton","orderTemplateImage","orderTemplateStatusMessage","orderTemplateName","renderRating","ratingId","totalRatings","_totalRatings$toStrin","numberRatings","toString","ratingAriaLabel","roundedRating","toFixed","getRatingAriaLabel","ActiveProductComponent","_ref","savingsText","freePriceText","originalPriceText","gridSettings","imageUrl","altText","imgData","src","imageProps","cropFocalRegion","Image","loadFailureBehavior","renderProductPlacementImage","PrimaryImageUrl","productId","basePrice","adjustedPrice","price","BasePrice","AdjustedPrice","CustomerContextualPrice","PriceComponent","renderPrice","Price","description","Description","app","hideRating","AverageRating","TotalRatings","assembleNode","_item$links","headingNode","renderHeading","additionalContentHeading","handleAdditionalTextChange","paragraphNode","subtext","renderParagraph","additionalContentParagraphText","linksNode","links","ctaLink","renderLinks","linkIndex","editableLink","linkText","linkUrl","destinationUrl","openInNewTab","isOpenInNewTab","role","link","handleAdditionalLinkTextChange","additionalContentNode","additionalContentContainer","additionalContentItemLinks","activeImageAdditionalContent","additionalContent","CanvasCalculations","CanvasStyles","ImageMapper","_isDesktopViewPort","_context","getActiveImageWidth","MsDyn365","isBrowser","activeImageReferenceValue","activeImageRefs","current","clientWidth","getActiveImageHeight","clientHeight","convertHexToRgb","hexColor","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","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","preventDefault","hoverOn","onMouseEnter","hoverOff","onMouseLeave","renderAreas","_this$props$imageMapp3","_this$props$imageMapp4","_area$productSearchRe","xsRadius","extendedArea","areaKey","altTextWithProductName","replace","productSearchResult","shape","join","onFocus","onBlur","productUrl","tabIndex","alt","initCanvas","_this$getActiveImageW","_this$getActiveImageH","_this$_canvas$current12","_backgroundImage","_container","onLoad","defaultHeight","canvasWidth","canvasHeight","componentDidMount","componentDidUpdate","shouldRender","_requestContext$gridS","imageData","useMap","ActiveImageConstants","ActiveImage","_defaultProductCardWidth","_defaultProdutCardHight","_activePoints","addActivePoints","_product$PrimaryImage","push","areaId","RecordId","primaryImageUrl","updateClientWidth","viewport","variant","VariantType","Browser","renderImageMapper","_this$props$config$ac","productResults","products","activePoints","configProduct","ItemId","itemId","_product$Name","_configProduct$xPosit","_configProduct$yPosit","_configProduct$radius","getProductPageUrlSync","xPosition","yPosition","activePoint","JSON","stringify","mappedArea","_activeImageClass","enterArea","leaveArea","activeImage","_activeImageRefs","altTextForSeeMoreButtonWithProductName","seeMoreButtonText","overlayClass","type","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","nodeName","escKey","handleTextChange","handleParagraphChange","paragraph","renderActiveImageDetailsLinks","_telemetryContent","linkData","contentAction","etext","linkId","willOpenInNewTab","additionalProperties","handleLinkTextChange","renderActiveImageDetailsHeading","renderActiveImageDetailsParagraph","getActiveImageId","activeImageId","_activeImageIdPart$","activeImageSource","split","decrementOne","_handleOutsideClick","_this$_productCardDiv","contains","addEventListener","setTimeout","timeoutInterval","images","getElementsByClassName","ArrayExtensions","hasElements","Array","from","removeAttribute","componentWillUnmount","removeEventListener","activePointContainer","activePointDetailsContainer","imageMapper","overlay","productCard","productCardleftPosition","productCardtopPosition","detailsContainer","detailsContainerCta","handleAdditionalParagraphChange","handleAdditionalText","handleAdditionalParagraph","handleAdditionalLinkText","_this$props$config$ad","CarouselModule","_handleDismissCarousel","cookies","set","dismissCarousel","_next","slots","nextIndex","activeIndex","content","animating","closeNow","_previous","_onExiting","_onExited","_goToIndex","newIndex","get","carouselContainer","closeAnimation","next","previous","onIndicatorsClickHandler","handleDismissCarousel","handleOnExited","handleOnExiting","HeaderPreferredStore","modalCloseButtonRef","handleClick","_findPreferredStoreOnClick","storeSelectorStateManager","storeSelector","storeName","preferredStore","StoreName","headerPreferredStoreText","headerPreferredStoreAriaLabel","modules","storeSelectorId","keys","openDialog","showMapViewLink","onLocationSelected","orgUnitLocation","Promise","resolve","message","debug","Logo","_renderLogo","rel","_renderImage","image","moduleType","imagePropertyName","shouldSkipToMainImage","NavIcon","toggleNavBar","mobileHamburgerAriaLabel","isExpanded","targetId","Header","isB2BSite","_this$props$config$my","myAccountLinks","popOverRef","_toggleNavbar","_togglePopover","_keydown","mobileMenuCollapsed","signinPopoverOpen","hasSigninerror","isChannelTypeB2B","displayName","_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","MobileMenuHeader","MobileMenuBodyContainer","MobileMenuLinksContainer","AccountInfoDropdownParentContainer","AccountInfoDropdownPopoverConentContainer","Popover","placement","signInLink","_getSigninButton","signOutLink","_getSignOutButton","isOBORequest","switchCustomerLink","_getSwitchCustomerButton","accountInfoDropdownButton","_getAccountInfoDropdownButton","accountLinks","_getAccountLinks","currentDistributor","slotName","signInLinkText","signInLinkAriaText","onTelemetryClick","_user$signOutUrl","SignOut","signOutLinkText","signOutUrl","signOutLinkAriaText","SwitchCustomer","isOBOAccountSelected","getAccountSelectionCookie","switchCustomerLinkAriaText","switchCustomerLinkText","getBusinessPartnerSelectionUrl","removeAccountSelectionCookie","shoppingAsText","route","url","URL","forEach","param","searchParams","delete","retailServerErrorCode","signUpCustomerNotFound","signUpMultipleCustomerFound","signInCustomerNotAuthorized","retailServerErrorMessage","MyProfile","cta","keyCode","KeyCodes","Escape","computed","MediaType","getAltText","shouldUseCmsAltText","productName","imageAltText","_context$app","OmniChannelMedia","validateMediaLocationAsync","mediaLocation","Uri","AltText","IsApplicableForChildEntities","isApplicableForChildEntities","http","XMLHttpRequest","send","_unused","getValidProductImages","channelId","selectedProduct","catalogId","getCatalogId","actionInput","MediaLocationsForSelectedVariantInput","getMediaLocationsForSelectedVariant","mediaLocations","all","pairs","filter","pair","exception","validateProductImages","MediaGallery","_this","_props$config$zoomedI","_inlineZoomDivRef","Map","fullScreenOverlayButtonRef","player","defaultGalleryImageSettings","sm","md","defaultThumbnailImageSettings","onExiting","onExited","removeInlineZoomStyle","isLastItem","goToIndex","updateZoomedInImage","mediaGalleryItems","isFirstItem","autoplay","currentIndex","mediaItems","_mediaItems","_this$player$current","mediaTypeValue","Video","play","_this$player$current2","pause","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","options","playerResources","videoMetaData","videoId","duration","playTime","thumbnail","posterframeUrl","_links","binaryReferences","videoBinaryReferences","videoPlayerData","metaData","Player","playerData","isEditor","params","_renderEmptyImage","_getCarouselItem","_this$props$context$r2","isInPopup","arguments","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","Carousel","items","_renderCarouselItemImageView","_zoomedImageSettings","interval","directionTextPrev","previousScreenshotFlipperText","directionTextNext","nextScreenshotFlipperText","showPaginationTooltip","hideIndicator","keyboard","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","indicatorAriaText","ariaLabelForSlide","Thumbnails","ThumbnailsContainerProps","SingleSlideCarouselComponentProps","SingleSlideCarousel","vertical","flipperPrevLabel","flipperNextLabel","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","left","positionY","clientY","top","scaledPositionX","scaledPositionY","add","scrollTo","_this$props$config$da4","innerWidth","inlineZoomInitClick","inlineZoomImageOnMouseOut","onContainerZoomInit","onMouseOutLensContainer","_this$props$config$da5","onMouseOut","onMouseMoveLensContainer","onMouseOverImageContainer","_this$fullScreenOverl","focus","parentDiv","children","querySelector","removeContainerZoomStyle","CONTENT","AddLineToTemplate","query","productCatalogs","Search","selectedCatalogId","searchTextInput","addLineButtonRef","_renderSearchForm","searchButtonAriaLabel","searchModalPlaceholderText","selectCatalogTitleText","autoComplete","onSubmit","_onSearchSubmit","htmlFor","onChange","_onCatalogSelectionChange","_getCatalogNodes","placeholder","_onInputChange","maxLength","_get","Loading","_getSearchResults","NotFound","ProductList","Error","_onQuantityChangeHandler","selectedQuantity","_onSelectItem","varianteInput","SelectedVariantInput","getSelectedVariant","dimensions","_getProductDimensions","selectedProductDimensions","ProductConfiguration","_onBackButtonClickHandler","_highlightSearchTerm","parsedName","unescape","dangerouslySetInnerHTML","__html","_resultCountText","searchResultsCountVerbage","searchResultsCountSubject","_addItemToTemplateHandler","orderTemplateId","input","AddItemToOrderTemplateInput","quantity","DefaultUnitOfMeasure","addItemToOrderTemplate","reloadPage","_toggleModalHandler","_getCatalogs","onComponentDidMount","_this$searchTextInput","onComponentDidUpdate","_this$searchTextInput2","showBackArrow","addLineModalLinkText","backToResultsText","modalProps","_renderContent","addToTemplateHandler","onQuantityChangeHandler","highlightSearchTerm","searchForm","productProps","clickHandler","renderResultCountText","notFoundSearchErrorNotice","notFoundSearchErrorRedediation","NotFoundComponent","searchErrorMessage","catalogs","validateCatalogId","productCatalog","isSelected","selected","searchText","searchCriteriaInput","Context","ChannelId","CatalogId","IncludeAttributes","SearchCondition","searchByCriteriaAsync","getDimensionsForSelectedVariant","GetDimensionsForSelectedVariantInput","Dropdown","selectMenu","_onChanged","selectedIndex","dropdownId","selectId","selectedValue","innerText","dropdownList","dropdownName","OrderTemplateQuantity","inputRef","_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","errorMessage","_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","getPriceForSelectedVariant","productAvailableQuantity","unitPrice","sort","a","b","_getDropdownName","dimensionType","productDimensionTypeColor","productDimensionTypeConfiguration","productDimensionTypeSize","productDimensionTypeStyle","_getFallbackImageUrl","_product$Name2","addItemToTemplateText","addLineProductUnitPricePrefix","quantitySelectLabel","addLineProductUnitOfMeasurePrefix","totalPriceLabel","isMultipleCatalogSelect","_formatPrice","_getDimensionsNodes","_getConfirmationMessage","selectedDimensionNames","_dimension$DimensionV","Value","addToTemplateConfirmation","values","_this$state$errors2","unshift","includes","assertive","cultureFormatter","formatCurrency","currencyCode","selectProductButtonText","_generateImageUrl","_props$context$reques","primaryImageSource","generateImageUrl","fallBackImg","ProductSelectButton","setBusy","getClickHandler","OrderTemplateBulkActions","isAddDisabled","isRemoveDisabled","addHandler","onAddSelectionToBag","removeHandler","onRemoveSelection","static","selectedLines","_this$props$data$cata","searchInputAriaLabel","backButtonText","addSelectedToBagButtonText","removeSelectedToBagButtonText","addLineProps","isMinifiedView","removeOrderActionHandler","_removeOrderTemplate","onRemoveTemplate","_getOrderTemplateAddToCartDialog","addTemplateToBagButtonText","AddOrderTemplateToCartComponent","addToCartText","_getOrderTemplateRenameControl","renameOrderTemplateDialogStrings","RenameOrderTemplateComponent","onRenameTemplate","renameOrderTemplateButtonText","renameTemplateButtonText","buttonEventReference","ActionsSplitButton","isStatementRequestAdminDropdownOpen","setIsStatementRequestAdminDropdownOpen","renameOrderTemplateDialogOpen","onToggleDropdown1","popoverReference","renderModalPopup","existingOrderTemplate","onOrderTemplateNameCancel","_buttonEventReference","requestStatementDropdownString","Random","Guid","generateGuid","OrderTemplateLineActions","orderTemplateLine","productListLine","LineId","onAddToBag","onRemoveItem","getAddToBag","fullProduct","ProductDetails","getRemoveItem","PopUp","removeFromOrderTemplateLinesText","moreButtonText","viewProductDetailsText","showMobile","setShowMobile","getActionButton","removeButtonClassName","addButtonClassName","getDesktopActionButton","onSelectLineHandler","isChecked","onSelect","checked","ExtraActionsPopup","showActions","setShowActions","actionsContainerClassName","OrderTemplateMobileLineView","_context$request$app2","UnitOfMeasure","renderProductCatalog","_renderProductImage","renderProductInfo","_renderPrice","_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","line","scope","selectAllRowsText","productUnitPrice","productUOM","productActions","_onRemoveSelection","removeSelectedFailureMessage","removeSelectedSuccessMessage","productSelection","productListLines","maxWaitTimeInMilliSeconds","removeProductListLinesAsync","_getOrderTemplatePageUrl","_this$props$data$orde","getUrlSync","substr","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","fullUrl","itemsPerPage","skipCount","_getCurrentPageNumber","totalItems","totalLines","previousText","flipperPrevious","nextText","flipperNext","UncontrolledPagination","paginationAriaLabel","qsp","startingItem","_renderPrev","_renderNext","previousAriaLabel","nextAriaLabel","_toggleDetailsDisplayed","_updateProductUrlCatalog","productDetails","getProductUrlSync","StringExtensions","isNullOrWhitespace","absoluteUrl","_changeQuantity","orderTemplateLinesData","orderTemplateLines","orderLineIndex","findIndex","newProductListLine","prevQuantity","_objectWithoutProperties","_excluded","updateProductListLinesAsync","list","newLine","updatedLines","updatedOrderTemplate","ProductListLines","ActiveOrderTemplateLinesInput","editOrderTemplateLineQuantityError","maxQuantityLimitText","addedToCartFailureMessage","addProductToCartInput","count","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","_renderOrderTemplateActions","_getOrderTemplateLineActions","_renderProductListHeader","_renderProductList","updateQuantity","debounce","updated","_product$fullProduct","_line$fullProduct","onSelectAll","productActionsText","headers","_generateLinesAddedToCartDialogResources","itemAddedToCartHeaderItemOneText","itemAddedToCartHeaderItemFormatText","itemAddedToCartHeaderMessageText","deleteTemplateButtonText","OrderTemplateActionsView","renameOrderTemplateTitleText","skip","selectOneRowText","priceFree","addOrderTemplateItemToBagButtonText","removeItemFromOrderTemplateButtonText","deleteButtonText","_line$fullProduct2","_context$request$app","shouldDisable","OrderTemplateLineView","ProductPrice","observable","action","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","queryResultSettings","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","createObservableDataAction","ctx","reviewId","tenantId","authToken","inputIsValid","serviceEndpoint","requestBody","concernCategory","requestHeader","Authorization","sendRequest","trace","isHelpful","ReviewConcernCategory","ReportReviewConcernInput","getCacheKey","getCacheObjectType","dataCacheType","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","label","yesButtonText","noButtonText","voteCount","helpfulPositive","helpfulNegative","onClickMethod","updateReviewHelpfulness","editButton","TOGGLE_EDIT_MODAL_BUTTON_CARD_ID","toggleWriteReviewModal","editReviewCardText","renderDate","Intl","DateTimeFormat","month","day","year","toggleReportReviewModal","reportToggle","reportConcernText","reportedReviews","reportedText","reportedReviewId","SubmitHelpfulnessVoteInput","ReviewsList","sortByDropdownOptions","mostHelpfulSortOptionText","mostRecentSortOptionText","highestRatedSortOptionText","lowestRatedSortOptionText","filterByDropdownOptions","allRatinsFilterByOptionText","fiveStarFilterByOptionText","fourStarFilterByOptionText","threeStarFilterByOptionText","twoStarFilterByOptionText","oneStarFilterByOptionText","reviewsListCallbacks","userReviewTitle","userReviewText","userReviewRating","updateReviewHelpfulnessVote","toggleReportModal","isReportModalOpen","_onReportModalOpen","_onReportModalClose","reportReview","_reportReviewCallback","updateFilterByDropdown","updateSortByDropdown","reviewsList","pagingInfo","listOfReviews","ratingsReviewsState","filterKeyValue","dropdownItemsCount","filterByOption","_userReview","_reviewCard","_reviewCards","reviewList","reviewElements","isTakenDown","isPublished","userName","submittedDateTime","wasReviewHelpfulText","userResponse","responderName","ReviewCard","_userReportModalToggle","reportingReviewId","_userReviewModal","_onReviewComplete","_userReviewModalToggle","modalCSS","isSuccess","_reportReviewModal","SubmitReview","submitReviewAttribute","SuccessButton","successAttribute","Cancel","cancelAttribute","SpamAdvertising","reportSpamText","OffensiveContent","offensiveContentText","Profanity","profanityContentText","returnFocusRef","feedbackThankYouText","cancelReportReviewText","reportReviewButtonText","okReportReviewText","reportModalMessage","errorMessageText","ReportReviewModal","_onRadioChange","_reportReview","hasReportError","reportReviewConcern","getRnrPartnerId","getUserToken","getRnrAuthEndpointId","_value","reportedReview","notification","selectedOption","skipItems","getSelectedProductIdFromActionInput","getReviewsForGivenProduct","GetProductReviewsInput","getRnrEndpointId","_updateVoteUi","alreadyExists","concat","submitHelpfulnessVote","showSpinner","LabeledDropdown","labelText","filterByDropdownText","dropdownOptions","onSelectOption","controlledByParent","sortByDropdownText","noReviewsWithSelectedFilterMessage","sortByOptions","filterByOptions","SearchState","SuggestionType","ProductListInventoryFilteringOptions","AutoSuggestInput","suggestionType","hitPrefix","hitSuffix","searchQuery","topResultsCount","_getAutoSuggest","autosuggest","_ctx$requestContext$a","productSearchCriteria","productListInventoryDisplay","HideOOS","inventoryRefinerValue","getInventorySortableRefinerValue","channelInventoryConfiguration","isInStock","ProductAvailabilitySortableAttributeRecordId","RefinerRecordId","DataTypeValue","AttributeDataType","TrueFalse","LeftValueBoundString","RightValueBoundString","UnitText","RowNumber","Count","RefinerSourceValue","ProductRefinerSource","Attribute","getInventoryConfigurationAsync","Refinement","searchCriteria","ProductSearchCriteria","HitPrefix","HitSuffix","searchSuggestions","getSearchSuggestionsAsync","Paging","Top","ImageUrl","AllSearchResults","autoSuggestPromises","inputData","CategorySuggestionsComponent","suggestions","autoSuggestProps","categorySuggestionHeading","reactNodes","_assembleNode","_renderTitle","categoryAutoSuggestionHeading","shouldShowFullPath","splitValue","pop","attribute","_generateLink","_getHighlightedText","suggestion","_getCategoryLink","_categoryRefiners$Val","searchPageURL","searchQsp","searchRefiners","queryUrl","categoryRefiners","refiners","SourceValue","Category","refiner","Values","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","None","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","slice","ProductsDataActions","ProductRefinerValueDataTypeValue","ProductRefinerTypeValue","isRangeType","dataTypeValue","Currency","Decimal","isRangeTypeForInteger","Integer","isCustomRangeTypeIntegerSelected","selectedRefinementCriterion","parentProductRefinerHierarchy","DisplayTemplateValue","DisplayTemplate","Range","isSingleSelectRangeTypeIntegerSelected","productRefinerValue","findMatchingRefinementCriterion","refinementCriteria","refinementCriterion","isMatchingRefinementCriterion","parent","getIntegerRangeName","rangeValue","RightValueBoundLocalizedString","LeftValueBoundLocalizedString","getUpdatedRefinementCriteria","itemToggleNotification","currentRefinementCriteria","updatedRefinementCriteria","toggledItemFound","r","selectedCriterion","isSelecting","rangeStart","rangeEnd","Text","RefinerTypeValue","RefinerType","SingleSelect","child","matchingIndex","criterion","splice","ChoiceSummary","closeButtonGlyph","_onClick","stopPropagation","clearAll","selectedRefiner","_getSelectedRefinerChoice","onChoiceClicked","itemClicked","choiceClicked","nextItemToFocus","nextSibling","selectedRefinersMap","_this$props$context","selectedChoices","channelInventoryConfigurationId","refinerHierarchy","choice","hierarchy","_rangeParentDisplay$","rangeParentDisplay","_getKeyForRefinerValue","rangeDisplayType","clearAllText","choiceAriaLabel","closeAriaLabel","clearAllAttributes","newIntRange","urlBuilder","_parent","choiceFormat","choiceRangeValueFormat","refinerValues","overallFormat","rangeFormat","refinerValueName","refinerName","KeyName","filterValue","currency","ErrorMessage","FeatureSearchResultItem","recommendation","productRecordId","featureSimilarDescriptionTitle","featureSimilarLooksTitle","img","Link","modalNode","zIndex","modalHeaderNode","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","_ref2","_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","Rating","_renderRating","productCount","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","trim","RefineSubmenu","_onToggleItem","_onToggleSubmenu","isExpandedOnInitialLoad","expanded","productRefinerHierarchy","timeout","_renderChildItems","_renderSingleMultiSelect","_renderRange","refinerValuesList","listItems","_getRangeType","SliderWithBars","onUpdateRefiners","prevState","Separator","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","_shouldHideFromRefiners","activeRefiners","_getexpandRefinerCount","expandRefinersCount","expandedRefiners","RefineMenuContainer","RefinerSectionContainer","_refineItemCommonProps","_onUpdateRefiners","_buildRefinerUrl","isInventorySortableAttribute","inventoryAwareSortableAttributeId","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","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","SocialShareItem","_getSocialShareItem","viewprops","SocialShareItemElement","icon","socialMedia","SocialMediaComponent","SocialMedia","Facebook","postUrl","Twitter","Pinterest","Linkedin","Mail","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","_renderAriaLabel","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","activeImageView","retrieveItems","renderModuleAttributes","pauseOnHover","ride","transitionType","hideFlipper","dismissEnabled","dismissCarouselAriaText","ariaLabelForDismissButton","_renderReactFragment","slot","_renderDesktopAccountBlock","_renderThumbnails","thumbnails","_renderThumbnailItem","renderConfigure","containerProps","dropdowns","renderConfigureDropdown","dropdown","labelContainerProps","select","renderForm","quickOrderProductContent","quickOrderMsgContent","createSearchResultModal","isRecoSearchPage","createModalBody","renderSort","renderRefiner","submenu","renderCategoryHierarchy","renderTitle","renderTitleCount","_props$context$action","_renderForm","_renderKeywordSuggestions","_renderProductSuggestions","_renderCategorySuggestions","SocialShareItemView","renderItem","star5Count","star4Count","star3Count","star2Count","star1Count","totalCount","formattedPercent","NumberFormat","barItemAriaLabel","Progress","SubmitUserReviewInput","userReviewData","authorization","onClickSubmit","submitButtonAttribute","cancelButtonAttribute","discardReviewButtonText","submitDisabled","submitReviewButtonText","ratingsInput","ratingsLabel","privacyPolicyLink","editReviewModalTitle","writeReviewModalTitle","stripWhiteSpacesFromString","selectRatingAriaLabel","initialRating","selectRatingLabel","reviewTitleMaxLength","reviewTitleAriaLabel","reviewTitleLabel","reviewTextMaxLength","rows","reviewAriaLabel","reviewTextLabel","policyTextBlocks","privacyPolicyTextFormat","isSeparatorAtStart","startsWith","isSeparatorAtEnd","endsWith","PrivacyPolicy","privacyPolicyAttribute","privacyPolicyTitle","onReviewSubmission","userEmail","emailAddress","submitUserReview","firstName","getReviewInput","GetUserReviewInput","removeOrderTemplateActionHandler","_renderOrderTemplateImages","orderTemplateAriaLabel","_getUrlSync","onClickHandler","_line$productListLine","_line$fullProduct$Pro","_line$fullProduct$Pro2","_line$fullProduct3","_line$fullProduct4"],"sourceRoot":""}