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7C,SCzFjB6J,EAAOC,QAAU5J,cCAjB2J,EAAOC,QAAUC","sources":["webpack://Msdyn365.Commerce.Online/./src/themes/rwb-adventureworks/views/content-block.view.tsx?1c90","webpack://Msdyn365.Commerce.Online/./lib/content-block/module-registration.js?4cb2","webpack://Msdyn365.Commerce.Online/./src/modules/content-block/components/additional-content.tsx?d5f9","webpack://Msdyn365.Commerce.Online/./src/modules/content-block/components/links.tsx?abbf","webpack://Msdyn365.Commerce.Online/./src/modules/content-block/content-block.tsx?3084","webpack://Msdyn365.Commerce.Online/./src/modules/content-block/content-block.view.tsx?1773","webpack://Msdyn365.Commerce.Online/./src/modules/adventureworks/views/content-block.view.tsx?0db4","webpack://Msdyn365.Commerce.Online/external var \"React\"?0d3b","webpack://Msdyn365.Commerce.Online/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\n\r\nimport {\r\n IContentBlockAdditionalContentItemViewProps,\r\n IContentBlockAdditionalContentViewProps,\r\n IContentBlockViewProps\r\n} from '@msdyn365-commerce-modules/content-block';\r\nimport { Module, Node } from '@msdyn365-commerce-modules/utilities';\r\nimport * as React from 'react';\r\n\r\n/**\r\n * Render Additional Content.\r\n * @param additionalContent - Additional content view props.\r\n * @returns JSX Element.\r\n */\r\nconst renderAdditionalContent = (additionalContent: IContentBlockAdditionalContentViewProps) => {\r\n return (\r\n \r\n {additionalContent.additionalContentItems?.map((item: IContentBlockAdditionalContentItemViewProps) => {\r\n return (\r\n <>\r\n {item.heading}\r\n \r\n {item.text}\r\n {item.links}\r\n \r\n \r\n );\r\n })}\r\n \r\n );\r\n};\r\n\r\n/**\r\n * Render View.\r\n * @param props - The view props.\r\n * @returns -The JSX Element.\r\n */\r\nconst contentBlockView: React.FC = props => {\r\n const {\r\n contentBlockContainer,\r\n imageContainer,\r\n detailsContainer,\r\n title,\r\n text,\r\n links,\r\n image,\r\n contentBlockAnchorTag,\r\n imageLink,\r\n imageAriaLabel,\r\n additionalContent\r\n } = props;\r\n\r\n // @ts-expect-error HTML element need to be clear on run time.\r\n const hasImage: boolean = image.props.src;\r\n const imageClass: string = hasImage ? `${detailsContainer.className} withImage` : `${detailsContainer.className} withoutImage`;\r\n\r\n if (imageLink) {\r\n return (\r\n \r\n \r\n {image}\r\n \r\n \r\n {title}\r\n {text}\r\n {links}\r\n {additionalContent && renderAdditionalContent(additionalContent)}\r\n \r\n \r\n );\r\n }\r\n return (\r\n \r\n {image}\r\n \r\n {title}\r\n {text}\r\n {links}\r\n {additionalContent && renderAdditionalContent(additionalContent)}\r\n \r\n \r\n );\r\n};\r\n\r\nexport default contentBlockView;\r\n","const binding = { modules: {}, dataActions: {} };\n\n (binding.modules['content-block'] = {\n c: () => require('@msdyn365-commerce-modules/content-block/dist/lib/modules/content-block/content-block'),\n $type: 'contentModule',\n da: [],\n \n iNM: true,\n ns: '@msdyn365-commerce-modules',\n n: 'content-block',\n p: 'content-block',\n \n pdp: '',\n \n \n md: 'node_modules/@msdyn365-commerce-modules/content-block/dist/lib/modules/content-block'\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|rwb-adventureworks|views|content-block'] = {\n c: () => require('partner/themes/rwb-adventureworks/views/content-block.view.tsx'),\n cn: '__local__-__local__-content-block'\n };\nviewDictionary['@msdyn365-commerce-modules|content-block|modules|content-block|content-block'] = {\n c: () => require('@msdyn365-commerce-modules/content-block/dist/lib/modules/content-block/content-block.view.js'),\n cn: '@msdyn365-commerce-modules-content-block-content-block'\n };\nviewDictionary['@msdyn365-commerce-theme|adventureworks-theme-kit|modules|adventureworks|views|content-block'] = {\n c: () => require('@msdyn365-commerce-theme/adventureworks-theme-kit/dist/lib/modules/adventureworks/views/content-block.view.js'),\n cn: '@msdyn365-commerce-theme-adventureworks-theme-kit-content-block'\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 * as Msdyn365 from '@msdyn365-commerce/core';\nimport { INodeProps } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport { IAdditionalContentData, ILinksData } from '../content-block.props.autogenerated';\n\n/**\n * IContentBlockAdditionalContentProps: Interface for\n * Content Block Additional Content Component props.\n */\nexport interface IContentBlockAdditionalContentProps {\n requestContext: Msdyn365.IRequestContext;\n additionalContent: IAdditionalContentData[] | undefined;\n handleAdditionalTextChange(index: number, event: Msdyn365.ContentEditableEvent): void;\n handleAdditionalParagraphChange(index: number, event: Msdyn365.ContentEditableEvent): void;\n handleAdditionalLinkTextChange(linkIndex: number, index: number, event: Msdyn365.ContentEditableEvent): void;\n}\n\n/**\n * IContentBlockAdditionalContentProps: Interface for\n * Content Block Additional Content view props.\n */\nexport interface IContentBlockAdditionalContentViewProps {\n additionalContentNode: INodeProps;\n additionalContentItems?: IContentBlockAdditionalContentItemViewProps[];\n}\n\n/**\n * IContentBlockAdditionalContentProps: Interface for\n * Content Block Additional Content Item view props.\n */\nexport interface IContentBlockAdditionalContentItemViewProps {\n heading: React.ReactNode;\n text: React.ReactNode;\n links: React.ReactNode;\n additionalContentItemContainer: INodeProps;\n additionalContentItemLinks: INodeProps;\n}\n\n/**\n * Renders additional content heading.\n * @param additionalContentHeading - Additional content heading.\n * @param props - Content Block Additional content component props.\n * @param itemIndex - Item index.\n * @returns Heading Node.\n */\nconst renderHeading = (additionalContentHeading: string, props: IContentBlockAdditionalContentProps, itemIndex: number) => {\n const requestContext = props.requestContext;\n return (\n {\n props.handleAdditionalTextChange(itemIndex, event);\n },\n requestContext\n }}\n />\n );\n};\n\n/**\n * Renders additional content heading.\n * @param additionalContentParagraphText - Additional content paragraph text.\n * @param props - Content Block Additional content component props.\n * @param itemIndex - Item index.\n * @returns Paragraph Node.\n */\nconst renderParagraph = (additionalContentParagraphText: string, props: IContentBlockAdditionalContentProps, itemIndex: number) => {\n const requestContext = props.requestContext;\n return (\n {\n props.handleAdditionalTextChange(itemIndex, event);\n },\n requestContext\n }}\n />\n );\n};\n\n/**\n * Renders additional content heading.\n * @param ctaLink - Additional content link.\n * @param props - Content Block Additional content component props.\n * @param itemIndex - Item index.\n * @param linkIndex - Additional content link index.\n * @returns Link Node.\n */\nconst renderLinks = (ctaLink: ILinksData, props: IContentBlockAdditionalContentProps, itemIndex: number, linkIndex: number) => {\n const editableLink: Msdyn365.ILinksData = {\n ariaLabel: ctaLink.ariaLabel,\n className: 'ms-content-block__details__additional-content-cta-links',\n linkText: ctaLink.linkText,\n linkUrl: ctaLink.linkUrl.destinationUrl,\n openInNewTab: ctaLink.openInNewTab,\n role: 'link'\n };\n const requestContext = props.requestContext;\n return (\n {\n props.handleAdditionalLinkTextChange(linkIndex, itemIndex, event);\n },\n requestContext\n }}\n />\n );\n};\n\n/**\n * Create node for each additonal content item.\n * @param item - Content block additonal content item props.\n * @param props - Content Block Additional content component props.\n * @param itemIndex - Item index.\n * @returns IContentBlockAdditionalContentItemViewProps.\n */\nconst assembleNode = (\n item: IAdditionalContentData,\n props: IContentBlockAdditionalContentProps,\n itemIndex: number\n): IContentBlockAdditionalContentItemViewProps => {\n const headingNode = item.heading && renderHeading(item.heading, props, itemIndex);\n const paragraphNode = item.subtext && renderParagraph(item.subtext, props, itemIndex);\n const linksNode = item.links?.map((ctaLink: ILinksData, index: number) => {\n return renderLinks(ctaLink, props, itemIndex, index);\n });\n\n return {\n heading: headingNode,\n text: paragraphNode,\n links: linksNode,\n additionalContentItemContainer: { className: 'ms-content-block__details__additional-content__container' },\n additionalContentItemLinks: { className: 'ms-content-block__details__additional-content-cta' }\n };\n};\n\n/**\n * ContentBlockAdditionalContent component.\n * @param props - Content Block Additional content component props.\n * @returns Content Block Additional content view props.\n */\nexport const contentBlockAdditionalContent = (\n props: IContentBlockAdditionalContentProps\n): IContentBlockAdditionalContentViewProps | undefined => {\n const { additionalContent } = props;\n if (!additionalContent) {\n return undefined;\n }\n\n const reactNodes: IContentBlockAdditionalContentItemViewProps[] = [];\n additionalContent.map((item, index: number) => {\n return reactNodes.push(assembleNode(item, props, index));\n });\n\n return {\n additionalContentNode: { className: 'ms-content-block__details__additional-content' },\n additionalContentItems: reactNodes\n };\n};\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport * as Msdyn365 from '@msdyn365-commerce/core';\nimport { getPayloadObject, getTelemetryAttributes, ITelemetryContent, onTelemetryClick } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport { ILinksData } from '../content-block.props.autogenerated';\n\nexport interface IContentCardLinks {\n links: ILinksData[];\n requestContext: Msdyn365.IRequestContext;\n telemetryContent: ITelemetryContent;\n role?: string;\n onTextChange?(index: number): (event: Msdyn365.ContentEditableEvent) => void;\n}\n\n/**\n *\n * ContentCardLinks component.\n * @extends {React.PureComponent}\n */\nexport class ContentCardLinks extends React.PureComponent {\n public render(): JSX.Element {\n const editableLinks = this._mapEditableLinks(this.props.links);\n return (\n
\n {editableLinks && editableLinks.length > 0 ? (\n \n ) : null}\n
\n );\n }\n\n private readonly _mapEditableLinks = (linkdata: ILinksData[]): Msdyn365.ILinksData[] | null => {\n if (!linkdata || linkdata.length === 0) {\n return null;\n }\n const editableLinks: Msdyn365.ILinksData[] = [];\n linkdata.forEach((link, index) => {\n // Construct telemetry attribute to render\n const payLoad = getPayloadObject('click', this.props.telemetryContent, '', '');\n const linkText = link.linkText ? link.linkText : '';\n payLoad.contentAction.etext = linkText;\n const attributes = getTelemetryAttributes(this.props.telemetryContent, payLoad);\n const btnClass = index === 0 ? 'msc-cta__primary' : 'msc-cta__secondary';\n const editableLink: Msdyn365.ILinksData = {\n ariaLabel: link.ariaLabel,\n className: btnClass,\n linkText: link.linkText,\n linkUrl: link.linkUrl.destinationUrl,\n openInNewTab: link.openInNewTab,\n role: this.props.role,\n additionalProperties: attributes,\n onClick: onTelemetryClick(this.props.telemetryContent, payLoad, linkText)\n };\n editableLinks.push(editableLink);\n });\n\n return editableLinks;\n };\n}\nexport default ContentCardLinks;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport * as Msdyn365 from '@msdyn365-commerce/core';\nimport { ArrayExtensions } from '@msdyn365-commerce-modules/retail-actions';\nimport { getTelemetryObject, IModuleProps, INodeProps, ITelemetryContent } from '@msdyn365-commerce-modules/utilities';\nimport classnames from 'classnames';\nimport * as React from 'react';\n\nimport { contentBlockAdditionalContent, IContentBlockAdditionalContentViewProps } from './components/additional-content';\nimport LinksComponent from './components/links';\nimport { actionableRegion as region, IContentBlockConfig, IContentBlockProps } from './content-block.props.autogenerated';\n\nexport interface IContentBlockViewProps extends IContentBlockProps<{}> {\n title?: React.ReactNode;\n text?: React.ReactNode;\n image?: React.ReactNode;\n links?: React.ReactNode;\n className?: string;\n contentBlockContainer: IModuleProps;\n imageContainer: INodeProps;\n detailsContainer: INodeProps;\n contentBlockAnchorTag?: INodeProps;\n imageLink?: string;\n imageAriaLabel?: string;\n additionalContent?: IContentBlockAdditionalContentViewProps;\n handleAdditionalText?(): void;\n handleAdditionalParagraph?(): void;\n handleAdditionalLinkTextChange?(): void;\n}\n\n/**\n * Site-builder configuration for the module.\n */\nexport interface IContentBlockFullConfig extends IContentBlockConfig {\n // eslint-disable-next-line @typescript-eslint/naming-convention -- This field comes from SDK.\n msdyn365__moduleLayout?: string;\n}\n\n/**\n * ContentCard component.\n * @extends {React.PureComponent}\n */\nexport class ContentBlock extends React.PureComponent> {\n private readonly telemetryContent: ITelemetryContent = getTelemetryObject(\n this.props.context.request.telemetryPageName!,\n this.props.friendlyName,\n this.props.telemetry\n );\n\n public render(): JSX.Element | null {\n const { heading, paragraph, image, links, className, imageAriaLabel } = this.props.config;\n const contentBlockTitle = heading && (\n \n );\n\n const contentBlockLinks = links && ArrayExtensions.hasElements(links) && (\n \n );\n const contentBlockText = paragraph && (\n \n );\n\n let contentBlockImageSettings: Msdyn365.IImageSettings | undefined;\n\n if (image && image.imageSettings && !image.imageSettings.backgroundColor && this.props.config.backgroundColor) {\n contentBlockImageSettings = {\n ...image?.imageSettings,\n backgroundColor: this.props.config.backgroundColor\n };\n } else {\n contentBlockImageSettings = image?.imageSettings;\n }\n\n const imageProps = {\n gridSettings: this.props.context.request.gridSettings ?? {},\n imageSettings: contentBlockImageSettings\n };\n\n const contentBlockImage = (\n \n );\n\n const contentBlockContainerStyle: React.CSSProperties | undefined = this.props.config.backgroundColor\n ? { backgroundColor: this.props.config.backgroundColor }\n : undefined;\n\n if (!contentBlockTitle && !contentBlockText && !contentBlockLinks) {\n this.props.context.telemetry.error('Content block content is empty, module wont render.');\n return null;\n }\n const contentBlockviewProps = {\n ...this.props,\n title: contentBlockTitle,\n text: contentBlockText,\n image: contentBlockImage,\n links: contentBlockLinks,\n moduleClass: this.props.config.className,\n contentBlockContainer: {\n moduleProps: this.props,\n className: classnames('ms-content-block', className),\n style: contentBlockContainerStyle\n },\n imageContainer: { className: 'ms-content-block__image' },\n detailsContainer: { className: 'ms-content-block__details' },\n contentBlockAnchorTag: {\n tag: 'a',\n className: 'ms-content-block__link',\n role: 'link'\n },\n imageLink: this._getImageLink(),\n imageAriaLabel,\n additionalContent: contentBlockAdditionalContent({\n requestContext: this.props.context.request,\n additionalContent: this.props.config.additionalContent,\n handleAdditionalTextChange: this.handleAdditionalTextChange,\n handleAdditionalParagraphChange: this.handleAdditionalParagraphChange,\n handleAdditionalLinkTextChange: this.handleAdditionalLinkTextChange\n }),\n handleAdditionalText: this.handleAdditionalTextChange,\n handleAdditionalParagraph: this.handleAdditionalParagraphChange,\n handleAdditionalLinkTextChange: this.handleAdditionalLinkTextChange\n };\n\n return this.props.renderView(contentBlockviewProps) as React.ReactElement;\n }\n\n /**\n * To handle text change.\n * @param event - To handle text change event.\n * @name - HandleTextChange\n * @public\n * @returns - The Text value.\n */\n public handleTextChange = (event: Msdyn365.ContentEditableEvent) => (this.props.config.heading!.text = event.target.value);\n\n /**\n * To handle paragraph change.\n * @param event - To handle text change event.\n * @name - HandleParagraphChange\n * @public\n * @returns - The Paragraph value.\n */\n public handleParagraphChange = (event: Msdyn365.ContentEditableEvent) => (this.props.config.paragraph = event.target.value);\n\n /**\n * Handle link text change.\n * @param linkIndex - The link index.\n * @returns - Void.\n */\n public handleLinkTextChange = (linkIndex: number) => (event: Msdyn365.ContentEditableEvent) => {\n if (this.props.config.links && this.props.config.links[Number(linkIndex)]) {\n this.props.config.links[Number(linkIndex)].linkText = event.target.value;\n }\n };\n\n public handleAdditionalTextChange(index: number, event: Msdyn365.ContentEditableEvent): void {\n if (this.props.config.additionalContent) {\n this.props.config.additionalContent[Number(index)].heading = event.target.value;\n }\n }\n\n public handleAdditionalLinkTextChange(linkIndex: number, index: number, event: Msdyn365.ContentEditableEvent): void {\n const additionalContentObject =\n (this.props.config.additionalContent &&\n ArrayExtensions.hasElements(this.props.config.additionalContent) &&\n this.props.config.additionalContent[Number(index)]) ||\n {};\n if (additionalContentObject.links) {\n additionalContentObject.links[Number(linkIndex)].linkText = event.target.value;\n }\n }\n\n public handleAdditionalParagraphChange(index: number, event: Msdyn365.ContentEditableEvent): void {\n if (this.props.config.additionalContent) {\n this.props.config.additionalContent[Number(index)].subtext = event.target.value;\n }\n }\n\n private _getImageLink(): string | null {\n const { imageLink, links, actionableRegion } = this.props.config;\n if (actionableRegion === region.imageAndLinks) {\n if (imageLink?.destinationUrl) {\n return imageLink.destinationUrl;\n } else if (links && ArrayExtensions.hasElements(links) && links[0].linkUrl) {\n return links[0].linkUrl.destinationUrl;\n }\n return null;\n }\n return null;\n }\n}\n\nexport default ContentBlock;\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 { IContentBlockAdditionalContentItemViewProps, IContentBlockAdditionalContentViewProps } from './components/additional-content';\nimport { IContentBlockViewProps } from './content-block';\n\n/**\n * Render Additional Content.\n * @param additionalContent - Additional content view props.\n * @returns JSX Element.\n */\nconst renderAdditionalContent = (additionalContent: IContentBlockAdditionalContentViewProps) => {\n return (\n \n {additionalContent.additionalContentItems?.map((item: IContentBlockAdditionalContentItemViewProps) => {\n return (\n <>\n {item.heading}\n \n {item.text}\n {item.links}\n \n \n );\n })}\n \n );\n};\n\nconst ContentBlockView: React.FC = props => {\n const {\n contentBlockContainer,\n imageContainer,\n detailsContainer,\n title,\n text,\n links,\n image,\n contentBlockAnchorTag,\n imageLink,\n imageAriaLabel,\n additionalContent\n } = props;\n\n if (imageLink) {\n return (\n \n \n {image}\n \n \n {title}\n {text}\n {links}\n {additionalContent && renderAdditionalContent(additionalContent)}\n \n \n );\n }\n return (\n \n {image}\n \n {title}\n {text}\n {links}\n {additionalContent && renderAdditionalContent(additionalContent)}\n \n \n );\n};\n\nexport default ContentBlockView;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport {\n IContentBlockAdditionalContentItemViewProps,\n IContentBlockAdditionalContentViewProps,\n IContentBlockViewProps\n} from '@msdyn365-commerce-modules/content-block';\nimport { Module, Node } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\n/**\n * Render Additional Content.\n * @param additionalContent - Additional content view props.\n * @returns JSX Element.\n */\nconst renderAdditionalContent = (additionalContent: IContentBlockAdditionalContentViewProps) => {\n return (\n \n {additionalContent.additionalContentItems?.map((item: IContentBlockAdditionalContentItemViewProps) => {\n return (\n <>\n {item.heading}\n \n {item.text}\n {item.links}\n \n \n );\n })}\n \n );\n};\n\n/**\n * Render View.\n * @param props - The view props.\n * @returns -The JSX Element.\n */\nconst contentBlockView: React.FC = props => {\n const {\n contentBlockContainer,\n imageContainer,\n detailsContainer,\n title,\n text,\n links,\n image,\n contentBlockAnchorTag,\n imageLink,\n imageAriaLabel,\n additionalContent\n } = props;\n\n // @ts-expect-error HTML element need to be clear on run time.\n const hasImage: boolean = image.props.src;\n const imageClass: string = hasImage ? `${detailsContainer.className} withImage` : `${detailsContainer.className} withoutImage`;\n\n if (imageLink) {\n return (\n \n \n {image}\n \n \n {title}\n {text}\n {links}\n {additionalContent && renderAdditionalContent(additionalContent)}\n \n \n );\n }\n return (\n \n {image}\n \n {title}\n {text}\n {links}\n {additionalContent && renderAdditionalContent(additionalContent)}\n \n \n );\n};\n\nexport default contentBlockView;\n","module.exports = React;","module.exports = ReactDOM;"],"names":["renderAdditionalContent","additionalContent","_additionalContent$ad","React","Node","Object","assign","additionalContentNode","additionalContentItems","map","item","heading","additionalContentItemContainer","text","additionalContentItemLinks","links","props","contentBlockContainer","imageContainer","detailsContainer","title","image","contentBlockAnchorTag","imageLink","imageAriaLabel","imageClass","src","className","Module","href","binding","modules","dataActions","c","require","$type","da","iNM","ns","n","p","pdp","md","window","__bindings__","_objectSpread","viewDictionary","cn","assembleNode","itemIndex","_item$links","headingNode","renderHeading","additionalContentHeading","requestContext","Msdyn365","tag","editProps","onEdit","event","handleAdditionalTextChange","paragraphNode","subtext","renderParagraph","additionalContentParagraphText","linksNode","ctaLink","index","renderLinks","linkIndex","editableLink","ariaLabel","linkText","linkUrl","destinationUrl","openInNewTab","role","key","link","onTextChange","handleAdditionalLinkTextChange","contentBlockAdditionalContent","reactNodes","push","ContentCardLinks","constructor","_mapEditableLinks","linkdata","length","editableLinks","forEach","payLoad","getPayloadObject","this","telemetryContent","contentAction","etext","attributes","getTelemetryAttributes","btnClass","additionalProperties","onClick","onTelemetryClick","render","ContentBlock","getTelemetryObject","context","request","telemetryPageName","friendlyName","telemetry","handleTextChange","config","target","value","handleParagraphChange","paragraph","handleLinkTextChange","Number","_heading$tag","_this$props$context$r","_this$props$config$im","contentBlockTitle","contentBlockLinks","ArrayExtensions","hasElements","LinksComponent","msdyn365__moduleLayout","contentBlockText","contentBlockImageSettings","imageSettings","backgroundColor","imageProps","gridSettings","contentBlockImage","preserveImageSpace","moduleType","typeName","imagePropertyName","moduleId","id","layout","shouldSkipToMainImage","contentBlockContainerStyle","undefined","error","contentBlockviewProps","moduleClass","moduleProps","classnames","style","_getImageLink","handleAdditionalParagraphChange","handleAdditionalText","handleAdditionalParagraph","renderView","additionalContentObject","actionableRegion","module","exports","ReactDOM"],"sourceRoot":""}