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GAGLC,GAAI,iDAKRC,OAAOC,aAAeD,OAAOC,cAAgB,GAC7CD,OAAOC,aAAab,QAAOV,EAAAA,EAAA,GACpBsB,OAAOC,aAAab,SAAW,IAC/BD,EAAQC,SAGXY,OAAOC,aAAaZ,YAAWX,EAAAA,EAAA,GAC5BsB,OAAOC,aAAaZ,aAAe,IACnCF,EAAQE,aAEY,MAAMa,EAAiB,GAC9BA,EAAe,mGAAqG,CAC5HZ,EAAGA,IAAMC,EAAQ,MACjBY,GAAI,yDAEpBH,OAAOC,aAAeD,OAAOC,cAAgB,GAC7CD,OAAOC,aAAaC,eAAcxB,EAAAA,EAAA,GACPsB,OAAOC,aAAaC,gBAAkB,IACtCA,UCtC3BE,EAAOC,QAAU/G,cCAjB8G,EAAOC,QAAUC","sources":["webpack://Msdyn365.Commerce.Online/./src/modules/vinhuset-fullscreen-content-block/components/links.tsx?fbd8","webpack://Msdyn365.Commerce.Online/./src/modules/vinhuset-fullscreen-content-block/vinhuset-fullscreen-content-block.tsx?c6f0","webpack://Msdyn365.Commerce.Online/./src/modules/vinhuset-fullscreen-content-block/vinhuset-fullscreen-content-block.view.tsx?0ae6","webpack://Msdyn365.Commerce.Online/./lib/vinhuset-fullscreen-content-block/module-registration.js?c263","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 * as Msdyn365 from '@msdyn365-commerce/core';\r\nimport { getPayloadObject, getTelemetryAttributes, ITelemetryContent, onTelemetryClick } from '@msdyn365-commerce-modules/utilities';\r\nimport * as React from 'react';\r\n\r\nimport { ILinksData } from '../vinhuset-fullscreen-content-block.props.autogenerated';\r\n\r\nexport interface IContentCardLinks {\r\n links: ILinksData[];\r\n requestContext: Msdyn365.IRequestContext;\r\n telemetryContent: ITelemetryContent;\r\n role?: string;\r\n onTextChange?(index: number): (event: Msdyn365.ContentEditableEvent) => void;\r\n}\r\n\r\n/**\r\n *\r\n * ContentCardLinks component.\r\n * @extends {React.PureComponent}\r\n */\r\nexport class ContentCardLinks extends React.PureComponent {\r\n public render(): JSX.Element {\r\n const editableLinks = this._mapEditableLinks(this.props.links);\r\n return (\r\n
\r\n {editableLinks && editableLinks.length > 0 ? (\r\n \r\n ) : null}\r\n
\r\n );\r\n }\r\n\r\n private readonly _mapEditableLinks = (linkdata: ILinksData[]): Msdyn365.ILinksData[] | null => {\r\n if (!linkdata || linkdata.length === 0) {\r\n return null;\r\n }\r\n const editableLinks: Msdyn365.ILinksData[] = [];\r\n linkdata.forEach((link, index) => {\r\n // Construct telemetry attribute to render\r\n const payLoad = getPayloadObject('click', this.props.telemetryContent, '', '');\r\n const linkText = link.linkText ? link.linkText : '';\r\n payLoad.contentAction.etext = linkText;\r\n const attributes = getTelemetryAttributes(this.props.telemetryContent, payLoad);\r\n const btnClass = index === 0 ? 'msc-cta__primary' : 'msc-cta__secondary';\r\n const editableLink: Msdyn365.ILinksData = {\r\n ariaLabel: link.ariaLabel,\r\n className: btnClass,\r\n linkText: link.linkText,\r\n linkUrl: link.linkUrl.destinationUrl,\r\n openInNewTab: link.openInNewTab,\r\n role: this.props.role,\r\n additionalProperties: attributes,\r\n onClick: onTelemetryClick(this.props.telemetryContent, payLoad, linkText)\r\n };\r\n editableLinks.push(editableLink);\r\n });\r\n\r\n return editableLinks;\r\n };\r\n}\r\nexport default ContentCardLinks;\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\nimport * as Msdyn365 from '@msdyn365-commerce/core';\r\nimport { getTelemetryObject, IModuleProps, INodeProps, ITelemetryContent } from '@msdyn365-commerce-modules/utilities';\r\nimport { ArrayExtensions } from '@msdyn365-commerce-modules/retail-actions';\r\nimport classnames from 'classnames';\r\n\r\nimport { IVinhusetFullscreenContentBlockData } from './vinhuset-fullscreen-content-block.data';\r\nimport { IVinhusetFullscreenContentBlockProps } from './vinhuset-fullscreen-content-block.props.autogenerated';\r\n\r\nimport LinksComponent from './components/links';\r\n\r\nexport interface IVinhusetFullscreenContentBlockViewProps extends IVinhusetFullscreenContentBlockProps {\r\n title?: React.ReactNode;\r\n text?: React.ReactNode;\r\n links?: React.ReactNode;\r\n backgroundImage?: React.ReactNode;\r\n contentBlockContainer: IModuleProps;\r\n detailsContainer: INodeProps;\r\n backgroundImageContainer: INodeProps;\r\n}\r\n\r\n/**\r\n *\r\n * VinhusetFullscreenContentBlock component\r\n * @extends {React.PureComponent>}\r\n */\r\nclass VinhusetFullscreenContentBlock extends React.PureComponent> {\r\n private readonly telemetryContent: ITelemetryContent = getTelemetryObject(\r\n this.props.context.request.telemetryPageName!,\r\n this.props.friendlyName,\r\n this.props.telemetry\r\n );\r\n\r\n public render(): JSX.Element | null {\r\n const { className, heading, image, links, paragraph } = this.props.config;\r\n\r\n const title = heading && (\r\n \r\n );\r\n const text = paragraph && (\r\n \r\n );\r\n const contentBlockLinks = links && ArrayExtensions.hasElements(links) && (\r\n \r\n );\r\n const imageProps = {\r\n gridSettings: this.props.context.request.gridSettings ?? {},\r\n imageSettings: image?.imageSettings\r\n };\r\n\r\n const backgroundImage = image && (\r\n \r\n );\r\n\r\n const contentBlockViewProps = {\r\n ...this.props,\r\n title,\r\n text,\r\n links: contentBlockLinks,\r\n backgroundImage,\r\n contentBlockContainer: {\r\n moduleProps: this.props,\r\n className: classnames('vinhuset-fullscreen-content-block', className)\r\n },\r\n detailsContainer: { className: 'vinhuset-fullscreen-content-block__details' },\r\n backgroundImageContainer: { className: 'vinhuset-fullscreen-content-block__background-image-container' }\r\n } as IVinhusetFullscreenContentBlockViewProps;\r\n\r\n return this.props.renderView(contentBlockViewProps);\r\n }\r\n\r\n public handleHeadingChange = (event: Msdyn365.ContentEditableEvent) => (this.props.config.heading!.text = event.target.value);\r\n\r\n public handleParagraphChange = (event: Msdyn365.ContentEditableEvent) => (this.props.config.paragraph = event.target.value);\r\n\r\n public handleLinkTextChange = (linkIndex: number) => (event: Msdyn365.ContentEditableEvent) => {\r\n if (this.props.config.links && this.props.config.links[Number(linkIndex)]) {\r\n this.props.config.links[Number(linkIndex)].linkText = event.target.value;\r\n }\r\n };\r\n}\r\n\r\nexport default VinhusetFullscreenContentBlock;\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\nimport { Module, Node } from '@msdyn365-commerce-modules/utilities';\r\nimport { IVinhusetFullscreenContentBlockViewProps } from './vinhuset-fullscreen-content-block';\r\n\r\nexport default (props: IVinhusetFullscreenContentBlockViewProps) => {\r\n const {\r\n title,\r\n text,\r\n links,\r\n backgroundImage,\r\n contentBlockContainer,\r\n detailsContainer,\r\n backgroundImageContainer\r\n } = props;\r\n\r\n return (\r\n \r\n \r\n {backgroundImage}\r\n \r\n \r\n {title}\r\n {text}\r\n \r\n {links}\r\n \r\n );\r\n};\r\n","const binding = { modules: {}, dataActions: {} };\n\n (binding.modules['vinhuset-fullscreen-content-block'] = {\n c: () => require('partner/modules/vinhuset-fullscreen-content-block/vinhuset-fullscreen-content-block.tsx'),\n $type: 'contentModule',\n da: [],\n \n iNM: false,\n ns: '__local__',\n n: 'vinhuset-fullscreen-content-block',\n p: '__local__',\n \n pdp: '',\n \n \n md: 'src/modules/vinhuset-fullscreen-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__|modules|vinhuset-fullscreen-content-block|vinhuset-fullscreen-content-block'] = {\n c: () => require('partner/modules/vinhuset-fullscreen-content-block/vinhuset-fullscreen-content-block.view.tsx'),\n cn: '__local__-__local__-vinhuset-fullscreen-content-block'\n };\nwindow.__bindings__ = window.__bindings__ || {};\nwindow.__bindings__.viewDictionary = {\n ...window.__bindings__.viewDictionary || {},\n ...viewDictionary\n };","module.exports = React;","module.exports = ReactDOM;"],"names":["ContentCardLinks","React","constructor","_mapEditableLinks","linkdata","length","editableLinks","forEach","link","index","payLoad","getPayloadObject","this","props","telemetryContent","linkText","contentAction","etext","attributes","getTelemetryAttributes","btnClass","editableLink","ariaLabel","className","linkUrl","destinationUrl","openInNewTab","role","additionalProperties","onClick","onTelemetryClick","push","render","links","Msdyn365","editProps","onTextChange","requestContext","VinhusetFullscreenContentBlock","getTelemetryObject","context","request","telemetryPageName","friendlyName","telemetry","handleHeadingChange","event","config","heading","text","target","value","handleParagraphChange","paragraph","handleLinkTextChange","linkIndex","Number","_heading$tag","_this$props$context$r","_this$props$config$im","image","title","tag","onEdit","contentBlockLinks","ArrayExtensions","hasElements","LinksComponent","Object","assign","imageProps","gridSettings","imageSettings","backgroundImage","src","preserveImageSpace","key","moduleType","typeName","imagePropertyName","moduleId","id","shouldSkipToMainImage","undefined","contentBlockViewProps","_objectSpread","contentBlockContainer","moduleProps","classnames","detailsContainer","backgroundImageContainer","renderView","Module","Node","binding","modules","dataActions","c","require","$type","da","iNM","ns","n","p","pdp","md","window","__bindings__","viewDictionary","cn","module","exports","ReactDOM"],"sourceRoot":""}