@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
|
@@ -1,37 +1,46 @@
|
|
|
1
|
-
var ve = (
|
|
2
|
-
throw TypeError(
|
|
1
|
+
var ve = (n) => {
|
|
2
|
+
throw TypeError(n);
|
|
3
3
|
};
|
|
4
|
-
var fe = (
|
|
5
|
-
var g = (
|
|
6
|
-
import { __runInitializers as
|
|
7
|
-
import { isArrowKeyOrPageKeysPressed as
|
|
4
|
+
var fe = (n, d, u) => d.has(n) || ve("Cannot " + u);
|
|
5
|
+
var g = (n, d, u) => (fe(n, d, "read from private field"), u ? u.call(n) : d.get(n)), v = (n, d, u) => d.has(n) ? ve("Cannot add the same private member more than once") : d instanceof WeakSet ? d.add(n) : d.set(n, u), r = (n, d, u, T) => (fe(n, d, "write to private field"), T ? T.call(n, u) : d.set(n, u), u);
|
|
6
|
+
import { __runInitializers as l, __esDecorate as f } from "tslib";
|
|
7
|
+
import { isArrowKeyOrPageKeysPressed as Ce } from "@sbb-esta/lyne-elements/core/a11y.js";
|
|
8
8
|
import { forceType as C } from "@sbb-esta/lyne-elements/core/decorators.js";
|
|
9
|
-
import { LitElement as
|
|
10
|
-
import { property as S, state as
|
|
11
|
-
import { mapPlaceInfosToPlaceSelection as
|
|
12
|
-
var
|
|
13
|
-
(function(
|
|
14
|
-
|
|
15
|
-
})(
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
9
|
+
import { LitElement as pe, isServer as xe } from "lit";
|
|
10
|
+
import { property as S, state as w, eventOptions as Ie } from "lit/decorators.js";
|
|
11
|
+
import { mapIconToSvg as Se, mapPlaceInfosToPlaceSelection as me, mapPlaceAndCoachToSeatReservationPlaceSelection as _e, mapCoachInfosToCoachSelection as be } from "../common/mapper.js";
|
|
12
|
+
var p;
|
|
13
|
+
(function(n) {
|
|
14
|
+
n.right = "right", n.left = "left";
|
|
15
|
+
})(p || (p = {}));
|
|
16
|
+
const ye = 3, Pe = [
|
|
17
|
+
"sa-vo",
|
|
18
|
+
"sa-rs",
|
|
19
|
+
"sa-abteilkinderwagen",
|
|
20
|
+
"sa-wr",
|
|
21
|
+
"sa-fa",
|
|
22
|
+
"sa-bz",
|
|
23
|
+
"sa-rz"
|
|
24
|
+
];
|
|
25
|
+
let Be = (() => {
|
|
26
|
+
var x, I, m, _, b, y, P, A, R, E, N, k, h;
|
|
27
|
+
let n = pe, d = [], u, T = [], D = [], B, z = [], F = [], O, V = [], G = [], L, W = [], X = [], H, K = [], U = [], q, M = [], $ = [], j, Y = [], J = [], Q, Z = [], ee = [], te, se = [], ie = [], ae, ce = [], oe = [], re, le = [], ne = [], he, de = [], ue = [], ge;
|
|
28
|
+
return h = class extends n {
|
|
20
29
|
constructor() {
|
|
21
30
|
super(...arguments);
|
|
31
|
+
v(this, x);
|
|
22
32
|
v(this, I);
|
|
23
|
-
v(this, p);
|
|
24
33
|
v(this, m);
|
|
25
|
-
v(this, b);
|
|
26
34
|
v(this, _);
|
|
35
|
+
v(this, b);
|
|
27
36
|
v(this, y);
|
|
28
37
|
v(this, P);
|
|
29
38
|
v(this, A);
|
|
30
39
|
v(this, R);
|
|
31
|
-
v(this, k);
|
|
32
40
|
v(this, E);
|
|
33
41
|
v(this, N);
|
|
34
|
-
|
|
42
|
+
v(this, k);
|
|
43
|
+
r(this, x, (l(this, d), l(this, T, null))), r(this, I, (l(this, D), l(this, z, !0))), r(this, m, (l(this, F), l(this, V, !1))), r(this, _, (l(this, G), l(this, W, 16))), r(this, b, (l(this, X), l(this, K, null))), r(this, y, (l(this, U), l(this, M, -1))), r(this, P, (l(this, $), l(this, Y, -1))), r(this, A, (l(this, J), l(this, Z, !1))), r(this, R, (l(this, ee), l(this, se, -1))), r(this, E, (l(this, ie), l(this, ce, -1))), r(this, N, (l(this, oe), l(this, le, -1))), r(this, k, (l(this, ne), l(this, de, -1))), this.coachBorderPadding = (l(this, ue), 6), this.gapBetweenCoaches = 4, this.coachBorderOffset = this.coachBorderPadding / this.baseGridSize, this.gapBetweenCoachDecks = 48, this.coachNavButtonDim = 0, this.coachNavData = [], this.currScrollDirection = p.right, this.maxCalcCoachsWidth = 0, this.scrollCoachsAreaWidth = 0, this.scrollNavigationAreaDim = 0, this.triggerCoachPositionsCollection = [], this.firstTabElement = null, this.lastTabElement = null, this.navigationScrollArea = null, this.coachScrollArea = null, this.currSelectedPlace = null, this.currSelectedPlaceElementId = null, this.currSelectedCoachIndex = -1, this.currSelectedDeckIndex = 0, this.preventCoachScrollByPlaceClick = !1, this.selectedSeatReservationPlaces = {
|
|
35
44
|
seats: [],
|
|
36
45
|
bicycles: []
|
|
37
46
|
}, this.seatReservationWithoutNavigationHasFocus = !1, this.isCoachGridFocusable = !1, this.isAutoScrolling = !1, this.isKeyboardNavigation = !1, this.hasMultipleDecks = !1, this.keyboardNavigationEvents = {
|
|
@@ -41,91 +50,101 @@ let we = (() => {
|
|
|
41
50
|
ArrowDown: "ArrowDown",
|
|
42
51
|
Tab: "Tab",
|
|
43
52
|
Enter: "Enter"
|
|
53
|
+
}, this._prepareServiceIconsNavigation = (e) => {
|
|
54
|
+
if (!e)
|
|
55
|
+
return [];
|
|
56
|
+
const t = e?.map(function(s) {
|
|
57
|
+
return {
|
|
58
|
+
pId: s,
|
|
59
|
+
svgName: Se[s]?.svgName ? Se[s]?.svgName : ""
|
|
60
|
+
};
|
|
61
|
+
}).filter((s) => Pe.indexOf(s.svgName) !== -1).filter((s, i, a) => a.map((o) => o.svgName).indexOf(s.svgName) === i).map((s) => s.pId).slice(0, ye);
|
|
62
|
+
return t || [];
|
|
44
63
|
};
|
|
45
64
|
}
|
|
46
65
|
/** The seat reservations array contains all coaches and places */
|
|
47
66
|
get seatReservations() {
|
|
48
|
-
return g(this,
|
|
67
|
+
return g(this, x);
|
|
49
68
|
}
|
|
50
69
|
set seatReservations(e) {
|
|
51
|
-
|
|
70
|
+
r(this, x, e);
|
|
52
71
|
}
|
|
53
72
|
/** The seat reservation navigation can be toggled by this property */
|
|
54
73
|
get hasNavigation() {
|
|
55
|
-
return g(this,
|
|
74
|
+
return g(this, I);
|
|
56
75
|
}
|
|
57
76
|
set hasNavigation(e) {
|
|
58
|
-
|
|
77
|
+
r(this, I, e);
|
|
59
78
|
}
|
|
60
79
|
/** The seat reservation area is aligned vertically */
|
|
61
80
|
get alignVertical() {
|
|
62
81
|
return g(this, m);
|
|
63
82
|
}
|
|
64
83
|
set alignVertical(e) {
|
|
65
|
-
|
|
84
|
+
r(this, m, e);
|
|
66
85
|
}
|
|
67
86
|
/** The seat reservation area's base grid size */
|
|
68
87
|
get baseGridSize() {
|
|
69
|
-
return g(this,
|
|
88
|
+
return g(this, _);
|
|
70
89
|
}
|
|
71
90
|
set baseGridSize(e) {
|
|
72
|
-
|
|
91
|
+
r(this, _, e);
|
|
73
92
|
}
|
|
74
93
|
/** The seat reservation area's width */
|
|
75
94
|
get height() {
|
|
76
|
-
return g(this,
|
|
95
|
+
return g(this, b);
|
|
77
96
|
}
|
|
78
97
|
set height(e) {
|
|
79
|
-
|
|
98
|
+
r(this, b, e);
|
|
80
99
|
}
|
|
81
100
|
/** Maximal number of possible clickable seats */
|
|
82
101
|
get maxSeatReservations() {
|
|
83
102
|
return g(this, y);
|
|
84
103
|
}
|
|
85
104
|
set maxSeatReservations(e) {
|
|
86
|
-
|
|
105
|
+
r(this, y, e);
|
|
87
106
|
}
|
|
88
107
|
/** Maximal number of possible clickable bicycle places */
|
|
89
108
|
get maxBicycleReservations() {
|
|
90
109
|
return g(this, P);
|
|
91
110
|
}
|
|
92
111
|
set maxBicycleReservations(e) {
|
|
93
|
-
|
|
112
|
+
r(this, P, e);
|
|
94
113
|
}
|
|
95
114
|
/** Any click functionality is prevented */
|
|
96
115
|
get preventPlaceClick() {
|
|
97
116
|
return g(this, A);
|
|
98
117
|
}
|
|
99
118
|
set preventPlaceClick(e) {
|
|
100
|
-
|
|
119
|
+
r(this, A, e);
|
|
101
120
|
}
|
|
102
121
|
get preselectCoachIndex() {
|
|
103
122
|
return g(this, R);
|
|
104
123
|
}
|
|
105
124
|
set preselectCoachIndex(e) {
|
|
106
|
-
|
|
125
|
+
r(this, R, e);
|
|
107
126
|
}
|
|
108
127
|
get selectedCoachIndex() {
|
|
109
|
-
return g(this,
|
|
128
|
+
return g(this, E);
|
|
110
129
|
}
|
|
111
130
|
set selectedCoachIndex(e) {
|
|
112
|
-
|
|
131
|
+
r(this, E, e);
|
|
113
132
|
}
|
|
114
133
|
get focusedCoachIndex() {
|
|
115
|
-
return g(this,
|
|
134
|
+
return g(this, N);
|
|
116
135
|
}
|
|
117
136
|
set focusedCoachIndex(e) {
|
|
118
|
-
|
|
137
|
+
r(this, N, e);
|
|
119
138
|
}
|
|
120
139
|
//Sets the hover style when scrolling to a coach
|
|
121
140
|
get hoveredScrollCoachIndex() {
|
|
122
|
-
return g(this,
|
|
141
|
+
return g(this, k);
|
|
123
142
|
}
|
|
124
143
|
set hoveredScrollCoachIndex(e) {
|
|
125
|
-
|
|
144
|
+
r(this, k, e);
|
|
126
145
|
}
|
|
127
146
|
willUpdate(e) {
|
|
128
|
-
if (super.willUpdate(e), e.has("seatReservations") && (this.hasMultipleDecks = this.seatReservations?.length > 1, this._initSeatReservationPlaceSelection()), e.has("baseGridSize") && (this.coachBorderOffset = this.coachBorderPadding / this.baseGridSize, this.style?.setProperty("--sbb-seat-reservation-grid-size", `${this.baseGridSize}px`), this.initNavigationSelectionByScrollEvent()), e.has("height") && this.height) {
|
|
147
|
+
if (super.willUpdate(e), e.has("seatReservations") && (this.hasMultipleDecks = this.seatReservations?.length > 1, this._initPrepareSeatReservationData(), this._initSeatReservationPlaceSelection()), e.has("baseGridSize") && (this.coachBorderOffset = this.coachBorderPadding / this.baseGridSize, this.style?.setProperty("--sbb-seat-reservation-grid-size", `${this.baseGridSize}px`), this.initNavigationSelectionByScrollEvent()), e.has("height") && this.height) {
|
|
129
148
|
const t = this.seatReservations[this.currSelectedDeckIndex] || null;
|
|
130
149
|
t?.coachItems.length && (this.baseGridSize = this.height / t.coachItems[0].dimension.h, this.coachBorderOffset = this.coachBorderPadding / this.baseGridSize, this.style?.setProperty("--sbb-seat-reservation-grid-size", `${this.baseGridSize}px`), this.initNavigationSelectionByScrollEvent());
|
|
131
150
|
}
|
|
@@ -140,33 +159,33 @@ let we = (() => {
|
|
|
140
159
|
* Data can be prepared once for the entire component
|
|
141
160
|
* in order to avoid recurring iteration processes in rendering.
|
|
142
161
|
*/
|
|
143
|
-
|
|
144
|
-
this._determineBaseFontSize(), this.
|
|
162
|
+
_initPrepareSeatReservationData() {
|
|
163
|
+
this._determineBaseFontSize(), this.hasMultipleDecks && this._initEmptyCoachDeckOffsets(), this._prepareNavigationCoachData();
|
|
145
164
|
}
|
|
146
165
|
/* Init scroll event handling for coach navigation */
|
|
147
166
|
initNavigationSelectionByScrollEvent() {
|
|
148
167
|
this.firstTabElement = this.shadowRoot?.querySelector("#first-tab-element"), this.lastTabElement = this.shadowRoot?.querySelector("#last-tab-element"), this.coachScrollArea = this.shadowRoot?.querySelector("#sbb-sr__wrapper-scrollarea"), this.navigationScrollArea = this.shadowRoot?.querySelector("#sbb-sr-navigation");
|
|
149
168
|
const e = this.seatReservations ? this.seatReservations[this.currSelectedDeckIndex] : null;
|
|
150
169
|
if (e && e.coachItems.length > 0) {
|
|
151
|
-
const t = e.coachItems[0].dimension.h * this.baseGridSize + this.coachBorderPadding,
|
|
152
|
-
this.style?.setProperty("--sbb-seat-reservation-height", `${t * this.seatReservations.length +
|
|
170
|
+
const t = e.coachItems[0].dimension.h * this.baseGridSize + this.coachBorderPadding, s = (this.seatReservations.length - 1) * this.gapBetweenCoachDecks;
|
|
171
|
+
this.style?.setProperty("--sbb-seat-reservation-height", `${t * this.seatReservations.length + s}`), this.style?.setProperty("--sbb-seat-reservation-decks", `${this.seatReservations.length}`);
|
|
153
172
|
}
|
|
154
173
|
if (this.navigationScrollArea) {
|
|
155
174
|
this.scrollNavigationAreaDim = this.alignVertical ? this.navigationScrollArea.getBoundingClientRect().height : this.navigationScrollArea.getBoundingClientRect().width;
|
|
156
175
|
const t = this.navigationScrollArea.querySelector("ul > li");
|
|
157
176
|
if (t) {
|
|
158
|
-
const
|
|
159
|
-
this.coachNavButtonDim = this.alignVertical ?
|
|
177
|
+
const s = t?.getBoundingClientRect();
|
|
178
|
+
this.coachNavButtonDim = this.alignVertical ? s.height : s.width;
|
|
160
179
|
}
|
|
161
180
|
}
|
|
162
181
|
if (this.coachScrollArea && e) {
|
|
163
182
|
let t = 0;
|
|
164
|
-
this.scrollCoachsAreaWidth = this.alignVertical ? this.coachScrollArea.getBoundingClientRect().height : this.coachScrollArea.getBoundingClientRect().width, this.triggerCoachPositionsCollection = e.coachItems.map((
|
|
165
|
-
const
|
|
166
|
-
return t +=
|
|
167
|
-
start:
|
|
183
|
+
this.scrollCoachsAreaWidth = this.alignVertical ? this.coachScrollArea.getBoundingClientRect().height : this.coachScrollArea.getBoundingClientRect().width, this.triggerCoachPositionsCollection = e.coachItems.map((s) => {
|
|
184
|
+
const i = t, a = this.getCalculatedDimension(s.dimension).w;
|
|
185
|
+
return t += a + this.gapBetweenCoaches, {
|
|
186
|
+
start: i,
|
|
168
187
|
end: t,
|
|
169
|
-
width:
|
|
188
|
+
width: a
|
|
170
189
|
};
|
|
171
190
|
}), this.maxCalcCoachsWidth = t;
|
|
172
191
|
}
|
|
@@ -205,30 +224,30 @@ let we = (() => {
|
|
|
205
224
|
return;
|
|
206
225
|
}
|
|
207
226
|
}
|
|
208
|
-
if (this.currSelectedCoachIndex !== -1 &&
|
|
227
|
+
if (this.currSelectedCoachIndex !== -1 && Ce(e))
|
|
209
228
|
switch (e.preventDefault(), t) {
|
|
210
229
|
case this.keyboardNavigationEvents.ArrowLeft:
|
|
211
230
|
{
|
|
212
|
-
const
|
|
213
|
-
this._navigateToPlaceByKeyboard(
|
|
231
|
+
const s = this.alignVertical ? this.keyboardNavigationEvents.ArrowDown : t;
|
|
232
|
+
this._navigateToPlaceByKeyboard(s);
|
|
214
233
|
}
|
|
215
234
|
break;
|
|
216
235
|
case this.keyboardNavigationEvents.ArrowRight:
|
|
217
236
|
{
|
|
218
|
-
const
|
|
219
|
-
this._navigateToPlaceByKeyboard(
|
|
237
|
+
const s = this.alignVertical ? this.keyboardNavigationEvents.ArrowUp : t;
|
|
238
|
+
this._navigateToPlaceByKeyboard(s);
|
|
220
239
|
}
|
|
221
240
|
break;
|
|
222
241
|
case this.keyboardNavigationEvents.ArrowUp:
|
|
223
242
|
{
|
|
224
|
-
const
|
|
225
|
-
this._navigateToPlaceByKeyboard(
|
|
243
|
+
const s = this.alignVertical ? this.keyboardNavigationEvents.ArrowLeft : t;
|
|
244
|
+
this._navigateToPlaceByKeyboard(s);
|
|
226
245
|
}
|
|
227
246
|
break;
|
|
228
247
|
case this.keyboardNavigationEvents.ArrowDown:
|
|
229
248
|
{
|
|
230
|
-
const
|
|
231
|
-
this._navigateToPlaceByKeyboard(
|
|
249
|
+
const s = this.alignVertical ? this.keyboardNavigationEvents.ArrowRight : t;
|
|
250
|
+
this._navigateToPlaceByKeyboard(s);
|
|
232
251
|
}
|
|
233
252
|
break;
|
|
234
253
|
}
|
|
@@ -263,16 +282,16 @@ let we = (() => {
|
|
|
263
282
|
const e = this._getPlaceHtmlElement();
|
|
264
283
|
e && (e.setAttribute("keyfocus", "unfocus"), this._setCurrSelectedPlaceElementId(null), this.currSelectedPlace = null);
|
|
265
284
|
}
|
|
266
|
-
getCalculatedDimension(e, t,
|
|
267
|
-
return t && !
|
|
285
|
+
getCalculatedDimension(e, t, s, i) {
|
|
286
|
+
return t && !s && (e.h += this.coachBorderOffset * 2), i && (e.h += this.coachBorderOffset), {
|
|
268
287
|
w: this.baseGridSize * e.w,
|
|
269
288
|
h: this.baseGridSize * e.h
|
|
270
289
|
};
|
|
271
290
|
}
|
|
272
|
-
getCalculatedPosition(e, t,
|
|
273
|
-
if (
|
|
274
|
-
const
|
|
275
|
-
e.y === 0 ? e.y -= this.coachBorderOffset : e.y + t.h ===
|
|
291
|
+
getCalculatedPosition(e, t, s, i) {
|
|
292
|
+
if (s && t) {
|
|
293
|
+
const a = i ? s.h : s.h + this.coachBorderOffset;
|
|
294
|
+
e.y === 0 ? e.y -= this.coachBorderOffset : e.y + t.h === a && (e.y += this.coachBorderOffset);
|
|
276
295
|
}
|
|
277
296
|
return {
|
|
278
297
|
x: this.baseGridSize * e.x,
|
|
@@ -283,12 +302,12 @@ let we = (() => {
|
|
|
283
302
|
/**
|
|
284
303
|
* Counts all available seats together depending on the seat type
|
|
285
304
|
*
|
|
286
|
-
* @param
|
|
305
|
+
* @param places
|
|
287
306
|
* @returns An Object with count of free seats and free bicycle places
|
|
288
307
|
*/
|
|
289
308
|
getAvailableFreePlacesNumFromCoach(e) {
|
|
290
|
-
const t = { seats: 0, bicycles: 0 },
|
|
291
|
-
return
|
|
309
|
+
const t = { seats: 0, bicycles: 0 }, s = e?.reduce((i, a) => (a.state !== "FREE" || (a.type === "SEAT" ? i.seats++ : i.bicycles++), i), t);
|
|
310
|
+
return s || t;
|
|
292
311
|
}
|
|
293
312
|
/**
|
|
294
313
|
* At the end of a scroll Event from the coach scrollable area,
|
|
@@ -306,10 +325,10 @@ let we = (() => {
|
|
|
306
325
|
_scrollToSelectedNavigationButton(e) {
|
|
307
326
|
setTimeout(() => {
|
|
308
327
|
if (this.hoveredScrollCoachIndex = e, this.hasNavigation && this.navigationScrollArea) {
|
|
309
|
-
const t = this.scrollNavigationAreaDim / 2,
|
|
328
|
+
const t = this.scrollNavigationAreaDim / 2, i = e * this.coachNavButtonDim - t + this.coachNavButtonDim;
|
|
310
329
|
this.navigationScrollArea.scrollTo({
|
|
311
|
-
top: this.alignVertical ?
|
|
312
|
-
left: this.alignVertical ? 0 :
|
|
330
|
+
top: this.alignVertical ? i : 0,
|
|
331
|
+
left: this.alignVertical ? 0 : i,
|
|
313
332
|
behavior: "smooth"
|
|
314
333
|
});
|
|
315
334
|
}
|
|
@@ -319,7 +338,7 @@ let we = (() => {
|
|
|
319
338
|
* Sets the new ScrollDirection by the new given target coach index.
|
|
320
339
|
*/
|
|
321
340
|
_setScrollDirectionByCoachIndex() {
|
|
322
|
-
this.currScrollDirection = this.currSelectedCoachIndex > this.selectedCoachIndex ?
|
|
341
|
+
this.currScrollDirection = this.currSelectedCoachIndex > this.selectedCoachIndex ? p.right : p.left;
|
|
323
342
|
}
|
|
324
343
|
/**
|
|
325
344
|
* Returns the scroll start or end position X from the selected coach.
|
|
@@ -329,7 +348,7 @@ let we = (() => {
|
|
|
329
348
|
*/
|
|
330
349
|
_getCoachScrollPositionX() {
|
|
331
350
|
const e = this.triggerCoachPositionsCollection[this.currSelectedCoachIndex];
|
|
332
|
-
return this.isKeyboardNavigation && this.currScrollDirection ===
|
|
351
|
+
return this.isKeyboardNavigation && this.currScrollDirection === p.left && e.width > this.scrollCoachsAreaWidth ? e.end - this.scrollCoachsAreaWidth : e.start;
|
|
333
352
|
}
|
|
334
353
|
/**
|
|
335
354
|
* Sets the focus on the HTML table (grid) caption element so that the heading is read out when using a ScreenReader.
|
|
@@ -346,8 +365,8 @@ let we = (() => {
|
|
|
346
365
|
* @returns boolean
|
|
347
366
|
*/
|
|
348
367
|
_isScrollableToSelectedCoach() {
|
|
349
|
-
const e = this.alignVertical ? this.coachScrollArea.scrollTop : this.coachScrollArea.scrollLeft, t = this.alignVertical ? this.coachScrollArea.getBoundingClientRect().height : this.coachScrollArea.getBoundingClientRect().width,
|
|
350
|
-
return (e <
|
|
368
|
+
const e = this.alignVertical ? this.coachScrollArea.scrollTop : this.coachScrollArea.scrollLeft, t = this.alignVertical ? this.coachScrollArea.getBoundingClientRect().height : this.coachScrollArea.getBoundingClientRect().width, s = this.maxCalcCoachsWidth - t, i = this.triggerCoachPositionsCollection[this.currSelectedCoachIndex], a = e === this.triggerCoachPositionsCollection[this.currSelectedCoachIndex].start;
|
|
369
|
+
return (e < s || e > i.start) && !a;
|
|
351
370
|
}
|
|
352
371
|
/**
|
|
353
372
|
* Returns the coach index which is currently visible in the scroll area
|
|
@@ -355,7 +374,7 @@ let we = (() => {
|
|
|
355
374
|
*/
|
|
356
375
|
_getCoachIndexByScrollTriggerPosition() {
|
|
357
376
|
const t = (this.alignVertical ? this.coachScrollArea.scrollTop : this.coachScrollArea.scrollLeft) + this.scrollCoachsAreaWidth / 2;
|
|
358
|
-
return this.triggerCoachPositionsCollection.findIndex((
|
|
377
|
+
return this.triggerCoachPositionsCollection.findIndex((s) => t >= s.start && t <= s.end);
|
|
359
378
|
}
|
|
360
379
|
/**
|
|
361
380
|
* Get the first place of current selected coach by table cell coordinate 0-0 id.
|
|
@@ -363,8 +382,8 @@ let we = (() => {
|
|
|
363
382
|
*/
|
|
364
383
|
_getFirstPlaceInSelecedCoach() {
|
|
365
384
|
let e = null;
|
|
366
|
-
const t = this.seatReservations[this.currSelectedDeckIndex].coachItems[this.currSelectedCoachIndex],
|
|
367
|
-
return t &&
|
|
385
|
+
const t = this.seatReservations[this.currSelectedDeckIndex].coachItems[this.currSelectedCoachIndex], s = "cell-" + this.currSelectedDeckIndex + "-" + this.currSelectedCoachIndex + "-0-0", i = this.shadowRoot?.querySelector("#" + s)?.querySelector("sbb-seat-reservation-place-control")?.getAttribute("text") || null;
|
|
386
|
+
return t && i && (e = t.places?.find((a) => a.number === i) || null), e;
|
|
368
387
|
}
|
|
369
388
|
_getSwitchedCoachDeckIndexByKeyNavigation(e, t) {
|
|
370
389
|
return !this.currSelectedPlace || e === this.keyboardNavigationEvents.ArrowRight || e === this.keyboardNavigationEvents.ArrowLeft ? null : e === this.keyboardNavigationEvents.ArrowDown && this.currSelectedPlace.position.y + 2 === t.dimension.h && this.seatReservations[this.currSelectedDeckIndex + 1] ? this.currSelectedDeckIndex + 1 : e === this.keyboardNavigationEvents.ArrowUp && this.currSelectedPlace.position.y === 0 && this.seatReservations[this.currSelectedDeckIndex - 1] ? this.currSelectedDeckIndex - 1 : null;
|
|
@@ -377,40 +396,40 @@ let we = (() => {
|
|
|
377
396
|
*/
|
|
378
397
|
_getClosestPlaceByKeyDirection(e) {
|
|
379
398
|
const t = this.seatReservations[this.currSelectedDeckIndex].coachItems[this.currSelectedCoachIndex];
|
|
380
|
-
let
|
|
381
|
-
if (
|
|
399
|
+
let s = null, i = t.places, a = null;
|
|
400
|
+
if (i)
|
|
382
401
|
if (this.currSelectedPlaceElementId) {
|
|
383
402
|
if (this.currSelectedPlace) {
|
|
384
|
-
const
|
|
385
|
-
e && (
|
|
386
|
-
for (const
|
|
387
|
-
e ?
|
|
388
|
-
|
|
403
|
+
const o = { ...this.currSelectedPlace.position };
|
|
404
|
+
e && (a = this._getSwitchedCoachDeckIndexByKeyNavigation(e, t), a !== null && (i = this.seatReservations[a].coachItems[this.currSelectedCoachIndex].places || [], o.y = a < this.currSelectedDeckIndex ? t.dimension.h : -1));
|
|
405
|
+
for (const c of i)
|
|
406
|
+
e ? c.number !== this.currSelectedPlace?.number && (e === this.keyboardNavigationEvents.ArrowRight && (c.position.y === o.y || c.position.y === o.y - 1) && c.position.x > o.x && (!s || c.position.x < s.position.x) || e === this.keyboardNavigationEvents.ArrowDown && (c.position.x === o.x || c.position.x === o.x + 1) && c.position.y > o.y && (!s || c.position.y < s.position.y) || e === this.keyboardNavigationEvents.ArrowLeft && (c.position.y === o.y || c.position.y === o.y + 1) && c.position.x < o.x && (!s || c.position.x > s.position.x) || e === this.keyboardNavigationEvents.ArrowUp && (c.position.x === o.x || c.position.x === o.x - 1) && c.position.y < o.y && (!s || c.position.y > s.position.y)) && (s = c) : (this.currScrollDirection === p.right && c.position.y === o.y && (!s || c.position.x < s.position.x) || this.currScrollDirection === p.left && c.position.y === o.y && (!s || c.position.x > s.position.x)) && (s = c);
|
|
407
|
+
a !== null && s && (this.currSelectedDeckIndex = a);
|
|
389
408
|
}
|
|
390
409
|
} else
|
|
391
410
|
return this._getFirstPlaceInSelecedCoach();
|
|
392
|
-
return
|
|
411
|
+
return s;
|
|
393
412
|
}
|
|
394
413
|
// Handling for Tab navigation if an place is selected inside the coach.
|
|
395
414
|
// This controls the focused coach from the current selected coach.
|
|
396
415
|
_navigateCoachNavigationByKeyboard(e) {
|
|
397
|
-
const t = this.focusedCoachIndex === -1 ? this.currSelectedCoachIndex === -1 ? 0 : this.currSelectedCoachIndex : this.focusedCoachIndex,
|
|
398
|
-
if (t ===
|
|
416
|
+
const t = this.focusedCoachIndex === -1 ? this.currSelectedCoachIndex === -1 ? 0 : this.currSelectedCoachIndex : this.focusedCoachIndex, s = e === "NEXT_TAB" ? this.getNextAvailableCoachIndex(t) : this.getPrevAvailableCoachIndex(t);
|
|
417
|
+
if (t === s) {
|
|
399
418
|
this.unfocusPlaceElement(), this.seatReservationWithoutNavigationHasFocus = !1, e === "NEXT_TAB" ? this.lastTabElement.focus() : this.firstTabElement.focus();
|
|
400
419
|
return;
|
|
401
420
|
}
|
|
402
421
|
if (this.hasNavigation) {
|
|
403
|
-
const
|
|
422
|
+
const i = this._getPlaceHtmlElement(), a = i ? i.getAttribute("keyfocus") === "focus" : !1;
|
|
404
423
|
if (e === "PREV_TAB" && this.selectedCoachIndex === t)
|
|
405
|
-
if (
|
|
424
|
+
if (a) {
|
|
406
425
|
this.focusedCoachIndex = t, this.unfocusPlaceElement();
|
|
407
426
|
return;
|
|
408
427
|
} else
|
|
409
|
-
this.focusedCoachIndex =
|
|
410
|
-
else
|
|
411
|
-
this._scrollToSelectedNavigationButton(
|
|
428
|
+
this.focusedCoachIndex = s;
|
|
429
|
+
else s !== this.currSelectedCoachIndex ? this.focusedCoachIndex = s : (this.focusedCoachIndex = -1, this.selectedCoachIndex = s, a ? this.focusPlaceElement(this.currSelectedPlace) : (this.isCoachGridFocusable = !0, this._setFocusToSelectedCoachGrid()));
|
|
430
|
+
this._scrollToSelectedNavigationButton(s);
|
|
412
431
|
} else
|
|
413
|
-
this.scrollToSelectedNavCoach(
|
|
432
|
+
this.scrollToSelectedNavCoach(s);
|
|
414
433
|
}
|
|
415
434
|
_navigateToPlaceByKeyboard(e) {
|
|
416
435
|
if (this.preventCoachScrollByPlaceClick = !1, this.isKeyboardNavigation = !0, this.focusedCoachIndex !== -1 && (this.focusedCoachIndex = -1), !this.preventPlaceClick) {
|
|
@@ -418,8 +437,8 @@ let we = (() => {
|
|
|
418
437
|
if (t)
|
|
419
438
|
this.focusPlaceElement(t);
|
|
420
439
|
else if (e === this.keyboardNavigationEvents.ArrowRight || e === this.keyboardNavigationEvents.ArrowLeft || this.alignVertical && (e === this.keyboardNavigationEvents.ArrowUp || e === this.keyboardNavigationEvents.ArrowDown)) {
|
|
421
|
-
const
|
|
422
|
-
this.scrollToSelectedNavCoach(
|
|
440
|
+
const s = e === this.keyboardNavigationEvents.ArrowRight ? this.getNextAvailableCoachIndex() : this.getPrevAvailableCoachIndex();
|
|
441
|
+
this.scrollToSelectedNavCoach(s);
|
|
423
442
|
}
|
|
424
443
|
}
|
|
425
444
|
}
|
|
@@ -432,28 +451,28 @@ let we = (() => {
|
|
|
432
451
|
return t > 0 ? t - 1 : t;
|
|
433
452
|
}
|
|
434
453
|
updateSelectedSeatReservationPlaces(e) {
|
|
435
|
-
const t = e.placeType === "SEAT" ? "seats" : "bicycles",
|
|
436
|
-
this.selectedSeatReservationPlaces[t] =
|
|
454
|
+
const t = e.placeType === "SEAT" ? "seats" : "bicycles", s = e.placeType === "SEAT" ? this.maxSeatReservations : this.maxBicycleReservations, i = this.selectedSeatReservationPlaces[t], a = this._updateSelectedSeatReservationPlaces(i, s, e);
|
|
455
|
+
this.selectedSeatReservationPlaces[t] = a, this.dispatchEvent(new CustomEvent("selectedplaces", {
|
|
437
456
|
bubbles: !0,
|
|
438
457
|
composed: !0,
|
|
439
458
|
detail: this.selectedSeatReservationPlaces
|
|
440
459
|
}));
|
|
441
460
|
}
|
|
442
|
-
_updateSelectedSeatReservationPlaces(e, t,
|
|
443
|
-
if (
|
|
444
|
-
const
|
|
445
|
-
|
|
461
|
+
_updateSelectedSeatReservationPlaces(e, t, s) {
|
|
462
|
+
if (s.state === "SELECTED") {
|
|
463
|
+
const i = this._getSeatReservationPlaceSelection(s);
|
|
464
|
+
i && e.push(i);
|
|
446
465
|
} else
|
|
447
|
-
e = e.filter((
|
|
466
|
+
e = e.filter((i) => i.id !== s.id);
|
|
448
467
|
if (t > -1 && e.length > t) {
|
|
449
|
-
const
|
|
450
|
-
e = this._resetAllPlaceSelections(e,
|
|
468
|
+
const i = t > 0 ? s : void 0;
|
|
469
|
+
e = this._resetAllPlaceSelections(e, i);
|
|
451
470
|
}
|
|
452
471
|
return e;
|
|
453
472
|
}
|
|
454
473
|
updateCurrentSelectedPlaceInCoach(e) {
|
|
455
|
-
const t = e.coachIndex,
|
|
456
|
-
|
|
474
|
+
const t = e.coachIndex, s = this.seatReservations[this.currSelectedDeckIndex].coachItems[t].places?.find((i) => i.number == e.number);
|
|
475
|
+
s && (this.currSelectedCoachIndex = t, this.currSelectedPlace = s, this.currSelectedCoachIndex !== this.selectedCoachIndex && this.updateCurrentSelectedCoach(), this._setCurrSelectedPlaceElementId(s));
|
|
457
476
|
}
|
|
458
477
|
updateCurrentSelectedCoach() {
|
|
459
478
|
this.selectedCoachIndex = this.currSelectedCoachIndex, this.focusedCoachIndex = -1;
|
|
@@ -464,15 +483,43 @@ let we = (() => {
|
|
|
464
483
|
detail: e
|
|
465
484
|
}));
|
|
466
485
|
}
|
|
486
|
+
/**
|
|
487
|
+
* In the case of coach layouts with different decks,
|
|
488
|
+
* it is necessary to extend the offset with empty coaches
|
|
489
|
+
* in order to create a stable vehicle layout.
|
|
490
|
+
*
|
|
491
|
+
* [ooo]-[ooo]-[ooo]
|
|
492
|
+
* [ooo]-[ooo]-[ooo]-[ooo]-[ooo]
|
|
493
|
+
*/
|
|
494
|
+
_initEmptyCoachDeckOffsets() {
|
|
495
|
+
const e = Array(this.seatReservations.length - 1).fill(0);
|
|
496
|
+
this.seatReservations[this.seatReservations.length - 1].coachItems.forEach((s) => {
|
|
497
|
+
for (let i = 0; i < this.seatReservations.length - 1; i++) {
|
|
498
|
+
const a = this.seatReservations[i].coachItems[e[i]];
|
|
499
|
+
if (s.id != a?.id) {
|
|
500
|
+
const o = {
|
|
501
|
+
...s,
|
|
502
|
+
places: void 0,
|
|
503
|
+
propertyIds: void 0,
|
|
504
|
+
graphicElements: void 0,
|
|
505
|
+
serviceElements: void 0,
|
|
506
|
+
travelClass: []
|
|
507
|
+
};
|
|
508
|
+
this.seatReservations[i].coachItems.splice(e[i], 0, o);
|
|
509
|
+
}
|
|
510
|
+
e[i]++;
|
|
511
|
+
}
|
|
512
|
+
});
|
|
513
|
+
}
|
|
467
514
|
/**
|
|
468
515
|
* Initialization of SeatReservationPlaceSelection Array based on the transferred places
|
|
469
516
|
* that have the state SELECTED within the seatReservation object
|
|
470
517
|
*/
|
|
471
518
|
_initSeatReservationPlaceSelection() {
|
|
472
|
-
this.seatReservations?.forEach((e) => e.coachItems.map((t,
|
|
473
|
-
t.places?.filter((
|
|
474
|
-
const
|
|
475
|
-
|
|
519
|
+
this.seatReservations?.forEach((e) => e.coachItems.map((t, s) => {
|
|
520
|
+
t.places?.filter((i) => i.state === "SELECTED")?.forEach((i) => {
|
|
521
|
+
const a = me(i, e.deckCoachIndex, s), o = this._getSeatReservationPlaceSelection(a);
|
|
522
|
+
o && (o.placeType === "SEAT" ? this.selectedSeatReservationPlaces.seats.push(o) : this.selectedSeatReservationPlaces.bicycles.push(o));
|
|
476
523
|
});
|
|
477
524
|
}));
|
|
478
525
|
}
|
|
@@ -482,22 +529,22 @@ let we = (() => {
|
|
|
482
529
|
* @param currSelectedPlace
|
|
483
530
|
*/
|
|
484
531
|
_resetAllPlaceSelections(e, t) {
|
|
485
|
-
for (const
|
|
486
|
-
if (!t || t.id !==
|
|
487
|
-
const
|
|
488
|
-
|
|
532
|
+
for (const s of e)
|
|
533
|
+
if (!t || t.id !== s.id) {
|
|
534
|
+
const i = this.shadowRoot?.getElementById(s.id);
|
|
535
|
+
i && i.setAttribute("state", "FREE");
|
|
489
536
|
}
|
|
490
|
-
return t ? e = e.filter((
|
|
537
|
+
return t ? e = e.filter((s) => s.id === t.id) : e = [], e;
|
|
491
538
|
}
|
|
492
539
|
_getSeatReservationPlaceSelection(e) {
|
|
493
|
-
const t = this.seatReservations[this.currSelectedDeckIndex].coachItems[e.coachIndex],
|
|
494
|
-
return
|
|
540
|
+
const t = this.seatReservations[this.currSelectedDeckIndex].coachItems[e.coachIndex], s = t.places?.find((i) => i.number === e.number);
|
|
541
|
+
return s ? _e(s, t, e.deckIndex, e.coachIndex) : null;
|
|
495
542
|
}
|
|
496
543
|
_getSeatReservationSelectedCoach(e) {
|
|
497
544
|
if (!this.seatReservations[this.currSelectedDeckIndex].coachItems[e])
|
|
498
545
|
return null;
|
|
499
|
-
const t = this.seatReservations[this.currSelectedDeckIndex].coachItems[e],
|
|
500
|
-
return be(e, t,
|
|
546
|
+
const t = this.seatReservations[this.currSelectedDeckIndex].coachItems[e], s = this.getAvailableFreePlacesNumFromCoach(t.places);
|
|
547
|
+
return be(e, t, s);
|
|
501
548
|
}
|
|
502
549
|
_setCurrSelectedPlaceElementId(e) {
|
|
503
550
|
e ? this.currSelectedPlaceElementId = "seat-reservation__place-button-" + this.currSelectedDeckIndex + "-" + this.currSelectedCoachIndex + "-" + e.number : this.currSelectedPlaceElementId = null;
|
|
@@ -513,23 +560,41 @@ let we = (() => {
|
|
|
513
560
|
}
|
|
514
561
|
}
|
|
515
562
|
/**
|
|
516
|
-
* Prepares
|
|
563
|
+
* Prepares data for displaying navigation area.
|
|
564
|
+
* Calculates the values which are not going to change during use of a component:
|
|
565
|
+
* - coach id
|
|
566
|
+
* - list of service icons
|
|
567
|
+
* - class (first, second, any)
|
|
568
|
+
* - whether there is a driver area left or right
|
|
517
569
|
* */
|
|
518
|
-
|
|
519
|
-
this.seatReservations.forEach((
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
570
|
+
_prepareNavigationCoachData() {
|
|
571
|
+
this.seatReservations[this.seatReservations.length - 1].coachItems.forEach((t, s) => {
|
|
572
|
+
const i = [], a = [], o = [];
|
|
573
|
+
this.seatReservations.map((c) => c.coachItems[s]).forEach((c) => {
|
|
574
|
+
i.push(...c.travelClass), a.push(...c.propertyIds ? c.propertyIds : []), o.push(...c.places ? c.places : []);
|
|
575
|
+
}), this.coachNavData.push({
|
|
576
|
+
id: t.id,
|
|
577
|
+
travelClass: this._prepareTravelClassNavigation(i),
|
|
578
|
+
propertyIds: this._prepareServiceIconsNavigation(a),
|
|
579
|
+
isDriverArea: t.places ? t.places.length === 0 : !0,
|
|
580
|
+
driverAreaSide: this._prepareDriverAreaSideNavigation(t),
|
|
581
|
+
freePlaces: this.getAvailableFreePlacesNumFromCoach(o)
|
|
530
582
|
});
|
|
531
583
|
});
|
|
532
584
|
}
|
|
585
|
+
_prepareTravelClassNavigation(e) {
|
|
586
|
+
return e.indexOf("FIRST") !== -1 ? "FIRST" : e.indexOf("SECOND") !== -1 ? "SECOND" : "ANY_CLASS";
|
|
587
|
+
}
|
|
588
|
+
_prepareDriverAreaSideNavigation(e) {
|
|
589
|
+
const t = e.graphicElements?.filter((s) => s.icon === "DRIVER_AREA");
|
|
590
|
+
if (t && t.length > 0) {
|
|
591
|
+
const s = t.find((a) => a.position.x === 0) || !1, i = t.find((a) => a.position.x > 0) || !1;
|
|
592
|
+
return {
|
|
593
|
+
left: !!s,
|
|
594
|
+
right: !!i
|
|
595
|
+
};
|
|
596
|
+
}
|
|
597
|
+
}
|
|
533
598
|
/**
|
|
534
599
|
* Returns the current selected place HTML element by currSelectedPlaceElementId.
|
|
535
600
|
* @returns HTMLElement or null
|
|
@@ -537,38 +602,38 @@ let we = (() => {
|
|
|
537
602
|
_getPlaceHtmlElement() {
|
|
538
603
|
return this.currSelectedPlaceElementId && this.shadowRoot?.getElementById(this.currSelectedPlaceElementId) || null;
|
|
539
604
|
}
|
|
540
|
-
},
|
|
541
|
-
const e = typeof Symbol == "function" && Symbol.metadata ? Object.create(
|
|
542
|
-
u = [S({ attribute: "seat-reservations", type: Array })],
|
|
543
|
-
t.seatReservations =
|
|
544
|
-
} }, metadata: e },
|
|
545
|
-
t.hasNavigation =
|
|
546
|
-
} }, metadata: e }, z, F), f(
|
|
547
|
-
t.alignVertical =
|
|
548
|
-
} }, metadata: e }, V,
|
|
549
|
-
t.baseGridSize =
|
|
550
|
-
} }, metadata: e }, W, X), f(
|
|
551
|
-
t.height =
|
|
552
|
-
} }, metadata: e }, K, U), f(
|
|
553
|
-
t.maxSeatReservations =
|
|
554
|
-
} }, metadata: e }, M, $), f(
|
|
555
|
-
t.maxBicycleReservations =
|
|
556
|
-
} }, metadata: e },
|
|
557
|
-
t.preventPlaceClick =
|
|
558
|
-
} }, metadata: e }, Z, ee), f(
|
|
559
|
-
t.preselectCoachIndex =
|
|
560
|
-
} }, metadata: e },
|
|
561
|
-
t.selectedCoachIndex =
|
|
562
|
-
} }, metadata: e }, ce, oe), f(
|
|
563
|
-
t.focusedCoachIndex =
|
|
564
|
-
} }, metadata: e }, le,
|
|
565
|
-
t.hoveredScrollCoachIndex =
|
|
566
|
-
} }, metadata: e }, de, ue), f(
|
|
567
|
-
})(),
|
|
605
|
+
}, x = new WeakMap(), I = new WeakMap(), m = new WeakMap(), _ = new WeakMap(), b = new WeakMap(), y = new WeakMap(), P = new WeakMap(), A = new WeakMap(), R = new WeakMap(), E = new WeakMap(), N = new WeakMap(), k = new WeakMap(), (() => {
|
|
606
|
+
const e = typeof Symbol == "function" && Symbol.metadata ? Object.create(n[Symbol.metadata] ?? null) : void 0;
|
|
607
|
+
u = [S({ attribute: "seat-reservations", type: Array })], B = [C(), S({ attribute: "has-navigation", type: Boolean })], O = [C(), S({ attribute: "align-vertical", type: Boolean, reflect: !0, useDefault: !0 })], L = [C(), S({ attribute: "base-grid-size", type: Number })], H = [C(), S({ attribute: "height", type: Number })], q = [C(), S({ attribute: "max-seat-reservations", type: Number })], j = [C(), S({ attribute: "max-bicycle-reservations", type: Number })], Q = [C(), S({ attribute: "prevent-place-click", type: Boolean })], te = [C(), S({ attribute: "preselect-coach-index", type: Number })], ae = [w()], re = [w()], he = [w()], ge = [Ie({ passive: !0 })], f(h, null, u, { kind: "accessor", name: "seatReservations", static: !1, private: !1, access: { has: (t) => "seatReservations" in t, get: (t) => t.seatReservations, set: (t, s) => {
|
|
608
|
+
t.seatReservations = s;
|
|
609
|
+
} }, metadata: e }, T, D), f(h, null, B, { kind: "accessor", name: "hasNavigation", static: !1, private: !1, access: { has: (t) => "hasNavigation" in t, get: (t) => t.hasNavigation, set: (t, s) => {
|
|
610
|
+
t.hasNavigation = s;
|
|
611
|
+
} }, metadata: e }, z, F), f(h, null, O, { kind: "accessor", name: "alignVertical", static: !1, private: !1, access: { has: (t) => "alignVertical" in t, get: (t) => t.alignVertical, set: (t, s) => {
|
|
612
|
+
t.alignVertical = s;
|
|
613
|
+
} }, metadata: e }, V, G), f(h, null, L, { kind: "accessor", name: "baseGridSize", static: !1, private: !1, access: { has: (t) => "baseGridSize" in t, get: (t) => t.baseGridSize, set: (t, s) => {
|
|
614
|
+
t.baseGridSize = s;
|
|
615
|
+
} }, metadata: e }, W, X), f(h, null, H, { kind: "accessor", name: "height", static: !1, private: !1, access: { has: (t) => "height" in t, get: (t) => t.height, set: (t, s) => {
|
|
616
|
+
t.height = s;
|
|
617
|
+
} }, metadata: e }, K, U), f(h, null, q, { kind: "accessor", name: "maxSeatReservations", static: !1, private: !1, access: { has: (t) => "maxSeatReservations" in t, get: (t) => t.maxSeatReservations, set: (t, s) => {
|
|
618
|
+
t.maxSeatReservations = s;
|
|
619
|
+
} }, metadata: e }, M, $), f(h, null, j, { kind: "accessor", name: "maxBicycleReservations", static: !1, private: !1, access: { has: (t) => "maxBicycleReservations" in t, get: (t) => t.maxBicycleReservations, set: (t, s) => {
|
|
620
|
+
t.maxBicycleReservations = s;
|
|
621
|
+
} }, metadata: e }, Y, J), f(h, null, Q, { kind: "accessor", name: "preventPlaceClick", static: !1, private: !1, access: { has: (t) => "preventPlaceClick" in t, get: (t) => t.preventPlaceClick, set: (t, s) => {
|
|
622
|
+
t.preventPlaceClick = s;
|
|
623
|
+
} }, metadata: e }, Z, ee), f(h, null, te, { kind: "accessor", name: "preselectCoachIndex", static: !1, private: !1, access: { has: (t) => "preselectCoachIndex" in t, get: (t) => t.preselectCoachIndex, set: (t, s) => {
|
|
624
|
+
t.preselectCoachIndex = s;
|
|
625
|
+
} }, metadata: e }, se, ie), f(h, null, ae, { kind: "accessor", name: "selectedCoachIndex", static: !1, private: !1, access: { has: (t) => "selectedCoachIndex" in t, get: (t) => t.selectedCoachIndex, set: (t, s) => {
|
|
626
|
+
t.selectedCoachIndex = s;
|
|
627
|
+
} }, metadata: e }, ce, oe), f(h, null, re, { kind: "accessor", name: "focusedCoachIndex", static: !1, private: !1, access: { has: (t) => "focusedCoachIndex" in t, get: (t) => t.focusedCoachIndex, set: (t, s) => {
|
|
628
|
+
t.focusedCoachIndex = s;
|
|
629
|
+
} }, metadata: e }, le, ne), f(h, null, he, { kind: "accessor", name: "hoveredScrollCoachIndex", static: !1, private: !1, access: { has: (t) => "hoveredScrollCoachIndex" in t, get: (t) => t.hoveredScrollCoachIndex, set: (t, s) => {
|
|
630
|
+
t.hoveredScrollCoachIndex = s;
|
|
631
|
+
} }, metadata: e }, de, ue), f(h, null, ge, { kind: "method", name: "coachAreaScrollend", static: !1, private: !1, access: { has: (t) => "coachAreaScrollend" in t, get: (t) => t.coachAreaScrollend }, metadata: e }, null, d), e && Object.defineProperty(h, Symbol.metadata, { enumerable: !0, configurable: !0, writable: !0, value: e });
|
|
632
|
+
})(), h.events = {
|
|
568
633
|
selectedplaces: "selectedplaces",
|
|
569
634
|
selectedcoach: "selectedcoach"
|
|
570
|
-
},
|
|
635
|
+
}, h;
|
|
571
636
|
})();
|
|
572
637
|
export {
|
|
573
|
-
|
|
638
|
+
Be as SeatReservationBaseElement
|
|
574
639
|
};
|