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AAAA,EAAA,GACpB4C,OAAOC,aAAab,SAAW,IAC/BD,EAAQC,SAGXY,OAAOC,aAAaZ,YAAWjC,EAAAA,EAAA,GAC5B4C,OAAOC,aAAaZ,aAAe,IACnCF,EAAQE,aAEY,MAAMa,EAAiB,GAC9BA,EAAe,uGAAyG,CAChIZ,EAAGA,IAAMC,EAAQ,MACjBY,GAAI,2DAEpBH,OAAOC,aAAeD,OAAOC,cAAgB,GAC7CD,OAAOC,aAAaC,eAAc9C,EAAAA,EAAA,GACP4C,OAAOC,aAAaC,gBAAkB,IACtCA,I,MCtC3BE,EAAOC,QAAU1E,O,OCAjByE,EAAOC,QAAUC,W","sources":["webpack://Msdyn365.Commerce.Online/./src/modules/moe-tile-list-item-description-only/moe-tile-list-item-description-only.tsx?e825","webpack://Msdyn365.Commerce.Online/./src/modules/moe-tile-list-item-description-only/moe-tile-list-item-description-only.view.tsx?ba94","webpack://Msdyn365.Commerce.Online/./lib/moe-tile-list-item-description-only/module-registration.js?c34f","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 * See License.txt in the project root for license information.\r\n *--------------------------------------------------------------*/\r\n\r\n/* eslint-disable no-duplicate-imports */\r\nimport * as Msdyn365 from '@msdyn365-commerce/core';\r\nimport { StringExtensions } from '@msdyn365-commerce-modules/retail-actions';\r\nimport { IModuleProps, INodeProps, NodeTag } from '@msdyn365-commerce-modules/utilities';\r\nimport * as React from 'react';\r\n\r\nimport { IHeadingData, IMoeTileListItemDescriptionOnlyProps } from './moe-tile-list-item-description-only.props.autogenerated';\r\n\r\n/**\r\n * Tile-list-item view props.\r\n */\r\nexport interface ITileListItemViewProps extends IMoeTileListItemDescriptionOnlyProps<{}> {\r\n heading?: React.ReactNode;\r\n paragraph?: React.ReactNode;\r\n links?: React.ReactNode;\r\n backgroundImage?: React.ReactNode;\r\n thumbnailImage?: React.ReactNode;\r\n tileListItem: IModuleProps;\r\n tileListContainer: INodeProps;\r\n tileListImageContainer: INodeProps;\r\n tileListThumbnailImageContainer: INodeProps;\r\n tileListHeadingContainer: INodeProps;\r\n}\r\n\r\n/**\r\n *\r\n * TileListItem component.\r\n * @extends {React.PureComponent>}\r\n */\r\nexport class TileListItem extends React.PureComponent> {\r\n public constructor(props: IMoeTileListItemDescriptionOnlyProps<{}>) {\r\n super(props);\r\n }\r\n\r\n public render(): JSX.Element {\r\n const { heading, paragraph, redirectionUrl } = this.props.config;\r\n\r\n const tileListLinkContainer = {\r\n tag: 'a' as NodeTag,\r\n className: 'ms-tile-list-container',\r\n role: 'link',\r\n href: redirectionUrl?.linkUrl.destinationUrl,\r\n 'aria-label': redirectionUrl?.ariaLabel\r\n };\r\n\r\n const tileListButtonContainer = {\r\n tag: 'button' as NodeTag,\r\n className: 'ms-tile-list-container'\r\n };\r\n const viewProps: ITileListItemViewProps = {\r\n ...this.props,\r\n heading: this._createHeading(heading),\r\n paragraph: this._createParagraph(paragraph),\r\n tileListItem: {\r\n moduleProps: this.props,\r\n className: 'ms-tile-list-item-container'\r\n },\r\n tileListContainer: redirectionUrl ? tileListLinkContainer : tileListButtonContainer,\r\n tileListImageContainer: {\r\n className: 'ms-tile-list__image'\r\n },\r\n tileListThumbnailImageContainer: {\r\n className: 'ms-tile-list__thumbnail_image'\r\n },\r\n tileListHeadingContainer: {\r\n className: 'ms-tile-list__heading ms-tile-list_main_header'\r\n }\r\n };\r\n\r\n return this.props.renderView(viewProps) as React.ReactElement;\r\n }\r\n\r\n /**\r\n * Handles heading content change event.\r\n * @param event - Content editable event.\r\n */\r\n public handleHeadingChange = (event: Msdyn365.ContentEditableEvent): void => {\r\n this.props.config.heading!.text = event.target.value;\r\n };\r\n\r\n /**\r\n * Handles paragraph content change event.\r\n * @param event - Content editable event.\r\n */\r\n public handleParagraphChange = (event: Msdyn365.ContentEditableEvent): void => {\r\n this.props.config.paragraph = event.target.value;\r\n };\r\n\r\n /**\r\n * Handles paragraph content change event.\r\n * @param linkIndex - Index of link in linkarray.\r\n * @returns Void.\r\n */\r\n\r\n private _createParagraph(text?: Msdyn365.RichText): React.ReactNode | null {\r\n if (!text) {\r\n return null;\r\n }\r\n return (\r\n
\r\n 180 ? `${text?.substring(0, 177)}...` : text}\r\n className='ms-tile-list__text'\r\n editProps={{ onEdit: this.handleParagraphChange, requestContext: this.props.context.request }}\r\n />\r\n
\r\n );\r\n }\r\n\r\n private _createHeading(heading?: IHeadingData): React.ReactNode | null {\r\n if (!heading) {\r\n return null;\r\n }\r\n if (StringExtensions.isNullOrWhitespace(heading.text)) {\r\n return null;\r\n }\r\n\r\n const text: string = heading.text.length > 50 ? `${heading.text?.substring(0, 50)}...` : heading.text;\r\n\r\n return (\r\n \r\n );\r\n }\r\n}\r\n\r\nexport default TileListItem;\r\n","/*--------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * See License.txt in the project root for license information.\r\n *--------------------------------------------------------------*/\r\n\r\n/* eslint-disable no-duplicate-imports */\r\nimport { Module, Node } from '@msdyn365-commerce-modules/utilities';\r\nimport * as React from 'react';\r\n\r\nimport { ITileListItemViewProps } from './moe-tile-list-item-description-only';\r\nimport { BiRightArrowAlt } from 'react-icons/bi';\r\n\r\n/**\r\n *\r\n * ITileListItemViewProps component.\r\n * @param props - Component props.\r\n * @returns TileListView.\r\n */\r\nconst renderTileListItemContent = (props: ITileListItemViewProps): JSX.Element => {\r\n const { heading, paragraph, tileListContainer, tileListHeadingContainer } = props;\r\n\r\n return (\r\n
\r\n \r\n \r\n {heading}\r\n {paragraph}\r\n \r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n );\r\n};\r\n\r\n/**\r\n *\r\n * TileListItemViewProps component.\r\n * @param props - Component props.\r\n * @returns TileListView.\r\n */\r\nexport const TileListItemViewComponent: React.FC = props => {\r\n const { tileListItem } = props;\r\n return {renderTileListItemContent(props)};\r\n};\r\n\r\nexport default TileListItemViewComponent;\r\n","const binding = { modules: {}, dataActions: {} };\n\n (binding.modules['moe-tile-list-item-description-only'] = {\n c: () => require('partner/modules/moe-tile-list-item-description-only/moe-tile-list-item-description-only.tsx'),\n $type: 'contentModule',\n da: [],\n \n iNM: false,\n ns: '__local__',\n n: 'moe-tile-list-item-description-only',\n p: '__local__',\n \n pdp: '',\n \n \n md: 'src/modules/moe-tile-list-item-description-only'\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|moe-tile-list-item-description-only|moe-tile-list-item-description-only'] = {\n c: () => require('partner/modules/moe-tile-list-item-description-only/moe-tile-list-item-description-only.view.tsx'),\n cn: '__local__-__local__-moe-tile-list-item-description-only'\n };\nwindow.__bindings__ = window.__bindings__ || {};\nwindow.__bindings__.viewDictionary = {\n ...window.__bindings__.viewDictionary || {},\n ...viewDictionary\n };","module.exports = React;","module.exports = ReactDOM;"],"names":["TileListItem","React","constructor","props","super","handleHeadingChange","event","this","config","heading","text","target","value","handleParagraphChange","paragraph","render","redirectionUrl","tileListLinkContainer","tag","className","role","href","linkUrl","destinationUrl","ariaLabel","viewProps","_objectSpread","_createHeading","_createParagraph","tileListItem","moduleProps","tileListContainer","tileListImageContainer","tileListThumbnailImageContainer","tileListHeadingContainer","renderView","tabIndex","Msdyn365","length","substring","editProps","onEdit","requestContext","context","request","_heading$text","_heading$tag","StringExtensions","isNullOrWhitespace","TileListItemViewComponent","Module","Object","assign","Node","BiRightArrowAlt","size","renderTileListItemContent","binding","modules","dataActions","c","require","$type","da","iNM","ns","n","p","pdp","md","window","__bindings__","viewDictionary","cn","module","exports","ReactDOM"],"sourceRoot":""}