@sbb-esta/lyne-elements-experimental 4.0.2 → 4.0.3
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/autocomplete-grid/autocomplete-grid/autocomplete-grid.component.d.ts.map +1 -1
- package/autocomplete-grid/autocomplete-grid/autocomplete-grid.component.js +15 -16
- package/core/datetime/date-helper.js +3 -3
- package/custom-elements.json +43 -3
- package/development/autocomplete-grid/autocomplete-grid/autocomplete-grid.component.d.ts.map +1 -1
- package/development/autocomplete-grid/autocomplete-grid/autocomplete-grid.component.js +17 -19
- package/development/core/datetime/date-helper.js +3 -3
- package/development/{differenceInMinutes-D5Nj8Stc.js → differenceInMinutes-B0dawX-5.js} +2 -2
- package/development/{format-BQfaa1ZT.js → format-BMkeaqaF.js} +3 -3
- package/development/{isValid-DvieCZVi.js → isValid-BYRch7pV.js} +2 -2
- package/development/journey-summary/journey-summary.component.js +2 -2
- package/development/pearl-chain/pearl-chain.component.js +2 -2
- package/development/pearl-chain-time/pearl-chain-time.component.js +1 -1
- package/development/seat-reservation/common/mapper/mapper.d.ts +2 -2
- package/development/seat-reservation/common/mapper/mapper.d.ts.map +1 -1
- package/development/seat-reservation/common/mapper/mapper.js +19 -6
- package/development/seat-reservation/common/mapper/seat-reservation-sample-data.d.ts +122 -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 +970 -1
- 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 +3 -1
- package/development/seat-reservation/seat-reservation/seat-reservation.component.d.ts.map +1 -1
- package/development/seat-reservation/seat-reservation/seat-reservation.component.js +26 -24
- package/development/seat-reservation/seat-reservation-place-control/seat-reservation-place-control.component.js +2 -2
- package/development/timetable-row/timetable-row.component.js +1 -1
- package/development/{toDate-D_Vjps95.js → toDate-BWb6Z1JD.js} +2 -2
- package/{differenceInMinutes-CP_C5onR.js → differenceInMinutes-COvvdYsJ.js} +1 -1
- package/{format-lqeCzmzS.js → format-CmKROkbc.js} +2 -41
- package/{isValid-Ceq2O0NQ.js → isValid-m3_OsPaB.js} +1 -1
- package/journey-summary/journey-summary.component.js +2 -2
- package/package.json +2 -2
- package/pearl-chain/pearl-chain.component.js +2 -2
- package/pearl-chain-time/pearl-chain-time.component.js +1 -1
- package/seat-reservation/common/mapper/mapper.d.ts +2 -2
- package/seat-reservation/common/mapper/mapper.d.ts.map +1 -1
- package/seat-reservation/common/mapper/mapper.js +41 -38
- package/seat-reservation/common/mapper/seat-reservation-sample-data.d.ts +122 -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 +968 -1
- package/seat-reservation/seat-reservation/seat-reservation-base-element.d.ts.map +1 -1
- package/seat-reservation/seat-reservation/seat-reservation-base-element.js +130 -130
- package/seat-reservation/seat-reservation/seat-reservation.component.d.ts.map +1 -1
- package/seat-reservation/seat-reservation/seat-reservation.component.js +88 -85
- package/seat-reservation/seat-reservation-place-control/seat-reservation-place-control.component.js +1 -1
- package/timetable-row/timetable-row.component.js +1 -1
- package/{toDate-BCXKL_wM.js → toDate-Bw2KTWeq.js} +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { d as q, i as C } from "./isValid-
|
|
2
|
-
import { t as l, c as y, d as D } from "./toDate-
|
|
1
|
+
import { d as q, i as C } from "./isValid-m3_OsPaB.js";
|
|
2
|
+
import { t as l, c as y, d as D } from "./toDate-Bw2KTWeq.js";
|
|
3
3
|
let N = {};
|
|
4
4
|
function O() {
|
|
5
5
|
return N;
|
|
@@ -512,7 +512,6 @@ const m = {
|
|
|
512
512
|
return n;
|
|
513
513
|
case "aaaaa":
|
|
514
514
|
return n[0];
|
|
515
|
-
case "aaaa":
|
|
516
515
|
default:
|
|
517
516
|
return n === "am" ? "a.m." : "p.m.";
|
|
518
517
|
}
|
|
@@ -560,8 +559,6 @@ const m = {
|
|
|
560
559
|
// A, B
|
|
561
560
|
case "GGGGG":
|
|
562
561
|
return n.era(r, { width: "narrow" });
|
|
563
|
-
// Anno Domini, Before Christ
|
|
564
|
-
case "GGGG":
|
|
565
562
|
default:
|
|
566
563
|
return n.era(r, { width: "wide" });
|
|
567
564
|
}
|
|
@@ -626,8 +623,6 @@ const m = {
|
|
|
626
623
|
width: "narrow",
|
|
627
624
|
context: "formatting"
|
|
628
625
|
});
|
|
629
|
-
// 1st quarter, 2nd quarter, ...
|
|
630
|
-
case "QQQQ":
|
|
631
626
|
default:
|
|
632
627
|
return n.quarter(r, {
|
|
633
628
|
width: "wide",
|
|
@@ -660,8 +655,6 @@ const m = {
|
|
|
660
655
|
width: "narrow",
|
|
661
656
|
context: "standalone"
|
|
662
657
|
});
|
|
663
|
-
// 1st quarter, 2nd quarter, ...
|
|
664
|
-
case "qqqq":
|
|
665
658
|
default:
|
|
666
659
|
return n.quarter(r, {
|
|
667
660
|
width: "wide",
|
|
@@ -691,8 +684,6 @@ const m = {
|
|
|
691
684
|
width: "narrow",
|
|
692
685
|
context: "formatting"
|
|
693
686
|
});
|
|
694
|
-
// January, February, ..., December
|
|
695
|
-
case "MMMM":
|
|
696
687
|
default:
|
|
697
688
|
return n.month(r, { width: "wide", context: "formatting" });
|
|
698
689
|
}
|
|
@@ -722,8 +713,6 @@ const m = {
|
|
|
722
713
|
width: "narrow",
|
|
723
714
|
context: "standalone"
|
|
724
715
|
});
|
|
725
|
-
// January, February, ..., December
|
|
726
|
-
case "LLLL":
|
|
727
716
|
default:
|
|
728
717
|
return n.month(r, { width: "wide", context: "standalone" });
|
|
729
718
|
}
|
|
@@ -771,8 +760,6 @@ const m = {
|
|
|
771
760
|
width: "short",
|
|
772
761
|
context: "formatting"
|
|
773
762
|
});
|
|
774
|
-
// Tuesday
|
|
775
|
-
case "EEEE":
|
|
776
763
|
default:
|
|
777
764
|
return n.day(r, {
|
|
778
765
|
width: "wide",
|
|
@@ -810,8 +797,6 @@ const m = {
|
|
|
810
797
|
width: "short",
|
|
811
798
|
context: "formatting"
|
|
812
799
|
});
|
|
813
|
-
// Tuesday
|
|
814
|
-
case "eeee":
|
|
815
800
|
default:
|
|
816
801
|
return n.day(a, {
|
|
817
802
|
width: "wide",
|
|
@@ -849,8 +834,6 @@ const m = {
|
|
|
849
834
|
width: "short",
|
|
850
835
|
context: "standalone"
|
|
851
836
|
});
|
|
852
|
-
// Tuesday
|
|
853
|
-
case "cccc":
|
|
854
837
|
default:
|
|
855
838
|
return n.day(a, {
|
|
856
839
|
width: "wide",
|
|
@@ -889,8 +872,6 @@ const m = {
|
|
|
889
872
|
width: "short",
|
|
890
873
|
context: "formatting"
|
|
891
874
|
});
|
|
892
|
-
// Tuesday
|
|
893
|
-
case "iiii":
|
|
894
875
|
default:
|
|
895
876
|
return n.day(r, {
|
|
896
877
|
width: "wide",
|
|
@@ -918,7 +899,6 @@ const m = {
|
|
|
918
899
|
width: "narrow",
|
|
919
900
|
context: "formatting"
|
|
920
901
|
});
|
|
921
|
-
case "aaaa":
|
|
922
902
|
default:
|
|
923
903
|
return n.dayPeriod(a, {
|
|
924
904
|
width: "wide",
|
|
@@ -947,7 +927,6 @@ const m = {
|
|
|
947
927
|
width: "narrow",
|
|
948
928
|
context: "formatting"
|
|
949
929
|
});
|
|
950
|
-
case "bbbb":
|
|
951
930
|
default:
|
|
952
931
|
return n.dayPeriod(a, {
|
|
953
932
|
width: "wide",
|
|
@@ -972,7 +951,6 @@ const m = {
|
|
|
972
951
|
width: "narrow",
|
|
973
952
|
context: "formatting"
|
|
974
953
|
});
|
|
975
|
-
case "BBBB":
|
|
976
954
|
default:
|
|
977
955
|
return n.dayPeriod(a, {
|
|
978
956
|
width: "wide",
|
|
@@ -1029,11 +1007,6 @@ const m = {
|
|
|
1029
1007
|
case "XXXX":
|
|
1030
1008
|
case "XX":
|
|
1031
1009
|
return g(r);
|
|
1032
|
-
// Hours, minutes and optional seconds with `:` delimiter
|
|
1033
|
-
// Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets
|
|
1034
|
-
// so this token always has the same output as `XXX`
|
|
1035
|
-
case "XXXXX":
|
|
1036
|
-
case "XXX":
|
|
1037
1010
|
// Hours and minutes with `:` delimiter
|
|
1038
1011
|
default:
|
|
1039
1012
|
return g(r, ":");
|
|
@@ -1052,11 +1025,6 @@ const m = {
|
|
|
1052
1025
|
case "xxxx":
|
|
1053
1026
|
case "xx":
|
|
1054
1027
|
return g(r);
|
|
1055
|
-
// Hours, minutes and optional seconds with `:` delimiter
|
|
1056
|
-
// Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets
|
|
1057
|
-
// so this token always has the same output as `xxx`
|
|
1058
|
-
case "xxxxx":
|
|
1059
|
-
case "xxx":
|
|
1060
1028
|
// Hours and minutes with `:` delimiter
|
|
1061
1029
|
default:
|
|
1062
1030
|
return g(r, ":");
|
|
@@ -1071,8 +1039,6 @@ const m = {
|
|
|
1071
1039
|
case "OO":
|
|
1072
1040
|
case "OOO":
|
|
1073
1041
|
return "GMT" + W(r, ":");
|
|
1074
|
-
// Long
|
|
1075
|
-
case "OOOO":
|
|
1076
1042
|
default:
|
|
1077
1043
|
return "GMT" + g(r, ":");
|
|
1078
1044
|
}
|
|
@@ -1086,8 +1052,6 @@ const m = {
|
|
|
1086
1052
|
case "zz":
|
|
1087
1053
|
case "zzz":
|
|
1088
1054
|
return "GMT" + W(r, ":");
|
|
1089
|
-
// Long
|
|
1090
|
-
case "zzzz":
|
|
1091
1055
|
default:
|
|
1092
1056
|
return "GMT" + g(r, ":");
|
|
1093
1057
|
}
|
|
@@ -1121,7 +1085,6 @@ const Y = (t, e) => {
|
|
|
1121
1085
|
return e.date({ width: "medium" });
|
|
1122
1086
|
case "PPP":
|
|
1123
1087
|
return e.date({ width: "long" });
|
|
1124
|
-
case "PPPP":
|
|
1125
1088
|
default:
|
|
1126
1089
|
return e.date({ width: "full" });
|
|
1127
1090
|
}
|
|
@@ -1133,7 +1096,6 @@ const Y = (t, e) => {
|
|
|
1133
1096
|
return e.time({ width: "medium" });
|
|
1134
1097
|
case "ppp":
|
|
1135
1098
|
return e.time({ width: "long" });
|
|
1136
|
-
case "pppp":
|
|
1137
1099
|
default:
|
|
1138
1100
|
return e.time({ width: "full" });
|
|
1139
1101
|
}
|
|
@@ -1152,7 +1114,6 @@ const Y = (t, e) => {
|
|
|
1152
1114
|
case "PPP":
|
|
1153
1115
|
o = e.dateTime({ width: "long" });
|
|
1154
1116
|
break;
|
|
1155
|
-
case "PPPP":
|
|
1156
1117
|
default:
|
|
1157
1118
|
o = e.dateTime({ width: "full" });
|
|
1158
1119
|
break;
|
|
@@ -16,8 +16,8 @@ import "@sbb-esta/lyne-elements/divider.js";
|
|
|
16
16
|
import "@sbb-esta/lyne-elements/screen-reader-only.js";
|
|
17
17
|
import "@sbb-esta/lyne-elements/journey-header.js";
|
|
18
18
|
import "../pearl-chain-time.js";
|
|
19
|
-
import { i as ot } from "../isValid-
|
|
20
|
-
import { f as R } from "../format-
|
|
19
|
+
import { i as ot } from "../isValid-m3_OsPaB.js";
|
|
20
|
+
import { f as R } from "../format-CmKROkbc.js";
|
|
21
21
|
const lt = at`:host{display:block}.sbb-journey-summary{--sbb-text-font-size: var(--sbb-text-font-size-s);font-family:var(--sbb-typo-font-family);font-weight:400;line-height:var(--sbb-typo-line-height-text);letter-spacing:var(--sbb-typo-letter-spacing-text);font-size:var(--sbb-text-font-size);color:var(--sbb-color-4);display:flex;flex-direction:column}.sbb-journey-summary__via-block{display:flex}.sbb-journey-summary__vias{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;margin-block:0;padding-inline-start:var(--sbb-spacing-fixed-1x)}.sbb-journey-summary__date{margin-block-end:var(--sbb-spacing-fixed-2x)}.sbb-journey-summary__via{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.sbb-journey-summary__divider{margin-block:var(--sbb-spacing-fixed-6x)}ul li{list-style:none;display:inline}`;
|
|
22
22
|
let jt = (() => {
|
|
23
23
|
var y, v, f, g, k, $, r;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sbb-esta/lyne-elements-experimental",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.3",
|
|
4
4
|
"description": "Lyne Design System",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"design system",
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"type": "module",
|
|
12
12
|
"customElements": "custom-elements.json",
|
|
13
13
|
"peerDependencies": {
|
|
14
|
-
"@sbb-esta/lyne-elements": "4.0.
|
|
14
|
+
"@sbb-esta/lyne-elements": "4.0.3"
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
17
|
"lit": "^3.3.1",
|
|
@@ -12,8 +12,8 @@ import { customElement as _e, property as I } from "lit/decorators.js";
|
|
|
12
12
|
import { styleMap as U } from "lit/directives/style-map.js";
|
|
13
13
|
import { removeTimezoneFromISOTimeString as o } from "../core/datetime.js";
|
|
14
14
|
import { isRideLeg as ge } from "../core/timetable.js";
|
|
15
|
-
import { d as z, a as x } from "../differenceInMinutes-
|
|
16
|
-
import { t as S } from "../toDate-
|
|
15
|
+
import { d as z, a as x } from "../differenceInMinutes-COvvdYsJ.js";
|
|
16
|
+
import { t as S } from "../toDate-Bw2KTWeq.js";
|
|
17
17
|
function ve(t, l) {
|
|
18
18
|
return +S(t) > +S(l);
|
|
19
19
|
}
|
|
@@ -14,7 +14,7 @@ import { customElement as me, property as b } from "lit/decorators.js";
|
|
|
14
14
|
import { removeTimezoneFromISOTimeString as Y } from "../core/datetime.js";
|
|
15
15
|
import { getDepartureArrivalTimeAttribute as ce, isRideLeg as he } from "../core/timetable.js";
|
|
16
16
|
import "../pearl-chain.js";
|
|
17
|
-
import { f as Z } from "../format-
|
|
17
|
+
import { f as Z } from "../format-CmKROkbc.js";
|
|
18
18
|
const pe = ne`:host{display:block;--sbb-pearl-chain-time-height: auto}@media(min-width:37.5rem){:host{--sbb-pearl-chain-time-height: 1.5625rem}}@media(min-width:64rem){:host{--sbb-pearl-chain-time-height: 1.75rem}}.sbb-pearl-chain__time{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:center;height:var(--sbb-pearl-chain-time-height)}.sbb-pearl-chain__time-walktime,.sbb-pearl-chain__time-transfer{--sbb-text-font-size: var(--sbb-text-font-size-xxs);font-family:var(--sbb-typo-font-family);font-weight:400;line-height:var(--sbb-typo-line-height-text);letter-spacing:var(--sbb-typo-letter-spacing-text);font-size:var(--sbb-text-font-size);display:inline-flex;align-items:center}.sbb-pearl-chain__time-walktime--walk-small-left{transform:translate(-.4375rem);margin-inline-end:calc(var(--sbb-spacing-fixed-2x) - .4375rem)}.sbb-pearl-chain__time-walktime--walk-small-right{margin-inline-start:calc(var(--sbb-spacing-fixed-2x) - .25rem)}.sbb-pearl-chain__time-walktime--wheelchair-small-left{transform:translate(-.375rem);margin-inline-end:calc(var(--sbb-spacing-fixed-2x) - .4375rem)}.sbb-pearl-chain__time-walktime--wheelchair-small-right{margin-inline-start:calc(var(--sbb-spacing-fixed-2x) - .25rem)}.sbb-pearl-chain__time-walktime-prime-symbol{float:right}.sbb-pearl-chain__time-transfer{gap:var(--sbb-spacing-fixed-1x)}.sbb-pearl-chain__time-transfer--sa-ci-departure{margin-inline-end:var(--sbb-spacing-fixed-2x)}.sbb-pearl-chain__time-transfer--sa-ci-arrival{margin-inline-start:calc(var(--sbb-spacing-fixed-2x) - .25rem)}.sbb-pearl-chain__time-chain{flex:1 1 auto;align-self:center;margin-inline:var(--sbb-spacing-fixed-3x)}.sbb-pearl-chain__time-time{--sbb-text-font-size: var(--sbb-text-font-size-s);font-family:var(--sbb-typo-font-family);font-weight:400;line-height:var(--sbb-typo-line-height-text);letter-spacing:var(--sbb-typo-letter-spacing-text);font-size:var(--sbb-text-font-size);font-weight:700;color:var(--sbb-color-2)}.sbb-screen-reader-only{border:0;clip-path:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;white-space:nowrap;width:1px}`;
|
|
19
19
|
let Ae = (() => {
|
|
20
20
|
var d, _, g, u, f, v, y, l;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { CoachItem, CoachNumberOfFreePlaces, Place, PlaceSelection, SeatReservation, SeatReservationPlaceSelection, SeatReservationSelectedCoach, VehicleType } from '../types.ts';
|
|
1
|
+
import { CoachDeckLevel, CoachItem, CoachNumberOfFreePlaces, Place, PlaceSelection, SeatReservation, SeatReservationPlaceSelection, SeatReservationSelectedCoach, VehicleType } from '../types.ts';
|
|
2
2
|
/**
|
|
3
3
|
* Map function that converts the RAW OSDM mock data into SeatReservation
|
|
4
4
|
*/
|
|
5
|
-
export declare const mapRawDataToSeatReservation: (vehicleType: VehicleType) => SeatReservation;
|
|
5
|
+
export declare const mapRawDataToSeatReservation: (vehicleType: VehicleType | null, coachDeckLevel?: CoachDeckLevel | null) => SeatReservation;
|
|
6
6
|
/**
|
|
7
7
|
* Mapped place and coach information to place selection
|
|
8
8
|
* @param place
|
|
@@ -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,uBAAuB,EACvB,KAAK,EACL,cAAc,EAEd,eAAe,EACf,6BAA6B,EAC7B,4BAA4B,EAC5B,WAAW,EACZ,MAAM,aAAa,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,cAAc,EACd,SAAS,EACT,uBAAuB,EACvB,KAAK,EACL,cAAc,EAEd,eAAe,EACf,6BAA6B,EAC7B,4BAA4B,EAC5B,WAAW,EACZ,MAAM,aAAa,CAAC;AA+BrB;;GAEG;AACH,eAAO,MAAM,2BAA2B,GACtC,aAAa,WAAW,GAAG,IAAI,EAC/B,iBAAgB,cAAc,GAAG,IAAW,KAC3C,eAqFF,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,6BAA6B,GACxC,OAAO,KAAK,EACZ,SAAS,MAAM,EACf,WAAW,MAAM,EACjB,YAAY,MAAM,KACjB,cASF,CAAC;AAEF;;;;;;;;;GASG;AACH,eAAO,MAAM,+CAA+C,GAC1D,OAAO,KAAK,EACZ,OAAO,SAAS,EAChB,SAAS,MAAM,EACf,WAAW,MAAM,EACjB,YAAY,MAAM,KACjB,6BAYF,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,6BAA6B,GACxC,YAAY,MAAM,EAClB,OAAO,SAAS,EAChB,yBAAyB,uBAAuB,KAC/C,4BAUF,CAAC"}
|
|
@@ -1,20 +1,23 @@
|
|
|
1
|
-
import { MOCK_COACHES_RAW_0 as
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
import { MOCK_COACHES_RAW_0 as m, MOCK_COACHES_RAW_1 as u, MOCK_COACHE_RAW_DECK_LOWER as y, MOCK_COACHE_RAW_DECK_UPPPER as g } from "./seat-reservation-sample-data.js";
|
|
2
|
+
function E(e, n) {
|
|
3
|
+
return e !== null ? e === "TRAIN" ? m : u : n === "LOWER_DECK" ? y : n === "UPPER_DECK" ? g : m;
|
|
4
|
+
}
|
|
5
|
+
const A = (e, n = null) => {
|
|
6
|
+
const i = E(e, n), r = n === "LOWER_DECK" ? 1 : 0, a = i.map((C) => {
|
|
7
|
+
const s = C?.coachDeckLayout, c = [], d = [], l = s.placeGroups.map((t) => (c.indexOf(t.travelClass) === -1 && c.push(t.travelClass), d.indexOf(t.accommodationSubType) === -1 && d.push(t.accommodationSubType), t.places?.map((o) => ({
|
|
8
|
+
number: o?.number,
|
|
9
|
+
state: o?.state,
|
|
7
10
|
type: t.accommodationSubType.indexOf("BICYCLE") === -1 ? "SEAT" : "BICYCLE",
|
|
8
|
-
dimension: { w:
|
|
11
|
+
dimension: { w: o.rectangle.dimension.width, h: o.rectangle.dimension.height },
|
|
9
12
|
position: {
|
|
10
|
-
x:
|
|
11
|
-
y:
|
|
12
|
-
z:
|
|
13
|
+
x: o.rectangle.position.x,
|
|
14
|
+
y: o.rectangle.position.y,
|
|
15
|
+
z: o.rectangle.position.z
|
|
13
16
|
},
|
|
14
|
-
rotation:
|
|
17
|
+
rotation: o?.orientation || 0,
|
|
15
18
|
travelClass: t?.travelClass,
|
|
16
|
-
propertyIds:
|
|
17
|
-
})))).flat(),
|
|
19
|
+
propertyIds: o.placeProperties || []
|
|
20
|
+
})))).flat(), p = s.serviceIcons.map((t) => ({
|
|
18
21
|
icon: t.type,
|
|
19
22
|
position: {
|
|
20
23
|
x: t.rectangle.position.x,
|
|
@@ -25,7 +28,7 @@ const y = (e) => {
|
|
|
25
28
|
w: t.rectangle.dimension.width,
|
|
26
29
|
h: t.rectangle.dimension.height
|
|
27
30
|
}
|
|
28
|
-
})),
|
|
31
|
+
})), h = s.graphicElements.map((t) => ({
|
|
29
32
|
icon: t?.type,
|
|
30
33
|
position: {
|
|
31
34
|
x: t.rectangle.position.x,
|
|
@@ -36,51 +39,51 @@ const y = (e) => {
|
|
|
36
39
|
rotation: t.orientation
|
|
37
40
|
}));
|
|
38
41
|
return {
|
|
39
|
-
id:
|
|
40
|
-
number:
|
|
41
|
-
dimension: { w:
|
|
42
|
-
places:
|
|
43
|
-
serviceElements:
|
|
44
|
-
graphicElements:
|
|
45
|
-
travelClass:
|
|
46
|
-
propertyIds:
|
|
42
|
+
id: s?.id,
|
|
43
|
+
number: s?.name,
|
|
44
|
+
dimension: { w: s.dimension?.width, h: s.dimension?.height },
|
|
45
|
+
places: l,
|
|
46
|
+
serviceElements: p,
|
|
47
|
+
graphicElements: h,
|
|
48
|
+
travelClass: c,
|
|
49
|
+
propertyIds: d
|
|
47
50
|
};
|
|
48
51
|
});
|
|
49
52
|
return {
|
|
50
|
-
vehicleType: e,
|
|
51
|
-
deckCoachIndex:
|
|
53
|
+
vehicleType: e || "TRAIN",
|
|
54
|
+
deckCoachIndex: r,
|
|
52
55
|
deckCoachLevel: "SINGLE_DECK",
|
|
53
|
-
coachItems:
|
|
56
|
+
coachItems: a
|
|
54
57
|
};
|
|
55
|
-
},
|
|
58
|
+
}, T = (e, n, i, r) => ({
|
|
56
59
|
id: n,
|
|
57
60
|
number: e.number,
|
|
58
|
-
deckIndex:
|
|
59
|
-
coachIndex:
|
|
61
|
+
deckIndex: i,
|
|
62
|
+
coachIndex: r,
|
|
60
63
|
state: e.state,
|
|
61
64
|
placeType: e.type
|
|
62
|
-
}),
|
|
63
|
-
id:
|
|
65
|
+
}), I = (e, n, i, r, a) => ({
|
|
66
|
+
id: i,
|
|
64
67
|
coachId: n.id,
|
|
65
68
|
coachNumber: n.number,
|
|
66
|
-
coachIndex:
|
|
67
|
-
deckIndex:
|
|
69
|
+
coachIndex: a,
|
|
70
|
+
deckIndex: r,
|
|
68
71
|
placeNumber: e.number,
|
|
69
72
|
placeType: e.type,
|
|
70
73
|
placeTravelClass: e.travelClass || "ANY_CLASS",
|
|
71
74
|
propertyIds: e.propertyIds || []
|
|
72
|
-
}),
|
|
75
|
+
}), O = (e, n, i) => ({
|
|
73
76
|
coachId: n.id,
|
|
74
77
|
coachNumber: n.number,
|
|
75
78
|
coachIndex: e,
|
|
76
79
|
coachType: n?.type,
|
|
77
80
|
coachTravelClass: n?.travelClass,
|
|
78
81
|
coachPropertyIds: n?.propertyIds,
|
|
79
|
-
coachNumberOfFreePlaces:
|
|
82
|
+
coachNumberOfFreePlaces: i
|
|
80
83
|
});
|
|
81
84
|
export {
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
85
|
+
O as mapCoachInfosToCoachSelection,
|
|
86
|
+
I as mapPlaceAndCoachToSeatReservationPlaceSelection,
|
|
87
|
+
T as mapPlaceInfosToPlaceSelection,
|
|
88
|
+
A as mapRawDataToSeatReservation
|
|
86
89
|
};
|
|
@@ -247,4 +247,126 @@ export declare const MOCK_GIRUNO_TRAIN: {
|
|
|
247
247
|
type: string;
|
|
248
248
|
})[];
|
|
249
249
|
};
|
|
250
|
+
export declare const MOCK_COACHE_RAW_DECK_LOWER: {
|
|
251
|
+
warnings: null;
|
|
252
|
+
coachDeckLayout: {
|
|
253
|
+
id: string;
|
|
254
|
+
name: string;
|
|
255
|
+
dimension: {
|
|
256
|
+
width: number;
|
|
257
|
+
height: number;
|
|
258
|
+
borderRadius: null;
|
|
259
|
+
};
|
|
260
|
+
lowFloorEntry: boolean;
|
|
261
|
+
deckLevel: string;
|
|
262
|
+
placeGroups: {
|
|
263
|
+
travelClass: string;
|
|
264
|
+
accommodationSubType: string;
|
|
265
|
+
places: {
|
|
266
|
+
number: string;
|
|
267
|
+
rectangle: {
|
|
268
|
+
position: {
|
|
269
|
+
x: number;
|
|
270
|
+
y: number;
|
|
271
|
+
z: number;
|
|
272
|
+
};
|
|
273
|
+
dimension: {
|
|
274
|
+
width: number;
|
|
275
|
+
height: number;
|
|
276
|
+
borderRadius: null;
|
|
277
|
+
};
|
|
278
|
+
};
|
|
279
|
+
orientation: number;
|
|
280
|
+
placeLocations: string[];
|
|
281
|
+
placeProperties: string[];
|
|
282
|
+
state: string;
|
|
283
|
+
}[];
|
|
284
|
+
}[];
|
|
285
|
+
graphicElements: {
|
|
286
|
+
rectangle: {
|
|
287
|
+
position: {
|
|
288
|
+
x: number;
|
|
289
|
+
y: number;
|
|
290
|
+
z: number;
|
|
291
|
+
};
|
|
292
|
+
dimension: {
|
|
293
|
+
width: number;
|
|
294
|
+
height: number;
|
|
295
|
+
borderRadius: null;
|
|
296
|
+
};
|
|
297
|
+
};
|
|
298
|
+
orientation: number;
|
|
299
|
+
type: string;
|
|
300
|
+
}[];
|
|
301
|
+
serviceIcons: {
|
|
302
|
+
rectangle: {
|
|
303
|
+
position: {
|
|
304
|
+
x: number;
|
|
305
|
+
y: number;
|
|
306
|
+
z: number;
|
|
307
|
+
};
|
|
308
|
+
dimension: {
|
|
309
|
+
width: number;
|
|
310
|
+
height: number;
|
|
311
|
+
borderRadius: null;
|
|
312
|
+
};
|
|
313
|
+
};
|
|
314
|
+
type: string;
|
|
315
|
+
}[];
|
|
316
|
+
};
|
|
317
|
+
}[];
|
|
318
|
+
export declare const MOCK_COACHE_RAW_DECK_UPPPER: {
|
|
319
|
+
warnings: null;
|
|
320
|
+
coachDeckLayout: {
|
|
321
|
+
id: string;
|
|
322
|
+
name: string;
|
|
323
|
+
dimension: {
|
|
324
|
+
width: number;
|
|
325
|
+
height: number;
|
|
326
|
+
borderRadius: null;
|
|
327
|
+
};
|
|
328
|
+
lowFloorEntry: boolean;
|
|
329
|
+
deckLevel: string;
|
|
330
|
+
placeGroups: {
|
|
331
|
+
travelClass: string;
|
|
332
|
+
accommodationSubType: string;
|
|
333
|
+
places: {
|
|
334
|
+
number: string;
|
|
335
|
+
rectangle: {
|
|
336
|
+
position: {
|
|
337
|
+
x: number;
|
|
338
|
+
y: number;
|
|
339
|
+
z: number;
|
|
340
|
+
};
|
|
341
|
+
dimension: {
|
|
342
|
+
width: number;
|
|
343
|
+
height: number;
|
|
344
|
+
borderRadius: null;
|
|
345
|
+
};
|
|
346
|
+
};
|
|
347
|
+
orientation: number;
|
|
348
|
+
placeLocations: string[];
|
|
349
|
+
placeProperties: string[];
|
|
350
|
+
state: string;
|
|
351
|
+
}[];
|
|
352
|
+
}[];
|
|
353
|
+
graphicElements: {
|
|
354
|
+
rectangle: {
|
|
355
|
+
position: {
|
|
356
|
+
x: number;
|
|
357
|
+
y: number;
|
|
358
|
+
z: number;
|
|
359
|
+
};
|
|
360
|
+
dimension: {
|
|
361
|
+
width: number;
|
|
362
|
+
height: number;
|
|
363
|
+
borderRadius: null;
|
|
364
|
+
};
|
|
365
|
+
};
|
|
366
|
+
orientation: number;
|
|
367
|
+
type: string;
|
|
368
|
+
}[];
|
|
369
|
+
serviceIcons: never[];
|
|
370
|
+
};
|
|
371
|
+
}[];
|
|
250
372
|
//# sourceMappingURL=seat-reservation-sample-data.d.ts.map
|
|
@@ -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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyjT9B,CAAC;AAEF,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0iB9B,CAAC;AAEF,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA24nB7B,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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0iB9B,CAAC;AAEF,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA24nB7B,CAAC;AAEF,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0iBtC,CAAC;AAEF,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2ZvC,CAAC"}
|