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4B,UAAoD,QAA3CZ,EAA4B,QAA5BC,EAAEpB,EAAKyB,eAAeC,cAAM,IAAAN,OAAA,EAA1BA,EAA4BN,qBAAa,IAAAK,EAAAA,EAd/B,EAerBa,UAAQ,EACRC,WAAWJ,EAAAA,EAAAA,QAAO5B,EAAUwH,uBAAkD,QAA5BpG,EAAErB,EAAKyB,eAAeC,cAAM,IAAAL,OAAA,EAA1BA,EAA4BP,cAAe,KAC/Fd,KAAM,MAGdS,EAAAA,cAAA,OAAKI,UAAU,0CAA0Cc,KAoBpDb,CAAcd,EAAME,EAASC,EAAUC,EAAUH,GAClDQ,EAAAA,cAACyB,EAAAA,KAAIvB,OAAAC,OAAA,GAAKd,GACLD,EAAesC,KAAIC,GAnEjBzC,CAAAA,GAEfc,EAAAA,cAACyB,EAAAA,KAAIvB,OAAAC,OAAA,GAAKjB,EAAM0C,aACX1C,EAAM2C,UACN3C,EAAM4C,KAgEYC,CAAcJ,gBCtF7CmG,EAAOC,QAAU/H,cCAjB8H,EAAOC,QAAUC","sources":["webpack://Msdyn365.Commerce.Online/./src/themes/moekwrsitetheme/views/ratings-histogram.view.tsx?7abd","webpack://Msdyn365.Commerce.Online/./src/themes/moenzcsitetheme/views/ratings-histogram.view.tsx?c9fe","webpack://Msdyn365.Commerce.Online/./src/themes/moetwksitetheme/views/ratings-histogram.view.tsx?e24b","webpack://Msdyn365.Commerce.Online/./lib/ratings-histogram/module-registration.js?bc1d","webpack://Msdyn365.Commerce.Online/./src/modules/fabrikam/views/ratings-histogram.view.tsx?6e01","webpack://Msdyn365.Commerce.Online/./src/actions/ratings-reviews-state-data-action.ts?26cd","webpack://Msdyn365.Commerce.Online/./src/modules/ratings-histogram/component/components.tsx?f324","webpack://Msdyn365.Commerce.Online/./src/modules/ratings-histogram/ratings-histogram.tsx?f6bc","webpack://Msdyn365.Commerce.Online/./src/modules/ratings-histogram/ratings-histogram.view.tsx?5bff","webpack://Msdyn365.Commerce.Online/./src/modules/adventureworks/views/ratings-histogram.view.tsx?bb5b","webpack://Msdyn365.Commerce.Online/external var \"React\"?0d3b","webpack://Msdyn365.Commerce.Online/external var \"ReactDOM\"?853b"],"sourcesContent":["/*--------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * See License.txt in the project root for license information.\r\n *--------------------------------------------------------------*/\r\n\r\nimport { RatingComponent } from '@msdyn365-commerce/components';\r\nimport { ICoreContext } from '@msdyn365-commerce/core';\r\nimport {\r\n IHistogramItemViewProps,\r\n IRatingsHistogramData,\r\n IRatingsHistogramViewProps\r\n} from '@msdyn365-commerce-modules/ratings-reviews/src/modules/ratings-histogram';\r\nimport { format, Module, Node } from '@msdyn365-commerce-modules/utilities';\r\nimport * as React from 'react';\r\n\r\nimport { IRatingsHistogramProps, IRatingsHistogramResources } from '../definition-extensions/ratings-histogram.ext.props.autogenerated';\r\n\r\n/**\r\n * Histogram item.\r\n * @param props - Histogram Item ViewProps.\r\n * @returns Histogram Item node.\r\n */\r\nconst histogramItem = (props: IHistogramItemViewProps) => {\r\n return (\r\n \r\n {props.starLabel}\r\n {props.bar}\r\n \r\n );\r\n};\r\n\r\n/**\r\n * Average ratings.\r\n * @param data - Props data.\r\n * @param context - Histogram Item ViewProps.\r\n * @param typeName - Histogram Item ViewProps.\r\n * @param componentId - Histogram Item ViewProps.\r\n * @param resources - Module resource strings.\r\n * @returns Average ratings.\r\n */\r\nconst averageRating = (\r\n data: IRatingsHistogramData,\r\n context: ICoreContext,\r\n typeName: string,\r\n componentId: string,\r\n resources: IRatingsHistogramResources\r\n) => {\r\n const defaultAverageRating: number = 0;\r\n const reviewsCount = data.ratingsSummary.result?.reviewsCount ?? defaultAverageRating;\r\n const reviewsCountString = resources.numberOfReviewsString\r\n ? format(resources.numberOfReviewsString, reviewsCount)\r\n : `${reviewsCount} reviews`;\r\n\r\n return (\r\n
\r\n
Reviews
\r\n
\r\n \r\n
\r\n \r\n {reviewsCountString !== '0 reviews' &&
{reviewsCountString}
}\r\n
\r\n );\r\n};\r\n\r\n/**\r\n * Histogram view.\r\n * @param props - Ratings HistogramV iewProps.\r\n * @returns Histogram view module.\r\n */\r\nconst RatingsHistogramView: React.FC> = props => {\r\n const { heading, histogramItems, histogramProps, moduleProps, data, resources } = props;\r\n const context = props.context;\r\n const typeName = props.typeName;\r\n const moduleId = props.id;\r\n\r\n if (!context.app.config.hideRating) {\r\n return (\r\n \r\n {heading}\r\n
\r\n {averageRating(data, context, typeName, moduleId, resources)}\r\n \r\n {histogramItems.map(item => {\r\n return histogramItem(item);\r\n })}\r\n \r\n
\r\n
\r\n );\r\n } else {\r\n return null;\r\n }\r\n};\r\n\r\nexport default RatingsHistogramView;\r\n","/*--------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * See License.txt in the project root for license information.\r\n *--------------------------------------------------------------*/\r\n\r\nimport { RatingComponent } from '@msdyn365-commerce/components';\r\nimport { ICoreContext } from '@msdyn365-commerce/core';\r\nimport {\r\n IHistogramItemViewProps,\r\n IRatingsHistogramData,\r\n IRatingsHistogramViewProps\r\n} from '@msdyn365-commerce-modules/ratings-reviews/src/modules/ratings-histogram';\r\nimport { format, Module, Node } from '@msdyn365-commerce-modules/utilities';\r\nimport * as React from 'react';\r\n\r\nimport { IRatingsHistogramProps, IRatingsHistogramResources } from '../definition-extensions/ratings-histogram.ext.props.autogenerated';\r\n\r\n/**\r\n * Histogram item.\r\n * @param props - Histogram Item ViewProps.\r\n * @returns Histogram Item node.\r\n */\r\nconst histogramItem = (props: IHistogramItemViewProps) => {\r\n return (\r\n \r\n {props.starLabel}\r\n {props.bar}\r\n \r\n );\r\n};\r\n\r\n/**\r\n * Average ratings.\r\n * @param data - Props data.\r\n * @param context - Histogram Item ViewProps.\r\n * @param typeName - Histogram Item ViewProps.\r\n * @param componentId - Histogram Item ViewProps.\r\n * @param resources - Module resource strings.\r\n * @returns Average ratings.\r\n */\r\nconst averageRating = (\r\n data: IRatingsHistogramData,\r\n context: ICoreContext,\r\n typeName: string,\r\n componentId: string,\r\n resources: IRatingsHistogramResources\r\n) => {\r\n const defaultAverageRating: number = 0;\r\n const reviewsCount = data.ratingsSummary.result?.reviewsCount ?? defaultAverageRating;\r\n const reviewsCountString = resources.numberOfReviewsString\r\n ? format(resources.numberOfReviewsString, reviewsCount)\r\n : `${reviewsCount} reviews`;\r\n\r\n return (\r\n
\r\n
Reviews
\r\n
\r\n \r\n
\r\n \r\n {reviewsCountString !== '0 reviews' &&
{reviewsCountString}
}\r\n
\r\n );\r\n};\r\n\r\n/**\r\n * Histogram view.\r\n * @param props - Ratings HistogramV iewProps.\r\n * @returns Histogram view module.\r\n */\r\nconst RatingsHistogramView: React.FC> = props => {\r\n const { heading, histogramItems, histogramProps, moduleProps, data, resources } = props;\r\n const context = props.context;\r\n const typeName = props.typeName;\r\n const moduleId = props.id;\r\n\r\n if (!context.app.config.hideRating) {\r\n return (\r\n \r\n {heading}\r\n
\r\n {averageRating(data, context, typeName, moduleId, resources)}\r\n \r\n {histogramItems.map(item => {\r\n return histogramItem(item);\r\n })}\r\n \r\n
\r\n
\r\n );\r\n } else {\r\n return null;\r\n }\r\n};\r\n\r\nexport default RatingsHistogramView;\r\n","/*--------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * See License.txt in the project root for license information.\r\n *--------------------------------------------------------------*/\r\n\r\nimport { RatingComponent } from '@msdyn365-commerce/components';\r\nimport { ICoreContext } from '@msdyn365-commerce/core';\r\nimport {\r\n IHistogramItemViewProps,\r\n IRatingsHistogramData,\r\n IRatingsHistogramViewProps\r\n} from '@msdyn365-commerce-modules/ratings-reviews/src/modules/ratings-histogram';\r\nimport { format, Module, Node } from '@msdyn365-commerce-modules/utilities';\r\nimport * as React from 'react';\r\n\r\nimport { IRatingsHistogramProps, IRatingsHistogramResources } from '../definition-extensions/ratings-histogram.ext.props.autogenerated';\r\n\r\n/**\r\n * Histogram item.\r\n * @param props - Histogram Item ViewProps.\r\n * @returns Histogram Item node.\r\n */\r\nconst histogramItem = (props: IHistogramItemViewProps) => {\r\n return (\r\n \r\n {props.starLabel}\r\n {props.bar}\r\n \r\n );\r\n};\r\n\r\n/**\r\n * Average ratings.\r\n * @param data - Props data.\r\n * @param context - Histogram Item ViewProps.\r\n * @param typeName - Histogram Item ViewProps.\r\n * @param componentId - Histogram Item ViewProps.\r\n * @param resources - Module resource strings.\r\n * @returns Average ratings.\r\n */\r\nconst averageRating = (\r\n data: IRatingsHistogramData,\r\n context: ICoreContext,\r\n typeName: string,\r\n componentId: string,\r\n resources: IRatingsHistogramResources\r\n) => {\r\n const defaultAverageRating: number = 0;\r\n const reviewsCount = data.ratingsSummary.result?.reviewsCount ?? defaultAverageRating;\r\n const reviewsCountString = resources.numberOfReviewsString\r\n ? format(resources.numberOfReviewsString, reviewsCount)\r\n : `${reviewsCount} reviews`;\r\n\r\n return (\r\n
\r\n
Reviews
\r\n
\r\n \r\n
\r\n \r\n {reviewsCountString !== '0 reviews' &&
{reviewsCountString}
}\r\n
\r\n );\r\n};\r\n\r\n/**\r\n * Histogram view.\r\n * @param props - Ratings HistogramV iewProps.\r\n * @returns Histogram view module.\r\n */\r\nconst RatingsHistogramView: React.FC> = props => {\r\n const { heading, histogramItems, histogramProps, moduleProps, data, resources } = props;\r\n const context = props.context;\r\n const typeName = props.typeName;\r\n const moduleId = props.id;\r\n\r\n if (!context.app.config.hideRating) {\r\n return (\r\n \r\n {heading}\r\n
\r\n {averageRating(data, context, typeName, moduleId, resources)}\r\n \r\n {histogramItems.map(item => {\r\n return histogramItem(item);\r\n })}\r\n \r\n
\r\n
\r\n );\r\n } else {\r\n return null;\r\n }\r\n};\r\n\r\nexport default RatingsHistogramView;\r\n","const binding = { modules: {}, dataActions: {} };\n\n const registerActionId = (actionPath) => {\n if (binding.dataActions[actionPath] &&\n binding.dataActions[actionPath].default &&\n binding.dataActions[actionPath].default.prototype &&\n binding.dataActions[actionPath].default.prototype.id) {\n binding.dataActions[binding.dataActions[actionPath].default.prototype.id] = binding.dataActions[actionPath];\n } else {\n Object.keys(binding.dataActions[actionPath] || {}).forEach(exportName => {\n if (binding.dataActions[actionPath][exportName] &&\n binding.dataActions[actionPath][exportName].prototype &&\n binding.dataActions[actionPath][exportName].prototype.Action) {\n binding.dataActions[binding.dataActions[actionPath][exportName].prototype.id] = binding.dataActions[actionPath][exportName];\n }\n })\n }\n };\n\n const registerSanitizedActionPath = (sanitizedActionPath, dataAction) => {\n if (process.env.NODE_ENV === 'development') {\n if (!dataAction.default) {\n throw new Error('Data action path does not have a default export');\n }\n if (!(dataAction.default.prototype.id && binding.dataActions[dataAction.default.prototype.id]) || !binding.dataActions[sanitizedActionPath]) {\n binding.dataActions[sanitizedActionPath] = dataAction;\n }\n } else {\n binding.dataActions[sanitizedActionPath] = dataAction;\n if (!binding.dataActions[sanitizedActionPath].default) {\n throw new Error('Data action path ' + sanitizedActionPath + ' does not have a default export');\n }\n binding.dataActions[sanitizedActionPath].default.prototype.RegistrationId = sanitizedActionPath;\n if (binding.dataActions[sanitizedActionPath].default.prototype.id) {\n binding.dataActions[binding.dataActions[sanitizedActionPath].default.prototype.id] = sanitizedActionPath;\n }\n }\n };\n \n\n (binding.modules['ratings-histogram'] = {\n c: () => require('@msdyn365-commerce-modules/ratings-reviews/dist/lib/modules/ratings-histogram/ratings-histogram'),\n $type: 'contentModule',\n da: [{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}],\n \n iNM: true,\n ns: '@msdyn365-commerce-modules',\n n: 'ratings-histogram',\n p: 'ratings-reviews',\n \n pdp: '',\n \n \n md: 'node_modules/@msdyn365-commerce-modules/ratings-reviews/dist/lib/modules/ratings-histogram'\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 window.__bindings__ = window.__bindings__ || {};\n window.__bindings__.modules = {\n ...window.__bindings__.modules || {},\n ...binding.modules\n };\n \n window.__bindings__.dataActions = {\n ...window.__bindings__.dataActions || {},\n ...binding.dataActions\n };\n export const viewDictionary = {};\n viewDictionary['__local__|__local__|themes|moekwrsitetheme|views|ratings-histogram'] = {\n c: () => require('partner/themes/moekwrsitetheme/views/ratings-histogram.view.tsx'),\n cn: '__local__-__local__-ratings-histogram'\n };\nviewDictionary['__local__|__local__|themes|moenzcsitetheme|views|ratings-histogram'] = {\n c: () => require('partner/themes/moenzcsitetheme/views/ratings-histogram.view.tsx'),\n cn: '__local__-__local__-ratings-histogram'\n };\nviewDictionary['__local__|__local__|themes|moetwksitetheme|views|ratings-histogram'] = {\n c: () => require('partner/themes/moetwksitetheme/views/ratings-histogram.view.tsx'),\n cn: '__local__-__local__-ratings-histogram'\n };\nviewDictionary['@msdyn365-commerce-modules|fabrikam-design-kit|modules|fabrikam|views|ratings-histogram'] = {\n c: () => require('@msdyn365-commerce-modules/fabrikam-design-kit/dist/lib/modules/fabrikam/views/ratings-histogram.view.js'),\n cn: '@msdyn365-commerce-modules-fabrikam-design-kit-ratings-histogram'\n };\nviewDictionary['@msdyn365-commerce-modules|ratings-reviews|modules|ratings-histogram|ratings-histogram'] = {\n c: () => require('@msdyn365-commerce-modules/ratings-reviews/dist/lib/modules/ratings-histogram/ratings-histogram.view.js'),\n cn: '@msdyn365-commerce-modules-ratings-reviews-ratings-histogram'\n };\nviewDictionary['@msdyn365-commerce-theme|adventureworks-theme-kit|modules|adventureworks|views|ratings-histogram'] = {\n c: () => require('@msdyn365-commerce-theme/adventureworks-theme-kit/dist/lib/modules/adventureworks/views/ratings-histogram.view.js'),\n cn: '@msdyn365-commerce-theme-adventureworks-theme-kit-ratings-histogram'\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 { IHistogramItemViewProps, IRatingsHistogramViewProps } from '@msdyn365-commerce-modules/ratings-reviews';\nimport { Module, Node } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nconst RatingsHistogramView: React.FC = props => {\n const { heading, histogramItems, histogramProps, moduleProps } = props;\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, 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 { 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 { RatingComponent } from '@msdyn365-commerce/components';\nimport { ICoreContext } from '@msdyn365-commerce/core';\nimport { IHistogramItemViewProps, IRatingsHistogramData, IRatingsHistogramViewProps } from '@msdyn365-commerce-modules/ratings-reviews';\nimport { format, Module, Node } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport { IRatingsHistogramProps, IRatingsHistogramResources } from '../definition-extensions/ratings-histogram.ext.props.autogenerated';\n\n/**\n * Histogram item.\n * @param props - Histogram Item ViewProps.\n * @returns Histogram Item node.\n */\nconst histogramItem = (props: IHistogramItemViewProps) => {\n return (\n \n {props.starLabel}\n {props.bar}\n \n );\n};\n\n/**\n * Average ratings.\n * @param data - Props data.\n * @param context - Histogram Item ViewProps.\n * @param typeName - Histogram Item ViewProps.\n * @param componentId - Histogram Item ViewProps.\n * @param resources - Module resource strings.\n * @returns Average ratings.\n */\nconst averageRating = (\n data: IRatingsHistogramData,\n context: ICoreContext,\n typeName: string,\n componentId: string,\n resources: IRatingsHistogramResources\n) => {\n const defaultAverageRating: number = 0;\n const reviewsCount = data.ratingsSummary.result?.reviewsCount ?? defaultAverageRating;\n const reviewsCountString = resources.numberOfReviewsString\n ? format(resources.numberOfReviewsString, reviewsCount)\n : `${reviewsCount} reviews`;\n\n return (\n
\n
{data.ratingsSummary.result?.averageRating}
\n
\n \n
\n
{reviewsCountString}
\n
\n );\n};\n\n/**\n * Histogram view.\n * @param props - Ratings HistogramV iewProps.\n * @returns Histogram view module.\n */\nconst RatingsHistogramView: React.FC> = props => {\n const { heading, histogramItems, histogramProps, moduleProps, data, resources } = props;\n const context = props.context;\n const typeName = props.typeName;\n const moduleId = props.id;\n\n return (\n \n {heading}\n
\n {averageRating(data, context, typeName, moduleId, resources)}\n \n {histogramItems.map(item => {\n return histogramItem(item);\n })}\n \n
\n
\n );\n};\n\nexport default RatingsHistogramView;\n","module.exports = React;","module.exports = ReactDOM;"],"names":["props","heading","histogramItems","histogramProps","moduleProps","data","resources","context","typeName","moduleId","id","app","config","hideRating","React","Module","Object","assign","className","averageRating","componentId","_data$ratingsSummary$","_data$ratingsSummary$2","_data$ratingsSummary$3","_data$ratingsSummary$4","_data$ratingsSummary$5","_data$ratingsSummary$6","_data$ratingsSummary$7","_data$ratingsSummary$8","reviewsCount","ratingsSummary","result","reviewsCountString","numberOfReviewsString","format","RatingComponent","avgRating","readOnly","ariaLabel","Node","map","item","buttonProps","starLabel","bar","histogramItem","binding","modules","dataActions","registerSanitizedActionPath","sanitizedActionPath","dataAction","default","Error","prototype","RegistrationId","c","require","$type","da","name","path","runOn","iNM","ns","n","p","pdp","md","window","__bindings__","_objectSpread","viewDictionary","cn","percentage","createRatingsReviewsStateInput","GenericInput","getGenericActionDataAction","createObservableDataAction","action","getGenericAction","input","createInternalRatingsReviewsStateInput","filterKey","HistogramItems","totalRatingsCount","renderItem","star5Count","star4Count","star3Count","star2Count","star1Count","stars","count","totalCount","formattedPercent","Intl","NumberFormat","locale","style","barItemAriaLabel","Progress","value","max","tag","onClick","AverageRatingNumber","summary","TotalReviews","RatingsHistogram","constructor","super","handleHeadingChange","event","this","text","target","selectFilterBy","bind","render","ratingCount","completeClass","classname","viewProps","callbacks","request","averageRatingAriaLabel","hideCount","averageNumber","totalReviews","ratingsSummaryProps","Msdyn365","editProps","onEdit","requestContext","renderView","actionContext","update","__decorate","observer","module","exports","ReactDOM"],"sourceRoot":""}