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,OAAOmkC,wBAA0BtC,EAAe/kC,GAASwkC,EAAmBxkC,GAClF6B,GAKTlC,IAAAA,cAAC4D,EAAAA,OAAM/C,OAAAC,OAAA,GAAKkB,GACPgB,EAAqB,KAClBhD,IAAAA,cAACY,EAAAA,KAAIC,OAAAC,OAAA,GAAK8B,GACLF,GAAqBtB,EAAwBsB,GAC7CD,GAAkBhB,EAAYgB,GAC9BA,GAAkBs6B,EAAiBt6B,IAG5CzC,IAAAA,cAACY,EAAAA,KAAIC,OAAAC,OAAA,GAAKiC,GAAyBC,GACnChD,IAAAA,cAACY,EAAAA,KAAIC,OAAAC,OAAA,GAAK+B,GACN7C,IAAAA,cAACY,EAAAA,KAAI,CAAC0d,IAAK+oB,EAAgBxjC,UAAU,sBACjC7D,IAAAA,cAACY,EAAAA,KAAI,CAACiD,UAAU,4BACZ7D,IAAAA,cAACsf,EAAAA,OAAM,CACHzb,UAAWkqB,EAAa,oCAAsC,qCAAoC,aACvF,SACXlT,QAASiE,EAAM,gBACAiP,EACfxC,SAAU,GAET7O,EAAUirB,YAEf3nC,IAAAA,cAAA,OAAK6D,UAAU,iDAAiDxB,GAChErC,IAAAA,cAAA,OAAK6D,UAAU,6CACVlB,IAAkB5C,GAAoBQ,EAAWoC,KAGzD9C,GAAckuB,GAAcvtB,EAAcX,GAC3CG,IAAAA,cAACY,EAAAA,KAAI,CAACiD,UAAU,qBACXhE,GAAckuB,GAAc6Y,EAAoB/mC,EAAYif,EAAQpC,KAI7E1c,IAAAA,cAACY,EAAAA,KAAIC,OAAAC,OAAA,GAAKsB,GACLU,EACAzC,EAAMkD,OAAOmkC,wBAA0BtC,EAAe/kC,GAASwkC,EAAmBxkC,GAClF6B,0BCzWrB0lC,EAAOC,QAAU7nC,2BCAjB4nC,EAAOC,QAAUC","sources":["webpack://sheikh-zayed-festival/./src/themes/sheikhzayedfestival/views/search-result-container.view.tsx?4ed3","webpack://sheikh-zayed-festival/./lib/search-result-container/module-registration.js?8625","webpack://sheikh-zayed-festival/./src/modules/fabrikam/views/search-result-container.view.tsx?89df","webpack://sheikh-zayed-festival/./src/modules/search-result-container/actions/base-collection-action.ts?ec13","webpack://sheikh-zayed-festival/./src/modules/search-result-container/actions/get-full-products-by-collection.ts?f1fe","webpack://sheikh-zayed-festival/./src/modules/search-result-container/actions/get-mapped-search-configuration.ts?6cc4","webpack://sheikh-zayed-festival/./src/modules/search-result-container/actions/get-product-refiner-hierarchy.ts?3937","webpack://sheikh-zayed-festival/./src/modules/search-result-container/actions/get-refiners-for-collection.ts?56d8","webpack://sheikh-zayed-festival/./src/modules/search-result-container/actions/get-inventory-refiners.ts?eaa4","webpack://sheikh-zayed-festival/./src/modules/search-result-container/actions/url-utils.ts?1541","webpack://sheikh-zayed-festival/./src/modules/search-result-container/list-page-state.ts?b0a4","webpack://sheikh-zayed-festival/./src/modules/search-result-container/components/utilities.ts?8569","webpack://sheikh-zayed-festival/./src/modules/search-result-container/components/choice-summary.tsx?3f71","webpack://sheikh-zayed-festival/./src/modules/search-result-container/components/error-message.tsx?6302","webpack://sheikh-zayed-festival/./src/modules/search-result-container/components/feature-search-result-item.tsx?71fa","webpack://sheikh-zayed-festival/./src/modules/search-result-container/components/link.tsx?52c2","webpack://sheikh-zayed-festival/./src/modules/search-result-container/components/modal.tsx?d78e","webpack://sheikh-zayed-festival/./src/modules/search-result-container/components/product-search-result-items.tsx?5174","webpack://sheikh-zayed-festival/./src/modules/search-result-container/components/range-refine-item.tsx?6288","webpack://sheikh-zayed-festival/./src/modules/search-result-container/components/refine-item.tsx?a594","webpack://sheikh-zayed-festival/./src/modules/search-result-container/components/range-refine-item-input.tsx?09aa","webpack://sheikh-zayed-festival/./src/modules/search-result-container/components/refine-submenu.tsx?1292","webpack://sheikh-zayed-festival/./src/modules/search-result-container/components/separator.tsx?4ea6","webpack://sheikh-zayed-festival/./src/modules/search-result-container/components/title.tsx?c269","webpack://sheikh-zayed-festival/./src/modules/search-result-container/search-result-container.tsx?7500","webpack://sheikh-zayed-festival/./src/modules/search-result-container/search-result-container.view.tsx?b779","webpack://sheikh-zayed-festival/./src/modules/adventureworks/views/components/product.component.tsx?fd23","webpack://sheikh-zayed-festival/./src/modules/adventureworks/views/search-result-container.view.tsx?6e86","webpack://sheikh-zayed-festival/external var \"React\"?0d3b","webpack://sheikh-zayed-festival/external var \"ReactDOM\"?853b"],"sourcesContent":["// ===================================\r\n/*!\r\n * Copyright (c) Microsoft Corporation.\r\n * All rights reserved. See LICENSE in the project root for license information.\r\n */\r\n\r\nimport {\r\n ICategoryHierarchyViewProps,\r\n IRefineMenuViewProps,\r\n ISearchResultContainerViewProps,\r\n ISearchResultModalViewProps,\r\n ISortByViewProps,\r\n ITitleViewProps\r\n} from '@msdyn365-commerce-modules/search-result-container';\r\nimport { Module, Node } from '@msdyn365-commerce-modules/utilities';\r\nimport * as React from 'react';\r\n\r\n/* ZOHAIB | VSI | CUSTOMJIZATION | START */\r\nimport { ISearchResultContainerProps as ISearchResultContainerExtensionProps } from './../definition-extensions/search-result-container.ext.props.autogenerated';\r\nconst SearchResultContainerView: React.FC > = props => {\r\n /* ZOHAIB | VSI | CUSTOMJIZATION | END */\r\n const {\r\n SearchResultContainer,\r\n products,\r\n pagination,\r\n ProductsContainer,\r\n ProductSectionContainer,\r\n choiceSummary,\r\n isMobile,\r\n modalToggle,\r\n searchResultModal,\r\n TitleViewProps,\r\n refineMenu,\r\n categoryHierarchy,\r\n sortByOptions,\r\n CategoryNavContainer,\r\n RefineAndProductSectionContainer,\r\n errorMessage,\r\n FeatureSearchContainer,\r\n similarLookProduct\r\n } = props;\r\n const isRecoSearchPage = props.context.actionContext.requestContext.query?.recommendation;\r\n /* ZOHAIB | VSI | CUSTOMJIZATION | START */\r\n const merchandisingCategoryID = props.config.merchandisingCategoryID!;\r\n const merchandisingURLID = Number(props.context.request.urlTokens.recordId!);\r\n if(merchandisingURLID !== merchandisingCategoryID){\r\n return null\r\n }\r\n /* ZOHAIB | VSI | CUSTOMJIZATION | END */\r\n if (isMobile) {\r\n return (\r\n \r\n {categoryHierarchy && renderCategoryHierarchy(categoryHierarchy)}\r\n {renderTitle(TitleViewProps)}\r\n {choiceSummary}\r\n {modalToggle}\r\n {createSearchResultModal(searchResultModal, refineMenu, sortByOptions, isRecoSearchPage)}\r\n {similarLookProduct}\r\n \r\n {errorMessage}\r\n {products}\r\n \r\n {pagination}\r\n \r\n );\r\n }\r\n return (\r\n \r\n {categoryHierarchy && {renderCategoryHierarchy(categoryHierarchy)}}\r\n \r\n {refineMenu && renderRefiner(refineMenu)}\r\n \r\n {similarLookProduct}\r\n
\r\n {TitleViewProps && renderTitle(TitleViewProps)}\r\n {choiceSummary}\r\n
\r\n
\r\n {sortByOptions && !isRecoSearchPage && renderSort(sortByOptions)}\r\n
\r\n \r\n {errorMessage}\r\n {products}\r\n \r\n {pagination}\r\n
\r\n
\r\n
\r\n );\r\n};\r\n\r\nconst createSearchResultModal = (\r\n modalProps: ISearchResultModalViewProps,\r\n refineMenu: IRefineMenuViewProps,\r\n sortByDropDown: ISortByViewProps,\r\n isRecoSearchPage?: string\r\n): JSX.Element => {\r\n return React.cloneElement(\r\n modalProps.modal,\r\n {},\r\n modalProps.modalHeader,\r\n createModalBody(modalProps, refineMenu, sortByDropDown, isRecoSearchPage),\r\n modalProps.modalFooter\r\n );\r\n};\r\n\r\nconst createModalBody = (\r\n props: ISearchResultModalViewProps,\r\n refineMenu: IRefineMenuViewProps,\r\n sortByDropDown: ISortByViewProps,\r\n isRecoSearchPage?: string\r\n): JSX.Element | null => {\r\n if (sortByDropDown) {\r\n return React.cloneElement(props.modalBody, {}, renderSort(sortByDropDown, isRecoSearchPage), renderRefiner(refineMenu));\r\n }\r\n return null;\r\n};\r\n\r\nconst renderRefiner = (props: IRefineMenuViewProps): JSX.Element | null => {\r\n const { refiners, RefineMenuContainer, RefinerSectionContainer } = props;\r\n if (refiners) {\r\n return (\r\n \r\n \r\n {refiners.map((submenu, index) => (\r\n {submenu}\r\n ))}\r\n \r\n \r\n );\r\n }\r\n return null;\r\n};\r\n\r\nconst renderSort = (props: ISortByViewProps, isRecoSearchPage?: string): JSX.Element | null => {\r\n const { SortingContainer, sortByDropDown } = props;\r\n if (sortByDropDown && !isRecoSearchPage) {\r\n return {sortByDropDown};\r\n }\r\n return null;\r\n};\r\n\r\nconst renderCategoryHierarchy = (props: ICategoryHierarchyViewProps): JSX.Element | null => {\r\n const { CategoryHierarchyContainer, categoryHierarchyList, categoryHierarchySeparator } = props;\r\n if (categoryHierarchyList) {\r\n return (\r\n \r\n {categoryHierarchyList.map((category, index) => (\r\n \r\n {category}\r\n {categoryHierarchyList && categoryHierarchyList[index + 1] && categoryHierarchySeparator}\r\n \r\n ))}\r\n \r\n );\r\n }\r\n\r\n return null;\r\n};\r\n\r\nconst renderTitle = (props: ITitleViewProps): JSX.Element | null => {\r\n const { title, TitleContainer } = props;\r\n if (title) {\r\n return (\r\n \r\n

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

\r\n
\r\n );\r\n }\r\n return null;\r\n};\r\n\r\nexport default SearchResultContainerView;\r\n","const binding = { modules: {}, dataActions: {} };\n\n const registerActionId = (actionPath) => {\n if (binding.dataActions[actionPath] &&\n binding.dataActions[actionPath].default &&\n binding.dataActions[actionPath].default.prototype &&\n binding.dataActions[actionPath].default.prototype.id) {\n binding.dataActions[binding.dataActions[actionPath].default.prototype.id] = binding.dataActions[actionPath];\n } else {\n Object.keys(binding.dataActions[actionPath] || {}).forEach(exportName => {\n if (binding.dataActions[actionPath][exportName] &&\n binding.dataActions[actionPath][exportName].prototype &&\n binding.dataActions[actionPath][exportName].prototype.Action) {\n binding.dataActions[binding.dataActions[actionPath][exportName].prototype.id] = binding.dataActions[actionPath][exportName];\n }\n })\n }\n };\n\n const registerSanitizedActionPath = (sanitizedActionPath, dataAction) => {\n if (process.env.NODE_ENV === 'development') {\n if (!dataAction.default) {\n throw new Error('Data action path does not have a default export');\n }\n if (!(dataAction.default.prototype.id && binding.dataActions[dataAction.default.prototype.id]) || !binding.dataActions[sanitizedActionPath]) {\n binding.dataActions[sanitizedActionPath] = dataAction;\n }\n } else {\n binding.dataActions[sanitizedActionPath] = dataAction;\n if (!binding.dataActions[sanitizedActionPath].default) {\n throw new Error('Data action path ' + sanitizedActionPath + ' does not have a default export');\n }\n binding.dataActions[sanitizedActionPath].default.prototype.RegistrationId = sanitizedActionPath;\n if (binding.dataActions[sanitizedActionPath].default.prototype.id) {\n binding.dataActions[binding.dataActions[sanitizedActionPath].default.prototype.id] = sanitizedActionPath;\n }\n }\n };\n \n\n (binding.modules['search-result-container'] = {\n c: () => require('@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['__local__|__local__|themes|sheikhzayedfestival|views|search-result-container'] = {\n c: () => require('partner/themes/sheikhzayedfestival/views/search-result-container.view.tsx'),\n cn: '__local__-__local__-search-result-container'\n };\nviewDictionary['@msdyn365-commerce-modules|fabrikam-design-kit|modules|fabrikam|views|search-result-container'] = {\n c: () => require('@msdyn365-commerce-modules/fabrikam-design-kit/dist/lib/modules/fabrikam/views/search-result-container.view.js'),\n cn: '@msdyn365-commerce-modules-fabrikam-design-kit-search-result-container'\n };\nviewDictionary['@msdyn365-commerce-modules|search-result-container|modules|search-result-container|search-result-container'] = {\n c: () => require('@msdyn365-commerce-modules/search-result-container/dist/lib/modules/search-result-container/search-result-container.view.js'),\n cn: '@msdyn365-commerce-modules-search-result-container-search-result-container'\n };\nviewDictionary['@msdyn365-commerce-theme|adventureworks-theme-kit|modules|adventureworks|views|search-result-container'] = {\n c: () => require('@msdyn365-commerce-theme/adventureworks-theme-kit/dist/lib/modules/adventureworks/views/search-result-container.view.js'),\n cn: '@msdyn365-commerce-theme-adventureworks-theme-kit-search-result-container'\n };\nwindow.__bindings__ = window.__bindings__ || {};\nwindow.__bindings__.viewDictionary = {\n ...window.__bindings__.viewDictionary || {},\n ...viewDictionary\n };","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport {\n ICategoryHierarchyViewProps,\n IRefineMenuViewProps,\n ISearchResultContainerViewProps,\n ISearchResultModalViewProps,\n ISortByViewProps,\n ITitleViewProps\n} from '@msdyn365-commerce-modules/search-result-container';\nimport { Module, Node } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nconst SearchResultContainerView: React.FC = props => {\n const {\n SearchResultContainer,\n products,\n pagination,\n ProductsContainer,\n ProductSectionContainer,\n choiceSummary,\n isMobile,\n modalToggle,\n searchResultModal,\n TitleViewProps,\n refineMenu,\n categoryHierarchy,\n sortByOptions,\n CategoryNavContainer,\n RefineAndProductSectionContainer,\n errorMessage,\n FeatureSearchContainer,\n similarLookProduct\n } = props;\n const isRecoSearchPage = props.context.actionContext.requestContext.query?.recommendation;\n if (isMobile) {\n return (\n \n {categoryHierarchy && renderCategoryHierarchy(categoryHierarchy)}\n {renderTitle(TitleViewProps)}\n {choiceSummary}\n {modalToggle}\n {createSearchResultModal(searchResultModal, refineMenu, sortByOptions, isRecoSearchPage)}\n {similarLookProduct}\n \n {errorMessage}\n {products}\n \n {pagination}\n \n );\n }\n return (\n \n {categoryHierarchy && {renderCategoryHierarchy(categoryHierarchy)}}\n \n {refineMenu && renderRefiner(refineMenu)}\n \n {similarLookProduct}\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\nconst createSearchResultModal = (\n modalProps: ISearchResultModalViewProps,\n refineMenu: IRefineMenuViewProps,\n sortByDropDown: ISortByViewProps,\n isRecoSearchPage?: string\n): JSX.Element => {\n return React.cloneElement(\n modalProps.modal,\n {},\n modalProps.modalHeader,\n createModalBody(modalProps, refineMenu, sortByDropDown, isRecoSearchPage),\n modalProps.modalFooter\n );\n};\n\nconst createModalBody = (\n props: ISearchResultModalViewProps,\n refineMenu: IRefineMenuViewProps,\n sortByDropDown: ISortByViewProps,\n isRecoSearchPage?: string\n): JSX.Element | null => {\n if (sortByDropDown) {\n return React.cloneElement(props.modalBody, {}, renderSort(sortByDropDown, isRecoSearchPage), renderRefiner(refineMenu));\n }\n return null;\n};\n\nconst renderRefiner = (props: IRefineMenuViewProps): JSX.Element | null => {\n const { refiners, RefineMenuContainer, RefinerSectionContainer } = props;\n if (refiners) {\n return (\n \n \n {refiners.map((submenu, index) => (\n {submenu}\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 {sortByDropDown};\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}({title.titleCount})\n

\n
\n );\n }\n return null;\n};\n\nexport default SearchResultContainerView;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { CacheType, getCatalogId, IActionInput, IAny, ICommerceApiSettings, ICreateActionContext, IGeneric } from '@msdyn365-commerce/core';\nimport { IProductRefinerHierarchy } from '@msdyn365-commerce/commerce-entities';\nimport {\n convertToString,\n ChannelInventoryConfiguration,\n IQueryResultSettings,\n ProductRefinerValue,\n SortColumn\n} from '@msdyn365-commerce/retail-proxy';\nimport { generateCacheKey, QueryResultSettingsProxy } 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 (process.env.NODE_ENV === 'development' && process.env.ENABLE_CLOUD_SEARCH?.toLowerCase() !== 'true') {\n return false;\n }\n\n if (inputData && inputData.config && inputData.config.includeAttributes !== undefined && 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 channelInventoryConfiguration?: ChannelInventoryConfiguration;\n\n public inventoryRefiner?: IProductRefinerHierarchy;\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 channelInventoryConfiguration?: ChannelInventoryConfiguration,\n inventoryRefiner?: IProductRefinerHierarchy\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 this.channelInventoryConfiguration = channelInventoryConfiguration;\n this.inventoryRefiner = inventoryRefiner;\n }\n\n public getCacheKey = () => {\n const queryResultSettings = {\n ...this.queryResultSettings.Paging,\n ...toJS(this.queryResultSettings.Sorting)\n };\n\n const cacheKey = generateCacheKey(\n this.apiSettings,\n { key: 'PageType', value: this.pageType },\n { key: 'Category', value: this.category },\n { key: 'SearchText', value: this.searchText },\n { key: 'CatalogId', value: this.catalogId },\n {\n key: 'Refiners',\n value: this.refiners.map(\n refiner =>\n `RefinerRecordId:${refiner.RefinerRecordId}-LeftValueBoundString:${refiner.LeftValueBoundString ||\n ''}-RightValueBoundString:${refiner.RightValueBoundString || ''}`\n )\n },\n { key: 'QueryResultSettings', value: convertToString(queryResultSettings) },\n { key: 'Locale', value: 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 channelInventoryConfiguration?: ChannelInventoryConfiguration,\n inventoryRefiner?: IProductRefinerHierarchy\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)\n ? 'Category'\n : '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.recommendation) {\n let searchText = '';\n if (args.requestContext.query.productId) {\n searchText = JSON.stringify({\n ProductId: args.requestContext.query.productId,\n Recommendation: args.requestContext.query.recommendation\n });\n } else {\n searchText = JSON.stringify({ Recommendation: args.requestContext.query.recommendation });\n }\n return new inputClassConstuctor(\n pageType,\n args.requestContext.apiSettings,\n queryResultSettings,\n queryRefiners,\n undefined,\n searchText,\n includeAttributes,\n isUpdateRefinerPanel,\n args.requestContext.locale,\n catalogId\n );\n } else if (pageType === 'Search' && args.requestContext.query && args.requestContext.query.discountIds) {\n const searchText = JSON.stringify({ DiscountIds: args.requestContext.query.discountIds });\n return new inputClassConstuctor(\n pageType,\n args.requestContext.apiSettings,\n queryResultSettings,\n queryRefiners,\n undefined,\n searchText,\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.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport {\n CacheType,\n createObservableDataAction,\n GetCustomerInput,\n IAction,\n IActionContext,\n IActionInput,\n ICreateActionContext\n} from '@msdyn365-commerce/core';\nimport { AsyncResult, ChannelInventoryConfiguration, ProductSearchCriteria, ProductSearchResult } from '@msdyn365-commerce/retail-proxy';\nimport { getProductPromotionsAsync, searchByCriteriaAsync } from '@msdyn365-commerce/retail-proxy/dist/DataActions/ProductsDataActions.g';\nimport { getInventoryConfigurationAsync } from '@msdyn365-commerce/retail-proxy/dist/DataActions/StoreOperationsDataActions.g';\nimport { ArrayExtensions, generateProductImageUrl, getCustomer, InventoryLevels } from '@msdyn365-commerce-modules/retail-actions';\n\nimport { BaseCollectionInput, createBaseCollectionInput } from './base-collection-action';\nimport { getInventorySortableRefinerValue } from '.';\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 &&\n this.queryResultSettings.Sorting &&\n this.queryResultSettings.Sorting.Columns &&\n this.queryResultSettings.Sorting.Columns.length > 0)\n ) {\n return 'request';\n }\n return 'application';\n };\n}\n\n/**\n * This setting defines inventory filtering options.\n */\nexport enum ProductListInventoryFilteringOptions {\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 */\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 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\n): Promise {\n const defaultProductCount: number = 0;\n\n const productSearchResultsWithImages = productSearchResults.map(productSearchResult => {\n const newImageUrl = generateProductImageUrl(productSearchResult, context.requestContext.apiSettings);\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 (\n context.requestContext.app.config.inventoryLevel === InventoryLevels.threshold ||\n context.requestContext.app.config.enableStockCheck === false\n ) {\n return {\n products: productSearchResultsWithImages,\n count: metadataCount ?? defaultProductCount\n };\n }\n\n const mappedProducts = productSearchResultsWithImages.map(productSearchResult => {\n if (ArrayExtensions.hasElements(productSearchResult.AttributeValues)) {\n for (const element of productSearchResult.AttributeValues) {\n if (\n 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 ) {\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: channelInventoryConfiguration\n ? channelInventoryConfiguration.InventoryProductAttributeRecordId\n : undefined,\n inventoryAwareSortableAttributeId: channelInventoryConfiguration\n ? channelInventoryConfiguration.ProductAvailabilitySortableAttributeRecordId\n : 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(input: GetFullProductsByCollectionInput, context: IActionContext): Promise {\n let promise: AsyncResult;\n let channelInventoryConfigurationPromise: AsyncResult;\n let searchProductId;\n const searchCriteriaInput: ProductSearchCriteria = {};\n searchCriteriaInput.Context = { ChannelId: context.requestContext.apiSettings.channelId, CatalogId: input.catalogId };\n // Decouple searchCriteriaInput.Refinement from input.refiners to avoid input.refiners being modified below\n searchCriteriaInput.Refinement = [...input.refiners];\n if (process.env.NODE_ENV === 'development' && process.env.ENABLE_CLOUD_SEARCH?.toLowerCase() !== 'true') {\n searchCriteriaInput.IncludeAttributes = false;\n } else {\n searchCriteriaInput.IncludeAttributes = input.includeAttributes;\n }\n searchCriteriaInput.SkipVariantExpansion = true;\n const defaultNumber: number = 0;\n\n if (input.channelInventoryConfiguration) {\n channelInventoryConfigurationPromise = AsyncResult.resolve(input.channelInventoryConfiguration);\n } else {\n channelInventoryConfigurationPromise = getInventoryConfigurationAsync({ callerContext: context });\n }\n const channelInventoryConfiguration = await channelInventoryConfigurationPromise;\n\n // Replace InventoryProductAttribute with boolean refiner.\n // Because the value of InventoryProductAttribute is different from language to language since it's string type.\n // The cached old inventory refiner value may be hit when customer switch language which will lead to \"no products found\" issue.\n const inventoryRefiner = searchCriteriaInput.Refinement.find(\n refiner => refiner.RefinerRecordId === channelInventoryConfiguration?.InventoryProductAttributeRecordId\n );\n if (inventoryRefiner) {\n searchCriteriaInput.Refinement = searchCriteriaInput.Refinement.filter(\n refiner => refiner.RefinerRecordId !== channelInventoryConfiguration?.InventoryProductAttributeRecordId\n );\n\n const isInStockRefiner =\n inventoryRefiner.LeftValueBoundString !== channelInventoryConfiguration?.InventoryOutOfStockAttributeValueText &&\n inventoryRefiner.RightValueBoundString !== channelInventoryConfiguration?.InventoryOutOfStockAttributeValueText;\n const inventoryRefinerValue = getInventorySortableRefinerValue(channelInventoryConfiguration, isInStockRefiner);\n\n const isInventoryRefinerValueExist = searchCriteriaInput.Refinement.some(\n refiner => refiner.RefinerRecordId === inventoryRefinerValue?.RefinerRecordId\n );\n if (!isInventoryRefinerValueExist && inventoryRefinerValue) {\n searchCriteriaInput.Refinement.push(inventoryRefinerValue);\n }\n }\n\n if (context.requestContext.app.config?.productListInventoryDisplay === ProductListInventoryFilteringOptions.HideOOS) {\n const isInStock = true;\n const inventoryInStockRefinerValue = getInventorySortableRefinerValue(channelInventoryConfiguration, isInStock);\n\n const isInventoryInStockRefinerValueExist = searchCriteriaInput.Refinement.some(\n refiner => refiner.RefinerRecordId === inventoryInStockRefinerValue?.RefinerRecordId\n );\n if (!isInventoryInStockRefinerValueExist && inventoryInStockRefinerValue) {\n searchCriteriaInput.Refinement.push(inventoryInStockRefinerValue);\n }\n }\n\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access -- app configs are of generic type\n if (\n context.requestContext.app.config?.productListInventoryDisplay === ProductListInventoryFilteringOptions.SortOOS &&\n channelInventoryConfiguration.ProductAvailabilitySortableAttributeRecordId\n ) {\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('[GetFullProductsForCollection]Category Page Detected, but no global categoryId found');\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 && context.requestContext.query.recommendation) {\n const searchObject = JSON.parse(input.searchText);\n if (context.requestContext.query.productId) {\n searchProductId = Number(searchObject.ProductId);\n }\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 ) {\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 if (searchProductId) {\n searchCriteriaInput.Ids = [searchProductId || defaultNumber];\n }\n promise = searchByCriteriaAsync(\n {\n callerContext: context,\n queryResultSettings: input.queryResultSettings\n },\n searchCriteriaInput\n );\n }\n } else if (input.searchText && context.requestContext.query?.discountIds) {\n const accountInformation = await getCustomer(new GetCustomerInput(context.requestContext.apiSettings), context);\n const discountIds = context.requestContext.query?.discountIds.split(',');\n\n const productPromotions = await getProductPromotionsAsync(\n {\n callerContext: context,\n queryResultSettings: input.queryResultSettings\n },\n discountIds ?? [],\n {\n HeaderContext: {\n ChannelId: context.requestContext.apiSettings.channelId,\n CustomerAccountNumber: accountInformation?.AccountNumber\n },\n LineContexts: [\n {\n CatalogId: input.catalogId\n }\n ]\n },\n new Date()\n );\n\n const productIds = productPromotions.map(p => p.ProductId ?? 0);\n searchCriteriaInput.Ids = productIds;\n searchCriteriaInput.CustomerAccountNumber = accountInformation.AccountNumber;\n\n promise = searchByCriteriaAsync(\n {\n callerContext: context,\n queryResultSettings: input.queryResultSettings\n },\n searchCriteriaInput\n );\n } else {\n throw new Error('[GetFullProductsForCollection]Search Page Detected, but no q= or productId= query parameter found');\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.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport {\n CacheType,\n createObservableDataAction,\n IAction,\n IActionContext,\n IActionInput,\n IAny,\n ICommerceApiSettings,\n ICreateActionContext,\n IGeneric\n} 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\n// eslint-disable-next-line @typescript-eslint/naming-convention -- Name change will require many modifications\ninterface SearchConfiguration {\n ProductSortColumns?: SortColumn[];\n}\n\n// eslint-disable-next-line @typescript-eslint/naming-convention -- Name change will require many modifications\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 || [])\n .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.\n * All rights reserved. See LICENSE 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(\n searchCriteria: ProductSearchCriteria,\n queryResultSettings: IQueryResultSettings,\n ctx: IActionContext\n): Promise {\n return getProductSearchRefinersAsync({ callerContext: ctx, queryResultSettings }, searchCriteria).then(\n (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","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE 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';\nimport { AsyncResult, ChannelInventoryConfiguration, ProductRefinerValue, ProductSearchCriteria } from '@msdyn365-commerce/retail-proxy';\nimport { getInventoryConfigurationAsync } from '@msdyn365-commerce/retail-proxy/dist/DataActions/StoreOperationsDataActions.g';\n\nimport { BaseCollectionInput, createBaseCollectionInput } from './base-collection-action';\nimport { getProductRefinerHierarchy } from './get-product-refiner-hierarchy';\nimport { getInventorySortableRefinerValue, ProductListInventoryFilteringOptions } from '.';\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 &&\n this.queryResultSettings.Sorting &&\n this.queryResultSettings.Sorting.Columns &&\n this.queryResultSettings.Sorting.Columns.length > 0)\n ) {\n return 'request';\n }\n return 'application';\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 context\n */\nasync function action(input: RefinersByCollectionInput, context: IActionContext): Promise {\n let searchProductId;\n // Decouple refiners from input.refiners to avoid input.refiners being modified below\n let refiners: ProductRefinerValue[] = [...input.refiners] || [];\n\n let channelInventoryConfigurationPromise: AsyncResult;\n if (input.channelInventoryConfiguration) {\n channelInventoryConfigurationPromise = AsyncResult.resolve(input.channelInventoryConfiguration);\n } else {\n channelInventoryConfigurationPromise = getInventoryConfigurationAsync({ callerContext: context });\n }\n const channelInventoryConfiguration = await channelInventoryConfigurationPromise;\n\n // Replace InventoryProductAttribute with boolean refiner.\n // Because the value of InventoryProductAttribute is different from language to language since it's string type.\n // The cached old inventory refiner value may be hit when customer switch language which will lead to \"no products found\" issue.\n const inventoryRefiner = refiners.find(\n refiner => refiner.RefinerRecordId === channelInventoryConfiguration?.InventoryProductAttributeRecordId\n );\n if (inventoryRefiner) {\n refiners = refiners.filter(refiner => refiner.RefinerRecordId !== channelInventoryConfiguration?.InventoryProductAttributeRecordId);\n\n const isInStockRefiner =\n inventoryRefiner.LeftValueBoundString !== channelInventoryConfiguration?.InventoryOutOfStockAttributeValueText &&\n inventoryRefiner.RightValueBoundString !== channelInventoryConfiguration?.InventoryOutOfStockAttributeValueText;\n const inventoryRefinerValue = getInventorySortableRefinerValue(channelInventoryConfiguration, isInStockRefiner);\n\n const isInventoryRefinerValueExist = refiners.some(refiner => refiner.RefinerRecordId === inventoryRefinerValue?.RefinerRecordId);\n if (!isInventoryRefinerValueExist && inventoryRefinerValue) {\n refiners.push(inventoryRefinerValue);\n }\n }\n\n if (context.requestContext.app.config?.productListInventoryDisplay === ProductListInventoryFilteringOptions.HideOOS) {\n const isInStock = true;\n const inventoryInStockRefinerValue = getInventorySortableRefinerValue(channelInventoryConfiguration, isInStock);\n\n const isInventoryInStockRefinerValueExist = refiners.some(\n refiner => refiner.RefinerRecordId === inventoryInStockRefinerValue?.RefinerRecordId\n );\n if (!isInventoryInStockRefinerValueExist && inventoryInStockRefinerValue) {\n refiners.push(inventoryInStockRefinerValue);\n }\n }\n\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 ? refiners : []\n },\n input.queryResultSettings,\n context\n );\n }\n throw new Error('[GetRefinersForCollection]Category Page Detected, but no global categoryId found');\n } else {\n if (input.searchText && context.requestContext.query && context.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 ? refiners : []\n },\n input.queryResultSettings,\n context\n );\n }\n if (input.searchText && context.requestContext.query && context.requestContext.query.recommendation) {\n const searchObject = JSON.parse(input.searchText);\n if (context.requestContext.query.productId) {\n searchProductId = Number(searchObject.ProductId);\n }\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 const searchCriteriaInput: ProductSearchCriteria = {};\n searchCriteriaInput.Context = {\n ChannelId: input.apiSettings.channelId,\n CatalogId: input.catalogId\n };\n searchCriteriaInput.Refinement = input.isUpdateRefinerPanel ? refiners : [];\n searchCriteriaInput.RecommendationListId = searchObject.Recommendation;\n if (searchProductId) {\n searchCriteriaInput.Ids = [searchProductId || DefaultValues.defaultProductIdValue];\n }\n return getProductRefinerHierarchy(searchCriteriaInput, input.queryResultSettings, context);\n }\n } else {\n throw new Error('[GetFullProductsForCollection]Search Page Detected, but no q= or productId= query parameter found');\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.\n * All rights reserved. See LICENSE 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 {\n AttributeDataType,\n ChannelInventoryConfiguration,\n ProductRefinerSource,\n ProductRefinerValue\n} from '@msdyn365-commerce/retail-proxy';\nimport { BaseCollectionInput } from './base-collection-action';\nimport { getProductRefinerHierarchy } from './get-product-refiner-hierarchy';\n\n/**\n * Returns inventory in stock sortable refiner value.\n * @param channelInventoryConfiguration - The channelInventoryConfiguration.\n * @param isInStock - The flag indicating whether is getting in-stock refiner or out-of-stock refiner.\n * @returns Refiners.\n */\nexport const getInventorySortableRefinerValue = (\n channelInventoryConfiguration: ChannelInventoryConfiguration,\n isInStock: boolean\n): ProductRefinerValue | undefined => {\n if (channelInventoryConfiguration && channelInventoryConfiguration.ProductAvailabilitySortableAttributeRecordId) {\n return {\n RefinerRecordId: channelInventoryConfiguration.ProductAvailabilitySortableAttributeRecordId,\n DataTypeValue: AttributeDataType.TrueFalse,\n LeftValueBoundString: isInStock ? 'true' : 'false',\n RightValueBoundString: isInStock ? 'true' : 'false',\n UnitText: '',\n RowNumber: 0,\n Count: 0,\n ExtensionProperties: [],\n RefinerSourceValue: ProductRefinerSource.Attribute\n };\n }\n return undefined;\n};\n\n/**\n * InventoryInStockRefinerValue Input action.\n * @remark The get-inventory-refiners data action is obsoleted. Please use getInventorySortableRefinerValue instead.\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 {\n count: true\n },\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 input.channelInventoryConfiguration,\n input.inventoryRefiner\n );\n\n this.inventoryProductAttributeRecordId =\n inventoryProductAttributeRecordId || input.channelInventoryConfiguration?.InventoryProductAttributeRecordId || 0;\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 * @remark The get-inventory-refiners data action is obsoleted. Please use getInventorySortableRefinerValue instead.\n */\nasync function action(input: InventoryInStockRefinerValueInput, context: IActionContext): Promise {\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\n // InventoryProductAttributeRecordId may be 0, and recId of default refiner Category/Price/Rating is always 0 by design. In this case, we should not return refiner\n // Why recId of default refiner Category/Price/Rating is 0: see GetChannelProductRefiners.sql\n return (\n (input.channelInventoryConfiguration?.InventoryProductAttributeRecordId !== 0 &&\n refiners.find(refiner => refiner.RecordId === input.channelInventoryConfiguration?.InventoryProductAttributeRecordId)) ||\n // keep legacy logic to avoid break existing customers usage from this file\n (input.inventoryProductAttributeRecordId !== 0 &&\n refiners.find(refiner => refiner.RecordId === input.inventoryProductAttributeRecordId)) ||\n null\n );\n}\n\n/**\n * Action.\n * @param id - Id.\n * @param action - Action.\n * @returns - Results.\n * @remark The get-inventory-refiners data action is obsoleted. Please use getInventorySortableRefinerValue instead.\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.\n * All rights reserved. See LICENSE 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 = [\n 'DataTypeValue',\n 'LeftValueBoundString',\n 'RefinerRecordId',\n 'RefinerSourceValue',\n 'RightValueBoundString',\n 'UnitText',\n // Added RowNumber to identify if custom range integer or API values option is selected\n 'RowNumber'\n];\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\n .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 })\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) =>\n first.RefinerRecordId && second.RefinerRecordId && first.RefinerRecordId > second.RefinerRecordId ? 1 : -1\n );\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 * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE 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(input: ListPageStateInput, ctx: IActionContext): Promise {\n return new ListPageState();\n}\n\n/**\n * Create new input for create action.\n * @param inputData\n */\nexport const createListPageInput = (inputData: ICreateActionContext>): 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.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { ITelemetry } from '@msdyn365-commerce/core';\nimport { AttributeDataType, DisplayTemplate, ProductRefinerValue, RefinerType } from '@msdyn365-commerce/retail-proxy';\n\nimport { IProductRefinerHierarchy } from '@msdyn365-commerce/commerce-entities';\nimport { DimensionTypes } from '@msdyn365-commerce-modules/retail-actions';\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 * 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 * 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 * 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\nexport interface IRefineItemData {\n sourceValue?: number;\n swatchImageUrl?: string;\n swatchColorHexCode?: string;\n refinerItemId: number;\n dataTypeValue?: number;\n name: string;\n label: string;\n count?: number;\n isChecked: boolean;\n refineItemUrl?: string;\n minValue?: string;\n maxValue?: string;\n dimensionType?: DimensionTypes;\n rowNumber?: number;\n unitText?: string;\n updatedSliderMaxValue?: string;\n updatedSliderMinValue?: string;\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 || dataTypeValue === AttributeDataType.Decimal;\n}\n\n/**\n * Checks if the data type value corresponds to a range type integer.\n * @param dataTypeValue\n */\nexport function isRangeTypeForInteger(dataTypeValue: number | undefined): boolean {\n return (\n dataTypeValue === AttributeDataType.Currency ||\n dataTypeValue === AttributeDataType.Decimal ||\n dataTypeValue === AttributeDataType.Integer\n );\n}\n\n/**\n * Checks if the data type value corresponds to a custom input box Range.\n * @param dataTypeValue\n */\nexport function isCustomRangeTypeIntegerSelected(\n selectedRefinementCriterion: ProductRefinerValue,\n parentProductRefinerHierarchy: IProductRefinerHierarchy\n): boolean {\n return (\n selectedRefinementCriterion?.RowNumber !== undefined &&\n selectedRefinementCriterion?.RowNumber !== null &&\n selectedRefinementCriterion?.DataTypeValue === AttributeDataType.Integer &&\n parentProductRefinerHierarchy.DisplayTemplateValue === DisplayTemplate.Range\n );\n}\n\n/**\n * Checks if the selectedRefinementCriterion is siingle type with API va;ues or custom type.\n * If custom type then RowNumber is null\n * @param dataTypeValue\n */\nexport function isSingleSelectRangeTypeIntegerSelected(\n selectedRefinementCriterion: ProductRefinerValue,\n productRefinerValue: ProductRefinerValue\n): boolean {\n return (\n productRefinerValue.LeftValueBoundString === selectedRefinementCriterion?.LeftValueBoundString &&\n productRefinerValue.RightValueBoundString === selectedRefinementCriterion?.RightValueBoundString &&\n selectedRefinementCriterion?.RowNumber !== undefined &&\n selectedRefinementCriterion?.RowNumber !== null &&\n selectedRefinementCriterion !== undefined\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 */\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((refinementCriterion: ProductRefinerValue) =>\n 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 parent?: IProductRefinerHierarchy\n): boolean {\n // If the value is a range, then match only on data type value; otherwise match on item string\n // Distinguish by displaytype also\n return (\n refinementCriterion.RefinerRecordId === productRefinerValue.RefinerRecordId &&\n refinementCriterion.RefinerSourceValue === productRefinerValue.RefinerSourceValue &&\n refinementCriterion.DataTypeValue === productRefinerValue.DataTypeValue &&\n ((parent?.DisplayTemplateValue === DisplayTemplate.Range\n ? isRangeType(refinementCriterion.DataTypeValue)\n : isRangeTypeForInteger(refinementCriterion.DataTypeValue)) ||\n refinementCriterion.LeftValueBoundString === productRefinerValue.LeftValueBoundString)\n );\n}\n\nexport function getIntegerRangeName(productRefinerValue: ProductRefinerValue): string {\n let rangeValue = '';\n\n if (productRefinerValue.LeftValueBoundString === '' && productRefinerValue.RightValueBoundString !== '') {\n rangeValue = `< ${productRefinerValue.RightValueBoundLocalizedString || productRefinerValue.RightValueBoundString}`;\n } else if (productRefinerValue.RightValueBoundString === '' && productRefinerValue.LeftValueBoundString !== '') {\n rangeValue = `> ${productRefinerValue.LeftValueBoundLocalizedString || productRefinerValue.LeftValueBoundString}`;\n } else if (productRefinerValue.RightValueBoundString !== '' && productRefinerValue.LeftValueBoundString !== '') {\n rangeValue = `${productRefinerValue.LeftValueBoundLocalizedString ||\n productRefinerValue.LeftValueBoundString} - ${productRefinerValue.RightValueBoundString ||\n productRefinerValue.RightValueBoundString}`;\n }\n return rangeValue;\n}\n\n/**\n * Get input without formatting.\n * @param input - Input string.\n * @returns - Returns number.\n */\nexport function getInputWithoutFormatting(input: string): string {\n // First try to cast raw input to a number\n const inputAsNumber = Number(input);\n if (!Number.isNaN(inputAsNumber)) {\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 = formattedPriceReverseLookup.get(input);\n // return reverseLookupResult || input;\n return input;\n}\n\nexport function getUpdatedRefinementCriteria(\n itemToggleNotification: IRefineItemToggleNotification,\n currentRefinementCriteria: ProductRefinerValue[]\n): ProductRefinerValue[] {\n const updatedRefinementCriteria: ProductRefinerValue[] = [];\n let toggledItemFound = false;\n\n // Keeping only itemToggled value for integer-range type in currentRefinementCriteria\n if (\n itemToggleNotification.parentProductRefinerHierarchy.DataTypeValue === AttributeDataType.Integer &&\n itemToggleNotification.parentProductRefinerHierarchy.DisplayTemplateValue === DisplayTemplate.Range\n ) {\n currentRefinementCriteria = currentRefinementCriteria.filter(r => {\n return r.RefinerRecordId !== itemToggleNotification.productRefinerValue.RefinerRecordId;\n });\n }\n\n currentRefinementCriteria.forEach((selectedCriterion: ProductRefinerValue) => {\n if (\n isMatchingRefinementCriterion(\n itemToggleNotification.productRefinerValue,\n selectedCriterion,\n itemToggleNotification.parentProductRefinerHierarchy\n )\n ) {\n toggledItemFound = true;\n if (itemToggleNotification.isSelecting) {\n const next = {\n ...selectedCriterion,\n LeftValueBoundString:\n (itemToggleNotification.rangeStart !== undefined && `${itemToggleNotification.rangeStart}`) ||\n selectedCriterion.LeftValueBoundString,\n RightValueBoundString:\n (itemToggleNotification.rangeEnd !== undefined && `${itemToggleNotification.rangeEnd}`) ||\n selectedCriterion.RightValueBoundString\n };\n updatedRefinementCriteria.push(next);\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:\n (itemToggleNotification.rangeStart !== undefined && `${itemToggleNotification.rangeStart}`) ||\n itemToggleNotification.productRefinerValue.LeftValueBoundString,\n RightValueBoundString:\n (itemToggleNotification.rangeEnd !== undefined && `${itemToggleNotification.rangeEnd}`) ||\n itemToggleNotification.productRefinerValue.RightValueBoundString\n };\n updatedRefinementCriteria.push(next);\n\n // If single select, then deselect any others in the parent refiner group\n if (\n (itemToggleNotification.productRefinerValue.DataTypeValue === AttributeDataType.Text ||\n itemToggleNotification.productRefinerValue.DataTypeValue === AttributeDataType.TrueFalse) &&\n itemToggleNotification.parentProductRefinerHierarchy.RefinerTypeValue === RefinerType.SingleSelect\n ) {\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) =>\n isMatchingRefinementCriterion(child, criterion, itemToggleNotification.parentProductRefinerHierarchy)\n );\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\n): 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.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { IProductRefinerHierarchy } from '@msdyn365-commerce/commerce-entities';\nimport { AttributeDataType, DisplayTemplate, 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 { getIntegerRangeName, isMatchingRefinementCriterion, isRangeType } from './utilities';\n\ninterface IRefinerMap {\n key: string;\n value: ProductRefinerValue;\n rangeDisplayType?: number | undefined;\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 (hierarchy: IProductRefinerHierarchy) =>\n !!hierarchy.Values.find((value: ProductRefinerValue) => isMatchingRefinementCriterion(value, choice))\n );\n return parent && parent.RecordId !== channelInventoryConfigurationId;\n });\n }\n return selectedChoices.map((selectedRefiner: ProductRefinerValue, index) => {\n const rangeParentDisplay = refinerHierarchy.filter(p => p.RecordId === selectedRefiner.RefinerRecordId);\n return {\n key: this._getKeyForRefinerValue(selectedRefiner, index.toString()),\n value: selectedRefiner,\n // parameter to store Display Template type\n rangeDisplayType: rangeParentDisplay[0]?.DisplayTemplateValue || undefined\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 && {label}}\n
    \n {items.map((item: IRefinerMap) => {\n this.payLoad.contentAction.etext = item.key;\n const attribute = getTelemetryAttributes(this.props.telemetryContent!, this.payLoad);\n // Get range value for Range display and integer type only (not for Integer with TextBox(4) display)\n const rangeInteger =\n item.value.DataTypeValue === AttributeDataType.Integer &&\n item.rangeDisplayType &&\n item.rangeDisplayType === DisplayTemplate.Range &&\n item.value.RefinerRecordId !== 0;\n const newIntRange = rangeInteger\n ? item.key\n : item.value.LeftValueBoundString && item.value.LeftValueBoundLocalizedString === ''\n ? item.value.LeftValueBoundString\n : (item.value.LeftValueBoundLocalizedString || item.value.LeftValueBoundLocalizedString === undefined) &&\n item.value.RefinerRecordId === 0\n ? item.key\n : item.value.LeftValueBoundString;\n return (\n
  • \n \n {newIntRange}\n \n \n
  • \n );\n })}\n
\n {items.length > 0 && clearAllText && (\n \n {clearAllText}\n \n )}\n
\n );\n }\n\n private _getKeyForRefinerValue(productRefinerValue: ProductRefinerValue, index: string): string {\n const { choiceFormat, choiceRangeValueFormat, refinerHierarchy, telemetry, refinerValues } = this.props;\n const overallFormat = choiceFormat || '{1}';\n const rangeFormat = choiceRangeValueFormat;\n let refinerName = '';\n let parent: IProductRefinerHierarchy | undefined;\n if (refinerHierarchy && refinerHierarchy.find) {\n parent = refinerHierarchy.find(\n (hierarchy: IProductRefinerHierarchy) =>\n !!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 if (productRefinerValue.RefinerRecordId === 0) {\n const filterValue = refinerValues?.Values.find(\n refiner => refiner.LeftValueBoundString === productRefinerValue.LeftValueBoundString\n );\n refinerValueName = (filterValue ? filterValue.LeftValueBoundLocalizedString : productRefinerValue.LeftValueBoundString) || '';\n } else {\n refinerValueName = productRefinerValue.LeftValueBoundLocalizedString || productRefinerValue.LeftValueBoundString || '';\n }\n\n if (refinerName === 'Rating' || refinerName === 'Price') {\n return overallFormat.replace('{0}', refinerName).replace('{1}', `${refinerValueName}`);\n }\n // Adding integer range format\n if (\n productRefinerValue.DataTypeValue === AttributeDataType.Integer &&\n parent?.DisplayTemplateValue === DisplayTemplate.Range &&\n productRefinerValue.RefinerRecordId !== 0\n ) {\n refinerValueName = getIntegerRangeName(productRefinerValue);\n return refinerValueName;\n }\n return overallFormat.replace('{0}', refinerName).replace('{1}', `${refinerValueName}_${refinerName}_${index}`);\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.id === selected.key);\n return (result && result.value) || undefined;\n }\n}\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE 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.\n * All rights reserved. See LICENSE 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(\n product.ItemId,\n context.actionContext.requestContext.apiSettings,\n context.request.app?.config?.OmniChannelMedia\n );\n const heading =\n 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,\n context.request.gridSettings,\n product.PrimaryImageUrl,\n product.Name,\n fallbackImage,\n context.actionContext.requestContext\n )}\n
\n \n
\n

{heading}

\n {renderProductTitle(product?.Name)}\n
\n
\n );\n};\n\nfunction renderProductPlacementImage(\n imageSettings?: IImageSettings,\n gridSettings?: IGridSettings,\n imageUrl?: string,\n altText?: string,\n fallbackImage?: string,\n context?: IRequestContext\n): JSX.Element | null {\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\nfunction renderProductTitle(title?: string): JSX.Element | null {\n return

{title}

;\n}\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE 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 {' '}\n {text}{' '}\n \n);\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { Button, Modal, ModalBody, ModalFooter, ModalHeader } 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 \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 {props.resources.modalTitle};\n};\n\nconst modalFooterNode = (props: ISearchResultModalProps) => {\n return (\n \n \n \n );\n};\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { IProductsDimensionsAvailabilities } from '@msdyn365-commerce/commerce-entities';\nimport { 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 productComparisonButton?: {} | 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(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\nexport const ProductSearchResultItems: React.FC = ({\n products,\n context,\n imageSettings,\n resources,\n moduleType,\n moduleId,\n allowBackNavigation,\n telemetryContent,\n quickviewSlot,\n productComparisonButton,\n channelInventoryConfigurationId,\n isPriceMinMaxEnabled,\n productsDimensionAvailabilities\n}) => {\n const priceResources: IPriceComponentResources = {\n priceRangeSeparator: resources.priceRangeSeparator\n };\n return (\n
    \n {products.map((product: ProductSearchResult, index: number) => (\n
  • \n \n ArrayExtensions.hasElements(dimensionAvailability) &&\n dimensionAvailability[0].masterProductId === product.MasterProductId\n )}\n />\n
  • \n ))}\n
\n );\n};\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE 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(\n this.props.productRefinerValue.RefinerRecordId\n )}`;\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 =\n this.props.selectedRefinementCriterion?.LeftValueBoundString ?? this.props.productRefinerValue.LeftValueBoundString ?? '0';\n const selectedMax =\n this.props.selectedRefinementCriterion?.RightValueBoundString ??\n this.props.productRefinerValue.RightValueBoundString ??\n 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(\n sliderId,\n sliderKeyString,\n selectedMin,\n selectedMinPrice,\n selectedMax,\n selectedMaxPrice,\n maxPrice\n );\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, 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(\n 'Cannot render refine value range without productRefinerValue and parentProductRefinerHierarchy'\n );\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(\n this.props.productRefinerValue.RefinerRecordId\n )}`;\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 =\n this.props.selectedRefinementCriterion?.LeftValueBoundString ?? this.props.productRefinerValue.LeftValueBoundString ?? '0';\n const selectedMax =\n this.props.selectedRefinementCriterion?.RightValueBoundString ??\n this.props.productRefinerValue.RightValueBoundString ??\n 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(\n sliderId,\n sliderKeyString,\n selectedMin,\n selectedMinPrice,\n selectedMax,\n selectedMaxPrice,\n maxPrice\n );\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 = (\n sliderId: string,\n sliderKey: string,\n selectedMin: string,\n selectedMinPrice: string,\n selectedMax: string | undefined,\n selectedMaxPrice: string,\n maxPrice: string\n ): 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 ${\n validationErrorMin ? 'refine-submenu__input-range--error' : ''\n }`;\n const maxInputClassName = `ms-refine-submenu__input-range refine-submenu__input-range-max ${\n validationErrorMax ? 'refine-submenu__input-range--error' : ''\n }`;\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 )}\n {validationErrorMax && validationErrorMin !== validationErrorMax && (\n \n {validationErrorMax}\n \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 {\n onToggle,\n parentProductRefinerHierarchy,\n productRefinerValue,\n refineItemCommonProps,\n selectedRefinementCriterion\n } = 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 {\n onToggle,\n parentProductRefinerHierarchy,\n productRefinerValue,\n refineItemCommonProps,\n selectedRefinementCriterion\n } = 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(\n selected: string | undefined,\n touched: boolean,\n validationError: string | undefined\n ): 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 if (this.props.productRefinerValue.RefinerRecordId === 0) {\n const result = this.props.context.cultureFormatter.formatCurrency(Number(amount), this.currencyCode);\n return result;\n }\n return amount || '';\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 // eslint-disable-next-line @typescript-eslint/no-explicit-any\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 // eslint-disable-next-line @typescript-eslint/no-explicit-any\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 // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private _focusOnSliderThumb(sliderChangeNotification: any): void {\n if (sliderChangeNotification.id) {\n const element = document.getElementById(`${sliderChangeNotification.id}range`);\n if (element) {\n setTimeout(() => {\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.\n * All rights reserved. See LICENSE 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 {\n AttributeDataType,\n DisplayTemplate,\n ProductRefinerSource,\n ProductRefinerValue,\n RefinerType\n} 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 classnames from 'classnames';\nimport * as React from 'react';\n\nimport { IRefineItemCommonProps } from './refine-item.props.common';\nimport { IRefineItemToggleNotification } from './refine-item-toggle-notification';\nimport { getIntegerRangeName, isSingleSelectRangeTypeIntegerSelected } from './utilities';\n\n/**\n * RefineItem properties.\n */\nexport interface IRefineItemProps {\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, 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(\n `[refine-item] RefineItem without LeftValueBoundString: ${JSON.stringify(productRefinerValue)}`\n );\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(\n productRefinerValue,\n parentProductRefinerHierarchy,\n isChecked,\n context,\n index,\n telemetryContent,\n productCountAriaLabel,\n 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\n ? format(refineItemAriaLabel, parentProductRefinerHierarchy.KeyName, productText)\n : '';\n } else {\n refineMenuItemAriaLabel = refineItemsAriaLabel\n ? format(refineItemsAriaLabel, parentProductRefinerHierarchy.KeyName, productText, productCount)\n : '';\n }\n\n const dimensionType = (this.props.parentProductRefinerHierarchy.KeyName?.toLocaleLowerCase() ?? '') as DimensionTypes;\n const shouldDisplayAsSwatch = this._getShouldDisplayAsSwatch(dimensionType);\n\n let className = 'ms-refine-submenu-item';\n if (shouldDisplayAsSwatch) {\n className = classnames(className, `ms-refine-submenu-item__dimension__${dimensionType}`);\n }\n\n // If the swatch has no color or image specified, it should be displayed as text.\n // We don't use swatch logic to display the number of the results found together with the text.\n const hasColor = !StringExtensions.isNullOrWhitespace(productRefinerValue.SwatchColorHexCode);\n const hasImage = !StringExtensions.isNullOrWhitespace(productRefinerValue.SwatchImageUrl);\n const hasContentSwatch = hasColor || hasImage;\n if (\n parentProductRefinerHierarchy.DataTypeValue === AttributeDataType.Integer &&\n parentProductRefinerHierarchy.DisplayTemplateValue === DisplayTemplate.Range\n ) {\n const rangeValue = getIntegerRangeName(productRefinerValue);\n return (\n
  • \n \n \n \n
  • \n );\n } else {\n return (\n
  • \n \n {hasContentSwatch && shouldDisplayAsSwatch && this._renderSwatch(dimensionType)}\n \n \n
  • \n );\n }\n }\n\n private _getShouldDisplayAsSwatch(dimensionType: DimensionTypes) {\n const shouldDisplayAsSwatch = checkIfShouldDisplayAsSwatch(dimensionType, this.props.context as ICoreContext);\n return shouldDisplayAsSwatch;\n }\n\n private _renderSwatch(dimensionType: DimensionTypes): JSX.Element | null {\n const productRefinerValue = this.props.productRefinerValue;\n\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 const swatchItems = [\n {\n itemId: `${productRefinerValue.RefinerRecordId ?? ''}-${dimensionType}-${text}`,\n value: text,\n dimensionType,\n colorHexCode: productRefinerValue.SwatchColorHexCode,\n imageUrl: productRefinerValue.SwatchImageUrl\n }\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 this.anchorType.current && this.anchorType.current.focus();\n }, 0);\n }\n };\n\n private _renderRating(\n productRefinerValue: ProductRefinerValue,\n parentProductRefinerHierarchy: IProductRefinerHierarchy,\n isChecked: boolean,\n context: ICoreContext,\n index?: number,\n telemetryContent?: ITelemetryContent,\n ratingUserCountAriaLabel?: string,\n ratingSingleUserCountAriaLabel?: string\n ): 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(\n value => value.DataTypeValue === productRefinerValue.DataTypeValue\n );\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 =\n productRefinerValue.Count !== undefined && productRefinerValue.Count === defaultChkProductCount\n ? ratingSingleUserCountAriaLabel && format(ratingSingleUserCountAriaLabel, productRefinerValue.Count)\n : ratingUserCountAriaLabel && 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 * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { observer } from 'mobx-react';\nimport * as React from 'react';\n\nimport { isUndefined } from 'lodash';\nimport { ProductRefinerValue } from '@msdyn365-commerce/retail-proxy';\nimport { Button } from '@msdyn365-commerce-modules/utilities';\nimport { IRefineItemState } from './refine-item';\nimport { isCustomRangeTypeIntegerSelected } from './utilities';\nimport { IProductRefinerHierarchy } from '@msdyn365-commerce/commerce-entities';\nimport { IRefineItemCommonProps } from './refine-item.props.common';\nimport { IRefineItemToggleNotification } from './refine-item-toggle-notification';\n\nexport type RangeRefineItemInputType = 'slider' | 'input';\n\n/**\n * Range refine item properties.\n */\nexport interface IRangeRefineItemInputProps {\n parentProductRefinerHierarchy: IProductRefinerHierarchy;\n selectedRefinementCriterion: ProductRefinerValue | undefined;\n refineItemCommonProps: IRefineItemCommonProps;\n isDisabled: boolean;\n rangeType: RangeRefineItemInputType;\n\n /**\n * The telemetry content\n */\n onToggle(notfication: Readonly): void;\n}\n\n/**\n * Range refine item state.\n */\nexport interface IRangeRefineItemInputState extends IRefineItemState {\n validationErrorMin: string | undefined;\n validationErrorMax: string | undefined;\n selectedMin: string | undefined;\n selectedMax: string | undefined;\n invalidData: boolean | undefined;\n}\n\n/**\n * RangeRefineItem component (controlled by RefineSubmenu).\n */\n@observer\nexport default class RangeRefineItemInput 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 public constructor(props: IRangeRefineItemInputProps) {\n super(props);\n this._changeMinInputRange = this._changeMinInputRange.bind(this);\n this._changeMaxInputRange = this._changeMaxInputRange.bind(this);\n this._applyCustom = this._applyCustom.bind(this);\n\n this.minInput = React.createRef();\n this.maxInput = React.createRef();\n let initialMin = '';\n let initialMax = '';\n const { selectedRefinementCriterion, parentProductRefinerHierarchy } = this.props;\n if (selectedRefinementCriterion) {\n initialMin = isCustomRangeTypeIntegerSelected(selectedRefinementCriterion, parentProductRefinerHierarchy)\n ? ''\n : selectedRefinementCriterion?.LeftValueBoundString || '';\n initialMax = isCustomRangeTypeIntegerSelected(selectedRefinementCriterion, parentProductRefinerHierarchy)\n ? ''\n : selectedRefinementCriterion?.RightValueBoundString || '';\n }\n\n this.state = {\n validationErrorMin: undefined,\n validationErrorMax: undefined,\n selectedMin: initialMin,\n selectedMax: initialMax,\n invalidData: !(initialMin && initialMax),\n isChecked: false\n };\n }\n\n public shouldComponentUpdate(nextProps: IRangeRefineItemInputProps, nextState: IRangeRefineItemInputState): boolean {\n if (this.state === nextState && this.props === nextProps) {\n return false;\n }\n nextState.invalidData = !(nextState.selectedMin && nextState.selectedMax);\n return true;\n }\n\n public componentDidUpdate(previousProps: IRangeRefineItemInputProps): void {\n if (previousProps !== this.props) {\n this.updateInputRangerProps();\n }\n }\n\n public render(): JSX.Element | undefined {\n if (this.props.rangeType === 'input') {\n return this._renderInputFields();\n }\n return undefined;\n }\n\n // /**\n // * Function to update slider props.\n // */\n private updateInputRangerProps(): void {\n const selectedMin = !isUndefined(this.props.selectedRefinementCriterion?.RowNumber)\n ? ''\n : this.props.selectedRefinementCriterion?.LeftValueBoundString;\n const selectedMax = !isUndefined(this.props.selectedRefinementCriterion?.RowNumber)\n ? ''\n : this.props.selectedRefinementCriterion?.RightValueBoundString;\n this.setState({ selectedMin, selectedMax });\n }\n\n private _renderInputFields(): JSX.Element | undefined {\n const { isDisabled, parentProductRefinerHierarchy, refineItemCommonProps } = this.props;\n const { 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 const minInputClassName = `ms-refine-submenu__input-range refine-submenu__input-range-min ${\n validationErrorMin ? 'refine-submenu__input-range--error' : ''\n }`;\n const maxInputClassName = `ms-refine-submenu__input-range refine-submenu__input-range-max ${\n validationErrorMax ? 'refine-submenu__input-range--error' : ''\n }`;\n return (\n
  • \n
    \n
    \n \n {' - '}\n \n {validationErrorMin && (\n \n {validationErrorMin}\n \n )}\n {validationErrorMax && validationErrorMin !== validationErrorMax && (\n \n {validationErrorMax}\n \n )}\n
    \n
    \n \n
    \n
    \n
  • \n );\n }\n\n private _applyCustom(event: React.MouseEvent): void {\n const selectedMinValue = this._getInputWithoutFormatting(this.state.selectedMin || '');\n this.setState({\n selectedMin: selectedMinValue,\n minTouched: false\n });\n const minInput = Number(selectedMinValue);\n const { onToggle, parentProductRefinerHierarchy } = this.props;\n const max = this.state.selectedMax;\n\n const maxNum = max ? Number(max) : undefined;\n const productRefinerValue: ProductRefinerValue = {\n RefinerRecordId: parentProductRefinerHierarchy.Values[0].RefinerRecordId,\n LeftValueBoundString: this.state.selectedMin,\n RightValueBoundString: this.state.selectedMax,\n DataTypeValue: parentProductRefinerHierarchy.DataTypeValue,\n RefinerSourceValue: parentProductRefinerHierarchy.Values[0].RefinerSourceValue\n };\n\n if (this._validateRange(minInput, maxNum)) {\n onToggle({\n parentProductRefinerHierarchy,\n productRefinerValue,\n isSelecting: true\n });\n }\n }\n\n private _changeMinInputRange(event: React.ChangeEvent): void {\n this.setState({\n selectedMin: event.target.value.trim()\n });\n }\n\n private _changeMaxInputRange(event: React.ChangeEvent): void {\n this.setState({\n selectedMax: event.target.value.trim()\n });\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 _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","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE 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 {\n AttributeDataType,\n DisplayTemplate,\n ProductRefinerSource,\n ProductRefinerValue,\n RefinerType\n} from '@msdyn365-commerce/retail-proxy';\nimport { Button, Collapse, ITelemetryContent } from '@msdyn365-commerce-modules/utilities';\nimport classnames from 'classnames';\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, isRangeTypeForInteger } from './utilities';\nimport RangeRefineItemInput from './range-refine-item-input';\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 this.state = {\n expanded: isExpanded\n };\n }\n\n public shouldComponentUpdate(nextProps: IRefineSubmenuProps, 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\n const className = classnames(\n 'ms-refine-submenu',\n 'list-group',\n productRefinerHierarchy.KeyName // Deprecated because of the localization issues. Leaving for backward compatibility reasons.\n );\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 (\n productRefinerHierarchy.DataTypeValue === AttributeDataType.Integer &&\n productRefinerHierarchy.DisplayTemplateValue === DisplayTemplate.Range\n ) {\n return this._renderSingleMultiSelect(productRefinerHierarchy);\n }\n // Check if is of integer range type\n if (isRangeTypeForInteger(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 {\n isDisabled,\n refineItemCommonProps,\n selectedRefinerValues,\n context,\n productCountAriaLabel,\n singleProductCountAriaLabel,\n refineItemAriaLabel,\n refineItemsAriaLabel,\n isMobile\n } = this.props;\n const isSingleSelect =\n productRefinerHierarchy.RefinerTypeValue === RefinerType.SingleSelect &&\n productRefinerHierarchy.SourceValue === ProductRefinerSource.Rating;\n const role = isSingleSelect ? { role: 'listbox' } : undefined;\n let selectedRefinementCriterion: ProductRefinerValue | 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 selectedRefinementCriterion = findMatchingRefinementCriterion(child, selectedRefinerValues);\n return (\n \n refinerValuesList.find(value => value.RefinerRecordId === selectedValue.RefinerRecordId)\n )}\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 {productRefinerHierarchy.DataTypeValue === AttributeDataType.Integer &&\n productRefinerHierarchy.DisplayTemplateValue === DisplayTemplate.Range && (\n \n )}\n \n );\n }\n\n private _getRangeType(productRefinerHierarchy: IProductRefinerHierarchy): 'input' | 'slider' {\n if (\n productRefinerHierarchy.DisplayTemplateValue === DisplayTemplate.Range ||\n productRefinerHierarchy.DisplayTemplateValue === DisplayTemplate.Slider ||\n productRefinerHierarchy.DisplayTemplateValue === DisplayTemplate.SliderWithBars\n ) {\n return 'slider';\n }\n return 'input';\n }\n\n private _renderRange(productRefinerHierarchy: IProductRefinerHierarchy): JSX.Element | null {\n const {\n isDisabled,\n refineItemCommonProps,\n selectedRefinerValues,\n context,\n minValueSliderThumbAriaLabel,\n maxValueSliderThumbAriaLabel\n } = 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\n ? `${selectedRefinementCriterion.LeftValueBoundString}-${selectedRefinementCriterion.RightValueBoundString}`\n : `not-selected-${index}`;\n return (\n
  • \n \n
  • \n );\n });\n return
      {listItems}
    ;\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.\n * All rights reserved. See LICENSE 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 {` `}\n {separator}\n {` `}\n \n);\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE 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 {` `}\n {text}\n {` `}\n \n);\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport {\n CategoryHierarchy as CategoryHierarchyData,\n IProductRefinerHierarchy,\n IProductsDimensionsAvailabilities\n} from '@msdyn365-commerce/commerce-entities';\nimport MsDyn365, { getCatalogId, ICoreContext } from '@msdyn365-commerce/core';\nimport {\n ChannelInventoryConfiguration,\n format,\n ProductPrice,\n ProductRefinerValue,\n SortColumn,\n StoreOperationsDataActions,\n TextValueTranslation\n} from '@msdyn365-commerce/retail-proxy';\nimport {\n ArrayExtensions,\n DimensionAvailabilitiesForProductSearchResultInput,\n DimensionTypes,\n DimensionSwatchDisplayTypes,\n getDimensionAvailabilitiesForProductSearchResultAction,\n getPriceForProductSearchResult,\n IDimensionsApp,\n PriceForProductSearchResultInput,\n ObjectExtensions\n} from '@msdyn365-commerce-modules/retail-actions';\nimport {\n getTelemetryObject,\n ILabeledDropdownOnChangeNotification,\n ILabeledDropdownOption,\n IModuleProps,\n INodeProps,\n isMobile,\n ITelemetryContent,\n LabeledDropdown,\n UncontrolledPagination,\n VariantType\n} from '@msdyn365-commerce-modules/utilities';\nimport classnames from 'classnames';\nimport { action, computed, observable, reaction, transaction } from 'mobx';\nimport { observer } from 'mobx-react';\nimport * as React from 'react';\n\nimport {\n buildListPageUrl,\n getCollectionProducts,\n getCollectionRefinersAction,\n getCurrentUrl,\n GetFullProductsByCollectionInput,\n IFullProductsSearchResultsWithCount,\n parseQueryParam,\n ProductListInventoryFilteringOptions,\n RefinersByCollectionInput,\n sortOptions\n} from './actions';\nimport { hydrateRefinersFromUrl } from './actions/url-utils';\nimport {\n ErrorMessage,\n FeatureSearchResultItem,\n getUpdatedRefinementCriteria,\n IChoiceSummaryClickNotification,\n IRefineItemCommonProps,\n IRefineItemToggleNotification,\n ISearchResultModalViewProps,\n isMatchingRefinementCriterion,\n Link,\n ModalToggle,\n ProductSearchResultItems,\n SearchResultModal,\n Separator,\n 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 productsDimensionAvailabilities?: IProductsDimensionsAvailabilities[][];\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 channelInventoryConfiguration?: ChannelInventoryConfiguration;\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<\n ISearchResultContainerProps,\n 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 private _isMounted: boolean = false;\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 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 channelInventoryConfiguration: undefined\n };\n const { placeholderTextMax, minLabel, maxLabel, rangeNameFormat } = 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(\n this.props.context.request.telemetryPageName!,\n this.props.friendlyName,\n this.props.telemetry\n );\n this._updateViewport();\n }\n public async componentDidMount(): Promise {\n this._isMounted = true;\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 const channelInventoryConfiguration = await StoreOperationsDataActions.getInventoryConfigurationAsync({\n callerContext: this.props.context.actionContext\n });\n if (this._isMounted) {\n this.setState({ channelInventoryConfiguration });\n }\n\n this._updateListPageState(listPageState, products);\n\n // Initialize reaction based on listPageState properties\n reaction(\n () => {\n return [\n listPageState.activeFilters?.length,\n 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 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\n ? this.props.context.request.query.q\n : JSON.stringify({\n ProductId: this.props.context.request.query?.productId,\n Recommendation: this.props.context.request.query?.recommendation\n }),\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 channelInventoryConfiguration\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 (\n this.props.config.enableAffiliationBasedPricing &&\n this.props.context.actionContext.requestContext?.user?.isAuthenticated\n ) {\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 await this._updateVariantAvailability();\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(\n newListPageState.pageSize * (newListPageState.currentPageNumber ?? this.defaultPageNumber),\n this.defaultPageNumber\n )\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 this.props.context.request.query?.q\n ? this.props.context.request.query.q\n : this.props.context.request.query?.productId,\n false,\n this.props.config.updateRefinerPanel,\n undefined,\n this.catalogId,\n channelInventoryConfiguration\n );\n\n const refiners = await getCollectionRefinersAction(refinerInput, this.props.context.actionContext);\n this.setState({ refiners });\n }\n }\n );\n\n if (\n 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 ) {\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 await this._updateVariantAvailability();\n }\n\n public componentWillUnmount(): void {\n this._isMounted = false;\n if (MsDyn365.isBrowser && window.removeEventListener) {\n window.removeEventListener('resize', this._updateViewport);\n }\n }\n\n public render(): JSX.Element {\n const {\n config: { imageSettings, className },\n resources,\n data: { listPageState, products: productCollection, featureProduct }\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 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:\n this.props.data.listPageState.result?.totalProductCount !== 0 ? (\n \n ) : null,\n searchResultModal: this._getSearchResultModal(),\n isMobile: this.isMobile,\n errorMessage: errorText && ,\n FeatureSearchContainer: { className: 'ms-feature-search-result' },\n similarLookProduct: searchProduct ? featureComponent : null,\n productPrices: this.productPrices,\n productsDimensionAvailabilities: this.state.productsDimensionAvailabilities\n };\n return this.props.renderView(searchResultContainerViewProps) as React.ReactElement;\n }\n\n /**\n * Get products variants dimension availabilities.\n * @returns Void.\n */\n private readonly _updateVariantAvailability = async (): Promise => {\n const context = this.props.context as ICoreContext;\n const dimensionsToDisplayOnProductCard = context.app.config.dimensionsInProductCard;\n const dimensionsToDisplayAsSwatch = context.app.config.dimensionsAsSwatchType;\n if (\n ArrayExtensions.hasElements(dimensionsToDisplayOnProductCard) &&\n !dimensionsToDisplayOnProductCard.includes(DimensionTypes.none) &&\n ArrayExtensions.hasElements(dimensionsToDisplayAsSwatch) &&\n !dimensionsToDisplayAsSwatch.includes(DimensionTypes.none) &&\n this.props.config.includeAttributes\n ) {\n await this._getProductsDimensionsAvailabilities();\n }\n };\n\n /**\n * Update the list page state with initial data.\n * @param listPageState -- List page State.\n * @param products -- Products.\n */\n @action\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 =\n (this.props.context.request.query?.skip &&\n +this.props.context.request.query.skip / (this.props.config.itemsPerPage ?? defaultPageNumber)) ||\n 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(\n productsList,\n this.props.context as ICoreContext,\n DimensionSwatchDisplayTypes.productCard\n ),\n this.props.context.actionContext\n );\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\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 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 =\n (data.category.result &&\n SearchResultContainer.getFriendlyName(context.request.locale, data.category.result.NameTranslations)) ||\n (data.category.result && data.category.result.Name) ||\n this.props.context.request.query?.title ||\n '';\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 =\n productCountNumber !== 1\n ? format(this.props.resources.numberOfProducts, productCountNumber)\n : 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 private readonly _getCategoryHierarchy = (): ICategoryHierarchyViewProps => {\n const { data } = this.props;\n const categoryHierarchy = data.categoryHierarchy.result;\n const categoryLinks =\n categoryHierarchy &&\n categoryHierarchy.map((value: CategoryHierarchyData, index: number) => {\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 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 );\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 = !ObjectExtensions.isNullOrUndefined(listPageState?.currentPageNumber)\n ? listPageState!.currentPageNumber * (this.props.config.itemsPerPage || 10)\n : (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\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 =\n this.props.config.updateRefinerPanel && ArrayExtensions.hasElements(this.state.refiners)\n ? this.state.refiners.filter(refiner => {\n return ArrayExtensions.hasElements(refiner.Values) && !this._shouldHideFromRefiners(refiner);\n })\n : data.refiners.result &&\n 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 =\n validRefiners &&\n 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 * Should hide from refiners.\n * @param refiner - The refiner.\n * @returns ShouldHideFromRefiners.\n */\n private readonly _shouldHideFromRefiners = (refiner: IProductRefinerHierarchy): boolean => {\n const { channelInventoryConfiguration } = this.state;\n const isInventorySortableAttribute =\n (this.props.data.products.result?.inventoryAwareSortableAttributeId !== 0 &&\n refiner.RecordId === this.props.data.products.result?.inventoryAwareSortableAttributeId) ||\n (channelInventoryConfiguration?.ProductAvailabilitySortableAttributeRecordId !== 0 &&\n refiner.RecordId === channelInventoryConfiguration?.ProductAvailabilitySortableAttributeRecordId);\n\n const isInventoryProductAttribute =\n (this.props.data.products.result?.channelInventoryConfigurationId !== 0 &&\n refiner.RecordId === this.props.data.products.result?.channelInventoryConfigurationId) ||\n (channelInventoryConfiguration?.InventoryProductAttributeRecordId !== 0 &&\n refiner.RecordId === channelInventoryConfiguration?.InventoryProductAttributeRecordId);\n\n // Always hide sortable attribute since it's just for sorting products in Azure search, not for customers\n return (\n isInventorySortableAttribute ||\n (this.props.context.app.config.productListInventoryDisplay === ProductListInventoryFilteringOptions.HideOOS &&\n isInventoryProductAttribute)\n );\n };\n\n private readonly _getChoiceSummary = (): React.ReactNode => {\n const { resources, data, telemetry } = this.props;\n const { channelInventoryConfiguration } = this.state;\n const selectedRefiners = (data.listPageState.result && data.listPageState.result.activeFilters) || [];\n const refinerValueName = this.props.data.refiners.result?.find(rating => rating.KeyName === 'Rating');\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 // @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={channelInventoryConfiguration?.InventoryProductAttributeRecordId}\n refinerValues={refinerValueName}\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 const productComparisonButton = ArrayExtensions.hasElements(this.props.slots.productComparisonButton)\n ? this.props.slots.productComparisonButton[0]\n : null;\n\n const isPriceMinMaxFeatureState = this.props.data.featureState.result?.find(\n featureState => featureState.Name === 'Dynamics.AX.Application.RetailSearchPriceRangeFeature'\n );\n return (\n <ProductSearchResultItems\n products={products}\n context={this.props.context}\n imageSettings={imageSettings}\n resources={resources}\n moduleType={this.props.typeName}\n moduleId={this.props.id}\n allowBackNavigation={shouldAllowBack}\n telemetryContent={this.telemetryContent}\n quickviewSlot={quickviewSlot}\n productComparisonButton={productComparisonButton}\n channelInventoryConfigurationId={this.props.data.products.result?.channelInventoryConfigurationId}\n isPriceMinMaxEnabled={isPriceMinMaxFeatureState?.IsEnabled}\n productsDimensionAvailabilities={this.state.productsDimensionAvailabilities}\n />\n );\n };\n\n private readonly _updateSortByDropdown = (notification: ILabeledDropdownOnChangeNotification): void => {\n const {\n context: { request: requestContext, actionContext }\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 ' : ''} ${\n !actionContext ? 'actionContext ' : ''\n } could not be found`;\n this.props.telemetry.warning(error);\n return;\n }\n\n window.history.pushState(\n {},\n '',\n buildListPageUrl(\n getCurrentUrl(this.props.context.request),\n undefined,\n [this._getSortColumnFromSelectedOption(notification.selectedOption)],\n undefined\n )\n );\n transaction(() => {\n this.props.data.listPageState.result!.currentPageNumber = 0;\n this.props.data.listPageState.result!.sortingCritera = {\n Columns: [this._getSortColumnFromSelectedOption(notification.selectedOption)]\n };\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(mappedSearchConfig =>\n 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(\n mappedSearchConfig =>\n 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: { request: requestContext, actionContext }\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(\n itemToggleNotification,\n this.props.data.listPageState.result?.activeFilters || []\n );\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(\n itemToggleNotification,\n this.props.data.listPageState.result.activeFilters || []\n );\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 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 }, 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'>{paginationPreviousText}</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'>{paginationNextText}</span>\n <span className='ms-search-result__pagination-right' aria-hidden='true' />\n </div>\n );\n };\n}\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { Module, Node } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport { ISearchResultModalViewProps } from './components';\nimport {\n ICategoryHierarchyViewProps,\n IRefineMenuViewProps,\n ISearchResultContainerViewProps,\n ISortByViewProps,\n ITitleViewProps\n} from './search-result-container';\n\nconst SearchResultContainerView: React.FC<ISearchResultContainerViewProps> = props => {\n const {\n SearchResultContainer,\n products,\n pagination,\n ProductsContainer,\n ProductSectionContainer,\n choiceSummary,\n isMobile,\n modalToggle,\n searchResultModal,\n TitleViewProps,\n refineMenu,\n categoryHierarchy,\n sortByOptions,\n CategoryNavContainer,\n RefineAndProductSectionContainer,\n errorMessage,\n FeatureSearchContainer,\n similarLookProduct\n } = props;\n const isRecoSearchPage = props.context.actionContext.requestContext.query?.recommendation;\n if (isMobile) {\n return (\n <Module {...SearchResultContainer}>\n {renderCategoryHierarchy(categoryHierarchy)}\n {renderTitle(TitleViewProps)}\n {choiceSummary}\n {modalToggle}\n {createSearchResultModal(searchResultModal, refineMenu, sortByOptions, isRecoSearchPage)}\n <Node {...FeatureSearchContainer}>{similarLookProduct}</Node>\n <Node {...ProductsContainer}>\n {errorMessage}\n {products}\n </Node>\n {pagination}\n </Module>\n );\n }\n return (\n <Module {...SearchResultContainer}>\n <Node {...CategoryNavContainer}>\n {categoryHierarchy && renderCategoryHierarchy(categoryHierarchy)}\n {TitleViewProps && renderTitleCount(TitleViewProps)}\n </Node>\n <Node {...RefineAndProductSectionContainer}>\n {refineMenu && renderRefiner(refineMenu)}\n <Node {...ProductSectionContainer}>\n {TitleViewProps && renderTitle(TitleViewProps)}\n {choiceSummary}\n {sortByOptions && !isRecoSearchPage && renderSort(sortByOptions)}\n <Node {...FeatureSearchContainer}>{similarLookProduct}</Node>\n <Node {...ProductsContainer}>\n {errorMessage}\n {products}\n </Node>\n {pagination}\n </Node>\n </Node>\n </Module>\n );\n};\n\nconst createSearchResultModal = (\n modalProps: ISearchResultModalViewProps,\n refineMenu: IRefineMenuViewProps,\n sortByDropDown: ISortByViewProps,\n isRecoSearchPage?: string\n): JSX.Element => {\n return React.cloneElement(\n modalProps.modal,\n {},\n modalProps.modalHeader,\n createModalBody(modalProps, refineMenu, sortByDropDown, isRecoSearchPage),\n modalProps.modalFooter\n );\n};\n\nconst createModalBody = (\n props: ISearchResultModalViewProps,\n refineMenu: IRefineMenuViewProps,\n sortByDropDown: ISortByViewProps,\n isRecoSearchPage?: string\n): JSX.Element | null => {\n if (sortByDropDown) {\n return React.cloneElement(props.modalBody, {}, renderSort(sortByDropDown, isRecoSearchPage), renderRefiner(refineMenu));\n }\n return null;\n};\n\nconst renderRefiner = (props: IRefineMenuViewProps): JSX.Element | null => {\n const { refiners, RefineMenuContainer, RefinerSectionContainer } = props;\n if (refiners) {\n return (\n <Node {...RefinerSectionContainer}>\n <Node {...RefineMenuContainer}>\n {refiners.map((submenu, index) => (\n <React.Fragment key={index}>{submenu}</React.Fragment>\n ))}\n </Node>\n </Node>\n );\n }\n return null;\n};\n\nconst renderSort = (props: ISortByViewProps, isRecoSearchPage?: string): JSX.Element | null => {\n const { SortingContainer, sortByDropDown } = props;\n if (sortByDropDown && !isRecoSearchPage) {\n return <Node {...SortingContainer}>{sortByDropDown}</Node>;\n }\n return null;\n};\n\nconst renderCategoryHierarchy = (props: ICategoryHierarchyViewProps): JSX.Element | null => {\n const { CategoryHierarchyContainer, categoryHierarchyList, categoryHierarchySeparator } = props;\n if (categoryHierarchyList) {\n return (\n <Node {...CategoryHierarchyContainer}>\n {categoryHierarchyList.map((category, index) => (\n <React.Fragment key={index}>\n {category}\n {categoryHierarchyList && categoryHierarchyList[index + 1] && categoryHierarchySeparator}\n </React.Fragment>\n ))}\n </Node>\n );\n }\n\n return null;\n};\n\nconst renderTitle = (props: ITitleViewProps): JSX.Element | null => {\n const { title, TitleContainer } = props;\n if (title) {\n return (\n <Node {...TitleContainer}>\n <h2>\n {title.titlePrefix}\n {title.titleText}\n </h2>\n </Node>\n );\n }\n return null;\n};\n\nconst renderTitleCount = (props: ITitleViewProps): JSX.Element | null => {\n const { title, TitleContainer } = props;\n if (title) {\n return (\n <Node {...TitleContainer}>\n <h5>{title.titleCount}</h5>\n </Node>\n );\n }\n return null;\n};\n\nexport default SearchResultContainerView;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { IProductsDimensionsAvailabilities } from '@msdyn365-commerce/commerce-entities';\nimport {\n IPriceComponentResources,\n ISwatchItem,\n PriceComponent,\n ProductComponentSwatchComponent,\n RatingComponent\n} from '@msdyn365-commerce/components';\nimport {\n getCatalogId,\n IAny,\n IComponent,\n IComponentProps,\n ICoreContext,\n IGeneric,\n IGridSettings,\n IImageData,\n IImageSettings,\n Image,\n msdyn365Commerce\n} from '@msdyn365-commerce/core';\nimport {\n AttributeSwatch,\n AttributeValue,\n ProductDimension,\n ProductPrice,\n ProductSearchResult,\n ProductType,\n SimpleProduct\n} from '@msdyn365-commerce/retail-proxy';\nimport {\n ArrayExtensions,\n convertDimensionTypeToProductDimensionType,\n Dictionary,\n DimensionTypes,\n generateImageUrl,\n getProductPageUrlSync,\n IDimensionsApp,\n StringExtensions,\n validateCatalogId\n} from '@msdyn365-commerce-modules/retail-actions';\nimport {\n format,\n getPayloadObject,\n getTelemetryAttributes,\n ITelemetryContent,\n onTelemetryClick\n} from '@msdyn365-commerce-modules/utilities';\nimport React, { useState } from 'react';\n\nexport interface IProductComponentProps extends IComponentProps<{ product?: ProductSearchResult; productPrice?: ProductPrice }> {\n className?: string;\n imageSettings?: IImageSettings;\n savingsText?: string;\n freePriceText?: string;\n originalPriceText?: string;\n currentPriceText?: string;\n ratingAriaLabel?: string;\n ratingCountAriaLabel?: string;\n allowBack?: boolean;\n telemetryContent?: ITelemetryContent;\n quickViewButton?: React.ReactNode;\n productComparisonButton?: React.ReactNode;\n isEnabledProductDescription?: boolean;\n isPriceMinMaxEnabled?: boolean;\n priceResources?: IPriceComponentResources;\n inventoryLabel?: string;\n dimensionAvailabilities?: IProductsDimensionsAvailabilities[];\n swatchItemAriaLabel?: string;\n}\n\nexport interface IProductComponent extends IComponent<IProductComponentProps> {}\n\nconst PriceComponentActions = {};\n\n/**\n * Gets the product page url from the default swatch selected.\n * @param productData - Product card to be rendered.\n * @returns The default color swatch selected if any.\n */\nfunction getDefaultSwatchSelected(coreContext: ICoreContext, productData?: ProductSearchResult): AttributeSwatch | null {\n if (!productData || !productData.AttributeValues) {\n return null;\n }\n\n const siteContext = coreContext as ICoreContext<IDimensionsApp>;\n const dimensionToPreSelectInProductCard = siteContext.app.config.dimensionToPreSelectInProductCard;\n\n const attributeSwatches = productData.AttributeValues.find(\n attributeValue => attributeValue.KeyName?.toLocaleLowerCase() === dimensionToPreSelectInProductCard\n )?.Swatches;\n\n if (!ArrayExtensions.hasElements(attributeSwatches)) {\n return null;\n }\n\n const defaultSwatch = attributeSwatches.find(item => item.IsDefault === true) ?? attributeSwatches[0];\n return defaultSwatch;\n}\n\n/**\n * Gets the product image from the default swatch selected.\n * @param coreContext - Context of the module using the component.\n * @param productData - Product card to be rendered.\n * @returns The product card image url.\n */\nfunction getProductImageUrlFromDefaultSwatch(coreContext: ICoreContext, productData?: ProductSearchResult): string | undefined {\n const defaultSwatch = getDefaultSwatchSelected(coreContext, productData);\n const swatchProductImageUrls = defaultSwatch?.ProductImageUrls;\n if (!ArrayExtensions.hasElements(swatchProductImageUrls)) {\n return productData?.PrimaryImageUrl;\n }\n\n return generateImageUrl(swatchProductImageUrls[0], coreContext.request.apiSettings);\n}\n\n/**\n * Updates the product url link to product details page.\n * @param productDetailsPageUrl - Product page url.\n * @param coreContext - Context of the module using the component.\n * @param queryString - Querystring to be added to the URL.\n * @returns The update product page url.\n */\nfunction updateProductUrl(productDetailsPageUrl: string, coreContext: ICoreContext, queryString: string): string {\n const sourceUrl = new URL(productDetailsPageUrl, coreContext.request.apiSettings.baseUrl);\n if (sourceUrl.search) {\n sourceUrl.search += `&${queryString}`;\n } else {\n sourceUrl.search += queryString;\n }\n\n const updatedUrl = new URL(sourceUrl.href);\n return updatedUrl.pathname + sourceUrl.search;\n}\n\n/**\n * Gets the react node for product unit of measure display.\n * @param unitOfMeasure - DefaultUnitOfMeasure property from product.\n * @returns The node representing markup for unit of measure component.\n */\nfunction renderProductUnitOfMeasure(unitOfMeasure?: string): JSX.Element | null {\n if (!unitOfMeasure) {\n return null;\n }\n return (\n <div className='msc-product__unit-of-measure'>\n <span>{unitOfMeasure}</span>\n </div>\n );\n}\n\n/**\n * Gets the react node for product availability.\n * @param inventoryAvailabilityLabel - The product information.\n * @returns The node representing markup for product availability.\n */\nfunction renderProductAvailability(inventoryAvailabilityLabel: string | undefined): JSX.Element | null {\n if (!inventoryAvailabilityLabel || inventoryAvailabilityLabel === '') {\n return null;\n }\n\n return (\n <div className='msc-product__availability'>\n <span>{inventoryAvailabilityLabel}</span>\n </div>\n );\n}\n\n/**\n * Renders product comparison button similar to the quick view button.\n * @param productComparisonButton - React element of the button.\n * @param product - Current product info.\n * @param catalogId - Current catalog.\n * @returns React element for the specific product.\n */\nfunction renderProductComparisonButton(\n productComparisonButton: React.ReactNode,\n product: ProductSearchResult,\n catalogId: number\n): JSX.Element | undefined {\n validateCatalogId(catalogId);\n return React.cloneElement(productComparisonButton as React.ReactElement, { product, catalogId });\n}\n\n/**\n * Gets the product page url from the default swatch selected.\n * @param coreContext - Context of the module using the component.\n * @param productUrl - Product page url for the product card.\n * @param productData - Product card to be rendered.\n * @returns The product card image url.\n */\nfunction getProductPageUrlFromDefaultSwatch(\n coreContext: ICoreContext,\n productUrl: string,\n productData?: ProductSearchResult\n): string | undefined {\n const defaultSwatch = getDefaultSwatchSelected(coreContext, productData);\n if (!defaultSwatch?.SwatchValue) {\n return productUrl;\n }\n\n const siteContext = coreContext as ICoreContext<IDimensionsApp>;\n const dimensionToPreSelectInProductCard = siteContext.app.config.dimensionToPreSelectInProductCard;\n\n const queryStringEncoded = encodeURIComponent(defaultSwatch.SwatchValue);\n const queryString = `${dimensionToPreSelectInProductCard}=${queryStringEncoded}`;\n return updateProductUrl(productUrl, coreContext, queryString);\n}\n\nconst ProductCard: React.FC<IProductComponentProps> = ({\n data,\n context,\n imageSettings,\n savingsText,\n freePriceText,\n originalPriceText,\n currentPriceText,\n ratingAriaLabel,\n ratingCountAriaLabel,\n allowBack,\n typeName,\n id,\n telemetryContent,\n quickViewButton,\n productComparisonButton,\n isEnabledProductDescription,\n isPriceMinMaxEnabled,\n priceResources,\n inventoryLabel,\n dimensionAvailabilities,\n swatchItemAriaLabel\n}) => {\n const product = data.product;\n const productPrice = data.productPrice;\n\n let productUrl = getProductPageUrlSync(product?.Name ?? '', product?.RecordId ?? Number.MIN_VALUE, context.actionContext, undefined);\n if (allowBack) {\n productUrl = updateProductUrl(productUrl, context, 'back=true');\n }\n const productImageUrlFromSwatch = getProductImageUrlFromDefaultSwatch(context, product) ?? product?.PrimaryImageUrl;\n const productPageUrlFromSwatch = getProductPageUrlFromDefaultSwatch(context, productUrl, product) ?? productUrl;\n const [productPageUrl, setProductPageUrl] = useState<string>(productPageUrlFromSwatch);\n const [productImageUrl, setProductImageUrl] = useState<string | undefined>(productImageUrlFromSwatch);\n React.useEffect(() => {\n setProductPageUrl(productPageUrlFromSwatch);\n setProductImageUrl(productImageUrlFromSwatch);\n }, [productUrl, productPageUrlFromSwatch, productImageUrlFromSwatch]);\n const [selectedSwatchItems] = useState(new Dictionary<DimensionTypes, ISwatchItem>());\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment,@typescript-eslint/no-unsafe-member-access -- app context is generic\n const enableStockCheck = context.app.config.enableStockCheck;\n\n const siteContext = context as ICoreContext<IDimensionsApp>;\n const dimensionToPreSelectInProductCard = siteContext.app.config.dimensionToPreSelectInProductCard;\n\n /**\n * Updates the product page and Image url based on swatch selected.\n * @param coreContext - Context of the caller.\n * @param swatchItem - Dimension swatch selected.\n */\n const updatePageAndImageUrl = React.useCallback(\n (coreContext: ICoreContext, swatchItem: ISwatchItem) => {\n const dimensionType = swatchItem.dimensionType;\n selectedSwatchItems.setValue(dimensionType, swatchItem);\n if (StringExtensions.isNullOrWhitespace(swatchItem.value)) {\n return;\n }\n const queryString = `${dimensionType}=${swatchItem.value}`;\n let productPageUrlWithSwatch = '';\n if (productPageUrl.includes(dimensionType)) {\n const newUrl = new URL(productPageUrl, coreContext.request.apiSettings.baseUrl);\n newUrl.searchParams.delete(dimensionType);\n productPageUrlWithSwatch = updateProductUrl(newUrl.toString(), context, queryString);\n } else {\n productPageUrlWithSwatch = updateProductUrl(productPageUrl, context, queryString);\n }\n setProductPageUrl(productPageUrlWithSwatch);\n if (dimensionType === dimensionToPreSelectInProductCard) {\n const swatchProductImageUrl = ArrayExtensions.hasElements(swatchItem.productImageUrls)\n ? swatchItem.productImageUrls[0]\n : undefined;\n const newImageUrl = generateImageUrl(swatchProductImageUrl, coreContext.request.apiSettings);\n setProductImageUrl(newImageUrl);\n }\n },\n [selectedSwatchItems, context, productPageUrl]\n );\n\n if (!product) {\n return null;\n }\n\n /**\n * Checks if rendering the particular dimensions is allowed for product card.\n * @param dimensionType - Dimension to be displayed.\n * @returns Updates the state with new product page url.\n */\n function shouldDisplayDimension(dimensionType: string): boolean {\n const dimensionsContext = context as ICoreContext<IDimensionsApp>;\n const dimensionsToDisplayOnProductCard = dimensionsContext.app.config.dimensionsInProductCard;\n return (\n ArrayExtensions.hasElements(dimensionsToDisplayOnProductCard) &&\n !dimensionsToDisplayOnProductCard.includes(DimensionTypes.none) &&\n dimensionsToDisplayOnProductCard.includes(dimensionType.toLocaleLowerCase() as DimensionTypes)\n );\n }\n\n /**\n * Gets the react node for product dimension as swatch.\n * @param attributeValues - Attribute value property from product.\n * @returns The node representing markup for unit of measure component.\n */\n function renderProductDimensions(attributeValues?: AttributeValue[]): JSX.Element | null {\n if (!attributeValues) {\n return null;\n }\n\n return (\n <div className='msc-product__dimensions'>\n {attributeValues.map((item: AttributeValue) => {\n const dimensionTypeValue = item.KeyName?.toLocaleLowerCase() ?? '';\n if (!shouldDisplayDimension(dimensionTypeValue)) {\n return null;\n }\n\n const siteContext = context as ICoreContext<IDimensionsApp>;\n const dimensionToPreSelectInProductCard = siteContext.app.config.dimensionToPreSelectInProductCard;\n const dimensionType = dimensionTypeValue as DimensionTypes;\n const swatches =\n item.Swatches?.map<ISwatchItem>(swatchItem => {\n return {\n itemId: `${item.RecordId ?? ''}-${dimensionTypeValue}-${swatchItem.SwatchValue ?? ''}`,\n value: swatchItem.SwatchValue ?? '',\n dimensionType,\n colorHexCode: swatchItem.SwatchColorHexCode,\n imageUrl: swatchItem.SwatchImageUrl,\n productImageUrls: swatchItem.ProductImageUrls,\n isDefault: swatchItem.IsDefault,\n swatchItemAriaLabel: swatchItemAriaLabel ? format(swatchItemAriaLabel, dimensionType) : '',\n isDisabled:\n enableStockCheck &&\n dimensionAvailabilities?.find(\n dimensionAvailability => dimensionAvailability.value === (swatchItem.SwatchValue ?? '')\n )?.isDisabled\n };\n }) ?? [];\n if (\n dimensionType === dimensionToPreSelectInProductCard &&\n ArrayExtensions.hasElements(swatches) &&\n !swatches.some(swatch => swatch.isDefault)\n ) {\n swatches[0].isDefault = true;\n }\n return (\n <ProductComponentSwatchComponent\n context={context}\n swatches={swatches}\n onSelectDimension={updatePageAndImageUrl}\n key={item.RecordId}\n />\n );\n })}\n </div>\n );\n }\n\n function renderQuickView(quickview: React.ReactNode, item?: number): JSX.Element | undefined {\n if (quickview === null) {\n return undefined;\n }\n const selectedDimensions: ProductDimension[] = selectedSwatchItems.getValues().map<ProductDimension>(swatches => {\n return {\n DimensionTypeValue: convertDimensionTypeToProductDimensionType(swatches.dimensionType),\n DimensionValue: {\n RecordId: 0,\n Value: swatches.value\n }\n };\n });\n return React.cloneElement(quickview as React.ReactElement, { selectedProductId: item, selectedDimensions });\n }\n\n // Construct telemetry attribute to render\n const payLoad = getPayloadObject('click', telemetryContent!, '', product.RecordId.toString());\n\n const attribute = getTelemetryAttributes(telemetryContent!, payLoad);\n\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access -- -- Do not need type check for appsettings\n const isUnitOfMeasureEnabled = context.app.config && context.app.config.unitOfMeasureDisplayType === 'buyboxAndBrowse';\n\n return (\n <>\n {isEnabledProductDescription ? (\n <a\n href={productPageUrl}\n onClick={onTelemetryClick(telemetryContent!, payLoad, product.Name!)}\n aria-label={renderLabel(\n product.Name,\n context.cultureFormatter.formatCurrency(product.Price),\n product.AverageRating,\n ratingAriaLabel,\n product.TotalRatings,\n ratingCountAriaLabel\n )}\n className='msc-product'\n {...attribute}\n >\n <div className='msc-product__image__description'>\n <div className='msc-product__image'>\n {renderProductPlacementImage(\n imageSettings,\n context.request.gridSettings,\n productImageUrl,\n product.PrimaryImageUrl,\n product.Name,\n context\n )}\n </div>\n <div className='msc-product__title_description'>\n <h2 className='msc-product__title__text'>{product.Name}</h2>\n {renderPrice(\n context,\n typeName,\n id,\n product,\n savingsText,\n freePriceText,\n originalPriceText,\n currentPriceText,\n isPriceMinMaxEnabled,\n priceResources,\n productPrice\n )}\n {isUnitOfMeasureEnabled && renderProductUnitOfMeasure(product.DefaultUnitOfMeasure)}\n {renderDescription(product.Description)}\n </div>\n </div>\n </a>\n ) : (\n <a\n href={productPageUrl}\n onClick={onTelemetryClick(telemetryContent!, payLoad, product.Name!)}\n aria-label={renderLabel(\n product.Name,\n context.cultureFormatter.formatCurrency(product.Price),\n product.AverageRating,\n ratingAriaLabel\n )}\n className='msc-product'\n {...attribute}\n >\n <div className='msc-product__image'>\n {renderProductPlacementImage(\n imageSettings,\n context.request.gridSettings,\n productImageUrl,\n product.PrimaryImageUrl,\n product.Name,\n context\n )}\n </div>\n <div className='msc-product__details'>\n <h2 className='msc-product__title'>{product.Name}</h2>\n {renderPrice(\n context,\n typeName,\n id,\n product,\n savingsText,\n freePriceText,\n originalPriceText,\n currentPriceText,\n isPriceMinMaxEnabled,\n priceResources,\n productPrice\n )}\n {isUnitOfMeasureEnabled && renderProductUnitOfMeasure(product.DefaultUnitOfMeasure)}\n </div>\n </a>\n )}\n {renderProductDimensions(product.AttributeValues)}\n {!context.app.config.hideRating &&\n renderRating(context, typeName, id, product.AverageRating, product.TotalRatings, ratingAriaLabel, ratingCountAriaLabel)}\n {renderProductAvailability(inventoryLabel)}\n {quickViewButton && renderQuickView(quickViewButton, product.RecordId)}\n {productComparisonButton && renderProductComparisonButton(productComparisonButton, product, getCatalogId(context.request))}\n </>\n );\n};\n\nfunction renderLabel(\n name?: string,\n price?: string,\n rating?: number,\n ratingAriaLabelText?: string,\n reviewCount?: number,\n ratingCountAriaLabelText?: string\n): string {\n const reviewCountArialableText = getReviewAriaLabel(reviewCount, ratingCountAriaLabelText ?? '');\n return `${name ?? ''} ${price ?? ''} ${getRatingAriaLabel(rating, ratingAriaLabelText)}${\n reviewCountArialableText ? ` ${reviewCountArialableText}` : ''\n }`;\n}\n\nfunction renderDescription(description?: string): JSX.Element | null {\n return <p className='msc-product__text'>{description}</p>;\n}\n\nfunction getRatingAriaLabel(rating?: number, ratingAriaLabel?: string): string {\n if (rating && ratingAriaLabel) {\n const roundedRating = rating.toFixed(2);\n return format(ratingAriaLabel || '', roundedRating, '5');\n }\n return '';\n}\n\nfunction getReviewAriaLabel(reviewCount?: number, ratingCountAriaLabelText?: string): string {\n if (reviewCount && ratingCountAriaLabelText) {\n return format(ratingCountAriaLabelText || '', reviewCount);\n }\n return '';\n}\n\nfunction renderRating(\n coreContext: ICoreContext,\n moduleTypeName: string,\n moduleId: string,\n avgRating?: number,\n totalRatings?: number,\n ariaLabel?: string,\n ratingCountAriaLabel?: string\n): JSX.Element | null {\n if (!avgRating) {\n return null;\n }\n\n const numberRatings = totalRatings?.toString() || undefined;\n const ratingAriaLabelText = getRatingAriaLabel(avgRating, ariaLabel);\n const ratingCountAriaLabelText = getReviewAriaLabel(Number(numberRatings), ratingCountAriaLabel);\n\n return (\n <RatingComponent\n context={coreContext}\n id={moduleId}\n typeName={moduleTypeName}\n avgRating={avgRating}\n ratingCount={numberRatings}\n readOnly\n ariaLabel={ratingAriaLabelText}\n ratingCountAriaLabel={ratingCountAriaLabelText}\n data={{}}\n />\n );\n}\n\nfunction renderPrice(\n context: ICoreContext,\n typeName: string,\n id: string,\n productSearchResult: ProductSearchResult,\n savingsText?: string,\n freePriceText?: string,\n originalPriceText?: string,\n currentPriceText?: string,\n isPriceMinMaxEnabled?: boolean,\n priceResources?: IPriceComponentResources,\n productPrice?: ProductPrice\n): JSX.Element | null {\n const product: SimpleProduct = {\n // This is a fake product. The product type is only used for price component to determine if it should show price range or not.\n ProductTypeValue: productSearchResult.IsMasterProduct ? ProductType.Master : ProductType.Standalone\n } as SimpleProduct;\n\n const price: ProductPrice = productPrice ?? {\n BasePrice: productSearchResult.BasePrice,\n AdjustedPrice: productSearchResult.Price,\n CustomerContextualPrice: productSearchResult.Price,\n MaxVariantPrice: productSearchResult.MaxVariantPrice ? productSearchResult.MaxVariantPrice : productSearchResult.Price,\n MinVariantPrice: productSearchResult.MinVariantPrice ? productSearchResult.MinVariantPrice : productSearchResult.Price\n };\n\n return (\n <PriceComponent\n context={context}\n id={id}\n typeName={typeName}\n product={product}\n data={{ price }}\n savingsText={savingsText}\n freePriceText={freePriceText}\n originalPriceText={originalPriceText}\n isPriceMinMaxEnabled={isPriceMinMaxEnabled}\n priceResources={priceResources}\n />\n );\n}\n\nfunction renderProductPlacementImage(\n imageSettings?: IImageSettings,\n gridSettings?: IGridSettings,\n imageUrl?: string,\n fallbackImageUrl?: string,\n altText?: string,\n context?: ICoreContext<IGeneric<IAny>>\n): JSX.Element | null {\n if (!imageUrl || !gridSettings || !imageSettings) {\n return null;\n }\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unsafe-assignment -- Site level config can be of any type.\n const contextConfig = context?.app.config?.placeholderImageName;\n const emptyPlaceHolderImage = contextConfig as string;\n let fallbackImageSource = fallbackImageUrl;\n if (emptyPlaceHolderImage && fallbackImageUrl) {\n fallbackImageSource = `${fallbackImageUrl},${emptyPlaceHolderImage}`;\n }\n const img: IImageData = {\n src: imageUrl,\n altText: altText ? altText : '',\n fallBackSrc: fallbackImageSource\n };\n const imageProps = {\n gridSettings,\n imageSettings\n };\n imageProps.imageSettings.cropFocalRegion = true;\n return (\n <Image\n requestContext={context?.actionContext.requestContext}\n {...img}\n {...imageProps}\n loadFailureBehavior='empty'\n bypassHideOnFailure\n />\n );\n}\n\nexport const ProductComponent: React.FunctionComponent<IProductComponentProps> = msdyn365Commerce.createComponentOverride<\n IProductComponent\n>('Product', { component: ProductCard, ...PriceComponentActions });\n\nexport default ProductComponent;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { IPriceComponentResources } from '@msdyn365-commerce/components';\nimport MsDyn365 from '@msdyn365-commerce/core';\nimport { ProductSearchResult } from '@msdyn365-commerce/retail-proxy';\nimport { ArrayExtensions } from '@msdyn365-commerce-modules/retail-actions';\nimport {\n ICategoryHierarchyViewProps,\n IRefineMenuViewProps,\n ISearchResultContainerViewProps,\n ISearchResultModalViewProps,\n ISortByViewProps,\n ITitleViewProps\n} from '@msdyn365-commerce-modules/search-result-container';\nimport { Button, getTelemetryObject, Module, Node } from '@msdyn365-commerce-modules/utilities';\nimport React, { MouseEventHandler, useEffect, useState } from 'react';\n\nimport { IProductsDimensionsAvailabilities } from '@msdyn365-commerce/commerce-entities';\nimport {\n ISearchResultContainerProps,\n ISearchResultContainerResources\n} from '../definition-extensions/search-result-container.ext.props.autogenerated';\nimport { ProductComponent } from './components/product.component';\n\n/**\n * DescriptionInterval.\n */\nenum DescriptionInterval {\n productDescriptionInterval = 14,\n productDescriptionIntervalRemainder0 = 0,\n productDescriptionIntervalRemainder9 = 9\n}\n\n/**\n * Render Clear button for mobile viewport.\n * @param props - The view props.\n * @returns The JSX Element.\n */\nconst renderProductCards = (props: ISearchResultContainerViewProps & ISearchResultContainerProps<{}>): JSX.Element | null => {\n return <Node {...props.ProductsContainer}>{props.products}</Node>;\n};\n\n/**\n * Returns the product inventory label.\n * @param channelInventoryConfigurationId - The channel configuration Id.\n * @param product - The product.\n * @returns The inventory label.\n */\nfunction getInventoryLabel(channelInventoryConfigurationId: number | undefined, product: ProductSearchResult): string | undefined {\n if (!channelInventoryConfigurationId || !ArrayExtensions.hasElements(product.AttributeValues)) {\n return undefined;\n }\n const inventoryAttribute = product.AttributeValues.find(attribute => attribute.RecordId === channelInventoryConfigurationId);\n if (inventoryAttribute) {\n return inventoryAttribute.TextValue;\n }\n return undefined;\n}\n\n/**\n * Render Clear button for mobile viewport.\n * @param props - The view props.\n * @param product - The product item data.\n * @param index - The index of each product item.\n * @param isEnabledProductDescription - The flag for showing Product desription tile.\n * @returns The JSX Element.\n */\nconst renderProductCardsDescription = (\n props: ISearchResultContainerViewProps & ISearchResultContainerProps<{}>,\n product: ProductSearchResult,\n index: number,\n isEnabledProductDescription?: boolean\n): JSX.Element | null => {\n const { config, context, resources, productsDimensionAvailabilities } = props;\n const telemetryContent = getTelemetryObject(props.context.request.telemetryPageName!, props.friendlyName, props.telemetry);\n const breadCrumbType = props.context.app.config.breadcrumbType;\n const isAllowBack = props.config.allowBackNavigation && (breadCrumbType === 'back' || breadCrumbType === 'categoryAndBack');\n const classname = isEnabledProductDescription\n ? 'ms-product-search-result__item product__description'\n : 'ms-product-search-result__item';\n const quickviewslot = ArrayExtensions.hasElements(props.slots.quickview) ? props.slots.quickview[0] : undefined;\n const channelInventoryConfigurationId = props.data.products.result?.channelInventoryConfigurationId;\n const isPriceMinMaxFeatureState = props.data.featureState.result?.find(\n featureState => featureState.Name === 'Dynamics.AX.Application.RetailSearchPriceRangeFeature'\n );\n const priceResources: IPriceComponentResources = {\n priceRangeSeparator: resources.priceRangeSeparator\n };\n\n const productComparisonButton = ArrayExtensions.hasElements(props.slots.productComparisonButton)\n ? props.slots.productComparisonButton[0]\n : null;\n\n return (\n <li className={classname} key={index}>\n <ProductComponent\n context={context}\n telemetryContent={telemetryContent}\n imageSettings={config.imageSettings}\n freePriceText={resources.priceFree}\n originalPriceText={resources.originalPriceText}\n currentPriceText={resources.currentPriceText}\n ratingAriaLabel={resources.ratingAriaLabel}\n allowBack={isAllowBack}\n id={props.id}\n key={product.RecordId}\n typeName={props.typeName}\n data={{ product }}\n quickViewButton={quickviewslot}\n productComparisonButton={productComparisonButton}\n isEnabledProductDescription={isEnabledProductDescription}\n inventoryLabel={getInventoryLabel(channelInventoryConfigurationId, product)}\n isPriceMinMaxEnabled={isPriceMinMaxFeatureState?.IsEnabled}\n priceResources={priceResources}\n swatchItemAriaLabel={resources.swatchItemAriaLabel}\n dimensionAvailabilities={productsDimensionAvailabilities?.find(\n (dimensionAvailability: IProductsDimensionsAvailabilities[]) =>\n ArrayExtensions.hasElements(dimensionAvailability) &&\n dimensionAvailability[0].masterProductId === product.MasterProductId\n )}\n />\n </li>\n );\n};\n\n/**\n * Render Clear button for mobile viewport.\n * @param props - The view props.\n * @returns The JSX Element.\n */\nconst renderProducts = (props: ISearchResultContainerViewProps & ISearchResultContainerProps<{}>): JSX.Element | null => {\n const products = props.data.listPageState.result?.activeProducts;\n if (!products || !ArrayExtensions.hasElements(products)) {\n return null;\n }\n const productDescriptionInterval: number = DescriptionInterval.productDescriptionInterval;\n const productDescriptionIntervalRemainder0: number = DescriptionInterval.productDescriptionIntervalRemainder0;\n const productDescriptionIntervalRemainder9: number = DescriptionInterval.productDescriptionIntervalRemainder9;\n return (\n <Node {...props.ProductsContainer}>\n {props.errorMessage}\n <ul className='list-unstyled'>\n {products.map((product: ProductSearchResult, index: number) =>\n index % productDescriptionInterval === productDescriptionIntervalRemainder0 ||\n index % productDescriptionInterval === productDescriptionIntervalRemainder9\n ? renderProductCardsDescription(props, product, index, true)\n : renderProductCardsDescription(props, product, index, false)\n )}\n </ul>\n </Node>\n );\n};\n\n/**\n * Render Title Count.\n * @param props - The title view props.\n * @returns The JSX Element.\n */\nconst renderTitleCount = (props: ITitleViewProps): JSX.Element | null => {\n const { title, TitleContainer } = props;\n if (title) {\n return <Node {...TitleContainer}>{title.titleCount}</Node>;\n }\n return null;\n};\n\n/**\n * Render Category Hierarchy.\n * @param props - The category hierarchy view props.\n * @returns The JSX Element.\n */\nconst renderCategoryHierarchy = (props: ICategoryHierarchyViewProps): JSX.Element | null => {\n const { CategoryHierarchyContainer, categoryHierarchyList, categoryHierarchySeparator } = props;\n if (categoryHierarchyList) {\n return (\n <Node {...CategoryHierarchyContainer}>\n {categoryHierarchyList.map((category, index) => (\n <React.Fragment key={index}>\n {category}\n {categoryHierarchyList[index + 1] && categoryHierarchySeparator}\n </React.Fragment>\n ))}\n </Node>\n );\n }\n\n return null;\n};\n\n/**\n * Function to make filter sticky.\n * @param isMobile - The boolean prop.\n * @param isStickyHeader - The boolean prop.\n */\nexport const configureStickyFilter = (isMobile: boolean, isStickyHeader: boolean): void => {\n // Get heights of cookie and promotion banners\n const defaultValue = 0;\n const defaultOffset = 28;\n const headerContainer: HTMLElement | null = document.querySelector('.ms-header');\n\n const headerHeight: number | undefined = headerContainer?.offsetHeight;\n const containerHeight: number = headerHeight ?? defaultOffset;\n const bannerHeights = isStickyHeader ? defaultValue : containerHeight;\n const headerElement = document.querySelector('header .lock-opaque');\n const defaultContainer = document.querySelector('header .default-container');\n const refinerElement = isMobile ? document.querySelector('.msc-sort-filter-wrapper') : document.querySelector('.ms-refiner-heading');\n if (refinerElement && headerElement && defaultContainer) {\n if (MsDyn365.isBrowser && document.documentElement.scrollTop > bannerHeights) {\n refinerElement.classList.add('lock-Filter');\n refinerElement.setAttribute('style', `top: ${defaultContainer.clientHeight}px`);\n } else {\n refinerElement.classList.remove('lock-Filter');\n }\n } else if (refinerElement) {\n if (MsDyn365.isBrowser && document.documentElement.scrollTop > bannerHeights) {\n refinerElement.classList.add('lock-top');\n } else {\n refinerElement.classList.remove('lock-top');\n refinerElement.classList.remove('lock-Filter');\n refinerElement.removeAttribute('style');\n }\n }\n};\n\n/**\n * Function to setup filter sticky.\n * @param isMobile - The boolean prop.\n * @param isStickyHeader - The boolean prop.\n */\nfunction stickyFilterSetup(isMobile: boolean, isStickyHeader: boolean): void {\n window.addEventListener('scroll', () => {\n configureStickyFilter(isMobile, isStickyHeader);\n });\n configureStickyFilter(isMobile, isStickyHeader);\n}\n\n/**\n * Function to make filter sticky.\n * @param refinerRefernce - Ref prop for filter.\n * @param toggle - Toggle function for filter menu.\n */\nfunction useOutsideClick(refinerRefernce: React.RefObject<HTMLElement>, toggle: (event: Event) => void) {\n React.useEffect(() => {\n /**\n * Function to make filter sticky.\n * @param event - Event prop for filter.\n */\n function handleClickOutside(event: Event) {\n const element = document.querySelector('.ms-refine-filter__toggle_collapsed');\n if (refinerRefernce.current && !refinerRefernce.current.contains(event.target as Node) && !element) {\n toggle(event);\n }\n }\n if (MsDyn365.isBrowser) {\n document.addEventListener('click', handleClickOutside);\n }\n return () => {\n if (MsDyn365.isBrowser) {\n document.removeEventListener('click', handleClickOutside);\n }\n };\n }, [refinerRefernce, toggle]);\n}\n\n/**\n * Render the category page items.\n * @param props - The view props.\n * @returns The search Result container module view.\n */\nconst SearchResultContainerView: React.FC<ISearchResultContainerViewProps & ISearchResultContainerProps<{}>> = props => {\n const {\n SearchResultContainer,\n pagination,\n ProductSectionContainer,\n choiceSummary,\n isMobile,\n modalToggle,\n searchResultModal,\n TitleViewProps,\n refineMenu,\n categoryHierarchy,\n sortByOptions,\n CategoryNavContainer,\n RefineAndProductSectionContainer,\n FeatureSearchContainer,\n similarLookProduct,\n errorMessage,\n resources\n } = props;\n useEffect(() => {\n if (props.config.useStickyFilter && MsDyn365.isBrowser) {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access -- app context is generic\n stickyFilterSetup(props.isMobile, props.context.app.config.enableStickyHeader as boolean);\n }\n }, [props]);\n const [isExpanded, setIsExpanded] = useState<boolean>(false);\n const toggle = () => {\n setIsExpanded(!isExpanded);\n };\n const wrapperRefiner = React.useRef(null);\n useOutsideClick(wrapperRefiner, toggle);\n const isRecoSearchPage = props.context.actionContext.requestContext.query?.recommendation;\n if (isMobile) {\n return (\n <Module {...SearchResultContainer}>\n {similarLookProduct ? null : (\n <Node {...CategoryNavContainer}>\n {renderCategoryHierarchy(categoryHierarchy)}\n {renderTitle(TitleViewProps)}\n {renderTitleCount(TitleViewProps)}\n </Node>\n )}\n {choiceSummary}\n <Node className='msc-sort-filter-wrapper'>{modalToggle}</Node>\n {createSearchResultModal(searchResultModal, refineMenu, sortByOptions, isRecoSearchPage)}\n <Node {...FeatureSearchContainer}>{similarLookProduct}</Node>\n {errorMessage}\n {props.config.enableProdutDescription ? renderProducts(props) : renderProductCards(props)}\n {pagination}\n </Module>\n );\n }\n return (\n <Module {...SearchResultContainer}>\n {similarLookProduct ? null : (\n <Node {...CategoryNavContainer}>\n {categoryHierarchy && renderCategoryHierarchy(categoryHierarchy)}\n {TitleViewProps && renderTitle(TitleViewProps)}\n {TitleViewProps && renderTitleCount(TitleViewProps)}\n </Node>\n )}\n <Node {...FeatureSearchContainer}>{similarLookProduct}</Node>\n <Node {...RefineAndProductSectionContainer}>\n <Node ref={wrapperRefiner} className='ms-refiner-heading'>\n <Node className='ms-refiner-heading_title'>\n <Button\n className={isExpanded ? 'ms-refine-filter__toggle_expanded' : 'ms-refine-filter__toggle_collapsed'}\n aria-label='Filter'\n onClick={toggle}\n aria-expanded={isExpanded}\n tabIndex={0}\n >\n {resources.filterText}\n </Button>\n <div className='ms-search-result-wrapper-title-choice-summary'>{choiceSummary}</div>\n <div className='ms-search-result-wrapper-sort-by-category'>\n {sortByOptions && !isRecoSearchPage && renderSort(sortByOptions)}\n </div>\n </Node>\n {refineMenu && isExpanded && renderRefiner(refineMenu)}\n <Node className='ms-refine__footer'>\n {refineMenu && isExpanded && renderRefinerFooter(refineMenu, toggle, resources)}\n </Node>\n </Node>\n\n <Node {...ProductSectionContainer}>\n {errorMessage}\n {props.config.enableProdutDescription ? renderProducts(props) : renderProductCards(props)}\n {pagination}\n </Node>\n </Node>\n </Module>\n );\n};\n\n/**\n * Render Search result Modal.\n * @param modalProps - The Search Result Modal view props.\n * @param refineMenu - The Refine Menu view props.\n * @param sortByDropDown - The Sort by view props.\n * @param isRecoSearchPage - The recomandation search page flag.\n * @returns The JSX Element.\n */\nconst createSearchResultModal = (\n modalProps: ISearchResultModalViewProps,\n refineMenu: IRefineMenuViewProps,\n sortByDropDown: ISortByViewProps,\n isRecoSearchPage?: string\n): JSX.Element => {\n return React.cloneElement(\n modalProps.modal,\n {},\n modalProps.modalHeader,\n createModalBody(modalProps, refineMenu, sortByDropDown, isRecoSearchPage),\n modalProps.modalFooter\n );\n};\n\n/**\n * Render Refiner Mobile.\n * @param props - The Refine Menu view props.\n * @returns The JSX Element.\n */\nconst renderRefinerMobile = (props: IRefineMenuViewProps): JSX.Element | null => {\n const { refiners, RefineMenuContainer, RefinerSectionContainer } = props;\n if (refiners) {\n return (\n <Node {...RefinerSectionContainer}>\n <Node {...RefineMenuContainer}>\n {refiners.map((submenu, index) => (\n <React.Fragment key={index}>{submenu}</React.Fragment>\n ))}\n </Node>\n </Node>\n );\n }\n return null;\n};\n\n/**\n * Render Search result Body.\n * @param props - The Search Result Modal view props.\n * @param refineMenu - The Refine Menu view props.\n * @param sortByDropDown - The Sort by view props.\n * @param isRecoSearchPage - The recomandation search page flag.\n * @returns The JSX Element.\n */\nconst createModalBody = (\n props: ISearchResultModalViewProps,\n refineMenu: IRefineMenuViewProps,\n sortByDropDown: ISortByViewProps,\n isRecoSearchPage?: string\n): JSX.Element | null => {\n if (sortByDropDown) {\n return React.cloneElement(props.modalBody, {}, renderSort(sortByDropDown, isRecoSearchPage), renderRefinerMobile(refineMenu));\n }\n return null;\n};\n\n/**\n * Render Refiner.\n * @param props - The Refine Menu view props.\n * @returns The JSX Element.\n */\nconst renderRefiner = (props: IRefineMenuViewProps): JSX.Element | null => {\n const { refiners, RefineMenuContainer, RefinerSectionContainer } = props;\n if (refiners) {\n return (\n <Node {...RefinerSectionContainer}>\n <Node {...RefineMenuContainer}>\n {refiners.map((submenu, index) => (\n <React.Fragment key={index}>{submenu}</React.Fragment>\n ))}\n </Node>\n </Node>\n );\n }\n return null;\n};\n\n/**\n * Render Refiner Footer.\n * @param props - The Refine Menu view props.\n * @param handler - The Refine menu toggle function.\n * @param resources - Resources to get the done text and aria label.\n * @returns The JSX Element.\n */\nconst renderRefinerFooter = (\n props: IRefineMenuViewProps,\n handler: MouseEventHandler,\n resources: ISearchResultContainerResources\n): JSX.Element | null => {\n const { refiners } = props;\n if (refiners) {\n return (\n <Node className='ms-refine__footer__done'>\n <Node tag='button' className='ms-refine-filter-done' aria-label={resources.doneAriaLabel} tabIndex={0} onClick={handler}>\n {resources.doneText}\n </Node>\n </Node>\n );\n }\n return null;\n};\n\n/**\n * Render sort by drop down.\n * @param props - The sort by view props.\n * @param isRecoSearchPage - The recomandation search page flag.\n * @returns The JSX Element.\n */\nconst renderSort = (props: ISortByViewProps, isRecoSearchPage?: string): JSX.Element | null => {\n const { SortingContainer, sortByDropDown } = props;\n if (sortByDropDown && !isRecoSearchPage) {\n return <Node {...SortingContainer}>{sortByDropDown}</Node>;\n }\n return null;\n};\n\n/**\n * Render Title.\n * @param props - The title view props.\n * @returns The JSX Element.\n */\nconst renderTitle = (props: ITitleViewProps): JSX.Element | null => {\n const { title, TitleContainer } = props;\n if (title) {\n return (\n <Node {...TitleContainer}>\n <Node tag='h1' className=''>\n {title.titlePrefix}\n {title.titleText}\n </Node>\n </Node>\n );\n }\n return null;\n};\n\nexport default SearchResultContainerView;\n","module.exports = React;","module.exports = ReactDOM;"],"names":["createSearchResultModal","modalProps","refineMenu","sortByDropDown","isRecoSearchPage","React","modal","modalHeader","createModalBody","modalFooter","props","modalBody","renderSort","renderRefiner","refiners","RefineMenuContainer","RefinerSectionContainer","Node","Object","assign","map","submenu","index","key","SortingContainer","renderCategoryHierarchy","CategoryHierarchyContainer","categoryHierarchyList","categoryHierarchySeparator","category","renderTitle","title","TitleContainer","titlePrefix","titleText","titleCount","_props$context$action","SearchResultContainer","products","pagination","ProductsContainer","ProductSectionContainer","choiceSummary","isMobile","modalToggle","searchResultModal","TitleViewProps","categoryHierarchy","sortByOptions","CategoryNavContainer","RefineAndProductSectionContainer","errorMessage","FeatureSearchContainer","similarLookProduct","context","actionContext","requestContext","query","recommendation","merchandisingCategoryID","config","Number","request","urlTokens","recordId","Module","className","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__","_objectSpread","viewDictionary","cn","BaseCollectionInput","constructor","pageType","apiSettings","queryResultSettings","searchText","includeAttributes","isUpdateRefinerPanel","locale","catalogId","channelInventoryConfiguration","inventoryRefiner","getCacheKey","this","Paging","toJS","Sorting","generateCacheKey","value","refiner","RefinerRecordId","LeftValueBoundString","RightValueBoundString","convertToString","getCacheObjectType","dataCacheType","createBaseCollectionInput","args","inputClassConstuctor","categoryId","QueryResultSettingsProxy","fromInputData","QueryResultSettings","queryRefiners","hydrateRefinersFromUrl","inputData","undefined","_inputData$config","updateRefinerPanel","getUpdateRefinerPanel","getCatalogId","sorting","Columns","JSON","parse","decodeURIComponent","itemId","q","productId","stringify","ProductId","Recommendation","discountIds","DiscountIds","ProductListInventoryFilteringOptions","GetFullProductsByCollectionInput","length","async","returnProducts","productSearchResults","metadataCount","productSearchResultsWithImages","productSearchResult","newImageUrl","generateProductImageUrl","PrimaryImageUrl","app","inventoryLevel","InventoryLevels","threshold","enableStockCheck","count","ArrayExtensions","hasElements","AttributeValues","element","RecordId","InventoryProductAttributeRecordId","inventoryRanges","TextValue","InventoryOutOfStockAttributeValueText","channelInventoryConfigurationId","inventoryAwareSortableAttributeId","ProductAvailabilitySortableAttributeRecordId","actionDataAction","createObservableDataAction","action","input","_context$requestConte","_context$requestConte2","_context$requestConte3","_context$requestConte4","_context$requestConte5","promise","channelInventoryConfigurationPromise","searchProductId","searchCriteriaInput","Context","ChannelId","channelId","CatalogId","Refinement","IncludeAttributes","SkipVariantExpansion","AsyncResult","resolve","getInventoryConfigurationAsync","callerContext","find","filter","isInStockRefiner","inventoryRefinerValue","getInventorySortableRefinerValue","some","push","productListInventoryDisplay","HideOOS","isInStock","inventoryInStockRefinerValue","SortOOS","_input$queryResultSet","_input$queryResultSet2","sortColumnName","column","ColumnName","IsDescending","CategoryIds","searchByCriteriaAsync","SearchCondition","searchObject","isNaN","RecommendationListId","Ids","_context$requestConte6","accountInformation","getCustomer","GetCustomerInput","split","productIds","getProductPromotionsAsync","HeaderContext","CustomerAccountNumber","AccountNumber","LineContexts","Date","_p$ProductId","metadata","Top","itemsPerPage","skip","Skip","sortOptions","sortByOptionRelevanceDesc","sortByOptionRatingAsc","sortByOptionRatingDesc","sortByOptionNameAsc","sortByOptionNameDesc","sortByOptionPriceAsc","sortByOptionPriceDesc","sortByOptionBestSelling","sortByOptionNewScore","sortByOptionTrendingScore","MappedSearchInput","buildCacheKey","getMappedSearchConfiguration","ctx","getSearchConfigurationAsync","then","searchConfiguration","ProductSortColumns","sortColumn","toUpperCase","telemetry","warning","Boolean","createInput","getMappedSearchConfigurationDataAction","getProductRefinerHierarchy","searchCriteria","getProductSearchRefinersAsync","productRefiners","trace","result","productRefiner","DefaultValues","RefinersByCollectionInput","defaultCategoryIdValue","defaultProductIdValue","DataTypeValue","AttributeDataType","TrueFalse","UnitText","RowNumber","Count","ExtensionProperties","RefinerSourceValue","ProductRefinerSource","Attribute","_input$channelInvento2","_input$channelInvento3","inventoryProductAttributeRecordId","compressedRefinerKeys","compressedRefinerArray","parseQueryParam","compressedRefiner","parsedRefiner","forEach","refinerKey","_unused","buildListPageUrl","fullUrl","sortingColumns","skipCount","searchParams","delete","sortedRefiners","sort","first","second","set","compressedRefiners","compressRefiners","href","toString","getCurrentUrl","MsDyn365","isBrowser","URL","location","url","requestUrl","ListPageState","activeFilters","activeProducts","sortingCritera","currentPageNumber","pageSize","featureProduct","productPrices","__decorate","observable","ListPageStateInput","listPageStateAction","createListPageInput","ProductRefinerValueDataTypeValue","ProductRefinerTypeValue","isRangeType","dataTypeValue","Currency","Decimal","isRangeTypeForInteger","Integer","isCustomRangeTypeIntegerSelected","selectedRefinementCriterion","parentProductRefinerHierarchy","DisplayTemplateValue","DisplayTemplate","Range","isSingleSelectRangeTypeIntegerSelected","productRefinerValue","findMatchingRefinementCriterion","refinementCriteria","refinementCriterion","isMatchingRefinementCriterion","parent","getIntegerRangeName","rangeValue","RightValueBoundLocalizedString","LeftValueBoundLocalizedString","getUpdatedRefinementCriteria","itemToggleNotification","currentRefinementCriteria","updatedRefinementCriteria","toggledItemFound","r","selectedCriterion","isSelecting","next","rangeStart","rangeEnd","Text","RefinerTypeValue","RefinerType","SingleSelect","Values","child","matchingIndex","findIndex","criterion","splice","ChoiceSummary","super","closeButtonGlyph","_onClick","e","preventDefault","stopPropagation","target","currentTarget","clearAll","getAttribute","includes","selectedRefiner","_getSelectedRefinerChoice","onChoiceClicked","itemClicked","choiceClicked","nextItemToFocus","nextSibling","payLoad","getPayloadObject","telemetryContent","_this$props$context","selectedChoices","refinerHierarchy","choice","hierarchy","_rangeParentDisplay$","rangeParentDisplay","_getKeyForRefinerValue","rangeDisplayType","render","clearAllText","label","classNames","choiceAriaLabel","closeAriaLabel","items","selectedRefinersMap","contentAction","etext","clearAllAttributes","getTelemetryAttributes","classnames","item","attribute","newIntRange","urlBuilder","onClick","role","_parent","choiceFormat","choiceRangeValueFormat","refinerValues","overallFormat","rangeFormat","refinerValueName","refinerName","KeyName","replace","_formatPrice","filterValue","amount","currency","cultureFormatter","formatCurrency","error","selected","computed","observer","ErrorMessage","_ref","text","FeatureSearchResultItem","_context$request$app","product","imageSettings","resources","productName","Name","productRecordId","productUrl","getProductPageUrlSync","fallbackImage","getFallbackImageUrl","ItemId","OmniChannelMedia","heading","featureSimilarDescriptionTitle","featureSimilarLooksTitle","onTelemetryClick","gridSettings","imageUrl","altText","img","src","imageProps","fallBackSrc","Image","loadFailureBehavior","renderProductPlacementImage","Link","ariaLabel","ModalToggle","innerRef","ref","modalNode","Modal","autoFocus","applicationNode","returnFocusRef","returnRef","isOpen","toggle","onModalToggle","zIndex","modalHeaderNode","ModalHeader","modalTitle","modalFooterNode","ModalFooter","Button","modalCloseButtonText","getInventoryLabel","inventoryAttribute","ProductSearchResultItems","moduleType","moduleId","allowBackNavigation","quickviewSlot","productComparisonButton","isPriceMinMaxEnabled","productsDimensionAvailabilities","priceResources","priceRangeSeparator","ProductComponent","freePriceText","priceFree","originalPriceText","currentPriceText","ratingAriaLabel","allowBack","typeName","data","quickViewButton","inventoryLabel","swatchItemAriaLabel","dimensionAvailabilities","dimensionAvailability","masterProductId","MasterProductId","RangeRefineItem","_selectedRefinementCr","_this$props$selectedR","_this$props$selectedR2","_ref2","_this$props$selectedR3","_this$props$selectedR4","_formattedPriceReverseLookup","Map","getLabels","sliderId","minPrice","maxPrice","labelId","labelString","labelPositioning","getSliderThumbs","sliderKey","selectedMin","selectedMinPrice","selectedMax","selectedMaxPrice","_this$props$minValueS","_this$props$maxValueS","minValueSliderThumbAriaLabel","currencyCode","ariaValueText","maxValueSliderThumbAriaLabel","_onRangeUpdate","bind","_onRangeUpdateEnd","_handleRangeTooltipText","_changeMin","_changeMax","_finishChangeMin","_finishChangeMax","minInput","maxInput","initialMin","initialMax","String","minValue","maxValue","labels","sliderKeyString","sliderThumbs","state","isChecked","validationErrorMin","validationErrorMax","touchedMin","touchedMax","shouldComponentUpdate","nextProps","nextState","componentDidUpdate","previousProps","updateSliderProps","refineItemCommonProps","rangeType","_renderInputFields","_renderSlider","_ref3","_this$props$selectedR5","_this$props$selectedR6","_ref4","_this$props$selectedR7","_this$props$selectedR8","setState","isDisabled","formAttrs","rangeNameFormat","minInputClassName","maxInputClassName","formattedSelectedMin","_getFormattedSelectedValue","formattedSelectedMax","minLabel","onChange","onFocus","onBlur","maxLabel","placeholder","placeholderTextMax","ariaAttributes","Slider","inForm","min","max","step","orientation","showLabels","showTooltip","onChangeEnd","debounce","handleTooltipText","event","_changeValue","inputType","selectedKey","touchedKey","_getInputWithoutFormatting","selectedMinValue","minTouched","onToggle","maxNum","validationErrorNaN","_focus","_validateRange","selectedMaxValue","maxTouched","minNum","setTimeout","current","focus","touched","validationError","validationErrorRange","inputAsNum","get","sliderChangeNotification","eventType","firstThumbValue","secondThumbValue","_focusOnSliderThumb","document","getElementById","tooltip","RefineItem","anchorType","_productRefinerValue$","_this$props$parentPro","_this$props$parentPro2","_this$props","productCountAriaLabel","singleProductCountAriaLabel","children","refineItemAriaLabel","refineItemsAriaLabel","attrs","_objectWithoutProperties","_excluded","isSingleSelect","itemTypeClassName","SourceValue","Rating","_renderRating","productText","productCount","refineMenuItemAriaLabel","format","dimensionType","toLocaleLowerCase","shouldDisplayAsSwatch","_getShouldDisplayAsSwatch","hasColor","StringExtensions","isNullOrWhitespace","SwatchColorHexCode","hasImage","SwatchImageUrl","hasContentSwatch","_getRefinerUrl","tabIndex","_renderSwatch","checkIfShouldDisplayAsSwatch","_productRefinerValue$2","swatchItems","colorHexCode","SwatchComponent","list","isSelectionEnabled","isRefineItem","ratingUserCountAriaLabel","ratingSingleUserCountAriaLabel","_productRefinerValue$3","refinerRating","parseInt","ratingRefiner","selectedRefinerValues","selectedRating","defaultChkProductCount","ratingComponentClass","productCountAriaLabelValue","isMobileView","RatingComponent","avgRating","ratingCount","hideCount","readOnly","moduleTypeName","RangeRefineItemInput","_changeMinInputRange","_changeMaxInputRange","_applyCustom","invalidData","updateInputRangerProps","_isUndefined","disabled","trim","RefineSubmenu","_onToggleItem","_onToggleSubmenu","isExpanded","isExpandedOnInitialLoad","expanded","productRefinerHierarchy","hideRating","Collapse","timeout","_renderChildItems","_renderSingleMultiSelect","_renderRange","refinerValuesList","listItems","selectedValue","_getRangeType","SliderWithBars","onUpdateRefiners","prevState","Separator","separator","Title","SearchResultContainer_1","_props$context$reques","sortByDropdownOptions","_pageType","_viewport","expandrefinerCount","defaultPageNumber","isListPageStateUpdated","_isMounted","_updateVariantAvailability","dimensionsToDisplayOnProductCard","dimensionsInProductCard","dimensionsToDisplayAsSwatch","dimensionsAsSwatchType","DimensionTypes","none","_getProductsDimensionsAvailabilities","_updateListPageState","listPageState","_this$props$context$r","_this$props$context$r2","_this$props$config$it","_this$props$config$it2","_this$props$context$r3","querySorting","totalProductCount","_this$props$data$list","_this$props$data$list2","productsList","getDimensionAvailabilitiesForProductSearchResultAction","DimensionAvailabilitiesForProductSearchResultInput","DimensionSwatchDisplayTypes","productCard","_getActivePrice","_this$props$data$list3","_this$props$data$list4","getPriceForProductSearchResult","PriceForProductSearchResultInput","_getSearchResultModal","ModalBody","SearchResultModal","modalIsOpen","_modalToggleRef","_toggleModal","_getCollectionTitle","collectionTitle","_this$props$context$r4","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","ObjectExtensions","isNullOrUndefined","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","_this$props$data$prod","_this$props$data$prod2","_this$props$data$prod3","_this$props$data$prod4","isInventorySortableAttribute","isInventoryProductAttribute","_getChoiceSummary","_this$props$data$refi","selectedRefiners","rating","choiceSummaryLabel","_onChoiceClicked","_buildRefinerUrlForChoiceSummary","_getProducts","_this$props$slots","_this$props$data$feat","_this$props$data$prod5","shouldAllowBackNavigation","breadCrumbType","breadcrumbType","shouldAllowBack","slots","quickview","isPriceMinMaxFeatureState","featureState","IsEnabled","notification","history","pushState","_getSortColumnFromSelectedOption","transaction","option","mappedConfiguration","_getSortCriteriaColumn","_this$props$data$list5","sortCriteria","queryColumns","mappedSearchConfiguration","mappedSearchConfig","validValues","activeSortColumn","activeMappedConfig","_this$props$data$list6","newRefinementCriteria","dropdownElementId","dropdownElement","selectedChoice","isClearAll","refinerCount","paginationPreviousText","paginationNextText","device","Type","_updateViewport","pending","validationErrorNotNumber","validationErrorNotRange","getTelemetryObject","friendlyName","nameTranslations","_nameTranslation","nameTranslation","Language","_this$props$context$a2","addEventListener","StoreOperationsDataActions","reaction","_listPageState$active","_listPageState$sortin","_newListPageState$cur","_newListPageState$sor","_newListPageState$act","_this$props$context$r5","_this$props$context$r6","_this$props$context$r7","_this$props$context$a","newListPageState","Math","productResults","getCollectionProducts","enableAffiliationBasedPricing","user","isAuthenticated","_newListPageState$cur2","_newListPageState$sor2","_newListPageState$act2","_this$props$context$r8","_this$props$context$r9","refinerInput","getCollectionRefinersAction","componentWillUnmount","removeEventListener","_listPageState$result","_listPageState$result2","_this$props$context$r10","_this$props$data$list7","_this$props$data$list8","productCollection","searchProduct","errorText","resultCategoryNotFoundText","resultSearchNotFoundText","productsComponent","featureComponent","searchResultContainerViewProps","disableHierarchy","moduleProps","renderView","_getViewport","variant","VariantType","Browser","Viewport","renderTitleCount","getDefaultSwatchSelected","coreContext","productData","_productData$Attribut","_attributeSwatches$fi","dimensionToPreSelectInProductCard","attributeSwatches","attributeValue","_attributeValue$KeyNa","Swatches","IsDefault","updateProductUrl","productDetailsPageUrl","queryString","sourceUrl","baseUrl","search","pathname","renderProductUnitOfMeasure","unitOfMeasure","renderLabel","price","ratingAriaLabelText","reviewCount","ratingCountAriaLabelText","reviewCountArialableText","getReviewAriaLabel","getRatingAriaLabel","roundedRating","toFixed","renderPrice","savingsText","productPrice","ProductTypeValue","IsMasterProduct","ProductType","Master","Standalone","BasePrice","AdjustedPrice","Price","CustomerContextualPrice","MaxVariantPrice","MinVariantPrice","PriceComponent","fallbackImageUrl","_context$app$config","contextConfig","placeholderImageName","fallbackImageSource","cropFocalRegion","bypassHideOnFailure","msdyn365Commerce","createComponentOverride","component","_product$Name","_product$RecordId","_getProductImageUrlFr","_getProductPageUrlFro","ratingCountAriaLabel","isEnabledProductDescription","MIN_VALUE","productImageUrlFromSwatch","defaultSwatch","swatchProductImageUrls","ProductImageUrls","generateImageUrl","getProductImageUrlFromDefaultSwatch","productPageUrlFromSwatch","SwatchValue","encodeURIComponent","getProductPageUrlFromDefaultSwatch","productPageUrl","setProductPageUrl","useState","productImageUrl","setProductImageUrl","selectedSwatchItems","Dictionary","updatePageAndImageUrl","swatchItem","setValue","productPageUrlWithSwatch","newUrl","swatchProductImageUrl","productImageUrls","isUnitOfMeasureEnabled","unitOfMeasureDisplayType","AverageRating","TotalRatings","DefaultUnitOfMeasure","description","Description","attributeValues","_item$KeyName$toLocal","_item$KeyName","_item$Swatches$map","_item$Swatches","dimensionTypeValue","shouldDisplayDimension","swatches","_item$RecordId","_swatchItem$SwatchVal","_swatchItem$SwatchVal2","_dimensionAvailabilit","isDefault","_swatchItem$SwatchVal3","swatch","ProductComponentSwatchComponent","onSelectDimension","totalRatings","numberRatings","renderRating","inventoryAvailabilityLabel","selectedDimensions","getValues","DimensionTypeValue","convertDimensionTypeToProductDimensionType","DimensionValue","Value","selectedProductId","renderQuickView","validateCatalogId","renderProductComparisonButton","DescriptionInterval","renderProductCards","renderProductCardsDescription","_props$data$products$","_props$data$featureSt","isAllowBack","classname","quickviewslot","renderProducts","_props$data$listPageS","productDescriptionInterval","productDescriptionIntervalRemainder0","productDescriptionIntervalRemainder9","configureStickyFilter","isStickyHeader","headerContainer","querySelector","headerHeight","offsetHeight","bannerHeights","headerElement","defaultContainer","refinerElement","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":""}