@sbb-esta/lyne-elements-experimental 5.0.0-next.2 → 5.0.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/_index.scss +2 -0
- package/autocomplete-grid/_autocomplete-grid.global.scss +14 -0
- package/autocomplete-grid/autocomplete-grid/autocomplete-grid.component.js +4 -4
- package/autocomplete-grid/autocomplete-grid-button/autocomplete-grid-button.component.js +42 -66
- package/autocomplete-grid/autocomplete-grid-cell/autocomplete-grid-cell.component.js +1 -1
- package/autocomplete-grid/autocomplete-grid-option/autocomplete-grid-option.component.js +1 -1
- package/autocomplete-grid/autocomplete-grid-row/autocomplete-grid-row.component.js +1 -1
- package/autocomplete-grid-option.component-DUFBhQwI.js +35 -0
- package/autocomplete-grid.js +3 -3
- package/autocomplete-grid.pure.js +3 -3
- package/core/datetime/date-helper.js +1 -1
- package/core/styles/_theme.scss +19 -0
- package/core/styles/lean-off-brand-theme.scss +3 -0
- package/core/styles/lean-safety-theme.scss +3 -0
- package/core.js +1 -1
- package/custom-elements.json +5312 -5160
- package/{date-helper-CuMnZCsr.js → date-helper-DNzMLcyb.js} +3 -3
- package/development/autocomplete-grid/autocomplete-grid/autocomplete-grid.component.d.ts.map +1 -1
- package/development/autocomplete-grid/autocomplete-grid/autocomplete-grid.component.js +5 -5
- 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 +54 -83
- package/development/autocomplete-grid/autocomplete-grid-cell/autocomplete-grid-cell.component.js +1 -1
- package/development/autocomplete-grid/autocomplete-grid-optgroup/autocomplete-grid-optgroup.component.js +1 -1
- package/development/autocomplete-grid/autocomplete-grid-option/autocomplete-grid-option.component.d.ts +0 -1
- 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 +1 -1
- package/development/autocomplete-grid/autocomplete-grid-row/autocomplete-grid-row.component.js +1 -1
- package/development/{autocomplete-grid-cell.component-BF8i4388.js → autocomplete-grid-cell.component-BbdELDro.js} +1 -1
- package/development/autocomplete-grid-option.component-C7WuqRit.js +57 -0
- package/development/{autocomplete-grid-row.component-CBHh50jC.js → autocomplete-grid-row.component-DoXbOsQM.js} +1 -1
- package/development/autocomplete-grid.js +4 -4
- package/development/autocomplete-grid.pure.js +3 -3
- package/development/core/datetime/date-helper.js +1 -1
- package/development/core/timetable/access-leg-helper.js +1 -1
- package/development/core/timetable/timetable-helper.js +1 -1
- package/development/core.js +1 -1
- package/development/date-helper-BcTDWVeP.js +539 -0
- package/development/{differenceInMinutes-B7_GTDq7.js → differenceInMinutes-CxAbGYQ3.js} +2 -2
- package/development/{format-DFx4997p.js → format-Cx3zmmaF.js} +3 -3
- package/development/{isValid-JpZ7FphI.js → isValid-40Olgzo1.js} +2 -2
- package/development/journey-summary/journey-summary.component.d.ts +2 -3
- package/development/journey-summary/journey-summary.component.d.ts.map +1 -1
- package/development/journey-summary/journey-summary.component.js +1 -1
- package/development/journey-summary.component-BsC7wBIn.js +341 -0
- package/development/journey-summary.js +2 -2
- package/development/journey-summary.pure.js +1 -1
- package/development/{mapper-hWWm7Uke.js → mapper-BrZOqqfe.js} +1 -1
- package/development/pearl-chain/pearl-chain.component.js +1 -1
- package/development/pearl-chain-time/pearl-chain-time.component.js +1 -1
- package/development/{pearl-chain-time.component-BxVQ1z-Z.js → pearl-chain-time.component-C-CuC1ke.js} +3 -3
- package/development/pearl-chain-time.js +2 -2
- package/development/pearl-chain-time.pure.js +1 -1
- package/development/pearl-chain-vertical/pearl-chain-vertical.component.js +1 -1
- package/development/pearl-chain-vertical-item/pearl-chain-vertical-item.component.js +1 -1
- package/development/{pearl-chain-vertical-item.component-DJioJtxP.js → pearl-chain-vertical-item.component-CLu9QrqJ.js} +2 -2
- package/development/pearl-chain-vertical-item.js +2 -2
- package/development/pearl-chain-vertical-item.pure.js +1 -1
- package/development/{pearl-chain-vertical.component-zSOeIkhh.js → pearl-chain-vertical.component-DbPz5k_R.js} +1 -1
- package/development/pearl-chain-vertical.js +2 -2
- package/development/pearl-chain-vertical.pure.js +1 -1
- package/development/pearl-chain.component-10OsJZIX.js +318 -0
- package/development/pearl-chain.js +2 -2
- package/development/pearl-chain.pure.js +1 -1
- package/development/seat-reservation/common/mapper/icon-mapper.js +1 -1
- package/development/seat-reservation/common/mapper/mapper.js +1 -1
- package/development/seat-reservation/common/mapper.js +1 -1
- package/development/seat-reservation/common/svgs.js +1 -1
- package/development/seat-reservation/common/translations/i18n.js +1 -1
- package/development/seat-reservation/seat-reservation/seat-reservation-base-element.d.ts +11 -1
- 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 +46 -29
- package/development/seat-reservation/seat-reservation/seat-reservation.component.d.ts.map +1 -1
- package/development/seat-reservation/seat-reservation/seat-reservation.component.js +1 -1
- package/development/seat-reservation/seat-reservation-area/seat-reservation-area.component.js +1 -1
- package/development/seat-reservation/seat-reservation-graphic/seat-reservation-graphic.component.js +1 -1
- package/development/seat-reservation/seat-reservation-navigation-coach/seat-reservation-navigation-coach.component.d.ts +6 -2
- 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 -2
- package/development/seat-reservation/seat-reservation-navigation-services/seat-reservation-navigation-services.component.js +1 -1
- package/development/seat-reservation/seat-reservation-place-control/seat-reservation-place-control.component.d.ts +6 -2
- 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 -2
- package/development/seat-reservation/seat-reservation-scoped/seat-reservation-scoped.component.js +1 -1
- package/development/{seat-reservation-area.component-CMqjbUtV.js → seat-reservation-area.component-DPhQJFid.js} +2 -2
- package/development/{seat-reservation-graphic.component-C2r57590.js → seat-reservation-graphic.component-0LYsmerm.js} +2 -2
- package/development/seat-reservation-navigation-coach.component-B97jKD7Y.js +438 -0
- package/development/{seat-reservation-navigation-services.component-Do8JLJh3.js → seat-reservation-navigation-services.component-Cx0Is97w.js} +2 -2
- package/development/{seat-reservation-place-control.component-BfuOGZYq.js → seat-reservation-place-control.component-DaL1g8WH.js} +40 -37
- package/development/{seat-reservation-scoped.component-D-Mvw-Q3.js → seat-reservation-scoped.component-BHbORVsR.js} +1 -1
- package/development/seat-reservation.component-DI9pSlzt.js +473 -0
- package/development/seat-reservation.js +12 -12
- package/development/seat-reservation.pure.js +11 -11
- package/development/{svgs-kDpBCto5.js → svgs-Dj-RKmRs.js} +1 -1
- package/development/timetable-duration/timetable-duration.component.js +1 -1
- package/development/timetable-duration.component-Chk5D4Is.js +96 -0
- package/development/timetable-duration.js +2 -2
- package/development/timetable-duration.pure.js +1 -1
- package/development/timetable-row/timetable-row.component.d.ts.map +1 -1
- package/development/timetable-row/timetable-row.component.js +1 -1
- package/development/timetable-row.component-nzrQzxL6.js +736 -0
- package/development/timetable-row.js +2 -2
- package/development/timetable-row.pure.js +1 -1
- package/development/{toDate-DOFAOjP-.js → toDate-CDWut5fS.js} +1 -1
- package/{differenceInMinutes-Dr9gRqtu.js → differenceInMinutes-BAZ-Fham.js} +1 -1
- package/{format-DbUuNYFU.js → format-DjgG1QPc.js} +2 -2
- package/{isValid-B9oVW3lA.js → isValid-CXnsFZVu.js} +1 -1
- package/journey-summary/journey-summary.component.js +1 -1
- package/{journey-summary.component-CkDRawn9.js → journey-summary.component-DNoO3OCf.js} +41 -41
- package/journey-summary.js +1 -1
- package/journey-summary.pure.js +1 -1
- package/lean-safety-theme.css +13 -0
- package/lean-theme.css +13 -0
- package/package.json +18 -6
- package/pearl-chain/pearl-chain.component.js +1 -1
- package/pearl-chain-time/pearl-chain-time.component.js +1 -1
- package/{pearl-chain-time.component-D5OCEBJ_.js → pearl-chain-time.component-BuvA6IE1.js} +33 -33
- package/pearl-chain-time.js +1 -1
- package/pearl-chain-time.pure.js +1 -1
- package/pearl-chain-vertical/pearl-chain-vertical.component.js +1 -1
- package/pearl-chain-vertical-item/pearl-chain-vertical-item.component.js +1 -1
- package/{pearl-chain-vertical-item.component-IdquCJMy.js → pearl-chain-vertical-item.component-QZ4s8Jbv.js} +24 -24
- package/pearl-chain-vertical-item.js +1 -1
- package/pearl-chain-vertical-item.pure.js +1 -1
- package/pearl-chain-vertical.js +1 -1
- package/pearl-chain-vertical.pure.js +1 -1
- package/{pearl-chain.component-C6lcD7Xl.js → pearl-chain.component-DtGXXkY6.js} +26 -26
- package/pearl-chain.js +1 -1
- package/pearl-chain.pure.js +1 -1
- package/seat-reservation/common/mapper/mapper.js +1 -1
- package/seat-reservation/common/mapper.js +1 -1
- package/seat-reservation/common/svgs.js +1 -1
- package/seat-reservation/seat-reservation/seat-reservation-base-element.js +96 -82
- package/seat-reservation/seat-reservation/seat-reservation.component.js +1 -1
- package/seat-reservation/seat-reservation-area/seat-reservation-area.component.js +1 -1
- package/seat-reservation/seat-reservation-graphic/seat-reservation-graphic.component.js +1 -1
- package/seat-reservation/seat-reservation-navigation-coach/seat-reservation-navigation-coach.component.js +2 -2
- package/seat-reservation/seat-reservation-navigation-services/seat-reservation-navigation-services.component.js +1 -1
- package/seat-reservation/seat-reservation-place-control/seat-reservation-place-control.component.js +2 -2
- package/seat-reservation/seat-reservation-scoped/seat-reservation-scoped.component.js +1 -1
- package/{seat-reservation-area.component-BcmwKJSK.js → seat-reservation-area.component-G9lHb7S8.js} +16 -16
- package/{seat-reservation-graphic.component-C3wc4DKr.js → seat-reservation-graphic.component-BXFcQDxY.js} +20 -20
- package/seat-reservation-navigation-coach.component-BXy8EkJe.js +338 -0
- package/{seat-reservation-navigation-services.component-CfAQa7pa.js → seat-reservation-navigation-services.component-49XmV9rv.js} +21 -21
- package/{seat-reservation-place-control.component-DrzEDW8Z.js → seat-reservation-place-control.component-DToIW328.js} +70 -71
- package/{seat-reservation.component-CB2IWgM9.js → seat-reservation.component--0XnrCkk.js} +80 -79
- package/seat-reservation.js +12 -12
- package/seat-reservation.pure.js +11 -11
- package/timetable-duration/timetable-duration.component.js +1 -1
- package/timetable-duration.component-iMCvh1zr.js +61 -0
- package/timetable-duration.js +1 -1
- package/timetable-duration.pure.js +1 -1
- package/timetable-row/timetable-row.component.js +1 -1
- package/timetable-row.component-mNKmhRmP.js +566 -0
- package/timetable-row.js +1 -1
- package/timetable-row.pure.js +1 -1
- package/autocomplete-grid-option.component-iEj9qreq.js +0 -35
- package/core/styles/core.scss +0 -13
- package/core/styles/theme.scss +0 -5
- package/development/autocomplete-grid-option.component-BQwwanAf.js +0 -59
- package/development/date-helper-DGz-ztQM.js +0 -520
- package/development/journey-summary.component-De1ioDRq.js +0 -341
- package/development/pearl-chain.component-B83OsEx8.js +0 -312
- package/development/seat-reservation-navigation-coach.component-BwLbiHCG.js +0 -426
- package/development/seat-reservation.component-B2nJ13F1.js +0 -472
- package/development/timetable-duration.component-fBla8Kue.js +0 -96
- package/development/timetable-row.component-C9Y9Rev1.js +0 -732
- package/seat-reservation-navigation-coach.component-D1SgS8BU.js +0 -328
- package/timetable-duration.component-DPRcG1LP.js +0 -61
- package/timetable-row.component-BqIVlISS.js +0 -562
- /package/{autocomplete-grid-cell.component-DAsWZlTn.js → autocomplete-grid-cell.component-79IjA__I.js} +0 -0
- /package/{autocomplete-grid-row.component-VbyYP0U-.js → autocomplete-grid-row.component-B3U15Rwa.js} +0 -0
- /package/{core.css → lean-off-brand-theme.css} +0 -0
- /package/{mapper-Cqie5ivY.js → mapper-Dcou8VEf.js} +0 -0
- /package/{pearl-chain-vertical.component-CDOWaup3.js → pearl-chain-vertical.component-Dc3vaHsQ.js} +0 -0
- /package/{seat-reservation-scoped.component-BohQUGVW.js → seat-reservation-scoped.component-D8dAmrP7.js} +0 -0
- /package/{svgs-D5DhLHxC.js → svgs-D4fuYTHV.js} +0 -0
- /package/{toDate-p-Tpkb7t.js → toDate-BhNUyM4s.js} +0 -0
|
@@ -0,0 +1,566 @@
|
|
|
1
|
+
import { t as e } from "./format-DjgG1QPc.js";
|
|
2
|
+
import { SbbElement as t, SbbLanguageController as n, defaultDateAdapter as r, forceType as i, i18nArrival as a, i18nClass as o, i18nDeparture as s, i18nDirection as ee, i18nFromPlatform as c, i18nMeansOfTransport as l, i18nNew as u, i18nOccupancy as d, i18nRealTimeInfo as f, i18nSupersaver as p, i18nTransferProcedure as m, i18nTransferProcedures as h, i18nTravelhints as g, i18nTripDuration as _, i18nTripQuayChange as v, listResetStyles as y, screenReaderOnlyStyles as b } from "@sbb-esta/lyne-elements/core.js";
|
|
3
|
+
import { SbbIconElement as x } from "@sbb-esta/lyne-elements/icon.pure.js";
|
|
4
|
+
import { html as S, nothing as C, unsafeCSS as w } from "lit";
|
|
5
|
+
import { __esDecorate as T, __runInitializers as E } from "tslib";
|
|
6
|
+
import { property as D } from "lit/decorators.js";
|
|
7
|
+
import { durationToTime as O, getDepartureArrivalTimeAttribute as te, isRideLeg as k, removeTimezoneFromISOTimeString as ne } from "./core.js";
|
|
8
|
+
import { SbbPearlChainTimeElement as A } from "./pearl-chain-time.pure.js";
|
|
9
|
+
import { SbbCardBadgeElement as j, SbbCardButtonElement as M, SbbCardElement as N } from "@sbb-esta/lyne-elements/card.pure.js";
|
|
10
|
+
import { SbbTimetableOccupancyElement as P } from "@sbb-esta/lyne-elements/timetable-occupancy.pure.js";
|
|
11
|
+
//#region src/elements-experimental/timetable-row/timetable-row.scss?inline
|
|
12
|
+
var F = ":host{--sbb-timetable-row-gap: var(--sbb-spacing-fixed-2x);--sbb-timetable-row-height: 1.5625rem;--sbb-timetable-row-height-header: 1.25rem;--sbb-timetable-row-height-footer: 1rem;--sbb-timetable-row-skeleton-pulse-duration: 1.8s;display:block}:host([disable-animation]){--sbb-timetable-row-skeleton-pulse-duration: 0}.sbb-timetable__row-transport-icon{--sbb-icon-svg-width: 1.25rem;--sbb-icon-svg-height: 1.25rem}.sbb-travel-hints__item{--sbb-icon-svg-height: .875rem}.sbb-timetable__row--quay{margin-inline-end:var(--sbb-spacing-fixed-1x)}.sbb-timetable__row--quay-type{float:left}ul{display:inline-flex}li,.sbb-timetable__row-transport{display:inline-flex;align-self:center}.sbb-timetable__row-transportnumber,.sbb-timetable__row-time{--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);font-weight:700;line-height:unset;white-space:nowrap;align-self:center}.sbb-timetable__row{--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);display:flex;flex-direction:column;gap:var(--sbb-timetable-row-gap)}.sbb-timetable__row-header,.sbb-timetable__row-footer{animation:none}.sbb-timetable__row-header{display:flex;gap:var(--sbb-spacing-fixed-2x);align-items:center;line-height:var(--sbb-timetable-row-height-header)}.sbb-timetable__row-details,.sbb-timetable__row-hints{display:inline-flex;gap:var(--sbb-spacing-fixed-1x);align-items:center}.sbb-timetable__row-header p{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;margin:0;align-self:center}.sbb-timetable__row-footer{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:center;gap:var(--sbb-spacing-fixed-2x);line-height:var(--sbb-timetable-row-height-footer)}.sbb-timetable__row-footer>span{align-self:center}.sbb-timetable__row-footer :only-child{margin-inline-start:auto}.sbb-timetable__row-quay--changed{color:var(--sbb-color-primary)}.sbb-timetable__row-transport-wrapper,.sbb-timetable__row-warning{display:inline-flex}.sbb-loading{pointer-events:none}.sbb-loading__wrapper{display:flex;flex-direction:column;gap:var(--sbb-spacing-fixed-2x)}.sbb-loading__row{width:100%;border-radius:var(--sbb-border-radius-1x);height:var(--sbb-timetable-row-height)}@media(min-width:64rem){.sbb-loading__row{height:1.75rem}}@media(forced-colors:active){.sbb-loading__row{border:var(--sbb-border-width-1x) solid ButtonBorder!important}}.sbb-loading__row,.sbb-loading__badge{background:var(--sbb-background-color-4);animation:skeleton-pulse var(--sbb-timetable-row-skeleton-pulse-duration) ease-out infinite}.sbb-loading__row:first-of-type{height:var(--sbb-timetable-row-height-header);width:50%}.sbb-loading__row:last-of-type{height:var(--sbb-timetable-row-height-footer)}.sbb-loading__badge{margin-inline:auto calc(var(--sbb-spacing-fixed-3x) * -1);padding-inline-end:var(--sbb-spacing-fixed-6x);border-end-start-radius:var(--sbb-card-badge-border-radius);transform:var(--sbb-card-badge-skew);width:7.1875rem;height:1.25rem}@keyframes skeleton-pulse{0%{background:var(--sbb-background-color-4)}17%{background:var(--sbb-background-color-4)}50%{background:var(--sbb-background-color-3)}67%{background:var(--sbb-background-color-3)}to{background:var(--sbb-background-color-4)}}", I = (e, t) => S`<span class="sbb-timetable__row-transport">
|
|
13
|
+
<sbb-icon name=${e}></sbb-icon>
|
|
14
|
+
<span class="sbb-screen-reader-only">${t}</span>
|
|
15
|
+
</span>`, L = (e, t) => {
|
|
16
|
+
let n = [
|
|
17
|
+
"M",
|
|
18
|
+
"B",
|
|
19
|
+
"T"
|
|
20
|
+
].includes(e) ? " " : "";
|
|
21
|
+
return S`<span class="sbb-timetable__row-transportnumber">
|
|
22
|
+
${t === null ? e : e + n + t}
|
|
23
|
+
</span>`;
|
|
24
|
+
}, R = (e) => e?.find((e) => e.serviceJourney?.serviceAlteration?.reachableText)?.serviceJourney?.serviceAlteration?.reachableText, z = (e) => e?.find((e) => e.serviceJourney?.serviceAlteration?.delayText)?.serviceJourney?.serviceAlteration?.delayText, B = (e) => e?.find((e) => !!e.serviceJourney?.serviceAlteration?.redirectedText)?.serviceJourney?.serviceAlteration?.redirectedText, V = (e) => e?.find((e) => !!e.serviceJourney?.serviceAlteration?.unplannedStopPointsText)?.serviceJourney?.serviceAlteration?.unplannedStopPointsText, H = (e) => {
|
|
25
|
+
let t = {
|
|
26
|
+
DISTURBANCE: 0,
|
|
27
|
+
INFORMATION: 1,
|
|
28
|
+
DELAY: 2,
|
|
29
|
+
TRAIN_REPLACEMENT_BY_BUS: 3,
|
|
30
|
+
CONSTRUCTION_SITE: 4,
|
|
31
|
+
END_MESSAGE: 5
|
|
32
|
+
};
|
|
33
|
+
return [...e].sort((e, n) => t[e.cause] - t[n.cause]);
|
|
34
|
+
}, U = (e) => {
|
|
35
|
+
switch (e?.cause) {
|
|
36
|
+
case "DISTURBANCE": return {
|
|
37
|
+
name: "disruption",
|
|
38
|
+
text: e?.broadcastMessages?.length ? e?.broadcastMessages[0].title : ""
|
|
39
|
+
};
|
|
40
|
+
case "INFORMATION": return {
|
|
41
|
+
name: "info",
|
|
42
|
+
text: e?.broadcastMessages.length ? e?.broadcastMessages[0].title : ""
|
|
43
|
+
};
|
|
44
|
+
case "DELAY": return {
|
|
45
|
+
name: "delay",
|
|
46
|
+
text: e?.broadcastMessages.length ? e?.broadcastMessages[0].title : ""
|
|
47
|
+
};
|
|
48
|
+
case "TRAIN_REPLACEMENT_BY_BUS": return {
|
|
49
|
+
name: "replacementbus",
|
|
50
|
+
text: e?.broadcastMessages.length ? e?.broadcastMessages[0].title : ""
|
|
51
|
+
};
|
|
52
|
+
case "CONSTRUCTION_SITE": return {
|
|
53
|
+
name: "construction",
|
|
54
|
+
text: e?.broadcastMessages.length ? e?.broadcastMessages[0].title : ""
|
|
55
|
+
};
|
|
56
|
+
default: return {
|
|
57
|
+
name: "info",
|
|
58
|
+
text: e?.broadcastMessages.length ? e?.broadcastMessages[0].title : ""
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
}, W = (e, t) => {
|
|
62
|
+
let { summary: n, legs: r } = e || {}, i = r?.filter((e) => k(e)), { tripStatus: a } = n || {};
|
|
63
|
+
if (a?.cancelled || a?.partiallyCancelled) return {
|
|
64
|
+
name: "cancellation",
|
|
65
|
+
text: a?.cancelledText
|
|
66
|
+
};
|
|
67
|
+
if (R(i)) return {
|
|
68
|
+
name: "missed-connection",
|
|
69
|
+
text: R(i)
|
|
70
|
+
};
|
|
71
|
+
if (a?.alternative) return {
|
|
72
|
+
name: "alternative",
|
|
73
|
+
text: a.alternativeText
|
|
74
|
+
};
|
|
75
|
+
if (B(i)) return {
|
|
76
|
+
name: "reroute",
|
|
77
|
+
text: B(i)
|
|
78
|
+
};
|
|
79
|
+
if (V(i)) return {
|
|
80
|
+
name: "add-stop",
|
|
81
|
+
text: V(i)
|
|
82
|
+
};
|
|
83
|
+
if (a?.delayed || a?.delayedUnknown) return {
|
|
84
|
+
name: "delay",
|
|
85
|
+
text: z(i)
|
|
86
|
+
};
|
|
87
|
+
if (a?.quayChanged) {
|
|
88
|
+
let e = i[0].departure;
|
|
89
|
+
return {
|
|
90
|
+
name: "platform-change",
|
|
91
|
+
text: e.quayChanged ? e.quayChangedText : v[t]
|
|
92
|
+
};
|
|
93
|
+
}
|
|
94
|
+
return {};
|
|
95
|
+
}, G = (e) => {
|
|
96
|
+
let t = [
|
|
97
|
+
"RR",
|
|
98
|
+
"RK",
|
|
99
|
+
"RC",
|
|
100
|
+
"RL",
|
|
101
|
+
"RM",
|
|
102
|
+
"RS",
|
|
103
|
+
"RU",
|
|
104
|
+
"XP",
|
|
105
|
+
"XR",
|
|
106
|
+
"XT"
|
|
107
|
+
];
|
|
108
|
+
return e.reduce((e, n) => {
|
|
109
|
+
if (e) return e;
|
|
110
|
+
if (t.includes(n.name)) return {
|
|
111
|
+
...n,
|
|
112
|
+
name: "RR"
|
|
113
|
+
};
|
|
114
|
+
}, void 0);
|
|
115
|
+
}, K = (e) => {
|
|
116
|
+
let t = [
|
|
117
|
+
"Z",
|
|
118
|
+
"SB",
|
|
119
|
+
"SZ",
|
|
120
|
+
"VR",
|
|
121
|
+
"TG"
|
|
122
|
+
];
|
|
123
|
+
return e.filter((t, n) => e.findIndex((e) => e.name === t.name) === n).filter((e) => t.includes(e.name)).sort((e, n) => t.indexOf(e.name) - t.indexOf(n.name));
|
|
124
|
+
}, q = (e) => {
|
|
125
|
+
let t = G(e), n = K(e);
|
|
126
|
+
return t === void 0 ? n : n.length ? n[0].name === "Z" && n[1] ? [
|
|
127
|
+
n[0],
|
|
128
|
+
t,
|
|
129
|
+
n[1]
|
|
130
|
+
].concat(n.slice(2)) : [t, ...n] : [t];
|
|
131
|
+
}, J = (() => {
|
|
132
|
+
let v = t, R = [], z, B = [], V = [], G, K = [], J = [], Y, X = [], Z = [], Q, re = [], ie = [], ae, oe = [], se = [], ce, le = [], ue = [], de, fe = [], $ = [], pe, me = [], he = [], ge, _e = [], ve = [], ye, be = [], xe = [], Se;
|
|
133
|
+
return class extends v {
|
|
134
|
+
constructor() {
|
|
135
|
+
super(...arguments), this.#e = (E(this, R), E(this, B, null)), this.#t = (E(this, V), E(this, K, null)), this.#n = (E(this, J), E(this, X, !1)), this.#r = (E(this, Z), E(this, re, null)), this.#i = (E(this, ie), E(this, oe, !1)), this.#a = (E(this, se), E(this, le, !1)), this.#o = (E(this, ue), E(this, fe, !1)), this.#s = (E(this, $), E(this, me, "")), this.#c = (E(this, he), E(this, _e, !1)), this.#l = (E(this, ve), E(this, be, !1)), this._now = (E(this, xe), null), this._language = new n(this);
|
|
136
|
+
}
|
|
137
|
+
static {
|
|
138
|
+
let e = typeof Symbol == "function" && Symbol.metadata ? Object.create(v[Symbol.metadata] ?? null) : void 0;
|
|
139
|
+
z = [D({ type: Object })], G = [D({ type: Object })], Y = [i(), D({
|
|
140
|
+
attribute: "disable-animation",
|
|
141
|
+
reflect: !0,
|
|
142
|
+
type: Boolean
|
|
143
|
+
})], Q = [D({ type: Object })], ae = [i(), D({
|
|
144
|
+
attribute: "loading-trip",
|
|
145
|
+
type: Boolean
|
|
146
|
+
})], ce = [i(), D({
|
|
147
|
+
attribute: "a11y-footpath",
|
|
148
|
+
type: Boolean
|
|
149
|
+
})], de = [i(), D({
|
|
150
|
+
attribute: "loading-price",
|
|
151
|
+
type: Boolean
|
|
152
|
+
})], pe = [i(), D({ attribute: "card-action-label" })], ge = [i(), D({
|
|
153
|
+
attribute: "accessibility-expanded",
|
|
154
|
+
type: Boolean
|
|
155
|
+
})], ye = [i(), D({ type: Boolean })], Se = [D()], T(this, null, z, {
|
|
156
|
+
kind: "accessor",
|
|
157
|
+
name: "trip",
|
|
158
|
+
static: !1,
|
|
159
|
+
private: !1,
|
|
160
|
+
access: {
|
|
161
|
+
has: (e) => "trip" in e,
|
|
162
|
+
get: (e) => e.trip,
|
|
163
|
+
set: (e, t) => {
|
|
164
|
+
e.trip = t;
|
|
165
|
+
}
|
|
166
|
+
},
|
|
167
|
+
metadata: e
|
|
168
|
+
}, B, V), T(this, null, G, {
|
|
169
|
+
kind: "accessor",
|
|
170
|
+
name: "price",
|
|
171
|
+
static: !1,
|
|
172
|
+
private: !1,
|
|
173
|
+
access: {
|
|
174
|
+
has: (e) => "price" in e,
|
|
175
|
+
get: (e) => e.price,
|
|
176
|
+
set: (e, t) => {
|
|
177
|
+
e.price = t;
|
|
178
|
+
}
|
|
179
|
+
},
|
|
180
|
+
metadata: e
|
|
181
|
+
}, K, J), T(this, null, Y, {
|
|
182
|
+
kind: "accessor",
|
|
183
|
+
name: "disableAnimation",
|
|
184
|
+
static: !1,
|
|
185
|
+
private: !1,
|
|
186
|
+
access: {
|
|
187
|
+
has: (e) => "disableAnimation" in e,
|
|
188
|
+
get: (e) => e.disableAnimation,
|
|
189
|
+
set: (e, t) => {
|
|
190
|
+
e.disableAnimation = t;
|
|
191
|
+
}
|
|
192
|
+
},
|
|
193
|
+
metadata: e
|
|
194
|
+
}, X, Z), T(this, null, Q, {
|
|
195
|
+
kind: "accessor",
|
|
196
|
+
name: "boarding",
|
|
197
|
+
static: !1,
|
|
198
|
+
private: !1,
|
|
199
|
+
access: {
|
|
200
|
+
has: (e) => "boarding" in e,
|
|
201
|
+
get: (e) => e.boarding,
|
|
202
|
+
set: (e, t) => {
|
|
203
|
+
e.boarding = t;
|
|
204
|
+
}
|
|
205
|
+
},
|
|
206
|
+
metadata: e
|
|
207
|
+
}, re, ie), T(this, null, ae, {
|
|
208
|
+
kind: "accessor",
|
|
209
|
+
name: "loadingTrip",
|
|
210
|
+
static: !1,
|
|
211
|
+
private: !1,
|
|
212
|
+
access: {
|
|
213
|
+
has: (e) => "loadingTrip" in e,
|
|
214
|
+
get: (e) => e.loadingTrip,
|
|
215
|
+
set: (e, t) => {
|
|
216
|
+
e.loadingTrip = t;
|
|
217
|
+
}
|
|
218
|
+
},
|
|
219
|
+
metadata: e
|
|
220
|
+
}, oe, se), T(this, null, ce, {
|
|
221
|
+
kind: "accessor",
|
|
222
|
+
name: "a11yFootpath",
|
|
223
|
+
static: !1,
|
|
224
|
+
private: !1,
|
|
225
|
+
access: {
|
|
226
|
+
has: (e) => "a11yFootpath" in e,
|
|
227
|
+
get: (e) => e.a11yFootpath,
|
|
228
|
+
set: (e, t) => {
|
|
229
|
+
e.a11yFootpath = t;
|
|
230
|
+
}
|
|
231
|
+
},
|
|
232
|
+
metadata: e
|
|
233
|
+
}, le, ue), T(this, null, de, {
|
|
234
|
+
kind: "accessor",
|
|
235
|
+
name: "loadingPrice",
|
|
236
|
+
static: !1,
|
|
237
|
+
private: !1,
|
|
238
|
+
access: {
|
|
239
|
+
has: (e) => "loadingPrice" in e,
|
|
240
|
+
get: (e) => e.loadingPrice,
|
|
241
|
+
set: (e, t) => {
|
|
242
|
+
e.loadingPrice = t;
|
|
243
|
+
}
|
|
244
|
+
},
|
|
245
|
+
metadata: e
|
|
246
|
+
}, fe, $), T(this, null, pe, {
|
|
247
|
+
kind: "accessor",
|
|
248
|
+
name: "cardActionLabel",
|
|
249
|
+
static: !1,
|
|
250
|
+
private: !1,
|
|
251
|
+
access: {
|
|
252
|
+
has: (e) => "cardActionLabel" in e,
|
|
253
|
+
get: (e) => e.cardActionLabel,
|
|
254
|
+
set: (e, t) => {
|
|
255
|
+
e.cardActionLabel = t;
|
|
256
|
+
}
|
|
257
|
+
},
|
|
258
|
+
metadata: e
|
|
259
|
+
}, me, he), T(this, null, ge, {
|
|
260
|
+
kind: "accessor",
|
|
261
|
+
name: "accessibilityExpanded",
|
|
262
|
+
static: !1,
|
|
263
|
+
private: !1,
|
|
264
|
+
access: {
|
|
265
|
+
has: (e) => "accessibilityExpanded" in e,
|
|
266
|
+
get: (e) => e.accessibilityExpanded,
|
|
267
|
+
set: (e, t) => {
|
|
268
|
+
e.accessibilityExpanded = t;
|
|
269
|
+
}
|
|
270
|
+
},
|
|
271
|
+
metadata: e
|
|
272
|
+
}, _e, ve), T(this, null, ye, {
|
|
273
|
+
kind: "accessor",
|
|
274
|
+
name: "active",
|
|
275
|
+
static: !1,
|
|
276
|
+
private: !1,
|
|
277
|
+
access: {
|
|
278
|
+
has: (e) => "active" in e,
|
|
279
|
+
get: (e) => e.active,
|
|
280
|
+
set: (e, t) => {
|
|
281
|
+
e.active = t;
|
|
282
|
+
}
|
|
283
|
+
},
|
|
284
|
+
metadata: e
|
|
285
|
+
}, be, xe), T(this, null, Se, {
|
|
286
|
+
kind: "setter",
|
|
287
|
+
name: "now",
|
|
288
|
+
static: !1,
|
|
289
|
+
private: !1,
|
|
290
|
+
access: {
|
|
291
|
+
has: (e) => "now" in e,
|
|
292
|
+
set: (e, t) => {
|
|
293
|
+
e.now = t;
|
|
294
|
+
}
|
|
295
|
+
},
|
|
296
|
+
metadata: e
|
|
297
|
+
}, null, R), e && Object.defineProperty(this, Symbol.metadata, {
|
|
298
|
+
enumerable: !0,
|
|
299
|
+
configurable: !0,
|
|
300
|
+
writable: !0,
|
|
301
|
+
value: e
|
|
302
|
+
});
|
|
303
|
+
}
|
|
304
|
+
static {
|
|
305
|
+
this.elementName = "sbb-timetable-row";
|
|
306
|
+
}
|
|
307
|
+
static {
|
|
308
|
+
this.elementDependencies = [
|
|
309
|
+
N,
|
|
310
|
+
j,
|
|
311
|
+
M,
|
|
312
|
+
x,
|
|
313
|
+
P,
|
|
314
|
+
A
|
|
315
|
+
];
|
|
316
|
+
}
|
|
317
|
+
static {
|
|
318
|
+
this.styles = [
|
|
319
|
+
y,
|
|
320
|
+
b,
|
|
321
|
+
w(F)
|
|
322
|
+
];
|
|
323
|
+
}
|
|
324
|
+
#e;
|
|
325
|
+
get trip() {
|
|
326
|
+
return this.#e;
|
|
327
|
+
}
|
|
328
|
+
set trip(e) {
|
|
329
|
+
this.#e = e;
|
|
330
|
+
}
|
|
331
|
+
#t;
|
|
332
|
+
get price() {
|
|
333
|
+
return this.#t;
|
|
334
|
+
}
|
|
335
|
+
set price(e) {
|
|
336
|
+
this.#t = e;
|
|
337
|
+
}
|
|
338
|
+
#n;
|
|
339
|
+
get disableAnimation() {
|
|
340
|
+
return this.#n;
|
|
341
|
+
}
|
|
342
|
+
set disableAnimation(e) {
|
|
343
|
+
this.#n = e;
|
|
344
|
+
}
|
|
345
|
+
#r;
|
|
346
|
+
get boarding() {
|
|
347
|
+
return this.#r;
|
|
348
|
+
}
|
|
349
|
+
set boarding(e) {
|
|
350
|
+
this.#r = e;
|
|
351
|
+
}
|
|
352
|
+
#i;
|
|
353
|
+
get loadingTrip() {
|
|
354
|
+
return this.#i;
|
|
355
|
+
}
|
|
356
|
+
set loadingTrip(e) {
|
|
357
|
+
this.#i = e;
|
|
358
|
+
}
|
|
359
|
+
#a;
|
|
360
|
+
get a11yFootpath() {
|
|
361
|
+
return this.#a;
|
|
362
|
+
}
|
|
363
|
+
set a11yFootpath(e) {
|
|
364
|
+
this.#a = e;
|
|
365
|
+
}
|
|
366
|
+
#o;
|
|
367
|
+
get loadingPrice() {
|
|
368
|
+
return this.#o;
|
|
369
|
+
}
|
|
370
|
+
set loadingPrice(e) {
|
|
371
|
+
this.#o = e;
|
|
372
|
+
}
|
|
373
|
+
#s;
|
|
374
|
+
get cardActionLabel() {
|
|
375
|
+
return this.#s;
|
|
376
|
+
}
|
|
377
|
+
set cardActionLabel(e) {
|
|
378
|
+
this.#s = e;
|
|
379
|
+
}
|
|
380
|
+
#c;
|
|
381
|
+
get accessibilityExpanded() {
|
|
382
|
+
return this.#c;
|
|
383
|
+
}
|
|
384
|
+
set accessibilityExpanded(e) {
|
|
385
|
+
this.#c = e;
|
|
386
|
+
}
|
|
387
|
+
#l;
|
|
388
|
+
get active() {
|
|
389
|
+
return this.#l;
|
|
390
|
+
}
|
|
391
|
+
set active(e) {
|
|
392
|
+
this.#l = e;
|
|
393
|
+
}
|
|
394
|
+
set now(e) {
|
|
395
|
+
this._now = r.getValidDateOrNull(r.deserialize(e));
|
|
396
|
+
}
|
|
397
|
+
get now() {
|
|
398
|
+
return this._now ?? /* @__PURE__ */ new Date();
|
|
399
|
+
}
|
|
400
|
+
willUpdate(e) {
|
|
401
|
+
super.willUpdate(e), e.has("loadingTrip") && (this.internals.role = this.loadingTrip ? null : "rowgroup");
|
|
402
|
+
}
|
|
403
|
+
_renderSkeleton() {
|
|
404
|
+
return S`
|
|
405
|
+
<sbb-card class="sbb-loading sbb-card-spacing-4x-xxs">
|
|
406
|
+
${this.loadingPrice ? S`<div class="sbb-loading__badge" slot="badge"></div>` : C}
|
|
407
|
+
<div class="sbb-loading__wrapper">
|
|
408
|
+
<div class="sbb-loading__row"></div>
|
|
409
|
+
<div class="sbb-loading__row"></div>
|
|
410
|
+
<div class="sbb-loading__row"></div>
|
|
411
|
+
</div>
|
|
412
|
+
</sbb-card>
|
|
413
|
+
`;
|
|
414
|
+
}
|
|
415
|
+
_getRideLegs() {
|
|
416
|
+
return this.trip?.legs?.filter((e) => k(e)) ?? [];
|
|
417
|
+
}
|
|
418
|
+
_getQuayTypeStrings() {
|
|
419
|
+
if (!this.trip.summary?.product) return null;
|
|
420
|
+
let e = this._getRideLegs(), t = this.trip.summary.product?.vehicleMode === "TRAIN" ? e[0].serviceJourney.quayTypeShortName || "" : e[0].serviceJourney.quayTypeName || "";
|
|
421
|
+
return {
|
|
422
|
+
long: c[this._language.current] + " " + t,
|
|
423
|
+
short: t
|
|
424
|
+
};
|
|
425
|
+
}
|
|
426
|
+
_renderQuayType() {
|
|
427
|
+
if (!this.trip.summary?.product) return;
|
|
428
|
+
let e = this._getQuayTypeStrings();
|
|
429
|
+
return S`
|
|
430
|
+
<span class="sbb-timetable__row--quay">
|
|
431
|
+
<span class="sbb-screen-reader-only">${e?.long} </span>
|
|
432
|
+
<span class="sbb-timetable__row--quay-type" aria-hidden="true"
|
|
433
|
+
>${e?.short}</span
|
|
434
|
+
>
|
|
435
|
+
</span>
|
|
436
|
+
`;
|
|
437
|
+
}
|
|
438
|
+
_handleHimCus(e) {
|
|
439
|
+
let { situations: t } = e || {}, n = t && H(t), r = W(e, this._language.current);
|
|
440
|
+
return {
|
|
441
|
+
cus: Object.keys(r)?.length ? r : null,
|
|
442
|
+
him: t?.length ? U(n[0]) : null
|
|
443
|
+
};
|
|
444
|
+
}
|
|
445
|
+
_getAccessibilityText(t) {
|
|
446
|
+
let { summary: n, legs: r, notices: i } = t || {}, { departureWalk: c, arrivalWalk: v, departure: y, arrival: b, product: x, direction: S, occupancy: C, duration: w } = n || {}, { departureTimeAttribute: T, arrivalTimeAttribute: E } = te(r, c || 0, v || 0, this._language.current, this.a11yFootpath), D = this._getRideLegs(), k = y?.time ? ne(y.time) : void 0, A = b?.time ? ne(b.time) : void 0, j = T ? `${T.text} ${T.duration}, ` : "", M = E ? `${E.text} ${E.duration}, ` : "", N = k ? `${s[this._language.current]}: ${e(k, "HH:mm")}, ` : "", P = () => y?.quayFormatted ? `${y?.quayChanged ? `${u[this._language.current]} ` : ""}${this._getQuayTypeStrings()?.long} ${y?.quayFormatted}, ` : "", F = x && x.vehicleMode ? l[x.vehicleMode.toLowerCase()] && `${l[x.vehicleMode.toLowerCase()][this._language.current]}, ` : "", I = x?.vehicleSubModeShortName ? `${x.vehicleSubModeShortName} ${x.line || ""}, ` : "", L = `${ee[this._language.current]} ${S}, `, R = this._handleHimCus(t), z = R?.cus?.text ? `${f[this._language.current]}: ${R?.cus?.text}, ` : "", B = R?.him?.text ? `${f[this._language.current]}: ${R?.him?.text}, ` : "", V = this.boarding ? `${this.boarding.text}, ` : "", H = `${this.price?.isDiscount ? p[this._language.current] : ""} ${this.price?.text && this.price?.price ? (this.price?.text || "") + " " + (this.price?.price || "") + ", " : ""}`, U = D.length > 2 ? `${D.length - 1} ${h[this._language.current]}, ` : D.length > 1 ? `${D.length - 1} ${m[this._language.current]}, ` : "", W = A ? `${a[this._language.current]}: ${e(A, "HH:mm")}, ` : "", G = "";
|
|
447
|
+
C && (C.firstClass && C.firstClass !== "UNKNOWN" && (G += `${o.first[this._language.current]} ${d[C.firstClass.toLowerCase()]?.[this._language.current]}.`), C.secondClass && C.secondClass !== "UNKNOWN" && (G += ` ${o.second[this._language.current]} ${d[C.secondClass.toLowerCase()]?.[this._language.current]}.`));
|
|
448
|
+
let K = i && q(i).length && q(i)?.map((e, t) => t < 4 && e.text?.template).join(", ") + ", ", J = K ? `${g[this._language.current]}: ${K}` : "", Y = w && w > 0 ? `${_[this._language.current]} ${O(w, this._language.current).long}, ` : "";
|
|
449
|
+
return [
|
|
450
|
+
j,
|
|
451
|
+
N,
|
|
452
|
+
P(),
|
|
453
|
+
F,
|
|
454
|
+
I,
|
|
455
|
+
L,
|
|
456
|
+
z,
|
|
457
|
+
V,
|
|
458
|
+
H,
|
|
459
|
+
z ? "" : B,
|
|
460
|
+
W,
|
|
461
|
+
M,
|
|
462
|
+
Y,
|
|
463
|
+
U,
|
|
464
|
+
G,
|
|
465
|
+
J
|
|
466
|
+
].map((e) => e?.trim()).filter((e) => e && e.length > 0).join(" ");
|
|
467
|
+
}
|
|
468
|
+
render() {
|
|
469
|
+
if (this.loadingTrip) return this._renderSkeleton();
|
|
470
|
+
let { legs: e, id: t, notices: n, summary: r } = this.trip || {}, { product: i, direction: a, departureWalk: o, departure: c, arrival: d, arrivalWalk: f, occupancy: m, duration: h } = r || {}, g = this._handleHimCus(this.trip), v = !!g.cus || !!g.him, y = n && q(n), b = h ? O(h, this._language.current) : null;
|
|
471
|
+
return S`
|
|
472
|
+
<sbb-card class="sbb-card-spacing-4x-xxs" id=${t}>
|
|
473
|
+
<sbb-card-button
|
|
474
|
+
?active=${this.active}
|
|
475
|
+
aria-expanded=${this.accessibilityExpanded ? "true" : C}
|
|
476
|
+
>
|
|
477
|
+
${this.cardActionLabel ? this.cardActionLabel : this._getAccessibilityText(this.trip)}
|
|
478
|
+
</sbb-card-button>
|
|
479
|
+
${this.loadingPrice ? S`<div class="sbb-loading__badge" slot="badge"></div>` : C}
|
|
480
|
+
${this.price && !this.loadingPrice ? S`<sbb-card-badge color=${this.price.isDiscount ? "charcoal" : "white"}>
|
|
481
|
+
${this.price.isDiscount ? S`<span aria-hidden="true">
|
|
482
|
+
%<span class="sbb-screen-reader-only"
|
|
483
|
+
>${p[this._language.current]}</span
|
|
484
|
+
>
|
|
485
|
+
</span>` : C}
|
|
486
|
+
${this.price.text ? S`<span>${this.price.text}</span>` : C}
|
|
487
|
+
${this.price.price ? S`<span>${this.price.price}</span>` : C}
|
|
488
|
+
</sbb-card-badge>` : C}
|
|
489
|
+
<div class="sbb-timetable__row" role="row">
|
|
490
|
+
<div class="sbb-timetable__row-header" role="gridcell">
|
|
491
|
+
<div class="sbb-timetable__row-details">
|
|
492
|
+
${i?.corporateIdentityPictogram && S`<span class="sbb-timetable__row-transport-wrapper">
|
|
493
|
+
<sbb-icon
|
|
494
|
+
class="sbb-timetable__row-transport-icon"
|
|
495
|
+
name="picto:${i.corporateIdentityPictogram}"
|
|
496
|
+
></sbb-icon>
|
|
497
|
+
<span class="sbb-screen-reader-only">
|
|
498
|
+
${i && i.vehicleMode && l[i.vehicleMode.toLowerCase()] && l[i.vehicleMode.toLowerCase()][this._language.current]}
|
|
499
|
+
|
|
500
|
+
</span>
|
|
501
|
+
</span>`}
|
|
502
|
+
${i && (i.corporateIdentityIcon ? I(i.corporateIdentityIcon, i.name) : i.vehicleSubModeShortName && L(i.vehicleSubModeShortName, i?.line))}
|
|
503
|
+
</div>
|
|
504
|
+
${a ? S`<p>${`${ee[this._language.current]} ${a}`}</p>` : C}
|
|
505
|
+
</div>
|
|
506
|
+
<sbb-pearl-chain-time
|
|
507
|
+
role="gridcell"
|
|
508
|
+
.legs=${e}
|
|
509
|
+
.departureTime=${c?.time}
|
|
510
|
+
.arrivalTime=${d?.time}
|
|
511
|
+
.departureWalk=${o}
|
|
512
|
+
.arrivalWalk=${f}
|
|
513
|
+
?disable-animation=${this.disableAnimation}
|
|
514
|
+
?a11y-footpath=${this.a11yFootpath}
|
|
515
|
+
.now=${this.now}
|
|
516
|
+
></sbb-pearl-chain-time>
|
|
517
|
+
<div class="sbb-timetable__row-footer" role="gridcell">
|
|
518
|
+
${i && c?.quayFormatted ? S`<span
|
|
519
|
+
class=${c?.quayChanged ? "sbb-timetable__row-quay--changed" : C}
|
|
520
|
+
>
|
|
521
|
+
<span class="sbb-screen-reader-only">
|
|
522
|
+
${`${s[this._language.current]} ${c?.quayChanged ? u[this._language.current] : ""}`}
|
|
523
|
+
|
|
524
|
+
</span>
|
|
525
|
+
${this._renderQuayType()} ${c?.quayFormatted}
|
|
526
|
+
</span>` : C}
|
|
527
|
+
${m?.firstClass && m?.firstClass !== "UNKNOWN" || m?.secondClass && m.secondClass !== "UNKNOWN" ? S`<sbb-timetable-occupancy
|
|
528
|
+
.firstClassOccupancy=${m?.firstClass?.toLowerCase()}
|
|
529
|
+
.secondClassOccupancy=${m?.secondClass?.toLowerCase()}
|
|
530
|
+
></sbb-timetable-occupancy>` : C}
|
|
531
|
+
${y && y.length || this.boarding ? S`<ul class="sbb-timetable__row-hints" role="list">
|
|
532
|
+
${y?.map((e, t) => t < 4 ? S`<li>
|
|
533
|
+
<sbb-icon
|
|
534
|
+
class="sbb-travel-hints__item"
|
|
535
|
+
name=${"sa-" + e.name?.toLowerCase()}
|
|
536
|
+
></sbb-icon>
|
|
537
|
+
<span class="sbb-screen-reader-only">${e.text?.template}</span>
|
|
538
|
+
</li>` : C)}
|
|
539
|
+
${this.boarding ? S`<li>
|
|
540
|
+
<sbb-icon
|
|
541
|
+
class="sbb-travel-hints__item"
|
|
542
|
+
name=${this.boarding?.name}
|
|
543
|
+
aria-label=${this.boarding?.text}
|
|
544
|
+
aria-hidden="false"
|
|
545
|
+
></sbb-icon>
|
|
546
|
+
</li>` : C}
|
|
547
|
+
</ul>` : C}
|
|
548
|
+
${h && h > 0 ? S`<time>
|
|
549
|
+
<span class="sbb-screen-reader-only">
|
|
550
|
+
${`${_[this._language.current]} ${b.long}`}
|
|
551
|
+
</span>
|
|
552
|
+
<span aria-hidden="true">${b.short}</span>
|
|
553
|
+
</time>` : C}
|
|
554
|
+
${v && (g.cus || g.him) ? S`<span class="sbb-timetable__row-warning">
|
|
555
|
+
<sbb-icon name=${(g.cus || g.him).name}></sbb-icon>
|
|
556
|
+
<span class="sbb-screen-reader-only">${(g.cus || g.him).text}</span>
|
|
557
|
+
</span>` : C}
|
|
558
|
+
</div>
|
|
559
|
+
</div>
|
|
560
|
+
</sbb-card>
|
|
561
|
+
`;
|
|
562
|
+
}
|
|
563
|
+
};
|
|
564
|
+
})();
|
|
565
|
+
//#endregion
|
|
566
|
+
export { q as a, H as c, U as i, K as n, I as o, W as r, L as s, J as t };
|
package/timetable-row.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as e, c as t, i as n, n as r, o as i, r as a, s as o, t as s } from "./timetable-row.component-
|
|
1
|
+
import { a as e, c as t, i as n, n as r, o as i, r as a, s as o, t as s } from "./timetable-row.component-mNKmhRmP.js";
|
|
2
2
|
import "./timetable-row.pure.js";
|
|
3
3
|
//#region src/elements-experimental/timetable-row.ts
|
|
4
4
|
s.define();
|
package/timetable-row.pure.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as e, c as t, i as n, n as r, o as i, r as a, s as o, t as s } from "./timetable-row.component-
|
|
1
|
+
import { a as e, c as t, i as n, n as r, o as i, r as a, s as o, t as s } from "./timetable-row.component-mNKmhRmP.js";
|
|
2
2
|
export { s as SbbTimetableRowElement, r as filterNotices, a as getCus, n as getHimIcon, e as handleNotices, i as renderIconProduct, o as renderStringProduct, t as sortSituation };
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import { SbbPropertyWatcherController as e, ɵstateController as t } from "@sbb-esta/lyne-elements/core.js";
|
|
2
|
-
import { unsafeCSS as n } from "lit";
|
|
3
|
-
import { SbbOptionBaseElement as r } from "@sbb-esta/lyne-elements/option.pure.js";
|
|
4
|
-
//#region src/elements-experimental/autocomplete-grid/autocomplete-grid-option/autocomplete-grid-option.scss?inline
|
|
5
|
-
var i = ":host{display:block}:host(:is(:state(negative),[state--negative])){--sbb-option-color: var(--sbb-color-3-negative);--sbb-option-icon-color: var(--sbb-color-5)}:host(:not(:is(:state(disable-highlight),[state--disable-highlight]))) .sbb-option__label slot{display:none}:host(:is(:state(active),[state--active])){--sbb-option-focus-outline-color: var(--sbb-focus-outline-color)}.sbb-option{font-size:var(--sbb-option-font-size);letter-spacing:var(--sbb-typo-letter-spacing-text);position:relative;display:flex;align-items:center;column-gap:var(--sbb-option-column-gap);justify-content:start;min-height:var(--sbb-option-min-height);padding-inline:var(--sbb-option-padding-inline);color:var(--sbb-option-color)}.sbb-option:after{content:\"\";display:block;position:absolute;inset:var(--sbb-option-focus-outline-inset);pointer-events:none;border:var(--sbb-focus-outline-width) solid var(--sbb-option-focus-outline-color);border-radius:var(--sbb-option-border-radius)}:host(:not(:is(:state(disabled),[state--disabled]))) .sbb-option__label--highlight{font-weight:700}@media(forced-colors:active){:host(:not(:is(:state(disabled),[state--disabled]))) .sbb-option__label--highlight{color:Highlight}}.sbb-option__icon{display:flex;min-width:var(--sbb-size-icon-ui-small);min-height:var(--sbb-size-icon-ui-small);color:var(--sbb-option-icon-color)}:host(:not(:is(:state(slotted-icon),[state--slotted-icon]),:is(:state(has-icon-name),[state--has-icon-name]))) .sbb-option__icon{display:var(--sbb-option-icon-container-display, none)}.sbb-option__label{text-overflow:var(--sbb-option-text-overflow);overflow:var(--sbb-option-overflow);white-space:var(--sbb-option-white-space, initial)}", a = "sbb-autocomplete-grid-option", o = class extends r {
|
|
6
|
-
static {
|
|
7
|
-
this.elementName = "sbb-autocomplete-grid-option";
|
|
8
|
-
}
|
|
9
|
-
static {
|
|
10
|
-
this.role = "gridcell";
|
|
11
|
-
}
|
|
12
|
-
static {
|
|
13
|
-
this.styles = [n(i)];
|
|
14
|
-
}
|
|
15
|
-
constructor() {
|
|
16
|
-
super(), this.optionId = a, this.addController(new e(this, () => this.closest("sbb-autocomplete-grid-optgroup"), {
|
|
17
|
-
disabled: (e) => {
|
|
18
|
-
this.disabledFromGroup = e.disabled, t(this.closest?.("sbb-autocomplete-grid-row"))?.toggle("disabled", this.disabled || this.disabledFromGroup), this.updateAriaDisabled();
|
|
19
|
-
},
|
|
20
|
-
label: (e) => this.groupLabel = e.label
|
|
21
|
-
})), this.addController(new e(this, () => this.closest("sbb-autocomplete-grid"), { negative: (e) => this.toggleState("negative", e.negative) }));
|
|
22
|
-
}
|
|
23
|
-
willUpdate(e) {
|
|
24
|
-
super.willUpdate(e), e.has("disabled") && (t(this.closest?.("sbb-autocomplete-grid-row"))?.toggle("disabled", this.disabled || this.disabledFromGroup), this.updateAriaDisabled());
|
|
25
|
-
}
|
|
26
|
-
selectByClick(e) {
|
|
27
|
-
if (this.disabled || this.disabledFromGroup) {
|
|
28
|
-
e.stopPropagation();
|
|
29
|
-
return;
|
|
30
|
-
}
|
|
31
|
-
this.selectViaUserInteraction(!0);
|
|
32
|
-
}
|
|
33
|
-
};
|
|
34
|
-
//#endregion
|
|
35
|
-
export { a as n, o as t };
|
package/core/styles/core.scss
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
$theme: 'standard' !default;
|
|
2
|
-
|
|
3
|
-
@use 'sass:string';
|
|
4
|
-
|
|
5
|
-
@use '../../autocomplete-grid/autocomplete-grid-row/autocomplete-grid-row.global' as
|
|
6
|
-
autocomplete-grid-row with (
|
|
7
|
-
$theme: $theme
|
|
8
|
-
);
|
|
9
|
-
|
|
10
|
-
// Core variables
|
|
11
|
-
:root {
|
|
12
|
-
@include autocomplete-grid-row.base;
|
|
13
|
-
}
|