@sbb-esta/lyne-elements-experimental-dev 5.0.0-next.3-dev.1779268564 → 5.0.0-next.3-dev.1779280410
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/autocomplete-grid/autocomplete-grid-button/autocomplete-grid-button.component.js +42 -66
- 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/journey-summary/journey-summary.component.js +1 -1
- package/development/{journey-summary.component-De1ioDRq.js → journey-summary.component-Bjf9cIpR.js} +2 -2
- package/development/journey-summary.js +1 -1
- package/development/journey-summary.pure.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-y-YnuSnn.js} +2 -2
- package/development/pearl-chain-time.js +1 -1
- package/development/pearl-chain-time.pure.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-zo48V6sO.js} +2 -2
- package/development/pearl-chain-vertical-item.js +1 -1
- package/development/pearl-chain-vertical-item.pure.js +1 -1
- package/development/{pearl-chain.component-EEAZ7Kol.js → pearl-chain.component-CO4eTDeD.js} +2 -2
- package/development/pearl-chain.js +1 -1
- package/development/pearl-chain.pure.js +1 -1
- package/development/seat-reservation/seat-reservation/seat-reservation-base-element.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.js +1 -1
- 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.js +1 -1
- package/development/{seat-reservation-area.component-CMqjbUtV.js → seat-reservation-area.component-BiUbY2fJ.js} +2 -2
- package/development/{seat-reservation-graphic.component-C2r57590.js → seat-reservation-graphic.component-sXZS5AQ-.js} +2 -2
- package/development/{seat-reservation-navigation-coach.component-CMm-2Vuc.js → seat-reservation-navigation-coach.component-n9HVhAW1.js} +2 -2
- package/development/{seat-reservation-navigation-services.component-Do8JLJh3.js → seat-reservation-navigation-services.component-C_DDizl4.js} +2 -2
- package/development/{seat-reservation-place-control.component-Dfxv9B6C.js → seat-reservation-place-control.component-CEYulcPi.js} +2 -2
- package/development/seat-reservation.js +5 -5
- package/development/seat-reservation.pure.js +5 -5
- package/development/timetable-duration/timetable-duration.component.js +1 -1
- package/development/{timetable-duration.component-fBla8Kue.js → timetable-duration.component-QutPySyE.js} +2 -2
- package/development/timetable-duration.js +1 -1
- package/development/timetable-duration.pure.js +1 -1
- package/development/timetable-row/timetable-row.component.js +1 -1
- package/development/{timetable-row.component-CTShHdLn.js → timetable-row.component-2GBdtFiF.js} +2 -2
- package/development/timetable-row.js +1 -1
- package/development/timetable-row.pure.js +1 -1
- package/journey-summary/journey-summary.component.js +1 -1
- package/{journey-summary.component-CkDRawn9.js → journey-summary.component-Bbx7WYGU.js} +39 -39
- package/journey-summary.js +1 -1
- package/journey-summary.pure.js +1 -1
- package/package.json +2 -2
- 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-BDkOrxQ3.js} +32 -32
- package/pearl-chain-time.js +1 -1
- package/pearl-chain-time.pure.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-an8iT9Ao.js} +24 -24
- package/pearl-chain-vertical-item.js +1 -1
- package/pearl-chain-vertical-item.pure.js +1 -1
- package/{pearl-chain.component-C6lcD7Xl.js → pearl-chain.component-DYzhEgWG.js} +24 -24
- package/pearl-chain.js +1 -1
- package/pearl-chain.pure.js +1 -1
- package/seat-reservation/seat-reservation/seat-reservation-base-element.js +58 -58
- 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 +1 -1
- 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 +1 -1
- package/{seat-reservation-area.component-BcmwKJSK.js → seat-reservation-area.component-B8HJ-Or8.js} +16 -16
- package/{seat-reservation-graphic.component-C3wc4DKr.js → seat-reservation-graphic.component-Ddpuv-Aw.js} +20 -20
- package/{seat-reservation-navigation-coach.component-Cwxd9vLy.js → seat-reservation-navigation-coach.component-DMKlwxPa.js} +45 -45
- package/{seat-reservation-navigation-services.component-CfAQa7pa.js → seat-reservation-navigation-services.component-2os7VI7i.js} +21 -21
- package/{seat-reservation-place-control.component-CE-FrGMT.js → seat-reservation-place-control.component-CvGYSTnc.js} +38 -38
- package/seat-reservation.js +5 -5
- package/seat-reservation.pure.js +5 -5
- package/timetable-duration/timetable-duration.component.js +1 -1
- package/timetable-duration.component-DHuPMaq5.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-DawXp2ut.js → timetable-row.component-DMiay4xK.js} +117 -117
- package/timetable-row.js +1 -1
- package/timetable-row.pure.js +1 -1
- package/timetable-duration.component-DPRcG1LP.js +0 -61
|
@@ -1,27 +1,27 @@
|
|
|
1
1
|
import { t as e } from "./format-DbUuNYFU.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import { property as
|
|
7
|
-
import { durationToTime as
|
|
8
|
-
import { SbbPearlChainTimeElement as
|
|
9
|
-
import { SbbCardBadgeElement as
|
|
10
|
-
import { SbbTimetableOccupancyElement as
|
|
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
11
|
//#region src/elements-experimental/timetable-row/timetable-row.scss?inline
|
|
12
|
-
var
|
|
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
13
|
<sbb-icon name=${e}></sbb-icon>
|
|
14
14
|
<span class="sbb-screen-reader-only">${t}</span>
|
|
15
|
-
</span>`,
|
|
15
|
+
</span>`, L = (e, t) => {
|
|
16
16
|
let n = [
|
|
17
17
|
"M",
|
|
18
18
|
"B",
|
|
19
19
|
"T"
|
|
20
20
|
].includes(e) ? " " : "";
|
|
21
|
-
return
|
|
21
|
+
return S`<span class="sbb-timetable__row-transportnumber">
|
|
22
22
|
${t === null ? e : e + n + t}
|
|
23
23
|
</span>`;
|
|
24
|
-
},
|
|
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
25
|
let t = {
|
|
26
26
|
DISTURBANCE: 0,
|
|
27
27
|
INFORMATION: 1,
|
|
@@ -31,7 +31,7 @@ var L = ":host{--sbb-timetable-row-gap: var(--sbb-spacing-fixed-2x);--sbb-timeta
|
|
|
31
31
|
END_MESSAGE: 5
|
|
32
32
|
};
|
|
33
33
|
return [...e]?.sort((e, n) => t[e.cause] - t[n.cause]);
|
|
34
|
-
},
|
|
34
|
+
}, U = (e) => {
|
|
35
35
|
switch (e?.cause) {
|
|
36
36
|
case "DISTURBANCE": return {
|
|
37
37
|
name: "disruption",
|
|
@@ -58,41 +58,41 @@ var L = ":host{--sbb-timetable-row-gap: var(--sbb-spacing-fixed-2x);--sbb-timeta
|
|
|
58
58
|
text: e?.broadcastMessages.length ? e?.broadcastMessages[0].title : ""
|
|
59
59
|
};
|
|
60
60
|
}
|
|
61
|
-
},
|
|
62
|
-
let { summary: n, legs: r } = e || {}, i = r?.filter((e) =>
|
|
61
|
+
}, W = (e, t) => {
|
|
62
|
+
let { summary: n, legs: r } = e || {}, i = r?.filter((e) => k(e)), { tripStatus: a } = n || {};
|
|
63
63
|
if (a?.cancelled || a?.partiallyCancelled) return {
|
|
64
64
|
name: "cancellation",
|
|
65
65
|
text: a?.cancelledText
|
|
66
66
|
};
|
|
67
|
-
if (
|
|
67
|
+
if (R(i)) return {
|
|
68
68
|
name: "missed-connection",
|
|
69
|
-
text:
|
|
69
|
+
text: R(i)
|
|
70
70
|
};
|
|
71
71
|
if (a?.alternative) return {
|
|
72
72
|
name: "alternative",
|
|
73
73
|
text: a.alternativeText
|
|
74
74
|
};
|
|
75
|
-
if (
|
|
75
|
+
if (B(i)) return {
|
|
76
76
|
name: "reroute",
|
|
77
|
-
text:
|
|
77
|
+
text: B(i)
|
|
78
78
|
};
|
|
79
|
-
if (
|
|
79
|
+
if (V(i)) return {
|
|
80
80
|
name: "add-stop",
|
|
81
|
-
text:
|
|
81
|
+
text: V(i)
|
|
82
82
|
};
|
|
83
83
|
if (a?.delayed || a?.delayedUnknown) return {
|
|
84
84
|
name: "delay",
|
|
85
|
-
text:
|
|
85
|
+
text: z(i)
|
|
86
86
|
};
|
|
87
87
|
if (a?.quayChanged) {
|
|
88
88
|
let e = i[0].departure;
|
|
89
89
|
return {
|
|
90
90
|
name: "platform-change",
|
|
91
|
-
text: e.quayChanged ? e.quayChangedText :
|
|
91
|
+
text: e.quayChanged ? e.quayChangedText : v[t]
|
|
92
92
|
};
|
|
93
93
|
}
|
|
94
94
|
return {};
|
|
95
|
-
},
|
|
95
|
+
}, G = (e) => {
|
|
96
96
|
let t = [
|
|
97
97
|
"RR",
|
|
98
98
|
"RK",
|
|
@@ -112,7 +112,7 @@ var L = ":host{--sbb-timetable-row-gap: var(--sbb-spacing-fixed-2x);--sbb-timeta
|
|
|
112
112
|
name: "RR"
|
|
113
113
|
};
|
|
114
114
|
}, void 0);
|
|
115
|
-
},
|
|
115
|
+
}, K = (e) => {
|
|
116
116
|
let t = [
|
|
117
117
|
"Z",
|
|
118
118
|
"SB",
|
|
@@ -121,38 +121,38 @@ var L = ":host{--sbb-timetable-row-gap: var(--sbb-spacing-fixed-2x);--sbb-timeta
|
|
|
121
121
|
"TG"
|
|
122
122
|
];
|
|
123
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
|
-
},
|
|
125
|
-
let t =
|
|
124
|
+
}, q = (e) => {
|
|
125
|
+
let t = G(e), n = K(e);
|
|
126
126
|
return t === void 0 ? n : n.length ? n[0].name === "Z" && n[1] ? [
|
|
127
127
|
n[0],
|
|
128
128
|
t,
|
|
129
129
|
n[1]
|
|
130
130
|
].concat(n.slice(2)) : [t, ...n] : [t];
|
|
131
|
-
},
|
|
132
|
-
let
|
|
133
|
-
return class extends
|
|
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
134
|
constructor() {
|
|
135
|
-
super(...arguments), this.#e = (
|
|
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
136
|
}
|
|
137
137
|
static {
|
|
138
|
-
let e = typeof Symbol == "function" && Symbol.metadata ? Object.create(
|
|
139
|
-
|
|
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
140
|
attribute: "disable-animation",
|
|
141
141
|
reflect: !0,
|
|
142
142
|
type: Boolean
|
|
143
|
-
})],
|
|
143
|
+
})], Q = [D({ type: Object })], ae = [i(), D({
|
|
144
144
|
attribute: "loading-trip",
|
|
145
145
|
type: Boolean
|
|
146
|
-
})],
|
|
146
|
+
})], ce = [i(), D({
|
|
147
147
|
attribute: "a11y-footpath",
|
|
148
148
|
type: Boolean
|
|
149
|
-
})],
|
|
149
|
+
})], de = [i(), D({
|
|
150
150
|
attribute: "loading-price",
|
|
151
151
|
type: Boolean
|
|
152
|
-
})], pe = [
|
|
152
|
+
})], pe = [i(), D({ attribute: "card-action-label" })], ge = [i(), D({
|
|
153
153
|
attribute: "accessibility-expanded",
|
|
154
154
|
type: Boolean
|
|
155
|
-
})], ye = [
|
|
155
|
+
})], ye = [i(), D({ type: Boolean })], Se = [D()], T(this, null, z, {
|
|
156
156
|
kind: "accessor",
|
|
157
157
|
name: "trip",
|
|
158
158
|
static: !1,
|
|
@@ -165,7 +165,7 @@ var L = ":host{--sbb-timetable-row-gap: var(--sbb-spacing-fixed-2x);--sbb-timeta
|
|
|
165
165
|
}
|
|
166
166
|
},
|
|
167
167
|
metadata: e
|
|
168
|
-
},
|
|
168
|
+
}, B, V), T(this, null, G, {
|
|
169
169
|
kind: "accessor",
|
|
170
170
|
name: "price",
|
|
171
171
|
static: !1,
|
|
@@ -178,7 +178,7 @@ var L = ":host{--sbb-timetable-row-gap: var(--sbb-spacing-fixed-2x);--sbb-timeta
|
|
|
178
178
|
}
|
|
179
179
|
},
|
|
180
180
|
metadata: e
|
|
181
|
-
},
|
|
181
|
+
}, K, J), T(this, null, Y, {
|
|
182
182
|
kind: "accessor",
|
|
183
183
|
name: "disableAnimation",
|
|
184
184
|
static: !1,
|
|
@@ -191,7 +191,7 @@ var L = ":host{--sbb-timetable-row-gap: var(--sbb-spacing-fixed-2x);--sbb-timeta
|
|
|
191
191
|
}
|
|
192
192
|
},
|
|
193
193
|
metadata: e
|
|
194
|
-
},
|
|
194
|
+
}, X, Z), T(this, null, Q, {
|
|
195
195
|
kind: "accessor",
|
|
196
196
|
name: "boarding",
|
|
197
197
|
static: !1,
|
|
@@ -204,7 +204,7 @@ var L = ":host{--sbb-timetable-row-gap: var(--sbb-spacing-fixed-2x);--sbb-timeta
|
|
|
204
204
|
}
|
|
205
205
|
},
|
|
206
206
|
metadata: e
|
|
207
|
-
},
|
|
207
|
+
}, re, ie), T(this, null, ae, {
|
|
208
208
|
kind: "accessor",
|
|
209
209
|
name: "loadingTrip",
|
|
210
210
|
static: !1,
|
|
@@ -217,7 +217,7 @@ var L = ":host{--sbb-timetable-row-gap: var(--sbb-spacing-fixed-2x);--sbb-timeta
|
|
|
217
217
|
}
|
|
218
218
|
},
|
|
219
219
|
metadata: e
|
|
220
|
-
},
|
|
220
|
+
}, oe, se), T(this, null, ce, {
|
|
221
221
|
kind: "accessor",
|
|
222
222
|
name: "a11yFootpath",
|
|
223
223
|
static: !1,
|
|
@@ -230,7 +230,7 @@ var L = ":host{--sbb-timetable-row-gap: var(--sbb-spacing-fixed-2x);--sbb-timeta
|
|
|
230
230
|
}
|
|
231
231
|
},
|
|
232
232
|
metadata: e
|
|
233
|
-
},
|
|
233
|
+
}, le, ue), T(this, null, de, {
|
|
234
234
|
kind: "accessor",
|
|
235
235
|
name: "loadingPrice",
|
|
236
236
|
static: !1,
|
|
@@ -243,7 +243,7 @@ var L = ":host{--sbb-timetable-row-gap: var(--sbb-spacing-fixed-2x);--sbb-timeta
|
|
|
243
243
|
}
|
|
244
244
|
},
|
|
245
245
|
metadata: e
|
|
246
|
-
},
|
|
246
|
+
}, fe, $), T(this, null, pe, {
|
|
247
247
|
kind: "accessor",
|
|
248
248
|
name: "cardActionLabel",
|
|
249
249
|
static: !1,
|
|
@@ -256,7 +256,7 @@ var L = ":host{--sbb-timetable-row-gap: var(--sbb-spacing-fixed-2x);--sbb-timeta
|
|
|
256
256
|
}
|
|
257
257
|
},
|
|
258
258
|
metadata: e
|
|
259
|
-
}, me, he),
|
|
259
|
+
}, me, he), T(this, null, ge, {
|
|
260
260
|
kind: "accessor",
|
|
261
261
|
name: "accessibilityExpanded",
|
|
262
262
|
static: !1,
|
|
@@ -269,7 +269,7 @@ var L = ":host{--sbb-timetable-row-gap: var(--sbb-spacing-fixed-2x);--sbb-timeta
|
|
|
269
269
|
}
|
|
270
270
|
},
|
|
271
271
|
metadata: e
|
|
272
|
-
}, _e, ve),
|
|
272
|
+
}, _e, ve), T(this, null, ye, {
|
|
273
273
|
kind: "accessor",
|
|
274
274
|
name: "active",
|
|
275
275
|
static: !1,
|
|
@@ -282,7 +282,7 @@ var L = ":host{--sbb-timetable-row-gap: var(--sbb-spacing-fixed-2x);--sbb-timeta
|
|
|
282
282
|
}
|
|
283
283
|
},
|
|
284
284
|
metadata: e
|
|
285
|
-
}, be, xe),
|
|
285
|
+
}, be, xe), T(this, null, Se, {
|
|
286
286
|
kind: "setter",
|
|
287
287
|
name: "now",
|
|
288
288
|
static: !1,
|
|
@@ -294,7 +294,7 @@ var L = ":host{--sbb-timetable-row-gap: var(--sbb-spacing-fixed-2x);--sbb-timeta
|
|
|
294
294
|
}
|
|
295
295
|
},
|
|
296
296
|
metadata: e
|
|
297
|
-
}, null,
|
|
297
|
+
}, null, R), e && Object.defineProperty(this, Symbol.metadata, {
|
|
298
298
|
enumerable: !0,
|
|
299
299
|
configurable: !0,
|
|
300
300
|
writable: !0,
|
|
@@ -306,19 +306,19 @@ var L = ":host{--sbb-timetable-row-gap: var(--sbb-spacing-fixed-2x);--sbb-timeta
|
|
|
306
306
|
}
|
|
307
307
|
static {
|
|
308
308
|
this.elementDependencies = [
|
|
309
|
-
F,
|
|
310
309
|
N,
|
|
310
|
+
j,
|
|
311
|
+
M,
|
|
312
|
+
x,
|
|
311
313
|
P,
|
|
312
|
-
|
|
313
|
-
I,
|
|
314
|
-
M
|
|
314
|
+
A
|
|
315
315
|
];
|
|
316
316
|
}
|
|
317
317
|
static {
|
|
318
318
|
this.styles = [
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
319
|
+
y,
|
|
320
|
+
b,
|
|
321
|
+
w(F)
|
|
322
322
|
];
|
|
323
323
|
}
|
|
324
324
|
#e;
|
|
@@ -392,7 +392,7 @@ var L = ":host{--sbb-timetable-row-gap: var(--sbb-spacing-fixed-2x);--sbb-timeta
|
|
|
392
392
|
this.#l = e;
|
|
393
393
|
}
|
|
394
394
|
set now(e) {
|
|
395
|
-
this._now =
|
|
395
|
+
this._now = r.getValidDateOrNull(r.deserialize(e));
|
|
396
396
|
}
|
|
397
397
|
get now() {
|
|
398
398
|
return this._now ?? /* @__PURE__ */ new Date();
|
|
@@ -401,9 +401,9 @@ var L = ":host{--sbb-timetable-row-gap: var(--sbb-spacing-fixed-2x);--sbb-timeta
|
|
|
401
401
|
super.willUpdate(e), e.has("loadingTrip") && (this.internals.role = this.loadingTrip ? null : "rowgroup");
|
|
402
402
|
}
|
|
403
403
|
_renderSkeleton() {
|
|
404
|
-
return
|
|
404
|
+
return S`
|
|
405
405
|
<sbb-card class="sbb-loading sbb-card-spacing-4x-xxs">
|
|
406
|
-
${this.loadingPrice ?
|
|
406
|
+
${this.loadingPrice ? S`<div class="sbb-loading__badge" slot="badge"></div>` : C}
|
|
407
407
|
<div class="sbb-loading__wrapper">
|
|
408
408
|
<div class="sbb-loading__row"></div>
|
|
409
409
|
<div class="sbb-loading__row"></div>
|
|
@@ -413,20 +413,20 @@ var L = ":host{--sbb-timetable-row-gap: var(--sbb-spacing-fixed-2x);--sbb-timeta
|
|
|
413
413
|
`;
|
|
414
414
|
}
|
|
415
415
|
_getRideLegs() {
|
|
416
|
-
return this.trip?.legs?.filter((e) =>
|
|
416
|
+
return this.trip?.legs?.filter((e) => k(e)) ?? [];
|
|
417
417
|
}
|
|
418
418
|
_getQuayTypeStrings() {
|
|
419
419
|
if (!this.trip.summary?.product) return null;
|
|
420
420
|
let e = this._getRideLegs(), t = this.trip.summary.product?.vehicleMode === "TRAIN" ? e[0].serviceJourney.quayTypeShortName || "" : e[0].serviceJourney.quayTypeName || "";
|
|
421
421
|
return {
|
|
422
|
-
long:
|
|
422
|
+
long: c[this._language.current] + " " + t,
|
|
423
423
|
short: t
|
|
424
424
|
};
|
|
425
425
|
}
|
|
426
426
|
_renderQuayType() {
|
|
427
427
|
if (!this.trip.summary?.product) return;
|
|
428
428
|
let e = this._getQuayTypeStrings();
|
|
429
|
-
return
|
|
429
|
+
return S`
|
|
430
430
|
<span class="sbb-timetable__row--quay">
|
|
431
431
|
<span class="sbb-screen-reader-only">${e?.long} </span>
|
|
432
432
|
<span class="sbb-timetable__row--quay-type" aria-hidden="true"
|
|
@@ -436,125 +436,125 @@ var L = ":host{--sbb-timetable-row-gap: var(--sbb-spacing-fixed-2x);--sbb-timeta
|
|
|
436
436
|
`;
|
|
437
437
|
}
|
|
438
438
|
_handleHimCus(e) {
|
|
439
|
-
let { situations: t } = e || {}, n = t &&
|
|
439
|
+
let { situations: t } = e || {}, n = t && H(t), r = W(e, this._language.current);
|
|
440
440
|
return {
|
|
441
441
|
cus: Object.keys(r)?.length ? r : null,
|
|
442
|
-
him: t?.length ?
|
|
442
|
+
him: t?.length ? U(n[0]) : null
|
|
443
443
|
};
|
|
444
444
|
}
|
|
445
445
|
_getAccessibilityText(t) {
|
|
446
|
-
let { summary: n, legs: r, notices: i } = t || {}, { departureWalk:
|
|
447
|
-
|
|
448
|
-
let
|
|
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
449
|
return [
|
|
450
|
+
j,
|
|
450
451
|
N,
|
|
452
|
+
P(),
|
|
451
453
|
F,
|
|
452
|
-
I
|
|
454
|
+
I,
|
|
453
455
|
L,
|
|
454
|
-
R,
|
|
455
456
|
z,
|
|
456
457
|
V,
|
|
457
|
-
|
|
458
|
+
H,
|
|
459
|
+
z ? "" : B,
|
|
458
460
|
W,
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
Z,
|
|
461
|
+
M,
|
|
462
|
+
Y,
|
|
463
|
+
U,
|
|
463
464
|
G,
|
|
464
|
-
|
|
465
|
-
X
|
|
465
|
+
J
|
|
466
466
|
].map((e) => e?.trim()).filter((e) => e && e.length > 0).join(" ");
|
|
467
467
|
}
|
|
468
468
|
render() {
|
|
469
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:
|
|
471
|
-
return
|
|
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
472
|
<sbb-card class="sbb-card-spacing-4x-xxs" id=${t}>
|
|
473
473
|
<sbb-card-button
|
|
474
474
|
?active=${this.active}
|
|
475
|
-
aria-expanded=${this.accessibilityExpanded ? "true" :
|
|
475
|
+
aria-expanded=${this.accessibilityExpanded ? "true" : C}
|
|
476
476
|
>
|
|
477
477
|
${this.cardActionLabel ? this.cardActionLabel : this._getAccessibilityText(this.trip)}
|
|
478
478
|
</sbb-card-button>
|
|
479
|
-
${this.loadingPrice ?
|
|
480
|
-
${this.price && !this.loadingPrice ?
|
|
481
|
-
${this.price.isDiscount ?
|
|
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
482
|
%<span class="sbb-screen-reader-only"
|
|
483
|
-
>${
|
|
483
|
+
>${p[this._language.current]}</span
|
|
484
484
|
>
|
|
485
|
-
</span>` :
|
|
486
|
-
${this.price.text ?
|
|
487
|
-
${this.price.price ?
|
|
488
|
-
</sbb-card-badge>` :
|
|
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
489
|
<div class="sbb-timetable__row" role="row">
|
|
490
490
|
<div class="sbb-timetable__row-header" role="gridcell">
|
|
491
491
|
<div class="sbb-timetable__row-details">
|
|
492
|
-
${i?.corporateIdentityPictogram &&
|
|
492
|
+
${i?.corporateIdentityPictogram && S`<span class="sbb-timetable__row-transport-wrapper">
|
|
493
493
|
<sbb-icon
|
|
494
494
|
class="sbb-timetable__row-transport-icon"
|
|
495
495
|
name="picto:${i.corporateIdentityPictogram}"
|
|
496
496
|
></sbb-icon>
|
|
497
497
|
<span class="sbb-screen-reader-only">
|
|
498
|
-
${i && i.vehicleMode &&
|
|
498
|
+
${i && i.vehicleMode && l[i.vehicleMode.toLowerCase()] && l[i.vehicleMode.toLowerCase()][this._language.current]}
|
|
499
499
|
|
|
500
500
|
</span>
|
|
501
501
|
</span>`}
|
|
502
|
-
${i && (i.corporateIdentityIcon ?
|
|
502
|
+
${i && (i.corporateIdentityIcon ? I(i.corporateIdentityIcon, i.name) : i.vehicleSubModeShortName && L(i.vehicleSubModeShortName, i?.line))}
|
|
503
503
|
</div>
|
|
504
|
-
${a ?
|
|
504
|
+
${a ? S`<p>${`${ee[this._language.current]} ${a}`}</p>` : C}
|
|
505
505
|
</div>
|
|
506
506
|
<sbb-pearl-chain-time
|
|
507
507
|
role="gridcell"
|
|
508
508
|
.legs=${e}
|
|
509
|
-
.departureTime=${
|
|
510
|
-
.arrivalTime=${
|
|
509
|
+
.departureTime=${c?.time}
|
|
510
|
+
.arrivalTime=${d?.time}
|
|
511
511
|
.departureWalk=${o}
|
|
512
|
-
.arrivalWalk=${
|
|
512
|
+
.arrivalWalk=${f}
|
|
513
513
|
?disable-animation=${this.disableAnimation}
|
|
514
514
|
?a11y-footpath=${this.a11yFootpath}
|
|
515
515
|
.now=${this.now}
|
|
516
516
|
></sbb-pearl-chain-time>
|
|
517
517
|
<div class="sbb-timetable__row-footer" role="gridcell">
|
|
518
|
-
${i &&
|
|
519
|
-
class=${
|
|
518
|
+
${i && c?.quayFormatted ? S`<span
|
|
519
|
+
class=${c?.quayChanged ? "sbb-timetable__row-quay--changed" : C}
|
|
520
520
|
>
|
|
521
521
|
<span class="sbb-screen-reader-only">
|
|
522
|
-
${`${
|
|
522
|
+
${`${s[this._language.current]} ${c?.quayChanged ? u[this._language.current] : ""}`}
|
|
523
523
|
|
|
524
524
|
</span>
|
|
525
|
-
${this._renderQuayType()} ${
|
|
526
|
-
</span>` :
|
|
527
|
-
${m?.firstClass && m?.firstClass !== "UNKNOWN" || m?.secondClass && m.secondClass !== "UNKNOWN" ?
|
|
525
|
+
${this._renderQuayType()} ${c?.quayFormatted}
|
|
526
|
+
</span>` : C}
|
|
527
|
+
${m?.firstClass && m?.firstClass !== "UNKNOWN" || m?.secondClass && m.secondClass !== "UNKNOWN" ? S`<sbb-timetable-occupancy
|
|
528
528
|
.firstClassOccupancy=${m?.firstClass?.toLowerCase()}
|
|
529
529
|
.secondClassOccupancy=${m?.secondClass?.toLowerCase()}
|
|
530
|
-
></sbb-timetable-occupancy>` :
|
|
531
|
-
${y && y.length || this.boarding ?
|
|
532
|
-
${y?.map((e, t) => t < 4 ?
|
|
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
533
|
<sbb-icon
|
|
534
534
|
class="sbb-travel-hints__item"
|
|
535
535
|
name=${"sa-" + e.name?.toLowerCase()}
|
|
536
536
|
></sbb-icon>
|
|
537
537
|
<span class="sbb-screen-reader-only">${e.text?.template}</span>
|
|
538
|
-
</li>` :
|
|
539
|
-
${this.boarding ?
|
|
538
|
+
</li>` : C)}
|
|
539
|
+
${this.boarding ? S`<li>
|
|
540
540
|
<sbb-icon
|
|
541
541
|
class="sbb-travel-hints__item"
|
|
542
542
|
name=${this.boarding?.name}
|
|
543
543
|
aria-label=${this.boarding?.text}
|
|
544
544
|
aria-hidden="false"
|
|
545
545
|
></sbb-icon>
|
|
546
|
-
</li>` :
|
|
547
|
-
</ul>` :
|
|
548
|
-
${h && h > 0 ?
|
|
546
|
+
</li>` : C}
|
|
547
|
+
</ul>` : C}
|
|
548
|
+
${h && h > 0 ? S`<time>
|
|
549
549
|
<span class="sbb-screen-reader-only">
|
|
550
|
-
${`${
|
|
550
|
+
${`${_[this._language.current]} ${b.long}`}
|
|
551
551
|
</span>
|
|
552
|
-
<span aria-hidden="true">${
|
|
553
|
-
</time>` :
|
|
554
|
-
${v && (
|
|
555
|
-
<sbb-icon name=${(
|
|
556
|
-
<span class="sbb-screen-reader-only">${(
|
|
557
|
-
</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
558
|
</div>
|
|
559
559
|
</div>
|
|
560
560
|
</sbb-card>
|
|
@@ -563,4 +563,4 @@ var L = ":host{--sbb-timetable-row-gap: var(--sbb-spacing-fixed-2x);--sbb-timeta
|
|
|
563
563
|
};
|
|
564
564
|
})();
|
|
565
565
|
//#endregion
|
|
566
|
-
export {
|
|
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-DMiay4xK.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-DMiay4xK.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,61 +0,0 @@
|
|
|
1
|
-
import { __esDecorate as e, __runInitializers as t } from "tslib";
|
|
2
|
-
import { SbbElement as n, SbbLanguageController as r, forceType as i, i18nDurationHour as a, i18nDurationMinute as o, screenReaderOnlyStyles as s } from "@sbb-esta/lyne-elements/core.js";
|
|
3
|
-
import { html as c, unsafeCSS as l } from "lit";
|
|
4
|
-
import { property as u } from "lit/decorators.js";
|
|
5
|
-
//#region src/elements-experimental/timetable-duration/timetable-duration.scss?inline
|
|
6
|
-
var d = ":host{display:inline-block}.duration{--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);margin:0;white-space:nowrap}", f = (() => {
|
|
7
|
-
let f = n, p, m = [], h = [];
|
|
8
|
-
return class extends f {
|
|
9
|
-
constructor() {
|
|
10
|
-
super(...arguments), this.#e = t(this, m, ""), this._language = (t(this, h), new r(this));
|
|
11
|
-
}
|
|
12
|
-
static {
|
|
13
|
-
let t = typeof Symbol == "function" && Symbol.metadata ? Object.create(f[Symbol.metadata] ?? null) : void 0;
|
|
14
|
-
p = [i(), u()], e(this, null, p, {
|
|
15
|
-
kind: "accessor",
|
|
16
|
-
name: "config",
|
|
17
|
-
static: !1,
|
|
18
|
-
private: !1,
|
|
19
|
-
access: {
|
|
20
|
-
has: (e) => "config" in e,
|
|
21
|
-
get: (e) => e.config,
|
|
22
|
-
set: (e, t) => {
|
|
23
|
-
e.config = t;
|
|
24
|
-
}
|
|
25
|
-
},
|
|
26
|
-
metadata: t
|
|
27
|
-
}, m, h), t && Object.defineProperty(this, Symbol.metadata, {
|
|
28
|
-
enumerable: !0,
|
|
29
|
-
configurable: !0,
|
|
30
|
-
writable: !0,
|
|
31
|
-
value: t
|
|
32
|
-
});
|
|
33
|
-
}
|
|
34
|
-
static {
|
|
35
|
-
this.elementName = "sbb-timetable-duration";
|
|
36
|
-
}
|
|
37
|
-
static {
|
|
38
|
-
this.styles = [s, l(d)];
|
|
39
|
-
}
|
|
40
|
-
#e;
|
|
41
|
-
get config() {
|
|
42
|
-
return this.#e;
|
|
43
|
-
}
|
|
44
|
-
set config(e) {
|
|
45
|
-
this.#e = e;
|
|
46
|
-
}
|
|
47
|
-
render() {
|
|
48
|
-
let e = JSON.parse(this.config), t = a.multiple.short[this._language.current], n = o.multiple.short[this._language.current], r = "", i = "", s = a.multiple.long[this._language.current], l = o.multiple.long[this._language.current];
|
|
49
|
-
return e.hours === 1 && (s = a.single.long[this._language.current]), e.minutes === 1 && (l = o.single.long[this._language.current]), e.hours !== 0 && (r += `${e.hours} ${t}`, i += `${e.hours} ${s}`), r += ` ${e.minutes} ${n}`, i += ` ${e.minutes} ${l}.`, c`
|
|
50
|
-
<p aria-label=${i} class="duration" role="text">
|
|
51
|
-
<span aria-hidden="true" class="duration__text--visual" role="presentation">
|
|
52
|
-
${r}
|
|
53
|
-
</span>
|
|
54
|
-
<span class="sbb-screen-reader-only">${i}</span>
|
|
55
|
-
</p>
|
|
56
|
-
`;
|
|
57
|
-
}
|
|
58
|
-
};
|
|
59
|
-
})();
|
|
60
|
-
//#endregion
|
|
61
|
-
export { f as t };
|