@sbb-esta/lyne-elements-experimental 4.7.0 → 4.8.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.
Files changed (331) hide show
  1. package/autocomplete-grid/autocomplete-grid/autocomplete-grid.component.js +66 -85
  2. package/autocomplete-grid/autocomplete-grid-button/autocomplete-grid-button.component.js +72 -53
  3. package/autocomplete-grid/autocomplete-grid-button.js +4 -4
  4. package/autocomplete-grid/autocomplete-grid-cell/autocomplete-grid-cell.component.js +2 -25
  5. package/autocomplete-grid/autocomplete-grid-cell.js +4 -4
  6. package/autocomplete-grid/autocomplete-grid-optgroup/autocomplete-grid-optgroup.component.js +20 -28
  7. package/autocomplete-grid/autocomplete-grid-optgroup.js +4 -4
  8. package/autocomplete-grid/autocomplete-grid-option/autocomplete-grid-option.component.js +2 -41
  9. package/autocomplete-grid/autocomplete-grid-option.js +4 -5
  10. package/autocomplete-grid/autocomplete-grid-row/autocomplete-grid-row.component.js +2 -28
  11. package/autocomplete-grid/autocomplete-grid-row.js +4 -4
  12. package/autocomplete-grid/autocomplete-grid.js +4 -4
  13. package/autocomplete-grid-cell.component-Dak9wlBr.js +24 -0
  14. package/autocomplete-grid-option.component-DNRFHOwc.js +37 -0
  15. package/autocomplete-grid-row.component-DBHZQ0GQ.js +27 -0
  16. package/autocomplete-grid.js +10 -15
  17. package/autocomplete-grid.pure.js +7 -0
  18. package/core/datetime/date-helper.js +2 -191
  19. package/core/datetime.js +2 -5
  20. package/core/timetable/access-leg-helper.js +76 -71
  21. package/core/timetable/timetable-helper.js +9 -11
  22. package/core/timetable/timetable-properties.js +0 -1
  23. package/core/timetable.js +3 -7
  24. package/custom-elements.json +457 -368
  25. package/date-helper-CGproP5d.js +185 -0
  26. package/development/autocomplete-grid/autocomplete-grid/autocomplete-grid.component.d.ts +2 -1
  27. package/development/autocomplete-grid/autocomplete-grid/autocomplete-grid.component.d.ts.map +1 -1
  28. package/development/autocomplete-grid/autocomplete-grid/autocomplete-grid.component.js +115 -136
  29. package/development/autocomplete-grid/autocomplete-grid-button/autocomplete-grid-button.component.d.ts +3 -2
  30. package/development/autocomplete-grid/autocomplete-grid-button/autocomplete-grid-button.component.d.ts.map +1 -1
  31. package/development/autocomplete-grid/autocomplete-grid-button/autocomplete-grid-button.component.js +92 -71
  32. package/development/autocomplete-grid/autocomplete-grid-button.d.ts +0 -3
  33. package/development/autocomplete-grid/autocomplete-grid-button.d.ts.map +1 -1
  34. package/development/autocomplete-grid/autocomplete-grid-button.js +9 -4
  35. package/development/autocomplete-grid/autocomplete-grid-cell/autocomplete-grid-cell.component.d.ts +4 -4
  36. package/development/autocomplete-grid/autocomplete-grid-cell/autocomplete-grid-cell.component.d.ts.map +1 -1
  37. package/development/autocomplete-grid/autocomplete-grid-cell/autocomplete-grid-cell.component.js +2 -41
  38. package/development/autocomplete-grid/autocomplete-grid-cell.d.ts +0 -3
  39. package/development/autocomplete-grid/autocomplete-grid-cell.d.ts.map +1 -1
  40. package/development/autocomplete-grid/autocomplete-grid-cell.js +10 -5
  41. package/development/autocomplete-grid/autocomplete-grid-optgroup/autocomplete-grid-optgroup.component.d.ts +3 -2
  42. package/development/autocomplete-grid/autocomplete-grid-optgroup/autocomplete-grid-optgroup.component.d.ts.map +1 -1
  43. package/development/autocomplete-grid/autocomplete-grid-optgroup/autocomplete-grid-optgroup.component.js +28 -38
  44. package/development/autocomplete-grid/autocomplete-grid-optgroup.d.ts +0 -3
  45. package/development/autocomplete-grid/autocomplete-grid-optgroup.d.ts.map +1 -1
  46. package/development/autocomplete-grid/autocomplete-grid-optgroup.js +9 -4
  47. package/development/autocomplete-grid/autocomplete-grid-option/autocomplete-grid-option.component.d.ts +1 -0
  48. package/development/autocomplete-grid/autocomplete-grid-option/autocomplete-grid-option.component.d.ts.map +1 -1
  49. package/development/autocomplete-grid/autocomplete-grid-option/autocomplete-grid-option.component.js +2 -121
  50. package/development/autocomplete-grid/autocomplete-grid-option.d.ts +0 -3
  51. package/development/autocomplete-grid/autocomplete-grid-option.d.ts.map +1 -1
  52. package/development/autocomplete-grid/autocomplete-grid-option.js +10 -6
  53. package/development/autocomplete-grid/autocomplete-grid-row/autocomplete-grid-row.component.d.ts +4 -4
  54. package/development/autocomplete-grid/autocomplete-grid-row/autocomplete-grid-row.component.d.ts.map +1 -1
  55. package/development/autocomplete-grid/autocomplete-grid-row/autocomplete-grid-row.component.js +2 -103
  56. package/development/autocomplete-grid/autocomplete-grid-row.d.ts +0 -3
  57. package/development/autocomplete-grid/autocomplete-grid-row.d.ts.map +1 -1
  58. package/development/autocomplete-grid/autocomplete-grid-row.js +10 -5
  59. package/development/autocomplete-grid/autocomplete-grid.d.ts +0 -3
  60. package/development/autocomplete-grid/autocomplete-grid.d.ts.map +1 -1
  61. package/development/autocomplete-grid/autocomplete-grid.js +9 -4
  62. package/development/autocomplete-grid-cell.component-BBvM4o2H.js +42 -0
  63. package/development/autocomplete-grid-option.component-QzfM5eIE.js +123 -0
  64. package/development/autocomplete-grid-row.component-H8sCTCkT.js +104 -0
  65. package/development/autocomplete-grid.d.ts +1 -9
  66. package/development/autocomplete-grid.d.ts.map +1 -1
  67. package/development/autocomplete-grid.js +17 -14
  68. package/development/autocomplete-grid.pure.d.ts +8 -0
  69. package/development/autocomplete-grid.pure.d.ts.map +1 -0
  70. package/development/autocomplete-grid.pure.js +7 -0
  71. package/development/core/datetime/date-helper.js +2 -285
  72. package/development/core/datetime.d.ts +1 -3
  73. package/development/core/datetime.d.ts.map +1 -1
  74. package/development/core/datetime.js +2 -6
  75. package/development/core/timetable/access-leg-helper.js +104 -82
  76. package/development/core/timetable/timetable-helper.js +16 -17
  77. package/development/core/timetable/timetable-properties.d.ts +30 -30
  78. package/development/core/timetable/timetable-properties.d.ts.map +1 -1
  79. package/development/core/timetable/timetable-properties.js +0 -2
  80. package/development/core/timetable.d.ts +1 -3
  81. package/development/core/timetable.d.ts.map +1 -1
  82. package/development/core/timetable.js +3 -8
  83. package/development/date-helper-8_Y-PuHh.js +520 -0
  84. package/development/differenceInMinutes-DN_1Rk3O.js +110 -0
  85. package/development/format-Bbrn2bgo.js +1848 -0
  86. package/development/isValid-C-HzKv4v.js +178 -0
  87. package/development/journey-summary/journey-summary.component.d.ts +4 -2
  88. package/development/journey-summary/journey-summary.component.d.ts.map +1 -1
  89. package/development/journey-summary/journey-summary.component.js +2 -294
  90. package/development/journey-summary.component-uGhZvA4p.js +385 -0
  91. package/development/journey-summary.d.ts +1 -4
  92. package/development/journey-summary.d.ts.map +1 -1
  93. package/development/journey-summary.js +9 -5
  94. package/development/journey-summary.pure.d.ts +3 -0
  95. package/development/journey-summary.pure.d.ts.map +1 -0
  96. package/development/journey-summary.pure.js +2 -0
  97. package/development/mapper-hWWm7Uke.js +11454 -0
  98. package/development/pearl-chain/pearl-chain.component.d.ts +4 -2
  99. package/development/pearl-chain/pearl-chain.component.d.ts.map +1 -1
  100. package/development/pearl-chain/pearl-chain.component.js +2 -640
  101. package/development/pearl-chain-time/pearl-chain-time.component.d.ts +4 -2
  102. package/development/pearl-chain-time/pearl-chain-time.component.d.ts.map +1 -1
  103. package/development/pearl-chain-time/pearl-chain-time.component.js +2 -312
  104. package/development/pearl-chain-time.component-B8mayTWD.js +415 -0
  105. package/development/pearl-chain-time.d.ts +1 -4
  106. package/development/pearl-chain-time.d.ts.map +1 -1
  107. package/development/pearl-chain-time.js +9 -5
  108. package/development/pearl-chain-time.pure.d.ts +3 -0
  109. package/development/pearl-chain-time.pure.d.ts.map +1 -0
  110. package/development/pearl-chain-time.pure.js +2 -0
  111. package/development/pearl-chain-vertical/pearl-chain-vertical.component.d.ts +4 -2
  112. package/development/pearl-chain-vertical/pearl-chain-vertical.component.d.ts.map +1 -1
  113. package/development/pearl-chain-vertical/pearl-chain-vertical.component.js +2 -40
  114. package/development/pearl-chain-vertical-item/pearl-chain-vertical-item.component.d.ts +4 -2
  115. package/development/pearl-chain-vertical-item/pearl-chain-vertical-item.component.d.ts.map +1 -1
  116. package/development/pearl-chain-vertical-item/pearl-chain-vertical-item.component.js +2 -399
  117. package/development/pearl-chain-vertical-item.component-BDzbcIaf.js +435 -0
  118. package/development/pearl-chain-vertical-item.d.ts +1 -4
  119. package/development/pearl-chain-vertical-item.d.ts.map +1 -1
  120. package/development/pearl-chain-vertical-item.js +9 -5
  121. package/development/pearl-chain-vertical-item.pure.d.ts +3 -0
  122. package/development/pearl-chain-vertical-item.pure.d.ts.map +1 -0
  123. package/development/pearl-chain-vertical-item.pure.js +2 -0
  124. package/development/pearl-chain-vertical.component-CswE7b3M.js +39 -0
  125. package/development/pearl-chain-vertical.d.ts +1 -4
  126. package/development/pearl-chain-vertical.d.ts.map +1 -1
  127. package/development/pearl-chain-vertical.js +9 -5
  128. package/development/pearl-chain-vertical.pure.d.ts +3 -0
  129. package/development/pearl-chain-vertical.pure.d.ts.map +1 -0
  130. package/development/pearl-chain-vertical.pure.js +2 -0
  131. package/development/pearl-chain.component-wpsTvoSe.js +704 -0
  132. package/development/pearl-chain.d.ts +1 -4
  133. package/development/pearl-chain.d.ts.map +1 -1
  134. package/development/pearl-chain.js +9 -5
  135. package/development/pearl-chain.pure.d.ts +3 -0
  136. package/development/pearl-chain.pure.d.ts.map +1 -0
  137. package/development/pearl-chain.pure.js +2 -0
  138. package/development/seat-reservation/common/mapper/icon-mapper.d.ts +2 -2
  139. package/development/seat-reservation/common/mapper/icon-mapper.d.ts.map +1 -1
  140. package/development/seat-reservation/common/mapper/icon-mapper.js +168 -71
  141. package/development/seat-reservation/common/mapper/mapper.js +2 -131
  142. package/development/seat-reservation/common/mapper.js +2 -9
  143. package/development/seat-reservation/common/svgs.js +2 -46
  144. package/development/seat-reservation/common/translations/i18n.js +1118 -900
  145. package/development/seat-reservation/common/translations.js +1 -4
  146. package/development/seat-reservation/common/types.d.ts +22 -22
  147. package/development/seat-reservation/common/types.d.ts.map +1 -1
  148. package/development/seat-reservation/common/types.js +0 -2
  149. package/development/seat-reservation/common.d.ts +1 -3
  150. package/development/seat-reservation/common.d.ts.map +1 -1
  151. package/development/seat-reservation/common.js +10 -12
  152. package/development/seat-reservation/seat-reservation/seat-reservation-base-element.d.ts +4 -3
  153. package/development/seat-reservation/seat-reservation/seat-reservation-base-element.d.ts.map +1 -1
  154. package/development/seat-reservation/seat-reservation/seat-reservation-base-element.js +1309 -1231
  155. package/development/seat-reservation/seat-reservation/seat-reservation.component.d.ts +1 -0
  156. package/development/seat-reservation/seat-reservation/seat-reservation.component.d.ts.map +1 -1
  157. package/development/seat-reservation/seat-reservation/seat-reservation.component.js +2 -867
  158. package/development/seat-reservation/seat-reservation-area/seat-reservation-area.component.d.ts +4 -2
  159. package/development/seat-reservation/seat-reservation-area/seat-reservation-area.component.d.ts.map +1 -1
  160. package/development/seat-reservation/seat-reservation-area/seat-reservation-area.component.js +2 -112
  161. package/development/seat-reservation/seat-reservation-area.d.ts +0 -3
  162. package/development/seat-reservation/seat-reservation-area.d.ts.map +1 -1
  163. package/development/seat-reservation/seat-reservation-area.js +10 -5
  164. package/development/seat-reservation/seat-reservation-graphic/seat-reservation-assets.d.ts.map +1 -1
  165. package/development/seat-reservation/seat-reservation-graphic/seat-reservation-assets.js +39 -36
  166. package/development/seat-reservation/seat-reservation-graphic/seat-reservation-graphic.component.d.ts +4 -2
  167. package/development/seat-reservation/seat-reservation-graphic/seat-reservation-graphic.component.d.ts.map +1 -1
  168. package/development/seat-reservation/seat-reservation-graphic/seat-reservation-graphic.component.js +2 -167
  169. package/development/seat-reservation/seat-reservation-graphic.d.ts +0 -3
  170. package/development/seat-reservation/seat-reservation-graphic.d.ts.map +1 -1
  171. package/development/seat-reservation/seat-reservation-graphic.js +10 -5
  172. package/development/seat-reservation/seat-reservation-navigation-coach/seat-reservation-navigation-coach.component.d.ts +5 -3
  173. package/development/seat-reservation/seat-reservation-navigation-coach/seat-reservation-navigation-coach.component.d.ts.map +1 -1
  174. package/development/seat-reservation/seat-reservation-navigation-coach/seat-reservation-navigation-coach.component.js +2 -718
  175. package/development/seat-reservation/seat-reservation-navigation-coach.d.ts +0 -3
  176. package/development/seat-reservation/seat-reservation-navigation-coach.d.ts.map +1 -1
  177. package/development/seat-reservation/seat-reservation-navigation-coach.js +10 -5
  178. package/development/seat-reservation/seat-reservation-navigation-services/seat-reservation-navigation-services.component.d.ts +4 -2
  179. package/development/seat-reservation/seat-reservation-navigation-services/seat-reservation-navigation-services.component.d.ts.map +1 -1
  180. package/development/seat-reservation/seat-reservation-navigation-services/seat-reservation-navigation-services.component.js +2 -136
  181. package/development/seat-reservation/seat-reservation-navigation-services.d.ts +0 -3
  182. package/development/seat-reservation/seat-reservation-navigation-services.d.ts.map +1 -1
  183. package/development/seat-reservation/seat-reservation-navigation-services.js +10 -5
  184. package/development/seat-reservation/seat-reservation-place-control/seat-reservation-place-control.component.d.ts +2 -1
  185. package/development/seat-reservation/seat-reservation-place-control/seat-reservation-place-control.component.d.ts.map +1 -1
  186. package/development/seat-reservation/seat-reservation-place-control/seat-reservation-place-control.component.js +2 -607
  187. package/development/seat-reservation/seat-reservation-place-control.d.ts +0 -3
  188. package/development/seat-reservation/seat-reservation-place-control.d.ts.map +1 -1
  189. package/development/seat-reservation/seat-reservation-place-control.js +10 -5
  190. package/development/seat-reservation/seat-reservation-scoped/seat-reservation-scoped.component.d.ts +4 -2
  191. package/development/seat-reservation/seat-reservation-scoped/seat-reservation-scoped.component.d.ts.map +1 -1
  192. package/development/seat-reservation/seat-reservation-scoped/seat-reservation-scoped.component.js +2 -34
  193. package/development/seat-reservation/seat-reservation-scoped.d.ts +0 -3
  194. package/development/seat-reservation/seat-reservation-scoped.d.ts.map +1 -1
  195. package/development/seat-reservation/seat-reservation-scoped.js +10 -5
  196. package/development/seat-reservation/seat-reservation.d.ts +0 -3
  197. package/development/seat-reservation/seat-reservation.d.ts.map +1 -1
  198. package/development/seat-reservation/seat-reservation.js +10 -6
  199. package/development/seat-reservation-area.component-ORuli_DC.js +138 -0
  200. package/development/seat-reservation-graphic.component-lZXqHWIz.js +193 -0
  201. package/development/seat-reservation-navigation-coach.component-D2QXTMJJ.js +828 -0
  202. package/development/seat-reservation-navigation-services.component-Bg1adRlU.js +179 -0
  203. package/development/seat-reservation-place-control.component-CwUX-QYO.js +726 -0
  204. package/development/seat-reservation-scoped.component-uLT33P9y.js +31 -0
  205. package/development/seat-reservation.component-MOv5kHDC.js +821 -0
  206. package/development/seat-reservation.d.ts +1 -11
  207. package/development/seat-reservation.d.ts.map +1 -1
  208. package/development/seat-reservation.js +24 -27
  209. package/development/seat-reservation.pure.d.ts +15 -0
  210. package/development/seat-reservation.pure.d.ts.map +1 -0
  211. package/development/seat-reservation.pure.js +15 -0
  212. package/development/svgs-kDpBCto5.js +28 -0
  213. package/development/timetable-duration/timetable-duration.component.d.ts +4 -2
  214. package/development/timetable-duration/timetable-duration.component.d.ts.map +1 -1
  215. package/development/timetable-duration/timetable-duration.component.js +2 -114
  216. package/development/timetable-duration.component-D21SXsQq.js +125 -0
  217. package/development/timetable-duration.d.ts +1 -4
  218. package/development/timetable-duration.d.ts.map +1 -1
  219. package/development/timetable-duration.js +9 -5
  220. package/development/timetable-duration.pure.d.ts +3 -0
  221. package/development/timetable-duration.pure.d.ts.map +1 -0
  222. package/development/timetable-duration.pure.js +2 -0
  223. package/development/timetable-row/timetable-row.component.d.ts +4 -2
  224. package/development/timetable-row/timetable-row.component.d.ts.map +1 -1
  225. package/development/timetable-row/timetable-row.component.js +2 -787
  226. package/development/timetable-row.component-Y5w8vEwP.js +932 -0
  227. package/development/timetable-row.d.ts +1 -4
  228. package/development/timetable-row.d.ts.map +1 -1
  229. package/development/timetable-row.js +9 -12
  230. package/development/timetable-row.pure.d.ts +3 -0
  231. package/development/timetable-row.pure.d.ts.map +1 -0
  232. package/development/timetable-row.pure.js +2 -0
  233. package/development/toDate-Biiv3kyf.js +150 -0
  234. package/differenceInMinutes-Dr9gRqtu.js +27 -0
  235. package/format-CM5exOsN.js +1103 -0
  236. package/index.d.ts +9 -20
  237. package/index.js +9 -20
  238. package/isValid-B9oVW3lA.js +36 -0
  239. package/journey-summary/journey-summary.component.js +2 -193
  240. package/journey-summary.component-Cq_4kaOp.js +264 -0
  241. package/journey-summary.js +6 -4
  242. package/journey-summary.pure.js +2 -0
  243. package/mapper-DkiDDseD.js +11382 -0
  244. package/package.json +47 -2
  245. package/pearl-chain/pearl-chain.component.js +2 -164
  246. package/pearl-chain-time/pearl-chain-time.component.js +2 -156
  247. package/pearl-chain-time.component-DGDW5S1c.js +239 -0
  248. package/pearl-chain-time.js +6 -4
  249. package/pearl-chain-time.pure.js +2 -0
  250. package/pearl-chain-vertical/pearl-chain-vertical.component.js +2 -24
  251. package/pearl-chain-vertical-item/pearl-chain-vertical-item.component.js +2 -76
  252. package/pearl-chain-vertical-item.component-G22bWhLU.js +108 -0
  253. package/pearl-chain-vertical-item.js +6 -4
  254. package/pearl-chain-vertical-item.pure.js +2 -0
  255. package/pearl-chain-vertical.component-CXIDT5RD.js +21 -0
  256. package/pearl-chain-vertical.js +6 -4
  257. package/pearl-chain-vertical.pure.js +2 -0
  258. package/pearl-chain.component-DmjkVIva.js +194 -0
  259. package/pearl-chain.js +6 -4
  260. package/pearl-chain.pure.js +2 -0
  261. package/seat-reservation/common/mapper/icon-mapper.js +71 -71
  262. package/seat-reservation/common/mapper/mapper.js +2 -91
  263. package/seat-reservation/common/mapper.js +3 -9
  264. package/seat-reservation/common/svgs.js +2 -243
  265. package/seat-reservation/common/translations/i18n.js +1084 -891
  266. package/seat-reservation/common/translations.js +2 -4
  267. package/seat-reservation/common/types.js +0 -1
  268. package/seat-reservation/common.js +9 -13
  269. package/seat-reservation/seat-reservation/seat-reservation-base-element.js +834 -809
  270. package/seat-reservation/seat-reservation/seat-reservation.component.js +2 -422
  271. package/seat-reservation/seat-reservation-area/seat-reservation-area.component.js +2 -50
  272. package/seat-reservation/seat-reservation-area.js +4 -4
  273. package/seat-reservation/seat-reservation-graphic/seat-reservation-assets.js +69 -70
  274. package/seat-reservation/seat-reservation-graphic/seat-reservation-graphic.component.js +2 -73
  275. package/seat-reservation/seat-reservation-graphic.js +4 -4
  276. package/seat-reservation/seat-reservation-navigation-coach/seat-reservation-navigation-coach.component.js +2 -232
  277. package/seat-reservation/seat-reservation-navigation-coach.js +4 -4
  278. package/seat-reservation/seat-reservation-navigation-services/seat-reservation-navigation-services.component.js +2 -83
  279. package/seat-reservation/seat-reservation-navigation-services.js +4 -4
  280. package/seat-reservation/seat-reservation-place-control/seat-reservation-place-control.component.js +2 -202
  281. package/seat-reservation/seat-reservation-place-control.js +4 -4
  282. package/seat-reservation/seat-reservation-scoped/seat-reservation-scoped.component.js +2 -20
  283. package/seat-reservation/seat-reservation-scoped.js +4 -4
  284. package/seat-reservation/seat-reservation.js +5 -6
  285. package/seat-reservation-area.component-COD6CXhP.js +75 -0
  286. package/seat-reservation-graphic.component-BNfU5tQM.js +102 -0
  287. package/seat-reservation-navigation-coach.component-Bh9ILq60.js +333 -0
  288. package/seat-reservation-navigation-services.component-QL0UnilZ.js +127 -0
  289. package/seat-reservation-place-control.component-BfnZUyHv.js +322 -0
  290. package/seat-reservation-scoped.component-CY04BT_4.js +17 -0
  291. package/seat-reservation.component-zrQHTRl3.js +364 -0
  292. package/seat-reservation.js +17 -29
  293. package/seat-reservation.pure.js +15 -0
  294. package/svgs-D5DhLHxC.js +26 -0
  295. package/timetable-duration/timetable-duration.component.js +2 -56
  296. package/timetable-duration.component-DaYoJUGS.js +65 -0
  297. package/timetable-duration.js +6 -4
  298. package/timetable-duration.pure.js +2 -0
  299. package/timetable-row/timetable-row.component.js +2 -426
  300. package/timetable-row.component-BDMAEsbR.js +559 -0
  301. package/timetable-row.js +6 -11
  302. package/timetable-row.pure.js +2 -0
  303. package/toDate-p-Tpkb7t.js +16 -0
  304. package/development/differenceInMinutes-B0dawX-5.js +0 -26
  305. package/development/format-BMkeaqaF.js +0 -1433
  306. package/development/isValid-BYRch7pV.js +0 -53
  307. package/development/seat-reservation/common/mapper/sample-data/seat-reservation-sample-data-bus.d.ts +0 -69
  308. package/development/seat-reservation/common/mapper/sample-data/seat-reservation-sample-data-bus.d.ts.map +0 -1
  309. package/development/seat-reservation/common/mapper/sample-data/seat-reservation-sample-data-bus.js +0 -559
  310. package/development/seat-reservation/common/mapper/sample-data/seat-reservation-sample-data-decks.d.ts +0 -123
  311. package/development/seat-reservation/common/mapper/sample-data/seat-reservation-sample-data-decks.d.ts.map +0 -1
  312. package/development/seat-reservation/common/mapper/sample-data/seat-reservation-sample-data-decks.js +0 -972
  313. package/development/seat-reservation/common/mapper/sample-data/seat-reservation-sample-data-giruno.d.ts +0 -114
  314. package/development/seat-reservation/common/mapper/sample-data/seat-reservation-sample-data-giruno.d.ts.map +0 -1
  315. package/development/seat-reservation/common/mapper/sample-data/seat-reservation-sample-data-giruno.js +0 -20368
  316. package/development/seat-reservation/common/mapper/sample-data/seat-reservation-sample-data-others.d.ts +0 -85
  317. package/development/seat-reservation/common/mapper/sample-data/seat-reservation-sample-data-others.d.ts.map +0 -1
  318. package/development/seat-reservation/common/mapper/sample-data/seat-reservation-sample-data-others.js +0 -1739
  319. package/development/seat-reservation/common/mapper/sample-data/seat-reservation-sample-data-train.d.ts +0 -69
  320. package/development/seat-reservation/common/mapper/sample-data/seat-reservation-sample-data-train.d.ts.map +0 -1
  321. package/development/seat-reservation/common/mapper/sample-data/seat-reservation-sample-data-train.js +0 -9783
  322. package/development/toDate-BWb6Z1JD.js +0 -24
  323. package/differenceInMinutes-COvvdYsJ.js +0 -23
  324. package/format-CmKROkbc.js +0 -1186
  325. package/isValid-m3_OsPaB.js +0 -45
  326. package/seat-reservation/common/mapper/sample-data/seat-reservation-sample-data-bus.js +0 -558
  327. package/seat-reservation/common/mapper/sample-data/seat-reservation-sample-data-decks.js +0 -970
  328. package/seat-reservation/common/mapper/sample-data/seat-reservation-sample-data-giruno.js +0 -20367
  329. package/seat-reservation/common/mapper/sample-data/seat-reservation-sample-data-others.js +0 -1738
  330. package/seat-reservation/common/mapper/sample-data/seat-reservation-sample-data-train.js +0 -9782
  331. package/toDate-Bw2KTWeq.js +0 -15
package/index.d.ts CHANGED
@@ -1,23 +1,12 @@
1
- import { SbbJourneySummaryElement } from "./journey-summary/journey-summary.component.js";
2
- import { SbbPearlChainElement } from "./pearl-chain/pearl-chain.component.js";
3
- import { SbbPearlChainTimeElement } from "./pearl-chain-time/pearl-chain-time.component.js";
4
- import { SbbPearlChainVerticalElement } from "./pearl-chain-vertical/pearl-chain-vertical.component.js";
5
- import { SbbPearlChainVerticalItemElement } from "./pearl-chain-vertical-item/pearl-chain-vertical-item.component.js";
6
- import { SbbTimetableDurationElement } from "./timetable-duration/timetable-duration.component.js";
7
- import { SbbTimetableRowElement } from "./timetable-row/timetable-row.component.js";
8
- import { SbbAutocompleteGridElement } from "./autocomplete-grid/autocomplete-grid/autocomplete-grid.component.js";
9
- import { SbbAutocompleteGridButtonElement } from "./autocomplete-grid/autocomplete-grid-button/autocomplete-grid-button.component.js";
10
- import { SbbAutocompleteGridCellElement } from "./autocomplete-grid/autocomplete-grid-cell/autocomplete-grid-cell.component.js";
11
- import { SbbAutocompleteGridOptgroupElement } from "./autocomplete-grid/autocomplete-grid-optgroup/autocomplete-grid-optgroup.component.js";
12
- import { SbbAutocompleteGridOptionElement } from "./autocomplete-grid/autocomplete-grid-option/autocomplete-grid-option.component.js";
13
- import { SbbAutocompleteGridRowElement } from "./autocomplete-grid/autocomplete-grid-row/autocomplete-grid-row.component.js";
14
- import { SbbSeatReservationElement } from "./seat-reservation/seat-reservation/seat-reservation.component.js";
15
- import { SbbSeatReservationAreaElement } from "./seat-reservation/seat-reservation-area/seat-reservation-area.component.js";
16
- import { SbbSeatReservationGraphicElement } from "./seat-reservation/seat-reservation-graphic/seat-reservation-graphic.component.js";
17
- import { SbbSeatReservationNavigationCoachElement } from "./seat-reservation/seat-reservation-navigation-coach/seat-reservation-navigation-coach.component.js";
18
- import { SbbSeatReservationNavigationServicesElement } from "./seat-reservation/seat-reservation-navigation-services/seat-reservation-navigation-services.component.js";
19
- import { SbbSeatReservationPlaceControlElement } from "./seat-reservation/seat-reservation-place-control/seat-reservation-place-control.component.js";
20
- import { SbbSeatReservationScopedElement } from "./seat-reservation/seat-reservation-scoped/seat-reservation-scoped.component.js";
1
+ import { SbbAutocompleteGridButtonElement, SbbAutocompleteGridCellElement, SbbAutocompleteGridElement, SbbAutocompleteGridOptgroupElement, SbbAutocompleteGridOptionElement, SbbAutocompleteGridRowElement } from "./autocomplete-grid.js";
2
+ import { SbbJourneySummaryElement } from "./journey-summary.js";
3
+ import { SbbPearlChainElement } from "./pearl-chain.js";
4
+ import { SbbPearlChainTimeElement } from "./pearl-chain-time.js";
5
+ import { SbbPearlChainVerticalElement } from "./pearl-chain-vertical.js";
6
+ import { SbbPearlChainVerticalItemElement } from "./pearl-chain-vertical-item.js";
7
+ import { SbbSeatReservationAreaElement, SbbSeatReservationElement, SbbSeatReservationGraphicElement, SbbSeatReservationNavigationCoachElement, SbbSeatReservationNavigationServicesElement, SbbSeatReservationPlaceControlElement, SbbSeatReservationScopedElement } from "./seat-reservation.js";
8
+ import { SbbTimetableDurationElement } from "./timetable-duration.js";
9
+ import { SbbTimetableRowElement } from "./timetable-row.js";
21
10
  declare global {
22
11
  var SbbAutocompleteGridButtonElement: SbbAutocompleteGridButtonElement;
23
12
  var SbbAutocompleteGridCellElement: SbbAutocompleteGridCellElement;
package/index.js CHANGED
@@ -1,23 +1,12 @@
1
- import { SbbJourneySummaryElement } from "./journey-summary/journey-summary.component.js";
2
- import { SbbPearlChainElement } from "./pearl-chain/pearl-chain.component.js";
3
- import { SbbPearlChainTimeElement } from "./pearl-chain-time/pearl-chain-time.component.js";
4
- import { SbbPearlChainVerticalElement } from "./pearl-chain-vertical/pearl-chain-vertical.component.js";
5
- import { SbbPearlChainVerticalItemElement } from "./pearl-chain-vertical-item/pearl-chain-vertical-item.component.js";
6
- import { SbbTimetableDurationElement } from "./timetable-duration/timetable-duration.component.js";
7
- import { SbbTimetableRowElement } from "./timetable-row/timetable-row.component.js";
8
- import { SbbAutocompleteGridElement } from "./autocomplete-grid/autocomplete-grid/autocomplete-grid.component.js";
9
- import { SbbAutocompleteGridButtonElement } from "./autocomplete-grid/autocomplete-grid-button/autocomplete-grid-button.component.js";
10
- import { SbbAutocompleteGridCellElement } from "./autocomplete-grid/autocomplete-grid-cell/autocomplete-grid-cell.component.js";
11
- import { SbbAutocompleteGridOptgroupElement } from "./autocomplete-grid/autocomplete-grid-optgroup/autocomplete-grid-optgroup.component.js";
12
- import { SbbAutocompleteGridOptionElement } from "./autocomplete-grid/autocomplete-grid-option/autocomplete-grid-option.component.js";
13
- import { SbbAutocompleteGridRowElement } from "./autocomplete-grid/autocomplete-grid-row/autocomplete-grid-row.component.js";
14
- import { SbbSeatReservationElement } from "./seat-reservation/seat-reservation/seat-reservation.component.js";
15
- import { SbbSeatReservationAreaElement } from "./seat-reservation/seat-reservation-area/seat-reservation-area.component.js";
16
- import { SbbSeatReservationGraphicElement } from "./seat-reservation/seat-reservation-graphic/seat-reservation-graphic.component.js";
17
- import { SbbSeatReservationNavigationCoachElement } from "./seat-reservation/seat-reservation-navigation-coach/seat-reservation-navigation-coach.component.js";
18
- import { SbbSeatReservationNavigationServicesElement } from "./seat-reservation/seat-reservation-navigation-services/seat-reservation-navigation-services.component.js";
19
- import { SbbSeatReservationPlaceControlElement } from "./seat-reservation/seat-reservation-place-control/seat-reservation-place-control.component.js";
20
- import { SbbSeatReservationScopedElement } from "./seat-reservation/seat-reservation-scoped/seat-reservation-scoped.component.js";
1
+ import { SbbAutocompleteGridButtonElement, SbbAutocompleteGridCellElement, SbbAutocompleteGridElement, SbbAutocompleteGridOptgroupElement, SbbAutocompleteGridOptionElement, SbbAutocompleteGridRowElement } from "./autocomplete-grid.js";
2
+ import { SbbJourneySummaryElement } from "./journey-summary.js";
3
+ import { SbbPearlChainElement } from "./pearl-chain.js";
4
+ import { SbbPearlChainTimeElement } from "./pearl-chain-time.js";
5
+ import { SbbPearlChainVerticalElement } from "./pearl-chain-vertical.js";
6
+ import { SbbPearlChainVerticalItemElement } from "./pearl-chain-vertical-item.js";
7
+ import { SbbSeatReservationAreaElement, SbbSeatReservationElement, SbbSeatReservationGraphicElement, SbbSeatReservationNavigationCoachElement, SbbSeatReservationNavigationServicesElement, SbbSeatReservationPlaceControlElement, SbbSeatReservationScopedElement } from "./seat-reservation.js";
8
+ import { SbbTimetableDurationElement } from "./timetable-duration.js";
9
+ import { SbbTimetableRowElement } from "./timetable-row.js";
21
10
 
22
11
  globalThis.SbbAutocompleteGridButtonElement = SbbAutocompleteGridButtonElement;
23
12
  globalThis.SbbAutocompleteGridCellElement = SbbAutocompleteGridCellElement;
@@ -0,0 +1,36 @@
1
+ import { n as e, r as t, t as n } from "./toDate-p-Tpkb7t.js";
2
+ //#region node_modules/date-fns/_lib/getTimezoneOffsetInMilliseconds.js
3
+ function r(e) {
4
+ let t = n(e), r = new Date(Date.UTC(t.getFullYear(), t.getMonth(), t.getDate(), t.getHours(), t.getMinutes(), t.getSeconds(), t.getMilliseconds()));
5
+ return r.setUTCFullYear(t.getFullYear()), e - +r;
6
+ }
7
+ //#endregion
8
+ //#region node_modules/date-fns/_lib/normalizeDates.js
9
+ function i(t, ...n) {
10
+ let r = e.bind(null, t || n.find((e) => typeof e == "object"));
11
+ return n.map(r);
12
+ }
13
+ //#endregion
14
+ //#region node_modules/date-fns/startOfDay.js
15
+ function a(e, t) {
16
+ let r = n(e, t?.in);
17
+ return r.setHours(0, 0, 0, 0), r;
18
+ }
19
+ //#endregion
20
+ //#region node_modules/date-fns/differenceInCalendarDays.js
21
+ function o(e, n, o) {
22
+ let [s, c] = i(o?.in, e, n), l = a(s), u = a(c), d = +l - r(l), f = +u - r(u);
23
+ return Math.round((d - f) / t);
24
+ }
25
+ //#endregion
26
+ //#region node_modules/date-fns/isDate.js
27
+ function s(e) {
28
+ return e instanceof Date || typeof e == "object" && Object.prototype.toString.call(e) === "[object Date]";
29
+ }
30
+ //#endregion
31
+ //#region node_modules/date-fns/isValid.js
32
+ function c(e) {
33
+ return !(!s(e) && typeof e != "number" || isNaN(+n(e)));
34
+ }
35
+ //#endregion
36
+ export { o as n, i as r, c as t };
@@ -1,193 +1,2 @@
1
- var K = (i) => {
2
- throw TypeError(i);
3
- };
4
- var Q = (i, s, o) => s.has(i) || K("Cannot " + o);
5
- var u = (i, s, o) => (Q(i, s, "read from private field"), o ? o.call(i) : s.get(i)), b = (i, s, o) => s.has(i) ? K("Cannot add the same private member more than once") : s instanceof WeakSet ? s.add(i) : s.set(i, o), l = (i, s, o, c) => (Q(i, s, "write to private field"), c ? c.call(i, o) : s.set(i, o), o);
6
- import { __runInitializers as n, __esDecorate as p } from "tslib";
7
- import { SbbLanguageController as Z } from "@sbb-esta/lyne-elements/core/controllers.js";
8
- import { defaultDateAdapter as x } from "@sbb-esta/lyne-elements/core/datetime.js";
9
- import { forceType as w } from "@sbb-esta/lyne-elements/core/decorators.js";
10
- import { i18nTripDuration as tt } from "@sbb-esta/lyne-elements/core/i18n.js";
11
- import { boxSizingStyles as et } from "@sbb-esta/lyne-elements/core/styles.js";
12
- import { css as at, LitElement as it, nothing as m, html as d } from "lit";
13
- import { customElement as st, property as _ } from "lit/decorators.js";
14
- import { durationToTime as rt, removeTimezoneFromISOTimeString as nt } from "../core/datetime.js";
15
- import "@sbb-esta/lyne-elements/divider.js";
16
- import "@sbb-esta/lyne-elements/screen-reader-only.js";
17
- import "@sbb-esta/lyne-elements/journey-header.js";
18
- import "../pearl-chain-time.js";
19
- import { i as ot } from "../isValid-m3_OsPaB.js";
20
- import { f as R } from "../format-CmKROkbc.js";
21
- const lt = at`:host{display:block}.sbb-journey-summary{--sbb-text-font-size: var(--sbb-text-font-size-s);font-family:var(--sbb-typo-font-family);font-weight:400;line-height:var(--sbb-typo-line-height-text);letter-spacing:var(--sbb-typo-letter-spacing-text);font-size:var(--sbb-text-font-size);color:var(--sbb-color-4);display:flex;flex-direction:column}.sbb-journey-summary__via-block{display:flex}.sbb-journey-summary__vias{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;margin-block:0;padding-inline-start:var(--sbb-spacing-fixed-1x)}.sbb-journey-summary__date{margin-block-end:var(--sbb-spacing-fixed-2x)}.sbb-journey-summary__via{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.sbb-journey-summary__divider{margin-block:var(--sbb-spacing-fixed-6x)}ul li{list-style:none;display:inline}`;
22
- let jt = (() => {
23
- var y, v, f, g, k, $, r;
24
- let i = [st("sbb-journey-summary")], s, o = [], c, z = it, j = [], S, T = [], B = [], A, F = [], I = [], L, J = [], D = [], O, C = [], V = [], E, W = [], q = [], M, N = [], P = [], G;
25
- return r = class extends z {
26
- constructor() {
27
- super(...arguments);
28
- b(this, y);
29
- b(this, v);
30
- b(this, f);
31
- b(this, g);
32
- b(this, k);
33
- b(this, $);
34
- l(this, y, (n(this, j), n(this, T, null))), l(this, v, (n(this, B), n(this, F, null))), l(this, f, (n(this, I), n(this, J, !1))), l(this, g, (n(this, D), n(this, C, "3"))), l(this, k, (n(this, V), n(this, W, !1))), l(this, $, (n(this, q), n(this, N, !1))), this._now = (n(this, P), null), this._hasContentSlot = !1, this._language = new Z(this);
35
- }
36
- /** The trip prop */
37
- get trip() {
38
- return u(this, y);
39
- }
40
- set trip(e) {
41
- l(this, y, e);
42
- }
43
- /** The tripBack prop */
44
- get tripBack() {
45
- return u(this, v);
46
- }
47
- set tripBack(e) {
48
- l(this, v, e);
49
- }
50
- /**
51
- * The RoundTrip prop. This prop controls if one or two arrows are displayed in the header.
52
- */
53
- get roundTrip() {
54
- return u(this, f);
55
- }
56
- set roundTrip(e) {
57
- l(this, f, e);
58
- }
59
- /** Heading level of the journey header element (e.g. h1-h6). */
60
- get headerLevel() {
61
- return u(this, g);
62
- }
63
- set headerLevel(e) {
64
- l(this, g, e);
65
- }
66
- /**
67
- * Per default, the current location has a pulsating animation. You can
68
- * disable the animation with this property.
69
- */
70
- get disableAnimation() {
71
- return u(this, k);
72
- }
73
- set disableAnimation(e) {
74
- l(this, k, e);
75
- }
76
- /**
77
- * The Footpath attribute for rendering different icons
78
- * true: render a11y-icon
79
- * false: render walk-icon
80
- * default: render walk-icon
81
- */
82
- get a11yFootpath() {
83
- return u(this, $);
84
- }
85
- set a11yFootpath(e) {
86
- l(this, $, e);
87
- }
88
- /**
89
- * A configured date which acts as the current date instead of the real current date.
90
- * Only recommended for testing purposes.
91
- */
92
- set now(e) {
93
- this._now = x.getValidDateOrNull(x.deserialize(e));
94
- }
95
- get now() {
96
- return this._now ?? /* @__PURE__ */ new Date();
97
- }
98
- connectedCallback() {
99
- super.connectedCallback(), this._hasContentSlot = !!this.querySelector?.('[slot="content"]');
100
- }
101
- /** renders the date of the journey or if it is the current or next day */
102
- _renderJourneyStart(e, t) {
103
- const a = x, h = t ? rt(t, this._language.current) : null;
104
- if (ot(e))
105
- return d`
106
- <time datetime=${R(e, "d") + " " + R(e, "M")}>
107
- ${a.format(e).replace(",", ".")}</time
108
- >${t && t > 0 ? d`,<time>
109
- <sbb-screen-reader-only>
110
- ${tt[this._language.current]} ${h.long}
111
- </sbb-screen-reader-only>
112
- <span aria-hidden="true">${h.short}</span>
113
- </time>` : m}
114
- `;
115
- }
116
- _renderJourneyVias(e) {
117
- const t = e.slice(0, 5);
118
- return d`
119
- <div class="sbb-journey-summary__via-block">
120
- <span class="sbb-journey-summary__via-text">Via</span>
121
- <ul class="sbb-journey-summary__vias" role=${e.length <= 1 ? "presentation" : m}>
122
- ${t.map((a, h) => d`<li class="sbb-journey-summary__via">
123
- ${a}${h !== t.length - 1 && h < 4 ? d`<span>,</span>` : m}
124
- </li>`)}
125
- </ul>
126
- </div>
127
- `;
128
- }
129
- _renderJourneyInformation(e) {
130
- const { vias: t, duration: a, departureWalk: h, departure: H, arrivalWalk: U, arrival: X, legs: Y } = e || {};
131
- return d`
132
- <div>
133
- ${t && t.length > 0 ? this._renderJourneyVias(t) : m}
134
- <div class="sbb-journey-summary__date">
135
- ${this._renderJourneyStart(nt(H), a)}
136
- </div>
137
- <sbb-pearl-chain-time
138
- .arrivalTime=${X}
139
- .departureTime=${H}
140
- .departureWalk=${h}
141
- .arrivalWalk=${U}
142
- .legs=${Y}
143
- .disableAnimation=${this.disableAnimation}
144
- .a11yFootpath=${this.a11yFootpath}
145
- .now=${this.now}
146
- ></sbb-pearl-chain-time>
147
- </div>
148
- `;
149
- }
150
- render() {
151
- const { origin: e, destination: t } = this.trip || {};
152
- return d`
153
- <div class="sbb-journey-summary">
154
- ${e ? d`<sbb-journey-header
155
- size="l"
156
- .level=${this.headerLevel || m}
157
- .origin=${e}
158
- .destination=${t}
159
- .roundTrip=${this.roundTrip ?? m}
160
- ></sbb-journey-header>` : m}
161
- ${this._renderJourneyInformation(this.trip)}
162
- ${this.tripBack ? d`<div>
163
- <sbb-divider class="sbb-journey-summary__divider"></sbb-divider>
164
- ${this._renderJourneyInformation(this.tripBack)}
165
- </div>` : m}
166
- ${this._hasContentSlot ? d` <div class="sbb-journey-summary__slot">
167
- <slot name="content"></slot>
168
- </div>` : m}
169
- </div>
170
- `;
171
- }
172
- }, y = new WeakMap(), v = new WeakMap(), f = new WeakMap(), g = new WeakMap(), k = new WeakMap(), $ = new WeakMap(), c = r, (() => {
173
- const e = typeof Symbol == "function" && Symbol.metadata ? Object.create(z[Symbol.metadata] ?? null) : void 0;
174
- S = [_({ type: Object })], A = [_({ attribute: "trip-back", type: Object })], L = [w(), _({ attribute: "round-trip", type: Boolean })], O = [_({ attribute: "header-level" })], E = [w(), _({ attribute: "disable-animation", type: Boolean })], M = [w(), _({ attribute: "a11y-footpath", type: Boolean })], G = [_()], p(r, null, S, { kind: "accessor", name: "trip", static: !1, private: !1, access: { has: (t) => "trip" in t, get: (t) => t.trip, set: (t, a) => {
175
- t.trip = a;
176
- } }, metadata: e }, T, B), p(r, null, A, { kind: "accessor", name: "tripBack", static: !1, private: !1, access: { has: (t) => "tripBack" in t, get: (t) => t.tripBack, set: (t, a) => {
177
- t.tripBack = a;
178
- } }, metadata: e }, F, I), p(r, null, L, { kind: "accessor", name: "roundTrip", static: !1, private: !1, access: { has: (t) => "roundTrip" in t, get: (t) => t.roundTrip, set: (t, a) => {
179
- t.roundTrip = a;
180
- } }, metadata: e }, J, D), p(r, null, O, { kind: "accessor", name: "headerLevel", static: !1, private: !1, access: { has: (t) => "headerLevel" in t, get: (t) => t.headerLevel, set: (t, a) => {
181
- t.headerLevel = a;
182
- } }, metadata: e }, C, V), p(r, null, E, { kind: "accessor", name: "disableAnimation", static: !1, private: !1, access: { has: (t) => "disableAnimation" in t, get: (t) => t.disableAnimation, set: (t, a) => {
183
- t.disableAnimation = a;
184
- } }, metadata: e }, W, q), p(r, null, M, { kind: "accessor", name: "a11yFootpath", static: !1, private: !1, access: { has: (t) => "a11yFootpath" in t, get: (t) => t.a11yFootpath, set: (t, a) => {
185
- t.a11yFootpath = a;
186
- } }, metadata: e }, N, P), p(r, null, G, { kind: "setter", name: "now", static: !1, private: !1, access: { has: (t) => "now" in t, set: (t, a) => {
187
- t.now = a;
188
- } }, metadata: e }, null, j), p(null, s = { value: c }, i, { kind: "class", name: c.name, metadata: e }, null, o), c = s.value, e && Object.defineProperty(c, Symbol.metadata, { enumerable: !0, configurable: !0, writable: !0, value: e });
189
- })(), r.styles = [et, lt], n(c, o), c;
190
- })();
191
- export {
192
- jt as SbbJourneySummaryElement
193
- };
1
+ import { t as e } from "../journey-summary.component-Cq_4kaOp.js";
2
+ export { e as SbbJourneySummaryElement };
@@ -0,0 +1,264 @@
1
+ import { t as e } from "./format-CM5exOsN.js";
2
+ import { t } from "./isValid-B9oVW3lA.js";
3
+ import { __esDecorate as n, __runInitializers as r } from "tslib";
4
+ import { SbbElement as i } from "@sbb-esta/lyne-elements/core/base-elements.js";
5
+ import { SbbLanguageController as a } from "@sbb-esta/lyne-elements/core/controllers.js";
6
+ import { forceType as o } from "@sbb-esta/lyne-elements/core/decorators.js";
7
+ import { boxSizingStyles as s } from "@sbb-esta/lyne-elements/core/styles.js";
8
+ import { css as c, html as l, nothing as u } from "lit";
9
+ import { defaultDateAdapter as d } from "@sbb-esta/lyne-elements/core/datetime.js";
10
+ import { i18nTripDuration as f } from "@sbb-esta/lyne-elements/core/i18n.js";
11
+ import { property as p } from "lit/decorators.js";
12
+ import { durationToTime as m, removeTimezoneFromISOTimeString as h } from "./core/datetime.js";
13
+ import "@sbb-esta/lyne-elements/divider.js";
14
+ import "@sbb-esta/lyne-elements/screen-reader-only.js";
15
+ import "@sbb-esta/lyne-elements/journey-header.js";
16
+ import "./pearl-chain-time.js";
17
+ //#region src/elements-experimental/journey-summary/journey-summary.scss?lit&inline
18
+ var g = c`:host{display:block}.sbb-journey-summary{--sbb-text-font-size:var(--sbb-text-font-size-s);font-family:var(--sbb-typo-font-family);font-weight:400;line-height:var(--sbb-typo-line-height-text);letter-spacing:var(--sbb-typo-letter-spacing-text);font-size:var(--sbb-text-font-size);color:var(--sbb-color-4);flex-direction:column;display:flex}.sbb-journey-summary__via-block{display:flex}.sbb-journey-summary__vias{white-space:nowrap;text-overflow:ellipsis;margin-block:0;padding-inline-start:var(--sbb-spacing-fixed-1x);overflow:hidden}.sbb-journey-summary__date{margin-block-end:var(--sbb-spacing-fixed-2x)}.sbb-journey-summary__via{white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.sbb-journey-summary__divider{margin-block:var(--sbb-spacing-fixed-6x)}ul li{list-style:none;display:inline}`, _ = (() => {
19
+ let c = i, _ = [], v, y = [], b = [], x, S = [], C = [], w, T = [], E = [], D, O = [], k = [], A, j = [], M = [], N, P = [], F = [], I;
20
+ return class extends c {
21
+ constructor() {
22
+ super(...arguments), this.#e = (r(this, _), r(this, y, null)), this.#t = (r(this, b), r(this, S, null)), this.#n = (r(this, C), r(this, T, !1)), this.#r = (r(this, E), r(this, O, "3")), this.#i = (r(this, k), r(this, j, !1)), this.#a = (r(this, M), r(this, P, !1)), this._now = (r(this, F), null), this._hasContentSlot = !1, this._language = new a(this);
23
+ }
24
+ static {
25
+ let e = typeof Symbol == "function" && Symbol.metadata ? Object.create(c[Symbol.metadata] ?? null) : void 0;
26
+ v = [p({ type: Object })], x = [p({
27
+ attribute: "trip-back",
28
+ type: Object
29
+ })], w = [o(), p({
30
+ attribute: "round-trip",
31
+ type: Boolean
32
+ })], D = [p({ attribute: "header-level" })], A = [o(), p({
33
+ attribute: "disable-animation",
34
+ type: Boolean
35
+ })], N = [o(), p({
36
+ attribute: "a11y-footpath",
37
+ type: Boolean
38
+ })], I = [p()], n(this, null, v, {
39
+ kind: "accessor",
40
+ name: "trip",
41
+ static: !1,
42
+ private: !1,
43
+ access: {
44
+ has: (e) => "trip" in e,
45
+ get: (e) => e.trip,
46
+ set: (e, t) => {
47
+ e.trip = t;
48
+ }
49
+ },
50
+ metadata: e
51
+ }, y, b), n(this, null, x, {
52
+ kind: "accessor",
53
+ name: "tripBack",
54
+ static: !1,
55
+ private: !1,
56
+ access: {
57
+ has: (e) => "tripBack" in e,
58
+ get: (e) => e.tripBack,
59
+ set: (e, t) => {
60
+ e.tripBack = t;
61
+ }
62
+ },
63
+ metadata: e
64
+ }, S, C), n(this, null, w, {
65
+ kind: "accessor",
66
+ name: "roundTrip",
67
+ static: !1,
68
+ private: !1,
69
+ access: {
70
+ has: (e) => "roundTrip" in e,
71
+ get: (e) => e.roundTrip,
72
+ set: (e, t) => {
73
+ e.roundTrip = t;
74
+ }
75
+ },
76
+ metadata: e
77
+ }, T, E), n(this, null, D, {
78
+ kind: "accessor",
79
+ name: "headerLevel",
80
+ static: !1,
81
+ private: !1,
82
+ access: {
83
+ has: (e) => "headerLevel" in e,
84
+ get: (e) => e.headerLevel,
85
+ set: (e, t) => {
86
+ e.headerLevel = t;
87
+ }
88
+ },
89
+ metadata: e
90
+ }, O, k), n(this, null, A, {
91
+ kind: "accessor",
92
+ name: "disableAnimation",
93
+ static: !1,
94
+ private: !1,
95
+ access: {
96
+ has: (e) => "disableAnimation" in e,
97
+ get: (e) => e.disableAnimation,
98
+ set: (e, t) => {
99
+ e.disableAnimation = t;
100
+ }
101
+ },
102
+ metadata: e
103
+ }, j, M), n(this, null, N, {
104
+ kind: "accessor",
105
+ name: "a11yFootpath",
106
+ static: !1,
107
+ private: !1,
108
+ access: {
109
+ has: (e) => "a11yFootpath" in e,
110
+ get: (e) => e.a11yFootpath,
111
+ set: (e, t) => {
112
+ e.a11yFootpath = t;
113
+ }
114
+ },
115
+ metadata: e
116
+ }, P, F), n(this, null, I, {
117
+ kind: "setter",
118
+ name: "now",
119
+ static: !1,
120
+ private: !1,
121
+ access: {
122
+ has: (e) => "now" in e,
123
+ set: (e, t) => {
124
+ e.now = t;
125
+ }
126
+ },
127
+ metadata: e
128
+ }, null, _), e && Object.defineProperty(this, Symbol.metadata, {
129
+ enumerable: !0,
130
+ configurable: !0,
131
+ writable: !0,
132
+ value: e
133
+ });
134
+ }
135
+ static {
136
+ this.elementName = "sbb-journey-summary";
137
+ }
138
+ static {
139
+ this.styles = [s, g];
140
+ }
141
+ #e;
142
+ get trip() {
143
+ return this.#e;
144
+ }
145
+ set trip(e) {
146
+ this.#e = e;
147
+ }
148
+ #t;
149
+ get tripBack() {
150
+ return this.#t;
151
+ }
152
+ set tripBack(e) {
153
+ this.#t = e;
154
+ }
155
+ #n;
156
+ get roundTrip() {
157
+ return this.#n;
158
+ }
159
+ set roundTrip(e) {
160
+ this.#n = e;
161
+ }
162
+ #r;
163
+ get headerLevel() {
164
+ return this.#r;
165
+ }
166
+ set headerLevel(e) {
167
+ this.#r = e;
168
+ }
169
+ #i;
170
+ get disableAnimation() {
171
+ return this.#i;
172
+ }
173
+ set disableAnimation(e) {
174
+ this.#i = e;
175
+ }
176
+ #a;
177
+ get a11yFootpath() {
178
+ return this.#a;
179
+ }
180
+ set a11yFootpath(e) {
181
+ this.#a = e;
182
+ }
183
+ set now(e) {
184
+ this._now = d.getValidDateOrNull(d.deserialize(e));
185
+ }
186
+ get now() {
187
+ return this._now ?? /* @__PURE__ */ new Date();
188
+ }
189
+ connectedCallback() {
190
+ super.connectedCallback(), this._hasContentSlot = !!this.querySelector?.("[slot=\"content\"]");
191
+ }
192
+ _renderJourneyStart(n, r) {
193
+ let i = d, a = r ? m(r, this._language.current) : null;
194
+ if (t(n)) return l`
195
+ <time datetime=${e(n, "d") + " " + e(n, "M")}>
196
+ ${i.format(n).replace(",", ".")}</time
197
+ >${r && r > 0 ? l`,<time>
198
+ <sbb-screen-reader-only>
199
+ ${f[this._language.current]} ${a.long}
200
+ </sbb-screen-reader-only>
201
+ <span aria-hidden="true">${a.short}</span>
202
+ </time>` : u}
203
+ `;
204
+ }
205
+ _renderJourneyVias(e) {
206
+ let t = e.slice(0, 5);
207
+ return l`
208
+ <div class="sbb-journey-summary__via-block">
209
+ <span class="sbb-journey-summary__via-text">Via</span>
210
+ <ul class="sbb-journey-summary__vias" role=${e.length <= 1 ? "presentation" : u}>
211
+ ${t.map((e, n) => l`<li class="sbb-journey-summary__via">
212
+ ${e}${n !== t.length - 1 && n < 4 ? l`<span>,</span>` : u}
213
+ </li>`)}
214
+ </ul>
215
+ </div>
216
+ `;
217
+ }
218
+ _renderJourneyInformation(e) {
219
+ let { vias: t, duration: n, departureWalk: r, departure: i, arrivalWalk: a, arrival: o, legs: s } = e || {};
220
+ return l`
221
+ <div>
222
+ ${t && t.length > 0 ? this._renderJourneyVias(t) : u}
223
+ <div class="sbb-journey-summary__date">
224
+ ${this._renderJourneyStart(h(i), n)}
225
+ </div>
226
+ <sbb-pearl-chain-time
227
+ .arrivalTime=${o}
228
+ .departureTime=${i}
229
+ .departureWalk=${r}
230
+ .arrivalWalk=${a}
231
+ .legs=${s}
232
+ .disableAnimation=${this.disableAnimation}
233
+ .a11yFootpath=${this.a11yFootpath}
234
+ .now=${this.now}
235
+ ></sbb-pearl-chain-time>
236
+ </div>
237
+ `;
238
+ }
239
+ render() {
240
+ let { origin: e, destination: t } = this.trip || {};
241
+ return l`
242
+ <div class="sbb-journey-summary">
243
+ ${e ? l`<sbb-journey-header
244
+ size="l"
245
+ .level=${this.headerLevel || u}
246
+ .origin=${e}
247
+ .destination=${t}
248
+ .roundTrip=${this.roundTrip ?? u}
249
+ ></sbb-journey-header>` : u}
250
+ ${this._renderJourneyInformation(this.trip)}
251
+ ${this.tripBack ? l`<div>
252
+ <sbb-divider class="sbb-journey-summary__divider"></sbb-divider>
253
+ ${this._renderJourneyInformation(this.tripBack)}
254
+ </div>` : u}
255
+ ${this._hasContentSlot ? l` <div class="sbb-journey-summary__slot">
256
+ <slot name="content"></slot>
257
+ </div>` : u}
258
+ </div>
259
+ `;
260
+ }
261
+ };
262
+ })();
263
+ //#endregion
264
+ export { _ as t };
@@ -1,4 +1,6 @@
1
- import { SbbJourneySummaryElement as r } from "./journey-summary/journey-summary.component.js";
2
- export {
3
- r as SbbJourneySummaryElement
4
- };
1
+ import { t as e } from "./journey-summary.component-Cq_4kaOp.js";
2
+ import "./journey-summary.pure.js";
3
+ //#region src/elements-experimental/journey-summary.ts
4
+ e.define();
5
+ //#endregion
6
+ export { e as SbbJourneySummaryElement };
@@ -0,0 +1,2 @@
1
+ import { t as e } from "./journey-summary.component-Cq_4kaOp.js";
2
+ export { e as SbbJourneySummaryElement };