@sbb-esta/lyne-elements-experimental 4.6.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.
- package/autocomplete-grid/autocomplete-grid/autocomplete-grid.component.js +66 -85
- package/autocomplete-grid/autocomplete-grid-button/autocomplete-grid-button.component.js +72 -53
- package/autocomplete-grid/autocomplete-grid-button.js +4 -4
- package/autocomplete-grid/autocomplete-grid-cell/autocomplete-grid-cell.component.js +2 -25
- package/autocomplete-grid/autocomplete-grid-cell.js +4 -4
- package/autocomplete-grid/autocomplete-grid-optgroup/autocomplete-grid-optgroup.component.js +20 -28
- package/autocomplete-grid/autocomplete-grid-optgroup.js +4 -4
- package/autocomplete-grid/autocomplete-grid-option/autocomplete-grid-option.component.js +2 -41
- package/autocomplete-grid/autocomplete-grid-option.js +4 -5
- package/autocomplete-grid/autocomplete-grid-row/autocomplete-grid-row.component.js +2 -28
- package/autocomplete-grid/autocomplete-grid-row.js +4 -4
- package/autocomplete-grid/autocomplete-grid.js +4 -4
- package/autocomplete-grid-cell.component-Dak9wlBr.js +24 -0
- package/autocomplete-grid-option.component-DNRFHOwc.js +37 -0
- package/autocomplete-grid-row.component-DBHZQ0GQ.js +27 -0
- package/autocomplete-grid.js +10 -15
- package/autocomplete-grid.pure.js +7 -0
- package/core/datetime/date-helper.js +2 -191
- package/core/datetime.js +2 -5
- package/core/styles/core.scss +13 -0
- package/core/styles/lean-theme.scss +3 -0
- package/core/styles/off-brand-theme.scss +3 -0
- package/core/styles/safety-theme.scss +3 -0
- package/core/styles/standard-theme.scss +3 -0
- package/core/styles/theme.scss +5 -0
- package/core/timetable/access-leg-helper.js +76 -71
- package/core/timetable/timetable-helper.js +9 -11
- package/core/timetable/timetable-properties.js +0 -1
- package/core/timetable.js +3 -7
- package/core.css +13 -0
- package/custom-elements.json +750 -466
- package/date-helper-CGproP5d.js +185 -0
- package/development/autocomplete-grid/autocomplete-grid/autocomplete-grid.component.d.ts +2 -1
- package/development/autocomplete-grid/autocomplete-grid/autocomplete-grid.component.d.ts.map +1 -1
- package/development/autocomplete-grid/autocomplete-grid/autocomplete-grid.component.js +115 -136
- package/development/autocomplete-grid/autocomplete-grid-button/autocomplete-grid-button.component.d.ts +3 -2
- package/development/autocomplete-grid/autocomplete-grid-button/autocomplete-grid-button.component.d.ts.map +1 -1
- package/development/autocomplete-grid/autocomplete-grid-button/autocomplete-grid-button.component.js +92 -71
- package/development/autocomplete-grid/autocomplete-grid-button.d.ts +0 -3
- package/development/autocomplete-grid/autocomplete-grid-button.d.ts.map +1 -1
- package/development/autocomplete-grid/autocomplete-grid-button.js +9 -4
- package/development/autocomplete-grid/autocomplete-grid-cell/autocomplete-grid-cell.component.d.ts +4 -4
- package/development/autocomplete-grid/autocomplete-grid-cell/autocomplete-grid-cell.component.d.ts.map +1 -1
- package/development/autocomplete-grid/autocomplete-grid-cell/autocomplete-grid-cell.component.js +2 -40
- package/development/autocomplete-grid/autocomplete-grid-cell.d.ts +0 -3
- package/development/autocomplete-grid/autocomplete-grid-cell.d.ts.map +1 -1
- package/development/autocomplete-grid/autocomplete-grid-cell.js +10 -5
- package/development/autocomplete-grid/autocomplete-grid-optgroup/autocomplete-grid-optgroup.component.d.ts +3 -2
- package/development/autocomplete-grid/autocomplete-grid-optgroup/autocomplete-grid-optgroup.component.d.ts.map +1 -1
- package/development/autocomplete-grid/autocomplete-grid-optgroup/autocomplete-grid-optgroup.component.js +28 -38
- package/development/autocomplete-grid/autocomplete-grid-optgroup.d.ts +0 -3
- package/development/autocomplete-grid/autocomplete-grid-optgroup.d.ts.map +1 -1
- package/development/autocomplete-grid/autocomplete-grid-optgroup.js +9 -4
- package/development/autocomplete-grid/autocomplete-grid-option/autocomplete-grid-option.component.d.ts +1 -0
- package/development/autocomplete-grid/autocomplete-grid-option/autocomplete-grid-option.component.d.ts.map +1 -1
- package/development/autocomplete-grid/autocomplete-grid-option/autocomplete-grid-option.component.js +2 -134
- package/development/autocomplete-grid/autocomplete-grid-option.d.ts +0 -3
- package/development/autocomplete-grid/autocomplete-grid-option.d.ts.map +1 -1
- package/development/autocomplete-grid/autocomplete-grid-option.js +10 -6
- package/development/autocomplete-grid/autocomplete-grid-row/autocomplete-grid-row.component.d.ts +4 -4
- package/development/autocomplete-grid/autocomplete-grid-row/autocomplete-grid-row.component.d.ts.map +1 -1
- package/development/autocomplete-grid/autocomplete-grid-row/autocomplete-grid-row.component.js +2 -115
- package/development/autocomplete-grid/autocomplete-grid-row.d.ts +0 -3
- package/development/autocomplete-grid/autocomplete-grid-row.d.ts.map +1 -1
- package/development/autocomplete-grid/autocomplete-grid-row.js +10 -5
- package/development/autocomplete-grid/autocomplete-grid.d.ts +0 -3
- package/development/autocomplete-grid/autocomplete-grid.d.ts.map +1 -1
- package/development/autocomplete-grid/autocomplete-grid.js +9 -4
- package/development/autocomplete-grid-cell.component-BBvM4o2H.js +42 -0
- package/development/autocomplete-grid-option.component-QzfM5eIE.js +123 -0
- package/development/autocomplete-grid-row.component-H8sCTCkT.js +104 -0
- package/development/autocomplete-grid.d.ts +1 -9
- package/development/autocomplete-grid.d.ts.map +1 -1
- package/development/autocomplete-grid.js +17 -14
- package/development/autocomplete-grid.pure.d.ts +8 -0
- package/development/autocomplete-grid.pure.d.ts.map +1 -0
- package/development/autocomplete-grid.pure.js +7 -0
- package/development/core/datetime/date-helper.js +2 -285
- package/development/core/datetime.d.ts +1 -3
- package/development/core/datetime.d.ts.map +1 -1
- package/development/core/datetime.js +2 -6
- package/development/core/timetable/access-leg-helper.js +104 -82
- package/development/core/timetable/timetable-helper.js +16 -17
- package/development/core/timetable/timetable-properties.d.ts +30 -30
- package/development/core/timetable/timetable-properties.d.ts.map +1 -1
- package/development/core/timetable/timetable-properties.js +0 -2
- package/development/core/timetable.d.ts +1 -3
- package/development/core/timetable.d.ts.map +1 -1
- package/development/core/timetable.js +3 -8
- package/development/date-helper-8_Y-PuHh.js +520 -0
- package/development/differenceInMinutes-DN_1Rk3O.js +110 -0
- package/development/format-Bbrn2bgo.js +1848 -0
- package/development/isValid-C-HzKv4v.js +178 -0
- package/development/journey-summary/journey-summary.component.d.ts +4 -2
- package/development/journey-summary/journey-summary.component.d.ts.map +1 -1
- package/development/journey-summary/journey-summary.component.js +2 -294
- package/development/journey-summary.component-uGhZvA4p.js +385 -0
- package/development/journey-summary.d.ts +1 -4
- package/development/journey-summary.d.ts.map +1 -1
- package/development/journey-summary.js +9 -5
- package/development/journey-summary.pure.d.ts +3 -0
- package/development/journey-summary.pure.d.ts.map +1 -0
- package/development/journey-summary.pure.js +2 -0
- package/development/mapper-hWWm7Uke.js +11454 -0
- package/development/pearl-chain/pearl-chain.component.d.ts +4 -2
- package/development/pearl-chain/pearl-chain.component.d.ts.map +1 -1
- package/development/pearl-chain/pearl-chain.component.js +2 -639
- package/development/pearl-chain-time/pearl-chain-time.component.d.ts +4 -2
- package/development/pearl-chain-time/pearl-chain-time.component.d.ts.map +1 -1
- package/development/pearl-chain-time/pearl-chain-time.component.js +2 -312
- package/development/pearl-chain-time.component-B8mayTWD.js +415 -0
- package/development/pearl-chain-time.d.ts +1 -4
- package/development/pearl-chain-time.d.ts.map +1 -1
- package/development/pearl-chain-time.js +9 -5
- package/development/pearl-chain-time.pure.d.ts +3 -0
- package/development/pearl-chain-time.pure.d.ts.map +1 -0
- package/development/pearl-chain-time.pure.js +2 -0
- package/development/pearl-chain-vertical/pearl-chain-vertical.component.d.ts +4 -2
- package/development/pearl-chain-vertical/pearl-chain-vertical.component.d.ts.map +1 -1
- package/development/pearl-chain-vertical/pearl-chain-vertical.component.js +2 -40
- package/development/pearl-chain-vertical-item/pearl-chain-vertical-item.component.d.ts +4 -2
- package/development/pearl-chain-vertical-item/pearl-chain-vertical-item.component.d.ts.map +1 -1
- package/development/pearl-chain-vertical-item/pearl-chain-vertical-item.component.js +2 -398
- package/development/pearl-chain-vertical-item.component-BDzbcIaf.js +435 -0
- package/development/pearl-chain-vertical-item.d.ts +1 -4
- package/development/pearl-chain-vertical-item.d.ts.map +1 -1
- package/development/pearl-chain-vertical-item.js +9 -5
- package/development/pearl-chain-vertical-item.pure.d.ts +3 -0
- package/development/pearl-chain-vertical-item.pure.d.ts.map +1 -0
- package/development/pearl-chain-vertical-item.pure.js +2 -0
- package/development/pearl-chain-vertical.component-CswE7b3M.js +39 -0
- package/development/pearl-chain-vertical.d.ts +1 -4
- package/development/pearl-chain-vertical.d.ts.map +1 -1
- package/development/pearl-chain-vertical.js +9 -5
- package/development/pearl-chain-vertical.pure.d.ts +3 -0
- package/development/pearl-chain-vertical.pure.d.ts.map +1 -0
- package/development/pearl-chain-vertical.pure.js +2 -0
- package/development/pearl-chain.component-wpsTvoSe.js +704 -0
- package/development/pearl-chain.d.ts +1 -4
- package/development/pearl-chain.d.ts.map +1 -1
- package/development/pearl-chain.js +9 -5
- package/development/pearl-chain.pure.d.ts +3 -0
- package/development/pearl-chain.pure.d.ts.map +1 -0
- package/development/pearl-chain.pure.js +2 -0
- package/development/seat-reservation/common/mapper/icon-mapper.d.ts +2 -2
- package/development/seat-reservation/common/mapper/icon-mapper.d.ts.map +1 -1
- package/development/seat-reservation/common/mapper/icon-mapper.js +168 -70
- package/development/seat-reservation/common/mapper/mapper.js +2 -129
- package/development/seat-reservation/common/mapper.js +2 -9
- package/development/seat-reservation/common/svgs.js +2 -46
- package/development/seat-reservation/common/translations/i18n.d.ts.map +1 -1
- package/development/seat-reservation/common/translations/i18n.js +1118 -869
- package/development/seat-reservation/common/translations.js +1 -4
- package/development/seat-reservation/common/types.d.ts +29 -24
- package/development/seat-reservation/common/types.d.ts.map +1 -1
- package/development/seat-reservation/common/types.js +0 -2
- package/development/seat-reservation/common.d.ts +1 -3
- package/development/seat-reservation/common.d.ts.map +1 -1
- package/development/seat-reservation/common.js +10 -12
- package/development/seat-reservation/seat-reservation/seat-reservation-base-element.d.ts +16 -5
- package/development/seat-reservation/seat-reservation/seat-reservation-base-element.d.ts.map +1 -1
- package/development/seat-reservation/seat-reservation/seat-reservation-base-element.js +1309 -1178
- package/development/seat-reservation/seat-reservation/seat-reservation.component.d.ts +2 -0
- package/development/seat-reservation/seat-reservation/seat-reservation.component.d.ts.map +1 -1
- package/development/seat-reservation/seat-reservation/seat-reservation.component.js +2 -832
- package/development/seat-reservation/seat-reservation-area/seat-reservation-area.component.d.ts +4 -2
- package/development/seat-reservation/seat-reservation-area/seat-reservation-area.component.d.ts.map +1 -1
- package/development/seat-reservation/seat-reservation-area/seat-reservation-area.component.js +2 -112
- package/development/seat-reservation/seat-reservation-area.d.ts +0 -3
- package/development/seat-reservation/seat-reservation-area.d.ts.map +1 -1
- package/development/seat-reservation/seat-reservation-area.js +10 -5
- package/development/seat-reservation/seat-reservation-graphic/seat-reservation-assets.d.ts.map +1 -1
- package/development/seat-reservation/seat-reservation-graphic/seat-reservation-assets.js +39 -36
- package/development/seat-reservation/seat-reservation-graphic/seat-reservation-graphic.component.d.ts +4 -2
- package/development/seat-reservation/seat-reservation-graphic/seat-reservation-graphic.component.d.ts.map +1 -1
- package/development/seat-reservation/seat-reservation-graphic/seat-reservation-graphic.component.js +2 -167
- package/development/seat-reservation/seat-reservation-graphic.d.ts +0 -3
- package/development/seat-reservation/seat-reservation-graphic.d.ts.map +1 -1
- package/development/seat-reservation/seat-reservation-graphic.js +10 -5
- package/development/seat-reservation/seat-reservation-navigation-coach/seat-reservation-navigation-coach.component.d.ts +8 -17
- package/development/seat-reservation/seat-reservation-navigation-coach/seat-reservation-navigation-coach.component.d.ts.map +1 -1
- package/development/seat-reservation/seat-reservation-navigation-coach/seat-reservation-navigation-coach.component.js +2 -798
- package/development/seat-reservation/seat-reservation-navigation-coach.d.ts +0 -3
- package/development/seat-reservation/seat-reservation-navigation-coach.d.ts.map +1 -1
- package/development/seat-reservation/seat-reservation-navigation-coach.js +10 -5
- package/development/seat-reservation/seat-reservation-navigation-services/seat-reservation-navigation-services.component.d.ts +6 -2
- package/development/seat-reservation/seat-reservation-navigation-services/seat-reservation-navigation-services.component.d.ts.map +1 -1
- package/development/seat-reservation/seat-reservation-navigation-services/seat-reservation-navigation-services.component.js +2 -120
- package/development/seat-reservation/seat-reservation-navigation-services.d.ts +0 -3
- package/development/seat-reservation/seat-reservation-navigation-services.d.ts.map +1 -1
- package/development/seat-reservation/seat-reservation-navigation-services.js +10 -5
- package/development/seat-reservation/seat-reservation-place-control/seat-reservation-place-control.component.d.ts +8 -1
- package/development/seat-reservation/seat-reservation-place-control/seat-reservation-place-control.component.d.ts.map +1 -1
- package/development/seat-reservation/seat-reservation-place-control/seat-reservation-place-control.component.js +2 -462
- package/development/seat-reservation/seat-reservation-place-control.d.ts +0 -3
- package/development/seat-reservation/seat-reservation-place-control.d.ts.map +1 -1
- package/development/seat-reservation/seat-reservation-place-control.js +10 -5
- package/development/seat-reservation/seat-reservation-scoped/seat-reservation-scoped.component.d.ts +4 -2
- package/development/seat-reservation/seat-reservation-scoped/seat-reservation-scoped.component.d.ts.map +1 -1
- package/development/seat-reservation/seat-reservation-scoped/seat-reservation-scoped.component.js +2 -34
- package/development/seat-reservation/seat-reservation-scoped.d.ts +0 -3
- package/development/seat-reservation/seat-reservation-scoped.d.ts.map +1 -1
- package/development/seat-reservation/seat-reservation-scoped.js +10 -5
- package/development/seat-reservation/seat-reservation.d.ts +0 -3
- package/development/seat-reservation/seat-reservation.d.ts.map +1 -1
- package/development/seat-reservation/seat-reservation.js +10 -6
- package/development/seat-reservation-area.component-ORuli_DC.js +138 -0
- package/development/seat-reservation-graphic.component-lZXqHWIz.js +193 -0
- package/development/seat-reservation-navigation-coach.component-D2QXTMJJ.js +828 -0
- package/development/seat-reservation-navigation-services.component-Bg1adRlU.js +179 -0
- package/development/seat-reservation-place-control.component-CwUX-QYO.js +726 -0
- package/development/seat-reservation-scoped.component-uLT33P9y.js +31 -0
- package/development/seat-reservation.component-MOv5kHDC.js +821 -0
- package/development/seat-reservation.d.ts +1 -11
- package/development/seat-reservation.d.ts.map +1 -1
- package/development/seat-reservation.js +24 -27
- package/development/seat-reservation.pure.d.ts +15 -0
- package/development/seat-reservation.pure.d.ts.map +1 -0
- package/development/seat-reservation.pure.js +15 -0
- package/development/svgs-kDpBCto5.js +28 -0
- package/development/timetable-duration/timetable-duration.component.d.ts +4 -2
- package/development/timetable-duration/timetable-duration.component.d.ts.map +1 -1
- package/development/timetable-duration/timetable-duration.component.js +2 -114
- package/development/timetable-duration.component-D21SXsQq.js +125 -0
- package/development/timetable-duration.d.ts +1 -4
- package/development/timetable-duration.d.ts.map +1 -1
- package/development/timetable-duration.js +9 -5
- package/development/timetable-duration.pure.d.ts +3 -0
- package/development/timetable-duration.pure.d.ts.map +1 -0
- package/development/timetable-duration.pure.js +2 -0
- package/development/timetable-row/timetable-row.component.d.ts +4 -2
- package/development/timetable-row/timetable-row.component.d.ts.map +1 -1
- package/development/timetable-row/timetable-row.component.js +2 -787
- package/development/timetable-row.component-Y5w8vEwP.js +932 -0
- package/development/timetable-row.d.ts +1 -4
- package/development/timetable-row.d.ts.map +1 -1
- package/development/timetable-row.js +9 -12
- package/development/timetable-row.pure.d.ts +3 -0
- package/development/timetable-row.pure.d.ts.map +1 -0
- package/development/timetable-row.pure.js +2 -0
- package/development/toDate-Biiv3kyf.js +150 -0
- package/differenceInMinutes-Dr9gRqtu.js +27 -0
- package/format-CM5exOsN.js +1103 -0
- package/index.d.ts +9 -20
- package/index.js +9 -20
- package/isValid-B9oVW3lA.js +36 -0
- package/journey-summary/journey-summary.component.js +2 -193
- package/journey-summary.component-Cq_4kaOp.js +264 -0
- package/journey-summary.js +6 -4
- package/journey-summary.pure.js +2 -0
- package/mapper-DkiDDseD.js +11382 -0
- package/off-brand-theme.css +13 -0
- package/package.json +63 -2
- package/pearl-chain/pearl-chain.component.js +2 -164
- package/pearl-chain-time/pearl-chain-time.component.js +2 -156
- package/pearl-chain-time.component-DGDW5S1c.js +239 -0
- package/pearl-chain-time.js +6 -4
- package/pearl-chain-time.pure.js +2 -0
- package/pearl-chain-vertical/pearl-chain-vertical.component.js +2 -24
- package/pearl-chain-vertical-item/pearl-chain-vertical-item.component.js +2 -76
- package/pearl-chain-vertical-item.component-G22bWhLU.js +108 -0
- package/pearl-chain-vertical-item.js +6 -4
- package/pearl-chain-vertical-item.pure.js +2 -0
- package/pearl-chain-vertical.component-CXIDT5RD.js +21 -0
- package/pearl-chain-vertical.js +6 -4
- package/pearl-chain-vertical.pure.js +2 -0
- package/pearl-chain.component-DmjkVIva.js +194 -0
- package/pearl-chain.js +6 -4
- package/pearl-chain.pure.js +2 -0
- package/safety-theme.css +13 -0
- package/seat-reservation/common/mapper/icon-mapper.js +71 -70
- package/seat-reservation/common/mapper/mapper.js +2 -89
- package/seat-reservation/common/mapper.js +3 -9
- package/seat-reservation/common/svgs.js +2 -243
- package/seat-reservation/common/translations/i18n.js +1084 -860
- package/seat-reservation/common/translations.js +2 -4
- package/seat-reservation/common/types.js +0 -1
- package/seat-reservation/common.js +9 -13
- package/seat-reservation/seat-reservation/seat-reservation-base-element.js +834 -769
- package/seat-reservation/seat-reservation/seat-reservation.component.js +2 -410
- package/seat-reservation/seat-reservation-area/seat-reservation-area.component.js +2 -50
- package/seat-reservation/seat-reservation-area.js +4 -4
- package/seat-reservation/seat-reservation-graphic/seat-reservation-assets.js +69 -70
- package/seat-reservation/seat-reservation-graphic/seat-reservation-graphic.component.js +2 -73
- package/seat-reservation/seat-reservation-graphic.js +4 -4
- package/seat-reservation/seat-reservation-navigation-coach/seat-reservation-navigation-coach.component.js +2 -277
- package/seat-reservation/seat-reservation-navigation-coach.js +4 -4
- package/seat-reservation/seat-reservation-navigation-services/seat-reservation-navigation-services.component.js +2 -73
- package/seat-reservation/seat-reservation-navigation-services.js +4 -4
- package/seat-reservation/seat-reservation-place-control/seat-reservation-place-control.component.js +2 -167
- package/seat-reservation/seat-reservation-place-control.js +4 -4
- package/seat-reservation/seat-reservation-scoped/seat-reservation-scoped.component.js +2 -20
- package/seat-reservation/seat-reservation-scoped.js +4 -4
- package/seat-reservation/seat-reservation.js +5 -6
- package/seat-reservation-area.component-COD6CXhP.js +75 -0
- package/seat-reservation-graphic.component-BNfU5tQM.js +102 -0
- package/seat-reservation-navigation-coach.component-Bh9ILq60.js +333 -0
- package/seat-reservation-navigation-services.component-QL0UnilZ.js +127 -0
- package/seat-reservation-place-control.component-BfnZUyHv.js +322 -0
- package/seat-reservation-scoped.component-CY04BT_4.js +17 -0
- package/seat-reservation.component-zrQHTRl3.js +364 -0
- package/seat-reservation.js +17 -29
- package/seat-reservation.pure.js +15 -0
- package/standard-theme.css +13 -0
- package/svgs-D5DhLHxC.js +26 -0
- package/timetable-duration/timetable-duration.component.js +2 -56
- package/timetable-duration.component-DaYoJUGS.js +65 -0
- package/timetable-duration.js +6 -4
- package/timetable-duration.pure.js +2 -0
- package/timetable-row/timetable-row.component.js +2 -426
- package/timetable-row.component-BDMAEsbR.js +559 -0
- package/timetable-row.js +6 -11
- package/timetable-row.pure.js +2 -0
- package/toDate-p-Tpkb7t.js +16 -0
- package/development/differenceInMinutes-B0dawX-5.js +0 -26
- package/development/format-BMkeaqaF.js +0 -1433
- package/development/isValid-BYRch7pV.js +0 -53
- package/development/seat-reservation/common/mapper/seat-reservation-sample-data.d.ts +0 -372
- package/development/seat-reservation/common/mapper/seat-reservation-sample-data.d.ts.map +0 -1
- package/development/seat-reservation/common/mapper/seat-reservation-sample-data.js +0 -31673
- package/development/toDate-BWb6Z1JD.js +0 -24
- package/differenceInMinutes-COvvdYsJ.js +0 -23
- package/format-CmKROkbc.js +0 -1186
- package/isValid-m3_OsPaB.js +0 -45
- package/seat-reservation/common/mapper/seat-reservation-sample-data.js +0 -31668
- package/toDate-Bw2KTWeq.js +0 -15
|
@@ -0,0 +1,364 @@
|
|
|
1
|
+
import { SeatReservationBaseElement as e } from "./seat-reservation/seat-reservation/seat-reservation-base-element.js";
|
|
2
|
+
import { SbbLanguageController as t } from "@sbb-esta/lyne-elements/core/controllers.js";
|
|
3
|
+
import { boxSizingStyles as n } from "@sbb-esta/lyne-elements/core/styles.js";
|
|
4
|
+
import { css as r, html as i, isServer as a, nothing as o } from "lit";
|
|
5
|
+
import "@sbb-esta/lyne-elements/screen-reader-only.js";
|
|
6
|
+
import { styleMap as s } from "lit/directives/style-map.js";
|
|
7
|
+
import { SbbSeatReservationAreaElement as c } from "./seat-reservation/seat-reservation-area/seat-reservation-area.component.js";
|
|
8
|
+
import { classMap as l } from "lit/directives/class-map.js";
|
|
9
|
+
import { getI18nSeatReservation as u } from "./seat-reservation/common/translations.js";
|
|
10
|
+
import { SbbSeatReservationGraphicElement as d } from "./seat-reservation/seat-reservation-graphic/seat-reservation-graphic.component.js";
|
|
11
|
+
import { repeat as f } from "lit/directives/repeat.js";
|
|
12
|
+
import { SbbSeatReservationNavigationCoachElement as p } from "./seat-reservation/seat-reservation-navigation-coach/seat-reservation-navigation-coach.component.js";
|
|
13
|
+
import { SbbSeatReservationPlaceControlElement as m } from "./seat-reservation/seat-reservation-place-control/seat-reservation-place-control.component.js";
|
|
14
|
+
import { SbbSeatReservationScopedElement as h } from "./seat-reservation/seat-reservation-scoped/seat-reservation-scoped.component.js";
|
|
15
|
+
import "@sbb-esta/lyne-elements/button.js";
|
|
16
|
+
import "@sbb-esta/lyne-elements/popover.js";
|
|
17
|
+
//#region src/elements-experimental/seat-reservation/seat-reservation/seat-reservation.scss?lit&inline
|
|
18
|
+
var g = r`:host{--sbb-seat-reservation-grid-size:16px;--sbb-seat-reservation-height:0;--sbb-seat-reservation-decks:1;height:inherit;display:block}:host ::part(coach-floor){fill:var(--sbb-background-color-2)}@media (forced-colors:active){:host ::part(coach-floor){fill:#0000}}:host(:dir(rtl)) :not(.sbb-sr-place-ctrl--type-bicycle,.sbb-sr-place-ctrl--orientation-90,.sbb-sr-place-ctrl--orientation-270,.sbb-sr-place-ctrl--state-selected) ::part(coach-floor){rotate:180deg}[popover]:where(sbb-popover){width:auto;height:auto;color:inherit;pointer-events:none;background-color:#0000;border:none;margin:0;padding:0}[popover]:where(sbb-popover) .sbb-sr-popover{margin-block:calc(4 * var(--sbb-seat-reservation-one-px-rem,.0625rem))}:host([align-vertical]) .sbb-sr__component{justify-content:flex-end;gap:calc(22 * var(--sbb-seat-reservation-one-px-rem,.0625rem));height:inherit;flex-direction:row-reverse}@media (width>=37.5rem){:host([align-vertical]) .sbb-sr__component{gap:calc(54 * var(--sbb-seat-reservation-one-px-rem,.0625rem))}}:host([align-vertical]) .sbb-sr__component nav.sbb-sr-navigation,:host([align-vertical]) .sbb-sr__component ul.sbb-sr-navigation__list-coaches{flex-direction:column}:host([align-vertical]) .sbb-sr__component nav.sbb-sr-navigation{padding:calc(16 * var(--sbb-seat-reservation-one-px-rem,.0625rem)) 0}:host([align-vertical]) .sbb-sr__component nav.sbb-sr-navigation .sbb-sr__navigation-control-button{left:calc(1 * var(--sbb-seat-reservation-one-px-rem,.0625rem));top:0;rotate:90deg}@media (width>=64rem){:host([align-vertical]) .sbb-sr__component nav.sbb-sr-navigation .sbb-sr__navigation-control-button{left:calc(-1 * var(--sbb-seat-reservation-one-px-rem,.0625rem))}}:host([align-vertical]) .sbb-sr__component nav.sbb-sr-navigation ul.sbb-sr-navigation__list-coaches{max-width:initial;padding:calc(5 * var(--sbb-seat-reservation-one-px-rem,.0625rem));overflow:hidden scroll}:host([align-vertical]) .sbb-sr__component nav.sbb-sr-navigation ul.sbb-sr-navigation__list-coaches li{display:flex}:host([align-vertical]) .sbb-sr__wrapper-coach-decks{flex-direction:column}:host([align-vertical]) .sbb-sr__wrapper-coach-decks .sbb-sr__wrapper-deck-labels{width:calc((var(--sbb-seat-reservation-height) + 24) * var(--sbb-seat-reservation-one-px-rem,.0625rem));height:initial;flex-direction:column-reverse}:host([align-vertical]) .sbb-sr__wrapper-coach-decks .sbb-sr__wrapper-deck-labels b{inline-size:calc(50% - 16 * var(--sbb-seat-reservation-one-px-rem,.0625rem));block-size:calc(20 * var(--sbb-seat-reservation-one-px-rem,.0625rem));margin-bottom:calc(16 * var(--sbb-seat-reservation-one-px-rem,.0625rem));rotate:initial;writing-mode:initial}:host([align-vertical]) .sbb-sr__wrapper-scrollarea{width:calc((var(--sbb-seat-reservation-height) + 24) * var(--sbb-seat-reservation-one-px-rem,.0625rem));height:100%;overflow:hidden scroll}:host([align-vertical]) .sbb-sr__wrapper-scrollarea .sbb-sr__parent{rotate:90deg}:host([align-vertical]) .sbb-sr-travel-direction-wrapper{width:calc(var(--sbb-seat-reservation-height) * var(--sbb-seat-reservation-one-px-rem,.0625rem));margin-block-start:calc(4 * var(--sbb-seat-reservation-one-px-rem,.0625rem))}.sbb-sr-navigation{gap:calc(3 * var(--sbb-seat-reservation-one-px-rem,.0625rem))}.sbb-sr-navigation .sbb-sr__navigation-control-button{top:calc(2 * var(--sbb-seat-reservation-one-px-rem,.0625rem));position:relative}@media (width>=64rem){.sbb-sr-navigation .sbb-sr__navigation-control-button{top:0}}.sbb-sr__component{gap:calc(64 * var(--sbb-seat-reservation-one-px-rem,.0625rem) - 16px);flex-direction:column;display:flex}.sbb-sr-travel-direction-wrapper{justify-content:center;align-items:center;column-gap:calc(4 * var(--sbb-seat-reservation-one-px-rem,.0625rem));margin-block:calc(8 * var(--sbb-seat-reservation-one-px-rem,.0625rem)) calc(4 * var(--sbb-seat-reservation-one-px-rem,.0625rem));font-size:var(--sbb-text-font-size-s);display:flex}.sbb-sr-travel-direction-wrapper .sbb-sr__travel-direction--arrow{align-items:center;display:flex}.sbb-sr-navigation-wrapper{display:flex}.sbb-sr-navigation{justify-content:center;width:100%;padding-inline:16px;display:flex}.sbb-sr-navigation__list-coaches{font-size:inherit;--sbb-scrollbar-thumb-width:.125rem;--sbb-scrollbar-thumb-width-hover:.25rem;--sbb-scrollbar-width-firefox:thin;--sbb-scrollbar-color:var(--lightningcss-light,color-mix(in srgb, var(--sbb-color-black) 30%, transparent))var(--lightningcss-dark,color-mix(in srgb, var(--sbb-color-white) 30%, transparent));--sbb-scrollbar-color-hover:var(--lightningcss-light,color-mix(in srgb, var(--sbb-color-black) 60%, transparent))var(--lightningcss-dark,color-mix(in srgb, var(--sbb-color-white) 60%, transparent));--sbb-scrollbar-track-color:transparent;--sbb-scrollbar-width:var(--sbb-spacing-fixed-3x);margin:0;padding:0;list-style:none}.sbb-sr-navigation__list-coaches::-webkit-scrollbar{width:var(--sbb-scrollbar-width);height:var(--sbb-scrollbar-width);background-color:var(--sbb-scrollbar-track-color,transparent)}.sbb-sr-navigation__list-coaches::-webkit-scrollbar-corner{background-color:var(--sbb-scrollbar-track-color,transparent)}.sbb-sr-navigation__list-coaches::-webkit-scrollbar-thumb{background-color:var(--sbb-scrollbar-color,currentcolor);border:calc(.5 * (var(--sbb-scrollbar-width) - var(--sbb-scrollbar-thumb-width))) solid transparent;border-radius:var(--sbb-border-radius-4x);background-clip:padding-box}.sbb-sr-navigation__list-coaches::-webkit-scrollbar-thumb:hover{background-color:var(--sbb-scrollbar-color-hover,currentcolor);border-width:calc(.5 * (var(--sbb-scrollbar-width) - var(--sbb-scrollbar-thumb-width-hover)))}.sbb-sr-navigation__list-coaches::-webkit-scrollbar-button{display:none}.sbb-sr-navigation__list-coaches::-webkit-scrollbar-corner{display:none}@supports not selector(::-webkit-scrollbar){.sbb-sr-navigation__list-coaches{scrollbar-width:var(--sbb-scrollbar-width-firefox);scrollbar-color:var(--sbb-scrollbar-color,currentcolor) var(--sbb-scrollbar-track-color,transparent)}}.sbb-sr-navigation__list-coaches{gap:calc(4 * var(--sbb-seat-reservation-one-px-rem,.0625rem));padding:calc(6 * var(--sbb-seat-reservation-one-px-rem,.0625rem)) calc(5 * var(--sbb-seat-reservation-one-px-rem,.0625rem)) 0;--sbb-scrollbar-color:transparent;flex-wrap:nowrap;max-width:856px;display:flex;position:relative;overflow:scroll hidden}.sbb-sr__wrapper-coach-decks{height:inherit;display:flex;overflow:hidden}.sbb-sr__wrapper-coach-decks .sbb-sr__wrapper-deck-labels{height:calc(var(--sbb-seat-reservation-height) * var(--sbb-seat-reservation-one-px-rem,.0625rem));writing-mode:vertical-lr;justify-content:space-between;display:flex}.sbb-sr__wrapper-coach-decks .sbb-sr__wrapper-deck-labels b{height:calc(50% - 16 * var(--sbb-seat-reservation-one-px-rem,.0625rem));width:calc(20 * var(--sbb-seat-reservation-one-px-rem,.0625rem));text-align:center;line-height:calc(20 * var(--sbb-seat-reservation-one-px-rem,.0625rem));margin-block-end:16px;rotate:180deg}.sbb-sr__wrapper-scrollarea{--sbb-scrollbar-thumb-width:.125rem;--sbb-scrollbar-thumb-width-hover:.25rem;--sbb-scrollbar-width-firefox:thin;--sbb-scrollbar-color:var(--lightningcss-light,color-mix(in srgb, var(--sbb-color-black) 30%, transparent))var(--lightningcss-dark,color-mix(in srgb, var(--sbb-color-white) 30%, transparent));--sbb-scrollbar-color-hover:var(--lightningcss-light,color-mix(in srgb, var(--sbb-color-black) 60%, transparent))var(--lightningcss-dark,color-mix(in srgb, var(--sbb-color-white) 60%, transparent));--sbb-scrollbar-track-color:transparent;--sbb-scrollbar-width:var(--sbb-spacing-fixed-3x)}.sbb-sr__wrapper-scrollarea::-webkit-scrollbar{width:var(--sbb-scrollbar-width);height:var(--sbb-scrollbar-width);background-color:var(--sbb-scrollbar-track-color,transparent)}.sbb-sr__wrapper-scrollarea::-webkit-scrollbar-corner{background-color:var(--sbb-scrollbar-track-color,transparent)}.sbb-sr__wrapper-scrollarea::-webkit-scrollbar-thumb{background-color:var(--sbb-scrollbar-color,currentcolor);border:calc(.5 * (var(--sbb-scrollbar-width) - var(--sbb-scrollbar-thumb-width))) solid transparent;border-radius:var(--sbb-border-radius-4x);background-clip:padding-box}.sbb-sr__wrapper-scrollarea::-webkit-scrollbar-thumb:hover{background-color:var(--sbb-scrollbar-color-hover,currentcolor);border-width:calc(.5 * (var(--sbb-scrollbar-width) - var(--sbb-scrollbar-thumb-width-hover)))}.sbb-sr__wrapper-scrollarea::-webkit-scrollbar-button{display:none}.sbb-sr__wrapper-scrollarea::-webkit-scrollbar-corner{display:none}@supports not selector(::-webkit-scrollbar){.sbb-sr__wrapper-scrollarea{scrollbar-width:var(--sbb-scrollbar-width-firefox);scrollbar-color:var(--sbb-scrollbar-color,currentcolor) var(--sbb-scrollbar-track-color,transparent)}}.sbb-sr__wrapper-scrollarea{padding-block:calc(8 * var(--sbb-seat-reservation-one-px-rem,.0625rem)) calc(16 * var(--sbb-seat-reservation-one-px-rem,.0625rem));overflow:scroll hidden}.sbb-sr__wrapper-scrollarea .sbb-sr__parent{flex-direction:column;display:flex;position:relative}.sbb-sr__list-decks{font-size:inherit;flex-direction:column;margin:0;padding:0;list-style:none;display:flex}.sbb-sr__list-decks--gap{gap:calc(48 * var(--sbb-seat-reservation-one-px-rem,.0625rem))}.sbb-sr__list-item-deck{position:relative}.sbb-sr__list-coaches{font-size:inherit;gap:calc(4 * var(--sbb-seat-reservation-one-px-rem,.0625rem));margin:0;padding:0;list-style:none;display:flex}.sbb-sr__list-decks:has(.sbb-sr-coach-has-overhanging-elements) .sbb-sr__list-coaches{gap:calc(8 * var(--sbb-seat-reservation-one-px-rem,.0625rem))}.sbb-sr__item-coach{position:relative}.sbb-sr-coach-wrapper__table{outline:0}`;
|
|
19
|
+
c.define(), d.define(), m.define(), p.define(), h.define();
|
|
20
|
+
var _ = class extends e {
|
|
21
|
+
constructor() {
|
|
22
|
+
super(...arguments), this._language = new t(this), this._notFixedRotatableAreaIcons = ["ENTRY_EXIT"];
|
|
23
|
+
}
|
|
24
|
+
static {
|
|
25
|
+
this.elementName = "sbb-seat-reservation";
|
|
26
|
+
}
|
|
27
|
+
static {
|
|
28
|
+
this.styles = [n, g];
|
|
29
|
+
}
|
|
30
|
+
willUpdate(e) {
|
|
31
|
+
super.willUpdate(e), e.has("hasNavigation") && (this.hasNavigation ? this.shadowRoot?.querySelectorAll("table").forEach((e) => e.removeAttribute("tabindex")) : this.shadowRoot?.querySelectorAll("table").forEach((e) => e.setAttribute("tabindex", "0")));
|
|
32
|
+
}
|
|
33
|
+
firstUpdated(e) {
|
|
34
|
+
super.firstUpdated(e), this.updateComplete.then(() => {
|
|
35
|
+
this.initNavigationSelectionByScrollEvent();
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
render() {
|
|
39
|
+
return this._initVehicleSeatReservationConstruction(), this._coachesHtmlTemplate || null;
|
|
40
|
+
}
|
|
41
|
+
_initVehicleSeatReservationConstruction() {
|
|
42
|
+
this._coachesHtmlTemplate = i`
|
|
43
|
+
${this._renderTravelDirection()}
|
|
44
|
+
<div class="sbb-sr__component">
|
|
45
|
+
${this._renderNavigation()}
|
|
46
|
+
<div
|
|
47
|
+
class="sbb-sr__wrapper-coach-decks"
|
|
48
|
+
@keydown=${(e) => this.keyboardSeatmapEventHandling(e)}
|
|
49
|
+
>
|
|
50
|
+
<div class="sbb-sr__wrapper-deck-labels">${this._renderDeckLabels()}</div>
|
|
51
|
+
<div
|
|
52
|
+
@scroll=${() => this.coachAreaScrollend()}
|
|
53
|
+
id="sbb-sr__wrapper-scrollarea"
|
|
54
|
+
class="sbb-sr__wrapper-scrollarea"
|
|
55
|
+
tabindex="-1"
|
|
56
|
+
>
|
|
57
|
+
<div id="sbb-sr__parent-area" class="sbb-sr__parent">
|
|
58
|
+
<ul
|
|
59
|
+
class="${l({
|
|
60
|
+
"sbb-sr__list-decks": !0,
|
|
61
|
+
"sbb-sr__list-decks--gap": this.hasMultipleDecks
|
|
62
|
+
})}"
|
|
63
|
+
>
|
|
64
|
+
${this.seatReservations?.map((e, t) => i`<li class="sbb-sr__list-item-deck">
|
|
65
|
+
<ul class="sbb-sr__list-coaches" role="presentation">
|
|
66
|
+
${this._renderCoaches(e, t)}
|
|
67
|
+
</ul>
|
|
68
|
+
</li>`)}
|
|
69
|
+
</ul>
|
|
70
|
+
</div>
|
|
71
|
+
</div>
|
|
72
|
+
</div>
|
|
73
|
+
</div>
|
|
74
|
+
`;
|
|
75
|
+
}
|
|
76
|
+
_renderDeckLabels() {
|
|
77
|
+
return this.hasMultipleDecks ? this.seatReservations.map((e) => i`<b aria-hidden="true">${u(e.deckCoachLevel, this._language.current)}</b>`) : null;
|
|
78
|
+
}
|
|
79
|
+
_renderNavigationControlButton(e) {
|
|
80
|
+
if (!this.hasNavigation || !this.seatReservations) return null;
|
|
81
|
+
let t = e == "DIRECTION_RIGHT" ? "sbb-sr-navigation__wrapper-button-direction--right" : "sbb-sr-navigation__wrapper-button-direction--left", n = e == "DIRECTION_RIGHT" ? "chevron-small-right-small" : "chevron-small-left-small", r = u(e == "DIRECTION_RIGHT" ? "SEAT_RESERVATION_END" : "SEAT_RESERVATION_BEGIN", this._language.current), a = !0;
|
|
82
|
+
return (e == "DIRECTION_LEFT" && this.selectedCoachIndex > 0 || e == "DIRECTION_RIGHT" && this.selectedCoachIndex < this.coachItemDetailsElements.length - 1) && (a = !1), i`<div class="sbb-sr-navigation__wrapper-button-direction">
|
|
83
|
+
<sbb-secondary-button
|
|
84
|
+
@click="${() => this.navigateByDirectionBtn(e)}"
|
|
85
|
+
@focus="${() => this.onFocusNavDirectionButton()}"
|
|
86
|
+
id="${t}"
|
|
87
|
+
class="sbb-sr__navigation-control-button"
|
|
88
|
+
size="m"
|
|
89
|
+
icon-name="${n}"
|
|
90
|
+
type="button"
|
|
91
|
+
aria-label="${r}"
|
|
92
|
+
role="button"
|
|
93
|
+
.disabledInteractive="${a || o}"
|
|
94
|
+
.disabled="${a || o}"
|
|
95
|
+
></sbb-secondary-button>
|
|
96
|
+
</div>`;
|
|
97
|
+
}
|
|
98
|
+
_renderTravelDirection() {
|
|
99
|
+
if (!this.travelDirection || this.travelDirection === "NONE") return null;
|
|
100
|
+
let e = u("SEAT_RESERVATION_TRAVEL_DIRECTION", this._language.current);
|
|
101
|
+
return i`<div class="sbb-sr-travel-direction-wrapper">
|
|
102
|
+
<div class="sbb-sr__travel-direction--arrow">
|
|
103
|
+
<sbb-icon slot="icon" name="${`arrow-${this.alignVertical ? this.travelDirection === "RIGHT" ? "down" : "up" : this.travelDirection === "RIGHT" ? "right" : "left"}-small`}"></sbb-icon>
|
|
104
|
+
</div>
|
|
105
|
+
<div class="sbb-sr__travel-direction--label">${e}</div>
|
|
106
|
+
</div>`;
|
|
107
|
+
}
|
|
108
|
+
_renderNavigation() {
|
|
109
|
+
return a || !this.hasNavigation || !this.seatReservations ? null : i`<div class="sbb-sr-navigation-wrapper">
|
|
110
|
+
<nav id="sbb-sr-navigation" class="sbb-sr-navigation">
|
|
111
|
+
${this._renderNavigationControlButton("DIRECTION_LEFT")}
|
|
112
|
+
<ul
|
|
113
|
+
id="sbb-sr__navigation-list-coaches"
|
|
114
|
+
class="sbb-sr-navigation__list-coaches"
|
|
115
|
+
aria-label="${u("SEAT_RESERVATION_NAVIGATION", this._language.current)}"
|
|
116
|
+
>
|
|
117
|
+
${this.coachItemDetailsElements.map((e, t) => i`<li>
|
|
118
|
+
<sbb-seat-reservation-navigation-coach
|
|
119
|
+
@selectcoach=${(e) => this._onSelectNavCoach(e)}
|
|
120
|
+
@focuscoach=${() => this._onFocusNavCoach()}
|
|
121
|
+
@keyup=${(e) => this.onKeyNavigationNavCoachButton(e, t)}
|
|
122
|
+
index="${t}"
|
|
123
|
+
.selected=${this.selectedCoachIndex === t}
|
|
124
|
+
.focused=${this.focusedCoachIndex === t}
|
|
125
|
+
.hovered=${this.hoveredCoachIndex === t}
|
|
126
|
+
.nativeFocusActive=${this.hasSeatReservationNativeFocus}
|
|
127
|
+
.coachItemDetails="${e}"
|
|
128
|
+
?vertical="${this.alignVertical}"
|
|
129
|
+
?showTitleInfo="${this.showTitleInfo}"
|
|
130
|
+
>
|
|
131
|
+
</sbb-seat-reservation-navigation-coach>
|
|
132
|
+
</li>`)}
|
|
133
|
+
</ul>
|
|
134
|
+
${this._renderNavigationControlButton("DIRECTION_RIGHT")}
|
|
135
|
+
</nav>
|
|
136
|
+
</div>`;
|
|
137
|
+
}
|
|
138
|
+
_renderCoaches(e, t) {
|
|
139
|
+
let n = JSON.parse(JSON.stringify(e?.coachItems));
|
|
140
|
+
return !n || a ? null : n.map((n, r) => i`
|
|
141
|
+
<li class="sbb-sr__item-coach">
|
|
142
|
+
${this._renderCoachElement(n, r, t, e.deckCoachIndex)}
|
|
143
|
+
</li>
|
|
144
|
+
`);
|
|
145
|
+
}
|
|
146
|
+
_renderCoachElement(e, t, n, r) {
|
|
147
|
+
let a = this.getCalculatedDimension(e.dimension), o = this._getDescriptionTableCoach(e);
|
|
148
|
+
return i`<sbb-seat-reservation-scoped
|
|
149
|
+
style=${s({
|
|
150
|
+
"--sbb-seat-reservation-scoped-width": a.w,
|
|
151
|
+
"--sbb-seat-reservation-scoped-height": a.h
|
|
152
|
+
})}
|
|
153
|
+
>
|
|
154
|
+
${this._getRenderedCoachBorders(e, t)}
|
|
155
|
+
${this._getRenderedGraphicalElements(e.graphicElements || [], e.dimension, t, n)}
|
|
156
|
+
${this._getRenderedServiceElements(t, n, e.serviceElements)}
|
|
157
|
+
|
|
158
|
+
<table
|
|
159
|
+
@focus=${() => this.onFocusTableCoachAndPreselectPlace(t)}
|
|
160
|
+
id="sbb-sr-coach-${t}"
|
|
161
|
+
class="sbb-sr-coach-wrapper__table"
|
|
162
|
+
aria-describedby="sbb-sr-coach-caption-${t}"
|
|
163
|
+
tabindex="-1"
|
|
164
|
+
>
|
|
165
|
+
<caption id="sbb-sr-coach-caption-${t}" tabindex="-1">
|
|
166
|
+
<sbb-screen-reader-only>${o}</sbb-screen-reader-only>
|
|
167
|
+
</caption>
|
|
168
|
+
${this._getRenderedRowPlaces(e, t, n, r)}
|
|
169
|
+
</table>
|
|
170
|
+
</sbb-seat-reservation-scoped>`;
|
|
171
|
+
}
|
|
172
|
+
_getRenderedCoachBorders(e, t) {
|
|
173
|
+
if (!e.graphicElements) return null;
|
|
174
|
+
let n = this.coachItemDetailsElements[t]?.driverAreaElements?.driverArea, r = this.coachItemDetailsElements[t]?.driverAreaElements?.driverAreaNoVerticalWall, a = n ? e.dimension.w - n.dimension.w - 1 : e.dimension.w - 2;
|
|
175
|
+
a *= this.baseGridSize;
|
|
176
|
+
let o = (e.dimension.h + this.coachBorderOffset * 2) * this.baseGridSize, c = n && n.position.x === 0 ? n?.dimension.w * this.baseGridSize : this.baseGridSize;
|
|
177
|
+
r && (a = this.getCalculatedDimension(e.dimension).w - 2 * (r.dimension.w * this.baseGridSize), c = r.dimension.w * this.baseGridSize);
|
|
178
|
+
let u = this.overHangingElementInformation.find((t) => t.coachId === e.id);
|
|
179
|
+
return (u?.overhangingPlaces || u?.overhangingGraphicAreas) && (a += 2 * this.baseGridSize, c = 0), i`
|
|
180
|
+
<sbb-seat-reservation-graphic
|
|
181
|
+
class="${l({ "sbb-sr-coach-has-overhanging-elements": u?.overhangingPlaces || u?.overhangingGraphicAreas || !1 })}"
|
|
182
|
+
style=${s({
|
|
183
|
+
"--sbb-seat-reservation-graphic-width": a,
|
|
184
|
+
"--sbb-seat-reservation-graphic-height": o,
|
|
185
|
+
"--sbb-seat-reservation-graphic-top": this.coachBorderPadding * -1,
|
|
186
|
+
"--sbb-seat-reservation-graphic-left": c,
|
|
187
|
+
"--sbb-seat-reservation-graphic-position": "absolute"
|
|
188
|
+
})}
|
|
189
|
+
name="COACH_BORDER_MIDDLE"
|
|
190
|
+
?stretch=${!0}
|
|
191
|
+
role="presentation"
|
|
192
|
+
></sbb-seat-reservation-graphic>
|
|
193
|
+
`;
|
|
194
|
+
}
|
|
195
|
+
_getRenderedRowPlaces(e, t, n, r) {
|
|
196
|
+
if (!e.places) return null;
|
|
197
|
+
let a = {};
|
|
198
|
+
for (let t of e.places) a[t.position.y] ? a[t.position.y].push(t) : a[t.position.y] = [t];
|
|
199
|
+
return Object.values(a).map((e, a) => i`
|
|
200
|
+
<tr id="row-${t}-${e[0].position.y}" data-row-index=${a}>
|
|
201
|
+
${this._getRenderedColumnPlaces(e, t, n, r)}
|
|
202
|
+
</tr>
|
|
203
|
+
`).flatMap((e) => e);
|
|
204
|
+
}
|
|
205
|
+
_getRenderedColumnPlaces(e, t, n, r) {
|
|
206
|
+
e.sort((e, t) => Number(e.position.x) - Number(t.position.x));
|
|
207
|
+
let a = t + "-" + r;
|
|
208
|
+
return i`${f(e, (e) => a + "-" + e.number, (e, a) => {
|
|
209
|
+
let o = this.getCalculatedDimension(e.dimension), c = this.getCalculatedPosition(e.position), l = e.rotation || 0, u = this.alignVertical ? -90 : 0, d = this.getPlaceElementId(n, t, e.number);
|
|
210
|
+
return i`
|
|
211
|
+
<td
|
|
212
|
+
id="cell-${n}-${t}-${e.position.y}-${a}"
|
|
213
|
+
class="graphical-element"
|
|
214
|
+
>
|
|
215
|
+
<sbb-seat-reservation-place-control
|
|
216
|
+
style=${s({
|
|
217
|
+
"--sbb-seat-reservation-place-control-text-scale-value": Math.min(o.w, o.h),
|
|
218
|
+
"--sbb-seat-reservation-place-control-width": o.w,
|
|
219
|
+
"--sbb-seat-reservation-place-control-height": o.h,
|
|
220
|
+
"--sbb-seat-reservation-place-control-top": c.y,
|
|
221
|
+
"--sbb-seat-reservation-place-control-left": c.x,
|
|
222
|
+
"--sbb-seat-reservation-place-control-rotation": l,
|
|
223
|
+
"--sbb-seat-reservation-place-control-text-rotation": u
|
|
224
|
+
})}
|
|
225
|
+
@selectplace=${(e) => this._onSelectPlace(e)}
|
|
226
|
+
exportparts="sbb-sr-place-part"
|
|
227
|
+
id=${d}
|
|
228
|
+
class="seat-reservation-place-control"
|
|
229
|
+
text=${e.number}
|
|
230
|
+
type=${e.type}
|
|
231
|
+
state=${e.state}
|
|
232
|
+
travel-direction=${this.travelDirection}
|
|
233
|
+
coach-index=${t}
|
|
234
|
+
deck-index=${r}
|
|
235
|
+
data-deck-index=${n}
|
|
236
|
+
.propertyIds=${e.propertyIds}
|
|
237
|
+
.preventClick=${this.preventPlaceClick}
|
|
238
|
+
?showTitleInfo="${this.showTitleInfo}"
|
|
239
|
+
></sbb-seat-reservation-place-control>
|
|
240
|
+
</td>
|
|
241
|
+
`;
|
|
242
|
+
})}`;
|
|
243
|
+
}
|
|
244
|
+
_getRenderedGraphicalElements(e, t, n, r) {
|
|
245
|
+
return e ? e?.map((e) => {
|
|
246
|
+
let i = e.icon ?? "", a = e.rotation || 0, o = this._notFixedRotatableAreaIcons.indexOf(e.icon) === -1, s = this.alignVertical && o ? a - 90 : a;
|
|
247
|
+
return this.notAreaElements.findIndex((e) => e === i) > -1 ? this._getRenderElementWithoutArea(e, a, t) : this._getRenderElementWithArea(e, s, t, n, r);
|
|
248
|
+
}) : null;
|
|
249
|
+
}
|
|
250
|
+
_getRenderElementWithArea(e, t, n, r, a) {
|
|
251
|
+
let c = e.icon?.indexOf("TABLE") === -1, d = e.icon && c ? e.icon : null, f = this.isElementDirectlyOnBorder(e, n) && d !== "ENTRY_EXIT", p = e.icon ? u(e.icon, this._language.current) : o, m = this.getCalculatedDimension(e.dimension, n, !0, f), h = this.getCalculatedPosition(e.position, e.dimension, n, !0), g = `popover-trigger-${a}-${r}-${h.x}-${h.y}`, _ = "free";
|
|
252
|
+
return e.position.y === this.coachBorderOffset * -1 ? _ = "upper-border" : e.position.y + e.dimension.h === n.h + this.coachBorderOffset && (_ = "lower-border"), _ !== "free" && (h.y += _ === "upper-border" ? 2 : 1, m.h -= 3), i`
|
|
253
|
+
<sbb-seat-reservation-area
|
|
254
|
+
id="${g}"
|
|
255
|
+
class="${l({ "sbb-seat-reservation-area--cursor-pointer": d !== null })}"
|
|
256
|
+
style=${s({
|
|
257
|
+
"--sbb-seat-reservation-area-width": m.w,
|
|
258
|
+
"--sbb-seat-reservation-area-height": m.h,
|
|
259
|
+
"--sbb-seat-reservation-area-top": h.y,
|
|
260
|
+
"--sbb-seat-reservation-area-left": h.x
|
|
261
|
+
})}
|
|
262
|
+
mounting=${_}
|
|
263
|
+
background="dark"
|
|
264
|
+
aria-hidden="true"
|
|
265
|
+
>
|
|
266
|
+
${d ? i`
|
|
267
|
+
<sbb-seat-reservation-graphic
|
|
268
|
+
style=${s({
|
|
269
|
+
"--sbb-seat-reservation-graphic-max-width": m.w,
|
|
270
|
+
"--sbb-seat-reservation-graphic-height": this.baseGridSize,
|
|
271
|
+
"--sbb-seat-reservation-graphic-rotation": t
|
|
272
|
+
})}
|
|
273
|
+
name=${d}
|
|
274
|
+
role="img"
|
|
275
|
+
aria-hidden="true"
|
|
276
|
+
class="auto-width"
|
|
277
|
+
></sbb-seat-reservation-graphic>
|
|
278
|
+
` : o}
|
|
279
|
+
</sbb-seat-reservation-area>
|
|
280
|
+
${d ? this._popover(g, p) : o}
|
|
281
|
+
`;
|
|
282
|
+
}
|
|
283
|
+
_getRenderElementWithoutArea(e, t, n) {
|
|
284
|
+
let r = this.getCalculatedDimension(e.dimension, n), a = this.getCalculatedPosition(e.position, e.dimension, n), c = e.icon && e.icon.endsWith("DRIVER_AREA") ? e.icon?.concat("_", this.seatReservations[this.currSelectedDeckIndex].vehicleType) : e.icon;
|
|
285
|
+
return i` <sbb-seat-reservation-graphic
|
|
286
|
+
style=${s({
|
|
287
|
+
"--sbb-seat-reservation-graphic-width": r.w,
|
|
288
|
+
"--sbb-seat-reservation-graphic-height": r.h,
|
|
289
|
+
"--sbb-seat-reservation-graphic-top": a.y,
|
|
290
|
+
"--sbb-seat-reservation-graphic-left": a.x,
|
|
291
|
+
"--sbb-seat-reservation-graphic-position": "absolute",
|
|
292
|
+
"--sbb-seat-reservation-graphic-rotation": t
|
|
293
|
+
})}
|
|
294
|
+
name=${c ?? o}
|
|
295
|
+
aria-hidden="true"
|
|
296
|
+
?stretch=${!0}
|
|
297
|
+
></sbb-seat-reservation-graphic>`;
|
|
298
|
+
}
|
|
299
|
+
_getRenderedServiceElements(e, t, n) {
|
|
300
|
+
return n ? n?.map((n) => {
|
|
301
|
+
let r = n.icon ? u(n.icon, this._language.current) : null, a = this.getCalculatedDimension(n.dimension), c = this.getCalculatedPosition(n.position), l = n.rotation || 0, d = this.alignVertical ? l - 90 : l, f = `popover-trigger-${t}-${e}-${c.x}-${c.y}`;
|
|
302
|
+
return i`
|
|
303
|
+
<sbb-seat-reservation-graphic
|
|
304
|
+
id="${f}"
|
|
305
|
+
style=${s({
|
|
306
|
+
"--sbb-seat-reservation-graphic-width": a.w,
|
|
307
|
+
"--sbb-seat-reservation-graphic-height": a.h,
|
|
308
|
+
"--sbb-seat-reservation-graphic-top": c.y,
|
|
309
|
+
"--sbb-seat-reservation-graphic-left": c.x,
|
|
310
|
+
"--sbb-seat-reservation-graphic-position": "absolute",
|
|
311
|
+
"--sbb-seat-reservation-graphic-rotation": d
|
|
312
|
+
})}
|
|
313
|
+
class="sbb-seat-reservation-graphic--cursor-pointer"
|
|
314
|
+
name=${n.icon ?? o}
|
|
315
|
+
role="img"
|
|
316
|
+
aria-hidden="true"
|
|
317
|
+
></sbb-seat-reservation-graphic>
|
|
318
|
+
${this._popover(f, r)}
|
|
319
|
+
`;
|
|
320
|
+
}) : null;
|
|
321
|
+
}
|
|
322
|
+
_onSelectPlace(e) {
|
|
323
|
+
let t = e.detail;
|
|
324
|
+
this.preventCoachScrollByPlaceClick = !0, this.isCoachGridFocusable = !1, this.focusedCoachIndex = -1, this.hasSeatReservationNativeFocus ||= !0, this.preventPlaceClick || (this.updateSelectedSeatReservationPlaces(t), this.updateCurrentSelectedPlaceInCoach(t));
|
|
325
|
+
}
|
|
326
|
+
_onSelectNavCoach(e) {
|
|
327
|
+
let t = e.detail;
|
|
328
|
+
this.isKeyboardNavigation = !1, this.preventCoachScrollByPlaceClick = !1, this.hasSeatReservationNativeFocus = !0, t !== null && t !== this.currSelectedCoachIndex ? (this.unfocusPlaceElement(), this.scrollToSelectedNavCoach(t)) : t === this.currSelectedCoachIndex && (this.updateCurrentSelectedCoach(), this.preselectPlaceInCoach()), this._closePopover();
|
|
329
|
+
}
|
|
330
|
+
_onFocusNavCoach() {
|
|
331
|
+
this.preventCoachScrollByPlaceClick ? this.focusPlaceElement(this.currSelectedPlace) : this.preselectPlaceInCoach(), this.isAutoScrolling = !1;
|
|
332
|
+
}
|
|
333
|
+
_popover(e, t) {
|
|
334
|
+
return i`
|
|
335
|
+
<sbb-popover trigger="${e}" hover-trigger="">
|
|
336
|
+
<p class="sbb-text-s sbb-sr-popover">${t}</p>
|
|
337
|
+
</sbb-popover>
|
|
338
|
+
`;
|
|
339
|
+
}
|
|
340
|
+
_closePopover() {
|
|
341
|
+
this.shadowRoot?.querySelectorAll("sbb-popover:is(:state(state-opened),[state--state-opened])").forEach((e) => e.close());
|
|
342
|
+
}
|
|
343
|
+
_getDescriptionTableCoach(e) {
|
|
344
|
+
if (e.type === "LOCOMOTIVE_COACH") return u("COACH_LOCOMOTIVE", this._language.current);
|
|
345
|
+
if (!e.places?.length) return u("COACH_BLOCKED_TABLE_CAPTION", this._language.current, [e.id]);
|
|
346
|
+
let t, n = this._getTitleDescriptionListString(e.graphicElements), r = this._getTitleDescriptionListString(e.serviceElements);
|
|
347
|
+
if (t = u("COACH_TABLE_CAPTION", this._language.current, [e.id]), !this.hasNavigation) {
|
|
348
|
+
let n = this.getAvailableFreePlacesNumFromCoach(e.places), r = u("COACH_AVAILABLE_NUMBER_OF_PLACES", this._language.current, [n.seats, n.bicycles]);
|
|
349
|
+
t = t.concat(". ").concat(r).concat(". ");
|
|
350
|
+
}
|
|
351
|
+
return (n || r) && (t += ". " + u("COACH_AVAILABLE_SERVICES", this._language.current) + ": ", t += r + ", " + n + "."), t;
|
|
352
|
+
}
|
|
353
|
+
_getTitleDescriptionListString(e) {
|
|
354
|
+
let t = [];
|
|
355
|
+
return e?.map((e) => {
|
|
356
|
+
let n = e.icon;
|
|
357
|
+
if (!n) return null;
|
|
358
|
+
let r = t.indexOf(n) > -1, i = u(e.icon, this._language.current), a = this._notFixedRotatableAreaIcons.indexOf(n) === -1 && this.notAreaElements.indexOf(n) === -1;
|
|
359
|
+
return r || t.push(e.icon), i && !r && a ? i : null;
|
|
360
|
+
}).filter((e) => !!e).join(", ");
|
|
361
|
+
}
|
|
362
|
+
};
|
|
363
|
+
//#endregion
|
|
364
|
+
export { _ as t };
|
package/seat-reservation.js
CHANGED
|
@@ -1,29 +1,17 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { mapIconToSvg as
|
|
3
|
-
import {
|
|
4
|
-
import { getI18nSeatReservation as
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
T as SbbSeatReservationNavigationServicesElement,
|
|
19
|
-
d as SbbSeatReservationPlaceControlElement,
|
|
20
|
-
N as SbbSeatReservationScopedElement,
|
|
21
|
-
f as SeatReservationBaseElement,
|
|
22
|
-
s as getI18nSeatReservation,
|
|
23
|
-
t as mapCoachInfosToCoachSelection,
|
|
24
|
-
S as mapIconToSvg,
|
|
25
|
-
a as mapPlaceAndCoachToSeatReservationPlaceSelection,
|
|
26
|
-
r as mapPlaceInfosToPlaceSelection,
|
|
27
|
-
n as mapRawDataToSeatReservation,
|
|
28
|
-
p as svgs
|
|
29
|
-
};
|
|
1
|
+
import { i as e, n as t, r as n, t as r } from "./mapper-DkiDDseD.js";
|
|
2
|
+
import { mapIconToSvg as i } from "./seat-reservation/common/mapper/icon-mapper.js";
|
|
3
|
+
import { t as a } from "./svgs-D5DhLHxC.js";
|
|
4
|
+
import { getI18nSeatReservation as o } from "./seat-reservation/common/translations/i18n.js";
|
|
5
|
+
import { t as s } from "./seat-reservation-area.component-COD6CXhP.js";
|
|
6
|
+
import { t as c } from "./seat-reservation-graphic.component-BNfU5tQM.js";
|
|
7
|
+
import { assetsTemplate as l, svgImageByOSDMCode as u } from "./seat-reservation/seat-reservation-graphic/seat-reservation-assets.js";
|
|
8
|
+
import { t as d } from "./seat-reservation-navigation-coach.component-Bh9ILq60.js";
|
|
9
|
+
import { t as f } from "./seat-reservation-navigation-services.component-QL0UnilZ.js";
|
|
10
|
+
import { t as p } from "./seat-reservation-place-control.component-BfnZUyHv.js";
|
|
11
|
+
import { t as m } from "./seat-reservation-scoped.component-CY04BT_4.js";
|
|
12
|
+
import { SeatReservationBaseElement as h } from "./seat-reservation/seat-reservation/seat-reservation-base-element.js";
|
|
13
|
+
import { t as g } from "./seat-reservation.component-zrQHTRl3.js";
|
|
14
|
+
import "./seat-reservation.pure.js";
|
|
15
|
+
g.define(), s.define(), c.define(), d.define(), f.define(), p.define(), m.define();
|
|
16
|
+
//#endregion
|
|
17
|
+
export { s as SbbSeatReservationAreaElement, g as SbbSeatReservationElement, c as SbbSeatReservationGraphicElement, d as SbbSeatReservationNavigationCoachElement, f as SbbSeatReservationNavigationServicesElement, p as SbbSeatReservationPlaceControlElement, m as SbbSeatReservationScopedElement, h as SeatReservationBaseElement, l as assetsTemplate, o as getI18nSeatReservation, r as mapCoachInfosToCoachSelection, i as mapIconToSvg, t as mapPlaceAndCoachToSeatReservationPlaceSelection, n as mapPlaceInfosToPlaceSelection, e as mapRawDataToSeatReservation, u as svgImageByOSDMCode, a as svgs };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { i as e, n as t, r as n, t as r } from "./mapper-DkiDDseD.js";
|
|
2
|
+
import { mapIconToSvg as i } from "./seat-reservation/common/mapper/icon-mapper.js";
|
|
3
|
+
import "./seat-reservation/common/mapper.js";
|
|
4
|
+
import { t as a } from "./svgs-D5DhLHxC.js";
|
|
5
|
+
import { getI18nSeatReservation as o } from "./seat-reservation/common/translations/i18n.js";
|
|
6
|
+
import { t as s } from "./seat-reservation-area.component-COD6CXhP.js";
|
|
7
|
+
import { t as c } from "./seat-reservation-graphic.component-BNfU5tQM.js";
|
|
8
|
+
import { assetsTemplate as l, svgImageByOSDMCode as u } from "./seat-reservation/seat-reservation-graphic/seat-reservation-assets.js";
|
|
9
|
+
import { t as d } from "./seat-reservation-navigation-coach.component-Bh9ILq60.js";
|
|
10
|
+
import { t as f } from "./seat-reservation-navigation-services.component-QL0UnilZ.js";
|
|
11
|
+
import { t as p } from "./seat-reservation-place-control.component-BfnZUyHv.js";
|
|
12
|
+
import { t as m } from "./seat-reservation-scoped.component-CY04BT_4.js";
|
|
13
|
+
import { SeatReservationBaseElement as h } from "./seat-reservation/seat-reservation/seat-reservation-base-element.js";
|
|
14
|
+
import { t as g } from "./seat-reservation.component-zrQHTRl3.js";
|
|
15
|
+
export { s as SbbSeatReservationAreaElement, g as SbbSeatReservationElement, c as SbbSeatReservationGraphicElement, d as SbbSeatReservationNavigationCoachElement, f as SbbSeatReservationNavigationServicesElement, p as SbbSeatReservationPlaceControlElement, m as SbbSeatReservationScopedElement, h as SeatReservationBaseElement, l as assetsTemplate, o as getI18nSeatReservation, r as mapCoachInfosToCoachSelection, i as mapIconToSvg, t as mapPlaceAndCoachToSeatReservationPlaceSelection, n as mapPlaceInfosToPlaceSelection, e as mapRawDataToSeatReservation, u as svgImageByOSDMCode, a as svgs };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
:root {
|
|
2
|
+
--sbb-autocomplete-grid-row-color: var(--sbb-color-3);
|
|
3
|
+
--sbb-autocomplete-grid-row-background-color-hover: var(--sbb-background-color-3);
|
|
4
|
+
--sbb-autocomplete-grid-row-disabled-border-color: var(--sbb-color-graphite);
|
|
5
|
+
--sbb-autocomplete-grid-row-disabled-border-color: light-dark(
|
|
6
|
+
var(--sbb-color-graphite),
|
|
7
|
+
var(--sbb-color-smoke)
|
|
8
|
+
);
|
|
9
|
+
--sbb-autocomplete-grid-row-disabled-background-color: var(--sbb-background-color-3);
|
|
10
|
+
--sbb-autocomplete-grid-row-padding-inline-end: var(--sbb-spacing-responsive-xxxs);
|
|
11
|
+
--sbb-autocomplete-grid-row-justify-content: space-between;
|
|
12
|
+
--sbb-autocomplete-grid-row-cursor: var(--sbb-cursor-pointer);
|
|
13
|
+
}
|