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N,EAAQE,YAAYE,GAAYM,GAAYJ,UAAUK,SACtDX,EAAQE,YAAYF,EAAQE,YAAYE,GAAYM,GAAYJ,UAAUlB,IAAMY,EAAQE,YAAYE,GAAYM,QA2B5H,CACI,MAAMN,EAAa,sCACnBJ,EAAQE,YAAYE,GAAcQ,EAAQ,KAC1CT,EAAiBC,GAGrB,CACI,MAAMA,EAAa,mDACnBJ,EAAQE,YAAYE,GAAcQ,EAAQ,KAC1CT,EAAiBC,GAGrB,CACI,MAAMA,EAAa,qDACnBJ,EAAQE,YAAYE,GAAcQ,EAAQ,KAC1CT,EAAiBC,GAGrB,CACI,MAAMA,EAAa,mCACnBJ,EAAQE,YAAYE,GAAcQ,EAAQ,KAC1CT,EAAiBC,GAIzBS,OAAOC,aAAeD,OAAOC,cAAgB,GAC7CD,OAAOC,aAAab,QAAOc,EAAAA,EAAA,GACpBF,OAAOC,aAAab,SAAW,IAC/BD,EAAQC,SAGXY,OAAOC,aAAaE,mBAAqB,GACzCH,OAAOC,aAAaE,mBAA8B,UAACD,EAAA,GAC5Cf,EAAQE,iCCzEvBe,EAAOC,QAAUC,2BCAjBF,EAAOC,QAAUE","sources":["webpack://ahi-ecommerce/./src/actions/get-current-category.action.ts?8529","webpack://ahi-ecommerce/./src/actions/get-is-request-assistance-product.action.ts?3616","webpack://ahi-ecommerce/./src/actions/get-series-product-category-mapping.action.ts?1e75","webpack://ahi-ecommerce/./src/actions/get-subcategories.action.ts?9d6f","webpack://ahi-ecommerce/./lib/__local__/module-registration.js?8a42","webpack://ahi-ecommerce/external var \"React\"?0d3b","webpack://ahi-ecommerce/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\nimport * as Msdyn365 from '@msdyn365-commerce/core';\nimport { generateCacheKey, parameterize } from '@msdyn365-commerce-modules/retail-actions';\nimport { getCategoryDetailsControllerAsync } from './DataActionExtension.g';\nimport { ICateoryDetailsEntity } from './DataServiceEntities.g';\n\n/**\n * GetCurrentCategory Input Action\n */\nexport class GetCurrentCategoryInput implements Msdyn365.IActionInput {\n // TODO: Construct the input needed to run the action\n public categoryId?: number;\n public categorySlug?: string;\n private readonly apiSettings: Msdyn365.ICommerceApiSettings;\n\n constructor(requestContext: Msdyn365.IRequestContext) {\n let categoryId;\n let categorySlug;\n if (requestContext.query && requestContext.query.categoryId) {\n categoryId = Number(requestContext.query.categoryId);\n\n if (Number.isNaN(categoryId)) {\n throw new Error('Failed to cast category id into a number.');\n }\n } else if (requestContext.urlTokens && requestContext.urlTokens.recordId) {\n categoryId = Number(requestContext.urlTokens.recordId);\n if (Number.isNaN(categoryId)) {\n throw new Error('Failed to cast category id into a number.');\n }\n } else if (requestContext.urlTokens && requestContext.urlTokens.categories && requestContext.urlTokens.categories.length > 0) {\n const categories: string[] = (requestContext.urlTokens.categories);\n\n if (categories.length === 0) {\n throw new Error('Failed to get category name from urlTokens');\n }\n\n // TODO: fix getParameterizeFeatureFlags to take requestContext as input.\n const tempActionContext = {\n requestContext: requestContext\n };\n categorySlug = `/${categories\n .map(category => {\n // @ts-expect-error TODO: fix getParameterizeFeatureFlags to take requestContext as an input\n const parameterizeFeatureFlags: IParameterizeFeatureFlags = getParameterizeFeatureFlags(tempActionContext);\n return parameterize(category, undefined, parameterizeFeatureFlags);\n })\n .join('/')}`;\n }\n this.categoryId = categoryId;\n this.categorySlug = categorySlug;\n this.apiSettings = requestContext.apiSettings;\n }\n\n // TODO: Determine if the results of this get action should cache the results and if so provide\n // a cache object type and an appropriate cache key\n public getCacheKey = () =>\n generateCacheKey(\n this.apiSettings,\n { key: 'base', value: 'GetCategoryDetail' },\n { key: 'CategoryId', value: this.categoryId },\n { key: 'categorySlug', value: this.categorySlug }\n );\n public getCacheObjectType = () => 'CateoryDetailsEntity';\n public dataCacheType = (): Msdyn365.CacheType => 'request';\n // constructor() {}\n\n // // TODO: Determine if the results of this get action should cache the results and if so provide\n // // a cache object type and an appropriate cache key\n // public getCacheKey = () => `TODO`;\n // public getCacheObjectType = () => 'TODO';\n // public dataCacheType = (): Msdyn365.CacheType => 'application';\n}\n\n// TODO: Create a data model here or import one to capture the response of the action\nexport interface IGetCurrentCategoryData {\n text: string;\n}\n\n/**\n * TODO: Use this function to create the input required to make the action call\n */\nconst createInput = (args: Msdyn365.ICreateActionContext): Msdyn365.IActionInput => {\n if (args && args.requestContext) {\n return new GetCurrentCategoryInput(args.requestContext);\n }\n throw new Error('Please specify categoryId query string in request.');\n};\n\n/**\n * TODO: Use this function to call your action and process the results as needed\n */\nasync function action(input: GetCurrentCategoryInput, ctx: Msdyn365.IActionContext): Promise {\n // const apiSettings = Msdyn365.msdyn365Commerce.apiSettings;\n\n const getSubcategoryInput = new GetCurrentCategoryInput(ctx.requestContext);\n const currentCategory = await getCategoryDetailsControllerAsync(\n { callerContext: ctx, bypassCache: 'none' },\n getSubcategoryInput.categoryId ?? 0\n );\n return currentCategory?.[0];\n}\n\nexport default Msdyn365.createObservableDataAction({\n action: >action,\n // TODO: Give your data action a unique id\n id: 'GetCurrentCategoryDetails',\n input: createInput\n // TODO: Uncomment the below line if this is a meant to be a batched data action\n // isBatched: true\n});\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { getSelectedProductIdFromActionInput } from '@msdyn365-commerce-modules/retail-actions';\nimport * as Msdyn365 from '@msdyn365-commerce/core';\nimport { getISRequestAssitanceProductActionAsync } from './DataActionExtension.g';\nimport { IRequestAssistanceIsProduct } from './DataServiceEntities.g';\n\n/**\n * GetIsRequestAssistanceProduct Input Action\n */\nexport class GetIsRequestAssistanceProductInput implements Msdyn365.IActionInput {\n // TODO: Construct the input needed to run the action\n public productId: number;\n constructor(productId: number) {\n this.productId = productId;\n }\n\n // TODO: Determine if the results of this get action should cache the results and if so provide\n // a cache object type and an appropriate cache key\n public getCacheKey = () => `GetIsRequestAssistanceProduct-${this.productId}`;\n public getCacheObjectType = () => 'IRequestAssistanceIsProduct';\n public dataCacheType = (): Msdyn365.CacheType => 'application';\n}\n\n// TODO: Create a data model here or import one to capture the response of the action\nexport interface IGetIsRequestAssistanceProductData {\n text: string;\n}\n\n/**\n * TODO: Use this function to create the input required to make the action call\n */\nconst createInput = (args: Msdyn365.ICreateActionContext): Msdyn365.IActionInput => {\n const productId = getSelectedProductIdFromActionInput(args);\n if (productId) {\n return new GetIsRequestAssistanceProductInput(+productId);\n }\n throw new Error('Unable to create GetIsRequestAssistanceProductInput, no productId found on module config or query');\n};\n\n/**\n * TODO: Use this function to call your action and process the results as needed\n */\nfunction action(input: GetIsRequestAssistanceProductInput, ctx: Msdyn365.IActionContext): Promise {\n // const apiSettings = Msdyn365.msdyn365Commerce.apiSettings;\n\n // TODO: Uncomment the below line to get the value from a service\n const response = getISRequestAssitanceProductActionAsync({ callerContext: ctx }, { idColEntry: `${input.productId}` }, input.productId);\n // console.log('ProductId', input.productId);\n // console.log(response);\n\n return response;\n}\n\nexport default Msdyn365.createObservableDataAction({\n action: >action,\n // TODO: Give your data action a unique id\n id: 'GetIsRequestAssistanceProduct',\n input: createInput\n // TODO: Uncomment the below line if this is a meant to be a batched data action\n // isBatched: true\n});\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport * as Msdyn365 from '@msdyn365-commerce/core';\nimport { generateCacheKey, parameterize } from '@msdyn365-commerce-modules/retail-actions';\nimport { getCategoryStructureProductSeriesDataControllerAsync } from './DataActionExtension.g';\nimport { ICategoryStructureProductWithSeriesEntity } from './DataServiceEntities.g';\n\n/**\n * GetSeriesProductCategoryMapping Input Action\n */\nexport class GetSeriesProductCategoryMappingInput implements Msdyn365.IActionInput {\n public categoryId?: number;\n public categorySlug?: string;\n private readonly apiSettings: Msdyn365.ICommerceApiSettings;\n\n constructor(requestContext: Msdyn365.IRequestContext) {\n let categoryId;\n let categorySlug;\n if (requestContext.query && requestContext.query.categoryId) {\n categoryId = Number(requestContext.query.categoryId);\n\n if (Number.isNaN(categoryId)) {\n throw new Error('Failed to cast category id into a number.');\n }\n } else if (requestContext.urlTokens && requestContext.urlTokens.recordId) {\n categoryId = Number(requestContext.urlTokens.recordId);\n if (Number.isNaN(categoryId)) {\n throw new Error('Failed to cast category id into a number.');\n }\n } else if (requestContext.urlTokens && requestContext.urlTokens.categories && requestContext.urlTokens.categories.length > 0) {\n const categories: string[] = (requestContext.urlTokens.categories);\n\n if (categories.length === 0) {\n throw new Error('Failed to get category name from urlTokens');\n }\n\n // TODO: fix getParameterizeFeatureFlags to take requestContext as input.\n const tempActionContext = {\n requestContext: requestContext\n };\n categorySlug = `/${categories\n .map(category => {\n // @ts-expect-error TODO: fix getParameterizeFeatureFlags to take requestContext as an input\n const parameterizeFeatureFlags: IParameterizeFeatureFlags = getParameterizeFeatureFlags(tempActionContext);\n return parameterize(category, undefined, parameterizeFeatureFlags);\n })\n .join('/')}`;\n }\n this.categoryId = categoryId;\n this.categorySlug = categorySlug;\n this.apiSettings = requestContext.apiSettings;\n }\n\n // TODO: Determine if the results of this get action should cache the results and if so provide\n // a cache object type and an appropriate cache key\n public getCacheKey = () =>\n generateCacheKey(\n this.apiSettings,\n { key: 'base', value: 'GetSeriesProductCategoriesMapping' },\n { key: 'CategoryId', value: this.categoryId },\n { key: 'categorySlug', value: this.categorySlug }\n );\n public getCacheObjectType = () => 'CateoryDetailsEntity';\n public dataCacheType = (): Msdyn365.CacheType => 'request';\n}\n\n// TODO: Create a data model here or import one to capture the response of the action\nexport interface IGetSeriesProductCategoryMappingData {\n text: string;\n}\n\n/**\n * TODO: Use this function to create the input required to make the action call\n */\nconst createInput = (args: Msdyn365.ICreateActionContext): Msdyn365.IActionInput => {\n if (args && args.requestContext) {\n return new GetSeriesProductCategoryMappingInput(args.requestContext);\n }\n throw new Error('Please specify categoryId query string in request.');\n};\n\n/**\n * TODO: Use this function to call your action and process the results as needed\n */\nasync function action(\n input: GetSeriesProductCategoryMappingInput,\n ctx: Msdyn365.IActionContext\n): Promise {\n // const apiSettings = Msdyn365.msdyn365Commerce.apiSettings;\n\n // TODO: Uncomment the below line to get the value from a service\n // const response = await Msdyn365.sendRequest('/get/example/id/1', 'get');\n const seriesProductCategoryMapping = await getCategoryStructureProductSeriesDataControllerAsync(\n { callerContext: ctx, bypassCache: 'none' },\n input.categoryId ?? 0\n );\n // console.log(seriesProductCategoryMapping);\n return seriesProductCategoryMapping;\n}\n\nexport default Msdyn365.createObservableDataAction({\n action: >action,\n // TODO: Give your data action a unique id\n id: 'GetSeriesProductCategoryMapping',\n input: createInput\n // TODO: Uncomment the below line if this is a meant to be a batched data action\n // isBatched: true\n});\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport * as Msdyn365 from '@msdyn365-commerce/core';\nimport { generateCacheKey, parameterize } from '@msdyn365-commerce-modules/retail-actions';\nimport { getSubCategoryStructureControllerAsync } from './DataActionExtension.g';\nimport { ISubCategoryStructureEntity } from './DataServiceEntities.g';\n\n/**\n * GetSubcategories Input Action\n */\nexport class GetSubcategoriesInput implements Msdyn365.IActionInput {\n // TODO: Construct the input needed to run the action\n public categoryId?: number;\n public categorySlug?: string;\n private readonly apiSettings: Msdyn365.ICommerceApiSettings;\n\n constructor(requestContext: Msdyn365.IRequestContext) {\n let categoryId;\n let categorySlug;\n if (requestContext.query && requestContext.query.categoryId) {\n categoryId = Number(requestContext.query.categoryId);\n\n if (Number.isNaN(categoryId)) {\n throw new Error('Failed to cast category id into a number.');\n }\n } else if (requestContext.urlTokens && requestContext.urlTokens.recordId) {\n categoryId = Number(requestContext.urlTokens.recordId);\n if (Number.isNaN(categoryId)) {\n throw new Error('Failed to cast category id into a number.');\n }\n } else if (requestContext.urlTokens && requestContext.urlTokens.categories && requestContext.urlTokens.categories.length > 0) {\n const categories: string[] = (requestContext.urlTokens.categories);\n\n if (categories.length === 0) {\n throw new Error('Failed to get category name from urlTokens');\n }\n\n // TODO: fix getParameterizeFeatureFlags to take requestContext as input.\n const tempActionContext = {\n requestContext: requestContext\n };\n categorySlug = `/${categories\n .map(category => {\n // @ts-expect-error TODO: fix getParameterizeFeatureFlags to take requestContext as an input\n const parameterizeFeatureFlags: IParameterizeFeatureFlags = getParameterizeFeatureFlags(tempActionContext);\n return parameterize(category, undefined, parameterizeFeatureFlags);\n })\n .join('/')}`;\n }\n this.categoryId = categoryId;\n this.categorySlug = categorySlug;\n this.apiSettings = requestContext.apiSettings;\n }\n\n // TODO: Determine if the results of this get action should cache the results and if so provide\n // a cache object type and an appropriate cache key\n public getCacheKey = () =>\n generateCacheKey(\n this.apiSettings,\n { key: 'base', value: 'GetSubCategories' },\n { key: 'categoryId', value: this.categoryId },\n { key: 'categorySlug', value: this.categorySlug }\n );\n public getCacheObjectType = () => 'GetSubCategoryStructureEntity';\n public dataCacheType = (): Msdyn365.CacheType => 'request';\n}\n\n// TODO: Create a data model here or import one to capture the response of the action\nexport interface IGetSubcategoriesData {\n text: string;\n}\n\n/**\n * TODO: Use this function to create the input required to make the action call\n */\nconst createGetSubcategoriesInput = (args: Msdyn365.ICreateActionContext>): Msdyn365.IActionInput => {\n if (args && args.requestContext) {\n return new GetSubcategoriesInput(args.requestContext);\n }\n throw new Error('Please specify categoryId query string in request.');\n};\n\n/**\n * TODO: Use this function to call your action and process the results as needed\n */\nasync function GetSubCategoriesAction(input: GetSubcategoriesInput, ctx: Msdyn365.IActionContext): Promise {\n // const apiSettings = Msdyn365.msdyn365Commerce.apiSettings;\n const getSubcategoryInput = new GetSubcategoriesInput(ctx.requestContext);\n const subcategories = await getSubCategoryStructureControllerAsync(\n { callerContext: ctx, bypassCache: 'none' },\n getSubcategoryInput.categoryId ?? 0\n );\n\n return subcategories;\n\n // TODO: Uncomment the below line to get the value from a service\n // const response = await Msdyn365.sendRequest('/get/example/id/1', 'get');\n}\n\nexport default Msdyn365.createObservableDataAction({\n action: >GetSubCategoriesAction,\n // TODO: Give your data action a unique id\n id: 'GetSubcategories',\n input: createGetSubcategoriesInput\n // TODO: Uncomment the below line if this is a meant to be a batched data action\n // isBatched: true\n});\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/get-current-category.action';\n binding.dataActions[actionPath] = require('partner/actions/get-current-category.action');\n registerActionId(actionPath);\n }\n\n { \n const actionPath = 'actions/get-is-request-assistance-product.action';\n binding.dataActions[actionPath] = require('partner/actions/get-is-request-assistance-product.action');\n registerActionId(actionPath);\n }\n\n { \n const actionPath = 'actions/get-series-product-category-mapping.action';\n binding.dataActions[actionPath] = require('partner/actions/get-series-product-category-mapping.action');\n registerActionId(actionPath);\n }\n\n { \n const actionPath = 'actions/get-subcategories.action';\n binding.dataActions[actionPath] = require('partner/actions/get-subcategories.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":["GetCurrentCategoryInput","constructor","requestContext","categoryId","categorySlug","getCacheKey","generateCacheKey","this","apiSettings","key","value","getCacheObjectType","dataCacheType","query","Number","isNaN","Error","urlTokens","recordId","categories","length","tempActionContext","map","category","parameterizeFeatureFlags","getParameterizeFeatureFlags","parameterize","undefined","join","Msdyn365","action","async","input","ctx","_getSubcategoryInput$","getSubcategoryInput","currentCategory","getCategoryDetailsControllerAsync","callerContext","bypassCache","id","args","GetIsRequestAssistanceProductInput","productId","getISRequestAssitanceProductActionAsync","idColEntry","getSelectedProductIdFromActionInput","GetSeriesProductCategoryMappingInput","_input$categoryId","getCategoryStructureProductSeriesDataControllerAsync","GetSubcategoriesInput","getSubCategoryStructureControllerAsync","binding","modules","dataActions","registerActionId","actionPath","default","prototype","Object","keys","forEach","exportName","Action","require","window","__bindings__","_objectSpread","packageDataActions","module","exports","React","ReactDOM"],"sourceRoot":""}