{"version":3,"sources":["webpack:///./lib/szf-carousel/module-registration.js?1d31","webpack:///./src/modules/szf-carousel/szf-carousel.view.tsx?d1bb","webpack:///external \"React\"?c481","webpack:///external \"ReactDOM\"?4b2d","webpack:///./src/modules/szf-carousel/szf-carousel.tsx?9774"],"names":["binding","modules","dataActions","c","require","$type","da","iNM","ns","n","p","pdp","md","window","__bindings__","_objectSpread","viewDictionary","cn","retrieveItems","props","items","slots","content","length","CarouselView","React","Module","Object","assign","carouselContainer","renderModuleAttributes","Carousel","className","classnames","closeAnimation","activeIndex","next","previous","pause","config","pauseOnHover","ride","autoplay","undefined","interval","transitionType","hideFlipper","dismissEnabled","onIndicatorsClickHandler","handleDismissCarousel","dismissCarouselAriaText","resources","ariaLabelForDismissButton","indicatorAriaText","ariaLabelForSlide","directionTextPrev","flipperPrevious","directionTextNext","flipperNext","handleOnExited","handleOnExiting","telemetryContent","keyboard","module","exports","ReactDOM","CarouselModule","constructor","state","super","_handleDismissCarousel","this","context","request","cookies","set","id","setState","dismissCarousel","_next","nextIndex","parallaxEffect","imageClassesForParallaxEffect","domBodyElement","document","getElementsByClassName","forEach","Parallaxclass","classList","remove","add","animating","closeNow","_previous","_onExiting","_onExited","_goToIndex","newIndex","getTelemetryObject","telemetryPageName","friendlyName","telemetry","componentDidMount","get","render","viewProps","moduleProps","renderView"],"mappings":";svBAAA,MAAMA,EAAU,CAAEC,QAAS,GAAIC,YAAa,IAEvCF,EAAQC,QAAQ,gBAAkB,CAC/BE,EAAGA,IAAMC,EAAQ,QACjBC,MAAO,kBACPC,GAAI,GAEJC,KAAK,EACLC,GAAI,YACJC,EAAG,eACHC,EAAG,YAEHC,IAAK,GAGLC,GAAI,4BAKRC,OAAOC,aAAeD,OAAOC,cAAgB,GAC7CD,OAAOC,aAAab,QAAOc,IAAA,GACpBF,OAAOC,aAAab,SAAW,IAC/BD,EAAQC,SAGXY,OAAOC,aAAaZ,YAAWa,IAAA,GAC5BF,OAAOC,aAAaZ,aAAe,IACnCF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AW,YAAc,GACpDxD,KAAMmC,KAAKQ,MACX1C,SAAUkC,KAAKsB,UACf7C,yBAA0BuB,KAAKyB,WAC/B/C,sBAAuBsB,KAAKD,uBAC5BX,eAAgBY,KAAKwB,UACrBnC,gBAAiBW,KAAKuB,aAG1B,OAAOvB,KAAKpD,MAAMwF,WAAWF,IAmFtBvC,c","file":"static/js/146.16f65033a7ec31e008ba.chunk.js","sourcesContent":["const binding = { modules: {}, dataActions: {} };\n\n (binding.modules['szf-carousel'] = {\n c: () => require('partner/modules/szf-carousel/szf-carousel.tsx'),\n $type: 'containerModule',\n da: [],\n \n iNM: false,\n ns: '__local__',\n n: 'szf-carousel',\n p: '__local__',\n \n pdp: '',\n \n \n md: 'src/modules/szf-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|szf-carousel|szf-carousel'] = {\n c: () => require('partner/modules/szf-carousel/szf-carousel.view.tsx'),\n cn: '__local__-__local__-szf-carousel'\n };\nwindow.__bindings__ = window.__bindings__ || {};\nwindow.__bindings__.viewDictionary = {\n ...window.__bindings__.viewDictionary || {},\n ...viewDictionary\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 { Carousel } from '@msdyn365-commerce/components';\r\nimport { Module } from '@msdyn365-commerce-modules/utilities';\r\nimport classnames from 'classnames';\r\nimport * as React from 'react';\r\n\r\nimport { ICarouselViewProps } from './szf-carousel';\r\n\r\n/**\r\n * Returns item slots.\r\n * @returns Array of item slots.\r\n * @param props -Props.\r\n */\r\nconst retrieveItems = (props: ICarouselViewProps): React.ReactNode[] => {\r\n let items = [];\r\n items = props.slots && props.slots.content && props.slots.content.length > 0 ? props.slots.content : [];\r\n return items;\r\n};\r\nconst CarouselView: React.FC = props => (\r\n \r\n \r\n \r\n);\r\n\r\nexport default CarouselView;\r\n","module.exports = React;","module.exports = ReactDOM;","/*!\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 { ISzfCarouselData } from './szf-carousel.data';\r\nimport { ISzfCarouselProps } from './szf-carousel.props.autogenerated';\r\nimport { ICarouselState } from './szf-carousel.state';\r\n\r\nexport interface ICarouselViewProps extends ISzfCarouselProps<{}>, ICarouselState {\r\n closeAnimation: string;\r\n carouselContainer: IModuleProps;\r\n telemetryContent: ITelemetryContent;\r\n next(): void;\r\n previous(): void;\r\n onIndicatorsClickHandler(): void;\r\n handleDismissCarousel(): void;\r\n handleOnExited(): void;\r\n handleOnExiting(): void;\r\n}\r\nexport interface contentBlockSlot {\r\n props:{\r\n config:{\r\n className?:string\r\n }\r\n }\r\n}\r\n/**\r\n *\r\n * CarouselModule component.\r\n * @extends {React.PureComponent>}\r\n */\r\nclass CarouselModule extends React.PureComponent, ICarouselState> {\r\n private animating: boolean;\r\n\r\n private readonly telemetryContent: ITelemetryContent;\r\n\r\n constructor(props: ISzfCarouselProps, state: ICarouselState) {\r\n super(props);\r\n this.state = { activeIndex: 0, closeNow: false, dismissCarousel: false };\r\n this.animating = false;\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 componentDidMount(): void {\r\n if (this.props.context && this.props.context.request && this.props.context.request.cookies) {\r\n if (this.props.context.request.cookies.get(`CarouselDismiss_${this.props.id}`) === undefined) {\r\n this.props.context.request.cookies.set(`CarouselDismiss_${this.props.id}`, 'false');\r\n this.setState({ dismissCarousel: false });\r\n }\r\n }\r\n }\r\n\r\n public render(): JSX.Element | null {\r\n if (this.state.dismissCarousel) {\r\n return null;\r\n }\r\n\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 ...this.state,\r\n telemetryContent: this.telemetryContent,\r\n carouselContainer: {\r\n moduleProps: this.props,\r\n className: classnames('ms-carousel', className)\r\n },\r\n closeAnimation: this.state.closeNow ? 'close-now' : '',\r\n next: this._next,\r\n previous: this._previous,\r\n onIndicatorsClickHandler: this._goToIndex,\r\n handleDismissCarousel: this._handleDismissCarousel,\r\n handleOnExited: this._onExited,\r\n handleOnExiting: this._onExiting\r\n };\r\n\r\n return this.props.renderView(viewProps) as React.ReactElement;\r\n }\r\n\r\n /**\r\n * Function implementation to dismiss the Carousel.\r\n */\r\n private readonly _handleDismissCarousel = (): void => {\r\n if (this.props.context && this.props.context.request && this.props.context.request.cookies) {\r\n this.props.context.request.cookies.set(`CarouselDismiss_${this.props.id}`, 'true');\r\n this.setState({ dismissCarousel: true });\r\n }\r\n };\r\n\r\n /**\r\n * Function implementation to move to next slide.\r\n */\r\n private readonly _next = (): void => {\r\n const { slots } = this.props;\r\n const nextIndex = this.state.activeIndex === (slots && slots.content && slots.content.length - 1) ? 0 : this.state.activeIndex + 1;\r\n // const Classes = slots && slots.content && (slots.content.length >0) && slots.content.map((contentBlockslot : React.ReactNode )=>{\r\n // return contentBlockslot && contentBlockslot.props && contentBlockslot.props.config.className\r\n // })\r\n /* VSI | Customization | Start */\r\n const { parallaxEffect, imageClassesForParallaxEffect } = this.props.config;\r\n if(parallaxEffect && imageClassesForParallaxEffect?.length){\r\n const domBodyElement = document.getElementsByClassName('szf_homepage');\r\n imageClassesForParallaxEffect.forEach((Parallaxclass)=>{\r\n domBodyElement[0].classList.remove(Parallaxclass);\r\n });\r\n domBodyElement[0].classList.add(imageClassesForParallaxEffect[nextIndex]);\r\n }\r\n /* VSI | Customization | End */\r\n if (this.animating) {\r\n this.setState({ closeNow: true, activeIndex: nextIndex });\r\n } else {\r\n this.setState({ activeIndex: nextIndex });\r\n }\r\n };\r\n\r\n /**\r\n * Function implementation to move to previous slide.\r\n */\r\n private readonly _previous = (): void => {\r\n const slots = this.props.slots && this.props.slots.content;\r\n const nextIndex = this.state.activeIndex === 0 ? (slots ? slots.length - 1 : 0) : this.state.activeIndex - 1;\r\n /* VSI | Customization | Start */\r\n const { parallaxEffect, imageClassesForParallaxEffect } = this.props.config;\r\n if(parallaxEffect && imageClassesForParallaxEffect?.length){\r\n const domBodyElement = document.getElementsByClassName('szf_homepage');\r\n imageClassesForParallaxEffect.forEach((Parallaxclass)=>{\r\n domBodyElement[0].classList.remove(Parallaxclass);\r\n });\r\n domBodyElement[0].classList.add(imageClassesForParallaxEffect[nextIndex]);\r\n }\r\n /* VSI | Customization | End */\r\n if (this.animating) {\r\n this.setState({ closeNow: true, activeIndex: nextIndex });\r\n } else {\r\n this.setState({ activeIndex: nextIndex });\r\n }\r\n };\r\n\r\n private readonly _onExiting = (): void => {\r\n this.animating = true;\r\n };\r\n\r\n private readonly _onExited = (): void => {\r\n this.animating = false;\r\n this.setState({ closeNow: false });\r\n };\r\n\r\n /**\r\n * Function implementation to move to a given slide.\r\n * @param newIndex\r\n */\r\n private readonly _goToIndex = (newIndex: number): void => {\r\n if (this.animating) {\r\n return;\r\n }\r\n this.setState({ activeIndex: newIndex });\r\n };\r\n}\r\n\r\nexport default CarouselModule;\r\n"],"sourceRoot":""}