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U,qBACXklB,GAAclO,GAAc+b,EAAoB7N,EAAYra,EAAQ3L,KAI7Ea,IAAAA,cAAC+mB,EAAAA,KAAIpgB,OAAAC,OAAA,GAAK4e,GACLM,EACA1hB,EAAMnR,OAAOs1B,wBAA0BR,EAAe3jB,GAASmjB,EAAmBnjB,GAClFkhB,0BCzWrBuO,EAAOC,QAAU9zB,2BCAjB6zB,EAAOC,QAAUC","sources":["webpack://Msdyn365.Commerce.Online/./src/actions/getProductsSalesAgreement.ts?015c","webpack://Msdyn365.Commerce.Online/./src/modules/search-result-container/actions/base-collection-action.ts?b97d","webpack://Msdyn365.Commerce.Online/./src/modules/search-result-container/actions/get-custom-products-trade-agreements.ts?89cf","webpack://Msdyn365.Commerce.Online/./src/modules/search-result-container/actions/get-full-products-by-collection.ts?a9e5","webpack://Msdyn365.Commerce.Online/./src/modules/search-result-container/actions/get-mapped-search-configuration.ts?6e69","webpack://Msdyn365.Commerce.Online/./src/modules/search-result-container/actions/get-refiners-for-collection.ts?3c59","webpack://Msdyn365.Commerce.Online/./src/modules/search-result-container/actions/get-product-refiner-hierarchy.ts?6258","webpack://Msdyn365.Commerce.Online/./src/modules/search-result-container/actions/url-utils.ts?4658","webpack://Msdyn365.Commerce.Online/./src/modules/search-result-container/components/product-search-result-items.tsx?cb8c","webpack://Msdyn365.Commerce.Online/./src/modules/search-result-container/list-page-state.ts?b1f9","webpack://Msdyn365.Commerce.Online/./src/modules/search-result-container/components/utilities.ts?8bea","webpack://Msdyn365.Commerce.Online/./src/modules/search-result-container/components/choice-summary.tsx?6a2f","webpack://Msdyn365.Commerce.Online/./src/modules/search-result-container/components/error-message.tsx?4674","webpack://Msdyn365.Commerce.Online/./src/modules/search-result-container/components/feature-search-result-item.tsx?1d7b","webpack://Msdyn365.Commerce.Online/./src/modules/search-result-container/components/link.tsx?7dca","webpack://Msdyn365.Commerce.Online/./src/modules/search-result-container/components/modal.tsx?784e","webpack://Msdyn365.Commerce.Online/./src/modules/search-result-container/components/range-refine-item.tsx?5c74","webpack://Msdyn365.Commerce.Online/./src/modules/search-result-container/components/refine-item.tsx?6e95","webpack://Msdyn365.Commerce.Online/./src/modules/search-result-container/components/refine-submenu.tsx?095c","webpack://Msdyn365.Commerce.Online/./src/modules/search-result-container/components/separator.tsx?38b9","webpack://Msdyn365.Commerce.Online/./src/modules/search-result-container/components/title.tsx?c1cb","webpack://Msdyn365.Commerce.Online/./src/modules/search-result-container/search-result-container.props.autogenerated.ts?d341","webpack://Msdyn365.Commerce.Online/./src/modules/search-result-container/search-result-container.tsx?0acf","webpack://Msdyn365.Commerce.Online/./src/modules/search-result-container/search-result-container.view.tsx?b226","webpack://Msdyn365.Commerce.Online/./src/themes/adventureworks/views/search-result-container.view.tsx?8798","webpack://Msdyn365.Commerce.Online/./lib/search-result-container/module-registration.js?8625","webpack://Msdyn365.Commerce.Online/./src/modules/fabrikam/views/search-result-container.view.tsx?89df","webpack://Msdyn365.Commerce.Online/./src/modules/search-result-container/search-result-container.view.tsx?b779","webpack://Msdyn365.Commerce.Online/./src/modules/adventureworks/views/components/product.component.tsx?fd23","webpack://Msdyn365.Commerce.Online/./src/modules/adventureworks/views/search-result-container.view.tsx?6e86","webpack://Msdyn365.Commerce.Online/external var \"React\"?0d3b","webpack://Msdyn365.Commerce.Online/external var \"ReactDOM\"?853b"],"sourcesContent":["import { AsyncResult, callActionOrExecute, DataServiceQuery, IContext, IDataServiceRequest } from '@msdyn365-commerce/retail-proxy';\r\n// @ts-ignore\r\nimport * as EntityClasses from '@msdyn365-commerce/retail-proxy/dist/Entities/CommerceModels.g';\r\nimport * as DataServiceEntities from './AlternateItemsEntity.g';\r\n\r\nfunction getProductsSalesAgreementQuery(): DataServiceQuery {\r\n return new DataServiceQuery();\r\n }\r\n\r\n\r\nexport function getProductsSalesAgreementInput (\r\n productRecIds:\r\n number[]\r\n): IDataServiceRequest {\r\nconst query = getProductsSalesAgreementQuery();\r\nreturn query.createDataServiceRequestForOperation(\r\n 'GetProductsSalesAgreement',\r\n true,\r\n DataServiceEntities.GCGetCustomTradeAgreementResponseExtensionClass\r\n ,\r\n 'false',\r\n { bypassCache: 'get', returnEntity: 'DataServiceEntities.IGCGetCustomTradeAgreementResponse' },\r\n {\r\n ProductRecIds: productRecIds\r\n }\r\n);\r\n}\r\n\r\nexport function getProductsSalesAgreementAsync (\r\n context: IContext, productRecIds:\r\n number[]\r\n ): AsyncResult {\r\n const request = getProductsSalesAgreementInput(productRecIds);\r\n return callActionOrExecute(request, context.callerContext);\r\n }","/*--------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * See License.txt in the project root for license information.\n *--------------------------------------------------------------*/\n\n/* eslint-disable no-duplicate-imports */\nimport {\n CacheType,\n IActionInput,\n IAny,\n ICommerceApiSettings,\n ICreateActionContext,\n IGeneric\n} from '@msdyn365-commerce/core';\nimport { convertToString, IQueryResultSettings, ProductRefinerValue, SortColumn } from '@msdyn365-commerce/retail-proxy';\nimport {\n buildCacheKey,\n QueryResultSettingsProxy\n} from '@msdyn365-commerce-modules/retail-actions';\nimport { toJS } from 'mobx';\n\nimport { hydrateRefinersFromUrl } from './url-utils';\n\n/**\n * Export listPageType.\n */\nexport type listPageType = 'Category' | 'Search' | 'Unknown';\n\n/**\n * Get include attributes from config.\n * @param inputData - ICreateActionContext.\n * @returns Boolean.\n */\nfunction getIncludeAttributes(inputData: ICreateActionContext, IGeneric>): boolean {\n if (inputData &&\n inputData.config &&\n inputData.config.includeAttributes !== undefined &&\n inputData.config.includeAttributes === true) {\n return true;\n }\n return false;\n}\n\n/**\n * Get updateRefinerPanel from config.\n * @param inputData - ICreateActionContext.\n * @returns Boolean.\n */\nfunction getUpdateRefinerPanel(inputData: ICreateActionContext, IGeneric>): boolean {\n return !!inputData.config?.updateRefinerPanel;\n}\n\n/**\n * BaseCollection Action Input.\n */\nexport class BaseCollectionInput implements IActionInput {\n public pageType: listPageType;\n\n public category: number | undefined;\n\n public searchText: string | undefined;\n\n public refiners: ProductRefinerValue[];\n\n public queryResultSettings: IQueryResultSettings;\n\n public apiSettings: ICommerceApiSettings;\n\n public includeAttributes: boolean | undefined;\n\n public locale?: string;\n\n public isUpdateRefinerPanel?: boolean;\n\n public constructor(\n pageType: listPageType,\n apiSettings: ICommerceApiSettings,\n queryResultSettings: IQueryResultSettings,\n refiners: ProductRefinerValue[],\n category: number | undefined,\n searchText: string | undefined,\n includeAttributes: boolean | undefined,\n isUpdateRefinerPanel?: boolean | undefined,\n locale?: string\n ) {\n this.pageType = pageType;\n this.apiSettings = apiSettings;\n this.category = category;\n this.searchText = searchText;\n this.queryResultSettings = queryResultSettings;\n this.refiners = refiners;\n this.includeAttributes = includeAttributes;\n this.isUpdateRefinerPanel = isUpdateRefinerPanel;\n this.locale = locale;\n }\n\n public getCacheKey = () => {\n const queryResultSettings = {\n ...this.queryResultSettings.Paging,\n ...toJS(this.queryResultSettings.Sorting)\n };\n\n const cacheKey = buildCacheKey(\n `${this.pageType}-${this.locale}-${this.category || this.searchText}-${this.refiners.map(refiner => `${String(refiner.RefinerRecordId) + (refiner.LeftValueBoundString || '') + (refiner.RightValueBoundString || '')}-`)}-${convertToString(queryResultSettings)}`,\n this.apiSettings, this.locale\n );\n return cacheKey;\n };\n\n public getCacheObjectType = () => 'CollectionActionResult';\n\n public dataCacheType = (): CacheType => 'request';\n}\n\n// TODO: Create a data model here or import one to capture the response of the action\nexport interface IGetFullProductsByCollectionData {\n text: string;\n}\n\nexport type CollectionClassConstructor = new (\n pageType: listPageType,\n apiSettings: ICommerceApiSettings,\n queryResultSettings: IQueryResultSettings,\n refiners: ProductRefinerValue[],\n category: number | undefined,\n searchText: string | undefined,\n includeAttributes: boolean | undefined,\n isUpdateRefinerPanel?: boolean | undefined,\n locale?: string\n) => BaseCollectionInput;\n\n/**\n * TODO: Use this function to create the input required to make the action call.\n * @param args\n * @param inputClassConstuctor\n */\nexport const createBaseCollectionInput = (\n args: ICreateActionContext,\n inputClassConstuctor: CollectionClassConstructor\n): BaseCollectionInput => {\n const pageType =\n args.requestContext.urlTokens.pageType === 'Category' || (args.requestContext.query && args.requestContext.query.categoryId) ? 'Category' : 'Search';\n\n const queryResultSettings = QueryResultSettingsProxy.fromInputData(args).QueryResultSettings;\n const queryRefiners = hydrateRefinersFromUrl(args.requestContext);\n const includeAttributes = getIncludeAttributes(args);\n const isUpdateRefinerPanel = getUpdateRefinerPanel(args);\n\n if (args.requestContext.query && args.requestContext.query.sorting) {\n queryResultSettings.Sorting = { Columns: JSON.parse(decodeURIComponent(args.requestContext.query.sorting)) };\n }\n\n if (pageType === 'Category') {\n return new inputClassConstuctor(\n pageType,\n args.requestContext.apiSettings,\n queryResultSettings,\n queryRefiners,\n +(args.requestContext.urlTokens.itemId || (args.requestContext.query && args.requestContext.query.categoryId) || 0),\n undefined,\n includeAttributes,\n isUpdateRefinerPanel,\n args.requestContext.locale\n );\n } else if (pageType === 'Search' && args.requestContext.query && args.requestContext.query.q) {\n return new inputClassConstuctor(\n pageType,\n args.requestContext.apiSettings,\n queryResultSettings,\n queryRefiners,\n undefined,\n args.requestContext.query.q,\n includeAttributes,\n isUpdateRefinerPanel,\n args.requestContext.locale\n );\n } else if (pageType === 'Search' && args.requestContext.query && args.requestContext.query.productId && args.requestContext.query.recommendation) {\n return new inputClassConstuctor(\n pageType,\n args.requestContext.apiSettings,\n queryResultSettings,\n queryRefiners,\n undefined,\n JSON.stringify({ ProductId: args.requestContext.query.productId, Recommendation: args.requestContext.query.recommendation }),\n includeAttributes,\n isUpdateRefinerPanel,\n args.requestContext.locale\n );\n }\n\n throw new Error('[getFullProductsForCollection]Unable to create input');\n};\n","import {\r\n CacheType,\r\n createObservableDataAction,\r\n IAction,\r\n IActionContext,\r\n IActionInput,\r\n ICreateActionContext\r\n} from '@msdyn365-commerce/core';\r\n\r\nimport { BaseCollectionInput, createBaseCollectionInput } from \"./base-collection-action\";\r\nimport { IGCProductTradeAgreementsEntity } from '../../../actions/AlternateItemsEntity.g';\r\nimport { AsyncResult, ProductSearchCriteria, ProductSearchResult } from '@msdyn365-commerce/retail-proxy';\r\nimport { searchByCriteriaAsync } from '@msdyn365-commerce/retail-proxy/dist/DataActions/ProductsDataActions.g';\r\nimport { getProductsSalesAgreementAsync } from '../../../actions/getProductsSalesAgreement';\r\n\r\n\r\nexport class GetCustomProductsTradeAgreementsCollectionInput extends BaseCollectionInput implements IActionInput {\r\n /**\r\n * The cache object type.\r\n * @returns The cache object type.\r\n */\r\n public getCacheObjectType = (): string => 'GetCustomProductsTradeAgreements';\r\n\r\n /**\r\n * The data cache type.\r\n * @returns The data cache type.\r\n */\r\n public dataCacheType = (): CacheType => {\r\n // if (\r\n // this.pageType !== 'Category' ||\r\n // (this.refiners && this.refiners.length > 0) ||\r\n // (this.queryResultSettings && this.queryResultSettings.Sorting && this.queryResultSettings.Sorting.Columns && this.queryResultSettings.Sorting.Columns.length > 0)\r\n // ) {\r\n // return 'request';\r\n // }\r\n return 'none';\r\n\r\n };\r\n}\r\n\r\nconst createInput = (args: ICreateActionContext<{ itemsPerPage: number ;includedAttributes: boolean | undefined }>): IActionInput => {\r\n const input = createBaseCollectionInput(args, GetCustomProductsTradeAgreementsCollectionInput);\r\n\r\n // Set Top\r\n if (input.queryResultSettings.Paging && args.config) {\r\n input.queryResultSettings.Paging.Top = args.config.itemsPerPage || 1;\r\n }\r\n\r\n // Set Skip\r\n if (input.queryResultSettings.Paging && args.requestContext.query && args.requestContext.query.skip) {\r\n input.queryResultSettings.Paging.Skip = +args.requestContext.query.skip;\r\n }\r\n\r\n input.queryResultSettings.count = true;\r\n\r\n return input;\r\n};\r\n\r\nasync function action(\r\n input: GetCustomProductsTradeAgreementsCollectionInput,\r\n context: IActionContext\r\n): Promise {\r\n let prod : IGCProductTradeAgreementsEntity[]=[];\r\n let promise: AsyncResult;\r\n let searchProductId;\r\n const searchCriteriaInput: ProductSearchCriteria = {};\r\n searchCriteriaInput.Context = { ChannelId: context.requestContext.apiSettings.channelId, CatalogId: context.requestContext.apiSettings.catalogId };\r\n searchCriteriaInput.Refinement = input.refiners;\r\n searchCriteriaInput.IncludeAttributes = input.includeAttributes;\r\n searchCriteriaInput.SkipVariantExpansion = true;\r\n const defaultNumber: number = 0;\r\n\r\n if (input.pageType === 'Category' || (context.requestContext.query && context.requestContext.query.categoryId)) {\r\n if (input.category) {\r\n searchCriteriaInput.CategoryIds = [input.category || defaultNumber];\r\n promise = searchByCriteriaAsync(\r\n {\r\n callerContext: context,\r\n queryResultSettings: input.queryResultSettings\r\n },\r\n searchCriteriaInput\r\n );\r\n } else {\r\n throw new Error(\r\n '[GetFullProductsForCollection]Category Page Detected, but no global categoryId found'\r\n );\r\n }\r\n } else if (input.searchText && (context.requestContext.query && context.requestContext.query.q)) {\r\n searchCriteriaInput.SearchCondition = input.searchText;\r\n promise = searchByCriteriaAsync(\r\n {\r\n callerContext: context,\r\n queryResultSettings: input.queryResultSettings\r\n },\r\n searchCriteriaInput\r\n );\r\n } else if (input.searchText && (context.requestContext.query && context.requestContext.query.productId && context.requestContext.query.recommendation)) {\r\n const searchObject = JSON.parse(input.searchText);\r\n searchProductId = Number(searchObject.ProductId);\r\n if (Number.isNaN(searchProductId)) {\r\n throw new Error('Failed to cast search product id into a number.');\r\n } else if (!searchObject.Recommendation) {\r\n throw new Error('Failed to retrieve the Recommendation.');\r\n } else {\r\n searchCriteriaInput.RecommendationListId = searchObject.Recommendation;\r\n searchCriteriaInput.Ids = [searchProductId || defaultNumber];\r\n promise = searchByCriteriaAsync(\r\n {\r\n callerContext: context,\r\n queryResultSettings: input.queryResultSettings\r\n },\r\n searchCriteriaInput\r\n );\r\n }\r\n } else {\r\n throw new Error(\r\n '[GetFullProductsForCollection]Search Page Detected, but no q= or productId= query parameter found'\r\n );\r\n }\r\n\r\n const productSearchResults = await promise;\r\n if(productSearchResults)\r\n {\r\n const prodRecId:number[] =[];\r\n productSearchResults.forEach((product,idx)=>{\r\n prodRecId.push(product.RecordId);\r\n });\r\n var productTradeAgreement = await getProductsSalesAgreementAsync({callerContext: context},prodRecId);\r\n if(productTradeAgreement && productTradeAgreement.gcProductTradeAgreementsEntity)\r\n {\r\n prod = productTradeAgreement.gcProductTradeAgreementsEntity;\r\n }\r\n }\r\n return prod;\r\n}\r\n\r\nexport const actionDataAction = createObservableDataAction({\r\n id: 'GetCustomProductsTradeAgreements',\r\n action: >action,\r\n input: createInput\r\n});\r\n\r\nexport default actionDataAction;","/*--------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * See License.txt in the project root for license information.\n *--------------------------------------------------------------*/\n\n/* eslint-disable no-duplicate-imports */\nimport MsDyn365, {\n CacheType,\n createObservableDataAction,\n IAction,\n IActionContext,\n IActionInput,\n ICreateActionContext\n} from '@msdyn365-commerce/core';\nimport { AsyncResult, ChannelInventoryConfiguration, ProductSearchCriteria, ProductSearchResult } from '@msdyn365-commerce/retail-proxy';\nimport { searchByCriteriaAsync } from '@msdyn365-commerce/retail-proxy/dist/DataActions/ProductsDataActions.g';\nimport { getInventoryConfigurationAsync } from '@msdyn365-commerce/retail-proxy/dist/DataActions/StoreOperationsDataActions.g';\nimport { ArrayExtensions, generateProductImageUrl, InventoryLevels, ObjectExtensions } from '@msdyn365-commerce-modules/retail-actions';\nimport { IFullProductsSearchResultsWithCount } from './IFullProductsSearchResultsWithCount';\nimport { ListPageStateInput } from '../list-page-state';\nimport {\n BaseCollectionInput,\n createBaseCollectionInput\n} from './base-collection-action';\n\nimport {//getProductCollectionEtaAction,ProductCollectionEtaInput,\n productETADtl} from '../../../actions/product-collection-eta.action';\nimport {//getProductsAlternateItemsAction,GetAlternateItemsCollectionInput,\n IAlternateProductData} from '../../../actions/get-alternate-items-collection.action';\n\nexport interface ProductSearchResults extends ProductSearchResult {\n ETAVal?: productETADtl;\n AlternateItemRep?: IAlternateProductData;\n}\n/**\n * GetFullProductsByCollection Action Input.\n */\nexport class GetFullProductsByCollectionInput extends BaseCollectionInput implements IActionInput {\n /**\n * The cache object type.\n * @returns The cache object type.\n */\n public getCacheObjectType = (): string => 'FullProductSearchResult';\n\n /**\n * The data cache type.\n * @returns The data cache type.\n */\n public dataCacheType = (): CacheType => {\n // if (\n // this.pageType !== 'Category' ||\n // (this.refiners && this.refiners.length > 0) ||\n // (this.queryResultSettings && this.queryResultSettings.Sorting && this.queryResultSettings.Sorting.Columns && this.queryResultSettings.Sorting.Columns.length > 0)\n // ) {\n // return 'request';\n // }\n return 'none';\n\n };\n}\n\n/**\n * This setting defines inventory filtering options.\n */\nexport enum ProductListInventoryFilteringOptions {\n\n /**\n * Filter out all products out of stock.\n */\n HideOOS = 'hideOOS',\n\n /**\n * Sort products by availability, OOS goes last.\n */\n SortOOS = 'sortOOS',\n\n /**\n * No filtering selected.\n */\n Default = 'default'\n}\n\n/**\n * CreateInput function which creates and actionInput used to fetch products for a list page.\n * @param args - The API arguments.\n * @returns IActionInput - The action input.\n */\nconst createInput = (args: ICreateActionContext<{ itemsPerPage: number ;includedAttributes: boolean | undefined }>): IActionInput => {\n const input = createBaseCollectionInput(args, GetFullProductsByCollectionInput);\n\n // Set Top\n if (input.queryResultSettings.Paging && args.config) {\n input.queryResultSettings.Paging.Top = args.config.itemsPerPage || 1;\n }\n\n // Set Skip\n if (input.queryResultSettings.Paging && args.requestContext.query && args.requestContext.query.skip) {\n input.queryResultSettings.Paging.Skip = +args.requestContext.query.skip;\n }\n\n input.queryResultSettings.count = true;\n\n return input;\n};\n\n/**\n * Finds whether a product is out of stock based on the attribute.\n * @param product - The product.\n * @param channelInventoryConfiguration - The channel configuration.\n * @returns True if is OOS, false otherwise.\n */\nfunction isOutOfStock(product: ProductSearchResult, channelInventoryConfiguration: ChannelInventoryConfiguration): boolean {\n if (!ArrayExtensions.hasElements(product.AttributeValues)) {\n // If no attributes then assume is in stock\n return false;\n }\n for (const attribute of product.AttributeValues) {\n if (attribute.RecordId === channelInventoryConfiguration.InventoryProductAttributeRecordId &&\n attribute.TextValue === channelInventoryConfiguration.InventoryOutOfStockAttributeValueText) {\n // The matching recordId indicates that is the inventory attribute\n // if the text value are the same then is out of stock.\n return true;\n }\n }\n\n return false;\n}\n\n/**\n * Returns only in stock products.\n * @param products - The product.\n * @param channelInventoryConfiguration - The channel configuration.\n * @returns Filtered product search result.\n */\nfunction filterOutOfStockProducts(\n products: ProductSearchResult[],\n channelInventoryConfiguration: ChannelInventoryConfiguration): ProductSearchResult[] {\n if (!ArrayExtensions.hasElements(products)) {\n return [];\n }\n const filteredProducts: ProductSearchResult[] = [];\n\n for (const product of products) {\n if (!isOutOfStock(product, channelInventoryConfiguration)) {\n filteredProducts.push(product);\n }\n }\n return filteredProducts;\n}\n\n/**\n * Returns sorted products based on availability.\n * @param products - The product.\n * @param channelInventoryConfiguration - The channel configuration.\n * @returns Sorted product search result.\n */\nfunction sortsProductsBasedOnAvailability(\n products: ProductSearchResult[],\n channelInventoryConfiguration: ChannelInventoryConfiguration): ProductSearchResult[] {\n\n if (!ArrayExtensions.hasElements(products)) {\n return [];\n }\n const inStockProducts: ProductSearchResult[] = [];\n const outOfStockProducts: ProductSearchResult[] = [];\n\n for (const product of products) {\n if (isOutOfStock(product, channelInventoryConfiguration)) {\n outOfStockProducts.push(product);\n } else {\n inStockProducts.push(product);\n }\n }\n return inStockProducts.concat(outOfStockProducts);\n}\n\n/**\n * Returns list of products based on inventory information.\n * @param products - The products.\n * @param channelInventoryConfiguration - The channel configuration.\n * @param context - The context.\n * @returns List of product based on the inventory information.\n */\nexport function returnProductsBasedOnInventoryInformation(\n products: ProductSearchResult[],\n channelInventoryConfiguration: ChannelInventoryConfiguration,\n context: IActionContext): ProductSearchResult[] {\n if (!ArrayExtensions.hasElements(products) || ObjectExtensions.isNullOrUndefined(channelInventoryConfiguration)) {\n return [];\n }\n switch (context.requestContext.app.config.productListInventoryDisplay) {\n case ProductListInventoryFilteringOptions.HideOOS:\n return filterOutOfStockProducts(products, channelInventoryConfiguration);\n case ProductListInventoryFilteringOptions.SortOOS:\n return sortsProductsBasedOnAvailability(products, channelInventoryConfiguration);\n default:\n return products;\n }\n}\n\n/**\n * Returns list of products based on inventory information.\n * @param productSearchResults - The products.\n * @param context - The context.\n * @param metadataCount - The metadata count.\n * @returns List of product based on the inventory information.\n */\nexport async function returnProducts(\n productSearchResults: ProductSearchResult[],\n context: IActionContext,\n metadataCount: number | undefined): Promise {\n\n const defaultProductCount: number = 0;\n\n const productSearchResultsWithImages = productSearchResults.map(productSearchResult => {\n const newImageUrl = generateProductImageUrl(\n productSearchResult,\n context.requestContext.apiSettings\n );\n\n if (newImageUrl) {\n productSearchResult.PrimaryImageUrl = newImageUrl;\n }\n\n return (productSearchResult);\n });\n\n // If inventory level is threshold or inventory check is disabled then return the list of products without the inventory configuration\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access -- read config file.\n if (context.requestContext.app.config.inventoryLevel === InventoryLevels.threshold || context.requestContext.app.config.enableStockCheck === false) {\n return {\n products: productSearchResultsWithImages,\n count: metadataCount ?? defaultProductCount\n };\n }\n const channelInventoryConfiguration = await getInventoryConfigurationAsync({ callerContext: context });\n\n const mappedProducts = productSearchResultsWithImages.map(productSearchResult => {\n if (ArrayExtensions.hasElements(productSearchResult.AttributeValues)) {\n for (const element of productSearchResult.AttributeValues) {\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- need check.\n if (channelInventoryConfiguration &&\n element.RecordId !== undefined &&\n element.RecordId === channelInventoryConfiguration.InventoryProductAttributeRecordId &&\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access -- read config file.\n context.requestContext.app.config.inventoryRanges !== 'all' &&\n element.TextValue !== channelInventoryConfiguration.InventoryOutOfStockAttributeValueText) {\n // If same RecordId then it means that is the Inventory attribute\n // Based on the inventory range (and filtering options), the inventory label will be displayed\n // If Inventory range is 'All' then in stock and out of stock labels are shown, else only OOS\n // if the text value is different that the channelInventoryConfiguration.InventoryOutOfStockAttributeValueText then is in stock\n element.TextValue = '';\n }\n }\n }\n\n return (productSearchResult);\n });\n const productsBasedOnInventory = returnProductsBasedOnInventoryInformation(mappedProducts, channelInventoryConfiguration, context);\n\n try\n {\n // const ary: ProductCollectionEtaInput = new ProductCollectionEtaInput(productSearchResults.map((n) => n.ItemId!),context);\n // const productETAs = await getProductCollectionEtaAction( ary, context);\n // const ary2: GetAlternateItemsCollectionInput = new GetAlternateItemsCollectionInput(productSearchResults.map((n) => n.ItemId!),context);\n // const alterProds = await getProductsAlternateItemsAction( ary2, context);\n const prodDtls: ProductSearchResults[] = productsBasedOnInventory.map((data,index)=>{\n const prod:ProductSearchResults = data;\n prod.ETAVal = {};\n prod.AlternateItemRep = {ItemId: '',currentProd:undefined,serviceResp:undefined};\n return prod;\n });\n return {\n products: prodDtls,\n count: metadataCount ?? defaultProductCount,\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- check config.\n channelInventoryConfigurationId: channelInventoryConfiguration ? channelInventoryConfiguration.InventoryProductAttributeRecordId : undefined\n };\n }\n catch(err)\n {\n console.log(err);\n }\n\n return {\n products: productsBasedOnInventory,\n count: metadataCount ?? defaultProductCount,\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- check config.\n channelInventoryConfigurationId: channelInventoryConfiguration ? channelInventoryConfiguration.InventoryProductAttributeRecordId : undefined\n };\n}\n\n/**\n * Action function to fetch products for a list page.\n * @param input - The input.\n * @param context - The context.\n * @returns IFullProductsSearchResultsWithCount - The full product search result with count.\n */\nasync function action(\n input: GetFullProductsByCollectionInput,\n context: IActionContext\n): Promise {\n\n let promise: AsyncResult;\n let searchProductId;\n const searchCriteriaInput: ProductSearchCriteria = {};\n searchCriteriaInput.Context = { ChannelId: context.requestContext.apiSettings.channelId, CatalogId: context.requestContext.apiSettings.catalogId };\n searchCriteriaInput.Refinement = input.refiners;\n searchCriteriaInput.IncludeAttributes = input.includeAttributes;\n searchCriteriaInput.SkipVariantExpansion = true;\n const defaultNumber: number = 0;\n\n if (input.pageType === 'Category' || (context.requestContext.query && context.requestContext.query.categoryId)) {\n if (input.category) {\n searchCriteriaInput.CategoryIds = [input.category || defaultNumber];\n promise = searchByCriteriaAsync(\n {\n callerContext: context,\n queryResultSettings: input.queryResultSettings\n },\n searchCriteriaInput\n );\n } else {\n throw new Error(\n '[GetFullProductsForCollection]Category Page Detected, but no global categoryId found'\n );\n }\n } else if (input.searchText && (context.requestContext.query && context.requestContext.query.q)) {\n searchCriteriaInput.SearchCondition = input.searchText;\n promise = searchByCriteriaAsync(\n {\n callerContext: context,\n queryResultSettings: input.queryResultSettings\n },\n searchCriteriaInput\n );\n } else if (input.searchText && (context.requestContext.query && context.requestContext.query.productId && context.requestContext.query.recommendation)) {\n const searchObject = JSON.parse(input.searchText);\n searchProductId = Number(searchObject.ProductId);\n if (Number.isNaN(searchProductId)) {\n throw new Error('Failed to cast search product id into a number.');\n } else if (!searchObject.Recommendation) {\n throw new Error('Failed to retrieve the Recommendation.');\n } else {\n searchCriteriaInput.RecommendationListId = searchObject.Recommendation;\n searchCriteriaInput.Ids = [searchProductId || defaultNumber];\n promise = searchByCriteriaAsync(\n {\n callerContext: context,\n queryResultSettings: input.queryResultSettings\n },\n searchCriteriaInput\n );\n }\n } else {\n throw new Error(\n '[GetFullProductsForCollection]Search Page Detected, but no q= or productId= query parameter found'\n );\n }\n\n const productSearchResults = await promise;\n\n // Update ListPageState For SSR\n if (!MsDyn365.isBrowser) {\n context.update(new ListPageStateInput(), { totalProductCount: promise.metadata.count ?? defaultNumber, activeFilters: input.refiners });\n }\n\n return returnProducts(productSearchResults, context, promise.metadata.count);\n}\n\nexport const actionDataAction = createObservableDataAction({\n id: '@msdyn365-commerce-modules/search-result-container/get-full-products-by-collection',\n action: >action,\n input: createInput\n});\n\nexport default actionDataAction;\n","/*--------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * See License.txt in the project root for license information.\n *--------------------------------------------------------------*/\n\n/* eslint-disable no-duplicate-imports */\nimport { CacheType, createObservableDataAction, IAction, IActionContext, IActionInput, IAny, ICommerceApiSettings, ICreateActionContext, IGeneric } from '@msdyn365-commerce/core';\nimport { SortColumn } from '@msdyn365-commerce/retail-proxy';\nimport { getSearchConfigurationAsync } from '@msdyn365-commerce/retail-proxy/dist/DataActions/StoreOperationsDataActions.g';\nimport { buildCacheKey } from '@msdyn365-commerce-modules/retail-actions';\nimport { MappedSearchConfiguration } from './MappedSearchConfiguration';\n\n// TODO: import from commerce entities when available\ninterface SearchConfiguration {\n ProductSortColumns?: SortColumn[];\n}\n\n\nexport const sortOptions = {\n sortByOptionRelevanceDesc: 'Ranking-Desc',\n sortByOptionRatingAsc: 'AverageRating-Asc',\n sortByOptionRatingDesc: 'AverageRating-Desc',\n sortByOptionNameAsc: 'Name-Asc',\n sortByOptionNameDesc: 'Name-Desc',\n sortByOptionPriceAsc: 'Price-Asc',\n sortByOptionPriceDesc: 'Price-Desc',\n sortByOptionBestSelling: 'BestSelling',\n sortByOptionNewScore: 'NewScore',\n sortByOptionTrendingScore: 'TrendingScore'\n};\n\n/**\n * ActionInput class for the get-mapped-search-configuration Data Action.\n */\nexport class MappedSearchInput implements IActionInput {\n private readonly apiSettings: ICommerceApiSettings;\n\n constructor(apiSettings: ICommerceApiSettings) {\n this.apiSettings = apiSettings;\n }\n\n public getCacheKey = () => buildCacheKey('MappedSearchInput', this.apiSettings);\n\n public getCacheObjectType = () => 'MappedSearchInput';\n\n public dataCacheType = (): CacheType => 'request';\n}\n\n/**\n * Get a mapped search configuration that is easy to use for sorting.\n * @param input\n * @param ctx\n */\nexport async function getMappedSearchConfiguration(input: MappedSearchInput, ctx: IActionContext): Promise {\n return getSearchConfigurationAsync({ callerContext: ctx }).then((searchConfiguration: SearchConfiguration) => {\n return ((searchConfiguration.ProductSortColumns || []).map((sortColumn: SortColumn) => {\n let key = '';\n if (sortColumn.ColumnName) {\n switch (sortColumn.ColumnName.toUpperCase()) {\n case 'NAME':\n key = sortColumn.IsDescending ? sortOptions.sortByOptionNameDesc : sortOptions.sortByOptionNameAsc;\n break;\n case 'PRICE':\n key = sortColumn.IsDescending ? sortOptions.sortByOptionPriceDesc : sortOptions.sortByOptionPriceAsc;\n break;\n case 'AVERAGERATING':\n key = sortColumn.IsDescending ? sortOptions.sortByOptionRatingDesc : sortOptions.sortByOptionRatingAsc;\n break;\n case 'RANKING':\n key = sortOptions.sortByOptionRelevanceDesc;\n break;\n case 'BESTSELLINGSCORE':\n key = sortOptions.sortByOptionBestSelling;\n break;\n case 'NEWSCORE':\n key = sortOptions.sortByOptionNewScore;\n break;\n case 'TRENDINGSCORE':\n key = sortOptions.sortByOptionTrendingScore;\n break;\n default:\n }\n } else {\n ctx.telemetry.warning('[get-mapped-search-configuration] unknown search option');\n }\n if (key) {\n return {\n key,\n sortColumn\n };\n }\n return undefined;\n\n }).filter(Boolean));\n });\n}\n\nexport const createInput = (inputData: ICreateActionContext>): IActionInput => {\n return new MappedSearchInput(inputData.requestContext.apiSettings);\n};\n\nexport const getMappedSearchConfigurationDataAction = createObservableDataAction({\n id: '@msdyn365-commerce-modules/search-result-container/get-mapped-search-configuration',\n action: >getMappedSearchConfiguration,\n input: createInput\n});\n\nexport default getMappedSearchConfigurationDataAction;\n","/*--------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * See License.txt in the project root for license information.\n *--------------------------------------------------------------*/\n\n/* eslint-disable no-duplicate-imports */\nimport { IProductRefinerHierarchy } from '@msdyn365-commerce/commerce-entities';\nimport { createObservableDataAction, IAction, IActionContext, IActionInput, ICreateActionContext } from '@msdyn365-commerce/core';\n\nimport { BaseCollectionInput, createBaseCollectionInput } from './base-collection-action';\nimport { getProductRefinerHierarchy } from './get-product-refiner-hierarchy';\n\n/**\n * Default Category/Product Id Values.\n */\nenum DefaultValues {\n defaultCategoryIdValue = 0,\n defaultProductIdValue = 0\n}\n\n/**\n * Refiners-by-Collection Input action.\n */\nexport class RefinersByCollectionInput extends BaseCollectionInput implements IActionInput {\n public getCacheObjectType = () => 'ProductRefiner';\n\n public dataCacheType = () => {\n if (\n this.pageType !== 'Category' ||\n (this.refiners && this.refiners.length > 0) ||\n (this.queryResultSettings && this.queryResultSettings.Sorting && this.queryResultSettings.Sorting.Columns && this.queryResultSettings.Sorting.Columns.length > 0)\n ) {\n return 'request';\n }\n return 'application';\n\n };\n}\n\n/**\n * Create input method which creates an ActionInput for fetching list page refiners.\n * @param args\n */\nconst createInput = (args: ICreateActionContext): IActionInput => {\n return createBaseCollectionInput(args, RefinersByCollectionInput);\n};\n\n/**\n * Action method which fetches refiners for the given list page.\n * @param input\n * @param ctx\n */\nasync function action(input: RefinersByCollectionInput, ctx: IActionContext): Promise {\n let searchProductId;\n if (input.pageType === 'Category') {\n if (input.category) {\n return getProductRefinerHierarchy(\n {\n CategoryIds: [input.category || DefaultValues.defaultCategoryIdValue],\n Context: {\n ChannelId: input.apiSettings.channelId,\n CatalogId: input.apiSettings.catalogId\n },\n Refinement: input.isUpdateRefinerPanel ? input.refiners : []\n },\n input.queryResultSettings,\n ctx);\n }\n throw new Error('[GetRefinersForCollection]Category Page Detected, but no global categoryId found');\n\n } else {\n if (input.searchText && (ctx.requestContext.query && ctx.requestContext.query.q)) {\n return getProductRefinerHierarchy(\n {\n SearchCondition: input.searchText,\n Context: {\n ChannelId: input.apiSettings.channelId,\n CatalogId: input.apiSettings.catalogId\n },\n Refinement: input.isUpdateRefinerPanel ? input.refiners : []\n },\n input.queryResultSettings,\n ctx);\n }\n if (input.searchText && (ctx.requestContext.query && ctx.requestContext.query.productId)) {\n const searchObject = JSON.parse(input.searchText);\n searchProductId = Number(searchObject.ProductId);\n if (Number.isNaN(searchProductId)) {\n throw new Error('Failed to cast search product id into a number.');\n } else if (!searchObject.Recommendation) {\n throw new Error('Failed to retrieve the Recommendation.');\n } else {\n return getProductRefinerHierarchy(\n {\n Context: {\n ChannelId: input.apiSettings.channelId,\n CatalogId: input.apiSettings.catalogId\n },\n Refinement: input.isUpdateRefinerPanel ? input.refiners : [],\n RecommendationListId: searchObject.Recommendation,\n Ids: [searchProductId || DefaultValues.defaultProductIdValue]\n },\n input.queryResultSettings,\n ctx);\n }\n } else {\n throw new Error(\n '[GetFullProductsForCollection]Search Page Detected, but no q= or productId= query parameter found'\n );\n }\n\n }\n}\n\nexport const actionDataAction = createObservableDataAction({\n id: '@msdyn365-commerce-modules/search-result-container/get-refiners-for-collection',\n action: >action,\n input: createInput\n});\n\nexport default actionDataAction;\n","/*--------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * See License.txt in the project root for license information.\n *--------------------------------------------------------------*/\n\n/* eslint-disable no-duplicate-imports */\nimport { IProductRefinerHierarchy } from '@msdyn365-commerce/commerce-entities';\nimport { IActionContext } from '@msdyn365-commerce/core';\nimport { IQueryResultSettings, ProductRefiner, ProductSearchCriteria } from '@msdyn365-commerce/retail-proxy';\nimport { getProductSearchRefinersAsync } from '@msdyn365-commerce/retail-proxy/dist/DataActions/ProductsDataActions.g';\n\n/**\n * Uses Bulk refiner API to get refiners and child refiner values.\n * @param searchCriteria Product search criteria.\n * @param maxItems Max items.\n * @param queryResultSettings\n * @param ctx Action context.\n */\nexport async function getProductRefinerHierarchy(searchCriteria: ProductSearchCriteria, queryResultSettings: IQueryResultSettings, ctx: IActionContext): Promise {\n return getProductSearchRefinersAsync({ callerContext: ctx, queryResultSettings }, searchCriteria).then((productRefiners: ProductRefiner[]) => {\n if (!productRefiners) {\n ctx.trace('[getRefinersByCriteriaAction] returned no refiners');\n return [];\n }\n\n const result = (productRefiners || []).map((productRefiner: ProductRefiner) => productRefiner);\n\n if (result.length === 0) {\n ctx.trace('[getRefinersByCriteriaAction] returned no IProductRefinerHierarchy objects');\n return [];\n }\n\n return result;\n });\n}\n","/*--------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * See License.txt in the project root for license information.\n *--------------------------------------------------------------*/\n\n/* eslint-disable no-duplicate-imports */\nimport MsDyn365, { IRequestContext } from '@msdyn365-commerce/core';\nimport { ProductRefinerValue, SortColumn } from '@msdyn365-commerce/retail-proxy';\n\n/**\n * Refiner Compression:\n * Refiners contains a non-trivial amount of data that is required to successfully make\n * a refiner-based API call. To allow for deep-linking of refiners in the URL, refiner data\n * must be compressed so that URL max length is not exceeded. Refiners will be compressed into\n * the following array style index-based format:\n * [DataTypeValue, LeftValueBoundString, RefinerRecordId, RefinerSourceValue, RightValueBoundString, UnitText].\n */\nconst compressedRefinerKeys = ['DataTypeValue', 'LeftValueBoundString', 'RefinerRecordId', 'RefinerSourceValue', 'RightValueBoundString', 'UnitText'];\n\n/**\n * Hydrates compressed refiner data from URL.\n * @param fullUrl The full URL of the page.\n * @param requestContext\n */\nexport const hydrateRefinersFromUrl = (requestContext: IRequestContext): ProductRefinerValue[] => {\n const compressedRefinerArray = parseQueryParam<(string | number)[][]>('refiners', requestContext);\n if (!compressedRefinerArray || compressedRefinerArray.length === 0) {\n return [];\n }\n\n return compressedRefinerArray.map((compressedRefiner) => {\n try {\n const parsedRefiner: ProductRefinerValue = {};\n compressedRefinerKeys.forEach((refinerKey, index) => {\n parsedRefiner[`${refinerKey}`] = compressedRefiner[`${index}`];\n });\n return parsedRefiner;\n } catch {\n return undefined;\n }\n }).filter(Boolean);\n};\n\n/**\n * Compressed a list of refiners for use in URLs.\n * @param refiners The uncompressed refiners.\n */\nexport const compressRefiners = (refiners: ProductRefinerValue[]) => {\n const compressedRefiners: (string | number)[][] = [];\n\n refiners.forEach((refiner) => {\n const compressedRefiner: (string | number)[] = [];\n compressedRefinerKeys.forEach((refinerKey) => {\n compressedRefiner.push(refiner[`${refinerKey}`]);\n });\n compressedRefiners.push(compressedRefiner);\n });\n\n return compressedRefiners;\n};\n\n/**\n * Method which creates a URL contiaining serialized active refiners.\n * @param fullUrl The Current URL of the page.\n * @param refiners The refiners which should be added to the URL.\n * @param sortingColumns\n * @param skipCount\n */\nexport const buildListPageUrl = (fullUrl: URL, refiners?: ProductRefinerValue[], sortingColumns?: SortColumn[], skipCount?: number) => {\n // Refiner Change flow\n if (refiners !== undefined) {\n if (refiners.length === 0) {\n fullUrl.searchParams.delete('refiners');\n } else {\n const sortedRefiners = refiners.sort((first, second) => (first.RefinerRecordId && second.RefinerRecordId &&\n (first.RefinerRecordId > second.RefinerRecordId) ? 1 : -1));\n fullUrl.searchParams.set('refiners', JSON.stringify(compressRefiners(sortedRefiners)));\n }\n\n // Adding or removing a refiner means we want to always load page 1\n fullUrl.searchParams.delete('skip');\n return fullUrl.href;\n }\n\n if (sortingColumns !== undefined) {\n if (sortingColumns.length === 0) {\n fullUrl.searchParams.delete('sorting');\n } else {\n fullUrl.searchParams.set('sorting', JSON.stringify(sortingColumns));\n }\n\n // Changing the sort means always load page 1\n fullUrl.searchParams.delete('skip');\n return fullUrl.href;\n }\n\n if (skipCount) {\n fullUrl.searchParams.set('skip', skipCount.toString());\n }\n\n return fullUrl.href;\n};\n\n/**\n * Parses a query param from the query object of the request context.\n * @param key The query parameter key.\n * @param requestContext The request context.\n */\nexport const parseQueryParam = (key: string, requestContext: IRequestContext): T | null => {\n if (requestContext.query && requestContext.query[`${key}`]) {\n return JSON.parse(decodeURIComponent(requestContext.query[`${key}`]));\n }\n return null;\n};\n\n/**\n * Gets the current URL of the page from the request context.\n * @param requestContext The request context.\n */\nexport const getCurrentUrl = (requestContext: IRequestContext): URL => {\n if (MsDyn365.isBrowser) {\n return new URL(window.location.href);\n }\n\n // NOTE: Typing on requestURL is incorrect\n if (requestContext.url.requestUrl.href) {\n return new URL(requestContext.url.requestUrl.href);\n }\n return new URL((requestContext.url.requestUrl));\n\n};\n","/*--------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * See License.txt in the project root for license information.\n *--------------------------------------------------------------*/\n\n/* eslint-disable no-duplicate-imports */\nimport { IProductsDimensionsAvailabilities } from '@msdyn365-commerce/commerce-entities';\nimport { IPriceComponentResources } from '@msdyn365-commerce/components';\nimport { ProductComponent } from '../../../themes/adventureworks/views/components/product.component';\nimport { ICoreContext, IImageSettings } from '@msdyn365-commerce/core';\nimport { ProductSearchResult } from '@msdyn365-commerce/retail-proxy';\nimport { ProductSearchResults } from '../actions/get-full-products-by-collection';\nimport { ArrayExtensions } from '@msdyn365-commerce-modules/retail-actions';\nimport { ITelemetryContent } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport { ISearchResultContainerResources } from '../search-result-container.props.autogenerated';\nimport { IGCProductTradeAgreementsEntity } from '../../../actions/AlternateItemsEntity.g';\n\ninterface IProductSearchResultItems {\n products: ProductSearchResults[];\n context: ICoreContext;\n resources: ISearchResultContainerResources;\n imageSettings?: IImageSettings;\n moduleType: string;\n moduleId: string;\n allowBackNavigation?: boolean;\n telemetryContent: ITelemetryContent;\n quickviewSlot?: {} | null | undefined;\n productComparisonButton?: {} | null | undefined;\n channelInventoryConfigurationId?: number;\n isPriceMinMaxEnabled?: boolean;\n productsDimensionAvailabilities?: IProductsDimensionsAvailabilities[][];\n isPriceVisible? : boolean;\n productsAgreements?: IGCProductTradeAgreementsEntity[];\n}\n\n/**\n * Returns the product inventory label.\n * @param channelInventoryConfigurationId - The channel configuration Id.\n * @param product - The product.\n * @returns The inventory label.\n */\nfunction getInventoryLabel(channelInventoryConfigurationId: number | undefined, product: ProductSearchResult, isLabelVisible : boolean | undefined): string | undefined {\n if (!channelInventoryConfigurationId || !ArrayExtensions.hasElements(product.AttributeValues)) {\n return undefined;\n }\n const inventoryAttribute = product.AttributeValues.find(attribute => attribute.RecordId === channelInventoryConfigurationId);\n if (inventoryAttribute && isLabelVisible) {\n return inventoryAttribute.TextValue;\n }\n return undefined;\n}\n\nexport const ProductSearchResultItems: React.FC = ({\n products,\n context,\n imageSettings,\n resources,\n moduleType,\n moduleId,\n allowBackNavigation,\n telemetryContent,\n quickviewSlot,\n productComparisonButton,\n channelInventoryConfigurationId,\n isPriceMinMaxEnabled,\n productsDimensionAvailabilities,\n isPriceVisible,\n productsAgreements\n}) => {\n const priceResources: IPriceComponentResources = {\n priceRangeSeparator: resources.priceRangeSeparator\n };\n\n return (\n\n
    \n {products.map((product: ProductSearchResults, index: number) => (\n
  • \n ArrayExtensions.hasElements(dimensionAvailability) &&\n dimensionAvailability[0].masterProductId === product.MasterProductId)}\n isPriceVisible={isPriceVisible}\n productAgreement={productsAgreements && productsAgreements.find(x=>x.ItemId === product.ItemId)}\n />\n
  • \n ))}\n
\n );\n\n};\n","/*--------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * See License.txt in the project root for license information.\n *--------------------------------------------------------------*/\n\n/* eslint-disable no-duplicate-imports */\nimport { IProductRefinerHierarchy } from '@msdyn365-commerce/commerce-entities';\nimport {\n CacheType,\n createObservableDataAction,\n IAction,\n IActionContext,\n IActionInput,\n IAny,\n ICreateActionContext,\n IGeneric\n} from '@msdyn365-commerce/core';\nimport { ProductPrice, ProductRefinerValue, SimpleProduct, SortingInfo } from '@msdyn365-commerce/retail-proxy';\nimport { ProductSearchResults } from './actions/get-full-products-by-collection';\nimport { observable } from 'mobx';\n\nimport { listPageType } from './actions';\n\n/**\n * ListPageState class.\n */\nexport class ListPageState {\n @observable public activeFilters: ProductRefinerValue[] | null = null;\n\n @observable public activeProducts: ProductSearchResults[] = [];\n\n @observable public sortingCritera: SortingInfo | null = null;\n\n @observable public currentPageNumber: number | null = null;\n\n @observable public refiners: IProductRefinerHierarchy[] | null = null;\n\n @observable public totalProductCount: number | undefined;\n\n @observable public pageSize: number = 10;\n\n @observable public pageType: listPageType = 'Unknown';\n\n @observable public featureProduct: SimpleProduct | null = null;\n\n @observable public productPrices: ProductPrice[] | undefined = [];\n}\n\n/**\n * ListPageStateInput - action input.\n */\nexport class ListPageStateInput implements IActionInput {\n public getCacheKey = () => 'ListPageState';\n\n public getCacheObjectType = () => 'ListPageState';\n\n public dataCacheType = (): CacheType => 'request';\n}\n\nexport async function listPageStateAction(\n input: ListPageStateInput,\n ctx: IActionContext\n): Promise {\n return new ListPageState();\n}\n\n/**\n * Create new input for create action.\n * @param inputData\n */\nexport const createListPageInput = (\n inputData: ICreateActionContext>\n): IActionInput => {\n return new ListPageStateInput();\n};\n\n/**\n * ListPageState - create action.\n */\nexport default createObservableDataAction({\n action: >listPageStateAction,\n input: createListPageInput\n});\n","/*--------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * See License.txt in the project root for license information.\n *--------------------------------------------------------------*/\n\n/* eslint-disable no-duplicate-imports */\nimport { ITelemetry } from '@msdyn365-commerce/core';\nimport { AttributeDataType, ProductRefinerValue, RefinerType } from '@msdyn365-commerce/retail-proxy';\n\nimport { IRefineItemToggleNotification } from './refine-item-toggle-notification';\n\n/**\n * Types of product refiner values.\n * @deprecated This will be removed soon. Please, use `AttributeDataType` from `@msdyn365-commerce/retail-proxy` instead.\n * @example\n * ```\n * import { AttributeDataType } from `@msdyn365-commerce/retail-proxy`;\n * ```\n */\nexport enum ProductRefinerValueDataTypeValue {\n\n /**\n * Range slider is used for selections like price.\n * @deprecated This will be removed soon. Please, use `AttributeDataType` from `@msdyn365-commerce/retail-proxy` instead.\n * @example\n * ```\n * import { AttributeDataType } from `@msdyn365-commerce/retail-proxy`;\n * ```\n */\n Range = 1,\n\n /**\n * Range input is a different way to specify ranges and can be expressed with input boxes\n * as well as a set of discrete single-select type values.\n * @deprecated This will be removed soon. Please, use `AttributeDataType` from `@msdyn365-commerce/retail-proxy` instead.\n * @example\n * ```\n * import { AttributeDataType } from `@msdyn365-commerce/retail-proxy`;\n * ```\n */\n RangeInput = 4,\n\n /**\n * This is a discrete list item, either multi-select or single-select.\n * @deprecated This will be removed soon. Please, use `AttributeDataType` from `@msdyn365-commerce/retail-proxy` instead.\n * @example\n * ```\n * import { AttributeDataType } from `@msdyn365-commerce/retail-proxy`;\n * ```\n */\n List = 5,\n\n /**\n * Boolean types allows only single-select.\n * @deprecated This will be removed soon. Please, use `AttributeDataType` from `@msdyn365-commerce/retail-proxy` instead.\n * @example\n * ```\n * import { AttributeDataType } from `@msdyn365-commerce/retail-proxy`;\n * ```\n */\n Boolean = 6\n}\n\n/**\n * Types of product refiners.\n * @deprecated This will be removed soon. Please, use `RefinerType` from `@msdyn365-commerce/retail-proxy` instead.\n * @example\n * ```\n * import { RefinerType } from `@msdyn365-commerce/retail-proxy`;\n * ```\n */\nexport enum ProductRefinerTypeValue {\n\n /**\n * Refiner values are single-select.\n * @deprecated This will be removed soon. Please, use `RefinerType` from `@msdyn365-commerce/retail-proxy` instead.\n * @example\n * ```\n * import { RefinerType } from `@msdyn365-commerce/retail-proxy`;\n * ```\n */\n Single = 0,\n\n /**\n * Refiner values are multi-select.\n * @deprecated This will be removed soon. Please, use `RefinerType` from `@msdyn365-commerce/retail-proxy` instead.\n * @example\n * ```\n * import { RefinerType } from `@msdyn365-commerce/retail-proxy`;\n * ```\n */\n Multi = 1\n}\n\n/**\n * ProductRefinerSource enum type.\n * @deprecated This will be removed soon. Please, use `ProductRefinerSource` from `@msdyn365-commerce/retail-proxy` instead.\n * @example\n * ```\n * import { ProductRefinerSource } from `@msdyn365-commerce/retail-proxy`;\n * ```\n */\nexport enum ProductRefinerSource {\n\n /**\n * The None member.\n * @deprecated This will be removed soon. Please, use `ProductRefinerSource` from `@msdyn365-commerce/retail-proxy` instead.\n * @example\n * ```\n * import { ProductRefinerSource } from `@msdyn365-commerce/retail-proxy`;\n * ```\n */\n None = 0,\n\n /**\n * The Attribute member.\n * @deprecated This will be removed soon. Please, use `ProductRefinerSource` from `@msdyn365-commerce/retail-proxy` instead.\n * @example\n * ```\n * import { ProductRefinerSource } from `@msdyn365-commerce/retail-proxy`;\n * ```\n */\n Attribute = 1,\n\n /**\n * The Category member.\n * @deprecated This will be removed soon. Please, use `ProductRefinerSource` from `@msdyn365-commerce/retail-proxy` instead.\n * @example\n * ```\n * import { ProductRefinerSource } from `@msdyn365-commerce/retail-proxy`;\n * ```\n */\n Category = 2,\n\n /**\n * The Price member.\n * @deprecated This will be removed soon. Please, use `ProductRefinerSource` from `@msdyn365-commerce/retail-proxy` instead.\n * @example\n * ```\n * import { ProductRefinerSource } from `@msdyn365-commerce/retail-proxy`;\n * ```\n */\n Price = 3,\n\n /**\n * The Rating member.\n * @deprecated This will be removed soon. Please, use `ProductRefinerSource` from `@msdyn365-commerce/retail-proxy` instead.\n * @example\n * ```\n * import { ProductRefinerSource } from `@msdyn365-commerce/retail-proxy`;\n * ```\n */\n Rating = 4\n}\n\n/**\n * Checks if the data type value corresponds to a slider.\n * @param dataTypeValue\n */\nexport function isRangeType(dataTypeValue: number | undefined): boolean {\n return dataTypeValue === AttributeDataType.Currency ||\n dataTypeValue === AttributeDataType.Decimal ||\n dataTypeValue === AttributeDataType.Integer;\n}\n\n/**\n * Find the refinement criterion associated with this product refiner value.\n * @param productRefinerValue Product refiner value to match.\n * @param refinementCriteria Selected refinement criteria.\n */\nexport function findMatchingRefinementCriterion(\n productRefinerValue: ProductRefinerValue,\n refinementCriteria: ProductRefinerValue[]\n): ProductRefinerValue | undefined {\n // If the value is a range, then match only on data type value; otherwise match on item string\n return refinementCriteria.find(\n (refinementCriterion: ProductRefinerValue) => isMatchingRefinementCriterion(productRefinerValue, refinementCriterion)\n );\n}\n\n/**\n * Find the refinement criterion associated with this product refiner value.\n * @param productRefinerValue Product refiner value to match.\n * @param refinementCriteria Selected refinement criteria.\n * @param refinementCriterion\n */\nexport function isMatchingRefinementCriterion(\n productRefinerValue: ProductRefinerValue,\n refinementCriterion: ProductRefinerValue\n): boolean {\n // If the value is a range, then match only on data type value; otherwise match on item string\n return refinementCriterion.RefinerRecordId === productRefinerValue.RefinerRecordId &&\n refinementCriterion.RefinerSourceValue === productRefinerValue.RefinerSourceValue &&\n refinementCriterion.DataTypeValue === productRefinerValue.DataTypeValue &&\n (isRangeType(refinementCriterion.DataTypeValue) || refinementCriterion.LeftValueBoundString === productRefinerValue.LeftValueBoundString);\n}\n\nexport function getUpdatedRefinementCriteria(\n itemToggleNotification: IRefineItemToggleNotification,\n currentRefinementCriteria: ProductRefinerValue[]): ProductRefinerValue[] {\n const updatedRefinementCriteria: ProductRefinerValue[] = [];\n let toggledItemFound = false;\n currentRefinementCriteria.forEach((selectedCriterion: ProductRefinerValue) => {\n if (isMatchingRefinementCriterion(itemToggleNotification.productRefinerValue, selectedCriterion)) {\n toggledItemFound = true;\n if (itemToggleNotification.isSelecting) {\n const next = {\n ...selectedCriterion,\n LeftValueBoundString: itemToggleNotification.rangeStart !== undefined && `${itemToggleNotification.rangeStart}` || selectedCriterion.LeftValueBoundString,\n RightValueBoundString: itemToggleNotification.rangeEnd !== undefined && `${itemToggleNotification.rangeEnd}` || selectedCriterion.RightValueBoundString\n };\n updatedRefinementCriteria.push(next);\n\n } // Else the item is being de-selected, so omit it from the refinement criteria\n } else {\n // Keep existing criterion because it is not in the item toggle notification\n updatedRefinementCriteria.push(selectedCriterion);\n }\n });\n\n if (!toggledItemFound) {\n const next = {\n ...itemToggleNotification.productRefinerValue,\n LeftValueBoundString: itemToggleNotification.rangeStart !== undefined && `${itemToggleNotification.rangeStart}` || itemToggleNotification.productRefinerValue.LeftValueBoundString,\n RightValueBoundString: itemToggleNotification.rangeEnd !== undefined && `${itemToggleNotification.rangeEnd}` || itemToggleNotification.productRefinerValue.RightValueBoundString\n };\n updatedRefinementCriteria.push(next);\n\n // If single select, then deselect any others in the parent refiner group\n if ((itemToggleNotification.productRefinerValue.DataTypeValue === AttributeDataType.Text || itemToggleNotification.productRefinerValue.DataTypeValue === AttributeDataType.TrueFalse) &&\n itemToggleNotification.parentProductRefinerHierarchy.RefinerTypeValue === RefinerType.SingleSelect) {\n itemToggleNotification.parentProductRefinerHierarchy.Values.forEach((child: ProductRefinerValue) => {\n if (child.RefinerRecordId === next.RefinerRecordId && child.LeftValueBoundString === next.LeftValueBoundString) {\n // Do nothing\n } else {\n const matchingIndex = updatedRefinementCriteria.findIndex((criterion: ProductRefinerValue) => isMatchingRefinementCriterion(child, criterion));\n if (matchingIndex > -1) {\n updatedRefinementCriteria.splice(matchingIndex, 1);\n }\n }\n });\n }\n }\n\n return updatedRefinementCriteria;\n}\n\nexport function formatPrice(\n amount: string | undefined,\n currency: string | undefined,\n locale: string | undefined,\n telemetry: ITelemetry): string {\n if (!amount || !currency) {\n telemetry.trace(`[refine-menu.utilities.formatPrice] could not format price for ${amount} ${currency}`);\n return amount || '';\n }\n const priceAmount = (amount && Number(amount)) || 0;\n let result: string;\n\n try {\n result = new Intl.NumberFormat(locale, {\n style: 'currency',\n currencyDisplay: 'symbol',\n currency,\n minimumFractionDigits: 0\n }).format(priceAmount);\n } catch (error) {\n result = `${priceAmount} ${currency}`;\n telemetry.warning(`[refine-menu.utilities.formatPrice] Failed to format price for ${result}: ${error}`);\n }\n\n return result;\n}\n","/*--------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * See License.txt in the project root for license information.\n *--------------------------------------------------------------*/\n\n/* eslint-disable no-duplicate-imports */\nimport { IProductRefinerHierarchy } from '@msdyn365-commerce/commerce-entities';\nimport { ProductRefinerValue } from '@msdyn365-commerce/retail-proxy';\nimport { getPayloadObject, getTelemetryAttributes, IPayLoad } from '@msdyn365-commerce-modules/utilities';\nimport classnames from 'classnames';\nimport { computed } from 'mobx';\nimport { observer } from 'mobx-react';\nimport * as React from 'react';\n\nimport { IChoiceSummaryProps } from './choice-summary.props';\nimport { isMatchingRefinementCriterion, isRangeType } from './utilities';\n\ninterface IRefinerMap {\n key: string;\n value: ProductRefinerValue;\n}\n\n/**\n * ChoiceSummary component.\n */\n@observer\nexport default class ChoiceSummary extends React.PureComponent {\n private readonly closeButtonGlyph: string = 'msi-close-btn';\n\n private readonly payLoad: IPayLoad;\n\n @computed get selectedRefinersMap(): IRefinerMap[] {\n const { selectedChoices } = this.props;\n return selectedChoices.map((selectedRefiner: ProductRefinerValue) => {\n return {\n key: this._getKeyForRefinerValue(selectedRefiner),\n value: selectedRefiner\n } as IRefinerMap;\n });\n }\n\n constructor(props: Readonly) {\n super(props);\n this.payLoad = getPayloadObject('click', this.props.telemetryContent!, '');\n }\n\n public render(): JSX.Element {\n const { clearAllText, label, classNames, choiceAriaLabel, closeAriaLabel } = this.props;\n const items = this.selectedRefinersMap;\n this.payLoad.contentAction.etext = clearAllText;\n const clearAllAttributes = getTelemetryAttributes(this.props.telemetryContent!, this.payLoad);\n return (\n
\n {items.length > 0 && label && \n {label}\n }\n
    \n {items.map((item: IRefinerMap, index: number) => {\n const listItemProps = {\n 'aria-posinset': index,\n 'aria-setsize': items.length\n };\n\n this.payLoad.contentAction.etext = item.key;\n const attribute = getTelemetryAttributes(this.props.telemetryContent!, this.payLoad);\n\n return (\n
  • \n \n {item.key}\n \n \n
  • \n );\n })}\n
\n {items.length > 0 && clearAllText && \n {clearAllText}\n }\n
\n );\n }\n\n private _getKeyForRefinerValue(productRefinerValue: ProductRefinerValue): string {\n const { choiceFormat, choiceRangeValueFormat, refinerHierarchy, telemetry } = this.props;\n const overallFormat = choiceFormat || '{1}';\n const rangeFormat = choiceRangeValueFormat;\n let refinerName = '';\n if (refinerHierarchy && refinerHierarchy.find) {\n const parent = refinerHierarchy.find(\n (hierarchy: IProductRefinerHierarchy) => !!hierarchy.Values.find((value: ProductRefinerValue) => isMatchingRefinementCriterion(value, productRefinerValue))\n );\n\n if (!parent) {\n telemetry.warning('[choice-summary] could not find parent of selected refiner value');\n } else {\n refinerName = parent.KeyName || '';\n }\n }\n\n let refinerValueName: string;\n if (isRangeType(productRefinerValue.DataTypeValue)) {\n refinerValueName = rangeFormat\n .replace('{0}', this._formatPrice(productRefinerValue.LeftValueBoundString, productRefinerValue.UnitText))\n .replace('{1}', this._formatPrice(productRefinerValue.RightValueBoundString, productRefinerValue.UnitText));\n } else {\n refinerValueName = productRefinerValue.LeftValueBoundLocalizedString || productRefinerValue.LeftValueBoundString || '';\n }\n\n return overallFormat.replace('{0}', refinerName).replace('{1}', refinerValueName);\n }\n\n private _formatPrice(amount: string | undefined, currency: string | undefined): string {\n if (!amount || !currency) {\n this.props.telemetry.trace('[choice-summary] could not format price');\n return amount || '';\n }\n let result = amount;\n\n try {\n result = this.props.context!.cultureFormatter.formatCurrency(Number(amount), currency);\n } catch (error) {\n this.props.telemetry.warning(`Failed to format price for ${result}: ${error}`);\n }\n\n return result;\n }\n\n private readonly _onClick = (e: React.MouseEvent): void => {\n e.preventDefault();\n e.stopPropagation();\n\n const target = e.currentTarget as HTMLElement;\n const clearAll = target.getAttribute('class')!.includes('choice-summary__clear-all');\n const selectedRefiner = clearAll ? undefined : this._getSelectedRefinerChoice(target);\n\n if (this.props.onChoiceClicked) {\n this.props.onChoiceClicked({\n clearAll,\n itemClicked: target,\n choiceClicked: selectedRefiner,\n nextItemToFocus: target.nextSibling as HTMLElement\n });\n }\n };\n\n private _getSelectedRefinerChoice(itemClicked: HTMLElement): ProductRefinerValue | undefined {\n const result = this.selectedRefinersMap.find(selected => (itemClicked.textContent && itemClicked.textContent.trim()) === selected.key);\n return (result && result.value) || undefined;\n }\n}\n","/*--------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * See License.txt in the project root for license information.\n *--------------------------------------------------------------*/\n\n/* eslint-disable no-duplicate-imports */\nimport * as React from 'react';\n\ninterface IErrorMessage {\n text?: string;\n}\n\nexport const ErrorMessage: React.FC = ({ text }) => {\n return (\n \n
\n {' '}\n {text}\n {' '}\n
\n
\n );\n};\n","/*--------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * See License.txt in the project root for license information.\n *--------------------------------------------------------------*/\n\n/* eslint-disable no-duplicate-imports */\nimport { ICoreContext, IGridSettings, IImageData, IImageSettings, Image, IRequestContext } from '@msdyn365-commerce/core';\nimport { SimpleProduct } from '@msdyn365-commerce/retail-proxy';\nimport { getFallbackImageUrl, getProductPageUrlSync } from '@msdyn365-commerce-modules/retail-actions';\nimport { getPayloadObject, getTelemetryAttributes, ITelemetryContent, onTelemetryClick } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport { ISearchResultContainerResources } from '../search-result-container.props.autogenerated';\n\n// Import { IComponent, IComponentProps, ICoreContext, IGridSettings, IImageData, IImageSettings, Image, msdyn365Commerce } from '@msdyn365-commerce/core';\n\ninterface IFeatureSearchResultItem {\n product: SimpleProduct | null;\n context: ICoreContext;\n resources: ISearchResultContainerResources;\n imageSettings?: IImageSettings;\n moduleType: string;\n moduleId: string;\n telemetryContent?: ITelemetryContent;\n recommendation?: string;\n}\n\nexport const FeatureSearchResultItem: React.FC = ({\n product,\n context,\n imageSettings,\n resources,\n telemetryContent,\n recommendation\n}) => {\n if (product === null) {\n return null;\n }\n\n const productName = product.Name;\n const productRecordId = product && product.RecordId ? product.RecordId : 0;\n const productUrl = getProductPageUrlSync(product.Name || '', productRecordId, context && context.actionContext, undefined);\n const fallbackImage = getFallbackImageUrl(product.ItemId, context.actionContext.requestContext.apiSettings);\n const heading = recommendation && recommendation === 'descriptions' ? resources.featureSimilarDescriptionTitle : resources.featureSimilarLooksTitle;\n\n // Construct telemetry attribute to render\n const payLoad = getPayloadObject('click', telemetryContent!, productName!, productRecordId.toString());\n\n const attribute = getTelemetryAttributes(telemetryContent!, payLoad);\n return (\n
\n \n
\n {renderProductPlacementImage(\n imageSettings, context.request.gridSettings, product.PrimaryImageUrl,\n product.Name, fallbackImage, context.actionContext.requestContext)}\n
\n \n
\n

\n {heading}\n

\n {renderProductTitle(product?.Name)}\n
\n
\n );\n\n};\n\nfunction renderProductPlacementImage(\n imageSettings?: IImageSettings, gridSettings?: IGridSettings, imageUrl?: string,\n altText?: string, fallbackImage?: string, context?: IRequestContext): JSX.Element | null {\n\n if (!imageUrl || !gridSettings || !imageSettings) {\n return null;\n }\n const img: IImageData = {\n src: imageUrl,\n altText: altText ? altText : ''\n };\n const imageProps = {\n gridSettings,\n imageSettings,\n fallBackSrc: fallbackImage\n };\n return (\n \n );\n}\n\nfunction renderProductTitle(title?: string): JSX.Element | null {\n return (

\n {title}\n

);\n}\n","/*--------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * See License.txt in the project root for license information.\n *--------------------------------------------------------------*/\n\n/* eslint-disable no-duplicate-imports */\nimport * as React from 'react';\n\ninterface ILink {\n className?: string;\n text?: string;\n href?: string;\n ariaLabel?: string;\n}\n\nexport const Link: React.FC = ({ text, className, href, ariaLabel }) => (\n {' '}\n {text}\n {' '}\n);\n","/*--------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * See License.txt in the project root for license information.\n *--------------------------------------------------------------*/\n\n/* eslint-disable no-duplicate-imports */\nimport {\n Button,\n Modal,\n ModalBody,\n ModalFooter,\n ModalHeader\n} from '@msdyn365-commerce-modules/utilities';\nimport React from 'react';\n\nexport interface ISearchResultModalViewProps {\n modal: React.ReactElement;\n modalHeader: React.ReactElement;\n modalFooter: React.ReactElement;\n modalBody: React.ReactElement;\n}\n\ninterface IModalToggleProps {\n innerRef: React.RefObject | undefined;\n id: string;\n text: string;\n ariaLabel: string;\n onClick(): void;\n}\n\nexport interface ISearchResultModalResources {\n modalTitle: string;\n modalCloseButtonText: string;\n}\n\nexport interface ISearchResultModalProps {\n resources: ISearchResultModalResources;\n isOpen: boolean;\n returnRef: React.RefObject | undefined;\n onModalToggle(): void;\n}\n\nexport const ModalToggle: React.FC = (props: IModalToggleProps) => {\n const { text, onClick, ariaLabel, innerRef, id } = props;\n return (\n {text}\n );\n};\n\nexport const SearchResultModal = (props: ISearchResultModalProps): ISearchResultModalViewProps => {\n return {\n modal: modalNode(props),\n modalHeader: modalHeaderNode(props),\n modalFooter: modalFooterNode(props),\n modalBody: \n };\n};\n\nconst modalNode = (props: ISearchResultModalProps) => {\n return (\n \n );\n};\n\nconst modalHeaderNode = (props: ISearchResultModalProps) => {\n return (\n \n {props.resources.modalTitle}\n \n );\n};\n\nconst modalFooterNode = (props: ISearchResultModalProps) => {\n return (\n \n \n \n );\n};\n","/*--------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * See License.txt in the project root for license information.\n *--------------------------------------------------------------*/\n\n/* eslint-disable no-duplicate-imports */\nimport { ISliderLabel, ISliderThumbProps, Slider } from '@msdyn365-commerce-modules/utilities';\nimport debounce from 'lodash/debounce';\nimport { computed } from 'mobx';\nimport { observer } from 'mobx-react';\nimport * as React from 'react';\n\nimport { IRefineItemProps, IRefineItemState } from './refine-item';\n\ntype InputType = 'Min' | 'Max';\n\nexport type RangeRefineItemType = 'slider' | 'input';\n\n/**\n * Range refine item properties.\n */\nexport interface IRangeRefineItemProps extends IRefineItemProps {\n rangeType: RangeRefineItemType;\n minValueSliderThumbAriaLabel?: string;\n maxValueSliderThumbAriaLabel?: string;\n sliderKey?: string;\n}\n\n/**\n * Range refine item state.\n */\nexport interface IRangeRefineItemState extends IRefineItemState {\n validationErrorMin: string | undefined;\n validationErrorMax: string | undefined;\n selectedMin: string | undefined;\n selectedMax: string | undefined;\n touchedMin: boolean;\n touchedMax: boolean;\n sliderId: string;\n minValue: string | undefined;\n maxValue: string | undefined;\n labels: ISliderLabel[];\n sliderThumbs: ISliderThumbProps[];\n}\n\n/**\n * RangeRefineItem component (controlled by RefineSubmenu).\n */\n@observer\nexport default class RangeRefineItem extends React.Component {\n private readonly _formattedPriceReverseLookup: Map = new Map();\n\n private readonly minInput: React.RefObject;\n\n private readonly maxInput: React.RefObject;\n\n @computed get currencyCode(): string {\n return this.props.productRefinerValue.UnitText || '';\n }\n\n public constructor(props: IRangeRefineItemProps) {\n super(props);\n this._onRangeUpdate = this._onRangeUpdate.bind(this);\n this._onRangeUpdateEnd = this._onRangeUpdateEnd.bind(this);\n this._handleRangeTooltipText = this._handleRangeTooltipText.bind(this);\n this._changeMin = this._changeMin.bind(this);\n this._changeMax = this._changeMax.bind(this);\n this._finishChangeMin = this._finishChangeMin.bind(this);\n this._finishChangeMax = this._finishChangeMax.bind(this);\n\n this.minInput = React.createRef();\n this.maxInput = React.createRef();\n\n const { selectedRefinementCriterion } = this.props;\n const initialMin = selectedRefinementCriterion?.LeftValueBoundString ?? '0';\n const initialMax = selectedRefinementCriterion?.RightValueBoundString;\n const sliderId = `slider_${String(this.props.parentProductRefinerHierarchy.RecordId)}_${String(this.props.productRefinerValue.RefinerRecordId)}`;\n const minValue = this.props.productRefinerValue.LeftValueBoundString;\n const maxValue = this.props.productRefinerValue.RightValueBoundString;\n const minPrice = this._formatPrice(minValue);\n const maxPrice = this._formatPrice(maxValue);\n const labels: ISliderLabel[] = this.getLabels(sliderId, minPrice, maxPrice);\n const selectedMin = this.props.selectedRefinementCriterion?.LeftValueBoundString ?? this.props.productRefinerValue.LeftValueBoundString ?? '0';\n const selectedMax = this.props.selectedRefinementCriterion?.RightValueBoundString ??\n this.props.productRefinerValue.RightValueBoundString ?? maxValue;\n const selectedMinPrice = this._formatPrice(selectedMin);\n const selectedMaxPrice = this._formatPrice(selectedMax);\n const sliderKeyString = this.props.sliderKey ? `_${String(this.props.sliderKey)}` : '';\n const sliderThumbs: ISliderThumbProps[] = this.getSliderThumbs(sliderId,\n sliderKeyString, selectedMin, selectedMinPrice, selectedMax, selectedMaxPrice, maxPrice);\n this.state = {\n isChecked: false,\n validationErrorMin: undefined,\n validationErrorMax: undefined,\n selectedMin: initialMin,\n selectedMax: initialMax,\n touchedMin: false,\n touchedMax: false,\n sliderId,\n minValue,\n maxValue,\n labels,\n sliderThumbs\n };\n }\n\n public shouldComponentUpdate(nextProps: IRangeRefineItemProps,\n nextState: IRangeRefineItemState): boolean {\n if (this.state === nextState && this.props === nextProps) {\n return false;\n }\n return true;\n }\n\n public componentDidUpdate(previousProps: IRangeRefineItemProps): void {\n if (previousProps !== this.props) {\n this.updateSliderProps();\n }\n }\n\n public render(): JSX.Element | undefined {\n const { productRefinerValue, parentProductRefinerHierarchy, refineItemCommonProps } = this.props;\n\n if (!productRefinerValue || !parentProductRefinerHierarchy) {\n refineItemCommonProps.telemetry.error('Cannot render refine value range without productRefinerValue and parentProductRefinerHierarchy');\n return undefined;\n }\n\n if (this.props.rangeType === 'input') {\n return this._renderInputFields();\n }\n\n return this._renderSlider();\n }\n\n /**\n * Function to update slider props.\n */\n private updateSliderProps(): void {\n const sliderId = `slider_${String(this.props.parentProductRefinerHierarchy.RecordId)}_${String(this.props.productRefinerValue.RefinerRecordId)}`;\n const minValue = this.props.productRefinerValue.LeftValueBoundString;\n const maxValue = this.props.productRefinerValue.RightValueBoundString;\n const minPrice = this._formatPrice(minValue);\n const maxPrice = this._formatPrice(maxValue);\n const labels: ISliderLabel[] = this.getLabels(sliderId, minPrice, maxPrice);\n const selectedMin = this.props.selectedRefinementCriterion?.LeftValueBoundString ?? this.props.productRefinerValue.LeftValueBoundString ?? '0';\n const selectedMax = this.props.selectedRefinementCriterion?.RightValueBoundString ??\n this.props.productRefinerValue.RightValueBoundString ?? maxValue;\n const selectedMinPrice = this._formatPrice(selectedMin);\n const selectedMaxPrice = this._formatPrice(selectedMax);\n const sliderKeyString = this.props.sliderKey ? `_${String(this.props.sliderKey)}` : '';\n const sliderThumbs: ISliderThumbProps[] = this.getSliderThumbs(sliderId,\n sliderKeyString, selectedMin, selectedMinPrice, selectedMax, selectedMaxPrice, maxPrice);\n this.setState({ sliderId, minValue, maxValue, labels, sliderThumbs });\n }\n\n /**\n * Function to create the labels for slider.\n * @param sliderId - Slider element id for the DOM.\n * @param minPrice - Slider min value.\n * @param maxPrice - Slider max value.\n * @returns Array labels.\n */\n private readonly getLabels = (sliderId: string, minPrice: string, maxPrice: string): ISliderLabel[] => {\n return ([\n {\n labelId: `${sliderId}_start`,\n labelString: `${minPrice}`,\n labelPositioning: 'start'\n },\n {\n labelId: `${sliderId}_end`,\n labelString: `${maxPrice}`,\n labelPositioning: 'end'\n }\n ]);\n };\n\n /**\n * Function to create the slider thumbs for slider.\n * @param sliderId - Slider element id for the DOM.\n * @param sliderKey - Unique key for slider.\n * @param selectedMin - Slider selected min value.\n * @param selectedMinPrice - Slider selected min price.\n * @param selectedMax - Slider selected max value.\n * @param selectedMaxPrice - Slider selected max price..\n * @param maxPrice - Slider max price..\n * @returns Slider Thumb Props.\n */\n private readonly getSliderThumbs = (sliderId: string,\n sliderKey: string,\n selectedMin: string,\n selectedMinPrice: string,\n selectedMax: string | undefined,\n selectedMaxPrice: string,\n maxPrice: string): ISliderThumbProps[] => {\n const sliderThumbDefaultValue = 0;\n return ([\n {\n id: `${sliderId}${sliderKey}_slider_thumb_start`,\n value: (selectedMin && Number(selectedMin)) || sliderThumbDefaultValue,\n ariaLabel: `${this.props.minValueSliderThumbAriaLabel ?? ''} ${this.currencyCode}`,\n ariaValueText: `${selectedMinPrice}`\n },\n {\n id: `${sliderId}${sliderKey}_slider_thumb_end`,\n value: Number(selectedMax) || Number(maxPrice),\n ariaLabel: `${this.props.maxValueSliderThumbAriaLabel ?? ''} ${this.currencyCode}`,\n ariaValueText: `${selectedMaxPrice}`\n }\n ]);\n };\n\n private _renderInputFields(): JSX.Element | undefined {\n const { isDisabled, parentProductRefinerHierarchy, refineItemCommonProps } = this.props;\n const { selectedMin, selectedMax, touchedMin, touchedMax, validationErrorMin, validationErrorMax } = this.state;\n\n const rangeAriaLabel = (refineItemCommonProps.rangeNameFormat || '{0}').replace('{0}', (parentProductRefinerHierarchy.KeyName || ''));\n const formAttrs = {\n 'aria-label': rangeAriaLabel,\n 'aria-disabled': isDisabled\n };\n\n // To enable price formatting of selected fields, this is the approach:\n // initial value: min=0 formatted as price, max=undefined\n // onFocus/onChange: convert to number (unformat) and mark as touched to indicate value is being edited\n // onBlur: validate and format entered value as price\n const minInputClassName = `ms-refine-submenu__input-range refine-submenu__input-range-min ${validationErrorMin ? 'refine-submenu__input-range--error' : ''}`;\n const maxInputClassName = `ms-refine-submenu__input-range refine-submenu__input-range-max ${validationErrorMax ? 'refine-submenu__input-range--error' : ''}`;\n const minLabelClassName = 'ms-refine-submenu__input-range-label refine-submenu__input-range-label-min';\n const maxLabelClassName = 'ms-refine-submenu__input-range-label refine-submenu__input-range-label-max';\n const formattedSelectedMin = this._getFormattedSelectedValue(selectedMin, touchedMin, validationErrorMin);\n const formattedSelectedMax = this._getFormattedSelectedValue(selectedMax, touchedMax, validationErrorMax);\n return (\n
\n \n \n {validationErrorMin &&\n \n {validationErrorMin}\n }\n {validationErrorMax && validationErrorMin !== validationErrorMax &&\n \n {validationErrorMax}\n }\n
\n );\n }\n\n private _renderSlider(): JSX.Element | undefined {\n const { isDisabled, sliderKey } = this.props;\n const ariaAttributes = {\n 'aria-disabled': isDisabled\n };\n\n return (\n \n );\n }\n\n private _changeMin(event: React.FocusEvent): void {\n this._changeValue(event, 'Min');\n }\n\n private _changeMax(event: React.FocusEvent): void {\n this._changeValue(event, 'Max');\n }\n\n private _changeValue(event: React.FocusEvent, inputType: InputType): void {\n const selectedKey = `selected${inputType}`;\n const touchedKey = `touched${inputType}`;\n this.setState({\n [selectedKey]: this._getInputWithoutFormatting(event.currentTarget.value),\n [touchedKey]: true\n });\n }\n\n private _finishChangeMin(event: React.FocusEvent): boolean {\n const selectedMinValue = this._getInputWithoutFormatting(event.currentTarget.value);\n this.setState({\n selectedMin: selectedMinValue,\n minTouched: false\n });\n const minInput = Number(selectedMinValue);\n const { onToggle, parentProductRefinerHierarchy, productRefinerValue, refineItemCommonProps, selectedRefinementCriterion } = this.props;\n const max = selectedRefinementCriterion && selectedRefinementCriterion.RightValueBoundString || undefined;\n\n const maxNum = max ? Number(max) : undefined;\n\n if (isNaN(minInput)) {\n this.setState({ validationErrorMin: refineItemCommonProps.validationErrorNaN });\n this._focus('Min');\n return false;\n }\n\n if (this._validateRange(minInput, maxNum)) {\n onToggle({\n parentProductRefinerHierarchy,\n productRefinerValue,\n isSelecting: true,\n rangeStart: minInput,\n rangeEnd: maxNum\n });\n return true;\n }\n this._focus('Min');\n\n return false;\n }\n\n private _finishChangeMax(event: React.FocusEvent): boolean {\n const selectedMaxValue = this._getInputWithoutFormatting(event.currentTarget.value);\n this.setState({\n selectedMax: selectedMaxValue,\n maxTouched: false\n });\n const maxInput = Number(selectedMaxValue);\n const { onToggle, parentProductRefinerHierarchy, productRefinerValue, refineItemCommonProps, selectedRefinementCriterion } = this.props;\n const min = selectedRefinementCriterion && selectedRefinementCriterion.LeftValueBoundString || '0';\n\n const minNum = Number(min);\n\n if (isNaN(maxInput)) {\n this.setState({ validationErrorMax: refineItemCommonProps.validationErrorNaN });\n this._focus('Max');\n return false;\n }\n\n if (this._validateRange(minNum, maxInput)) {\n if (productRefinerValue) {\n onToggle({\n parentProductRefinerHierarchy,\n productRefinerValue,\n isSelecting: true,\n rangeStart: minNum,\n rangeEnd: maxInput\n });\n } else {\n this._focus('Max');\n }\n return true;\n }\n\n return false;\n }\n\n private _focus(inputType: InputType): void {\n const ref = inputType === 'Max' ? this.maxInput : this.minInput;\n\n setTimeout(() => {\n if (ref && ref.current) {\n ref.current.focus();\n }\n }, 50);\n }\n\n private _getFormattedSelectedValue(selected: string | undefined, touched: boolean, validationError: string | undefined): string | undefined {\n if (touched || validationError || selected === undefined) {\n return selected;\n }\n return this._formatPrice(selected);\n }\n\n private _validateRange(min: number, max: number | undefined): boolean {\n const { refineItemCommonProps } = this.props;\n if (max === undefined) {\n return true;\n }\n\n if (min > max) {\n this.setState({\n validationErrorMin: refineItemCommonProps.validationErrorRange,\n validationErrorMax: refineItemCommonProps.validationErrorRange\n });\n return false;\n }\n\n return true;\n }\n\n private _formatPrice(amount: string | undefined): string {\n const result = this.props.context.cultureFormatter.formatCurrency(Number(amount), this.currencyCode);\n return result;\n }\n\n private _getInputWithoutFormatting(input: string): string {\n // First try to cast raw input to a number\n const inputAsNum = Number(input);\n if (!isNaN(inputAsNum)) {\n return input;\n }\n\n // Otherwise try a reverse lookup and fall back to the raw input if all else fails\n const reverseLookupResult = this._formattedPriceReverseLookup.get(input);\n return reverseLookupResult || input;\n }\n\n // NOTE: Fix types once Shared Components build pipeline bug fixed\n private _onRangeUpdate(sliderChangeNotification: any): void {\n // Need to filter out mousemove events as these cause errors after the menu updates and slider re-renders\n if (sliderChangeNotification.eventType !== 'mousemove') {\n const { onToggle, parentProductRefinerHierarchy, productRefinerValue } = this.props;\n if (productRefinerValue && sliderChangeNotification) {\n onToggle({\n parentProductRefinerHierarchy,\n productRefinerValue,\n isSelecting: true,\n rangeStart: sliderChangeNotification.firstThumbValue,\n rangeEnd: sliderChangeNotification.secondThumbValue\n });\n\n this._focusOnSliderThumb(sliderChangeNotification);\n }\n }\n }\n\n private _onRangeUpdateEnd(sliderChangeNotification: any): void {\n const { onToggle, parentProductRefinerHierarchy, productRefinerValue } = this.props;\n if (productRefinerValue && sliderChangeNotification) {\n onToggle({\n parentProductRefinerHierarchy,\n productRefinerValue,\n isSelecting: true,\n rangeStart: sliderChangeNotification.firstThumbValue,\n rangeEnd: sliderChangeNotification.secondThumbValue\n });\n\n this._focusOnSliderThumb(sliderChangeNotification);\n }\n }\n\n private _focusOnSliderThumb(sliderChangeNotification: any): void {\n if (sliderChangeNotification.id) {\n const element = document.getElementById(`${sliderChangeNotification.id}range`);\n if (element) {\n setTimeout(\n () => {\n element.focus();\n }, 0);\n }\n }\n }\n\n private _handleRangeTooltipText(tooltip: number): string {\n return this._formatPrice(`${tooltip}`);\n }\n}\n","/*--------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * See License.txt in the project root for license information.\n *--------------------------------------------------------------*/\n\n/* eslint-disable no-duplicate-imports */\nimport { IProductRefinerHierarchy } from '@msdyn365-commerce/commerce-entities';\nimport { RatingComponent, SwatchComponent } from '@msdyn365-commerce/components';\nimport { IAny, ICoreContext, IGeneric } from '@msdyn365-commerce/core';\nimport { ProductRefinerSource, ProductRefinerValue, RefinerType } from '@msdyn365-commerce/retail-proxy';\nimport { checkIfShouldDisplayAsSwatch, DimensionTypes, IDimensionsApp, StringExtensions } from '@msdyn365-commerce-modules/retail-actions';\nimport { format, getPayloadObject, getTelemetryAttributes, IPayLoad, ITelemetryContent } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport { IRefineItemCommonProps } from './refine-item.props.common';\nimport { IRefineItemToggleNotification } from './refine-item-toggle-notification';\n\n/**\n * RefineItem properties.\n */\nexport interface IRefineItemProps {\n\n parentProductRefinerHierarchy: IProductRefinerHierarchy;\n productRefinerValue: ProductRefinerValue;\n selectedRefinementCriterion: ProductRefinerValue | undefined;\n selectedRefinerValues?: ProductRefinerValue[];\n refineItemCommonProps: IRefineItemCommonProps;\n isDisabled: boolean;\n context: ICoreContext>;\n moduleId: string;\n moduleTypeName: string;\n index?: number;\n productCountAriaLabel?: string;\n singleProductCountAriaLabel?: string;\n isMobileView?: boolean;\n\n /**\n * The telemetry content\n */\n telemetryContent?: ITelemetryContent;\n onToggle(notfication: Readonly): void;\n urlBuilder(refiner: IRefineItemToggleNotification): string;\n}\n\n/**\n * Refine item state.\n */\nexport interface IRefineItemState extends React.ComponentState {\n isChecked: boolean;\n renderingError?: object;\n}\n\n/**\n * Single-select and multi-select refine item component (controlled by RefineSubmenu).\n */\nexport default class RefineItem extends React.Component {\n private readonly anchorType: React.RefObject;\n\n private readonly payLoad: IPayLoad;\n\n public constructor(props: IRefineItemProps) {\n super(props);\n this._onClick = this._onClick.bind(this);\n this.state = {\n isChecked: !!this.props.selectedRefinementCriterion\n };\n this.anchorType = React.createRef();\n this.payLoad = getPayloadObject('click', this.props.telemetryContent!, '');\n }\n\n public shouldComponentUpdate(nextProps: IRefineItemProps,\n nextState: IRefineItemState): boolean {\n if (this.state === nextState && this.props === nextProps) {\n return false;\n }\n return true;\n }\n\n public render(): JSX.Element | undefined {\n const {\n isDisabled,\n refineItemCommonProps,\n parentProductRefinerHierarchy,\n productRefinerValue,\n selectedRefinementCriterion,\n productCountAriaLabel,\n singleProductCountAriaLabel,\n index,\n children,\n onToggle,\n context,\n telemetryContent,\n ...attrs\n } = this.props;\n if (!productRefinerValue) {\n refineItemCommonProps.telemetry.error('[refine-item] Cannot render refineItem without productRefinerValue');\n return undefined;\n }\n if (!productRefinerValue.LeftValueBoundString) {\n refineItemCommonProps.telemetry.warning(`[refine-item] RefineItem without LeftValueBoundString: ${JSON.stringify(productRefinerValue)}`);\n }\n const isSingleSelect = parentProductRefinerHierarchy.RefinerTypeValue === RefinerType.SingleSelect;\n let itemTypeClassName = isSingleSelect ? 'single-select' : 'multi-select';\n itemTypeClassName = `ms-refine-submenu-item ${itemTypeClassName}`;\n const inputType = isSingleSelect ? 'radio' : 'checkbox';\n const isChecked = !!selectedRefinementCriterion;\n itemTypeClassName = isChecked ? `${itemTypeClassName}-checked` : itemTypeClassName;\n if (parentProductRefinerHierarchy.SourceValue === ProductRefinerSource.Rating) {\n return this._renderRating(productRefinerValue, parentProductRefinerHierarchy, isChecked, context, index, telemetryContent,\n productCountAriaLabel, singleProductCountAriaLabel);\n\n }\n this.payLoad.contentAction.etext = productRefinerValue.LeftValueBoundLocalizedString || productRefinerValue.LeftValueBoundString;\n const attribute = getTelemetryAttributes(telemetryContent!, this.payLoad);\n\n return (\n
  • \n \n {this._renderSwatch()}\n \n {productRefinerValue.LeftValueBoundLocalizedString || productRefinerValue.LeftValueBoundString}\n {productRefinerValue.Count !== undefined && ` (${productRefinerValue.Count})`}\n \n \n
  • \n );\n\n }\n\n private _renderSwatch(): JSX.Element | null {\n const productRefinerValue = this.props.productRefinerValue;\n // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing -- Replace with actual value for empty string.\n const text = productRefinerValue.LeftValueBoundLocalizedString || productRefinerValue.LeftValueBoundString || '';\n\n const dimensionType = (this.props.parentProductRefinerHierarchy.KeyName?.toLocaleLowerCase() ?? '') as DimensionTypes;\n const hasColor = !StringExtensions.isNullOrWhitespace(productRefinerValue.SwatchColorHexCode);\n const hasImage = !StringExtensions.isNullOrWhitespace(productRefinerValue.SwatchImageUrl);\n const hasValidSwatch = hasColor || hasImage;\n const shouldDisplayAsSwatch = hasValidSwatch && checkIfShouldDisplayAsSwatch(\n dimensionType, this.props.context as ICoreContext);\n const swatchItems = shouldDisplayAsSwatch ? [\n {\n itemId: `${productRefinerValue.RefinerRecordId ?? ''}-${dimensionType}-${text}`,\n value: text,\n dimensionType,\n colorHexCode: productRefinerValue.SwatchColorHexCode,\n imageUrl: productRefinerValue.SwatchImageUrl\n }\n ] : undefined;\n\n if (!swatchItems) {\n return null;\n }\n\n return (\n \n );\n }\n\n private _getRefinerUrl(): string {\n const { urlBuilder, parentProductRefinerHierarchy, productRefinerValue, selectedRefinementCriterion } = this.props;\n\n if (productRefinerValue) {\n return urlBuilder({\n parentProductRefinerHierarchy,\n productRefinerValue,\n isSelecting: !selectedRefinementCriterion\n });\n }\n\n return '';\n }\n\n private readonly _onClick = (e: React.MouseEvent): void => {\n e.preventDefault();\n\n const { parentProductRefinerHierarchy, productRefinerValue, selectedRefinementCriterion } = this.props;\n if (productRefinerValue) {\n this.props.onToggle({\n parentProductRefinerHierarchy,\n productRefinerValue,\n isSelecting: !selectedRefinementCriterion\n });\n\n setTimeout(\n () => {\n this.anchorType.current && this.anchorType.current.focus();\n },\n 0\n );\n }\n };\n\n private _renderRating(productRefinerValue: ProductRefinerValue, parentProductRefinerHierarchy: IProductRefinerHierarchy,\n isChecked: boolean, context: ICoreContext, index?: number, telemetryContent?: ITelemetryContent,\n ratingUserCountAriaLabel?: string, ratingSingleUserCountAriaLabel?: string): JSX.Element | undefined {\n if (productRefinerValue.LeftValueBoundString) {\n this.payLoad.contentAction.etext = productRefinerValue.LeftValueBoundLocalizedString;\n const attribute = getTelemetryAttributes(telemetryContent!, this.payLoad);\n const refinerRating = Number.parseInt(productRefinerValue.LeftValueBoundString, 10);\n const ratingRefiner = this.props.selectedRefinerValues?.find(value => value.DataTypeValue === productRefinerValue.DataTypeValue);\n const selectedRating = Number.parseInt(ratingRefiner?.LeftValueBoundString || '0', 10);\n const defaultChkProductCount = 1;\n let ratingComponentClass: string = 'ms-rating-component';\n if (refinerRating > selectedRating) {\n ratingComponentClass = `${ratingComponentClass}__up`;\n } else if (refinerRating < selectedRating) {\n ratingComponentClass = `${ratingComponentClass}__down`;\n } else {\n ratingComponentClass = `${ratingComponentClass}__current`;\n }\n const productCountAriaLabelValue = (productRefinerValue.Count !== undefined &&\n productRefinerValue.Count === defaultChkProductCount) ? (ratingSingleUserCountAriaLabel &&\n format(ratingSingleUserCountAriaLabel, productRefinerValue.Count)) : (ratingUserCountAriaLabel &&\n format(ratingUserCountAriaLabel, productRefinerValue.Count));\n return (\n \n \n \n \n {productRefinerValue.Count !== undefined && `(${productRefinerValue.Count})`}\n \n \n \n );\n }\n return undefined;\n }\n\n}\n","/*--------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * See License.txt in the project root for license information.\n *--------------------------------------------------------------*/\n\n/* eslint-disable no-duplicate-imports */\nimport { IProductRefinerHierarchy } from '@msdyn365-commerce/commerce-entities';\nimport { IAny, ICoreContext, IGeneric } from '@msdyn365-commerce/core';\nimport { DisplayTemplate, ProductRefinerSource, ProductRefinerValue, RefinerType } from '@msdyn365-commerce/retail-proxy';\nimport { Button, Collapse, ITelemetryContent } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport RangeRefineItem, { RangeRefineItemType } from './range-refine-item';\nimport RefineItem from './refine-item';\nimport { IRefineItemCommonProps } from './refine-item.props.common';\nimport { IRefineItemToggleNotification } from './refine-item-toggle-notification';\nimport { findMatchingRefinementCriterion, isRangeType } from './utilities';\n\n/**\n * Properties associated with the RefineSubmenu component.\n */\nexport interface IRefineSubmenuProps {\n tempRangeTypeTODO: RangeRefineItemType;\n minValueSliderThumbAriaLabel?: string;\n maxValueSliderThumbAriaLabel?: string;\n productRefinerHierarchy: IProductRefinerHierarchy;\n selectedRefinerValues: ProductRefinerValue[];\n refineItemCommonProps: IRefineItemCommonProps;\n isDisabled: boolean;\n isExpandedOnInitialLoad: boolean;\n context: ICoreContext>;\n moduleId: string;\n moduleTypeName: string;\n productCountAriaLabel?: string;\n singleProductCountAriaLabel?: string;\n isMobile?: boolean;\n\n /**\n * The telemetry content\n */\n telemetryContent?: ITelemetryContent;\n onUpdateRefiners(notfication: Readonly): void;\n urlBuilder(refiner: IRefineItemToggleNotification): string;\n}\n\n/**\n * Refine submenu state.\n */\nexport interface IRefineSubmenuState extends React.ComponentState {\n expanded: boolean;\n}\n\n/**\n *\n * The RefineSubmenu component renders the submenu category and child items.\n * This computed observes the stateful category hierarchy object.\n * @extends {React.PureComponent}\n */\nclass RefineSubmenu extends React.Component {\n constructor(props: IRefineSubmenuProps) {\n super(props);\n\n this._onToggleItem = this._onToggleItem.bind(this);\n this._onToggleSubmenu = this._onToggleSubmenu.bind(this);\n\n const isExpanded = this.props.isExpandedOnInitialLoad;\n\n // If (this.props.productRefinerHierarchy.DataTypeValue === ProductRefinerValueDataTypeValue.Range) {\n // isExpanded = true;\n // }\n\n this.state = {\n expanded: isExpanded\n };\n }\n\n public shouldComponentUpdate(nextProps: IRefineSubmenuProps,\n nextState: IRefineSubmenuState): boolean {\n if (this.state === nextState && this.props === nextProps) {\n return false;\n }\n return true;\n }\n\n public render(): JSX.Element | null {\n const { productRefinerHierarchy, refineItemCommonProps } = this.props;\n\n if (!productRefinerHierarchy) {\n refineItemCommonProps.telemetry.error('Cannot render submenu without refiner hierarchy data');\n }\n\n if (((productRefinerHierarchy.SourceValue === ProductRefinerSource.Rating) && (this.props.context.app.config.hideRating)) || (productRefinerHierarchy.SourceValue === ProductRefinerSource.Price)) {\n return null;\n }\n return (\n
    \n \n {productRefinerHierarchy.KeyName}\n \n \n {this._renderChildItems(productRefinerHierarchy)}\n \n
    \n );\n }\n\n private _renderChildItems(productRefinerHierarchy: IProductRefinerHierarchy): JSX.Element | null {\n if (isRangeType(productRefinerHierarchy.DataTypeValue)) {\n return this._renderRange(productRefinerHierarchy);\n }\n return this._renderSingleMultiSelect(productRefinerHierarchy);\n }\n\n private _renderSingleMultiSelect(productRefinerHierarchy: IProductRefinerHierarchy): JSX.Element | null {\n const { isDisabled, refineItemCommonProps, selectedRefinerValues, context, productCountAriaLabel, singleProductCountAriaLabel, isMobile } = this.props;\n const isSingleSelect = (productRefinerHierarchy.RefinerTypeValue === RefinerType.SingleSelect) && (productRefinerHierarchy.SourceValue === ProductRefinerSource.Rating);\n const role = isSingleSelect ? { role: 'radiogroup' } : undefined;\n const refinerValuesList = (productRefinerHierarchy.Values || []);\n const listItems = refinerValuesList.map((child: ProductRefinerValue, index: number) => {\n if (!child) {\n refineItemCommonProps.telemetry.error(\n `[refine-submenu] Could not render refine item for refiner ${productRefinerHierarchy.RecordId} (${productRefinerHierarchy.KeyName})`\n );\n return null;\n }\n\n const selectedRefinementCriterion = findMatchingRefinementCriterion(child, selectedRefinerValues);\n\n return (\n refinerValuesList.find(value => value.RefinerRecordId === selectedValue.RefinerRecordId))}\n refineItemCommonProps={refineItemCommonProps}\n onToggle={this._onToggleItem}\n urlBuilder={this.props.urlBuilder}\n isDisabled={isDisabled}\n key={index}\n index={index}\n context={context}\n moduleId={this.props.moduleId}\n moduleTypeName={this.props.moduleTypeName}\n telemetryContent={this.props.telemetryContent}\n productCountAriaLabel={productCountAriaLabel}\n singleProductCountAriaLabel={singleProductCountAriaLabel}\n isMobileView={isMobile}\n />\n );\n });\n return (\n
      \n {listItems}\n
    \n );\n }\n\n private _getRangeType(productRefinerHierarchy: IProductRefinerHierarchy): 'input' | 'slider' {\n if (productRefinerHierarchy.DisplayTemplateValue === DisplayTemplate.Range ||\n productRefinerHierarchy.DisplayTemplateValue === DisplayTemplate.Slider ||\n productRefinerHierarchy.DisplayTemplateValue === DisplayTemplate.SliderWithBars) {\n return 'slider';\n }\n return 'input';\n }\n\n private _renderRange(productRefinerHierarchy: IProductRefinerHierarchy): JSX.Element | null {\n const { isDisabled, refineItemCommonProps, selectedRefinerValues, context, minValueSliderThumbAriaLabel, maxValueSliderThumbAriaLabel } = this.props;\n const submenuClassNamePrefix = 'ms-refine-submenu__item list-group-item refine-submenu__item';\n const refinerValuesList = (productRefinerHierarchy.Values || []);\n const listItems = refinerValuesList.map((child: ProductRefinerValue, index: number) => {\n if (!child) {\n refineItemCommonProps.telemetry.error(\n `Could not render refine item for refiner ${productRefinerHierarchy.RecordId} (${productRefinerHierarchy.KeyName})`\n );\n return null;\n }\n\n const selectedRefinementCriterion = findMatchingRefinementCriterion(child, selectedRefinerValues);\n\n const rangeType = this._getRangeType(productRefinerHierarchy);\n const key = selectedRefinementCriterion ? `${selectedRefinementCriterion.LeftValueBoundString}-${selectedRefinementCriterion.RightValueBoundString}` : `not-selected-${index}`;\n return (\n
  • \n \n
  • \n );\n });\n return (
      \n {listItems}\n
    );\n }\n\n private _onToggleItem(itemToggleNotification: IRefineItemToggleNotification): void {\n this.props.onUpdateRefiners(itemToggleNotification);\n }\n\n private _onToggleSubmenu(): void {\n this.setState(prevState => ({\n expanded: !prevState.expanded\n }));\n }\n}\n\nexport default RefineSubmenu;\n","/*--------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * See License.txt in the project root for license information.\n *--------------------------------------------------------------*/\n\n/* eslint-disable no-duplicate-imports */\nimport * as React from 'react';\n\ninterface ISeparator {\n separator: string;\n}\n\nexport const Separator: React.FC = ({ separator }) => (\n {' '}\n {separator}\n {' '}\n);\n","/*--------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * See License.txt in the project root for license information.\n *--------------------------------------------------------------*/\n\n/* eslint-disable no-duplicate-imports */\nimport * as React from 'react';\n\ninterface ITitle {\n className: string;\n text: string;\n}\n\nexport const Title: React.FC = ({ text, className }) => (\n {' '}\n {text}\n {' '}\n);\n","/**\r\n * Copyright (c) Microsoft Corporation\r\n * All rights reserved. See License.txt in the project root for license information.\r\n * ISearchResultContainer containerModule 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 expandRefinersCount {\r\n all = 'all',\r\n one = 'one',\r\n two = 'two',\r\n three = 'three',\r\n four = 'four'\r\n}\r\n\r\nexport interface ISearchResultContainerConfig extends Msdyn365.IModuleConfig {\r\n itemsPerPage?: number;\r\n allowBackNavigation?: boolean;\r\n imageSettings?: Msdyn365.IImageSettings;\r\n expandRefinersCount?: expandRefinersCount;\r\n disableHierarchy?: boolean;\r\n includeAttributes?: boolean;\r\n enableAffiliationBasedPricing?: boolean;\r\n updateRefinerPanel?: boolean;\r\n className?: string;\r\n}\r\n\r\nexport interface ISearchResultContainerResources {\r\n noResultsForRefinersText: string;\r\n resultCategoryNotFoundText: string;\r\n resultSearchNotFoundText: string;\r\n paginationAriaLabel: string;\r\n priceFree: string;\r\n priceRangeSeparator: string;\r\n originalPriceText: string;\r\n currentPriceText: string;\r\n ratingAriaLabel: string;\r\n flipperNext: string;\r\n flipperPrevious: string;\r\n searchTextPrefix: string;\r\n numberOfProducts: string;\r\n oneProduct: string;\r\n categoryLinkAriaLabel: string;\r\n sortByDropdownLabel: string;\r\n sortByOptionNameAsc: string;\r\n sortByOptionNameDesc: string;\r\n sortByOptionPriceAsc: string;\r\n sortByOptionPriceDesc: string;\r\n sortByOptionRatingDesc: string;\r\n sortByOptionBestSelling: string;\r\n sortByOptionNewScore: string;\r\n sortByOptionTrendingScore: string;\r\n sortByOptionRelevanceDesc: string;\r\n placeholderTextMax: string;\r\n minLabel: string;\r\n maxLabel: string;\r\n rangeNameFormat: string;\r\n validationErrorNotNumber: string;\r\n validationErrorNotRange: string;\r\n clearAllText: string;\r\n choiceSummaryLabel: string;\r\n choiceFormat: string;\r\n choiceRangeValueFormat: string;\r\n choiceAriaLabel: string;\r\n closeAriaLabel: string;\r\n modalTitle: string;\r\n modalCloseButtonText: string;\r\n minValueSliderThumbAriaLabel: string;\r\n maxValueSliderThumbAriaLabel: string;\r\n featureSimilarLooksTitle: string;\r\n featureSimilarDescriptionTitle: string;\r\n productCountAriaLabel: string;\r\n singleProductCountAriaLabel: string;\r\n swatchItemAriaLabel: string;\r\n refineItemsAriaLabel: string;\r\n refineItemAriaLabel: string;\r\n}\r\n\r\nexport interface ISearchResultContainerProps extends Msdyn365.IModule {\r\n resources: ISearchResultContainerResources;\r\n config: ISearchResultContainerConfig;\r\n slots: {\r\n quickview: React.ReactNode[];\r\n productComparisonButton: React.ReactNode[];\r\n };\r\n}\r\n","/*--------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * See License.txt in the project root for license information.\n *--------------------------------------------------------------*/\n\n/* eslint-disable no-duplicate-imports */\nimport { CategoryHierarchy as CategoryHierarchyData, IProductRefinerHierarchy, IProductsDimensionsAvailabilities } from '@msdyn365-commerce/commerce-entities';\nimport MsDyn365, { ICoreContext } from '@msdyn365-commerce/core';\nimport { format, ProductPrice, ProductRefinerValue, SortColumn,\n TextValueTranslation } from '@msdyn365-commerce/retail-proxy';\nimport { ArrayExtensions, DimensionAvailabilitiesForProductSearchResultInput, DimensionTypes,\n getDimensionAvailabilitiesForProductSearchResultAction, getPriceForProductSearchResult,\n IDimensionsApp, PriceForProductSearchResultInput } from '@msdyn365-commerce-modules/retail-actions';\nimport { getTelemetryObject, ILabeledDropdownOnChangeNotification, ILabeledDropdownOption, IModuleProps,\n INodeProps, ITelemetryContent, LabeledDropdown, UncontrolledPagination } from '@msdyn365-commerce-modules/utilities';\nimport classnames from 'classnames';\nimport { computed, observable, reaction, transaction } from 'mobx';\nimport { observer } from 'mobx-react';\nimport * as React from 'react';\n\nimport { buildListPageUrl, getCollectionProducts, getCollectionRefinersAction, getCurrentUrl,\n GetFullProductsByCollectionInput, parseQueryParam, RefinersByCollectionInput, sortOptions } from './actions';\nimport { hydrateRefinersFromUrl } from './actions/url-utils';\nimport {\n ErrorMessage, FeatureSearchResultItem, getUpdatedRefinementCriteria, IChoiceSummaryClickNotification,\n IRefineItemCommonProps, IRefineItemToggleNotification, ISearchResultModalViewProps, isMatchingRefinementCriterion,\n Link, ModalToggle, ProductSearchResultItems, SearchResultModal, Separator, Title\n} from './components';\nimport ChoiceSummary from './components/choice-summary';\nimport RefineSubmenu from './components/refine-submenu';\nimport { ISearchResultContainerData } from './search-result-container.data';\nimport { expandRefinersCount, ISearchResultContainerProps } from './search-result-container.props.autogenerated';\n\nexport interface ISearchResultContainerViewProps extends ISearchResultContainerProps {\n products?: React.ReactNode;\n className?: string;\n SearchResultContainer: IModuleProps;\n TitleViewProps: ITitleViewProps;\n categoryHierarchy: ICategoryHierarchyViewProps;\n pagination?: React.ReactNode;\n ProductsContainer: INodeProps;\n ProductSectionContainer: INodeProps;\n refineMenu: IRefineMenuViewProps;\n sortByOptions: ISortByViewProps;\n choiceSummary?: React.ReactNode;\n modalToggle: React.ReactNode;\n searchResultModal: ISearchResultModalViewProps;\n isMobile: boolean;\n CategoryNavContainer: INodeProps;\n RefineAndProductSectionContainer: INodeProps;\n errorMessage: React.ReactNode;\n FeatureSearchContainer: INodeProps;\n similarLookProduct?: React.ReactNode;\n productPrices?: ProductPrice[];\n}\n\nexport interface ITitleViewProps {\n TitleContainer: INodeProps;\n title: ISearchResultTitle;\n}\n\nexport interface IRefineMenuViewProps {\n RefineMenuContainer: INodeProps;\n RefinerSectionContainer: INodeProps;\n refiners?: React.ReactNode[];\n}\n\nexport interface ICategoryHierarchyViewProps {\n categoryHierarchyList?: React.ReactNode[];\n categoryHierarchySeparator?: React.ReactNode;\n CategoryHierarchyContainer: INodeProps;\n}\n\nexport interface ISortByViewProps {\n SortingContainer: INodeProps;\n sortByDropDown?: React.ReactNode;\n}\n\nexport type GridSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';\n\n/**\n * Title component for search result container.\n */\nexport interface ISearchResultTitle {\n titlePrefix?: React.ReactNode;\n titleText?: React.ReactNode;\n titleCount?: React.ReactNode;\n}\n\nexport interface ISearchResultContainerState {\n sortingState: ISortByCollectionState;\n modalIsOpen: boolean;\n refiners: IProductRefinerHierarchy[];\n productsDimensionAvailabilities?: IProductsDimensionsAvailabilities[][];\n}\n\ninterface ISortByCollectionState {\n selectedSortByOption: ILabeledDropdownOption;\n pending: boolean;\n}\n\n/**\n *\n * SearchResultContainer component.\n * @extends {React.PureComponent>}\n */\n@observer\nexport default class SearchResultContainer extends React.PureComponent, ISearchResultContainerState> {\n\n @computed get isMobile(): boolean {\n return (this._viewport === 'xs' || this._viewport === 'sm');\n }\n\n private readonly sortByDropdownOptions: ILabeledDropdownOption[] = [\n { key: sortOptions.sortByOptionRelevanceDesc, value: this.props.resources.sortByOptionRelevanceDesc },\n { key: sortOptions.sortByOptionNameAsc, value: this.props.resources.sortByOptionNameAsc },\n { key: sortOptions.sortByOptionNameDesc, value: this.props.resources.sortByOptionNameDesc },\n { key: sortOptions.sortByOptionPriceAsc, value: this.props.resources.sortByOptionPriceAsc },\n { key: sortOptions.sortByOptionPriceDesc, value: this.props.resources.sortByOptionPriceDesc },\n { key: sortOptions.sortByOptionRatingDesc, value: this.props.resources.sortByOptionRatingDesc },\n { key: sortOptions.sortByOptionBestSelling, value: this.props.resources.sortByOptionBestSelling },\n { key: sortOptions.sortByOptionNewScore, value: this.props.resources.sortByOptionNewScore },\n { key: sortOptions.sortByOptionTrendingScore, value: this.props.resources.sortByOptionTrendingScore }\n ];\n\n private readonly _refineItemCommonProps: IRefineItemCommonProps;\n\n private readonly _pageType: string | undefined = this.props.context.request.urlTokens.pageType;\n\n @observable\n private _viewport: GridSize;\n\n private readonly _modalToggleRef: React.RefObject;\n\n private readonly _sortAndFilterContainerRef: React.RefObject;\n\n private expandrefinerCount: number | undefined = 0;\n\n private readonly telemetryContent: ITelemetryContent;\n\n private readonly productPrices: ProductPrice[];\n\n private readonly defaultPageNumber = 0;\n\n public constructor(props: ISearchResultContainerProps, state: ISearchResultContainerState) {\n super(props);\n this._viewport = props.context.request && props.context.request.device && props.context.request.device.Type === 'Mobile' ? 'xs' : 'lg';\n this._modalToggleRef = React.createRef();\n this._sortAndFilterContainerRef = React.createRef();\n this._toggleModal = this._toggleModal.bind(this);\n this._updateViewport = this._updateViewport.bind(this);\n this.productPrices = [];\n this.state = {\n sortingState: {\n pending: false,\n selectedSortByOption: this.sortByDropdownOptions[0]\n },\n modalIsOpen: false,\n refiners: []\n };\n const {\n placeholderTextMax,\n minLabel,\n maxLabel,\n rangeNameFormat\n } = this.props.resources;\n\n const locale = this.props.context.request.locale;\n const telemetry = this.props.telemetry;\n const validationErrorNaN = this.props.resources.validationErrorNotNumber;\n const validationErrorRange = this.props.resources.validationErrorNotRange;\n this._refineItemCommonProps = {\n telemetry,\n locale,\n placeholderTextMax,\n minLabel,\n maxLabel,\n rangeNameFormat,\n validationErrorNaN,\n validationErrorRange\n };\n this.telemetryContent = getTelemetryObject(this.props.context.request.telemetryPageName!, this.props.friendlyName, this.props.telemetry);\n\n // Initalization of list page\n void this.props.data.products.then((products) => {\n void this.props.data.listPageState.then((listPageState) => {\n if (this._pageType === 'Category') {\n listPageState.pageType = 'Category';\n } else {\n listPageState.pageType = 'Search';\n }\n\n let querySorting: SortColumn[] = [];\n\n if (this.props.context.request.query && this.props.context.request.query.sorting) {\n querySorting = JSON.parse(decodeURIComponent(this.props.context.request.query.sorting)) as SortColumn[];\n }\n\n listPageState.currentPageNumber = this.props.context.request.query && (+this.props.context.request.query.skip / (this.props.config.itemsPerPage || 10)) || 0;\n listPageState.sortingCritera = { Columns: querySorting };\n listPageState.pageSize = this.props.config.itemsPerPage || 10;\n listPageState.activeProducts = products.products;\n listPageState.totalProductCount = products.count;\n listPageState.activeFilters = hydrateRefinersFromUrl(this.props.context.request);\n\n // Initialize reaction based on listPageState properties\n reaction(\n () => {\n return [listPageState.activeFilters && listPageState.activeFilters.length, listPageState.currentPageNumber, listPageState.sortingCritera && listPageState.sortingCritera.Columns && listPageState.sortingCritera.Columns.length];\n },\n () => {\n const input = new GetFullProductsByCollectionInput(\n listPageState.pageType,\n this.props.context.request.apiSettings,\n { Paging: { Top: this.props.config.itemsPerPage, Skip: Math.max((listPageState.pageSize * (listPageState.currentPageNumber || 0)), 0) }, count: true, Sorting: listPageState.sortingCritera || {} },\n listPageState.activeFilters || [],\n +(this.props.context.request.urlTokens.itemId || 0),\n\n this.props.context.request.query && this.props.context.request.query.q ? this.props.context.request.query.q : JSON.stringify({ ProductId: this.props.context.request.query?.productId, Recommendation: this.props.context.request.query?.recommendation }),\n !!(this.props && this.props.config && this.props.config.includeAttributes !== undefined && this.props.config.includeAttributes),\n this.props.config.updateRefinerPanel,\n this.props.context.request.locale\n );\n void getCollectionProducts(input, this.props.context.actionContext).then(productResults => {\n listPageState.activeProducts = productResults.products;\n listPageState.totalProductCount = productResults.count;\n if (this.props.config.enableAffiliationBasedPricing && this.props.context.actionContext.requestContext?.user?.isAuthenticated) {\n void this._getActivePrice();\n }\n });\n\n if (this.props.config.updateRefinerPanel) {\n const refinerInput = new RefinersByCollectionInput(\n listPageState.pageType,\n this.props.context.request.apiSettings,\n {\n Paging: {\n Top: this.props.config.itemsPerPage,\n Skip: Math.max((listPageState.pageSize * (listPageState.currentPageNumber ?? this.defaultPageNumber)),\n this.defaultPageNumber)\n },\n count: true, Sorting: listPageState.sortingCritera ?? {}\n },\n listPageState.activeFilters ?? [],\n +(this.props.context.request.urlTokens.itemId ?? 0),\n this.props.context.request.query?.q ? this.props.context.request.query.q : this.props.context.request.query?.productId,\n false,\n this.props.config.updateRefinerPanel\n );\n\n getCollectionRefinersAction(refinerInput, this.props.context.actionContext).then((refiners) => {\n this.setState({ refiners });\n }).catch(error => {\n this.props.telemetry.error(error);\n });\n }\n }\n );\n\n });\n });\n\n if (this.props.context.request.query?.productId) {\n void this.props.data.featureProduct.then((products) => {\n void this.props.data.listPageState.then((listPageStateFeature) => {\n listPageStateFeature.featureProduct = products;\n });\n });\n }\n this._updateViewport();\n }\n\n public static getFriendlyName(locale: string, nameTranslations?: TextValueTranslation[]): string | undefined {\n let nameTranslation: TextValueTranslation | undefined;\n if (locale && nameTranslations && ArrayExtensions.hasElements(nameTranslations)) {\n nameTranslation = nameTranslations.find(item => item.Language!.toLowerCase() === locale.toLowerCase());\n }\n\n return nameTranslation?.Text;\n }\n\n public async componentDidMount(): Promise {\n if (MsDyn365.isBrowser && window.addEventListener) {\n window.addEventListener('resize', this._updateViewport);\n this._updateViewport();\n }\n if (this.props.config.enableAffiliationBasedPricing &&\n this.props.context.actionContext.requestContext?.user?.isAuthenticated) {\n void this._getActivePrice();\n }\n\n const context = this.props.context as ICoreContext;\n const dimensionsToDisplayOnProductCard = context.app.config.dimensionsInProductCard;\n const dimensionsToDisplayAsSwatch = context.app.config.dimensionsAsSwatchType;\n if (ArrayExtensions.hasElements(dimensionsToDisplayOnProductCard) && !dimensionsToDisplayOnProductCard.includes(DimensionTypes.none) &&\n ArrayExtensions.hasElements(dimensionsToDisplayAsSwatch) && !dimensionsToDisplayAsSwatch.includes(DimensionTypes.none) &&\n this.props.config.includeAttributes) {\n await this._getProductsDimensionsAvailabilities();\n }\n }\n\n public componentWillUnmount(): void {\n if (MsDyn365.isBrowser && window.removeEventListener) {\n window.removeEventListener('resize', this._updateViewport);\n }\n }\n\n public render(): JSX.Element {\n const { imageSettings, className } = this.props.config;\n const { resources } = this.props;\n const products = (this.props.data.listPageState.result && this.props.data.listPageState.result.activeProducts) || [];\n const searchProduct = (this.props.data.listPageState.result && this.props.data.listPageState.result.featureProduct) || null;\n let errorText = '';\n if (!products || products.length === 0) {\n errorText = this._pageType === 'Category' ? resources.resultCategoryNotFoundText : resources.resultSearchNotFoundText;\n\n }\n const productsComponent = this._getProducts();\n const featureComponent = (\n \n );\n\n const searchResultContainerViewProps = {\n ...this.props,\n products: productsComponent,\n TitleViewProps: this._getCollectionTitle(),\n categoryHierarchy: !this.props.config.disableHierarchy && this._getCategoryHierarchy(),\n refineMenu: this.props.context.request.user.isAuthenticated && this._getRefineMenu(),\n className: classnames('ms-search-result-container', className),\n SearchResultContainer: {\n moduleProps: this.props,\n className: classnames('ms-search-result-container', className)\n },\n sortByOptions: this.props.data.listPageState.result && this.props.data.listPageState.result.totalProductCount !== 0 ? this._getSortingDropDown() : null,\n pagination: this._getPagination(),\n ProductsContainer: { className: 'ms-search-result-container__Products' },\n ProductSectionContainer: { className: 'ms-search-result-container__product-section' },\n CategoryNavContainer: { className: 'ms-search-result-container__category-nav-section' },\n RefineAndProductSectionContainer: { className: 'ms-search-result-container__refine-product-section' },\n choiceSummary: this._getChoiceSummary(),\n modalToggle: this.props.data.listPageState.result && this.props.data.listPageState.result.totalProductCount !== 0 ? (\n \n ) : null,\n searchResultModal: this._getSearchResultModal(),\n isMobile: this.isMobile,\n errorMessage: errorText && (\n \n ),\n FeatureSearchContainer: { className: 'ms-feature-search-result' },\n similarLookProduct: this.props.data.listPageState.result && (this.props.data.listPageState.result.featureProduct !== null && this.props.data.listPageState.result.featureProduct !== undefined) ? featureComponent : null,\n productPrices: this.productPrices\n };\n return this.props.renderView(searchResultContainerViewProps) as React.ReactElement;\n }\n\n /**\n * Get products dimension availabilities.\n * @returns Void.\n */\n private readonly _getProductsDimensionsAvailabilities = async (): Promise => {\n const productsList = (this.props.data.listPageState.result?.activeProducts) ?? [];\n\n const productsDimensionAvailabilities = await getDimensionAvailabilitiesForProductSearchResultAction(\n new DimensionAvailabilitiesForProductSearchResultInput(productsList, this.props.context as ICoreContext),\n this.props.context.actionContext);\n\n if (ArrayExtensions.hasElements(productsDimensionAvailabilities)) {\n this.setState({ productsDimensionAvailabilities });\n }\n };\n\n /**\n * Get the active price for the products.\n */\n private readonly _getActivePrice = async (): Promise => {\n const productsList = (this.props.data.listPageState.result?.activeProducts) ?? [];\n const products = await getPriceForProductSearchResult(\n new PriceForProductSearchResultInput(productsList),\n this.props.context.actionContext);\n\n const listPageState = await this.props.data.listPageState;\n listPageState.activeProducts = products;\n };\n\n private readonly _getSearchResultModal = (): ISearchResultModalViewProps => {\n const { resources } = this.props;\n return SearchResultModal(\n {\n resources: {\n modalCloseButtonText: resources.modalCloseButtonText,\n modalTitle: resources.modalTitle\n },\n isOpen: this.state.modalIsOpen,\n returnRef: this._modalToggleRef,\n onModalToggle: this._toggleModal\n });\n };\n\n private readonly _getCollectionTitle = (): ITitleViewProps => {\n const { data, context, resources } = this.props;\n\n let collectionTitle: string | undefined = '';\n if (context && context.request && context.request.query && context.request.query.q) {\n collectionTitle = `\"${context.request.query.q}\"`;\n } else {\n collectionTitle = (data.category.result && SearchResultContainer.getFriendlyName(context.request.locale, data.category.result.NameTranslations)) ||\n (data.category.result && data.category.result.Name);\n }\n let productCountText = '';\n let productCountNumber: number | undefined;\n if (data.listPageState && data.listPageState.result && data.listPageState.result.totalProductCount !== undefined) {\n productCountNumber = data.listPageState.result.totalProductCount;\n } else if (data.products && data.products.result) {\n productCountNumber = data.products.result.count;\n }\n\n if (productCountNumber && productCountNumber !== 0) {\n productCountText = productCountNumber !== 1 ? format(this.props.resources.numberOfProducts, productCountNumber) : this.props.resources.oneProduct;\n } else {\n productCountText = format(this.props.resources.numberOfProducts, 0);\n }\n const pageName = context.request.telemetryPageName ? `result-count-${context.request.telemetryPageName.toLowerCase()}` : '';\n const titlePrefix = ;\n const titleText = collectionTitle && <Title className='ms-search-result__collection-title-text' text={collectionTitle} />;\n const titleCount = <Title className='ms-search-result__collection-title-count' text={productCountText} />;\n\n return {\n TitleContainer: { className: `ms-search-result-container__title ${pageName}` },\n title: {\n titlePrefix,\n titleText,\n titleCount\n }\n };\n\n };\n\n private readonly _getCategoryHierarchy = (): ICategoryHierarchyViewProps => {\n const { data } = this.props;\n const categoryHierarchy = data.categoryHierarchy.result;\n const categoryLinks =\n categoryHierarchy && categoryHierarchy.map((value: CategoryHierarchyData, index: number) => {\n\n return (\n <Link\n key={index}\n text={value.Name}\n ariaLabel={`${this.props.resources.categoryLinkAriaLabel} ${value.Name}`}\n href={value.Url}\n />\n );\n });\n const categoryLinkSeparator = <Separator separator='/' />;\n\n return {\n CategoryHierarchyContainer: { tag: 'nav', className: 'ms-search-result-container__category-hierarchy' },\n categoryHierarchyList: categoryLinks,\n categoryHierarchySeparator: categoryLinkSeparator\n };\n\n };\n\n private readonly _getSortingDropDown = (): ISortByViewProps => {\n const { resources } = this.props;\n const activeDropdown = this._getCurrentlySelectedOption() || this.state.sortingState.selectedSortByOption;\n let dropdwonOptions = this.sortByDropdownOptions;\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access -- App config settings are of \"any\" value.\n if (this.props.context.app.config.hideRating) {\n dropdwonOptions = this.sortByDropdownOptions.filter((dropdownOption) => dropdownOption.key !== 'AverageRating-Desc');\n }\n const dropdown = (\n <LabeledDropdown\n labelClassname='reviews-list-sort-by'\n labelText={resources.sortByDropdownLabel}\n dropdownId='categorySortByDropdown'\n dropdownClassname='reviews-list-dropdown'\n toggleColor='link'\n dropdownOptions={dropdwonOptions}\n selectedOption={activeDropdown}\n onSelectOption={this._updateSortByDropdown}\n ref={this._sortAndFilterContainerRef}\n />);\n return {\n SortingContainer: { className: 'ms-search-result-container__Sort-by-category' },\n sortByDropDown: dropdown\n };\n };\n\n private readonly _getPagination = (): React.ReactNode => {\n const { config, context, data, resources } = this.props;\n const listPageState = data && data.listPageState && data.listPageState.result;\n const fullUrl = getCurrentUrl(context.request);\n const itemsPerPage = config.itemsPerPage || 10;\n const skipCount = listPageState && listPageState.currentPageNumber !== null ? (listPageState.currentPageNumber * (this.props.config.itemsPerPage || 10)) : ((this.props.context.request.query && +this.props.context.request.query.skip) || 0);\n const totalItems = listPageState && listPageState.totalProductCount || 0;\n const previousText = resources.flipperPrevious;\n const nextText = resources.flipperNext;\n\n if (totalItems <= itemsPerPage) {\n return null;\n }\n return (\n <UncontrolledPagination\n className='ms-search-result-container__pagination'\n role='navigation'\n aria-label={resources.paginationAriaLabel}\n url={fullUrl.href}\n qsp='skip'\n items={totalItems}\n itemsPerPage={itemsPerPage}\n startingItem={skipCount}\n previousText={this._renderPrev(previousText)}\n nextText={this._renderNext(nextText)}\n previousAriaLabel={previousText}\n nextAriaLabel={nextText}\n telemetryContent={this.telemetryContent}\n />);\n };\n\n private readonly _getRefineMenu = (): IRefineMenuViewProps => {\n const { data, context, config } = this.props;\n const tempRangeTypeTODO = context.request.query && context.request.query.inputRange ? 'input' : 'slider';\n const validRefiners = this.props.config.updateRefinerPanel && ArrayExtensions.hasElements(this.state.refiners) ? this.state.refiners.filter(refiner => {\n return ArrayExtensions.hasElements(refiner.Values);\n }) : data.refiners.result && data.refiners.result.filter(refiner => {\n return ArrayExtensions.hasElements(refiner.Values);\n });\n\n const activeRefiners = (data.listPageState.result && data.listPageState.result.activeFilters) || [];\n\n this._getexpandRefinerCount(validRefiners && validRefiners.length, config.expandRefinersCount);\n const expandedRefiners = this.expandrefinerCount;\n const subMenus = validRefiners && validRefiners.map((productRefinerHierarchy: IProductRefinerHierarchy, index: number) => {\n return (\n <RefineSubmenu\n productRefinerHierarchy={productRefinerHierarchy}\n selectedRefinerValues={activeRefiners}\n refineItemCommonProps={this._refineItemCommonProps}\n minValueSliderThumbAriaLabel={this.props.resources.minValueSliderThumbAriaLabel}\n maxValueSliderThumbAriaLabel={this.props.resources.maxValueSliderThumbAriaLabel}\n key={index}\n onUpdateRefiners={this._onUpdateRefiners}\n urlBuilder={this._buildRefinerUrl}\n isDisabled={false}\n isExpandedOnInitialLoad={!!(expandedRefiners && expandedRefiners > index)}\n tempRangeTypeTODO={tempRangeTypeTODO}\n context={context}\n moduleId={this.props.id}\n moduleTypeName={this.props.typeName}\n telemetryContent={this.telemetryContent}\n productCountAriaLabel={this.props.resources.productCountAriaLabel}\n singleProductCountAriaLabel={this.props.resources.singleProductCountAriaLabel}\n isMobile={this.isMobile}\n />\n );\n });\n\n return {\n RefineMenuContainer: { className: 'ms-search-result-container__refine-menu' },\n RefinerSectionContainer: { className: 'ms-search-result-container__refiner-section' },\n refiners: subMenus\n };\n\n };\n\n private readonly _getChoiceSummary = (): React.ReactNode => {\n const { resources, data, telemetry } = this.props;\n const selectedRefiners = (data.listPageState.result && data.listPageState.result.activeFilters) || [];\n return (\n <ChoiceSummary\n classNames='ms-choice-summary-by-category'\n clearAllText={resources.clearAllText}\n label={resources.choiceSummaryLabel}\n closeAriaLabel={resources.closeAriaLabel}\n selectedChoices={selectedRefiners}\n\n // @ts-expect-error: NOTE Type-unsafe line below, null refinersByCategoryHierarchy case not handled\n refinerHierarchy={data.refiners.result}\n choiceFormat={resources.choiceFormat}\n choiceRangeValueFormat={resources.choiceRangeValueFormat}\n telemetry={telemetry}\n onChoiceClicked={this._onChoiceClicked}\n urlBuilder={this._buildRefinerUrlForChoiceSummary}\n choiceAriaLabel={resources.choiceAriaLabel}\n telemetryContent={this.telemetryContent}\n context={this.props.context}\n />\n );\n\n };\n\n private readonly _getProducts = (): JSX.Element => {\n const { imageSettings, allowBackNavigation } = this.props.config;\n const { resources } = this.props;\n const breaCrumbType = this.props.context.app.config.breadcrumbType;\n const allowBack = allowBackNavigation && (breaCrumbType === 'back' || breaCrumbType === 'categoryAndBack');\n const products = (this.props.data.listPageState.result && this.props.data.listPageState.result.activeProducts) || [];\n const quickviewslot = this.props.slots && this.props.slots.quickview && this.props.slots.quickview[0];\n const productComparisonButton = ArrayExtensions.hasElements(this.props.slots.productComparisonButton)\n ? this.props.slots.productComparisonButton[0]\n : null;\n const isPriceMinMaxFeatureState = this.props.data.featureState.result?.find(\n featureState => featureState.Name === 'Dynamics.AX.Application.RetailSearchPriceRangeFeature');\n let customerInfo;\n try {\n customerInfo = this.props.data.customerInformation?.result;\n } catch (error) {\n this.props.telemetry.debug('Unable to receive Customer Information. May be user is not authorized');\n }\n return (\n <ProductSearchResultItems\n products={products}\n context={this.props.context}\n imageSettings={imageSettings}\n resources={resources}\n moduleType={this.props.typeName}\n moduleId={this.props.id}\n allowBackNavigation={allowBack}\n telemetryContent={this.telemetryContent}\n quickviewSlot={quickviewslot}\n productComparisonButton={productComparisonButton}\n channelInventoryConfigurationId={this.props.data.products.result?.channelInventoryConfigurationId}\n isPriceMinMaxEnabled={isPriceMinMaxFeatureState?.IsEnabled}\n productsDimensionAvailabilities={this.state.productsDimensionAvailabilities}\n isPriceVisible={customerInfo ? true : false}\n productsAgreements={this.props.data.productsAgreements.result}\n />\n );\n };\n\n private readonly _updateSortByDropdown = (notification: ILabeledDropdownOnChangeNotification): void => {\n const { context } = this.props;\n const requestContext = context && context.request;\n const actionContext = context && context.actionContext;\n\n if (!requestContext || !actionContext || !this.props.data.listPageState.result) {\n const error = `[sort-by-category] cannot sort without context: ${!requestContext ? 'requestContext ' : ''} ${!actionContext ? 'actionContext ' : ''} could not be found`;\n this.props.telemetry.warning(error);\n }\n\n window.history.pushState({}, '', buildListPageUrl(getCurrentUrl(this.props.context.request), undefined, [this._getSortColumnFromSelectedOption(notification.selectedOption)], undefined));\n transaction(() => {\n this.props.data.listPageState.result!.currentPageNumber = 0;\n this.props.data.listPageState.result!.sortingCritera = { Columns: [this._getSortColumnFromSelectedOption(notification.selectedOption)] };\n });\n };\n\n private readonly _getSortColumnFromSelectedOption = (option: ILabeledDropdownOption): SortColumn => {\n const { data } = this.props;\n\n if (!data.searchConfiguration.result) {\n return {};\n }\n\n const mappedConfiguration = data.searchConfiguration.result.find((searchConfiguration) => {\n return searchConfiguration.key === option.key;\n });\n\n if (mappedConfiguration) {\n return mappedConfiguration.sortColumn;\n }\n\n return {};\n };\n\n /**\n * Retrieves current sort criteria.\n * @returns Sort criteria column which is currently active or undefined if it's not specified.\n */\n private readonly _getSortCriteriaColumn = (): SortColumn | undefined => {\n const sortCriteria = this.props.data.listPageState.result?.sortingCritera;\n if (ArrayExtensions.hasElements(sortCriteria?.Columns)) {\n return sortCriteria!.Columns[0];\n }\n\n const queryColumns = parseQueryParam<SortColumn[]>('sorting', this.props.context.request);\n if (ArrayExtensions.hasElements(queryColumns)) {\n return queryColumns[0];\n }\n\n return undefined;\n };\n\n /**\n * Retrieves current selected dropdown option based on the sort criteria.\n * @returns Current dropdown option.\n */\n private readonly _getCurrentlySelectedOption = (): ILabeledDropdownOption | undefined => {\n const activeSortColumn = this._getSortCriteriaColumn();\n\n const searchConfiguration = this.props.data.searchConfiguration.result;\n\n if (!activeSortColumn || !searchConfiguration) {\n return undefined;\n }\n\n const activeMappedConfig = searchConfiguration.find(mappedSearchConfig => mappedSearchConfig.sortColumn.ColumnName === activeSortColumn.ColumnName &&\n mappedSearchConfig.sortColumn.IsDescending === activeSortColumn.IsDescending\n );\n if (!activeMappedConfig) {\n return undefined;\n }\n\n return this.sortByDropdownOptions.find(dropdownOption => dropdownOption.key === activeMappedConfig.key);\n };\n\n private readonly _onUpdateRefiners = (itemToggleNotification: IRefineItemToggleNotification): void => {\n const { context } = this.props;\n const requestContext = context && context.request;\n const actionContext = context && context.actionContext;\n\n if (!requestContext || !actionContext || !this.props.data.listPageState.result) {\n const error = `Refine menu cannot refine search criteria: ${!requestContext ? 'requestContext ' : ''} ${!actionContext ? 'actionContext ' : ''} could not be found`;\n this.props.telemetry.warning(error);\n }\n\n const updatedRefinementCriteria = getUpdatedRefinementCriteria(itemToggleNotification, this.props.data.listPageState.result && this.props.data.listPageState.result.activeFilters || []);\n\n window.history.pushState({}, '', buildListPageUrl(getCurrentUrl(this.props.context.request), updatedRefinementCriteria));\n transaction(() => {\n this.props.data.listPageState.result!.currentPageNumber = 0;\n this.props.data.listPageState.result!.activeFilters = updatedRefinementCriteria;\n });\n };\n\n private readonly _buildRefinerUrl = (itemToggleNotification: IRefineItemToggleNotification): string => {\n if (this.props.data.listPageState.result) {\n const newRefinementCriteria = getUpdatedRefinementCriteria(itemToggleNotification, this.props.data.listPageState.result.activeFilters || []);\n\n return buildListPageUrl(getCurrentUrl(this.props.context.request), newRefinementCriteria);\n }\n this.props.telemetry.warning('[buildRefinerQueryString]List Page State Not available, unable to build refiner URL');\n return '';\n\n };\n\n private readonly _onChoiceClicked = (notification: IChoiceSummaryClickNotification): void => {\n const { data, telemetry } = this.props;\n\n if (!data.listPageState.result) {\n telemetry.warning('[choice-summary-by-category._onChoiceClicked]ListPageState unavailable, unable to update refiners.');\n return;\n }\n\n let currentRefinementCriteria = (data.listPageState.result && data.listPageState.result.activeFilters) || [];\n\n if (!notification.clearAll) {\n const selectedChoice = notification.choiceClicked;\n if (!selectedChoice) {\n telemetry.warning('[choice-summary-by-category._onChoiceClicked] Choice could not be determined');\n return;\n }\n currentRefinementCriteria = currentRefinementCriteria.filter(\n (selectedCriterion: ProductRefinerValue) => !isMatchingRefinementCriterion(selectedChoice, selectedCriterion)\n );\n } else {\n currentRefinementCriteria = [];\n\n // Set focus to sort and filter\n const dropdownElementId = this._sortAndFilterContainerRef.current && this._sortAndFilterContainerRef.current.props.dropdownId;\n const dropdownElement = dropdownElementId && document.getElementById(dropdownElementId);\n setTimeout(() => {\n dropdownElement && dropdownElement.focus();\n },\n 50);\n }\n\n const fullUrl = getCurrentUrl(this.props.context.request);\n window.history.pushState({}, '', buildListPageUrl(fullUrl, currentRefinementCriteria));\n data.listPageState.result.currentPageNumber = 0;\n data.listPageState.result.activeFilters = currentRefinementCriteria;\n };\n\n private readonly _buildRefinerUrlForChoiceSummary = (selectedRefiner: ProductRefinerValue, isClearAll: boolean): string => {\n const { data, telemetry } = this.props;\n const fullUrl = getCurrentUrl(this.props.context.request);\n\n if (!data.listPageState.result) {\n telemetry.warning('[choice-summary-by-category._buildRefinerUrl]ListPageState unavailable, unable to create refiner URL.');\n return fullUrl.href;\n }\n\n let currentRefinementCriteria = (data.listPageState.result && data.listPageState.result.activeFilters) || [];\n\n if (!isClearAll) {\n if (!selectedRefiner) {\n telemetry.warning('[choice-summary-by-category._buildRefinerUrl] URL for Choice could not be determined');\n return fullUrl.href;\n }\n currentRefinementCriteria = currentRefinementCriteria.filter(\n (selectedCriterion: ProductRefinerValue) => !isMatchingRefinementCriterion(selectedRefiner, selectedCriterion)\n );\n } else {\n currentRefinementCriteria = [];\n }\n\n return buildListPageUrl(fullUrl, currentRefinementCriteria);\n };\n\n private _getViewport(): GridSize {\n const { context } = this.props;\n\n // Always render in mobile viewport on a mobile device\n if (context.request && context.request.device && context.request.device.Type === 'Mobile') {\n return 'xs';\n }\n\n if (MsDyn365.isBrowser && window.innerWidth) {\n const gridSettings = context.request.gridSettings;\n if (gridSettings) {\n if (gridSettings.xs && window.innerWidth <= gridSettings.xs.w) {\n return 'xs';\n } else if (gridSettings.sm && window.innerWidth <= gridSettings.sm.w) {\n return 'sm';\n } else if (gridSettings.md && window.innerWidth <= gridSettings.md.w) {\n return 'md';\n } else if (gridSettings.lg && window.innerWidth <= gridSettings.lg.w) {\n return 'lg';\n }\n return 'xl';\n\n }\n }\n\n return 'lg';\n }\n\n private _toggleModal(): void {\n this.setState({\n modalIsOpen: !this.state.modalIsOpen\n });\n }\n\n private _updateViewport(): void {\n this._viewport = this._getViewport();\n\n if (this.state.modalIsOpen && !this.isMobile) {\n this._toggleModal();\n }\n }\n\n private readonly _getexpandRefinerCount = (validRefiners?: number, refinerCount?: expandRefinersCount): void => {\n switch (refinerCount) {\n case expandRefinersCount.all:\n this.expandrefinerCount = validRefiners;\n break;\n case expandRefinersCount.one:\n this.expandrefinerCount = 1;\n break;\n case expandRefinersCount.two:\n this.expandrefinerCount = 2;\n break;\n case expandRefinersCount.three:\n this.expandrefinerCount = 3;\n break;\n case expandRefinersCount.four:\n this.expandrefinerCount = 4;\n break;\n default:\n this.expandrefinerCount = 0;\n }\n };\n\n /**\n * Renders a Pagination previous text.\n * @param paginationPreviousText - Pagination previous text from resources.\n * @returns Previous text and flipper icon.\n */\n private readonly _renderPrev = (paginationPreviousText: string) => {\n return (\n <div className='msc-pagination__prev'>\n <span className='ms-search-result__pagination-left' aria-hidden='true' />\n <span className='prev-text'>\n {paginationPreviousText}\n </span>\n </div>\n );\n };\n\n /**\n * Renders a Pagination next text.\n * @param paginationNextText - Pagination next text from resources.\n * @returns Next text and flipper icon.\n */\n private readonly _renderNext = (paginationNextText: string) => {\n return (\n <div className='msc-pagination__next'>\n <span className='next-text'>\n {paginationNextText}\n </span>\n <span className='ms-search-result__pagination-right' aria-hidden='true' />\n </div>\n );\n };\n\n}\n","/*--------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * See License.txt in the project root for license information.\n *--------------------------------------------------------------*/\n\n/* eslint-disable no-duplicate-imports */\nimport { Module, Node } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport { ISearchResultModalViewProps } from './components';\nimport { ICategoryHierarchyViewProps, IRefineMenuViewProps, ISearchResultContainerViewProps, ISortByViewProps, ITitleViewProps } from './search-result-container';\n\nconst SearchResultContainerView: React.FC<ISearchResultContainerViewProps> = props => {\n const { SearchResultContainer, products, pagination, ProductsContainer, ProductSectionContainer, choiceSummary, isMobile, modalToggle, searchResultModal, TitleViewProps,\n refineMenu, categoryHierarchy, sortByOptions, CategoryNavContainer, RefineAndProductSectionContainer, errorMessage, FeatureSearchContainer, similarLookProduct } = props;\n const isRecoSearchPage = props.context.actionContext.requestContext.query?.recommendation;\n if (isMobile) {\n return (\n <Module {...SearchResultContainer}>\n {renderCategoryHierarchy(categoryHierarchy)}\n {renderTitle(TitleViewProps)}\n {choiceSummary}\n {modalToggle}\n {createSearchResultModal(searchResultModal, refineMenu, sortByOptions, isRecoSearchPage)}\n <Node {...FeatureSearchContainer}>\n {similarLookProduct}\n </Node>\n <Node {...ProductsContainer}>\n {errorMessage}\n {products}\n </Node>\n {pagination}\n </Module>\n );\n }\n return (\n <Module {...SearchResultContainer}>\n <Node {...CategoryNavContainer}>\n {categoryHierarchy && renderCategoryHierarchy(categoryHierarchy)}\n {TitleViewProps && renderTitleCount(TitleViewProps)}\n </Node>\n <Node {...RefineAndProductSectionContainer}>\n {refineMenu && renderRefiner(refineMenu)}\n <Node {...ProductSectionContainer}>\n {TitleViewProps && renderTitle(TitleViewProps)}\n {choiceSummary}\n {sortByOptions && !isRecoSearchPage && renderSort(sortByOptions)}\n <Node {...FeatureSearchContainer}>\n {similarLookProduct}\n </Node>\n <Node {...ProductsContainer}>\n {errorMessage}\n {products}\n </Node>\n {pagination}\n </Node>\n </Node>\n </Module>\n );\n\n};\n\nconst createSearchResultModal = (modalProps: ISearchResultModalViewProps, refineMenu: IRefineMenuViewProps,\n sortByDropDown: ISortByViewProps, isRecoSearchPage?: string): JSX.Element => {\n return React.cloneElement(modalProps.modal, {}, modalProps.modalHeader,\n createModalBody(modalProps, refineMenu, sortByDropDown, isRecoSearchPage), modalProps.modalFooter);\n};\n\nconst createModalBody = (props: ISearchResultModalViewProps, refineMenu: IRefineMenuViewProps,\n sortByDropDown: ISortByViewProps, isRecoSearchPage?: string): JSX.Element | null => {\n if (sortByDropDown) {\n return React.cloneElement(props.modalBody, {}, renderSort(sortByDropDown, isRecoSearchPage), renderRefiner(refineMenu));\n }\n return null;\n};\n\nconst renderRefiner = (props: IRefineMenuViewProps): JSX.Element | null => {\n const { refiners, RefineMenuContainer, RefinerSectionContainer } = props;\n if (refiners) {\n return (\n <Node {...RefinerSectionContainer}>\n <Node {...RefineMenuContainer}>\n {refiners.map((submenu, index) => (\n <React.Fragment key={index}>\n {submenu}\n </React.Fragment>\n ))}\n </Node>\n </Node>\n );\n }\n return null;\n};\n\nconst renderSort = (props: ISortByViewProps, isRecoSearchPage?: string): JSX.Element | null => {\n const { SortingContainer, sortByDropDown } = props;\n if (sortByDropDown && !isRecoSearchPage) {\n return (\n <Node {...SortingContainer}>\n {sortByDropDown}\n </Node>\n );\n }\n return null;\n};\n\nconst renderCategoryHierarchy = (props: ICategoryHierarchyViewProps): JSX.Element | null => {\n const { CategoryHierarchyContainer, categoryHierarchyList, categoryHierarchySeparator } = props;\n if (categoryHierarchyList) {\n return (\n <Node {...CategoryHierarchyContainer}>\n {categoryHierarchyList.map((category, index) => (\n <React.Fragment key={index}>\n {category}\n {categoryHierarchyList && categoryHierarchyList[index + 1] && categoryHierarchySeparator}\n </React.Fragment>\n ))}\n </Node>\n );\n }\n\n return null;\n};\n\nconst renderTitle = (props: ITitleViewProps): JSX.Element | null => {\n const { title, TitleContainer } = props;\n if (title) {\n return (\n <Node {...TitleContainer}>\n <h2>\n {title.titlePrefix}\n {title.titleText}\n </h2>\n </Node>\n );\n }\n return null;\n};\n\nconst renderTitleCount = (props: ITitleViewProps): JSX.Element | null => {\n const { title, TitleContainer } = props;\n if (title) {\n return (\n <Node {...TitleContainer}>\n <h5>\n {title.titleCount}\n </h5>\n </Node>\n );\n }\n return null;\n};\n\nexport default SearchResultContainerView;\n","/*--------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * See License.txt in the project root for license information.\r\n *--------------------------------------------------------------*/\r\n\r\nimport { IPriceComponentResources } from '@msdyn365-commerce/components';\r\nimport { ProductSearchResult } from '@msdyn365-commerce/retail-proxy';\r\nimport { ArrayExtensions } from '@msdyn365-commerce-modules/retail-actions';\r\nimport {\r\n ICategoryHierarchyViewProps,\r\n IRefineMenuViewProps,\r\n ISearchResultContainerViewProps,\r\n ISearchResultModalViewProps,\r\n ISortByViewProps,\r\n ITitleViewProps\r\n} from '@msdyn365-commerce-modules/search-result-container';\r\nimport { Button, getTelemetryObject, Module, Node } from '@msdyn365-commerce-modules/utilities';\r\nimport React, { useState } from 'react';\r\n\r\nimport { ISearchResultContainerProps } from '../definition-extensions/search-result-container.ext.props.autogenerated';\r\nimport { ProductComponent } from './components/product.component';\r\n\r\n/**\r\n * DescriptionInterval.\r\n */\r\nenum DescriptionInterval {\r\n productDescriptionInterval = 14,\r\n productDescriptionIntervalRemainder0 = 0,\r\n productDescriptionIntervalRemainder9 = 9\r\n}\r\n\r\n/**\r\n * Render Clear button for mobile viewport.\r\n * @param props - The view props.\r\n * @returns The JSX Element.\r\n */\r\nconst renderProductCards = (props: ISearchResultContainerViewProps & ISearchResultContainerProps<{}>): JSX.Element | null => {\r\n return (\r\n <Node {...props.ProductsContainer}>\r\n {props.errorMessage}\r\n {props.products}\r\n </Node>\r\n );\r\n\r\n};\r\n\r\n/**\r\n * Returns the product inventory label.\r\n * @param channelInventoryConfigurationId - The channel configuration Id.\r\n * @param product - The product.\r\n * @returns The inventory label.\r\n */\r\nfunction getInventoryLabel(channelInventoryConfigurationId: number | undefined, product: ProductSearchResult): string | undefined {\r\n if (!channelInventoryConfigurationId || !ArrayExtensions.hasElements(product.AttributeValues)) {\r\n return undefined;\r\n }\r\n const inventoryAttribute = product.AttributeValues.find(attribute => attribute.RecordId === channelInventoryConfigurationId);\r\n if (inventoryAttribute) {\r\n return inventoryAttribute.TextValue;\r\n }\r\n return undefined;\r\n}\r\n\r\n/**\r\n * Render Clear button for mobile viewport.\r\n * @param props - The view props.\r\n * @param product - The product item data.\r\n * @param index - The index of each product item.\r\n * @param isEnabledProductDescription - The flag for showing Product desription tile.\r\n * @returns The JSX Element.\r\n */\r\nconst renderProductCardsDescription = (\r\n props: ISearchResultContainerViewProps & ISearchResultContainerProps<{}>,\r\n product: ProductSearchResult,\r\n index: number,\r\n isEnabledProductDescription?: boolean): JSX.Element | null => {\r\n const { config, context, resources } = props;\r\n const telemetryContent = getTelemetryObject(props.context.request.telemetryPageName!, props.friendlyName, props.telemetry);\r\n const breadCrumbType = props.context.app.config.breadcrumbType;\r\n const isAllowBack = props.config.allowBackNavigation && (breadCrumbType === 'back' || breadCrumbType === 'categoryAndBack');\r\n const classname = isEnabledProductDescription ? 'ms-product-search-result__item product__description' : 'ms-product-search-result__item';\r\n const quickviewslot = ArrayExtensions.hasElements(props.slots.quickview) ? props.slots.quickview[0] : undefined;\r\n const channelInventoryConfigurationId = props.data.products.result?.channelInventoryConfigurationId;\r\n const isPriceMinMaxFeatureState = props.data.featureState.result?.find(\r\n featureState => featureState.Name === 'Dynamics.AX.Application.RetailSearchPriceRangeFeature');\r\n const priceResources: IPriceComponentResources = {\r\n priceRangeSeparator: resources.priceRangeSeparator\r\n };\r\n\r\n product.Price = 0;\r\n return (\r\n <li className={classname} key={index}>\r\n <ProductComponent\r\n context={context}\r\n telemetryContent={telemetryContent}\r\n imageSettings={config.imageSettings}\r\n freePriceText={resources.priceFree}\r\n originalPriceText={resources.originalPriceText}\r\n currentPriceText={resources.currentPriceText}\r\n ratingAriaLabel={resources.ratingAriaLabel}\r\n allowBack={isAllowBack}\r\n id={props.id}\r\n typeName={props.typeName}\r\n data={{ product }}\r\n quickViewButton={quickviewslot}\r\n isEnabledProductDescription={isEnabledProductDescription}\r\n inventoryLabel={getInventoryLabel(channelInventoryConfigurationId, product)}\r\n isPriceMinMaxEnabled={isPriceMinMaxFeatureState?.IsEnabled}\r\n priceResources={priceResources}\r\n />\r\n </li>\r\n );\r\n};\r\n\r\n/**\r\n * Render Clear button for mobile viewport.\r\n * @param props - The view props.\r\n * @returns The JSX Element.\r\n */\r\nconst renderProducts = (props: ISearchResultContainerViewProps & ISearchResultContainerProps<{}>): JSX.Element | null => {\r\n const products = props.data.listPageState.result?.activeProducts;\r\n if (!products || !ArrayExtensions.hasElements(products)) {\r\n return null;\r\n }\r\n const productDescriptionInterval: number = DescriptionInterval.productDescriptionInterval;\r\n const productDescriptionIntervalRemainder0: number = DescriptionInterval.productDescriptionIntervalRemainder0;\r\n const productDescriptionIntervalRemainder9: number = DescriptionInterval.productDescriptionIntervalRemainder9;\r\n return (\r\n <Node {...props.ProductsContainer}>\r\n {props.errorMessage}\r\n <ul className='list-unstyled'>\r\n {products.map((product: ProductSearchResult, index: number) => (\r\n (index % productDescriptionInterval === productDescriptionIntervalRemainder0) ||\r\n (index % productDescriptionInterval === productDescriptionIntervalRemainder9) ? renderProductCardsDescription(props, product,\r\n index, true) : renderProductCardsDescription(props, product, index, false)\r\n ))}\r\n </ul>\r\n </Node>\r\n );\r\n};\r\n\r\n/**\r\n * Render Title Count.\r\n * @param props - The title view props.\r\n * @returns The JSX Element.\r\n */\r\nconst renderTitleCount = (props: ITitleViewProps): JSX.Element | null => {\r\n const { title, TitleContainer } = props;\r\n return (\r\n <Node {...TitleContainer}>\r\n {title.titleCount}\r\n </Node>\r\n );\r\n};\r\n\r\n/**\r\n * Render Category Hierarchy.\r\n * @param props - The category hierarchy view props.\r\n * @returns The JSX Element.\r\n */\r\nconst renderCategoryHierarchy = (props: ICategoryHierarchyViewProps): JSX.Element | null => {\r\n const { CategoryHierarchyContainer, categoryHierarchyList, categoryHierarchySeparator } = props;\r\n if (categoryHierarchyList) {\r\n return (\r\n <Node {...CategoryHierarchyContainer}>\r\n {categoryHierarchyList.map((category, index) => (\r\n <React.Fragment key={index}>\r\n {category}\r\n {categoryHierarchyList[index + 1] && categoryHierarchySeparator}\r\n </React.Fragment>\r\n ))}\r\n </Node>\r\n );\r\n }\r\n\r\n return null;\r\n};\r\n\r\n/**\r\n * Render the category page items.\r\n * @param props - The view props.\r\n * @returns The search Result container module view.\r\n */\r\nconst SearchResultContainerView: React.FC<ISearchResultContainerViewProps & ISearchResultContainerProps<{}>> = props => {\r\n const { SearchResultContainer, pagination, ProductSectionContainer, choiceSummary, isMobile, modalToggle, searchResultModal, TitleViewProps,\r\n refineMenu, categoryHierarchy, sortByOptions, CategoryNavContainer, RefineAndProductSectionContainer, FeatureSearchContainer,\r\n similarLookProduct, errorMessage, resources } = props;\r\n const [isExpanded, setIsExpanded] = useState<boolean>(false);\r\n const toggle = () => {\r\n setIsExpanded(!isExpanded);\r\n };\r\n const isRecoSearchPage = props.context.actionContext.requestContext.query?.recommendation;\r\n if (isMobile) {\r\n return (\r\n <Module {...SearchResultContainer}>\r\n {similarLookProduct ? null : <Node {...CategoryNavContainer}>\r\n {renderCategoryHierarchy(categoryHierarchy)}\r\n {renderTitle(TitleViewProps)}\r\n {renderTitleCount(TitleViewProps)}\r\n </Node>}\r\n {choiceSummary}\r\n <Node className='msc-sort-filter-wrapper'>\r\n {modalToggle}\r\n </Node>\r\n {createSearchResultModal(searchResultModal, refineMenu, sortByOptions, isRecoSearchPage)}\r\n <Node {...FeatureSearchContainer}>\r\n {similarLookProduct}\r\n </Node>\r\n {errorMessage}\r\n {props.config.enableProdutDescription ? renderProducts(props) : renderProductCards(props)}\r\n {pagination}\r\n </Module>\r\n );\r\n }\r\n return (\r\n <Module {...SearchResultContainer}>\r\n {similarLookProduct ? null : <Node {...CategoryNavContainer}>\r\n {categoryHierarchy && renderCategoryHierarchy(categoryHierarchy)}\r\n {TitleViewProps && renderTitle(TitleViewProps)}\r\n {TitleViewProps && renderTitleCount(TitleViewProps)}\r\n </Node>}\r\n <Node {...FeatureSearchContainer}>\r\n {similarLookProduct}\r\n </Node>\r\n <Node {...RefineAndProductSectionContainer}>\r\n <Node className='ms-refiner-heading'>\r\n <Node className='ms-refiner-heading_title'>\r\n \r\n {props.context.request.user.isAuthenticated ? <Button\r\n className={isExpanded ? 'ms-refine-filter__toggle_expanded' : 'ms-refine-filter__toggle_collapsed'}\r\n aria-label='Filter'\r\n onClick={toggle}\r\n aria-expanded={isExpanded}\r\n tabIndex={0}\r\n >\r\n {resources.filterText}\r\n </Button>:<></>}\r\n <div className='ms-search-result-wrapper-title-choice-summary'>\r\n {choiceSummary}\r\n </div>\r\n <div className='ms-search-result-wrapper-sort-by-category'>\r\n {sortByOptions && !isRecoSearchPage && renderSort(sortByOptions)}\r\n </div>\r\n </Node>\r\n {refineMenu && isExpanded && renderRefiner(refineMenu)}\r\n </Node>\r\n <Node {...ProductSectionContainer}>\r\n {errorMessage}\r\n {props.config.enableProdutDescription ? renderProducts(props) : renderProductCards(props)}\r\n {pagination}\r\n </Node>\r\n </Node>\r\n </Module>\r\n );\r\n};\r\n\r\n/**\r\n * Render Search result Modal.\r\n * @param modalProps - The Search Result Modal view props.\r\n * @param refineMenu - The Refine Menu view props.\r\n * @param sortByDropDown - The Sort by view props.\r\n * @param isRecoSearchPage - The recomandation search page flag.\r\n * @returns The JSX Element.\r\n */\r\nconst createSearchResultModal = (modalProps: ISearchResultModalViewProps, refineMenu: IRefineMenuViewProps, sortByDropDown: ISortByViewProps,\r\n isRecoSearchPage?: string): JSX.Element => {\r\n return React.cloneElement(modalProps.modal, {}, modalProps.modalHeader, createModalBody(modalProps, refineMenu, sortByDropDown,\r\n isRecoSearchPage), modalProps.modalFooter);\r\n};\r\n\r\n/**\r\n * Render Refiner Mobile.\r\n * @param props - The Refine Menu view props.\r\n * @returns The JSX Element.\r\n */\r\nconst renderRefinerMobile = (props: IRefineMenuViewProps): JSX.Element | null => {\r\n const { refiners, RefineMenuContainer, RefinerSectionContainer } = props;\r\n if (refiners) {\r\n return (\r\n <Node {...RefinerSectionContainer}>\r\n <Node {...RefineMenuContainer}>\r\n {refiners.map((submenu, index) => (\r\n <React.Fragment key={index}>\r\n {submenu}\r\n </React.Fragment>\r\n ))}\r\n </Node>\r\n </Node>\r\n );\r\n }\r\n return null;\r\n};\r\n\r\n/**\r\n * Render Search result Body.\r\n * @param props - The Search Result Modal view props.\r\n * @param refineMenu - The Refine Menu view props.\r\n * @param sortByDropDown - The Sort by view props.\r\n * @param isRecoSearchPage - The recomandation search page flag.\r\n * @returns The JSX Element.\r\n */\r\nconst createModalBody = (props: ISearchResultModalViewProps, refineMenu: IRefineMenuViewProps,\r\n sortByDropDown: ISortByViewProps, isRecoSearchPage?: string): JSX.Element | null => {\r\n if (sortByDropDown) {\r\n return React.cloneElement(props.modalBody, {}, renderSort(sortByDropDown, isRecoSearchPage), renderRefinerMobile(refineMenu));\r\n }\r\n return null;\r\n};\r\n\r\n/**\r\n * Render Refiner.\r\n * @param props - The Refine Menu view props.\r\n * @returns The JSX Element.\r\n */\r\nconst renderRefiner = (props: IRefineMenuViewProps): JSX.Element | null => {\r\n const { refiners, RefineMenuContainer, RefinerSectionContainer } = props;\r\n if (refiners) {\r\n return (\r\n <Node {...RefinerSectionContainer}>\r\n <Node {...RefineMenuContainer}>\r\n {refiners.map((submenu, index) => (\r\n <React.Fragment key={index}>\r\n {submenu}\r\n </React.Fragment>\r\n ))}\r\n </Node>\r\n </Node>\r\n );\r\n }\r\n return null;\r\n};\r\n\r\n/**\r\n * Render sort by drop down.\r\n * @param props - The sort by view props.\r\n * @param isRecoSearchPage - The recomandation search page flag.\r\n * @returns The JSX Element.\r\n */\r\nconst renderSort = (props: ISortByViewProps, isRecoSearchPage?: string): JSX.Element | null => {\r\n const { SortingContainer, sortByDropDown } = props;\r\n if (sortByDropDown && !isRecoSearchPage) {\r\n return (\r\n <Node {...SortingContainer}>\r\n {sortByDropDown}\r\n </Node>\r\n );\r\n }\r\n return null;\r\n};\r\n\r\n/**\r\n * Render Title.\r\n * @param props - The title view props.\r\n * @returns The JSX Element.\r\n */\r\nconst renderTitle = (props: ITitleViewProps): JSX.Element | null => {\r\n const { title, TitleContainer } = props;\r\n if (title) {\r\n return (\r\n <Node {...TitleContainer}>\r\n <Node tag='h1' className=''>\r\n {title.titlePrefix}\r\n {title.titleText}\r\n </Node>\r\n </Node>\r\n );\r\n }\r\n return null;\r\n};\r\n\r\nexport default SearchResultContainerView;\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['search-result-container'] = {\n c: () => require('partner/modules/search-result-container/search-result-container.tsx'),\n $type: 'containerModule',\n da: [{name:'category', path:'@msdyn365-commerce-modules/retail-actions/dist/lib/get-current-category', runOn: 0},{name:'categoryHierarchy', path:'@msdyn365-commerce-modules/retail-actions/dist/lib/get-current-category-hierarchy', runOn: 0},{name:'customerInformation', path:'@msdyn365-commerce-modules/retail-actions/dist/lib/get-customer', runOn: 0},{name:'featureProduct', path:'@msdyn365-commerce-modules/retail-actions/dist/lib/get-selected-variant', runOn: 0},{name:'featureState', path:'@msdyn365-commerce-modules/retail-actions/dist/lib/get-feature-state', runOn: 0},{name:'listPageState', path:'modules/search-result-container/list-page-state', runOn: 0},{name:'products', path:'modules/search-result-container/actions/get-full-products-by-collection', runOn: 0},{name:'productsAgreements', path:'modules/search-result-container/actions/get-custom-products-trade-agreements', runOn: 0},{name:'refiners', path:'modules/search-result-container/actions/get-refiners-for-collection', runOn: 0},{name:'searchConfiguration', path:'modules/search-result-container/actions/get-mapped-search-configuration', runOn: 0}],\n \n iNM: false,\n ns: '__local__',\n n: 'search-result-container',\n p: '__local__',\n \n pdp: '',\n \n \n md: 'src/modules/search-result-container'\n });\n \n\n {\n const sanitizedActionPath = '@msdyn365-commerce-modules/retail-actions/dist/lib/get-current-category';\n let dataAction = require('@msdyn365-commerce-modules/retail-actions/dist/lib/get-current-category');\n registerSanitizedActionPath(sanitizedActionPath, dataAction);\n }\n \n\n {\n const sanitizedActionPath = '@msdyn365-commerce-modules/retail-actions/dist/lib/get-current-category-hierarchy';\n let dataAction = require('@msdyn365-commerce-modules/retail-actions/dist/lib/get-current-category-hierarchy');\n registerSanitizedActionPath(sanitizedActionPath, dataAction);\n }\n \n\n {\n const sanitizedActionPath = '@msdyn365-commerce-modules/retail-actions/dist/lib/get-customer';\n let dataAction = require('@msdyn365-commerce-modules/retail-actions/dist/lib/get-customer');\n registerSanitizedActionPath(sanitizedActionPath, dataAction);\n }\n \n\n {\n const sanitizedActionPath = '@msdyn365-commerce-modules/retail-actions/dist/lib/get-feature-state';\n let dataAction = require('@msdyn365-commerce-modules/retail-actions/dist/lib/get-feature-state');\n registerSanitizedActionPath(sanitizedActionPath, dataAction);\n }\n \n\n {\n const sanitizedActionPath = '@msdyn365-commerce-modules/retail-actions/dist/lib/get-selected-variant';\n let dataAction = require('@msdyn365-commerce-modules/retail-actions/dist/lib/get-selected-variant');\n registerSanitizedActionPath(sanitizedActionPath, dataAction);\n }\n \n\n {\n const sanitizedActionPath = 'modules/search-result-container/actions/get-custom-products-trade-agreements';\n let dataAction = require('partner/modules/search-result-container/actions/get-custom-products-trade-agreements');\n registerSanitizedActionPath(sanitizedActionPath, dataAction);\n }\n \n\n {\n const sanitizedActionPath = 'modules/search-result-container/actions/get-full-products-by-collection';\n let dataAction = require('partner/modules/search-result-container/actions/get-full-products-by-collection');\n registerSanitizedActionPath(sanitizedActionPath, dataAction);\n }\n \n\n {\n const sanitizedActionPath = 'modules/search-result-container/actions/get-mapped-search-configuration';\n let dataAction = require('partner/modules/search-result-container/actions/get-mapped-search-configuration');\n registerSanitizedActionPath(sanitizedActionPath, dataAction);\n }\n \n\n {\n const sanitizedActionPath = 'modules/search-result-container/actions/get-refiners-for-collection';\n let dataAction = require('partner/modules/search-result-container/actions/get-refiners-for-collection');\n registerSanitizedActionPath(sanitizedActionPath, dataAction);\n }\n \n\n {\n const sanitizedActionPath = 'modules/search-result-container/list-page-state';\n let dataAction = require('partner/modules/search-result-container/list-page-state');\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|search-result-container|search-result-container'] = {\n c: () => require('partner/modules/search-result-container/search-result-container.view.tsx'),\n cn: '__local__-__local__-search-result-container'\n };\nviewDictionary['__local__|__local__|themes|adventureworks|views|search-result-container'] = {\n c: () => require('partner/themes/adventureworks/views/search-result-container.view.tsx'),\n cn: '__local__-__local__-search-result-container'\n };\nviewDictionary['@msdyn365-commerce-modules|fabrikam-design-kit|modules|fabrikam|views|search-result-container'] = {\n c: () => require('@msdyn365-commerce-modules/fabrikam-design-kit/dist/lib/modules/fabrikam/views/search-result-container.view.js'),\n cn: '@msdyn365-commerce-modules-fabrikam-design-kit-search-result-container'\n };\nviewDictionary['@msdyn365-commerce-modules|search-result-container|modules|search-result-container|search-result-container'] = {\n c: () => require('@msdyn365-commerce-modules/search-result-container/dist/lib/modules/search-result-container/search-result-container.view.js'),\n cn: '@msdyn365-commerce-modules-search-result-container-search-result-container'\n };\nviewDictionary['@msdyn365-commerce-theme|adventureworks-theme-kit|modules|adventureworks|views|search-result-container'] = {\n c: () => require('@msdyn365-commerce-theme/adventureworks-theme-kit/dist/lib/modules/adventureworks/views/search-result-container.view.js'),\n cn: '@msdyn365-commerce-theme-adventureworks-theme-kit-search-result-container'\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 {\n ICategoryHierarchyViewProps,\n IRefineMenuViewProps,\n ISearchResultContainerViewProps,\n ISearchResultModalViewProps,\n ISortByViewProps,\n ITitleViewProps\n} from '@msdyn365-commerce-modules/search-result-container';\nimport { Module, Node } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nconst SearchResultContainerView: React.FC<ISearchResultContainerViewProps> = props => {\n const {\n SearchResultContainer,\n products,\n pagination,\n ProductsContainer,\n ProductSectionContainer,\n choiceSummary,\n isMobile,\n modalToggle,\n searchResultModal,\n TitleViewProps,\n refineMenu,\n categoryHierarchy,\n sortByOptions,\n CategoryNavContainer,\n RefineAndProductSectionContainer,\n errorMessage,\n FeatureSearchContainer,\n similarLookProduct\n } = props;\n const isRecoSearchPage = props.context.actionContext.requestContext.query?.recommendation;\n if (isMobile) {\n return (\n <Module {...SearchResultContainer}>\n {categoryHierarchy && renderCategoryHierarchy(categoryHierarchy)}\n {renderTitle(TitleViewProps)}\n {choiceSummary}\n {modalToggle}\n {createSearchResultModal(searchResultModal, refineMenu, sortByOptions, isRecoSearchPage)}\n <Node {...FeatureSearchContainer}>{similarLookProduct}</Node>\n <Node {...ProductsContainer}>\n {errorMessage}\n {products}\n </Node>\n {pagination}\n </Module>\n );\n }\n return (\n <Module {...SearchResultContainer}>\n {categoryHierarchy && <Node {...CategoryNavContainer}>{renderCategoryHierarchy(categoryHierarchy)}</Node>}\n <Node {...RefineAndProductSectionContainer}>\n {refineMenu && renderRefiner(refineMenu)}\n <Node {...ProductSectionContainer}>\n <Node {...FeatureSearchContainer}>{similarLookProduct}</Node>\n <div className='ms-search-result-wrapper-title-choice-summary'>\n {TitleViewProps && renderTitle(TitleViewProps)}\n {choiceSummary}\n </div>\n <div className='ms-search-result-wrapper-sort-by-category'>\n {sortByOptions && !isRecoSearchPage && renderSort(sortByOptions)}\n </div>\n <Node {...ProductsContainer}>\n {errorMessage}\n {products}\n </Node>\n {pagination}\n </Node>\n </Node>\n </Module>\n );\n};\n\nconst createSearchResultModal = (\n modalProps: ISearchResultModalViewProps,\n refineMenu: IRefineMenuViewProps,\n sortByDropDown: ISortByViewProps,\n isRecoSearchPage?: string\n): JSX.Element => {\n return React.cloneElement(\n modalProps.modal,\n {},\n modalProps.modalHeader,\n createModalBody(modalProps, refineMenu, sortByDropDown, isRecoSearchPage),\n modalProps.modalFooter\n );\n};\n\nconst createModalBody = (\n props: ISearchResultModalViewProps,\n refineMenu: IRefineMenuViewProps,\n sortByDropDown: ISortByViewProps,\n isRecoSearchPage?: string\n): JSX.Element | null => {\n if (sortByDropDown) {\n return React.cloneElement(props.modalBody, {}, renderSort(sortByDropDown, isRecoSearchPage), renderRefiner(refineMenu));\n }\n return null;\n};\n\nconst renderRefiner = (props: IRefineMenuViewProps): JSX.Element | null => {\n const { refiners, RefineMenuContainer, RefinerSectionContainer } = props;\n if (refiners) {\n return (\n <Node {...RefinerSectionContainer}>\n <Node {...RefineMenuContainer}>\n {refiners.map((submenu, index) => (\n <React.Fragment key={index}>{submenu}</React.Fragment>\n ))}\n </Node>\n </Node>\n );\n }\n return null;\n};\n\nconst renderSort = (props: ISortByViewProps, isRecoSearchPage?: string): JSX.Element | null => {\n const { SortingContainer, sortByDropDown } = props;\n if (sortByDropDown && !isRecoSearchPage) {\n return <Node {...SortingContainer}>{sortByDropDown}</Node>;\n }\n return null;\n};\n\nconst renderCategoryHierarchy = (props: ICategoryHierarchyViewProps): JSX.Element | null => {\n const { CategoryHierarchyContainer, categoryHierarchyList, categoryHierarchySeparator } = props;\n if (categoryHierarchyList) {\n return (\n <Node {...CategoryHierarchyContainer}>\n {categoryHierarchyList.map((category, index) => (\n <React.Fragment key={index}>\n {category}\n {categoryHierarchyList && categoryHierarchyList[index + 1] && categoryHierarchySeparator}\n </React.Fragment>\n ))}\n </Node>\n );\n }\n\n return null;\n};\n\nconst renderTitle = (props: ITitleViewProps): JSX.Element | null => {\n const { title, TitleContainer } = props;\n if (title) {\n return (\n <Node {...TitleContainer}>\n <h2>\n {title.titlePrefix}\n {title.titleText}({title.titleCount})\n </h2>\n </Node>\n );\n }\n return null;\n};\n\nexport default SearchResultContainerView;\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 * as React from 'react';\n\nimport { ISearchResultModalViewProps } from './components';\nimport {\n ICategoryHierarchyViewProps,\n IRefineMenuViewProps,\n ISearchResultContainerViewProps,\n ISortByViewProps,\n ITitleViewProps\n} from './search-result-container';\n\nconst SearchResultContainerView: React.FC<ISearchResultContainerViewProps> = props => {\n const {\n SearchResultContainer,\n products,\n pagination,\n ProductsContainer,\n ProductSectionContainer,\n choiceSummary,\n isMobile,\n modalToggle,\n searchResultModal,\n TitleViewProps,\n refineMenu,\n categoryHierarchy,\n sortByOptions,\n CategoryNavContainer,\n RefineAndProductSectionContainer,\n errorMessage,\n FeatureSearchContainer,\n similarLookProduct\n } = props;\n const isRecoSearchPage = props.context.actionContext.requestContext.query?.recommendation;\n if (isMobile) {\n return (\n <Module {...SearchResultContainer}>\n {renderCategoryHierarchy(categoryHierarchy)}\n {renderTitle(TitleViewProps)}\n {choiceSummary}\n {modalToggle}\n {createSearchResultModal(searchResultModal, refineMenu, sortByOptions, isRecoSearchPage)}\n <Node {...FeatureSearchContainer}>{similarLookProduct}</Node>\n <Node {...ProductsContainer}>\n {errorMessage}\n {products}\n </Node>\n {pagination}\n </Module>\n );\n }\n return (\n <Module {...SearchResultContainer}>\n <Node {...CategoryNavContainer}>\n {categoryHierarchy && renderCategoryHierarchy(categoryHierarchy)}\n {TitleViewProps && renderTitleCount(TitleViewProps)}\n </Node>\n <Node {...RefineAndProductSectionContainer}>\n {refineMenu && renderRefiner(refineMenu)}\n <Node {...ProductSectionContainer}>\n {TitleViewProps && renderTitle(TitleViewProps)}\n {choiceSummary}\n {sortByOptions && !isRecoSearchPage && renderSort(sortByOptions)}\n <Node {...FeatureSearchContainer}>{similarLookProduct}</Node>\n <Node {...ProductsContainer}>\n {errorMessage}\n {products}\n </Node>\n {pagination}\n </Node>\n </Node>\n </Module>\n );\n};\n\nconst createSearchResultModal = (\n modalProps: ISearchResultModalViewProps,\n refineMenu: IRefineMenuViewProps,\n sortByDropDown: ISortByViewProps,\n isRecoSearchPage?: string\n): JSX.Element => {\n return React.cloneElement(\n modalProps.modal,\n {},\n modalProps.modalHeader,\n createModalBody(modalProps, refineMenu, sortByDropDown, isRecoSearchPage),\n modalProps.modalFooter\n );\n};\n\nconst createModalBody = (\n props: ISearchResultModalViewProps,\n refineMenu: IRefineMenuViewProps,\n sortByDropDown: ISortByViewProps,\n isRecoSearchPage?: string\n): JSX.Element | null => {\n if (sortByDropDown) {\n return React.cloneElement(props.modalBody, {}, renderSort(sortByDropDown, isRecoSearchPage), renderRefiner(refineMenu));\n }\n return null;\n};\n\nconst renderRefiner = (props: IRefineMenuViewProps): JSX.Element | null => {\n const { refiners, RefineMenuContainer, RefinerSectionContainer } = props;\n if (refiners) {\n return (\n <Node {...RefinerSectionContainer}>\n <Node {...RefineMenuContainer}>\n {refiners.map((submenu, index) => (\n <React.Fragment key={index}>{submenu}</React.Fragment>\n ))}\n </Node>\n </Node>\n );\n }\n return null;\n};\n\nconst renderSort = (props: ISortByViewProps, isRecoSearchPage?: string): JSX.Element | null => {\n const { SortingContainer, sortByDropDown } = props;\n if (sortByDropDown && !isRecoSearchPage) {\n return <Node {...SortingContainer}>{sortByDropDown}</Node>;\n }\n return null;\n};\n\nconst renderCategoryHierarchy = (props: ICategoryHierarchyViewProps): JSX.Element | null => {\n const { CategoryHierarchyContainer, categoryHierarchyList, categoryHierarchySeparator } = props;\n if (categoryHierarchyList) {\n return (\n <Node {...CategoryHierarchyContainer}>\n {categoryHierarchyList.map((category, index) => (\n <React.Fragment key={index}>\n {category}\n {categoryHierarchyList && categoryHierarchyList[index + 1] && categoryHierarchySeparator}\n </React.Fragment>\n ))}\n </Node>\n );\n }\n\n return null;\n};\n\nconst renderTitle = (props: ITitleViewProps): JSX.Element | null => {\n const { title, TitleContainer } = props;\n if (title) {\n return (\n <Node {...TitleContainer}>\n <h2>\n {title.titlePrefix}\n {title.titleText}\n </h2>\n </Node>\n );\n }\n return null;\n};\n\nconst renderTitleCount = (props: ITitleViewProps): JSX.Element | null => {\n const { title, TitleContainer } = props;\n if (title) {\n return (\n <Node {...TitleContainer}>\n <h5>{title.titleCount}</h5>\n </Node>\n );\n }\n return null;\n};\n\nexport default SearchResultContainerView;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { IProductsDimensionsAvailabilities } from '@msdyn365-commerce/commerce-entities';\nimport {\n IPriceComponentResources,\n ISwatchItem,\n PriceComponent,\n ProductComponentSwatchComponent,\n RatingComponent\n} from '@msdyn365-commerce/components';\nimport {\n getCatalogId,\n IAny,\n IComponent,\n IComponentProps,\n ICoreContext,\n IGeneric,\n IGridSettings,\n IImageData,\n IImageSettings,\n Image,\n msdyn365Commerce\n} from '@msdyn365-commerce/core';\nimport {\n AttributeSwatch,\n AttributeValue,\n ProductDimension,\n ProductPrice,\n ProductSearchResult,\n ProductType,\n SimpleProduct\n} from '@msdyn365-commerce/retail-proxy';\nimport {\n ArrayExtensions,\n convertDimensionTypeToProductDimensionType,\n Dictionary,\n DimensionTypes,\n generateImageUrl,\n getProductPageUrlSync,\n IDimensionsApp,\n StringExtensions,\n validateCatalogId\n} from '@msdyn365-commerce-modules/retail-actions';\nimport {\n format,\n getPayloadObject,\n getTelemetryAttributes,\n ITelemetryContent,\n onTelemetryClick\n} from '@msdyn365-commerce-modules/utilities';\nimport React, { useState } from 'react';\n\nexport interface IProductComponentProps extends IComponentProps<{ product?: ProductSearchResult; productPrice?: ProductPrice }> {\n className?: string;\n imageSettings?: IImageSettings;\n savingsText?: string;\n freePriceText?: string;\n originalPriceText?: string;\n currentPriceText?: string;\n ratingAriaLabel?: string;\n ratingCountAriaLabel?: string;\n allowBack?: boolean;\n telemetryContent?: ITelemetryContent;\n quickViewButton?: React.ReactNode;\n productComparisonButton?: React.ReactNode;\n isEnabledProductDescription?: boolean;\n isPriceMinMaxEnabled?: boolean;\n priceResources?: IPriceComponentResources;\n inventoryLabel?: string;\n dimensionAvailabilities?: IProductsDimensionsAvailabilities[];\n swatchItemAriaLabel?: string;\n}\n\nexport interface IProductComponent extends IComponent<IProductComponentProps> {}\n\nconst PriceComponentActions = {};\n\n/**\n * Gets the product page url from the default swatch selected.\n * @param productData - Product card to be rendered.\n * @returns The default color swatch selected if any.\n */\nfunction getDefaultSwatchSelected(coreContext: ICoreContext, productData?: ProductSearchResult): AttributeSwatch | null {\n if (!productData || !productData.AttributeValues) {\n return null;\n }\n\n const siteContext = coreContext as ICoreContext<IDimensionsApp>;\n const dimensionToPreSelectInProductCard = siteContext.app.config.dimensionToPreSelectInProductCard;\n\n const attributeSwatches = productData.AttributeValues.find(\n attributeValue => attributeValue.KeyName?.toLocaleLowerCase() === dimensionToPreSelectInProductCard\n )?.Swatches;\n\n if (!ArrayExtensions.hasElements(attributeSwatches)) {\n return null;\n }\n\n const defaultSwatch = attributeSwatches.find(item => item.IsDefault === true) ?? attributeSwatches[0];\n return defaultSwatch;\n}\n\n/**\n * Gets the product image from the default swatch selected.\n * @param coreContext - Context of the module using the component.\n * @param productData - Product card to be rendered.\n * @returns The product card image url.\n */\nfunction getProductImageUrlFromDefaultSwatch(coreContext: ICoreContext, productData?: ProductSearchResult): string | undefined {\n const defaultSwatch = getDefaultSwatchSelected(coreContext, productData);\n const swatchProductImageUrls = defaultSwatch?.ProductImageUrls;\n if (!ArrayExtensions.hasElements(swatchProductImageUrls)) {\n return productData?.PrimaryImageUrl;\n }\n\n return generateImageUrl(swatchProductImageUrls[0], coreContext.request.apiSettings);\n}\n\n/**\n * Updates the product url link to product details page.\n * @param productDetailsPageUrl - Product page url.\n * @param coreContext - Context of the module using the component.\n * @param queryString - Querystring to be added to the URL.\n * @returns The update product page url.\n */\nfunction updateProductUrl(productDetailsPageUrl: string, coreContext: ICoreContext, queryString: string): string {\n const sourceUrl = new URL(productDetailsPageUrl, coreContext.request.apiSettings.baseUrl);\n if (sourceUrl.search) {\n sourceUrl.search += `&${queryString}`;\n } else {\n sourceUrl.search += queryString;\n }\n\n const updatedUrl = new URL(sourceUrl.href);\n return updatedUrl.pathname + sourceUrl.search;\n}\n\n/**\n * Gets the react node for product unit of measure display.\n * @param unitOfMeasure - DefaultUnitOfMeasure property from product.\n * @returns The node representing markup for unit of measure component.\n */\nfunction renderProductUnitOfMeasure(unitOfMeasure?: string): JSX.Element | null {\n if (!unitOfMeasure) {\n return null;\n }\n return (\n <div className='msc-product__unit-of-measure'>\n <span>{unitOfMeasure}</span>\n </div>\n );\n}\n\n/**\n * Gets the react node for product availability.\n * @param inventoryAvailabilityLabel - The product information.\n * @returns The node representing markup for product availability.\n */\nfunction renderProductAvailability(inventoryAvailabilityLabel: string | undefined): JSX.Element | null {\n if (!inventoryAvailabilityLabel || inventoryAvailabilityLabel === '') {\n return null;\n }\n\n return (\n <div className='msc-product__availability'>\n <span>{inventoryAvailabilityLabel}</span>\n </div>\n );\n}\n\n/**\n * Renders product comparison button similar to the quick view button.\n * @param productComparisonButton - React element of the button.\n * @param product - Current product info.\n * @param catalogId - Current catalog.\n * @returns React element for the specific product.\n */\nfunction renderProductComparisonButton(\n productComparisonButton: React.ReactNode,\n product: ProductSearchResult,\n catalogId: number\n): JSX.Element | undefined {\n validateCatalogId(catalogId);\n return React.cloneElement(productComparisonButton as React.ReactElement, { product, catalogId });\n}\n\n/**\n * Gets the product page url from the default swatch selected.\n * @param coreContext - Context of the module using the component.\n * @param productUrl - Product page url for the product card.\n * @param productData - Product card to be rendered.\n * @returns The product card image url.\n */\nfunction getProductPageUrlFromDefaultSwatch(\n coreContext: ICoreContext,\n productUrl: string,\n productData?: ProductSearchResult\n): string | undefined {\n const defaultSwatch = getDefaultSwatchSelected(coreContext, productData);\n if (!defaultSwatch?.SwatchValue) {\n return productUrl;\n }\n\n const siteContext = coreContext as ICoreContext<IDimensionsApp>;\n const dimensionToPreSelectInProductCard = siteContext.app.config.dimensionToPreSelectInProductCard;\n\n const queryStringEncoded = encodeURIComponent(defaultSwatch.SwatchValue);\n const queryString = `${dimensionToPreSelectInProductCard}=${queryStringEncoded}`;\n return updateProductUrl(productUrl, coreContext, queryString);\n}\n\nconst ProductCard: React.FC<IProductComponentProps> = ({\n data,\n context,\n imageSettings,\n savingsText,\n freePriceText,\n originalPriceText,\n currentPriceText,\n ratingAriaLabel,\n ratingCountAriaLabel,\n allowBack,\n typeName,\n id,\n telemetryContent,\n quickViewButton,\n productComparisonButton,\n isEnabledProductDescription,\n isPriceMinMaxEnabled,\n priceResources,\n inventoryLabel,\n dimensionAvailabilities,\n swatchItemAriaLabel\n}) => {\n const product = data.product;\n const productPrice = data.productPrice;\n\n let productUrl = getProductPageUrlSync(product?.Name ?? '', product?.RecordId ?? Number.MIN_VALUE, context.actionContext, undefined);\n if (allowBack) {\n productUrl = updateProductUrl(productUrl, context, 'back=true');\n }\n const productImageUrlFromSwatch = getProductImageUrlFromDefaultSwatch(context, product) ?? product?.PrimaryImageUrl;\n const productPageUrlFromSwatch = getProductPageUrlFromDefaultSwatch(context, productUrl, product) ?? productUrl;\n const [productPageUrl, setProductPageUrl] = useState<string>(productPageUrlFromSwatch);\n const [productImageUrl, setProductImageUrl] = useState<string | undefined>(productImageUrlFromSwatch);\n React.useEffect(() => {\n setProductPageUrl(productPageUrlFromSwatch);\n setProductImageUrl(productImageUrlFromSwatch);\n }, [productUrl, productPageUrlFromSwatch, productImageUrlFromSwatch]);\n const [selectedSwatchItems] = useState(new Dictionary<DimensionTypes, ISwatchItem>());\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment,@typescript-eslint/no-unsafe-member-access -- app context is generic\n const enableStockCheck = context.app.config.enableStockCheck;\n\n const siteContext = context as ICoreContext<IDimensionsApp>;\n const dimensionToPreSelectInProductCard = siteContext.app.config.dimensionToPreSelectInProductCard;\n\n /**\n * Updates the product page and Image url based on swatch selected.\n * @param coreContext - Context of the caller.\n * @param swatchItem - Dimension swatch selected.\n */\n const updatePageAndImageUrl = React.useCallback(\n (coreContext: ICoreContext, swatchItem: ISwatchItem) => {\n const dimensionType = swatchItem.dimensionType;\n selectedSwatchItems.setValue(dimensionType, swatchItem);\n if (StringExtensions.isNullOrWhitespace(swatchItem.value)) {\n return;\n }\n const queryString = `${dimensionType}=${swatchItem.value}`;\n let productPageUrlWithSwatch = '';\n if (productPageUrl.includes(dimensionType)) {\n const newUrl = new URL(productPageUrl, coreContext.request.apiSettings.baseUrl);\n newUrl.searchParams.delete(dimensionType);\n productPageUrlWithSwatch = updateProductUrl(newUrl.toString(), context, queryString);\n } else {\n productPageUrlWithSwatch = updateProductUrl(productPageUrl, context, queryString);\n }\n setProductPageUrl(productPageUrlWithSwatch);\n if (dimensionType === dimensionToPreSelectInProductCard) {\n const swatchProductImageUrl = ArrayExtensions.hasElements(swatchItem.productImageUrls)\n ? swatchItem.productImageUrls[0]\n : undefined;\n const newImageUrl = generateImageUrl(swatchProductImageUrl, coreContext.request.apiSettings);\n setProductImageUrl(newImageUrl);\n }\n },\n [selectedSwatchItems, context, productPageUrl]\n );\n\n if (!product) {\n return null;\n }\n\n /**\n * Checks if rendering the particular dimensions is allowed for product card.\n * @param dimensionType - Dimension to be displayed.\n * @returns Updates the state with new product page url.\n */\n function shouldDisplayDimension(dimensionType: string): boolean {\n const dimensionsContext = context as ICoreContext<IDimensionsApp>;\n const dimensionsToDisplayOnProductCard = dimensionsContext.app.config.dimensionsInProductCard;\n return (\n ArrayExtensions.hasElements(dimensionsToDisplayOnProductCard) &&\n !dimensionsToDisplayOnProductCard.includes(DimensionTypes.none) &&\n dimensionsToDisplayOnProductCard.includes(dimensionType.toLocaleLowerCase() as DimensionTypes)\n );\n }\n\n /**\n * Gets the react node for product dimension as swatch.\n * @param attributeValues - Attribute value property from product.\n * @returns The node representing markup for unit of measure component.\n */\n function renderProductDimensions(attributeValues?: AttributeValue[]): JSX.Element | null {\n if (!attributeValues) {\n return null;\n }\n\n return (\n <div className='msc-product__dimensions'>\n {attributeValues.map((item: AttributeValue) => {\n const dimensionTypeValue = item.KeyName?.toLocaleLowerCase() ?? '';\n if (!shouldDisplayDimension(dimensionTypeValue)) {\n return null;\n }\n\n const siteContext = context as ICoreContext<IDimensionsApp>;\n const dimensionToPreSelectInProductCard = siteContext.app.config.dimensionToPreSelectInProductCard;\n const dimensionType = dimensionTypeValue as DimensionTypes;\n const swatches =\n item.Swatches?.map<ISwatchItem>(swatchItem => {\n return {\n itemId: `${item.RecordId ?? ''}-${dimensionTypeValue}-${swatchItem.SwatchValue ?? ''}`,\n value: swatchItem.SwatchValue ?? '',\n dimensionType,\n colorHexCode: swatchItem.SwatchColorHexCode,\n imageUrl: swatchItem.SwatchImageUrl,\n productImageUrls: swatchItem.ProductImageUrls,\n isDefault: swatchItem.IsDefault,\n swatchItemAriaLabel: swatchItemAriaLabel ? format(swatchItemAriaLabel, dimensionType) : '',\n isDisabled:\n enableStockCheck &&\n dimensionAvailabilities?.find(\n dimensionAvailability => dimensionAvailability.value === (swatchItem.SwatchValue ?? '')\n )?.isDisabled\n };\n }) ?? [];\n if (\n dimensionType === dimensionToPreSelectInProductCard &&\n ArrayExtensions.hasElements(swatches) &&\n !swatches.some(swatch => swatch.isDefault)\n ) {\n swatches[0].isDefault = true;\n }\n return (\n <ProductComponentSwatchComponent\n context={context}\n swatches={swatches}\n onSelectDimension={updatePageAndImageUrl}\n key={item.RecordId}\n />\n );\n })}\n </div>\n );\n }\n\n function renderQuickView(quickview: React.ReactNode, item?: number): JSX.Element | undefined {\n if (quickview === null) {\n return undefined;\n }\n const selectedDimensions: ProductDimension[] = selectedSwatchItems.getValues().map<ProductDimension>(swatches => {\n return {\n DimensionTypeValue: convertDimensionTypeToProductDimensionType(swatches.dimensionType),\n DimensionValue: {\n RecordId: 0,\n Value: swatches.value\n }\n };\n });\n return React.cloneElement(quickview as React.ReactElement, { selectedProductId: item, selectedDimensions });\n }\n\n // Construct telemetry attribute to render\n const payLoad = getPayloadObject('click', telemetryContent!, '', product.RecordId.toString());\n\n const attribute = getTelemetryAttributes(telemetryContent!, payLoad);\n\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access -- -- Do not need type check for appsettings\n const isUnitOfMeasureEnabled = context.app.config && context.app.config.unitOfMeasureDisplayType === 'buyboxAndBrowse';\n\n return (\n <>\n {isEnabledProductDescription ? (\n <a\n href={productPageUrl}\n onClick={onTelemetryClick(telemetryContent!, payLoad, product.Name!)}\n aria-label={renderLabel(\n product.Name,\n context.cultureFormatter.formatCurrency(product.Price),\n product.AverageRating,\n ratingAriaLabel,\n product.TotalRatings,\n ratingCountAriaLabel\n )}\n className='msc-product'\n {...attribute}\n >\n <div className='msc-product__image__description'>\n <div className='msc-product__image'>\n {renderProductPlacementImage(\n imageSettings,\n context.request.gridSettings,\n productImageUrl,\n product.PrimaryImageUrl,\n product.Name,\n context\n )}\n </div>\n <div className='msc-product__title_description'>\n <h2 className='msc-product__title__text'>{product.Name}</h2>\n {renderPrice(\n context,\n typeName,\n id,\n product,\n savingsText,\n freePriceText,\n originalPriceText,\n currentPriceText,\n isPriceMinMaxEnabled,\n priceResources,\n productPrice\n )}\n {isUnitOfMeasureEnabled && renderProductUnitOfMeasure(product.DefaultUnitOfMeasure)}\n {renderDescription(product.Description)}\n </div>\n </div>\n </a>\n ) : (\n <a\n href={productPageUrl}\n onClick={onTelemetryClick(telemetryContent!, payLoad, product.Name!)}\n aria-label={renderLabel(\n product.Name,\n context.cultureFormatter.formatCurrency(product.Price),\n product.AverageRating,\n ratingAriaLabel\n )}\n className='msc-product'\n {...attribute}\n >\n <div className='msc-product__image'>\n {renderProductPlacementImage(\n imageSettings,\n context.request.gridSettings,\n productImageUrl,\n product.PrimaryImageUrl,\n product.Name,\n context\n )}\n </div>\n <div className='msc-product__details'>\n <h2 className='msc-product__title'>{product.Name}</h2>\n {renderPrice(\n context,\n typeName,\n id,\n product,\n savingsText,\n freePriceText,\n originalPriceText,\n currentPriceText,\n isPriceMinMaxEnabled,\n priceResources,\n productPrice\n )}\n {isUnitOfMeasureEnabled && renderProductUnitOfMeasure(product.DefaultUnitOfMeasure)}\n </div>\n </a>\n )}\n {renderProductDimensions(product.AttributeValues)}\n {!context.app.config.hideRating &&\n renderRating(context, typeName, id, product.AverageRating, product.TotalRatings, ratingAriaLabel, ratingCountAriaLabel)}\n {renderProductAvailability(inventoryLabel)}\n {quickViewButton && renderQuickView(quickViewButton, product.RecordId)}\n {productComparisonButton && renderProductComparisonButton(productComparisonButton, product, getCatalogId(context.request))}\n </>\n );\n};\n\nfunction renderLabel(\n name?: string,\n price?: string,\n rating?: number,\n ratingAriaLabelText?: string,\n reviewCount?: number,\n ratingCountAriaLabelText?: string\n): string {\n const reviewCountArialableText = getReviewAriaLabel(reviewCount, ratingCountAriaLabelText ?? '');\n return `${name ?? ''} ${price ?? ''} ${getRatingAriaLabel(rating, ratingAriaLabelText)}${\n reviewCountArialableText ? ` ${reviewCountArialableText}` : ''\n }`;\n}\n\nfunction renderDescription(description?: string): JSX.Element | null {\n return <p className='msc-product__text'>{description}</p>;\n}\n\nfunction getRatingAriaLabel(rating?: number, ratingAriaLabel?: string): string {\n if (rating && ratingAriaLabel) {\n const roundedRating = rating.toFixed(2);\n return format(ratingAriaLabel || '', roundedRating, '5');\n }\n return '';\n}\n\nfunction getReviewAriaLabel(reviewCount?: number, ratingCountAriaLabelText?: string): string {\n if (reviewCount && ratingCountAriaLabelText) {\n return format(ratingCountAriaLabelText || '', reviewCount);\n }\n return '';\n}\n\nfunction renderRating(\n coreContext: ICoreContext,\n moduleTypeName: string,\n moduleId: string,\n avgRating?: number,\n totalRatings?: number,\n ariaLabel?: string,\n ratingCountAriaLabel?: string\n): JSX.Element | null {\n if (!avgRating) {\n return null;\n }\n\n const numberRatings = totalRatings?.toString() || undefined;\n const ratingAriaLabelText = getRatingAriaLabel(avgRating, ariaLabel);\n const ratingCountAriaLabelText = getReviewAriaLabel(Number(numberRatings), ratingCountAriaLabel);\n\n return (\n <RatingComponent\n context={coreContext}\n id={moduleId}\n typeName={moduleTypeName}\n avgRating={avgRating}\n ratingCount={numberRatings}\n readOnly\n ariaLabel={ratingAriaLabelText}\n ratingCountAriaLabel={ratingCountAriaLabelText}\n data={{}}\n />\n );\n}\n\nfunction renderPrice(\n context: ICoreContext,\n typeName: string,\n id: string,\n productSearchResult: ProductSearchResult,\n savingsText?: string,\n freePriceText?: string,\n originalPriceText?: string,\n currentPriceText?: string,\n isPriceMinMaxEnabled?: boolean,\n priceResources?: IPriceComponentResources,\n productPrice?: ProductPrice\n): JSX.Element | null {\n const product: SimpleProduct = {\n // This is a fake product. The product type is only used for price component to determine if it should show price range or not.\n ProductTypeValue: productSearchResult.IsMasterProduct ? ProductType.Master : ProductType.Standalone\n } as SimpleProduct;\n\n const price: ProductPrice = productPrice ?? {\n BasePrice: productSearchResult.BasePrice,\n AdjustedPrice: productSearchResult.Price,\n CustomerContextualPrice: productSearchResult.Price,\n MaxVariantPrice: productSearchResult.MaxVariantPrice ? productSearchResult.MaxVariantPrice : productSearchResult.Price,\n MinVariantPrice: productSearchResult.MinVariantPrice ? productSearchResult.MinVariantPrice : productSearchResult.Price\n };\n\n return (\n <PriceComponent\n context={context}\n id={id}\n typeName={typeName}\n product={product}\n data={{ price }}\n savingsText={savingsText}\n freePriceText={freePriceText}\n originalPriceText={originalPriceText}\n isPriceMinMaxEnabled={isPriceMinMaxEnabled}\n priceResources={priceResources}\n />\n );\n}\n\nfunction renderProductPlacementImage(\n imageSettings?: IImageSettings,\n gridSettings?: IGridSettings,\n imageUrl?: string,\n fallbackImageUrl?: string,\n altText?: string,\n context?: ICoreContext<IGeneric<IAny>>\n): JSX.Element | null {\n if (!imageUrl || !gridSettings || !imageSettings) {\n return null;\n }\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unsafe-assignment -- Site level config can be of any type.\n const contextConfig = context?.app.config?.placeholderImageName;\n const emptyPlaceHolderImage = contextConfig as string;\n let fallbackImageSource = fallbackImageUrl;\n if (emptyPlaceHolderImage && fallbackImageUrl) {\n fallbackImageSource = `${fallbackImageUrl},${emptyPlaceHolderImage}`;\n }\n const img: IImageData = {\n src: imageUrl,\n altText: altText ? altText : '',\n fallBackSrc: fallbackImageSource\n };\n const imageProps = {\n gridSettings,\n imageSettings\n };\n imageProps.imageSettings.cropFocalRegion = true;\n return (\n <Image\n requestContext={context?.actionContext.requestContext}\n {...img}\n {...imageProps}\n loadFailureBehavior='empty'\n bypassHideOnFailure\n />\n );\n}\n\nexport const ProductComponent: React.FunctionComponent<IProductComponentProps> = msdyn365Commerce.createComponentOverride<\n IProductComponent\n>('Product', { component: ProductCard, ...PriceComponentActions });\n\nexport default ProductComponent;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { IPriceComponentResources } from '@msdyn365-commerce/components';\nimport MsDyn365 from '@msdyn365-commerce/core';\nimport { ProductSearchResult } from '@msdyn365-commerce/retail-proxy';\nimport { ArrayExtensions } from '@msdyn365-commerce-modules/retail-actions';\nimport {\n ICategoryHierarchyViewProps,\n IRefineMenuViewProps,\n ISearchResultContainerViewProps,\n ISearchResultModalViewProps,\n ISortByViewProps,\n ITitleViewProps\n} from '@msdyn365-commerce-modules/search-result-container';\nimport { Button, getTelemetryObject, Module, Node } from '@msdyn365-commerce-modules/utilities';\nimport React, { MouseEventHandler, useEffect, useState } from 'react';\n\nimport { IProductsDimensionsAvailabilities } from '@msdyn365-commerce/commerce-entities';\nimport {\n ISearchResultContainerProps,\n ISearchResultContainerResources\n} from '../definition-extensions/search-result-container.ext.props.autogenerated';\nimport { ProductComponent } from './components/product.component';\n\n/**\n * DescriptionInterval.\n */\nenum DescriptionInterval {\n productDescriptionInterval = 14,\n productDescriptionIntervalRemainder0 = 0,\n productDescriptionIntervalRemainder9 = 9\n}\n\n/**\n * Render Clear button for mobile viewport.\n * @param props - The view props.\n * @returns The JSX Element.\n */\nconst renderProductCards = (props: ISearchResultContainerViewProps & ISearchResultContainerProps<{}>): JSX.Element | null => {\n return <Node {...props.ProductsContainer}>{props.products}</Node>;\n};\n\n/**\n * Returns the product inventory label.\n * @param channelInventoryConfigurationId - The channel configuration Id.\n * @param product - The product.\n * @returns The inventory label.\n */\nfunction getInventoryLabel(channelInventoryConfigurationId: number | undefined, product: ProductSearchResult): string | undefined {\n if (!channelInventoryConfigurationId || !ArrayExtensions.hasElements(product.AttributeValues)) {\n return undefined;\n }\n const inventoryAttribute = product.AttributeValues.find(attribute => attribute.RecordId === channelInventoryConfigurationId);\n if (inventoryAttribute) {\n return inventoryAttribute.TextValue;\n }\n return undefined;\n}\n\n/**\n * Render Clear button for mobile viewport.\n * @param props - The view props.\n * @param product - The product item data.\n * @param index - The index of each product item.\n * @param isEnabledProductDescription - The flag for showing Product desription tile.\n * @returns The JSX Element.\n */\nconst renderProductCardsDescription = (\n props: ISearchResultContainerViewProps & ISearchResultContainerProps<{}>,\n product: ProductSearchResult,\n index: number,\n isEnabledProductDescription?: boolean\n): JSX.Element | null => {\n const { config, context, resources, productsDimensionAvailabilities } = props;\n const telemetryContent = getTelemetryObject(props.context.request.telemetryPageName!, props.friendlyName, props.telemetry);\n const breadCrumbType = props.context.app.config.breadcrumbType;\n const isAllowBack = props.config.allowBackNavigation && (breadCrumbType === 'back' || breadCrumbType === 'categoryAndBack');\n const classname = isEnabledProductDescription\n ? 'ms-product-search-result__item product__description'\n : 'ms-product-search-result__item';\n const quickviewslot = ArrayExtensions.hasElements(props.slots.quickview) ? props.slots.quickview[0] : undefined;\n const channelInventoryConfigurationId = props.data.products.result?.channelInventoryConfigurationId;\n const isPriceMinMaxFeatureState = props.data.featureState.result?.find(\n featureState => featureState.Name === 'Dynamics.AX.Application.RetailSearchPriceRangeFeature'\n );\n const priceResources: IPriceComponentResources = {\n priceRangeSeparator: resources.priceRangeSeparator\n };\n\n const productComparisonButton = ArrayExtensions.hasElements(props.slots.productComparisonButton)\n ? props.slots.productComparisonButton[0]\n : null;\n\n return (\n <li className={classname} key={index}>\n <ProductComponent\n context={context}\n telemetryContent={telemetryContent}\n imageSettings={config.imageSettings}\n freePriceText={resources.priceFree}\n originalPriceText={resources.originalPriceText}\n currentPriceText={resources.currentPriceText}\n ratingAriaLabel={resources.ratingAriaLabel}\n allowBack={isAllowBack}\n id={props.id}\n key={product.RecordId}\n typeName={props.typeName}\n data={{ product }}\n quickViewButton={quickviewslot}\n productComparisonButton={productComparisonButton}\n isEnabledProductDescription={isEnabledProductDescription}\n inventoryLabel={getInventoryLabel(channelInventoryConfigurationId, product)}\n isPriceMinMaxEnabled={isPriceMinMaxFeatureState?.IsEnabled}\n priceResources={priceResources}\n swatchItemAriaLabel={resources.swatchItemAriaLabel}\n dimensionAvailabilities={productsDimensionAvailabilities?.find(\n (dimensionAvailability: IProductsDimensionsAvailabilities[]) =>\n ArrayExtensions.hasElements(dimensionAvailability) &&\n dimensionAvailability[0].masterProductId === product.MasterProductId\n )}\n />\n </li>\n );\n};\n\n/**\n * Render Clear button for mobile viewport.\n * @param props - The view props.\n * @returns The JSX Element.\n */\nconst renderProducts = (props: ISearchResultContainerViewProps & ISearchResultContainerProps<{}>): JSX.Element | null => {\n const products = props.data.listPageState.result?.activeProducts;\n if (!products || !ArrayExtensions.hasElements(products)) {\n return null;\n }\n const productDescriptionInterval: number = DescriptionInterval.productDescriptionInterval;\n const productDescriptionIntervalRemainder0: number = DescriptionInterval.productDescriptionIntervalRemainder0;\n const productDescriptionIntervalRemainder9: number = DescriptionInterval.productDescriptionIntervalRemainder9;\n return (\n <Node {...props.ProductsContainer}>\n {props.errorMessage}\n <ul className='list-unstyled'>\n {products.map((product: ProductSearchResult, index: number) =>\n index % productDescriptionInterval === productDescriptionIntervalRemainder0 ||\n index % productDescriptionInterval === productDescriptionIntervalRemainder9\n ? renderProductCardsDescription(props, product, index, true)\n : renderProductCardsDescription(props, product, index, false)\n )}\n </ul>\n </Node>\n );\n};\n\n/**\n * Render Title Count.\n * @param props - The title view props.\n * @returns The JSX Element.\n */\nconst renderTitleCount = (props: ITitleViewProps): JSX.Element | null => {\n const { title, TitleContainer } = props;\n if (title) {\n return <Node {...TitleContainer}>{title.titleCount}</Node>;\n }\n return null;\n};\n\n/**\n * Render Category Hierarchy.\n * @param props - The category hierarchy view props.\n * @returns The JSX Element.\n */\nconst renderCategoryHierarchy = (props: ICategoryHierarchyViewProps): JSX.Element | null => {\n const { CategoryHierarchyContainer, categoryHierarchyList, categoryHierarchySeparator } = props;\n if (categoryHierarchyList) {\n return (\n <Node {...CategoryHierarchyContainer}>\n {categoryHierarchyList.map((category, index) => (\n <React.Fragment key={index}>\n {category}\n {categoryHierarchyList[index + 1] && categoryHierarchySeparator}\n </React.Fragment>\n ))}\n </Node>\n );\n }\n\n return null;\n};\n\n/**\n * Function to make filter sticky.\n * @param isMobile - The boolean prop.\n * @param isStickyHeader - The boolean prop.\n */\nexport const configureStickyFilter = (isMobile: boolean, isStickyHeader: boolean): void => {\n // Get heights of cookie and promotion banners\n const defaultValue = 0;\n const defaultOffset = 28;\n const headerContainer: HTMLElement | null = document.querySelector('.ms-header');\n\n const headerHeight: number | undefined = headerContainer?.offsetHeight;\n const containerHeight: number = headerHeight ?? defaultOffset;\n const bannerHeights = isStickyHeader ? defaultValue : containerHeight;\n const headerElement = document.querySelector('header .lock-opaque');\n const defaultContainer = document.querySelector('header .default-container');\n const refinerElement = isMobile ? document.querySelector('.msc-sort-filter-wrapper') : document.querySelector('.ms-refiner-heading');\n if (refinerElement && headerElement && defaultContainer) {\n if (MsDyn365.isBrowser && document.documentElement.scrollTop > bannerHeights) {\n refinerElement.classList.add('lock-Filter');\n refinerElement.setAttribute('style', `top: ${defaultContainer.clientHeight}px`);\n } else {\n refinerElement.classList.remove('lock-Filter');\n }\n } else if (refinerElement) {\n if (MsDyn365.isBrowser && document.documentElement.scrollTop > bannerHeights) {\n refinerElement.classList.add('lock-top');\n } else {\n refinerElement.classList.remove('lock-top');\n refinerElement.classList.remove('lock-Filter');\n refinerElement.removeAttribute('style');\n }\n }\n};\n\n/**\n * Function to setup filter sticky.\n * @param isMobile - The boolean prop.\n * @param isStickyHeader - The boolean prop.\n */\nfunction stickyFilterSetup(isMobile: boolean, isStickyHeader: boolean): void {\n window.addEventListener('scroll', () => {\n configureStickyFilter(isMobile, isStickyHeader);\n });\n configureStickyFilter(isMobile, isStickyHeader);\n}\n\n/**\n * Function to make filter sticky.\n * @param refinerRefernce - Ref prop for filter.\n * @param toggle - Toggle function for filter menu.\n */\nfunction useOutsideClick(refinerRefernce: React.RefObject<HTMLElement>, toggle: (event: Event) => void) {\n React.useEffect(() => {\n /**\n * Function to make filter sticky.\n * @param event - Event prop for filter.\n */\n function handleClickOutside(event: Event) {\n const element = document.querySelector('.ms-refine-filter__toggle_collapsed');\n if (refinerRefernce.current && !refinerRefernce.current.contains(event.target as Node) && !element) {\n toggle(event);\n }\n }\n if (MsDyn365.isBrowser) {\n document.addEventListener('click', handleClickOutside);\n }\n return () => {\n if (MsDyn365.isBrowser) {\n document.removeEventListener('click', handleClickOutside);\n }\n };\n }, [refinerRefernce, toggle]);\n}\n\n/**\n * Render the category page items.\n * @param props - The view props.\n * @returns The search Result container module view.\n */\nconst SearchResultContainerView: React.FC<ISearchResultContainerViewProps & ISearchResultContainerProps<{}>> = props => {\n const {\n SearchResultContainer,\n pagination,\n ProductSectionContainer,\n choiceSummary,\n isMobile,\n modalToggle,\n searchResultModal,\n TitleViewProps,\n refineMenu,\n categoryHierarchy,\n sortByOptions,\n CategoryNavContainer,\n RefineAndProductSectionContainer,\n FeatureSearchContainer,\n similarLookProduct,\n errorMessage,\n resources\n } = props;\n useEffect(() => {\n if (props.config.useStickyFilter && MsDyn365.isBrowser) {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access -- app context is generic\n stickyFilterSetup(props.isMobile, props.context.app.config.enableStickyHeader as boolean);\n }\n }, [props]);\n const [isExpanded, setIsExpanded] = useState<boolean>(false);\n const toggle = () => {\n setIsExpanded(!isExpanded);\n };\n const wrapperRefiner = React.useRef(null);\n useOutsideClick(wrapperRefiner, toggle);\n const isRecoSearchPage = props.context.actionContext.requestContext.query?.recommendation;\n if (isMobile) {\n return (\n <Module {...SearchResultContainer}>\n {similarLookProduct ? null : (\n <Node {...CategoryNavContainer}>\n {renderCategoryHierarchy(categoryHierarchy)}\n {renderTitle(TitleViewProps)}\n {renderTitleCount(TitleViewProps)}\n </Node>\n )}\n {choiceSummary}\n <Node className='msc-sort-filter-wrapper'>{modalToggle}</Node>\n {createSearchResultModal(searchResultModal, refineMenu, sortByOptions, isRecoSearchPage)}\n <Node {...FeatureSearchContainer}>{similarLookProduct}</Node>\n {errorMessage}\n {props.config.enableProdutDescription ? renderProducts(props) : renderProductCards(props)}\n {pagination}\n </Module>\n );\n }\n return (\n <Module {...SearchResultContainer}>\n {similarLookProduct ? null : (\n <Node {...CategoryNavContainer}>\n {categoryHierarchy && renderCategoryHierarchy(categoryHierarchy)}\n {TitleViewProps && renderTitle(TitleViewProps)}\n {TitleViewProps && renderTitleCount(TitleViewProps)}\n </Node>\n )}\n <Node {...FeatureSearchContainer}>{similarLookProduct}</Node>\n <Node {...RefineAndProductSectionContainer}>\n <Node ref={wrapperRefiner} className='ms-refiner-heading'>\n <Node className='ms-refiner-heading_title'>\n <Button\n className={isExpanded ? 'ms-refine-filter__toggle_expanded' : 'ms-refine-filter__toggle_collapsed'}\n aria-label='Filter'\n onClick={toggle}\n aria-expanded={isExpanded}\n tabIndex={0}\n >\n {resources.filterText}\n </Button>\n <div className='ms-search-result-wrapper-title-choice-summary'>{choiceSummary}</div>\n <div className='ms-search-result-wrapper-sort-by-category'>\n {sortByOptions && !isRecoSearchPage && renderSort(sortByOptions)}\n </div>\n </Node>\n {refineMenu && isExpanded && renderRefiner(refineMenu)}\n <Node className='ms-refine__footer'>\n {refineMenu && isExpanded && renderRefinerFooter(refineMenu, toggle, resources)}\n </Node>\n </Node>\n\n <Node {...ProductSectionContainer}>\n {errorMessage}\n {props.config.enableProdutDescription ? renderProducts(props) : renderProductCards(props)}\n {pagination}\n </Node>\n </Node>\n </Module>\n );\n};\n\n/**\n * Render Search result Modal.\n * @param modalProps - The Search Result Modal view props.\n * @param refineMenu - The Refine Menu view props.\n * @param sortByDropDown - The Sort by view props.\n * @param isRecoSearchPage - The recomandation search page flag.\n * @returns The JSX Element.\n */\nconst createSearchResultModal = (\n modalProps: ISearchResultModalViewProps,\n refineMenu: IRefineMenuViewProps,\n sortByDropDown: ISortByViewProps,\n isRecoSearchPage?: string\n): JSX.Element => {\n return React.cloneElement(\n modalProps.modal,\n {},\n modalProps.modalHeader,\n createModalBody(modalProps, refineMenu, sortByDropDown, isRecoSearchPage),\n modalProps.modalFooter\n );\n};\n\n/**\n * Render Refiner Mobile.\n * @param props - The Refine Menu view props.\n * @returns The JSX Element.\n */\nconst renderRefinerMobile = (props: IRefineMenuViewProps): JSX.Element | null => {\n const { refiners, RefineMenuContainer, RefinerSectionContainer } = props;\n if (refiners) {\n return (\n <Node {...RefinerSectionContainer}>\n <Node {...RefineMenuContainer}>\n {refiners.map((submenu, index) => (\n <React.Fragment key={index}>{submenu}</React.Fragment>\n ))}\n </Node>\n </Node>\n );\n }\n return null;\n};\n\n/**\n * Render Search result Body.\n * @param props - The Search Result Modal view props.\n * @param refineMenu - The Refine Menu view props.\n * @param sortByDropDown - The Sort by view props.\n * @param isRecoSearchPage - The recomandation search page flag.\n * @returns The JSX Element.\n */\nconst createModalBody = (\n props: ISearchResultModalViewProps,\n refineMenu: IRefineMenuViewProps,\n sortByDropDown: ISortByViewProps,\n isRecoSearchPage?: string\n): JSX.Element | null => {\n if (sortByDropDown) {\n return React.cloneElement(props.modalBody, {}, renderSort(sortByDropDown, isRecoSearchPage), renderRefinerMobile(refineMenu));\n }\n return null;\n};\n\n/**\n * Render Refiner.\n * @param props - The Refine Menu view props.\n * @returns The JSX Element.\n */\nconst renderRefiner = (props: IRefineMenuViewProps): JSX.Element | null => {\n const { refiners, RefineMenuContainer, RefinerSectionContainer } = props;\n if (refiners) {\n return (\n <Node {...RefinerSectionContainer}>\n <Node {...RefineMenuContainer}>\n {refiners.map((submenu, index) => (\n <React.Fragment key={index}>{submenu}</React.Fragment>\n ))}\n </Node>\n </Node>\n );\n }\n return null;\n};\n\n/**\n * Render Refiner Footer.\n * @param props - The Refine Menu view props.\n * @param handler - The Refine menu toggle function.\n * @param resources - Resources to get the done text and aria label.\n * @returns The JSX Element.\n */\nconst renderRefinerFooter = (\n props: IRefineMenuViewProps,\n handler: MouseEventHandler,\n resources: ISearchResultContainerResources\n): JSX.Element | null => {\n const { refiners } = props;\n if (refiners) {\n return (\n <Node className='ms-refine__footer__done'>\n <Node tag='button' className='ms-refine-filter-done' aria-label={resources.doneAriaLabel} tabIndex={0} onClick={handler}>\n {resources.doneText}\n </Node>\n </Node>\n );\n }\n return null;\n};\n\n/**\n * Render sort by drop down.\n * @param props - The sort by view props.\n * @param isRecoSearchPage - The recomandation search page flag.\n * @returns The JSX Element.\n */\nconst renderSort = (props: ISortByViewProps, isRecoSearchPage?: string): JSX.Element | null => {\n const { SortingContainer, sortByDropDown } = props;\n if (sortByDropDown && !isRecoSearchPage) {\n return <Node {...SortingContainer}>{sortByDropDown}</Node>;\n }\n return null;\n};\n\n/**\n * Render Title.\n * @param props - The title view props.\n * @returns The JSX Element.\n */\nconst renderTitle = (props: ITitleViewProps): JSX.Element | null => {\n const { title, TitleContainer } = props;\n if (title) {\n return (\n <Node {...TitleContainer}>\n <Node tag='h1' className=''>\n {title.titlePrefix}\n {title.titleText}\n </Node>\n </Node>\n );\n }\n return null;\n};\n\nexport default SearchResultContainerView;\n","module.exports = React;","module.exports = ReactDOM;"],"names":["getProductsSalesAgreementInput","productRecIds","DataServiceQuery","createDataServiceRequestForOperation","DataServiceEntities","bypassCache","returnEntity","ProductRecIds","getProductsSalesAgreementAsync","context","request","callActionOrExecute","callerContext","BaseCollectionInput","constructor","pageType","apiSettings","queryResultSettings","refiners","category","searchText","includeAttributes","isUpdateRefinerPanel","locale","getCacheKey","_objectSpread","this","Paging","toJS","Sorting","buildCacheKey","map","refiner","String","RefinerRecordId","LeftValueBoundString","RightValueBoundString","convertToString","getCacheObjectType","dataCacheType","createBaseCollectionInput","args","inputClassConstuctor","requestContext","urlTokens","query","categoryId","QueryResultSettingsProxy","fromInputData","QueryResultSettings","queryRefiners","hydrateRefinersFromUrl","inputData","config","undefined","_inputData$config","updateRefinerPanel","getUpdateRefinerPanel","sorting","Columns","JSON","parse","decodeURIComponent","itemId","q","productId","recommendation","stringify","ProductId","Recommendation","Error","GetCustomProductsTradeAgreementsCollectionInput","actionDataAction","createObservableDataAction","id","action","async","input","promise","searchProductId","prod","searchCriteriaInput","Context","ChannelId","channelId","CatalogId","catalogId","Refinement","IncludeAttributes","SkipVariantExpansion","CategoryIds","searchByCriteriaAsync","SearchCondition","searchObject","Number","isNaN","RecommendationListId","Ids","productSearchResults","prodRecId","forEach","product","idx","push","RecordId","productTradeAgreement","gcProductTradeAgreementsEntity","Top","itemsPerPage","skip","Skip","count","ProductListInventoryFilteringOptions","GetFullProductsByCollectionInput","isOutOfStock","channelInventoryConfiguration","ArrayExtensions","hasElements","AttributeValues","attribute","InventoryProductAttributeRecordId","TextValue","InventoryOutOfStockAttributeValueText","returnProductsBasedOnInventoryInformation","products","ObjectExtensions","isNullOrUndefined","app","productListInventoryDisplay","HideOOS","filteredProducts","filterOutOfStockProducts","SortOOS","inStockProducts","outOfStockProducts","concat","sortsProductsBasedOnAvailability","returnProducts","metadataCount","productSearchResultsWithImages","productSearchResult","newImageUrl","generateProductImageUrl","PrimaryImageUrl","inventoryLevel","InventoryLevels","threshold","enableStockCheck","getInventoryConfigurationAsync","productsBasedOnInventory","element","inventoryRanges","data","index","ETAVal","AlternateItemRep","ItemId","currentProd","serviceResp","channelInventoryConfigurationId","err","console","log","_promise$metadata$cou","MsDyn365","isBrowser","update","ListPageStateInput","totalProductCount","metadata","activeFilters","sortOptions","sortByOptionRelevanceDesc","sortByOptionRatingAsc","sortByOptionRatingDesc","sortByOptionNameAsc","sortByOptionNameDesc","sortByOptionPriceAsc","sortByOptionPriceDesc","sortByOptionBestSelling","sortByOptionNewScore","sortByOptionTrendingScore","MappedSearchInput","getMappedSearchConfiguration","ctx","getSearchConfigurationAsync","then","searchConfiguration","ProductSortColumns","sortColumn","key","ColumnName","toUpperCase","IsDescending","telemetry","warning","filter","Boolean","createInput","getMappedSearchConfigurationDataAction","DefaultValues","getProductRefinerHierarchy","searchCriteria","getProductSearchRefinersAsync","productRefiners","trace","result","productRefiner","length","RefinersByCollectionInput","defaultCategoryIdValue","defaultProductIdValue","compressedRefinerKeys","compressedRefinerArray","parseQueryParam","compressedRefiner","parsedRefiner","refinerKey","_unused","buildListPageUrl","fullUrl","sortingColumns","skipCount","searchParams","delete","sortedRefiners","sort","first","second","set","compressedRefiners","compressRefiners","href","toString","getCurrentUrl","URL","window","location","url","requestUrl","getInventoryLabel","isLabelVisible","inventoryAttribute","find","ProductSearchResultItems","_ref","imageSettings","resources","moduleType","moduleId","allowBackNavigation","telemetryContent","quickviewSlot","productComparisonButton","isPriceMinMaxEnabled","productsDimensionAvailabilities","isPriceVisible","productsAgreements","priceResources","priceRangeSeparator","React","className","ProductComponent","freePriceText","priceFree","originalPriceText","currentPriceText","ratingAriaLabel","allowBack","typeName","quickViewButton","inventoryLabel","dimensionAvailabilities","dimensionAvailability","masterProductId","MasterProductId","productAgreement","x","ListPageState","activeProducts","sortingCritera","currentPageNumber","pageSize","featureProduct","productPrices","__decorate","observable","listPageStateAction","createListPageInput","ProductRefinerValueDataTypeValue","ProductRefinerTypeValue","ProductRefinerSource","isRangeType","dataTypeValue","AttributeDataType","Currency","Decimal","Integer","findMatchingRefinementCriterion","productRefinerValue","refinementCriteria","refinementCriterion","isMatchingRefinementCriterion","RefinerSourceValue","DataTypeValue","getUpdatedRefinementCriteria","itemToggleNotification","currentRefinementCriteria","updatedRefinementCriteria","toggledItemFound","selectedCriterion","isSelecting","next","rangeStart","rangeEnd","Text","TrueFalse","parentProductRefinerHierarchy","RefinerTypeValue","RefinerType","SingleSelect","Values","child","matchingIndex","findIndex","criterion","splice","ChoiceSummary","props","super","closeButtonGlyph","_onClick","e","preventDefault","stopPropagation","target","currentTarget","clearAll","getAttribute","includes","selectedRefiner","_getSelectedRefinerChoice","onChoiceClicked","itemClicked","choiceClicked","nextItemToFocus","nextSibling","payLoad","getPayloadObject","selectedChoices","_getKeyForRefinerValue","value","render","clearAllText","label","classNames","choiceAriaLabel","closeAriaLabel","items","selectedRefinersMap","contentAction","etext","clearAllAttributes","getTelemetryAttributes","classnames","item","listItemProps","Object","assign","urlBuilder","onClick","role","choiceFormat","choiceRangeValueFormat","refinerHierarchy","overallFormat","rangeFormat","refinerValueName","refinerName","parent","hierarchy","KeyName","replace","_formatPrice","UnitText","LeftValueBoundLocalizedString","amount","currency","cultureFormatter","formatCurrency","error","selected","textContent","trim","computed","observer","ErrorMessage","text","FeatureSearchResultItem","productName","Name","productRecordId","productUrl","getProductPageUrlSync","actionContext","fallbackImage","getFallbackImageUrl","heading","featureSimilarDescriptionTitle","featureSimilarLooksTitle","onTelemetryClick","gridSettings","imageUrl","altText","img","src","imageProps","fallBackSrc","Image","loadFailureBehavior","renderProductPlacementImage","title","Link","ariaLabel","ModalToggle","innerRef","ref","modalNode","Modal","autoFocus","applicationNode","returnFocusRef","returnRef","isOpen","toggle","onModalToggle","zIndex","modalHeaderNode","ModalHeader","modalTitle","modalFooterNode","ModalFooter","Button","modalCloseButtonText","RangeRefineItem","_selectedRefinementCr","_this$props$selectedR","_this$props$selectedR2","_ref2","_this$props$selectedR3","_this$props$selectedR4","_formattedPriceReverseLookup","Map","getLabels","sliderId","minPrice","maxPrice","labelId","labelString","labelPositioning","getSliderThumbs","sliderKey","selectedMin","selectedMinPrice","selectedMax","selectedMaxPrice","_this$props$minValueS","_this$props$maxValueS","minValueSliderThumbAriaLabel","currencyCode","ariaValueText","maxValueSliderThumbAriaLabel","_onRangeUpdate","bind","_onRangeUpdateEnd","_handleRangeTooltipText","_changeMin","_changeMax","_finishChangeMin","_finishChangeMax","minInput","maxInput","selectedRefinementCriterion","initialMin","initialMax","minValue","maxValue","labels","sliderKeyString","sliderThumbs","state","isChecked","validationErrorMin","validationErrorMax","touchedMin","touchedMax","shouldComponentUpdate","nextProps","nextState","componentDidUpdate","previousProps","updateSliderProps","refineItemCommonProps","rangeType","_renderInputFields","_renderSlider","_ref3","_this$props$selectedR5","_this$props$selectedR6","_ref4","_this$props$selectedR7","_this$props$selectedR8","setState","isDisabled","formAttrs","rangeNameFormat","minInputClassName","maxInputClassName","formattedSelectedMin","_getFormattedSelectedValue","formattedSelectedMax","minLabel","onChange","onFocus","onBlur","maxLabel","placeholder","placeholderTextMax","ariaAttributes","Slider","inForm","min","max","step","orientation","showLabels","showTooltip","onChangeEnd","debounce","handleTooltipText","event","_changeValue","inputType","selectedKey","touchedKey","_getInputWithoutFormatting","selectedMinValue","minTouched","onToggle","maxNum","validationErrorNaN","_focus","_validateRange","selectedMaxValue","maxTouched","minNum","setTimeout","current","focus","touched","validationError","validationErrorRange","inputAsNum","get","sliderChangeNotification","eventType","firstThumbValue","secondThumbValue","_focusOnSliderThumb","document","getElementById","tooltip","RefineItem","anchorType","_this$props","productCountAriaLabel","singleProductCountAriaLabel","children","attrs","_objectWithoutProperties","_excluded","isSingleSelect","itemTypeClassName","SourceValue","Rating","_renderRating","_getRefinerUrl","tabIndex","_renderSwatch","Count","_this$props$parentPro","_this$props$parentPro2","_productRefinerValue$","dimensionType","toLocaleLowerCase","hasColor","StringExtensions","isNullOrWhitespace","SwatchColorHexCode","hasImage","SwatchImageUrl","swatchItems","checkIfShouldDisplayAsSwatch","colorHexCode","SwatchComponent","list","isSelectionEnabled","ratingUserCountAriaLabel","ratingSingleUserCountAriaLabel","_productRefinerValue$2","refinerRating","parseInt","ratingRefiner","selectedRefinerValues","selectedRating","defaultChkProductCount","ratingComponentClass","productCountAriaLabelValue","format","isMobileView","RatingComponent","avgRating","ratingCount","hideCount","readOnly","moduleTypeName","RefineSubmenu","_onToggleItem","_onToggleSubmenu","isExpanded","isExpandedOnInitialLoad","expanded","productRefinerHierarchy","hideRating","Price","Collapse","timeout","_renderChildItems","_renderRange","_renderSingleMultiSelect","isMobile","refinerValuesList","listItems","selectedValue","_getRangeType","DisplayTemplateValue","DisplayTemplate","Range","SliderWithBars","onUpdateRefiners","prevState","Separator","separator","Title","expandRefinersCount","SearchResultContainer","SearchResultContainer_1","_this$props$context$r6","sortByDropdownOptions","_pageType","expandrefinerCount","defaultPageNumber","_getProductsDimensionsAvailabilities","_this$props$data$list","_this$props$data$list2","productsList","listPageState","getDimensionAvailabilitiesForProductSearchResultAction","DimensionAvailabilitiesForProductSearchResultInput","_getActivePrice","_this$props$data$list3","_this$props$data$list4","getPriceForProductSearchResult","PriceForProductSearchResultInput","_getSearchResultModal","modal","modalHeader","modalFooter","modalBody","ModalBody","SearchResultModal","modalIsOpen","_modalToggleRef","_toggleModal","_getCollectionTitle","collectionTitle","getFriendlyName","NameTranslations","productCountNumber","productCountText","numberOfProducts","oneProduct","TitleContainer","telemetryPageName","toLowerCase","titlePrefix","searchTextPrefix","titleText","titleCount","_getCategoryHierarchy","categoryHierarchy","CategoryHierarchyContainer","tag","categoryHierarchyList","categoryLinkAriaLabel","Url","categoryHierarchySeparator","_getSortingDropDown","activeDropdown","_getCurrentlySelectedOption","sortingState","selectedSortByOption","dropdwonOptions","dropdownOption","SortingContainer","sortByDropDown","LabeledDropdown","labelClassname","labelText","sortByDropdownLabel","dropdownId","dropdownClassname","toggleColor","dropdownOptions","selectedOption","onSelectOption","_updateSortByDropdown","_sortAndFilterContainerRef","_getPagination","totalItems","previousText","flipperPrevious","nextText","flipperNext","UncontrolledPagination","paginationAriaLabel","qsp","startingItem","_renderPrev","_renderNext","previousAriaLabel","nextAriaLabel","_getRefineMenu","tempRangeTypeTODO","inputRange","validRefiners","activeRefiners","_getexpandRefinerCount","expandedRefiners","RefineMenuContainer","RefinerSectionContainer","_refineItemCommonProps","_onUpdateRefiners","_buildRefinerUrl","_getChoiceSummary","selectedRefiners","choiceSummaryLabel","_onChoiceClicked","_buildRefinerUrlForChoiceSummary","_getProducts","_this$props$data$feat","_this$props$data$prod","breaCrumbType","breadcrumbType","quickviewslot","slots","quickview","isPriceMinMaxFeatureState","featureState","customerInfo","_this$props$data$cust","customerInformation","debug","IsEnabled","notification","history","pushState","_getSortColumnFromSelectedOption","transaction","option","mappedConfiguration","_getSortCriteriaColumn","_this$props$data$list5","sortCriteria","queryColumns","activeSortColumn","activeMappedConfig","mappedSearchConfig","newRefinementCriteria","dropdownElementId","dropdownElement","selectedChoice","isClearAll","refinerCount","all","one","two","three","four","paginationPreviousText","paginationNextText","_viewport","device","Type","_updateViewport","pending","validationErrorNotNumber","validationErrorNotRange","getTelemetryObject","friendlyName","querySorting","reaction","_this$props$context$r","_this$props$context$r2","Math","getCollectionProducts","productResults","_this$props$context$a","enableAffiliationBasedPricing","user","isAuthenticated","_listPageState$curren","_listPageState$sortin","_listPageState$active","_this$props$context$r3","_this$props$context$r4","_this$props$context$r5","refinerInput","getCollectionRefinersAction","catch","listPageStateFeature","nameTranslations","_nameTranslation","nameTranslation","Language","_this$props$context$a2","addEventListener","dimensionsToDisplayOnProductCard","dimensionsInProductCard","dimensionsToDisplayAsSwatch","dimensionsAsSwatchType","DimensionTypes","none","componentWillUnmount","removeEventListener","_this$props$context$r7","searchProduct","errorText","resultCategoryNotFoundText","resultSearchNotFoundText","productsComponent","featureComponent","searchResultContainerViewProps","TitleViewProps","disableHierarchy","refineMenu","moduleProps","sortByOptions","pagination","ProductsContainer","ProductSectionContainer","CategoryNavContainer","RefineAndProductSectionContainer","choiceSummary","modalToggle","searchResultModal","errorMessage","FeatureSearchContainer","similarLookProduct","renderView","_getViewport","innerWidth","xs","w","sm","md","lg","createSearchResultModal","modalProps","isRecoSearchPage","createModalBody","renderSort","renderRefiner","Node","submenu","renderCategoryHierarchy","renderTitle","renderTitleCount","_props$context$action","Module","DescriptionInterval","renderProductCards","renderProductCardsDescription","isEnabledProductDescription","_props$data$products$","_props$data$featureSt","breadCrumbType","isAllowBack","classname","renderProducts","_props$data$listPageS","productDescriptionInterval","productDescriptionIntervalRemainder0","productDescriptionIntervalRemainder9","renderRefinerMobile","setIsExpanded","useState","enableProdutDescription","filterText","binding","modules","dataActions","registerSanitizedActionPath","sanitizedActionPath","dataAction","default","prototype","RegistrationId","c","require","$type","da","name","path","runOn","iNM","ns","n","p","pdp","__bindings__","viewDictionary","cn","getDefaultSwatchSelected","coreContext","productData","_productData$Attribut","_attributeSwatches$fi","dimensionToPreSelectInProductCard","attributeSwatches","attributeValue","_attributeValue$KeyNa","Swatches","IsDefault","updateProductUrl","productDetailsPageUrl","queryString","sourceUrl","baseUrl","search","pathname","renderProductUnitOfMeasure","unitOfMeasure","renderLabel","price","rating","ratingAriaLabelText","reviewCount","ratingCountAriaLabelText","reviewCountArialableText","getReviewAriaLabel","getRatingAriaLabel","roundedRating","toFixed","renderPrice","savingsText","productPrice","ProductTypeValue","IsMasterProduct","ProductType","Master","Standalone","BasePrice","AdjustedPrice","CustomerContextualPrice","MaxVariantPrice","MinVariantPrice","PriceComponent","fallbackImageUrl","_context$app$config","contextConfig","placeholderImageName","fallbackImageSource","cropFocalRegion","bypassHideOnFailure","msdyn365Commerce","createComponentOverride","component","_product$Name","_product$RecordId","_getProductImageUrlFr","_getProductPageUrlFro","ratingCountAriaLabel","swatchItemAriaLabel","MIN_VALUE","productImageUrlFromSwatch","defaultSwatch","swatchProductImageUrls","ProductImageUrls","generateImageUrl","getProductImageUrlFromDefaultSwatch","productPageUrlFromSwatch","SwatchValue","encodeURIComponent","getProductPageUrlFromDefaultSwatch","productPageUrl","setProductPageUrl","productImageUrl","setProductImageUrl","selectedSwatchItems","Dictionary","updatePageAndImageUrl","swatchItem","setValue","productPageUrlWithSwatch","newUrl","swatchProductImageUrl","productImageUrls","isUnitOfMeasureEnabled","unitOfMeasureDisplayType","AverageRating","TotalRatings","DefaultUnitOfMeasure","description","Description","attributeValues","_item$KeyName$toLocal","_item$KeyName","_item$Swatches$map","_item$Swatches","dimensionTypeValue","shouldDisplayDimension","swatches","_item$RecordId","_swatchItem$SwatchVal","_swatchItem$SwatchVal2","_dimensionAvailabilit","isDefault","_swatchItem$SwatchVal3","some","swatch","ProductComponentSwatchComponent","onSelectDimension","totalRatings","numberRatings","renderRating","inventoryAvailabilityLabel","selectedDimensions","getValues","DimensionTypeValue","convertDimensionTypeToProductDimensionType","DimensionValue","Value","selectedProductId","renderQuickView","validateCatalogId","renderProductComparisonButton","getCatalogId","configureStickyFilter","isStickyHeader","headerContainer","querySelector","headerHeight","offsetHeight","bannerHeights","headerElement","defaultContainer","refinerElement","documentElement","scrollTop","classList","add","setAttribute","clientHeight","remove","removeAttribute","renderRefinerFooter","handler","doneAriaLabel","doneText","useEffect","useStickyFilter","stickyFilterSetup","enableStickyHeader","wrapperRefiner","refinerRefernce","handleClickOutside","contains","useOutsideClick","module","exports","ReactDOM"],"sourceRoot":""}