@sbb-esta/lyne-elements-experimental 5.0.2 → 5.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/autocomplete-grid.js +1 -10
- package/autocomplete-grid.pure.js +12 -7
- package/core.js +31 -5
- package/development/autocomplete-grid/autocomplete-grid/autocomplete-grid.component.d.ts +0 -1
- package/development/autocomplete-grid/autocomplete-grid-button/autocomplete-grid-button.component.d.ts +4 -5
- package/development/autocomplete-grid/autocomplete-grid-cell/autocomplete-grid-cell.component.d.ts +1 -2
- package/development/autocomplete-grid/autocomplete-grid-optgroup/autocomplete-grid-optgroup.component.d.ts +2 -3
- package/development/autocomplete-grid/autocomplete-grid-option/autocomplete-grid-option.component.d.ts +1 -2
- package/development/autocomplete-grid/autocomplete-grid-row/autocomplete-grid-row.component.d.ts +1 -2
- package/development/autocomplete-grid.d.ts +0 -1
- package/development/autocomplete-grid.js +5 -10
- package/development/autocomplete-grid.pure.d.ts +0 -1
- package/development/autocomplete-grid.pure.js +328 -7
- package/development/core/datetime/date-helper.d.ts +0 -1
- package/development/core/timetable/access-leg-helper.d.ts +3 -3
- package/development/core/timetable/timetable-helper.d.ts +1 -2
- package/development/core/timetable/timetable-properties.d.ts +2 -1
- package/development/core.d.ts +0 -1
- package/development/core.js +1195 -5
- package/development/journey-summary/journey-summary.component.d.ts +3 -4
- package/development/journey-summary.d.ts +0 -1
- package/development/journey-summary.js +5 -5
- package/development/journey-summary.pure.d.ts +0 -1
- package/development/journey-summary.pure.js +2605 -2
- package/development/pearl-chain/pearl-chain.component.d.ts +2 -3
- package/development/pearl-chain-time/pearl-chain-time.component.d.ts +3 -4
- package/development/pearl-chain-time.d.ts +0 -1
- package/development/pearl-chain-time.js +5 -5
- package/development/pearl-chain-time.pure.d.ts +0 -1
- package/development/pearl-chain-time.pure.js +2582 -2
- package/development/pearl-chain-vertical/pearl-chain-vertical.component.d.ts +1 -2
- package/development/pearl-chain-vertical-item/pearl-chain-vertical-item.component.d.ts +1 -2
- package/development/pearl-chain-vertical-item.d.ts +0 -1
- package/development/pearl-chain-vertical-item.js +5 -5
- package/development/pearl-chain-vertical-item.pure.d.ts +0 -1
- package/development/pearl-chain-vertical-item.pure.js +132 -2
- package/development/pearl-chain-vertical.d.ts +0 -1
- package/development/pearl-chain-vertical.js +5 -5
- package/development/pearl-chain-vertical.pure.d.ts +0 -1
- package/development/pearl-chain-vertical.pure.js +31 -2
- package/development/pearl-chain.d.ts +0 -1
- package/development/pearl-chain.js +5 -5
- package/development/pearl-chain.pure.d.ts +0 -1
- package/development/pearl-chain.pure.js +619 -2
- package/development/seat-reservation/common/mapper/icon-mapper.d.ts +0 -1
- package/development/seat-reservation/common/mapper/mapper.d.ts +1 -2
- package/development/seat-reservation/common/mapper/sample-data/seat-reservation-sample-data-bus.private.d.ts +68 -0
- package/development/seat-reservation/common/mapper/sample-data/seat-reservation-sample-data-decks.private.d.ts +122 -0
- package/development/seat-reservation/common/mapper/sample-data/seat-reservation-sample-data-train.private.d.ts +68 -0
- package/development/seat-reservation/common/mapper.d.ts +0 -1
- package/development/seat-reservation/common/svgs.d.ts +20 -21
- package/development/seat-reservation/common/translations/i18n.d.ts +0 -1
- package/development/seat-reservation/common/translations.d.ts +0 -1
- package/development/seat-reservation/common/types.d.ts +0 -1
- package/development/seat-reservation/seat-reservation/seat-reservation-base-element.d.ts +2 -3
- package/development/seat-reservation/seat-reservation/seat-reservation.component.d.ts +2 -3
- package/development/seat-reservation/seat-reservation-area/seat-reservation-area.component.d.ts +1 -2
- package/development/seat-reservation/seat-reservation-graphic/seat-reservation-graphic.component.d.ts +2 -3
- package/development/seat-reservation/seat-reservation-navigation-coach/seat-reservation-navigation-coach.component.d.ts +3 -4
- package/development/seat-reservation/seat-reservation-navigation-services/seat-reservation-navigation-services.component.d.ts +2 -3
- package/development/seat-reservation/seat-reservation-place-control/seat-reservation-place-control.component.d.ts +3 -4
- package/development/seat-reservation/seat-reservation-scoped/seat-reservation-scoped.component.d.ts +1 -2
- package/development/seat-reservation.d.ts +0 -1
- package/development/seat-reservation.js +5 -16
- package/development/seat-reservation.pure.d.ts +0 -1
- package/development/seat-reservation.pure.js +16019 -14
- package/development/timetable-duration/timetable-duration.component.d.ts +1 -2
- package/development/timetable-duration.d.ts +0 -1
- package/development/timetable-duration.js +5 -5
- package/development/timetable-duration.pure.d.ts +0 -1
- package/development/timetable-duration.pure.js +97 -2
- package/development/timetable-row/timetable-row.component.d.ts +3 -4
- package/development/timetable-row.d.ts +0 -1
- package/development/timetable-row.js +5 -5
- package/development/timetable-row.pure.d.ts +0 -1
- package/development/timetable-row.pure.js +3005 -2
- package/journey-summary.js +1 -6
- package/journey-summary.pure.js +55 -2
- package/package.json +3 -4
- package/pearl-chain-time.js +1 -6
- package/pearl-chain-time.pure.js +28 -2
- package/pearl-chain-vertical-item.js +1 -6
- package/pearl-chain-vertical-item.pure.js +26 -2
- package/pearl-chain-vertical.js +1 -6
- package/pearl-chain-vertical.pure.js +6 -2
- package/pearl-chain.js +1 -6
- package/pearl-chain.pure.js +27 -2
- package/seat-reservation.js +1 -16
- package/seat-reservation.pure.js +468 -14
- package/timetable-duration.js +1 -6
- package/timetable-duration.pure.js +9 -2
- package/timetable-row.js +1 -6
- package/timetable-row.pure.js +113 -2
- package/autocomplete-grid/autocomplete-grid/autocomplete-grid.component.js +0 -65
- package/autocomplete-grid/autocomplete-grid-button/autocomplete-grid-button.component.js +0 -44
- package/autocomplete-grid/autocomplete-grid-cell/autocomplete-grid-cell.component.js +0 -2
- package/autocomplete-grid/autocomplete-grid-optgroup/autocomplete-grid-optgroup.component.js +0 -21
- package/autocomplete-grid/autocomplete-grid-option/autocomplete-grid-option.component.js +0 -2
- package/autocomplete-grid/autocomplete-grid-row/autocomplete-grid-row.component.js +0 -2
- package/autocomplete-grid-cell.component-79IjA__I.js +0 -23
- package/autocomplete-grid-option.component-DUFBhQwI.js +0 -35
- package/autocomplete-grid-row.component-B3U15Rwa.js +0 -26
- package/core/datetime/date-helper.js +0 -2
- package/core/timetable/access-leg-helper.js +0 -96
- package/core/timetable/timetable-helper.js +0 -10
- package/core/timetable/timetable-properties.js +0 -0
- package/date-helper-DNzMLcyb.js +0 -185
- package/development/autocomplete-grid/autocomplete-grid/autocomplete-grid.component.d.ts.map +0 -1
- package/development/autocomplete-grid/autocomplete-grid/autocomplete-grid.component.js +0 -118
- package/development/autocomplete-grid/autocomplete-grid-button/autocomplete-grid-button.component.d.ts.map +0 -1
- package/development/autocomplete-grid/autocomplete-grid-button/autocomplete-grid-button.component.js +0 -69
- package/development/autocomplete-grid/autocomplete-grid-cell/autocomplete-grid-cell.component.d.ts.map +0 -1
- package/development/autocomplete-grid/autocomplete-grid-cell/autocomplete-grid-cell.component.js +0 -2
- package/development/autocomplete-grid/autocomplete-grid-optgroup/autocomplete-grid-optgroup.component.d.ts.map +0 -1
- package/development/autocomplete-grid/autocomplete-grid-optgroup/autocomplete-grid-optgroup.component.js +0 -30
- package/development/autocomplete-grid/autocomplete-grid-option/autocomplete-grid-option.component.d.ts.map +0 -1
- package/development/autocomplete-grid/autocomplete-grid-option/autocomplete-grid-option.component.js +0 -2
- package/development/autocomplete-grid/autocomplete-grid-row/autocomplete-grid-row.component.d.ts.map +0 -1
- package/development/autocomplete-grid/autocomplete-grid-row/autocomplete-grid-row.component.js +0 -2
- package/development/autocomplete-grid-cell.component-BbdELDro.js +0 -33
- package/development/autocomplete-grid-option.component-C7WuqRit.js +0 -57
- package/development/autocomplete-grid-row.component-DoXbOsQM.js +0 -38
- package/development/autocomplete-grid.d.ts.map +0 -1
- package/development/autocomplete-grid.pure.d.ts.map +0 -1
- package/development/core/datetime/date-helper.d.ts.map +0 -1
- package/development/core/datetime/date-helper.js +0 -2
- package/development/core/timetable/access-leg-helper.d.ts.map +0 -1
- package/development/core/timetable/access-leg-helper.js +0 -147
- package/development/core/timetable/timetable-helper.d.ts.map +0 -1
- package/development/core/timetable/timetable-helper.js +0 -19
- package/development/core/timetable/timetable-properties.d.ts.map +0 -1
- package/development/core/timetable/timetable-properties.js +0 -0
- package/development/core.d.ts.map +0 -1
- package/development/date-helper-BcTDWVeP.js +0 -539
- package/development/differenceInMinutes-CxAbGYQ3.js +0 -110
- package/development/format-Cx3zmmaF.js +0 -1848
- package/development/isValid-40Olgzo1.js +0 -178
- package/development/journey-summary/journey-summary.component.d.ts.map +0 -1
- package/development/journey-summary/journey-summary.component.js +0 -2
- package/development/journey-summary.component-BsC7wBIn.js +0 -341
- package/development/journey-summary.d.ts.map +0 -1
- package/development/journey-summary.pure.d.ts.map +0 -1
- package/development/mapper-BrZOqqfe.js +0 -11454
- package/development/pearl-chain/pearl-chain.component.d.ts.map +0 -1
- package/development/pearl-chain/pearl-chain.component.js +0 -2
- package/development/pearl-chain-time/pearl-chain-time.component.d.ts.map +0 -1
- package/development/pearl-chain-time/pearl-chain-time.component.js +0 -2
- package/development/pearl-chain-time.component-C-CuC1ke.js +0 -317
- package/development/pearl-chain-time.d.ts.map +0 -1
- package/development/pearl-chain-time.pure.d.ts.map +0 -1
- package/development/pearl-chain-vertical/pearl-chain-vertical.component.d.ts.map +0 -1
- package/development/pearl-chain-vertical/pearl-chain-vertical.component.js +0 -2
- package/development/pearl-chain-vertical-item/pearl-chain-vertical-item.component.d.ts.map +0 -1
- package/development/pearl-chain-vertical-item/pearl-chain-vertical-item.component.js +0 -2
- package/development/pearl-chain-vertical-item.component-CLu9QrqJ.js +0 -131
- package/development/pearl-chain-vertical-item.d.ts.map +0 -1
- package/development/pearl-chain-vertical-item.pure.d.ts.map +0 -1
- package/development/pearl-chain-vertical.component-DbPz5k_R.js +0 -30
- package/development/pearl-chain-vertical.d.ts.map +0 -1
- package/development/pearl-chain-vertical.pure.d.ts.map +0 -1
- package/development/pearl-chain.component-10OsJZIX.js +0 -318
- package/development/pearl-chain.d.ts.map +0 -1
- package/development/pearl-chain.pure.d.ts.map +0 -1
- package/development/seat-reservation/common/mapper/icon-mapper.d.ts.map +0 -1
- package/development/seat-reservation/common/mapper/icon-mapper.js +0 -170
- package/development/seat-reservation/common/mapper/mapper.d.ts.map +0 -1
- package/development/seat-reservation/common/mapper/mapper.js +0 -2
- package/development/seat-reservation/common/mapper.d.ts.map +0 -1
- package/development/seat-reservation/common/mapper.js +0 -3
- package/development/seat-reservation/common/svgs.d.ts.map +0 -1
- package/development/seat-reservation/common/svgs.js +0 -2
- package/development/seat-reservation/common/translations/i18n.d.ts.map +0 -1
- package/development/seat-reservation/common/translations/i18n.js +0 -1120
- package/development/seat-reservation/common/translations.d.ts.map +0 -1
- package/development/seat-reservation/common/translations.js +0 -2
- package/development/seat-reservation/common/types.d.ts.map +0 -1
- package/development/seat-reservation/common/types.js +0 -0
- package/development/seat-reservation/seat-reservation/seat-reservation-base-element.d.ts.map +0 -1
- package/development/seat-reservation/seat-reservation/seat-reservation-base-element.js +0 -1476
- package/development/seat-reservation/seat-reservation/seat-reservation.component.d.ts.map +0 -1
- package/development/seat-reservation/seat-reservation/seat-reservation.component.js +0 -2
- package/development/seat-reservation/seat-reservation-area/seat-reservation-area.component.d.ts.map +0 -1
- package/development/seat-reservation/seat-reservation-area/seat-reservation-area.component.js +0 -2
- package/development/seat-reservation/seat-reservation-graphic/seat-reservation-graphic.component.d.ts.map +0 -1
- package/development/seat-reservation/seat-reservation-graphic/seat-reservation-graphic.component.js +0 -2
- package/development/seat-reservation/seat-reservation-navigation-coach/seat-reservation-navigation-coach.component.d.ts.map +0 -1
- package/development/seat-reservation/seat-reservation-navigation-coach/seat-reservation-navigation-coach.component.js +0 -2
- package/development/seat-reservation/seat-reservation-navigation-services/seat-reservation-navigation-services.component.d.ts.map +0 -1
- package/development/seat-reservation/seat-reservation-navigation-services/seat-reservation-navigation-services.component.js +0 -2
- package/development/seat-reservation/seat-reservation-place-control/seat-reservation-place-control.component.d.ts.map +0 -1
- package/development/seat-reservation/seat-reservation-place-control/seat-reservation-place-control.component.js +0 -2
- package/development/seat-reservation/seat-reservation-scoped/seat-reservation-scoped.component.d.ts.map +0 -1
- package/development/seat-reservation/seat-reservation-scoped/seat-reservation-scoped.component.js +0 -2
- package/development/seat-reservation-area.component-DPhQJFid.js +0 -94
- package/development/seat-reservation-graphic.component-0LYsmerm.js +0 -129
- package/development/seat-reservation-navigation-coach.component-B97jKD7Y.js +0 -438
- package/development/seat-reservation-navigation-services.component-Cx0Is97w.js +0 -159
- package/development/seat-reservation-place-control.component-DaL1g8WH.js +0 -431
- package/development/seat-reservation-scoped.component-BHbORVsR.js +0 -24
- package/development/seat-reservation.component-DI9pSlzt.js +0 -473
- package/development/seat-reservation.d.ts.map +0 -1
- package/development/seat-reservation.pure.d.ts.map +0 -1
- package/development/svgs-Dj-RKmRs.js +0 -28
- package/development/timetable-duration/timetable-duration.component.d.ts.map +0 -1
- package/development/timetable-duration/timetable-duration.component.js +0 -2
- package/development/timetable-duration.component-Chk5D4Is.js +0 -96
- package/development/timetable-duration.d.ts.map +0 -1
- package/development/timetable-duration.pure.d.ts.map +0 -1
- package/development/timetable-row/timetable-row.component.d.ts.map +0 -1
- package/development/timetable-row/timetable-row.component.js +0 -2
- package/development/timetable-row.component-nzrQzxL6.js +0 -736
- package/development/timetable-row.d.ts.map +0 -1
- package/development/timetable-row.pure.d.ts.map +0 -1
- package/development/toDate-CDWut5fS.js +0 -150
- package/differenceInMinutes-BAZ-Fham.js +0 -27
- package/format-DjgG1QPc.js +0 -1103
- package/isValid-CXnsFZVu.js +0 -36
- package/journey-summary/journey-summary.component.js +0 -2
- package/journey-summary.component-DNoO3OCf.js +0 -265
- package/mapper-Dcou8VEf.js +0 -11382
- package/pearl-chain/pearl-chain.component.js +0 -2
- package/pearl-chain-time/pearl-chain-time.component.js +0 -2
- package/pearl-chain-time.component-BuvA6IE1.js +0 -237
- package/pearl-chain-vertical/pearl-chain-vertical.component.js +0 -2
- package/pearl-chain-vertical-item/pearl-chain-vertical-item.component.js +0 -2
- package/pearl-chain-vertical-item.component-QZ4s8Jbv.js +0 -106
- package/pearl-chain-vertical.component-Dc3vaHsQ.js +0 -20
- package/pearl-chain.component-DtGXXkY6.js +0 -190
- package/seat-reservation/common/mapper/icon-mapper.js +0 -72
- package/seat-reservation/common/mapper/mapper.js +0 -2
- package/seat-reservation/common/mapper.js +0 -3
- package/seat-reservation/common/svgs.js +0 -2
- package/seat-reservation/common/translations/i18n.js +0 -1085
- package/seat-reservation/common/translations.js +0 -2
- package/seat-reservation/common/types.js +0 -0
- package/seat-reservation/seat-reservation/seat-reservation-base-element.js +0 -926
- package/seat-reservation/seat-reservation/seat-reservation.component.js +0 -2
- package/seat-reservation/seat-reservation-area/seat-reservation-area.component.js +0 -2
- package/seat-reservation/seat-reservation-graphic/seat-reservation-graphic.component.js +0 -2
- package/seat-reservation/seat-reservation-navigation-coach/seat-reservation-navigation-coach.component.js +0 -2
- package/seat-reservation/seat-reservation-navigation-services/seat-reservation-navigation-services.component.js +0 -2
- package/seat-reservation/seat-reservation-place-control/seat-reservation-place-control.component.js +0 -2
- package/seat-reservation/seat-reservation-scoped/seat-reservation-scoped.component.js +0 -2
- package/seat-reservation-area.component-G9lHb7S8.js +0 -73
- package/seat-reservation-graphic.component-BXFcQDxY.js +0 -102
- package/seat-reservation-navigation-coach.component-BXy8EkJe.js +0 -338
- package/seat-reservation-navigation-services.component-49XmV9rv.js +0 -124
- package/seat-reservation-place-control.component-DToIW328.js +0 -317
- package/seat-reservation-scoped.component-D8dAmrP7.js +0 -16
- package/seat-reservation.component--0XnrCkk.js +0 -372
- package/svgs-D4fuYTHV.js +0 -26
- package/timetable-duration/timetable-duration.component.js +0 -2
- package/timetable-duration.component-iMCvh1zr.js +0 -61
- package/timetable-row/timetable-row.component.js +0 -2
- package/timetable-row.component-mNKmhRmP.js +0 -566
- package/toDate-BhNUyM4s.js +0 -16
|
@@ -1,237 +0,0 @@
|
|
|
1
|
-
import { t as e } from "./format-DjgG1QPc.js";
|
|
2
|
-
import { SbbElement as t, SbbLanguageController as n, defaultDateAdapter as r, forceType as i, i18nArrival as a, i18nDeparture as o, i18nTransferProcedures as s, screenReaderOnlyStyles as c } from "@sbb-esta/lyne-elements/core.js";
|
|
3
|
-
import { SbbIconElement as l } from "@sbb-esta/lyne-elements/icon.pure.js";
|
|
4
|
-
import { html as u, nothing as d, unsafeCSS as f } from "lit";
|
|
5
|
-
import { __esDecorate as p, __runInitializers as m } from "tslib";
|
|
6
|
-
import { property as h } from "lit/decorators.js";
|
|
7
|
-
import { getDepartureArrivalTimeAttribute as g, isRideLeg as _, removeTimezoneFromISOTimeString as v } from "./core.js";
|
|
8
|
-
import { SbbPearlChainElement as y } from "./pearl-chain.pure.js";
|
|
9
|
-
//#region src/elements-experimental/pearl-chain-time/pearl-chain-time.scss?inline
|
|
10
|
-
var b = ":host{display:block;--sbb-pearl-chain-time-height: auto}@media(min-width:37.5rem){:host{--sbb-pearl-chain-time-height: 1.5625rem}}@media(min-width:64rem){:host{--sbb-pearl-chain-time-height: 1.75rem}}.sbb-pearl-chain__time{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:center;height:var(--sbb-pearl-chain-time-height)}.sbb-pearl-chain__time-walktime,.sbb-pearl-chain__time-transfer{--sbb-text-font-size: var(--sbb-text-font-size-xxs);font-family:var(--sbb-typo-font-family);font-weight:400;line-height:var(--sbb-typo-line-height-text);letter-spacing:var(--sbb-typo-letter-spacing-text);font-size:var(--sbb-text-font-size);display:inline-flex;align-items:center}.sbb-pearl-chain__time-walktime--walk-small-left{transform:translate(-.4375rem);margin-inline-end:calc(var(--sbb-spacing-fixed-2x) - .4375rem)}.sbb-pearl-chain__time-walktime--walk-small-right{margin-inline-start:calc(var(--sbb-spacing-fixed-2x) - .25rem)}.sbb-pearl-chain__time-walktime--wheelchair-small-left{transform:translate(-.375rem);margin-inline-end:calc(var(--sbb-spacing-fixed-2x) - .4375rem)}.sbb-pearl-chain__time-walktime--wheelchair-small-right{margin-inline-start:calc(var(--sbb-spacing-fixed-2x) - .25rem)}.sbb-pearl-chain__time-walktime-prime-symbol{float:right}.sbb-pearl-chain__time-transfer{gap:var(--sbb-spacing-fixed-1x)}.sbb-pearl-chain__time-transfer--sa-ci-departure{margin-inline-end:var(--sbb-spacing-fixed-2x)}.sbb-pearl-chain__time-transfer--sa-ci-arrival{margin-inline-start:calc(var(--sbb-spacing-fixed-2x) - .25rem)}.sbb-pearl-chain__time-chain{flex:1 1 auto;align-self:center;margin-inline:var(--sbb-spacing-fixed-3x)}.sbb-pearl-chain__time-time{--sbb-text-font-size: var(--sbb-text-font-size-s);font-family:var(--sbb-typo-font-family);font-weight:400;line-height:var(--sbb-typo-line-height-text);letter-spacing:var(--sbb-typo-letter-spacing-text);font-size:var(--sbb-text-font-size);font-weight:700;color:var(--sbb-color-2)}", x = (() => {
|
|
11
|
-
let x = t, S = [], C, w = [], T = [], E, D = [], O = [], k, A = [], j = [], M, N = [], P = [], F, I = [], L = [], R, z = [], B = [], V, H = [], U = [], W;
|
|
12
|
-
return class extends x {
|
|
13
|
-
constructor() {
|
|
14
|
-
super(...arguments), this.#e = (m(this, S), m(this, w, [])), this.#t = (m(this, T), m(this, D, "")), this.#n = (m(this, O), m(this, A, "")), this.#r = (m(this, j), m(this, N, NaN)), this.#i = (m(this, P), m(this, I, NaN)), this.#a = (m(this, L), m(this, z, !1)), this.#o = (m(this, B), m(this, H, !1)), this._now = (m(this, U), null), this._language = new n(this);
|
|
15
|
-
}
|
|
16
|
-
static {
|
|
17
|
-
let e = typeof Symbol == "function" && Symbol.metadata ? Object.create(x[Symbol.metadata] ?? null) : void 0;
|
|
18
|
-
C = [h({ type: Array })], E = [i(), h({ attribute: "departure-time" })], k = [i(), h({ attribute: "arrival-time" })], M = [i(), h({
|
|
19
|
-
attribute: "departure-walk",
|
|
20
|
-
type: Number
|
|
21
|
-
})], F = [i(), h({
|
|
22
|
-
attribute: "arrival-walk",
|
|
23
|
-
type: Number
|
|
24
|
-
})], R = [i(), h({
|
|
25
|
-
attribute: "disable-animation",
|
|
26
|
-
type: Boolean
|
|
27
|
-
})], V = [i(), h({
|
|
28
|
-
attribute: "a11y-footpath",
|
|
29
|
-
type: Boolean
|
|
30
|
-
})], W = [h()], p(this, null, C, {
|
|
31
|
-
kind: "accessor",
|
|
32
|
-
name: "legs",
|
|
33
|
-
static: !1,
|
|
34
|
-
private: !1,
|
|
35
|
-
access: {
|
|
36
|
-
has: (e) => "legs" in e,
|
|
37
|
-
get: (e) => e.legs,
|
|
38
|
-
set: (e, t) => {
|
|
39
|
-
e.legs = t;
|
|
40
|
-
}
|
|
41
|
-
},
|
|
42
|
-
metadata: e
|
|
43
|
-
}, w, T), p(this, null, E, {
|
|
44
|
-
kind: "accessor",
|
|
45
|
-
name: "departureTime",
|
|
46
|
-
static: !1,
|
|
47
|
-
private: !1,
|
|
48
|
-
access: {
|
|
49
|
-
has: (e) => "departureTime" in e,
|
|
50
|
-
get: (e) => e.departureTime,
|
|
51
|
-
set: (e, t) => {
|
|
52
|
-
e.departureTime = t;
|
|
53
|
-
}
|
|
54
|
-
},
|
|
55
|
-
metadata: e
|
|
56
|
-
}, D, O), p(this, null, k, {
|
|
57
|
-
kind: "accessor",
|
|
58
|
-
name: "arrivalTime",
|
|
59
|
-
static: !1,
|
|
60
|
-
private: !1,
|
|
61
|
-
access: {
|
|
62
|
-
has: (e) => "arrivalTime" in e,
|
|
63
|
-
get: (e) => e.arrivalTime,
|
|
64
|
-
set: (e, t) => {
|
|
65
|
-
e.arrivalTime = t;
|
|
66
|
-
}
|
|
67
|
-
},
|
|
68
|
-
metadata: e
|
|
69
|
-
}, A, j), p(this, null, M, {
|
|
70
|
-
kind: "accessor",
|
|
71
|
-
name: "departureWalk",
|
|
72
|
-
static: !1,
|
|
73
|
-
private: !1,
|
|
74
|
-
access: {
|
|
75
|
-
has: (e) => "departureWalk" in e,
|
|
76
|
-
get: (e) => e.departureWalk,
|
|
77
|
-
set: (e, t) => {
|
|
78
|
-
e.departureWalk = t;
|
|
79
|
-
}
|
|
80
|
-
},
|
|
81
|
-
metadata: e
|
|
82
|
-
}, N, P), p(this, null, F, {
|
|
83
|
-
kind: "accessor",
|
|
84
|
-
name: "arrivalWalk",
|
|
85
|
-
static: !1,
|
|
86
|
-
private: !1,
|
|
87
|
-
access: {
|
|
88
|
-
has: (e) => "arrivalWalk" in e,
|
|
89
|
-
get: (e) => e.arrivalWalk,
|
|
90
|
-
set: (e, t) => {
|
|
91
|
-
e.arrivalWalk = t;
|
|
92
|
-
}
|
|
93
|
-
},
|
|
94
|
-
metadata: e
|
|
95
|
-
}, I, L), p(this, null, R, {
|
|
96
|
-
kind: "accessor",
|
|
97
|
-
name: "disableAnimation",
|
|
98
|
-
static: !1,
|
|
99
|
-
private: !1,
|
|
100
|
-
access: {
|
|
101
|
-
has: (e) => "disableAnimation" in e,
|
|
102
|
-
get: (e) => e.disableAnimation,
|
|
103
|
-
set: (e, t) => {
|
|
104
|
-
e.disableAnimation = t;
|
|
105
|
-
}
|
|
106
|
-
},
|
|
107
|
-
metadata: e
|
|
108
|
-
}, z, B), p(this, null, V, {
|
|
109
|
-
kind: "accessor",
|
|
110
|
-
name: "a11yFootpath",
|
|
111
|
-
static: !1,
|
|
112
|
-
private: !1,
|
|
113
|
-
access: {
|
|
114
|
-
has: (e) => "a11yFootpath" in e,
|
|
115
|
-
get: (e) => e.a11yFootpath,
|
|
116
|
-
set: (e, t) => {
|
|
117
|
-
e.a11yFootpath = t;
|
|
118
|
-
}
|
|
119
|
-
},
|
|
120
|
-
metadata: e
|
|
121
|
-
}, H, U), p(this, null, W, {
|
|
122
|
-
kind: "setter",
|
|
123
|
-
name: "now",
|
|
124
|
-
static: !1,
|
|
125
|
-
private: !1,
|
|
126
|
-
access: {
|
|
127
|
-
has: (e) => "now" in e,
|
|
128
|
-
set: (e, t) => {
|
|
129
|
-
e.now = t;
|
|
130
|
-
}
|
|
131
|
-
},
|
|
132
|
-
metadata: e
|
|
133
|
-
}, null, S), e && Object.defineProperty(this, Symbol.metadata, {
|
|
134
|
-
enumerable: !0,
|
|
135
|
-
configurable: !0,
|
|
136
|
-
writable: !0,
|
|
137
|
-
value: e
|
|
138
|
-
});
|
|
139
|
-
}
|
|
140
|
-
static {
|
|
141
|
-
this.elementName = "sbb-pearl-chain-time";
|
|
142
|
-
}
|
|
143
|
-
static {
|
|
144
|
-
this.elementDependencies = [l, y];
|
|
145
|
-
}
|
|
146
|
-
static {
|
|
147
|
-
this.styles = [c, f(b)];
|
|
148
|
-
}
|
|
149
|
-
#e;
|
|
150
|
-
get legs() {
|
|
151
|
-
return this.#e;
|
|
152
|
-
}
|
|
153
|
-
set legs(e) {
|
|
154
|
-
this.#e = e;
|
|
155
|
-
}
|
|
156
|
-
#t;
|
|
157
|
-
get departureTime() {
|
|
158
|
-
return this.#t;
|
|
159
|
-
}
|
|
160
|
-
set departureTime(e) {
|
|
161
|
-
this.#t = e;
|
|
162
|
-
}
|
|
163
|
-
#n;
|
|
164
|
-
get arrivalTime() {
|
|
165
|
-
return this.#n;
|
|
166
|
-
}
|
|
167
|
-
set arrivalTime(e) {
|
|
168
|
-
this.#n = e;
|
|
169
|
-
}
|
|
170
|
-
#r;
|
|
171
|
-
get departureWalk() {
|
|
172
|
-
return this.#r;
|
|
173
|
-
}
|
|
174
|
-
set departureWalk(e) {
|
|
175
|
-
this.#r = e;
|
|
176
|
-
}
|
|
177
|
-
#i;
|
|
178
|
-
get arrivalWalk() {
|
|
179
|
-
return this.#i;
|
|
180
|
-
}
|
|
181
|
-
set arrivalWalk(e) {
|
|
182
|
-
this.#i = e;
|
|
183
|
-
}
|
|
184
|
-
#a;
|
|
185
|
-
get disableAnimation() {
|
|
186
|
-
return this.#a;
|
|
187
|
-
}
|
|
188
|
-
set disableAnimation(e) {
|
|
189
|
-
this.#a = e;
|
|
190
|
-
}
|
|
191
|
-
#o;
|
|
192
|
-
get a11yFootpath() {
|
|
193
|
-
return this.#o;
|
|
194
|
-
}
|
|
195
|
-
set a11yFootpath(e) {
|
|
196
|
-
this.#o = e;
|
|
197
|
-
}
|
|
198
|
-
set now(e) {
|
|
199
|
-
this._now = r.getValidDateOrNull(r.deserialize(e));
|
|
200
|
-
}
|
|
201
|
-
get now() {
|
|
202
|
-
return this._now ?? /* @__PURE__ */ new Date();
|
|
203
|
-
}
|
|
204
|
-
render() {
|
|
205
|
-
let t = this.departureTime ? v(this.departureTime) : void 0, n = this.arrivalTime ? v(this.arrivalTime) : void 0, { renderDepartureTimeAttribute: r, renderArrivalTimeAttribute: i } = g(this.legs, this.departureWalk || 0, this.arrivalWalk || 0, this._language.current, this.a11yFootpath), c = this.legs?.filter((e) => _(e));
|
|
206
|
-
return u`
|
|
207
|
-
<div class="sbb-pearl-chain__time">
|
|
208
|
-
${r()}
|
|
209
|
-
${t ? u`<time class="sbb-pearl-chain__time-time" datetime=${this.departureTime}>
|
|
210
|
-
<span class="sbb-screen-reader-only"
|
|
211
|
-
>${o[this._language.current]}: </span
|
|
212
|
-
>
|
|
213
|
-
${e(t, "HH:mm")}
|
|
214
|
-
</time>` : d}
|
|
215
|
-
${c?.length > 1 ? u`<span class="sbb-screen-reader-only" role="paragraph">
|
|
216
|
-
${c?.length - 1} ${s[this._language.current]}
|
|
217
|
-
</span>` : d}
|
|
218
|
-
<sbb-pearl-chain
|
|
219
|
-
class="sbb-pearl-chain__time-chain"
|
|
220
|
-
.legs=${this.legs}
|
|
221
|
-
.disableAnimation=${this.disableAnimation}
|
|
222
|
-
.now=${this.now}
|
|
223
|
-
></sbb-pearl-chain>
|
|
224
|
-
${n ? u`<time class="sbb-pearl-chain__time-time" datetime=${this.arrivalTime}>
|
|
225
|
-
<span class="sbb-screen-reader-only"
|
|
226
|
-
>${a[this._language.current]}: </span
|
|
227
|
-
>
|
|
228
|
-
${e(n, "HH:mm")}
|
|
229
|
-
</time>` : d}
|
|
230
|
-
${i()}
|
|
231
|
-
</div>
|
|
232
|
-
`;
|
|
233
|
-
}
|
|
234
|
-
};
|
|
235
|
-
})();
|
|
236
|
-
//#endregion
|
|
237
|
-
export { x as t };
|
|
@@ -1,106 +0,0 @@
|
|
|
1
|
-
import { SbbElement as e, forceType as t } from "@sbb-esta/lyne-elements/core.js";
|
|
2
|
-
import { html as n, nothing as r, unsafeCSS as i } from "lit";
|
|
3
|
-
import { __esDecorate as a, __runInitializers as o } from "tslib";
|
|
4
|
-
import { property as s } from "lit/decorators.js";
|
|
5
|
-
import { styleMap as c } from "lit/directives/style-map.js";
|
|
6
|
-
//#region src/elements-experimental/pearl-chain-vertical-item/pearl-chain-vertical-item.scss?inline
|
|
7
|
-
var l = ":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%;translate:-50% 0;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}", u = (() => {
|
|
8
|
-
let u = e, d, f = [], p = [], m, h = [], g = [];
|
|
9
|
-
return class extends u {
|
|
10
|
-
static {
|
|
11
|
-
let e = typeof Symbol == "function" && Symbol.metadata ? Object.create(u[Symbol.metadata] ?? null) : void 0;
|
|
12
|
-
d = [s({
|
|
13
|
-
attribute: "pearl-chain-vertical-item-attributes",
|
|
14
|
-
type: Object
|
|
15
|
-
})], m = [t(), s({
|
|
16
|
-
attribute: "disable-animation",
|
|
17
|
-
reflect: !0,
|
|
18
|
-
type: Boolean
|
|
19
|
-
})], a(this, null, d, {
|
|
20
|
-
kind: "accessor",
|
|
21
|
-
name: "pearlChainVerticalItemAttributes",
|
|
22
|
-
static: !1,
|
|
23
|
-
private: !1,
|
|
24
|
-
access: {
|
|
25
|
-
has: (e) => "pearlChainVerticalItemAttributes" in e,
|
|
26
|
-
get: (e) => e.pearlChainVerticalItemAttributes,
|
|
27
|
-
set: (e, t) => {
|
|
28
|
-
e.pearlChainVerticalItemAttributes = t;
|
|
29
|
-
}
|
|
30
|
-
},
|
|
31
|
-
metadata: e
|
|
32
|
-
}, f, p), a(this, null, m, {
|
|
33
|
-
kind: "accessor",
|
|
34
|
-
name: "disableAnimation",
|
|
35
|
-
static: !1,
|
|
36
|
-
private: !1,
|
|
37
|
-
access: {
|
|
38
|
-
has: (e) => "disableAnimation" in e,
|
|
39
|
-
get: (e) => e.disableAnimation,
|
|
40
|
-
set: (e, t) => {
|
|
41
|
-
e.disableAnimation = t;
|
|
42
|
-
}
|
|
43
|
-
},
|
|
44
|
-
metadata: e
|
|
45
|
-
}, h, g), e && Object.defineProperty(this, Symbol.metadata, {
|
|
46
|
-
enumerable: !0,
|
|
47
|
-
configurable: !0,
|
|
48
|
-
writable: !0,
|
|
49
|
-
value: e
|
|
50
|
-
});
|
|
51
|
-
}
|
|
52
|
-
static {
|
|
53
|
-
this.elementName = "sbb-pearl-chain-vertical-item";
|
|
54
|
-
}
|
|
55
|
-
static {
|
|
56
|
-
this.styles = [i(l)];
|
|
57
|
-
}
|
|
58
|
-
#e = o(this, f, null);
|
|
59
|
-
get pearlChainVerticalItemAttributes() {
|
|
60
|
-
return this.#e;
|
|
61
|
-
}
|
|
62
|
-
set pearlChainVerticalItemAttributes(e) {
|
|
63
|
-
this.#e = e;
|
|
64
|
-
}
|
|
65
|
-
#t = (o(this, p), o(this, h, !1));
|
|
66
|
-
get disableAnimation() {
|
|
67
|
-
return this.#t;
|
|
68
|
-
}
|
|
69
|
-
set disableAnimation(e) {
|
|
70
|
-
this.#t = e;
|
|
71
|
-
}
|
|
72
|
-
render() {
|
|
73
|
-
let { bulletType: e, lineType: t, lineColor: i, hideLine: a, minHeight: o, bulletSize: s, position: l } = this.pearlChainVerticalItemAttributes || {}, u = l && l > 0 && l <= 100 ? "sbb-pearl-chain-vertical-item__bullet--past" : `sbb-pearl-chain-vertical-item__bullet--${e}`;
|
|
74
|
-
return n`
|
|
75
|
-
<div
|
|
76
|
-
class="sbb-pearl-chain-vertical-item__column"
|
|
77
|
-
style=${c({ height: `${o}px` })}
|
|
78
|
-
>
|
|
79
|
-
<slot name="left"></slot>
|
|
80
|
-
</div>
|
|
81
|
-
<div
|
|
82
|
-
aria-hidden="true"
|
|
83
|
-
class="sbb-pearl-chain-vertical-item__column sbb-pearl-chain-vertical-item__column--middle"
|
|
84
|
-
>
|
|
85
|
-
${a ? r : n`<div
|
|
86
|
-
style=${c({ "--sbb-pearl-chain-vertical-item-leg-status": `${l}%` })}
|
|
87
|
-
class="sbb-pearl-chain-vertical-item__line sbb-pearl-chain-vertical-item__line--${t} sbb-pearl-chain-vertical-item__line--${i}"
|
|
88
|
-
></div>`}
|
|
89
|
-
${e ? n`<div
|
|
90
|
-
class="sbb-pearl-chain-vertical-item__bullet sbb-pearl-chain-vertical-item__bullet--${s} ${u}"
|
|
91
|
-
></div>` : r}
|
|
92
|
-
${l && l > 0 ? n`<div
|
|
93
|
-
style=${c({ "--sbb-pearl-chain-vertical-item-position": `${l}%` })}
|
|
94
|
-
class="sbb-pearl-chain-vertical-item__bullet--position"
|
|
95
|
-
></div>` : r}
|
|
96
|
-
</div>
|
|
97
|
-
<slot name="right"></slot>
|
|
98
|
-
`;
|
|
99
|
-
}
|
|
100
|
-
constructor() {
|
|
101
|
-
super(...arguments), o(this, g);
|
|
102
|
-
}
|
|
103
|
-
};
|
|
104
|
-
})();
|
|
105
|
-
//#endregion
|
|
106
|
-
export { u as t };
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { SbbElement as e } from "@sbb-esta/lyne-elements/core.js";
|
|
2
|
-
import { html as t, unsafeCSS as n } from "lit";
|
|
3
|
-
//#region src/elements-experimental/pearl-chain-vertical/pearl-chain-vertical.scss?inline
|
|
4
|
-
var r = ":host{--sbb-pearl-chain-vertical-width: 100%;display:block}.sbb-pearl-chain-vertical{display:table;width:var(--sbb-pearl-chain-vertical-width)}", i = class extends e {
|
|
5
|
-
static {
|
|
6
|
-
this.elementName = "sbb-pearl-chain-vertical";
|
|
7
|
-
}
|
|
8
|
-
static {
|
|
9
|
-
this.styles = [n(r)];
|
|
10
|
-
}
|
|
11
|
-
render() {
|
|
12
|
-
return t`
|
|
13
|
-
<div class="sbb-pearl-chain-vertical">
|
|
14
|
-
<slot></slot>
|
|
15
|
-
</div>
|
|
16
|
-
`;
|
|
17
|
-
}
|
|
18
|
-
};
|
|
19
|
-
//#endregion
|
|
20
|
-
export { i as t };
|
|
@@ -1,190 +0,0 @@
|
|
|
1
|
-
import { t as e } from "./toDate-BhNUyM4s.js";
|
|
2
|
-
import { r as t, t as n } from "./differenceInMinutes-BAZ-Fham.js";
|
|
3
|
-
import { SbbElement as r, defaultDateAdapter as i, forceType as a, screenReaderOnlyStyles as o } from "@sbb-esta/lyne-elements/core.js";
|
|
4
|
-
import { html as s, nothing as c, unsafeCSS as l } from "lit";
|
|
5
|
-
import { __esDecorate as u, __runInitializers as d } from "tslib";
|
|
6
|
-
import { property as f } from "lit/decorators.js";
|
|
7
|
-
import { isRideLeg as p, removeTimezoneFromISOTimeString as m } from "./core.js";
|
|
8
|
-
import { styleMap as h } from "lit/directives/style-map.js";
|
|
9
|
-
//#region node_modules/date-fns/isAfter.js
|
|
10
|
-
function g(t, n) {
|
|
11
|
-
return +e(t) > +e(n);
|
|
12
|
-
}
|
|
13
|
-
//#endregion
|
|
14
|
-
//#region node_modules/date-fns/isBefore.js
|
|
15
|
-
function _(t, n) {
|
|
16
|
-
return +e(t) < +e(n);
|
|
17
|
-
}
|
|
18
|
-
//#endregion
|
|
19
|
-
//#region src/elements-experimental/pearl-chain/pearl-chain.scss?inline
|
|
20
|
-
var v = ":host{--sbb-pearl-chain-height: var(--sbb-border-width-2x);--sbb-pearl-chain-spacing-small: .125rem;--sbb-pearl-chain-color: var(--sbb-pearl-chain-bullet-color);--sbb-pearl-chain-color-disruption: var(--sbb-pearl-chain-bullet-color-disruption);--sbb-pearl-chain-color-past: var(--sbb-pearl-chain-bullet-color-past);--sbb-pearl-chain-leg-width: 100%;display:block;--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}.sbb-pearl-chain{position:relative;display:flex;justify-content:space-between;flex-wrap:nowrap;color:var(--sbb-pearl-chain-color);width:100%;padding-block:calc((var(--sbb-pearl-chain-bullet-size-start-end) - var(--sbb-pearl-chain-height)) / 2);padding-inline-end:var(--sbb-pearl-chain-bullet-size-start-end)}.sbb-pearl-chain__bullet{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__bullet{--sbb-pearl-chain-bullet-color: CanvasText}}.sbb-pearl-chain__bullet{content:\"\";position:absolute;background-color:currentcolor;inset-block-start:0;z-index:3}.sbb-pearl-chain__bullet:first-of-type{inset-inline-start:0}.sbb-pearl-chain__bullet:last-of-type{inset-inline-end:0}.sbb-pearl-chain__leg{flex-shrink:0;flex-grow:0;position:relative;height:var(--sbb-pearl-chain-height);border-inline-end:var(--sbb-pearl-chain-spacing-small) solid Canvas;background-color:currentcolor;width:var(--sbb-pearl-chain-leg-width);display:flex;align-items:center}@media(forced-colors:active){.sbb-pearl-chain__leg{background-color:CanvasText}.sbb-pearl-chain--past .sbb-pearl-chain__leg{background-color:GrayText}}.sbb-pearl-chain__leg:last-of-type{border:none}.sbb-pearl-chain__stop{position:relative;z-index:2;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__stop{--sbb-pearl-chain-bullet-color: CanvasText}}.sbb-pearl-chain__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__bullet--future{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__bullet--future{--sbb-pearl-chain-bullet-color: CanvasText}}.sbb-pearl-chain__leg--past,.sbb-pearl-chain--past,.sbb-pearl-chain__leg--past:after,.sbb-pearl-chain__leg--progress:after,.sbb-pearl-chain__leg--progress .sbb-pearl-chain__stop,.sbb-pearl-chain--progress,.sbb-pearl-chain__bullet--past{color:var(--sbb-pearl-chain-color-past);--sbb-pearl-chain-bullet-color: var(--sbb-pearl-chain-bullet-color-past)}@media(forced-colors:active){.sbb-pearl-chain__leg--past,.sbb-pearl-chain--past,.sbb-pearl-chain__leg--past:after,.sbb-pearl-chain__leg--progress:after,.sbb-pearl-chain__leg--progress .sbb-pearl-chain__stop,.sbb-pearl-chain--progress,.sbb-pearl-chain__bullet--past{--sbb-pearl-chain-bullet-color: GrayText !important}}@media(forced-colors:active){.sbb-pearl-chain__leg--past,.sbb-pearl-chain--past,.sbb-pearl-chain__leg--past:after,.sbb-pearl-chain__leg--progress:after,.sbb-pearl-chain__leg--progress .sbb-pearl-chain__stop,.sbb-pearl-chain--progress,.sbb-pearl-chain__bullet--past{background-color:GrayText!important}}.sbb-pearl-chain__bullet--progress{background:var(--sbb-pearl-chain-bullet-color);--sbb-pearl-chain-bullet-color: var(--sbb-pearl-chain-bullet-color-past)}@media(forced-colors:active){.sbb-pearl-chain__bullet--progress{--sbb-pearl-chain-bullet-color: GrayText !important}}.sbb-pearl-chain__bullet--departure-disruption,.sbb-pearl-chain--arrival-disruption,.sbb-pearl-chain--departure-disruption,.sbb-pearl-chain__leg--disruption{color:var(--sbb-pearl-chain-color-disruption);--sbb-pearl-chain-bullet-color: var(--sbb-pearl-chain-bullet-color-disruption)}@media(forced-colors:active){.sbb-pearl-chain__bullet--departure-disruption,.sbb-pearl-chain--arrival-disruption,.sbb-pearl-chain--departure-disruption,.sbb-pearl-chain__leg--disruption{--sbb-pearl-chain-bullet-color: Highlight}}@media(forced-colors:active){.sbb-pearl-chain__bullet--departure-disruption,.sbb-pearl-chain--arrival-disruption,.sbb-pearl-chain--departure-disruption,.sbb-pearl-chain__leg--disruption{color:Highlight;background:Highlight}}.sbb-pearl-chain__leg--disruption .sbb-pearl-chain__stop{--sbb-pearl-chain-bullet-color: var(--sbb-pearl-chain-bullet-color-disruption)}@media(forced-colors:active){.sbb-pearl-chain__leg--disruption .sbb-pearl-chain__stop{--sbb-pearl-chain-bullet-color: Highlight}}.sbb-pearl-chain__leg--past .sbb-pearl-chain__stop{--sbb-pearl-chain-bullet-color: var(--sbb-pearl-chain-bullet-color-past)}@media(forced-colors:active){.sbb-pearl-chain__leg--past .sbb-pearl-chain__stop{--sbb-pearl-chain-bullet-color: GrayText !important}}.sbb-pearl-chain__leg--disruption:after{background-color:unset;background-image:linear-gradient(to right,currentcolor 0%,currentcolor 50%,Canvas 50%);background-repeat:repeat-x;background-size:calc(2 * var(--sbb-pearl-chain-spacing-small)) var(--sbb-pearl-chain-height);inset-inline-end:var(--sbb-pearl-chain-height)}@media(forced-colors:active){.sbb-pearl-chain__leg--disruption:after{background:unset;border-block-start:.0625rem dashed Highlight;transform:translateY(.0625rem)}}.sbb-pearl-chain__leg--skipped{color:var(--sbb-pearl-chain-color-disruption)}.sbb-pearl-chain__leg--skipped:after{background-color:unset;background-image:linear-gradient(to right,currentcolor 0%,currentcolor 50%,Canvas 50%);background-repeat:repeat-x;background-size:calc(2 * var(--sbb-pearl-chain-spacing-small)) var(--sbb-pearl-chain-height);inset-inline-end:var(--sbb-pearl-chain-height)}@media(forced-colors:active){.sbb-pearl-chain__leg--skipped:after{background:unset;border-block-start:.0625rem dashed Highlight;transform:translateY(.0625rem)}}.sbb-pearl-chain__stop--departure-skipped{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__stop--departure-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__stop--departure-skipped:before{background:Highlight}}.sbb-pearl-chain--arrival-skipped,.sbb-pearl-chain--departure-skipped{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);border:var(--sbb-pearl-chain-bullet-border-width) solid currentcolor;background:Canvas}.sbb-pearl-chain--arrival-skipped:before,.sbb-pearl-chain--departure-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--arrival-skipped:before,.sbb-pearl-chain--departure-skipped:before{background:Highlight}}.sbb-pearl-chain__leg:after{content:\"\";position:absolute;inset-block:0;inset-inline-start:0;background-color:currentcolor;border-radius:var(--sbb-pearl-chain-height);z-index:1}@media(forced-colors:active){.sbb-pearl-chain__leg:after{background-color:CanvasText}.sbb-pearl-chain--past .sbb-pearl-chain__leg:after{background-color:GrayText}}.sbb-pearl-chain__leg:last-of-type:after{inset-inline-end:calc(-1 * var(--sbb-pearl-chain-height))}.sbb-pearl-chain__leg--progress:after{background-color:var(--sbb-pearl-chain-color-past);width:var(--sbb-pearl-chain-leg-status)}.sbb-pearl-chain__position{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__position{--sbb-pearl-chain-bullet-color: CanvasText}}.sbb-pearl-chain__position{--sbb-pearl-chain-bullet-color: var(--sbb-pearl-chain-position-color)}@media(forced-colors:active){.sbb-pearl-chain__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__position{animation:pearl-chain-bullet-position-pulse var(--sbb-pearl-chain-bullet-animation-duration) var(--sbb-pearl-chain-bullet-animation-easing) infinite;position:absolute;inset-block-start:-200%;z-index:4;inset-inline-start:var(--sbb-pearl-chain-status-position)}.sbb-pearl-chain__position--no-animation{animation:unset}", y = (() => {
|
|
21
|
-
let e = r, y = [], b, x = [], S = [], C, w = [], T = [], E;
|
|
22
|
-
return class extends e {
|
|
23
|
-
constructor() {
|
|
24
|
-
super(...arguments), this.#e = (d(this, y), d(this, x, [])), this.#t = (d(this, S), d(this, w, !1)), this._now = (d(this, T), null);
|
|
25
|
-
}
|
|
26
|
-
static {
|
|
27
|
-
let t = typeof Symbol == "function" && Symbol.metadata ? Object.create(e[Symbol.metadata] ?? null) : void 0;
|
|
28
|
-
b = [f({ type: Array })], C = [a(), f({
|
|
29
|
-
attribute: "disable-animation",
|
|
30
|
-
type: Boolean
|
|
31
|
-
})], E = [f()], u(this, null, b, {
|
|
32
|
-
kind: "accessor",
|
|
33
|
-
name: "legs",
|
|
34
|
-
static: !1,
|
|
35
|
-
private: !1,
|
|
36
|
-
access: {
|
|
37
|
-
has: (e) => "legs" in e,
|
|
38
|
-
get: (e) => e.legs,
|
|
39
|
-
set: (e, t) => {
|
|
40
|
-
e.legs = t;
|
|
41
|
-
}
|
|
42
|
-
},
|
|
43
|
-
metadata: t
|
|
44
|
-
}, x, S), u(this, null, C, {
|
|
45
|
-
kind: "accessor",
|
|
46
|
-
name: "disableAnimation",
|
|
47
|
-
static: !1,
|
|
48
|
-
private: !1,
|
|
49
|
-
access: {
|
|
50
|
-
has: (e) => "disableAnimation" in e,
|
|
51
|
-
get: (e) => e.disableAnimation,
|
|
52
|
-
set: (e, t) => {
|
|
53
|
-
e.disableAnimation = t;
|
|
54
|
-
}
|
|
55
|
-
},
|
|
56
|
-
metadata: t
|
|
57
|
-
}, w, T), u(this, null, E, {
|
|
58
|
-
kind: "setter",
|
|
59
|
-
name: "now",
|
|
60
|
-
static: !1,
|
|
61
|
-
private: !1,
|
|
62
|
-
access: {
|
|
63
|
-
has: (e) => "now" in e,
|
|
64
|
-
set: (e, t) => {
|
|
65
|
-
e.now = t;
|
|
66
|
-
}
|
|
67
|
-
},
|
|
68
|
-
metadata: t
|
|
69
|
-
}, null, y), t && Object.defineProperty(this, Symbol.metadata, {
|
|
70
|
-
enumerable: !0,
|
|
71
|
-
configurable: !0,
|
|
72
|
-
writable: !0,
|
|
73
|
-
value: t
|
|
74
|
-
});
|
|
75
|
-
}
|
|
76
|
-
static {
|
|
77
|
-
this.elementName = "sbb-pearl-chain";
|
|
78
|
-
}
|
|
79
|
-
static {
|
|
80
|
-
this.styles = [o, l(v)];
|
|
81
|
-
}
|
|
82
|
-
#e;
|
|
83
|
-
get legs() {
|
|
84
|
-
return this.#e;
|
|
85
|
-
}
|
|
86
|
-
set legs(e) {
|
|
87
|
-
this.#e = e;
|
|
88
|
-
}
|
|
89
|
-
#t;
|
|
90
|
-
get disableAnimation() {
|
|
91
|
-
return this.#t;
|
|
92
|
-
}
|
|
93
|
-
set disableAnimation(e) {
|
|
94
|
-
this.#t = e;
|
|
95
|
-
}
|
|
96
|
-
set now(e) {
|
|
97
|
-
this._now = i.getValidDateOrNull(i.deserialize(e));
|
|
98
|
-
}
|
|
99
|
-
get now() {
|
|
100
|
-
return this._now;
|
|
101
|
-
}
|
|
102
|
-
_getAllDuration(e) {
|
|
103
|
-
return e?.reduce((e, t) => {
|
|
104
|
-
let r = m(t.arrival?.time), i = m(t.departure?.time);
|
|
105
|
-
return r && i ? e + n(m(t.arrival.time), m(t.departure.time)) : e;
|
|
106
|
-
}, 0);
|
|
107
|
-
}
|
|
108
|
-
_isAllCancelled(e) {
|
|
109
|
-
return e?.every((e) => e?.serviceJourney?.serviceAlteration?.cancelled);
|
|
110
|
-
}
|
|
111
|
-
_getRelativeDuration(e, t) {
|
|
112
|
-
let r = m(t.arrival?.time), i = m(t.departure?.time);
|
|
113
|
-
if (r && i) {
|
|
114
|
-
let r = n(m(t.arrival.time), m(t.departure.time)), i = this._getAllDuration(e);
|
|
115
|
-
return i === 0 ? 100 : r / i * 100;
|
|
116
|
-
}
|
|
117
|
-
return 0;
|
|
118
|
-
}
|
|
119
|
-
_getProgress(e, r, i) {
|
|
120
|
-
if (!r?.time || !i?.time) return 0;
|
|
121
|
-
let a = t(r.time, r.delay ?? 0), o = n(t(i.time, i.delay ?? 0), a), s = n(e, a);
|
|
122
|
-
return o && s / o * 100;
|
|
123
|
-
}
|
|
124
|
-
_getStatus(e, n, r) {
|
|
125
|
-
let i = n && n.time && t(n.time, n.delay ?? 0), a = r && r.time && t(r.time, r.delay ?? 0);
|
|
126
|
-
return i && _(i, e) && a && g(a, e) ? "progress" : a && _(a, e) ? "past" : "future";
|
|
127
|
-
}
|
|
128
|
-
_renderPosition(e, t, n) {
|
|
129
|
-
let r = this._getProgress(e, t, n);
|
|
130
|
-
if (r < 0 && r > 100) return;
|
|
131
|
-
let i = () => ({
|
|
132
|
-
"--sbb-pearl-chain-status-position": `${r}%`,
|
|
133
|
-
...r >= 50 ? { transform: "translateX(-100%)" } : {}
|
|
134
|
-
}), a = this.disableAnimation ? "sbb-pearl-chain__position--no-animation" : "";
|
|
135
|
-
return s`<span
|
|
136
|
-
style=${h(i())}
|
|
137
|
-
class="sbb-pearl-chain__position ${a}"
|
|
138
|
-
></span>`;
|
|
139
|
-
}
|
|
140
|
-
render() {
|
|
141
|
-
let e = this.now ?? /* @__PURE__ */ new Date(), t = this.legs?.filter((e) => p(e)), n = t?.length && m(t[0]?.departure?.time), r = n && {
|
|
142
|
-
time: n,
|
|
143
|
-
delay: t[0].departure.delay ?? 0
|
|
144
|
-
}, i = t?.length && m(t[t.length - 1].arrival?.time), a = i && {
|
|
145
|
-
time: i,
|
|
146
|
-
delay: t[t.length - 1]?.arrival.delay ?? 0
|
|
147
|
-
}, o = t && t[0]?.serviceJourney?.stopPoints && t[0]?.serviceJourney?.stopPoints[0].stopStatus === "NOT_SERVICED" ? "sbb-pearl-chain--departure-skipped" : "", l = (() => {
|
|
148
|
-
let e = t && t[t.length - 1], n = e && e.serviceJourney?.stopPoints;
|
|
149
|
-
return n && n[n.length - 1].stopStatus === "NOT_SERVICED" ? "sbb-pearl-chain--arrival-skipped" : "";
|
|
150
|
-
})(), u = t && t[0]?.serviceJourney?.serviceAlteration?.cancelled ? "sbb-pearl-chain--departure-disruption" : "", d = t && t[t.length - 1]?.serviceJourney?.serviceAlteration?.cancelled ? "sbb-pearl-chain--arrival-disruption" : "", f = r && a && this._getStatus(e, r, a), g = t && f && !u ? "sbb-pearl-chain__bullet--" + f : "", _ = t && f && !d ? "sbb-pearl-chain__bullet--" + this._getStatus(e, void 0, a) : "";
|
|
151
|
-
return this._isAllCancelled(t) ? s`
|
|
152
|
-
<div class="sbb-pearl-chain">
|
|
153
|
-
<span class="sbb-pearl-chain__bullet sbb-pearl-chain--departure-disruption"></span>
|
|
154
|
-
<div class="sbb-pearl-chain__leg sbb-pearl-chain__leg--disruption"></div>
|
|
155
|
-
<span class="sbb-pearl-chain__bullet sbb-pearl-chain--departure-disruption"></span>
|
|
156
|
-
</div>
|
|
157
|
-
` : s`
|
|
158
|
-
<div class="sbb-pearl-chain">
|
|
159
|
-
<span
|
|
160
|
-
class="sbb-pearl-chain__bullet ${g} ${o} ${u}"
|
|
161
|
-
></span>
|
|
162
|
-
${t?.map((n, r) => {
|
|
163
|
-
let { stopPoints: i, serviceAlteration: a } = n?.serviceJourney || {}, o = this._getRelativeDuration(t, n), l = m(n.departure?.time), u = m(n.arrival?.time), d = i && i[i.length - 1]?.stopStatus === "NOT_SERVICED", f = i && i[i.length - 1]?.stopStatus === "PLANNED", p = i && i[0]?.stopStatus === "NOT_SERVICED", g = r > 0 && t[r - 1].serviceJourney.stopPoints, _ = g && g[g.length - 1]?.stopStatus === "NOT_SERVICED", v = d || p && f ? "sbb-pearl-chain__leg--skipped" : "", y = p || _ ? "sbb-pearl-chain__stop--departure-skipped" : "", b = a?.cancelled || a?.partiallyCancelled ? "sbb-pearl-chain__leg--disruption" : "", x = {
|
|
164
|
-
time: l,
|
|
165
|
-
delay: n.departure?.delay ?? 0
|
|
166
|
-
}, S = {
|
|
167
|
-
time: u,
|
|
168
|
-
delay: n.arrival?.delay ?? 0
|
|
169
|
-
}, C = this._getStatus(e, x, S);
|
|
170
|
-
return s` <div
|
|
171
|
-
class="sbb-pearl-chain__leg ${!b && !v && "sbb-pearl-chain__leg--" + C || ""} ${b} ${v}"
|
|
172
|
-
style=${h({
|
|
173
|
-
"--sbb-pearl-chain-leg-width": `${o}%`,
|
|
174
|
-
...C === "progress" && !b && !v ? { "--sbb-pearl-chain-leg-status": `${this._getProgress(e, x, S)}%` } : {}
|
|
175
|
-
})}
|
|
176
|
-
>
|
|
177
|
-
${r > 0 && r < t.length ? s`<span class="sbb-pearl-chain__stop ${y}"></span>` : c}
|
|
178
|
-
${C === "progress" && !b && !v ? this._renderPosition(e, x, S) : c}
|
|
179
|
-
</div>`;
|
|
180
|
-
})}
|
|
181
|
-
<span
|
|
182
|
-
class="sbb-pearl-chain__bullet ${_} ${l} ${d}"
|
|
183
|
-
></span>
|
|
184
|
-
</div>
|
|
185
|
-
`;
|
|
186
|
-
}
|
|
187
|
-
};
|
|
188
|
-
})();
|
|
189
|
-
//#endregion
|
|
190
|
-
export { y as t };
|