@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.
Files changed (64) hide show
  1. package/custom-elements.json +908 -567
  2. package/development/seat-reservation/common/mapper/icon-mapper.d.ts.map +1 -1
  3. package/development/seat-reservation/common/mapper/icon-mapper.js +1 -3
  4. package/development/seat-reservation/common/mapper/mapper.d.ts +4 -3
  5. package/development/seat-reservation/common/mapper/mapper.d.ts.map +1 -1
  6. package/development/seat-reservation/common/mapper/mapper.js +6 -4
  7. package/development/seat-reservation/common/mapper/seat-reservation-sample-data.d.ts.map +1 -1
  8. package/development/seat-reservation/common/mapper/seat-reservation-sample-data.js +4989 -4
  9. package/development/seat-reservation/common/svgs.d.ts +0 -1
  10. package/development/seat-reservation/common/svgs.d.ts.map +1 -1
  11. package/development/seat-reservation/common/svgs.js +1 -3
  12. package/development/seat-reservation/common/translations/i18n.js +194 -194
  13. package/development/seat-reservation/common/types.d.ts +10 -0
  14. package/development/seat-reservation/common/types.d.ts.map +1 -1
  15. package/development/seat-reservation/seat-reservation/seat-reservation-base-element.d.ts +38 -12
  16. package/development/seat-reservation/seat-reservation/seat-reservation-base-element.d.ts.map +1 -1
  17. package/development/seat-reservation/seat-reservation/seat-reservation-base-element.js +252 -122
  18. package/development/seat-reservation/seat-reservation/seat-reservation.component.d.ts +28 -13
  19. package/development/seat-reservation/seat-reservation/seat-reservation.component.d.ts.map +1 -1
  20. package/development/seat-reservation/seat-reservation/seat-reservation.component.js +481 -262
  21. package/development/seat-reservation/seat-reservation-area/seat-reservation-area.component.js +17 -10
  22. package/development/seat-reservation/seat-reservation-graphic/seat-reservation-assets.d.ts.map +1 -1
  23. package/development/seat-reservation/seat-reservation-graphic/seat-reservation-assets.js +1 -6
  24. package/development/seat-reservation/seat-reservation-graphic/seat-reservation-graphic.component.js +36 -18
  25. package/development/seat-reservation/seat-reservation-navigation-coach/seat-reservation-navigation-coach.component.d.ts +3 -1
  26. package/development/seat-reservation/seat-reservation-navigation-coach/seat-reservation-navigation-coach.component.d.ts.map +1 -1
  27. package/development/seat-reservation/seat-reservation-navigation-coach/seat-reservation-navigation-coach.component.js +26 -4
  28. package/development/seat-reservation/seat-reservation-place-control/seat-reservation-place-control.component.d.ts.map +1 -1
  29. package/development/seat-reservation/seat-reservation-place-control/seat-reservation-place-control.component.js +86 -54
  30. package/development/seat-reservation/seat-reservation-scoped/seat-reservation-scoped.component.d.ts +1 -16
  31. package/development/seat-reservation/seat-reservation-scoped/seat-reservation-scoped.component.d.ts.map +1 -1
  32. package/development/seat-reservation/seat-reservation-scoped/seat-reservation-scoped.component.js +10 -164
  33. package/package.json +2 -2
  34. package/seat-reservation/common/mapper/icon-mapper.d.ts.map +1 -1
  35. package/seat-reservation/common/mapper/icon-mapper.js +0 -2
  36. package/seat-reservation/common/mapper/mapper.d.ts +4 -3
  37. package/seat-reservation/common/mapper/mapper.d.ts.map +1 -1
  38. package/seat-reservation/common/mapper/mapper.js +16 -14
  39. package/seat-reservation/common/mapper/seat-reservation-sample-data.d.ts.map +1 -1
  40. package/seat-reservation/common/mapper/seat-reservation-sample-data.js +4988 -3
  41. package/seat-reservation/common/svgs.d.ts +0 -1
  42. package/seat-reservation/common/svgs.d.ts.map +1 -1
  43. package/seat-reservation/common/svgs.js +4 -11
  44. package/seat-reservation/common/translations/i18n.js +197 -197
  45. package/seat-reservation/common/types.d.ts +10 -0
  46. package/seat-reservation/common/types.d.ts.map +1 -1
  47. package/seat-reservation/seat-reservation/seat-reservation-base-element.d.ts +38 -12
  48. package/seat-reservation/seat-reservation/seat-reservation-base-element.d.ts.map +1 -1
  49. package/seat-reservation/seat-reservation/seat-reservation-base-element.js +208 -134
  50. package/seat-reservation/seat-reservation/seat-reservation.component.d.ts +28 -13
  51. package/seat-reservation/seat-reservation/seat-reservation.component.d.ts.map +1 -1
  52. package/seat-reservation/seat-reservation/seat-reservation.component.js +290 -298
  53. package/seat-reservation/seat-reservation-area/seat-reservation-area.component.js +22 -22
  54. package/seat-reservation/seat-reservation-graphic/seat-reservation-assets.d.ts.map +1 -1
  55. package/seat-reservation/seat-reservation-graphic/seat-reservation-assets.js +0 -5
  56. package/seat-reservation/seat-reservation-graphic/seat-reservation-graphic.component.js +37 -37
  57. package/seat-reservation/seat-reservation-navigation-coach/seat-reservation-navigation-coach.component.d.ts +3 -1
  58. package/seat-reservation/seat-reservation-navigation-coach/seat-reservation-navigation-coach.component.d.ts.map +1 -1
  59. package/seat-reservation/seat-reservation-navigation-coach/seat-reservation-navigation-coach.component.js +69 -58
  60. package/seat-reservation/seat-reservation-place-control/seat-reservation-place-control.component.d.ts.map +1 -1
  61. package/seat-reservation/seat-reservation-place-control/seat-reservation-place-control.component.js +28 -27
  62. package/seat-reservation/seat-reservation-scoped/seat-reservation-scoped.component.d.ts +1 -16
  63. package/seat-reservation/seat-reservation-scoped/seat-reservation-scoped.component.d.ts.map +1 -1
  64. 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 informations to place selection
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,cAQhF,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,+CAA+C,GAC1D,OAAO,KAAK,EACZ,OAAO,SAAS,EAChB,YAAY,MAAM,KACjB,6BAYF,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,6BAA6B,GACxC,YAAY,MAAM,EAClB,OAAO,SAAS,KACf,6BASF,CAAC"}
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 i = (e === "TRAIN" ? l : h).map((c) => {
4
- const s = c?.coachDeckLayout, a = [], r = [], d = s.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) => ({
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 = s.serviceIcons.map((t) => ({
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 = s.graphicElements.map((t) => ({
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: s?.id,
42
- number: s?.name,
43
- dimension: { w: s.dimension?.width, h: s.dimension?.height },
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: i
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
- }), g = (e, n, i) => ({
62
- id: "seat-reservation__place-button-" + i + "-" + e.number,
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: i,
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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4rJ9B,CAAC;AAEF,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0hB9B,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4yBtC,CAAC"}
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"}