@sbb-esta/lyne-elements-experimental 2.11.0 → 2.11.2
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/core/datetime/date-helper.js +142 -142
- package/core/timetable/access-leg-helper.js +49 -52
- package/core/timetable/timetable-helper.js +7 -8
- package/custom-elements.json +106 -35
- package/development/core/datetime/date-helper.js +10 -10
- package/development/core/timetable/access-leg-helper.js +12 -15
- package/development/core/timetable/timetable-helper.js +6 -7
- package/development/{differenceInMinutes-CHSyWiQs.js → differenceInMinutes-D5Nj8Stc.js} +3 -3
- package/development/{format-D0-yhzi4.js → format-BQfaa1ZT.js} +22 -26
- package/development/{isValid-Bo4R7iA7.js → isValid-DvieCZVi.js} +3 -3
- package/development/journey-summary/journey-summary.component.js +4 -5
- package/development/pearl-chain/pearl-chain.component.d.ts.map +1 -1
- package/development/pearl-chain/pearl-chain.component.js +28 -39
- package/development/pearl-chain-time/pearl-chain-time.component.js +5 -6
- 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/seat-reservation/common/mapper/icon-mapper.js +1 -1
- package/development/seat-reservation/common/mapper/mapper.d.ts +5 -5
- package/development/seat-reservation/common/mapper/mapper.d.ts.map +1 -1
- package/development/seat-reservation/common/mapper/mapper.js +17 -19
- package/development/seat-reservation/common/mapper/seat-reservation-sample-data.js +1 -1
- package/development/seat-reservation/common/svgs.js +1 -1
- package/development/seat-reservation/common/translations/i18n.js +2 -3
- package/development/seat-reservation/common/types.d.ts +71 -0
- package/development/seat-reservation/common/types.d.ts.map +1 -0
- package/development/seat-reservation/common/types.js +2 -0
- package/development/seat-reservation/common.d.ts +6 -3
- package/development/seat-reservation/common.d.ts.map +1 -1
- package/development/seat-reservation/common.js +3 -7
- package/development/seat-reservation/seat-reservation/seat-reservation-base-element.d.ts +4 -3
- 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 +27 -38
- package/development/seat-reservation/seat-reservation/seat-reservation-scoped/seat-reservation-scoped.component.d.ts.map +1 -0
- package/development/seat-reservation/seat-reservation/{seat-reservation-scoped-component → seat-reservation-scoped}/seat-reservation-scoped.component.js +6 -7
- package/development/seat-reservation/seat-reservation/seat-reservation-scoped.d.ts +5 -0
- package/development/seat-reservation/seat-reservation/seat-reservation-scoped.d.ts.map +1 -0
- package/development/seat-reservation/seat-reservation/seat-reservation-scoped.js +5 -0
- package/development/seat-reservation/seat-reservation/seat-reservation.component.d.ts +4 -4
- package/development/seat-reservation/seat-reservation/seat-reservation.component.d.ts.map +1 -1
- package/development/seat-reservation/seat-reservation/seat-reservation.component.js +20 -27
- package/development/seat-reservation/seat-reservation-area/seat-reservation-area.component.js +1 -1
- package/development/seat-reservation/seat-reservation-area.d.ts +3 -0
- package/development/seat-reservation/seat-reservation-area.d.ts.map +1 -1
- package/development/seat-reservation/seat-reservation-graphic/seat-reservation-assets.js +2 -3
- package/development/seat-reservation/seat-reservation-graphic/seat-reservation-graphic.component.js +7 -8
- package/development/seat-reservation/seat-reservation-graphic.d.ts +3 -0
- package/development/seat-reservation/seat-reservation-graphic.d.ts.map +1 -1
- package/development/seat-reservation/seat-reservation-navigation/seat-reservation-navigation-coach/seat-reservation-navigation-coach.component.d.ts +6 -5
- package/development/seat-reservation/seat-reservation-navigation/seat-reservation-navigation-coach/seat-reservation-navigation-coach.component.d.ts.map +1 -1
- package/development/seat-reservation/seat-reservation-navigation/seat-reservation-navigation-coach/seat-reservation-navigation-coach.component.js +7 -11
- package/development/seat-reservation/seat-reservation-navigation/seat-reservation-navigation-coach.d.ts +3 -0
- package/development/seat-reservation/seat-reservation-navigation/seat-reservation-navigation-coach.d.ts.map +1 -1
- package/development/seat-reservation/seat-reservation-navigation/seat-reservation-navigation-services/seat-reservation-navigation-services.component.js +2 -3
- package/development/seat-reservation/seat-reservation-navigation/seat-reservation-navigation-services.d.ts +3 -0
- package/development/seat-reservation/seat-reservation-navigation/seat-reservation-navigation-services.d.ts.map +1 -1
- package/development/seat-reservation/seat-reservation-navigation.d.ts +6 -0
- package/development/seat-reservation/seat-reservation-navigation.d.ts.map +1 -0
- package/development/seat-reservation/seat-reservation-navigation.js +7 -0
- package/development/seat-reservation/seat-reservation-place-control/seat-reservation-place-control.component.d.ts +2 -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 +5 -6
- package/development/seat-reservation/seat-reservation-place-control.d.ts +3 -0
- package/development/seat-reservation/seat-reservation-place-control.d.ts.map +1 -1
- package/development/seat-reservation/seat-reservation.d.ts +5 -71
- package/development/seat-reservation/seat-reservation.d.ts.map +1 -1
- package/development/seat-reservation/seat-reservation.js +4 -2
- package/development/seat-reservation.d.ts +5 -0
- package/development/seat-reservation.d.ts.map +1 -1
- package/development/seat-reservation.js +26 -3
- package/development/timetable-duration/timetable-duration.component.js +1 -1
- package/development/timetable-row/timetable-row.component.js +58 -89
- package/differenceInMinutes-CP_C5onR.js +23 -0
- package/{format-Dg8rkk7h.js → format-lqeCzmzS.js} +438 -442
- package/index.d.ts +1 -1
- package/index.js +1 -1
- package/isValid-Ceq2O0NQ.js +45 -0
- package/journey-summary/journey-summary.component.js +3 -4
- package/package.json +47 -2
- package/pearl-chain/pearl-chain.component.d.ts.map +1 -1
- package/pearl-chain/pearl-chain.component.js +78 -95
- package/pearl-chain-time/pearl-chain-time.component.js +44 -45
- package/seat-reservation/common/mapper/mapper.d.ts +5 -5
- package/seat-reservation/common/mapper/mapper.d.ts.map +1 -1
- package/seat-reservation/common/mapper/mapper.js +50 -54
- package/seat-reservation/common/translations/i18n.js +5 -6
- package/seat-reservation/common/types.d.ts +71 -0
- package/seat-reservation/common/types.d.ts.map +1 -0
- package/seat-reservation/common/types.js +1 -0
- package/seat-reservation/common.d.ts +6 -3
- package/seat-reservation/common.d.ts.map +1 -1
- package/seat-reservation/common.js +11 -15
- package/seat-reservation/seat-reservation/seat-reservation-base-element.d.ts +4 -3
- package/seat-reservation/seat-reservation/seat-reservation-base-element.d.ts.map +1 -1
- package/seat-reservation/seat-reservation/seat-reservation-base-element.js +107 -118
- package/seat-reservation/seat-reservation/seat-reservation-scoped/seat-reservation-scoped.component.d.ts.map +1 -0
- package/seat-reservation/seat-reservation/{seat-reservation-scoped-component → seat-reservation-scoped}/seat-reservation-scoped.component.js +40 -41
- package/seat-reservation/seat-reservation/seat-reservation-scoped.d.ts +5 -0
- package/seat-reservation/seat-reservation/seat-reservation-scoped.d.ts.map +1 -0
- package/seat-reservation/seat-reservation/{seat-reservation-scoped-component.js → seat-reservation-scoped.js} +1 -1
- package/seat-reservation/seat-reservation/seat-reservation.component.d.ts +4 -4
- package/seat-reservation/seat-reservation/seat-reservation.component.d.ts.map +1 -1
- package/seat-reservation/seat-reservation/seat-reservation.component.js +82 -91
- package/seat-reservation/seat-reservation-area.d.ts +3 -0
- package/seat-reservation/seat-reservation-area.d.ts.map +1 -1
- package/seat-reservation/seat-reservation-graphic/seat-reservation-assets.js +15 -18
- package/seat-reservation/seat-reservation-graphic/seat-reservation-graphic.component.js +58 -59
- package/seat-reservation/seat-reservation-graphic.d.ts +3 -0
- package/seat-reservation/seat-reservation-graphic.d.ts.map +1 -1
- package/seat-reservation/seat-reservation-navigation/seat-reservation-navigation-coach/seat-reservation-navigation-coach.component.d.ts +6 -5
- package/seat-reservation/seat-reservation-navigation/seat-reservation-navigation-coach/seat-reservation-navigation-coach.component.d.ts.map +1 -1
- package/seat-reservation/seat-reservation-navigation/seat-reservation-navigation-coach/seat-reservation-navigation-coach.component.js +71 -75
- package/seat-reservation/seat-reservation-navigation/seat-reservation-navigation-coach.d.ts +3 -0
- package/seat-reservation/seat-reservation-navigation/seat-reservation-navigation-coach.d.ts.map +1 -1
- package/seat-reservation/seat-reservation-navigation/seat-reservation-navigation-services/seat-reservation-navigation-services.component.js +12 -13
- package/seat-reservation/seat-reservation-navigation/seat-reservation-navigation-services.d.ts +3 -0
- package/seat-reservation/seat-reservation-navigation/seat-reservation-navigation-services.d.ts.map +1 -1
- package/seat-reservation/seat-reservation-navigation.d.ts +6 -0
- package/seat-reservation/seat-reservation-navigation.d.ts.map +1 -0
- package/seat-reservation/seat-reservation-navigation.js +6 -0
- package/seat-reservation/seat-reservation-place-control/seat-reservation-place-control.component.d.ts +2 -2
- package/seat-reservation/seat-reservation-place-control/seat-reservation-place-control.component.d.ts.map +1 -1
- package/seat-reservation/seat-reservation-place-control/seat-reservation-place-control.component.js +24 -25
- package/seat-reservation/seat-reservation-place-control.d.ts +3 -0
- package/seat-reservation/seat-reservation-place-control.d.ts.map +1 -1
- package/seat-reservation/seat-reservation.d.ts +5 -71
- package/seat-reservation/seat-reservation.d.ts.map +1 -1
- package/seat-reservation/seat-reservation.js +6 -4
- package/seat-reservation.d.ts +5 -0
- package/seat-reservation.d.ts.map +1 -1
- package/seat-reservation.js +27 -4
- package/timetable-row/timetable-row.component.js +207 -247
- package/development/seat-reservation/seat-reservation/seat-reservation-scoped-component/seat-reservation-scoped.component.d.ts.map +0 -1
- package/development/seat-reservation/seat-reservation/seat-reservation-scoped-component.d.ts +0 -2
- package/development/seat-reservation/seat-reservation/seat-reservation-scoped-component.d.ts.map +0 -1
- package/development/seat-reservation/seat-reservation/seat-reservation-scoped-component.js +0 -5
- package/differenceInMinutes-BMqUZdhj.js +0 -23
- package/isValid-DJ69OMZJ.js +0 -45
- package/seat-reservation/seat-reservation/seat-reservation-scoped-component/seat-reservation-scoped.component.d.ts.map +0 -1
- package/seat-reservation/seat-reservation/seat-reservation-scoped-component.d.ts +0 -2
- package/seat-reservation/seat-reservation/seat-reservation-scoped-component.d.ts.map +0 -1
- /package/development/seat-reservation/seat-reservation/{seat-reservation-scoped-component → seat-reservation-scoped}/seat-reservation-scoped.component.d.ts +0 -0
- /package/seat-reservation/seat-reservation/{seat-reservation-scoped-component → seat-reservation-scoped}/seat-reservation-scoped.component.d.ts +0 -0
|
@@ -1,56 +1,32 @@
|
|
|
1
|
-
var
|
|
2
|
-
throw TypeError(
|
|
1
|
+
var Ne = (t) => {
|
|
2
|
+
throw TypeError(t);
|
|
3
3
|
};
|
|
4
|
-
var
|
|
5
|
-
var
|
|
6
|
-
import { __runInitializers as
|
|
7
|
-
import { SbbLanguageController as
|
|
8
|
-
import { defaultDateAdapter as
|
|
9
|
-
import { forceType as
|
|
10
|
-
import { setOrRemoveAttribute as
|
|
11
|
-
import { i18nFromPlatform as
|
|
12
|
-
import { css as
|
|
13
|
-
import { customElement as
|
|
14
|
-
import { removeTimezoneFromISOTimeString as
|
|
15
|
-
import { isRideLeg as
|
|
4
|
+
var ke = (t, i, s) => i.has(t) || Ne("Cannot " + s);
|
|
5
|
+
var f = (t, i, s) => (ke(t, i, "read from private field"), s ? s.call(t) : i.get(t)), y = (t, i, s) => i.has(t) ? Ne("Cannot add the same private member more than once") : i instanceof WeakSet ? i.add(t) : i.set(t, s), l = (t, i, s, n) => (ke(t, i, "write to private field"), n ? n.call(t, s) : i.set(t, s), s);
|
|
6
|
+
import { __runInitializers as o, __esDecorate as _ } from "tslib";
|
|
7
|
+
import { SbbLanguageController as nt } from "@sbb-esta/lyne-elements/core/controllers.js";
|
|
8
|
+
import { defaultDateAdapter as ze } from "@sbb-esta/lyne-elements/core/datetime.js";
|
|
9
|
+
import { forceType as k } from "@sbb-esta/lyne-elements/core/decorators.js";
|
|
10
|
+
import { setOrRemoveAttribute as ot } from "@sbb-esta/lyne-elements/core/dom.js";
|
|
11
|
+
import { i18nFromPlatform as lt, i18nDeparture as Ie, i18nMeansOfTransport as J, i18nDirection as Le, i18nRealTimeInfo as Re, i18nSupersaver as Me, i18nTransferProcedures as ct, i18nTransferProcedure as bt, i18nArrival as dt, i18nClass as Ee, i18nOccupancy as Oe, i18nTravelhints as ht, i18nTripDuration as Pe, i18nNew as De, i18nTripQuayChange as ut } from "@sbb-esta/lyne-elements/core/i18n.js";
|
|
12
|
+
import { css as pt, LitElement as gt, nothing as h, html as c } from "lit";
|
|
13
|
+
import { customElement as mt, property as v } from "lit/decorators.js";
|
|
14
|
+
import { removeTimezoneFromISOTimeString as Fe, durationToTime as qe } from "../core/datetime.js";
|
|
15
|
+
import { isRideLeg as Je, getDepartureArrivalTimeAttribute as _t } from "../core/timetable.js";
|
|
16
16
|
import "@sbb-esta/lyne-elements/card.js";
|
|
17
17
|
import "@sbb-esta/lyne-elements/icon.js";
|
|
18
18
|
import "@sbb-esta/lyne-elements/timetable-occupancy.js";
|
|
19
19
|
import "../pearl-chain-time.js";
|
|
20
|
-
import { f as
|
|
21
|
-
const
|
|
22
|
-
<sbb-icon name=${
|
|
20
|
+
import { f as Be } from "../format-lqeCzmzS.js";
|
|
21
|
+
const ft = pt`*,:before,:after{box-sizing:border-box}: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-screen-reader-only{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;white-space:nowrap;width:1px}.sbb-timetable__row--quay{margin-inline-end:var(--sbb-spacing-fixed-1x)}.sbb-timetable__row--quay-type{float:left}ul{list-style:none;margin:0;padding:0;font-size:inherit;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-font-size-text-s);font-family:var(--sbb-typo-font-family);font-weight:400;line-height:var(--sbb-typo-line-height-body-text);letter-spacing:var(--sbb-typo-letter-spacing-body-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-font-size-text-s);font-family:var(--sbb-typo-font-family);font-weight:400;line-height:var(--sbb-typo-line-height-body-text);letter-spacing:var(--sbb-typo-letter-spacing-body-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-red)}.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: 52.5rem){.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-color-cloud);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-border-radius-4x);transform:skew(16deg);width:7.1875rem;height:1.25rem}@keyframes skeleton-pulse{0%{background:var(--sbb-color-cloud)}17%{background:var(--sbb-color-cloud)}50%{background:var(--sbb-color-milk)}67%{background:var(--sbb-color-milk)}to{background:var(--sbb-color-cloud)}}`, yt = (t, i) => c`<span class="sbb-timetable__row-transport">
|
|
22
|
+
<sbb-icon name=${t}></sbb-icon>
|
|
23
23
|
<span class="sbb-screen-reader-only">${i}</span>
|
|
24
|
-
</span>`,
|
|
25
|
-
const s = ["M", "B", "T"].includes(
|
|
26
|
-
return
|
|
27
|
-
${i !== null ?
|
|
24
|
+
</span>`, vt = (t, i) => {
|
|
25
|
+
const s = ["M", "B", "T"].includes(t) ? " " : "";
|
|
26
|
+
return c`<span class="sbb-timetable__row-transportnumber">
|
|
27
|
+
${i !== null ? t + s + i : t}
|
|
28
28
|
</span>`;
|
|
29
|
-
},
|
|
30
|
-
var i, s, n;
|
|
31
|
-
return (n = (s = (i = e == null ? void 0 : e.find((b) => {
|
|
32
|
-
var r, p;
|
|
33
|
-
return (p = (r = b.serviceJourney) == null ? void 0 : r.serviceAlteration) == null ? void 0 : p.reachableText;
|
|
34
|
-
})) == null ? void 0 : i.serviceJourney) == null ? void 0 : s.serviceAlteration) == null ? void 0 : n.reachableText;
|
|
35
|
-
}, Et = (e) => {
|
|
36
|
-
var i, s, n;
|
|
37
|
-
return (n = (s = (i = e == null ? void 0 : e.find((b) => {
|
|
38
|
-
var r, p;
|
|
39
|
-
return (p = (r = b.serviceJourney) == null ? void 0 : r.serviceAlteration) == null ? void 0 : p.delayText;
|
|
40
|
-
})) == null ? void 0 : i.serviceJourney) == null ? void 0 : s.serviceAlteration) == null ? void 0 : n.delayText;
|
|
41
|
-
}, ct = (e) => {
|
|
42
|
-
var i, s, n;
|
|
43
|
-
return (n = (s = (i = e == null ? void 0 : e.find((b) => {
|
|
44
|
-
var r, p;
|
|
45
|
-
return !!((p = (r = b.serviceJourney) == null ? void 0 : r.serviceAlteration) != null && p.redirectedText);
|
|
46
|
-
})) == null ? void 0 : i.serviceJourney) == null ? void 0 : s.serviceAlteration) == null ? void 0 : n.redirectedText;
|
|
47
|
-
}, bt = (e) => {
|
|
48
|
-
var i, s, n;
|
|
49
|
-
return (n = (s = (i = e == null ? void 0 : e.find((b) => {
|
|
50
|
-
var r, p;
|
|
51
|
-
return !!((p = (r = b.serviceJourney) == null ? void 0 : r.serviceAlteration) != null && p.unplannedStopPointsText);
|
|
52
|
-
})) == null ? void 0 : i.serviceJourney) == null ? void 0 : s.serviceAlteration) == null ? void 0 : n.unplannedStopPointsText;
|
|
53
|
-
}, St = (e) => {
|
|
29
|
+
}, Ue = (t) => t?.find((i) => i.serviceJourney?.serviceAlteration?.reachableText)?.serviceJourney?.serviceAlteration?.reachableText, xt = (t) => t?.find((i) => i.serviceJourney?.serviceAlteration?.delayText)?.serviceJourney?.serviceAlteration?.delayText, We = (t) => t?.find((i) => !!i.serviceJourney?.serviceAlteration?.redirectedText)?.serviceJourney?.serviceAlteration?.redirectedText, je = (t) => t?.find((i) => !!i.serviceJourney?.serviceAlteration?.unplannedStopPointsText)?.serviceJourney?.serviceAlteration?.unplannedStopPointsText, wt = (t) => {
|
|
54
30
|
const i = {
|
|
55
31
|
DISTURBANCE: 0,
|
|
56
32
|
INFORMATION: 1,
|
|
@@ -59,133 +35,132 @@ const Lt = Ct`*,:before,:after{box-sizing:border-box}:host{--sbb-timetable-row-g
|
|
|
59
35
|
CONSTRUCTION_SITE: 4,
|
|
60
36
|
END_MESSAGE: 5
|
|
61
37
|
};
|
|
62
|
-
return [...
|
|
63
|
-
},
|
|
64
|
-
|
|
65
|
-
switch (e == null ? void 0 : e.cause) {
|
|
38
|
+
return [...t].sort((s, n) => i[s.cause] - i[n.cause]);
|
|
39
|
+
}, $t = (t) => {
|
|
40
|
+
switch (t?.cause) {
|
|
66
41
|
case "DISTURBANCE":
|
|
67
42
|
return {
|
|
68
43
|
name: "disruption",
|
|
69
|
-
text:
|
|
44
|
+
text: t?.broadcastMessages?.length ? t?.broadcastMessages[0].title : ""
|
|
70
45
|
};
|
|
71
46
|
case "INFORMATION":
|
|
72
47
|
return {
|
|
73
48
|
name: "info",
|
|
74
|
-
text:
|
|
49
|
+
text: t?.broadcastMessages.length ? t?.broadcastMessages[0].title : ""
|
|
75
50
|
};
|
|
76
51
|
case "DELAY":
|
|
77
52
|
return {
|
|
78
53
|
name: "delay",
|
|
79
|
-
text:
|
|
54
|
+
text: t?.broadcastMessages.length ? t?.broadcastMessages[0].title : ""
|
|
80
55
|
};
|
|
81
56
|
case "TRAIN_REPLACEMENT_BY_BUS":
|
|
82
57
|
return {
|
|
83
58
|
name: "replacementbus",
|
|
84
|
-
text:
|
|
59
|
+
text: t?.broadcastMessages.length ? t?.broadcastMessages[0].title : ""
|
|
85
60
|
};
|
|
86
61
|
case "CONSTRUCTION_SITE":
|
|
87
62
|
return {
|
|
88
63
|
name: "construction",
|
|
89
|
-
text:
|
|
64
|
+
text: t?.broadcastMessages.length ? t?.broadcastMessages[0].title : ""
|
|
90
65
|
};
|
|
91
66
|
default:
|
|
92
67
|
return {
|
|
93
68
|
name: "info",
|
|
94
|
-
text:
|
|
69
|
+
text: t?.broadcastMessages.length ? t?.broadcastMessages[0].title : ""
|
|
95
70
|
};
|
|
96
71
|
}
|
|
97
|
-
},
|
|
98
|
-
const { summary: s, legs: n } =
|
|
99
|
-
if (
|
|
100
|
-
return { name: "cancellation", text:
|
|
101
|
-
if (
|
|
102
|
-
return { name: "missed-connection", text:
|
|
103
|
-
if (
|
|
104
|
-
return { name: "alternative", text:
|
|
105
|
-
if (
|
|
106
|
-
return { name: "reroute", text:
|
|
107
|
-
if (
|
|
108
|
-
return { name: "add-stop", text:
|
|
109
|
-
if (
|
|
110
|
-
return { name: "delay", text:
|
|
111
|
-
if (
|
|
112
|
-
const
|
|
72
|
+
}, Tt = (t, i) => {
|
|
73
|
+
const { summary: s, legs: n } = t || {}, u = n?.filter((C) => Je(C)), { tripStatus: g } = s || {};
|
|
74
|
+
if (g?.cancelled || g?.partiallyCancelled)
|
|
75
|
+
return { name: "cancellation", text: g?.cancelledText };
|
|
76
|
+
if (Ue(u))
|
|
77
|
+
return { name: "missed-connection", text: Ue(u) };
|
|
78
|
+
if (g?.alternative)
|
|
79
|
+
return { name: "alternative", text: g.alternativeText };
|
|
80
|
+
if (We(u))
|
|
81
|
+
return { name: "reroute", text: We(u) };
|
|
82
|
+
if (je(u))
|
|
83
|
+
return { name: "add-stop", text: je(u) };
|
|
84
|
+
if (g?.delayed || g?.delayedUnknown)
|
|
85
|
+
return { name: "delay", text: xt(u) };
|
|
86
|
+
if (g?.quayChanged) {
|
|
87
|
+
const C = u[0].departure;
|
|
113
88
|
return {
|
|
114
89
|
name: "platform-change",
|
|
115
|
-
text:
|
|
90
|
+
text: C.quayChanged ? C.quayChangedText : ut[i]
|
|
116
91
|
};
|
|
117
92
|
}
|
|
118
93
|
return {};
|
|
119
|
-
},
|
|
94
|
+
}, At = (t) => {
|
|
120
95
|
const i = ["RR", "RK", "RC", "RL", "RM", "RS", "RU", "XP", "XR", "XT"];
|
|
121
|
-
return
|
|
96
|
+
return t.reduce((s, n) => {
|
|
122
97
|
if (s)
|
|
123
98
|
return s;
|
|
124
99
|
if (i.includes(n.name))
|
|
125
100
|
return { ...n, name: "RR" };
|
|
126
101
|
}, void 0);
|
|
127
|
-
},
|
|
102
|
+
}, Ct = (t) => {
|
|
128
103
|
const i = ["Z", "SB", "SZ", "VR", "TG"];
|
|
129
|
-
return
|
|
130
|
-
},
|
|
131
|
-
const i =
|
|
104
|
+
return t.filter((n, u) => t.findIndex((g) => g.name === n.name) === u).filter((n) => i.includes(n.name)).sort((n, u) => i.indexOf(n.name) - i.indexOf(u.name));
|
|
105
|
+
}, Y = (t) => {
|
|
106
|
+
const i = At(t), s = Ct(t);
|
|
132
107
|
return i === void 0 ? s : s.length ? s[0].name === "Z" && s[1] ? [s[0], i, s[1]].concat(s.slice(2)) : [i, ...s] : [i];
|
|
133
108
|
};
|
|
134
|
-
let
|
|
135
|
-
var L, R, M, E,
|
|
136
|
-
let
|
|
137
|
-
return
|
|
109
|
+
let jt = (() => {
|
|
110
|
+
var z, I, L, R, M, E, O, P, D, F, b;
|
|
111
|
+
let t = [mt("sbb-timetable-row")], i, s = [], n, u = gt, g = [], C, X = [], Z = [], G, V = [], ee = [], te, ae = [], ie = [], se, re = [], ne = [], oe, le = [], ce = [], be, de = [], he = [], ue, pe = [], ge = [], me, _e = [], fe = [], ye, ve = [], xe = [], we, $e = [], Te = [], Ae;
|
|
112
|
+
return b = class extends u {
|
|
138
113
|
constructor() {
|
|
139
114
|
super(...arguments);
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
115
|
+
y(this, z);
|
|
116
|
+
y(this, I);
|
|
117
|
+
y(this, L);
|
|
118
|
+
y(this, R);
|
|
119
|
+
y(this, M);
|
|
120
|
+
y(this, E);
|
|
121
|
+
y(this, O);
|
|
122
|
+
y(this, P);
|
|
123
|
+
y(this, D);
|
|
124
|
+
y(this, F);
|
|
125
|
+
l(this, z, (o(this, g), o(this, X, null))), l(this, I, (o(this, Z), o(this, V, null))), l(this, L, (o(this, ee), o(this, ae, !1))), l(this, R, (o(this, ie), o(this, re, null))), l(this, M, (o(this, ne), o(this, le, !1))), l(this, E, (o(this, ce), o(this, de, !1))), l(this, O, (o(this, he), o(this, pe, !1))), l(this, P, (o(this, ge), o(this, _e, ""))), l(this, D, (o(this, fe), o(this, ve, !1))), l(this, F, (o(this, xe), o(this, $e, !1))), this._now = (o(this, Te), null), this._language = new nt(this);
|
|
151
126
|
}
|
|
152
127
|
/** The trip Prop. */
|
|
153
128
|
get trip() {
|
|
154
|
-
return
|
|
129
|
+
return f(this, z);
|
|
155
130
|
}
|
|
156
131
|
set trip(a) {
|
|
157
|
-
|
|
132
|
+
l(this, z, a);
|
|
158
133
|
}
|
|
159
134
|
/** The price Prop, which consists of the data for the badge. */
|
|
160
135
|
get price() {
|
|
161
|
-
return
|
|
136
|
+
return f(this, I);
|
|
162
137
|
}
|
|
163
138
|
set price(a) {
|
|
164
|
-
|
|
139
|
+
l(this, I, a);
|
|
165
140
|
}
|
|
166
141
|
/** This will be forwarded to the sbb-pearl-chain component - if true the position won't be animated. */
|
|
167
142
|
get disableAnimation() {
|
|
168
|
-
return
|
|
143
|
+
return f(this, L);
|
|
169
144
|
}
|
|
170
145
|
set disableAnimation(a) {
|
|
171
|
-
|
|
146
|
+
l(this, L, a);
|
|
172
147
|
}
|
|
173
148
|
/** This will be forwarded to the notices section */
|
|
174
149
|
get boarding() {
|
|
175
|
-
return
|
|
150
|
+
return f(this, R);
|
|
176
151
|
}
|
|
177
152
|
set boarding(a) {
|
|
178
|
-
|
|
153
|
+
l(this, R, a);
|
|
179
154
|
}
|
|
180
155
|
/**
|
|
181
156
|
* The loading state -
|
|
182
157
|
* when this is true it will be render skeleton with an idling animation
|
|
183
158
|
*/
|
|
184
159
|
get loadingTrip() {
|
|
185
|
-
return
|
|
160
|
+
return f(this, M);
|
|
186
161
|
}
|
|
187
162
|
set loadingTrip(a) {
|
|
188
|
-
|
|
163
|
+
l(this, M, a);
|
|
189
164
|
}
|
|
190
165
|
/**
|
|
191
166
|
* The Footpath attribute for rendering different icons
|
|
@@ -194,59 +169,59 @@ let ia = (() => {
|
|
|
194
169
|
* default: render walk-icon
|
|
195
170
|
*/
|
|
196
171
|
get a11yFootpath() {
|
|
197
|
-
return
|
|
172
|
+
return f(this, E);
|
|
198
173
|
}
|
|
199
174
|
set a11yFootpath(a) {
|
|
200
|
-
|
|
175
|
+
l(this, E, a);
|
|
201
176
|
}
|
|
202
177
|
/**
|
|
203
178
|
* The loading state -
|
|
204
179
|
* when this is true it will be render skeleton with an idling animation
|
|
205
180
|
*/
|
|
206
181
|
get loadingPrice() {
|
|
207
|
-
return
|
|
182
|
+
return f(this, O);
|
|
208
183
|
}
|
|
209
184
|
set loadingPrice(a) {
|
|
210
|
-
|
|
185
|
+
l(this, O, a);
|
|
211
186
|
}
|
|
212
187
|
/**
|
|
213
188
|
* Hidden label for the card action. It overrides the automatically generated accessibility text for the component. Use this prop to provide custom accessibility information for the component.
|
|
214
189
|
*/
|
|
215
190
|
get cardActionLabel() {
|
|
216
|
-
return
|
|
191
|
+
return f(this, P);
|
|
217
192
|
}
|
|
218
193
|
set cardActionLabel(a) {
|
|
219
|
-
|
|
194
|
+
l(this, P, a);
|
|
220
195
|
}
|
|
221
196
|
/** This will be forwarded to the sbb-card component as aria-expanded. */
|
|
222
197
|
get accessibilityExpanded() {
|
|
223
|
-
return
|
|
198
|
+
return f(this, D);
|
|
224
199
|
}
|
|
225
200
|
set accessibilityExpanded(a) {
|
|
226
|
-
|
|
201
|
+
l(this, D, a);
|
|
227
202
|
}
|
|
228
203
|
/** When this prop is true the sbb-card will be in the active state. */
|
|
229
204
|
get active() {
|
|
230
|
-
return
|
|
205
|
+
return f(this, F);
|
|
231
206
|
}
|
|
232
207
|
set active(a) {
|
|
233
|
-
|
|
208
|
+
l(this, F, a);
|
|
234
209
|
}
|
|
235
210
|
/** A configured date which acts as the current date instead of the real current date. Recommended for testing purposes. */
|
|
236
211
|
set now(a) {
|
|
237
|
-
this._now =
|
|
212
|
+
this._now = ze.getValidDateOrNull(ze.deserialize(a));
|
|
238
213
|
}
|
|
239
214
|
get now() {
|
|
240
215
|
return this._now ?? /* @__PURE__ */ new Date();
|
|
241
216
|
}
|
|
242
217
|
willUpdate(a) {
|
|
243
|
-
super.willUpdate(a), a.has("loadingTrip") &&
|
|
218
|
+
super.willUpdate(a), a.has("loadingTrip") && ot(this, "role", this.loadingTrip ? null : "rowgroup");
|
|
244
219
|
}
|
|
245
220
|
/** The skeleton render function for the loading state */
|
|
246
221
|
_renderSkeleton() {
|
|
247
|
-
return
|
|
222
|
+
return c`
|
|
248
223
|
<sbb-card size="l" class="sbb-loading">
|
|
249
|
-
${this.loadingPrice ?
|
|
224
|
+
${this.loadingPrice ? c`<sbb-card-badge class="sbb-loading__badge"></sbb-card-badge>` : h}
|
|
250
225
|
<div class="sbb-loading__wrapper">
|
|
251
226
|
<div class="sbb-loading__row"></div>
|
|
252
227
|
<div class="sbb-loading__row"></div>
|
|
@@ -256,207 +231,192 @@ let ia = (() => {
|
|
|
256
231
|
`;
|
|
257
232
|
}
|
|
258
233
|
_getRideLegs() {
|
|
259
|
-
|
|
260
|
-
return ((t = (a = this.trip) == null ? void 0 : a.legs) == null ? void 0 : t.filter((l) => dt(l))) ?? [];
|
|
234
|
+
return this.trip?.legs?.filter((a) => Je(a)) ?? [];
|
|
261
235
|
}
|
|
262
236
|
_getQuayTypeStrings() {
|
|
263
|
-
|
|
264
|
-
if (!(($ = this.trip.summary) != null && $.product))
|
|
237
|
+
if (!this.trip.summary?.product)
|
|
265
238
|
return null;
|
|
266
|
-
const a = this._getRideLegs(),
|
|
239
|
+
const a = this._getRideLegs(), r = this.trip.summary.product?.vehicleMode === "TRAIN" ? a[0].serviceJourney.quayTypeShortName || "" : a[0].serviceJourney.quayTypeName || "";
|
|
267
240
|
return {
|
|
268
|
-
long:
|
|
269
|
-
short:
|
|
241
|
+
long: lt[this._language.current] + " " + r,
|
|
242
|
+
short: r
|
|
270
243
|
};
|
|
271
244
|
}
|
|
272
245
|
/** map Quay */
|
|
273
246
|
_renderQuayType() {
|
|
274
|
-
|
|
275
|
-
if (!((t = this.trip.summary) != null && t.product))
|
|
247
|
+
if (!this.trip.summary?.product)
|
|
276
248
|
return;
|
|
277
249
|
const a = this._getQuayTypeStrings();
|
|
278
|
-
return
|
|
250
|
+
return c`
|
|
279
251
|
<span class="sbb-timetable__row--quay">
|
|
280
|
-
<span class="sbb-screen-reader-only">${a
|
|
252
|
+
<span class="sbb-screen-reader-only">${a?.long} </span>
|
|
281
253
|
<span class="sbb-timetable__row--quay-type" aria-hidden="true"
|
|
282
|
-
>${a
|
|
254
|
+
>${a?.short}</span
|
|
283
255
|
>
|
|
284
256
|
</span>
|
|
285
257
|
`;
|
|
286
258
|
}
|
|
287
259
|
_handleHimCus(a) {
|
|
288
|
-
|
|
289
|
-
const { situations: t } = a || {}, l = t && St(t), $ = Pt(a, this._language.current);
|
|
260
|
+
const { situations: e } = a || {}, r = e && wt(e), w = Tt(a, this._language.current);
|
|
290
261
|
return {
|
|
291
|
-
cus:
|
|
292
|
-
him:
|
|
262
|
+
cus: Object.keys(w)?.length ? w : null,
|
|
263
|
+
him: e?.length ? $t(r[0]) : null
|
|
293
264
|
};
|
|
294
265
|
}
|
|
295
266
|
_getAccessibilityText(a) {
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
}, ee = y && y.vehicleMode ? G[y.vehicleMode.toLowerCase()] && `${G[y.vehicleMode.toLowerCase()][this._language.current]}, ` : "", Y = y != null && y.vehicleSubModeShortName ? `${y.vehicleSubModeShortName} ${y.line || ""}, ` : "", X = `${Ge[this._language.current]} ${V}, `, x = this._handleHimCus(a), Me = (Se = x == null ? void 0 : x.cus) != null && Se.text ? `${Ve[this._language.current]}: ${(Oe = x == null ? void 0 : x.cus) == null ? void 0 : Oe.text}, ` : "", ht = (Pe = x == null ? void 0 : x.him) != null && Pe.text ? `${Ve[this._language.current]}: ${(De = x == null ? void 0 : x.him) == null ? void 0 : De.text}, ` : "", gt = this.boarding ? `${this.boarding.text}, ` : "", mt = `${(Fe = this.price) != null && Fe.isDiscount ? et[this._language.current] : ""} ${(Be = this.price) != null && Be.text && ((qe = this.price) != null && qe.price) ? (((Ue = this.price) == null ? void 0 : Ue.text) || "") + " " + (((We = this.price) == null ? void 0 : We.price) || "") + ", " : ""}`, pt = C.length > 2 ? `${C.length - 1} ${wt[this._language.current]}, ` : C.length > 1 ? `${C.length - 1} ${$t[this._language.current]}, ` : "", _t = W ? `${Tt[this._language.current]}: ${lt(W, "HH:mm")}, ` : "";
|
|
301
|
-
let te = "";
|
|
302
|
-
c && (c.firstClass && c.firstClass !== "UNKNOWN" && (te += `${tt.first[this._language.current]} ${(je = at[c.firstClass.toLowerCase()]) == null ? void 0 : je[this._language.current]}.`), c.secondClass && c.secondClass !== "UNKNOWN" && (te += ` ${tt.second[this._language.current]} ${(Je = at[c.secondClass.toLowerCase()]) == null ? void 0 : Je[this._language.current]}.`));
|
|
303
|
-
const Ee = $ && ae($).length && ((He = ae($)) == null ? void 0 : He.map((k, Z) => {
|
|
304
|
-
var Qe;
|
|
305
|
-
return Z < 4 && ((Qe = k.text) == null ? void 0 : Qe.template);
|
|
306
|
-
}).join(", ")) + ", ", ut = Ee ? `${At[this._language.current]}: ${Ee}` : "", ft = z && z > 0 ? `${it[this._language.current]} ${nt(z, this._language.current).long}, ` : "";
|
|
267
|
+
const { summary: e, legs: r, notices: w } = a || {}, { departureWalk: d, arrivalWalk: W, departure: S, arrival: $, product: x, direction: H, occupancy: p, duration: T } = e || {}, { departureTimeAttribute: m, arrivalTimeAttribute: q } = _t(r, d || 0, W || 0, this._language.current, this.a11yFootpath), A = this._getRideLegs(), B = S?.time ? Fe(S.time) : void 0, U = $?.time ? Fe($.time) : void 0, Q = m ? `${m.text} ${m.duration}, ` : "", He = q ? `${q.text} ${q.duration}, ` : "", Qe = B ? `${Ie[this._language.current]}: ${Be(B, "HH:mm")}, ` : "", Ke = () => S?.quayFormatted ? `${S?.quayChanged ? `${De[this._language.current]} ` : ""}${this._getQuayTypeStrings()?.long} ${S?.quayFormatted}, ` : "", Ye = x && x.vehicleMode ? J[x.vehicleMode.toLowerCase()] && `${J[x.vehicleMode.toLowerCase()][this._language.current]}, ` : "", Xe = x?.vehicleSubModeShortName ? `${x.vehicleSubModeShortName} ${x.line || ""}, ` : "", Ze = `${Le[this._language.current]} ${H}, `, j = this._handleHimCus(a), Ce = j?.cus?.text ? `${Re[this._language.current]}: ${j?.cus?.text}, ` : "", Ge = j?.him?.text ? `${Re[this._language.current]}: ${j?.him?.text}, ` : "", Ve = this.boarding ? `${this.boarding.text}, ` : "", et = `${this.price?.isDiscount ? Me[this._language.current] : ""} ${this.price?.text && this.price?.price ? (this.price?.text || "") + " " + (this.price?.price || "") + ", " : ""}`, tt = A.length > 2 ? `${A.length - 1} ${ct[this._language.current]}, ` : A.length > 1 ? `${A.length - 1} ${bt[this._language.current]}, ` : "", at = U ? `${dt[this._language.current]}: ${Be(U, "HH:mm")}, ` : "";
|
|
268
|
+
let K = "";
|
|
269
|
+
p && (p.firstClass && p.firstClass !== "UNKNOWN" && (K += `${Ee.first[this._language.current]} ${Oe[p.firstClass.toLowerCase()]?.[this._language.current]}.`), p.secondClass && p.secondClass !== "UNKNOWN" && (K += ` ${Ee.second[this._language.current]} ${Oe[p.secondClass.toLowerCase()]?.[this._language.current]}.`));
|
|
270
|
+
const Se = w && Y(w).length && Y(w)?.map((N, rt) => rt < 4 && N.text?.template).join(", ") + ", ", it = Se ? `${ht[this._language.current]}: ${Se}` : "", st = T && T > 0 ? `${Pe[this._language.current]} ${qe(T, this._language.current).long}, ` : "";
|
|
307
271
|
return [
|
|
308
|
-
J,
|
|
309
272
|
Q,
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
273
|
+
Qe,
|
|
274
|
+
Ke(),
|
|
275
|
+
Ye,
|
|
276
|
+
Xe,
|
|
277
|
+
Ze,
|
|
278
|
+
Ce,
|
|
279
|
+
Ve,
|
|
280
|
+
et,
|
|
281
|
+
Ce ? "" : Ge,
|
|
282
|
+
at,
|
|
283
|
+
He,
|
|
284
|
+
st,
|
|
285
|
+
tt,
|
|
286
|
+
K,
|
|
287
|
+
it
|
|
288
|
+
].map((N) => N?.trim()).filter((N) => N && N.length > 0).join(" ");
|
|
325
289
|
}
|
|
326
290
|
render() {
|
|
327
|
-
var W, J, H, Q;
|
|
328
291
|
if (this.loadingTrip)
|
|
329
292
|
return this._renderSkeleton();
|
|
330
|
-
const { legs: a, id:
|
|
331
|
-
return
|
|
332
|
-
<sbb-card size="l" id=${
|
|
293
|
+
const { legs: a, id: e, notices: r, summary: w } = this.trip || {}, { product: d, direction: W, departureWalk: S, departure: $, arrival: x, arrivalWalk: H, occupancy: p, duration: T } = w || {}, m = this._handleHimCus(this.trip), q = !!m.cus || !!m.him, A = r && Y(r), B = T ? qe(T, this._language.current) : null;
|
|
294
|
+
return c`
|
|
295
|
+
<sbb-card size="l" id=${e}>
|
|
333
296
|
<sbb-card-button
|
|
334
297
|
?active=${this.active}
|
|
335
|
-
aria-expanded=${this.accessibilityExpanded ? "true" :
|
|
298
|
+
aria-expanded=${this.accessibilityExpanded ? "true" : h}
|
|
336
299
|
>
|
|
337
300
|
${this.cardActionLabel ? this.cardActionLabel : this._getAccessibilityText(this.trip)}
|
|
338
301
|
</sbb-card-button>
|
|
339
|
-
${this.loadingPrice ?
|
|
340
|
-
${this.price && !this.loadingPrice ?
|
|
341
|
-
${this.price.isDiscount ?
|
|
302
|
+
${this.loadingPrice ? c`<sbb-card-badge class="sbb-loading__badge"></sbb-card-badge>` : h}
|
|
303
|
+
${this.price && !this.loadingPrice ? c`<sbb-card-badge color=${this.price.isDiscount ? "charcoal" : "white"}>
|
|
304
|
+
${this.price.isDiscount ? c`<span aria-hidden="true">
|
|
342
305
|
%<span class="sbb-screen-reader-only"
|
|
343
|
-
>${
|
|
306
|
+
>${Me[this._language.current]}</span
|
|
344
307
|
>
|
|
345
|
-
</span>` :
|
|
346
|
-
${this.price.text ?
|
|
347
|
-
${this.price.price ?
|
|
348
|
-
</sbb-card-badge>` :
|
|
308
|
+
</span>` : h}
|
|
309
|
+
${this.price.text ? c`<span>${this.price.text}</span>` : h}
|
|
310
|
+
${this.price.price ? c`<span>${this.price.price}</span>` : h}
|
|
311
|
+
</sbb-card-badge>` : h}
|
|
349
312
|
<div class="sbb-timetable__row" role="row">
|
|
350
313
|
<div class="sbb-timetable__row-header" role="gridcell">
|
|
351
314
|
<div class="sbb-timetable__row-details">
|
|
352
|
-
${
|
|
315
|
+
${d?.corporateIdentityPictogram && c`<span class="sbb-timetable__row-transport-wrapper">
|
|
353
316
|
<sbb-icon
|
|
354
317
|
class="sbb-timetable__row-transport-icon"
|
|
355
|
-
name="picto:${
|
|
318
|
+
name="picto:${d.corporateIdentityPictogram}"
|
|
356
319
|
></sbb-icon>
|
|
357
320
|
<span class="sbb-screen-reader-only">
|
|
358
|
-
${
|
|
321
|
+
${d && d.vehicleMode && J[d.vehicleMode.toLowerCase()] && J[d.vehicleMode.toLowerCase()][this._language.current]}
|
|
359
322
|
|
|
360
323
|
</span>
|
|
361
324
|
</span>`}
|
|
362
|
-
${
|
|
325
|
+
${d && (d.corporateIdentityIcon ? yt(d.corporateIdentityIcon, d.name) : d.vehicleSubModeShortName && vt(d.vehicleSubModeShortName, d?.line))}
|
|
363
326
|
</div>
|
|
364
|
-
${
|
|
327
|
+
${W ? c`<p>${`${Le[this._language.current]} ${W}`}</p>` : h}
|
|
365
328
|
</div>
|
|
366
329
|
<sbb-pearl-chain-time
|
|
367
330
|
role="gridcell"
|
|
368
331
|
.legs=${a}
|
|
369
|
-
.departureTime=${
|
|
370
|
-
.arrivalTime=${
|
|
371
|
-
.departureWalk=${
|
|
372
|
-
.arrivalWalk=${
|
|
332
|
+
.departureTime=${$?.time}
|
|
333
|
+
.arrivalTime=${x?.time}
|
|
334
|
+
.departureWalk=${S}
|
|
335
|
+
.arrivalWalk=${H}
|
|
373
336
|
?disable-animation=${this.disableAnimation}
|
|
374
337
|
?a11y-footpath=${this.a11yFootpath}
|
|
375
338
|
.now=${this.now}
|
|
376
339
|
></sbb-pearl-chain-time>
|
|
377
340
|
<div class="sbb-timetable__row-footer" role="gridcell">
|
|
378
|
-
${
|
|
379
|
-
class=${
|
|
341
|
+
${d && $?.quayFormatted ? c`<span
|
|
342
|
+
class=${$?.quayChanged ? "sbb-timetable__row-quay--changed" : h}
|
|
380
343
|
>
|
|
381
344
|
<span class="sbb-screen-reader-only">
|
|
382
|
-
${`${
|
|
345
|
+
${`${Ie[this._language.current]} ${$?.quayChanged ? De[this._language.current] : ""}`}
|
|
383
346
|
|
|
384
347
|
</span>
|
|
385
|
-
${this._renderQuayType()} ${
|
|
386
|
-
</span>` :
|
|
387
|
-
${
|
|
388
|
-
.firstClassOccupancy=${
|
|
389
|
-
.secondClassOccupancy=${
|
|
390
|
-
></sbb-timetable-occupancy>` :
|
|
391
|
-
${
|
|
392
|
-
${
|
|
393
|
-
var Y, X;
|
|
394
|
-
return ee < 4 ? m`<li>
|
|
348
|
+
${this._renderQuayType()} ${$?.quayFormatted}
|
|
349
|
+
</span>` : h}
|
|
350
|
+
${p?.firstClass && p?.firstClass !== "UNKNOWN" || p?.secondClass && p.secondClass !== "UNKNOWN" ? c`<sbb-timetable-occupancy
|
|
351
|
+
.firstClassOccupancy=${p?.firstClass?.toLowerCase()}
|
|
352
|
+
.secondClassOccupancy=${p?.secondClass?.toLowerCase()}
|
|
353
|
+
></sbb-timetable-occupancy>` : h}
|
|
354
|
+
${A && A.length || this.boarding ? c`<ul class="sbb-timetable__row-hints" role="list">
|
|
355
|
+
${A?.map((U, Q) => Q < 4 ? c`<li>
|
|
395
356
|
<sbb-icon
|
|
396
357
|
class="sbb-travel-hints__item"
|
|
397
|
-
name=${"sa-" +
|
|
358
|
+
name=${"sa-" + U.name?.toLowerCase()}
|
|
398
359
|
></sbb-icon>
|
|
399
|
-
<span class="sbb-screen-reader-only">${
|
|
400
|
-
</li>` :
|
|
401
|
-
|
|
402
|
-
${this.boarding ? m`<li>
|
|
360
|
+
<span class="sbb-screen-reader-only">${U.text?.template}</span>
|
|
361
|
+
</li>` : h)}
|
|
362
|
+
${this.boarding ? c`<li>
|
|
403
363
|
<sbb-icon
|
|
404
364
|
class="sbb-travel-hints__item"
|
|
405
|
-
name=${
|
|
406
|
-
aria-label=${
|
|
365
|
+
name=${this.boarding?.name}
|
|
366
|
+
aria-label=${this.boarding?.text}
|
|
407
367
|
aria-hidden="false"
|
|
408
368
|
></sbb-icon>
|
|
409
|
-
</li>` :
|
|
410
|
-
</ul>` :
|
|
411
|
-
${
|
|
369
|
+
</li>` : h}
|
|
370
|
+
</ul>` : h}
|
|
371
|
+
${T && T > 0 ? c`<time>
|
|
412
372
|
<span class="sbb-screen-reader-only">
|
|
413
|
-
${`${
|
|
373
|
+
${`${Pe[this._language.current]} ${B.long}`}
|
|
414
374
|
</span>
|
|
415
|
-
<span aria-hidden="true">${
|
|
416
|
-
</time>` :
|
|
417
|
-
${q && (
|
|
418
|
-
<sbb-icon name=${(
|
|
419
|
-
<span class="sbb-screen-reader-only">${(
|
|
420
|
-
</span>` :
|
|
375
|
+
<span aria-hidden="true">${B.short}</span>
|
|
376
|
+
</time>` : h}
|
|
377
|
+
${q && (m.cus || m.him) ? c`<span class="sbb-timetable__row-warning">
|
|
378
|
+
<sbb-icon name=${(m.cus || m.him).name}></sbb-icon>
|
|
379
|
+
<span class="sbb-screen-reader-only">${(m.cus || m.him).text}</span>
|
|
380
|
+
</span>` : h}
|
|
421
381
|
</div>
|
|
422
382
|
</div>
|
|
423
383
|
</sbb-card>
|
|
424
384
|
`;
|
|
425
385
|
}
|
|
426
|
-
},
|
|
427
|
-
const a = typeof Symbol == "function" && Symbol.metadata ? Object.create(
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
} }, metadata: a },
|
|
431
|
-
|
|
432
|
-
} }, metadata: a },
|
|
433
|
-
|
|
434
|
-
} }, metadata: a },
|
|
435
|
-
|
|
436
|
-
} }, metadata: a },
|
|
437
|
-
|
|
438
|
-
} }, metadata: a },
|
|
439
|
-
|
|
440
|
-
} }, metadata: a },
|
|
441
|
-
|
|
442
|
-
} }, metadata: a },
|
|
443
|
-
|
|
444
|
-
} }, metadata: a },
|
|
445
|
-
|
|
446
|
-
} }, metadata: a },
|
|
447
|
-
|
|
448
|
-
} }, metadata: a },
|
|
449
|
-
|
|
450
|
-
} }, metadata: a }, null,
|
|
451
|
-
})(),
|
|
386
|
+
}, z = new WeakMap(), I = new WeakMap(), L = new WeakMap(), R = new WeakMap(), M = new WeakMap(), E = new WeakMap(), O = new WeakMap(), P = new WeakMap(), D = new WeakMap(), F = new WeakMap(), n = b, (() => {
|
|
387
|
+
const a = typeof Symbol == "function" && Symbol.metadata ? Object.create(u[Symbol.metadata] ?? null) : void 0;
|
|
388
|
+
C = [v({ type: Object })], G = [v({ type: Object })], te = [k(), v({ attribute: "disable-animation", reflect: !0, type: Boolean })], se = [v({ type: Object })], oe = [k(), v({ attribute: "loading-trip", type: Boolean })], be = [k(), v({ attribute: "a11y-footpath", type: Boolean })], ue = [k(), v({ attribute: "loading-price", type: Boolean })], me = [k(), v({ attribute: "card-action-label" })], ye = [k(), v({ attribute: "accessibility-expanded", type: Boolean })], we = [k(), v({ type: Boolean })], Ae = [v()], _(b, null, C, { kind: "accessor", name: "trip", static: !1, private: !1, access: { has: (e) => "trip" in e, get: (e) => e.trip, set: (e, r) => {
|
|
389
|
+
e.trip = r;
|
|
390
|
+
} }, metadata: a }, X, Z), _(b, null, G, { kind: "accessor", name: "price", static: !1, private: !1, access: { has: (e) => "price" in e, get: (e) => e.price, set: (e, r) => {
|
|
391
|
+
e.price = r;
|
|
392
|
+
} }, metadata: a }, V, ee), _(b, null, te, { kind: "accessor", name: "disableAnimation", static: !1, private: !1, access: { has: (e) => "disableAnimation" in e, get: (e) => e.disableAnimation, set: (e, r) => {
|
|
393
|
+
e.disableAnimation = r;
|
|
394
|
+
} }, metadata: a }, ae, ie), _(b, null, se, { kind: "accessor", name: "boarding", static: !1, private: !1, access: { has: (e) => "boarding" in e, get: (e) => e.boarding, set: (e, r) => {
|
|
395
|
+
e.boarding = r;
|
|
396
|
+
} }, metadata: a }, re, ne), _(b, null, oe, { kind: "accessor", name: "loadingTrip", static: !1, private: !1, access: { has: (e) => "loadingTrip" in e, get: (e) => e.loadingTrip, set: (e, r) => {
|
|
397
|
+
e.loadingTrip = r;
|
|
398
|
+
} }, metadata: a }, le, ce), _(b, null, be, { kind: "accessor", name: "a11yFootpath", static: !1, private: !1, access: { has: (e) => "a11yFootpath" in e, get: (e) => e.a11yFootpath, set: (e, r) => {
|
|
399
|
+
e.a11yFootpath = r;
|
|
400
|
+
} }, metadata: a }, de, he), _(b, null, ue, { kind: "accessor", name: "loadingPrice", static: !1, private: !1, access: { has: (e) => "loadingPrice" in e, get: (e) => e.loadingPrice, set: (e, r) => {
|
|
401
|
+
e.loadingPrice = r;
|
|
402
|
+
} }, metadata: a }, pe, ge), _(b, null, me, { kind: "accessor", name: "cardActionLabel", static: !1, private: !1, access: { has: (e) => "cardActionLabel" in e, get: (e) => e.cardActionLabel, set: (e, r) => {
|
|
403
|
+
e.cardActionLabel = r;
|
|
404
|
+
} }, metadata: a }, _e, fe), _(b, null, ye, { kind: "accessor", name: "accessibilityExpanded", static: !1, private: !1, access: { has: (e) => "accessibilityExpanded" in e, get: (e) => e.accessibilityExpanded, set: (e, r) => {
|
|
405
|
+
e.accessibilityExpanded = r;
|
|
406
|
+
} }, metadata: a }, ve, xe), _(b, null, we, { kind: "accessor", name: "active", static: !1, private: !1, access: { has: (e) => "active" in e, get: (e) => e.active, set: (e, r) => {
|
|
407
|
+
e.active = r;
|
|
408
|
+
} }, metadata: a }, $e, Te), _(b, null, Ae, { kind: "setter", name: "now", static: !1, private: !1, access: { has: (e) => "now" in e, set: (e, r) => {
|
|
409
|
+
e.now = r;
|
|
410
|
+
} }, metadata: a }, null, g), _(null, i = { value: n }, t, { kind: "class", name: n.name, metadata: a }, null, s), n = i.value, a && Object.defineProperty(n, Symbol.metadata, { enumerable: !0, configurable: !0, writable: !0, value: a });
|
|
411
|
+
})(), b.styles = ft, o(n, s), n;
|
|
452
412
|
})();
|
|
453
413
|
export {
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
414
|
+
jt as SbbTimetableRowElement,
|
|
415
|
+
Ct as filterNotices,
|
|
416
|
+
Tt as getCus,
|
|
417
|
+
$t as getHimIcon,
|
|
418
|
+
Y as handleNotices,
|
|
419
|
+
yt as renderIconProduct,
|
|
420
|
+
vt as renderStringProduct,
|
|
421
|
+
wt as sortSituation
|
|
462
422
|
};
|