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,aAAeD,OAAOC,cAAgB,GAC7CD,OAAOC,aAAarB,QAAOnL,EAAAA,EAAA,GACpBuM,OAAOC,aAAarB,SAAW,IAC/BD,EAAQC,SAGXoB,OAAOC,aAAapB,YAAWpL,EAAAA,EAAA,GAC5BuM,OAAOC,aAAapB,aAAe,IACnCF,EAAQE,aAEY,MAAMqB,EAAiB,GAC9BA,EAAe,iEAAmE,CAC1Fd,EAAGA,IAAMC,EAAQ,MACjBc,GAAI,wCAEpBH,OAAOC,aAAeD,OAAOC,cAAgB,GAC7CD,OAAOC,aAAaC,eAAczM,EAAAA,EAAA,GACPuM,OAAOC,aAAaC,gBAAkB,IACtCA,I,MC/G3BE,EAAOC,QAAUnZ,O,OCAjBkZ,EAAOC,QAAUC,W","sources":["webpack://Msdyn365.Commerce.Online/./src/modules/moe-reviews-list/components/components.tsx?986b","webpack://Msdyn365.Commerce.Online/./src/modules/moe-reviews-list/components/report-review-modal.tsx?4fdb","webpack://Msdyn365.Commerce.Online/./src/modules/moe-reviews-list/components/review-card.tsx?5857","webpack://Msdyn365.Commerce.Online/./src/modules/moe-reviews-list/moe-reviews-list.tsx?be11","webpack://Msdyn365.Commerce.Online/./src/modules/moe-reviews-list/moe-reviews-list.view.tsx?c8c1","webpack://Msdyn365.Commerce.Online/./lib/moe-reviews-list/module-registration.js?0037","webpack://Msdyn365.Commerce.Online/external var \"React\"?0d3b","webpack://Msdyn365.Commerce.Online/external var \"ReactDOM\"?853b"],"sourcesContent":["/*--------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * See License.txt in the project root for license information.\r\n *--------------------------------------------------------------*/\r\n\r\n/* eslint-disable no-duplicate-imports */\r\nimport {\r\n format,\r\n getPayloadObject,\r\n getTelemetryAttributes,\r\n ILabeledDropdownOption,\r\n ITelemetryContent,\r\n TelemetryConstant\r\n} from '@msdyn365-commerce-modules/utilities';\r\nimport * as React from 'react';\r\n\r\nexport interface IReviewCountResources {\r\n pageReviewCountText: string;\r\n}\r\n\r\nexport interface IReviewCountProps {\r\n resources: IReviewCountResources;\r\n currentPage: number;\r\n reviewsCount: number;\r\n reviewsShownOnEachPage: number;\r\n}\r\n\r\nexport const ReviewCount: React.FC = (props: IReviewCountProps) => {\r\n const { currentPage, resources, reviewsCount, reviewsShownOnEachPage } = props;\r\n\r\n return (\r\n \r\n {format(\r\n resources.pageReviewCountText,\r\n _getReviewStartNumber(currentPage, reviewsShownOnEachPage),\r\n _getReviewEndNumber(currentPage, reviewsCount, reviewsShownOnEachPage),\r\n reviewsCount\r\n )}\r\n \r\n );\r\n};\r\n\r\nexport interface IPageControlResources {\r\n previousButtonText: string;\r\n nextButtonText: string;\r\n pageReviewAriaLabel: string;\r\n}\r\n\r\nexport interface IPageControlsProps {\r\n resources: IPageControlResources;\r\n currentPage: number;\r\n reviewsCount: number;\r\n reviewsShownOnEachPage: number;\r\n selectedSortByOption: ILabeledDropdownOption;\r\n selectedFilterByOption: ILabeledDropdownOption;\r\n telemetryContent?: ITelemetryContent;\r\n updateReviews(\r\n skipItems: number,\r\n selectedSortByOption: ILabeledDropdownOption,\r\n selectedFilterByOption: ILabeledDropdownOption,\r\n currentPage: number,\r\n isFilterApplied: boolean\r\n ): Promise;\r\n}\r\n\r\nexport const PageControls: React.FC = (props: IPageControlsProps) => {\r\n const { currentPage, resources, reviewsCount, reviewsShownOnEachPage } = props;\r\n const previousPageClick = React.useCallback(() => {\r\n return _getPreviousPageData(props);\r\n }, [props]);\r\n const nextPageClick = React.useCallback(() => {\r\n return _getNextPageData(props);\r\n }, [props]);\r\n const payLoad = getPayloadObject('click', props.telemetryContent!, TelemetryConstant.Next);\r\n const nextAttribute = getTelemetryAttributes(props.telemetryContent!, payLoad);\r\n payLoad.contentAction.etext = TelemetryConstant.Previous;\r\n const previousAttribute = getTelemetryAttributes(props.telemetryContent!, payLoad);\r\n\r\n return (\r\n
\r\n {_hasPreviousPage(currentPage) && (\r\n \r\n {resources.previousButtonText}\r\n \r\n )}\r\n {_hasNextPage(currentPage, reviewsCount, reviewsShownOnEachPage) && (\r\n \r\n {resources.nextButtonText}\r\n \r\n )}\r\n
\r\n );\r\n};\r\n\r\nconst _hasPreviousPage = (currentPage: number): boolean => {\r\n return currentPage > 1;\r\n};\r\n\r\nconst _hasNextPage = (currentPage: number, reviewsCount: number, reviewsShownOnEachPage: number): boolean => {\r\n return _getPagesCount(reviewsCount, reviewsShownOnEachPage) > currentPage;\r\n};\r\n\r\nconst _getReviewsShown = (reviewsShownOnEachPage: number) => {\r\n return Math.min(25, reviewsShownOnEachPage);\r\n};\r\n\r\nconst _getPagesCount = (reviewsCount: number, reviewsShownOnEachPage: number): number => {\r\n return Math.ceil(reviewsCount / _getReviewsShown(reviewsShownOnEachPage));\r\n};\r\n\r\nconst _paginationAriaLabel = (\r\n pageReviewAriaLabel: string,\r\n currentPage: number,\r\n reviewsCount: number,\r\n reviewsShownOnEachPage: number,\r\n isNextPage: boolean,\r\n page?: number\r\n): string => {\r\n const pageModifier = isNextPage ? 1 : -1;\r\n return format(\r\n pageReviewAriaLabel,\r\n _getReviewStartNumber(currentPage, reviewsShownOnEachPage, currentPage + pageModifier),\r\n _getReviewEndNumber(currentPage, reviewsCount, reviewsShownOnEachPage, currentPage + pageModifier),\r\n reviewsCount\r\n );\r\n};\r\n\r\nconst _getReviewStartNumber = (currentPage: number, reviewsShownOnEachPage: number, page?: number): number => {\r\n return ((page || currentPage) - 1) * _getReviewsShown(reviewsShownOnEachPage) + 1;\r\n};\r\n\r\nconst _getReviewEndNumber = (currentPage: number, reviewsCount: number, reviewsShownOnEachPage: number, page?: number): number => {\r\n const pageUsed = page || currentPage;\r\n const pageReviewCount = pageUsed * _getReviewsShown(reviewsShownOnEachPage);\r\n return pageReviewCount < reviewsCount ? pageReviewCount : reviewsCount;\r\n};\r\n\r\nconst _getPreviousPageData = async (props: IPageControlsProps) => {\r\n await props.updateReviews(\r\n _getReviewStartNumber(props.currentPage, props.reviewsShownOnEachPage) - 1 - _getReviewsShown(props.reviewsShownOnEachPage),\r\n props.selectedSortByOption,\r\n props.selectedFilterByOption,\r\n props.currentPage - 1,\r\n false\r\n );\r\n};\r\n\r\nconst _getNextPageData = async (props: IPageControlsProps) => {\r\n await props.updateReviews(\r\n _getReviewEndNumber(props.currentPage, props.reviewsCount, props.reviewsShownOnEachPage),\r\n props.selectedSortByOption,\r\n props.selectedFilterByOption,\r\n props.currentPage + 1,\r\n false\r\n );\r\n};\r\n","/*--------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * See License.txt in the project root for license information.\r\n *--------------------------------------------------------------*/\r\n\r\n/* eslint-disable no-duplicate-imports */\r\nimport { IAny, ICoreContext, IGeneric } from '@msdyn365-commerce/core';\r\nimport {\r\n Alert,\r\n getPayloadObject,\r\n getTelemetryAttributes,\r\n INodeProps,\r\n ITelemetryContent,\r\n Modal,\r\n ModalBody,\r\n ModalFooter,\r\n ModalHeader,\r\n TelemetryConstant\r\n} from '@msdyn365-commerce-modules/utilities';\r\nimport React from 'react';\r\n\r\nimport { ReviewConcernCategory } from '@msdyn365-commerce-modules/ratings-reviews';\r\nimport { IRnrKeyValuePair } from '@msdyn365-commerce-modules/ratings-reviews';\r\n\r\nexport interface IReportReviewModalProps {\r\n resources: IReportReviewModalResources;\r\n context: ICoreContext>;\r\n isOpen: boolean;\r\n returnRef: React.RefObject | undefined;\r\n reportedKey: string;\r\n hasError: boolean;\r\n telemetryContent?: ITelemetryContent;\r\n onModalToggle(): void;\r\n onRadioChange(event: React.ChangeEvent): void;\r\n reportReview(): void;\r\n}\r\n\r\nexport interface IReportReviewModalResources {\r\n reportConcernText: string;\r\n feedbackThankYouText: string;\r\n reportModalMessage: string;\r\n reportSubmittedMessage: string;\r\n reportSpamText: string;\r\n offensiveContentText: string;\r\n profanityContentText: string;\r\n okReportReviewText: string;\r\n cancelReportReviewText: string;\r\n reportReviewButtonText: string;\r\n errorMessageText: string;\r\n}\r\n\r\nexport interface IReportReviewModalViewProps {\r\n modal: INodeProps;\r\n modalHeader: INodeProps;\r\n modalFooter: INodeProps;\r\n modalBody: INodeProps;\r\n header: React.ReactElement;\r\n headerSubmitted: React.ReactElement;\r\n cancelButton: React.ReactElement;\r\n submitButton: React.ReactElement;\r\n succesfulButton: React.ReactElement;\r\n reportMessage: React.ReactElement;\r\n reportSubmittedMessage: React.ReactElement;\r\n radioButtons: React.ReactElement;\r\n error: React.ReactElement;\r\n}\r\n\r\nlet reportConcernDropdownOptions: IRnrKeyValuePair[];\r\n\r\n/**\r\n * CartLineItems component.\r\n */\r\n\r\nexport const ReportReviewModal = (props: IReportReviewModalProps): IReportReviewModalViewProps => {\r\n const payLoad = getPayloadObject('click', props.telemetryContent!, TelemetryConstant.SubmitReview);\r\n const submitReviewAttribute = getTelemetryAttributes(props.telemetryContent!, payLoad);\r\n payLoad.contentAction.etext = TelemetryConstant.SuccessButton;\r\n const successAttribute = getTelemetryAttributes(props.telemetryContent!, payLoad);\r\n payLoad.contentAction.etext = TelemetryConstant.Cancel;\r\n const cancelAttribute = getTelemetryAttributes(props.telemetryContent!, payLoad);\r\n\r\n reportConcernDropdownOptions = [\r\n { key: ReviewConcernCategory.SpamAdvertising, value: props.resources.reportSpamText },\r\n { key: ReviewConcernCategory.OffensiveContent, value: props.resources.offensiveContentText },\r\n { key: ReviewConcernCategory.Profanity, value: props.resources.profanityContentText }\r\n ];\r\n\r\n return {\r\n modal: {\r\n tag: Modal,\r\n className: 'ms-report-review-modal msc-modal-input-required',\r\n toggle: props.onModalToggle,\r\n applicationNode: 'renderPage',\r\n isOpen: props.isOpen,\r\n returnFocusRef: props.returnRef\r\n },\r\n modalHeader: { tag: ModalHeader, toggle: props.onModalToggle, className: 'ms-report-review-modal-header' },\r\n modalFooter: { tag: ModalFooter, className: 'ms-report-review-modal-footer' },\r\n modalBody: { tag: ModalBody, className: 'ms-report-review-modal-body' },\r\n header:

{props.resources.reportConcernText}

,\r\n headerSubmitted:

{props.resources.feedbackThankYouText}

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

{props.resources.reportModalMessage}

,\r\n reportSubmittedMessage:

{props.resources.reportSubmittedMessage}

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

{props.review.userName}

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

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

,\r\n reviewTitle:

{props.review.title}

,\r\n reviewText:

{props.review.reviewText}

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

{props.resources.wasReviewHelpfulText}

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

{props.review.userResponse.responderName}

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

{props.review.userResponse.responseText}

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

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

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

{props.resources.reportedText}

;\r\n }\r\n\r\n const ref = props.review.reviewId === props.reportedReviewId ? props.returnRef : undefined;\r\n\r\n return (\r\n \r\n );\r\n};\r\n","/* eslint-disable security/detect-object-injection */\r\n/*--------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * See License.txt in the project root for license information.\r\n *--------------------------------------------------------------*/\r\n\r\n/* eslint-disable no-duplicate-imports */\r\nimport { Review } from '@msdyn365-commerce/commerce-entities';\r\nimport { RatingComponent } from '@msdyn365-commerce/components';\r\nimport * as Msdyn365 from '@msdyn365-commerce/core';\r\nimport { SimpleProduct } from '@msdyn365-commerce/retail-proxy';\r\nimport {\r\n getRnrAuthEndpointId,\r\n getRnrEndpointId,\r\n getRnrPartnerId,\r\n getSelectedProductIdFromActionInput\r\n} from '@msdyn365-commerce-modules/retail-actions';\r\nimport {\r\n format,\r\n getTelemetryObject,\r\n ILabeledDropdownOnChangeNotification,\r\n ILabeledDropdownOption,\r\n IModuleProps,\r\n INodeProps,\r\n ITelemetryContent,\r\n LabeledDropdown\r\n} from '@msdyn365-commerce-modules/utilities';\r\nimport classname from 'classnames';\r\nimport { reaction } from 'mobx';\r\nimport { observer } from 'mobx-react';\r\nimport * as React from 'react';\r\n\r\nimport { reportReviewConcern, submitHelpfulnessVote } from '@msdyn365-commerce-modules/ratings-reviews';\r\nimport { getReviewsForGivenProduct } from '@msdyn365-commerce-modules/ratings-reviews';\r\nimport { GetProductReviewsInput } from '@msdyn365-commerce-modules/ratings-reviews';\r\nimport { ReportReviewConcernInput, ReviewConcernCategory } from '@msdyn365-commerce-modules/ratings-reviews';\r\nimport { SubmitHelpfulnessVoteInput } from '@msdyn365-commerce-modules/ratings-reviews';\r\nimport { IReviewModalViewProps, ReviewModal, submitReview } from '@msdyn365-commerce-modules/ratings-reviews';\r\nimport { IRnrKeyValuePair, IRnrOrderByKeyValuePair } from '@msdyn365-commerce-modules/ratings-reviews';\r\nimport { PageControls, ReviewCount } from './components/components';\r\nimport { IReportReviewModalViewProps, ReportReviewModal } from './components/report-review-modal';\r\nimport { IReviewCardViewProps, ReviewCard } from './components/review-card';\r\nimport { IMoeReviewsListData } from './moe-reviews-list.data';\r\nimport { IMoeReviewsListProps } from './moe-reviews-list.props.autogenerated';\r\n\r\nexport interface IReviewsListState {\r\n skipItems: number;\r\n listOfReviews: Review[];\r\n currentPage: number;\r\n reviewsCount: number;\r\n showSpinner: boolean;\r\n isFilterApplied: boolean;\r\n selectedSortByOption: ILabeledDropdownOption;\r\n selectedFilterByOption: ILabeledDropdownOption;\r\n userReviewRating: number;\r\n userReviewTitle: string;\r\n userReviewText: string;\r\n isReviewModalOpen: boolean;\r\n hasReviewError: boolean;\r\n isReportModalOpen: boolean;\r\n hasReportError: boolean;\r\n reportingReviewId: string;\r\n reportedKey: string;\r\n reported: boolean;\r\n reportedReviews: string[];\r\n votedReviews: { reviewId: string; approved: boolean }[];\r\n}\r\n\r\nexport interface IReviewsListCallbacks {\r\n toggleModal(): void;\r\n updateReviewTitle(title: string): void;\r\n updateReviewText(text: string): void;\r\n updateRating(rating: number): void;\r\n onReviewSubmitted(isSuccessful: boolean): void;\r\n submitReview(\r\n product: SimpleProduct,\r\n title: string,\r\n text: string,\r\n rating: number,\r\n context: Msdyn365.ICoreContext,\r\n userReview?: Review,\r\n onReviewSubmission?: (isSuccessful: boolean) => void\r\n ): void;\r\n updateReviewHelpfulnessVote(reviewId: string, isHelpful: boolean): void;\r\n toggleReportModal(reviewId: string): void;\r\n reportReview(reviewId: string, reportedKey: string): void;\r\n updateSortByDropdown(notification: ILabeledDropdownOnChangeNotification): void;\r\n updateFilterByDropdown(notification: ILabeledDropdownOnChangeNotification): void;\r\n updateReviews(\r\n skipItems: number,\r\n selectedSortByOption: ILabeledDropdownOption,\r\n selectedFilterByOption: ILabeledDropdownOption,\r\n currentPage: number,\r\n isFilterApplied: boolean\r\n ): void;\r\n}\r\n\r\nexport interface IReviewsListViewProps extends IMoeReviewsListProps {\r\n state: IReviewsListState;\r\n className: string;\r\n callbacks: IReviewsListCallbacks;\r\n moduleProps: IModuleProps;\r\n reviewModal: IReviewModalViewProps;\r\n reportReviewModal: IReportReviewModalViewProps;\r\n sortByDropdown: React.ReactNode;\r\n filterByDropdown: React.ReactNode;\r\n averageRating: React.ReactNode;\r\n reviewCount: React.ReactElement;\r\n refineReviewsProps: INodeProps;\r\n reviewsListProps: INodeProps;\r\n reviewCards: IReviewCardViewProps[];\r\n userReview?: IReviewCardViewProps;\r\n pageControls: React.ReactNode;\r\n noReviewsMessage: React.ReactElement;\r\n noReviewsWithFilterMessage: React.ReactElement;\r\n heading: React.ReactNode;\r\n sortByOptions: IRnrOrderByKeyValuePair[];\r\n filterByOptions: IRnrOrderByKeyValuePair[];\r\n}\r\n\r\n/**\r\n *\r\n * ReviewsList component.\r\n * @extends {React.Component, IReviewsListState>}\r\n */\r\n@observer\r\nclass ReviewsList extends React.Component, IReviewsListState> {\r\n public sortByDropdownOptions: IRnrOrderByKeyValuePair[] = [\r\n { key: 'MostRecent', value: this.props.resources.mostRecentSortOptionText },\r\n { key: 'MostHelpful', value: this.props.resources.mostHelpfulSortOptionText },\r\n { key: 'HighestRating', value: this.props.resources.highestRatedSortOptionText },\r\n { key: 'LowestRating', value: this.props.resources.lowestRatedSortOptionText }\r\n ];\r\n\r\n public filterByDropdownOptions: IRnrKeyValuePair[] = [\r\n { key: '1;2;3;4;5', value: this.props.resources.allRatinsFilterByOptionText },\r\n { key: '5', value: this.props.resources.fiveStarFilterByOptionText },\r\n { key: '4', value: this.props.resources.fourStarFilterByOptionText },\r\n { key: '3', value: this.props.resources.threeStarFilterByOptionText },\r\n { key: '2', value: this.props.resources.twoStarFilterByOptionText },\r\n { key: '1', value: this.props.resources.oneStarFilterByOptionText }\r\n ];\r\n\r\n private readonly _userReviewModalToggle: React.RefObject;\r\n\r\n private readonly _userReportModalToggle: React.RefObject;\r\n\r\n private readonly telemetryContent?: ITelemetryContent;\r\n\r\n constructor(props: IMoeReviewsListProps) {\r\n super(props);\r\n const {\r\n userReview: { result: userReview }\r\n } = this.props.data;\r\n\r\n this.state = {\r\n skipItems: 0,\r\n reviewsCount: 0,\r\n listOfReviews: [],\r\n currentPage: 1,\r\n showSpinner: false,\r\n isFilterApplied: false,\r\n selectedSortByOption: this.sortByDropdownOptions[0],\r\n selectedFilterByOption: this.filterByDropdownOptions[0],\r\n userReviewRating: userReview ? userReview.rating : 0,\r\n userReviewText: userReview ? userReview.reviewText : '',\r\n userReviewTitle: userReview ? userReview.title : '',\r\n isReviewModalOpen: false,\r\n hasReviewError: false,\r\n isReportModalOpen: false,\r\n hasReportError: false,\r\n reported: false,\r\n reportedKey: ReviewConcernCategory.SpamAdvertising,\r\n reportingReviewId: '',\r\n reportedReviews: [],\r\n votedReviews: []\r\n };\r\n\r\n this._userReviewModalToggle = React.createRef();\r\n this._userReportModalToggle = React.createRef();\r\n this.telemetryContent = getTelemetryObject(\r\n this.props.context.request.telemetryPageName!,\r\n this.props.friendlyName,\r\n this.props.telemetry\r\n );\r\n }\r\n\r\n public componentDidMount = async () => {\r\n void this.props.data.reviewsList.then(reviewsList => {\r\n if (\r\n reviewsList &&\r\n reviewsList.pagingInfo &&\r\n reviewsList.pagingInfo.totalItems &&\r\n reviewsList.items &&\r\n reviewsList.items.length > 0\r\n ) {\r\n this.setState({\r\n listOfReviews: reviewsList.items,\r\n reviewsCount: reviewsList.pagingInfo.totalItems\r\n });\r\n }\r\n });\r\n await this.updateReviews(0, this.state.selectedSortByOption, this.state.selectedFilterByOption, 1, this.state.isFilterApplied);\r\n\r\n reaction(\r\n () => this.props.data.ratingsReviewsState.result && this.props.data.ratingsReviewsState.result.filterKey,\r\n async (filterKey: string | undefined) => {\r\n const filterKeyValue = Number(filterKey);\r\n const dropdownItemsCount = this.filterByDropdownOptions.length;\r\n if (filterKey && !isNaN(filterKeyValue) && filterKeyValue < dropdownItemsCount) {\r\n const filterByOption = this.filterByDropdownOptions.find((option: IRnrKeyValuePair) => option.key === filterKey);\r\n if (!filterByOption) {\r\n this.props.telemetry.warning(`[reviews-list] cannot find filter with key ${filterKey}`);\r\n } else {\r\n await this.updateReviews(0, this.state.selectedSortByOption, filterByOption, 1, true);\r\n const selectedIndex = dropdownItemsCount - filterKeyValue;\r\n this.setState({\r\n selectedFilterByOption: this.filterByDropdownOptions[selectedIndex]\r\n });\r\n }\r\n }\r\n }\r\n );\r\n };\r\n\r\n public shouldComponentUpdate(nextProps: IMoeReviewsListProps, nextState: IReviewsListState): boolean {\r\n if (this.state === nextState && this.props.data === nextProps.data) {\r\n return false;\r\n }\r\n return true;\r\n }\r\n\r\n public render(): JSX.Element | null {\r\n const { className, heading, reviewsShownOnEachPage } = this.props.config;\r\n const { currentPage, reviewsCount, selectedFilterByOption, selectedSortByOption } = this.state;\r\n const {\r\n ratingsSummary: { result: ratingsSummary }\r\n } = this.props.data;\r\n const resources = this.props.resources;\r\n const completeClass = classname('ms-reviews-list', className);\r\n const viewProps: IReviewsListViewProps = {\r\n ...this.props,\r\n state: this.state,\r\n className: completeClass,\r\n moduleProps: {\r\n moduleProps: this.props,\r\n className: completeClass\r\n },\r\n callbacks: this.reviewsListCallbacks,\r\n reviewModal: this._userReviewModal(),\r\n reportReviewModal: this._reportReviewModal(),\r\n filterByDropdown: (\r\n \r\n ),\r\n sortByDropdown: (\r\n \r\n ),\r\n averageRating: ratingsSummary && (\r\n \r\n ),\r\n reviewCount: (\r\n \r\n ),\r\n refineReviewsProps: { className: 'ms-reviews-list__refiners' },\r\n reviewsListProps: { className: 'ms-reviews-list__reviews' },\r\n reviewCards: this._reviewCards(this.state.listOfReviews),\r\n userReview: this._userReview(),\r\n pageControls: (\r\n \r\n ),\r\n noReviewsMessage: (\r\n \r\n {this.props.context.request.user.isAuthenticated ? resources.noReviewsMessage : resources.noReviewsMessageWithoutLogin}\r\n \r\n ),\r\n noReviewsWithFilterMessage: (\r\n \r\n {resources.noReviewsWithSelectedFilterMessage}\r\n \r\n ),\r\n heading: heading && heading.text && (\r\n \r\n ),\r\n sortByOptions: this.sortByDropdownOptions,\r\n filterByOptions: this.filterByDropdownOptions\r\n } as IReviewsListViewProps;\r\n\r\n return this.props.renderView(viewProps) as React.ReactElement;\r\n }\r\n\r\n public handleHeadingChange = (event: Msdyn365.ContentEditableEvent) => (this.props.config.heading!.text = event.target.value);\r\n\r\n private readonly _userReview = () => {\r\n const userReview = this.props.data.userReview.result;\r\n\r\n return userReview && this._reviewCard(userReview, true);\r\n };\r\n\r\n private readonly _reviewCards = (reviewList: Review[]) => {\r\n const userReview = this.props.data.userReview.result;\r\n const reviewElements: IReviewCardViewProps[] = [];\r\n\r\n for (const review of reviewList) {\r\n if (!review.isTakenDown && review.isPublished && userReview ? review.reviewId !== userReview.reviewId : true) {\r\n reviewElements.push(this._reviewCard(review, false));\r\n }\r\n }\r\n return reviewElements;\r\n };\r\n\r\n private readonly _reviewCard = (review: Review, userReview: boolean): IReviewCardViewProps => {\r\n return ReviewCard({\r\n review,\r\n resources: { ...this.props.resources },\r\n context: this.props.context,\r\n isUserReview: userReview,\r\n parentId: this.props.id,\r\n parentType: this.props.typeName,\r\n reportedReviews: this.state.reportedReviews,\r\n returnRef: this._userReportModalToggle,\r\n reportedReviewId: this.state.reportingReviewId,\r\n toggleWriteReviewModal: this._toggleReviewModal,\r\n toggleReportReviewModal: this._onReportModalOpen,\r\n updateReviewHelpfulness: this.updateReviewHelpfulnessVote,\r\n votedReviews: this.state.votedReviews\r\n });\r\n };\r\n\r\n private readonly _userReviewModal = (): IReviewModalViewProps => {\r\n return ReviewModal({\r\n userReview: this.props.data.userReview.result,\r\n product: this.props.data.product.result,\r\n resources: { ...this.props.resources },\r\n context: this.props.context,\r\n parentId: this.props.id,\r\n parentType: this.props.typeName,\r\n isOpen: this.state.isReviewModalOpen,\r\n rating: this.state.userReviewRating,\r\n reviewTitle: this.state.userReviewTitle,\r\n reviewText: this.state.userReviewText,\r\n onModalToggle: this._toggleReviewModal,\r\n onTitleChange: this._onTitleChange,\r\n onTextChange: this._onTextChange,\r\n onRatingChange: this._onRatingChange,\r\n onReviewComplete: this._onReviewComplete,\r\n renderContextId: 'writeReview-list',\r\n returnRef: this._userReviewModalToggle,\r\n hasError: this.state.hasReviewError\r\n });\r\n };\r\n\r\n private readonly _onTitleChange = (event: React.ChangeEvent): void => {\r\n this.reviewsListCallbacks.updateReviewTitle(event.target.value);\r\n };\r\n\r\n private readonly _onTextChange = (event: React.ChangeEvent): void => {\r\n this.reviewsListCallbacks.updateReviewText(event.target.value);\r\n };\r\n\r\n private readonly _onRatingChange = (value: number): void => {\r\n this.reviewsListCallbacks.updateRating(value);\r\n };\r\n\r\n private readonly _toggleReviewModal = (): void => {\r\n const userReview = this.props.data.userReview.result;\r\n if (this.state.isReviewModalOpen) {\r\n this.setState({ isReviewModalOpen: false, hasReviewError: false });\r\n } else {\r\n this.setState({\r\n isReviewModalOpen: true,\r\n userReviewText: userReview!.reviewText,\r\n userReviewTitle: userReview!.title,\r\n userReviewRating: userReview!.rating\r\n });\r\n }\r\n };\r\n\r\n private readonly _onReviewComplete = (isSuccess: boolean): void => {\r\n if (isSuccess) {\r\n this.setState({ isReviewModalOpen: false, hasReviewError: false });\r\n } else {\r\n this.setState({ hasReviewError: true });\r\n }\r\n };\r\n\r\n private readonly _reportReviewModal = () => {\r\n return ReportReviewModal({\r\n resources: { ...this.props.resources },\r\n context: this.props.context,\r\n isOpen: this.state.isReportModalOpen,\r\n returnRef: this._userReportModalToggle,\r\n reportedKey: this.state.reportedKey,\r\n onModalToggle: this._onReportModalClose,\r\n onRadioChange: this._onRadioChange,\r\n reportReview: this._reportReview,\r\n hasError: this.state.hasReportError,\r\n telemetryContent: this.telemetryContent\r\n });\r\n };\r\n\r\n private readonly _onReportModalOpen = (reviewId: string) => {\r\n this.setState({\r\n isReportModalOpen: true,\r\n reportingReviewId: reviewId,\r\n reported: false,\r\n reportedKey: ReviewConcernCategory.SpamAdvertising\r\n });\r\n };\r\n\r\n private readonly _onReportModalClose = () => {\r\n this.setState({ isReportModalOpen: false, hasReportError: false });\r\n };\r\n\r\n private readonly _onRadioChange = (event: React.ChangeEvent) => {\r\n this.setState({ reportedKey: event.currentTarget.getAttribute('data-key') || '' });\r\n };\r\n\r\n private readonly _reportReviewCallback = (reviewId: string, reportedKey: string) => {\r\n reportReviewConcern(\r\n new ReportReviewConcernInput(\r\n reviewId,\r\n getRnrPartnerId(this.props.context.actionContext),\r\n this.props.context.request.locale,\r\n reportedKey,\r\n this.getUserToken(this.props.context.request),\r\n getRnrAuthEndpointId(this.props.context.actionContext)\r\n ),\r\n this.props.context.actionContext\r\n )\r\n .then((_value: boolean) => {\r\n const reportedReview = this.state.reportedReviews;\r\n reportedReview.push(reviewId);\r\n this.setState({ reported: true, reportedReviews: reportedReview, hasReportError: false });\r\n })\r\n .catch((error: boolean) => {\r\n this.setState({ hasReportError: true });\r\n });\r\n };\r\n\r\n private readonly _reportReview = () => {\r\n this._reportReviewCallback(this.state.reportingReviewId, this.state.reportedKey);\r\n };\r\n\r\n private readonly updateSortByDropdown = async (notification: ILabeledDropdownOnChangeNotification) => {\r\n await this.updateReviews(0, notification.selectedOption, this.state.selectedFilterByOption, 1, this.state.isFilterApplied);\r\n };\r\n\r\n private readonly updateFilterByDropdown = async (notification: ILabeledDropdownOnChangeNotification) => {\r\n await this.updateReviews(0, this.state.selectedSortByOption, notification.selectedOption, 1, true);\r\n };\r\n\r\n private readonly updateReviews = async (\r\n skipItems: number | 0,\r\n selectedSortByOption: ILabeledDropdownOption,\r\n selectedFilterByOption: ILabeledDropdownOption,\r\n currentPage: number,\r\n isFilterApplied: boolean\r\n ) => {\r\n const productId = getSelectedProductIdFromActionInput(this.props.context.actionContext);\r\n if (productId === undefined) {\r\n return;\r\n }\r\n const result = await getReviewsForGivenProduct(\r\n // Task #211227597 Remove this hardcoded values.\r\n new GetProductReviewsInput(\r\n productId,\r\n getRnrPartnerId(this.props.context.actionContext),\r\n this.props.context.request.locale,\r\n getRnrEndpointId(this.props.context.actionContext),\r\n selectedSortByOption.key,\r\n selectedFilterByOption.key,\r\n skipItems < 0 ? 0 : skipItems,\r\n this.props.config.reviewsShownOnEachPage\r\n ),\r\n this.props.context.actionContext\r\n );\r\n if (result && result.items && result.pagingInfo && result.pagingInfo.totalItems !== undefined) {\r\n this.setState({\r\n currentPage,\r\n listOfReviews: result.items,\r\n selectedSortByOption,\r\n selectedFilterByOption,\r\n reviewsCount: result.pagingInfo.totalItems,\r\n isFilterApplied\r\n });\r\n }\r\n };\r\n\r\n private readonly _updateVoteUi = (reviewId: string, isHelpful: boolean): void => {\r\n let alreadyExists = false;\r\n let list = this.state.votedReviews.map(review => {\r\n if (review.reviewId === reviewId) {\r\n review.approved = isHelpful;\r\n alreadyExists = true;\r\n }\r\n return review;\r\n });\r\n\r\n if (!alreadyExists) {\r\n list = list.concat({ reviewId, approved: isHelpful });\r\n }\r\n\r\n this.setState({ votedReviews: list });\r\n };\r\n\r\n private readonly updateReviewHelpfulnessVote = (reviewId: string, isHelpful: boolean): void => {\r\n submitHelpfulnessVote(\r\n new SubmitHelpfulnessVoteInput(\r\n reviewId,\r\n getRnrPartnerId(this.props.context.actionContext),\r\n this.props.context.request.locale,\r\n isHelpful,\r\n this.getUserToken(this.props.context.request),\r\n getRnrAuthEndpointId(this.props.context.actionContext)\r\n ),\r\n this.props.context.actionContext\r\n )\r\n .then(() => {\r\n this._updateVoteUi(reviewId, isHelpful);\r\n })\r\n .catch((error: Error) => {\r\n throw new Error('[submitHelpfulnessVote]Error executing action');\r\n });\r\n };\r\n\r\n private readonly getUserToken = (context: Msdyn365.IRequestContext): string => {\r\n return context && context.user && context.user.token;\r\n };\r\n\r\n private readonly reviewsListCallbacks: IReviewsListCallbacks = {\r\n updateReviewTitle: (title: string): void => {\r\n this.setState({ userReviewTitle: title });\r\n },\r\n updateReviewText: (text: string): void => {\r\n this.setState({ userReviewText: text });\r\n },\r\n updateRating: (rating: number): void => {\r\n this.setState({ userReviewRating: rating });\r\n },\r\n onReviewSubmitted: (isSuccessful: boolean): void => {\r\n if (isSuccessful) {\r\n this.setState({ isReviewModalOpen: false, hasReviewError: false });\r\n } else {\r\n this.setState({ hasReviewError: true });\r\n }\r\n },\r\n submitReview,\r\n toggleModal: this._toggleReviewModal,\r\n updateReviewHelpfulnessVote: this.updateReviewHelpfulnessVote,\r\n toggleReportModal: (reviewId: string): void => {\r\n this.state.isReportModalOpen ? this._onReportModalOpen(reviewId) : this._onReportModalClose();\r\n },\r\n reportReview: this._reportReviewCallback,\r\n updateFilterByDropdown: this.updateFilterByDropdown,\r\n updateSortByDropdown: this.updateSortByDropdown,\r\n updateReviews: this.updateReviews\r\n };\r\n}\r\n\r\nexport default ReviewsList;\r\n","/*--------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * See License.txt in the project root for license information.\r\n *--------------------------------------------------------------*/\r\n\r\n/* eslint-disable no-duplicate-imports */\r\n/* eslint-disable react/no-unknown-property */\r\nimport { IModuleProps, Module, Node } from '@msdyn365-commerce-modules/utilities';\r\nimport * as React from 'react';\r\n\r\nimport { IReviewModalViewProps } from '@msdyn365-commerce-modules/ratings-reviews';\r\nimport { IReportReviewModalViewProps } from './components/report-review-modal';\r\nimport { IReviewCardViewProps } from './components/review-card';\r\nimport { IReviewsListState, IReviewsListViewProps } from './moe-reviews-list';\r\n\r\nconst ReviewsListview: React.FC = props => {\r\n const {\r\n averageRating,\r\n filterByDropdown,\r\n heading,\r\n moduleProps,\r\n noReviewsMessage,\r\n noReviewsWithFilterMessage,\r\n pageControls,\r\n refineReviewsProps,\r\n reportReviewModal,\r\n reviewsListProps,\r\n reviewCards,\r\n reviewCount,\r\n reviewModal,\r\n sortByDropdown,\r\n state,\r\n userReview\r\n } = props;\r\n\r\n if (!userReview && reviewCards.length === 0 && !state.isFilterApplied) {\r\n return {noReviewsMessage};\r\n }\r\n\r\n return (\r\n \r\n {heading}\r\n {averageRating}\r\n {reviewCount}\r\n \r\n {sortByDropdown}\r\n {filterByDropdown}\r\n \r\n \r\n {userReview && buildReviewCard(userReview)}\r\n {reviewCards.map(review => {\r\n return buildReviewCard(review);\r\n })}\r\n \r\n {reviewCards.length === 0 && state.isFilterApplied && noReviewsWithFilterMessage}\r\n {pageControls}\r\n {createReviewModal(reviewModal, moduleProps)}\r\n {createReportModal(reportReviewModal, state)}\r\n \r\n );\r\n};\r\n\r\nconst buildReviewCard = (props: IReviewCardViewProps) => {\r\n return (\r\n \r\n \r\n {props.rating}\r\n {props.name}\r\n \r\n \r\n \r\n {props.reviewTitle}\r\n {props.date}\r\n {props.reviewText}\r\n \r\n \r\n {props.responseName}\r\n {props.responseDate}\r\n {props.responseText}\r\n \r\n \r\n {props.ratingHelpfulLabel}\r\n {props.like}\r\n {props.dislike}\r\n {props.edit}\r\n {props.report}\r\n \r\n \r\n \r\n );\r\n};\r\n\r\nconst createReviewModal = (props: IReviewModalViewProps, moduleProps: IModuleProps): JSX.Element => {\r\n return (\r\n \r\n {props.modalHeader}\r\n \r\n \r\n \r\n {props.rating}\r\n {props.ratingLabel}\r\n \r\n \r\n {props.titleLabel}\r\n {props.titleInput}\r\n \r\n \r\n {props.textLabel}\r\n {props.textInput}\r\n \r\n {props.privacyPolicyUrl}\r\n {props.error}\r\n \r\n \r\n \r\n {props.submitButton}\r\n {props.cancelButton}\r\n \r\n \r\n );\r\n};\r\n\r\nconst createReportModal = (props: IReportReviewModalViewProps, state: IReviewsListState): JSX.Element => {\r\n return (\r\n \r\n {state.reported ? props.headerSubmitted : props.header}\r\n \r\n {state.reported ? props.reportSubmittedMessage : [props.reportMessage, props.radioButtons, props.error]}\r\n \r\n {state.reported ? props.succesfulButton : [props.submitButton, props.cancelButton]}\r\n \r\n );\r\n};\r\n\r\nexport default ReviewsListview;\r\n","const binding = { modules: {}, dataActions: {} };\n\n const registerActionId = (actionPath) => {\n if (binding.dataActions[actionPath] &&\n binding.dataActions[actionPath].default &&\n binding.dataActions[actionPath].default.prototype &&\n binding.dataActions[actionPath].default.prototype.id) {\n binding.dataActions[binding.dataActions[actionPath].default.prototype.id] = binding.dataActions[actionPath];\n } else {\n Object.keys(binding.dataActions[actionPath] || {}).forEach(exportName => {\n if (binding.dataActions[actionPath][exportName] &&\n binding.dataActions[actionPath][exportName].prototype &&\n binding.dataActions[actionPath][exportName].prototype.Action) {\n binding.dataActions[binding.dataActions[actionPath][exportName].prototype.id] = binding.dataActions[actionPath][exportName];\n }\n })\n }\n };\n\n const registerSanitizedActionPath = (sanitizedActionPath, dataAction) => {\n if (process.env.NODE_ENV === 'development') {\n if (!dataAction.default) {\n throw new Error('Data action path does not have a default export');\n }\n if (!(dataAction.default.prototype.id && binding.dataActions[dataAction.default.prototype.id]) || !binding.dataActions[sanitizedActionPath]) {\n binding.dataActions[sanitizedActionPath] = dataAction;\n }\n } else {\n binding.dataActions[sanitizedActionPath] = dataAction;\n if (!binding.dataActions[sanitizedActionPath].default) {\n throw new Error('Data action path ' + sanitizedActionPath + ' does not have a default export');\n }\n binding.dataActions[sanitizedActionPath].default.prototype.RegistrationId = sanitizedActionPath;\n if (binding.dataActions[sanitizedActionPath].default.prototype.id) {\n binding.dataActions[binding.dataActions[sanitizedActionPath].default.prototype.id] = sanitizedActionPath;\n }\n }\n };\n \n\n (binding.modules['moe-reviews-list'] = {\n c: () => require('partner/modules/moe-reviews-list/moe-reviews-list.tsx'),\n $type: 'contentModule',\n da: [{name:'product', path:'@msdyn365-commerce-modules/retail-actions/dist/lib/get-selected-variant', runOn: 0},{name:'ratingsReviewsState', path:'@msdyn365-commerce-modules/ratings-reviews/dist/lib/actions/ratings-reviews-state-data-action', runOn: 1},{name:'ratingsSummary', path:'@msdyn365-commerce-modules/retail-actions/dist/lib/get-ratings-summary', runOn: 0},{name:'reviewsList', path:'@msdyn365-commerce-modules/ratings-reviews/dist/lib/actions/get-product-reviews', runOn: 0},{name:'userReview', path:'@msdyn365-commerce-modules/ratings-reviews/dist/lib/actions/get-user-review', runOn: 0}],\n \n iNM: false,\n ns: '__local__',\n n: 'moe-reviews-list',\n p: '__local__',\n \n pdp: '',\n \n \n md: 'src/modules/moe-reviews-list'\n });\n \n\n {\n const sanitizedActionPath = '@msdyn365-commerce-modules/ratings-reviews/dist/lib/actions/get-product-reviews';\n let dataAction = require('@msdyn365-commerce-modules/ratings-reviews/dist/lib/actions/get-product-reviews');\n registerSanitizedActionPath(sanitizedActionPath, dataAction);\n }\n \n\n {\n const sanitizedActionPath = '@msdyn365-commerce-modules/ratings-reviews/dist/lib/actions/get-user-review';\n let dataAction = require('@msdyn365-commerce-modules/ratings-reviews/dist/lib/actions/get-user-review');\n registerSanitizedActionPath(sanitizedActionPath, dataAction);\n }\n \n\n {\n const sanitizedActionPath = '@msdyn365-commerce-modules/ratings-reviews/dist/lib/actions/ratings-reviews-state-data-action';\n let dataAction = require('@msdyn365-commerce-modules/ratings-reviews/dist/lib/actions/ratings-reviews-state-data-action');\n registerSanitizedActionPath(sanitizedActionPath, dataAction);\n }\n \n\n {\n const sanitizedActionPath = '@msdyn365-commerce-modules/retail-actions/dist/lib/get-ratings-summary';\n let dataAction = require('@msdyn365-commerce-modules/retail-actions/dist/lib/get-ratings-summary');\n registerSanitizedActionPath(sanitizedActionPath, dataAction);\n }\n \n\n {\n const sanitizedActionPath = '@msdyn365-commerce-modules/retail-actions/dist/lib/get-selected-variant';\n let dataAction = require('@msdyn365-commerce-modules/retail-actions/dist/lib/get-selected-variant');\n registerSanitizedActionPath(sanitizedActionPath, dataAction);\n }\n \n\n \n window.__bindings__ = window.__bindings__ || {};\n window.__bindings__.modules = {\n ...window.__bindings__.modules || {},\n ...binding.modules\n };\n \n window.__bindings__.dataActions = {\n ...window.__bindings__.dataActions || {},\n ...binding.dataActions\n };\n export const viewDictionary = {};\n viewDictionary['__local__|__local__|modules|moe-reviews-list|moe-reviews-list'] = {\n c: () => require('partner/modules/moe-reviews-list/moe-reviews-list.view.tsx'),\n cn: '__local__-__local__-moe-reviews-list'\n };\nwindow.__bindings__ = window.__bindings__ || {};\nwindow.__bindings__.viewDictionary = {\n ...window.__bindings__.viewDictionary || {},\n ...viewDictionary\n };","module.exports = React;","module.exports = ReactDOM;"],"names":["ReviewCount","props","currentPage","resources","reviewsCount","reviewsShownOnEachPage","React","className","format","pageReviewCountText","_getReviewStartNumber","_getReviewEndNumber","PageControls","previousPageClick","_getPreviousPageData","nextPageClick","_getNextPageData","payLoad","getPayloadObject","telemetryContent","TelemetryConstant","Next","nextAttribute","getTelemetryAttributes","contentAction","etext","Previous","previousAttribute","_hasPreviousPage","Object","assign","onClick","_paginationAriaLabel","pageReviewAriaLabel","previousButtonText","_hasNextPage","nextButtonText","_getPagesCount","_getReviewsShown","Math","min","ceil","isNextPage","page","pageModifier","pageReviewCount","async","updateReviews","selectedSortByOption","selectedFilterByOption","reportConcernDropdownOptions","radioPairs","pairs","option","inputId","key","checked","reportedKey","push","type","name","id","value","onChange","onRadioChange","htmlFor","rating","RatingComponent","readOnly","avgRating","review","ariaLabel","reviewRatingNarratorText","context","parentId","typeName","parentType","data","voteHelpfulButton","isHelpful","isVoted","isVotedFor","i","votedReviews","length","reviewId","approved","isDisabled","isUserReview","label","yesButtonText","noButtonText","voteCount","helpfulPositive","helpfulNegative","title","user","request","undefined","onClickMethod","updateReviewHelpfulness","isAuthenticated","Button","href","signInUrl","tag","editButton","TOGGLE_EDIT_MODAL_BUTTON_CARD_ID","toggleWriteReviewModal","editReviewCardText","renderDate","date","Intl","DateTimeFormat","locale","month","day","year","Date","_unused","toggleReportReviewModal","reportToggle","reportConcernText","reportedReviews","includes","reportedText","ref","reportedReviewId","returnRef","innerRef","ReviewsList","constructor","super","sortByDropdownOptions","this","mostRecentSortOptionText","mostHelpfulSortOptionText","highestRatedSortOptionText","lowestRatedSortOptionText","filterByDropdownOptions","allRatinsFilterByOptionText","fiveStarFilterByOptionText","fourStarFilterByOptionText","threeStarFilterByOptionText","twoStarFilterByOptionText","oneStarFilterByOptionText","componentDidMount","reviewsList","then","pagingInfo","totalItems","items","setState","listOfReviews","state","isFilterApplied","reaction","ratingsReviewsState","result","filterKey","filterKeyValue","Number","dropdownItemsCount","isNaN","filterByOption","find","selectedIndex","telemetry","warning","handleHeadingChange","event","config","heading","text","target","_userReview","userReview","_reviewCard","_reviewCards","reviewList","reviewElements","isTakenDown","isPublished","cardProps","userName","submittedDateTime","reviewTitle","reviewText","ratingHelpfulLabel","wasReviewHelpfulText","like","dislike","edit","report","responseName","userResponse","responderName","responseText","responseDate","cardBodyProps","responseProps","reviewProps","controlsProps","headerProps","ReviewCard","_objectSpread","_userReportModalToggle","reportingReviewId","_toggleReviewModal","_onReportModalOpen","updateReviewHelpfulnessVote","_userReviewModal","ReviewModal","product","isOpen","isReviewModalOpen","userReviewRating","userReviewTitle","userReviewText","onModalToggle","onTitleChange","_onTitleChange","onTextChange","_onTextChange","onRatingChange","_onRatingChange","onReviewComplete","_onReviewComplete","renderContextId","_userReviewModalToggle","hasError","hasReviewError","reviewsListCallbacks","updateReviewTitle","updateReviewText","updateRating","isSuccess","_reportReviewModal","SubmitReview","submitReviewAttribute","SuccessButton","successAttribute","Cancel","cancelAttribute","ReviewConcernCategory","SpamAdvertising","reportSpamText","OffensiveContent","offensiveContentText","Profanity","profanityContentText","modal","Modal","toggle","applicationNode","returnFocusRef","modalHeader","ModalHeader","modalFooter","ModalFooter","modalBody","ModalBody","header","headerSubmitted","feedbackThankYouText","cancelButton","cancelReportReviewText","submitButton","reportReview","reportReviewButtonText","succesfulButton","okReportReviewText","reportMessage","reportModalMessage","reportSubmittedMessage","radioButtons","error","Alert","color","errorMessageText","ReportReviewModal","isReportModalOpen","_onReportModalClose","_onRadioChange","_reportReview","hasReportError","reported","currentTarget","getAttribute","_reportReviewCallback","reportReviewConcern","ReportReviewConcernInput","getRnrPartnerId","actionContext","getUserToken","getRnrAuthEndpointId","_value","reportedReview","catch","updateSortByDropdown","notification","selectedOption","updateFilterByDropdown","skipItems","productId","getSelectedProductIdFromActionInput","getReviewsForGivenProduct","GetProductReviewsInput","getRnrEndpointId","_updateVoteUi","alreadyExists","list","map","concat","submitHelpfulnessVote","SubmitHelpfulnessVoteInput","Error","token","onReviewSubmitted","isSuccessful","submitReview","toggleModal","toggleReportModal","showSpinner","getTelemetryObject","telemetryPageName","friendlyName","shouldComponentUpdate","nextProps","nextState","render","ratingsSummary","completeClass","classname","viewProps","moduleProps","callbacks","reviewModal","reportReviewModal","filterByDropdown","LabeledDropdown","labelText","filterByDropdownText","dropdownId","dropdownOptions","onSelectOption","controlledByParent","sortByDropdown","sortByDropdownText","averageRating","averageRatingAriaLabel","ratingCount","reviewCount","refineReviewsProps","reviewsListProps","reviewCards","pageControls","noReviewsMessage","noReviewsMessageWithoutLogin","noReviewsWithFilterMessage","noReviewsWithSelectedFilterMessage","Msdyn365","editProps","onEdit","requestContext","sortByOptions","filterByOptions","renderView","__decorate","observer","buildReviewCard","Node","createReviewModal","Module","form","inputRow","ratingLabel","titleLabel","titleInput","textLabel","textInput","privacyPolicyUrl","createReportModal","binding","modules","dataActions","registerSanitizedActionPath","sanitizedActionPath","dataAction","default","prototype","RegistrationId","c","require","$type","da","path","runOn","iNM","ns","n","p","pdp","md","window","__bindings__","viewDictionary","cn","module","exports","ReactDOM"],"sourceRoot":""}