diff --git a/WORKSPACE.bazel b/WORKSPACE.bazel index db99a54a6f7..76937dfc0ba 100644 --- a/WORKSPACE.bazel +++ b/WORKSPACE.bazel @@ -2,8 +2,8 @@ workspace(name = "com_google_javascript_jscomp") load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") -RULES_JVM_EXTERNAL_TAG = "4.5" -RULES_JVM_EXTERNAL_SHA = "b17d7388feb9bfa7f2fa09031b32707df529f26c91ab9e5d909eb1676badd9a6" +RULES_JVM_EXTERNAL_TAG = "4.2" +RULES_JVM_EXTERNAL_SHA = "cd1a77b7b02e8e008439ca76fd34f5b07aecb8c752961f9640dea15e9e5ba1ca" http_archive( name = "rules_jvm_external", diff --git a/contrib/externs/maps/google_maps_api_v3_52.js b/contrib/externs/maps/google_maps_api_v3_52.js index 18eb7a0cecc..ce3cf22c13b 100644 --- a/contrib/externs/maps/google_maps_api_v3_52.js +++ b/contrib/externs/maps/google_maps_api_v3_52.js @@ -4050,6 +4050,11 @@ google.maps.JourneySharingLibrary = function() {}; */ google.maps.JourneySharingLibrary.prototype.AutomaticViewportMode; +/** + * @type {typeof google.maps.journeySharing.DeliveryVehicleStopState} + */ +google.maps.JourneySharingLibrary.prototype.DeliveryVehicleStopState; + /** * @type {typeof * google.maps.journeySharing.FleetEngineDeliveryFleetLocationProvider} @@ -4504,7 +4509,7 @@ google.maps.LatLng.prototype.toUrlValue = function(precision) {}; * When using `v=beta`, can be accessed by calling `const {LatLngAltitude} = * await google.map.importLibrary("core")`. See * https://developers.google.com/maps/documentation/javascript/libraries. - * @param {!google.maps.LatLngAltitude|!google.maps.LatLngAltitudeLiteral|!google.maps.LatLng|!google.maps.LatLngLiteral} + * @param {!google.maps.LatLngAltitude|!google.maps.LatLngAltitudeLiteral|!google.maps.LatLngLiteral|!google.maps.LatLng} * value The initializing value. * @param {boolean=} noClampNoWrap Whether to preserve the initialization * values, even if they may not necessarily be valid latitude values in the @@ -4537,7 +4542,8 @@ google.maps.LatLngAltitude.prototype.lng; /** * Comparison function. - * @param {?google.maps.LatLngAltitude} other Another LatLngAltitude object. + * @param {null|!google.maps.LatLngAltitude} other Another LatLngAltitude + * object. * @return {boolean} Whether the two objects are equal. */ google.maps.LatLngAltitude.prototype.equals = function(other) {}; @@ -10645,6 +10651,54 @@ google.maps.journeySharing.DeliveryVehicleMarkerCustomizationFunctionParams = google.maps.journeySharing.DeliveryVehicleMarkerCustomizationFunctionParams .prototype.vehicle; +/** + * Available only in the v=beta channel: https://goo.gle/3oAthT3. + * + * DeliveryVehicleStop type + * @record + */ +google.maps.journeySharing.DeliveryVehicleStop = function() {}; + +/** + * The list of Tasks to be performed at this stop. + * @type {!Array<{id:?string, extraDurationMillis:?number}>} + */ +google.maps.journeySharing.DeliveryVehicleStop.prototype.tasks; + +/** + * Available only in the v=beta channel: https://goo.gle/3oAthT3. + * + * The current state of a {@link + * google.maps.journeySharing.DeliveryVehicleStop}. + * + * When using `v=beta`, can be accessed by calling + * `const {DeliveryVehicleStopState} = await + * google.map.importLibrary("journeySharing")`. See + * https://developers.google.com/maps/documentation/javascript/libraries. + * @enum {string} + */ +google.maps.journeySharing.DeliveryVehicleStopState = { + /** + * Arrived at stop. Assumes that when the vehicle is routing to the next stop, + * that all previous stops have been completed. + */ + ARRIVED: 'ARRIVED', + /** + * Assigned and actively routing. + */ + ENROUTE: 'ENROUTE', + /** + * Created, but not actively routing. + */ + NEW: 'NEW', + /** + * Unknown. + */ + UNSPECIFIED: 'UNSPECIFIED', +}; + /** * Available only in the v=beta channel: https://goo.gle/3oAthT3. * @@ -11106,13 +11160,6 @@ google.maps.journeySharing.FleetEngineShipmentLocationProvider = function( google.maps.journeySharing.FleetEngineShipmentLocationProvider.prototype .trackingId; -/** - * Returns the currently tracked task. - * @return {?google.maps.journeySharing.Task} - */ -google.maps.journeySharing.FleetEngineShipmentLocationProvider.prototype - .getTask = function() {}; - /** * Explicitly refreshes the tracked location. * @return {void} @@ -11220,11 +11267,11 @@ google.maps.journeySharing.FleetEngineShipmentLocationProviderUpdateEvent = function() {}; /** - * The task structure returned by the update. Unmodifiable. - * @type {?google.maps.journeySharing.Task} + * The task tracking info structure returned by the update. Unmodifiable. + * @type {?google.maps.journeySharing.TaskTrackingInfo} */ google.maps.journeySharing.FleetEngineShipmentLocationProviderUpdateEvent - .prototype.task; + .prototype.taskTrackingInfo; /** * Available only in the v=beta channel: https://goo.gle/3oAthT3. @@ -12192,14 +12239,11 @@ google.maps.journeySharing.ShipmentMarkerCustomizationFunctionParams = function() {}; /** - * The task associated with this marker.

For information about the - * delivery vehicle servicing this task, use {@link - * google.maps.journeySharing.Task.latestVehicleLocationUpdate} and {@link - * google.maps.journeySharing.Task.remainingVehicleJourneySegments}. - * @type {!google.maps.journeySharing.Task} + * Information for the task associated with this marker. + * @type {!google.maps.journeySharing.TaskTrackingInfo} */ google.maps.journeySharing.ShipmentMarkerCustomizationFunctionParams.prototype - .task; + .taskTrackingInfo; /** * Available only in the v=beta channel: https://goo.gle/3oAthT3. @@ -12312,6 +12356,100 @@ google.maps.journeySharing.TaskMarkerCustomizationFunctionParams = */ google.maps.journeySharing.TaskMarkerCustomizationFunctionParams.prototype.task; +/** + * Available only in the v=beta channel: https://goo.gle/3oAthT3. + * + * The details for a task tracking info object returned by Fleet Engine. + * @record + */ +google.maps.journeySharing.TaskTrackingInfo = function() {}; + +/** + * The estimated arrival time to the stop location. + * @type {?Date} + */ +google.maps.journeySharing.TaskTrackingInfo.prototype.estimatedArrivalTime; + +/** + * The estimated completion time of a Task. + * @type {?Date} + */ +google.maps.journeySharing.TaskTrackingInfo.prototype + .estimatedTaskCompletionTime; + +/** + * Information specific to the last location update. + * @type {?google.maps.journeySharing.VehicleLocationUpdate} + */ +google.maps.journeySharing.TaskTrackingInfo.prototype + .latestVehicleLocationUpdate; + +/** + * The name in the format + * "providers/{provider_id}/taskTrackingInfo/{tracking_id}", where + * tracking_id represents the tracking ID. + * @type {string} + */ +google.maps.journeySharing.TaskTrackingInfo.prototype.name; + +/** + * The location where the Task will be completed. + * @type {?google.maps.LatLng} + */ +google.maps.journeySharing.TaskTrackingInfo.prototype.plannedLocation; + +/** + * The total remaining distance in meters to the VehicleStop of + * interest. + * @type {?number} + */ +google.maps.journeySharing.TaskTrackingInfo.prototype + .remainingDrivingDistanceMeters; + +/** + * Indicates the number of stops the vehicle remaining until the task stop is + * reached, including the task stop. For example, if the vehicle's next stop + * is the task stop, the value will be 1. + * @type {?number} + */ +google.maps.journeySharing.TaskTrackingInfo.prototype.remainingStopCount; + +/** + * A list of points which when connected forms a polyline of the vehicle's + * expected route to the location of this task. + * @type {?Array} + */ +google.maps.journeySharing.TaskTrackingInfo.prototype.routePolylinePoints; + +/** + * The current execution state of the Task. + * @type {?string} + */ +google.maps.journeySharing.TaskTrackingInfo.prototype.state; + +/** + * The outcome of attempting to execute a Task. + * @type {?string} + */ +google.maps.journeySharing.TaskTrackingInfo.prototype.taskOutcome; + +/** + * The time when the Task's outcome was set by the provider. + * @type {?Date} + */ +google.maps.journeySharing.TaskTrackingInfo.prototype.taskOutcomeTime; + +/** + * The tracking ID of a Task.
+ * @type {string} + */ +google.maps.journeySharing.TaskTrackingInfo.prototype.trackingId; + /** * Available only in the v=beta channel: https://goo.gle/3oAthT3. * @@ -12464,32 +12602,28 @@ google.maps.journeySharing.VehicleJourneySegment = function() {}; * The travel distance from the previous stop to this stop, in meters. * @type {?number} */ -google.maps.journeySharing.VehicleJourneySegment.prototype.distanceMeters; +google.maps.journeySharing.VehicleJourneySegment.prototype + .drivingDistanceMeters; /** - * The travel time from the previous stop to this stop, in milliseconds. + * The travel time from the previous stop this stop, in milliseconds. * @type {?number} */ -google.maps.journeySharing.VehicleJourneySegment.prototype.durationMillis; +google.maps.journeySharing.VehicleJourneySegment.prototype + .drivingDurationMillis; /** - * The extra travel time due to the durations of the stop's tasks, in - * milliseconds. - * @type {?number} - */ -google.maps.journeySharing.VehicleJourneySegment.prototype.extraDurationMillis; - -/** - * The actual stop location. - * @type {?google.maps.LatLngLiteral} + * The path from the previous waypoint (or the vehicle's current location, + * if this waypoint is the first in the list of waypoints) to this waypoint. + * @type {?Array} */ -google.maps.journeySharing.VehicleJourneySegment.prototype.location; +google.maps.journeySharing.VehicleJourneySegment.prototype.path; /** - * The path from the previous stop to this stop. - * @type {?Array} + * The stops to be served by this vehicle. + * @type {?Array} */ -google.maps.journeySharing.VehicleJourneySegment.prototype.path; +google.maps.journeySharing.VehicleJourneySegment.prototype.stop; /** * Available only in the v=beta channel: https://goo.gle/3oAthT3. @@ -12507,7 +12641,7 @@ google.maps.journeySharing.VehicleLocationUpdate.prototype.heading; /** * The location of the update. - * @type {?google.maps.LatLngLiteral} + * @type {?google.maps.LatLngLiteral|?google.maps.LatLng} */ google.maps.journeySharing.VehicleLocationUpdate.prototype.location; diff --git a/contrib/externs/maps/google_maps_api_v3_exp.js b/contrib/externs/maps/google_maps_api_v3_exp.js index 18eb7a0cecc..ce3cf22c13b 100644 --- a/contrib/externs/maps/google_maps_api_v3_exp.js +++ b/contrib/externs/maps/google_maps_api_v3_exp.js @@ -4050,6 +4050,11 @@ google.maps.JourneySharingLibrary = function() {}; */ google.maps.JourneySharingLibrary.prototype.AutomaticViewportMode; +/** + * @type {typeof google.maps.journeySharing.DeliveryVehicleStopState} + */ +google.maps.JourneySharingLibrary.prototype.DeliveryVehicleStopState; + /** * @type {typeof * google.maps.journeySharing.FleetEngineDeliveryFleetLocationProvider} @@ -4504,7 +4509,7 @@ google.maps.LatLng.prototype.toUrlValue = function(precision) {}; * When using `v=beta`, can be accessed by calling `const {LatLngAltitude} = * await google.map.importLibrary("core")`. See * https://developers.google.com/maps/documentation/javascript/libraries. - * @param {!google.maps.LatLngAltitude|!google.maps.LatLngAltitudeLiteral|!google.maps.LatLng|!google.maps.LatLngLiteral} + * @param {!google.maps.LatLngAltitude|!google.maps.LatLngAltitudeLiteral|!google.maps.LatLngLiteral|!google.maps.LatLng} * value The initializing value. * @param {boolean=} noClampNoWrap Whether to preserve the initialization * values, even if they may not necessarily be valid latitude values in the @@ -4537,7 +4542,8 @@ google.maps.LatLngAltitude.prototype.lng; /** * Comparison function. - * @param {?google.maps.LatLngAltitude} other Another LatLngAltitude object. + * @param {null|!google.maps.LatLngAltitude} other Another LatLngAltitude + * object. * @return {boolean} Whether the two objects are equal. */ google.maps.LatLngAltitude.prototype.equals = function(other) {}; @@ -10645,6 +10651,54 @@ google.maps.journeySharing.DeliveryVehicleMarkerCustomizationFunctionParams = google.maps.journeySharing.DeliveryVehicleMarkerCustomizationFunctionParams .prototype.vehicle; +/** + * Available only in the v=beta channel: https://goo.gle/3oAthT3. + * + * DeliveryVehicleStop type + * @record + */ +google.maps.journeySharing.DeliveryVehicleStop = function() {}; + +/** + * The list of Tasks to be performed at this stop. + * @type {!Array<{id:?string, extraDurationMillis:?number}>} + */ +google.maps.journeySharing.DeliveryVehicleStop.prototype.tasks; + +/** + * Available only in the v=beta channel: https://goo.gle/3oAthT3. + * + * The current state of a {@link + * google.maps.journeySharing.DeliveryVehicleStop}. + * + * When using `v=beta`, can be accessed by calling + * `const {DeliveryVehicleStopState} = await + * google.map.importLibrary("journeySharing")`. See + * https://developers.google.com/maps/documentation/javascript/libraries. + * @enum {string} + */ +google.maps.journeySharing.DeliveryVehicleStopState = { + /** + * Arrived at stop. Assumes that when the vehicle is routing to the next stop, + * that all previous stops have been completed. + */ + ARRIVED: 'ARRIVED', + /** + * Assigned and actively routing. + */ + ENROUTE: 'ENROUTE', + /** + * Created, but not actively routing. + */ + NEW: 'NEW', + /** + * Unknown. + */ + UNSPECIFIED: 'UNSPECIFIED', +}; + /** * Available only in the v=beta channel: https://goo.gle/3oAthT3. * @@ -11106,13 +11160,6 @@ google.maps.journeySharing.FleetEngineShipmentLocationProvider = function( google.maps.journeySharing.FleetEngineShipmentLocationProvider.prototype .trackingId; -/** - * Returns the currently tracked task. - * @return {?google.maps.journeySharing.Task} - */ -google.maps.journeySharing.FleetEngineShipmentLocationProvider.prototype - .getTask = function() {}; - /** * Explicitly refreshes the tracked location. * @return {void} @@ -11220,11 +11267,11 @@ google.maps.journeySharing.FleetEngineShipmentLocationProviderUpdateEvent = function() {}; /** - * The task structure returned by the update. Unmodifiable. - * @type {?google.maps.journeySharing.Task} + * The task tracking info structure returned by the update. Unmodifiable. + * @type {?google.maps.journeySharing.TaskTrackingInfo} */ google.maps.journeySharing.FleetEngineShipmentLocationProviderUpdateEvent - .prototype.task; + .prototype.taskTrackingInfo; /** * Available only in the v=beta channel: https://goo.gle/3oAthT3. @@ -12192,14 +12239,11 @@ google.maps.journeySharing.ShipmentMarkerCustomizationFunctionParams = function() {}; /** - * The task associated with this marker.

For information about the - * delivery vehicle servicing this task, use {@link - * google.maps.journeySharing.Task.latestVehicleLocationUpdate} and {@link - * google.maps.journeySharing.Task.remainingVehicleJourneySegments}. - * @type {!google.maps.journeySharing.Task} + * Information for the task associated with this marker. + * @type {!google.maps.journeySharing.TaskTrackingInfo} */ google.maps.journeySharing.ShipmentMarkerCustomizationFunctionParams.prototype - .task; + .taskTrackingInfo; /** * Available only in the v=beta channel: https://goo.gle/3oAthT3. @@ -12312,6 +12356,100 @@ google.maps.journeySharing.TaskMarkerCustomizationFunctionParams = */ google.maps.journeySharing.TaskMarkerCustomizationFunctionParams.prototype.task; +/** + * Available only in the v=beta channel: https://goo.gle/3oAthT3. + * + * The details for a task tracking info object returned by Fleet Engine. + * @record + */ +google.maps.journeySharing.TaskTrackingInfo = function() {}; + +/** + * The estimated arrival time to the stop location. + * @type {?Date} + */ +google.maps.journeySharing.TaskTrackingInfo.prototype.estimatedArrivalTime; + +/** + * The estimated completion time of a Task. + * @type {?Date} + */ +google.maps.journeySharing.TaskTrackingInfo.prototype + .estimatedTaskCompletionTime; + +/** + * Information specific to the last location update. + * @type {?google.maps.journeySharing.VehicleLocationUpdate} + */ +google.maps.journeySharing.TaskTrackingInfo.prototype + .latestVehicleLocationUpdate; + +/** + * The name in the format + * "providers/{provider_id}/taskTrackingInfo/{tracking_id}", where + * tracking_id represents the tracking ID. + * @type {string} + */ +google.maps.journeySharing.TaskTrackingInfo.prototype.name; + +/** + * The location where the Task will be completed. + * @type {?google.maps.LatLng} + */ +google.maps.journeySharing.TaskTrackingInfo.prototype.plannedLocation; + +/** + * The total remaining distance in meters to the VehicleStop of + * interest. + * @type {?number} + */ +google.maps.journeySharing.TaskTrackingInfo.prototype + .remainingDrivingDistanceMeters; + +/** + * Indicates the number of stops the vehicle remaining until the task stop is + * reached, including the task stop. For example, if the vehicle's next stop + * is the task stop, the value will be 1. + * @type {?number} + */ +google.maps.journeySharing.TaskTrackingInfo.prototype.remainingStopCount; + +/** + * A list of points which when connected forms a polyline of the vehicle's + * expected route to the location of this task. + * @type {?Array} + */ +google.maps.journeySharing.TaskTrackingInfo.prototype.routePolylinePoints; + +/** + * The current execution state of the Task. + * @type {?string} + */ +google.maps.journeySharing.TaskTrackingInfo.prototype.state; + +/** + * The outcome of attempting to execute a Task. + * @type {?string} + */ +google.maps.journeySharing.TaskTrackingInfo.prototype.taskOutcome; + +/** + * The time when the Task's outcome was set by the provider. + * @type {?Date} + */ +google.maps.journeySharing.TaskTrackingInfo.prototype.taskOutcomeTime; + +/** + * The tracking ID of a Task.
+ * @type {string} + */ +google.maps.journeySharing.TaskTrackingInfo.prototype.trackingId; + /** * Available only in the v=beta channel: https://goo.gle/3oAthT3. * @@ -12464,32 +12602,28 @@ google.maps.journeySharing.VehicleJourneySegment = function() {}; * The travel distance from the previous stop to this stop, in meters. * @type {?number} */ -google.maps.journeySharing.VehicleJourneySegment.prototype.distanceMeters; +google.maps.journeySharing.VehicleJourneySegment.prototype + .drivingDistanceMeters; /** - * The travel time from the previous stop to this stop, in milliseconds. + * The travel time from the previous stop this stop, in milliseconds. * @type {?number} */ -google.maps.journeySharing.VehicleJourneySegment.prototype.durationMillis; +google.maps.journeySharing.VehicleJourneySegment.prototype + .drivingDurationMillis; /** - * The extra travel time due to the durations of the stop's tasks, in - * milliseconds. - * @type {?number} - */ -google.maps.journeySharing.VehicleJourneySegment.prototype.extraDurationMillis; - -/** - * The actual stop location. - * @type {?google.maps.LatLngLiteral} + * The path from the previous waypoint (or the vehicle's current location, + * if this waypoint is the first in the list of waypoints) to this waypoint. + * @type {?Array} */ -google.maps.journeySharing.VehicleJourneySegment.prototype.location; +google.maps.journeySharing.VehicleJourneySegment.prototype.path; /** - * The path from the previous stop to this stop. - * @type {?Array} + * The stops to be served by this vehicle. + * @type {?Array} */ -google.maps.journeySharing.VehicleJourneySegment.prototype.path; +google.maps.journeySharing.VehicleJourneySegment.prototype.stop; /** * Available only in the v=beta channel: https://goo.gle/3oAthT3. @@ -12507,7 +12641,7 @@ google.maps.journeySharing.VehicleLocationUpdate.prototype.heading; /** * The location of the update. - * @type {?google.maps.LatLngLiteral} + * @type {?google.maps.LatLngLiteral|?google.maps.LatLng} */ google.maps.journeySharing.VehicleLocationUpdate.prototype.location;