diff --git a/packages/building-blocks/package.json b/packages/building-blocks/package.json index 264a98cb2..b7fb07df0 100644 --- a/packages/building-blocks/package.json +++ b/packages/building-blocks/package.json @@ -1,21 +1,18 @@ { "name": "@opentripplanner/building-blocks", - "version": "1.0.0", - "description": "Styling and UI Component Lbrary", + "version": "1.0.1", + "description": "Styling and UI Component Library", "author": "@binh-dam-ibigroup", "homepage": "https://github.com/opentripplanner/otp-ui/#readme", "license": "MIT", "main": "lib/index.js", "module": "esm/index.js", "private": false, - "dependencies": { - "mapbox-gl": "npm:empty-npm-package@1.0.0", - "maplibre-gl": "^2.1.9", - "react-map-gl": "^7.0.15", - "@opentripplanner/core-utils": "11.1.2" + "devDependencies": { + "@opentripplanner/core-utils": "^11.1.3" }, "peerDependencies": { - "@opentripplanner/types": "^6.1.1", + "@opentripplanner/types": "^6.2.0", "react": "^16.14.0", "styled-components": "^5.3.0" }, diff --git a/packages/core-utils/package.json b/packages/core-utils/package.json index da1e4e018..b2d909922 100644 --- a/packages/core-utils/package.json +++ b/packages/core-utils/package.json @@ -1,6 +1,6 @@ { "name": "@opentripplanner/core-utils", - "version": "11.1.2", + "version": "11.1.3", "description": "Core functionality that is shared among numerous UI components", "engines": { "node": ">=13" diff --git a/packages/core-utils/src/planQuery.graphql b/packages/core-utils/src/planQuery.graphql index 7d56375e1..f41d16c8e 100644 --- a/packages/core-utils/src/planQuery.graphql +++ b/packages/core-utils/src/planQuery.graphql @@ -62,6 +62,13 @@ query Plan( timezone url } + alerts { + alertDescriptionText + alertHeaderText + alertUrl + effectiveStartDate + id + } arrivalDelay departureDelay distance diff --git a/packages/geocoder/package.json b/packages/geocoder/package.json index 2778dfa70..86b5c1db9 100644 --- a/packages/geocoder/package.json +++ b/packages/geocoder/package.json @@ -1,6 +1,6 @@ { "name": "@opentripplanner/geocoder", - "version": "1.4.2", + "version": "2.0.0", "description": "Geocoding tools for multiple geocoding providers", "main": "lib/index.js", "module": "esm/index.js", diff --git a/packages/geocoder/src/apis/otp/index.ts b/packages/geocoder/src/apis/otp/index.ts index 4cbadd1a6..24c712edc 100644 --- a/packages/geocoder/src/apis/otp/index.ts +++ b/packages/geocoder/src/apis/otp/index.ts @@ -11,11 +11,12 @@ type OTPGeocoderResponse = { results: { coordinate: { lat: number, - lng: number, + lon: number, }, code: string, name: string, - id: string + id: string, + modes: string[] }[] } | undefined diff --git a/packages/geocoder/src/geocoders/otp.ts b/packages/geocoder/src/geocoders/otp.ts index 4a73e85b8..7ca884c64 100644 --- a/packages/geocoder/src/geocoders/otp.ts +++ b/packages/geocoder/src/geocoders/otp.ts @@ -23,11 +23,11 @@ export default class OTPGeocoder extends Geocoder { rewriteAutocompleteResponse(response: OTPGeocoderResponse): MultiGeocoderResponse { return { features: response?.results?.map(stop => ({ - geometry: { type: "Point", coordinates: [stop.coordinate.lng, stop.coordinate.lat] }, + geometry: { type: "Point", coordinates: [stop.coordinate.lon, stop.coordinate.lat] }, id: stop.id, // TODO: if non-stops are supported, these need to be detected here and // this layer property updated accordingly - properties: { layer: "stops", source: "otp", name: stop.name, label: stop.code }, + properties: { layer: "stops", source: "otp", modes: stop.modes, name: stop.name, label: `${stop.name} (${stop.code})` }, type: "Feature" })), type: "FeatureCollection" diff --git a/packages/types/package.json b/packages/types/package.json index b7f781ab5..87ccaeaff 100644 --- a/packages/types/package.json +++ b/packages/types/package.json @@ -1,6 +1,6 @@ { "name": "@opentripplanner/types", - "version": "6.1.1", + "version": "6.2.0", "description": "TypeScript types used across multiple OTP-UI packages", "main": "lib/index.js", "types": "lib/index.d.ts", diff --git a/packages/types/src/index.ts b/packages/types/src/index.ts index 4dd74fbe8..a9c3bd789 100644 --- a/packages/types/src/index.ts +++ b/packages/types/src/index.ts @@ -473,6 +473,8 @@ export type StopLayerStop = LayerEntity & { name: string; }; +export type StopEventHandler = (stop: Stop | { stopId: string }) => void; + /** * This models data about a stop and it's associated routes that is obtained * from a transit index API. @@ -485,6 +487,7 @@ export type Stop = { color?: string; dist?: number; geometries?: { geoJson?: GeoJSON.Polygon }; + gtfsId: string; id: string; lat?: number; lon?: number; diff --git a/yarn.lock b/yarn.lock index 917932aaa..0bd4801d9 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3241,6 +3241,16 @@ resolved "https://registry.yarnpkg.com/@open-draft/until/-/until-1.0.3.tgz#db9cc719191a62e7d9200f6e7bab21c5b848adca" integrity sha512-Aq58f5HiWdyDlFffbbSjAlv596h/cOnt2DO1w3DOC7OJ5EHs0hd/nycJfiu9RJbT6Yk6F1knnRRXNSpxoIVZ9Q== +"@opentripplanner/geocoder@^1.4.2": + version "1.4.2" + resolved "https://registry.yarnpkg.com/@opentripplanner/geocoder/-/geocoder-1.4.2.tgz#0f827dffca42c7f7a23063b54990a291dd028b80" + integrity sha512-yzMVrKXEHO6Y50j9kntk1+odvHaqn9K9D4aKJAd+EabhiZckesfScLb0updmWRUloEWjN45nuDSFto8fbU7Uiw== + dependencies: + "@conveyal/geocoder-arcgis-geojson" "^0.0.3" + "@conveyal/lonlat" "^1.4.1" + isomorphic-mapzen-search "^1.6.1" + lodash.memoize "^4.1.2" + "@opentripplanner/types@7.0.0-alpha.2": version "7.0.0-alpha.2" resolved "https://registry.yarnpkg.com/@opentripplanner/types/-/types-7.0.0-alpha.2.tgz#d10c69f99b2da6d1e80ab5989520bde8e558627b"