@sbb-esta/lyne-elements-experimental 3.7.0 → 3.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/custom-elements.json +155 -19
- package/development/journey-summary/journey-summary.component.js +1 -1
- package/development/pearl-chain/pearl-chain.component.js +9 -4
- package/development/pearl-chain-time/pearl-chain-time.component.js +1 -1
- package/development/pearl-chain-vertical-item/pearl-chain-vertical-item.component.js +9 -4
- package/development/seat-reservation/common/mapper/icon-mapper.d.ts +0 -6
- package/development/seat-reservation/common/mapper/icon-mapper.d.ts.map +1 -1
- package/development/seat-reservation/common/mapper/icon-mapper.js +2 -1
- package/development/seat-reservation/common/svgs.js +5 -5
- package/development/seat-reservation/common/types.d.ts +8 -0
- package/development/seat-reservation/common/types.d.ts.map +1 -1
- package/development/seat-reservation/seat-reservation/seat-reservation-base-element.d.ts +24 -6
- 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 +109 -22
- package/development/seat-reservation/seat-reservation/seat-reservation.component.d.ts.map +1 -1
- package/development/seat-reservation/seat-reservation/seat-reservation.component.js +58 -35
- package/development/seat-reservation/seat-reservation-area/seat-reservation-area.component.js +4 -2
- package/development/seat-reservation/seat-reservation-graphic/seat-reservation-assets.d.ts.map +1 -1
- package/development/seat-reservation/seat-reservation-graphic/seat-reservation-assets.js +27 -44
- package/development/seat-reservation/seat-reservation-graphic/seat-reservation-graphic.component.js +2 -1
- package/development/seat-reservation/seat-reservation-navigation-coach/seat-reservation-navigation-coach.component.d.ts +1 -3
- 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 +54 -10
- package/development/seat-reservation/seat-reservation-navigation-services/seat-reservation-navigation-services.component.js +2 -1
- package/development/seat-reservation/seat-reservation-place-control/seat-reservation-place-control.component.js +46 -6
- package/development/timetable-row/timetable-row.component.js +7 -7
- package/journey-summary/journey-summary.component.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-vertical-item/pearl-chain-vertical-item.component.js +17 -17
- package/seat-reservation/common/mapper/icon-mapper.d.ts +0 -6
- package/seat-reservation/common/mapper/icon-mapper.d.ts.map +1 -1
- package/seat-reservation/common/mapper/icon-mapper.js +1 -0
- package/seat-reservation/common/svgs.js +10 -10
- package/seat-reservation/common/types.d.ts +8 -0
- package/seat-reservation/common/types.d.ts.map +1 -1
- package/seat-reservation/seat-reservation/seat-reservation-base-element.d.ts +24 -6
- package/seat-reservation/seat-reservation/seat-reservation-base-element.d.ts.map +1 -1
- package/seat-reservation/seat-reservation/seat-reservation-base-element.js +230 -165
- package/seat-reservation/seat-reservation/seat-reservation.component.d.ts.map +1 -1
- package/seat-reservation/seat-reservation/seat-reservation.component.js +66 -67
- package/seat-reservation/seat-reservation-area/seat-reservation-area.component.js +10 -10
- package/seat-reservation/seat-reservation-graphic/seat-reservation-assets.d.ts.map +1 -1
- package/seat-reservation/seat-reservation-graphic/seat-reservation-assets.js +37 -54
- package/seat-reservation/seat-reservation-graphic/seat-reservation-graphic.component.js +5 -5
- package/seat-reservation/seat-reservation-navigation-coach/seat-reservation-navigation-coach.component.d.ts +1 -3
- 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 +91 -93
- package/seat-reservation/seat-reservation-navigation-services/seat-reservation-navigation-services.component.js +22 -22
- package/seat-reservation/seat-reservation-place-control/seat-reservation-place-control.component.js +49 -49
- package/timetable-row/timetable-row.component.js +56 -56
package/seat-reservation/seat-reservation-place-control/seat-reservation-place-control.component.js
CHANGED
|
@@ -1,86 +1,86 @@
|
|
|
1
|
-
var W = (
|
|
2
|
-
throw TypeError(
|
|
1
|
+
var W = (s) => {
|
|
2
|
+
throw TypeError(s);
|
|
3
3
|
};
|
|
4
|
-
var X = (
|
|
5
|
-
var
|
|
4
|
+
var X = (s, o, b) => o.has(s) || W("Cannot " + b);
|
|
5
|
+
var n = (s, o, b) => (X(s, o, "read from private field"), b ? b.call(s) : o.get(s)), p = (s, o, b) => o.has(s) ? W("Cannot add the same private member more than once") : o instanceof WeakSet ? o.add(s) : o.set(s, b), a = (s, o, b, i) => (X(s, o, "write to private field"), i ? i.call(s, b) : o.set(s, b), b);
|
|
6
6
|
import { __esDecorate as d, __runInitializers as c } from "tslib";
|
|
7
7
|
import { SbbButtonBaseElement as ae } from "@sbb-esta/lyne-elements/core/base-elements.js";
|
|
8
8
|
import { SbbLanguageController as ce } from "@sbb-esta/lyne-elements/core/controllers.js";
|
|
9
9
|
import { forceType as h } from "@sbb-esta/lyne-elements/core/decorators.js";
|
|
10
|
-
import { css as le, nothing as oe, html as
|
|
11
|
-
import { customElement as
|
|
12
|
-
import { styleMap as
|
|
10
|
+
import { css as le, nothing as oe, html as be } from "lit";
|
|
11
|
+
import { customElement as ie, property as v } from "lit/decorators.js";
|
|
12
|
+
import { styleMap as ne } from "lit/directives/style-map.js";
|
|
13
13
|
import { getI18nSeatReservation as E } from "../common.js";
|
|
14
14
|
import "../seat-reservation-graphic.js";
|
|
15
|
-
const pe = le`*,:before,:after{box-sizing:border-box}:host{--sbb-seat-reservation-place-control-text-scale-value: 1;--sbb-seat-reservation-place-control-width: 16;--sbb-seat-reservation-place-control-height: 16;--sbb-seat-reservation-place-control-top: 0;--sbb-seat-reservation-place-control-left: 0;--sbb-seat-reservation-place-control-rotation: 0;--sbb-seat-reservation-place-control-text-rotation: 0;--sbb-seat-reservation-place-control-text-size: calc( var(--sbb-seat-reservation-place-control-text-scale-value, 1) * .5 );--sbb-seat-reservation-place-control-default-text: var(--sbb-color-black);--sbb-seat-reservation-place-control-hover-text: var(--sbb-color-iron);--sbb-seat-reservation-place-control-focus-text: var(--sbb-color-anthracite);--sbb-seat-reservation-place-control-allocated-text: var(--sbb-color-smoke);--sbb-seat-reservation-place-control-free-background-default: var(--sbb-color-
|
|
15
|
+
const pe = le`*,:before,:after{box-sizing:border-box}:host{--sbb-seat-reservation-place-control-text-scale-value: 1;--sbb-seat-reservation-place-control-width: 16;--sbb-seat-reservation-place-control-height: 16;--sbb-seat-reservation-place-control-top: 0;--sbb-seat-reservation-place-control-left: 0;--sbb-seat-reservation-place-control-rotation: 0;--sbb-seat-reservation-place-control-text-rotation: 0;--sbb-seat-reservation-place-control-text-size: calc( var(--sbb-seat-reservation-place-control-text-scale-value, 1) * .5 );--sbb-seat-reservation-place-control-default-text: var(--sbb-color-black);--sbb-seat-reservation-place-control-default-text: light-dark( var(--sbb-color-black), var(--sbb-color-white) );--sbb-seat-reservation-place-control-hover-text: var(--sbb-color-iron);--sbb-seat-reservation-place-control-hover-text: light-dark( var(--sbb-color-iron), var(--sbb-color-silver) );--sbb-seat-reservation-place-control-focus-text: var(--sbb-color-anthracite);--sbb-seat-reservation-place-control-focus-text: light-dark( var(--sbb-color-anthracite), var(--sbb-color-graphite) );--sbb-seat-reservation-place-control-allocated-text: var(--sbb-color-smoke);--sbb-seat-reservation-place-control-allocated-text: light-dark( var(--sbb-color-smoke), var(--sbb-color-metal) );--sbb-seat-reservation-place-control-free-background-default: var(--sbb-background-color-2);--sbb-seat-reservation-place-control-free-background-hover: var(--sbb-color-cloud);--sbb-seat-reservation-place-control-free-background-hover: light-dark( var(--sbb-color-cloud), var(--sbb-color-midnight) );--sbb-seat-reservation-place-control-free-background-focus: var(--sbb-color-silver);--sbb-seat-reservation-place-control-free-background-focus: light-dark( var(--sbb-color-silver), var(--sbb-color-black) );--sbb-seat-reservation-place-control-free-backrest-background-default: var(--sbb-color-black);--sbb-seat-reservation-place-control-free-backrest-background-default: light-dark( var(--sbb-color-black), var(--sbb-color-white) );--sbb-seat-reservation-place-control-free-backrest-background-hover: var(--sbb-color-black);--sbb-seat-reservation-place-control-free-backrest-background-hover: light-dark( var(--sbb-color-black), var(--sbb-color-white) );--sbb-seat-reservation-place-control-free-backrest-background-focus: var(--sbb-color-black);--sbb-seat-reservation-place-control-free-backrest-background-focus: light-dark( var(--sbb-color-black), var(--sbb-color-white) );--sbb-seat-reservation-place-control-selected-background-default: var(--sbb-color-primary);--sbb-seat-reservation-place-control-selected-background-hover: var(--sbb-color-primary125);--sbb-seat-reservation-place-control-selected-background-focus: var(--sbb-color-primary150);--sbb-seat-reservation-place-control-selected-backrest-background-default: var( --sbb-color-primary150 );--sbb-seat-reservation-place-control-selected-backrest-background-hover: #7d000f;--sbb-seat-reservation-place-control-selected-backrest-background-focus: #5a000b;--sbb-seat-reservation-place-control-allocated-background-default: var(--sbb-color-milk);--sbb-seat-reservation-place-control-allocated-background-default: light-dark( var(--sbb-color-milk), var(--sbb-color-midnight) );width:calc(var(--sbb-seat-reservation-place-control-width) * var(--sbb-seat-reservation-one-px-rem, .0625rem));height:calc(var(--sbb-seat-reservation-place-control-height) * var(--sbb-seat-reservation-one-px-rem, .0625rem));position:absolute;inset-block-start:calc(var(--sbb-seat-reservation-place-control-top) * var(--sbb-seat-reservation-one-px-rem, .0625rem));inset-inline-start:calc(var(--sbb-seat-reservation-place-control-left) * var(--sbb-seat-reservation-one-px-rem, .0625rem));cursor:pointer}:host(:hover) .sbb-sr-place-ctrl--state-free:not(.sbb-reservation-place-control--disabled) ::part(svg-place){fill:var(--sbb-seat-reservation-place-control-free-background-hover)}:host(:hover) .sbb-sr-place-ctrl--state-free:not(.sbb-reservation-place-control--disabled) ::part(svg-backrest){fill:var(--sbb-seat-reservation-place-control-free-backrest-background-hover)}:host(:hover) .sbb-sr-place-ctrl--state-free:not(.sbb-reservation-place-control--disabled) .sbb-sr-place-ctrl__text{background-color:var(--sbb-seat-reservation-place-control-free-background-hover);color:var(--sbb-seat-reservation-place-control-free-text)}:host(:hover) .sbb-sr-place-ctrl--state-selected:not(.sbb-reservation-place-control--disabled) ::part(svg-place){fill:var(--sbb-seat-reservation-place-control-selected-background-hover)}:host(:hover) .sbb-sr-place-ctrl--state-selected:not(.sbb-reservation-place-control--disabled) ::part(svg-backrest){fill:var(--sbb-seat-reservation-place-control-selected-backrest-background-hover)}:host(:hover) .sbb-sr-place-ctrl--state-selected:not(.sbb-reservation-place-control--disabled) .sbb-sr-place-ctrl__text{background-color:var(--sbb-seat-reservation-place-control-selected-background-hover);color:var(--sbb-seat-reservation-place-control-selected-text)}:host(:focus-visible) .sbb-sr-place-ctrl--state-free:not(.sbb-reservation-place-control--disabled) ::part(svg-place){fill:var(--sbb-seat-reservation-place-control-free-background-focus)}:host(:focus-visible) .sbb-sr-place-ctrl--state-free:not(.sbb-reservation-place-control--disabled) ::part(svg-backrest){fill:var(--sbb-seat-reservation-place-control-free-backrest-background-focus)}:host(:focus-visible) .sbb-sr-place-ctrl--state-free:not(.sbb-reservation-place-control--disabled) .sbb-sr-place-ctrl__text{background-color:var(--sbb-seat-reservation-place-control-free-background-focus);color:var(--sbb-seat-reservation-place-control-free-text)}:host(:active) .sbb-sr-place-ctrl--state-selected:not(.sbb-reservation-place-control--disabled) ::part(svg-place){fill:var(--sbb-seat-reservation-place-control-selected-background-focus)}:host(:active) .sbb-sr-place-ctrl--state-selected:not(.sbb-reservation-place-control--disabled) ::part(svg-backrest){fill:var(--sbb-seat-reservation-place-control-selected-backrest-background-focus)}:host(:active) .sbb-sr-place-ctrl--state-selected:not(.sbb-reservation-place-control--disabled) .sbb-sr-place-ctrl__text{background-color:var(--sbb-seat-reservation-place-control-selected-background-focus);color:var(--sbb-seat-reservation-place-control-selected-text)}:host(:dir(rtl)) :not(.sbb-sr-place-ctrl--type-bicycle,.sbb-sr-place-ctrl--orientation-90,.sbb-sr-place-ctrl--orientation-270,.sbb-sr-place-ctrl--state-selected) ::part(svg-place){rotate:180deg}.sbb-sr-place-ctrl{width:max-content;position:relative;font-size:calc(var(--sbb-seat-reservation-place-control-text-size) * var(--sbb-seat-reservation-one-px-rem, .0625rem))}.sbb-sr-place-ctrl--state-free ::part(svg-place){fill:var(--sbb-seat-reservation-place-control-free-background-default)}.sbb-sr-place-ctrl--state-free ::part(svg-backrest){fill:var(--sbb-seat-reservation-place-control-free-backrest-background-default)}.sbb-sr-place-ctrl--state-free .sbb-sr-place-ctrl__text{background-color:var(--sbb-seat-reservation-place-control-free-background-default);color:var(--sbb-seat-reservation-place-control-free-text)}.sbb-sr-place-ctrl--state-selected ::part(svg-place){fill:var(--sbb-seat-reservation-place-control-selected-background-default)}.sbb-sr-place-ctrl--state-selected ::part(svg-backrest){fill:var(--sbb-seat-reservation-place-control-selected-backrest-background-default)}.sbb-sr-place-ctrl--state-selected .sbb-sr-place-ctrl__text{background-color:var(--sbb-seat-reservation-place-control-selected-background-default);color:var(--sbb-seat-reservation-place-control-selected-text)}.sbb-sr-place-ctrl--state-allocated ::part(svg-place),.sbb-sr-place-ctrl--state-restricted ::part(svg-place){fill:var(--sbb-seat-reservation-place-control-allocated-background-default)}.sbb-sr-place-ctrl--state-allocated ::part(svg-backrest),.sbb-sr-place-ctrl--state-restricted ::part(svg-backrest){fill:var(--sbb-seat-reservation-place-control-allocated-backrest-background-default)}.sbb-sr-place-ctrl--state-allocated .sbb-sr-place-ctrl__text,.sbb-sr-place-ctrl--state-restricted .sbb-sr-place-ctrl__text{background-color:var(--sbb-seat-reservation-place-control-allocated-background-default);color:var(--sbb-seat-reservation-place-control-allocated-text)}.sbb-sr-place-ctrl--state-allocated,.sbb-sr-place-ctrl--state-restricted{cursor:not-allowed}.sbb-sr-place-ctrl__text{overflow:hidden;display:none;position:absolute;inset-block-start:50%;translate:-50% -50%;rotate:calc(var(--sbb-seat-reservation-place-control-text-rotation) * 1deg);font-family:var(--sbb-typo-font-family);font-size:.75em;line-height:initial}.sbb-sr-place-ctrl--state-free .sbb-sr-place-ctrl__text,.sbb-sr-place-ctrl--state-allocated .sbb-sr-place-ctrl__text,.sbb-sr-place-ctrl--state-restricted.sbb-sr-place-ctrl--type-bicycle .sbb-sr-place-ctrl__text{display:block}.sbb-sr-place-ctrl--type-bicycle .sbb-sr-place-ctrl__text{inset-block-start:65%;inset-inline-start:50%;transform-origin:center 16%;font-size:.6875em}.sbb-sr-place-ctrl--orientation-0.sbb-sr-place-ctrl--type-seat .sbb-sr-place-ctrl__text{inset-inline-start:45%}.sbb-sr-place-ctrl--orientation-90.sbb-sr-place-ctrl--type-seat .sbb-sr-place-ctrl__text{inset-block-start:46%;inset-inline-start:50%}.sbb-sr-place-ctrl--orientation-180.sbb-sr-place-ctrl--type-seat .sbb-sr-place-ctrl__text{inset-inline-start:55%}.sbb-sr-place-ctrl--orientation-270.sbb-sr-place-ctrl--type-seat .sbb-sr-place-ctrl__text{inset-block-start:52%;inset-inline-start:52%}:host(:dir(rtl)) .sbb-sr-place-ctrl--orientation-0 .sbb-sr-place-ctrl__text{inset-inline-start:3%}:host(:dir(rtl)) .sbb-sr-place-ctrl--orientation-90 .sbb-sr-place-ctrl__text,:host(:dir(rtl)) .sbb-sr-place-ctrl--orientation-180 .sbb-sr-place-ctrl__text{inset-inline-start:10%}:host(:dir(rtl)) .sbb-sr-place-ctrl--orientation-270 .sbb-sr-place-ctrl__text{inset-inline-start:5%}:host(:dir(rtl)) .sbb-sr-place-ctrl--type-bicycle .sbb-sr-place-ctrl__text{inset-inline-start:-10%}`;
|
|
16
16
|
let Ie = (() => {
|
|
17
|
-
var u,
|
|
18
|
-
let
|
|
17
|
+
var u, k, f, g, _, x, y, m, l;
|
|
18
|
+
let s = [ie("sbb-seat-reservation-place-control")], o, b = [], i, C = ae, z, T = [], w = [], S, P = [], R = [], L, $ = [], D = [], A, N = [], O = [], F, V = [], j = [], B, U = [], K = [], M, Y = [], q = [], G, H = [], J = [];
|
|
19
19
|
return l = class extends C {
|
|
20
20
|
constructor() {
|
|
21
21
|
super();
|
|
22
22
|
p(this, u);
|
|
23
|
+
p(this, k);
|
|
23
24
|
p(this, f);
|
|
24
|
-
p(this, _);
|
|
25
25
|
p(this, g);
|
|
26
|
-
p(this,
|
|
26
|
+
p(this, _);
|
|
27
27
|
p(this, x);
|
|
28
28
|
p(this, y);
|
|
29
29
|
p(this, m);
|
|
30
|
-
a(this, u, c(this, T, "SEAT")), a(this,
|
|
30
|
+
a(this, u, c(this, T, "SEAT")), a(this, k, (c(this, w), c(this, P, "FREE"))), a(this, f, (c(this, R), c(this, $, []))), a(this, g, (c(this, D), c(this, N, ""))), a(this, _, (c(this, O), c(this, V, null))), a(this, x, (c(this, j), c(this, U, null))), a(this, y, (c(this, K), c(this, Y, !1))), a(this, m, (c(this, q), c(this, H, "unfocus"))), this._language = (c(this, J), new ce(this)), this.addEventListener("click", () => this._selectPlace());
|
|
31
31
|
}
|
|
32
32
|
/** placeType of the place, e.g. 'SEAT', 'BICYCLE' */
|
|
33
33
|
get placeType() {
|
|
34
|
-
return
|
|
34
|
+
return n(this, u);
|
|
35
35
|
}
|
|
36
36
|
set placeType(t) {
|
|
37
37
|
a(this, u, t);
|
|
38
38
|
}
|
|
39
39
|
/** state of the place, e.g. 'FREE', 'SELECTED', 'BLOCKED' */
|
|
40
40
|
get state() {
|
|
41
|
-
return
|
|
41
|
+
return n(this, k);
|
|
42
42
|
}
|
|
43
43
|
set state(t) {
|
|
44
|
-
a(this,
|
|
44
|
+
a(this, k, t);
|
|
45
45
|
}
|
|
46
46
|
/** property ids of the place, to display more info about the place */
|
|
47
47
|
get propertyIds() {
|
|
48
|
-
return
|
|
48
|
+
return n(this, f);
|
|
49
49
|
}
|
|
50
50
|
set propertyIds(t) {
|
|
51
|
-
a(this,
|
|
51
|
+
a(this, f, t);
|
|
52
52
|
}
|
|
53
53
|
/** label of the place, e.g. '1A', '2B' */
|
|
54
54
|
get text() {
|
|
55
|
-
return
|
|
55
|
+
return n(this, g);
|
|
56
56
|
}
|
|
57
57
|
set text(t) {
|
|
58
58
|
a(this, g, t);
|
|
59
59
|
}
|
|
60
60
|
/** Deck Index Prop to identifier the right place to deck */
|
|
61
61
|
get deckIndex() {
|
|
62
|
-
return
|
|
62
|
+
return n(this, _);
|
|
63
63
|
}
|
|
64
64
|
set deckIndex(t) {
|
|
65
|
-
a(this,
|
|
65
|
+
a(this, _, t);
|
|
66
66
|
}
|
|
67
67
|
/** Coach Index Prop to identifier the right place to coach */
|
|
68
68
|
get coachIndex() {
|
|
69
|
-
return
|
|
69
|
+
return n(this, x);
|
|
70
70
|
}
|
|
71
71
|
set coachIndex(t) {
|
|
72
72
|
a(this, x, t);
|
|
73
73
|
}
|
|
74
74
|
/** Prevent click prop prevent any place action */
|
|
75
75
|
get preventClick() {
|
|
76
|
-
return
|
|
76
|
+
return n(this, y);
|
|
77
77
|
}
|
|
78
78
|
set preventClick(t) {
|
|
79
79
|
a(this, y, t);
|
|
80
80
|
}
|
|
81
81
|
/** Set the place focus outline style */
|
|
82
82
|
get keyfocus() {
|
|
83
|
-
return
|
|
83
|
+
return n(this, m);
|
|
84
84
|
}
|
|
85
85
|
set keyfocus(t) {
|
|
86
86
|
a(this, m, t);
|
|
@@ -89,18 +89,18 @@ let Ie = (() => {
|
|
|
89
89
|
super.willUpdate(t), t.has("keyfocus") && this.keyfocus === "focus" && this.focus();
|
|
90
90
|
}
|
|
91
91
|
render() {
|
|
92
|
-
const t = this._getPlaceSvg(this.placeType, this.state), e = this.type.toLowerCase(),
|
|
93
|
-
return this.title = this._getTitleDescriptionPlace(), this.tabIndex = -1,
|
|
92
|
+
const t = this._getPlaceSvg(this.placeType, this.state), e = this.type.toLowerCase(), r = this.state.toLowerCase(), Q = this.text, Z = this.style?.getPropertyValue("--sbb-seat-reservation-place-control-width"), ee = this.style?.getPropertyValue("--sbb-seat-reservation-place-control-height"), I = this.style?.getPropertyValue("--sbb-seat-reservation-place-control-rotation"), te = this.style?.getPropertyValue("--sbb-seat-reservation-place-control-text-rotation"), re = Number(te) - Number(I), se = this.preventClick ? "sbb-reservation-place-control--disabled" : null;
|
|
93
|
+
return this.title = this._getTitleDescriptionPlace(), this.tabIndex = -1, be`
|
|
94
94
|
<div
|
|
95
95
|
part="sbb-sr-place-part"
|
|
96
|
-
class="sbb-sr-place-ctrl sbb-sr-place-ctrl--orientation-${I} sbb-sr-place-ctrl--state-${
|
|
96
|
+
class="sbb-sr-place-ctrl sbb-sr-place-ctrl--orientation-${I} sbb-sr-place-ctrl--state-${r} sbb-sr-place-ctrl--type-${e} ${se}"
|
|
97
97
|
>
|
|
98
98
|
<sbb-seat-reservation-graphic
|
|
99
|
-
style=${
|
|
99
|
+
style=${ne({
|
|
100
100
|
"--sbb-seat-reservation-graphic-width": Z,
|
|
101
101
|
"--sbb-seat-reservation-graphic-height": ee,
|
|
102
102
|
"--sbb-seat-reservation-graphic-rotation": I,
|
|
103
|
-
"--sbb-seat-reservation-graphic-inverse-rotation":
|
|
103
|
+
"--sbb-seat-reservation-graphic-inverse-rotation": re
|
|
104
104
|
})}
|
|
105
105
|
.name=${t}
|
|
106
106
|
aria-hidden="true"
|
|
@@ -117,7 +117,7 @@ let Ie = (() => {
|
|
|
117
117
|
_getTitleDescriptionPlace() {
|
|
118
118
|
const t = "PLACE_CONTROL_" + this.type + "_" + this.state;
|
|
119
119
|
let e = E(t, this._language.current, [this.text]);
|
|
120
|
-
return this.propertyIds.length && (e += ". " + E("PLACE_PROPERTY", this._language.current).concat(": "), e += this.propertyIds.map((
|
|
120
|
+
return this.propertyIds.length && (e += ". " + E("PLACE_PROPERTY", this._language.current).concat(": "), e += this.propertyIds.map((r) => E(r, this._language.current)).join(", ")), e;
|
|
121
121
|
}
|
|
122
122
|
/** If the place selectable, we emit the placeSelection object which contains infos to the place state */
|
|
123
123
|
_selectPlace() {
|
|
@@ -138,28 +138,28 @@ let Ie = (() => {
|
|
|
138
138
|
}));
|
|
139
139
|
}
|
|
140
140
|
}
|
|
141
|
-
}, u = new WeakMap(),
|
|
141
|
+
}, u = new WeakMap(), k = new WeakMap(), f = new WeakMap(), g = new WeakMap(), _ = new WeakMap(), x = new WeakMap(), y = new WeakMap(), m = new WeakMap(), i = l, (() => {
|
|
142
142
|
const t = typeof Symbol == "function" && Symbol.metadata ? Object.create(C[Symbol.metadata] ?? null) : void 0;
|
|
143
|
-
z = [h(), v({ attribute: "type" })],
|
|
144
|
-
e.placeType =
|
|
145
|
-
} }, metadata: t }, T,
|
|
146
|
-
e.state =
|
|
147
|
-
} }, metadata: t }, P, R), d(l, null, L, { kind: "accessor", name: "propertyIds", static: !1, private: !1, access: { has: (e) => "propertyIds" in e, get: (e) => e.propertyIds, set: (e,
|
|
148
|
-
e.propertyIds =
|
|
149
|
-
} }, metadata: t }, $, D), d(l, null, A, { kind: "accessor", name: "text", static: !1, private: !1, access: { has: (e) => "text" in e, get: (e) => e.text, set: (e,
|
|
150
|
-
e.text =
|
|
151
|
-
} }, metadata: t }, N, O), d(l, null, F, { kind: "accessor", name: "deckIndex", static: !1, private: !1, access: { has: (e) => "deckIndex" in e, get: (e) => e.deckIndex, set: (e,
|
|
152
|
-
e.deckIndex =
|
|
153
|
-
} }, metadata: t }, V, j), d(l, null, B, { kind: "accessor", name: "coachIndex", static: !1, private: !1, access: { has: (e) => "coachIndex" in e, get: (e) => e.coachIndex, set: (e,
|
|
154
|
-
e.coachIndex =
|
|
155
|
-
} }, metadata: t }, U, K), d(l, null, M, { kind: "accessor", name: "preventClick", static: !1, private: !1, access: { has: (e) => "preventClick" in e, get: (e) => e.preventClick, set: (e,
|
|
156
|
-
e.preventClick =
|
|
157
|
-
} }, metadata: t }, Y, q), d(l, null, G, { kind: "accessor", name: "keyfocus", static: !1, private: !1, access: { has: (e) => "keyfocus" in e, get: (e) => e.keyfocus, set: (e,
|
|
158
|
-
e.keyfocus =
|
|
159
|
-
} }, metadata: t }, H, J), d(null, o = { value:
|
|
143
|
+
z = [h(), v({ attribute: "type" })], S = [h(), v({ attribute: "state" })], L = [v({ attribute: "propertyIds", type: Array })], A = [h(), v({ attribute: "text" })], F = [h(), v({ attribute: "deck-index", type: Number })], B = [h(), v({ attribute: "coach-index", type: Number })], M = [h(), v({ attribute: "prevent-click", type: Boolean })], G = [h(), v({ attribute: "keyfocus" })], d(l, null, z, { kind: "accessor", name: "placeType", static: !1, private: !1, access: { has: (e) => "placeType" in e, get: (e) => e.placeType, set: (e, r) => {
|
|
144
|
+
e.placeType = r;
|
|
145
|
+
} }, metadata: t }, T, w), d(l, null, S, { kind: "accessor", name: "state", static: !1, private: !1, access: { has: (e) => "state" in e, get: (e) => e.state, set: (e, r) => {
|
|
146
|
+
e.state = r;
|
|
147
|
+
} }, metadata: t }, P, R), d(l, null, L, { kind: "accessor", name: "propertyIds", static: !1, private: !1, access: { has: (e) => "propertyIds" in e, get: (e) => e.propertyIds, set: (e, r) => {
|
|
148
|
+
e.propertyIds = r;
|
|
149
|
+
} }, metadata: t }, $, D), d(l, null, A, { kind: "accessor", name: "text", static: !1, private: !1, access: { has: (e) => "text" in e, get: (e) => e.text, set: (e, r) => {
|
|
150
|
+
e.text = r;
|
|
151
|
+
} }, metadata: t }, N, O), d(l, null, F, { kind: "accessor", name: "deckIndex", static: !1, private: !1, access: { has: (e) => "deckIndex" in e, get: (e) => e.deckIndex, set: (e, r) => {
|
|
152
|
+
e.deckIndex = r;
|
|
153
|
+
} }, metadata: t }, V, j), d(l, null, B, { kind: "accessor", name: "coachIndex", static: !1, private: !1, access: { has: (e) => "coachIndex" in e, get: (e) => e.coachIndex, set: (e, r) => {
|
|
154
|
+
e.coachIndex = r;
|
|
155
|
+
} }, metadata: t }, U, K), d(l, null, M, { kind: "accessor", name: "preventClick", static: !1, private: !1, access: { has: (e) => "preventClick" in e, get: (e) => e.preventClick, set: (e, r) => {
|
|
156
|
+
e.preventClick = r;
|
|
157
|
+
} }, metadata: t }, Y, q), d(l, null, G, { kind: "accessor", name: "keyfocus", static: !1, private: !1, access: { has: (e) => "keyfocus" in e, get: (e) => e.keyfocus, set: (e, r) => {
|
|
158
|
+
e.keyfocus = r;
|
|
159
|
+
} }, metadata: t }, H, J), d(null, o = { value: i }, s, { kind: "class", name: i.name, metadata: t }, null, b), i = o.value, t && Object.defineProperty(i, Symbol.metadata, { enumerable: !0, configurable: !0, writable: !0, value: t });
|
|
160
160
|
})(), l.styles = pe, l.events = {
|
|
161
161
|
selectplace: "selectplace"
|
|
162
|
-
}, c(
|
|
162
|
+
}, c(i, b), i;
|
|
163
163
|
})();
|
|
164
164
|
export {
|
|
165
165
|
Ie as SbbSeatReservationPlaceControlElement
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
var
|
|
1
|
+
var ke = (t) => {
|
|
2
2
|
throw TypeError(t);
|
|
3
3
|
};
|
|
4
|
-
var
|
|
5
|
-
var f = (t, i, s) => (
|
|
4
|
+
var Ne = (t, i, s) => i.has(t) || ke("Cannot " + s);
|
|
5
|
+
var f = (t, i, s) => (Ne(t, i, "read from private field"), s ? s.call(t) : i.get(t)), y = (t, i, s) => i.has(t) ? ke("Cannot add the same private member more than once") : i instanceof WeakSet ? i.add(t) : i.set(t, s), l = (t, i, s, n) => (Ne(t, i, "write to private field"), n ? n.call(t, s) : i.set(t, s), s);
|
|
6
6
|
import { __runInitializers as o, __esDecorate as _ } from "tslib";
|
|
7
7
|
import { SbbLanguageController as nt } from "@sbb-esta/lyne-elements/core/controllers.js";
|
|
8
8
|
import { defaultDateAdapter as ze } from "@sbb-esta/lyne-elements/core/datetime.js";
|
|
9
|
-
import { forceType as
|
|
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
|
|
12
|
-
import { css as
|
|
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 ut } from "@sbb-esta/lyne-elements/core/i18n.js";
|
|
12
|
+
import { css as ht, LitElement as pt, nothing as g, html as c } from "lit";
|
|
13
13
|
import { customElement as mt, property as v } from "lit/decorators.js";
|
|
14
14
|
import { removeTimezoneFromISOTimeString as Fe, durationToTime as qe } from "../core/datetime.js";
|
|
15
15
|
import { isRideLeg as Je, getDepartureArrivalTimeAttribute as _t } from "../core/timetable.js";
|
|
@@ -18,7 +18,7 @@ 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
20
|
import { f as Be } from "../format-lqeCzmzS.js";
|
|
21
|
-
const ft =
|
|
21
|
+
const ft = ht`*,: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-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: 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-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)}}`, yt = (t, i) => c`<span class="sbb-timetable__row-transport">
|
|
22
22
|
<sbb-icon name=${t}></sbb-icon>
|
|
23
23
|
<span class="sbb-screen-reader-only">${i}</span>
|
|
24
24
|
</span>`, vt = (t, i) => {
|
|
@@ -70,24 +70,24 @@ const ft = ut`*,:before,:after{box-sizing:border-box}:host{--sbb-timetable-row-g
|
|
|
70
70
|
};
|
|
71
71
|
}
|
|
72
72
|
}, Tt = (t, i) => {
|
|
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: xt(
|
|
86
|
-
if (
|
|
87
|
-
const C =
|
|
73
|
+
const { summary: s, legs: n } = t || {}, u = n?.filter((C) => Je(C)), { tripStatus: p } = s || {};
|
|
74
|
+
if (p?.cancelled || p?.partiallyCancelled)
|
|
75
|
+
return { name: "cancellation", text: p?.cancelledText };
|
|
76
|
+
if (Ue(u))
|
|
77
|
+
return { name: "missed-connection", text: Ue(u) };
|
|
78
|
+
if (p?.alternative)
|
|
79
|
+
return { name: "alternative", text: p.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 (p?.delayed || p?.delayedUnknown)
|
|
85
|
+
return { name: "delay", text: xt(u) };
|
|
86
|
+
if (p?.quayChanged) {
|
|
87
|
+
const C = u[0].departure;
|
|
88
88
|
return {
|
|
89
89
|
name: "platform-change",
|
|
90
|
-
text: C.quayChanged ? C.quayChangedText :
|
|
90
|
+
text: C.quayChanged ? C.quayChangedText : ut[i]
|
|
91
91
|
};
|
|
92
92
|
}
|
|
93
93
|
return {};
|
|
@@ -101,15 +101,15 @@ const ft = ut`*,:before,:after{box-sizing:border-box}:host{--sbb-timetable-row-g
|
|
|
101
101
|
}, void 0);
|
|
102
102
|
}, Ct = (t) => {
|
|
103
103
|
const i = ["Z", "SB", "SZ", "VR", "TG"];
|
|
104
|
-
return t.filter((n,
|
|
104
|
+
return t.filter((n, u) => t.findIndex((p) => p.name === n.name) === u).filter((n) => i.includes(n.name)).sort((n, u) => i.indexOf(n.name) - i.indexOf(u.name));
|
|
105
105
|
}, Y = (t) => {
|
|
106
106
|
const i = At(t), s = Ct(t);
|
|
107
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];
|
|
108
108
|
};
|
|
109
109
|
let jt = (() => {
|
|
110
110
|
var z, I, L, R, M, E, O, P, D, F, b;
|
|
111
|
-
let t = [mt("sbb-timetable-row")], i, s = [], n,
|
|
112
|
-
return b = class extends
|
|
111
|
+
let t = [mt("sbb-timetable-row")], i, s = [], n, u = pt, p = [], C, X = [], Z = [], G, V = [], ee = [], te, ae = [], ie = [], se, re = [], ne = [], oe, le = [], ce = [], be, de = [], ge = [], ue, he = [], pe = [], me, _e = [], fe = [], ye, ve = [], xe = [], we, $e = [], Te = [], Ae;
|
|
112
|
+
return b = class extends u {
|
|
113
113
|
constructor() {
|
|
114
114
|
super(...arguments);
|
|
115
115
|
y(this, z);
|
|
@@ -122,7 +122,7 @@ let jt = (() => {
|
|
|
122
122
|
y(this, P);
|
|
123
123
|
y(this, D);
|
|
124
124
|
y(this, F);
|
|
125
|
-
l(this, z, (o(this,
|
|
125
|
+
l(this, z, (o(this, p), 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, he, !1))), l(this, P, (o(this, pe), 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
126
|
}
|
|
127
127
|
/** The trip Prop. */
|
|
128
128
|
get trip() {
|
|
@@ -224,7 +224,7 @@ let jt = (() => {
|
|
|
224
224
|
_renderSkeleton() {
|
|
225
225
|
return c`
|
|
226
226
|
<sbb-card size="l" class="sbb-loading">
|
|
227
|
-
${this.loadingPrice ? c`<sbb-card-badge class="sbb-loading__badge"></sbb-card-badge>` :
|
|
227
|
+
${this.loadingPrice ? c`<sbb-card-badge class="sbb-loading__badge"></sbb-card-badge>` : g}
|
|
228
228
|
<div class="sbb-loading__wrapper">
|
|
229
229
|
<div class="sbb-loading__row"></div>
|
|
230
230
|
<div class="sbb-loading__row"></div>
|
|
@@ -267,10 +267,10 @@ let jt = (() => {
|
|
|
267
267
|
};
|
|
268
268
|
}
|
|
269
269
|
_getAccessibilityText(a) {
|
|
270
|
-
const { summary: e, legs: r, notices: w } = a || {}, { departureWalk: d, arrivalWalk: W, departure: S, arrival: $, product: x, direction: H, occupancy:
|
|
270
|
+
const { summary: e, legs: r, notices: w } = a || {}, { departureWalk: d, arrivalWalk: W, departure: S, arrival: $, product: x, direction: H, occupancy: h, 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")}, ` : "";
|
|
271
271
|
let K = "";
|
|
272
|
-
|
|
273
|
-
const Se = w && Y(w).length && Y(w)?.map((
|
|
272
|
+
h && (h.firstClass && h.firstClass !== "UNKNOWN" && (K += `${Ee.first[this._language.current]} ${Oe[h.firstClass.toLowerCase()]?.[this._language.current]}.`), h.secondClass && h.secondClass !== "UNKNOWN" && (K += ` ${Ee.second[this._language.current]} ${Oe[h.secondClass.toLowerCase()]?.[this._language.current]}.`));
|
|
273
|
+
const Se = w && Y(w).length && Y(w)?.map((k, rt) => rt < 4 && k.text?.template).join(", ") + ", ", it = Se ? `${gt[this._language.current]}: ${Se}` : "", st = T && T > 0 ? `${Pe[this._language.current]} ${qe(T, this._language.current).long}, ` : "";
|
|
274
274
|
return [
|
|
275
275
|
Q,
|
|
276
276
|
Qe,
|
|
@@ -288,30 +288,30 @@ let jt = (() => {
|
|
|
288
288
|
tt,
|
|
289
289
|
K,
|
|
290
290
|
it
|
|
291
|
-
].map((
|
|
291
|
+
].map((k) => k?.trim()).filter((k) => k && k.length > 0).join(" ");
|
|
292
292
|
}
|
|
293
293
|
render() {
|
|
294
294
|
if (this.loadingTrip)
|
|
295
295
|
return this._renderSkeleton();
|
|
296
|
-
const { legs: a, id: e, notices: r, summary: w } = this.trip || {}, { product: d, direction: W, departureWalk: S, departure: $, arrival: x, arrivalWalk: H, occupancy:
|
|
296
|
+
const { legs: a, id: e, notices: r, summary: w } = this.trip || {}, { product: d, direction: W, departureWalk: S, departure: $, arrival: x, arrivalWalk: H, occupancy: h, 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
297
|
return c`
|
|
298
298
|
<sbb-card size="l" id=${e}>
|
|
299
299
|
<sbb-card-button
|
|
300
300
|
?active=${this.active}
|
|
301
|
-
aria-expanded=${this.accessibilityExpanded ? "true" :
|
|
301
|
+
aria-expanded=${this.accessibilityExpanded ? "true" : g}
|
|
302
302
|
>
|
|
303
303
|
${this.cardActionLabel ? this.cardActionLabel : this._getAccessibilityText(this.trip)}
|
|
304
304
|
</sbb-card-button>
|
|
305
|
-
${this.loadingPrice ? c`<sbb-card-badge class="sbb-loading__badge"></sbb-card-badge>` :
|
|
305
|
+
${this.loadingPrice ? c`<sbb-card-badge class="sbb-loading__badge"></sbb-card-badge>` : g}
|
|
306
306
|
${this.price && !this.loadingPrice ? c`<sbb-card-badge color=${this.price.isDiscount ? "charcoal" : "white"}>
|
|
307
307
|
${this.price.isDiscount ? c`<span aria-hidden="true">
|
|
308
308
|
%<span class="sbb-screen-reader-only"
|
|
309
309
|
>${Me[this._language.current]}</span
|
|
310
310
|
>
|
|
311
|
-
</span>` :
|
|
312
|
-
${this.price.text ? c`<span>${this.price.text}</span>` :
|
|
313
|
-
${this.price.price ? c`<span>${this.price.price}</span>` :
|
|
314
|
-
</sbb-card-badge>` :
|
|
311
|
+
</span>` : g}
|
|
312
|
+
${this.price.text ? c`<span>${this.price.text}</span>` : g}
|
|
313
|
+
${this.price.price ? c`<span>${this.price.price}</span>` : g}
|
|
314
|
+
</sbb-card-badge>` : g}
|
|
315
315
|
<div class="sbb-timetable__row" role="row">
|
|
316
316
|
<div class="sbb-timetable__row-header" role="gridcell">
|
|
317
317
|
<div class="sbb-timetable__row-details">
|
|
@@ -327,7 +327,7 @@ let jt = (() => {
|
|
|
327
327
|
</span>`}
|
|
328
328
|
${d && (d.corporateIdentityIcon ? yt(d.corporateIdentityIcon, d.name) : d.vehicleSubModeShortName && vt(d.vehicleSubModeShortName, d?.line))}
|
|
329
329
|
</div>
|
|
330
|
-
${W ? c`<p>${`${Le[this._language.current]} ${W}`}</p>` :
|
|
330
|
+
${W ? c`<p>${`${Le[this._language.current]} ${W}`}</p>` : g}
|
|
331
331
|
</div>
|
|
332
332
|
<sbb-pearl-chain-time
|
|
333
333
|
role="gridcell"
|
|
@@ -342,18 +342,18 @@ let jt = (() => {
|
|
|
342
342
|
></sbb-pearl-chain-time>
|
|
343
343
|
<div class="sbb-timetable__row-footer" role="gridcell">
|
|
344
344
|
${d && $?.quayFormatted ? c`<span
|
|
345
|
-
class=${$?.quayChanged ? "sbb-timetable__row-quay--changed" :
|
|
345
|
+
class=${$?.quayChanged ? "sbb-timetable__row-quay--changed" : g}
|
|
346
346
|
>
|
|
347
347
|
<span class="sbb-screen-reader-only">
|
|
348
348
|
${`${Ie[this._language.current]} ${$?.quayChanged ? De[this._language.current] : ""}`}
|
|
349
349
|
|
|
350
350
|
</span>
|
|
351
351
|
${this._renderQuayType()} ${$?.quayFormatted}
|
|
352
|
-
</span>` :
|
|
353
|
-
${
|
|
354
|
-
.firstClassOccupancy=${
|
|
355
|
-
.secondClassOccupancy=${
|
|
356
|
-
></sbb-timetable-occupancy>` :
|
|
352
|
+
</span>` : g}
|
|
353
|
+
${h?.firstClass && h?.firstClass !== "UNKNOWN" || h?.secondClass && h.secondClass !== "UNKNOWN" ? c`<sbb-timetable-occupancy
|
|
354
|
+
.firstClassOccupancy=${h?.firstClass?.toLowerCase()}
|
|
355
|
+
.secondClassOccupancy=${h?.secondClass?.toLowerCase()}
|
|
356
|
+
></sbb-timetable-occupancy>` : g}
|
|
357
357
|
${A && A.length || this.boarding ? c`<ul class="sbb-timetable__row-hints" role="list">
|
|
358
358
|
${A?.map((U, Q) => Q < 4 ? c`<li>
|
|
359
359
|
<sbb-icon
|
|
@@ -361,7 +361,7 @@ let jt = (() => {
|
|
|
361
361
|
name=${"sa-" + U.name?.toLowerCase()}
|
|
362
362
|
></sbb-icon>
|
|
363
363
|
<span class="sbb-screen-reader-only">${U.text?.template}</span>
|
|
364
|
-
</li>` :
|
|
364
|
+
</li>` : g)}
|
|
365
365
|
${this.boarding ? c`<li>
|
|
366
366
|
<sbb-icon
|
|
367
367
|
class="sbb-travel-hints__item"
|
|
@@ -369,26 +369,26 @@ let jt = (() => {
|
|
|
369
369
|
aria-label=${this.boarding?.text}
|
|
370
370
|
aria-hidden="false"
|
|
371
371
|
></sbb-icon>
|
|
372
|
-
</li>` :
|
|
373
|
-
</ul>` :
|
|
372
|
+
</li>` : g}
|
|
373
|
+
</ul>` : g}
|
|
374
374
|
${T && T > 0 ? c`<time>
|
|
375
375
|
<span class="sbb-screen-reader-only">
|
|
376
376
|
${`${Pe[this._language.current]} ${B.long}`}
|
|
377
377
|
</span>
|
|
378
378
|
<span aria-hidden="true">${B.short}</span>
|
|
379
|
-
</time>` :
|
|
379
|
+
</time>` : g}
|
|
380
380
|
${q && (m.cus || m.him) ? c`<span class="sbb-timetable__row-warning">
|
|
381
381
|
<sbb-icon name=${(m.cus || m.him).name}></sbb-icon>
|
|
382
382
|
<span class="sbb-screen-reader-only">${(m.cus || m.him).text}</span>
|
|
383
|
-
</span>` :
|
|
383
|
+
</span>` : g}
|
|
384
384
|
</div>
|
|
385
385
|
</div>
|
|
386
386
|
</sbb-card>
|
|
387
387
|
`;
|
|
388
388
|
}
|
|
389
389
|
}, 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
|
-
C = [v({ type: Object })], G = [v({ type: Object })], te = [
|
|
390
|
+
const a = typeof Symbol == "function" && Symbol.metadata ? Object.create(u[Symbol.metadata] ?? null) : void 0;
|
|
391
|
+
C = [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 })], ue = [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, C, { kind: "accessor", name: "trip", static: !1, private: !1, access: { has: (e) => "trip" in e, get: (e) => e.trip, set: (e, r) => {
|
|
392
392
|
e.trip = r;
|
|
393
393
|
} }, 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
394
|
e.price = r;
|
|
@@ -400,9 +400,9 @@ let jt = (() => {
|
|
|
400
400
|
e.loadingTrip = r;
|
|
401
401
|
} }, 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
402
|
e.a11yFootpath = r;
|
|
403
|
-
} }, metadata: a }, de,
|
|
403
|
+
} }, metadata: a }, de, ge), _(b, null, ue, { kind: "accessor", name: "loadingPrice", static: !1, private: !1, access: { has: (e) => "loadingPrice" in e, get: (e) => e.loadingPrice, set: (e, r) => {
|
|
404
404
|
e.loadingPrice = r;
|
|
405
|
-
} }, metadata: a },
|
|
405
|
+
} }, metadata: a }, he, pe), _(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
406
|
e.cardActionLabel = r;
|
|
407
407
|
} }, 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
408
|
e.accessibilityExpanded = r;
|
|
@@ -410,7 +410,7 @@ let jt = (() => {
|
|
|
410
410
|
e.active = r;
|
|
411
411
|
} }, 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
412
|
e.now = r;
|
|
413
|
-
} }, metadata: a }, null,
|
|
413
|
+
} }, metadata: a }, null, p), _(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 });
|
|
414
414
|
})(), b.styles = ft, o(n, s), n;
|
|
415
415
|
})();
|
|
416
416
|
export {
|