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C,QAAUC","sources":["webpack://mattressfirm/./src/modules/mfrm-csr-vote-module/mfrm-csr-vote-module.tsx?56d8","webpack://mattressfirm/./src/modules/mfrm-csr-vote-module/mfrm-csr-vote-module.view.tsx?f0ce","webpack://mattressfirm/./lib/mfrm-csr-vote-module/module-registration.js?66a0","webpack://mattressfirm/external var \"React\"?0d3b","webpack://mattressfirm/external var \"ReactDOM\"?853b"],"sourcesContent":["/*!\r\n * Copyright (c) Microsoft Corporation.\r\n * All rights reserved. See LICENSE in the project root for license information.\r\n */\r\nimport * as React from 'react';\r\n\r\nimport { IMfrmCsrVoteModuleData } from './mfrm-csr-vote-module.data';\r\nimport { IMfrmCsrVoteModuleProps } from './mfrm-csr-vote-module.props.autogenerated';\r\n\r\nimport MsDyn365, { ContentEditableEvent, IImageData, IImageSettings,Image, RichTextComponent } from '@msdyn365-commerce/core';\r\nimport { Button } from '@msdyn365-commerce-modules/utilities';\r\n\r\nexport interface IMfrmCsrVoteModuleViewProps extends IMfrmCsrVoteModuleProps {\r\n csrHeaderImage?: IImageData;\r\n csrHeader?: React.ReactNode;\r\n csrContent?: React.ReactNode;\r\n csrCTAText?: React.ReactNode;\r\n ctaButton?: React.ReactNode;\r\n}\r\n\r\n/**\r\n *\r\n * MfrmCsrVoteModule component\r\n * @extends {React.PureComponent>}\r\n */\r\nclass MfrmCsrVoteModule extends React.PureComponent> {\r\n public render(): JSX.Element | null {\r\n const { csrHeader, csrContent, csrCTAText } = this.props.config;\r\n const ctaLinkUrl = this.props.config.csrCTALink?.linkUrl.destinationUrl;\r\n\r\n const handleClick = () => {\r\n if (MsDyn365.isBrowser) {\r\n window.open(ctaLinkUrl);\r\n }\r\n };\r\n\r\n const renderHeaderText = csrHeader && (\r\n \r\n );\r\n\r\n const renderContentText = csrContent && (\r\n \r\n );\r\n\r\n const renderButton = csrCTAText && (\r\n
\r\n \r\n {csrCTAText}\r\n \r\n
\r\n );\r\n\r\n const CSRVoteViewProps = {\r\n ...this.props,\r\n csrHeaderImage: this._getVoteImage(),\r\n csrHeader: renderHeaderText,\r\n csrContent: renderContentText,\r\n ctaButton: renderButton\r\n };\r\n\r\n\r\n return (this.props.renderView(CSRVoteViewProps));\r\n }\r\n\r\n public handleTextChange = (event: ContentEditableEvent) => this.props.config.csrContent = event.target.value;\r\n\r\n private _getVoteImage(): React.ReactNode {\r\n const { csrHeaderImage } = this.props.config;\r\n\r\n const defaultImageSettings: IImageSettings = {\r\n viewports: {\r\n xs: { q: 'w=168&h=71&m=8', w: 0, h: 0 },\r\n sm: { q: 'w=168&h=71&m=8', w: 0, h: 0 },\r\n md: { q: 'w=168&h=71&m=8', w: 0, h: 0 },\r\n lg: { q: 'w=168&h=71&m=8', w: 0, h: 0 }\r\n },\r\n lazyload: true\r\n };\r\n\r\n return (\r\n \r\n );\r\n }\r\n\r\n}\r\n\r\nexport default MfrmCsrVoteModule;","/*!\r\n * Copyright (c) Microsoft Corporation.\r\n * All rights reserved. See LICENSE in the project root for license information.\r\n */\r\n\r\nimport * as React from 'react';\r\nimport { IMfrmCsrVoteModuleViewProps } from './mfrm-csr-vote-module';\r\n\r\nexport default (props: IMfrmCsrVoteModuleViewProps) => {\r\n const { csrHeaderImage, csrHeader, csrContent, ctaButton } = props;\r\n\r\n return (\r\n
\r\n
\r\n
\r\n {csrHeaderImage}\r\n {csrHeader}\r\n {csrContent}\r\n {ctaButton}\r\n
\r\n\r\n
\r\n
\r\n );\r\n};\r\n","const binding = { modules: {}, dataActions: {} };\n\n (binding.modules['mfrm-csr-vote-module'] = {\n c: () => require('partner/modules/mfrm-csr-vote-module/mfrm-csr-vote-module.tsx'),\n $type: 'contentModule',\n da: [],\n \n iNM: false,\n ns: '__local__',\n n: 'mfrm-csr-vote-module',\n p: '__local__',\n \n pdp: '',\n \n \n md: 'src/modules/mfrm-csr-vote-module'\n });\n \n\n \n window.__bindings__ = window.__bindings__ || {};\n window.__bindings__.modules = {\n ...window.__bindings__.modules || {},\n ...binding.modules\n };\n \n window.__bindings__.dataActions = {\n ...window.__bindings__.dataActions || {},\n ...binding.dataActions\n };\n export const viewDictionary = {};\n viewDictionary['__local__|__local__|modules|mfrm-csr-vote-module|mfrm-csr-vote-module'] = {\n c: () => require('partner/modules/mfrm-csr-vote-module/mfrm-csr-vote-module.view.tsx'),\n cn: '__local__-__local__-mfrm-csr-vote-module'\n };\nwindow.__bindings__ = window.__bindings__ || {};\nwindow.__bindings__.viewDictionary = {\n ...window.__bindings__.viewDictionary || {},\n ...viewDictionary\n };","module.exports = React;","module.exports = ReactDOM;"],"names":["MfrmCsrVoteModule","React","constructor","handleTextChange","event","this","props","config","csrContent","target","value","render","_this$props$config$cs","csrHeader","csrCTAText","ctaLinkUrl","csrCTALink","linkUrl","destinationUrl","renderHeaderText","RichTextComponent","text","className","editProps","onEdit","requestContext","context","request","renderContentText","renderButton","Button","onClick","handleClick","MsDyn365","isBrowser","window","open","CSRVoteViewProps","_objectSpread","csrHeaderImage","_getVoteImage","ctaButton","renderView","Image","Object","assign","alt","altText","src","gridSettings","imageSettings","viewports","xs","q","w","h","sm","md","lg","lazyload","binding","modules","dataActions","c","require","$type","da","iNM","ns","n","p","pdp","__bindings__","viewDictionary","cn","module","exports","ReactDOM"],"sourceRoot":""}