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EAAsB,mCAEhEjB,EAAQE,YAAYe,GAAqBE,QAAQE,UAAUC,eAAiBL,EACxEjB,EAAQE,YAAYe,GAAqBE,QAAQE,UAAUxC,KAC3DmB,EAAQE,YAAYF,EAAQE,YAAYe,GAAqBE,QAAQE,UAAUxC,IAAMoC,IA0BzFD,CAF4B,iCACXZ,EAAQ,MAMjCmB,OAAOC,aAAeD,OAAOC,cAAgB,GAC7CD,OAAOC,aAAavB,QAAOwB,EAAAA,EAAA,GACpBF,OAAOC,aAAavB,SAAW,IAC/BD,EAAQC,SAGXsB,OAAOC,aAAatB,YAAWuB,EAAAA,EAAA,GAC5BF,OAAOC,aAAatB,aAAe,IACnCF,EAAQE,aAEY,MAAMwB,EAAiB,GAC9BA,EAAe,uEAAyE,CAChGvB,EAAGA,IAAMC,EAAQ,MACjBuB,GAAI,2CAEpBJ,OAAOC,aAAeD,OAAOC,cAAgB,GAC7CD,OAAOC,aAAaE,eAAcD,EAAAA,EAAA,GACPF,OAAOC,aAAaE,gBAAkB,IACtCA,UCnF3BE,EAAOC,QAAU7C,cCAjB4C,EAAOC,QAAUC","sources":["webpack://Msdyn365.Commerce.Online/./src/actions/past-due-notice.action.ts?4d2c","webpack://Msdyn365.Commerce.Online/./src/modules/eve-past-due-notice/eve-past-due-notice.tsx?bfa0","webpack://Msdyn365.Commerce.Online/./src/modules/eve-past-due-notice/eve-past-due-notice.view.tsx?4173","webpack://Msdyn365.Commerce.Online/./lib/eve-past-due-notice/module-registration.js?2ca7","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 in the project root for license information.\r\n */\r\n\r\nimport * as Msdyn365 from '@msdyn365-commerce/core';\r\nimport { pastDueNoticeEntityAsync } from './DataActionExtension.g';\r\n\r\n/**\r\n * PastDueNotice Input Action\r\n */\r\nexport class PastDueNoticeInput implements Msdyn365.IActionInput {\r\n constructor() {}\r\n\r\n public getCacheKey = () => `PastDueNotice`;\r\n public getCacheObjectType = () => 'PastDueNotice';\r\n public dataCacheType = (): Msdyn365.CacheType => 'application';\r\n}\r\n\r\nexport interface IPastDueNoticeData {\r\n hasAccountInCredit: boolean;\r\n}\r\n\r\nconst createInput = (args: Msdyn365.ICreateActionContext): Msdyn365.IActionInput => {\r\n return new PastDueNoticeInput();\r\n};\r\n\r\nasync function action(input: PastDueNoticeInput, ctx: Msdyn365.IActionContext): Promise {\r\n if (!ctx.requestContext.user.isAuthenticated) {\r\n return { hasAccountInCredit: false };\r\n }\r\n const resp = await pastDueNoticeEntityAsync({ callerContext: ctx });\r\n return { hasAccountInCredit: resp.HasAccountInCredit };\r\n}\r\n\r\nexport default Msdyn365.createObservableDataAction({\r\n action: >action,\r\n id: 'PastDueNotice',\r\n input: createInput\r\n});\r\n","/*!\r\n * Copyright (c) Microsoft Corporation.\r\n * All rights reserved. See LICENSE in the project root for license information.\r\n */\r\n\r\nimport * as React from 'react';\r\n\r\nimport { IEvePastDueNoticeData } from './eve-past-due-notice.data';\r\nimport { IEvePastDueNoticeProps } from './eve-past-due-notice.props.autogenerated';\r\n\r\nexport interface IEvePastDueNoticeViewProps extends IEvePastDueNoticeProps {\r\n shouldRenderMessage: boolean;\r\n}\r\n\r\n/**\r\n *\r\n * EvePastDueNotice component\r\n * @extends {React.PureComponent>}\r\n */\r\nclass EvePastDueNotice extends React.PureComponent> {\r\n public render(): JSX.Element | null {\r\n const {\r\n data: { pastDue },\r\n context: {\r\n request: {\r\n user: { isAuthenticated }\r\n }\r\n }\r\n } = this.props;\r\n if (!isAuthenticated || !pastDue?.result?.hasAccountInCredit) {\r\n return null;\r\n }\r\n return this.props.renderView(this.props);\r\n }\r\n}\r\n\r\nexport default EvePastDueNotice;\r\n","/*!\r\n * Copyright (c) Microsoft Corporation.\r\n * All rights reserved. See LICENSE in the project root for license information.\r\n */\r\n\r\nimport * as React from 'react';\r\nimport { IEvePastDueNoticeViewProps } from './eve-past-due-notice';\r\nimport classnames from 'classnames';\r\n\r\nexport default (props: IEvePastDueNoticeViewProps) => {\r\n const _className = 'past-due-notice';\r\n const {\r\n config: { noticeText, className }\r\n } = props;\r\n return (\r\n
\r\n

{noticeText}

\r\n
\r\n );\r\n};\r\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['eve-past-due-notice'] = {\n c: () => require('partner/modules/eve-past-due-notice/eve-past-due-notice.tsx'),\n $type: 'contentModule',\n da: [{name:'pastDue', path:'actions/past-due-notice.action', runOn: 1}],\n \n iNM: false,\n ns: '__local__',\n n: 'eve-past-due-notice',\n p: '__local__',\n \n pdp: '',\n \n \n md: 'src/modules/eve-past-due-notice'\n });\n \n\n {\n const sanitizedActionPath = 'actions/past-due-notice.action';\n let dataAction = require('partner/actions/past-due-notice.action');\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|eve-past-due-notice|eve-past-due-notice'] = {\n c: () => require('partner/modules/eve-past-due-notice/eve-past-due-notice.view.tsx'),\n cn: '__local__-__local__-eve-past-due-notice'\n };\nwindow.__bindings__ = window.__bindings__ || {};\nwindow.__bindings__.viewDictionary = {\n ...window.__bindings__.viewDictionary || {},\n ...viewDictionary\n };","module.exports = React;","module.exports = ReactDOM;"],"names":["PastDueNoticeInput","constructor","getCacheKey","getCacheObjectType","dataCacheType","Msdyn365","action","async","input","ctx","requestContext","user","isAuthenticated","hasAccountInCredit","pastDueNoticeEntityAsync","callerContext","HasAccountInCredit","id","args","EvePastDueNotice","React","render","_pastDue$result","data","pastDue","context","request","this","props","result","renderView","_className","config","noticeText","className","classnames","binding","modules","dataActions","c","require","$type","da","name","path","runOn","iNM","ns","n","p","pdp","md","registerSanitizedActionPath","sanitizedActionPath","dataAction","default","Error","prototype","RegistrationId","window","__bindings__","_objectSpread","viewDictionary","cn","module","exports","ReactDOM"],"sourceRoot":""}