Skip to content

Commit

Permalink
Merge branch 'dev' into middleware-graphql
Browse files Browse the repository at this point in the history
  • Loading branch information
binh-dam-ibigroup authored Jul 19, 2024
2 parents 0c5b16b + 2f55d47 commit 458933d
Show file tree
Hide file tree
Showing 6 changed files with 223 additions and 269 deletions.
320 changes: 160 additions & 160 deletions __tests__/components/viewers/__snapshots__/nearby-view.js.snap

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions example-config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -339,6 +339,8 @@ itinerary:
# Whether the plan first/previous/next/last buttons should be shown along with
# plan trip itineraries.
showPlanFirstLastButtons: false
# adds the 'about' and '~' prefixes to the duration of non transit legs and trip details panel
showApproximatePrefixAccessLegs: false
# Show all walking legs regardless of distance
showAllWalkLegs: false
# Filters out trips returned by OTP by default, unless specifically requested.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,8 @@ class ConnectedItineraryBody extends Component {

const showViewTripButton = !config?.itinerary?.hideViewTripButton
const allowUserAlertCollapsing = config?.itinerary?.allowUserAlertCollapsing
const showApproximatePrefixAccessLegs =
config?.itinerary?.showApproximatePrefixAccessLegs

// Support OTP1 flex messages in Trip Details
// Adding empty pickupBookingInfo and dropOffBookingInfo objects
Expand Down Expand Up @@ -134,6 +136,7 @@ class ConnectedItineraryBody extends Component {
setMainPanelContent(MainPanelContent.TRIP_VIEWER)
}}
showAgencyInfo
showApproximateAccessLegTravelTimes={showApproximatePrefixAccessLegs}
showElevationProfile={config.elevationProfile}
showLegIcon
showMapButtonColumn={false}
Expand All @@ -144,7 +147,10 @@ class ConnectedItineraryBody extends Component {
TransitLegSubheader={TransitLegSubheader}
TransitLegSummary={TransitLegSummary}
/>
<TripDetails itinerary={clonedItinerary} />
<TripDetails
itinerary={clonedItinerary}
showApproximateMinutesActive={showApproximatePrefixAccessLegs}
/>
<TripTools itinerary={clonedItinerary} />
</ItineraryBodyContainer>
)
Expand Down
1 change: 1 addition & 0 deletions lib/util/config-types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -280,6 +280,7 @@ export interface ItineraryConfig {
previewOverlay?: boolean
renderRouteNamesInBlocks?: boolean
showAllWalkLegs?: boolean
showApproximatePrefixAccessLegs?: boolean
showFirstResultByDefault?: boolean
showHeaderText?: boolean
showLegDurations?: boolean
Expand Down
18 changes: 9 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,27 +42,27 @@
"@bugsnag/js": "^7.17.0",
"@bugsnag/plugin-react": "^7.17.0",
"@floating-ui/react": "^0.19.2",
"@opentripplanner/base-map": "^3.1.0",
"@opentripplanner/building-blocks": "^1.0.3",
"@opentripplanner/core-utils": "^11.4.1",
"@opentripplanner/base-map": "^3.2.0",
"@opentripplanner/building-blocks": "^1.1.0",
"@opentripplanner/core-utils": "^11.4.2",
"@opentripplanner/endpoints-overlay": "^2.1.1",
"@opentripplanner/from-to-location-picker": "^2.1.13",
"@opentripplanner/geocoder": "^3.0.1",
"@opentripplanner/humanize-distance": "^1.2.0",
"@opentripplanner/icons": "^2.0.10",
"@opentripplanner/itinerary-body": "^5.3.2",
"@opentripplanner/icons": "^2.0.11",
"@opentripplanner/itinerary-body": "^5.3.3",
"@opentripplanner/location-field": "^2.0.20",
"@opentripplanner/location-icon": "^1.4.1",
"@opentripplanner/map-popup": "^3.1.0",
"@opentripplanner/map-popup": "^3.1.1",
"@opentripplanner/otp2-tile-overlay": "^1.0.12",
"@opentripplanner/park-and-ride-overlay": "^2.0.8",
"@opentripplanner/printable-itinerary": "^2.0.21",
"@opentripplanner/route-viewer-overlay": "^2.0.15",
"@opentripplanner/stop-viewer-overlay": "^2.0.8",
"@opentripplanner/stops-overlay": "^5.2.2",
"@opentripplanner/stops-overlay": "^5.3.0",
"@opentripplanner/transit-vehicle-overlay": "^4.0.11",
"@opentripplanner/transitive-overlay": "^3.0.18",
"@opentripplanner/trip-details": "^5.0.12",
"@opentripplanner/trip-details": "^5.0.13",
"@opentripplanner/trip-form": "^3.6.2",
"@opentripplanner/trip-viewer-overlay": "^2.0.8",
"@opentripplanner/vehicle-rental-overlay": "^2.1.7",
Expand Down Expand Up @@ -140,7 +140,7 @@
"@graphql-tools/schema": "^10.0.0",
"@jackwilsdon/craco-use-babelrc": "^1.0.0",
"@opentripplanner/scripts": "^1.2.0",
"@opentripplanner/types": "^6.5.0",
"@opentripplanner/types": "^6.5.1",
"@percy/cli": "^1.20.3",
"@percy/puppeteer": "^2.0.2",
"@pmmmwh/react-refresh-webpack-plugin": "^0.5.1",
Expand Down
143 changes: 44 additions & 99 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2383,39 +2383,22 @@
dependencies:
"@octokit/openapi-types" "^10.0.0"

"@opentripplanner/base-map@^3.0.16", "@opentripplanner/base-map@^3.1.0":
version "3.1.0"
resolved "https://registry.yarnpkg.com/@opentripplanner/base-map/-/base-map-3.1.0.tgz#3181d4ec17029db8a40ca1342e20d1a0d449931f"
integrity sha512-feOSOWmiBFvIFWyG+OllCMxOcTmRKzxIoKKeoEgUFjNdVnrkZM6HH5r0m5IaQA9wO7T0N0K64hn/zdRQZBv0rQ==
"@opentripplanner/base-map@^3.0.16", "@opentripplanner/base-map@^3.1.0", "@opentripplanner/base-map@^3.2.0":
version "3.2.0"
resolved "https://registry.yarnpkg.com/@opentripplanner/base-map/-/base-map-3.2.0.tgz#db4410319d9614077ec925d739165a998c4a2485"
integrity sha512-d/yTKEnXqrw9pXhSvCERT+wLFa077Xr4wEFu4pYB+WYoZFflNxuTuAXXjm268HS/d0kjNndkjSMkxaKk6AjsvA==
dependencies:
"@opentripplanner/map-popup" "^3.1.0"
mapbox-gl "npm:[email protected]"
maplibre-gl "^2.1.9"
react-map-gl "^7.0.15"

"@opentripplanner/building-blocks@^1.0.3":
version "1.0.3"
resolved "https://registry.yarnpkg.com/@opentripplanner/building-blocks/-/building-blocks-1.0.3.tgz#74de32daba0d7fae7d10d5738db6d2f2824da3dd"
integrity sha512-065pZZTzR+qisgbvJd9swhitMMin1/ooMwuzqqRknsKYK+wOGge3Y3sbgQZATyjR/oH43uF0P2ZhGcbgqgM+YQ==

"@opentripplanner/core-utils@^11.2.3", "@opentripplanner/core-utils@^11.3.1", "@opentripplanner/core-utils@^11.4.1":
version "11.4.1"
resolved "https://registry.yarnpkg.com/@opentripplanner/core-utils/-/core-utils-11.4.1.tgz#9ccfed82f9a05078bd8e815dd4025af164e37acb"
integrity sha512-5FZT0ESVctyoO3V0W80QMZuzAc8hEYZxLAyrEARYXNeAHnBNxngGGMj7QMLK4JZgJDESnNietSRnBJd2MBWhOw==
dependencies:
"@conveyal/lonlat" "^1.4.1"
"@mapbox/polyline" "^1.1.0"
"@opentripplanner/geocoder" "^2.2.2"
"@styled-icons/foundation" "^10.34.0"
"@turf/along" "^6.0.1"
chroma-js "^2.4.2"
date-fns "^2.28.0"
date-fns-tz "^1.2.2"
graphql "^16.6.0"
lodash.clonedeep "^4.5.0"
lodash.isequal "^4.5.0"
qs "^6.9.1"
"@opentripplanner/building-blocks@^1.1.0":
version "1.1.0"
resolved "https://registry.yarnpkg.com/@opentripplanner/building-blocks/-/building-blocks-1.1.0.tgz#ef9fe862ce0a3e92c9a6c2c2db749a9a02deebd5"
integrity sha512-nx7pU1zIZzJcSkCFYyZ7gt+jd0gXj7bjx8rXn1msgF5uLWmtN/70dsmYNEApeA7haC076KOO3B/Jh44YfXG95g==

"@opentripplanner/core-utils@^11.4.0":
"@opentripplanner/core-utils@^11.2.3", "@opentripplanner/core-utils@^11.4.0", "@opentripplanner/core-utils@^11.4.2":
version "11.4.2"
resolved "https://registry.yarnpkg.com/@opentripplanner/core-utils/-/core-utils-11.4.2.tgz#cc6034fb80ccda44e50f7f0a1e80a7bad8387f84"
integrity sha512-EVYVN73Cgf9IC+uya49843MFJnVkmv0nHAjsQwmPGSx/w5fY49X4fSpDprL7Bn+MTzk58U2udDsn6OzKmV0JdA==
Expand Down Expand Up @@ -2445,33 +2428,14 @@
"@styled-icons/fa-solid" "^10.34.0"
flat "^5.0.2"

"@opentripplanner/from-to-location-picker@^2.1.11", "@opentripplanner/from-to-location-picker@^2.1.12":
version "2.1.12"
resolved "https://registry.yarnpkg.com/@opentripplanner/from-to-location-picker/-/from-to-location-picker-2.1.12.tgz#c091415f3bebc764b85b59b9a60af971bc56d253"
integrity sha512-xFRKGegls6IWJqNAeMrmP1yc7l+TEFT5x7KEO0CjwCGgMKv5Fkr1GcCXcorD90MNkFr8udux0KpXjwNDYzox9g==
dependencies:
"@opentripplanner/location-icon" "^1.4.1"
flat "^5.0.2"

"@opentripplanner/from-to-location-picker@^2.1.13":
"@opentripplanner/from-to-location-picker@^2.1.11", "@opentripplanner/from-to-location-picker@^2.1.12", "@opentripplanner/from-to-location-picker@^2.1.13":
version "2.1.13"
resolved "https://registry.yarnpkg.com/@opentripplanner/from-to-location-picker/-/from-to-location-picker-2.1.13.tgz#d13acd582929175c676cd4303a6cdc6e1c289d99"
integrity sha512-6/7+wYQuuQhnGvxkDQcvoACdmuwUL1BlPqBIUFwyBpkdJ1VQGZiUSAAZTxXdY1Fv/p5mKR1vRsvZgtSPhcxgcg==
dependencies:
"@opentripplanner/location-icon" "^1.4.1"
flat "^5.0.2"

"@opentripplanner/geocoder@^2.2.2":
version "2.2.2"
resolved "https://registry.yarnpkg.com/@opentripplanner/geocoder/-/geocoder-2.2.2.tgz#8ddc669287ccdfff1a5cce14d1fa8049421c6480"
integrity sha512-tJIOOE5N9kpMj0ji1YyVfWwg4yAFVs7Ks+EET67acql768bXwRE6rHoX6oaHvKhbCDjaQ7kuPIwi1BYWHQgg0Q==
dependencies:
"@conveyal/geocoder-arcgis-geojson" "^0.0.3"
"@conveyal/lonlat" "^1.4.1"
"@leeoniya/ufuzzy" "^1.0.14"
isomorphic-mapzen-search "^1.6.1"
lodash.memoize "^4.1.2"

"@opentripplanner/geocoder@^3.0.0", "@opentripplanner/geocoder@^3.0.1":
version "3.0.1"
resolved "https://registry.yarnpkg.com/@opentripplanner/geocoder/-/geocoder-3.0.1.tgz#834960bc52f515e1223346a8002fb847674d33bc"
Expand All @@ -2488,36 +2452,18 @@
resolved "https://registry.yarnpkg.com/@opentripplanner/humanize-distance/-/humanize-distance-1.2.0.tgz#71cf5d5d1b756adef15300edbba0995ccd4b35ee"
integrity sha512-x0QRXMDhypFeazZ6r6vzrdU8vhiV56nZ/WX6zUbxpgp6T9Oclw0gwR2Zdw6DZiiFpSYVNeVNxVzZwsu6NRGjcA==

"@opentripplanner/icons@^2.0.10":
version "2.0.10"
resolved "https://registry.yarnpkg.com/@opentripplanner/icons/-/icons-2.0.10.tgz#688e75190ebe772ad45bb852517e93bdde28df74"
integrity sha512-9X6kV6jDsNnQT4foZU9X530zTN7kjYLtWBjWmeA5EVHth0qZx5T3iFjzqeG4wK+rwZKUMLGS5lAhLIQdaXKZMQ==
"@opentripplanner/icons@^2.0.10", "@opentripplanner/icons@^2.0.11":
version "2.0.11"
resolved "https://registry.yarnpkg.com/@opentripplanner/icons/-/icons-2.0.11.tgz#08ac56bee164c988748fb2b94a60e9e932dfbb3f"
integrity sha512-VOdp/SGn/bnVIQCdqGrLwqI0EFexw7eIuHIP1yNYGgDZETO2d6f/FUr6suw69Y59/4l6CoZvGZD5jCPi2vz/bA==
dependencies:
"@opentripplanner/core-utils" "^11.2.3"
"@opentripplanner/core-utils" "^11.4.0"
prop-types "^15.7.2"

"@opentripplanner/itinerary-body@^5.2.6", "@opentripplanner/itinerary-body@^5.3.0":
version "5.3.0"
resolved "https://registry.yarnpkg.com/@opentripplanner/itinerary-body/-/itinerary-body-5.3.0.tgz#1a611dc6c49438666e58c34d0f1f88ab6ff48f2d"
integrity sha512-yNMluEX4jJMEdvObGcivnJCS8wMqzZ1j+zJ/40oE9uK9XNyT6o3ascpcsDPN45ZJTIUBoj1FVhItvrfLxaRYMA==
dependencies:
"@opentripplanner/core-utils" "^11.3.1"
"@opentripplanner/humanize-distance" "^1.2.0"
"@opentripplanner/icons" "^2.0.10"
"@opentripplanner/location-icon" "^1.4.1"
"@styled-icons/fa-solid" "^10.34.0"
"@styled-icons/foundation" "^10.34.0"
date-fns "^2.28.0"
date-fns-tz "^1.2.2"
flat "^5.0.2"
react-animate-height "^3.0.4"
react-resize-detector "^4.2.1"
string-similarity "^4.0.4"

"@opentripplanner/itinerary-body@^5.3.2":
version "5.3.2"
resolved "https://registry.yarnpkg.com/@opentripplanner/itinerary-body/-/itinerary-body-5.3.2.tgz#282c5963de16b165084d46f6e55d5afc3d563c87"
integrity sha512-1uatzGTnmlY5YoJFH+u4pznb/6MKUqai1/Rb91Kh4GfNwl8eMPQ3RmwGRWejOJEGtXMIlq7LJ5O8I6Swwc+1RQ==
"@opentripplanner/itinerary-body@^5.2.6", "@opentripplanner/itinerary-body@^5.3.0", "@opentripplanner/itinerary-body@^5.3.3":
version "5.3.3"
resolved "https://registry.yarnpkg.com/@opentripplanner/itinerary-body/-/itinerary-body-5.3.3.tgz#5202060ccd1a38fd6ed823331a00233a15305957"
integrity sha512-3G0szbSObrQh3uliQI6Hx62iCqqpxvrxGo7X69r28S7s8fexoI1B/3B4lRC0D14BUUPaOisE5Rc2N10SjI6MtQ==
dependencies:
"@opentripplanner/core-utils" "^11.4.0"
"@opentripplanner/humanize-distance" "^1.2.0"
Expand Down Expand Up @@ -2553,13 +2499,12 @@
"@styled-icons/fa-regular" "^10.34.0"
"@styled-icons/fa-solid" "^10.34.0"

"@opentripplanner/map-popup@^3.0.2", "@opentripplanner/map-popup@^3.1.0":
version "3.1.0"
resolved "https://registry.yarnpkg.com/@opentripplanner/map-popup/-/map-popup-3.1.0.tgz#51627e4d4c902d10bec6fffa2c3e3eed0994a42c"
integrity sha512-UzQ9OYOslNqDxvGWIPOZ4KyIJ7R0CO2riC56AJeHz5EI0JSv1Rlt1b6JTz0BtJ9cbHksB2QB43x8bJs6if7mfg==
"@opentripplanner/map-popup@^3.0.2", "@opentripplanner/map-popup@^3.1.0", "@opentripplanner/map-popup@^3.1.1":
version "3.1.1"
resolved "https://registry.yarnpkg.com/@opentripplanner/map-popup/-/map-popup-3.1.1.tgz#54f081162d328cc4bb0e89562f9ea200e29e01a1"
integrity sha512-yWBIPuYGw7biaRNIpglQm5+opZ+D5QQgXHLhKnYaCR0eNijjl9cx34lGXdyKPXt26S6MiyJZXL81uc6w6CnQ3A==
dependencies:
"@opentripplanner/base-map" "^3.1.0"
"@opentripplanner/core-utils" "^11.3.1"
"@opentripplanner/core-utils" "^11.4.0"
"@opentripplanner/from-to-location-picker" "^2.1.12"
flat "^5.0.2"

Expand Down Expand Up @@ -2615,14 +2560,14 @@
"@opentripplanner/base-map" "^3.0.16"
"@opentripplanner/core-utils" "^11.2.3"

"@opentripplanner/stops-overlay@^5.2.2":
version "5.2.2"
resolved "https://registry.yarnpkg.com/@opentripplanner/stops-overlay/-/stops-overlay-5.2.2.tgz#163dbc162c134113b5048905aa5cd2aabc47b807"
integrity sha512-1jYtHBvITWtE8pl4wXlfJ8X4SsoS3FWDPMVuUo05Rcefn8aGqr/AasaKa/wqsrvL1/vC9i+0ESSiu/BwSP8V2g==
"@opentripplanner/stops-overlay@^5.3.0":
version "5.3.0"
resolved "https://registry.yarnpkg.com/@opentripplanner/stops-overlay/-/stops-overlay-5.3.0.tgz#1f35927a769a5fac80e40cfdaf85a7275b90cec5"
integrity sha512-bQBH5vf/F8n7yL6zhWpiU1XyJOkarcZVLovKYGseJpLs+qnPUd+3MMK9W0cQAMn7iuxAjcDHmSNmeK99kwb3jw==
dependencies:
"@opentripplanner/base-map" "^3.0.16"
"@opentripplanner/from-to-location-picker" "^2.1.11"
"@opentripplanner/map-popup" "^3.0.2"
"@opentripplanner/base-map" "^3.1.0"
"@opentripplanner/from-to-location-picker" "^2.1.12"
"@opentripplanner/map-popup" "^3.1.0"
flat "^5.0.2"

"@opentripplanner/transit-vehicle-overlay@^4.0.11":
Expand Down Expand Up @@ -2652,10 +2597,10 @@
"@turf/midpoint" "^6.5.0"
lodash.isequal "^4.5.0"

"@opentripplanner/trip-details@^5.0.12":
version "5.0.12"
resolved "https://registry.yarnpkg.com/@opentripplanner/trip-details/-/trip-details-5.0.12.tgz#138d009722569d1cb3b97b552a4cf0a855a828ba"
integrity sha512-o+1JNwUYNCb33eQDQLL1aCKf9j88T6yZtDnlrJIysxiYGMsqFtug8+LdYkBJ4SyeO/FqiHk8Q+VLOxTqZgcYUQ==
"@opentripplanner/trip-details@^5.0.13":
version "5.0.13"
resolved "https://registry.yarnpkg.com/@opentripplanner/trip-details/-/trip-details-5.0.13.tgz#96b0171d78235246346139a85cff6a6f64a11e45"
integrity sha512-kjXCUrCzX9cJ1DoMS6OSkfZTFtzEfy4Kt4OjWAsUGbgguPumuvAJLu7LhH7KuAC6cOxxSldKqrCsUGAc7sogsQ==
dependencies:
"@opentripplanner/core-utils" "^11.4.0"
"@styled-icons/fa-solid" "^10.34.0"
Expand Down Expand Up @@ -2687,10 +2632,10 @@
"@opentripplanner/base-map" "^3.0.16"
"@opentripplanner/core-utils" "^11.2.3"

"@opentripplanner/types@^6.5.0":
version "6.5.0"
resolved "https://registry.yarnpkg.com/@opentripplanner/types/-/types-6.5.0.tgz#d8cca355bf30f0984283faa793113ad6c0dba38d"
integrity sha512-FllEyE+1WQ2GOSKXQOuzrk+OPcJEqr4+zacsHQLB9WVyfm5D/BPHR1/OjfuVngrwLTK5bKP8VlDRS1ba/R8rtg==
"@opentripplanner/types@^6.5.1":
version "6.5.1"
resolved "https://registry.yarnpkg.com/@opentripplanner/types/-/types-6.5.1.tgz#c19c73e051e516e187e79202de276f6ed3bbc59e"
integrity sha512-5S4otkjzlNLqcbDeMXy3Xi6tcPQgQRoyQZX+uvEdPOTzIERr7wJoltyQCBwi49GX99F+jqyRbd08TJ6SnLapbA==

"@opentripplanner/vehicle-rental-overlay@^2.1.7":
version "2.1.7"
Expand Down Expand Up @@ -4433,12 +4378,12 @@ anymatch@^3.0.0, anymatch@^3.0.3, anymatch@~3.1.2:
normalize-path "^3.0.0"
picomatch "^2.0.4"

aproba@^1.0.3, "aproba@^1.0.3 || ^2.0.0", aproba@^1.1.1:
aproba@^1.0.3, aproba@^1.1.1:
version "1.2.0"
resolved "https://registry.yarnpkg.com/aproba/-/aproba-1.2.0.tgz#6802e6264efd18c790a1b0d517f0f2627bf2c94a"
integrity sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw==

aproba@^2.0.0:
"aproba@^1.0.3 || ^2.0.0", aproba@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/aproba/-/aproba-2.0.0.tgz#52520b8ae5b569215b354efc0caa3fe1e45a8adc"
integrity sha512-lYe4Gx7QT+MKGbDsA+Z+he/Wtef0BiwDOlK/XkBrdfsh9J/jPPXbX0tE9x9cl27Tmu5gg3QUbUrQYa/y+KOHPQ==
Expand Down Expand Up @@ -17204,14 +17149,14 @@ [email protected]:
dependencies:
ansi-regex "^5.0.0"

strip-ansi@^3.0.0, strip-ansi@^3.0.1, "strip-ansi@^3.0.1 || ^4.0.0":
strip-ansi@^3.0.0, strip-ansi@^3.0.1:
version "3.0.1"
resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-3.0.1.tgz#6a385fb8853d952d5ff05d0e8aaf94278dc63dcf"
integrity sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=
dependencies:
ansi-regex "^2.0.0"

strip-ansi@^4.0.0:
"strip-ansi@^3.0.1 || ^4.0.0", strip-ansi@^4.0.0:
version "4.0.0"
resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-4.0.0.tgz#a8479022eb1ac368a871389b635262c505ee368f"
integrity sha1-qEeQIusaw2iocTibY1JixQXuNo8=
Expand Down

0 comments on commit 458933d

Please sign in to comment.