@sbb-esta/lyne-elements-experimental-dev 4.7.0-dev.1773388997 → 4.7.0-dev.1773396173
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/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,427 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
var Te = (t) => {
|
|
2
|
+
throw TypeError(t);
|
|
3
|
+
};
|
|
4
|
+
var Ae = (t, i, s) => i.has(t) || Te("Cannot " + s);
|
|
5
|
+
var _ = (t, i, s) => (Ae(t, i, "read from private field"), s ? s.call(t) : i.get(t)), f = (t, i, s) => i.has(t) ? Te("Cannot add the same private member more than once") : i instanceof WeakSet ? i.add(t) : i.set(t, s), n = (t, i, s, d) => (Ae(t, i, "write to private field"), d ? d.call(t, s) : i.set(t, s), s);
|
|
6
|
+
import { __runInitializers as o, __esDecorate as y } from "tslib";
|
|
7
|
+
import { SbbElement as at } from "@sbb-esta/lyne-elements/core/base-elements.js";
|
|
8
|
+
import { SbbLanguageController as it } from "@sbb-esta/lyne-elements/core/controllers.js";
|
|
9
|
+
import { defaultDateAdapter as Ce } from "@sbb-esta/lyne-elements/core/datetime.js";
|
|
10
|
+
import { forceType as S } from "@sbb-esta/lyne-elements/core/decorators.js";
|
|
11
|
+
import { setOrRemoveAttribute as st } from "@sbb-esta/lyne-elements/core/dom.js";
|
|
12
|
+
import { i18nFromPlatform as rt, i18nDeparture as ke, i18nMeansOfTransport as J, i18nDirection as Ne, i18nRealTimeInfo as Se, i18nSupersaver as Ie, i18nTransferProcedures as nt, i18nTransferProcedure as ot, i18nArrival as lt, i18nClass as ze, i18nOccupancy as Le, i18nTravelhints as ct, i18nTripDuration as Me, i18nNew as Oe, i18nTripQuayChange as dt } from "@sbb-esta/lyne-elements/core/i18n.js";
|
|
13
|
+
import { boxSizingStyles as bt } from "@sbb-esta/lyne-elements/core/styles.js";
|
|
14
|
+
import { css as gt, nothing as g, html as l } from "lit";
|
|
15
|
+
import { property as v } from "lit/decorators.js";
|
|
16
|
+
import { removeTimezoneFromISOTimeString as Pe, durationToTime as Fe } from "../core/datetime.js";
|
|
17
|
+
import { isRideLeg as Ee, getDepartureArrivalTimeAttribute as pt } from "../core/timetable.js";
|
|
18
|
+
import "@sbb-esta/lyne-elements/card.js";
|
|
19
|
+
import "@sbb-esta/lyne-elements/icon.js";
|
|
20
|
+
import "@sbb-esta/lyne-elements/timetable-occupancy.js";
|
|
21
|
+
import "../pearl-chain-time.js";
|
|
22
|
+
import { f as Re } from "../format-CmKROkbc.js";
|
|
23
|
+
const ht = gt`:host{--sbb-timetable-row-gap: var(--sbb-spacing-fixed-2x);--sbb-timetable-row-height: 1.5625rem;--sbb-timetable-row-height-header: 1.25rem;--sbb-timetable-row-height-footer: 1rem;--sbb-timetable-row-skeleton-pulse-duration: 1.8s;display:block}:host([disable-animation]){--sbb-timetable-row-skeleton-pulse-duration: 0}.sbb-timetable__row-transport-icon{--sbb-icon-svg-width: 1.25rem;--sbb-icon-svg-height: 1.25rem}.sbb-travel-hints__item{--sbb-icon-svg-height: .875rem}.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}.sbb-timetable__row--quay{margin-inline-end:var(--sbb-spacing-fixed-1x)}.sbb-timetable__row--quay-type{float:left}ul{list-style:none;margin:0;padding:0;font-size:inherit;display:inline-flex}li,.sbb-timetable__row-transport{display:inline-flex;align-self:center}.sbb-timetable__row-transportnumber,.sbb-timetable__row-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;line-height:unset;white-space:nowrap;align-self:center}.sbb-timetable__row{--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);display:flex;flex-direction:column;gap:var(--sbb-timetable-row-gap)}.sbb-timetable__row-header,.sbb-timetable__row-footer{animation:none}.sbb-timetable__row-header{display:flex;gap:var(--sbb-spacing-fixed-2x);align-items:center;line-height:var(--sbb-timetable-row-height-header)}.sbb-timetable__row-details,.sbb-timetable__row-hints{display:inline-flex;gap:var(--sbb-spacing-fixed-1x);align-items:center}.sbb-timetable__row-header p{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;margin:0;align-self:center}.sbb-timetable__row-footer{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:center;gap:var(--sbb-spacing-fixed-2x);line-height:var(--sbb-timetable-row-height-footer)}.sbb-timetable__row-footer>span{align-self:center}.sbb-timetable__row-footer :only-child{margin-inline-start:auto}.sbb-timetable__row-quay--changed{color:var(--sbb-color-primary)}.sbb-timetable__row-transport-wrapper,.sbb-timetable__row-warning{display:inline-flex}.sbb-loading{pointer-events:none}.sbb-loading__wrapper{display:flex;flex-direction:column;gap:var(--sbb-spacing-fixed-2x)}.sbb-loading__row{width:100%;border-radius:var(--sbb-border-radius-1x);height:var(--sbb-timetable-row-height)}@media(min-width:64rem){.sbb-loading__row{height:1.75rem}}@media(forced-colors:active){.sbb-loading__row{border:var(--sbb-border-width-1x) solid ButtonBorder!important}}.sbb-loading__row,.sbb-loading__badge{background:var(--sbb-background-color-4);animation:skeleton-pulse var(--sbb-timetable-row-skeleton-pulse-duration) ease-out infinite}.sbb-loading__row:first-of-type{height:var(--sbb-timetable-row-height-header);width:50%}.sbb-loading__row:last-of-type{height:var(--sbb-timetable-row-height-footer)}.sbb-loading__badge{margin-inline:auto calc(var(--sbb-spacing-fixed-3x) * -1);padding-inline-end:var(--sbb-spacing-fixed-6x);border-end-start-radius:var(--sbb-card-badge-border-radius);transform:var(--sbb-card-badge-skew);width:7.1875rem;height:1.25rem}@keyframes skeleton-pulse{0%{background:var(--sbb-background-color-4)}17%{background:var(--sbb-background-color-4)}50%{background:var(--sbb-background-color-3)}67%{background:var(--sbb-background-color-3)}to{background:var(--sbb-background-color-4)}}`, ut = (t, i) => l`<span class="sbb-timetable__row-transport">
|
|
24
|
+
<sbb-icon name=${t}></sbb-icon>
|
|
25
|
+
<span class="sbb-screen-reader-only">${i}</span>
|
|
26
|
+
</span>`, mt = (t, i) => {
|
|
27
|
+
const s = ["M", "B", "T"].includes(t) ? " " : "";
|
|
28
|
+
return l`<span class="sbb-timetable__row-transportnumber">
|
|
29
|
+
${i !== null ? t + s + i : t}
|
|
30
|
+
</span>`;
|
|
31
|
+
}, qe = (t) => t?.find((i) => i.serviceJourney?.serviceAlteration?.reachableText)?.serviceJourney?.serviceAlteration?.reachableText, _t = (t) => t?.find((i) => i.serviceJourney?.serviceAlteration?.delayText)?.serviceJourney?.serviceAlteration?.delayText, De = (t) => t?.find((i) => !!i.serviceJourney?.serviceAlteration?.redirectedText)?.serviceJourney?.serviceAlteration?.redirectedText, Be = (t) => t?.find((i) => !!i.serviceJourney?.serviceAlteration?.unplannedStopPointsText)?.serviceJourney?.serviceAlteration?.unplannedStopPointsText, ft = (t) => {
|
|
32
|
+
const i = {
|
|
33
|
+
DISTURBANCE: 0,
|
|
34
|
+
INFORMATION: 1,
|
|
35
|
+
DELAY: 2,
|
|
36
|
+
TRAIN_REPLACEMENT_BY_BUS: 3,
|
|
37
|
+
CONSTRUCTION_SITE: 4,
|
|
38
|
+
END_MESSAGE: 5
|
|
39
|
+
};
|
|
40
|
+
return [...t].sort((s, d) => i[s.cause] - i[d.cause]);
|
|
41
|
+
}, yt = (t) => {
|
|
42
|
+
switch (t?.cause) {
|
|
43
|
+
case "DISTURBANCE":
|
|
44
|
+
return {
|
|
45
|
+
name: "disruption",
|
|
46
|
+
text: t?.broadcastMessages?.length ? t?.broadcastMessages[0].title : ""
|
|
47
|
+
};
|
|
48
|
+
case "INFORMATION":
|
|
49
|
+
return {
|
|
50
|
+
name: "info",
|
|
51
|
+
text: t?.broadcastMessages.length ? t?.broadcastMessages[0].title : ""
|
|
52
|
+
};
|
|
53
|
+
case "DELAY":
|
|
54
|
+
return {
|
|
55
|
+
name: "delay",
|
|
56
|
+
text: t?.broadcastMessages.length ? t?.broadcastMessages[0].title : ""
|
|
57
|
+
};
|
|
58
|
+
case "TRAIN_REPLACEMENT_BY_BUS":
|
|
59
|
+
return {
|
|
60
|
+
name: "replacementbus",
|
|
61
|
+
text: t?.broadcastMessages.length ? t?.broadcastMessages[0].title : ""
|
|
62
|
+
};
|
|
63
|
+
case "CONSTRUCTION_SITE":
|
|
64
|
+
return {
|
|
65
|
+
name: "construction",
|
|
66
|
+
text: t?.broadcastMessages.length ? t?.broadcastMessages[0].title : ""
|
|
67
|
+
};
|
|
68
|
+
default:
|
|
69
|
+
return {
|
|
70
|
+
name: "info",
|
|
71
|
+
text: t?.broadcastMessages.length ? t?.broadcastMessages[0].title : ""
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
}, vt = (t, i) => {
|
|
75
|
+
const { summary: s, legs: d } = t || {}, p = d?.filter((C) => Ee(C)), { tripStatus: u } = s || {};
|
|
76
|
+
if (u?.cancelled || u?.partiallyCancelled)
|
|
77
|
+
return { name: "cancellation", text: u?.cancelledText };
|
|
78
|
+
if (qe(p))
|
|
79
|
+
return { name: "missed-connection", text: qe(p) };
|
|
80
|
+
if (u?.alternative)
|
|
81
|
+
return { name: "alternative", text: u.alternativeText };
|
|
82
|
+
if (De(p))
|
|
83
|
+
return { name: "reroute", text: De(p) };
|
|
84
|
+
if (Be(p))
|
|
85
|
+
return { name: "add-stop", text: Be(p) };
|
|
86
|
+
if (u?.delayed || u?.delayedUnknown)
|
|
87
|
+
return { name: "delay", text: _t(p) };
|
|
88
|
+
if (u?.quayChanged) {
|
|
89
|
+
const C = p[0].departure;
|
|
90
|
+
return {
|
|
91
|
+
name: "platform-change",
|
|
92
|
+
text: C.quayChanged ? C.quayChangedText : dt[i]
|
|
93
|
+
};
|
|
94
|
+
}
|
|
95
|
+
return {};
|
|
96
|
+
}, xt = (t) => {
|
|
97
|
+
const i = ["RR", "RK", "RC", "RL", "RM", "RS", "RU", "XP", "XR", "XT"];
|
|
98
|
+
return t.reduce((s, d) => {
|
|
99
|
+
if (s)
|
|
100
|
+
return s;
|
|
101
|
+
if (i.includes(d.name))
|
|
102
|
+
return { ...d, name: "RR" };
|
|
103
|
+
}, void 0);
|
|
104
|
+
}, wt = (t) => {
|
|
105
|
+
const i = ["Z", "SB", "SZ", "VR", "TG"];
|
|
106
|
+
return t.filter((d, p) => t.findIndex((u) => u.name === d.name) === p).filter((d) => i.includes(d.name)).sort((d, p) => i.indexOf(d.name) - i.indexOf(p.name));
|
|
107
|
+
}, Y = (t) => {
|
|
108
|
+
const i = xt(t), s = wt(t);
|
|
109
|
+
return i === void 0 ? s : s.length ? s[0].name === "Z" && s[1] ? [s[0], i, s[1]].concat(s.slice(2)) : [i, ...s] : [i];
|
|
110
|
+
};
|
|
111
|
+
let Ut = (() => {
|
|
112
|
+
var I, z, L, M, O, P, F, R, q, D, c;
|
|
113
|
+
let t = at, i = [], s, d = [], p = [], u, C = [], X = [], Z, G = [], V = [], ee, te = [], ae = [], ie, se = [], re = [], ne, oe = [], le = [], ce, de = [], be = [], ge, pe = [], he = [], ue, me = [], _e = [], fe, ye = [], ve = [], xe;
|
|
114
|
+
return c = class extends t {
|
|
115
|
+
constructor() {
|
|
116
|
+
super(...arguments);
|
|
117
|
+
f(this, I);
|
|
118
|
+
f(this, z);
|
|
119
|
+
f(this, L);
|
|
120
|
+
f(this, M);
|
|
121
|
+
f(this, O);
|
|
122
|
+
f(this, P);
|
|
123
|
+
f(this, F);
|
|
124
|
+
f(this, R);
|
|
125
|
+
f(this, q);
|
|
126
|
+
f(this, D);
|
|
127
|
+
n(this, I, (o(this, i), o(this, d, null))), n(this, z, (o(this, p), o(this, C, null))), n(this, L, (o(this, X), o(this, G, !1))), n(this, M, (o(this, V), o(this, te, null))), n(this, O, (o(this, ae), o(this, se, !1))), n(this, P, (o(this, re), o(this, oe, !1))), n(this, F, (o(this, le), o(this, de, !1))), n(this, R, (o(this, be), o(this, pe, ""))), n(this, q, (o(this, he), o(this, me, !1))), n(this, D, (o(this, _e), o(this, ye, !1))), this._now = (o(this, ve), null), this._language = new it(this);
|
|
128
|
+
}
|
|
129
|
+
/** The trip Prop. */
|
|
130
|
+
get trip() {
|
|
131
|
+
return _(this, I);
|
|
132
|
+
}
|
|
133
|
+
set trip(a) {
|
|
134
|
+
n(this, I, a);
|
|
135
|
+
}
|
|
136
|
+
/** The price Prop, which consists of the data for the badge. */
|
|
137
|
+
get price() {
|
|
138
|
+
return _(this, z);
|
|
139
|
+
}
|
|
140
|
+
set price(a) {
|
|
141
|
+
n(this, z, a);
|
|
142
|
+
}
|
|
143
|
+
/** This will be forwarded to the sbb-pearl-chain component - if true the position won't be animated. */
|
|
144
|
+
get disableAnimation() {
|
|
145
|
+
return _(this, L);
|
|
146
|
+
}
|
|
147
|
+
set disableAnimation(a) {
|
|
148
|
+
n(this, L, a);
|
|
149
|
+
}
|
|
150
|
+
/** This will be forwarded to the notices section */
|
|
151
|
+
get boarding() {
|
|
152
|
+
return _(this, M);
|
|
153
|
+
}
|
|
154
|
+
set boarding(a) {
|
|
155
|
+
n(this, M, a);
|
|
156
|
+
}
|
|
157
|
+
/**
|
|
158
|
+
* The loading state -
|
|
159
|
+
* when this is true it will be render skeleton with an idling animation
|
|
160
|
+
*/
|
|
161
|
+
get loadingTrip() {
|
|
162
|
+
return _(this, O);
|
|
163
|
+
}
|
|
164
|
+
set loadingTrip(a) {
|
|
165
|
+
n(this, O, a);
|
|
166
|
+
}
|
|
167
|
+
/**
|
|
168
|
+
* The Footpath attribute for rendering different icons
|
|
169
|
+
* true: render a11y-icon
|
|
170
|
+
* false: render walk-icon
|
|
171
|
+
* default: render walk-icon
|
|
172
|
+
*/
|
|
173
|
+
get a11yFootpath() {
|
|
174
|
+
return _(this, P);
|
|
175
|
+
}
|
|
176
|
+
set a11yFootpath(a) {
|
|
177
|
+
n(this, P, a);
|
|
178
|
+
}
|
|
179
|
+
/**
|
|
180
|
+
* The loading state -
|
|
181
|
+
* when this is true it will be render skeleton with an idling animation
|
|
182
|
+
*/
|
|
183
|
+
get loadingPrice() {
|
|
184
|
+
return _(this, F);
|
|
185
|
+
}
|
|
186
|
+
set loadingPrice(a) {
|
|
187
|
+
n(this, F, a);
|
|
188
|
+
}
|
|
189
|
+
/**
|
|
190
|
+
* Hidden label for the card action. It overrides the automatically generated accessibility text for the component. Use this prop to provide custom accessibility information for the component.
|
|
191
|
+
*/
|
|
192
|
+
get cardActionLabel() {
|
|
193
|
+
return _(this, R);
|
|
194
|
+
}
|
|
195
|
+
set cardActionLabel(a) {
|
|
196
|
+
n(this, R, a);
|
|
197
|
+
}
|
|
198
|
+
/** This will be forwarded to the sbb-card component as aria-expanded. */
|
|
199
|
+
get accessibilityExpanded() {
|
|
200
|
+
return _(this, q);
|
|
201
|
+
}
|
|
202
|
+
set accessibilityExpanded(a) {
|
|
203
|
+
n(this, q, a);
|
|
204
|
+
}
|
|
205
|
+
/** When this prop is true the sbb-card will be in the active state. */
|
|
206
|
+
get active() {
|
|
207
|
+
return _(this, D);
|
|
208
|
+
}
|
|
209
|
+
set active(a) {
|
|
210
|
+
n(this, D, a);
|
|
211
|
+
}
|
|
212
|
+
/**
|
|
213
|
+
* A configured date which acts as the current date instead of the real current date.
|
|
214
|
+
* Only recommended for testing purposes.
|
|
215
|
+
*/
|
|
216
|
+
set now(a) {
|
|
217
|
+
this._now = Ce.getValidDateOrNull(Ce.deserialize(a));
|
|
218
|
+
}
|
|
219
|
+
get now() {
|
|
220
|
+
return this._now ?? /* @__PURE__ */ new Date();
|
|
221
|
+
}
|
|
222
|
+
willUpdate(a) {
|
|
223
|
+
super.willUpdate(a), a.has("loadingTrip") && st(this, "role", this.loadingTrip ? null : "rowgroup");
|
|
224
|
+
}
|
|
225
|
+
/** The skeleton render function for the loading state */
|
|
226
|
+
_renderSkeleton() {
|
|
227
|
+
return l`
|
|
228
|
+
<sbb-card class="sbb-loading sbb-card-spacing-4x-xxs">
|
|
229
|
+
${this.loadingPrice ? l`<div class="sbb-loading__badge" slot="badge"></div>` : g}
|
|
230
|
+
<div class="sbb-loading__wrapper">
|
|
231
|
+
<div class="sbb-loading__row"></div>
|
|
232
|
+
<div class="sbb-loading__row"></div>
|
|
233
|
+
<div class="sbb-loading__row"></div>
|
|
234
|
+
</div>
|
|
235
|
+
</sbb-card>
|
|
236
|
+
`;
|
|
237
|
+
}
|
|
238
|
+
_getRideLegs() {
|
|
239
|
+
return this.trip?.legs?.filter((a) => Ee(a)) ?? [];
|
|
240
|
+
}
|
|
241
|
+
_getQuayTypeStrings() {
|
|
242
|
+
if (!this.trip.summary?.product)
|
|
243
|
+
return null;
|
|
244
|
+
const a = this._getRideLegs(), r = this.trip.summary.product?.vehicleMode === "TRAIN" ? a[0].serviceJourney.quayTypeShortName || "" : a[0].serviceJourney.quayTypeName || "";
|
|
245
|
+
return {
|
|
246
|
+
long: rt[this._language.current] + " " + r,
|
|
247
|
+
short: r
|
|
248
|
+
};
|
|
249
|
+
}
|
|
250
|
+
/** map Quay */
|
|
251
|
+
_renderQuayType() {
|
|
252
|
+
if (!this.trip.summary?.product)
|
|
253
|
+
return;
|
|
254
|
+
const a = this._getQuayTypeStrings();
|
|
255
|
+
return l`
|
|
256
|
+
<span class="sbb-timetable__row--quay">
|
|
257
|
+
<span class="sbb-screen-reader-only">${a?.long} </span>
|
|
258
|
+
<span class="sbb-timetable__row--quay-type" aria-hidden="true"
|
|
259
|
+
>${a?.short}</span
|
|
260
|
+
>
|
|
261
|
+
</span>
|
|
262
|
+
`;
|
|
263
|
+
}
|
|
264
|
+
_handleHimCus(a) {
|
|
265
|
+
const { situations: e } = a || {}, r = e && ft(e), w = vt(a, this._language.current);
|
|
266
|
+
return {
|
|
267
|
+
cus: Object.keys(w)?.length ? w : null,
|
|
268
|
+
him: e?.length ? yt(r[0]) : null
|
|
269
|
+
};
|
|
270
|
+
}
|
|
271
|
+
_getAccessibilityText(a) {
|
|
272
|
+
const { summary: e, legs: r, notices: w } = a || {}, { departureWalk: b, arrivalWalk: W, departure: k, arrival: $, product: x, direction: H, occupancy: h, duration: T } = e || {}, { departureTimeAttribute: m, arrivalTimeAttribute: B } = pt(r, b || 0, W || 0, this._language.current, this.a11yFootpath), A = this._getRideLegs(), E = k?.time ? Pe(k.time) : void 0, U = $?.time ? Pe($.time) : void 0, Q = m ? `${m.text} ${m.duration}, ` : "", Ue = B ? `${B.text} ${B.duration}, ` : "", We = E ? `${ke[this._language.current]}: ${Re(E, "HH:mm")}, ` : "", je = () => k?.quayFormatted ? `${k?.quayChanged ? `${Oe[this._language.current]} ` : ""}${this._getQuayTypeStrings()?.long} ${k?.quayFormatted}, ` : "", Je = x && x.vehicleMode ? J[x.vehicleMode.toLowerCase()] && `${J[x.vehicleMode.toLowerCase()][this._language.current]}, ` : "", He = x?.vehicleSubModeShortName ? `${x.vehicleSubModeShortName} ${x.line || ""}, ` : "", Qe = `${Ne[this._language.current]} ${H}, `, j = this._handleHimCus(a), we = j?.cus?.text ? `${Se[this._language.current]}: ${j?.cus?.text}, ` : "", Ke = j?.him?.text ? `${Se[this._language.current]}: ${j?.him?.text}, ` : "", Ye = this.boarding ? `${this.boarding.text}, ` : "", Xe = `${this.price?.isDiscount ? Ie[this._language.current] : ""} ${this.price?.text && this.price?.price ? (this.price?.text || "") + " " + (this.price?.price || "") + ", " : ""}`, Ze = A.length > 2 ? `${A.length - 1} ${nt[this._language.current]}, ` : A.length > 1 ? `${A.length - 1} ${ot[this._language.current]}, ` : "", Ge = U ? `${lt[this._language.current]}: ${Re(U, "HH:mm")}, ` : "";
|
|
273
|
+
let K = "";
|
|
274
|
+
h && (h.firstClass && h.firstClass !== "UNKNOWN" && (K += `${ze.first[this._language.current]} ${Le[h.firstClass.toLowerCase()]?.[this._language.current]}.`), h.secondClass && h.secondClass !== "UNKNOWN" && (K += ` ${ze.second[this._language.current]} ${Le[h.secondClass.toLowerCase()]?.[this._language.current]}.`));
|
|
275
|
+
const $e = w && Y(w).length && Y(w)?.map((N, tt) => tt < 4 && N.text?.template).join(", ") + ", ", Ve = $e ? `${ct[this._language.current]}: ${$e}` : "", et = T && T > 0 ? `${Me[this._language.current]} ${Fe(T, this._language.current).long}, ` : "";
|
|
276
|
+
return [
|
|
277
|
+
Q,
|
|
278
|
+
We,
|
|
279
|
+
je(),
|
|
280
|
+
Je,
|
|
281
|
+
He,
|
|
282
|
+
Qe,
|
|
283
|
+
we,
|
|
284
|
+
Ye,
|
|
285
|
+
Xe,
|
|
286
|
+
we ? "" : Ke,
|
|
287
|
+
Ge,
|
|
288
|
+
Ue,
|
|
289
|
+
et,
|
|
290
|
+
Ze,
|
|
291
|
+
K,
|
|
292
|
+
Ve
|
|
293
|
+
].map((N) => N?.trim()).filter((N) => N && N.length > 0).join(" ");
|
|
294
|
+
}
|
|
295
|
+
render() {
|
|
296
|
+
if (this.loadingTrip)
|
|
297
|
+
return this._renderSkeleton();
|
|
298
|
+
const { legs: a, id: e, notices: r, summary: w } = this.trip || {}, { product: b, direction: W, departureWalk: k, departure: $, arrival: x, arrivalWalk: H, occupancy: h, duration: T } = w || {}, m = this._handleHimCus(this.trip), B = !!m.cus || !!m.him, A = r && Y(r), E = T ? Fe(T, this._language.current) : null;
|
|
299
|
+
return l`
|
|
300
|
+
<sbb-card class="sbb-card-spacing-4x-xxs" id=${e}>
|
|
301
|
+
<sbb-card-button
|
|
302
|
+
?active=${this.active}
|
|
303
|
+
aria-expanded=${this.accessibilityExpanded ? "true" : g}
|
|
304
|
+
>
|
|
305
|
+
${this.cardActionLabel ? this.cardActionLabel : this._getAccessibilityText(this.trip)}
|
|
306
|
+
</sbb-card-button>
|
|
307
|
+
${this.loadingPrice ? l`<div class="sbb-loading__badge" slot="badge"></div>` : g}
|
|
308
|
+
${this.price && !this.loadingPrice ? l`<sbb-card-badge color=${this.price.isDiscount ? "charcoal" : "white"}>
|
|
309
|
+
${this.price.isDiscount ? l`<span aria-hidden="true">
|
|
310
|
+
%<span class="sbb-screen-reader-only"
|
|
311
|
+
>${Ie[this._language.current]}</span
|
|
312
|
+
>
|
|
313
|
+
</span>` : g}
|
|
314
|
+
${this.price.text ? l`<span>${this.price.text}</span>` : g}
|
|
315
|
+
${this.price.price ? l`<span>${this.price.price}</span>` : g}
|
|
316
|
+
</sbb-card-badge>` : g}
|
|
317
|
+
<div class="sbb-timetable__row" role="row">
|
|
318
|
+
<div class="sbb-timetable__row-header" role="gridcell">
|
|
319
|
+
<div class="sbb-timetable__row-details">
|
|
320
|
+
${b?.corporateIdentityPictogram && l`<span class="sbb-timetable__row-transport-wrapper">
|
|
321
|
+
<sbb-icon
|
|
322
|
+
class="sbb-timetable__row-transport-icon"
|
|
323
|
+
name="picto:${b.corporateIdentityPictogram}"
|
|
324
|
+
></sbb-icon>
|
|
325
|
+
<span class="sbb-screen-reader-only">
|
|
326
|
+
${b && b.vehicleMode && J[b.vehicleMode.toLowerCase()] && J[b.vehicleMode.toLowerCase()][this._language.current]}
|
|
327
|
+
|
|
328
|
+
</span>
|
|
329
|
+
</span>`}
|
|
330
|
+
${b && (b.corporateIdentityIcon ? ut(b.corporateIdentityIcon, b.name) : b.vehicleSubModeShortName && mt(b.vehicleSubModeShortName, b?.line))}
|
|
331
|
+
</div>
|
|
332
|
+
${W ? l`<p>${`${Ne[this._language.current]} ${W}`}</p>` : g}
|
|
333
|
+
</div>
|
|
334
|
+
<sbb-pearl-chain-time
|
|
335
|
+
role="gridcell"
|
|
336
|
+
.legs=${a}
|
|
337
|
+
.departureTime=${$?.time}
|
|
338
|
+
.arrivalTime=${x?.time}
|
|
339
|
+
.departureWalk=${k}
|
|
340
|
+
.arrivalWalk=${H}
|
|
341
|
+
?disable-animation=${this.disableAnimation}
|
|
342
|
+
?a11y-footpath=${this.a11yFootpath}
|
|
343
|
+
.now=${this.now}
|
|
344
|
+
></sbb-pearl-chain-time>
|
|
345
|
+
<div class="sbb-timetable__row-footer" role="gridcell">
|
|
346
|
+
${b && $?.quayFormatted ? l`<span
|
|
347
|
+
class=${$?.quayChanged ? "sbb-timetable__row-quay--changed" : g}
|
|
348
|
+
>
|
|
349
|
+
<span class="sbb-screen-reader-only">
|
|
350
|
+
${`${ke[this._language.current]} ${$?.quayChanged ? Oe[this._language.current] : ""}`}
|
|
351
|
+
|
|
352
|
+
</span>
|
|
353
|
+
${this._renderQuayType()} ${$?.quayFormatted}
|
|
354
|
+
</span>` : g}
|
|
355
|
+
${h?.firstClass && h?.firstClass !== "UNKNOWN" || h?.secondClass && h.secondClass !== "UNKNOWN" ? l`<sbb-timetable-occupancy
|
|
356
|
+
.firstClassOccupancy=${h?.firstClass?.toLowerCase()}
|
|
357
|
+
.secondClassOccupancy=${h?.secondClass?.toLowerCase()}
|
|
358
|
+
></sbb-timetable-occupancy>` : g}
|
|
359
|
+
${A && A.length || this.boarding ? l`<ul class="sbb-timetable__row-hints" role="list">
|
|
360
|
+
${A?.map((U, Q) => Q < 4 ? l`<li>
|
|
361
|
+
<sbb-icon
|
|
362
|
+
class="sbb-travel-hints__item"
|
|
363
|
+
name=${"sa-" + U.name?.toLowerCase()}
|
|
364
|
+
></sbb-icon>
|
|
365
|
+
<span class="sbb-screen-reader-only">${U.text?.template}</span>
|
|
366
|
+
</li>` : g)}
|
|
367
|
+
${this.boarding ? l`<li>
|
|
368
|
+
<sbb-icon
|
|
369
|
+
class="sbb-travel-hints__item"
|
|
370
|
+
name=${this.boarding?.name}
|
|
371
|
+
aria-label=${this.boarding?.text}
|
|
372
|
+
aria-hidden="false"
|
|
373
|
+
></sbb-icon>
|
|
374
|
+
</li>` : g}
|
|
375
|
+
</ul>` : g}
|
|
376
|
+
${T && T > 0 ? l`<time>
|
|
377
|
+
<span class="sbb-screen-reader-only">
|
|
378
|
+
${`${Me[this._language.current]} ${E.long}`}
|
|
379
|
+
</span>
|
|
380
|
+
<span aria-hidden="true">${E.short}</span>
|
|
381
|
+
</time>` : g}
|
|
382
|
+
${B && (m.cus || m.him) ? l`<span class="sbb-timetable__row-warning">
|
|
383
|
+
<sbb-icon name=${(m.cus || m.him).name}></sbb-icon>
|
|
384
|
+
<span class="sbb-screen-reader-only">${(m.cus || m.him).text}</span>
|
|
385
|
+
</span>` : g}
|
|
386
|
+
</div>
|
|
387
|
+
</div>
|
|
388
|
+
</sbb-card>
|
|
389
|
+
`;
|
|
390
|
+
}
|
|
391
|
+
}, I = new WeakMap(), z = new WeakMap(), L = new WeakMap(), M = new WeakMap(), O = new WeakMap(), P = new WeakMap(), F = new WeakMap(), R = new WeakMap(), q = new WeakMap(), D = new WeakMap(), (() => {
|
|
392
|
+
const a = typeof Symbol == "function" && Symbol.metadata ? Object.create(t[Symbol.metadata] ?? null) : void 0;
|
|
393
|
+
s = [v({ type: Object })], u = [v({ type: Object })], Z = [S(), v({ attribute: "disable-animation", reflect: !0, type: Boolean })], ee = [v({ type: Object })], ie = [S(), v({ attribute: "loading-trip", type: Boolean })], ne = [S(), v({ attribute: "a11y-footpath", type: Boolean })], ce = [S(), v({ attribute: "loading-price", type: Boolean })], ge = [S(), v({ attribute: "card-action-label" })], ue = [S(), v({ attribute: "accessibility-expanded", type: Boolean })], fe = [S(), v({ type: Boolean })], xe = [v()], y(c, null, s, { kind: "accessor", name: "trip", static: !1, private: !1, access: { has: (e) => "trip" in e, get: (e) => e.trip, set: (e, r) => {
|
|
394
|
+
e.trip = r;
|
|
395
|
+
} }, metadata: a }, d, p), y(c, null, u, { kind: "accessor", name: "price", static: !1, private: !1, access: { has: (e) => "price" in e, get: (e) => e.price, set: (e, r) => {
|
|
396
|
+
e.price = r;
|
|
397
|
+
} }, metadata: a }, C, X), y(c, null, Z, { kind: "accessor", name: "disableAnimation", static: !1, private: !1, access: { has: (e) => "disableAnimation" in e, get: (e) => e.disableAnimation, set: (e, r) => {
|
|
398
|
+
e.disableAnimation = r;
|
|
399
|
+
} }, metadata: a }, G, V), y(c, null, ee, { kind: "accessor", name: "boarding", static: !1, private: !1, access: { has: (e) => "boarding" in e, get: (e) => e.boarding, set: (e, r) => {
|
|
400
|
+
e.boarding = r;
|
|
401
|
+
} }, metadata: a }, te, ae), y(c, null, ie, { kind: "accessor", name: "loadingTrip", static: !1, private: !1, access: { has: (e) => "loadingTrip" in e, get: (e) => e.loadingTrip, set: (e, r) => {
|
|
402
|
+
e.loadingTrip = r;
|
|
403
|
+
} }, metadata: a }, se, re), y(c, null, ne, { kind: "accessor", name: "a11yFootpath", static: !1, private: !1, access: { has: (e) => "a11yFootpath" in e, get: (e) => e.a11yFootpath, set: (e, r) => {
|
|
404
|
+
e.a11yFootpath = r;
|
|
405
|
+
} }, metadata: a }, oe, le), y(c, null, ce, { kind: "accessor", name: "loadingPrice", static: !1, private: !1, access: { has: (e) => "loadingPrice" in e, get: (e) => e.loadingPrice, set: (e, r) => {
|
|
406
|
+
e.loadingPrice = r;
|
|
407
|
+
} }, metadata: a }, de, be), y(c, null, ge, { kind: "accessor", name: "cardActionLabel", static: !1, private: !1, access: { has: (e) => "cardActionLabel" in e, get: (e) => e.cardActionLabel, set: (e, r) => {
|
|
408
|
+
e.cardActionLabel = r;
|
|
409
|
+
} }, metadata: a }, pe, he), y(c, null, ue, { kind: "accessor", name: "accessibilityExpanded", static: !1, private: !1, access: { has: (e) => "accessibilityExpanded" in e, get: (e) => e.accessibilityExpanded, set: (e, r) => {
|
|
410
|
+
e.accessibilityExpanded = r;
|
|
411
|
+
} }, metadata: a }, me, _e), y(c, null, fe, { kind: "accessor", name: "active", static: !1, private: !1, access: { has: (e) => "active" in e, get: (e) => e.active, set: (e, r) => {
|
|
412
|
+
e.active = r;
|
|
413
|
+
} }, metadata: a }, ye, ve), y(c, null, xe, { kind: "setter", name: "now", static: !1, private: !1, access: { has: (e) => "now" in e, set: (e, r) => {
|
|
414
|
+
e.now = r;
|
|
415
|
+
} }, metadata: a }, null, i), a && Object.defineProperty(c, Symbol.metadata, { enumerable: !0, configurable: !0, writable: !0, value: a });
|
|
416
|
+
})(), c.elementName = "sbb-timetable-row", c.styles = [bt, ht], c;
|
|
417
|
+
})();
|
|
418
|
+
export {
|
|
419
|
+
Ut as SbbTimetableRowElement,
|
|
420
|
+
wt as filterNotices,
|
|
421
|
+
vt as getCus,
|
|
422
|
+
yt as getHimIcon,
|
|
423
|
+
Y as handleNotices,
|
|
424
|
+
ut as renderIconProduct,
|
|
425
|
+
mt as renderStringProduct,
|
|
426
|
+
ft as sortSituation
|
|
427
|
+
};
|
package/timetable-row.js
CHANGED
|
@@ -1,6 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import "./timetable-row.
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
import { SbbTimetableRowElement as e } from "./timetable-row/timetable-row.component.js";
|
|
2
|
+
import { filterNotices as i, getCus as n, getHimIcon as c, handleNotices as d, renderIconProduct as m, renderStringProduct as f, sortSituation as l } from "./timetable-row/timetable-row.component.js";
|
|
3
|
+
e.define();
|
|
4
|
+
export {
|
|
5
|
+
e as SbbTimetableRowElement,
|
|
6
|
+
i as filterNotices,
|
|
7
|
+
n as getCus,
|
|
8
|
+
c as getHimIcon,
|
|
9
|
+
d as handleNotices,
|
|
10
|
+
m as renderIconProduct,
|
|
11
|
+
f as renderStringProduct,
|
|
12
|
+
l as sortSituation
|
|
13
|
+
};
|
package/timetable-row.pure.js
CHANGED
|
@@ -1,2 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export {
|
|
1
|
+
import { SbbTimetableRowElement as o, filterNotices as r, getCus as i, getHimIcon as n, handleNotices as c, renderIconProduct as d, renderStringProduct as l, sortSituation as m } from "./timetable-row/timetable-row.component.js";
|
|
2
|
+
export {
|
|
3
|
+
o as SbbTimetableRowElement,
|
|
4
|
+
r as filterNotices,
|
|
5
|
+
i as getCus,
|
|
6
|
+
n as getHimIcon,
|
|
7
|
+
c as handleNotices,
|
|
8
|
+
d as renderIconProduct,
|
|
9
|
+
l as renderStringProduct,
|
|
10
|
+
m as sortSituation
|
|
11
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
const c = 6048e5, r = 864e5, i = 6e4, e = 36e5, t = /* @__PURE__ */ Symbol.for("constructDateFrom");
|
|
2
|
+
function s(n, o) {
|
|
3
|
+
return typeof n == "function" ? n(o) : n && typeof n == "object" && t in n ? n[t](o) : n instanceof Date ? new n.constructor(o) : new Date(o);
|
|
4
|
+
}
|
|
5
|
+
function f(n, o) {
|
|
6
|
+
return s(o || n, n);
|
|
7
|
+
}
|
|
8
|
+
export {
|
|
9
|
+
r as a,
|
|
10
|
+
e as b,
|
|
11
|
+
s as c,
|
|
12
|
+
c as d,
|
|
13
|
+
i as m,
|
|
14
|
+
f as t
|
|
15
|
+
};
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { SbbElement as e } from "@sbb-esta/lyne-elements/core/base-elements.js";
|
|
2
|
-
import { boxSizingStyles as t } from "@sbb-esta/lyne-elements/core/styles.js";
|
|
3
|
-
import { css as n, html as r } from "lit";
|
|
4
|
-
//#region src/elements-experimental/autocomplete-grid/autocomplete-grid-cell/autocomplete-grid-cell.scss?lit&inline
|
|
5
|
-
var i = n`:host{--sbb-autocomplete-grid-cell-gap:var(--sbb-spacing-fixed-6x);display:block}.sbb-autocomplete-grid-cell{column-gap:var(--sbb-autocomplete-grid-cell-gap);display:flex}`, a = class extends e {
|
|
6
|
-
static {
|
|
7
|
-
this.elementName = "sbb-autocomplete-grid-cell";
|
|
8
|
-
}
|
|
9
|
-
static {
|
|
10
|
-
this.role = "gridcell";
|
|
11
|
-
}
|
|
12
|
-
static {
|
|
13
|
-
this.styles = [t, i];
|
|
14
|
-
}
|
|
15
|
-
render() {
|
|
16
|
-
return r`
|
|
17
|
-
<span class="sbb-autocomplete-grid-cell">
|
|
18
|
-
<slot></slot>
|
|
19
|
-
</span>
|
|
20
|
-
`;
|
|
21
|
-
}
|
|
22
|
-
};
|
|
23
|
-
//#endregion
|
|
24
|
-
export { a as t };
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import { SbbPropertyWatcherController as e } from "@sbb-esta/lyne-elements/core/controllers.js";
|
|
2
|
-
import { ɵstateController as t } from "@sbb-esta/lyne-elements/core/mixins.js";
|
|
3
|
-
import { boxSizingStyles as n } from "@sbb-esta/lyne-elements/core/styles.js";
|
|
4
|
-
import { css as r } from "lit";
|
|
5
|
-
import { SbbOptionBaseElement as i } from "@sbb-esta/lyne-elements/option.js";
|
|
6
|
-
//#region src/elements-experimental/autocomplete-grid/autocomplete-grid-option/autocomplete-grid-option.scss?lit&inline
|
|
7
|
-
var a = r`:host{display:block}:host(:is(:state(negative),[state--negative])){--sbb-option-color:var(--sbb-color-3-negative);--sbb-option-icon-color:var(--sbb-color-5)}:host(:not(:is(:state(disable-highlight),[state--disable-highlight]))) .sbb-option__label slot{display:none}:host(:is(:state(active),[state--active])){--sbb-option-focus-outline-color:var(--sbb-focus-outline-color)}.sbb-option{font-size:var(--sbb-option-font-size);letter-spacing:var(--sbb-typo-letter-spacing-text);align-items:center;column-gap:var(--sbb-option-column-gap);min-height:var(--sbb-option-min-height);padding-inline:var(--sbb-option-padding-inline);color:var(--sbb-option-color);justify-content:start;display:flex;position:relative}.sbb-option:after{content:"";inset:var(--sbb-option-focus-outline-inset);pointer-events:none;border:var(--sbb-focus-outline-width) solid var(--sbb-option-focus-outline-color);border-radius:var(--sbb-option-border-radius);display:block;position:absolute}:host(:not(:is(:state(disabled),[state--disabled]))) .sbb-option__label--highlight{font-weight:700}@media (forced-colors:active){:host(:not(:is(:state(disabled),[state--disabled]))) .sbb-option__label--highlight{color:highlight}}.sbb-option__icon{min-width:var(--sbb-size-icon-ui-small);min-height:var(--sbb-size-icon-ui-small);color:var(--sbb-option-icon-color);display:flex}:host(:not(:is(:state(slotted-icon),[state--slotted-icon]),:is(:state(has-icon-name),[state--has-icon-name]))) .sbb-option__icon{display:var(--sbb-option-icon-container-display,none)}.sbb-option__label{text-overflow:var(--sbb-option-text-overflow);overflow:var(--sbb-option-overflow);white-space:var(--sbb-option-white-space,initial)}`, o = "sbb-autocomplete-grid-option", s = class extends i {
|
|
8
|
-
static {
|
|
9
|
-
this.elementName = "sbb-autocomplete-grid-option";
|
|
10
|
-
}
|
|
11
|
-
static {
|
|
12
|
-
this.role = "gridcell";
|
|
13
|
-
}
|
|
14
|
-
static {
|
|
15
|
-
this.styles = [n, a];
|
|
16
|
-
}
|
|
17
|
-
constructor() {
|
|
18
|
-
super(), this.optionId = o, this.addController(new e(this, () => this.closest("sbb-autocomplete-grid-optgroup"), {
|
|
19
|
-
disabled: (e) => {
|
|
20
|
-
this.disabledFromGroup = e.disabled, t(this.closest?.("sbb-autocomplete-grid-row"))?.toggle("disabled", this.disabled || this.disabledFromGroup), this.updateAriaDisabled();
|
|
21
|
-
},
|
|
22
|
-
label: (e) => this.groupLabel = e.label
|
|
23
|
-
})), this.addController(new e(this, () => this.closest("sbb-autocomplete-grid"), { negative: (e) => this.toggleState("negative", e.negative) }));
|
|
24
|
-
}
|
|
25
|
-
willUpdate(e) {
|
|
26
|
-
super.willUpdate(e), e.has("disabled") && (t(this.closest?.("sbb-autocomplete-grid-row"))?.toggle("disabled", this.disabled || this.disabledFromGroup), this.updateAriaDisabled());
|
|
27
|
-
}
|
|
28
|
-
selectByClick(e) {
|
|
29
|
-
if (this.disabled || this.disabledFromGroup) {
|
|
30
|
-
e.stopPropagation();
|
|
31
|
-
return;
|
|
32
|
-
}
|
|
33
|
-
this.selectViaUserInteraction(!0);
|
|
34
|
-
}
|
|
35
|
-
};
|
|
36
|
-
//#endregion
|
|
37
|
-
export { o as n, s as t };
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { SbbElement as e } from "@sbb-esta/lyne-elements/core/base-elements.js";
|
|
2
|
-
import { boxSizingStyles as t } from "@sbb-esta/lyne-elements/core/styles.js";
|
|
3
|
-
import { css as n, html as r } from "lit";
|
|
4
|
-
//#region src/elements-experimental/autocomplete-grid/autocomplete-grid-row/autocomplete-grid-row.scss?lit&inline
|
|
5
|
-
var i = n`:host{display:block}:host(:is(:state(negative),[state--negative])){--sbb-autocomplete-grid-row-color:var(--sbb-color-3-negative);--sbb-autocomplete-grid-row-background-color-hover:var(--sbb-background-color-3-negative);--sbb-autocomplete-grid-row-disabled-border-color:var(--sbb-border-color-5);--sbb-autocomplete-grid-row-disabled-background-color:var(--sbb-background-color-3-negative);--sbb-focus-outline-color:var(--sbb-focus-outline-color-dark)}@media (any-hover:hover){:host(:hover:not(:is(:state(disabled),[state--disabled]))){--sbb-autocomplete-grid-row-background-color:var(--sbb-autocomplete-grid-row-background-color-hover)}}:host(:is(:state(disabled),[state--disabled])){--sbb-autocomplete-grid-row-cursor:var(--sbb-cursor-default)}@media (forced-colors:active){:host(:is(:state(disabled),[state--disabled])){--sbb-autocomplete-grid-row-color:GrayText}}::slotted(sbb-autocomplete-grid-option){margin-right:calc(-1 * var(--sbb-spacing-fixed-2x));flex:auto;overflow-x:hidden}.sbb-autocomplete-grid-row{align-items:center;justify-content:var(--sbb-autocomplete-grid-row-justify-content);gap:var(--sbb-spacing-fixed-6x);color:var(--sbb-autocomplete-grid-row-color);background-color:var(--sbb-autocomplete-grid-row-background-color,inherit);cursor:var(--sbb-autocomplete-grid-row-cursor);-webkit-tap-highlight-color:transparent;-webkit-text-fill-color:var(--sbb-autocomplete-grid-row-color);padding-inline-end:var(--sbb-autocomplete-grid-row-padding-inline-end);display:flex}:host(:is(:state(disabled),[state--disabled])) .sbb-autocomplete-grid-row{z-index:0;position:relative}:host(:is(:state(disabled),[state--disabled])) .sbb-autocomplete-grid-row:before{content:"";border:var(--sbb-border-width-1x) dashed var(--sbb-autocomplete-grid-row-disabled-border-color);border-radius:var(--sbb-border-radius-2x);background-color:var(--sbb-autocomplete-grid-row-disabled-background-color);z-index:-1;display:block;position:absolute;inset:.375rem}@media (forced-colors:active){:host(:is(:state(disabled),[state--disabled])) .sbb-autocomplete-grid-row:before{border-color:graytext}}`, a = 0, o = class extends e {
|
|
6
|
-
static {
|
|
7
|
-
this.elementName = "sbb-autocomplete-grid-row";
|
|
8
|
-
}
|
|
9
|
-
static {
|
|
10
|
-
this.role = "row";
|
|
11
|
-
}
|
|
12
|
-
static {
|
|
13
|
-
this.styles = [t, i];
|
|
14
|
-
}
|
|
15
|
-
connectedCallback() {
|
|
16
|
-
super.connectedCallback(), this.id ||= `sbb-autocomplete-grid-row-${++a}`;
|
|
17
|
-
}
|
|
18
|
-
render() {
|
|
19
|
-
return r`
|
|
20
|
-
<span class="sbb-autocomplete-grid-row">
|
|
21
|
-
<slot></slot>
|
|
22
|
-
</span>
|
|
23
|
-
`;
|
|
24
|
-
}
|
|
25
|
-
};
|
|
26
|
-
//#endregion
|
|
27
|
-
export { o as t };
|