@sbb-esta/lyne-elements-experimental-dev 4.7.0-dev.1773388997 → 4.7.0-dev.1773393170
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.js +76 -65
- package/autocomplete-grid/autocomplete-grid-button/autocomplete-grid-button.component.js +52 -72
- package/autocomplete-grid/autocomplete-grid-button.js +6 -3
- package/autocomplete-grid/autocomplete-grid-cell/autocomplete-grid-cell.component.js +17 -2
- package/autocomplete-grid/autocomplete-grid-cell.js +7 -4
- package/autocomplete-grid/autocomplete-grid-optgroup/autocomplete-grid-optgroup.component.js +21 -20
- package/autocomplete-grid/autocomplete-grid-optgroup.js +6 -3
- package/autocomplete-grid/autocomplete-grid-option/autocomplete-grid-option.component.js +33 -2
- package/autocomplete-grid/autocomplete-grid-option.js +9 -4
- package/autocomplete-grid/autocomplete-grid-row/autocomplete-grid-row.component.js +22 -2
- package/autocomplete-grid/autocomplete-grid-row.js +7 -4
- package/autocomplete-grid/autocomplete-grid.js +6 -3
- package/autocomplete-grid.js +21 -9
- package/autocomplete-grid.pure.js +15 -7
- package/core/datetime/date-helper.js +191 -2
- package/core/datetime.js +5 -2
- package/core/timetable/access-leg-helper.js +71 -76
- package/core/timetable/timetable-helper.js +11 -9
- package/core/timetable/timetable-properties.js +1 -0
- package/core/timetable.js +7 -3
- package/custom-elements.json +84 -84
- package/development/autocomplete-grid/autocomplete-grid/autocomplete-grid.component.js +122 -114
- package/development/autocomplete-grid/autocomplete-grid-button/autocomplete-grid-button.component.js +70 -92
- package/development/autocomplete-grid/autocomplete-grid-button.js +4 -6
- package/development/autocomplete-grid/autocomplete-grid-cell/autocomplete-grid-cell.component.js +29 -2
- package/development/autocomplete-grid/autocomplete-grid-cell.js +5 -7
- package/development/autocomplete-grid/autocomplete-grid-optgroup/autocomplete-grid-optgroup.component.js +22 -27
- package/development/autocomplete-grid/autocomplete-grid-optgroup.js +4 -6
- package/development/autocomplete-grid/autocomplete-grid-option/autocomplete-grid-option.component.js +109 -2
- package/development/autocomplete-grid/autocomplete-grid-option.js +7 -7
- package/development/autocomplete-grid/autocomplete-grid-row/autocomplete-grid-row.component.js +91 -2
- package/development/autocomplete-grid/autocomplete-grid-row.js +5 -7
- package/development/autocomplete-grid/autocomplete-grid.js +4 -6
- package/development/autocomplete-grid.js +14 -10
- package/development/autocomplete-grid.pure.js +13 -4
- package/development/core/datetime/date-helper.js +285 -2
- package/development/core/datetime.js +6 -2
- package/development/core/timetable/access-leg-helper.js +82 -104
- package/development/core/timetable/timetable-helper.js +17 -16
- package/development/core/timetable/timetable-properties.js +2 -0
- package/development/core/timetable.js +8 -3
- package/development/differenceInMinutes-B0dawX-5.js +26 -0
- package/development/format-BMkeaqaF.js +1433 -0
- package/development/isValid-BYRch7pV.js +53 -0
- package/development/journey-summary/journey-summary.component.js +288 -2
- package/development/journey-summary.js +5 -8
- package/development/journey-summary.pure.js +5 -2
- package/development/pearl-chain/pearl-chain.component.js +634 -2
- package/development/pearl-chain-time/pearl-chain-time.component.js +306 -2
- package/development/pearl-chain-time.js +5 -8
- package/development/pearl-chain-time.pure.js +5 -2
- package/development/pearl-chain-vertical/pearl-chain-vertical.component.js +28 -2
- package/development/pearl-chain-vertical-item/pearl-chain-vertical-item.component.js +393 -2
- package/development/pearl-chain-vertical-item.js +5 -8
- package/development/pearl-chain-vertical-item.pure.js +5 -2
- package/development/pearl-chain-vertical.js +5 -8
- package/development/pearl-chain-vertical.pure.js +5 -2
- package/development/pearl-chain.js +5 -8
- package/development/pearl-chain.pure.js +5 -2
- package/development/seat-reservation/common/mapper/icon-mapper.js +71 -168
- package/development/seat-reservation/common/mapper/mapper.js +122 -153
- package/development/seat-reservation/common/mapper/sample-data/seat-reservation-sample-data-bus.js +559 -570
- package/development/seat-reservation/common/mapper/sample-data/seat-reservation-sample-data-decks.js +972 -992
- package/development/seat-reservation/common/mapper/sample-data/seat-reservation-sample-data-giruno.js +20367 -20334
- package/development/seat-reservation/common/mapper/sample-data/seat-reservation-sample-data-others.js +1738 -1731
- package/development/seat-reservation/common/mapper/sample-data/seat-reservation-sample-data-train.js +9782 -9741
- package/development/seat-reservation/common/mapper.js +8 -1
- package/development/seat-reservation/common/svgs.js +46 -2
- package/development/seat-reservation/common/translations/i18n.js +900 -1118
- package/development/seat-reservation/common/translations.js +4 -1
- package/development/seat-reservation/common/types.js +2 -0
- package/development/seat-reservation/common.js +11 -7
- package/development/seat-reservation/seat-reservation/seat-reservation-base-element.js +1230 -1305
- package/development/seat-reservation/seat-reservation/seat-reservation.component.js +859 -2
- package/development/seat-reservation/seat-reservation-area/seat-reservation-area.component.js +106 -2
- package/development/seat-reservation/seat-reservation-area.js +5 -7
- package/development/seat-reservation/seat-reservation-graphic/seat-reservation-assets.js +34 -35
- package/development/seat-reservation/seat-reservation-graphic/seat-reservation-graphic.component.js +162 -2
- package/development/seat-reservation/seat-reservation-graphic.js +5 -7
- package/development/seat-reservation/seat-reservation-navigation-coach/seat-reservation-navigation-coach.component.js +713 -2
- package/development/seat-reservation/seat-reservation-navigation-coach.js +5 -7
- package/development/seat-reservation/seat-reservation-navigation-services/seat-reservation-navigation-services.component.js +131 -2
- package/development/seat-reservation/seat-reservation-navigation-services.js +5 -7
- package/development/seat-reservation/seat-reservation-place-control/seat-reservation-place-control.component.js +601 -2
- package/development/seat-reservation/seat-reservation-place-control.js +5 -7
- package/development/seat-reservation/seat-reservation-scoped/seat-reservation-scoped.component.js +22 -2
- package/development/seat-reservation/seat-reservation-scoped.js +5 -7
- package/development/seat-reservation/seat-reservation.js +6 -7
- package/development/seat-reservation.js +28 -15
- package/development/seat-reservation.pure.js +28 -10
- package/development/timetable-duration/timetable-duration.component.js +108 -2
- package/development/timetable-duration.js +5 -8
- package/development/timetable-duration.pure.js +5 -2
- package/development/timetable-row/timetable-row.component.js +781 -2
- package/development/timetable-row.js +13 -8
- package/development/timetable-row.pure.js +12 -2
- package/development/toDate-BWb6Z1JD.js +24 -0
- package/differenceInMinutes-COvvdYsJ.js +23 -0
- package/format-CmKROkbc.js +1186 -0
- package/isValid-m3_OsPaB.js +45 -0
- package/journey-summary/journey-summary.component.js +194 -2
- package/journey-summary.js +4 -5
- package/journey-summary.pure.js +4 -2
- package/package.json +2 -2
- package/pearl-chain/pearl-chain.component.js +165 -2
- package/pearl-chain-time/pearl-chain-time.component.js +157 -2
- package/pearl-chain-time.js +4 -5
- package/pearl-chain-time.pure.js +4 -2
- package/pearl-chain-vertical/pearl-chain-vertical.component.js +17 -2
- package/pearl-chain-vertical-item/pearl-chain-vertical-item.component.js +77 -2
- package/pearl-chain-vertical-item.js +4 -5
- package/pearl-chain-vertical-item.pure.js +4 -2
- package/pearl-chain-vertical.js +4 -5
- package/pearl-chain-vertical.pure.js +4 -2
- package/pearl-chain.js +4 -5
- package/pearl-chain.pure.js +4 -2
- package/seat-reservation/common/mapper/icon-mapper.js +71 -71
- package/seat-reservation/common/mapper/mapper.js +89 -95
- package/seat-reservation/common/mapper/sample-data/seat-reservation-sample-data-bus.js +558 -568
- package/seat-reservation/common/mapper/sample-data/seat-reservation-sample-data-decks.js +970 -989
- package/seat-reservation/common/mapper/sample-data/seat-reservation-sample-data-giruno.js +20366 -20332
- package/seat-reservation/common/mapper/sample-data/seat-reservation-sample-data-others.js +1737 -1729
- package/seat-reservation/common/mapper/sample-data/seat-reservation-sample-data-train.js +9781 -9739
- package/seat-reservation/common/mapper.js +9 -3
- package/seat-reservation/common/svgs.js +243 -2
- package/seat-reservation/common/translations/i18n.js +891 -1084
- package/seat-reservation/common/translations.js +4 -2
- package/seat-reservation/common/types.js +1 -0
- package/seat-reservation/common.js +15 -9
- package/seat-reservation/seat-reservation/seat-reservation-base-element.js +810 -832
- package/seat-reservation/seat-reservation/seat-reservation.component.js +420 -2
- package/seat-reservation/seat-reservation-area/seat-reservation-area.component.js +51 -2
- package/seat-reservation/seat-reservation-area.js +7 -4
- package/seat-reservation/seat-reservation-graphic/seat-reservation-assets.js +71 -68
- package/seat-reservation/seat-reservation-graphic/seat-reservation-graphic.component.js +75 -2
- package/seat-reservation/seat-reservation-graphic.js +7 -4
- package/seat-reservation/seat-reservation-navigation-coach/seat-reservation-navigation-coach.component.js +234 -2
- package/seat-reservation/seat-reservation-navigation-coach.js +7 -4
- package/seat-reservation/seat-reservation-navigation-services/seat-reservation-navigation-services.component.js +85 -2
- package/seat-reservation/seat-reservation-navigation-services.js +7 -4
- package/seat-reservation/seat-reservation-place-control/seat-reservation-place-control.component.js +203 -2
- package/seat-reservation/seat-reservation-place-control.js +7 -4
- package/seat-reservation/seat-reservation-scoped/seat-reservation-scoped.component.js +13 -2
- package/seat-reservation/seat-reservation-scoped.js +7 -4
- package/seat-reservation/seat-reservation.js +9 -5
- package/seat-reservation.js +39 -17
- package/seat-reservation.pure.js +32 -15
- package/timetable-duration/timetable-duration.component.js +57 -2
- package/timetable-duration.js +4 -5
- package/timetable-duration.pure.js +4 -2
- package/timetable-row/timetable-row.component.js +427 -2
- package/timetable-row.js +13 -6
- package/timetable-row.pure.js +11 -2
- package/toDate-Bw2KTWeq.js +15 -0
- package/autocomplete-grid-cell.component-Dak9wlBr.js +0 -24
- package/autocomplete-grid-option.component-DNRFHOwc.js +0 -37
- package/autocomplete-grid-row.component-DBHZQ0GQ.js +0 -27
- package/date-helper-CGproP5d.js +0 -185
- package/development/autocomplete-grid-cell.component-BBvM4o2H.js +0 -42
- package/development/autocomplete-grid-option.component-QzfM5eIE.js +0 -123
- package/development/autocomplete-grid-row.component-H8sCTCkT.js +0 -104
- package/development/date-helper-8_Y-PuHh.js +0 -520
- package/development/differenceInMinutes-DN_1Rk3O.js +0 -110
- package/development/format-Bbrn2bgo.js +0 -1848
- package/development/isValid-C-HzKv4v.js +0 -178
- package/development/journey-summary.component-uGhZvA4p.js +0 -385
- package/development/pearl-chain-time.component-B8mayTWD.js +0 -415
- package/development/pearl-chain-vertical-item.component-BDzbcIaf.js +0 -435
- package/development/pearl-chain-vertical.component-CswE7b3M.js +0 -39
- package/development/pearl-chain.component-wpsTvoSe.js +0 -704
- package/development/seat-reservation-area.component-BK92ZtFo.js +0 -138
- package/development/seat-reservation-graphic.component-cUnsHh5x.js +0 -193
- package/development/seat-reservation-navigation-coach.component-D6Bglus8.js +0 -828
- package/development/seat-reservation-navigation-services.component-DYJ6Ddkg.js +0 -179
- package/development/seat-reservation-place-control.component-Bg9evKBW.js +0 -726
- package/development/seat-reservation-scoped.component-DRQ_I702.js +0 -31
- package/development/seat-reservation.component-Cq_aJKR0.js +0 -818
- package/development/svgs-C3JMWR26.js +0 -28
- package/development/timetable-duration.component-DI0lET17.js +0 -125
- package/development/timetable-row.component-CAED6Zwc.js +0 -932
- package/development/toDate-Biiv3kyf.js +0 -150
- package/differenceInMinutes-Dr9gRqtu.js +0 -27
- package/format-CM5exOsN.js +0 -1103
- package/isValid-B9oVW3lA.js +0 -36
- package/journey-summary.component-Cq_4kaOp.js +0 -264
- package/pearl-chain-time.component-DGDW5S1c.js +0 -239
- package/pearl-chain-vertical-item.component-G22bWhLU.js +0 -108
- package/pearl-chain-vertical.component-CXIDT5RD.js +0 -21
- package/pearl-chain.component-DmjkVIva.js +0 -194
- package/seat-reservation-area.component-n-9rGn_y.js +0 -75
- package/seat-reservation-graphic.component-YTXRmKt0.js +0 -102
- package/seat-reservation-navigation-coach.component-YJ0vaYmO.js +0 -333
- package/seat-reservation-navigation-services.component-C3xnLJg2.js +0 -127
- package/seat-reservation-place-control.component-DmBAfM6K.js +0 -322
- package/seat-reservation-scoped.component-DPkz6u17.js +0 -17
- package/seat-reservation.component-C_anMkgw.js +0 -364
- package/svgs-D9arBcqr.js +0 -26
- package/timetable-duration.component-DCu8Phts.js +0 -65
- package/timetable-row.component-BVRCB3xK.js +0 -559
- package/toDate-p-Tpkb7t.js +0 -16
|
@@ -1,2 +1,17 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { SbbElement as i } from "@sbb-esta/lyne-elements/core/base-elements.js";
|
|
2
|
+
import { boxSizingStyles as r } from "@sbb-esta/lyne-elements/core/styles.js";
|
|
3
|
+
import { css as a, html as l } from "lit";
|
|
4
|
+
const c = a`:host{--sbb-pearl-chain-vertical-width: 100%;display:block}.sbb-pearl-chain-vertical{display:table;width:var(--sbb-pearl-chain-vertical-width)}`, s = class s extends i {
|
|
5
|
+
render() {
|
|
6
|
+
return l`
|
|
7
|
+
<div class="sbb-pearl-chain-vertical">
|
|
8
|
+
<slot></slot>
|
|
9
|
+
</div>
|
|
10
|
+
`;
|
|
11
|
+
}
|
|
12
|
+
};
|
|
13
|
+
s.elementName = "sbb-pearl-chain-vertical", s.styles = [r, c];
|
|
14
|
+
let t = s;
|
|
15
|
+
export {
|
|
16
|
+
t as SbbPearlChainVerticalElement
|
|
17
|
+
};
|
|
@@ -1,2 +1,77 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
var k = (e) => {
|
|
2
|
+
throw TypeError(e);
|
|
3
|
+
};
|
|
4
|
+
var z = (e, a, i) => a.has(e) || k("Cannot " + i);
|
|
5
|
+
var d = (e, a, i) => (z(e, a, "read from private field"), i ? i.call(e) : a.get(e)), v = (e, a, i) => a.has(e) ? k("Cannot add the same private member more than once") : a instanceof WeakSet ? a.add(e) : a.set(e, i), m = (e, a, i, s) => (z(e, a, "write to private field"), s ? s.call(e, i) : a.set(e, i), i);
|
|
6
|
+
import { __esDecorate as y, __runInitializers as p } from "tslib";
|
|
7
|
+
import { SbbElement as T } from "@sbb-esta/lyne-elements/core/base-elements.js";
|
|
8
|
+
import { forceType as V } from "@sbb-esta/lyne-elements/core/decorators.js";
|
|
9
|
+
import { boxSizingStyles as H } from "@sbb-esta/lyne-elements/core/styles.js";
|
|
10
|
+
import { css as S, nothing as u, html as h } from "lit";
|
|
11
|
+
import { property as x } from "lit/decorators.js";
|
|
12
|
+
import { styleMap as _ } from "lit/directives/style-map.js";
|
|
13
|
+
const j = S`:host{--sbb-pearl-chain-position-color: var(--sbb-color-primary);--sbb-pearl-chain-bullet-size-start-end: .625rem;--sbb-pearl-chain-bullet-size-stop: .5rem;--sbb-pearl-chain-bullet-color: var(--sbb-background-color-3-inverted);--sbb-pearl-chain-bullet-color-past: var(--sbb-color-metal);--sbb-pearl-chain-bullet-color-past: light-dark(var(--sbb-color-metal), var(--sbb-color-granite));--sbb-pearl-chain-bullet-color-irrelevant: var(--sbb-color-metal);--sbb-pearl-chain-bullet-color-irrelevant: light-dark( var(--sbb-color-metal), var(--sbb-color-granite) );--sbb-pearl-chain-bullet-color-disruption: var(--sbb-color-error);--sbb-pearl-chain-bullet-border-width: var(--sbb-border-width-2x);--sbb-pearl-chain-bullet-animation-duration: 1.92s;--sbb-pearl-chain-bullet-animation-easing: ease-out;--sbb-pearl-chain-bullet-crossed-width: .88375rem;--sbb-pearl-chain-bullet-crossed-height: .21875rem;--sbb-pearl-chain-bullet-crossed-border-width: .09375rem;display:table-row;position:relative;--sbb-pearl-chain-vertical-right-item-width: 100%;--sbb-pearl-chain-vertical-middle-item-min-width: var(--sbb-pearl-chain-bullet-size-start-end);--sbb-pearl-chain-vertical-item-border-width: var(--sbb-border-width-2x);--sbb-pearl-chain-vertical-item-border-width-thin: var(--sbb-border-width-1x);--sbb-pearl-chain-vertical-item-spacing-small: var(--sbb-spacing-fixed-1x);--sbb-pearl-chain-vertical-item-color-default: var(--sbb-pearl-chain-bullet-color);--sbb-pearl-chain-vertical-item-color-disruption: var(--sbb-pearl-chain-bullet-color-disruption);--sbb-pearl-chain-vertical-item-color-past: var(--sbb-pearl-chain-bullet-color-past);--sbb-pearl-chain-vertical-item-color-walk: var(--sbb-color-sky);--sbb-pearl-chain-vertical-item-inline-start: 50%;--sbb-pearl-chain-vertical-item-transform: translateX(-50%)}slot[name=right],.sbb-pearl-chain-vertical-item__column{display:table-cell;position:relative;vertical-align:top}slot[name=right]{width:var(--sbb-pearl-chain-vertical-right-item-width)}.sbb-pearl-chain-vertical-item__column--middle{min-width:var(--sbb-pearl-chain-vertical-middle-item-min-width, --sbb-pearl-chain-vertical-middle-min-width)}slot[name=left]::slotted(*){margin-block-start:var(--sbb-pearl-chain-vertical-left-item-block-start);padding-inline-end:var(--sbb-pearl-chain-vertical-left-item-inline-end)}slot[name=right]::slotted(*){margin-block-start:var(--sbb-pearl-chain-vertical-right-item-block-start);padding-inline-start:var(--sbb-pearl-chain-vertical-right-item-inline-start)}.sbb-pearl-chain-vertical-item__middle{vertical-align:top;border-spacing:0}.sbb-pearl-chain-vertical-item__line{position:absolute;bottom:0;inset-inline-start:var(--sbb-pearl-chain-vertical-item-inline-start);transform:var(--sbb-pearl-chain-vertical-item-transform);width:var(--sbb-border-width-2x);inset-block-start:calc(var(--sbb-pearl-chain-bullet-size-start-end) / 2)}.sbb-pearl-chain-vertical-item__line:after{content:"";position:absolute;inset-inline-start:0;inset-block-start:0;height:var(--sbb-pearl-chain-vertical-item-leg-status);width:var(--sbb-pearl-chain-vertical-item-border-width);background-color:var(--sbb-pearl-chain-vertical-item-color-past)}@media(forced-colors:active){.sbb-pearl-chain-vertical-item__line:after{--sbb-pearl-chain-vertical-item-color-past: GrayText}}.sbb-pearl-chain-vertical-item__line--dotted{background-color:unset;border-color:unset;background-image:linear-gradient(to bottom,currentcolor 0%,currentcolor 50%,Canvas 50%);background-repeat:repeat-y;background-size:calc(2 * var(--sbb-pearl-chain-vertical-item-spacing-small)) var(--sbb-pearl-chain-vertical-item-spacing-small)}@media(forced-colors:active){.sbb-pearl-chain-vertical-item__line--dotted{background-color:unset!important;border-inline-start:.0625rem dashed Highlight;transform:translateY(.0625rem)}}.sbb-pearl-chain-vertical-item__line--thin{width:var(--sbb-pearl-chain-vertical-item-border-width-thin)}.sbb-pearl-chain-vertical-item__line--default{background-color:var(--sbb-pearl-chain-vertical-item-color-default);border-color:var(--sbb-pearl-chain-vertical-item-color-default);color:var(--sbb-pearl-chain-vertical-item-color-default)}@media(forced-colors:active){.sbb-pearl-chain-vertical-item__line--default{--sbb-pearl-chain-vertical-item-color-default: CanvasText}}.sbb-pearl-chain-vertical-item__line--disruption{border-color:var(--sbb-pearl-chain-vertical-item-color-disruption);background-color:var(--sbb-pearl-chain-vertical-item-color-disruption);color:var(--sbb-pearl-chain-vertical-item-color-disruption)}@media(forced-colors:active){.sbb-pearl-chain-vertical-item__line--disruption{--sbb-pearl-chain-vertical-item-color-disruption: Highlight}}.sbb-pearl-chain-vertical-item__line--past{border-color:var(--sbb-pearl-chain-vertical-item-color-past);background-color:var(--sbb-pearl-chain-vertical-item-color-past);color:var(--sbb-pearl-chain-vertical-item-color-past)}@media(forced-colors:active){.sbb-pearl-chain-vertical-item__line--past{--sbb-pearl-chain-vertical-item-color-past: GrayText}}.sbb-pearl-chain-vertical-item__line--walk{border-color:var(--sbb-pearl-chain-vertical-item-color-walk);background-color:var(--sbb-pearl-chain-vertical-item-color-walk);color:var(--sbb-pearl-chain-vertical-item-color-walk)}.sbb-pearl-chain-vertical-item__bullet{position:relative;inset-inline-start:var(--sbb-pearl-chain-vertical-item-inline-start);transform:var(--sbb-pearl-chain-vertical-item-transform);background:var(--sbb-pearl-chain-bullet-color);color:var(--sbb-pearl-chain-bullet-color);border-color:var(--sbb-pearl-chain-bullet-color);border-radius:100%}@media(forced-colors:active){.sbb-pearl-chain-vertical-item__bullet{--sbb-pearl-chain-bullet-color: CanvasText}}.sbb-pearl-chain-vertical-item__bullet--start-end{min-height:var(--sbb-pearl-chain-bullet-size-start-end);min-width:var(--sbb-pearl-chain-bullet-size-start-end);height:var(--sbb-pearl-chain-bullet-size-start-end);width:var(--sbb-pearl-chain-bullet-size-start-end)}.sbb-pearl-chain-vertical-item__bullet--stop{min-height:var(--sbb-pearl-chain-bullet-size-stop);min-width:var(--sbb-pearl-chain-bullet-size-stop);height:var(--sbb-pearl-chain-bullet-size-stop);width:var(--sbb-pearl-chain-bullet-size-stop);border:var(--sbb-pearl-chain-bullet-border-width) solid currentcolor;background:Canvas}.sbb-pearl-chain-vertical-item__bullet--disruption{--sbb-pearl-chain-bullet-color: var(--sbb-pearl-chain-bullet-color-disruption)}@media(forced-colors:active){.sbb-pearl-chain-vertical-item__bullet--disruption{--sbb-pearl-chain-bullet-color: Highlight}}.sbb-pearl-chain-vertical-item__bullet--irrelevant,.sbb-pearl-chain-vertical-item__bullet--past{--sbb-pearl-chain-bullet-color: var(--sbb-pearl-chain-bullet-color-past)}@media(forced-colors:active){.sbb-pearl-chain-vertical-item__bullet--irrelevant,.sbb-pearl-chain-vertical-item__bullet--past{--sbb-pearl-chain-bullet-color: GrayText !important}}.sbb-pearl-chain-vertical-item__bullet--stop.sbb-pearl-chain-vertical-item__bullet--irrelevant{--sbb-pearl-chain-bullet-border-width: var(--sbb-border-width-1x);min-height:var(--sbb-pearl-chain-bullet-size-stop);min-width:var(--sbb-pearl-chain-bullet-size-stop);height:var(--sbb-pearl-chain-bullet-size-stop);width:var(--sbb-pearl-chain-bullet-size-stop);border:var(--sbb-pearl-chain-bullet-border-width) solid currentcolor;background:Canvas}.sbb-pearl-chain-vertical-item__bullet--start-end.sbb-pearl-chain-vertical-item__bullet--skipped{border:var(--sbb-pearl-chain-bullet-border-width) solid currentcolor;background:Canvas}.sbb-pearl-chain-vertical-item__bullet--start-end.sbb-pearl-chain-vertical-item__bullet--skipped:before{content:"";position:absolute;inset-block-start:50%;inset-inline-start:50%;transform:translate(-50%,-50%) rotate(45deg);border-block-start:var(--sbb-pearl-chain-bullet-crossed-border-width) solid canvas;background:var(--sbb-pearl-chain-bullet-color-disruption);height:var(--sbb-pearl-chain-bullet-crossed-height);width:var(--sbb-pearl-chain-bullet-crossed-width)}@media(forced-colors:active){.sbb-pearl-chain-vertical-item__bullet--start-end.sbb-pearl-chain-vertical-item__bullet--skipped:before{background:Highlight}}.sbb-pearl-chain-vertical-item__bullet--stop.sbb-pearl-chain-vertical-item__bullet--skipped{--sbb-pearl-chain-bullet-crossed-width: .706875rem;--sbb-pearl-chain-bullet-crossed-height: .1875rem;min-height:var(--sbb-pearl-chain-bullet-size-stop);min-width:var(--sbb-pearl-chain-bullet-size-stop);height:var(--sbb-pearl-chain-bullet-size-stop);width:var(--sbb-pearl-chain-bullet-size-stop);border:var(--sbb-pearl-chain-bullet-border-width) solid currentcolor;background:Canvas}.sbb-pearl-chain-vertical-item__bullet--stop.sbb-pearl-chain-vertical-item__bullet--skipped:before{content:"";position:absolute;inset-block-start:50%;inset-inline-start:50%;transform:translate(-50%,-50%) rotate(45deg);border-block-start:var(--sbb-pearl-chain-bullet-crossed-border-width) solid canvas;background:var(--sbb-pearl-chain-bullet-color-disruption);height:var(--sbb-pearl-chain-bullet-crossed-height);width:var(--sbb-pearl-chain-bullet-crossed-width)}@media(forced-colors:active){.sbb-pearl-chain-vertical-item__bullet--stop.sbb-pearl-chain-vertical-item__bullet--skipped:before{background:Highlight}}.sbb-pearl-chain-vertical-item__bullet--position{inset-block-start:var(--sbb-pearl-chain-vertical-item-position);position:absolute;left:50%;transform:translate(-50%);min-height:var(--sbb-pearl-chain-bullet-size-start-end);min-width:var(--sbb-pearl-chain-bullet-size-start-end);height:var(--sbb-pearl-chain-bullet-size-start-end);width:var(--sbb-pearl-chain-bullet-size-start-end);background:var(--sbb-pearl-chain-bullet-color);color:var(--sbb-pearl-chain-bullet-color);border-color:var(--sbb-pearl-chain-bullet-color);border-radius:100%}@media(forced-colors:active){.sbb-pearl-chain-vertical-item__bullet--position{--sbb-pearl-chain-bullet-color: CanvasText}}.sbb-pearl-chain-vertical-item__bullet--position{--sbb-pearl-chain-bullet-color: var(--sbb-pearl-chain-position-color)}@media(forced-colors:active){.sbb-pearl-chain-vertical-item__bullet--position{--sbb-pearl-chain-position-color: Highlight}}@keyframes pearl-chain-bullet-position-pulse{0%{box-shadow:0 0 0 0 var(--sbb-pearl-chain-position-color)}25%{box-shadow:0 0 0 0 var(--sbb-pearl-chain-position-color)}50%{box-shadow:0 0 0 .1875rem color-mix(in srgb,var(--sbb-pearl-chain-position-color) 20%,transparent)}to{box-shadow:0 0 0 0 var(--sbb-pearl-chain-position-color)}}.sbb-pearl-chain-vertical-item__bullet--position{animation:pearl-chain-bullet-position-pulse var(--sbb-pearl-chain-bullet-animation-duration) var(--sbb-pearl-chain-bullet-animation-easing) infinite}:host([disable-animation]) .sbb-pearl-chain-vertical-item__bullet--position{animation:unset!important}`;
|
|
14
|
+
let q = (() => {
|
|
15
|
+
var c, o, l;
|
|
16
|
+
let e = T, a, i = [], s = [], g, f = [], w = [];
|
|
17
|
+
return l = class extends e {
|
|
18
|
+
constructor() {
|
|
19
|
+
super(...arguments);
|
|
20
|
+
v(this, c, p(this, i, null));
|
|
21
|
+
v(this, o, (p(this, s), p(this, f, !1)));
|
|
22
|
+
p(this, w);
|
|
23
|
+
}
|
|
24
|
+
/** The pearlChainVerticalItemAttributes Prop for styling the bullets and line.*/
|
|
25
|
+
get pearlChainVerticalItemAttributes() {
|
|
26
|
+
return d(this, c);
|
|
27
|
+
}
|
|
28
|
+
set pearlChainVerticalItemAttributes(r) {
|
|
29
|
+
m(this, c, r);
|
|
30
|
+
}
|
|
31
|
+
/** If true, the position won't be animated. */
|
|
32
|
+
get disableAnimation() {
|
|
33
|
+
return d(this, o);
|
|
34
|
+
}
|
|
35
|
+
set disableAnimation(r) {
|
|
36
|
+
m(this, o, r);
|
|
37
|
+
}
|
|
38
|
+
render() {
|
|
39
|
+
const { bulletType: r, lineType: t, lineColor: n, hideLine: A, minHeight: C, bulletSize: $, position: b } = this.pearlChainVerticalItemAttributes || {}, I = b && b > 0 && b <= 100 ? "sbb-pearl-chain-vertical-item__bullet--past" : `sbb-pearl-chain-vertical-item__bullet--${r}`;
|
|
40
|
+
return h`
|
|
41
|
+
<div
|
|
42
|
+
class="sbb-pearl-chain-vertical-item__column"
|
|
43
|
+
style=${_({ height: `${C}px` })}
|
|
44
|
+
>
|
|
45
|
+
<slot name="left"></slot>
|
|
46
|
+
</div>
|
|
47
|
+
<div
|
|
48
|
+
aria-hidden="true"
|
|
49
|
+
class="sbb-pearl-chain-vertical-item__column sbb-pearl-chain-vertical-item__column--middle"
|
|
50
|
+
>
|
|
51
|
+
${A ? u : h`<div
|
|
52
|
+
style=${_({ "--sbb-pearl-chain-vertical-item-leg-status": `${b}%` })}
|
|
53
|
+
class="sbb-pearl-chain-vertical-item__line sbb-pearl-chain-vertical-item__line--${t} sbb-pearl-chain-vertical-item__line--${n}"
|
|
54
|
+
></div>`}
|
|
55
|
+
${r ? h`<div
|
|
56
|
+
class="sbb-pearl-chain-vertical-item__bullet sbb-pearl-chain-vertical-item__bullet--${$} ${I}"
|
|
57
|
+
></div>` : u}
|
|
58
|
+
${b && b > 0 ? h`<div
|
|
59
|
+
style=${_({ "--sbb-pearl-chain-vertical-item-position": `${b}%` })}
|
|
60
|
+
class="sbb-pearl-chain-vertical-item__bullet--position"
|
|
61
|
+
></div>` : u}
|
|
62
|
+
</div>
|
|
63
|
+
<slot name="right"></slot>
|
|
64
|
+
`;
|
|
65
|
+
}
|
|
66
|
+
}, c = new WeakMap(), o = new WeakMap(), (() => {
|
|
67
|
+
const r = typeof Symbol == "function" && Symbol.metadata ? Object.create(e[Symbol.metadata] ?? null) : void 0;
|
|
68
|
+
a = [x({ attribute: "pearl-chain-vertical-item-attributes", type: Object })], g = [V(), x({ attribute: "disable-animation", reflect: !0, type: Boolean })], y(l, null, a, { kind: "accessor", name: "pearlChainVerticalItemAttributes", static: !1, private: !1, access: { has: (t) => "pearlChainVerticalItemAttributes" in t, get: (t) => t.pearlChainVerticalItemAttributes, set: (t, n) => {
|
|
69
|
+
t.pearlChainVerticalItemAttributes = n;
|
|
70
|
+
} }, metadata: r }, i, s), y(l, null, g, { kind: "accessor", name: "disableAnimation", static: !1, private: !1, access: { has: (t) => "disableAnimation" in t, get: (t) => t.disableAnimation, set: (t, n) => {
|
|
71
|
+
t.disableAnimation = n;
|
|
72
|
+
} }, metadata: r }, f, w), r && Object.defineProperty(l, Symbol.metadata, { enumerable: !0, configurable: !0, writable: !0, value: r });
|
|
73
|
+
})(), l.elementName = "sbb-pearl-chain-vertical-item", l.styles = [H, j], l;
|
|
74
|
+
})();
|
|
75
|
+
export {
|
|
76
|
+
q as SbbPearlChainVerticalItemElement
|
|
77
|
+
};
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import "./pearl-chain-vertical-item.pure.js";
|
|
3
|
-
//#region src/elements-experimental/pearl-chain-vertical-item.ts
|
|
1
|
+
import { SbbPearlChainVerticalItemElement as e } from "./pearl-chain-vertical-item/pearl-chain-vertical-item.component.js";
|
|
4
2
|
e.define();
|
|
5
|
-
|
|
6
|
-
|
|
3
|
+
export {
|
|
4
|
+
e as SbbPearlChainVerticalItemElement
|
|
5
|
+
};
|
|
@@ -1,2 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export {
|
|
1
|
+
import { SbbPearlChainVerticalItemElement as t } from "./pearl-chain-vertical-item/pearl-chain-vertical-item.component.js";
|
|
2
|
+
export {
|
|
3
|
+
t as SbbPearlChainVerticalItemElement
|
|
4
|
+
};
|
package/pearl-chain-vertical.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import "./pearl-chain-vertical.pure.js";
|
|
3
|
-
//#region src/elements-experimental/pearl-chain-vertical.ts
|
|
1
|
+
import { SbbPearlChainVerticalElement as e } from "./pearl-chain-vertical/pearl-chain-vertical.component.js";
|
|
4
2
|
e.define();
|
|
5
|
-
|
|
6
|
-
|
|
3
|
+
export {
|
|
4
|
+
e as SbbPearlChainVerticalElement
|
|
5
|
+
};
|
|
@@ -1,2 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export {
|
|
1
|
+
import { SbbPearlChainVerticalElement as a } from "./pearl-chain-vertical/pearl-chain-vertical.component.js";
|
|
2
|
+
export {
|
|
3
|
+
a as SbbPearlChainVerticalElement
|
|
4
|
+
};
|
package/pearl-chain.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import "./pearl-chain.pure.js";
|
|
3
|
-
//#region src/elements-experimental/pearl-chain.ts
|
|
1
|
+
import { SbbPearlChainElement as e } from "./pearl-chain/pearl-chain.component.js";
|
|
4
2
|
e.define();
|
|
5
|
-
|
|
6
|
-
|
|
3
|
+
export {
|
|
4
|
+
e as SbbPearlChainElement
|
|
5
|
+
};
|
package/pearl-chain.pure.js
CHANGED
|
@@ -1,72 +1,72 @@
|
|
|
1
|
-
import { svgs as
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
1
|
+
import { svgs as a } from "../svgs.js";
|
|
2
|
+
const E = {
|
|
3
|
+
BICYCLE: { svgName: "sa-vo" },
|
|
4
|
+
BICYCLE_HIGH: { svgName: "sa-vo" },
|
|
5
|
+
BICYCLE_HIGH_ICON: { svgName: "sa-vo" },
|
|
6
|
+
BICYCLE_ICON: { svgName: "sa-vo" },
|
|
7
|
+
BICYCLE_LOW: { svgName: "sa-vo" },
|
|
8
|
+
BICYCLE_LOW_ICON: { svgName: "sa-vo" },
|
|
9
|
+
BICYCLE_MIDDLE: { svgName: "sa-vo" },
|
|
10
|
+
BICYCLE_MIDDLE_ICON: { svgName: "sa-vo" },
|
|
11
|
+
BISTRO: { svgName: "sa-mi" },
|
|
12
|
+
BISTRO_ICON: { svgName: "sa-mi" },
|
|
13
|
+
BUSINESS: { svgName: "sa-bz" },
|
|
14
|
+
BUSINESS_COMFORT: { svgName: "sa-bz" },
|
|
15
|
+
BUSINESS_ICON: { svgName: "sa-bz" },
|
|
16
|
+
COACH_BORDER_MIDDLE: { svg: a.chassisRowMiddle },
|
|
17
|
+
COACH_WALL_NO_PASSAGE: { svg: a.chassisRowOuter },
|
|
18
|
+
COACH_PASSAGE: { svg: a.chassisPassageWaggonTopLeft },
|
|
19
|
+
COMPARTMENT_PASSAGE: { svg: a.chassisPassageCompartmentMiddle },
|
|
20
|
+
COMPARTMENT_PASSAGE_HIGH: { svg: a.chassisPassageCompartmentLeftTop },
|
|
21
|
+
COMPARTMENT_PASSAGE_LOW: { svg: a.chassisPassageCompartmentRightBottom },
|
|
22
|
+
COMPARTMENT_WALL: { svg: a.chassisSeparator },
|
|
23
|
+
DRIVER_AREA: { svg: a.chassisDriverTrain },
|
|
24
|
+
DRIVER_AREA_BUS: { svg: a.chassisDriverBus },
|
|
25
|
+
DRIVER_AREA_TRAIN: { svg: a.chassisDriverTrainFull },
|
|
26
|
+
DRIVER_AREA_NO_VERTICAL_WALL: { svg: a.chassisDriverTrain },
|
|
27
|
+
EASY_ACCESS: { svgName: "sa-em" },
|
|
28
|
+
EASY_ACCESS_AREA: { svgName: "sa-em" },
|
|
29
|
+
EASY_ACCESS_ICON: { svgName: "sa-em" },
|
|
30
|
+
ENTRY_EXIT: { svg: a.layoutEntrance },
|
|
31
|
+
FAMILY: { svgName: "sa-fa" },
|
|
32
|
+
LUGGAGE_AREA: { svgName: "sa-ga" },
|
|
33
|
+
LUGGAGE_ICON: { svgName: "sa-ga" },
|
|
34
|
+
MULTI_FUNCTION_AREA: { svgName: "sa-mf" },
|
|
35
|
+
MULTI_FUNCTION_ICON: { svgName: "sa-mf" },
|
|
36
|
+
PLACE_BICYCLE_ALLOCATED: { svg: a.interiorPlaceBikeUnavailable },
|
|
37
|
+
PLACE_BICYCLE_FREE: { svg: a.interiorPlaceBikeDefault },
|
|
38
|
+
PLACE_BICYCLE_RESTRICTED: { svg: a.interiorPlaceBikeNotBookable },
|
|
39
|
+
PLACE_BICYCLE_SELECTED: { svg: a.interiorPlaceBikeSelected },
|
|
40
|
+
PLACE_SEAT_ALLOCATED: { svg: a.interiorPlaceSeatUnavailable },
|
|
41
|
+
PLACE_SEAT_FREE: { svg: a.interiorPlaceSeatDefault },
|
|
42
|
+
PLACE_SEAT_RESTRICTED: { svg: a.interiorPlaceSeatNotBookable },
|
|
43
|
+
PLACE_SEAT_SELECTED: { svg: a.interiorPlaceSeatSelected },
|
|
44
|
+
PLAYGROUND_AREA: { svgName: "sa-fa" },
|
|
45
|
+
PLAYGROUND_ICON: { svgName: "sa-fa" },
|
|
46
|
+
PRAM: { svgName: "sa-abteilkinderwagen" },
|
|
47
|
+
PRAM_AREA: { svgName: "sa-abteilkinderwagen" },
|
|
48
|
+
PRAM_ICON: { svgName: "sa-abteilkinderwagen" },
|
|
49
|
+
RESTAURANT: { svgName: "sa-wr" },
|
|
50
|
+
RESTAURANT_AREA: { svgName: "sa-wr" },
|
|
51
|
+
RESTAURANT_ICON: { svgName: "sa-wr" },
|
|
52
|
+
SILENCE: { svgName: "sa-rz" },
|
|
53
|
+
SILENCE_AREA_ICON: { svgName: "sa-rz" },
|
|
54
|
+
SILENCE_ICON: { svgName: "sa-rz" },
|
|
55
|
+
SKI_AREA: { svgName: "sa-sa" },
|
|
56
|
+
SKI_ICON: { svgName: "sa-sa" },
|
|
57
|
+
STAFF_AREA: { svgName: "avatar-train-staff-medium" },
|
|
58
|
+
STAIR_AREA: { svgName: "sa-ac" },
|
|
59
|
+
TOILET_AREA: { svgName: "sa-wc" },
|
|
60
|
+
TOILET_ICON: { svgName: "sa-wc" },
|
|
61
|
+
TOILET_WHEELCHAIR_AREA: { svgName: "sa-rw" },
|
|
62
|
+
TOILET_WHEELCHAIR_ICON: { svgName: "sa-rw" },
|
|
63
|
+
WARDROBE_AREA: { svgName: "sa-ka" },
|
|
64
|
+
WHEELCHAIR: { svgName: "sa-rs" },
|
|
65
|
+
WHEELCHAIR_AND_SEAT: { svgName: "sa-rs" },
|
|
66
|
+
WHEELCHAIR_ICON: { svgName: "sa-rs" },
|
|
67
|
+
WHEELCHAIR_NO_SEAT: { svgName: "sa-rn" },
|
|
68
|
+
WIFI: { svgName: "sa-wv" }
|
|
69
|
+
};
|
|
70
|
+
export {
|
|
71
|
+
E as mapIconToSvg
|
|
70
72
|
};
|
|
71
|
-
//#endregion
|
|
72
|
-
export { t as mapIconToSvg };
|
|
@@ -1,97 +1,91 @@
|
|
|
1
|
-
import { MOCK_COACHES_RAW_BUS as
|
|
2
|
-
import { MOCK_COACHE_RAW_DECK_LOWER as
|
|
3
|
-
import { MOCK_COACHES_RAW_TRAIN as
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
return i === null ? a === "LOWER_DECK" ? t : a === "UPPER_DECK" ? n : r : i === "TRAIN" ? r : e;
|
|
1
|
+
import { MOCK_COACHES_RAW_BUS as u } from "./sample-data/seat-reservation-sample-data-bus.js";
|
|
2
|
+
import { MOCK_COACHE_RAW_DECK_LOWER as y, MOCK_COACHE_RAW_DECK_UPPPER as g } from "./sample-data/seat-reservation-sample-data-decks.js";
|
|
3
|
+
import { MOCK_COACHES_RAW_TRAIN as d } from "./sample-data/seat-reservation-sample-data-train.js";
|
|
4
|
+
function E(e, n) {
|
|
5
|
+
return e !== null ? e === "TRAIN" ? d : u : n === "LOWER_DECK" ? y : n === "UPPER_DECK" ? g : d;
|
|
7
6
|
}
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
propertyIds: e.propertyIds || []
|
|
87
|
-
}), c = (e, t, n) => ({
|
|
88
|
-
coachId: t.id,
|
|
89
|
-
coachNumber: t.number,
|
|
90
|
-
coachIndex: e,
|
|
91
|
-
coachType: t?.type,
|
|
92
|
-
coachTravelClass: t?.travelClass,
|
|
93
|
-
coachPropertyIds: t?.propertyIds,
|
|
94
|
-
coachNumberOfFreePlaces: n
|
|
7
|
+
const I = (e, n = null) => {
|
|
8
|
+
const i = E(e, n), s = n === "LOWER_DECK" ? 1 : 0, a = i.map((C) => {
|
|
9
|
+
const r = C?.coachDeckLayout, c = [], m = [], p = r.placeGroups.map((t) => (c.indexOf(t.travelClass) === -1 && c.push(t.travelClass), m.indexOf(t.accommodationSubType) === -1 && m.push(t.accommodationSubType), t.places?.map((o) => ({
|
|
10
|
+
number: o?.number,
|
|
11
|
+
state: o?.state,
|
|
12
|
+
type: t.accommodationSubType.indexOf("BICYCLE") === -1 ? "SEAT" : "BICYCLE",
|
|
13
|
+
dimension: { w: o.rectangle.dimension.width, h: o.rectangle.dimension.height },
|
|
14
|
+
position: {
|
|
15
|
+
x: o.rectangle.position.x,
|
|
16
|
+
y: o.rectangle.position.y,
|
|
17
|
+
z: o.rectangle.position.z
|
|
18
|
+
},
|
|
19
|
+
rotation: o?.orientation || 0,
|
|
20
|
+
travelClass: t?.travelClass,
|
|
21
|
+
propertyIds: o.placeProperties || []
|
|
22
|
+
})))).flat(), l = r.serviceIcons.map((t) => ({
|
|
23
|
+
icon: t.type,
|
|
24
|
+
position: {
|
|
25
|
+
x: t.rectangle.position.x,
|
|
26
|
+
y: t.rectangle.position.y,
|
|
27
|
+
z: t.rectangle.position.z
|
|
28
|
+
},
|
|
29
|
+
dimension: {
|
|
30
|
+
w: t.rectangle.dimension.width,
|
|
31
|
+
h: t.rectangle.dimension.height
|
|
32
|
+
}
|
|
33
|
+
})), h = r.graphicElements.map((t) => ({
|
|
34
|
+
icon: t?.type,
|
|
35
|
+
position: {
|
|
36
|
+
x: t.rectangle.position.x,
|
|
37
|
+
y: t.rectangle.position.y,
|
|
38
|
+
z: t.rectangle.position.z
|
|
39
|
+
},
|
|
40
|
+
dimension: { w: t.rectangle.dimension.width, h: t.rectangle.dimension.height },
|
|
41
|
+
rotation: t.orientation
|
|
42
|
+
}));
|
|
43
|
+
return {
|
|
44
|
+
id: r?.id,
|
|
45
|
+
number: r?.name,
|
|
46
|
+
dimension: { w: r.dimension?.width, h: r.dimension?.height },
|
|
47
|
+
places: p,
|
|
48
|
+
serviceElements: l,
|
|
49
|
+
graphicElements: h,
|
|
50
|
+
travelClass: c,
|
|
51
|
+
propertyIds: m
|
|
52
|
+
};
|
|
53
|
+
});
|
|
54
|
+
return {
|
|
55
|
+
vehicleType: e || "TRAIN",
|
|
56
|
+
deckCoachIndex: s,
|
|
57
|
+
deckCoachLevel: "SINGLE_DECK",
|
|
58
|
+
coachItems: a
|
|
59
|
+
};
|
|
60
|
+
}, f = (e, n, i, s) => ({
|
|
61
|
+
id: n,
|
|
62
|
+
number: e.number,
|
|
63
|
+
deckIndex: i,
|
|
64
|
+
coachIndex: s,
|
|
65
|
+
state: e.state,
|
|
66
|
+
placeType: e.type
|
|
67
|
+
}), O = (e, n, i, s, a) => ({
|
|
68
|
+
id: i,
|
|
69
|
+
coachId: n.id,
|
|
70
|
+
coachNumber: n.number,
|
|
71
|
+
coachIndex: a,
|
|
72
|
+
deckIndex: s,
|
|
73
|
+
placeNumber: e.number,
|
|
74
|
+
placeType: e.type,
|
|
75
|
+
placeTravelClass: e.travelClass || "ANY_CLASS",
|
|
76
|
+
propertyIds: e.propertyIds || []
|
|
77
|
+
}), R = (e, n, i) => ({
|
|
78
|
+
coachId: n.id,
|
|
79
|
+
coachNumber: n.number,
|
|
80
|
+
coachIndex: e,
|
|
81
|
+
coachType: n?.type,
|
|
82
|
+
coachTravelClass: n?.travelClass,
|
|
83
|
+
coachPropertyIds: n?.propertyIds,
|
|
84
|
+
coachNumberOfFreePlaces: i
|
|
95
85
|
});
|
|
96
|
-
|
|
97
|
-
|
|
86
|
+
export {
|
|
87
|
+
R as mapCoachInfosToCoachSelection,
|
|
88
|
+
O as mapPlaceAndCoachToSeatReservationPlaceSelection,
|
|
89
|
+
f as mapPlaceInfosToPlaceSelection,
|
|
90
|
+
I as mapRawDataToSeatReservation
|
|
91
|
+
};
|