@opentripplanner/core-utils 12.0.2 → 12.2.0
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/esm/__mocks__/fake-route-data.story.json +5425 -0
- package/esm/__mocks__/fake-transit-operators.story.json +97 -0
- package/esm/__tests__/__mocks__/routes.json +234 -105
- package/esm/query-gen.js +1 -3
- package/esm/query-gen.js.map +1 -1
- package/esm/route.js +38 -26
- package/esm/route.js.map +1 -1
- package/esm/routes.json +234 -105
- package/esm/time.js +10 -0
- package/esm/time.js.map +1 -1
- package/lib/__mocks__/fake-route-data.story.json +5425 -0
- package/lib/__mocks__/fake-transit-operators.story.json +97 -0
- package/lib/__tests__/__mocks__/routes.json +234 -105
- package/lib/query-gen.js +1 -1
- package/lib/query-gen.js.map +1 -1
- package/lib/route.d.ts +35 -1
- package/lib/route.d.ts.map +1 -1
- package/lib/route.js +41 -18
- package/lib/route.js.map +1 -1
- package/lib/time.d.ts +7 -0
- package/lib/time.d.ts.map +1 -1
- package/lib/time.js +12 -1
- package/lib/time.js.map +1 -1
- package/package.json +1 -1
- package/src/__mocks__/fake-route-data.story.json +5425 -0
- package/src/__mocks__/fake-transit-operators.story.json +97 -0
- package/src/__snapshots__/core-utils.story.tsx.snap +8382 -0
- package/src/__tests__/__mocks__/routes.json +234 -105
- package/src/__tests__/__snapshots__/route.js.snap +285 -95
- package/src/__tests__/route.js +27 -55
- package/src/core-utils.story.tsx +200 -1
- package/src/query-gen.ts +1 -1
- package/src/route.ts +41 -21
- package/src/time.ts +9 -0
- package/tsconfig.tsbuildinfo +1 -1
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
{
|
|
2
|
+
"fakeTransitOperators": [
|
|
3
|
+
{
|
|
4
|
+
"feedId": "kcm",
|
|
5
|
+
"agencyId": "kcm:23",
|
|
6
|
+
"name": "City of Seattle",
|
|
7
|
+
"logo": "https://s3.amazonaws.com/datatools-production/branding/agency_4_City_of_Seattle.png"
|
|
8
|
+
},
|
|
9
|
+
{
|
|
10
|
+
"feedId": "CommTrans",
|
|
11
|
+
"agencyId": "CommTrans:29",
|
|
12
|
+
"name": "Community Transit",
|
|
13
|
+
"logo": "https://s3.amazonaws.com/datatools-production/branding/agency_2_community_transit.png"
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
"feedId": "97",
|
|
17
|
+
"agencyId": "97:97",
|
|
18
|
+
"name": "Everett Transit",
|
|
19
|
+
"logo": "https://s3.amazonaws.com/datatools-production/branding/agency_2_Everett_Transit.png"
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
"feedId": "19",
|
|
23
|
+
"agencyId": "19:0",
|
|
24
|
+
"name": "Intercity Transit",
|
|
25
|
+
"logo": "https://s3.amazonaws.com/datatools-production/branding/intercity_transit_logo.jpg"
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
"feedId": "kcm",
|
|
29
|
+
"agencyId": "kcm:1",
|
|
30
|
+
"name": "King County Metro",
|
|
31
|
+
"logo": "https://s3.amazonaws.com/datatools-production/branding/agency_2_kcm.png"
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
"feedId": "Kitsap",
|
|
35
|
+
"agencyId": "Kitsap:kt",
|
|
36
|
+
"name": "Kitsap Transit",
|
|
37
|
+
"logo": "https://s3.amazonaws.com/datatools-production/branding/agency_2_Kitsap_Transit.png",
|
|
38
|
+
"order": 2
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
"feedId": "3",
|
|
42
|
+
"agencyId": "3:3",
|
|
43
|
+
"name": "Pierce Transit",
|
|
44
|
+
"logo": "https://s3.amazonaws.com/datatools-production/branding/agency_2_pierce_transit.png"
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
"feedId": "Skagit",
|
|
48
|
+
"agencyId": "Skagit:e0e4541a-2714-487b-b30c-f5c6cb4a310f",
|
|
49
|
+
"name": "Skagit Transit",
|
|
50
|
+
"logo": "https://s3.amazonaws.com/datatools-production/branding/agency_2_Skagit.png"
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
"feedId": "96",
|
|
54
|
+
"agencyId": "96:96",
|
|
55
|
+
"name": "Seattle Center Monorail",
|
|
56
|
+
"logo": "https://s3.amazonaws.com/datatools-production/branding/agency_2_seattle_monorail.png"
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
"feedId": "40",
|
|
60
|
+
"agencyId": "40:40",
|
|
61
|
+
"name": "Sound Transit",
|
|
62
|
+
"logo": "https://s3.amazonaws.com/datatools-production/branding/agency_2_sound_transit.png",
|
|
63
|
+
"order": 1
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
"feedId": "CommTrans",
|
|
67
|
+
"agencyId": "CommTrans:40",
|
|
68
|
+
"name": "Sound Transit",
|
|
69
|
+
"logo": "https://s3.amazonaws.com/datatools-production/branding/agency_2_sound_transit.png"
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
"feedId": "kcm",
|
|
73
|
+
"agencyId": "kcm:40",
|
|
74
|
+
"name": "Sound Transit",
|
|
75
|
+
"logo": "https://s3.amazonaws.com/datatools-production/branding/agency_2_sound_transit.png"
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
"feedId": "3",
|
|
79
|
+
"agencyId": "3:40",
|
|
80
|
+
"name": "Sound Transit",
|
|
81
|
+
"logo": "https://s3.amazonaws.com/datatools-production/branding/agency_2_sound_transit.png",
|
|
82
|
+
"order": 1
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
"feedId": "95",
|
|
86
|
+
"agencyId": "95:95",
|
|
87
|
+
"name": "Washington State Ferries",
|
|
88
|
+
"logo": "https://s3.amazonaws.com/datatools-production/branding/agency_2_wash_state_ferry.png"
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
"feedId": "Whatcom",
|
|
92
|
+
"agencyId": "Whatcom:14",
|
|
93
|
+
"name": "Whatcom Transportation Authority",
|
|
94
|
+
"logo": "https://s3.amazonaws.com/datatools-production/branding/agency_2_wta.png"
|
|
95
|
+
}
|
|
96
|
+
]
|
|
97
|
+
}
|
|
@@ -1,107 +1,236 @@
|
|
|
1
1
|
{
|
|
2
|
-
"
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
2
|
+
"otp1Routes": [
|
|
3
|
+
{
|
|
4
|
+
"agencyId": "bcd",
|
|
5
|
+
"longName": "Across town",
|
|
6
|
+
"mode": "BUS",
|
|
7
|
+
"shortName": "10",
|
|
8
|
+
"sortOrder": 10
|
|
9
|
+
},
|
|
10
|
+
{
|
|
11
|
+
"agencyId": "bcd",
|
|
12
|
+
"longName": "Around town",
|
|
13
|
+
"mode": "BUS",
|
|
14
|
+
"shortName": "20",
|
|
15
|
+
"sortOrder": 2
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
"agencyId": "bcd",
|
|
19
|
+
"longName": "Around another town",
|
|
20
|
+
"shortName": "3",
|
|
21
|
+
"sortOrder": -999,
|
|
22
|
+
"type": 3
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
"agencyId": "bcd",
|
|
26
|
+
"longName": "Loop route",
|
|
27
|
+
"mode": "BUS",
|
|
28
|
+
"shortName": "2",
|
|
29
|
+
"sortOrder": -999
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
"agencyId": "bcd",
|
|
33
|
+
"longName": "A-line",
|
|
34
|
+
"mode": "BUS",
|
|
35
|
+
"shortName": "A",
|
|
36
|
+
"sortOrder": -999
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
"agencyId": "bcd",
|
|
40
|
+
"longName": "B-line",
|
|
41
|
+
"mode": "BUS",
|
|
42
|
+
"shortName": "B",
|
|
43
|
+
"sortOrder": -999
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
"agencyId": "bcd",
|
|
47
|
+
"longName": "A meandering route",
|
|
48
|
+
"mode": "BUS",
|
|
49
|
+
"sortOrder": -999
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
"agencyId": "bcd",
|
|
53
|
+
"longName": "Zig-zagging route",
|
|
54
|
+
"mode": "BUS",
|
|
55
|
+
"shortName": "30",
|
|
56
|
+
"sortOrder": 2
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
"agencyId": "bcd",
|
|
60
|
+
"longName": "Express route",
|
|
61
|
+
"mode": "BUS",
|
|
62
|
+
"shortName": "30",
|
|
63
|
+
"sortOrder": 2
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
"agencyId": "bcd",
|
|
67
|
+
"longName": "Variation of express route",
|
|
68
|
+
"mode": "BUS",
|
|
69
|
+
"shortName": "30",
|
|
70
|
+
"sortOrder": 2
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
"agencyId": "bcd",
|
|
74
|
+
"longName": "Local route",
|
|
75
|
+
"mode": "BUS",
|
|
76
|
+
"shortName": "6",
|
|
77
|
+
"sortOrder": 2
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
"agencyId": "bcd",
|
|
81
|
+
"longName": "Intercity Train",
|
|
82
|
+
"mode": "RAIL",
|
|
83
|
+
"shortName": "IC",
|
|
84
|
+
"sortOrder": 2
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
"agencyId": "bcd",
|
|
88
|
+
"longName": "Yellow line Subway",
|
|
89
|
+
"mode": "SUBWAY",
|
|
90
|
+
"shortName": "Yellow",
|
|
91
|
+
"sortOrder": 2
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
"agencyId": "bcd",
|
|
95
|
+
"longName": "Xpress route C",
|
|
96
|
+
"mode": "BUS",
|
|
97
|
+
"shortName": "30C",
|
|
98
|
+
"sortOrder": 2
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
"agencyId": "bcd",
|
|
102
|
+
"longName": "Express route X",
|
|
103
|
+
"mode": "BUS",
|
|
104
|
+
"shortName": "30X"
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
"agencyId": "abc",
|
|
108
|
+
"agencyName": "Agency 1",
|
|
109
|
+
"longName": "Intercity Train 2",
|
|
110
|
+
"mode": "RAIL",
|
|
111
|
+
"routeId": "1:it2",
|
|
112
|
+
"shortName": "IC",
|
|
113
|
+
"sortOrder": 10
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
"agencyId": "abc",
|
|
117
|
+
"agencyName": "Acclaimed agency 1",
|
|
118
|
+
"longName": "Express route X",
|
|
119
|
+
"mode": "BUS",
|
|
120
|
+
"routeId": "2:erx",
|
|
121
|
+
"shortName": "30X",
|
|
122
|
+
"sortOrder": 10
|
|
123
|
+
}
|
|
124
|
+
],
|
|
125
|
+
"otp2Routes": [
|
|
126
|
+
{
|
|
127
|
+
"longName": "Across town",
|
|
128
|
+
"mode": "BUS",
|
|
129
|
+
"shortName": "10",
|
|
130
|
+
"sortOrder": 10
|
|
131
|
+
},
|
|
132
|
+
{
|
|
133
|
+
"longName": "Around town",
|
|
134
|
+
"mode": "BUS",
|
|
135
|
+
"shortName": "20",
|
|
136
|
+
"sortOrder": 2
|
|
137
|
+
},
|
|
138
|
+
{
|
|
139
|
+
"longName": "Around another town",
|
|
140
|
+
"shortName": "3",
|
|
141
|
+
"sortOrder": null,
|
|
142
|
+
"type": 3
|
|
143
|
+
},
|
|
144
|
+
{
|
|
145
|
+
"longName": "Loop route",
|
|
146
|
+
"mode": "BUS",
|
|
147
|
+
"shortName": "2",
|
|
148
|
+
"sortOrder": -999
|
|
149
|
+
},
|
|
150
|
+
{
|
|
151
|
+
"longName": "A-line",
|
|
152
|
+
"mode": "BUS",
|
|
153
|
+
"shortName": "A",
|
|
154
|
+
"sortOrder": -999
|
|
155
|
+
},
|
|
156
|
+
{
|
|
157
|
+
"longName": "B-line",
|
|
158
|
+
"mode": "BUS",
|
|
159
|
+
"shortName": "B"
|
|
160
|
+
},
|
|
161
|
+
{
|
|
162
|
+
"longName": "A meandering route",
|
|
163
|
+
"mode": "BUS"
|
|
164
|
+
},
|
|
165
|
+
{
|
|
166
|
+
"longName": "Zig-zagging route",
|
|
167
|
+
"mode": "BUS",
|
|
168
|
+
"shortName": "30",
|
|
169
|
+
"sortOrder": 2
|
|
170
|
+
},
|
|
171
|
+
{
|
|
172
|
+
"longName": "Express route",
|
|
173
|
+
"mode": "BUS",
|
|
174
|
+
"shortName": "30",
|
|
175
|
+
"sortOrder": 2
|
|
176
|
+
},
|
|
177
|
+
{
|
|
178
|
+
"longName": "Variation of express route",
|
|
179
|
+
"mode": "BUS",
|
|
180
|
+
"shortName": "30",
|
|
181
|
+
"sortOrder": 2
|
|
182
|
+
},
|
|
183
|
+
{
|
|
184
|
+
"longName": "Local route",
|
|
185
|
+
"mode": "BUS",
|
|
186
|
+
"shortName": "6",
|
|
187
|
+
"sortOrder": 2
|
|
188
|
+
},
|
|
189
|
+
{
|
|
190
|
+
"longName": "Intercity Train",
|
|
191
|
+
"mode": "RAIL",
|
|
192
|
+
"shortName": "IC",
|
|
193
|
+
"sortOrder": 2
|
|
194
|
+
},
|
|
195
|
+
{
|
|
196
|
+
"longName": "Yellow line Subway",
|
|
197
|
+
"mode": "SUBWAY",
|
|
198
|
+
"shortName": "Yellow",
|
|
199
|
+
"sortOrder": 2
|
|
200
|
+
},
|
|
201
|
+
{
|
|
202
|
+
"longName": "Xpress route C",
|
|
203
|
+
"mode": "BUS",
|
|
204
|
+
"shortName": "30C",
|
|
205
|
+
"sortOrder": 2
|
|
206
|
+
},
|
|
207
|
+
{
|
|
208
|
+
"longName": "Express route X",
|
|
209
|
+
"mode": "BUS",
|
|
210
|
+
"shortName": "30X",
|
|
211
|
+
"sortOrder": 2
|
|
212
|
+
},
|
|
213
|
+
{
|
|
214
|
+
"agency": {
|
|
215
|
+
"name": "Agency 1",
|
|
216
|
+
"id": "abc"
|
|
217
|
+
},
|
|
218
|
+
"longName": "Intercity Train 2",
|
|
219
|
+
"mode": "RAIL",
|
|
220
|
+
"routeId": "1:it2",
|
|
221
|
+
"shortName": "IC",
|
|
222
|
+
"sortOrder": 2
|
|
223
|
+
},
|
|
224
|
+
{
|
|
225
|
+
"agency": {
|
|
226
|
+
"name": "Acclaimed agency 1",
|
|
227
|
+
"id": "abc"
|
|
228
|
+
},
|
|
229
|
+
"longName": "Express route X",
|
|
230
|
+
"mode": "BUS",
|
|
231
|
+
"routeId": "2:erx",
|
|
232
|
+
"shortName": "30X",
|
|
233
|
+
"sortOrder": 2
|
|
234
|
+
}
|
|
235
|
+
]
|
|
107
236
|
}
|
package/lib/query-gen.js
CHANGED
|
@@ -124,7 +124,7 @@ function isCombinationValid(combo, queryTransitSubmodes) {
|
|
|
124
124
|
return false;
|
|
125
125
|
}
|
|
126
126
|
|
|
127
|
-
return !!VALID_COMBOS.find(vc => simplifiedModes.
|
|
127
|
+
return !!VALID_COMBOS.find(vc => simplifiedModes.length === vc.length && vc.every(m => simplifiedModes.includes(m)));
|
|
128
128
|
}
|
|
129
129
|
/**
|
|
130
130
|
* Generates a list of queries for OTP to get a comprehensive
|
package/lib/query-gen.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/query-gen.ts"],"names":["extractAdditionalModes","modeSettings","enabledModes","reduce","prev","cur","map","m","mode","includes","applicableMode","type","addTransportMode","value","newTransportModes","Array","isArray","transportMode","options","find","o","combinations","array","length","fill","e1","i","filter","e2","j","SIMPLIFICATIONS","AIRPLANE","BICYCLE","BUS","CABLE_CAR","CAR","FERRY","FLEX","FUNICULAR","GONDOLA","RAIL","MONORAIL","SCOOTER","SUBWAY","TROLLEYBUS","TRAM","TRANSIT","WALK","VALID_COMBOS","BANNED_TOGETHER","TRANSIT_SUBMODES","Object","keys","TRANSIT_SUBMODES_AND_TRANSIT","isCombinationValid","combo","queryTransitSubmodes","simplifiedModes","from","Set","c","qualifier","vc","every","generateCombinations","params","completeModeList","modes","generateOtp2Query","otpQueryParams","planQuery","DefaultPlanQuery","to","otherOtpQueryParams","modeSettingValues","inverseKey","high","low","key","truthValue","falseValue","bikeReluctance","carReluctance","walkReluctance","walkSpeed","wheelchair","query","variables","fromPlace","name","lat","lon","toPlace"],"mappings":";;;;;;;;;;AACA;;;;AA0CA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASA,sBAAT,CACLC,YADK,EAELC,YAFK,EAGY;AACjB,SAAOD,YAAY,CAACE,MAAb,CAAqC,CAACC,IAAD,EAAOC,GAAP,KAAe;AACzD;AACA,QAAI,CAACH,YAAY,CAACI,GAAb,CAAiBC,CAAC,IAAIA,CAAC,CAACC,IAAxB,EAA8BC,QAA9B,CAAuCJ,GAAG,CAACK,cAA3C,CAAL,EAAiE;AAC/D,aAAON,IAAP;AACD,KAJwD,CAMzD;;;AACA,QACE,CAACC,GAAG,CAACM,IAAJ,KAAa,UAAb,IAA2BN,GAAG,CAACM,IAAJ,KAAa,SAAzC,KACAN,GAAG,CAACO,gBADJ,IAEAP,GAAG,CAACQ,KAHN,EAIE;AACA,YAAMC,iBAAiB,GAAGC,KAAK,CAACC,OAAN,CAAcX,GAAG,CAACO,gBAAlB,IACtBP,GAAG,CAACO,gBADkB,GAEtB,CAACP,GAAG,CAACO,gBAAL,CAFJ;AAGA,aAAO,CAAC,GAAGR,IAAJ,EAAU,GAAGU,iBAAb,CAAP;AACD;;AACD,QAAIT,GAAG,CAACM,IAAJ,KAAa,UAAjB,EAA6B;AAAA;;AAC3B,YAAMM,aAAa,wBAAGZ,GAAG,CAACa,OAAJ,CAAYC,IAAZ,CAAiBC,CAAC,IAAIA,CAAC,CAACP,KAAF,KAAYR,GAAG,CAACQ,KAAtC,CAAH,sDAAG,kBAClBD,gBADJ;;AAEA,UAAIK,aAAJ,EAAmB;AACjB,eAAO,CAAC,GAAGb,IAAJ,EAAUa,aAAV,CAAP;AACD;AACF;;AACD,WAAOb,IAAP;AACD,GAzBM,EAyBJ,EAzBI,CAAP;AA0BD;AAED;AACA;AACA;AACA;AACA;AACA;AACA;;;AACA,SAASiB,YAAT,CAAsBC,KAAtB,EAAiE;AAC/D,MAAI,CAACA,KAAL,E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AAI,IAAGhC,IAAI,CAACiC,GAAI,EAJxC;AAKTC,MAAAA,OAAO,EAAG,GAAEpB,EAAE,CAACiB,IAAK,KAAIjB,EAAE,CAACkB,GAAI,IAAGlB,EAAE,CAACmB,GAAI,EALhC;AAMTR,MAAAA,cANS;AAOTC,MAAAA,SAPS;AAQTC,MAAAA;AARS;AAFN,GAAP;AAaD","sourcesContent":["import { LonLatOutput } from \"@conveyal/lonlat\";\nimport { print } from \"graphql\";\nimport {\n ModeSetting,\n ModeSettingValues,\n TransportMode\n} from \"@opentripplanner/types\";\n\nimport DefaultPlanQuery from \"./planQuery.graphql\";\n\ntype InputBanned = {\n routes?: string;\n agencies?: string;\n trips?: string;\n stops?: string;\n stopsHard?: string;\n};\n\ntype InputPreferred = {\n routes?: string;\n agencies?: string;\n unpreferredCost?: string;\n};\n\ntype OTPQueryParams = {\n arriveBy: boolean;\n date?: string;\n from: LonLatOutput & { name?: string };\n modes: TransportMode[];\n modeSettings: ModeSetting[];\n time?: string;\n numItineraries?: number;\n to: LonLatOutput & { name?: string };\n banned?: InputBanned;\n preferred?: InputPreferred;\n unpreferred?: InputPreferred;\n};\n\ntype GraphQLQuery = {\n query: string;\n variables: Record<string, unknown>;\n};\n\n/**\n * Mode Settings can contain additional modes to add to the query,\n * this function extracts those additional modes from the settings\n * and returns them in an array.\n * @param modeSettings List of mode settings with values populated\n * @returns Additional transport modes to add to query\n */\nexport function extractAdditionalModes(\n modeSettings: ModeSetting[],\n enabledModes: TransportMode[]\n): TransportMode[] {\n return modeSettings.reduce<TransportMode[]>((prev, cur) => {\n // First, ensure that the mode associated with this setting is even enabled\n if (!enabledModes.map(m => m.mode).includes(cur.applicableMode)) {\n return prev;\n }\n\n // In checkboxes, mode must be enabled and have a transport mode in it\n if (\n (cur.type === \"CHECKBOX\" || cur.type === \"SUBMODE\") &&\n cur.addTransportMode &&\n cur.value\n ) {\n const newTransportModes = Array.isArray(cur.addTransportMode)\n ? cur.addTransportMode\n : [cur.addTransportMode];\n return [...prev, ...newTransportModes];\n }\n if (cur.type === \"DROPDOWN\") {\n const transportMode = cur.options.find(o => o.value === cur.value)\n ?.addTransportMode;\n if (transportMode) {\n return [...prev, transportMode];\n }\n }\n return prev;\n }, []);\n}\n\n/**\n * Generates every possible mathematical subset of the input TransportModes.\n * Uses code from:\n * https://stackoverflow.com/questions/5752002/find-all-possible-subset-combos-in-an-array\n * @param array Array of input transport modes\n * @returns 2D array representing every possible subset of transport modes from input\n */\nfunction combinations(array: TransportMode[]): TransportMode[][] {\n if (!array) return [];\n return (\n // eslint-disable-next-line no-bitwise\n new Array(1 << array.length)\n .fill(null)\n // eslint-disable-next-line no-bitwise\n .map((e1, i) => array.filter((e2, j) => i & (1 << j)))\n );\n}\n\n/**\n * This constant maps all the transport mode to a broader mode type,\n * which is used to determine the valid combinations of modes used in query generation.\n */\nexport const SIMPLIFICATIONS = {\n AIRPLANE: \"TRANSIT\",\n BICYCLE: \"PERSONAL\",\n BUS: \"TRANSIT\",\n CABLE_CAR: \"TRANSIT\",\n CAR: \"CAR\",\n FERRY: \"TRANSIT\",\n FLEX: \"SHARED\", // TODO: this allows FLEX+WALK. Is this reasonable?\n FUNICULAR: \"TRANSIT\",\n GONDOLA: \"TRANSIT\",\n RAIL: \"TRANSIT\",\n MONORAIL: \"TRANSIT\",\n SCOOTER: \"PERSONAL\",\n SUBWAY: \"TRANSIT\",\n TROLLEYBUS: \"TRANSIT\",\n TRAM: \"TRANSIT\",\n TRANSIT: \"TRANSIT\",\n WALK: \"WALK\"\n};\n\n// Inclusion of \"TRANSIT\" alone automatically implies \"WALK\" in OTP\nconst VALID_COMBOS = [\n [\"WALK\"],\n [\"PERSONAL\"],\n [\"TRANSIT\", \"SHARED\"],\n [\"WALK\", \"SHARED\"],\n [\"TRANSIT\"],\n [\"TRANSIT\", \"PERSONAL\"],\n [\"TRANSIT\", \"CAR\"]\n];\n\nconst BANNED_TOGETHER = [\"SCOOTER\", \"BICYCLE\", \"CAR\"];\n\nexport const TRANSIT_SUBMODES = Object.keys(SIMPLIFICATIONS).filter(\n mode => SIMPLIFICATIONS[mode] === \"TRANSIT\" && mode !== \"TRANSIT\"\n);\nexport const TRANSIT_SUBMODES_AND_TRANSIT = Object.keys(SIMPLIFICATIONS).filter(\n mode => SIMPLIFICATIONS[mode] === \"TRANSIT\"\n);\n\nfunction isCombinationValid(\n combo: TransportMode[],\n queryTransitSubmodes: string[]\n): boolean {\n if (combo.length === 0) return false;\n\n // All current qualifiers currently simplify to \"SHARED\"\n const simplifiedModes = Array.from(\n new Set(combo.map(c => (c.qualifier ? \"SHARED\" : SIMPLIFICATIONS[c.mode])))\n );\n\n // Ensure that if we have one transit mode, then we include ALL transit modes\n if (simplifiedModes.includes(\"TRANSIT\")) {\n // Don't allow TRANSIT along with any other submodes\n if (queryTransitSubmodes.length && combo.find(c => c.mode === \"TRANSIT\")) {\n return false;\n }\n\n if (\n combo.reduce((prev, cur) => {\n if (queryTransitSubmodes.includes(cur.mode)) {\n return prev - 1;\n }\n return prev;\n }, queryTransitSubmodes.length) !== 0\n ) {\n return false;\n }\n // Continue to the other checks\n }\n\n // OTP doesn't support multiple non-walk modes\n if (BANNED_TOGETHER.filter(m => combo.find(c => c.mode === m)).length > 1) {\n return false;\n }\n\n return !!VALID_COMBOS.find(\n vc =>\n simplifiedModes.every(m => vc.includes(m)) &&\n vc.every(m => simplifiedModes.includes(m))\n );\n}\n\n/**\n * Generates a list of queries for OTP to get a comprehensive\n * set of results based on the modes input.\n * @param params OTP Query Params\n * @returns Set of parameters to generate queries\n */\nexport function generateCombinations(params: OTPQueryParams): OTPQueryParams[] {\n const completeModeList = [\n ...extractAdditionalModes(params.modeSettings, params.modes),\n ...params.modes\n ];\n\n // List of the transit *submodes* that are included in the input params\n const queryTransitSubmodes = completeModeList\n .filter(mode => TRANSIT_SUBMODES.includes(mode.mode))\n .map(mode => mode.mode);\n\n return combinations(completeModeList)\n .filter(combo => isCombinationValid(combo, queryTransitSubmodes))\n .map(combo => ({ ...params, modes: combo }));\n}\n\n/**\n * Generates a query for OTP GraphQL API based on parameters.\n * @param param0 OTP2 Parameters for the query\n * @param planQuery Override the default query for OTP\n * @returns A fully formed query+variables ready to be sent to GraphQL backend\n */\nexport function generateOtp2Query(\n otpQueryParams: OTPQueryParams,\n planQuery = DefaultPlanQuery\n): GraphQLQuery {\n const { from, modeSettings, to, ...otherOtpQueryParams } = otpQueryParams;\n\n // This extracts the values from the mode settings to key value pairs\n const modeSettingValues = modeSettings.reduce((prev, cur) => {\n if (cur.type === \"SLIDER\" && cur.inverseKey) {\n prev[cur.inverseKey] = cur.high - cur.value + cur.low;\n }\n prev[cur.key] = cur.value;\n\n // If we assign a value on true, return the value (or null) instead of a boolean.\n if (cur.type === \"CHECKBOX\" && cur.truthValue) {\n prev[cur.key] =\n cur.value === true ? cur.truthValue : cur.falseValue ?? null;\n }\n return prev;\n }, {}) as ModeSettingValues;\n\n const {\n bikeReluctance,\n carReluctance,\n walkReluctance,\n walkSpeed,\n wheelchair\n } = modeSettingValues;\n\n return {\n query: print(planQuery),\n variables: {\n ...otherOtpQueryParams,\n bikeReluctance,\n carReluctance,\n fromPlace: `${from.name}::${from.lat},${from.lon}`,\n toPlace: `${to.name}::${to.lat},${to.lon}`,\n walkReluctance,\n walkSpeed,\n wheelchair\n }\n };\n}\n"],"file":"query-gen.js"}
|
|
1
|
+
{"version":3,"sources":["../src/query-gen.ts"],"names":["extractAdditionalModes","modeSettings","enabledModes","reduce","prev","cur","map","m","mode","includes","applicableMode","type","addTransportMode","value","newTransportModes","Array","isArray","transportMode","options","find","o","combinations","array","length","fill","e1","i","filter","e2","j","SIMPLIFICATIONS","AIRPLANE","BICYCLE","BUS","CABLE_CAR","CAR","FERRY","FLEX","FUNICULAR","GONDOLA","RAIL","MONORAIL","SCOOTER","SUBWAY","TROLLEYBUS","TRAM","TRANSIT","WALK","VALID_COMBOS","BANNED_TOGETHER","TRANSIT_SUBMODES","Object","keys","TRANSIT_SUBMODES_AND_TRANSIT","isCombinationValid","combo","queryTransitSubmodes","simplifiedModes","from","Set","c","qualifier","vc","every","generateCombinations","params","completeModeList","modes","generateOtp2Query","otpQueryParams","planQuery","DefaultPlanQuery","to","otherOtpQueryParams","modeSettingValues","inverseKey","high","low","key","truthValue","falseValue","bikeReluctance","carReluctance","walkReluctance","walkSpeed","wheelchair","query","variables","fromPlace","name","lat","lon","toPlace"],"mappings":";;;;;;;;;;AACA;;;;AA0CA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASA,sBAAT,CACLC,YADK,EAELC,YAFK,EAGY;AACjB,SAAOD,YAAY,CAACE,MAAb,CAAqC,CAACC,IAAD,EAAOC,GAAP,KAAe;AACzD;AACA,QAAI,CAACH,YAAY,CAACI,GAAb,CAAiBC,CAAC,IAAIA,CAAC,CAACC,IAAxB,EAA8BC,QAA9B,CAAuCJ,GAAG,CAACK,cAA3C,CAAL,EAAiE;AAC/D,aAAON,IAAP;AACD,KAJwD,CAMzD;;;AACA,QACE,CAACC,GAAG,CAACM,IAAJ,KAAa,UAAb,IAA2BN,GAAG,CAACM,IAAJ,KAAa,SAAzC,KACAN,GAAG,CAACO,gBADJ,IAEAP,GAAG,CAACQ,KAHN,EAIE;AACA,YAAMC,iBAAiB,GAAGC,KAAK,CAACC,OAAN,CAAcX,GAAG,CAACO,gBAAlB,IACtBP,GAAG,CAACO,gBADkB,GAEtB,CAACP,GAAG,CAACO,gBAAL,CAFJ;AAGA,aAAO,CAAC,GAAGR,IAAJ,EAAU,GAAGU,iBAAb,CAAP;AACD;;AACD,QAAIT,GAAG,CAACM,IAAJ,KAAa,UAAjB,EAA6B;AAAA;;AAC3B,YAAMM,aAAa,wBAAGZ,GAAG,CAACa,OAAJ,CAAYC,IAAZ,CAAiBC,CAAC,IAAIA,CAAC,CAACP,KAAF,KAAYR,GAAG,CAACQ,KAAtC,CAAH,sDAAG,kBAClBD,gBADJ;;AAEA,UAAIK,aAAJ,EAAmB;AACjB,eAAO,CAAC,GAAGb,IAAJ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AELiB,IAAAA,SAAS,EAAE,EACT,GAAGd,mBADM;AAETQ,MAAAA,cAFS;AAGTC,MAAAA,aAHS;AAITM,MAAAA,SAAS,EAAG,GAAE9B,IAAI,CAAC+B,IAAK,KAAI/B,IAAI,CAACgC,GAAI,IAAGhC,IAAI,CAACiC,GAAI,EAJxC;AAKTC,MAAAA,OAAO,EAAG,GAAEpB,EAAE,CAACiB,IAAK,KAAIjB,EAAE,CAACkB,GAAI,IAAGlB,EAAE,CAACmB,GAAI,EALhC;AAMTR,MAAAA,cANS;AAOTC,MAAAA,SAPS;AAQTC,MAAAA;AARS;AAFN,GAAP;AAaD","sourcesContent":["import { LonLatOutput } from \"@conveyal/lonlat\";\nimport { print } from \"graphql\";\nimport {\n ModeSetting,\n ModeSettingValues,\n TransportMode\n} from \"@opentripplanner/types\";\n\nimport DefaultPlanQuery from \"./planQuery.graphql\";\n\ntype InputBanned = {\n routes?: string;\n agencies?: string;\n trips?: string;\n stops?: string;\n stopsHard?: string;\n};\n\ntype InputPreferred = {\n routes?: string;\n agencies?: string;\n unpreferredCost?: string;\n};\n\ntype OTPQueryParams = {\n arriveBy: boolean;\n date?: string;\n from: LonLatOutput & { name?: string };\n modes: TransportMode[];\n modeSettings: ModeSetting[];\n time?: string;\n numItineraries?: number;\n to: LonLatOutput & { name?: string };\n banned?: InputBanned;\n preferred?: InputPreferred;\n unpreferred?: InputPreferred;\n};\n\ntype GraphQLQuery = {\n query: string;\n variables: Record<string, unknown>;\n};\n\n/**\n * Mode Settings can contain additional modes to add to the query,\n * this function extracts those additional modes from the settings\n * and returns them in an array.\n * @param modeSettings List of mode settings with values populated\n * @returns Additional transport modes to add to query\n */\nexport function extractAdditionalModes(\n modeSettings: ModeSetting[],\n enabledModes: TransportMode[]\n): TransportMode[] {\n return modeSettings.reduce<TransportMode[]>((prev, cur) => {\n // First, ensure that the mode associated with this setting is even enabled\n if (!enabledModes.map(m => m.mode).includes(cur.applicableMode)) {\n return prev;\n }\n\n // In checkboxes, mode must be enabled and have a transport mode in it\n if (\n (cur.type === \"CHECKBOX\" || cur.type === \"SUBMODE\") &&\n cur.addTransportMode &&\n cur.value\n ) {\n const newTransportModes = Array.isArray(cur.addTransportMode)\n ? cur.addTransportMode\n : [cur.addTransportMode];\n return [...prev, ...newTransportModes];\n }\n if (cur.type === \"DROPDOWN\") {\n const transportMode = cur.options.find(o => o.value === cur.value)\n ?.addTransportMode;\n if (transportMode) {\n return [...prev, transportMode];\n }\n }\n return prev;\n }, []);\n}\n\n/**\n * Generates every possible mathematical subset of the input TransportModes.\n * Uses code from:\n * https://stackoverflow.com/questions/5752002/find-all-possible-subset-combos-in-an-array\n * @param array Array of input transport modes\n * @returns 2D array representing every possible subset of transport modes from input\n */\nfunction combinations(array: TransportMode[]): TransportMode[][] {\n if (!array) return [];\n return (\n // eslint-disable-next-line no-bitwise\n new Array(1 << array.length)\n .fill(null)\n // eslint-disable-next-line no-bitwise\n .map((e1, i) => array.filter((e2, j) => i & (1 << j)))\n );\n}\n\n/**\n * This constant maps all the transport mode to a broader mode type,\n * which is used to determine the valid combinations of modes used in query generation.\n */\nexport const SIMPLIFICATIONS = {\n AIRPLANE: \"TRANSIT\",\n BICYCLE: \"PERSONAL\",\n BUS: \"TRANSIT\",\n CABLE_CAR: \"TRANSIT\",\n CAR: \"CAR\",\n FERRY: \"TRANSIT\",\n FLEX: \"SHARED\", // TODO: this allows FLEX+WALK. Is this reasonable?\n FUNICULAR: \"TRANSIT\",\n GONDOLA: \"TRANSIT\",\n RAIL: \"TRANSIT\",\n MONORAIL: \"TRANSIT\",\n SCOOTER: \"PERSONAL\",\n SUBWAY: \"TRANSIT\",\n TROLLEYBUS: \"TRANSIT\",\n TRAM: \"TRANSIT\",\n TRANSIT: \"TRANSIT\",\n WALK: \"WALK\"\n};\n\n// Inclusion of \"TRANSIT\" alone automatically implies \"WALK\" in OTP\nconst VALID_COMBOS = [\n [\"WALK\"],\n [\"PERSONAL\"],\n [\"TRANSIT\", \"SHARED\"],\n [\"WALK\", \"SHARED\"],\n [\"TRANSIT\"],\n [\"TRANSIT\", \"PERSONAL\"],\n [\"TRANSIT\", \"CAR\"]\n];\n\nconst BANNED_TOGETHER = [\"SCOOTER\", \"BICYCLE\", \"CAR\"];\n\nexport const TRANSIT_SUBMODES = Object.keys(SIMPLIFICATIONS).filter(\n mode => SIMPLIFICATIONS[mode] === \"TRANSIT\" && mode !== \"TRANSIT\"\n);\nexport const TRANSIT_SUBMODES_AND_TRANSIT = Object.keys(SIMPLIFICATIONS).filter(\n mode => SIMPLIFICATIONS[mode] === \"TRANSIT\"\n);\n\nfunction isCombinationValid(\n combo: TransportMode[],\n queryTransitSubmodes: string[]\n): boolean {\n if (combo.length === 0) return false;\n\n // All current qualifiers currently simplify to \"SHARED\"\n const simplifiedModes = Array.from(\n new Set(combo.map(c => (c.qualifier ? \"SHARED\" : SIMPLIFICATIONS[c.mode])))\n );\n\n // Ensure that if we have one transit mode, then we include ALL transit modes\n if (simplifiedModes.includes(\"TRANSIT\")) {\n // Don't allow TRANSIT along with any other submodes\n if (queryTransitSubmodes.length && combo.find(c => c.mode === \"TRANSIT\")) {\n return false;\n }\n\n if (\n combo.reduce((prev, cur) => {\n if (queryTransitSubmodes.includes(cur.mode)) {\n return prev - 1;\n }\n return prev;\n }, queryTransitSubmodes.length) !== 0\n ) {\n return false;\n }\n // Continue to the other checks\n }\n\n // OTP doesn't support multiple non-walk modes\n if (BANNED_TOGETHER.filter(m => combo.find(c => c.mode === m)).length > 1) {\n return false;\n }\n\n return !!VALID_COMBOS.find(\n vc =>\n simplifiedModes.length === vc.length &&\n vc.every(m => simplifiedModes.includes(m))\n );\n}\n\n/**\n * Generates a list of queries for OTP to get a comprehensive\n * set of results based on the modes input.\n * @param params OTP Query Params\n * @returns Set of parameters to generate queries\n */\nexport function generateCombinations(params: OTPQueryParams): OTPQueryParams[] {\n const completeModeList = [\n ...extractAdditionalModes(params.modeSettings, params.modes),\n ...params.modes\n ];\n\n // List of the transit *submodes* that are included in the input params\n const queryTransitSubmodes = completeModeList\n .filter(mode => TRANSIT_SUBMODES.includes(mode.mode))\n .map(mode => mode.mode);\n\n return combinations(completeModeList)\n .filter(combo => isCombinationValid(combo, queryTransitSubmodes))\n .map(combo => ({ ...params, modes: combo }));\n}\n\n/**\n * Generates a query for OTP GraphQL API based on parameters.\n * @param param0 OTP2 Parameters for the query\n * @param planQuery Override the default query for OTP\n * @returns A fully formed query+variables ready to be sent to GraphQL backend\n */\nexport function generateOtp2Query(\n otpQueryParams: OTPQueryParams,\n planQuery = DefaultPlanQuery\n): GraphQLQuery {\n const { from, modeSettings, to, ...otherOtpQueryParams } = otpQueryParams;\n\n // This extracts the values from the mode settings to key value pairs\n const modeSettingValues = modeSettings.reduce((prev, cur) => {\n if (cur.type === \"SLIDER\" && cur.inverseKey) {\n prev[cur.inverseKey] = cur.high - cur.value + cur.low;\n }\n prev[cur.key] = cur.value;\n\n // If we assign a value on true, return the value (or null) instead of a boolean.\n if (cur.type === \"CHECKBOX\" && cur.truthValue) {\n prev[cur.key] =\n cur.value === true ? cur.truthValue : cur.falseValue ?? null;\n }\n return prev;\n }, {}) as ModeSettingValues;\n\n const {\n bikeReluctance,\n carReluctance,\n walkReluctance,\n walkSpeed,\n wheelchair\n } = modeSettingValues;\n\n return {\n query: print(planQuery),\n variables: {\n ...otherOtpQueryParams,\n bikeReluctance,\n carReluctance,\n fromPlace: `${from.name}::${from.lat},${from.lon}`,\n toPlace: `${to.name}::${to.lat},${to.lon}`,\n walkReluctance,\n walkSpeed,\n wheelchair\n }\n };\n}\n"],"file":"query-gen.js"}
|
package/lib/route.d.ts
CHANGED
|
@@ -32,6 +32,22 @@ export declare function getTransitOperatorFromLeg(leg: Leg, transitOperators: Tr
|
|
|
32
32
|
* @return {object} the operator if one was found or null if no match was found
|
|
33
33
|
*/
|
|
34
34
|
export declare function getTransitOperatorFromOtpRoute(route: Route, transitOperators: TransitOperator[]): TransitOperator;
|
|
35
|
+
/**
|
|
36
|
+
* Calculates the sort comparator value given two routes based off of the
|
|
37
|
+
* route's agency and provided transitOperators config data.
|
|
38
|
+
*/
|
|
39
|
+
export declare function makeTransitOperatorComparator(transitOperators: TransitOperator[]): (a: Route, b: Route) => number;
|
|
40
|
+
/**
|
|
41
|
+
* Calculates the sort comparator value given two routes based off of route type
|
|
42
|
+
* (OTP mode).
|
|
43
|
+
*/
|
|
44
|
+
export declare function routeTypeComparator(a: Route, b: Route): number;
|
|
45
|
+
/**
|
|
46
|
+
* Sorts routes based off of whether the shortName begins with an alphabetic
|
|
47
|
+
* character. Routes with shortn that do start with an alphabetic character will
|
|
48
|
+
* be prioritized over those that don't.
|
|
49
|
+
*/
|
|
50
|
+
export declare function alphabeticShortNameComparator(a: Route, b: Route): number;
|
|
35
51
|
/**
|
|
36
52
|
* Checks whether an appropriate comparison of numeric values can be made for
|
|
37
53
|
* sorting purposes. If both values are not valid numbers according to the
|
|
@@ -51,7 +67,7 @@ export declare function getTransitOperatorFromOtpRoute(route: Route, transitOper
|
|
|
51
67
|
* @param {function} [objGetterFn] An optional function to obtain the
|
|
52
68
|
* comparison value from the comparator function arguments
|
|
53
69
|
*/
|
|
54
|
-
export declare function makeNumericValueComparator(objGetterFn?: (item: Route) => number): (a: number, b: number) => number;
|
|
70
|
+
export declare function makeNumericValueComparator(objGetterFn?: (item: Route) => number): (a: number, b: number) => number | null;
|
|
55
71
|
/**
|
|
56
72
|
* Create a comparator function that compares string values. The comparison
|
|
57
73
|
* values feed to the sort comparator function are assumed to be objects that
|
|
@@ -63,6 +79,24 @@ export declare function makeNumericValueComparator(objGetterFn?: (item: Route) =
|
|
|
63
79
|
* comparison value from the comparator function arguments
|
|
64
80
|
*/
|
|
65
81
|
export declare function makeStringValueComparator(objGetterFn?: (item: Route) => string): (a: string, b: string) => number;
|
|
82
|
+
/**
|
|
83
|
+
* OTP1 sets the routeSortOrder to -999 by default. If we're encountering that value in OTP1,
|
|
84
|
+
* assume that it actually means that the route sortOrder is not set in the GTFS. If we encounter
|
|
85
|
+
* it in OTP2, it's a valid value, so we should return it.
|
|
86
|
+
*
|
|
87
|
+
* See https://github.com/opentripplanner/OpenTripPlanner/issues/2938
|
|
88
|
+
* Also see https://github.com/opentripplanner/otp-react-redux/issues/122
|
|
89
|
+
* This was updated in OTP2 TO be empty by default. https://docs.opentripplanner.org/en/v2.3.0/OTP2-MigrationGuide/#:~:text=the%20Alerts-,Changes%20to%20the%20Index%20API,-Error%20handling%20is
|
|
90
|
+
*/
|
|
91
|
+
export declare function getRouteSortOrderValue(route: Route): number;
|
|
92
|
+
/**
|
|
93
|
+
* Create a multi-criteria sort comparator function composed of other sort
|
|
94
|
+
* comparator functions. Each comparator function will be ran in the order given
|
|
95
|
+
* until a non-zero comparison value is obtained which is then immediately
|
|
96
|
+
* returned. If all comparison functions return equivalence, then the values
|
|
97
|
+
* are assumed to be equivalent.
|
|
98
|
+
*/
|
|
99
|
+
export declare function makeMultiCriteriaSort(...criteria: ((a: unknown, b: unknown) => number)[]): (a: number, b: number) => number;
|
|
66
100
|
/**
|
|
67
101
|
* Creates a sort comparator function to compares routes for the purposes of
|
|
68
102
|
* sorting and displaying in a user interface. This takes in a single optional
|
package/lib/route.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"route.d.ts","sourceRoot":"","sources":["../src/route.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,KAAK,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAErE;;;;;;;;;;;GAWG;AACH,wBAAgB,uCAAuC,CACrD,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,MAAM,GAAG,MAAM,EACzB,gBAAgB,EAAE,eAAe,EAAE,GAClC,eAAe,CAQjB;AAED;;;;;;;GAOG;AACH,wBAAgB,yBAAyB,CACvC,GAAG,EAAE,GAAG,EACR,gBAAgB,EAAE,eAAe,EAAE,GAClC,eAAe,CAQjB;AAED;;;;;;;;;GASG;AACH,wBAAgB,8BAA8B,CA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