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J,EAAuBoD,GACnC,OAAO,IAAIuG,EAAAA,aAA0B,cAAevG,EAAQ,eAGhE,MAIawG,GAA6Bna,EAAAA,EAAAA,IAA2B,CACjEE,OAA8Bka,EAAAA,iBAC9Bha,MANoCqE,GAC7B8L,EAAuB,CAAErP,WAAY,OAQhD,K,MCvBAmZ,EAAOC,QAAU1U,O,OCAjByU,EAAOC,QAAUC,W","sources":["webpack://mattressfirm/./src/modules/mfrm-search/actions/get-full-products-by-search.ts?40b0","webpack://mattressfirm/./src/modules/mfrm-search/actions/get-auto-suggest-suggestions.ts?6a0a","webpack://mattressfirm/./src/modules/mfrm-search/components/mfrm-search.keywordsuggest.tsx?d1cc","webpack://mattressfirm/./src/modules/mfrm-search/components/mfrm-search.productsuggest.tsx?fe87","webpack://mattressfirm/./src/modules/mfrm-search/components/mfrm-search.categorysuggest.tsx?964c","webpack://mattressfirm/./src/modules/mfrm-search/components/mfrm-search.form.tsx?5563","webpack://mattressfirm/./src/modules/mfrm-search/components/mfrm-search.label.tsx?8dd4","webpack://mattressfirm/./src/modules/mfrm-search/mfrm-search.tsx?810c","webpack://mattressfirm/./src/modules/mfrm-search/mfrm-search.view.tsx?7448","webpack://mattressfirm/./lib/mfrm-search/module-registration.js?669f","webpack://mattressfirm/./src/search-state.ts?dd10","webpack://mattressfirm/./src/search-state-data-action.ts?8223","webpack://mattressfirm/external var \"React\"?0d3b","webpack://mattressfirm/external var \"ReactDOM\"?853b"],"sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n/* tslint:disable: no-duplicate-imports */\r\nimport * as Msdyn365 from '@msdyn365-commerce/core';\r\nimport { generateProductImageUrl } from '@msdyn365-commerce-modules/retail-actions';\r\nimport {\r\n createObservableDataAction,\r\n IAction,\r\n IActionContext,\r\n IActionInput,\r\n ICreateActionContext\r\n} from '@msdyn365-commerce/core';\r\nimport { ProductSearchCriteria, ProductSearchResult } from '@msdyn365-commerce/retail-proxy';\r\nimport { searchByCriteriaAsync } from '@msdyn365-commerce/retail-proxy/dist/DataActions/ProductsDataActions.g';\r\nimport {\r\n BaseCollectionInput,\r\n createBaseCollectionInput\r\n} from '../../mfrm-search-result-container/actions/base-collection-action';\r\nimport { IFullProductsSearchResultsWithCount } from './IFullProductsSearchResultsWithCount';\r\n\r\n/**\r\n * GetFullProductsByCollection Action Input\r\n */\r\nexport class GetFullProductsBySearchInput extends BaseCollectionInput implements IActionInput {\r\n public getCacheObjectType = () => 'FullProductSearchResultBySearch';\r\n public dataCacheType = (): Msdyn365.CacheType => 'application';\r\n}\r\n\r\n/**\r\n * createInput function which creates and actionInput used to fetch products for a list page.\r\n */\r\nconst createInput = (args: ICreateActionContext<{ itemsPerPage: number; includedAttributes: boolean | undefined }>): IActionInput => {\r\n const input = createBaseCollectionInput(args, GetFullProductsBySearchInput);\r\n\r\n // Set Top\r\n if (input.queryResultSettings.Paging && args.config) {\r\n input.queryResultSettings.Paging.Top = args.config.itemsPerPage || 1;\r\n }\r\n\r\n // Set Skip\r\n if (input.queryResultSettings.Paging && args.requestContext.query && args.requestContext.query.skip) {\r\n input.queryResultSettings.Paging.Skip = +args.requestContext.query.skip;\r\n }\r\n\r\n input.queryResultSettings.count = true;\r\n\r\n return input;\r\n};\r\n\r\n/**\r\n * Action function to fetch products for a list page\r\n */\r\n// tslint:disable-next-line: max-func-body-length cyclomatic-complexity\r\nasync function action(\r\n input: GetFullProductsBySearchInput,\r\n ctx: IActionContext\r\n): Promise {\r\n // let promise: AsyncResult;\r\n // let searchProductId;\r\n const searchCriteriaInput: ProductSearchCriteria = {};\r\n searchCriteriaInput.Context = { ChannelId: ctx.requestContext.apiSettings.channelId, CatalogId: ctx.requestContext.apiSettings.catalogId };\r\n searchCriteriaInput.Refinement = [];\r\n searchCriteriaInput.IncludeAttributes = false;\r\n searchCriteriaInput.SkipVariantExpansion = true;\r\n\r\n searchCriteriaInput.SearchCondition = input.searchText;\r\n const promise = searchByCriteriaAsync(\r\n {\r\n callerContext: ctx,\r\n queryResultSettings: input.queryResultSettings\r\n },\r\n searchCriteriaInput\r\n );\r\n\r\n const productSearchResults : ProductSearchResult[] = await promise;\r\n\r\n const mappedProducts = productSearchResults.map(productSearchResult => {\r\n const newImageUrl = generateProductImageUrl(\r\n productSearchResult,\r\n ctx.requestContext.apiSettings\r\n );\r\n\r\n if (newImageUrl) {\r\n productSearchResult.PrimaryImageUrl = newImageUrl;\r\n }\r\n\r\n return (productSearchResult);\r\n });\r\n\r\n\r\n return {\r\n products: mappedProducts,\r\n count: promise.metadata.count || 0,\r\n // VSI Customization 7294 Start\r\n virtualRefiners: searchCriteriaInput.Refinement,\r\n minusVirtualRefiner: input.refiners\r\n // VSI Customization 7294 End\r\n };\r\n}\r\n\r\nexport default createObservableDataAction({\r\n id: '@msdyn365-commerce-modules/search/get-full-products-by-search',\r\n action: >action,\r\n input: createInput\r\n});\r\n","import { generateImageUrl } from '@msdyn365-commerce-modules/retail-actions';\r\nimport { Autosuggestions } from '@msdyn365-commerce/commerce-entities';\r\nimport {\r\n CacheType, createObservableDataAction, IAction, IActionContext, IActionInput,\r\n ICreateActionContext\r\n} from '@msdyn365-commerce/core';\r\nimport { SearchSuggestion, SearchSuggestionCriteria } from '@msdyn365-commerce/retail-proxy';\r\nimport {\r\n getSearchSuggestionsAsync\r\n} from '@msdyn365-commerce/retail-proxy/dist/DataActions/StoreOperationsDataActions.g';\r\n\r\nexport const enum SuggestionType {\r\n Category = 'ScopedCategory',\r\n Keyword = 'Keyword',\r\n Product = 'Product',\r\n None = 'None'\r\n}\r\n\r\n/**\r\n * Input class for auto suggest search input\r\n */\r\nexport class AutoSuggestInput implements IActionInput {\r\n public searchQuery?: string;\r\n public topResultsCount?: number;\r\n public suggestionType?: string;\r\n public hitPrefix?: string;\r\n public hitSuffix?: string;\r\n\r\n constructor(searchText?: string, top?: number, suggestionType?: string, hitPrefix?: string, hitSuffix?: string) {\r\n this.searchQuery = searchText;\r\n this.topResultsCount = top;\r\n this.suggestionType = suggestionType;\r\n this.hitPrefix = hitPrefix;\r\n this.hitSuffix = hitSuffix;\r\n }\r\n\r\n public getCacheKey = () => `AutoSuggestSearchSuggestions`;\r\n public getCacheObjectType = () => 'AutoSuggestSearchSuggestions';\r\n public dataCacheType = (): CacheType => 'none';\r\n}\r\n\r\nconst createInput = (inputData: ICreateActionContext) => {\r\n return new AutoSuggestInput();\r\n};\r\n\r\n/**\r\n * Calls the Retail API and returns a auto-suggest suggestions\r\n */\r\nexport async function getSearchSuggestionsAction(input: AutoSuggestInput, ctx: IActionContext): Promise {\r\n // If no input is provided fail out\r\n if (!input || !input.searchQuery) {\r\n throw new Error('[getSearchSuggestionsAction]No valid Input was provided, failing');\r\n }\r\n\r\n const autosuggest: Autosuggestions = {};\r\n\r\n const autoSuggestPromises = [\r\n _getAutoSuggest(input, autosuggest, ctx)\r\n ];\r\n return Promise.all(autoSuggestPromises).then(() => {\r\n return autosuggest;\r\n });\r\n}\r\n\r\nasync function _getAutoSuggest(\r\n input: AutoSuggestInput,\r\n autosuggest: Autosuggestions,\r\n ctx: IActionContext\r\n): Promise {\r\n const searchCriteria: SearchSuggestionCriteria = {\r\n ProductSearchCriteria: {\r\n SearchCondition: input.searchQuery && input.searchQuery.length > 0 ? input.searchQuery : '',\r\n Context: {\r\n ChannelId: +ctx.requestContext.apiSettings.channelId,\r\n CatalogId: +ctx.requestContext.apiSettings.catalogId\r\n }\r\n },\r\n HitPrefix: input.hitPrefix,\r\n HitSuffix: input.hitSuffix,\r\n SuggestionType: input.suggestionType\r\n };\r\n\r\n const searchSuggestions = await getSearchSuggestionsAsync(\r\n { callerContext: ctx, queryResultSettings: { Paging: { Top: input.topResultsCount } } },\r\n searchCriteria\r\n );\r\n\r\n if (searchSuggestions && searchSuggestions.length > 0) {\r\n // Generate image url\r\n searchSuggestions.map(\r\n (item: SearchSuggestion) =>\r\n (item.ImageUrl = item.ImageUrl ? generateImageUrl(item.ImageUrl, ctx.requestContext.apiSettings) : '')\r\n );\r\n\r\n autosuggest.AllSearchResults = searchSuggestions;\r\n } else {\r\n ctx.telemetry.error(`[getSearchSuggestionsAction] unable to get availabilites for search with suggestion type ${searchCriteria.SuggestionType}`);\r\n }\r\n}\r\n\r\nexport const getSearchSuggestionsActionDataAction = createObservableDataAction({\r\n id: '@msdyn365-commerce-modules/search/get-auto-suggest-suggestions',\r\n action: >getSearchSuggestionsAction,\r\n input: createInput\r\n});\r\n\r\nexport default getSearchSuggestionsActionDataAction;\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\nimport * as React from 'react';\r\n\r\nimport { getPayloadObject, getTelemetryAttributes, IPayLoad, ITelemetryContent } from '@msdyn365-commerce-modules/utilities';\r\nimport { getRichTextHtml } from '@msdyn365-commerce/core';\r\nimport { SearchSuggestion } from '@msdyn365-commerce/retail-proxy';\r\n\r\nimport { IMfrmSearchData } from '../mfrm-search.data';\r\nimport { IMfrmSearchProps } from '../mfrm-search.props.autogenerated';\r\n\r\nexport interface ISearchKeywordSuggestProps {\r\n searchKeywordSuggestClass: string;\r\n searchPageURL: string;\r\n searchQsp: string | undefined;\r\n hitPrefix: string;\r\n hitSuffix: string;\r\n autoSuggestProps: IMfrmSearchProps;\r\n searchText: string;\r\n suggestions: SearchSuggestion[] | undefined;\r\n telemetryContent?: ITelemetryContent;\r\n}\r\n\r\nexport interface ISearchKeywordViewProps {\r\n text: React.ReactNode[];\r\n}\r\n\r\nlet payLoad: IPayLoad;\r\n\r\n/**\r\n *\r\n * KeywordSuggestionsComponent\r\n */\r\nexport const KeywordSuggestionsComponent = (props: ISearchKeywordSuggestProps): ISearchKeywordViewProps | undefined => {\r\n const { suggestions, hitPrefix, hitSuffix } = props;\r\n\r\n if (!suggestions) {\r\n return undefined;\r\n }\r\n\r\n payLoad = getPayloadObject('click', props.telemetryContent!, '');\r\n\r\n const reactNodes: React.ReactNode[] = [];\r\n\r\n suggestions.map(item => {\r\n reactNodes.push(_assembleNode(item, hitPrefix, hitSuffix, props));\r\n });\r\n\r\n return { text: reactNodes };\r\n};\r\n\r\nconst _assembleNode = (item: SearchSuggestion, hitPrefix: string, hitSuffix: string, props: ISearchKeywordSuggestProps) => {\r\n const ariaLabel =\r\n item.Value && item.Value.replace(new RegExp(`[${hitPrefix}]`, 'gi'), '').replace(new RegExp(`[${hitSuffix}]`, 'gi'), '');\r\n payLoad.contentAction.etext = ariaLabel;\r\n const attribute = getTelemetryAttributes(props.telemetryContent!, payLoad);\r\n return (\r\n
  • \r\n \r\n {_generateLink(item, hitPrefix, hitSuffix, props) &&\r\n _getHighlightedText(item.Value ? item.Value : '', hitPrefix, hitSuffix)}\r\n \r\n
  • \r\n );\r\n};\r\n\r\nconst _generateLink = (suggestion: SearchSuggestion, hitPrefix: string, hitSuffix: string, props: ISearchKeywordSuggestProps): string => {\r\n const { searchPageURL, searchQsp } = props;\r\n\r\n const formattedLink = (suggestion.Value as string)\r\n .replace(new RegExp(`[${hitPrefix}]`, 'gi'), '')\r\n .replace(new RegExp(`[${hitSuffix}]`, 'gi'), '');\r\n const route = searchPageURL || '';\r\n return formattedLink && formattedLink.length > 0\r\n ? `${route}${route.indexOf('?') === -1 ? '?' : '&'}${searchQsp}=${formattedLink}`\r\n : route;\r\n};\r\n\r\nconst _getHighlightedText = (suggestion: string, hitPrefix: string, hitSuffix: string): JSX.Element => {\r\n const formattedText = suggestion\r\n .replace(new RegExp(`[${hitPrefix}]`, 'gi'), '')\r\n .replace(new RegExp(`[${hitSuffix}]`, 'gi'), '');\r\n\r\n // tslint:disable:react-no-dangerous-html\r\n return ;\r\n};\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\nimport * as React from 'react';\r\n\r\nimport { PriceComponent } from '@msdyn365-commerce/components';\r\nimport Msdyn365, { getRichTextHtml, IActionContext, IImageSettings, Image, ITelemetry } from '@msdyn365-commerce/core';\r\nimport { CommerceProperty, SearchSuggestion } from '@msdyn365-commerce/retail-proxy';\r\n\r\nimport { getProductPageUrlSync } from '@msdyn365-commerce-modules/retail-actions';\r\nimport {\r\n getPayloadObject,\r\n getTelemetryAttributes,\r\n INodeProps,\r\n IPayLoad,\r\n ITelemetryContent,\r\n NodeTag\r\n} from '@msdyn365-commerce-modules/utilities';\r\nimport { IMfrmSearchData } from '../mfrm-search.data';\r\nimport { IMfrmSearchProps, IMfrmSearchResources } from '../mfrm-search.props.autogenerated';\r\n\r\nexport interface ISearchProductSuggestProps {\r\n searchProductSuggestClass: string;\r\n searchPageURL: string;\r\n searchQsp: string | undefined;\r\n hitPrefix: string;\r\n hitSuffix: string;\r\n autoSuggestProps: IMfrmSearchProps;\r\n searchText: string;\r\n suggestions: SearchSuggestion[] | undefined;\r\n telemetry: ITelemetry;\r\n moduleType: string;\r\n moduleId: string;\r\n telemetryContent?: ITelemetryContent;\r\n resources: IMfrmSearchResources;\r\n wmapPageUrlSuffix: string;\r\n}\r\nexport interface ISearchProductViewProps {\r\n title: React.ReactNode;\r\n items: ISearchProductItemViewProps[];\r\n}\r\n\r\nexport interface ISearchProductItemViewProps {\r\n text: React.ReactNode;\r\n thumbnail: React.ReactNode;\r\n price: React.ReactNode;\r\n LiProduct: INodeProps;\r\n AProduct: INodeProps;\r\n id: string | undefined;\r\n}\r\n\r\nlet payLoad: IPayLoad;\r\nlet telemetryContent: ITelemetryContent | undefined;\r\n\r\n/**\r\n *\r\n * ProductSuggestionsComponent\r\n */\r\nexport const ProductSuggestionsComponent = (props: ISearchProductSuggestProps): ISearchProductViewProps | undefined => {\r\n const {\r\n suggestions,\r\n hitSuffix,\r\n hitPrefix,\r\n autoSuggestProps: {\r\n context: { actionContext },\r\n resources: { productSuggestionHeading }\r\n },\r\n moduleType,\r\n moduleId,\r\n wmapPageUrlSuffix\r\n } = props;\r\n const reactNodes: ISearchProductItemViewProps[] = [];\r\n telemetryContent = props.telemetryContent;\r\n payLoad = getPayloadObject('click', props.telemetryContent!, '');\r\n\r\n if (!suggestions) {\r\n return undefined;\r\n }\r\n\r\n suggestions.map(item => {\r\n reactNodes.push(_assembleNode(item, hitPrefix, hitSuffix, actionContext, props, moduleType, moduleId, wmapPageUrlSuffix));\r\n });\r\n\r\n const titleNode = _renderTitle(productSuggestionHeading);\r\n\r\n return { title: titleNode, items: reactNodes };\r\n};\r\n\r\nconst _renderTitle = (productSuggestionHeading: string) => {\r\n const productAutoSuggestionHeading = productSuggestionHeading ? productSuggestionHeading : 'Go to products';\r\n\r\n return
  • {productAutoSuggestionHeading}
  • ;\r\n};\r\n\r\nconst _assembleNode = (\r\n item: SearchSuggestion,\r\n hitPrefix: string,\r\n hitSuffix: string,\r\n actionContext: IActionContext,\r\n props: ISearchProductSuggestProps,\r\n moduleType: string,\r\n moduleId: string,\r\n wmapPageUrlSuffix: string\r\n): ISearchProductItemViewProps => {\r\n const altText =\r\n item.Value && item.Value.replace(new RegExp(`[${hitPrefix}]`, 'gi'), '').replace(new RegExp(`[${hitSuffix}]`, 'gi'), '');\r\n\r\n return {\r\n text: _getHighlightedText(item.Value ? item.Value : '', hitPrefix, hitSuffix),\r\n thumbnail: _renderThumbnail(item, altText ? altText : '', props),\r\n price:\r\n item.Id &&\r\n item.Value3 &&\r\n item.Value3.Value &&\r\n item.Value3.Value.DecimalValue &&\r\n _renderPrice(item.Value3.Value.DecimalValue, item.Value3.Value.DecimalValue, moduleId, moduleType, props),\r\n LiProduct: _getLiWrapper(),\r\n AProduct: _getAWrapper(item, hitPrefix, hitSuffix, actionContext, props, wmapPageUrlSuffix),\r\n id: item.Id\r\n };\r\n};\r\n\r\nconst _getLiWrapper = () => {\r\n return {\r\n className: 'msc-autoSuggest__productResults-item',\r\n tag: 'li' as NodeTag\r\n };\r\n};\r\n\r\nconst _getAWrapper = (\r\n item: SearchSuggestion,\r\n hitPrefix: string,\r\n hitSuffix: string,\r\n actionContext: IActionContext,\r\n searchProps: ISearchProductSuggestProps,\r\n wmapPageUrlSuffix: string\r\n) => {\r\n const ariaLabel =\r\n item.Value && item.Value.replace(new RegExp(`[${hitPrefix}]`, 'gi'), '').replace(new RegExp(`[${hitSuffix}]`, 'gi'), '');\r\n\r\n payLoad.contentAction.recid = item.Id;\r\n const attribute = getTelemetryAttributes(telemetryContent!, payLoad);\r\n const linkUrl = _generateLink(item, hitPrefix, hitSuffix, actionContext);\r\n const makeAPaymentLink = linkUrl.indexOf(wmapPageUrlSuffix);\r\n const makeAPaymentLinkUrl = makeAPaymentLink > -1 ? linkUrl.replace(`/${wmapPageUrlSuffix}`, '') : linkUrl;\r\n\r\n return {\r\n className: 'msc-autoSuggest__productResults-item',\r\n tag: 'a' as NodeTag,\r\n 'aria-label': ariaLabel,\r\n href: makeAPaymentLinkUrl,\r\n ...attribute,\r\n onClick: (e: React.MouseEvent) => {\r\n e.preventDefault();\r\n // @ts-ignore\r\n if (utag) {\r\n // @ts-ignore\r\n utag.link({\r\n event_type: 'site_search',\r\n search_term: searchProps.searchText,\r\n search_type: 'related-products-search'\r\n });\r\n }\r\n\r\n if (Msdyn365.isBrowser && makeAPaymentLinkUrl) {\r\n window.location.href = makeAPaymentLinkUrl;\r\n }\r\n }\r\n };\r\n};\r\n\r\nconst _generateLink = (suggestion: SearchSuggestion, hitPrefix: string, hitSuffix: string, actionContext: IActionContext) => {\r\n const formattedLink = (suggestion.Value as string)\r\n .replace(new RegExp(`[${hitPrefix}]`, 'gi'), '')\r\n .replace(new RegExp(`[${hitSuffix}]`, 'gi'), '');\r\n const unbxdDefaultVariant = suggestion && suggestion.ExtensionProperties?.find((property: CommerceProperty) => property?.Key === \"Unbxd_DefaultVariantID\")?.Value?.LongValue;\r\n\r\n let productUrl = suggestion.Value && suggestion.Id\r\n ? getProductPageUrlSync(formattedLink, (suggestion.Id as unknown) as number, actionContext, undefined)\r\n : '';\r\n const variantIdQueryParams = unbxdDefaultVariant !== 0 && (productUrl.includes('?') ? `&variantid=${unbxdDefaultVariant}` : `?variantid=${unbxdDefaultVariant}`) || '';\r\n productUrl += variantIdQueryParams;\r\n return productUrl;\r\n};\r\n\r\nconst _getHighlightedText = (suggestion: string, hitPrefix: string, hitSuffix: string): JSX.Element => {\r\n const formattedText = suggestion\r\n .replace(new RegExp(`[${hitPrefix}]`, 'gi'), '')\r\n .replace(new RegExp(`[${hitSuffix}]`, 'gi'), '');\r\n\r\n // tslint:disable:react-no-dangerous-html\r\n return (\r\n \r\n );\r\n};\r\n\r\nconst _renderPrice = (\r\n adjustedPrice: number,\r\n basePrice: number,\r\n moduleId: string,\r\n moduleType: string,\r\n props: ISearchProductSuggestProps\r\n): JSX.Element | null => {\r\n const {\r\n autoSuggestProps: { context },\r\n resources\r\n } = props;\r\n\r\n return (\r\n \r\n );\r\n};\r\n\r\nconst _renderThumbnail = (suggestion: SearchSuggestion, altText: string, props: ISearchProductSuggestProps): JSX.Element | null => {\r\n const {\r\n autoSuggestProps: {\r\n context: {\r\n request: { gridSettings }\r\n },\r\n config: { imageSettings }\r\n }\r\n } = props;\r\n if (imageSettings) {\r\n imageSettings.cropFocalRegion = true;\r\n }\r\n\r\n if (!suggestion || !suggestion.ImageUrl) {\r\n props.telemetry.error('Search suggestion content is empty, module wont render.');\r\n return null;\r\n }\r\n\r\n const defaultImageSettings: IImageSettings = {\r\n viewports: {\r\n xs: { q: `w=40&h=40&m=6`, w: 0, h: 0 },\r\n lg: { q: `w=40&h=40&m=6`, w: 0, h: 0 },\r\n xl: { q: `w=40&h=40&m=6`, w: 0, h: 0 }\r\n },\r\n lazyload: true,\r\n cropFocalRegion: true\r\n };\r\n\r\n return (\r\n \r\n );\r\n};\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\nimport * as React from 'react';\r\n\r\nimport Msdyn365, { getRichTextHtml } from '@msdyn365-commerce/core';\r\nimport { ProductRefiner, SearchSuggestion } from '@msdyn365-commerce/retail-proxy';\r\n\r\nimport { format, getPayloadObject, getTelemetryAttributes, IPayLoad, ITelemetryContent } from '@msdyn365-commerce-modules/utilities';\r\nimport { IMfrmSearchData } from '../mfrm-search.data';\r\nimport { IMfrmSearchProps } from '../mfrm-search.props.autogenerated';\r\n\r\nimport { removeKeywords } from '../../../Utilities/plp-url-utils';\r\n\r\nexport interface ISearchCategorySuggestProps {\r\n searchCategorySuggestClass: string;\r\n searchPageURL: string;\r\n searchQsp: string | undefined;\r\n hitPrefix: string;\r\n hitSuffix: string;\r\n autoSuggestProps: IMfrmSearchProps;\r\n searchText: string;\r\n searchRefiners: ProductRefiner[] | undefined;\r\n suggestions: SearchSuggestion[] | undefined;\r\n telemetryContent?: ITelemetryContent;\r\n}\r\n\r\nexport interface ISearchCategoryViewProps {\r\n title: React.ReactNode;\r\n text: React.ReactNode[];\r\n}\r\n\r\nlet payLoad: IPayLoad;\r\n\r\n/**\r\n *\r\n * CategorySuggestionsComponent\r\n */\r\nexport const CategorySuggestionsComponent = (props: ISearchCategorySuggestProps): ISearchCategoryViewProps | undefined => {\r\n const {\r\n suggestions,\r\n searchText,\r\n autoSuggestProps: {\r\n resources: { categorySuggestionHeading }\r\n }\r\n } = props;\r\n\r\n if (!suggestions) {\r\n return undefined;\r\n }\r\n\r\n const reactNodes: React.ReactNode[] = [];\r\n payLoad = getPayloadObject('click', props.telemetryContent!, '');\r\n\r\n suggestions.map(item => {\r\n reactNodes.push(_assembleNode(item, props, props.autoSuggestProps));\r\n });\r\n\r\n const titleNode = _renderTitle(categorySuggestionHeading, searchText);\r\n\r\n return { title: titleNode, text: reactNodes };\r\n};\r\n\r\nconst _renderTitle = (categorySuggestionHeading: string, searchText: string) => {\r\n const categoryAutoSuggestionHeading = categorySuggestionHeading\r\n ? format(categorySuggestionHeading, searchText)\r\n : `Search \"${searchText}\" in categories`;\r\n\r\n return
  • {categoryAutoSuggestionHeading}
  • ;\r\n};\r\n\r\nconst _assembleNode = (\r\n item: SearchSuggestion,\r\n searchProps: ISearchCategorySuggestProps,\r\n categoryProps: IMfrmSearchProps\r\n) => {\r\n const { hitPrefix, hitSuffix } = searchProps;\r\n\r\n const splitValue = item.Value && item.Value.split('|').pop();\r\n const ariaLabel = splitValue\r\n ? splitValue.replace(new RegExp(`[${hitPrefix}]`, 'gi'), '').replace(new RegExp(`[${hitSuffix}]`, 'gi'), '')\r\n : item.Value && item.Value.replace(new RegExp(`[${hitPrefix}]`, 'gi'), '').replace(new RegExp(`[${hitSuffix}]`, 'gi'), '');\r\n payLoad.contentAction.etext = item.Value;\r\n const attribute = getTelemetryAttributes(searchProps.telemetryContent!, payLoad);\r\n const linkUrl = _generateLinkPLP(item, categoryProps);\r\n return (\r\n
  • \r\n ) => {\r\n e.preventDefault();\r\n // @ts-ignore\r\n if (utag) {\r\n // @ts-ignore\r\n utag.link({\r\n event_type: 'site_search',\r\n search_term: searchProps.searchText,\r\n search_type: 'related-categories-search'\r\n });\r\n }\r\n\r\n if (Msdyn365.isBrowser && linkUrl) {\r\n window.location.href = linkUrl;\r\n }\r\n }}\r\n >\r\n {linkUrl && _getHighlightedText(item.Value ? item.Value : '', hitPrefix, hitSuffix)}\r\n \r\n
  • \r\n );\r\n};\r\n\r\nconst _generateLinkPLP = (suggestion: SearchSuggestion, props: IMfrmSearchProps): string | undefined => {\r\n const categoryPath = suggestion.ExtensionProperties?.find(property => property.Key === 'CategoryPath')?.Value?.StringValue;\r\n const categoryId = suggestion.Id;\r\n\r\n return suggestion && categoryPath && categoryId ? _getCategoryLinkPLP(categoryPath, categoryId, props) : '';\r\n};\r\n\r\nconst _getCategoryLinkPLP = (categoryPath: string, categoryId: string, props: IMfrmSearchProps): string | undefined => {\r\n if (Msdyn365.isBrowser) {\r\n const base = window.location.origin;\r\n const validCategoryPath = categoryPath\r\n .toLowerCase()\r\n .replace(/\\|/g, '/')\r\n .replace(/&/g, '')\r\n .replace(/ +/g, '-');\r\n const pathWithRemovedKeyWords = removeKeywords(validCategoryPath.split('/').splice(1), props.context.request).join('/');\r\n\r\n return `${base}/${pathWithRemovedKeyWords}/${categoryId}.c`;\r\n } else {\r\n return undefined;\r\n }\r\n};\r\n\r\nconst _getHighlightedText = (suggestion: string, hitPrefix: string, hitSuffix: string): JSX.Element => {\r\n let formattedText = suggestion\r\n .replace(new RegExp(`[${hitPrefix}]`, 'gi'), '')\r\n .replace(new RegExp(`[${hitSuffix}]`, 'gi'), '');\r\n formattedText = formattedText.split('|').pop() || '';\r\n\r\n // tslint:disable:react-no-dangerous-html\r\n return ;\r\n};\r\n\r\n/**\r\n * Compressed a list of refiners for use in URLs\r\n * @param refiners The uncompressed refiners\r\n */\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\nimport { Button } from '@msdyn365-commerce-modules/utilities';\r\nimport * as React from 'react';\r\n\r\nexport interface ISearchFormProps {\r\n hideSearchLabel: boolean | undefined;\r\n isSearchFormExpanded: boolean | undefined;\r\n disableSubmitSearch: boolean | undefined;\r\n searchTextInput: React.RefObject;\r\n searchUrl: string;\r\n maxChars: number;\r\n searchQsp: string;\r\n searchPlaceholder: string;\r\n query: string;\r\n ariaLabelCancel: string;\r\n ariaLabelSearch: string;\r\n ariaLabelSubmit: string;\r\n handleCancelSearchChange(): void;\r\n handleInputChange(query: string): void;\r\n handleSubmit(e: React.MouseEvent | React.KeyboardEvent | React.FormEvent, eventType?: string): Promise;\r\n handleSearchInputClick():void;\r\n}\r\n\r\nexport interface ISearchFormViewProps {\r\n input: React.ReactNode;\r\n submitBtn: React.ReactNode;\r\n cancelBtn: React.ReactNode;\r\n}\r\n\r\nexport const FormComponent = (props: ISearchFormProps): ISearchFormViewProps => {\r\n const {\r\n searchQsp,\r\n searchPlaceholder,\r\n hideSearchLabel,\r\n isSearchFormExpanded,\r\n searchTextInput,\r\n handleInputChange,\r\n maxChars,\r\n disableSubmitSearch,\r\n handleCancelSearchChange,\r\n query,\r\n ariaLabelCancel,\r\n ariaLabelSearch,\r\n ariaLabelSubmit,\r\n handleSubmit,\r\n handleSearchInputClick\r\n } = props;\r\n\r\n const onInputChange = (e: React.ChangeEvent): void => {\r\n handleInputChange(e.target.value || '');\r\n };\r\n\r\n const inputNode = !hideSearchLabel ? (\r\n \r\n ) : (\r\n \r\n );\r\n\r\n const submitBtnNode = !disableSubmitSearch && (\r\n ) => handleSubmit(e, 'search-box-icon')}\r\n />\r\n );\r\n\r\n const cancelBtNoden = (\r\n \r\n );\r\n\r\n return { input: inputNode, cancelBtn: cancelBtNoden, submitBtn: submitBtnNode };\r\n};\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n/* eslint-disable no-duplicate-imports */\r\nimport { Button, getPayloadObject, getTelemetryAttributes, ITelemetryContent } from '@msdyn365-commerce-modules/utilities';\r\nimport * as React from 'react';\r\n\r\nexport interface ISearchLabelProps {\r\n isSearchFormExpanded: boolean;\r\n searchLabelClass: string;\r\n searchLabelArialLabel: string;\r\n searchtext: string;\r\n searchCollapsedLabel: React.RefObject;\r\n hideSearchLabel?: boolean;\r\n telemetryContent: ITelemetryContent;\r\n handleCancelSearchChange(): void;\r\n}\r\n\r\nexport const LabelComponent = (props: ISearchLabelProps) => {\r\n const {\r\n searchLabelClass,\r\n searchLabelArialLabel,\r\n isSearchFormExpanded,\r\n searchtext,\r\n searchCollapsedLabel,\r\n hideSearchLabel,\r\n handleCancelSearchChange,\r\n telemetryContent\r\n } = props;\r\n const payLoad = getPayloadObject('click', telemetryContent, searchtext, '');\r\n const attributes = getTelemetryAttributes(telemetryContent, payLoad);\r\n\r\n return (\r\n
    \r\n \r\n {!hideSearchLabel && (\r\n \r\n {searchtext}\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 * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\nimport { createSearchStateInput } from '@msdyn365-commerce-modules/search-utilities';\r\nimport { getTelemetryObject, IModuleProps, INodeProps, ITelemetryContent, KeyCodes, onTelemetryClick,getPayloadObject} from '@msdyn365-commerce-modules/utilities';\r\nimport { Autosuggestions } from '@msdyn365-commerce/commerce-entities';\r\nimport MsDyn365, { getUrlSync } from '@msdyn365-commerce/core';\r\nimport { ProductRefiner } from '@msdyn365-commerce/retail-proxy';\r\nimport { getProductSearchRefinersAsync } from '@msdyn365-commerce/retail-proxy/dist/DataActions/ProductsDataActions.g';\r\nimport classnames from 'classnames';\r\nimport debounce from 'lodash/debounce';\r\nimport * as React from 'react';\r\n\r\nimport getSearchSuggestionsAction, { AutoSuggestInput, SuggestionType } from './actions/get-auto-suggest-suggestions';\r\nimport getSearchProducts, { GetFullProductsBySearchInput } from './actions/get-full-products-by-search';\r\nimport {\r\n CategorySuggestionsComponent,\r\n FormComponent,\r\n ISearchCategoryViewProps,\r\n ISearchKeywordViewProps,\r\n ISearchProductViewProps,\r\n KeywordSuggestionsComponent,\r\n LabelComponent,\r\n ProductSuggestionsComponent\r\n} from './components';\r\nimport { IMfrmSearchData } from './mfrm-search.data';\r\nimport { IMfrmSearchProps, ISuggestionTypeCriterionData } from './mfrm-search.props.autogenerated';\r\n\r\nexport interface ISearchState {\r\n isSearchFormExpanded: boolean;\r\n searchText: string;\r\n searchKeywordSuggestClass: string;\r\n searchProductSuggestClass: string;\r\n searchCategorySuggestClass: string;\r\n suggestions: Autosuggestions | undefined;\r\n searchRefiners?: ProductRefiner[] | undefined;\r\n autoSuggestAriaLabel: string;\r\n isInitialState: boolean;\r\n}\r\n\r\nexport interface ISearchViewProps extends IMfrmSearchProps {\r\n Search: IModuleProps;\r\n AutoSuggestAriaLabel: INodeProps;\r\n AutoSuggestAriaLabelText: string;\r\n searchText: string;\r\n AutoSuggest: INodeProps;\r\n KeywordSuggest: INodeProps;\r\n ProductSuggest: INodeProps;\r\n CategorySuggest: INodeProps;\r\n SearchForm: INodeProps;\r\n FormWrapper: INodeProps;\r\n UlKeyword: INodeProps;\r\n UlProduct: INodeProps;\r\n UlCategory: INodeProps;\r\n label: React.ReactNode;\r\n form: React.ReactNode;\r\n autosuggestKeyword?: ISearchKeywordViewProps;\r\n autosuggestProduct?: ISearchProductViewProps;\r\n autosuggestCategory?: ISearchCategoryViewProps;\r\n callbacks: {\r\n handleCancelSearchChange(): void;\r\n };\r\n isSearchFormExpanded: boolean;\r\n handleUnbxdRedirect(query: string): Promise;\r\n}\r\n\r\n/**\r\n *\r\n * Search module\r\n * @extends {React.Component, ISearchState>}\r\n */\r\nclass Search extends React.Component, ISearchState> {\r\n private searchTextInput: React.RefObject;\r\n private searchCollapsedLabel: React.RefObject;\r\n private formReference: React.RefObject;\r\n private maxChars: number;\r\n private inputSuggestionType?: ISuggestionTypeCriterionData[];\r\n private topResultsCount?: number;\r\n private hitPrefix: string = '{';\r\n private hitSuffix: string = '}';\r\n private waitTime: number = 500;\r\n private autoSuggestResultScreenReaderDiv: React.RefObject;\r\n private autoSuggestResultDiv: React.RefObject;\r\n private searchFormClass: string;\r\n private searchLabelClass: string;\r\n private telemetryContent: ITelemetryContent;\r\n // @ts-ignore\r\n private cancellabelDebounce: debounce;\r\n\r\n constructor(props: IMfrmSearchProps) {\r\n super(props);\r\n this.searchTextInput = React.createRef();\r\n this.searchCollapsedLabel = React.createRef();\r\n this.autoSuggestResultScreenReaderDiv = React.createRef();\r\n this.autoSuggestResultDiv = React.createRef();\r\n this.formReference = React.createRef();\r\n this.state = {\r\n isSearchFormExpanded: false,\r\n searchText: '',\r\n searchKeywordSuggestClass: 'ms-search__autoSuggest__keyword',\r\n searchProductSuggestClass: 'ms-search__autoSuggest__product',\r\n searchCategorySuggestClass: 'ms-search__autoSuggest__category',\r\n suggestions: undefined,\r\n searchRefiners: undefined,\r\n autoSuggestAriaLabel: '',\r\n isInitialState: true\r\n };\r\n this.maxChars =\r\n (this.props.context &&\r\n this.props.context.app &&\r\n this.props.context.app.config &&\r\n this.props.context.app.config.searchInputMaxLength) ||\r\n 50;\r\n this.inputSuggestionType = this.props.config && this.props.config.suggestionTypeCriterion;\r\n this.topResultsCount = this.props.config && this.props.config.topResultsCount ? this.props.config.topResultsCount : 5;\r\n this.searchFormClass = 'ms-search__form';\r\n this.searchLabelClass = 'ms-search__label';\r\n this.telemetryContent = getTelemetryObject(\r\n this.props.context.request.telemetryPageName!,\r\n this.props.friendlyName,\r\n this.props.telemetry\r\n );\r\n }\r\n\r\n public async componentDidMount(): Promise {\r\n if (MsDyn365.isBrowser) {\r\n document.body && document.body.addEventListener('mousedown', this._focusOutTarget);\r\n window && window.addEventListener('keyup', this._keyup);\r\n }\r\n }\r\n\r\n public componentWillUnmount(): void {\r\n if (MsDyn365.isBrowser) {\r\n document.body && document.body.removeEventListener('mousedown', this._focusOutTarget, false);\r\n window && window.removeEventListener('keyup', this._keyup, false);\r\n }\r\n }\r\n\r\n public componentDidUpdate(): void {\r\n const {\r\n config: { hideSearchLabel }\r\n } = this.props;\r\n const { isSearchFormExpanded, isInitialState } = this.state;\r\n\r\n if (!this.props.context.request.params.isEditor) {\r\n if (!hideSearchLabel && isSearchFormExpanded) {\r\n this.searchTextInput && this.searchTextInput.current && this.searchTextInput.current.focus();\r\n } else if (!isInitialState) {\r\n this.searchCollapsedLabel && this.searchCollapsedLabel.current && this.searchCollapsedLabel.current.focus();\r\n }\r\n }\r\n }\r\n\r\n // tslint:disable-next-line: cyclomatic-complexity max-func-body-length\r\n public render(): JSX.Element {\r\n const {\r\n context,\r\n resources: { searchtext, searchLabelArialLabel, cancelBtnAriaLabel, searchBtnAriaLabel, submitBtnAriaLabel },\r\n config: { hideSearchLabel, disableSubmitSearch, searchplaceholderText, className = '' }\r\n } = this.props;\r\n\r\n const {\r\n isSearchFormExpanded,\r\n searchText,\r\n searchKeywordSuggestClass,\r\n searchProductSuggestClass,\r\n searchCategorySuggestClass,\r\n suggestions,\r\n searchRefiners\r\n } = this.state;\r\n\r\n const searchQsp = (context && context.app && context.app.config && context.app.config.searchQueryStringParameter) || 'q';\r\n const searchPageURL = getUrlSync('search', context && context.actionContext) || '';\r\n const searchURL = this._appendQueryParams(searchPageURL, searchText, searchQsp);\r\n const searchPlaceholder = searchplaceholderText && searchplaceholderText.length > 0 ? searchplaceholderText : 'Search in Fabrikam';\r\n\r\n const keywordSuggestions =\r\n suggestions &&\r\n suggestions.AllSearchResults &&\r\n suggestions.AllSearchResults.filter(\r\n (i: any) => i.SuggestionType === SuggestionType.Keyword || i.SuggestionType === SuggestionType.None\r\n );\r\n const productSuggestions =\r\n suggestions &&\r\n suggestions.AllSearchResults &&\r\n suggestions.AllSearchResults.filter((i: any) => i.SuggestionType === SuggestionType.Product);\r\n const categorySuggestions =\r\n suggestions &&\r\n suggestions.AllSearchResults &&\r\n suggestions.AllSearchResults.filter((i: any) => i.SuggestionType === SuggestionType.Category);\r\n\r\n const viewProps: ISearchViewProps = {\r\n ...(this.props as IMfrmSearchProps),\r\n\r\n Search: {\r\n moduleProps: this.props,\r\n className: `${classnames('ms-search', className)} ${disableSubmitSearch ? 'no-submit' : 'with-submit'}`\r\n },\r\n AutoSuggestAriaLabel: {\r\n tag: 'div',\r\n className: 'msc-autoSuggest__screen-reader',\r\n 'aria-live': 'assertive',\r\n ref: this.autoSuggestResultScreenReaderDiv\r\n },\r\n AutoSuggestAriaLabelText: this.state.autoSuggestAriaLabel,\r\n searchText: this.state.searchText,\r\n AutoSuggest: {\r\n ref: this.autoSuggestResultDiv,\r\n className: 'ms-search__autoSuggest'\r\n },\r\n KeywordSuggest: {\r\n className: searchKeywordSuggestClass\r\n },\r\n ProductSuggest: {\r\n className: searchProductSuggestClass\r\n },\r\n CategorySuggest: {\r\n className: searchCategorySuggestClass\r\n },\r\n SearchForm: {\r\n className: `${this.searchFormClass} ${isSearchFormExpanded ? 'bx-show' : 'bx-hide'}`\r\n },\r\n FormWrapper: {\r\n tag: 'form',\r\n ref: this.formReference,\r\n className: 'ms-search__searchForm',\r\n 'aria-label': 'Search',\r\n name: 'searchForm',\r\n role: 'search',\r\n action: searchURL,\r\n autoComplete: 'off',\r\n onSubmit: this._handleSubmit\r\n },\r\n UlKeyword: {\r\n tag: 'ul',\r\n className: classnames('msc-autoSuggest__keywordResults-items', className)\r\n },\r\n UlProduct: {\r\n tag: 'ul',\r\n className: classnames('msc-autoSuggest__productResults-items', className)\r\n },\r\n UlCategory: {\r\n tag: 'ul',\r\n className: classnames('msc-autoSuggest__categoryResults-items', className)\r\n },\r\n label: LabelComponent({\r\n isSearchFormExpanded: isSearchFormExpanded,\r\n searchLabelClass: `${this.searchLabelClass} ${isSearchFormExpanded ? 'bx-hide' : 'bx-show'}`,\r\n searchtext: searchtext,\r\n searchLabelArialLabel: searchLabelArialLabel,\r\n searchCollapsedLabel: this.searchCollapsedLabel,\r\n hideSearchLabel: hideSearchLabel,\r\n handleCancelSearchChange: this._handleCancelSearchChange,\r\n telemetryContent: this.telemetryContent\r\n }),\r\n form: FormComponent({\r\n ariaLabelCancel: cancelBtnAriaLabel,\r\n ariaLabelSearch: searchBtnAriaLabel,\r\n ariaLabelSubmit: submitBtnAriaLabel,\r\n hideSearchLabel: hideSearchLabel,\r\n searchTextInput: this.searchTextInput,\r\n isSearchFormExpanded: isSearchFormExpanded,\r\n disableSubmitSearch: disableSubmitSearch,\r\n handleInputChange: this._handleInputChange,\r\n handleCancelSearchChange: this._handleCancelSearchChange,\r\n maxChars: this.maxChars,\r\n searchQsp: searchQsp,\r\n searchPlaceholder: searchPlaceholder,\r\n query: searchText,\r\n searchUrl: searchURL,\r\n handleSubmit: this._handleSubmit,\r\n handleSearchInputClick: this.handleSearchInputClick\r\n }),\r\n autosuggestKeyword:\r\n searchText && searchText.length > 0 && keywordSuggestions && keywordSuggestions.length > 0\r\n ? KeywordSuggestionsComponent({\r\n searchKeywordSuggestClass: searchKeywordSuggestClass,\r\n searchPageURL: searchPageURL,\r\n searchQsp: searchQsp,\r\n hitPrefix: this.hitPrefix,\r\n hitSuffix: this.hitSuffix,\r\n autoSuggestProps: this.props,\r\n searchText: searchText,\r\n suggestions: keywordSuggestions,\r\n telemetryContent: this.telemetryContent\r\n })\r\n : undefined,\r\n autosuggestProduct:\r\n searchText && searchText.length > 0 && productSuggestions && productSuggestions.length > 0\r\n ? ProductSuggestionsComponent({\r\n searchProductSuggestClass: searchProductSuggestClass,\r\n searchPageURL: searchPageURL,\r\n searchQsp: searchQsp,\r\n hitPrefix: this.hitPrefix,\r\n hitSuffix: this.hitSuffix,\r\n autoSuggestProps: this.props,\r\n searchText: searchText,\r\n suggestions: productSuggestions,\r\n telemetry: this.props.telemetry,\r\n moduleType: this.props.typeName,\r\n moduleId: this.props.id,\r\n telemetryContent: this.telemetryContent,\r\n resources: this.props.resources,\r\n wmapPageUrlSuffix: this.props.app.config.wmapPageUrlSuffix\r\n })\r\n : undefined,\r\n autosuggestCategory:\r\n searchText && searchText.length > 0 && categorySuggestions && categorySuggestions.length > 0\r\n ? CategorySuggestionsComponent({\r\n searchCategorySuggestClass: searchCategorySuggestClass,\r\n searchPageURL: searchPageURL,\r\n searchQsp: searchQsp,\r\n hitPrefix: this.hitPrefix,\r\n hitSuffix: this.hitSuffix,\r\n autoSuggestProps: this.props,\r\n searchText: searchText,\r\n suggestions: categorySuggestions,\r\n searchRefiners: searchRefiners,\r\n telemetryContent: this.telemetryContent\r\n })\r\n : undefined,\r\n callbacks: {\r\n handleCancelSearchChange: this._handleCancelSearchChange\r\n },\r\n isSearchFormExpanded: this.state.isSearchFormExpanded,\r\n handleUnbxdRedirect: this._handleUnbxdRedirect\r\n };\r\n\r\n return this.props.renderView(viewProps) as React.ReactElement;\r\n }\r\n\r\n // tslint:disable-next-line:no-any\r\n private _focusOutTarget = (e: any): void => {\r\n const { suggestions } = this.state;\r\n\r\n if (suggestions && suggestions.AllSearchResults && e.target.closest('.ms-search') === null) {\r\n this._clearAutoSuggestState();\r\n }\r\n };\r\n private handleSearchInputClick = (): void => {\r\n const telemetryContent: ITelemetryContent = getTelemetryObject('Search Bar', this.props.friendlyName, this.props.telemetry);\r\n const payLoad = getPayloadObject('click', telemetryContent, 'Search Input', '');\r\n onTelemetryClick(telemetryContent, payLoad, 'Search Input')();\r\n };\r\n\r\n private _keyup = (e: KeyboardEvent): void => {\r\n const { suggestions } = this.state;\r\n\r\n if (suggestions && suggestions.AllSearchResults && e.keyCode === KeyCodes.Escape) {\r\n this._clearAutoSuggestState();\r\n } else if (this.state.isSearchFormExpanded && e.keyCode === KeyCodes.Escape) {\r\n if (this.state.isSearchFormExpanded) {\r\n this.setState({ isSearchFormExpanded: false });\r\n }\r\n }\r\n\r\n if (!((this.formReference.current && this.formReference.current.contains(e.target as unknown as Node)) ||\r\n (this.autoSuggestResultDiv.current && this.autoSuggestResultDiv.current.contains(e.target as unknown as Node)))) {\r\n if (suggestions && suggestions.AllSearchResults) {\r\n this._clearAutoSuggestState();\r\n }\r\n\r\n if (this.state.isSearchFormExpanded) {\r\n this.setState({ isSearchFormExpanded: false });\r\n }\r\n }\r\n };\r\n\r\n private _clearAutoSuggestState = (): void => {\r\n const {\r\n context: { actionContext },\r\n data: { searchState }\r\n } = this.props;\r\n\r\n if (this.searchTextInput.current && this.searchTextInput.current.value.length > 0) {\r\n searchState.searchText = '';\r\n searchState.defaultBasicSearchUrl = '';\r\n searchState.searchQueryStringParameter = '';\r\n actionContext ? actionContext.update(createSearchStateInput(searchState), searchState) : null;\r\n this.searchTextInput.current.value = '';\r\n }\r\n\r\n this.setState({ searchText: '', suggestions: undefined, searchRefiners: undefined });\r\n };\r\n\r\n private _handleInputChange = (query: string): void => {\r\n if (!query || query.length < this.maxChars) {\r\n this.setState({ searchText: query });\r\n }\r\n\r\n if (this.cancellabelDebounce) {\r\n this.cancellabelDebounce.cancel();\r\n }\r\n\r\n const {\r\n telemetry,\r\n context,\r\n data: { searchState }\r\n } = this.props;\r\n\r\n if (context) {\r\n if (query && query.length > 0) {\r\n if (query.length > this.maxChars) {\r\n return;\r\n }\r\n\r\n this.cancellabelDebounce = debounce(() => {\r\n getSearchSuggestionsAction(\r\n new AutoSuggestInput(\r\n query,\r\n this.topResultsCount,\r\n this._getSuggestionType(this.inputSuggestionType),\r\n this.hitPrefix,\r\n this.hitSuffix\r\n ),\r\n context.actionContext\r\n )\r\n .then(results => {\r\n this._getSearchRefiners(query)\r\n .then(refiners => {\r\n this.setState({\r\n suggestions: results, searchRefiners: refiners,\r\n autoSuggestAriaLabel: this._setAutoSuggestResultCount(results)\r\n });\r\n })\r\n .catch(error => {\r\n this.setState({\r\n suggestions: results, searchRefiners: undefined,\r\n autoSuggestAriaLabel: this._setAutoSuggestResultCount(results)\r\n });\r\n telemetry.exception(error);\r\n telemetry.debug('Unable to get refiners results');\r\n });\r\n })\r\n .catch(error => {\r\n this.setState({\r\n suggestions: undefined, searchRefiners: undefined,\r\n autoSuggestAriaLabel: this._setAutoSuggestResultCount()\r\n });\r\n telemetry.exception(error);\r\n telemetry.debug('Unable to get auto suggest results');\r\n });\r\n }, this.waitTime);\r\n\r\n setTimeout(() => {\r\n this.cancellabelDebounce();\r\n }, 0);\r\n\r\n searchState.searchText = query;\r\n } else {\r\n this.setState({ suggestions: undefined, searchRefiners: undefined });\r\n searchState.searchText = '';\r\n }\r\n context.actionContext.update(createSearchStateInput(searchState), searchState);\r\n }\r\n };\r\n\r\n private _getSuggestionType = (suggestionTypes?: ISuggestionTypeCriterionData[]): string => {\r\n if (suggestionTypes && suggestionTypes.length > 0) {\r\n const distinctSuggestionTypes: string[] = [];\r\n suggestionTypes &&\r\n suggestionTypes.forEach((suggestionTypeItem, index) => {\r\n suggestionTypeItem.SuggestionType &&\r\n distinctSuggestionTypes.push(\r\n suggestionTypeItem.SuggestionType.charAt(0).toUpperCase() + suggestionTypeItem.SuggestionType.slice(1)\r\n );\r\n });\r\n return distinctSuggestionTypes.join(',');\r\n }\r\n return 'Keyword, Product, ScopedCategory';\r\n };\r\n\r\n private async _getSearchRefiners(searchText: string): Promise {\r\n const { actionContext: ctx } = this.props.context;\r\n return getProductSearchRefinersAsync(\r\n { callerContext: ctx },\r\n {\r\n SearchCondition: searchText,\r\n Context: {\r\n ChannelId: +ctx.requestContext.apiSettings.channelId,\r\n CatalogId: +ctx.requestContext.apiSettings.catalogId\r\n }\r\n }\r\n );\r\n }\r\n private _handleSubmit = async (\r\n e: React.MouseEvent | React.KeyboardEvent | React.FormEvent, eventType: string\r\n ): Promise => {\r\n const {\r\n config: { disableSubmitSearch },\r\n context: {\r\n actionContext,\r\n app: {\r\n config: { searchQueryStringParameter }\r\n }\r\n }\r\n } = this.props;\r\n\r\n const query = this.searchTextInput.current && this.searchTextInput.current.value;\r\n e.preventDefault();\r\n // @ts-ignore\r\n if (utag) {\r\n // @ts-ignore\r\n utag.link({\r\n event_type: 'site_search',\r\n search_term: query,\r\n search_type: eventType === 'search-box-icon' ? 'search-box-icon' : 'search-box-enter'\r\n });\r\n }\r\n\r\n if (!query || (query && query.length === 0) || disableSubmitSearch) {\r\n this.searchTextInput && this.searchTextInput.current && this.searchTextInput.current.focus();\r\n } else {\r\n const searchQsp = searchQueryStringParameter || 'q';\r\n const searchURL = this._appendQueryParams(getUrlSync('search', actionContext) || '', query, searchQsp);\r\n const redirectUrl = await this._handleUnbxdRedirect(query);\r\n\r\n if (MsDyn365.isBrowser) {\r\n document.location.href = (redirectUrl ? redirectUrl : searchURL)?.replace(`/${this.props.app.config.wmapPageUrlSuffix}`, '');\r\n }\r\n\r\n\r\n }\r\n };\r\n\r\n private _handleUnbxdRedirect = async (query: string): Promise => {\r\n const input = new GetFullProductsBySearchInput(\r\n 'Search',\r\n this.props.context.request.apiSettings,\r\n {\r\n Paging: {\r\n Top: 1,\r\n Skip: 0\r\n },\r\n count: true,\r\n Sorting: {}\r\n },\r\n [],\r\n + (this.props.context.request.urlTokens.itemId || 0),\r\n query,\r\n false,\r\n this.props.context.request.locale,\r\n this.props.context.request.url.requestUrl.pathname\r\n );\r\n let redirectUrl = '';\r\n if (input?.searchText) {\r\n const productResults = await getSearchProducts(input, this.props.context.actionContext);\r\n const extProperties = productResults.products && productResults.products.length > 0 && productResults.products[0]?.ExtensionProperties;\r\n const redirectUrlValue = extProperties && extProperties?.find(obj => obj?.Key === 'RedirectURL')?.Value?.StringValue;\r\n redirectUrlValue && redirectUrlValue.length ? redirectUrl = redirectUrlValue : redirectUrl = '';\r\n return redirectUrl;\r\n }\r\n return redirectUrl;\r\n };\r\n\r\n private _handleCancelSearchChange = (): void => {\r\n const { isSearchFormExpanded, suggestions } = this.state;\r\n\r\n if (!isSearchFormExpanded) {\r\n this.setState({\r\n isSearchFormExpanded: true,\r\n searchText: '',\r\n isInitialState: false\r\n });\r\n } else {\r\n if (suggestions && suggestions.AllSearchResults) {\r\n this._clearAutoSuggestState();\r\n }\r\n\r\n this.setState({ isSearchFormExpanded: false });\r\n }\r\n };\r\n\r\n private _appendQueryParams = (route: string, query: string, qsp: string): string => {\r\n if (route && route.length > 0) {\r\n return query && query.length > 0\r\n ? `${route}${route.indexOf('?') === -1 ? '?' : '&'}${qsp}=${encodeURIComponent(query)}`\r\n : route;\r\n }\r\n return '';\r\n };\r\n\r\n private _setAutoSuggestResultCount = (result?: Autosuggestions) => {\r\n if (this.autoSuggestResultScreenReaderDiv.current !== null) {\r\n const ariaLiveRegion = this.autoSuggestResultScreenReaderDiv.current;\r\n const suggestResultString = this.props.resources.autoSuggestFoundMessage;\r\n const emptyResultString = this.props.resources.noAutoSuggestionMessage;\r\n ariaLiveRegion.innerText = result && (result.AllSearchResults && result.AllSearchResults.length > 0) ? suggestResultString : emptyResultString;\r\n ariaLiveRegion.setAttribute('aria-live', 'assertive');\r\n return ariaLiveRegion.innerText;\r\n } else {\r\n return '';\r\n }\r\n };\r\n}\r\n\r\nexport default Search;\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\nimport * as React from 'react';\r\nimport {\r\n ISearchCategoryViewProps,\r\n ISearchFormViewProps,\r\n ISearchKeywordViewProps,\r\n ISearchProductViewProps\r\n} from '@msdyn365-commerce-modules/search/src/modules/search/./components';\r\nimport { INodeProps, Module, Node } from '@msdyn365-commerce-modules/utilities';\r\nimport Msdyn365, { getUrlSync } from '@msdyn365-commerce/core';\r\nimport { ISearchViewProps } from './mfrm-search';\r\nconst SearchView: React.FC = props => {\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 CategorySuggest,\r\n UlKeyword,\r\n UlProduct,\r\n UlCategory,\r\n form,\r\n autosuggestCategory,\r\n autosuggestKeyword,\r\n autosuggestProduct,\r\n SearchForm,\r\n FormWrapper,\r\n label,\r\n context: { app },\r\n resources: { seeAllResultButtonText, categoryTitleText }\r\n } = props;\r\n const searchInputMinLength = app.config.searchInputMinLength || 3;\r\n return (\r\n \r\n\r\n = searchInputMinLength ? 'show' : 'hide'\r\n }`}\r\n />\r\n \r\n {label}\r\n {_renderForm(form as ISearchFormViewProps, SearchForm, FormWrapper)}\r\n\r\n {searchText && searchText.length >= searchInputMinLength ? (\r\n \r\n \r\n {searchText && searchText.length > 0 ? {AutoSuggestAriaLabelText} : ''}\r\n {_renderKeywordSuggestions(KeywordSuggest, UlKeyword, autosuggestKeyword)}\r\n {_renderProductSuggestions(ProductSuggest, UlProduct, autosuggestProduct)}\r\n {_renderSearchAllButton(props, seeAllResultButtonText, autosuggestProduct, autosuggestCategory)}\r\n {_renderCategorySuggestions(CategorySuggest, UlCategory, categoryTitleText, autosuggestCategory)}\r\n \r\n \r\n ) : (\r\n ''\r\n )}\r\n \r\n );\r\n};\r\n\r\nconst _renderForm = (form: ISearchFormViewProps, SearchForm: INodeProps, FormWrapper: INodeProps) => {\r\n return (\r\n \r\n \r\n {form.submitBtn}\r\n {form.input}\r\n {form.cancelBtn}\r\n \r\n \r\n );\r\n};\r\n\r\nconst _renderKeywordSuggestions = (KeywordSuggest: INodeProps, UlKeyword: INodeProps, keywordSuggestions?: ISearchKeywordViewProps) => {\r\n return (\r\n keywordSuggestions && (\r\n \r\n \r\n {keywordSuggestions.text.map(text => {\r\n return text;\r\n })}\r\n \r\n \r\n )\r\n );\r\n};\r\n\r\nconst _renderProductSuggestions = (ProductSuggest: INodeProps, UlProduct: INodeProps, productSuggestions?: ISearchProductViewProps) => {\r\n return (\r\n productSuggestions && (\r\n \r\n \r\n {productSuggestions.title}\r\n {productSuggestions.items.map((item, index) => {\r\n return (\r\n \r\n \r\n {/* VSI Customization - Start */}\r\n {/* {item.thumbnail} */}\r\n {item.text}\r\n {/* {item.price} */}\r\n {/* VSI Customization - End */}\r\n \r\n \r\n );\r\n })}\r\n \r\n \r\n )\r\n );\r\n};\r\n\r\nconst _renderCategorySuggestions = (\r\n CategorySuggest: INodeProps,\r\n UlCategory: INodeProps,\r\n categoryTitleText: string,\r\n categorySuggestions?: ISearchCategoryViewProps\r\n) => {\r\n return (\r\n categorySuggestions && (\r\n \r\n \r\n {/* VSI Customization - Start */}\r\n {/* {categorySuggestions.title} */}\r\n \r\n {categoryTitleText}\r\n \r\n {/* VSI Customization - END */}\r\n {categorySuggestions.text.map(text => {\r\n return text;\r\n })}\r\n \r\n \r\n )\r\n );\r\n};\r\n// VSI Customization - Start\r\nconst handleSearchAllResult = async (props: React.PropsWithChildren): Promise => {\r\n\r\n const {\r\n searchText,\r\n config: { disableSubmitSearch },\r\n context: {\r\n actionContext,\r\n app: {\r\n config: { searchQueryStringParameter }\r\n }\r\n }\r\n } = props;\r\n\r\n const query = searchText && searchText;\r\n\r\n if (!query || (query && query.length === 0) || disableSubmitSearch) {\r\n // this.searchTextInput && searchText && searchText.focus();\r\n } else {\r\n const searchQsp = searchQueryStringParameter || 'q';\r\n const searchURL = _appendQueryParams(getUrlSync('search', actionContext) || '', query, searchQsp);\r\n // @ts-ignore\r\n if (utag) {\r\n // @ts-ignore\r\n utag.link({\r\n event_type: 'site_search',\r\n search_term: props.searchText,\r\n search_type: 'see-all-results-button'\r\n });\r\n }\r\n\r\n const redirectUrl = await props.handleUnbxdRedirect(query);\r\n\r\n if (Msdyn365.isBrowser) {\r\n document.location.href = redirectUrl ? redirectUrl : searchURL;\r\n }\r\n\r\n }\r\n};\r\n\r\nconst _renderSearchAllButton = (\r\n props: React.PropsWithChildren,\r\n seeAllResultButtonText: string,\r\n productSuggestions?: ISearchProductViewProps,\r\n categorySuggestions?: ISearchCategoryViewProps\r\n) => {\r\n const moduleName = 'ms-search__autoSuggest';\r\n return (\r\n (categorySuggestions || productSuggestions) && (\r\n handleSearchAllResult(props)}\r\n tabIndex='0'\r\n >\r\n {seeAllResultButtonText}\r\n \r\n )\r\n );\r\n};\r\n\r\nconst _appendQueryParams = (route: string, query: string, qsp: string): string => {\r\n if (route && route.length > 0) {\r\n return query && query.length > 0 ? `${route}${route.indexOf('?') === -1 ? '?' : '&'}${qsp}=${encodeURIComponent(query)}` : route;\r\n }\r\n return '';\r\n};\r\n// VSI Customization - END\r\nexport default SearchView;\r\n","const binding = { modules: {}, dataActions: {} };\n\n const registerActionId = (actionPath) => {\n if (binding.dataActions[actionPath] &&\n binding.dataActions[actionPath].default &&\n binding.dataActions[actionPath].default.prototype &&\n binding.dataActions[actionPath].default.prototype.id) {\n binding.dataActions[binding.dataActions[actionPath].default.prototype.id] = binding.dataActions[actionPath];\n } else {\n Object.keys(binding.dataActions[actionPath] || {}).forEach(exportName => {\n if (binding.dataActions[actionPath][exportName] &&\n binding.dataActions[actionPath][exportName].prototype &&\n binding.dataActions[actionPath][exportName].prototype.Action) {\n binding.dataActions[binding.dataActions[actionPath][exportName].prototype.id] = binding.dataActions[actionPath][exportName];\n }\n })\n }\n };\n\n const registerSanitizedActionPath = (sanitizedActionPath, dataAction) => {\n if (process.env.NODE_ENV === 'development') {\n if (!dataAction.default) {\n throw new Error('Data action path does not have a default export');\n }\n if (!(dataAction.default.prototype.id && binding.dataActions[dataAction.default.prototype.id]) || !binding.dataActions[sanitizedActionPath]) {\n binding.dataActions[sanitizedActionPath] = dataAction;\n }\n } else {\n binding.dataActions[sanitizedActionPath] = dataAction;\n if (!binding.dataActions[sanitizedActionPath].default) {\n throw new Error('Data action path ' + sanitizedActionPath + ' does not have a default export');\n }\n binding.dataActions[sanitizedActionPath].default.prototype.RegistrationId = sanitizedActionPath;\n if (binding.dataActions[sanitizedActionPath].default.prototype.id) {\n binding.dataActions[binding.dataActions[sanitizedActionPath].default.prototype.id] = sanitizedActionPath;\n }\n }\n };\n \n\n (binding.modules['mfrm-search'] = {\n c: () => require('partner/modules/mfrm-search/mfrm-search.tsx'),\n $type: 'contentModule',\n da: [{name:'listPageState', path:'modules/mfrm-search-result-container/list-page-state', runOn: 0},{name:'products', path:'modules/mfrm-search-result-container/actions/get-full-products-by-collection', runOn: 0},{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: 'mfrm-search',\n p: '__local__',\n \n pdp: '',\n \n \n md: 'src/modules/mfrm-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 const sanitizedActionPath = 'modules/mfrm-search-result-container/actions/get-full-products-by-collection';\n let dataAction = require('partner/modules/mfrm-search-result-container/actions/get-full-products-by-collection');\n registerSanitizedActionPath(sanitizedActionPath, dataAction);\n }\n \n\n {\n const sanitizedActionPath = 'modules/mfrm-search-result-container/list-page-state';\n let dataAction = require('partner/modules/mfrm-search-result-container/list-page-state');\n registerSanitizedActionPath(sanitizedActionPath, dataAction);\n }\n \n\n \n window.__bindings__ = window.__bindings__ || {};\n window.__bindings__.modules = {\n ...window.__bindings__.modules || {},\n ...binding.modules\n };\n \n window.__bindings__.dataActions = {\n ...window.__bindings__.dataActions || {},\n ...binding.dataActions\n };\n export const viewDictionary = {};\n viewDictionary['__local__|__local__|modules|mfrm-search|mfrm-search'] = {\n c: () => require('partner/modules/mfrm-search/mfrm-search.view.tsx'),\n cn: '__local__-__local__-mfrm-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 { 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 { 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","module.exports = React;","module.exports = ReactDOM;"],"names":["GetFullProductsBySearchInput","BaseCollectionInput","constructor","getCacheObjectType","dataCacheType","createObservableDataAction","id","action","async","input","ctx","searchCriteriaInput","Context","ChannelId","requestContext","apiSettings","channelId","CatalogId","catalogId","Refinement","IncludeAttributes","SkipVariantExpansion","SearchCondition","searchText","promise","searchByCriteriaAsync","callerContext","queryResultSettings","products","map","productSearchResult","newImageUrl","generateProductImageUrl","PrimaryImageUrl","count","metadata","virtualRefiners","minusVirtualRefiner","refiners","args","createBaseCollectionInput","Paging","config","Top","itemsPerPage","query","skip","Skip","SuggestionType","AutoSuggestInput","top","suggestionType","hitPrefix","hitSuffix","getCacheKey","this","searchQuery","topResultsCount","_getAutoSuggest","autosuggest","searchCriteria","ProductSearchCriteria","length","HitPrefix","HitSuffix","searchSuggestions","getSearchSuggestionsAsync","item","ImageUrl","generateImageUrl","AllSearchResults","telemetry","error","Error","autoSuggestPromises","Promise","all","then","inputData","payLoad","KeywordSuggestionsComponent","props","suggestions","getPayloadObject","telemetryContent","reactNodes","push","_assembleNode","text","ariaLabel","Value","replace","RegExp","contentAction","etext","attribute","getTelemetryAttributes","React","className","key","Id","href","_generateLink","_getHighlightedText","suggestion","searchPageURL","searchQsp","formattedLink","route","indexOf","formattedText","dangerouslySetInnerHTML","getRichTextHtml","ProductSuggestionsComponent","autoSuggestProps","context","actionContext","resources","productSuggestionHeading","moduleType","moduleId","wmapPageUrlSuffix","title","_renderTitle","items","productAutoSuggestionHeading","altText","thumbnail","_renderThumbnail","price","Value3","DecimalValue","_renderPrice","LiProduct","_getLiWrapper","AProduct","_getAWrapper","tag","searchProps","recid","linkUrl","makeAPaymentLinkUrl","onClick","e","preventDefault","utag","link","event_type","search_term","search_type","Msdyn365","window","location","unbxdDefaultVariant","ExtensionProperties","find","property","Key","LongValue","productUrl","getProductPageUrlSync","undefined","variantIdQueryParams","includes","adjustedPrice","basePrice","PriceComponent","typeName","freePriceText","priceFree","data","CustomerContextualPrice","BasePrice","request","gridSettings","imageSettings","cropFocalRegion","Image","src","viewports","xs","q","w","h","lg","xl","lazyload","loadFailureBehavior","CategorySuggestionsComponent","categorySuggestionHeading","categoryAutoSuggestionHeading","format","categoryProps","splitValue","split","pop","_generateLinkPLP","categoryPath","StringValue","categoryId","_getCategoryLinkPLP","base","origin","validCategoryPath","toLowerCase","pathWithRemovedKeyWords","removeKeywords","splice","join","FormComponent","searchPlaceholder","hideSearchLabel","isSearchFormExpanded","searchTextInput","handleInputChange","maxChars","disableSubmitSearch","handleCancelSearchChange","ariaLabelCancel","ariaLabelSearch","ariaLabelSubmit","handleSubmit","handleSearchInputClick","onInputChange","target","value","inputNode","type","name","placeholder","ref","onChange","onFocus","maxLength","submitBtnNode","Button","cancelBtn","submitBtn","LabelComponent","searchLabelClass","searchLabelArialLabel","searchtext","searchCollapsedLabel","attributes","Object","innerRef","Search","super","waitTime","_focusOutTarget","state","closest","_clearAutoSuggestState","getTelemetryObject","friendlyName","onTelemetryClick","_keyup","keyCode","KeyCodes","setState","formReference","current","contains","autoSuggestResultDiv","searchState","defaultBasicSearchUrl","searchQueryStringParameter","update","createSearchStateInput","searchRefiners","_handleInputChange","cancellabelDebounce","cancel","debounce","getSearchSuggestionsAction","_getSuggestionType","inputSuggestionType","results","_getSearchRefiners","autoSuggestAriaLabel","_setAutoSuggestResultCount","catch","exception","debug","setTimeout","suggestionTypes","distinctSuggestionTypes","forEach","suggestionTypeItem","index","charAt","toUpperCase","slice","_handleSubmit","eventType","app","focus","searchURL","_appendQueryParams","getUrlSync","redirectUrl","_handleUnbxdRedirect","MsDyn365","document","Sorting","urlTokens","itemId","locale","url","requestUrl","pathname","productResults","getSearchProducts","extProperties","redirectUrlValue","obj","_handleCancelSearchChange","isInitialState","qsp","encodeURIComponent","result","autoSuggestResultScreenReaderDiv","ariaLiveRegion","suggestResultString","autoSuggestFoundMessage","emptyResultString","noAutoSuggestionMessage","innerText","setAttribute","searchKeywordSuggestClass","searchProductSuggestClass","searchCategorySuggestClass","searchInputMaxLength","suggestionTypeCriterion","searchFormClass","telemetryPageName","body","addEventListener","componentWillUnmount","removeEventListener","componentDidUpdate","params","isEditor","render","cancelBtnAriaLabel","searchBtnAriaLabel","submitBtnAriaLabel","searchplaceholderText","keywordSuggestions","filter","i","Keyword","None","productSuggestions","Product","categorySuggestions","Category","viewProps","moduleProps","classnames","AutoSuggestAriaLabel","AutoSuggestAriaLabelText","AutoSuggest","KeywordSuggest","ProductSuggest","CategorySuggest","SearchForm","FormWrapper","role","autoComplete","onSubmit","UlKeyword","UlProduct","UlCategory","label","form","searchUrl","autosuggestKeyword","autosuggestProduct","autosuggestCategory","callbacks","handleUnbxdRedirect","renderView","getProductSearchRefinersAsync","_renderForm","Node","_renderKeywordSuggestions","_renderProductSuggestions","_renderCategorySuggestions","categoryTitleText","_renderSearchAllButton","seeAllResultButtonText","handleSearchAllResult","tabIndex","searchInputMinLength","Module","binding","modules","dataActions","registerSanitizedActionPath","sanitizedActionPath","dataAction","default","prototype","RegistrationId","c","require","$type","da","path","runOn","iNM","ns","n","p","pdp","md","__bindings__","viewDictionary","cn","SearchState","__decorate","observable","GenericInput","getGenericActionDataAction","getGenericAction","module","exports","ReactDOM"],"sourceRoot":""}