@sbb-esta/lyne-elements-experimental 3.12.1 → 4.0.0-next
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/development/journey-summary/journey-summary.component.d.ts.map +1 -1
- package/development/journey-summary/journey-summary.component.js +4 -9
- package/development/pearl-chain/pearl-chain.component.d.ts.map +1 -1
- package/development/pearl-chain/pearl-chain.component.js +4 -9
- package/development/pearl-chain-time/pearl-chain-time.component.d.ts.map +1 -1
- package/development/pearl-chain-time/pearl-chain-time.component.js +5 -10
- package/development/pearl-chain-vertical/pearl-chain-vertical.component.d.ts.map +1 -1
- package/development/pearl-chain-vertical/pearl-chain-vertical.component.js +4 -9
- package/development/pearl-chain-vertical-item/pearl-chain-vertical-item.component.d.ts.map +1 -1
- package/development/pearl-chain-vertical-item/pearl-chain-vertical-item.component.js +4 -10
- package/development/seat-reservation/seat-reservation/seat-reservation.component.d.ts.map +1 -1
- package/development/seat-reservation/seat-reservation/seat-reservation.component.js +4 -9
- package/development/seat-reservation/seat-reservation-area/seat-reservation-area.component.d.ts.map +1 -1
- package/development/seat-reservation/seat-reservation-area/seat-reservation-area.component.js +5 -10
- package/development/seat-reservation/seat-reservation-graphic/seat-reservation-graphic.component.d.ts.map +1 -1
- package/development/seat-reservation/seat-reservation-graphic/seat-reservation-graphic.component.js +5 -10
- 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 +5 -10
- package/development/seat-reservation/seat-reservation-navigation-services/seat-reservation-navigation-services.component.d.ts.map +1 -1
- package/development/seat-reservation/seat-reservation-navigation-services/seat-reservation-navigation-services.component.js +4 -9
- 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 -10
- package/development/seat-reservation/seat-reservation-scoped/seat-reservation-scoped.component.d.ts.map +1 -1
- package/development/seat-reservation/seat-reservation-scoped/seat-reservation-scoped.component.js +4 -9
- package/development/timetable-duration/timetable-duration.component.d.ts.map +1 -1
- package/development/timetable-duration/timetable-duration.component.js +4 -9
- package/development/timetable-row/timetable-row.component.d.ts.map +1 -1
- package/development/timetable-row/timetable-row.component.js +5 -10
- package/journey-summary/journey-summary.component.d.ts.map +1 -1
- package/journey-summary/journey-summary.component.js +29 -28
- package/package.json +2 -2
- package/pearl-chain/pearl-chain.component.d.ts.map +1 -1
- package/pearl-chain/pearl-chain.component.js +12 -11
- package/pearl-chain-time/pearl-chain-time.component.d.ts.map +1 -1
- package/pearl-chain-time/pearl-chain-time.component.js +13 -12
- package/pearl-chain-vertical/pearl-chain-vertical.component.d.ts.map +1 -1
- package/pearl-chain-vertical/pearl-chain-vertical.component.js +11 -10
- package/pearl-chain-vertical-item/pearl-chain-vertical-item.component.d.ts.map +1 -1
- package/pearl-chain-vertical-item/pearl-chain-vertical-item.component.js +15 -14
- package/seat-reservation/seat-reservation/seat-reservation.component.d.ts.map +1 -1
- package/seat-reservation/seat-reservation/seat-reservation.component.js +9 -8
- package/seat-reservation/seat-reservation-area/seat-reservation-area.component.d.ts.map +1 -1
- package/seat-reservation/seat-reservation-area/seat-reservation-area.component.js +14 -13
- package/seat-reservation/seat-reservation-graphic/seat-reservation-graphic.component.d.ts.map +1 -1
- package/seat-reservation/seat-reservation-graphic/seat-reservation-graphic.component.js +18 -17
- package/seat-reservation/seat-reservation-navigation-coach/seat-reservation-navigation-coach.component.d.ts.map +1 -1
- package/seat-reservation/seat-reservation-navigation-coach/seat-reservation-navigation-coach.component.js +8 -7
- package/seat-reservation/seat-reservation-navigation-services/seat-reservation-navigation-services.component.d.ts.map +1 -1
- package/seat-reservation/seat-reservation-navigation-services/seat-reservation-navigation-services.component.js +24 -23
- 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 +19 -18
- package/seat-reservation/seat-reservation-scoped/seat-reservation-scoped.component.d.ts.map +1 -1
- package/seat-reservation/seat-reservation-scoped/seat-reservation-scoped.component.js +9 -8
- package/timetable-duration/timetable-duration.component.d.ts.map +1 -1
- package/timetable-duration/timetable-duration.component.js +13 -12
- package/timetable-row/timetable-row.component.d.ts.map +1 -1
- package/timetable-row/timetable-row.component.js +58 -57
|
@@ -8,25 +8,26 @@ import { SbbLanguageController as nt } from "@sbb-esta/lyne-elements/core/contro
|
|
|
8
8
|
import { defaultDateAdapter as ze } from "@sbb-esta/lyne-elements/core/datetime.js";
|
|
9
9
|
import { forceType as N } from "@sbb-esta/lyne-elements/core/decorators.js";
|
|
10
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 gt, i18nTripDuration as Pe, i18nNew as De, i18nTripQuayChange as
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
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 gt, i18nTripDuration as Pe, i18nNew as De, i18nTripQuayChange as pt } from "@sbb-esta/lyne-elements/core/i18n.js";
|
|
12
|
+
import { boxSizingStyles as ut } from "@sbb-esta/lyne-elements/core/styles.js";
|
|
13
|
+
import { css as ht, LitElement as mt, nothing as g, html as c } from "lit";
|
|
14
|
+
import { customElement as _t, property as v } from "lit/decorators.js";
|
|
14
15
|
import { removeTimezoneFromISOTimeString as Fe, durationToTime as qe } from "../core/datetime.js";
|
|
15
|
-
import { isRideLeg as Je, getDepartureArrivalTimeAttribute as
|
|
16
|
+
import { isRideLeg as Je, getDepartureArrivalTimeAttribute as ft } from "../core/timetable.js";
|
|
16
17
|
import "@sbb-esta/lyne-elements/card.js";
|
|
17
18
|
import "@sbb-esta/lyne-elements/icon.js";
|
|
18
19
|
import "@sbb-esta/lyne-elements/timetable-occupancy.js";
|
|
19
20
|
import "../pearl-chain-time.js";
|
|
20
21
|
import { f as Be } from "../format-lqeCzmzS.js";
|
|
21
|
-
const
|
|
22
|
+
const yt = ht`: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-path: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-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-border-radius-4x);transform:skew(16deg);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)}}`, vt = (t, i) => c`<span class="sbb-timetable__row-transport">
|
|
22
23
|
<sbb-icon name=${t}></sbb-icon>
|
|
23
24
|
<span class="sbb-screen-reader-only">${i}</span>
|
|
24
|
-
</span>`,
|
|
25
|
+
</span>`, xt = (t, i) => {
|
|
25
26
|
const s = ["M", "B", "T"].includes(t) ? " " : "";
|
|
26
27
|
return c`<span class="sbb-timetable__row-transportnumber">
|
|
27
28
|
${i !== null ? t + s + i : t}
|
|
28
29
|
</span>`;
|
|
29
|
-
}, Ue = (t) => t?.find((i) => i.serviceJourney?.serviceAlteration?.reachableText)?.serviceJourney?.serviceAlteration?.reachableText,
|
|
30
|
+
}, Ue = (t) => t?.find((i) => i.serviceJourney?.serviceAlteration?.reachableText)?.serviceJourney?.serviceAlteration?.reachableText, wt = (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, $t = (t) => {
|
|
30
31
|
const i = {
|
|
31
32
|
DISTURBANCE: 0,
|
|
32
33
|
INFORMATION: 1,
|
|
@@ -36,7 +37,7 @@ const ft = ht`*,:before,:after{box-sizing:border-box}:host{--sbb-timetable-row-g
|
|
|
36
37
|
END_MESSAGE: 5
|
|
37
38
|
};
|
|
38
39
|
return [...t].sort((s, n) => i[s.cause] - i[n.cause]);
|
|
39
|
-
},
|
|
40
|
+
}, Tt = (t) => {
|
|
40
41
|
switch (t?.cause) {
|
|
41
42
|
case "DISTURBANCE":
|
|
42
43
|
return {
|
|
@@ -69,29 +70,29 @@ const ft = ht`*,:before,:after{box-sizing:border-box}:host{--sbb-timetable-row-g
|
|
|
69
70
|
text: t?.broadcastMessages.length ? t?.broadcastMessages[0].title : ""
|
|
70
71
|
};
|
|
71
72
|
}
|
|
72
|
-
},
|
|
73
|
-
const { summary: s, legs: n } = t || {},
|
|
74
|
-
if (
|
|
75
|
-
return { name: "cancellation", text:
|
|
76
|
-
if (Ue(
|
|
77
|
-
return { name: "missed-connection", text: Ue(
|
|
78
|
-
if (
|
|
79
|
-
return { name: "alternative", text:
|
|
80
|
-
if (We(
|
|
81
|
-
return { name: "reroute", text: We(
|
|
82
|
-
if (je(
|
|
83
|
-
return { name: "add-stop", text: je(
|
|
84
|
-
if (
|
|
85
|
-
return { name: "delay", text:
|
|
86
|
-
if (
|
|
87
|
-
const
|
|
73
|
+
}, At = (t, i) => {
|
|
74
|
+
const { summary: s, legs: n } = t || {}, p = n?.filter((S) => Je(S)), { tripStatus: h } = s || {};
|
|
75
|
+
if (h?.cancelled || h?.partiallyCancelled)
|
|
76
|
+
return { name: "cancellation", text: h?.cancelledText };
|
|
77
|
+
if (Ue(p))
|
|
78
|
+
return { name: "missed-connection", text: Ue(p) };
|
|
79
|
+
if (h?.alternative)
|
|
80
|
+
return { name: "alternative", text: h.alternativeText };
|
|
81
|
+
if (We(p))
|
|
82
|
+
return { name: "reroute", text: We(p) };
|
|
83
|
+
if (je(p))
|
|
84
|
+
return { name: "add-stop", text: je(p) };
|
|
85
|
+
if (h?.delayed || h?.delayedUnknown)
|
|
86
|
+
return { name: "delay", text: wt(p) };
|
|
87
|
+
if (h?.quayChanged) {
|
|
88
|
+
const S = p[0].departure;
|
|
88
89
|
return {
|
|
89
90
|
name: "platform-change",
|
|
90
|
-
text:
|
|
91
|
+
text: S.quayChanged ? S.quayChangedText : pt[i]
|
|
91
92
|
};
|
|
92
93
|
}
|
|
93
94
|
return {};
|
|
94
|
-
},
|
|
95
|
+
}, St = (t) => {
|
|
95
96
|
const i = ["RR", "RK", "RC", "RL", "RM", "RS", "RU", "XP", "XR", "XT"];
|
|
96
97
|
return t.reduce((s, n) => {
|
|
97
98
|
if (s)
|
|
@@ -101,15 +102,15 @@ const ft = ht`*,:before,:after{box-sizing:border-box}:host{--sbb-timetable-row-g
|
|
|
101
102
|
}, void 0);
|
|
102
103
|
}, Ct = (t) => {
|
|
103
104
|
const i = ["Z", "SB", "SZ", "VR", "TG"];
|
|
104
|
-
return t.filter((n,
|
|
105
|
+
return t.filter((n, p) => t.findIndex((h) => h.name === n.name) === p).filter((n) => i.includes(n.name)).sort((n, p) => i.indexOf(n.name) - i.indexOf(p.name));
|
|
105
106
|
}, Y = (t) => {
|
|
106
|
-
const i =
|
|
107
|
+
const i = St(t), s = Ct(t);
|
|
107
108
|
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];
|
|
108
109
|
};
|
|
109
|
-
let
|
|
110
|
+
let Ht = (() => {
|
|
110
111
|
var z, I, L, R, M, E, O, P, D, F, b;
|
|
111
|
-
let t = [
|
|
112
|
-
return b = class extends
|
|
112
|
+
let t = [_t("sbb-timetable-row")], i, s = [], n, p = mt, h = [], S, X = [], Z = [], G, V = [], ee = [], te, ae = [], ie = [], se, re = [], ne = [], oe, le = [], ce = [], be, de = [], ge = [], pe, ue = [], he = [], me, _e = [], fe = [], ye, ve = [], xe = [], we, $e = [], Te = [], Ae;
|
|
113
|
+
return b = class extends p {
|
|
113
114
|
constructor() {
|
|
114
115
|
super(...arguments);
|
|
115
116
|
y(this, z);
|
|
@@ -122,7 +123,7 @@ let jt = (() => {
|
|
|
122
123
|
y(this, P);
|
|
123
124
|
y(this, D);
|
|
124
125
|
y(this, F);
|
|
125
|
-
l(this, z, (o(this,
|
|
126
|
+
l(this, z, (o(this, h), 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, ge), o(this, ue, !1))), l(this, P, (o(this, he), 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);
|
|
126
127
|
}
|
|
127
128
|
/** The trip Prop. */
|
|
128
129
|
get trip() {
|
|
@@ -260,17 +261,17 @@ let jt = (() => {
|
|
|
260
261
|
`;
|
|
261
262
|
}
|
|
262
263
|
_handleHimCus(a) {
|
|
263
|
-
const { situations: e } = a || {}, r = e &&
|
|
264
|
+
const { situations: e } = a || {}, r = e && $t(e), w = At(a, this._language.current);
|
|
264
265
|
return {
|
|
265
266
|
cus: Object.keys(w)?.length ? w : null,
|
|
266
|
-
him: e?.length ?
|
|
267
|
+
him: e?.length ? Tt(r[0]) : null
|
|
267
268
|
};
|
|
268
269
|
}
|
|
269
270
|
_getAccessibilityText(a) {
|
|
270
|
-
const { summary: e, legs: r, notices: w } = a || {}, { departureWalk: d, arrivalWalk: W, departure:
|
|
271
|
+
const { summary: e, legs: r, notices: w } = a || {}, { departureWalk: d, arrivalWalk: W, departure: C, arrival: $, product: x, direction: H, occupancy: u, duration: T } = e || {}, { departureTimeAttribute: m, arrivalTimeAttribute: q } = ft(r, d || 0, W || 0, this._language.current, this.a11yFootpath), A = this._getRideLegs(), B = C?.time ? Fe(C.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 = () => C?.quayFormatted ? `${C?.quayChanged ? `${De[this._language.current]} ` : ""}${this._getQuayTypeStrings()?.long} ${C?.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), Se = 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")}, ` : "";
|
|
271
272
|
let K = "";
|
|
272
|
-
|
|
273
|
-
const
|
|
273
|
+
u && (u.firstClass && u.firstClass !== "UNKNOWN" && (K += `${Ee.first[this._language.current]} ${Oe[u.firstClass.toLowerCase()]?.[this._language.current]}.`), u.secondClass && u.secondClass !== "UNKNOWN" && (K += ` ${Ee.second[this._language.current]} ${Oe[u.secondClass.toLowerCase()]?.[this._language.current]}.`));
|
|
274
|
+
const Ce = w && Y(w).length && Y(w)?.map((k, rt) => rt < 4 && k.text?.template).join(", ") + ", ", it = Ce ? `${gt[this._language.current]}: ${Ce}` : "", st = T && T > 0 ? `${Pe[this._language.current]} ${qe(T, this._language.current).long}, ` : "";
|
|
274
275
|
return [
|
|
275
276
|
Q,
|
|
276
277
|
Qe,
|
|
@@ -278,10 +279,10 @@ let jt = (() => {
|
|
|
278
279
|
Ye,
|
|
279
280
|
Xe,
|
|
280
281
|
Ze,
|
|
281
|
-
|
|
282
|
+
Se,
|
|
282
283
|
Ve,
|
|
283
284
|
et,
|
|
284
|
-
|
|
285
|
+
Se ? "" : Ge,
|
|
285
286
|
at,
|
|
286
287
|
He,
|
|
287
288
|
st,
|
|
@@ -293,7 +294,7 @@ let jt = (() => {
|
|
|
293
294
|
render() {
|
|
294
295
|
if (this.loadingTrip)
|
|
295
296
|
return this._renderSkeleton();
|
|
296
|
-
const { legs: a, id: e, notices: r, summary: w } = this.trip || {}, { product: d, direction: W, departureWalk:
|
|
297
|
+
const { legs: a, id: e, notices: r, summary: w } = this.trip || {}, { product: d, direction: W, departureWalk: C, departure: $, arrival: x, arrivalWalk: H, occupancy: u, 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;
|
|
297
298
|
return c`
|
|
298
299
|
<sbb-card size="l" id=${e}>
|
|
299
300
|
<sbb-card-button
|
|
@@ -325,7 +326,7 @@ let jt = (() => {
|
|
|
325
326
|
|
|
326
327
|
</span>
|
|
327
328
|
</span>`}
|
|
328
|
-
${d && (d.corporateIdentityIcon ?
|
|
329
|
+
${d && (d.corporateIdentityIcon ? vt(d.corporateIdentityIcon, d.name) : d.vehicleSubModeShortName && xt(d.vehicleSubModeShortName, d?.line))}
|
|
329
330
|
</div>
|
|
330
331
|
${W ? c`<p>${`${Le[this._language.current]} ${W}`}</p>` : g}
|
|
331
332
|
</div>
|
|
@@ -334,7 +335,7 @@ let jt = (() => {
|
|
|
334
335
|
.legs=${a}
|
|
335
336
|
.departureTime=${$?.time}
|
|
336
337
|
.arrivalTime=${x?.time}
|
|
337
|
-
.departureWalk=${
|
|
338
|
+
.departureWalk=${C}
|
|
338
339
|
.arrivalWalk=${H}
|
|
339
340
|
?disable-animation=${this.disableAnimation}
|
|
340
341
|
?a11y-footpath=${this.a11yFootpath}
|
|
@@ -350,9 +351,9 @@ let jt = (() => {
|
|
|
350
351
|
</span>
|
|
351
352
|
${this._renderQuayType()} ${$?.quayFormatted}
|
|
352
353
|
</span>` : g}
|
|
353
|
-
${
|
|
354
|
-
.firstClassOccupancy=${
|
|
355
|
-
.secondClassOccupancy=${
|
|
354
|
+
${u?.firstClass && u?.firstClass !== "UNKNOWN" || u?.secondClass && u.secondClass !== "UNKNOWN" ? c`<sbb-timetable-occupancy
|
|
355
|
+
.firstClassOccupancy=${u?.firstClass?.toLowerCase()}
|
|
356
|
+
.secondClassOccupancy=${u?.secondClass?.toLowerCase()}
|
|
356
357
|
></sbb-timetable-occupancy>` : g}
|
|
357
358
|
${A && A.length || this.boarding ? c`<ul class="sbb-timetable__row-hints" role="list">
|
|
358
359
|
${A?.map((U, Q) => Q < 4 ? c`<li>
|
|
@@ -387,8 +388,8 @@ let jt = (() => {
|
|
|
387
388
|
`;
|
|
388
389
|
}
|
|
389
390
|
}, 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, (() => {
|
|
390
|
-
const a = typeof Symbol == "function" && Symbol.metadata ? Object.create(
|
|
391
|
-
|
|
391
|
+
const a = typeof Symbol == "function" && Symbol.metadata ? Object.create(p[Symbol.metadata] ?? null) : void 0;
|
|
392
|
+
S = [v({ type: Object })], G = [v({ type: Object })], te = [N(), v({ attribute: "disable-animation", reflect: !0, type: Boolean })], se = [v({ type: Object })], oe = [N(), v({ attribute: "loading-trip", type: Boolean })], be = [N(), v({ attribute: "a11y-footpath", type: Boolean })], pe = [N(), v({ attribute: "loading-price", type: Boolean })], me = [N(), v({ attribute: "card-action-label" })], ye = [N(), v({ attribute: "accessibility-expanded", type: Boolean })], we = [N(), v({ type: Boolean })], Ae = [v()], _(b, null, S, { kind: "accessor", name: "trip", static: !1, private: !1, access: { has: (e) => "trip" in e, get: (e) => e.trip, set: (e, r) => {
|
|
392
393
|
e.trip = r;
|
|
393
394
|
} }, 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) => {
|
|
394
395
|
e.price = r;
|
|
@@ -400,9 +401,9 @@ let jt = (() => {
|
|
|
400
401
|
e.loadingTrip = r;
|
|
401
402
|
} }, 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) => {
|
|
402
403
|
e.a11yFootpath = r;
|
|
403
|
-
} }, metadata: a }, de, ge), _(b, null,
|
|
404
|
+
} }, metadata: a }, de, ge), _(b, null, pe, { kind: "accessor", name: "loadingPrice", static: !1, private: !1, access: { has: (e) => "loadingPrice" in e, get: (e) => e.loadingPrice, set: (e, r) => {
|
|
404
405
|
e.loadingPrice = r;
|
|
405
|
-
} }, metadata: a },
|
|
406
|
+
} }, metadata: a }, ue, he), _(b, null, me, { kind: "accessor", name: "cardActionLabel", static: !1, private: !1, access: { has: (e) => "cardActionLabel" in e, get: (e) => e.cardActionLabel, set: (e, r) => {
|
|
406
407
|
e.cardActionLabel = r;
|
|
407
408
|
} }, 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) => {
|
|
408
409
|
e.accessibilityExpanded = r;
|
|
@@ -410,16 +411,16 @@ let jt = (() => {
|
|
|
410
411
|
e.active = r;
|
|
411
412
|
} }, metadata: a }, $e, Te), _(b, null, Ae, { kind: "setter", name: "now", static: !1, private: !1, access: { has: (e) => "now" in e, set: (e, r) => {
|
|
412
413
|
e.now = r;
|
|
413
|
-
} }, metadata: a }, null,
|
|
414
|
-
})(), b.styles =
|
|
414
|
+
} }, metadata: a }, null, h), _(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 });
|
|
415
|
+
})(), b.styles = [ut, yt], o(n, s), n;
|
|
415
416
|
})();
|
|
416
417
|
export {
|
|
417
|
-
|
|
418
|
+
Ht as SbbTimetableRowElement,
|
|
418
419
|
Ct as filterNotices,
|
|
419
|
-
|
|
420
|
-
|
|
420
|
+
At as getCus,
|
|
421
|
+
Tt as getHimIcon,
|
|
421
422
|
Y as handleNotices,
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
423
|
+
vt as renderIconProduct,
|
|
424
|
+
xt as renderStringProduct,
|
|
425
|
+
$t as sortSituation
|
|
425
426
|
};
|