@sbb-esta/lyne-elements-experimental-dev 4.7.0-dev.1773388997 → 4.7.0-dev.1773396173
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/autocomplete-grid/autocomplete-grid/autocomplete-grid.component.js +76 -65
- package/autocomplete-grid/autocomplete-grid-button/autocomplete-grid-button.component.js +52 -72
- package/autocomplete-grid/autocomplete-grid-button.js +6 -3
- package/autocomplete-grid/autocomplete-grid-cell/autocomplete-grid-cell.component.js +17 -2
- package/autocomplete-grid/autocomplete-grid-cell.js +7 -4
- package/autocomplete-grid/autocomplete-grid-optgroup/autocomplete-grid-optgroup.component.js +21 -20
- package/autocomplete-grid/autocomplete-grid-optgroup.js +6 -3
- package/autocomplete-grid/autocomplete-grid-option/autocomplete-grid-option.component.js +33 -2
- package/autocomplete-grid/autocomplete-grid-option.js +9 -4
- package/autocomplete-grid/autocomplete-grid-row/autocomplete-grid-row.component.js +22 -2
- package/autocomplete-grid/autocomplete-grid-row.js +7 -4
- package/autocomplete-grid/autocomplete-grid.js +6 -3
- package/autocomplete-grid.js +21 -9
- package/autocomplete-grid.pure.js +15 -7
- package/core/datetime/date-helper.js +191 -2
- package/core/datetime.js +5 -2
- package/core/timetable/access-leg-helper.js +71 -76
- package/core/timetable/timetable-helper.js +11 -9
- package/core/timetable/timetable-properties.js +1 -0
- package/core/timetable.js +7 -3
- package/development/autocomplete-grid/autocomplete-grid/autocomplete-grid.component.js +122 -114
- package/development/autocomplete-grid/autocomplete-grid-button/autocomplete-grid-button.component.js +70 -92
- package/development/autocomplete-grid/autocomplete-grid-button.js +4 -6
- package/development/autocomplete-grid/autocomplete-grid-cell/autocomplete-grid-cell.component.js +29 -2
- package/development/autocomplete-grid/autocomplete-grid-cell.js +5 -7
- package/development/autocomplete-grid/autocomplete-grid-optgroup/autocomplete-grid-optgroup.component.js +22 -27
- package/development/autocomplete-grid/autocomplete-grid-optgroup.js +4 -6
- package/development/autocomplete-grid/autocomplete-grid-option/autocomplete-grid-option.component.js +109 -2
- package/development/autocomplete-grid/autocomplete-grid-option.js +7 -7
- package/development/autocomplete-grid/autocomplete-grid-row/autocomplete-grid-row.component.js +91 -2
- package/development/autocomplete-grid/autocomplete-grid-row.js +5 -7
- package/development/autocomplete-grid/autocomplete-grid.js +4 -6
- package/development/autocomplete-grid.js +14 -10
- package/development/autocomplete-grid.pure.js +13 -4
- package/development/core/datetime/date-helper.js +285 -2
- package/development/core/datetime.js +6 -2
- package/development/core/timetable/access-leg-helper.js +82 -104
- package/development/core/timetable/timetable-helper.js +17 -16
- package/development/core/timetable/timetable-properties.js +2 -0
- package/development/core/timetable.js +8 -3
- package/development/differenceInMinutes-B0dawX-5.js +26 -0
- package/development/format-BMkeaqaF.js +1433 -0
- package/development/isValid-BYRch7pV.js +53 -0
- package/development/journey-summary/journey-summary.component.js +288 -2
- package/development/journey-summary.js +5 -8
- package/development/journey-summary.pure.js +5 -2
- package/development/pearl-chain/pearl-chain.component.js +634 -2
- package/development/pearl-chain-time/pearl-chain-time.component.js +306 -2
- package/development/pearl-chain-time.js +5 -8
- package/development/pearl-chain-time.pure.js +5 -2
- package/development/pearl-chain-vertical/pearl-chain-vertical.component.js +28 -2
- package/development/pearl-chain-vertical-item/pearl-chain-vertical-item.component.js +393 -2
- package/development/pearl-chain-vertical-item.js +5 -8
- package/development/pearl-chain-vertical-item.pure.js +5 -2
- package/development/pearl-chain-vertical.js +5 -8
- package/development/pearl-chain-vertical.pure.js +5 -2
- package/development/pearl-chain.js +5 -8
- package/development/pearl-chain.pure.js +5 -2
- package/development/seat-reservation/common/mapper/icon-mapper.js +71 -168
- package/development/seat-reservation/common/mapper/mapper.js +122 -153
- package/development/seat-reservation/common/mapper/sample-data/seat-reservation-sample-data-bus.js +559 -570
- package/development/seat-reservation/common/mapper/sample-data/seat-reservation-sample-data-decks.js +972 -992
- package/development/seat-reservation/common/mapper/sample-data/seat-reservation-sample-data-giruno.js +20367 -20334
- package/development/seat-reservation/common/mapper/sample-data/seat-reservation-sample-data-others.js +1738 -1731
- package/development/seat-reservation/common/mapper/sample-data/seat-reservation-sample-data-train.js +9782 -9741
- package/development/seat-reservation/common/mapper.js +8 -1
- package/development/seat-reservation/common/svgs.js +46 -2
- package/development/seat-reservation/common/translations/i18n.js +900 -1118
- package/development/seat-reservation/common/translations.js +4 -1
- package/development/seat-reservation/common/types.js +2 -0
- package/development/seat-reservation/common.js +11 -7
- package/development/seat-reservation/seat-reservation/seat-reservation-base-element.js +1230 -1305
- package/development/seat-reservation/seat-reservation/seat-reservation.component.js +859 -2
- package/development/seat-reservation/seat-reservation-area/seat-reservation-area.component.js +106 -2
- package/development/seat-reservation/seat-reservation-area.js +5 -7
- package/development/seat-reservation/seat-reservation-graphic/seat-reservation-assets.js +34 -35
- package/development/seat-reservation/seat-reservation-graphic/seat-reservation-graphic.component.js +162 -2
- package/development/seat-reservation/seat-reservation-graphic.js +5 -7
- package/development/seat-reservation/seat-reservation-navigation-coach/seat-reservation-navigation-coach.component.js +713 -2
- package/development/seat-reservation/seat-reservation-navigation-coach.js +5 -7
- package/development/seat-reservation/seat-reservation-navigation-services/seat-reservation-navigation-services.component.js +131 -2
- package/development/seat-reservation/seat-reservation-navigation-services.js +5 -7
- package/development/seat-reservation/seat-reservation-place-control/seat-reservation-place-control.component.js +601 -2
- package/development/seat-reservation/seat-reservation-place-control.js +5 -7
- package/development/seat-reservation/seat-reservation-scoped/seat-reservation-scoped.component.js +22 -2
- package/development/seat-reservation/seat-reservation-scoped.js +5 -7
- package/development/seat-reservation/seat-reservation.js +6 -7
- package/development/seat-reservation.js +28 -15
- package/development/seat-reservation.pure.js +28 -10
- package/development/timetable-duration/timetable-duration.component.js +108 -2
- package/development/timetable-duration.js +5 -8
- package/development/timetable-duration.pure.js +5 -2
- package/development/timetable-row/timetable-row.component.js +781 -2
- package/development/timetable-row.js +13 -8
- package/development/timetable-row.pure.js +12 -2
- package/development/toDate-BWb6Z1JD.js +24 -0
- package/differenceInMinutes-COvvdYsJ.js +23 -0
- package/format-CmKROkbc.js +1186 -0
- package/isValid-m3_OsPaB.js +45 -0
- package/journey-summary/journey-summary.component.js +194 -2
- package/journey-summary.js +4 -5
- package/journey-summary.pure.js +4 -2
- package/package.json +2 -2
- package/pearl-chain/pearl-chain.component.js +165 -2
- package/pearl-chain-time/pearl-chain-time.component.js +157 -2
- package/pearl-chain-time.js +4 -5
- package/pearl-chain-time.pure.js +4 -2
- package/pearl-chain-vertical/pearl-chain-vertical.component.js +17 -2
- package/pearl-chain-vertical-item/pearl-chain-vertical-item.component.js +77 -2
- package/pearl-chain-vertical-item.js +4 -5
- package/pearl-chain-vertical-item.pure.js +4 -2
- package/pearl-chain-vertical.js +4 -5
- package/pearl-chain-vertical.pure.js +4 -2
- package/pearl-chain.js +4 -5
- package/pearl-chain.pure.js +4 -2
- package/seat-reservation/common/mapper/icon-mapper.js +71 -71
- package/seat-reservation/common/mapper/mapper.js +89 -95
- package/seat-reservation/common/mapper/sample-data/seat-reservation-sample-data-bus.js +558 -568
- package/seat-reservation/common/mapper/sample-data/seat-reservation-sample-data-decks.js +970 -989
- package/seat-reservation/common/mapper/sample-data/seat-reservation-sample-data-giruno.js +20366 -20332
- package/seat-reservation/common/mapper/sample-data/seat-reservation-sample-data-others.js +1737 -1729
- package/seat-reservation/common/mapper/sample-data/seat-reservation-sample-data-train.js +9781 -9739
- package/seat-reservation/common/mapper.js +9 -3
- package/seat-reservation/common/svgs.js +243 -2
- package/seat-reservation/common/translations/i18n.js +891 -1084
- package/seat-reservation/common/translations.js +4 -2
- package/seat-reservation/common/types.js +1 -0
- package/seat-reservation/common.js +15 -9
- package/seat-reservation/seat-reservation/seat-reservation-base-element.js +810 -832
- package/seat-reservation/seat-reservation/seat-reservation.component.js +420 -2
- package/seat-reservation/seat-reservation-area/seat-reservation-area.component.js +51 -2
- package/seat-reservation/seat-reservation-area.js +7 -4
- package/seat-reservation/seat-reservation-graphic/seat-reservation-assets.js +71 -68
- package/seat-reservation/seat-reservation-graphic/seat-reservation-graphic.component.js +75 -2
- package/seat-reservation/seat-reservation-graphic.js +7 -4
- package/seat-reservation/seat-reservation-navigation-coach/seat-reservation-navigation-coach.component.js +234 -2
- package/seat-reservation/seat-reservation-navigation-coach.js +7 -4
- package/seat-reservation/seat-reservation-navigation-services/seat-reservation-navigation-services.component.js +85 -2
- package/seat-reservation/seat-reservation-navigation-services.js +7 -4
- package/seat-reservation/seat-reservation-place-control/seat-reservation-place-control.component.js +203 -2
- package/seat-reservation/seat-reservation-place-control.js +7 -4
- package/seat-reservation/seat-reservation-scoped/seat-reservation-scoped.component.js +13 -2
- package/seat-reservation/seat-reservation-scoped.js +7 -4
- package/seat-reservation/seat-reservation.js +9 -5
- package/seat-reservation.js +39 -17
- package/seat-reservation.pure.js +32 -15
- package/timetable-duration/timetable-duration.component.js +57 -2
- package/timetable-duration.js +4 -5
- package/timetable-duration.pure.js +4 -2
- package/timetable-row/timetable-row.component.js +427 -2
- package/timetable-row.js +13 -6
- package/timetable-row.pure.js +11 -2
- package/toDate-Bw2KTWeq.js +15 -0
- package/autocomplete-grid-cell.component-Dak9wlBr.js +0 -24
- package/autocomplete-grid-option.component-DNRFHOwc.js +0 -37
- package/autocomplete-grid-row.component-DBHZQ0GQ.js +0 -27
- package/date-helper-CGproP5d.js +0 -185
- package/development/autocomplete-grid-cell.component-BBvM4o2H.js +0 -42
- package/development/autocomplete-grid-option.component-QzfM5eIE.js +0 -123
- package/development/autocomplete-grid-row.component-H8sCTCkT.js +0 -104
- package/development/date-helper-8_Y-PuHh.js +0 -520
- package/development/differenceInMinutes-DN_1Rk3O.js +0 -110
- package/development/format-Bbrn2bgo.js +0 -1848
- package/development/isValid-C-HzKv4v.js +0 -178
- package/development/journey-summary.component-uGhZvA4p.js +0 -385
- package/development/pearl-chain-time.component-B8mayTWD.js +0 -415
- package/development/pearl-chain-vertical-item.component-BDzbcIaf.js +0 -435
- package/development/pearl-chain-vertical.component-CswE7b3M.js +0 -39
- package/development/pearl-chain.component-wpsTvoSe.js +0 -704
- package/development/seat-reservation-area.component-BK92ZtFo.js +0 -138
- package/development/seat-reservation-graphic.component-cUnsHh5x.js +0 -193
- package/development/seat-reservation-navigation-coach.component-D6Bglus8.js +0 -828
- package/development/seat-reservation-navigation-services.component-DYJ6Ddkg.js +0 -179
- package/development/seat-reservation-place-control.component-Bg9evKBW.js +0 -726
- package/development/seat-reservation-scoped.component-DRQ_I702.js +0 -31
- package/development/seat-reservation.component-Cq_aJKR0.js +0 -818
- package/development/svgs-C3JMWR26.js +0 -28
- package/development/timetable-duration.component-DI0lET17.js +0 -125
- package/development/timetable-row.component-CAED6Zwc.js +0 -932
- package/development/toDate-Biiv3kyf.js +0 -150
- package/differenceInMinutes-Dr9gRqtu.js +0 -27
- package/format-CM5exOsN.js +0 -1103
- package/isValid-B9oVW3lA.js +0 -36
- package/journey-summary.component-Cq_4kaOp.js +0 -264
- package/pearl-chain-time.component-DGDW5S1c.js +0 -239
- package/pearl-chain-vertical-item.component-G22bWhLU.js +0 -108
- package/pearl-chain-vertical.component-CXIDT5RD.js +0 -21
- package/pearl-chain.component-DmjkVIva.js +0 -194
- package/seat-reservation-area.component-n-9rGn_y.js +0 -75
- package/seat-reservation-graphic.component-YTXRmKt0.js +0 -102
- package/seat-reservation-navigation-coach.component-YJ0vaYmO.js +0 -333
- package/seat-reservation-navigation-services.component-C3xnLJg2.js +0 -127
- package/seat-reservation-place-control.component-DmBAfM6K.js +0 -322
- package/seat-reservation-scoped.component-DPkz6u17.js +0 -17
- package/seat-reservation.component-C_anMkgw.js +0 -364
- package/svgs-D9arBcqr.js +0 -26
- package/timetable-duration.component-DCu8Phts.js +0 -65
- package/timetable-row.component-BVRCB3xK.js +0 -559
- package/toDate-p-Tpkb7t.js +0 -16
|
@@ -1,833 +1,811 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
}
|
|
13
|
-
var
|
|
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
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
_scrollPlaceIntoNearestViewport(e) {
|
|
809
|
-
this.shadowRoot?.getElementById(e)?.scrollIntoView({
|
|
810
|
-
behavior: "smooth",
|
|
811
|
-
block: "nearest",
|
|
812
|
-
inline: "nearest"
|
|
813
|
-
});
|
|
814
|
-
}
|
|
815
|
-
_isOverhangingElementsPresent(e, t) {
|
|
816
|
-
return t?.some((t) => t.position.x === 0 || t.position.x + t.dimension.w >= e) ?? !1;
|
|
817
|
-
}
|
|
818
|
-
_setDriverAreasElements(e) {
|
|
819
|
-
return e ? {
|
|
820
|
-
driverArea: e.graphicElements?.find((e) => e.icon === "DRIVER_AREA"),
|
|
821
|
-
driverAreaNoVerticalWall: e.type === "LOCOMOTIVE_COACH" ? e.graphicElements?.find((e) => e.icon === "DRIVER_AREA_NO_VERTICAL_WALL") : void 0
|
|
822
|
-
} : {
|
|
823
|
-
driverArea: void 0,
|
|
824
|
-
driverAreaNoVerticalWall: void 0
|
|
825
|
-
};
|
|
826
|
-
}
|
|
827
|
-
_onLeaveSeatReservationComponent() {
|
|
828
|
-
this.hasNavigation && (this.focusedCoachIndex = -1), this.unfocusPlaceElement();
|
|
829
|
-
}
|
|
830
|
-
};
|
|
1
|
+
var ye = (h) => {
|
|
2
|
+
throw TypeError(h);
|
|
3
|
+
};
|
|
4
|
+
var be = (h, d, f) => d.has(h) || ye("Cannot " + f);
|
|
5
|
+
var u = (h, d, f) => (be(h, d, "read from private field"), f ? f.call(h) : d.get(h)), g = (h, d, f) => d.has(h) ? ye("Cannot add the same private member more than once") : d instanceof WeakSet ? d.add(h) : d.set(h, f), r = (h, d, f, B) => (be(h, d, "write to private field"), B ? B.call(h, f) : d.set(h, f), f);
|
|
6
|
+
import { __esDecorate as v, __runInitializers as n } from "tslib";
|
|
7
|
+
import { isArrowKeyOrPageKeysPressed as Pe } from "@sbb-esta/lyne-elements/core/a11y.js";
|
|
8
|
+
import { SbbElement as Ee } from "@sbb-esta/lyne-elements/core/base-elements.js";
|
|
9
|
+
import { forceType as S } from "@sbb-esta/lyne-elements/core/decorators.js";
|
|
10
|
+
import { isServer as Re } from "lit";
|
|
11
|
+
import { property as C, state as z, eventOptions as Ne } from "lit/decorators.js";
|
|
12
|
+
import { mapIconToSvg as Ae, mapPlaceInfosToPlaceSelection as ke, mapPlaceAndCoachToSeatReservationPlaceSelection as De, mapCoachInfosToCoachSelection as Te } from "../common/mapper.js";
|
|
13
|
+
var I;
|
|
14
|
+
(function(h) {
|
|
15
|
+
h.right = "right", h.left = "left";
|
|
16
|
+
})(I || (I = {}));
|
|
17
|
+
const we = 3, Be = [
|
|
18
|
+
"sa-vo",
|
|
19
|
+
"sa-rs",
|
|
20
|
+
"sa-abteilkinderwagen",
|
|
21
|
+
"sa-wr",
|
|
22
|
+
"sa-fa",
|
|
23
|
+
"sa-bz",
|
|
24
|
+
"sa-rz"
|
|
25
|
+
];
|
|
26
|
+
let Ke = (() => {
|
|
27
|
+
var x, p, _, m, y, b, P, A, E, R, N, k, D, T, l;
|
|
28
|
+
let h = Ee, d = [], f, B = [], O = [], V, F = [], G = [], L, W = [], H = [], M, K = [], X = [], U, q = [], $ = [], j, Y = [], J = [], Q, Z = [], ee = [], te, se = [], ie = [], ae, ce = [], oe = [], re, ne = [], le = [], he, de = [], ue = [], ge, ve = [], fe = [], Ce, Se = [], Ie = [], xe, pe = [], _e = [], me;
|
|
29
|
+
return l = class extends h {
|
|
30
|
+
constructor() {
|
|
31
|
+
super();
|
|
32
|
+
g(this, x);
|
|
33
|
+
g(this, p);
|
|
34
|
+
g(this, _);
|
|
35
|
+
g(this, m);
|
|
36
|
+
g(this, y);
|
|
37
|
+
g(this, b);
|
|
38
|
+
g(this, P);
|
|
39
|
+
g(this, A);
|
|
40
|
+
g(this, E);
|
|
41
|
+
g(this, R);
|
|
42
|
+
g(this, N);
|
|
43
|
+
g(this, k);
|
|
44
|
+
g(this, D);
|
|
45
|
+
g(this, T);
|
|
46
|
+
r(this, x, (n(this, d), n(this, B, null))), r(this, p, (n(this, O), n(this, F, "NONE"))), r(this, _, (n(this, G), n(this, W, !0))), r(this, m, (n(this, H), n(this, K, !1))), r(this, y, (n(this, X), n(this, q, 16))), r(this, b, (n(this, $), n(this, Y, null))), r(this, P, (n(this, J), n(this, Z, -1))), r(this, A, (n(this, ee), n(this, se, -1))), r(this, E, (n(this, ie), n(this, ce, !1))), r(this, R, (n(this, oe), n(this, ne, -1))), r(this, N, (n(this, le), n(this, de, !1))), r(this, k, (n(this, ue), n(this, ve, -1))), r(this, D, (n(this, fe), n(this, Se, -1))), r(this, T, (n(this, Ie), n(this, pe, -1))), this.coachBorderPadding = (n(this, _e), 6), this.gapBetweenCoaches = 4, this.coachBorderOffset = this.coachBorderPadding / this.baseGridSize, this.gapBetweenCoachDecks = 48, this.coachNavButtonDim = 0, this.coachItemDetailsElements = [], this.currScrollDirection = I.right, this.maxCalcCoachesWidth = 0, this.scrollCoachesAreaWidth = 0, this.scrollNavigationAreaDim = 0, this.triggerCoachPositionsCollection = [], this.navigationScrollArea = null, this.coachScrollArea = null, this.currSelectedPlace = null, this.currSelectedPlaceElementId = null, this.currSelectedCoachIndex = -1, this.currSelectedDeckIndex = 0, this.preventCoachScrollByPlaceClick = !1, this.selectedSeatReservationPlaces = {
|
|
47
|
+
seats: [],
|
|
48
|
+
bicycles: []
|
|
49
|
+
}, this.seatReservationWithoutNavigationHasFocus = !1, this.isCoachGridFocusable = !1, this.isAutoScrolling = !1, this.isKeyboardNavigation = !1, this.hasMultipleDecks = !1, this.hasSeatReservationNativeFocus = !1, this.keyboardNavigationEvents = {
|
|
50
|
+
ArrowLeft: "ArrowLeft",
|
|
51
|
+
ArrowRight: "ArrowRight",
|
|
52
|
+
ArrowUp: "ArrowUp",
|
|
53
|
+
ArrowDown: "ArrowDown",
|
|
54
|
+
Tab: "Tab",
|
|
55
|
+
Enter: "Enter"
|
|
56
|
+
}, this.notAreaElements = [
|
|
57
|
+
"DRIVER_AREA",
|
|
58
|
+
"DRIVER_AREA_NO_VERTICAL_WALL",
|
|
59
|
+
"COACH_PASSAGE",
|
|
60
|
+
"COACH_WALL_NO_PASSAGE",
|
|
61
|
+
"COMPARTMENT_PASSAGE",
|
|
62
|
+
"COMPARTMENT_PASSAGE_HIGH",
|
|
63
|
+
"COMPARTMENT_PASSAGE_MIDDLE",
|
|
64
|
+
"COMPARTMENT_PASSAGE_LOW"
|
|
65
|
+
], this.overHangingElementInformation = [], this._isRunningInitPreselectCoachIndex = !1, this._lastStartScrollPos = -1, this._prepareServiceIconsNavigation = (e) => {
|
|
66
|
+
if (!e)
|
|
67
|
+
return [];
|
|
68
|
+
const t = e?.map(function(s) {
|
|
69
|
+
return {
|
|
70
|
+
pId: s,
|
|
71
|
+
svgName: Ae[s]?.svgName ? Ae[s]?.svgName : ""
|
|
72
|
+
};
|
|
73
|
+
}).filter((s) => Be.indexOf(s.svgName) !== -1).filter((s, i, a) => a.map((o) => o.svgName).indexOf(s.svgName) === i).map((s) => s.pId).slice(0, we);
|
|
74
|
+
return t || [];
|
|
75
|
+
}, this.addEventListener("blur", () => this._onLeaveSeatReservationComponent());
|
|
76
|
+
}
|
|
77
|
+
/** The seat reservations array contains all coaches and places */
|
|
78
|
+
get seatReservations() {
|
|
79
|
+
return u(this, x);
|
|
80
|
+
}
|
|
81
|
+
set seatReservations(e) {
|
|
82
|
+
r(this, x, e);
|
|
83
|
+
}
|
|
84
|
+
/** Displays an arrow showing what direction does train drive*/
|
|
85
|
+
get travelDirection() {
|
|
86
|
+
return u(this, p);
|
|
87
|
+
}
|
|
88
|
+
set travelDirection(e) {
|
|
89
|
+
r(this, p, e);
|
|
90
|
+
}
|
|
91
|
+
/** The seat reservation navigation can be toggled by this property */
|
|
92
|
+
get hasNavigation() {
|
|
93
|
+
return u(this, _);
|
|
94
|
+
}
|
|
95
|
+
set hasNavigation(e) {
|
|
96
|
+
r(this, _, e);
|
|
97
|
+
}
|
|
98
|
+
/** The seat reservation area is aligned vertically */
|
|
99
|
+
get alignVertical() {
|
|
100
|
+
return u(this, m);
|
|
101
|
+
}
|
|
102
|
+
set alignVertical(e) {
|
|
103
|
+
r(this, m, e);
|
|
104
|
+
}
|
|
105
|
+
/** The seat reservation area's base grid size */
|
|
106
|
+
get baseGridSize() {
|
|
107
|
+
return u(this, y);
|
|
108
|
+
}
|
|
109
|
+
set baseGridSize(e) {
|
|
110
|
+
r(this, y, e);
|
|
111
|
+
}
|
|
112
|
+
/** The seat reservation area's width */
|
|
113
|
+
get height() {
|
|
114
|
+
return u(this, b);
|
|
115
|
+
}
|
|
116
|
+
set height(e) {
|
|
117
|
+
r(this, b, e);
|
|
118
|
+
}
|
|
119
|
+
/** Maximal number of possible clickable seats */
|
|
120
|
+
get maxSeatReservations() {
|
|
121
|
+
return u(this, P);
|
|
122
|
+
}
|
|
123
|
+
set maxSeatReservations(e) {
|
|
124
|
+
r(this, P, e);
|
|
125
|
+
}
|
|
126
|
+
/** Maximal number of possible clickable bicycle places */
|
|
127
|
+
get maxBicycleReservations() {
|
|
128
|
+
return u(this, A);
|
|
129
|
+
}
|
|
130
|
+
set maxBicycleReservations(e) {
|
|
131
|
+
r(this, A, e);
|
|
132
|
+
}
|
|
133
|
+
/** Any click functionality is prevented */
|
|
134
|
+
get preventPlaceClick() {
|
|
135
|
+
return u(this, E);
|
|
136
|
+
}
|
|
137
|
+
set preventPlaceClick(e) {
|
|
138
|
+
r(this, E, e);
|
|
139
|
+
}
|
|
140
|
+
get preselectCoachIndex() {
|
|
141
|
+
return u(this, R);
|
|
142
|
+
}
|
|
143
|
+
set preselectCoachIndex(e) {
|
|
144
|
+
r(this, R, e);
|
|
145
|
+
}
|
|
146
|
+
/** The seat reservation title information at place-controls, navigation-coaches and navigation-services can be toggled by this property */
|
|
147
|
+
get showTitleInfo() {
|
|
148
|
+
return u(this, N);
|
|
149
|
+
}
|
|
150
|
+
set showTitleInfo(e) {
|
|
151
|
+
r(this, N, e);
|
|
152
|
+
}
|
|
153
|
+
get selectedCoachIndex() {
|
|
154
|
+
return u(this, k);
|
|
155
|
+
}
|
|
156
|
+
set selectedCoachIndex(e) {
|
|
157
|
+
r(this, k, e);
|
|
158
|
+
}
|
|
159
|
+
get focusedCoachIndex() {
|
|
160
|
+
return u(this, D);
|
|
161
|
+
}
|
|
162
|
+
set focusedCoachIndex(e) {
|
|
163
|
+
r(this, D, e);
|
|
164
|
+
}
|
|
165
|
+
get hoveredCoachIndex() {
|
|
166
|
+
return u(this, T);
|
|
167
|
+
}
|
|
168
|
+
set hoveredCoachIndex(e) {
|
|
169
|
+
r(this, T, e);
|
|
170
|
+
}
|
|
171
|
+
willUpdate(e) {
|
|
172
|
+
if (super.willUpdate(e), e.has("seatReservations") && (this.hasMultipleDecks = this.seatReservations?.length > 1, this._initPrepareSeatReservationData(), this._prepareCoachWidthAndGapCalculations(), this._initSeatReservationPlaceSelection(), this.initNavigationSelectionByScrollEvent()), e.has("baseGridSize") && (this.coachBorderOffset = this.coachBorderPadding / this.baseGridSize, this.style?.setProperty("--sbb-seat-reservation-grid-size", `${this.baseGridSize}px`), this.initNavigationSelectionByScrollEvent()), e.has("height") && this.height) {
|
|
173
|
+
const t = this.seatReservations[this.currSelectedDeckIndex] || null;
|
|
174
|
+
t?.coachItems.length && (this.baseGridSize = this.height / t.coachItems[0].dimension.h, this.coachBorderOffset = this.coachBorderPadding / this.baseGridSize, this.style?.setProperty("--sbb-seat-reservation-grid-size", `${this.baseGridSize}px`), this.initNavigationSelectionByScrollEvent());
|
|
175
|
+
}
|
|
176
|
+
e.has("alignVertical") && this.alignVertical && this.initNavigationSelectionByScrollEvent(), e.has("preselectCoachIndex") && (this._isRunningInitPreselectCoachIndex = !0, setTimeout(() => this.scrollToSelectedNavCoach(this.preselectCoachIndex), 1));
|
|
177
|
+
}
|
|
178
|
+
navigateByDirectionBtn(e) {
|
|
179
|
+
this.unfocusPlaceElement();
|
|
180
|
+
let t = this.currSelectedCoachIndex;
|
|
181
|
+
e == "DIRECTION_LEFT" && t > 0 ? t = this.currSelectedCoachIndex != -1 ? this.currSelectedCoachIndex - 1 : 0 : e == "DIRECTION_RIGHT" && t < this.seatReservations[this.currSelectedDeckIndex]?.coachItems.length - 1 && (t = this.currSelectedCoachIndex != -1 ? this.currSelectedCoachIndex + 1 : 0), this.scrollToSelectedNavCoach(t);
|
|
182
|
+
}
|
|
183
|
+
/**
|
|
184
|
+
* Data can be prepared once for the entire component
|
|
185
|
+
* in order to avoid recurring iteration processes in rendering.
|
|
186
|
+
*/
|
|
187
|
+
_initPrepareSeatReservationData() {
|
|
188
|
+
this._determineBaseFontSize(), this.hasMultipleDecks && this._initEmptyCoachDeckOffsets(), this._prepareCoachItemDetailsData();
|
|
189
|
+
}
|
|
190
|
+
/** Init scroll event handling for coach navigation */
|
|
191
|
+
initNavigationSelectionByScrollEvent() {
|
|
192
|
+
this.coachScrollArea = this.shadowRoot?.querySelector("#sbb-sr__wrapper-scrollarea"), this.navigationScrollArea = this.shadowRoot?.querySelector("#sbb-sr__navigation-list-coaches");
|
|
193
|
+
const e = this.seatReservations ? this.seatReservations[this.currSelectedDeckIndex] : null;
|
|
194
|
+
if (e && e.coachItems.length > 0) {
|
|
195
|
+
const t = e.coachItems[0].dimension.h * this.baseGridSize + this.coachBorderPadding, s = (this.seatReservations.length - 1) * this.gapBetweenCoachDecks;
|
|
196
|
+
this.style?.setProperty("--sbb-seat-reservation-height", `${t * this.seatReservations.length + s}`), this.style?.setProperty("--sbb-seat-reservation-decks", `${this.seatReservations.length}`);
|
|
197
|
+
}
|
|
198
|
+
if (this.navigationScrollArea) {
|
|
199
|
+
this.scrollNavigationAreaDim = this.alignVertical ? this.navigationScrollArea.getBoundingClientRect().height : this.navigationScrollArea.getBoundingClientRect().width;
|
|
200
|
+
const t = this.navigationScrollArea.querySelector("ul > li");
|
|
201
|
+
if (t) {
|
|
202
|
+
const s = t?.getBoundingClientRect();
|
|
203
|
+
this.coachNavButtonDim = this.alignVertical ? s.height : s.width;
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
if (this.coachScrollArea && e) {
|
|
207
|
+
let t = 0;
|
|
208
|
+
this.scrollCoachesAreaWidth = this.alignVertical ? this.coachScrollArea.getBoundingClientRect().height : this.coachScrollArea.getBoundingClientRect().width, this.triggerCoachPositionsCollection = e.coachItems.map((s) => {
|
|
209
|
+
const i = t, a = this.getCalculatedDimension(s.dimension).w, o = this.overHangingElementInformation.find((w) => w.coachId === s.id), c = o?.overhangingPlaces || o?.overhangingGraphicAreas;
|
|
210
|
+
return t += a + (c ? 2 * this.gapBetweenCoaches : this.gapBetweenCoaches), {
|
|
211
|
+
start: i,
|
|
212
|
+
end: t,
|
|
213
|
+
width: a
|
|
214
|
+
};
|
|
215
|
+
}), this.maxCalcCoachesWidth = t - this.gapBetweenCoaches;
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
/**
|
|
219
|
+
* Scroll event handler managed the end of scrolling inside the coach scroll area.
|
|
220
|
+
* Timeout event handling to check if the scrolling has been completed.
|
|
221
|
+
* It is required because the Safari browser does not handle scrollend event,
|
|
222
|
+
* and we therefore imitate this event -> scrollend.
|
|
223
|
+
*/
|
|
224
|
+
coachAreaScrollend() {
|
|
225
|
+
this._scrollTimeout && clearTimeout(this._scrollTimeout), this._scrollTimeout = setTimeout(() => this._handleCoachAreaScrollendEvent(), 150);
|
|
226
|
+
}
|
|
227
|
+
/**
|
|
228
|
+
* If no navigation exists (property setting -> hasNavigation) and a table coach gets the focus,
|
|
229
|
+
* the first place in the coach must be automatically preselected to control the place navigation via keyboard
|
|
230
|
+
*
|
|
231
|
+
* @param focusCoachIndex
|
|
232
|
+
*/
|
|
233
|
+
onFocusTableCoachAndPreselectPlace(e) {
|
|
234
|
+
!this.seatReservationWithoutNavigationHasFocus && !this.hasNavigation && (this.seatReservationWithoutNavigationHasFocus = !0, this.currSelectedCoachIndex = e === 0 ? this.getNextAvailableCoachIndex(-1) : this.getPrevAvailableCoachIndex(e), this.preselectPlaceInCoach());
|
|
235
|
+
}
|
|
236
|
+
/** Will be triggered by focus navigation direction */
|
|
237
|
+
onFocusNavDirectionButton() {
|
|
238
|
+
this.focusedCoachIndex = -1;
|
|
239
|
+
}
|
|
240
|
+
/** TAB Key Event handling for Coach Navigation */
|
|
241
|
+
onKeyNavigationNavCoachButton(e, t) {
|
|
242
|
+
if (e.key === this.keyboardNavigationEvents.Tab) {
|
|
243
|
+
this._handleTabKeyNavigation(e, "navigation", t);
|
|
244
|
+
return;
|
|
245
|
+
}
|
|
246
|
+
Pe(e) && this.keyboardSeatmapEventHandling(e);
|
|
247
|
+
}
|
|
248
|
+
/** General TAB Key Event handling for tab navigation inside the coach navigation area and the seatmap area */
|
|
249
|
+
_handleTabKeyNavigation(e, t, s) {
|
|
250
|
+
const i = e.key, a = e.shiftKey;
|
|
251
|
+
i === this.keyboardNavigationEvents.Tab && (t == "navigation" ? (s == this.currSelectedCoachIndex ? !this.currSelectedPlace || !a || this.coachItemDetailsElements[s].isDriverArea || this.focusedCoachIndex == -1 ? this.focusedCoachIndex = s : a && this.currSelectedPlace && (this.focusedCoachIndex = -1, this.focusPlaceElement(this.currSelectedPlace)) : this.focusedCoachIndex = s, this._scrollToSelectedNavigationButton(s)) : t == "seatmap" && (e.preventDefault(), a ? this._navigateCoachNavigationByKeyboard("PREV_TAB") : this._navigateCoachNavigationByKeyboard("NEXT_TAB")));
|
|
252
|
+
}
|
|
253
|
+
/**
|
|
254
|
+
* Initialisation of Keyboard Seatmap event handling to navigation between each places inside a selected coach by using [arrow] keys.
|
|
255
|
+
* With the [TAB] key the user navigation goes to the next coach navigation element and the currently selected place is automatically reset.
|
|
256
|
+
*/
|
|
257
|
+
keyboardSeatmapEventHandling(e) {
|
|
258
|
+
const t = e.key === this.keyboardNavigationEvents.Tab, s = e.shiftKey && t;
|
|
259
|
+
if (!this.hasNavigation && this.currSelectedCoachIndex === 0 && s || this.currSelectedCoachIndex === this.coachItemDetailsElements.length - 1 && t)
|
|
260
|
+
return;
|
|
261
|
+
const i = e.key;
|
|
262
|
+
if (this.preventCoachScrollByPlaceClick = !1, !this.hasSeatReservationNativeFocus && (t || s) && (this.hasSeatReservationNativeFocus = !0), t) {
|
|
263
|
+
this._handleTabKeyNavigation(e, "seatmap");
|
|
264
|
+
return;
|
|
265
|
+
}
|
|
266
|
+
if (this.currSelectedCoachIndex !== -1 && Pe(e))
|
|
267
|
+
switch (e.preventDefault(), i) {
|
|
268
|
+
case this.keyboardNavigationEvents.ArrowLeft:
|
|
269
|
+
{
|
|
270
|
+
const a = this.alignVertical ? this.keyboardNavigationEvents.ArrowDown : i;
|
|
271
|
+
this._navigateToPlaceByKeyboard(a);
|
|
272
|
+
}
|
|
273
|
+
break;
|
|
274
|
+
case this.keyboardNavigationEvents.ArrowRight:
|
|
275
|
+
{
|
|
276
|
+
const a = this.alignVertical ? this.keyboardNavigationEvents.ArrowUp : i;
|
|
277
|
+
this._navigateToPlaceByKeyboard(a);
|
|
278
|
+
}
|
|
279
|
+
break;
|
|
280
|
+
case this.keyboardNavigationEvents.ArrowUp:
|
|
281
|
+
{
|
|
282
|
+
const a = this.alignVertical ? this.keyboardNavigationEvents.ArrowLeft : i;
|
|
283
|
+
this._navigateToPlaceByKeyboard(a);
|
|
284
|
+
}
|
|
285
|
+
break;
|
|
286
|
+
case this.keyboardNavigationEvents.ArrowDown:
|
|
287
|
+
{
|
|
288
|
+
const a = this.alignVertical ? this.keyboardNavigationEvents.ArrowRight : i;
|
|
289
|
+
this._navigateToPlaceByKeyboard(a);
|
|
290
|
+
}
|
|
291
|
+
break;
|
|
292
|
+
}
|
|
293
|
+
}
|
|
294
|
+
/**
|
|
295
|
+
* Selects a place inside the coach if navigated via keyboard,
|
|
296
|
+
* otherwise the coach grid is selected (necessary for ScreenReader)
|
|
297
|
+
*/
|
|
298
|
+
preselectPlaceInCoach() {
|
|
299
|
+
if (this.isAutoScrolling) {
|
|
300
|
+
if (this._isRunningInitPreselectCoachIndex) {
|
|
301
|
+
this._isRunningInitPreselectCoachIndex = !1;
|
|
302
|
+
return;
|
|
303
|
+
}
|
|
304
|
+
if (this.coachItemDetailsElements[this.currSelectedCoachIndex] && this.coachItemDetailsElements[this.currSelectedCoachIndex].isDriverArea) {
|
|
305
|
+
this._setFocusToSelectedCoachGrid();
|
|
306
|
+
return;
|
|
307
|
+
}
|
|
308
|
+
if (this.isKeyboardNavigation && this.isAutoScrolling) {
|
|
309
|
+
const e = this._getClosestPlaceByKeyDirection();
|
|
310
|
+
e ? (this.unfocusPlaceElement(), this.focusPlaceElement(e), this.focusedCoachIndex = -1) : this._setFocusToSelectedCoachGrid();
|
|
311
|
+
} else
|
|
312
|
+
this.unfocusPlaceElement(), this.isCoachGridFocusable = !0, this._setFocusToSelectedCoachGrid();
|
|
313
|
+
}
|
|
314
|
+
}
|
|
315
|
+
scrollToSelectedNavCoach(e) {
|
|
316
|
+
if (this._isValidCoachIndex(e) && e !== this.currSelectedCoachIndex) {
|
|
317
|
+
this.hoveredCoachIndex = e, this.isAutoScrolling = !0, this.isCoachGridFocusable = !0, this.currSelectedCoachIndex = e, this.currSelectedDeckIndex = this._getExistingCoachDeckIndex(), this._setScrollDirectionByCoachIndex();
|
|
318
|
+
const t = this._getCoachScrollPositionX();
|
|
319
|
+
(this.selectedCoachIndex !== -1 || this.currSelectedCoachIndex > 0) && this._isScrollableToSelectedCoach() ? (this._lastStartScrollPos = this.coachScrollArea.scrollLeft, this.coachScrollArea.scrollTo({
|
|
320
|
+
top: this.alignVertical ? t : 0,
|
|
321
|
+
left: this.alignVertical ? 0 : t,
|
|
322
|
+
behavior: "smooth"
|
|
323
|
+
})) : this.updateCurrentSelectedCoach(), this._scrollToSelectedNavigationButton(e);
|
|
324
|
+
}
|
|
325
|
+
}
|
|
326
|
+
focusPlaceElement(e) {
|
|
327
|
+
if (this.unfocusPlaceElement(), e) {
|
|
328
|
+
this.currSelectedPlace = e, this._setCurrSelectedPlaceElementId(e);
|
|
329
|
+
const t = this._getPlaceHtmlElement();
|
|
330
|
+
if (t) {
|
|
331
|
+
t.setAttribute("keyfocus", "focus");
|
|
332
|
+
const s = setTimeout(() => {
|
|
333
|
+
const i = this.getPlaceElementId(this.currSelectedDeckIndex, this.currSelectedCoachIndex, e.number);
|
|
334
|
+
this._scrollPlaceIntoNearestViewport(i), clearTimeout(s);
|
|
335
|
+
}, 0);
|
|
336
|
+
}
|
|
337
|
+
}
|
|
338
|
+
}
|
|
339
|
+
unfocusPlaceElement() {
|
|
340
|
+
const e = this._getPlaceHtmlElement();
|
|
341
|
+
e && (e.setAttribute("keyfocus", "unfocus"), this._setCurrSelectedPlaceElementId(null), this.currSelectedPlace = null);
|
|
342
|
+
}
|
|
343
|
+
getCalculatedDimension(e, t, s, i) {
|
|
344
|
+
return t && !s && (e.h += this.coachBorderOffset * 2), i && (e.h += this.coachBorderOffset), {
|
|
345
|
+
w: this.baseGridSize * e.w,
|
|
346
|
+
h: this.baseGridSize * e.h
|
|
347
|
+
};
|
|
348
|
+
}
|
|
349
|
+
getCalculatedPosition(e, t, s, i) {
|
|
350
|
+
if (s && t) {
|
|
351
|
+
const a = i ? s.h : s.h + this.coachBorderOffset;
|
|
352
|
+
e.y === 0 ? e.y -= this.coachBorderOffset : e.y + t.h === a && (e.y += this.coachBorderOffset);
|
|
353
|
+
}
|
|
354
|
+
return {
|
|
355
|
+
x: this.baseGridSize * e.x,
|
|
356
|
+
y: this.baseGridSize * e.y,
|
|
357
|
+
z: e.z
|
|
358
|
+
};
|
|
359
|
+
}
|
|
360
|
+
/**
|
|
361
|
+
* detects if a (graphical) element is on the border with its position (upper or lower border).
|
|
362
|
+
* @param baseElement
|
|
363
|
+
* @param coachDimension
|
|
364
|
+
* @protected
|
|
365
|
+
*/
|
|
366
|
+
isElementDirectlyOnBorder(e, t) {
|
|
367
|
+
return e.position.y === 0 || e.position.y + e.dimension.h === t.h;
|
|
368
|
+
}
|
|
369
|
+
/**
|
|
370
|
+
* Counts all available seats together depending on the seat type
|
|
371
|
+
*
|
|
372
|
+
* @param places
|
|
373
|
+
* @returns An Object with count of free seats and free bicycle places
|
|
374
|
+
*/
|
|
375
|
+
getAvailableFreePlacesNumFromCoach(e) {
|
|
376
|
+
const t = { seats: 0, bicycles: 0 }, s = e?.reduce((i, a) => (a.state !== "FREE" || (a.type === "SEAT" ? i.seats++ : i.bicycles++), i), t);
|
|
377
|
+
return s || t;
|
|
378
|
+
}
|
|
379
|
+
/**
|
|
380
|
+
* At the end of a scroll Event from the coach scrollable area,
|
|
381
|
+
* the reached coach is marked as selected
|
|
382
|
+
*/
|
|
383
|
+
_handleCoachAreaScrollendEvent() {
|
|
384
|
+
const e = this.isAutoScrolling ? this.currSelectedCoachIndex : this._getCoachIndexByScrollTriggerPosition();
|
|
385
|
+
if (this.preventCoachScrollByPlaceClick) {
|
|
386
|
+
Math.abs(this._lastStartScrollPos - this.coachScrollArea.scrollLeft) > this.baseGridSize * 2 && (this.selectedCoachIndex = e), this.preventCoachScrollByPlaceClick = !1;
|
|
387
|
+
return;
|
|
388
|
+
}
|
|
389
|
+
this._lastStartScrollPos = this.coachScrollArea.scrollLeft, this.hoveredCoachIndex = -1, this.currSelectedCoachIndex === -1 && (this.currSelectedCoachIndex = e), this._isScrollableToSelectedCoach() ? this.currSelectedCoachIndex = e : this.currSelectedCoachIndex = e < this.currSelectedCoachIndex ? this.currSelectedCoachIndex : e, this.isAutoScrolling || this._scrollToSelectedNavigationButton(e), this.preventCoachScrollByPlaceClick = !1, this.updateCurrentSelectedCoach(), this.hasNavigation || (this.preselectPlaceInCoach(), this.isAutoScrolling = !1);
|
|
390
|
+
}
|
|
391
|
+
/**
|
|
392
|
+
* Performs an automatic main navigation scroll to the specified selectedNavCoachIndex.
|
|
393
|
+
* Calculates the central scroll offset of the nav coach to be selected.
|
|
394
|
+
* @param selectedNavCoachIndex
|
|
395
|
+
*/
|
|
396
|
+
_scrollToSelectedNavigationButton(e) {
|
|
397
|
+
setTimeout(() => {
|
|
398
|
+
if (this.hasNavigation && this.navigationScrollArea) {
|
|
399
|
+
const t = this.scrollNavigationAreaDim / 2, i = e * this.coachNavButtonDim - t + this.coachNavButtonDim;
|
|
400
|
+
this.navigationScrollArea.scrollTo({
|
|
401
|
+
top: this.alignVertical ? i : 0,
|
|
402
|
+
left: this.alignVertical ? 0 : i,
|
|
403
|
+
behavior: "smooth"
|
|
404
|
+
});
|
|
405
|
+
}
|
|
406
|
+
}, 10);
|
|
407
|
+
}
|
|
408
|
+
/**
|
|
409
|
+
* Sets the new ScrollDirection by the new given target coach index.
|
|
410
|
+
*/
|
|
411
|
+
_setScrollDirectionByCoachIndex() {
|
|
412
|
+
this.currScrollDirection = this.currSelectedCoachIndex > this.selectedCoachIndex ? I.right : I.left;
|
|
413
|
+
}
|
|
414
|
+
/**
|
|
415
|
+
* Returns the scroll start or end position X from the selected coach.
|
|
416
|
+
* In case the user is currently navigating through places by keyboard and goes to previous coach,
|
|
417
|
+
* then we return the end position of the coach to get the closest scroll position of the next focus place.
|
|
418
|
+
* @returns number
|
|
419
|
+
*/
|
|
420
|
+
_getCoachScrollPositionX() {
|
|
421
|
+
const e = this.triggerCoachPositionsCollection[this.currSelectedCoachIndex];
|
|
422
|
+
return this.isKeyboardNavigation && this.currScrollDirection === I.left && e.width > this.scrollCoachesAreaWidth ? e.end - this.scrollCoachesAreaWidth : e.start;
|
|
423
|
+
}
|
|
424
|
+
/**
|
|
425
|
+
* Sets the focus on the HTML table (grid) caption element so that the heading is read out when using a ScreenReader.
|
|
426
|
+
*/
|
|
427
|
+
_setFocusToSelectedCoachGrid() {
|
|
428
|
+
if (this.isCoachGridFocusable && this.hasSeatReservationNativeFocus) {
|
|
429
|
+
this.isCoachGridFocusable = !1;
|
|
430
|
+
const e = this.shadowRoot?.querySelector("#sbb-sr-coach-caption-" + this.currSelectedCoachIndex);
|
|
431
|
+
e && e.focus();
|
|
432
|
+
}
|
|
433
|
+
}
|
|
434
|
+
/**
|
|
435
|
+
* Returns whether the current scrolled position can be used to scroll to the selected wagon
|
|
436
|
+
* @returns boolean
|
|
437
|
+
*/
|
|
438
|
+
_isScrollableToSelectedCoach() {
|
|
439
|
+
const e = this.alignVertical ? this.coachScrollArea.scrollTop : this.coachScrollArea.scrollLeft, t = this.alignVertical ? this.coachScrollArea.getBoundingClientRect().height : this.coachScrollArea.getBoundingClientRect().width, s = this.maxCalcCoachesWidth - t, i = this.triggerCoachPositionsCollection[this.currSelectedCoachIndex], a = e === this.triggerCoachPositionsCollection[this.currSelectedCoachIndex].start;
|
|
440
|
+
return (e < s || e > i.start) && !a;
|
|
441
|
+
}
|
|
442
|
+
/**
|
|
443
|
+
* Returns the coach index which is currently visible in the scroll area
|
|
444
|
+
* @returns number
|
|
445
|
+
*/
|
|
446
|
+
_getCoachIndexByScrollTriggerPosition() {
|
|
447
|
+
const t = (this.alignVertical ? this.coachScrollArea.scrollTop : this.coachScrollArea.scrollLeft) + this.scrollCoachesAreaWidth / 2;
|
|
448
|
+
return this.triggerCoachPositionsCollection.findIndex((s) => t >= s.start && t <= s.end);
|
|
449
|
+
}
|
|
450
|
+
/**
|
|
451
|
+
* Get the first place of current selected coach by table cell coordinate 0-0 id.
|
|
452
|
+
* @returns Place or null
|
|
453
|
+
*/
|
|
454
|
+
_getFirstPlaceInSelectedCoach() {
|
|
455
|
+
let e = null;
|
|
456
|
+
const t = this.seatReservations[this.currSelectedDeckIndex].coachItems[this.currSelectedCoachIndex], s = "cell-" + this.currSelectedDeckIndex + "-" + this.currSelectedCoachIndex + "-0-0", i = this.shadowRoot?.querySelector("#" + s)?.querySelector("sbb-seat-reservation-place-control")?.getAttribute("text") || null;
|
|
457
|
+
return t && i && (e = t.places?.find((a) => a.number === i) || null), e;
|
|
458
|
+
}
|
|
459
|
+
_getSwitchedCoachDeckIndexByKeyNavigation(e, t) {
|
|
460
|
+
return !this.currSelectedPlace || e === this.keyboardNavigationEvents.ArrowRight || e === this.keyboardNavigationEvents.ArrowLeft ? null : e === this.keyboardNavigationEvents.ArrowDown && this.currSelectedPlace.position.y + 2 === t.dimension.h && this.seatReservations[this.currSelectedDeckIndex + 1] ? this.currSelectedDeckIndex + 1 : e === this.keyboardNavigationEvents.ArrowUp && this.currSelectedPlace.position.y === 0 && this.seatReservations[this.currSelectedDeckIndex - 1] ? this.currSelectedDeckIndex - 1 : null;
|
|
461
|
+
}
|
|
462
|
+
/**
|
|
463
|
+
* To get the correct closest place of current pressed key and the current selected place,
|
|
464
|
+
* we have to investigate the coordinates of each place to find the closest place of the currSelectedPlaceElementId.
|
|
465
|
+
* @param pressedKey
|
|
466
|
+
* @returns Place or null
|
|
467
|
+
*/
|
|
468
|
+
_getClosestPlaceByKeyDirection(e) {
|
|
469
|
+
const t = this.seatReservations[this.currSelectedDeckIndex].coachItems[this.currSelectedCoachIndex];
|
|
470
|
+
let s = null, i = t.places, a = null;
|
|
471
|
+
if (i)
|
|
472
|
+
if (this.currSelectedPlaceElementId) {
|
|
473
|
+
if (this.currSelectedPlace) {
|
|
474
|
+
const o = { ...this.currSelectedPlace.position };
|
|
475
|
+
e && (a = this._getSwitchedCoachDeckIndexByKeyNavigation(e, t), a !== null && (i = this.seatReservations[a].coachItems[this.currSelectedCoachIndex].places || [], o.y = a < this.currSelectedDeckIndex ? t.dimension.h : -1));
|
|
476
|
+
for (const c of i)
|
|
477
|
+
e ? c.number !== this.currSelectedPlace?.number && (e === this.keyboardNavigationEvents.ArrowRight && (c.position.y === o.y || c.position.y === o.y - 1) && c.position.x > o.x && (!s || c.position.x < s.position.x) || e === this.keyboardNavigationEvents.ArrowDown && (c.position.x === o.x || c.position.x === o.x + 1) && c.position.y > o.y && (!s || c.position.y < s.position.y) || e === this.keyboardNavigationEvents.ArrowLeft && (c.position.y === o.y || c.position.y === o.y + 1) && c.position.x < o.x && (!s || c.position.x > s.position.x) || e === this.keyboardNavigationEvents.ArrowUp && (c.position.x === o.x || c.position.x === o.x - 1) && c.position.y < o.y && (!s || c.position.y > s.position.y)) && (s = c) : (this.currScrollDirection === I.right && c.position.y === o.y && (!s || c.position.x < s.position.x) || this.currScrollDirection === I.left && c.position.y === o.y && (!s || c.position.x > s.position.x)) && (s = c);
|
|
478
|
+
a !== null && s && (this.currSelectedDeckIndex = a);
|
|
479
|
+
}
|
|
480
|
+
} else
|
|
481
|
+
return this._getFirstPlaceInSelectedCoach();
|
|
482
|
+
return s;
|
|
483
|
+
}
|
|
484
|
+
// Handling for Tab navigation if a place is selected inside the coach.
|
|
485
|
+
// This controls the focused coach from the current selected coach.
|
|
486
|
+
_navigateCoachNavigationByKeyboard(e) {
|
|
487
|
+
const t = this.focusedCoachIndex === -1 ? this.currSelectedCoachIndex === -1 ? 0 : this.currSelectedCoachIndex : this.focusedCoachIndex, s = e === "NEXT_TAB" ? this.getNextAvailableCoachIndex(t) : this.getPrevAvailableCoachIndex(t);
|
|
488
|
+
if (this.hasNavigation) {
|
|
489
|
+
const i = this._getPlaceHtmlElement(), a = i ? i.getAttribute("keyfocus") === "focus" : !1;
|
|
490
|
+
if (e === "PREV_TAB" && this.selectedCoachIndex === t)
|
|
491
|
+
if (a || this.currSelectedPlace !== null) {
|
|
492
|
+
this.focusedCoachIndex = t, this.unfocusPlaceElement();
|
|
493
|
+
return;
|
|
494
|
+
} else t === 0 ? this._refocusCurrentFocusedNavCoach(t) : this.focusedCoachIndex = s;
|
|
495
|
+
else s !== this.currSelectedCoachIndex ? this.focusedCoachIndex = s : e === "NEXT_TAB" && s === this.coachItemDetailsElements.length - 1 ? this._refocusCurrentFocusedNavCoach(t) : (this.focusedCoachIndex = -1, this.selectedCoachIndex = s, a ? this.focusPlaceElement(this.currSelectedPlace) : (this.isCoachGridFocusable = !0, this._setFocusToSelectedCoachGrid()));
|
|
496
|
+
this._scrollToSelectedNavigationButton(s);
|
|
497
|
+
} else
|
|
498
|
+
this.scrollToSelectedNavCoach(s);
|
|
499
|
+
}
|
|
500
|
+
// Refocused the current focused (visual) nav coach to get the native focus back to the navigation
|
|
501
|
+
_refocusCurrentFocusedNavCoach(e) {
|
|
502
|
+
this.focusedCoachIndex = -1, setTimeout(() => this.focusedCoachIndex = e, 0);
|
|
503
|
+
}
|
|
504
|
+
_navigateToPlaceByKeyboard(e) {
|
|
505
|
+
if (this.isKeyboardNavigation = !0, this.focusedCoachIndex !== -1 && (this.focusedCoachIndex = -1), !this.preventPlaceClick) {
|
|
506
|
+
const t = this._getClosestPlaceByKeyDirection(e);
|
|
507
|
+
if (t)
|
|
508
|
+
this.focusPlaceElement(t);
|
|
509
|
+
else if (e === this.keyboardNavigationEvents.ArrowRight || e === this.keyboardNavigationEvents.ArrowLeft || this.alignVertical && (e === this.keyboardNavigationEvents.ArrowUp || e === this.keyboardNavigationEvents.ArrowDown)) {
|
|
510
|
+
const s = e === this.keyboardNavigationEvents.ArrowRight ? this.getNextAvailableCoachIndex() : this.getPrevAvailableCoachIndex();
|
|
511
|
+
this.scrollToSelectedNavCoach(s);
|
|
512
|
+
}
|
|
513
|
+
}
|
|
514
|
+
}
|
|
515
|
+
getNextAvailableCoachIndex(e) {
|
|
516
|
+
const t = e ?? this.currSelectedCoachIndex;
|
|
517
|
+
return t < this.seatReservations[this.currSelectedDeckIndex].coachItems.length - 1 ? t + 1 : t;
|
|
518
|
+
}
|
|
519
|
+
getPrevAvailableCoachIndex(e) {
|
|
520
|
+
const t = e ?? this.currSelectedCoachIndex;
|
|
521
|
+
return t > 0 ? t - 1 : t;
|
|
522
|
+
}
|
|
523
|
+
updateSelectedSeatReservationPlaces(e) {
|
|
524
|
+
const t = e.placeType === "SEAT" ? "seats" : "bicycles", s = e.placeType === "SEAT" ? this.maxSeatReservations : this.maxBicycleReservations, i = this.selectedSeatReservationPlaces[t];
|
|
525
|
+
this.selectedSeatReservationPlaces[t] = this._updateSelectedSeatReservationPlaces(i, s, e), this.dispatchEvent(new CustomEvent("selectedplaces", {
|
|
526
|
+
bubbles: !0,
|
|
527
|
+
composed: !0,
|
|
528
|
+
detail: this.selectedSeatReservationPlaces
|
|
529
|
+
}));
|
|
530
|
+
}
|
|
531
|
+
_updateSelectedSeatReservationPlaces(e, t, s) {
|
|
532
|
+
if (s.state === "SELECTED") {
|
|
533
|
+
const i = this._getDeckIndexByPlaceId(s.id), a = this._getSeatReservationPlaceSelection(s, i);
|
|
534
|
+
a && e.push(a);
|
|
535
|
+
} else
|
|
536
|
+
e = e.filter((i) => i.id !== s.id);
|
|
537
|
+
if (t > -1 && e.length > t) {
|
|
538
|
+
const i = t > 0 ? s : void 0;
|
|
539
|
+
e = this._resetAllPlaceSelections(e, i);
|
|
540
|
+
}
|
|
541
|
+
return e;
|
|
542
|
+
}
|
|
543
|
+
updateCurrentSelectedPlaceInCoach(e) {
|
|
544
|
+
const t = this._getDeckIndexByPlaceId(e.id), s = e.coachIndex;
|
|
545
|
+
if (t === null)
|
|
546
|
+
return;
|
|
547
|
+
const i = this.seatReservations[t].coachItems[s].places?.find((o) => o.number == e.number);
|
|
548
|
+
if (!i)
|
|
549
|
+
return;
|
|
550
|
+
this.currSelectedDeckIndex = t, this.currSelectedCoachIndex = s, this.currSelectedPlace = i, this.currSelectedCoachIndex !== this.selectedCoachIndex && this.updateCurrentSelectedCoach(), this._setCurrSelectedPlaceElementId(i);
|
|
551
|
+
const a = setTimeout(() => {
|
|
552
|
+
this._scrollPlaceIntoNearestViewport(e.id), clearTimeout(a);
|
|
553
|
+
}, 0);
|
|
554
|
+
}
|
|
555
|
+
updateCurrentSelectedCoach() {
|
|
556
|
+
if (this.currSelectedCoachIndex == this.selectedCoachIndex)
|
|
557
|
+
return;
|
|
558
|
+
this.focusedCoachIndex != -1 && (this.focusedCoachIndex = this.currSelectedCoachIndex), this.selectedCoachIndex = this.currSelectedCoachIndex;
|
|
559
|
+
const e = this._getSeatReservationSelectedCoach(this.selectedCoachIndex);
|
|
560
|
+
e && this.dispatchEvent(new CustomEvent("selectedcoach", {
|
|
561
|
+
bubbles: !0,
|
|
562
|
+
composed: !0,
|
|
563
|
+
detail: e
|
|
564
|
+
}));
|
|
565
|
+
}
|
|
566
|
+
getPlaceElementId(e, t, s) {
|
|
567
|
+
return "seat-reservation__place-button-" + e + "-" + t + "-" + s;
|
|
568
|
+
}
|
|
569
|
+
/**
|
|
570
|
+
* In the case of coach layouts with different decks,
|
|
571
|
+
* it is necessary to extend the offset with empty coaches
|
|
572
|
+
* in order to create a stable vehicle layout.
|
|
573
|
+
*
|
|
574
|
+
* [ooo]-[ooo]-[ooo]
|
|
575
|
+
* [ooo]-[ooo]-[ooo]-[ooo]-[ooo]
|
|
576
|
+
*/
|
|
577
|
+
_initEmptyCoachDeckOffsets() {
|
|
578
|
+
const e = Array(this.seatReservations.length - 1).fill(0);
|
|
579
|
+
this.seatReservations[this.seatReservations.length - 1].coachItems.forEach((s) => {
|
|
580
|
+
for (let i = 0; i < this.seatReservations.length - 1; i++) {
|
|
581
|
+
const a = this.seatReservations[i].coachItems[e[i]];
|
|
582
|
+
if (s.id != a?.id) {
|
|
583
|
+
const o = {
|
|
584
|
+
...s,
|
|
585
|
+
places: void 0,
|
|
586
|
+
propertyIds: void 0,
|
|
587
|
+
graphicElements: void 0,
|
|
588
|
+
serviceElements: void 0,
|
|
589
|
+
travelClass: []
|
|
590
|
+
};
|
|
591
|
+
this.seatReservations[i].coachItems.splice(e[i], 0, o);
|
|
592
|
+
}
|
|
593
|
+
e[i]++;
|
|
594
|
+
}
|
|
595
|
+
});
|
|
596
|
+
}
|
|
597
|
+
/**
|
|
598
|
+
* Initialization of SeatReservationPlaceSelection Array based on the transferred places
|
|
599
|
+
* that have the state SELECTED within the seatReservation object
|
|
600
|
+
*/
|
|
601
|
+
_initSeatReservationPlaceSelection() {
|
|
602
|
+
this.selectedSeatReservationPlaces.seats = [], this.selectedSeatReservationPlaces.bicycles = [], this.seatReservations?.forEach((e, t) => e.coachItems.map((s, i) => {
|
|
603
|
+
s.places?.filter((a) => a.state === "SELECTED")?.forEach((a) => {
|
|
604
|
+
const o = this.getPlaceElementId(t, i, a.number), c = ke(a, o, e.deckCoachIndex, i), w = this._getSeatReservationPlaceSelection(c, t);
|
|
605
|
+
w && (w.placeType === "SEAT" ? this.selectedSeatReservationPlaces.seats.push(w) : this.selectedSeatReservationPlaces.bicycles.push(w));
|
|
606
|
+
});
|
|
607
|
+
}));
|
|
608
|
+
}
|
|
609
|
+
/**
|
|
610
|
+
* All selected places will be reset or the currentSelectedPlace was given, then we reset all except currentSelectedPlace
|
|
611
|
+
* @param reservationPlaceSelections
|
|
612
|
+
* @param currSelectedPlace
|
|
613
|
+
*/
|
|
614
|
+
_resetAllPlaceSelections(e, t) {
|
|
615
|
+
for (const s of e)
|
|
616
|
+
if (!t || t.id !== s.id) {
|
|
617
|
+
const i = this.shadowRoot?.getElementById(s.id);
|
|
618
|
+
i && i.setAttribute("state", "FREE");
|
|
619
|
+
}
|
|
620
|
+
return t ? e = e.filter((s) => s.id === t.id) : e = [], e;
|
|
621
|
+
}
|
|
622
|
+
_getSeatReservationPlaceSelection(e, t) {
|
|
623
|
+
if (t === null)
|
|
624
|
+
return null;
|
|
625
|
+
const s = this.seatReservations[t].coachItems[e.coachIndex], i = s.places?.find((a) => a.number === e.number);
|
|
626
|
+
return i ? De(i, s, e.id, e.deckIndex, e.coachIndex) : null;
|
|
627
|
+
}
|
|
628
|
+
_getSeatReservationSelectedCoach(e) {
|
|
629
|
+
if (!this.seatReservations[this.currSelectedDeckIndex].coachItems[e])
|
|
630
|
+
return null;
|
|
631
|
+
const t = this.seatReservations[this.currSelectedDeckIndex].coachItems[e], s = this.getAvailableFreePlacesNumFromCoach(t.places);
|
|
632
|
+
return Te(e, t, s);
|
|
633
|
+
}
|
|
634
|
+
_setCurrSelectedPlaceElementId(e) {
|
|
635
|
+
this.currSelectedPlaceElementId = e ? this.getPlaceElementId(this.currSelectedDeckIndex, this.currSelectedCoachIndex, e.number) : null;
|
|
636
|
+
}
|
|
637
|
+
/**
|
|
638
|
+
* Preparation of the used documents font-size which needs
|
|
639
|
+
* to be determined in order to correctly calculate CSS values with rem
|
|
640
|
+
* */
|
|
641
|
+
_determineBaseFontSize() {
|
|
642
|
+
if (!Re) {
|
|
643
|
+
const t = 1 / parseInt(window.getComputedStyle(document.body).fontSize, 10);
|
|
644
|
+
this.style?.setProperty("--sbb-seat-reservation-one-px-rem", `${t + "rem"}`);
|
|
645
|
+
}
|
|
646
|
+
}
|
|
647
|
+
/**
|
|
648
|
+
* Prepares data for displaying navigation area.
|
|
649
|
+
* Calculates the values which are not going to change during use of a component:
|
|
650
|
+
* - coach id
|
|
651
|
+
* - list of service icons
|
|
652
|
+
* - class (first, second, any)
|
|
653
|
+
* - whether there is a driver area left or right
|
|
654
|
+
* */
|
|
655
|
+
_prepareCoachItemDetailsData() {
|
|
656
|
+
if (this.seatReservations) {
|
|
657
|
+
const e = this.seatReservations[this.seatReservations.length - 1].coachItems;
|
|
658
|
+
this.coachItemDetailsElements = [], e.forEach((t, s) => {
|
|
659
|
+
const i = [], a = [], o = [];
|
|
660
|
+
this.seatReservations.map((c) => c.coachItems[s]).forEach((c) => {
|
|
661
|
+
i.push(...c.travelClass), a.push(...c.propertyIds ? c.propertyIds : []), o.push(...c.places ? c.places : []);
|
|
662
|
+
}), this.coachItemDetailsElements.push({
|
|
663
|
+
id: t.id,
|
|
664
|
+
travelClass: this._prepareTravelClassNavigation(i),
|
|
665
|
+
propertyIds: this._prepareServiceIconsNavigation(a),
|
|
666
|
+
isDriverArea: t.places ? t.places.length === 0 : !0,
|
|
667
|
+
driverAreaSide: this._prepareDriverAreaSideNavigation(t),
|
|
668
|
+
freePlaces: this.getAvailableFreePlacesNumFromCoach(o),
|
|
669
|
+
driverAreaElements: this._setDriverAreasElements(t)
|
|
670
|
+
});
|
|
671
|
+
});
|
|
672
|
+
}
|
|
673
|
+
}
|
|
674
|
+
_prepareTravelClassNavigation(e) {
|
|
675
|
+
return e.indexOf("FIRST") !== -1 ? "FIRST" : e.indexOf("SECOND") !== -1 ? "SECOND" : "ANY_CLASS";
|
|
676
|
+
}
|
|
677
|
+
_prepareDriverAreaSideNavigation(e) {
|
|
678
|
+
const t = e.graphicElements?.filter((s) => s.icon === "DRIVER_AREA");
|
|
679
|
+
if (t && t.length > 0) {
|
|
680
|
+
const s = t.find((a) => a.position.x === 0) || !1, i = t.find((a) => a.position.x > 0) || !1;
|
|
681
|
+
return {
|
|
682
|
+
left: !!s,
|
|
683
|
+
right: !!i
|
|
684
|
+
};
|
|
685
|
+
}
|
|
686
|
+
}
|
|
687
|
+
_prepareCoachWidthAndGapCalculations() {
|
|
688
|
+
this.seatReservations && this.seatReservations[this.seatReservations.length - 1]?.coachItems?.forEach((t) => {
|
|
689
|
+
const s = this._isOverhangingElementsPresent(t.dimension.w, t.places), i = t.graphicElements?.filter((o) => o.icon && !this.notAreaElements.includes(o.icon)), a = this._isOverhangingElementsPresent(t.dimension.w, i);
|
|
690
|
+
this.overHangingElementInformation.push({
|
|
691
|
+
coachId: t.id,
|
|
692
|
+
overhangingPlaces: s,
|
|
693
|
+
overhangingGraphicAreas: a
|
|
694
|
+
});
|
|
695
|
+
});
|
|
696
|
+
}
|
|
697
|
+
/**
|
|
698
|
+
* Returns the current selected place HTML element by currSelectedPlaceElementId.
|
|
699
|
+
* @returns HTMLElement or null
|
|
700
|
+
*/
|
|
701
|
+
_getPlaceHtmlElement() {
|
|
702
|
+
return this.currSelectedPlaceElementId && this.shadowRoot?.getElementById(this.currSelectedPlaceElementId) || null;
|
|
703
|
+
}
|
|
704
|
+
/**
|
|
705
|
+
* Returns the extracted coach deck index from place id
|
|
706
|
+
* @returns number
|
|
707
|
+
*/
|
|
708
|
+
_getDeckIndexByPlaceId(e) {
|
|
709
|
+
const t = this.shadowRoot?.querySelector("#" + e)?.getAttribute("data-deck-index");
|
|
710
|
+
return t && !isNaN(+t) ? +t : null;
|
|
711
|
+
}
|
|
712
|
+
_isValidCoachIndex(e) {
|
|
713
|
+
return e >= 0 && e <= this.seatReservations[this.seatReservations.length - 1].coachItems.length;
|
|
714
|
+
}
|
|
715
|
+
/**
|
|
716
|
+
* Returns existing coach deck index depending on the selected coach.
|
|
717
|
+
* This method is necessary to get an available coach deck index during keyboard navigation, which can vary between coaches with different decks.
|
|
718
|
+
* For example, when navigating from a coach with two decks to a coach with one deck.
|
|
719
|
+
*
|
|
720
|
+
* [ooo]-[ooo]-[ooo]
|
|
721
|
+
* [ooo]-[ooo]-[ooo]-[ooo]-[ooo]
|
|
722
|
+
*
|
|
723
|
+
* @returns number
|
|
724
|
+
*/
|
|
725
|
+
_getExistingCoachDeckIndex() {
|
|
726
|
+
if (this.seatReservations[this.currSelectedDeckIndex].coachItems[this.currSelectedCoachIndex].places !== void 0)
|
|
727
|
+
return this.currSelectedDeckIndex;
|
|
728
|
+
const e = this.seatReservations.findIndex((t) => t.coachItems[this.currSelectedCoachIndex].places !== void 0);
|
|
729
|
+
return this.currSelectedDeckIndex >= e ? this.currSelectedDeckIndex : e;
|
|
730
|
+
}
|
|
731
|
+
/**
|
|
732
|
+
* If a selected place is slightly hidden by the overflow scroll content and is still clicked,
|
|
733
|
+
* the method tries to scroll the selected place into the nearest viewport, so that it is completely visible.
|
|
734
|
+
*
|
|
735
|
+
* @param placeId
|
|
736
|
+
*/
|
|
737
|
+
_scrollPlaceIntoNearestViewport(e) {
|
|
738
|
+
this.shadowRoot?.getElementById(e)?.scrollIntoView({ behavior: "smooth", block: "nearest", inline: "nearest" });
|
|
739
|
+
}
|
|
740
|
+
/**
|
|
741
|
+
* checks if any places or graphical elements (e.g. toilet area, etc.) are overhanging the coach borders
|
|
742
|
+
* @param coachItemWidth
|
|
743
|
+
* @param elements
|
|
744
|
+
*/
|
|
745
|
+
_isOverhangingElementsPresent(e, t) {
|
|
746
|
+
return t?.some((s) => s.position.x === 0 || s.position.x + s.dimension.w >= e) ?? !1;
|
|
747
|
+
}
|
|
748
|
+
/**
|
|
749
|
+
* collect information about the driverAreas for one coach
|
|
750
|
+
* @param coachItem
|
|
751
|
+
* @private
|
|
752
|
+
*/
|
|
753
|
+
_setDriverAreasElements(e) {
|
|
754
|
+
if (e) {
|
|
755
|
+
const t = e.graphicElements?.find((i) => i.icon === "DRIVER_AREA"), s = e.type === "LOCOMOTIVE_COACH" ? e.graphicElements?.find((i) => i.icon === "DRIVER_AREA_NO_VERTICAL_WALL") : void 0;
|
|
756
|
+
return {
|
|
757
|
+
driverArea: t,
|
|
758
|
+
driverAreaNoVerticalWall: s
|
|
759
|
+
};
|
|
760
|
+
}
|
|
761
|
+
return {
|
|
762
|
+
driverArea: void 0,
|
|
763
|
+
driverAreaNoVerticalWall: void 0
|
|
764
|
+
};
|
|
765
|
+
}
|
|
766
|
+
/**
|
|
767
|
+
* Is called when the SeatReservation loses focus, what happens when the user tabs out or clicks somewhere else.
|
|
768
|
+
* Then we reset the focused elements.
|
|
769
|
+
*/
|
|
770
|
+
_onLeaveSeatReservationComponent() {
|
|
771
|
+
this.hasNavigation && (this.focusedCoachIndex = -1), this.unfocusPlaceElement();
|
|
772
|
+
}
|
|
773
|
+
}, x = new WeakMap(), p = new WeakMap(), _ = new WeakMap(), m = new WeakMap(), y = new WeakMap(), b = new WeakMap(), P = new WeakMap(), A = new WeakMap(), E = new WeakMap(), R = new WeakMap(), N = new WeakMap(), k = new WeakMap(), D = new WeakMap(), T = new WeakMap(), (() => {
|
|
774
|
+
const e = typeof Symbol == "function" && Symbol.metadata ? Object.create(h[Symbol.metadata] ?? null) : void 0;
|
|
775
|
+
f = [C({ attribute: "seat-reservations", type: Array })], V = [C({ attribute: "travel-direction", type: String })], L = [S(), C({ attribute: "has-navigation", type: Boolean })], M = [S(), C({ attribute: "align-vertical", type: Boolean, reflect: !0, useDefault: !0 })], U = [S(), C({ attribute: "base-grid-size", type: Number })], j = [S(), C({ attribute: "height", type: Number })], Q = [S(), C({ attribute: "max-seat-reservations", type: Number })], te = [S(), C({ attribute: "max-bicycle-reservations", type: Number })], ae = [S(), C({ attribute: "prevent-place-click", type: Boolean })], re = [S(), C({ attribute: "preselect-coach-index", type: Number })], he = [S(), C({ attribute: "show-title-info", type: Boolean })], ge = [z()], Ce = [z()], xe = [z()], me = [Ne({ passive: !0 })], v(l, null, f, { kind: "accessor", name: "seatReservations", static: !1, private: !1, access: { has: (t) => "seatReservations" in t, get: (t) => t.seatReservations, set: (t, s) => {
|
|
776
|
+
t.seatReservations = s;
|
|
777
|
+
} }, metadata: e }, B, O), v(l, null, V, { kind: "accessor", name: "travelDirection", static: !1, private: !1, access: { has: (t) => "travelDirection" in t, get: (t) => t.travelDirection, set: (t, s) => {
|
|
778
|
+
t.travelDirection = s;
|
|
779
|
+
} }, metadata: e }, F, G), v(l, null, L, { kind: "accessor", name: "hasNavigation", static: !1, private: !1, access: { has: (t) => "hasNavigation" in t, get: (t) => t.hasNavigation, set: (t, s) => {
|
|
780
|
+
t.hasNavigation = s;
|
|
781
|
+
} }, metadata: e }, W, H), v(l, null, M, { kind: "accessor", name: "alignVertical", static: !1, private: !1, access: { has: (t) => "alignVertical" in t, get: (t) => t.alignVertical, set: (t, s) => {
|
|
782
|
+
t.alignVertical = s;
|
|
783
|
+
} }, metadata: e }, K, X), v(l, null, U, { kind: "accessor", name: "baseGridSize", static: !1, private: !1, access: { has: (t) => "baseGridSize" in t, get: (t) => t.baseGridSize, set: (t, s) => {
|
|
784
|
+
t.baseGridSize = s;
|
|
785
|
+
} }, metadata: e }, q, $), v(l, null, j, { kind: "accessor", name: "height", static: !1, private: !1, access: { has: (t) => "height" in t, get: (t) => t.height, set: (t, s) => {
|
|
786
|
+
t.height = s;
|
|
787
|
+
} }, metadata: e }, Y, J), v(l, null, Q, { kind: "accessor", name: "maxSeatReservations", static: !1, private: !1, access: { has: (t) => "maxSeatReservations" in t, get: (t) => t.maxSeatReservations, set: (t, s) => {
|
|
788
|
+
t.maxSeatReservations = s;
|
|
789
|
+
} }, metadata: e }, Z, ee), v(l, null, te, { kind: "accessor", name: "maxBicycleReservations", static: !1, private: !1, access: { has: (t) => "maxBicycleReservations" in t, get: (t) => t.maxBicycleReservations, set: (t, s) => {
|
|
790
|
+
t.maxBicycleReservations = s;
|
|
791
|
+
} }, metadata: e }, se, ie), v(l, null, ae, { kind: "accessor", name: "preventPlaceClick", static: !1, private: !1, access: { has: (t) => "preventPlaceClick" in t, get: (t) => t.preventPlaceClick, set: (t, s) => {
|
|
792
|
+
t.preventPlaceClick = s;
|
|
793
|
+
} }, metadata: e }, ce, oe), v(l, null, re, { kind: "accessor", name: "preselectCoachIndex", static: !1, private: !1, access: { has: (t) => "preselectCoachIndex" in t, get: (t) => t.preselectCoachIndex, set: (t, s) => {
|
|
794
|
+
t.preselectCoachIndex = s;
|
|
795
|
+
} }, metadata: e }, ne, le), v(l, null, he, { kind: "accessor", name: "showTitleInfo", static: !1, private: !1, access: { has: (t) => "showTitleInfo" in t, get: (t) => t.showTitleInfo, set: (t, s) => {
|
|
796
|
+
t.showTitleInfo = s;
|
|
797
|
+
} }, metadata: e }, de, ue), v(l, null, ge, { kind: "accessor", name: "selectedCoachIndex", static: !1, private: !1, access: { has: (t) => "selectedCoachIndex" in t, get: (t) => t.selectedCoachIndex, set: (t, s) => {
|
|
798
|
+
t.selectedCoachIndex = s;
|
|
799
|
+
} }, metadata: e }, ve, fe), v(l, null, Ce, { kind: "accessor", name: "focusedCoachIndex", static: !1, private: !1, access: { has: (t) => "focusedCoachIndex" in t, get: (t) => t.focusedCoachIndex, set: (t, s) => {
|
|
800
|
+
t.focusedCoachIndex = s;
|
|
801
|
+
} }, metadata: e }, Se, Ie), v(l, null, xe, { kind: "accessor", name: "hoveredCoachIndex", static: !1, private: !1, access: { has: (t) => "hoveredCoachIndex" in t, get: (t) => t.hoveredCoachIndex, set: (t, s) => {
|
|
802
|
+
t.hoveredCoachIndex = s;
|
|
803
|
+
} }, metadata: e }, pe, _e), v(l, null, me, { kind: "method", name: "coachAreaScrollend", static: !1, private: !1, access: { has: (t) => "coachAreaScrollend" in t, get: (t) => t.coachAreaScrollend }, metadata: e }, null, d), e && Object.defineProperty(l, Symbol.metadata, { enumerable: !0, configurable: !0, writable: !0, value: e });
|
|
804
|
+
})(), l.events = {
|
|
805
|
+
selectedplaces: "selectedplaces",
|
|
806
|
+
selectedcoach: "selectedcoach"
|
|
807
|
+
}, l;
|
|
831
808
|
})();
|
|
832
|
-
|
|
833
|
-
|
|
809
|
+
export {
|
|
810
|
+
Ke as SeatReservationBaseElement
|
|
811
|
+
};
|