{"version":3,"sources":["webpack:///./src/modules/dobbies-top-picks-carousel/dobbies-top-picks-carousel.view.tsx?88e9","webpack:///./src/modules/dobbies-top-picks-carousel/dobbies-top-picks-carousel.props.autogenerated.ts?2d7b","webpack:///./src/modules/dobbies-top-picks-carousel/dobbies-top-picks-carousel.tsx?fc05","webpack:///external \"React\"?c481","webpack:///external \"ReactDOM\"?4b2d","webpack:///./lib/dobbies-top-picks-carousel/module-registration.js?c5c3"],"names":["_renderCarousel","carouselContainer","items","React","Node","Object","map","_renderTile","_renderGrid","gridContainer","tile","TileContainer","Tile","DobbiesTopPicksCarouselView","props","heading","tiles","SingleSlideCarouselComponentProps","GridComponentProps","isCarousel","TileCollectionContainer","className","Module","context","telemetry","error","layout","HeadingTag","DobbiesTopPicksCarousel","constructor","_getTiles","index","this","trace","imageProps","gridSettings","request","imageSettings","image","tileImage","Image","displaytile","actionLink","key","role","title","linkText","href","linkUrl","destinationUrl","ariaLabel","target","openInNewTab","undefined","headingText","imageDescription","tag","render","config","resources","carousel","headingComponent","Heading","headingTag","text","tilesCollectionViewProps","SingleSlideCarousel","flipperPrevLabel","flipperPrevious","flipperNextLabel","flipperNext","parentId","id","moduleProps","classnames","length","item","renderView","module","exports","ReactDOM","binding","modules","dataActions","c","require","$type","da","iNM","ns","n","p","pdp","md","window","__bindings__","viewDictionary","cn"],"mappings":";4IASA,MAkBMA,EAAkB,CAACC,EAA+BC,IAEhDC,gBAACC,OAAIC,iBAAKJ,GACLC,GAASA,EAAMI,IAAIC,IAK1BC,EAAc,CAACC,EAA2BP,IAE3CC,gBAACC,OAAIC,iBAAKI,GACFP,GAASA,EAAMI,IAAIC,IAK1BA,EAAeG,IACjB,MAAM,cAAGC,EAAH,KAAiBC,GAASF,EAEhC,OACEP,gBAACC,OAAIC,iBAAMM,GACNC,IAIIC,UA3C+DC,IAC1E,MAAM,QAAEC,EAAF,MAAWC,EAAX,kCAAkBC,EAAlB,mBAAqDC,EAArD,WAAyEC,EAAzE,wBAAoFC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,qFAAuF,CAC9GZ,EAAG,IAAMC,EAAQ,QACjBY,GAAI,kDAEpBH,OAAOC,aAAeD,OAAOC,cAAgB,GAC7CD,OAAOC,aAAaC,eAApB,OAC2BF,OAAOC,aAAaC,gBAAkB,IACtCA,K","file":"static/js/122.ffaecb6f91741895c0e0.chunk.js","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 { INodeProps,Module, Node } from '@msdyn365-commerce-modules/utilities';\r\nimport * as React from 'react';\r\nimport { IDobbiesTopPicksCarouselViewProps,ITilesViewProps } from './dobbies-top-picks-carousel';\r\n\r\nconst DobbiesTopPicksCarouselView:React.FC=props => {\r\n const { heading, tiles, SingleSlideCarouselComponentProps, GridComponentProps, isCarousel,TileCollectionContainer } = props;\r\n if (tiles) {\r\n return (\r\n
\r\n \r\n {heading}\r\n {\r\n isCarousel ? _renderCarousel(SingleSlideCarouselComponentProps, tiles) : _renderGrid(GridComponentProps, tiles)\r\n }\r\n \r\n
\r\n );\r\n }\r\n props.context.telemetry.error('Tiles Collection is empty, module wont render.');\r\n return null;\r\n};\r\n\r\nconst _renderCarousel = (carouselContainer: INodeProps, items: ITilesViewProps[]): JSX.Element => {\r\n return (\r\n \r\n {items && items.map(_renderTile)}\r\n \r\n );\r\n};\r\n\r\nconst _renderGrid = (gridContainer: INodeProps, items: ITilesViewProps[]): JSX.Element => {\r\n return (\r\n \r\n {items && items.map(_renderTile)}\r\n \r\n );\r\n};\r\n\r\nconst _renderTile = (tile: ITilesViewProps): JSX.Element => {\r\n const { TileContainer,Tile } = tile;\r\n\r\n return (\r\n \r\n {Tile}\r\n \r\n );\r\n};\r\nexport default DobbiesTopPicksCarouselView;","/**\r\n * Copyright (c) Microsoft Corporation\r\n * All rights reserved. See License.txt in the project root for license information.\r\n * IDobbiesTopPicksCarousel contentModule Interface Properties\r\n * THIS FILE IS AUTO-GENERATED - MANUAL MODIFICATIONS WILL BE LOST\r\n */\r\n\r\nimport * as Msdyn365 from '@msdyn365-commerce/core';\r\n\r\nexport const enum layout {\r\n carousel = 'carousel',\r\n grid = 'grid'\r\n}\r\n\r\nexport interface IDobbiesTopPicksCarouselConfig extends Msdyn365.IModuleConfig {\r\n heading?: IHeadingData;\r\n tiles?: ITilesData[];\r\n layout?: layout;\r\n className?: string;\r\n}\r\n\r\nexport interface IDobbiesTopPicksCarouselResources {\r\n flipperNext: string;\r\n flipperPrevious: string;\r\n}\r\n\r\nexport const enum HeadingTag {\r\n h1 = 'h1',\r\n h2 = 'h2',\r\n h3 = 'h3',\r\n h4 = 'h4',\r\n h5 = 'h5',\r\n h6 = 'h6'\r\n}\r\n\r\nexport interface IHeadingData {\r\n text: string;\r\n tag?: HeadingTag;\r\n}\r\n\r\nexport interface ITilesData {\r\n image?: Msdyn365.IImageData;\r\n imageDescription?: string;\r\n headingText?: string;\r\n actionLink?: IActionLinkData;\r\n}\r\n\r\nexport interface IActionLinkData {\r\n linkText?: string;\r\n linkUrl: Msdyn365.ILinkData;\r\n ariaLabel?: string;\r\n openInNewTab?: boolean;\r\n}\r\n\r\nexport interface IDobbiesTopPicksCarouselProps extends Msdyn365.IModule {\r\n resources: IDobbiesTopPicksCarouselResources;\r\n config: IDobbiesTopPicksCarouselConfig;\r\n}\r\n","/*---------------------------------------------------------------------------------------------\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 { Heading, IComponentNodeProps,IModuleProps,INodeProps,ISingleSlideCarouselProps,NodeTag,SingleSlideCarousel } from '@msdyn365-commerce-modules/utilities';\r\nimport {Image} from '@msdyn365-commerce/core';\r\nimport classnames from 'classnames';\r\nimport * as React from 'react';\r\nimport { IDobbiesTopPicksCarouselConfig,IDobbiesTopPicksCarouselProps ,ITilesData,layout} from './dobbies-top-picks-carousel.props.autogenerated';\r\nexport interface IDobbiesTopPicksCarouselViewProps extends IDobbiesTopPicksCarouselProps<{}> {\r\n isCarousel: boolean;\r\n GridComponentProps: INodeProps;\r\n SingleSlideCarouselComponentProps: INodeProps;\r\n heading?: React.ReactNode;\r\n TileCollectionContainer: IModuleProps;\r\n config:IDobbiesTopPicksCarouselConfig;\r\n tiles:ITilesViewProps[];\r\n\r\n}\r\nexport interface ITilesViewProps {\r\n TileContainer: INodeProps;\r\n Tile: React.ReactNode;\r\n}\r\n/**\r\n *\r\n * DobbiesTopPicksCarousel component\r\n */\r\nclass DobbiesTopPicksCarousel extends React.PureComponent> {\r\n public render(): JSX.Element | null {\r\n const { heading, className,tiles } = this.props.config;\r\n const { resources } = this.props;\r\n\r\n const isCarousel = this.props.config.layout === layout.carousel;\r\n const headingComponent = heading && ;\r\n const tilesCollectionViewProps = {\r\n ...this.props,\r\n config:this.props.config,\r\n GridComponentProps: {\r\n tag: 'ul' as NodeTag,\r\n className: 'dobbies-top-picks-carousel__items',\r\n },\r\n isCarousel: isCarousel,\r\n heading: headingComponent,\r\n SingleSlideCarouselComponentProps: {\r\n tag: SingleSlideCarousel,\r\n className: '',\r\n flipperPrevLabel: resources.flipperPrevious,\r\n flipperNextLabel: resources.flipperNext,\r\n parentId: this.props.id\r\n } as IComponentNodeProps,\r\n TileCollectionContainer: {\r\n moduleProps: this.props,\r\n className: classnames('dobbies-top-picks-carousel', className)\r\n },\r\n tiles:tiles &&tiles.length > 0 &&tiles.map((item: ITilesData, index: number) => this._getTiles(item, index)),\r\n };\r\n return this.props.renderView(tilesCollectionViewProps);\r\n }\r\n private _getTiles = (tile:ITilesData, index: number): ITilesViewProps | null => {\r\n if(!tile) {\r\n this.props.telemetry.trace('Dobbies Top Picks Carousel: tile is null');\r\n return null;\r\n }\r\n const imageProps = {\r\n gridSettings: this.props.context.request.gridSettings || {},\r\n imageSettings: tile.image && tile.image.imageSettings\r\n };\r\n const tileImage= tile.image && ;\r\n // if both null show null\r\n // if image null dont display anything\r\n let displaytile;\r\n if(tile.image) {\r\n if(tile.actionLink) { // if anchor null display only image\r\n displaytile=(\r\n \r\n {tileImage}\r\n

{tile.headingText}

\r\n {/* VSI-Customization -- START 22/10/20\r\n Added paragraph for image Description (Config: imageDescription)\r\n */}\r\n

{tile.imageDescription}

\r\n {tile.actionLink.linkText}\r\n {/* VSI-Customization -- END */}\r\n );\r\n } else { // only image\r\n displaytile=tileImage;\r\n }\r\n } else {\r\n displaytile=null;\r\n\r\n }\r\n return {\r\n TileContainer: {\r\n tag: 'li' as NodeTag,\r\n className: 'dobbies-top-picks-carousel__item',\r\n role: 'listitem',\r\n key: index,\r\n },\r\n Tile:displaytile\r\n };\r\n }\r\n}\r\n\r\nexport default DobbiesTopPicksCarousel;\r\n","module.exports = React;","module.exports = ReactDOM;","const binding = { modules: {}, dataActions: {} };\n\n (binding.modules['dobbies-top-picks-carousel'] = {\n c: () => require('partner/modules/dobbies-top-picks-carousel/dobbies-top-picks-carousel.tsx'),\n $type: 'contentModule',\n da: [],\n \n iNM: false,\n ns: '__local__',\n n: 'dobbies-top-picks-carousel',\n p: '__local__',\n \n pdp: '',\n \n \n md: 'src/modules/dobbies-top-picks-carousel'\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|dobbies-top-picks-carousel|dobbies-top-picks-carousel'] = {\n c: () => require('partner/modules/dobbies-top-picks-carousel/dobbies-top-picks-carousel.view.tsx'),\n cn: '__local__-__local__-dobbies-top-picks-carousel'\n };\nwindow.__bindings__ = window.__bindings__ || {};\nwindow.__bindings__.viewDictionary = {\n ...window.__bindings__.viewDictionary || {},\n ...viewDictionary\n };"],"sourceRoot":""}