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Acd,KAAKJ,MAAMiB,OAAOE,QAChCJ,UAAW,sBAAsBX,KAAKJ,MAAMiB,OAAOE,SAAW,aAC7B,aAA7Bf,KAAKJ,MAAMiB,OAAOG,YAAuC,WAAa,KAE1EC,IAAK,KACLC,KAAM,SAEVC,gBAAiB,CACbR,UAAW,qBACXM,IAAK,KACLG,SAAU,IACVF,KAAM,QAEVG,wBAAyBtB,GAASA,EAAME,iBAAiBC,OAAS,GAAKH,EAAME,mBAGjF,OAAOD,KAAKJ,MAAM0B,WAAWb,IAIrC,8GCjEO,MAAMc,EAAmD3B,IAC5D,MAAM,gBAAEkB,EAAe,wBAAEO,EAAuB,gBAAEF,EAAe,YAAE1B,GAAgBG,EACnF,OAAuC,IAAnCyB,EAAwBnB,QACxBN,EAAMO,QAAQC,UAAUC,MAAM,kDACvB,MAGPX,IAAAA,cAAC8B,EAAAA,OAAMC,OAAAC,OAAA,GAAKjC,GACRC,IAAAA,cAACiC,EAAAA,KAAIF,OAAAC,OAAA,GAAKZ,GACLO,EAAwBO,KAAI,CAACC,EAA+BC,IAErDpC,IAAAA,cAACiC,EAAAA,KAAIF,OAAAC,OAAA,GAAKP,EAAe,CAAEY,IAAKD,IAC3BD,QAS7B,WC/BAG,EAAOC,QAAUvC,cCAjBsC,EAAOC,QAAUC","sources":["webpack://Msdyn365.Commerce.Online/./lib/social-share/module-registration.js?2ec3","webpack://Msdyn365.Commerce.Online/./src/modules/social-share/social-share.tsx?899b","webpack://Msdyn365.Commerce.Online/./src/modules/social-share/social-share.view.tsx?dcdf","webpack://Msdyn365.Commerce.Online/external var \"React\"?0d3b","webpack://Msdyn365.Commerce.Online/external var \"ReactDOM\"?853b"],"sourcesContent":["const binding = { modules: {}, dataActions: {} };\n\n (binding.modules['social-share'] = {\n c: () => require('@msdyn365-commerce-modules/social-share/dist/lib/modules/social-share/social-share'),\n $type: 'moduleDefinition',\n da: [],\n \n iNM: true,\n ns: '@msdyn365-commerce-modules',\n n: 'social-share',\n p: 'social-share',\n \n pdp: '',\n \n \n md: 'node_modules/@msdyn365-commerce-modules/social-share/dist/lib/modules/social-share'\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['@msdyn365-commerce-modules|social-share|modules|social-share|social-share'] = {\n c: () => require('@msdyn365-commerce-modules/social-share/dist/lib/modules/social-share/social-share.view.js'),\n cn: '@msdyn365-commerce-modules-social-share-social-share'\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 { IModuleProps, INodeProps } from '@msdyn365-commerce-modules/utilities';\nimport classnames from 'classnames';\nimport * as React from 'react';\n\nimport { ISocialShareConfig, ISocialShareProps, orientation } from './social-share.props.autogenerated';\n\nexport interface ISocialShareViewProps extends ISocialShareProps {\n isConsentGiven: boolean;\n SocialShareItemElements: React.ReactNode[];\n SocialShare: IModuleProps;\n SocialShareList: INodeProps;\n SocialShareItem: INodeProps;\n SocialShareItemCustomization: INodeProps;\n}\n\n/**\n *\n * SocialShare component.\n * @extends {React.PureComponent>}\n */\nclass SocialShare extends React.PureComponent> {\n constructor(props: ISocialShareProps) {\n super(props);\n }\n\n public render(): JSX.Element | null {\n const { slots } = this.props;\n\n if (slots && slots.socialShareItems.length === 0) {\n this.props.context.telemetry.error('No social media is enable for sharing, module wont render');\n return null;\n }\n\n const isConsentGiven =\n this.props.context.request &&\n this.props.context.request.cookies &&\n this.props.context.request.cookies.isConsentGiven &&\n this.props.context.request.cookies.isConsentGiven();\n\n if (!isConsentGiven) {\n return null;\n }\n\n const viewprops = {\n ...this.props,\n SocialShare: {\n moduleProps: this.props,\n className: classnames('ms-social-share', this.props.config.className)\n },\n SocialShareList: {\n 'data-title': this.props.config.caption,\n className: `ms-social-share-ul ${this.props.config.caption && 'caption'} ${\n this.props.config.orientation === orientation.vertical ? 'vertical' : ''\n }`,\n tag: 'ul',\n role: 'group'\n },\n SocialShareItem: {\n className: 'ms-social-share-li',\n tag: 'li',\n tabIndex: '0',\n role: 'link'\n },\n SocialShareItemElements: slots && slots.socialShareItems.length > 0 && slots.socialShareItems\n };\n\n return this.props.renderView(viewprops) as React.ReactElement;\n }\n}\n\nexport default SocialShare;\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 { ISocialShareViewProps } from './social-share';\n\nexport const SocialShareView: React.FC = props => {\n const { SocialShareList, SocialShareItemElements, SocialShareItem, SocialShare } = props;\n if (SocialShareItemElements.length === 0) {\n props.context.telemetry.error('Social media list is empty, module wont render');\n return null;\n }\n return (\n \n \n {SocialShareItemElements.map((SocialShareElement: ReactNode, index: number) => {\n return (\n \n {SocialShareElement}\n \n );\n })}\n \n \n );\n};\n\nexport default SocialShareView;\n","module.exports = React;","module.exports = ReactDOM;"],"names":["binding","modules","dataActions","c","require","$type","da","iNM","ns","n","p","pdp","md","window","__bindings__","_objectSpread","viewDictionary","cn","SocialShare","React","constructor","props","super","render","slots","this","socialShareItems","length","context","telemetry","error","request","cookies","isConsentGiven","viewprops","moduleProps","className","classnames","config","SocialShareList","caption","orientation","tag","role","SocialShareItem","tabIndex","SocialShareItemElements","renderView","SocialShareView","Module","Object","assign","Node","map","SocialShareElement","index","key","module","exports","ReactDOM"],"sourceRoot":""}