mirror of
https://github.com/HSLdevcom/digitransit-ui
synced 2025-07-05 16:30:37 +02:00
54 lines
1.4 KiB
JavaScript
54 lines
1.4 KiB
JavaScript
/**
|
|
* Function template required for searchUtils earch. One can use DTSearchQueryutils and storeUtils for
|
|
* default implementation, or provide their own.
|
|
*/
|
|
const searchContext = {
|
|
// Optional, used by default to get store for positions, favouriteLocations, StoreFavouriteRoutes, FavouriteStops, language.
|
|
context: null,
|
|
positionStore: null,
|
|
startLocationWatch: null,
|
|
saveSearch: null,
|
|
saveFutureRoute: null,
|
|
isPeliasLocationAware: false,
|
|
minimalRegexp: null,
|
|
lineRegexp: null,
|
|
feedIDs: [],
|
|
URL_PELIAS: '',
|
|
URL_PELIAS_PLACE: '',
|
|
geocodingSearchParams: null,
|
|
geocodingSources: '',
|
|
getRoutesQuery() {
|
|
return Promise.resolve([]);
|
|
},
|
|
getStopAndStationsQuery() {
|
|
return Promise.resolve([]);
|
|
},
|
|
getFavouriteRoutesQuery() {
|
|
return Promise.resolve([]);
|
|
},
|
|
getFavouriteVehicleRentalStations() {
|
|
return Promise.resolve([]);
|
|
},
|
|
getFavouriteVehicleRentalStationsQuery() {
|
|
return Promise.resolve([]);
|
|
},
|
|
getPositions: () => {
|
|
return {
|
|
lat: 0,
|
|
lon: 0,
|
|
address: undefined,
|
|
status: 'no-location',
|
|
hasLocation: false,
|
|
isLocationingInProgress: false,
|
|
locationingFailed: false,
|
|
};
|
|
},
|
|
getFavouriteLocations: () => [],
|
|
getOldSearches: () => [],
|
|
getFavouriteStops: () => [],
|
|
getFavouriterRoutes: () => [],
|
|
getLanguage: () => 'en',
|
|
getFutureRoutes: () => [],
|
|
};
|
|
|
|
export default searchContext;
|