@sbb-esta/lyne-elements-experimental 3.1.0 → 3.2.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 +908 -567
- package/development/seat-reservation/common/mapper/icon-mapper.d.ts.map +1 -1
- package/development/seat-reservation/common/mapper/icon-mapper.js +1 -3
- package/development/seat-reservation/common/mapper/mapper.d.ts +4 -3
- package/development/seat-reservation/common/mapper/mapper.d.ts.map +1 -1
- package/development/seat-reservation/common/mapper/mapper.js +6 -4
- 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 +4989 -4
- 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.js +194 -194
- package/development/seat-reservation/common/types.d.ts +10 -0
- package/development/seat-reservation/common/types.d.ts.map +1 -1
- package/development/seat-reservation/seat-reservation/seat-reservation-base-element.d.ts +38 -12
- 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 +252 -122
- package/development/seat-reservation/seat-reservation/seat-reservation.component.d.ts +28 -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 +481 -262
- 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 +26 -4
- 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 +86 -54
- 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 +0 -2
- package/seat-reservation/common/mapper/mapper.d.ts +4 -3
- package/seat-reservation/common/mapper/mapper.d.ts.map +1 -1
- package/seat-reservation/common/mapper/mapper.js +16 -14
- package/seat-reservation/common/mapper/seat-reservation-sample-data.d.ts.map +1 -1
- package/seat-reservation/common/mapper/seat-reservation-sample-data.js +4988 -3
- 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.js +197 -197
- package/seat-reservation/common/types.d.ts +10 -0
- package/seat-reservation/common/types.d.ts.map +1 -1
- package/seat-reservation/seat-reservation/seat-reservation-base-element.d.ts +38 -12
- package/seat-reservation/seat-reservation/seat-reservation-base-element.d.ts.map +1 -1
- package/seat-reservation/seat-reservation/seat-reservation-base-element.js +208 -134
- package/seat-reservation/seat-reservation/seat-reservation.component.d.ts +28 -13
- package/seat-reservation/seat-reservation/seat-reservation.component.d.ts.map +1 -1
- package/seat-reservation/seat-reservation/seat-reservation.component.js +290 -298
- 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 +69 -58
- 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 +28 -27
- 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,10 +1,10 @@
|
|
|
1
|
-
import { CoachItem, Place, PlaceSelection, SeatReservation, SeatReservationCoachSelection, SeatReservationPlaceSelection, VehicleType } from '../types.js';
|
|
1
|
+
import { CoachItem, CoachNumberOfFreePlaces, Place, PlaceSelection, SeatReservation, SeatReservationCoachSelection, SeatReservationPlaceSelection, VehicleType } from '../types.js';
|
|
2
2
|
/**
|
|
3
3
|
* Map function that converts the RAW OSDM mock data into SeatReservation
|
|
4
4
|
*/
|
|
5
5
|
export declare const mapRawDataToSeatReservation: (vehicleType: VehicleType) => SeatReservation;
|
|
6
6
|
/**
|
|
7
|
-
* Mapped place and coach
|
|
7
|
+
* Mapped place and coach information to place selection
|
|
8
8
|
* @param place
|
|
9
9
|
* @param coachIndex
|
|
10
10
|
* @returns PlaceSelection
|
|
@@ -23,7 +23,8 @@ export declare const mapPlaceAndCoachToSeatReservationPlaceSelection: (place: Pl
|
|
|
23
23
|
* Mapped coach information to coach selection
|
|
24
24
|
* @param coachIndex
|
|
25
25
|
* @param coach
|
|
26
|
+
* @param coachNumberOfFreePlaces
|
|
26
27
|
* @returns PlaceSelection
|
|
27
28
|
*/
|
|
28
|
-
export declare const mapCoachInfosToCoachSelection: (coachIndex: number, coach: CoachItem) => SeatReservationCoachSelection;
|
|
29
|
+
export declare const mapCoachInfosToCoachSelection: (coachIndex: number, coach: CoachItem, coachNumberOfFreePlaces: CoachNumberOfFreePlaces) => SeatReservationCoachSelection;
|
|
29
30
|
//# sourceMappingURL=mapper.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mapper.d.ts","sourceRoot":"","sources":["../../../../../src/elements-experimental/seat-reservation/common/mapper/mapper.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,SAAS,EACT,KAAK,EACL,cAAc,EAEd,eAAe,EACf,6BAA6B,EAC7B,6BAA6B,EAC7B,WAAW,EACZ,MAAM,aAAa,CAAC;AAIrB;;GAEG;AACH,eAAO,MAAM,2BAA2B,GAAI,aAAa,WAAW,KAAG,eAoFtE,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,6BAA6B,GAAI,OAAO,KAAK,EAAE,YAAY,MAAM,KAAG,
|
|
1
|
+
{"version":3,"file":"mapper.d.ts","sourceRoot":"","sources":["../../../../../src/elements-experimental/seat-reservation/common/mapper/mapper.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,SAAS,EACT,uBAAuB,EACvB,KAAK,EACL,cAAc,EAEd,eAAe,EACf,6BAA6B,EAC7B,6BAA6B,EAC7B,WAAW,EACZ,MAAM,aAAa,CAAC;AAIrB;;GAEG;AACH,eAAO,MAAM,2BAA2B,GAAI,aAAa,WAAW,KAAG,eAoFtE,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,6BAA6B,GAAI,OAAO,KAAK,EAAE,YAAY,MAAM,KAAG,cAShF,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,+CAA+C,GAC1D,OAAO,KAAK,EACZ,OAAO,SAAS,EAChB,YAAY,MAAM,KACjB,6BAYF,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,6BAA6B,GACxC,YAAY,MAAM,EAClB,OAAO,SAAS,EAChB,yBAAyB,uBAAuB,KAC/C,6BAUF,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { MOCK_COACHES_RAW_0 as l, MOCK_COACHES_RAW_1 as h } from "./seat-reservation-sample-data.js";
|
|
2
2
|
const u = (e) => {
|
|
3
|
-
const
|
|
4
|
-
const
|
|
3
|
+
const s = (e === "TRAIN" ? l : h).map((c) => {
|
|
4
|
+
const i = c?.coachDeckLayout, a = [], r = [], d = i.placeGroups.map((t) => (a.indexOf(t.travelClass) === -1 && a.push(t.travelClass), r.indexOf(t.accommodationSubType) === -1 && r.push(t.accommodationSubType), t.places?.map((o) => ({
|
|
5
5
|
number: o?.number,
|
|
6
6
|
state: o?.state,
|
|
7
7
|
type: t.accommodationSubType.indexOf("BICYCLE") === -1 ? "SEAT" : "BICYCLE",
|
|
@@ -16,7 +16,7 @@ const u = (e) => {
|
|
|
16
16
|
remarkId: "",
|
|
17
17
|
propertyIds: o.placeProperties || [],
|
|
18
18
|
selected: !1
|
|
19
|
-
})))).flat(), m =
|
|
19
|
+
})))).flat(), m = i.serviceIcons.map((t) => ({
|
|
20
20
|
icon: t.type,
|
|
21
21
|
position: {
|
|
22
22
|
x: t.rectangle.position.x,
|
|
@@ -27,7 +27,7 @@ const u = (e) => {
|
|
|
27
27
|
w: t.rectangle.dimension.width,
|
|
28
28
|
h: t.rectangle.dimension.height
|
|
29
29
|
}
|
|
30
|
-
})), p =
|
|
30
|
+
})), p = i.graphicElements.map((t) => ({
|
|
31
31
|
icon: t?.type,
|
|
32
32
|
position: {
|
|
33
33
|
x: t.rectangle.position.x,
|
|
@@ -38,9 +38,9 @@ const u = (e) => {
|
|
|
38
38
|
rotation: t.orientation
|
|
39
39
|
}));
|
|
40
40
|
return {
|
|
41
|
-
id:
|
|
42
|
-
number:
|
|
43
|
-
dimension: { w:
|
|
41
|
+
id: i?.id,
|
|
42
|
+
number: i?.name,
|
|
43
|
+
dimension: { w: i.dimension?.width, h: i.dimension?.height },
|
|
44
44
|
places: d,
|
|
45
45
|
serviceElements: m,
|
|
46
46
|
graphicElements: p,
|
|
@@ -51,29 +51,31 @@ const u = (e) => {
|
|
|
51
51
|
return {
|
|
52
52
|
vehicleType: e,
|
|
53
53
|
deckCoachIndex: 0,
|
|
54
|
-
coachItems:
|
|
54
|
+
coachItems: s
|
|
55
55
|
};
|
|
56
56
|
}, y = (e, n) => ({
|
|
57
57
|
id: "seat-reservation__place-button-" + n + "-" + e.number,
|
|
58
58
|
number: e.number,
|
|
59
59
|
coachIndex: n,
|
|
60
|
-
state: e.state
|
|
61
|
-
|
|
62
|
-
|
|
60
|
+
state: e.state,
|
|
61
|
+
placeType: e.type
|
|
62
|
+
}), g = (e, n, s) => ({
|
|
63
|
+
id: "seat-reservation__place-button-" + s + "-" + e.number,
|
|
63
64
|
coachId: n.id,
|
|
64
65
|
coachNumber: n.number,
|
|
65
|
-
coachIndex:
|
|
66
|
+
coachIndex: s,
|
|
66
67
|
placeNumber: e.number,
|
|
67
68
|
placeType: e.type,
|
|
68
69
|
placeTravelClass: e.travelClass || "ANY_CLASS",
|
|
69
70
|
propertyIds: e.propertyIds || []
|
|
70
|
-
}), b = (e, n) => ({
|
|
71
|
+
}), b = (e, n, s) => ({
|
|
71
72
|
coachId: n.id,
|
|
72
73
|
coachNumber: n.number,
|
|
73
74
|
coachIndex: e,
|
|
74
75
|
coachType: n?.type,
|
|
75
76
|
coachTravelClass: n?.travelClass,
|
|
76
|
-
coachPropertyIds: n?.propertyIds
|
|
77
|
+
coachPropertyIds: n?.propertyIds,
|
|
78
|
+
coachNumberOfFreePlaces: s
|
|
77
79
|
});
|
|
78
80
|
export {
|
|
79
81
|
b as mapCoachInfosToCoachSelection,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"seat-reservation-sample-data.d.ts","sourceRoot":"","sources":["../../../../../src/elements-experimental/seat-reservation/common/mapper/seat-reservation-sample-data.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"seat-reservation-sample-data.d.ts","sourceRoot":"","sources":["../../../../../src/elements-experimental/seat-reservation/common/mapper/seat-reservation-sample-data.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyjT9B,CAAC;AAEF,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0hB9B,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4yBtC,CAAC"}
|