@digitransit-component/digitransit-component-autosuggest 1.9.16 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -14,16 +14,16 @@
14
14
 
15
15
  ```javascript
16
16
  const searchContext = {
17
- isPeliasLocationAware: false // true / false does Let Pelias suggest based on current user location
18
- minimalRegexp: undefined // used for testing min. regexp. For example: new RegExp('.{2,}'),
19
- lineRegexp: undefined // identify searches for route numbers/labels: bus | train | metro. For example: new RegExp(
17
+ isPeliasLocationAware: false, // true / false does Let Pelias suggest based on current user location
18
+ minimalRegexp: undefined, // used for testing min. regexp. For example: new RegExp('.{2,}'),
19
+ lineRegexp: undefined, // identify searches for route numbers/labels: bus | train | metro. For example: new RegExp(
20
20
  // '(^[0-9]+[a-z]?$|^[yuleapinkrtdz]$|(^m[12]?b?$))',
21
21
  // 'i',
22
22
  // ),
23
- URL_PELIAS: '' // url for pelias searches
24
- feedIDs: ['HSL', 'HSLLautta'] // FeedId's like [HSL, HSLLautta]
25
- geocodingSources: ['oa','osm','nlsfi'] // sources for geocoding
26
- geocodingSearchParams; {} // Searchparmas fro geocoding
23
+ URL_PELIAS: '', // url for pelias searches
24
+ feedIDs: ['HSL', 'HSLLautta'], // FeedId's like [HSL, HSLLautta]
25
+ geocodingSources: ['oa','osm','nlsfi'], // sources for geocoding
26
+ geocodingSearchParams: {}, // Searchparmas fro geocoding
27
27
  getFavouriteLocations: () => ({}), // Function that returns array of favourite locations.
28
28
  getFavouriteStops: () => ({}), // Function that returns array of favourite stops.
29
29
  getLanguage: () => ({}), // Function that returns current language.
@@ -33,8 +33,8 @@ const searchContext = {
33
33
  getAllBikeRentalStations: () => ({}), // Function that returns all bike rental stations from graphql API.
34
34
  getStopAndStationsQuery: () => ({}), // Function that fetches favourite stops and stations from graphql API.
35
35
  getFavouriteRoutesQuery: () => ({}), // Function that returns query for fetching favourite routes.
36
- getFavouriteBikeRentalStations: () => ({}), // Function that returns favourite bike rental station.
37
- getFavouriteBikeRentalStationsQuery: () => ({}), // Function that returns query for fetching favourite bike rental stations.
36
+ getFavouriteVehicleRentalStations: () => ({}), // Function that returns favourite bike rental station.
37
+ getFavouriteVehicleRentalStationsQuery: () => ({}), // Function that returns query for fetching favourite bike rental stations.
38
38
  startLocationWatch: () => ({}), // Function that locates users geolocation.
39
39
  saveSearch: () => ({}), // Function that saves search to old searches store.
40
40
  clearOldSearches: () => ({}), // Function that clears old searches store.
@@ -60,7 +60,7 @@ const getAutoSuggestIcons: {
60
60
  }
61
61
  const transportMode = undefined;
62
62
  const placeholder = "stop-near-you";
63
- const targets = ['Locations', 'Stops', 'Routes']; // Defines what you are searching. all available options are Locations, Stops, Routes, BikeRentalStations, FutureRoutes, MapPosition and CurrentPosition. Leave empty to search all targets.
63
+ const targets = ['Locations', 'Stops', 'Routes']; // Defines what you are searching. all available options are Locations, Stops, Routes, VehicleRentalStation, FutureRoutes, MapPosition and CurrentPosition. Leave empty to search all targets.
64
64
  const sources = ['Favourite', 'History', 'Datasource'] // Defines where you are searching. all available are: Favourite, History (previously searched searches) and Datasource. Leave empty to use all sources.
65
65
  return (
66
66
  <DTAutosuggest