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,GAC1B,MAAO,CACLhF,aAAc,SAACiF,GACb,OAAOD,GAASE,EAAAA,EAAAA,IAAmBD,KAErC3E,oBAAqB,WACnB,OAAO0E,GAASG,EAAAA,EAAAA,QAElB9E,gBAAiB,SAAC+E,GAChB,OAAOJ,GAASK,EAAAA,EAAAA,IAAsBD,KAExCE,wBAAyB,SAACC,GACxB,OAAOP,GAASQ,EAAAA,EAAAA,IAA8BD,KAEhDhF,yBAA0B,SAACkF,GACzB,OAAOT,GAASU,EAAAA,EAAAA,IAAiCD,KAEnDhF,yBAA0B,SAACsE,GACzB,OAAOC,GAASW,EAAAA,EAAAA,IAA+BZ,KAEjDvE,2BAA4B,SAACiF,GAC3B,OAAOT,GAASY,EAAAA,EAAAA,IAAiCH,QAoUvD,CAGEhG","sources":["webpack://dfl-ipp-website/./src/pages/whats-new.tsx"],"sourcesContent":["/**\n * What's New page\n * Based on Products page\n *\n */\n\n// IMPORTS\nimport React from \"react\";\nimport {graphql} from \"gatsby\";\nimport {Dispatch} from \"redux\";\nimport {connect} from \"react-redux\";\nimport styled from \"styled-components\";\nimport moment from \"moment\";\nimport {\n SEO,\n GlobalStyle,\n NavigationHeader,\n ConsentBanner,\n ProductHeader,\n ProductIntro,\n ContentBlock,\n ContactListWithQuery,\n} from \"../components\";\nimport {\n DflRegionType,\n dflRegions,\n NavigationOverlayStateType,\n elementSizes,\n ElementWrapper,\n MobileVisualWrapper,\n FullWidthImage,\n DesktopIntro,\n MobileIntro,\n MobileCaption,\n MobileTitle,\n MobileIntroText,\n WhatsNewPageResponseProps,\n whatsNewContainerTypes,\n MainContentWrapper,\n FooterWrapper,\n} from \"../models\";\n\nimport {getDflRegionByTimezone} from \"../util/util\";\n\nimport {AppState} from \"../store/\";\nimport {\n setTimezoneDetectedAction,\n updateRegionAction,\n updateNavigationOverlayAction,\n updateIsNavigationInvertedAction,\n updateIsNavigationHiddenAction,\n updateUTCOffsetAction,\n updateIsHomepageAboveVideoAction,\n} from \"../store/system/actions\";\n\n// COMPONENT PROPERTIES\ninterface PropsFromState {\n selectedRegion: DflRegionType;\n timezoneDetected: boolean;\n isNavigationHidden: boolean;\n screenWidth: number;\n}\n\nconst mapStateToProps = (state: AppState): PropsFromState => ({\n selectedRegion: state.system.selectedRegion,\n timezoneDetected: state.system.timezoneDetected,\n isNavigationHidden: state.system.isNavigationHidden,\n screenWidth: state.system.screenWidth,\n});\n\ninterface PropsFromDispatch {\n updateRegion: (region: DflRegionType) => void;\n setTimezoneDetected: () => void;\n updateUTCOffset: (newOffset: number) => void;\n updateNavigationOverlay: (newState: NavigationOverlayStateType) => void;\n updateNavigationInverted: (isInverted: boolean) => void;\n updateIsNavigationHidden: (isNavigationHidden: boolean) => void;\n updateIsHomepageAboveVideo: (isInverted: boolean) => void;\n}\nconst mapDispatchToProps = (dispatch: Dispatch): PropsFromDispatch => {\n return {\n updateRegion: (region: DflRegionType) => {\n return dispatch(updateRegionAction(region));\n },\n setTimezoneDetected: () => {\n return dispatch(setTimezoneDetectedAction());\n },\n updateUTCOffset: (newOffset: number) => {\n return dispatch(updateUTCOffsetAction(newOffset));\n },\n updateNavigationOverlay: (newState: NavigationOverlayStateType) => {\n return dispatch(updateNavigationOverlayAction(newState));\n },\n updateNavigationInverted: (isInverted: boolean) => {\n return dispatch(updateIsNavigationInvertedAction(isInverted));\n },\n updateIsNavigationHidden: (isNavigationHidden: boolean) => {\n return dispatch(updateIsNavigationHiddenAction(isNavigationHidden));\n },\n updateIsHomepageAboveVideo: (isInverted: boolean) => {\n return dispatch(updateIsHomepageAboveVideoAction(isInverted));\n },\n };\n};\n\n// STYLES\nconst PageWrapper = styled.div`\n height: 100vh;\n overflow: visible;\n`;\n\ninterface WhatsNewPageProps extends PropsFromState, PropsFromDispatch {\n data: WhatsNewPageResponseProps;\n}\nclass WhatsNewPage extends React.Component {\n constructor(props: WhatsNewPageProps) {\n super(props);\n }\n\n // Product category page initialization\n componentDidMount() {\n // get Timezone and utc offset once\n if (!this.props.timezoneDetected) {\n const dflRegion = getDflRegionByTimezone();\n this.props.updateRegion(dflRegion);\n if (moment && moment().utcOffset() !== null) {\n // ignore daylight savings time\n const isDayLightSavings = moment().isDST();\n const dayLightSavingsOffset = isDayLightSavings ? 1 : 0;\n this.props.updateUTCOffset(moment().utcOffset() / 60 - dayLightSavingsOffset);\n }\n this.props.setTimezoneDetected();\n }\n\n // set navigation to black (could be inverted, coming from landing page)\n this.props.updateNavigationInverted(false);\n this.props.updateIsHomepageAboveVideo(false);\n\n // unhide the menu if it is hidden\n this.props.updateIsNavigationHidden(false);\n }\n\n render() {\n const {data, selectedRegion, screenWidth} = this.props;\n const wp = data.wpPost.whats_new_content;\n\n let name;\n let description;\n let introImage;\n let introImageSize;\n let introText;\n\n switch (selectedRegion) {\n case dflRegions.americas:\n name = wp.americasContent[0].americasContentCloneName;\n description = wp.americasContent[0].americasContentCloneDescription;\n introImage = wp.americasContent[0].americasContentCloneIntroImage.sourceUrl;\n introImageSize = wp.americasContent[0].americasContentCloneIntroImageSize;\n introText = wp.americasContent[0].americasContentCloneIntroText;\n break;\n case dflRegions.asia:\n name = wp.asiaContent[0].asiaContentCloneName;\n description = wp.asiaContent[0].asiaContentCloneDescription;\n introImage = wp.asiaContent[0].asiaContentCloneIntroImage.sourceUrl;\n introImageSize = wp.asiaContent[0].asiaContentCloneIntroImageSize;\n introText = wp.asiaContent[0].asiaContentCloneIntroText;\n break;\n\n case dflRegions.emea:\n default:\n name = wp.emeaContent[0].emeaContentCloneName;\n description = wp.emeaContent[0].emeaContentCloneDescription;\n introImage = wp.emeaContent[0].emeaContentCloneIntroImage.sourceUrl;\n introImageSize = wp.emeaContent[0].emeaContentCloneIntroImageSize;\n introText = wp.emeaContent[0].emeaContentCloneIntroText;\n }\n\n const {\n emeaFlexibleContent,\n americasFlexibleContent,\n asiaFlexibleContent,\n } = wp;\n\n return (\n \n \n {/* @ts-ignore */}\n \n \n \n\n \n \n \n \n \n\n \n \n \n \n\n \n \n \n \n {name}\n {description}\n {introText}\n \n {\n /**\n * Dadurch das die neue API keinen \"__typename\" zurückgibt muss dies anders entschieden werden.\n * Splittet \"post_WhatsNewContent_EmeaFlexibleContent_ContentWithVideo\" an den \"_\"\n * wählt das letzte Element aus (\"ContentWithVideo\") und entscheidet dann ob es ein Video oder Image ist.\n */\n }\n {selectedRegion === dflRegions.emea &&\n emeaFlexibleContent.map((content, i) => {\n const fieldType = content.fieldGroupName.split(/[\\s_]+/);\n const type = fieldType[fieldType.length-1] === whatsNewContainerTypes.contentWithImage ? \"image\" : \"video\";\n return (\n // @ts-ignore\n \n );\n })}\n\n {selectedRegion === dflRegions.americas &&\n americasFlexibleContent.map((content, i) => {\n const fieldType = content.fieldGroupName.split(/[\\s_]+/);\n const type = fieldType[fieldType.length-1] === whatsNewContainerTypes.contentWithImage ? \"image\" : \"video\";\n return (\n // @ts-ignore\n \n );\n })}\n\n {selectedRegion === dflRegions.asia &&\n asiaFlexibleContent.map((content, i) => {\n const fieldType = content.fieldGroupName.split(/[\\s_]+/);\n const type = fieldType[fieldType.length-1] === whatsNewContainerTypes.contentWithImage ? \"image\" : \"video\";\n return (\n // @ts-ignore\n \n );\n })}\n\n \n \n \n \n \n );\n }\n}\n\nexport const query = graphql`\n query ($id: Int = 1272) {\n wpPost(databaseId: {eq: $id}) {\n whats_new_content {\n emeaContent {\n emeaContentCloneName\n emeaContentCloneDescription\n emeaContentCloneIntroText\n emeaContentCloneIntroImage {\n sourceUrl\n }\n emeaContentCloneIntroImageSize\n }\n emeaFlexibleContent {\n ... on WpPost_WhatsNewContent_EmeaFlexibleContent_ContentWithImage {\n fieldGroupName\n description\n heading\n layout\n imageSize\n imageEmea {\n sourceUrl\n }\n links {\n label\n link {\n url\n }\n }\n }\n ... on WpPost_WhatsNewContent_EmeaFlexibleContent_ContentWithVideo {\n fieldGroupName\n description\n heading\n layout\n links {\n label\n link {\n url\n }\n }\n videoEmeaId\n videoSize\n }\n }\n americasContent {\n americasContentCloneName\n americasContentCloneDescription\n americasContentCloneIntroText\n americasContentCloneIntroImage {\n sourceUrl\n }\n americasContentCloneIntroImageSize\n }\n americasFlexibleContent {\n ... on WpPost_WhatsNewContent_AmericasFlexibleContent_ContentWithImage {\n fieldGroupName\n heading\n description\n layout\n links {\n label\n link {\n url\n }\n }\n imageSize\n imageAmericas {\n sourceUrl\n }\n }\n ... on WpPost_WhatsNewContent_AmericasFlexibleContent_ContentWithVideo {\n fieldGroupName\n heading\n description\n layout\n links {\n label\n link {\n url\n }\n }\n videoAmericasId\n videoSize\n }\n }\n asiaContent {\n asiaContentCloneName\n asiaContentCloneDescription\n asiaContentCloneIntroText\n asiaContentCloneIntroImage {\n sourceUrl\n }\n asiaContentCloneIntroImageSize\n }\n asiaFlexibleContent {\n ... on WpPost_WhatsNewContent_AsiaFlexibleContent_ContentWithImage {\n fieldGroupName\n heading\n description\n layout\n links {\n label\n link {\n url\n }\n }\n imageAsia {\n sourceUrl\n }\n imageSize\n }\n ... on WpPost_WhatsNewContent_AsiaFlexibleContent_ContentWithVideo {\n fieldGroupName\n heading\n description\n layout\n links {\n label\n link {\n url\n }\n }\n videoAsiaId\n videoSize\n }\n }\n }\n }\n}\n`;\n\nexport default connect(\n mapStateToProps,\n mapDispatchToProps,\n)(WhatsNewPage);\n"],"names":["PageWrapper","styled","WhatsNewPage","props","componentDidMount","this","timezoneDetected","dflRegion","getDflRegionByTimezone","updateRegion","moment","utcOffset","dayLightSavingsOffset","isDST","updateUTCOffset","setTimezoneDetected","updateNavigationInverted","updateIsHomepageAboveVideo","updateIsNavigationHidden","render","name","description","introImage","introImageSize","introText","data","selectedRegion","screenWidth","wp","wpPost","whats_new_content","dflRegions","americasContent","americasContentCloneName","americasContentCloneDescription","americasContentCloneIntroImage","sourceUrl","americasContentCloneIntroImageSize","americasContentCloneIntroText","asiaContent","asiaContentCloneName","asiaContentCloneDescription","asiaContentCloneIntroImage","asiaContentCloneIntroImageSize","asiaContentCloneIntroText","emeaContent","emeaContentCloneName","emeaContentCloneDescription","emeaContentCloneIntroImage","emeaContentCloneIntroImageSize","emeaContentCloneIntroText","emeaFlexibleContent","americasFlexibleContent","asiaFlexibleContent","isTextDark","title","style","marginTop","elementSizes","caption","imageSize","text","image","visualWidth","src","map","content","i","fieldType","fieldGroupName","split","type","length","whatsNewContainerTypes","key","imageUrl","imageEmea","videoId","videoEmeaId","videoSize","imageAmericas","videoAmericasId","imageAsia","videoAsiaId","React","connect","state","system","isNavigationHidden","dispatch","region","updateRegionAction","setTimezoneDetectedAction","newOffset","updateUTCOffsetAction","updateNavigationOverlay","newState","updateNavigationOverlayAction","isInverted","updateIsNavigationInvertedAction","updateIsNavigationHiddenAction","updateIsHomepageAboveVideoAction"],"sourceRoot":""}