{"version":3,"sources":["webpack:///src/modules/footer-category/footer-category.tsx?b7b8","webpack:///./src/themes/dobbiesclub/views/footer-category.view.tsx?dae4","webpack:///src/modules/footer-category/footer-category.view.tsx?26a5","webpack:///external \"React\"?c481","webpack:///./lib/footer-category/module-registration.js?7500","webpack:///external \"ReactDOM\"?4b2d","webpack:///./src/themes/dobbies/views/footer-category.view.tsx?d844"],"names":["FooterCategory","React","render","this","props","slots","content","length","context","telemetry","error","viewprops","categories","FooterList","moduleProps","className","classnames","config","tag","FooterListItem","renderView","FooterCategoryView","isOpen","setIsOpen","useState","isMobile","setIsMobile","collapseItems","useEffect","setMobileView","window","addThrottledEvent","_isMobile","isMobileView","_collapse","Fragment","Module","Object","Node","onClick","event","Collapse","timeout","map","category","index","key","undefined","innerWidth","gridSettings","request","xs","w","sm","md","lg","module","exports","binding","modules","dataActions","c","require","$type","da","iNM","ns","n","p","pdp","__bindings__","viewDictionary","cn","ReactDOM","query","onlyBody"],"mappings":"wuBAsBA,MAAMA,UAAuBC,gBAClBC,SACH,IAAKC,KAAKC,MAAMC,QAAUF,KAAKC,MAAMC,MAAMC,SAA+C,IAApCH,KAAKC,MAAMC,MAAMC,QAAQC,OAE3E,OADAJ,KAAKC,MAAMI,QAAQC,UAAUC,MAAM,qDAC5B,KAEX,MAAMC,EAAS,OACRR,KAAKC,OADG,IAEXQ,WAAYT,KAAKC,MAAMC,MAAMC,QAC7BO,WAAY,CACRC,YAAaX,KAAKC,MAClBW,UAAWC,IAAW,kBAAmBb,KAAKC,MAAMa,OAAOF,WAC3DG,IAAK,MAETC,eAAgB,CACZJ,UAAWC,IAAW,uBAAwBb,KAAKC,MAAMa,OAAOF,WAChEG,IAAK,QAIb,OAAOf,KAAKC,MAAMgB,WAAWT,IAItBX,a,0KCjCR,MAAMqB,EAAoFjB,IAG7F,MAAOkB,EAAQC,GAAaC,oBAAS,IAC9BC,EAAUC,GAAeF,oBAAS,IAEnC,WAAEZ,EAAF,WAAcC,EAAd,eAA0BM,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e689a757427379e42073.chunk.js","sourcesContent":["/*--------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * See License.txt in the project root for license information.\n *--------------------------------------------------------------*/\n\nimport { IModuleProps, INodeProps } from '@msdyn365-commerce-modules/utilities';\nimport classnames from 'classnames';\nimport * as React from 'react';\n\nimport { IFooterCategoryConfig, IFooterCategoryProps } from './footer-category.props.autogenerated';\n\nexport interface IFooterCategoryViewProps extends IFooterCategoryProps {\n categories: React.ReactNode[];\n FooterList: IModuleProps;\n FooterListItem: INodeProps;\n}\n\n/**\n *\n * FooterCategory component.\n * @extends {React.PureComponent>}\n */\nclass FooterCategory extends React.PureComponent> {\n public render(): JSX.Element | null {\n if (!this.props.slots || !this.props.slots.content || this.props.slots.content.length === 0) {\n this.props.context.telemetry.error('footer slots content is empty, module wont render');\n return null;\n }\n const viewprops = {\n ...this.props,\n categories: this.props.slots.content,\n FooterList: {\n moduleProps: this.props,\n className: classnames('ms-footer__list', this.props.config.className),\n tag: 'ul'\n },\n FooterListItem: {\n className: classnames('ms-footer__list-item', this.props.config.className),\n tag: 'li'\n }\n };\n\n return this.props.renderView(viewprops) as React.ReactElement;\n }\n}\n\nexport default FooterCategory;\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 { IFooterCategoryViewProps } from '@msdyn365-commerce-modules/footer/src/modules/footer-category/./footer-category';\r\nimport { addThrottledEvent, Collapse, Module, Node } from '@msdyn365-commerce-modules/utilities';\r\nimport { ICoreContext } from '@msdyn365-commerce/core';\r\nimport React, { ReactNode, useEffect, useState } from 'react';\r\n\r\nimport classnames from 'classnames';\r\nimport { IFooterCategoryProps } from '../definition-extensions/footer-category.ext.props.autogenerated';\r\n\r\nexport const FooterCategoryView: React.FC> = props => {\r\n /* VSI Customization - START */\r\n /* isOpen shows if a collapse is open or not */\r\n const [isOpen, setIsOpen] = useState(false);\r\n const [isMobile, setIsMobile] = useState(false);\r\n /* VSI Customization - END */\r\n const { categories, FooterList, FooterListItem, config: { collapseItems } } = props;\r\n if (!categories || !categories.length) {\r\n props.context.telemetry.error('Footer content is empty, module wont render');\r\n return null;\r\n }\r\n /* VSI Customization - START */\r\n /* useEffect will update footer according to device type */\r\n useEffect(() => {\r\n setMobileView();\r\n window && addThrottledEvent(window, 'resize', setMobileView);\r\n });\r\n\r\n const setMobileView = () => {\r\n const _isMobile = isMobileView(props.context);\r\n setIsMobile(_isMobile);\r\n };\r\n /* Click on collapse will toggle it */\r\n const _handleCollapse = (event: MouseEvent) => {\r\n setIsOpen(!isOpen);\r\n };\r\n /* collapse will only be shown on mobile */\r\n let _collapse = isMobile ? true : false;\r\n /* On mobile, category with Collapse value false will not be shown as collapse */\r\n if (_collapse) {\r\n _collapse = collapseItems === false ? false : true;\r\n }\r\n /* VSI Customization - END */\r\n return (\r\n \r\n {/* VSI Customization - START */}\r\n {_collapse ?\r\n \r\n \r\n {categories[0]}\r\n \r\n \r\n {categories.map((category: ReactNode, index: number) => {\r\n if (index > 0) {\r\n return (\r\n \r\n {category}\r\n \r\n );\r\n }\r\n return null;\r\n })\r\n }\r\n \r\n :\r\n \r\n {categories.map((category: ReactNode, index: number) => {\r\n return (\r\n \r\n {category}\r\n \r\n );\r\n })\r\n }\r\n \r\n }\r\n {/* VSI Customization - END */}\r\n \r\n );\r\n};\r\n\r\n/* VSI Customization - START */\r\nconst isMobileView = (context: ICoreContext): boolean => {\r\n if (typeof window !== undefined && window.innerWidth) {\r\n const gridSettings = context.request.gridSettings;\r\n if (gridSettings) {\r\n if (gridSettings.xs && window.innerWidth < gridSettings.xs.w) {\r\n return true;\r\n } else if (gridSettings.sm && window.innerWidth < gridSettings.sm.w) {\r\n return true;\r\n } else if (gridSettings.md && window.innerWidth <= gridSettings.md.w) {\r\n return false;\r\n } else if (gridSettings.lg && window.innerWidth <= gridSettings.lg.w) {\r\n return false;\r\n } else {\r\n return false;\r\n }\r\n }\r\n }\r\n\r\n return false;\r\n};\r\n/* VSI Customization - END */\r\n\r\nexport default FooterCategoryView;","/*--------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * See License.txt in the project root for license information.\n *--------------------------------------------------------------*/\n\nimport { Module, Node } from '@msdyn365-commerce-modules/utilities';\nimport React, { ReactNode } from 'react';\n\nimport { IFooterCategoryViewProps } from './footer-category';\n\nexport const FooterCategoryView: React.FC = props => {\n const { categories, FooterList, FooterListItem } = props;\n if (!categories || categories.length === 0) {\n props.context.telemetry.error('Footer content is empty, module wont render');\n return null;\n }\n return (\n \n { categories.map((category: ReactNode, index: number) => {\n return (\n \n {category}\n \n );\n })}\n \n );\n};\n\nexport default FooterCategoryView;\n","module.exports = React;","const binding = { modules: {}, dataActions: {} };\n\n (binding.modules['footer-category'] = {\n c: () => require('@msdyn365-commerce-modules/footer/dist/lib/modules/footer-category/footer-category'),\n $type: 'containerModule',\n da: [],\n \n iNM: true,\n ns: '@msdyn365-commerce-modules',\n n: 'footer-category',\n p: 'footer',\n \n pdp: '',\n \n \n md: 'node_modules/@msdyn365-commerce-modules/footer/dist/lib/modules/footer-category'\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__|themes|dobbies|views|footer-category'] = {\n c: () => require('partner/themes/dobbies/views/footer-category.view.tsx'),\n cn: '__local__-__local__-footer-category'\n };\nviewDictionary['__local__|__local__|themes|dobbiesclub|views|footer-category'] = {\n c: () => require('partner/themes/dobbiesclub/views/footer-category.view.tsx'),\n cn: '__local__-__local__-footer-category'\n };\nviewDictionary['@msdyn365-commerce-modules|footer|modules|footer-category|footer-category'] = {\n c: () => require('@msdyn365-commerce-modules/footer/dist/lib/modules/footer-category/footer-category.view.js'),\n cn: '@msdyn365-commerce-modules-footer-footer-category'\n };\nwindow.__bindings__ = window.__bindings__ || {};\nwindow.__bindings__.viewDictionary = {\n ...window.__bindings__.viewDictionary || {},\n ...viewDictionary\n };","module.exports = ReactDOM;","/*---------------------------------------------------------------------------------------------\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 { IFooterCategoryViewProps } from '@msdyn365-commerce-modules/footer/src/modules/footer-category/./footer-category';\r\nimport { addThrottledEvent, Module, Node } from '@msdyn365-commerce-modules/utilities';\r\nimport { ICoreContext } from '@msdyn365-commerce/core';\r\nimport React, { ReactNode, useEffect, useState } from 'react';\r\n\r\nimport classnames from 'classnames';\r\nimport { IFooterCategoryProps } from '../definition-extensions/footer-category.ext.props.autogenerated';\r\n\r\nexport const FooterCategoryView: React.FC> = props => {\r\n /* VSI Customization - START */\r\n /* isOpen shows if a collapse is open or not */\r\n const [isOpen, setIsOpen] = useState(false);\r\n const [isMobile, setIsMobile] = useState(false);\r\n /* VSI Customization - END */\r\n const {\r\n categories,\r\n FooterList,\r\n FooterListItem,\r\n config: { collapseItems }\r\n } = props;\r\n if (!categories || !categories.length) {\r\n props.context.telemetry.error('Footer content is empty, module wont render');\r\n return null;\r\n }\r\n\r\n /* VSI Customization - START */\r\n /* condition either to show or hide the header */\r\n if (props.context.request.query!.onlyBody && props.context.request.query!.onlyBody === 'true') {\r\n return null;\r\n }\r\n /* useEffect will update footer according to device type */\r\n useEffect(() => {\r\n setMobileView();\r\n window && addThrottledEvent(window, 'resize', setMobileView);\r\n });\r\n\r\n const setMobileView = () => {\r\n const _isMobile = isMobileView(props.context);\r\n setIsMobile(_isMobile);\r\n };\r\n /* Click on collapse will toggle it */\r\n const _handleCollapse = (event: MouseEvent) => {\r\n setIsOpen(!isOpen);\r\n };\r\n /* collapse will only be shown on mobile */\r\n let _collapse = isMobile ? true : false;\r\n /* On mobile, category with Collapse value false will not be shown as collapse */\r\n if (_collapse) {\r\n _collapse = collapseItems === false ? false : true;\r\n }\r\n /* VSI Customization - END */\r\n return (\r\n \r\n {/* VSI Customization - START */}\r\n {_collapse ? (\r\n \r\n \r\n {categories[0]}\r\n \r\n\r\n
\r\n {categories.map((category: ReactNode, index: number) => {\r\n if (index > 0) {\r\n return (\r\n \r\n {category}\r\n \r\n );\r\n }\r\n return null;\r\n })}\r\n
\r\n
\r\n ) : (\r\n \r\n {categories.map((category: ReactNode, index: number) => {\r\n return (\r\n \r\n {category}\r\n \r\n );\r\n })}\r\n \r\n )}\r\n {/* VSI Customization - END */}\r\n
\r\n );\r\n};\r\n\r\n/* VSI Customization - START */\r\nconst isMobileView = (context: ICoreContext): boolean => {\r\n if (typeof window !== undefined && window.innerWidth) {\r\n const gridSettings = context.request.gridSettings;\r\n if (gridSettings) {\r\n if (gridSettings.xs && window.innerWidth < gridSettings.xs.w) {\r\n return true;\r\n } else if (gridSettings.sm && window.innerWidth < gridSettings.sm.w) {\r\n return true;\r\n } else if (gridSettings.md && window.innerWidth <= gridSettings.md.w) {\r\n return false;\r\n } else if (gridSettings.lg && window.innerWidth <= gridSettings.lg.w) {\r\n return false;\r\n } else {\r\n return false;\r\n }\r\n }\r\n }\r\n\r\n return false;\r\n};\r\n/* VSI Customization - END */\r\n\r\nexport default FooterCategoryView;\r\n"],"sourceRoot":""}