@sbb-esta/lyne-elements-experimental 0.0.0 → 0.52.1
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/README.md +55 -0
- package/constants-ClrwyPF-.js +12 -0
- package/core/datetime/date-helper.d.ts +27 -0
- package/core/datetime/date-helper.d.ts.map +1 -0
- package/core/datetime.d.ts +2 -0
- package/core/datetime.d.ts.map +1 -0
- package/core/datetime.js +193 -0
- package/core/timetable/access-leg-helper.d.ts +26 -0
- package/core/timetable/access-leg-helper.d.ts.map +1 -0
- package/core/timetable/timetable-helper.d.ts +9 -0
- package/core/timetable/timetable-helper.d.ts.map +1 -0
- package/core/timetable/timetable-properties.d.ts +308 -0
- package/core/timetable/timetable-properties.d.ts.map +1 -0
- package/core/timetable.d.ts +4 -0
- package/core/timetable.d.ts.map +1 -0
- package/core/timetable.js +123 -0
- package/custom-elements.json +1606 -0
- package/development/constants-D72r1E-c.js +22 -0
- package/development/core/datetime/date-helper.d.ts +27 -0
- package/development/core/datetime/date-helper.d.ts.map +1 -0
- package/development/core/datetime.d.ts +2 -0
- package/development/core/datetime.d.ts.map +1 -0
- package/development/core/datetime.js +290 -0
- package/development/core/timetable/access-leg-helper.d.ts +26 -0
- package/development/core/timetable/access-leg-helper.d.ts.map +1 -0
- package/development/core/timetable/timetable-helper.d.ts +9 -0
- package/development/core/timetable/timetable-helper.d.ts.map +1 -0
- package/development/core/timetable/timetable-properties.d.ts +308 -0
- package/development/core/timetable/timetable-properties.d.ts.map +1 -0
- package/development/core/timetable.d.ts +4 -0
- package/development/core/timetable.d.ts.map +1 -0
- package/development/core/timetable.js +164 -0
- package/development/differenceInMinutes-D47vcSvy.js +21 -0
- package/development/format-BOXfsJCN.js +1373 -0
- package/development/isValid-YTpbhEHG.js +52 -0
- package/development/journey-summary/journey-summary.d.ts +57 -0
- package/development/journey-summary/journey-summary.d.ts.map +1 -0
- package/development/journey-summary.d.ts +2 -0
- package/development/journey-summary.d.ts.map +1 -0
- package/development/journey-summary.js +209 -0
- package/development/pearl-chain/pearl-chain.d.ts +41 -0
- package/development/pearl-chain/pearl-chain.d.ts.map +1 -0
- package/development/pearl-chain/pearl-chain.sample-data.d.ts +121 -0
- package/development/pearl-chain/pearl-chain.sample-data.d.ts.map +1 -0
- package/development/pearl-chain-time/pearl-chain-time.d.ts +44 -0
- package/development/pearl-chain-time/pearl-chain-time.d.ts.map +1 -0
- package/development/pearl-chain-time.d.ts +2 -0
- package/development/pearl-chain-time.d.ts.map +1 -0
- package/development/pearl-chain-time.js +208 -0
- package/development/pearl-chain-vertical/pearl-chain-vertical.d.ts +17 -0
- package/development/pearl-chain-vertical/pearl-chain-vertical.d.ts.map +1 -0
- package/development/pearl-chain-vertical-item/pearl-chain-vertical-item.d.ts +35 -0
- package/development/pearl-chain-vertical-item/pearl-chain-vertical-item.d.ts.map +1 -0
- package/development/pearl-chain-vertical-item.d.ts +2 -0
- package/development/pearl-chain-vertical-item.d.ts.map +1 -0
- package/development/pearl-chain-vertical-item.js +368 -0
- package/development/pearl-chain-vertical.d.ts +2 -0
- package/development/pearl-chain-vertical.d.ts.map +1 -0
- package/development/pearl-chain-vertical.js +58 -0
- package/development/pearl-chain.d.ts +2 -0
- package/development/pearl-chain.d.ts.map +1 -0
- package/development/pearl-chain.js +597 -0
- package/development/timetable-duration/timetable-duration.d.ts +23 -0
- package/development/timetable-duration/timetable-duration.d.ts.map +1 -0
- package/development/timetable-duration/timetable-duration.sample-data.d.ts +6 -0
- package/development/timetable-duration/timetable-duration.sample-data.d.ts.map +1 -0
- package/development/timetable-duration.d.ts +2 -0
- package/development/timetable-duration.d.ts.map +1 -0
- package/development/timetable-duration.js +106 -0
- package/development/timetable-row/timetable-row.d.ts +79 -0
- package/development/timetable-row/timetable-row.d.ts.map +1 -0
- package/development/timetable-row/timetable-row.sample-data.d.ts +24 -0
- package/development/timetable-row/timetable-row.sample-data.d.ts.map +1 -0
- package/development/timetable-row.d.ts +2 -0
- package/development/timetable-row.d.ts.map +1 -0
- package/development/timetable-row.js +687 -0
- package/differenceInMinutes-CDpgJIgL.js +19 -0
- package/format-qHhIvnY8.js +1164 -0
- package/index.d.ts +19 -0
- package/index.js +17 -0
- package/isValid-Df_caLp4.js +40 -0
- package/journey-summary/journey-summary.d.ts +57 -0
- package/journey-summary/journey-summary.d.ts.map +1 -0
- package/journey-summary.d.ts +2 -0
- package/journey-summary.d.ts.map +1 -0
- package/journey-summary.js +130 -0
- package/package.json +79 -2
- package/pearl-chain/pearl-chain.d.ts +41 -0
- package/pearl-chain/pearl-chain.d.ts.map +1 -0
- package/pearl-chain/pearl-chain.sample-data.d.ts +121 -0
- package/pearl-chain/pearl-chain.sample-data.d.ts.map +1 -0
- package/pearl-chain-time/pearl-chain-time.d.ts +44 -0
- package/pearl-chain-time/pearl-chain-time.d.ts.map +1 -0
- package/pearl-chain-time.d.ts +2 -0
- package/pearl-chain-time.d.ts.map +1 -0
- package/pearl-chain-time.js +90 -0
- package/pearl-chain-vertical/pearl-chain-vertical.d.ts +17 -0
- package/pearl-chain-vertical/pearl-chain-vertical.d.ts.map +1 -0
- package/pearl-chain-vertical-item/pearl-chain-vertical-item.d.ts +35 -0
- package/pearl-chain-vertical-item/pearl-chain-vertical-item.d.ts.map +1 -0
- package/pearl-chain-vertical-item.d.ts +2 -0
- package/pearl-chain-vertical-item.d.ts.map +1 -0
- package/pearl-chain-vertical-item.js +48 -0
- package/pearl-chain-vertical.d.ts +2 -0
- package/pearl-chain-vertical.d.ts.map +1 -0
- package/pearl-chain-vertical.js +24 -0
- package/pearl-chain.d.ts +2 -0
- package/pearl-chain.d.ts.map +1 -0
- package/pearl-chain.js +147 -0
- package/timetable-duration/timetable-duration.d.ts +23 -0
- package/timetable-duration/timetable-duration.d.ts.map +1 -0
- package/timetable-duration/timetable-duration.sample-data.d.ts +6 -0
- package/timetable-duration/timetable-duration.sample-data.d.ts.map +1 -0
- package/timetable-duration.d.ts +2 -0
- package/timetable-duration.d.ts.map +1 -0
- package/timetable-duration.js +37 -0
- package/timetable-row/timetable-row.d.ts +79 -0
- package/timetable-row/timetable-row.d.ts.map +1 -0
- package/timetable-row/timetable-row.sample-data.d.ts +24 -0
- package/timetable-row/timetable-row.sample-data.d.ts.map +1 -0
- package/timetable-row.d.ts +2 -0
- package/timetable-row.d.ts.map +1 -0
- package/timetable-row.js +386 -0
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import { SbbLanguageController as d } from "@sbb-esta/lyne-elements/core/controllers.js";
|
|
2
|
+
import { defaultDateAdapter as h } from "@sbb-esta/lyne-elements/core/datetime.js";
|
|
3
|
+
import { i18nDeparture as g, i18nTransferProcedures as u, i18nArrival as v } from "@sbb-esta/lyne-elements/core/i18n.js";
|
|
4
|
+
import { css as y, LitElement as _, html as p, nothing as m } from "lit";
|
|
5
|
+
import { property as s, customElement as x } from "lit/decorators.js";
|
|
6
|
+
import { removeTimezoneFromISOTimeString as c } from "./core/datetime.js";
|
|
7
|
+
import { getDepartureArrivalTimeAttribute as w, isRideLeg as $ } from "./core/timetable.js";
|
|
8
|
+
import "./pearl-chain.js";
|
|
9
|
+
import { f } from "./format-qHhIvnY8.js";
|
|
10
|
+
const T = y`*,:before,:after{box-sizing:border-box}:host{--sbb-pearl-chain-time-height: auto;display:block}@media (min-width: 37.5rem){:host{--sbb-pearl-chain-time-height: 1.5625rem}}@media (min-width: 52.5rem){: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-font-size-text-xxs);font-family:var(--sbb-typo-font-family);font-weight:400;line-height:var(--sbb-typo-line-height-body-text);letter-spacing:var(--sbb-typo-letter-spacing-body-text);font-size:var(--sbb-text-font-size);display:inline-flex;align-items:center}.sbb-pearl-chain__time-walktime--left{transform:translate(-.4375rem);margin-inline-end:calc(var(--sbb-spacing-fixed-2x) - .4375rem)}.sbb-pearl-chain__time-walktime--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--departure{margin-inline-end:var(--sbb-spacing-fixed-2x)}.sbb-pearl-chain__time-transfer--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-font-size-text-s);font-family:var(--sbb-typo-font-family);font-weight:400;line-height:var(--sbb-typo-line-height-body-text);letter-spacing:var(--sbb-typo-letter-spacing-body-text);font-size:var(--sbb-text-font-size);font-weight:700;color:var(--sbb-color-charcoal)}.sbb-screen-reader-only{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;white-space:nowrap;width:1px}`;
|
|
11
|
+
var z = Object.defineProperty, A = Object.getOwnPropertyDescriptor, i = (r, a, b, n) => {
|
|
12
|
+
for (var e = n > 1 ? void 0 : n ? A(a, b) : a, l = r.length - 1, o; l >= 0; l--)
|
|
13
|
+
(o = r[l]) && (e = (n ? o(a, b, e) : o(e)) || e);
|
|
14
|
+
return n && e && z(a, b, e), e;
|
|
15
|
+
};
|
|
16
|
+
let t = class extends _ {
|
|
17
|
+
constructor() {
|
|
18
|
+
super(...arguments), this.b = null, this.a = new d(this);
|
|
19
|
+
}
|
|
20
|
+
set now(r) {
|
|
21
|
+
this.b = h.getValidDateOrNull(h.deserialize(r));
|
|
22
|
+
}
|
|
23
|
+
get now() {
|
|
24
|
+
return this.b ?? /* @__PURE__ */ new Date();
|
|
25
|
+
}
|
|
26
|
+
render() {
|
|
27
|
+
var l;
|
|
28
|
+
const r = this.departureTime ? c(this.departureTime) : void 0, a = this.arrivalTime ? c(this.arrivalTime) : void 0, { renderDepartureTimeAttribute: b, renderArrivalTimeAttribute: n } = w(
|
|
29
|
+
this.legs,
|
|
30
|
+
this.departureWalk || 0,
|
|
31
|
+
this.arrivalWalk || 0,
|
|
32
|
+
this.a.current
|
|
33
|
+
), e = (l = this.legs) == null ? void 0 : l.filter((o) => $(o));
|
|
34
|
+
return p`
|
|
35
|
+
<div class="sbb-pearl-chain__time">
|
|
36
|
+
${b()}
|
|
37
|
+
${r ? p`<time class="sbb-pearl-chain__time-time" datetime=${this.departureTime}>
|
|
38
|
+
<span class="sbb-screen-reader-only"
|
|
39
|
+
>${g[this.a.current]}: </span
|
|
40
|
+
>
|
|
41
|
+
${f(r, "HH:mm")}
|
|
42
|
+
</time>` : m}
|
|
43
|
+
${(e == null ? void 0 : e.length) > 1 ? p`<span class="sbb-screen-reader-only" role="paragraph">
|
|
44
|
+
${(e == null ? void 0 : e.length) - 1} ${u[this.a.current]}
|
|
45
|
+
</span>` : m}
|
|
46
|
+
<sbb-pearl-chain
|
|
47
|
+
class="sbb-pearl-chain__time-chain"
|
|
48
|
+
.legs=${this.legs}
|
|
49
|
+
.disableAnimation=${this.disableAnimation}
|
|
50
|
+
.now=${this.now}
|
|
51
|
+
></sbb-pearl-chain>
|
|
52
|
+
${a ? p`<time class="sbb-pearl-chain__time-time" datetime=${this.arrivalTime}>
|
|
53
|
+
<span class="sbb-screen-reader-only"
|
|
54
|
+
>${v[this.a.current]}: </span
|
|
55
|
+
>
|
|
56
|
+
${f(a, "HH:mm")}
|
|
57
|
+
</time>` : m}
|
|
58
|
+
${n()}
|
|
59
|
+
</div>
|
|
60
|
+
`;
|
|
61
|
+
}
|
|
62
|
+
};
|
|
63
|
+
t.styles = T;
|
|
64
|
+
i([
|
|
65
|
+
s({ type: Array })
|
|
66
|
+
], t.prototype, "legs", 2);
|
|
67
|
+
i([
|
|
68
|
+
s({ attribute: "departure-time" })
|
|
69
|
+
], t.prototype, "departureTime", 2);
|
|
70
|
+
i([
|
|
71
|
+
s({ attribute: "arrival-time" })
|
|
72
|
+
], t.prototype, "arrivalTime", 2);
|
|
73
|
+
i([
|
|
74
|
+
s({ attribute: "departure-walk", type: Number })
|
|
75
|
+
], t.prototype, "departureWalk", 2);
|
|
76
|
+
i([
|
|
77
|
+
s({ attribute: "arrival-walk", type: Number })
|
|
78
|
+
], t.prototype, "arrivalWalk", 2);
|
|
79
|
+
i([
|
|
80
|
+
s({ attribute: "disable-animation", type: Boolean })
|
|
81
|
+
], t.prototype, "disableAnimation", 2);
|
|
82
|
+
i([
|
|
83
|
+
s()
|
|
84
|
+
], t.prototype, "now", 1);
|
|
85
|
+
t = i([
|
|
86
|
+
x("sbb-pearl-chain-time")
|
|
87
|
+
], t);
|
|
88
|
+
export {
|
|
89
|
+
t as SbbPearlChainTimeElement
|
|
90
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { CSSResultGroup, TemplateResult, LitElement } from 'lit';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* It can be used as a container for the `sbb-pearl-chain-vertical-item` component.
|
|
5
|
+
*
|
|
6
|
+
* @slot - The unnamed slot is used for the `sbb-pearl-chain-vertical-item` component.
|
|
7
|
+
*/
|
|
8
|
+
export declare class SbbPearlChainVerticalElement extends LitElement {
|
|
9
|
+
static styles: CSSResultGroup;
|
|
10
|
+
protected render(): TemplateResult;
|
|
11
|
+
}
|
|
12
|
+
declare global {
|
|
13
|
+
interface HTMLElementTagNameMap {
|
|
14
|
+
'sbb-pearl-chain-vertical': SbbPearlChainVerticalElement;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=pearl-chain-vertical.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pearl-chain-vertical.d.ts","sourceRoot":"","sources":["../../../src/elements-experimental/pearl-chain-vertical/pearl-chain-vertical.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,KAAK,CAAC;AAC1D,OAAO,EAAQ,UAAU,EAAE,MAAM,KAAK,CAAC;AAKvC;;;;GAIG;AACH,qBACa,4BAA6B,SAAQ,UAAU;IAC1D,OAAuB,MAAM,EAAE,cAAc,CAAS;cAEnC,MAAM,IAAI,cAAc;CAO5C;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAE7B,0BAA0B,EAAE,4BAA4B,CAAC;KAC1D;CACF"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { CSSResultGroup, TemplateResult, LitElement } from 'lit';
|
|
2
|
+
|
|
3
|
+
export type LineType = 'dotted' | 'standard' | 'thin';
|
|
4
|
+
export type BulletType = 'default' | 'past' | 'irrelevant' | 'skipped' | 'disruption';
|
|
5
|
+
export type LineColor = 'default' | 'past' | 'disruption' | 'walk';
|
|
6
|
+
export type BulletSize = 'start-end' | 'stop';
|
|
7
|
+
export interface PearlChainVerticalItemAttributes {
|
|
8
|
+
lineType: LineType;
|
|
9
|
+
lineColor: LineColor;
|
|
10
|
+
bulletType?: BulletType;
|
|
11
|
+
minHeight: number;
|
|
12
|
+
hideLine: boolean;
|
|
13
|
+
bulletSize: BulletSize;
|
|
14
|
+
position?: number;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* It displays details about connection between stations.
|
|
18
|
+
*
|
|
19
|
+
* @slot left - Content of the left side of the item
|
|
20
|
+
* @slot right - Content of the right side of the item
|
|
21
|
+
*/
|
|
22
|
+
export declare class SbbPearlChainVerticalItemElement extends LitElement {
|
|
23
|
+
static styles: CSSResultGroup;
|
|
24
|
+
/** The pearlChainVerticalItemAttributes Prop for styling the bullets and line.*/
|
|
25
|
+
pearlChainVerticalItemAttributes: PearlChainVerticalItemAttributes;
|
|
26
|
+
/** If true, the position won't be animated. */
|
|
27
|
+
disableAnimation?: boolean;
|
|
28
|
+
protected render(): TemplateResult;
|
|
29
|
+
}
|
|
30
|
+
declare global {
|
|
31
|
+
interface HTMLElementTagNameMap {
|
|
32
|
+
'sbb-pearl-chain-vertical-item': SbbPearlChainVerticalItemElement;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
//# sourceMappingURL=pearl-chain-vertical-item.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pearl-chain-vertical-item.d.ts","sourceRoot":"","sources":["../../../src/elements-experimental/pearl-chain-vertical-item/pearl-chain-vertical-item.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,KAAK,CAAC;AAC1D,OAAO,EAAQ,UAAU,EAAW,MAAM,KAAK,CAAC;AAKhD,MAAM,MAAM,QAAQ,GAAG,QAAQ,GAAG,UAAU,GAAG,MAAM,CAAC;AAEtD,MAAM,MAAM,UAAU,GAAG,SAAS,GAAG,MAAM,GAAG,YAAY,GAAG,SAAS,GAAG,YAAY,CAAC;AAEtF,MAAM,MAAM,SAAS,GAAG,SAAS,GAAG,MAAM,GAAG,YAAY,GAAG,MAAM,CAAC;AAEnE,MAAM,MAAM,UAAU,GAAG,WAAW,GAAG,MAAM,CAAC;AAE9C,MAAM,WAAW,gCAAgC;IAC/C,QAAQ,EAAE,QAAQ,CAAC;IACnB,SAAS,EAAE,SAAS,CAAC;IACrB,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,OAAO,CAAC;IAClB,UAAU,EAAE,UAAU,CAAC;IACvB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED;;;;;GAKG;AACH,qBACa,gCAAiC,SAAQ,UAAU;IAC9D,OAAuB,MAAM,EAAE,cAAc,CAAS;IAEtD,iFAAiF;IAE1E,gCAAgC,EAAG,gCAAgC,CAAC;IAE3E,+CAA+C;IAExC,gBAAgB,CAAC,EAAE,OAAO,CAAC;cAEf,MAAM,IAAI,cAAc;CAsC5C;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAE7B,+BAA+B,EAAE,gCAAgC,CAAC;KACnE;CACF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pearl-chain-vertical-item.d.ts","sourceRoot":"","sources":["../../src/elements-experimental/pearl-chain-vertical-item.ts"],"names":[],"mappings":"AAAA,cAAc,0DAA0D,CAAC"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { css as d, LitElement as v, html as s, nothing as o } from "lit";
|
|
2
|
+
import { property as p, customElement as m } from "lit/decorators.js";
|
|
3
|
+
const u = d`*,:before,:after{box-sizing:border-box}:host{--sbb-pearl-chain-bullet-size-start-end: .625rem;--sbb-pearl-chain-bullet-size-stop: .5rem;--sbb-pearl-chain-bullet-color: var(--sbb-color-charcoal);--sbb-pearl-chain-bullet-color-past: var(--sbb-color-metal);--sbb-pearl-chain-bullet-color-irrelevant: var(--sbb-color-metal);--sbb-pearl-chain-bullet-color-disruption: var(--sbb-color-red);--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-spacing-medium: var(--sbb-spacing-fixed-4x);--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{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%;position:relative;inset-inline-start:var(--sbb-pearl-chain-vertical-item-inline-start);transform:var(--sbb-pearl-chain-vertical-item-transform)}@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{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-border-width: var(--sbb-border-width-1x)}.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{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-crossed-width: .706875rem;--sbb-pearl-chain-bullet-crossed-height: .1875rem}.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{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%;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-bullet-color: var(--sbb-pearl-chain-bullet-color-disruption);animation:pearl-chain-bullet-position-pulse var(--sbb-pearl-chain-bullet-animation-duration) var(--sbb-pearl-chain-bullet-animation-easing) infinite;position:absolute;left:50%;transform:translate(-50%);inset-block-start:var(--sbb-pearl-chain-vertical-item-position)}@media (forced-colors: active){.sbb-pearl-chain-vertical-item__bullet--position{--sbb-pearl-chain-bullet-color: CanvasText}}@media (forced-colors: active){.sbb-pearl-chain-vertical-item__bullet--position{--sbb-pearl-chain-bullet-color: Highlight}}@keyframes pearl-chain-bullet-position-pulse{0%{box-shadow:0 0 0 0 var(--sbb-pearl-chain-bullet-color-disruption)}25%{box-shadow:0 0 0 0 var(--sbb-pearl-chain-bullet-color-disruption)}50%{box-shadow:0 0 0 .1875rem var(--sbb-color-red-alpha-20)}to{box-shadow:0 0 0 0 var(--sbb-pearl-chain-bullet-color-disruption)}}:host([disable-animation]) .sbb-pearl-chain-vertical-item__bullet--position{animation:unset!important}`;
|
|
4
|
+
var _ = Object.defineProperty, g = Object.getOwnPropertyDescriptor, n = (l, i, t, r) => {
|
|
5
|
+
for (var a = r > 1 ? void 0 : r ? g(i, t) : i, b = l.length - 1, e; b >= 0; b--)
|
|
6
|
+
(e = l[b]) && (a = (r ? e(i, t, a) : e(a)) || a);
|
|
7
|
+
return r && a && _(i, t, a), a;
|
|
8
|
+
};
|
|
9
|
+
let c = class extends v {
|
|
10
|
+
render() {
|
|
11
|
+
const { bulletType: l, lineType: i, lineColor: t, hideLine: r, minHeight: a, bulletSize: b, position: e } = this.pearlChainVerticalItemAttributes || {}, h = e && e > 0 && e <= 100 ? "sbb-pearl-chain-vertical-item__bullet--past" : `sbb-pearl-chain-vertical-item__bullet--${l}`;
|
|
12
|
+
return s`
|
|
13
|
+
<div class="sbb-pearl-chain-vertical-item__column" style="height: ${a}px;">
|
|
14
|
+
<slot name="left"></slot>
|
|
15
|
+
</div>
|
|
16
|
+
<div
|
|
17
|
+
aria-hidden="true"
|
|
18
|
+
class="sbb-pearl-chain-vertical-item__column sbb-pearl-chain-vertical-item__column--middle"
|
|
19
|
+
>
|
|
20
|
+
${r ? o : s`<div
|
|
21
|
+
style="--sbb-pearl-chain-vertical-item-leg-status:${e}%;"
|
|
22
|
+
class="sbb-pearl-chain-vertical-item__line sbb-pearl-chain-vertical-item__line--${i} sbb-pearl-chain-vertical-item__line--${t}"
|
|
23
|
+
></div>`}
|
|
24
|
+
${l ? s`<div
|
|
25
|
+
class="sbb-pearl-chain-vertical-item__bullet sbb-pearl-chain-vertical-item__bullet--${b} ${h}"
|
|
26
|
+
></div>` : o}
|
|
27
|
+
${e && e > 0 ? s`<div
|
|
28
|
+
style="--sbb-pearl-chain-vertical-item-position:${e}%;"
|
|
29
|
+
class="sbb-pearl-chain-vertical-item__bullet--position"
|
|
30
|
+
></div>` : o}
|
|
31
|
+
</div>
|
|
32
|
+
<slot name="right"></slot>
|
|
33
|
+
`;
|
|
34
|
+
}
|
|
35
|
+
};
|
|
36
|
+
c.styles = u;
|
|
37
|
+
n([
|
|
38
|
+
p({ attribute: "pearl-chain-vertical-item-attributes", type: Object })
|
|
39
|
+
], c.prototype, "pearlChainVerticalItemAttributes", 2);
|
|
40
|
+
n([
|
|
41
|
+
p({ attribute: "disable-animation", reflect: !0, type: Boolean })
|
|
42
|
+
], c.prototype, "disableAnimation", 2);
|
|
43
|
+
c = n([
|
|
44
|
+
m("sbb-pearl-chain-vertical-item")
|
|
45
|
+
], c);
|
|
46
|
+
export {
|
|
47
|
+
c as SbbPearlChainVerticalItemElement
|
|
48
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pearl-chain-vertical.d.ts","sourceRoot":"","sources":["../../src/elements-experimental/pearl-chain-vertical.ts"],"names":[],"mappings":"AAAA,cAAc,gDAAgD,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { css as c, LitElement as o, html as n } from "lit";
|
|
2
|
+
import { customElement as p } from "lit/decorators.js";
|
|
3
|
+
const v = c`*,:before,:after{box-sizing:border-box}:host{--sbb-pearl-chain-vertical-width: 100%;display:block}.sbb-pearl-chain-vertical{display:table;width:var(--sbb-pearl-chain-vertical-width)}`;
|
|
4
|
+
var h = Object.defineProperty, f = Object.getOwnPropertyDescriptor, m = (b, r, l, t) => {
|
|
5
|
+
for (var e = t > 1 ? void 0 : t ? f(r, l) : r, s = b.length - 1, a; s >= 0; s--)
|
|
6
|
+
(a = b[s]) && (e = (t ? a(r, l, e) : a(e)) || e);
|
|
7
|
+
return t && e && h(r, l, e), e;
|
|
8
|
+
};
|
|
9
|
+
let i = class extends o {
|
|
10
|
+
render() {
|
|
11
|
+
return n`
|
|
12
|
+
<div class="sbb-pearl-chain-vertical">
|
|
13
|
+
<slot></slot>
|
|
14
|
+
</div>
|
|
15
|
+
`;
|
|
16
|
+
}
|
|
17
|
+
};
|
|
18
|
+
i.styles = v;
|
|
19
|
+
i = m([
|
|
20
|
+
p("sbb-pearl-chain-vertical")
|
|
21
|
+
], i);
|
|
22
|
+
export {
|
|
23
|
+
i as SbbPearlChainVerticalElement
|
|
24
|
+
};
|
package/pearl-chain.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pearl-chain.d.ts","sourceRoot":"","sources":["../../src/elements-experimental/pearl-chain.ts"],"names":[],"mappings":"AAAA,cAAc,8BAA8B,CAAC"}
|
package/pearl-chain.js
ADDED
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
import { defaultDateAdapter as O } from "@sbb-esta/lyne-elements/core/datetime.js";
|
|
2
|
+
import { css as q, LitElement as K, html as _, nothing as H } from "lit";
|
|
3
|
+
import { property as y, customElement as Q } from "lit/decorators.js";
|
|
4
|
+
import { styleMap as J } from "lit/directives/style-map.js";
|
|
5
|
+
import { removeTimezoneFromISOTimeString as n } from "./core/datetime.js";
|
|
6
|
+
import { isRideLeg as U } from "./core/timetable.js";
|
|
7
|
+
import { d as m } from "./differenceInMinutes-CDpgJIgL.js";
|
|
8
|
+
import { t as f } from "./constants-ClrwyPF-.js";
|
|
9
|
+
function W(a, r) {
|
|
10
|
+
const e = f(a), l = f(r);
|
|
11
|
+
return e.getTime() > l.getTime();
|
|
12
|
+
}
|
|
13
|
+
function I(a, r) {
|
|
14
|
+
const e = f(a), l = f(r);
|
|
15
|
+
return +e < +l;
|
|
16
|
+
}
|
|
17
|
+
const Z = q`*,:before,:after{box-sizing:border-box}:host{--sbb-pearl-chain-height: var(--sbb-border-width-2x);--sbb-pearl-chain-spacing-small: var(--sbb-spacing-fixed-1x);--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%;--sbb-pearl-chain-bullet-size-start-end: .625rem;--sbb-pearl-chain-bullet-size-stop: .5rem;--sbb-pearl-chain-bullet-color: var(--sbb-color-charcoal);--sbb-pearl-chain-bullet-color-past: var(--sbb-color-metal);--sbb-pearl-chain-bullet-color-irrelevant: var(--sbb-color-metal);--sbb-pearl-chain-bullet-color-disruption: var(--sbb-color-red);--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:block}.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{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%;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);content:"";position:absolute;background-color:currentcolor;inset-block-start:0;z-index:3}@media (forced-colors: active){.sbb-pearl-chain__bullet{--sbb-pearl-chain-bullet-color: CanvasText}}.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{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%;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;position:relative;z-index:2}@media (forced-colors: active){.sbb-pearl-chain__stop{--sbb-pearl-chain-bullet-color: CanvasText}}.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{--sbb-pearl-chain-bullet-color: var(--sbb-pearl-chain-bullet-color-past);color:var(--sbb-pearl-chain-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{--sbb-pearl-chain-bullet-color: var(--sbb-pearl-chain-bullet-color-past);background:var(--sbb-pearl-chain-bullet-color)}@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{--sbb-pearl-chain-bullet-color: var(--sbb-pearl-chain-bullet-color-disruption);color:var(--sbb-pearl-chain-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{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%;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-bullet-color: var(--sbb-pearl-chain-bullet-color-disruption);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)}@media (forced-colors: active){.sbb-pearl-chain__position{--sbb-pearl-chain-bullet-color: CanvasText}}@media (forced-colors: active){.sbb-pearl-chain__position{--sbb-pearl-chain-bullet-color: Highlight}}@keyframes pearl-chain-bullet-position-pulse{0%{box-shadow:0 0 0 0 var(--sbb-pearl-chain-bullet-color-disruption)}25%{box-shadow:0 0 0 0 var(--sbb-pearl-chain-bullet-color-disruption)}50%{box-shadow:0 0 0 .1875rem var(--sbb-color-red-alpha-20)}to{box-shadow:0 0 0 0 var(--sbb-pearl-chain-bullet-color-disruption)}}.sbb-pearl-chain__position--no-animation{animation:unset}.sbb-screen-reader-only{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;white-space:nowrap;width:1px}`;
|
|
18
|
+
var L = Object.defineProperty, rr = Object.getOwnPropertyDescriptor, k = (a, r, e, l) => {
|
|
19
|
+
for (var s = l > 1 ? void 0 : l ? rr(r, e) : r, o = a.length - 1, c; o >= 0; o--)
|
|
20
|
+
(c = a[o]) && (s = (l ? c(r, e, s) : c(s)) || s);
|
|
21
|
+
return l && s && L(r, e, s), s;
|
|
22
|
+
};
|
|
23
|
+
let d = class extends K {
|
|
24
|
+
constructor() {
|
|
25
|
+
super(...arguments), this.b = null;
|
|
26
|
+
}
|
|
27
|
+
set now(a) {
|
|
28
|
+
this.b = O.getValidDateOrNull(O.deserialize(a));
|
|
29
|
+
}
|
|
30
|
+
get now() {
|
|
31
|
+
return this.b;
|
|
32
|
+
}
|
|
33
|
+
d(a) {
|
|
34
|
+
return a == null ? void 0 : a.reduce((r, e) => {
|
|
35
|
+
var o, c;
|
|
36
|
+
const l = n((o = e.arrival) == null ? void 0 : o.time), s = n((c = e.departure) == null ? void 0 : c.time);
|
|
37
|
+
return l && s ? r + m(
|
|
38
|
+
n(e.arrival.time),
|
|
39
|
+
n(e.departure.time)
|
|
40
|
+
) : r;
|
|
41
|
+
}, 0);
|
|
42
|
+
}
|
|
43
|
+
e(a) {
|
|
44
|
+
return a == null ? void 0 : a.every((r) => {
|
|
45
|
+
var e, l;
|
|
46
|
+
return (l = (e = r == null ? void 0 : r.serviceJourney) == null ? void 0 : e.serviceAlteration) == null ? void 0 : l.cancelled;
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
f(a, r) {
|
|
50
|
+
var s, o;
|
|
51
|
+
const e = n((s = r.arrival) == null ? void 0 : s.time), l = n((o = r.departure) == null ? void 0 : o.time);
|
|
52
|
+
if (e && l) {
|
|
53
|
+
const c = m(
|
|
54
|
+
n(r.arrival.time),
|
|
55
|
+
n(r.departure.time)
|
|
56
|
+
), v = this.d(a);
|
|
57
|
+
return v === 0 ? 100 : c / v * 100;
|
|
58
|
+
}
|
|
59
|
+
return 0;
|
|
60
|
+
}
|
|
61
|
+
c(a, r, e) {
|
|
62
|
+
if (!r || !e)
|
|
63
|
+
return 0;
|
|
64
|
+
const l = m(e, r), s = m(a, r);
|
|
65
|
+
return l && s / l * 100;
|
|
66
|
+
}
|
|
67
|
+
a(a, r, e) {
|
|
68
|
+
return e && r && I(e, a) && W(r, a) ? "progress" : r && I(r, a) ? "past" : "future";
|
|
69
|
+
}
|
|
70
|
+
g(a, r, e) {
|
|
71
|
+
const l = this.c(a, r, e);
|
|
72
|
+
if (l < 0 && l > 100) return;
|
|
73
|
+
const s = () => ({
|
|
74
|
+
"--sbb-pearl-chain-status-position": `${l}%`,
|
|
75
|
+
...l >= 50 ? { transform: "translateX(-100%)" } : {}
|
|
76
|
+
}), o = this.disableAnimation ? "sbb-pearl-chain__position--no-animation" : "";
|
|
77
|
+
return _`<span
|
|
78
|
+
style=${J(s())}
|
|
79
|
+
class="sbb-pearl-chain__position ${o}"
|
|
80
|
+
></span>`;
|
|
81
|
+
}
|
|
82
|
+
render() {
|
|
83
|
+
var z, x, T, C;
|
|
84
|
+
const a = this.now ?? /* @__PURE__ */ new Date(), r = (z = this.legs) == null ? void 0 : z.filter((t) => U(t)), e = (r == null ? void 0 : r.length) && n((T = (x = r[0]) == null ? void 0 : x.departure) == null ? void 0 : T.time), l = (r == null ? void 0 : r.length) && n((C = r[(r == null ? void 0 : r.length) - 1].arrival) == null ? void 0 : C.time), s = (() => {
|
|
85
|
+
var t, b, i, p;
|
|
86
|
+
return r && ((b = (t = r[0]) == null ? void 0 : t.serviceJourney) != null && b.stopPoints) && ((p = (i = r[0]) == null ? void 0 : i.serviceJourney) == null ? void 0 : p.stopPoints[0].stopStatus) === "NOT_SERVICED" ? "sbb-pearl-chain--departure-skipped" : "";
|
|
87
|
+
})(), o = (() => {
|
|
88
|
+
var i;
|
|
89
|
+
const t = r && r[r.length - 1], b = t && ((i = t.serviceJourney) == null ? void 0 : i.stopPoints);
|
|
90
|
+
return b && b[b.length - 1].stopStatus === "NOT_SERVICED" ? "sbb-pearl-chain--arrival-skipped" : "";
|
|
91
|
+
})(), c = (() => {
|
|
92
|
+
var t, b, i;
|
|
93
|
+
return r && ((i = (b = (t = r[0]) == null ? void 0 : t.serviceJourney) == null ? void 0 : b.serviceAlteration) != null && i.cancelled) ? "sbb-pearl-chain--departure-disruption" : "";
|
|
94
|
+
})(), v = (() => {
|
|
95
|
+
var t, b, i;
|
|
96
|
+
return r && ((i = (b = (t = r[r.length - 1]) == null ? void 0 : t.serviceJourney) == null ? void 0 : b.serviceAlteration) != null && i.cancelled) ? "sbb-pearl-chain--arrival-disruption" : "";
|
|
97
|
+
})(), G = r && e && l && !c ? "sbb-pearl-chain__bullet--" + this.a(a, l, e) : "", R = r && l && !v ? "sbb-pearl-chain__bullet--" + this.a(a, l) : "";
|
|
98
|
+
return this.e(r) ? _`
|
|
99
|
+
<div class="sbb-pearl-chain">
|
|
100
|
+
<span class="sbb-pearl-chain__bullet sbb-pearl-chain--departure-disruption"></span>
|
|
101
|
+
<div class="sbb-pearl-chain__leg sbb-pearl-chain__leg--disruption"></div>
|
|
102
|
+
<span class="sbb-pearl-chain__bullet sbb-pearl-chain--departure-disruption"></span>
|
|
103
|
+
</div>
|
|
104
|
+
` : _`
|
|
105
|
+
<div class="sbb-pearl-chain">
|
|
106
|
+
<span
|
|
107
|
+
class="sbb-pearl-chain__bullet ${G} ${s} ${c}"
|
|
108
|
+
></span>
|
|
109
|
+
${r == null ? void 0 : r.map((t, b) => {
|
|
110
|
+
var $, N, D, E, P, A;
|
|
111
|
+
const { stopPoints: i, serviceAlteration: p } = (t == null ? void 0 : t.serviceJourney) || {}, V = this.f(r, t), h = n(($ = t.departure) == null ? void 0 : $.time), u = n((N = t.arrival) == null ? void 0 : N.time), B = i && ((D = i[i.length - 1]) == null ? void 0 : D.stopStatus) === "NOT_SERVICED", j = i && ((E = i[i.length - 1]) == null ? void 0 : E.stopStatus) === "PLANNED", S = i && ((P = i[0]) == null ? void 0 : P.stopStatus) === "NOT_SERVICED", w = b > 0 && r[b - 1].serviceJourney.stopPoints, M = w && ((A = w[w.length - 1]) == null ? void 0 : A.stopStatus) === "NOT_SERVICED", Y = B || S && j ? "sbb-pearl-chain__leg--skipped" : "", F = S || M ? "sbb-pearl-chain__stop--departure-skipped" : "", g = p != null && p.cancelled ? "sbb-pearl-chain__leg--disruption" : "", X = !g && this.a(a, h, u) && "sbb-pearl-chain__leg--" + this.a(a, u, h);
|
|
112
|
+
return _` <div
|
|
113
|
+
class="sbb-pearl-chain__leg ${X} ${g} ${Y}"
|
|
114
|
+
style=${J({
|
|
115
|
+
"--sbb-pearl-chain-leg-width": `${V}%`,
|
|
116
|
+
...this.a(a, u, h) === "progress" && !g ? {
|
|
117
|
+
"--sbb-pearl-chain-leg-status": `${this.c(a, h, u)}%`
|
|
118
|
+
} : {}
|
|
119
|
+
})}
|
|
120
|
+
>
|
|
121
|
+
${b > 0 && b < r.length ? _`<span class="sbb-pearl-chain__stop ${F}"></span>` : H}
|
|
122
|
+
${this.a(a, u, h) === "progress" && !g ? this.g(a, h, u) : H}
|
|
123
|
+
</div>`;
|
|
124
|
+
})}
|
|
125
|
+
<span
|
|
126
|
+
class="sbb-pearl-chain__bullet ${R} ${o} ${v}"
|
|
127
|
+
></span>
|
|
128
|
+
</div>
|
|
129
|
+
`;
|
|
130
|
+
}
|
|
131
|
+
};
|
|
132
|
+
d.styles = Z;
|
|
133
|
+
k([
|
|
134
|
+
y({ type: Array })
|
|
135
|
+
], d.prototype, "legs", 2);
|
|
136
|
+
k([
|
|
137
|
+
y({ attribute: "disable-animation", type: Boolean })
|
|
138
|
+
], d.prototype, "disableAnimation", 2);
|
|
139
|
+
k([
|
|
140
|
+
y()
|
|
141
|
+
], d.prototype, "now", 1);
|
|
142
|
+
d = k([
|
|
143
|
+
Q("sbb-pearl-chain")
|
|
144
|
+
], d);
|
|
145
|
+
export {
|
|
146
|
+
d as SbbPearlChainElement
|
|
147
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { CSSResultGroup, TemplateResult, LitElement } from 'lit';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Used in `sbb-timetable-row`, it displays information about the trip duration.
|
|
5
|
+
*/
|
|
6
|
+
export declare class SbbTimetableDurationElement extends LitElement {
|
|
7
|
+
static styles: CSSResultGroup;
|
|
8
|
+
/**
|
|
9
|
+
* Stringified JSON which defines most of the
|
|
10
|
+
* content of the component. Please check the
|
|
11
|
+
* individual stories to get an idea of the
|
|
12
|
+
* structure.
|
|
13
|
+
*/
|
|
14
|
+
config: string;
|
|
15
|
+
private _language;
|
|
16
|
+
protected render(): TemplateResult;
|
|
17
|
+
}
|
|
18
|
+
declare global {
|
|
19
|
+
interface HTMLElementTagNameMap {
|
|
20
|
+
'sbb-timetable-duration': SbbTimetableDurationElement;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
//# sourceMappingURL=timetable-duration.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"timetable-duration.d.ts","sourceRoot":"","sources":["../../../src/elements-experimental/timetable-duration/timetable-duration.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,KAAK,CAAC;AAC1D,OAAO,EAAQ,UAAU,EAAE,MAAM,KAAK,CAAC;AAKvC;;GAEG;AACH,qBACa,2BAA4B,SAAQ,UAAU;IACzD,OAAuB,MAAM,EAAE,cAAc,CAAS;IAEtD;;;;;OAKG;IACgB,MAAM,EAAG,MAAM,CAAC;IAEnC,OAAO,CAAC,SAAS,CAAmC;cAEjC,MAAM,IAAI,cAAc;CAqC5C;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAE7B,wBAAwB,EAAE,2BAA2B,CAAC;KACvD;CACF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"timetable-duration.sample-data.d.ts","sourceRoot":"","sources":["../../../src/elements-experimental/timetable-duration/timetable-duration.sample-data.ts"],"names":[],"mappings":";;;;AAAA,wBAaE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"timetable-duration.d.ts","sourceRoot":"","sources":["../../src/elements-experimental/timetable-duration.ts"],"names":[],"mappings":"AAAA,cAAc,4CAA4C,CAAC"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { SbbLanguageController as b } from "@sbb-esta/lyne-elements/core/controllers.js";
|
|
2
|
+
import { i18nDurationHour as l, i18nDurationMinute as u } from "@sbb-esta/lyne-elements/core/i18n.js";
|
|
3
|
+
import { css as h, LitElement as c, html as m } from "lit";
|
|
4
|
+
import { property as f, customElement as g } from "lit/decorators.js";
|
|
5
|
+
const d = h`*,:before,:after{box-sizing:border-box}:host{display:inline-block}.duration{--sbb-text-font-size: var(--sbb-font-size-text-s);font-family:var(--sbb-typo-font-family);font-weight:400;line-height:var(--sbb-typo-line-height-body-text);letter-spacing:var(--sbb-typo-letter-spacing-body-text);font-size:var(--sbb-text-font-size);margin:0;white-space:nowrap}.duration__text--visually-hidden{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;white-space:nowrap;width:1px}`;
|
|
6
|
+
var x = Object.defineProperty, v = Object.getOwnPropertyDescriptor, p = (e, i, s, r) => {
|
|
7
|
+
for (var t = r > 1 ? void 0 : r ? v(i, s) : i, n = e.length - 1, o; n >= 0; n--)
|
|
8
|
+
(o = e[n]) && (t = (r ? o(i, s, t) : o(t)) || t);
|
|
9
|
+
return r && t && x(i, s, t), t;
|
|
10
|
+
};
|
|
11
|
+
let a = class extends c {
|
|
12
|
+
constructor() {
|
|
13
|
+
super(...arguments), this.a = new b(this);
|
|
14
|
+
}
|
|
15
|
+
render() {
|
|
16
|
+
const e = JSON.parse(this.config), i = l.multiple.short[this.a.current], s = u.multiple.short[this.a.current];
|
|
17
|
+
let r = "", t = "", n = l.multiple.long[this.a.current], o = u.multiple.long[this.a.current];
|
|
18
|
+
return e.hours === 1 && (n = l.single.long[this.a.current]), e.minutes === 1 && (o = u.single.long[this.a.current]), e.hours !== 0 && (r += `${e.hours} ${i}`, t += `${e.hours} ${n}`), r += ` ${e.minutes} ${s}`, t += ` ${e.minutes} ${o}.`, m`
|
|
19
|
+
<p aria-label=${t} class="duration" role="text">
|
|
20
|
+
<span aria-hidden="true" class="duration__text--visual" role="presentation">
|
|
21
|
+
${r}
|
|
22
|
+
</span>
|
|
23
|
+
<span class="duration__text--visually-hidden">${t}</span>
|
|
24
|
+
</p>
|
|
25
|
+
`;
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
a.styles = d;
|
|
29
|
+
p([
|
|
30
|
+
f()
|
|
31
|
+
], a.prototype, "config", 2);
|
|
32
|
+
a = p([
|
|
33
|
+
g("sbb-timetable-duration")
|
|
34
|
+
], a);
|
|
35
|
+
export {
|
|
36
|
+
a as SbbTimetableDurationElement
|
|
37
|
+
};
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { SbbDateLike } from '@sbb-esta/lyne-elements/core/interfaces.js';
|
|
2
|
+
import { CSSResultGroup, PropertyValues, TemplateResult, LitElement } from 'lit';
|
|
3
|
+
import { ITripItem, Notice, PtSituation } from '../core/timetable.js';
|
|
4
|
+
|
|
5
|
+
/** HimCus interface for mapped icon name and text */
|
|
6
|
+
export interface HimCus {
|
|
7
|
+
name: string;
|
|
8
|
+
text?: string | null;
|
|
9
|
+
}
|
|
10
|
+
/** Boarding icon interface for mapped icon name and text */
|
|
11
|
+
export interface Boarding {
|
|
12
|
+
name: string;
|
|
13
|
+
text: string;
|
|
14
|
+
}
|
|
15
|
+
export interface Price {
|
|
16
|
+
price?: string;
|
|
17
|
+
text?: string;
|
|
18
|
+
isDiscount?: boolean;
|
|
19
|
+
}
|
|
20
|
+
export declare const renderIconProduct: (icon: string, name: string) => TemplateResult;
|
|
21
|
+
export declare const renderStringProduct: (vehicleName: string, line?: string | null) => TemplateResult;
|
|
22
|
+
export declare const sortSituation: (situations: PtSituation[]) => PtSituation[];
|
|
23
|
+
export declare const getHimIcon: (situation: PtSituation) => HimCus;
|
|
24
|
+
export declare const getCus: (trip: ITripItem, currentLanguage: string) => HimCus;
|
|
25
|
+
export declare const filterNotices: (notices: Notice[]) => Notice[];
|
|
26
|
+
export declare const handleNotices: (notices: Notice[]) => Notice[];
|
|
27
|
+
/**
|
|
28
|
+
* It displays information about the trip, acting as a container for all the `sbb-timetable-*` components.
|
|
29
|
+
* */
|
|
30
|
+
export declare class SbbTimetableRowElement extends LitElement {
|
|
31
|
+
static styles: CSSResultGroup;
|
|
32
|
+
/** The trip Prop. */
|
|
33
|
+
trip: ITripItem;
|
|
34
|
+
/** The price Prop, which consists of the data for the badge. */
|
|
35
|
+
price?: Price;
|
|
36
|
+
/** This will be forwarded to the sbb-pearl-chain component - if true the position won't be animated. */
|
|
37
|
+
disableAnimation?: boolean;
|
|
38
|
+
/** This will be forwarded to the notices section */
|
|
39
|
+
boarding?: Boarding;
|
|
40
|
+
/**
|
|
41
|
+
* The loading state -
|
|
42
|
+
* when this is true it will be render skeleton with an idling animation
|
|
43
|
+
*/
|
|
44
|
+
loadingTrip: boolean;
|
|
45
|
+
/**
|
|
46
|
+
* The loading state -
|
|
47
|
+
* when this is true it will be render skeleton with an idling animation
|
|
48
|
+
*/
|
|
49
|
+
loadingPrice: boolean;
|
|
50
|
+
/**
|
|
51
|
+
* 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.
|
|
52
|
+
*/
|
|
53
|
+
cardActionLabel?: string;
|
|
54
|
+
/** This will be forwarded to the sbb-card component as aria-expanded. */
|
|
55
|
+
accessibilityExpanded?: boolean;
|
|
56
|
+
/** When this prop is true the sbb-card will be in the active state. */
|
|
57
|
+
active?: boolean;
|
|
58
|
+
/** A configured date which acts as the current date instead of the real current date. Recommended for testing purposes. */
|
|
59
|
+
set now(value: SbbDateLike | undefined);
|
|
60
|
+
get now(): Date;
|
|
61
|
+
private _now;
|
|
62
|
+
private _language;
|
|
63
|
+
protected willUpdate(changedProperties: PropertyValues<this>): void;
|
|
64
|
+
/** The skeleton render function for the loading state */
|
|
65
|
+
private _renderSkeleton;
|
|
66
|
+
private _getQuayType;
|
|
67
|
+
private _getQuayTypeStrings;
|
|
68
|
+
/** map Quay */
|
|
69
|
+
private _renderQuayType;
|
|
70
|
+
private _handleHimCus;
|
|
71
|
+
private _getAccessibilityText;
|
|
72
|
+
protected render(): TemplateResult;
|
|
73
|
+
}
|
|
74
|
+
declare global {
|
|
75
|
+
interface HTMLElementTagNameMap {
|
|
76
|
+
'sbb-timetable-row': SbbTimetableRowElement;
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
//# sourceMappingURL=timetable-row.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"timetable-row.d.ts","sourceRoot":"","sources":["../../../src/elements-experimental/timetable-row/timetable-row.ts"],"names":[],"mappings":"AAqBA,OAAO,KAAK,EAAE,WAAW,EAAgB,MAAM,4CAA4C,CAAC;AAE5F,OAAO,KAAK,EAAE,cAAc,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,KAAK,CAAC;AAC1E,OAAO,EAAQ,UAAU,EAAW,MAAM,KAAK,CAAC;AAIhD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,EAAa,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAKtF,OAAO,iCAAiC,CAAC;AACzC,OAAO,iCAAiC,CAAC;AACzC,OAAO,gDAAgD,CAAC;AACxD,OAAO,wBAAwB,CAAC;AAEhC,qDAAqD;AACrD,MAAM,WAAW,MAAM;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACtB;AAED,4DAA4D;AAC5D,MAAM,WAAW,QAAQ;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,KAAK;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED,eAAO,MAAM,iBAAiB,SAAU,MAAM,QAAQ,MAAM,KAAG,cAK9D,CAAC;AAEF,eAAO,MAAM,mBAAmB,gBAAiB,MAAM,SAAS,MAAM,GAAG,IAAI,KAAG,cAK/E,CAAC;AAsBF,eAAO,MAAM,aAAa,eAAgB,WAAW,EAAE,KAAG,WAAW,EAapE,CAAC;AAEF,eAAO,MAAM,UAAU,cAAe,WAAW,KAAG,MAiCnD,CAAC;AAEF,eAAO,MAAM,MAAM,SAAU,SAAS,mBAAmB,MAAM,KAAG,MAuBjE,CAAC;AAaF,eAAO,MAAM,aAAa,YAAa,MAAM,EAAE,KAAG,MAAM,EAUvD,CAAC;AAEF,eAAO,MAAM,aAAa,YAAa,MAAM,EAAE,KAAG,MAAM,EAcvD,CAAC;AAEF;;KAEK;AACL,qBACa,sBAAuB,SAAQ,UAAU;IACpD,OAAuB,MAAM,EAAE,cAAc,CAAS;IAEtD,qBAAqB;IACc,IAAI,EAAG,SAAS,CAAC;IAEpD,gEAAgE;IAC7B,KAAK,CAAC,EAAE,KAAK,CAAC;IAEjD,wGAAwG;IAEjG,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAElC,oDAAoD;IACjB,QAAQ,CAAC,EAAE,QAAQ,CAAC;IAEvD;;;OAGG;IAC4D,WAAW,UAAS;IAEnF;;;OAGG;IAC6D,YAAY,UAAS;IAErF;;OAEG;IACkD,eAAe,CAAC,EAAE,MAAM,CAAC;IAE9E,yEAAyE;IAElE,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAEvC,uEAAuE;IACnC,MAAM,CAAC,EAAE,OAAO,CAAC;IAErD,2HAA2H;IAC3H,IACW,GAAG,CAAC,KAAK,EAAE,WAAW,GAAG,SAAS,EAE5C;IACD,IAAW,GAAG,IAAI,IAAI,CAErB;IACD,OAAO,CAAC,IAAI,CAAqB;IAEjC,OAAO,CAAC,SAAS,CAAmC;cAEjC,UAAU,CAAC,iBAAiB,EAAE,cAAc,CAAC,IAAI,CAAC,GAAG,IAAI;IAQ5E,yDAAyD;IACzD,OAAO,CAAC,eAAe;IAevB,OAAO,CAAC,YAAY;IAepB,OAAO,CAAC,mBAAmB;IAS3B,eAAe;IACf,OAAO,CAAC,eAAe;IAavB,OAAO,CAAC,aAAa;IAWrB,OAAO,CAAC,qBAAqB;cAwIV,MAAM,IAAI,cAAc;CAuJ5C;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAE7B,mBAAmB,EAAE,sBAAsB,CAAC;KAC7C;CACF"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { ITripItem } from '../core/timetable.js';
|
|
2
|
+
|
|
3
|
+
type DeepPartial<T> = T extends object ? {
|
|
4
|
+
[P in keyof T]?: DeepPartial<T[P]>;
|
|
5
|
+
} : T;
|
|
6
|
+
export declare const defaultTrip: DeepPartial<ITripItem>;
|
|
7
|
+
export declare const cancelledTrip: DeepPartial<ITripItem>;
|
|
8
|
+
export declare const progressTrip: DeepPartial<ITripItem>;
|
|
9
|
+
export declare const partiallyCancelled: DeepPartial<ITripItem>;
|
|
10
|
+
export declare const pastTrip: DeepPartial<ITripItem>;
|
|
11
|
+
export declare const skippedLastArrivalStopTrip: DeepPartial<ITripItem>;
|
|
12
|
+
export declare const skippedArrivalStopTrip: DeepPartial<ITripItem>;
|
|
13
|
+
export declare const skippedDepartureStopTrip: DeepPartial<ITripItem>;
|
|
14
|
+
export declare const skippedFirstDepartureStopTrip: DeepPartial<ITripItem>;
|
|
15
|
+
export declare const disturbanceTrip: DeepPartial<ITripItem>;
|
|
16
|
+
export declare const quayChangeTrip: DeepPartial<ITripItem>;
|
|
17
|
+
export declare const trainTrip: DeepPartial<ITripItem>;
|
|
18
|
+
export declare const busTrip: DeepPartial<ITripItem>;
|
|
19
|
+
export declare const shipTrip: DeepPartial<ITripItem>;
|
|
20
|
+
export declare const walkTimeTrip: DeepPartial<ITripItem>;
|
|
21
|
+
export declare const extendedEnterTimeTrip: DeepPartial<ITripItem>;
|
|
22
|
+
export declare const noticesTrip: DeepPartial<ITripItem>;
|
|
23
|
+
export {};
|
|
24
|
+
//# sourceMappingURL=timetable-row.sample-data.d.ts.map
|