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AA,cAACsC,EAAAA,KAAIF,OAAAC,OAAA,GAAKb,GACLO,EAAwBQ,KAAI,CAACC,EAA+BC,IAErDzC,IAAAA,cAACsC,EAAAA,KAAIF,OAAAC,OAAA,GAAKR,EAAe,CAAEa,IAAKD,IAC3BD,QAS7B,WC/BAoB,EAAOC,QAAU7D,cCAjB4D,EAAOC,QAAUC","sources":["webpack://Msdyn365.Commerce.Online/./src/modules/social-share/social-share.props.autogenerated.ts?7749","webpack://Msdyn365.Commerce.Online/./src/modules/social-share/social-share.tsx?293f","webpack://Msdyn365.Commerce.Online/./src/modules/social-share/social-share.view.tsx?d77a","webpack://Msdyn365.Commerce.Online/./lib/social-share/module-registration.js?2ec3","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":["/**\r\n * Copyright (c) Microsoft Corporation\r\n * All rights reserved. See License.txt in the project root for license information.\r\n * ISocialShare moduleDefinition Interface Properties\r\n * THIS FILE IS AUTO-GENERATED - MANUAL MODIFICATIONS WILL BE LOST\r\n */\r\n\r\nimport * as Msdyn365 from '@msdyn365-commerce/core';\r\nimport * as React from 'react';\r\n\r\nexport const enum orientation {\r\n vertical = 'vertical',\r\n horizontal = 'horizontal'\r\n}\r\n\r\nexport interface ISocialShareConfig {\r\n caption?: string;\r\n orientation?: orientation;\r\n className?: string;\r\n clientRender?: boolean;\r\n}\r\n\r\nexport interface ISocialShareProps extends Msdyn365.IModule {\r\n config: ISocialShareConfig;\r\n slots: {\r\n socialShareItems: React.ReactNode[];\r\n };\r\n}\r\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 { ArrayExtensions } from '@msdyn365-commerce-modules/retail-actions';\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 || !ArrayExtensions.hasElements(slots.socialShareItems)) {\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 && !this.props.context.request.params.isEditor) {\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 && ''} ${\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\n/* eslint-disable no-duplicate-imports */\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","const binding = { modules: {}, dataActions: {} };\n\n (binding.modules['social-share'] = {\n c: () => require('partner/modules/social-share/social-share.tsx'),\n $type: 'moduleDefinition',\n da: [],\n \n iNM: false,\n ns: '__local__',\n n: 'social-share',\n p: '__local__',\n \n pdp: '',\n \n \n md: 'src/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['__local__|__local__|modules|social-share|social-share'] = {\n c: () => require('partner/modules/social-share/social-share.view.tsx'),\n cn: '__local__-__local__-social-share'\n };\nviewDictionary['@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 { 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":["orientation","SocialShare","React","constructor","props","super","render","slots","this","ArrayExtensions","hasElements","socialShareItems","context","telemetry","error","request","cookies","isConsentGiven","params","isEditor","viewprops","_objectSpread","moduleProps","className","classnames","config","SocialShareList","caption","vertical","tag","role","SocialShareItem","tabIndex","SocialShareItemElements","length","renderView","SocialShareView","Module","Object","assign","Node","map","SocialShareElement","index","key","binding","modules","dataActions","c","require","$type","da","iNM","ns","n","p","pdp","md","window","__bindings__","viewDictionary","cn","module","exports","ReactDOM"],"sourceRoot":""}