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,KAAI,CACDqF,UAAW,mCAC8B,QAArCymB,EAAA9uB,EAAK+d,0BAA0Bnc,cAAM,IAAAktB,GAArCA,EAAuCzzB,iBAAiBE,WAAa,GAAK,SAG7EgJ,IAGTtJ,EAAAA,cAAC+H,EAAAA,KAAIC,OAAAC,OAAA,GAAKQ,GAAuBI","sources":["webpack://Msdyn365.Commerce.Online/external var \"React\"?0d3b","webpack://Msdyn365.Commerce.Online/external var \"ReactDOM\"?853b","webpack://Msdyn365.Commerce.Online/./src/store-selector-state-manager/base-store-selector-state-manager.ts?281e","webpack://Msdyn365.Commerce.Online/./src/store-selector-state-manager/map-store-selector-state-manager.ts?2ae0","webpack://Msdyn365.Commerce.Online/./src/store-selector-state-manager/store-selector-state-manager-data-action.ts?bd3e","webpack://Msdyn365.Commerce.Online/./src/modules/store-selector/store-selector.view.tsx?71a6","webpack://Msdyn365.Commerce.Online/./lib/store-selector/module-registration.js?8817","webpack://Msdyn365.Commerce.Online/./src/modules/store-selector/components/pickup-option-list.tsx?8604","webpack://Msdyn365.Commerce.Online/./src/modules/store-selector/components/store-pickup-option-list.tsx?8db3","webpack://Msdyn365.Commerce.Online/./src/modules/store-selector/components/store-selectorcls-location-line-item/date-time-helpers.ts?4d63","webpack://Msdyn365.Commerce.Online/./src/modules/store-selector/components/store-selectorcls-location-line-item/store-selector-location-line-item.components.tsx?f186","webpack://Msdyn365.Commerce.Online/./src/modules/store-selector/components/store-selector-location-lines.tsx?9c63","webpack://Msdyn365.Commerce.Online/./src/modules/store-selector/components/store-selector-search-form.tsx?de2d","webpack://Msdyn365.Commerce.Online/./src/modules/store-selector/components/store-selector-small-components.tsx?6ab0","webpack://Msdyn365.Commerce.Online/./src/modules/store-selector/components/selected-store/selected-store.tsx?5f8b","webpack://Msdyn365.Commerce.Online/./src/modules/store-selector/store-selector.props.autogenerated.ts?739b","webpack://Msdyn365.Commerce.Online/./src/modules/store-selector/store-selector.tsx?ad87","webpack://Msdyn365.Commerce.Online/./src/modules/store-selector/store-selector.view.tsx?46a3","webpack://Msdyn365.Commerce.Online/./src/themes/adventureworks/views/store-selector.view.tsx?1673","webpack://Msdyn365.Commerce.Online/./src/modules/store-selector/components/pickup-option-list.tsx?dae0","webpack://Msdyn365.Commerce.Online/./src/modules/store-selector/components/store-pickup-option-list.tsx?7a25","webpack://Msdyn365.Commerce.Online/./src/modules/store-selector/components/store-selector-location-line-item/date-time-helpers.ts?fe27","webpack://Msdyn365.Commerce.Online/./src/modules/store-selector/components/store-selector-location-line-item/store-selector-location-line-item.components.tsx?923d","webpack://Msdyn365.Commerce.Online/./src/modules/store-selector/components/store-selector-location-lines.tsx?87ff","webpack://Msdyn365.Commerce.Online/./src/modules/store-selector/components/store-selector-search-form.tsx?fb9a","webpack://Msdyn365.Commerce.Online/./src/modules/store-selector/components/store-selector-small-components.tsx?4335","webpack://Msdyn365.Commerce.Online/./src/modules/store-selector/components/selected-store/selected-store.tsx?bfbc","webpack://Msdyn365.Commerce.Online/./src/modules/store-selector/store-selector.tsx?e416","webpack://Msdyn365.Commerce.Online/./src/modules/adventureworks/views/store-selector.view.tsx?ccdd"],"sourcesContent":["module.exports = React;","module.exports = ReactDOM;","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport MsDyn365, { IActionContext } from '@msdyn365-commerce/core';\nimport { action, computed, observable } from 'mobx';\n\nimport {\n IListMapViewState,\n ILoadMapApiInput,\n IStoreInfo,\n IStoreSelectionStateContext,\n IStoreSelectorLocation,\n IStoreSelectorStateManager\n} from './i-store-selection-state-manager';\n\n/**\n * Abstract instance of IStoreSelectorStateManager with base implementation\n * of everything except the geoLocate function.\n */\nexport abstract class BaseStoreSelectorStateManager implements IStoreSelectorStateManager {\n @computed public get isDialogOpen(): Readonly {\n return this._context !== undefined;\n }\n\n @computed public get context(): Readonly {\n return this._context;\n }\n\n @observable public isMapApiLoaded?: boolean;\n\n @observable public selectedStoreLocationId?: string;\n\n @observable public preferredStore?: IStoreInfo;\n\n @observable public listMapViewState: IListMapViewState = { displayList: true, displayMap: false };\n\n @observable public isMapModuleLoaded?: boolean;\n\n @observable public lastInlineShownStoreInfo?: IStoreInfo;\n\n @observable protected _context?: IStoreSelectionStateContext;\n\n private readonly preferredStoreLocalStorageKey: string = '_msdyn365__preferredStore_';\n\n constructor() {\n this.isMapModuleLoaded = false;\n const value = this._readFromToCookie(this.preferredStoreLocalStorageKey);\n try {\n const storeInfo: IStoreInfo | undefined = value ? JSON.parse(value) : undefined;\n if (storeInfo) {\n this.preferredStore = storeInfo;\n }\n } catch {\n this.preferredStore = undefined;\n }\n }\n\n public abstract geoLocate(searchTerm: string, actionContext: IActionContext): Promise;\n\n public abstract loadMapApi(input: ILoadMapApiInput): Promise;\n\n @action\n public async toggleListMapViewState(): Promise {\n this.listMapViewState = {\n displayList: !this.listMapViewState.displayList,\n displayMap: !this.listMapViewState.displayMap\n };\n }\n\n @action\n public async setMapModuleLoaded(input: boolean): Promise {\n this.isMapModuleLoaded = input;\n }\n\n @action\n public async setOrgUnitStoreInformation(input: IStoreSelectionStateContext): Promise {\n this._context = input;\n }\n\n @action\n public async setSelectedStoreLocationId(storeId: string | undefined): Promise {\n this.selectedStoreLocationId = storeId;\n }\n\n @action\n public async setPreferredStoreLocation(\n storeId?: string,\n storeName?: string | undefined,\n writeToCookie: boolean = false,\n latitude?: number,\n longitude?: number\n ): Promise {\n const storeInfo: IStoreInfo = { StoreId: storeId, StoreName: storeName, Latitude: latitude, Longitude: longitude };\n this.preferredStore = storeInfo;\n if (writeToCookie) {\n this._writeToCookie(this.preferredStoreLocalStorageKey, JSON.stringify(storeInfo));\n }\n }\n\n @action\n public async setLastInlineStoreInfo(latitude?: number, longitude?: number): Promise {\n const storeInfo: IStoreInfo = { StoreId: '', StoreName: '', Latitude: latitude, Longitude: longitude };\n this.lastInlineShownStoreInfo = storeInfo;\n }\n\n @action\n public async clearPreferredStore(writeToCookie: boolean): Promise {\n this.preferredStore = undefined;\n if (writeToCookie) {\n this._removeCookie(this.preferredStoreLocalStorageKey);\n }\n }\n\n @action\n public async openDialog(input: IStoreSelectionStateContext): Promise {\n if (this._context && this._context.id === input.id) {\n throw new Error('Dialog is already opened');\n }\n\n this._context = input;\n }\n\n @action\n public async closeDialog(): Promise {\n this._context = undefined;\n }\n\n private _removeCookie(key: string): void {\n if (!key) {\n return;\n }\n if (MsDyn365.isBrowser) {\n const storage = window.localStorage;\n storage.removeItem(key);\n }\n }\n\n private _writeToCookie(key: string, value: string | undefined): void {\n if (!key || !value) {\n return;\n }\n if (MsDyn365.isBrowser) {\n const storage = window.localStorage;\n storage.setItem(key, value);\n }\n }\n\n private _readFromToCookie(key: string): string | undefined {\n if (!key) {\n return undefined;\n }\n if (MsDyn365.isBrowser) {\n const storage = window.localStorage;\n const cookieValue = storage.getItem(key);\n if (cookieValue) {\n return cookieValue;\n }\n }\n\n return undefined;\n }\n}\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { IActionContext } from '@msdyn365-commerce/core';\nimport { StringExtensions } from '@msdyn365-commerce-modules/retail-actions';\nimport { action } from 'mobx';\n\nimport { BaseStoreSelectorStateManager } from './base-store-selector-state-manager';\nimport { ILoadMapApiInput, IStoreSelectorLocation } from './i-store-selection-state-manager';\nimport { IMapWindow, MapLocationsResult } from './models/map-data';\n\ndeclare const window: IMapWindow;\n\n/**\n * Instance of IStoreSelectorStateManager manager that uses Map service\n * for geo location.\n */\nexport class MapStoreSelectorStateManager extends BaseStoreSelectorStateManager {\n private readonly SERVICE_ENDPOINT: string = 'https://dev.virtualearth.net/REST/v1/';\n\n private readonly MAP_API_ENDPOINT: string = 'https://www.bing.com/api/maps/mapcontrol?callback=mapAPIReady';\n\n @action\n public async geoLocate(searchTerm: string, actionContext: IActionContext): Promise {\n if (\n !searchTerm ||\n !actionContext.requestContext.channel ||\n !actionContext.requestContext.channel.BingMapsApiKey ||\n !actionContext.requestContext.channel.BingMapsEnabled\n ) {\n return undefined;\n }\n\n let searchContent: string = searchTerm;\n\n const jsonp = `mapSearchCallback_${crypto.getRandomValues(new Uint32Array(1))[0]}`;\n\n if (actionContext.requestContext.channel.ChannelCountryRegionISOCode) {\n searchContent = `${searchTerm.trim()} ${actionContext.requestContext.channel.ChannelCountryRegionISOCode}`;\n }\n\n const query = encodeURI(searchContent);\n const key = encodeURI(actionContext.requestContext.channel.BingMapsApiKey);\n\n const geolocationApiUrl =\n actionContext.requestContext.app &&\n actionContext.requestContext.app.config &&\n actionContext.requestContext.app.config.geolocationApiUrl;\n const requestUrl = `${\n geolocationApiUrl ? geolocationApiUrl : this.SERVICE_ENDPOINT\n }/Locations?query=${query}&key=${key}&jsonp=${jsonp}`;\n\n return new Promise(resolve => {\n const script = document.createElement('script');\n script.setAttribute('type', 'text/javascript');\n script.setAttribute('src', requestUrl);\n\n window[jsonp] = (data: MapLocationsResult) => {\n delete window[jsonp];\n script.remove();\n\n if (data && data.resourceSets && data.resourceSets.length > 0 && data.resourceSets[0].resources.length > 0) {\n resolve({\n latitude: data.resourceSets[0].resources[0].point.coordinates[0],\n longitude: data.resourceSets[0].resources[0].point.coordinates[1]\n });\n }\n\n resolve(undefined);\n };\n\n document.body.appendChild(script);\n });\n }\n\n @action\n public async loadMapApi(input: ILoadMapApiInput): Promise {\n if (StringExtensions.isNullOrEmpty(input.key)) {\n return Promise.resolve();\n }\n\n const isScriptAlreadyLoaded = !!document?.getElementById('msdyn_map-api-script');\n\n if (isScriptAlreadyLoaded) {\n if (window) {\n const currentWindowAPI = window.mapAPIReady;\n window.mapAPIReady = () => {\n if (currentWindowAPI) {\n currentWindowAPI();\n }\n this.isMapApiLoaded = true;\n };\n }\n // Prevents from loading multiple script into the body\n return Promise.resolve();\n }\n\n const url = `${this.MAP_API_ENDPOINT}${input.key ? `&key=${input.key}` : ''}${input.lang ? `&setLang=${input.lang}` : ''}${\n input.market ? `&setMkt=${input.market}` : ''\n }`;\n\n return new Promise((resolve, reject) => {\n const script = document?.createElement('script');\n script.type = 'text/javascript';\n script.async = true;\n script.defer = true;\n script.src = url;\n script.id = 'msdyn_map-api-script';\n if (window) {\n window.mapAPIReady = () => {\n this.isMapApiLoaded = true;\n resolve();\n };\n }\n script.addEventListener('error', (error: string | Event) => {\n reject(error);\n });\n document?.body?.appendChild(script);\n });\n }\n}\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { createObservableDataAction, IAction, IActionInput, IAny, ICreateActionContext, IGeneric } from '@msdyn365-commerce/core';\nimport { GenericInput, getGenericAction } from '@msdyn365-commerce-modules/retail-actions';\n\nimport { IStoreSelectorStateManager } from './i-store-selection-state-manager';\nimport { MapStoreSelectorStateManager } from './map-store-selector-state-manager';\n\nexport function createStoreSelectorStateInput(result: IStoreSelectorStateManager): GenericInput {\n return new GenericInput('mapSSSM', result, 'IStoreSelectorStateManager');\n}\n\nconst createStoreSelectorStateInputInternal = (inputData: ICreateActionContext>): IActionInput => {\n return createStoreSelectorStateInput(new MapStoreSelectorStateManager());\n};\n\nexport const getGenericActionDataAction = createObservableDataAction({\n action: >getGenericAction,\n input: createStoreSelectorStateInputInternal\n});\n\nexport default getGenericActionDataAction;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { ArrayExtensions } from '@msdyn365-commerce-modules/retail-actions';\nimport { Module, Node } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport { ISelectedStoreViewProps, IStoreSelectorViewProps } from './index';\n\n/**\n * Renders the pickup Delivery options.\n * @param props -- Selected store view props.\n * @returns -- HTML.\n */\nconst renderDeliveryOptions: React.FC = props => {\n const { canSelectLocation, deliveryOptions, pickUpDeliveryOptionButton, pickupModes } = props;\n\n return (\n <>\n {/* eslint-disable-next-line no-nested-ternary -- Need this.*/}\n {canSelectLocation ? (ArrayExtensions.hasElements(deliveryOptions) ? pickupModes : pickUpDeliveryOptionButton) : false}\n \n );\n};\n\n/**\n * Render the selected store.\n * @param props -- Selected store view props.\n * @returns -- HTML.\n */\nconst renderSelectedStore: React.FC = props => {\n const {\n storeDetailsMain,\n storeHeader,\n storeName,\n storeDetailsCloseButton,\n storeDistance,\n storeDetailsAvailabilityContainer,\n productAvailability,\n stockStatus,\n isCurrentLocation,\n currentLocation,\n isPreferredStore,\n preferredStoreButton,\n removePreferredStoreButton\n } = props;\n\n return (\n \n \n {storeDetailsCloseButton}\n {storeName}\n {storeDistance}\n \n \n {productAvailability}\n {stockStatus}\n \n {isCurrentLocation ? currentLocation : renderDeliveryOptions(props)}\n {isPreferredStore ? preferredStoreButton : removePreferredStoreButton}\n \n );\n};\n\n/**\n * Render the body of the popup.\n * @param props -- Store selector view props.\n * @returns -- Returns the html.\n */\nconst renderBody: React.FC = props => {\n const {\n BodyContainerProps,\n locationsMessage,\n search,\n state,\n spinner,\n locationsList,\n noLocationsMessage,\n maps,\n bodyWrapperProps,\n storeResultContainerProps,\n mapContainerProps,\n isMobileView,\n storeDetailsModal,\n selectedLocation\n } = props;\n\n if (isMobileView) {\n return (\n \n {locationsMessage}\n {search}\n \n \n {state.isSearchInProgress ? spinner : <>{locationsList ? locationsList : noLocationsMessage}}\n {maps}\n {selectedLocation && renderSelectedStore(selectedLocation)}\n \n \n \n );\n }\n\n return (\n \n \n \n {locationsMessage}\n {search}\n {state.isSearchInProgress ? spinner : <>{locationsList ? locationsList : noLocationsMessage}}\n \n {maps}\n \n \n );\n};\n\n/**\n * Store selector view props.\n * @param props - Store selector view props.\n * @returns - HTML.\n */\nconst StoreSelectorView: React.FC = props => {\n const {\n FooterContainerProps,\n HeaderContainerProps,\n HeaderProps,\n ModuleProps,\n\n terms\n } = props;\n\n return (\n \n {HeaderProps}\n {renderBody(props)}\n {terms}\n \n );\n};\n\nexport default StoreSelectorView;\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['store-selector'] = {\n c: () => require('partner/modules/store-selector/store-selector.tsx'),\n $type: 'containerModule',\n da: [{name:'availabilitiesWithHours', path:'@msdyn365-commerce-modules/retail-actions/dist/lib/get-full-available-inventory-nearby', runOn: 1},{name:'storeLocations', path:'@msdyn365-commerce-modules/retail-actions/dist/lib/get-store-location-information', runOn: 1},{name:'storeSelectorStateManager', path:'@msdyn365-commerce-modules/bopis-utilities/dist/lib/store-selector-state-manager/store-selector-state-manager-data-action', runOn: 1}],\n \n iNM: false,\n ns: '__local__',\n n: 'store-selector',\n p: '__local__',\n \n pdp: '',\n \n \n md: 'src/modules/store-selector'\n });\n \n\n {\n const sanitizedActionPath = '@msdyn365-commerce-modules/bopis-utilities/dist/lib/store-selector-state-manager/store-selector-state-manager-data-action';\n let dataAction = require('@msdyn365-commerce-modules/bopis-utilities/dist/lib/store-selector-state-manager/store-selector-state-manager-data-action');\n registerSanitizedActionPath(sanitizedActionPath, dataAction);\n }\n \n\n {\n const sanitizedActionPath = '@msdyn365-commerce-modules/retail-actions/dist/lib/get-full-available-inventory-nearby';\n let dataAction = require('@msdyn365-commerce-modules/retail-actions/dist/lib/get-full-available-inventory-nearby');\n registerSanitizedActionPath(sanitizedActionPath, dataAction);\n }\n \n\n {\n const sanitizedActionPath = '@msdyn365-commerce-modules/retail-actions/dist/lib/get-store-location-information';\n let dataAction = require('@msdyn365-commerce-modules/retail-actions/dist/lib/get-store-location-information');\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|store-selector|store-selector'] = {\n c: () => require('partner/modules/store-selector/store-selector.view.tsx'),\n cn: '__local__-__local__-store-selector'\n };\nviewDictionary['__local__|__local__|themes|adventureworks|views|store-selector'] = {\n c: () => require('partner/themes/adventureworks/views/store-selector.view.tsx'),\n cn: '__local__-__local__-store-selector'\n };\nviewDictionary['@msdyn365-commerce-modules|store-selector|modules|store-selector|store-selector'] = {\n c: () => require('@msdyn365-commerce-modules/store-selector/dist/lib/modules/store-selector/store-selector.view.js'),\n cn: '@msdyn365-commerce-modules-store-selector-store-selector'\n };\nviewDictionary['@msdyn365-commerce-theme|adventureworks-theme-kit|modules|adventureworks|views|store-selector'] = {\n c: () => require('@msdyn365-commerce-theme/adventureworks-theme-kit/dist/lib/modules/adventureworks/views/store-selector.view.js'),\n cn: '@msdyn365-commerce-theme-adventureworks-theme-kit-store-selector'\n };\nwindow.__bindings__ = window.__bindings__ || {};\nwindow.__bindings__.viewDictionary = {\n ...window.__bindings__.viewDictionary || {},\n ...viewDictionary\n };","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\n/* eslint-disable no-duplicate-imports */\nimport { DeliveryOption } from '@msdyn365-commerce/retail-proxy';\nimport * as React from 'react';\n\n/**\n * Interface Pickup option list.\n */\nexport interface IPickUpOptionListProps {\n pickupListOptionMenuText: string;\n pickupmodeList?: DeliveryOption[];\n onChange(deliveryCode: string): Promise;\n}\n\n/**\n * Interface pickup option list state.\n */\nexport interface IPickOptionListState {\n expandSiteOptions: boolean;\n}\n\n/**\n * Simple Pickup option dropdown with Button to get menu option.\n */\nexport class PickUpOptionList extends React.PureComponent {\n private readonly _pickupListOptionMenu: React.RefObject;\n\n private readonly _pickupListOptionButton: React.RefObject;\n\n private readonly eventsToBeBind = ['click', 'touchstart'];\n\n public constructor(props: IPickUpOptionListProps) {\n super(props);\n this._renderDeliveryOptions = this._renderDeliveryOptions.bind(this);\n this._pickupListOptionMenu = React.createRef();\n this._pickupListOptionButton = React.createRef();\n this.state = {\n expandSiteOptions: false\n };\n }\n\n public componentDidMount(): void {\n for (const event of this.eventsToBeBind) {\n window.addEventListener(event, this.handleDocumentClick, true);\n }\n }\n\n public componentWillUnmount(): void {\n for (const event of this.eventsToBeBind) {\n window.removeEventListener(event, this.handleDocumentClick, true);\n }\n }\n\n public render(): JSX.Element {\n const { pickupListOptionMenuText, pickupmodeList } = this.props;\n\n return (\n
\n \n {pickupListOptionMenuText}\n \n \n {this.state.expandSiteOptions ? (\n
    \n {pickupmodeList?.map((delivery: DeliveryOption) => {\n return (\n
  • \n \n \n {delivery.Description}\n \n \n
  • \n );\n })}\n
\n ) : null}\n
\n );\n }\n\n /**\n * Handle the document click.\n * @param event -- Event object.\n */\n private readonly handleDocumentClick = (event: Event): void => {\n const htmlElement = event.target as HTMLElement;\n if (\n !(\n (this._pickupListOptionButton.current !== null &&\n (event.target === this._pickupListOptionButton.current ||\n this._pickupListOptionButton.current.contains(htmlElement))) ||\n (this._pickupListOptionMenu.current !== null &&\n (event.target === this._pickupListOptionMenu.current || this._pickupListOptionMenu.current.contains(htmlElement)))\n )\n ) {\n this.setState({\n expandSiteOptions: false\n });\n }\n };\n\n private _renderDeliveryOptions(event: React.MouseEvent): void {\n event.stopPropagation();\n const isExpandSiteOptionsState = this.state.expandSiteOptions;\n this.setState({\n expandSiteOptions: !isExpandSiteOptionsState\n });\n }\n\n /**\n * Select Delivery option.\n * @param event -- Event Object.\n */\n private readonly _onSelect = async (event: React.MouseEvent): Promise => {\n event.preventDefault();\n const deliveryCode = event.currentTarget.getAttribute('data-value');\n if (deliveryCode && deliveryCode.length > 0) {\n await this.props.onChange(deliveryCode);\n }\n };\n}\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\n/* eslint-disable no-duplicate-imports */\nimport { DeliveryOption } from '@msdyn365-commerce/retail-proxy';\nimport * as React from 'react';\n\n/**\n * Store Pickup option list interface.\n */\nexport interface IStorePickUpOptionListProps {\n productPickupListOptionMenuText?: string;\n productPickupModeList?: DeliveryOption[];\n defaultOptionText?: string;\n onChange(deliveryCode: string): Promise;\n}\n\n/**\n * Store Pickup option state interface.\n */\nexport interface IStorePickOptionListState {\n isFilterExpanded: boolean;\n selectedPickupMode?: string;\n}\n\n/**\n * Simple Pickup option dropdown with Button to get menu option.\n */\nexport class StorePickUpOptionList extends React.PureComponent {\n private readonly _storePickupListOptionMenu: React.RefObject;\n\n public constructor(props: IStorePickUpOptionListProps) {\n super(props);\n this._storePickupListOptionMenu = React.createRef();\n this.state = {\n isFilterExpanded: false,\n selectedPickupMode: ''\n };\n }\n\n public render(): JSX.Element {\n const { productPickupListOptionMenuText, productPickupModeList, defaultOptionText } = this.props;\n const selectedPickupModeDesc = defaultOptionText\n ? defaultOptionText\n : productPickupModeList?.find((delivery: DeliveryOption) => delivery.Code === this.state.selectedPickupMode)?.Description;\n const role = 'menu';\n return (\n
\n \n {this.state.isFilterExpanded ? (\n
    \n {productPickupModeList?.map((delivery: DeliveryOption) => {\n return (\n
  • \n \n \n {delivery.Description}\n \n \n
  • \n );\n })}\n
\n ) : null}\n
\n );\n }\n\n /**\n * Method to call when drop dwon get selected.\n */\n private readonly _rendeDeliveryOptions = () => {\n const isExpandOptionsState = this.state.isFilterExpanded;\n this.setState({\n isFilterExpanded: !isExpandOptionsState\n });\n };\n\n /**\n * Method to call on select pickup mode.\n * @param event - Mouse event.\n * @returns Void.\n */\n private readonly _onSelect = async (event: React.MouseEvent): Promise => {\n event.preventDefault();\n const deliveryCode = event.currentTarget.getAttribute('data-value');\n if (deliveryCode !== null) {\n this.setState({\n selectedPickupMode: deliveryCode\n });\n\n this._rendeDeliveryOptions();\n await this.props.onChange(deliveryCode);\n }\n };\n\n /**\n * Method to call on select pickup mode.\n * @param event - Mouse event.\n * @returns Void.\n */\n private readonly _onKeyDown = async (event: React.KeyboardEvent): Promise => {\n event.preventDefault();\n const deliveryCode = event.currentTarget.getAttribute('data-value');\n if (deliveryCode !== null) {\n this.setState({\n selectedPickupMode: deliveryCode\n });\n\n this._rendeDeliveryOptions();\n await this.props.onChange(deliveryCode);\n }\n };\n}\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { RegularStoreHours } from '@msdyn365-commerce/retail-proxy';\nimport get from 'lodash/get';\n\nimport { IStoreSelectorLocationLineItemResources } from '.';\n\nexport interface IHoursDisplayInfo {\n startDayShort: string;\n startDayFull: string;\n endDayShort?: string;\n endDayFull?: string;\n timeRange: string;\n}\n\ninterface IHoursInfo {\n isClosed: boolean;\n openTime?: number;\n closeTime?: number;\n}\n\ntype DayType = 'MON' | 'TUE' | 'WED' | 'THU' | 'FRI' | 'SAT' | 'SUN';\n\nexport const secondsToTime = (seconds: number | undefined): string | undefined => {\n if (seconds === undefined) {\n return undefined;\n }\n let hours = Math.floor(seconds / (60 * 60));\n const ampm = hours >= 12 ? 'pm' : 'am';\n hours %= 12;\n hours = hours ? hours : 12;\n const divisorForMinutes = seconds % (60 * 60);\n const minutes = Math.floor(divisorForMinutes / 60) < 10 ? `0${Math.floor(divisorForMinutes / 60)}` : Math.floor(divisorForMinutes / 60);\n return `${hours}:${minutes} ${ampm}`;\n};\n\nconst getShortTimeString = (day: DayType, resources: IStoreSelectorLocationLineItemResources): string => {\n switch (day) {\n case 'MON':\n return resources.days.monday;\n case 'TUE':\n return resources.days.tuesday;\n case 'WED':\n return resources.days.wednesday;\n case 'THU':\n return resources.days.thursday;\n case 'FRI':\n return resources.days.friday;\n case 'SAT':\n return resources.days.saturday;\n default:\n // Case 'SUN':\n return resources.days.sunday;\n }\n};\n\nconst getFullTimeString = (day: DayType, resources: IStoreSelectorLocationLineItemResources): string => {\n switch (day) {\n case 'MON':\n return resources.days.mondayFull;\n case 'TUE':\n return resources.days.tuesdayFull;\n case 'WED':\n return resources.days.wednesdayFull;\n case 'THU':\n return resources.days.thursdayFull;\n case 'FRI':\n return resources.days.fridayFull;\n case 'SAT':\n return resources.days.saturdayFull;\n default:\n // Case 'SUN':\n return resources.days.sundayFull;\n }\n};\n\nconst buildHoursDisplayInfo = (\n startDay: DayType,\n endDay: DayType,\n hoursInfo: string,\n resources: IStoreSelectorLocationLineItemResources\n): IHoursDisplayInfo => {\n return {\n startDayShort: getShortTimeString(startDay, resources),\n startDayFull: getFullTimeString(startDay, resources),\n endDayShort: startDay !== endDay ? getShortTimeString(endDay, resources) : undefined,\n endDayFull: startDay !== endDay ? getFullTimeString(endDay, resources) : undefined,\n timeRange: hoursInfo\n };\n};\n\nconst shouldMergeLines = (firstLine: IHoursInfo, secondLine: IHoursInfo): boolean => {\n if (firstLine.isClosed && secondLine.isClosed) {\n return true;\n }\n\n if (!firstLine.isClosed && !secondLine.isClosed) {\n return firstLine.openTime === secondLine.openTime && firstLine.closeTime === secondLine.closeTime;\n }\n\n return false;\n};\n\nconst getStoreHoursData = (storeHours: RegularStoreHours, dateForLookup: string): IHoursInfo => {\n return {\n isClosed: get(storeHours, `IsClosedOn${dateForLookup}`, false),\n openTime: get(storeHours, `${dateForLookup}OpenTime`, undefined),\n closeTime: get(storeHours, `${dateForLookup}CloseTime`, undefined)\n };\n};\n\nconst buildStoreHoursString = (hoursInfo: IHoursInfo, resources: IStoreSelectorLocationLineItemResources): string => {\n if (hoursInfo.isClosed) {\n return resources.closedText;\n }\n const openFrom: string | undefined = secondsToTime(hoursInfo.openTime);\n const openTo: string | undefined = secondsToTime(hoursInfo.closeTime);\n\n return `${openFrom}–${openTo}`;\n};\n\nexport const buildStoreHours = (storeHours: RegularStoreHours, resources: IStoreSelectorLocationLineItemResources): IHoursDisplayInfo[] => {\n const storeHoursList: IHoursDisplayInfo[] = [];\n\n const mondayHours = getStoreHoursData(storeHours, 'Monday');\n const tuesdayHours = getStoreHoursData(storeHours, 'Tuesday');\n const wednesdayHours = getStoreHoursData(storeHours, 'Wednesday');\n const thursdayHours = getStoreHoursData(storeHours, 'Thursday');\n const fridayHours = getStoreHoursData(storeHours, 'Friday');\n const saturdayHours = getStoreHoursData(storeHours, 'Saturday');\n const sundayHours = getStoreHoursData(storeHours, 'Sunday');\n\n let periodStart: DayType = 'MON';\n let periodEnd: DayType = 'MON';\n\n if (!shouldMergeLines(mondayHours, tuesdayHours)) {\n storeHoursList.push(buildHoursDisplayInfo(periodStart, periodEnd, buildStoreHoursString(mondayHours, resources), resources));\n\n periodStart = 'TUE';\n }\n periodEnd = 'TUE';\n\n if (!shouldMergeLines(tuesdayHours, wednesdayHours)) {\n storeHoursList.push(buildHoursDisplayInfo(periodStart, periodEnd, buildStoreHoursString(tuesdayHours, resources), resources));\n\n periodStart = 'WED';\n }\n periodEnd = 'WED';\n\n if (!shouldMergeLines(wednesdayHours, thursdayHours)) {\n storeHoursList.push(buildHoursDisplayInfo(periodStart, periodEnd, buildStoreHoursString(wednesdayHours, resources), resources));\n\n periodStart = 'THU';\n }\n periodEnd = 'THU';\n\n if (!shouldMergeLines(thursdayHours, fridayHours)) {\n storeHoursList.push(buildHoursDisplayInfo(periodStart, periodEnd, buildStoreHoursString(thursdayHours, resources), resources));\n\n periodStart = 'FRI';\n }\n periodEnd = 'FRI';\n\n if (!shouldMergeLines(fridayHours, saturdayHours)) {\n storeHoursList.push(buildHoursDisplayInfo(periodStart, periodEnd, buildStoreHoursString(fridayHours, resources), resources));\n\n periodStart = 'SAT';\n }\n periodEnd = 'SAT';\n\n if (!shouldMergeLines(saturdayHours, sundayHours)) {\n storeHoursList.push(buildHoursDisplayInfo(periodStart, periodEnd, buildStoreHoursString(saturdayHours, resources), resources));\n\n periodStart = 'SUN';\n }\n periodEnd = 'SUN';\n\n storeHoursList.push(buildHoursDisplayInfo(periodStart, periodEnd, buildStoreHoursString(sundayHours, resources), resources));\n\n return storeHoursList;\n};\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { DeliveryOption, OrgUnitContact, OrgUnitLocation, StoreHours } from '@msdyn365-commerce/retail-proxy';\nimport { ArrayExtensions } from '@msdyn365-commerce-modules/retail-actions';\nimport {\n getPayloadObject,\n getTelemetryAttributes,\n IPayLoad,\n ITelemetryContent,\n TelemetryConstant\n} from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport { PickUpOptionList } from '../pickup-option-list';\nimport { buildStoreHours, IHoursDisplayInfo, secondsToTime } from './date-time-helpers';\n\n/**\n * Store Locator line item resources.\n */\nexport interface IStoreSelectorLocationLineItemResources {\n contactInfoHeader: string;\n storeHoursHeader: string;\n availabilityInfoHeader: string;\n\n closedText: string;\n\n outOfStock: string;\n inStock: string;\n\n currentLocation: string;\n selectLocation: string;\n selectLocationAriaLabelFormat: string;\n setAsPreferredStoreText: string;\n setAsPreferredStoreTextAriaLabel: string;\n preferredStoreText: string;\n preferredStoreAriaLabel: string;\n\n days: {\n monday: string;\n tuesday: string;\n wednesday: string;\n thursday: string;\n friday: string;\n saturday: string;\n sunday: string;\n mondayFull: string;\n tuesdayFull: string;\n wednesdayFull: string;\n thursdayFull: string;\n fridayFull: string;\n saturdayFull: string;\n sundayFull: string;\n };\n}\n\n/**\n * Store Locator line item props.\n */\nexport interface IStoreSelectorLocationLineItemProps {\n location: OrgUnitLocation;\n storeHours?: StoreHours;\n\n hideStockStatus?: boolean;\n isInStock?: boolean;\n isCurrentLocation?: boolean;\n\n resources: IStoreSelectorLocationLineItemResources;\n stockStatusLabel?: string;\n storeLocatorView?: boolean;\n isPreferredStoreEnabled?: boolean;\n index: string;\n preferredStoreLocationId: string | null;\n storePickUpOptionList?: DeliveryOption[];\n productPickUpOptionList?: DeliveryOption[];\n filteredPickupMode?: string;\n shouldShowIndex?: boolean;\n\n /**\n * The telemetry content.\n */\n telemetryContent?: ITelemetryContent;\n preferredDistanceUnit: string;\n isLocationDisabled?: boolean;\n handlers: {\n onSelected(location: OrgUnitLocation, deliveryMode?: string): void;\n onSetAsPreferredStore(locationId: string | undefined): void;\n onRemovePreferredStore(): void;\n };\n}\n\n/**\n * Store Locator line item action component.\n */\nconst storeSelectorLocationLineItemComponentActions = {\n onLocationSelected(props: IStoreSelectorLocationLineItemProps, deliveryMode?: string): void {\n props.handlers.onSelected(props.location, deliveryMode);\n },\n onSetAsPreferredStore(props: IStoreSelectorLocationLineItemProps): void {\n props.handlers.onSetAsPreferredStore(props.location.OrgUnitNumber);\n },\n onRemovePreferredStore(props: IStoreSelectorLocationLineItemProps): void {\n props.handlers.onRemovePreferredStore();\n }\n};\n\n/**\n * Function to render store hours.\n * @param storeHours - Store Hours object.\n * @param location - Store Unit.\n * @param resources - Resources.\n * @returns - Jsx element.\n */\nconst renderStoreHours = (\n storeHours: StoreHours | undefined,\n location: OrgUnitLocation,\n resources: IStoreSelectorLocationLineItemResources\n): JSX.Element | null => {\n // First, use the store hours. This will allow listing day by day houts\n if (storeHours?.RegularStoreHours) {\n const storeHoursList: IHoursDisplayInfo[] = buildStoreHours(storeHours.RegularStoreHours, resources);\n\n return (\n
\n {storeHoursList.map(displayTime => (\n
\n {displayTime.endDayShort ? (\n
\n {displayTime.startDayShort} – \n {displayTime.endDayShort}\n
\n ) : (\n
\n {displayTime.startDayShort}\n
\n )}\n
{displayTime.timeRange}
\n
\n ))}\n
\n );\n }\n\n // If that fails, fall back to using the OpenFrom and OpenTo properties on the location\n const storeOpenFrom: string | undefined = secondsToTime(location.OpenFrom);\n const storeOpenTo: string | undefined = secondsToTime(location.OpenTo);\n\n return (\n
\n {storeOpenFrom}-{storeOpenTo}\n
\n );\n};\n\n/**\n * Function to retrun distance measure unit.\n * @param distance - Store location within radius.\n * @param preferredDistanceUnit - Unit configuration.\n * @param isLocationDisabled - Flag to check user location.\n * @returns - Unit of distance.\n */\nexport const buildDistanceString = (\n distance: number | undefined,\n preferredDistanceUnit: string,\n isLocationDisabled?: boolean\n): string | undefined => {\n if (distance === undefined || isLocationDisabled) {\n return undefined;\n } else if (distance < 1) {\n return `(<1 ${preferredDistanceUnit})`;\n }\n return `(${Math.floor(distance)} ${preferredDistanceUnit})`;\n};\n\n/**\n * Function to store contact.\n * @param contacts - Store location within radius.\n * @returns - Return primary contact number of store.\n */\nconst extractPhoneNumber = (contacts: OrgUnitContact[] | undefined): string | undefined => {\n if (!contacts) {\n return undefined;\n }\n\n const allPhoneContacts = contacts.filter(contact => contact.ContactTypeValue === 1 && !contact.IsPrivate);\n\n if (ArrayExtensions.hasElements(allPhoneContacts)) {\n const primaryPhoneContact = allPhoneContacts.find(contact => contact.IsPrimary);\n\n if (primaryPhoneContact) {\n return primaryPhoneContact.Locator;\n }\n\n return allPhoneContacts[0].Locator;\n }\n\n return undefined;\n};\n\n/**\n * On Store locator click functionality.\n * @param props -Store locator location items.\n * @returns Store locator selected location line item action.\n */\nconst onPickupInStoreClickHandler = (props: IStoreSelectorLocationLineItemProps) => () => {\n storeSelectorLocationLineItemComponentActions.onLocationSelected(props);\n};\n\n/**\n * On Store locator click functionality.\n * @param props -Store locator location items.\n * @param pickupMode -Store locator location items.\n * @returns Store locator selected location line item action.\n */\nconst onPickupModeSelectHandler = (props: IStoreSelectorLocationLineItemProps, pickupMode?: string) => () => {\n storeSelectorLocationLineItemComponentActions.onLocationSelected(props, pickupMode);\n};\n\n/**\n * Set Preferred store functionality.\n * @param props -Store locator location items.\n * @returns Store locator selected location line item action.\n */\nconst onSetPreferredStoreClickHandler = (props: IStoreSelectorLocationLineItemProps) => () => {\n storeSelectorLocationLineItemComponentActions.onSetAsPreferredStore(props);\n};\n\n/**\n * Remove preferred store functionality.\n * @param props -Store locator location items.\n * @returns Store locator selected location line item action.\n */\nconst removePreferredStoreHandler = (props: IStoreSelectorLocationLineItemProps) => () => {\n storeSelectorLocationLineItemComponentActions.onRemovePreferredStore(props);\n};\n\n/**\n * On Change functionality.\n * @param props -Store locator location items.\n * @returns Store locator selected location line item action.\n */\nconst onChangeHandler = (props: IStoreSelectorLocationLineItemProps) => async (deliveryCode: string): Promise => {\n storeSelectorLocationLineItemComponentActions.onLocationSelected(props, deliveryCode);\n return Promise.resolve();\n};\n\n/**\n * Method to render pickup modes.\n * @param props - StoreSelector Line item props.\n * @param deliveryOptionList - Product DeliveryOption List.\n * @param pickupInStoreButtonText - Pickup store button text.\n * @param pickupInStoreAriaLabel - Pickup store aria label.\n * @returns Jsx component.\n */\nconst renderPickupModes = (\n props: IStoreSelectorLocationLineItemProps,\n deliveryOptionList: DeliveryOption[],\n pickupInStoreButtonText: string,\n pickupInStoreAriaLabel: string\n): JSX.Element | null => {\n if (props.filteredPickupMode === undefined) {\n return (\n \n );\n }\n return (\n \n {pickupInStoreButtonText}\n \n );\n};\n\n/**\n * Method to check if we have atleast one common delivery code between product and channel.\n * @param productdeliveryOptions - Product DeliveryOption List.\n * @param storePickUpOptionList - Channel DeliveryOption List.\n * @returns DeliveryOptionList.\n */\nexport const matchDeliveryOptions = (\n productdeliveryOptions: DeliveryOption[] | undefined,\n storePickUpOptionList: DeliveryOption[] | undefined\n): DeliveryOption[] => {\n const deliveryOption: DeliveryOption[] = [];\n productdeliveryOptions?.map(delivery => {\n const pickup = storePickUpOptionList?.find(_delivery => _delivery.Code === delivery.Code);\n if (pickup) {\n deliveryOption.push(pickup);\n }\n });\n\n return deliveryOption;\n};\n\n/**\n * Renders store location line items.\n * @param props - Store location line items props.\n * @returns - HTML.\n */\nconst storeSelectorLocationLineItem: React.FC = (props: IStoreSelectorLocationLineItemProps) => {\n const {\n hideStockStatus,\n isCurrentLocation,\n isInStock,\n location,\n resources,\n storeHours,\n stockStatusLabel,\n storeLocatorView,\n index,\n preferredStoreLocationId,\n isPreferredStoreEnabled,\n isLocationDisabled,\n telemetryContent,\n storePickUpOptionList,\n productPickUpOptionList,\n shouldShowIndex\n } = props;\n\n const storeName: string | undefined = location.OrgUnitName;\n const distanceAsString: string | undefined = buildDistanceString(location.Distance, props.preferredDistanceUnit, isLocationDisabled);\n const storeAddress: string | undefined = location.Address;\n const phoneNumber: string | undefined = extractPhoneNumber(location.Contacts);\n\n const resourceLabel = isInStock ? resources.inStock : resources.outOfStock;\n const stockLabel = stockStatusLabel ? stockStatusLabel : undefined;\n const stockText: string | undefined = hideStockStatus ? undefined : stockLabel ? stockLabel : resourceLabel;\n const canSelectLocation = hideStockStatus || isInStock;\n const pickupInStoreButtonText: string = resources.selectLocation;\n const pickupInStoreAriaLabel: string = resources.selectLocationAriaLabelFormat.replace('{StoreName}', storeName || '');\n const isPreferredStore = preferredStoreLocationId === location.OrgUnitNumber;\n const payLoad: IPayLoad = getPayloadObject('click', telemetryContent!, TelemetryConstant.PickupInStore);\n const attributes = getTelemetryAttributes(telemetryContent!, payLoad);\n payLoad.contentAction.etext = TelemetryConstant.PreferredStore;\n const preferredStoreAttributes = getTelemetryAttributes(telemetryContent!, payLoad);\n payLoad.contentAction.etext = TelemetryConstant.RemovePreferredStore;\n const removePreferredStoreAttributes = getTelemetryAttributes(telemetryContent!, payLoad);\n const deliveryOptionList = matchDeliveryOptions(productPickUpOptionList, storePickUpOptionList);\n /* eslint-disable prettier/prettier */\n return (\n
\n
\n {(shouldShowIndex || storeLocatorView) && {index}}\n {storeName}\n {distanceAsString ? \n {' '}\n {distanceAsString}\n : false}\n
\n
\n
\n

{resources.contactInfoHeader}

\n {storeAddress && (\n
\n \n {storeAddress}\n
\n )}\n {phoneNumber && (\n
\n \n {phoneNumber}\n
\n )}\n
\n
\n

{resources.storeHoursHeader}

\n {renderStoreHours(storeHours, location, resources)}\n
\n {!storeLocatorView && (\n
\n

{resources.availabilityInfoHeader}

\n {stockText &&

{stockText}

}\n {isCurrentLocation ? (\n

{resources.currentLocation}

\n ) : canSelectLocation ? (\n deliveryOptionList.length === 0 ? (\n \n {pickupInStoreButtonText}\n \n ) : (\n renderPickupModes(props, deliveryOptionList, pickupInStoreButtonText, pickupInStoreAriaLabel)\n )\n ) : (\n false\n )}\n
\n )}\n {isPreferredStoreEnabled ? (\n isPreferredStore ? (\n \n {resources.preferredStoreText}\n \n ) : (\n \n {resources.setAsPreferredStoreText}\n \n )\n ) : null}\n
\n
\n );\n};\n\n/**\n * Store location line item component.\n */\nexport const StoreSelectorLocationLineItemComponent = storeSelectorLocationLineItem as (\n props: IStoreSelectorLocationLineItemProps\n) => JSX.Element;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\n/* eslint-disable no-duplicate-imports */\nimport { DeliveryOption, ItemAvailability, OrgUnitLocation } from '@msdyn365-commerce/retail-proxy';\nimport { ArrayExtensions, IFullOrgUnitAvailability } from '@msdyn365-commerce-modules/retail-actions';\nimport { ITelemetryContent } from '@msdyn365-commerce-modules/utilities';\nimport classnames from 'classnames';\nimport { observable, reaction } from 'mobx';\nimport { observer } from 'mobx-react';\nimport * as React from 'react';\n\nimport { IStoreSelectorResources } from '../store-selector.props.autogenerated';\nimport { IStoreSelectorLocationLineItemResources, StoreSelectorLocationLineItemComponent } from './store-selectorcls-location-line-item';\n\n/**\n * Store selector location lines props interface.\n */\nexport interface IStoreSelectorLocationLinesProps {\n locations?: IFullOrgUnitAvailability[];\n resources: IStoreSelectorResources;\n preferredDistanceUnit?: string;\n\n alreadySelectedLocation?: OrgUnitLocation;\n outOfStockThreshold: number;\n enableOutOfStockCheck: boolean;\n storeLocatorView?: boolean;\n selectedStoreLocationId?: string;\n isPreferredStoreEnabled?: boolean;\n displayList?: boolean;\n isLocationDisabled?: boolean;\n productPickUpDeliveryOptions?: DeliveryOption[];\n onClick: (locationId: string | undefined) => void;\n preferredStoreLocationId: string | null;\n onSetAsPreferredStore: (locationId: string | undefined) => void;\n onRemovePreferredStore: () => void;\n filteredPickupMode?: string;\n shouldShowIndex?: boolean;\n\n /**\n * The telemetry content.\n */\n telemetryContent?: ITelemetryContent;\n onLocationSelected(location: OrgUnitLocation | undefined): void;\n}\n\n/**\n * Displays all the location line items, or null if none exists.\n */\n@observer\nexport class StoreSelectorLocationLines extends React.PureComponent {\n @observable private _stores: IFullOrgUnitAvailability[] | undefined;\n\n private readonly selectedLocationRef: React.RefObject;\n\n private storeCounter: number;\n\n public constructor(props: IStoreSelectorLocationLinesProps) {\n super(props);\n this.selectedLocationRef = React.createRef();\n this.storeCounter = 0;\n }\n\n public componentDidUpdate(previousProps: IStoreSelectorLocationLinesProps): void {\n if (this.props.selectedStoreLocationId !== previousProps.selectedStoreLocationId) {\n this._scrollIntoView();\n }\n }\n\n public componentDidMount(): void {\n if (this.props.locations) {\n this._stores = this._sortStores(this.props.locations);\n }\n\n reaction(\n () => this.props.locations,\n () => {\n if (this.props.locations) {\n this._stores = this._sortStores(this.props.locations);\n }\n }\n );\n }\n\n public render(): JSX.Element | null {\n if (!ArrayExtensions.hasElements(this._stores)) {\n return null;\n }\n\n this.storeCounter = 0;\n\n return (\n
\n {this._stores.map((store, index) => {\n return this._renderStoreLocation(store, index);\n })}\n
\n );\n }\n\n /**\n * On click Handler function.\n * @param orgUnitLocation -OrgUnit location.\n * @returns Click action on orgUnit Location.\n */\n private readonly onClickHandler = (orgUnitLocation: OrgUnitLocation | undefined) => () => {\n this.props.onClick(orgUnitLocation?.OrgUnitNumber);\n };\n\n private _renderStoreLocation(store: IFullOrgUnitAvailability, index: number): JSX.Element | undefined {\n const orgUnitLocation = store?.OrgUnitAvailability?.OrgUnitLocation;\n const selectedStoreLocationId = this.props.selectedStoreLocationId;\n const deliveryOptions = store?.OrgUnitPickUpDeliveryModes;\n const defaultAriaSetsize = 0;\n if (orgUnitLocation) {\n ++this.storeCounter;\n return (\n \n \n \n );\n }\n return undefined;\n }\n\n /**\n * Sort store.\n * @param stores - Array of stores data.\n * @returns Sorted stores array.\n */\n private _sortStores(stores: IFullOrgUnitAvailability[]): IFullOrgUnitAvailability[] {\n /**\n * IsPreferredStore.\n * @param value - Array of stores data.\n * @returns IsPreferred store boolean value.\n */\n const isPreferredStore = (value: IFullOrgUnitAvailability) =>\n this.props.isPreferredStoreEnabled &&\n this.props.preferredStoreLocationId &&\n value.OrgUnitAvailability?.OrgUnitLocation?.OrgUnitNumber === this.props.preferredStoreLocationId;\n\n return [...stores.filter(isPreferredStore), ...stores.filter(store => !isPreferredStore(store))];\n }\n\n /**\n * Scroll into view.\n */\n private readonly _scrollIntoView = () => {\n const selectedLocationDiv = this.selectedLocationRef.current;\n const parent = selectedLocationDiv?.parentElement;\n if (selectedLocationDiv && parent) {\n if (parent.scrollTop > selectedLocationDiv.offsetTop) {\n parent.scrollTop = selectedLocationDiv.offsetTop;\n } else if (selectedLocationDiv.offsetTop + selectedLocationDiv.clientHeight > parent.scrollTop + parent.clientHeight) {\n parent.scrollTop = selectedLocationDiv.offsetTop + selectedLocationDiv.clientHeight - parent.clientHeight;\n }\n }\n };\n\n /**\n * Is current location.\n * @param location - Org unit location.\n * @returns The current location.\n */\n private readonly _isCurrentLocation = (location: OrgUnitLocation | undefined): boolean =>\n (this.props.alreadySelectedLocation && location && this.props.alreadySelectedLocation.OrgUnitNumber === location.OrgUnitNumber) ||\n false;\n\n /**\n * Check the product is in stock or not.\n * @param itemAvailabilities - Item availabilities.\n * @returns If the product is in stock.\n */\n private readonly _isProductInStock = (itemAvailabilities: ItemAvailability[] | undefined): boolean => {\n if (!this.props.enableOutOfStockCheck) {\n return true;\n }\n\n if (ArrayExtensions.hasElements(itemAvailabilities)) {\n return itemAvailabilities[0].AvailableQuantity ? itemAvailabilities[0].AvailableQuantity > 0 : false;\n }\n\n return false;\n };\n\n /**\n * Get the stock inventory label.\n * @param availabilityWithHours - Full org unit availability.\n * @returns The stock label.\n */\n private readonly _stockInventoryLabel = (availabilityWithHours: IFullOrgUnitAvailability | undefined): string | undefined => {\n if (availabilityWithHours && ArrayExtensions.hasElements(availabilityWithHours.ProductInventoryInformation)) {\n for (let i = 0; i < availabilityWithHours.ProductInventoryInformation.length; i++) {\n if (\n availabilityWithHours.OrgUnitAvailability?.OrgUnitLocation?.InventoryLocationId ===\n availabilityWithHours.ProductInventoryInformation[`${i}`].InventLocationId\n ) {\n return availabilityWithHours.ProductInventoryInformation[`${i}`].StockLevelLabel;\n }\n }\n }\n\n return undefined;\n };\n\n /**\n * Map resources.\n * @param resources - Store resources.\n * @returns Resources.\n */\n private readonly _mapResources = (resources: IStoreSelectorResources): IStoreSelectorLocationLineItemResources => {\n return {\n contactInfoHeader: resources.contactText,\n storeHoursHeader: resources.timeText,\n availabilityInfoHeader: resources.availabilityText,\n\n closedText: resources.storeHoursClosedText,\n outOfStock: resources.outOfStockText,\n inStock: resources.inStockText,\n\n currentLocation: resources.selectedStoreLocationText,\n selectLocation: resources.selectStoreText,\n selectLocationAriaLabelFormat: resources.selectStoreAriaFormatText,\n setAsPreferredStoreText: resources.setAsPreferredStoreText,\n setAsPreferredStoreTextAriaLabel: resources.setAsPreferredStoreTextAriaLabel,\n preferredStoreText: resources.preferredStoreText,\n preferredStoreAriaLabel: resources.preferredStoreAriaLabel,\n\n days: {\n monday: resources.storeHoursMondayText,\n tuesday: resources.storeHoursTuesdayText,\n wednesday: resources.storeHoursWednesdayText,\n thursday: resources.storeHoursThursdayText,\n friday: resources.storeHoursFridayText,\n saturday: resources.storeHoursSaturdayText,\n sunday: resources.storeHoursSundayText,\n mondayFull: resources.storeHoursMondayFullText,\n tuesdayFull: resources.storeHoursTuesdayFullText,\n wednesdayFull: resources.storeHoursWednesdayFullText,\n thursdayFull: resources.storeHoursThursdayFullText,\n fridayFull: resources.storeHoursFridayFullText,\n saturdayFull: resources.storeHoursSaturdayFullText,\n sundayFull: resources.storeHoursSundayFullText\n }\n };\n };\n}\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\n/* eslint-disable no-duplicate-imports */\nimport * as Msdyn365 from '@msdyn365-commerce/core';\nimport { DeliveryOption } from '@msdyn365-commerce/retail-proxy';\nimport {\n getPayloadObject,\n getTelemetryAttributes,\n IPayLoad,\n ITelemetryContent,\n KeyCodes,\n TelemetryConstant\n} from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport { StorePickUpOptionList } from './store-pickup-option-list';\n\n/**\n * Store Selector Search Form Props interface.\n */\nexport interface IStoreSelectorSearchFormProps {\n resources: {\n searchInputAriaLabel: string;\n searchButtonAriaLabel: string;\n searchPlaceholderText: string;\n seeAllStoresText: string;\n viewListText: string;\n viewMapText: string;\n pickupFilterByHeading?: string;\n pickupFilterMenuHeading?: string;\n };\n\n id: string;\n value: string;\n isMapDisabled?: boolean;\n showAllStores?: boolean;\n displayList?: boolean;\n locatorView?: boolean;\n productPickUpDeliveryOptions?: DeliveryOption[];\n hasEnabledPickupFilterToShowStore?: boolean;\n filteredPickupMode?: string;\n\n /**\n * The telemetry content.\n */\n telemetryContent?: ITelemetryContent;\n onShowAllStores(): void;\n onToggleListMapViewState(): void;\n performSearch(searchTerm: string): Promise;\n searchTermChanged(searchTerm: string): Promise;\n filterPickupModeSelected(pickupMode: string): void;\n}\n\n/**\n * Simple search form consisting of search text and a search button.\n */\nexport class StoreSelectorSearchForm extends React.PureComponent {\n private readonly searchBoxRef: React.RefObject = React.createRef();\n\n private readonly storeSearchAttributes: Msdyn365.IDictionary | undefined;\n\n private readonly showAllStoreAttributes: Msdyn365.IDictionary | undefined;\n\n private readonly toggleMapViewAttributes: Msdyn365.IDictionary | undefined;\n\n private previousValue: string = '';\n\n private isSearchResultOpened: boolean = false;\n\n public constructor(props: IStoreSelectorSearchFormProps) {\n super(props);\n this.state = { value: '' };\n this._handleKeyPressPrev = this._handleKeyPressPrev.bind(this);\n const payLoad: IPayLoad = getPayloadObject('click', props.telemetryContent!, TelemetryConstant.SearchStore);\n this.storeSearchAttributes = getTelemetryAttributes(props.telemetryContent!, payLoad);\n payLoad.contentAction.etext = TelemetryConstant.ShowAllStore;\n this.showAllStoreAttributes = getTelemetryAttributes(props.telemetryContent!, payLoad);\n payLoad.contentAction.etext = TelemetryConstant.ToggleMapView;\n this.toggleMapViewAttributes = getTelemetryAttributes(props.telemetryContent!, payLoad);\n }\n\n public render(): JSX.Element {\n const {\n resources: {\n searchButtonAriaLabel,\n searchPlaceholderText,\n seeAllStoresText,\n viewListText,\n viewMapText,\n pickupFilterByHeading,\n pickupFilterMenuHeading\n },\n id,\n value,\n isMapDisabled,\n showAllStores,\n displayList,\n locatorView,\n onShowAllStores,\n productPickUpDeliveryOptions,\n hasEnabledPickupFilterToShowStore\n } = this.props;\n\n const toggleButtonText = displayList ? viewMapText : viewListText;\n\n return (\n
\n \n
\n )}\n {this.renderPickupModesList(\n this.props,\n toggleButtonText,\n productPickUpDeliveryOptions,\n pickupFilterMenuHeading,\n locatorView,\n pickupFilterByHeading,\n hasEnabledPickupFilterToShowStore,\n displayList\n )}\n \n );\n }\n\n /**\n * Handles the key press on the input box.\n * @param event - Event object.\n */\n private readonly _handleInputKeyPress = (event: React.KeyboardEvent): void => {\n // When the user navigates through the up and down arrow on the result returned by the auto suggest and press enter.\n // At that time, two requests were made to fetch the store details due to which incorrect result is shown and causes flickering.\n // In order to avoid that. Checking if the search result is open or not.\n if (event.keyCode === KeyCodes.ArrowUp || event.keyCode === KeyCodes.ArrowDown) {\n const activeDescedantValue = (event.target as HTMLInputElement).getAttribute('aria-activedescendant');\n if (activeDescedantValue) {\n if (this.previousValue === '') {\n this.previousValue = activeDescedantValue;\n this.isSearchResultOpened = true;\n return;\n }\n\n if (activeDescedantValue !== this.previousValue) {\n this.previousValue = activeDescedantValue;\n this.isSearchResultOpened = true;\n } else {\n this.isSearchResultOpened = false;\n }\n }\n }\n };\n\n /**\n * Calls method display result.\n * @param event - The first number.\n */\n private readonly _handleKeyPressPrev = (event: React.KeyboardEvent): void => {\n if (event.keyCode === KeyCodes.Enter || event.keyCode === KeyCodes.Space) {\n this.props.onShowAllStores();\n }\n };\n\n /**\n * Method called on search text changed.\n * @param event - Input value.\n */\n private readonly _searchTextChanged = async (event: React.ChangeEvent): Promise => {\n const inputValue: string = event.target.value;\n\n await this.props.searchTermChanged(inputValue);\n };\n\n /**\n * Method called on search submit.\n * @param event - Input value.\n */\n private readonly _onSubmit = async (event: React.SyntheticEvent): Promise => {\n event.preventDefault(); // Prevents form submission\n this.searchBoxRef.current?.blur();\n if (!this.isSearchResultOpened) {\n await this.props.performSearch(this.props.value);\n }\n this.isSearchResultOpened = false;\n };\n\n /**\n * Method called on product pickup option change.\n * @returns - Void.\n */\n private readonly _onChangeHandler = () => async (deliveryCode: string): Promise => {\n this.props.filterPickupModeSelected(deliveryCode);\n return Promise.resolve();\n };\n\n /**\n * Method to render pickup mode list.\n * @param props - Store selector search form props.\n * @param toggleButtonText - Locator view button text.\n * @param productPickUpDeliveryOptions - Product DeliveryOption List.\n * @param pickupFilterMenuHeading - Pickup store button text.\n * @param locatorView - Locator View is on\\off.\n * @param pickupFilterByHeading - Pickup list label text.\n * @param hasEnabledPickupFilterToShowStore - Flag to check header filter is enabled.\n * @param shouldDisplayList - Display List.\n * @returns Jsx component.\n */\n private readonly renderPickupModesList = (\n props: IStoreSelectorSearchFormProps,\n toggleButtonText: string,\n productPickUpDeliveryOptions: DeliveryOption[] | undefined,\n pickupFilterMenuHeading: string | undefined,\n locatorView: boolean | undefined,\n pickupFilterByHeading: string | undefined,\n hasEnabledPickupFilterToShowStore: boolean | undefined,\n shouldDisplayList?: boolean\n ): JSX.Element | null => {\n const toggleButtonClass = shouldDisplayList ? 'view-map' : 'list-view';\n if (hasEnabledPickupFilterToShowStore) {\n return (\n
\n {locatorView && (\n \n {toggleButtonText}\n \n )}\n \n
{pickupFilterByHeading}
\n
\n );\n }\n if (locatorView) {\n return (\n \n {toggleButtonText}\n \n );\n }\n return null;\n };\n}\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport * as Msdyn365 from '@msdyn365-commerce/core';\nimport { IFullOrgUnitAvailability } from '@msdyn365-commerce-modules/retail-actions';\nimport classnames from 'classnames';\nimport * as React from 'react';\n\nimport { IStoreSelectorResources, ITermsOfServiceLinkData } from '../store-selector.props.autogenerated';\n\nexport interface IStoreSelectorEmptyMessageProps {\n resources: IStoreSelectorResources;\n}\nexport const StoreSelectorEmptyMessage: React.FC = ({ resources }) => (\n
\n

{resources.emptyLocationsText}

\n
\n);\n\nexport const StoreSelectorWaiting: React.FC = () =>
;\n\nexport interface IStoreSelectorTermsOfServiceProps {\n link?: ITermsOfServiceLinkData;\n requestContext: Msdyn365.IRequestContext;\n onTextChange?(event: Msdyn365.ContentEditableEvent): void;\n}\n\nexport const StoreSelectorTermsOfService: React.FC = ({ link, requestContext, onTextChange }) => {\n if (link) {\n const editableLink: Msdyn365.ILinksData = {\n ariaLabel: link.ariaLabel,\n className: 'ms-store-select__terms-link',\n linkText: link.linkText,\n linkUrl: link.linkUrl.destinationUrl,\n openInNewTab: link.openInNewTab,\n role: 'link'\n };\n\n return (\n
\n \n
\n );\n }\n return null;\n};\n\nexport interface IStoreSelectorFoundLocationsMessage {\n resources: IStoreSelectorResources;\n locations?: IFullOrgUnitAvailability[];\n searchRadius: number;\n preferredDistanceUnit: string;\n isSeeAllStore: boolean;\n}\nexport const StoreSelectorFoundLocationsMessage: React.FC = ({\n locations,\n searchRadius,\n resources,\n isSeeAllStore,\n preferredDistanceUnit\n}) => {\n if (locations) {\n const storeCountMessage =\n preferredDistanceUnit === resources.milesShortText ? resources.storeCountMessage : resources.storeCountMessageInKm;\n return (\n
\n {isSeeAllStore\n ? resources.storeAllCountMessage.replace('{count}', locations.length.toString())\n : storeCountMessage.replace('{count}', locations.length.toString()).replace('{radius}', searchRadius.toString())}\n
\n );\n }\n\n return null;\n};\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\n/* eslint-disable no-duplicate-imports */\nimport { DeliveryOption, OrgUnitLocation } from '@msdyn365-commerce/retail-proxy';\nimport { IFullOrgUnitAvailability } from '@msdyn365-commerce-modules/retail-actions';\nimport {\n Button,\n getPayloadObject,\n getTelemetryAttributes,\n INodeProps,\n IPayLoad,\n ITelemetryContent,\n NodeTag,\n TelemetryConstant\n} from '@msdyn365-commerce-modules/utilities';\nimport React from 'react';\n\nimport { PickUpOptionList } from '../pickup-option-list';\nimport { buildDistanceString, matchDeliveryOptions } from '../store-selectorcls-location-line-item';\n\n/**\n * Store Locator line item resources.\n */\nexport interface ISelectedStoreResources {\n availabilityInfoHeader: string;\n closedText: string;\n outOfStock: string;\n inStock: string;\n currentLocation: string;\n selectLocation: string;\n selectLocationAriaLabelFormat: string;\n setAsPreferredStoreText: string;\n setAsPreferredStoreTextAriaLabel: string;\n preferredStoreText: string;\n preferredStoreAriaLabel: string;\n}\n\n/**\n * Store Selector resources.\n */\nexport interface ISelectedStoreProps {\n className?: string;\n shouldHideStockStatus?: boolean;\n isCurrentLocation?: boolean;\n isInStock?: boolean;\n selectedStore?: IFullOrgUnitAvailability;\n resources: ISelectedStoreResources;\n stockStatusLabel?: string;\n preferredStoreLocationId: string | null;\n isPreferredStoreEnabled?: boolean;\n isLocationDisabled?: boolean;\n telemetryContent?: ITelemetryContent;\n storePickUpOptionList?: DeliveryOption[];\n productPickUpOptionList?: DeliveryOption[];\n preferredDistanceUnit: string;\n filteredPickupMode?: string;\n handlers: {\n onSelected(location: OrgUnitLocation, deliveryMode?: string): void;\n onSetAsPreferredStore(locationId: string | undefined): void;\n onRemovePreferredStore(): void;\n closeStoreDetailsModal(): Promise;\n };\n}\n\n/**\n * Store Selector resources.\n */\nexport interface ISelectedStoreViewProps {\n isCurrentLocation?: boolean;\n canSelectLocation?: boolean;\n selectedStore?: IFullOrgUnitAvailability;\n deliveryOptions?: DeliveryOption[];\n isPreferredStore?: boolean;\n resources: ISelectedStoreResources;\n\n storeDetailsMain: INodeProps;\n storeHeader: INodeProps;\n storeName: React.ReactNode;\n storeDistance: React.ReactNode;\n storeDetailsAvailabilityContainer: INodeProps;\n productAvailability: React.ReactNode;\n stockStatus: React.ReactNode;\n currentLocation: React.ReactNode;\n pickUpDeliveryOptionButton: React.ReactNode;\n pickupModes?: React.ReactNode;\n preferredStoreButton?: React.ReactNode;\n removePreferredStoreButton?: React.ReactNode;\n storeDetailsCloseButton?: React.ReactNode;\n handlers: {\n onSelected(location: OrgUnitLocation, deliveryMode?: string): void;\n onSetAsPreferredStore(locationId: string | undefined): void;\n onRemovePreferredStore(): void;\n closeStoreDetailsModal(): Promise;\n };\n}\n\n/**\n * On Store locator click functionality.\n * @param props -Store locator location items.\n * @returns Store locator selected location line item action.\n */\nconst onPickupInStoreClickHandler = (props: ISelectedStoreProps) => () => {\n if (props.selectedStore?.OrgUnitAvailability?.OrgUnitLocation) {\n props.handlers.onSelected(props.selectedStore.OrgUnitAvailability.OrgUnitLocation);\n }\n};\n\n/**\n * Set Preferred store functionality.\n * @param props -Store locator location items.\n * @returns Store locator selected location line item action.\n */\nconst onSetPreferredStoreClickHandler = (props: ISelectedStoreProps) => () => {\n props.handlers.onSetAsPreferredStore(props.selectedStore?.OrgUnitAvailability?.OrgUnitLocation?.OrgUnitNumber);\n};\n\n/**\n * On Change functionality.\n * @param props -Store locator location items.\n * @returns Store locator selected location line item action.\n */\nconst onChangeHandler = (props: ISelectedStoreProps) => async (deliveryCode: string): Promise => {\n if (props.selectedStore?.OrgUnitAvailability?.OrgUnitLocation) {\n props.handlers.onSelected(props.selectedStore.OrgUnitAvailability.OrgUnitLocation, deliveryCode);\n }\n return Promise.resolve();\n};\n\n/**\n * Remove preferred store functionality.\n * @param props -Store locator location items.\n * @returns Store locator selected location line item action.\n */\nconst removePreferredStoreHandler = (props: ISelectedStoreProps) => () => {\n props.handlers.onRemovePreferredStore();\n};\n\n/**\n * On Store locator click functionality.\n * @param props -Store locator location items.\n * @param pickupMode -Store locator location items.\n * @returns Store locator selected location line item action.\n */\nconst onPickupModeSelectHandler = (props: ISelectedStoreProps, pickupMode?: string) => () => {\n if (props.selectedStore?.OrgUnitAvailability?.OrgUnitLocation) {\n props.handlers.onSelected(props.selectedStore.OrgUnitAvailability.OrgUnitLocation, pickupMode);\n }\n};\n\n/**\n * On store details close functionality.\n * @param props -Store locator location items.\n * @returns Void promise.\n */\nconst storeDetailsModalHandler = (props: ISelectedStoreProps) => async (): Promise => {\n await props.handlers.closeStoreDetailsModal();\n};\n\n/**\n * Method to render pickup modes.\n * @param props - StoreSelector Line item props.\n * @param deliveryOptionList - Product DeliveryOption List.\n * @param pickupInStoreButtonText - Pickup store button text.\n * @param pickupInStoreAriaLabel - Pickup store aria label.\n * @returns Jsx component.\n */\nconst renderPickupModes = (\n props: ISelectedStoreProps,\n deliveryOptionList: DeliveryOption[],\n pickupInStoreButtonText: string,\n pickupInStoreAriaLabel: string\n): JSX.Element | null => {\n if (props.filteredPickupMode === undefined) {\n return (\n \n );\n }\n return (\n \n {pickupInStoreButtonText}\n \n );\n};\n\n/**\n * Renders selected store details.\n * @param props - Store location details props.\n * @returns - Selected Store view props.\n */\nconst selectedStoreDetails = (props: ISelectedStoreProps): ISelectedStoreViewProps => {\n const {\n className,\n shouldHideStockStatus,\n isCurrentLocation,\n isInStock,\n selectedStore,\n resources,\n stockStatusLabel,\n preferredStoreLocationId,\n isPreferredStoreEnabled,\n isLocationDisabled,\n telemetryContent,\n storePickUpOptionList,\n productPickUpOptionList,\n preferredDistanceUnit\n } = props;\n\n const parentClassName = className ? className : 'ms-store-select__map__selected_store';\n const storeName: string | undefined = selectedStore?.OrgUnitAvailability?.OrgUnitLocation?.OrgUnitName;\n const location = selectedStore?.OrgUnitAvailability?.OrgUnitLocation;\n const distanceAsString: string | undefined = buildDistanceString(location?.Distance, preferredDistanceUnit, isLocationDisabled);\n\n const resourceLabel = isInStock ? resources.inStock : resources.outOfStock;\n const stockLabel = stockStatusLabel ? stockStatusLabel : undefined;\n // eslint-disable-next-line no-nested-ternary -- Required to check stock Label\n const stockText: string | undefined = shouldHideStockStatus ? undefined : stockLabel ? stockLabel : resourceLabel;\n const canSelectLocation = !shouldHideStockStatus && isInStock;\n const pickupInStoreButtonText: string = resources.selectLocation;\n const pickupInStoreAriaLabel: string = resources.selectLocationAriaLabelFormat.replace('{StoreName}', storeName ?? '');\n const isPreferredStore = preferredStoreLocationId === location?.OrgUnitNumber;\n const payLoad: IPayLoad = getPayloadObject('click', telemetryContent!, TelemetryConstant.PickupInStore);\n const attributes = getTelemetryAttributes(telemetryContent!, payLoad);\n payLoad.contentAction.etext = TelemetryConstant.PreferredStore;\n const preferredStoreAttributes = getTelemetryAttributes(telemetryContent!, payLoad);\n payLoad.contentAction.etext = TelemetryConstant.RemovePreferredStore;\n const removePreferredStoreAttributes = getTelemetryAttributes(telemetryContent!, payLoad);\n const deliveryOptionList = matchDeliveryOptions(productPickUpOptionList, storePickUpOptionList);\n\n const viewProps: ISelectedStoreViewProps = {\n selectedStore,\n isCurrentLocation,\n canSelectLocation,\n isPreferredStore,\n resources,\n deliveryOptions: deliveryOptionList,\n storeDetailsMain: {\n tag: 'div' as NodeTag,\n className: `${parentClassName}__main`\n },\n storeHeader: {\n tag: 'div' as NodeTag,\n className: `${parentClassName}__header`\n },\n storeName: {storeName},\n storeDetailsCloseButton: \n ),\n pickupModes: renderPickupModes(props, deliveryOptionList, pickupInStoreButtonText, pickupInStoreAriaLabel),\n preferredStoreButton: isPreferredStoreEnabled ? (\n \n {resources.preferredStoreText}\n \n ) : null,\n removePreferredStoreButton: isPreferredStoreEnabled ? (\n \n {resources.setAsPreferredStoreText}\n \n ) : null,\n handlers: {\n onSelected: props.handlers.onSelected,\n onSetAsPreferredStore: props.handlers.onSetAsPreferredStore,\n onRemovePreferredStore: props.handlers.onRemovePreferredStore,\n closeStoreDetailsModal: props.handlers.closeStoreDetailsModal\n }\n };\n\n return viewProps;\n};\n\n/**\n * Store location line item component.\n */\nexport const SelectedStoreComponent = selectedStoreDetails as (props: ISelectedStoreProps) => ISelectedStoreViewProps;\n","/**\r\n * Copyright (c) Microsoft Corporation\r\n * All rights reserved. See License.txt in the project root for license information.\r\n * IStoreSelector containerModule Interface Properties\r\n * THIS FILE IS AUTO-GENERATED - MANUAL MODIFICATIONS WILL BE LOST\r\n */\r\n\r\nimport * as Msdyn365 from '@msdyn365-commerce/core';\r\nimport * as React from 'react';\r\n\r\nexport const enum mode {\r\n findStores = 'findStores',\r\n pickupInStore = 'pickupInStore'\r\n}\r\n\r\nexport const enum searchRadiusUnit {\r\n miles = 'miles',\r\n kilometers = 'kilometers'\r\n}\r\n\r\nexport const enum style {\r\n inline = 'inline',\r\n dialog = 'dialog'\r\n}\r\n\r\nexport interface IStoreSelectorConfig extends Msdyn365.IModuleConfig {\r\n heading?: string;\r\n termsOfServiceLink?: ITermsOfServiceLinkData;\r\n mode?: mode;\r\n searchRadiusUnit?: searchRadiusUnit;\r\n lookupRadius: number;\r\n style?: style;\r\n setAsPreferredStore?: boolean;\r\n enablePickupFilterToShowStore?: boolean;\r\n showAllStores?: boolean;\r\n autoSuggestionEnabled?: boolean;\r\n autoSuggestOptions?: IAutoSuggestOptionsData;\r\n className?: string;\r\n clientRender?: boolean;\r\n}\r\n\r\nexport interface IStoreSelectorResources {\r\n searchPlaceholderText: string;\r\n searchButtonAriaLabel: string;\r\n searchInputAriaLabel: string;\r\n outOfStockText: string;\r\n inStockText: string;\r\n selectedStoreLocationText: string;\r\n emptyLocationsText: string;\r\n selectStoreText: string;\r\n selectStoreAriaFormatText: string;\r\n setAsPreferredStoreText: string;\r\n setAsPreferredStoreTextAriaLabel: string;\r\n preferredStoreText: string;\r\n preferredStoreAriaLabel: string;\r\n timeText: string;\r\n captionText: string;\r\n milesShortText: string;\r\n kilometersShortText: string;\r\n contactText: string;\r\n availabilityText: string;\r\n productDimensionTypeColor: string;\r\n productDimensionTypeConfiguration: string;\r\n productDimensionTypeSize: string;\r\n productDimensionTypeStyle: string;\r\n storeHoursClosedText: string;\r\n storeHoursMondayText: string;\r\n storeHoursTuesdayText: string;\r\n storeHoursWednesdayText: string;\r\n storeHoursThursdayText: string;\r\n storeHoursFridayText: string;\r\n storeHoursSaturdayText: string;\r\n storeHoursSundayText: string;\r\n storeHoursMondayFullText: string;\r\n storeHoursTuesdayFullText: string;\r\n storeHoursWednesdayFullText: string;\r\n storeHoursThursdayFullText: string;\r\n storeHoursFridayFullText: string;\r\n storeHoursSaturdayFullText: string;\r\n storeHoursSundayFullText: string;\r\n storePhoneAriaLabel: string;\r\n storeAddressAriaLabel: string;\r\n storeCountMessage: string;\r\n storeAllCountMessage: string;\r\n storeCountMessageInKm: string;\r\n storeSelectorHeaderText: string;\r\n storeLocatorHeaderText: string;\r\n seeAllStoresText: string;\r\n viewMapText: string;\r\n viewListText: string;\r\n pickupFilterByHeading: string;\r\n pickupFilterMenuHeading: string;\r\n pickupDeliveryOptionErrorMessage: string;\r\n}\r\n\r\nexport interface ITermsOfServiceLinkData {\r\n linkText?: string;\r\n linkUrl: Msdyn365.ILinkData;\r\n ariaLabel?: string;\r\n openInNewTab?: boolean;\r\n}\r\n\r\nexport interface IAutoSuggestOptionsData {\r\n maxResults?: number;\r\n}\r\n\r\nexport interface IStoreSelectorProps extends Msdyn365.IModule {\r\n resources: IStoreSelectorResources;\r\n config: IStoreSelectorConfig;\r\n slots: {\r\n maps: React.ReactNode[];\r\n };\r\n}\r\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\n/// \n\n/* eslint-disable no-duplicate-imports */\nimport * as Msdyn365 from '@msdyn365-commerce/core';\nimport { DeliveryOption, ItemAvailability, OrgUnitLocation, StoreHours } from '@msdyn365-commerce/retail-proxy';\nimport { IStoreInfo, IStoreSelectionStateContext } from '@msdyn365-commerce-modules/bopis-utilities';\nimport {\n ArrayExtensions,\n getFullAvailableInventoryNearby,\n GetFullAvailableInventoryNearbyInput,\n getOrgUnitLocationsByArea,\n GetOrgUnitLocationsByAreaInput,\n IFullOrgUnitAvailability\n} from '@msdyn365-commerce-modules/retail-actions';\nimport {\n getTelemetryObject,\n IModuleProps,\n INodeProps,\n isMobile,\n ITelemetryContent,\n Modal,\n ModalBody,\n ModalFooter,\n ModalHeader,\n NodeTag,\n VariantType\n} from '@msdyn365-commerce-modules/utilities';\nimport classname from 'classnames';\nimport { reaction, when } from 'mobx';\nimport { observer } from 'mobx-react';\nimport * as React from 'react';\n\nimport {\n StoreSelectorEmptyMessage,\n StoreSelectorFoundLocationsMessage,\n StoreSelectorLocationLines,\n StoreSelectorSearchForm,\n StoreSelectorTermsOfService,\n StoreSelectorWaiting\n} from './components';\nimport { ISelectedStoreProps, ISelectedStoreViewProps, SelectedStoreComponent } from './components/selected-store/selected-store';\nimport { buildStoreHours, IHoursDisplayInfo, secondsToTime } from './components/store-selectorcls-location-line-item/date-time-helpers';\nimport { IStoreSelectorData } from './store-selector.data';\nimport {\n IStoreSelectorProps,\n IStoreSelectorResources,\n mode as modeEnum,\n searchRadiusUnit as SearchRadiusUnit,\n style as styleEnum\n} from './store-selector.props.autogenerated';\n\n/**\n * StoreSelector State Interface.\n */\nexport interface IStoreSelectorState {\n isSearchInProgress: boolean;\n searchTerm?: string;\n isSeeAllStoreValue: boolean;\n isLocationDisabled?: boolean;\n filteredPickupMode?: string;\n}\n\n/**\n * StoreSelector View Props Interface.\n */\nexport interface IStoreSelectorViewProps extends IStoreSelectorProps {\n state: IStoreSelectorState;\n\n // Containers:\n ModuleProps: IModuleProps;\n BodyContainerProps: INodeProps;\n FooterContainerProps: INodeProps;\n HeaderContainerProps: INodeProps;\n HeaderProps?: React.ReactNode;\n\n // Components\n locationsMessage?: React.ReactNode;\n search?: React.ReactNode;\n spinner?: React.ReactNode;\n locationsList?: React.ReactNode;\n selectedLocation?: ISelectedStoreViewProps;\n noLocationsMessage?: React.ReactNode;\n terms?: React.ReactNode;\n headerText?: React.ReactNode;\n sortLocations?: IFullOrgUnitAvailability[];\n locationListProps?: IStoreSelectorLocationLineItemProps[];\n bodyWrapperProps?: INodeProps;\n storeResultContainerProps?: INodeProps;\n mapContainerProps?: INodeProps;\n maps?: React.ReactNode;\n isMobileView?: boolean;\n storeDetailsModal?: INodeProps;\n\n callbacks: {\n closeDialog(): Promise;\n searchTermChanged(searchTerm: string): Promise;\n performSearch(searchTerm: string): Promise;\n selectedLocation(location: OrgUnitLocation | undefined): Promise;\n getAndUpdateUserLocation(): Promise;\n attachMapAutoSuggest(): Promise;\n onSuggestionSelected(result: Microsoft.Maps.ISuggestionResult): Promise;\n setPreferredStore(storeId: string | undefined): Promise;\n removePreferredStore(): Promise;\n setSelectedStore(storeId: string | undefined): Promise;\n setOrgUnitStoreInformation(location: OrgUnitLocation | undefined): Promise;\n };\n}\n\n/**\n * StoreSelectorLocation Line Resources Interface.\n */\nexport interface IStoreSelectorLocationLineItemResources {\n contactInfoHeader: string;\n storeHoursHeader: string;\n availabilityInfoHeader: string;\n closedText: string;\n outOfStock: string;\n inStock: string;\n currentLocation: string;\n selectLocation: string;\n selectLocationAriaLabelFormat: string;\n setAsPreferredStoreText: string;\n setAsPreferredStoreTextAriaLabel: string;\n preferredStoreText: string;\n preferredStoreAriaLabel: string;\n\n days: {\n monday: string;\n tuesday: string;\n wednesday: string;\n thursday: string;\n friday: string;\n saturday: string;\n sunday: string;\n mondayFull: string;\n tuesdayFull: string;\n wednesdayFull: string;\n thursdayFull: string;\n fridayFull: string;\n saturdayFull: string;\n sundayFull: string;\n };\n}\n\n/**\n * ILocationHours Interface.\n */\nexport interface ILocationHours {\n openFrom?: string;\n openTo?: string;\n}\n\n/**\n * StoreSelectorLocation Line Item Props Interface.\n */\nexport interface IStoreSelectorLocationLineItemProps {\n location: OrgUnitLocation;\n storeHours?: StoreHours;\n storeHoursList?: IHoursDisplayInfo[];\n\n hideStockStatus?: boolean;\n isInStock?: boolean;\n isCurrentLocation?: boolean;\n\n resources: IStoreSelectorLocationLineItemResources;\n stockStatusLabel?: string;\n storeLocatorView?: boolean;\n isPreferredStoreEnabled?: boolean;\n index: string;\n preferredStoreLocationId: string | null;\n storePickUpOptionList?: DeliveryOption[];\n productPickUpOptionList?: DeliveryOption[];\n selectedStoreLocationId?: string;\n locationOpen?: ILocationHours;\n\n /**\n * The telemetry content.\n */\n telemetryContent?: ITelemetryContent;\n preferredDistanceUnit: string;\n isLocationDisabled?: boolean;\n handlers: {\n onSelected(location: OrgUnitLocation, deliveryMode?: string): void;\n onSetAsPreferredStore(locationId: string | undefined): void;\n onRemovePreferredStore(): void;\n closeStoreDetailsModal(): Promise;\n };\n onClick: (locationId: string | undefined) => void;\n}\n\n/**\n *\n * Pick Up In Store module.\n * @extends React.Component>}\n */\n@observer\nclass StoreSelector extends React.Component, IStoreSelectorState> {\n private autoSuggestManager: Microsoft.Maps.AutosuggestManager | undefined;\n\n private readonly telemetryContent: ITelemetryContent;\n\n private storeCounter: number;\n\n private isPreferredStoreEnabled?: boolean;\n\n public constructor(props: IStoreSelectorProps) {\n super(props);\n // eslint-disable-next-line react/no-unused-state -- State is used in the view.\n this.state = { isSearchInProgress: true, searchTerm: '', isSeeAllStoreValue: true, filteredPickupMode: undefined };\n this.telemetryContent = getTelemetryObject(\n this.props.context.request.telemetryPageName!,\n this.props.friendlyName,\n this.props.telemetry\n );\n this.storeCounter = 0;\n }\n\n public async componentDidMount(): Promise {\n const {\n context: {\n actionContext: {\n requestContext: { channel }\n }\n },\n config: { autoSuggestionEnabled: isAutoSuggestionEnabled }\n } = this.props;\n sessionStorage.setItem(\"StoreSelectorId\",this.props.id);\n // Adding Timeout to make sure it loads the data based upon the preferred store.\n setTimeout(() => {\n this._getAndUpdateStoreLocation(true);\n }, 0);\n\n reaction(\n () => this.props.data.storeSelectorStateManager.result?.isDialogOpen,\n async () => {\n const context = this.props.data.storeSelectorStateManager.result?.context;\n if (context?.id === this.props.id) {\n this._getAndUpdateStoreLocation(true);\n }\n }\n );\n\n reaction(\n () => this.props.data.storeSelectorStateManager.result?.context?.id,\n async () => {\n const context = this.props.data.storeSelectorStateManager.result?.context;\n if (!context || context.id === this.props.id) {\n await this._searchTermChanged('');\n this._getAndUpdateStoreLocation(true);\n }\n }\n );\n\n if (this.props.data.storeSelectorStateManager.result?.loadMapApi) {\n await this.props.data.storeSelectorStateManager.result.loadMapApi({\n key: channel?.BingMapsEnabled ? channel.BingMapsApiKey : '',\n lang: this.props.context.actionContext.requestContext.locale,\n market: this.props.context?.actionContext?.requestContext?.channel?.ChannelCountryRegionISOCode\n });\n }\n\n reaction(\n () => this.props.data.storeSelectorStateManager.result?.loadMapApi,\n () => {\n this.props.data.storeSelectorStateManager.result?.loadMapApi({\n key: channel?.BingMapsEnabled ? channel.BingMapsApiKey : '',\n lang: this.props.context.actionContext.requestContext.locale,\n market: this.props.context.actionContext.requestContext.channel?.ChannelCountryRegionISOCode\n });\n }\n );\n\n reaction(\n () => this.props.data.availabilitiesWithHours.result,\n async () => {\n if (this.props.data.storeSelectorStateManager.result?.isDialogOpen) {\n const storeLocationList = this.props.data.availabilitiesWithHours.result;\n if (storeLocationList) {\n await this._setOrgUnitStoreInformation(storeLocationList);\n }\n }\n }\n );\n\n if (isAutoSuggestionEnabled) {\n when(\n () => {\n const isMapApiLoaded = !!this.props.data.storeSelectorStateManager.result?.isMapApiLoaded;\n const isDialogOpen = !!this.props.data.storeSelectorStateManager.result?.isDialogOpen;\n const isSameContext = this.props.data.storeSelectorStateManager.result?.context?.id === this.props.id;\n return isMapApiLoaded && isDialogOpen && isSameContext;\n },\n () => {\n setTimeout(async () => {\n await this._attachMapAutoSuggest();\n }, 0);\n }\n );\n }\n }\n\n public shouldComponentUpdate(): boolean {\n const {\n data: {\n storeSelectorStateManager: { result: storeSelectorStateManager }\n }\n } = this.props;\n const context = storeSelectorStateManager ? storeSelectorStateManager.context : undefined;\n if (context && context.id === this.props.id) {\n return true;\n }\n return false;\n }\n\n // eslint-disable-next-line complexity -- disabling the complexity for this method for now as its causing lot of other warnings\n public render(): JSX.Element {\n const {\n config: {\n termsOfServiceLink,\n className,\n heading,\n mode,\n style,\n setAsPreferredStore: shouldSetAsPreferredStore,\n showAllStores: shouldShowAllStores,\n lookupRadius,\n enablePickupFilterToShowStore: hasEnablePickupFilterToShowStore,\n searchRadiusUnit\n },\n context: {\n telemetry,\n app: { config: appConfig },\n actionContext: {\n requestContext: { channel, cookies }\n }\n },\n slots: { maps: mapSlot },\n resources,\n data: {\n availabilitiesWithHours: { result: availabilitiesWithHours },\n storeSelectorStateManager: { result: storeSelectorStateManager },\n storeLocations: { result: storeLocations }\n }\n } = this.props;\n\n this.storeCounter = 0;\n const isMobileDevice = isMobile({ variant: VariantType.Viewport, context: this.props.context.request }) === 'xs';\n const isMapDisabled = !(channel?.BingMapsApiKey && channel.BingMapsEnabled);\n const context = storeSelectorStateManager ? storeSelectorStateManager.context : undefined;\n const isDialogOpen: boolean = storeSelectorStateManager\n ? storeSelectorStateManager.isDialogOpen && context?.id === this.props.id\n : false;\n const styleDefault = style !== undefined ? style : styleEnum.dialog;\n const modeDefault = mode !== undefined ? mode : modeEnum.pickupInStore;\n const isInlineView = styleDefault === styleEnum.inline;\n const isLocatorView = modeDefault === modeEnum.findStores;\n const shouldHideInventory = isLocatorView;\n const selectedStoreLocationId = storeSelectorStateManager?.selectedStoreLocationId;\n const preferredStore: IStoreInfo | undefined = storeSelectorStateManager?.preferredStore;\n const shouldDisplayList = storeSelectorStateManager?.listMapViewState?.displayList;\n this.isPreferredStoreEnabled = shouldSetAsPreferredStore && cookies?.isConsentGiven();\n const canShowLocationView =\n context && (context.showMapViewLink === undefined || context.showMapViewLink) && storeSelectorStateManager?.isMapModuleLoaded;\n\n const storeSelectorActions = {\n async toggleListMapViewState(): Promise {\n await storeSelectorStateManager?.toggleListMapViewState();\n }\n };\n\n if (!channel?.BingMapsApiKey) {\n telemetry.error('BingMapsApiKey is missing.');\n }\n\n const configHeading = heading ? heading : isLocatorView ? resources.storeLocatorHeaderText : resources.storeSelectorHeaderText;\n const preferredDistanceUnit =\n searchRadiusUnit === SearchRadiusUnit.kilometers ? resources.kilometersShortText : resources.milesShortText;\n const preferredLocationId = preferredStore?.StoreId ? preferredStore.StoreId : '';\n let storeLocationList: IFullOrgUnitAvailability[] | undefined = shouldHideInventory ? storeLocations : availabilitiesWithHours;\n let sortLocation = null;\n if (storeLocationList) {\n sortLocation = this._sortStores(storeLocationList, this.isPreferredStoreEnabled, preferredLocationId);\n }\n\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unsafe-assignment -- Reading value from app config.\n const isEnableOutofStock: boolean = appConfig?.enableStockCheck || false;\n const alreadySelectedLocation = context ? context.alreadySelectedLocation : undefined;\n const productPickUpOptionList = storeSelectorStateManager?.context?.deliveryOptions?.DeliveryOptions;\n if (this.state.filteredPickupMode && storeLocationList) {\n storeLocationList = this.onFilterLocations(storeLocationList, this.state.filteredPickupMode);\n }\n const locationListProps = this._getStoreLocationListProps(\n isEnableOutofStock,\n isLocatorView,\n preferredLocationId,\n this.isPreferredStoreEnabled,\n selectedStoreLocationId,\n sortLocation ?? null,\n preferredDistanceUnit,\n alreadySelectedLocation,\n productPickUpOptionList\n );\n\n const hasMapSlot = ArrayExtensions.hasElements(mapSlot);\n const dialogClassName = hasMapSlot ? 'ms-store-select__map' : '';\n const viewProps: IStoreSelectorViewProps = {\n ...(this.props as IStoreSelectorProps),\n state: this.state,\n maps: hasMapSlot ? mapSlot[0] : undefined,\n\n ModuleProps: {\n tag: isInlineView ? ('div' as NodeTag) : Modal,\n moduleProps: this.props,\n className: classname(\n `ms-store-${isInlineView ? 'locate' : 'select'}`,\n className,\n dialogClassName,\n isInlineView ? '' : 'msc-modal-input-required'\n ),\n autoFocus: true,\n fade: true,\n isOpen: isDialogOpen,\n 'aria-label': configHeading,\n onClosed: this._closeDialog,\n horizontalPosition: 'center',\n verticalPosition: 'center',\n toggle: this._closeDialog\n },\n isMobileView: isMobileDevice,\n HeaderContainerProps: {\n tag: isInlineView ? ('div' as NodeTag) : ModalHeader,\n className: `ms-store-select__${isInlineView ? 'header' : 'modal-header'}`,\n toggle: this._closeDialog\n },\n HeaderProps: configHeading && (\n \n ),\n FooterContainerProps: {\n tag: isInlineView ? ('div' as NodeTag) : ModalFooter,\n className: `ms-store-select__${isInlineView ? 'footer' : 'modal-footer'} ${!shouldDisplayList ? 'map-only-view' : ''}`\n },\n BodyContainerProps: {\n tag: isInlineView ? ('div' as NodeTag) : ModalBody,\n className: `ms-store-select__${isInlineView ? 'body' : 'modal-body'}`\n },\n bodyWrapperProps: {\n tag: 'div' as NodeTag,\n className: 'ms-store-select__body_wrapper'\n },\n storeResultContainerProps: {\n tag: 'div' as NodeTag,\n className: 'ms-store-select__store_container'\n },\n mapContainerProps: {\n tag: 'div' as NodeTag,\n className: 'ms-store-select__map_container'\n },\n storeDetailsModal: {\n tag: 'div' as NodeTag,\n className: `ms-store-select__map__selected_store__modal ${\n selectedStoreLocationId && isDialogOpen && !shouldDisplayList ? 'show' : 'hide'\n }`\n },\n locationsMessage: !this.state.isLocationDisabled && (\n \n ),\n selectedLocation: this.renderSelectedStore(\n shouldHideInventory,\n preferredDistanceUnit,\n preferredStore,\n this.isPreferredStoreEnabled,\n isEnableOutofStock,\n productPickUpOptionList,\n shouldDisplayList\n ),\n search: (\n \n ),\n spinner: ,\n locationsList: ArrayExtensions.hasElements(storeLocationList) ? (\n \n ) : (\n undefined\n ),\n noLocationsMessage: ,\n terms: (\n \n ),\n\n // Not being used in current context, we can use it here to pass more props.\n headerText: (\n {heading ? heading : isLocatorView ? resources.storeLocatorHeaderText : resources.storeSelectorHeaderText}\n ),\n sortLocations: sortLocation,\n locationListProps,\n callbacks: {\n searchTermChanged: this._searchTermChanged,\n performSearch: this._performSearch,\n closeDialog: this._closeDialog,\n selectedLocation: this._onOrgUnitLocationSelected,\n getAndUpdateUserLocation: async () => {\n this._getAndUpdateStoreLocation(true);\n return Promise.resolve();\n },\n attachMapAutoSuggest: this._attachMapAutoSuggest,\n onSuggestionSelected: this._onOrgUnitLocationSelected,\n setPreferredStore: this._setPreferredStore,\n removePreferredStore: this._removePreferredStore,\n setSelectedStore: this._setSelectedStore,\n setOrgUnitStoreInformation: this._setOrgUnitStoreInformation\n }\n } as IStoreSelectorViewProps;\n\n return this.props.renderView(viewProps) as React.ReactElement;\n }\n\n /**\n * Render the selected store for the mobile devices.\n * @param shouldHideInventory -- Hide Inventory.\n * @param preferredDistanceUnit -- Preferred Distance Unit.\n * @param preferredStore -- Preferred Store.\n * @param isPreferredStoreEnabled -- Is Preferred Store Enabled.\n * @param hasEnabledOutOfStockCheck -- Stock check is enabled or not.\n * @param productPickUpOptionList -- Product pickup option list.\n * @param shouldDisplayList - Should Display list.\n * @returns -- Returns the view props.\n */\n public renderSelectedStore = (\n shouldHideInventory: boolean,\n preferredDistanceUnit: string,\n preferredStore: IStoreInfo | undefined,\n isPreferredStoreEnabled: boolean | undefined,\n hasEnabledOutOfStockCheck: boolean,\n productPickUpOptionList?: DeliveryOption[],\n shouldDisplayList?: boolean\n ): ISelectedStoreViewProps | undefined => {\n const {\n resources,\n data: {\n availabilitiesWithHours: { result: availabilitiesWithHours },\n storeSelectorStateManager: { result: storeSelectorStateManager },\n storeLocations: { result: storeLocations }\n }\n } = this.props;\n\n const context = storeSelectorStateManager ? storeSelectorStateManager.context : undefined;\n const selectedStoreLocationId = storeSelectorStateManager?.selectedStoreLocationId;\n const selectedStore = (shouldHideInventory ? storeLocations : availabilitiesWithHours)?.find(\n store => store.OrgUnitAvailability?.OrgUnitLocation?.OrgUnitNumber === selectedStoreLocationId\n );\n const orgUnitLocation = selectedStore?.OrgUnitAvailability?.OrgUnitLocation;\n const selectedStoreResources = this._mapResources(resources);\n\n if (!shouldDisplayList && selectedStore) {\n const selectedProps: ISelectedStoreProps = {\n shouldHideStockStatus: shouldHideInventory,\n isCurrentLocation: this._isCurrentLocation(orgUnitLocation, context?.alreadySelectedLocation),\n isInStock: this._isProductInStock(hasEnabledOutOfStockCheck, selectedStore.OrgUnitAvailability?.ItemAvailabilities),\n selectedStore,\n resources: selectedStoreResources,\n stockStatusLabel: this._stockInventoryLabel(selectedStore),\n preferredStoreLocationId: preferredStore?.StoreId ? preferredStore.StoreId : '',\n isPreferredStoreEnabled,\n isLocationDisabled: this.state.isLocationDisabled,\n telemetryContent: this.telemetryContent,\n storePickUpOptionList: selectedStore.OrgUnitPickUpDeliveryModes?.DeliveryOptions,\n productPickUpOptionList,\n preferredDistanceUnit,\n handlers: {\n onSelected: this._onOrgUnitLocationSelected,\n onSetAsPreferredStore: this._setPreferredStore,\n onRemovePreferredStore: this._removePreferredStore,\n closeStoreDetailsModal: this._closeStoreDetailModal\n }\n };\n\n return SelectedStoreComponent(selectedProps);\n }\n\n return undefined;\n };\n\n /**\n * Method to be called on link text change.\n * @param event -Content Edit Event.\n */\n public handleLinkTextChange = (event: Msdyn365.ContentEditableEvent): void => {\n if (this.props.config.termsOfServiceLink) {\n this.props.config.termsOfServiceLink.linkText = event.target.value;\n }\n };\n\n /**\n * Method to be called on heading change.\n * @param event -Content Edit Event.\n */\n public handleHeadingChange = (event: Msdyn365.ContentEditableEvent): void => {\n this.props.config.heading = event.target.value;\n };\n\n /**\n * Show all stores handler function.\n */\n private readonly onShowAllStoresHandler = () => {\n this._getAndUpdateStoreLocation(true);\n this.setState({ filteredPickupMode: undefined });\n };\n\n /**\n * Method to be called for filtered the store location based on the filter selected by the user.\n * @param stores -All the stores from the API.\n * @param filteredPickupMode -Filter selected by the user.\n * @returns -Filtered stores.\n */\n private readonly onFilterLocations = (stores: IFullOrgUnitAvailability[], filteredPickupMode: string) => {\n return stores.filter(location => {\n return location.OrgUnitPickUpDeliveryModes?.DeliveryOptions?.some(deliveryOption => {\n return deliveryOption.Code === filteredPickupMode;\n });\n });\n };\n\n /**\n * Filter Store by pickup mode.\n * @param deliveryCode -Delivery Code.\n */\n private readonly onFilteredPickupMode = (deliveryCode: string) => {\n this.setState({ filteredPickupMode: deliveryCode });\n };\n\n /**\n * Method will sort all stores.\n * @param stores -Stores List.\n * @param isPreferredStoreEnabled -Module config value.\n * @param preferredStoreLocationId -Store Id.\n * @returns List of Stores.\n */\n // eslint-disable-next-line class-methods-use-this -- No need of introducing new variable.\n private _sortStores(\n stores: IFullOrgUnitAvailability[],\n isPreferredStoreEnabled: boolean | undefined,\n preferredStoreLocationId: string\n ): IFullOrgUnitAvailability[] {\n const isPreferredStore = (value: IFullOrgUnitAvailability) =>\n isPreferredStoreEnabled &&\n preferredStoreLocationId &&\n value.OrgUnitAvailability?.OrgUnitLocation?.OrgUnitNumber === preferredStoreLocationId;\n\n return [...stores.filter(isPreferredStore), ...stores.filter(store => !isPreferredStore(store))];\n }\n\n /**\n * Method will list of store selector location line.\n * @param hasEnabledOutOfStockCheck -Stores List.\n * @param isStoreLocatorView -Module config value.\n * @param preferredStoreLocationId -Store Id.\n * @param isPreferredStoreEnabled -Stores List.\n * @param selectedStoreLocationId -Module config value.\n * @param stores -Store Id.\n * @param preferredDistanceUnit -Module config value.\n * @param alreadySelectedLocation -Already Selected Location.\n * @param productPickUpOptionList -Product supported Pickup Modes List.\n * @returns List of StoreSelectorLocation Line.\n */\n private _getStoreLocationListProps(\n hasEnabledOutOfStockCheck: boolean,\n isStoreLocatorView: boolean,\n preferredStoreLocationId: string,\n isPreferredStoreEnabled: boolean | undefined,\n selectedStoreLocationId: string | undefined,\n stores: IFullOrgUnitAvailability[] | null,\n preferredDistanceUnit?: string | undefined,\n alreadySelectedLocation?: OrgUnitLocation,\n productPickUpOptionList?: DeliveryOption[]\n ): IStoreSelectorLocationLineItemProps[] {\n const storeList: IStoreSelectorLocationLineItemProps[] = [];\n if (ArrayExtensions.hasElements(stores)) {\n stores.map((store, index: number) => {\n const storeLineProps = this._createStoreLocationList(\n store,\n index,\n hasEnabledOutOfStockCheck,\n isStoreLocatorView,\n preferredStoreLocationId,\n isPreferredStoreEnabled,\n selectedStoreLocationId,\n preferredDistanceUnit,\n alreadySelectedLocation,\n productPickUpOptionList\n );\n if (storeLineProps) {\n storeList.push(storeLineProps);\n }\n });\n }\n return storeList;\n }\n\n /**\n * Initialize Map AutoSuggest.\n */\n private readonly _attachMapAutoSuggest = async (): Promise => {\n const {\n config: { autoSuggestOptions },\n context: {\n telemetry,\n actionContext: {\n requestContext: { channel }\n }\n },\n data: {\n storeSelectorStateManager: { result: storeSelectorStateManager }\n }\n } = this.props;\n\n if (storeSelectorStateManager?.isMapApiLoaded && !this.autoSuggestManager) {\n Microsoft.Maps.loadModule('Microsoft.Maps.AutoSuggest', {\n /**\n * Callback for the autosuggest API.\n */\n callback: () => {\n const options = { ...autoSuggestOptions, countryCode: channel?.ChannelCountryRegionISOCode };\n this.autoSuggestManager = new Microsoft.Maps.AutosuggestManager(options);\n this.autoSuggestManager.attachAutosuggest(\n `#ms-store-select__search-box_${this.props.id}`,\n `#ms-store-select__search-box-container_${this.props.id}`,\n this._onSuggestionSelected\n );\n },\n\n /**\n * Error call back for autosuggest API.\n */\n errorCallback: () => {\n if (telemetry) {\n telemetry.debug('Unable to attach map auto suggest.');\n }\n },\n credentials: channel?.BingMapsApiKey\n });\n }\n };\n\n /**\n * On Selecting Location Suggestion.\n * @param result - Map Suggestions List.\n */\n private readonly _onSuggestionSelected = async (result: Microsoft.Maps.ISuggestionResult): Promise => {\n const context = this.props.data.storeSelectorStateManager.result?.context;\n if (context && context.id === this.props.id) {\n await this._searchTermChanged(result.formattedSuggestion);\n await this._performSearch(result.formattedSuggestion);\n }\n };\n\n /**\n * On Selecting Preferred Store.\n * @param storeId - Store Id.\n */\n private readonly _setPreferredStore = async (storeId: string | undefined): Promise => {\n if (!storeId) {\n return;\n }\n\n const {\n context: {\n actionContext: {\n requestContext: { cookies }\n }\n },\n config: { mode },\n data: {\n storeSelectorStateManager: { result: storeSelectorStateManager },\n storeLocations: { result: storeLocations },\n availabilitiesWithHours: { result: availabilitiesWithHours }\n }\n } = this.props;\n\n if (!storeSelectorStateManager) {\n return;\n }\n const modeDefault = mode !== undefined ? mode : modeEnum.pickupInStore;\n\n let stores: IFullOrgUnitAvailability[];\n if (modeDefault === modeEnum.findStores && storeLocations) {\n stores = storeLocations;\n } else {\n stores = availabilitiesWithHours!;\n }\n\n const preferredStore = stores.find(store => store.OrgUnitAvailability?.OrgUnitLocation?.OrgUnitNumber === storeId);\n\n await storeSelectorStateManager.setPreferredStoreLocation(\n storeId,\n preferredStore?.OrgUnitAvailability?.OrgUnitLocation?.OrgUnitName,\n cookies.isConsentGiven(),\n preferredStore?.OrgUnitAvailability?.OrgUnitLocation?.Latitude,\n preferredStore?.OrgUnitAvailability?.OrgUnitLocation?.Longitude\n );\n };\n\n /**\n * On Removing Preferred Store.\n */\n private readonly _removePreferredStore = async (): Promise => {\n const {\n context: {\n actionContext: {\n requestContext: { cookies }\n }\n },\n data: {\n storeSelectorStateManager: { result: storeSelectorStateManager }\n }\n } = this.props;\n\n if (!storeSelectorStateManager) {\n return;\n }\n\n await storeSelectorStateManager.clearPreferredStore(cookies.isConsentGiven());\n };\n\n /**\n * Method called to close the store details modal that comes up on clicking the pushpin.\n * @returns Void promise.\n */\n private readonly _closeStoreDetailModal = async (): Promise => {\n const storeSelectorStateManager = this.props.data.storeSelectorStateManager.result;\n await storeSelectorStateManager?.setSelectedStoreLocationId(undefined);\n };\n\n /**\n * On Selecting Store for pickup.\n * @param storeId - Store Id.\n */\n private readonly _setSelectedStore = async (storeId: string | undefined): Promise => {\n const {\n data: {\n storeSelectorStateManager: { result: storeSelectorStateManager }\n }\n } = this.props;\n\n if (!storeSelectorStateManager) {\n return;\n }\n\n await storeSelectorStateManager.setSelectedStoreLocationId(storeId);\n };\n\n /**\n * Method to be called on search.\n * @param searchTerm - Search string.\n */\n private readonly _performSearch = async (searchTerm: string): Promise => {\n const {\n context: { actionContext },\n data: {\n storeSelectorStateManager: { result: storeSelectorStateManager }\n }\n } = this.props;\n\n if (!searchTerm || !storeSelectorStateManager) {\n this.setState({isSeeAllStoreValue: true, isLocationDisabled: false});\n return;\n }\n\n // eslint-disable-next-line react/no-unused-state -- State is used in the view.\n // this.setState({ isSearchInProgress: true, isSeeAllStoreValue: false });\n this.setState({ isSearchInProgress: true});\n const location = await storeSelectorStateManager.geoLocate(searchTerm.trim() !== '' ? searchTerm : '0', actionContext);\n\n if (location) {\n await this._updateLocations(location.latitude, location.longitude);\n } else {\n await this._updateLocations();\n }\n\n // eslint-disable-next-line react/no-unused-state -- State is used in the view.\n this.setState({ isSearchInProgress: false });\n };\n\n /**\n * Method to be called on search term changed.\n * @param searchTerm - Search string.\n */\n private readonly _searchTermChanged = async (searchTerm: string): Promise => {\n this.setState({ searchTerm });\n };\n\n /**\n * Method to be called updating the store location.\n * @param shouldShowAllStores - Flag to show all stores.\n */\n private readonly _getAndUpdateStoreLocation = (shouldShowAllStores?: boolean): void => {\n const {\n config: { style },\n data: {\n storeSelectorStateManager: { result: storeSelectorStateManager }\n }\n } = this.props;\n\n const styleDefault = style !== undefined ? style : styleEnum.dialog;\n\n if (styleDefault !== styleEnum.inline && (!storeSelectorStateManager || !storeSelectorStateManager.isDialogOpen)) {\n // Store selector dialog isn't open yet, so don't try and update anything\n return;\n }\n\n // eslint-disable-next-line react/no-unused-state -- State is used in the view.\n // this.setState({ isSearchInProgress: true, isSeeAllStoreValue: false });\n this.setState({ isSearchInProgress: true });\n\n if (navigator?.geolocation) {\n navigator.geolocation.getCurrentPosition(\n async position => {\n // eslint-disable-next-line react/no-unused-state -- This state is used in the views.\n this.setState({ isLocationDisabled: false, isSearchInProgress: true });\n if (shouldShowAllStores) {\n this.setState({ isSeeAllStoreValue: true });\n await this._searchTermChanged('');\n await this._updateLocations(position.coords.latitude, position.coords.longitude, 0);\n } else {\n await this._updateLocations(position.coords.latitude, position.coords.longitude);\n }\n\n // eslint-disable-next-line react/no-unused-state -- State is used in the view.\n this.setState({ isSearchInProgress: false });\n },\n async error => {\n // If the location setting is turned off\n if (error.PERMISSION_DENIED) {\n this.setState({ isLocationDisabled: true, isSeeAllStoreValue: true });\n await this._searchTermChanged('');\n await this._updateLocations(0, 0, 0);\n }\n\n // eslint-disable-next-line react/no-unused-state -- State is used in the view.\n this.setState({ isSearchInProgress: false });\n },\n { timeout: 5000 }\n );\n } else {\n // eslint-disable-next-line react/no-unused-state -- State is used in the view.\n this.setState({ isSearchInProgress: false });\n }\n };\n\n /**\n * Method to be called closing the store selector dialog.\n * @returns Void promise.\n */\n private readonly _closeDialog = async (): Promise => {\n const {\n data: {\n storeSelectorStateManager: { result: storeSelectorStateManager }\n }\n } = this.props;\n\n this.setState({ searchTerm: '' });\n\n if (storeSelectorStateManager) {\n storeSelectorStateManager.context?.parentElementRef?.current?.focus();\n return storeSelectorStateManager.closeDialog();\n }\n };\n\n /**\n * Method to set store info.\n * @param orgUnitStoreInformation - Store Info Object.\n * @returns Void promise.\n */\n private readonly _setOrgUnitStoreInformation = async (orgUnitStoreInformation: IFullOrgUnitAvailability[]): Promise => {\n const {\n data: {\n storeSelectorStateManager: { result: storeSelectorStateManager }\n },\n config: { style },\n telemetry\n } = this.props;\n\n if (!storeSelectorStateManager) {\n return;\n }\n\n const context = storeSelectorStateManager.context;\n const moduleId: string = context?.id ? context.id : this.props.id;\n const styleDefault = style !== undefined ? style : styleEnum.dialog;\n let input: IStoreSelectionStateContext = {\n /**\n * On Location selected.\n * @returns - Returns promise.\n */\n onLocationSelected: async () => {\n // TO-DO handle event for when location in selected\n return Promise.resolve();\n }\n };\n\n if (storeSelectorStateManager.context) {\n input = storeSelectorStateManager.context;\n }\n\n const preferredStore: IStoreInfo | undefined = storeSelectorStateManager.preferredStore;\n const preferredLocationId = preferredStore?.StoreId ? preferredStore.StoreId : '';\n const storeLocationList = this._sortStores(orgUnitStoreInformation, this.isPreferredStoreEnabled, preferredLocationId);\n\n input = {\n ...input,\n id: moduleId,\n showMapViewLink: context?.showMapViewLink,\n parentElementRef: context?.parentElementRef,\n isDialog: styleDefault === styleEnum.dialog,\n orgUnitStoreInformation: storeLocationList,\n product: context?.product\n };\n\n await storeSelectorStateManager.setOrgUnitStoreInformation(input).catch((error: Error) => {\n if (telemetry) {\n telemetry.error(error.message);\n telemetry.debug('Unable to Update store location state');\n }\n });\n };\n\n /**\n * Method to update user location.\n * @param latitude - User location.\n * @param longitude - User location.\n * @param radius - Search Criteria Radius.\n * @returns Void promise.\n */\n private readonly _updateLocations = async (latitude?: number, longitude?: number, radius?: number): Promise => {\n const {\n config: { mode, lookupRadius, style, searchRadiusUnit },\n data: {\n storeSelectorStateManager: { result: storeSelectorStateManager }\n }\n } = this.props;\n\n const styleDefault = style !== undefined ? style : styleEnum.dialog;\n const calRadius = radius || radius === 0 ? radius : lookupRadius || 50;\n const distanceUnitValue = searchRadiusUnit === SearchRadiusUnit.kilometers ? 1 : 0;\n const modeDefault = mode !== undefined ? mode : modeEnum.pickupInStore;\n const preferredStore: IStoreInfo | undefined = storeSelectorStateManager?.preferredStore;\n let localLatitude = this.state.searchTerm || !preferredStore?.Latitude ? latitude : preferredStore.Latitude;\n let long = this.state.searchTerm || !preferredStore?.Longitude ? longitude : preferredStore.Longitude;\n if (styleDefault === styleEnum.inline) {\n const lastInlineStoreLocation = storeSelectorStateManager?.lastInlineShownStoreInfo;\n if (lastInlineStoreLocation && !this.state.searchTerm) {\n localLatitude = lastInlineStoreLocation.Latitude ? lastInlineStoreLocation.Latitude : localLatitude;\n long = lastInlineStoreLocation.Longitude ? lastInlineStoreLocation.Longitude : long;\n }\n await storeSelectorStateManager?.setLastInlineStoreInfo(localLatitude, long);\n }\n\n if (modeDefault === modeEnum.findStores) {\n await this.getOrgUnitLocationByArea(calRadius, distanceUnitValue, localLatitude, long);\n return;\n }\n\n await this.getFullAvailableInventoryNearby(calRadius, distanceUnitValue, localLatitude, long);\n };\n\n /**\n * Get org unit location by area.\n * @param calRadius - Radius.\n * @param distanceUnitValue - Distance unit value.\n * @param latitude - Latitude.\n * @param longitude - Longitude.\n * @returns - Returns a void promise.\n */\n private readonly getOrgUnitLocationByArea = async (\n calRadius: number,\n distanceUnitValue: number,\n latitude?: number,\n longitude?: number\n ): Promise => {\n const {\n context: { actionContext }\n } = this.props;\n const orgUnitLocationsInput = new GetOrgUnitLocationsByAreaInput(\n latitude,\n longitude,\n calRadius,\n distanceUnitValue,\n this.state.isLocationDisabled\n );\n\n const orgUnitLocations = await getOrgUnitLocationsByArea(orgUnitLocationsInput, actionContext);\n if (orgUnitLocations) {\n await this._setOrgUnitStoreInformation(orgUnitLocations);\n await this._setSelectedStore(undefined);\n }\n };\n\n /**\n * Get full available inventory nearby.\n * @param calRadius - Radius.\n * @param distanceUnitValue - Distance unit value.\n * @param latitude - Latitude.\n * @param longitude - Longitude.\n * @returns - Returns a void promise.\n */\n private readonly getFullAvailableInventoryNearby = async (\n calRadius: number,\n distanceUnitValue: number,\n latitude?: number,\n longitude?: number\n ): Promise => {\n const {\n telemetry,\n context: { actionContext },\n data: {\n storeSelectorStateManager: { result: storeSelectorStateManager }\n }\n } = this.props;\n\n if (!storeSelectorStateManager || !storeSelectorStateManager.context) {\n // Store selector dialog isn't open yet, so don't try and update anything\n return;\n }\n\n if (!storeSelectorStateManager.context.product) {\n // TODO: Use alternative search method here to not make inventory check\n return;\n }\n\n const input = new GetFullAvailableInventoryNearbyInput(\n storeSelectorStateManager.context.product.RecordId,\n latitude ?? 0,\n longitude ?? 0,\n calRadius,\n distanceUnitValue,\n this.state.isLocationDisabled\n );\n\n await getFullAvailableInventoryNearby(input, actionContext).catch(error => {\n telemetry.warning(error);\n telemetry.error(error.message);\n telemetry.debug('Unable to get full available inventory near by');\n });\n };\n\n /**\n * Method to called on store selected.\n * @param location - Store Info.\n * @param deliveryMode - Pickup mode.\n * @returns Void promise.\n */\n private readonly _onOrgUnitLocationSelected = async (location: OrgUnitLocation | undefined, deliveryMode?: string): Promise => {\n const {\n telemetry,\n data: {\n storeSelectorStateManager: { result: storeSelectorStateManager }\n }\n } = this.props;\n\n if (storeSelectorStateManager) {\n if (location && storeSelectorStateManager.context) {\n // Want to eat exceptions here so that the dialog still closes even if the onLocationSelected call goes wrong\n await storeSelectorStateManager.context.onLocationSelected(location, deliveryMode).catch(error => {\n telemetry.warning(error);\n telemetry.error(error.message);\n telemetry.debug('Unable to get on org unit location selected');\n });\n }\n\n await storeSelectorStateManager.closeDialog();\n }\n };\n\n /**\n * Method will list of store selector location line.\n * @param store -Store Info.\n * @param index - List index.\n * @param hasEnabledOutOfStockCheck -Stores List.\n * @param isStoreLocatorView -Module config value.\n * @param preferredStoreLocationId -Store Id.\n * @param isPreferredStoreEnabled -Stores List.\n * @param selectedStoreLocationId -Module config value.\n * @param preferredDistanceUnit -Module config value.\n * @param alreadySelectedLocation -Already Selected Location.\n * @param productPickUpOptionList -Product supported Pickup Modes List.\n * @returns StoreSelectorLocation Line Prop.\n */\n private _createStoreLocationList(\n store: IFullOrgUnitAvailability,\n index: number,\n hasEnabledOutOfStockCheck: boolean,\n isStoreLocatorView: boolean,\n preferredStoreLocationId: string,\n isPreferredStoreEnabled: boolean | undefined,\n selectedStoreLocationId: string | undefined,\n preferredDistanceUnit?: string | undefined,\n alreadySelectedLocation?: OrgUnitLocation,\n productPickUpOptionList?: DeliveryOption[]\n ): IStoreSelectorLocationLineItemProps | undefined {\n const orgUnitLocation = store.OrgUnitAvailability?.OrgUnitLocation;\n const selectedStoreLocation = selectedStoreLocationId;\n const deliveryOptions = store.OrgUnitPickUpDeliveryModes;\n const lineResources = this._mapResources(this.props.resources);\n const storeOpenFrom: string | undefined = secondsToTime(orgUnitLocation?.OpenFrom);\n const storeOpenTo: string | undefined = secondsToTime(orgUnitLocation?.OpenTo);\n const storeHours = store.StoreHours;\n\n if (orgUnitLocation) {\n ++this.storeCounter;\n return {\n location: orgUnitLocation,\n selectedStoreLocationId: selectedStoreLocation,\n storeHours,\n resources: lineResources,\n preferredDistanceUnit: preferredDistanceUnit!,\n isCurrentLocation: this._isCurrentLocation(orgUnitLocation, alreadySelectedLocation),\n isInStock: this._isProductInStock(hasEnabledOutOfStockCheck, store.OrgUnitAvailability?.ItemAvailabilities),\n stockStatusLabel: this._stockInventoryLabel(store),\n storeLocatorView: isStoreLocatorView,\n index: this.storeCounter.toString(),\n preferredStoreLocationId,\n isPreferredStoreEnabled,\n telemetryContent: this.telemetryContent,\n isLocationDisabled: this.state.isLocationDisabled,\n storePickUpOptionList: deliveryOptions?.DeliveryOptions,\n productPickUpOptionList,\n locationOpen: { openFrom: storeOpenFrom, openTo: storeOpenTo },\n storeHoursList: storeHours?.RegularStoreHours ? buildStoreHours(storeHours.RegularStoreHours, lineResources) : [],\n onClick: this._setSelectedStore,\n handlers: {\n onSelected: this._onOrgUnitLocationSelected,\n onSetAsPreferredStore: this._setPreferredStore,\n onRemovePreferredStore: this._removePreferredStore,\n closeStoreDetailsModal: this._closeStoreDetailModal\n }\n };\n }\n return undefined;\n }\n\n /**\n * Method to map resources with Location Item.\n * @param resources - List of strings for module.\n * @returns Resources for StoreSelector location line.\n */\n private readonly _mapResources = (resources: IStoreSelectorResources): IStoreSelectorLocationLineItemResources => {\n return {\n contactInfoHeader: resources.contactText,\n storeHoursHeader: resources.timeText,\n availabilityInfoHeader: resources.availabilityText,\n\n closedText: resources.storeHoursClosedText,\n outOfStock: resources.outOfStockText,\n inStock: resources.inStockText,\n\n currentLocation: resources.selectedStoreLocationText,\n selectLocation: resources.selectStoreText,\n selectLocationAriaLabelFormat: resources.selectStoreAriaFormatText,\n setAsPreferredStoreText: resources.setAsPreferredStoreText,\n setAsPreferredStoreTextAriaLabel: resources.setAsPreferredStoreTextAriaLabel,\n preferredStoreText: resources.preferredStoreText,\n preferredStoreAriaLabel: resources.preferredStoreAriaLabel,\n\n days: {\n monday: resources.storeHoursMondayText,\n tuesday: resources.storeHoursTuesdayText,\n wednesday: resources.storeHoursWednesdayText,\n thursday: resources.storeHoursThursdayText,\n friday: resources.storeHoursFridayText,\n saturday: resources.storeHoursSaturdayText,\n sunday: resources.storeHoursSundayText,\n mondayFull: resources.storeHoursMondayFullText,\n tuesdayFull: resources.storeHoursTuesdayFullText,\n wednesdayFull: resources.storeHoursWednesdayFullText,\n thursdayFull: resources.storeHoursThursdayFullText,\n fridayFull: resources.storeHoursFridayFullText,\n saturdayFull: resources.storeHoursSaturdayFullText,\n sundayFull: resources.storeHoursSundayFullText\n }\n };\n };\n\n private readonly _isCurrentLocation = (location: OrgUnitLocation | undefined, selectedLocation?: OrgUnitLocation): boolean =>\n (selectedLocation && location && selectedLocation.OrgUnitNumber === location.OrgUnitNumber) || false;\n\n /**\n * Method to get stock.\n * @param hasEnableOutOfStockCheck - Config to check for stock check enabled.\n * @param itemAvailabilities - Item quantity availability.\n * @returns Boolean value for item stock.\n */\n private readonly _isProductInStock = (\n hasEnableOutOfStockCheck: boolean,\n itemAvailabilities: ItemAvailability[] | undefined\n ): boolean => {\n if (!hasEnableOutOfStockCheck) {\n return true;\n }\n const quantityCount = 0;\n if (ArrayExtensions.hasElements(itemAvailabilities)) {\n return itemAvailabilities[0].AvailableQuantity ? itemAvailabilities[0].AvailableQuantity > quantityCount : false;\n }\n\n return false;\n };\n\n /**\n * Method to get stocklevel label.\n * @param isInStock - Stock available in store.\n * @returns Label for stock status.\n */\n private readonly _stockInventoryLabel = (isInStock: IFullOrgUnitAvailability | undefined): string | undefined => {\n if (isInStock?.ProductInventoryInformation && ArrayExtensions.hasElements(isInStock.ProductInventoryInformation)) {\n for (let index = 0; index < isInStock.ProductInventoryInformation.length; index++) {\n if (\n isInStock.OrgUnitAvailability?.OrgUnitLocation?.InventoryLocationId ===\n isInStock.ProductInventoryInformation[`${index}`].InventLocationId\n ) {\n return isInStock.ProductInventoryInformation[`${index}`].StockLevelLabel;\n }\n }\n }\n\n return undefined;\n };\n}\n\nexport default StoreSelector;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\n/* eslint-disable no-duplicate-imports */\nimport { ArrayExtensions } from '@msdyn365-commerce-modules/retail-actions';\nimport { Module, Node } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport { ISelectedStoreViewProps } from './components/selected-store/selected-store';\nimport { IStoreSelectorViewProps } from './store-selector';\n\n/**\n * Renders the pickup Delivery options.\n * @param props -- Selected store view props.\n * @returns -- HTML.\n */\nconst renderDeliveryOptions: React.FC = props => {\n const { canSelectLocation, deliveryOptions, pickUpDeliveryOptionButton, pickupModes } = props;\n\n return (\n <>\n {/* eslint-disable-next-line no-nested-ternary -- Need this.*/}\n {canSelectLocation ? (ArrayExtensions.hasElements(deliveryOptions) ? pickupModes : pickUpDeliveryOptionButton) : false}\n \n );\n};\n\n/**\n * Render the selected store.\n * @param props -- Selected store view props.\n * @returns -- HTML.\n */\nconst renderSelectedStore: React.FC = props => {\n const {\n storeDetailsMain,\n storeHeader,\n storeName,\n storeDetailsCloseButton,\n storeDistance,\n storeDetailsAvailabilityContainer,\n productAvailability,\n stockStatus,\n isCurrentLocation,\n currentLocation,\n isPreferredStore,\n preferredStoreButton,\n removePreferredStoreButton\n } = props;\n\n return (\n \n \n {storeDetailsCloseButton}\n {storeName}\n {storeDistance}\n \n \n {productAvailability}\n {stockStatus}\n \n {isCurrentLocation ? currentLocation : renderDeliveryOptions(props)}\n {isPreferredStore ? preferredStoreButton : removePreferredStoreButton}\n \n );\n};\n\n/**\n * Render the body of the popup.\n * @param props -- Store selector view props.\n * @returns -- Returns the html.\n */\nconst renderBody: React.FC = props => {\n const {\n BodyContainerProps,\n locationsMessage,\n search,\n state,\n spinner,\n locationsList,\n noLocationsMessage,\n maps,\n bodyWrapperProps,\n storeResultContainerProps,\n mapContainerProps,\n isMobileView,\n storeDetailsModal,\n selectedLocation\n } = props;\n\n if (isMobileView) {\n return (\n \n {locationsMessage}\n {search}\n \n \n {state.isSearchInProgress ? spinner : <>{locationsList ? locationsList : noLocationsMessage}}\n {maps}\n {selectedLocation && renderSelectedStore(selectedLocation)}\n \n \n \n );\n }\n\n return (\n \n \n \n {locationsMessage}\n {search}\n {state.isSearchInProgress ? spinner : <>{locationsList ? locationsList : noLocationsMessage}}\n \n {maps}\n \n \n );\n};\n\n/**\n * Store selector view props.\n * @param props - Store selector view props.\n * @returns - HTML.\n */\nconst StoreSelectorView: React.FC = props => {\n const {\n FooterContainerProps,\n HeaderContainerProps,\n HeaderProps,\n ModuleProps,\n\n terms\n } = props;\n\n return (\n \n {HeaderProps}\n {renderBody(props)}\n {terms}\n \n );\n};\n\nexport default StoreSelectorView;\n","/*--------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * See License.txt in the project root for license information.\r\n *--------------------------------------------------------------*/\r\n\r\nimport { RichTextComponent } from '@msdyn365-commerce/core';\r\nimport { ContactInformationType, DeliveryOption, OrgUnitContact, OrgUnitLocation, StoreHours } from '@msdyn365-commerce/retail-proxy';\r\nimport { ArrayExtensions } from '@msdyn365-commerce-modules/retail-actions';\r\nimport { ILocationHours, IStoreSelectorLocationLineItemProps, IStoreSelectorViewProps } from '@msdyn365-commerce-modules/store-selector';\r\nimport {\r\n IStoreSelectorFoundLocationsMessage }\r\n from '@msdyn365-commerce-modules/store-selector/src//modules/store-selector/components';\r\nimport { IHoursDisplayInfo }\r\n from '@msdyn365-commerce-modules/store-selector/src/modules/store-selector/components/store-selector-location-line-item/date-time-helpers';\r\nimport { getPayloadObject, getTelemetryAttributes, IPayLoad, Module, Node, TelemetryConstant } from '@msdyn365-commerce-modules/utilities';\r\nimport classnames from 'classnames';\r\nimport * as React from 'react';\r\n\r\nimport { IStoreSelectorProps, IStoreSelectorResources } from '../definition-extensions/store-selector.ext.props.autogenerated';\r\n\r\n/**\r\n * PickUpMethodComponent View Props Interface.\r\n */\r\nexport interface IPickupComponent extends IStoreSelectorLocationLineItemProps {\r\n pickUpStatesProps: IStoreSelectorViewProps;\r\n}\r\n\r\n/**\r\n * Found Locations Message component in Store Selector.\r\n * @param props - The component props.\r\n * @returns The JSX Element.\r\n */\r\nconst StoreSelectorFoundLocationsMessageComponent: React.FC = props => {\r\n const { locations,//searchRadius,\r\n resources\r\n //, isSeeAllStore, preferredDistanceUnit\r\n } = props;\r\n if (locations) {\r\n // const storeCountMessage = preferredDistanceUnit === resources.milesShortText ? resources.storeCountMessage : resources.storeCountMessageInKm;\r\n\r\n return (\r\n ${locations.length.toString()}`) : storeCountMessage\r\n // .replace('{count}', `${locations.length.toString()}`)\r\n // .replace('{radius}', `${searchRadius.toString()}`)}\r\n text={resources.storeAllCountMessage\r\n .replace('{count}', `${locations.length.toString()}`)}\r\n />\r\n );\r\n }\r\n\r\n return null;\r\n};\r\n\r\n/**\r\n * Build distance string.\r\n * @param distance - The distance.\r\n * @param preferredDistanceUnit - The preferred distance unit.\r\n * @param resources - The module resources.\r\n * @param isLocationDisabled - True if location is disabled.\r\n * @returns The distance string.\r\n */\r\nconst buildDistanceString = (distance: number | undefined, preferredDistanceUnit: string,\r\n resources: IStoreSelectorResources & IStoreSelectorResources, isLocationDisabled?: boolean): string | undefined => {\r\n const closeDistance: number = 1;\r\n if (distance === undefined || isLocationDisabled) {\r\n return undefined;\r\n } else if (distance < closeDistance) {\r\n const closeDistanceString: string = resources.closeDistanceString;\r\n return closeDistanceString.replace('{preferredDistanceUnit}', preferredDistanceUnit);\r\n }\r\n const distanceAsString: string = resources.distanceString;\r\n return distanceAsString.replace('{preferredDistanceUnit}', preferredDistanceUnit)\r\n .replace('{distance}', Math.floor(distance).toString());\r\n\r\n};\r\n\r\n/**\r\n * Extract phone number.\r\n * @param contacts - Contacts array.\r\n * @returns Phone number.\r\n */\r\nconst extractPhoneNumber = (contacts: OrgUnitContact[] | undefined): string | undefined => {\r\n if (!contacts) {\r\n return undefined;\r\n }\r\n\r\n const allPhoneContacts = contacts.filter(contact => contact.ContactTypeValue === ContactInformationType.Phone && !contact.IsPrivate);\r\n\r\n if (ArrayExtensions.hasElements(allPhoneContacts)) {\r\n const primaryPhoneContact = allPhoneContacts.find(contact => contact.IsPrimary);\r\n\r\n if (primaryPhoneContact) {\r\n return primaryPhoneContact.Locator;\r\n }\r\n\r\n return allPhoneContacts[0].Locator;\r\n }\r\n\r\n return undefined;\r\n};\r\n\r\n/**\r\n * Render Store Hours Day.\r\n * @param displayTime - Store Hours Information.\r\n * @param storeHoursDayPeriodString - The string for store hours day period.\r\n * @param storeHoursDayString - The string for store hours day period.\r\n * @returns JSX element with store hours day.\r\n */\r\nconst buildStoreHoursDay = (displayTime: IHoursDisplayInfo, storeHoursDayPeriodString: string, storeHoursDayString: string) => {\r\n return (\r\n ${displayTime.startDayShort}`)\r\n .replace('{endDay}',\r\n `${displayTime.endDayShort}`) : storeHoursDayString\r\n .replace('{startDay}', `${displayTime.startDayShort}`)}\r\n />\r\n );\r\n};\r\n\r\n/**\r\n * Render Store Hours.\r\n * @param storeHours - Store hours.\r\n * @param storeHoursList - Store hours list.\r\n * @param locationOpen - Location open.\r\n * @param resources - The module resources.\r\n * @returns JSX element with store hours.\r\n */\r\nconst renderStoreHours = (storeHours: StoreHours | undefined, storeHoursList: IHoursDisplayInfo[] | undefined,\r\n locationOpen: ILocationHours | undefined, resources: IStoreSelectorResources & IStoreSelectorResources): JSX.Element | null => {\r\n // First, use the store hours. This will allow listing day by day hours\r\n if (storeHours?.RegularStoreHours) {\r\n return (\r\n
\r\n {storeHoursList?.map(displayTime => (\r\n
\r\n {buildStoreHoursDay(displayTime, resources.storeHoursDayPeriod, resources.storeHoursDay)}\r\n
\r\n {displayTime.timeRange ? `${displayTime.timeRange.replace('–',' - ')}${displayTime.timeRange.search('Closed') == -1 ? ' local time': ''}` : ''} \r\n
\r\n
\r\n ))}\r\n
\r\n );\r\n }\r\n\r\n // If that fails, fall back to using the OpenFrom and OpenTo properties on the location\r\n const storeOpenFrom: string = locationOpen?.openFrom ? locationOpen.openFrom : '';\r\n const storeOpenTo: string = locationOpen?.openTo ? locationOpen.openTo : '';\r\n return (\r\n
\r\n {(resources.storeHoursDayPeriod)\r\n .replace('{startDay}', storeOpenFrom)\r\n .replace('{endDay}', storeOpenTo)} local time\r\n
\r\n );\r\n};\r\n\r\n/**\r\n * Match delivery options.\r\n * @param productDeliveryOptions - The list of product delivery options.\r\n * @param storePickUpOptionList - The list of store pick up options.\r\n * @returns Matched delivery option.\r\n */\r\n const matchDeliveryOptions = (productDeliveryOptions: DeliveryOption[] | undefined, storePickUpOptionList: DeliveryOption[] | undefined,isCallFromImport:boolean | undefined): DeliveryOption[] => {\r\n if (!productDeliveryOptions) {\r\n if(isCallFromImport)\r\n {\r\n return storePickUpOptionList as DeliveryOption[];\r\n }else\r\n {\r\n return [] as DeliveryOption[];\r\n } \r\n }\r\n return productDeliveryOptions\r\n .map(productDeliveryOption => (storePickUpOptionList?.find(delivery => delivery.Code === productDeliveryOption.Code)))\r\n .filter(productDeliveryOption => productDeliveryOption) as DeliveryOption[];\r\n };\r\n\r\n/**\r\n * PickUpMethod Resources Interface.\r\n */\r\nexport interface IPickUpMethodResources {\r\n selectStoreText: string;\r\n pickUpMethodLabel: string;\r\n pickUpOptionPlaceholder: string;\r\n pickupOptionDropdownError: string;\r\n pickupButtonAriaLabel: string;\r\n}\r\n\r\n/**\r\n * PickUp method dropdown component.\r\n * @param props - The view props.\r\n * @returns JSX Element.\r\n */\r\n// const PickUpMethodDropdownComponent = (props: IPickupComponent & IPickUpMethodResources) => {\r\n// const {\r\n// handlers,\r\n// location,\r\n// pickUpStatesProps,\r\n// selectStoreText,\r\n// pickUpMethodLabel,\r\n// pickUpOptionPlaceholder,\r\n// pickupOptionDropdownError,\r\n// pickupButtonAriaLabel,\r\n// productPickUpOptionList,\r\n// storePickUpOptionList } = props;\r\n// const deliveryOptionList = matchDeliveryOptions(productPickUpOptionList, storePickUpOptionList);\r\n// const [selectedStorePickUpOption, selectStorePickUpOption] = React.useState('');\r\n// const [currentStorePickUpOption, setCurrentStorePickUpOption] = React.useState(pickUpOptionPlaceholder);\r\n// const [isDropdownOpen, toggleDropdown] = React.useState(false);\r\n// const [isError, setError] = React.useState(false);\r\n\r\n// /**\r\n// * Method to handle the store pickup option change.\r\n// * @param event - Change Event.\r\n// */\r\n// const onChangeHandler = React.useCallback((event: React.MouseEvent) => {\r\n// event.preventDefault();\r\n// selectStorePickUpOption(event.currentTarget.value);\r\n// setCurrentStorePickUpOption(event.currentTarget.dataset.description ? event.currentTarget.dataset.description : '');\r\n// toggleDropdown(false);\r\n// setError(false);\r\n// }, []);\r\n\r\n// /**\r\n// * Method to render store location line pick up button.\r\n// * @param filteredDeliveryMode - Filtered Delivery Mode.\r\n// * @returns JSX Element.\r\n// */\r\n// const renderLocationLinePickupButton = (filteredDeliveryMode: DeliveryOption | undefined) => {\r\n// return (\r\n// filteredDeliveryMode !== undefined ?
\r\n// \r\n// {filteredDeliveryMode.Description}\r\n// \r\n//
: null\r\n// );\r\n// };\r\n\r\n// /**\r\n// * Method to handle the store pickup option submit.\r\n// */\r\n// const onClickHandler = React.useCallback(() => {\r\n// if (!StringExtensions.isNullOrEmpty(selectedStorePickUpOption)) {\r\n// handlers.onSelected(location, selectedStorePickUpOption);\r\n// } else if (pickUpStatesProps.state.filteredPickupMode !== undefined) {\r\n// handlers.onSelected(location, pickUpStatesProps.state.filteredPickupMode);\r\n// } else {\r\n// toggleDropdown(false);\r\n// setError(true);\r\n// }\r\n// }, [location, selectedStorePickUpOption, handlers, pickUpStatesProps.state.filteredPickupMode]);\r\n\r\n// const handleDropdownToggle = React.useCallback(() => {\r\n// toggleDropdown(!isDropdownOpen);\r\n// setError(false);\r\n// }, [isDropdownOpen]);\r\n\r\n// const filterDeliveryOption = deliveryOptionList.find((delivery: DeliveryOption) => delivery.Code === pickUpStatesProps.state.filteredPickupMode);\r\n// const pickupInStoreButtonText: string = selectStoreText;\r\n// const filteredDeliveryMode: DeliveryOption | undefined = (pickUpStatesProps.state.filteredPickupMode !== undefined ? filterDeliveryOption : undefined);\r\n// return (\r\n// \r\n//
\r\n// {pickUpMethodLabel}\r\n//
\r\n// {pickUpStatesProps.state.filteredPickupMode === undefined ?
\r\n// \r\n// {currentStorePickUpOption}\r\n// \r\n// \r\n// {deliveryOptionList.map((delivery: DeliveryOption) => (\r\n// \r\n// \r\n// {delivery.Description}\r\n// \r\n// \r\n// ))}\r\n// \r\n//
\r\n// {pickupOptionDropdownError}\r\n//
\r\n//
: renderLocationLinePickupButton(filteredDeliveryMode)}\r\n// \r\n// {pickupInStoreButtonText}\r\n// \r\n//
\r\n// );\r\n// };\r\n\r\n/**\r\n * Method to render store location line item.\r\n * @param locationLineItem - The Location Line item view props.\r\n * @param props - The view props.\r\n * @returns JSX Element.\r\n */\r\nconst renderStoreLocationLineItem = (locationLineItem: IStoreSelectorLocationLineItemProps,\r\n props: IStoreSelectorViewProps & IStoreSelectorProps, pickupButton: React.ReactNode) => {\r\n const {\r\n // eslint-disable-next-line @typescript-eslint/naming-convention -- Dependency from store-selector.tsx file\r\n hideStockStatus,\r\n index,\r\n isInStock,\r\n preferredStoreLocationId,\r\n isPreferredStoreEnabled,\r\n location,\r\n resources,\r\n storeHours,\r\n storeHoursList,\r\n stockStatusLabel,\r\n // eslint-disable-next-line @typescript-eslint/naming-convention -- Dependency from store-selector.tsx file\r\n storeLocatorView,\r\n telemetryContent } = locationLineItem;\r\n const storeName = location.OrgUnitName;\r\n const distanceAsString: string | undefined = buildDistanceString(location.Distance,\r\n locationLineItem.preferredDistanceUnit, props.resources, locationLineItem.isLocationDisabled);\r\n const storeAddress: string | undefined = location.Address;\r\n const phoneNumber: string | undefined = extractPhoneNumber(location.Contacts);\r\n\r\n const resourceLabel = isInStock ? resources.inStock : resources.outOfStock;\r\n const stockStatus = stockStatusLabel ? stockStatusLabel : resourceLabel;\r\n const stockText: string | undefined = (hideStockStatus) ? undefined : stockStatus;\r\n\r\n const payLoad: IPayLoad = getPayloadObject('click', telemetryContent!, TelemetryConstant.PickupInStore);\r\n\r\n /**\r\n * Method to handle the change for preferred store.\r\n * @returns Void.\r\n */\r\n const onSetPreferredStoreClickHandler = () => () => {\r\n locationLineItem.handlers.onSetAsPreferredStore(locationLineItem.location.OrgUnitNumber);\r\n };\r\n\r\n const isPreferredStore = preferredStoreLocationId === location.OrgUnitNumber;\r\n payLoad.contentAction.etext = TelemetryConstant.PreferredStore;\r\n const preferredStoreAttribute = getTelemetryAttributes(telemetryContent!, payLoad);\r\n payLoad.contentAction.etext = TelemetryConstant.RemovePreferredStore;\r\n const removePreferredStoreAttribute = getTelemetryAttributes(telemetryContent!, payLoad);\r\n\r\n return (\r\n
\r\n
\r\n {storeLocatorView && \r\n {index}\r\n }\r\n \r\n {storeName}\r\n \r\n {distanceAsString ? \r\n {distanceAsString}\r\n : false}\r\n
\r\n
\r\n
\r\n

\r\n {locationLineItem.resources.contactInfoHeader}\r\n

\r\n {storeAddress && (\r\n
\r\n \r\n \r\n {storeAddress}\r\n \r\n
\r\n )}\r\n {phoneNumber && (\r\n
\r\n \r\n \r\n {phoneNumber}\r\n \r\n
\r\n )}\r\n
\r\n
\r\n

\r\n {locationLineItem.resources.storeHoursHeader}\r\n

\r\n {renderStoreHours(storeHours, storeHoursList, locationLineItem.locationOpen, props.resources)}\r\n
\r\n {\r\n !storeLocatorView &&\r\n
\r\n

\r\n {resources.availabilityInfoHeader}\r\n

\r\n {stockText &&

\r\n {stockText}\r\n

}\r\n
\r\n }\r\n {\r\n isPreferredStoreEnabled && (isPreferredStore ? \r\n {resources.preferredStoreText}\r\n : \r\n {resources.setAsPreferredStoreText}\r\n )\r\n }\r\n {pickupButton}\r\n
\r\n \r\n \r\n
\r\n );\r\n};\r\n\r\n/**\r\n * Render Store Location.\r\n * @param location - The location props.\r\n * @param index - The location index.\r\n * @param props - The view props.\r\n * @returns The JSX Element.\r\n */\r\nconst renderStoreLocation = (location: IStoreSelectorLocationLineItemProps,\r\n index: number, props: IStoreSelectorViewProps & IStoreSelectorProps): JSX.Element | undefined => {\r\n const {\r\n // eslint-disable-next-line @typescript-eslint/naming-convention -- Dependency from store-selector.tsx file\r\n hideStockStatus, storeLocatorView,\r\n isCurrentLocation,\r\n isInStock,\r\n productPickUpOptionList,\r\n resources,\r\n storePickUpOptionList,\r\n telemetryContent } = location;\r\n\r\n const orgUnitLocation = location.location;\r\n const selectedStoreLocationId = location.selectedStoreLocationId;\r\n const defaultAriaSetsize = 0;\r\n const isCallFromImport = sessionStorage.getItem(\"IsCallFromOrderUpload\") == 'true';\r\n const canSelectLocation = isCallFromImport ? isCallFromImport : hideStockStatus ?? isInStock;\r\n const storeName = location.location.OrgUnitName;\r\n const pickupInStoreAriaLabel: string = resources.selectLocationAriaLabelFormat.replace('{StoreName}', storeName ?? '');\r\n const pickupInStoreButtonText: string = resources.selectLocation;\r\n // const pickUpOptionDropdownPlaceholderText: string = props.resources.pickupOptionDropdownPlaceholderText;\r\n\r\n const payLoad: IPayLoad = getPayloadObject('click', telemetryContent!, TelemetryConstant.PickupInStore);\r\n const attributes = getTelemetryAttributes(telemetryContent!, payLoad);\r\n const deliveryOptionList = matchDeliveryOptions(productPickUpOptionList, storePickUpOptionList,isCallFromImport);\r\n // const selectStoreText = props.resources.selectStoreText;\r\n // const pickUpMethodLabel = props.resources.pickUpMethodLabel;\r\n\r\n /**\r\n * Method to handle the pick up in store.\r\n * @returns Void.\r\n */\r\n const onPickupInStoreClickHandler = () => () => {\r\n if(deliveryOptionList && deliveryOptionList.length > 0)\r\n {\r\n location.handlers.onSelected(location.location,deliveryOptionList[0].Code);\r\n }\r\n else\r\n {\r\n location.handlers.onSelected(location.location);\r\n }\r\n };\r\n\r\n /**\r\n * Render Store Locations.\r\n * @param unitLocation - The org unit location.\r\n * @returns Handler for onClick.\r\n */\r\n const onClickHandler = (unitLocation: OrgUnitLocation | undefined) => () => {\r\n location.onClick(unitLocation?.OrgUnitNumber);\r\n };\r\n const canSelectPickUpMethod = \r\n {pickupInStoreButtonText}\r\n ;\r\n // const canSelectPickUpMethod = !ArrayExtensions.hasElements(deliveryOptionList) ? (\r\n // \r\n // {pickupInStoreButtonText}\r\n // \r\n // ) : ();\r\n const pickUpMethodSelection = (\r\n canSelectLocation ? canSelectPickUpMethod : (\r\n false\r\n )\r\n );\r\n\r\n const pickupItemButton: React.ReactNode = isCallFromImport ? pickUpMethodSelection : (!storeLocatorView && (isCurrentLocation ? (\r\n

\r\n {resources.currentLocation}\r\n

\r\n ) : pickUpMethodSelection));\r\n\r\n return (\r\n \r\n \r\n {renderStoreLocationLineItem(location, props, pickupItemButton)}\r\n \r\n \r\n \r\n );\r\n};\r\n\r\n/**\r\n * Render Store Locations.\r\n * @param props - The view props.\r\n * @returns The JSX Element.\r\n */\r\nconst renderStoreLocations = (props: IStoreSelectorViewProps & IStoreSelectorProps) => {\r\n return (\r\n \r\n {\r\n props.locationListProps?.map((store, index) => {\r\n return renderStoreLocation(store, index, props);\r\n })\r\n }\r\n \r\n );\r\n};\r\n\r\n/**\r\n * Store Selector View.\r\n * @param props - The view props.\r\n * @returns The JSX Element.\r\n */\r\nconst StoreSelectorViewComponent: React.FC> = props => {\r\n // eslint-disable-next-line @typescript-eslint/naming-convention -- Dependency from Store-Selector.tsx file\r\n const { BodyContainerProps, FooterContainerProps, HeaderContainerProps, HeaderProps, ModuleProps,\r\n locationsMessage,\r\n search,\r\n state,\r\n spinner,\r\n locationsList,\r\n noLocationsMessage,\r\n terms } = props;\r\n\r\n return (\r\n \r\n \r\n {HeaderProps}\r\n \r\n \r\n {locationsMessage && }\r\n {search}\r\n {state.isSearchInProgress ? spinner : <>\r\n {locationsList ? renderStoreLocations(props) : noLocationsMessage}\r\n }\r\n \r\n \r\n {terms}\r\n \r\n \r\n );\r\n};\r\n\r\nexport default StoreSelectorViewComponent;\r\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { DeliveryOption } from '@msdyn365-commerce/retail-proxy';\nimport * as React from 'react';\n\n/**\n * Interface Pickup option list.\n */\nexport interface IPickUpOptionListProps {\n pickupListOptionMenuText: string;\n pickupmodeList?: DeliveryOption[];\n onChange(deliveryCode: string): Promise;\n}\n\n/**\n * Interface pickup option list state.\n */\nexport interface IPickOptionListState {\n expandSiteOptions: boolean;\n}\n\n/**\n * Simple Pickup option dropdown with Button to get menu option.\n */\nexport class PickUpOptionList extends React.PureComponent {\n private readonly _pickupListOptionMenu: React.RefObject;\n\n private readonly _pickupListOptionButton: React.RefObject;\n\n private readonly eventsToBeBind = ['click', 'touchstart'];\n\n public constructor(props: IPickUpOptionListProps) {\n super(props);\n this._renderDeliveryOptions = this._renderDeliveryOptions.bind(this);\n this._pickupListOptionMenu = React.createRef();\n this._pickupListOptionButton = React.createRef();\n this.state = {\n expandSiteOptions: false\n };\n }\n\n public componentDidMount(): void {\n for (const event of this.eventsToBeBind) {\n window.addEventListener(event, this.handleDocumentClick, true);\n }\n }\n\n public componentWillUnmount(): void {\n for (const event of this.eventsToBeBind) {\n window.removeEventListener(event, this.handleDocumentClick, true);\n }\n }\n\n public render(): JSX.Element {\n const { pickupListOptionMenuText, pickupmodeList } = this.props;\n\n return (\n
\n \n {pickupListOptionMenuText}\n \n \n {this.state.expandSiteOptions ? (\n
    \n {pickupmodeList?.map((delivery: DeliveryOption) => {\n return (\n
  • \n \n \n {delivery.Description}\n \n \n
  • \n );\n })}\n
\n ) : null}\n
\n );\n }\n\n /**\n * Handle the document click.\n * @param event -- Event object.\n */\n private readonly handleDocumentClick = (event: Event): void => {\n const htmlElement = event.target as HTMLElement;\n if (\n !(\n (this._pickupListOptionButton.current !== null &&\n (event.target === this._pickupListOptionButton.current ||\n this._pickupListOptionButton.current.contains(htmlElement))) ||\n (this._pickupListOptionMenu.current !== null &&\n (event.target === this._pickupListOptionMenu.current || this._pickupListOptionMenu.current.contains(htmlElement)))\n )\n ) {\n this.setState({\n expandSiteOptions: false\n });\n }\n };\n\n private _renderDeliveryOptions(event: React.MouseEvent): void {\n event.stopPropagation();\n const isExpandSiteOptionsState = this.state.expandSiteOptions;\n this.setState({\n expandSiteOptions: !isExpandSiteOptionsState\n });\n }\n\n /**\n * Select Delivery option.\n * @param event -- Event Object.\n */\n private readonly _onSelect = async (event: React.MouseEvent): Promise => {\n event.preventDefault();\n const deliveryCode = event.currentTarget.getAttribute('data-value');\n if (deliveryCode && deliveryCode.length > 0) {\n await this.props.onChange(deliveryCode);\n }\n };\n}\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { DeliveryOption } from '@msdyn365-commerce/retail-proxy';\nimport * as React from 'react';\n\n/**\n * Store Pickup option list interface.\n */\nexport interface IStorePickUpOptionListProps {\n productPickupListOptionMenuText?: string;\n productPickupModeList?: DeliveryOption[];\n defaultOptionText?: string;\n onChange(deliveryCode: string): Promise;\n}\n\n/**\n * Store Pickup option state interface.\n */\nexport interface IStorePickOptionListState {\n isFilterExpanded: boolean;\n selectedPickupMode?: string;\n}\n\n/**\n * Simple Pickup option dropdown with Button to get menu option.\n */\nexport class StorePickUpOptionList extends React.PureComponent {\n private readonly _storePickupListOptionMenu: React.RefObject;\n\n public constructor(props: IStorePickUpOptionListProps) {\n super(props);\n this._storePickupListOptionMenu = React.createRef();\n this.state = {\n isFilterExpanded: false,\n selectedPickupMode: ''\n };\n }\n\n public render(): JSX.Element {\n const { productPickupListOptionMenuText, productPickupModeList, defaultOptionText } = this.props;\n const selectedPickupModeDesc = defaultOptionText\n ? defaultOptionText\n : productPickupModeList?.find((delivery: DeliveryOption) => delivery.Code === this.state.selectedPickupMode)?.Description;\n const role = 'menu';\n return (\n
\n \n {this.state.isFilterExpanded ? (\n
    \n {productPickupModeList?.map((delivery: DeliveryOption) => {\n return (\n
  • \n \n \n {delivery.Description}\n \n \n
  • \n );\n })}\n
\n ) : null}\n
\n );\n }\n\n /**\n * Method to call when drop dwon get selected.\n */\n private readonly _rendeDeliveryOptions = () => {\n const isExpandOptionsState = this.state.isFilterExpanded;\n this.setState({\n isFilterExpanded: !isExpandOptionsState\n });\n };\n\n /**\n * Method to call on select pickup mode.\n * @param event - Mouse event.\n * @returns Void.\n */\n private readonly _onSelect = async (event: React.MouseEvent): Promise => {\n event.preventDefault();\n const deliveryCode = event.currentTarget.getAttribute('data-value');\n if (deliveryCode !== null) {\n this.setState({\n selectedPickupMode: deliveryCode\n });\n\n this._rendeDeliveryOptions();\n await this.props.onChange(deliveryCode);\n }\n };\n\n /**\n * Method to call on select pickup mode.\n * @param event - Mouse event.\n * @returns Void.\n */\n private readonly _onKeyDown = async (event: React.KeyboardEvent): Promise => {\n event.preventDefault();\n const deliveryCode = event.currentTarget.getAttribute('data-value');\n if (deliveryCode !== null) {\n this.setState({\n selectedPickupMode: deliveryCode\n });\n\n this._rendeDeliveryOptions();\n await this.props.onChange(deliveryCode);\n }\n };\n}\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { RegularStoreHours } from '@msdyn365-commerce/retail-proxy';\nimport get from 'lodash/get';\n\nimport { IStoreSelectorLocationLineItemResources } from '.';\n\nexport interface IHoursDisplayInfo {\n startDayShort: string;\n startDayFull: string;\n endDayShort?: string;\n endDayFull?: string;\n timeRange: string;\n}\n\ninterface IHoursInfo {\n isClosed: boolean;\n openTime?: number;\n closeTime?: number;\n}\n\ntype DayType = 'MON' | 'TUE' | 'WED' | 'THU' | 'FRI' | 'SAT' | 'SUN';\n\nexport const secondsToTime = (seconds: number | undefined): string | undefined => {\n if (seconds === undefined) {\n return undefined;\n }\n let hours = Math.floor(seconds / (60 * 60));\n const ampm = hours >= 12 ? 'pm' : 'am';\n hours %= 12;\n hours = hours ? hours : 12;\n const divisorForMinutes = seconds % (60 * 60);\n const minutes = Math.floor(divisorForMinutes / 60) < 10 ? `0${Math.floor(divisorForMinutes / 60)}` : Math.floor(divisorForMinutes / 60);\n return `${hours}:${minutes} ${ampm}`;\n};\n\nconst getShortTimeString = (day: DayType, resources: IStoreSelectorLocationLineItemResources): string => {\n switch (day) {\n case 'MON':\n return resources.days.monday;\n case 'TUE':\n return resources.days.tuesday;\n case 'WED':\n return resources.days.wednesday;\n case 'THU':\n return resources.days.thursday;\n case 'FRI':\n return resources.days.friday;\n case 'SAT':\n return resources.days.saturday;\n default:\n // Case 'SUN':\n return resources.days.sunday;\n }\n};\n\nconst getFullTimeString = (day: DayType, resources: IStoreSelectorLocationLineItemResources): string => {\n switch (day) {\n case 'MON':\n return resources.days.mondayFull;\n case 'TUE':\n return resources.days.tuesdayFull;\n case 'WED':\n return resources.days.wednesdayFull;\n case 'THU':\n return resources.days.thursdayFull;\n case 'FRI':\n return resources.days.fridayFull;\n case 'SAT':\n return resources.days.saturdayFull;\n default:\n // Case 'SUN':\n return resources.days.sundayFull;\n }\n};\n\nconst buildHoursDisplayInfo = (\n startDay: DayType,\n endDay: DayType,\n hoursInfo: string,\n resources: IStoreSelectorLocationLineItemResources\n): IHoursDisplayInfo => {\n return {\n startDayShort: getShortTimeString(startDay, resources),\n startDayFull: getFullTimeString(startDay, resources),\n endDayShort: startDay !== endDay ? getShortTimeString(endDay, resources) : undefined,\n endDayFull: startDay !== endDay ? getFullTimeString(endDay, resources) : undefined,\n timeRange: hoursInfo\n };\n};\n\nconst shouldMergeLines = (firstLine: IHoursInfo, secondLine: IHoursInfo): boolean => {\n if (firstLine.isClosed && secondLine.isClosed) {\n return true;\n }\n\n if (!firstLine.isClosed && !secondLine.isClosed) {\n return firstLine.openTime === secondLine.openTime && firstLine.closeTime === secondLine.closeTime;\n }\n\n return false;\n};\n\nconst getStoreHoursData = (storeHours: RegularStoreHours, dateForLookup: string): IHoursInfo => {\n return {\n isClosed: get(storeHours, `IsClosedOn${dateForLookup}`, false),\n openTime: get(storeHours, `${dateForLookup}OpenTime`, undefined),\n closeTime: get(storeHours, `${dateForLookup}CloseTime`, undefined)\n };\n};\n\nconst buildStoreHoursString = (hoursInfo: IHoursInfo, resources: IStoreSelectorLocationLineItemResources): string => {\n if (hoursInfo.isClosed) {\n return resources.closedText;\n }\n const openFrom: string | undefined = secondsToTime(hoursInfo.openTime);\n const openTo: string | undefined = secondsToTime(hoursInfo.closeTime);\n\n return `${openFrom}–${openTo}`;\n};\n\nexport const buildStoreHours = (storeHours: RegularStoreHours, resources: IStoreSelectorLocationLineItemResources): IHoursDisplayInfo[] => {\n const storeHoursList: IHoursDisplayInfo[] = [];\n\n const mondayHours = getStoreHoursData(storeHours, 'Monday');\n const tuesdayHours = getStoreHoursData(storeHours, 'Tuesday');\n const wednesdayHours = getStoreHoursData(storeHours, 'Wednesday');\n const thursdayHours = getStoreHoursData(storeHours, 'Thursday');\n const fridayHours = getStoreHoursData(storeHours, 'Friday');\n const saturdayHours = getStoreHoursData(storeHours, 'Saturday');\n const sundayHours = getStoreHoursData(storeHours, 'Sunday');\n\n let periodStart: DayType = 'MON';\n let periodEnd: DayType = 'MON';\n\n if (!shouldMergeLines(mondayHours, tuesdayHours)) {\n storeHoursList.push(buildHoursDisplayInfo(periodStart, periodEnd, buildStoreHoursString(mondayHours, resources), resources));\n\n periodStart = 'TUE';\n }\n periodEnd = 'TUE';\n\n if (!shouldMergeLines(tuesdayHours, wednesdayHours)) {\n storeHoursList.push(buildHoursDisplayInfo(periodStart, periodEnd, buildStoreHoursString(tuesdayHours, resources), resources));\n\n periodStart = 'WED';\n }\n periodEnd = 'WED';\n\n if (!shouldMergeLines(wednesdayHours, thursdayHours)) {\n storeHoursList.push(buildHoursDisplayInfo(periodStart, periodEnd, buildStoreHoursString(wednesdayHours, resources), resources));\n\n periodStart = 'THU';\n }\n periodEnd = 'THU';\n\n if (!shouldMergeLines(thursdayHours, fridayHours)) {\n storeHoursList.push(buildHoursDisplayInfo(periodStart, periodEnd, buildStoreHoursString(thursdayHours, resources), resources));\n\n periodStart = 'FRI';\n }\n periodEnd = 'FRI';\n\n if (!shouldMergeLines(fridayHours, saturdayHours)) {\n storeHoursList.push(buildHoursDisplayInfo(periodStart, periodEnd, buildStoreHoursString(fridayHours, resources), resources));\n\n periodStart = 'SAT';\n }\n periodEnd = 'SAT';\n\n if (!shouldMergeLines(saturdayHours, sundayHours)) {\n storeHoursList.push(buildHoursDisplayInfo(periodStart, periodEnd, buildStoreHoursString(saturdayHours, resources), resources));\n\n periodStart = 'SUN';\n }\n periodEnd = 'SUN';\n\n storeHoursList.push(buildHoursDisplayInfo(periodStart, periodEnd, buildStoreHoursString(sundayHours, resources), resources));\n\n return storeHoursList;\n};\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { DeliveryOption, OrgUnitContact, OrgUnitLocation, StoreHours } from '@msdyn365-commerce/retail-proxy';\nimport { ArrayExtensions } from '@msdyn365-commerce-modules/retail-actions';\nimport {\n getPayloadObject,\n getTelemetryAttributes,\n IPayLoad,\n ITelemetryContent,\n TelemetryConstant\n} from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport { PickUpOptionList } from '../pickup-option-list';\nimport { buildStoreHours, IHoursDisplayInfo, secondsToTime } from './date-time-helpers';\n\n/**\n * Store Locator line item resources.\n */\nexport interface IStoreSelectorLocationLineItemResources {\n contactInfoHeader: string;\n storeHoursHeader: string;\n availabilityInfoHeader: string;\n\n closedText: string;\n\n outOfStock: string;\n inStock: string;\n\n currentLocation: string;\n selectLocation: string;\n selectLocationAriaLabelFormat: string;\n setAsPreferredStoreText: string;\n setAsPreferredStoreTextAriaLabel: string;\n preferredStoreText: string;\n preferredStoreAriaLabel: string;\n pickupDeliveryOptionErrorMessage?: string;\n\n days: {\n monday: string;\n tuesday: string;\n wednesday: string;\n thursday: string;\n friday: string;\n saturday: string;\n sunday: string;\n mondayFull: string;\n tuesdayFull: string;\n wednesdayFull: string;\n thursdayFull: string;\n fridayFull: string;\n saturdayFull: string;\n sundayFull: string;\n };\n}\n\n/**\n * Store Locator line item props.\n */\nexport interface IStoreSelectorLocationLineItemProps {\n location: OrgUnitLocation;\n storeHours?: StoreHours;\n\n hideStockStatus?: boolean;\n isInStock?: boolean;\n isCurrentLocation?: boolean;\n\n resources: IStoreSelectorLocationLineItemResources;\n stockStatusLabel?: string;\n storeLocatorView?: boolean;\n isPreferredStoreEnabled?: boolean;\n index: string;\n preferredStoreLocationId: string | null;\n storePickUpOptionList?: DeliveryOption[];\n productPickUpOptionList?: DeliveryOption[];\n filteredPickupMode?: string;\n shouldShowIndex?: boolean;\n\n /**\n * The telemetry content.\n */\n telemetryContent?: ITelemetryContent;\n preferredDistanceUnit: string;\n isLocationDisabled?: boolean;\n handlers: {\n onSelected(location: OrgUnitLocation, deliveryMode?: string): void;\n onSetAsPreferredStore(locationId: string | undefined): void;\n onRemovePreferredStore(): void;\n };\n}\n\n/**\n * Store Locator line item action component.\n */\nconst storeSelectorLocationLineItemComponentActions = {\n onLocationSelected(props: IStoreSelectorLocationLineItemProps, deliveryMode?: string): void {\n props.handlers.onSelected(props.location, deliveryMode);\n },\n onSetAsPreferredStore(props: IStoreSelectorLocationLineItemProps): void {\n props.handlers.onSetAsPreferredStore(props.location.OrgUnitNumber);\n },\n onRemovePreferredStore(props: IStoreSelectorLocationLineItemProps): void {\n props.handlers.onRemovePreferredStore();\n }\n};\n\n/**\n * Function to render store hours.\n * @param storeHours - Store Hours object.\n * @param location - Store Unit.\n * @param resources - Resources.\n * @returns - Jsx element.\n */\nconst renderStoreHours = (\n storeHours: StoreHours | undefined,\n location: OrgUnitLocation,\n resources: IStoreSelectorLocationLineItemResources\n): JSX.Element | null => {\n // First, use the store hours. This will allow listing day by day houts\n if (storeHours?.RegularStoreHours) {\n const storeHoursList: IHoursDisplayInfo[] = buildStoreHours(storeHours.RegularStoreHours, resources);\n\n return (\n
\n {storeHoursList.map(displayTime => (\n
\n {displayTime.endDayShort ? (\n
\n {displayTime.startDayShort}–\n {displayTime.endDayShort}\n
\n ) : (\n
\n {displayTime.startDayShort}\n
\n )}\n
{displayTime.timeRange}
\n
\n ))}\n
\n );\n }\n\n // If that fails, fall back to using the OpenFrom and OpenTo properties on the location\n const storeOpenFrom: string | undefined = secondsToTime(location.OpenFrom);\n const storeOpenTo: string | undefined = secondsToTime(location.OpenTo);\n\n return (\n
\n {storeOpenFrom}-{storeOpenTo}\n
\n );\n};\n\n/**\n * Function to return distance measure unit.\n * @param distance - Store location within radius.\n * @param preferredDistanceUnit - Unit configuration.\n * @param isLocationDisabled - Flag to check user location.\n * @returns - Unit of distance.\n */\nexport const buildDistanceString = (\n distance: number | undefined,\n preferredDistanceUnit: string,\n isLocationDisabled?: boolean\n): string | undefined => {\n if (distance === undefined || isLocationDisabled) {\n return undefined;\n } else if (distance < 1) {\n return `(<1 ${preferredDistanceUnit})`;\n }\n return `(${Math.floor(distance)} ${preferredDistanceUnit})`;\n};\n\n/**\n * Function to store contact.\n * @param contacts - Store location within radius.\n * @returns - Return primary contact number of store.\n */\nconst extractPhoneNumber = (contacts: OrgUnitContact[] | undefined): string | undefined => {\n if (!contacts) {\n return undefined;\n }\n\n const allPhoneContacts = contacts.filter(contact => contact.ContactTypeValue === 1 && !contact.IsPrivate);\n\n if (ArrayExtensions.hasElements(allPhoneContacts)) {\n const primaryPhoneContact = allPhoneContacts.find(contact => contact.IsPrimary);\n\n if (primaryPhoneContact) {\n return primaryPhoneContact.Locator;\n }\n\n return allPhoneContacts[0].Locator;\n }\n\n return undefined;\n};\n\n/**\n * On Store locator click functionality.\n * @param props -Store locator location items.\n * @param pickupMode -Store locator location items.\n * @returns Store locator selected location line item action.\n */\nconst onPickupModeSelectHandler = (props: IStoreSelectorLocationLineItemProps, pickupMode?: string) => () => {\n storeSelectorLocationLineItemComponentActions.onLocationSelected(props, pickupMode);\n};\n\n/**\n * Set Preferred store functionality.\n * @param props -Store locator location items.\n * @returns Store locator selected location line item action.\n */\nconst onSetPreferredStoreClickHandler = (props: IStoreSelectorLocationLineItemProps) => () => {\n storeSelectorLocationLineItemComponentActions.onSetAsPreferredStore(props);\n};\n\n/**\n * Remove preferred store functionality.\n * @param props -Store locator location items.\n * @returns Store locator selected location line item action.\n */\nconst removePreferredStoreHandler = (props: IStoreSelectorLocationLineItemProps) => () => {\n storeSelectorLocationLineItemComponentActions.onRemovePreferredStore(props);\n};\n\n/**\n * On Change functionality.\n * @param props -Store locator location items.\n * @returns Store locator selected location line item action.\n */\nconst onChangeHandler = (props: IStoreSelectorLocationLineItemProps) => async (deliveryCode: string): Promise => {\n storeSelectorLocationLineItemComponentActions.onLocationSelected(props, deliveryCode);\n return Promise.resolve();\n};\n\n/**\n * Method to render pickup modes.\n * @param props - StoreSelector Line item props.\n * @param deliveryOptionList - Product DeliveryOption List.\n * @param pickupInStoreButtonText - Pickup store button text.\n * @param pickupInStoreAriaLabel - Pickup store aria label.\n * @returns Jsx component.\n */\nconst renderPickupModes = (\n props: IStoreSelectorLocationLineItemProps,\n deliveryOptionList: DeliveryOption[],\n pickupInStoreButtonText: string,\n pickupInStoreAriaLabel: string\n): JSX.Element | null => {\n if (props.filteredPickupMode === undefined) {\n return (\n \n );\n }\n return (\n \n {pickupInStoreButtonText}\n \n );\n};\n\n/**\n * Method to check if we have atleast one common delivery code between product and channel.\n * @param productdeliveryOptions - Product DeliveryOption List.\n * @param storePickUpOptionList - Channel DeliveryOption List.\n * @returns DeliveryOptionList.\n */\nexport const matchDeliveryOptions = (\n productdeliveryOptions: DeliveryOption[] | undefined,\n storePickUpOptionList: DeliveryOption[] | undefined\n): DeliveryOption[] => {\n const deliveryOption: DeliveryOption[] = [];\n productdeliveryOptions?.map(delivery => {\n const pickup = storePickUpOptionList?.find(_delivery => _delivery.Code === delivery.Code);\n if (pickup) {\n deliveryOption.push(pickup);\n }\n });\n\n return deliveryOption;\n};\n\n/**\n * Renders store location line items.\n * @param props - Store location line items props.\n * @returns - HTML.\n */\nconst storeSelectorLocationLineItem: React.FC = (props: IStoreSelectorLocationLineItemProps) => {\n const {\n hideStockStatus,\n isCurrentLocation,\n isInStock,\n location,\n resources,\n storeHours,\n stockStatusLabel,\n storeLocatorView,\n index,\n preferredStoreLocationId,\n isPreferredStoreEnabled,\n isLocationDisabled,\n telemetryContent,\n storePickUpOptionList,\n productPickUpOptionList,\n shouldShowIndex\n } = props;\n\n const storeName: string | undefined = location.OrgUnitName;\n const distanceAsString: string | undefined = buildDistanceString(location.Distance, props.preferredDistanceUnit, isLocationDisabled);\n const storeAddress: string | undefined = location.Address;\n const phoneNumber: string | undefined = extractPhoneNumber(location.Contacts);\n\n const resourceLabel = isInStock ? resources.inStock : resources.outOfStock;\n const stockLabel = stockStatusLabel ? stockStatusLabel : undefined;\n const stockText: string | undefined = hideStockStatus ? undefined : stockLabel ? stockLabel : resourceLabel;\n const canSelectLocation = hideStockStatus || isInStock;\n const pickupInStoreButtonText: string = resources.selectLocation;\n const pickupInStoreAriaLabel: string = resources.selectLocationAriaLabelFormat.replace('{StoreName}', storeName || '');\n const isPreferredStore = preferredStoreLocationId === location.OrgUnitNumber;\n const payLoad: IPayLoad = getPayloadObject('click', telemetryContent!, TelemetryConstant.PickupInStore);\n const attributes = getTelemetryAttributes(telemetryContent!, payLoad);\n payLoad.contentAction.etext = TelemetryConstant.PreferredStore;\n const preferredStoreAttributes = getTelemetryAttributes(telemetryContent!, payLoad);\n payLoad.contentAction.etext = TelemetryConstant.RemovePreferredStore;\n const removePreferredStoreAttributes = getTelemetryAttributes(telemetryContent!, payLoad);\n const deliveryOptionList = matchDeliveryOptions(productPickUpOptionList, storePickUpOptionList);\n const [isError, setError] = React.useState(false);\n\n const pickUpButtonClickHandler = (props: IStoreSelectorLocationLineItemProps) => () => {\n if (deliveryOptionList.length === 0) {\n setError(true);\n } else {\n storeSelectorLocationLineItemComponentActions.onLocationSelected(props);\n }\n };\n\n /* eslint-disable prettier/prettier */\n return (\n
\n
\n {(shouldShowIndex || storeLocatorView) && {index}}\n {storeName}\n {distanceAsString ? \n {' '}\n {distanceAsString}\n : false}\n
\n
\n
\n

{resources.contactInfoHeader}

\n {storeAddress && (\n
\n \n {storeAddress}\n
\n )}\n {phoneNumber && (\n
\n \n {phoneNumber}\n
\n )}\n
\n
\n

{resources.storeHoursHeader}

\n {renderStoreHours(storeHours, location, resources)}\n
\n {!storeLocatorView && (\n
\n {!hideStockStatus &&

{resources.availabilityInfoHeader}

}\n {stockText &&

{stockText}

}\n {isCurrentLocation ? (\n

{resources.currentLocation}

\n ) : canSelectLocation ? (\n deliveryOptionList.length === 0 ? (\n \n {pickupInStoreButtonText}\n \n ) : (\n renderPickupModes(props, deliveryOptionList, pickupInStoreButtonText, pickupInStoreAriaLabel)\n )\n ) : (\n false\n )}\n
\n )}\n {isPreferredStoreEnabled ? (\n isPreferredStore ? (\n \n {resources.preferredStoreText}\n \n ) : (\n \n {resources.setAsPreferredStoreText}\n \n )\n ) : null}\n
\n {isError ? (\n \n \n ) : ('')}\n
\n );\n};\n\n/**\n * Store location line item component.\n */\nexport const StoreSelectorLocationLineItemComponent = storeSelectorLocationLineItem as (\n props: IStoreSelectorLocationLineItemProps\n) => JSX.Element;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { DeliveryOption, ItemAvailability, OrgUnitLocation } from '@msdyn365-commerce/retail-proxy';\nimport { ArrayExtensions, IFullOrgUnitAvailability } from '@msdyn365-commerce-modules/retail-actions';\nimport { ITelemetryContent } from '@msdyn365-commerce-modules/utilities';\nimport classnames from 'classnames';\nimport { observable, reaction } from 'mobx';\nimport { observer } from 'mobx-react';\nimport * as React from 'react';\n\nimport { IStoreSelectorResources } from '../store-selector.props.autogenerated';\nimport { IStoreSelectorLocationLineItemResources, StoreSelectorLocationLineItemComponent } from './store-selector-location-line-item';\n\n/**\n * Store selector location lines props interface.\n */\nexport interface IStoreSelectorLocationLinesProps {\n locations?: IFullOrgUnitAvailability[];\n resources: IStoreSelectorResources;\n preferredDistanceUnit?: string;\n\n alreadySelectedLocation?: OrgUnitLocation;\n outOfStockThreshold: number;\n enableOutOfStockCheck: boolean;\n storeLocatorView?: boolean;\n selectedStoreLocationId?: string;\n isPreferredStoreEnabled?: boolean;\n displayList?: boolean;\n isLocationDisabled?: boolean;\n productPickUpDeliveryOptions?: DeliveryOption[];\n onClick: (locationId: string | undefined) => void;\n preferredStoreLocationId: string | null;\n onSetAsPreferredStore: (locationId: string | undefined) => void;\n onRemovePreferredStore: () => void;\n filteredPickupMode?: string;\n shouldShowIndex?: boolean;\n\n /**\n * The telemetry content.\n */\n telemetryContent?: ITelemetryContent;\n onLocationSelected(location: OrgUnitLocation | undefined): void;\n}\n\n/**\n * Displays all the location line items, or null if none exists.\n */\n@observer\nexport class StoreSelectorLocationLines extends React.PureComponent {\n @observable private _stores: IFullOrgUnitAvailability[] | undefined;\n\n private readonly selectedLocationRef: React.RefObject;\n\n private storeCounter: number;\n\n public constructor(props: IStoreSelectorLocationLinesProps) {\n super(props);\n this.selectedLocationRef = React.createRef();\n this.storeCounter = 0;\n }\n\n public componentDidUpdate(previousProps: IStoreSelectorLocationLinesProps): void {\n if (this.props.selectedStoreLocationId !== previousProps.selectedStoreLocationId) {\n this._scrollIntoView();\n }\n }\n\n public componentDidMount(): void {\n if (this.props.locations) {\n this._stores = this._sortStores(this.props.locations);\n }\n\n reaction(\n () => this.props.locations,\n () => {\n if (this.props.locations) {\n this._stores = this._sortStores(this.props.locations);\n }\n }\n );\n }\n\n public render(): JSX.Element | null {\n if (!ArrayExtensions.hasElements(this._stores)) {\n return null;\n }\n\n this.storeCounter = 0;\n\n return (\n
\n {this._stores.map((store, index) => {\n return this._renderStoreLocation(store, index);\n })}\n
\n );\n }\n\n /**\n * On click Handler function.\n * @param orgUnitLocation -OrgUnit location.\n * @returns Click action on orgUnit Location.\n */\n private readonly onClickHandler = (orgUnitLocation: OrgUnitLocation | undefined) => () => {\n this.props.onClick(orgUnitLocation?.OrgUnitNumber);\n };\n\n private _renderStoreLocation(store: IFullOrgUnitAvailability, index: number): JSX.Element | undefined {\n const orgUnitLocation = store?.OrgUnitAvailability?.OrgUnitLocation;\n const selectedStoreLocationId = this.props.selectedStoreLocationId;\n const deliveryOptions = store?.OrgUnitPickUpDeliveryModes;\n const defaultAriaSetsize = 0;\n if (orgUnitLocation) {\n ++this.storeCounter;\n return (\n \n \n \n );\n }\n return undefined;\n }\n\n /**\n * Sort store.\n * @param stores - Array of stores data.\n * @returns Sorted stores array.\n */\n private _sortStores(stores: IFullOrgUnitAvailability[]): IFullOrgUnitAvailability[] {\n /**\n * IsPreferredStore.\n * @param value - Array of stores data.\n * @returns IsPreferred store boolean value.\n */\n const isPreferredStore = (value: IFullOrgUnitAvailability) =>\n this.props.isPreferredStoreEnabled &&\n this.props.preferredStoreLocationId &&\n value.OrgUnitAvailability?.OrgUnitLocation?.OrgUnitNumber === this.props.preferredStoreLocationId;\n\n return [...stores.filter(isPreferredStore), ...stores.filter(store => !isPreferredStore(store))];\n }\n\n /**\n * Scroll into view.\n */\n private readonly _scrollIntoView = () => {\n const selectedLocationDiv = this.selectedLocationRef.current;\n const parent = selectedLocationDiv?.parentElement;\n if (selectedLocationDiv && parent) {\n if (parent.scrollTop > selectedLocationDiv.offsetTop) {\n parent.scrollTop = selectedLocationDiv.offsetTop;\n } else if (selectedLocationDiv.offsetTop + selectedLocationDiv.clientHeight > parent.scrollTop + parent.clientHeight) {\n parent.scrollTop = selectedLocationDiv.offsetTop + selectedLocationDiv.clientHeight - parent.clientHeight;\n }\n }\n };\n\n /**\n * Is current location.\n * @param location - Org unit location.\n * @returns The current location.\n */\n private readonly _isCurrentLocation = (location: OrgUnitLocation | undefined): boolean =>\n (this.props.alreadySelectedLocation && location && this.props.alreadySelectedLocation.OrgUnitNumber === location.OrgUnitNumber) ||\n false;\n\n /**\n * Check the product is in stock or not.\n * @param itemAvailabilities - Item availabilities.\n * @returns If the product is in stock.\n */\n private readonly _isProductInStock = (itemAvailabilities: ItemAvailability[] | undefined): boolean => {\n if (!this.props.enableOutOfStockCheck) {\n return true;\n }\n\n if (ArrayExtensions.hasElements(itemAvailabilities)) {\n return itemAvailabilities[0].AvailableQuantity ? itemAvailabilities[0].AvailableQuantity > 0 : false;\n }\n\n return false;\n };\n\n /**\n * Get the stock inventory label.\n * @param availabilityWithHours - Full org unit availability.\n * @returns The stock label.\n */\n private readonly _stockInventoryLabel = (availabilityWithHours: IFullOrgUnitAvailability | undefined): string | undefined => {\n if (availabilityWithHours && ArrayExtensions.hasElements(availabilityWithHours.ProductInventoryInformation)) {\n for (let i = 0; i < availabilityWithHours.ProductInventoryInformation.length; i++) {\n if (\n availabilityWithHours.OrgUnitAvailability?.OrgUnitLocation?.InventoryLocationId ===\n availabilityWithHours.ProductInventoryInformation[i].InventLocationId\n ) {\n return availabilityWithHours.ProductInventoryInformation[i].StockLevelLabel;\n }\n }\n }\n\n return undefined;\n };\n\n /**\n * Map resources.\n * @param resources - Store resources.\n * @returns Resources.\n */\n private readonly _mapResources = (resources: IStoreSelectorResources): IStoreSelectorLocationLineItemResources => {\n return {\n contactInfoHeader: resources.contactText,\n storeHoursHeader: resources.timeText,\n availabilityInfoHeader: resources.availabilityText,\n\n closedText: resources.storeHoursClosedText,\n outOfStock: resources.outOfStockText,\n inStock: resources.inStockText,\n\n currentLocation: resources.selectedStoreLocationText,\n selectLocation: resources.selectStoreText,\n selectLocationAriaLabelFormat: resources.selectStoreAriaFormatText,\n setAsPreferredStoreText: resources.setAsPreferredStoreText,\n setAsPreferredStoreTextAriaLabel: resources.setAsPreferredStoreTextAriaLabel,\n preferredStoreText: resources.preferredStoreText,\n preferredStoreAriaLabel: resources.preferredStoreAriaLabel,\n pickupDeliveryOptionErrorMessage: resources.pickupDeliveryOptionErrorMessage,\n\n days: {\n monday: resources.storeHoursMondayText,\n tuesday: resources.storeHoursTuesdayText,\n wednesday: resources.storeHoursWednesdayText,\n thursday: resources.storeHoursThursdayText,\n friday: resources.storeHoursFridayText,\n saturday: resources.storeHoursSaturdayText,\n sunday: resources.storeHoursSundayText,\n mondayFull: resources.storeHoursMondayFullText,\n tuesdayFull: resources.storeHoursTuesdayFullText,\n wednesdayFull: resources.storeHoursWednesdayFullText,\n thursdayFull: resources.storeHoursThursdayFullText,\n fridayFull: resources.storeHoursFridayFullText,\n saturdayFull: resources.storeHoursSaturdayFullText,\n sundayFull: resources.storeHoursSundayFullText\n }\n };\n };\n}\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport * as Msdyn365 from '@msdyn365-commerce/core';\nimport { DeliveryOption } from '@msdyn365-commerce/retail-proxy';\nimport {\n getPayloadObject,\n getTelemetryAttributes,\n IPayLoad,\n ITelemetryContent,\n KeyCodes,\n TelemetryConstant\n} from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport { StorePickUpOptionList } from './store-pickup-option-list';\n\n/**\n * Store Selector Search Form Props interface.\n */\nexport interface IStoreSelectorSearchFormProps {\n resources: {\n searchInputAriaLabel: string;\n searchButtonAriaLabel: string;\n searchPlaceholderText: string;\n seeAllStoresText: string;\n viewListText: string;\n viewMapText: string;\n pickupFilterByHeading?: string;\n pickupFilterMenuHeading?: string;\n };\n\n id: string;\n value: string;\n isMapDisabled?: boolean;\n showAllStores?: boolean;\n displayList?: boolean;\n locatorView?: boolean;\n productPickUpDeliveryOptions?: DeliveryOption[];\n hasEnabledPickupFilterToShowStore?: boolean;\n filteredPickupMode?: string;\n\n /**\n * The telemetry content.\n */\n telemetryContent?: ITelemetryContent;\n onShowAllStores(): void;\n onToggleListMapViewState(): void;\n performSearch(searchTerm: string): Promise;\n searchTermChanged(searchTerm: string): Promise;\n filterPickupModeSelected(pickupMode: string): void;\n}\n\n/**\n * Simple search form consisting of search text and a search button.\n */\nexport class StoreSelectorSearchForm extends React.PureComponent {\n private readonly searchBoxRef: React.RefObject = React.createRef();\n\n private readonly storeSearchAttributes: Msdyn365.IDictionary | undefined;\n\n private readonly showAllStoreAttributes: Msdyn365.IDictionary | undefined;\n\n private readonly toggleMapViewAttributes: Msdyn365.IDictionary | undefined;\n\n private previousValue: string = '';\n\n private isSearchResultOpened: boolean = false;\n\n public constructor(props: IStoreSelectorSearchFormProps) {\n super(props);\n this.state = { value: '' };\n this._handleKeyPressPrev = this._handleKeyPressPrev.bind(this);\n const payLoad: IPayLoad = getPayloadObject('click', props.telemetryContent!, TelemetryConstant.SearchStore);\n this.storeSearchAttributes = getTelemetryAttributes(props.telemetryContent!, payLoad);\n payLoad.contentAction.etext = TelemetryConstant.ShowAllStore;\n this.showAllStoreAttributes = getTelemetryAttributes(props.telemetryContent!, payLoad);\n payLoad.contentAction.etext = TelemetryConstant.ToggleMapView;\n this.toggleMapViewAttributes = getTelemetryAttributes(props.telemetryContent!, payLoad);\n }\n\n public render(): JSX.Element {\n const {\n resources: {\n searchButtonAriaLabel,\n searchPlaceholderText,\n seeAllStoresText,\n viewListText,\n viewMapText,\n pickupFilterByHeading,\n pickupFilterMenuHeading\n },\n id,\n value,\n isMapDisabled,\n showAllStores,\n displayList,\n locatorView,\n onShowAllStores,\n productPickUpDeliveryOptions,\n hasEnabledPickupFilterToShowStore\n } = this.props;\n\n const toggleButtonText = displayList ? viewMapText : viewListText;\n\n return (\n
\n \n
\n )}\n {this.renderPickupModesList(\n this.props,\n toggleButtonText,\n productPickUpDeliveryOptions,\n pickupFilterMenuHeading,\n locatorView,\n pickupFilterByHeading,\n hasEnabledPickupFilterToShowStore,\n displayList\n )}\n \n );\n }\n\n /**\n * Handles the key press on the input box.\n * @param event - Event object.\n */\n private readonly _handleInputKeyPress = (event: React.KeyboardEvent): void => {\n // When the user navigates through the up and down arrow on the result returned by the auto suggest and press enter.\n // At that time, two requests were made to fetch the store details due to which incorrect result is shown and causes flickering.\n // In order to avoid that. Checking if the search result is open or not.\n if (event.keyCode === KeyCodes.ArrowUp || event.keyCode === KeyCodes.ArrowDown) {\n const activeDescedantValue = (event.target as HTMLInputElement).getAttribute('aria-activedescendant');\n if (activeDescedantValue) {\n if (this.previousValue === '') {\n this.previousValue = activeDescedantValue;\n this.isSearchResultOpened = true;\n return;\n }\n\n if (activeDescedantValue !== this.previousValue) {\n this.previousValue = activeDescedantValue;\n this.isSearchResultOpened = true;\n } else {\n this.isSearchResultOpened = false;\n }\n }\n }\n };\n\n /**\n * Calls method display result.\n * @param event - The first number.\n */\n private readonly _handleKeyPressPrev = (event: React.KeyboardEvent): void => {\n if (event.keyCode === KeyCodes.Enter || event.keyCode === KeyCodes.Space) {\n this.props.onShowAllStores();\n }\n };\n\n /**\n * Method called on search text changed.\n * @param event - Input value.\n */\n private readonly _searchTextChanged = async (event: React.ChangeEvent): Promise => {\n const inputValue: string = event.target.value;\n\n await this.props.searchTermChanged(inputValue);\n };\n\n /**\n * Method called on search submit.\n * @param event - Input value.\n */\n private readonly _onSubmit = async (event: React.SyntheticEvent): Promise => {\n event.preventDefault(); // Prevents form submission\n this.searchBoxRef.current?.blur();\n if (!this.isSearchResultOpened) {\n await this.props.performSearch(this.props.value);\n }\n this.isSearchResultOpened = false;\n };\n\n /**\n * Method called on product pickup option change.\n * @returns - Void.\n */\n private readonly _onChangeHandler = () => async (deliveryCode: string): Promise => {\n this.props.filterPickupModeSelected(deliveryCode);\n return Promise.resolve();\n };\n\n /**\n * Method to render pickup mode list.\n * @param props - Store selector search form props.\n * @param toggleButtonText - Locator view button text.\n * @param productPickUpDeliveryOptions - Product DeliveryOption List.\n * @param pickupFilterMenuHeading - Pickup store button text.\n * @param locatorView - Locator View is on\\off.\n * @param pickupFilterByHeading - Pickup list label text.\n * @param hasEnabledPickupFilterToShowStore - Flag to check header filter is enabled.\n * @param shouldDisplayList - Display List.\n * @returns Jsx component.\n */\n private readonly renderPickupModesList = (\n props: IStoreSelectorSearchFormProps,\n toggleButtonText: string,\n productPickUpDeliveryOptions: DeliveryOption[] | undefined,\n pickupFilterMenuHeading: string | undefined,\n locatorView: boolean | undefined,\n pickupFilterByHeading: string | undefined,\n hasEnabledPickupFilterToShowStore: boolean | undefined,\n shouldDisplayList?: boolean\n ): JSX.Element | null => {\n const toggleButtonClass = shouldDisplayList ? 'view-map' : 'list-view';\n if (hasEnabledPickupFilterToShowStore) {\n return (\n
\n {locatorView && (\n \n {toggleButtonText}\n \n )}\n \n
{pickupFilterByHeading}
\n
\n );\n }\n if (locatorView) {\n return (\n \n {toggleButtonText}\n \n );\n }\n return null;\n };\n}\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport * as Msdyn365 from '@msdyn365-commerce/core';\nimport { IFullOrgUnitAvailability } from '@msdyn365-commerce-modules/retail-actions';\nimport classnames from 'classnames';\nimport * as React from 'react';\n\nimport { IStoreSelectorResources, ITermsOfServiceLinkData } from '../store-selector.props.autogenerated';\n\nexport interface IStoreSelectorEmptyMessageProps {\n resources: IStoreSelectorResources;\n}\nexport const StoreSelectorEmptyMessage: React.FC = ({ resources }) => (\n
\n

{resources.emptyLocationsText}

\n
\n);\n\nexport const StoreSelectorWaiting: React.FC = () =>
;\n\nexport interface IStoreSelectorTermsOfServiceProps {\n link?: ITermsOfServiceLinkData;\n requestContext: Msdyn365.IRequestContext;\n onTextChange?(event: Msdyn365.ContentEditableEvent): void;\n}\n\nexport const StoreSelectorTermsOfService: React.FC = ({ link, requestContext, onTextChange }) => {\n if (link) {\n const editableLink: Msdyn365.ILinksData = {\n ariaLabel: link.ariaLabel,\n className: 'ms-store-select__terms-link',\n linkText: link.linkText,\n linkUrl: link.linkUrl.destinationUrl,\n openInNewTab: link.openInNewTab,\n role: 'link'\n };\n\n return (\n
\n \n
\n );\n }\n return null;\n};\n\nexport interface IStoreSelectorFoundLocationsMessage {\n resources: IStoreSelectorResources;\n locations?: IFullOrgUnitAvailability[];\n searchRadius: number;\n preferredDistanceUnit: string;\n isSeeAllStore: boolean;\n}\nexport const StoreSelectorFoundLocationsMessage: React.FC = ({\n locations,\n searchRadius,\n resources,\n isSeeAllStore,\n preferredDistanceUnit\n}) => {\n if (locations) {\n const storeCountMessage =\n preferredDistanceUnit === resources.milesShortText ? resources.storeCountMessage : resources.storeCountMessageInKm;\n return (\n
\n {isSeeAllStore\n ? resources.storeAllCountMessage.replace('{count}', locations.length.toString())\n : storeCountMessage.replace('{count}', locations.length.toString()).replace('{radius}', searchRadius.toString())}\n
\n );\n }\n\n return null;\n};\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { DeliveryOption, OrgUnitLocation } from '@msdyn365-commerce/retail-proxy';\nimport { IFullOrgUnitAvailability } from '@msdyn365-commerce-modules/retail-actions';\nimport {\n Button,\n getPayloadObject,\n getTelemetryAttributes,\n INodeProps,\n IPayLoad,\n ITelemetryContent,\n NodeTag,\n TelemetryConstant\n} from '@msdyn365-commerce-modules/utilities';\nimport React from 'react';\n\nimport { PickUpOptionList } from '../pickup-option-list';\nimport { buildDistanceString, matchDeliveryOptions } from '../store-selector-location-line-item';\n\n/**\n * Store Locator line item resources.\n */\nexport interface ISelectedStoreResources {\n availabilityInfoHeader: string;\n closedText: string;\n outOfStock: string;\n inStock: string;\n currentLocation: string;\n selectLocation: string;\n selectLocationAriaLabelFormat: string;\n setAsPreferredStoreText: string;\n setAsPreferredStoreTextAriaLabel: string;\n preferredStoreText: string;\n preferredStoreAriaLabel: string;\n}\n\n/**\n * Store Selector resources.\n */\nexport interface ISelectedStoreProps {\n className?: string;\n shouldHideStockStatus?: boolean;\n isCurrentLocation?: boolean;\n isInStock?: boolean;\n selectedStore?: IFullOrgUnitAvailability;\n resources: ISelectedStoreResources;\n stockStatusLabel?: string;\n preferredStoreLocationId: string | null;\n isPreferredStoreEnabled?: boolean;\n isLocationDisabled?: boolean;\n telemetryContent?: ITelemetryContent;\n storePickUpOptionList?: DeliveryOption[];\n productPickUpOptionList?: DeliveryOption[];\n preferredDistanceUnit: string;\n filteredPickupMode?: string;\n handlers: {\n onSelected(location: OrgUnitLocation, deliveryMode?: string): void;\n onSetAsPreferredStore(locationId: string | undefined): void;\n onRemovePreferredStore(): void;\n closeStoreDetailsModal(): Promise;\n };\n}\n\n/**\n * Store Selector resources.\n */\nexport interface ISelectedStoreViewProps {\n isCurrentLocation?: boolean;\n canSelectLocation?: boolean;\n selectedStore?: IFullOrgUnitAvailability;\n deliveryOptions?: DeliveryOption[];\n isPreferredStore?: boolean;\n resources: ISelectedStoreResources;\n\n storeDetailsMain: INodeProps;\n storeHeader: INodeProps;\n storeName: React.ReactNode;\n storeDistance: React.ReactNode;\n storeDetailsAvailabilityContainer: INodeProps;\n productAvailability: React.ReactNode;\n stockStatus: React.ReactNode;\n currentLocation: React.ReactNode;\n pickUpDeliveryOptionButton: React.ReactNode;\n pickupModes?: React.ReactNode;\n preferredStoreButton?: React.ReactNode;\n removePreferredStoreButton?: React.ReactNode;\n storeDetailsCloseButton?: React.ReactNode;\n handlers: {\n onSelected(location: OrgUnitLocation, deliveryMode?: string): void;\n onSetAsPreferredStore(locationId: string | undefined): void;\n onRemovePreferredStore(): void;\n closeStoreDetailsModal(): Promise;\n };\n}\n\n/**\n * On Store locator click functionality.\n * @param props -Store locator location items.\n * @returns Store locator selected location line item action.\n */\nconst onPickupInStoreClickHandler = (props: ISelectedStoreProps) => () => {\n if (props.selectedStore?.OrgUnitAvailability?.OrgUnitLocation) {\n props.handlers.onSelected(props.selectedStore.OrgUnitAvailability.OrgUnitLocation);\n }\n};\n\n/**\n * Set Preferred store functionality.\n * @param props -Store locator location items.\n * @returns Store locator selected location line item action.\n */\nconst onSetPreferredStoreClickHandler = (props: ISelectedStoreProps) => () => {\n props.handlers.onSetAsPreferredStore(props.selectedStore?.OrgUnitAvailability?.OrgUnitLocation?.OrgUnitNumber);\n};\n\n/**\n * On Change functionality.\n * @param props -Store locator location items.\n * @returns Store locator selected location line item action.\n */\nconst onChangeHandler = (props: ISelectedStoreProps) => async (deliveryCode: string): Promise => {\n if (props.selectedStore?.OrgUnitAvailability?.OrgUnitLocation) {\n props.handlers.onSelected(props.selectedStore.OrgUnitAvailability.OrgUnitLocation, deliveryCode);\n }\n return Promise.resolve();\n};\n\n/**\n * Remove preferred store functionality.\n * @param props -Store locator location items.\n * @returns Store locator selected location line item action.\n */\nconst removePreferredStoreHandler = (props: ISelectedStoreProps) => () => {\n props.handlers.onRemovePreferredStore();\n};\n\n/**\n * On Store locator click functionality.\n * @param props -Store locator location items.\n * @param pickupMode -Store locator location items.\n * @returns Store locator selected location line item action.\n */\nconst onPickupModeSelectHandler = (props: ISelectedStoreProps, pickupMode?: string) => () => {\n if (props.selectedStore?.OrgUnitAvailability?.OrgUnitLocation) {\n props.handlers.onSelected(props.selectedStore.OrgUnitAvailability.OrgUnitLocation, pickupMode);\n }\n};\n\n/**\n * On store details close functionality.\n * @param props -Store locator location items.\n * @returns Void promise.\n */\nconst storeDetailsModalHandler = (props: ISelectedStoreProps) => async (): Promise => {\n await props.handlers.closeStoreDetailsModal();\n};\n\n/**\n * Method to render pickup modes.\n * @param props - StoreSelector Line item props.\n * @param deliveryOptionList - Product DeliveryOption List.\n * @param pickupInStoreButtonText - Pickup store button text.\n * @param pickupInStoreAriaLabel - Pickup store aria label.\n * @returns Jsx component.\n */\nconst renderPickupModes = (\n props: ISelectedStoreProps,\n deliveryOptionList: DeliveryOption[],\n pickupInStoreButtonText: string,\n pickupInStoreAriaLabel: string\n): JSX.Element | null => {\n if (props.filteredPickupMode === undefined) {\n return (\n \n );\n }\n return (\n \n {pickupInStoreButtonText}\n \n );\n};\n\n/**\n * Renders selected store details.\n * @param props - Store location details props.\n * @returns - Selected Store view props.\n */\nconst selectedStoreDetails = (props: ISelectedStoreProps): ISelectedStoreViewProps => {\n const {\n className,\n shouldHideStockStatus,\n isCurrentLocation,\n isInStock,\n selectedStore,\n resources,\n stockStatusLabel,\n preferredStoreLocationId,\n isPreferredStoreEnabled,\n isLocationDisabled,\n telemetryContent,\n storePickUpOptionList,\n productPickUpOptionList,\n preferredDistanceUnit\n } = props;\n\n const parentClassName = className ? className : 'ms-store-select__map__selected_store';\n const storeName: string | undefined = selectedStore?.OrgUnitAvailability?.OrgUnitLocation?.OrgUnitName;\n const location = selectedStore?.OrgUnitAvailability?.OrgUnitLocation;\n const distanceAsString: string | undefined = buildDistanceString(location?.Distance, preferredDistanceUnit, isLocationDisabled);\n\n const resourceLabel = isInStock ? resources.inStock : resources.outOfStock;\n const stockLabel = stockStatusLabel ? stockStatusLabel : undefined;\n // eslint-disable-next-line no-nested-ternary -- Required to check stock Label\n const stockText: string | undefined = shouldHideStockStatus ? undefined : stockLabel ? stockLabel : resourceLabel;\n const canSelectLocation = !shouldHideStockStatus && isInStock;\n const pickupInStoreButtonText: string = resources.selectLocation;\n const pickupInStoreAriaLabel: string = resources.selectLocationAriaLabelFormat.replace('{StoreName}', storeName ?? '');\n const isPreferredStore = preferredStoreLocationId === location?.OrgUnitNumber;\n const payLoad: IPayLoad = getPayloadObject('click', telemetryContent!, TelemetryConstant.PickupInStore);\n const attributes = getTelemetryAttributes(telemetryContent!, payLoad);\n payLoad.contentAction.etext = TelemetryConstant.PreferredStore;\n const preferredStoreAttributes = getTelemetryAttributes(telemetryContent!, payLoad);\n payLoad.contentAction.etext = TelemetryConstant.RemovePreferredStore;\n const removePreferredStoreAttributes = getTelemetryAttributes(telemetryContent!, payLoad);\n const deliveryOptionList = matchDeliveryOptions(productPickUpOptionList, storePickUpOptionList);\n\n const viewProps: ISelectedStoreViewProps = {\n selectedStore,\n isCurrentLocation,\n canSelectLocation,\n isPreferredStore,\n resources,\n deliveryOptions: deliveryOptionList,\n storeDetailsMain: {\n tag: 'div' as NodeTag,\n className: `${parentClassName}__main`\n },\n storeHeader: {\n tag: 'div' as NodeTag,\n className: `${parentClassName}__header`\n },\n storeName: {storeName},\n storeDetailsCloseButton: \n ),\n pickupModes: renderPickupModes(props, deliveryOptionList, pickupInStoreButtonText, pickupInStoreAriaLabel),\n preferredStoreButton: isPreferredStoreEnabled ? (\n \n {resources.preferredStoreText}\n \n ) : null,\n removePreferredStoreButton: isPreferredStoreEnabled ? (\n \n {resources.setAsPreferredStoreText}\n \n ) : null,\n handlers: {\n onSelected: props.handlers.onSelected,\n onSetAsPreferredStore: props.handlers.onSetAsPreferredStore,\n onRemovePreferredStore: props.handlers.onRemovePreferredStore,\n closeStoreDetailsModal: props.handlers.closeStoreDetailsModal\n }\n };\n\n return viewProps;\n};\n\n/**\n * Store location line item component.\n */\nexport const SelectedStoreComponent = selectedStoreDetails as (props: ISelectedStoreProps) => ISelectedStoreViewProps;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\n/// \n\nimport * as Msdyn365 from '@msdyn365-commerce/core';\nimport { DeliveryOption, ItemAvailability, OrgUnitLocation, StoreHours } from '@msdyn365-commerce/retail-proxy';\nimport { IStoreInfo, IStoreSelectionStateContext } from '@msdyn365-commerce-modules/bopis-utilities';\nimport {\n ArrayExtensions,\n getFullAvailableInventoryNearby,\n GetFullAvailableInventoryNearbyInput,\n getOrgUnitLocationsByArea,\n GetOrgUnitLocationsByAreaInput,\n IFullOrgUnitAvailability\n} from '@msdyn365-commerce-modules/retail-actions';\nimport {\n getTelemetryObject,\n IModuleProps,\n INodeProps,\n isMobile,\n ITelemetryContent,\n Modal,\n ModalBody,\n ModalFooter,\n ModalHeader,\n NodeTag,\n VariantType\n} from '@msdyn365-commerce-modules/utilities';\nimport classname from 'classnames';\nimport { reaction, when } from 'mobx';\nimport { observer } from 'mobx-react';\nimport * as React from 'react';\n\nimport {\n StoreSelectorEmptyMessage,\n StoreSelectorFoundLocationsMessage,\n StoreSelectorLocationLines,\n StoreSelectorSearchForm,\n StoreSelectorTermsOfService,\n StoreSelectorWaiting\n} from './components';\nimport { ISelectedStoreProps, ISelectedStoreViewProps, SelectedStoreComponent } from './components/selected-store/selected-store';\nimport { buildStoreHours, IHoursDisplayInfo, secondsToTime } from './components/store-selector-location-line-item/date-time-helpers';\nimport { IStoreSelectorData } from './store-selector.data';\nimport {\n IStoreSelectorProps,\n IStoreSelectorResources,\n mode as modeEnum,\n searchRadiusUnit as SearchRadiusUnit,\n style as styleEnum\n} from './store-selector.props.autogenerated';\n\n/**\n * StoreSelector State Interface.\n */\nexport interface IStoreSelectorState {\n isSearchInProgress: boolean;\n searchTerm?: string;\n isSeeAllStoreValue: boolean;\n isLocationDisabled?: boolean;\n filteredPickupMode?: string;\n}\n\n/**\n * StoreSelector View Props Interface.\n */\nexport interface IStoreSelectorViewProps extends IStoreSelectorProps {\n state: IStoreSelectorState;\n\n // Containers:\n ModuleProps: IModuleProps;\n BodyContainerProps: INodeProps;\n FooterContainerProps: INodeProps;\n HeaderContainerProps: INodeProps;\n HeaderProps?: React.ReactNode;\n\n // Components\n locationsMessage?: React.ReactNode;\n search?: React.ReactNode;\n spinner?: React.ReactNode;\n locationsList?: React.ReactNode;\n selectedLocation?: ISelectedStoreViewProps;\n noLocationsMessage?: React.ReactNode;\n terms?: React.ReactNode;\n headerText?: React.ReactNode;\n sortLocations?: IFullOrgUnitAvailability[];\n locationListProps?: IStoreSelectorLocationLineItemProps[];\n bodyWrapperProps?: INodeProps;\n storeResultContainerProps?: INodeProps;\n mapContainerProps?: INodeProps;\n maps?: React.ReactNode;\n isMobileView?: boolean;\n storeDetailsModal?: INodeProps;\n\n callbacks: {\n closeDialog(): Promise;\n searchTermChanged(searchTerm: string): Promise;\n performSearch(searchTerm: string): Promise;\n selectedLocation(location: OrgUnitLocation | undefined): Promise;\n getAndUpdateUserLocation(): Promise;\n attachMapAutoSuggest(): Promise;\n onSuggestionSelected(result: Microsoft.Maps.ISuggestionResult): Promise;\n setPreferredStore(storeId: string | undefined): Promise;\n removePreferredStore(): Promise;\n setSelectedStore(storeId: string | undefined): Promise;\n setOrgUnitStoreInformation(location: OrgUnitLocation | undefined): Promise;\n };\n}\n\n/**\n * StoreSelectorLocation Line Resources Interface.\n */\nexport interface IStoreSelectorLocationLineItemResources {\n contactInfoHeader: string;\n storeHoursHeader: string;\n availabilityInfoHeader: string;\n closedText: string;\n outOfStock: string;\n inStock: string;\n currentLocation: string;\n selectLocation: string;\n selectLocationAriaLabelFormat: string;\n setAsPreferredStoreText: string;\n setAsPreferredStoreTextAriaLabel: string;\n preferredStoreText: string;\n preferredStoreAriaLabel: string;\n\n days: {\n monday: string;\n tuesday: string;\n wednesday: string;\n thursday: string;\n friday: string;\n saturday: string;\n sunday: string;\n mondayFull: string;\n tuesdayFull: string;\n wednesdayFull: string;\n thursdayFull: string;\n fridayFull: string;\n saturdayFull: string;\n sundayFull: string;\n };\n}\n\n/**\n * ILocationHours Interface.\n */\nexport interface ILocationHours {\n openFrom?: string;\n openTo?: string;\n}\n\n/**\n * StoreSelectorLocation Line Item Props Interface.\n */\nexport interface IStoreSelectorLocationLineItemProps {\n location: OrgUnitLocation;\n storeHours?: StoreHours;\n storeHoursList?: IHoursDisplayInfo[];\n\n hideStockStatus?: boolean;\n isInStock?: boolean;\n isCurrentLocation?: boolean;\n\n resources: IStoreSelectorLocationLineItemResources;\n stockStatusLabel?: string;\n storeLocatorView?: boolean;\n isPreferredStoreEnabled?: boolean;\n index: string;\n preferredStoreLocationId: string | null;\n storePickUpOptionList?: DeliveryOption[];\n productPickUpOptionList?: DeliveryOption[];\n selectedStoreLocationId?: string;\n locationOpen?: ILocationHours;\n\n /**\n * The telemetry content.\n */\n telemetryContent?: ITelemetryContent;\n preferredDistanceUnit: string;\n isLocationDisabled?: boolean;\n handlers: {\n onSelected(location: OrgUnitLocation, deliveryMode?: string): void;\n onSetAsPreferredStore(locationId: string | undefined): void;\n onRemovePreferredStore(): void;\n closeStoreDetailsModal(): Promise;\n };\n onClick: (locationId: string | undefined) => void;\n}\n\n/**\n *\n * Pick Up In Store module.\n * @extends React.Component>}\n */\n@observer\nclass StoreSelector extends React.Component, IStoreSelectorState> {\n private autoSuggestManager: Microsoft.Maps.AutosuggestManager | undefined;\n\n private readonly telemetryContent: ITelemetryContent;\n\n private storeCounter: number;\n\n private isPreferredStoreEnabled?: boolean;\n\n public constructor(props: IStoreSelectorProps) {\n super(props);\n // eslint-disable-next-line react/no-unused-state -- State is used in the view.\n this.state = { isSearchInProgress: true, searchTerm: '', isSeeAllStoreValue: false, filteredPickupMode: undefined };\n this.telemetryContent = getTelemetryObject(\n this.props.context.request.telemetryPageName!,\n this.props.friendlyName,\n this.props.telemetry\n );\n this.storeCounter = 0;\n }\n\n public async componentDidMount(): Promise {\n const {\n context: {\n actionContext: {\n requestContext: { channel }\n }\n },\n config: { autoSuggestionEnabled: isAutoSuggestionEnabled }\n } = this.props;\n\n // Adding Timeout to make sure it loads the data based upon the preferred store.\n setTimeout(() => {\n this._getAndUpdateStoreLocation();\n }, 0);\n\n reaction(\n () => this.props.data.storeSelectorStateManager.result?.isDialogOpen,\n async () => {\n const context = this.props.data.storeSelectorStateManager.result?.context;\n if (context?.id === this.props.id) {\n this._getAndUpdateStoreLocation();\n }\n }\n );\n\n reaction(\n () => this.props.data.storeSelectorStateManager.result?.context?.id,\n async () => {\n const context = this.props.data.storeSelectorStateManager.result?.context;\n if (!context || context.id === this.props.id) {\n await this._searchTermChanged('');\n this._getAndUpdateStoreLocation();\n }\n }\n );\n\n if (this.props.data.storeSelectorStateManager.result?.loadMapApi) {\n await this.props.data.storeSelectorStateManager.result.loadMapApi({\n key: channel?.BingMapsEnabled ? channel.BingMapsApiKey : '',\n lang: this.props.context.actionContext.requestContext.locale,\n market: this.props.context?.actionContext?.requestContext?.channel?.ChannelCountryRegionISOCode\n });\n }\n\n reaction(\n () => this.props.data.storeSelectorStateManager.result?.loadMapApi,\n () => {\n this.props.data.storeSelectorStateManager.result?.loadMapApi({\n key: channel?.BingMapsEnabled ? channel.BingMapsApiKey : '',\n lang: this.props.context.actionContext.requestContext.locale,\n market: this.props.context.actionContext.requestContext.channel?.ChannelCountryRegionISOCode\n });\n }\n );\n\n reaction(\n () => this.props.data.availabilitiesWithHours.result,\n async () => {\n if (this.props.data.storeSelectorStateManager.result?.isDialogOpen) {\n const storeLocationList = this.props.data.availabilitiesWithHours.result;\n if (storeLocationList) {\n await this._setOrgUnitStoreInformation(storeLocationList);\n }\n }\n }\n );\n\n if (isAutoSuggestionEnabled) {\n when(\n () => {\n const isMapApiLoaded = !!this.props.data.storeSelectorStateManager.result?.isMapApiLoaded;\n const isDialogOpen = !!this.props.data.storeSelectorStateManager.result?.isDialogOpen;\n const isSameContext = this.props.data.storeSelectorStateManager.result?.context?.id === this.props.id;\n return isMapApiLoaded && isDialogOpen && isSameContext;\n },\n () => {\n setTimeout(async () => {\n await this._attachMapAutoSuggest();\n }, 0);\n }\n );\n }\n }\n\n public shouldComponentUpdate(): boolean {\n const {\n data: {\n storeSelectorStateManager: { result: storeSelectorStateManager }\n }\n } = this.props;\n const context = storeSelectorStateManager ? storeSelectorStateManager.context : undefined;\n if (context && context.id === this.props.id) {\n return true;\n }\n return false;\n }\n\n // eslint-disable-next-line complexity -- disabling the complexity for this method for now as its causing lot of other warnings\n public render(): JSX.Element {\n const {\n config: {\n termsOfServiceLink,\n className,\n heading,\n mode,\n style,\n setAsPreferredStore: shouldSetAsPreferredStore,\n showAllStores: shouldShowAllStores,\n lookupRadius,\n enablePickupFilterToShowStore: hasEnablePickupFilterToShowStore,\n searchRadiusUnit\n },\n context: {\n telemetry,\n app: { config: appConfig },\n actionContext: {\n requestContext: { channel, cookies }\n }\n },\n slots: { maps: mapSlot },\n resources,\n data: {\n availabilitiesWithHours: { result: availabilitiesWithHours },\n storeSelectorStateManager: { result: storeSelectorStateManager },\n storeLocations: { result: storeLocations }\n }\n } = this.props;\n\n this.storeCounter = 0;\n const isMobileDevice = isMobile({ variant: VariantType.Viewport, context: this.props.context.request }) === 'xs';\n const isMapDisabled = !(channel?.BingMapsApiKey && channel.BingMapsEnabled);\n const context = storeSelectorStateManager ? storeSelectorStateManager.context : undefined;\n const isDialogOpen: boolean = storeSelectorStateManager\n ? storeSelectorStateManager.isDialogOpen && context?.id === this.props.id\n : false;\n const styleDefault = style !== undefined ? style : styleEnum.dialog;\n const modeDefault = mode !== undefined ? mode : modeEnum.pickupInStore;\n const isInlineView = styleDefault === styleEnum.inline;\n const isLocatorView = modeDefault === modeEnum.findStores;\n const shouldHideInventory = isLocatorView;\n const selectedStoreLocationId = storeSelectorStateManager?.selectedStoreLocationId;\n const preferredStore: IStoreInfo | undefined = storeSelectorStateManager?.preferredStore;\n const shouldDisplayList = storeSelectorStateManager?.listMapViewState?.displayList;\n this.isPreferredStoreEnabled = shouldSetAsPreferredStore && cookies?.isConsentGiven();\n const canShowLocationView =\n context && (context.showMapViewLink === undefined || context.showMapViewLink) && storeSelectorStateManager?.isMapModuleLoaded;\n\n const storeSelectorActions = {\n async toggleListMapViewState(): Promise {\n await storeSelectorStateManager?.toggleListMapViewState();\n }\n };\n\n if (!channel?.BingMapsApiKey) {\n telemetry.error('BingMapsApiKey is missing.');\n }\n\n const configHeading = heading ? heading : isLocatorView ? resources.storeLocatorHeaderText : resources.storeSelectorHeaderText;\n const preferredDistanceUnit =\n searchRadiusUnit === SearchRadiusUnit.kilometers ? resources.kilometersShortText : resources.milesShortText;\n const preferredLocationId = preferredStore?.StoreId ? preferredStore.StoreId : '';\n let storeLocationList: IFullOrgUnitAvailability[] | undefined = shouldHideInventory ? storeLocations : availabilitiesWithHours;\n\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unsafe-assignment -- Reading value from app config.\n const isEnableOutofStock: boolean = appConfig?.enableStockCheck || false;\n const alreadySelectedLocation = context ? context.alreadySelectedLocation : undefined;\n const productPickUpOptionList = storeSelectorStateManager?.context?.deliveryOptions?.DeliveryOptions;\n if (this.state.filteredPickupMode && storeLocationList) {\n storeLocationList = this.onFilterLocations(storeLocationList, this.state.filteredPickupMode);\n }\n\n let sortLocation = null;\n if (storeLocationList) {\n sortLocation = this._sortStores(storeLocationList, this.isPreferredStoreEnabled, preferredLocationId);\n }\n\n const locationListProps = this._getStoreLocationListProps(\n isEnableOutofStock,\n isLocatorView,\n preferredLocationId,\n this.isPreferredStoreEnabled,\n selectedStoreLocationId,\n sortLocation ?? null,\n preferredDistanceUnit,\n alreadySelectedLocation,\n productPickUpOptionList\n );\n\n const hasMapSlot = ArrayExtensions.hasElements(mapSlot);\n const dialogClassName = hasMapSlot ? 'ms-store-select__map' : '';\n const viewProps: IStoreSelectorViewProps = {\n ...(this.props as IStoreSelectorProps),\n state: this.state,\n maps: hasMapSlot ? mapSlot[0] : undefined,\n\n ModuleProps: {\n tag: isInlineView ? ('div' as NodeTag) : Modal,\n moduleProps: this.props,\n className: classname(\n `ms-store-${isInlineView ? 'locate' : 'select'}`,\n className,\n dialogClassName,\n isInlineView ? '' : 'msc-modal-input-required'\n ),\n autoFocus: true,\n fade: true,\n isOpen: isDialogOpen,\n 'aria-label': configHeading,\n onClosed: this._closeDialog,\n horizontalPosition: 'center',\n verticalPosition: 'center',\n toggle: this._closeDialog\n },\n isMobileView: isMobileDevice,\n HeaderContainerProps: {\n tag: isInlineView ? ('div' as NodeTag) : ModalHeader,\n className: `ms-store-select__${isInlineView ? 'header' : 'modal-header'}`,\n toggle: this._closeDialog\n },\n HeaderProps: configHeading && (\n \n ),\n FooterContainerProps: {\n tag: isInlineView ? ('div' as NodeTag) : ModalFooter,\n className: `ms-store-select__${isInlineView ? 'footer' : 'modal-footer'} ${!shouldDisplayList ? 'map-only-view' : ''}`\n },\n BodyContainerProps: {\n tag: isInlineView ? ('div' as NodeTag) : ModalBody,\n className: `ms-store-select__${isInlineView ? 'body' : 'modal-body'}`\n },\n bodyWrapperProps: {\n tag: 'div' as NodeTag,\n className: 'ms-store-select__body_wrapper'\n },\n storeResultContainerProps: {\n tag: 'div' as NodeTag,\n className: 'ms-store-select__store_container'\n },\n mapContainerProps: {\n tag: 'div' as NodeTag,\n className: 'ms-store-select__map_container'\n },\n storeDetailsModal: {\n tag: 'div' as NodeTag,\n className: `ms-store-select__map__selected_store__modal ${\n selectedStoreLocationId && isDialogOpen && !shouldDisplayList ? 'show' : 'hide'\n }`\n },\n locationsMessage: !this.state.isLocationDisabled && (\n \n ),\n selectedLocation: this.renderSelectedStore(\n shouldHideInventory,\n preferredDistanceUnit,\n preferredStore,\n this.isPreferredStoreEnabled,\n isEnableOutofStock,\n productPickUpOptionList,\n shouldDisplayList\n ),\n search: (\n \n ),\n spinner: ,\n locationsList: ArrayExtensions.hasElements(storeLocationList) ? (\n \n ) : (\n undefined\n ),\n noLocationsMessage: ,\n terms: (\n \n ),\n\n // Not being used in current context, we can use it here to pass more props.\n headerText: (\n {heading ? heading : isLocatorView ? resources.storeLocatorHeaderText : resources.storeSelectorHeaderText}\n ),\n sortLocations: sortLocation,\n locationListProps,\n callbacks: {\n searchTermChanged: this._searchTermChanged,\n performSearch: this._performSearch,\n closeDialog: this._closeDialog,\n selectedLocation: this._onOrgUnitLocationSelected,\n getAndUpdateUserLocation: async () => {\n this._getAndUpdateStoreLocation();\n return Promise.resolve();\n },\n attachMapAutoSuggest: this._attachMapAutoSuggest,\n onSuggestionSelected: this._onOrgUnitLocationSelected,\n setPreferredStore: this._setPreferredStore,\n removePreferredStore: this._removePreferredStore,\n setSelectedStore: this._setSelectedStore,\n setOrgUnitStoreInformation: this._setOrgUnitStoreInformation\n }\n } as IStoreSelectorViewProps;\n\n return this.props.renderView(viewProps) as React.ReactElement;\n }\n\n /**\n * Render the selected store for the mobile devices.\n * @param shouldHideInventory -- Hide Inventory.\n * @param preferredDistanceUnit -- Preferred Distance Unit.\n * @param preferredStore -- Preferred Store.\n * @param isPreferredStoreEnabled -- Is Preferred Store Enabled.\n * @param hasEnabledOutOfStockCheck -- Stock check is enabled or not.\n * @param productPickUpOptionList -- Product pickup option list.\n * @param shouldDisplayList - Should Display list.\n * @returns -- Returns the view props.\n */\n public renderSelectedStore = (\n shouldHideInventory: boolean,\n preferredDistanceUnit: string,\n preferredStore: IStoreInfo | undefined,\n isPreferredStoreEnabled: boolean | undefined,\n hasEnabledOutOfStockCheck: boolean,\n productPickUpOptionList?: DeliveryOption[],\n shouldDisplayList?: boolean\n ): ISelectedStoreViewProps | undefined => {\n const {\n resources,\n data: {\n availabilitiesWithHours: { result: availabilitiesWithHours },\n storeSelectorStateManager: { result: storeSelectorStateManager },\n storeLocations: { result: storeLocations }\n }\n } = this.props;\n\n const context = storeSelectorStateManager ? storeSelectorStateManager.context : undefined;\n const selectedStoreLocationId = storeSelectorStateManager?.selectedStoreLocationId;\n const selectedStore = (shouldHideInventory ? storeLocations : availabilitiesWithHours)?.find(\n store => store.OrgUnitAvailability?.OrgUnitLocation?.OrgUnitNumber === selectedStoreLocationId\n );\n const orgUnitLocation = selectedStore?.OrgUnitAvailability?.OrgUnitLocation;\n const selectedStoreResources = this._mapResources(resources);\n\n if (!shouldDisplayList && selectedStore) {\n const selectedProps: ISelectedStoreProps = {\n shouldHideStockStatus: shouldHideInventory,\n isCurrentLocation: this._isCurrentLocation(orgUnitLocation, context?.alreadySelectedLocation),\n isInStock: this._isProductInStock(hasEnabledOutOfStockCheck, selectedStore.OrgUnitAvailability?.ItemAvailabilities),\n selectedStore,\n resources: selectedStoreResources,\n stockStatusLabel: this._stockInventoryLabel(selectedStore),\n preferredStoreLocationId: preferredStore?.StoreId ? preferredStore.StoreId : '',\n isPreferredStoreEnabled,\n isLocationDisabled: this.state.isLocationDisabled,\n telemetryContent: this.telemetryContent,\n storePickUpOptionList: selectedStore.OrgUnitPickUpDeliveryModes?.DeliveryOptions,\n productPickUpOptionList,\n preferredDistanceUnit,\n handlers: {\n onSelected: this._onOrgUnitLocationSelected,\n onSetAsPreferredStore: this._setPreferredStore,\n onRemovePreferredStore: this._removePreferredStore,\n closeStoreDetailsModal: this._closeStoreDetailModal\n }\n };\n\n return SelectedStoreComponent(selectedProps);\n }\n\n return undefined;\n };\n\n /**\n * Method to be called on link text change.\n * @param event -Content Edit Event.\n */\n public handleLinkTextChange = (event: Msdyn365.ContentEditableEvent): void => {\n if (this.props.config.termsOfServiceLink) {\n this.props.config.termsOfServiceLink.linkText = event.target.value;\n }\n };\n\n /**\n * Method to be called on heading change.\n * @param event -Content Edit Event.\n */\n public handleHeadingChange = (event: Msdyn365.ContentEditableEvent): void => {\n this.props.config.heading = event.target.value;\n };\n\n /**\n * Show all stores handler function.\n */\n private readonly onShowAllStoresHandler = () => {\n this._getAndUpdateStoreLocation(true);\n this.setState({ filteredPickupMode: undefined });\n };\n\n /**\n * Method to be called for filtered the store location based on the filter selected by the user.\n * @param stores -All the stores from the API.\n * @param filteredPickupMode -Filter selected by the user.\n * @returns -Filtered stores.\n */\n private readonly onFilterLocations = (stores: IFullOrgUnitAvailability[], filteredPickupMode: string) => {\n return stores.filter(location => {\n return location.OrgUnitPickUpDeliveryModes?.DeliveryOptions?.some(deliveryOption => {\n return deliveryOption.Code === filteredPickupMode;\n });\n });\n };\n\n /**\n * Filter Store by pickup mode.\n * @param deliveryCode -Delivery Code.\n */\n private readonly onFilteredPickupMode = (deliveryCode: string) => {\n this.setState({ filteredPickupMode: deliveryCode });\n };\n\n /**\n * Method will sort all stores.\n * @param stores -Stores List.\n * @param isPreferredStoreEnabled -Module config value.\n * @param preferredStoreLocationId -Store Id.\n * @returns List of Stores.\n */\n // eslint-disable-next-line class-methods-use-this -- No need of introducing new variable.\n private _sortStores(\n stores: IFullOrgUnitAvailability[],\n isPreferredStoreEnabled: boolean | undefined,\n preferredStoreLocationId: string\n ): IFullOrgUnitAvailability[] {\n const isPreferredStore = (value: IFullOrgUnitAvailability) =>\n isPreferredStoreEnabled &&\n preferredStoreLocationId &&\n value.OrgUnitAvailability?.OrgUnitLocation?.OrgUnitNumber === preferredStoreLocationId;\n\n return [...stores.filter(isPreferredStore), ...stores.filter(store => !isPreferredStore(store))];\n }\n\n /**\n * Method will list of store selector location line.\n * @param hasEnabledOutOfStockCheck -Stores List.\n * @param isStoreLocatorView -Module config value.\n * @param preferredStoreLocationId -Store Id.\n * @param isPreferredStoreEnabled -Stores List.\n * @param selectedStoreLocationId -Module config value.\n * @param stores -Store Id.\n * @param preferredDistanceUnit -Module config value.\n * @param alreadySelectedLocation -Already Selected Location.\n * @param productPickUpOptionList -Product supported Pickup Modes List.\n * @returns List of StoreSelectorLocation Line.\n */\n private _getStoreLocationListProps(\n hasEnabledOutOfStockCheck: boolean,\n isStoreLocatorView: boolean,\n preferredStoreLocationId: string,\n isPreferredStoreEnabled: boolean | undefined,\n selectedStoreLocationId: string | undefined,\n stores: IFullOrgUnitAvailability[] | null,\n preferredDistanceUnit?: string | undefined,\n alreadySelectedLocation?: OrgUnitLocation,\n productPickUpOptionList?: DeliveryOption[]\n ): IStoreSelectorLocationLineItemProps[] {\n const storeList: IStoreSelectorLocationLineItemProps[] = [];\n if (ArrayExtensions.hasElements(stores)) {\n stores.map((store, index: number) => {\n const storeLineProps = this._createStoreLocationList(\n store,\n index,\n hasEnabledOutOfStockCheck,\n isStoreLocatorView,\n preferredStoreLocationId,\n isPreferredStoreEnabled,\n selectedStoreLocationId,\n preferredDistanceUnit,\n alreadySelectedLocation,\n productPickUpOptionList\n );\n if (storeLineProps) {\n storeList.push(storeLineProps);\n }\n });\n }\n return storeList;\n }\n\n /**\n * Initialize Map AutoSuggest.\n */\n private readonly _attachMapAutoSuggest = async (): Promise => {\n const {\n config: { autoSuggestOptions },\n context: {\n telemetry,\n actionContext: {\n requestContext: { channel }\n }\n },\n data: {\n storeSelectorStateManager: { result: storeSelectorStateManager }\n }\n } = this.props;\n\n if (storeSelectorStateManager?.isMapApiLoaded && !this.autoSuggestManager) {\n Microsoft.Maps.loadModule('Microsoft.Maps.AutoSuggest', {\n /**\n * Callback for the autosuggest API.\n */\n callback: () => {\n const options = { ...autoSuggestOptions, countryCode: channel?.ChannelCountryRegionISOCode };\n this.autoSuggestManager = new Microsoft.Maps.AutosuggestManager(options);\n this.autoSuggestManager.attachAutosuggest(\n `#ms-store-select__search-box_${this.props.id}`,\n `#ms-store-select__search-box-container_${this.props.id}`,\n this._onSuggestionSelected\n );\n },\n\n /**\n * Error call back for autosuggest API.\n */\n errorCallback: () => {\n if (telemetry) {\n telemetry.debug('Unable to attach map auto suggest.');\n }\n },\n credentials: channel?.BingMapsApiKey\n });\n }\n };\n\n /**\n * On Selecting Location Suggestion.\n * @param result - Map Suggestions List.\n */\n private readonly _onSuggestionSelected = async (result: Microsoft.Maps.ISuggestionResult): Promise => {\n const context = this.props.data.storeSelectorStateManager.result?.context;\n if (context && context.id === this.props.id) {\n await this._searchTermChanged(result.formattedSuggestion);\n await this._performSearch(result.formattedSuggestion);\n }\n };\n\n /**\n * On Selecting Preferred Store.\n * @param storeId - Store Id.\n */\n private readonly _setPreferredStore = async (storeId: string | undefined): Promise => {\n if (!storeId) {\n return;\n }\n\n const {\n context: {\n actionContext: {\n requestContext: { cookies }\n }\n },\n config: { mode },\n data: {\n storeSelectorStateManager: { result: storeSelectorStateManager },\n storeLocations: { result: storeLocations },\n availabilitiesWithHours: { result: availabilitiesWithHours }\n }\n } = this.props;\n\n if (!storeSelectorStateManager) {\n return;\n }\n const modeDefault = mode !== undefined ? mode : modeEnum.pickupInStore;\n\n let stores: IFullOrgUnitAvailability[];\n if (modeDefault === modeEnum.findStores && storeLocations) {\n stores = storeLocations;\n } else {\n stores = availabilitiesWithHours!;\n }\n\n const preferredStore = stores.find(store => store.OrgUnitAvailability?.OrgUnitLocation?.OrgUnitNumber === storeId);\n\n await storeSelectorStateManager.setPreferredStoreLocation(\n storeId,\n preferredStore?.OrgUnitAvailability?.OrgUnitLocation?.OrgUnitName,\n cookies.isConsentGiven(),\n preferredStore?.OrgUnitAvailability?.OrgUnitLocation?.Latitude,\n preferredStore?.OrgUnitAvailability?.OrgUnitLocation?.Longitude\n );\n };\n\n /**\n * On Removing Preferred Store.\n */\n private readonly _removePreferredStore = async (): Promise => {\n const {\n context: {\n actionContext: {\n requestContext: { cookies }\n }\n },\n data: {\n storeSelectorStateManager: { result: storeSelectorStateManager }\n }\n } = this.props;\n\n if (!storeSelectorStateManager) {\n return;\n }\n\n await storeSelectorStateManager.clearPreferredStore(cookies.isConsentGiven());\n };\n\n /**\n * Method called to close the store details modal that comes up on clicking the pushpin.\n * @returns Void promise.\n */\n private readonly _closeStoreDetailModal = async (): Promise => {\n const storeSelectorStateManager = this.props.data.storeSelectorStateManager.result;\n await storeSelectorStateManager?.setSelectedStoreLocationId(undefined);\n };\n\n /**\n * On Selecting Store for pickup.\n * @param storeId - Store Id.\n */\n private readonly _setSelectedStore = async (storeId: string | undefined): Promise => {\n const {\n data: {\n storeSelectorStateManager: { result: storeSelectorStateManager }\n }\n } = this.props;\n\n if (!storeSelectorStateManager) {\n return;\n }\n\n await storeSelectorStateManager.setSelectedStoreLocationId(storeId);\n };\n\n /**\n * Method to be called on search.\n * @param searchTerm - Search string.\n */\n private readonly _performSearch = async (searchTerm: string): Promise => {\n const {\n context: { actionContext },\n data: {\n storeSelectorStateManager: { result: storeSelectorStateManager }\n }\n } = this.props;\n\n if (!searchTerm || !storeSelectorStateManager) {\n return;\n }\n\n // eslint-disable-next-line react/no-unused-state -- State is used in the view.\n this.setState({ isSearchInProgress: true, isSeeAllStoreValue: false });\n\n const location = await storeSelectorStateManager.geoLocate(searchTerm.trim() !== '' ? searchTerm : '0', actionContext);\n\n if (location) {\n await this._updateLocations(location.latitude, location.longitude);\n } else {\n await this._updateLocations();\n }\n\n // eslint-disable-next-line react/no-unused-state -- State is used in the view.\n this.setState({ isSearchInProgress: false });\n };\n\n /**\n * Method to be called on search term changed.\n * @param searchTerm - Search string.\n */\n private readonly _searchTermChanged = async (searchTerm: string): Promise => {\n this.setState({ searchTerm });\n };\n\n /**\n * Method to be called updating the store location.\n * @param shouldShowAllStores - Flag to show all stores.\n */\n private readonly _getAndUpdateStoreLocation = (shouldShowAllStores?: boolean): void => {\n const {\n config: { style },\n data: {\n storeSelectorStateManager: { result: storeSelectorStateManager }\n }\n } = this.props;\n\n const styleDefault = style !== undefined ? style : styleEnum.dialog;\n\n if (styleDefault !== styleEnum.inline && (!storeSelectorStateManager || !storeSelectorStateManager.isDialogOpen)) {\n // Store selector dialog isn't open yet, so don't try and update anything\n return;\n }\n\n // eslint-disable-next-line react/no-unused-state -- State is used in the view.\n this.setState({ isSearchInProgress: true, isSeeAllStoreValue: false });\n\n if (navigator?.geolocation) {\n navigator.geolocation.getCurrentPosition(\n async position => {\n // eslint-disable-next-line react/no-unused-state -- This state is used in the views.\n this.setState({ isLocationDisabled: false, isSearchInProgress: true });\n if (shouldShowAllStores) {\n this.setState({ isSeeAllStoreValue: true });\n await this._searchTermChanged('');\n await this._updateLocations(position.coords.latitude, position.coords.longitude, 0);\n } else {\n await this._updateLocations(position.coords.latitude, position.coords.longitude);\n }\n\n // eslint-disable-next-line react/no-unused-state -- State is used in the view.\n this.setState({ isSearchInProgress: false });\n },\n async error => {\n // If the location setting is turned off\n if (error.PERMISSION_DENIED) {\n this.setState({ isLocationDisabled: true, isSeeAllStoreValue: true });\n await this._searchTermChanged('');\n await this._updateLocations(0, 0, 0);\n }\n\n // eslint-disable-next-line react/no-unused-state -- State is used in the view.\n this.setState({ isSearchInProgress: false });\n },\n { timeout: 5000 }\n );\n } else {\n // eslint-disable-next-line react/no-unused-state -- State is used in the view.\n this.setState({ isSearchInProgress: false });\n }\n };\n\n /**\n * Method to be called closing the store selector dialog.\n * @returns Void promise.\n */\n private readonly _closeDialog = async (): Promise => {\n const {\n data: {\n storeSelectorStateManager: { result: storeSelectorStateManager }\n }\n } = this.props;\n\n this.setState({ searchTerm: '' });\n\n if (storeSelectorStateManager) {\n storeSelectorStateManager.context?.parentElementRef?.current?.focus();\n return storeSelectorStateManager.closeDialog();\n }\n };\n\n /**\n * Method to set store info.\n * @param orgUnitStoreInformation - Store Info Object.\n * @returns Void promise.\n */\n private readonly _setOrgUnitStoreInformation = async (orgUnitStoreInformation: IFullOrgUnitAvailability[]): Promise => {\n const {\n data: {\n storeSelectorStateManager: { result: storeSelectorStateManager }\n },\n config: { style },\n telemetry\n } = this.props;\n\n if (!storeSelectorStateManager) {\n return;\n }\n\n const context = storeSelectorStateManager.context;\n const moduleId: string = context?.id ? context.id : this.props.id;\n const styleDefault = style !== undefined ? style : styleEnum.dialog;\n let input: IStoreSelectionStateContext = {\n /**\n * On Location selected.\n * @returns - Returns promise.\n */\n onLocationSelected: async () => {\n // TO-DO handle event for when location in selected\n return Promise.resolve();\n }\n };\n\n if (storeSelectorStateManager.context) {\n input = storeSelectorStateManager.context;\n }\n\n const preferredStore: IStoreInfo | undefined = storeSelectorStateManager.preferredStore;\n const preferredLocationId = preferredStore?.StoreId ? preferredStore.StoreId : '';\n const storeLocationList = this._sortStores(orgUnitStoreInformation, this.isPreferredStoreEnabled, preferredLocationId);\n\n input = {\n ...input,\n id: moduleId,\n showMapViewLink: context?.showMapViewLink,\n parentElementRef: context?.parentElementRef,\n isDialog: styleDefault === styleEnum.dialog,\n orgUnitStoreInformation: storeLocationList,\n product: context?.product\n };\n\n await storeSelectorStateManager.setOrgUnitStoreInformation(input).catch((error: Error) => {\n if (telemetry) {\n telemetry.error(error.message);\n telemetry.debug('Unable to Update store location state');\n }\n });\n };\n\n /**\n * Method to update user location.\n * @param latitude - User location.\n * @param longitude - User location.\n * @param radius - Search Criteria Radius.\n * @returns Void promise.\n */\n private readonly _updateLocations = async (latitude?: number, longitude?: number, radius?: number): Promise => {\n const {\n config: { mode, lookupRadius, style, searchRadiusUnit },\n data: {\n storeSelectorStateManager: { result: storeSelectorStateManager }\n }\n } = this.props;\n\n const styleDefault = style !== undefined ? style : styleEnum.dialog;\n const calRadius = radius || radius === 0 ? radius : lookupRadius || 50;\n const distanceUnitValue = searchRadiusUnit === SearchRadiusUnit.kilometers ? 1 : 0;\n const modeDefault = mode !== undefined ? mode : modeEnum.pickupInStore;\n const preferredStore: IStoreInfo | undefined = storeSelectorStateManager?.preferredStore;\n let localLatitude = this.state.searchTerm || !preferredStore?.Latitude ? latitude : preferredStore.Latitude;\n let long = this.state.searchTerm || !preferredStore?.Longitude ? longitude : preferredStore.Longitude;\n if (styleDefault === styleEnum.inline) {\n const lastInlineStoreLocation = storeSelectorStateManager?.lastInlineShownStoreInfo;\n if (lastInlineStoreLocation && !this.state.searchTerm) {\n localLatitude = lastInlineStoreLocation.Latitude ? lastInlineStoreLocation.Latitude : localLatitude;\n long = lastInlineStoreLocation.Longitude ? lastInlineStoreLocation.Longitude : long;\n }\n await storeSelectorStateManager?.setLastInlineStoreInfo(localLatitude, long);\n }\n\n if (modeDefault === modeEnum.findStores) {\n await this.getOrgUnitLocationByArea(calRadius, distanceUnitValue, localLatitude, long);\n return;\n }\n\n await this.getFullAvailableInventoryNearby(calRadius, distanceUnitValue, localLatitude, long);\n };\n\n /**\n * Get org unit location by area.\n * @param calRadius - Radius.\n * @param distanceUnitValue - Distance unit value.\n * @param latitude - Latitude.\n * @param longitude - Longitude.\n * @returns - Returns a void promise.\n */\n private readonly getOrgUnitLocationByArea = async (\n calRadius: number,\n distanceUnitValue: number,\n latitude?: number,\n longitude?: number\n ): Promise => {\n const {\n context: { actionContext }\n } = this.props;\n const orgUnitLocationsInput = new GetOrgUnitLocationsByAreaInput(\n latitude,\n longitude,\n calRadius,\n distanceUnitValue,\n this.state.isLocationDisabled\n );\n\n const orgUnitLocations = await getOrgUnitLocationsByArea(orgUnitLocationsInput, actionContext);\n if (orgUnitLocations) {\n await this._setOrgUnitStoreInformation(orgUnitLocations);\n await this._setSelectedStore(undefined);\n }\n };\n\n /**\n * Get full available inventory nearby.\n * @param calRadius - Radius.\n * @param distanceUnitValue - Distance unit value.\n * @param latitude - Latitude.\n * @param longitude - Longitude.\n * @returns - Returns a void promise.\n */\n private readonly getFullAvailableInventoryNearby = async (\n calRadius: number,\n distanceUnitValue: number,\n latitude?: number,\n longitude?: number\n ): Promise => {\n const {\n telemetry,\n context: { actionContext },\n data: {\n storeSelectorStateManager: { result: storeSelectorStateManager }\n }\n } = this.props;\n\n if (!storeSelectorStateManager || !storeSelectorStateManager.context) {\n // Store selector dialog isn't open yet, so don't try and update anything\n return;\n }\n\n if (!storeSelectorStateManager.context.product) {\n // TODO: Use alternative search method here to not make inventory check\n return;\n }\n\n const input = new GetFullAvailableInventoryNearbyInput(\n storeSelectorStateManager.context.product.RecordId,\n latitude ?? 0,\n longitude ?? 0,\n calRadius,\n distanceUnitValue,\n this.state.isLocationDisabled\n );\n\n await getFullAvailableInventoryNearby(input, actionContext).catch(error => {\n telemetry.warning(error);\n telemetry.error(error.message);\n telemetry.debug('Unable to get full available inventory near by');\n });\n };\n\n /**\n * Method to called on store selected.\n * @param location - Store Info.\n * @param deliveryMode - Pickup mode.\n * @returns Void promise.\n */\n private readonly _onOrgUnitLocationSelected = async (location: OrgUnitLocation | undefined, deliveryMode?: string): Promise => {\n const {\n telemetry,\n data: {\n storeSelectorStateManager: { result: storeSelectorStateManager }\n }\n } = this.props;\n\n if (storeSelectorStateManager) {\n if (location && storeSelectorStateManager.context) {\n // Want to eat exceptions here so that the dialog still closes even if the onLocationSelected call goes wrong\n await storeSelectorStateManager.context.onLocationSelected(location, deliveryMode).catch(error => {\n telemetry.warning(error);\n telemetry.error(error.message);\n telemetry.debug('Unable to get on org unit location selected');\n });\n }\n\n await storeSelectorStateManager.closeDialog();\n }\n };\n\n /**\n * Method will list of store selector location line.\n * @param store -Store Info.\n * @param index - List index.\n * @param hasEnabledOutOfStockCheck -Stores List.\n * @param isStoreLocatorView -Module config value.\n * @param preferredStoreLocationId -Store Id.\n * @param isPreferredStoreEnabled -Stores List.\n * @param selectedStoreLocationId -Module config value.\n * @param preferredDistanceUnit -Module config value.\n * @param alreadySelectedLocation -Already Selected Location.\n * @param productPickUpOptionList -Product supported Pickup Modes List.\n * @returns StoreSelectorLocation Line Prop.\n */\n private _createStoreLocationList(\n store: IFullOrgUnitAvailability,\n index: number,\n hasEnabledOutOfStockCheck: boolean,\n isStoreLocatorView: boolean,\n preferredStoreLocationId: string,\n isPreferredStoreEnabled: boolean | undefined,\n selectedStoreLocationId: string | undefined,\n preferredDistanceUnit?: string | undefined,\n alreadySelectedLocation?: OrgUnitLocation,\n productPickUpOptionList?: DeliveryOption[]\n ): IStoreSelectorLocationLineItemProps | undefined {\n const orgUnitLocation = store.OrgUnitAvailability?.OrgUnitLocation;\n const selectedStoreLocation = selectedStoreLocationId;\n const deliveryOptions = store.OrgUnitPickUpDeliveryModes;\n const lineResources = this._mapResources(this.props.resources);\n const storeOpenFrom: string | undefined = secondsToTime(orgUnitLocation?.OpenFrom);\n const storeOpenTo: string | undefined = secondsToTime(orgUnitLocation?.OpenTo);\n const storeHours = store.StoreHours;\n\n if (orgUnitLocation) {\n ++this.storeCounter;\n return {\n location: orgUnitLocation,\n selectedStoreLocationId: selectedStoreLocation,\n storeHours,\n resources: lineResources,\n preferredDistanceUnit: preferredDistanceUnit!,\n isCurrentLocation: this._isCurrentLocation(orgUnitLocation, alreadySelectedLocation),\n hideStockStatus: !hasEnabledOutOfStockCheck,\n isInStock: this._isProductInStock(hasEnabledOutOfStockCheck, store.OrgUnitAvailability?.ItemAvailabilities),\n stockStatusLabel: this._stockInventoryLabel(store),\n storeLocatorView: isStoreLocatorView,\n index: this.storeCounter.toString(),\n preferredStoreLocationId,\n isPreferredStoreEnabled,\n telemetryContent: this.telemetryContent,\n isLocationDisabled: this.state.isLocationDisabled,\n storePickUpOptionList: deliveryOptions?.DeliveryOptions,\n productPickUpOptionList,\n locationOpen: { openFrom: storeOpenFrom, openTo: storeOpenTo },\n storeHoursList: storeHours?.RegularStoreHours ? buildStoreHours(storeHours.RegularStoreHours, lineResources) : [],\n onClick: this._setSelectedStore,\n handlers: {\n onSelected: this._onOrgUnitLocationSelected,\n onSetAsPreferredStore: this._setPreferredStore,\n onRemovePreferredStore: this._removePreferredStore,\n closeStoreDetailsModal: this._closeStoreDetailModal\n }\n };\n }\n return undefined;\n }\n\n /**\n * Method to map resources with Location Item.\n * @param resources - List of strings for module.\n * @returns Resources for StoreSelector location line.\n */\n private readonly _mapResources = (resources: IStoreSelectorResources): IStoreSelectorLocationLineItemResources => {\n return {\n contactInfoHeader: resources.contactText,\n storeHoursHeader: resources.timeText,\n availabilityInfoHeader: resources.availabilityText,\n\n closedText: resources.storeHoursClosedText,\n outOfStock: resources.outOfStockText,\n inStock: resources.inStockText,\n\n currentLocation: resources.selectedStoreLocationText,\n selectLocation: resources.selectStoreText,\n selectLocationAriaLabelFormat: resources.selectStoreAriaFormatText,\n setAsPreferredStoreText: resources.setAsPreferredStoreText,\n setAsPreferredStoreTextAriaLabel: resources.setAsPreferredStoreTextAriaLabel,\n preferredStoreText: resources.preferredStoreText,\n preferredStoreAriaLabel: resources.preferredStoreAriaLabel,\n\n days: {\n monday: resources.storeHoursMondayText,\n tuesday: resources.storeHoursTuesdayText,\n wednesday: resources.storeHoursWednesdayText,\n thursday: resources.storeHoursThursdayText,\n friday: resources.storeHoursFridayText,\n saturday: resources.storeHoursSaturdayText,\n sunday: resources.storeHoursSundayText,\n mondayFull: resources.storeHoursMondayFullText,\n tuesdayFull: resources.storeHoursTuesdayFullText,\n wednesdayFull: resources.storeHoursWednesdayFullText,\n thursdayFull: resources.storeHoursThursdayFullText,\n fridayFull: resources.storeHoursFridayFullText,\n saturdayFull: resources.storeHoursSaturdayFullText,\n sundayFull: resources.storeHoursSundayFullText\n }\n };\n };\n\n private readonly _isCurrentLocation = (location: OrgUnitLocation | undefined, selectedLocation?: OrgUnitLocation): boolean =>\n (selectedLocation && location && selectedLocation.OrgUnitNumber === location.OrgUnitNumber) || false;\n\n /**\n * Method to get stock.\n * @param hasEnableOutOfStockCheck - Config to check for stock check enabled.\n * @param itemAvailabilities - Item quantity availability.\n * @returns Boolean value for item stock.\n */\n private readonly _isProductInStock = (\n hasEnableOutOfStockCheck: boolean,\n itemAvailabilities: ItemAvailability[] | undefined\n ): boolean => {\n if (!hasEnableOutOfStockCheck) {\n return true;\n }\n const quantityCount = 0;\n if (ArrayExtensions.hasElements(itemAvailabilities)) {\n return itemAvailabilities[0].AvailableQuantity ? itemAvailabilities[0].AvailableQuantity > quantityCount : false;\n }\n\n return false;\n };\n\n /**\n * Method to get stocklevel label.\n * @param isInStock - Stock available in store.\n * @returns Label for stock status.\n */\n private readonly _stockInventoryLabel = (isInStock: IFullOrgUnitAvailability | undefined): string | undefined => {\n if (isInStock?.ProductInventoryInformation && ArrayExtensions.hasElements(isInStock.ProductInventoryInformation)) {\n for (let index = 0; index < isInStock.ProductInventoryInformation.length; index++) {\n if (\n isInStock.OrgUnitAvailability?.OrgUnitLocation?.InventoryLocationId ===\n isInStock.ProductInventoryInformation[index].InventLocationId\n ) {\n return isInStock.ProductInventoryInformation[index].StockLevelLabel;\n }\n }\n }\n\n return undefined;\n };\n}\n\nexport default StoreSelector;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport MsDyn365, { RichTextComponent } from '@msdyn365-commerce/core';\nimport {\n ContactInformationType,\n DeliveryOption,\n IDictionary,\n OrgUnitContact,\n OrgUnitLocation,\n StoreHours\n} from '@msdyn365-commerce/retail-proxy';\nimport { ArrayExtensions, StringExtensions } from '@msdyn365-commerce-modules/retail-actions';\nimport {\n buildStoreHours,\n IHoursDisplayInfo,\n ILocationHours,\n IStoreSelectorFoundLocationsMessage,\n IStoreSelectorLocationLineItemProps,\n IStoreSelectorLocationLineItemResources,\n IStoreSelectorViewProps,\n secondsToTime\n} from '@msdyn365-commerce-modules/store-selector';\nimport { ISelectedStoreViewProps } from '@msdyn365-commerce-modules/store-selector/src/modules/store-selector/components/selected-store/selected-store';\nimport {\n getPayloadObject,\n getTelemetryAttributes,\n getTelemetryObject,\n IPayLoad,\n isMobile,\n Module,\n Node,\n TelemetryConstant,\n VariantType\n} from '@msdyn365-commerce-modules/utilities';\nimport classnames from 'classnames';\nimport * as React from 'react';\n\nimport { IStoreSelectorProps, IStoreSelectorResources } from '../definition-extensions/store-selector.ext.props.autogenerated';\n\n/**\n * PickUpMethodComponent View Props Interface.\n */\nexport interface IPickupComponent extends IStoreSelectorLocationLineItemProps {\n pickUpStatesProps: IStoreSelectorViewProps;\n}\n\nexport interface IPickUpButtonComponent {\n attributes: IDictionary | undefined;\n onPickupInStoreClickHandler?(): void;\n}\n\n/**\n * Found Locations Message component in Store Selector.\n * @param props - The component props.\n * @returns The JSX Element.\n */\nconst StoreSelectorFoundLocationsMessageComponent: React.FC = props => {\n const { locations, searchRadius, resources, isSeeAllStore, preferredDistanceUnit } = props;\n if (locations) {\n const storeCountMessage =\n preferredDistanceUnit === resources.milesShortText ? resources.storeCountMessage : resources.storeCountMessageInKm;\n\n return (\n ${locations.length.toString()}`\n )\n : storeCountMessage\n .replace(\n '{count}',\n `${locations.length.toString()}`\n )\n .replace(\n '{radius}',\n `${searchRadius.toString()}`\n )\n }\n />\n );\n }\n\n return null;\n};\n\n/**\n * Build distance string.\n * @param distance - The distance.\n * @param preferredDistanceUnit - The preferred distance unit.\n * @param resources - The module resources.\n * @param isLocationDisabled - True if location is disabled.\n * @returns The distance string.\n */\nconst buildDistanceString = (\n distance: number | undefined,\n preferredDistanceUnit: string,\n resources: IStoreSelectorResources & IStoreSelectorResources,\n isLocationDisabled?: boolean\n): string | undefined => {\n const closeDistance: number = 1;\n if (distance === undefined || isLocationDisabled) {\n return undefined;\n } else if (distance < closeDistance) {\n const closeDistanceString: string = resources.closeDistanceString;\n return closeDistanceString.replace('{preferredDistanceUnit}', preferredDistanceUnit);\n }\n const distanceAsString: string = resources.distanceString;\n return distanceAsString\n .replace('{preferredDistanceUnit}', preferredDistanceUnit)\n .replace('{distance}', Math.floor(distance).toString());\n};\n\n/**\n * Extract phone number.\n * @param contacts - Contacts array.\n * @returns Phone number.\n */\nconst extractPhoneNumber = (contacts: OrgUnitContact[] | undefined): string | undefined => {\n if (!contacts) {\n return undefined;\n }\n\n const allPhoneContacts = contacts.filter(contact => contact.ContactTypeValue === ContactInformationType.Phone && !contact.IsPrivate);\n\n if (ArrayExtensions.hasElements(allPhoneContacts)) {\n const primaryPhoneContact = allPhoneContacts.find(contact => contact.IsPrimary);\n\n if (primaryPhoneContact) {\n return primaryPhoneContact.Locator;\n }\n\n return allPhoneContacts[0].Locator;\n }\n\n return undefined;\n};\n\n/**\n * Render Store Hours Day.\n * @param displayTime - Store Hours Information.\n * @param storeHoursDayPeriodString - The string for store hours day period.\n * @param storeHoursDayString - The string for store hours day period.\n * @returns JSX element with store hours day.\n */\nconst buildStoreHoursDay = (displayTime: IHoursDisplayInfo, storeHoursDayPeriodString: string, storeHoursDayString: string) => {\n return (\n ${displayTime.startDayShort}`)\n .replace(\n '{endDay}',\n `${displayTime.endDayShort}`\n )\n : storeHoursDayString.replace(\n '{startDay}',\n `${displayTime.startDayShort}`\n )\n }\n />\n );\n};\n\n/**\n * Render Store Hours.\n * @param storeHours - Store hours.\n * @param storeHoursList - Store hours list.\n * @param locationOpen - Location open.\n * @param resources - The module resources.\n * @returns JSX element with store hours.\n */\nconst renderStoreHours = (\n storeHours: StoreHours | undefined,\n storeHoursList: IHoursDisplayInfo[] | undefined,\n locationOpen: ILocationHours | undefined,\n resources: IStoreSelectorResources & IStoreSelectorResources\n): JSX.Element | null => {\n // First, use the store hours. This will allow listing day by day hours\n if (storeHours?.RegularStoreHours) {\n return (\n
\n {storeHoursList?.map(displayTime => (\n
\n {buildStoreHoursDay(displayTime, resources.storeHoursDayPeriod, resources.storeHoursDay)}\n
{displayTime.timeRange}
\n
\n ))}\n
\n );\n }\n\n // If that fails, fall back to using the OpenFrom and OpenTo properties on the location\n const storeOpenFrom: string = locationOpen?.openFrom ? locationOpen.openFrom : '';\n const storeOpenTo: string = locationOpen?.openTo ? locationOpen.openTo : '';\n return (\n
\n {resources.storeHoursDayPeriod.replace('{startDay}', storeOpenFrom).replace('{endDay}', storeOpenTo)}\n
\n );\n};\n\n/**\n * Match delivery options.\n * @param productDeliveryOptions - The list of product delivery options.\n * @param storePickUpOptionList - The list of store pick up options.\n * @returns Matched delivery option.\n */\nconst matchDeliveryOptions = (\n productDeliveryOptions: DeliveryOption[] | undefined,\n storePickUpOptionList: DeliveryOption[] | undefined\n): DeliveryOption[] => {\n if (!productDeliveryOptions) {\n return [] as DeliveryOption[];\n }\n return productDeliveryOptions\n .map(productDeliveryOption => storePickUpOptionList?.find(delivery => delivery.Code === productDeliveryOption.Code))\n .filter(productDeliveryOption => productDeliveryOption) as DeliveryOption[];\n};\n\n/**\n * PickUpMethod Resources Interface.\n */\nexport interface IPickUpButtonResources {\n pickupInStoreAriaLabel: string;\n pickupInStoreButtonText: string;\n pickupDeliveryOptionErrorMessage: string;\n}\n\n/**\n * PickUpMethod Resources Interface.\n */\nexport interface IPickUpMethodResources {\n selectStoreText: string;\n pickUpMethodLabel: string;\n pickUpOptionPlaceholder: string;\n pickupOptionDropdownError: string;\n pickupButtonAriaLabel: string;\n}\n\n/**\n * PickUp method dropdown component.\n * @param props - The view props.\n * @returns JSX Element.\n */\nconst PickUpMethodDropdownComponent = (props: IPickupComponent & IPickUpMethodResources) => {\n const {\n handlers,\n location,\n pickUpStatesProps,\n selectStoreText,\n pickUpMethodLabel,\n pickUpOptionPlaceholder,\n pickupOptionDropdownError,\n pickupButtonAriaLabel,\n productPickUpOptionList,\n storePickUpOptionList\n } = props;\n const deliveryOptionList = matchDeliveryOptions(productPickUpOptionList, storePickUpOptionList);\n const [selectedStorePickUpOption, selectStorePickUpOption] = React.useState('');\n const [currentStorePickUpOption, setCurrentStorePickUpOption] = React.useState(pickUpOptionPlaceholder);\n const [isDropdownOpen, toggleDropdown] = React.useState(false);\n const [isError, setError] = React.useState(false);\n\n /**\n * Method to handle the store pickup option change.\n * @param event - Change Event.\n */\n const onChangeHandler = React.useCallback((event: React.MouseEvent) => {\n event.preventDefault();\n selectStorePickUpOption(event.currentTarget.value);\n setCurrentStorePickUpOption(event.currentTarget.dataset.description ? event.currentTarget.dataset.description : '');\n toggleDropdown(false);\n setError(false);\n }, []);\n\n /**\n * Method to render store location line pick up button.\n * @param filteredDeliveryMode - Filtered Delivery Mode.\n * @returns JSX Element.\n */\n const renderLocationLinePickupButton = (filteredDeliveryMode: DeliveryOption | undefined) => {\n return filteredDeliveryMode !== undefined ? (\n
\n \n {filteredDeliveryMode.Description}\n \n
\n ) : null;\n };\n\n /**\n * Method to handle the store pickup option submit.\n */\n const onClickHandler = React.useCallback(() => {\n if (!StringExtensions.isNullOrEmpty(selectedStorePickUpOption)) {\n handlers.onSelected(location, selectedStorePickUpOption);\n } else if (pickUpStatesProps.state.filteredPickupMode !== undefined) {\n handlers.onSelected(location, pickUpStatesProps.state.filteredPickupMode);\n } else {\n toggleDropdown(false);\n setError(true);\n }\n }, [location, selectedStorePickUpOption, handlers, pickUpStatesProps.state.filteredPickupMode]);\n\n const handleDropdownToggle = React.useCallback(() => {\n toggleDropdown(!isDropdownOpen);\n setError(false);\n }, [isDropdownOpen]);\n\n const filterDeliveryOption = deliveryOptionList.find(\n (delivery: DeliveryOption) => delivery.Code === pickUpStatesProps.state.filteredPickupMode\n );\n\n const pickupInStoreButtonText: string = selectStoreText;\n const filteredDeliveryMode: DeliveryOption | undefined =\n pickUpStatesProps.state.filteredPickupMode !== undefined ? filterDeliveryOption : undefined;\n\n return (\n \n
{pickUpMethodLabel}
\n {pickUpStatesProps.state.filteredPickupMode === undefined ? (\n
\n \n {currentStorePickUpOption}\n \n
    \n {deliveryOptionList.map((delivery: DeliveryOption) => (\n \n \n {delivery.Description}\n \n \n ))}\n
\n
{pickupOptionDropdownError}
\n
\n ) : (\n renderLocationLinePickupButton(filteredDeliveryMode)\n )}\n \n
\n );\n};\n\n/**\n * PickUp button component.\n * @param props - The view props.\n * @returns JSX Element.\n */\nconst PickUpButtonComponent = (props: IPickUpButtonComponent & IPickUpButtonResources) => {\n const { pickupInStoreAriaLabel, pickupInStoreButtonText, pickupDeliveryOptionErrorMessage, attributes } = props;\n const [isError, setError] = React.useState(false);\n const onPickupButtonClickHandler = () => () => {\n setError(true);\n };\n\n return (\n <>\n \n {pickupInStoreButtonText}\n \n
\n {pickupDeliveryOptionErrorMessage}\n
\n \n );\n};\n\n/**\n * Method to render store location line item.\n * @param locationLineItem - The Location Line item view props.\n * @param props - The view props.\n * @returns JSX Element.\n */\nconst renderStoreLocationLineItem = (\n locationLineItem: IStoreSelectorLocationLineItemProps,\n props: IStoreSelectorViewProps & IStoreSelectorProps\n) => {\n const {\n // eslint-disable-next-line @typescript-eslint/naming-convention -- Dependency from store-selector.tsx file\n hideStockStatus,\n index,\n isInStock,\n preferredStoreLocationId,\n isPreferredStoreEnabled,\n location,\n resources,\n storeHours,\n storeHoursList,\n stockStatusLabel,\n // eslint-disable-next-line @typescript-eslint/naming-convention -- Dependency from store-selector.tsx file\n storeLocatorView,\n telemetryContent\n } = locationLineItem;\n const storeName = location.OrgUnitName;\n const distanceAsString: string | undefined = buildDistanceString(\n location.Distance,\n locationLineItem.preferredDistanceUnit,\n props.resources,\n locationLineItem.isLocationDisabled\n );\n const storeAddress: string | undefined = location.Address;\n const phoneNumber: string | undefined = extractPhoneNumber(location.Contacts);\n\n const resourceLabel = isInStock ? resources.inStock : resources.outOfStock;\n const stockStatus = stockStatusLabel ? stockStatusLabel : resourceLabel;\n const stockText: string | undefined = hideStockStatus ? undefined : stockStatus;\n\n const payLoad: IPayLoad = getPayloadObject('click', telemetryContent!, TelemetryConstant.PickupInStore);\n\n /**\n * Method to handle the change for preferred store.\n * @returns Void.\n */\n const onSetPreferredStoreClickHandler = () => {\n locationLineItem.handlers.onSetAsPreferredStore(locationLineItem.location.OrgUnitNumber);\n };\n\n /**\n * Method to handle the removal of the preferred store.\n * @returns Void.\n */\n const onRemovePreferredStoreClickHandler = async (event: React.MouseEvent) => {\n event.stopPropagation();\n locationLineItem.handlers.onRemovePreferredStore();\n await props.data.storeSelectorStateManager.result?.setSelectedStoreLocationId(undefined);\n };\n\n const isPreferredStore = preferredStoreLocationId === location.OrgUnitNumber;\n payLoad.contentAction.etext = TelemetryConstant.PreferredStore;\n const preferredStoreAttribute = getTelemetryAttributes(telemetryContent!, payLoad);\n payLoad.contentAction.etext = TelemetryConstant.RemovePreferredStore;\n const removePreferredStoreAttribute = getTelemetryAttributes(telemetryContent!, payLoad);\n\n return (\n
\n
\n {storeLocatorView && {index}}\n {storeName}\n {distanceAsString ? {distanceAsString} : false}\n
\n
\n
\n

{locationLineItem.resources.contactInfoHeader}

\n {storeAddress && (\n
\n
\n )}\n {phoneNumber && (\n
\n \n {phoneNumber}\n
\n )}\n
\n
\n

{locationLineItem.resources.storeHoursHeader}

\n {renderStoreHours(storeHours, storeHoursList, locationLineItem.locationOpen, props.resources)}\n
\n {!storeLocatorView && !hideStockStatus && (\n
\n

{resources.availabilityInfoHeader}

\n {stockText &&

{stockText}

}\n
\n )}\n {isPreferredStoreEnabled &&\n (isPreferredStore ? (\n \n {resources.preferredStoreText}\n \n ) : (\n \n {resources.setAsPreferredStoreText}\n \n ))}\n
\n
\n );\n};\n\n/**\n * Render Store Location.\n * @param location - The location props.\n * @param index - The location index.\n * @param props - The view props.\n * @param selectedLocationReference - The ref.\n * @returns The JSX Element.\n */\nconst renderStoreLocation = (\n location: IStoreSelectorLocationLineItemProps,\n index: number,\n props: IStoreSelectorViewProps & IStoreSelectorProps,\n selectedLocationReference: React.RefObject\n): JSX.Element | undefined => {\n const {\n // eslint-disable-next-line @typescript-eslint/naming-convention -- Dependency from store-selector.tsx file\n hideStockStatus,\n storeLocatorView,\n isCurrentLocation,\n isInStock,\n productPickUpOptionList,\n resources,\n storePickUpOptionList,\n telemetryContent\n } = location;\n\n const orgUnitLocation = location.location;\n const selectedStoreLocationId = location.selectedStoreLocationId;\n const defaultAriaSetsize = 0;\n const canSelectLocation = hideStockStatus || isInStock;\n const storeName = location.location.OrgUnitName;\n const pickupInStoreAriaLabel: string = resources.selectLocationAriaLabelFormat.replace('{StoreName}', storeName ?? '');\n const pickupInStoreButtonText: string = resources.selectLocation;\n const pickUpOptionDropdownPlaceholderText: string = props.resources.pickupOptionDropdownPlaceholderText;\n\n const payLoad: IPayLoad = getPayloadObject('click', telemetryContent!, TelemetryConstant.PickupInStore);\n const attributes = getTelemetryAttributes(telemetryContent!, payLoad);\n const deliveryOptionList = matchDeliveryOptions(productPickUpOptionList, storePickUpOptionList);\n const selectStoreText = props.resources.selectStoreText;\n const pickUpMethodLabel = props.resources.pickUpMethodLabel;\n\n /**\n * Method to handle the pick up in store.\n * @returns Void.\n */\n const onPickupInStoreClickHandler = () => () => {\n location.handlers.onSelected(location.location);\n };\n\n /**\n * Render Store Locations.\n * @param unitLocation - The org unit location.\n * @returns Handler for onClick.\n */\n const onClickHandler = (unitLocation: OrgUnitLocation | undefined) => () => {\n location.onClick(unitLocation?.OrgUnitNumber);\n };\n\n const canSelectPickUpMethod = !ArrayExtensions.hasElements(deliveryOptionList) ? (\n \n ) : (\n \n );\n const pickUpMethodSelection = canSelectLocation ? canSelectPickUpMethod : false;\n\n return (\n \n \n {renderStoreLocationLineItem(location, props)}\n \n {!storeLocatorView &&\n (isCurrentLocation ? (\n

{resources.currentLocation}

\n ) : (\n pickUpMethodSelection\n ))}\n \n );\n};\n\n/**\n * Render Store Locations.\n * @param props - The view props.\n * @param selectedLocationReference - The ref.\n * @returns The JSX Element.\n */\nconst renderStoreLocations = (\n props: IStoreSelectorViewProps & IStoreSelectorProps,\n selectedLocationReference: React.RefObject\n) => {\n return (\n \n {props.locationListProps?.map((store, index) => {\n return renderStoreLocation(store, index, props, selectedLocationReference);\n })}\n \n );\n};\n\n/**\n * Method to map resources with Location Item.\n * @param resources - List of strings for module.\n * @returns Resources for StoreSelector location line.\n */\nconst mapResources = (resources: IStoreSelectorResources): IStoreSelectorLocationLineItemResources => {\n return {\n contactInfoHeader: resources.contactText,\n storeHoursHeader: resources.timeText,\n availabilityInfoHeader: resources.availabilityText,\n\n closedText: resources.storeHoursClosedText,\n outOfStock: resources.outOfStockText,\n inStock: resources.inStockText,\n\n currentLocation: resources.selectedStoreLocationText,\n selectLocation: resources.selectStoreText,\n selectLocationAriaLabelFormat: resources.selectStoreAriaFormatText,\n setAsPreferredStoreText: resources.setAsPreferredStoreText,\n setAsPreferredStoreTextAriaLabel: resources.setAsPreferredStoreTextAriaLabel,\n preferredStoreText: resources.preferredStoreText,\n preferredStoreAriaLabel: resources.preferredStoreAriaLabel,\n\n days: {\n monday: resources.storeHoursMondayText,\n tuesday: resources.storeHoursTuesdayText,\n wednesday: resources.storeHoursWednesdayText,\n thursday: resources.storeHoursThursdayText,\n friday: resources.storeHoursFridayText,\n saturday: resources.storeHoursSaturdayText,\n sunday: resources.storeHoursSundayText,\n mondayFull: resources.storeHoursMondayFullText,\n tuesdayFull: resources.storeHoursTuesdayFullText,\n wednesdayFull: resources.storeHoursWednesdayFullText,\n thursdayFull: resources.storeHoursThursdayFullText,\n fridayFull: resources.storeHoursFridayFullText,\n saturdayFull: resources.storeHoursSaturdayFullText,\n sundayFull: resources.storeHoursSundayFullText\n }\n };\n};\n\n/**\n * Render the selected store.\n * @param selectedLocationProps -- Selected store view props.\n * @param storeSelectorViewProps -- Store selector view props.\n * @returns -- HTML.\n */\nexport const renderSelectedStore = (\n selectedLocationProps: ISelectedStoreViewProps,\n storeSelectorViewProps: IStoreSelectorViewProps & IStoreSelectorProps\n): JSX.Element => {\n const {\n storeDetailsMain,\n storeHeader,\n storeName,\n storeDetailsCloseButton,\n storeDistance,\n storeDetailsAvailabilityContainer,\n productAvailability,\n stockStatus,\n isPreferredStore,\n preferredStoreButton,\n removePreferredStoreButton,\n selectedStore\n } = selectedLocationProps;\n\n const storeAddress: string | undefined = selectedStore?.OrgUnitAvailability?.OrgUnitLocation?.Address;\n const phoneNumber: string | undefined = extractPhoneNumber(selectedStore?.OrgUnitAvailability?.OrgUnitLocation?.Contacts);\n const storeHoursList = selectedStore?.StoreHours?.RegularStoreHours\n ? buildStoreHours(selectedStore.StoreHours.RegularStoreHours, mapResources(storeSelectorViewProps.resources))\n : [];\n const storeOpenFrom: string | undefined = secondsToTime(selectedStore?.OrgUnitAvailability?.OrgUnitLocation?.OpenFrom);\n const storeOpenTo: string | undefined = secondsToTime(selectedStore?.OrgUnitAvailability?.OrgUnitLocation?.OpenTo);\n const locationOpen = { openFrom: storeOpenFrom, openTo: storeOpenTo };\n const storeNameValue = selectedStore?.OrgUnitAvailability?.OrgUnitLocation?.OrgUnitName;\n const pickupInStoreAriaLabel: string = selectedLocationProps.resources.selectLocationAriaLabelFormat.replace(\n '{StoreName}',\n storeNameValue ?? ''\n );\n const telemetryContent = getTelemetryObject(\n storeSelectorViewProps.context.request.telemetryPageName!,\n storeSelectorViewProps.friendlyName,\n storeSelectorViewProps.telemetry\n );\n const payLoad = getPayloadObject('click', telemetryContent, TelemetryConstant.PickupInStore);\n const attributes = getTelemetryAttributes(telemetryContent, payLoad);\n const pickupInStoreButtonText: string = selectedLocationProps.resources.selectLocation;\n const selectStoreText = storeSelectorViewProps.resources.selectStoreText;\n const pickUpMethodLabel = storeSelectorViewProps.resources.pickUpMethodLabel;\n const pickUpOptionDropdownPlaceholderText: string = storeSelectorViewProps.resources.pickupOptionDropdownPlaceholderText;\n const orgUnitNumber = selectedStore?.OrgUnitAvailability?.OrgUnitLocation!.OrgUnitNumber;\n const productPickUpOptionList = storeSelectorViewProps.data.storeSelectorStateManager.result?.context?.deliveryOptions?.DeliveryOptions;\n const deliveryOptionList = matchDeliveryOptions(productPickUpOptionList, selectedLocationProps.deliveryOptions);\n const selectedLocation = storeSelectorViewProps.locationListProps?.find(location => location.location.OrgUnitNumber === orgUnitNumber);\n\n /**\n * Method to handle the pick up in store.\n * @returns Void.\n */\n const onPickupInStoreClickHandler = () => () => {\n selectedLocationProps.handlers.onSelected(selectedStore!.OrgUnitAvailability!.OrgUnitLocation!);\n };\n const canSelectPickUpMethod = !ArrayExtensions.hasElements(deliveryOptionList) ? (\n \n ) : (\n selectedLocation && (\n \n )\n );\n\n return (\n \n \n {storeDetailsCloseButton}\n {storeName}\n {storeDistance}\n \n \n
\n

{storeSelectorViewProps.resources.contactText}

\n {storeAddress && (\n
\n
\n )}\n {phoneNumber && (\n
\n \n {phoneNumber}\n
\n )}\n
\n
\n

{storeSelectorViewProps.resources.timeText}

\n {renderStoreHours(selectedStore?.StoreHours, storeHoursList, locationOpen, storeSelectorViewProps.resources)}\n
\n {productAvailability && (\n
\n

{productAvailability}

\n {stockStatus &&

{stockStatus}

}\n
\n )}\n
\n {isPreferredStore ? preferredStoreButton : removePreferredStoreButton}\n {canSelectPickUpMethod}\n
\n );\n};\n\n/**\n * Store Selector View.\n * @param props - The view props.\n * @returns The JSX Element.\n */\nconst StoreSelectorViewComponent: React.FC> = props => {\n // eslint-disable-next-line @typescript-eslint/naming-convention -- Dependency from Store-Selector.tsx file\n const {\n BodyContainerProps,\n storeResultContainerProps,\n FooterContainerProps,\n HeaderContainerProps,\n HeaderProps,\n ModuleProps,\n locationsMessage,\n search,\n state,\n spinner,\n maps,\n locationsList,\n noLocationsMessage,\n terms,\n storeDetailsModal,\n selectedLocation,\n bodyWrapperProps,\n data,\n context\n } = props;\n const selectedLocationReference = React.useRef(null);\n const [isDesktopPort, setIsDesktopPort] = React.useState(false);\n\n const isDesktopViewport = React.useCallback(() => {\n const portView = isMobile({ variant: VariantType.Browser, context: context.request });\n const isDesktopPorts = portView === 'md' || portView === 'xl' || portView === 'lg';\n setIsDesktopPort(isDesktopPorts);\n }, [context]);\n\n React.useEffect(() => {\n if (props.locationsList) {\n /**\n * Method to handle scrolling.\n */\n const scrollIntoView = () => {\n const selectedLocationDiv = (selectedLocationReference as React.RefObject).current;\n if (selectedLocationDiv !== null) {\n const offset = selectedLocationDiv.getBoundingClientRect();\n const parent = selectedLocationDiv.parentElement?.parentElement;\n if (parent && offset) {\n const totalHeight = parent.scrollTop + offset.top;\n parent.scrollTop = totalHeight - parent.clientHeight;\n }\n }\n };\n scrollIntoView();\n }\n }, [props.locationsList]);\n\n React.useEffect(() => {\n if (MsDyn365.isBrowser) {\n window.addEventListener('resize', isDesktopViewport);\n }\n isDesktopViewport();\n }, [isDesktopViewport]);\n const viewport = isMobile({ variant: VariantType.Browser, context: context.request });\n\n const isDesktopView = viewport === 'md' || viewport === 'lg' || viewport === 'xl';\n\n if (!isDesktopView || !isDesktopPort) {\n return (\n \n {HeaderProps}\n \n \n {locationsMessage && (\n \n )}\n {search}\n \n \n {state.isSearchInProgress ? (\n spinner\n ) : (\n <>{locationsList ? renderStoreLocations(props, selectedLocationReference) : noLocationsMessage}\n )}\n \n {maps}\n \n {selectedLocation && renderSelectedStore(selectedLocation, props)}\n \n \n \n \n {terms}\n \n );\n }\n return (\n \n {HeaderProps}\n \n \n {locationsMessage && (\n \n )}\n {search}\n {state.isSearchInProgress ? (\n spinner\n ) : (\n <>{locationsList ? renderStoreLocations(props, selectedLocationReference) : noLocationsMessage}\n )}\n \n \n {maps}\n \n \n {terms}\n \n );\n};\n\nexport default StoreSelectorViewComponent;\n"],"names":["module","exports","React","ReactDOM","BaseStoreSelectorStateManager","constructor","listMapViewState","displayList","displayMap","preferredStoreLocalStorageKey","this","isMapModuleLoaded","value","_readFromToCookie","storeInfo","JSON","parse","undefined","preferredStore","_unused","_context","input","storeId","selectedStoreLocationId","storeName","writeToCookie","arguments","length","StoreId","StoreName","Latitude","Longitude","_writeToCookie","stringify","latitude","longitude","lastInlineShownStoreInfo","_removeCookie","id","Error","key","MsDyn365","isBrowser","window","localStorage","removeItem","setItem","cookieValue","getItem","__decorate","computed","observable","action","MapStoreSelectorStateManager","SERVICE_ENDPOINT","MAP_API_ENDPOINT","searchTerm","actionContext","requestContext","channel","BingMapsApiKey","BingMapsEnabled","searchContent","jsonp","crypto","getRandomValues","Uint32Array","ChannelCountryRegionISOCode","trim","query","encodeURI","geolocationApiUrl","app","config","requestUrl","Promise","resolve","script","document","createElement","setAttribute","data","remove","resourceSets","resources","point","coordinates","body","appendChild","_document","StringExtensions","isNullOrEmpty","getElementById","currentWindowAPI","mapAPIReady","isMapApiLoaded","url","lang","market","reject","_document2","_document3","type","async","defer","src","addEventListener","error","createStoreSelectorStateInput","result","GenericInput","getGenericActionDataAction","createObservableDataAction","getGenericAction","inputData","renderSelectedStore","props","storeDetailsMain","storeHeader","storeDetailsCloseButton","storeDistance","storeDetailsAvailabilityContainer","productAvailability","stockStatus","isCurrentLocation","currentLocation","isPreferredStore","preferredStoreButton","removePreferredStoreButton","Node","Object","assign","canSelectLocation","deliveryOptions","pickUpDeliveryOptionButton","pickupModes","ArrayExtensions","hasElements","renderDeliveryOptions","FooterContainerProps","HeaderContainerProps","HeaderProps","ModuleProps","terms","Module","BodyContainerProps","locationsMessage","search","state","spinner","locationsList","noLocationsMessage","maps","bodyWrapperProps","storeResultContainerProps","mapContainerProps","isMobileView","storeDetailsModal","selectedLocation","isSearchInProgress","renderBody","binding","modules","dataActions","registerSanitizedActionPath","sanitizedActionPath","dataAction","default","prototype","RegistrationId","c","require","$type","da","name","path","runOn","iNM","ns","n","p","pdp","md","__bindings__","_objectSpread","viewDictionary","cn","PickUpOptionList","super","eventsToBeBind","handleDocumentClick","event","htmlElement","target","_pickupListOptionButton","current","contains","_pickupListOptionMenu","setState","expandSiteOptions","_onSelect","preventDefault","deliveryCode","currentTarget","getAttribute","onChange","_renderDeliveryOptions","bind","componentDidMount","componentWillUnmount","removeEventListener","render","pickupListOptionMenuText","pickupmodeList","className","onClick","ref","role","map","delivery","Code","tabIndex","Description","stopPropagation","isExpandSiteOptionsState","StorePickUpOptionList","_rendeDeliveryOptions","isExpandOptionsState","isFilterExpanded","selectedPickupMode","_onKeyDown","_storePickupListOptionMenu","_productPickupModeLis","productPickupListOptionMenuText","productPickupModeList","defaultOptionText","selectedPickupModeDesc","find","onKeyDown","secondsToTime","seconds","hours","Math","floor","ampm","divisorForMinutes","getShortTimeString","day","days","monday","tuesday","wednesday","thursday","friday","saturday","sunday","getFullTimeString","mondayFull","tuesdayFull","wednesdayFull","thursdayFull","fridayFull","saturdayFull","sundayFull","buildHoursDisplayInfo","startDay","endDay","hoursInfo","startDayShort","startDayFull","endDayShort","endDayFull","timeRange","shouldMergeLines","firstLine","secondLine","isClosed","openTime","closeTime","getStoreHoursData","storeHours","dateForLookup","get","buildStoreHoursString","closedText","buildStoreHours","storeHoursList","mondayHours","tuesdayHours","wednesdayHours","thursdayHours","fridayHours","saturdayHours","sundayHours","periodStart","periodEnd","push","storeSelectorLocationLineItemComponentActions","onLocationSelected","deliveryMode","handlers","onSelected","location","onSetAsPreferredStore","OrgUnitNumber","onRemovePreferredStore","buildDistanceString","distance","preferredDistanceUnit","isLocationDisabled","onPickupInStoreClickHandler","onPickupModeSelectHandler","pickupMode","onSetPreferredStoreClickHandler","removePreferredStoreHandler","onChangeHandler","matchDeliveryOptions","productdeliveryOptions","storePickUpOptionList","deliveryOption","pickup","_delivery","StoreSelectorLocationLineItemComponent","hideStockStatus","isInStock","stockStatusLabel","storeLocatorView","index","preferredStoreLocationId","isPreferredStoreEnabled","telemetryContent","productPickUpOptionList","shouldShowIndex","OrgUnitName","distanceAsString","Distance","storeAddress","Address","phoneNumber","contacts","allPhoneContacts","filter","contact","ContactTypeValue","IsPrivate","primaryPhoneContact","IsPrimary","Locator","extractPhoneNumber","Contacts","resourceLabel","inStock","outOfStock","stockLabel","stockText","pickupInStoreButtonText","selectLocation","pickupInStoreAriaLabel","selectLocationAriaLabelFormat","replace","payLoad","getPayloadObject","TelemetryConstant","PickupInStore","attributes","getTelemetryAttributes","contentAction","etext","PreferredStore","preferredStoreAttributes","RemovePreferredStore","removePreferredStoreAttributes","deliveryOptionList","contactInfoHeader","storeHoursHeader","renderStoreHours","RegularStoreHours","displayTime","title","storeOpenFrom","OpenFrom","storeOpenTo","OpenTo","availabilityInfoHeader","renderPickupModes","filteredPickupMode","preferredStoreAriaLabel","preferredStoreText","setAsPreferredStoreTextAriaLabel","setAsPreferredStoreText","StoreSelectorLocationLines","onClickHandler","orgUnitLocation","_scrollIntoView","selectedLocationDiv","selectedLocationRef","parent","parentElement","scrollTop","offsetTop","clientHeight","_isCurrentLocation","alreadySelectedLocation","_isProductInStock","itemAvailabilities","enableOutOfStockCheck","AvailableQuantity","_stockInventoryLabel","availabilityWithHours","ProductInventoryInformation","i","_availabilityWithHour","OrgUnitAvailability","OrgUnitLocation","InventoryLocationId","InventLocationId","StockLevelLabel","_mapResources","contactText","timeText","availabilityText","storeHoursClosedText","outOfStockText","inStockText","selectedStoreLocationText","selectStoreText","selectStoreAriaFormatText","storeHoursMondayText","storeHoursTuesdayText","storeHoursWednesdayText","storeHoursThursdayText","storeHoursFridayText","storeHoursSaturdayText","storeHoursSundayText","storeHoursMondayFullText","storeHoursTuesdayFullText","storeHoursWednesdayFullText","storeHoursThursdayFullText","storeHoursFridayFullText","storeHoursSaturdayFullText","storeHoursSundayFullText","storeCounter","componentDidUpdate","previousProps","locations","_stores","_sortStores","reaction","classnames","show","store","_renderStoreLocation","_store$OrgUnitAvailab","OrgUnitPickUpDeliveryModes","_store$OrgUnitAvailab2","selected","StoreHours","ItemAvailabilities","toString","DeliveryOptions","productPickUpDeliveryOptions","stores","_value$OrgUnitAvailab","observer","StoreSelectorSearchForm","searchBoxRef","previousValue","isSearchResultOpened","_handleInputKeyPress","keyCode","KeyCodes","ArrowUp","ArrowDown","activeDescedantValue","_handleKeyPressPrev","Enter","Space","onShowAllStores","_searchTextChanged","inputValue","searchTermChanged","_onSubmit","_this$searchBoxRef$cu","blur","performSearch","_onChangeHandler","filterPickupModeSelected","renderPickupModesList","toggleButtonText","pickupFilterMenuHeading","locatorView","pickupFilterByHeading","hasEnabledPickupFilterToShowStore","shouldDisplayList","toggleButtonClass","onToggleListMapViewState","toggleMapViewAttributes","SearchStore","storeSearchAttributes","ShowAllStore","showAllStoreAttributes","ToggleMapView","searchButtonAriaLabel","searchPlaceholderText","seeAllStoresText","viewListText","viewMapText","isMapDisabled","showAllStores","autoComplete","onSubmit","searchInputAriaLabel","placeholder","onKeyUp","color","StoreSelectorEmptyMessage","_ref","emptyLocationsText","StoreSelectorWaiting","StoreSelectorTermsOfService","_ref2","link","onTextChange","editableLink","ariaLabel","linkText","linkUrl","destinationUrl","openInNewTab","Msdyn365","editProps","StoreSelectorFoundLocationsMessage","_ref3","searchRadius","isSeeAllStore","storeCountMessage","milesShortText","storeCountMessageInKm","storeAllCountMessage","_props$selectedStore","selectedStore","_props$selectedStore2","_props$selectedStore3","_props$selectedStore4","storeDetailsModalHandler","closeStoreDetailsModal","SelectedStoreComponent","_selectedStore$OrgUni","_selectedStore$OrgUni2","shouldHideStockStatus","parentClassName","tag","Button","mode","searchRadiusUnit","style","StoreSelector","shouldHideInventory","hasEnabledOutOfStockCheck","availabilitiesWithHours","storeSelectorStateManager","storeLocations","context","selectedStoreResources","_selectedStore$OrgUni3","selectedProps","_onOrgUnitLocationSelected","_setPreferredStore","_removePreferredStore","_closeStoreDetailModal","handleLinkTextChange","termsOfServiceLink","handleHeadingChange","heading","onShowAllStoresHandler","_getAndUpdateStoreLocation","onFilterLocations","_location$OrgUnitPick","some","onFilteredPickupMode","_attachMapAutoSuggest","autoSuggestOptions","telemetry","autoSuggestManager","Microsoft","Maps","loadModule","callback","options","countryCode","AutosuggestManager","attachAutosuggest","_onSuggestionSelected","errorCallback","debug","credentials","_this$props$data$stor","_searchTermChanged","formattedSuggestion","_performSearch","_preferredStore$OrgUn","_preferredStore$OrgUn2","_preferredStore$OrgUn3","cookies","modeEnum","pickupInStore","findStores","setPreferredStoreLocation","isConsentGiven","clearPreferredStore","setSelectedStoreLocationId","_setSelectedStore","isSeeAllStoreValue","geoLocate","_updateLocations","shouldShowAllStores","_navigator","styleEnum","dialog","inline","isDialogOpen","navigator","geolocation","getCurrentPosition","position","coords","PERMISSION_DENIED","timeout","_closeDialog","_storeSelectorStateMa","parentElementRef","focus","closeDialog","_setOrgUnitStoreInformation","moduleId","styleDefault","preferredLocationId","storeLocationList","orgUnitStoreInformation","showMapViewLink","isDialog","product","setOrgUnitStoreInformation","catch","message","radius","lookupRadius","calRadius","distanceUnitValue","SearchRadiusUnit","kilometers","modeDefault","localLatitude","long","lastInlineStoreLocation","setLastInlineStoreInfo","getFullAvailableInventoryNearby","getOrgUnitLocationByArea","orgUnitLocationsInput","GetOrgUnitLocationsByAreaInput","orgUnitLocations","getOrgUnitLocationsByArea","GetFullAvailableInventoryNearbyInput","RecordId","warning","hasEnableOutOfStockCheck","_isInStock$OrgUnitAva","getTelemetryObject","request","telemetryPageName","friendlyName","_this$props$data$stor6","autoSuggestionEnabled","isAutoSuggestionEnabled","_this$props$context","sessionStorage","setTimeout","_this$props$data$stor2","_this$props$data$stor3","_this$props$data$stor4","_this$props$data$stor5","loadMapApi","locale","_this$props$data$stor7","_this$props$data$stor8","_this$props$context$a","_this$props$data$stor9","when","_this$props$data$stor10","_this$props$data$stor11","_this$props$data$stor12","isSameContext","shouldComponentUpdate","_storeSelectorStateMa2","_storeSelectorStateMa3","_storeSelectorStateMa4","_storeSelectorStateMa5","setAsPreferredStore","shouldSetAsPreferredStore","enablePickupFilterToShowStore","hasEnablePickupFilterToShowStore","appConfig","slots","mapSlot","isMobileDevice","isMobile","variant","VariantType","Viewport","isInlineView","isLocatorView","canShowLocationView","storeSelectorActions","toggleListMapViewState","configHeading","storeLocatorHeaderText","storeSelectorHeaderText","kilometersShortText","sortLocation","isEnableOutofStock","enableStockCheck","locationListProps","_getStoreLocationListProps","hasMapSlot","dialogClassName","viewProps","Modal","moduleProps","classname","autoFocus","fade","isOpen","onClosed","horizontalPosition","verticalPosition","toggle","ModalHeader","text","onEdit","ModalFooter","ModalBody","outOfStockThreshold","headerText","sortLocations","callbacks","getAndUpdateUserLocation","attachMapAutoSuggest","onSuggestionSelected","setPreferredStore","removePreferredStore","setSelectedStore","renderView","isStoreLocatorView","storeList","storeLineProps","_createStoreLocationList","_store$OrgUnitAvailab3","selectedStoreLocation","lineResources","_store$OrgUnitAvailab4","locationOpen","openFrom","openTo","StoreSelectorFoundLocationsMessageComponent","RichTextComponent","buildStoreHoursDay","storeHoursDayPeriodString","storeHoursDayString","storeHoursDayPeriod","storeHoursDay","renderStoreLocationLineItem","locationLineItem","pickupButton","closeDistanceString","distanceString","ContactInformationType","Phone","preferredStoreAttribute","removePreferredStoreAttribute","renderStoreLocations","_props$data$storeSele","_props$locationListPr","renderStoreLocation","isCallFromImport","productDeliveryOptions","productDeliveryOption","unitLocation","canSelectPickUpMethod","pickUpMethodSelection","pickupItemButton","Number","parseInt","isError","setError","pickUpButtonClickHandler","pickupDeliveryOptionErrorMessage","PickUpMethodDropdownComponent","pickUpStatesProps","pickUpMethodLabel","pickUpOptionPlaceholder","pickupOptionDropdownError","pickupButtonAriaLabel","selectedStorePickUpOption","selectStorePickUpOption","currentStorePickUpOption","setCurrentStorePickUpOption","isDropdownOpen","toggleDropdown","dataset","description","handleDropdownToggle","filterDeliveryOption","filteredDeliveryMode","renderLocationLinePickupButton","PickUpButtonComponent","selectedLocationReference","_props$data$storeSele2","pickUpOptionDropdownPlaceholderText","pickupOptionDropdownPlaceholderText","pickupOptionDropdownErrorText","selectedLocationProps","storeSelectorViewProps","_selectedStore$StoreH","_selectedStore$OrgUni4","_selectedStore$OrgUni5","_selectedStore$OrgUni6","_storeSelectorViewPro","_storeSelectorViewPro2","storeNameValue","orgUnitNumber","_data$storeSelectorSt2","_data$storeSelectorSt3","isDesktopPort","setIsDesktopPort","isDesktopViewport","portView","Browser","scrollIntoView","_selectedLocationDiv$","offset","getBoundingClientRect","totalHeight","top","viewport","_data$storeSelectorSt"],"sourceRoot":""}