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C,uBAAyB,CAAC9C,EAAM+C,cAAe/C,EAAMgD,aAAchD,EAAMqC,QAErGpC,EAAAA,cAACC,EAAAA,KAAIC,OAAAC,OAAA,GAAKJ,EAAMsC,aAAcI,EAAMC,SAAW3C,EAAMiD,gBAAkB,CAACjD,EAAMuC,aAAcvC,EAAMwC,gBAgDjGC,CAAkBe,EAAmBd,IAnBnCzC,EAAAA,cAACwB,EAAAA,OAAMtB,OAAAC,OAAA,GAAKoB,GAAc4B,EAoBxB,SC/MjB2f,EAAOC,QAAU/iB,cCAjB8iB,EAAOC,QAAUC","sources":["webpack://@msdyn365-commerce-partners/fabrikam/./lib/reviews-list/module-registration.js?7db4","webpack://@msdyn365-commerce-partners/fabrikam/./src/modules/fabrikam/views/reviews-list.view.tsx?cd2e","webpack://@msdyn365-commerce-partners/fabrikam/./src/actions/get-product-reviews.ts?6edb","webpack://@msdyn365-commerce-partners/fabrikam/./src/actions/get-user-review.ts?bad7","webpack://@msdyn365-commerce-partners/fabrikam/./src/actions/inputs/get-product-reviews-input.ts?c654","webpack://@msdyn365-commerce-partners/fabrikam/./src/actions/inputs/get-user-review-input.ts?ab81","webpack://@msdyn365-commerce-partners/fabrikam/./src/actions/ratings-reviews-state-data-action.ts?26cd","webpack://@msdyn365-commerce-partners/fabrikam/./src/actions/submit-user-review.ts?ac78","webpack://@msdyn365-commerce-partners/fabrikam/./src/actions/inputs/submit-user-review-input.ts?3afb","webpack://@msdyn365-commerce-partners/fabrikam/./src/common/review-modal.tsx?54a9","webpack://@msdyn365-commerce-partners/fabrikam/./src/common/rnrInterface.ts?f761","webpack://@msdyn365-commerce-partners/fabrikam/./src/modules/ratings-histogram/component/components.tsx?f324","webpack://@msdyn365-commerce-partners/fabrikam/./src/modules/ratings-histogram/ratings-histogram.tsx?f6bc","webpack://@msdyn365-commerce-partners/fabrikam/./src/modules/ratings-histogram/ratings-histogram.view.tsx?5bff","webpack://@msdyn365-commerce-partners/fabrikam/./src/actions/report-review-concern.ts?bf43","webpack://@msdyn365-commerce-partners/fabrikam/./src/actions/submit-helpfulness-vote.ts?a8ab","webpack://@msdyn365-commerce-partners/fabrikam/./src/actions/inputs/report-review-concern-input.ts?b071","webpack://@msdyn365-commerce-partners/fabrikam/./src/modules/reviews-list/components/components.tsx?033b","webpack://@msdyn365-commerce-partners/fabrikam/./src/modules/reviews-list/components/report-review-modal.tsx?53d3","webpack://@msdyn365-commerce-partners/fabrikam/./src/modules/reviews-list/components/review-card.tsx?6bbd","webpack://@msdyn365-commerce-partners/fabrikam/./src/actions/inputs/submit-helpfulness-vote-input.ts?07aa","webpack://@msdyn365-commerce-partners/fabrikam/./src/modules/reviews-list/reviews-list.tsx?37e8","webpack://@msdyn365-commerce-partners/fabrikam/./src/modules/reviews-list/reviews-list.view.tsx?0e4a","webpack://@msdyn365-commerce-partners/fabrikam/./src/modules/write-review/components/components.tsx?3575","webpack://@msdyn365-commerce-partners/fabrikam/./src/modules/write-review/write-review.tsx?9afc","webpack://@msdyn365-commerce-partners/fabrikam/./src/modules/write-review/write-review.view.tsx?b867","webpack://@msdyn365-commerce-partners/fabrikam/./src/modules/adventureworks/views/reviews-list.view.tsx?39ca","webpack://@msdyn365-commerce-partners/fabrikam/external var \"React\"?0d3b","webpack://@msdyn365-commerce-partners/fabrikam/external var \"ReactDOM\"?853b"],"sourcesContent":["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['reviews-list'] = {\n c: () => require('@msdyn365-commerce-modules/ratings-reviews/dist/lib/modules/reviews-list/reviews-list'),\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: 1}],\n \n iNM: true,\n ns: '@msdyn365-commerce-modules',\n n: 'reviews-list',\n p: 'ratings-reviews',\n \n pdp: '',\n \n \n md: 'node_modules/@msdyn365-commerce-modules/ratings-reviews/dist/lib/modules/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['@msdyn365-commerce-modules|fabrikam-design-kit|modules|fabrikam|views|reviews-list'] = {\n c: () => require('@msdyn365-commerce-modules/fabrikam-design-kit/dist/lib/modules/fabrikam/views/reviews-list.view.js'),\n cn: '@msdyn365-commerce-modules-fabrikam-design-kit-reviews-list'\n };\nviewDictionary['@msdyn365-commerce-modules|ratings-reviews|modules|reviews-list|reviews-list'] = {\n c: () => require('@msdyn365-commerce-modules/ratings-reviews/dist/lib/modules/reviews-list/reviews-list.view.js'),\n cn: '@msdyn365-commerce-modules-ratings-reviews-reviews-list'\n };\nviewDictionary['@msdyn365-commerce-theme|adventureworks-theme-kit|modules|adventureworks|views|reviews-list'] = {\n c: () => require('@msdyn365-commerce-theme/adventureworks-theme-kit/dist/lib/modules/adventureworks/views/reviews-list.view.js'),\n cn: '@msdyn365-commerce-theme-adventureworks-theme-kit-reviews-list'\n };\nwindow.__bindings__ = window.__bindings__ || {};\nwindow.__bindings__.viewDictionary = {\n ...window.__bindings__.viewDictionary || {},\n ...viewDictionary\n };","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { IReviewModalViewProps } from '@msdyn365-commerce-modules/ratings-reviews';\nimport {\n IReportReviewModalViewProps,\n IReviewCardViewProps,\n IReviewsListState,\n IReviewsListViewProps\n} from '@msdyn365-commerce-modules/ratings-reviews/src/modules/reviews-list';\nimport { IModuleProps, Module, Node } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nconst ReviewsListview: React.FC = props => {\n const {\n averageRating,\n filterByDropdown,\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 {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 {props.date}\n \n \n \n {props.reviewTitle}\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 { Reviews } from '@msdyn365-commerce/commerce-entities';\nimport {\n createObservableDataAction,\n IAction,\n IActionContext,\n IActionInput,\n IAny,\n ICreateActionContext,\n IGeneric,\n sendRequest\n} from '@msdyn365-commerce/core';\nimport { getRnrEndpointId, getRnrPartnerId, getSelectedProductIdFromActionInput } from '@msdyn365-commerce-modules/retail-actions';\n\nimport { GetProductReviewsInput } from './inputs/get-product-reviews-input';\n\n/**\n * TODO: Use this function to create the input required to make the API call.\n * @param input\n */\nexport const createInputForProductReviews = (input: ICreateActionContext>): IActionInput => {\n const productId = getSelectedProductIdFromActionInput(input);\n if (productId) {\n // Task #211227597 Remove these hardcoded values.\n return new GetProductReviewsInput(productId, getRnrPartnerId(input), input.requestContext.locale, getRnrEndpointId(input));\n }\n throw new Error('[GetProductReviews] Not all necessary parameters found while creating Input for GetProductReviewsApi');\n};\n\nexport async function getReviewsForGivenProduct(input: GetProductReviewsInput, ctx: IActionContext): Promise {\n if (!inputIsValid(input)) {\n throw new Error(\n `[GetProductReviews] Invalid input. ProductId = ${input.productId}, TenantId = ${input.tenantId}, localeListFilter = ${input.localeListFilter}`\n );\n }\n let requestUrl =\n `${input.serviceEndpoint}/v2.0/reviews/product/${input.productId}` +\n `?tenantId=${input.tenantId}` +\n `&localeListFilter=${input.localeListFilter}` +\n `&pageSize=${input.pageSize}` +\n `&orderBy=${input.orderBy}` +\n `&skipItems=${input.skipItems}`;\n\n if (input.starFilters !== undefined && input.starFilters.length > 0) {\n requestUrl = `${requestUrl}&starFilters=${input.starFilters}`;\n }\n\n if (input.pageToken !== null) {\n requestUrl = `${requestUrl}&pageToken=${input.pageToken}`;\n }\n return sendRequest(requestUrl, 'get')\n .then(response => {\n if (response.data && response.data.items && response.data.items.length > 0) {\n return {\n items: response.data.items.filter(i => !i.isTakenDown),\n pagingInfo: response.data.pagingInfo\n };\n }\n ctx.trace('[GetProductReviews] No reviews found for this product.');\n return response.data;\n })\n .catch(error => {\n ctx.trace('[GetProductReviews] Failed to get reviews for product');\n ctx.telemetry.exception(error);\n ctx.telemetry.debug('[GetProductReviews] Failed to get reviews for product');\n throw error;\n });\n}\n\nfunction inputIsValid(input: GetProductReviewsInput): boolean {\n return input && input.productId.length > 0 && input.tenantId.length > 0 && input.localeListFilter.length > 0 && input.pageSize > 0;\n}\n\nexport const getReviewsForGivenProductDataAction = createObservableDataAction({\n id: '@msdyn365-commerce-modules/ratings-reviews/get-product-reviews',\n action: >getReviewsForGivenProduct,\n input: createInputForProductReviews\n});\n\nexport default getReviewsForGivenProductDataAction;\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 {\n createObservableDataAction,\n IAction,\n IActionContext,\n IActionInput,\n ICreateActionContext,\n sendRequest\n} from '@msdyn365-commerce/core';\nimport { getRnrAuthEndpointId, getRnrPartnerId, getSelectedProductIdFromActionInput } from '@msdyn365-commerce-modules/retail-actions';\n\nimport { GetUserReviewInput } from './inputs/get-user-review-input';\n\n/**\n * This method builds the input for the getUserReviewApi call.\n * @param input\n */\nconst createInput = (input: ICreateActionContext): IActionInput => {\n const productId = getSelectedProductIdFromActionInput(input);\n const userInfo = input.requestContext.user;\n if (productId && userInfo && userInfo.isAuthenticated) {\n // Task #211227597 Remove these hardcoded values.\n return new GetUserReviewInput(productId, getRnrPartnerId(input), userInfo.token, getRnrAuthEndpointId(input));\n }\n throw new Error('[GetUserReview] Not all necessary parameters found while creating Input for GetUserReviewAPI');\n};\n\n/**\n * This method gets the user's review from the RnR service endpoint.\n * @param input\n * @param ctx\n */\nasync function getUserReview(input: GetUserReviewInput, ctx: IActionContext): Promise {\n if (!inputIsValid(input)) {\n const errorMessage = `[GettUserReview] Failed to get user's review due to bad input ${input}`;\n ctx.trace(errorMessage);\n throw new Error(errorMessage);\n }\n\n const requestUrl = `${input.serviceEndpoint}/v2.0/reviews/product/${input.productId}/user?tenantId=${input.tenantId}`;\n\n return sendRequest(requestUrl, 'get', null, { headers: { Authorization: `id_token ${input.authorization}` } })\n .then(response => {\n // eslint-disable-next-line @typescript-eslint/no-magic-numbers -- These are valid status code for requests.\n if (response.status !== 200 && response.status !== 201) {\n throw new Error(`An error occurred in getting user review. Response message - ${response.statusText}`);\n }\n return response.data;\n })\n .catch(error => {\n ctx.trace(\"[GettUserReview] Failed to get user's review for product\");\n ctx.telemetry.exception(error);\n ctx.telemetry.debug(\"[GettUserReview] Failed to get user's review for product\");\n ctx.trace(error);\n throw error;\n });\n}\n\nfunction inputIsValid(input: GetUserReviewInput): boolean {\n return input.productId.length > 0 && input.authorization.length > 0 && input.tenantId.length > 0;\n}\n\nexport const getUserReviewDataAction = createObservableDataAction({\n id: '@msdyn365-commerce-modules/ratings-reviews/get-user-review',\n action: >getUserReview,\n input: createInput\n});\n\nexport default getUserReviewDataAction;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { CacheType, IActionInput } from '@msdyn365-commerce/core';\n\nexport type OrderBy =\n | 'None'\n | 'MostRecent'\n | 'Oldest'\n | 'HighestRating'\n | 'LowestRating'\n | 'MostHelpful'\n | 'LeastHelpful'\n | 'MostAsked'\n | 'MostAnswered'\n | 'LeastConcerns'\n | 'MostConcerns'\n | 'ReviewerNameAsc'\n | 'ReviewerNameDesc';\n\n/**\n * ReviewsGetRatingsSummary Input Action.\n */\nexport class GetProductReviewsInput implements IActionInput {\n /**\n * The Id representing the product to get the reviews for.\n */\n public productId: string;\n\n /**\n * The ID representing the tenant.\n */\n public tenantId: string;\n\n /**\n * The market for which to get the reviews from.\n */\n public localeListFilter: string;\n\n /**\n * Number of reviews to be shown on each page.\n */\n public pageSize: number;\n\n /**\n * Order in which reviews to be shown.\n */\n public orderBy: string;\n\n /**\n * Need to set this value if reviews need to be filtered with specific star rating .\n */\n public starFilters?: string;\n\n /**\n * Need to set this value if we need to skip few reviews.\n */\n public skipItems: number;\n\n /**\n * The continuation token.\n */\n public pageToken: string | null;\n\n /**\n * Selects which data sources to use to retrieve data.\n */\n public dataSources: string | null;\n\n /**\n * The ratings and reviews service endpoint.\n */\n public serviceEndpoint: string;\n\n constructor(\n productId: string,\n tenantId: string,\n localeListFilter: string,\n serviceEndpoint: string,\n orderBy: string = 'MostHelpful',\n starFilters: string = '',\n skipItems: number = 0,\n pageSize: number = 10,\n pageToken: string | null = null,\n dataSources: string | null = null\n ) {\n this.productId = productId;\n this.tenantId = tenantId;\n this.localeListFilter = localeListFilter;\n\n // Max page size which Rnr API supports is 25.\n // Hence if config has page size more than 25, we'll default it to 25.\n this.pageSize = pageSize > 25 ? 25 : pageSize;\n this.orderBy = orderBy;\n this.starFilters = starFilters;\n this.skipItems = skipItems;\n this.pageToken = pageToken;\n this.dataSources = dataSources;\n this.serviceEndpoint = serviceEndpoint;\n }\n\n public getCacheKey = () =>\n `${this.productId}-${this.tenantId}-${this.localeListFilter}-${this.pageSize}-${this.orderBy}-${this.starFilters}-${this.skipItems}`;\n\n public getCacheObjectType = () => 'ProductReview';\n\n public dataCacheType = (): CacheType => 'request';\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 * These are the get user review API inputs.\n */\nexport class GetUserReviewInput 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 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(productId: string, tenantId: string, authorization: string, serviceEndpoint: string) {\n this.productId = productId;\n this.tenantId = tenantId;\n this.authorization = authorization;\n this.serviceEndpoint = serviceEndpoint;\n }\n\n public getCacheKey = () => 'GetUserReview';\n\n public getCacheObjectType = () => 'GetUserReview';\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 { createObservableDataAction, IAction, IActionInput } from '@msdyn365-commerce/core';\nimport { GenericInput, getGenericAction } from '@msdyn365-commerce-modules/retail-actions';\n\nexport interface IRatingsReviewsState {\n filterKey: string;\n}\n\nexport function createRatingsReviewsStateInput(result: IRatingsReviewsState): GenericInput {\n return new GenericInput('ratingsReviewsState', result, 'ratingsReviewsStateInput');\n}\n\nconst createInternalRatingsReviewsStateInput = (): IActionInput => {\n return createRatingsReviewsStateInput({ filterKey: '1;2;3;4;5' });\n};\n\nexport const getGenericActionDataAction = createObservableDataAction({\n action: >getGenericAction,\n input: createInternalRatingsReviewsStateInput\n});\n\nexport default getGenericActionDataAction;\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 {\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(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: >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 { 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>;\n parentId: string;\n parentType: string;\n isOpen: boolean;\n rating: number;\n reviewTitle: string;\n reviewText: string;\n returnRef: React.RefObject | undefined;\n hasError: boolean;\n telemetryContent?: ITelemetryContent;\n onModalToggle(): void;\n onTitleChange(event: React.ChangeEvent): void;\n onTextChange(event: React.ChangeEvent): 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 \n ),\n submitButton: (\n \n {props.resources.submitReviewButtonText}\n \n ),\n rating: ratingsInput(props),\n ratingLabel: ratingsLabel(props),\n titleInput: titleInput(props),\n titleLabel: titleLabel(props),\n textInput: textInput(props),\n textLabel: textLabel(props),\n privacyPolicyUrl: privacyPolicyLink(props),\n form: { tag: 'form', className: 'ms-review-modal-form', autoComplete: 'off' },\n inputRow: { tag: 'div', className: 'ms-review-modal-row', autoComplete: 'off' },\n error: (\n \n {props.resources.errorMessageText}\n \n )\n };\n};\n\nconst modalHeaderNode = (props: IReviewModalProps) => {\n return (\n \n {props.userReview && props.userReview.reviewId ? props.resources.editReviewModalTitle : props.resources.writeReviewModalTitle}\n \n );\n};\n\nconst submitDisabled = (props: IReviewModalProps) => {\n return !props.rating || !stripWhiteSpacesFromString(props.reviewText) || !stripWhiteSpacesFromString(props.reviewTitle);\n};\n\nconst ratingsInput = (props: IReviewModalProps) => {\n return (\n \n );\n};\n\nconst ratingsLabel = (props: IReviewModalProps) => {\n return (\n \n );\n};\n\nconst titleInput = (props: IReviewModalProps) => {\n const maxLength = props.context.app.config.reviewTitleMaxLength;\n\n return (\n \n );\n};\n\nconst titleLabel = (props: IReviewModalProps) => {\n return (\n \n );\n};\n\nconst reviewTextWidth: number = 50;\n\nconst textInput = (props: IReviewModalProps) => {\n const maxLength = props.context.app.config.reviewTextMaxLength;\n return (\n \n );\n};\n\nconst textLabel = (props: IReviewModalProps) => {\n return (\n \n );\n};\n\nconst privacyPolicyLink = (props: IReviewModalProps) => {\n const policyTextBlocks = props.resources.privacyPolicyTextFormat.split('{0}');\n const isSeparatorAtStart = props.resources.privacyPolicyTextFormat.startsWith('{0}');\n const isSeparatorAtEnd = props.resources.privacyPolicyTextFormat.endsWith('{0}');\n const privacyPolicyUrl = getUrlSync('rnrPrivacyPolicy', props.context.actionContext);\n const payLoad = getPayloadObject('click', props.telemetryContent!, TelemetryConstant.PrivacyPolicy);\n const privacyPolicyAttribute = getTelemetryAttributes(props.telemetryContent!, payLoad);\n\n return (\n

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

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

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

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

{props.summary.totalRatingsCount}

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

{props.resources.reportConcernText}

,\n headerSubmitted:

{props.resources.feedbackThankYouText}

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

{props.resources.reportModalMessage}

,\n reportSubmittedMessage:

{props.resources.reportSubmittedMessage}

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

{props.review.userName}

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

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

,\n reviewTitle:

{props.review.title}

,\n reviewText:

{props.review.reviewText}

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

{props.resources.wasReviewHelpfulText}

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

{props.review.userResponse.responderName}

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

{props.review.userResponse.responseText}

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

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

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

{props.resources.reportedText}

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

{props.text}

;\n};\n\nexport const SignInButton: React.FC<{ text: string; href: string; ariaLabel: string; telemetryContent?: ITelemetryContent }> = (props: {\n text: string;\n href: string;\n ariaLabel: string;\n telemetryContent?: ITelemetryContent;\n}) => {\n const { text, href, ariaLabel, telemetryContent } = props;\n const payLoad = getPayloadObject('click', telemetryContent!, TelemetryConstant.SignIn);\n const attributes = getTelemetryAttributes(telemetryContent!, payLoad);\n return (\n \n {text}\n \n );\n};\n\ninterface IModalToggleProps {\n innerRef: React.RefObject | undefined;\n id: string;\n text: string;\n ariaLabel: string;\n telemetryContent?: ITelemetryContent;\n onClick(): void;\n}\n\nexport const ModalToggle: React.FC = (props: IModalToggleProps) => {\n const { text, onClick, ariaLabel, innerRef, telemetryContent, id } = props;\n const payLoad = getPayloadObject('click', telemetryContent!, TelemetryConstant.WriteReview);\n const attributes = getTelemetryAttributes(telemetryContent!, payLoad);\n return (\n \n );\n};\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { Review } from '@msdyn365-commerce/commerce-entities';\nimport * as Msdyn365 from '@msdyn365-commerce/core';\nimport { SimpleProduct } from '@msdyn365-commerce/retail-proxy';\nimport { getTelemetryObject, IModuleProps, ITelemetryContent } from '@msdyn365-commerce-modules/utilities';\nimport classnames from 'classnames';\nimport React from 'react';\n\nimport { IReviewModalViewProps, ReviewModal, submitReview } from '../../common/review-modal';\nimport { TOGGLE_REVIEW_MODAL_BUTTON_ID } from '../../common/rnrInterface';\nimport { ModalToggle, SignInButton, SignInMessage } from './components/components';\nimport { IWriteReviewData } from './write-review.data';\nimport { IWriteReviewProps } from './write-review.props.autogenerated';\n\nexport interface IWriteReviewCallbacks {\n toggleModal(): void;\n updateReviewTitle(title: string): void;\n updateReviewText(text: string): void;\n updateRating(rating: number): void;\n onReviewSubmitted(isSuccessful: boolean): void;\n submitReview(\n product: SimpleProduct,\n title: string,\n text: string,\n rating: number,\n context: Msdyn365.ICoreContext,\n userReview?: Review,\n onReviewSubmission?: (isSuccessful: boolean) => void\n ): void;\n}\n\nexport interface IWriteReviewState {\n rating: number;\n reviewTitle: string;\n reviewText: string;\n isReviewModalOpen: boolean;\n hasReviewError: boolean;\n}\n\nexport interface IWriteReviewViewProps extends IWriteReviewProps {\n state: IWriteReviewState;\n className: string;\n callbacks: IWriteReviewCallbacks;\n signInMessage: React.ReactNode;\n signInButton: React.ReactNode;\n modalToggle: React.ReactNode;\n reviewModal: IReviewModalViewProps;\n moduleProps: IModuleProps;\n heading: React.ReactNode;\n}\n\n/**\n * This module is enables user's to leave ratings and reviews on a specific product\n * WriteReview module.\n * @extends {React.PureComponent>}\n */\nclass WriteReview extends React.PureComponent, IWriteReviewState> {\n private readonly _modalToggleRef: React.RefObject | undefined;\n\n private readonly telemetryContent: ITelemetryContent;\n private readonly writeReviewCallbacks: IWriteReviewCallbacks = {\n // @ts-expect-error\n toggleModal: this._toggleReviewModal,\n updateReviewTitle: (title: string): void => {\n this.setState({ reviewTitle: title });\n },\n updateReviewText: (text: string): void => {\n this.setState({ reviewText: text });\n },\n updateRating: (rating: number): void => {\n this.setState({ rating });\n },\n onReviewSubmitted: (isSuccessful: boolean): void => {\n if (isSuccessful) {\n this.setState({ isReviewModalOpen: false, hasReviewError: false });\n } else {\n this.setState({ hasReviewError: true });\n }\n },\n submitReview\n };\n public constructor(props: IWriteReviewProps) {\n super(props);\n const {\n userReview: { result: userReview }\n } = this.props.data;\n this._toggleReviewModal = this._toggleReviewModal.bind(this);\n this._modalToggleRef = React.createRef();\n const rating = userReview ? userReview.rating : 0;\n const reviewTitle = userReview ? userReview.title : '';\n const reviewText = userReview ? userReview.reviewText : '';\n\n this.state = {\n isReviewModalOpen: false,\n rating,\n reviewTitle,\n reviewText,\n hasReviewError: false\n };\n this.telemetryContent = getTelemetryObject(\n this.props.context.request.telemetryPageName!,\n this.props.friendlyName,\n this.props.telemetry\n );\n }\n\n public render(): JSX.Element {\n const { resources } = this.props;\n const { className, heading } = this.props.config;\n const {\n product: { result: product },\n userReview: { result: userReview }\n } = this.props.data;\n\n const userInfo = this.props.context && this.props.context.request && this.props.context.request.user;\n const completeClass = classnames('ms-write-review', 'msc-modal-input-required', className);\n const viewProps = {\n ...this.props,\n state: this.state,\n className: completeClass,\n moduleProps: {\n moduleProps: this.props,\n className: completeClass,\n id: null\n },\n callbacks: this.writeReviewCallbacks,\n signInMessage: ,\n signInButton: (\n \n ),\n modalToggle: !Msdyn365.isOboRequest(this.props.context.request) && product && (\n \n ),\n reviewModal: this._buildUserReviewModal(),\n heading: heading && heading.text && (\n \n )\n } as IWriteReviewViewProps;\n\n return this.props.renderView(viewProps) as React.ReactElement;\n }\n\n public handleHeadingChange = (event: Msdyn365.ContentEditableEvent) => (this.props.config.heading!.text = event.target.value);\n private readonly _onTitleChange = (event: React.ChangeEvent): void => {\n this.writeReviewCallbacks.updateReviewTitle(event.target.value);\n };\n\n private readonly _onTextChange = (event: React.ChangeEvent): void => {\n this.writeReviewCallbacks.updateReviewText(event.target.value);\n };\n\n private readonly _onRatingChange = (value: number): void => {\n this.writeReviewCallbacks.updateRating(value);\n };\n\n private readonly _toggleReviewModal = (): void => {\n const userReview = this.props.data.userReview.result;\n if (this.state.isReviewModalOpen) {\n this.setState({ isReviewModalOpen: false, hasReviewError: false });\n } else if (userReview) {\n this.setState({\n isReviewModalOpen: true,\n reviewText: userReview.reviewText,\n reviewTitle: userReview.title,\n rating: userReview.rating\n });\n } else {\n this.setState({\n isReviewModalOpen: true,\n reviewText: '',\n reviewTitle: '',\n rating: 0\n });\n }\n };\n\n /**\n * This method builds the user review modal.\n * @param config The module config.\n */\n private _buildUserReviewModal(): IReviewModalViewProps {\n return ReviewModal({\n userReview: this.props.data.userReview.result,\n product: this.props.data.product.result,\n resources: { ...this.props.resources },\n context: this.props.context,\n parentId: this.props.id,\n parentType: this.props.typeName,\n isOpen: this.state.isReviewModalOpen,\n rating: this.state.rating,\n reviewTitle: this.state.reviewTitle,\n reviewText: this.state.reviewText,\n onModalToggle: this._toggleReviewModal,\n onTitleChange: this._onTitleChange,\n onTextChange: this._onTextChange,\n onRatingChange: this._onRatingChange,\n onReviewComplete: this.writeReviewCallbacks.onReviewSubmitted,\n renderContextId: 'writeReview',\n returnRef: this._modalToggleRef,\n hasError: this.state.hasReviewError,\n telemetryContent: this.telemetryContent\n });\n }\n}\n\nexport default WriteReview;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { IModuleProps, Module, Node } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport { IReviewModalViewProps } from '../../common/review-modal';\nimport { IWriteReviewViewProps } from './write-review';\n\nconst WriteReviewView: React.FC = props => {\n const { heading, signInMessage, signInButton, modalToggle, reviewModal, moduleProps } = props;\n const isAuthenticated = props.context.request.user.isAuthenticated;\n return (\n \n {heading}\n {!isAuthenticated ? (\n <>\n {signInMessage}\n {signInButton}\n \n ) : (\n <>\n {modalToggle}\n {createReviewModal(reviewModal, moduleProps)}\n \n )}\n \n );\n};\n\nconst createReviewModal = (props: IReviewModalViewProps, moduleProps: IModuleProps): JSX.Element => {\n return (\n \n {props.modalHeader}\n \n \n \n {props.rating}\n {props.ratingLabel}\n \n \n {props.titleLabel}\n {props.titleInput}\n \n \n {props.textLabel}\n {props.textInput}\n \n {props.privacyPolicyUrl}\n {props.error}\n \n \n \n {props.submitButton}\n {props.cancelButton}\n \n \n );\n};\n\nexport default WriteReviewView;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { IImageSettings, Image } from '@msdyn365-commerce/core';\nimport {\n IReportReviewModalViewProps,\n IReviewCardViewProps,\n IReviewsListData,\n IReviewsListResources,\n IReviewsListState,\n IReviewsListViewProps\n} from '@msdyn365-commerce-modules/ratings-reviews';\nimport { ArrayExtensions, generateImageUrl } from '@msdyn365-commerce-modules/retail-actions';\nimport { Module, Node } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport { IReviewsListProps } from '../definition-extensions/reviews-list.ext.props.autogenerated';\n\n/**\n * Build Review Card.\n * @param props - Review Card ViewProps.\n * @param resources - Resource Strings.\n * @param isUserReview - User review flag.\n * @returns JSX Element.\n */\nconst buildReviewCard = (props: IReviewCardViewProps, resources: IReviewsListResources, isUserReview: boolean) => {\n return (\n \n \n
\n {props.rating}\n {props.date}\n
\n {props.name}\n
\n \n \n {props.reviewTitle}\n {props.reviewText}\n \n \n {props.responseName}\n {props.responseDate}\n {props.responseText}\n \n \n {isUserReview ? undefined :

{resources.wasReviewHelpfulText}

}\n {props.like}\n {props.dislike}\n {props.edit}\n
\n
\n
\n );\n};\n\n/**\n * Render Product Image.\n * @param props - WriteReview ViewProps.\n * @returns JSX Element.\n */\nconst renderProductImage = (props: IReviewsListViewProps & IReviewsListProps): JSX.Element => {\n const primaryImageSource = props.data.product.result?.PrimaryImageUrl;\n const imageUrl = generateImageUrl(primaryImageSource, props.context.request.apiSettings);\n const defaultImageSettings: IImageSettings = {\n viewports: {\n xs: { q: 'w=111&h=111&m=6', w: 111, h: 111 },\n sm: { q: 'w=130&h=130&m=6', w: 130, h: 130 },\n md: { q: 'w=130&h=130&m=6', w: 130, h: 130 },\n lg: { q: 'w=130&h=130&m=6', w: 130, h: 130 },\n xl: { q: 'w=130&h=130&m=6', w: 130, h: 130 }\n },\n lazyload: true,\n cropFocalRegion: true\n };\n\n return (\n \n );\n};\n\n/**\n * Render Product Description.\n * @param props - WriteReview ViewProps.\n * @returns JSX Element.\n */\nconst renderProductDescription = (props: IReviewsListViewProps & IReviewsListProps): JSX.Element => {\n const product = props.data.product.result;\n return (\n \n
{renderProductImage(props)}
\n
\n
{product?.Name}
\n
{product?.Name}
\n
{product?.ItemId}
\n
\n
\n );\n};\n\n/**\n * Build Review modal.\n * @param props - Review list ViewProps.\n * @returns JSX Element.\n */\nconst createReviewModal = (props: IReviewsListViewProps & IReviewsListProps): JSX.Element => {\n const { resources, moduleProps, reviewModal } = props;\n return (\n \n {reviewModal.modalHeader}\n \n \n \n {renderProductDescription(props)}\n \n
{resources.selectRatingLabel}
\n {reviewModal.rating}\n
\n
\n \n {resources.reviewTitleLabel}\n {reviewModal.titleInput}\n \n \n {resources.reviewTextLabel}\n {reviewModal.textInput}\n \n {reviewModal.privacyPolicyUrl}\n {reviewModal.error}\n
\n
\n \n {reviewModal.submitButton}\n {reviewModal.cancelButton}\n \n
\n );\n};\n\n/**\n * Build Review modal.\n * @param props - Review modal ViewProps.\n * @param state - Review List State.\n * @returns JSX Element.\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\n/**\n * ReviewsList view.\n * @param props - Ratings ReviewsList ViewProps.\n * @returns ReviewsList view module.\n */\nconst ReviewsListview: React.FC> = props => {\n const {\n filterByDropdown,\n heading,\n moduleProps,\n noReviewsMessage,\n noReviewsWithFilterMessage,\n pageControls,\n refineReviewsProps,\n reportReviewModal,\n reviewsListProps,\n reviewCards,\n sortByDropdown,\n state,\n userReview,\n resources\n } = props;\n\n if (!userReview && !ArrayExtensions.hasElements(reviewCards) && !state.isFilterApplied) {\n return {noReviewsMessage};\n }\n\n return (\n \n {heading}\n \n {sortByDropdown}\n {filterByDropdown}\n \n \n {userReview && buildReviewCard(userReview, resources, true)}\n {reviewCards.map(review => {\n return buildReviewCard(review, resources, false);\n })}\n \n {!ArrayExtensions.hasElements(reviewCards) && state.isFilterApplied && noReviewsWithFilterMessage}\n {pageControls}\n {createReviewModal(props)}\n {createReportModal(reportReviewModal, state)}\n \n );\n};\n\nexport default ReviewsListview;\n","module.exports = React;","module.exports = ReactDOM;"],"names":["binding","modules","dataActions","registerSanitizedActionPath","sanitizedActionPath","dataAction","default","Error","prototype","RegistrationId","id","c","require","$type","da","name","path","runOn","iNM","ns","n","p","pdp","md","window","__bindings__","_objectSpread","viewDictionary","cn","buildReviewCard","props","React","Node","Object","assign","cardProps","headerProps","rating","date","cardBodyProps","reviewProps","reviewTitle","reviewText","responseProps","responseName","responseDate","responseText","controlsProps","ratingHelpfulLabel","like","dislike","edit","report","createReviewModal","moduleProps","Module","modal","modalHeader","modalBody","form","inputRow","ratingLabel","titleLabel","titleInput","textLabel","textInput","privacyPolicyUrl","error","modalFooter","submitButton","cancelButton","createReportModal","state","reported","headerSubmitted","header","reportSubmittedMessage","reportMessage","radioButtons","succesfulButton","averageRating","filterByDropdown","noReviewsMessage","noReviewsWithFilterMessage","pageControls","refineReviewsProps","reportReviewModal","reviewsListProps","reviewCards","reviewCount","reviewModal","sortByDropdown","userReview","length","isFilterApplied","map","review","createInputForProductReviews","input","productId","getSelectedProductIdFromActionInput","GetProductReviewsInput","getRnrPartnerId","requestContext","locale","getRnrEndpointId","async","getReviewsForGivenProduct","ctx","tenantId","localeListFilter","pageSize","inputIsValid","requestUrl","serviceEndpoint","orderBy","skipItems","undefined","starFilters","pageToken","sendRequest","then","response","data","items","filter","i","isTakenDown","pagingInfo","trace","catch","telemetry","exception","debug","getReviewsForGivenProductDataAction","createObservableDataAction","action","getUserReviewDataAction","authorization","errorMessage","headers","Authorization","status","statusText","userInfo","user","isAuthenticated","GetUserReviewInput","token","getRnrAuthEndpointId","constructor","arguments","dataSources","getCacheKey","this","getCacheObjectType","dataCacheType","createRatingsReviewsStateInput","result","GenericInput","getGenericActionDataAction","getGenericAction","createInternalRatingsReviewsStateInput","filterKey","channelId","userReviewData","SubmitUserReviewInput","onClickSubmit","onSubmit","ReviewModal","payLoad","getPayloadObject","telemetryContent","TelemetryConstant","SubmitReview","submitButtonAttribute","getTelemetryAttributes","contentAction","etext","Cancel","cancelButtonAttribute","tag","Modal","className","modalCSS","classNames","toggle","onModalToggle","applicationNode","isOpen","returnFocusRef","returnRef","modalHeaderNode","ModalFooter","ModalBody","Button","onClick","resources","discardReviewButtonText","disabled","submitDisabled","submitReviewButtonText","ratingsInput","ratingsLabel","privacyPolicyLink","autoComplete","Alert","hasError","color","errorMessageText","ModalHeader","reviewId","editReviewModalTitle","writeReviewModalTitle","stripWhiteSpacesFromString","RatingComponent","readOnly","avgRating","ariaLabel","selectRatingAriaLabel","initialRating","context","parentId","typeName","parentType","key","onChange","onRatingChange","selectRatingLabel","maxLength","app","config","reviewTitleMaxLength","renderContextId","onTitleChange","value","reviewTitleAriaLabel","htmlFor","reviewTitleLabel","reviewTextMaxLength","onTextChange","rows","reviewAriaLabel","reviewTextLabel","policyTextBlocks","privacyPolicyTextFormat","split","isSeparatorAtStart","startsWith","isSeparatorAtEnd","endsWith","getUrlSync","actionContext","PrivacyPolicy","privacyPolicyAttribute","href","rel","target","privacyPolicyTitle","product","submitReview","onReviewComplete","text","replace","RegExp","trim","title","onReviewSubmission","request","RecordId","toString","apiSettings","productName","Name","userEmail","emailAddress","userName","submitUserReview","submittedDateTime","Date","helpfulPositive","helpfulNegative","firstName","getReviewInput","update","TOGGLE_REVIEW_MODAL_BUTTON_ID","TOGGLE_EDIT_MODAL_BUTTON_CARD_ID","HistogramItems","ratingsSummary","totalRatingsCount","renderItem","star5Count","star4Count","star3Count","star2Count","star1Count","stars","count","totalCount","percentage","formattedPercent","Intl","NumberFormat","style","format","barItemAriaLabel","starLabel","bar","Progress","max","buttonProps","AverageRatingNumber","summary","TotalReviews","RatingsHistogram","super","handleHeadingChange","event","heading","selectFilterBy","bind","render","ratingCount","completeClass","classname","viewProps","callbacks","histogramItems","averageRatingAriaLabel","hideCount","averageNumber","totalReviews","ratingsSummaryProps","Msdyn365","editProps","onEdit","histogramProps","renderView","__decorate","observer","histogramItem","item","authToken","requestBody","concernCategory","requestHeader","isHelpful","ReviewConcernCategory","ReportReviewConcernInput","ReviewCount","currentPage","reviewsCount","reviewsShownOnEachPage","pageReviewCountText","_getReviewStartNumber","_getReviewEndNumber","PageControls","previousPageClick","_getPreviousPageData","nextPageClick","_getNextPageData","Next","nextAttribute","Previous","previousAttribute","_hasPreviousPage","_paginationAriaLabel","pageReviewAriaLabel","previousButtonText","_hasNextPage","nextButtonText","_getPagesCount","_getReviewsShown","Math","min","ceil","isNextPage","page","pageModifier","pageReviewCount","updateReviews","selectedSortByOption","selectedFilterByOption","reportConcernDropdownOptions","radioPairs","pairs","option","inputId","checked","reportedKey","push","type","onRadioChange","reviewRatingNarratorText","voteHelpfulButton","isVoted","isVotedFor","votedReviews","approved","isDisabled","isUserReview","isOboRequest","label","yesButtonText","noButtonText","voteCount","onClickMethod","updateReviewHelpfulness","signInUrl","editButton","toggleWriteReviewModal","editReviewCardText","renderDate","DateTimeFormat","month","day","year","_unused","toggleReportReviewModal","reportToggle","reportConcernText","reportedReviews","includes","reportedText","ref","reportedReviewId","innerRef","SubmitHelpfulnessVoteInput","ReviewsList","sortByDropdownOptions","mostHelpfulSortOptionText","mostRecentSortOptionText","highestRatedSortOptionText","lowestRatedSortOptionText","filterByDropdownOptions","allRatinsFilterByOptionText","fiveStarFilterByOptionText","fourStarFilterByOptionText","threeStarFilterByOptionText","twoStarFilterByOptionText","oneStarFilterByOptionText","reviewsListCallbacks","updateReviewTitle","setState","userReviewTitle","updateReviewText","userReviewText","updateRating","userReviewRating","onReviewSubmitted","isSuccessful","isReviewModalOpen","hasReviewError","toggleModal","_toggleReviewModal","updateReviewHelpfulnessVote","toggleReportModal","isReportModalOpen","_onReportModalOpen","_onReportModalClose","reportReview","_reportReviewCallback","updateFilterByDropdown","updateSortByDropdown","componentDidMount","reviewsList","totalItems","listOfReviews","reaction","ratingsReviewsState","filterKeyValue","Number","dropdownItemsCount","isNaN","filterByOption","find","selectedIndex","warning","_userReview","_reviewCard","_reviewCards","reviewList","reviewElements","isPublished","wasReviewHelpfulText","userResponse","responderName","ReviewCard","_userReportModalToggle","reportingReviewId","_userReviewModal","_onTitleChange","_onTextChange","_onRatingChange","_onReviewComplete","_userReviewModalToggle","isSuccess","_reportReviewModal","submitReviewAttribute","SuccessButton","successAttribute","cancelAttribute","SpamAdvertising","reportSpamText","OffensiveContent","offensiveContentText","Profanity","profanityContentText","feedbackThankYouText","cancelReportReviewText","reportReviewButtonText","okReportReviewText","reportModalMessage","ReportReviewModal","_onRadioChange","_reportReview","hasReportError","currentTarget","getAttribute","reportReviewConcern","getUserToken","_value","reportedReview","notification","selectedOption","_updateVoteUi","alreadyExists","list","concat","submitHelpfulnessVote","showSpinner","getTelemetryObject","telemetryPageName","friendlyName","shouldComponentUpdate","nextProps","nextState","LabeledDropdown","labelText","filterByDropdownText","dropdownId","dropdownOptions","onSelectOption","controlledByParent","sortByDropdownText","noReviewsWithSelectedFilterMessage","sortByOptions","filterByOptions","SignInMessage","SignInButton","SignIn","attributes","ModalToggle","WriteReview","writeReviewCallbacks","_modalToggleRef","classnames","signInMessage","signInButton","signInLabel","signInAriaLabel","modalToggle","editReviewButtonText","reviewButtonLabel","_buildUserReviewModal","renderProductDescription","_props$data$product$r","primaryImageSource","PrimaryImageUrl","imageUrl","generateImageUrl","Image","src","gridSettings","imageSettings","viewports","xs","q","w","h","sm","lg","xl","lazyload","cropFocalRegion","renderProductImage","ItemId","ArrayExtensions","hasElements","module","exports","ReactDOM"],"sourceRoot":""}