@sbb-esta/lyne-elements-experimental 3.1.0 → 3.3.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 +1147 -590
- package/development/seat-reservation/common/mapper/icon-mapper.d.ts.map +1 -1
- package/development/seat-reservation/common/mapper/icon-mapper.js +4 -5
- package/development/seat-reservation/common/mapper/mapper.d.ts +6 -5
- package/development/seat-reservation/common/mapper/mapper.d.ts.map +1 -1
- package/development/seat-reservation/common/mapper/mapper.js +14 -11
- package/development/seat-reservation/common/mapper/seat-reservation-sample-data.d.ts +113 -0
- package/development/seat-reservation/common/mapper/seat-reservation-sample-data.d.ts.map +1 -1
- package/development/seat-reservation/common/mapper/seat-reservation-sample-data.js +25999 -649
- package/development/seat-reservation/common/svgs.d.ts +0 -1
- package/development/seat-reservation/common/svgs.d.ts.map +1 -1
- package/development/seat-reservation/common/svgs.js +1 -3
- package/development/seat-reservation/common/translations/i18n.d.ts.map +1 -1
- package/development/seat-reservation/common/translations/i18n.js +225 -194
- package/development/seat-reservation/common/types.d.ts +20 -3
- package/development/seat-reservation/common/types.d.ts.map +1 -1
- package/development/seat-reservation/seat-reservation/seat-reservation-base-element.d.ts +50 -18
- 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 +352 -172
- package/development/seat-reservation/seat-reservation/seat-reservation.component.d.ts +29 -13
- package/development/seat-reservation/seat-reservation/seat-reservation.component.d.ts.map +1 -1
- package/development/seat-reservation/seat-reservation/seat-reservation.component.js +603 -308
- package/development/seat-reservation/seat-reservation-area/seat-reservation-area.component.js +17 -10
- 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 +1 -6
- package/development/seat-reservation/seat-reservation-graphic/seat-reservation-graphic.component.js +36 -18
- package/development/seat-reservation/seat-reservation-navigation-coach/seat-reservation-navigation-coach.component.d.ts +3 -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 +54 -32
- package/development/seat-reservation/seat-reservation-place-control/seat-reservation-place-control.component.d.ts +2 -0
- package/development/seat-reservation/seat-reservation-place-control/seat-reservation-place-control.component.d.ts.map +1 -1
- package/development/seat-reservation/seat-reservation-place-control/seat-reservation-place-control.component.js +107 -58
- package/development/seat-reservation/seat-reservation-scoped/seat-reservation-scoped.component.d.ts +1 -16
- package/development/seat-reservation/seat-reservation-scoped/seat-reservation-scoped.component.d.ts.map +1 -1
- package/development/seat-reservation/seat-reservation-scoped/seat-reservation-scoped.component.js +10 -164
- package/package.json +2 -2
- package/seat-reservation/common/mapper/icon-mapper.d.ts.map +1 -1
- package/seat-reservation/common/mapper/icon-mapper.js +3 -4
- package/seat-reservation/common/mapper/mapper.d.ts +6 -5
- package/seat-reservation/common/mapper/mapper.d.ts.map +1 -1
- package/seat-reservation/common/mapper/mapper.js +35 -32
- package/seat-reservation/common/mapper/seat-reservation-sample-data.d.ts +113 -0
- package/seat-reservation/common/mapper/seat-reservation-sample-data.d.ts.map +1 -1
- package/seat-reservation/common/mapper/seat-reservation-sample-data.js +25997 -648
- package/seat-reservation/common/svgs.d.ts +0 -1
- package/seat-reservation/common/svgs.d.ts.map +1 -1
- package/seat-reservation/common/svgs.js +4 -11
- package/seat-reservation/common/translations/i18n.d.ts.map +1 -1
- package/seat-reservation/common/translations/i18n.js +228 -197
- package/seat-reservation/common/types.d.ts +20 -3
- package/seat-reservation/common/types.d.ts.map +1 -1
- package/seat-reservation/seat-reservation/seat-reservation-base-element.d.ts +50 -18
- package/seat-reservation/seat-reservation/seat-reservation-base-element.d.ts.map +1 -1
- package/seat-reservation/seat-reservation/seat-reservation-base-element.js +294 -175
- package/seat-reservation/seat-reservation/seat-reservation.component.d.ts +29 -13
- package/seat-reservation/seat-reservation/seat-reservation.component.d.ts.map +1 -1
- package/seat-reservation/seat-reservation/seat-reservation.component.js +318 -303
- package/seat-reservation/seat-reservation-area/seat-reservation-area.component.js +22 -22
- package/seat-reservation/seat-reservation-graphic/seat-reservation-assets.d.ts.map +1 -1
- package/seat-reservation/seat-reservation-graphic/seat-reservation-assets.js +0 -5
- package/seat-reservation/seat-reservation-graphic/seat-reservation-graphic.component.js +37 -37
- package/seat-reservation/seat-reservation-navigation-coach/seat-reservation-navigation-coach.component.d.ts +3 -1
- 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 +95 -84
- package/seat-reservation/seat-reservation-place-control/seat-reservation-place-control.component.d.ts +2 -0
- package/seat-reservation/seat-reservation-place-control/seat-reservation-place-control.component.d.ts.map +1 -1
- package/seat-reservation/seat-reservation-place-control/seat-reservation-place-control.component.js +75 -63
- package/seat-reservation/seat-reservation-scoped/seat-reservation-scoped.component.d.ts +1 -16
- package/seat-reservation/seat-reservation-scoped/seat-reservation-scoped.component.d.ts.map +1 -1
- package/seat-reservation/seat-reservation-scoped/seat-reservation-scoped.component.js +14 -101
|
@@ -1,34 +1,40 @@
|
|
|
1
|
-
var
|
|
2
|
-
throw TypeError(
|
|
1
|
+
var ue = (h) => {
|
|
2
|
+
throw TypeError(h);
|
|
3
3
|
};
|
|
4
|
-
var
|
|
5
|
-
var
|
|
6
|
-
import { __runInitializers as
|
|
7
|
-
import { isArrowKeyOrPageKeysPressed as
|
|
8
|
-
import { forceType as
|
|
9
|
-
import { LitElement as
|
|
10
|
-
import { property as C, state as
|
|
11
|
-
import { mapPlaceInfosToPlaceSelection as
|
|
12
|
-
var
|
|
13
|
-
(function(
|
|
14
|
-
|
|
15
|
-
})(
|
|
16
|
-
let
|
|
17
|
-
var
|
|
18
|
-
let
|
|
19
|
-
return
|
|
4
|
+
var ge = (h, d, u) => d.has(h) || ue("Cannot " + u);
|
|
5
|
+
var g = (h, d, u) => (ge(h, d, "read from private field"), u ? u.call(h) : d.get(h)), v = (h, d, u) => d.has(h) ? ue("Cannot add the same private member more than once") : d instanceof WeakSet ? d.add(h) : d.set(h, u), o = (h, d, u, w) => (ge(h, d, "write to private field"), w ? w.call(h, u) : d.set(h, u), u);
|
|
6
|
+
import { __runInitializers as r, __esDecorate as f } from "tslib";
|
|
7
|
+
import { isArrowKeyOrPageKeysPressed as ve } from "@sbb-esta/lyne-elements/core/a11y.js";
|
|
8
|
+
import { forceType as S } from "@sbb-esta/lyne-elements/core/decorators.js";
|
|
9
|
+
import { LitElement as fe } from "lit";
|
|
10
|
+
import { property as C, state as B } from "lit/decorators.js";
|
|
11
|
+
import { mapPlaceInfosToPlaceSelection as Ce, mapPlaceAndCoachToSeatReservationPlaceSelection as Se, mapCoachInfosToCoachSelection as xe } from "../common/mapper.js";
|
|
12
|
+
var x;
|
|
13
|
+
(function(h) {
|
|
14
|
+
h.right = "right", h.left = "left";
|
|
15
|
+
})(x || (x = {}));
|
|
16
|
+
let Re = (() => {
|
|
17
|
+
var I, p, b, m, y, _, P, A, R, k, E, N, n;
|
|
18
|
+
let h = fe, d, u = [], w = [], T, D = [], z = [], G, F = [], V = [], L, O = [], W = [], X, H = [], K = [], U, q = [], M = [], $, j = [], J = [], Q, Y = [], Z = [], ee, te = [], ie = [], se, ae = [], ce = [], oe, re = [], le = [], he, ne = [], de = [];
|
|
19
|
+
return n = class extends h {
|
|
20
20
|
constructor() {
|
|
21
21
|
super(...arguments);
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
22
|
+
v(this, I);
|
|
23
|
+
v(this, p);
|
|
24
|
+
v(this, b);
|
|
25
|
+
v(this, m);
|
|
26
|
+
v(this, y);
|
|
27
|
+
v(this, _);
|
|
28
|
+
v(this, P);
|
|
29
|
+
v(this, A);
|
|
30
|
+
v(this, R);
|
|
31
|
+
v(this, k);
|
|
32
|
+
v(this, E);
|
|
33
|
+
v(this, N);
|
|
34
|
+
o(this, I, r(this, u, null)), o(this, p, (r(this, w), r(this, D, !0))), o(this, b, (r(this, z), r(this, F, !1))), o(this, m, (r(this, V), r(this, O, 16))), o(this, y, (r(this, W), r(this, H, null))), o(this, _, (r(this, K), r(this, q, -1))), o(this, P, (r(this, M), r(this, j, -1))), o(this, A, (r(this, J), r(this, Y, !1))), o(this, R, (r(this, Z), r(this, te, -1))), o(this, k, (r(this, ie), r(this, ae, -1))), o(this, E, (r(this, ce), r(this, re, -1))), o(this, N, (r(this, le), r(this, ne, -1))), this.coachBorderPadding = (r(this, de), 6), this.gapBetweenCoaches = 4, this.coachBorderOffset = this.coachBorderPadding / this.baseGridSize, this.gapBetweenCoachDecks = 48, this.coachNavButtonDim = 0, this.currScrollDirection = x.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
|
+
seats: [],
|
|
36
|
+
bicycles: []
|
|
37
|
+
}, this.seatReservationWithoutNavigationHasFocus = !1, this.isCoachGridFocusable = !1, this.isAutoScrolling = !1, this.isKeyboardNavigation = !1, this.hasMultipleDecks = !1, this.keyboardNavigationEvents = {
|
|
32
38
|
ArrowLeft: "ArrowLeft",
|
|
33
39
|
ArrowRight: "ArrowRight",
|
|
34
40
|
ArrowUp: "ArrowUp",
|
|
@@ -37,85 +43,135 @@ let fe = (() => {
|
|
|
37
43
|
Enter: "Enter"
|
|
38
44
|
};
|
|
39
45
|
}
|
|
40
|
-
/** The seat
|
|
41
|
-
get
|
|
42
|
-
return
|
|
46
|
+
/** The seat reservations array contains all coaches and places */
|
|
47
|
+
get seatReservations() {
|
|
48
|
+
return g(this, I);
|
|
43
49
|
}
|
|
44
|
-
set
|
|
45
|
-
|
|
50
|
+
set seatReservations(e) {
|
|
51
|
+
o(this, I, e);
|
|
46
52
|
}
|
|
47
53
|
/** The seat reservation navigation can be toggled by this property */
|
|
48
54
|
get hasNavigation() {
|
|
49
|
-
return
|
|
55
|
+
return g(this, p);
|
|
50
56
|
}
|
|
51
57
|
set hasNavigation(e) {
|
|
52
|
-
|
|
58
|
+
o(this, p, e);
|
|
53
59
|
}
|
|
54
60
|
/** The seat reservation area is aligned vertically */
|
|
55
61
|
get alignVertical() {
|
|
56
|
-
return
|
|
62
|
+
return g(this, b);
|
|
57
63
|
}
|
|
58
64
|
set alignVertical(e) {
|
|
59
|
-
|
|
65
|
+
o(this, b, e);
|
|
60
66
|
}
|
|
61
67
|
/** The seat reservation area's base grid size */
|
|
62
68
|
get baseGridSize() {
|
|
63
|
-
return
|
|
69
|
+
return g(this, m);
|
|
64
70
|
}
|
|
65
71
|
set baseGridSize(e) {
|
|
66
|
-
|
|
72
|
+
o(this, m, e);
|
|
67
73
|
}
|
|
68
74
|
/** The seat reservation area's width */
|
|
69
75
|
get height() {
|
|
70
|
-
return
|
|
76
|
+
return g(this, y);
|
|
71
77
|
}
|
|
72
78
|
set height(e) {
|
|
73
|
-
|
|
79
|
+
o(this, y, e);
|
|
74
80
|
}
|
|
75
81
|
/** Maximal number of possible clickable seats */
|
|
76
|
-
get
|
|
77
|
-
return
|
|
82
|
+
get maxSeatReservations() {
|
|
83
|
+
return g(this, _);
|
|
78
84
|
}
|
|
79
|
-
set
|
|
80
|
-
|
|
85
|
+
set maxSeatReservations(e) {
|
|
86
|
+
o(this, _, e);
|
|
87
|
+
}
|
|
88
|
+
/** Maximal number of possible clickable bicycle places */
|
|
89
|
+
get maxBicycleReservations() {
|
|
90
|
+
return g(this, P);
|
|
91
|
+
}
|
|
92
|
+
set maxBicycleReservations(e) {
|
|
93
|
+
o(this, P, e);
|
|
81
94
|
}
|
|
82
95
|
/** Any click functionality is prevented */
|
|
83
96
|
get preventPlaceClick() {
|
|
84
|
-
return
|
|
97
|
+
return g(this, A);
|
|
85
98
|
}
|
|
86
99
|
set preventPlaceClick(e) {
|
|
87
|
-
|
|
100
|
+
o(this, A, e);
|
|
101
|
+
}
|
|
102
|
+
get preselectCoachIndex() {
|
|
103
|
+
return g(this, R);
|
|
104
|
+
}
|
|
105
|
+
set preselectCoachIndex(e) {
|
|
106
|
+
o(this, R, e);
|
|
88
107
|
}
|
|
89
108
|
get selectedCoachIndex() {
|
|
90
|
-
return
|
|
109
|
+
return g(this, k);
|
|
91
110
|
}
|
|
92
111
|
set selectedCoachIndex(e) {
|
|
93
|
-
|
|
112
|
+
o(this, k, e);
|
|
94
113
|
}
|
|
95
114
|
get focusedCoachIndex() {
|
|
96
|
-
return
|
|
115
|
+
return g(this, E);
|
|
97
116
|
}
|
|
98
117
|
set focusedCoachIndex(e) {
|
|
99
|
-
|
|
118
|
+
o(this, E, e);
|
|
119
|
+
}
|
|
120
|
+
//Sets the hover style when scrolling to a coach
|
|
121
|
+
get hoveredScrollCoachIndex() {
|
|
122
|
+
return g(this, N);
|
|
123
|
+
}
|
|
124
|
+
set hoveredScrollCoachIndex(e) {
|
|
125
|
+
o(this, N, e);
|
|
100
126
|
}
|
|
101
127
|
willUpdate(e) {
|
|
102
|
-
super.willUpdate(e), e.has("
|
|
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) {
|
|
129
|
+
const t = this.seatReservations[this.currSelectedDeckIndex] || null;
|
|
130
|
+
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
|
+
}
|
|
132
|
+
e.has("alignVertical") && this.alignVertical && this.initNavigationSelectionByScrollEvent(), e.has("preselectCoachIndex") && this.preselectCoachIndex && setTimeout(() => this.scrollToSelectedNavCoach(this.preselectCoachIndex), 1);
|
|
133
|
+
}
|
|
134
|
+
navigateByDirectionBtn(e) {
|
|
135
|
+
this.unfocusPlaceElement();
|
|
136
|
+
let t = this.currSelectedCoachIndex;
|
|
137
|
+
e == "DIRECTION_LEFT" && t > 0 ? t = this.currSelectedCoachIndex != -1 ? this.currSelectedCoachIndex - 1 : 0 : e == "DIRECTION_RIGHT" && t < this.seatReservations[this.currSelectedDeckIndex].coachItems.length - 1 && (t = this.currSelectedCoachIndex != -1 ? this.currSelectedCoachIndex + 1 : 0), this.scrollToSelectedNavCoach(t);
|
|
138
|
+
}
|
|
139
|
+
/**
|
|
140
|
+
* Data can be prepared once for the entire component
|
|
141
|
+
* in order to avoid recurring iteration processes in rendering.
|
|
142
|
+
*/
|
|
143
|
+
initPrepairSeatReservationData() {
|
|
144
|
+
this._prepairCoachDriverArea();
|
|
103
145
|
}
|
|
104
146
|
/* Init scroll event handling for coach navigation */
|
|
105
147
|
initNavigationSelectionByScrollEvent() {
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
148
|
+
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
|
+
const e = this.seatReservations ? this.seatReservations[this.currSelectedDeckIndex] : null;
|
|
150
|
+
if (e && e.coachItems.length > 0) {
|
|
151
|
+
const t = e.coachItems[0].dimension.h * this.baseGridSize + this.coachBorderPadding, i = (this.seatReservations.length - 1) * this.gapBetweenCoachDecks;
|
|
152
|
+
this.style?.setProperty("--sbb-seat-reservation-height", `${t * this.seatReservations.length + i}`), this.style?.setProperty("--sbb-seat-reservation-decks", `${this.seatReservations.length}`);
|
|
153
|
+
}
|
|
154
|
+
if (this.navigationScrollArea) {
|
|
155
|
+
this.scrollNavigationAreaDim = this.alignVertical ? this.navigationScrollArea.getBoundingClientRect().height : this.navigationScrollArea.getBoundingClientRect().width;
|
|
156
|
+
const t = this.navigationScrollArea.querySelector("ul > li");
|
|
157
|
+
if (t) {
|
|
158
|
+
const i = t?.getBoundingClientRect();
|
|
159
|
+
this.coachNavButtonDim = this.alignVertical ? i.height : i.width;
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
if (this.coachScrollArea && e) {
|
|
163
|
+
let t = 0;
|
|
164
|
+
this.scrollCoachsAreaWidth = this.alignVertical ? this.coachScrollArea.getBoundingClientRect().height : this.coachScrollArea.getBoundingClientRect().width, this.triggerCoachPositionsCollection = e.coachItems.map((i) => {
|
|
165
|
+
const s = t, c = this.getCalculatedDimension(i.dimension).w;
|
|
166
|
+
return t += c + this.gapBetweenCoaches, {
|
|
167
|
+
start: s,
|
|
168
|
+
end: t,
|
|
169
|
+
width: c
|
|
114
170
|
};
|
|
115
|
-
}), this.maxCalcCoachsWidth =
|
|
116
|
-
const
|
|
117
|
-
this._isScrollableToSelectedCoach() ? this.currSelectedCoachIndex =
|
|
118
|
-
})
|
|
171
|
+
}), this.maxCalcCoachsWidth = t, this.coachScrollArea.addEventListener("scrollend", () => {
|
|
172
|
+
const i = this.isAutoScrolling ? this.currSelectedCoachIndex : this._getCoachIndexByScrollTriggerPosition();
|
|
173
|
+
this.currSelectedCoachIndex === -1 && (this.currSelectedCoachIndex = i), this._isScrollableToSelectedCoach() ? this.currSelectedCoachIndex = i : this.currSelectedCoachIndex = i < this.currSelectedCoachIndex ? this.currSelectedCoachIndex : i, this.isAutoScrolling || this._scrollToSelectedNavigationButton(i), this.preventCoachScrollByPlaceClick = !1, this.updateCurrentSelectedCoach(), this.hasNavigation || (this.preselectPlaceInCoach(), this.isAutoScrolling = !1);
|
|
174
|
+
});
|
|
119
175
|
}
|
|
120
176
|
}
|
|
121
177
|
/**
|
|
@@ -143,7 +199,7 @@ let fe = (() => {
|
|
|
143
199
|
return;
|
|
144
200
|
}
|
|
145
201
|
}
|
|
146
|
-
if (this.currSelectedCoachIndex !== -1 &&
|
|
202
|
+
if (this.currSelectedCoachIndex !== -1 && ve(e))
|
|
147
203
|
switch (e.preventDefault(), t) {
|
|
148
204
|
case this.keyboardNavigationEvents.ArrowLeft:
|
|
149
205
|
{
|
|
@@ -184,27 +240,82 @@ let fe = (() => {
|
|
|
184
240
|
this.isAutoScrolling = !0, this.isCoachGridFocusable = !0, this.currSelectedCoachIndex = e, this._setScrollDirectionByCoachIndex();
|
|
185
241
|
const t = this._getCoachScrollPositionX();
|
|
186
242
|
(this.selectedCoachIndex !== -1 || this.currSelectedCoachIndex > 0) && this._isScrollableToSelectedCoach() ? this.coachScrollArea.scrollTo({
|
|
187
|
-
top: 0,
|
|
188
|
-
left: t,
|
|
243
|
+
top: this.alignVertical ? t : 0,
|
|
244
|
+
left: this.alignVertical ? 0 : t,
|
|
189
245
|
behavior: "smooth"
|
|
190
|
-
}) : this.updateCurrentSelectedCoach();
|
|
246
|
+
}) : this.updateCurrentSelectedCoach(), this._scrollToSelectedNavigationButton(e);
|
|
191
247
|
}
|
|
192
248
|
}
|
|
249
|
+
focusPlaceElement(e) {
|
|
250
|
+
if (this.unfocusPlaceElement(), e) {
|
|
251
|
+
this.currSelectedPlace = e, this._setCurrSelectedPlaceElementId(e);
|
|
252
|
+
const t = this._getPlaceHtmlElement();
|
|
253
|
+
t && t.setAttribute("keyfocus", "focus");
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
unfocusPlaceElement() {
|
|
257
|
+
const e = this._getPlaceHtmlElement();
|
|
258
|
+
e && (e.setAttribute("keyfocus", "unfocus"), this._setCurrSelectedPlaceElementId(null), this.currSelectedPlace = null);
|
|
259
|
+
}
|
|
260
|
+
getCalculatedDimension(e, t, i, s) {
|
|
261
|
+
return t && !i && (e.h += this.coachBorderOffset * 2), s && (e.h += this.coachBorderOffset), {
|
|
262
|
+
w: this.baseGridSize * e.w,
|
|
263
|
+
h: this.baseGridSize * e.h
|
|
264
|
+
};
|
|
265
|
+
}
|
|
266
|
+
getCalculatedPosition(e, t, i, s) {
|
|
267
|
+
if (i && t) {
|
|
268
|
+
const c = s ? i.h : i.h + this.coachBorderOffset;
|
|
269
|
+
e.y === 0 ? e.y -= this.coachBorderOffset : e.y + t.h === c && (e.y += this.coachBorderOffset);
|
|
270
|
+
}
|
|
271
|
+
return {
|
|
272
|
+
x: this.baseGridSize * e.x,
|
|
273
|
+
y: this.baseGridSize * e.y,
|
|
274
|
+
z: e.z
|
|
275
|
+
};
|
|
276
|
+
}
|
|
277
|
+
/**
|
|
278
|
+
* Counts all available seats together depending on the seat type
|
|
279
|
+
*
|
|
280
|
+
* @param coachIndex
|
|
281
|
+
* @returns An Object with count of free seats and free bicycle places
|
|
282
|
+
*/
|
|
283
|
+
getAvailableFreePlacesNumFromCoach(e) {
|
|
284
|
+
const t = { seats: 0, bicycles: 0 }, i = this.seatReservations[this.currSelectedDeckIndex].coachItems[e].places?.reduce((s, c) => (c.state !== "FREE" || (c.type === "SEAT" ? s.seats++ : s.bicycles++), s), t);
|
|
285
|
+
return i || t;
|
|
286
|
+
}
|
|
287
|
+
/**
|
|
288
|
+
* Performs an automatic main navigation scroll to the specified selectedNavCoachIndex.
|
|
289
|
+
* Calculates the central scroll offset of the nav coach to be selected.
|
|
290
|
+
* @param selectedNavCoachIndex
|
|
291
|
+
*/
|
|
292
|
+
_scrollToSelectedNavigationButton(e) {
|
|
293
|
+
setTimeout(() => {
|
|
294
|
+
if (this.hoveredScrollCoachIndex = e, this.hasNavigation && this.navigationScrollArea) {
|
|
295
|
+
const t = this.scrollNavigationAreaDim / 2, s = e * this.coachNavButtonDim - t + this.coachNavButtonDim;
|
|
296
|
+
this.navigationScrollArea.scrollTo({
|
|
297
|
+
top: this.alignVertical ? s : 0,
|
|
298
|
+
left: this.alignVertical ? 0 : s,
|
|
299
|
+
behavior: "smooth"
|
|
300
|
+
});
|
|
301
|
+
}
|
|
302
|
+
}, 10);
|
|
303
|
+
}
|
|
193
304
|
/**
|
|
194
305
|
* Sets the new ScrollDirection by the new given target coach index.
|
|
195
306
|
*/
|
|
196
307
|
_setScrollDirectionByCoachIndex() {
|
|
197
|
-
this.currScrollDirection = this.currSelectedCoachIndex > this.selectedCoachIndex ?
|
|
308
|
+
this.currScrollDirection = this.currSelectedCoachIndex > this.selectedCoachIndex ? x.right : x.left;
|
|
198
309
|
}
|
|
199
310
|
/**
|
|
200
311
|
* Returns the scroll start or end position X from the selected coach.
|
|
201
|
-
* In case the user is
|
|
202
|
-
* then we return the end position of the coach to get
|
|
312
|
+
* In case the user is currently navigating through places by keyboard and goes to previous coach,
|
|
313
|
+
* then we return the end position of the coach to get the closest scroll position of the next focus place.
|
|
203
314
|
* @returns number
|
|
204
315
|
*/
|
|
205
316
|
_getCoachScrollPositionX() {
|
|
206
317
|
const e = this.triggerCoachPositionsCollection[this.currSelectedCoachIndex];
|
|
207
|
-
return this.isKeyboardNavigation && this.currScrollDirection ===
|
|
318
|
+
return this.isKeyboardNavigation && this.currScrollDirection === x.left && e.width > this.scrollCoachsAreaWidth ? e.end - this.scrollCoachsAreaWidth : e.start;
|
|
208
319
|
}
|
|
209
320
|
/**
|
|
210
321
|
* Sets the focus on the HTML table (grid) caption element so that the heading is read out when using a ScreenReader.
|
|
@@ -221,16 +332,16 @@ let fe = (() => {
|
|
|
221
332
|
* @returns boolean
|
|
222
333
|
*/
|
|
223
334
|
_isScrollableToSelectedCoach() {
|
|
224
|
-
const e = this.coachScrollArea.scrollLeft, t = this.coachScrollArea.getBoundingClientRect().width, i = this.maxCalcCoachsWidth - t, s = this.triggerCoachPositionsCollection[this.currSelectedCoachIndex],
|
|
225
|
-
return (e < i || e > s.start) && !
|
|
335
|
+
const e = this.alignVertical ? this.coachScrollArea.scrollTop : this.coachScrollArea.scrollLeft, t = this.alignVertical ? this.coachScrollArea.getBoundingClientRect().height : this.coachScrollArea.getBoundingClientRect().width, i = this.maxCalcCoachsWidth - t, s = this.triggerCoachPositionsCollection[this.currSelectedCoachIndex], c = e === this.triggerCoachPositionsCollection[this.currSelectedCoachIndex].start;
|
|
336
|
+
return (e < i || e > s.start) && !c;
|
|
226
337
|
}
|
|
227
338
|
/**
|
|
228
339
|
* Returns the coach index which is currently visible in the scroll area
|
|
229
340
|
* @returns number
|
|
230
341
|
*/
|
|
231
342
|
_getCoachIndexByScrollTriggerPosition() {
|
|
232
|
-
const
|
|
233
|
-
return this.triggerCoachPositionsCollection.findIndex((
|
|
343
|
+
const t = (this.alignVertical ? this.coachScrollArea.scrollTop : this.coachScrollArea.scrollLeft) + this.scrollCoachsAreaWidth / 2;
|
|
344
|
+
return this.triggerCoachPositionsCollection.findIndex((i) => t >= i.start && t <= i.end);
|
|
234
345
|
}
|
|
235
346
|
/**
|
|
236
347
|
* Get the first place of current selected coach by table cell coordinate 0-0 id.
|
|
@@ -238,8 +349,11 @@ let fe = (() => {
|
|
|
238
349
|
*/
|
|
239
350
|
_getFirstPlaceInSelecedCoach() {
|
|
240
351
|
let e = null;
|
|
241
|
-
const t = this.
|
|
242
|
-
return t && s && (e = t.places?.find((
|
|
352
|
+
const t = this.seatReservations[this.currSelectedDeckIndex].coachItems[this.currSelectedCoachIndex], i = "cell-" + this.currSelectedDeckIndex + "-" + this.currSelectedCoachIndex + "-0-0", s = this.shadowRoot?.querySelector("#" + i)?.querySelector("sbb-seat-reservation-place-control")?.getAttribute("text") || null;
|
|
353
|
+
return t && s && (e = t.places?.find((c) => c.number === s) || null), e;
|
|
354
|
+
}
|
|
355
|
+
_getSwitchedCoachDeckIndexByKeyNavigation(e, t) {
|
|
356
|
+
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;
|
|
243
357
|
}
|
|
244
358
|
/**
|
|
245
359
|
* To get the correct closest place of current pressed key and the current selected place,
|
|
@@ -248,56 +362,39 @@ let fe = (() => {
|
|
|
248
362
|
* @returns Place or null
|
|
249
363
|
*/
|
|
250
364
|
_getClosestPlaceByKeyDirection(e) {
|
|
251
|
-
const t = this.
|
|
252
|
-
let i = null;
|
|
253
|
-
if (
|
|
365
|
+
const t = this.seatReservations[this.currSelectedDeckIndex].coachItems[this.currSelectedCoachIndex];
|
|
366
|
+
let i = null, s = t.places, c = null;
|
|
367
|
+
if (s)
|
|
254
368
|
if (this.currSelectedPlaceElementId) {
|
|
255
|
-
if (this.currSelectedPlace)
|
|
256
|
-
|
|
257
|
-
|
|
369
|
+
if (this.currSelectedPlace) {
|
|
370
|
+
const l = { ...this.currSelectedPlace.position };
|
|
371
|
+
e && (c = this._getSwitchedCoachDeckIndexByKeyNavigation(e, t), c !== null && (s = this.seatReservations[c].coachItems[this.currSelectedCoachIndex].places || [], l.y = c < this.currSelectedDeckIndex ? t.dimension.h : -1));
|
|
372
|
+
for (const a of s)
|
|
373
|
+
e ? a.number !== this.currSelectedPlace?.number && (e === this.keyboardNavigationEvents.ArrowRight && (a.position.y === l.y || a.position.y === l.y - 1) && a.position.x > l.x && (!i || a.position.x < i.position.x) || e === this.keyboardNavigationEvents.ArrowDown && (a.position.x === l.x || a.position.x === l.x + 1) && a.position.y > l.y && (!i || a.position.y < i.position.y) || e === this.keyboardNavigationEvents.ArrowLeft && (a.position.y === l.y || a.position.y === l.y + 1) && a.position.x < l.x && (!i || a.position.x > i.position.x) || e === this.keyboardNavigationEvents.ArrowUp && (a.position.x === l.x || a.position.x === l.x - 1) && a.position.y < l.y && (!i || a.position.y > i.position.y)) && (i = a) : (this.currScrollDirection === x.right && a.position.y === l.y && (!i || a.position.x < i.position.x) || this.currScrollDirection === x.left && a.position.y === l.y && (!i || a.position.x > i.position.x)) && (i = a);
|
|
374
|
+
c !== null && i && (this.currSelectedDeckIndex = c);
|
|
375
|
+
}
|
|
258
376
|
} else
|
|
259
377
|
return this._getFirstPlaceInSelecedCoach();
|
|
260
378
|
return i;
|
|
261
379
|
}
|
|
262
|
-
focusPlaceElement(e, t) {
|
|
263
|
-
if (this.unfocusPlaceElement(), e) {
|
|
264
|
-
this.currSelectedPlace = e, t && (this.currSelectedCoachIndex = t), this._setCurrSelectedPlaceElementId(e);
|
|
265
|
-
const i = this._getPlaceHtmlElement();
|
|
266
|
-
i && i.setAttribute("keyfocus", "focus");
|
|
267
|
-
}
|
|
268
|
-
}
|
|
269
|
-
unfocusPlaceElement() {
|
|
270
|
-
const e = this._getPlaceHtmlElement();
|
|
271
|
-
e && (e.setAttribute("keyfocus", "unfocus"), this._setCurrSelectedPlaceElementId(null), this.currSelectedPlace = null);
|
|
272
|
-
}
|
|
273
|
-
getCalculatedDimension(e, t, i, s) {
|
|
274
|
-
return t && !i && (e.h += this.coachBorderOffset * 2), s && (e.h += this.coachBorderOffset), {
|
|
275
|
-
w: this.baseGridSize * e.w,
|
|
276
|
-
h: this.baseGridSize * e.h
|
|
277
|
-
};
|
|
278
|
-
}
|
|
279
|
-
getCalculatedPosition(e, t, i, s) {
|
|
280
|
-
if (i && t) {
|
|
281
|
-
const n = s ? i.h : i.h + this.coachBorderOffset;
|
|
282
|
-
e.y === 0 ? e.y -= this.coachBorderOffset : e.y + t.h === n && (e.y += this.coachBorderOffset);
|
|
283
|
-
}
|
|
284
|
-
return {
|
|
285
|
-
x: this.baseGridSize * e.x,
|
|
286
|
-
y: this.baseGridSize * e.y,
|
|
287
|
-
z: e.z
|
|
288
|
-
};
|
|
289
|
-
}
|
|
290
380
|
// Handling for Tab navigation if an place is selected inside the coach.
|
|
291
381
|
// This controls the focused coach from the current selected coach.
|
|
292
382
|
_navigateCoachNavigationByKeyboard(e) {
|
|
293
383
|
const t = this.focusedCoachIndex === -1 ? this.currSelectedCoachIndex === -1 ? 0 : this.currSelectedCoachIndex : this.focusedCoachIndex, i = e === "NEXT_TAB" ? this.getNextAvailableCoachIndex(t) : this.getPrevAvailableCoachIndex(t);
|
|
294
384
|
if (t === i) {
|
|
295
|
-
this.unfocusPlaceElement(), this.
|
|
385
|
+
this.unfocusPlaceElement(), this.seatReservationWithoutNavigationHasFocus = !1, e === "NEXT_TAB" ? this.lastTabElement.focus() : this.firstTabElement.focus();
|
|
296
386
|
return;
|
|
297
387
|
}
|
|
298
388
|
if (this.hasNavigation) {
|
|
299
|
-
const s = this._getPlaceHtmlElement(),
|
|
300
|
-
e === "PREV_TAB" && this.selectedCoachIndex === t
|
|
389
|
+
const s = this._getPlaceHtmlElement(), c = s ? s.getAttribute("keyfocus") === "focus" : !1;
|
|
390
|
+
if (e === "PREV_TAB" && this.selectedCoachIndex === t)
|
|
391
|
+
if (c) {
|
|
392
|
+
this.focusedCoachIndex = t, this.unfocusPlaceElement();
|
|
393
|
+
return;
|
|
394
|
+
} else
|
|
395
|
+
this.focusedCoachIndex = i;
|
|
396
|
+
else i !== this.currSelectedCoachIndex ? this.focusedCoachIndex = i : (this.focusedCoachIndex = -1, this.selectedCoachIndex = i, c ? this.focusPlaceElement(this.currSelectedPlace) : (this.isCoachGridFocusable = !0, this._setFocusToSelectedCoachGrid()));
|
|
397
|
+
this._scrollToSelectedNavigationButton(i);
|
|
301
398
|
} else
|
|
302
399
|
this.scrollToSelectedNavCoach(i);
|
|
303
400
|
}
|
|
@@ -314,31 +411,39 @@ let fe = (() => {
|
|
|
314
411
|
}
|
|
315
412
|
getNextAvailableCoachIndex(e) {
|
|
316
413
|
const t = e ?? this.currSelectedCoachIndex;
|
|
317
|
-
return t < this.
|
|
414
|
+
return t < this.seatReservations[this.currSelectedDeckIndex].coachItems.length - 1 ? t + 1 : t;
|
|
318
415
|
}
|
|
319
416
|
getPrevAvailableCoachIndex(e) {
|
|
320
417
|
const t = e ?? this.currSelectedCoachIndex;
|
|
321
418
|
return t > 0 ? t - 1 : t;
|
|
322
419
|
}
|
|
323
420
|
updateSelectedSeatReservationPlaces(e) {
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
t && this.selectedSeatReservationPlaces.push(t);
|
|
327
|
-
} else
|
|
328
|
-
this.selectedSeatReservationPlaces = this.selectedSeatReservationPlaces.filter((t) => t.id !== e.id);
|
|
329
|
-
this.maxReservations && this.selectedSeatReservationPlaces.length > this.maxReservations && this._resetAllPlaceSelections(e), this.dispatchEvent(new CustomEvent("selectedplaces", {
|
|
421
|
+
const t = e.placeType === "SEAT" ? "seats" : "bicycles", i = e.placeType === "SEAT" ? this.maxSeatReservations : this.maxBicycleReservations, s = this.selectedSeatReservationPlaces[t], c = this._updateSelectedSeatReservationPlaces(s, i, e);
|
|
422
|
+
this.selectedSeatReservationPlaces[t] = c, this.dispatchEvent(new CustomEvent("selectedplaces", {
|
|
330
423
|
bubbles: !0,
|
|
331
424
|
composed: !0,
|
|
332
425
|
detail: this.selectedSeatReservationPlaces
|
|
333
426
|
}));
|
|
334
427
|
}
|
|
428
|
+
_updateSelectedSeatReservationPlaces(e, t, i) {
|
|
429
|
+
if (i.state === "SELECTED") {
|
|
430
|
+
const s = this._getSeatReservationPlaceSelection(i);
|
|
431
|
+
s && e.push(s);
|
|
432
|
+
} else
|
|
433
|
+
e = e.filter((s) => s.id !== i.id);
|
|
434
|
+
if (t > -1 && e.length > t) {
|
|
435
|
+
const s = t > 0 ? i : void 0;
|
|
436
|
+
e = this._resetAllPlaceSelections(e, s);
|
|
437
|
+
}
|
|
438
|
+
return e;
|
|
439
|
+
}
|
|
335
440
|
updateCurrentSelectedPlaceInCoach(e) {
|
|
336
|
-
const t = e.coachIndex, i = this.
|
|
441
|
+
const t = e.coachIndex, i = this.seatReservations[this.currSelectedDeckIndex].coachItems[t].places?.find((s) => s.number == e.number);
|
|
337
442
|
i && (this.currSelectedCoachIndex = t, this.currSelectedPlace = i, this.currSelectedCoachIndex !== this.selectedCoachIndex && this.updateCurrentSelectedCoach(), this._setCurrSelectedPlaceElementId(i));
|
|
338
443
|
}
|
|
339
444
|
updateCurrentSelectedCoach() {
|
|
340
445
|
this.selectedCoachIndex = this.currSelectedCoachIndex, this.focusedCoachIndex = -1;
|
|
341
|
-
const e = this.
|
|
446
|
+
const e = this._getSeatReservationSelectedCoach(this.selectedCoachIndex);
|
|
342
447
|
e && this.dispatchEvent(new CustomEvent("selectedcoach", {
|
|
343
448
|
bubbles: !0,
|
|
344
449
|
composed: !0,
|
|
@@ -350,82 +455,96 @@ let fe = (() => {
|
|
|
350
455
|
* that have the state SELECTED within the seatReservation object
|
|
351
456
|
*/
|
|
352
457
|
_initSeatReservationPlaceSelection() {
|
|
353
|
-
this.
|
|
354
|
-
|
|
355
|
-
const
|
|
356
|
-
|
|
458
|
+
this.seatReservations?.forEach((e) => e.coachItems.map((t, i) => {
|
|
459
|
+
t.places?.filter((s) => s.state === "SELECTED")?.forEach((s) => {
|
|
460
|
+
const c = Ce(s, e.deckCoachIndex, i), l = this._getSeatReservationPlaceSelection(c);
|
|
461
|
+
l && (l.placeType === "SEAT" ? this.selectedSeatReservationPlaces.seats.push(l) : this.selectedSeatReservationPlaces.bicycles.push(l));
|
|
357
462
|
});
|
|
358
|
-
});
|
|
463
|
+
}));
|
|
359
464
|
}
|
|
360
465
|
/**
|
|
361
466
|
* All selected places will be reset or the currentSelectedPlace was given, then we reset all except currentSelectedPlace
|
|
467
|
+
* @param reservationPlaceSelections
|
|
362
468
|
* @param currSelectedPlace
|
|
363
469
|
*/
|
|
364
|
-
_resetAllPlaceSelections(e) {
|
|
365
|
-
for (const
|
|
366
|
-
(!
|
|
367
|
-
|
|
470
|
+
_resetAllPlaceSelections(e, t) {
|
|
471
|
+
for (const i of e)
|
|
472
|
+
if (!t || t.id !== i.id) {
|
|
473
|
+
const s = this.shadowRoot?.getElementById(i.id);
|
|
474
|
+
s && s.setAttribute("state", "FREE");
|
|
475
|
+
}
|
|
476
|
+
return t ? e = e.filter((i) => i.id === t.id) : e = [], e;
|
|
368
477
|
}
|
|
369
478
|
_getSeatReservationPlaceSelection(e) {
|
|
370
|
-
const t = this.
|
|
371
|
-
return i ?
|
|
479
|
+
const t = this.seatReservations[this.currSelectedDeckIndex].coachItems[e.coachIndex], i = t.places?.find((s) => s.number === e.number);
|
|
480
|
+
return i ? Se(i, t, e.deckIndex, e.coachIndex) : null;
|
|
372
481
|
}
|
|
373
|
-
|
|
374
|
-
if (!this.
|
|
482
|
+
_getSeatReservationSelectedCoach(e) {
|
|
483
|
+
if (!this.seatReservations[this.currSelectedDeckIndex].coachItems[e])
|
|
375
484
|
return null;
|
|
376
|
-
const t = this.
|
|
377
|
-
return
|
|
485
|
+
const t = this.seatReservations[this.currSelectedDeckIndex].coachItems[e], i = this.getAvailableFreePlacesNumFromCoach(e);
|
|
486
|
+
return xe(e, t, i);
|
|
378
487
|
}
|
|
379
488
|
_setCurrSelectedPlaceElementId(e) {
|
|
380
|
-
e ? this.currSelectedPlaceElementId = "seat-reservation__place-button-" + this.currSelectedCoachIndex + "-" + e.number : this.currSelectedPlaceElementId = null;
|
|
489
|
+
e ? this.currSelectedPlaceElementId = "seat-reservation__place-button-" + this.currSelectedDeckIndex + "-" + this.currSelectedCoachIndex + "-" + e.number : this.currSelectedPlaceElementId = null;
|
|
381
490
|
}
|
|
382
491
|
/**
|
|
383
|
-
*
|
|
384
|
-
*
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
const t = e.getBoundingClientRect().width;
|
|
399
|
-
this.style?.setProperty("--sbb-seat-reservation-vertical-offset", `${t}px`);
|
|
400
|
-
}
|
|
492
|
+
* Prepares all coaches with the values for whether there is a driver area left or right
|
|
493
|
+
* */
|
|
494
|
+
_prepairCoachDriverArea() {
|
|
495
|
+
this.seatReservations.forEach((e, t) => {
|
|
496
|
+
this.seatReservations[t].coachItems = e.coachItems.map((i) => {
|
|
497
|
+
const s = i.graphicElements?.filter((c) => c.icon === "DRIVER_AREA");
|
|
498
|
+
if (s && s.length > 0) {
|
|
499
|
+
const c = s.find((a) => a.position.x === 0) || !1, l = s.find((a) => a.position.x > 0) || !1;
|
|
500
|
+
i.driverAreaSide = {
|
|
501
|
+
left: !!c,
|
|
502
|
+
right: !!l
|
|
503
|
+
};
|
|
504
|
+
}
|
|
505
|
+
return i;
|
|
506
|
+
});
|
|
401
507
|
});
|
|
402
508
|
}
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
509
|
+
/**
|
|
510
|
+
* Returns the current selected place HTML element by currSelectedPlaceElementId.
|
|
511
|
+
* @returns HTMLElement or null
|
|
512
|
+
*/
|
|
513
|
+
_getPlaceHtmlElement() {
|
|
514
|
+
return this.currSelectedPlaceElementId && this.shadowRoot?.getElementById(this.currSelectedPlaceElementId) || null;
|
|
515
|
+
}
|
|
516
|
+
}, I = new WeakMap(), p = new WeakMap(), b = new WeakMap(), m = new WeakMap(), y = new WeakMap(), _ = new WeakMap(), P = new WeakMap(), A = new WeakMap(), R = new WeakMap(), k = new WeakMap(), E = new WeakMap(), N = new WeakMap(), (() => {
|
|
517
|
+
const e = typeof Symbol == "function" && Symbol.metadata ? Object.create(h[Symbol.metadata] ?? null) : void 0;
|
|
518
|
+
d = [C({ attribute: "seat-reservations", type: Array })], T = [S(), C({ attribute: "has-navigation", type: Boolean })], G = [S(), C({ attribute: "align-vertical", type: Boolean })], L = [S(), C({ attribute: "base-grid-size", type: Number })], X = [S(), C({ attribute: "height", type: Number })], U = [S(), C({ attribute: "max-seat-reservations", type: Number })], $ = [S(), C({ attribute: "max-bicycle-reservations", type: Number })], Q = [S(), C({ attribute: "prevent-place-click", type: Boolean })], ee = [S(), C({ attribute: "preselect-coach-index", type: Number })], se = [B()], oe = [B()], he = [B()], f(n, null, d, { kind: "accessor", name: "seatReservations", static: !1, private: !1, access: { has: (t) => "seatReservations" in t, get: (t) => t.seatReservations, set: (t, i) => {
|
|
519
|
+
t.seatReservations = i;
|
|
520
|
+
} }, metadata: e }, u, w), f(n, null, T, { kind: "accessor", name: "hasNavigation", static: !1, private: !1, access: { has: (t) => "hasNavigation" in t, get: (t) => t.hasNavigation, set: (t, i) => {
|
|
408
521
|
t.hasNavigation = i;
|
|
409
|
-
} }, metadata: e },
|
|
522
|
+
} }, metadata: e }, D, z), f(n, null, G, { kind: "accessor", name: "alignVertical", static: !1, private: !1, access: { has: (t) => "alignVertical" in t, get: (t) => t.alignVertical, set: (t, i) => {
|
|
410
523
|
t.alignVertical = i;
|
|
411
|
-
} }, metadata: e },
|
|
524
|
+
} }, metadata: e }, F, V), f(n, null, L, { kind: "accessor", name: "baseGridSize", static: !1, private: !1, access: { has: (t) => "baseGridSize" in t, get: (t) => t.baseGridSize, set: (t, i) => {
|
|
412
525
|
t.baseGridSize = i;
|
|
413
|
-
} }, metadata: e },
|
|
526
|
+
} }, metadata: e }, O, W), f(n, null, X, { kind: "accessor", name: "height", static: !1, private: !1, access: { has: (t) => "height" in t, get: (t) => t.height, set: (t, i) => {
|
|
414
527
|
t.height = i;
|
|
415
|
-
} }, metadata: e },
|
|
416
|
-
t.
|
|
417
|
-
} }, metadata: e },
|
|
528
|
+
} }, metadata: e }, H, K), f(n, null, U, { kind: "accessor", name: "maxSeatReservations", static: !1, private: !1, access: { has: (t) => "maxSeatReservations" in t, get: (t) => t.maxSeatReservations, set: (t, i) => {
|
|
529
|
+
t.maxSeatReservations = i;
|
|
530
|
+
} }, metadata: e }, q, M), f(n, null, $, { kind: "accessor", name: "maxBicycleReservations", static: !1, private: !1, access: { has: (t) => "maxBicycleReservations" in t, get: (t) => t.maxBicycleReservations, set: (t, i) => {
|
|
531
|
+
t.maxBicycleReservations = i;
|
|
532
|
+
} }, metadata: e }, j, J), f(n, null, Q, { kind: "accessor", name: "preventPlaceClick", static: !1, private: !1, access: { has: (t) => "preventPlaceClick" in t, get: (t) => t.preventPlaceClick, set: (t, i) => {
|
|
418
533
|
t.preventPlaceClick = i;
|
|
419
|
-
} }, metadata: e },
|
|
534
|
+
} }, metadata: e }, Y, Z), f(n, null, ee, { kind: "accessor", name: "preselectCoachIndex", static: !1, private: !1, access: { has: (t) => "preselectCoachIndex" in t, get: (t) => t.preselectCoachIndex, set: (t, i) => {
|
|
535
|
+
t.preselectCoachIndex = i;
|
|
536
|
+
} }, metadata: e }, te, ie), f(n, null, se, { kind: "accessor", name: "selectedCoachIndex", static: !1, private: !1, access: { has: (t) => "selectedCoachIndex" in t, get: (t) => t.selectedCoachIndex, set: (t, i) => {
|
|
420
537
|
t.selectedCoachIndex = i;
|
|
421
|
-
} }, metadata: e },
|
|
538
|
+
} }, metadata: e }, ae, ce), f(n, null, oe, { kind: "accessor", name: "focusedCoachIndex", static: !1, private: !1, access: { has: (t) => "focusedCoachIndex" in t, get: (t) => t.focusedCoachIndex, set: (t, i) => {
|
|
422
539
|
t.focusedCoachIndex = i;
|
|
423
|
-
} }, metadata: e },
|
|
424
|
-
|
|
540
|
+
} }, metadata: e }, re, le), f(n, null, he, { kind: "accessor", name: "hoveredScrollCoachIndex", static: !1, private: !1, access: { has: (t) => "hoveredScrollCoachIndex" in t, get: (t) => t.hoveredScrollCoachIndex, set: (t, i) => {
|
|
541
|
+
t.hoveredScrollCoachIndex = i;
|
|
542
|
+
} }, metadata: e }, ne, de), e && Object.defineProperty(n, Symbol.metadata, { enumerable: !0, configurable: !0, writable: !0, value: e });
|
|
543
|
+
})(), n.events = {
|
|
425
544
|
selectedplaces: "selectedplaces",
|
|
426
545
|
selectedcoach: "selectedcoach"
|
|
427
|
-
},
|
|
546
|
+
}, n;
|
|
428
547
|
})();
|
|
429
548
|
export {
|
|
430
|
-
|
|
549
|
+
Re as SeatReservationBaseElement
|
|
431
550
|
};
|