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CAACjR,UAAU,2CACVsP,EAA8B1K,UAC/BsO,EAAYC,EAAyBzX,IAE1CqE,IAAAA,cAACkR,EAAAA,KAAI,CAACjR,UAAU,sCACZD,IAAAA,cAACkR,EAAAA,KAAI,CAACjR,UAAU,4BACXjB,EAA6BK,EAA2BqS,EACrDzS,EAAOsN,EAAsBqD,GAChC5K,EAA4B4J,EAAgBQ,EAAWqD,EAAiBf,EAAclC,EACnFjD,EAAsBqD,IAE7BlK,EAA4BmJ,EAAgBQ,EAAWpQ,EAAOwQ,EAC3DlD,EAAsBqD,MAKrC,C,QCpKjB0E,EAAOC,QAAUvU,K,SCAjBsU,EAAOC,QAAUC,Q","sources":["webpack://@msdyn365-commerce-partners/fabrikam/./lib/search/module-registration.js?f197","webpack://@msdyn365-commerce-partners/fabrikam/./src/search-state-data-action.ts?8223","webpack://@msdyn365-commerce-partners/fabrikam/./src/search-state.ts?dd10","webpack://@msdyn365-commerce-partners/fabrikam/./src/modules/search/actions/get-auto-suggest-suggestions.ts?4735","webpack://@msdyn365-commerce-partners/fabrikam/./src/modules/search/components/search.categorysuggest.tsx?c65d","webpack://@msdyn365-commerce-partners/fabrikam/./src/modules/search/components/search.form.tsx?25a5","webpack://@msdyn365-commerce-partners/fabrikam/./src/modules/search/components/search.keywordsuggest.tsx?297c","webpack://@msdyn365-commerce-partners/fabrikam/./src/modules/search/components/search.label.tsx?0c17","webpack://@msdyn365-commerce-partners/fabrikam/./src/modules/search/components/search.productsuggest.tsx?2af9","webpack://@msdyn365-commerce-partners/fabrikam/./src/modules/search/search.tsx?72fb","webpack://@msdyn365-commerce-partners/fabrikam/./src/modules/search/search.view.tsx?1505","webpack://@msdyn365-commerce-partners/fabrikam/./src/modules/adventureworks/views/components/search.categorysuggest.tsx?6bcf","webpack://@msdyn365-commerce-partners/fabrikam/./src/modules/adventureworks/views/components/search.mobile.empty.tsx?ff32","webpack://@msdyn365-commerce-partners/fabrikam/./src/modules/adventureworks/views/components/search.form.tsx?d41a","webpack://@msdyn365-commerce-partners/fabrikam/./src/modules/adventureworks/views/components/search.keywordsuggest.tsx?2724","webpack://@msdyn365-commerce-partners/fabrikam/./src/modules/adventureworks/views/components/search.productsuggest.tsx?6616","webpack://@msdyn365-commerce-partners/fabrikam/./src/modules/adventureworks/views/search.view.tsx?bfa7","webpack://@msdyn365-commerce-partners/fabrikam/external var \"React\"?0d3b","webpack://@msdyn365-commerce-partners/fabrikam/external var \"ReactDOM\"?853b"],"sourcesContent":["const binding = { modules: {}, dataActions: {} };\n\n const registerActionId = (actionPath) => {\n if (binding.dataActions[actionPath] &&\n binding.dataActions[actionPath].default &&\n binding.dataActions[actionPath].default.prototype &&\n binding.dataActions[actionPath].default.prototype.id) {\n binding.dataActions[binding.dataActions[actionPath].default.prototype.id] = binding.dataActions[actionPath];\n } else {\n Object.keys(binding.dataActions[actionPath] || {}).forEach(exportName => {\n if (binding.dataActions[actionPath][exportName] &&\n binding.dataActions[actionPath][exportName].prototype &&\n binding.dataActions[actionPath][exportName].prototype.Action) {\n binding.dataActions[binding.dataActions[actionPath][exportName].prototype.id] = binding.dataActions[actionPath][exportName];\n }\n })\n }\n };\n\n const registerSanitizedActionPath = (sanitizedActionPath, dataAction) => {\n if (process.env.NODE_ENV === 'development') {\n if (!dataAction.default) {\n throw new Error('Data action path does not have a default export');\n }\n if (!(dataAction.default.prototype.id && binding.dataActions[dataAction.default.prototype.id]) || !binding.dataActions[sanitizedActionPath]) {\n binding.dataActions[sanitizedActionPath] = dataAction;\n }\n } else {\n binding.dataActions[sanitizedActionPath] = dataAction;\n if (!binding.dataActions[sanitizedActionPath].default) {\n throw new Error('Data action path ' + sanitizedActionPath + ' does not have a default export');\n }\n binding.dataActions[sanitizedActionPath].default.prototype.RegistrationId = sanitizedActionPath;\n if (binding.dataActions[sanitizedActionPath].default.prototype.id) {\n binding.dataActions[binding.dataActions[sanitizedActionPath].default.prototype.id] = sanitizedActionPath;\n }\n }\n };\n \n\n (binding.modules['search'] = {\n c: () => require('@msdyn365-commerce-modules/search/dist/lib/modules/search/search'),\n $type: 'contentModule',\n da: [{name:'searchState', path:'@msdyn365-commerce-modules/search-utilities/dist/lib/search-state-data-action', runOn: 1}],\n \n iNM: true,\n ns: '@msdyn365-commerce-modules',\n n: 'search',\n p: 'search',\n \n pdp: '',\n \n \n md: 'node_modules/@msdyn365-commerce-modules/search/dist/lib/modules/search'\n });\n \n\n {\n const sanitizedActionPath = '@msdyn365-commerce-modules/search-utilities/dist/lib/search-state-data-action';\n let dataAction = require('@msdyn365-commerce-modules/search-utilities/dist/lib/search-state-data-action');\n registerSanitizedActionPath(sanitizedActionPath, dataAction);\n }\n \n\n \n window.__bindings__ = window.__bindings__ || {};\n window.__bindings__.modules = {\n ...window.__bindings__.modules || {},\n ...binding.modules\n };\n \n window.__bindings__.dataActions = {\n ...window.__bindings__.dataActions || {},\n ...binding.dataActions\n };\n export const viewDictionary = {};\n viewDictionary['@msdyn365-commerce-modules|search|modules|search|search'] = {\n c: () => require('@msdyn365-commerce-modules/search/dist/lib/modules/search/search.view.js'),\n cn: '@msdyn365-commerce-modules-search-search'\n };\nviewDictionary['@msdyn365-commerce-theme|adventureworks-theme-kit|modules|adventureworks|views|search'] = {\n c: () => require('@msdyn365-commerce-theme/adventureworks-theme-kit/dist/lib/modules/adventureworks/views/search.view.js'),\n cn: '@msdyn365-commerce-theme-adventureworks-theme-kit-search'\n };\nwindow.__bindings__ = window.__bindings__ || {};\nwindow.__bindings__.viewDictionary = {\n ...window.__bindings__.viewDictionary || {},\n ...viewDictionary\n };","/*--------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * See License.txt in the project root for license information.\n *--------------------------------------------------------------*/\n\nimport { createObservableDataAction, IAction, IActionInput, IAny, ICreateActionContext, IGeneric } from '@msdyn365-commerce/core';\nimport { GenericInput, getGenericAction } from '@msdyn365-commerce-modules/retail-actions';\n\nimport { SearchState } from './search-state';\n\nexport function createSearchStateInput(result: SearchState): GenericInput {\n return new GenericInput('searchState', result, 'SearchState');\n}\n\nconst createsearchStateInputInternal = (inputData: ICreateActionContext>): IActionInput => {\n return createSearchStateInput({ searchText: '' });\n};\n\nexport const getGenericActionDataAction = createObservableDataAction({\n action: >getGenericAction,\n input: createsearchStateInputInternal\n});\n\nexport default getGenericActionDataAction;\n","/*--------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * See License.txt in the project root for license information.\n *--------------------------------------------------------------*/\n\nimport { observable } from 'mobx';\n\n/**\n * State information related to what is needed to succesfully perform a autosuggest.\n */\nexport class SearchState {\n @observable public searchText?: string;\n\n @observable public defaultBasicSearchUrl?: string;\n\n @observable public searchQueryStringParameter?: string;\n}\n","/*--------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * See License.txt in the project root for license information.\n *--------------------------------------------------------------*/\n\nimport { Autosuggestions } from '@msdyn365-commerce/commerce-entities';\nimport {\n CacheType, createObservableDataAction, getCatalogId, IAction, IActionContext, IActionInput,\n ICreateActionContext\n} from '@msdyn365-commerce/core';\nimport { SearchSuggestion, SearchSuggestionCriteria } from '@msdyn365-commerce/retail-proxy';\nimport {\n getSearchSuggestionsAsync\n} from '@msdyn365-commerce/retail-proxy/dist/DataActions/StoreOperationsDataActions.g';\nimport { generateImageUrl } from '@msdyn365-commerce-modules/retail-actions';\n\nexport enum SuggestionType {\n Category = 'ScopedCategory',\n Keyword = 'Keyword',\n Product = 'Product',\n None = 'None'\n}\n\n/**\n * Input class for auto suggest search input.\n */\nexport class AutoSuggestInput implements IActionInput {\n public searchQuery?: string;\n\n public topResultsCount?: number;\n\n public suggestionType?: string;\n\n public hitPrefix?: string;\n\n public hitSuffix?: string;\n\n public constructor(searchText?: string, top?: number, suggestionType?: string, hitPrefix?: string, hitSuffix?: string) {\n this.searchQuery = searchText;\n this.topResultsCount = top;\n this.suggestionType = suggestionType;\n this.hitPrefix = hitPrefix;\n this.hitSuffix = hitSuffix;\n }\n\n public getCacheKey = () => 'AutoSuggestSearchSuggestions';\n\n public getCacheObjectType = () => 'AutoSuggestSearchSuggestions';\n\n public dataCacheType = (): CacheType => 'none';\n}\n\nconst createInput = (inputData: ICreateActionContext) => {\n return new AutoSuggestInput();\n};\n\n/**\n * Calls the Retail API and returns a auto-suggest suggestions.\n * @param input\n * @param ctx\n */\nexport async function getSearchSuggestionsAction(input: AutoSuggestInput, ctx: IActionContext): Promise {\n // If no input is provided fail out\n if (!input || !input.searchQuery) {\n throw new Error('[getSearchSuggestionsAction]No valid Input was provided, failing');\n }\n\n const autosuggest: Autosuggestions = {};\n\n const autoSuggestPromises = [_getAutoSuggest(input, autosuggest, ctx)];\n return Promise.all(autoSuggestPromises).then(() => {\n return autosuggest;\n });\n}\n\nasync function _getAutoSuggest(\n input: AutoSuggestInput,\n autosuggest: Autosuggestions,\n ctx: IActionContext\n): Promise {\n const catalogId = getCatalogId(ctx.requestContext);\n const searchCriteria: SearchSuggestionCriteria = {\n ProductSearchCriteria: {\n SearchCondition: input.searchQuery && input.searchQuery.length > 0 ? input.searchQuery : '',\n Context: {\n ChannelId: +ctx.requestContext.apiSettings.channelId,\n CatalogId: catalogId\n }\n },\n HitPrefix: input.hitPrefix,\n HitSuffix: input.hitSuffix,\n SuggestionType: input.suggestionType\n };\n\n const searchSuggestions = await getSearchSuggestionsAsync(\n { callerContext: ctx, queryResultSettings: { Paging: { Top: input.topResultsCount } } },\n searchCriteria\n );\n\n if (searchSuggestions && searchSuggestions.length > 0) {\n // Generate image url\n searchSuggestions.map(\n (item: SearchSuggestion) => (item.ImageUrl = item.ImageUrl ? generateImageUrl(item.ImageUrl, ctx.requestContext.apiSettings) : '')\n );\n\n autosuggest.AllSearchResults = searchSuggestions;\n } else {\n ctx.telemetry.error(`[getSearchSuggestionsAction] unable to get availabilites for search with suggestion type ${searchCriteria.SuggestionType}`);\n }\n}\n\nexport const getSearchSuggestionsActionDataAction = createObservableDataAction({\n id: '@msdyn365-commerce-modules/search/get-auto-suggest-suggestions',\n action: >getSearchSuggestionsAction,\n input: createInput\n});\n\nexport default getSearchSuggestionsActionDataAction;\n","/*--------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * See License.txt in the project root for license information.\n *--------------------------------------------------------------*/\n\nimport MsDyn365, { getRichTextHtml } from '@msdyn365-commerce/core';\nimport { ProductRefiner, ProductRefinerSource, ProductRefinerValue, SearchSuggestion } from '@msdyn365-commerce/retail-proxy';\nimport { format, getPayloadObject, getTelemetryAttributes, IPayLoad, ITelemetryContent } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport { ISearchData } from '../search.data';\nimport { ISearchProps } from '../search.props.autogenerated';\n\nexport interface ISearchCategorySuggestProps {\n searchCategorySuggestClass: string;\n searchPageURL: string;\n searchQsp: string | undefined;\n hitPrefix: string;\n hitSuffix: string;\n autoSuggestProps: ISearchProps;\n searchText: string;\n searchRefiners: ProductRefiner[] | undefined;\n suggestions: SearchSuggestion[] | undefined;\n telemetryContent?: ITelemetryContent;\n shouldShowFullPath?: boolean;\n}\n\nexport interface ISearchCategoryViewProps {\n title: React.ReactNode;\n text: React.ReactNode[];\n}\n\nlet payLoad: IPayLoad;\n\n/**\n * CategorySuggestionsComponent.\n * @param props\n */\nexport const CategorySuggestionsComponent = (props: ISearchCategorySuggestProps): ISearchCategoryViewProps | undefined => {\n const {\n suggestions,\n searchText,\n autoSuggestProps: {\n resources: { categorySuggestionHeading }\n }\n } = props;\n\n const reactNodes: React.ReactNode[] = [];\n payLoad = getPayloadObject('click', props.telemetryContent!, '');\n\n suggestions?.map(item => {\n reactNodes.push(_assembleNode(item, props));\n });\n\n const titleNode = _renderTitle(categorySuggestionHeading, searchText);\n\n return { title: titleNode, text: reactNodes };\n};\n\nconst _renderTitle = (categorySuggestionHeading: string, searchText: string) => {\n const categoryAutoSuggestionHeading = categorySuggestionHeading ? format(categorySuggestionHeading, searchText) : `Search \"${searchText}\" in categories`;\n\n return (
  • \n {categoryAutoSuggestionHeading}\n
  • );\n};\n\nconst _assembleNode = (item: SearchSuggestion, props: ISearchCategorySuggestProps) => {\n const { searchText, hitPrefix, hitSuffix, shouldShowFullPath } = props;\n\n const splitValue = shouldShowFullPath ? item.Value : item.Value && item.Value.split('|').pop();\n const ariaLabel = splitValue ? splitValue.replace(new RegExp(`[${hitPrefix}]`, 'gi'), '').replace(new RegExp(`[${hitSuffix}]`, 'gi'), '') : item.Value && item.Value.replace(new RegExp(`[${hitPrefix}]`, 'gi'), '').replace(new RegExp(`[${hitSuffix}]`, 'gi'), '');\n payLoad.contentAction.etext = item.Value;\n const attribute = getTelemetryAttributes(props.telemetryContent!, payLoad);\n return (\n
  • \n \n {_generateLink(item, searchText, props) && _getHighlightedText(splitValue ? splitValue : '', hitPrefix, hitSuffix)}\n \n
  • \n );\n};\n\nconst _generateLink = (suggestion: SearchSuggestion, searchText: string, props: ISearchCategorySuggestProps): string => {\n return suggestion && suggestion.Id ? _getCategoryLink(suggestion.Id, searchText, props) : '';\n};\n\nconst _getCategoryLink = (id: string, searchText: string, props: ISearchCategorySuggestProps): string => {\n const { searchPageURL, searchQsp, searchRefiners } = props;\n\n if (!MsDyn365.isBrowser) {\n return '';\n }\n\n const queryUrl = new URL(searchPageURL, window.location.href);\n\n if (searchQsp && searchText) {\n queryUrl.searchParams.set(searchQsp, searchText);\n }\n\n const categoryRefiners = searchRefiners?.find(refiners => {\n return refiners.SourceValue === ProductRefinerSource.Category;\n });\n const refiner = categoryRefiners?.Values?.find(item => {\n return item.RefinerRecordId === Number.parseInt(id, 10);\n });\n\n const encodedRefiner = refiner && JSON.stringify(compressRefiners([refiner]));\n if (encodedRefiner) {\n queryUrl.searchParams.set('refiners', encodedRefiner);\n }\n\n return queryUrl.href;\n};\n\nconst _getHighlightedText = (suggestion: string, hitPrefix: string, hitSuffix: string): JSX.Element => {\n const formattedText = suggestion\n .replace(new RegExp(`[${hitPrefix}]`, 'gi'), '')\n .replace(new RegExp(`[${hitSuffix}]`, 'gi'), '');\n\n return ;\n};\n\n// TODO: This code is currently duplicated in categoryautosuggest need to either remove one of these files\n// or move this code to a common place\nconst compressedRefinerKeys = ['DataTypeValue', 'LeftValueBoundString', 'RefinerRecordId', 'RefinerSourceValue', 'RightValueBoundString', 'UnitText'];\n\n/**\n * Compressed a list of refiners for use in URLs.\n * @param refiners The uncompressed refiners.\n */\nconst 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 * Copyright (c) Microsoft Corporation. All rights reserved.\n * See License.txt in the project root for license information.\n *--------------------------------------------------------------*/\n\nimport { Button } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nexport interface ISearchFormProps {\n hideSearchLabel: boolean | undefined;\n isSearchFormExpanded?: boolean | undefined;\n disableSubmitSearch: boolean | undefined;\n searchTextInput: React.RefObject;\n maxChars: number;\n searchQsp: string;\n searchPlaceholder: string;\n query: string;\n ariaLabelCancel: string;\n ariaLabelSearch: string;\n ariaLabelSubmit: string;\n handleCancelSearchChange(): void;\n handleInputChange(query: string): void;\n}\n\nexport interface ISearchFormViewProps {\n input: React.ReactNode;\n submitBtn: React.ReactNode;\n cancelBtn: React.ReactNode;\n\n}\n\n/**\n * On Input Change functionality.\n * @param handleInputChange -Input change function.\n * @returns Set updated input value.\n */\nconst onInputChangeFunction = (handleInputChange: (query: string) => void) => (event: React.ChangeEvent) => {\n handleInputChange(event.target.value || '');\n};\nexport const FormComponent = (props: ISearchFormProps): ISearchFormViewProps => {\n const {\n searchQsp,\n searchPlaceholder,\n hideSearchLabel,\n searchTextInput,\n handleInputChange,\n maxChars,\n disableSubmitSearch,\n handleCancelSearchChange,\n query,\n ariaLabelCancel,\n ariaLabelSearch,\n ariaLabelSubmit\n } = props;\n\n const onInputChange = onInputChangeFunction(handleInputChange);\n\n const inputNode = !hideSearchLabel ? (\n \n ) : (\n \n );\n\n const submitBtnNode = !disableSubmitSearch && (\n \n \n );\n};\n","/*--------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * See License.txt in the project root for license information.\n *--------------------------------------------------------------*/\n\nimport { PriceComponent } from '@msdyn365-commerce/components';\nimport { getRichTextHtml, IActionContext, IImageSettings, Image, ITelemetry } from '@msdyn365-commerce/core';\nimport { SearchSuggestion } from '@msdyn365-commerce/retail-proxy';\nimport { getProductPageUrlSync, ObjectExtensions } from '@msdyn365-commerce-modules/retail-actions';\nimport { getPayloadObject, getTelemetryAttributes, INodeProps, IPayLoad, ITelemetryContent, NodeTag } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport { ISearchData } from '../search.data';\nimport { ISearchProps } from '../search.props.autogenerated';\n\n/**\n * Search product suggest resources.\n */\nexport interface ISearchProductSuggestResources {\n freePriceText: string;\n}\n\nexport interface ISearchProductSuggestProps {\n searchProductSuggestClass: string;\n searchPageURL: string;\n searchQsp: string | undefined;\n hitPrefix: string;\n hitSuffix: string;\n autoSuggestProps: ISearchProps;\n searchText: string;\n suggestions: SearchSuggestion[] | undefined;\n telemetry: ITelemetry;\n moduleType: string;\n moduleId: string;\n telemetryContent?: ITelemetryContent;\n resources?: ISearchProductSuggestResources;\n}\n\nexport interface ISearchProductViewProps {\n title: React.ReactNode;\n items: ISearchProductItemViewProps[];\n}\n\nexport interface ISearchProductItemViewProps {\n text: React.ReactNode;\n thumbnail: React.ReactNode;\n price: React.ReactNode;\n LiProduct: INodeProps;\n AProduct: INodeProps;\n id: string | undefined;\n}\n\nlet payLoad: IPayLoad;\nlet telemetryContent: ITelemetryContent | undefined;\n\n/**\n * ProductSuggestionsComponent.\n * @param props\n */\nexport const ProductSuggestionsComponent = (props: ISearchProductSuggestProps): ISearchProductViewProps | undefined => {\n const {\n suggestions,\n hitSuffix,\n hitPrefix,\n autoSuggestProps: {\n context: { actionContext },\n resources: { productSuggestionHeading }\n },\n moduleType,\n moduleId\n } = props;\n const reactNodes: ISearchProductItemViewProps[] = [];\n telemetryContent = props.telemetryContent;\n payLoad = getPayloadObject('click', props.telemetryContent!, '');\n\n suggestions?.map(item => {\n reactNodes.push(_assembleNode(item, hitPrefix, hitSuffix, actionContext, props, moduleType, moduleId));\n });\n\n const titleNode = _renderTitle(productSuggestionHeading);\n\n return { title: titleNode, items: reactNodes };\n};\n\nconst _renderTitle = (productSuggestionHeading: string) => {\n const productAutoSuggestionHeading = productSuggestionHeading ? productSuggestionHeading : 'Go to products';\n\n return (
  • \n {productAutoSuggestionHeading}\n
  • );\n};\n\nconst _assembleNode = (\n item: SearchSuggestion,\n hitPrefix: string,\n hitSuffix: string,\n actionContext: IActionContext,\n props: ISearchProductSuggestProps,\n moduleType: string,\n moduleId: string\n): ISearchProductItemViewProps => {\n const altText =\n item.Value &&\n (item.Value).replace(new RegExp(`[${hitPrefix}]`, 'gi'), '').replace(new RegExp(`[${hitSuffix}]`, 'gi'), '');\n\n const price = item.Value3?.Value?.DecimalValue;\n return {\n text: _getHighlightedText(item.Value ? item.Value : '', hitPrefix, hitSuffix),\n thumbnail: _renderThumbnail(item, altText ? altText : '', props),\n price: !ObjectExtensions.isNullOrUndefined(price) &&\n _renderPrice(price, price, moduleId, moduleType, props),\n LiProduct: _getLiWrapper(),\n AProduct: _getAWrapper(item, hitPrefix, hitSuffix, actionContext, props),\n id: item.Id\n };\n};\n\nconst _getLiWrapper = () => {\n return {\n className: 'msc-autoSuggest__productResults-item',\n tag: 'li' as NodeTag\n };\n};\n\nconst _getAWrapper = (item: SearchSuggestion, hitPrefix: string, hitSuffix: string, actionContext: IActionContext, props: ISearchProductSuggestProps) => {\n const {\n autoSuggestProps: { context }\n } = props;\n const ariaLabel = item.Value &&\n (item.Value).replace(new RegExp(`[${hitPrefix}]`, 'gi'), '').replace(new RegExp(`[${hitSuffix}]`, 'gi'), '');\n\n payLoad.contentAction.recid = item.Id;\n const attribute = getTelemetryAttributes(telemetryContent!, payLoad);\n const productPrice = context.cultureFormatter.formatCurrency(item.Value3!.Value!.DecimalValue!);\n\n return {\n className: 'msc-autoSuggest__productResults-item',\n tag: 'a' as NodeTag,\n 'aria-label': `${ariaLabel!} ${productPrice}`,\n href: _generateLink(item, hitPrefix, hitSuffix, actionContext),\n ...attribute\n };\n};\n\nconst _generateLink = (suggestion: SearchSuggestion, hitPrefix: string, hitSuffix: string, actionContext: IActionContext) => {\n const formattedLink = (suggestion.Value as string).replace(new RegExp(`[${hitPrefix}]`, 'gi'), '').replace(new RegExp(`[${hitSuffix}]`, 'gi'), '');\n return suggestion.Value && suggestion.Id ? getProductPageUrlSync(formattedLink, suggestion.Id as unknown as number, actionContext, undefined) : '';\n};\n\nconst _getHighlightedText = (suggestion: string, hitPrefix: string, hitSuffix: string): JSX.Element => {\n const formattedText = suggestion\n .replace(new RegExp(`[${hitPrefix}]`, 'gi'), '')\n .replace(new RegExp(`[${hitSuffix}]`, 'gi'), '');\n\n return ;\n};\n\nconst _renderPrice = (adjustedPrice: number, basePrice: number, moduleId: string, moduleType: string, props: ISearchProductSuggestProps): JSX.Element | null => {\n const {\n autoSuggestProps: { context }\n } = props;\n\n return (\n \n );\n};\n\nconst _renderThumbnail = (suggestion: SearchSuggestion, altText: string, props: ISearchProductSuggestProps): JSX.Element | null => {\n const {\n autoSuggestProps: {\n context: {\n request: { gridSettings }\n },\n config: { imageSettings }\n }\n } = props;\n if (imageSettings) {\n imageSettings.cropFocalRegion = true;\n }\n\n if (!suggestion || !suggestion.ImageUrl) {\n props.telemetry.error('Search suggestion content is empty, module wont render.');\n return null;\n }\n\n const defaultImageSettings: IImageSettings = {\n viewports: {\n xs: { q: 'w=40&h=40&m=6', w: 0, h: 0 },\n lg: { q: 'w=40&h=40&m=6', w: 0, h: 0 },\n xl: { q: 'w=40&h=40&m=6', w: 0, h: 0 }\n },\n lazyload: true,\n cropFocalRegion: true\n };\n\n return (\n \n );\n};\n","/*--------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * See License.txt in the project root for license information.\n *--------------------------------------------------------------*/\n\nimport { Autosuggestions } from '@msdyn365-commerce/commerce-entities';\nimport MsDyn365, { getCatalogId, getUrlSync } from '@msdyn365-commerce/core';\nimport { ProductRefiner, ProductRefinerSource, ProductsDataActions } from '@msdyn365-commerce/retail-proxy';\nimport { ArrayExtensions, ObjectExtensions, Random } from '@msdyn365-commerce-modules/retail-actions';\nimport { createSearchStateInput } from '@msdyn365-commerce-modules/search-utilities';\nimport { getTelemetryObject, IModuleProps, INodeProps, ITelemetryContent, KeyCodes } from '@msdyn365-commerce-modules/utilities';\nimport classnames from 'classnames';\nimport { debounce } from 'lodash';\nimport { Spinner, SpinnerSize } from 'office-ui-fabric-react';\nimport * as React from 'react';\n\nimport getSearchSuggestionsAction, { AutoSuggestInput, SuggestionType } from './actions/get-auto-suggest-suggestions';\nimport {\n CategorySuggestionsComponent,\n FormComponent,\n ISearchCategoryViewProps,\n ISearchKeywordViewProps,\n ISearchProductViewProps,\n KeywordSuggestionsComponent,\n LabelComponent,\n ProductSuggestionsComponent\n} from './components';\nimport { ISearchData } from './search.data';\nimport { ISearchProps, ISuggestionTypeCriterionData, SuggestionTypeCriterionSuggestionType } from './search.props.autogenerated';\n\nexport interface ISearchState {\n isSearchFormExpanded: boolean;\n searchText: string;\n searchKeywordSuggestClass: string;\n searchProductSuggestClass: string;\n searchCategorySuggestClass: string;\n suggestions: Autosuggestions | undefined;\n searchRefiners?: ProductRefiner[] | undefined;\n autoSuggestAriaLabel: string;\n isInitialState: boolean;\n isLoadingAutoSuggest?: boolean;\n}\n\nexport interface ISearchViewProps extends ISearchProps {\n Search: IModuleProps;\n AutoSuggestAriaLabel: INodeProps;\n AutoSuggestAriaLabelText: string;\n searchText: string;\n AutoSuggest: INodeProps;\n KeywordSuggest: INodeProps;\n ProductSuggest: INodeProps;\n CategorySuggest: INodeProps;\n SearchForm: INodeProps;\n FormWrapper: INodeProps;\n UlKeyword: INodeProps;\n UlProduct: INodeProps;\n UlCategory: INodeProps;\n label: React.ReactNode;\n form: React.ReactNode;\n autosuggestKeyword?: ISearchKeywordViewProps;\n autosuggestProduct?: ISearchProductViewProps;\n autosuggestCategory?: ISearchCategoryViewProps;\n callbacks: {\n handleCancelSearchChange(): void;\n };\n isSearchFormExpanded: boolean;\n isLoadingAutoSuggest?: boolean;\n isLoadingNode?: React.ReactNode;\n}\n\n/**\n *\n * Search module.\n * @extends {React.Component, ISearchState>}\n */\nclass Search extends React.Component, ISearchState> {\n private readonly searchTextInput: React.RefObject;\n\n private readonly searchCollapsedLabel: React.RefObject;\n\n private readonly formReference: React.RefObject;\n\n private readonly maxChars: number;\n\n private readonly topResultsCount?: number;\n\n private readonly hitPrefix: string = '{';\n\n private readonly hitSuffix: string = '}';\n\n private readonly waitTime: number = 500;\n\n private readonly autoSuggestResultScreenReaderDiv: React.RefObject;\n\n private readonly autoSuggestResultDiv: React.RefObject;\n\n private readonly searchFormClass: string;\n\n private readonly searchLabelClass: string;\n\n private readonly telemetryContent: ITelemetryContent;\n\n private loadSuggestionsRequestId?: string;\n\n private inputSuggestionType: ISuggestionTypeCriterionData[];\n\n // @ts-expect-error\n private cancellabelDebounce: debounce;\n\n public constructor(props: ISearchProps) {\n super(props);\n this.searchTextInput = React.createRef();\n this.searchCollapsedLabel = React.createRef();\n this.autoSuggestResultScreenReaderDiv = React.createRef();\n this.autoSuggestResultDiv = React.createRef();\n this.formReference = React.createRef();\n this.state = {\n isSearchFormExpanded: false,\n searchText: '',\n searchKeywordSuggestClass: 'ms-search__autoSuggest__keyword',\n searchProductSuggestClass: 'ms-search__autoSuggest__product',\n searchCategorySuggestClass: 'ms-search__autoSuggest__category',\n suggestions: undefined,\n searchRefiners: undefined,\n autoSuggestAriaLabel: '',\n isInitialState: true,\n isLoadingAutoSuggest: false\n };\n this.maxChars =\n (this.props.context &&\n this.props.context.app &&\n this.props.context.app.config &&\n this.props.context.app.config.searchInputMaxLength) ||\n 50;\n\n this.inputSuggestionType = [];\n this.topResultsCount = this.props.config && this.props.config.topResultsCount ? this.props.config.topResultsCount : 5;\n this.searchFormClass = 'ms-search__form';\n this.searchLabelClass = 'ms-search__label';\n this.telemetryContent = getTelemetryObject(this.props.context.request.telemetryPageName!, this.props.friendlyName, this.props.telemetry);\n\n this._initSuggestionTypes();\n }\n\n public async componentDidMount(): Promise {\n document.body && document.body.addEventListener('mousedown', this._focusOutTarget);\n window && window.addEventListener('keyup', this._keyup);\n }\n\n public componentWillUnmount(): void {\n document.body && document.body.removeEventListener('mousedown', this._focusOutTarget, false);\n window && window.removeEventListener('keyup', this._keyup, false);\n }\n\n public componentDidUpdate(): void {\n const {\n config: { hideSearchLabel }\n } = this.props;\n const { isSearchFormExpanded, isInitialState } = this.state;\n\n if (!this.props.context.request.params.isEditor) {\n if (!hideSearchLabel && isSearchFormExpanded) {\n this.searchTextInput && this.searchTextInput.current && this.searchTextInput.current.focus();\n } else if (!isInitialState) {\n this.searchCollapsedLabel && this.searchCollapsedLabel.current && this.searchCollapsedLabel.current.focus();\n }\n }\n }\n\n public shouldComponentUpdate(nextProps: ISearchProps,\n nextState: ISearchState): boolean {\n if (this.state === nextState && this.props === nextProps) {\n return false;\n }\n return true;\n }\n\n // eslint-disable-next-line complexity -- ignore complexity.\n public render(): JSX.Element {\n const {\n context,\n resources: { searchtext, searchLabelArialLabel, cancelBtnAriaLabel, searchBtnAriaLabel, submitBtnAriaLabel },\n config: { hideSearchLabel, disableSubmitSearch, searchplaceholderText, shouldShowFullCategoryPath, className = '' }\n } = this.props;\n\n const {\n isSearchFormExpanded,\n searchText,\n searchKeywordSuggestClass,\n searchProductSuggestClass,\n searchCategorySuggestClass,\n suggestions,\n searchRefiners,\n isLoadingAutoSuggest\n } = this.state;\n\n const searchQsp = (context && context.app && context.app.config && context.app.config.searchQueryStringParameter) || 'q';\n const searchPageURL = getUrlSync('search', context && context.actionContext) || '';\n const searchURL = this._appendQueryParams(searchPageURL, searchText, searchQsp);\n const searchPlaceholder = searchplaceholderText && searchplaceholderText.length > 0 ? searchplaceholderText : 'Search in Fabrikam';\n\n const keywordSuggestions = suggestions?.AllSearchResults?.filter(\n suggestion => suggestion.SuggestionType === SuggestionType.Keyword || suggestion.SuggestionType === SuggestionType.None\n );\n const productSuggestions = suggestions?.AllSearchResults?.filter(suggestion => suggestion.SuggestionType === SuggestionType.Product);\n const categoryRefiners = searchRefiners?.find(refiner => {\n return refiner.SourceValue === ProductRefinerSource.Category;\n });\n const categorySuggestions = suggestions?.AllSearchResults?.filter(\n suggestion => {\n if (suggestion.SuggestionType !== SuggestionType.Category) {\n return false;\n }\n const refiner = categoryRefiners?.Values?.find(item => {\n return `${item.RefinerRecordId ?? 0}` === suggestion.Id;\n });\n\n return !ObjectExtensions.isNullOrUndefined(refiner);\n });\n\n const viewProps: ISearchViewProps = {\n ...(this.props as ISearchProps),\n\n Search: {\n moduleProps: this.props,\n className: `${classnames('ms-search', className)} ${disableSubmitSearch ? 'no-submit' : 'with-submit'}`\n },\n AutoSuggestAriaLabel: {\n tag: 'div',\n className: 'msc-autoSuggest__screen-reader',\n 'aria-live': 'assertive',\n ref: this.autoSuggestResultScreenReaderDiv\n },\n AutoSuggestAriaLabelText: this.state.autoSuggestAriaLabel,\n searchText: this.state.searchText,\n AutoSuggest: {\n ref: this.autoSuggestResultDiv,\n className: 'ms-search__autoSuggest'\n },\n KeywordSuggest: {\n className: searchKeywordSuggestClass\n },\n ProductSuggest: {\n className: searchProductSuggestClass\n },\n CategorySuggest: {\n className: searchCategorySuggestClass\n },\n SearchForm: {\n className: `${this.searchFormClass} ${isSearchFormExpanded ? 'bx-show' : 'bx-hide'}`\n },\n FormWrapper: {\n tag: 'form',\n ref: this.formReference,\n className: 'ms-search__searchForm',\n 'aria-label': 'Search',\n name: 'searchForm',\n role: 'search',\n action: searchURL,\n autoComplete: 'off',\n onSubmit: this._handleSubmit\n },\n UlKeyword: {\n tag: 'ul',\n className: classnames('msc-autoSuggest__keywordResults-items', className)\n },\n UlProduct: {\n tag: 'ul',\n className: classnames('msc-autoSuggest__productResults-items', className)\n },\n UlCategory: {\n tag: 'ul',\n className: classnames('msc-autoSuggest__categoryResults-items', className)\n },\n label: LabelComponent({\n isSearchFormExpanded,\n searchLabelClass: `${this.searchLabelClass} ${isSearchFormExpanded ? 'bx-hide' : 'bx-show'}`,\n searchtext,\n searchLabelArialLabel,\n searchCollapsedLabel: this.searchCollapsedLabel,\n hideSearchLabel,\n handleCancelSearchChange: this._handleCancelSearchChange,\n telemetryContent: this.telemetryContent\n }),\n form: FormComponent({\n ariaLabelCancel: cancelBtnAriaLabel,\n ariaLabelSearch: searchBtnAriaLabel,\n ariaLabelSubmit: submitBtnAriaLabel,\n hideSearchLabel,\n searchTextInput: this.searchTextInput,\n disableSubmitSearch,\n handleInputChange: this._handleInputChange,\n handleCancelSearchChange: this._handleCancelSearchChange,\n maxChars: this.maxChars,\n searchQsp,\n searchPlaceholder,\n query: searchText\n }),\n autosuggestKeyword:\n searchText && searchText.length > 0 &&\n (isLoadingAutoSuggest || (keywordSuggestions && ArrayExtensions.hasElements(keywordSuggestions))) ? KeywordSuggestionsComponent({\n searchKeywordSuggestClass,\n searchPageURL,\n searchQsp,\n hitPrefix: this.hitPrefix,\n hitSuffix: this.hitSuffix,\n autoSuggestProps: this.props,\n searchText,\n suggestions: keywordSuggestions,\n telemetryContent: this.telemetryContent\n }) : undefined,\n autosuggestProduct:\n searchText && searchText.length > 0 &&\n (isLoadingAutoSuggest || (productSuggestions && ArrayExtensions.hasElements(productSuggestions))) ? ProductSuggestionsComponent({\n searchProductSuggestClass,\n searchPageURL,\n searchQsp,\n hitPrefix: this.hitPrefix,\n hitSuffix: this.hitSuffix,\n autoSuggestProps: this.props,\n searchText,\n suggestions: productSuggestions,\n telemetry: this.props.telemetry,\n moduleType: this.props.typeName,\n moduleId: this.props.id,\n telemetryContent: this.telemetryContent,\n resources: this.props.resources\n }) : undefined,\n autosuggestCategory:\n searchText && searchText.length > 0 &&\n (isLoadingAutoSuggest || (categorySuggestions && ArrayExtensions.hasElements(categorySuggestions))) ? CategorySuggestionsComponent({\n searchCategorySuggestClass,\n searchPageURL,\n searchQsp,\n hitPrefix: this.hitPrefix,\n hitSuffix: this.hitSuffix,\n autoSuggestProps: this.props,\n searchText,\n suggestions: categorySuggestions,\n searchRefiners,\n telemetryContent: this.telemetryContent,\n shouldShowFullPath: shouldShowFullCategoryPath\n }) : undefined,\n callbacks: {\n handleCancelSearchChange: this._handleCancelSearchChange\n },\n isSearchFormExpanded: this.state.isSearchFormExpanded,\n isLoadingAutoSuggest,\n isLoadingNode: this._isLoadingNode()\n };\n\n return this.props.renderView(viewProps) as React.ReactElement;\n }\n\n private _initSuggestionTypes() {\n const suggestionTypes = this.props.config.suggestionTypeCriterion;\n\n const suggestions = ArrayExtensions.unique(ArrayExtensions.validValues(suggestionTypes));\n if (!ArrayExtensions.hasElements(suggestions)) {\n this.inputSuggestionType = [\n { SuggestionType: SuggestionTypeCriterionSuggestionType.keyword },\n { SuggestionType: SuggestionTypeCriterionSuggestionType.product },\n { SuggestionType: SuggestionTypeCriterionSuggestionType.scopedCategory }\n ];\n return;\n }\n\n const validSuggestions = suggestions.filter(suggestion => suggestion.SuggestionType);\n if (ArrayExtensions.hasElements(validSuggestions)) {\n this.inputSuggestionType = validSuggestions;\n return;\n }\n\n this.inputSuggestionType = [];\n }\n\n /**\n * Function to create the ReactNode for loading Autosuggest result.\n * @returns ReachNode for loading Autosuggest result.\n */\n private readonly _isLoadingNode = (): React.ReactNode => {\n const loadingText = this.props.resources.autoSuggestResultLoadingMessage;\n return ();\n };\n\n private readonly _focusOutTarget = (e: any): void => {\n const { suggestions } = this.state;\n\n if (\n suggestions &&\n suggestions.AllSearchResults &&\n e.target.closest('.ms-search') === null\n ) {\n this._clearAutoSuggestState();\n }\n };\n\n private readonly _keyup = (e: KeyboardEvent): void => {\n const { suggestions } = this.state;\n\n if (suggestions && suggestions.AllSearchResults && e.keyCode === KeyCodes.Escape) {\n this._clearAutoSuggestState();\n } else if (this.state.isSearchFormExpanded && e.keyCode === KeyCodes.Escape) {\n if (this.state.isSearchFormExpanded) {\n this.setState({ isSearchFormExpanded: false });\n }\n }\n\n if (!((this.formReference.current && this.formReference.current.contains(e.target as unknown as Node)) ||\n (this.autoSuggestResultDiv.current && this.autoSuggestResultDiv.current.contains(e.target as unknown as Node)))) {\n if (suggestions && suggestions.AllSearchResults) {\n this._clearAutoSuggestState();\n }\n\n if (this.state.isSearchFormExpanded) {\n this.setState({ isSearchFormExpanded: false });\n }\n }\n };\n\n private readonly _clearAutoSuggestState = (): void => {\n const {\n context: { actionContext },\n data: { searchState }\n } = this.props;\n\n if (this.searchTextInput.current && this.searchTextInput.current.value.length > 0) {\n searchState.searchText = '';\n searchState.defaultBasicSearchUrl = '';\n searchState.searchQueryStringParameter = '';\n actionContext ? actionContext.update(createSearchStateInput(searchState), searchState) : null;\n this.searchTextInput.current.value = '';\n }\n\n this.setState({ searchText: '', suggestions: undefined, searchRefiners: undefined });\n };\n\n private async _getSearchSuggestions(loadSuggestionsRequestId: string, query: string) {\n try {\n const searchSuggestions = await getSearchSuggestionsAction(\n new AutoSuggestInput(\n query,\n this.topResultsCount,\n this._getSuggestionType(),\n this.hitPrefix,\n this.hitSuffix\n ),\n this.props.context.actionContext\n );\n if (loadSuggestionsRequestId !== this.loadSuggestionsRequestId) {\n return undefined;\n }\n return searchSuggestions;\n } catch (error) {\n if (loadSuggestionsRequestId !== this.loadSuggestionsRequestId) {\n return undefined;\n }\n this.setState({ suggestions: undefined, searchRefiners: undefined,\n autoSuggestAriaLabel: this._setAutoSuggestResultCount() });\n this.props.telemetry.exception(error);\n this.props.telemetry.debug('Unable to get auto suggest results');\n return undefined;\n }\n }\n\n private async _updateSearchRefiners(loadSuggestionsRequestId: string, query: string, suggestions: Autosuggestions | undefined) {\n try {\n const refiners = await this._getSearchRefiners(query);\n if (loadSuggestionsRequestId !== this.loadSuggestionsRequestId) {\n return;\n }\n this.setState({ suggestions, searchRefiners: refiners,\n autoSuggestAriaLabel: this._setAutoSuggestResultCount(suggestions), isLoadingAutoSuggest: false });\n } catch (error) {\n if (loadSuggestionsRequestId !== this.loadSuggestionsRequestId) {\n return;\n }\n this.setState({ suggestions, searchRefiners: undefined,\n autoSuggestAriaLabel: this._setAutoSuggestResultCount(suggestions) });\n this.props.telemetry.exception(error);\n this.props.telemetry.debug('Unable to get refiners results');\n }\n }\n\n private _loadSuggestions(query: string) {\n this.cancellabelDebounce = debounce(async () => {\n this.setState({ isLoadingAutoSuggest: true });\n const loadSuggestionsRequestId = Random.Guid.generateGuid();\n this.loadSuggestionsRequestId = loadSuggestionsRequestId;\n const searchSuggestions = await this._getSearchSuggestions(loadSuggestionsRequestId, query);\n await this._updateSearchRefiners(loadSuggestionsRequestId, query, searchSuggestions);\n }, this.waitTime);\n\n setTimeout(() => {\n this.cancellabelDebounce();\n }, 0);\n }\n\n private readonly _handleInputChange = (query: string): void => {\n if (!query || query.length <= this.maxChars) {\n this.setState({ searchText: query });\n }\n\n if (this.cancellabelDebounce) {\n this.cancellabelDebounce.cancel();\n }\n\n const {\n context,\n data: { searchState }\n } = this.props;\n\n if (context) {\n if (query && query.length > 0) {\n if (query.length > this.maxChars) {\n return;\n }\n\n if (ArrayExtensions.hasElements(this.inputSuggestionType)) {\n this._loadSuggestions(query);\n }\n\n searchState.searchText = query;\n } else {\n this.setState({ suggestions: undefined, searchRefiners: undefined });\n searchState.searchText = '';\n }\n context.actionContext.update(createSearchStateInput(searchState), searchState);\n }\n };\n\n private _getSuggestionType(): string {\n const distinctSuggestionTypes: string[] = this.inputSuggestionType.map(\n suggestionTypeItem => suggestionTypeItem.SuggestionType!.charAt(0).toUpperCase() + suggestionTypeItem.SuggestionType!.slice(1));\n return distinctSuggestionTypes.join(',');\n }\n\n private async _getSearchRefiners(searchText: string): Promise {\n const { actionContext: ctx } = this.props.context;\n const catalogId = getCatalogId(ctx.requestContext);\n return ProductsDataActions.getProductSearchRefinersAsync(\n { callerContext: ctx },\n {\n SearchCondition: searchText,\n Context: {\n ChannelId: +ctx.requestContext.apiSettings.channelId,\n CatalogId: catalogId\n }\n }\n );\n }\n\n private readonly _handleSubmit = (\n e: React.MouseEvent | React.KeyboardEvent | React.FormEvent\n ): void => {\n const {\n config: { disableSubmitSearch },\n context: {\n actionContext,\n app: {\n config: { searchQueryStringParameter }\n }\n }\n } = this.props;\n\n const query = this.searchTextInput.current && this.searchTextInput.current.value;\n e.preventDefault();\n\n if (!query || (query && query.length === 0) || disableSubmitSearch) {\n this.searchTextInput && this.searchTextInput.current && this.searchTextInput.current.focus();\n } else {\n const searchQsp = searchQueryStringParameter || 'q';\n const searchURL = this._appendQueryParams(getUrlSync('search', actionContext) || '', query, searchQsp);\n document.location.href = searchURL;\n }\n };\n\n private readonly _handleCancelSearchChange = (): void => {\n const { isSearchFormExpanded, suggestions } = this.state;\n\n if (!isSearchFormExpanded) {\n this.setState({\n isSearchFormExpanded: true,\n searchText: '',\n isInitialState: false\n });\n } else {\n if (suggestions && suggestions.AllSearchResults) {\n this._clearAutoSuggestState();\n }\n\n this.setState({ isSearchFormExpanded: false });\n }\n };\n\n private readonly _appendQueryParams = (route: string, query: string, qsp: string): string => {\n if (!MsDyn365.isBrowser) {\n return '';\n }\n\n const queryUrl = new URL(route, window.location.href);\n if (qsp && query) {\n queryUrl.searchParams.set(qsp, query);\n }\n\n return queryUrl.href;\n };\n\n private readonly _setAutoSuggestResultCount = (result?: Autosuggestions) => {\n if (this.autoSuggestResultScreenReaderDiv.current !== null) {\n const ariaLiveRegion = this.autoSuggestResultScreenReaderDiv.current;\n const suggestResultString = this.props.resources.autoSuggestFoundMessage;\n const emptyResultString = this.props.resources.noAutoSuggestionMessage;\n ariaLiveRegion.innerText = result && (result.AllSearchResults && result.AllSearchResults.length > 0) ? suggestResultString : emptyResultString;\n ariaLiveRegion.setAttribute('aria-live', 'assertive');\n return ariaLiveRegion.innerText;\n }\n return '';\n\n };\n}\n\nexport default Search;\n","/*--------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * See License.txt in the project root for license information.\n *--------------------------------------------------------------*/\n\nimport { INodeProps, Module, Node } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport { ISearchCategoryViewProps, ISearchFormViewProps, ISearchKeywordViewProps, ISearchProductViewProps } from './components';\nimport { ISearchViewProps } from './search';\n\nconst SearchView: React.FC = props => {\n const {\n Search,\n AutoSuggestAriaLabel,\n AutoSuggestAriaLabelText,\n searchText,\n AutoSuggest,\n KeywordSuggest,\n ProductSuggest,\n CategorySuggest,\n UlKeyword,\n UlProduct,\n UlCategory,\n form,\n autosuggestCategory,\n autosuggestKeyword,\n autosuggestProduct,\n SearchForm,\n FormWrapper,\n label,\n isLoadingAutoSuggest,\n isLoadingNode\n } = props;\n\n return (\n \n {label}\n {_renderForm(form as ISearchFormViewProps, SearchForm, FormWrapper)}\n \n {searchText && searchText.length > 0 ? \n {AutoSuggestAriaLabelText}\n : ''}\n {_renderKeywordSuggestions(KeywordSuggest, UlKeyword, autosuggestKeyword, isLoadingAutoSuggest, isLoadingNode)}\n {_renderProductSuggestions(ProductSuggest, UlProduct, autosuggestProduct, isLoadingAutoSuggest, isLoadingNode)}\n {_renderCategorySuggestions(CategorySuggest, UlCategory, autosuggestCategory, isLoadingAutoSuggest, isLoadingNode)}\n \n \n );\n};\n\nconst _renderForm = (form: ISearchFormViewProps, SearchForm: INodeProps, FormWrapper: INodeProps) => {\n return (\n \n \n {form.input}\n {form.cancelBtn}\n {form.submitBtn}\n \n \n );\n};\n\nconst _renderKeywordSuggestions = (\n KeywordSuggest: INodeProps,\n UlKeyword: INodeProps,\n keywordSuggestions?: ISearchKeywordViewProps,\n isLoadingAutoSuggest?: boolean,\n isLoadingNode?: React.ReactNode\n) => {\n return (\n keywordSuggestions && (\n \n \n {isLoadingAutoSuggest && isLoadingNode}\n {!isLoadingAutoSuggest && keywordSuggestions.text.map(text => {\n return text;\n })}\n \n \n )\n );\n};\n\nconst _renderProductSuggestions = (\n ProductSuggest: INodeProps,\n UlProduct: INodeProps,\n productSuggestions?: ISearchProductViewProps,\n isLoadingAutoSuggest?: boolean,\n isLoadingNode?: React.ReactNode\n) => {\n return (\n productSuggestions && (\n \n \n {productSuggestions.title}\n {isLoadingAutoSuggest && isLoadingNode}\n {!isLoadingAutoSuggest && productSuggestions.items.map((item, index) => {\n return (\n \n \n {item.thumbnail}\n {item.text}\n {item.price}\n \n \n );\n })}\n \n \n )\n );\n};\n\nconst _renderCategorySuggestions = (\n CategorySuggest: INodeProps,\n UlCategory: INodeProps,\n categorySuggestions?: ISearchCategoryViewProps,\n isLoadingAutoSuggest?: boolean,\n isLoadingNode?: React.ReactNode\n) => {\n return (\n categorySuggestions && (\n \n \n {categorySuggestions.title}\n {isLoadingAutoSuggest && isLoadingNode}\n {!isLoadingAutoSuggest && categorySuggestions.text.map(text => {\n return text;\n })}\n \n \n )\n );\n};\n\nexport default SearchView;\n","/*--------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * See License.txt in the project root for license information.\n *--------------------------------------------------------------*/\n\nimport { ISearchData, ISearchViewProps } from '@msdyn365-commerce-modules/search';\nimport { Node } from '@msdyn365-commerce-modules/utilities';\nimport React from 'react';\n\nimport { ISearchProps } from '../../definition-extensions/search.ext.props.autogenerated';\n\n/**\n * Render Categories heading.\n * @param inCategoriesHeading - The Keywords result heading.\n * @returns The JSX Element.\n */\nconst renderCategorySuggestionsTitle = (inCategoriesHeading: string): JSX.Element => {\n const categoryAutoSuggestionHeading = inCategoriesHeading ? inCategoriesHeading : 'In categories';\n\n return (\n
    \n {categoryAutoSuggestionHeading}\n
    \n );\n};\n\n/**\n * Render Categories suggestion result.\n * @param inCategoriesHeading - The Categories result heading.\n * @param noResultText - The \"No Result\" text.\n * @param props - The Categories suggestion result.\n * @param isLoadingAutoSuggest - The autosuggestion loading flag.\n * @param isLoadingNode - The autosuggestion loading node.\n * @returns The JSX Element.\n */\nexport const CategorySuggestionsComponent = (\n inCategoriesHeading: string,\n noResultText: string,\n props: ISearchViewProps & ISearchProps,\n isLoadingAutoSuggest?: boolean,\n isLoadingNode?: React.ReactNode\n): JSX.Element => {\n return props.autosuggestCategory ? (\n \n {renderCategorySuggestionsTitle(inCategoriesHeading)}\n \n {isLoadingAutoSuggest && isLoadingNode}\n {!isLoadingAutoSuggest && props.autosuggestCategory.text.map(text => {\n return text;\n })}\n \n \n ) : (\n \n {renderCategorySuggestionsTitle(inCategoriesHeading)}\n \n
  • \n {noResultText}\n
  • \n
    \n
    \n );\n};\n","/*--------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * See License.txt in the project root for license information.\n *--------------------------------------------------------------*/\n\nimport { IImageData, Image } from '@msdyn365-commerce/core';\nimport { ISearchData } from '@msdyn365-commerce-modules/search';\nimport { Node } from '@msdyn365-commerce-modules/utilities';\nimport React from 'react';\n\nimport { ISearchProps } from '../../definition-extensions/search.ext.props.autogenerated';\n\n/**\n * Render Products Suggestion result heading.\n * @param props -The props.\n * @returns The JSX Element.\n */\nconst renderProductNotFoundResultsImage = (props: ISearchProps): JSX.Element | null => {\n const noSearchResultImage: IImageData | undefined = props.config.noSearchResultImage;\n if (!noSearchResultImage || !noSearchResultImage.src) {\n return null;\n }\n const imageSettings = {\n lazyload: true,\n viewports: {\n xs: { w: 100, h: 100, q: 'w=100&h=100&q=60&m=6' }\n }\n };\n return (\n \n );\n};\n\n/**\n * Render Product suggestion result.\n * @param props -The props.\n * @returns The JSX Element.\n */\nexport const MobileAutoSuggestEmptyComponent = (\n props: ISearchProps\n): JSX.Element => {\n return (\n \n
    \n {renderProductNotFoundResultsImage(props)}\n
    \n
    \n
    \n {props.resources.emptyMobileSearchTextHeading}\n
    \n
    \n {props.resources.emptyMobileSearchText}\n
    \n
    \n
    \n );\n};\n","/*--------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * See License.txt in the project root for license information.\n *--------------------------------------------------------------*/\n\nimport { ISearchData, ISearchFormViewProps } from '@msdyn365-commerce-modules/search';\nimport { Button, INodeProps, Node } from '@msdyn365-commerce-modules/utilities';\nimport React from 'react';\n\nimport { ISearchProps } from '../../definition-extensions/search.ext.props.autogenerated';\nimport { MobileAutoSuggestEmptyComponent } from './search.mobile.empty';\n\n/**\n * Render Clear button for mobile viewport.\n * @param clearSearchButtonText -The Clear button text.\n * @param clearSearch -Clear Search callback.\n * @returns -The JSX Element.\n */\nconst renderClearButton = (clearSearchButtonText: string, clearSearch: () => void): JSX.Element => {\n return (\n \n {clearSearchButtonText || 'Clear'}\n \n );\n};\n\n/**\n * Render Search form.\n * @param form -Form view props.\n * @param searchForm -Search Form props.\n * @param formWrapper -Form Wrapper props.\n * @param isMobile -Is mobile viewport flag.\n * @param clearSearchButtonText -The Clear button text.\n * @param props -The props for resource.\n * @param isSearchText -Is SearchText flag for input text.\n * @param clearSearch -Clear Search callback.\n * @returns -The JSX Element.\n */\nexport const FormComponent = (\n form: ISearchFormViewProps,\n searchForm: INodeProps,\n formWrapper: INodeProps,\n isMobile: boolean,\n clearSearchButtonText: string,\n props: ISearchProps,\n isSearchText: boolean,\n clearSearch: () => void): JSX.Element => {\n\n const cancelButtonNode = (\n \n );\n\n return (\n isMobile ? (\n \n {form.cancelBtn}\n \n {form.input}\n {isSearchText && renderClearButton(clearSearchButtonText, clearSearch)}\n {!isSearchText ? MobileAutoSuggestEmptyComponent(props) : null}\n \n \n ) : (\n \n \n {form.submitBtn}\n {form.input}\n {isSearchText && cancelButtonNode}\n \n \n )\n );\n};\n\n","/*--------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * See License.txt in the project root for license information.\n *--------------------------------------------------------------*/\n\nimport { ISearchKeywordViewProps } from '@msdyn365-commerce-modules/search';\nimport { INodeProps, Node } from '@msdyn365-commerce-modules/utilities';\nimport React from 'react';\n\n/**\n * Render keywords heading.\n * @param keywordsHeading -The Keywords result heading.\n * @returns The JSX Element.\n */\nconst renderKeywordSuggestionsTitle = (keywordsHeading: string): JSX.Element => {\n const categoryAutoSuggestionHeading = keywordsHeading ? keywordsHeading : 'Keywords';\n\n return (\n
    \n {categoryAutoSuggestionHeading}\n
    \n );\n};\n\n/**\n * Render keywords reults.\n * @param keywordSuggest -The Keywords suggest Node props.\n * @param ulKeyword -The List Node props.\n * @param keywordsHeading -The Keywords result heading.\n * @param noResultText -The \"No Result\" text.\n * @param keywordSuggestions -The Keywords suggestion result.\n * @param isLoadingAutoSuggest - The autosuggestion loading flag.\n * @param isLoadingNode - The autosuggestion loading node.\n * @returns -The JSX Element.\n */\nexport const KeywordSuggestionsComponent = (\n keywordSuggest: INodeProps,\n ulKeyword: INodeProps,\n keywordsHeading: string,\n noResultText: string,\n keywordSuggestions?: ISearchKeywordViewProps,\n isLoadingAutoSuggest?: boolean,\n isLoadingNode?: React.ReactNode\n): JSX.Element => {\n return (\n keywordSuggestions ? (\n \n {renderKeywordSuggestionsTitle(keywordsHeading)}\n \n {isLoadingAutoSuggest && isLoadingNode}\n {!isLoadingAutoSuggest && keywordSuggestions.text.map(text => {\n return text;\n })}\n \n \n ) : (\n \n {renderKeywordSuggestionsTitle(keywordsHeading)}\n \n
  • \n {noResultText}\n
  • \n
    \n
    \n )\n );\n};\n","/*--------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * See License.txt in the project root for license information.\n *--------------------------------------------------------------*/\n\nimport { IImageData, Image } from '@msdyn365-commerce/core';\nimport { ISearchData, ISearchProductViewProps } from '@msdyn365-commerce-modules/search';\nimport { INodeProps, Node } from '@msdyn365-commerce-modules/utilities';\nimport React from 'react';\n\nimport { ISearchProps } from '../../definition-extensions/search.ext.props.autogenerated';\n\n/**\n * Render Products Suggestion result heading.\n * @param productSuggestionsHeading -The products suggestion result heading.\n * @returns The JSX Element.\n */\nconst renderProductSuggestionsTitle = (productSuggestionsHeading: string): JSX.Element => {\n const productAutoSuggestionHeading = productSuggestionsHeading ? productSuggestionsHeading : 'Products';\n\n return (\n
    \n {productAutoSuggestionHeading}\n
    \n );\n};\n\n/**\n * Render Products Suggestion result heading.\n * @param props -The props.\n * @returns The JSX Element.\n */\nconst renderProductNotFoundResultsImage = (props: ISearchProps): JSX.Element | null => {\n const noSearchResultImage: IImageData | undefined = props.config.noSearchResultImage;\n if (!noSearchResultImage || !noSearchResultImage.src) {\n return null;\n }\n return (\n \n );\n};\n\n/**\n * Render Products No result section.\n * @param props -The props.\n * @returns The JSX Element.\n */\nconst renderProductNotFoundResults = (props: ISearchProps): JSX.Element => {\n return (\n \n
    \n {renderProductNotFoundResultsImage(props)}\n
    \n
    \n {props.resources.noResultContentHeadingText}\n
    \n
    \n {props.resources.noResultContentParagraphText}\n
    \n
    \n );\n};\n\n/**\n * Render Product suggestion result.\n * @param productSuggest -The product suggest Node props.\n * @param ulProduct -The List Node props.\n * @param props -The props.\n * @param productSuggestions -The Product suggestion result.\n * @param isLoadingAutoSuggest - The autosuggestion loading flag.\n * @param isLoadingNode - The autosuggestion loading node.\n * @returns The JSX Element.\n */\nexport const ProductSuggestionsComponent = (\n productSuggest: INodeProps,\n ulProduct: INodeProps,\n props: ISearchProps,\n productSuggestions?: ISearchProductViewProps,\n isLoadingAutoSuggest?: boolean,\n isLoadingNode?: React.ReactNode\n): JSX.Element => {\n const liProduct: INodeProps = {\n tag: 'li',\n className: 'msc-no-result-content'\n };\n return productSuggestions ? (\n \n {renderProductSuggestionsTitle(props.resources.productSuggestionHeading)}\n \n {isLoadingAutoSuggest && isLoadingNode}\n {!isLoadingAutoSuggest && productSuggestions.items.map((item, index) => {\n return (\n \n \n {item.thumbnail}\n {item.text}\n {item.price}\n \n \n );\n })}\n \n \n ) : (\n \n {renderProductSuggestionsTitle(props.resources.productSuggestionHeading)}\n \n \n {renderProductNotFoundResults(props)}\n \n \n \n );\n};\n","/*--------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * See License.txt in the project root for license information.\n *--------------------------------------------------------------*/\n\nimport { StringExtensions } from '@msdyn365-commerce-modules/retail-actions';\nimport { ISearchData, ISearchFormViewProps, ISearchViewProps } from '@msdyn365-commerce-modules/search';\nimport { Button, format, isMobile, Module, Node, VariantType } from '@msdyn365-commerce-modules/utilities';\nimport React, { useCallback, useEffect, useState } from 'react';\n\nimport { ISearchProps } from '../definition-extensions/search.ext.props.autogenerated';\nimport { CategorySuggestionsComponent } from './components/search.categorysuggest';\nimport { FormComponent } from './components/search.form';\nimport { KeywordSuggestionsComponent } from './components/search.keywordsuggest';\nimport { ProductSuggestionsComponent } from './components/search.productsuggest';\n\n/**\n * Render Title for AutoSuggest.\n * @param searchSuggestionHeading -The heading resource string.\n * @param searchText -The search string.\n * @returns -The JSX Element.\n */\nconst renderTitle = (searchSuggestionHeading: string, searchText: string): JSX.Element => {\n const searchTextString = '\"'.concat(searchText.concat('\"'));\n const searchAutoSuggestionHeading = searchSuggestionHeading ? format(searchSuggestionHeading, searchTextString) : `Search for ${searchTextString}`;\n\n return (\n \n {searchAutoSuggestionHeading}\n \n );\n};\n\n/**\n * Search View.\n * @param props - The view props.\n * @returns The JSX Element.\n */\nconst SearchView: React.FC> = (props: ISearchViewProps & ISearchProps): JSX.Element => {\n const {\n Search,\n AutoSuggestAriaLabel,\n AutoSuggestAriaLabelText,\n searchText,\n AutoSuggest,\n KeywordSuggest,\n ProductSuggest,\n UlKeyword,\n UlProduct,\n form,\n autosuggestKeyword,\n autosuggestProduct,\n SearchForm,\n FormWrapper,\n label,\n context,\n isLoadingAutoSuggest,\n isLoadingNode\n } = props;\n\n const { searchSuggestionHeading, categorySuggestionHeading, keywordsHeading, noResultText, clearSearchButtonText } = props.resources;\n\n const [searchTextString, setSearchTextString] = useState();\n const [isMobilePort, setIsMobile] = useState(false);\n\n useEffect(() => {\n setSearchTextString(searchText);\n }, [searchText]);\n\n /**\n * ClearSearch callback method to clear search string.\n */\n const clearSearch = (): void => {\n setSearchTextString('');\n\n const propsForm = props.form as ISearchFormViewProps;\n const propsFormInput = propsForm.input as React.DetailedHTMLProps, HTMLInputElement>;\n const propsFormInputCurrent = (propsFormInput.ref as React.RefObject).current;\n\n if (propsFormInputCurrent) {\n propsFormInputCurrent.value = '';\n }\n\n propsFormInput.value = '';\n props.searchText = '';\n props.FormWrapper.action = '';\n };\n\n const isMobileViewport = useCallback(() => {\n const isMobileView = isMobile({ variant: VariantType.Browser, context: context.request }) === 'xs';\n setIsMobile(isMobileView);\n }, [context]);\n\n useEffect(() => {\n window.addEventListener('resize', isMobileViewport);\n isMobileViewport();\n }, [isMobileViewport]);\n\n const viewport = isMobile({ variant: VariantType.Browser, context: context.request });\n\n const isMobileView = (viewport === 'sm' || viewport === 'xs');\n\n AutoSuggest.className = !StringExtensions.isNullOrEmpty(searchTextString) ? `${AutoSuggest.className} show` : `${AutoSuggest.className} hide`;\n const isSearchText: boolean = !StringExtensions.isNullOrEmpty(searchTextString);\n\n return (\n \n {label}\n {FormComponent(form as ISearchFormViewProps, SearchForm, FormWrapper, isMobilePort, clearSearchButtonText, props, isSearchText, clearSearch)}\n { !isMobileView && \n {!StringExtensions.isNullOrEmpty(searchTextString) ? \n {AutoSuggestAriaLabelText}\n : ''}\n {!StringExtensions.isNullOrEmpty(searchTextString) ? (\n <>\n \n \n {renderTitle(searchSuggestionHeading, searchText)}\n \n \n \n {CategorySuggestionsComponent(categorySuggestionHeading, noResultText,\n props, isLoadingAutoSuggest, isLoadingNode)}\n {KeywordSuggestionsComponent(KeywordSuggest, UlKeyword, keywordsHeading, noResultText, autosuggestKeyword,\n isLoadingAutoSuggest, isLoadingNode)}\n \n {ProductSuggestionsComponent(ProductSuggest, UlProduct, props, autosuggestProduct,\n isLoadingAutoSuggest, isLoadingNode)}\n \n \n ) : null}\n }\n { isMobileView && props.isSearchFormExpanded && \n {!StringExtensions.isNullOrEmpty(searchTextString) ? \n {AutoSuggestAriaLabelText}\n : ''}\n {!StringExtensions.isNullOrEmpty(searchTextString) ? (\n <>\n \n {(form as ISearchFormViewProps).cancelBtn}\n {renderTitle(searchSuggestionHeading, searchText)}\n \n \n \n {CategorySuggestionsComponent(categorySuggestionHeading, noResultText,\n props, isLoadingAutoSuggest, isLoadingNode)}\n {KeywordSuggestionsComponent(KeywordSuggest, UlKeyword, keywordsHeading, noResultText, autosuggestKeyword,\n isLoadingAutoSuggest, isLoadingNode)}\n \n {ProductSuggestionsComponent(ProductSuggest, UlProduct, props, autosuggestProduct,\n isLoadingAutoSuggest, isLoadingNode)}\n \n \n ) : null}\n }\n \n );\n};\nexport default SearchView;\n","module.exports = React;","module.exports = ReactDOM;"],"names":["binding","modules","dataActions","c","require","$type","da","name","path","runOn","iNM","ns","n","p","pdp","md","sanitizedActionPath","dataAction","default","Error","prototype","RegistrationId","id","registerSanitizedActionPath","window","__bindings__","viewDictionary","cn","createSearchStateInput","result","GenericInput","getGenericActionDataAction","createObservableDataAction","action","getGenericAction","input","inputData","searchText","SearchState","__decorate","observable","SuggestionType","AutoSuggestInput","constructor","top","suggestionType","hitPrefix","hitSuffix","getCacheKey","getCacheObjectType","dataCacheType","this","searchQuery","topResultsCount","async","_getAutoSuggest","autosuggest","ctx","catalogId","getCatalogId","requestContext","searchCriteria","ProductSearchCriteria","SearchCondition","length","Context","ChannelId","apiSettings","channelId","CatalogId","HitPrefix","HitSuffix","searchSuggestions","getSearchSuggestionsAsync","callerContext","queryResultSettings","Paging","Top","map","item","ImageUrl","generateImageUrl","AllSearchResults","telemetry","error","autoSuggestPromises","Promise","all","then","payLoad","CategorySuggestionsComponent","props","suggestions","autoSuggestProps","resources","categorySuggestionHeading","reactNodes","getPayloadObject","telemetryContent","push","_assembleNode","title","_renderTitle","text","categoryAutoSuggestionHeading","format","React","className","shouldShowFullPath","splitValue","Value","split","pop","ariaLabel","replace","RegExp","contentAction","etext","attribute","getTelemetryAttributes","key","Id","href","_generateLink","_getHighlightedText","suggestion","_getCategoryLink","searchPageURL","searchQsp","searchRefiners","MsDyn365","queryUrl","URL","location","searchParams","set","categoryRefiners","find","refiners","SourceValue","ProductRefinerSource","refiner","Values","RefinerRecordId","Number","parseInt","encodedRefiner","JSON","stringify","compressRefiners","formattedText","dangerouslySetInnerHTML","getRichTextHtml","compressedRefinerKeys","compressedRefiners","forEach","compressedRefiner","refinerKey","FormComponent","searchPlaceholder","hideSearchLabel","searchTextInput","handleInputChange","maxChars","disableSubmitSearch","handleCancelSearchChange","query","ariaLabelCancel","ariaLabelSearch","ariaLabelSubmit","onInputChange","event","target","value","onInputChangeFunction","inputNode","type","placeholder","ref","onChange","maxLength","submitBtnNode","Button","cancelBtn","onClick","submitBtn","KeywordSuggestionsComponent","formattedLink","LabelComponent","searchLabelClass","searchLabelArialLabel","isSearchFormExpanded","searchtext","searchCollapsedLabel","attributes","innerRef","ProductSuggestionsComponent","context","actionContext","productSuggestionHeading","moduleType","moduleId","items","productAutoSuggestionHeading","altText","price","Value3","DecimalValue","thumbnail","_renderThumbnail","ObjectExtensions","_renderPrice","LiProduct","_getLiWrapper","AProduct","_getAWrapper","tag","recid","cultureFormatter","formatCurrency","getProductPageUrlSync","undefined","adjustedPrice","basePrice","PriceComponent","typeName","data","CustomerContextualPrice","BasePrice","freePriceText","request","gridSettings","config","imageSettings","cropFocalRegion","Image","src","viewports","xs","q","w","h","lg","xl","lazyload","loadFailureBehavior","Search","super","waitTime","_isLoadingNode","loadingText","autoSuggestResultLoadingMessage","Spinner","label","size","SpinnerSize","labelPosition","_focusOutTarget","e","state","closest","_clearAutoSuggestState","_keyup","keyCode","KeyCodes","setState","formReference","current","contains","autoSuggestResultDiv","searchState","defaultBasicSearchUrl","searchQueryStringParameter","update","_handleInputChange","cancellabelDebounce","cancel","ArrayExtensions","inputSuggestionType","_loadSuggestions","_handleSubmit","app","preventDefault","focus","searchURL","_appendQueryParams","getUrlSync","document","_handleCancelSearchChange","isInitialState","route","qsp","_setAutoSuggestResultCount","autoSuggestResultScreenReaderDiv","ariaLiveRegion","suggestResultString","autoSuggestFoundMessage","emptyResultString","noAutoSuggestionMessage","innerText","setAttribute","searchKeywordSuggestClass","searchProductSuggestClass","searchCategorySuggestClass","autoSuggestAriaLabel","isLoadingAutoSuggest","searchInputMaxLength","searchFormClass","getTelemetryObject","telemetryPageName","friendlyName","_initSuggestionTypes","body","addEventListener","componentWillUnmount","removeEventListener","componentDidUpdate","params","isEditor","shouldComponentUpdate","nextProps","nextState","render","cancelBtnAriaLabel","searchBtnAriaLabel","submitBtnAriaLabel","searchplaceholderText","shouldShowFullCategoryPath","keywordSuggestions","filter","Keyword","None","productSuggestions","Product","categorySuggestions","Category","viewProps","moduleProps","classnames","AutoSuggestAriaLabel","AutoSuggestAriaLabelText","AutoSuggest","KeywordSuggest","ProductSuggest","CategorySuggest","SearchForm","FormWrapper","role","autoComplete","onSubmit","UlKeyword","UlProduct","UlCategory","form","autosuggestKeyword","autosuggestProduct","autosuggestCategory","callbacks","isLoadingNode","renderView","suggestionTypes","suggestionTypeCriterion","validSuggestions","loadSuggestionsRequestId","getSearchSuggestionsAction","_getSuggestionType","exception","debug","_getSearchRefiners","Random","_getSearchSuggestions","_updateSearchRefiners","setTimeout","suggestionTypeItem","charAt","toUpperCase","slice","join","ProductsDataActions","_renderForm","Node","_renderKeywordSuggestions","_renderProductSuggestions","index","_renderCategorySuggestions","Module","renderCategorySuggestionsTitle","inCategoriesHeading","noResultText","MobileAutoSuggestEmptyComponent","noSearchResultImage","renderProductNotFoundResultsImage","emptyMobileSearchTextHeading","emptyMobileSearchText","searchForm","formWrapper","isMobile","clearSearchButtonText","isSearchText","clearSearch","cancelButtonNode","renderClearButton","renderKeywordSuggestionsTitle","keywordsHeading","keywordSuggest","ulKeyword","renderProductSuggestionsTitle","productSuggestionsHeading","renderProductNotFoundResults","noResultContentHeadingText","noResultContentParagraphText","productSuggest","ulProduct","renderTitle","searchSuggestionHeading","searchTextString","concat","searchAutoSuggestionHeading","setSearchTextString","useState","isMobilePort","setIsMobile","useEffect","propsFormInput","propsFormInputCurrent","isMobileViewport","useCallback","isMobileView","variant","VariantType","viewport","StringExtensions","module","exports","ReactDOM"],"sourceRoot":""}