From 4a12934a3e1875e2b62921c6722b1dd2dfe97b33 Mon Sep 17 00:00:00 2001 From: miles-grant-ibigroup Date: Fri, 15 Oct 2021 12:18:48 +0100 Subject: [PATCH 01/26] fix(connected-route-viewer-overlay): don't crash on viewing route with no patterns --- .../map/connected-route-viewer-overlay.js | 2 +- lib/components/viewers/route-details.js | 50 +++++++++---------- 2 files changed, 26 insertions(+), 26 deletions(-) diff --git a/lib/components/map/connected-route-viewer-overlay.js b/lib/components/map/connected-route-viewer-overlay.js index e9fab5969..adb99c8a4 100644 --- a/lib/components/map/connected-route-viewer-overlay.js +++ b/lib/components/map/connected-route-viewer-overlay.js @@ -10,7 +10,7 @@ const mapStateToProps = (state, ownProps) => { viewedRoute && state.otp.transitIndex.routes ? state.otp.transitIndex.routes[viewedRoute.routeId] : null - let filteredPatterns = routeData?.patterns + let filteredPatterns = routeData?.patterns || [] // If a pattern is selected, hide all other patterns if (viewedRoute?.patternId && routeData?.patterns) { diff --git a/lib/components/viewers/route-details.js b/lib/components/viewers/route-details.js index 35216bd21..9876640c4 100644 --- a/lib/components/viewers/route-details.js +++ b/lib/components/viewers/route-details.js @@ -149,31 +149,31 @@ class RouteDetails extends Component { )} - -

- -

- {headsigns && - } -
+ {headsigns && headsigns.length > 0 && + +

+ +

+ +
} {pattern && ( setHoveredStop(null)} From 4220102d4aa92a7a90413cf4959cefea2db30024 Mon Sep 17 00:00:00 2001 From: miles-grant-ibigroup Date: Mon, 18 Oct 2021 11:15:30 +0100 Subject: [PATCH 02/26] refactor(connected-park-and-ride-overlay): avoid crash on empty Park and Ride list --- lib/components/map/connected-park-and-ride-overlay.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/components/map/connected-park-and-ride-overlay.js b/lib/components/map/connected-park-and-ride-overlay.js index 90b42c7ee..f3d152c1c 100644 --- a/lib/components/map/connected-park-and-ride-overlay.js +++ b/lib/components/map/connected-park-and-ride-overlay.js @@ -27,7 +27,7 @@ class ConnectedParkAndRideOverlay extends Component { const mapStateToProps = (state, ownProps) => { return { - parkAndRideLocations: state.otp.overlay.parkAndRide && + parkAndRideLocations: state.otp.overlay.parkAndRide?.locations && state.otp.overlay.parkAndRide.locations } } From d1d8528414b0bc61e045ecb5201352375e7c7069 Mon Sep 17 00:00:00 2001 From: miles-grant-ibigroup Date: Tue, 19 Oct 2021 11:54:06 +0100 Subject: [PATCH 03/26] feature(default-itinerary): add flex itinerary notice --- .../narrative/default/default-itinerary.js | 5 ++++- .../narrative/default/flex-indicator.js | 11 +++++++++++ lib/components/narrative/default/itinerary.css | 17 +++++++++++------ 3 files changed, 26 insertions(+), 7 deletions(-) create mode 100644 lib/components/narrative/default/flex-indicator.js diff --git a/lib/components/narrative/default/default-itinerary.js b/lib/components/narrative/default/default-itinerary.js index 6dcecd092..278cbbfad 100644 --- a/lib/components/narrative/default/default-itinerary.js +++ b/lib/components/narrative/default/default-itinerary.js @@ -13,6 +13,7 @@ import FormattedTimeRange from '../../util/formatted-time-range' import { getTotalFare } from '../../../util/state' import ItinerarySummary from './itinerary-summary' +import { FlexIndicator } from './flex-indicator' const { isBicycle, isMicromobility, isTransit } = coreUtils.itinerary @@ -177,6 +178,7 @@ class DefaultItinerary extends NarrativeItinerary { format: timeFormat, offset: coreUtils.itinerary.getTimeZoneOffset(itinerary) } + const isFlexItinerary = itinerary.legs.some(coreUtils.itinerary.isFlex) return (
+
+ {isFlexItinerary && FIXME: Flex Notice}
    {ITINERARY_ATTRIBUTES .sort((a, b) => { @@ -220,7 +224,6 @@ class DefaultItinerary extends NarrativeItinerary { }) }
- {(active && !expanded) && diff --git a/lib/components/narrative/default/flex-indicator.js b/lib/components/narrative/default/flex-indicator.js new file mode 100644 index 000000000..0742aec36 --- /dev/null +++ b/lib/components/narrative/default/flex-indicator.js @@ -0,0 +1,11 @@ +// Craco will require this. FIXME: remove line once migrated to craco +// eslint-disable-next-line no-unused-vars +import React from 'react' +import styled from 'styled-components' + +export const FlexIndicator = styled.b` + border: 5px dashed pink; + word-wrap: break-word; + max-width: 100px; + height: 80px; +` diff --git a/lib/components/narrative/default/itinerary.css b/lib/components/narrative/default/itinerary.css index 63bdb7bec..1a38c9e27 100644 --- a/lib/components/narrative/default/itinerary.css +++ b/lib/components/narrative/default/itinerary.css @@ -32,12 +32,15 @@ .otp .option.default-itin > .header { font-size: 16px; cursor: pointer; + display: flex; + justify-content: space-between; } .otp .option.default-itin > .header > .title { font-weight: 500; font-size: large; display: inline; + flex: 2; } .otp .option.default-itin > .header > .itinerary-attributes { @@ -54,23 +57,25 @@ font-size: x-large; } -.otp .option.default-itin > .header > .summary { +.otp .option.default-itin > .header > .title > .summary { /* text-align: center; */ - margin: 8px 0px; + margin: 0px 0px; } -.otp .option.default-itin > .header > .summary > .summary-block { +.otp .option.default-itin > .header > .title > .summary > .summary-block { display: inline-block; vertical-align: middle; - margin: 0px 2px; +} +.otp .option.default-itin > .header > .title > .summary > .summary-block > svg { + margin-bottom: 2px; } -.otp .option.default-itin > .header > .summary > .mode-block { +.otp .option.default-itin > .header > .title > .summary > .mode-block { height: 18px; width: 18px; } -.otp .option.default-itin > .header > .summary > .arrow-block { +.otp .option.default-itin > .header > .title > .summary > .arrow-block { padding-top: 4px; font-size: 13px; } From 7a3293e0582f20ed4ed318e219d5196773119946 Mon Sep 17 00:00:00 2001 From: miles-grant-ibigroup Date: Tue, 19 Oct 2021 12:05:29 +0100 Subject: [PATCH 04/26] refactor(tabbed-itineraries): show flex status --- lib/components/narrative/tabbed-itineraries.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/components/narrative/tabbed-itineraries.js b/lib/components/narrative/tabbed-itineraries.js index 1352e542e..e0d4eaf52 100644 --- a/lib/components/narrative/tabbed-itineraries.js +++ b/lib/components/narrative/tabbed-itineraries.js @@ -128,6 +128,8 @@ class TabButton extends Component { } = calculateFares(itinerary) // TODO: support non-USD const minTotalFare = minTNCFare * 100 + transitFare + const mustCallAhead = itinerary.legs.some(coreUtils.itinerary.isOptional) + if (isActive) classNames.push('selected') return (
- {isFlexItinerary && } + {isFlexItinerary && }
    {ITINERARY_ATTRIBUTES .sort((a, b) => { diff --git a/lib/components/narrative/default/flex-indicator.js b/lib/components/narrative/default/flex-indicator.js index fe4027c53..7569b8864 100644 --- a/lib/components/narrative/default/flex-indicator.js +++ b/lib/components/narrative/default/flex-indicator.js @@ -1,79 +1,97 @@ // Craco will require this. FIXME: remove line once migrated to craco // eslint-disable-next-line no-unused-vars +import { barberPole } from '@opentripplanner/itinerary-body/lib/otp-react-redux/line-column-content' +import { FormattedMessage } from 'react-intl' import React from 'react' import styled from 'styled-components' import tinycolor from 'tinycolor2' -import { barberPole } from '@opentripplanner/itinerary-body/lib/otp-react-redux/line-column-content' -import { FormattedMessage } from 'react-intl' import Icon from '../../util/icon' export const FLEX_COLOR = '#FA6400' const FLEX_COLOR_LIGHT = tinycolor(FLEX_COLOR).lighten(40).toHexString() -export const FlexIndicator = ({isCallAhead, isContinuousDropoff}) => - -

    - {isCallAhead && } />} - {/* Only show continuous dropoff message if call ahead message isn't shown */} - {isContinuousDropoff && !isCallAhead && } />} -
    - -const FlexNotice = ({ faKey, text }) => ( +const FlexNotice = ({ faKey, showText, text }) => ( <> -

    {text}

    + {showText &&

    {text}

    } ) const FlexIndicatorWrapper = styled.div` - background: ${FLEX_COLOR_LIGHT}; - border-bottom-right-radius: 8px; - border-top-right-radius: 8px; - color: ${FLEX_COLOR}; - display: grid; - grid-template-columns: 1fr 2fr 3fr 2fr; - grid-template-rows: 1fr 2fr; - height: 80px; - margin-right: 1em; - max-width: 190px; - padding-right: 0.25em; - padding-top: 0.25em; + background: ${FLEX_COLOR_LIGHT}; + border-bottom-right-radius: 8px; + border-top-right-radius: 8px; + color: ${FLEX_COLOR}; + display: grid; + grid-template-columns: 1fr 2fr 3fr 2fr; + grid-template-rows: 1fr 2fr; + grid-column-gap: ${(props) => (props.shrink ? '8px' : 'inherit')}; + height: ${(props) => (props.shrink ? '40px' : '80px')}; + margin-right: 1em; + max-width: ${(props) => (props.shrink ? '60px' : '190px')}; + padding-right: 0.25em; + padding-top: 0.25em; - /* "Flex Service" text */ - h4 { - grid-column: 3 / span 2; - grid-row: 1; - margin: 0; - padding-top: 2px; - text-align: left; - } + /* "Flex Service" text */ + h4 { + grid-column: 3 / span 2; + grid-row: 1; + margin: 0; + padding-top: 2px; + text-align: left; + } - /* Icon (phone or hand) */ - span { - font-size: 32px; - grid-column: 2; - grid-row: 2; - height: 100%; - width: 100%; - } + /* Icon (phone or hand) */ + span { + font-size: 32px; + grid-column: 2; + grid-row: 2; + height: 100%; + width: 100%; + } - /* Description text */ - p { - font-size: 13px; - grid-column: 3 / span 2; - grid-row: 2; - } + /* Description text */ + p { + font-size: 13px; + grid-column: 3 / span 2; + grid-row: 2; + } - /* Barber pole at left */ - &::before { - background: ${barberPole(FLEX_COLOR)}; - content: ''; - display: block; - grid-row: 1 / span 2; - height: inherit; - margin-top: -0.25em; - position: relative; - width: 20px; - } + /* Barber pole at left */ + &::before { + background: ${barberPole(FLEX_COLOR)}; + content: ''; + display: block; + grid-row: 1 / span 2; + height: inherit; + margin-top: -0.25em; + position: relative; + width: 20px; + } ` + +export const FlexIndicator = ({ isCallAhead, isContinuousDropoff, shrink }) => ( + + {!shrink && ( +

    + +

    + )} + {isCallAhead && ( + } + /> + )} + {/* Only show continuous dropoff message if call ahead message isn't shown */} + {isContinuousDropoff && !isCallAhead && ( + } + /> + )} +
    +) From 42103cd603e485148413dc0ed66c7ffa64b8134c Mon Sep 17 00:00:00 2001 From: miles-grant-ibigroup Date: Tue, 26 Oct 2021 14:40:50 +0100 Subject: [PATCH 16/26] feat(actions/api): route only flex requests to otp2 server --- example-config.yml | 7 +++++++ lib/actions/api.js | 8 +++++++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/example-config.yml b/example-config.yml index 6d302511b..553b77ef0 100644 --- a/example-config.yml +++ b/example-config.yml @@ -2,6 +2,13 @@ api: host: http://localhost path: /otp/routers/default port: 8001 + +# Support OTP-2 in parallel for certain requests +# api_v2: +# host: http://localhost +# path: /otp/routers/default +# port: 8002 + # Add suggested locations to be shown as options in the form view. # locations: # - id: 'airport' diff --git a/lib/actions/api.js b/lib/actions/api.js index c79cbb6cf..ab78e61b0 100644 --- a/lib/actions/api.js +++ b/lib/actions/api.js @@ -252,9 +252,15 @@ function getOtpFetchOptions (state, includeToken = false) { function constructRoutingQuery (state, ignoreRealtimeUpdates, injectedParams = {}) { const { config, currentQuery } = state.otp const routingType = currentQuery.routingType + const routingMode = injectedParams?.mode || currentQuery.mode + // Check for routingType-specific API config; if none, use default API const rt = config.routingTypes && config.routingTypes.find(rt => rt.key === routingType) - const api = (rt && rt.api) || config.api + + // Certain requests will require OTP-2. If an OTP-2 host is specified, set it to be used + const useOtp2 = !!config.api_v2 && routingMode.includes('FLEX') + + const api = (rt && rt.api) || (useOtp2 && config.api_v2) || config.api const planEndpoint = `${api.host}${api.port ? ':' + api.port : ''}${api.path}/plan` From a0ce19920724baa63d7c8e007d5d778f6fb8ceb0 Mon Sep 17 00:00:00 2001 From: miles-grant-ibigroup Date: Mon, 1 Nov 2021 15:05:56 +0000 Subject: [PATCH 17/26] improvement(flex-indicator): display flex phone number from bookingInfo --- .../narrative/default/default-itinerary.js | 20 ++++++++++++++++++- .../narrative/default/flex-indicator.js | 6 ++++-- .../narrative/tabbed-itineraries.js | 2 +- 3 files changed, 24 insertions(+), 4 deletions(-) diff --git a/lib/components/narrative/default/default-itinerary.js b/lib/components/narrative/default/default-itinerary.js index 5850acc5a..b881f03d5 100644 --- a/lib/components/narrative/default/default-itinerary.js +++ b/lib/components/narrative/default/default-itinerary.js @@ -183,6 +183,17 @@ class DefaultItinerary extends NarrativeItinerary { const isCallAhead = itinerary.legs.some(coreUtils.itinerary.isOptional) const isContinuousDropoff = itinerary.legs.some(coreUtils.itinerary.isContinuousDropoff) + // Use first leg's agency as a fallback + const agency = itinerary.legs.map(leg => leg?.agencyName).filter(name => !!name)[0] + let phone = `contact ${agency}` + + if (isCallAhead) { + // Picking 0 ensures that if multiple flex legs with + // different phone numbers, the first leg is prioritized + phone = itinerary.legs + .map((leg) => leg.pickupBookingInfo.contactInfo.phoneNumber) + .filter((number) => !!number)[0] + } return (
    - {isFlexItinerary && } + {isFlexItinerary && ( + + )}
      {ITINERARY_ATTRIBUTES .sort((a, b) => { diff --git a/lib/components/narrative/default/flex-indicator.js b/lib/components/narrative/default/flex-indicator.js index 7569b8864..c4cdaa356 100644 --- a/lib/components/narrative/default/flex-indicator.js +++ b/lib/components/narrative/default/flex-indicator.js @@ -56,6 +56,8 @@ const FlexIndicatorWrapper = styled.div` font-size: 13px; grid-column: 3 / span 2; grid-row: 2; + text-overflow: ellipsis; + overflow-y: hidden; } /* Barber pole at left */ @@ -71,7 +73,7 @@ const FlexIndicatorWrapper = styled.div` } ` -export const FlexIndicator = ({ isCallAhead, isContinuousDropoff, shrink }) => ( +export const FlexIndicator = ({ isCallAhead, isContinuousDropoff, phoneNumber, shrink }) => ( {!shrink && (

      @@ -82,7 +84,7 @@ export const FlexIndicator = ({ isCallAhead, isContinuousDropoff, shrink }) => ( } + text={} /> )} {/* Only show continuous dropoff message if call ahead message isn't shown */} diff --git a/lib/components/narrative/tabbed-itineraries.js b/lib/components/narrative/tabbed-itineraries.js index a358f8f9e..dac1fcc25 100644 --- a/lib/components/narrative/tabbed-itineraries.js +++ b/lib/components/narrative/tabbed-itineraries.js @@ -148,7 +148,7 @@ class TabButton extends Component { {mustCallAhead && - + } {/* The itinerary duration in hrs/mins */} From e550df2baeffbd90c6c84de8e084d678a5677e5d Mon Sep 17 00:00:00 2001 From: miles-grant-ibigroup Date: Fri, 5 Nov 2021 08:18:54 +0000 Subject: [PATCH 18/26] refactor: adjust to latest core-utils changes --- lib/components/narrative/default/default-itinerary.js | 2 +- lib/components/narrative/tabbed-itineraries.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/components/narrative/default/default-itinerary.js b/lib/components/narrative/default/default-itinerary.js index b881f03d5..132ef7309 100644 --- a/lib/components/narrative/default/default-itinerary.js +++ b/lib/components/narrative/default/default-itinerary.js @@ -180,7 +180,7 @@ class DefaultItinerary extends NarrativeItinerary { offset: coreUtils.itinerary.getTimeZoneOffset(itinerary) } const isFlexItinerary = itinerary.legs.some(coreUtils.itinerary.isFlex) - const isCallAhead = itinerary.legs.some(coreUtils.itinerary.isOptional) + const isCallAhead = itinerary.legs.some(coreUtils.itinerary.isReservationRequired) const isContinuousDropoff = itinerary.legs.some(coreUtils.itinerary.isContinuousDropoff) // Use first leg's agency as a fallback diff --git a/lib/components/narrative/tabbed-itineraries.js b/lib/components/narrative/tabbed-itineraries.js index dac1fcc25..602737e6e 100644 --- a/lib/components/narrative/tabbed-itineraries.js +++ b/lib/components/narrative/tabbed-itineraries.js @@ -130,7 +130,7 @@ class TabButton extends Component { } = calculateFares(itinerary) // TODO: support non-USD const minTotalFare = minTNCFare * 100 + transitFare - const mustCallAhead = itinerary.legs.some(coreUtils.itinerary.isOptional) + const mustCallAhead = itinerary.legs.some(coreUtils.itinerary.isReservationRequired) if (isActive) classNames.push('selected') return ( From 61d4a11761e8f38056e810e45bfe57a18d368668 Mon Sep 17 00:00:00 2001 From: miles-grant-ibigroup Date: Tue, 9 Nov 2021 12:12:33 +0000 Subject: [PATCH 19/26] refactor(default-itinerary): don't crash on missing bookingInfo --- lib/components/narrative/default/default-itinerary.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/components/narrative/default/default-itinerary.js b/lib/components/narrative/default/default-itinerary.js index b44bcdaa5..f22520213 100644 --- a/lib/components/narrative/default/default-itinerary.js +++ b/lib/components/narrative/default/default-itinerary.js @@ -222,7 +222,7 @@ class DefaultItinerary extends NarrativeItinerary { // Picking 0 ensures that if multiple flex legs with // different phone numbers, the first leg is prioritized phone = itinerary.legs - .map((leg) => leg.pickupBookingInfo.contactInfo.phoneNumber) + .map((leg) => leg.pickupBookingInfo?.contactInfo?.phoneNumber) .filter((number) => !!number)[0] } return ( From be719772537a753b6e7adc2f4741032a487efc99 Mon Sep 17 00:00:00 2001 From: miles-grant-ibigroup Date: Tue, 9 Nov 2021 12:50:22 +0000 Subject: [PATCH 20/26] fix(default-itinerary): show detailsHint at correct spot --- lib/components/narrative/default/default-itinerary.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/components/narrative/default/default-itinerary.js b/lib/components/narrative/default/default-itinerary.js index f22520213..ec631419b 100644 --- a/lib/components/narrative/default/default-itinerary.js +++ b/lib/components/narrative/default/default-itinerary.js @@ -286,11 +286,6 @@ class DefaultItinerary extends NarrativeItinerary { })}

    - {active && !expanded && ( - - - - )} {active && expanded && ( <> @@ -304,6 +299,11 @@ class DefaultItinerary extends NarrativeItinerary { /> )} + {active && !expanded && ( + + + + )} ) } From 690dadd468e07b649c7f3b17a346978ac08e0dd8 Mon Sep 17 00:00:00 2001 From: miles-grant-ibigroup Date: Tue, 9 Nov 2021 12:57:47 +0000 Subject: [PATCH 21/26] fix(default-itinerary): don't shrink flexIndicator --- lib/components/narrative/default/default-itinerary.js | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/components/narrative/default/default-itinerary.js b/lib/components/narrative/default/default-itinerary.js index ec631419b..a973dbcf2 100644 --- a/lib/components/narrative/default/default-itinerary.js +++ b/lib/components/narrative/default/default-itinerary.js @@ -255,7 +255,6 @@ class DefaultItinerary extends NarrativeItinerary { isCallAhead={isCallAhead} isContinuousDropoff={isContinuousDropoff} phoneNumber={phone} - shrink={active && !expanded} /> )}
      From 28debeb265a4b4669dd1cf99494a1a1392e07007 Mon Sep 17 00:00:00 2001 From: miles-grant-ibigroup Date: Tue, 9 Nov 2021 13:20:48 +0000 Subject: [PATCH 22/26] improvement(actions/api): re-attempt failed calls with otp2 instance if present --- lib/actions/api.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/actions/api.js b/lib/actions/api.js index 1d1df1f3e..7be2d57d3 100644 --- a/lib/actions/api.js +++ b/lib/actions/api.js @@ -921,6 +921,10 @@ function createQueryAction (endpoint, responseAction, errorAction, options = {}) try { const response = await fetch(url, getOtpFetchOptions(state)) if (response.status >= 400) { + // If a second endpoint is configured, try that before failing + if (!!config.api_v2 && !options.v2) { + return dispatch(createQueryAction(endpoint, responseAction, errorAction, {...options, v2: true})) + } const error = new Error('Received error from server') error.response = response throw error @@ -960,7 +964,7 @@ function makeApiUrl (config, endpoint, options) { console.log('Using alt service for ' + options.serviceId) url = config.alternateTransitIndex.apiRoot + endpoint } else { - const api = config.api + const api = options.v2 ? config.api_v2 : config.api url = `${api.host}${api.port ? ':' + api.port : ''}${api.path}/${endpoint}` } return url From fa1112dc9168b8a2f61dff7d3801129532f28fb2 Mon Sep 17 00:00:00 2001 From: miles-grant-ibigroup Date: Fri, 19 Nov 2021 11:29:12 +0000 Subject: [PATCH 23/26] chore(deps): update otp-ui --- package.json | 6 ++--- yarn.lock | 72 ++++++++++++++++++++++++++++++++++++++++------------ 2 files changed, 59 insertions(+), 19 deletions(-) diff --git a/package.json b/package.json index 9c9410a5c..a8ba74c0c 100644 --- a/package.json +++ b/package.json @@ -34,13 +34,13 @@ "dependencies": { "@auth0/auth0-react": "^1.1.0", "@opentripplanner/base-map": "^2.0.0", - "@opentripplanner/core-utils": "^4.4.0", + "@opentripplanner/core-utils": "^4.6.0", "@opentripplanner/endpoints-overlay": "^1.3.0", "@opentripplanner/from-to-location-picker": "^1.3.0", "@opentripplanner/geocoder": "^1.1.1", "@opentripplanner/humanize-distance": "^1.1.0", "@opentripplanner/icons": "^1.2.0", - "@opentripplanner/itinerary-body": "^2.5.0", + "@opentripplanner/itinerary-body": "^2.7.0", "@opentripplanner/location-field": "^1.7.1", "@opentripplanner/location-icon": "^1.4.0", "@opentripplanner/park-and-ride-overlay": "^1.2.2", @@ -50,7 +50,7 @@ "@opentripplanner/stops-overlay": "^3.3.1", "@opentripplanner/transit-vehicle-overlay": "^2.3.1", "@opentripplanner/transitive-overlay": "^1.1.2", - "@opentripplanner/trip-details": "^1.5.0", + "@opentripplanner/trip-details": "^1.6.0", "@opentripplanner/trip-form": "^1.6.0", "@opentripplanner/trip-viewer-overlay": "^1.1.1", "@opentripplanner/vehicle-rental-overlay": "^1.2.1", diff --git a/yarn.lock b/yarn.lock index 729c3b06a..1211c74d7 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1631,13 +1631,13 @@ prop-types "^15.7.2" qs "^6.9.1" -"@opentripplanner/core-utils@^4.3.0", "@opentripplanner/core-utils@^4.4.0": - version "4.4.0" - resolved "https://registry.yarnpkg.com/@opentripplanner/core-utils/-/core-utils-4.4.0.tgz#3eb8f9718d32ce50e3b79d975d682559c5a7b0bf" - integrity sha512-qCd+NXa0PxwcN2DFR0HX1u/76RzQwHe2r0VGcaOS4GxvQ5HEL4zPyaT+lkxAyE6AFQAvNynyofhxlnMwbxtqEA== +"@opentripplanner/core-utils@^4.5.0", "@opentripplanner/core-utils@^4.6.0": + version "4.6.0" + resolved "https://registry.yarnpkg.com/@opentripplanner/core-utils/-/core-utils-4.6.0.tgz#f0f9924a2312b89a3f84d0a34c1a2d9f6c1ca615" + integrity sha512-LQs8BrwqFXKHJOgRduKic9wEGqnNAcyrypTgKmx//Jzz6OmZyXNskrFNJwLR6HIgsps7isN/7hi3NuVFticgIA== dependencies: "@mapbox/polyline" "^1.1.0" - "@opentripplanner/geocoder" "^1.1.1" + "@opentripplanner/geocoder" "^1.1.2" "@styled-icons/foundation" "^10.34.0" "@turf/along" "^6.0.1" bowser "^2.7.0" @@ -1697,6 +1697,16 @@ isomorphic-mapzen-search "^1.5.1" lodash.memoize "^4.1.2" +"@opentripplanner/geocoder@^1.1.2": + version "1.1.2" + resolved "https://registry.yarnpkg.com/@opentripplanner/geocoder/-/geocoder-1.1.2.tgz#fb4c939f5746705d0bebd9791b3f9d9eb055ce8e" + integrity sha512-XEHzueckoi6UM1wfgLj/VTjOilEoAj9WA5D26wAM992ItJfvlllis2XfSQecBHDAFc7YbRoKxT6IbsJOmqeMuQ== + dependencies: + "@conveyal/geocoder-arcgis-geojson" "^0.0.3" + "@conveyal/lonlat" "^1.4.1" + isomorphic-mapzen-search "^1.6.0" + lodash.memoize "^4.1.2" + "@opentripplanner/humanize-distance@^1.1.0": version "1.1.0" resolved "https://registry.yarnpkg.com/@opentripplanner/humanize-distance/-/humanize-distance-1.1.0.tgz#aa5ecdd70f33cfbdd214c76da4ba799a8ab473a5" @@ -1718,15 +1728,23 @@ "@opentripplanner/core-utils" "^4.1.0" prop-types "^15.7.2" -"@opentripplanner/itinerary-body@^2.5.0": - version "2.5.0" - resolved "https://registry.yarnpkg.com/@opentripplanner/itinerary-body/-/itinerary-body-2.5.0.tgz#c533712b7a7f1da2e9625739d0b36a26a5587c99" - integrity sha512-r1ZRUpK0GuvCiRV/3hakQKtt4cQe9xYqUAMghh/V/EhBDa3MAW1mX5bGC/4QUBRa4rmU2HGQKALn5j8qrcDzrA== +"@opentripplanner/icons@^1.2.1": + version "1.2.1" + resolved "https://registry.yarnpkg.com/@opentripplanner/icons/-/icons-1.2.1.tgz#aaaf4c7ac5c11a64cc3387be031fb1a71acb3806" + integrity sha512-LMPRxc8S34CklMJEciOw/fGFx7YEc4lwJJqyFKofisslObTK2Tx1Q7dCFFYCO2APqKDGuGxTUIkvYyv5wlFaxQ== dependencies: "@opentripplanner/core-utils" "^4.1.0" + prop-types "^15.7.2" + +"@opentripplanner/itinerary-body@^2.7.0": + version "2.7.0" + resolved "https://registry.yarnpkg.com/@opentripplanner/itinerary-body/-/itinerary-body-2.7.0.tgz#ba5ae119bc97deb30d68936d15fc683bbd15e865" + integrity sha512-9i3uXPTssyZPr+4a+2QX5QywF+8b11Km3RRDpZFcr4bwTDllfX21mvt36miqhZ/l6mYmloMzybQM+XIJWlQHtA== + dependencies: + "@opentripplanner/core-utils" "^4.5.0" "@opentripplanner/humanize-distance" "^1.1.0" - "@opentripplanner/icons" "^1.1.0" - "@opentripplanner/location-icon" "^1.3.0" + "@opentripplanner/icons" "^1.2.1" + "@opentripplanner/location-icon" "^1.4.0" "@styled-icons/fa-solid" "^10.34.0" "@styled-icons/foundation" "^10.34.0" currency-formatter "^1.5.5" @@ -1831,12 +1849,12 @@ lodash.isequal "^4.5.0" transitive-js "^0.13.7" -"@opentripplanner/trip-details@^1.5.0": - version "1.5.0" - resolved "https://registry.yarnpkg.com/@opentripplanner/trip-details/-/trip-details-1.5.0.tgz#81f990130073a93af2115ece27fa832f1a9a3283" - integrity sha512-fheJXzmRxQOvTJgvp59Mbq4ZKx4fNIjMgJ5tIvK5+tEp6Qf/MPX5mGxz8Zt43pMJNZQnkczf5sVS8Grf0b5bwQ== +"@opentripplanner/trip-details@^1.6.0": + version "1.6.0" + resolved "https://registry.yarnpkg.com/@opentripplanner/trip-details/-/trip-details-1.6.0.tgz#0f67bfbd2d147ca4c1618cf99c7cb3251b530d39" + integrity sha512-7yBRDSAHed14FjIDpozf06aZYOfNSBntDVWBZn9RQzjXm9t9CIrqehIXLbQvipTGcmZT7LqndfzEVOkKb8sCqQ== dependencies: - "@opentripplanner/core-utils" "^4.3.0" + "@opentripplanner/core-utils" "^4.5.0" "@opentripplanner/humanize-distance" "^1.1.0" "@styled-icons/fa-solid" "^10.34.0" moment "^2.24.0" @@ -9893,6 +9911,14 @@ isomorphic-fetch@^2.1.1, isomorphic-fetch@^2.2.1: node-fetch "^1.0.1" whatwg-fetch ">=0.10.0" +isomorphic-fetch@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/isomorphic-fetch/-/isomorphic-fetch-3.0.0.tgz#0267b005049046d2421207215d45d6a262b8b8b4" + integrity sha512-qvUtwJ3j6qwsF3jLxkZ72qCgjMysPzDfeV240JHiGZsANBYd+EEuu35v7dfrJ9Up0Ak07D7GGSkGhCHTqg/5wA== + dependencies: + node-fetch "^2.6.1" + whatwg-fetch "^3.4.1" + isomorphic-mapzen-search@^1.5.1: version "1.5.1" resolved "https://registry.yarnpkg.com/isomorphic-mapzen-search/-/isomorphic-mapzen-search-1.5.1.tgz#5ac0214cec436fb550e8ef362cf8d11b17de8e9c" @@ -9902,6 +9928,15 @@ isomorphic-mapzen-search@^1.5.1: isomorphic-fetch "^2.2.1" qs "^6.3.0" +isomorphic-mapzen-search@^1.6.0: + version "1.6.0" + resolved "https://registry.yarnpkg.com/isomorphic-mapzen-search/-/isomorphic-mapzen-search-1.6.0.tgz#eb368756d6132016a32c76435d6f34a38da5279f" + integrity sha512-90Zp8jxWuMCk582S7d6b85lHO2Lj4Nybv8o6ShqQX2SRP7SFh1fzHx67eilNUGNjBeamKYQJHmijZ1/wSzFe3A== + dependencies: + "@conveyal/lonlat" "^1.4.1" + isomorphic-fetch "^3.0.0" + qs "^6.3.0" + isstream@~0.1.2: version "0.1.2" resolved "https://registry.yarnpkg.com/isstream/-/isstream-0.1.2.tgz#47e63f7af55afa6f92e1500e690eb8b8529c099a" @@ -18592,6 +18627,11 @@ whatwg-fetch@>=0.10.0: resolved "https://registry.yarnpkg.com/whatwg-fetch/-/whatwg-fetch-3.0.0.tgz#fc804e458cc460009b1a2b966bc8817d2578aefb" integrity sha512-9GSJUgz1D4MfyKU7KRqwOjXCXTqWdFNvEr7eUBYchQiVc744mqK/MzXPNR2WsPkmkOa4ywfg8C2n8h+13Bey1Q== +whatwg-fetch@^3.4.1: + version "3.6.2" + resolved "https://registry.yarnpkg.com/whatwg-fetch/-/whatwg-fetch-3.6.2.tgz#dced24f37f2624ed0281725d51d0e2e3fe677f8c" + integrity sha512-bJlen0FcuU/0EMLrdbJ7zOnW6ITZLrZMIarMUVmdKtsGvZna8vxKYaexICWPfZ8qwf9fzNq+UEIZrnSaApt6RA== + whatwg-mimetype@^2.1.0, whatwg-mimetype@^2.2.0: version "2.3.0" resolved "https://registry.yarnpkg.com/whatwg-mimetype/-/whatwg-mimetype-2.3.0.tgz#3d4b1e0312d2079879f826aff18dbeeca5960fbf" From 2a1e3db072c7b316db37b86c8030bae1dab29a46 Mon Sep 17 00:00:00 2001 From: binh-dam-ibigroup <56846598+binh-dam-ibigroup@users.noreply.github.com> Date: Mon, 22 Nov 2021 16:48:44 -0500 Subject: [PATCH 24/26] chore(i18n): Match PR changes to PR file. --- i18n/fr-FR.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/i18n/fr-FR.yml b/i18n/fr-FR.yml index 41c837870..e0b9bfb01 100644 --- a/i18n/fr-FR.yml +++ b/i18n/fr-FR.yml @@ -215,6 +215,8 @@ components: trips: Trajets TabbedItineraries: optionNumber: "Option {optionNum, number}" + # Note to translator: This text is width-constrained. + mustCallAhead: Résa. obligatoire fareCost: > {hasMaxFare, select, true {À partir de {minTotalFare}} From debeffc1bb29c686c7956d83424673362241bd7d Mon Sep 17 00:00:00 2001 From: binh-dam-ibigroup <56846598+binh-dam-ibigroup@users.noreply.github.com> Date: Mon, 22 Nov 2021 16:50:44 -0500 Subject: [PATCH 25/26] chore(i18n): Add with-constraint comment to call ahead msg. --- i18n/en-US.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/i18n/en-US.yml b/i18n/en-US.yml index 2ed339d94..41417077c 100644 --- a/i18n/en-US.yml +++ b/i18n/en-US.yml @@ -282,6 +282,7 @@ components: trips: Trips TabbedItineraries: optionNumber: "Option {optionNum, number}" + # Note to translator: This text is width-constrained. mustCallAhead: Must call ahead! fareCost: > {hasMaxFare, select, From d755e4fb87e0c7a28cba56204b0e0d9f1ea82673 Mon Sep 17 00:00:00 2001 From: miles-grant-ibigroup Date: Tue, 23 Nov 2021 09:48:15 +0000 Subject: [PATCH 26/26] refactor(default-itinerary): address pr feedback --- lib/components/narrative/default/default-itinerary.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/components/narrative/default/default-itinerary.js b/lib/components/narrative/default/default-itinerary.js index a973dbcf2..1ba5e2cff 100644 --- a/lib/components/narrative/default/default-itinerary.js +++ b/lib/components/narrative/default/default-itinerary.js @@ -22,8 +22,8 @@ import { } from '../../../util/accessibility-routing' import Icon from '../../util/icon' -import ItinerarySummary from './itinerary-summary' import { FlexIndicator } from './flex-indicator' +import ItinerarySummary from './itinerary-summary' const { isBicycle, isMicromobility, isTransit } = coreUtils.itinerary