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AyD/B,IAClE,MAAM,WAAEsB,EAAU,WAAEC,EAAU,eAAEM,GAAmB7B,EACnD,OAAKsB,GAAoC,IAAtBA,EAAWN,OAK1BtB,IAAAA,cAACsC,EAAAA,OAAMC,OAAAC,OAAA,GAAKX,GACPD,EAAWa,KAAI,CAACC,EAAqBC,IAE9B3C,IAAAA,cAAC4C,EAAAA,KAAIL,OAAAC,OAAA,GAAKL,EAAc,CAAEU,IAAKF,IAC1BD,OARjBpC,EAAMiB,QAAQC,UAAUC,MAAM,+CACvB,OAef,WC7BAgD,EAAOC,QAAU1E,cCAjByE,EAAOC,QAAUC","sources":["webpack://Msdyn365.Commerce.Online/./src/modules/footer-category/footer-category.tsx?6a7d","webpack://Msdyn365.Commerce.Online/./src/modules/footer-category/footer-category.view.tsx?9d31","webpack://Msdyn365.Commerce.Online/./lib/footer-category/module-registration.js?7500","webpack://Msdyn365.Commerce.Online/./src/modules/footer-category/footer-category.view.tsx?fdce","webpack://Msdyn365.Commerce.Online/external var \"React\"?0d3b","webpack://Msdyn365.Commerce.Online/external var \"ReactDOM\"?853b"],"sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\n/* eslint-disable no-duplicate-imports */\nimport { IModuleProps, INodeProps } from '@msdyn365-commerce-modules/utilities';\nimport classnames from 'classnames';\nimport * as React from 'react';\nimport { IFooterCategoryData } from './footer-category.data';\nimport { IFooterCategoryConfig, IFooterCategoryProps } from './footer-category.props.autogenerated';\nimport { Customer } from '@msdyn365-commerce/retail-proxy';\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 async componentDidMount() {\n function fetchCustomerData(customerInformation?: Customer) {\n //Here it is assumed that the corresponding work stream would have context variables with logical name of 'contextKey1', 'contextKey2', 'contextKey3'. If no context variable exists with a matching logical name, items are created assuming Type:string\n return {\n Email: customerInformation?.Email ? customerInformation?.Email : 'testMe@yopmail.com'\n };\n }\n const CustomerData = fetchCustomerData(this.props.data?.customerInformation?.result);\n window.addEventListener('lcw:ready', function handleLivechatReadyEvent() {\n // Handle LiveChat Ready event\n // SDK methods are ready for use now\n // Setting custom context provider to be used with Chat for Dynamics 365\n // The custom context provided by custom context provider can be used for routing the chat to a particular queue\n // @ts-ignore\n Microsoft.Omnichannel.LiveChatWidget.SDK.setContextProvider(CustomerData);\n // Starting a new chat\n // @ts-ignore\n //Microsoft.Omnichannel.LiveChatWidget.SDK.startChat();\n });\n\n window.addEventListener('lcw:error', function handleLivechatErrorEvent(errorEvent) {\n // Handle LiveChat SDK error event\n console.log(errorEvent);\n });\n }\n\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","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\n/* eslint-disable no-duplicate-imports */\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","const binding = { modules: {}, dataActions: {} };\n\n const registerActionId = (actionPath) => {\n if (binding.dataActions[actionPath] &&\n binding.dataActions[actionPath].default &&\n binding.dataActions[actionPath].default.prototype &&\n binding.dataActions[actionPath].default.prototype.id) {\n binding.dataActions[binding.dataActions[actionPath].default.prototype.id] = binding.dataActions[actionPath];\n } else {\n Object.keys(binding.dataActions[actionPath] || {}).forEach(exportName => {\n if (binding.dataActions[actionPath][exportName] &&\n binding.dataActions[actionPath][exportName].prototype &&\n binding.dataActions[actionPath][exportName].prototype.Action) {\n binding.dataActions[binding.dataActions[actionPath][exportName].prototype.id] = binding.dataActions[actionPath][exportName];\n }\n })\n }\n };\n\n const registerSanitizedActionPath = (sanitizedActionPath, dataAction) => {\n if (process.env.NODE_ENV === 'development') {\n if (!dataAction.default) {\n throw new Error('Data action path does not have a default export');\n }\n if (!(dataAction.default.prototype.id && binding.dataActions[dataAction.default.prototype.id]) || !binding.dataActions[sanitizedActionPath]) {\n binding.dataActions[sanitizedActionPath] = dataAction;\n }\n } else {\n binding.dataActions[sanitizedActionPath] = dataAction;\n if (!binding.dataActions[sanitizedActionPath].default) {\n throw new Error('Data action path ' + sanitizedActionPath + ' does not have a default export');\n }\n binding.dataActions[sanitizedActionPath].default.prototype.RegistrationId = sanitizedActionPath;\n if (binding.dataActions[sanitizedActionPath].default.prototype.id) {\n binding.dataActions[binding.dataActions[sanitizedActionPath].default.prototype.id] = sanitizedActionPath;\n }\n }\n };\n \n\n (binding.modules['footer-category'] = {\n c: () => require('partner/modules/footer-category/footer-category.tsx'),\n $type: 'containerModule',\n da: [{name:'customerInformation', path:'@msdyn365-commerce-modules/retail-actions/dist/lib/get-customer', runOn: 0}],\n \n iNM: false,\n ns: '__local__',\n n: 'footer-category',\n p: '__local__',\n \n pdp: '',\n \n \n md: 'src/modules/footer-category'\n });\n \n\n {\n const sanitizedActionPath = '@msdyn365-commerce-modules/retail-actions/dist/lib/get-customer';\n let dataAction = require('@msdyn365-commerce-modules/retail-actions/dist/lib/get-customer');\n registerSanitizedActionPath(sanitizedActionPath, dataAction);\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|footer-category|footer-category'] = {\n c: () => require('partner/modules/footer-category/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 };","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE 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;","module.exports = ReactDOM;"],"names":["FooterCategory","React","_this$props$data","CustomerData","Email","customerInformation","this","props","data","result","window","addEventListener","Microsoft","Omnichannel","LiveChatWidget","SDK","setContextProvider","errorEvent","console","log","render","slots","content","length","context","telemetry","error","viewprops","_objectSpread","categories","FooterList","moduleProps","className","classnames","config","tag","FooterListItem","renderView","FooterCategoryView","Module","Object","assign","map","category","index","Node","key","binding","modules","dataActions","c","require","$type","da","name","path","runOn","iNM","ns","n","p","pdp","md","registerSanitizedActionPath","sanitizedActionPath","dataAction","default","Error","prototype","RegistrationId","id","__bindings__","viewDictionary","cn","module","exports","ReactDOM"],"sourceRoot":""}