@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
|
@@ -2,8 +2,10 @@
|
|
|
2
2
|
export type SeatReservation = {
|
|
3
3
|
vehicleType: VehicleType;
|
|
4
4
|
deckCoachIndex: number;
|
|
5
|
+
deckCoachLevel: CoachDeckLevel;
|
|
5
6
|
coachItems: CoachItem[];
|
|
6
7
|
};
|
|
8
|
+
/** Describes a coach (wagon) in the reservation. */
|
|
7
9
|
export type CoachItem = {
|
|
8
10
|
id: string;
|
|
9
11
|
number: string;
|
|
@@ -14,16 +16,17 @@ export type CoachItem = {
|
|
|
14
16
|
serviceElements?: BaseElement[];
|
|
15
17
|
travelClass: PlaceTravelClass[];
|
|
16
18
|
propertyIds?: string[];
|
|
19
|
+
driverAreaSide?: Record<string, boolean>;
|
|
17
20
|
};
|
|
21
|
+
/** Extends BaseElement with seat-specific data. */
|
|
18
22
|
export interface Place extends BaseElement {
|
|
19
23
|
number: string;
|
|
20
24
|
state: PlaceState;
|
|
21
25
|
type: PlaceType;
|
|
22
26
|
travelClass?: PlaceTravelClass;
|
|
23
|
-
remarkId?: string;
|
|
24
27
|
propertyIds?: string[];
|
|
25
|
-
selected?: boolean;
|
|
26
28
|
}
|
|
29
|
+
/** Base properties for any renderable element within a coach. */
|
|
27
30
|
export type BaseElement = {
|
|
28
31
|
icon?: string | null;
|
|
29
32
|
rotation?: number;
|
|
@@ -39,31 +42,45 @@ export type ElementPosition = {
|
|
|
39
42
|
y: number;
|
|
40
43
|
z: number;
|
|
41
44
|
};
|
|
45
|
+
export type CoachNumberOfFreePlaces = {
|
|
46
|
+
seats: number;
|
|
47
|
+
bicycles: number;
|
|
48
|
+
};
|
|
49
|
+
/** Selection info for a single place. */
|
|
42
50
|
export type PlaceSelection = {
|
|
43
51
|
id: string;
|
|
44
52
|
number: string;
|
|
53
|
+
deckIndex: number;
|
|
45
54
|
coachIndex: number;
|
|
46
55
|
state: PlaceState;
|
|
56
|
+
placeType: PlaceType;
|
|
47
57
|
};
|
|
48
58
|
export type SeatReservationPlaceSelection = {
|
|
49
59
|
id: string;
|
|
50
60
|
coachId: string;
|
|
51
61
|
coachNumber: string;
|
|
52
62
|
coachIndex: number;
|
|
63
|
+
deckIndex: number;
|
|
53
64
|
placeNumber: string;
|
|
54
65
|
placeType: PlaceType;
|
|
55
66
|
placeTravelClass: PlaceTravelClass;
|
|
56
67
|
propertyIds: string[];
|
|
57
68
|
};
|
|
58
|
-
export type
|
|
69
|
+
export type SeatReservationSelectedCoach = {
|
|
59
70
|
coachId: string;
|
|
60
71
|
coachNumber: string;
|
|
61
72
|
coachIndex: number;
|
|
62
73
|
coachType?: CoachType;
|
|
63
74
|
coachTravelClass: PlaceTravelClass[];
|
|
64
75
|
coachPropertyIds?: string[];
|
|
76
|
+
coachNumberOfFreePlaces?: CoachNumberOfFreePlaces;
|
|
77
|
+
};
|
|
78
|
+
export type SeatReservationSelectedPlaces = {
|
|
79
|
+
seats: SeatReservationPlaceSelection[];
|
|
80
|
+
bicycles: SeatReservationPlaceSelection[];
|
|
65
81
|
};
|
|
66
82
|
export type PlaceType = 'SEAT' | 'BICYCLE';
|
|
83
|
+
export type CoachDeckLevel = 'SINGLE_DECK' | 'LOWER_DECK' | 'MIDDLE_DECK' | 'UPPER_DECK';
|
|
67
84
|
export type CoachType = 'RESTAURANT_COACH' | 'BICYCLE_COACH' | 'LUGGAGE_COACH' | 'TRAIN_HEAD';
|
|
68
85
|
export type PlaceState = 'FREE' | 'ALLOCATED' | 'RESTRICTED' | 'SELECTED';
|
|
69
86
|
export type PlaceTravelClass = 'FIRST' | 'SECOND' | 'ANY_CLASS';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/elements-experimental/seat-reservation/common/types.ts"],"names":[],"mappings":"AAAA,yFAAyF;AACzF,MAAM,MAAM,eAAe,GAAG;IAC5B,WAAW,EAAE,WAAW,CAAC;IACzB,cAAc,EAAE,MAAM,CAAC;IACvB,UAAU,EAAE,SAAS,EAAE,CAAC;CACzB,CAAC;AAEF,MAAM,MAAM,SAAS,GAAG;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/elements-experimental/seat-reservation/common/types.ts"],"names":[],"mappings":"AAAA,yFAAyF;AACzF,MAAM,MAAM,eAAe,GAAG;IAC5B,WAAW,EAAE,WAAW,CAAC;IACzB,cAAc,EAAE,MAAM,CAAC;IACvB,cAAc,EAAE,cAAc,CAAC;IAC/B,UAAU,EAAE,SAAS,EAAE,CAAC;CACzB,CAAC;AAEF,oDAAoD;AACpD,MAAM,MAAM,SAAS,GAAG;IAEtB,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,gBAAgB,CAAC;IAC5B,IAAI,CAAC,EAAE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G,KAAK,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { LitElement, PropertyValues } from 'lit';
|
|
2
|
-
import { ElementDimension, ElementPosition, Place, PlaceSelection, SeatReservation,
|
|
2
|
+
import { CoachNumberOfFreePlaces, ElementDimension, ElementPosition, Place, PlaceSelection, SeatReservation, SeatReservationSelectedPlaces } from '../common.js';
|
|
3
3
|
declare enum ScrollDirection {
|
|
4
4
|
right = "right",
|
|
5
5
|
left = "left"
|
|
@@ -9,14 +9,13 @@ interface CoachScrollTriggerPoint {
|
|
|
9
9
|
end: number;
|
|
10
10
|
width: number;
|
|
11
11
|
}
|
|
12
|
-
export type SeatReservationSelectedPlacesEventDetails = SeatReservationPlaceSelection[];
|
|
13
12
|
export declare class SeatReservationBaseElement extends LitElement {
|
|
14
13
|
static readonly events: {
|
|
15
14
|
readonly selectedplaces: "selectedplaces";
|
|
16
15
|
readonly selectedcoach: "selectedcoach";
|
|
17
16
|
};
|
|
18
|
-
/** The seat
|
|
19
|
-
accessor
|
|
17
|
+
/** The seat reservations array contains all coaches and places */
|
|
18
|
+
accessor seatReservations: SeatReservation[];
|
|
20
19
|
/** The seat reservation navigation can be toggled by this property */
|
|
21
20
|
accessor hasNavigation: boolean;
|
|
22
21
|
/** The seat reservation area is aligned vertically */
|
|
@@ -26,29 +25,40 @@ export declare class SeatReservationBaseElement extends LitElement {
|
|
|
26
25
|
/** The seat reservation area's width */
|
|
27
26
|
accessor height: number;
|
|
28
27
|
/** Maximal number of possible clickable seats */
|
|
29
|
-
accessor
|
|
28
|
+
accessor maxSeatReservations: number;
|
|
29
|
+
/** Maximal number of possible clickable bicycle places */
|
|
30
|
+
accessor maxBicycleReservations: number;
|
|
30
31
|
/** Any click functionality is prevented */
|
|
31
32
|
accessor preventPlaceClick: boolean;
|
|
33
|
+
accessor preselectCoachIndex: number;
|
|
32
34
|
protected accessor selectedCoachIndex: number;
|
|
33
35
|
protected accessor focusedCoachIndex: number;
|
|
36
|
+
protected accessor hoveredScrollCoachIndex: number;
|
|
34
37
|
protected coachBorderPadding: number;
|
|
38
|
+
protected gapBetweenCoaches: number;
|
|
35
39
|
protected coachBorderOffset: number;
|
|
40
|
+
protected gapBetweenCoachDecks: number;
|
|
41
|
+
protected coachNavButtonDim: number;
|
|
36
42
|
protected currScrollDirection: ScrollDirection;
|
|
37
43
|
protected maxCalcCoachsWidth: number;
|
|
38
44
|
protected scrollCoachsAreaWidth: number;
|
|
45
|
+
protected scrollNavigationAreaDim: number;
|
|
39
46
|
protected triggerCoachPositionsCollection: CoachScrollTriggerPoint[];
|
|
40
47
|
protected firstTabElement: HTMLElement;
|
|
41
48
|
protected lastTabElement: HTMLElement;
|
|
49
|
+
protected navigationScrollArea: HTMLElement;
|
|
42
50
|
protected coachScrollArea: HTMLElement;
|
|
43
51
|
protected currSelectedPlace: Place | null;
|
|
44
52
|
protected currSelectedPlaceElementId: string | null;
|
|
45
53
|
protected currSelectedCoachIndex: number;
|
|
54
|
+
protected currSelectedDeckIndex: number;
|
|
46
55
|
protected preventCoachScrollByPlaceClick: boolean;
|
|
47
|
-
protected selectedSeatReservationPlaces:
|
|
56
|
+
protected selectedSeatReservationPlaces: SeatReservationSelectedPlaces;
|
|
48
57
|
protected seatReservationWithoutNavigationHasFocus: boolean;
|
|
49
58
|
protected isCoachGridFocusable: boolean;
|
|
50
59
|
protected isAutoScrolling: boolean;
|
|
51
60
|
protected isKeyboardNavigation: boolean;
|
|
61
|
+
protected hasMultipleDecks: boolean;
|
|
52
62
|
protected keyboardNavigationEvents: {
|
|
53
63
|
readonly ArrowLeft: "ArrowLeft";
|
|
54
64
|
readonly ArrowRight: "ArrowRight";
|
|
@@ -58,6 +68,12 @@ export declare class SeatReservationBaseElement extends LitElement {
|
|
|
58
68
|
readonly Enter: "Enter";
|
|
59
69
|
};
|
|
60
70
|
protected willUpdate(changedProperties: PropertyValues<this>): void;
|
|
71
|
+
protected navigateByDirectionBtn(btnDirection: string): void;
|
|
72
|
+
/**
|
|
73
|
+
* Data can be prepared once for the entire component
|
|
74
|
+
* in order to avoid recurring iteration processes in rendering.
|
|
75
|
+
*/
|
|
76
|
+
protected initPrepairSeatReservationData(): void;
|
|
61
77
|
protected initNavigationSelectionByScrollEvent(): void;
|
|
62
78
|
/**
|
|
63
79
|
* If no navigation exists (property setting -> hasNavigation) and a table coach gets the focus,
|
|
@@ -77,14 +93,31 @@ export declare class SeatReservationBaseElement extends LitElement {
|
|
|
77
93
|
*/
|
|
78
94
|
protected preselectPlaceInCoach(): void;
|
|
79
95
|
protected scrollToSelectedNavCoach(selectedNavCoachIndex: number): void;
|
|
96
|
+
protected focusPlaceElement(place: Place | null): void;
|
|
97
|
+
protected unfocusPlaceElement(): void;
|
|
98
|
+
protected getCalculatedDimension(elementDimension: ElementDimension, coachDimension?: ElementDimension, isOriginHeight?: boolean, isStretchHeight?: boolean): ElementDimension;
|
|
99
|
+
protected getCalculatedPosition(elementPosition: ElementPosition, elementDimension?: ElementDimension, coachDimension?: ElementDimension, isOriginHeight?: boolean): ElementPosition;
|
|
100
|
+
/**
|
|
101
|
+
* Counts all available seats together depending on the seat type
|
|
102
|
+
*
|
|
103
|
+
* @param coachIndex
|
|
104
|
+
* @returns An Object with count of free seats and free bicycle places
|
|
105
|
+
*/
|
|
106
|
+
protected getAvailableFreePlacesNumFromCoach(coachIndex: number): CoachNumberOfFreePlaces;
|
|
107
|
+
/**
|
|
108
|
+
* Performs an automatic main navigation scroll to the specified selectedNavCoachIndex.
|
|
109
|
+
* Calculates the central scroll offset of the nav coach to be selected.
|
|
110
|
+
* @param selectedNavCoachIndex
|
|
111
|
+
*/
|
|
112
|
+
private _scrollToSelectedNavigationButton;
|
|
80
113
|
/**
|
|
81
114
|
* Sets the new ScrollDirection by the new given target coach index.
|
|
82
115
|
*/
|
|
83
116
|
private _setScrollDirectionByCoachIndex;
|
|
84
117
|
/**
|
|
85
118
|
* Returns the scroll start or end position X from the selected coach.
|
|
86
|
-
* In case the user is
|
|
87
|
-
* then we return the end position of the coach to get
|
|
119
|
+
* In case the user is currently navigating through places by keyboard and goes to previous coach,
|
|
120
|
+
* then we return the end position of the coach to get the closest scroll position of the next focus place.
|
|
88
121
|
* @returns number
|
|
89
122
|
*/
|
|
90
123
|
private _getCoachScrollPositionX;
|
|
@@ -107,6 +140,7 @@ export declare class SeatReservationBaseElement extends LitElement {
|
|
|
107
140
|
* @returns Place or null
|
|
108
141
|
*/
|
|
109
142
|
private _getFirstPlaceInSelecedCoach;
|
|
143
|
+
private _getSwitchedCoachDeckIndexByKeyNavigation;
|
|
110
144
|
/**
|
|
111
145
|
* To get the correct closest place of current pressed key and the current selected place,
|
|
112
146
|
* we have to investigate the coordinates of each place to find the closest place of the currSelectedPlaceElementId.
|
|
@@ -114,15 +148,12 @@ export declare class SeatReservationBaseElement extends LitElement {
|
|
|
114
148
|
* @returns Place or null
|
|
115
149
|
*/
|
|
116
150
|
private _getClosestPlaceByKeyDirection;
|
|
117
|
-
protected focusPlaceElement(place: Place | null, coachIndex?: number): void;
|
|
118
|
-
protected unfocusPlaceElement(): void;
|
|
119
|
-
protected getCalculatedDimension(elementDimension: ElementDimension, coachDimension?: ElementDimension, isOriginHeight?: boolean, isStretchHeight?: boolean): ElementDimension;
|
|
120
|
-
protected getCalculatedPosition(elementPosition: ElementPosition, elementDimension?: ElementDimension, coachDimension?: ElementDimension, isOriginHeight?: boolean): ElementPosition;
|
|
121
151
|
private _navigateCoachNavigationByKeyboard;
|
|
122
152
|
private _navigateToPlaceByKeyboard;
|
|
123
153
|
protected getNextAvailableCoachIndex(currentIndex?: number): number;
|
|
124
154
|
protected getPrevAvailableCoachIndex(currentIndex?: number): number;
|
|
125
155
|
protected updateSelectedSeatReservationPlaces(placeSelection: PlaceSelection): void;
|
|
156
|
+
private _updateSelectedSeatReservationPlaces;
|
|
126
157
|
protected updateCurrentSelectedPlaceInCoach(placeSelection: PlaceSelection): void;
|
|
127
158
|
protected updateCurrentSelectedCoach(): void;
|
|
128
159
|
/**
|
|
@@ -132,21 +163,22 @@ export declare class SeatReservationBaseElement extends LitElement {
|
|
|
132
163
|
private _initSeatReservationPlaceSelection;
|
|
133
164
|
/**
|
|
134
165
|
* All selected places will be reset or the currentSelectedPlace was given, then we reset all except currentSelectedPlace
|
|
166
|
+
* @param reservationPlaceSelections
|
|
135
167
|
* @param currSelectedPlace
|
|
136
168
|
*/
|
|
137
169
|
private _resetAllPlaceSelections;
|
|
138
170
|
private _getSeatReservationPlaceSelection;
|
|
139
|
-
private
|
|
171
|
+
private _getSeatReservationSelectedCoach;
|
|
140
172
|
private _setCurrSelectedPlaceElementId;
|
|
141
173
|
/**
|
|
142
|
-
*
|
|
143
|
-
*
|
|
144
|
-
|
|
145
|
-
|
|
174
|
+
* Prepares all coaches with the values for whether there is a driver area left or right
|
|
175
|
+
* */
|
|
176
|
+
private _prepairCoachDriverArea;
|
|
177
|
+
/**
|
|
178
|
+
* Returns the current selected place HTML element by currSelectedPlaceElementId.
|
|
146
179
|
* @returns HTMLElement or null
|
|
147
180
|
*/
|
|
148
181
|
private _getPlaceHtmlElement;
|
|
149
|
-
private _setVerticalAlignmentOffset;
|
|
150
182
|
}
|
|
151
183
|
export {};
|
|
152
184
|
//# sourceMappingURL=seat-reservation-base-element.d.ts.map
|
package/development/seat-reservation/seat-reservation/seat-reservation-base-element.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"seat-reservation-base-element.d.ts","sourceRoot":"","sources":["../../../../../src/elements-experimental/seat-reservation/seat-reservation/seat-reservation-base-element.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,KAAK,cAAc,EAAE,MAAM,KAAK,CAAC;AAQtD,OAAO,KAAK,EAEV,gBAAgB,EAChB,eAAe,EACf,KAAK,EACL,cAAc,EACd,eAAe,EAEf,6BAA6B,
|
|
1
|
+
{"version":3,"file":"seat-reservation-base-element.d.ts","sourceRoot":"","sources":["../../../../../src/elements-experimental/seat-reservation/seat-reservation/seat-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