@sbb-esta/lyne-elements-experimental-dev 5.0.0-next.3-dev.1779265358 → 5.0.0-next.3-dev.1779279798
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/core/styles/{theme.scss → _theme.scss} +1 -1
- package/core/styles/{core.scss → features/core.scss} +1 -1
- package/development/autocomplete-grid/autocomplete-grid-button/autocomplete-grid-button.component.d.ts.map +1 -1
- package/development/autocomplete-grid/autocomplete-grid-button/autocomplete-grid-button.component.js +54 -83
- package/development/autocomplete-grid-option.component-D9pTXPlu.js +1 -1
- package/development/autocomplete-grid-row.component-CBHh50jC.js +1 -1
- package/development/journey-summary/journey-summary.component.js +1 -1
- package/development/journey-summary.component-Bjf9cIpR.js +341 -0
- 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/seat-reservation.component.d.ts.map +1 -1
- package/development/seat-reservation/seat-reservation/seat-reservation.component.js +1 -1
- package/development/seat-reservation/seat-reservation-area/seat-reservation-area.component.js +1 -1
- package/development/seat-reservation/seat-reservation-graphic/seat-reservation-graphic.component.js +1 -1
- package/development/seat-reservation/seat-reservation-navigation-coach/seat-reservation-navigation-coach.component.d.ts.map +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-n9HVhAW1.js +438 -0
- 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.component-CR5QYNWZ.js +473 -0
- package/development/seat-reservation.js +6 -6
- package/development/seat-reservation.pure.js +6 -6
- package/development/timetable-duration/timetable-duration.component.js +1 -1
- package/development/timetable-duration.component-QutPySyE.js +96 -0
- package/development/timetable-duration.js +1 -1
- package/development/timetable-duration.pure.js +1 -1
- package/development/timetable-row/timetable-row.component.d.ts.map +1 -1
- package/development/timetable-row/timetable-row.component.js +1 -1
- package/development/timetable-row.component-2GBdtFiF.js +736 -0
- 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 -6
- package/pearl-chain/pearl-chain.component.js +1 -1
- package/pearl-chain-time/pearl-chain-time.component.js +1 -1
- package/{pearl-chain-time.component-D5OCEBJ_.js → pearl-chain-time.component-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/seat-reservation.component.js +1 -1
- package/seat-reservation/seat-reservation-area/seat-reservation-area.component.js +1 -1
- package/seat-reservation/seat-reservation-graphic/seat-reservation-graphic.component.js +1 -1
- package/seat-reservation/seat-reservation-navigation-coach/seat-reservation-navigation-coach.component.js +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-DMKlwxPa.js +338 -0
- 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.component-VhMc8Rqt.js → seat-reservation.component-TLuTP9Nm.js} +77 -76
- package/seat-reservation.js +6 -6
- package/seat-reservation.pure.js +6 -6
- 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-Din-TQ9u.js → timetable-row.component-DMiay4xK.js} +87 -83
- package/timetable-row.js +1 -1
- package/timetable-row.pure.js +1 -1
- package/core.css +0 -13
- package/development/journey-summary.component-De1ioDRq.js +0 -341
- package/development/seat-reservation-navigation-coach.component-9ySnZIKH.js +0 -434
- package/development/seat-reservation.component-BGvVv6rJ.js +0 -472
- package/development/timetable-duration.component-fBla8Kue.js +0 -96
- package/development/timetable-row.component-DSTGtQAC.js +0 -732
- package/seat-reservation-navigation-coach.component-BkqPWUtu.js +0 -334
- package/timetable-duration.component-DPRcG1LP.js +0 -61
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { SbbButtonBaseElement as e, SbbLanguageController as t, forceType as n } from "@sbb-esta/lyne-elements/core.js";
|
|
2
|
+
import { html as r, nothing as i, unsafeCSS as a } from "lit";
|
|
3
|
+
import { __esDecorate as o, __runInitializers as s } from "tslib";
|
|
4
4
|
import { property as c } from "lit/decorators.js";
|
|
5
5
|
import { styleMap as l } from "lit/directives/style-map.js";
|
|
6
6
|
import { getI18nSeatReservation as u } from "./seat-reservation/common/translations.js";
|
|
@@ -17,29 +17,29 @@ var f = ":host{--sbb-seat-reservation-place-control-text-scale-value: 1;--sbb-se
|
|
|
17
17
|
}), this._detail = e;
|
|
18
18
|
}
|
|
19
19
|
}, m = (() => {
|
|
20
|
-
let m =
|
|
20
|
+
let m = e, h, g = [], _ = [], v, y = [], b = [], x, S = [], C = [], w, T = [], E = [], D, O = [], k = [], A, j = [], M = [], N, P = [], F = [], I, L = [], R = [], z, B = [], V = [], H, U = [], W = [];
|
|
21
21
|
return class extends m {
|
|
22
22
|
static {
|
|
23
|
-
let
|
|
24
|
-
h = [
|
|
23
|
+
let e = typeof Symbol == "function" && Symbol.metadata ? Object.create(m[Symbol.metadata] ?? null) : void 0;
|
|
24
|
+
h = [n(), c({ attribute: "type" })], v = [n(), c({
|
|
25
25
|
attribute: "state",
|
|
26
26
|
reflect: !0
|
|
27
27
|
})], x = [c({ attribute: "travel-direction" })], w = [c({
|
|
28
28
|
attribute: "propertyIds",
|
|
29
29
|
type: Array
|
|
30
|
-
})], D = [
|
|
30
|
+
})], D = [n(), c({ attribute: "text" })], A = [n(), c({
|
|
31
31
|
attribute: "deck-index",
|
|
32
32
|
type: Number
|
|
33
|
-
})], N = [
|
|
33
|
+
})], N = [n(), c({
|
|
34
34
|
attribute: "coach-index",
|
|
35
35
|
type: Number
|
|
36
|
-
})], I = [
|
|
36
|
+
})], I = [n(), c({
|
|
37
37
|
attribute: "prevent-click",
|
|
38
38
|
type: Boolean
|
|
39
|
-
})], z = [
|
|
39
|
+
})], z = [n(), c({ attribute: "keyfocus" })], H = [n(), c({
|
|
40
40
|
type: Boolean,
|
|
41
41
|
useDefault: !0
|
|
42
|
-
})],
|
|
42
|
+
})], o(this, null, h, {
|
|
43
43
|
kind: "accessor",
|
|
44
44
|
name: "placeType",
|
|
45
45
|
static: !1,
|
|
@@ -51,8 +51,8 @@ var f = ":host{--sbb-seat-reservation-place-control-text-scale-value: 1;--sbb-se
|
|
|
51
51
|
e.placeType = t;
|
|
52
52
|
}
|
|
53
53
|
},
|
|
54
|
-
metadata:
|
|
55
|
-
}, g, _),
|
|
54
|
+
metadata: e
|
|
55
|
+
}, g, _), o(this, null, v, {
|
|
56
56
|
kind: "accessor",
|
|
57
57
|
name: "state",
|
|
58
58
|
static: !1,
|
|
@@ -64,8 +64,8 @@ var f = ":host{--sbb-seat-reservation-place-control-text-scale-value: 1;--sbb-se
|
|
|
64
64
|
e.state = t;
|
|
65
65
|
}
|
|
66
66
|
},
|
|
67
|
-
metadata:
|
|
68
|
-
}, y, b),
|
|
67
|
+
metadata: e
|
|
68
|
+
}, y, b), o(this, null, x, {
|
|
69
69
|
kind: "accessor",
|
|
70
70
|
name: "travelDirection",
|
|
71
71
|
static: !1,
|
|
@@ -77,8 +77,8 @@ var f = ":host{--sbb-seat-reservation-place-control-text-scale-value: 1;--sbb-se
|
|
|
77
77
|
e.travelDirection = t;
|
|
78
78
|
}
|
|
79
79
|
},
|
|
80
|
-
metadata:
|
|
81
|
-
}, S, C),
|
|
80
|
+
metadata: e
|
|
81
|
+
}, S, C), o(this, null, w, {
|
|
82
82
|
kind: "accessor",
|
|
83
83
|
name: "propertyIds",
|
|
84
84
|
static: !1,
|
|
@@ -90,8 +90,8 @@ var f = ":host{--sbb-seat-reservation-place-control-text-scale-value: 1;--sbb-se
|
|
|
90
90
|
e.propertyIds = t;
|
|
91
91
|
}
|
|
92
92
|
},
|
|
93
|
-
metadata:
|
|
94
|
-
}, T, E),
|
|
93
|
+
metadata: e
|
|
94
|
+
}, T, E), o(this, null, D, {
|
|
95
95
|
kind: "accessor",
|
|
96
96
|
name: "text",
|
|
97
97
|
static: !1,
|
|
@@ -103,8 +103,8 @@ var f = ":host{--sbb-seat-reservation-place-control-text-scale-value: 1;--sbb-se
|
|
|
103
103
|
e.text = t;
|
|
104
104
|
}
|
|
105
105
|
},
|
|
106
|
-
metadata:
|
|
107
|
-
}, O, k),
|
|
106
|
+
metadata: e
|
|
107
|
+
}, O, k), o(this, null, A, {
|
|
108
108
|
kind: "accessor",
|
|
109
109
|
name: "deckIndex",
|
|
110
110
|
static: !1,
|
|
@@ -116,8 +116,8 @@ var f = ":host{--sbb-seat-reservation-place-control-text-scale-value: 1;--sbb-se
|
|
|
116
116
|
e.deckIndex = t;
|
|
117
117
|
}
|
|
118
118
|
},
|
|
119
|
-
metadata:
|
|
120
|
-
}, j, M),
|
|
119
|
+
metadata: e
|
|
120
|
+
}, j, M), o(this, null, N, {
|
|
121
121
|
kind: "accessor",
|
|
122
122
|
name: "coachIndex",
|
|
123
123
|
static: !1,
|
|
@@ -129,8 +129,8 @@ var f = ":host{--sbb-seat-reservation-place-control-text-scale-value: 1;--sbb-se
|
|
|
129
129
|
e.coachIndex = t;
|
|
130
130
|
}
|
|
131
131
|
},
|
|
132
|
-
metadata:
|
|
133
|
-
}, P, F),
|
|
132
|
+
metadata: e
|
|
133
|
+
}, P, F), o(this, null, I, {
|
|
134
134
|
kind: "accessor",
|
|
135
135
|
name: "preventClick",
|
|
136
136
|
static: !1,
|
|
@@ -142,8 +142,8 @@ var f = ":host{--sbb-seat-reservation-place-control-text-scale-value: 1;--sbb-se
|
|
|
142
142
|
e.preventClick = t;
|
|
143
143
|
}
|
|
144
144
|
},
|
|
145
|
-
metadata:
|
|
146
|
-
}, L, R),
|
|
145
|
+
metadata: e
|
|
146
|
+
}, L, R), o(this, null, z, {
|
|
147
147
|
kind: "accessor",
|
|
148
148
|
name: "keyfocus",
|
|
149
149
|
static: !1,
|
|
@@ -155,8 +155,8 @@ var f = ":host{--sbb-seat-reservation-place-control-text-scale-value: 1;--sbb-se
|
|
|
155
155
|
e.keyfocus = t;
|
|
156
156
|
}
|
|
157
157
|
},
|
|
158
|
-
metadata:
|
|
159
|
-
}, B, V),
|
|
158
|
+
metadata: e
|
|
159
|
+
}, B, V), o(this, null, H, {
|
|
160
160
|
kind: "accessor",
|
|
161
161
|
name: "showTitleInfo",
|
|
162
162
|
static: !1,
|
|
@@ -168,12 +168,12 @@ var f = ":host{--sbb-seat-reservation-place-control-text-scale-value: 1;--sbb-se
|
|
|
168
168
|
e.showTitleInfo = t;
|
|
169
169
|
}
|
|
170
170
|
},
|
|
171
|
-
metadata:
|
|
172
|
-
}, U, W),
|
|
171
|
+
metadata: e
|
|
172
|
+
}, U, W), e && Object.defineProperty(this, Symbol.metadata, {
|
|
173
173
|
enumerable: !0,
|
|
174
174
|
configurable: !0,
|
|
175
175
|
writable: !0,
|
|
176
|
-
value:
|
|
176
|
+
value: e
|
|
177
177
|
});
|
|
178
178
|
}
|
|
179
179
|
static {
|
|
@@ -183,7 +183,7 @@ var f = ":host{--sbb-seat-reservation-place-control-text-scale-value: 1;--sbb-se
|
|
|
183
183
|
this.elementDependencies = [d];
|
|
184
184
|
}
|
|
185
185
|
static {
|
|
186
|
-
this.styles = [
|
|
186
|
+
this.styles = [a(f)];
|
|
187
187
|
}
|
|
188
188
|
static {
|
|
189
189
|
this.events = { selectplace: "selectplace" };
|
|
@@ -259,28 +259,28 @@ var f = ":host{--sbb-seat-reservation-place-control-text-scale-value: 1;--sbb-se
|
|
|
259
259
|
this.#l = e;
|
|
260
260
|
}
|
|
261
261
|
constructor() {
|
|
262
|
-
super(), this.#e =
|
|
262
|
+
super(), this.#e = s(this, g, "SEAT"), this.#t = (s(this, _), s(this, y, "FREE")), this.#n = (s(this, b), s(this, S, "NONE")), this.#r = (s(this, C), s(this, T, [])), this.#i = (s(this, E), s(this, O, "")), this.#a = (s(this, k), s(this, j, null)), this.#o = (s(this, M), s(this, P, null)), this.#s = (s(this, F), s(this, L, !1)), this.#c = (s(this, R), s(this, B, "unfocus")), this.#l = (s(this, V), s(this, U, !1)), this._language = (s(this, W), new t(this)), this.addEventListener("click", () => this._selectPlace());
|
|
263
263
|
}
|
|
264
264
|
willUpdate(e) {
|
|
265
265
|
super.willUpdate(e), e.has("keyfocus") && this.keyfocus === "focus" && this.focus();
|
|
266
266
|
}
|
|
267
267
|
render() {
|
|
268
|
-
let e = this._getPlaceSvg(this.placeType, this.state), t = this.type.toLowerCase(), n = this.state.toLowerCase(),
|
|
269
|
-
return this.showTitleInfo ? (this.title = p, this.internals.ariaLabel = null) : (this.internals.ariaLabel = p, this.removeAttribute("title")), this.tabIndex = -1,
|
|
268
|
+
let e = this._getPlaceSvg(this.placeType, this.state), t = this.type.toLowerCase(), n = this.state.toLowerCase(), a = this.text, o = this.style?.getPropertyValue("--sbb-seat-reservation-place-control-width"), s = this.style?.getPropertyValue("--sbb-seat-reservation-place-control-height"), c = this.style?.getPropertyValue("--sbb-seat-reservation-place-control-rotation"), u = this.style?.getPropertyValue("--sbb-seat-reservation-place-control-text-rotation"), d = Number(u) - Number(c), f = this.preventClick ? "sbb-reservation-place-control--disabled" : null, p = this._getTitleDescriptionPlace(c);
|
|
269
|
+
return this.showTitleInfo ? (this.title = p, this.internals.ariaLabel = null) : (this.internals.ariaLabel = p, this.removeAttribute("title")), this.tabIndex = -1, r` <div
|
|
270
270
|
part="sbb-sr-place-part"
|
|
271
271
|
class="sbb-sr-place-ctrl sbb-sr-place-ctrl--orientation-${c} sbb-sr-place-ctrl--state-${n} sbb-sr-place-ctrl--type-${t} ${f}"
|
|
272
272
|
aria-hidden="true"
|
|
273
273
|
>
|
|
274
274
|
<sbb-seat-reservation-graphic
|
|
275
275
|
style=${l({
|
|
276
|
-
"--sbb-seat-reservation-graphic-width":
|
|
276
|
+
"--sbb-seat-reservation-graphic-width": o,
|
|
277
277
|
"--sbb-seat-reservation-graphic-height": s,
|
|
278
278
|
"--sbb-seat-reservation-graphic-rotation": c,
|
|
279
279
|
"--sbb-seat-reservation-graphic-inverse-rotation": d
|
|
280
280
|
})}
|
|
281
281
|
.name=${e}
|
|
282
282
|
></sbb-seat-reservation-graphic>
|
|
283
|
-
<span ${this.text ??
|
|
283
|
+
<span ${this.text ?? i} class="sbb-sr-place-ctrl__text">${a} </span>
|
|
284
284
|
</div>`;
|
|
285
285
|
}
|
|
286
286
|
_getPlaceSvg(e, t) {
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import { SeatReservationBaseElement as e } from "./seat-reservation/seat-reservation/seat-reservation-base-element.js";
|
|
2
2
|
import { SbbSecondaryButtonElement as t } from "@sbb-esta/lyne-elements/button.pure.js";
|
|
3
|
-
import { SbbLanguageController as n,
|
|
4
|
-
import { html as
|
|
5
|
-
import { styleMap as
|
|
6
|
-
import { classMap as
|
|
7
|
-
import { getI18nSeatReservation as
|
|
8
|
-
import { SbbSeatReservationGraphicElement as
|
|
9
|
-
import { SbbPopoverElement as
|
|
10
|
-
import { repeat as
|
|
11
|
-
import { SbbSeatReservationAreaElement as
|
|
12
|
-
import { SbbSeatReservationNavigationCoachElement as
|
|
13
|
-
import { SbbSeatReservationPlaceControlElement as
|
|
14
|
-
import { SbbSeatReservationScopedElement as
|
|
3
|
+
import { SbbLanguageController as n, listResetStyles as r, screenReaderOnlyStyles as i, scrollbarStyles as a } from "@sbb-esta/lyne-elements/core.js";
|
|
4
|
+
import { html as o, isServer as s, nothing as c, unsafeCSS as l } from "lit";
|
|
5
|
+
import { styleMap as u } from "lit/directives/style-map.js";
|
|
6
|
+
import { classMap as d } from "lit/directives/class-map.js";
|
|
7
|
+
import { getI18nSeatReservation as f } from "./seat-reservation/common/translations.js";
|
|
8
|
+
import { SbbSeatReservationGraphicElement as p } from "./seat-reservation/seat-reservation-graphic/seat-reservation-graphic.component.js";
|
|
9
|
+
import { SbbPopoverElement as m } from "@sbb-esta/lyne-elements/popover.pure.js";
|
|
10
|
+
import { repeat as h } from "lit/directives/repeat.js";
|
|
11
|
+
import { SbbSeatReservationAreaElement as g } from "./seat-reservation/seat-reservation-area/seat-reservation-area.component.js";
|
|
12
|
+
import { SbbSeatReservationNavigationCoachElement as _ } from "./seat-reservation/seat-reservation-navigation-coach/seat-reservation-navigation-coach.component.js";
|
|
13
|
+
import { SbbSeatReservationPlaceControlElement as v } from "./seat-reservation/seat-reservation-place-control/seat-reservation-place-control.component.js";
|
|
14
|
+
import { SbbSeatReservationScopedElement as y } from "./seat-reservation/seat-reservation-scoped/seat-reservation-scoped.component.js";
|
|
15
15
|
//#region src/elements-experimental/seat-reservation/seat-reservation/seat-reservation.scss?inline
|
|
16
|
-
var
|
|
16
|
+
var b = ":host{--sbb-seat-reservation-grid-size: 16px;--sbb-seat-reservation-height: 0;--sbb-seat-reservation-decks: 1;display:block;height:inherit}:host ::part(coach-floor){fill:var(--sbb-background-color-2)}@media(forced-colors:active){:host ::part(coach-floor){fill:transparent}}: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(coach-floor){rotate:180deg}.sbb-sr-popover{margin-block:calc(4 * var(--sbb-seat-reservation-one-px-rem, .0625rem))}:host([align-vertical]) .sbb-sr__component{flex-direction:row-reverse;justify-content:flex-end;gap:calc(22 * var(--sbb-seat-reservation-one-px-rem, .0625rem));height:inherit}@media(min-width:37.5rem){:host([align-vertical]) .sbb-sr__component{gap:calc(54 * var(--sbb-seat-reservation-one-px-rem, .0625rem))}}:host([align-vertical]) .sbb-sr__component nav.sbb-sr-navigation,:host([align-vertical]) .sbb-sr__component ul.sbb-sr-navigation__list-coaches{flex-direction:column}:host([align-vertical]) .sbb-sr__component nav.sbb-sr-navigation{padding:calc(16 * var(--sbb-seat-reservation-one-px-rem, .0625rem)) 0}:host([align-vertical]) .sbb-sr__component nav.sbb-sr-navigation .sbb-sr__navigation-control-button{left:calc(1 * var(--sbb-seat-reservation-one-px-rem, .0625rem));top:0;rotate:90deg}@media(min-width:64rem){:host([align-vertical]) .sbb-sr__component nav.sbb-sr-navigation .sbb-sr__navigation-control-button{left:calc(-1 * var(--sbb-seat-reservation-one-px-rem, .0625rem))}}:host([align-vertical]) .sbb-sr__component nav.sbb-sr-navigation ul.sbb-sr-navigation__list-coaches{max-width:initial;padding:calc(5 * var(--sbb-seat-reservation-one-px-rem, .0625rem));overflow:hidden scroll}:host([align-vertical]) .sbb-sr__component nav.sbb-sr-navigation ul.sbb-sr-navigation__list-coaches li{display:flex}:host([align-vertical]) .sbb-sr__wrapper-coach-decks{flex-direction:column}:host([align-vertical]) .sbb-sr__wrapper-coach-decks .sbb-sr__wrapper-deck-labels{flex-direction:column-reverse;width:calc((var(--sbb-seat-reservation-height) + 24) * var(--sbb-seat-reservation-one-px-rem, .0625rem));height:initial}:host([align-vertical]) .sbb-sr__wrapper-coach-decks .sbb-sr__wrapper-deck-labels b{inline-size:calc(50% - 16 * var(--sbb-seat-reservation-one-px-rem, .0625rem));block-size:calc(20 * var(--sbb-seat-reservation-one-px-rem, .0625rem));margin-bottom:calc(16 * var(--sbb-seat-reservation-one-px-rem, .0625rem));rotate:initial;writing-mode:initial}:host([align-vertical]) .sbb-sr__wrapper-scrollarea{width:calc((var(--sbb-seat-reservation-height) + 24) * var(--sbb-seat-reservation-one-px-rem, .0625rem));height:100%;overflow:hidden scroll}:host([align-vertical]) .sbb-sr__wrapper-scrollarea .sbb-sr__parent{rotate:90deg}:host([align-vertical]) .sbb-sr-travel-direction-wrapper{width:calc(var(--sbb-seat-reservation-height) * var(--sbb-seat-reservation-one-px-rem, .0625rem));margin-block-start:calc(4 * var(--sbb-seat-reservation-one-px-rem, .0625rem))}.sbb-sr-navigation{gap:calc(3 * var(--sbb-seat-reservation-one-px-rem, .0625rem))}.sbb-sr-navigation .sbb-sr__navigation-control-button{position:relative;top:calc(2 * var(--sbb-seat-reservation-one-px-rem, .0625rem))}@media(min-width:64rem){.sbb-sr-navigation .sbb-sr__navigation-control-button{top:0}}.sbb-sr__component{display:flex;flex-direction:column;gap:calc(64 * var(--sbb-seat-reservation-one-px-rem, .0625rem) - 16px)}.sbb-sr-travel-direction-wrapper{display:flex;justify-content:center;align-items:center;column-gap:calc(4 * var(--sbb-seat-reservation-one-px-rem, .0625rem));margin-block:calc(8 * var(--sbb-seat-reservation-one-px-rem, .0625rem)) calc(4 * var(--sbb-seat-reservation-one-px-rem, .0625rem));font-size:var(--sbb-text-font-size-s)}.sbb-sr-travel-direction-wrapper .sbb-sr__travel-direction--arrow{display:flex;align-items:center}.sbb-sr-navigation-wrapper{display:flex}.sbb-sr-navigation{display:flex;justify-content:center;width:100%;padding-inline:16px}.sbb-sr-navigation__list-coaches{display:flex;flex-wrap:nowrap;gap:calc(4 * var(--sbb-seat-reservation-one-px-rem, .0625rem));padding:calc(6 * var(--sbb-seat-reservation-one-px-rem, .0625rem)) calc(5 * var(--sbb-seat-reservation-one-px-rem, .0625rem)) 0;max-width:856px;--sbb-scrollbar-color: transparent;overflow:scroll hidden;position:relative}.sbb-sr__wrapper-coach-decks{display:flex;overflow:hidden;height:inherit}.sbb-sr__wrapper-coach-decks .sbb-sr__wrapper-deck-labels{display:flex;justify-content:space-between;height:calc(var(--sbb-seat-reservation-height) * var(--sbb-seat-reservation-one-px-rem, .0625rem));writing-mode:vertical-lr}.sbb-sr__wrapper-coach-decks .sbb-sr__wrapper-deck-labels b{height:calc(50% - 16 * var(--sbb-seat-reservation-one-px-rem, .0625rem));width:calc(20 * var(--sbb-seat-reservation-one-px-rem, .0625rem));margin-block-end:16px;rotate:180deg;text-align:center;line-height:calc(20 * var(--sbb-seat-reservation-one-px-rem, .0625rem))}.sbb-sr__wrapper-scrollarea{overflow:scroll hidden;padding-block:calc(8 * var(--sbb-seat-reservation-one-px-rem, .0625rem)) calc(16 * var(--sbb-seat-reservation-one-px-rem, .0625rem))}.sbb-sr__wrapper-scrollarea .sbb-sr__parent{display:flex;flex-direction:column;position:relative}.sbb-sr__list-decks{display:flex;flex-direction:column}.sbb-sr__list-decks--gap{gap:calc(48 * var(--sbb-seat-reservation-one-px-rem, .0625rem))}.sbb-sr__list-item-deck{position:relative}.sbb-sr__list-coaches{display:flex;gap:calc(4 * var(--sbb-seat-reservation-one-px-rem, .0625rem))}.sbb-sr__list-decks:has(.sbb-sr-coach-has-overhanging-elements) .sbb-sr__list-coaches{gap:calc(8 * var(--sbb-seat-reservation-one-px-rem, .0625rem))}.sbb-sr__item-coach{position:relative}.sbb-sr-coach-wrapper__table{outline:0}", x = class extends e {
|
|
17
17
|
constructor() {
|
|
18
18
|
super(...arguments), this._language = new n(this);
|
|
19
19
|
}
|
|
@@ -23,19 +23,20 @@ var y = ":host{--sbb-seat-reservation-grid-size: 16px;--sbb-seat-reservation-hei
|
|
|
23
23
|
static {
|
|
24
24
|
this.elementDependencies = [
|
|
25
25
|
t,
|
|
26
|
+
m,
|
|
27
|
+
g,
|
|
26
28
|
p,
|
|
27
|
-
|
|
28
|
-
f,
|
|
29
|
+
v,
|
|
29
30
|
_,
|
|
30
|
-
|
|
31
|
-
v
|
|
31
|
+
y
|
|
32
32
|
];
|
|
33
33
|
}
|
|
34
34
|
static {
|
|
35
35
|
this.styles = [
|
|
36
|
-
i,
|
|
37
36
|
r,
|
|
38
|
-
|
|
37
|
+
a,
|
|
38
|
+
i,
|
|
39
|
+
l(b)
|
|
39
40
|
];
|
|
40
41
|
}
|
|
41
42
|
willUpdate(e) {
|
|
@@ -50,7 +51,7 @@ var y = ":host{--sbb-seat-reservation-grid-size: 16px;--sbb-seat-reservation-hei
|
|
|
50
51
|
return this._initVehicleSeatReservationConstruction(), this._coachesHtmlTemplate || null;
|
|
51
52
|
}
|
|
52
53
|
_initVehicleSeatReservationConstruction() {
|
|
53
|
-
this._coachesHtmlTemplate =
|
|
54
|
+
this._coachesHtmlTemplate = o`
|
|
54
55
|
${this._renderTravelDirection()}
|
|
55
56
|
<div class="sbb-sr__component">
|
|
56
57
|
${this._renderNavigation()}
|
|
@@ -67,12 +68,12 @@ var y = ":host{--sbb-seat-reservation-grid-size: 16px;--sbb-seat-reservation-hei
|
|
|
67
68
|
>
|
|
68
69
|
<div id="sbb-sr__parent-area" class="sbb-sr__parent">
|
|
69
70
|
<ul
|
|
70
|
-
class="${
|
|
71
|
+
class="${d({
|
|
71
72
|
"sbb-sr__list-decks": !0,
|
|
72
73
|
"sbb-sr__list-decks--gap": this.hasMultipleDecks
|
|
73
74
|
})}"
|
|
74
75
|
>
|
|
75
|
-
${this.seatReservations?.map((e, t) =>
|
|
76
|
+
${this.seatReservations?.map((e, t) => o`<li class="sbb-sr__list-item-deck">
|
|
76
77
|
<ul class="sbb-sr__list-coaches" role="presentation">
|
|
77
78
|
${this._renderCoaches(e, t)}
|
|
78
79
|
</ul>
|
|
@@ -85,12 +86,12 @@ var y = ":host{--sbb-seat-reservation-grid-size: 16px;--sbb-seat-reservation-hei
|
|
|
85
86
|
`;
|
|
86
87
|
}
|
|
87
88
|
_renderDeckLabels() {
|
|
88
|
-
return this.hasMultipleDecks ? this.seatReservations.map((e) =>
|
|
89
|
+
return this.hasMultipleDecks ? this.seatReservations.map((e) => o`<b aria-hidden="true">${f(e.deckCoachLevel, this._language.current)}</b>`) : null;
|
|
89
90
|
}
|
|
90
91
|
_renderNavigationControlButton(e) {
|
|
91
92
|
if (!this.hasNavigation || !this.seatReservations) return null;
|
|
92
|
-
let t = e == "DIRECTION_RIGHT" ? "sbb-sr-navigation__wrapper-button-direction--right" : "sbb-sr-navigation__wrapper-button-direction--left", n = e == "DIRECTION_RIGHT" ? "chevron-small-right-small" : "chevron-small-left-small", r =
|
|
93
|
-
return (e == "DIRECTION_LEFT" && this.selectedCoachIndex > 0 || e == "DIRECTION_RIGHT" && this.selectedCoachIndex < this.coachItemDetailsElements.length - 1) && (i = !1),
|
|
93
|
+
let t = e == "DIRECTION_RIGHT" ? "sbb-sr-navigation__wrapper-button-direction--right" : "sbb-sr-navigation__wrapper-button-direction--left", n = e == "DIRECTION_RIGHT" ? "chevron-small-right-small" : "chevron-small-left-small", r = f(e == "DIRECTION_RIGHT" ? "SEAT_RESERVATION_END" : "SEAT_RESERVATION_BEGIN", this._language.current), i = !0;
|
|
94
|
+
return (e == "DIRECTION_LEFT" && this.selectedCoachIndex > 0 || e == "DIRECTION_RIGHT" && this.selectedCoachIndex < this.coachItemDetailsElements.length - 1) && (i = !1), o`<div class="sbb-sr-navigation__wrapper-button-direction">
|
|
94
95
|
<sbb-secondary-button
|
|
95
96
|
@click="${() => this.navigateByDirectionBtn(e)}"
|
|
96
97
|
@focus="${() => this.onFocusNavDirectionButton()}"
|
|
@@ -101,15 +102,15 @@ var y = ":host{--sbb-seat-reservation-grid-size: 16px;--sbb-seat-reservation-hei
|
|
|
101
102
|
type="button"
|
|
102
103
|
aria-label="${r}"
|
|
103
104
|
role="button"
|
|
104
|
-
.disabledInteractive="${i ||
|
|
105
|
-
.disabled="${i ||
|
|
105
|
+
.disabledInteractive="${i || c}"
|
|
106
|
+
.disabled="${i || c}"
|
|
106
107
|
></sbb-secondary-button>
|
|
107
108
|
</div>`;
|
|
108
109
|
}
|
|
109
110
|
_renderTravelDirection() {
|
|
110
111
|
if (!this.travelDirection || this.travelDirection === "NONE") return null;
|
|
111
|
-
let e =
|
|
112
|
-
return
|
|
112
|
+
let e = f("SEAT_RESERVATION_TRAVEL_DIRECTION", this._language.current);
|
|
113
|
+
return o`<div class="sbb-sr-travel-direction-wrapper">
|
|
113
114
|
<div class="sbb-sr__travel-direction--arrow">
|
|
114
115
|
<sbb-icon slot="icon" name="${`arrow-${this.alignVertical ? this.travelDirection === "RIGHT" ? "down" : "up" : this.travelDirection === "RIGHT" ? "right" : "left"}-small`}"></sbb-icon>
|
|
115
116
|
</div>
|
|
@@ -117,15 +118,15 @@ var y = ":host{--sbb-seat-reservation-grid-size: 16px;--sbb-seat-reservation-hei
|
|
|
117
118
|
</div>`;
|
|
118
119
|
}
|
|
119
120
|
_renderNavigation() {
|
|
120
|
-
return
|
|
121
|
+
return s || !this.hasNavigation || !this.seatReservations ? null : o`<div class="sbb-sr-navigation-wrapper">
|
|
121
122
|
<nav id="sbb-sr-navigation" class="sbb-sr-navigation">
|
|
122
123
|
${this._renderNavigationControlButton("DIRECTION_LEFT")}
|
|
123
124
|
<ul
|
|
124
125
|
id="sbb-sr__navigation-list-coaches"
|
|
125
126
|
class="sbb-sr-navigation__list-coaches sbb-scrollbar"
|
|
126
|
-
aria-label="${
|
|
127
|
+
aria-label="${f("SEAT_RESERVATION_NAVIGATION", this._language.current)}"
|
|
127
128
|
>
|
|
128
|
-
${this.coachItemDetailsElements.map((e, t) =>
|
|
129
|
+
${this.coachItemDetailsElements.map((e, t) => o`<li>
|
|
129
130
|
<sbb-seat-reservation-navigation-coach
|
|
130
131
|
@selectcoach=${(e) => this._onSelectNavCoach(e)}
|
|
131
132
|
@focuscoach=${() => this._onFocusNavCoach()}
|
|
@@ -148,16 +149,16 @@ var y = ":host{--sbb-seat-reservation-grid-size: 16px;--sbb-seat-reservation-hei
|
|
|
148
149
|
}
|
|
149
150
|
_renderCoaches(e, t) {
|
|
150
151
|
let n = JSON.parse(JSON.stringify(e?.coachItems));
|
|
151
|
-
return !n ||
|
|
152
|
+
return !n || s ? null : n.map((n, r) => o`
|
|
152
153
|
<li class="sbb-sr__item-coach">
|
|
153
154
|
${this._renderCoachElement(n, r, t, e.deckCoachIndex)}
|
|
154
155
|
</li>
|
|
155
156
|
`);
|
|
156
157
|
}
|
|
157
158
|
_renderCoachElement(e, t, n, r) {
|
|
158
|
-
let i = this.seatReservationStructure.decks[n].deckCoaches[t],
|
|
159
|
-
return
|
|
160
|
-
style=${
|
|
159
|
+
let i = this.seatReservationStructure.decks[n].deckCoaches[t], a = this._getDescriptionTableCoach(e);
|
|
160
|
+
return o`<sbb-seat-reservation-scoped
|
|
161
|
+
style=${u({
|
|
161
162
|
"--sbb-seat-reservation-scoped-width": i.width,
|
|
162
163
|
"--sbb-seat-reservation-scoped-height": i.height
|
|
163
164
|
})}
|
|
@@ -175,7 +176,7 @@ var y = ":host{--sbb-seat-reservation-grid-size: 16px;--sbb-seat-reservation-hei
|
|
|
175
176
|
tabindex="-1"
|
|
176
177
|
>
|
|
177
178
|
<caption id="sbb-sr-coach-caption-${t}" tabindex="-1">
|
|
178
|
-
<span class="sbb-screen-reader-only">${
|
|
179
|
+
<span class="sbb-screen-reader-only">${a}</span>
|
|
179
180
|
</caption>
|
|
180
181
|
${this._getRenderedRowPlaces(e, t, n, r)}
|
|
181
182
|
</table>
|
|
@@ -183,11 +184,11 @@ var y = ":host{--sbb-seat-reservation-grid-size: 16px;--sbb-seat-reservation-hei
|
|
|
183
184
|
}
|
|
184
185
|
_getRenderedCoachBorders(e, t, n) {
|
|
185
186
|
if (!e.graphicElements) return null;
|
|
186
|
-
let r = this.seatReservationStructure.decks[t].deckCoaches[n], i = r.borderMiddleElement,
|
|
187
|
-
return
|
|
187
|
+
let r = this.seatReservationStructure.decks[t].deckCoaches[n], i = r.borderMiddleElement, a = r.hasOverhangingElements;
|
|
188
|
+
return o`
|
|
188
189
|
<sbb-seat-reservation-graphic
|
|
189
|
-
class="${
|
|
190
|
-
style=${
|
|
190
|
+
class="${d({ "sbb-sr-coach-has-overhanging-elements": a || !1 })}"
|
|
191
|
+
style=${u({
|
|
191
192
|
"--sbb-seat-reservation-graphic-width": i.dimension.w,
|
|
192
193
|
"--sbb-seat-reservation-graphic-height": i.dimension.h,
|
|
193
194
|
"--sbb-seat-reservation-graphic-top": i.position.y,
|
|
@@ -204,7 +205,7 @@ var y = ":host{--sbb-seat-reservation-grid-size: 16px;--sbb-seat-reservation-hei
|
|
|
204
205
|
if (!e.places) return null;
|
|
205
206
|
let i = {};
|
|
206
207
|
for (let t of e.places) i[t.position.y] ? i[t.position.y].push(t) : i[t.position.y] = [t];
|
|
207
|
-
return Object.values(i).map((e, i) =>
|
|
208
|
+
return Object.values(i).map((e, i) => o`
|
|
208
209
|
<tr id="row-${t}-${e[0].position.y}" data-row-index=${i}>
|
|
209
210
|
${this._getRenderedColumnPlaces(e, t, n, r)}
|
|
210
211
|
</tr>
|
|
@@ -213,22 +214,22 @@ var y = ":host{--sbb-seat-reservation-grid-size: 16px;--sbb-seat-reservation-hei
|
|
|
213
214
|
_getRenderedColumnPlaces(e, t, n, r) {
|
|
214
215
|
e.sort((e, t) => Number(e.position.x) - Number(t.position.x));
|
|
215
216
|
let i = t + "-" + r;
|
|
216
|
-
return
|
|
217
|
-
let
|
|
218
|
-
return
|
|
217
|
+
return o`${h(e, (e) => i + "-" + e.number, (e, i) => {
|
|
218
|
+
let a = this.getCalculatedDimension(e.dimension), s = this.getCalculatedPosition(e.position), c = e.rotation || 0, l = this.alignVertical ? -90 : 0, d = this.getPlaceElementId(n, t, e.number);
|
|
219
|
+
return o`
|
|
219
220
|
<td
|
|
220
221
|
id="cell-${n}-${t}-${e.position.y}-${i}"
|
|
221
222
|
class="graphical-element"
|
|
222
223
|
>
|
|
223
224
|
<sbb-seat-reservation-place-control
|
|
224
|
-
style=${
|
|
225
|
-
"--sbb-seat-reservation-place-control-text-scale-value": Math.min(
|
|
226
|
-
"--sbb-seat-reservation-place-control-width":
|
|
227
|
-
"--sbb-seat-reservation-place-control-height":
|
|
225
|
+
style=${u({
|
|
226
|
+
"--sbb-seat-reservation-place-control-text-scale-value": Math.min(a.w, a.h),
|
|
227
|
+
"--sbb-seat-reservation-place-control-width": a.w,
|
|
228
|
+
"--sbb-seat-reservation-place-control-height": a.h,
|
|
228
229
|
"--sbb-seat-reservation-place-control-top": s.y,
|
|
229
230
|
"--sbb-seat-reservation-place-control-left": s.x,
|
|
230
231
|
"--sbb-seat-reservation-place-control-rotation": c,
|
|
231
|
-
"--sbb-seat-reservation-place-control-text-rotation":
|
|
232
|
+
"--sbb-seat-reservation-place-control-text-rotation": l
|
|
232
233
|
})}
|
|
233
234
|
@selectplace=${(e) => this._onSelectPlace(e)}
|
|
234
235
|
exportparts="sbb-sr-place-part"
|
|
@@ -250,8 +251,8 @@ var y = ":host{--sbb-seat-reservation-grid-size: 16px;--sbb-seat-reservation-hei
|
|
|
250
251
|
})}`;
|
|
251
252
|
}
|
|
252
253
|
_getRenderedCoachElements(e, t) {
|
|
253
|
-
return this.seatReservationStructure.decks[e].deckCoaches[t].otherElements.map((e) =>
|
|
254
|
-
style=${
|
|
254
|
+
return this.seatReservationStructure.decks[e].deckCoaches[t].otherElements.map((e) => o` <sbb-seat-reservation-graphic
|
|
255
|
+
style=${u({
|
|
255
256
|
"--sbb-seat-reservation-graphic-width": e.dimension.w,
|
|
256
257
|
"--sbb-seat-reservation-graphic-height": e.dimension.h,
|
|
257
258
|
"--sbb-seat-reservation-graphic-top": e.position.y,
|
|
@@ -259,57 +260,57 @@ var y = ":host{--sbb-seat-reservation-grid-size: 16px;--sbb-seat-reservation-hei
|
|
|
259
260
|
"--sbb-seat-reservation-graphic-position": "absolute",
|
|
260
261
|
"--sbb-seat-reservation-graphic-rotation": e.rotation
|
|
261
262
|
})}
|
|
262
|
-
name=${e.icon ??
|
|
263
|
+
name=${e.icon ?? c}
|
|
263
264
|
aria-hidden="true"
|
|
264
265
|
?stretch=${!0}
|
|
265
266
|
></sbb-seat-reservation-graphic>`);
|
|
266
267
|
}
|
|
267
268
|
_getRenderedAreaElements(e, t) {
|
|
268
269
|
return this.seatReservationStructure.decks[e].deckCoaches[t].areaElements.map((n) => {
|
|
269
|
-
let r = `popover-trigger-${e}-${t}-${n.position.x}-${n.position.y}`, i = n.icon?.indexOf("TABLE") === -1,
|
|
270
|
-
return
|
|
270
|
+
let r = `popover-trigger-${e}-${t}-${n.position.x}-${n.position.y}`, i = n.icon?.indexOf("TABLE") === -1, a = n.icon && i ? n.icon : null, s = n.icon ? f(n.icon, this._language.current) : c;
|
|
271
|
+
return o`
|
|
271
272
|
<sbb-seat-reservation-area
|
|
272
273
|
id="${r}"
|
|
273
|
-
class="${
|
|
274
|
-
style=${
|
|
274
|
+
class="${d({ "sbb-seat-reservation-area--cursor-pointer": a !== null })}"
|
|
275
|
+
style=${u({
|
|
275
276
|
"--sbb-seat-reservation-area-width": n.dimension.w,
|
|
276
277
|
"--sbb-seat-reservation-area-height": n.dimension.h,
|
|
277
278
|
"--sbb-seat-reservation-area-top": n.position.y,
|
|
278
279
|
"--sbb-seat-reservation-area-left": n.position.x,
|
|
279
280
|
"--sbb-seat-reservation-area-z-index": n.position.z
|
|
280
281
|
})}
|
|
281
|
-
mounting=${n.mounting ??
|
|
282
|
+
mounting=${n.mounting ?? c}
|
|
282
283
|
background="dark"
|
|
283
284
|
aria-hidden="true"
|
|
284
285
|
>
|
|
285
|
-
${
|
|
286
|
+
${a ? o`
|
|
286
287
|
<sbb-seat-reservation-graphic
|
|
287
|
-
style=${
|
|
288
|
+
style=${u({
|
|
288
289
|
"--sbb-seat-reservation-graphic-max-width": this.globalAreaIconDim.w,
|
|
289
290
|
"--sbb-seat-reservation-graphic-max-height": this.globalAreaIconDim.h,
|
|
290
291
|
"--sbb-seat-reservation-graphic-width": n.dimension.w,
|
|
291
292
|
"--sbb-seat-reservation-graphic-height": n.dimension.h,
|
|
292
293
|
"--sbb-seat-reservation-graphic-rotation": n.rotation,
|
|
293
|
-
"--sbb-seat-reservation-graphic-padding-percent":
|
|
294
|
+
"--sbb-seat-reservation-graphic-padding-percent": a === "ENTRY_EXIT" ? 1 : this.globalAreaIconPadding
|
|
294
295
|
})}
|
|
295
|
-
name=${
|
|
296
|
+
name=${a}
|
|
296
297
|
role="img"
|
|
297
298
|
aria-hidden="true"
|
|
298
299
|
class="sbb-sr-graphic__dimension--square-dim"
|
|
299
300
|
></sbb-seat-reservation-graphic>
|
|
300
|
-
` :
|
|
301
|
+
` : c}
|
|
301
302
|
</sbb-seat-reservation-area>
|
|
302
|
-
${
|
|
303
|
+
${a ? this._popover(r, s) : c}
|
|
303
304
|
`;
|
|
304
305
|
});
|
|
305
306
|
}
|
|
306
307
|
_getRenderedServiceElements(e, t) {
|
|
307
308
|
return this.seatReservationStructure.decks[e].deckCoaches[t].serviceElements.map((n) => {
|
|
308
|
-
let r = `popover-trigger-${e}-${t}-${n.position.x}-${n.position.y}`, i = n.icon ?
|
|
309
|
-
return
|
|
309
|
+
let r = `popover-trigger-${e}-${t}-${n.position.x}-${n.position.y}`, i = n.icon ? f(n.icon, this._language.current) : null;
|
|
310
|
+
return o`
|
|
310
311
|
<sbb-seat-reservation-graphic
|
|
311
312
|
id="${r}"
|
|
312
|
-
style=${
|
|
313
|
+
style=${u({
|
|
313
314
|
"--sbb-seat-reservation-graphic-width": n.dimension.w,
|
|
314
315
|
"--sbb-seat-reservation-graphic-height": n.dimension.h,
|
|
315
316
|
"--sbb-seat-reservation-graphic-top": n.position.y,
|
|
@@ -318,7 +319,7 @@ var y = ":host{--sbb-seat-reservation-grid-size: 16px;--sbb-seat-reservation-hei
|
|
|
318
319
|
"--sbb-seat-reservation-graphic-rotation": n.rotation
|
|
319
320
|
})}
|
|
320
321
|
class="sbb-seat-reservation-graphic--cursor-pointer"
|
|
321
|
-
name=${n.icon ??
|
|
322
|
+
name=${n.icon ?? c}
|
|
322
323
|
role="img"
|
|
323
324
|
aria-hidden="true"
|
|
324
325
|
></sbb-seat-reservation-graphic>
|
|
@@ -338,7 +339,7 @@ var y = ":host{--sbb-seat-reservation-grid-size: 16px;--sbb-seat-reservation-hei
|
|
|
338
339
|
this.preventCoachScrollByPlaceClick ? this.focusPlaceElement(this.currSelectedPlace) : this.preselectPlaceInCoach(), this.isAutoScrolling = !1;
|
|
339
340
|
}
|
|
340
341
|
_popover(e, t) {
|
|
341
|
-
return
|
|
342
|
+
return o`
|
|
342
343
|
<sbb-popover trigger="${e}" hover-trigger="">
|
|
343
344
|
<p class="sbb-text-s sbb-sr-popover">${t}</p>
|
|
344
345
|
</sbb-popover>
|
|
@@ -348,24 +349,24 @@ var y = ":host{--sbb-seat-reservation-grid-size: 16px;--sbb-seat-reservation-hei
|
|
|
348
349
|
this.shadowRoot?.querySelectorAll("sbb-popover:is(:state(state-opened),[state--state-opened])").forEach((e) => e.close());
|
|
349
350
|
}
|
|
350
351
|
_getDescriptionTableCoach(e) {
|
|
351
|
-
if (e.type === "LOCOMOTIVE_COACH") return
|
|
352
|
-
if (!e.places?.length) return
|
|
352
|
+
if (e.type === "LOCOMOTIVE_COACH") return f("COACH_LOCOMOTIVE", this._language.current);
|
|
353
|
+
if (!e.places?.length) return f("COACH_BLOCKED_TABLE_CAPTION", this._language.current, [e.id]);
|
|
353
354
|
let t, n = this._getTitleDescriptionListString(e.graphicElements), r = this._getTitleDescriptionListString(e.serviceElements);
|
|
354
|
-
if (t =
|
|
355
|
-
let n = this.getAvailableFreePlacesNumFromCoach(e.places), r =
|
|
355
|
+
if (t = f("COACH_TABLE_CAPTION", this._language.current, [e.id]), !this.hasNavigation) {
|
|
356
|
+
let n = this.getAvailableFreePlacesNumFromCoach(e.places), r = f("COACH_AVAILABLE_NUMBER_OF_PLACES", this._language.current, [n.seats, n.bicycles]);
|
|
356
357
|
t = t.concat(". ").concat(r).concat(". ");
|
|
357
358
|
}
|
|
358
|
-
return (n || r) && (t += ". " +
|
|
359
|
+
return (n || r) && (t += ". " + f("COACH_AVAILABLE_SERVICES", this._language.current) + ": ", t += r + ", " + n + "."), t;
|
|
359
360
|
}
|
|
360
361
|
_getTitleDescriptionListString(e) {
|
|
361
362
|
let t = [];
|
|
362
363
|
return e?.map((e) => {
|
|
363
364
|
let n = e.icon;
|
|
364
365
|
if (!n) return null;
|
|
365
|
-
let r = t.indexOf(n) > -1, i =
|
|
366
|
+
let r = t.indexOf(n) > -1, i = f(e.icon, this._language.current), a = this.notFixedRotatableAreaIcons.indexOf(n) === -1 && this.notAreaElements.indexOf(n) === -1;
|
|
366
367
|
return r || t.push(e.icon), i && !r && a ? i : null;
|
|
367
368
|
}).filter((e) => !!e).join(", ");
|
|
368
369
|
}
|
|
369
370
|
};
|
|
370
371
|
//#endregion
|
|
371
|
-
export {
|
|
372
|
+
export { x as t };
|
package/seat-reservation.js
CHANGED
|
@@ -2,14 +2,14 @@ import { i as e, n as t, r as n, t as r } from "./mapper-Cqie5ivY.js";
|
|
|
2
2
|
import { mapIconToSvg as i } from "./seat-reservation/common/mapper/icon-mapper.js";
|
|
3
3
|
import { t as a } from "./svgs-D5DhLHxC.js";
|
|
4
4
|
import { getI18nSeatReservation as o } from "./seat-reservation/common/translations/i18n.js";
|
|
5
|
-
import { t as s } from "./seat-reservation-area.component-
|
|
6
|
-
import { t as c } from "./seat-reservation-graphic.component-
|
|
7
|
-
import { n as l, t as u } from "./seat-reservation-navigation-coach.component-
|
|
8
|
-
import { t as d } from "./seat-reservation-navigation-services.component-
|
|
9
|
-
import { n as f, t as p } from "./seat-reservation-place-control.component-
|
|
5
|
+
import { t as s } from "./seat-reservation-area.component-B8HJ-Or8.js";
|
|
6
|
+
import { t as c } from "./seat-reservation-graphic.component-Ddpuv-Aw.js";
|
|
7
|
+
import { n as l, t as u } from "./seat-reservation-navigation-coach.component-DMKlwxPa.js";
|
|
8
|
+
import { t as d } from "./seat-reservation-navigation-services.component-2os7VI7i.js";
|
|
9
|
+
import { n as f, t as p } from "./seat-reservation-place-control.component-CvGYSTnc.js";
|
|
10
10
|
import { t as m } from "./seat-reservation-scoped.component-BohQUGVW.js";
|
|
11
11
|
import { SbbSeatReservationSelectedCoachEvent as h, SbbSeatReservationSelectedPlacesEvent as g, SeatReservationBaseElement as _ } from "./seat-reservation/seat-reservation/seat-reservation-base-element.js";
|
|
12
|
-
import { t as v } from "./seat-reservation.component-
|
|
12
|
+
import { t as v } from "./seat-reservation.component-TLuTP9Nm.js";
|
|
13
13
|
import "./seat-reservation.pure.js";
|
|
14
14
|
v.define(), s.define(), c.define(), u.define(), d.define(), f.define(), m.define();
|
|
15
15
|
//#endregion
|
package/seat-reservation.pure.js
CHANGED
|
@@ -3,12 +3,12 @@ import { mapIconToSvg as i } from "./seat-reservation/common/mapper/icon-mapper.
|
|
|
3
3
|
import "./seat-reservation/common/mapper.js";
|
|
4
4
|
import { t as a } from "./svgs-D5DhLHxC.js";
|
|
5
5
|
import { getI18nSeatReservation as o } from "./seat-reservation/common/translations/i18n.js";
|
|
6
|
-
import { t as s } from "./seat-reservation-area.component-
|
|
7
|
-
import { t as c } from "./seat-reservation-graphic.component-
|
|
8
|
-
import { n as l, t as u } from "./seat-reservation-navigation-coach.component-
|
|
9
|
-
import { t as d } from "./seat-reservation-navigation-services.component-
|
|
10
|
-
import { n as f, t as p } from "./seat-reservation-place-control.component-
|
|
6
|
+
import { t as s } from "./seat-reservation-area.component-B8HJ-Or8.js";
|
|
7
|
+
import { t as c } from "./seat-reservation-graphic.component-Ddpuv-Aw.js";
|
|
8
|
+
import { n as l, t as u } from "./seat-reservation-navigation-coach.component-DMKlwxPa.js";
|
|
9
|
+
import { t as d } from "./seat-reservation-navigation-services.component-2os7VI7i.js";
|
|
10
|
+
import { n as f, t as p } from "./seat-reservation-place-control.component-CvGYSTnc.js";
|
|
11
11
|
import { t as m } from "./seat-reservation-scoped.component-BohQUGVW.js";
|
|
12
12
|
import { SbbSeatReservationSelectedCoachEvent as h, SbbSeatReservationSelectedPlacesEvent as g, SeatReservationBaseElement as _ } from "./seat-reservation/seat-reservation/seat-reservation-base-element.js";
|
|
13
|
-
import { t as v } from "./seat-reservation.component-
|
|
13
|
+
import { t as v } from "./seat-reservation.component-TLuTP9Nm.js";
|
|
14
14
|
export { p as SbbPlaceSelectionEvent, s as SbbSeatReservationAreaElement, v as SbbSeatReservationElement, c as SbbSeatReservationGraphicElement, u as SbbSeatReservationNavigationCoachElement, d as SbbSeatReservationNavigationServicesElement, f as SbbSeatReservationPlaceControlElement, m as SbbSeatReservationScopedElement, h as SbbSeatReservationSelectedCoachEvent, g as SbbSeatReservationSelectedPlacesEvent, l as SbbSelectCoachEvent, _ as SeatReservationBaseElement, o as getI18nSeatReservation, r as mapCoachInfosToCoachSelection, i as mapIconToSvg, t as mapPlaceAndCoachToSeatReservationPlaceSelection, n as mapPlaceInfosToPlaceSelection, e as mapRawDataToSeatReservation, a as svgs };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as e } from "../timetable-duration.component-
|
|
1
|
+
import { t as e } from "../timetable-duration.component-DHuPMaq5.js";
|
|
2
2
|
export { e as SbbTimetableDurationElement };
|