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zCH,OAAOC,aAAaE,mBAA8B,UAACD,EAAA,GAC5Cf,EAAQE,iCCnEvBe,EAAOC,QAAUC,2BCAjBF,EAAOC,QAAUE","sources":["webpack://Msdyn365.Commerce.Online/./src/actions/getactiveprices.action.ts?5586","webpack://Msdyn365.Commerce.Online/./src/actions/getproductunitsofmeasure.action.ts?b2cf","webpack://Msdyn365.Commerce.Online/./src/actions/payment-state-share.action.ts?5a06","webpack://Msdyn365.Commerce.Online/./lib/__local__/module-registration.js?8a42","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 { AffiliationLoyaltyTier, PriceLookupContext, ProductPrice, ProjectionDomain } from '@msdyn365-commerce/retail-proxy';\r\nimport { getActivePricesAsync } from '@msdyn365-commerce/retail-proxy/dist/DataActions/ProductsDataActions.g';\r\n\r\n/**\r\n * Getaddresses Input Action\r\n */\r\n\r\nexport interface IITSGetActivePricesInput extends Msdyn365.IActionInput {\r\n projectDomain: ProjectionDomain | null;\r\n productIds?: number[];\r\n activeDate?: Date;\r\n customerId?: string | null;\r\n affiliationLoyaltyTiers?: AffiliationLoyaltyTier[] | null;\r\n includeSimpleDiscountsInContextualPrice?: boolean | null;\r\n includeVariantPriceRange?: boolean | null;\r\n includeAttainablePricesAndDiscounts?: boolean | null;\r\n priceLookupContext?: PriceLookupContext | null;\r\n}\r\nexport class GetActivePricesInput implements Msdyn365.IActionInput {\r\n public projectDomain: ProjectionDomain | null;\r\n public productIds?: number[];\r\n public activeDate?: Date;\r\n public customerId?: string | null;\r\n public affiliationLoyaltyTiers?: AffiliationLoyaltyTier[] | null;\r\n public includeSimpleDiscountsInContextualPrice?: boolean | null;\r\n public includeVariantPriceRange?: boolean | null;\r\n public includeAttainablePricesAndDiscounts?: boolean | null;\r\n public priceLookupContext?: PriceLookupContext | null;\r\n // TODO: Construct the input needed to run the action\r\n constructor(\r\n projectDomain: ProjectionDomain | null,\r\n productIds?: number[],\r\n activeDate?: Date,\r\n customerId?: string | null,\r\n affiliationLoyaltyTiers?: AffiliationLoyaltyTier[] | null,\r\n includeSimpleDiscountsInContextualPrice?: boolean | null,\r\n includeVariantPriceRange?: boolean | null,\r\n includeAttainablePricesAndDiscounts?: boolean | null,\r\n priceLookupContext?: PriceLookupContext | null\r\n ) {\r\n this.projectDomain = projectDomain;\r\n this.productIds = productIds;\r\n this.activeDate = activeDate;\r\n this.customerId = customerId;\r\n this.affiliationLoyaltyTiers = affiliationLoyaltyTiers;\r\n this.includeSimpleDiscountsInContextualPrice = includeSimpleDiscountsInContextualPrice;\r\n this.includeVariantPriceRange = includeVariantPriceRange;\r\n this.includeAttainablePricesAndDiscounts = includeAttainablePricesAndDiscounts;\r\n this.priceLookupContext = priceLookupContext;\r\n }\r\n\r\n // TODO: Determine if the results of this get action should cache the results and if so provide\r\n // a cache object type and an appropriate cache key\r\n public getCacheKey = () => `getActivePrices`;\r\n public getCacheObjectType = () => 'getActivePrices';\r\n public dataCacheType = (): Msdyn365.CacheType => 'none';\r\n}\r\n\r\n/**\r\n * TODO: Use this function to call your action and process the results as needed\r\n */\r\nexport async function getActivePricesAction(\r\n request: IITSGetActivePricesInput,\r\n ctx: Msdyn365.IActionContext\r\n): Promise {\r\n if (request) {\r\n try {\r\n const result = await getActivePricesAsync(\r\n { callerContext: ctx },\r\n request.projectDomain,\r\n request.productIds,\r\n request.activeDate,\r\n request.customerId,\r\n request.affiliationLoyaltyTiers,\r\n request.includeSimpleDiscountsInContextualPrice,\r\n request.includeVariantPriceRange,\r\n request.includeAttainablePricesAndDiscounts,\r\n request.priceLookupContext\r\n ); //calling getActivePricesAsync API\r\n if (result) {\r\n return result;\r\n }\r\n } catch (error) {\r\n console.log('Error', error);\r\n }\r\n }\r\n return null;\r\n}\r\n\r\nexport default Msdyn365.createObservableDataAction({\r\n action: >getActivePricesAction,\r\n // TODO: Give your data action a unique id\r\n id: `getActivePrices`\r\n // input: createInput\r\n // TODO: Uncomment the below line if this is a meant to be a batched data action\r\n // isBatched: true\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 Msdyn365 from '@msdyn365-commerce/core';\r\nimport { ProductUnitOfMeasure, UnitOfMeasureSearchCriteria } from '@msdyn365-commerce/retail-proxy';\r\nimport { getProductUnitsOfMeasureAsync } from '@msdyn365-commerce/retail-proxy/dist/DataActions/ProductsDataActions.g';\r\n\r\n/**\r\n * Getaddresses Input Action\r\n */\r\n\r\nexport interface IITSProductUnitOfMeasureInput extends Msdyn365.IActionInput {\r\n productId: number | undefined;\r\n unitOfMeasureSearchCriteria?: UnitOfMeasureSearchCriteria | null;\r\n}\r\nexport class GetProductUnitOfMeasureInput implements Msdyn365.IActionInput {\r\n public productId: number | undefined;\r\n public unitOfMeasureSearchCriteria: UnitOfMeasureSearchCriteria | null;\r\n // TODO: Construct the input needed to run the action\r\n constructor(productId: number | undefined, unitOfMeasureSearchCriteria: UnitOfMeasureSearchCriteria | null) {\r\n this.productId = productId;\r\n this.unitOfMeasureSearchCriteria = unitOfMeasureSearchCriteria;\r\n }\r\n\r\n // TODO: Determine if the results of this get action should cache the results and if so provide\r\n // a cache object type and an appropriate cache key\r\n public getCacheKey = () => `getProductUnitOfMeasure`;\r\n public getCacheObjectType = () => 'getProductUnitOfMeasure';\r\n public dataCacheType = (): Msdyn365.CacheType => 'none';\r\n}\r\n\r\n/**\r\n * TODO: Use this function to call your action and process the results as needed\r\n */\r\nexport async function getProductUnitsOfMeasureAction(\r\n request: IITSProductUnitOfMeasureInput,\r\n ctx: Msdyn365.IActionContext\r\n): Promise {\r\n if (request.productId) {\r\n try {\r\n const result = await getProductUnitsOfMeasureAsync(\r\n { callerContext: ctx },\r\n request.productId,\r\n request.unitOfMeasureSearchCriteria\r\n ); //calling getProductUnitOfMeasureAsync API\r\n if (result) {\r\n return result;\r\n }\r\n } catch (error) {\r\n console.log('Error', error);\r\n }\r\n }\r\n return null;\r\n}\r\n\r\nexport default Msdyn365.createObservableDataAction({\r\n action: >getProductUnitsOfMeasureAction,\r\n // TODO: Give your data action a unique id\r\n id: `getProductUnitOfMeasure`\r\n // input: createInput\r\n // TODO: Uncomment the below line if this is a meant to be a batched data action\r\n // isBatched: true\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 Msdyn365 from '@msdyn365-commerce/core';\r\n\r\n/**\r\n * PaymentStateShare Input Action\r\n */\r\nexport class PaymentStateShareInput implements Msdyn365.IActionInput {\r\n // TODO: Construct the input needed to run the action\r\n constructor() {}\r\n\r\n // TODO: Determine if the results of this get action should cache the results and if so provide\r\n // a cache object type and an appropriate cache key\r\n public getCacheKey = () => `payment-state-share`;\r\n public getCacheObjectType = () => 'payment-state-share';\r\n public dataCacheType = (): Msdyn365.CacheType => 'application';\r\n}\r\n\r\n// TODO: Create a data model here or import one to capture the response of the action\r\nexport interface IPaymentStateShareData {\r\n isCODSelected: boolean;\r\n isCreditCardSelected: boolean;\r\n shouldApplyOnAccountPayment: boolean;\r\n isStoreSelected: boolean;\r\n}\r\n\r\n/**\r\n * TODO: Use this function to create the input required to make the action call\r\n */\r\nconst createInput = (args: Msdyn365.ICreateActionContext): Msdyn365.IActionInput => {\r\n return new PaymentStateShareInput();\r\n};\r\n\r\n/**\r\n * TODO: Use this function to call your action and process the results as needed\r\n */\r\nasync function action(input: PaymentStateShareInput, ctx: Msdyn365.IActionContext): Promise {\r\n // const apiSettings = Msdyn365.msdyn365Commerce.apiSettings;\r\n\r\n // TODO: Uncomment the below line to get the value from a service\r\n // const response = await Msdyn365.sendRequest('/get/example/id/1', 'get');\r\n return { isCODSelected: true, isCreditCardSelected: false, shouldApplyOnAccountPayment: true, isStoreSelected: false };\r\n}\r\n\r\nexport default Msdyn365.createObservableDataAction({\r\n action: >action,\r\n // TODO: Give your data action a unique id\r\n id: 'PaymentStateShare',\r\n input: createInput\r\n // TODO: Uncomment the below line if this is a meant to be a batched data action\r\n // isBatched: true\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 { \n const actionPath = 'actions/getactiveprices.action';\n binding.dataActions[actionPath] = require('partner/actions/getactiveprices.action');\n registerActionId(actionPath);\n }\n\n { \n const actionPath = 'actions/getproductunitsofmeasure.action';\n binding.dataActions[actionPath] = require('partner/actions/getproductunitsofmeasure.action');\n registerActionId(actionPath);\n }\n\n { \n const actionPath = 'actions/payment-state-share.action';\n binding.dataActions[actionPath] = require('partner/actions/payment-state-share.action');\n registerActionId(actionPath);\n }\n\n \n window.__bindings__ = window.__bindings__ || {};\n window.__bindings__.modules = {\n ...window.__bindings__.modules || {},\n ...binding.modules\n };\n \n window.__bindings__.packageDataActions = {};\n window.__bindings__.packageDataActions['__local__'] = {\n ...binding.dataActions\n };","module.exports = React;","module.exports = ReactDOM;"],"names":["GetActivePricesInput","constructor","projectDomain","productIds","activeDate","customerId","affiliationLoyaltyTiers","includeSimpleDiscountsInContextualPrice","includeVariantPriceRange","includeAttainablePricesAndDiscounts","priceLookupContext","getCacheKey","getCacheObjectType","dataCacheType","this","async","getActivePricesAction","request","ctx","result","getActivePricesAsync","callerContext","error","console","log","Msdyn365","action","id","GetProductUnitOfMeasureInput","productId","unitOfMeasureSearchCriteria","getProductUnitsOfMeasureAction","getProductUnitsOfMeasureAsync","PaymentStateShareInput","input","isCODSelected","isCreditCardSelected","shouldApplyOnAccountPayment","isStoreSelected","args","binding","modules","dataActions","registerActionId","actionPath","default","prototype","Object","keys","forEach","exportName","Action","require","window","__bindings__","_objectSpread","packageDataActions","module","exports","React","ReactDOM"],"sourceRoot":""}