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GAA4BvD,EACvH,OAAImC,EAEIzC,EAAAA,cAAA,OAAKiC,UAAU,aACXjC,EAAAA,cAAC2E,EAAAA,OAAM1D,OAAAC,OAAA,GAAK2C,GACPrB,EACAI,EAAawB,EAAgBf,EAAmCZ,GAASgC,EAAYrB,EAAoBX,MAK1HnC,EAAMK,QAAQJ,UAAUqE,MAAM,kDACvB,4mBCtBX,MAAMC,EAAU,CAAEC,QAAS,GAAIC,YAAa,IAEvCF,EAAQC,QAAQ,8BAAgC,CAC7CE,EAAGA,IAAMC,EAAQ,MACjBC,MAAO,gBACPC,GAAI,GAEJC,KAAK,EACLC,GAAI,YACJC,EAAG,6BACHC,EAAG,YAEHC,IAAK,GAGLC,GAAI,0CAKRC,OAAOC,aAAeD,OAAOC,cAAgB,GAC7CD,OAAOC,aAAab,QAAO3B,EAAAA,EAAA,GACpBuC,OAAOC,aAAab,SAAW,IAC/BD,EAAQC,SAGXY,OAAOC,aAAaZ,YAAW5B,EAAAA,EAAA,GAC5BuC,OAAOC,aAAaZ,aAAe,IACnCF,EAAQE,aAEY,MAAMa,EAAiB,GAC9BA,EAAe,qFAAuF,CAC9GZ,EAAGA,IAAMC,EAAQ,MACjBY,GAAI,kDAEpBH,OAAOC,aAAeD,OAAOC,cAAgB,GAC7CD,OAAOC,aAAaC,eAAczC,EAAAA,EAAA,GACPuC,OAAOC,aAAaC,gBAAkB,IACtCA,UCtC3BE,EAAOC,QAAU/F,cCAjB8F,EAAOC,QAAUC","sources":["webpack://Dobbies.Commerce/./src/modules/dobbies-top-picks-carousel/dobbies-top-picks-carousel.props.autogenerated.ts?fbba","webpack://Dobbies.Commerce/./src/modules/dobbies-top-picks-carousel/dobbies-top-picks-carousel.tsx?068d","webpack://Dobbies.Commerce/./src/modules/dobbies-top-picks-carousel/dobbies-top-picks-carousel.view.tsx?e532","webpack://Dobbies.Commerce/./lib/dobbies-top-picks-carousel/module-registration.js?c5c3","webpack://Dobbies.Commerce/external var \"React\"?0d3b","webpack://Dobbies.Commerce/external var \"ReactDOM\"?853b"],"sourcesContent":["/**\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 {\r\n Heading,\r\n IComponentNodeProps,\r\n IModuleProps,\r\n INodeProps,\r\n ISingleSlideCarouselProps,\r\n NodeTag,\r\n SingleSlideCarousel\r\n} 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 {\r\n IDobbiesTopPicksCarouselConfig,\r\n IDobbiesTopPicksCarouselProps,\r\n ITilesData,\r\n layout\r\n} 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\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 \r\n );\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) {\r\n // 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 );\r\n } else {\r\n // only image\r\n displaytile = tileImage;\r\n }\r\n } else {\r\n displaytile = null;\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","/*!\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 {isCarousel ? _renderCarousel(SingleSlideCarouselComponentProps, tiles) : _renderGrid(GridComponentProps, tiles)}\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 {items && items.map(_renderTile)};\r\n};\r\n\r\nconst _renderGrid = (gridContainer: INodeProps, items: ITilesViewProps[]): JSX.Element => {\r\n return {items && items.map(_renderTile)};\r\n};\r\n\r\nconst _renderTile = (tile: ITilesViewProps): JSX.Element => {\r\n const { TileContainer, Tile } = tile;\r\n\r\n return {Tile};\r\n};\r\nexport default DobbiesTopPicksCarouselView;\r\n","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 };","module.exports = React;","module.exports = ReactDOM;"],"names":["layout","HeadingTag","DobbiesTopPicksCarousel","React","constructor","_getTiles","tile","index","this","props","telemetry","trace","imageProps","gridSettings","context","request","imageSettings","image","tileImage","Image","Object","assign","displaytile","actionLink","key","role","title","linkText","href","linkUrl","destinationUrl","ariaLabel","target","openInNewTab","undefined","rel","className","headingText","imageDescription","TileContainer","tag","Tile","render","heading","tiles","config","resources","isCarousel","carousel","headingComponent","Heading","headingTag","text","tilesCollectionViewProps","_objectSpread","GridComponentProps","SingleSlideCarouselComponentProps","SingleSlideCarousel","flipperPrevLabel","flipperPrevious","flipperNextLabel","flipperNext","parentId","id","TileCollectionContainer","moduleProps","classnames","length","map","item","renderView","_renderCarousel","carouselContainer","items","Node","_renderTile","_renderGrid","gridContainer","Module","error","binding","modules","dataActions","c","require","$type","da","iNM","ns","n","p","pdp","md","window","__bindings__","viewDictionary","cn","module","exports","ReactDOM"],"sourceRoot":""}