gtfs-to-html 2.6.4 → 2.6.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -5,6 +5,16 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [2.6.5] - 2024-05-11
9
+
10
+ ### Updated
11
+ - Timetable trip notes on vertical
12
+ - Use route_text_color in timetable continuations
13
+ - Dependency updates
14
+
15
+ ### Fixed
16
+ - Handle trips with nostoptimes in overview
17
+
8
18
  ## [2.6.4] - 2024-04-30
9
19
 
10
20
  ### Updated
package/lib/utils.js CHANGED
@@ -937,7 +937,7 @@ const getTripsWithSameBlock = (trip, timetable) => {
937
937
  * departs from the same stop and is a different route.
938
938
  */
939
939
  const addTripContinuation = (trip, timetable) => {
940
- if (!trip.block_id) {
940
+ if (!trip.block_id || trip.stoptimes.length === 0) {
941
941
  return;
942
942
  }
943
943
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gtfs-to-html",
3
- "version": "2.6.4",
3
+ "version": "2.6.5",
4
4
  "private": false,
5
5
  "description": "Build human readable transit timetables as HTML, PDF or CSV from GTFS",
6
6
  "keywords": [
@@ -51,7 +51,7 @@
51
51
  "morgan": "^1.10.0",
52
52
  "pretty-error": "^4.0.0",
53
53
  "pug": "^3.0.2",
54
- "puppeteer": "^22.6.5",
54
+ "puppeteer": "^22.8.0",
55
55
  "sanitize-filename": "^1.6.3",
56
56
  "sqlstring": "^2.3.3",
57
57
  "timer-machine": "^1.1.0",
@@ -1,6 +1,6 @@
1
1
  if trip.continues_as_route && trip.continues_as_route.route.route_color
2
2
  - var tdStyle = `background: #${trip.continues_as_route.route.route_color};`
3
- - var aStyle = 'color: #ffffff;'
3
+ - var aStyle = `color: #${trip.continues_as_route.route.route_text_color || 'ffffff'};`
4
4
  else
5
5
  - var tdStyle = ''
6
6
  - var aStyle = ''
@@ -1,6 +1,6 @@
1
1
  if trip.continues_from_route && trip.continues_from_route.route.route_color
2
2
  - var tdStyle = `background: #${trip.continues_from_route.route.route_color};`
3
- - var aStyle = 'color: #ffffff;'
3
+ - var aStyle = `color: #${trip.continues_from_route.route.route_text_color || 'ffffff'};`
4
4
  else
5
5
  - var tdStyle = ''
6
6
  - var aStyle = ''
@@ -7,6 +7,7 @@
7
7
  - return memo;
8
8
  - }, 0);
9
9
  - }
10
+ - var timetableHasTripNotes = timetable.orderedTrips.flatMap(trip => getNotesForTrip(timetable.notes, trip)).length > 0;
10
11
  .table-container
11
12
  table(summary= getTimetableSummary(timetable) data-orientation="vertical")
12
13
  caption.sr-only= `${timetable.timetable_label} | ${timetable.dayList}`
@@ -15,6 +16,8 @@
15
16
  col(id=`stop_id_${formatHtmlId(stop.stop_id)}` class=`stop-${idx}` data-stop-id=`${stop.stop_id}` data-is-timepoint=`${stop.is_timepoint}`)
16
17
  thead
17
18
  tr
19
+ if timetableHasTripNotes
20
+ th
18
21
  if timetable.has_continues_from_route
19
22
  th.stop-header.continues-from Continues from route
20
23
 
@@ -33,6 +36,8 @@
33
36
  tbody
34
37
  if timetable.frequencies && !timetable.frequencyExactTimes
35
38
  tr.trip-row
39
+ if timetableHasTripNotes
40
+ td
36
41
  if timetable.has_continues_from_route
37
42
  td
38
43
 
@@ -42,6 +47,10 @@
42
47
  td
43
48
  each trip, idx in timetable.orderedTrips
44
49
  tr.trip-row(id=`trip_id_${formatHtmlId(trip.trip_id)}`)
50
+ if timetableHasTripNotes
51
+ td.trip-notes
52
+ each note in getNotesForTrip(timetable.notes, trip)
53
+ include timetable_note_symbol.pug
45
54
  if timetable.has_continues_from_route
46
55
  include timetable_continuation_from.pug
47
56