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365.Commerce.Online/external var \"ReactDOM\"?853b","webpack://Msdyn365.Commerce.Online/./src/search-state-data-action.ts?8223","webpack://Msdyn365.Commerce.Online/./lib/search/module-registration.js?f197","webpack://Msdyn365.Commerce.Online/./src/search-state.ts?dd10","webpack://Msdyn365.Commerce.Online/./src/modules/search/actions/get-auto-suggest-suggestions.ts?832b","webpack://Msdyn365.Commerce.Online/./src/modules/search/components/search.categorysuggest.tsx?9371","webpack://Msdyn365.Commerce.Online/./src/modules/search/components/search.form.tsx?6310","webpack://Msdyn365.Commerce.Online/./src/modules/search/components/search.keywordsuggest.tsx?20bc","webpack://Msdyn365.Commerce.Online/./src/modules/search/components/search.label.tsx?51d1","webpack://Msdyn365.Commerce.Online/./src/modules/search/components/search.productsuggest.tsx?ebb5","webpack://Msdyn365.Commerce.Online/./src/modules/search/search.tsx?8bdd","webpack://Msdyn365.Commerce.Online/./src/modules/search/search.view.tsx?4430","webpack://Msdyn365.Commerce.Online/./src/themes/adventureworks/views/components/search.mobile.empty.tsx?c0e3","webpack://Msdyn365.Commerce.Online/./src/themes/adventureworks/views/components/search.form.tsx?d152","webpack://Msdyn365.Commerce.Online/./src/themes/adventureworks/views/search.view.tsx?1ed5","webpack://Msdyn365.Commerce.Online/./src/modules/search/search.view.tsx?1505","webpack://Msdyn365.Commerce.Online/./src/modules/adventureworks/views/components/search.categorysuggest.tsx?6bcf","webpack://Msdyn365.Commerce.Online/./src/modules/adventureworks/views/components/search.mobile.empty.tsx?ff32","webpack://Msdyn365.Commerce.Online/./src/modules/adventureworks/views/components/search.form.tsx?d41a","webpack://Msdyn365.Commerce.Online/./src/modules/adventureworks/views/components/search.keywordsuggest.tsx?2724","webpack://Msdyn365.Commerce.Online/./src/modules/adventureworks/views/components/search.productsuggest.tsx?6616","webpack://Msdyn365.Commerce.Online/./src/modules/adventureworks/views/search.view.tsx?bfa7"],"sourcesContent":["module.exports = React;","module.exports = ReactDOM;","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE 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","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('partner/modules/search/search.tsx'),\n $type: 'contentModule',\n da: [{name:'searchState', path:'@msdyn365-commerce-modules/search-utilities/dist/lib/search-state-data-action', runOn: 1}],\n \n iNM: false,\n ns: '__local__',\n n: 'search',\n p: '__local__',\n \n pdp: '',\n \n \n md: 'src/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['__local__|__local__|modules|search|search'] = {\n c: () => require('partner/modules/search/search.view.tsx'),\n cn: '__local__-__local__-search'\n };\nviewDictionary['__local__|__local__|themes|adventureworks|views|search'] = {\n c: () => require('partner/themes/adventureworks/views/search.view.tsx'),\n cn: '__local__-__local__-search'\n };\nviewDictionary['@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.\n * All rights reserved. See LICENSE 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\n/* eslint-disable no-duplicate-imports */\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\n/* eslint-disable no-duplicate-imports */\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\n/* eslint-disable no-duplicate-imports */\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 * 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 return { cancelBtn: cancelBtNoden, submitBtn: submitBtnNode,input: inputNode };\n};\n","/*--------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * See License.txt in the project root for license information.\n *--------------------------------------------------------------*/\n\n/* eslint-disable no-duplicate-imports */\nimport MsDyn365, { getRichTextHtml } from '@msdyn365-commerce/core';\nimport { SearchSuggestion } from '@msdyn365-commerce/retail-proxy';\nimport { 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 ISearchKeywordSuggestProps {\n searchKeywordSuggestClass: 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 telemetryContent?: ITelemetryContent;\n}\n\nexport interface ISearchKeywordViewProps {\n text: React.ReactNode[];\n}\n\nlet payLoad: IPayLoad;\n\n/**\n * KeywordSuggestionsComponent.\n * @param props\n */\nexport const KeywordSuggestionsComponent = (props: ISearchKeywordSuggestProps): ISearchKeywordViewProps | undefined => {\n const {\n suggestions,\n hitPrefix,\n hitSuffix\n } = props;\n\n payLoad = getPayloadObject('click', props.telemetryContent!, '');\n\n const reactNodes: React.ReactNode[] = [];\n\n suggestions?.map(item => {\n reactNodes.push(_assembleNode(item, hitPrefix, hitSuffix, props));\n });\n\n return { text: reactNodes };\n};\n\nconst _assembleNode = (item: SearchSuggestion, hitPrefix: string, hitSuffix: string, props: ISearchKeywordSuggestProps) => {\n const ariaLabel = item.Value &&\n (item.Value).replace(new RegExp(`[${hitPrefix}]`, 'gi'), '').replace(new RegExp(`[${hitSuffix}]`, 'gi'), '');\n payLoad.contentAction.etext = ariaLabel;\n const attribute = getTelemetryAttributes(props.telemetryContent!, payLoad);\n return (\n
  • \n \n {_generateLink(item, hitPrefix, hitSuffix, props) &&\n _getHighlightedText(item.Value ? item.Value : '', hitPrefix, hitSuffix)}\n \n
  • \n );\n};\n\nconst _generateLink = (suggestion: SearchSuggestion, hitPrefix: string, hitSuffix: string, props: ISearchKeywordSuggestProps): string => {\n const { searchPageURL, searchQsp } = props;\n\n const formattedLink = (suggestion.Value as string)\n .replace(new RegExp(`[${hitPrefix}]`, 'gi'), '')\n .replace(new RegExp(`[${hitSuffix}]`, 'gi'), '');\n\n if (!MsDyn365.isBrowser) {\n return '';\n }\n\n const queryUrl = new URL(searchPageURL, window.location.href);\n if (searchQsp && formattedLink) {\n queryUrl.searchParams.set(searchQsp, formattedLink);\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 * Copyright (c) Microsoft Corporation. All rights reserved.\n * See License.txt in the project root for license information.\n *--------------------------------------------------------------*/\n\n/* eslint-disable no-duplicate-imports */\nimport { Button, getPayloadObject, getTelemetryAttributes, ITelemetryContent } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nexport interface ISearchLabelProps {\n isSearchFormExpanded: boolean;\n searchLabelClass: string;\n searchLabelArialLabel: string;\n searchtext: string;\n searchCollapsedLabel: React.RefObject;\n hideSearchLabel?: boolean;\n telemetryContent: ITelemetryContent;\n handleCancelSearchChange(): void;\n}\n\nexport const LabelComponent = (props: ISearchLabelProps) => {\n const { searchLabelClass, searchLabelArialLabel, isSearchFormExpanded, searchtext, searchCollapsedLabel, hideSearchLabel, handleCancelSearchChange, telemetryContent } = props;\n const payLoad = getPayloadObject('click', telemetryContent, searchtext, '');\n const attributes = getTelemetryAttributes(telemetryContent, payLoad);\n\n return (\n
    \n \n {!hideSearchLabel && \n {searchtext}\n }\n \n
    \n );\n};\n","/*--------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * See License.txt in the project root for license information.\n *--------------------------------------------------------------*/\n\n/* eslint-disable no-duplicate-imports */\nimport { 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 isAuthenticated: boolean;\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 const {isAuthenticated} = props;\n const price = item.Value3?.Value?.DecimalValue;\n return {\n text: _getHighlightedText(item.Value ? item.Value2 ? `${item.Value2.Value?.StringValue }: ${ item.Value}` : item.Value : '', hitPrefix, hitSuffix),\n thumbnail: _renderThumbnail(item, altText ? altText : '', props),\n price: isAuthenticated && !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\n/* eslint-disable no-duplicate-imports */\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 } 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 } 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 inputSuggestionType?: ISuggestionTypeCriterionData[];\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 // @ts-expect-error\n private cancellabelDebounce: debounce;\n\n 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 this.inputSuggestionType = this.props.config && this.props.config.suggestionTypeCriterion;\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\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 context: {\n request: {\n user: {\n isAuthenticated\n }\n }\n }\n\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 isAuthenticated: isAuthenticated\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 /**\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 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 telemetry,\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 this.cancellabelDebounce = debounce(() => {\n this.setState({ isLoadingAutoSuggest: true });\n getSearchSuggestionsAction(\n new AutoSuggestInput(\n query,\n this.topResultsCount,\n this._getSuggestionType(this.inputSuggestionType),\n this.hitPrefix,\n this.hitSuffix\n ),\n context.actionContext\n )\n .then(results => {\n this._getSearchRefiners(query)\n .then(refiners => {\n this.setState({ suggestions: results, searchRefiners: refiners,\n autoSuggestAriaLabel: this._setAutoSuggestResultCount(results), isLoadingAutoSuggest: false });\n })\n .catch(error => {\n this.setState({ suggestions: results, searchRefiners: undefined,\n autoSuggestAriaLabel: this._setAutoSuggestResultCount(results) });\n telemetry.exception(error);\n telemetry.debug('Unable to get refiners results');\n });\n })\n .catch(error => {\n this.setState({ suggestions: undefined, searchRefiners: undefined,\n autoSuggestAriaLabel: this._setAutoSuggestResultCount() });\n telemetry.exception(error);\n telemetry.debug('Unable to get auto suggest results');\n });\n }, this.waitTime);\n\n setTimeout(() => {\n this.cancellabelDebounce();\n }, 0);\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 readonly _getSuggestionType = (suggestionTypes?: ISuggestionTypeCriterionData[]): string => {\n if (suggestionTypes && suggestionTypes.length > 0) {\n const distinctSuggestionTypes: string[] = [];\n suggestionTypes && suggestionTypes.forEach((suggestionTypeItem, index) => {\n suggestionTypeItem.SuggestionType && distinctSuggestionTypes.push(suggestionTypeItem.SuggestionType.charAt(0).toUpperCase() + suggestionTypeItem.SuggestionType.slice(1));\n });\n return distinctSuggestionTypes.join(',');\n }\n return 'Keyword, Product, ScopedCategory';\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\n/* eslint-disable no-duplicate-imports */\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","/*--------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * See License.txt in the project root for license information.\r\n *--------------------------------------------------------------*/\r\n\r\nimport { IImageData, Image } from '@msdyn365-commerce/core';\r\nimport { ISearchData } from '@msdyn365-commerce-modules/search';\r\nimport { Node } from '@msdyn365-commerce-modules/utilities';\r\nimport React from 'react';\r\n\r\nimport { ISearchProps } from '../../definition-extensions/search.ext.props.autogenerated';\r\n\r\n/**\r\n * Render Products Suggestion result heading.\r\n * @param props -The props.\r\n * @returns The JSX Element.\r\n */\r\nconst renderProductNotFoundResultsImage = (props: ISearchProps): JSX.Element | null => {\r\n const noSearchResultImage: IImageData | undefined = props.config.noSearchResultImage;\r\n if (!noSearchResultImage || !noSearchResultImage.src) {\r\n return null;\r\n }\r\n const imageSettings = {\r\n lazyload: true,\r\n viewports: {\r\n xs: { w: 100, h: 100, q: 'w=100&h=100&q=60&m=6' }\r\n }\r\n };\r\n return (\r\n \r\n );\r\n};\r\n\r\n/**\r\n * Render Product suggestion result.\r\n * @param props -The props.\r\n * @returns The JSX Element.\r\n */\r\nexport const MobileAutoSuggestEmptyComponent = (\r\n props: ISearchProps\r\n): JSX.Element => {\r\n return (\r\n \r\n
    \r\n {renderProductNotFoundResultsImage(props)}\r\n
    \r\n
    \r\n
    \r\n {props.resources.emptyMobileSearchTextHeading}\r\n
    \r\n
    \r\n {props.resources.emptyMobileSearchText}\r\n
    \r\n
    \r\n
    \r\n );\r\n};\r\n","/*--------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * See License.txt in the project root for license information.\r\n *--------------------------------------------------------------*/\r\n\r\nimport { ISearchData } from '@msdyn365-commerce-modules/search';\r\nimport { Button, INodeProps, Node } from '@msdyn365-commerce-modules/utilities';\r\nimport React from 'react';\r\nimport { ISearchFormViewProps } from '../../../../modules/search/components/search.form';\r\nimport { ISearchProps } from '../../definition-extensions/search.ext.props.autogenerated';\r\nimport { MobileAutoSuggestEmptyComponent } from './search.mobile.empty';\r\n\r\n/**\r\n * Render Clear button for mobile viewport.\r\n * @param clearSearchButtonText -The Clear button text.\r\n * @param clearSearch -Clear Search callback.\r\n * @returns -The JSX Element.\r\n */\r\nconst renderClearButton = (clearSearchButtonText: string, clearSearch: () => void): JSX.Element => {\r\n return (\r\n \r\n {clearSearchButtonText || 'Clear'}\r\n \r\n );\r\n};\r\n\r\n/**\r\n * Render Search form.\r\n * @param form -Form view props.\r\n * @param searchForm -Search Form props.\r\n * @param formWrapper -Form Wrapper props.\r\n * @param isMobile -Is mobile viewport flag.\r\n * @param clearSearchButtonText -The Clear button text.\r\n * @param props -The props for resource.\r\n * @param isSearchText -Is SearchText flag for input text.\r\n * @param clearSearch -Clear Search callback.\r\n * @returns -The JSX Element.\r\n */\r\nexport const FormComponent = (\r\n form: ISearchFormViewProps,\r\n searchForm: INodeProps,\r\n formWrapper: INodeProps,\r\n isMobile: boolean,\r\n clearSearchButtonText: string,\r\n props: ISearchProps,\r\n isSearchText: boolean,\r\n clearSearch: () => void): JSX.Element => {\r\n\r\n const cancelButtonNode = (\r\n \r\n );\r\n\r\n return (\r\n isMobile ? (\r\n \r\n {form.cancelBtn}\r\n \r\n {form.input}\r\n {isSearchText && renderClearButton(clearSearchButtonText, clearSearch)}\r\n {!isSearchText ? MobileAutoSuggestEmptyComponent(props) : null}\r\n \r\n \r\n ) : (\r\n \r\n \r\n {form.submitBtn}\r\n {form.input}\r\n {isSearchText && cancelButtonNode}\r\n \r\n \r\n )\r\n );\r\n};\r\n\r\n","/*--------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * See License.txt in the project root for license information.\r\n *--------------------------------------------------------------*/\r\n\r\nimport { StringExtensions } from '@msdyn365-commerce-modules/retail-actions';\r\nimport { ISearchData, ISearchViewProps } from '@msdyn365-commerce-modules/search';\r\nimport { //Button,\r\n //format,\r\n isMobile, Module,\r\n //Node,\r\n VariantType } from '@msdyn365-commerce-modules/utilities';\r\nimport React, { useCallback, useEffect, useState } from 'react';\r\n\r\nimport { ISearchProps } from '../definition-extensions/search.ext.props.autogenerated';\r\n// import { CategorySuggestionsComponent } from './components/search.categorysuggest';\r\nimport { FormComponent } from './components/search.form';\r\n// import { KeywordSuggestionsComponent } from './components/search.keywordsuggest';\r\n// import { ProductSuggestionsComponent } from './components/search.productsuggest';\r\nimport { ISearchFormViewProps } from '../../../modules/search/components/search.form';\r\n/**\r\n * Render Title for AutoSuggest.\r\n * @param searchSuggestionHeading -The heading resource string.\r\n * @param searchText -The search string.\r\n * @returns -The JSX Element.\r\n */\r\n// const renderTitle = (searchSuggestionHeading: string, searchText: string): JSX.Element => {\r\n// const searchTextString = '\"'.concat(searchText.concat('\"'));\r\n// const searchAutoSuggestionHeading = searchSuggestionHeading ? format(searchSuggestionHeading, searchTextString) : `Search for ${searchTextString}`;\r\n\r\n// return (\r\n// \r\n// {searchAutoSuggestionHeading}\r\n// \r\n// );\r\n// };\r\n\r\n/**\r\n * Search View.\r\n * @param props - The view props.\r\n * @returns The JSX Element.\r\n */\r\nconst SearchView: React.FC> = (props: ISearchViewProps & ISearchProps): JSX.Element => {\r\n const {\r\n Search,\r\n // AutoSuggestAriaLabel,\r\n // AutoSuggestAriaLabelText,\r\n searchText,\r\n AutoSuggest,\r\n // KeywordSuggest,\r\n // ProductSuggest,\r\n // UlKeyword,\r\n // UlProduct,\r\n form,\r\n // autosuggestKeyword,\r\n // autosuggestProduct,\r\n SearchForm,\r\n FormWrapper,\r\n label,\r\n context,\r\n // isLoadingAutoSuggest,\r\n // isLoadingNode\r\n } = props;\r\n\r\n const { //searchSuggestionHeading, categorySuggestionHeading, keywordsHeading, noResultText, \r\n clearSearchButtonText } = props.resources;\r\n\r\n const [searchTextString, setSearchTextString] = useState();\r\n const [isMobilePort, setIsMobile] = useState(false);\r\n\r\n useEffect(() => {\r\n setSearchTextString(searchText);\r\n }, [searchText]);\r\n\r\n /**\r\n * ClearSearch callback method to clear search string.\r\n */\r\n const clearSearch = (): void => {\r\n setSearchTextString('');\r\n\r\n const propsForm = props.form as ISearchFormViewProps;\r\n const propsFormInput = propsForm.input as React.DetailedHTMLProps, HTMLInputElement>;\r\n const propsFormInputCurrent = (propsFormInput.ref as React.RefObject).current;\r\n\r\n if (propsFormInputCurrent) {\r\n propsFormInputCurrent.value = '';\r\n }\r\n\r\n propsFormInput.value = '';\r\n props.searchText = '';\r\n props.FormWrapper.action = '';\r\n };\r\n\r\n const isMobileViewport = useCallback(() => {\r\n const isMobileView = isMobile({ variant: VariantType.Browser, context: context.request }) === 'xs';\r\n setIsMobile(isMobileView);\r\n }, [context]);\r\n\r\n useEffect(() => {\r\n window.addEventListener('resize', isMobileViewport);\r\n isMobileViewport();\r\n }, [isMobileViewport]);\r\n\r\n // const viewport = isMobile({ variant: VariantType.Browser, context: context.request });\r\n\r\n // const isMobileView = (viewport === 'sm' || viewport === 'xs');\r\n\r\n AutoSuggest.className = !StringExtensions.isNullOrEmpty(searchTextString) ? `${AutoSuggest.className} show` : `${AutoSuggest.className} hide`;\r\n const isSearchText: boolean = !StringExtensions.isNullOrEmpty(searchTextString);\r\n\r\n return (\r\n \r\n {label}\r\n {FormComponent(form as ISearchFormViewProps, SearchForm, FormWrapper, isMobilePort, clearSearchButtonText, props, isSearchText, clearSearch)}\r\n {/* { !isMobileView && \r\n {!StringExtensions.isNullOrEmpty(searchTextString) ? \r\n {AutoSuggestAriaLabelText}\r\n : ''}\r\n {!StringExtensions.isNullOrEmpty(searchTextString) ? (\r\n <>\r\n \r\n \r\n {renderTitle(searchSuggestionHeading, searchText)}\r\n \r\n \r\n \r\n {CategorySuggestionsComponent(format(categorySuggestionHeading,searchText), noResultText,\r\n props, isLoadingAutoSuggest, isLoadingNode)}\r\n {KeywordSuggestionsComponent(KeywordSuggest, UlKeyword, keywordsHeading, noResultText, autosuggestKeyword,\r\n isLoadingAutoSuggest, isLoadingNode)}\r\n \r\n {ProductSuggestionsComponent(ProductSuggest, UlProduct, props, autosuggestProduct,\r\n isLoadingAutoSuggest, isLoadingNode)}\r\n \r\n \r\n ) : null}\r\n }\r\n { isMobileView && props.isSearchFormExpanded && \r\n {!StringExtensions.isNullOrEmpty(searchTextString) ? \r\n {AutoSuggestAriaLabelText}\r\n : ''}\r\n {!StringExtensions.isNullOrEmpty(searchTextString) ? (\r\n <>\r\n \r\n {(form as ISearchFormViewProps).cancelBtn}\r\n {renderTitle(searchSuggestionHeading, searchText)}\r\n \r\n \r\n \r\n {CategorySuggestionsComponent(format(categorySuggestionHeading,searchText), noResultText,\r\n props, isLoadingAutoSuggest, isLoadingNode)}\r\n {KeywordSuggestionsComponent(KeywordSuggest, UlKeyword, keywordsHeading, noResultText, autosuggestKeyword,\r\n isLoadingAutoSuggest, isLoadingNode)}\r\n \r\n {ProductSuggestionsComponent(ProductSuggest, UlProduct, props, autosuggestProduct,\r\n isLoadingAutoSuggest, isLoadingNode)}\r\n \r\n \r\n ) : null}\r\n } */}\r\n \r\n );\r\n};\r\nexport default SearchView;\r\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE 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 ? {AutoSuggestAriaLabelText} : ''}\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 &&\n 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 &&\n 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 &&\n categorySuggestions.text.map(text => {\n return text;\n })}\n \n \n )\n );\n};\n\nexport default SearchView;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE 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
    {categoryAutoSuggestionHeading}
    ;\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 &&\n props.autosuggestCategory.text.map(text => {\n return text;\n })}\n \n \n ) : (\n \n {renderCategorySuggestionsTitle(inCategoriesHeading)}\n \n
  • {noResultText}
  • \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 { 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 = (props: ISearchProps): JSX.Element => {\n return (\n \n
    {renderProductNotFoundResultsImage(props)}
    \n
    \n
    {props.resources.emptyMobileSearchTextHeading}
    \n
    {props.resources.emptyMobileSearchText}
    \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 { 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 );\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\n): JSX.Element => {\n const cancelButtonNode = (\n \n );\n\n return 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 * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE 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
    {categoryAutoSuggestionHeading}
    ;\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 keywordSuggestions ? (\n \n {renderKeywordSuggestionsTitle(keywordsHeading)}\n \n {isLoadingAutoSuggest && isLoadingNode}\n {!isLoadingAutoSuggest &&\n keywordSuggestions.text.map(text => {\n return text;\n })}\n \n \n ) : (\n \n {renderKeywordSuggestionsTitle(keywordsHeading)}\n \n
  • {noResultText}
  • \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 { 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
    {productAutoSuggestionHeading}
    ;\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
    {renderProductNotFoundResultsImage(props)}
    \n
    {props.resources.noResultContentHeadingText}
    \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 &&\n 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 {renderProductNotFoundResults(props)}\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 { 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\n ? format(searchSuggestionHeading, searchTextString)\n : `Search for ${searchTextString}`;\n\n return {searchAutoSuggestionHeading};\n};\n\n/**\n * Search View.\n * @param props - The view props.\n * @returns The JSX Element.\n */\nconst SearchView: React.FC> = (\n props: ISearchViewProps & ISearchProps\n): 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 callbacks: { handleCancelSearchFocused }\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)\n ? `${AutoSuggest.className} show`\n : `${AutoSuggest.className} hide`;\n const isSearchText: boolean = !StringExtensions.isNullOrEmpty(searchTextString);\n\n return (\n \n {label}\n {FormComponent(\n form as ISearchFormViewProps,\n SearchForm,\n FormWrapper,\n isMobilePort,\n clearSearchButtonText,\n props,\n isSearchText,\n clearSearch\n )}\n {!isMobileView && (\n \n {!StringExtensions.isNullOrEmpty(searchTextString) ? (\n {AutoSuggestAriaLabelText}\n ) : (\n ''\n )}\n {!StringExtensions.isNullOrEmpty(searchTextString) ? (\n <>\n \n \n {renderTitle(searchSuggestionHeading, searchText)}\n \n \n \n {CategorySuggestionsComponent(\n categorySuggestionHeading,\n noResultText,\n props,\n isLoadingAutoSuggest,\n isLoadingNode\n )}\n {KeywordSuggestionsComponent(\n KeywordSuggest,\n UlKeyword,\n keywordsHeading,\n noResultText,\n autosuggestKeyword,\n isLoadingAutoSuggest,\n isLoadingNode\n )}\n \n {ProductSuggestionsComponent(\n ProductSuggest,\n UlProduct,\n props,\n autosuggestProduct,\n isLoadingAutoSuggest,\n isLoadingNode\n )}\n \n \n ) : null}\n \n )}\n {isMobileView && props.isSearchFormExpanded && (\n \n {!StringExtensions.isNullOrEmpty(searchTextString) ? (\n {AutoSuggestAriaLabelText}\n ) : (\n ''\n )}\n {!StringExtensions.isNullOrEmpty(searchTextString) ? (\n <>\n \n {(form as ISearchFormViewProps).cancelBtn}\n {renderTitle(searchSuggestionHeading, searchText)}\n \n \n \n {CategorySuggestionsComponent(\n categorySuggestionHeading,\n noResultText,\n props,\n isLoadingAutoSuggest,\n isLoadingNode\n )}\n {KeywordSuggestionsComponent(\n KeywordSuggest,\n UlKeyword,\n keywordsHeading,\n noResultText,\n autosuggestKeyword,\n isLoadingAutoSuggest,\n isLoadingNode\n )}\n \n {ProductSuggestionsComponent(\n ProductSuggest,\n UlProduct,\n props,\n autosuggestProduct,\n isLoadingAutoSuggest,\n isLoadingNode\n )}\n \n \n ) : null}\n \n )}\n \n );\n};\nexport default SearchView;\n"],"names":["module","exports","React","ReactDOM","createSearchStateInput","result","GenericInput","getGenericActionDataAction","createObservableDataAction","action","getGenericAction","input","inputData","searchText","binding","modules","dataActions","c","require","$type","da","name","path","runOn","iNM","ns","n","p","pdp","md","registerSanitizedActionPath","sanitizedActionPath","dataAction","default","Error","prototype","RegistrationId","id","window","__bindings__","_objectSpread","viewDictionary","cn","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","className","shouldShowFullPath","splitValue","Value","split","pop","ariaLabel","replace","RegExp","contentAction","etext","attribute","getTelemetryAttributes","key","Id","Object","assign","href","_generateLink","_getHighlightedText","suggestion","_getCategoryLink","_categoryRefiners$Val","searchPageURL","searchQsp","searchRefiners","MsDyn365","isBrowser","queryUrl","URL","location","searchParams","set","categoryRefiners","find","refiners","SourceValue","ProductRefinerSource","Category","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","_item$Value","_item$Value2$Value","altText","isAuthenticated","price","Value3","DecimalValue","Value2","StringValue","thumbnail","_renderThumbnail","ObjectExtensions","isNullOrUndefined","_renderPrice","LiProduct","_getLiWrapper","AProduct","_getAWrapper","tag","recid","cultureFormatter","formatCurrency","getProductPageUrlSync","undefined","adjustedPrice","basePrice","_props$resources","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","medium","labelPosition","_focusOutTarget","e","state","closest","_clearAutoSuggestState","_keyup","keyCode","KeyCodes","Escape","setState","formReference","current","contains","autoSuggestResultDiv","searchState","defaultBasicSearchUrl","searchQueryStringParameter","update","_handleInputChange","cancellabelDebounce","cancel","_debounce","isLoadingAutoSuggest","getSearchSuggestionsAction","_getSuggestionType","inputSuggestionType","results","_getSearchRefiners","autoSuggestAriaLabel","_setAutoSuggestResultCount","catch","exception","debug","setTimeout","suggestionTypes","distinctSuggestionTypes","suggestionTypeItem","index","charAt","toUpperCase","slice","join","_handleSubmit","app","preventDefault","focus","searchURL","_appendQueryParams","getUrlSync","document","_handleCancelSearchChange","isInitialState","route","qsp","autoSuggestResultScreenReaderDiv","ariaLiveRegion","suggestResultString","autoSuggestFoundMessage","emptyResultString","noAutoSuggestionMessage","innerText","setAttribute","searchKeywordSuggestClass","searchProductSuggestClass","searchCategorySuggestClass","searchInputMaxLength","suggestionTypeCriterion","searchFormClass","getTelemetryObject","telemetryPageName","friendlyName","body","addEventListener","componentWillUnmount","removeEventListener","componentDidUpdate","params","isEditor","shouldComponentUpdate","nextProps","nextState","render","_suggestions$AllSearc","_suggestions$AllSearc2","_suggestions$AllSearc3","cancelBtnAriaLabel","searchBtnAriaLabel","submitBtnAriaLabel","searchplaceholderText","shouldShowFullCategoryPath","user","keywordSuggestions","filter","Keyword","None","productSuggestions","Product","categorySuggestions","_item$RefinerRecordId","viewProps","moduleProps","classnames","AutoSuggestAriaLabel","AutoSuggestAriaLabelText","AutoSuggest","KeywordSuggest","ProductSuggest","CategorySuggest","SearchForm","FormWrapper","role","autoComplete","onSubmit","UlKeyword","UlProduct","UlCategory","form","autosuggestKeyword","ArrayExtensions","hasElements","autosuggestProduct","autosuggestCategory","callbacks","isLoadingNode","renderView","ProductsDataActions","_renderForm","Node","_renderKeywordSuggestions","_renderProductSuggestions","_renderCategorySuggestions","Module","MobileAutoSuggestEmptyComponent","noSearchResultImage","renderProductNotFoundResultsImage","emptyMobileSearchTextHeading","emptyMobileSearchText","searchForm","formWrapper","isMobile","clearSearchButtonText","isSearchText","clearSearch","cancelButtonNode","renderClearButton","searchTextString","setSearchTextString","useState","isMobilePort","setIsMobile","useEffect","isMobileViewport","useCallback","isMobileView","variant","VariantType","Browser","StringExtensions","isNullOrEmpty","propsFormInput","propsFormInputCurrent","renderCategorySuggestionsTitle","inCategoriesHeading","noResultText","renderKeywordSuggestionsTitle","keywordsHeading","keywordSuggest","ulKeyword","renderProductSuggestionsTitle","productSuggestionsHeading","renderProductNotFoundResults","noResultContentHeadingText","noResultContentParagraphText","productSuggest","ulProduct","_item$id","renderTitle","searchSuggestionHeading","concat","searchAutoSuggestionHeading","handleCancelSearchFocused","viewport","onBlur"],"sourceRoot":""}