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,8BACHC,EAAG,YAEHC,IAAK,GAGLC,GAAI,2CAKRC,OAAOC,aAAeD,OAAOC,cAAgB,GAC7CD,OAAOC,aAAab,QAAOxB,EAAAA,EAAA,GACpBoC,OAAOC,aAAab,SAAW,IAC/BD,EAAQC,SAGXY,OAAOC,aAAaZ,YAAWzB,EAAAA,EAAA,GAC5BoC,OAAOC,aAAaZ,aAAe,IACnCF,EAAQE,aAEY,MAAMa,EAAiB,GAC9BA,EAAe,uFAAyF,CAChHZ,EAAGA,IAAMC,EAAQ,MACjBY,GAAI,mDAEpBH,OAAOC,aAAeD,OAAOC,cAAgB,GAC7CD,OAAOC,aAAaC,eAActC,EAAAA,EAAA,GACPoC,OAAOC,aAAaC,gBAAkB,IACtCA,UCtC3BE,EAAOC,QAAUzD,cCAjBwD,EAAOC,QAAUC","sources":["webpack://Msdyn365.Commerce.Online/./src/modules/content-block-with-selector/content-block-with-selector.tsx?f0bd","webpack://Msdyn365.Commerce.Online/./src/modules/content-block-with-selector/content-block-with-selector.view.tsx?ed0e","webpack://Msdyn365.Commerce.Online/./lib/content-block-with-selector/module-registration.js?7105","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\n/* eslint-disable no-duplicate-imports */\r\nimport { getTelemetryObject, IModuleProps, ITelemetryContent } from '@msdyn365-commerce-modules/utilities';\r\nimport classnames from 'classnames';\r\nimport * as React from 'react';\r\n\r\nimport { IContentBlockWithSelectorProps } from './content-block-with-selector.props.autogenerated';\r\n\r\nexport interface IContentBlockWithSelectorData {}\r\n\r\nexport interface IContentBlockWithSelectorViewProps extends IContentBlockWithSelectorProps {\r\n closeAnimation: string;\r\n container: IModuleProps;\r\n telemetryContent: ITelemetryContent;\r\n}\r\n\r\n/**\r\n *\r\n * ContentBlockWithSelectorModule component.\r\n * @extends {React.PureComponent>}\r\n */\r\nclass ContentBlockWithSelectorModule extends React.PureComponent> {\r\n private readonly telemetryContent: ITelemetryContent;\r\n\r\n constructor(props: IContentBlockWithSelectorProps) {\r\n super(props);\r\n this.telemetryContent = getTelemetryObject(\r\n this.props.context.request.telemetryPageName!,\r\n this.props.friendlyName,\r\n this.props.telemetry\r\n );\r\n }\r\n\r\n public render(): JSX.Element | null {\r\n const { className } = this.props.config;\r\n\r\n const viewProps = {\r\n // Context for telemetry and raw data for C1 to do customization\r\n // Including computed data, state data and methods\r\n ...this.props,\r\n telemetryContent: this.telemetryContent,\r\n container: {\r\n moduleProps: this.props,\r\n className: classnames('content-block-with-selector', className)\r\n }\r\n };\r\n\r\n return this.props.renderView(viewProps) as React.ReactElement;\r\n }\r\n}\r\n\r\nexport default ContentBlockWithSelectorModule;\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\n/* eslint-disable no-duplicate-imports */\r\nimport { Button, Module } from '@msdyn365-commerce-modules/utilities';\r\nimport * as React from 'react';\r\n\r\nimport { IContentBlockWithSelectorViewProps } from './content-block-with-selector';\r\n\r\nconst ContentBlockWithSelectorView: React.FC = props => {\r\n const items = props.slots && props.slots.content && props.slots.content.length > 0 ? props.slots.content : [];\r\n const [currentContent, setCurrentContent] = React.useState(items[0]);\r\n const buttons: JSX.Element[] = [];\r\n\r\n items.forEach(item => {\r\n const itemElement = item as React.ReactElement;\r\n const isActive = itemElement.props.friendlyName === (currentContent as React.ReactElement).props.friendlyName;\r\n\r\n if (itemElement) {\r\n buttons.push(\r\n {\r\n setCurrentContent(itemElement);\r\n }}\r\n >\r\n {itemElement.props.friendlyName}\r\n \r\n );\r\n }\r\n });\r\n\r\n return (\r\n \r\n
{buttons}
\r\n {currentContent}\r\n
\r\n );\r\n};\r\n\r\nexport default ContentBlockWithSelectorView;\r\n","const binding = { modules: {}, dataActions: {} };\n\n (binding.modules['content-block-with-selector'] = {\n c: () => require('partner/modules/content-block-with-selector/content-block-with-selector.tsx'),\n $type: 'containerModule',\n da: [],\n \n iNM: false,\n ns: '__local__',\n n: 'content-block-with-selector',\n p: '__local__',\n \n pdp: '',\n \n \n md: 'src/modules/content-block-with-selector'\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|content-block-with-selector|content-block-with-selector'] = {\n c: () => require('partner/modules/content-block-with-selector/content-block-with-selector.view.tsx'),\n cn: '__local__-__local__-content-block-with-selector'\n };\nwindow.__bindings__ = window.__bindings__ || {};\nwindow.__bindings__.viewDictionary = {\n ...window.__bindings__.viewDictionary || {},\n ...viewDictionary\n };","module.exports = React;","module.exports = ReactDOM;"],"names":["ContentBlockWithSelectorModule","React","constructor","props","super","this","telemetryContent","getTelemetryObject","context","request","telemetryPageName","friendlyName","telemetry","render","className","config","viewProps","_objectSpread","container","moduleProps","classnames","renderView","items","slots","content","length","currentContent","setCurrentContent","buttons","forEach","item","itemElement","isActive","push","Button","onClick","Module","Object","assign","renderModuleAttributes","binding","modules","dataActions","c","require","$type","da","iNM","ns","n","p","pdp","md","window","__bindings__","viewDictionary","cn","module","exports","ReactDOM"],"sourceRoot":""}