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AGXY,OAAOC,aAAaZ,YAAW3B,EAAAA,EAAA,GAC5BsC,OAAOC,aAAaZ,aAAe,CAAC,GACpCF,EAAQE,aAEY,MAAMa,EAAiB,CAAC,EAC/BA,EAAe,iFAAmF,CAC1GZ,EAAGA,IAAMC,EAAQ,MACjBY,GAAI,gDAEpBH,OAAOC,aAAeD,OAAOC,cAAgB,CAAC,EAC9CD,OAAOC,aAAaC,eAAcxC,EAAAA,EAAA,GACPsC,OAAOC,aAAaC,gBAAkB,CAAC,GACvCA,UCtC3BE,EAAOC,QAAU9D,cCAjB6D,EAAOC,QAAUC","sources":["webpack://Msdyn365.Commerce.Online/./src/modules/ecomm-content-template-2/ecomm-content-template-2.tsx?3dc5","webpack://Msdyn365.Commerce.Online/./src/modules/ecomm-content-template-2/ecomm-content-template-2.view.tsx?87b7","webpack://Msdyn365.Commerce.Online/./lib/ecomm-content-template-2/module-registration.js?d68f","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 * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\nimport * as React from 'react';\r\n\r\nimport * as MsDyn365 from '@msdyn365-commerce/core';\r\n\r\nimport { IEcommContentTemplate2Data } from './ecomm-content-template-2.data';\r\nimport { IEcommContentTemplate2Props } from './ecomm-content-template-2.props.autogenerated';\r\n\r\nexport interface IEcommContentTemplate2ViewProps extends IEcommContentTemplate2Props {\r\n description: React.ReactNode;\r\n firstImage: MsDyn365.IImageData;\r\n secondImage: MsDyn365.IImageData;\r\n anchorID: string;\r\n TemplateContainerStyle: any;\r\n InfoContainerStyle: any;\r\n ImageContainerStyle: any;\r\n FirstContainerStyle: any;\r\n SecondContainerStyle: any;\r\n NoImage: any;\r\n}\r\n\r\n/**\r\n *\r\n * EcommContentTemplate2 component\r\n * @extends {React.PureComponent>}\r\n */\r\nclass EcommContentTemplate2 extends React.PureComponent> {\r\n public render(): JSX.Element | null {\r\n const { config } = this.props;\r\n\r\n const text = config.description && ;\r\n\r\n const EcommContentTemplateViewProps = {\r\n ...this.props,\r\n description: text,\r\n firstImage: config.firstImage,\r\n secondImage: config.secondImage,\r\n anchorID: config.anchorID,\r\n TemplateContainerStyle: {\r\n className: 'ecomm-content-template-2'\r\n },\r\n InfoContainerStyle: {\r\n className: 'info-container'\r\n },\r\n ImageContainerStyle: {\r\n className: 'row img-container'\r\n },\r\n FirstContainerStyle: {\r\n className: 'col-12 col-sm-6 first-container'\r\n },\r\n SecondContainerStyle: {\r\n className: 'col-12 col-sm-6 second-container'\r\n },\r\n NoImage: {\r\n className: 'msc-empty_image'\r\n }\r\n };\r\n\r\n return this.props.renderView(EcommContentTemplateViewProps);\r\n }\r\n\r\n private _handleTextChange = (event: MsDyn365.ContentEditableEvent) => this.props.config.description = event.target.value;\r\n}\r\n\r\nexport default EcommContentTemplate2;\r\n","/*!\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\n\r\nimport { IEcommContentTemplate2ViewProps } from './ecomm-content-template-2';\r\n\r\n/**\r\n *\r\n * EcommContentTemplate1View component\r\n * @extends {React.PureComponent}\r\n */\r\nexport class EcommContentTemplate2View extends React.PureComponent {\r\n public render(): JSX.Element | null {\r\n const { config, description, anchorID, TemplateContainerStyle } = this.props;\r\n\r\n const resultStyle = config.className && config.className !== '' ? `${TemplateContainerStyle.className}` + ` ` + `${config.className}` : TemplateContainerStyle.className;\r\n\r\n if (anchorID) {\r\n const style = `anchor ` + `${resultStyle}`;\r\n\r\n return (\r\n
\r\n {this._renderImage()}\r\n

{description}

\r\n
\r\n );\r\n }\r\n\r\n return (\r\n
\r\n {this._renderImage()}\r\n

{description}

\r\n
\r\n );\r\n }\r\n\r\n private _renderImage(): JSX.Element | null {\r\n const { firstImage, secondImage, ImageContainerStyle, FirstContainerStyle, SecondContainerStyle, NoImage } = this.props;\r\n\r\n let imgFirst = firstImage && firstImage.src ? :
;\r\n\r\n let imgSecond = secondImage && secondImage.src ? :
;\r\n\r\n if (secondImage && secondImage.src) {\r\n return (\r\n
\r\n
{imgFirst}
\r\n
{imgSecond}
\r\n
\r\n );\r\n }\r\n\r\n return
{imgFirst}
;\r\n }\r\n}\r\n\r\nexport default EcommContentTemplate2View;","const binding = { modules: {}, dataActions: {} };\n\n (binding.modules['ecomm-content-template-2'] = {\n c: () => require('partner/modules/ecomm-content-template-2/ecomm-content-template-2.tsx'),\n $type: 'contentModule',\n da: [],\n \n iNM: false,\n ns: '__local__',\n n: 'ecomm-content-template-2',\n p: '__local__',\n \n pdp: '',\n \n \n md: 'src/modules/ecomm-content-template-2'\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|ecomm-content-template-2|ecomm-content-template-2'] = {\n c: () => require('partner/modules/ecomm-content-template-2/ecomm-content-template-2.view.tsx'),\n cn: '__local__-__local__-ecomm-content-template-2'\n };\nwindow.__bindings__ = window.__bindings__ || {};\nwindow.__bindings__.viewDictionary = {\n ...window.__bindings__.viewDictionary || {},\n ...viewDictionary\n };","module.exports = React;","module.exports = ReactDOM;"],"names":["EcommContentTemplate2","React","constructor","_handleTextChange","event","this","props","config","description","target","value","render","text","MsDyn365","editProps","onEdit","requestContext","context","request","EcommContentTemplateViewProps","_objectSpread","firstImage","secondImage","anchorID","TemplateContainerStyle","className","InfoContainerStyle","ImageContainerStyle","FirstContainerStyle","SecondContainerStyle","NoImage","renderView","EcommContentTemplate2View","resultStyle","style","id","_renderImage","Object","assign","renderModuleAttributes","imgFirst","src","alt","role","imgSecond","binding","modules","dataActions","c","require","$type","da","iNM","ns","n","p","pdp","md","window","__bindings__","viewDictionary","cn","module","exports","ReactDOM"],"sourceRoot":""}