From 3b5b1b5210914191bb932356fb4fa85aa7be3d8d Mon Sep 17 00:00:00 2001 From: Evan Siroky Date: Thu, 16 Jul 2020 18:03:06 -0700 Subject: [PATCH 01/58] fix(route-viewer): correctly sort routes in route viewer by agency --- lib/components/viewers/route-viewer.js | 35 +++++++++++++++----------- 1 file changed, 21 insertions(+), 14 deletions(-) diff --git a/lib/components/viewers/route-viewer.js b/lib/components/viewers/route-viewer.js index 3cb3e6df5..d39c8b7db 100644 --- a/lib/components/viewers/route-viewer.js +++ b/lib/components/viewers/route-viewer.js @@ -10,12 +10,17 @@ import Icon from '../narrative/icon' import { setMainPanelContent, setViewedRoute } from '../../actions/ui' import { findRoutes, findRoute } from '../../actions/api' -function operatorIndexForRoute (transitOperators, route) { - if (!route.agency) return 0 +function operatorForRoute (transitOperators, route) { + if (!route.id) return const index = transitOperators.findIndex(o => - o.id.toLowerCase() === route.agency.id.split(':')[0].toLowerCase()) - if (index !== -1 && typeof transitOperators[index].order !== 'undefined') return transitOperators[index].order - else return 0 + o.id.toLowerCase() === route.id.split(':')[0].toLowerCase()) + if (index !== -1 && typeof transitOperators[index].order !== 'undefined') return transitOperators[index] +} + +function routeOperatorComparatorValue (transitOperators, route) { + const routeOperator = operatorForRoute(transitOperators, route) + if (!routeOperator) return 0 + return routeOperator.order } /** @@ -62,7 +67,8 @@ class RouteViewer extends Component { : [] const agencySortedRoutes = transitOperators.length > 0 ? sortedRoutes.sort((a, b) => { - return operatorIndexForRoute(transitOperators, a) - operatorIndexForRoute(transitOperators, b) + return routeOperatorComparatorValue(transitOperators, a) - + routeOperatorComparatorValue(transitOperators, b) }) : sortedRoutes return ( @@ -93,14 +99,13 @@ class RouteViewer extends Component { {agencySortedRoutes .map(route => { // Find operator based on agency_id (extracted from OTP route ID). - // TODO: re-implement multi-agency logos for route viewer. - // const operator = operatorForRoute(transitOperators, route) || {} + const operator = operatorForRoute(transitOperators, route) || {} return ( @@ -159,11 +164,13 @@ class RouteRow extends PureComponent { onClick={this._onClick} >
- {// TODO: re-implement multi-agency logos for route viewer. - // Currently, the agency object is not nested within the get all - // routes endpoint and causing this to only display transitOperators for - // the selected route. - // operator && + {operator && + {`${operator.name} }
From 97172c1f57c96ab2ef35eaed0dce4b4086a858ec Mon Sep 17 00:00:00 2001 From: Evan Siroky Date: Tue, 21 Jul 2020 11:45:31 -0700 Subject: [PATCH 02/58] refactor(route-viewer): only show operator logo if available --- lib/components/viewers/route-viewer.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/components/viewers/route-viewer.js b/lib/components/viewers/route-viewer.js index d39c8b7db..29b783d64 100644 --- a/lib/components/viewers/route-viewer.js +++ b/lib/components/viewers/route-viewer.js @@ -164,7 +164,7 @@ class RouteRow extends PureComponent { onClick={this._onClick} >
- {operator && + {operator && operator.logo && {`${operator.name} Date: Tue, 21 Jul 2020 11:47:02 -0700 Subject: [PATCH 03/58] refactor: bump core-utils to 2.0.0-alpha.1 and use new route utils --- .../__snapshots__/create-otp-reducer.js.snap | 10 ++++++++++ lib/components/viewers/route-viewer.js | 17 ++++++++--------- lib/components/viewers/stop-viewer.js | 2 +- package.json | 2 +- yarn.lock | 14 ++++++++++++++ 5 files changed, 34 insertions(+), 11 deletions(-) diff --git a/__tests__/reducers/__snapshots__/create-otp-reducer.js.snap b/__tests__/reducers/__snapshots__/create-otp-reducer.js.snap index 36a8543f2..b414ffcd4 100644 --- a/__tests__/reducers/__snapshots__/create-otp-reducer.js.snap +++ b/__tests__/reducers/__snapshots__/create-otp-reducer.js.snap @@ -17,6 +17,7 @@ Object { "transitOperators": Array [], }, "currentQuery": Object { + "bannedRoutes": "", "bikeSpeed": 3.58, "companies": null, "date": "2019-08-04", @@ -24,14 +25,18 @@ Object { "endTime": "09:00", "from": null, "ignoreRealtimeUpdates": false, + "intermediatePlaces": Array [], "maxBikeDistance": 4828, "maxBikeTime": 20, "maxEScooterDistance": 4828, "maxWalkDistance": 1207, "maxWalkTime": 15, "mode": "WALK,TRAM,BUS,SUBWAY,FERRY,RAIL,GONDOLA", + "numItineraries": 3, "optimize": "QUICK", "optimizeBike": "SAFE", + "otherThanPreferredRoutesPenalty": 900, + "preferredRoutes": "", "routingType": "ITINERARY", "showIntermediateStops": true, "startTime": "07:00", @@ -89,18 +94,23 @@ Object { "user": Object { "autoRefreshStopTimes": true, "defaults": Object { + "bannedRoutes": "", "bikeSpeed": 3.58, "companies": null, "endTime": "09:00", "ignoreRealtimeUpdates": false, + "intermediatePlaces": Array [], "maxBikeDistance": 4828, "maxBikeTime": 20, "maxEScooterDistance": 4828, "maxWalkDistance": 1207, "maxWalkTime": 15, "mode": "WALK,TRAM,BUS,SUBWAY,FERRY,RAIL,GONDOLA", + "numItineraries": 3, "optimize": "QUICK", "optimizeBike": "SAFE", + "otherThanPreferredRoutesPenalty": 900, + "preferredRoutes": "", "routingType": "ITINERARY", "showIntermediateStops": true, "startTime": "07:00", diff --git a/lib/components/viewers/route-viewer.js b/lib/components/viewers/route-viewer.js index 29b783d64..17e9d0bd5 100644 --- a/lib/components/viewers/route-viewer.js +++ b/lib/components/viewers/route-viewer.js @@ -10,15 +10,11 @@ import Icon from '../narrative/icon' import { setMainPanelContent, setViewedRoute } from '../../actions/ui' import { findRoutes, findRoute } from '../../actions/api' -function operatorForRoute (transitOperators, route) { - if (!route.id) return - const index = transitOperators.findIndex(o => - o.id.toLowerCase() === route.id.split(':')[0].toLowerCase()) - if (index !== -1 && typeof transitOperators[index].order !== 'undefined') return transitOperators[index] -} - function routeOperatorComparatorValue (transitOperators, route) { - const routeOperator = operatorForRoute(transitOperators, route) + const routeOperator = coreUtils.route.getTransitOperatorFromOtpRoute( + route, + transitOperators + ) if (!routeOperator) return 0 return routeOperator.order } @@ -99,7 +95,10 @@ class RouteViewer extends Component { {agencySortedRoutes .map(route => { // Find operator based on agency_id (extracted from OTP route ID). - const operator = operatorForRoute(transitOperators, route) || {} + const operator = coreUtils.route.getTransitOperatorFromOtpRoute( + route, + transitOperators + ) || {} return ( {Object.values(stopTimesByPattern) - .sort((a, b) => coreUtils.itinerary.routeComparator(a.route, b.route)) + .sort((a, b) => coreUtils.route.routeComparator(a.route, b.route)) .map(patternTimes => { // Only add pattern row if route is found. // FIXME: there is currently a bug with the alernative transit index diff --git a/package.json b/package.json index debb9d095..81b0cb92f 100644 --- a/package.json +++ b/package.json @@ -28,7 +28,7 @@ "homepage": "https://github.com/opentripplanner/otp-react-redux#readme", "dependencies": { "@opentripplanner/base-map": "^1.0.1", - "@opentripplanner/core-utils": "^1.2.0", + "@opentripplanner/core-utils": "^2.0.0-alpha.1", "@opentripplanner/endpoints-overlay": "^1.0.1", "@opentripplanner/from-to-location-picker": "^1.0.1", "@opentripplanner/geocoder": "^1.0.2", diff --git a/yarn.lock b/yarn.lock index 053318dec..980fe62a9 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1368,6 +1368,20 @@ prop-types "^15.7.2" qs "^6.9.1" +"@opentripplanner/core-utils@^2.0.0-alpha.1": + version "2.0.0-alpha.1" + resolved "https://registry.yarnpkg.com/@opentripplanner/core-utils/-/core-utils-2.0.0-alpha.1.tgz#f3549cf559d103672f601820262afb720ecb9628" + integrity sha512-U9chJmr1c7NtcWS8YC5TiOBNd966pHVeMmlw6BJlR/EWSDuKK6i5x2L6DeHbs4Pw8qXc/6RAX0fjDWofiWKFHw== + dependencies: + "@mapbox/polyline" "^1.1.0" + "@turf/along" "^6.0.1" + bowser "^2.7.0" + lodash.isequal "^4.5.0" + moment "^2.24.0" + moment-timezone "^0.5.27" + prop-types "^15.7.2" + qs "^6.9.1" + "@opentripplanner/endpoints-overlay@^1.0.1": version "1.0.1" resolved "https://registry.yarnpkg.com/@opentripplanner/endpoints-overlay/-/endpoints-overlay-1.0.1.tgz#d95f0bbfddc9382b593845799b963340eece2742" From 64ff7bc178e42c14f193a77114b2ca939e15f7c8 Mon Sep 17 00:00:00 2001 From: binh-dam-ibigroup <56846598+binh-dam-ibigroup@users.noreply.github.com> Date: Tue, 8 Sep 2020 18:08:58 -0400 Subject: [PATCH 04/58] feat(VerifyEmailScreen): Add link to resend verification email. --- lib/components/user/user-account-screen.js | 5 +- lib/components/user/verify-email-screen.js | 83 ++++++++++++++++------ 2 files changed, 64 insertions(+), 24 deletions(-) diff --git a/lib/components/user/user-account-screen.js b/lib/components/user/user-account-screen.js index 0c77fa85d..27090adaf 100644 --- a/lib/components/user/user-account-screen.js +++ b/lib/components/user/user-account-screen.js @@ -88,14 +88,14 @@ class UserAccountScreen extends Component { // TODO: Update title bar during componentDidMount. render () { - const { auth, loggedInUser } = this.props + const { auth, config, loggedInUser } = this.props const { userData } = this.state let formContents if (isNewUser(loggedInUser)) { if (!auth.user.email_verified) { // Check and prompt for email verification first to avoid extra user wait. - formContents = + formContents = } else { // New users are shown "wizard" (step-by-step) mode // (includes when a "new" user clicks 'My Account' from the account menu in the nav bar). @@ -134,6 +134,7 @@ class UserAccountScreen extends Component { const mapStateToProps = (state, ownProps) => { return { + config: state.otp.config, loggedInUser: state.user.loggedInUser } } diff --git a/lib/components/user/verify-email-screen.js b/lib/components/user/verify-email-screen.js index cf212a9c3..b3c4a9177 100644 --- a/lib/components/user/verify-email-screen.js +++ b/lib/components/user/verify-email-screen.js @@ -1,7 +1,12 @@ -import React from 'react' +import React, { Component } from 'react' import { Button } from 'react-bootstrap' +import styled from 'styled-components' -const _handleClick = () => window.location.reload() +import { secureFetch } from '../../util/middleware' + +const DivSpacer = styled.div` + margin-top: ${props => props.space || 2}em; +` /** * This component contains the prompt for the user to verify their email address. @@ -10,25 +15,59 @@ const _handleClick = () => window.location.reload() * (One way to make sure the parent page fetches the latest email verification status * is to simply reload the page.) */ -const VerifyEmailScreen = () => ( -
-

Verify your email address

-

- Please check your email inbox and follow the link in the message - to verify your email address before finishing your account setup. -

-

- Once you're verified, click the button below to continue. -

- - -
-) +class VerifyEmailScreen extends Component { + resendVerificationEmail = () => { + const { auth, middlewareConfig } = this.props + const { accessToken } = auth + if (!accessToken) { + console.warn('No access token found.') + return + } + const { apiBaseUrl, apiKey } = middlewareConfig + + secureFetch(`${apiBaseUrl}/api/secure/user/verification-email`, accessToken, apiKey) + .then(json => window.alert('Verification email resent!')) + // TODO: check status of the request. + } + + _handleClick = () => window.location.reload() + + render () { + const { middlewareConfig } = this.props + return ( +
+

Verify your email address

+ + Please check your email inbox and follow the link in the message + to verify your email address before finishing your account setup. + +

+ Once you're verified, click the button below to continue. +

+ + + + + {middlewareConfig && ( + + + + )} +
+ ) + } +} export default VerifyEmailScreen From 2cc982562de9b8646fbfd18cd6a559364855192b Mon Sep 17 00:00:00 2001 From: binh-dam-ibigroup <56846598+binh-dam-ibigroup@users.noreply.github.com> Date: Fri, 25 Sep 2020 16:13:13 -0400 Subject: [PATCH 05/58] refactor(middleware): Test a query. --- lib/components/user/saved-trip-list.js | 2 +- lib/components/user/trip-basics-pane.js | 126 +++++++++++++++--------- lib/util/middleware.js | 10 ++ 3 files changed, 88 insertions(+), 50 deletions(-) diff --git a/lib/components/user/saved-trip-list.js b/lib/components/user/saved-trip-list.js index 9969a5d3c..39a7e2460 100644 --- a/lib/components/user/saved-trip-list.js +++ b/lib/components/user/saved-trip-list.js @@ -45,7 +45,7 @@ class SavedTripList extends Component {

My saved trips

Click on a saved trip below to modify it.

- {trips.map((trip, index) => ( + {trips && trips.map((trip, index) => ( diff --git a/lib/components/user/trip-basics-pane.js b/lib/components/user/trip-basics-pane.js index 5b1bbaa25..dbcb9663f 100644 --- a/lib/components/user/trip-basics-pane.js +++ b/lib/components/user/trip-basics-pane.js @@ -1,13 +1,15 @@ import { Field } from 'formik' -import React from 'react' +import React, { Component } from 'react' import { ControlLabel, FormControl, FormGroup, HelpBlock } from 'react-bootstrap' +import { connect } from 'react-redux' import styled from 'styled-components' +import { checkItinerary } from '../../util/middleware' import { ALL_DAYS } from '../../util/monitored-trip' import TripSummary from './trip-summary' @@ -44,60 +46,86 @@ const allDays = [ * This component shows summary information for a trip * and lets the user edit the trip name and day. */ -const TripBasicsPane = ({ errors, touched, values: monitoredTrip }) => { - const { itinerary } = monitoredTrip +class TripBasicsPane extends Component { + async componentDidMount () { + // Check itinerary existence for all days. - if (!itinerary) { - return
No itinerary to display.
- } else { - // Show an error indicaton when monitoredTrip.tripName is not blank (from the form's validation schema) - // and that tripName is not already used. - let tripNameValidationState = null - if (touched.tripName) { - tripNameValidationState = errors.tripName ? 'error' : null - } + const itineraryCheckResult = await checkItinerary( + this.props.config.persistence.otp_middleware, + this.props.accessToken, + this.props.monitoredTrip + ) - // Show a combined error indicaton when no day is selected. - let monitoredDaysValidationState = null - ALL_DAYS.forEach(day => { - if (touched[day]) { - if (!monitoredDaysValidationState) { - monitoredDaysValidationState = errors[day] ? 'error' : null - } + console.log(itineraryCheckResult) + } + + render () { + const { errors, touched, values: monitoredTrip } = this.props + const { itinerary } = monitoredTrip + + if (!itinerary) { + return
No itinerary to display.
+ } else { + // Show an error indicaton when monitoredTrip.tripName is not blank (from the form's validation schema) + // and that tripName is not already used. + let tripNameValidationState = null + if (touched.tripName) { + tripNameValidationState = errors.tripName ? 'error' : null } - }) - return ( -
- Selected itinerary: - + // Show a combined error indicaton when no day is selected. + let monitoredDaysValidationState = null + ALL_DAYS.forEach(day => { + if (touched[day]) { + if (!monitoredDaysValidationState) { + monitoredDaysValidationState = errors[day] ? 'error' : null + } + } + }) - - Please provide a name for this trip: - {/* onBlur, onChange, and value are passed automatically. */} - - - {errors.tripName && {errors.tripName}} - + return ( +
+ Selected itinerary: + - - What days to you take this trip? -
- {allDays.map(({ name, text }, index) => ( - - {text} - - - ))} -
- {monitoredDaysValidationState && Please select at least one day to monitor.} -
-
- ) + + Please provide a name for this trip: + {/* onBlur, onChange, and value are passed automatically. */} + + + {errors.tripName && {errors.tripName}} + + + + What days to you take this trip? +
+ {allDays.map(({ name, text }, index) => ( + + {text} + + + ))} +
+ {monitoredDaysValidationState && Please select at least one day to monitor.} +
+
+ ) + } } } -export default TripBasicsPane +// Connect to redux store +const mapStateToProps = (state, ownProps) => { + return { + config: state.otp.config, + accessToken: state.user.accessToken + } +} + +const mapDispatchToProps = { +} + +export default connect(mapStateToProps, mapDispatchToProps)(TripBasicsPane) diff --git a/lib/util/middleware.js b/lib/util/middleware.js index 10403b465..ea7641743 100644 --- a/lib/util/middleware.js +++ b/lib/util/middleware.js @@ -2,6 +2,7 @@ if (typeof (fetch) === 'undefined') require('isomorphic-fetch') const API_USER_PATH = '/api/secure/user' const API_MONITORTRIP_PATH = '/api/secure/monitoredtrip' +const API_ITINERARYCHECK_PATH = '/api/secure/itinerarycheck' /** * This method builds the options object for call to the fetch method. @@ -139,3 +140,12 @@ export async function deleteTrip (middlewareConfig, token, id) { } } } + +export async function checkItinerary (middlewareConfig, token, monitoredTrip) { + const { apiBaseUrl, apiKey } = middlewareConfig + const requestUrl = `${apiBaseUrl}${API_ITINERARYCHECK_PATH}` + + return secureFetch(requestUrl, token, apiKey, 'POST', { + body: JSON.stringify(monitoredTrip) + }) +} From cbf3feb63e19d6c79e2bc1cf2784f25210c83fee Mon Sep 17 00:00:00 2001 From: binh-dam-ibigroup <56846598+binh-dam-ibigroup@users.noreply.github.com> Date: Thu, 1 Oct 2020 18:23:15 -0400 Subject: [PATCH 06/58] feat(TripBasicsPane): Grey out days on which a trip is not available. --- lib/components/user/trip-basics-pane.js | 55 +++++++++++++++++++------ 1 file changed, 43 insertions(+), 12 deletions(-) diff --git a/lib/components/user/trip-basics-pane.js b/lib/components/user/trip-basics-pane.js index dbcb9663f..1199bd0d3 100644 --- a/lib/components/user/trip-basics-pane.js +++ b/lib/components/user/trip-basics-pane.js @@ -4,7 +4,9 @@ import { ControlLabel, FormControl, FormGroup, - HelpBlock + HelpBlock, + Label, + ProgressBar } from 'react-bootstrap' import { connect } from 'react-redux' import styled from 'styled-components' @@ -20,10 +22,12 @@ const StyledLabel = styled.label` box-sizing: border-box; display: inline-block; font-weight: inherit; + float: left; + height: 3em; max-width: 150px; min-width: 14.28%; text-align: center; - & > span { + & > span:first-of-type { display: block; width: 100%; } @@ -47,21 +51,32 @@ const allDays = [ * and lets the user edit the trip name and day. */ class TripBasicsPane extends Component { + constructor () { + super() + + this.state = {} + } + async componentDidMount () { // Check itinerary existence for all days. const itineraryCheckResult = await checkItinerary( this.props.config.persistence.otp_middleware, this.props.accessToken, - this.props.monitoredTrip + this.props.values ) console.log(itineraryCheckResult) + + this.setState({ itineraryCheckResult }) + + // TODO: Update Formik state to uncheck days for which the itinerary is not available. } render () { const { errors, touched, values: monitoredTrip } = this.props const { itinerary } = monitoredTrip + const { itineraryCheckResult } = this.state if (!itinerary) { return
No itinerary to display.
@@ -99,16 +114,32 @@ class TripBasicsPane extends Component { What days to you take this trip?
- {allDays.map(({ name, text }, index) => ( - - {text} - - - ))} + {allDays.map(({ name, text }, index) => { + const isDayDisabled = + itineraryCheckResult && + itineraryCheckResult.status === 'success' && + !itineraryCheckResult.data[name] + + const boxClass = isDayDisabled ? 'bg-danger' : (monitoredTrip[name] ? 'bg-primary' : '') + + return ( + + {text} + {isDayDisabled + // eslint-disable-next-line jsx-a11y/label-has-for + ? + : + } + + ) + })} +
+ {!itineraryCheckResult && ( + + + + )} {monitoredDaysValidationState && Please select at least one day to monitor.}
From 8aad883dd815747b9d96a5d44c7c249695fadc5d Mon Sep 17 00:00:00 2001 From: binh-dam-ibigroup <56846598+binh-dam-ibigroup@users.noreply.github.com> Date: Thu, 1 Oct 2020 19:31:52 -0400 Subject: [PATCH 07/58] fix(TripBasicsPane): Don't monitor days on which trips do not exist. --- lib/components/user/trip-basics-pane.js | 46 +++++++++++++++---------- 1 file changed, 27 insertions(+), 19 deletions(-) diff --git a/lib/components/user/trip-basics-pane.js b/lib/components/user/trip-basics-pane.js index 1199bd0d3..0964c5c44 100644 --- a/lib/components/user/trip-basics-pane.js +++ b/lib/components/user/trip-basics-pane.js @@ -4,8 +4,8 @@ import { ControlLabel, FormControl, FormGroup, + Glyphicon, HelpBlock, - Label, ProgressBar } from 'react-bootstrap' import { connect } from 'react-redux' @@ -37,13 +37,13 @@ const StyledLabel = styled.label` ` const allDays = [ - { name: 'monday', text: 'Mon.' }, - { name: 'tuesday', text: 'Tue.' }, - { name: 'wednesday', text: 'Wed.' }, - { name: 'thursday', text: 'Thu.' }, - { name: 'friday', text: 'Fri.' }, - { name: 'saturday', text: 'Sat.' }, - { name: 'sunday', text: 'Sun.' } + { name: 'monday', text: 'Mon.', fullText: 'Mondays' }, + { name: 'tuesday', text: 'Tue.', fullText: 'Tuesdays' }, + { name: 'wednesday', text: 'Wed.', fullText: 'Wednesdays' }, + { name: 'thursday', text: 'Thu.', fullText: 'Thursdays' }, + { name: 'friday', text: 'Fri.', fullText: 'Fridays' }, + { name: 'saturday', text: 'Sat.', fullText: 'Saturdays' }, + { name: 'sunday', text: 'Sun.', fullText: 'Sundays' } ] /** @@ -59,18 +59,26 @@ class TripBasicsPane extends Component { async componentDidMount () { // Check itinerary existence for all days. + const { accessToken, config, setFieldValue, values } = this.props const itineraryCheckResult = await checkItinerary( - this.props.config.persistence.otp_middleware, - this.props.accessToken, - this.props.values + config.persistence.otp_middleware, + accessToken, + values ) - console.log(itineraryCheckResult) - this.setState({ itineraryCheckResult }) - // TODO: Update Formik state to uncheck days for which the itinerary is not available. + // Update the Formik state to uncheck days for which the itinerary is not available. + // Note: If a trip becomes unavailable after the user initially saves a trip, + // upon saving, the days the itinerary does not exist will no longer be monitored. + if (itineraryCheckResult && itineraryCheckResult.status === 'success') { + ALL_DAYS.forEach(day => { + if (!itineraryCheckResult.data[day]) { + setFieldValue(day, false) + } + }) + } } render () { @@ -114,20 +122,20 @@ class TripBasicsPane extends Component { What days to you take this trip?
- {allDays.map(({ name, text }, index) => { + {allDays.map(({ name, fullText, text }, index) => { const isDayDisabled = itineraryCheckResult && itineraryCheckResult.status === 'success' && !itineraryCheckResult.data[name] - const boxClass = isDayDisabled ? 'bg-danger' : (monitoredTrip[name] ? 'bg-primary' : '') + const boxClass = isDayDisabled ? 'alert-danger' : (monitoredTrip[name] ? 'bg-primary' : '') + const notAvailableText = isDayDisabled ? `Trip not available on ${fullText}` : null return ( - + {text} {isDayDisabled - // eslint-disable-next-line jsx-a11y/label-has-for - ? + ? : } From 03b9761a3bdb55e905b10fbef196f0aa7a4a8194 Mon Sep 17 00:00:00 2001 From: Landon Reed Date: Fri, 9 Oct 2020 11:28:33 -0400 Subject: [PATCH 08/58] refactor(call): move/fix banned routes handler --- lib/components/app/call-taker-panel.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/components/app/call-taker-panel.js b/lib/components/app/call-taker-panel.js index 40459bae2..95f95f6bb 100644 --- a/lib/components/app/call-taker-panel.js +++ b/lib/components/app/call-taker-panel.js @@ -116,11 +116,6 @@ class CallTakerPanel extends Component { routingQuery() } - _setBannedRoutes = options => { - const bannedRoutes = options ? options.map(o => o.value).join(',') : '' - this.props.setQueryParam({ bannedRoutes }) - } - modeToOptionValue = mode => { const isTransit = hasTransit(mode) const isBike = hasBike(mode) @@ -395,6 +390,11 @@ class CallTakerAdvancedOptions extends Component { } } + _setBannedRoutes = options => { + const bannedRoutes = options ? options.map(o => o.value).join(',') : '' + this.props.setQueryParam({ bannedRoutes }) + } + _setPreferredRoutes = options => { const preferredRoutes = options ? options.map(o => (o.value)).join(',') : '' this.props.setQueryParam({ preferredRoutes }) From 78bf6823341a58b033464507eeada5730bf606c4 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 16 Oct 2020 19:19:41 +0000 Subject: [PATCH 09/58] build(deps): bump npm-user-validate from 1.0.0 to 1.0.1 Bumps [npm-user-validate](https://github.com/npm/npm-user-validate) from 1.0.0 to 1.0.1. - [Release notes](https://github.com/npm/npm-user-validate/releases) - [Commits](https://github.com/npm/npm-user-validate/compare/v1.0.0...v1.0.1) Signed-off-by: dependabot[bot] --- yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/yarn.lock b/yarn.lock index 9257334c6..ced3dced3 100644 --- a/yarn.lock +++ b/yarn.lock @@ -11067,9 +11067,9 @@ npm-run-path@^2.0.0: path-key "^2.0.0" npm-user-validate@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/npm-user-validate/-/npm-user-validate-1.0.0.tgz#8ceca0f5cea04d4e93519ef72d0557a75122e951" - integrity sha1-jOyg9c6gTU6TUZ73LQVXp1Ei6VE= + version "1.0.1" + resolved "https://registry.yarnpkg.com/npm-user-validate/-/npm-user-validate-1.0.1.tgz#31428fc5475fe8416023f178c0ab47935ad8c561" + integrity sha512-uQwcd/tY+h1jnEaze6cdX/LrhWhoBxfSknxentoqmIuStxUExxjWd3ULMLFPiFUrZKbOVMowH6Jq2FRWfmhcEw== npm@^6.8.0: version "6.14.6" From 4168cb5942c4350624d70468add06132f01a105e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 19 Oct 2020 23:20:07 +0000 Subject: [PATCH 10/58] build(deps): bump object-path from 0.11.4 to 0.11.5 Bumps [object-path](https://github.com/mariocasciaro/object-path) from 0.11.4 to 0.11.5. - [Release notes](https://github.com/mariocasciaro/object-path/releases) - [Commits](https://github.com/mariocasciaro/object-path/commits) Signed-off-by: dependabot[bot] --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 95872ad2c..3ae4eea61 100644 --- a/package.json +++ b/package.json @@ -68,7 +68,7 @@ "moment": "^2.17.1", "moment-timezone": "^0.5.23", "object-hash": "^1.3.1", - "object-path": "^0.11.3", + "object-path": "^0.11.5", "prop-types": "^15.6.0", "qs": "^6.3.0", "react": "^16.9.0", diff --git a/yarn.lock b/yarn.lock index 9257334c6..d28bd6295 100644 --- a/yarn.lock +++ b/yarn.lock @@ -11263,10 +11263,10 @@ object-keys@^1.0.11, object-keys@^1.0.12, object-keys@^1.1.1: resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-1.1.1.tgz#1c47f272df277f3b1daf061677d9c82e2322c60e" integrity sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA== -object-path@^0.11.3: - version "0.11.4" - resolved "https://registry.yarnpkg.com/object-path/-/object-path-0.11.4.tgz#370ae752fbf37de3ea70a861c23bba8915691949" - integrity sha1-NwrnUvvzfePqcKhhwju6iRVpGUk= +object-path@^0.11.5: + version "0.11.5" + resolved "https://registry.yarnpkg.com/object-path/-/object-path-0.11.5.tgz#d4e3cf19601a5140a55a16ad712019a9c50b577a" + integrity sha512-jgSbThcoR/s+XumvGMTMf81QVBmah+/Q7K7YduKeKVWL7N111unR2d6pZZarSk6kY/caeNxUDyxOvMWyzoU2eg== object-visit@^1.0.0: version "1.0.1" From aeb519f9070f26c8279bc675e769b57ea63cd205 Mon Sep 17 00:00:00 2001 From: binh-dam-ibigroup <56846598+binh-dam-ibigroup@users.noreply.github.com> Date: Mon, 26 Oct 2020 16:52:24 -0400 Subject: [PATCH 11/58] refactor(TripBasicsPane): Let user select/save days an existing trip is not available. --- lib/components/user/trip-basics-pane.js | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/lib/components/user/trip-basics-pane.js b/lib/components/user/trip-basics-pane.js index 0964c5c44..7e28f7cea 100644 --- a/lib/components/user/trip-basics-pane.js +++ b/lib/components/user/trip-basics-pane.js @@ -82,7 +82,7 @@ class TripBasicsPane extends Component { } render () { - const { errors, touched, values: monitoredTrip } = this.props + const { errors, isCreating, touched, values: monitoredTrip } = this.props const { itinerary } = monitoredTrip const { itineraryCheckResult } = this.state @@ -134,20 +134,26 @@ class TripBasicsPane extends Component { return ( {text} - {isDayDisabled - ? - : + { // Let users save an existing trip, even though it may not be available on some days. + // TODO: improve checking trip availability. + isDayDisabled && isCreating + ? + : } ) })}
- {!itineraryCheckResult && ( - - - - )} + + {itineraryCheckResult + ? ( + <>Your trip is available on the following days above. + ) : ( + + ) + } + {monitoredDaysValidationState && Please select at least one day to monitor.}
From b8faf63432a8e86f66e39000f487705b0ae22d72 Mon Sep 17 00:00:00 2001 From: binh-dam-ibigroup <56846598+binh-dam-ibigroup@users.noreply.github.com> Date: Mon, 26 Oct 2020 17:15:39 -0400 Subject: [PATCH 12/58] refactor(TripBasicsPane): Tweak text. --- lib/components/user/trip-basics-pane.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/components/user/trip-basics-pane.js b/lib/components/user/trip-basics-pane.js index 7e28f7cea..4497d8d1e 100644 --- a/lib/components/user/trip-basics-pane.js +++ b/lib/components/user/trip-basics-pane.js @@ -148,7 +148,7 @@ class TripBasicsPane extends Component { {itineraryCheckResult ? ( - <>Your trip is available on the following days above. + <>Your trip is available on the days of the week indicated above. ) : ( ) From cf3d214aece724cf5979a563ab51c0efdcc28d98 Mon Sep 17 00:00:00 2001 From: binh-dam-ibigroup <56846598+binh-dam-ibigroup@users.noreply.github.com> Date: Mon, 26 Oct 2020 17:25:39 -0400 Subject: [PATCH 13/58] refactor(TripBasicsPane): Tweak text. --- lib/components/user/trip-basics-pane.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/components/user/trip-basics-pane.js b/lib/components/user/trip-basics-pane.js index 4497d8d1e..d8f71b6ab 100644 --- a/lib/components/user/trip-basics-pane.js +++ b/lib/components/user/trip-basics-pane.js @@ -148,7 +148,7 @@ class TripBasicsPane extends Component { {itineraryCheckResult ? ( - <>Your trip is available on the days of the week indicated above. + <>Your trip is available on the days of the week as indicated above. ) : ( ) From 38b22499b883d6ce22d87c8822d2eacb21eb668b Mon Sep 17 00:00:00 2001 From: binh-dam-ibigroup <56846598+binh-dam-ibigroup@users.noreply.github.com> Date: Tue, 27 Oct 2020 16:42:04 -0400 Subject: [PATCH 14/58] refactor(TripBasicsPane): Fix typo. --- lib/components/user/trip-basics-pane.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/components/user/trip-basics-pane.js b/lib/components/user/trip-basics-pane.js index d8f71b6ab..02cb8cb3f 100644 --- a/lib/components/user/trip-basics-pane.js +++ b/lib/components/user/trip-basics-pane.js @@ -120,7 +120,7 @@ class TripBasicsPane extends Component {
- What days to you take this trip? + What days do you take this trip?
{allDays.map(({ name, fullText, text }, index) => { const isDayDisabled = From 037913055561e2c1a354a0c6d94a2b64b6297fba Mon Sep 17 00:00:00 2001 From: binh-dam-ibigroup <56846598+binh-dam-ibigroup@users.noreply.github.com> Date: Wed, 28 Oct 2020 12:55:18 -0400 Subject: [PATCH 15/58] fix(NarrativeItineraries): Show Save trip only for itineraries with transit. --- .../narrative/narrative-itineraries.js | 5 ++++- lib/util/itinerary.js | 16 ++++++++++++++++ 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/lib/components/narrative/narrative-itineraries.js b/lib/components/narrative/narrative-itineraries.js index 93b245fa6..5cf69194a 100644 --- a/lib/components/narrative/narrative-itineraries.js +++ b/lib/components/narrative/narrative-itineraries.js @@ -15,6 +15,7 @@ import { import DefaultItinerary from './default/default-itinerary' import Icon from '../narrative/icon' import LinkButton from '../user/link-button' +import { itineraryHasTransit } from '../../util/itinerary' import { getResponsesWithErrors, getActiveItineraries, @@ -120,6 +121,8 @@ class NarrativeItineraries extends Component { } = this.props if (!activeSearch) return null const itineraryIsExpanded = activeItinerary !== undefined && activeItinerary !== null && this.state.showDetails + const showSaveButton = itineraryHasTransit(itineraries[activeItinerary]) + const showRealtimeAnnotation = realtimeEffects.isAffectedByRealtimeData && ( realtimeEffects.exceedsThreshold || realtimeEffects.routesDiffer || @@ -146,7 +149,7 @@ class NarrativeItineraries extends Component { View all options {/* FIXME: only save if meets requirements (e.g., is transit + non-realtime mode) */} - {persistence && persistence.enabled + {persistence && persistence.enabled && showSaveButton ? t.key === 'BATCH')) } + +// TODO: move to OTP-UI + add tests? +/** + * @returns true if at least one of the legs of the specified itinerary is a transit leg. + */ +export function itineraryHasTransit (itinerary) { + if (itinerary && itinerary.legs) { + for (const leg of itinerary.legs) { + if (coreUtils.itinerary.isTransit(leg.mode)) { + return true + } + } + } + + return false +} From b0831d1017638551b8ee0e07db9e67e55071f28a Mon Sep 17 00:00:00 2001 From: binh-dam-ibigroup <56846598+binh-dam-ibigroup@users.noreply.github.com> Date: Thu, 29 Oct 2020 19:23:29 -0400 Subject: [PATCH 16/58] refactor(TripBasicsPane): Adjust to new backend return data structure for itin checks. --- lib/components/user/trip-basics-pane.js | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/lib/components/user/trip-basics-pane.js b/lib/components/user/trip-basics-pane.js index 02cb8cb3f..c584dca19 100644 --- a/lib/components/user/trip-basics-pane.js +++ b/lib/components/user/trip-basics-pane.js @@ -16,7 +16,7 @@ import { ALL_DAYS } from '../../util/monitored-trip' import TripSummary from './trip-summary' // Styles. -const StyledLabel = styled.label` +const TripDayLabel = styled.label` border: 1px solid #ccc; border-left: none; box-sizing: border-box; @@ -59,7 +59,7 @@ class TripBasicsPane extends Component { async componentDidMount () { // Check itinerary existence for all days. - const { accessToken, config, setFieldValue, values } = this.props + const { accessToken, config, isCreating, setFieldValue, values } = this.props const itineraryCheckResult = await checkItinerary( config.persistence.otp_middleware, @@ -69,12 +69,12 @@ class TripBasicsPane extends Component { this.setState({ itineraryCheckResult }) - // Update the Formik state to uncheck days for which the itinerary is not available. - // Note: If a trip becomes unavailable after the user initially saves a trip, - // upon saving, the days the itinerary does not exist will no longer be monitored. - if (itineraryCheckResult && itineraryCheckResult.status === 'success') { + // For new trips only, + // update the Formik state to uncheck days for which the itinerary is not available. + if (isCreating && itineraryCheckResult && itineraryCheckResult.status === 'success') { ALL_DAYS.forEach(day => { - if (!itineraryCheckResult.data[day]) { + const dayAvailability = itineraryCheckResult.data[day] + if (!dayAvailability || !dayAvailability.isValid) { setFieldValue(day, false) } }) @@ -126,13 +126,13 @@ class TripBasicsPane extends Component { const isDayDisabled = itineraryCheckResult && itineraryCheckResult.status === 'success' && - !itineraryCheckResult.data[name] + (!itineraryCheckResult.data[name] || !itineraryCheckResult.data[name].isValid) const boxClass = isDayDisabled ? 'alert-danger' : (monitoredTrip[name] ? 'bg-primary' : '') const notAvailableText = isDayDisabled ? `Trip not available on ${fullText}` : null return ( - + {text} { // Let users save an existing trip, even though it may not be available on some days. // TODO: improve checking trip availability. @@ -140,7 +140,7 @@ class TripBasicsPane extends Component { ? : } - + ) })}
From ea97ce635402164e163c1f46be35c6ac7d971697 Mon Sep 17 00:00:00 2001 From: binh-dam-ibigroup <56846598+binh-dam-ibigroup@users.noreply.github.com> Date: Thu, 29 Oct 2020 21:21:27 -0400 Subject: [PATCH 17/58] refactor(actions/user): Move itinerary check to actions/reducer. --- lib/actions/user.js | 50 ++++++++++++------ lib/components/user/trip-basics-pane.js | 70 +++++++++++++------------ lib/reducers/create-user-reducer.js | 13 +++++ 3 files changed, 82 insertions(+), 51 deletions(-) diff --git a/lib/actions/user.js b/lib/actions/user.js index ba265128c..e575adb05 100644 --- a/lib/actions/user.js +++ b/lib/actions/user.js @@ -5,14 +5,17 @@ import { secureFetch } from '../util/middleware' import { isNewUser } from '../util/user' // Middleware API paths. -const API_MONITORTRIP_PATH = '/api/secure/monitoredtrip' +const API_ITINERARY_CHECK_PATH = '/api/secure/itinerarycheck' +const API_MONITORED_TRIP_PATH = '/api/secure/monitoredtrip' const API_OTPUSER_PATH = '/api/secure/user' -const API_OTPUSER_VERIFYSMS_PATH = '/verify_sms' +const API_OTPUSER_VERIFY_SMS_PATH = '/verify_sms' const setCurrentUser = createAction('SET_CURRENT_USER') const setCurrentUserMonitoredTrips = createAction('SET_CURRENT_USER_MONITORED_TRIPS') const setLastPhoneSmsRequest = createAction('SET_LAST_PHONE_SMS_REQUEST') export const setPathBeforeSignIn = createAction('SET_PATH_BEFORE_SIGNIN') +export const clearItineraryAvailability = createAction('CLEAR_ITINERARY_AVAILABILITY') +const setItineraryAvailability = createAction('SET_ITINERARY_AVAILABILITY') function createNewUser (auth0User) { return { @@ -160,7 +163,7 @@ export function createOrUpdateUser (userData, silentOnSuccess = false) { export function fetchUserMonitoredTrips () { return async function (dispatch, getState) { const { accessToken, apiBaseUrl, apiKey } = getMiddlewareVariables(getState()) - const requestUrl = `${apiBaseUrl}${API_MONITORTRIP_PATH}` + const requestUrl = `${apiBaseUrl}${API_MONITORED_TRIP_PATH}` const { data: trips, status } = await secureFetch(requestUrl, accessToken, apiKey, 'GET') if (status === 'success') { @@ -182,10 +185,10 @@ export function createOrUpdateUserMonitoredTrip (tripData, isNew, silentOnSucces // Determine URL and method to use. if (isNew) { - requestUrl = `${apiBaseUrl}${API_MONITORTRIP_PATH}` + requestUrl = `${apiBaseUrl}${API_MONITORED_TRIP_PATH}` method = 'POST' } else { - requestUrl = `${apiBaseUrl}${API_MONITORTRIP_PATH}/${id}` + requestUrl = `${apiBaseUrl}${API_MONITORED_TRIP_PATH}/${id}` method = 'PUT' } @@ -217,7 +220,7 @@ export function createOrUpdateUserMonitoredTrip (tripData, isNew, silentOnSucces export function deleteUserMonitoredTrip (tripId) { return async function (dispatch, getState) { const { accessToken, apiBaseUrl, apiKey } = getMiddlewareVariables(getState()) - const requestUrl = `${apiBaseUrl}${API_MONITORTRIP_PATH}/${tripId}` + const requestUrl = `${apiBaseUrl}${API_MONITORED_TRIP_PATH}/${tripId}` const { message, status } = await secureFetch(requestUrl, accessToken, apiKey, 'DELETE') if (status === 'success') { @@ -243,7 +246,7 @@ export function requestPhoneVerificationSms (newPhoneNumber) { // TODO: Should throttling be handled in the middleware? if (number !== newPhoneNumber || (now - timestamp) >= 60000) { const { accessToken, apiBaseUrl, apiKey, loggedInUser } = getMiddlewareVariables(state) - const requestUrl = `${apiBaseUrl}${API_OTPUSER_PATH}/${loggedInUser.id}${API_OTPUSER_VERIFYSMS_PATH}/${encodeURIComponent(newPhoneNumber)}` + const requestUrl = `${apiBaseUrl}${API_OTPUSER_PATH}/${loggedInUser.id}${API_OTPUSER_VERIFY_SMS_PATH}/${encodeURIComponent(newPhoneNumber)}` const { message, status } = await secureFetch(requestUrl, accessToken, apiKey, 'GET') @@ -273,7 +276,7 @@ export function requestPhoneVerificationSms (newPhoneNumber) { export function verifyPhoneNumber (code) { return async function (dispatch, getState) { const { accessToken, apiBaseUrl, apiKey, loggedInUser } = getMiddlewareVariables(getState()) - const requestUrl = `${apiBaseUrl}${API_OTPUSER_PATH}/${loggedInUser.id}${API_OTPUSER_VERIFYSMS_PATH}/${code}` + const requestUrl = `${apiBaseUrl}${API_OTPUSER_PATH}/${loggedInUser.id}${API_OTPUSER_VERIFY_SMS_PATH}/${code}` const { data, status } = await secureFetch(requestUrl, accessToken, apiKey, 'POST') @@ -293,13 +296,26 @@ export function verifyPhoneNumber (code) { } } } -/* -export async function checkItinerary (middlewareConfig, token, monitoredTrip) { - const { apiBaseUrl, apiKey } = middlewareConfig - const requestUrl = `${apiBaseUrl}${API_ITINERARYCHECK_PATH}` - - return secureFetch(requestUrl, token, apiKey, 'POST', { - body: JSON.stringify(monitoredTrip) - }) + +/** + * Check itinerary availability (existence) for the given monitored trip. + */ +export function checkItineraryAvailability (trip) { + return async function (dispatch, getState) { + const { accessToken, apiBaseUrl, apiKey } = getMiddlewareVariables(getState()) + const requestUrl = `${apiBaseUrl}${API_ITINERARY_CHECK_PATH}` + + // Empty state before performing the checks. + dispatch(clearItineraryAvailability()) + + const { data, status } = await secureFetch(requestUrl, accessToken, apiKey, 'POST', { + body: JSON.stringify(trip) + }) + + if (status === 'success' && data) { + dispatch(setItineraryAvailability(data)) + } else { + alert('Error checking the availability of your selected trip.') + } + } } -*/ diff --git a/lib/components/user/trip-basics-pane.js b/lib/components/user/trip-basics-pane.js index c584dca19..ca2d42519 100644 --- a/lib/components/user/trip-basics-pane.js +++ b/lib/components/user/trip-basics-pane.js @@ -11,7 +11,7 @@ import { import { connect } from 'react-redux' import styled from 'styled-components' -import { checkItinerary } from '../../util/middleware' +import * as userActions from '../../actions/user' import { ALL_DAYS } from '../../util/monitored-trip' import TripSummary from './trip-summary' @@ -46,45 +46,47 @@ const allDays = [ { name: 'sunday', text: 'Sun.', fullText: 'Sundays' } ] +/** + * @returns true if there is a trip matching for the specified availability/existence check. + */ +function isDayAvailable (dayAvailability) { + return dayAvailability && dayAvailability.isValid +} + /** * This component shows summary information for a trip * and lets the user edit the trip name and day. */ class TripBasicsPane extends Component { - constructor () { - super() - - this.state = {} + componentDidMount () { + // Check itinerary availability (existence) for all days. + const { checkItineraryAvailability, values: monitoredTrip } = this.props + checkItineraryAvailability(monitoredTrip) } - async componentDidMount () { - // Check itinerary existence for all days. - const { accessToken, config, isCreating, setFieldValue, values } = this.props - - const itineraryCheckResult = await checkItinerary( - config.persistence.otp_middleware, - accessToken, - values - ) + componentDidUpdate (prevProps) { + const { isCreating, itineraryAvailability, setFieldValue } = this.props - this.setState({ itineraryCheckResult }) - - // For new trips only, - // update the Formik state to uncheck days for which the itinerary is not available. - if (isCreating && itineraryCheckResult && itineraryCheckResult.status === 'success') { - ALL_DAYS.forEach(day => { - const dayAvailability = itineraryCheckResult.data[day] - if (!dayAvailability || !dayAvailability.isValid) { - setFieldValue(day, false) - } - }) + if (itineraryAvailability !== prevProps.itineraryAvailability) { + // For new trips only, + // update the Formik state to uncheck days for which the itinerary is not available. + if (isCreating && itineraryAvailability) { + ALL_DAYS.forEach(day => { + if (!isDayAvailable(itineraryAvailability[day])) { + setFieldValue(day, false) + } + }) + } } } + componentWillUnmount () { + this.props.clearItineraryAvailability() + } + render () { - const { errors, isCreating, touched, values: monitoredTrip } = this.props + const { errors, isCreating, itineraryAvailability, touched, values: monitoredTrip } = this.props const { itinerary } = monitoredTrip - const { itineraryCheckResult } = this.state if (!itinerary) { return
No itinerary to display.
@@ -123,11 +125,7 @@ class TripBasicsPane extends Component { What days do you take this trip?
{allDays.map(({ name, fullText, text }, index) => { - const isDayDisabled = - itineraryCheckResult && - itineraryCheckResult.status === 'success' && - (!itineraryCheckResult.data[name] || !itineraryCheckResult.data[name].isValid) - + const isDayDisabled = itineraryAvailability && !isDayAvailable(itineraryAvailability[name]) const boxClass = isDayDisabled ? 'alert-danger' : (monitoredTrip[name] ? 'bg-primary' : '') const notAvailableText = isDayDisabled ? `Trip not available on ${fullText}` : null @@ -146,7 +144,7 @@ class TripBasicsPane extends Component {
- {itineraryCheckResult + {itineraryAvailability ? ( <>Your trip is available on the days of the week as indicated above. ) : ( @@ -164,13 +162,17 @@ class TripBasicsPane extends Component { // Connect to redux store const mapStateToProps = (state, ownProps) => { + const { accessToken, itineraryAvailability } = state.user return { + accessToken, config: state.otp.config, - accessToken: state.user.accessToken + itineraryAvailability } } const mapDispatchToProps = { + checkItineraryAvailability: userActions.checkItineraryAvailability, + clearItineraryAvailability: userActions.clearItineraryAvailability } export default connect(mapStateToProps, mapDispatchToProps)(TripBasicsPane) diff --git a/lib/reducers/create-user-reducer.js b/lib/reducers/create-user-reducer.js index eb5a6b430..b02021f80 100644 --- a/lib/reducers/create-user-reducer.js +++ b/lib/reducers/create-user-reducer.js @@ -4,6 +4,7 @@ import update from 'immutability-helper' function createUserReducer () { const initialState = { accessToken: null, + itineraryAvailability: null, lastPhoneSmsRequest: { number: null, status: null, @@ -41,6 +42,18 @@ function createUserReducer () { }) } + case 'SET_ITINERARY_AVAILABILITY': { + return update(state, { + itineraryAvailability: { $set: action.payload } + }) + } + + case 'CLEAR_ITINERARY_AVAILABILITY': { + return update(state, { + itineraryAvailability: { $set: null } + }) + } + default: return state } From 214e266d7b2b56c0e667358d9a5cac689a23212e Mon Sep 17 00:00:00 2001 From: binh-dam-ibigroup <56846598+binh-dam-ibigroup@users.noreply.github.com> Date: Thu, 29 Oct 2020 21:26:53 -0400 Subject: [PATCH 18/58] fix(NarrativeItineraries): Adjust Proptypes. --- lib/components/narrative/narrative-itineraries.js | 2 +- lib/components/narrative/tabbed-itineraries.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/components/narrative/narrative-itineraries.js b/lib/components/narrative/narrative-itineraries.js index 93b245fa6..56c7f9ee0 100644 --- a/lib/components/narrative/narrative-itineraries.js +++ b/lib/components/narrative/narrative-itineraries.js @@ -38,7 +38,7 @@ class NarrativeItineraries extends Component { static propTypes = { itineraries: PropTypes.array, itineraryClass: PropTypes.func, - pending: PropTypes.number, + pending: PropTypes.bool, activeItinerary: PropTypes.number, setActiveItinerary: PropTypes.func, setActiveLeg: PropTypes.func, diff --git a/lib/components/narrative/tabbed-itineraries.js b/lib/components/narrative/tabbed-itineraries.js index 02dc0f2ee..991c454f7 100644 --- a/lib/components/narrative/tabbed-itineraries.js +++ b/lib/components/narrative/tabbed-itineraries.js @@ -15,7 +15,7 @@ class TabbedItineraries extends Component { static propTypes = { itineraries: PropTypes.array, itineraryClass: PropTypes.func, - pending: PropTypes.bool, + pending: PropTypes.number, activeItinerary: PropTypes.number, setActiveItinerary: PropTypes.func, setActiveLeg: PropTypes.func, From 5db7f2ebf9f364519597f18dac3252c214de9a3e Mon Sep 17 00:00:00 2001 From: binh-dam-ibigroup <56846598+binh-dam-ibigroup@users.noreply.github.com> Date: Fri, 30 Oct 2020 10:28:16 -0400 Subject: [PATCH 19/58] fix(NarrativeItineraries): Save trip with transit and no rentals only. --- .../narrative/narrative-itineraries.js | 7 +++-- lib/util/itinerary.js | 26 +++++++++++++++++++ 2 files changed, 29 insertions(+), 4 deletions(-) diff --git a/lib/components/narrative/narrative-itineraries.js b/lib/components/narrative/narrative-itineraries.js index 5cf69194a..4536ad94a 100644 --- a/lib/components/narrative/narrative-itineraries.js +++ b/lib/components/narrative/narrative-itineraries.js @@ -15,7 +15,7 @@ import { import DefaultItinerary from './default/default-itinerary' import Icon from '../narrative/icon' import LinkButton from '../user/link-button' -import { itineraryHasTransit } from '../../util/itinerary' +import { itineraryCanBeMonitored } from '../../util/itinerary' import { getResponsesWithErrors, getActiveItineraries, @@ -121,7 +121,6 @@ class NarrativeItineraries extends Component { } = this.props if (!activeSearch) return null const itineraryIsExpanded = activeItinerary !== undefined && activeItinerary !== null && this.state.showDetails - const showSaveButton = itineraryHasTransit(itineraries[activeItinerary]) const showRealtimeAnnotation = realtimeEffects.isAffectedByRealtimeData && ( realtimeEffects.exceedsThreshold || @@ -148,8 +147,8 @@ class NarrativeItineraries extends Component { onClick={this._toggleDetailedItinerary}> View all options - {/* FIXME: only save if meets requirements (e.g., is transit + non-realtime mode) */} - {persistence && persistence.enabled && showSaveButton + {/* Only save if itinerary has transit and no rental modes that cannot be guaranteed. */} + {persistence && persistence.enabled && itineraryCanBeMonitored(itineraries[activeItinerary]) ? -1) { + return true + } + } + } + + return false +} + +/** + * Determines whether an itinerary can be monitored. + * @returns true if at least one of the legs of the specified itinerary is + * a transit leg, and none of the legs is a rental leg (e.g. CAR_RENT, BICYCLE_RENT, etc.). + */ +export function itineraryCanBeMonitored (itinerary) { + return itineraryHasTransit(itinerary) && !itineraryHasRental(itinerary) +} From aa749058dfef2e17afb92aa82b9f1813e55724bc Mon Sep 17 00:00:00 2001 From: binh-dam-ibigroup <56846598+binh-dam-ibigroup@users.noreply.github.com> Date: Fri, 30 Oct 2020 10:32:42 -0400 Subject: [PATCH 20/58] refactor(LineItinerary): Remove 'Save trip' for line itinerary. --- lib/components/narrative/line-itin/line-itinerary.js | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/lib/components/narrative/line-itin/line-itinerary.js b/lib/components/narrative/line-itin/line-itinerary.js index bdd28f893..24c4f038b 100644 --- a/lib/components/narrative/line-itin/line-itinerary.js +++ b/lib/components/narrative/line-itin/line-itinerary.js @@ -6,7 +6,6 @@ import ItineraryBody from './connected-itinerary-body' import ItinerarySummary from './itin-summary' import NarrativeItinerary from '../narrative-itinerary' import SimpleRealtimeAnnotation from '../simple-realtime-annotation' -import LinkButton from '../../user/link-button' const { getLegModeLabel, getTimeZoneOffset, isTransit } = coreUtils.itinerary @@ -54,8 +53,7 @@ export default class LineItinerary extends NarrativeItinerary { onClick, setActiveLeg, showRealtimeAnnotation, - timeFormat, - user + timeFormat } = this.props if (!itinerary) { @@ -77,18 +75,13 @@ export default class LineItinerary extends NarrativeItinerary { timeOptions={timeOptions} /> - {user && - Save this option - } - {showRealtimeAnnotation && } {active || expanded ? Date: Mon, 2 Nov 2020 17:20:11 -0500 Subject: [PATCH 21/58] refactor(util/itinerary): Refactor itineraryCanBeMonitored. --- lib/util/itinerary.js | 44 +++++++++++++------------------------------ 1 file changed, 13 insertions(+), 31 deletions(-) diff --git a/lib/util/itinerary.js b/lib/util/itinerary.js index 0560ab8a2..1b5a83195 100644 --- a/lib/util/itinerary.js +++ b/lib/util/itinerary.js @@ -16,44 +16,26 @@ export function isBatchRoutingEnabled (otpConfig) { return Boolean(otpConfig.routingTypes.find(t => t.key === 'BATCH')) } -// TODO: move to OTP-UI + add tests? /** - * @returns true if at least one of the legs of the specified itinerary is a transit leg. + * Determines whether the specified Itinerary can be monitored. + * @returns true if at least one Leg of the specified Itinerary is a transit leg, + * and none of the legs is a rental or ride hail leg (e.g. CAR_RENT, CAR_HAIL, BICYCLE_RENT, etc.). + * (We use the corresponding fields returned by OTP to get transit legs and rental/ride hail legs.) */ -export function itineraryHasTransit (itinerary) { - if (itinerary && itinerary.legs) { - for (const leg of itinerary.legs) { - if (coreUtils.itinerary.isTransit(leg.mode)) { - return true - } - } - } - - return false -} +export function itineraryCanBeMonitored (itinerary) { + let hasTransit = false + let hasRentalOrRideHail = false -// TODO: move to OTP-UI + add tests? -/** - * @returns true if at least one of the legs of the specified itinerary is a rental leg - * (e.g. CAR_RENT, BICYCLE_RENT, MICROMOBILITY_RENT). - */ -export function itineraryHasRental (itinerary) { if (itinerary && itinerary.legs) { for (const leg of itinerary.legs) { - if (leg.mode.indexOf('_RENT') > -1) { - return true + if (leg.transitLeg) { + hasTransit = true + } + if (leg.rentedVehicle || leg.hailedCar) { + hasRentalOrRideHail = true } } } - return false -} - -/** - * Determines whether an itinerary can be monitored. - * @returns true if at least one of the legs of the specified itinerary is - * a transit leg, and none of the legs is a rental leg (e.g. CAR_RENT, BICYCLE_RENT, etc.). - */ -export function itineraryCanBeMonitored (itinerary) { - return itineraryHasTransit(itinerary) && !itineraryHasRental(itinerary) + return hasTransit && !hasRentalOrRideHail } From aa19444390bafc983ddc5ed51c0eb6fbd0aab1ae Mon Sep 17 00:00:00 2001 From: binh-dam-ibigroup <56846598+binh-dam-ibigroup@users.noreply.github.com> Date: Mon, 2 Nov 2020 17:58:27 -0500 Subject: [PATCH 22/58] test(util/itinerary): Add tests for itineraryCanBeMonitored. --- __tests__/util/itinerary.js | 63 +++++++++++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 __tests__/util/itinerary.js diff --git a/__tests__/util/itinerary.js b/__tests__/util/itinerary.js new file mode 100644 index 000000000..475ccb199 --- /dev/null +++ b/__tests__/util/itinerary.js @@ -0,0 +1,63 @@ +/* globals describe, expect, it */ + +import { itineraryCanBeMonitored } from '../../lib/util/itinerary' + +describe('util > itinerary', () => { + describe('itineraryCanBeMonitored', () => { + const transitLeg = { + mode: 'BUS', + transitLeg: true + } + const rentalLeg = { + mode: 'BICYCLE_RENT', + rentedVehicle: true + } + const walkLeg = { + mode: 'WALK' + } + const rideHailLeg = { + mode: 'CAR_HAIL', + hailedCar: true + } + + const testCases = [{ + expected: true, + itinerary: { + legs: [transitLeg, walkLeg] + }, + title: 'should be true for an itinerary with transit, no rentals/ride hail.' + }, { + expected: false, + itinerary: { + legs: [walkLeg, rentalLeg] + }, + title: 'should be false for an itinerary without transit.' + }, { + expected: false, + itinerary: { + legs: [walkLeg, transitLeg, rentalLeg] + }, + title: 'should be false for an itinerary with transit and rental.' + }, { + expected: false, + itinerary: { + legs: [walkLeg, transitLeg, rideHailLeg] + }, + title: 'should be false for an itinerary with transit and ride hail.' + }, { + expected: false, + itinerary: {}, + title: 'should be false for a blank itinerary.' + }, { + expected: false, + itinerary: null, + title: 'should be false for a null itinerary.' + }] + + testCases.forEach(({ expected, itinerary, title }) => { + it(title, () => { + expect(itineraryCanBeMonitored(itinerary))[expected ? 'toBeTruthy' : 'toBeFalsy']() + }) + }) + }) +}) From 936824ea49976c988f66247ba52261174f21be31 Mon Sep 17 00:00:00 2001 From: binh-dam-ibigroup <56846598+binh-dam-ibigroup@users.noreply.github.com> Date: Tue, 3 Nov 2020 14:27:09 -0500 Subject: [PATCH 23/58] refactor(util/itinerary): Add missing rental checks + corresponding tests. --- __tests__/util/itinerary.js | 28 ++++++++++++++++++++++++---- lib/util/itinerary.js | 5 ++++- 2 files changed, 28 insertions(+), 5 deletions(-) diff --git a/__tests__/util/itinerary.js b/__tests__/util/itinerary.js index 475ccb199..382dae25f 100644 --- a/__tests__/util/itinerary.js +++ b/__tests__/util/itinerary.js @@ -8,8 +8,16 @@ describe('util > itinerary', () => { mode: 'BUS', transitLeg: true } - const rentalLeg = { + const rentalBikeLeg = { mode: 'BICYCLE_RENT', + rentedBike: true + } + const rentalCarLeg = { + mode: 'CAR_RENT', + rentedCar: true + } + const rentalMicromobilityLeg = { + mode: 'MICROMOBILITY_RENT', rentedVehicle: true } const walkLeg = { @@ -29,15 +37,27 @@ describe('util > itinerary', () => { }, { expected: false, itinerary: { - legs: [walkLeg, rentalLeg] + legs: [walkLeg, rentalBikeLeg] }, title: 'should be false for an itinerary without transit.' }, { expected: false, itinerary: { - legs: [walkLeg, transitLeg, rentalLeg] + legs: [walkLeg, transitLeg, rentalBikeLeg] + }, + title: 'should be false for an itinerary with transit and rental bike.' + }, { + expected: false, + itinerary: { + legs: [walkLeg, transitLeg, rentalCarLeg] + }, + title: 'should be false for an itinerary with transit and rental car.' + }, { + expected: false, + itinerary: { + legs: [walkLeg, transitLeg, rentalMicromobilityLeg] }, - title: 'should be false for an itinerary with transit and rental.' + title: 'should be false for an itinerary with transit and rental micromobility.' }, { expected: false, itinerary: { diff --git a/lib/util/itinerary.js b/lib/util/itinerary.js index 1b5a83195..ce30be355 100644 --- a/lib/util/itinerary.js +++ b/lib/util/itinerary.js @@ -31,7 +31,10 @@ export function itineraryCanBeMonitored (itinerary) { if (leg.transitLeg) { hasTransit = true } - if (leg.rentedVehicle || leg.hailedCar) { + if (leg.rentedBike || + leg.rentedCar || + leg.rentedVehicle || + leg.hailedCar) { hasRentalOrRideHail = true } } From b353dcfdc3516cc72853551d821c428088948b4f Mon Sep 17 00:00:00 2001 From: binh-dam-ibigroup <56846598+binh-dam-ibigroup@users.noreply.github.com> Date: Tue, 3 Nov 2020 16:00:31 -0500 Subject: [PATCH 24/58] fix(SaveTripButton): Extract component, handle trip/login states. --- .../narrative/narrative-itineraries.js | 24 +----- lib/components/narrative/save-trip-button.js | 75 +++++++++++++++++++ lib/components/user/link-button.js | 12 ++- 3 files changed, 86 insertions(+), 25 deletions(-) create mode 100644 lib/components/narrative/save-trip-button.js diff --git a/lib/components/narrative/narrative-itineraries.js b/lib/components/narrative/narrative-itineraries.js index 4536ad94a..05e82de6a 100644 --- a/lib/components/narrative/narrative-itineraries.js +++ b/lib/components/narrative/narrative-itineraries.js @@ -14,14 +14,13 @@ import { } from '../../actions/narrative' import DefaultItinerary from './default/default-itinerary' import Icon from '../narrative/icon' -import LinkButton from '../user/link-button' -import { itineraryCanBeMonitored } from '../../util/itinerary' import { getResponsesWithErrors, getActiveItineraries, getActiveSearch, getRealtimeEffects } from '../../util/state' +import SaveTripButton from './save-trip-button' // TODO: move to utils? function humanReadableMode (modeStr) { @@ -58,11 +57,6 @@ class NarrativeItineraries extends Component { this.setState({showDetails: !this.state.showDetails}) } - _saveTrip = () => { - // FIXME: Replace with new save-trip functionality. - window.confirm('Are you sure you want to save this trip?') - } - _onFilterChange = evt => { const {sort, updateItineraryFilter} = this.props const {value} = evt.target @@ -114,7 +108,6 @@ class NarrativeItineraries extends Component { itineraries, itineraryClass, pending, - persistence, realtimeEffects, sort, useRealtime @@ -147,17 +140,8 @@ class NarrativeItineraries extends Component { onClick={this._toggleDetailedItinerary}> View all options - {/* Only save if itinerary has transit and no rental modes that cannot be guaranteed. */} - {persistence && persistence.enabled && itineraryCanBeMonitored(itineraries[activeItinerary]) - ? - Save trip - - : null - } + + : <>
{ const activeSearch = getActiveSearch(state.otp) - const {persistence} = state.otp.config const {modes} = state.otp.config const {filter, sort} = state.otp.filter const pending = activeSearch ? Boolean(activeSearch.pending) : false @@ -266,7 +249,6 @@ const mapStateToProps = (state, ownProps) => { activeStep: activeSearch && activeSearch.activeStep, filter, modes, - persistence, sort, timeFormat: coreUtils.time.getTimeFormat(state.otp.config), useRealtime, diff --git a/lib/components/narrative/save-trip-button.js b/lib/components/narrative/save-trip-button.js new file mode 100644 index 000000000..03fbb6507 --- /dev/null +++ b/lib/components/narrative/save-trip-button.js @@ -0,0 +1,75 @@ +import React from 'react' +import { connect } from 'react-redux' + +import LinkButton from '../user/link-button' +import { itineraryCanBeMonitored } from '../../util/itinerary' +import { + getActiveItineraries, + getActiveSearch +} from '../../util/state' + +/** + * This connected component encapsulates the states and behavior of the button + * to save an itinerary for notifications. + */ +const SaveTripButton = ({ + itinerary, + loggedInUser, + persistence +}) => { + // We are dealing with the following states: + // 1. Persistence disabled => just return null + // 2. User is not logged in => render something like: "Please sign in to save trip". + // 3. itin cannot be monitored => disable the button with prompt and tooltip. + + let buttonDisabled + let buttonText + let tooltipText + let icon + + if (!persistence || !persistence.enabled) { + return null + } else if (!loggedInUser) { + buttonDisabled = true + buttonText = 'Sign in to save trip' + icon = 'fa fa-lock' + tooltipText = 'Please sign in to save trip.' + } else if (!itineraryCanBeMonitored(itinerary)) { + buttonDisabled = true + buttonText = 'Cannot save' + icon = 'fa fa-ban' + tooltipText = 'Only itineraries that include transit and no rentals or ride hailing can be monitored.' + } else { + buttonText = 'Save trip' + icon = 'fa fa-plus-circle' + } + + return ( + + {buttonText} + + ) +} + +// connect to the redux store + +const mapStateToProps = (state, ownProps) => { + const activeSearch = getActiveSearch(state.otp) + const { persistence } = state.otp.config + const itineraries = getActiveItineraries(state.otp) + return { + itinerary: activeSearch && itineraries && itineraries[activeSearch.activeItinerary], + loggedInUser: state.user.loggedInUser, + persistence + } +} + +const mapDispatchToProps = (dispatch, ownProps) => {} + +export default connect(mapStateToProps, mapDispatchToProps)(SaveTripButton) diff --git a/lib/components/user/link-button.js b/lib/components/user/link-button.js index 4ada6a2c4..74c408d52 100644 --- a/lib/components/user/link-button.js +++ b/lib/components/user/link-button.js @@ -25,10 +25,14 @@ class LinkButton extends Component { render () { // Default componentClass to react-bootstrap Button (can be overridden // with, e.g., 'button') - const { children, className, componentClass = Button } = this.props - return React.createElement( - componentClass, - { children, className, onClick: this._handleClick } + const { children, componentClass: Component = Button, ...passedProps } = this.props + return ( + + {children} + ) } } From 944d0784cf62588fd0216ed8ce79b148ef914581 Mon Sep 17 00:00:00 2001 From: binh-dam-ibigroup <56846598+binh-dam-ibigroup@users.noreply.github.com> Date: Tue, 3 Nov 2020 16:56:56 -0500 Subject: [PATCH 25/58] refactor(SaveTripButton): Render disabled style. --- lib/components/narrative/save-trip-button.js | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/lib/components/narrative/save-trip-button.js b/lib/components/narrative/save-trip-button.js index 03fbb6507..f7b1e9dd2 100644 --- a/lib/components/narrative/save-trip-button.js +++ b/lib/components/narrative/save-trip-button.js @@ -1,4 +1,5 @@ import React from 'react' +import { OverlayTrigger, Tooltip } from 'react-bootstrap' import { connect } from 'react-redux' import LinkButton from '../user/link-button' @@ -44,12 +45,23 @@ const SaveTripButton = ({ icon = 'fa fa-plus-circle' } + if (buttonDisabled) { + const tooltip = {tooltipText} + + return ( + // Apply disabled bootstrap button styles to a non-input element + // to keep Tooltip and OverlayTrigger functional. + + + {buttonText} + + + ) + } + return ( {buttonText} From efa6a6561c7d9f4a3633526cd9eb98b8524d6825 Mon Sep 17 00:00:00 2001 From: binh-dam-ibigroup <56846598+binh-dam-ibigroup@users.noreply.github.com> Date: Wed, 4 Nov 2020 11:42:54 -0500 Subject: [PATCH 26/58] refactor: Adjust to updated itinerary check backend. --- lib/actions/user.js | 20 ++++++++-------- lib/components/user/trip-basics-pane.js | 32 ++++++++++++------------- lib/reducers/create-user-reducer.js | 6 ++--- 3 files changed, 29 insertions(+), 29 deletions(-) diff --git a/lib/actions/user.js b/lib/actions/user.js index e575adb05..9eafb3c15 100644 --- a/lib/actions/user.js +++ b/lib/actions/user.js @@ -5,17 +5,17 @@ import { secureFetch } from '../util/middleware' import { isNewUser } from '../util/user' // Middleware API paths. -const API_ITINERARY_CHECK_PATH = '/api/secure/itinerarycheck' +const API_MONITORED_TRIP_CHECK_SUBPATH = '/checkitinerary' const API_MONITORED_TRIP_PATH = '/api/secure/monitoredtrip' const API_OTPUSER_PATH = '/api/secure/user' -const API_OTPUSER_VERIFY_SMS_PATH = '/verify_sms' +const API_OTPUSER_VERIFY_SMS_SUBPATH = '/verify_sms' const setCurrentUser = createAction('SET_CURRENT_USER') const setCurrentUserMonitoredTrips = createAction('SET_CURRENT_USER_MONITORED_TRIPS') const setLastPhoneSmsRequest = createAction('SET_LAST_PHONE_SMS_REQUEST') export const setPathBeforeSignIn = createAction('SET_PATH_BEFORE_SIGNIN') -export const clearItineraryAvailability = createAction('CLEAR_ITINERARY_AVAILABILITY') -const setItineraryAvailability = createAction('SET_ITINERARY_AVAILABILITY') +export const clearItineraryExistence = createAction('CLEAR_ITINERARY_AVAILABILITY') +const setitineraryExistence = createAction('SET_ITINERARY_AVAILABILITY') function createNewUser (auth0User) { return { @@ -246,7 +246,7 @@ export function requestPhoneVerificationSms (newPhoneNumber) { // TODO: Should throttling be handled in the middleware? if (number !== newPhoneNumber || (now - timestamp) >= 60000) { const { accessToken, apiBaseUrl, apiKey, loggedInUser } = getMiddlewareVariables(state) - const requestUrl = `${apiBaseUrl}${API_OTPUSER_PATH}/${loggedInUser.id}${API_OTPUSER_VERIFY_SMS_PATH}/${encodeURIComponent(newPhoneNumber)}` + const requestUrl = `${apiBaseUrl}${API_OTPUSER_PATH}/${loggedInUser.id}${API_OTPUSER_VERIFY_SMS_SUBPATH}/${encodeURIComponent(newPhoneNumber)}` const { message, status } = await secureFetch(requestUrl, accessToken, apiKey, 'GET') @@ -276,7 +276,7 @@ export function requestPhoneVerificationSms (newPhoneNumber) { export function verifyPhoneNumber (code) { return async function (dispatch, getState) { const { accessToken, apiBaseUrl, apiKey, loggedInUser } = getMiddlewareVariables(getState()) - const requestUrl = `${apiBaseUrl}${API_OTPUSER_PATH}/${loggedInUser.id}${API_OTPUSER_VERIFY_SMS_PATH}/${code}` + const requestUrl = `${apiBaseUrl}${API_OTPUSER_PATH}/${loggedInUser.id}${API_OTPUSER_VERIFY_SMS_SUBPATH}/${code}` const { data, status } = await secureFetch(requestUrl, accessToken, apiKey, 'POST') @@ -300,20 +300,20 @@ export function verifyPhoneNumber (code) { /** * Check itinerary availability (existence) for the given monitored trip. */ -export function checkItineraryAvailability (trip) { +export function checkItineraryExistence (trip) { return async function (dispatch, getState) { const { accessToken, apiBaseUrl, apiKey } = getMiddlewareVariables(getState()) - const requestUrl = `${apiBaseUrl}${API_ITINERARY_CHECK_PATH}` + const requestUrl = `${apiBaseUrl}${API_MONITORED_TRIP_PATH}${API_MONITORED_TRIP_CHECK_SUBPATH}` // Empty state before performing the checks. - dispatch(clearItineraryAvailability()) + dispatch(clearItineraryExistence()) const { data, status } = await secureFetch(requestUrl, accessToken, apiKey, 'POST', { body: JSON.stringify(trip) }) if (status === 'success' && data) { - dispatch(setItineraryAvailability(data)) + dispatch(setitineraryExistence(data)) } else { alert('Error checking the availability of your selected trip.') } diff --git a/lib/components/user/trip-basics-pane.js b/lib/components/user/trip-basics-pane.js index ca2d42519..bf8a414a3 100644 --- a/lib/components/user/trip-basics-pane.js +++ b/lib/components/user/trip-basics-pane.js @@ -49,8 +49,8 @@ const allDays = [ /** * @returns true if there is a trip matching for the specified availability/existence check. */ -function isDayAvailable (dayAvailability) { - return dayAvailability && dayAvailability.isValid +function itineraryExists (dayCheck) { + return dayCheck && dayCheck.valid } /** @@ -60,19 +60,19 @@ function isDayAvailable (dayAvailability) { class TripBasicsPane extends Component { componentDidMount () { // Check itinerary availability (existence) for all days. - const { checkItineraryAvailability, values: monitoredTrip } = this.props - checkItineraryAvailability(monitoredTrip) + const { checkItineraryExistence, values: monitoredTrip } = this.props + checkItineraryExistence(monitoredTrip) } componentDidUpdate (prevProps) { - const { isCreating, itineraryAvailability, setFieldValue } = this.props + const { isCreating, itineraryExistence, setFieldValue } = this.props - if (itineraryAvailability !== prevProps.itineraryAvailability) { + if (itineraryExistence !== prevProps.itineraryExistence) { // For new trips only, // update the Formik state to uncheck days for which the itinerary is not available. - if (isCreating && itineraryAvailability) { + if (isCreating && itineraryExistence) { ALL_DAYS.forEach(day => { - if (!isDayAvailable(itineraryAvailability[day])) { + if (!itineraryExists(itineraryExistence[day])) { setFieldValue(day, false) } }) @@ -81,11 +81,11 @@ class TripBasicsPane extends Component { } componentWillUnmount () { - this.props.clearItineraryAvailability() + this.props.clearItineraryExistence() } render () { - const { errors, isCreating, itineraryAvailability, touched, values: monitoredTrip } = this.props + const { errors, isCreating, itineraryExistence, touched, values: monitoredTrip } = this.props const { itinerary } = monitoredTrip if (!itinerary) { @@ -125,7 +125,7 @@ class TripBasicsPane extends Component { What days do you take this trip?
{allDays.map(({ name, fullText, text }, index) => { - const isDayDisabled = itineraryAvailability && !isDayAvailable(itineraryAvailability[name]) + const isDayDisabled = itineraryExistence && !itineraryExists(itineraryExistence[name]) const boxClass = isDayDisabled ? 'alert-danger' : (monitoredTrip[name] ? 'bg-primary' : '') const notAvailableText = isDayDisabled ? `Trip not available on ${fullText}` : null @@ -144,7 +144,7 @@ class TripBasicsPane extends Component {
- {itineraryAvailability + {itineraryExistence ? ( <>Your trip is available on the days of the week as indicated above. ) : ( @@ -162,17 +162,17 @@ class TripBasicsPane extends Component { // Connect to redux store const mapStateToProps = (state, ownProps) => { - const { accessToken, itineraryAvailability } = state.user + const { accessToken, itineraryExistence } = state.user return { accessToken, config: state.otp.config, - itineraryAvailability + itineraryExistence } } const mapDispatchToProps = { - checkItineraryAvailability: userActions.checkItineraryAvailability, - clearItineraryAvailability: userActions.clearItineraryAvailability + checkItineraryExistence: userActions.checkItineraryExistence, + clearItineraryExistence: userActions.clearItineraryExistence } export default connect(mapStateToProps, mapDispatchToProps)(TripBasicsPane) diff --git a/lib/reducers/create-user-reducer.js b/lib/reducers/create-user-reducer.js index b02021f80..46cebe500 100644 --- a/lib/reducers/create-user-reducer.js +++ b/lib/reducers/create-user-reducer.js @@ -4,7 +4,7 @@ import update from 'immutability-helper' function createUserReducer () { const initialState = { accessToken: null, - itineraryAvailability: null, + itineraryExistence: null, lastPhoneSmsRequest: { number: null, status: null, @@ -44,13 +44,13 @@ function createUserReducer () { case 'SET_ITINERARY_AVAILABILITY': { return update(state, { - itineraryAvailability: { $set: action.payload } + itineraryExistence: { $set: action.payload } }) } case 'CLEAR_ITINERARY_AVAILABILITY': { return update(state, { - itineraryAvailability: { $set: null } + itineraryExistence: { $set: null } }) } From e7cb719f2534a49058b4a03f9ce1beafddf59ecf Mon Sep 17 00:00:00 2001 From: binh-dam-ibigroup <56846598+binh-dam-ibigroup@users.noreply.github.com> Date: Wed, 4 Nov 2020 14:31:20 -0500 Subject: [PATCH 27/58] refactor(actions/user): Twaek comment/error msg for itinerary check. --- lib/actions/user.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/actions/user.js b/lib/actions/user.js index 9eafb3c15..f991acbd1 100644 --- a/lib/actions/user.js +++ b/lib/actions/user.js @@ -298,7 +298,7 @@ export function verifyPhoneNumber (code) { } /** - * Check itinerary availability (existence) for the given monitored trip. + * Check itinerary existence for the given monitored trip. */ export function checkItineraryExistence (trip) { return async function (dispatch, getState) { @@ -315,7 +315,7 @@ export function checkItineraryExistence (trip) { if (status === 'success' && data) { dispatch(setitineraryExistence(data)) } else { - alert('Error checking the availability of your selected trip.') + alert('Error checking whether your selected trip is possible.') } } } From 4ccc5221910a02aab41e33d5251ec20459c8f68c Mon Sep 17 00:00:00 2001 From: binh-dam-ibigroup <56846598+binh-dam-ibigroup@users.noreply.github.com> Date: Wed, 4 Nov 2020 17:12:25 -0500 Subject: [PATCH 28/58] refactor: Address comments for test, redux connect. --- __tests__/util/itinerary.js | 2 +- lib/components/narrative/save-trip-button.js | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/__tests__/util/itinerary.js b/__tests__/util/itinerary.js index 382dae25f..c2604a303 100644 --- a/__tests__/util/itinerary.js +++ b/__tests__/util/itinerary.js @@ -76,7 +76,7 @@ describe('util > itinerary', () => { testCases.forEach(({ expected, itinerary, title }) => { it(title, () => { - expect(itineraryCanBeMonitored(itinerary))[expected ? 'toBeTruthy' : 'toBeFalsy']() + expect(itineraryCanBeMonitored(itinerary)).toBe(expected) }) }) }) diff --git a/lib/components/narrative/save-trip-button.js b/lib/components/narrative/save-trip-button.js index f7b1e9dd2..534b69097 100644 --- a/lib/components/narrative/save-trip-button.js +++ b/lib/components/narrative/save-trip-button.js @@ -82,6 +82,4 @@ const mapStateToProps = (state, ownProps) => { } } -const mapDispatchToProps = (dispatch, ownProps) => {} - -export default connect(mapStateToProps, mapDispatchToProps)(SaveTripButton) +export default connect(mapStateToProps)(SaveTripButton) From 199136e0f8c986ac7a2537ec8cd6e98412f4c188 Mon Sep 17 00:00:00 2001 From: binh-dam-ibigroup <56846598+binh-dam-ibigroup@users.noreply.github.com> Date: Thu, 5 Nov 2020 18:22:17 -0500 Subject: [PATCH 29/58] refactor(VerifyEmailScreen): Create action for resending verif. email, remove old code. --- lib/actions/user.js | 19 ++++++++ lib/components/user/user-account-screen.js | 4 +- lib/components/user/verify-email-screen.js | 51 +++++++++++----------- 3 files changed, 45 insertions(+), 29 deletions(-) diff --git a/lib/actions/user.js b/lib/actions/user.js index aa8e8d095..10a4ef981 100644 --- a/lib/actions/user.js +++ b/lib/actions/user.js @@ -152,6 +152,25 @@ export function createOrUpdateUser (userData, silentOnSuccess = false) { } } +/** + * Requests the verification email for the new user to be resent. + */ +export function resendVerificationEmail (auth0) { + return async function (dispatch, getState) { + const { apiBaseUrl, apiKey } = getMiddlewareVariables(getState()) + const accessToken = await auth0.getAccessTokenSilently() + + // TODO: add any throttling. + const requestUrl = `${apiBaseUrl}${API_OTPUSER_PATH}/verification-email` + const { status } = await secureFetch(requestUrl, accessToken, apiKey) + + // TODO: improve the UI feedback messages for this. + if (status === 'success') { + alert('The email verification message has been resent.') + } + } +} + /** * Fetches the saved/monitored trips for a user. * We use the accessToken to fetch the data regardless of diff --git a/lib/components/user/user-account-screen.js b/lib/components/user/user-account-screen.js index f1b0b4676..81721259e 100644 --- a/lib/components/user/user-account-screen.js +++ b/lib/components/user/user-account-screen.js @@ -134,7 +134,6 @@ class UserAccountScreen extends Component { render () { const { auth0, - config, loggedInUser, phoneFormatOptions, requestPhoneVerificationSms, @@ -167,7 +166,7 @@ class UserAccountScreen extends Component { if (this.state.isNewUser) { if (!auth0.user.email_verified) { // Check and prompt for email verification first to avoid extra user wait. - formContents = + formContents = } else { // New users are shown "wizard" (step-by-step) mode // (includes when a "new" user clicks "My Account" from the account menu in the nav bar). @@ -209,7 +208,6 @@ class UserAccountScreen extends Component { const mapStateToProps = (state, ownProps) => { return { - config: state.otp.config, loggedInUser: state.user.loggedInUser, phoneFormatOptions: state.otp.config.phoneFormatOptions } diff --git a/lib/components/user/verify-email-screen.js b/lib/components/user/verify-email-screen.js index b3c4a9177..efc5eaef0 100644 --- a/lib/components/user/verify-email-screen.js +++ b/lib/components/user/verify-email-screen.js @@ -1,8 +1,9 @@ import React, { Component } from 'react' import { Button } from 'react-bootstrap' +import { connect } from 'react-redux' import styled from 'styled-components' -import { secureFetch } from '../../util/middleware' +import * as userActions from '../../actions/user' const DivSpacer = styled.div` margin-top: ${props => props.space || 2}em; @@ -16,24 +17,14 @@ const DivSpacer = styled.div` * is to simply reload the page.) */ class VerifyEmailScreen extends Component { - resendVerificationEmail = () => { - const { auth, middlewareConfig } = this.props - const { accessToken } = auth - if (!accessToken) { - console.warn('No access token found.') - return - } - const { apiBaseUrl, apiKey } = middlewareConfig - - secureFetch(`${apiBaseUrl}/api/secure/user/verification-email`, accessToken, apiKey) - .then(json => window.alert('Verification email resent!')) - // TODO: check status of the request. + _handleResendVerificationEmail = () => { + const { auth0, resendVerificationEmail } = this.props + resendVerificationEmail(auth0) } _handleClick = () => window.location.reload() render () { - const { middlewareConfig } = this.props return (

Verify your email address

@@ -54,20 +45,28 @@ class VerifyEmailScreen extends Component { - {middlewareConfig && ( - - - - )} + + +
) } } -export default VerifyEmailScreen +// connect to the redux store + +const mapStateToProps = () => { + return {} +} + +const mapDispatchToProps = { + resendVerificationEmail: userActions.resendVerificationEmail +} + +export default connect(mapStateToProps, mapDispatchToProps)(VerifyEmailScreen) From 89eb0c73787ff4199e88475201ed03b84450df5d Mon Sep 17 00:00:00 2001 From: Evan Siroky Date: Thu, 5 Nov 2020 18:17:03 -0800 Subject: [PATCH 30/58] chore: update to latest otp-ui packages --- package.json | 34 ++++---- yarn.lock | 239 +++++++++++++++++++++++++-------------------------- 2 files changed, 134 insertions(+), 139 deletions(-) diff --git a/package.json b/package.json index 597e4172b..3ade86523 100644 --- a/package.json +++ b/package.json @@ -28,26 +28,26 @@ "homepage": "https://github.com/opentripplanner/otp-react-redux#readme", "dependencies": { "@auth0/auth0-react": "^1.1.0", - "@opentripplanner/base-map": "^1.0.2", - "@opentripplanner/core-utils": "^2.1.2", - "@opentripplanner/endpoints-overlay": "^1.0.2", - "@opentripplanner/from-to-location-picker": "^1.0.1", + "@opentripplanner/base-map": "^1.0.4", + "@opentripplanner/core-utils": "^3.0.0", + "@opentripplanner/endpoints-overlay": "^1.0.4", + "@opentripplanner/from-to-location-picker": "^1.0.3", "@opentripplanner/geocoder": "^1.0.2", "@opentripplanner/humanize-distance": "^0.0.22", - "@opentripplanner/icons": "^1.0.1", - "@opentripplanner/itinerary-body": "^1.2.0", - "@opentripplanner/location-field": "^1.0.2", + "@opentripplanner/icons": "^1.0.4", + "@opentripplanner/itinerary-body": "^2.0.0", + "@opentripplanner/location-field": "^1.0.5", "@opentripplanner/location-icon": "^1.0.1", - "@opentripplanner/park-and-ride-overlay": "^1.0.1", - "@opentripplanner/printable-itinerary": "^1.0.0", - "@opentripplanner/route-viewer-overlay": "^1.0.1", - "@opentripplanner/stop-viewer-overlay": "^1.0.1", - "@opentripplanner/stops-overlay": "^1.0.1", - "@opentripplanner/transitive-overlay": "^1.0.2", - "@opentripplanner/trip-details": "^1.1.1", - "@opentripplanner/trip-form": "^1.0.2", - "@opentripplanner/trip-viewer-overlay": "^1.0.1", - "@opentripplanner/vehicle-rental-overlay": "^1.0.1", + "@opentripplanner/park-and-ride-overlay": "^1.0.3", + "@opentripplanner/printable-itinerary": "^1.0.3", + "@opentripplanner/route-viewer-overlay": "^1.0.3", + "@opentripplanner/stop-viewer-overlay": "^1.0.3", + "@opentripplanner/stops-overlay": "^3.0.1", + "@opentripplanner/transitive-overlay": "^1.0.4", + "@opentripplanner/trip-details": "^1.1.3", + "@opentripplanner/trip-form": "^1.0.4", + "@opentripplanner/trip-viewer-overlay": "^1.0.3", + "@opentripplanner/vehicle-rental-overlay": "^1.0.5", "bootstrap": "^3.3.7", "bowser": "^1.9.3", "clone": "^2.1.0", diff --git a/yarn.lock b/yarn.lock index 29c7785ee..1edcf2904 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1440,32 +1440,18 @@ universal-user-agent "^3.0.0" url-template "^2.0.8" -"@opentripplanner/base-map@^1.0.2": - version "1.0.2" - resolved "https://registry.yarnpkg.com/@opentripplanner/base-map/-/base-map-1.0.2.tgz#039dfdb11116ebb5d330a859f5ee33cfa6b8d768" - integrity sha512-QkNDJrZqGgiafO8fxJhnOFPWcpUIsDszlBZIh8q0B3ztFRPZeQA8cFX/c429PhXXmCbpYx5JkerhnxMKz140XA== - dependencies: - "@opentripplanner/core-utils" "^2.1.0" - prop-types "^15.7.2" - -"@opentripplanner/core-utils@^1.2.0": - version "1.2.2" - resolved "https://registry.yarnpkg.com/@opentripplanner/core-utils/-/core-utils-1.2.2.tgz#c943983d92c67b1aba2ad7b47f199fb46bbedc02" - integrity sha512-xISq454TA/mTu5wjMVvNRszHmeAKppS+jk5E3LRl+TaMWas5ovaNdKwlOXU62djGb41VOty4KYTnECliDPYDJw== +"@opentripplanner/base-map@^1.0.4": + version "1.0.4" + resolved "https://registry.yarnpkg.com/@opentripplanner/base-map/-/base-map-1.0.4.tgz#7a9e16c4c4aca0e6a0277ad2cbc48f2df8ecbead" + integrity sha512-yb6NIuPjas9Mo5/mXp6BnJMeJduIiZNbuM9ILxQT1W+Al1nQ3qhQD0GlQ6nv4hsAx6Vkbig899rfNjIZOe60Ew== dependencies: - "@mapbox/polyline" "^1.1.0" - "@turf/along" "^6.0.1" - bowser "^2.7.0" - lodash.isequal "^4.5.0" - moment "^2.24.0" - moment-timezone "^0.5.27" + "@opentripplanner/core-utils" "^3.0.0" prop-types "^15.7.2" - qs "^6.9.1" -"@opentripplanner/core-utils@^2.1.0", "@opentripplanner/core-utils@^2.1.1", "@opentripplanner/core-utils@^2.1.2": - version "2.1.2" - resolved "https://registry.yarnpkg.com/@opentripplanner/core-utils/-/core-utils-2.1.2.tgz#a19d5d788704f0a6c2aece5206a2c8997c251d16" - integrity sha512-i+ADDdHhC+oJNYPrk7o9eu3F/2IMMZ5YAOXR2QGBJbS97kQOYeTAN4pVGfWKTm7ClTTIBG9/NDnVyQMzGuYInw== +"@opentripplanner/core-utils@^3.0.0": + version "3.0.0" + resolved "https://registry.yarnpkg.com/@opentripplanner/core-utils/-/core-utils-3.0.0.tgz#7d2af3ef235d26f83a3aaf469e0cc76fba4282af" + integrity sha512-+2cQFceJdDTkeMeMiQ5Q/lwa58Dns2ZRW6aucDfDPz/w6gxpDkwVFrrK+1xiM+pNtbkus3TR8GydZ2MyhZQGHw== dependencies: "@mapbox/polyline" "^1.1.0" "@turf/along" "^6.0.1" @@ -1476,23 +1462,23 @@ prop-types "^15.7.2" qs "^6.9.1" -"@opentripplanner/endpoints-overlay@^1.0.2": - version "1.0.2" - resolved "https://registry.yarnpkg.com/@opentripplanner/endpoints-overlay/-/endpoints-overlay-1.0.2.tgz#165817533832399c8e8c276fba2ec4fafe038853" - integrity sha512-ccwvaRYmkzz4VKlM52jVXklSAwu+5UfLiTB8q6lTN/sP3gdPPCWJMUVu4u00R9xNFPVVk6NOB/y6A3NUJzBVlA== +"@opentripplanner/endpoints-overlay@^1.0.4": + version "1.0.4" + resolved "https://registry.yarnpkg.com/@opentripplanner/endpoints-overlay/-/endpoints-overlay-1.0.4.tgz#6a3acb6b202a6e58cfd30767ed9279261bde4660" + integrity sha512-72GVw1oqslmH2Rqva8An9E+fkacefwuBEupYUoQQT67hd8NMAKNVjVX+7+4N+5xnzmvAiF1esfyoJ6MXANpP4g== dependencies: - "@opentripplanner/core-utils" "^1.2.0" + "@opentripplanner/core-utils" "^3.0.0" "@opentripplanner/location-icon" "^1.0.1" prop-types "^15.7.2" styled-icons "^9.1.0" -"@opentripplanner/from-to-location-picker@^1.0.0", "@opentripplanner/from-to-location-picker@^1.0.1": - version "1.0.1" - resolved "https://registry.yarnpkg.com/@opentripplanner/from-to-location-picker/-/from-to-location-picker-1.0.1.tgz#c66c44931ddf501a64063344af2a236fea0f704a" - integrity sha512-2Zs3sEPHJa1k8vgMBUEJlvxA0dV2ws7kN+VCzvFB5GqW6P/YaBWo7Isi+NMkyAjFEpKNeAtUG2dA5Y7+u5uhTg== +"@opentripplanner/from-to-location-picker@^1.0.3": + version "1.0.3" + resolved "https://registry.yarnpkg.com/@opentripplanner/from-to-location-picker/-/from-to-location-picker-1.0.3.tgz#871ac07485e6a1bbda4d4371ce2b8684a4a3ff53" + integrity sha512-BiI1wpb74QPvZMalyW/sexdSj0V4ASP+5pBYO+c9nmSpsAcw0m393821QjSimKBEfhY5j7YsnWBmt2hrNyQQtA== dependencies: - "@opentripplanner/core-utils" "^1.2.0" - "@opentripplanner/location-icon" "^1.0.0" + "@opentripplanner/core-utils" "^3.0.0" + "@opentripplanner/location-icon" "^1.0.1" prop-types "^15.7.2" "@opentripplanner/geocoder@^1.0.2": @@ -1510,142 +1496,151 @@ resolved "https://registry.yarnpkg.com/@opentripplanner/humanize-distance/-/humanize-distance-0.0.22.tgz#6e2d1b4ae938e45be4eae3ddb41729e55222d741" integrity sha512-50FREAdjyAbsARPeii1TJHVPNoF0VqPuOZixYs+KYo/e5T9f6x+tX6ypEVIoh+cVxms5cWwM91HVg0XfA5AZ2Q== -"@opentripplanner/icons@^1.0.0", "@opentripplanner/icons@^1.0.1": - version "1.0.1" - resolved "https://registry.yarnpkg.com/@opentripplanner/icons/-/icons-1.0.1.tgz#ac24da52fc44b06e28e7eb47f469d29e59a6e657" - integrity sha512-I2slSKzwqKgxmn5SfA8r/0RYsp8TNzpMrh0YjS4a7lgbBl9Eb8aA+GCdkW76UpVQnH5v9I+g8J3Kf4cEqzGU/g== +"@opentripplanner/icons@^1.0.4": + version "1.0.4" + resolved "https://registry.yarnpkg.com/@opentripplanner/icons/-/icons-1.0.4.tgz#e8106c5c2a9115a86ac5a385cc9d778423fb0ad4" + integrity sha512-UP6plpdviYrLYxJ/N0jlQLMZviXbnYXhAFe/3YgOvG5g5tLmdzoBpDa0QNUeryXIYa5tEEiV/K9lpJ705paEKA== dependencies: - "@opentripplanner/core-utils" "^1.2.0" + "@opentripplanner/core-utils" "^3.0.0" prop-types "^15.7.2" -"@opentripplanner/itinerary-body@^1.2.0": - version "1.2.0" - resolved "https://registry.yarnpkg.com/@opentripplanner/itinerary-body/-/itinerary-body-1.2.0.tgz#96d8b832f26c6918ee2c0e122fce6a57a6e5df1a" - integrity sha512-LG8SRTTXdYD8M/7+peJPfuqRFbZlbxilqUBRyGw60efZcnWbAenQW/o5aznuucLHiafDUzVUQpy9SEd0gIqRSQ== +"@opentripplanner/itinerary-body@^2.0.0": + version "2.0.0" + resolved "https://registry.yarnpkg.com/@opentripplanner/itinerary-body/-/itinerary-body-2.0.0.tgz#42e990f3f0da10fe57a7314ca6d3611c050cb797" + integrity sha512-cXe9znEoGkMRbSjMtHk2QEApXfzJuswwftMTj99juqPwxC2dk2PyS6I4GB02P2VPVxo06s9vtd9DWowns5Y5SA== dependencies: - "@opentripplanner/core-utils" "^2.1.1" + "@opentripplanner/core-utils" "^3.0.0" "@opentripplanner/humanize-distance" "^0.0.22" - "@opentripplanner/icons" "^1.0.0" - "@opentripplanner/location-icon" "^1.0.0" + "@opentripplanner/icons" "^1.0.4" + "@opentripplanner/location-icon" "^1.0.1" currency-formatter "^1.5.5" moment "^2.24.0" prop-types "^15.7.2" react-resize-detector "^4.2.1" velocity-react "^1.4.3" -"@opentripplanner/location-field@^1.0.2": - version "1.0.2" - resolved "https://registry.yarnpkg.com/@opentripplanner/location-field/-/location-field-1.0.2.tgz#16daeac83be8f10b157fc8c51f32e2a8eb0a8db8" - integrity sha512-+YIXXltw6ZuHyvCzbDL97Wfhq+C/FaT2utmWAf1O1g6BGpkF6dHjh8+ZHoH0al/4/t6AyhSVlPMXOEyaj2xERA== +"@opentripplanner/location-field@^1.0.5": + version "1.0.5" + resolved "https://registry.yarnpkg.com/@opentripplanner/location-field/-/location-field-1.0.5.tgz#0683d434b02d61a1cefad4c3af8a1a9d83ab48fe" + integrity sha512-+hhT4v49gBDmzMJxioiJSFs5Xg88kECi4J/G2Yr5ihXWAEtE3TsvHOmIwjJNQ4ilV03oe/zrxYh+Wa/L4n03Aw== dependencies: - "@opentripplanner/core-utils" "^2.1.0" + "@opentripplanner/core-utils" "^3.0.0" "@opentripplanner/geocoder" "^1.0.2" "@opentripplanner/humanize-distance" "^0.0.22" - "@opentripplanner/location-icon" "^1.0.0" + "@opentripplanner/location-icon" "^1.0.1" prop-types "^15.7.2" styled-icons "^9.1.0" throttle-debounce "^2.1.0" -"@opentripplanner/location-icon@^1.0.0", "@opentripplanner/location-icon@^1.0.1": +"@opentripplanner/location-icon@^1.0.1": version "1.0.1" resolved "https://registry.yarnpkg.com/@opentripplanner/location-icon/-/location-icon-1.0.1.tgz#5a72f697eeebfb21202bfc205ca0da7c32dfe1d0" integrity sha512-esHrqZBKxJNNPiZyb4XtrWYZhdVrUHcpAr4eCydf8pSDRUX9QVM/YqAPPn2SEwJiH2hi14CYLMMV5SjEHwwJMg== dependencies: styled-icons "^9.1.0" -"@opentripplanner/park-and-ride-overlay@^1.0.1": - version "1.0.1" - resolved "https://registry.yarnpkg.com/@opentripplanner/park-and-ride-overlay/-/park-and-ride-overlay-1.0.1.tgz#83ce83c321dbd4d14ad847198ea53951a6e59b31" - integrity sha512-J41j0nyxErHkK8YBZCrpkh8uTlpQ/q4dT9Cr66ymIvSZf98ddMvpYkqPgAuWM7Q9HTeNwbSyOLy49r3Qcsmb6A== +"@opentripplanner/park-and-ride-overlay@^1.0.3": + version "1.0.3" + resolved "https://registry.yarnpkg.com/@opentripplanner/park-and-ride-overlay/-/park-and-ride-overlay-1.0.3.tgz#0d5365d0632f8f4c06e9250ec840654211303c9e" + integrity sha512-r4iWyL1ckfWudNfWADsSFjKAQq5s5bJ/4HwO3HV379UgV00paLGLRgtvp6HetqK2+w4Yd0Pr4pjZ0pkRJsU5rg== dependencies: - "@opentripplanner/core-utils" "^1.2.0" - "@opentripplanner/from-to-location-picker" "^1.0.0" + "@opentripplanner/core-utils" "^3.0.0" + "@opentripplanner/from-to-location-picker" "^1.0.3" prop-types "^15.7.2" -"@opentripplanner/printable-itinerary@^1.0.0": - version "1.0.0" - resolved "https://registry.yarnpkg.com/@opentripplanner/printable-itinerary/-/printable-itinerary-1.0.0.tgz#d6d90fd22d535cfabf72df79ae9779647a923444" - integrity sha512-V+hv7AgD+Ep3HIOW6sl++YaWnsX8yl2B5WNI5GBQmGE+HbEiUplFo0xHvKTEsTzM4N4yA5d5PCeQX9LM3swU2Q== +"@opentripplanner/printable-itinerary@^1.0.3": + version "1.0.3" + resolved "https://registry.yarnpkg.com/@opentripplanner/printable-itinerary/-/printable-itinerary-1.0.3.tgz#b26473dcf87711eb48bba0d9e52edba3ad65101f" + integrity sha512-6Z/7l+FXvBMzi4o/6J+hf2IfO9qRt6YPyqTT+8YUMrlT9lqqimaFnStCwZqBZC4xsefwYrazUW9auPcayJ9HRg== dependencies: - "@opentripplanner/core-utils" "^1.2.0" + "@opentripplanner/core-utils" "^3.0.0" "@opentripplanner/humanize-distance" "^0.0.22" prop-types "^15.7.2" -"@opentripplanner/route-viewer-overlay@^1.0.1": - version "1.0.1" - resolved "https://registry.yarnpkg.com/@opentripplanner/route-viewer-overlay/-/route-viewer-overlay-1.0.1.tgz#f60e61eb8a0fe05ff6d3a31bba04700d34ae0fad" - integrity sha512-1RLB4O6zYQ6B7YceMt8w7KWXsvBUJER0fP5S9pp8SNnLU028bTybJxghHeJQ5sW2yMaGtCkixK2TsDIrE2HbWg== +"@opentripplanner/route-viewer-overlay@^1.0.3": + version "1.0.3" + resolved "https://registry.yarnpkg.com/@opentripplanner/route-viewer-overlay/-/route-viewer-overlay-1.0.3.tgz#55fec109b9989a5d95cde463526ff12cb36b36d5" + integrity sha512-4SY0GieyqoTNBMKX9nefwDRsBO3ivVA1FTbRZGCHOmtoz90HQiN9pCrtlAb4sg54mfTEc7c/segItHZ3UrA6/A== dependencies: "@mapbox/polyline" "^1.1.0" - "@opentripplanner/core-utils" "^1.2.0" + "@opentripplanner/core-utils" "^3.0.0" prop-types "^15.7.2" -"@opentripplanner/stop-viewer-overlay@^1.0.1": - version "1.0.1" - resolved "https://registry.yarnpkg.com/@opentripplanner/stop-viewer-overlay/-/stop-viewer-overlay-1.0.1.tgz#d8d31d569fa022d88e8870613c2aa89356aed58c" - integrity sha512-QpV8AZbU98O0GqD/ZqoI/hk6okNJZaxF9JDZ/jhllhLXhdkk8Lfo6b1sfDtSf6Zk5e3BpUGV6MC9cHBInz5dng== +"@opentripplanner/stop-viewer-overlay@^1.0.3": + version "1.0.3" + resolved "https://registry.yarnpkg.com/@opentripplanner/stop-viewer-overlay/-/stop-viewer-overlay-1.0.3.tgz#b10e3cdfd20c49e0427c2e391ab802f987056f3d" + integrity sha512-Nvp1/ts/BbfAXaFrdXdS9JyPrGSSlD/o/yPfVRENysxN/7GtZ3nofTZJxYEZe02xr8GNs7/KRxN+ypGGrV6pQA== dependencies: - "@opentripplanner/core-utils" "^1.2.0" + "@opentripplanner/core-utils" "^3.0.0" prop-types "^15.7.2" -"@opentripplanner/stops-overlay@^1.0.1": - version "1.0.1" - resolved "https://registry.yarnpkg.com/@opentripplanner/stops-overlay/-/stops-overlay-1.0.1.tgz#d69118010750de7b054bae0e79b32360f35ef8ab" - integrity sha512-4BtxzakERLxEHlCn8yclV593B8bK02spySY+tW7hSv36MZRScwR3ZvmkJHbXzTt/GGDRjDn7N4qY82QvG65Xlg== +"@opentripplanner/stops-overlay@^3.0.1": + version "3.0.1" + resolved "https://registry.yarnpkg.com/@opentripplanner/stops-overlay/-/stops-overlay-3.0.1.tgz#caaf664bbdc9ba88cf899c7e0877c51604b68a59" + integrity sha512-ighL3xcGAlMbTTItSS/YFl1hVPjSFQ9INZey9g2aULB9Tw9V0esBhN/4r55puM660MO7e7sVC+yaDdXhWPNInA== dependencies: - "@opentripplanner/core-utils" "^1.2.0" - "@opentripplanner/from-to-location-picker" "^1.0.0" + "@opentripplanner/core-utils" "^3.0.0" + "@opentripplanner/from-to-location-picker" "^1.0.3" + "@opentripplanner/zoom-based-markers" "^1.0.1" -"@opentripplanner/transitive-overlay@^1.0.2": - version "1.0.2" - resolved "https://registry.yarnpkg.com/@opentripplanner/transitive-overlay/-/transitive-overlay-1.0.2.tgz#b2a0d8fb160abfc012a5badd0097f9b99268e088" - integrity sha512-JIZ9FRpXwKH9Rh1xEFLGWFrQe0V+x6Zyp7R8U2MFIdUqHx6l44xIlVRRMJC7Ta3zCrFfK1UHa8l2smmRGPnc5A== +"@opentripplanner/transitive-overlay@^1.0.4": + version "1.0.4" + resolved "https://registry.yarnpkg.com/@opentripplanner/transitive-overlay/-/transitive-overlay-1.0.4.tgz#490f4dfcd8a7267e3a24f41f153704b2ff4077c7" + integrity sha512-zfzpiGCh/7LQZGQIL/Z9mqpSv8ozr088oaZxUxAALbnkw5WDv3RFg6nH5vQy+WSYb7fw9uEj1SeAm5dDM+xJNw== dependencies: - "@opentripplanner/core-utils" "^1.2.0" + "@opentripplanner/core-utils" "^3.0.0" lodash.isequal "^4.5.0" transitive-js "^0.13.3" -"@opentripplanner/trip-details@^1.1.1": - version "1.1.1" - resolved "https://registry.yarnpkg.com/@opentripplanner/trip-details/-/trip-details-1.1.1.tgz#9c078a95e05f048ac9874fe192236506ce2a8c00" - integrity sha512-bQ1EdUImE5tFzu84NAVcJH59LsXvXJoJiCi3EvwYuRoU0kf4YyABKlxak6juehNFxQwPyvepGyVLf3jRDM9Rig== +"@opentripplanner/trip-details@^1.1.3": + version "1.1.3" + resolved "https://registry.yarnpkg.com/@opentripplanner/trip-details/-/trip-details-1.1.3.tgz#113b969eb389ed69e8f51519c364ca862252f0bb" + integrity sha512-XH4EDVDbdLCKRoorElFnzF8OQ5mKvppCh0ZO+i73dr5QdJUgKz24Eqlowkhb68wkx+k2HaI60fesR8Qi7qsuJA== dependencies: - "@opentripplanner/core-utils" "^1.2.0" + "@opentripplanner/core-utils" "^3.0.0" "@opentripplanner/humanize-distance" "^0.0.22" moment "^2.24.0" prop-types "^15.7.2" styled-icons "^9.1.0" velocity-react "^1.4.3" -"@opentripplanner/trip-form@^1.0.2": - version "1.0.2" - resolved "https://registry.yarnpkg.com/@opentripplanner/trip-form/-/trip-form-1.0.2.tgz#1283dcb92ed5295dbb055c0ab99cc5fe55b90b30" - integrity sha512-RPS3JBNUN5gMXVebDgMwdjMCiU8tb2s9+8sy1gGGFHDNiesNKEVdLXmUAqpg//gxNriLDQ0UtKfBZnHQpagPqw== +"@opentripplanner/trip-form@^1.0.4": + version "1.0.4" + resolved "https://registry.yarnpkg.com/@opentripplanner/trip-form/-/trip-form-1.0.4.tgz#dcc39e1f06567cd7e7e0183c2cbbb8ec3428ea61" + integrity sha512-SUu26PxuJk+BJbJB74R0F4m4DsVLkxn5/DRy+4SfVfbA8Fou893FyI5jxQZywOH8PDgmW9rOG2PMhwCdz/JzBg== dependencies: - "@opentripplanner/core-utils" "^1.2.0" - "@opentripplanner/icons" "^1.0.0" + "@opentripplanner/core-utils" "^3.0.0" + "@opentripplanner/icons" "^1.0.4" moment "^2.17.1" -"@opentripplanner/trip-viewer-overlay@^1.0.1": - version "1.0.1" - resolved "https://registry.yarnpkg.com/@opentripplanner/trip-viewer-overlay/-/trip-viewer-overlay-1.0.1.tgz#b6f5a89c6cdca27428556d84b630e45587f700fb" - integrity sha512-t/Et54CGKtL1tRxWRASMN/6KBOEkidVbRvW3qvuiSrH5RvZ/gXguiuslqlPnB7rsQaV6ONji/oQBtZH0wsReSQ== +"@opentripplanner/trip-viewer-overlay@^1.0.3": + version "1.0.3" + resolved "https://registry.yarnpkg.com/@opentripplanner/trip-viewer-overlay/-/trip-viewer-overlay-1.0.3.tgz#af3c1043273134f681d250b2d6f31d2189601658" + integrity sha512-TYXKPorgnzgFkdb8ZMaJNeNXWfdxxyVT1eRGvv4LrtpPF788tzx9IUqn8QYAUuDRZ7poAwERHMZcBf0AM942Sw== dependencies: "@mapbox/polyline" "^1.1.0" - "@opentripplanner/core-utils" "^1.2.0" + "@opentripplanner/core-utils" "^3.0.0" prop-types "^15.7.2" -"@opentripplanner/vehicle-rental-overlay@^1.0.1": - version "1.0.1" - resolved "https://registry.yarnpkg.com/@opentripplanner/vehicle-rental-overlay/-/vehicle-rental-overlay-1.0.1.tgz#c8d6c7f1926f4f24e4f8bbe4c600be1f86dbc385" - integrity sha512-FX4h48l4sCIQP1KflhtvhNoBp/TFl4Iia/HdfByJE3n27w8Sw4lSTZEYGNNj+b36NSIFsU/fbHPK8utrp5Wdgg== +"@opentripplanner/vehicle-rental-overlay@^1.0.5": + version "1.0.5" + resolved "https://registry.yarnpkg.com/@opentripplanner/vehicle-rental-overlay/-/vehicle-rental-overlay-1.0.5.tgz#d8cbc8995c0438847d7dec3570df4f4521b3372a" + integrity sha512-pX5WriQSmbQfGCrx+hjm6IIfFaWjjFbMCXES1aTXT2p7My3WOS2wU01liKTyCIUc05sGCWNSFm0ZC6g4b95n+g== dependencies: - "@opentripplanner/core-utils" "^1.2.0" - "@opentripplanner/from-to-location-picker" "^1.0.0" + "@opentripplanner/core-utils" "^3.0.0" + "@opentripplanner/from-to-location-picker" "^1.0.3" + "@opentripplanner/zoom-based-markers" "^1.0.1" lodash.memoize "^4.1.2" prop-types "^15.7.2" styled-icons "^9.1.0" +"@opentripplanner/zoom-based-markers@^1.0.1": + version "1.0.1" + resolved "https://registry.yarnpkg.com/@opentripplanner/zoom-based-markers/-/zoom-based-markers-1.0.1.tgz#fafebef05300c589dd2d1835a96bd3b7f411838f" + integrity sha512-SaJ1m7SM0HGSBMjEwudoJnOGzAeWNRi8V7fDeHLfjWoOM3ofHz1uxrHlZHyktoHtw8/wt019HABHxuE4uHdTKA== + dependencies: + "@opentripplanner/core-utils" "^3.0.0" + "@semantic-release/commit-analyzer@^6.1.0": version "6.2.0" resolved "https://registry.yarnpkg.com/@semantic-release/commit-analyzer/-/commit-analyzer-6.2.0.tgz#5cd25ce67ba9ba5b46e47457505e63629e186695" @@ -3717,9 +3712,9 @@ bowser@^1.9.3: integrity sha512-9IdMmj2KjigRq6oWhmwv1W36pDuA4STQZ8q6YO9um+x07xgYNCD3Oou+WP/3L1HNz7iqythGet3/p4wvc8AAwQ== bowser@^2.7.0: - version "2.10.0" - resolved "https://registry.yarnpkg.com/bowser/-/bowser-2.10.0.tgz#be3736f161c4bb8b10958027ab99465d2a811198" - integrity sha512-OCsqTQboTEWWsUjcp5jLSw2ZHsBiv2C105iFs61bOT0Hnwi9p7/uuXdd7mu8RYcarREfdjNN+8LitmEHATsLYg== + version "2.11.0" + resolved "https://registry.yarnpkg.com/bowser/-/bowser-2.11.0.tgz#5ca3c35757a7aa5771500c70a73a9f91ef420a8f" + integrity sha512-AlcaJBi/pqqJBIQ8U9Mcpc9i8Aqxn88Skv5d+xBX006BY5u8N3mGLHa5Lgppa7L/HfwgwLgZ6NYs+Ag6uUmJRA== boxen@^1.2.1: version "1.3.0" @@ -5398,9 +5393,9 @@ csstype@^2.5.7, csstype@^2.6.7: integrity sha512-D34BqZU4cIlMCY93rZHbrq9pjTAQJ3U8S8rfBqjwHxkGPThWFjzZDQpgMJY0QViLxth6ZKYiwFBo14RdN44U/w== currency-formatter@^1.4.2, currency-formatter@^1.5.5: - version "1.5.5" - resolved "https://registry.yarnpkg.com/currency-formatter/-/currency-formatter-1.5.5.tgz#907790bb0b7f129c4a64d2924e0d7fa36db0cf52" - integrity sha512-PEsZ9fK2AwPBYgzWTtqpSckam7hFDkT8ZKFAOrsooR0XbydZEKuFioUzcc3DoT2mCDkscjf1XdT6Qq53ababZQ== + version "1.5.6" + resolved "https://registry.yarnpkg.com/currency-formatter/-/currency-formatter-1.5.6.tgz#efe6eea7881c3ac7aaa6b24f307c71197a077987" + integrity sha512-c8VV6bvRg+kwIvz5UYgWb2wNY7LN3bXcZqXgXn4vcdlcFTLSoh53RSa1kvruusxwlr6scu2BtF/cGEjkyL0tbg== dependencies: accounting "^0.4.1" locale-currency "0.0.2" @@ -10685,9 +10680,9 @@ moment-timezone@^0.5.23, moment-timezone@^0.5.27: moment ">= 2.9.0" "moment@>= 2.9.0", moment@>=1.6.0, moment@^2.17.1, moment@^2.24.0: - version "2.27.0" - resolved "https://registry.yarnpkg.com/moment/-/moment-2.27.0.tgz#8bff4e3e26a236220dfe3e36de756b6ebaa0105d" - integrity sha512-al0MUK7cpIcglMv3YF13qSgdAIqxHTO7brRtaz3DlSULbqfazqkc5kEjNrLDOM7fsjshoFIihnU8snrP7zUvhQ== + version "2.29.1" + resolved "https://registry.yarnpkg.com/moment/-/moment-2.29.1.tgz#b2be769fa31940be9eeea6469c075e35006fa3d3" + integrity sha512-kHmoybcPV8Sqy59DwNDY3Jefr64lK/by/da0ViFcuA4DH0vQg5Q6Ze5VimxkfQNSC+Mls/Kx53s7TjP1RhFEDQ== moo@^0.4.3: version "0.4.3" @@ -15626,9 +15621,9 @@ throat@^4.0.0: integrity sha1-iQN8vJLFarGJJua6TLsgDhVnKmo= throttle-debounce@^2.1.0: - version "2.2.1" - resolved "https://registry.yarnpkg.com/throttle-debounce/-/throttle-debounce-2.2.1.tgz#fbd933ae6793448816f7d5b3cae259d464c98137" - integrity sha512-i9hAVld1f+woAiyNGqWelpDD5W1tpMroL3NofTz9xzwq6acWBlO2dC8k5EFSZepU6oOINtV5Q3aSPoRg7o4+fA== + version "2.3.0" + resolved "https://registry.yarnpkg.com/throttle-debounce/-/throttle-debounce-2.3.0.tgz#fd31865e66502071e411817e241465b3e9c372e2" + integrity sha512-H7oLPV0P7+jgvrk+6mwwwBDmxTaxnu9HMXmloNLXwnNO0ZxZ31Orah2n8lU1eMPvsaowP2CX+USCgyovXfdOFQ== through2-filter@^3.0.0: version "3.0.0" @@ -15904,9 +15899,9 @@ trough@^1.0.0: integrity sha512-tdzBRDGWcI1OpPVmChbdSKhvSVurznZ8X36AYURAcl+0o2ldlCY2XPzyXNNxwJwwyIU+rIglTCG4kxtNKBQH7Q== tslib@^1.10.0, tslib@^1.9.0, tslib@^1.9.3: - version "1.13.0" - resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.13.0.tgz#c881e13cc7015894ed914862d276436fa9a47043" - integrity sha512-i/6DQjL8Xf3be4K/E6Wgpekn5Qasl1usyw++dAA35Ue5orEn65VIxOA+YvNNl9HV3qv70T7CNwjODHZrLwvd1Q== + version "1.14.1" + resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00" + integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg== tty-browserify@0.0.0: version "0.0.0" From d0cfd7d9d0ee2ba5aaab33527a46208db72fd423 Mon Sep 17 00:00:00 2001 From: Evan Siroky Date: Thu, 5 Nov 2020 18:17:37 -0800 Subject: [PATCH 31/58] refactor: get stops-overlay working with zoom-based-markers --- lib/components/map/connected-stop-marker.js | 5 +++-- lib/components/map/connected-stops-overlay.js | 9 +++++++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/lib/components/map/connected-stop-marker.js b/lib/components/map/connected-stop-marker.js index 4ae8fbdd9..e46ebcaea 100644 --- a/lib/components/map/connected-stop-marker.js +++ b/lib/components/map/connected-stop-marker.js @@ -1,4 +1,4 @@ -import DefaultStopMarker from '@opentripplanner/stops-overlay/lib/stop-marker' +import DefaultStopMarker from '@opentripplanner/stops-overlay/lib/default-stop-marker' import { connect } from 'react-redux' import { setLocation } from '../../actions/map' @@ -8,7 +8,8 @@ import { setViewedStop } from '../../actions/ui' const mapStateToProps = (state, ownProps) => { return { - languageConfig: state.otp.config.language + languageConfig: state.otp.config.language, + stop: ownProps.entity } } diff --git a/lib/components/map/connected-stops-overlay.js b/lib/components/map/connected-stops-overlay.js index ff77d1a07..d52f845f1 100644 --- a/lib/components/map/connected-stops-overlay.js +++ b/lib/components/map/connected-stops-overlay.js @@ -8,8 +8,13 @@ import { findStopsWithinBBox } from '../../actions/api' const mapStateToProps = (state, ownProps) => { return { - StopMarker, - stops: state.otp.overlay.transit.stops + stops: state.otp.overlay.transit.stops, + symbols: [ + { + minZoom: 15, + symbol: StopMarker + } + ] } } From 198e5e506d423f9acdd1dec26cfe0582616664c0 Mon Sep 17 00:00:00 2001 From: Evan Siroky Date: Thu, 5 Nov 2020 18:26:24 -0800 Subject: [PATCH 32/58] fix: use core-utils v3 to sort routes by agency --- lib/components/viewers/route-viewer.js | 21 ++++----------------- lib/components/viewers/stop-viewer.js | 18 ++++++++++++++---- 2 files changed, 18 insertions(+), 21 deletions(-) diff --git a/lib/components/viewers/route-viewer.js b/lib/components/viewers/route-viewer.js index 11b0c1de3..33796bacf 100644 --- a/lib/components/viewers/route-viewer.js +++ b/lib/components/viewers/route-viewer.js @@ -10,15 +10,6 @@ import Icon from '../narrative/icon' import { setMainPanelContent, setViewedRoute } from '../../actions/ui' import { findRoutes, findRoute } from '../../actions/api' -function routeOperatorComparatorValue (transitOperators, route) { - const routeOperator = coreUtils.route.getTransitOperatorFromOtpRoute( - route, - transitOperators - ) - if (!routeOperator) return 0 - return routeOperator.order -} - /** * Determine the appropriate contrast color for text (white or black) based on * the input hex string (e.g., '#ff00ff') value. @@ -59,14 +50,10 @@ class RouteViewer extends Component { viewedRoute } = this.props const sortedRoutes = routes - ? Object.values(routes).sort(coreUtils.route.routeComparator) + ? Object.values(routes).sort( + coreUtils.route.makeRouteComparator(transitOperators) + ) : [] - const agencySortedRoutes = transitOperators.length > 0 - ? sortedRoutes.sort((a, b) => { - return routeOperatorComparatorValue(transitOperators, a) - - routeOperatorComparatorValue(transitOperators, b) - }) - : sortedRoutes return (
{/* Header Block */} @@ -92,7 +79,7 @@ class RouteViewer extends Component {
- {agencySortedRoutes + {sortedRoutes .map(route => { // Find operator based on agency_id (extracted from OTP route ID). const operator = coreUtils.route.getTransitOperatorFromOtpRoute( diff --git a/lib/components/viewers/stop-viewer.js b/lib/components/viewers/stop-viewer.js index 242c12533..302a7d094 100644 --- a/lib/components/viewers/stop-viewer.js +++ b/lib/components/viewers/stop-viewer.js @@ -250,12 +250,21 @@ class StopViewer extends Component { stopData, stopViewerArriving, stopViewerConfig, - timeFormat + timeFormat, + transitOperators } = this.props const { scheduleView, spin } = this.state const hasStopTimesAndRoutes = !!(stopData && stopData.stopTimes && stopData.stopTimes.length > 0 && stopData.routes) - // construct a lookup table mapping pattern (e.g. 'ROUTE_ID-HEADSIGN') to an array of stoptimes + // construct a lookup table mapping pattern (e.g. 'ROUTE_ID-HEADSIGN') to + // an array of stoptimes const stopTimesByPattern = getStopTimesByPattern(stopData) + const routeComparator = coreUtils.route.makeRouteComparator( + transitOperators + ) + const patternComparator = (patternA, patternB) => routeComparator( + patternA.route, + patternB.route + ) return (
{/* Header Block */} @@ -268,7 +277,7 @@ class StopViewer extends Component { ? <>
{Object.values(stopTimesByPattern) - .sort((a, b) => coreUtils.route.routeComparator(a.route, b.route)) + .sort(patternComparator) .map(patternTimes => { // Only add pattern row if route is found. // FIXME: there is currently a bug with the alernative transit index @@ -344,7 +353,8 @@ const mapStateToProps = (state, ownProps) => { stopData: state.otp.transitIndex.stops[state.otp.ui.viewedStop.stopId], stopViewerArriving: state.otp.config.language.stopViewerArriving, stopViewerConfig, - timeFormat: getTimeFormat(state.otp.config) + timeFormat: getTimeFormat(state.otp.config), + transitOperators: state.otp.config.transitOperators } } From 7152d277edd003953ccc3fb8d5921ebfd9f93b67 Mon Sep 17 00:00:00 2001 From: binh-dam-ibigroup <56846598+binh-dam-ibigroup@users.noreply.github.com> Date: Fri, 6 Nov 2020 08:45:33 -0500 Subject: [PATCH 33/58] refactor(VerifyEmailScreen): Rename handler. --- lib/components/user/verify-email-screen.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/components/user/verify-email-screen.js b/lib/components/user/verify-email-screen.js index efc5eaef0..ba153f4c8 100644 --- a/lib/components/user/verify-email-screen.js +++ b/lib/components/user/verify-email-screen.js @@ -22,7 +22,7 @@ class VerifyEmailScreen extends Component { resendVerificationEmail(auth0) } - _handleClick = () => window.location.reload() + _handleEmailVerified = () => window.location.reload() render () { return ( @@ -39,7 +39,7 @@ class VerifyEmailScreen extends Component { From a03055fa3bd6671fb8fb649e21121045161e4577 Mon Sep 17 00:00:00 2001 From: Evan Siroky Date: Fri, 6 Nov 2020 11:10:56 -0800 Subject: [PATCH 34/58] feat(route-viewer): add mode icon and use styled components --- lib/components/app/batch-routing-panel.js | 3 +- lib/components/app/call-taker-panel.js | 2 +- lib/components/app/default-main-panel.js | 2 +- lib/components/mobile/main.js | 2 +- lib/components/mobile/route-viewer.js | 4 +- lib/components/viewers/route-viewer.js | 117 ++++++++++++++------- lib/components/viewers/viewer-container.js | 5 +- lib/util/viewer.js | 23 ++++ 8 files changed, 115 insertions(+), 43 deletions(-) diff --git a/lib/components/app/batch-routing-panel.js b/lib/components/app/batch-routing-panel.js index 80c4c95b4..cf477869f 100644 --- a/lib/components/app/batch-routing-panel.js +++ b/lib/components/app/batch-routing-panel.js @@ -33,12 +33,13 @@ class BatchRoutingPanel extends Component { activeSearch, itineraryFooter, LegIcon, + ModeIcon, mobile, showUserSettings } = this.props const actionText = mobile ? 'tap' : 'click' return ( - + = 3 const addIntermediateDisabled = !from || !to || maxPlacesDefined return ( - + {/* FIXME: should this be a styled component */}
+
+ return } // check for viewed stop diff --git a/lib/components/mobile/route-viewer.js b/lib/components/mobile/route-viewer.js index 6293747b9..2c0f77715 100644 --- a/lib/components/mobile/route-viewer.js +++ b/lib/components/mobile/route-viewer.js @@ -12,6 +12,7 @@ import { setViewedRoute, setMainPanelContent } from '../../actions/ui' class MobileRouteViewer extends Component { static propTypes = { + ModeIcon: PropTypes.element.isRequired, setViewedRoute: PropTypes.func, setMainPanelContent: PropTypes.func } @@ -22,6 +23,7 @@ class MobileRouteViewer extends Component { } render () { + const { ModeIcon } = this.props return (
- +
) diff --git a/lib/components/viewers/route-viewer.js b/lib/components/viewers/route-viewer.js index 33796bacf..4f88e92bf 100644 --- a/lib/components/viewers/route-viewer.js +++ b/lib/components/viewers/route-viewer.js @@ -4,11 +4,13 @@ import PropTypes from 'prop-types' import { Label, Button } from 'react-bootstrap' import { VelocityTransitionGroup } from 'velocity-react' import { connect } from 'react-redux' +import styled from 'styled-components' import Icon from '../narrative/icon' import { setMainPanelContent, setViewedRoute } from '../../actions/ui' import { findRoutes, findRoute } from '../../actions/api' +import { getModeFromRoute } from '../../util/viewer' /** * Determine the appropriate contrast color for text (white or black) based on @@ -30,6 +32,7 @@ function getContrastYIQ (hexcolor) { class RouteViewer extends Component { static propTypes = { hideBackButton: PropTypes.bool, + ModeIcon: PropTypes.element.isRequired, routes: PropTypes.object } @@ -44,6 +47,7 @@ class RouteViewer extends Component { findRoute, hideBackButton, languageConfig, + ModeIcon, transitOperators, routes, setViewedRoute, @@ -91,6 +95,7 @@ class RouteViewer extends Component { findRoute={findRoute} isActive={viewedRoute && viewedRoute.routeId === route.id} key={route.id} + ModeIcon={ModeIcon} operator={operator} route={route} setViewedRoute={setViewedRoute} @@ -104,6 +109,49 @@ class RouteViewer extends Component { } } +const StyledRouteRow = styled.div` + background-color: ${props => props.isActive ? '#f6f8fa' : 'white'}; + border-bottom: 1px solid gray; +` + +const RouteRowButton = styled(Button)` + padding: 8px; + width: 100%; +` + +const RouteRowElement = styled.div` + display: inline-block; +` + +const OperatorImg = styled.img` + height: 25px; +` + +const ModeIconElement = styled(RouteRowElement)` + margin-left: 12px; + margin-right: 8px; + vertical-align: middle; +` + +const RouteNameElement = styled(RouteRowElement)` + margin-top: 2px; +` + +const StyledLabel = styled(Label)` + background-color: ${props => ( + props.backgroundColor === '#ffffff' + ? 'rgba(0,0,0,0)' + : props.backgroundColor + )}; + font-size: medium; + font-weight: 400; + color: ${props => props.color}; +` + +const RouteDetails = styled.div` + padding: 8px; +` + class RouteRow extends PureComponent { _onClick = () => { const { findRoute, isActive, route, setViewedRoute } = this.props @@ -117,17 +165,7 @@ class RouteRow extends PureComponent { } } - render () { - const {isActive, route, operator} = this.props - const {defaultRouteColor, defaultRouteTextColor, longNameSplitter} = operator || {} - const backgroundColor = `#${defaultRouteColor || route.color || 'ffffff'}` - // NOTE: text color is not a part of short response route object, so there - // is no way to determine from OTP what the text color should be if the - // background color is, say, black. Instead, determine the appropriate - // contrast color and use that if no text color is available. - const contrastColor = getContrastYIQ(backgroundColor) - const color = `#${defaultRouteTextColor || route.textColor || contrastColor}` - // Default long name is empty string (long name is an optional GTFS value). + getCleanRouteLongName ({ route, longNameSplitter }) { let longName = '' if (route.longName) { // Attempt to split route name if splitter is defined for operator (to @@ -140,48 +178,55 @@ class RouteRow extends PureComponent { // string. if (longName === route.shortName) longName = '' } + return longName + } + + render () { + const {isActive, ModeIcon, route, operator} = this.props + const {defaultRouteColor, defaultRouteTextColor, longNameSplitter} = operator || {} + const backgroundColor = `#${defaultRouteColor || route.color || 'ffffff'}` + // NOTE: text color is not a part of short response route object, so there + // is no way to determine from OTP what the text color should be if the + // background color is, say, black. Instead, determine the appropriate + // contrast color and use that if no text color is available. + const contrastColor = getContrastYIQ(backgroundColor) + const color = `#${defaultRouteTextColor || route.textColor || contrastColor}` + // Default long name is empty string (long name is an optional GTFS value). + const longName = this.getCleanRouteLongName({ route, longNameSplitter }) return ( -
- + + + {isActive && ( -
+ {route.url ? Route Details : 'No route URL provided.' } -
+ )}
-
+ ) } } diff --git a/lib/components/viewers/viewer-container.js b/lib/components/viewers/viewer-container.js index 0deb6b713..20fd071d2 100644 --- a/lib/components/viewers/viewer-container.js +++ b/lib/components/viewers/viewer-container.js @@ -9,15 +9,16 @@ import { MainPanelContent } from '../../actions/ui' class ViewerContainer extends Component { static propTypes = { + ModeIcon: PropTypes.element.isRequired, uiState: PropTypes.object } render () { - const { uiState } = this.props + const { ModeIcon, uiState } = this.props // check for main panel content if (uiState.mainPanelContent === MainPanelContent.ROUTE_VIEWER) { - return + return } // check for stop viewer diff --git a/lib/util/viewer.js b/lib/util/viewer.js index 359dffefe..c1f8d1aaf 100644 --- a/lib/util/viewer.js +++ b/lib/util/viewer.js @@ -162,3 +162,26 @@ export function getStopTimesByPattern (stopData) { } return stopTimesByPattern } + +/** + * Gets the mode string from either an OTP Route or RouteShort model. The OTP + * Route model returns the mode as an integer type whereas the RouteShort model + * returns the mode string. + */ +export function getModeFromRoute (route) { + const modeLookup = { + 0: 'TRAM', // - Tram, Streetcar, Light rail. + 1: 'SUBWAY', // - Subway, Metro. + 2: 'RAIL', // - Rail. Used for intercity or long-distance travel. + 3: 'BUS', // - Bus. + 4: 'FERRY', // - Ferry. + 5: 'CABLE_CAR', // - Cable tram. + 6: 'GONDOLA', // - Gondola, etc. + 7: 'FUNICULAR', // - Funicular. + // TODO: 11 and 12 are not a part of OTP as of 2019-02-14, but for now just + // associate them with bus/rail. + 11: 'BUS', // - Trolleybus. + 12: 'RAIL' // - Monorail. + } + return route.mode || modeLookup[route.type] +} From 150767af694b7dcf6f7035c4a6e5b07f200b717e Mon Sep 17 00:00:00 2001 From: Evan Siroky Date: Fri, 6 Nov 2020 11:18:49 -0800 Subject: [PATCH 35/58] test: fix snapshots --- .../components/viewers/__snapshots__/stop-viewer.js.snap | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/__tests__/components/viewers/__snapshots__/stop-viewer.js.snap b/__tests__/components/viewers/__snapshots__/stop-viewer.js.snap index a3c820713..b5b4b6791 100644 --- a/__tests__/components/viewers/__snapshots__/stop-viewer.js.snap +++ b/__tests__/components/viewers/__snapshots__/stop-viewer.js.snap @@ -197,6 +197,7 @@ exports[`components > viewers > stop viewer should render countdown times after } timeFormat="HH:mm" toggleAutoRefresh={[Function]} + transitOperators={Array []} viewedStop={ Object { "stopId": "TriMet:9860", @@ -932,6 +933,7 @@ exports[`components > viewers > stop viewer should render countdown times for st } timeFormat="HH:mm" toggleAutoRefresh={[Function]} + transitOperators={Array []} viewedStop={ Object { "stopId": "TriMet:9860", @@ -1676,6 +1678,7 @@ exports[`components > viewers > stop viewer should render times after midnight w } timeFormat="HH:mm" toggleAutoRefresh={[Function]} + transitOperators={Array []} viewedStop={ Object { "stopId": "TriMet:9860", @@ -2777,6 +2780,7 @@ exports[`components > viewers > stop viewer should render with OTP transit index } timeFormat="HH:mm" toggleAutoRefresh={[Function]} + transitOperators={Array []} viewedStop={ Object { "stopId": "TriMet:715", @@ -4615,6 +4619,7 @@ exports[`components > viewers > stop viewer should render with TriMet transit in } timeFormat="HH:mm" toggleAutoRefresh={[Function]} + transitOperators={Array []} viewedStop={ Object { "stopId": "TriMet:715", @@ -5293,6 +5298,7 @@ exports[`components > viewers > stop viewer should render with initial stop id a } timeFormat="HH:mm" toggleAutoRefresh={[Function]} + transitOperators={Array []} viewedStop={ Object { "stopId": "TriMet:13170", From 9381350db12d60d05fa80192aac6a88412df7642 Mon Sep 17 00:00:00 2001 From: binh-dam-ibigroup <56846598+binh-dam-ibigroup@users.noreply.github.com> Date: Mon, 9 Nov 2020 17:59:46 -0500 Subject: [PATCH 36/58] refactor(VerifyEmailScreen): Tweak formatting per PR comment. --- lib/components/user/verify-email-screen.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/components/user/verify-email-screen.js b/lib/components/user/verify-email-screen.js index ba153f4c8..d0e056725 100644 --- a/lib/components/user/verify-email-screen.js +++ b/lib/components/user/verify-email-screen.js @@ -28,10 +28,10 @@ class VerifyEmailScreen extends Component { return (

Verify your email address

- +

Please check your email inbox and follow the link in the message to verify your email address before finishing your account setup. - +

Once you're verified, click the button below to continue.

From 846892ab816dc32ccd6688b06042f030225c453a Mon Sep 17 00:00:00 2001 From: binh-dam-ibigroup <56846598+binh-dam-ibigroup@users.noreply.github.com> Date: Tue, 10 Nov 2020 17:33:47 -0500 Subject: [PATCH 37/58] refactor(TripBasicsPane,actions/user): Address PR comments. --- lib/actions/user.js | 7 +++---- lib/components/user/trip-basics-pane.js | 26 ++++++++----------------- lib/reducers/create-user-reducer.js | 4 ++-- 3 files changed, 13 insertions(+), 24 deletions(-) diff --git a/lib/actions/user.js b/lib/actions/user.js index f991acbd1..83d54036c 100644 --- a/lib/actions/user.js +++ b/lib/actions/user.js @@ -5,7 +5,6 @@ import { secureFetch } from '../util/middleware' import { isNewUser } from '../util/user' // Middleware API paths. -const API_MONITORED_TRIP_CHECK_SUBPATH = '/checkitinerary' const API_MONITORED_TRIP_PATH = '/api/secure/monitoredtrip' const API_OTPUSER_PATH = '/api/secure/user' const API_OTPUSER_VERIFY_SMS_SUBPATH = '/verify_sms' @@ -14,8 +13,8 @@ const setCurrentUser = createAction('SET_CURRENT_USER') const setCurrentUserMonitoredTrips = createAction('SET_CURRENT_USER_MONITORED_TRIPS') const setLastPhoneSmsRequest = createAction('SET_LAST_PHONE_SMS_REQUEST') export const setPathBeforeSignIn = createAction('SET_PATH_BEFORE_SIGNIN') -export const clearItineraryExistence = createAction('CLEAR_ITINERARY_AVAILABILITY') -const setitineraryExistence = createAction('SET_ITINERARY_AVAILABILITY') +export const clearItineraryExistence = createAction('CLEAR_ITINERARY_EXISTENCE') +const setitineraryExistence = createAction('SET_ITINERARY_EXISTENCE') function createNewUser (auth0User) { return { @@ -303,7 +302,7 @@ export function verifyPhoneNumber (code) { export function checkItineraryExistence (trip) { return async function (dispatch, getState) { const { accessToken, apiBaseUrl, apiKey } = getMiddlewareVariables(getState()) - const requestUrl = `${apiBaseUrl}${API_MONITORED_TRIP_PATH}${API_MONITORED_TRIP_CHECK_SUBPATH}` + const requestUrl = `${apiBaseUrl}${API_MONITORED_TRIP_PATH}/checkitinerary` // Empty state before performing the checks. dispatch(clearItineraryExistence()) diff --git a/lib/components/user/trip-basics-pane.js b/lib/components/user/trip-basics-pane.js index bf8a414a3..928f7b697 100644 --- a/lib/components/user/trip-basics-pane.js +++ b/lib/components/user/trip-basics-pane.js @@ -12,7 +12,6 @@ import { connect } from 'react-redux' import styled from 'styled-components' import * as userActions from '../../actions/user' -import { ALL_DAYS } from '../../util/monitored-trip' import TripSummary from './trip-summary' // Styles. @@ -46,13 +45,6 @@ const allDays = [ { name: 'sunday', text: 'Sun.', fullText: 'Sundays' } ] -/** - * @returns true if there is a trip matching for the specified availability/existence check. - */ -function itineraryExists (dayCheck) { - return dayCheck && dayCheck.valid -} - /** * This component shows summary information for a trip * and lets the user edit the trip name and day. @@ -71,9 +63,9 @@ class TripBasicsPane extends Component { // For new trips only, // update the Formik state to uncheck days for which the itinerary is not available. if (isCreating && itineraryExistence) { - ALL_DAYS.forEach(day => { - if (!itineraryExists(itineraryExistence[day])) { - setFieldValue(day, false) + allDays.forEach(({ name }) => { + if (!itineraryExistence[name].valid) { + setFieldValue(name, false) } }) } @@ -100,10 +92,10 @@ class TripBasicsPane extends Component { // Show a combined error indicaton when no day is selected. let monitoredDaysValidationState = null - ALL_DAYS.forEach(day => { - if (touched[day]) { + allDays.forEach(({ name }) => { + if (touched[name]) { if (!monitoredDaysValidationState) { - monitoredDaysValidationState = errors[day] ? 'error' : null + monitoredDaysValidationState = errors[name] ? 'error' : null } } }) @@ -125,7 +117,7 @@ class TripBasicsPane extends Component { What days do you take this trip?
{allDays.map(({ name, fullText, text }, index) => { - const isDayDisabled = itineraryExistence && !itineraryExists(itineraryExistence[name]) + const isDayDisabled = itineraryExistence && !itineraryExistence[name].valid const boxClass = isDayDisabled ? 'alert-danger' : (monitoredTrip[name] ? 'bg-primary' : '') const notAvailableText = isDayDisabled ? `Trip not available on ${fullText}` : null @@ -162,10 +154,8 @@ class TripBasicsPane extends Component { // Connect to redux store const mapStateToProps = (state, ownProps) => { - const { accessToken, itineraryExistence } = state.user + const { itineraryExistence } = state.user return { - accessToken, - config: state.otp.config, itineraryExistence } } diff --git a/lib/reducers/create-user-reducer.js b/lib/reducers/create-user-reducer.js index 46cebe500..8e7123658 100644 --- a/lib/reducers/create-user-reducer.js +++ b/lib/reducers/create-user-reducer.js @@ -42,13 +42,13 @@ function createUserReducer () { }) } - case 'SET_ITINERARY_AVAILABILITY': { + case 'SET_ITINERARY_EXISTENCE': { return update(state, { itineraryExistence: { $set: action.payload } }) } - case 'CLEAR_ITINERARY_AVAILABILITY': { + case 'CLEAR_ITINERARY_EXISTENCE': { return update(state, { itineraryExistence: { $set: null } }) From 80b8a912a73dce09a55078b0a243478e14dc783c Mon Sep 17 00:00:00 2001 From: binh-dam-ibigroup <56846598+binh-dam-ibigroup@users.noreply.github.com> Date: Tue, 10 Nov 2020 17:48:13 -0500 Subject: [PATCH 38/58] refactor(SaveTripButton): Address PR comments. Reinstate trip button in LineItinerary. --- lib/components/narrative/line-itin/line-itinerary.js | 8 +++++++- lib/components/narrative/save-trip-button.js | 9 ++------- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/lib/components/narrative/line-itin/line-itinerary.js b/lib/components/narrative/line-itin/line-itinerary.js index 24c4f038b..2b56d39da 100644 --- a/lib/components/narrative/line-itin/line-itinerary.js +++ b/lib/components/narrative/line-itin/line-itinerary.js @@ -6,6 +6,7 @@ import ItineraryBody from './connected-itinerary-body' import ItinerarySummary from './itin-summary' import NarrativeItinerary from '../narrative-itinerary' import SimpleRealtimeAnnotation from '../simple-realtime-annotation' +import LinkButton from '../../user/link-button' const { getLegModeLabel, getTimeZoneOffset, isTransit } = coreUtils.itinerary @@ -53,7 +54,8 @@ export default class LineItinerary extends NarrativeItinerary { onClick, setActiveLeg, showRealtimeAnnotation, - timeFormat + timeFormat, + user } = this.props if (!itinerary) { @@ -75,6 +77,10 @@ export default class LineItinerary extends NarrativeItinerary { timeOptions={timeOptions} /> + {user && + Save this option + } + {showRealtimeAnnotation && } {active || expanded ? { - const activeSearch = getActiveSearch(state.otp) const { persistence } = state.otp.config - const itineraries = getActiveItineraries(state.otp) return { - itinerary: activeSearch && itineraries && itineraries[activeSearch.activeItinerary], + itinerary: getActiveItinerary(state.otp), loggedInUser: state.user.loggedInUser, persistence } From dec353af2400b589ee2998747ea450d76d468e4d Mon Sep 17 00:00:00 2001 From: binh-dam-ibigroup <56846598+binh-dam-ibigroup@users.noreply.github.com> Date: Wed, 11 Nov 2020 09:34:17 -0500 Subject: [PATCH 39/58] refactor(LineItinerary): Use SaveTripButton (add pull-right style to SaveTripButton) --- lib/components/narrative/line-itin/line-itinerary.js | 9 +++------ lib/components/narrative/save-trip-button.js | 8 +++++--- lib/components/user/link-button.js | 9 ++++++--- 3 files changed, 14 insertions(+), 12 deletions(-) diff --git a/lib/components/narrative/line-itin/line-itinerary.js b/lib/components/narrative/line-itin/line-itinerary.js index 2b56d39da..fa96eddf8 100644 --- a/lib/components/narrative/line-itin/line-itinerary.js +++ b/lib/components/narrative/line-itin/line-itinerary.js @@ -5,8 +5,8 @@ import styled from 'styled-components' import ItineraryBody from './connected-itinerary-body' import ItinerarySummary from './itin-summary' import NarrativeItinerary from '../narrative-itinerary' +import SaveTripButton from '../save-trip-button' import SimpleRealtimeAnnotation from '../simple-realtime-annotation' -import LinkButton from '../../user/link-button' const { getLegModeLabel, getTimeZoneOffset, isTransit } = coreUtils.itinerary @@ -54,8 +54,7 @@ export default class LineItinerary extends NarrativeItinerary { onClick, setActiveLeg, showRealtimeAnnotation, - timeFormat, - user + timeFormat } = this.props if (!itinerary) { @@ -77,9 +76,7 @@ export default class LineItinerary extends NarrativeItinerary { timeOptions={timeOptions} /> - {user && - Save this option - } + {showRealtimeAnnotation && } {active || expanded diff --git a/lib/components/narrative/save-trip-button.js b/lib/components/narrative/save-trip-button.js index 64cefa700..3643e6041 100644 --- a/lib/components/narrative/save-trip-button.js +++ b/lib/components/narrative/save-trip-button.js @@ -43,13 +43,14 @@ const SaveTripButton = ({ } if (buttonDisabled) { - const tooltip = {tooltipText} + const tooltip = {tooltipText} return ( // Apply disabled bootstrap button styles to a non-input element // to keep Tooltip and OverlayTrigger functional. + // Also apply pull-right style class so that the element is flush right, even with LineItineraries. - + {buttonText} @@ -58,7 +59,8 @@ const SaveTripButton = ({ return ( {buttonText} diff --git a/lib/components/user/link-button.js b/lib/components/user/link-button.js index 74c408d52..2bdc20b82 100644 --- a/lib/components/user/link-button.js +++ b/lib/components/user/link-button.js @@ -23,9 +23,12 @@ class LinkButton extends Component { } render () { - // Default componentClass to react-bootstrap Button (can be overridden - // with, e.g., 'button') - const { children, componentClass: Component = Button, ...passedProps } = this.props + const { + children, + componentClass: Component = Button, + routeTo, // exclude routeTo from passedProps. + ...passedProps + } = this.props return ( Date: Wed, 11 Nov 2020 09:45:21 -0500 Subject: [PATCH 40/58] refactor(itineraries): Remove unused user prop. --- lib/components/narrative/itinerary-carousel.js | 6 ++---- lib/components/narrative/tabbed-itineraries.js | 3 +-- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/lib/components/narrative/itinerary-carousel.js b/lib/components/narrative/itinerary-carousel.js index d49d26498..df1f227e4 100644 --- a/lib/components/narrative/itinerary-carousel.js +++ b/lib/components/narrative/itinerary-carousel.js @@ -50,7 +50,7 @@ class ItineraryCarousel extends Component { } render () { - const { activeItinerary, itineraries, itineraryClass, hideHeader, pending, user } = this.props + const { activeItinerary, itineraries, itineraryClass, hideHeader, pending } = this.props if (pending) return if (!itineraries) return null @@ -61,7 +61,6 @@ class ItineraryCarousel extends Component { key: index, expanded: this.props.expanded, onClick: this._onItineraryClick, - user, ...this.props }) }) @@ -111,8 +110,7 @@ const mapStateToProps = (state, ownProps) => { activeLeg: activeSearch && activeSearch.activeLeg, activeStep: activeSearch && activeSearch.activeStep, companies: state.otp.currentQuery.companies, - timeFormat: coreUtils.time.getTimeFormat(state.otp.config), - user: state.user.loggedInUser + timeFormat: coreUtils.time.getTimeFormat(state.otp.config) } } diff --git a/lib/components/narrative/tabbed-itineraries.js b/lib/components/narrative/tabbed-itineraries.js index 991c454f7..df72694bf 100644 --- a/lib/components/narrative/tabbed-itineraries.js +++ b/lib/components/narrative/tabbed-itineraries.js @@ -113,8 +113,7 @@ const mapStateToProps = (state, ownProps) => { useRealtime, companies: state.otp.currentQuery.companies, tnc: state.otp.tnc, - timeFormat: getTimeFormat(state.otp.config), - user: state.user.loggedInUser + timeFormat: getTimeFormat(state.otp.config) } } From 8d6504edef389c2d4c5afc6b46a2745b46aac832 Mon Sep 17 00:00:00 2001 From: Evan Siroky Date: Wed, 11 Nov 2020 09:15:00 -0800 Subject: [PATCH 41/58] build: update to @opentripplanner/core-utils v3.0.1 --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 3ade86523..49cd86fa0 100644 --- a/package.json +++ b/package.json @@ -29,7 +29,7 @@ "dependencies": { "@auth0/auth0-react": "^1.1.0", "@opentripplanner/base-map": "^1.0.4", - "@opentripplanner/core-utils": "^3.0.0", + "@opentripplanner/core-utils": "^3.0.1", "@opentripplanner/endpoints-overlay": "^1.0.4", "@opentripplanner/from-to-location-picker": "^1.0.3", "@opentripplanner/geocoder": "^1.0.2", diff --git a/yarn.lock b/yarn.lock index 1edcf2904..f78357fbf 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1448,10 +1448,10 @@ "@opentripplanner/core-utils" "^3.0.0" prop-types "^15.7.2" -"@opentripplanner/core-utils@^3.0.0": - version "3.0.0" - resolved "https://registry.yarnpkg.com/@opentripplanner/core-utils/-/core-utils-3.0.0.tgz#7d2af3ef235d26f83a3aaf469e0cc76fba4282af" - integrity sha512-+2cQFceJdDTkeMeMiQ5Q/lwa58Dns2ZRW6aucDfDPz/w6gxpDkwVFrrK+1xiM+pNtbkus3TR8GydZ2MyhZQGHw== +"@opentripplanner/core-utils@^3.0.0", "@opentripplanner/core-utils@^3.0.1": + version "3.0.1" + resolved "https://registry.yarnpkg.com/@opentripplanner/core-utils/-/core-utils-3.0.1.tgz#6efa8dabceeae4527343edba2e6a9b06ce1fcb1c" + integrity sha512-R6VIJfNL0PnddpV+0uJfCGjy3M4HwtujeKSWDl70YoKJa+7G9AVjtk7rKHagwOefpWaUBI86T03EbklyllZgRQ== dependencies: "@mapbox/polyline" "^1.1.0" "@turf/along" "^6.0.1" From 6cacf9132bad719af6842ed15f6e677765b90596 Mon Sep 17 00:00:00 2001 From: Evan Siroky Date: Wed, 11 Nov 2020 09:17:00 -0800 Subject: [PATCH 42/58] refactor: have better spacing between mode icons --- lib/components/viewers/route-viewer.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/lib/components/viewers/route-viewer.js b/lib/components/viewers/route-viewer.js index 4f88e92bf..6b96ce8d6 100644 --- a/lib/components/viewers/route-viewer.js +++ b/lib/components/viewers/route-viewer.js @@ -125,11 +125,10 @@ const RouteRowElement = styled.div` const OperatorImg = styled.img` height: 25px; + margin-right: 8px; ` const ModeIconElement = styled(RouteRowElement)` - margin-left: 12px; - margin-right: 8px; vertical-align: middle; ` @@ -143,9 +142,14 @@ const StyledLabel = styled(Label)` ? 'rgba(0,0,0,0)' : props.backgroundColor )}; + color: ${props => props.color}; + margin-left: ${props => ( + props.backgroundColor === '#ffffff' || props.backgroundColor === 'white' + ? 0 + : '8px' + )}; font-size: medium; font-weight: 400; - color: ${props => props.color}; ` const RouteDetails = styled.div` From b9b0ba35ab20c854ca8c40b9229c79ab2b85f092 Mon Sep 17 00:00:00 2001 From: binh-dam-ibigroup <56846598+binh-dam-ibigroup@users.noreply.github.com> Date: Wed, 11 Nov 2020 13:33:19 -0500 Subject: [PATCH 43/58] refactor(actions/user): Add separate action to fetch auth0 token. --- lib/actions/user.js | 98 +++++++++---------- .../user/with-logged-in-user-support.js | 25 ++++- 2 files changed, 70 insertions(+), 53 deletions(-) diff --git a/lib/actions/user.js b/lib/actions/user.js index 10a4ef981..2b33449fd 100644 --- a/lib/actions/user.js +++ b/lib/actions/user.js @@ -49,65 +49,63 @@ function getMiddlewareVariables (state) { } } +/** + * Attempts to fetch the auth0 access token and store it in the redux state, under state.user. + * @param auth0 The auth0 context used to obtain the access token for subsequent middleware fetches. + */ +export function fetchAuth0Token (auth0) { + return async function (dispatch, getState) { + try { + const accessToken = await auth0.getAccessTokenSilently() + + dispatch(setCurrentUser({ accessToken })) + } catch (error) { + // TODO: improve UI if there is an errror. + alert('Error obtaining an authorization token.') + } + } +} + /** * Attempts to fetch user preferences (or set initial values if the user is being created) * into the redux state, under state.user. - * @param auth0 If provided, the auth0 login object used to initially obtain the auth0 access token - * for subsequent middleware fetches (and also to initialize new users from auth0 email and id). - * If absent, state.user.accessToken will be used for fetches. + * @param auth0 If provided, the auth0 login object used to initialize the default user object (with email and auth0 id). */ export function fetchOrInitializeUser (auth0) { return async function (dispatch, getState) { const { accessToken, apiBaseUrl, apiKey } = getMiddlewareVariables(getState()) const requestUrl = `${apiBaseUrl}${API_OTPUSER_PATH}/fromtoken` - // Get the Auth0 access token. If one is in state.user, use it, - // otherwise if auth0 is provided, fetch it. - let token - if (accessToken) { - token = accessToken - } else if (auth0) { - try { - token = await auth0.getAccessTokenSilently() - } catch (error) { - // TODO: improve UI if there is an errror. - alert('Error obtaining an authorization token.') - } - } - - // Once accessToken is available, proceed to fetch or initialize loggedInUser. - if (token) { - const { data: user, status } = await secureFetch(requestUrl, token, apiKey) - - // Beware! On AWS API gateway, if a user is not found in the middleware - // (e.g. they just created their Auth0 password but have not completed the account setup form yet), - // the call above will return, for example: - // { - // status: 'success', - // data: { - // "result": "ERR", - // "message": "No user with id=000000 found.", - // "code": 404, - // "detail": null - // } - // } - // - // The same call to a middleware instance that is not behind an API gateway - // will return: - // { - // status: 'error', - // message: 'Error get-ing user...' - // } - // TODO: Improve AWS response. - - const isNewAccount = status === 'error' || (user && user.result === 'ERR') - const userData = isNewAccount ? createNewUser(auth0.user) : user - dispatch(setCurrentUser({ accessToken: token, user: userData })) - - // Also load monitored trips for existing users. - if (!isNewAccount) { - dispatch(fetchUserMonitoredTrips()) - } + const { data: user, status } = await secureFetch(requestUrl, accessToken, apiKey) + + // Beware! On AWS API gateway, if a user is not found in the middleware + // (e.g. they just created their Auth0 password but have not completed the account setup form yet), + // the call above will return, for example: + // { + // status: 'success', + // data: { + // "result": "ERR", + // "message": "No user with id=000000 found.", + // "code": 404, + // "detail": null + // } + // } + // + // The same call to a middleware instance that is not behind an API gateway + // will return: + // { + // status: 'error', + // message: 'Error get-ing user...' + // } + // TODO: Improve AWS response. + + const isNewAccount = status === 'error' || (user && user.result === 'ERR') + const userData = isNewAccount ? createNewUser(auth0.user) : user + dispatch(setCurrentUser({ accessToken, user: userData })) + + // Also load monitored trips for existing users. + if (!isNewAccount) { + dispatch(fetchUserMonitoredTrips()) } } } diff --git a/lib/components/user/with-logged-in-user-support.js b/lib/components/user/with-logged-in-user-support.js index 951c3f743..17b1c5bcf 100644 --- a/lib/components/user/with-logged-in-user-support.js +++ b/lib/components/user/with-logged-in-user-support.js @@ -49,10 +49,26 @@ class UserLoaderScreen extends Component { return auth0 && auth0.isAuthenticated && !loggedInUser } + /** + * Determines whether an auth0 token should be fetched. + * @returns true if the logged-in user has passed Auth0 authentication + * and state.user.accessToken has not been set; false otherwise. + */ + acccessTokenIsUnfetched = () => { + const { accessToken, auth0 } = this.props + return auth0 && auth0.isAuthenticated && !accessToken + } + componentDidUpdate () { - const { auth0, fetchOrInitializeUser } = this.props + const { + auth0, + fetchAuth0Token, + fetchOrInitializeUser + } = this.props - if (this.loggedInUserIsUnfetched()) { + if (this.acccessTokenIsUnfetched()) { + fetchAuth0Token(auth0) + } else if (this.loggedInUserIsUnfetched()) { fetchOrInitializeUser(auth0) } } @@ -77,12 +93,15 @@ class UserLoaderScreen extends Component { // connect to the redux store const mapStateToProps = (state, ownProps) => { + const { accessToken, loggedInUser } = state.user return { - loggedInUser: state.user.loggedInUser + accessToken, + loggedInUser } } const mapDispatchToProps = { + fetchAuth0Token: userActions.fetchAuth0Token, fetchOrInitializeUser: userActions.fetchOrInitializeUser } From 77a1a2c0f422a76331c75fbaea09579946a51692 Mon Sep 17 00:00:00 2001 From: binh-dam-ibigroup <56846598+binh-dam-ibigroup@users.noreply.github.com> Date: Fri, 13 Nov 2020 18:53:48 -0500 Subject: [PATCH 44/58] refactor(actions/user): Address PR comments Remove auth0 as arg for resendVerificationEmail; change arg of fetchOrInitializeUser to auth0User; cleanup. --- lib/actions/user.js | 11 +++++------ lib/components/user/user-account-screen.js | 8 ++------ lib/components/user/verify-email-screen.js | 8 ++------ lib/components/user/with-logged-in-user-support.js | 2 +- 4 files changed, 10 insertions(+), 19 deletions(-) diff --git a/lib/actions/user.js b/lib/actions/user.js index 2b33449fd..af53e96d0 100644 --- a/lib/actions/user.js +++ b/lib/actions/user.js @@ -69,9 +69,9 @@ export function fetchAuth0Token (auth0) { /** * Attempts to fetch user preferences (or set initial values if the user is being created) * into the redux state, under state.user. - * @param auth0 If provided, the auth0 login object used to initialize the default user object (with email and auth0 id). + * @param auth0User If provided, the auth0.user object used to initialize the default user object (with email and auth0 id). */ -export function fetchOrInitializeUser (auth0) { +export function fetchOrInitializeUser (auth0User) { return async function (dispatch, getState) { const { accessToken, apiBaseUrl, apiKey } = getMiddlewareVariables(getState()) const requestUrl = `${apiBaseUrl}${API_OTPUSER_PATH}/fromtoken` @@ -100,7 +100,7 @@ export function fetchOrInitializeUser (auth0) { // TODO: Improve AWS response. const isNewAccount = status === 'error' || (user && user.result === 'ERR') - const userData = isNewAccount ? createNewUser(auth0.user) : user + const userData = isNewAccount ? createNewUser(auth0User) : user dispatch(setCurrentUser({ accessToken, user: userData })) // Also load monitored trips for existing users. @@ -153,10 +153,9 @@ export function createOrUpdateUser (userData, silentOnSuccess = false) { /** * Requests the verification email for the new user to be resent. */ -export function resendVerificationEmail (auth0) { +export function resendVerificationEmail () { return async function (dispatch, getState) { - const { apiBaseUrl, apiKey } = getMiddlewareVariables(getState()) - const accessToken = await auth0.getAccessTokenSilently() + const { accessToken, apiBaseUrl, apiKey } = getMiddlewareVariables(getState()) // TODO: add any throttling. const requestUrl = `${apiBaseUrl}${API_OTPUSER_PATH}/verification-email` diff --git a/lib/components/user/user-account-screen.js b/lib/components/user/user-account-screen.js index 81721259e..0143e8508 100644 --- a/lib/components/user/user-account-screen.js +++ b/lib/components/user/user-account-screen.js @@ -74,11 +74,7 @@ class UserAccountScreen extends Component { // Capture whether user is a new user at this stage, and retain that value as long as this screen is active. // Reminder: When a new user progresses through the account steps, // isNewUser(loggedInUser) will change to false as the database gets updated. - isNewUser: isNewUser(props.loggedInUser), - - // Last number and last time we requested a code for (to avoid repeat SMS and not waste SMS quota). - lastPhoneNumberRequested: null, - lastPhoneRequestTime: null + isNewUser: isNewUser(props.loggedInUser) } } @@ -166,7 +162,7 @@ class UserAccountScreen extends Component { if (this.state.isNewUser) { if (!auth0.user.email_verified) { // Check and prompt for email verification first to avoid extra user wait. - formContents = + formContents = } else { // New users are shown "wizard" (step-by-step) mode // (includes when a "new" user clicks "My Account" from the account menu in the nav bar). diff --git a/lib/components/user/verify-email-screen.js b/lib/components/user/verify-email-screen.js index d0e056725..3664f5cdc 100644 --- a/lib/components/user/verify-email-screen.js +++ b/lib/components/user/verify-email-screen.js @@ -17,14 +17,10 @@ const DivSpacer = styled.div` * is to simply reload the page.) */ class VerifyEmailScreen extends Component { - _handleResendVerificationEmail = () => { - const { auth0, resendVerificationEmail } = this.props - resendVerificationEmail(auth0) - } - _handleEmailVerified = () => window.location.reload() render () { + const { resendVerificationEmail } = this.props return (

Verify your email address

@@ -48,7 +44,7 @@ class VerifyEmailScreen extends Component {
diff --git a/lib/components/app/call-taker-panel.js b/lib/components/app/call-taker-panel.js index 45ab8eda5..b62c07bc7 100644 --- a/lib/components/app/call-taker-panel.js +++ b/lib/components/app/call-taker-panel.js @@ -21,6 +21,7 @@ import { modeButtonButtonCss } from '../form/styled' import SwitchButton from '../form/switch-button' import UserSettings from '../form/user-settings' import NarrativeItineraries from '../narrative/narrative-itineraries' +import { ComponentContext } from '../../util/contexts' import { hasValidLocation, getActiveSearch, getShowUserSettings } from '../../util/state' import ViewerContainer from '../viewers/viewer-container' @@ -202,11 +203,9 @@ class CallTakerPanel extends Component { activeSearch, currentQuery, itineraryFooter, - LegIcon, mainPanelContent, mobile, modes, - ModeIcon, routes, setQueryParam, showUserSettings @@ -240,7 +239,7 @@ class CallTakerPanel extends Component { const maxPlacesDefined = intermediatePlaces.length >= 3 const addIntermediateDisabled = !from || !to || maxPlacesDefined return ( - + {/* FIXME: should this be a styled component */}
@@ -381,6 +378,8 @@ class CallTakerAdvancedOptions extends Component { } } + static contextType = ComponentContext + componentWillMount () { // Fetch routes for banned/preferred routes selectors. this.props.findRoutes() @@ -477,7 +476,9 @@ class CallTakerAdvancedOptions extends Component { } render () { - const {currentQuery, modes, ModeIcon} = this.props + const { currentQuery, modes } = this.props + const { ModeIcon } = this.context + const {maxBikeDistance, maxWalkDistance, mode} = currentQuery const bannedRoutes = this.getRouteList('bannedRoutes') const preferredRoutes = this.getRouteList('preferredRoutes') diff --git a/lib/components/app/default-main-panel.js b/lib/components/app/default-main-panel.js index e286417b7..82a5fe460 100644 --- a/lib/components/app/default-main-panel.js +++ b/lib/components/app/default-main-panel.js @@ -16,9 +16,7 @@ class DefaultMainPanel extends Component { currentQuery, itineraryClass, itineraryFooter, - LegIcon, mainPanelContent, - ModeIcon, showUserSettings } = this.props const showPlanTripButton = mainPanelContent === 'EDIT_DATETIME' || @@ -26,7 +24,7 @@ class DefaultMainPanel extends Component { const mostRecentQuery = activeSearch ? activeSearch.query : null const planDisabled = isEqual(currentQuery, mostRecentQuery) return ( - +
- + {!activeSearch && !showPlanTripButton && showUserSettings && } @@ -44,7 +42,6 @@ class DefaultMainPanel extends Component {
diff --git a/lib/components/app/print-layout.js b/lib/components/app/print-layout.js index 3d3fce9c7..a67760e13 100644 --- a/lib/components/app/print-layout.js +++ b/lib/components/app/print-layout.js @@ -8,15 +8,17 @@ import { parseUrlQueryString } from '../../actions/form' import { routingQuery } from '../../actions/api' import DefaultMap from '../map/default-map' import TripDetails from '../narrative/connected-trip-details' +import { ComponentContext } from '../../util/contexts' import { getActiveItinerary } from '../../util/state' class PrintLayout extends Component { static propTypes = { itinerary: PropTypes.object, - LegIcon: PropTypes.elementType.isRequired, parseUrlQueryString: PropTypes.func } + static contextType = ComponentContext + constructor (props) { super(props) this.state = { @@ -53,7 +55,9 @@ class PrintLayout extends Component { } render () { - const { config, itinerary, LegIcon } = this.props + const { config, itinerary } = this.props + const { LegIcon } = this.context + return (
{/* The header bar, including the Toggle Map and Print buttons */} diff --git a/lib/components/app/responsive-webapp.js b/lib/components/app/responsive-webapp.js index 1ff952765..0e824f2c8 100644 --- a/lib/components/app/responsive-webapp.js +++ b/lib/components/app/responsive-webapp.js @@ -18,6 +18,7 @@ import * as mapActions from '../../actions/map' import * as uiActions from '../../actions/ui' import { getAuth0Config } from '../../util/auth' import { AUTH0_AUDIENCE, AUTH0_SCOPE, URL_ROOT } from '../../util/constants' +import { ComponentContext } from '../../util/contexts' import { getActiveItinerary, getTitle } from '../../util/state' import AfterSignInScreen from '../user/after-signin-screen' import BeforeSignInScreen from '../user/before-signin-screen' @@ -136,8 +137,12 @@ class ResponsiveWebapp extends Component { } render () { - const { desktopView, mobileView } = this.props - return isMobile() ? mobileView : desktopView + const { components, desktopView, mobileView } = this.props + return ( + + {isMobile() ? mobileView : desktopView} + + ) } } diff --git a/lib/components/form/connected-settings-selector-panel.js b/lib/components/form/connected-settings-selector-panel.js index 8f4934f99..7ca2aa5b9 100644 --- a/lib/components/form/connected-settings-selector-panel.js +++ b/lib/components/form/connected-settings-selector-panel.js @@ -1,8 +1,8 @@ import React, { Component } from 'react' -import PropTypes from 'prop-types' import { connect } from 'react-redux' import { setQueryParam } from '../../actions/form' +import { ComponentContext } from '../../util/contexts' import { getShowUserSettings } from '../../util/state' import { StyledSettingsSelectorPanel } from './styled' @@ -11,18 +11,17 @@ import UserTripSettings from './user-trip-settings' // TODO: Button title should be bold when button is selected. class ConnectedSettingsSelectorPanel extends Component { - static propTypes = { - ModeIcon: PropTypes.elementType.isRequired - } + static contextType = ComponentContext render () { const { config, - ModeIcon, query, setQueryParam, showUserSettings } = this.props + const { ModeIcon } = this.context + return (
diff --git a/lib/components/form/default-search-form.js b/lib/components/form/default-search-form.js index 64dde53d2..960fbfe6f 100644 --- a/lib/components/form/default-search-form.js +++ b/lib/components/form/default-search-form.js @@ -7,8 +7,7 @@ import SwitchButton from './switch-button' export default class DefaultSearchForm extends Component { static propTypes = { - mobile: PropTypes.bool, - ModeIcon: PropTypes.elementType.isRequired + mobile: PropTypes.bool } static defaultProps = { @@ -25,7 +24,7 @@ export default class DefaultSearchForm extends Component { } render () { - const { mobile, ModeIcon } = this.props + const { mobile } = this.props const actionText = mobile ? 'tap' : 'click' return ( @@ -48,7 +47,7 @@ export default class DefaultSearchForm extends Component {
- +
) } diff --git a/lib/components/form/tabbed-form-panel.js b/lib/components/form/tabbed-form-panel.js index 2452eadb4..dc9a55626 100644 --- a/lib/components/form/tabbed-form-panel.js +++ b/lib/components/form/tabbed-form-panel.js @@ -1,5 +1,4 @@ import React, { Component } from 'react' -import PropTypes from 'prop-types' import { Button } from 'react-bootstrap' import { connect } from 'react-redux' @@ -11,10 +10,6 @@ import ConnectedSettingsSelectorPanel from './connected-settings-selector-panel' import { setMainPanelContent } from '../../actions/ui' class TabbedFormPanel extends Component { - static propTypes = { - ModeIcon: PropTypes.elementType.isRequired - } - _onEditDateTimeClick = () => { const { mainPanelContent, setMainPanelContent } = this.props setMainPanelContent(mainPanelContent === 'EDIT_DATETIME' ? null : 'EDIT_DATETIME') @@ -28,7 +23,7 @@ class TabbedFormPanel extends Component { _onHideClick = () => this.props.setMainPanelContent(null) render () { - const { ModeIcon, mainPanelContent } = this.props + const { mainPanelContent } = this.props return (
@@ -49,7 +44,7 @@ class TabbedFormPanel extends Component { {(mainPanelContent === 'EDIT_DATETIME' || mainPanelContent === 'EDIT_SETTINGS') && (
{mainPanelContent === 'EDIT_DATETIME' && ()} - {mainPanelContent === 'EDIT_SETTINGS' && ()} + {mainPanelContent === 'EDIT_SETTINGS' && ()}
diff --git a/lib/components/app/default-main-panel.js b/lib/components/app/default-main-panel.js index 82a5fe460..2f708b43a 100644 --- a/lib/components/app/default-main-panel.js +++ b/lib/components/app/default-main-panel.js @@ -14,8 +14,6 @@ class DefaultMainPanel extends Component { const { activeSearch, currentQuery, - itineraryClass, - itineraryFooter, mainPanelContent, showUserSettings } = this.props @@ -39,10 +37,7 @@ class DefaultMainPanel extends Component { }
- +
{showPlanTripButton && diff --git a/lib/components/mobile/main.js b/lib/components/mobile/main.js index 43b96be08..a7ae607d2 100644 --- a/lib/components/mobile/main.js +++ b/lib/components/mobile/main.js @@ -18,7 +18,6 @@ import { getActiveItinerary } from '../../util/state' class MobileMain extends Component { static propTypes = { currentQuery: PropTypes.object, - itineraryClass: PropTypes.func, map: PropTypes.element, setMobileScreen: PropTypes.func, title: PropTypes.element, @@ -44,7 +43,7 @@ class MobileMain extends Component { } render () { - const { itineraryClass, itineraryFooter, map, title, uiState } = this.props + const { map, title, uiState } = this.props // check for route viewer if (uiState.mainPanelContent === MainPanelContent.ROUTE_VIEWER) { @@ -101,11 +100,7 @@ class MobileMain extends Component { case MobileScreens.RESULTS_SUMMARY: return ( - + ) default: return

Invalid mobile screen

diff --git a/lib/components/mobile/results-screen.js b/lib/components/mobile/results-screen.js index bccd1d728..4fe96e7d8 100644 --- a/lib/components/mobile/results-screen.js +++ b/lib/components/mobile/results-screen.js @@ -103,8 +103,6 @@ class MobileResultsScreen extends Component { const { activeItineraryIndex, error, - itineraryClass, - itineraryFooter, query, realtimeEffects, resultCount, @@ -213,8 +211,6 @@ class MobileResultsScreen extends Component { style={narrativeContainerStyle} > { if (typeof this.props.onClick === 'function') this.props.onClick() } @@ -55,28 +49,16 @@ class ItineraryCarousel extends Component { render () { const { activeItinerary, + expanded, itineraries, - itineraryClass, hideHeader, pending } = this.props - const { LegIcon } = this.context + const { ItineraryBody, LegIcon } = this.context if (pending) return if (!itineraries) return null - const views = itineraries.map((itinerary, index) => { - return React.createElement(itineraryClass, { - expanded: this.props.expanded, - index, - itinerary, - key: index, - LegIcon, - onClick: this._onItineraryClick, - ...this.props - }) - }) - return (
{hideHeader @@ -103,7 +85,19 @@ class ItineraryCarousel extends Component { {views} + > + {itineraries.map((itinerary, index) => ( + + ))} +
) } diff --git a/lib/components/narrative/line-itin/connected-itinerary-body.js b/lib/components/narrative/line-itin/connected-itinerary-body.js index 0607a7ef8..981f599b4 100644 --- a/lib/components/narrative/line-itin/connected-itinerary-body.js +++ b/lib/components/narrative/line-itin/connected-itinerary-body.js @@ -15,7 +15,7 @@ import TransitLegSubheader from './connected-transit-leg-subheader' import RealtimeTimeColumn from './realtime-time-column' import TripDetails from '../connected-trip-details' import TripTools from '../trip-tools' -import { ComponentContext } from '../../util/contexts' +import { ComponentContext } from '../../../util/contexts' const noop = () => {} diff --git a/lib/components/narrative/line-itin/line-itinerary.js b/lib/components/narrative/line-itin/line-itinerary.js index d96cc657d..a6f030699 100644 --- a/lib/components/narrative/line-itin/line-itinerary.js +++ b/lib/components/narrative/line-itin/line-itinerary.js @@ -7,6 +7,7 @@ import ItinerarySummary from './itin-summary' import NarrativeItinerary from '../narrative-itinerary' import SaveTripButton from '../save-trip-button' import SimpleRealtimeAnnotation from '../simple-realtime-annotation' +import { ComponentContext } from '../../../util/contexts' const { getLegModeLabel, getTimeZoneOffset, isTransit } = coreUtils.itinerary @@ -15,6 +16,8 @@ export const LineItineraryContainer = styled.div` ` export default class LineItinerary extends NarrativeItinerary { + static contextType = ComponentContext + _headerText () { const { itinerary } = this.props return itinerary.summary || this._getSummary(itinerary) @@ -49,12 +52,12 @@ export default class LineItinerary extends NarrativeItinerary { companies, expanded, itinerary, - itineraryFooter, onClick, setActiveLeg, showRealtimeAnnotation, timeFormat } = this.props + const { ItineraryFooter } = this.context if (!itinerary) { return
No Itinerary!
@@ -87,7 +90,7 @@ export default class LineItinerary extends NarrativeItinerary { timeOptions={timeOptions} /> : null} - {itineraryFooter} + {ItineraryFooter && } ) } diff --git a/lib/components/narrative/narrative-itineraries.js b/lib/components/narrative/narrative-itineraries.js index 15db166ef..f0b98ed14 100644 --- a/lib/components/narrative/narrative-itineraries.js +++ b/lib/components/narrative/narrative-itineraries.js @@ -12,7 +12,6 @@ import { setVisibleItinerary, updateItineraryFilter } from '../../actions/narrative' -import DefaultItinerary from './default/default-itinerary' import Icon from '../narrative/icon' import { ComponentContext } from '../../util/contexts' import { @@ -38,7 +37,6 @@ function humanReadableMode (modeStr) { class NarrativeItineraries extends Component { static propTypes = { itineraries: PropTypes.array, - itineraryClass: PropTypes.func, pending: PropTypes.bool, activeItinerary: PropTypes.number, setActiveItinerary: PropTypes.func, @@ -50,10 +48,6 @@ class NarrativeItineraries extends Component { static contextType = ComponentContext - static defaultProps = { - itineraryClass: DefaultItinerary - } - state = {} _toggleDetailedItinerary = () => { @@ -109,13 +103,12 @@ class NarrativeItineraries extends Component { errors, filter, itineraries, - itineraryClass, pending, realtimeEffects, sort, useRealtime } = this.props - const { LegIcon } = this.context + const { ItineraryBody, LegIcon } = this.context if (!activeSearch) return null const itineraryIsExpanded = activeItinerary !== undefined && activeItinerary !== null && this.state.showDetails @@ -199,19 +192,21 @@ class NarrativeItineraries extends Component { const active = index === activeItinerary // Hide non-active itineraries. if (!active && itineraryIsExpanded) return null - return React.createElement(itineraryClass, { - active, - expanded: this.state.showDetails, - index, - itinerary, - key: index, - LegIcon, - onClick: active ? this._toggleDetailedItinerary : undefined, - routingType: 'ITINERARY', - showRealtimeAnnotation, - sort, - ...this.props - }) + return ( + + ) })} {/* FIXME: Flesh out error design/move to component? */} {errors.map((e, i) => { diff --git a/lib/components/narrative/narrative-routing-results.js b/lib/components/narrative/narrative-routing-results.js index da151861b..5660c7e29 100644 --- a/lib/components/narrative/narrative-routing-results.js +++ b/lib/components/narrative/narrative-routing-results.js @@ -15,7 +15,6 @@ import { setMainPanelContent } from '../../actions/ui' class NarrativeRoutingResults extends Component { static propTypes = { - itineraryClass: PropTypes.func, routingType: PropTypes.string } @@ -30,23 +29,18 @@ class NarrativeRoutingResults extends Component { render () { const { error, - itineraryClass, - itineraryFooter, pending, itineraries, mainPanelContent } = this.props + if (pending) return if (error) return if (mainPanelContent) return null return ( // TODO: If multiple routing types exist, do the check here. - + ) } } diff --git a/lib/components/narrative/tabbed-itineraries.js b/lib/components/narrative/tabbed-itineraries.js index fce5de08c..cfa2af827 100644 --- a/lib/components/narrative/tabbed-itineraries.js +++ b/lib/components/narrative/tabbed-itineraries.js @@ -5,7 +5,6 @@ import { Button } from 'react-bootstrap' import { connect } from 'react-redux' import * as narrativeActions from '../../actions/narrative' -import DefaultItinerary from './default/default-itinerary' import { ComponentContext } from '../../util/contexts' import { getActiveSearch, getRealtimeEffects } from '../../util/state' @@ -15,7 +14,6 @@ const { formatDuration, formatTime, getTimeFormat } = coreUtils.time class TabbedItineraries extends Component { static propTypes = { itineraries: PropTypes.array, - itineraryClass: PropTypes.func, pending: PropTypes.bool, activeItinerary: PropTypes.number, setActiveItinerary: PropTypes.func, @@ -27,10 +25,6 @@ class TabbedItineraries extends Component { static contextType = ComponentContext - static defaultProps = { - itineraryClass: DefaultItinerary - } - _toggleRealtimeItineraryClick = (e) => { const { setUseRealtimeResponse, useRealtime } = this.props setUseRealtimeResponse({ useRealtime: !useRealtime }) @@ -40,14 +34,13 @@ class TabbedItineraries extends Component { const { activeItinerary, itineraries, - itineraryClass, realtimeEffects, setActiveItinerary, timeFormat, useRealtime, - ...itineraryClassProps + ...itineraryBodyProps } = this.props - const { LegIcon } = this.context + const { ItineraryBody, LegIcon } = this.context if (!itineraries) return null @@ -82,18 +75,20 @@ class TabbedItineraries extends Component { {/* Show active itin if itineraries exist and active itin is defined. */} {(itineraries.length > 0 && activeItinerary >= 0) - ? React.createElement(itineraryClass, { - active: true, - expanded: true, - index: activeItinerary, - itinerary: itineraries[activeItinerary], - key: activeItinerary, - LegIcon, - routingType: 'ITINERARY', - showRealtimeAnnotation, - timeFormat, - ...itineraryClassProps - }) + ? ( + + ) : null } diff --git a/lib/index.js b/lib/index.js index c4b37bc47..5707a6aa1 100644 --- a/lib/index.js +++ b/lib/index.js @@ -16,6 +16,7 @@ import StylizedMap from './components/map/stylized-map' import OsmBaseLayer from './components/map/osm-base-layer' import TileOverlay from './components/map/tile-overlay' +import DefaultItinerary from './components/narrative/default/default-itinerary' import ItineraryCarousel from './components/narrative/itinerary-carousel' import NarrativeItineraries from './components/narrative/narrative-itineraries' import NarrativeItinerary from './components/narrative/narrative-itinerary' @@ -78,6 +79,7 @@ export { TileOverlay, // narrative components + DefaultItinerary, LineItinerary, NarrativeItineraries, NarrativeItinerary, From ec712979c1f6dc4ca1e1c21b9cdf4cbde93b5847 Mon Sep 17 00:00:00 2001 From: Evan Siroky Date: Tue, 17 Nov 2020 14:36:26 -0800 Subject: [PATCH 48/58] refactor: forgot to get a LegIcon from the context --- lib/components/narrative/line-itin/itin-summary.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/components/narrative/line-itin/itin-summary.js b/lib/components/narrative/line-itin/itin-summary.js index 689ff9171..43641a58c 100644 --- a/lib/components/narrative/line-itin/itin-summary.js +++ b/lib/components/narrative/line-itin/itin-summary.js @@ -84,6 +84,8 @@ export default class ItinerarySummary extends Component { render () { const { itinerary, timeOptions } = this.props + const { LegIcon } = this.context + const { centsToString, maxTNCFare, @@ -131,7 +133,9 @@ export default class ItinerarySummary extends Component { }).map((leg, k) => { return ( - + + + {coreUtils.itinerary.isTransit(leg.mode) ? ( From e110f9aa9774b83ed8649bb7aeb76f533625a5ac Mon Sep 17 00:00:00 2001 From: Evan Siroky Date: Tue, 17 Nov 2020 14:44:29 -0800 Subject: [PATCH 49/58] build: update to core-utils v3.0.3 --- package.json | 2 +- yarn.lock | 9 +++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 49cd86fa0..238be1831 100644 --- a/package.json +++ b/package.json @@ -29,7 +29,7 @@ "dependencies": { "@auth0/auth0-react": "^1.1.0", "@opentripplanner/base-map": "^1.0.4", - "@opentripplanner/core-utils": "^3.0.1", + "@opentripplanner/core-utils": "^3.0.3", "@opentripplanner/endpoints-overlay": "^1.0.4", "@opentripplanner/from-to-location-picker": "^1.0.3", "@opentripplanner/geocoder": "^1.0.2", diff --git a/yarn.lock b/yarn.lock index f78357fbf..33597890f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1448,12 +1448,13 @@ "@opentripplanner/core-utils" "^3.0.0" prop-types "^15.7.2" -"@opentripplanner/core-utils@^3.0.0", "@opentripplanner/core-utils@^3.0.1": - version "3.0.1" - resolved "https://registry.yarnpkg.com/@opentripplanner/core-utils/-/core-utils-3.0.1.tgz#6efa8dabceeae4527343edba2e6a9b06ce1fcb1c" - integrity sha512-R6VIJfNL0PnddpV+0uJfCGjy3M4HwtujeKSWDl70YoKJa+7G9AVjtk7rKHagwOefpWaUBI86T03EbklyllZgRQ== +"@opentripplanner/core-utils@^3.0.0", "@opentripplanner/core-utils@^3.0.3": + version "3.0.3" + resolved "https://registry.yarnpkg.com/@opentripplanner/core-utils/-/core-utils-3.0.3.tgz#cee56325a975ee09f7a6c6cc9c42362b82183daf" + integrity sha512-7x8eZj0v0fQJ5L32P/CGG1NjydmuD1O2edMRClx65LSrm0SwHQb3CgEQsBmZTxCmZ5kMgp87p+GcAB7k6kZxdw== dependencies: "@mapbox/polyline" "^1.1.0" + "@opentripplanner/geocoder" "^1.0.2" "@turf/along" "^6.0.1" bowser "^2.7.0" lodash.isequal "^4.5.0" From 98311659bb770a2aa40e32fa823f498f7fc00e51 Mon Sep 17 00:00:00 2001 From: Evan Siroky Date: Tue, 17 Nov 2020 16:03:35 -0800 Subject: [PATCH 50/58] test: update snapshot to reflect new pattern sorting --- .../viewers/__snapshots__/stop-viewer.js.snap | 228 +++++++++--------- 1 file changed, 114 insertions(+), 114 deletions(-) diff --git a/__tests__/components/viewers/__snapshots__/stop-viewer.js.snap b/__tests__/components/viewers/__snapshots__/stop-viewer.js.snap index b5b4b6791..ae2ae0a98 100644 --- a/__tests__/components/viewers/__snapshots__/stop-viewer.js.snap +++ b/__tests__/components/viewers/__snapshots__/stop-viewer.js.snap @@ -3595,12 +3595,12 @@ exports[`components > viewers > stop viewer should render with OTP transit index viewers > stop viewer should render with OTP transit index Array [ Object { "arrivalDelay": 0, - "blockId": "9468", - "departureDelay": 0, - "headsign": "Sherwood", - "realtime": false, - "realtimeArrival": 52080, - "realtimeDeparture": 52080, - "realtimeState": "SCHEDULED", - "scheduledArrival": 52080, - "scheduledDeparture": 52080, - "serviceDay": 1565074800, - "stopCount": 40, - "stopId": "TriMet:715", - "stopIndex": 0, - "timepoint": true, - "tripId": "TriMet:9238187", - }, - Object { - "arrivalDelay": 0, - "blockId": "9372", - "departureDelay": 0, - "headsign": "Sherwood", - "realtime": false, - "realtimeArrival": 54120, - "realtimeDeparture": 54120, - "realtimeState": "SCHEDULED", - "scheduledArrival": 54120, - "scheduledDeparture": 54120, - "serviceDay": 1565074800, - "stopCount": 40, - "stopId": "TriMet:715", - "stopIndex": 0, - "timepoint": true, - "tripId": "TriMet:9238189", - }, - Object { - "arrivalDelay": 0, - "blockId": "9474", - "departureDelay": 0, - "headsign": "Sherwood", - "realtime": false, - "realtimeArrival": 56880, - "realtimeDeparture": 56880, - "realtimeState": "SCHEDULED", - "scheduledArrival": 56880, - "scheduledDeparture": 56880, - "serviceDay": 1565074800, - "stopCount": 40, - "stopId": "TriMet:715", - "stopIndex": 0, - "timepoint": true, - "tripId": "TriMet:9238194", - }, - Object { - "arrivalDelay": 0, - "blockId": "9470", + "blockId": "9472", "departureDelay": 0, - "headsign": "Sherwood", + "headsign": "King City", "realtime": false, - "realtimeArrival": 54720, - "realtimeDeparture": 54720, + "realtimeArrival": 55320, + "realtimeDeparture": 55320, "realtimeState": "SCHEDULED", - "scheduledArrival": 54720, - "scheduledDeparture": 54720, + "scheduledArrival": 55320, + "scheduledDeparture": 55320, "serviceDay": 1565074800, - "stopCount": 34, + "stopCount": 23, "stopId": "TriMet:715", "stopIndex": 0, "timepoint": true, - "tripId": "TriMet:9238190", + "tripId": "TriMet:9238192", }, Object { "arrivalDelay": 0, - "blockId": "9470", + "blockId": "9472", "departureDelay": 0, - "headsign": "Sherwood", + "headsign": "King City", "realtime": false, - "realtimeArrival": 54720, - "realtimeDeparture": 54720, + "realtimeArrival": 55320, + "realtimeDeparture": 55320, "realtimeState": "SCHEDULED", - "scheduledArrival": 54720, - "scheduledDeparture": 54720, + "scheduledArrival": 55320, + "scheduledDeparture": 55320, "serviceDay": 1565161200, - "stopCount": 34, + "stopCount": 23, "stopId": "TriMet:715", "stopIndex": 0, "timepoint": true, - "tripId": "TriMet:9238190", + "tripId": "TriMet:9238192", }, Object { "arrivalDelay": 0, - "blockId": "9470", + "blockId": "9472", "departureDelay": 0, - "headsign": "Sherwood", + "headsign": "King City", "realtime": false, - "realtimeArrival": 54720, - "realtimeDeparture": 54720, + "realtimeArrival": 55320, + "realtimeDeparture": 55320, "realtimeState": "SCHEDULED", - "scheduledArrival": 54720, - "scheduledDeparture": 54720, + "scheduledArrival": 55320, + "scheduledDeparture": 55320, "serviceDay": 1565247600, - "stopCount": 34, + "stopCount": 23, "stopId": "TriMet:715", "stopIndex": 0, "timepoint": true, - "tripId": "TriMet:9238190", + "tripId": "TriMet:9238192", }, ] } @@ -3747,7 +3693,7 @@ exports[`components > viewers > stop viewer should render with OTP transit index 94 To - Sherwood + King City
viewers > stop viewer should render with OTP transit index Tuesday
- 14:28 + 15:22
@@ -3879,12 +3825,12 @@ exports[`components > viewers > stop viewer should render with OTP transit index viewers > stop viewer should render with OTP transit index Array [ Object { "arrivalDelay": 0, - "blockId": "9472", + "blockId": "9468", "departureDelay": 0, - "headsign": "King City", + "headsign": "Sherwood", "realtime": false, - "realtimeArrival": 55320, - "realtimeDeparture": 55320, + "realtimeArrival": 52080, + "realtimeDeparture": 52080, "realtimeState": "SCHEDULED", - "scheduledArrival": 55320, - "scheduledDeparture": 55320, + "scheduledArrival": 52080, + "scheduledDeparture": 52080, "serviceDay": 1565074800, - "stopCount": 23, + "stopCount": 40, "stopId": "TriMet:715", "stopIndex": 0, "timepoint": true, - "tripId": "TriMet:9238192", + "tripId": "TriMet:9238187", }, Object { "arrivalDelay": 0, - "blockId": "9472", + "blockId": "9372", "departureDelay": 0, - "headsign": "King City", + "headsign": "Sherwood", "realtime": false, - "realtimeArrival": 55320, - "realtimeDeparture": 55320, + "realtimeArrival": 54120, + "realtimeDeparture": 54120, "realtimeState": "SCHEDULED", - "scheduledArrival": 55320, - "scheduledDeparture": 55320, + "scheduledArrival": 54120, + "scheduledDeparture": 54120, + "serviceDay": 1565074800, + "stopCount": 40, + "stopId": "TriMet:715", + "stopIndex": 0, + "timepoint": true, + "tripId": "TriMet:9238189", + }, + Object { + "arrivalDelay": 0, + "blockId": "9474", + "departureDelay": 0, + "headsign": "Sherwood", + "realtime": false, + "realtimeArrival": 56880, + "realtimeDeparture": 56880, + "realtimeState": "SCHEDULED", + "scheduledArrival": 56880, + "scheduledDeparture": 56880, + "serviceDay": 1565074800, + "stopCount": 40, + "stopId": "TriMet:715", + "stopIndex": 0, + "timepoint": true, + "tripId": "TriMet:9238194", + }, + Object { + "arrivalDelay": 0, + "blockId": "9470", + "departureDelay": 0, + "headsign": "Sherwood", + "realtime": false, + "realtimeArrival": 54720, + "realtimeDeparture": 54720, + "realtimeState": "SCHEDULED", + "scheduledArrival": 54720, + "scheduledDeparture": 54720, + "serviceDay": 1565074800, + "stopCount": 34, + "stopId": "TriMet:715", + "stopIndex": 0, + "timepoint": true, + "tripId": "TriMet:9238190", + }, + Object { + "arrivalDelay": 0, + "blockId": "9470", + "departureDelay": 0, + "headsign": "Sherwood", + "realtime": false, + "realtimeArrival": 54720, + "realtimeDeparture": 54720, + "realtimeState": "SCHEDULED", + "scheduledArrival": 54720, + "scheduledDeparture": 54720, "serviceDay": 1565161200, - "stopCount": 23, + "stopCount": 34, "stopId": "TriMet:715", "stopIndex": 0, "timepoint": true, - "tripId": "TriMet:9238192", + "tripId": "TriMet:9238190", }, Object { "arrivalDelay": 0, - "blockId": "9472", + "blockId": "9470", "departureDelay": 0, - "headsign": "King City", + "headsign": "Sherwood", "realtime": false, - "realtimeArrival": 55320, - "realtimeDeparture": 55320, + "realtimeArrival": 54720, + "realtimeDeparture": 54720, "realtimeState": "SCHEDULED", - "scheduledArrival": 55320, - "scheduledDeparture": 55320, + "scheduledArrival": 54720, + "scheduledDeparture": 54720, "serviceDay": 1565247600, - "stopCount": 23, + "stopCount": 34, "stopId": "TriMet:715", "stopIndex": 0, "timepoint": true, - "tripId": "TriMet:9238192", + "tripId": "TriMet:9238190", }, ] } @@ -3977,7 +3977,7 @@ exports[`components > viewers > stop viewer should render with OTP transit index 94 To - King City + Sherwood
viewers > stop viewer should render with OTP transit index Tuesday
- 15:22 + 14:28
From 576730fe82ce0ae5ffac6e30c6f011b71b93a888 Mon Sep 17 00:00:00 2001 From: Evan Siroky Date: Tue, 17 Nov 2020 16:04:00 -0800 Subject: [PATCH 51/58] refactor(route-viewer): better align route row --- lib/components/viewers/route-viewer.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/components/viewers/route-viewer.js b/lib/components/viewers/route-viewer.js index 6b96ce8d6..597040a60 100644 --- a/lib/components/viewers/route-viewer.js +++ b/lib/components/viewers/route-viewer.js @@ -121,6 +121,7 @@ const RouteRowButton = styled(Button)` const RouteRowElement = styled.div` display: inline-block; + vertical-align: middle; ` const OperatorImg = styled.img` @@ -129,7 +130,7 @@ const OperatorImg = styled.img` ` const ModeIconElement = styled(RouteRowElement)` - vertical-align: middle; + height: 22px; ` const RouteNameElement = styled(RouteRowElement)` From f0d3e97c1e5eb94864bda16d520dd7a2715ddf35 Mon Sep 17 00:00:00 2001 From: Evan Siroky Date: Wed, 18 Nov 2020 09:06:19 -0800 Subject: [PATCH 52/58] docs: add entry in example-config showing transitOperators setup --- example-config.yml | 34 +++++++++++++++++++++++++++++++++- 1 file changed, 33 insertions(+), 1 deletion(-) diff --git a/example-config.yml b/example-config.yml index 85722e6d8..5a1ac26f8 100644 --- a/example-config.yml +++ b/example-config.yml @@ -29,7 +29,7 @@ persistence: ### If using the OTP Middleware to store user profiles ### with Auth0 as the authentication mechanism, -### then use the otp_middleware strategy below instead: +### then use the otp_middleware strategy below instead: # persistence: # enabled: true # strategy: otp_middleware @@ -130,6 +130,38 @@ itinerary: # (Requires using LineItinerary.) showRouteFares: false +# Provide a list of transit operators to enhance the user experience for multi- +# agency implementations. The `order` value of each agencies will dictate the +# order that routes appear in the route and stop viewers. Also, optionally +# provide operator logos to appear in itineraries). Note: these logos will +# override the values found in agency.txt#agency_branding_url. Agencies are +# matched according to both the feedId and agencyId. This works best with the +# IBI fork of OTP which returns the necessary information in the route index +# API. Check the build logs of OTP to see what feedIds and agencyIds were found +# as these IDs can sometimes be auto-generated. +# +# transitOperators: +# - feedId: TriMet +# agencyId: PSC +# logo: https://d2tyb7byn1fef9.cloudfront.net/psc.png +# - feedId: TriMet +# agencyId: TRIMET +# name: TriMet +# logo: http://news.trimet.org/wordpress/wp-content/uploads/2019/04/TriMet-logo-300x300.png +# - feedId: TriMet +# agencyId: TRAM +# logo: https://d2tyb7byn1fef9.cloudfront.net/tram.png +# # The C-TRAN GTFS feed does not come with feed_id or agency_id filled. The +# # value of '1' is a feed_id and agency_id that OTP auto-generated. +# - feedId: '1' +# agencyId: '1' +# name: C-TRAN +# logo: https://d2tyb7byn1fef9.cloudfront.net/ctran.png +# defaultRouteColor: ffffff +# defaultRouteTextColor: '000000' +# longNameSplitter: ' - ' +# order: 9999999 + ### Use this config for the standard mode selector # modeGroups: # - name: Transit From 98ef742fc280ac2ea58a2faae8fc09220dbe7c11 Mon Sep 17 00:00:00 2001 From: Evan Siroky Date: Fri, 20 Nov 2020 11:17:17 -0800 Subject: [PATCH 53/58] docs: improve config docs about transitOperators --- example-config.yml | 39 +++++++++++++++++++++++++++++---------- 1 file changed, 29 insertions(+), 10 deletions(-) diff --git a/example-config.yml b/example-config.yml index 5a1ac26f8..b7346a146 100644 --- a/example-config.yml +++ b/example-config.yml @@ -130,27 +130,46 @@ itinerary: # (Requires using LineItinerary.) showRouteFares: false -# Provide a list of transit operators to enhance the user experience for multi- -# agency implementations. The `order` value of each agencies will dictate the -# order that routes appear in the route and stop viewers. Also, optionally -# provide operator logos to appear in itineraries). Note: these logos will -# override the values found in agency.txt#agency_branding_url. Agencies are -# matched according to both the feedId and agencyId. This works best with the -# IBI fork of OTP which returns the necessary information in the route index -# API. Check the build logs of OTP to see what feedIds and agencyIds were found -# as these IDs can sometimes be auto-generated. +# The transitOperators key is a list of transit operators that can be used to +# order transit agencies when sorting by route. Also, this can optionally +# provide operator logos that appear in the the route viewer and itineraries). +# Note: these logos will override the values found in +# agency.txt#agency_branding_url. +# +# When sorting routes, otp-react-redux uses otp-ui's route-comparator which uses +# multiple criteria to sort routes. (See https://git.io/Jk2Ia). The routes are +# first sorted according to a comparator value based off of the agency. After +# sorting routes by the agency, additional sorting criteria is used for routes +# that yield the same agency comparator value. +# +# If the transitOperators key is not defined, route sorting will fall back to +# using the agency name. If the transitOperators key is defined, the order field +# defined for each agency is used as a comparator value. Agencies are matched +# according to both the feedId and agencyId. If no match is found or the order +# field is not undefined, the associated routes will be placed after all other +# agencies which did have a match with a defined order value. +# +# This works best with the IBI fork of OTP which returns the necessary +# information in the route index API. Check the build logs of OTP to see what +# feedIds and agencyIds were found as these IDs can sometimes be auto-generated. +# +# Shown below is an example transitOperators config setting for the Portland, OR +# area which uses 2 GTFS files (from TriMet and C-TRAN). # # transitOperators: # - feedId: TriMet # agencyId: PSC # logo: https://d2tyb7byn1fef9.cloudfront.net/psc.png +# order: 1 # - feedId: TriMet # agencyId: TRIMET # name: TriMet # logo: http://news.trimet.org/wordpress/wp-content/uploads/2019/04/TriMet-logo-300x300.png +# order: 1 # - feedId: TriMet # agencyId: TRAM # logo: https://d2tyb7byn1fef9.cloudfront.net/tram.png +# order: 1 # # The C-TRAN GTFS feed does not come with feed_id or agency_id filled. The # # value of '1' is a feed_id and agency_id that OTP auto-generated. # - feedId: '1' @@ -160,7 +179,7 @@ itinerary: # defaultRouteColor: ffffff # defaultRouteTextColor: '000000' # longNameSplitter: ' - ' -# order: 9999999 +# order: 2 ### Use this config for the standard mode selector # modeGroups: From 4eea473d734ac828679e28c77fd759abbc2491db Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 20 Nov 2020 19:24:38 +0000 Subject: [PATCH 54/58] build(deps-dev): bump semantic-release from 15.13.18 to 17.2.3 Bumps [semantic-release](https://github.com/semantic-release/semantic-release) from 15.13.18 to 17.2.3. - [Release notes](https://github.com/semantic-release/semantic-release/releases) - [Commits](https://github.com/semantic-release/semantic-release/compare/v15.13.18...v17.2.3) Signed-off-by: dependabot[bot] --- package.json | 2 +- yarn.lock | 1090 +++++++++++++++++++++++++++++++++----------------- 2 files changed, 728 insertions(+), 364 deletions(-) diff --git a/package.json b/package.json index 188c76cc3..6988d99a3 100644 --- a/package.json +++ b/package.json @@ -106,7 +106,7 @@ "react-dom": "^16.9.0", "react-leaflet": "^2.6.1", "redux-mock-store": "^1.5.3", - "semantic-release": "^15.13.12", + "semantic-release": "^17.2.3", "styled-components": "^5.0.1" }, "peerDependencies": { diff --git a/yarn.lock b/yarn.lock index 228385ed5..aa0665f4e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1369,76 +1369,123 @@ dependencies: meow "^6.1.1" -"@nodelib/fs.scandir@2.1.1": - version "2.1.1" - resolved "https://registry.yarnpkg.com/@nodelib/fs.scandir/-/fs.scandir-2.1.1.tgz#7fa8fed654939e1a39753d286b48b4836d00e0eb" - integrity sha512-NT/skIZjgotDSiXs0WqYhgcuBKhUMgfekCmCGtkUAiLqZdOnrdjmZr9wRl3ll64J9NF79uZ4fk16Dx0yMc/Xbg== +"@nodelib/fs.scandir@2.1.3": + version "2.1.3" + resolved "https://registry.yarnpkg.com/@nodelib/fs.scandir/-/fs.scandir-2.1.3.tgz#3a582bdb53804c6ba6d146579c46e52130cf4a3b" + integrity sha512-eGmwYQn3gxo4r7jdQnkrrN6bY478C3P+a/y72IJukF8LjB6ZHeB3c+Ehacj3sYeSmUXGlnA67/PmbM9CVwL7Dw== dependencies: - "@nodelib/fs.stat" "2.0.1" + "@nodelib/fs.stat" "2.0.3" run-parallel "^1.1.9" -"@nodelib/fs.stat@2.0.1", "@nodelib/fs.stat@^2.0.1": - version "2.0.1" - resolved "https://registry.yarnpkg.com/@nodelib/fs.stat/-/fs.stat-2.0.1.tgz#814f71b1167390cfcb6a6b3d9cdeb0951a192c14" - integrity sha512-+RqhBlLn6YRBGOIoVYthsG0J9dfpO79eJyN7BYBkZJtfqrBwf2KK+rD/M/yjZR6WBmIhAgOV7S60eCgaSWtbFw== +"@nodelib/fs.stat@2.0.3", "@nodelib/fs.stat@^2.0.2": + version "2.0.3" + resolved "https://registry.yarnpkg.com/@nodelib/fs.stat/-/fs.stat-2.0.3.tgz#34dc5f4cabbc720f4e60f75a747e7ecd6c175bd3" + integrity sha512-bQBFruR2TAwoevBEd/NWMoAAtNGzTRgdrqnYCc7dhzfoNvqPzLyqlEQnzZ3kVnNrSp25iyxE00/3h2fqGAGArA== -"@nodelib/fs.walk@^1.2.1": - version "1.2.2" - resolved "https://registry.yarnpkg.com/@nodelib/fs.walk/-/fs.walk-1.2.2.tgz#6a6450c5e17012abd81450eb74949a4d970d2807" - integrity sha512-J/DR3+W12uCzAJkw7niXDcqcKBg6+5G5Q/ZpThpGNzAUz70eOR6RV4XnnSN01qHZiVl0eavoxJsBypQoKsV2QQ== +"@nodelib/fs.walk@^1.2.3": + version "1.2.4" + resolved "https://registry.yarnpkg.com/@nodelib/fs.walk/-/fs.walk-1.2.4.tgz#011b9202a70a6366e436ca5c065844528ab04976" + integrity sha512-1V9XOY4rDW0rehzbrcqAmHnz8e7SKvX27gh8Gt2WgB0+pdzdiLV83p72kZPU+jvMbS1qU5mauP2iOvO8rhmurQ== dependencies: - "@nodelib/fs.scandir" "2.1.1" + "@nodelib/fs.scandir" "2.1.3" fastq "^1.6.0" -"@octokit/endpoint@^5.1.0": - version "5.3.2" - resolved "https://registry.yarnpkg.com/@octokit/endpoint/-/endpoint-5.3.2.tgz#2deda2d869cac9ba7f370287d55667be2a808d4b" - integrity sha512-gRjteEM9I6f4D8vtwU2iGUTn9RX/AJ0SVXiqBUEuYEWVGGAVjSXdT0oNmghH5lvQNWs8mwt6ZaultuG6yXivNw== +"@octokit/auth-token@^2.4.0": + version "2.4.3" + resolved "https://registry.yarnpkg.com/@octokit/auth-token/-/auth-token-2.4.3.tgz#b868b5f2366533a7e62933eaa1181a8924228cc4" + integrity sha512-fdGoOQ3kQJh+hrilc0Plg50xSfaCKOeYN9t6dpJKXN9BxhhfquL0OzoQXg3spLYymL5rm29uPeI3KEXRaZQ9zg== dependencies: - deepmerge "4.0.0" - is-plain-object "^3.0.0" - universal-user-agent "^3.0.0" - url-template "^2.0.8" + "@octokit/types" "^5.0.0" -"@octokit/request-error@^1.0.1", "@octokit/request-error@^1.0.2": - version "1.0.4" - resolved "https://registry.yarnpkg.com/@octokit/request-error/-/request-error-1.0.4.tgz#15e1dc22123ba4a9a4391914d80ec1e5303a23be" - integrity sha512-L4JaJDXn8SGT+5G0uX79rZLv0MNJmfGa4vb4vy1NnpjSnWDLJRy6m90udGwvMmavwsStgbv2QNkPzzTCMmL+ig== +"@octokit/core@^3.0.0": + version "3.2.1" + resolved "https://registry.yarnpkg.com/@octokit/core/-/core-3.2.1.tgz#9e04df3f4e7f825ac0559327490ce34299140af5" + integrity sha512-XfFSDDwv6tclUenS0EmB6iA7u+4aOHBT1Lz4PtQNQQg3hBbNaR/+Uv5URU+egeIuuGAiMRiDyY92G4GBOWOqDA== + dependencies: + "@octokit/auth-token" "^2.4.0" + "@octokit/graphql" "^4.3.1" + "@octokit/request" "^5.4.0" + "@octokit/types" "^5.0.0" + before-after-hook "^2.1.0" + universal-user-agent "^6.0.0" + +"@octokit/endpoint@^6.0.1": + version "6.0.9" + resolved "https://registry.yarnpkg.com/@octokit/endpoint/-/endpoint-6.0.9.tgz#c6a772e024202b1bd19ab69f90e0536a2598b13e" + integrity sha512-3VPLbcCuqji4IFTclNUtGdp9v7g+nspWdiCUbK3+iPMjJCZ6LEhn1ts626bWLOn0GiDb6j+uqGvPpqLnY7pBgw== + dependencies: + "@octokit/types" "^5.0.0" + is-plain-object "^5.0.0" + universal-user-agent "^6.0.0" + +"@octokit/graphql@^4.3.1": + version "4.5.7" + resolved "https://registry.yarnpkg.com/@octokit/graphql/-/graphql-4.5.7.tgz#f4562dcd9e80ea94602068e85aefac19a88f8578" + integrity sha512-Gk0AR+DcwIK/lK/GX+OQ99UqtenQhcbrhHHfOYlrCQe17ADnX3EKAOKRsAZ9qZvpi5MuwWm/Nm+9aO2kTDSdyA== + dependencies: + "@octokit/request" "^5.3.0" + "@octokit/types" "^5.0.0" + universal-user-agent "^6.0.0" + +"@octokit/plugin-paginate-rest@^2.2.0": + version "2.6.0" + resolved "https://registry.yarnpkg.com/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-2.6.0.tgz#03416396e7a227b268c5b827365238f620a9c5c1" + integrity sha512-o+O8c1PqsC5++BHXfMZabRRsBIVb34tXPWyQLyp2IXq5MmkxdipS7TXM4Y9ldL1PzY9CTrCsn/lzFFJGM3oRRA== dependencies: - deprecation "^2.0.0" - once "^1.4.0" + "@octokit/types" "^5.5.0" -"@octokit/request@^5.0.0": - version "5.0.2" - resolved "https://registry.yarnpkg.com/@octokit/request/-/request-5.0.2.tgz#59a920451f24811c016ddc507adcc41aafb2dca5" - integrity sha512-z1BQr43g4kOL4ZrIVBMHwi68Yg9VbkRUyuAgqCp1rU3vbYa69+2gIld/+gHclw15bJWQnhqqyEb7h5a5EqgZ0A== +"@octokit/plugin-request-log@^1.0.0": + version "1.0.2" + resolved "https://registry.yarnpkg.com/@octokit/plugin-request-log/-/plugin-request-log-1.0.2.tgz#394d59ec734cd2f122431fbaf05099861ece3c44" + integrity sha512-oTJSNAmBqyDR41uSMunLQKMX0jmEXbwD1fpz8FG27lScV3RhtGfBa1/BBLym+PxcC16IBlF7KH9vP1BUYxA+Eg== + +"@octokit/plugin-rest-endpoint-methods@4.2.1": + version "4.2.1" + resolved "https://registry.yarnpkg.com/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-4.2.1.tgz#8224833a45c3394836dc6e86f1e6c49269a2c350" + integrity sha512-QyFr4Bv807Pt1DXZOC5a7L5aFdrwz71UHTYoHVajYV5hsqffWm8FUl9+O7nxRu5PDMtB/IKrhFqTmdBTK5cx+A== dependencies: - "@octokit/endpoint" "^5.1.0" - "@octokit/request-error" "^1.0.1" + "@octokit/types" "^5.5.0" + deprecation "^2.3.1" + +"@octokit/request-error@^2.0.0": + version "2.0.3" + resolved "https://registry.yarnpkg.com/@octokit/request-error/-/request-error-2.0.3.tgz#b51b200052bf483f6fa56c9e7e3aa51ead36ecd8" + integrity sha512-GgD5z8Btm301i2zfvJLk/mkhvGCdjQ7wT8xF9ov5noQY8WbKZDH9cOBqXzoeKd1mLr1xH2FwbtGso135zGBgTA== + dependencies: + "@octokit/types" "^5.0.1" deprecation "^2.0.0" - is-plain-object "^3.0.0" - node-fetch "^2.3.0" once "^1.4.0" - universal-user-agent "^3.0.0" - -"@octokit/rest@^16.27.0": - version "16.28.7" - resolved "https://registry.yarnpkg.com/@octokit/rest/-/rest-16.28.7.tgz#a2c2db5b318da84144beba82d19c1a9dbdb1a1fa" - integrity sha512-cznFSLEhh22XD3XeqJw51OLSfyL2fcFKUO+v2Ep9MTAFfFLS1cK1Zwd1yEgQJmJoDnj4/vv3+fGGZweG+xsbIA== - dependencies: - "@octokit/request" "^5.0.0" - "@octokit/request-error" "^1.0.2" - atob-lite "^2.0.0" - before-after-hook "^2.0.0" - btoa-lite "^1.0.0" + +"@octokit/request@^5.3.0", "@octokit/request@^5.4.0": + version "5.4.10" + resolved "https://registry.yarnpkg.com/@octokit/request/-/request-5.4.10.tgz#402d2c53768bde12b99348329ba4129746aebb9c" + integrity sha512-egA49HkqEORVGDZGav1mh+VD+7uLgOxtn5oODj6guJk0HCy+YBSYapFkSLFgeYj3Fr18ZULKGURkjyhkAChylw== + dependencies: + "@octokit/endpoint" "^6.0.1" + "@octokit/request-error" "^2.0.0" + "@octokit/types" "^5.0.0" deprecation "^2.0.0" - lodash.get "^4.4.2" - lodash.set "^4.3.2" - lodash.uniq "^4.5.0" - octokit-pagination-methods "^1.1.0" + is-plain-object "^5.0.0" + node-fetch "^2.6.1" once "^1.4.0" - universal-user-agent "^3.0.0" - url-template "^2.0.8" + universal-user-agent "^6.0.0" + +"@octokit/rest@^18.0.0": + version "18.0.9" + resolved "https://registry.yarnpkg.com/@octokit/rest/-/rest-18.0.9.tgz#964d707d914eb34b1787895fdcacff96de47844d" + integrity sha512-CC5+cIx974Ygx9lQNfUn7/oXDQ9kqGiKUC6j1A9bAVZZ7aoTF8K6yxu0pQhQrLBwSl92J6Z3iVDhGhGFgISCZg== + dependencies: + "@octokit/core" "^3.0.0" + "@octokit/plugin-paginate-rest" "^2.2.0" + "@octokit/plugin-request-log" "^1.0.0" + "@octokit/plugin-rest-endpoint-methods" "4.2.1" + +"@octokit/types@^5.0.0", "@octokit/types@^5.0.1", "@octokit/types@^5.5.0": + version "5.5.0" + resolved "https://registry.yarnpkg.com/@octokit/types/-/types-5.5.0.tgz#e5f06e8db21246ca102aa28444cdb13ae17a139b" + integrity sha512-UZ1pErDue6bZNjYOotCNveTXArOMZQFG6hKJfOnGnulVCMcVVi7YIIuuR4WfBhjo7zgpmzn/BkPDnUXtNx+PcQ== + dependencies: + "@types/node" ">= 8" "@opentripplanner/base-map@^1.0.4": version "1.0.4" @@ -1642,67 +1689,69 @@ dependencies: "@opentripplanner/core-utils" "^3.0.0" -"@semantic-release/commit-analyzer@^6.1.0": - version "6.2.0" - resolved "https://registry.yarnpkg.com/@semantic-release/commit-analyzer/-/commit-analyzer-6.2.0.tgz#5cd25ce67ba9ba5b46e47457505e63629e186695" - integrity sha512-oUtPydYcbtJsEY6WCPi4wynTgRecK5zCkKaGmHi+9Xl7d6jGf7LomnJCg++6dNF1tyavrbGMSdXTCPH6Dx9LbA== +"@semantic-release/commit-analyzer@^8.0.0": + version "8.0.1" + resolved "https://registry.yarnpkg.com/@semantic-release/commit-analyzer/-/commit-analyzer-8.0.1.tgz#5d2a37cd5a3312da0e3ac05b1ca348bf60b90bca" + integrity sha512-5bJma/oB7B4MtwUkZC2Bf7O1MHfi4gWe4mA+MIQ3lsEV0b422Bvl1z5HRpplDnMLHH3EXMoRdEng6Ds5wUqA3A== dependencies: conventional-changelog-angular "^5.0.0" conventional-commits-filter "^2.0.0" - conventional-commits-parser "^3.0.0" + conventional-commits-parser "^3.0.7" debug "^4.0.0" import-from "^3.0.0" lodash "^4.17.4" + micromatch "^4.0.2" "@semantic-release/error@^2.2.0": version "2.2.0" resolved "https://registry.yarnpkg.com/@semantic-release/error/-/error-2.2.0.tgz#ee9d5a09c9969eade1ec864776aeda5c5cddbbf0" integrity sha512-9Tj/qn+y2j+sjCI3Jd+qseGtHjOAeg7dU2/lVcqIQ9TV3QDaDXDYXcoOHU+7o2Hwh8L8ymL4gfuO7KxDs3q2zg== -"@semantic-release/github@^5.1.0": - version "5.4.2" - resolved "https://registry.yarnpkg.com/@semantic-release/github/-/github-5.4.2.tgz#1dbde876228c03ff9a000893a18aff5c6ab2cd61" - integrity sha512-8gkOa5tED/+sjAPwZRYsLaGr6VuAGLZinSvLsuF9/l4qLeYV8gvj7fhjFJepGu6y31t7PR2J9SWzmsqsBAyyKQ== +"@semantic-release/github@^7.0.0": + version "7.2.0" + resolved "https://registry.yarnpkg.com/@semantic-release/github/-/github-7.2.0.tgz#925f3efd91adabfc4bbe0de24b79fe1a8a38b4e2" + integrity sha512-tMRnWiiWb43whRHvbDGXq4DGEbKRi56glDpXDJZit4PIiwDPX7Kx3QzmwRtDOcG+8lcpGjpdPabYZ9NBxoI2mw== dependencies: - "@octokit/rest" "^16.27.0" + "@octokit/rest" "^18.0.0" "@semantic-release/error" "^2.2.0" aggregate-error "^3.0.0" bottleneck "^2.18.1" debug "^4.0.0" dir-glob "^3.0.0" - fs-extra "^8.0.0" - globby "^10.0.0" - http-proxy-agent "^2.1.0" - https-proxy-agent "^2.2.1" - issue-parser "^4.0.0" + fs-extra "^9.0.0" + globby "^11.0.0" + http-proxy-agent "^4.0.0" + https-proxy-agent "^5.0.0" + issue-parser "^6.0.0" lodash "^4.17.4" mime "^2.4.3" p-filter "^2.0.0" p-retry "^4.0.0" - parse-github-url "^1.0.1" url-join "^4.0.0" -"@semantic-release/npm@^5.0.5": - version "5.1.13" - resolved "https://registry.yarnpkg.com/@semantic-release/npm/-/npm-5.1.13.tgz#7b06d62b4d9c8336ae5a5c85eede26fb89f19e3b" - integrity sha512-pONvpoEtGH1nd6Wj3SryACNJ/YXXsvSSekE9Pdk6mnaRv7lGhXdaeJJr6Lr4L8WK98oZv4aJOr68vTac2Oc+dA== +"@semantic-release/npm@^7.0.0": + version "7.0.8" + resolved "https://registry.yarnpkg.com/@semantic-release/npm/-/npm-7.0.8.tgz#228b6327d9e9e9d0adc7bf37b8be3d6fc9744e3e" + integrity sha512-8c1TLwKB/xT5E1FNs5l4GFtaNTznHesJk7tw3pGSlVxRqDXa1EZI+DfziZlO58Wk3PpS2ecu661kvBdz9aMgYQ== dependencies: "@semantic-release/error" "^2.2.0" aggregate-error "^3.0.0" - execa "^1.0.0" - fs-extra "^8.0.0" - lodash "^4.17.4" + execa "^4.0.0" + fs-extra "^9.0.0" + lodash "^4.17.15" nerf-dart "^1.0.0" - normalize-url "^4.0.0" - npm "^6.8.0" + normalize-url "^5.0.0" + npm "^6.14.8" rc "^1.2.8" read-pkg "^5.0.0" registry-auth-token "^4.0.0" + semver "^7.1.2" + tempy "^1.0.0" -"@semantic-release/release-notes-generator@^7.1.2": - version "7.2.1" - resolved "https://registry.yarnpkg.com/@semantic-release/release-notes-generator/-/release-notes-generator-7.2.1.tgz#2c0c340e7be2a3d27c28cb869b6737a70f2862fe" - integrity sha512-TdlYgYH6amhE80i9L9HPcTwYzk4Rma7qM1g7XJEEfip7dNXWgmrBeibN4DJmTg/qrUFDd4GD86lFDcYXNZDNow== +"@semantic-release/release-notes-generator@^9.0.0": + version "9.0.1" + resolved "https://registry.yarnpkg.com/@semantic-release/release-notes-generator/-/release-notes-generator-9.0.1.tgz#732d285d103064f2a64f08a32031551ebb4f918b" + integrity sha512-bOoTiH6SiiR0x2uywSNR7uZcRDl22IpZhj+Q5Bn0v+98MFtOMhCxFhbrKQjhbYoZw7vps1mvMRmFkp/g6R9cvQ== dependencies: conventional-changelog-angular "^5.0.0" conventional-changelog-writer "^4.0.0" @@ -1713,7 +1762,7 @@ import-from "^3.0.0" into-stream "^5.0.0" lodash "^4.17.4" - read-pkg-up "^6.0.0" + read-pkg-up "^7.0.0" "@styled-icons/boxicons-logos@^9.4.1": version "9.4.1" @@ -1899,6 +1948,11 @@ "@styled-icons/styled-icon" "^9.4.1" tslib "^1.9.3" +"@tootallnate/once@1": + version "1.1.2" + resolved "https://registry.yarnpkg.com/@tootallnate/once/-/once-1.1.2.tgz#ccb91445360179a04e7fe6aff78c00ffc1eeaf82" + integrity sha512-RbzJvlNzmRq5c3O09UipeuXno4tA1FE6ikOjxZK0tuxVv3412l64l5t1W5pj4+rJq9vpkm/kwiR07aZXnsKPxw== + "@turf/along@^6.0.1": version "6.0.1" resolved "https://registry.yarnpkg.com/@turf/along/-/along-6.0.1.tgz#595cecdc48fc7fcfa83c940a8e3eb24d4c2e04d4" @@ -1989,20 +2043,6 @@ resolved "https://registry.yarnpkg.com/@types/eslint-visitor-keys/-/eslint-visitor-keys-1.0.0.tgz#1ee30d79544ca84d68d4b3cdb0af4f205663dd2d" integrity sha512-OCutwjDZ4aFS6PB1UZ988C4YgwlBHJd6wCeQqaLdmadZ/7e+w79+hbMUFC1QXDNCmdyoRfAFdm0RypzwR+Qpag== -"@types/events@*": - version "3.0.0" - resolved "https://registry.yarnpkg.com/@types/events/-/events-3.0.0.tgz#2862f3f58a9a7f7c3e78d79f130dd4d71c25c2a7" - integrity sha512-EaObqwIvayI5a8dCzhFrjKzVwKLxjoG9T6Ppd5CEo07LRKfQ8Yokw54r5+Wq7FaBQ+yXRvQAYPrHwya1/UFt9g== - -"@types/glob@^7.1.1": - version "7.1.1" - resolved "https://registry.yarnpkg.com/@types/glob/-/glob-7.1.1.tgz#aa59a1c6e3fbc421e07ccd31a944c30eba521575" - integrity sha512-1Bh06cbWJUHMC97acuD6UMG29nMt0Aqz1vF3guLfG+kHHJhy3AyohZFFxYk2f7Q1SQIrNwvncxAE0N/9s70F2w== - dependencies: - "@types/events" "*" - "@types/minimatch" "*" - "@types/node" "*" - "@types/istanbul-lib-coverage@*", "@types/istanbul-lib-coverage@^2.0.0": version "2.0.1" resolved "https://registry.yarnpkg.com/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.1.tgz#42995b446db9a48a11a07ec083499a860e9138ff" @@ -2028,11 +2068,6 @@ resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.3.tgz#bdfd69d61e464dcc81b25159c270d75a73c1a636" integrity sha512-Il2DtDVRGDcqjDtE+rF8iqg1CArehSK84HZJCT7AMITlyXRBpuPhqGLDQMowraqqu1coEaimg4ZOqggt6L6L+A== -"@types/minimatch@*": - version "3.0.3" - resolved "https://registry.yarnpkg.com/@types/minimatch/-/minimatch-3.0.3.tgz#3dca0e3f33b200fc7d1139c0cd96c1268cadfd9d" - integrity sha512-tHq6qdbT9U1IRSGf14CL0pUlULksvY9OZ+5eEgl1N7t+OA3tGvNpxJCzuKQlsNgCVwbAs670L1vcVQi8j9HjnA== - "@types/minimist@^1.2.0": version "1.2.0" resolved "https://registry.yarnpkg.com/@types/minimist/-/minimist-1.2.0.tgz#69a23a3ad29caf0097f06eda59b361ee2f0639f6" @@ -2043,6 +2078,11 @@ resolved "https://registry.yarnpkg.com/@types/node/-/node-12.6.8.tgz#e469b4bf9d1c9832aee4907ba8a051494357c12c" integrity sha512-aX+gFgA5GHcDi89KG5keey2zf0WfZk/HAQotEamsK2kbey+8yGKcson0hbK8E+v0NArlCJQCqMP161YhV6ZXLg== +"@types/node@>= 8": + version "14.14.9" + resolved "https://registry.yarnpkg.com/@types/node/-/node-14.14.9.tgz#04afc9a25c6ff93da14deabd65dc44485b53c8d6" + integrity sha512-JsoLXFppG62tWTklIoO4knA+oDTYsmqWxHRvd4lpmfQRNhX6osheUOWETP2jMoV/2bEHuMra8Pp3Dmo/stBFcw== + "@types/normalize-package-data@^2.4.0": version "2.4.0" resolved "https://registry.yarnpkg.com/@types/normalize-package-data/-/normalize-package-data-2.4.0.tgz#e486d0d97396d79beedd0a6e33f4534ff6b4973e" @@ -2207,6 +2247,13 @@ agent-base@4, agent-base@^4.3.0: dependencies: es6-promisify "^5.0.0" +agent-base@6: + version "6.0.2" + resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-6.0.2.tgz#49fff58577cfee3f37176feab4c22e00f86d7f77" + integrity sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ== + dependencies: + debug "4" + agent-base@~4.2.1: version "4.2.1" resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-4.2.1.tgz#d89e5999f797875674c07d87f260fc41e83e8ca9" @@ -2289,11 +2336,18 @@ ansi-align@^2.0.0: dependencies: string-width "^2.0.0" -ansi-escapes@^3.0.0, ansi-escapes@^3.1.0, ansi-escapes@^3.2.0: +ansi-escapes@^3.0.0, ansi-escapes@^3.2.0: version "3.2.0" resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-3.2.0.tgz#8780b98ff9dbf5638152d1f1fe5c1d7b4442976b" integrity sha512-cBhpre4ma+U0T1oM5fXg7Dy1Jw7zzwv7lt/GoCpr+hDQJoYnKVPLL4dCvSEFMmQurOQvSrwT7SL/DAlhBI97RQ== +ansi-escapes@^4.3.1: + version "4.3.1" + resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-4.3.1.tgz#a5c47cc43181f1f38ffd7076837700d395522a61" + integrity sha512-JWF7ocqNrp8u9oqpgV+wH5ftbt+cfvv+PTjOvKLT3AdYly/LmORARfEVT1iyjwN+4MqE5UmVKoAdIBqeoCHgLA== + dependencies: + type-fest "^0.11.0" + ansi-html@^0.0.7: version "0.0.7" resolved "https://registry.yarnpkg.com/ansi-html/-/ansi-html-0.0.7.tgz#813584021962a9e9e6fd039f940d12f56ca7859e" @@ -2354,6 +2408,13 @@ ansi-styles@^4.0.0: "@types/color-name" "^1.1.1" color-convert "^2.0.1" +ansi-styles@^4.1.0: + version "4.3.0" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-4.3.0.tgz#edd803628ae71c04c85ae7a0906edad34b648937" + integrity sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg== + dependencies: + color-convert "^2.0.1" + ansicolors@~0.3.2: version "0.3.2" resolved "https://registry.yarnpkg.com/ansicolors/-/ansicolors-0.3.2.tgz#665597de86a9ffe3aa9bfbe6cae5c6ea426b4979" @@ -2634,10 +2695,10 @@ asynckit@^0.4.0: resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" integrity sha1-x57Zf380y48robyXkLzDZkdLS3k= -atob-lite@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/atob-lite/-/atob-lite-2.0.0.tgz#0fef5ad46f1bd7a8502c65727f0367d5ee43d696" - integrity sha1-D+9a1G8b16hQLGVyfwNn1e5D1pY= +at-least-node@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/at-least-node/-/at-least-node-1.0.0.tgz#602cd4b46e844ad4effc92a8011a3c46e0238dc2" + integrity sha512-+q/t7Ekv1EDY2l6Gda6LLiX14rU9TV20Wa3ofeQmwPFZbOMo9DXrLbOjFaaclkXKWidIaopwAObQDqwWtGUjqg== atob@^2.1.1: version "2.1.2" @@ -3621,7 +3682,7 @@ bcrypt-pbkdf@^1.0.0: dependencies: tweetnacl "^0.14.3" -before-after-hook@^2.0.0: +before-after-hook@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/before-after-hook/-/before-after-hook-2.1.0.tgz#b6c03487f44e24200dd30ca5e6a1979c5d2fb635" integrity sha512-IWIbu7pMqyw3EAJHzzHbWa85b6oud/yfKYg5rqB5hNE8CeMi3nX+2C2sj0HswfblST86hpVEOAb9x34NZd6P7A== @@ -3636,7 +3697,7 @@ big.js@^5.2.2: resolved "https://registry.yarnpkg.com/big.js/-/big.js-5.2.2.tgz#65f0af382f578bcdc742bd9c281e9cb2d7768328" integrity sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ== -bin-links@^1.1.2, bin-links@^1.1.7: +bin-links@^1.1.2, bin-links@^1.1.8: version "1.1.8" resolved "https://registry.yarnpkg.com/bin-links/-/bin-links-1.1.8.tgz#bd39aadab5dc4bdac222a07df5baf1af745b2228" integrity sha512-KgmVfx+QqggqP9dA3iIc5pA4T1qEEEL+hOhOhNPaUm77OTrJoOXE/C05SJLNJe6m/2wUK7F1tDSou7n5TfCDzQ== @@ -3955,11 +4016,6 @@ bser@^2.0.0: dependencies: node-int64 "^0.4.0" -btoa-lite@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/btoa-lite/-/btoa-lite-1.0.0.tgz#337766da15801210fdd956c22e9c6891ab9d0337" - integrity sha1-M3dm2hWAEhD92VbCLpxokaudAzc= - budo@^11.6.1: version "11.6.2" resolved "https://registry.yarnpkg.com/budo/-/budo-11.6.2.tgz#0f26fc3db54fe4ab9561a0387bf34ae2a617c7e6" @@ -4287,6 +4343,14 @@ chalk@^2.0.0, chalk@^2.0.1, chalk@^2.1.0, chalk@^2.3.0, chalk@^2.3.2, chalk@^2.4 escape-string-regexp "^1.0.5" supports-color "^5.3.0" +chalk@^4.0.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.0.tgz#4e14870a618d9e2edd97dd8345fd9d9dc315646a" + integrity sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A== + dependencies: + ansi-styles "^4.1.0" + supports-color "^7.1.0" + character-entities-html4@^1.0.0: version "1.1.3" resolved "https://registry.yarnpkg.com/character-entities-html4/-/character-entities-html4-1.1.3.tgz#5ce6e01618e47048ac22f34f7f39db5c6fd679ef" @@ -4931,6 +4995,19 @@ conventional-commits-parser@^3.0.0: through2 "^2.0.0" trim-off-newlines "^1.0.0" +conventional-commits-parser@^3.0.7: + version "3.2.0" + resolved "https://registry.yarnpkg.com/conventional-commits-parser/-/conventional-commits-parser-3.2.0.tgz#9e261b139ca4b7b29bcebbc54460da36894004ca" + integrity sha512-XmJiXPxsF0JhAKyfA2Nn+rZwYKJ60nanlbSWwwkGwLQFbugsc0gv1rzc7VbbUWAzJfR1qR87/pNgv9NgmxtBMQ== + dependencies: + JSONStream "^1.0.4" + is-text-path "^1.0.1" + lodash "^4.17.15" + meow "^8.0.0" + split2 "^2.0.0" + through2 "^4.0.0" + trim-off-newlines "^1.0.0" + convert-source-map@^1.1.0, convert-source-map@^1.4.0, convert-source-map@^1.5.0, convert-source-map@^1.5.1, convert-source-map@^1.7.0: version "1.7.0" resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.7.0.tgz#17a2cb882d7f77d3490585e2ce6c524424a3a442" @@ -4995,7 +5072,7 @@ core-util-is@1.0.2, "core-util-is@>=1.0.1 <1.1.0-0", core-util-is@~1.0.0: resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" integrity sha1-tf1UIgqivFq1eqtxQMlAdUUDwac= -cosmiconfig@^5.0.0, cosmiconfig@^5.0.1: +cosmiconfig@^5.0.0: version "5.2.1" resolved "https://registry.yarnpkg.com/cosmiconfig/-/cosmiconfig-5.2.1.tgz#040f726809c591e77a17c0a3626ca45b4f168b1a" integrity sha512-H65gsXo1SKjf8zmrJ67eJk8aIRKV5ff2D4uKZIBZShbhGSpEmsQOPW/SKMKYhSTrqR7ufy6RP69rPogdaPh/kA== @@ -5079,6 +5156,15 @@ cross-spawn@^6.0.0, cross-spawn@^6.0.5: shebang-command "^1.2.0" which "^1.2.9" +cross-spawn@^7.0.0: + version "7.0.3" + resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.3.tgz#f73a85b9d5d41d045551c177e2882d4ac85728a6" + integrity sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w== + dependencies: + path-key "^3.1.0" + shebang-command "^2.0.0" + which "^2.0.1" + crypt@~0.0.1: version "0.0.2" resolved "https://registry.yarnpkg.com/crypt/-/crypt-0.0.2.tgz#88d7ff7ec0dfb86f713dc87bbb42d044d3e6c41b" @@ -5106,6 +5192,11 @@ crypto-random-string@^1.0.0: resolved "https://registry.yarnpkg.com/crypto-random-string/-/crypto-random-string-1.0.0.tgz#a230f64f568310e1498009940790ec99545bca7e" integrity sha1-ojD2T1aDEOFJgAmUB5DsmVRbyn4= +crypto-random-string@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/crypto-random-string/-/crypto-random-string-2.0.0.tgz#ef2a7a966ec11083388369baa02ebead229b30d5" + integrity sha512-v1plID3y9r/lPhviJ1wrXpLeyUIGAZ2SHNYTEapm7/8A9nLPoyvVp3RK/EPFqn5kEznyWgYZNsRtYYIWbuG8KA== + css-blank-pseudo@^0.1.4: version "0.1.4" resolved "https://registry.yarnpkg.com/css-blank-pseudo/-/css-blank-pseudo-0.1.4.tgz#dfdefd3254bf8a82027993674ccf35483bfcb3c5" @@ -5553,6 +5644,13 @@ debug@3.1.0: dependencies: ms "2.0.0" +debug@4, debug@^4.0.0, debug@^4.0.1, debug@^4.1.0, debug@^4.1.1: + version "4.3.1" + resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.1.tgz#f0d229c505e0c6d8c49ac553d1b13dc183f6b2ee" + integrity sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ== + dependencies: + ms "2.1.2" + debug@^3.1.0, debug@^3.2.6: version "3.2.6" resolved "https://registry.yarnpkg.com/debug/-/debug-3.2.6.tgz#e83d17de16d8a7efb7717edbe5fb10135eee629b" @@ -5560,14 +5658,7 @@ debug@^3.1.0, debug@^3.2.6: dependencies: ms "^2.1.1" -debug@^4.0.0, debug@^4.0.1, debug@^4.1.0, debug@^4.1.1: - version "4.1.1" - resolved "https://registry.yarnpkg.com/debug/-/debug-4.1.1.tgz#3b72260255109c6b589cee050f1d516139664791" - integrity sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw== - dependencies: - ms "^2.1.1" - -debuglog@^1.0.1: +debuglog@*, debuglog@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/debuglog/-/debuglog-1.0.1.tgz#aa24ffb9ac3df9a2351837cfb2d279360cd78492" integrity sha1-qiT/uaw9+aI1GDfPstJ5NgzXhJI= @@ -5622,11 +5713,6 @@ deep-is@~0.1.3: resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.3.tgz#b369d6fb5dbc13eecf524f91b070feedc357cf34" integrity sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ= -deepmerge@4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/deepmerge/-/deepmerge-4.0.0.tgz#3e3110ca29205f120d7cb064960a39c3d2087c09" - integrity sha512-YZ1rOP5+kHor4hMAH+HRQnBQHg+wvS1un1hAOuIcxcBy0hzcUf6Jg2a1w65kpoOUnurOfZbERwjI1TfZxNjcww== - deepmerge@^2.1.1: version "2.2.1" resolved "https://registry.yarnpkg.com/deepmerge/-/deepmerge-2.2.1.tgz#5d3ff22a01c00f645405a2fbc17d0778a1801170" @@ -5681,6 +5767,20 @@ defined@^1.0.0: resolved "https://registry.yarnpkg.com/defined/-/defined-1.0.0.tgz#c98d9bcef75674188e110969151199e39b1fa693" integrity sha1-yY2bzvdWdBiOEQlpFRGZ45sfppM= +del@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/del/-/del-6.0.0.tgz#0b40d0332cea743f1614f818be4feb717714c952" + integrity sha512-1shh9DQ23L16oXSZKB2JxpL7iMy2E0S9d517ptA1P8iw0alkPtQcrKH7ru31rYtKwF499HkTu+DRzq3TCKDFRQ== + dependencies: + globby "^11.0.1" + graceful-fs "^4.2.4" + is-glob "^4.0.1" + is-path-cwd "^2.2.0" + is-path-inside "^3.0.2" + p-map "^4.0.0" + rimraf "^3.0.2" + slash "^3.0.0" + delayed-stream@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619" @@ -5696,7 +5796,7 @@ depd@~1.1.2: resolved "https://registry.yarnpkg.com/depd/-/depd-1.1.2.tgz#9bcd52e14c097763e749b274c4346ed2e560b5a9" integrity sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak= -deprecation@^2.0.0: +deprecation@^2.0.0, deprecation@^2.3.1: version "2.3.1" resolved "https://registry.yarnpkg.com/deprecation/-/deprecation-2.3.1.tgz#6368cbdb40abf3373b525ac87e4a260c3a700919" integrity sha512-xmHIy4F3scKVwMsQ4WnVaS8bHOx0DmVwRywosKhaILI0ywMDWPtBSku2HNxRvF7jtwDRsoEwYQSfbxj8b7RlJQ== @@ -6114,12 +6214,12 @@ entities@^1.1.1, entities@~1.1.1: resolved "https://registry.yarnpkg.com/entities/-/entities-1.1.2.tgz#bdfa735299664dfafd34529ed4f8522a275fea56" integrity sha512-f2LZMYl1Fzu7YSBKg+RoROelpOaNrcGmE9AZubeDfrCEia483oW4MI4VyFd5VNHIgQ/7qm1I0wUHK1eJnn2y2w== -env-ci@^4.0.0: - version "4.1.1" - resolved "https://registry.yarnpkg.com/env-ci/-/env-ci-4.1.1.tgz#b8438fc7258a0dc7a4f4c4816de730767946a718" - integrity sha512-eTgpkALDeYRGNhYM2fO9LKsWDifoUgKL7hxpPZqFMP2IU7f+r89DtKqCmk3yQB/jxS8CmZTfKnWO5TiIDFs9Hw== +env-ci@^5.0.0: + version "5.0.2" + resolved "https://registry.yarnpkg.com/env-ci/-/env-ci-5.0.2.tgz#48b6687f8af8cdf5e31b8fcf2987553d085249d9" + integrity sha512-Xc41mKvjouTXD3Oy9AqySz1IeyvJvHZ20Twf5ZLYbNpPPIuCnL/qHCmNlD01LoNy0JTunw9HPYVptD19Ac7Mbw== dependencies: - execa "^1.0.0" + execa "^4.0.0" java-properties "^1.0.0" env-paths@^2.2.0: @@ -6630,6 +6730,21 @@ execa@^1.0.0: signal-exit "^3.0.0" strip-eof "^1.0.0" +execa@^4.0.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/execa/-/execa-4.1.0.tgz#4e5491ad1572f2f17a77d388c6c857135b22847a" + integrity sha512-j5W0//W7f8UxAn8hXVnwG8tLwdiUy4FJLcSupCg6maBYZDpyBvTApK7KyuI4bKj8KOh1r2YH+6ucuYtJv1bTZA== + dependencies: + cross-spawn "^7.0.0" + get-stream "^5.0.0" + human-signals "^1.1.1" + is-stream "^2.0.0" + merge-stream "^2.0.0" + npm-run-path "^4.0.0" + onetime "^5.1.0" + signal-exit "^3.0.2" + strip-final-newline "^2.0.0" + exit@^0.1.2: version "0.1.2" resolved "https://registry.yarnpkg.com/exit/-/exit-0.1.2.tgz#0632638f8d877cc82107d30a0fff1a17cba1cd0c" @@ -6761,17 +6876,17 @@ fast-deep-equal@^3.1.1: resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz#3a7d56b559d6cbc3eb512325244e619a65c6c525" integrity sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q== -fast-glob@^3.0.3: - version "3.0.4" - resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.0.4.tgz#d484a41005cb6faeb399b951fd1bd70ddaebb602" - integrity sha512-wkIbV6qg37xTJwqSsdnIphL1e+LaGz4AIQqr00mIubMaEhv1/HEmJ0uuCGZRNRUkZZmOB5mJKO0ZUTVq+SxMQg== +fast-glob@^3.1.1: + version "3.2.4" + resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.2.4.tgz#d20aefbf99579383e7f3cc66529158c9b98554d3" + integrity sha512-kr/Oo6PX51265qeuCYsyGypiO5uJFgBS0jksyG7FUeCyQzNwYnzrNIMR1NXfkZXsMYXYLRAHgISHBz8gQcxKHQ== dependencies: - "@nodelib/fs.stat" "^2.0.1" - "@nodelib/fs.walk" "^1.2.1" - glob-parent "^5.0.0" - is-glob "^4.0.1" - merge2 "^1.2.3" + "@nodelib/fs.stat" "^2.0.2" + "@nodelib/fs.walk" "^1.2.3" + glob-parent "^5.1.0" + merge2 "^1.3.0" micromatch "^4.0.2" + picomatch "^2.2.1" fast-json-stable-stringify@^2.0.0: version "2.1.0" @@ -6950,7 +7065,7 @@ find-up@^3.0.0: dependencies: locate-path "^3.0.0" -find-up@^4.0.0, find-up@^4.1.0: +find-up@^4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/find-up/-/find-up-4.1.0.tgz#97afe7d6cdc0bc5928584b7c8d7b16e8a9aa5d19" integrity sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw== @@ -7123,14 +7238,15 @@ fs-extra@^7.0.0: jsonfile "^4.0.0" universalify "^0.1.0" -fs-extra@^8.0.0: - version "8.1.0" - resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-8.1.0.tgz#49d43c45a88cd9677668cb7be1b46efdb8d2e1c0" - integrity sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g== +fs-extra@^9.0.0: + version "9.0.1" + resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-9.0.1.tgz#910da0062437ba4c39fedd863f1675ccfefcb9fc" + integrity sha512-h2iAoN838FqAFJY2/qVpzFXy+EBxfVE220PalAqQLDVsFOHLJrZvut5puAbCdNv6WJk+B8ihI+k0c7JK5erwqQ== dependencies: + at-least-node "^1.0.0" graceful-fs "^4.2.0" - jsonfile "^4.0.0" - universalify "^0.1.0" + jsonfile "^6.0.1" + universalify "^1.0.0" fs-minipass@^1.2.5: version "1.2.7" @@ -7254,7 +7370,7 @@ gensync@^1.0.0-beta.1: resolved "https://registry.yarnpkg.com/gensync/-/gensync-1.0.0-beta.1.tgz#58f4361ff987e5ff6e1e7a210827aa371eaac269" integrity sha512-r8EC6NO1sngH/zdD9fiRDLdcgnbayXah+mLgManTaIZJqEC1MZstmnox8KpnI2/fxQwrp5OpCOYWLp4rBl4Jcg== -gentle-fs@^2.3.0: +gentle-fs@^2.3.0, gentle-fs@^2.3.1: version "2.3.1" resolved "https://registry.yarnpkg.com/gentle-fs/-/gentle-fs-2.3.1.tgz#11201bf66c18f930ddca72cf69460bdfa05727b1" integrity sha512-OlwBBwqCFPcjm33rF2BjW+Pr6/ll2741l+xooiwTCeaX2CA1ZuclavyMBe0/KlR21/XGsgY6hzEQZ15BdNa13Q== @@ -7415,7 +7531,7 @@ glob-parent@^3.1.0: is-glob "^3.1.0" path-dirname "^1.0.0" -glob-parent@^5.0.0, glob-parent@~5.1.0: +glob-parent@^5.1.0, glob-parent@~5.1.0: version "5.1.1" resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.1.tgz#b6c1ef417c4e5663ea498f1c45afac6916bbc229" integrity sha512-FnI+VGOpnlGHWZxthPGR+QhR78fuiK0sNLkHQv+bL9fQi57lNNdquIbna/WrfROrolq8GK5Ek6BiMwqL/voRYQ== @@ -7504,18 +7620,16 @@ globals@^9.18.0: resolved "https://registry.yarnpkg.com/globals/-/globals-9.18.0.tgz#aa3896b3e69b487f17e31ed2143d69a8e30c2d8a" integrity sha512-S0nG3CLEQiY/ILxqtztTWH/3iRRdyBLw6KMDxnKMchrtbj2OFmehVh0WUCfW3DUrIgx/qFrJPICrq4Z4sTR9UQ== -globby@^10.0.0: - version "10.0.1" - resolved "https://registry.yarnpkg.com/globby/-/globby-10.0.1.tgz#4782c34cb75dd683351335c5829cc3420e606b22" - integrity sha512-sSs4inE1FB2YQiymcmTv6NWENryABjUNPeWhOvmn4SjtKybglsyPZxFB3U1/+L1bYi0rNZDqCLlHyLYDl1Pq5A== +globby@^11.0.0, globby@^11.0.1: + version "11.0.1" + resolved "https://registry.yarnpkg.com/globby/-/globby-11.0.1.tgz#9a2bf107a068f3ffeabc49ad702c79ede8cfd357" + integrity sha512-iH9RmgwCmUJHi2z5o2l3eTtGBtXek1OYlHrbcxOYugyHLmAsZrPj43OtHThd62Buh/Vv6VyCBD2bdyWcGNQqoQ== dependencies: - "@types/glob" "^7.1.1" array-union "^2.1.0" dir-glob "^3.0.1" - fast-glob "^3.0.3" - glob "^7.1.3" - ignore "^5.1.1" - merge2 "^1.2.3" + fast-glob "^3.1.1" + ignore "^5.1.4" + merge2 "^1.3.0" slash "^3.0.0" got@^6.7.1: @@ -7598,16 +7712,16 @@ has-flag@^1.0.0: resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-1.0.0.tgz#9d9e793165ce017a00f00418c43f942a7b1d11fa" integrity sha1-nZ55MWXOAXoA8AQYxD+UKnsdEfo= -has-flag@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-2.0.0.tgz#e8207af1cc7b30d446cc70b734b5e8be18f88d51" - integrity sha1-6CB68cx7MNRGzHC3NLXovhj4jVE= - has-flag@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd" integrity sha1-tdRU3CGZriJWmfNGfloH87lVuv0= +has-flag@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-4.0.0.tgz#944771fd9c81c81265c4d6941860da06bb59479b" + integrity sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ== + has-symbols@^1.0.0, has-symbols@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.0.1.tgz#9f5214758a44196c406d9bd76cebf81ec2dd31e8" @@ -7778,6 +7892,13 @@ hosted-git-info@^2.1.4, hosted-git-info@^2.7.1, hosted-git-info@^2.8.8: resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.8.8.tgz#7539bd4bc1e0e0a895815a2e0262420b12858488" integrity sha512-f/wzC2QaWBs7t9IYqB4T3sR1xviIViXJRJTWBlx2Gf3g0Xi5vI7Yy4koXQ1c9OYDGHN9sBy1DQ2AB8fqZBWhUg== +hosted-git-info@^3.0.0, hosted-git-info@^3.0.6: + version "3.0.7" + resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-3.0.7.tgz#a30727385ea85acfcee94e0aad9e368c792e036c" + integrity sha512-fWqc0IcuXs+BmE9orLDyVykAG9GJtGLGuZAAqgcckPgv5xad4AcXGIv8galtQvlwutxSlaMcdw7BUtq2EIvqCQ== + dependencies: + lru-cache "^6.0.0" + hsl-regex@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/hsl-regex/-/hsl-regex-1.0.0.tgz#d49330c789ed819e276a4c0d272dffa30b18fe6e" @@ -7858,6 +7979,15 @@ http-proxy-agent@^2.1.0: agent-base "4" debug "3.1.0" +http-proxy-agent@^4.0.0: + version "4.0.1" + resolved "https://registry.yarnpkg.com/http-proxy-agent/-/http-proxy-agent-4.0.1.tgz#8a8c8ef7f5932ccf953c296ca8291b95aa74aa3a" + integrity sha512-k0zdNgqWTGA6aeIRVpvfVob4fL52dTfaehylg0Y4UvSySvOq/Y+BOyPrgpUrA7HylqvU8vIZGsRuXmspskV0Tg== + dependencies: + "@tootallnate/once" "1" + agent-base "6" + debug "4" + http-signature@~1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/http-signature/-/http-signature-1.2.0.tgz#9aecd925114772f3d95b65a60abb8f7c18fbace1" @@ -7872,7 +8002,7 @@ https-browserify@^1.0.0: resolved "https://registry.yarnpkg.com/https-browserify/-/https-browserify-1.0.0.tgz#ec06c10e0a34c0f2faf199f7fd7fc78fffd03c73" integrity sha1-7AbBDgo0wPL68Zn3/X/Hj//QPHM= -https-proxy-agent@^2.2.1, https-proxy-agent@^2.2.3: +https-proxy-agent@^2.2.3: version "2.2.4" resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-2.2.4.tgz#4ee7a737abd92678a293d9b34a1af4d0d08c787b" integrity sha512-OmvfoQ53WLjtA9HeYP9RNrWMJzzAz1JGaSFr1nijg0PVR1JaD/xbJq1mdEIIlxGpXp9eSe/O2LgU9DJmTPd0Eg== @@ -7880,6 +8010,19 @@ https-proxy-agent@^2.2.1, https-proxy-agent@^2.2.3: agent-base "^4.3.0" debug "^3.1.0" +https-proxy-agent@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-5.0.0.tgz#e2a90542abb68a762e0a0850f6c9edadfd8506b2" + integrity sha512-EkYm5BcKUGiduxzSt3Eppko+PiNWNEpa4ySk9vTC6wDsQJW9rHSa+UhGNJoRYp7bz6Ht1eaRIa6QaJqO5rCFbA== + dependencies: + agent-base "6" + debug "4" + +human-signals@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-1.1.1.tgz#c5b1cd14f50aeae09ab6c59fe63ba3395fe4dfa3" + integrity sha512-SEQu7vl8KjNL2eoGBLF3+wAjpsNfA9XMlXAYj/3EdaNfAlxKthD1xjEQfGOUhllCGGJVNY34bRr6lPINhNjyZw== + humanize-ms@^1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/humanize-ms/-/humanize-ms-1.2.1.tgz#c46e3159a293f6b896da29316d8b6fe8bb79bbed" @@ -7931,11 +8074,16 @@ ignore@^4.0.6: resolved "https://registry.yarnpkg.com/ignore/-/ignore-4.0.6.tgz#750e3db5862087b4737ebac8207ffd1ef27b25fc" integrity sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg== -ignore@^5.0.2, ignore@^5.1.1, ignore@^5.1.2: +ignore@^5.0.2, ignore@^5.1.2: version "5.1.2" resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.1.2.tgz#e28e584d43ad7e92f96995019cc43b9e1ac49558" integrity sha512-vdqWBp7MyzdmHkkRWV5nY+PfGRbYbahfuvsBCh277tq+w9zyNi7h5CYJCK0kmzti9kU+O/cB7sE8HvKv6aXAKQ== +ignore@^5.1.4: + version "5.1.8" + resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.1.8.tgz#f150a8b50a34289b33e22f5889abd4d8016f0e57" + integrity sha512-BMpfD7PpiETpBl/A6S498BaIJ6Y/ABT93ETbby2fP00v4EbvPBXWEoaR1UBPKs3iR53pJY7EtZk5KACI57i1Uw== + immutability-helper@^2.1.1: version "2.9.1" resolved "https://registry.yarnpkg.com/immutability-helper/-/immutability-helper-2.9.1.tgz#71c423ba387e67b6c6ceba0650572f2a2a6727df" @@ -7984,7 +8132,7 @@ import-local@^2.0.0: pkg-dir "^3.0.0" resolve-cwd "^2.0.0" -imurmurhash@^0.1.4: +imurmurhash@*, imurmurhash@^0.1.4: version "0.1.4" resolved "https://registry.yarnpkg.com/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea" integrity sha1-khi5srkoojixPcT7a21XbyMUU+o= @@ -8306,6 +8454,13 @@ is-color-stop@^1.0.0: rgb-regex "^1.0.1" rgba-regex "^1.0.0" +is-core-module@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.1.0.tgz#a4cc031d9b1aca63eecbd18a650e13cb4eeab946" + integrity sha512-YcV7BgVMRFRua2FqQzKtTDMz8iCuLEyGKjr70q8Zm1yy2qKcurbFEd79PAdHV77oL3NrAaOVQIbMmiHQCHB7ZA== + dependencies: + has "^1.0.3" + is-data-descriptor@^0.1.4: version "0.1.4" resolved "https://registry.yarnpkg.com/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz#0b5ee648388e2c860282e793f1856fec3f301b56" @@ -8494,6 +8649,11 @@ is-obj@^1.0.0: resolved "https://registry.yarnpkg.com/is-obj/-/is-obj-1.0.1.tgz#3e4729ac1f5fde025cd7d83a896dab9f4f67db0f" integrity sha1-PkcprB9f3gJc19g6iW2rn09n2w8= +is-path-cwd@^2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/is-path-cwd/-/is-path-cwd-2.2.0.tgz#67d43b82664a7b5191fd9119127eb300048a9fdb" + integrity sha512-w942bTcih8fdJPJmQHFzkS76NEP8Kzzvmw92cXsazb8intwLqPibPPdXf4ANdKV3rYMuuQYGIWtvz9JilB3NFQ== + is-path-inside@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/is-path-inside/-/is-path-inside-1.0.1.tgz#8ef5b7de50437a3fdca6b4e865ef7aa55cb48036" @@ -8501,6 +8661,11 @@ is-path-inside@^1.0.0: dependencies: path-is-inside "^1.0.1" +is-path-inside@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/is-path-inside/-/is-path-inside-3.0.2.tgz#f5220fc82a3e233757291dddc9c5877f2a1f3017" + integrity sha512-/2UGPSgmtqwo1ktx8NDHjuPwZWmHhO+gj0f93EkhLB5RgW9RZevWYYlIkS6zePc6U2WpOdQYIwHe9YC4DWEBVg== + is-plain-obj@^1.0.0, is-plain-obj@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/is-plain-obj/-/is-plain-obj-1.1.0.tgz#71a50c8429dfca773c92a390a4a03b39fcd51d3e" @@ -8513,12 +8678,10 @@ is-plain-object@^2.0.3, is-plain-object@^2.0.4: dependencies: isobject "^3.0.1" -is-plain-object@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/is-plain-object/-/is-plain-object-3.0.0.tgz#47bfc5da1b5d50d64110806c199359482e75a928" - integrity sha512-tZIpofR+P05k8Aocp7UI/2UTa9lTJSebCXpFFoR9aibpokDj/uXBsJ8luUu0tTVYKkMU6URDUuOfJZ7koewXvg== - dependencies: - isobject "^4.0.0" +is-plain-object@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/is-plain-object/-/is-plain-object-5.0.0.tgz#4427f50ab3429e9025ea7d52e9043a9ef4159344" + integrity sha512-VRSzKkbMm5jMDoKLbltAkFQ5Qr7VDiTFGXxYFXXowVj387GeGNOCsOH6Msy00SGZ3Fp84b1Naa1psqgcCIEP5Q== is-posix-bracket@^0.1.0: version "0.1.1" @@ -8576,6 +8739,11 @@ is-stream@^1.0.0, is-stream@^1.0.1, is-stream@^1.1.0, is-stream@~1.1.0: resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-1.1.0.tgz#12d4a3dd4e68e0b79ceb8dbc84173ae80d91ca44" integrity sha1-EtSj3U5o4Lec6428hBc66A2RykQ= +is-stream@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-2.0.0.tgz#bde9c32680d6fae04129d6ac9d921ce7815f78e3" + integrity sha512-XCoy+WlUr7d1+Z8GgSuXmpuUFC9fOhRXglJMx+dwLKTkL44Cjd4W1Z5P+BQZpr+cR93aGP4S/s7Ftw6Nd/kiEw== + is-string@^1.0.4: version "1.0.4" resolved "https://registry.yarnpkg.com/is-string/-/is-string-1.0.4.tgz#cc3a9b69857d621e963725a24caeec873b826e64" @@ -8607,7 +8775,7 @@ is-symbol@^1.0.2: dependencies: has-symbols "^1.0.1" -is-text-path@^1.0.0: +is-text-path@^1.0.0, is-text-path@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/is-text-path/-/is-text-path-1.0.1.tgz#4e1aa0fb51bfbcb3e92688001397202c1775b66e" integrity sha1-Thqg+1G/vLPpJogAE5cgLBd1tm4= @@ -8688,11 +8856,6 @@ isobject@^3.0.0, isobject@^3.0.1: resolved "https://registry.yarnpkg.com/isobject/-/isobject-3.0.1.tgz#4e431e92b11a9731636aa1f9c8d1ccbcfdab78df" integrity sha1-TkMekrEalzFjaqH5yNHMvP2reN8= -isobject@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/isobject/-/isobject-4.0.0.tgz#3f1c9155e73b192022a80819bacd0343711697b0" - integrity sha512-S/2fF5wH8SJA/kmwr6HYhK/RI/OkhD84k8ntalo0iJjZikgq1XFvR5M8NPT1x5F7fBwCG3qHfnzeP/Vh/ZxCUA== - isomorphic-fetch@^2.1.1, isomorphic-fetch@^2.2.1: version "2.2.1" resolved "https://registry.yarnpkg.com/isomorphic-fetch/-/isomorphic-fetch-2.2.1.tgz#611ae1acf14f5e81f729507472819fe9733558a9" @@ -8715,10 +8878,10 @@ isstream@~0.1.2: resolved "https://registry.yarnpkg.com/isstream/-/isstream-0.1.2.tgz#47e63f7af55afa6f92e1500e690eb8b8529c099a" integrity sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo= -issue-parser@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/issue-parser/-/issue-parser-4.0.0.tgz#397817323abbb70c7c29cea2ff62448cf83b686c" - integrity sha512-1RmmAXHl5+cqTZ9dRr861xWy0Gkc9TWTEklgjKv+nhlB1dY1NmGBV8b20jTWRL5cPGpOIXkz84kEcDBM8Nc0cw== +issue-parser@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/issue-parser/-/issue-parser-6.0.0.tgz#b1edd06315d4f2044a9755daf85fdafde9b4014a" + integrity sha512-zKa/Dxq2lGsBIXQ7CUZWTHfvxPC2ej0KfO7fIPqLlHB9J2hJ7rGhZ5rilhuufylr4RXYPzJUeFjKxz305OsNlA== dependencies: lodash.capitalize "^4.2.1" lodash.escaperegexp "^4.1.2" @@ -9294,6 +9457,15 @@ jsonfile@^4.0.0: optionalDependencies: graceful-fs "^4.1.6" +jsonfile@^6.0.1: + version "6.1.0" + resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-6.1.0.tgz#bc55b2634793c679ec6403094eb13698a6ec0aae" + integrity sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ== + dependencies: + universalify "^2.0.0" + optionalDependencies: + graceful-fs "^4.1.6" + jsonify@~0.0.0: version "0.0.0" resolved "https://registry.yarnpkg.com/jsonify/-/jsonify-0.0.0.tgz#2c74b6ee41d93ca51b7b5aaee8f503631d252a73" @@ -9448,7 +9620,7 @@ levn@^0.3.0, levn@~0.3.0: prelude-ls "~1.1.2" type-check "~0.3.2" -libcipm@^4.0.7: +libcipm@^4.0.8: version "4.0.8" resolved "https://registry.yarnpkg.com/libcipm/-/libcipm-4.0.8.tgz#dcea4919e10dfbce420327e63901613b9141bc89" integrity sha512-IN3hh2yDJQtZZ5paSV4fbvJg4aHxCCg5tcZID/dSVlTuUiWktsgaldVljJv6Z5OUlYspx6xQkbR0efNodnIrOA== @@ -9568,10 +9740,10 @@ libnpmteam@^1.0.2: get-stream "^4.0.0" npm-registry-fetch "^4.0.0" -libnpx@^10.2.2: - version "10.2.3" - resolved "https://registry.yarnpkg.com/libnpx/-/libnpx-10.2.3.tgz#d5e01f12d383ffca9a947807ca6a8f587d38fe2c" - integrity sha512-bCvdARu55fLQBhMfcYGF0GznF1kB2sqxq/9zKZ3652M8DDFWpVpCnpgzjzn0yWMDMez5ZGMBiX24yR11uEYZVQ== +libnpx@^10.2.4: + version "10.2.4" + resolved "https://registry.yarnpkg.com/libnpx/-/libnpx-10.2.4.tgz#ef0e3258e29aef2ec7ee3276115e20e67f67d4ee" + integrity sha512-BPc0D1cOjBeS8VIBKUu5F80s6njm0wbVt7CsGMrIcJ+SI7pi7V0uVPGpEMH9H5L8csOcclTxAXFE2VAsJXUhfA== dependencies: dotenv "^5.0.1" npm-package-arg "^6.0.0" @@ -9580,7 +9752,7 @@ libnpx@^10.2.2: update-notifier "^2.3.0" which "^1.3.0" y18n "^4.0.0" - yargs "^11.0.0" + yargs "^14.2.3" libphonenumber-js@^1.8.1: version "1.8.4" @@ -9704,6 +9876,11 @@ lodash-es@^4.17.11, lodash-es@^4.17.14, lodash-es@^4.17.15: resolved "https://registry.yarnpkg.com/lodash-es/-/lodash-es-4.17.15.tgz#21bd96839354412f23d7a10340e5eac6ee455d78" integrity sha512-rlrc3yU3+JNOpZ9zj5pQtxnx2THmvRykwL4Xlxoa8I9lHBlVbbyPhgyPMioxVZ4NqyxaVVtaJnzsyOidQIhyyQ== +lodash._baseindexof@*: + version "3.1.0" + resolved "https://registry.yarnpkg.com/lodash._baseindexof/-/lodash._baseindexof-3.1.0.tgz#fe52b53a1c6761e42618d654e4a25789ed61822c" + integrity sha1-/lK1OhxnYeQmGNZU5KJXie1hgiw= + lodash._baseuniq@~4.6.0: version "4.6.0" resolved "https://registry.yarnpkg.com/lodash._baseuniq/-/lodash._baseuniq-4.6.0.tgz#0ebb44e456814af7905c6212fa2c9b2d51b841e8" @@ -9712,6 +9889,23 @@ lodash._baseuniq@~4.6.0: lodash._createset "~4.0.0" lodash._root "~3.0.0" +lodash._bindcallback@*: + version "3.0.1" + resolved "https://registry.yarnpkg.com/lodash._bindcallback/-/lodash._bindcallback-3.0.1.tgz#e531c27644cf8b57a99e17ed95b35c748789392e" + integrity sha1-5THCdkTPi1epnhftlbNcdIeJOS4= + +lodash._cacheindexof@*: + version "3.0.2" + resolved "https://registry.yarnpkg.com/lodash._cacheindexof/-/lodash._cacheindexof-3.0.2.tgz#3dc69ac82498d2ee5e3ce56091bafd2adc7bde92" + integrity sha1-PcaayCSY0u5ePOVgkbr9Ktx73pI= + +lodash._createcache@*: + version "3.1.2" + resolved "https://registry.yarnpkg.com/lodash._createcache/-/lodash._createcache-3.1.2.tgz#56d6a064017625e79ebca6b8018e17440bdcf093" + integrity sha1-VtagZAF2JeeevKa4AY4XRAvc8JM= + dependencies: + lodash._getnative "^3.0.0" + lodash._createcompounder@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/lodash._createcompounder/-/lodash._createcompounder-3.0.0.tgz#5dd2cb55372d6e70e0e2392fb2304d6631091075" @@ -9725,6 +9919,11 @@ lodash._createset@~4.0.0: resolved "https://registry.yarnpkg.com/lodash._createset/-/lodash._createset-4.0.3.tgz#0f4659fbb09d75194fa9e2b88a6644d363c9fe26" integrity sha1-D0ZZ+7CddRlPqeK4imZE02PJ/iY= +lodash._getnative@*, lodash._getnative@^3.0.0: + version "3.9.1" + resolved "https://registry.yarnpkg.com/lodash._getnative/-/lodash._getnative-3.9.1.tgz#570bc7dede46d61cdcde687d65d3eecbaa3aaff5" + integrity sha1-VwvH3t5G1hzc3mh9ZdPuy6o6r/U= + lodash._reinterpolate@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/lodash._reinterpolate/-/lodash._reinterpolate-3.0.0.tgz#0ccf2d89166af03b3663c796538b75ac6e114d9d" @@ -9844,10 +10043,10 @@ lodash.omit@^4.0.1: resolved "https://registry.yarnpkg.com/lodash.omit/-/lodash.omit-4.5.0.tgz#6eb19ae5a1ee1dd9df0b969e66ce0b7fa30b5e60" integrity sha1-brGa5aHuHdnfC5aeZs4Lf6MLXmA= -lodash.set@^4.3.2: - version "4.3.2" - resolved "https://registry.yarnpkg.com/lodash.set/-/lodash.set-4.3.2.tgz#d8757b1da807dde24816b0d6a84bea1a76230b23" - integrity sha1-2HV7HagH3eJIFrDWqEvqGnYjCyM= +lodash.restparam@*: + version "3.6.1" + resolved "https://registry.yarnpkg.com/lodash.restparam/-/lodash.restparam-3.6.1.tgz#936a4e309ef330a7645ed4145986c85ae5b20805" + integrity sha1-k2pOMJ7zMKdkXtQUWYbIWuWyCAU= lodash.sortby@^4.7.0: version "4.7.0" @@ -9986,10 +10185,12 @@ lru-cache@^5.1.1: dependencies: yallist "^3.0.2" -macos-release@^2.2.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/macos-release/-/macos-release-2.3.0.tgz#eb1930b036c0800adebccd5f17bc4c12de8bb71f" - integrity sha512-OHhSbtcviqMPt7yfw5ef5aghS2jzFVKEFyCJndQt2YpSQ9qRVSEv2axSJI1paVThEu+FFGs584h/1YhxjVqajA== +lru-cache@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-6.0.0.tgz#6d6fe6570ebd96aaf90fcad1dafa3b2566db3a94" + integrity sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA== + dependencies: + yallist "^4.0.0" make-dir@^1.0.0: version "1.3.0" @@ -10088,22 +10289,22 @@ markdown-table@^1.1.0: resolved "https://registry.yarnpkg.com/markdown-table/-/markdown-table-1.1.3.tgz#9fcb69bcfdb8717bfd0398c6ec2d93036ef8de60" integrity sha512-1RUZVgQlpJSPWYbFSpmudq5nHY1doEIv89gBtF0s4gW1GF2XorxcA/70M5vq7rLv0a6mhOUccRsqkwhwLCIQ2Q== -marked-terminal@^3.2.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/marked-terminal/-/marked-terminal-3.2.0.tgz#3fc91d54569332bcf096292af178d82219000474" - integrity sha512-Yr1yVS0BbDG55vx7be1D0mdv+jGs9AW563o/Tt/7FTsId2J0yqhrTeXAqq/Q0DyyXltIn6CSxzesQuFqXgafjQ== +marked-terminal@^4.0.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/marked-terminal/-/marked-terminal-4.1.0.tgz#01087372d3636dc7cb286475a1d6147187f500e0" + integrity sha512-5KllfAOW02WS6hLRQ7cNvGOxvKW1BKuXELH4EtbWfyWgxQhROoMxEvuQ/3fTgkNjledR0J48F4HbapvYp1zWkQ== dependencies: - ansi-escapes "^3.1.0" + ansi-escapes "^4.3.1" cardinal "^2.1.1" - chalk "^2.4.1" + chalk "^4.0.0" cli-table "^0.3.1" - node-emoji "^1.4.1" - supports-hyperlinks "^1.0.1" + node-emoji "^1.10.0" + supports-hyperlinks "^2.1.0" -marked@^0.6.0: - version "0.6.3" - resolved "https://registry.yarnpkg.com/marked/-/marked-0.6.3.tgz#79babad78af638ba4d522a9e715cdfdd2429e946" - integrity sha512-Fqa7eq+UaxfMriqzYLayfqAE40WN03jf+zHjT18/uXNuzjq3TY0XTbrAoPeqSJrAmPz11VuUA+kBPYOhHt9oOQ== +marked@^1.0.0: + version "1.2.5" + resolved "https://registry.yarnpkg.com/marked/-/marked-1.2.5.tgz#a44b31f2a0b8b5bfd610f00d55d1952d1ac1dfdb" + integrity sha512-2AlqgYnVPOc9WDyWu7S5DJaEZsfk6dNh/neatQ3IHUW4QLutM/VPSH9lG7bif+XjFWc9K9XR3QvR+fXuECmfdA== mastarm@^5.1.3: version "5.1.3" @@ -10276,10 +10477,10 @@ mdurl@^1.0.1: resolved "https://registry.yarnpkg.com/mdurl/-/mdurl-1.0.1.tgz#fe85b2ec75a59037f2adfec100fd6c601761152e" integrity sha1-/oWy7HWlkDfyrf7BAP1sYBdhFS4= -meant@~1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/meant/-/meant-1.0.1.tgz#66044fea2f23230ec806fb515efea29c44d2115d" - integrity sha512-UakVLFjKkbbUwNWJ2frVLnnAtbb7D7DsloxRd3s/gDpI8rdv8W5Hp3NaDb+POBI1fQdeussER6NB8vpcRURvlg== +meant@^1.0.2: + version "1.0.3" + resolved "https://registry.yarnpkg.com/meant/-/meant-1.0.3.tgz#67769af9de1d158773e928ae82c456114903554c" + integrity sha512-88ZRGcNxAq4EH38cQ4D85PM57pikCwS8Z99EWHODxN7KBY+UuPiqzRTtZzS8KTXO/ywSWbdjjJST2Hly/EQxLw== measure-text@^0.0.4: version "0.0.4" @@ -10371,6 +10572,23 @@ meow@^6.1.1: type-fest "^0.13.1" yargs-parser "^18.1.3" +meow@^8.0.0: + version "8.0.0" + resolved "https://registry.yarnpkg.com/meow/-/meow-8.0.0.tgz#1aa10ee61046719e334ffdc038bb5069250ec99a" + integrity sha512-nbsTRz2fwniJBFgUkcdISq8y/q9n9VbiHYbfwklFh5V4V2uAcxtKQkDc0yCLPM/kP0d+inZBewn3zJqewHE7kg== + dependencies: + "@types/minimist" "^1.2.0" + camelcase-keys "^6.2.2" + decamelize-keys "^1.1.0" + hard-rejection "^2.1.0" + minimist-options "4.1.0" + normalize-package-data "^3.0.0" + read-pkg-up "^7.0.1" + redent "^3.0.0" + trim-newlines "^3.0.0" + type-fest "^0.18.0" + yargs-parser "^20.2.3" + merge-stream@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/merge-stream/-/merge-stream-1.0.1.tgz#4041202d508a342ba00174008df0c251b8c135e1" @@ -10378,10 +10596,15 @@ merge-stream@^1.0.1: dependencies: readable-stream "^2.0.1" -merge2@^1.2.3: - version "1.2.3" - resolved "https://registry.yarnpkg.com/merge2/-/merge2-1.2.3.tgz#7ee99dbd69bb6481689253f018488a1b902b0ed5" - integrity sha512-gdUU1Fwj5ep4kplwcmftruWofEFt6lfpkkr3h860CXbAB9c3hGb55EOL2ali0Td5oebvW0E1+3Sr+Ur7XfKpRA== +merge-stream@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/merge-stream/-/merge-stream-2.0.0.tgz#52823629a14dd00c9770fb6ad47dc6310f2c1f60" + integrity sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w== + +merge2@^1.3.0: + version "1.4.1" + resolved "https://registry.yarnpkg.com/merge2/-/merge2-1.4.1.tgz#4368892f885e907455a6fd7dc55c0c9d404990ae" + integrity sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg== merge@^1.2.1: version "1.2.1" @@ -10500,7 +10723,7 @@ mimic-fn@^1.0.0: resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-1.2.0.tgz#820c86a39334640e99516928bd03fca88057d022" integrity sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ== -mimic-fn@^2.0.0: +mimic-fn@^2.0.0, mimic-fn@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-2.1.0.tgz#7ed2c2ccccaf84d3ffcb7a69b57711fc2083401b" integrity sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg== @@ -10536,15 +10759,7 @@ minimatch@^3.0.2, minimatch@^3.0.4: dependencies: brace-expansion "^1.1.7" -minimist-options@^3.0.1: - version "3.0.2" - resolved "https://registry.yarnpkg.com/minimist-options/-/minimist-options-3.0.2.tgz#fba4c8191339e13ecf4d61beb03f070103f3d954" - integrity sha512-FyBrT/d0d4+uiZRbqznPXqw3IpZZG3gl3wKWiX784FycUKVwBt0uLBFkQrtE4tZOrgo78nZp2jnKz3L65T5LdQ== - dependencies: - arrify "^1.0.1" - is-plain-obj "^1.1.0" - -minimist-options@^4.0.2: +minimist-options@4.1.0, minimist-options@^4.0.2: version "4.1.0" resolved "https://registry.yarnpkg.com/minimist-options/-/minimist-options-4.1.0.tgz#c0655713c53a8a2ebd77ffa247d342c40f010619" integrity sha512-Q4r8ghd80yhO/0j1O3B2BjweX3fiHg9cdOwjJd2J76Q135c+NDxGCqdYKQ1SKBuFfgWbAUzBfvYjPUEeNgqN1A== @@ -10553,6 +10768,14 @@ minimist-options@^4.0.2: is-plain-obj "^1.1.0" kind-of "^6.0.3" +minimist-options@^3.0.1: + version "3.0.2" + resolved "https://registry.yarnpkg.com/minimist-options/-/minimist-options-3.0.2.tgz#fba4c8191339e13ecf4d61beb03f070103f3d954" + integrity sha512-FyBrT/d0d4+uiZRbqznPXqw3IpZZG3gl3wKWiX784FycUKVwBt0uLBFkQrtE4tZOrgo78nZp2jnKz3L65T5LdQ== + dependencies: + arrify "^1.0.1" + is-plain-obj "^1.1.0" + minimist@0.0.5: version "0.0.5" resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.5.tgz#d7aa327bcecf518f9106ac6b8f003fa3bcea8566" @@ -10712,7 +10935,7 @@ ms@2.1.1: resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.1.tgz#30a5864eb3ebb0a66f2ebe6d727af06a09d86e0a" integrity sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg== -ms@^2.0.0, ms@^2.1.1: +ms@2.1.2, ms@^2.0.0, ms@^2.1.1: version "2.1.2" resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009" integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== @@ -10804,7 +11027,7 @@ nock@^9.0.9: qs "^6.5.1" semver "^5.5.0" -node-emoji@^1.10.0, node-emoji@^1.4.1: +node-emoji@^1.10.0: version "1.10.0" resolved "https://registry.yarnpkg.com/node-emoji/-/node-emoji-1.10.0.tgz#8886abd25d9c7bb61802a658523d1f8d2a89b2da" integrity sha512-Yt3384If5H6BYGVHiHwTL+99OzJKHhgp82S8/dktEK73T26BazdgZ4JZh92xSVtGNJvz9UbXdNAc5hcrXV42vw== @@ -10828,10 +11051,10 @@ node-fetch@^1.0.1: encoding "^0.1.11" is-stream "^1.0.1" -node-fetch@^2.3.0: - version "2.6.0" - resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.0.tgz#e633456386d4aa55863f676a7ab0daa8fdecb0fd" - integrity sha512-8dG4H5ujfvFiqDmVu9fQ5bOHUC15JMjMY/Zumv26oOvvVJjM67KF8koCWIabKQ1GJIa9r2mMZscBq/TbdOcmNA== +node-fetch@^2.6.1: + version "2.6.1" + resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.1.tgz#045bd323631f76ed2e2b55573394416b639a0052" + integrity sha512-V4aYg89jEoVRxRb2fJdAg8FHvI7cEyYdVAh94HH0UIK8oJxUfkjlDQN9RbMx+bEjP7+ggMiFRprSti032Oipxw== node-gyp@^5.0.2, node-gyp@^5.1.0: version "5.1.1" @@ -10939,6 +11162,16 @@ normalize-package-data@^2.0.0, normalize-package-data@^2.3.2, normalize-package- semver "2 || 3 || 4 || 5" validate-npm-package-license "^3.0.1" +normalize-package-data@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/normalize-package-data/-/normalize-package-data-3.0.0.tgz#1f8a7c423b3d2e85eb36985eaf81de381d01301a" + integrity sha512-6lUjEI0d3v6kFrtgA/lOx4zHCWULXsFNIjHolnZCKCTLA6m/G625cdn3O7eNmT0iD3jfo6HZ9cdImGZwf21prw== + dependencies: + hosted-git-info "^3.0.6" + resolve "^1.17.0" + semver "^7.3.2" + validate-npm-package-license "^3.0.1" + normalize-path@^2.0.0, normalize-path@^2.0.1, normalize-path@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-2.1.1.tgz#1ab28b556e198363a8c1a6f7e6fa20137fe6aed9" @@ -10971,10 +11204,10 @@ normalize-url@^3.0.0, normalize-url@^3.3.0: resolved "https://registry.yarnpkg.com/normalize-url/-/normalize-url-3.3.0.tgz#b2e1c4dc4f7c6d57743df733a4f5978d18650559" integrity sha512-U+JJi7duF1o+u2pynbp2zXDW2/PADgC30f0GsHZtRh+HOcXHnw137TrNlyxxRvWW5fjKd3bcLHPxofWuCjaeZg== -normalize-url@^4.0.0: - version "4.3.0" - resolved "https://registry.yarnpkg.com/normalize-url/-/normalize-url-4.3.0.tgz#9c49e10fc1876aeb76dba88bf1b2b5d9fa57b2ee" - integrity sha512-0NLtR71o4k6GLP+mr6Ty34c5GA6CMoEsncKJxvQd8NzPxaHRJNnb5gZE8R1XF4CPIS7QPHLJ74IFszwtNVAHVQ== +normalize-url@^5.0.0: + version "5.3.0" + resolved "https://registry.yarnpkg.com/normalize-url/-/normalize-url-5.3.0.tgz#8959b3cdaa295b61592c1f245dded34b117618dd" + integrity sha512-9/nOVLYYe/dO/eJeQUNaGUF4m4Z5E7cb9oNTKabH+bNf19mqj60txTcveQxL0GlcWLXCxkOu2/LwL8oW0idIDA== now-and-later@^2.0.0: version "2.0.1" @@ -10983,7 +11216,7 @@ now-and-later@^2.0.0: dependencies: once "^1.3.2" -npm-audit-report@^1.3.2: +npm-audit-report@^1.3.3: version "1.3.3" resolved "https://registry.yarnpkg.com/npm-audit-report/-/npm-audit-report-1.3.3.tgz#8226deeb253b55176ed147592a3995442f2179ed" integrity sha512-8nH/JjsFfAWMvn474HB9mpmMjrnKb1Hx/oTAdjv4PT9iZBvBxiZ+wtDUapHCJwLqYGQVPaAfs+vL5+5k9QndXw== @@ -11010,7 +11243,7 @@ npm-install-checks@^3.0.2: dependencies: semver "^2.3.0 || 3.x || 4 || 5" -npm-lifecycle@^3.0.0, npm-lifecycle@^3.1.4: +npm-lifecycle@^3.0.0, npm-lifecycle@^3.1.5: version "3.1.5" resolved "https://registry.yarnpkg.com/npm-lifecycle/-/npm-lifecycle-3.1.5.tgz#9882d3642b8c82c815782a12e6a1bfeed0026309" integrity sha512-lDLVkjfZmvmfvpvBzA4vzee9cn+Me4orq0QF8glbswJVEbIcSNWib7qGOffolysc3teCqbbPZZkzbr3GQZTL1g== @@ -11071,7 +11304,7 @@ npm-profile@^4.0.2, npm-profile@^4.0.4: figgy-pudding "^3.4.1" npm-registry-fetch "^4.0.0" -npm-registry-fetch@^4.0.0, npm-registry-fetch@^4.0.5: +npm-registry-fetch@^4.0.0: version "4.0.5" resolved "https://registry.yarnpkg.com/npm-registry-fetch/-/npm-registry-fetch-4.0.5.tgz#cb87cf7f25bfb048d6c3ee19d115bebf93ea5bfa" integrity sha512-yQ0/U4fYpCCqmueB2g8sc+89ckQ3eXpmU4+Yi2j5o/r0WkKvE2+Y0tK3DEILAtn2UaQTkjTHxIXe2/CSdit+/Q== @@ -11084,6 +11317,19 @@ npm-registry-fetch@^4.0.0, npm-registry-fetch@^4.0.5: npm-package-arg "^6.1.0" safe-buffer "^5.2.0" +npm-registry-fetch@^4.0.7: + version "4.0.7" + resolved "https://registry.yarnpkg.com/npm-registry-fetch/-/npm-registry-fetch-4.0.7.tgz#57951bf6541e0246b34c9f9a38ab73607c9449d7" + integrity sha512-cny9v0+Mq6Tjz+e0erFAB+RYJ/AVGzkjnISiobqP8OWj9c9FLoZZu8/SPSKJWE17F1tk4018wfjV+ZbIbqC7fQ== + dependencies: + JSONStream "^1.3.4" + bluebird "^3.5.1" + figgy-pudding "^3.4.1" + lru-cache "^5.1.1" + make-fetch-happen "^5.0.0" + npm-package-arg "^6.1.0" + safe-buffer "^5.2.0" + npm-run-path@^2.0.0: version "2.0.2" resolved "https://registry.yarnpkg.com/npm-run-path/-/npm-run-path-2.0.2.tgz#35a9232dfa35d7067b4cb2ddf2357b1871536c5f" @@ -11091,15 +11337,22 @@ npm-run-path@^2.0.0: dependencies: path-key "^2.0.0" +npm-run-path@^4.0.0: + version "4.0.1" + resolved "https://registry.yarnpkg.com/npm-run-path/-/npm-run-path-4.0.1.tgz#b7ecd1e5ed53da8e37a55e1c2269e0b97ed748ea" + integrity sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw== + dependencies: + path-key "^3.0.0" + npm-user-validate@~1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/npm-user-validate/-/npm-user-validate-1.0.1.tgz#31428fc5475fe8416023f178c0ab47935ad8c561" integrity sha512-uQwcd/tY+h1jnEaze6cdX/LrhWhoBxfSknxentoqmIuStxUExxjWd3ULMLFPiFUrZKbOVMowH6Jq2FRWfmhcEw== -npm@^6.8.0: - version "6.14.6" - resolved "https://registry.yarnpkg.com/npm/-/npm-6.14.6.tgz#1a81ce1fac2bf5457dbf6342ceed503627ff228f" - integrity sha512-axnz6iHFK6WPE0js/+mRp+4IOwpHn5tJEw5KB6FiCU764zmffrhsYHbSHi2kKqNkRBt53XasXjngZfBD3FQzrQ== +npm@^6.14.8: + version "6.14.8" + resolved "https://registry.yarnpkg.com/npm/-/npm-6.14.8.tgz#64ef754345639bc035982ec3f609353c8539033c" + integrity sha512-HBZVBMYs5blsj94GTeQZel7s9odVuuSUHy1+AlZh7rPVux1os2ashvEGLy/STNK7vUjbrCg5Kq9/GXisJgdf6A== dependencies: JSONStream "^1.3.5" abbrev "~1.1.1" @@ -11107,7 +11360,7 @@ npm@^6.8.0: ansistyles "~0.1.3" aproba "^2.0.0" archy "~1.0.0" - bin-links "^1.1.7" + bin-links "^1.1.8" bluebird "^3.5.5" byte-size "^5.0.1" cacache "^12.0.3" @@ -11119,6 +11372,7 @@ npm@^6.8.0: cmd-shim "^3.0.3" columnify "~1.5.4" config-chain "^1.1.12" + debuglog "*" detect-indent "~5.0.0" detect-newline "^2.1.0" dezalgo "~1.0.3" @@ -11127,12 +11381,13 @@ npm@^6.8.0: find-npm-prefix "^1.0.2" fs-vacuum "~1.2.10" fs-write-stream-atomic "~1.0.10" - gentle-fs "^2.3.0" + gentle-fs "^2.3.1" glob "^7.1.6" graceful-fs "^4.2.4" has-unicode "~2.0.1" hosted-git-info "^2.8.8" iferr "^1.0.2" + imurmurhash "*" infer-owner "^1.0.4" inflight "~1.0.6" inherits "^2.0.4" @@ -11141,38 +11396,44 @@ npm@^6.8.0: is-cidr "^3.0.0" json-parse-better-errors "^1.0.2" lazy-property "~1.0.0" - libcipm "^4.0.7" + libcipm "^4.0.8" libnpm "^3.0.1" libnpmaccess "^3.0.2" libnpmhook "^5.0.3" libnpmorg "^1.0.1" libnpmsearch "^2.0.2" libnpmteam "^1.0.2" - libnpx "^10.2.2" + libnpx "^10.2.4" lock-verify "^2.1.0" lockfile "^1.0.4" + lodash._baseindexof "*" lodash._baseuniq "~4.6.0" + lodash._bindcallback "*" + lodash._cacheindexof "*" + lodash._createcache "*" + lodash._getnative "*" lodash.clonedeep "~4.5.0" + lodash.restparam "*" lodash.union "~4.6.0" lodash.uniq "~4.5.0" lodash.without "~4.4.0" lru-cache "^5.1.1" - meant "~1.0.1" + meant "^1.0.2" mississippi "^3.0.0" mkdirp "^0.5.5" move-concurrently "^1.0.1" node-gyp "^5.1.0" nopt "^4.0.3" normalize-package-data "^2.5.0" - npm-audit-report "^1.3.2" + npm-audit-report "^1.3.3" npm-cache-filename "~1.0.2" npm-install-checks "^3.0.2" - npm-lifecycle "^3.1.4" + npm-lifecycle "^3.1.5" npm-package-arg "^6.1.1" npm-packlist "^1.4.8" npm-pick-manifest "^3.0.2" npm-profile "^4.0.4" - npm-registry-fetch "^4.0.5" + npm-registry-fetch "^4.0.7" npm-user-validate "~1.0.0" npmlog "~4.1.2" once "~1.4.0" @@ -11363,11 +11624,6 @@ object.values@^1.0.4, object.values@^1.1.0: function-bind "^1.1.1" has "^1.0.3" -octokit-pagination-methods@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/octokit-pagination-methods/-/octokit-pagination-methods-1.1.0.tgz#cf472edc9d551055f9ef73f6e42b4dbb4c80bea4" - integrity sha512-fZ4qZdQ2nxJvtcasX7Ghl+WlWS/d9IgnBIwFZXVNNZUmzpno91SX5bc5vuxiuKoCtK78XxGGNuSCrDC7xYB3OQ== - on-finished@^2.3.0, on-finished@~2.3.0: version "2.3.0" resolved "https://registry.yarnpkg.com/on-finished/-/on-finished-2.3.0.tgz#20f1336481b083cd75337992a16971aa2d906947" @@ -11401,6 +11657,13 @@ onetime@^2.0.0: dependencies: mimic-fn "^1.0.0" +onetime@^5.1.0: + version "5.1.2" + resolved "https://registry.yarnpkg.com/onetime/-/onetime-5.1.2.tgz#d0e96ebb56b07476df1dd9c4806e5237985ca45e" + integrity sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg== + dependencies: + mimic-fn "^2.1.0" + opener@^1.5.1: version "1.5.1" resolved "https://registry.yarnpkg.com/opener/-/opener-1.5.1.tgz#6d2f0e77f1a0af0032aca716c2c1fbb8e7e8abed" @@ -11471,7 +11734,7 @@ os-locale@^2.0.0: lcid "^1.0.0" mem "^1.1.0" -os-locale@^3.0.0, os-locale@^3.1.0: +os-locale@^3.0.0: version "3.1.0" resolved "https://registry.yarnpkg.com/os-locale/-/os-locale-3.1.0.tgz#a802a6ee17f24c10483ab9935719cef4ed16bf1a" integrity sha512-Z8l3R4wYWM40/52Z+S265okfFj8Kt2cC2MKY+xNi3kFs+XGI7WXu/I309QQQYbRW4ijiZ+yxs9pqEhJh0DqW3Q== @@ -11480,14 +11743,6 @@ os-locale@^3.0.0, os-locale@^3.1.0: lcid "^2.0.0" mem "^4.0.0" -os-name@^3.0.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/os-name/-/os-name-3.1.0.tgz#dec19d966296e1cd62d701a5a66ee1ddeae70801" - integrity sha512-h8L+8aNjNcMpo/mAIBPn5PXCM16iyPGjHNWo6U1YO8sJTMHtEtyczI6QJnLoplswm6goopQkqc7OAnjhWcugVg== - dependencies: - macos-release "^2.2.0" - windows-release "^3.1.0" - os-tmpdir@^1.0.0, os-tmpdir@^1.0.1, os-tmpdir@~1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274" @@ -11529,6 +11784,11 @@ p-each-series@^1.0.0: dependencies: p-reduce "^1.0.0" +p-each-series@^2.1.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/p-each-series/-/p-each-series-2.2.0.tgz#105ab0357ce72b202a8a8b94933672657b5e2a9a" + integrity sha512-ycIL2+1V32th+8scbpTvyHNaHe02z0sjgh91XXjAk+ZeXoPN4Z46DVUnzdso0aX4KckKw0FNNFHdjZ2UsZvxiA== + p-filter@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/p-filter/-/p-filter-2.1.0.tgz#1b1472562ae7a0f742f0f3d3d3718ea66ff9c09c" @@ -11574,7 +11834,7 @@ p-locate@^3.0.0: dependencies: p-limit "^2.0.0" -p-locate@^4.0.0, p-locate@^4.1.0: +p-locate@^4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-4.1.0.tgz#a3428bb7088b3a60292f66919278b7c297ad4f07" integrity sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A== @@ -11586,6 +11846,13 @@ p-map@^2.0.0: resolved "https://registry.yarnpkg.com/p-map/-/p-map-2.1.0.tgz#310928feef9c9ecc65b68b17693018a665cea175" integrity sha512-y3b8Kpd8OAN444hxfBbFfj1FY/RjtTd8tzYwhUqNYXx0fXx2iX4maP4Qr6qhIKbQXI02wTLAda4fYUbDagTUFw== +p-map@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/p-map/-/p-map-4.0.0.tgz#bb2f95a5eda2ec168ec9274e06a747c3e2904d2b" + integrity sha512-/bjOqmgETBYB5BoEeGVea8dmvHb2m9GLy1E9W43yeyfP6QQCZGFNa+XRceJEuDB6zqr+gKpIAmlLebMpykw/MQ== + dependencies: + aggregate-error "^3.0.0" + p-reduce@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/p-reduce/-/p-reduce-1.0.0.tgz#18c2b0dd936a4690a529f8231f58a0fdb6a47dfa" @@ -11735,11 +12002,6 @@ parse-filepath@^1.0.2: map-cache "^0.2.0" path-root "^0.1.1" -parse-github-url@^1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/parse-github-url/-/parse-github-url-1.0.2.tgz#242d3b65cbcdda14bb50439e3242acf6971db395" - integrity sha512-kgBf6avCbO3Cn6+RnzRGLkUsv4ZVqv/VfAYkRsyBcgkshNvVBkRn1FEZcW0Jb+npXQWm2vHPnnOqFteZxRRGNw== - parse-glob@^3.0.4: version "3.0.4" resolved "https://registry.yarnpkg.com/parse-glob/-/parse-glob-3.0.4.tgz#b2c376cfb11f35513badd173ef0bb6e3a388391c" @@ -11867,6 +12129,11 @@ path-key@^2.0.0, path-key@^2.0.1: resolved "https://registry.yarnpkg.com/path-key/-/path-key-2.0.1.tgz#411cadb574c5a140d3a4b1910d40d80cc9f40b40" integrity sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A= +path-key@^3.0.0, path-key@^3.1.0: + version "3.1.1" + resolved "https://registry.yarnpkg.com/path-key/-/path-key-3.1.1.tgz#581f6ade658cbba65a0d3380de7753295054f375" + integrity sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q== + path-parse@^1.0.6: version "1.0.6" resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.6.tgz#d62dbb5679405d72c4737ec58600e9ddcf06d24c" @@ -13698,16 +13965,7 @@ read-pkg-up@^4.0.0: find-up "^3.0.0" read-pkg "^3.0.0" -read-pkg-up@^6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/read-pkg-up/-/read-pkg-up-6.0.0.tgz#da75ce72762f2fa1f20c5a40d4dd80c77db969e3" - integrity sha512-odtTvLl+EXo1eTsMnoUHRmg/XmXdTkwXVxy4VFE9Kp6cCq7b3l7QMdBndND3eAFzrbSAXC/WCUOQQ9rLjifKZw== - dependencies: - find-up "^4.0.0" - read-pkg "^5.1.1" - type-fest "^0.5.0" - -read-pkg-up@^7.0.1: +read-pkg-up@^7.0.0, read-pkg-up@^7.0.1: version "7.0.1" resolved "https://registry.yarnpkg.com/read-pkg-up/-/read-pkg-up-7.0.1.tgz#f3a6135758459733ae2b95638056e1854e7ef507" integrity sha512-zK0TB7Xd6JpCLmlLmufqykGE+/TlOePD6qKClNW7hHDKFh/J7/7gCWGR7joEQEW1bKq3a3yUZSObOoWLFQ4ohg== @@ -13743,7 +14001,7 @@ read-pkg@^3.0.0: normalize-package-data "^2.3.2" path-type "^3.0.0" -read-pkg@^5.0.0, read-pkg@^5.1.1, read-pkg@^5.2.0: +read-pkg@^5.0.0, read-pkg@^5.2.0: version "5.2.0" resolved "https://registry.yarnpkg.com/read-pkg/-/read-pkg-5.2.0.tgz#7bf295438ca5a33e56cd30e053b34ee7250c93cc" integrity sha512-Ug69mNOpfvKDAc2Q8DRpMjjzdtrnv9HcSMX+4VsZxD1aZ6ZzrIE7rlzXBtWTyhULSMKg076AW6WR5iZpD0JiOg== @@ -13773,7 +14031,7 @@ read@1, read@~1.0.1, read@~1.0.7: string_decoder "~1.1.1" util-deprecate "~1.0.1" -"readable-stream@2 || 3", readable-stream@^3.0.2, readable-stream@^3.1.1, readable-stream@^3.6.0: +"readable-stream@2 || 3", readable-stream@3, readable-stream@^3.0.2, readable-stream@^3.1.1, readable-stream@^3.6.0: version "3.6.0" resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-3.6.0.tgz#337bbda3adc0706bd3e024426a286d4b4b2c9198" integrity sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA== @@ -14380,6 +14638,14 @@ resolve@^1.1.3, resolve@^1.1.4, resolve@^1.1.6, resolve@^1.1.7, resolve@^1.10.0, dependencies: path-parse "^1.0.6" +resolve@^1.17.0: + version "1.19.0" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.19.0.tgz#1af5bf630409734a067cae29318aac7fa29a267c" + integrity sha512-rArEXAgsBG4UgRGcynxWIWKFvh/XZCcS8UJdHhwy91zwAvCZIbcs+vAbflgBnNjYMs/i/i+/Ux6IZhML1yPvxg== + dependencies: + is-core-module "^2.1.0" + path-parse "^1.0.6" + resp-modifier@^6.0.0: version "6.0.2" resolved "https://registry.yarnpkg.com/resp-modifier/-/resp-modifier-6.0.2.tgz#b124de5c4fbafcba541f48ffa73970f4aa456b4f" @@ -14457,6 +14723,13 @@ rimraf@^2.5.0, rimraf@^2.5.2, rimraf@^2.5.4, rimraf@^2.6.1, rimraf@^2.6.2, rimra dependencies: glob "^7.1.3" +rimraf@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-3.0.2.tgz#f1a5402ba6220ad52cc1282bac1ae3aa49fd061a" + integrity sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA== + dependencies: + glob "^7.1.3" + ripemd160@^2.0.0, ripemd160@^2.0.1: version "2.0.2" resolved "https://registry.yarnpkg.com/ripemd160/-/ripemd160-2.0.2.tgz#a1c1a6f624751577ba5d07914cbc92850585890c" @@ -14582,37 +14855,39 @@ seamless-immutable@^7.1.3: resolved "https://registry.yarnpkg.com/seamless-immutable/-/seamless-immutable-7.1.4.tgz#6e9536def083ddc4dea0207d722e0e80d0f372f8" integrity sha512-XiUO1QP4ki4E2PHegiGAlu6r82o5A+6tRh7IkGGTVg/h+UoeX4nFBeCGPOhb4CYjvkqsfm/TUtvOMYC1xmV30A== -semantic-release@^15.13.12: - version "15.13.18" - resolved "https://registry.yarnpkg.com/semantic-release/-/semantic-release-15.13.18.tgz#72e284c6f7cb7817e1aaaa0a9d73600a9447d146" - integrity sha512-JtfdrhF1zRm91nJH/Rg3taftbWGwktJqqrJJdbmZGKYx63cfC4PoaS0jxRifGJUdmmgW/Kxz8f5bhtB+p1bu8A== +semantic-release@^17.2.3: + version "17.2.3" + resolved "https://registry.yarnpkg.com/semantic-release/-/semantic-release-17.2.3.tgz#11f10b851d4e75b1015b17515c433049b3df994c" + integrity sha512-MY1MlowGQrkOR7+leOD8ICkVOC6i1szbwDODdbJ0UdshtMx8Ms0bhpRQmEEliqYKEb5PLv/dqs6zKKuHT7UxTg== dependencies: - "@semantic-release/commit-analyzer" "^6.1.0" + "@semantic-release/commit-analyzer" "^8.0.0" "@semantic-release/error" "^2.2.0" - "@semantic-release/github" "^5.1.0" - "@semantic-release/npm" "^5.0.5" - "@semantic-release/release-notes-generator" "^7.1.2" + "@semantic-release/github" "^7.0.0" + "@semantic-release/npm" "^7.0.0" + "@semantic-release/release-notes-generator" "^9.0.0" aggregate-error "^3.0.0" - cosmiconfig "^5.0.1" + cosmiconfig "^6.0.0" debug "^4.0.0" - env-ci "^4.0.0" - execa "^1.0.0" + env-ci "^5.0.0" + execa "^4.0.0" figures "^3.0.0" find-versions "^3.0.0" get-stream "^5.0.0" git-log-parser "^1.2.0" hook-std "^2.0.0" - hosted-git-info "^2.7.1" - lodash "^4.17.4" - marked "^0.6.0" - marked-terminal "^3.2.0" - p-locate "^4.0.0" + hosted-git-info "^3.0.0" + lodash "^4.17.15" + marked "^1.0.0" + marked-terminal "^4.0.0" + micromatch "^4.0.2" + p-each-series "^2.1.0" p-reduce "^2.0.0" - read-pkg-up "^6.0.0" + read-pkg-up "^7.0.0" resolve-from "^5.0.0" - semver "^6.0.0" + semver "^7.3.2" + semver-diff "^3.1.1" signale "^1.2.1" - yargs "^13.1.0" + yargs "^15.0.1" semver-diff@^2.0.0: version "2.1.0" @@ -14621,6 +14896,13 @@ semver-diff@^2.0.0: dependencies: semver "^5.0.3" +semver-diff@^3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/semver-diff/-/semver-diff-3.1.1.tgz#05f77ce59f325e00e2706afd67bb506ddb1ca32b" + integrity sha512-GX0Ix/CJcHyB8c4ykpHGIAvLyOwOobtM/8d+TQkAd81/bEjgPHrfba41Vpesr7jX/t8Uh+R3EX9eAS5be+jQYg== + dependencies: + semver "^6.3.0" + semver-regex@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/semver-regex/-/semver-regex-2.0.0.tgz#a93c2c5844539a770233379107b38c7b4ac9d338" @@ -14641,11 +14923,16 @@ semver@7.0.0: resolved "https://registry.yarnpkg.com/semver/-/semver-7.0.0.tgz#5f3ca35761e47e05b206c6daff2cf814f0316b8e" integrity sha512-+GB6zVA9LWh6zovYQLALHwv5rb2PHGlJi3lfiqIHxR0uuwCgefcOJc59v9fv1w8GbStwxuuqqAjI9NMAOOgq1A== -semver@^6.0.0: +semver@^6.0.0, semver@^6.3.0: version "6.3.0" resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d" integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw== +semver@^7.1.2, semver@^7.3.2: + version "7.3.2" + resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.2.tgz#604962b052b81ed0786aae84389ffba70ffd3938" + integrity sha512-OrOb32TeeambH6UrhtShmF7CRDqhL6/5XpPNp2DuRH6+9QLw/orhp72j87v8Qa1ScDkvrrBNpZcDejAirJmfXQ== + send@0.17.1: version "0.17.1" resolved "https://registry.yarnpkg.com/send/-/send-0.17.1.tgz#c1d8b059f7900f7466dd4938bdc44e11ddb376c8" @@ -14735,11 +15022,23 @@ shebang-command@^1.2.0: dependencies: shebang-regex "^1.0.0" +shebang-command@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-2.0.0.tgz#ccd0af4f8835fbdc265b82461aaf0c36663f34ea" + integrity sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA== + dependencies: + shebang-regex "^3.0.0" + shebang-regex@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-1.0.0.tgz#da42f49740c0b42db2ca9728571cb190c98efea3" integrity sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM= +shebang-regex@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-3.0.0.tgz#ae16f1644d873ecad843b0307b143362d4c42172" + integrity sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A== + shell-quote@^1.4.2, shell-quote@^1.6.1: version "1.6.1" resolved "https://registry.yarnpkg.com/shell-quote/-/shell-quote-1.6.1.tgz#f4781949cce402697127430ea3b3c5476f481767" @@ -15350,6 +15649,11 @@ strip-eof@^1.0.0: resolved "https://registry.yarnpkg.com/strip-eof/-/strip-eof-1.0.0.tgz#bb43ff5598a6eb05d89b59fcd129c983313606bf" integrity sha1-u0P/VZim6wXYm1n80SnJgzE2Br8= +strip-final-newline@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/strip-final-newline/-/strip-final-newline-2.0.0.tgz#89b852fb2fcbe936f6f4b3187afb0a12c1ab58ad" + integrity sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA== + strip-indent@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/strip-indent/-/strip-indent-2.0.0.tgz#5ef8db295d01e6ed6cbf7aab96998d7822527b68" @@ -15458,7 +15762,7 @@ supports-color@^3.1.0, supports-color@^3.2.3: dependencies: has-flag "^1.0.0" -supports-color@^5.0.0, supports-color@^5.3.0, supports-color@^5.4.0, supports-color@^5.5.0: +supports-color@^5.3.0, supports-color@^5.4.0, supports-color@^5.5.0: version "5.5.0" resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.5.0.tgz#e2e69a44ac8772f78a1ec0b35b689df6530efc8f" integrity sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow== @@ -15472,13 +15776,20 @@ supports-color@^6.0.0, supports-color@^6.1.0: dependencies: has-flag "^3.0.0" -supports-hyperlinks@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/supports-hyperlinks/-/supports-hyperlinks-1.0.1.tgz#71daedf36cc1060ac5100c351bb3da48c29c0ef7" - integrity sha512-HHi5kVSefKaJkGYXbDuKbUGRVxqnWGn3J2e39CYcNJEfWciGq2zYtOhXLTlvrOZW1QU7VX67w7fMmWafHX9Pfw== +supports-color@^7.0.0, supports-color@^7.1.0: + version "7.2.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-7.2.0.tgz#1b7dcdcb32b8138801b3e478ba6a51caa89648da" + integrity sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw== + dependencies: + has-flag "^4.0.0" + +supports-hyperlinks@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/supports-hyperlinks/-/supports-hyperlinks-2.1.0.tgz#f663df252af5f37c5d49bbd7eeefa9e0b9e59e47" + integrity sha512-zoE5/e+dnEijk6ASB6/qrK+oYdm2do1hjoLWrqUC/8WEIW1gbxFcKuBof7sW8ArN6e+AYvsE8HBGiVRWL/F5CA== dependencies: - has-flag "^2.0.0" - supports-color "^5.0.0" + has-flag "^4.0.0" + supports-color "^7.0.0" svg.js@^2.6.5: version "2.7.1" @@ -15567,6 +15878,22 @@ tar@^4, tar@^4.4.10, tar@^4.4.12, tar@^4.4.13: safe-buffer "^5.1.2" yallist "^3.0.3" +temp-dir@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/temp-dir/-/temp-dir-2.0.0.tgz#bde92b05bdfeb1516e804c9c00ad45177f31321e" + integrity sha512-aoBAniQmmwtcKp/7BzsH8Cxzv8OL736p7v1ihGb5e9DJ9kTwGWHrQrVB5+lfVDzfGrdRzXch+ig7LHaY1JTOrg== + +tempy@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/tempy/-/tempy-1.0.0.tgz#4f192b3ee3328a2684d0e3fc5c491425395aab65" + integrity sha512-eLXG5B1G0mRPHmgH2WydPl5v4jH35qEn3y/rA/aahKhIa91Pn119SsU7n7v/433gtT9ONzC8ISvNHIh2JSTm0w== + dependencies: + del "^6.0.0" + is-stream "^2.0.0" + temp-dir "^2.0.0" + type-fest "^0.16.0" + unique-string "^2.0.0" + term-color@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/term-color/-/term-color-1.0.1.tgz#38e192553a473e35e41604ff5199846bf8117a3a" @@ -15657,6 +15984,13 @@ through2@^3.0.0, through2@^3.0.1: dependencies: readable-stream "2 || 3" +through2@^4.0.0: + version "4.0.2" + resolved "https://registry.yarnpkg.com/through2/-/through2-4.0.2.tgz#a7ce3ac2a7a8b0b966c80e7c49f0484c3b239764" + integrity sha512-iOqSav00cVxEEICeD7TjLB1sueEL+81Wpzp2bY17uZjZN0pWZPuo4suZ/61VujxmqSGFfgOcNuTZ85QJwNZQpw== + dependencies: + readable-stream "3" + through2@~0.6.1: version "0.6.5" resolved "https://registry.yarnpkg.com/through2/-/through2-0.6.5.tgz#41ab9c67b29d57209071410e1d7a7a968cd3ad48" @@ -15938,15 +16272,25 @@ type-detect@^4.0.0, type-detect@^4.0.5: resolved "https://registry.yarnpkg.com/type-detect/-/type-detect-4.0.8.tgz#7646fb5f18871cfbb7749e69bd39a6388eb7450c" integrity sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g== +type-fest@^0.11.0: + version "0.11.0" + resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.11.0.tgz#97abf0872310fed88a5c466b25681576145e33f1" + integrity sha512-OdjXJxnCN1AvyLSzeKIgXTXxV+99ZuXl3Hpo9XpJAv9MBcHrrJOQ5kV7ypXOuQie+AmWG25hLbiKdwYTifzcfQ== + type-fest@^0.13.1: version "0.13.1" resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.13.1.tgz#0172cb5bce80b0bd542ea348db50c7e21834d934" integrity sha512-34R7HTnG0XIJcBSn5XhDd7nNFPRcXYRZrBB2O2jdKqYODldSzBAqzsWoZYYvduky73toYS/ESqxPvkDf/F0XMg== -type-fest@^0.5.0: - version "0.5.2" - resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.5.2.tgz#d6ef42a0356c6cd45f49485c3b6281fc148e48a2" - integrity sha512-DWkS49EQKVX//Tbupb9TFa19c7+MK1XmzkrZUR8TAktmE/DizXoaoJV6TZ/tSIPXipqNiRI6CyAe7x69Jb6RSw== +type-fest@^0.16.0: + version "0.16.0" + resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.16.0.tgz#3240b891a78b0deae910dbeb86553e552a148860" + integrity sha512-eaBzG6MxNzEn9kiwvtre90cXaNLkmadMWa1zQMs3XORCXNbsH/OewwbxC5ia9dCxIxnTAsSxXJaa/p5y8DlvJg== + +type-fest@^0.18.0: + version "0.18.1" + resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.18.1.tgz#db4bc151a4a2cf4eebf9add5db75508db6cc841f" + integrity sha512-OIAYXk8+ISY+qTOwkHtKqzAuxchoMiD9Udx+FSGQDuiRR+PJKJHc2NJAXlbhkGwTt/4/nKZxELY1w3ReWOL8mw== type-fest@^0.6.0: version "0.6.0" @@ -16157,6 +16501,13 @@ unique-string@^1.0.0: dependencies: crypto-random-string "^1.0.0" +unique-string@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/unique-string/-/unique-string-2.0.0.tgz#39c6451f81afb2749de2b233e3f7c5e8843bd89d" + integrity sha512-uNaeirEPvpZWSgzwsPGtU2zVSTrn/8L5q/IexZmH0eH6SA73CmAA5U4GwORTxQAZs95TAXLNqeLoPPNO5gZfWg== + dependencies: + crypto-random-string "^2.0.0" + unist-builder@^1.0.1, unist-builder@^1.0.2: version "1.0.4" resolved "https://registry.yarnpkg.com/unist-builder/-/unist-builder-1.0.4.tgz#e1808aed30bd72adc3607f25afecebef4dd59e17" @@ -16225,18 +16576,26 @@ units-css@^0.4.0: isnumeric "^0.2.0" viewport-dimensions "^0.2.0" -universal-user-agent@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/universal-user-agent/-/universal-user-agent-3.0.0.tgz#4cc88d68097bffd7ac42e3b7c903e7481424b4b9" - integrity sha512-T3siHThqoj5X0benA5H0qcDnrKGXzU8TKoX15x/tQHw1hQBvIEBHjxQ2klizYsqBOO/Q+WuxoQUihadeeqDnoA== - dependencies: - os-name "^3.0.0" +universal-user-agent@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/universal-user-agent/-/universal-user-agent-6.0.0.tgz#3381f8503b251c0d9cd21bc1de939ec9df5480ee" + integrity sha512-isyNax3wXoKaulPDZWHQqbmIx1k2tb9fb3GGDBRxCscfYV2Ch7WxPArBsFEG8s/safwXTT7H4QGhaIkTp9447w== universalify@^0.1.0: version "0.1.2" resolved "https://registry.yarnpkg.com/universalify/-/universalify-0.1.2.tgz#b646f69be3942dabcecc9d6639c80dc105efaa66" integrity sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg== +universalify@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/universalify/-/universalify-1.0.0.tgz#b61a1da173e8435b2fe3c67d29b9adf8594bd16d" + integrity sha512-rb6X1W158d7pRQBg5gkR8uPaSfiids68LTJQYOtEUhoJUWBdaQHsuT/EUduxXYxcrt4r5PJ4fuHW1MHT6p0qug== + +universalify@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/universalify/-/universalify-2.0.0.tgz#75a4984efedc4b08975c5aeb73f530d02df25717" + integrity sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ== + unpipe@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/unpipe/-/unpipe-1.0.0.tgz#b2bf4ee8514aae6165b4817829d21b2ef49904ec" @@ -16313,11 +16672,6 @@ url-parse-lax@^1.0.0: dependencies: prepend-http "^1.0.1" -url-template@^2.0.8: - version "2.0.8" - resolved "https://registry.yarnpkg.com/url-template/-/url-template-2.0.8.tgz#fc565a3cccbff7730c775f5641f9555791439f21" - integrity sha1-/FZaPMy/93MMd19WQflVV5FDnyE= - url-trim@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/url-trim/-/url-trim-1.0.0.tgz#40057e2f164b88e5daca7269da47e6d1dd837adc" @@ -16800,6 +17154,13 @@ which@^1.2.14, which@^1.2.9, which@^1.3.0, which@^1.3.1: dependencies: isexe "^2.0.0" +which@^2.0.1: + version "2.0.2" + resolved "https://registry.yarnpkg.com/which/-/which-2.0.2.tgz#7c6a8dd0a636a0327e10b59c9286eee93f3f51b1" + integrity sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA== + dependencies: + isexe "^2.0.0" + wide-align@^1.1.0: version "1.1.3" resolved "https://registry.yarnpkg.com/wide-align/-/wide-align-1.1.3.tgz#ae074e6bdc0c14a431e804e624549c633b000457" @@ -16819,13 +17180,6 @@ window-size@0.1.0: resolved "https://registry.yarnpkg.com/window-size/-/window-size-0.1.0.tgz#5438cd2ea93b202efa3a19fe8887aee7c94f9c9d" integrity sha1-VDjNLqk7IC76Ohn+iIeu58lPnJ0= -windows-release@^3.1.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/windows-release/-/windows-release-3.2.0.tgz#8122dad5afc303d833422380680a79cdfa91785f" - integrity sha512-QTlz2hKLrdqukrsapKsINzqMgOUpQW268eJ0OaOpJN32h272waxR9fkB9VoWRtK7uKHG5EHJcTXQBD8XZVJkFA== - dependencies: - execa "^1.0.0" - word-wrap@^1.0.3: version "1.2.3" resolved "https://registry.yarnpkg.com/word-wrap/-/word-wrap-1.2.3.tgz#610636f6b1f703891bd34771ccb17fb93b47079c" @@ -16990,6 +17344,11 @@ yallist@^3.0.0, yallist@^3.0.2, yallist@^3.0.3: resolved "https://registry.yarnpkg.com/yallist/-/yallist-3.1.1.tgz#dbb7daf9bfd8bac9ab45ebf602b8cbad0d5d08fd" integrity sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g== +yallist@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/yallist/-/yallist-4.0.0.tgz#9bb92790d9c0effec63be73519e11a35019a3a72" + integrity sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A== + yaml@^1.7.2: version "1.9.2" resolved "https://registry.yarnpkg.com/yaml/-/yaml-1.9.2.tgz#f0cfa865f003ab707663e4f04b3956957ea564ed" @@ -17021,6 +17380,14 @@ yargs-parser@^13.1.1: camelcase "^5.0.0" decamelize "^1.2.0" +yargs-parser@^15.0.1: + version "15.0.1" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-15.0.1.tgz#54786af40b820dcb2fb8025b11b4d659d76323b3" + integrity sha512-0OAMV2mAZQrs3FkNpDQcBk1x5HXb8X4twADss4S0Iuk+2dGnLOE/fRHrsYm542GduMveyA77OF4wrNJuanRCWw== + dependencies: + camelcase "^5.0.0" + decamelize "^1.2.0" + yargs-parser@^18.1.2, yargs-parser@^18.1.3: version "18.1.3" resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-18.1.3.tgz#be68c4975c6b2abf469236b0c870362fab09a7b0" @@ -17029,6 +17396,11 @@ yargs-parser@^18.1.2, yargs-parser@^18.1.3: camelcase "^5.0.0" decamelize "^1.2.0" +yargs-parser@^20.2.3: + version "20.2.4" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-20.2.4.tgz#b42890f14566796f85ae8e3a25290d205f154a54" + integrity sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA== + yargs-parser@^4.2.0: version "4.2.1" resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-4.2.1.tgz#29cceac0dc4f03c6c87b4a9f217dd18c9f74871c" @@ -17043,31 +17415,6 @@ yargs-parser@^7.0.0: dependencies: camelcase "^4.1.0" -yargs-parser@^9.0.2: - version "9.0.2" - resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-9.0.2.tgz#9ccf6a43460fe4ed40a9bb68f48d43b8a68cc077" - integrity sha1-nM9qQ0YP5O1Aqbto9I1DuKaMwHc= - dependencies: - camelcase "^4.1.0" - -yargs@^11.0.0: - version "11.1.1" - resolved "https://registry.yarnpkg.com/yargs/-/yargs-11.1.1.tgz#5052efe3446a4df5ed669c995886cc0f13702766" - integrity sha512-PRU7gJrJaXv3q3yQZ/+/X6KBswZiaQ+zOmdprZcouPYtQgvNU35i+68M4b1ZHLZtYFT5QObFLV+ZkmJYcwKdiw== - dependencies: - cliui "^4.0.0" - decamelize "^1.1.1" - find-up "^2.1.0" - get-caller-file "^1.0.1" - os-locale "^3.1.0" - require-directory "^2.1.1" - require-main-filename "^1.0.1" - set-blocking "^2.0.0" - string-width "^2.0.0" - which-module "^2.0.0" - y18n "^3.2.1" - yargs-parser "^9.0.2" - yargs@^12.0.2: version "12.0.5" resolved "https://registry.yarnpkg.com/yargs/-/yargs-12.0.5.tgz#05f5997b609647b64f66b81e3b4b10a368e7ad13" @@ -17086,7 +17433,7 @@ yargs@^12.0.2: y18n "^3.2.1 || ^4.0.0" yargs-parser "^11.1.1" -yargs@^13.1.0, yargs@^13.2.4: +yargs@^13.2.4: version "13.3.0" resolved "https://registry.yarnpkg.com/yargs/-/yargs-13.3.0.tgz#4c657a55e07e5f2cf947f8a366567c04a0dedc83" integrity sha512-2eehun/8ALW8TLoIl7MVaRUrg+yCnenu8B4kBlRxj3GJGDKU1Og7sMXPNm1BYyM1DOJmTZ4YeN/Nwxv+8XJsUA== @@ -17102,7 +17449,24 @@ yargs@^13.1.0, yargs@^13.2.4: y18n "^4.0.0" yargs-parser "^13.1.1" -yargs@^15.3.1: +yargs@^14.2.3: + version "14.2.3" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-14.2.3.tgz#1a1c3edced1afb2a2fea33604bc6d1d8d688a414" + integrity sha512-ZbotRWhF+lkjijC/VhmOT9wSgyBQ7+zr13+YLkhfsSiTriYsMzkTUFP18pFhWwBeMa5gUc1MzbhrO6/VB7c9Xg== + dependencies: + cliui "^5.0.0" + decamelize "^1.2.0" + find-up "^3.0.0" + get-caller-file "^2.0.1" + require-directory "^2.1.1" + require-main-filename "^2.0.0" + set-blocking "^2.0.0" + string-width "^3.0.0" + which-module "^2.0.0" + y18n "^4.0.0" + yargs-parser "^15.0.1" + +yargs@^15.0.1, yargs@^15.3.1: version "15.4.1" resolved "https://registry.yarnpkg.com/yargs/-/yargs-15.4.1.tgz#0d87a16de01aee9d8bec2bfbf74f67851730f4f8" integrity sha512-aePbxDmcYW++PaqBsJ+HYUFwCdv4LVvdnhBy78E57PIor8/OVvhMrADFFEDh8DHDFRv/O9i3lPhsENjO7QX0+A== From ca96c67da677d5d5a025cdb429f94bfeea6af12e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 24 Nov 2020 23:48:21 +0000 Subject: [PATCH 55/58] build(deps): bump highlight.js from 9.15.8 to 9.18.5 Bumps [highlight.js](https://github.com/highlightjs/highlight.js) from 9.15.8 to 9.18.5. - [Release notes](https://github.com/highlightjs/highlight.js/releases) - [Changelog](https://github.com/highlightjs/highlight.js/blob/9.18.5/CHANGES.md) - [Commits](https://github.com/highlightjs/highlight.js/compare/9.15.8...9.18.5) Signed-off-by: dependabot[bot] --- yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/yarn.lock b/yarn.lock index 228385ed5..dce333e2c 100644 --- a/yarn.lock +++ b/yarn.lock @@ -7721,9 +7721,9 @@ hex-color-regex@^1.1.0: integrity sha512-l9sfDFsuqtOqKDsQdqrMRk0U85RZc0RtOR9yPI7mRVOa4FsR/BVnZ0shmQRM96Ji99kYZP/7hn1cedc1+ApsTQ== highlight.js@^9.15.5, highlight.js@^9.7.0: - version "9.15.8" - resolved "https://registry.yarnpkg.com/highlight.js/-/highlight.js-9.15.8.tgz#f344fda123f36f1a65490e932cf90569e4999971" - integrity sha512-RrapkKQWwE+wKdF73VsOa2RQdIoO3mxwJ4P8mhbI6KYJUraUHRKM5w5zQQKXNk0xNL4UVRdulV9SBJcmzJNzVA== + version "9.18.5" + resolved "https://registry.yarnpkg.com/highlight.js/-/highlight.js-9.18.5.tgz#d18a359867f378c138d6819edfc2a8acd5f29825" + integrity sha512-a5bFyofd/BHCX52/8i8uJkjr9DYwXIPnM/plwI6W7ezItLGqzt7X2G2nXuYSfsIJdkwwj/g9DG1LkcGJI/dDoA== history@^4.7.2, history@^4.9.0: version "4.9.0" From 91bdbb5523830976b84ddf35078c2029899d5567 Mon Sep 17 00:00:00 2001 From: Evan Siroky Date: Tue, 1 Dec 2020 12:23:38 -0800 Subject: [PATCH 56/58] refactor: address various PR review comments See https://github.com/opentripplanner/otp-react-redux/pull/274 --- example.js | 33 ++++++++++++++++++++++++-- lib/components/viewers/route-viewer.js | 2 +- 2 files changed, 32 insertions(+), 3 deletions(-) diff --git a/example.js b/example.js index 92fd4d630..1845f3ee5 100644 --- a/example.js +++ b/example.js @@ -48,7 +48,11 @@ if (useCustomIcons) { } // define some application-wide components that should be used in -// various places +// various places. The following components can be provided here: +// - ItineraryBody (required) +// - ItineraryFooter (optional) +// - LegIcon (required) +// - ModeIcon (required) const components = { ItineraryBody: DefaultItinerary, LegIcon: MyLegIcon, @@ -125,7 +129,32 @@ class OtpRRExample extends Component { ) - /** the main webapp **/ + /** + * The main webapp. + * + * Note: the ResponsiveWebapp creates a React context provider + * (./util/contexts#ComponentContext to be specific) to supply custom + * components to various other subcomponents throughout otp-react-redux. If + * the ResponsiveWebapp is not used and instead some subcomponents that use + * the components in the `components` variable are imported and rendered + * outside of the ResponsiveWebapp component, then the ComponentContext will + * need to wrap that component in order for the subcomponents to be able to + * access the component context. For example: + * + * ```js + * import RouteViewer from 'otp-react-redux/build/components/viewers/route-viewer' + * import { ComponentContext } from 'otp-react-redux/build/util/contexts' + * + * const components = { + * ModeIcon: MyCustomModeIconComponent + * } + * const ContextAwareRouteViewer = () => ( + * + * + * + * ) + * ``` + */ return ( Date: Thu, 3 Dec 2020 17:12:58 -0500 Subject: [PATCH 57/58] fix(ItineraryBody): Remove width limitation for PlaceRow items. --- .../narrative/line-itin/connected-itinerary-body.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/components/narrative/line-itin/connected-itinerary-body.js b/lib/components/narrative/line-itin/connected-itinerary-body.js index 11c74138c..f0a2e0dba 100644 --- a/lib/components/narrative/line-itin/connected-itinerary-body.js +++ b/lib/components/narrative/line-itin/connected-itinerary-body.js @@ -3,7 +3,7 @@ import TransitLegSummary from '@opentripplanner/itinerary-body/lib/defaults/tran import ItineraryBody from '@opentripplanner/itinerary-body/lib/otp-react-redux/itinerary-body' import LineColumnContent from '@opentripplanner/itinerary-body/lib/otp-react-redux/line-column-content' import PlaceName from '@opentripplanner/itinerary-body/lib/otp-react-redux/place-name' -import { PlaceName as PlaceNameWrapper } from '@opentripplanner/itinerary-body/lib/styled' +import { PlaceName as PlaceNameWrapper, PlaceRowWrapper } from '@opentripplanner/itinerary-body/lib/styled' import RouteDescription from '@opentripplanner/itinerary-body/lib/otp-react-redux/route-description' import React, { Component } from 'react' import { connect } from 'react-redux' @@ -26,6 +26,9 @@ const StyledItineraryBody = styled(ItineraryBody)` ${PlaceNameWrapper} { font-weight: inherit; } + ${PlaceRowWrapper} { + max-width: inherit; + } ` class ConnectedItineraryBody extends Component { From 7399e23511c8b141c70e39e321bb7e8a016f6208 Mon Sep 17 00:00:00 2001 From: Evan Siroky Date: Mon, 4 Jan 2021 19:30:18 -0500 Subject: [PATCH 58/58] docs(readme): improve readme BREAKING CHANGE: - Refactor various components and example.js file to more heavily use React's context API (see https://github.com/opentripplanner/otp-react-redux/pull/274) - Update to use latest config schema compatible with opentripplanner/core-utils v3 (see https://github.com/opentripplanner/otp-react-redux/pull/201) --- README.md | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 1afbad14e..92fe74463 100644 --- a/README.md +++ b/README.md @@ -6,19 +6,20 @@ A library for writing modern [OpenTripPlanner](http://www.opentripplanner.org/)- ## Running the Example -A simple example of an OTP-RR application is included in the repository. +An example of an OTP-RR application is included in the repository. The example project is a single page application with a root entry point of the `example.js` file. This example.js file can be modified to suit the needs of a particular implementation. To run, first clone the repo and install [yarn](https://yarnpkg.com/) if needed. -Copy `example-config.yml` to `config.yml`. Update `config.yml` with your Mapzen API key, and optionally, the OTP endpoint and initial map origin. (The default values are for a Conveyal test server for Portland, OR.) +Copy `example-config.yml` to `config.yml`. Update `config.yml` with the needed API keys, and optionally, the OTP endpoint and initial map origin. (The default values are for a test server for Portland, OR.). -Install the dependencies and start a test instance using yarn: +Install the dependencies and start a local instance using the following script: ```bash -yarn install yarn start ``` ## Library Documentation -Coming Soon +More coming soon... + +As of version 2.0, otp-react-redux utilizes React's context API in a number of components. This changed the way that some components receive props such that they will not work properly unless wrapped with the context provider used in the `ResponsiveWebapp` component.