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AClF0B,IAGJ,C,qBCxVjBs4B,EAAOC,QAAUt6B,K,sBCAjBq6B,EAAOC,QAAUC,Q","sources":["webpack://@msdyn365-commerce-partners/fabrikam/./lib/search-result-container/module-registration.js?8625","webpack://@msdyn365-commerce-partners/fabrikam/./src/modules/fabrikam/views/search-result-container.view.tsx?89df","webpack://@msdyn365-commerce-partners/fabrikam/./src/modules/search-result-container/actions/base-collection-action.ts?ec13","webpack://@msdyn365-commerce-partners/fabrikam/./src/modules/search-result-container/actions/get-inventory-refiners.ts?eaa4","webpack://@msdyn365-commerce-partners/fabrikam/./src/modules/search-result-container/actions/get-full-products-by-collection.ts?f1fe","webpack://@msdyn365-commerce-partners/fabrikam/./src/modules/search-result-container/actions/get-mapped-search-configuration.ts?6cc4","webpack://@msdyn365-commerce-partners/fabrikam/./src/modules/search-result-container/actions/get-product-refiner-hierarchy.ts?3937","webpack://@msdyn365-commerce-partners/fabrikam/./src/modules/search-result-container/actions/get-refiners-for-collection.ts?56d8","webpack://@msdyn365-commerce-partners/fabrikam/./src/modules/search-result-container/actions/url-utils.ts?1541","webpack://@msdyn365-commerce-partners/fabrikam/./src/modules/search-result-container/list-page-state.ts?b0a4","webpack://@msdyn365-commerce-partners/fabrikam/./src/modules/search-result-container/components/utilities.ts?8569","webpack://@msdyn365-commerce-partners/fabrikam/./src/modules/search-result-container/components/choice-summary.tsx?3f71","webpack://@msdyn365-commerce-partners/fabrikam/./src/modules/search-result-container/components/error-message.tsx?6302","webpack://@msdyn365-commerce-partners/fabrikam/./src/modules/search-result-container/components/feature-search-result-item.tsx?71fa","webpack://@msdyn365-commerce-partners/fabrikam/./src/modules/search-result-container/components/link.tsx?52c2","webpack://@msdyn365-commerce-partners/fabrikam/./src/modules/search-result-container/components/modal.tsx?d78e","webpack://@msdyn365-commerce-partners/fabrikam/./src/modules/search-result-container/components/product-search-result-items.tsx?5174","webpack://@msdyn365-commerce-partners/fabrikam/./src/modules/search-result-container/components/range-refine-item.tsx?6288","webpack://@msdyn365-commerce-partners/fabrikam/./src/modules/search-result-container/components/refine-item.tsx?a594","webpack://@msdyn365-commerce-partners/fabrikam/./src/modules/search-result-container/components/refine-submenu.tsx?1292","webpack://@msdyn365-commerce-partners/fabrikam/./src/modules/search-result-container/components/separator.tsx?4ea6","webpack://@msdyn365-commerce-partners/fabrikam/./src/modules/search-result-container/components/title.tsx?c269","webpack://@msdyn365-commerce-partners/fabrikam/./src/modules/search-result-container/search-result-container.tsx?7500","webpack://@msdyn365-commerce-partners/fabrikam/./src/modules/search-result-container/search-result-container.view.tsx?b779","webpack://@msdyn365-commerce-partners/fabrikam/./src/modules/adventureworks/views/components/product.component.tsx?fd23","webpack://@msdyn365-commerce-partners/fabrikam/./src/modules/adventureworks/views/search-result-container.view.tsx?6e86","webpack://@msdyn365-commerce-partners/fabrikam/external var \"React\"?0d3b","webpack://@msdyn365-commerce-partners/fabrikam/external var \"ReactDOM\"?853b"],"sourcesContent":["const binding = { modules: {}, dataActions: {} };\n\n const registerActionId = (actionPath) => {\n if (binding.dataActions[actionPath] &&\n binding.dataActions[actionPath].default &&\n binding.dataActions[actionPath].default.prototype &&\n binding.dataActions[actionPath].default.prototype.id) {\n binding.dataActions[binding.dataActions[actionPath].default.prototype.id] = binding.dataActions[actionPath];\n } else {\n Object.keys(binding.dataActions[actionPath] || {}).forEach(exportName => {\n if (binding.dataActions[actionPath][exportName] &&\n binding.dataActions[actionPath][exportName].prototype &&\n binding.dataActions[actionPath][exportName].prototype.Action) {\n binding.dataActions[binding.dataActions[actionPath][exportName].prototype.id] = binding.dataActions[actionPath][exportName];\n }\n })\n }\n };\n\n const registerSanitizedActionPath = (sanitizedActionPath, dataAction) => {\n if (process.env.NODE_ENV === 'development') {\n if (!dataAction.default) {\n throw new Error('Data action path does not have a default export');\n }\n if (!(dataAction.default.prototype.id && binding.dataActions[dataAction.default.prototype.id]) || !binding.dataActions[sanitizedActionPath]) {\n binding.dataActions[sanitizedActionPath] = dataAction;\n }\n } else {\n binding.dataActions[sanitizedActionPath] = dataAction;\n if (!binding.dataActions[sanitizedActionPath].default) {\n throw new Error('Data action path ' + sanitizedActionPath + ' does not have a default export');\n }\n binding.dataActions[sanitizedActionPath].default.prototype.RegistrationId = sanitizedActionPath;\n if (binding.dataActions[sanitizedActionPath].default.prototype.id) {\n binding.dataActions[binding.dataActions[sanitizedActionPath].default.prototype.id] = sanitizedActionPath;\n }\n }\n };\n \n\n (binding.modules['search-result-container'] = {\n c: () => require('@msdyn365-commerce-modules/search-result-container/dist/lib/modules/search-result-container/search-result-container'),\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:'@msdyn365-commerce-modules/search-result-container/dist/lib/modules/search-result-container/list-page-state', runOn: 0},{name:'products', path:'@msdyn365-commerce-modules/search-result-container/dist/lib/modules/search-result-container/actions/get-full-products-by-collection', runOn: 0},{name:'refiners', path:'@msdyn365-commerce-modules/search-result-container/dist/lib/modules/search-result-container/actions/get-refiners-for-collection', runOn: 0},{name:'searchConfiguration', path:'@msdyn365-commerce-modules/search-result-container/dist/lib/modules/search-result-container/actions/get-mapped-search-configuration', runOn: 0}],\n \n iNM: true,\n ns: '@msdyn365-commerce-modules',\n n: 'search-result-container',\n p: 'search-result-container',\n \n pdp: '',\n \n \n md: 'node_modules/@msdyn365-commerce-modules/search-result-container/dist/lib/modules/search-result-container'\n });\n \n\n {\n const sanitizedActionPath = '@msdyn365-commerce-modules/retail-actions/dist/lib/get-current-category';\n let dataAction = require('@msdyn365-commerce-modules/retail-actions/dist/lib/get-current-category');\n registerSanitizedActionPath(sanitizedActionPath, dataAction);\n }\n \n\n {\n const sanitizedActionPath = '@msdyn365-commerce-modules/retail-actions/dist/lib/get-current-category-hierarchy';\n let dataAction = require('@msdyn365-commerce-modules/retail-actions/dist/lib/get-current-category-hierarchy');\n registerSanitizedActionPath(sanitizedActionPath, dataAction);\n }\n \n\n {\n const sanitizedActionPath = '@msdyn365-commerce-modules/retail-actions/dist/lib/get-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/search-result-container/dist/lib/modules/search-result-container/actions/get-full-products-by-collection';\n let dataAction = require('@msdyn365-commerce-modules/search-result-container/dist/lib/modules/search-result-container/actions/get-full-products-by-collection');\n registerSanitizedActionPath(sanitizedActionPath, dataAction);\n }\n \n\n {\n const sanitizedActionPath = '@msdyn365-commerce-modules/search-result-container/dist/lib/modules/search-result-container/actions/get-mapped-search-configuration';\n let dataAction = require('@msdyn365-commerce-modules/search-result-container/dist/lib/modules/search-result-container/actions/get-mapped-search-configuration');\n registerSanitizedActionPath(sanitizedActionPath, dataAction);\n }\n \n\n {\n const sanitizedActionPath = '@msdyn365-commerce-modules/search-result-container/dist/lib/modules/search-result-container/actions/get-refiners-for-collection';\n let dataAction = require('@msdyn365-commerce-modules/search-result-container/dist/lib/modules/search-result-container/actions/get-refiners-for-collection');\n registerSanitizedActionPath(sanitizedActionPath, dataAction);\n }\n \n\n {\n const sanitizedActionPath = '@msdyn365-commerce-modules/search-result-container/dist/lib/modules/search-result-container/list-page-state';\n let dataAction = require('@msdyn365-commerce-modules/search-result-container/dist/lib/modules/search-result-container/list-page-state');\n registerSanitizedActionPath(sanitizedActionPath, dataAction);\n }\n \n\n \n window.__bindings__ = window.__bindings__ || {};\n window.__bindings__.modules = {\n ...window.__bindings__.modules || {},\n ...binding.modules\n };\n \n window.__bindings__.dataActions = {\n ...window.__bindings__.dataActions || {},\n ...binding.dataActions\n };\n export const viewDictionary = {};\n viewDictionary['@msdyn365-commerce-modules|fabrikam-design-kit|modules|fabrikam|views|search-result-container'] = {\n c: () => require('@msdyn365-commerce-modules/fabrikam-design-kit/dist/lib/modules/fabrikam/views/search-result-container.view.js'),\n cn: '@msdyn365-commerce-modules-fabrikam-design-kit-search-result-container'\n };\nviewDictionary['@msdyn365-commerce-modules|search-result-container|modules|search-result-container|search-result-container'] = {\n c: () => require('@msdyn365-commerce-modules/search-result-container/dist/lib/modules/search-result-container/search-result-container.view.js'),\n cn: '@msdyn365-commerce-modules-search-result-container-search-result-container'\n };\nviewDictionary['@msdyn365-commerce-theme|adventureworks-theme-kit|modules|adventureworks|views|search-result-container'] = {\n c: () => require('@msdyn365-commerce-theme/adventureworks-theme-kit/dist/lib/modules/adventureworks/views/search-result-container.view.js'),\n cn: '@msdyn365-commerce-theme-adventureworks-theme-kit-search-result-container'\n };\nwindow.__bindings__ = window.__bindings__ || {};\nwindow.__bindings__.viewDictionary = {\n ...window.__bindings__.viewDictionary || {},\n ...viewDictionary\n };","/*--------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * See License.txt in the project root for license information.\n *--------------------------------------------------------------*/\n\nimport { ICategoryHierarchyViewProps, IRefineMenuViewProps, ISearchResultContainerViewProps, ISearchResultModalViewProps, ISortByViewProps, ITitleViewProps } from '@msdyn365-commerce-modules/search-result-container';\nimport { Module, Node } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nconst SearchResultContainerView: React.FC = props => {\n const { SearchResultContainer, products, pagination, ProductsContainer, ProductSectionContainer, choiceSummary, isMobile, modalToggle, searchResultModal, TitleViewProps,\n refineMenu, categoryHierarchy, sortByOptions, CategoryNavContainer, RefineAndProductSectionContainer, errorMessage, FeatureSearchContainer, similarLookProduct } = props;\n const isRecoSearchPage = props.context.actionContext.requestContext.query?.recommendation;\n if (isMobile) {\n return (\n \n {categoryHierarchy && renderCategoryHierarchy(categoryHierarchy)}\n {renderTitle(TitleViewProps)}\n {choiceSummary}\n {modalToggle}\n {createSearchResultModal(searchResultModal, refineMenu, sortByOptions, isRecoSearchPage)}\n \n {similarLookProduct}\n \n \n {errorMessage}\n {products}\n \n {pagination}\n \n );\n }\n return (\n \n {categoryHierarchy &&\n \n {renderCategoryHierarchy(categoryHierarchy)}\n }\n \n {refineMenu && renderRefiner(refineMenu)}\n \n \n {similarLookProduct}\n \n
\n {TitleViewProps && renderTitle(TitleViewProps)}\n {choiceSummary}\n
\n
\n {sortByOptions && !isRecoSearchPage && renderSort(sortByOptions)}\n
\n \n {errorMessage}\n {products}\n \n {pagination}\n
\n
\n
\n );\n\n};\n\nconst createSearchResultModal = (modalProps: ISearchResultModalViewProps, refineMenu: IRefineMenuViewProps, sortByDropDown: ISortByViewProps,\n isRecoSearchPage?: string): JSX.Element => {\n return React.cloneElement(modalProps.modal, {}, modalProps.modalHeader, createModalBody(modalProps, refineMenu, sortByDropDown, isRecoSearchPage),\n modalProps.modalFooter);\n};\n\nconst createModalBody = (props: ISearchResultModalViewProps, refineMenu: IRefineMenuViewProps,\n sortByDropDown: ISortByViewProps, isRecoSearchPage?: string): JSX.Element | null => {\n if (sortByDropDown) {\n return React.cloneElement(props.modalBody, {}, renderSort(sortByDropDown, isRecoSearchPage), renderRefiner(refineMenu));\n }\n return null;\n};\n\nconst renderRefiner = (props: IRefineMenuViewProps): JSX.Element | null => {\n const { refiners, RefineMenuContainer, RefinerSectionContainer } = props;\n if (refiners) {\n return (\n \n \n {refiners.map((submenu, index) => (\n \n {submenu}\n \n ))}\n \n \n );\n }\n return null;\n};\n\nconst renderSort = (props: ISortByViewProps, isRecoSearchPage?: string): JSX.Element | null => {\n const { SortingContainer, sortByDropDown } = props;\n if (sortByDropDown && !isRecoSearchPage) {\n return (\n \n {sortByDropDown}\n \n );\n }\n return null;\n};\n\nconst renderCategoryHierarchy = (props: ICategoryHierarchyViewProps): JSX.Element | null => {\n const { CategoryHierarchyContainer, categoryHierarchyList, categoryHierarchySeparator } = props;\n if (categoryHierarchyList) {\n return (\n \n {categoryHierarchyList.map((category, index) => (\n \n {category}\n {categoryHierarchyList && categoryHierarchyList[index + 1] && categoryHierarchySeparator}\n \n ))}\n \n );\n }\n\n return null;\n};\n\nconst renderTitle = (props: ITitleViewProps): JSX.Element | null => {\n const { title, TitleContainer } = props;\n if (title) {\n return (\n \n

\n {title.titlePrefix}\n {title.titleText}\n (\n {title.titleCount}\n )\n

\n
\n );\n }\n return null;\n};\n\nexport default SearchResultContainerView;\n","/*--------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * See License.txt in the project root for license information.\n *--------------------------------------------------------------*/\n\nimport {\n CacheType,\n getCatalogId,\n IActionInput,\n IAny,\n ICommerceApiSettings,\n ICreateActionContext,\n IGeneric\n} from '@msdyn365-commerce/core';\nimport { convertToString, IQueryResultSettings, ProductRefinerValue, SortColumn } from '@msdyn365-commerce/retail-proxy';\nimport {\n buildCacheKey,\n QueryResultSettingsProxy\n} from '@msdyn365-commerce-modules/retail-actions';\nimport { toJS } from 'mobx';\n\nimport { hydrateRefinersFromUrl } from './url-utils';\n\n/**\n * Export listPageType.\n */\nexport type listPageType = 'Category' | 'Search' | 'Unknown';\n\n/**\n * Get include attributes from config.\n * @param inputData - ICreateActionContext.\n * @returns Boolean.\n */\nfunction getIncludeAttributes(inputData: ICreateActionContext, IGeneric>): boolean {\n if (inputData &&\n inputData.config &&\n inputData.config.includeAttributes !== undefined &&\n inputData.config.includeAttributes === true) {\n return true;\n }\n return false;\n}\n\n/**\n * Get updateRefinerPanel from config.\n * @param inputData - ICreateActionContext.\n * @returns Boolean.\n */\nfunction getUpdateRefinerPanel(inputData: ICreateActionContext, IGeneric>): boolean {\n return !!inputData.config?.updateRefinerPanel;\n}\n\n/**\n * BaseCollection Action Input.\n */\nexport class BaseCollectionInput implements IActionInput {\n public pageType: listPageType;\n\n public category: number | undefined;\n\n public searchText: string | undefined;\n\n public refiners: ProductRefinerValue[];\n\n public queryResultSettings: IQueryResultSettings;\n\n public apiSettings: ICommerceApiSettings;\n\n public includeAttributes: boolean | undefined;\n\n public locale?: string;\n\n public isUpdateRefinerPanel?: boolean;\n\n public catalogId?: number;\n\n public constructor(\n pageType: listPageType,\n apiSettings: ICommerceApiSettings,\n queryResultSettings: IQueryResultSettings,\n refiners: ProductRefinerValue[],\n category: number | undefined,\n searchText: string | undefined,\n includeAttributes: boolean | undefined,\n isUpdateRefinerPanel?: boolean | undefined,\n locale?: string,\n catalogId?: number\n ) {\n this.pageType = pageType;\n this.apiSettings = apiSettings;\n this.category = category;\n this.searchText = searchText;\n this.queryResultSettings = queryResultSettings;\n this.refiners = refiners;\n this.includeAttributes = includeAttributes;\n this.isUpdateRefinerPanel = isUpdateRefinerPanel;\n this.locale = locale;\n this.catalogId = catalogId ?? 0;\n }\n\n public getCacheKey = () => {\n const queryResultSettings = {\n ...this.queryResultSettings.Paging,\n ...toJS(this.queryResultSettings.Sorting)\n };\n\n const cacheKey = buildCacheKey(\n // eslint-disable-next-line @typescript-eslint/restrict-template-expressions -- disabling this as inputs can be undefined depending on page type\n `${this.pageType}-${this.locale}-${this.category || this.searchText}-${this.catalogId}-${this.refiners.map(refiner => `${refiner.RefinerRecordId + (refiner.LeftValueBoundString || '') + (refiner.RightValueBoundString || '')}-`)}-${convertToString(queryResultSettings)}`, this.apiSettings, this.locale\n );\n return cacheKey;\n };\n\n public getCacheObjectType = () => 'CollectionActionResult';\n\n public dataCacheType = (): CacheType => 'request';\n}\n\n// TODO: Create a data model here or import one to capture the response of the action\nexport interface IGetFullProductsByCollectionData {\n text: string;\n}\n\nexport type CollectionClassConstructor = new (\n pageType: listPageType,\n apiSettings: ICommerceApiSettings,\n queryResultSettings: IQueryResultSettings,\n refiners: ProductRefinerValue[],\n category: number | undefined,\n searchText: string | undefined,\n includeAttributes: boolean | undefined,\n isUpdateRefinerPanel?: boolean | undefined,\n locale?: string,\n catalogId?: number\n) => BaseCollectionInput;\n\n/**\n * TODO: Use this function to create the input required to make the action call.\n * @param args\n * @param inputClassConstuctor\n */\nexport const createBaseCollectionInput = (\n args: ICreateActionContext,\n inputClassConstuctor: CollectionClassConstructor\n): BaseCollectionInput => {\n const pageType =\n args.requestContext.urlTokens.pageType === 'Category' || (args.requestContext.query && args.requestContext.query.categoryId) ? 'Category' : 'Search';\n\n const queryResultSettings = QueryResultSettingsProxy.fromInputData(args).QueryResultSettings;\n const queryRefiners = hydrateRefinersFromUrl(args.requestContext);\n const includeAttributes = getIncludeAttributes(args);\n const isUpdateRefinerPanel = getUpdateRefinerPanel(args);\n const catalogId = getCatalogId(args.requestContext);\n\n if (args.requestContext.query && args.requestContext.query.sorting) {\n queryResultSettings.Sorting = { Columns: JSON.parse(decodeURIComponent(args.requestContext.query.sorting)) };\n }\n\n if (pageType === 'Category') {\n return new inputClassConstuctor(\n pageType,\n args.requestContext.apiSettings,\n queryResultSettings,\n queryRefiners,\n +(args.requestContext.urlTokens.itemId || (args.requestContext.query && args.requestContext.query.categoryId) || 0),\n undefined,\n includeAttributes,\n isUpdateRefinerPanel,\n args.requestContext.locale,\n catalogId\n );\n } else if (pageType === 'Search' && args.requestContext.query && args.requestContext.query.q) {\n return new inputClassConstuctor(\n pageType,\n args.requestContext.apiSettings,\n queryResultSettings,\n queryRefiners,\n undefined,\n args.requestContext.query.q,\n includeAttributes,\n isUpdateRefinerPanel,\n args.requestContext.locale,\n catalogId\n );\n } else if (pageType === 'Search' && args.requestContext.query && args.requestContext.query.productId && args.requestContext.query.recommendation) {\n return new inputClassConstuctor(\n pageType,\n args.requestContext.apiSettings,\n queryResultSettings,\n queryRefiners,\n undefined,\n JSON.stringify({ ProductId: args.requestContext.query.productId, Recommendation: args.requestContext.query.recommendation }),\n includeAttributes,\n isUpdateRefinerPanel,\n args.requestContext.locale,\n catalogId\n );\n }\n\n throw new Error('[getFullProductsForCollection]Unable to create input');\n};\n","/*--------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * See License.txt in the project root for license information.\n *--------------------------------------------------------------*/\n\nimport { IProductRefinerHierarchy } from '@msdyn365-commerce/commerce-entities';\nimport { CacheType, createObservableDataAction, IAction, IActionContext, IActionInput } from '@msdyn365-commerce/core';\nimport { buildCacheKey } from '@msdyn365-commerce-modules/retail-actions';\n\nimport { BaseCollectionInput } from './base-collection-action';\nimport { getProductRefinerHierarchy } from './get-product-refiner-hierarchy';\n\n/**\n * InventoryInStockRefinerValue Input action.\n */\nexport class InventoryInStockRefinerValueInput extends BaseCollectionInput implements IActionInput {\n public inventoryProductAttributeRecordId: number;\n\n public constructor(input: BaseCollectionInput, inventoryProductAttributeRecordId: number = 0) {\n super(\n input.pageType,\n input.apiSettings,\n input.queryResultSettings,\n\n // Parameter - refiners\n [],\n\n // Parameter - category\n undefined,\n\n // Parameter - searchText\n '',\n\n // Parameter - includeAttributes\n false,\n\n // Parameter - isUpdateRefinerPanel\n false,\n\n // Parameter - locale\n undefined,\n input.catalogId\n );\n\n this.inventoryProductAttributeRecordId = inventoryProductAttributeRecordId;\n }\n\n /**\n * GetCacheKey.\n * @returns - Returns string.\n */\n public getCacheKey = (): string => buildCacheKey('RefinerList', this.apiSettings);\n\n /**\n * GetCacheObjectType.\n * @returns - Returns string.\n */\n public getCacheObjectType = (): string => 'RefinerList';\n\n /**\n * DataCacheType.\n * @returns - CacheType string.\n */\n public dataCacheType = (): CacheType => 'application';\n}\n\n/**\n * Action method returns inventory in stock refiners.\n * @param input - InventoryInStockRefinerValueInput.\n * @param context - IActionContext.\n * @returns - Promise.\n */\nasync function action(input: InventoryInStockRefinerValueInput, context: IActionContext): Promise {\n\n const refiners = await getProductRefinerHierarchy(\n {\n Context: {\n ChannelId: input.apiSettings.channelId,\n CatalogId: input.catalogId\n }\n },\n input.queryResultSettings,\n context);\n\n return refiners.find(refiner => refiner.RecordId === input.inventoryProductAttributeRecordId) ?? null;\n}\n\n/**\n * Action.\n * @param id - Id.\n * @param action - Action.\n * @returns - Results.\n */\nexport const actionDataAction = createObservableDataAction({\n id: '@msdyn365-commerce-modules/search-result-container/get-inventory-refiners',\n action: action as IAction\n});\n\nexport default actionDataAction;\n","/*--------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * See License.txt in the project root for license information.\n *--------------------------------------------------------------*/\n\nimport {\n CacheType,\n createObservableDataAction,\n IAction,\n IActionContext,\n IActionInput,\n ICreateActionContext\n} from '@msdyn365-commerce/core';\nimport { AsyncResult, ChannelInventoryConfiguration, ProductRefinerValue, ProductSearchCriteria, ProductSearchResult } from '@msdyn365-commerce/retail-proxy';\nimport { searchByCriteriaAsync } from '@msdyn365-commerce/retail-proxy/dist/DataActions/ProductsDataActions.g';\nimport { getInventoryConfigurationAsync } from '@msdyn365-commerce/retail-proxy/dist/DataActions/StoreOperationsDataActions.g';\nimport { ArrayExtensions, generateProductImageUrl, InventoryLevels } from '@msdyn365-commerce-modules/retail-actions';\n\nimport {\n BaseCollectionInput,\n createBaseCollectionInput\n} from './base-collection-action';\nimport getInventoryRefinersAction, { InventoryInStockRefinerValueInput } from './get-inventory-refiners';\n\n/**\n * GetFullProductsByCollection Action Input.\n */\nexport class GetFullProductsByCollectionInput extends BaseCollectionInput implements IActionInput {\n /**\n * The cache object type.\n * @returns The cache object type.\n */\n public getCacheObjectType = (): string => 'FullProductSearchResult';\n\n /**\n * The data cache type.\n * @returns The data cache type.\n */\n public dataCacheType = (): CacheType => {\n if (\n this.pageType !== 'Category' ||\n (this.refiners && this.refiners.length > 0) ||\n (this.queryResultSettings && this.queryResultSettings.Sorting && this.queryResultSettings.Sorting.Columns && this.queryResultSettings.Sorting.Columns.length > 0)\n ) {\n return 'request';\n }\n return 'application';\n\n };\n}\n\n/**\n * This setting defines inventory filtering options.\n */\nexport enum ProductListInventoryFilteringOptions {\n\n /**\n * Filter out all products out of stock.\n */\n HideOOS = 'hideOOS',\n\n /**\n * Sort products by availability, OOS goes last.\n */\n SortOOS = 'sortOOS',\n\n /**\n * No filtering selected.\n */\n Default = 'default'\n}\n\n/**\n * The full product search result with count interface.\n */\nexport interface IFullProductsSearchResultsWithCount {\n products: ProductSearchResult[];\n count: number;\n channelInventoryConfigurationId?: number;\n inventoryAwareSortableAttributeId?: number;\n}\n\n/**\n * CreateInput function which creates and actionInput used to fetch products for a list page.\n * @param args - The API arguments.\n * @returns IActionInput - The action input.\n */\n// eslint-disable-next-line unicorn/prevent-abbreviations, @typescript-eslint/naming-convention -- Public name.\nconst createInput = (args: ICreateActionContext<{ itemsPerPage: number ;includedAttributes: boolean | undefined }>): IActionInput => {\n const input = createBaseCollectionInput(args, GetFullProductsByCollectionInput);\n\n // Set Top\n if (input.queryResultSettings.Paging && args.config) {\n input.queryResultSettings.Paging.Top = args.config.itemsPerPage || 1;\n }\n\n // Set Skip\n if (input.queryResultSettings.Paging && args.requestContext.query && args.requestContext.query.skip) {\n input.queryResultSettings.Paging.Skip = +args.requestContext.query.skip;\n }\n\n input.queryResultSettings.count = true;\n\n return input;\n};\n\n/**\n * Returns sorted products based on availability.\n * @param input - The GetFullProductsByCollectionInput input.\n * @param context - The context.\n * @param channelInventoryConfiguration - The channelInventoryConfiguration.\n * @returns Refiners.\n */\nasync function getInventoryInStockRefinerValueAsync(\n input: GetFullProductsByCollectionInput,\n context: IActionContext,\n channelInventoryConfiguration: ChannelInventoryConfiguration): Promise {\n const refinerInput = new InventoryInStockRefinerValueInput(input, channelInventoryConfiguration.InventoryProductAttributeRecordId);\n\n const inventoryRefiner = await getInventoryRefinersAction(refinerInput, context);\n\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- inventoryRefiner may be null\n return inventoryRefiner?.Values.find(value => value.LeftValueBoundString !==\n channelInventoryConfiguration.InventoryOutOfStockAttributeValueText &&\n value.RightValueBoundString !== channelInventoryConfiguration.InventoryOutOfStockAttributeValueText) ?? null;\n}\n\n/**\n * Returns list of products based on inventory information.\n * @param productSearchResults - The products.\n * @param context - The context.\n * @param metadataCount - The metadata count.\n * @param channelInventoryConfiguration - The channel inventory configuration.\n * @returns List of product based on the inventory information.\n */\nexport async function returnProducts(\n productSearchResults: ProductSearchResult[],\n context: IActionContext,\n metadataCount: number | undefined,\n channelInventoryConfiguration?: ChannelInventoryConfiguration): Promise {\n\n const defaultProductCount: number = 0;\n\n const productSearchResultsWithImages = productSearchResults.map(productSearchResult => {\n const newImageUrl = generateProductImageUrl(\n productSearchResult,\n context.requestContext.apiSettings\n );\n\n if (newImageUrl) {\n productSearchResult.PrimaryImageUrl = newImageUrl;\n }\n\n return (productSearchResult);\n });\n\n // If inventory level is threshold or inventory check is disabled then return the list of products without the inventory configuration\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access -- read config file.\n if (context.requestContext.app.config.inventoryLevel === InventoryLevels.threshold || context.requestContext.app.config.enableStockCheck === false) {\n return {\n products: productSearchResultsWithImages,\n count: metadataCount ?? defaultProductCount\n };\n }\n\n const inventoryConfiguration = channelInventoryConfiguration ?? await getInventoryConfigurationAsync({ callerContext: context });\n\n const mappedProducts = productSearchResultsWithImages.map(productSearchResult => {\n if (ArrayExtensions.hasElements(productSearchResult.AttributeValues)) {\n for (const element of productSearchResult.AttributeValues) {\n if (channelInventoryConfiguration &&\n element.RecordId !== undefined &&\n element.RecordId === channelInventoryConfiguration.InventoryProductAttributeRecordId &&\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access -- read config file.\n context.requestContext.app.config.inventoryRanges !== 'all' &&\n element.TextValue !== channelInventoryConfiguration.InventoryOutOfStockAttributeValueText) {\n // If same RecordId then it means that is the Inventory attribute\n // Based on the inventory range (and filtering options), the inventory label will be displayed\n // If Inventory range is 'All' then in stock and out of stock labels are shown, else only OOS\n // if the text value is different that the channelInventoryConfiguration.InventoryOutOfStockAttributeValueText then is in stock\n element.TextValue = '';\n }\n }\n }\n\n return (productSearchResult);\n });\n\n return {\n products: mappedProducts,\n count: metadataCount ?? defaultProductCount,\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- check config.\n channelInventoryConfigurationId: inventoryConfiguration ? inventoryConfiguration.InventoryProductAttributeRecordId : undefined,\n inventoryAwareSortableAttributeId: inventoryConfiguration ? inventoryConfiguration.ProductAvailabilitySortableAttributeRecordId : undefined\n };\n}\n\n/**\n * Action function to fetch products for a list page.\n * @param input - The input.\n * @param context - The context.\n * @returns IFullProductsSearchResultsWithCount - The full product search result with count.\n */\n// eslint-disable-next-line complexity -- ignore the complexity.\nasync function action(\n input: GetFullProductsByCollectionInput,\n context: IActionContext\n): Promise {\n\n let promise: AsyncResult;\n let searchProductId;\n const searchCriteriaInput: ProductSearchCriteria = {};\n searchCriteriaInput.Context = { ChannelId: context.requestContext.apiSettings.channelId, CatalogId: input.catalogId };\n searchCriteriaInput.Refinement = input.refiners;\n searchCriteriaInput.IncludeAttributes = input.includeAttributes;\n searchCriteriaInput.SkipVariantExpansion = true;\n const defaultNumber: number = 0;\n\n const channelInventoryConfiguration = await getInventoryConfigurationAsync({ callerContext: context });\n\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access -- app configs are of generic type\n if (context.requestContext.app.config?.productListInventoryDisplay === ProductListInventoryFilteringOptions.HideOOS) {\n const refinerValue = await getInventoryInStockRefinerValueAsync(input, context, channelInventoryConfiguration);\n const isInventoryAvailableRefinerValueExist = searchCriteriaInput.Refinement.some(value => value.RefinerRecordId === refinerValue?.RefinerRecordId);\n if (!isInventoryAvailableRefinerValueExist && refinerValue) {\n searchCriteriaInput.Refinement.push(refinerValue);\n }\n }\n\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access -- app configs are of generic type\n if (context.requestContext.app.config?.productListInventoryDisplay === ProductListInventoryFilteringOptions.SortOOS &&\n channelInventoryConfiguration.ProductAvailabilitySortableAttributeRecordId) {\n input.queryResultSettings.Sorting = input.queryResultSettings.Sorting ?? {};\n input.queryResultSettings.Sorting.Columns = input.queryResultSettings.Sorting.Columns ?? [];\n const sortColumnName = `Attr_${channelInventoryConfiguration.ProductAvailabilitySortableAttributeRecordId}`;\n const isSortAttributeExist = input.queryResultSettings.Sorting.Columns.some(column => column.ColumnName === sortColumnName);\n if (!isSortAttributeExist) {\n input.queryResultSettings.Sorting.Columns.push({\n ColumnName: sortColumnName,\n IsDescending: true\n });\n }\n }\n\n if (input.pageType === 'Category' || context.requestContext.query?.categoryId) {\n if (input.category) {\n searchCriteriaInput.CategoryIds = [input.category || defaultNumber];\n promise = searchByCriteriaAsync(\n {\n callerContext: context,\n queryResultSettings: input.queryResultSettings\n },\n searchCriteriaInput\n );\n } else {\n throw new Error(\n '[GetFullProductsForCollection]Category Page Detected, but no global categoryId found'\n );\n }\n } else if (input.searchText && context.requestContext.query?.q) {\n searchCriteriaInput.SearchCondition = input.searchText;\n promise = searchByCriteriaAsync(\n {\n callerContext: context,\n queryResultSettings: input.queryResultSettings\n },\n searchCriteriaInput\n );\n } else if (input.searchText && context.requestContext.query?.productId && context.requestContext.query.recommendation) {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment -- Existing code\n const searchObject = JSON.parse(input.searchText);\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access -- Existing code\n searchProductId = Number(searchObject.ProductId);\n if (Number.isNaN(searchProductId)) {\n throw new Error('Failed to cast search product id into a number.');\n } else if (\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access -- Existing code\n !searchObject.Recommendation) {\n throw new Error('Failed to retrieve the Recommendation.');\n } else {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access -- Existing code\n searchCriteriaInput.RecommendationListId = searchObject.Recommendation;\n searchCriteriaInput.Ids = [searchProductId || defaultNumber];\n promise = searchByCriteriaAsync(\n {\n callerContext: context,\n queryResultSettings: input.queryResultSettings\n },\n searchCriteriaInput\n );\n }\n } else {\n throw new Error(\n '[GetFullProductsForCollection]Search Page Detected, but no q= or productId= query parameter found'\n );\n }\n\n const productSearchResults = await promise;\n return returnProducts(productSearchResults, context, promise.metadata.count, channelInventoryConfiguration);\n}\n\nexport const actionDataAction = createObservableDataAction({\n id: '@msdyn365-commerce-modules/search-result-container/get-full-products-by-collection',\n action: action as IAction,\n input: createInput\n});\n\nexport default actionDataAction;\n","/*--------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * See License.txt in the project root for license information.\n *--------------------------------------------------------------*/\n\nimport { CacheType, createObservableDataAction, IAction, IActionContext, IActionInput, IAny, ICommerceApiSettings, ICreateActionContext, IGeneric } from '@msdyn365-commerce/core';\nimport { SortColumn } from '@msdyn365-commerce/retail-proxy';\nimport { getSearchConfigurationAsync } from '@msdyn365-commerce/retail-proxy/dist/DataActions/StoreOperationsDataActions.g';\nimport { buildCacheKey } from '@msdyn365-commerce-modules/retail-actions';\n\n// TODO: import from commerce entities when available\ninterface SearchConfiguration {\n ProductSortColumns?: SortColumn[];\n}\n\nexport interface MappedSearchConfiguration {\n key: string;\n sortColumn: SortColumn;\n}\n\nexport const sortOptions = {\n sortByOptionRelevanceDesc: 'Ranking-Desc',\n sortByOptionRatingAsc: 'AverageRating-Asc',\n sortByOptionRatingDesc: 'AverageRating-Desc',\n sortByOptionNameAsc: 'Name-Asc',\n sortByOptionNameDesc: 'Name-Desc',\n sortByOptionPriceAsc: 'Price-Asc',\n sortByOptionPriceDesc: 'Price-Desc',\n sortByOptionBestSelling: 'BestSelling',\n sortByOptionNewScore: 'NewScore',\n sortByOptionTrendingScore: 'TrendingScore'\n};\n\n/**\n * ActionInput class for the get-mapped-search-configuration Data Action.\n */\nexport class MappedSearchInput implements IActionInput {\n private readonly apiSettings: ICommerceApiSettings;\n\n constructor(apiSettings: ICommerceApiSettings) {\n this.apiSettings = apiSettings;\n }\n\n public getCacheKey = () => buildCacheKey('MappedSearchInput', this.apiSettings);\n\n public getCacheObjectType = () => 'MappedSearchInput';\n\n public dataCacheType = (): CacheType => 'request';\n}\n\n/**\n * Get a mapped search configuration that is easy to use for sorting.\n * @param input\n * @param ctx\n */\nexport async function getMappedSearchConfiguration(input: MappedSearchInput, ctx: IActionContext): Promise {\n return getSearchConfigurationAsync({ callerContext: ctx }).then((searchConfiguration: SearchConfiguration) => {\n return ((searchConfiguration.ProductSortColumns || []).map((sortColumn: SortColumn) => {\n let key = '';\n if (sortColumn.ColumnName) {\n switch (sortColumn.ColumnName.toUpperCase()) {\n case 'NAME':\n key = sortColumn.IsDescending ? sortOptions.sortByOptionNameDesc : sortOptions.sortByOptionNameAsc;\n break;\n case 'PRICE':\n key = sortColumn.IsDescending ? sortOptions.sortByOptionPriceDesc : sortOptions.sortByOptionPriceAsc;\n break;\n case 'AVERAGERATING':\n key = sortColumn.IsDescending ? sortOptions.sortByOptionRatingDesc : sortOptions.sortByOptionRatingAsc;\n break;\n case 'RANKING':\n key = sortOptions.sortByOptionRelevanceDesc;\n break;\n case 'BESTSELLINGSCORE':\n key = sortOptions.sortByOptionBestSelling;\n break;\n case 'NEWSCORE':\n key = sortOptions.sortByOptionNewScore;\n break;\n case 'TRENDINGSCORE':\n key = sortOptions.sortByOptionTrendingScore;\n break;\n default:\n }\n } else {\n ctx.telemetry.warning('[get-mapped-search-configuration] unknown search option');\n }\n if (key) {\n return {\n key,\n sortColumn\n };\n }\n return undefined;\n\n }).filter(Boolean));\n });\n}\n\nexport const createInput = (inputData: ICreateActionContext>): IActionInput => {\n return new MappedSearchInput(inputData.requestContext.apiSettings);\n};\n\nexport const getMappedSearchConfigurationDataAction = createObservableDataAction({\n id: '@msdyn365-commerce-modules/search-result-container/get-mapped-search-configuration',\n action: >getMappedSearchConfiguration,\n input: createInput\n});\n\nexport default getMappedSearchConfigurationDataAction;\n","/*--------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * See License.txt in the project root for license information.\n *--------------------------------------------------------------*/\n\nimport { IProductRefinerHierarchy } from '@msdyn365-commerce/commerce-entities';\nimport { IActionContext } from '@msdyn365-commerce/core';\nimport { IQueryResultSettings, ProductRefiner, ProductSearchCriteria } from '@msdyn365-commerce/retail-proxy';\nimport { getProductSearchRefinersAsync } from '@msdyn365-commerce/retail-proxy/dist/DataActions/ProductsDataActions.g';\n\n/**\n * Uses Bulk refiner API to get refiners and child refiner values.\n * @param searchCriteria Product search criteria.\n * @param maxItems Max items.\n * @param queryResultSettings\n * @param ctx Action context.\n */\nexport async function getProductRefinerHierarchy(searchCriteria: ProductSearchCriteria, queryResultSettings: IQueryResultSettings, ctx: IActionContext): Promise {\n return getProductSearchRefinersAsync({ callerContext: ctx, queryResultSettings }, searchCriteria).then((productRefiners: ProductRefiner[]) => {\n if (!productRefiners) {\n ctx.trace('[getRefinersByCriteriaAction] returned no refiners');\n return [];\n }\n\n const result = (productRefiners || []).map((productRefiner: ProductRefiner) => productRefiner);\n\n if (result.length === 0) {\n ctx.trace('[getRefinersByCriteriaAction] returned no IProductRefinerHierarchy objects');\n return [];\n }\n\n return result;\n });\n}\n","/*--------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * See License.txt in the project root for license information.\n *--------------------------------------------------------------*/\n\nimport { IProductRefinerHierarchy } from '@msdyn365-commerce/commerce-entities';\nimport { createObservableDataAction, IAction, IActionContext, IActionInput, ICreateActionContext } from '@msdyn365-commerce/core';\n\nimport { BaseCollectionInput, createBaseCollectionInput } from './base-collection-action';\nimport { getProductRefinerHierarchy } from './get-product-refiner-hierarchy';\n\n/**\n * Default Category/Product Id Values.\n */\nenum DefaultValues {\n defaultCategoryIdValue = 0,\n defaultProductIdValue = 0\n}\n\n/**\n * Refiners-by-Collection Input action.\n */\nexport class RefinersByCollectionInput extends BaseCollectionInput implements IActionInput {\n public getCacheObjectType = () => 'ProductRefiner';\n\n public dataCacheType = () => {\n if (\n this.pageType !== 'Category' ||\n (this.refiners && this.refiners.length > 0) ||\n (this.queryResultSettings && this.queryResultSettings.Sorting && this.queryResultSettings.Sorting.Columns && this.queryResultSettings.Sorting.Columns.length > 0)\n ) {\n return 'request';\n }\n return 'application';\n\n };\n}\n\n/**\n * Create input method which creates an ActionInput for fetching list page refiners.\n * @param args\n */\nconst createInput = (args: ICreateActionContext): IActionInput => {\n return createBaseCollectionInput(args, RefinersByCollectionInput);\n};\n\n/**\n * Action method which fetches refiners for the given list page.\n * @param input\n * @param ctx\n */\nasync function action(input: RefinersByCollectionInput, ctx: IActionContext): Promise {\n let searchProductId;\n if (input.pageType === 'Category') {\n if (input.category) {\n return getProductRefinerHierarchy(\n {\n CategoryIds: [input.category || DefaultValues.defaultCategoryIdValue],\n Context: {\n ChannelId: input.apiSettings.channelId,\n CatalogId: input.catalogId\n },\n Refinement: input.isUpdateRefinerPanel ? input.refiners : []\n },\n input.queryResultSettings,\n ctx);\n }\n throw new Error('[GetRefinersForCollection]Category Page Detected, but no global categoryId found');\n\n } else {\n if (input.searchText && (ctx.requestContext.query && ctx.requestContext.query.q)) {\n return getProductRefinerHierarchy(\n {\n SearchCondition: input.searchText,\n Context: {\n ChannelId: input.apiSettings.channelId,\n CatalogId: input.catalogId\n },\n Refinement: input.isUpdateRefinerPanel ? input.refiners : []\n },\n input.queryResultSettings,\n ctx);\n }\n if (input.searchText && (ctx.requestContext.query && ctx.requestContext.query.productId)) {\n const searchObject = JSON.parse(input.searchText);\n searchProductId = Number(searchObject.ProductId);\n if (Number.isNaN(searchProductId)) {\n throw new Error('Failed to cast search product id into a number.');\n } else if (!searchObject.Recommendation) {\n throw new Error('Failed to retrieve the Recommendation.');\n } else {\n return getProductRefinerHierarchy(\n {\n Context: {\n ChannelId: input.apiSettings.channelId,\n CatalogId: input.catalogId\n },\n Refinement: input.isUpdateRefinerPanel ? input.refiners : [],\n RecommendationListId: searchObject.Recommendation,\n Ids: [searchProductId || DefaultValues.defaultProductIdValue]\n },\n input.queryResultSettings,\n ctx);\n }\n } else {\n throw new Error(\n '[GetFullProductsForCollection]Search Page Detected, but no q= or productId= query parameter found'\n );\n }\n\n }\n}\n\nexport const actionDataAction = createObservableDataAction({\n id: '@msdyn365-commerce-modules/search-result-container/get-refiners-for-collection',\n action: >action,\n input: createInput\n});\n\nexport default actionDataAction;\n","/*--------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * See License.txt in the project root for license information.\n *--------------------------------------------------------------*/\n\nimport MsDyn365, { IRequestContext } from '@msdyn365-commerce/core';\nimport { ProductRefinerValue, SortColumn } from '@msdyn365-commerce/retail-proxy';\n\n/**\n * Refiner Compression:\n * Refiners contains a non-trivial amount of data that is required to successfully make\n * a refiner-based API call. To allow for deep-linking of refiners in the URL, refiner data\n * must be compressed so that URL max length is not exceeded. Refiners will be compressed into\n * the following array style index-based format:\n * [DataTypeValue, LeftValueBoundString, RefinerRecordId, RefinerSourceValue, RightValueBoundString, UnitText].\n */\nconst compressedRefinerKeys = ['DataTypeValue', 'LeftValueBoundString', 'RefinerRecordId', 'RefinerSourceValue', 'RightValueBoundString', 'UnitText'];\n\n/**\n * Hydrates compressed refiner data from URL.\n * @param fullUrl The full URL of the page.\n * @param requestContext\n */\nexport const hydrateRefinersFromUrl = (requestContext: IRequestContext): ProductRefinerValue[] => {\n const compressedRefinerArray = parseQueryParam<(string | number)[][]>('refiners', requestContext);\n if (!compressedRefinerArray || compressedRefinerArray.length === 0) {\n return [];\n }\n\n return compressedRefinerArray.map((compressedRefiner) => {\n try {\n const parsedRefiner: ProductRefinerValue = {};\n compressedRefinerKeys.forEach((refinerKey, index) => {\n parsedRefiner[refinerKey] = compressedRefiner[index];\n });\n return parsedRefiner;\n } catch {\n return undefined;\n }\n }).filter(Boolean);\n};\n\n/**\n * Compressed a list of refiners for use in URLs.\n * @param refiners The uncompressed refiners.\n */\nexport const compressRefiners = (refiners: ProductRefinerValue[]) => {\n const compressedRefiners: (string | number)[][] = [];\n\n refiners.forEach((refiner) => {\n const compressedRefiner: (string | number)[] = [];\n compressedRefinerKeys.forEach((refinerKey) => {\n compressedRefiner.push(refiner[refinerKey]);\n });\n compressedRefiners.push(compressedRefiner);\n });\n\n return compressedRefiners;\n};\n\n/**\n * Method which creates a URL contiaining serialized active refiners.\n * @param fullUrl The Current URL of the page.\n * @param refiners The refiners which should be added to the URL.\n * @param sortingColumns\n * @param skipCount\n */\nexport const buildListPageUrl = (fullUrl: URL, refiners?: ProductRefinerValue[], sortingColumns?: SortColumn[], skipCount?: number) => {\n // Refiner Change flow\n if (refiners !== undefined) {\n if (refiners.length === 0) {\n fullUrl.searchParams.delete('refiners');\n } else {\n const sortedRefiners = refiners.sort((first, second) => (first.RefinerRecordId && second.RefinerRecordId &&\n (first.RefinerRecordId > second.RefinerRecordId) ? 1 : -1));\n fullUrl.searchParams.set('refiners', JSON.stringify(compressRefiners(sortedRefiners)));\n }\n\n // Adding or removing a refiner means we want to always load page 1\n fullUrl.searchParams.delete('skip');\n return fullUrl.href;\n }\n\n if (sortingColumns !== undefined) {\n if (sortingColumns.length === 0) {\n fullUrl.searchParams.delete('sorting');\n } else {\n fullUrl.searchParams.set('sorting', JSON.stringify(sortingColumns));\n }\n\n // Changing the sort means always load page 1\n fullUrl.searchParams.delete('skip');\n return fullUrl.href;\n }\n\n if (skipCount) {\n fullUrl.searchParams.set('skip', skipCount.toString());\n }\n\n return fullUrl.href;\n};\n\n/**\n * Parses a query param from the query object of the request context.\n * @param key The query parameter key.\n * @param requestContext The request context.\n */\nexport const parseQueryParam = (key: string, requestContext: IRequestContext): T | null => {\n if (requestContext.query && requestContext.query[key]) {\n return JSON.parse(decodeURIComponent(requestContext.query[key]));\n }\n return null;\n};\n\n/**\n * Gets the current URL of the page from the request context.\n * @param requestContext The request context.\n */\nexport const getCurrentUrl = (requestContext: IRequestContext): URL => {\n if (MsDyn365.isBrowser) {\n return new URL(window.location.href);\n }\n\n // NOTE: Typing on requestURL is incorrect\n if (requestContext.url.requestUrl.href) {\n return new URL(requestContext.url.requestUrl.href);\n }\n return new URL((requestContext.url.requestUrl));\n\n};\n","/*--------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * See License.txt in the project root for license information.\n *--------------------------------------------------------------*/\n\nimport { IProductRefinerHierarchy } from '@msdyn365-commerce/commerce-entities';\nimport {\n CacheType,\n createObservableDataAction,\n IAction,\n IActionContext,\n IActionInput,\n IAny,\n ICreateActionContext,\n IGeneric\n} from '@msdyn365-commerce/core';\nimport { ProductPrice, ProductRefinerValue, ProductSearchResult, SimpleProduct, SortingInfo } from '@msdyn365-commerce/retail-proxy';\nimport { observable } from 'mobx';\n\nimport { listPageType } from './actions';\n\n/**\n * ListPageState class.\n */\nexport class ListPageState {\n @observable public activeFilters: ProductRefinerValue[] | null = null;\n\n @observable public activeProducts: ProductSearchResult[] = [];\n\n @observable public sortingCritera: SortingInfo | null = null;\n\n @observable public currentPageNumber: number | null = null;\n\n @observable public refiners: IProductRefinerHierarchy[] | null = null;\n\n @observable public totalProductCount: number | undefined;\n\n @observable public pageSize: number = 10;\n\n @observable public pageType: listPageType = 'Unknown';\n\n @observable public featureProduct: SimpleProduct | null = null;\n\n @observable public productPrices: ProductPrice[] | undefined = [];\n}\n\n/**\n * ListPageStateInput - action input.\n */\nexport class ListPageStateInput implements IActionInput {\n public getCacheKey = () => 'ListPageState';\n\n public getCacheObjectType = () => 'ListPageState';\n\n public dataCacheType = (): CacheType => 'request';\n}\n\nexport async function listPageStateAction(\n input: ListPageStateInput,\n ctx: IActionContext\n): Promise {\n return new ListPageState();\n}\n\n/**\n * Create new input for create action.\n * @param inputData\n */\nexport const createListPageInput = (\n inputData: ICreateActionContext>\n): IActionInput => {\n return new ListPageStateInput();\n};\n\n/**\n * ListPageState - create action.\n */\nexport default createObservableDataAction({\n action: >listPageStateAction,\n input: createListPageInput\n});\n","/*--------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * See License.txt in the project root for license information.\n *--------------------------------------------------------------*/\n\nimport { ITelemetry } from '@msdyn365-commerce/core';\nimport { AttributeDataType, ProductRefinerValue, RefinerType } from '@msdyn365-commerce/retail-proxy';\n\nimport { IRefineItemToggleNotification } from './refine-item-toggle-notification';\n\n/**\n * Types of product refiner values.\n * @deprecated This will be removed soon. Please, use `AttributeDataType` from `@msdyn365-commerce/retail-proxy` instead.\n * @example\n * ```\n * import { AttributeDataType } from `@msdyn365-commerce/retail-proxy`;\n * ```\n */\nexport enum ProductRefinerValueDataTypeValue {\n\n /**\n * Range slider is used for selections like price.\n * @deprecated This will be removed soon. Please, use `AttributeDataType` from `@msdyn365-commerce/retail-proxy` instead.\n * @example\n * ```\n * import { AttributeDataType } from `@msdyn365-commerce/retail-proxy`;\n * ```\n */\n Range = 1,\n\n /**\n * Range input is a different way to specify ranges and can be expressed with input boxes\n * as well as a set of discrete single-select type values.\n * @deprecated This will be removed soon. Please, use `AttributeDataType` from `@msdyn365-commerce/retail-proxy` instead.\n * @example\n * ```\n * import { AttributeDataType } from `@msdyn365-commerce/retail-proxy`;\n * ```\n */\n RangeInput = 4,\n\n /**\n * This is a discrete list item, either multi-select or single-select.\n * @deprecated This will be removed soon. Please, use `AttributeDataType` from `@msdyn365-commerce/retail-proxy` instead.\n * @example\n * ```\n * import { AttributeDataType } from `@msdyn365-commerce/retail-proxy`;\n * ```\n */\n List = 5,\n\n /**\n * Boolean types allows only single-select.\n * @deprecated This will be removed soon. Please, use `AttributeDataType` from `@msdyn365-commerce/retail-proxy` instead.\n * @example\n * ```\n * import { AttributeDataType } from `@msdyn365-commerce/retail-proxy`;\n * ```\n */\n Boolean = 6\n}\n\n/**\n * Types of product refiners.\n * @deprecated This will be removed soon. Please, use `RefinerType` from `@msdyn365-commerce/retail-proxy` instead.\n * @example\n * ```\n * import { RefinerType } from `@msdyn365-commerce/retail-proxy`;\n * ```\n */\nexport enum ProductRefinerTypeValue {\n\n /**\n * Refiner values are single-select.\n * @deprecated This will be removed soon. Please, use `RefinerType` from `@msdyn365-commerce/retail-proxy` instead.\n * @example\n * ```\n * import { RefinerType } from `@msdyn365-commerce/retail-proxy`;\n * ```\n */\n Single = 0,\n\n /**\n * Refiner values are multi-select.\n * @deprecated This will be removed soon. Please, use `RefinerType` from `@msdyn365-commerce/retail-proxy` instead.\n * @example\n * ```\n * import { RefinerType } from `@msdyn365-commerce/retail-proxy`;\n * ```\n */\n Multi = 1\n}\n\n/**\n * ProductRefinerSource enum type.\n * @deprecated This will be removed soon. Please, use `ProductRefinerSource` from `@msdyn365-commerce/retail-proxy` instead.\n * @example\n * ```\n * import { ProductRefinerSource } from `@msdyn365-commerce/retail-proxy`;\n * ```\n */\nexport enum ProductRefinerSource {\n\n /**\n * The None member.\n * @deprecated This will be removed soon. Please, use `ProductRefinerSource` from `@msdyn365-commerce/retail-proxy` instead.\n * @example\n * ```\n * import { ProductRefinerSource } from `@msdyn365-commerce/retail-proxy`;\n * ```\n */\n None = 0,\n\n /**\n * The Attribute member.\n * @deprecated This will be removed soon. Please, use `ProductRefinerSource` from `@msdyn365-commerce/retail-proxy` instead.\n * @example\n * ```\n * import { ProductRefinerSource } from `@msdyn365-commerce/retail-proxy`;\n * ```\n */\n Attribute = 1,\n\n /**\n * The Category member.\n * @deprecated This will be removed soon. Please, use `ProductRefinerSource` from `@msdyn365-commerce/retail-proxy` instead.\n * @example\n * ```\n * import { ProductRefinerSource } from `@msdyn365-commerce/retail-proxy`;\n * ```\n */\n Category = 2,\n\n /**\n * The Price member.\n * @deprecated This will be removed soon. Please, use `ProductRefinerSource` from `@msdyn365-commerce/retail-proxy` instead.\n * @example\n * ```\n * import { ProductRefinerSource } from `@msdyn365-commerce/retail-proxy`;\n * ```\n */\n Price = 3,\n\n /**\n * The Rating member.\n * @deprecated This will be removed soon. Please, use `ProductRefinerSource` from `@msdyn365-commerce/retail-proxy` instead.\n * @example\n * ```\n * import { ProductRefinerSource } from `@msdyn365-commerce/retail-proxy`;\n * ```\n */\n Rating = 4\n}\n\n/**\n * Checks if the data type value corresponds to a slider.\n * @param dataTypeValue\n */\nexport function isRangeType(dataTypeValue: number | undefined): boolean {\n return dataTypeValue === AttributeDataType.Currency ||\n dataTypeValue === AttributeDataType.Decimal ||\n dataTypeValue === AttributeDataType.Integer;\n}\n\n/**\n * Find the refinement criterion associated with this product refiner value.\n * @param productRefinerValue Product refiner value to match.\n * @param refinementCriteria Selected refinement criteria.\n */\nexport function findMatchingRefinementCriterion(\n productRefinerValue: ProductRefinerValue,\n refinementCriteria: ProductRefinerValue[]\n): ProductRefinerValue | undefined {\n // If the value is a range, then match only on data type value; otherwise match on item string\n return refinementCriteria.find(\n (refinementCriterion: ProductRefinerValue) => isMatchingRefinementCriterion(productRefinerValue, refinementCriterion)\n );\n}\n\n/**\n * Find the refinement criterion associated with this product refiner value.\n * @param productRefinerValue Product refiner value to match.\n * @param refinementCriteria Selected refinement criteria.\n * @param refinementCriterion\n */\nexport function isMatchingRefinementCriterion(\n productRefinerValue: ProductRefinerValue,\n refinementCriterion: ProductRefinerValue\n): boolean {\n // If the value is a range, then match only on data type value; otherwise match on item string\n return refinementCriterion.RefinerRecordId === productRefinerValue.RefinerRecordId &&\n refinementCriterion.RefinerSourceValue === productRefinerValue.RefinerSourceValue &&\n refinementCriterion.DataTypeValue === productRefinerValue.DataTypeValue &&\n (isRangeType(refinementCriterion.DataTypeValue) || refinementCriterion.LeftValueBoundString === productRefinerValue.LeftValueBoundString);\n}\n\nexport function getUpdatedRefinementCriteria(\n itemToggleNotification: IRefineItemToggleNotification,\n currentRefinementCriteria: ProductRefinerValue[]): ProductRefinerValue[] {\n const updatedRefinementCriteria: ProductRefinerValue[] = [];\n let toggledItemFound = false;\n currentRefinementCriteria.forEach((selectedCriterion: ProductRefinerValue) => {\n if (isMatchingRefinementCriterion(itemToggleNotification.productRefinerValue, selectedCriterion)) {\n toggledItemFound = true;\n if (itemToggleNotification.isSelecting) {\n const next = {\n ...selectedCriterion,\n LeftValueBoundString: itemToggleNotification.rangeStart !== undefined && `${itemToggleNotification.rangeStart}` || selectedCriterion.LeftValueBoundString,\n RightValueBoundString: itemToggleNotification.rangeEnd !== undefined && `${itemToggleNotification.rangeEnd}` || selectedCriterion.RightValueBoundString\n };\n updatedRefinementCriteria.push(next);\n\n } // Else the item is being de-selected, so omit it from the refinement criteria\n } else {\n // Keep existing criterion because it is not in the item toggle notification\n updatedRefinementCriteria.push(selectedCriterion);\n }\n });\n\n if (!toggledItemFound) {\n const next = {\n ...itemToggleNotification.productRefinerValue,\n LeftValueBoundString: itemToggleNotification.rangeStart !== undefined && `${itemToggleNotification.rangeStart}` || itemToggleNotification.productRefinerValue.LeftValueBoundString,\n RightValueBoundString: itemToggleNotification.rangeEnd !== undefined && `${itemToggleNotification.rangeEnd}` || itemToggleNotification.productRefinerValue.RightValueBoundString\n };\n updatedRefinementCriteria.push(next);\n\n // If single select, then deselect any others in the parent refiner group\n if ((itemToggleNotification.productRefinerValue.DataTypeValue === AttributeDataType.Text || itemToggleNotification.productRefinerValue.DataTypeValue === AttributeDataType.TrueFalse) &&\n itemToggleNotification.parentProductRefinerHierarchy.RefinerTypeValue === RefinerType.SingleSelect) {\n itemToggleNotification.parentProductRefinerHierarchy.Values.forEach((child: ProductRefinerValue) => {\n if (child.RefinerRecordId === next.RefinerRecordId && child.LeftValueBoundString === next.LeftValueBoundString) {\n // Do nothing\n } else {\n const matchingIndex = updatedRefinementCriteria.findIndex((criterion: ProductRefinerValue) => isMatchingRefinementCriterion(child, criterion));\n if (matchingIndex > -1) {\n updatedRefinementCriteria.splice(matchingIndex, 1);\n }\n }\n });\n }\n }\n\n return updatedRefinementCriteria;\n}\n\nexport function formatPrice(\n amount: string | undefined,\n currency: string | undefined,\n locale: string | undefined,\n telemetry: ITelemetry): string {\n if (!amount || !currency) {\n telemetry.trace(`[refine-menu.utilities.formatPrice] could not format price for ${amount} ${currency}`);\n return amount || '';\n }\n const priceAmount = (amount && Number(amount)) || 0;\n let result: string;\n\n try {\n result = new Intl.NumberFormat(locale, {\n style: 'currency',\n currencyDisplay: 'symbol',\n currency,\n minimumFractionDigits: 0\n }).format(priceAmount);\n } catch (error) {\n result = `${priceAmount} ${currency}`;\n telemetry.warning(`[refine-menu.utilities.formatPrice] Failed to format price for ${result}: ${error}`);\n }\n\n return result;\n}\n","/*--------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * See License.txt in the project root for license information.\n *--------------------------------------------------------------*/\n\nimport { IProductRefinerHierarchy } from '@msdyn365-commerce/commerce-entities';\nimport { ProductRefinerValue } from '@msdyn365-commerce/retail-proxy';\nimport { getPayloadObject, getTelemetryAttributes, IPayLoad } from '@msdyn365-commerce-modules/utilities';\nimport classnames from 'classnames';\nimport { computed } from 'mobx';\nimport { observer } from 'mobx-react';\nimport * as React from 'react';\n\nimport { ProductListInventoryFilteringOptions } from '../actions';\nimport { IChoiceSummaryProps } from './choice-summary.props';\nimport { isMatchingRefinementCriterion, isRangeType } from './utilities';\n\ninterface IRefinerMap {\n key: string;\n value: ProductRefinerValue;\n}\n\n/**\n * ChoiceSummary component.\n */\n@observer\nexport default class ChoiceSummary extends React.PureComponent {\n private readonly closeButtonGlyph: string = 'msi-close-btn';\n\n private readonly payLoad: IPayLoad;\n\n @computed get selectedRefinersMap(): IRefinerMap[] {\n let { selectedChoices } = this.props;\n const { channelInventoryConfigurationId, refinerHierarchy } = this.props;\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access -- app configs are of generic type\n if (this.props.context?.app.config.productListInventoryDisplay === ProductListInventoryFilteringOptions.HideOOS) {\n selectedChoices = selectedChoices.filter(choice => {\n const parent = refinerHierarchy.find(\n // eslint-disable-next-line unicorn/prefer-array-some, max-len -- Existing code\n (hierarchy: IProductRefinerHierarchy) => !!hierarchy.Values.find((value: ProductRefinerValue) => isMatchingRefinementCriterion(value, choice))\n );\n return parent && parent.RecordId !== channelInventoryConfigurationId;\n });\n }\n return selectedChoices.map((selectedRefiner: ProductRefinerValue) => {\n return {\n key: this._getKeyForRefinerValue(selectedRefiner),\n value: selectedRefiner\n } as IRefinerMap;\n });\n }\n\n constructor(props: Readonly) {\n super(props);\n this.payLoad = getPayloadObject('click', this.props.telemetryContent!, '');\n }\n\n public render(): JSX.Element {\n const { clearAllText, label, classNames, choiceAriaLabel, closeAriaLabel } = this.props;\n const items = this.selectedRefinersMap;\n this.payLoad.contentAction.etext = clearAllText;\n const clearAllAttributes = getTelemetryAttributes(this.props.telemetryContent!, this.payLoad);\n return (\n
\n {items.length > 0 && label && \n {label}\n }\n
    \n {items.map((item: IRefinerMap) => {\n this.payLoad.contentAction.etext = item.key;\n const attribute = getTelemetryAttributes(this.props.telemetryContent!, this.payLoad);\n\n return (\n
  • \n \n {item.key}\n \n \n
  • \n );\n })}\n
\n {items.length > 0 && clearAllText && \n {clearAllText}\n }\n
\n );\n }\n\n private _getKeyForRefinerValue(productRefinerValue: ProductRefinerValue): string {\n const { choiceFormat, choiceRangeValueFormat, refinerHierarchy, telemetry } = this.props;\n const overallFormat = choiceFormat || '{1}';\n const rangeFormat = choiceRangeValueFormat;\n let refinerName = '';\n if (refinerHierarchy && refinerHierarchy.find) {\n const parent = refinerHierarchy.find(\n // eslint-disable-next-line unicorn/prefer-array-some, max-len -- Existing code\n (hierarchy: IProductRefinerHierarchy) => !!hierarchy.Values.find((value: ProductRefinerValue) => isMatchingRefinementCriterion(value, productRefinerValue))\n );\n\n if (!parent) {\n telemetry.warning('[choice-summary] could not find parent of selected refiner value');\n } else {\n refinerName = parent.KeyName || '';\n }\n }\n\n let refinerValueName: string;\n if (isRangeType(productRefinerValue.DataTypeValue)) {\n refinerValueName = rangeFormat\n .replace('{0}', this._formatPrice(productRefinerValue.LeftValueBoundString, productRefinerValue.UnitText))\n .replace('{1}', this._formatPrice(productRefinerValue.RightValueBoundString, productRefinerValue.UnitText));\n } else {\n refinerValueName = productRefinerValue.LeftValueBoundLocalizedString || productRefinerValue.LeftValueBoundString || '';\n }\n\n return overallFormat.replace('{0}', refinerName).replace('{1}', refinerValueName);\n }\n\n private _formatPrice(amount: string | undefined, currency: string | undefined): string {\n if (!amount || !currency) {\n this.props.telemetry.trace('[choice-summary] could not format price');\n return amount || '';\n }\n let result = amount;\n\n try {\n result = this.props.context!.cultureFormatter.formatCurrency(Number(amount), currency);\n } catch (error) {\n this.props.telemetry.warning(`Failed to format price for ${result}: ${error}`);\n }\n\n return result;\n }\n\n private readonly _onClick = (e: React.MouseEvent): void => {\n e.preventDefault();\n e.stopPropagation();\n\n const target = e.currentTarget as HTMLElement;\n const clearAll = target.getAttribute('class')!.includes('choice-summary__clear-all');\n const selectedRefiner = clearAll ? undefined : this._getSelectedRefinerChoice(target);\n\n if (this.props.onChoiceClicked) {\n this.props.onChoiceClicked({\n clearAll,\n itemClicked: target,\n choiceClicked: selectedRefiner,\n nextItemToFocus: target.nextSibling as HTMLElement\n });\n }\n };\n\n private _getSelectedRefinerChoice(itemClicked: HTMLElement): ProductRefinerValue | undefined {\n const result = this.selectedRefinersMap.find(selected => (itemClicked.textContent && itemClicked.textContent.trim()) === selected.key);\n return (result && result.value) || undefined;\n }\n}\n","/*--------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * See License.txt in the project root for license information.\n *--------------------------------------------------------------*/\n\nimport * as React from 'react';\n\ninterface IErrorMessage {\n text?: string;\n}\n\nexport const ErrorMessage: React.FC = ({ text }) => {\n return (\n \n
\n {' '}\n {text}\n {' '}\n
\n
\n );\n};\n","/*--------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * See License.txt in the project root for license information.\n *--------------------------------------------------------------*/\n\nimport { ICoreContext, IGridSettings, IImageData, IImageSettings, Image, IRequestContext } from '@msdyn365-commerce/core';\nimport { SimpleProduct } from '@msdyn365-commerce/retail-proxy';\nimport { getFallbackImageUrl, getProductPageUrlSync } from '@msdyn365-commerce-modules/retail-actions';\nimport { getPayloadObject, getTelemetryAttributes, ITelemetryContent, onTelemetryClick } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport { ISearchResultContainerResources } from '../search-result-container.props.autogenerated';\n\n// Import { IComponent, IComponentProps, ICoreContext, IGridSettings, IImageData, IImageSettings, Image, msdyn365Commerce } from '@msdyn365-commerce/core';\n\ninterface IFeatureSearchResultItem {\n product: SimpleProduct | null;\n context: ICoreContext;\n resources: ISearchResultContainerResources;\n imageSettings?: IImageSettings;\n moduleType: string;\n moduleId: string;\n telemetryContent?: ITelemetryContent;\n recommendation?: string;\n}\n\nexport const FeatureSearchResultItem: React.FC = ({\n product,\n context,\n imageSettings,\n resources,\n telemetryContent,\n recommendation\n}) => {\n if (product === null) {\n return null;\n }\n\n const productName = product.Name;\n const productRecordId = product && product.RecordId ? product.RecordId : 0;\n const productUrl = getProductPageUrlSync(product.Name || '', productRecordId, context && context.actionContext, undefined);\n const fallbackImage = getFallbackImageUrl(product.ItemId, context.actionContext.requestContext.apiSettings);\n const heading = recommendation && recommendation === 'descriptions' ? resources.featureSimilarDescriptionTitle : resources.featureSimilarLooksTitle;\n\n // Construct telemetry attribute to render\n const payLoad = getPayloadObject('click', telemetryContent!, productName!, productRecordId.toString());\n\n const attribute = getTelemetryAttributes(telemetryContent!, payLoad);\n return (\n
\n \n
\n {renderProductPlacementImage(\n imageSettings, context.request.gridSettings, product.PrimaryImageUrl,\n product.Name, fallbackImage, context.actionContext.requestContext)}\n
\n \n
\n

\n {heading}\n

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

\n {title}\n

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