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AA,EAAAA,IAAAA,CAAXC,EAAAA,IAAW,sCACAD,EAAAA,EAAAA,IAAAA,CAAXC,EAAAA,IAAW,sCACAD,EAAAA,EAAAA,IAAAA,CAAXC,EAAAA,IAAW,yCACAD,EAAAA,EAAAA,IAAAA,CAAXC,EAAAA,IAAW,yCACAD,EAAAA,EAAAA,IAAAA,CAAXC,EAAAA,IAAW,gCACAD,EAAAA,EAAAA,IAAAA,CAAXC,EAAAA,IAAW,gCACAD,EAAAA,EAAAA,IAAAA,CAAXC,EAAAA,IAAW,sCACAD,EAAAA,EAAAA,IAAAA,CAAXC,EAAAA,IAAW,oCAMV,MAAOpD,EAAb1K,cACW,KAAAa,YAAc,IAAM,gBACpB,KAAAU,mBAAqB,IAAM,gBAC3B,KAAAC,cAAgB,IAAiB,eAGrC1D,eAAeiQ,EAClB5J,EACAC,GAEA,OAAO,IAAIiJ,EAMR,MAAMW,EACTpL,GAEO,IAAI8H,EAMf,GAAe1G,EAAAA,EAAAA,IAA0C,CACrDE,OAAgC6J,EAChC5J,MAAO6J","sources":["webpack://mattressfirm/./src/Utilities/plp-url-utils.ts?728b","webpack://mattressfirm/./src/modules/mfrm-search-result-container/actions/base-collection-action.ts?d7f5","webpack://mattressfirm/./src/modules/mfrm-search-result-container/actions/get-categories.ts?d01e","webpack://mattressfirm/./src/modules/mfrm-search-result-container/actions/get-categories-hierarchy.ts?c413","webpack://mattressfirm/./src/modules/mfrm-search-result-container/actions/get-current-category.ts?51d0","webpack://mattressfirm/./src/modules/mfrm-search-result-container/actions/get-full-products-by-collection.ts?a510","webpack://mattressfirm/./src/modules/mfrm-search-result-container/actions/get-product-refiner-hierarchy.ts?fe25","webpack://mattressfirm/./src/modules/mfrm-search-result-container/actions/get-refiners-for-collection.ts?0b98","webpack://mattressfirm/./src/modules/mfrm-search-result-container/actions/url-utils.ts?05d8","webpack://mattressfirm/./src/modules/mfrm-search-result-container/list-page-state.ts?a8cb"],"sourcesContent":["import { IProductRefinerHierarchy } from '@msdyn365-commerce/commerce-entities';\r\nimport { IRequestContext } from '@msdyn365-commerce/core';\r\nimport { ProductRefinerValue } from '@msdyn365-commerce/retail-proxy';\r\nexport interface IVirtualRefinersConfig {\r\n order: number;\r\n refinerName: string;\r\n enableForMattresses: boolean;\r\n enableForOtherCategories: boolean;\r\n allowDuplicate: boolean;\r\n}\r\n\r\n/**\r\n * This will create the canonicalURL as per 7924 requirement\r\n * @param requestContext\r\n * @returns string of canonical URL\r\n */\r\nexport const canonicalURL = (requestContext: IRequestContext): string => {\r\n const requestUrl = requestContext.url.requestUrl;\r\n const origin = requestUrl.origin;\r\n const path = requestUrl.pathname.toLowerCase();\r\n\r\n // separate out url parts split on forward / and remove first empty index\r\n let urlParts = path?.split('/').splice(1);\r\n\r\n // remove double values containing pipe sign\r\n if (path.match(/%7c/)) {\r\n urlParts = removePipeSignValue(urlParts);\r\n }\r\n\r\n // remove unwanted keywords from url\r\n urlParts = removeKeywords(urlParts, requestContext);\r\n\r\n const filteredPath = urlParts?.join('/');\r\n\r\n return `${origin}/${filteredPath}`;\r\n};\r\n\r\nexport const filteredURL = (requestContext: IRequestContext): string => {\r\n const requestUrl = requestContext.url.requestUrl;\r\n const path = requestUrl.pathname.toLowerCase();\r\n\r\n // separate out url parts split on forward / and remove first empty index\r\n let urlParts = path?.split('/').splice(1);\r\n\r\n // remove unwanted keywords from url\r\n urlParts = removeKeywords(urlParts, requestContext);\r\n\r\n const filteredPath = urlParts?.join('/');\r\n\r\n return `/${filteredPath}`;\r\n};\r\n\r\n/**\r\n * This will create the canonicalURL as per 7924 requirement\r\n * @param requestContext\r\n * @returns string of canonical URL\r\n */\r\nexport const canonicalURLWithoutBaseUrl = (requestContext: IRequestContext): string => {\r\n const requestUrl = requestContext.url.requestUrl;\r\n const path = requestUrl.pathname.toLowerCase();\r\n\r\n // separate out url parts split on forward / and remove first empty index\r\n let urlParts = path?.split('\\/').splice(1);\r\n\r\n // remove double values containing pipe sign\r\n if (path.match(/%7c/)) {\r\n urlParts = removePipeSignValue(urlParts);\r\n }\r\n\r\n // remove unwanted keywords from url\r\n urlParts = removeKeywords(urlParts, requestContext);\r\n\r\n return urlParts?.join('\\/');\r\n};\r\n\r\n/**\r\n * This will remove the Pipe sign value set from urlParts\r\n * @param urlParts\r\n * @returns\r\n */\r\nexport const removePipeSignValue = (urlParts: string[]) => {\r\n // urlParts.forEach((part, index) => {\r\n // const indexOfValue = urlParts.indexOf('%7c');\r\n // if (indexOfValue !== -1) {\r\n // urlParts.splice(indexOfValue, 1);\r\n // }\r\n // });\r\n\r\n if (urlParts !== undefined && urlParts.length > 0) {\r\n urlParts = urlParts.filter(urlPart => urlPart.indexOf('%7c') === -1);\r\n }\r\n\r\n return urlParts;\r\n};\r\n\r\n/**\r\n * This will remove the keywords from urlParts array which were received from\r\n * the app.settings.json/CMS Extensions\r\n * @param urlParts\r\n * @param requestContext\r\n * @returns urlParts array filtered\r\n */\r\nexport const removeKeywords = (urlParts: string[], requestContext: IRequestContext): string[] => {\r\n const removeKeywordFromUrl = requestContext.app.config.removeKeywordFromUrl;\r\n\r\n if (urlParts.length > 0 && removeKeywordFromUrl && removeKeywordFromUrl.length > 0) {\r\n const removeKeywordFromUrlArray: string[] = removeKeywordFromUrl?.trim().split(',');\r\n removeKeywordFromUrlArray?.length > 0 &&\r\n urlParts.forEach(_part => {\r\n removeKeywordFromUrlArray.forEach(removeKeyword => {\r\n const trimmedKeyword = removeKeyword.trim().toLowerCase();\r\n const indexOfValue = urlParts.indexOf(trimmedKeyword);\r\n if (trimmedKeyword.length > 0 && indexOfValue !== -1) {\r\n urlParts.splice(indexOfValue, 1);\r\n }\r\n });\r\n });\r\n }\r\n\r\n return urlParts;\r\n};\r\n\r\n/**\r\n * This will sort the Virtual refiner config based on order and return\r\n * only active virtual refiner configs based on isMattress category will\r\n * be returned\r\n * @param requestContext\r\n * @param isMattressesCategory boolean | undefined\r\n * @returns IVirtualRefinersConfig[] | undefined\r\n */\r\nexport const getSortedVirtualRefinerConfig = (\r\n requestContext: IRequestContext,\r\n isMattressesCategory: boolean | undefined\r\n): IVirtualRefinersConfig[] | undefined => {\r\n let appConfigSorted = getVirtualRefinerConfig(requestContext);\r\n\r\n // sort the config by provided config\r\n if (appConfigSorted) {\r\n if (isMattressesCategory === true) {\r\n appConfigSorted = appConfigSorted.filter(appConfig => {\r\n return appConfig.enableForMattresses;\r\n });\r\n } else if (isMattressesCategory === false) {\r\n appConfigSorted = appConfigSorted.filter(appConfig => {\r\n return appConfig.enableForOtherCategories;\r\n });\r\n }\r\n appConfigSorted.sort((a: IVirtualRefinersConfig, b: IVirtualRefinersConfig) => {\r\n return a.order - b.order;\r\n });\r\n }\r\n\r\n return appConfigSorted;\r\n};\r\n\r\n/**\r\n * Virtual refiner names from the app.settings.json will be returned which can be used\r\n * to filter out refiners data based upon active virtual refiners\r\n * @param requestContext\r\n * @param isMattressesCategory boolean | undefined\r\n * @returns string[]\r\n */\r\nexport const getVirtualRefinerNames = (requestContext: IRequestContext, isMattressesCategory: boolean | undefined): string[] => {\r\n const sortedVirtualRefinerConfig = getSortedVirtualRefinerConfig(requestContext, isMattressesCategory);\r\n\r\n const appConfigRefinerNames: string[] = [];\r\n\r\n sortedVirtualRefinerConfig &&\r\n sortedVirtualRefinerConfig.forEach(sortedConfig => {\r\n appConfigRefinerNames.push(sortedConfig.refinerName.trim().toLowerCase());\r\n });\r\n\r\n return appConfigRefinerNames;\r\n};\r\n\r\n/**\r\n * This will return the value of virtual refiner configuration\r\n * @param requestContext\r\n * @returns IVirtualRefinersConfig[] | undefined\r\n */\r\nexport const getVirtualRefinerConfig = (requestContext: IRequestContext): IVirtualRefinersConfig[] => {\r\n return requestContext.app.config.urlModifications;\r\n};\r\n\r\nexport async function getVirtualRefinerValues(\r\n requestContext: IRequestContext,\r\n virtualRefiners: IProductRefinerHierarchy[]\r\n): Promise {\r\n const virtualRefinerValues: ProductRefinerValue[] = [];\r\n if (virtualRefiners.length === 0) {\r\n return virtualRefinerValues;\r\n }\r\n const requestUrl = requestContext.url.requestUrl;\r\n // const origin = requestUrl.origin;\r\n const path = requestUrl.pathname;\r\n\r\n // separate out url parts split on forward / and remove first empty index\r\n let urlParts = path?.split('/').splice(1);\r\n\r\n // remove unwanted keywords from url\r\n urlParts = removeKeywords(urlParts, requestContext);\r\n\r\n // remove category id {categoryid}.c\r\n const categoryIdToken = requestContext.urlTokens.recordId;\r\n const categoryId = categoryIdToken ? `${categoryIdToken}.c` : undefined;\r\n\r\n if (categoryId) {\r\n urlParts.splice(-1);\r\n }\r\n\r\n // run loop for each url part and get values from refiners for further usage\r\n const finalizedUrlParts: string[] = [];\r\n urlParts.forEach(plainUrlPart => {\r\n const urlPart = decodeURIComponent(plainUrlPart);\r\n if (urlPart.indexOf('|') !== -1) {\r\n const splitOnPipeSign = urlPart?.split('|');\r\n const filteredParts = splitOnPipeSign.filter(part => part.length > 0);\r\n filteredParts.forEach(filteredPart => {\r\n finalizedUrlParts.push(filteredPart.toLowerCase().trim());\r\n });\r\n }\r\n finalizedUrlParts.push(urlPart);\r\n });\r\n finalizedUrlParts.forEach((urlPart) => {\r\n virtualRefiners.forEach((mainRefiner) => {\r\n mainRefiner.Values.forEach((refinerValue) => {\r\n const refinerValueKeyName = refinerValue.LeftValueBoundString?.toLowerCase().trim().split(' ')?.join('-').replace(/\\&/g, 'and').replace(regExSpecialChars(requestContext.app.config.canonicalUrlspecialCharIncludeList), '-');\r\n if (refinerValueKeyName && refinerValueKeyName === urlPart) {\r\n virtualRefinerValues.push(refinerValue);\r\n }\r\n });\r\n });\r\n });\r\n\r\n return virtualRefinerValues;\r\n}\r\n\r\n/**\r\n * For navigation menu links, it will remove keywords configured in global configurations from the navigation link\r\n * and clp link and return url path string\r\n * @param link\r\n * @param requestContext\r\n * @returns string\r\n */\r\nexport const navLinkKeywordRemoval = (link: string, requestContext: IRequestContext): string => {\r\n // Using the rest operator in case there is a weirdly formatted URL with multiple question marks.\r\n const [linkBase, ...linkParams] = link?.split('?');\r\n\r\n // Only apply to category links and product links, which end in .c or .p. Check that a keyword is configured.\r\n if (!linkBase.endsWith('.c') && !linkBase.endsWith('.p') || !requestContext.app.config) {\r\n return link;\r\n }\r\n\r\n // Separate out url parts split on forward /\r\n let urlParts = linkBase?.split('\\/');\r\n\r\n // Remove unwanted keywords from url\r\n urlParts = removeKeywords(urlParts, requestContext);\r\n\r\n // Glue the URL params back together\r\n const linkParam = linkParams.map(param => `?${param}`)?.join('');\r\n\r\n // Rebuild URL by joining with forward slash and appending any URL parameters\r\n const filteredLink = `${urlParts?.join('/')}${linkParam}`;\r\n return `${filteredLink}`;\r\n};\r\nexport const regExSpecialChars = (includeConfigList: string): RegExp => {\r\n let includeConfig = '';\r\n if (includeConfigList !== undefined && includeConfigList !== '') {\r\n includeConfig = includeConfigList?.trim().split(',')?.join('\\\\\\\\');\r\n includeConfig = includeConfig && includeConfig !== '' ? `\\\\\\\\${includeConfig}` : '';\r\n const pattern = `[^\\\\w\\\\&\\\\|${includeConfig}]`;\r\n return new RegExp(pattern, 'gi');\r\n } else {\r\n\r\n const pattern = `[^\\\\w\\\\&\\\\|]`;\r\n return new RegExp(pattern, 'gi');\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\nimport { buildCacheKey, QueryResultSettingsProxy } from '@msdyn365-commerce-modules/retail-actions';\r\nimport {\r\n CacheType,\r\n IActionInput,\r\n IAny,\r\n getCatalogId,\r\n ICommerceApiSettings,\r\n ICreateActionContext,\r\n IGeneric\r\n} from '@msdyn365-commerce/core';\r\n/* tslint:disable: no-duplicate-imports */\r\nimport { convertToString, IQueryResultSettings, ProductRefinerValue, SortColumn } from '@msdyn365-commerce/retail-proxy';\r\nimport { toJS } from 'mobx';\r\nimport { hydrateRefinersFromUrl } from './url-utils';\r\n\r\nexport type listPageType = 'Category' | 'Search' | 'Unknown';\r\n\r\n/**\r\n * Get include attributes from config.\r\n */\r\nfunction getIncludeAttributes(inputData: ICreateActionContext, IGeneric>): boolean {\r\n if (inputData &&\r\n inputData.config &&\r\n inputData.config.includeAttributes !== undefined &&\r\n inputData.config.includeAttributes === true) {\r\n return true;\r\n }\r\n return false;\r\n}\r\n/**\r\n * Get updateRefinerPanel from config.\r\n * @param inputData - ICreateActionContext.\r\n * @returns Boolean.\r\n */\r\nfunction getUpdateRefinerPanel(inputData: ICreateActionContext, IGeneric>): boolean {\r\n return !!inputData.config?.updateRefinerPanel;\r\n}\r\n/**\r\n * BaseCollection Action Input\r\n */\r\nexport class BaseCollectionInput implements IActionInput {\r\n public pageType: listPageType;\r\n public category: number | undefined;\r\n public searchText: string | undefined;\r\n public refiners: ProductRefinerValue[];\r\n public queryResultSettings: IQueryResultSettings;\r\n public apiSettings: ICommerceApiSettings;\r\n public includeAttributes: boolean | undefined;\r\n public locale?: string;\r\n // VSI Customization 7924 Start\r\n public urlPathName?: string;\r\n // VSI Customization 7924 End\r\n public isSizeRefinerAndCategory?: boolean | undefined;\r\n public isUpdateRefinerPanel?: boolean | undefined;\r\n public catalogId?: number | undefined;\r\n constructor(\r\n pageType: listPageType,\r\n apiSettings: ICommerceApiSettings,\r\n queryResultSettings: IQueryResultSettings,\r\n refiners: ProductRefinerValue[],\r\n category: number | undefined,\r\n searchText: string | undefined,\r\n includeAttributes: boolean | undefined,\r\n locale?: string,\r\n // VSI Customization 7924 Start\r\n urlPathName?: string,\r\n // VSI Customization 7924 End\r\n isSizeRefinerAndCategory?: boolean | undefined,\r\n isUpdateRefinerPanel?: boolean | undefined,\r\n catalogId?: number | undefined\r\n ) {\r\n this.pageType = pageType;\r\n this.apiSettings = apiSettings;\r\n this.category = category;\r\n this.searchText = searchText;\r\n this.queryResultSettings = queryResultSettings;\r\n this.refiners = refiners;\r\n this.includeAttributes = includeAttributes;\r\n this.locale = locale;\r\n // VSI Customization 7924 Start\r\n this.urlPathName = urlPathName;\r\n // VSI Customization 7924 End\r\n this.isSizeRefinerAndCategory = isSizeRefinerAndCategory;\r\n this.isUpdateRefinerPanel = isUpdateRefinerPanel;\r\n this.catalogId = catalogId ?? 0;\r\n if (this.refiners && this.refiners.length > 0) {\r\n this.refiners[0].ExtensionProperties = [\r\n {\r\n Key: 'ISREQUESTOVERRIDE',\r\n Value: {\r\n BooleanValue: (!isSizeRefinerAndCategory || isSizeRefinerAndCategory === undefined ? false : true),\r\n ByteValue: undefined,\r\n DateTimeOffsetValue: undefined,\r\n DecimalValue: undefined,\r\n IntegerValue: undefined,\r\n LongValue: undefined,\r\n StringValue: undefined\r\n }\r\n }\r\n ];\r\n }\r\n }\r\n public getCacheKey = () => {\r\n const queryResultSettings = {\r\n ...this.queryResultSettings.Paging,\r\n ...toJS(this.queryResultSettings.Sorting)\r\n };\r\n\r\n return buildCacheKey(\r\n `${this.pageType}-${this.locale}-${this.category || this.searchText}-${this.refiners.map(refiner => `${refiner.RefinerRecordId}${refiner.LeftValueBoundString || ''}${refiner.RightValueBoundString || ''}-`)}-${convertToString(queryResultSettings)}-${this.urlPathName}`,\r\n this.apiSettings, this.locale\r\n );\r\n };\r\n\r\n public getCacheObjectType = () => 'CollectionActionResult';\r\n public dataCacheType = (): CacheType => 'application';\r\n}\r\n\r\n\r\n// TODO: Create a data model here or import one to capture the response of the action\r\nexport interface IGetFullProductsByCollectionData {\r\n text: string;\r\n}\r\n\r\nexport type CollectionClassConstructor = new (\r\n pageType: listPageType,\r\n apiSettings: ICommerceApiSettings,\r\n queryResultSettings: IQueryResultSettings,\r\n refiners: ProductRefinerValue[],\r\n category: number | undefined,\r\n searchText: string | undefined,\r\n includeAttributes: boolean | undefined,\r\n locale?: string,\r\n // VSI Customization 7924 Start\r\n urlPathName?: string,\r\n // VSI Customization 7924 End\r\n isSizeRefinerAndCategory?: boolean | undefined,\r\n isUpdateRefinerPanel?: boolean | undefined,\r\n catalogId?: number | undefined,\r\n\r\n) => BaseCollectionInput;\r\n\r\n/**\r\n * TODO: Use this function to create the input required to make the action call\r\n */\r\nexport const createBaseCollectionInput = (\r\n args: ICreateActionContext,\r\n inputClassConstuctor: CollectionClassConstructor\r\n): BaseCollectionInput => {\r\n const pageType =\r\n args.requestContext.urlTokens.pageType === 'Category' || (args.requestContext.query && args.requestContext.query.categoryId)\r\n ? 'Category'\r\n : 'Search';\r\n\r\n const queryResultSettings = QueryResultSettingsProxy.fromInputData(args).QueryResultSettings;\r\n const queryRefiners = hydrateRefinersFromUrl(args.requestContext);\r\n const includeAttributes = getIncludeAttributes(args);\r\n // VSI Customization 7924 Start\r\n const pathName = args.requestContext.url.requestUrl.pathname;\r\n // VSI Customization 7924 End\r\n\r\n const isUpdateRefinerPanel = getUpdateRefinerPanel(args);\r\n const catalogId = getCatalogId(args.requestContext);\r\n\r\n if (args.requestContext.query && args.requestContext.query.sorting) {\r\n queryResultSettings.Sorting = { Columns: JSON.parse(decodeURIComponent(args.requestContext.query.sorting)) };\r\n }\r\n\r\n if (pageType === 'Category') {\r\n return new inputClassConstuctor(\r\n pageType,\r\n args.requestContext.apiSettings,\r\n queryResultSettings,\r\n queryRefiners,\r\n +(args.requestContext.urlTokens.itemId || (args.requestContext.query && args.requestContext.query.categoryId) || 0),\r\n undefined,\r\n includeAttributes,\r\n args.requestContext.locale,\r\n pathName, undefined, isUpdateRefinerPanel, catalogId\r\n );\r\n } else if (pageType === 'Search' && args.requestContext.query && args.requestContext.query.q) {\r\n return new inputClassConstuctor(\r\n pageType,\r\n args.requestContext.apiSettings,\r\n queryResultSettings,\r\n queryRefiners,\r\n undefined,\r\n args.requestContext.query.q,\r\n includeAttributes,\r\n args.requestContext.locale, undefined, undefined, isUpdateRefinerPanel, catalogId\r\n );\r\n } else if (pageType === 'Search' && args.requestContext.query && args.requestContext.query.productId) {\r\n return new inputClassConstuctor(\r\n pageType,\r\n args.requestContext.apiSettings,\r\n queryResultSettings,\r\n queryRefiners,\r\n undefined,\r\n args.requestContext.query.productId,\r\n includeAttributes,\r\n args.requestContext.locale, undefined, undefined, isUpdateRefinerPanel, catalogId\r\n );\r\n }\r\n\r\n throw new Error('[getFullProductsForCollection]Unable to create input');\r\n};","import { CategoryHierarchy } from '@msdyn365-commerce/commerce-entities';\r\nimport {CacheType, createObservableDataAction, IAction, IActionContext, IActionInput, IAny, ICreateActionContext, IGeneric, IRequestContext } from '@msdyn365-commerce/core';\r\nimport { getCategoriesAsync } from '@msdyn365-commerce/retail-proxy/dist/DataActions/CategoriesDataActions.g';\r\n\r\n/**\r\n * Input for get-categories data action\r\n */\r\nexport class CategoriesInput implements IActionInput {\r\n public readonly maxItems: number;\r\n public readonly channelId: number;\r\n private _mappedToHierarchy: boolean;\r\n constructor(context: IRequestContext, mappedToHierarchy: boolean, maxItems?: number) {\r\n this._mappedToHierarchy = mappedToHierarchy;\r\n this.maxItems = maxItems || 250;\r\n this.channelId = context && context.apiSettings && context.apiSettings.channelId ? Number(context.apiSettings.channelId) : 0;\r\n }\r\n\r\n public getCacheKey = () => `${this.channelId}|top-${this.maxItems || 250}`;\r\n public getCacheObjectType = () => (this._mappedToHierarchy ? 'CategoryHierarchy' : 'Category');\r\n public dataCacheType = (): CacheType => 'application';\r\n}\r\n\r\n/**\r\n * Creates the input required to make the retail api call\r\n */\r\nexport const createCategoriesInput = (inputData: ICreateActionContext>): IActionInput => {\r\n const topItems = inputData.config && inputData.config.topCategories && parseInt(inputData.config.topCategories, 10);\r\n return new CategoriesInput(inputData.requestContext, false, topItems);\r\n};\r\n\r\n/**\r\n * Calls the Retail API and returns all the categories as a flat list\r\n */\r\nexport async function getCategoryAction(input: CategoriesInput, ctx: IActionContext): Promise {\r\n return (getCategoriesAsync({ callerContext: ctx }, input.channelId));\r\n}\r\n\r\nexport const getCategoryActionDataAction = createObservableDataAction({\r\n id: '@msdyn365-commerce-modules/retail-actions/get-categories',\r\n action: >getCategoryAction,\r\n input: createCategoriesInput\r\n});\r\n\r\nexport default getCategoryActionDataAction;","import { buildCacheKey, getCategoryUrl } from '@msdyn365-commerce-modules/retail-actions';\r\nimport { CategoryHierarchy } from '@msdyn365-commerce/commerce-entities';\r\nimport {\r\n CacheType, createObservableDataAction, IAction, IActionContext, IActionInput, IAny,\r\n ICommerceApiSettings, ICreateActionContext, IGeneric, IRequestContext\r\n} from '@msdyn365-commerce/core';\r\nimport { Category, TextValueTranslation } from '@msdyn365-commerce/retail-proxy';\r\nimport getCategoryAction, { CategoriesInput as RawCategoriesInput } from './get-categories';\r\n\r\n/**\r\n * Input for get-categories data action\r\n */\r\nexport class CategoriesInput implements IActionInput {\r\n public readonly maxItems: number;\r\n public readonly channelId: number;\r\n private readonly sitePath: string;\r\n private _mappedToHierarchy: boolean;\r\n private apiSettings: ICommerceApiSettings;\r\n private locale?: string;\r\n\r\n constructor(context: IRequestContext, mappedToHierarchy: boolean, maxItems?: number) {\r\n this._mappedToHierarchy = mappedToHierarchy;\r\n this.maxItems = maxItems || 250;\r\n this.channelId = context && context.apiSettings && context.apiSettings.channelId ? +context.apiSettings.channelId : 0;\r\n this.sitePath = context && context.sitePath || '';\r\n this.apiSettings = context.apiSettings;\r\n this.locale = context.locale || '';\r\n }\r\n\r\n public getCacheKey = () => buildCacheKey(`${this.channelId}|${this.sitePath}|top-${this.maxItems || 250}`, this.apiSettings, this.locale);\r\n public getCacheObjectType = () => (this._mappedToHierarchy ? 'CategoryHierarchy' : 'Category');\r\n public dataCacheType = (): CacheType => 'application';\r\n public getLocale = (): string => this.locale || '';\r\n}\r\n\r\nconst getFriendlyName = (locale?: string, nameTranslations?: TextValueTranslation[]): string | undefined => {\r\n let nameTranslation: TextValueTranslation | undefined;\r\n if (locale && nameTranslations && nameTranslations.length > 0) {\r\n nameTranslation = nameTranslations.find(item => item.Language!.toLowerCase() === locale.toLowerCase());\r\n }\r\n\r\n return nameTranslation && nameTranslation.Text;\r\n};\r\n\r\nexport interface ICategoryMap {\r\n [RecordId: number]: CategoryHierarchy;\r\n}\r\n\r\n/**\r\n * Creates a hierarchy of categories based on the ParentCategory property\r\n * @param categoryList Categories that will be converted into a hierarchy\r\n * @returns Hierarchy of categories in array\r\n */\r\nexport const mapCategoryToHierarchy = (categoryList: Category[], ctx: IActionContext, locale?: string): CategoryHierarchy[] => {\r\n if (!categoryList || !categoryList.length) {\r\n return [];\r\n }\r\n\r\n const categoryMap: ICategoryMap = categoryList.reduce((memo: ICategoryMap, category: Category) => {\r\n const localName = getFriendlyName(locale, category.NameTranslations);\r\n const categoryHierarchy = { ...category };\r\n categoryHierarchy.NeutralizedName = category.Name;\r\n categoryHierarchy.Name = localName || categoryHierarchy.NeutralizedName;\r\n memo[category.RecordId] = categoryHierarchy;\r\n return memo;\r\n }, {});\r\n\r\n let zeroCategory = categoryMap[0];\r\n\r\n Object.keys(categoryMap).forEach((id: string) => {\r\n const element = categoryMap[+id];\r\n const parentId = element.ParentCategory;\r\n element.Url = getCategoryUrl(element, ctx, categoryMap);\r\n if (parentId === 0) {\r\n zeroCategory = element;\r\n return;\r\n }\r\n\r\n const parent = parentId && categoryMap[parentId];\r\n if (parent) {\r\n parent.Children = parent.Children || [];\r\n parent.Children.push(element);\r\n }\r\n });\r\n\r\n return (zeroCategory && zeroCategory.Children) || [];\r\n};\r\n\r\n/**\r\n * Creates the input required to make the retail api call\r\n */\r\nexport const createCategoriesHierarchyInput = (inputData: ICreateActionContext>): IActionInput => {\r\n const topItems = inputData.config && inputData.config.topCategories && parseInt(inputData.config.topCategories, 10);\r\n return new CategoriesInput(inputData.requestContext, true, topItems);\r\n};\r\n\r\n/**\r\n * Calls the Retail API and returns all the categories as a hierarchy\r\n */\r\nexport async function getCategoryHierarchyAction(input: CategoriesInput, ctx: IActionContext): Promise {\r\n const categories = await getCategoryAction(\r\n new RawCategoriesInput(ctx.requestContext, false, input.maxItems),\r\n ctx\r\n );\r\n return mapCategoryToHierarchy(categories, ctx, input.getLocale());\r\n}\r\n\r\nexport const getCategoryHierarchyActionDataAction = createObservableDataAction({\r\n id: '@msdyn365-commerce-modules/retail-actions/get-categories-hierarchy',\r\n action: >getCategoryHierarchyAction,\r\n input: createCategoriesHierarchyInput\r\n});\r\n\r\nexport default getCategoryHierarchyActionDataAction;","import { buildCacheKey, parameterize } from '@msdyn365-commerce-modules/retail-actions';\r\nimport { CategoryHierarchy } from '@msdyn365-commerce/commerce-entities';\r\nimport {\r\n CacheType, createObservableDataAction, getParameterizeFeatureFlags, IAction, IActionContext, IActionInput,\r\n IAny, ICommerceApiSettings, ICreateActionContext, IGeneric, IParameterizeFeatureFlags, IRequestContext\r\n} from '@msdyn365-commerce/core';\r\nimport getCategoryHierarchy, { CategoriesInput } from './get-categories-hierarchy';\r\n\r\n/**\r\n * Input class for GetCurrentCategory data action\r\n */\r\nexport class CurrentCategoryInput implements IActionInput {\r\n public categoryId?: number;\r\n public categorySlug?: string;\r\n private apiSettings: ICommerceApiSettings;\r\n\r\n constructor(context: IRequestContext) {\r\n let categoryId;\r\n let categorySlug;\r\n if (context.query && context.query.categoryId) {\r\n categoryId = Number(context.query.categoryId);\r\n\r\n if (Number.isNaN(categoryId)) {\r\n throw new Error('Failed to cast category id into a number.');\r\n }\r\n // @ts-ignore: RecordId URLToken not typed yet\r\n } else if (context.urlTokens && context.urlTokens.recordId) {\r\n // @ts-ignore: RecordId URLToken not typed yet\r\n categoryId = Number(context.urlTokens.recordId);\r\n if (Number.isNaN(categoryId)) {\r\n throw new Error('Failed to cast category id into a number.');\r\n }\r\n } else if (context.urlTokens && context.urlTokens.categories && context.urlTokens.categories.length) {\r\n const categories: string[] = (context.urlTokens.categories);\r\n\r\n if (!categories.length) {\r\n throw new Error('Failed to get category name from urlTokens');\r\n }\r\n // TODO: fix getParameterizeFeatureFlags to take requestContext as input.\r\n const tempActionContext = {\r\n requestContext: context\r\n };\r\n categorySlug = `/${categories\r\n .map(category => {\r\n // @ts-ignore TODO: fix getParameterizeFeatureFlags to take requestContext as an input\r\n const parameterizeFeatureFlags: IParameterizeFeatureFlags = getParameterizeFeatureFlags(tempActionContext);\r\n return parameterize(category, undefined, parameterizeFeatureFlags);\r\n })\r\n .join('/')}`;\r\n }\r\n this.categoryId = categoryId;\r\n this.categorySlug = categorySlug;\r\n this.apiSettings = context.apiSettings;\r\n }\r\n\r\n public getCacheKey = () => buildCacheKey(`${this.categoryId || this.categorySlug}`, this.apiSettings);\r\n public getCacheObjectType = () => 'Current-Category';\r\n public dataCacheType = (): CacheType => 'application';\r\n}\r\n\r\n/**\r\n * Creates a current category input from an ICreateActionContext\r\n */\r\nexport const createGetCurrentCategoryInput = (inputData: ICreateActionContext>): IActionInput => {\r\n if (inputData && inputData.requestContext) {\r\n return new CurrentCategoryInput(inputData.requestContext);\r\n }\r\n\r\n throw new Error('Please specify categoryId query string in request.');\r\n};\r\n\r\n/**\r\n * Rescrusive Search Method to find a given category amongts a complete CategoryHierarcy\r\n * @param categories The current Category Hierarchy\r\n * @param categorySlug The category slug being searched for\r\n * @param categoryId The category Id being search for\r\n */\r\nexport function searchCategory(categories: CategoryHierarchy[], categorySlug?: string, categoryId?: number): CategoryHierarchy | undefined {\r\n let foundCategory;\r\n // @ts-ignore\r\n categories.forEach((cat: CategoryHierarchy) => {\r\n if ((categoryId && cat.RecordId === categoryId) || (categorySlug && cat.Slug === categorySlug)) {\r\n return (foundCategory = cat);\r\n } else if (cat.Children && cat.Children.length) {\r\n const matchingChild = searchCategory(cat.Children, categorySlug, categoryId);\r\n if (matchingChild) {\r\n foundCategory = matchingChild;\r\n }\r\n }\r\n });\r\n return foundCategory;\r\n}\r\n\r\n/**\r\n * Action method for the getCurrentCategory Data Action\r\n * @param input The action input class\r\n * @param ctx The action context\r\n */\r\n// @ts-ignore\r\nexport async function getCurrentCategoryAction(input: CurrentCategoryInput, ctx: IActionContext): Promise {\r\n if (input.categorySlug || input.categoryId) {\r\n const categoryInput = new CategoriesInput(ctx.requestContext, true);\r\n const categories = await getCategoryHierarchy(categoryInput, ctx);\r\n if (!categories) {\r\n ctx.trace('[getCurrentCategory] Unable to get categories from server');\r\n return;\r\n }\r\n\r\n const category = searchCategory(categories, input.categorySlug, input.categoryId);\r\n if (!category) {\r\n ctx.trace('[getCurrentCategory] Unable to find category');\r\n return;\r\n }\r\n return category;\r\n }\r\n}\r\n\r\n/**\r\n * The getCurrentCategory data action\r\n * First makes a call to the getCategories RetailServer API\r\n * to get a list of every available category, then returns a CategoryHierarchy\r\n * based on the categoryId query param set in the URL of the request\r\n */\r\nexport const getCurrentCategoryActionDataAction = createObservableDataAction({\r\n id: '@msdyn365-commerce-modules/retail-actions/get-current-category',\r\n action: >getCurrentCategoryAction,\r\n input: createGetCurrentCategoryInput\r\n});\r\n\r\nexport default getCurrentCategoryActionDataAction;\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/* tslint:disable: no-duplicate-imports */\r\nimport { generateProductImageUrl } from '@msdyn365-commerce-modules/retail-actions';\r\nimport MsDyn365, {\r\n createObservableDataAction,\r\n IAction,\r\n IActionContext,\r\n IActionInput,\r\n ICreateActionContext\r\n} from '@msdyn365-commerce/core';\r\nimport { AsyncResult, ProductRefinerValue, 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 './base-collection-action';\r\n\r\nimport { getVirtualRefinerNames, getVirtualRefinerValues } from '../../../Utilities/plp-url-utils';\r\nimport { ListPageStateInput } from '../list-page-state';\r\nimport getCurrentCategory, { CurrentCategoryInput } from './get-current-category';\r\n// VSI Customization 7294 Start\r\nimport getProductRefinerHierarchy, { RefinersByCollectionInput } from './get-refiners-for-collection';\r\n// VSI Customization 7294 End\r\nimport { IFullProductsSearchResultsWithCount } from './IFullProductsSearchResultsWithCount';\r\n\r\n/**\r\n * GetFullProductsByCollection Action Input\r\n */\r\nexport class GetFullProductsByCollectionInput extends BaseCollectionInput implements IActionInput {\r\n public getCacheObjectType = () => 'FullProductSearchResult';\r\n public dataCacheType = () => {\r\n if (\r\n this.pageType !== 'Category' ||\r\n (this.refiners && this.refiners.length > 0) ||\r\n (this.queryResultSettings && this.queryResultSettings.Sorting && this.queryResultSettings.Sorting.Columns && this.queryResultSettings.Sorting.Columns.length > 0)\r\n ) {\r\n return 'request';\r\n } else {\r\n return 'application';\r\n }\r\n };\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, GetFullProductsByCollectionInput);\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?.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: GetFullProductsByCollectionInput,\r\n ctx: IActionContext\r\n): Promise {\r\n let promise: AsyncResult;\r\n let searchProductId;\r\n const refinerBoundString = 'LeftValueBoundString';\r\n const searchCriteriaInput: ProductSearchCriteria = {};\r\n searchCriteriaInput.Context = { ChannelId: ctx.requestContext.apiSettings.channelId, CatalogId: ctx.requestContext.apiSettings.catalogId };\r\n searchCriteriaInput.Refinement = [...new Map(input.refiners.map(item =>\r\n [item[refinerBoundString], item])).values()];\r\n searchCriteriaInput.IncludeAttributes = input.includeAttributes;\r\n searchCriteriaInput.SkipVariantExpansion = true;\r\n // VSI Customization 7924 Start\r\n let activeVirtualRefiners: ProductRefinerValue[] = [];\r\n // VSI Customization 7924 End\r\n\r\n if (input.pageType === 'Category' || (ctx.requestContext?.query?.categoryId)) {\r\n if (input.category) {\r\n const isCustomizeRefiner = ctx.requestContext.app.config.urlModifications && ctx.requestContext.app.config.urlModifications.length > 0;\r\n // Get current category for isSizeRefinement value from extension\r\n const categoryInput = new CurrentCategoryInput(ctx.requestContext);\r\n const categoryData = await getCurrentCategory(categoryInput, ctx);\r\n // Get all refiners data\r\n const refinerInput = new RefinersByCollectionInput(\r\n input.pageType,\r\n ctx.requestContext.apiSettings,\r\n input.queryResultSettings,\r\n input.refiners,\r\n input.category,\r\n input.searchText,\r\n input.includeAttributes\r\n );\r\n const refinerResult = await getProductRefinerHierarchy(refinerInput, ctx);\r\n\r\n const isSizeRefinement = categoryData.ExtensionProperties?.find((attr) => attr.Key === 'SizeRefinementEnable')\r\n ?.Value?.BooleanValue;\r\n const configVirtualRefinerNames = getVirtualRefinerNames(ctx.requestContext, isSizeRefinement);\r\n // filter out refiners to only have ones which are added on config\r\n const filteredRefiners = refinerResult.filter((refiner) => {\r\n return refiner.KeyName && configVirtualRefinerNames.indexOf(refiner.KeyName.toLowerCase()) !== -1;\r\n });\r\n activeVirtualRefiners = await getVirtualRefinerValues(ctx.requestContext, filteredRefiners);\r\n\r\n // checking if isSizeRefinement is true and size refiner is selected so enable customization\r\n if (isSizeRefinement) {\r\n let sizeRefinerArr: (string | undefined)[] = [];\r\n refinerResult &&\r\n refinerResult.map(refiner => {\r\n if (refiner && refiner?.KeyName?.toLowerCase() === 'size') {\r\n sizeRefinerArr = refiner?.Values?.map(obj => obj?.LeftValueBoundString?.toLowerCase());\r\n }\r\n });\r\n const isAnySizeSelectedArr = activeVirtualRefiners?.filter(obj =>\r\n sizeRefinerArr.includes(obj?.LeftValueBoundString?.toLowerCase())\r\n );\r\n if (isAnySizeSelectedArr && isAnySizeSelectedArr.length > 0) {\r\n input.isSizeRefinerAndCategory = true;\r\n }\r\n }\r\n if (isCustomizeRefiner) {\r\n // VSI Customization 7294 Start\r\n\r\n // get the active virtual refiner values\r\n if (activeVirtualRefiners.length > 0) {\r\n if (input.refiners.length > 0) {\r\n const concatRefiners = [...new Map(searchCriteriaInput.Refinement.concat(activeVirtualRefiners).map(item =>\r\n [item[refinerBoundString], item])).values()];\r\n concatRefiners[0].ExtensionProperties = [\r\n {\r\n Key: 'ISREQUESTOVERRIDE',\r\n Value: {\r\n BooleanValue: (!input.isSizeRefinerAndCategory || input.isSizeRefinerAndCategory === undefined ? false : true),\r\n ByteValue: undefined,\r\n DateTimeOffsetValue: undefined,\r\n DecimalValue: undefined,\r\n IntegerValue: undefined,\r\n LongValue: undefined,\r\n StringValue: undefined\r\n }\r\n }\r\n ];\r\n searchCriteriaInput.Refinement = concatRefiners;\r\n } else if (input.refiners.length === 0) {\r\n activeVirtualRefiners[0].ExtensionProperties = [\r\n {\r\n Key: 'ISREQUESTOVERRIDE',\r\n Value: {\r\n BooleanValue: (!input.isSizeRefinerAndCategory || input.isSizeRefinerAndCategory === undefined ? false : true),\r\n ByteValue: undefined,\r\n DateTimeOffsetValue: undefined,\r\n DecimalValue: undefined,\r\n IntegerValue: undefined,\r\n LongValue: undefined,\r\n StringValue: undefined\r\n }\r\n }\r\n ];\r\n searchCriteriaInput.Refinement = [...new Map(activeVirtualRefiners.map(item =>\r\n [item[refinerBoundString], item])).values()];\r\n }\r\n }\r\n }\r\n // VSI Customization 7294 End\r\n searchCriteriaInput.CategoryIds = [input.category || 0];\r\n promise = searchByCriteriaAsync(\r\n {\r\n callerContext: ctx,\r\n queryResultSettings: input.queryResultSettings\r\n },\r\n searchCriteriaInput\r\n );\r\n } else {\r\n throw new Error(\r\n '[GetFullProductsForCollection]Category Page Detected, but no global categoryId found'\r\n );\r\n }\r\n } else {\r\n if (input.searchText && (ctx.requestContext.query && ctx.requestContext.query.q)) {\r\n searchCriteriaInput.SearchCondition = input.searchText;\r\n promise = searchByCriteriaAsync(\r\n {\r\n callerContext: ctx,\r\n queryResultSettings: input.queryResultSettings\r\n },\r\n searchCriteriaInput\r\n );\r\n } else {\r\n if (input.searchText && (ctx.requestContext.query && ctx.requestContext.query.productId && ctx.requestContext.query.recommendation)) {\r\n const searchObject = JSON.parse(input.searchText);\r\n searchProductId = Number(searchObject.ProductId);\r\n if (Number.isNaN(searchProductId)) {\r\n throw new Error('Failed to cast search product id into a number.');\r\n } else if (!searchObject.Recommendation) {\r\n throw new Error('Failed to retrieve the Recommendation.');\r\n } else {\r\n searchCriteriaInput.RecommendationListId = searchObject.Recommendation;\r\n searchCriteriaInput.Ids = [searchProductId || 0];\r\n promise = searchByCriteriaAsync(\r\n {\r\n callerContext: ctx,\r\n queryResultSettings: input.queryResultSettings\r\n },\r\n searchCriteriaInput\r\n );\r\n }\r\n } else {\r\n throw new Error(\r\n '[GetFullProductsForCollection]Search Page Detected, but no q= or productId= query parameter found'\r\n );\r\n }\r\n }\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 // Update ListPageState For SSR\r\n if (!MsDyn365.isBrowser) {\r\n ctx.update(new ListPageStateInput(), { totalProductCount: promise.metadata.count || 0, activeFilters: input.refiners });\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-result-container/get-full-products-by-collection',\r\n action: >action,\r\n input: createInput\r\n});\r\n","/* tslint:disable: no-duplicate-imports */\r\nimport { IProductRefinerHierarchy } from '@msdyn365-commerce/commerce-entities';\r\nimport { IActionContext } from '@msdyn365-commerce/core';\r\nimport { IQueryResultSettings, ProductRefiner, ProductSearchCriteria } from '@msdyn365-commerce/retail-proxy';\r\nimport { getProductSearchRefinersAsync } from '@msdyn365-commerce/retail-proxy/dist/DataActions/ProductsDataActions.g';\r\n\r\n/**\r\n * Uses Bulk refiner API to get refiners and child refiner values\r\n * @param searchCriteria product search criteria\r\n * @param maxItems max items\r\n * @param ctx action context\r\n */\r\nexport async function getProductRefinerHierarchy(searchCriteria: ProductSearchCriteria, queryResultSettings: IQueryResultSettings, ctx: IActionContext): Promise {\r\n return getProductSearchRefinersAsync({ callerContext: ctx, queryResultSettings: queryResultSettings }, searchCriteria).then((productRefiners: ProductRefiner[]) => {\r\n if (!productRefiners) {\r\n ctx.trace('[getRefinersByCriteriaAction] returned no refiners');\r\n return [];\r\n }\r\n\r\n const result = (productRefiners || []).map((productRefiner: ProductRefiner) => productRefiner);\r\n\r\n if (!result.length) {\r\n ctx.trace('[getRefinersByCriteriaAction] returned no IProductRefinerHierarchy objects');\r\n return [];\r\n }\r\n\r\n return result;\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/* tslint:disable: no-duplicate-imports */\r\nimport { IProductRefinerHierarchy } from '@msdyn365-commerce/commerce-entities';\r\nimport { createObservableDataAction, IAction, IActionContext, IActionInput, ICreateActionContext } from '@msdyn365-commerce/core';\r\nimport { BaseCollectionInput, createBaseCollectionInput } from './base-collection-action';\r\nimport { getProductRefinerHierarchy } from './get-product-refiner-hierarchy';\r\n\r\n/**\r\n * Refiners-by-Collection Input action\r\n */\r\nexport class RefinersByCollectionInput extends BaseCollectionInput implements IActionInput {\r\n public getCacheObjectType = () => 'ProductRefiner';\r\n public dataCacheType = () => {\r\n if (\r\n this.pageType !== 'Category' ||\r\n (this.refiners && this.refiners.length > 0) ||\r\n (this.queryResultSettings && this.queryResultSettings.Sorting && this.queryResultSettings.Sorting.Columns && this.queryResultSettings.Sorting.Columns.length > 0)\r\n ) {\r\n return 'request';\r\n } else {\r\n return 'application';\r\n }\r\n };\r\n}\r\n\r\n/**\r\n * Create input method which creates an ActionInput for fetching list page refiners\r\n */\r\nconst createInput = (args: ICreateActionContext): IActionInput => {\r\n return createBaseCollectionInput(args, RefinersByCollectionInput);\r\n};\r\n\r\n/**\r\n * Action method which fetches refiners for the given list page\r\n */\r\nasync function action(input: RefinersByCollectionInput, ctx: IActionContext): Promise {\r\n let searchProductId;\r\n if (input.pageType === 'Category') {\r\n if (input.category) {\r\n return getProductRefinerHierarchy(\r\n {\r\n CategoryIds: [input.category],\r\n Context: {\r\n ChannelId: input.apiSettings.channelId,\r\n CatalogId: input.apiSettings.catalogId\r\n }\r\n },\r\n input.queryResultSettings,\r\n ctx);\r\n } else {\r\n throw new Error('[GetRefinersForCollection]Category Page Detected, but no global categoryId found');\r\n }\r\n } else {\r\n if (input.searchText && (ctx.requestContext.query && ctx.requestContext.query.q)) {\r\n return getProductRefinerHierarchy(\r\n {\r\n SearchCondition: input.searchText,\r\n Context: {\r\n ChannelId: input.apiSettings.channelId,\r\n CatalogId: input.apiSettings.catalogId\r\n }\r\n },\r\n input.queryResultSettings,\r\n ctx);\r\n } else {\r\n if (input.searchText && (ctx.requestContext.query && ctx.requestContext.query.productId)) {\r\n searchProductId = Number(input.searchText);\r\n if (Number.isNaN(searchProductId)) {\r\n throw new Error('Failed to cast search product id into a number.');\r\n } else {\r\n return getProductRefinerHierarchy(\r\n {\r\n Context: {\r\n ChannelId: input.apiSettings.channelId,\r\n CatalogId: input.apiSettings.catalogId\r\n },\r\n RecommendationListId: 'looks',\r\n Ids: [searchProductId || 0]\r\n },\r\n input.queryResultSettings,\r\n ctx);\r\n }\r\n } else {\r\n throw new Error(\r\n '[GetFullProductsForCollection]Search Page Detected, but no q= or productId= query parameter found'\r\n );\r\n }\r\n }\r\n }\r\n}\r\n\r\nexport default createObservableDataAction({\r\n id: '@msdyn365-commerce-modules/search-result-container/get-refiners-for-collection',\r\n action: >action,\r\n input: createInput\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/* tslint:disable: no-duplicate-imports */\r\nimport MsDyn365, { IRequestContext } from '@msdyn365-commerce/core';\r\nimport { ProductRefinerValue, SortColumn } from '@msdyn365-commerce/retail-proxy';\r\n\r\n/**\r\n * Refiner Compression:\r\n * Refiners contains a non-trivial amount of data that is required to successfully make\r\n * a refiner-based API call. To allow for deep-linking of refiners in the URL, refiner data\r\n * must be compressed so that URL max length is not exceeded. Refiners will be compressed into\r\n * the following array style index-based format:\r\n * [DataTypeValue, LeftValueBoundString, RefinerRecordId, RefinerSourceValue, RightValueBoundString, UnitText]\r\n */\r\nconst compressedRefinerKeys = ['DataTypeValue', 'LeftValueBoundString', 'RefinerRecordId', 'RefinerSourceValue', 'RightValueBoundString', 'UnitText'];\r\n\r\n/**\r\n * Hydrates compressed refiner data from URL\r\n * @param fullUrl The full URL of the page\r\n */\r\nexport const hydrateRefinersFromUrl = (requestContext: IRequestContext): ProductRefinerValue[] => {\r\n const compressedRefinerArray = parseQueryParam<(string | number)[][]>('refiners', requestContext);\r\n if (!compressedRefinerArray || !compressedRefinerArray.length) {\r\n return [];\r\n }\r\n\r\n return compressedRefinerArray.map((compressedRefiner) => {\r\n try {\r\n const parsedRefiner: ProductRefinerValue = {};\r\n compressedRefinerKeys.forEach((refinerKey, index) => {\r\n // @ts-ignore: This line is intentionally not typesafe\r\n parsedRefiner[refinerKey] = compressedRefiner[index];\r\n });\r\n return parsedRefiner;\r\n } catch(e) {\r\n return undefined;\r\n }\r\n }).filter(Boolean);\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\nexport const compressRefiners = (refiners: ProductRefinerValue[]) => {\r\n const compressedRefiners: (string | number)[][] = [];\r\n\r\n refiners.forEach((refiner) => {\r\n const compressedRefiner: (string | number)[] = [];\r\n compressedRefinerKeys.forEach((refinerKey) => {\r\n // @ts-ignore: This line is intentionally not typesafe\r\n compressedRefiner.push(refiner[refinerKey]);\r\n });\r\n compressedRefiners.push(compressedRefiner);\r\n });\r\n\r\n return compressedRefiners;\r\n};\r\n\r\n/**\r\n * Method which creates a URL contiaining serialized active refiners\r\n * @param fullUrl The Current URL of the page\r\n * @param refiners The refiners which should be added to the URL\r\n */\r\nexport const buildListPageUrl = (fullUrl: URL, refiners?: ProductRefinerValue[], sortingColumns?: SortColumn[], skipCount?: number) => {\r\n // Refiner Change flow\r\n if (refiners !== undefined) {\r\n if (!refiners.length) {\r\n fullUrl.searchParams.delete('refiners');\r\n } else {\r\n fullUrl.searchParams.set('refiners', JSON.stringify(compressRefiners(refiners)));\r\n }\r\n\r\n // Adding or removing a refiner means we want to always load page 1\r\n fullUrl.searchParams.delete('skip');\r\n return fullUrl.href;\r\n }\r\n\r\n if (sortingColumns !== undefined) {\r\n if(!sortingColumns.length) {\r\n fullUrl.searchParams.delete('sorting');\r\n } else {\r\n fullUrl.searchParams.set('sorting', JSON.stringify(sortingColumns));\r\n }\r\n\r\n // Changing the sort means always load page 1\r\n fullUrl.searchParams.delete('skip');\r\n return fullUrl.href;\r\n }\r\n\r\n if (skipCount) {\r\n fullUrl.searchParams.set('skip', skipCount.toString());\r\n }\r\n\r\n return fullUrl.href;\r\n};\r\n\r\n/**\r\n * Parses a query param from the query object of the request context\r\n * @param key The query parameter key\r\n * @param requestContext The request context\r\n */\r\nexport const parseQueryParam = (key: string, requestContext: IRequestContext): T | null => {\r\n if(requestContext.query && requestContext.query[key]) {\r\n return JSON.parse(decodeURIComponent(requestContext.query[key]));\r\n }\r\n return null;\r\n};\r\n\r\n/**\r\n * Gets the current URL of the page from the request context\r\n * @param requestContext The request context\r\n */\r\nexport const getCurrentUrl = (requestContext: IRequestContext): URL => {\r\n if(MsDyn365.isBrowser) {\r\n return new URL(window.location.href);\r\n } else {\r\n // NOTE: Typing on requestURL is incorrect\r\n if (requestContext.url.requestUrl.href) {\r\n return new URL(requestContext.url.requestUrl.href);\r\n } else {\r\n return new URL((requestContext.url.requestUrl));\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\nimport {\r\n CacheType,\r\n createObservableDataAction,\r\n IAction,\r\n IActionContext,\r\n IActionInput,\r\n IAny,\r\n ICreateActionContext,\r\n IGeneric\r\n} from '@msdyn365-commerce/core';\r\n/* tslint:disable: no-duplicate-imports */\r\nimport { ProductPrice, ProductRefinerValue, ProductSearchResult, SimpleProduct, SortingInfo } from '@msdyn365-commerce/retail-proxy';\r\nimport { observable } from 'mobx';\r\n\r\nimport { listPageType } from './actions';\r\n\r\n/**\r\n * ListPageState class\r\n */\r\nexport class ListPageState {\r\n @observable public activeFilters: ProductRefinerValue[] | null = null;\r\n @observable public activeVirtualFilters: ProductRefinerValue[] | null = null;\r\n @observable public activeProducts: ProductSearchResult[] = [];\r\n @observable public sortingCritera: SortingInfo | null = null;\r\n @observable public currentPageNumber: number | null = null;\r\n @observable public totalProductCount: number | undefined;\r\n @observable public pageSize: number = 10;\r\n @observable public pageType: listPageType = 'Unknown';\r\n @observable public featureProduct: SimpleProduct | null = null;\r\n @observable public productPrices: ProductPrice[] | undefined = [];\r\n}\r\n\r\n/**\r\n * ListPageStateInput - action input\r\n */\r\nexport class ListPageStateInput implements IActionInput {\r\n public getCacheKey = () => `ListPageState`;\r\n public getCacheObjectType = () => 'ListPageState';\r\n public dataCacheType = (): CacheType => 'application';\r\n}\r\n\r\nexport async function listPageStateAction(\r\n input: ListPageStateInput,\r\n ctx: IActionContext\r\n): Promise {\r\n return new ListPageState();\r\n}\r\n\r\n/**\r\n * create new input for create action\r\n */\r\nexport const createListPageInput = (\r\n inputData: ICreateActionContext>\r\n): IActionInput => {\r\n return new ListPageStateInput();\r\n};\r\n\r\n/**\r\n * ListPageState - create action\r\n */\r\nexport default createObservableDataAction({\r\n action: >listPageStateAction,\r\n input: createListPageInput\r\n});\r\n"],"names":["canonicalURL","requestContext","requestUrl","url","origin","path","pathname","toLowerCase","urlParts","split","splice","match","removePipeSignValue","removeKeywords","filteredPath","join","filteredURL","undefined","length","filter","urlPart","indexOf","removeKeywordFromUrl","app","config","removeKeywordFromUrlArray","trim","forEach","_part","removeKeyword","trimmedKeyword","indexOfValue","getSortedVirtualRefinerConfig","isMattressesCategory","appConfigSorted","getVirtualRefinerConfig","appConfig","enableForMattresses","enableForOtherCategories","sort","a","b","order","getVirtualRefinerNames","sortedVirtualRefinerConfig","appConfigRefinerNames","sortedConfig","push","refinerName","urlModifications","async","getVirtualRefinerValues","virtualRefiners","virtualRefinerValues","categoryIdToken","urlTokens","recordId","finalizedUrlParts","plainUrlPart","decodeURIComponent","part","filteredPart","mainRefiner","Values","refinerValue","refinerValueKeyName","LeftValueBoundString","replace","regExSpecialChars","canonicalUrlspecialCharIncludeList","navLinkKeywordRemoval","link","linkBase","linkParams","endsWith","linkParam","map","param","filteredLink","includeConfigList","includeConfig","pattern","RegExp","BaseCollectionInput","constructor","pageType","apiSettings","queryResultSettings","refiners","category","searchText","includeAttributes","locale","urlPathName","isSizeRefinerAndCategory","isUpdateRefinerPanel","catalogId","getCacheKey","this","Paging","toJS","Sorting","buildCacheKey","refiner","RefinerRecordId","RightValueBoundString","convertToString","getCacheObjectType","dataCacheType","ExtensionProperties","Key","Value","BooleanValue","ByteValue","DateTimeOffsetValue","DecimalValue","IntegerValue","LongValue","StringValue","createBaseCollectionInput","args","inputClassConstuctor","query","categoryId","QueryResultSettingsProxy","QueryResultSettings","queryRefiners","hydrateRefinersFromUrl","inputData","pathName","updateRefinerPanel","getUpdateRefinerPanel","getCatalogId","sorting","Columns","JSON","parse","itemId","q","productId","Error","CategoriesInput","context","mappedToHierarchy","maxItems","channelId","_mappedToHierarchy","Number","createObservableDataAction","id","action","input","ctx","getCategoriesAsync","callerContext","topItems","topCategories","parseInt","sitePath","getLocale","mapCategoryToHierarchy","categoryList","categoryMap","reduce","memo","localName","nameTranslations","nameTranslation","find","item","Language","Text","getFriendlyName","NameTranslations","categoryHierarchy","NeutralizedName","Name","RecordId","zeroCategory","Object","keys","element","parentId","ParentCategory","Url","getCategoryUrl","parent","Children","categories","getCategoryAction","RawCategoriesInput","CurrentCategoryInput","categorySlug","isNaN","tempActionContext","parameterizeFeatureFlags","getParameterizeFeatureFlags","parameterize","searchCategory","foundCategory","cat","Slug","matchingChild","categoryInput","getCategoryHierarchy","trace","GetFullProductsByCollectionInput","promise","searchProductId","refinerBoundString","searchCriteriaInput","Context","ChannelId","CatalogId","Refinement","Map","values","IncludeAttributes","SkipVariantExpansion","activeVirtualRefiners","isCustomizeRefiner","categoryData","getCurrentCategory","refinerInput","RefinersByCollectionInput","refinerResult","getProductRefinerHierarchy","isSizeRefinement","attr","configVirtualRefinerNames","filteredRefiners","KeyName","sizeRefinerArr","obj","isAnySizeSelectedArr","includes","concatRefiners","concat","CategoryIds","searchByCriteriaAsync","SearchCondition","recommendation","searchObject","ProductId","Recommendation","RecommendationListId","Ids","mappedProducts","productSearchResult","newImageUrl","generateProductImageUrl","PrimaryImageUrl","MsDyn365","update","ListPageStateInput","totalProductCount","metadata","count","activeFilters","products","minusVirtualRefiner","Top","itemsPerPage","skip","Skip","searchCriteria","getProductSearchRefinersAsync","then","productRefiners","result","productRefiner","compressedRefinerKeys","compressedRefinerArray","parseQueryParam","compressedRefiner","parsedRefiner","refinerKey","index","e","Boolean","buildListPageUrl","fullUrl","sortingColumns","skipCount","searchParams","set","stringify","compressedRefiners","compressRefiners","delete","href","toString","key","getCurrentUrl","URL","window","location","ListPageState","activeVirtualFilters","activeProducts","sortingCritera","currentPageNumber","pageSize","featureProduct","productPrices","__decorate","observable","listPageStateAction","createListPageInput"],"sourceRoot":""}