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QE,aAEY,MAAMqB,EAAiB,GAC9BA,EAAe,uFAAyF,CAChHd,EAAGA,IAAMC,EAAQ,MACjBc,GAAI,mDAEpBD,EAAe,qEAAuE,CACtEd,EAAGA,IAAMC,EAAQ,MACjBc,GAAI,mDAEpBrxB,OAAOmxB,aAAenxB,OAAOmxB,cAAgB,GAC7CnxB,OAAOmxB,aAAaC,eAAc9hC,EAAAA,EAAA,GACP0Q,OAAOmxB,aAAaC,gBAAkB,IACtCA,uBC/I3BE,EAAOC,QAAUjvB,2BCAjBgvB,EAAOC,QAAUC","sources":["webpack://bestseller.commerce.online/./src/modules/ext-search-result-container/actions/base-collection-action.ts?625f","webpack://bestseller.commerce.online/./src/modules/ext-search-result-container/actions/get-full-products-by-collection.ts?400d","webpack://bestseller.commerce.online/./src/modules/ext-search-result-container/actions/get-inventory-refiners.ts?eea2","webpack://bestseller.commerce.online/./src/modules/ext-search-result-container/actions/get-mapped-search-configuration.ts?5b0d","webpack://bestseller.commerce.online/./src/modules/ext-search-result-container/actions/get-product-refiner-hierarchy.ts?9042","webpack://bestseller.commerce.online/./src/modules/ext-search-result-container/actions/get-refiners-for-collection.ts?aa02","webpack://bestseller.commerce.online/./src/modules/ext-search-result-container/actions/url-utils.ts?7335","webpack://bestseller.commerce.online/./src/modules/ext-search-result-container/components/utilities.ts?c0b2","webpack://bestseller.commerce.online/./src/modules/ext-search-result-container/components/choice-summary.tsx?ad22","webpack://bestseller.commerce.online/./src/modules/ext-search-result-container/components/error-message.tsx?8f3f","webpack://bestseller.commerce.online/./src/modules/ext-search-result-container/components/feature-search-result-item.tsx?2185","webpack://bestseller.commerce.online/./src/modules/ext-search-result-container/components/link.tsx?1219","webpack://bestseller.commerce.online/./src/modules/ext-search-result-container/components/modal.tsx?6fa2","webpack://bestseller.commerce.online/./src/modules/ext-search-result-container/components/product-search-result-items.tsx?ea3b","webpack://bestseller.commerce.online/./src/modules/ext-search-result-container/components/range-refine-item.tsx?77af","webpack://bestseller.commerce.online/./src/modules/ext-search-result-container/components/refine-item.tsx?c3c8","webpack://bestseller.commerce.online/./src/modules/ext-search-result-container/components/refine-submenu.tsx?e916","webpack://bestseller.commerce.online/./src/modules/ext-search-result-container/components/separator.tsx?cb94","webpack://bestseller.commerce.online/./src/modules/ext-search-result-container/components/title.tsx?1cd4","webpack://bestseller.commerce.online/./src/modules/ext-search-result-container/ext-search-result-container.props.autogenerated.ts?f7fa","webpack://bestseller.commerce.online/./src/modules/ext-search-result-container/ext-search-result-container.tsx?5ac2","webpack://bestseller.commerce.online/./src/modules/ext-search-result-container/ext-search-result-container.view.tsx?31d9","webpack://bestseller.commerce.online/./src/modules/ext-search-result-container/list-page-state.ts?3716","webpack://bestseller.commerce.online/./src/themes/only/views/ext-search-result-container.view.tsx?15ea","webpack://bestseller.commerce.online/./lib/ext-search-result-container/module-registration.js?5229","webpack://bestseller.commerce.online/external var \"React\"?0d3b","webpack://bestseller.commerce.online/external var \"ReactDOM\"?853b"],"sourcesContent":["/*!\r\n * Copyright (c) Microsoft Corporation.\r\n * All rights reserved. See LICENSE in the project root for license information.\r\n */\r\n\r\n/* eslint-disable no-duplicate-imports */\r\nimport { CacheType, getCatalogId, IActionInput, IAny, ICommerceApiSettings, ICreateActionContext, IGeneric } from '@msdyn365-commerce/core';\r\nimport { IProductRefinerHierarchy } from '@msdyn365-commerce/commerce-entities';\r\nimport {\r\n convertToString,\r\n ChannelInventoryConfiguration,\r\n IQueryResultSettings,\r\n ProductRefinerValue,\r\n SortColumn\r\n} from '@msdyn365-commerce/retail-proxy';\r\nimport { generateCacheKey, QueryResultSettingsProxy } from '@msdyn365-commerce-modules/retail-actions';\r\nimport { toJS } from 'mobx';\r\n\r\nimport { hydrateRefinersFromUrl } from './url-utils';\r\n\r\n/**\r\n * Export listPageType.\r\n */\r\nexport type listPageType = 'Category' | 'Search' | 'Unknown';\r\n\r\n/**\r\n * Get include attributes from config.\r\n * @param inputData - ICreateActionContext.\r\n * @returns Boolean.\r\n */\r\nfunction getIncludeAttributes(inputData: ICreateActionContext, IGeneric>): boolean {\r\n if (inputData && inputData.config && inputData.config.includeAttributes !== undefined && inputData.config.includeAttributes === true) {\r\n return true;\r\n }\r\n return false;\r\n}\r\n\r\n/**\r\n * Get updateRefinerPanel from config.\r\n * @param inputData - ICreateActionContext.\r\n * @returns Boolean.\r\n */\r\nfunction getUpdateRefinerPanel(inputData: ICreateActionContext, IGeneric>): boolean {\r\n return !!inputData.config?.updateRefinerPanel;\r\n}\r\n\r\n/**\r\n * BaseCollection Action Input.\r\n */\r\nexport class BaseCollectionInput implements IActionInput {\r\n public pageType: listPageType;\r\n\r\n public category: number | undefined;\r\n\r\n public searchText: string | undefined;\r\n\r\n public refiners: ProductRefinerValue[];\r\n\r\n public queryResultSettings: IQueryResultSettings;\r\n\r\n public apiSettings: ICommerceApiSettings;\r\n\r\n public includeAttributes: boolean | undefined;\r\n\r\n public locale?: string;\r\n\r\n public isUpdateRefinerPanel?: boolean;\r\n\r\n public catalogId?: number;\r\n\r\n public channelInventoryConfiguration?: ChannelInventoryConfiguration;\r\n\r\n public inventoryRefiner?: IProductRefinerHierarchy;\r\n\r\n public constructor(\r\n pageType: listPageType,\r\n apiSettings: ICommerceApiSettings,\r\n queryResultSettings: IQueryResultSettings,\r\n refiners: ProductRefinerValue[],\r\n category: number | undefined,\r\n searchText: string | undefined,\r\n includeAttributes: boolean | undefined,\r\n isUpdateRefinerPanel?: boolean | undefined,\r\n locale?: string,\r\n catalogId?: number,\r\n channelInventoryConfiguration?: ChannelInventoryConfiguration,\r\n inventoryRefiner?: IProductRefinerHierarchy\r\n ) {\r\n this.pageType = pageType;\r\n this.apiSettings = apiSettings;\r\n this.category = category;\r\n this.searchText = searchText;\r\n this.queryResultSettings = queryResultSettings;\r\n this.refiners = refiners;\r\n this.includeAttributes = includeAttributes;\r\n this.isUpdateRefinerPanel = isUpdateRefinerPanel;\r\n this.locale = locale;\r\n this.catalogId = catalogId ?? 0;\r\n this.channelInventoryConfiguration = channelInventoryConfiguration;\r\n this.inventoryRefiner = inventoryRefiner;\r\n }\r\n\r\n public getCacheKey = () => {\r\n const queryResultSettings = {\r\n ...this.queryResultSettings.Paging,\r\n ...toJS(this.queryResultSettings.Sorting)\r\n };\r\n\r\n const cacheKey = generateCacheKey(\r\n this.apiSettings,\r\n { key: 'PageType', value: this.pageType },\r\n { key: 'Category', value: this.category },\r\n { key: 'SearchText', value: this.searchText },\r\n { key: 'CatalogId', value: this.catalogId },\r\n {\r\n key: 'Refiners',\r\n value: this.refiners.map(\r\n refiner =>\r\n `RefinerRecordId:${refiner.RefinerRecordId}-LeftValueBoundString:${refiner.LeftValueBoundString ||\r\n ''}-RightValueBoundString:${refiner.RightValueBoundString || ''}`\r\n )\r\n },\r\n { key: 'QueryResultSettings', value: convertToString(queryResultSettings) },\r\n { key: 'Locale', value: this.locale }\r\n );\r\n return cacheKey;\r\n };\r\n\r\n public getCacheObjectType = () => 'CollectionActionResult';\r\n\r\n public dataCacheType = (): CacheType => 'request';\r\n}\r\n\r\n// TODO: Create a data model here or import one to capture the response of the action\r\nexport interface IGetFullProductsByCollectionData {\r\n text: string;\r\n}\r\n\r\nexport type CollectionClassConstructor = new (\r\n pageType: listPageType,\r\n apiSettings: ICommerceApiSettings,\r\n queryResultSettings: IQueryResultSettings,\r\n refiners: ProductRefinerValue[],\r\n category: number | undefined,\r\n searchText: string | undefined,\r\n includeAttributes: boolean | undefined,\r\n isUpdateRefinerPanel?: boolean | undefined,\r\n locale?: string,\r\n catalogId?: number,\r\n channelInventoryConfiguration?: ChannelInventoryConfiguration,\r\n inventoryRefiner?: IProductRefinerHierarchy\r\n) => BaseCollectionInput;\r\n\r\n/**\r\n * TODO: Use this function to create the input required to make the action call.\r\n * @param args\r\n * @param inputClassConstuctor\r\n */\r\nexport const createBaseCollectionInput = (\r\n args: ICreateActionContext,\r\n inputClassConstuctor: CollectionClassConstructor\r\n): BaseCollectionInput => {\r\n const pageType =\r\n args.requestContext.urlTokens.pageType === 'Category' || (args.requestContext.query && args.requestContext.query.categoryId)\r\n ? 'Category'\r\n : 'Search';\r\n\r\n const queryResultSettings = QueryResultSettingsProxy.fromInputData(args).QueryResultSettings;\r\n const queryRefiners = hydrateRefinersFromUrl(args.requestContext);\r\n const includeAttributes = getIncludeAttributes(args);\r\n const isUpdateRefinerPanel = getUpdateRefinerPanel(args);\r\n const catalogId = getCatalogId(args.requestContext);\r\n\r\n if (args.requestContext.query && args.requestContext.query.sorting) {\r\n queryResultSettings.Sorting = { Columns: JSON.parse(decodeURIComponent(args.requestContext.query.sorting)) };\r\n }\r\n\r\n if (pageType === 'Category') {\r\n return new inputClassConstuctor(\r\n pageType,\r\n args.requestContext.apiSettings,\r\n queryResultSettings,\r\n queryRefiners,\r\n +(args.requestContext.urlTokens.itemId || (args.requestContext.query && args.requestContext.query.categoryId) || 0),\r\n undefined,\r\n includeAttributes,\r\n isUpdateRefinerPanel,\r\n args.requestContext.locale,\r\n catalogId\r\n );\r\n } else if (pageType === 'Search' && args.requestContext.query && args.requestContext.query.q) {\r\n return new inputClassConstuctor(\r\n pageType,\r\n args.requestContext.apiSettings,\r\n queryResultSettings,\r\n queryRefiners,\r\n undefined,\r\n args.requestContext.query.q,\r\n includeAttributes,\r\n isUpdateRefinerPanel,\r\n args.requestContext.locale,\r\n catalogId\r\n );\r\n } else if (pageType === 'Search' && args.requestContext.query && args.requestContext.query.recommendation) {\r\n let searchText = '';\r\n if (args.requestContext.query.productId) {\r\n searchText = JSON.stringify({\r\n ProductId: args.requestContext.query.productId,\r\n Recommendation: args.requestContext.query.recommendation\r\n });\r\n } else {\r\n searchText = JSON.stringify({ Recommendation: args.requestContext.query.recommendation });\r\n }\r\n return new inputClassConstuctor(\r\n pageType,\r\n args.requestContext.apiSettings,\r\n queryResultSettings,\r\n queryRefiners,\r\n undefined,\r\n searchText,\r\n includeAttributes,\r\n isUpdateRefinerPanel,\r\n args.requestContext.locale,\r\n catalogId\r\n );\r\n }\r\n\r\n throw new Error('[getFullProductsForCollection]Unable to create input');\r\n};\r\n","/*!\r\n * Copyright (c) Microsoft Corporation.\r\n * All rights reserved. See LICENSE in the project root for license information.\r\n */\r\n\r\nimport {\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\nimport { AsyncResult, ChannelInventoryConfiguration, ProductSearchCriteria, ProductSearchResult } from '@msdyn365-commerce/retail-proxy';\r\nimport { searchByCriteriaAsync } from '@msdyn365-commerce/retail-proxy/dist/DataActions/ProductsDataActions.g';\r\nimport { getInventoryConfigurationAsync } from '@msdyn365-commerce/retail-proxy/dist/DataActions/StoreOperationsDataActions.g';\r\nimport { ArrayExtensions, generateProductImageUrl, InventoryLevels } from '@msdyn365-commerce-modules/retail-actions';\r\nimport { BaseCollectionInput, createBaseCollectionInput } from './base-collection-action';\r\nimport { getInventorySortableRefinerValue } from './get-inventory-refiners';\r\nimport _ from 'lodash';\r\nimport { getCommercialName } from '../../../shared/functions/get-commercial-name';\r\n\r\n/**\r\n * GetFullProductsByCollection Action Input\r\n */\r\nexport class GetFullProductsByCollectionInput 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 => 'FullProductSearchResult';\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 &&\r\n this.queryResultSettings.Sorting &&\r\n this.queryResultSettings.Sorting.Columns &&\r\n this.queryResultSettings.Sorting.Columns.length > 0)\r\n ) {\r\n return 'request';\r\n }\r\n return 'application';\r\n };\r\n}\r\n\r\n/**\r\n * This setting defines inventory filtering options.\r\n */\r\nexport enum ProductListInventoryFilteringOptions {\r\n /**\r\n * Filter out all products out of stock.\r\n */\r\n HideOOS = 'hideOOS',\r\n\r\n /**\r\n * Sort products by availability, OOS goes last.\r\n */\r\n SortOOS = 'sortOOS',\r\n\r\n /**\r\n * No filtering selected.\r\n */\r\n Default = 'default'\r\n}\r\n\r\nexport interface ProductResultWithSwatchLimit extends ProductSearchResult {\r\n additionalSwatches?: number;\r\n}\r\n\r\n/**\r\n * The full product search result with count interface.\r\n */\r\ninterface IFullProductsSearchResultsWithCount {\r\n products: ProductSearchResult[] | ProductResultWithSwatchLimit[];\r\n count: number;\r\n channelInventoryConfigurationId?: number;\r\n inventoryAwareSortableAttributeId?: number;\r\n}\r\n\r\n/**\r\n * CreateInput function which creates and actionInput used to fetch products for a list page.\r\n * @param args - The API arguments.\r\n * @returns IActionInput - The action input.\r\n */\r\nconst createInput = (args: ICreateActionContext<{ itemsPerPage: number; includedAttributes: boolean | undefined }>): IActionInput => {\r\n const input = createBaseCollectionInput(args, GetFullProductsByCollectionInput);\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\n/**\r\n * Returns list of products based on inventory information.\r\n * @param productSearchResults - The products.\r\n * @param context - The context.\r\n * @param metadataCount - The metadata count.\r\n * @param channelInventoryConfiguration - The channel inventory configuration.\r\n * @returns List of product based on the inventory information.\r\n */\r\nexport async function returnProducts(\r\n productSearchResults: ProductSearchResult[],\r\n context: IActionContext,\r\n input: GetFullProductsByCollectionInput,\r\n metadataCount: number | undefined,\r\n channelInventoryConfiguration?: ChannelInventoryConfiguration\r\n): Promise {\r\n const defaultProductCount: number = 0;\r\n\r\n let productSearchResultsWithImages = productSearchResults.map(productSearchResult => {\r\n const newImageUrl = generateProductImageUrl(productSearchResult, context.requestContext.apiSettings);\r\n\r\n if (newImageUrl) {\r\n productSearchResult.PrimaryImageUrl = newImageUrl;\r\n }\r\n\r\n //Use CommercialStyleName\r\n if (context.requestContext.app.config?.useCommercialStyleName) {\r\n productSearchResult.Name = getCommercialName(\r\n productSearchResult.AttributeValues,\r\n productSearchResult.Name,\r\n context.requestContext.app.config?.commercialStyleNameAttribute\r\n );\r\n }\r\n\r\n return productSearchResult;\r\n });\r\n\r\n const searchVariantLimit = context.requestContext.app.config?.searchVariantLimit ?? 1;\r\n const categoryVariantLimit = context.requestContext.app.config?.categoryVariantLimit ?? 1;\r\n const variantLimit = input.pageType === 'Category' ? categoryVariantLimit : searchVariantLimit;\r\n productSearchResultsWithImages = await expandWithVariants(productSearchResultsWithImages, variantLimit);\r\n\r\n // If inventory level is threshold or inventory check is disabled then return the list of products without the inventory configuration\r\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access -- read config file.\r\n if (\r\n context.requestContext.app.config.inventoryLevel === InventoryLevels.threshold ||\r\n context.requestContext.app.config.enableStockCheck === false\r\n ) {\r\n return {\r\n products: productSearchResultsWithImages,\r\n count: metadataCount ?? defaultProductCount\r\n };\r\n }\r\n\r\n const mappedProducts = productSearchResultsWithImages.map(productSearchResult => {\r\n if (ArrayExtensions.hasElements(productSearchResult.AttributeValues)) {\r\n for (const element of productSearchResult.AttributeValues) {\r\n if (\r\n channelInventoryConfiguration &&\r\n element.RecordId !== undefined &&\r\n element.RecordId === channelInventoryConfiguration.InventoryProductAttributeRecordId &&\r\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access -- read config file.\r\n context.requestContext.app.config.inventoryRanges !== 'all' &&\r\n element.TextValue !== channelInventoryConfiguration.InventoryOutOfStockAttributeValueText\r\n ) {\r\n // If same RecordId then it means that is the Inventory attribute\r\n // Based on the inventory range (and filtering options), the inventory label will be displayed\r\n // If Inventory range is 'All' then in stock and out of stock labels are shown, else only OOS\r\n // if the text value is different that the channelInventoryConfiguration.InventoryOutOfStockAttributeValueText then is in stock\r\n element.TextValue = '';\r\n }\r\n }\r\n }\r\n\r\n return productSearchResult;\r\n });\r\n\r\n return {\r\n products: mappedProducts,\r\n count: metadataCount ?? defaultProductCount,\r\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- check config.\r\n channelInventoryConfigurationId: channelInventoryConfiguration\r\n ? channelInventoryConfiguration.InventoryProductAttributeRecordId\r\n : undefined,\r\n inventoryAwareSortableAttributeId: channelInventoryConfiguration\r\n ? channelInventoryConfiguration.ProductAvailabilitySortableAttributeRecordId\r\n : undefined\r\n };\r\n}\r\n\r\nexport async function expandWithVariants(mappedProducts: ProductSearchResult[], variantLimit: number = 0): Promise {\r\n const variantProducts: ProductSearchResult[] = [];\r\n for (const product of mappedProducts) {\r\n const color = product.AttributeValues?.find(attribute => attribute.Name?.toLowerCase() === 'color')?.TextValue;\r\n if (color) {\r\n let colors: string[] = color?.split('|') || [];\r\n\r\n if (variantLimit > -1 && colors.length > variantLimit) {\r\n colors = colors.slice(0, variantLimit);\r\n }\r\n\r\n for (const color of colors) {\r\n const prod: ProductSearchResult = _.cloneDeep(product);\r\n\r\n prod.AttributeValues?.forEach(attribute => {\r\n if (attribute.Name?.toLowerCase() === 'color') {\r\n attribute.Swatches?.forEach(swatch => {\r\n swatch.IsDefault = swatch.SwatchValue === color;\r\n });\r\n }\r\n });\r\n\r\n variantProducts.push(prod);\r\n }\r\n } else {\r\n variantProducts.push(product);\r\n }\r\n }\r\n return variantProducts;\r\n}\r\n\r\n/**\r\n * Action function to fetch products for a list page.\r\n * @param input - The input.\r\n * @param context - The context.\r\n * @returns IFullProductsSearchResultsWithCount - The full product search result with count.\r\n */\r\n// eslint-disable-next-line complexity -- ignore the complexity.\r\nasync function action(input: GetFullProductsByCollectionInput, context: IActionContext): Promise {\r\n let promise: AsyncResult;\r\n let channelInventoryConfigurationPromise: AsyncResult;\r\n let searchProductId;\r\n const searchCriteriaInput: ProductSearchCriteria = {};\r\n searchCriteriaInput.Context = { ChannelId: context.requestContext.apiSettings.channelId, CatalogId: input.catalogId };\r\n // Decouple searchCriteriaInput.Refinement from input.refiners to avoid input.refiners being modified below\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.channelInventoryConfiguration) {\r\n channelInventoryConfigurationPromise = AsyncResult.resolve(input.channelInventoryConfiguration);\r\n } else {\r\n channelInventoryConfigurationPromise = getInventoryConfigurationAsync({ callerContext: context });\r\n }\r\n const channelInventoryConfiguration = await channelInventoryConfigurationPromise;\r\n\r\n // Replace InventoryProductAttribute with boolean refiner.\r\n // Because the value of InventoryProductAttribute is different from language to language since it's string type.\r\n // The cached old inventory refiner value may be hit when customer switch language which will lead to \"no products found\" issue.\r\n const inventoryRefiner = searchCriteriaInput.Refinement.find(\r\n refiner => refiner.RefinerRecordId === channelInventoryConfiguration?.InventoryProductAttributeRecordId\r\n );\r\n if (inventoryRefiner && channelInventoryConfiguration?.InventoryProductAttributeRecordId !== 0) {\r\n searchCriteriaInput.Refinement = searchCriteriaInput.Refinement.filter(\r\n refiner => refiner.RefinerRecordId !== channelInventoryConfiguration?.InventoryProductAttributeRecordId\r\n );\r\n\r\n const isInStockRefiner =\r\n inventoryRefiner.LeftValueBoundString !== channelInventoryConfiguration?.InventoryOutOfStockAttributeValueText &&\r\n inventoryRefiner.RightValueBoundString !== channelInventoryConfiguration?.InventoryOutOfStockAttributeValueText;\r\n const inventoryRefinerValue = getInventorySortableRefinerValue(channelInventoryConfiguration, isInStockRefiner);\r\n\r\n const isInventoryRefinerValueExist = searchCriteriaInput.Refinement.some(\r\n refiner => refiner.RefinerRecordId === inventoryRefinerValue?.RefinerRecordId\r\n );\r\n if (!isInventoryRefinerValueExist && inventoryRefinerValue) {\r\n searchCriteriaInput.Refinement.push(inventoryRefinerValue);\r\n }\r\n }\r\n\r\n if (context.requestContext.app.config?.productListInventoryDisplay === ProductListInventoryFilteringOptions.HideOOS) {\r\n const isInStock = true;\r\n const inventoryInStockRefinerValue = getInventorySortableRefinerValue(channelInventoryConfiguration, isInStock);\r\n\r\n const isInventoryInStockRefinerValueExist = searchCriteriaInput.Refinement.some(\r\n refiner => refiner.RefinerRecordId === inventoryInStockRefinerValue?.RefinerRecordId\r\n );\r\n if (!isInventoryInStockRefinerValueExist && inventoryInStockRefinerValue) {\r\n searchCriteriaInput.Refinement.push(inventoryInStockRefinerValue);\r\n }\r\n }\r\n\r\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access -- app configs are of generic type\r\n if (\r\n context.requestContext.app.config?.productListInventoryDisplay === ProductListInventoryFilteringOptions.SortOOS &&\r\n channelInventoryConfiguration.ProductAvailabilitySortableAttributeRecordId\r\n ) {\r\n input.queryResultSettings.Sorting = input.queryResultSettings.Sorting ?? {};\r\n input.queryResultSettings.Sorting.Columns = input.queryResultSettings.Sorting.Columns ?? [];\r\n const sortColumnName = `Attr_${channelInventoryConfiguration.ProductAvailabilitySortableAttributeRecordId}`;\r\n const isSortAttributeExist = input.queryResultSettings.Sorting.Columns.some(column => column.ColumnName === sortColumnName);\r\n if (!isSortAttributeExist) {\r\n input.queryResultSettings.Sorting.Columns.push({\r\n ColumnName: sortColumnName,\r\n IsDescending: true\r\n });\r\n }\r\n }\r\n\r\n if (input.pageType === 'Category' || 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('[GetFullProductsForCollection]Category Page Detected, but no global categoryId found');\r\n }\r\n } else if (input.searchText && 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.recommendation) {\r\n const searchObject = JSON.parse(input.searchText);\r\n if (context.requestContext.query.productId) {\r\n searchProductId = Number(searchObject.ProductId);\r\n }\r\n if (Number.isNaN(searchProductId)) {\r\n throw new Error('Failed to cast search product id into a number.');\r\n } else if (\r\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access -- Existing code\r\n !searchObject.Recommendation\r\n ) {\r\n throw new Error('Failed to retrieve the Recommendation.');\r\n } else {\r\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access -- Existing code\r\n searchCriteriaInput.RecommendationListId = searchObject.Recommendation;\r\n if (searchProductId) {\r\n searchCriteriaInput.Ids = [searchProductId || defaultNumber];\r\n }\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('[GetFullProductsForCollection]Search Page Detected, but no q= or productId= query parameter found');\r\n }\r\n\r\n let productSearchResults = await promise;\r\n\r\n const { config: appConfig } = context.requestContext.app;\r\n\r\n const { dimensionToPreSelectInProductCard: swatchToTrim, enableSwatchLimiting = false } = appConfig;\r\n\r\n if (swatchToTrim && enableSwatchLimiting) {\r\n let swatchLimit: number = 0;\r\n switch (input.pageType) {\r\n case 'Category':\r\n const { swatchLimitCategoryPages } = appConfig;\r\n swatchLimit = swatchLimitCategoryPages;\r\n break;\r\n case 'Search':\r\n const { swatchLimitSearchPages } = appConfig;\r\n swatchLimit = swatchLimitSearchPages;\r\n break;\r\n }\r\n\r\n const predicateMapper: (input: ProductSearchResult, index: number, list: ProductSearchResult[]) => ProductResultWithSwatchLimit = (\r\n input,\r\n index,\r\n list\r\n ) => {\r\n if (input.AttributeValues === undefined) {\r\n return input;\r\n }\r\n const inputAttributeValues = [...input.AttributeValues];\r\n const attributeToTrim = inputAttributeValues.find(attribute => attribute.KeyName?.toLowerCase() === swatchToTrim);\r\n if (attributeToTrim === undefined) {\r\n return input;\r\n }\r\n\r\n if (attributeToTrim?.Swatches !== undefined && swatchLimit > -1 && attributeToTrim.Swatches.length > swatchLimit) {\r\n const swatchesToDisplay = attributeToTrim.Swatches.slice(0, swatchLimit);\r\n const swatchesExcluded = attributeToTrim.Swatches.slice(swatchLimit);\r\n\r\n const indexOfTrimmedAttribute = inputAttributeValues.indexOf(attributeToTrim);\r\n\r\n inputAttributeValues[indexOfTrimmedAttribute].Swatches = swatchesToDisplay;\r\n\r\n return { ...input, additionalSwatches: swatchesExcluded.length + 1 };\r\n } else {\r\n return input;\r\n }\r\n };\r\n productSearchResults = productSearchResults.map(predicateMapper);\r\n }\r\n\r\n return returnProducts(productSearchResults, context, input, promise.metadata.count, channelInventoryConfiguration);\r\n}\r\n\r\nexport const actionDataAction = createObservableDataAction({\r\n id: '@msdyn365-commerce-modules/search-result-container/get-full-products-by-collection',\r\n action: action as IAction,\r\n input: createInput\r\n});\r\n\r\nexport default actionDataAction;\r\n","/*!\r\n * Copyright (c) Microsoft Corporation.\r\n * All rights reserved. See LICENSE in the project root for license information.\r\n */\r\n\r\n/* eslint-disable no-duplicate-imports */\r\nimport { IProductRefinerHierarchy } from '@msdyn365-commerce/commerce-entities';\r\nimport { CacheType, createObservableDataAction, IAction, IActionContext, IActionInput } from '@msdyn365-commerce/core';\r\nimport { buildCacheKey } from '@msdyn365-commerce-modules/retail-actions';\r\n\r\nimport {\r\n AttributeDataType,\r\n ChannelInventoryConfiguration,\r\n ProductRefinerSource,\r\n ProductRefinerValue\r\n} from '@msdyn365-commerce/retail-proxy';\r\nimport { BaseCollectionInput } from './base-collection-action';\r\nimport { getProductRefinerHierarchy } from './get-product-refiner-hierarchy';\r\n\r\n/**\r\n * Returns inventory in stock sortable refiner value.\r\n * @param channelInventoryConfiguration - The channelInventoryConfiguration.\r\n * @param isInStock - The flag indicating whether is getting in-stock refiner or out-of-stock refiner.\r\n * @returns Refiners.\r\n */\r\nexport const getInventorySortableRefinerValue = (\r\n channelInventoryConfiguration: ChannelInventoryConfiguration,\r\n isInStock: boolean\r\n): ProductRefinerValue | undefined => {\r\n if (channelInventoryConfiguration && channelInventoryConfiguration.ProductAvailabilitySortableAttributeRecordId) {\r\n return {\r\n RefinerRecordId: channelInventoryConfiguration.ProductAvailabilitySortableAttributeRecordId,\r\n DataTypeValue: AttributeDataType.TrueFalse,\r\n LeftValueBoundString: isInStock ? 'true' : 'false',\r\n RightValueBoundString: isInStock ? 'true' : 'false',\r\n UnitText: '',\r\n RowNumber: 0,\r\n Count: 0,\r\n ExtensionProperties: [],\r\n RefinerSourceValue: ProductRefinerSource.Attribute\r\n };\r\n }\r\n return undefined;\r\n};\r\n\r\n/**\r\n * InventoryInStockRefinerValue Input action.\r\n * @remark The get-inventory-refiners data action is obsoleted. Please use getInventorySortableRefinerValue instead.\r\n */\r\nexport class InventoryInStockRefinerValueInput extends BaseCollectionInput implements IActionInput {\r\n public inventoryProductAttributeRecordId: number;\r\n\r\n public constructor(input: BaseCollectionInput, inventoryProductAttributeRecordId: number = 0) {\r\n super(\r\n input.pageType,\r\n input.apiSettings,\r\n {\r\n count: true\r\n },\r\n\r\n // Parameter - refiners\r\n [],\r\n\r\n // Parameter - category\r\n undefined,\r\n\r\n // Parameter - searchText\r\n '',\r\n\r\n // Parameter - includeAttributes\r\n false,\r\n\r\n // Parameter - isUpdateRefinerPanel\r\n false,\r\n\r\n // Parameter - locale\r\n undefined,\r\n input.catalogId,\r\n input.channelInventoryConfiguration,\r\n input.inventoryRefiner\r\n );\r\n\r\n this.inventoryProductAttributeRecordId =\r\n inventoryProductAttributeRecordId || input.channelInventoryConfiguration?.InventoryProductAttributeRecordId || 0;\r\n }\r\n\r\n /**\r\n * GetCacheKey.\r\n * @returns - Returns string.\r\n */\r\n public getCacheKey = (): string => buildCacheKey('RefinerList', this.apiSettings);\r\n\r\n /**\r\n * GetCacheObjectType.\r\n * @returns - Returns string.\r\n */\r\n public getCacheObjectType = (): string => 'RefinerList';\r\n\r\n /**\r\n * DataCacheType.\r\n * @returns - CacheType string.\r\n */\r\n public dataCacheType = (): CacheType => 'application';\r\n}\r\n\r\n/**\r\n * Action method returns inventory in stock refiners.\r\n * @param input - InventoryInStockRefinerValueInput.\r\n * @param context - IActionContext.\r\n * @returns - Promise.\r\n * @remark The get-inventory-refiners data action is obsoleted. Please use getInventorySortableRefinerValue instead.\r\n */\r\nasync function action(input: InventoryInStockRefinerValueInput, context: IActionContext): Promise {\r\n const refiners = await getProductRefinerHierarchy(\r\n {\r\n Context: {\r\n ChannelId: input.apiSettings.channelId,\r\n CatalogId: input.catalogId\r\n }\r\n },\r\n input.queryResultSettings,\r\n context\r\n );\r\n\r\n // InventoryProductAttributeRecordId may be 0, and recId of default refiner Category/Price/Rating is always 0 by design. In this case, we should not return refiner\r\n // Why recId of default refiner Category/Price/Rating is 0: see GetChannelProductRefiners.sql\r\n return (\r\n (input.channelInventoryConfiguration?.InventoryProductAttributeRecordId !== 0 &&\r\n refiners.find(refiner => refiner.RecordId === input.channelInventoryConfiguration?.InventoryProductAttributeRecordId)) ||\r\n // keep legacy logic to avoid break existing customers usage from this file\r\n (input.inventoryProductAttributeRecordId !== 0 &&\r\n refiners.find(refiner => refiner.RecordId === input.inventoryProductAttributeRecordId)) ||\r\n null\r\n );\r\n}\r\n\r\n/**\r\n * Action.\r\n * @param id - Id.\r\n * @param action - Action.\r\n * @returns - Results.\r\n * @remark The get-inventory-refiners data action is obsoleted. Please use getInventorySortableRefinerValue instead.\r\n */\r\nexport const actionDataAction = createObservableDataAction({\r\n id: '@msdyn365-commerce-modules/search-result-container/get-inventory-refiners',\r\n action: action as IAction\r\n});\r\n\r\nexport default actionDataAction;\r\n","/*!\r\n * Copyright (c) Microsoft Corporation.\r\n * All rights reserved. See LICENSE in the project root for license information.\r\n */\r\n\r\n/* eslint-disable no-duplicate-imports */\r\nimport {\r\n CacheType,\r\n createObservableDataAction,\r\n IAction,\r\n IActionContext,\r\n IActionInput,\r\n IAny,\r\n ICommerceApiSettings,\r\n ICreateActionContext,\r\n IGeneric\r\n} from '@msdyn365-commerce/core';\r\nimport { SortColumn } from '@msdyn365-commerce/retail-proxy';\r\nimport { getSearchConfigurationAsync } from '@msdyn365-commerce/retail-proxy/dist/DataActions/StoreOperationsDataActions.g';\r\nimport { buildCacheKey } from '@msdyn365-commerce-modules/retail-actions';\r\n\r\n// TODO: import from commerce entities when available\r\n// eslint-disable-next-line @typescript-eslint/naming-convention -- Name change will require many modifications\r\ninterface SearchConfiguration {\r\n ProductSortColumns?: SortColumn[];\r\n}\r\n\r\n// eslint-disable-next-line @typescript-eslint/naming-convention -- Name change will require many modifications\r\ninterface MappedSearchConfiguration {\r\n key: string;\r\n sortColumn: SortColumn;\r\n}\r\n\r\nexport const sortOptions = {\r\n sortByOptionRelevanceDesc: 'Ranking-Desc',\r\n sortByOptionRatingAsc: 'AverageRating-Asc',\r\n sortByOptionRatingDesc: 'AverageRating-Desc',\r\n sortByOptionNameAsc: 'Name-Asc',\r\n sortByOptionNameDesc: 'Name-Desc',\r\n sortByOptionPriceAsc: 'Price-Asc',\r\n sortByOptionPriceDesc: 'Price-Desc',\r\n sortByOptionBestSelling: 'BestSelling',\r\n sortByOptionNewScore: 'NewScore',\r\n sortByOptionTrendingScore: 'TrendingScore'\r\n};\r\n\r\n/**\r\n * ActionInput class for the get-mapped-search-configuration Data Action.\r\n */\r\nexport class MappedSearchInput implements IActionInput {\r\n private readonly apiSettings: ICommerceApiSettings;\r\n\r\n constructor(apiSettings: ICommerceApiSettings) {\r\n this.apiSettings = apiSettings;\r\n }\r\n\r\n public getCacheKey = () => buildCacheKey('MappedSearchInput', this.apiSettings);\r\n\r\n public getCacheObjectType = () => 'MappedSearchInput';\r\n\r\n public dataCacheType = (): CacheType => 'request';\r\n}\r\n\r\n/**\r\n * Get a mapped search configuration that is easy to use for sorting.\r\n * @param input\r\n * @param ctx\r\n */\r\nexport async function getMappedSearchConfiguration(input: MappedSearchInput, ctx: IActionContext): Promise {\r\n return getSearchConfigurationAsync({ callerContext: ctx }).then((searchConfiguration: SearchConfiguration) => {\r\n return (searchConfiguration.ProductSortColumns || [])\r\n .map((sortColumn: SortColumn) => {\r\n let key = '';\r\n if (sortColumn.ColumnName) {\r\n switch (sortColumn.ColumnName.toUpperCase()) {\r\n case 'NAME':\r\n key = sortColumn.IsDescending ? sortOptions.sortByOptionNameDesc : sortOptions.sortByOptionNameAsc;\r\n break;\r\n case 'PRICE':\r\n key = sortColumn.IsDescending ? sortOptions.sortByOptionPriceDesc : sortOptions.sortByOptionPriceAsc;\r\n break;\r\n case 'AVERAGERATING':\r\n key = sortColumn.IsDescending ? sortOptions.sortByOptionRatingDesc : sortOptions.sortByOptionRatingAsc;\r\n break;\r\n case 'RANKING':\r\n key = sortOptions.sortByOptionRelevanceDesc;\r\n break;\r\n case 'BESTSELLINGSCORE':\r\n key = sortOptions.sortByOptionBestSelling;\r\n break;\r\n case 'NEWSCORE':\r\n key = sortOptions.sortByOptionNewScore;\r\n break;\r\n case 'TRENDINGSCORE':\r\n key = sortOptions.sortByOptionTrendingScore;\r\n break;\r\n default:\r\n }\r\n } else {\r\n ctx.telemetry.warning('[get-mapped-search-configuration] unknown search option');\r\n }\r\n if (key) {\r\n return {\r\n key,\r\n sortColumn\r\n };\r\n }\r\n return undefined;\r\n })\r\n .filter(Boolean);\r\n });\r\n}\r\n\r\nexport const createInput = (inputData: ICreateActionContext>): IActionInput => {\r\n return new MappedSearchInput(inputData.requestContext.apiSettings);\r\n};\r\n\r\nexport const getMappedSearchConfigurationDataAction = createObservableDataAction({\r\n id: '@msdyn365-commerce-modules/search-result-container/get-mapped-search-configuration',\r\n action: >getMappedSearchConfiguration,\r\n input: createInput\r\n});\r\n\r\nexport default getMappedSearchConfigurationDataAction;\r\n","/*!\r\n * Copyright (c) Microsoft Corporation.\r\n * All rights reserved. See LICENSE in the project root for license information.\r\n */\r\n\r\n/* eslint-disable no-duplicate-imports */\r\nimport { IProductRefinerHierarchy } from '@msdyn365-commerce/commerce-entities';\r\nimport { IActionContext } from '@msdyn365-commerce/core';\r\nimport { IQueryResultSettings, ProductRefiner, ProductSearchCriteria } from '@msdyn365-commerce/retail-proxy';\r\nimport { getProductSearchRefinersAsync } from '@msdyn365-commerce/retail-proxy/dist/DataActions/ProductsDataActions.g';\r\n\r\n/**\r\n * Uses Bulk refiner API to get refiners and child refiner values.\r\n * @param searchCriteria Product search criteria.\r\n * @param maxItems Max items.\r\n * @param queryResultSettings\r\n * @param ctx Action context.\r\n */\r\nexport async function getProductRefinerHierarchy(\r\n searchCriteria: ProductSearchCriteria,\r\n queryResultSettings: IQueryResultSettings,\r\n ctx: IActionContext\r\n): Promise {\r\n return getProductSearchRefinersAsync({ callerContext: ctx, queryResultSettings }, searchCriteria).then(\r\n (productRefiners: ProductRefiner[]) => {\r\n if (!productRefiners) {\r\n ctx.trace('[getRefinersByCriteriaAction] returned no refiners');\r\n return [];\r\n }\r\n\r\n const result = (productRefiners || []).map((productRefiner: ProductRefiner) => productRefiner);\r\n\r\n if (result.length === 0) {\r\n ctx.trace('[getRefinersByCriteriaAction] returned no IProductRefinerHierarchy objects');\r\n return [];\r\n }\r\n\r\n return result;\r\n }\r\n );\r\n}\r\n","/*!\r\n * Copyright (c) Microsoft Corporation.\r\n * All rights reserved. See LICENSE in the project root for license information.\r\n */\r\n\r\n/* eslint-disable no-duplicate-imports */\r\nimport { IProductRefinerHierarchy } from '@msdyn365-commerce/commerce-entities';\r\nimport { createObservableDataAction, IAction, IActionContext, IActionInput, ICreateActionContext } from '@msdyn365-commerce/core';\r\nimport { AsyncResult, ChannelInventoryConfiguration, ProductRefinerValue, ProductSearchCriteria } from '@msdyn365-commerce/retail-proxy';\r\nimport { getInventoryConfigurationAsync } from '@msdyn365-commerce/retail-proxy/dist/DataActions/StoreOperationsDataActions.g';\r\n\r\nimport { BaseCollectionInput, createBaseCollectionInput } from './base-collection-action';\r\nimport { getProductRefinerHierarchy } from './get-product-refiner-hierarchy';\r\nimport { ProductListInventoryFilteringOptions } from '../actions';\r\nimport { getInventorySortableRefinerValue } from './get-inventory-refiners';\r\n\r\n/**\r\n * Default Category/Product Id Values.\r\n */\r\nenum DefaultValues {\r\n defaultCategoryIdValue = 0,\r\n defaultProductIdValue = 0\r\n}\r\n\r\n/**\r\n * Refiners-by-Collection Input action.\r\n */\r\nexport class RefinersByCollectionInput extends BaseCollectionInput implements IActionInput {\r\n public getCacheObjectType = () => 'ProductRefiner';\r\n\r\n public dataCacheType = () => {\r\n if (\r\n this.pageType !== 'Category' ||\r\n (this.refiners && this.refiners.length > 0) ||\r\n (this.queryResultSettings &&\r\n this.queryResultSettings.Sorting &&\r\n this.queryResultSettings.Sorting.Columns &&\r\n this.queryResultSettings.Sorting.Columns.length > 0)\r\n ) {\r\n return 'request';\r\n }\r\n return 'application';\r\n };\r\n}\r\n\r\n/**\r\n * Create input method which creates an ActionInput for fetching list page refiners.\r\n * @param args\r\n */\r\nconst createInput = (args: ICreateActionContext): IActionInput => {\r\n return createBaseCollectionInput(args, RefinersByCollectionInput);\r\n};\r\n\r\n/**\r\n * Action method which fetches refiners for the given list page.\r\n * @param input\r\n * @param context\r\n */\r\nasync function action(input: RefinersByCollectionInput, context: IActionContext): Promise {\r\n let searchProductId;\r\n // Decouple refiners from input.refiners to avoid input.refiners being modified below\r\n let refiners: ProductRefinerValue[] = [...input.refiners] || [];\r\n\r\n let channelInventoryConfigurationPromise: AsyncResult;\r\n if (input.channelInventoryConfiguration) {\r\n channelInventoryConfigurationPromise = AsyncResult.resolve(input.channelInventoryConfiguration);\r\n } else {\r\n channelInventoryConfigurationPromise = getInventoryConfigurationAsync({ callerContext: context });\r\n }\r\n const channelInventoryConfiguration = await channelInventoryConfigurationPromise;\r\n\r\n // Replace InventoryProductAttribute with boolean refiner.\r\n // Because the value of InventoryProductAttribute is different from language to language since it's string type.\r\n // The cached old inventory refiner value may be hit when customer switch language which will lead to \"no products found\" issue.\r\n const inventoryRefiner = refiners.find(\r\n refiner => refiner.RefinerRecordId === channelInventoryConfiguration?.InventoryProductAttributeRecordId\r\n );\r\n if (inventoryRefiner) {\r\n refiners = refiners.filter(refiner => refiner.RefinerRecordId !== channelInventoryConfiguration?.InventoryProductAttributeRecordId);\r\n\r\n const isInStockRefiner =\r\n inventoryRefiner.LeftValueBoundString !== channelInventoryConfiguration?.InventoryOutOfStockAttributeValueText &&\r\n inventoryRefiner.RightValueBoundString !== channelInventoryConfiguration?.InventoryOutOfStockAttributeValueText;\r\n const inventoryRefinerValue = getInventorySortableRefinerValue(channelInventoryConfiguration, isInStockRefiner);\r\n\r\n const isInventoryRefinerValueExist = refiners.some(refiner => refiner.RefinerRecordId === inventoryRefinerValue?.RefinerRecordId);\r\n if (!isInventoryRefinerValueExist && inventoryRefinerValue) {\r\n refiners.push(inventoryRefinerValue);\r\n }\r\n }\r\n\r\n if (context.requestContext.app.config?.productListInventoryDisplay === ProductListInventoryFilteringOptions.HideOOS) {\r\n const isInStock = true;\r\n const inventoryInStockRefinerValue = getInventorySortableRefinerValue(channelInventoryConfiguration, isInStock);\r\n\r\n const isInventoryInStockRefinerValueExist = refiners.some(\r\n refiner => refiner.RefinerRecordId === inventoryInStockRefinerValue?.RefinerRecordId\r\n );\r\n if (!isInventoryInStockRefinerValueExist && inventoryInStockRefinerValue) {\r\n refiners.push(inventoryInStockRefinerValue);\r\n }\r\n }\r\n\r\n if (input.pageType === 'Category') {\r\n if (input.category) {\r\n return getProductRefinerHierarchy(\r\n {\r\n CategoryIds: [input.category || DefaultValues.defaultCategoryIdValue],\r\n Context: {\r\n ChannelId: input.apiSettings.channelId,\r\n CatalogId: input.catalogId\r\n },\r\n Refinement: input.isUpdateRefinerPanel ? refiners : []\r\n },\r\n input.queryResultSettings,\r\n context\r\n );\r\n }\r\n throw new Error('[GetRefinersForCollection]Category Page Detected, but no global categoryId found');\r\n } else {\r\n if (input.searchText && context.requestContext.query && context.requestContext.query.q) {\r\n return getProductRefinerHierarchy(\r\n {\r\n SearchCondition: input.searchText,\r\n Context: {\r\n ChannelId: input.apiSettings.channelId,\r\n CatalogId: input.catalogId\r\n },\r\n Refinement: input.isUpdateRefinerPanel ? refiners : []\r\n },\r\n input.queryResultSettings,\r\n context\r\n );\r\n }\r\n if (input.searchText && context.requestContext.query && context.requestContext.query.recommendation) {\r\n const searchObject = JSON.parse(input.searchText);\r\n if (context.requestContext.query.productId) {\r\n searchProductId = Number(searchObject.ProductId);\r\n }\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 const searchCriteriaInput: ProductSearchCriteria = {};\r\n searchCriteriaInput.Context = {\r\n ChannelId: input.apiSettings.channelId,\r\n CatalogId: input.catalogId\r\n };\r\n searchCriteriaInput.Refinement = input.isUpdateRefinerPanel ? refiners : [];\r\n searchCriteriaInput.RecommendationListId = searchObject.Recommendation;\r\n if (searchProductId) {\r\n searchCriteriaInput.Ids = [searchProductId || DefaultValues.defaultProductIdValue];\r\n }\r\n return getProductRefinerHierarchy(searchCriteriaInput, input.queryResultSettings, context);\r\n }\r\n } else {\r\n throw new Error('[GetFullProductsForCollection]Search Page Detected, but no q= or productId= query parameter found');\r\n }\r\n }\r\n}\r\n\r\nexport const actionDataAction = createObservableDataAction({\r\n id: '@msdyn365-commerce-modules/search-result-container/get-refiners-for-collection',\r\n action: >action,\r\n input: createInput\r\n});\r\n\r\nexport default actionDataAction;\r\n","/*!\r\n * Copyright (c) Microsoft Corporation.\r\n * All rights reserved. See LICENSE in the project root for license information.\r\n */\r\n/* eslint-disable security/detect-object-injection */\r\n/* eslint-disable no-duplicate-imports */\r\nimport MsDyn365, { IRequestContext } from '@msdyn365-commerce/core';\r\nimport { ProductRefinerValue, SortColumn } from '@msdyn365-commerce/retail-proxy';\r\n\r\n/**\r\n * Refiner Compression:\r\n * Refiners contains a non-trivial amount of data that is required to successfully make\r\n * a refiner-based API call. To allow for deep-linking of refiners in the URL, refiner data\r\n * must be compressed so that URL max length is not exceeded. Refiners will be compressed into\r\n * the following array style index-based format:\r\n * [DataTypeValue, LeftValueBoundString, RefinerRecordId, RefinerSourceValue, RightValueBoundString, UnitText].\r\n */\r\nconst compressedRefinerKeys = [\r\n 'DataTypeValue',\r\n 'LeftValueBoundString',\r\n 'RefinerRecordId',\r\n 'RefinerSourceValue',\r\n 'RightValueBoundString',\r\n 'UnitText'\r\n];\r\n\r\n/**\r\n * Hydrates compressed refiner data from URL.\r\n * @param fullUrl The full URL of the page.\r\n * @param requestContext\r\n */\r\nexport const hydrateRefinersFromUrl = (requestContext: IRequestContext): ProductRefinerValue[] => {\r\n const compressedRefinerArray = parseQueryParam<(string | number)[][]>('refiners', requestContext);\r\n if (!compressedRefinerArray || compressedRefinerArray.length === 0) {\r\n return [];\r\n }\r\n\r\n return compressedRefinerArray\r\n .map(compressedRefiner => {\r\n try {\r\n const parsedRefiner: ProductRefinerValue = {};\r\n compressedRefinerKeys.forEach((refinerKey, index) => {\r\n parsedRefiner[refinerKey] = compressedRefiner[index];\r\n });\r\n return parsedRefiner;\r\n } catch {\r\n return undefined;\r\n }\r\n })\r\n .filter(Boolean);\r\n};\r\n\r\n/**\r\n * Compressed a list of refiners for use in URLs.\r\n * @param refiners The uncompressed refiners.\r\n */\r\nexport const compressRefiners = (refiners: ProductRefinerValue[]) => {\r\n const compressedRefiners: (string | number)[][] = [];\r\n\r\n refiners.forEach(refiner => {\r\n const compressedRefiner: (string | number)[] = [];\r\n compressedRefinerKeys.forEach(refinerKey => {\r\n compressedRefiner.push(refiner[refinerKey]);\r\n });\r\n compressedRefiners.push(compressedRefiner);\r\n });\r\n\r\n return compressedRefiners;\r\n};\r\n\r\n/**\r\n * Method which creates a URL contiaining serialized active refiners.\r\n * @param fullUrl The Current URL of the page.\r\n * @param refiners The refiners which should be added to the URL.\r\n * @param sortingColumns\r\n * @param skipCount\r\n */\r\nexport const buildListPageUrl = (fullUrl: URL, refiners?: ProductRefinerValue[], sortingColumns?: SortColumn[], skipCount?: number) => {\r\n // Refiner Change flow\r\n if (refiners !== undefined) {\r\n if (refiners.length === 0) {\r\n fullUrl.searchParams.delete('refiners');\r\n } else {\r\n const sortedRefiners = refiners.sort((first, second) =>\r\n first.RefinerRecordId && second.RefinerRecordId && first.RefinerRecordId > second.RefinerRecordId ? 1 : -1\r\n );\r\n fullUrl.searchParams.set('refiners', JSON.stringify(compressRefiners(sortedRefiners)));\r\n }\r\n\r\n // Adding or removing a refiner means we want to always load page 1\r\n fullUrl.searchParams.delete('skip');\r\n return fullUrl.href;\r\n }\r\n\r\n if (sortingColumns !== undefined) {\r\n if (sortingColumns.length === 0) {\r\n fullUrl.searchParams.delete('sorting');\r\n } else {\r\n fullUrl.searchParams.set('sorting', JSON.stringify(sortingColumns));\r\n }\r\n\r\n // Changing the sort means always load page 1\r\n fullUrl.searchParams.delete('skip');\r\n return fullUrl.href;\r\n }\r\n\r\n if (skipCount) {\r\n fullUrl.searchParams.set('skip', skipCount.toString());\r\n }\r\n\r\n return fullUrl.href;\r\n};\r\n\r\n/**\r\n * Parses a query param from the query object of the request context.\r\n * @param key The query parameter key.\r\n * @param requestContext The request context.\r\n */\r\nexport const parseQueryParam = (key: string, requestContext: IRequestContext): T | null => {\r\n if (requestContext.query && requestContext.query[key]) {\r\n return JSON.parse(decodeURIComponent(requestContext.query[key]));\r\n }\r\n return null;\r\n};\r\n\r\n/**\r\n * Gets the current URL of the page from the request context.\r\n * @param requestContext The request context.\r\n */\r\nexport const getCurrentUrl = (requestContext: IRequestContext): URL => {\r\n if (MsDyn365.isBrowser) {\r\n return new URL(window.location.href);\r\n }\r\n\r\n // NOTE: Typing on requestURL is incorrect\r\n if (requestContext.url.requestUrl.href) {\r\n return new URL(requestContext.url.requestUrl.href);\r\n }\r\n return new URL((requestContext.url.requestUrl));\r\n};\r\n","/*!\r\n * Copyright (c) Microsoft Corporation.\r\n * All rights reserved. See LICENSE in the project root for license information.\r\n */\r\n\r\n/* eslint-disable no-duplicate-imports */\r\nimport { ITelemetry } from '@msdyn365-commerce/core';\r\nimport { AttributeDataType, ProductRefinerValue, RefinerType } from '@msdyn365-commerce/retail-proxy';\r\n\r\nimport { IRefineItemToggleNotification } from './refine-item-toggle-notification';\r\n\r\n/**\r\n * Types of product refiner values.\r\n * @deprecated This will be removed soon. Please, use `AttributeDataType` from `@msdyn365-commerce/retail-proxy` instead.\r\n * @example\r\n * ```\r\n * import { AttributeDataType } from `@msdyn365-commerce/retail-proxy`;\r\n * ```\r\n */\r\nexport enum ProductRefinerValueDataTypeValue {\r\n /**\r\n * Range slider is used for selections like price.\r\n * @deprecated This will be removed soon. Please, use `AttributeDataType` from `@msdyn365-commerce/retail-proxy` instead.\r\n * @example\r\n * ```\r\n * import { AttributeDataType } from `@msdyn365-commerce/retail-proxy`;\r\n * ```\r\n */\r\n Range = 1,\r\n\r\n /**\r\n * Range input is a different way to specify ranges and can be expressed with input boxes\r\n * as well as a set of discrete single-select type values.\r\n * @deprecated This will be removed soon. Please, use `AttributeDataType` from `@msdyn365-commerce/retail-proxy` instead.\r\n * @example\r\n * ```\r\n * import { AttributeDataType } from `@msdyn365-commerce/retail-proxy`;\r\n * ```\r\n */\r\n RangeInput = 4,\r\n\r\n /**\r\n * This is a discrete list item, either multi-select or single-select.\r\n * @deprecated This will be removed soon. Please, use `AttributeDataType` from `@msdyn365-commerce/retail-proxy` instead.\r\n * @example\r\n * ```\r\n * import { AttributeDataType } from `@msdyn365-commerce/retail-proxy`;\r\n * ```\r\n */\r\n List = 5,\r\n\r\n /**\r\n * Boolean types allows only single-select.\r\n * @deprecated This will be removed soon. Please, use `AttributeDataType` from `@msdyn365-commerce/retail-proxy` instead.\r\n * @example\r\n * ```\r\n * import { AttributeDataType } from `@msdyn365-commerce/retail-proxy`;\r\n * ```\r\n */\r\n Boolean = 6\r\n}\r\n\r\n/**\r\n * Types of product refiners.\r\n * @deprecated This will be removed soon. Please, use `RefinerType` from `@msdyn365-commerce/retail-proxy` instead.\r\n * @example\r\n * ```\r\n * import { RefinerType } from `@msdyn365-commerce/retail-proxy`;\r\n * ```\r\n */\r\nexport enum ProductRefinerTypeValue {\r\n /**\r\n * Refiner values are single-select.\r\n * @deprecated This will be removed soon. Please, use `RefinerType` from `@msdyn365-commerce/retail-proxy` instead.\r\n * @example\r\n * ```\r\n * import { RefinerType } from `@msdyn365-commerce/retail-proxy`;\r\n * ```\r\n */\r\n Single = 0,\r\n\r\n /**\r\n * Refiner values are multi-select.\r\n * @deprecated This will be removed soon. Please, use `RefinerType` from `@msdyn365-commerce/retail-proxy` instead.\r\n * @example\r\n * ```\r\n * import { RefinerType } from `@msdyn365-commerce/retail-proxy`;\r\n * ```\r\n */\r\n Multi = 1\r\n}\r\n\r\n/**\r\n * ProductRefinerSource enum type.\r\n * @deprecated This will be removed soon. Please, use `ProductRefinerSource` from `@msdyn365-commerce/retail-proxy` instead.\r\n * @example\r\n * ```\r\n * import { ProductRefinerSource } from `@msdyn365-commerce/retail-proxy`;\r\n * ```\r\n */\r\nexport enum ProductRefinerSource {\r\n /**\r\n * The None member.\r\n * @deprecated This will be removed soon. Please, use `ProductRefinerSource` from `@msdyn365-commerce/retail-proxy` instead.\r\n * @example\r\n * ```\r\n * import { ProductRefinerSource } from `@msdyn365-commerce/retail-proxy`;\r\n * ```\r\n */\r\n None = 0,\r\n\r\n /**\r\n * The Attribute member.\r\n * @deprecated This will be removed soon. Please, use `ProductRefinerSource` from `@msdyn365-commerce/retail-proxy` instead.\r\n * @example\r\n * ```\r\n * import { ProductRefinerSource } from `@msdyn365-commerce/retail-proxy`;\r\n * ```\r\n */\r\n Attribute = 1,\r\n\r\n /**\r\n * The Category member.\r\n * @deprecated This will be removed soon. Please, use `ProductRefinerSource` from `@msdyn365-commerce/retail-proxy` instead.\r\n * @example\r\n * ```\r\n * import { ProductRefinerSource } from `@msdyn365-commerce/retail-proxy`;\r\n * ```\r\n */\r\n Category = 2,\r\n\r\n /**\r\n * The Price member.\r\n * @deprecated This will be removed soon. Please, use `ProductRefinerSource` from `@msdyn365-commerce/retail-proxy` instead.\r\n * @example\r\n * ```\r\n * import { ProductRefinerSource } from `@msdyn365-commerce/retail-proxy`;\r\n * ```\r\n */\r\n Price = 3,\r\n\r\n /**\r\n * The Rating member.\r\n * @deprecated This will be removed soon. Please, use `ProductRefinerSource` from `@msdyn365-commerce/retail-proxy` instead.\r\n * @example\r\n * ```\r\n * import { ProductRefinerSource } from `@msdyn365-commerce/retail-proxy`;\r\n * ```\r\n */\r\n Rating = 4\r\n}\r\n\r\n/**\r\n * Checks if the data type value corresponds to a slider.\r\n * @param dataTypeValue\r\n */\r\nexport function isRangeType(dataTypeValue: number | undefined): boolean {\r\n return (\r\n dataTypeValue === AttributeDataType.Currency ||\r\n dataTypeValue === AttributeDataType.Decimal ||\r\n dataTypeValue === AttributeDataType.Integer\r\n );\r\n}\r\n\r\n/**\r\n * Find the refinement criterion associated with this product refiner value.\r\n * @param productRefinerValue Product refiner value to match.\r\n * @param refinementCriteria Selected refinement criteria.\r\n */\r\nexport function findMatchingRefinementCriterion(\r\n productRefinerValue: ProductRefinerValue,\r\n refinementCriteria: ProductRefinerValue[]\r\n): ProductRefinerValue | undefined {\r\n // If the value is a range, then match only on data type value; otherwise match on item string\r\n return refinementCriteria.find((refinementCriterion: ProductRefinerValue) =>\r\n isMatchingRefinementCriterion(productRefinerValue, refinementCriterion)\r\n );\r\n}\r\n\r\n/**\r\n * Find the refinement criterion associated with this product refiner value.\r\n * @param productRefinerValue Product refiner value to match.\r\n * @param refinementCriteria Selected refinement criteria.\r\n * @param refinementCriterion\r\n */\r\nexport function isMatchingRefinementCriterion(productRefinerValue: ProductRefinerValue, refinementCriterion: ProductRefinerValue): boolean {\r\n // If the value is a range, then match only on data type value; otherwise match on item string\r\n return (\r\n refinementCriterion.RefinerRecordId === productRefinerValue.RefinerRecordId &&\r\n refinementCriterion.RefinerSourceValue === productRefinerValue.RefinerSourceValue &&\r\n refinementCriterion.DataTypeValue === productRefinerValue.DataTypeValue &&\r\n (isRangeType(refinementCriterion.DataTypeValue) ||\r\n refinementCriterion.LeftValueBoundString === productRefinerValue.LeftValueBoundString)\r\n );\r\n}\r\n\r\nexport function getUpdatedRefinementCriteria(\r\n itemToggleNotification: IRefineItemToggleNotification,\r\n currentRefinementCriteria: ProductRefinerValue[]\r\n): ProductRefinerValue[] {\r\n const updatedRefinementCriteria: ProductRefinerValue[] = [];\r\n let toggledItemFound = false;\r\n currentRefinementCriteria.forEach((selectedCriterion: ProductRefinerValue) => {\r\n if (isMatchingRefinementCriterion(itemToggleNotification.productRefinerValue, selectedCriterion)) {\r\n toggledItemFound = true;\r\n if (itemToggleNotification.isSelecting) {\r\n const next = {\r\n ...selectedCriterion,\r\n LeftValueBoundString:\r\n (itemToggleNotification.rangeStart !== undefined && `${itemToggleNotification.rangeStart}`) ||\r\n selectedCriterion.LeftValueBoundString,\r\n RightValueBoundString:\r\n (itemToggleNotification.rangeEnd !== undefined && `${itemToggleNotification.rangeEnd}`) ||\r\n selectedCriterion.RightValueBoundString\r\n };\r\n updatedRefinementCriteria.push(next);\r\n } // Else the item is being de-selected, so omit it from the refinement criteria\r\n } else {\r\n // Keep existing criterion because it is not in the item toggle notification\r\n updatedRefinementCriteria.push(selectedCriterion);\r\n }\r\n });\r\n\r\n if (!toggledItemFound) {\r\n const next = {\r\n ...itemToggleNotification.productRefinerValue,\r\n LeftValueBoundString:\r\n (itemToggleNotification.rangeStart !== undefined && `${itemToggleNotification.rangeStart}`) ||\r\n itemToggleNotification.productRefinerValue.LeftValueBoundString,\r\n RightValueBoundString:\r\n (itemToggleNotification.rangeEnd !== undefined && `${itemToggleNotification.rangeEnd}`) ||\r\n itemToggleNotification.productRefinerValue.RightValueBoundString\r\n };\r\n updatedRefinementCriteria.push(next);\r\n\r\n // If single select, then deselect any others in the parent refiner group\r\n if (\r\n (itemToggleNotification.productRefinerValue.DataTypeValue === AttributeDataType.Text ||\r\n itemToggleNotification.productRefinerValue.DataTypeValue === AttributeDataType.TrueFalse) &&\r\n itemToggleNotification.parentProductRefinerHierarchy.RefinerTypeValue === RefinerType.SingleSelect\r\n ) {\r\n itemToggleNotification.parentProductRefinerHierarchy.Values.forEach((child: ProductRefinerValue) => {\r\n if (child.RefinerRecordId === next.RefinerRecordId && child.LeftValueBoundString === next.LeftValueBoundString) {\r\n // Do nothing\r\n } else {\r\n const matchingIndex = updatedRefinementCriteria.findIndex((criterion: ProductRefinerValue) =>\r\n isMatchingRefinementCriterion(child, criterion)\r\n );\r\n if (matchingIndex > -1) {\r\n updatedRefinementCriteria.splice(matchingIndex, 1);\r\n }\r\n }\r\n });\r\n }\r\n }\r\n\r\n return updatedRefinementCriteria;\r\n}\r\n\r\nexport function formatPrice(\r\n amount: string | undefined,\r\n currency: string | undefined,\r\n locale: string | undefined,\r\n telemetry: ITelemetry\r\n): string {\r\n if (!amount || !currency) {\r\n telemetry.trace(`[refine-menu.utilities.formatPrice] could not format price for ${amount} ${currency}`);\r\n return amount || '';\r\n }\r\n const priceAmount = (amount && Number(amount)) || 0;\r\n let result: string;\r\n\r\n try {\r\n result = new Intl.NumberFormat(locale, {\r\n style: 'currency',\r\n currencyDisplay: 'symbol',\r\n currency,\r\n minimumFractionDigits: 0\r\n }).format(priceAmount);\r\n } catch (error) {\r\n result = `${priceAmount} ${currency}`;\r\n telemetry.warning(`[refine-menu.utilities.formatPrice] Failed to format price for ${result}: ${error}`);\r\n }\r\n\r\n return result;\r\n}\r\n","/*!\r\n * Copyright (c) Microsoft Corporation.\r\n * All rights reserved. See LICENSE in the project root for license information.\r\n */\r\n\r\n/* eslint-disable no-duplicate-imports */\r\nimport { IProductRefinerHierarchy } from '@msdyn365-commerce/commerce-entities';\r\nimport { ProductRefinerValue } from '@msdyn365-commerce/retail-proxy';\r\nimport { getPayloadObject, getTelemetryAttributes, IPayLoad } from '@msdyn365-commerce-modules/utilities';\r\nimport classnames from 'classnames';\r\nimport { computed } from 'mobx';\r\nimport { observer } from 'mobx-react';\r\nimport * as React from 'react';\r\n\r\nimport { ProductListInventoryFilteringOptions } from '../actions';\r\nimport { IChoiceSummaryProps } from './choice-summary.props';\r\nimport { isMatchingRefinementCriterion, isRangeType } from './utilities';\r\n\r\ninterface IRefinerMap {\r\n key: string;\r\n value: ProductRefinerValue;\r\n}\r\n\r\n/**\r\n * ChoiceSummary component.\r\n */\r\n@observer\r\nexport default class ChoiceSummary extends React.PureComponent {\r\n private readonly closeButtonGlyph: string = 'msi-close-btn';\r\n\r\n private readonly payLoad: IPayLoad;\r\n\r\n @computed get selectedRefinersMap(): IRefinerMap[] {\r\n let { selectedChoices } = this.props;\r\n const { channelInventoryConfigurationId, refinerHierarchy } = this.props;\r\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access -- app configs are of generic type\r\n if (this.props.context?.app.config.productListInventoryDisplay === ProductListInventoryFilteringOptions.HideOOS) {\r\n selectedChoices = selectedChoices.filter(choice => {\r\n const parent = refinerHierarchy.find(\r\n (hierarchy: IProductRefinerHierarchy) =>\r\n !!hierarchy.Values.find((value: ProductRefinerValue) => isMatchingRefinementCriterion(value, choice))\r\n );\r\n return parent && parent.RecordId !== channelInventoryConfigurationId;\r\n });\r\n }\r\n return selectedChoices.map((selectedRefiner: ProductRefinerValue, index) => {\r\n return {\r\n key: this._getKeyForRefinerValue(selectedRefiner, index.toString()),\r\n value: selectedRefiner\r\n } as IRefinerMap;\r\n });\r\n }\r\n\r\n constructor(props: Readonly) {\r\n super(props);\r\n this.payLoad = getPayloadObject('click', this.props.telemetryContent!, '');\r\n }\r\n\r\n public render(): JSX.Element {\r\n const { clearAllText, label, classNames, choiceAriaLabel, closeAriaLabel } = this.props;\r\n const items = this.selectedRefinersMap;\r\n this.payLoad.contentAction.etext = clearAllText;\r\n const clearAllAttributes = getTelemetryAttributes(this.props.telemetryContent!, this.payLoad);\r\n return (\r\n
\r\n {items.length > 0 && label && {label}}\r\n
    \r\n {items.map((item: IRefinerMap) => {\r\n this.payLoad.contentAction.etext = item.key;\r\n const attribute = getTelemetryAttributes(this.props.telemetryContent!, this.payLoad);\r\n\r\n return (\r\n
  • \r\n \r\n {item.value.LeftValueBoundString && item.value.LeftValueBoundLocalizedString === ''\r\n ? item.value.LeftValueBoundString\r\n : (item.value.LeftValueBoundLocalizedString ||\r\n item.value.LeftValueBoundLocalizedString === undefined) &&\r\n item.value.RefinerRecordId === 0\r\n ? `${item.value.LeftValueBoundString} - ${item.value.RightValueBoundString} ${item.value.UnitText}`\r\n : item.value.LeftValueBoundString}\r\n \r\n \r\n
  • \r\n );\r\n })}\r\n
\r\n {items.length > 0 && clearAllText && (\r\n \r\n {clearAllText}\r\n \r\n )}\r\n
\r\n );\r\n }\r\n\r\n private _getKeyForRefinerValue(productRefinerValue: ProductRefinerValue, index: string): string {\r\n const { choiceFormat, choiceRangeValueFormat, refinerHierarchy, telemetry, refinerValues } = this.props;\r\n const overallFormat = choiceFormat || '{1}';\r\n const rangeFormat = choiceRangeValueFormat;\r\n let refinerName = '';\r\n if (refinerHierarchy && refinerHierarchy.find) {\r\n const parent = refinerHierarchy.find(\r\n (hierarchy: IProductRefinerHierarchy) =>\r\n !!hierarchy.Values.find((value: ProductRefinerValue) => isMatchingRefinementCriterion(value, productRefinerValue))\r\n );\r\n\r\n if (!parent) {\r\n telemetry.warning('[choice-summary] could not find parent of selected refiner value');\r\n } else {\r\n refinerName = parent.KeyName || '';\r\n }\r\n }\r\n\r\n let refinerValueName: string;\r\n if (isRangeType(productRefinerValue.DataTypeValue)) {\r\n refinerValueName = rangeFormat\r\n .replace('{0}', this._formatPrice(productRefinerValue.LeftValueBoundString, productRefinerValue.UnitText))\r\n .replace('{1}', this._formatPrice(productRefinerValue.RightValueBoundString, productRefinerValue.UnitText));\r\n } else if (productRefinerValue.RefinerRecordId === 0) {\r\n const filterValue = refinerValues?.Values.find(\r\n refiner => refiner.LeftValueBoundString === productRefinerValue.LeftValueBoundString\r\n );\r\n refinerValueName = (filterValue ? filterValue.LeftValueBoundLocalizedString : productRefinerValue.LeftValueBoundString) || '';\r\n } else {\r\n refinerValueName = productRefinerValue.LeftValueBoundLocalizedString || productRefinerValue.LeftValueBoundString || '';\r\n }\r\n\r\n if (refinerName === 'Rating' || refinerName === 'Price') {\r\n return overallFormat.replace('{0}', refinerName).replace('{1}', `${refinerValueName}`);\r\n }\r\n\r\n return overallFormat.replace('{0}', refinerName).replace('{1}', `${refinerValueName}_${refinerName}_${index}`);\r\n }\r\n\r\n private _formatPrice(amount: string | undefined, currency: string | undefined): string {\r\n if (!amount || !currency) {\r\n this.props.telemetry.trace('[choice-summary] could not format price');\r\n return amount || '';\r\n }\r\n let result = amount;\r\n\r\n try {\r\n result = this.props.context!.cultureFormatter.formatCurrency(Number(amount), currency);\r\n } catch (error) {\r\n this.props.telemetry.warning(`Failed to format price for ${result}: ${error}`);\r\n }\r\n\r\n return result;\r\n }\r\n\r\n private readonly _onClick = (e: React.MouseEvent): void => {\r\n e.preventDefault();\r\n e.stopPropagation();\r\n\r\n const target = e.currentTarget as HTMLElement;\r\n const clearAll = target.getAttribute('class')!.includes('choice-summary__clear-all');\r\n const selectedRefiner = clearAll ? undefined : this._getSelectedRefinerChoice(target);\r\n\r\n if (this.props.onChoiceClicked) {\r\n this.props.onChoiceClicked({\r\n clearAll,\r\n itemClicked: target,\r\n choiceClicked: selectedRefiner,\r\n nextItemToFocus: target.nextSibling as HTMLElement\r\n });\r\n }\r\n };\r\n\r\n private _getSelectedRefinerChoice(itemClicked: HTMLElement): ProductRefinerValue | undefined {\r\n const result = this.selectedRefinersMap.find(selected => itemClicked.id === selected.key);\r\n return (result && result.value) || undefined;\r\n }\r\n}\r\n","/*!\r\n * Copyright (c) Microsoft Corporation.\r\n * All rights reserved. See LICENSE in the project root for license information.\r\n */\r\n\r\n/* eslint-disable no-duplicate-imports */\r\nimport * as React from 'react';\r\n\r\ninterface IErrorMessage {\r\n text?: string;\r\n}\r\n\r\nexport const ErrorMessage: React.FC = ({ text }) => {\r\n return (\r\n \r\n
\r\n {` `}\r\n {text}\r\n {` `}\r\n
\r\n
\r\n );\r\n};\r\n","/*!\r\n * Copyright (c) Microsoft Corporation.\r\n * All rights reserved. See LICENSE in the project root for license information.\r\n */\r\n\r\n/* eslint-disable no-duplicate-imports */\r\nimport { ICoreContext, IGridSettings, IImageData, IImageSettings, Image, IRequestContext } from '@msdyn365-commerce/core';\r\nimport { SimpleProduct } from '@msdyn365-commerce/retail-proxy';\r\nimport { getFallbackImageUrl, getProductPageUrlSync } from '@msdyn365-commerce-modules/retail-actions';\r\nimport { getPayloadObject, getTelemetryAttributes, ITelemetryContent, onTelemetryClick } from '@msdyn365-commerce-modules/utilities';\r\nimport * as React from 'react';\r\n\r\nimport { IExtSearchResultContainerResources } from '../ext-search-result-container.props.autogenerated';\r\n\r\n// Import { IComponent, IComponentProps, ICoreContext, IGridSettings, IImageData, IImageSettings, Image, msdyn365Commerce } from '@msdyn365-commerce/core';\r\n\r\ninterface IFeatureSearchResultItem {\r\n product: SimpleProduct | null;\r\n context: ICoreContext;\r\n resources: IExtSearchResultContainerResources;\r\n imageSettings?: IImageSettings;\r\n moduleType: string;\r\n moduleId: string;\r\n telemetryContent?: ITelemetryContent;\r\n recommendation?: string;\r\n}\r\n\r\nexport const FeatureSearchResultItem: React.FC = ({\r\n product,\r\n context,\r\n imageSettings,\r\n resources,\r\n telemetryContent,\r\n recommendation\r\n}) => {\r\n if (product === null) {\r\n return null;\r\n }\r\n\r\n const productName = product.Name;\r\n const productRecordId = product && product.RecordId ? product.RecordId : 0;\r\n const productUrl = getProductPageUrlSync(product.Name || '', productRecordId, context && context.actionContext, undefined);\r\n const fallbackImage = getFallbackImageUrl(\r\n product.ItemId,\r\n context.actionContext.requestContext.apiSettings,\r\n context.request.app?.config?.OmniChannelMedia\r\n );\r\n const heading =\r\n recommendation && recommendation === 'descriptions' ? resources.featureSimilarDescriptionTitle : resources.featureSimilarLooksTitle;\r\n\r\n // Construct telemetry attribute to render\r\n const payLoad = getPayloadObject('click', telemetryContent!, productName!, productRecordId.toString());\r\n\r\n const attribute = getTelemetryAttributes(telemetryContent!, payLoad);\r\n return (\r\n
\r\n \r\n
\r\n {renderProductPlacementImage(\r\n imageSettings,\r\n context.request.gridSettings,\r\n product.PrimaryImageUrl,\r\n product.Name,\r\n fallbackImage,\r\n context.actionContext.requestContext\r\n )}\r\n
\r\n \r\n
\r\n

{heading}

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

{title}

;\r\n}\r\n","/*!\r\n * Copyright (c) Microsoft Corporation.\r\n * All rights reserved. See LICENSE in the project root for license information.\r\n */\r\n\r\n/* eslint-disable no-duplicate-imports */\r\nimport * as React from 'react';\r\n\r\ninterface ILink {\r\n className?: string;\r\n text?: string;\r\n href?: string;\r\n ariaLabel?: string;\r\n}\r\n\r\nexport const Link: React.FC = ({ text, className, href, ariaLabel }) => (\r\n \r\n {' '}\r\n {text}{' '}\r\n \r\n);\r\n","/*!\r\n * Copyright (c) Microsoft Corporation.\r\n * All rights reserved. See LICENSE in the project root for license information.\r\n */\r\n\r\n/* eslint-disable no-duplicate-imports */\r\nimport { Button, Modal, ModalBody, ModalFooter, ModalHeader } from '@msdyn365-commerce-modules/utilities';\r\nimport React from 'react';\r\n\r\nexport interface ISearchResultModalViewProps {\r\n modal: React.ReactElement;\r\n modalHeader: React.ReactElement;\r\n modalFooter: React.ReactElement;\r\n modalBody: React.ReactElement;\r\n}\r\n\r\ninterface IModalToggleProps {\r\n innerRef: React.RefObject | undefined;\r\n id: string;\r\n text: string;\r\n ariaLabel: string;\r\n onClick(): void;\r\n}\r\n\r\nexport interface ISearchResultModalResources {\r\n modalTitle: string;\r\n modalCloseButtonText: string;\r\n}\r\n\r\nexport interface ISearchResultModalProps {\r\n resources: ISearchResultModalResources;\r\n isOpen: boolean;\r\n returnRef: React.RefObject | undefined;\r\n onModalToggle(): void;\r\n}\r\n\r\nexport const ModalToggle: React.FC = (props: IModalToggleProps) => {\r\n const { text, onClick, ariaLabel, innerRef, id } = props;\r\n return (\r\n \r\n );\r\n};\r\n\r\nexport const SearchResultModal = (props: ISearchResultModalProps): ISearchResultModalViewProps => {\r\n return {\r\n modal: modalNode(props),\r\n modalHeader: modalHeaderNode(props),\r\n modalFooter: modalFooterNode(props),\r\n modalBody: \r\n };\r\n};\r\n\r\nconst modalNode = (props: ISearchResultModalProps) => {\r\n return (\r\n \r\n );\r\n};\r\n\r\nconst modalHeaderNode = (props: ISearchResultModalProps) => {\r\n return {props.resources.modalTitle};\r\n};\r\n\r\nconst modalFooterNode = (props: ISearchResultModalProps) => {\r\n return (\r\n \r\n \r\n \r\n );\r\n};\r\n","/*!\r\n * Copyright (c) Microsoft Corporation.\r\n * All rights reserved. See LICENSE in the project root for license information.\r\n */\r\n\r\n/* eslint-disable no-duplicate-imports */\r\nimport { IProductsDimensionsAvailabilities } from '@msdyn365-commerce/commerce-entities';\r\nimport { ICoreContext, IImageSettings } from '@msdyn365-commerce/core';\r\nimport { CommerceList, ProductPrice, ProductSearchResult } from '@msdyn365-commerce/retail-proxy';\r\nimport { ArrayExtensions } from '@msdyn365-commerce-modules/retail-actions';\r\nimport { ITelemetryContent } from '@msdyn365-commerce-modules/utilities';\r\n\r\nimport * as React from 'react';\r\n\r\nimport { ProductComponent } from '../../../shared/components/product.component';\r\nimport { IPriceComponentResources } from '../../../shared/components/price.component';\r\n\r\nimport { IExtSearchResultContainerResources } from '../ext-search-result-container.props.autogenerated';\r\nimport { ProductSearchResultExpanded } from '../../../shared/classes/ProductSearchResultExpanded';\r\n\r\ninterface IProductSearchResultItems {\r\n products: ProductSearchResultExpanded[];\r\n context: ICoreContext;\r\n resources: IExtSearchResultContainerResources;\r\n imageSettings?: IImageSettings;\r\n moduleType: string;\r\n moduleId: string;\r\n allowBackNavigation?: boolean;\r\n telemetryContent: ITelemetryContent;\r\n quickviewSlot?: {} | null | undefined;\r\n productComparisonButton?: {} | null | undefined;\r\n channelInventoryConfigurationId?: number;\r\n isPriceMinMaxEnabled?: boolean;\r\n productsDimensionAvailabilities?: IProductsDimensionsAvailabilities[][];\r\n wishlist?: CommerceList[];\r\n wishlistInProductCard?: boolean;\r\n productPrices?: ProductPrice[];\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\nexport function 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\nexport const ProductSearchResultItems: React.FC = ({\r\n products,\r\n context,\r\n imageSettings,\r\n resources,\r\n moduleType,\r\n moduleId,\r\n allowBackNavigation,\r\n telemetryContent,\r\n quickviewSlot,\r\n productComparisonButton,\r\n channelInventoryConfigurationId,\r\n isPriceMinMaxEnabled,\r\n productsDimensionAvailabilities,\r\n wishlist,\r\n wishlistInProductCard,\r\n productPrices\r\n}) => {\r\n const priceResources: IPriceComponentResources = {\r\n priceRangeSeparator: resources.priceRangeSeparator,\r\n memberPriceMessage: resources.memberPriceMessage,\r\n saleMessage: resources.saleMessage\r\n };\r\n return (\r\n
    \r\n {products.map((product: ProductSearchResultExpanded, index: number) => (\r\n
  • \r\n \r\n ArrayExtensions.hasElements(dimensionAvailability) &&\r\n dimensionAvailability[0].masterProductId === product.MasterProductId\r\n )}\r\n wishlist={wishlist}\r\n wishlistInProductCard={wishlistInProductCard}\r\n />\r\n
  • \r\n ))}\r\n
\r\n );\r\n};\r\n","/*!\r\n * Copyright (c) Microsoft Corporation.\r\n * All rights reserved. See LICENSE in the project root for license information.\r\n */\r\n\r\n/* eslint-disable no-duplicate-imports */\r\nimport { ISliderLabel, ISliderThumbProps, Slider } from '@msdyn365-commerce-modules/utilities';\r\nimport debounce from 'lodash/debounce';\r\nimport { computed } from 'mobx';\r\nimport { observer } from 'mobx-react';\r\nimport * as React from 'react';\r\n\r\nimport { IRefineItemProps, IRefineItemState } from './refine-item';\r\n\r\ntype InputType = 'Min' | 'Max';\r\n\r\nexport type RangeRefineItemType = 'slider' | 'input';\r\n\r\n/**\r\n * Range refine item properties.\r\n */\r\nexport interface IRangeRefineItemProps extends IRefineItemProps {\r\n rangeType: RangeRefineItemType;\r\n minValueSliderThumbAriaLabel?: string;\r\n maxValueSliderThumbAriaLabel?: string;\r\n sliderKey?: string;\r\n}\r\n\r\n/**\r\n * Range refine item state.\r\n */\r\nexport interface IRangeRefineItemState extends IRefineItemState {\r\n validationErrorMin: string | undefined;\r\n validationErrorMax: string | undefined;\r\n selectedMin: string | undefined;\r\n selectedMax: string | undefined;\r\n touchedMin: boolean;\r\n touchedMax: boolean;\r\n sliderId: string;\r\n minValue: string | undefined;\r\n maxValue: string | undefined;\r\n labels: ISliderLabel[];\r\n sliderThumbs: ISliderThumbProps[];\r\n}\r\n\r\n/**\r\n * RangeRefineItem component (controlled by RefineSubmenu).\r\n */\r\n@observer\r\nexport default class RangeRefineItem extends React.Component {\r\n private readonly _formattedPriceReverseLookup: Map = new Map();\r\n\r\n private readonly minInput: React.RefObject;\r\n\r\n private readonly maxInput: React.RefObject;\r\n\r\n @computed get currencyCode(): string {\r\n return this.props.productRefinerValue.UnitText || '';\r\n }\r\n\r\n public constructor(props: IRangeRefineItemProps) {\r\n super(props);\r\n this._onRangeUpdate = this._onRangeUpdate.bind(this);\r\n this._onRangeUpdateEnd = this._onRangeUpdateEnd.bind(this);\r\n this._handleRangeTooltipText = this._handleRangeTooltipText.bind(this);\r\n this._changeMin = this._changeMin.bind(this);\r\n this._changeMax = this._changeMax.bind(this);\r\n this._finishChangeMin = this._finishChangeMin.bind(this);\r\n this._finishChangeMax = this._finishChangeMax.bind(this);\r\n\r\n this.minInput = React.createRef();\r\n this.maxInput = React.createRef();\r\n\r\n const { selectedRefinementCriterion } = this.props;\r\n const initialMin = selectedRefinementCriterion?.LeftValueBoundString ?? '0';\r\n const initialMax = selectedRefinementCriterion?.RightValueBoundString;\r\n const sliderId = `slider_${String(this.props.parentProductRefinerHierarchy.RecordId)}_${String(\r\n this.props.productRefinerValue.RefinerRecordId\r\n )}`;\r\n const minValue = this.props.productRefinerValue.LeftValueBoundString;\r\n const maxValue = this.props.productRefinerValue.RightValueBoundString;\r\n const minPrice = this._formatPrice(minValue);\r\n const maxPrice = this._formatPrice(maxValue);\r\n const labels: ISliderLabel[] = this.getLabels(sliderId, minPrice, maxPrice);\r\n const selectedMin =\r\n this.props.selectedRefinementCriterion?.LeftValueBoundString ?? this.props.productRefinerValue.LeftValueBoundString ?? '0';\r\n const selectedMax =\r\n this.props.selectedRefinementCriterion?.RightValueBoundString ??\r\n this.props.productRefinerValue.RightValueBoundString ??\r\n maxValue;\r\n const selectedMinPrice = this._formatPrice(selectedMin);\r\n const selectedMaxPrice = this._formatPrice(selectedMax);\r\n const sliderKeyString = this.props.sliderKey ? `_${String(this.props.sliderKey)}` : '';\r\n const sliderThumbs: ISliderThumbProps[] = this.getSliderThumbs(\r\n sliderId,\r\n sliderKeyString,\r\n selectedMin,\r\n selectedMinPrice,\r\n selectedMax,\r\n selectedMaxPrice,\r\n maxPrice\r\n );\r\n this.state = {\r\n isChecked: false,\r\n validationErrorMin: undefined,\r\n validationErrorMax: undefined,\r\n selectedMin: initialMin,\r\n selectedMax: initialMax,\r\n touchedMin: false,\r\n touchedMax: false,\r\n sliderId,\r\n minValue,\r\n maxValue,\r\n labels,\r\n sliderThumbs\r\n };\r\n }\r\n\r\n public shouldComponentUpdate(nextProps: IRangeRefineItemProps, nextState: IRangeRefineItemState): boolean {\r\n if (this.state === nextState && this.props === nextProps) {\r\n return false;\r\n }\r\n return true;\r\n }\r\n\r\n public componentDidUpdate(previousProps: IRangeRefineItemProps): void {\r\n if (previousProps !== this.props) {\r\n this.updateSliderProps();\r\n }\r\n }\r\n\r\n public render(): JSX.Element | undefined {\r\n const { productRefinerValue, parentProductRefinerHierarchy, refineItemCommonProps } = this.props;\r\n\r\n if (!productRefinerValue || !parentProductRefinerHierarchy) {\r\n refineItemCommonProps.telemetry.error(\r\n 'Cannot render refine value range without productRefinerValue and parentProductRefinerHierarchy'\r\n );\r\n return undefined;\r\n }\r\n\r\n if (this.props.rangeType === 'input') {\r\n return this._renderInputFields();\r\n }\r\n\r\n return this._renderSlider();\r\n }\r\n\r\n /**\r\n * Function to update slider props.\r\n */\r\n private updateSliderProps(): void {\r\n const sliderId = `slider_${String(this.props.parentProductRefinerHierarchy.RecordId)}_${String(\r\n this.props.productRefinerValue.RefinerRecordId\r\n )}`;\r\n const minValue = this.props.productRefinerValue.LeftValueBoundString;\r\n const maxValue = this.props.productRefinerValue.RightValueBoundString;\r\n const minPrice = this._formatPrice(minValue);\r\n const maxPrice = this._formatPrice(maxValue);\r\n const labels: ISliderLabel[] = this.getLabels(sliderId, minPrice, maxPrice);\r\n const selectedMin =\r\n this.props.selectedRefinementCriterion?.LeftValueBoundString ?? this.props.productRefinerValue.LeftValueBoundString ?? '0';\r\n const selectedMax =\r\n this.props.selectedRefinementCriterion?.RightValueBoundString ??\r\n this.props.productRefinerValue.RightValueBoundString ??\r\n maxValue;\r\n const selectedMinPrice = this._formatPrice(selectedMin);\r\n const selectedMaxPrice = this._formatPrice(selectedMax);\r\n const sliderKeyString = this.props.sliderKey ? `_${String(this.props.sliderKey)}` : '';\r\n const sliderThumbs: ISliderThumbProps[] = this.getSliderThumbs(\r\n sliderId,\r\n sliderKeyString,\r\n selectedMin,\r\n selectedMinPrice,\r\n selectedMax,\r\n selectedMaxPrice,\r\n maxPrice\r\n );\r\n this.setState({ sliderId, minValue, maxValue, labels, sliderThumbs });\r\n }\r\n\r\n /**\r\n * Function to create the labels for slider.\r\n * @param sliderId - Slider element id for the DOM.\r\n * @param minPrice - Slider min value.\r\n * @param maxPrice - Slider max value.\r\n * @returns Array labels.\r\n */\r\n private readonly getLabels = (sliderId: string, minPrice: string, maxPrice: string): ISliderLabel[] => {\r\n return [\r\n {\r\n labelId: `${sliderId}_start`,\r\n labelString: `${minPrice}`,\r\n labelPositioning: 'start'\r\n },\r\n {\r\n labelId: `${sliderId}_end`,\r\n labelString: `${maxPrice}`,\r\n labelPositioning: 'end'\r\n }\r\n ];\r\n };\r\n\r\n /**\r\n * Function to create the slider thumbs for slider.\r\n * @param sliderId - Slider element id for the DOM.\r\n * @param sliderKey - Unique key for slider.\r\n * @param selectedMin - Slider selected min value.\r\n * @param selectedMinPrice - Slider selected min price.\r\n * @param selectedMax - Slider selected max value.\r\n * @param selectedMaxPrice - Slider selected max price..\r\n * @param maxPrice - Slider max price..\r\n * @returns Slider Thumb Props.\r\n */\r\n private readonly getSliderThumbs = (\r\n sliderId: string,\r\n sliderKey: string,\r\n selectedMin: string,\r\n selectedMinPrice: string,\r\n selectedMax: string | undefined,\r\n selectedMaxPrice: string,\r\n maxPrice: string\r\n ): ISliderThumbProps[] => {\r\n const sliderThumbDefaultValue = 0;\r\n return [\r\n {\r\n id: `${sliderId}${sliderKey}_slider_thumb_start`,\r\n value: (selectedMin && Number(selectedMin)) || sliderThumbDefaultValue,\r\n ariaLabel: `${this.props.minValueSliderThumbAriaLabel ?? ''} ${this.currencyCode}`,\r\n ariaValueText: `${selectedMinPrice}`\r\n },\r\n {\r\n id: `${sliderId}${sliderKey}_slider_thumb_end`,\r\n value: Number(selectedMax) || Number(maxPrice),\r\n ariaLabel: `${this.props.maxValueSliderThumbAriaLabel ?? ''} ${this.currencyCode}`,\r\n ariaValueText: `${selectedMaxPrice}`\r\n }\r\n ];\r\n };\r\n\r\n private _renderInputFields(): JSX.Element | undefined {\r\n const { isDisabled, parentProductRefinerHierarchy, refineItemCommonProps } = this.props;\r\n const { selectedMin, selectedMax, touchedMin, touchedMax, validationErrorMin, validationErrorMax } = this.state;\r\n\r\n const rangeAriaLabel = (refineItemCommonProps.rangeNameFormat || '{0}').replace('{0}', parentProductRefinerHierarchy.KeyName || '');\r\n const formAttrs = {\r\n 'aria-label': rangeAriaLabel,\r\n 'aria-disabled': isDisabled\r\n };\r\n\r\n // To enable price formatting of selected fields, this is the approach:\r\n // initial value: min=0 formatted as price, max=undefined\r\n // onFocus/onChange: convert to number (unformat) and mark as touched to indicate value is being edited\r\n // onBlur: validate and format entered value as price\r\n const minInputClassName = `ms-refine-submenu__input-range refine-submenu__input-range-min ${\r\n validationErrorMin ? 'refine-submenu__input-range--error' : ''\r\n }`;\r\n const maxInputClassName = `ms-refine-submenu__input-range refine-submenu__input-range-max ${\r\n validationErrorMax ? 'refine-submenu__input-range--error' : ''\r\n }`;\r\n const minLabelClassName = 'ms-refine-submenu__input-range-label refine-submenu__input-range-label-min';\r\n const maxLabelClassName = 'ms-refine-submenu__input-range-label refine-submenu__input-range-label-max';\r\n const formattedSelectedMin = this._getFormattedSelectedValue(selectedMin, touchedMin, validationErrorMin);\r\n const formattedSelectedMax = this._getFormattedSelectedValue(selectedMax, touchedMax, validationErrorMax);\r\n return (\r\n
\r\n \r\n \r\n {validationErrorMin && (\r\n \r\n {validationErrorMin}\r\n \r\n )}\r\n {validationErrorMax && validationErrorMin !== validationErrorMax && (\r\n \r\n {validationErrorMax}\r\n \r\n )}\r\n
\r\n );\r\n }\r\n\r\n private _renderSlider(): JSX.Element | undefined {\r\n const { isDisabled, sliderKey } = this.props;\r\n const ariaAttributes = {\r\n 'aria-disabled': isDisabled\r\n };\r\n\r\n return (\r\n \r\n );\r\n }\r\n\r\n private _changeMin(event: React.FocusEvent): void {\r\n this._changeValue(event, 'Min');\r\n }\r\n\r\n private _changeMax(event: React.FocusEvent): void {\r\n this._changeValue(event, 'Max');\r\n }\r\n\r\n private _changeValue(event: React.FocusEvent, inputType: InputType): void {\r\n const selectedKey = `selected${inputType}`;\r\n const touchedKey = `touched${inputType}`;\r\n this.setState({\r\n [selectedKey]: this._getInputWithoutFormatting(event.currentTarget.value),\r\n [touchedKey]: true\r\n });\r\n }\r\n\r\n private _finishChangeMin(event: React.FocusEvent): boolean {\r\n const selectedMinValue = this._getInputWithoutFormatting(event.currentTarget.value);\r\n this.setState({\r\n selectedMin: selectedMinValue,\r\n minTouched: false\r\n });\r\n const minInput = Number(selectedMinValue);\r\n const {\r\n onToggle,\r\n parentProductRefinerHierarchy,\r\n productRefinerValue,\r\n refineItemCommonProps,\r\n selectedRefinementCriterion\r\n } = this.props;\r\n const max = (selectedRefinementCriterion && selectedRefinementCriterion.RightValueBoundString) || undefined;\r\n\r\n const maxNum = max ? Number(max) : undefined;\r\n\r\n if (isNaN(minInput)) {\r\n this.setState({ validationErrorMin: refineItemCommonProps.validationErrorNaN });\r\n this._focus('Min');\r\n return false;\r\n }\r\n\r\n if (this._validateRange(minInput, maxNum)) {\r\n onToggle({\r\n parentProductRefinerHierarchy,\r\n productRefinerValue,\r\n isSelecting: true,\r\n rangeStart: minInput,\r\n rangeEnd: maxNum\r\n });\r\n return true;\r\n }\r\n this._focus('Min');\r\n\r\n return false;\r\n }\r\n\r\n private _finishChangeMax(event: React.FocusEvent): boolean {\r\n const selectedMaxValue = this._getInputWithoutFormatting(event.currentTarget.value);\r\n this.setState({\r\n selectedMax: selectedMaxValue,\r\n maxTouched: false\r\n });\r\n const maxInput = Number(selectedMaxValue);\r\n const {\r\n onToggle,\r\n parentProductRefinerHierarchy,\r\n productRefinerValue,\r\n refineItemCommonProps,\r\n selectedRefinementCriterion\r\n } = this.props;\r\n const min = (selectedRefinementCriterion && selectedRefinementCriterion.LeftValueBoundString) || '0';\r\n\r\n const minNum = Number(min);\r\n\r\n if (isNaN(maxInput)) {\r\n this.setState({ validationErrorMax: refineItemCommonProps.validationErrorNaN });\r\n this._focus('Max');\r\n return false;\r\n }\r\n\r\n if (this._validateRange(minNum, maxInput)) {\r\n if (productRefinerValue) {\r\n onToggle({\r\n parentProductRefinerHierarchy,\r\n productRefinerValue,\r\n isSelecting: true,\r\n rangeStart: minNum,\r\n rangeEnd: maxInput\r\n });\r\n } else {\r\n this._focus('Max');\r\n }\r\n return true;\r\n }\r\n\r\n return false;\r\n }\r\n\r\n private _focus(inputType: InputType): void {\r\n const ref = inputType === 'Max' ? this.maxInput : this.minInput;\r\n\r\n setTimeout(() => {\r\n if (ref && ref.current) {\r\n ref.current.focus();\r\n }\r\n }, 50);\r\n }\r\n\r\n private _getFormattedSelectedValue(\r\n selected: string | undefined,\r\n touched: boolean,\r\n validationError: string | undefined\r\n ): string | undefined {\r\n if (touched || validationError || selected === undefined) {\r\n return selected;\r\n }\r\n return this._formatPrice(selected);\r\n }\r\n\r\n private _validateRange(min: number, max: number | undefined): boolean {\r\n const { refineItemCommonProps } = this.props;\r\n if (max === undefined) {\r\n return true;\r\n }\r\n\r\n if (min > max) {\r\n this.setState({\r\n validationErrorMin: refineItemCommonProps.validationErrorRange,\r\n validationErrorMax: refineItemCommonProps.validationErrorRange\r\n });\r\n return false;\r\n }\r\n\r\n return true;\r\n }\r\n\r\n private _formatPrice(amount: string | undefined): string {\r\n if (this.props.productRefinerValue.RefinerRecordId === 0) {\r\n const result = this.props.context.cultureFormatter.formatCurrency(Number(amount), this.currencyCode);\r\n return result;\r\n }\r\n return amount || '';\r\n }\r\n\r\n private _getInputWithoutFormatting(input: string): string {\r\n // First try to cast raw input to a number\r\n const inputAsNum = Number(input);\r\n if (!isNaN(inputAsNum)) {\r\n return input;\r\n }\r\n\r\n // Otherwise try a reverse lookup and fall back to the raw input if all else fails\r\n const reverseLookupResult = this._formattedPriceReverseLookup.get(input);\r\n return reverseLookupResult || input;\r\n }\r\n\r\n // NOTE: Fix types once Shared Components build pipeline bug fixed\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n private _onRangeUpdate(sliderChangeNotification: any): void {\r\n // Need to filter out mousemove events as these cause errors after the menu updates and slider re-renders\r\n if (sliderChangeNotification.eventType !== 'mousemove') {\r\n const { onToggle, parentProductRefinerHierarchy, productRefinerValue } = this.props;\r\n if (productRefinerValue && sliderChangeNotification) {\r\n onToggle({\r\n parentProductRefinerHierarchy,\r\n productRefinerValue,\r\n isSelecting: true,\r\n rangeStart: sliderChangeNotification.firstThumbValue,\r\n rangeEnd: sliderChangeNotification.secondThumbValue\r\n });\r\n\r\n this._focusOnSliderThumb(sliderChangeNotification);\r\n }\r\n }\r\n }\r\n\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n private _onRangeUpdateEnd(sliderChangeNotification: any): void {\r\n const { onToggle, parentProductRefinerHierarchy, productRefinerValue } = this.props;\r\n if (productRefinerValue && sliderChangeNotification) {\r\n onToggle({\r\n parentProductRefinerHierarchy,\r\n productRefinerValue,\r\n isSelecting: true,\r\n rangeStart: sliderChangeNotification.firstThumbValue,\r\n rangeEnd: sliderChangeNotification.secondThumbValue\r\n });\r\n\r\n this._focusOnSliderThumb(sliderChangeNotification);\r\n }\r\n }\r\n\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n private _focusOnSliderThumb(sliderChangeNotification: any): void {\r\n if (sliderChangeNotification.id) {\r\n const element = document.getElementById(`${sliderChangeNotification.id}range`);\r\n if (element) {\r\n setTimeout(() => {\r\n element.focus();\r\n }, 0);\r\n }\r\n }\r\n }\r\n\r\n private _handleRangeTooltipText(tooltip: number): string {\r\n return this._formatPrice(`${tooltip}`);\r\n }\r\n}\r\n","/*!\r\n * Copyright (c) Microsoft Corporation.\r\n * All rights reserved. See LICENSE in the project root for license information.\r\n */\r\n\r\n/* eslint-disable no-duplicate-imports */\r\nimport { IProductRefinerHierarchy } from '@msdyn365-commerce/commerce-entities';\r\nimport { RatingComponent, SwatchComponent } from '@msdyn365-commerce/components';\r\nimport { IAny, ICoreContext, IGeneric } from '@msdyn365-commerce/core';\r\nimport { ProductRefinerSource, ProductRefinerValue, RefinerType } from '@msdyn365-commerce/retail-proxy';\r\nimport { checkIfShouldDisplayAsSwatch, DimensionTypes, IDimensionsApp, StringExtensions } from '@msdyn365-commerce-modules/retail-actions';\r\nimport { format, getPayloadObject, getTelemetryAttributes, IPayLoad, ITelemetryContent } from '@msdyn365-commerce-modules/utilities';\r\nimport classnames from 'classnames';\r\nimport * as React from 'react';\r\n\r\nimport { IRefineItemCommonProps } from './refine-item.props.common';\r\nimport { IRefineItemToggleNotification } from './refine-item-toggle-notification';\r\n\r\n/**\r\n * RefineItem properties.\r\n */\r\nexport interface IRefineItemProps {\r\n parentProductRefinerHierarchy: IProductRefinerHierarchy;\r\n productRefinerValue: ProductRefinerValue;\r\n selectedRefinementCriterion: ProductRefinerValue | undefined;\r\n selectedRefinerValues?: ProductRefinerValue[];\r\n refineItemCommonProps: IRefineItemCommonProps;\r\n isDisabled: boolean;\r\n context: ICoreContext>;\r\n moduleId: string;\r\n moduleTypeName: string;\r\n index?: number;\r\n productCountAriaLabel?: string;\r\n singleProductCountAriaLabel?: string;\r\n refineItemAriaLabel?: string;\r\n refineItemsAriaLabel?: string;\r\n isMobileView?: boolean;\r\n\r\n /**\r\n * The telemetry content\r\n */\r\n telemetryContent?: ITelemetryContent;\r\n onToggle(notfication: Readonly): void;\r\n urlBuilder(refiner: IRefineItemToggleNotification): string;\r\n}\r\n\r\n/**\r\n * Refine item state.\r\n */\r\nexport interface IRefineItemState extends React.ComponentState {\r\n isChecked: boolean;\r\n renderingError?: object;\r\n}\r\n\r\n/**\r\n * Single-select and multi-select refine item component (controlled by RefineSubmenu).\r\n */\r\nexport default class RefineItem extends React.Component {\r\n private readonly anchorType: React.RefObject;\r\n\r\n private readonly payLoad: IPayLoad;\r\n\r\n public constructor(props: IRefineItemProps) {\r\n super(props);\r\n this._onClick = this._onClick.bind(this);\r\n this.state = {\r\n isChecked: !!this.props.selectedRefinementCriterion\r\n };\r\n this.anchorType = React.createRef();\r\n this.payLoad = getPayloadObject('click', this.props.telemetryContent!, '');\r\n }\r\n\r\n public shouldComponentUpdate(nextProps: IRefineItemProps, nextState: IRefineItemState): boolean {\r\n if (this.state === nextState && this.props === nextProps) {\r\n return false;\r\n }\r\n return true;\r\n }\r\n\r\n public render(): JSX.Element | undefined {\r\n const {\r\n isDisabled,\r\n refineItemCommonProps,\r\n parentProductRefinerHierarchy,\r\n productRefinerValue,\r\n selectedRefinementCriterion,\r\n productCountAriaLabel,\r\n singleProductCountAriaLabel,\r\n index,\r\n children,\r\n onToggle,\r\n context,\r\n telemetryContent,\r\n refineItemAriaLabel,\r\n refineItemsAriaLabel,\r\n ...attrs\r\n } = this.props;\r\n if (!productRefinerValue) {\r\n refineItemCommonProps.telemetry.error('[refine-item] Cannot render refineItem without productRefinerValue');\r\n return undefined;\r\n }\r\n if (!productRefinerValue.LeftValueBoundString) {\r\n refineItemCommonProps.telemetry.warning(\r\n `[refine-item] RefineItem without LeftValueBoundString: ${JSON.stringify(productRefinerValue)}`\r\n );\r\n }\r\n const isSingleSelect = parentProductRefinerHierarchy.RefinerTypeValue === RefinerType.SingleSelect;\r\n let itemTypeClassName = isSingleSelect ? 'single-select' : 'multi-select';\r\n itemTypeClassName = `ms-refine-submenu-item ${itemTypeClassName}`;\r\n const inputType = isSingleSelect ? 'radio' : 'checkbox';\r\n const isChecked = !!selectedRefinementCriterion;\r\n itemTypeClassName = isChecked ? `${itemTypeClassName}-checked` : itemTypeClassName;\r\n if (parentProductRefinerHierarchy.SourceValue === ProductRefinerSource.Rating) {\r\n return this._renderRating(\r\n productRefinerValue,\r\n parentProductRefinerHierarchy,\r\n isChecked,\r\n context,\r\n index,\r\n telemetryContent,\r\n productCountAriaLabel,\r\n singleProductCountAriaLabel\r\n );\r\n }\r\n this.payLoad.contentAction.etext = productRefinerValue.LeftValueBoundLocalizedString ?? productRefinerValue.LeftValueBoundString;\r\n const attribute = getTelemetryAttributes(telemetryContent!, this.payLoad);\r\n // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing -- Replace with actual value for empty string.\r\n const productText = productRefinerValue.LeftValueBoundLocalizedString || productRefinerValue.LeftValueBoundString || '';\r\n // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing -- Replace with actual value for empty string.\r\n const productCount = productRefinerValue.Count || 0;\r\n let refineMenuItemAriaLabel;\r\n if (productCount === 1) {\r\n refineMenuItemAriaLabel = refineItemAriaLabel\r\n ? format(refineItemAriaLabel, parentProductRefinerHierarchy.KeyName, productText)\r\n : '';\r\n } else {\r\n refineMenuItemAriaLabel = refineItemsAriaLabel\r\n ? format(refineItemsAriaLabel, parentProductRefinerHierarchy.KeyName, productText, productCount)\r\n : '';\r\n }\r\n\r\n const dimensionType = (this.props.parentProductRefinerHierarchy.KeyName?.toLocaleLowerCase() ?? '') as DimensionTypes;\r\n const shouldDisplayAsSwatch = this._getShouldDisplayAsSwatch(dimensionType);\r\n\r\n let className = 'ms-refine-submenu-item';\r\n if (shouldDisplayAsSwatch) {\r\n className = classnames(className, `ms-refine-submenu-item__dimension__${dimensionType}`);\r\n }\r\n\r\n // If the swatch has no color or image specified, it should be displayed as text.\r\n // We don't use swatch logic to display the number of the results found together with the text.\r\n const hasColor = !StringExtensions.isNullOrWhitespace(productRefinerValue.SwatchColorHexCode);\r\n const hasImage = !StringExtensions.isNullOrWhitespace(productRefinerValue.SwatchImageUrl);\r\n const hasContentSwatch = hasColor || hasImage;\r\n\r\n return (\r\n
  • \r\n \r\n {hasContentSwatch && shouldDisplayAsSwatch && this._renderSwatch(dimensionType)}\r\n \r\n \r\n
  • \r\n );\r\n }\r\n\r\n private _getShouldDisplayAsSwatch(dimensionType: DimensionTypes) {\r\n const shouldDisplayAsSwatch = checkIfShouldDisplayAsSwatch(dimensionType, this.props.context as ICoreContext);\r\n return shouldDisplayAsSwatch;\r\n }\r\n\r\n private _renderSwatch(dimensionType: DimensionTypes): JSX.Element | null {\r\n const productRefinerValue = this.props.productRefinerValue;\r\n\r\n // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing -- Replace with actual value for empty string.\r\n const text = productRefinerValue.LeftValueBoundLocalizedString || productRefinerValue.LeftValueBoundString || '';\r\n const swatchItems = [\r\n {\r\n itemId: `${productRefinerValue.RefinerRecordId ?? ''}-${dimensionType}-${text}`,\r\n value: text,\r\n dimensionType,\r\n colorHexCode: productRefinerValue.SwatchColorHexCode,\r\n imageUrl: productRefinerValue.SwatchImageUrl\r\n }\r\n ];\r\n\r\n return (\r\n \r\n );\r\n }\r\n\r\n private _getRefinerUrl(): string {\r\n const { urlBuilder, parentProductRefinerHierarchy, productRefinerValue, selectedRefinementCriterion } = this.props;\r\n\r\n if (productRefinerValue) {\r\n return urlBuilder({\r\n parentProductRefinerHierarchy,\r\n productRefinerValue,\r\n isSelecting: !selectedRefinementCriterion\r\n });\r\n }\r\n\r\n return '';\r\n }\r\n\r\n private readonly _onClick = (e: React.MouseEvent): void => {\r\n e.preventDefault();\r\n\r\n const { parentProductRefinerHierarchy, productRefinerValue, selectedRefinementCriterion } = this.props;\r\n if (productRefinerValue) {\r\n this.props.onToggle({\r\n parentProductRefinerHierarchy,\r\n productRefinerValue,\r\n isSelecting: !selectedRefinementCriterion\r\n });\r\n\r\n setTimeout(() => {\r\n this.anchorType.current && this.anchorType.current.focus();\r\n }, 0);\r\n }\r\n };\r\n\r\n private _renderRating(\r\n productRefinerValue: ProductRefinerValue,\r\n parentProductRefinerHierarchy: IProductRefinerHierarchy,\r\n isChecked: boolean,\r\n context: ICoreContext,\r\n index?: number,\r\n telemetryContent?: ITelemetryContent,\r\n ratingUserCountAriaLabel?: string,\r\n ratingSingleUserCountAriaLabel?: string\r\n ): JSX.Element | undefined {\r\n if (productRefinerValue.LeftValueBoundString) {\r\n this.payLoad.contentAction.etext = productRefinerValue.LeftValueBoundLocalizedString;\r\n const attribute = getTelemetryAttributes(telemetryContent!, this.payLoad);\r\n const refinerRating = Number.parseInt(productRefinerValue.LeftValueBoundString, 10);\r\n const ratingRefiner = this.props.selectedRefinerValues?.find(\r\n value => value.DataTypeValue === productRefinerValue.DataTypeValue\r\n );\r\n // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing -- Replace with actual value for empty string.\r\n const selectedRating = Number.parseInt(ratingRefiner?.LeftValueBoundString || '0', 10);\r\n const defaultChkProductCount = 1;\r\n let ratingComponentClass: string = 'ms-rating-component';\r\n if (refinerRating > selectedRating) {\r\n ratingComponentClass = `${ratingComponentClass}__up`;\r\n } else if (refinerRating < selectedRating) {\r\n ratingComponentClass = `${ratingComponentClass}__down`;\r\n } else {\r\n ratingComponentClass = `${ratingComponentClass}__current`;\r\n }\r\n const productCountAriaLabelValue =\r\n productRefinerValue.Count !== undefined && productRefinerValue.Count === defaultChkProductCount\r\n ? ratingSingleUserCountAriaLabel && format(ratingSingleUserCountAriaLabel, productRefinerValue.Count)\r\n : ratingUserCountAriaLabel && format(ratingUserCountAriaLabel, productRefinerValue.Count);\r\n return (\r\n \r\n \r\n \r\n \r\n {productRefinerValue.Count !== undefined && `(${productRefinerValue.Count})`}\r\n \r\n \r\n \r\n );\r\n }\r\n return undefined;\r\n }\r\n}\r\n","/*!\r\n * Copyright (c) Microsoft Corporation.\r\n * All rights reserved. See LICENSE in the project root for license information.\r\n */\r\n\r\n/* eslint-disable no-duplicate-imports */\r\nimport { IProductRefinerHierarchy } from '@msdyn365-commerce/commerce-entities';\r\nimport { IAny, ICoreContext, IGeneric } from '@msdyn365-commerce/core';\r\nimport { DisplayTemplate, ProductRefinerSource, ProductRefinerValue, RefinerType } from '@msdyn365-commerce/retail-proxy';\r\nimport { Button, Collapse, ITelemetryContent } from '@msdyn365-commerce-modules/utilities';\r\nimport classnames from 'classnames';\r\nimport * as React from 'react';\r\n\r\nimport RangeRefineItem, { RangeRefineItemType } from './range-refine-item';\r\nimport RefineItem from './refine-item';\r\nimport { IRefineItemCommonProps } from './refine-item.props.common';\r\nimport { IRefineItemToggleNotification } from './refine-item-toggle-notification';\r\nimport { findMatchingRefinementCriterion, isRangeType } from './utilities';\r\n\r\n/**\r\n * Properties associated with the RefineSubmenu component.\r\n */\r\nexport interface IRefineSubmenuProps {\r\n tempRangeTypeTODO: RangeRefineItemType;\r\n minValueSliderThumbAriaLabel?: string;\r\n maxValueSliderThumbAriaLabel?: string;\r\n productRefinerHierarchy: IProductRefinerHierarchy;\r\n selectedRefinerValues: ProductRefinerValue[];\r\n refineItemCommonProps: IRefineItemCommonProps;\r\n isDisabled: boolean;\r\n isExpandedOnInitialLoad: boolean;\r\n context: ICoreContext>;\r\n moduleId: string;\r\n moduleTypeName: string;\r\n productCountAriaLabel?: string;\r\n singleProductCountAriaLabel?: string;\r\n refineItemAriaLabel?: string;\r\n refineItemsAriaLabel?: string;\r\n colorRefinerLabel?: string;\r\n sizeRefinerLabel?: string;\r\n isMobile?: boolean;\r\n\r\n /**\r\n * The telemetry content\r\n */\r\n telemetryContent?: ITelemetryContent;\r\n onUpdateRefiners(notfication: Readonly): void;\r\n urlBuilder(refiner: IRefineItemToggleNotification): string;\r\n}\r\n\r\n/**\r\n * Refine submenu state.\r\n */\r\nexport interface IRefineSubmenuState extends React.ComponentState {\r\n expanded: boolean;\r\n}\r\n\r\n/**\r\n *\r\n * The RefineSubmenu component renders the submenu category and child items.\r\n * This computed observes the stateful category hierarchy object.\r\n * @extends {React.PureComponent}\r\n */\r\nclass RefineSubmenu extends React.Component {\r\n constructor(props: IRefineSubmenuProps) {\r\n super(props);\r\n\r\n this._onToggleItem = this._onToggleItem.bind(this);\r\n this._onToggleSubmenu = this._onToggleSubmenu.bind(this);\r\n\r\n const isExpanded = this.props.isExpandedOnInitialLoad;\r\n\r\n // If (this.props.productRefinerHierarchy.DataTypeValue === ProductRefinerValueDataTypeValue.Range) {\r\n // isExpanded = true;\r\n // }\r\n\r\n this.state = {\r\n expanded: isExpanded\r\n };\r\n }\r\n\r\n public shouldComponentUpdate(nextProps: IRefineSubmenuProps, nextState: IRefineSubmenuState): boolean {\r\n if (this.state === nextState && this.props === nextProps) {\r\n return false;\r\n }\r\n return true;\r\n }\r\n\r\n public render(): JSX.Element | null {\r\n const { productRefinerHierarchy, refineItemCommonProps } = this.props;\r\n\r\n if (!productRefinerHierarchy) {\r\n refineItemCommonProps.telemetry.error('Cannot render submenu without refiner hierarchy data');\r\n }\r\n\r\n //Use the translation resources for attributes, which cannot just be translated normally\r\n var label = '';\r\n switch (productRefinerHierarchy.KeyName) {\r\n case 'Color':\r\n label = this.props.colorRefinerLabel ?? 'Color';\r\n break;\r\n case 'Size':\r\n label = this.props.sizeRefinerLabel ?? 'Size';\r\n break;\r\n default:\r\n label = productRefinerHierarchy.KeyName ?? '';\r\n }\r\n\r\n if (productRefinerHierarchy.SourceValue === ProductRefinerSource.Rating && this.props.context.app.config.hideRating) {\r\n return null;\r\n }\r\n\r\n const className = classnames(\r\n 'ms-refine-submenu',\r\n 'list-group',\r\n productRefinerHierarchy.KeyName // Deprecated because of the localization issues. Leaving for backward compatibility reasons.\r\n );\r\n\r\n return (\r\n
    \r\n \r\n {label}\r\n \r\n \r\n {this._renderChildItems(productRefinerHierarchy)}\r\n \r\n
    \r\n );\r\n }\r\n\r\n private _renderChildItems(productRefinerHierarchy: IProductRefinerHierarchy): JSX.Element | null {\r\n if (isRangeType(productRefinerHierarchy.DataTypeValue)) {\r\n return this._renderRange(productRefinerHierarchy);\r\n }\r\n return this._renderSingleMultiSelect(productRefinerHierarchy);\r\n }\r\n\r\n private _renderSingleMultiSelect(productRefinerHierarchy: IProductRefinerHierarchy): JSX.Element | null {\r\n const {\r\n isDisabled,\r\n refineItemCommonProps,\r\n selectedRefinerValues,\r\n context,\r\n productCountAriaLabel,\r\n singleProductCountAriaLabel,\r\n refineItemAriaLabel,\r\n refineItemsAriaLabel,\r\n isMobile\r\n } = this.props;\r\n const isSingleSelect =\r\n productRefinerHierarchy.RefinerTypeValue === RefinerType.SingleSelect &&\r\n productRefinerHierarchy.SourceValue === ProductRefinerSource.Rating;\r\n const role = isSingleSelect ? { role: 'listbox' } : undefined;\r\n const refinerValuesList = productRefinerHierarchy.Values || [];\r\n const listItems = refinerValuesList.map((child: ProductRefinerValue, index: number) => {\r\n if (!child) {\r\n refineItemCommonProps.telemetry.error(\r\n `[refine-submenu] Could not render refine item for refiner ${productRefinerHierarchy.RecordId} (${productRefinerHierarchy.KeyName})`\r\n );\r\n return null;\r\n }\r\n\r\n const selectedRefinementCriterion = findMatchingRefinementCriterion(child, selectedRefinerValues);\r\n\r\n return (\r\n \r\n refinerValuesList.find(value => value.RefinerRecordId === selectedValue.RefinerRecordId)\r\n )}\r\n refineItemCommonProps={refineItemCommonProps}\r\n onToggle={this._onToggleItem}\r\n urlBuilder={this.props.urlBuilder}\r\n isDisabled={isDisabled}\r\n key={index}\r\n index={index}\r\n context={context}\r\n moduleId={this.props.moduleId}\r\n moduleTypeName={this.props.moduleTypeName}\r\n telemetryContent={this.props.telemetryContent}\r\n productCountAriaLabel={productCountAriaLabel}\r\n refineItemAriaLabel={refineItemAriaLabel}\r\n refineItemsAriaLabel={refineItemsAriaLabel}\r\n singleProductCountAriaLabel={singleProductCountAriaLabel}\r\n isMobileView={isMobile}\r\n />\r\n );\r\n });\r\n return (\r\n \r\n {listItems}\r\n \r\n );\r\n }\r\n\r\n private _getRangeType(productRefinerHierarchy: IProductRefinerHierarchy): 'input' | 'slider' {\r\n if (\r\n productRefinerHierarchy.DisplayTemplateValue === DisplayTemplate.Range ||\r\n productRefinerHierarchy.DisplayTemplateValue === DisplayTemplate.Slider ||\r\n productRefinerHierarchy.DisplayTemplateValue === DisplayTemplate.SliderWithBars\r\n ) {\r\n return 'slider';\r\n }\r\n return 'input';\r\n }\r\n\r\n private _renderRange(productRefinerHierarchy: IProductRefinerHierarchy): JSX.Element | null {\r\n const {\r\n isDisabled,\r\n refineItemCommonProps,\r\n selectedRefinerValues,\r\n context,\r\n minValueSliderThumbAriaLabel,\r\n maxValueSliderThumbAriaLabel\r\n } = this.props;\r\n const submenuClassNamePrefix = 'ms-refine-submenu__item list-group-item refine-submenu__item';\r\n const refinerValuesList = productRefinerHierarchy.Values || [];\r\n const listItems = refinerValuesList.map((child: ProductRefinerValue, index: number) => {\r\n if (!child) {\r\n refineItemCommonProps.telemetry.error(\r\n `Could not render refine item for refiner ${productRefinerHierarchy.RecordId} (${productRefinerHierarchy.KeyName})`\r\n );\r\n return null;\r\n }\r\n\r\n const selectedRefinementCriterion = findMatchingRefinementCriterion(child, selectedRefinerValues);\r\n\r\n const rangeType = this._getRangeType(productRefinerHierarchy);\r\n const key = selectedRefinementCriterion\r\n ? `${selectedRefinementCriterion.LeftValueBoundString}-${selectedRefinementCriterion.RightValueBoundString}`\r\n : `not-selected-${index}`;\r\n return (\r\n
  • \r\n \r\n
  • \r\n );\r\n });\r\n return
      {listItems}
    ;\r\n }\r\n\r\n private _onToggleItem(itemToggleNotification: IRefineItemToggleNotification): void {\r\n this.props.onUpdateRefiners(itemToggleNotification);\r\n }\r\n\r\n private _onToggleSubmenu(): void {\r\n this.setState(prevState => ({\r\n expanded: !prevState.expanded\r\n }));\r\n }\r\n}\r\n\r\nexport default RefineSubmenu;\r\n","/*!\r\n * Copyright (c) Microsoft Corporation.\r\n * All rights reserved. See LICENSE in the project root for license information.\r\n */\r\n\r\n/* eslint-disable no-duplicate-imports */\r\nimport * as React from 'react';\r\n\r\ninterface ISeparator {\r\n separator: string;\r\n}\r\n\r\nexport const Separator: React.FC = ({ separator }) => (\r\n \r\n {` `}\r\n {separator}\r\n {` `}\r\n \r\n);\r\n","/*!\r\n * Copyright (c) Microsoft Corporation.\r\n * All rights reserved. See LICENSE in the project root for license information.\r\n */\r\n\r\n/* eslint-disable no-duplicate-imports */\r\nimport * as React from 'react';\r\n\r\ninterface ITitle {\r\n className: string;\r\n text: string;\r\n}\r\n\r\nexport const Title: React.FC = ({ text, className }) => (\r\n \r\n {` `}\r\n {text}\r\n {` `}\r\n \r\n);\r\n","/**\r\n * Copyright (c) Microsoft Corporation\r\n * All rights reserved. See License.txt in the project root for license information.\r\n * IExtSearchResultContainer 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 IExtSearchResultContainerConfig 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 clientRender?: boolean;\r\n wishlistInProductCard?: boolean;\r\n categoryDescription?: boolean;\r\n}\r\n\r\nexport interface IExtSearchResultContainerResources {\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 memberPriceMessage: string;\r\n saleMessage: string;\r\n colorRefinerLabel: string;\r\n sizeRefinerLabel: string;\r\n}\r\n\r\nexport interface IExtSearchResultContainerProps extends Msdyn365.IModule {\r\n resources: IExtSearchResultContainerResources;\r\n config: IExtSearchResultContainerConfig;\r\n slots: {\r\n quickview: React.ReactNode[];\r\n productComparisonButton: React.ReactNode[];\r\n };\r\n}\r\n","/*!\r\n * Copyright (c) Microsoft Corporation.\r\n * All rights reserved. See LICENSE in the project root for license information.\r\n */\r\n\r\n/* eslint-disable no-duplicate-imports */\r\nimport {\r\n CategoryHierarchy as CategoryHierarchyData,\r\n IProductRefinerHierarchy,\r\n IProductsDimensionsAvailabilities\r\n} from '@msdyn365-commerce/commerce-entities';\r\nimport MsDyn365, { getCatalogId, ICoreContext } from '@msdyn365-commerce/core';\r\nimport {\r\n ChannelInventoryConfiguration,\r\n format,\r\n ProductPrice,\r\n ProductRefinerValue,\r\n SortColumn,\r\n StoreOperationsDataActions,\r\n TextValueTranslation\r\n} from '@msdyn365-commerce/retail-proxy';\r\nimport {\r\n ArrayExtensions,\r\n DimensionAvailabilitiesForProductSearchResultInput,\r\n DimensionTypes,\r\n DimensionSwatchDisplayTypes,\r\n getDimensionAvailabilitiesForProductSearchResultAction,\r\n IDimensionsApp,\r\n PriceForProductSearchResultInput\r\n} from '@msdyn365-commerce-modules/retail-actions';\r\nimport {\r\n getTelemetryObject,\r\n ILabeledDropdownOnChangeNotification,\r\n ILabeledDropdownOption,\r\n IModuleProps,\r\n INodeProps,\r\n isMobile,\r\n ITelemetryContent,\r\n LabeledDropdown,\r\n UncontrolledPagination,\r\n VariantType\r\n} from '@msdyn365-commerce-modules/utilities';\r\nimport classnames from 'classnames';\r\nimport { computed, observable, reaction, transaction } from 'mobx';\r\nimport { observer } from 'mobx-react';\r\nimport * as React from 'react';\r\n\r\nimport {\r\n buildListPageUrl,\r\n getCollectionProducts,\r\n getCollectionRefinersAction,\r\n getCurrentUrl,\r\n GetFullProductsByCollectionInput,\r\n IFullProductsSearchResultsWithCount,\r\n parseQueryParam,\r\n ProductListInventoryFilteringOptions,\r\n RefinersByCollectionInput,\r\n sortOptions\r\n} from './actions';\r\nimport { hydrateRefinersFromUrl } from './actions/url-utils';\r\nimport {\r\n ErrorMessage,\r\n FeatureSearchResultItem,\r\n getUpdatedRefinementCriteria,\r\n IChoiceSummaryClickNotification,\r\n IRefineItemCommonProps,\r\n IRefineItemToggleNotification,\r\n ISearchResultModalViewProps,\r\n isMatchingRefinementCriterion,\r\n Link,\r\n ModalToggle,\r\n ProductSearchResultItems,\r\n SearchResultModal,\r\n Separator,\r\n Title\r\n} from './components';\r\nimport ChoiceSummary from './components/choice-summary';\r\nimport RefineSubmenu from './components/refine-submenu';\r\nimport { ListPageState } from './list-page-state';\r\nimport { IExtSearchResultContainerData } from './ext-search-result-container.data';\r\nimport { expandRefinersCount, IExtSearchResultContainerProps } from './ext-search-result-container.props.autogenerated';\r\nimport { getPriceForProductSearchResultAction } from '../../actions/get-price-for-product-search-result';\r\n\r\nexport interface ISearchResultContainerViewProps extends IExtSearchResultContainerProps {\r\n products?: React.ReactNode;\r\n className?: string;\r\n SearchResultContainer: IModuleProps;\r\n TitleViewProps: ITitleViewProps;\r\n categoryHierarchy: ICategoryHierarchyViewProps;\r\n pagination?: React.ReactNode;\r\n ProductsContainer: INodeProps;\r\n ProductSectionContainer: INodeProps;\r\n refineMenu: IRefineMenuViewProps;\r\n sortByOptions: ISortByViewProps;\r\n choiceSummary?: React.ReactNode;\r\n modalToggle: React.ReactNode;\r\n searchResultModal: ISearchResultModalViewProps;\r\n isMobile: boolean;\r\n CategoryNavContainer: INodeProps;\r\n RefineAndProductSectionContainer: INodeProps;\r\n errorMessage: React.ReactNode;\r\n FeatureSearchContainer: INodeProps;\r\n similarLookProduct?: React.ReactNode;\r\n productPrices?: ProductPrice[];\r\n productsDimensionAvailabilities?: IProductsDimensionsAvailabilities[][];\r\n}\r\n\r\nexport interface ITitleViewProps {\r\n TitleContainer: INodeProps;\r\n title: ISearchResultTitle;\r\n}\r\n\r\nexport interface IRefineMenuViewProps {\r\n RefineMenuContainer: INodeProps;\r\n RefinerSectionContainer: INodeProps;\r\n refiners?: React.ReactNode[];\r\n}\r\n\r\nexport interface ICategoryHierarchyViewProps {\r\n categoryHierarchyList?: React.ReactNode[];\r\n categoryHierarchySeparator?: React.ReactNode;\r\n CategoryHierarchyContainer: INodeProps;\r\n}\r\n\r\nexport interface ISortByViewProps {\r\n SortingContainer: INodeProps;\r\n sortByDropDown?: React.ReactNode;\r\n}\r\n\r\nexport type GridSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';\r\n\r\n/**\r\n * Title component for search result container.\r\n */\r\nexport interface ISearchResultTitle {\r\n titlePrefix?: React.ReactNode;\r\n titleText?: React.ReactNode;\r\n titleCount?: React.ReactNode;\r\n}\r\n\r\nexport interface ISearchResultContainerState {\r\n sortingState: ISortByCollectionState;\r\n modalIsOpen: boolean;\r\n refiners: IProductRefinerHierarchy[];\r\n productsDimensionAvailabilities?: IProductsDimensionsAvailabilities[][];\r\n channelInventoryConfiguration?: ChannelInventoryConfiguration;\r\n}\r\n\r\ninterface ISortByCollectionState {\r\n selectedSortByOption: ILabeledDropdownOption;\r\n pending: boolean;\r\n}\r\n\r\n/**\r\n *\r\n * SearchResultContainer component.\r\n * @extends {React.PureComponent>}\r\n */\r\n@observer\r\nexport default class SearchResultContainer extends React.PureComponent<\r\n IExtSearchResultContainerProps,\r\n ISearchResultContainerState\r\n> {\r\n @computed get isMobile(): boolean {\r\n return this._viewport === 'xs' || this._viewport === 'sm';\r\n }\r\n\r\n private readonly sortByDropdownOptions: ILabeledDropdownOption[] = [\r\n { key: sortOptions.sortByOptionRelevanceDesc, value: this.props.resources.sortByOptionRelevanceDesc },\r\n { key: sortOptions.sortByOptionNameAsc, value: this.props.resources.sortByOptionNameAsc },\r\n { key: sortOptions.sortByOptionNameDesc, value: this.props.resources.sortByOptionNameDesc },\r\n { key: sortOptions.sortByOptionPriceAsc, value: this.props.resources.sortByOptionPriceAsc },\r\n { key: sortOptions.sortByOptionPriceDesc, value: this.props.resources.sortByOptionPriceDesc },\r\n { key: sortOptions.sortByOptionRatingDesc, value: this.props.resources.sortByOptionRatingDesc },\r\n { key: sortOptions.sortByOptionBestSelling, value: this.props.resources.sortByOptionBestSelling },\r\n { key: sortOptions.sortByOptionNewScore, value: this.props.resources.sortByOptionNewScore },\r\n { key: sortOptions.sortByOptionTrendingScore, value: this.props.resources.sortByOptionTrendingScore }\r\n ];\r\n\r\n private readonly _refineItemCommonProps: IRefineItemCommonProps;\r\n\r\n private readonly _pageType: string | undefined = this.props.context.request.urlTokens.pageType;\r\n\r\n @observable\r\n private _viewport: GridSize = 'lg';\r\n\r\n private readonly _modalToggleRef: React.RefObject;\r\n\r\n private readonly _sortAndFilterContainerRef: React.RefObject;\r\n\r\n private expandrefinerCount: number | undefined = 0;\r\n\r\n private readonly telemetryContent: ITelemetryContent;\r\n\r\n private readonly productPrices: ProductPrice[];\r\n\r\n private readonly defaultPageNumber = 0;\r\n\r\n private readonly catalogId = getCatalogId(this.props.context.request);\r\n\r\n private isListPageStateUpdated: boolean = false;\r\n\r\n private _isMounted: boolean = false;\r\n\r\n public static getFriendlyName(locale: string, nameTranslations?: TextValueTranslation[]): string | undefined {\r\n let nameTranslation: TextValueTranslation | undefined;\r\n if (locale && nameTranslations && ArrayExtensions.hasElements(nameTranslations)) {\r\n nameTranslation = nameTranslations.find(item => item.Language!.toLowerCase() === locale.toLowerCase());\r\n }\r\n\r\n return nameTranslation?.Text;\r\n }\r\n\r\n public constructor(props: IExtSearchResultContainerProps, state: ISearchResultContainerState) {\r\n super(props);\r\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- Check required.\r\n this._viewport = props.context.request?.device?.Type === 'Mobile' ? 'xs' : 'lg';\r\n this._modalToggleRef = React.createRef();\r\n this._sortAndFilterContainerRef = React.createRef();\r\n this._toggleModal = this._toggleModal.bind(this);\r\n this._updateViewport = this._updateViewport.bind(this);\r\n this.productPrices = [];\r\n this.state = {\r\n sortingState: {\r\n pending: false,\r\n selectedSortByOption: this.sortByDropdownOptions[0]\r\n },\r\n modalIsOpen: false,\r\n refiners: [],\r\n channelInventoryConfiguration: undefined\r\n };\r\n const { placeholderTextMax, minLabel, maxLabel, rangeNameFormat } = this.props.resources;\r\n\r\n const locale = this.props.context.request.locale;\r\n const telemetry = this.props.telemetry;\r\n const validationErrorNaN = this.props.resources.validationErrorNotNumber;\r\n const validationErrorRange = this.props.resources.validationErrorNotRange;\r\n this._refineItemCommonProps = {\r\n telemetry,\r\n locale,\r\n placeholderTextMax,\r\n minLabel,\r\n maxLabel,\r\n rangeNameFormat,\r\n validationErrorNaN,\r\n validationErrorRange\r\n };\r\n this.telemetryContent = getTelemetryObject(\r\n this.props.context.request.telemetryPageName!,\r\n this.props.friendlyName,\r\n this.props.telemetry\r\n );\r\n this._updateViewport();\r\n }\r\n public async componentDidMount(): Promise {\r\n this._isMounted = true;\r\n if (MsDyn365.isBrowser && window.addEventListener) {\r\n window.addEventListener('resize', this._updateViewport);\r\n this._updateViewport();\r\n }\r\n\r\n const listPageState = await this.props.data.listPageState;\r\n const products = await this.props.data.products;\r\n\r\n if (this.props.app.config.hideProductsWithoutImages) {\r\n var observer = new MutationObserver(mutations => {\r\n mutations.forEach(mutation => {\r\n if (mutation.type === 'childList') {\r\n var target = mutation.target as HTMLElement;\r\n var child = target.firstChild as HTMLElement;\r\n if (target.className.includes('msc-product__image') && child.className.includes('msc-empty_image')) {\r\n const productCard = target.closest('li');\r\n if (productCard !== null) {\r\n //TODO: Should be information telemetry\r\n this.props.telemetry.warning('Product without image was filtered out', productCard);\r\n productCard.style.display = 'none';\r\n }\r\n }\r\n }\r\n });\r\n });\r\n var container = document.documentElement || document.body;\r\n var config = { attributes: true, childList: true, characterData: true, subtree: true };\r\n observer.observe(container, config);\r\n }\r\n\r\n const channelInventoryConfiguration = await StoreOperationsDataActions.getInventoryConfigurationAsync({\r\n callerContext: this.props.context.actionContext\r\n });\r\n\r\n if (this._isMounted) {\r\n this.setState({ channelInventoryConfiguration });\r\n }\r\n\r\n this._updateListPageState(listPageState, products);\r\n\r\n // Initialize reaction based on listPageState properties\r\n reaction(\r\n () => {\r\n return [\r\n listPageState.activeFilters?.length,\r\n listPageState.currentPageNumber,\r\n ArrayExtensions.hasElements(listPageState.sortingCritera?.Columns)\r\n ];\r\n },\r\n async () => {\r\n const newListPageState = await this.props.data.listPageState;\r\n const input = new GetFullProductsByCollectionInput(\r\n newListPageState.pageType,\r\n this.props.context.request.apiSettings,\r\n {\r\n Paging: {\r\n Top: this.props.config.itemsPerPage,\r\n Skip: Math.max(newListPageState.pageSize * (newListPageState.currentPageNumber ?? 0), 0)\r\n },\r\n count: true,\r\n Sorting: newListPageState.sortingCritera ?? {}\r\n },\r\n newListPageState.activeFilters ?? [],\r\n // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing -- RecordId is string. Check required.\r\n +(this.props.context.request.urlTokens.recordId || 0),\r\n\r\n // eslint-disable-next-line max-len -- existing code\r\n this.props.context.request.query?.q\r\n ? this.props.context.request.query.q\r\n : JSON.stringify({\r\n ProductId: this.props.context.request.query?.productId,\r\n Recommendation: this.props.context.request.query?.recommendation\r\n }),\r\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- Required check.\r\n !!this.props?.config?.includeAttributes,\r\n this.props.config.updateRefinerPanel,\r\n this.props.context.request.locale,\r\n this.catalogId,\r\n channelInventoryConfiguration\r\n );\r\n\r\n const productResults = await getCollectionProducts(input, this.props.context.actionContext);\r\n newListPageState.totalProductCount = productResults.count;\r\n newListPageState.activeProducts = productResults.products;\r\n\r\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- check is required.\r\n if (this.props.config.enableAffiliationBasedPricing) {\r\n // eslint-disable-next-line @typescript-eslint/no-floating-promises -- Call api to retrieve the availabilities data without blocking the UI.\r\n this._getActivePrice();\r\n }\r\n\r\n await this._updateVariantAvailability();\r\n\r\n if (this.props.config.updateRefinerPanel) {\r\n const refinerInput = new RefinersByCollectionInput(\r\n newListPageState.pageType,\r\n this.props.context.request.apiSettings,\r\n {\r\n Paging: {\r\n Top: this.props.config.itemsPerPage,\r\n Skip: Math.max(\r\n newListPageState.pageSize * (newListPageState.currentPageNumber ?? this.defaultPageNumber),\r\n this.defaultPageNumber\r\n )\r\n },\r\n count: true,\r\n Sorting: newListPageState.sortingCritera ?? {}\r\n },\r\n newListPageState.activeFilters ?? [],\r\n // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing -- RecordId is string. Check required.\r\n +(this.props.context.request.urlTokens.recordId || 0),\r\n this.props.context.request.query?.q\r\n ? this.props.context.request.query.q\r\n : this.props.context.request.query?.productId,\r\n false,\r\n this.props.config.updateRefinerPanel,\r\n undefined,\r\n this.catalogId,\r\n channelInventoryConfiguration\r\n );\r\n\r\n const refiners = await getCollectionRefinersAction(refinerInput, this.props.context.actionContext);\r\n this.setState({ refiners });\r\n }\r\n }\r\n );\r\n\r\n if (this.props.config.enableAffiliationBasedPricing) {\r\n // eslint-disable-next-line @typescript-eslint/no-floating-promises -- Call api to retrieve the availabilities data without blocking the UI.\r\n this._getActivePrice();\r\n }\r\n await this._updateVariantAvailability();\r\n }\r\n\r\n public componentWillUnmount(): void {\r\n this._isMounted = false;\r\n if (MsDyn365.isBrowser && window.removeEventListener) {\r\n window.removeEventListener('resize', this._updateViewport);\r\n }\r\n }\r\n\r\n public render(): JSX.Element {\r\n const {\r\n config: { imageSettings, className },\r\n resources,\r\n data: { listPageState, products: productCollection, featureProduct }\r\n } = this.props;\r\n\r\n if (!this.isListPageStateUpdated && listPageState.result && productCollection.result) {\r\n this._updateListPageState(listPageState.result, productCollection.result);\r\n this.isListPageStateUpdated = true;\r\n }\r\n\r\n const products = (this.props.data.listPageState.result && this.props.data.listPageState.result.activeProducts) || [];\r\n const searchProduct = listPageState.result?.featureProduct ?? featureProduct.result ?? null;\r\n let errorText = '';\r\n if (!ArrayExtensions.hasElements(products)) {\r\n errorText = this._pageType === 'Category' ? resources.resultCategoryNotFoundText : resources.resultSearchNotFoundText;\r\n }\r\n const productsComponent = this._getProducts();\r\n const featureComponent = (\r\n \r\n );\r\n\r\n const searchResultContainerViewProps = {\r\n ...this.props,\r\n products: productsComponent,\r\n TitleViewProps: this._getCollectionTitle(),\r\n categoryHierarchy: !this.props.config.disableHierarchy && this._getCategoryHierarchy(),\r\n refineMenu: this._getRefineMenu(),\r\n className: classnames('ms-search-result-container', className),\r\n SearchResultContainer: {\r\n moduleProps: this.props,\r\n className: classnames('ms-search-result-container', className)\r\n },\r\n sortByOptions: this.props.data.listPageState.result?.totalProductCount !== 0 ? this._getSortingDropDown() : null,\r\n pagination: this._getPagination(),\r\n ProductsContainer: { className: 'ms-search-result-container__Products' },\r\n ProductSectionContainer: { className: 'ms-search-result-container__product-section' },\r\n CategoryNavContainer: { className: 'ms-search-result-container__category-nav-section' },\r\n RefineAndProductSectionContainer: { className: 'ms-search-result-container__refine-product-section' },\r\n choiceSummary: this._getChoiceSummary(),\r\n modalToggle:\r\n this.props.data.listPageState.result?.totalProductCount !== 0 ? (\r\n \r\n ) : null,\r\n searchResultModal: this._getSearchResultModal(),\r\n isMobile: this.isMobile,\r\n errorMessage: errorText && ,\r\n FeatureSearchContainer: { className: 'ms-feature-search-result' },\r\n similarLookProduct: searchProduct ? featureComponent : null,\r\n productPrices: this.productPrices,\r\n productsDimensionAvailabilities: this.state.productsDimensionAvailabilities\r\n };\r\n return this.props.renderView(searchResultContainerViewProps) as React.ReactElement;\r\n }\r\n\r\n /**\r\n * Get products variants dimension availabilities.\r\n * @returns Void.\r\n */\r\n private readonly _updateVariantAvailability = async (): Promise => {\r\n const context = this.props.context as ICoreContext;\r\n const dimensionsToDisplayOnProductCard = context.app.config.dimensionsInProductCard;\r\n const dimensionsToDisplayAsSwatch = context.app.config.dimensionsAsSwatchType;\r\n if (\r\n ArrayExtensions.hasElements(dimensionsToDisplayOnProductCard) &&\r\n !dimensionsToDisplayOnProductCard.includes(DimensionTypes.none) &&\r\n ArrayExtensions.hasElements(dimensionsToDisplayAsSwatch) &&\r\n !dimensionsToDisplayAsSwatch.includes(DimensionTypes.none) &&\r\n this.props.config.includeAttributes\r\n ) {\r\n await this._getProductsDimensionsAvailabilities();\r\n }\r\n };\r\n\r\n /**\r\n * Update the list page state with initial data.\r\n * @param listPageState -- List page State.\r\n * @param products -- Products.\r\n */\r\n private readonly _updateListPageState = (listPageState: ListPageState, products: IFullProductsSearchResultsWithCount): void => {\r\n let querySorting: SortColumn[] = [];\r\n const defaultPageNumber: number = 10;\r\n\r\n if (this._pageType === 'Category') {\r\n listPageState.pageType = 'Category';\r\n } else {\r\n listPageState.pageType = 'Search';\r\n }\r\n\r\n if (this.props.context.request.query?.sorting) {\r\n querySorting = JSON.parse(decodeURIComponent(this.props.context.request.query.sorting)) as SortColumn[];\r\n }\r\n\r\n listPageState.currentPageNumber =\r\n (this.props.context.request.query &&\r\n +this.props.context.request.query.skip / (this.props.config.itemsPerPage ?? defaultPageNumber)) ||\r\n 0;\r\n listPageState.sortingCritera = { Columns: querySorting };\r\n listPageState.pageSize = this.props.config.itemsPerPage ?? defaultPageNumber;\r\n listPageState.activeProducts = products.products;\r\n listPageState.totalProductCount = products.count;\r\n listPageState.activeFilters = hydrateRefinersFromUrl(this.props.context.request) || [];\r\n if (this.props.context.request.query?.productId) {\r\n const featureProduct = this.props.data.featureProduct.result;\r\n if (featureProduct) {\r\n listPageState.featureProduct = featureProduct;\r\n }\r\n }\r\n };\r\n\r\n /**\r\n * Get products dimension availabilities.\r\n * @returns Void.\r\n */\r\n private readonly _getProductsDimensionsAvailabilities = async (): Promise => {\r\n const productsList = this.props.data.listPageState.result?.activeProducts ?? [];\r\n\r\n const productsDimensionAvailabilities = await getDimensionAvailabilitiesForProductSearchResultAction(\r\n new DimensionAvailabilitiesForProductSearchResultInput(\r\n productsList,\r\n this.props.context as ICoreContext,\r\n DimensionSwatchDisplayTypes.productCard\r\n ),\r\n this.props.context.actionContext\r\n );\r\n\r\n if (ArrayExtensions.hasElements(productsDimensionAvailabilities)) {\r\n this.setState({ productsDimensionAvailabilities });\r\n }\r\n };\r\n\r\n /**\r\n * Get the active price for the products.\r\n */\r\n private readonly _getActivePrice = async (): Promise => {\r\n var productsList = this.props.data.listPageState.result?.activeProducts ?? [];\r\n\r\n //Uses custom action\r\n const products = await getPriceForProductSearchResultAction(\r\n new PriceForProductSearchResultInput(productsList),\r\n this.props.context.actionContext\r\n );\r\n\r\n const listPageState = await this.props.data.listPageState;\r\n listPageState.activeProducts = products;\r\n };\r\n\r\n private readonly _getSearchResultModal = (): ISearchResultModalViewProps => {\r\n const { resources } = this.props;\r\n return SearchResultModal({\r\n resources: {\r\n modalCloseButtonText: resources.modalCloseButtonText,\r\n modalTitle: resources.modalTitle\r\n },\r\n isOpen: this.state.modalIsOpen,\r\n returnRef: this._modalToggleRef,\r\n onModalToggle: this._toggleModal\r\n });\r\n };\r\n\r\n private readonly _getCollectionTitle = (): ITitleViewProps => {\r\n const { data, context, resources } = this.props;\r\n\r\n let collectionTitle: string | undefined = '';\r\n if (context && context.request && context.request.query && context.request.query.q) {\r\n collectionTitle = `\"${context.request.query.q}\"`;\r\n } else {\r\n collectionTitle =\r\n (data.category.result &&\r\n SearchResultContainer.getFriendlyName(context.request.locale, data.category.result.NameTranslations)) ||\r\n (data.category.result && data.category.result.Name) ||\r\n this.props.context.request.query?.title ||\r\n '';\r\n }\r\n let productCountText = '';\r\n let productCountNumber: number | undefined;\r\n if (data.listPageState && data.listPageState.result && data.listPageState.result.totalProductCount !== undefined) {\r\n productCountNumber = data.listPageState.result.totalProductCount;\r\n } else if (data.products && data.products.result) {\r\n productCountNumber = data.products.result.count;\r\n }\r\n\r\n if (productCountNumber && productCountNumber !== 0) {\r\n productCountText =\r\n productCountNumber !== 1\r\n ? format(this.props.resources.numberOfProducts, productCountNumber)\r\n : this.props.resources.oneProduct;\r\n } else {\r\n productCountText = format(this.props.resources.numberOfProducts, 0);\r\n }\r\n const pageName = context.request.telemetryPageName ? `result-count-${context.request.telemetryPageName.toLowerCase()}` : '';\r\n const titlePrefix = ;\r\n const titleText = collectionTitle && <Title className='ms-search-result__collection-title-text' text={collectionTitle} />;\r\n const titleCount = <Title className='ms-search-result__collection-title-count' text={productCountText} />;\r\n\r\n return {\r\n TitleContainer: { className: `ms-search-result-container__title ${pageName}` },\r\n title: {\r\n titlePrefix,\r\n titleText,\r\n titleCount\r\n }\r\n };\r\n };\r\n\r\n private readonly _getCategoryHierarchy = (): ICategoryHierarchyViewProps => {\r\n const { data } = this.props;\r\n const categoryHierarchy = data.categoryHierarchy.result;\r\n const categoryLinks =\r\n categoryHierarchy &&\r\n categoryHierarchy.map((value: CategoryHierarchyData, index: number) => {\r\n return (\r\n <Link\r\n key={index}\r\n text={value.Name}\r\n ariaLabel={`${this.props.resources.categoryLinkAriaLabel} ${value.Name}`}\r\n href={value.Url}\r\n />\r\n );\r\n });\r\n const categoryLinkSeparator = <Separator separator='/' />;\r\n\r\n return {\r\n CategoryHierarchyContainer: { tag: 'nav', className: 'ms-search-result-container__category-hierarchy' },\r\n categoryHierarchyList: categoryLinks,\r\n categoryHierarchySeparator: categoryLinkSeparator\r\n };\r\n };\r\n\r\n private readonly _getSortingDropDown = (): ISortByViewProps => {\r\n const { resources } = this.props;\r\n const activeDropdown = this._getCurrentlySelectedOption() || this.state.sortingState.selectedSortByOption;\r\n let dropdownOptions = this._getAllSortByOptions();\r\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access -- App config settings are of \"any\" value.\r\n if (this.props.context.app.config.hideRating) {\r\n dropdownOptions = dropdownOptions.filter(dropdownOption => dropdownOption.key !== sortOptions.sortByOptionRatingDesc);\r\n }\r\n\r\n const dropdown = (\r\n <LabeledDropdown\r\n labelClassname='reviews-list-sort-by'\r\n labelText={resources.sortByDropdownLabel}\r\n dropdownId='categorySortByDropdown'\r\n dropdownClassname='reviews-list-dropdown'\r\n toggleColor='link'\r\n dropdownOptions={dropdownOptions}\r\n selectedOption={activeDropdown}\r\n onSelectOption={this._updateSortByDropdown}\r\n ref={this._sortAndFilterContainerRef}\r\n />\r\n );\r\n return {\r\n SortingContainer: { className: 'ms-search-result-container__Sort-by-category' },\r\n sortByDropDown: dropdown\r\n };\r\n };\r\n\r\n private readonly _getPagination = (): React.ReactNode => {\r\n const { config, context, data, resources } = this.props;\r\n const listPageState = data.listPageState.result;\r\n const fullUrl = getCurrentUrl(context.request);\r\n const itemsPerPage = config.itemsPerPage || 10;\r\n // eslint-disable-next-line max-len -- existing code\r\n const skipCount = listPageState?.currentPageNumber\r\n ? listPageState.currentPageNumber * (this.props.config.itemsPerPage || 10)\r\n : (this.props.context.request.query && +this.props.context.request.query.skip) || 0;\r\n const totalItems = listPageState?.totalProductCount || 0;\r\n const previousText = resources.flipperPrevious;\r\n const nextText = resources.flipperNext;\r\n\r\n if (totalItems <= itemsPerPage) {\r\n return null;\r\n }\r\n return (\r\n <UncontrolledPagination\r\n className='ms-search-result-container__pagination'\r\n role='navigation'\r\n aria-label={resources.paginationAriaLabel}\r\n url={fullUrl.href}\r\n qsp='skip'\r\n items={totalItems}\r\n itemsPerPage={itemsPerPage}\r\n startingItem={skipCount}\r\n previousText={this._renderPrev(previousText)}\r\n nextText={this._renderNext(nextText)}\r\n previousAriaLabel={previousText}\r\n nextAriaLabel={nextText}\r\n telemetryContent={this.telemetryContent}\r\n />\r\n );\r\n };\r\n\r\n private readonly _getRefineMenu = (): IRefineMenuViewProps => {\r\n const { data, context, config } = this.props;\r\n const tempRangeTypeTODO = context.request.query && context.request.query.inputRange ? 'input' : 'slider';\r\n const validRefiners =\r\n this.props.config.updateRefinerPanel && ArrayExtensions.hasElements(this.state.refiners)\r\n ? this.state.refiners.filter(refiner => {\r\n return ArrayExtensions.hasElements(refiner.Values) && !this._shouldHideFromRefiners(refiner);\r\n })\r\n : data.refiners.result &&\r\n data.refiners.result.filter(refiner => {\r\n return ArrayExtensions.hasElements(refiner.Values) && !this._shouldHideFromRefiners(refiner);\r\n });\r\n\r\n const activeRefiners = (data.listPageState.result && data.listPageState.result.activeFilters) || [];\r\n\r\n this._getexpandRefinerCount(validRefiners && validRefiners.length, config.expandRefinersCount);\r\n const expandedRefiners = this.expandrefinerCount;\r\n const subMenus =\r\n validRefiners &&\r\n validRefiners.map((productRefinerHierarchy: IProductRefinerHierarchy, index: number) => {\r\n return (\r\n <RefineSubmenu\r\n productRefinerHierarchy={productRefinerHierarchy}\r\n selectedRefinerValues={activeRefiners}\r\n refineItemCommonProps={this._refineItemCommonProps}\r\n minValueSliderThumbAriaLabel={this.props.resources.minValueSliderThumbAriaLabel}\r\n maxValueSliderThumbAriaLabel={this.props.resources.maxValueSliderThumbAriaLabel}\r\n key={index}\r\n onUpdateRefiners={this._onUpdateRefiners}\r\n urlBuilder={this._buildRefinerUrl}\r\n isDisabled={false}\r\n isExpandedOnInitialLoad={!!(expandedRefiners && expandedRefiners > index)}\r\n tempRangeTypeTODO={tempRangeTypeTODO}\r\n context={context}\r\n moduleId={this.props.id}\r\n moduleTypeName={this.props.typeName}\r\n telemetryContent={this.telemetryContent}\r\n productCountAriaLabel={this.props.resources.productCountAriaLabel}\r\n refineItemAriaLabel={this.props.resources.refineItemAriaLabel}\r\n refineItemsAriaLabel={this.props.resources.refineItemsAriaLabel}\r\n singleProductCountAriaLabel={this.props.resources.singleProductCountAriaLabel}\r\n colorRefinerLabel={this.props.resources.colorRefinerLabel}\r\n sizeRefinerLabel={this.props.resources.sizeRefinerLabel}\r\n isMobile={this.isMobile}\r\n />\r\n );\r\n });\r\n\r\n return {\r\n RefineMenuContainer: { className: 'ms-search-result-container__refine-menu' },\r\n RefinerSectionContainer: { className: 'ms-search-result-container__refiner-section' },\r\n refiners: subMenus\r\n };\r\n };\r\n\r\n /**\r\n * Should hide from refiners.\r\n * @param refiner - The refiner.\r\n * @returns ShouldHideFromRefiners.\r\n */\r\n private readonly _shouldHideFromRefiners = (refiner: IProductRefinerHierarchy): boolean => {\r\n const { channelInventoryConfiguration } = this.state;\r\n const isInventorySortableAttribute =\r\n (this.props.data.products.result?.inventoryAwareSortableAttributeId !== 0 &&\r\n refiner.RecordId === this.props.data.products.result?.inventoryAwareSortableAttributeId) ||\r\n (channelInventoryConfiguration?.ProductAvailabilitySortableAttributeRecordId !== 0 &&\r\n refiner.RecordId === channelInventoryConfiguration?.ProductAvailabilitySortableAttributeRecordId);\r\n\r\n const isInventoryProductAttribute =\r\n (this.props.data.products.result?.channelInventoryConfigurationId !== 0 &&\r\n refiner.RecordId === this.props.data.products.result?.channelInventoryConfigurationId) ||\r\n (channelInventoryConfiguration?.InventoryProductAttributeRecordId !== 0 &&\r\n refiner.RecordId === channelInventoryConfiguration?.InventoryProductAttributeRecordId);\r\n\r\n // Always hide sortable attribute since it's just for sorting products in Azure search, not for customers\r\n return (\r\n isInventorySortableAttribute ||\r\n (this.props.context.app.config.productListInventoryDisplay === ProductListInventoryFilteringOptions.HideOOS &&\r\n isInventoryProductAttribute)\r\n );\r\n };\r\n\r\n private readonly _getChoiceSummary = (): React.ReactNode => {\r\n const { resources, data, telemetry } = this.props;\r\n const { channelInventoryConfiguration } = this.state;\r\n const selectedRefiners = (data.listPageState.result && data.listPageState.result.activeFilters) || [];\r\n const refinerValueName = this.props.data.refiners.result?.find(rating => rating.KeyName === 'Rating');\r\n return (\r\n <ChoiceSummary\r\n classNames='ms-choice-summary-by-category'\r\n clearAllText={resources.clearAllText}\r\n label={resources.choiceSummaryLabel}\r\n closeAriaLabel={resources.closeAriaLabel}\r\n selectedChoices={selectedRefiners}\r\n // @ts-expect-error: NOTE Type-unsafe line below, null refinersByCategoryHierarchy case not handled\r\n refinerHierarchy={data.refiners.result}\r\n choiceFormat={resources.choiceFormat}\r\n choiceRangeValueFormat={resources.choiceRangeValueFormat}\r\n telemetry={telemetry}\r\n onChoiceClicked={this._onChoiceClicked}\r\n urlBuilder={this._buildRefinerUrlForChoiceSummary}\r\n choiceAriaLabel={resources.choiceAriaLabel}\r\n telemetryContent={this.telemetryContent}\r\n context={this.props.context}\r\n channelInventoryConfigurationId={channelInventoryConfiguration?.InventoryProductAttributeRecordId}\r\n refinerValues={refinerValueName}\r\n />\r\n );\r\n };\r\n\r\n /**\r\n * Get Active products.\r\n * @returns - JSX Elements.\r\n */\r\n private readonly _getProducts = (): JSX.Element => {\r\n const {\r\n config: { imageSettings, allowBackNavigation: shouldAllowBackNavigation, wishlistInProductCard },\r\n data: {\r\n wishlists: { result: wishlistItems }\r\n }\r\n } = this.props;\r\n const { resources } = this.props;\r\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access -- Reading config value.\r\n const breadCrumbType: string = this.props.context.app.config.breadcrumbType;\r\n const shouldAllowBack = shouldAllowBackNavigation && (breadCrumbType === 'back' || breadCrumbType === 'categoryAndBack');\r\n\r\n const products = (this.props.data.listPageState.result && this.props.data.listPageState.result.activeProducts) || [];\r\n const quickviewSlot = this.props.slots?.quickview?.[0];\r\n const productComparisonButton = ArrayExtensions.hasElements(this.props.slots.productComparisonButton)\r\n ? this.props.slots.productComparisonButton[0]\r\n : null;\r\n\r\n const isPriceMinMaxFeatureState = this.props.data.featureState.result?.find(\r\n featureState => featureState.Name === 'Dynamics.AX.Application.RetailSearchPriceRangeFeature'\r\n );\r\n return (\r\n <ProductSearchResultItems\r\n products={products}\r\n context={this.props.context}\r\n imageSettings={imageSettings}\r\n resources={resources}\r\n moduleType={this.props.typeName}\r\n moduleId={this.props.id}\r\n allowBackNavigation={shouldAllowBack}\r\n telemetryContent={this.telemetryContent}\r\n quickviewSlot={quickviewSlot}\r\n productComparisonButton={productComparisonButton}\r\n channelInventoryConfigurationId={this.props.data.products.result?.channelInventoryConfigurationId}\r\n isPriceMinMaxEnabled={isPriceMinMaxFeatureState?.IsEnabled}\r\n productsDimensionAvailabilities={this.state.productsDimensionAvailabilities}\r\n wishlist={wishlistItems ?? []}\r\n wishlistInProductCard={wishlistInProductCard ?? false}\r\n />\r\n );\r\n };\r\n\r\n private readonly _updateSortByDropdown = (notification: ILabeledDropdownOnChangeNotification): void => {\r\n const {\r\n context: { request: requestContext, actionContext }\r\n } = this.props;\r\n\r\n if (!requestContext || !actionContext || !this.props.data.listPageState.result) {\r\n // eslint-disable-next-line max-len -- existing code\r\n const error = `[sort-by-category] cannot sort without context: ${!requestContext ? 'requestContext ' : ''} ${\r\n !actionContext ? 'actionContext ' : ''\r\n } could not be found`;\r\n this.props.telemetry.warning(error);\r\n return;\r\n }\r\n\r\n window.history.pushState(\r\n {},\r\n '',\r\n buildListPageUrl(\r\n getCurrentUrl(this.props.context.request),\r\n undefined,\r\n [this._getSortColumnFromSelectedOption(notification.selectedOption)],\r\n undefined\r\n )\r\n );\r\n transaction(() => {\r\n this.props.data.listPageState.result!.currentPageNumber = 0;\r\n this.props.data.listPageState.result!.sortingCritera = {\r\n Columns: [this._getSortColumnFromSelectedOption(notification.selectedOption)]\r\n };\r\n });\r\n };\r\n\r\n private readonly _getSortColumnFromSelectedOption = (option: ILabeledDropdownOption): SortColumn => {\r\n const { data } = this.props;\r\n\r\n if (!data.searchConfiguration.result) {\r\n return {};\r\n }\r\n\r\n const mappedConfiguration = data.searchConfiguration.result.find(searchConfiguration => {\r\n return searchConfiguration.key === option.key;\r\n });\r\n\r\n if (mappedConfiguration) {\r\n return mappedConfiguration.sortColumn;\r\n }\r\n\r\n return {};\r\n };\r\n\r\n /**\r\n * Retrieves current sort criteria.\r\n * @returns Sort criteria column which is currently active or undefined if it's not specified.\r\n */\r\n private readonly _getSortCriteriaColumn = (): SortColumn | undefined => {\r\n const sortCriteria = this.props.data.listPageState.result?.sortingCritera;\r\n if (ArrayExtensions.hasElements(sortCriteria?.Columns)) {\r\n return sortCriteria!.Columns[0];\r\n }\r\n\r\n const queryColumns = parseQueryParam<SortColumn[]>('sorting', this.props.context.request);\r\n if (ArrayExtensions.hasElements(queryColumns)) {\r\n return queryColumns[0];\r\n }\r\n\r\n return undefined;\r\n };\r\n\r\n /**\r\n * Retrieves dropdown options.\r\n * @returns All dropdown options.\r\n */\r\n private readonly _getAllSortByOptions = (): ILabeledDropdownOption[] => {\r\n const searchConfiguration = this.props.data.searchConfiguration.result;\r\n\r\n if (!searchConfiguration) {\r\n return [];\r\n }\r\n\r\n const mappedSearchConfiguration = this.sortByDropdownOptions.filter(mappedSearchConfig =>\r\n searchConfiguration.find(item => mappedSearchConfig.key === item.key)\r\n );\r\n\r\n return ArrayExtensions.validValues(mappedSearchConfiguration);\r\n };\r\n\r\n /**\r\n * Retrieves current selected dropdown option based on the sort criteria.\r\n * @returns Current dropdown option.\r\n */\r\n private readonly _getCurrentlySelectedOption = (): ILabeledDropdownOption | undefined => {\r\n const activeSortColumn = this._getSortCriteriaColumn();\r\n\r\n const searchConfiguration = this.props.data.searchConfiguration.result;\r\n\r\n if (!activeSortColumn || !searchConfiguration) {\r\n return undefined;\r\n }\r\n\r\n const activeMappedConfig = searchConfiguration.find(\r\n mappedSearchConfig =>\r\n mappedSearchConfig.sortColumn.ColumnName === activeSortColumn.ColumnName &&\r\n mappedSearchConfig.sortColumn.IsDescending === activeSortColumn.IsDescending\r\n );\r\n if (!activeMappedConfig) {\r\n return undefined;\r\n }\r\n\r\n return this.sortByDropdownOptions.find(dropdownOption => dropdownOption.key === activeMappedConfig.key);\r\n };\r\n\r\n private readonly _onUpdateRefiners = (itemToggleNotification: IRefineItemToggleNotification): void => {\r\n const {\r\n context: { request: requestContext, actionContext }\r\n } = this.props;\r\n\r\n if (!requestContext || !actionContext || !this.props.data.listPageState.result) {\r\n const error = `Refine menu cannot refine search criteria: \r\n ${!requestContext ? 'requestContext ' : ''} ${!actionContext ? 'actionContext ' : ''} could not be found`;\r\n this.props.telemetry.warning(error);\r\n return;\r\n }\r\n\r\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- Server side the list PageState will not be called.\r\n const updatedRefinementCriteria = getUpdatedRefinementCriteria(\r\n itemToggleNotification,\r\n this.props.data.listPageState.result?.activeFilters || []\r\n );\r\n\r\n window.history.pushState({}, '', buildListPageUrl(getCurrentUrl(this.props.context.request), updatedRefinementCriteria));\r\n transaction(() => {\r\n this.props.data.listPageState.result!.currentPageNumber = 0;\r\n this.props.data.listPageState.result!.activeFilters = updatedRefinementCriteria;\r\n });\r\n };\r\n\r\n private readonly _buildRefinerUrl = (itemToggleNotification: IRefineItemToggleNotification): string => {\r\n if (this.props.data.listPageState.result) {\r\n const newRefinementCriteria = getUpdatedRefinementCriteria(\r\n itemToggleNotification,\r\n this.props.data.listPageState.result.activeFilters || []\r\n );\r\n\r\n return buildListPageUrl(getCurrentUrl(this.props.context.request), newRefinementCriteria);\r\n }\r\n this.props.telemetry.warning('[buildRefinerQueryString]List Page State Not available, unable to build refiner URL');\r\n return '';\r\n };\r\n\r\n private readonly _onChoiceClicked = (notification: IChoiceSummaryClickNotification): void => {\r\n const { data, telemetry } = this.props;\r\n\r\n if (!data.listPageState.result) {\r\n telemetry.warning('[choice-summary-by-category._onChoiceClicked]ListPageState unavailable, unable to update refiners.');\r\n return;\r\n }\r\n\r\n let currentRefinementCriteria = (data.listPageState.result && data.listPageState.result.activeFilters) || [];\r\n\r\n if (!notification.clearAll) {\r\n const selectedChoice = notification.choiceClicked;\r\n if (!selectedChoice) {\r\n telemetry.warning('[choice-summary-by-category._onChoiceClicked] Choice could not be determined');\r\n return;\r\n }\r\n currentRefinementCriteria = currentRefinementCriteria.filter(\r\n (selectedCriterion: ProductRefinerValue) => !isMatchingRefinementCriterion(selectedChoice, selectedCriterion)\r\n );\r\n } else {\r\n currentRefinementCriteria = [];\r\n\r\n // Set focus to sort and filter\r\n const dropdownElementId = this._sortAndFilterContainerRef.current && this._sortAndFilterContainerRef.current.props.dropdownId;\r\n const dropdownElement = dropdownElementId && document.getElementById(dropdownElementId);\r\n setTimeout(() => {\r\n dropdownElement && dropdownElement.focus();\r\n }, 50);\r\n }\r\n\r\n const fullUrl = getCurrentUrl(this.props.context.request);\r\n window.history.pushState({}, '', buildListPageUrl(fullUrl, currentRefinementCriteria));\r\n data.listPageState.result.currentPageNumber = 0;\r\n data.listPageState.result.activeFilters = currentRefinementCriteria;\r\n };\r\n\r\n private readonly _buildRefinerUrlForChoiceSummary = (selectedRefiner: ProductRefinerValue, isClearAll: boolean): string => {\r\n const { data, telemetry } = this.props;\r\n const fullUrl = getCurrentUrl(this.props.context.request);\r\n\r\n if (!data.listPageState.result) {\r\n telemetry.warning('[choice-summary-by-category._buildRefinerUrl]ListPageState unavailable, unable to create refiner URL.');\r\n return fullUrl.href;\r\n }\r\n\r\n let currentRefinementCriteria = (data.listPageState.result && data.listPageState.result.activeFilters) || [];\r\n\r\n if (!isClearAll) {\r\n if (!selectedRefiner) {\r\n telemetry.warning('[choice-summary-by-category._buildRefinerUrl] URL for Choice could not be determined');\r\n return fullUrl.href;\r\n }\r\n currentRefinementCriteria = currentRefinementCriteria.filter(\r\n (selectedCriterion: ProductRefinerValue) => !isMatchingRefinementCriterion(selectedRefiner, selectedCriterion)\r\n );\r\n } else {\r\n currentRefinementCriteria = [];\r\n }\r\n\r\n return buildListPageUrl(fullUrl, currentRefinementCriteria);\r\n };\r\n\r\n private _getViewport(): GridSize {\r\n if (MsDyn365.isBrowser) {\r\n return isMobile({ variant: VariantType.Browser, context: this.props.context.request });\r\n }\r\n return isMobile({ variant: VariantType.Viewport, context: this.props.context.request });\r\n }\r\n\r\n private _toggleModal(): void {\r\n this.setState({\r\n modalIsOpen: !this.state.modalIsOpen\r\n });\r\n }\r\n\r\n private _updateViewport(): void {\r\n this._viewport = this._getViewport();\r\n\r\n if (this.state.modalIsOpen && !this.isMobile) {\r\n this._toggleModal();\r\n }\r\n }\r\n\r\n private readonly _getexpandRefinerCount = (validRefiners?: number, refinerCount?: expandRefinersCount): void => {\r\n switch (refinerCount) {\r\n case expandRefinersCount.all:\r\n this.expandrefinerCount = validRefiners;\r\n break;\r\n case expandRefinersCount.one:\r\n this.expandrefinerCount = 1;\r\n break;\r\n case expandRefinersCount.two:\r\n this.expandrefinerCount = 2;\r\n break;\r\n case expandRefinersCount.three:\r\n this.expandrefinerCount = 3;\r\n break;\r\n case expandRefinersCount.four:\r\n this.expandrefinerCount = 4;\r\n break;\r\n default:\r\n this.expandrefinerCount = 0;\r\n }\r\n };\r\n\r\n /**\r\n * Renders a Pagination previous text.\r\n * @param paginationPreviousText - Pagination previous text from resources.\r\n * @returns Previous text and flipper icon.\r\n */\r\n private readonly _renderPrev = (paginationPreviousText: string) => {\r\n return (\r\n <div className='msc-pagination__prev'>\r\n <span className='ms-search-result__pagination-left' aria-hidden='true' />\r\n <span className='prev-text'>{paginationPreviousText}</span>\r\n </div>\r\n );\r\n };\r\n\r\n /**\r\n * Renders a Pagination next text.\r\n * @param paginationNextText - Pagination next text from resources.\r\n * @returns Next text and flipper icon.\r\n */\r\n private readonly _renderNext = (paginationNextText: string) => {\r\n return (\r\n <div className='msc-pagination__next'>\r\n <span className='next-text'>{paginationNextText}</span>\r\n <span className='ms-search-result__pagination-right' aria-hidden='true' />\r\n </div>\r\n );\r\n };\r\n}\r\n","/*!\r\n * Copyright (c) Microsoft Corporation.\r\n * All rights reserved. See LICENSE in the project root for license information.\r\n */\r\n\r\n/* eslint-disable no-duplicate-imports */\r\nimport { Module, Node } from '@msdyn365-commerce-modules/utilities';\r\nimport * as React from 'react';\r\n\r\nimport { ISearchResultModalViewProps } from './components';\r\nimport {\r\n ICategoryHierarchyViewProps,\r\n IRefineMenuViewProps,\r\n ISearchResultContainerViewProps,\r\n ISortByViewProps,\r\n ITitleViewProps\r\n} from './ext-search-result-container';\r\n\r\nconst SearchResultContainerView: React.FC<ISearchResultContainerViewProps> = props => {\r\n const {\r\n SearchResultContainer,\r\n products,\r\n pagination,\r\n ProductsContainer,\r\n ProductSectionContainer,\r\n choiceSummary,\r\n isMobile,\r\n modalToggle,\r\n searchResultModal,\r\n TitleViewProps,\r\n refineMenu,\r\n categoryHierarchy,\r\n sortByOptions,\r\n CategoryNavContainer,\r\n RefineAndProductSectionContainer,\r\n errorMessage,\r\n FeatureSearchContainer,\r\n similarLookProduct\r\n } = props;\r\n const isRecoSearchPage = props.context.actionContext.requestContext.query?.recommendation;\r\n if (isMobile) {\r\n return (\r\n <Module {...SearchResultContainer}>\r\n {renderCategoryHierarchy(categoryHierarchy)}\r\n {renderTitle(TitleViewProps)}\r\n {choiceSummary}\r\n {modalToggle}\r\n {createSearchResultModal(searchResultModal, refineMenu, sortByOptions, isRecoSearchPage)}\r\n <Node {...FeatureSearchContainer}>{similarLookProduct}</Node>\r\n <Node {...ProductsContainer}>\r\n {errorMessage}\r\n {products}\r\n </Node>\r\n {pagination}\r\n </Module>\r\n );\r\n }\r\n return (\r\n <Module {...SearchResultContainer}>\r\n <Node {...CategoryNavContainer}>\r\n {categoryHierarchy && renderCategoryHierarchy(categoryHierarchy)}\r\n {TitleViewProps && renderTitleCount(TitleViewProps)}\r\n </Node>\r\n <Node {...RefineAndProductSectionContainer}>\r\n {refineMenu && renderRefiner(refineMenu)}\r\n <Node {...ProductSectionContainer}>\r\n {TitleViewProps && renderTitle(TitleViewProps)}\r\n {choiceSummary}\r\n {sortByOptions && !isRecoSearchPage && renderSort(sortByOptions)}\r\n <Node {...FeatureSearchContainer}>{similarLookProduct}</Node>\r\n <Node {...ProductsContainer}>\r\n {errorMessage}\r\n {products}\r\n </Node>\r\n {pagination}\r\n </Node>\r\n </Node>\r\n </Module>\r\n );\r\n};\r\n\r\nconst createSearchResultModal = (\r\n modalProps: ISearchResultModalViewProps,\r\n refineMenu: IRefineMenuViewProps,\r\n sortByDropDown: ISortByViewProps,\r\n isRecoSearchPage?: string\r\n): JSX.Element => {\r\n return React.cloneElement(\r\n modalProps.modal,\r\n {},\r\n modalProps.modalHeader,\r\n createModalBody(modalProps, refineMenu, sortByDropDown, isRecoSearchPage),\r\n modalProps.modalFooter\r\n );\r\n};\r\n\r\nconst createModalBody = (\r\n props: ISearchResultModalViewProps,\r\n refineMenu: IRefineMenuViewProps,\r\n sortByDropDown: ISortByViewProps,\r\n isRecoSearchPage?: string\r\n): JSX.Element | null => {\r\n if (sortByDropDown) {\r\n return React.cloneElement(props.modalBody, {}, renderSort(sortByDropDown, isRecoSearchPage), renderRefiner(refineMenu));\r\n }\r\n return null;\r\n};\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}>{submenu}</React.Fragment>\r\n ))}\r\n </Node>\r\n </Node>\r\n );\r\n }\r\n return null;\r\n};\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 <Node {...SortingContainer}>{sortByDropDown}</Node>;\r\n }\r\n return null;\r\n};\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 && 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\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 <h2>\r\n {title.titlePrefix}\r\n {title.titleText}\r\n </h2>\r\n </Node>\r\n );\r\n }\r\n return null;\r\n};\r\n\r\nconst renderTitleCount = (props: ITitleViewProps): JSX.Element | null => {\r\n const { title, TitleContainer } = props;\r\n if (title) {\r\n return (\r\n <Node {...TitleContainer}>\r\n <h5>{title.titleCount}</h5>\r\n </Node>\r\n );\r\n }\r\n return null;\r\n};\r\n\r\nexport default SearchResultContainerView;\r\n","/*!\r\n * Copyright (c) Microsoft Corporation.\r\n * All rights reserved. See LICENSE in the project root for license information.\r\n */\r\n\r\n/* eslint-disable no-duplicate-imports */\r\nimport { IProductRefinerHierarchy } from '@msdyn365-commerce/commerce-entities';\r\nimport {\r\n CacheType,\r\n createObservableDataAction,\r\n IAction,\r\n IActionContext,\r\n IActionInput,\r\n IAny,\r\n ICreateActionContext,\r\n IGeneric\r\n} from '@msdyn365-commerce/core';\r\nimport { ProductPrice, ProductRefinerValue, SimpleProduct, SortingInfo } from '@msdyn365-commerce/retail-proxy';\r\nimport { observable } from 'mobx';\r\nimport { ProductResultWithSwatchLimit } from './actions/get-full-products-by-collection';\r\n\r\nimport { listPageType } from './actions';\r\n\r\n/**\r\n * ListPageState class.\r\n */\r\nexport class ListPageState {\r\n @observable public activeFilters: ProductRefinerValue[] | null = null;\r\n\r\n @observable public activeProducts: ProductResultWithSwatchLimit[] = [];\r\n\r\n @observable public sortingCritera: SortingInfo | null = null;\r\n\r\n @observable public currentPageNumber: number | null = null;\r\n\r\n @observable public refiners: IProductRefinerHierarchy[] | null = null;\r\n\r\n @observable public totalProductCount: number | undefined;\r\n\r\n @observable public pageSize: number = 10;\r\n\r\n @observable public pageType: listPageType = 'Unknown';\r\n\r\n @observable public featureProduct: SimpleProduct | null = null;\r\n\r\n @observable public productPrices: ProductPrice[] | undefined = [];\r\n}\r\n\r\n/**\r\n * ListPageStateInput - action input.\r\n */\r\nexport class ListPageStateInput implements IActionInput {\r\n public getCacheKey = () => 'ListPageState';\r\n\r\n public getCacheObjectType = () => 'ListPageState';\r\n\r\n public dataCacheType = (): CacheType => 'request';\r\n}\r\n\r\nexport async function listPageStateAction(input: ListPageStateInput, ctx: IActionContext): Promise<ListPageState> {\r\n return new ListPageState();\r\n}\r\n\r\n/**\r\n * Create new input for create action.\r\n * @param inputData\r\n */\r\nexport const createListPageInput = (inputData: ICreateActionContext<IGeneric<IAny>>): IActionInput => {\r\n return new ListPageStateInput();\r\n};\r\n\r\n/**\r\n * ListPageState - create action.\r\n */\r\nexport default createObservableDataAction<ListPageState>({\r\n action: <IAction<ListPageState>>listPageStateAction,\r\n input: createListPageInput\r\n});\r\n","/*!\r\n * Copyright (c) Microsoft Corporation.\r\n * All rights reserved. See LICENSE in the project root for license information.\r\n */\r\n\r\nimport { IPriceComponentResources } from '@msdyn365-commerce/components';\r\nimport MsDyn365 from '@msdyn365-commerce/core';\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, { MouseEventHandler, useEffect, useState } from 'react';\r\n\r\nimport { IProductsDimensionsAvailabilities } from '@msdyn365-commerce/commerce-entities';\r\nimport {\r\n IExtSearchResultContainerProps,\r\n IExtSearchResultContainerResources\r\n} from '../definition-extensions/ext-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 & IExtSearchResultContainerProps<{}>): JSX.Element | null => {\r\n return <Node {...props.ProductsContainer}>{props.products}</Node>;\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 & IExtSearchResultContainerProps<{}>,\r\n product: ProductSearchResult,\r\n index: number,\r\n isEnabledProductDescription?: boolean\r\n): JSX.Element | null => {\r\n const { config, context, resources, productsDimensionAvailabilities } = 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\r\n ? 'ms-product-search-result__item product__description'\r\n : '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 );\r\n const priceResources: IPriceComponentResources = {\r\n priceRangeSeparator: resources.priceRangeSeparator\r\n };\r\n\r\n const productComparisonButton = ArrayExtensions.hasElements(props.slots.productComparisonButton)\r\n ? props.slots.productComparisonButton[0]\r\n : null;\r\n\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 key={product.RecordId}\r\n typeName={props.typeName}\r\n data={{ product }}\r\n quickViewButton={quickviewslot}\r\n productComparisonButton={productComparisonButton}\r\n isEnabledProductDescription={isEnabledProductDescription}\r\n inventoryLabel={getInventoryLabel(channelInventoryConfigurationId, product)}\r\n isPriceMinMaxEnabled={isPriceMinMaxFeatureState?.IsEnabled}\r\n priceResources={priceResources}\r\n swatchItemAriaLabel={resources.swatchItemAriaLabel}\r\n dimensionAvailabilities={productsDimensionAvailabilities?.find(\r\n (dimensionAvailability: IProductsDimensionsAvailabilities[]) =>\r\n ArrayExtensions.hasElements(dimensionAvailability) &&\r\n dimensionAvailability[0].masterProductId === product.MasterProductId\r\n )}\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 & IExtSearchResultContainerProps<{}>): 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\r\n ? renderProductCardsDescription(props, product, index, true)\r\n : 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 if (title) {\r\n return <Node {...TitleContainer}>{title.titleCount}</Node>;\r\n }\r\n return null;\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 * Function to make filter sticky.\r\n * @param isMobile - The boolean prop.\r\n * @param isStickyHeader - The boolean prop.\r\n */\r\nexport const configureStickyFilter = (isMobile: boolean, isStickyHeader: boolean): void => {\r\n // Get heights of cookie and promotion banners\r\n const defaultValue = 0;\r\n const defaultOffset = 28;\r\n const headerContainer: HTMLElement | null = document.querySelector('.ms-header');\r\n\r\n const headerHeight: number | undefined = headerContainer?.offsetHeight;\r\n const containerHeight: number = headerHeight ?? defaultOffset;\r\n const bannerHeights = isStickyHeader ? defaultValue : containerHeight;\r\n const headerElement = document.querySelector('header .lock-opaque');\r\n const defaultContainer = document.querySelector('header .default-container');\r\n const refinerElement = isMobile ? document.querySelector('.msc-sort-filter-wrapper') : document.querySelector('.ms-refiner-heading');\r\n if (refinerElement && headerElement && defaultContainer) {\r\n if (MsDyn365.isBrowser && document.documentElement.scrollTop > bannerHeights) {\r\n refinerElement.classList.add('lock-Filter');\r\n refinerElement.setAttribute('style', `top: ${defaultContainer.clientHeight}px`);\r\n } else {\r\n refinerElement.classList.remove('lock-Filter');\r\n }\r\n } else if (refinerElement) {\r\n if (MsDyn365.isBrowser && document.documentElement.scrollTop > bannerHeights) {\r\n refinerElement.classList.add('lock-top');\r\n } else {\r\n refinerElement.classList.remove('lock-top');\r\n refinerElement.classList.remove('lock-Filter');\r\n refinerElement.removeAttribute('style');\r\n }\r\n }\r\n};\r\n\r\n/**\r\n * Function to setup filter sticky.\r\n * @param isMobile - The boolean prop.\r\n * @param isStickyHeader - The boolean prop.\r\n */\r\nfunction stickyFilterSetup(isMobile: boolean, isStickyHeader: boolean): void {\r\n window.addEventListener('scroll', () => {\r\n configureStickyFilter(isMobile, isStickyHeader);\r\n });\r\n configureStickyFilter(isMobile, isStickyHeader);\r\n}\r\n\r\n/**\r\n * Function to make filter sticky.\r\n * @param refinerRefernce - Ref prop for filter.\r\n * @param toggle - Toggle function for filter menu.\r\n */\r\nfunction useOutsideClick(refinerRefernce: React.RefObject<HTMLElement>, toggle: (event: Event) => void) {\r\n React.useEffect(() => {\r\n /**\r\n * Function to make filter sticky.\r\n * @param event - Event prop for filter.\r\n */\r\n function handleClickOutside(event: Event) {\r\n const element = document.querySelector('.ms-refine-filter__toggle_collapsed');\r\n if (refinerRefernce.current && !refinerRefernce.current.contains(event.target as Node) && !element) {\r\n toggle(event);\r\n }\r\n }\r\n if (MsDyn365.isBrowser) {\r\n document.addEventListener('click', handleClickOutside);\r\n }\r\n return () => {\r\n if (MsDyn365.isBrowser) {\r\n document.removeEventListener('click', handleClickOutside);\r\n }\r\n };\r\n }, [refinerRefernce, toggle]);\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 & IExtSearchResultContainerProps<{}>> = props => {\r\n const {\r\n SearchResultContainer,\r\n pagination,\r\n ProductSectionContainer,\r\n choiceSummary,\r\n isMobile,\r\n modalToggle,\r\n searchResultModal,\r\n TitleViewProps,\r\n refineMenu,\r\n categoryHierarchy,\r\n sortByOptions,\r\n CategoryNavContainer,\r\n RefineAndProductSectionContainer,\r\n FeatureSearchContainer,\r\n similarLookProduct,\r\n errorMessage,\r\n resources\r\n } = props;\r\n useEffect(() => {\r\n if (props.config.useStickyFilter && MsDyn365.isBrowser) {\r\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access -- app context is generic\r\n stickyFilterSetup(props.isMobile, props.context.app.config.enableStickyHeader as boolean);\r\n }\r\n }, [props]);\r\n const [isExpanded, setIsExpanded] = useState<boolean>(false);\r\n const toggle = () => {\r\n setIsExpanded(!isExpanded);\r\n };\r\n const wrapperRefiner = React.useRef(null);\r\n useOutsideClick(wrapperRefiner, toggle);\r\n const isRecoSearchPage = props.context.actionContext.requestContext.query?.recommendation;\r\n const showCategoryDescription = props.config.categoryDescription;\r\n if (isMobile) {\r\n return (\r\n <Module {...SearchResultContainer}>\r\n {similarLookProduct ? null : (\r\n <Node {...CategoryNavContainer}>\r\n {renderCategoryHierarchy(categoryHierarchy)}\r\n {renderTitle(TitleViewProps)}\r\n {renderTitleCount(TitleViewProps)}\r\n </Node>\r\n )}\r\n {choiceSummary}\r\n <Node className='msc-sort-filter-wrapper'>{modalToggle}</Node>\r\n {createSearchResultModal(searchResultModal, refineMenu, sortByOptions, isRecoSearchPage)}\r\n <Node {...FeatureSearchContainer}>{similarLookProduct}</Node>\r\n {errorMessage}\r\n {props.config.enableProdutDescription ? renderProducts(props) : renderProductCards(props)}\r\n {pagination}\r\n {showCategoryDescription ? (<Node className='ms-search-result-container__category-description'>{renderCategoryDescription(props)}</Node>): null}\r\n </Module>\r\n );\r\n }\r\n return (\r\n <Module {...SearchResultContainer}>\r\n {similarLookProduct ? null : (\r\n <Node {...CategoryNavContainer}>\r\n {categoryHierarchy && renderCategoryHierarchy(categoryHierarchy)}\r\n {TitleViewProps && renderTitle(TitleViewProps)}\r\n {TitleViewProps && renderTitleCount(TitleViewProps)}\r\n </Node>\r\n )}\r\n <Node {...FeatureSearchContainer}>{similarLookProduct}</Node>\r\n <Node {...RefineAndProductSectionContainer}>\r\n <Node ref={wrapperRefiner} className='ms-refiner-heading'>\r\n <Node className='ms-refiner-heading_title'>\r\n <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'>{choiceSummary}</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 className='ms-refine__footer'>\r\n {refineMenu && isExpanded && renderRefinerFooter(refineMenu, toggle, resources)}\r\n </Node>\r\n </Node>\r\n\r\n <Node {...ProductSectionContainer}>\r\n {errorMessage}\r\n {props.config.enableProdutDescription ? renderProducts(props) : renderProductCards(props)}\r\n {pagination}\r\n </Node>\r\n {showCategoryDescription ? (<Node className='ms-search-result-container__category-description'>{renderCategoryDescription(props)}</Node>) : null}\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 = (\r\n modalProps: ISearchResultModalViewProps,\r\n refineMenu: IRefineMenuViewProps,\r\n sortByDropDown: ISortByViewProps,\r\n isRecoSearchPage?: string\r\n): JSX.Element => {\r\n return React.cloneElement(\r\n modalProps.modal,\r\n {},\r\n modalProps.modalHeader,\r\n createModalBody(modalProps, refineMenu, sortByDropDown, isRecoSearchPage),\r\n modalProps.modalFooter\r\n );\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}>{submenu}</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 = (\r\n props: ISearchResultModalViewProps,\r\n refineMenu: IRefineMenuViewProps,\r\n sortByDropDown: ISortByViewProps,\r\n isRecoSearchPage?: string\r\n): 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}>{submenu}</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 Refiner Footer.\r\n * @param props - The Refine Menu view props.\r\n * @param handler - The Refine menu toggle function.\r\n * @param resources - Resources to get the done text and aria label.\r\n * @returns The JSX Element.\r\n */\r\nconst renderRefinerFooter = (\r\n props: IRefineMenuViewProps,\r\n handler: MouseEventHandler,\r\n resources: IExtSearchResultContainerResources\r\n): JSX.Element | null => {\r\n const { refiners } = props;\r\n if (refiners) {\r\n return (\r\n <Node className='ms-refine__footer__done'>\r\n <Node tag='button' className='ms-refine-filter-done' aria-label={resources.doneAriaLabel} tabIndex={0} onClick={handler}>\r\n {resources.doneText}\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 <Node {...SortingContainer}>{sortByDropDown}</Node>;\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\n * Render Category description.\r\n * @param props - The props.\r\n * @returns The JSX Element.\r\n */\r\nconst renderCategoryDescription = (props: ISearchResultContainerViewProps): JSX.Element | null => {\r\n const description = props.data.category.result?.LocalizedDescription;\r\n if (description) {\r\n return (\r\n <span>\r\n {description}\r\n </span>\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['ext-search-result-container'] = {\n c: () => require('partner/modules/ext-search-result-container/ext-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:'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/ext-search-result-container/list-page-state', runOn: 0},{name:'products', path:'modules/ext-search-result-container/actions/get-full-products-by-collection', runOn: 0},{name:'refiners', path:'modules/ext-search-result-container/actions/get-refiners-for-collection', runOn: 0},{name:'searchConfiguration', path:'modules/ext-search-result-container/actions/get-mapped-search-configuration', runOn: 0},{name:'wishlists', path:'@msdyn365-commerce-modules/retail-actions/dist/lib/get-wishlist-by-customer-id', runOn: 0}],\n \n iNM: false,\n ns: '__local__',\n n: 'ext-search-result-container',\n p: '__local__',\n \n pdp: '',\n \n \n md: 'src/modules/ext-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-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 = '@msdyn365-commerce-modules/retail-actions/dist/lib/get-wishlist-by-customer-id';\n let dataAction = require('@msdyn365-commerce-modules/retail-actions/dist/lib/get-wishlist-by-customer-id');\n registerSanitizedActionPath(sanitizedActionPath, dataAction);\n }\n \n\n {\n const sanitizedActionPath = 'modules/ext-search-result-container/actions/get-full-products-by-collection';\n let dataAction = require('partner/modules/ext-search-result-container/actions/get-full-products-by-collection');\n registerSanitizedActionPath(sanitizedActionPath, dataAction);\n }\n \n\n {\n const sanitizedActionPath = 'modules/ext-search-result-container/actions/get-mapped-search-configuration';\n let dataAction = require('partner/modules/ext-search-result-container/actions/get-mapped-search-configuration');\n registerSanitizedActionPath(sanitizedActionPath, dataAction);\n }\n \n\n {\n const sanitizedActionPath = 'modules/ext-search-result-container/actions/get-refiners-for-collection';\n let dataAction = require('partner/modules/ext-search-result-container/actions/get-refiners-for-collection');\n registerSanitizedActionPath(sanitizedActionPath, dataAction);\n }\n \n\n {\n const sanitizedActionPath = 'modules/ext-search-result-container/list-page-state';\n let dataAction = require('partner/modules/ext-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|ext-search-result-container|ext-search-result-container'] = {\n c: () => require('partner/modules/ext-search-result-container/ext-search-result-container.view.tsx'),\n cn: '__local__-__local__-ext-search-result-container'\n };\nviewDictionary['__local__|__local__|themes|only|views|ext-search-result-container'] = {\n c: () => require('partner/themes/only/views/ext-search-result-container.view.tsx'),\n cn: '__local__-__local__-ext-search-result-container'\n };\nwindow.__bindings__ = window.__bindings__ || {};\nwindow.__bindings__.viewDictionary = {\n ...window.__bindings__.viewDictionary || {},\n ...viewDictionary\n };","module.exports = React;","module.exports = ReactDOM;"],"names":["BaseCollectionInput","constructor","pageType","apiSettings","queryResultSettings","refiners","category","searchText","includeAttributes","isUpdateRefinerPanel","locale","catalogId","channelInventoryConfiguration","inventoryRefiner","getCacheKey","_objectSpread","this","Paging","toJS","Sorting","generateCacheKey","key","value","map","refiner","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","getCatalogId","sorting","Columns","JSON","parse","decodeURIComponent","itemId","q","recommendation","productId","stringify","ProductId","Recommendation","Error","ProductListInventoryFilteringOptions","GetFullProductsByCollectionInput","length","async","returnProducts","productSearchResults","context","input","metadataCount","_context$requestConte3","_context$requestConte4","_context$requestConte5","_context$requestConte6","productSearchResultsWithImages","productSearchResult","_context$requestConte","newImageUrl","generateProductImageUrl","_context$requestConte2","PrimaryImageUrl","app","useCommercialStyleName","Name","getCommercialName","AttributeValues","commercialStyleNameAttribute","searchVariantLimit","categoryVariantLimit","variantLimit","expandWithVariants","inventoryLevel","InventoryLevels","threshold","enableStockCheck","products","count","ArrayExtensions","hasElements","element","RecordId","InventoryProductAttributeRecordId","inventoryRanges","TextValue","InventoryOutOfStockAttributeValueText","channelInventoryConfigurationId","inventoryAwareSortableAttributeId","ProductAvailabilitySortableAttributeRecordId","mappedProducts","arguments","variantProducts","product","_product$AttributeVal","color","find","attribute","_attribute$Name","toLowerCase","colors","split","slice","_prod$AttributeValues","prod","_cloneDeep","forEach","_attribute$Name2","_attribute$Swatches","Swatches","swatch","IsDefault","SwatchValue","push","actionDataAction","createObservableDataAction","id","action","_context$requestConte7","_context$requestConte8","_context$requestConte9","_context$requestConte10","promise","channelInventoryConfigurationPromise","searchProductId","searchCriteriaInput","Context","ChannelId","channelId","CatalogId","Refinement","IncludeAttributes","SkipVariantExpansion","AsyncResult","resolve","getInventoryConfigurationAsync","callerContext","filter","isInStockRefiner","inventoryRefinerValue","getInventorySortableRefinerValue","some","productListInventoryDisplay","HideOOS","isInStock","inventoryInStockRefinerValue","SortOOS","_input$queryResultSet","_input$queryResultSet2","sortColumnName","column","ColumnName","IsDescending","CategoryIds","searchByCriteriaAsync","SearchCondition","searchObject","Number","isNaN","RecommendationListId","Ids","appConfig","dimensionToPreSelectInProductCard","swatchToTrim","enableSwatchLimiting","swatchLimit","swatchLimitCategoryPages","swatchLimitSearchPages","predicateMapper","index","list","inputAttributeValues","attributeToTrim","_attribute$KeyName","KeyName","swatchesToDisplay","swatchesExcluded","indexOfTrimmedAttribute","indexOf","additionalSwatches","metadata","Top","itemsPerPage","skip","Skip","DataTypeValue","AttributeDataType","TrueFalse","UnitText","RowNumber","Count","ExtensionProperties","RefinerSourceValue","ProductRefinerSource","Attribute","_input$channelInvento2","getProductRefinerHierarchy","_input$channelInvento3","inventoryProductAttributeRecordId","sortOptions","sortByOptionRelevanceDesc","sortByOptionRatingAsc","sortByOptionRatingDesc","sortByOptionNameAsc","sortByOptionNameDesc","sortByOptionPriceAsc","sortByOptionPriceDesc","sortByOptionBestSelling","sortByOptionNewScore","sortByOptionTrendingScore","MappedSearchInput","buildCacheKey","getMappedSearchConfiguration","ctx","getSearchConfigurationAsync","then","searchConfiguration","ProductSortColumns","sortColumn","toUpperCase","telemetry","warning","Boolean","createInput","getMappedSearchConfigurationDataAction","searchCriteria","getProductSearchRefinersAsync","productRefiners","trace","result","productRefiner","DefaultValues","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","MsDyn365","isBrowser","URL","window","location","url","requestUrl","ProductRefinerValueDataTypeValue","ProductRefinerTypeValue","isRangeType","dataTypeValue","Currency","Decimal","Integer","findMatchingRefinementCriterion","productRefinerValue","refinementCriteria","refinementCriterion","isMatchingRefinementCriterion","getUpdatedRefinementCriteria","itemToggleNotification","currentRefinementCriteria","updatedRefinementCriteria","toggledItemFound","selectedCriterion","isSelecting","next","rangeStart","rangeEnd","Text","parentProductRefinerHierarchy","RefinerTypeValue","RefinerType","SingleSelect","Values","child","matchingIndex","findIndex","criterion","splice","ChoiceSummary","React","props","super","closeButtonGlyph","_onClick","e","preventDefault","stopPropagation","target","currentTarget","clearAll","getAttribute","includes","selectedRefiner","_getSelectedRefinerChoice","onChoiceClicked","itemClicked","choiceClicked","nextItemToFocus","nextSibling","payLoad","getPayloadObject","telemetryContent","_this$props$context","selectedChoices","refinerHierarchy","choice","parent","hierarchy","_getKeyForRefinerValue","render","clearAllText","label","classNames","choiceAriaLabel","closeAriaLabel","items","selectedRefinersMap","contentAction","etext","clearAllAttributes","getTelemetryAttributes","className","classnames","item","Object","assign","urlBuilder","onClick","role","LeftValueBoundLocalizedString","choiceFormat","choiceRangeValueFormat","refinerValues","overallFormat","rangeFormat","refinerValueName","refinerName","replace","_formatPrice","filterValue","amount","currency","cultureFormatter","formatCurrency","error","selected","__decorate","computed","observer","ErrorMessage","_ref","text","FeatureSearchResultItem","_context$request$app","imageSettings","resources","productName","productRecordId","productUrl","getProductPageUrlSync","actionContext","fallbackImage","getFallbackImageUrl","ItemId","request","OmniChannelMedia","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","getInventoryLabel","inventoryAttribute","ProductSearchResultItems","moduleType","moduleId","allowBackNavigation","quickviewSlot","productComparisonButton","isPriceMinMaxEnabled","productsDimensionAvailabilities","wishlist","wishlistInProductCard","productPrices","priceResources","priceRangeSeparator","memberPriceMessage","saleMessage","ProductComponent","freePriceText","priceFree","originalPriceText","currentPriceText","ratingAriaLabel","allowBack","typeName","data","quickViewButton","inventoryLabel","swatchItemAriaLabel","dimensionAvailabilities","dimensionAvailability","masterProductId","MasterProductId","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","String","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","_productRefinerValue$","_this$props$parentPro","_this$props$parentPro2","_this$props","productCountAriaLabel","singleProductCountAriaLabel","children","refineItemAriaLabel","refineItemsAriaLabel","attrs","_objectWithoutProperties","_excluded","isSingleSelect","itemTypeClassName","SourceValue","Rating","_renderRating","productText","productCount","refineMenuItemAriaLabel","format","dimensionType","toLocaleLowerCase","shouldDisplayAsSwatch","_getShouldDisplayAsSwatch","hasColor","StringExtensions","isNullOrWhitespace","SwatchColorHexCode","hasImage","SwatchImageUrl","hasContentSwatch","_getRefinerUrl","tabIndex","_renderSwatch","checkIfShouldDisplayAsSwatch","_productRefinerValue$2","swatchItems","colorHexCode","SwatchComponent","isSelectionEnabled","isRefineItem","ratingUserCountAriaLabel","ratingSingleUserCountAriaLabel","_productRefinerValue$3","refinerRating","parseInt","ratingRefiner","selectedRefinerValues","selectedRating","defaultChkProductCount","ratingComponentClass","productCountAriaLabelValue","isMobileView","RatingComponent","avgRating","ratingCount","hideCount","readOnly","moduleTypeName","RefineSubmenu","_onToggleItem","_onToggleSubmenu","isExpanded","isExpandedOnInitialLoad","expanded","_this$props$colorRefi","_this$props$sizeRefin","_productRefinerHierar","productRefinerHierarchy","colorRefinerLabel","sizeRefinerLabel","hideRating","Collapse","timeout","_renderChildItems","_renderRange","_renderSingleMultiSelect","isMobile","refinerValuesList","listItems","selectedValue","_getRangeType","DisplayTemplateValue","DisplayTemplate","Range","SliderWithBars","onUpdateRefiners","prevState","Separator","separator","Title","expandRefinersCount","SearchResultContainer","SearchResultContainer_1","_props$context$reques","sortByDropdownOptions","_pageType","_viewport","expandrefinerCount","defaultPageNumber","isListPageStateUpdated","_isMounted","_updateVariantAvailability","dimensionsToDisplayOnProductCard","dimensionsInProductCard","dimensionsToDisplayAsSwatch","dimensionsAsSwatchType","DimensionTypes","none","_getProductsDimensionsAvailabilities","_updateListPageState","listPageState","_this$props$context$r","_this$props$config$it","_this$props$config$it2","_this$props$context$r2","querySorting","currentPageNumber","sortingCritera","pageSize","activeProducts","totalProductCount","activeFilters","featureProduct","_this$props$data$list","_this$props$data$list2","productsList","getDimensionAvailabilitiesForProductSearchResultAction","DimensionAvailabilitiesForProductSearchResultInput","DimensionSwatchDisplayTypes","productCard","_getActivePrice","_this$props$data$list3","_this$props$data$list4","getPriceForProductSearchResultAction","PriceForProductSearchResultInput","_getSearchResultModal","modal","modalHeader","modalFooter","modalBody","ModalBody","SearchResultModal","modalIsOpen","_modalToggleRef","_toggleModal","_getCollectionTitle","collectionTitle","_this$props$context$r3","getFriendlyName","NameTranslations","productCountNumber","productCountText","numberOfProducts","oneProduct","TitleContainer","telemetryPageName","titlePrefix","searchTextPrefix","titleText","titleCount","_getCategoryHierarchy","categoryHierarchy","CategoryHierarchyContainer","tag","categoryHierarchyList","categoryLinkAriaLabel","Url","categoryHierarchySeparator","_getSortingDropDown","activeDropdown","_getCurrentlySelectedOption","sortingState","selectedSortByOption","dropdownOptions","_getAllSortByOptions","dropdownOption","SortingContainer","sortByDropDown","LabeledDropdown","labelClassname","labelText","sortByDropdownLabel","dropdownId","dropdownClassname","toggleColor","selectedOption","onSelectOption","_updateSortByDropdown","_sortAndFilterContainerRef","_getPagination","totalItems","previousText","flipperPrevious","nextText","flipperNext","UncontrolledPagination","paginationAriaLabel","qsp","startingItem","_renderPrev","_renderNext","previousAriaLabel","nextAriaLabel","_getRefineMenu","tempRangeTypeTODO","inputRange","validRefiners","_shouldHideFromRefiners","activeRefiners","_getexpandRefinerCount","expandedRefiners","RefineMenuContainer","RefinerSectionContainer","_refineItemCommonProps","_onUpdateRefiners","_buildRefinerUrl","_this$props$data$prod","_this$props$data$prod2","_this$props$data$prod3","_this$props$data$prod4","isInventorySortableAttribute","isInventoryProductAttribute","_getChoiceSummary","_this$props$data$refi","selectedRefiners","rating","choiceSummaryLabel","_onChoiceClicked","_buildRefinerUrlForChoiceSummary","_getProducts","_this$props$slots","_this$props$data$feat","_this$props$data$prod5","shouldAllowBackNavigation","wishlists","wishlistItems","breadCrumbType","breadcrumbType","shouldAllowBack","slots","quickview","isPriceMinMaxFeatureState","featureState","IsEnabled","notification","history","pushState","_getSortColumnFromSelectedOption","transaction","option","mappedConfiguration","_getSortCriteriaColumn","_this$props$data$list5","sortCriteria","queryColumns","mappedSearchConfiguration","mappedSearchConfig","validValues","activeSortColumn","activeMappedConfig","_this$props$data$list6","newRefinementCriteria","dropdownElementId","dropdownElement","selectedChoice","isClearAll","refinerCount","all","one","two","three","four","paginationPreviousText","paginationNextText","device","Type","_updateViewport","pending","validationErrorNotNumber","validationErrorNotRange","getTelemetryObject","friendlyName","nameTranslations","_nameTranslation","nameTranslation","Language","addEventListener","hideProductsWithoutImages","MutationObserver","mutations","mutation","type","firstChild","closest","style","display","container","documentElement","body","observe","attributes","childList","characterData","subtree","StoreOperationsDataActions","reaction","_listPageState$active","_listPageState$sortin","_newListPageState$cur","_newListPageState$sor","_newListPageState$act","_this$props$context$r4","_this$props$context$r5","_this$props$context$r6","newListPageState","Math","recordId","productResults","getCollectionProducts","enableAffiliationBasedPricing","_newListPageState$cur2","_newListPageState$sor2","_newListPageState$act2","_this$props$context$r7","_this$props$context$r8","refinerInput","getCollectionRefinersAction","componentWillUnmount","removeEventListener","_listPageState$result","_listPageState$result2","_this$props$context$r9","_this$props$data$list7","_this$props$data$list8","productCollection","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","variant","VariantType","Browser","Viewport","observable","createSearchResultModal","modalProps","isRecoSearchPage","createModalBody","renderSort","renderRefiner","Node","submenu","renderCategoryHierarchy","renderTitle","renderTitleCount","_props$context$action","Module","ListPageState","ListPageStateInput","listPageStateAction","createListPageInput","DescriptionInterval","renderProductCards","renderProductCardsDescription","isEnabledProductDescription","_props$data$products$","_props$data$featureSt","isAllowBack","classname","quickviewslot","renderProducts","_props$data$listPageS","productDescriptionInterval","productDescriptionIntervalRemainder0","productDescriptionIntervalRemainder9","configureStickyFilter","isStickyHeader","headerContainer","querySelector","headerHeight","offsetHeight","bannerHeights","headerElement","defaultContainer","refinerElement","scrollTop","classList","add","setAttribute","clientHeight","remove","removeAttribute","renderRefinerMobile","renderRefinerFooter","handler","doneAriaLabel","doneText","renderCategoryDescription","_props$data$category$","description","LocalizedDescription","useEffect","useStickyFilter","stickyFilterSetup","enableStickyHeader","setIsExpanded","useState","wrapperRefiner","refinerRefernce","handleClickOutside","contains","useOutsideClick","showCategoryDescription","categoryDescription","enableProdutDescription","filterText","binding","modules","dataActions","registerSanitizedActionPath","sanitizedActionPath","dataAction","default","prototype","RegistrationId","c","require","$type","da","name","path","runOn","iNM","ns","n","p","pdp","md","__bindings__","viewDictionary","cn","module","exports","ReactDOM"],"sourceRoot":""}