@sbb-esta/lyne-elements-experimental 1.13.0 → 1.14.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.
Files changed (49) hide show
  1. package/core/datetime.js +3 -9
  2. package/core/timetable.js +10 -64
  3. package/custom-elements.json +90 -40
  4. package/development/core/datetime.js +4 -10
  5. package/development/core/timetable.js +11 -65
  6. package/development/differenceInMinutes-Cmyza6nm.js +1 -1
  7. package/development/format-DTy5_IOt.js +1 -1
  8. package/development/isValid-DO_pHwcW.js +1 -1
  9. package/development/journey-summary/journey-summary.d.ts +6 -6
  10. package/development/journey-summary/journey-summary.d.ts.map +1 -1
  11. package/development/journey-summary.js +180 -82
  12. package/development/pearl-chain/pearl-chain.d.ts +2 -2
  13. package/development/pearl-chain/pearl-chain.d.ts.map +1 -1
  14. package/development/pearl-chain-time/pearl-chain-time.d.ts +7 -7
  15. package/development/pearl-chain-time/pearl-chain-time.d.ts.map +1 -1
  16. package/development/pearl-chain-time.js +176 -68
  17. package/development/pearl-chain-vertical/pearl-chain-vertical.d.ts.map +1 -1
  18. package/development/pearl-chain-vertical-item/pearl-chain-vertical-item.d.ts +2 -2
  19. package/development/pearl-chain-vertical-item/pearl-chain-vertical-item.d.ts.map +1 -1
  20. package/development/pearl-chain-vertical-item.js +67 -30
  21. package/development/pearl-chain-vertical.js +22 -21
  22. package/development/pearl-chain.js +210 -166
  23. package/development/timetable-duration/timetable-duration.d.ts +1 -1
  24. package/development/timetable-duration/timetable-duration.d.ts.map +1 -1
  25. package/development/timetable-duration.js +72 -45
  26. package/development/timetable-row/timetable-row.d.ts +10 -10
  27. package/development/timetable-row/timetable-row.d.ts.map +1 -1
  28. package/development/timetable-row.js +337 -205
  29. package/journey-summary/journey-summary.d.ts +6 -6
  30. package/journey-summary/journey-summary.d.ts.map +1 -1
  31. package/journey-summary.js +156 -100
  32. package/package.json +4 -3
  33. package/pearl-chain/pearl-chain.d.ts +2 -2
  34. package/pearl-chain/pearl-chain.d.ts.map +1 -1
  35. package/pearl-chain-time/pearl-chain-time.d.ts +7 -7
  36. package/pearl-chain-time/pearl-chain-time.d.ts.map +1 -1
  37. package/pearl-chain-time.js +137 -78
  38. package/pearl-chain-vertical/pearl-chain-vertical.d.ts.map +1 -1
  39. package/pearl-chain-vertical-item/pearl-chain-vertical-item.d.ts +2 -2
  40. package/pearl-chain-vertical-item/pearl-chain-vertical-item.d.ts.map +1 -1
  41. package/pearl-chain-vertical-item.js +57 -34
  42. package/pearl-chain-vertical.js +17 -18
  43. package/pearl-chain.js +156 -131
  44. package/timetable-duration/timetable-duration.d.ts +1 -1
  45. package/timetable-duration/timetable-duration.d.ts.map +1 -1
  46. package/timetable-duration.js +48 -30
  47. package/timetable-row/timetable-row.d.ts +10 -10
  48. package/timetable-row/timetable-row.d.ts.map +1 -1
  49. package/timetable-row.js +331 -267
@@ -21,27 +21,27 @@ export interface InterfaceSbbJourneySummaryAttributes {
21
21
  export declare class SbbJourneySummaryElement extends LitElement {
22
22
  static styles: CSSResultGroup;
23
23
  /** The trip prop */
24
- trip: InterfaceSbbJourneySummaryAttributes;
24
+ accessor trip: InterfaceSbbJourneySummaryAttributes;
25
25
  /** The tripBack prop */
26
- tripBack?: InterfaceSbbJourneySummaryAttributes;
26
+ accessor tripBack: InterfaceSbbJourneySummaryAttributes;
27
27
  /**
28
28
  * The RoundTrip prop. This prop controls if one or two arrows are displayed in the header.
29
29
  */
30
- roundTrip?: boolean;
30
+ accessor roundTrip: boolean;
31
31
  /** Heading level of the journey header element (e.g. h1-h6). */
32
- headerLevel: SbbTitleLevel;
32
+ accessor headerLevel: SbbTitleLevel;
33
33
  /**
34
34
  * Per default, the current location has a pulsating animation. You can
35
35
  * disable the animation with this property.
36
36
  */
37
- disableAnimation?: boolean;
37
+ accessor disableAnimation: boolean;
38
38
  /**
39
39
  * The Footpath attribute for rendering different icons
40
40
  * true: render a11y-icon
41
41
  * false: render walk-icon
42
42
  * default: render walk-icon
43
43
  */
44
- a11yFootpath?: boolean;
44
+ accessor a11yFootpath: boolean;
45
45
  /** A configured date which acts as the current date instead of the real current date. Recommended for testing purposes. */
46
46
  set now(value: SbbDateLike | undefined);
47
47
  get now(): Date;
@@ -1 +1 @@
1
- {"version":3,"file":"journey-summary.d.ts","sourceRoot":"","sources":["../../../src/elements-experimental/journey-summary/journey-summary.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,+CAA+C,CAAC;AACjF,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kCAAkC,CAAC;AAEtE,OAAO,KAAK,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,KAAK,CAAC;AAC1D,OAAO,EAAQ,UAAU,EAAW,MAAM,KAAK,CAAC;AAIhD,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,sBAAsB,CAAC;AAIhD,OAAO,oCAAoC,CAAC;AAC5C,OAAO,+CAA+C,CAAC;AACvD,OAAO,2CAA2C,CAAC;AACnD,OAAO,wBAAwB,CAAC;AAEhC,MAAM,WAAW,oCAAoC;IACnD,IAAI,EAAE,GAAG,EAAE,CAAC;IACZ,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED;;;;GAIG;AACH,qBACa,wBAAyB,SAAQ,UAAU;IACtD,OAAuB,MAAM,EAAE,cAAc,CAAS;IAEtD,qBAAqB;IACc,IAAI,EAAG,oCAAoC,CAAC;IAE/E,yBAAyB;IAElB,QAAQ,CAAC,EAAE,oCAAoC,CAAC;IAEvD;;OAEG;IAC0D,SAAS,CAAC,EAAE,OAAO,CAAC;IAEjF,gEAAgE;IAChB,WAAW,EAAE,aAAa,CAAO;IAEjF;;;OAGG;IACiE,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAE/F;;;;;OAKG;IAC6D,YAAY,CAAC,EAAE,OAAO,CAAC;IAEvF,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,eAAe,CAAkB;IACzC,OAAO,CAAC,SAAS,CAAmC;IAEpC,iBAAiB,IAAI,IAAI;IAKzC,2EAA2E;IAC3E,OAAO,CAAC,mBAAmB;IAwB3B,OAAO,CAAC,kBAAkB;IAmB1B,OAAO,CAAC,yBAAyB;cAuBd,MAAM,IAAI,cAAc;CA4B5C;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAE7B,qBAAqB,EAAE,wBAAwB,CAAC;KACjD;CACF"}
1
+ {"version":3,"file":"journey-summary.d.ts","sourceRoot":"","sources":["../../../src/elements-experimental/journey-summary/journey-summary.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,+CAA+C,CAAC;AACjF,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kCAAkC,CAAC;AAEtE,OAAO,KAAK,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,KAAK,CAAC;AAC1D,OAAO,EAAQ,UAAU,EAAW,MAAM,KAAK,CAAC;AAIhD,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,sBAAsB,CAAC;AAIhD,OAAO,oCAAoC,CAAC;AAC5C,OAAO,+CAA+C,CAAC;AACvD,OAAO,2CAA2C,CAAC;AACnD,OAAO,wBAAwB,CAAC;AAEhC,MAAM,WAAW,oCAAoC;IACnD,IAAI,EAAE,GAAG,EAAE,CAAC;IACZ,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED;;;;GAIG;AACH,qBAEM,wBAAyB,SAAQ,UAAU;IAC/C,OAAuB,MAAM,EAAE,cAAc,CAAS;IAEtD,qBAAqB;IACrB,SAA4C,IAAI,EAAE,oCAAoC,CAAS;IAE/F,yBAAyB;IACzB,SACgB,QAAQ,EAAE,oCAAoC,CAAS;IAEvE;;OAEG;IACH,SAEgB,SAAS,EAAE,OAAO,CAAS;IAE3C,gEAAgE;IAChE,SAAyD,WAAW,EAAE,aAAa,CAAO;IAE1F;;;OAGG;IACH,SAEgB,gBAAgB,EAAE,OAAO,CAAS;IAElD;;;;;OAKG;IACH,SAEgB,YAAY,EAAE,OAAO,CAAS;IAE9C,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,eAAe,CAAkB;IACzC,OAAO,CAAC,SAAS,CAAmC;IAEpC,iBAAiB,IAAI,IAAI;IAKzC,2EAA2E;IAC3E,OAAO,CAAC,mBAAmB;IAwB3B,OAAO,CAAC,kBAAkB;IAmB1B,OAAO,CAAC,yBAAyB;cAuBd,MAAM,IAAI,cAAc;CA4B5C;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAE7B,qBAAqB,EAAE,wBAAwB,CAAC;KACjD;CACF"}
@@ -1,134 +1,190 @@
1
- import { SbbLanguageController as c } from "@sbb-esta/lyne-elements/core/controllers.js";
2
- import { defaultDateAdapter as u } from "@sbb-esta/lyne-elements/core/datetime.js";
3
- import { i18nTripDuration as h } from "@sbb-esta/lyne-elements/core/i18n.js";
4
- import { css as v, LitElement as _, html as o, nothing as n } from "lit";
5
- import { property as b, customElement as f } from "lit/decorators.js";
6
- import { durationToTime as g, removeTimezoneFromISOTimeString as $ } from "./core/datetime.js";
1
+ var K = (i) => {
2
+ throw TypeError(i);
3
+ };
4
+ var Q = (i, s, o) => s.has(i) || K("Cannot " + o);
5
+ var u = (i, s, o) => (Q(i, s, "read from private field"), o ? o.call(i) : s.get(i)), b = (i, s, o) => s.has(i) ? K("Cannot add the same private member more than once") : s instanceof WeakSet ? s.add(i) : s.set(i, o), l = (i, s, o, c) => (Q(i, s, "write to private field"), c ? c.call(i, o) : s.set(i, o), o);
6
+ import { __runInitializers as n, __esDecorate as h } from "tslib";
7
+ import { SbbLanguageController as Z } from "@sbb-esta/lyne-elements/core/controllers.js";
8
+ import { defaultDateAdapter as x } from "@sbb-esta/lyne-elements/core/datetime.js";
9
+ import { forceType as w } from "@sbb-esta/lyne-elements/core/decorators.js";
10
+ import { i18nTripDuration as tt } from "@sbb-esta/lyne-elements/core/i18n.js";
11
+ import { css as et, html as d, nothing as m, LitElement as at } from "lit";
12
+ import { customElement as it, property as _ } from "lit/decorators.js";
13
+ import { durationToTime as st, removeTimezoneFromISOTimeString as rt } from "./core/datetime.js";
7
14
  import "@sbb-esta/lyne-elements/divider.js";
8
15
  import "@sbb-esta/lyne-elements/screen-reader-only.js";
9
16
  import "@sbb-esta/lyne-elements/journey-header.js";
10
17
  import "./pearl-chain-time.js";
11
- import { i as j } from "./isValid-mroh13Xp.js";
12
- import { f as d } from "./format-oBQcGL50.js";
13
- const w = v`*,:before,:after{box-sizing:border-box}:host{display:block}.sbb-journey-summary{--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);color:var(--sbb-color-iron);display:flex;flex-direction:column}.sbb-journey-summary__via-block{display:flex}.sbb-journey-summary__vias{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;margin-block:0;padding-inline-start:var(--sbb-spacing-fixed-1x)}.sbb-journey-summary__date{margin-block-end:var(--sbb-spacing-fixed-2x)}.sbb-journey-summary__via{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.sbb-journey-summary__divider{margin-block:var(--sbb-spacing-fixed-6x)}ul li{list-style:none;display:inline}`;
14
- var x = Object.defineProperty, k = Object.getOwnPropertyDescriptor, l = (e, t, s, r) => {
15
- for (var i = r > 1 ? void 0 : r ? k(t, s) : t, p = e.length - 1, m; p >= 0; p--)
16
- (m = e[p]) && (i = (r ? m(t, s, i) : m(i)) || i);
17
- return r && i && x(t, s, i), i;
18
- };
19
- let a = class extends _ {
20
- constructor() {
21
- super(...arguments), this.headerLevel = "3", this._now = null, this._hasContentSlot = !1, this._language = new c(this);
22
- }
23
- set now(e) {
24
- this._now = u.getValidDateOrNull(u.deserialize(e));
25
- }
26
- get now() {
27
- return this._now ?? /* @__PURE__ */ new Date();
28
- }
29
- connectedCallback() {
30
- var e;
31
- super.connectedCallback(), this._hasContentSlot = !!((e = this.querySelector) != null && e.call(this, '[slot="content"]'));
32
- }
33
- /** renders the date of the journey or if it is the current or next day */
34
- _renderJourneyStart(e, t) {
35
- const s = u, r = t ? g(t, this._language.current) : null;
36
- if (j(e))
37
- return o`
38
- <time datetime=${d(e, "d") + " " + d(e, "M")}>
39
- ${s.format(e).replace(",", ".")}</time
40
- >${t && t > 0 ? o`,<time>
18
+ import { i as nt } from "./isValid-mroh13Xp.js";
19
+ import { f as R } from "./format-oBQcGL50.js";
20
+ const ot = et`*,:before,:after{box-sizing:border-box}:host{display:block}.sbb-journey-summary{--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);color:var(--sbb-color-iron);display:flex;flex-direction:column}.sbb-journey-summary__via-block{display:flex}.sbb-journey-summary__vias{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;margin-block:0;padding-inline-start:var(--sbb-spacing-fixed-1x)}.sbb-journey-summary__date{margin-block-end:var(--sbb-spacing-fixed-2x)}.sbb-journey-summary__via{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.sbb-journey-summary__divider{margin-block:var(--sbb-spacing-fixed-6x)}ul li{list-style:none;display:inline}`;
21
+ let wt = (() => {
22
+ var y, v, f, g, k, $, r;
23
+ let i = [it("sbb-journey-summary")], s, o = [], c, z = at, j = [], T, B = [], S = [], A, F = [], I = [], L, J = [], D = [], O, C = [], V = [], E, W = [], q = [], M, N = [], P = [], G;
24
+ return r = class extends z {
25
+ constructor() {
26
+ super(...arguments);
27
+ b(this, y);
28
+ b(this, v);
29
+ b(this, f);
30
+ b(this, g);
31
+ b(this, k);
32
+ b(this, $);
33
+ l(this, y, (n(this, j), n(this, B, null))), l(this, v, (n(this, S), n(this, F, null))), l(this, f, (n(this, I), n(this, J, !1))), l(this, g, (n(this, D), n(this, C, "3"))), l(this, k, (n(this, V), n(this, W, !1))), l(this, $, (n(this, q), n(this, N, !1))), this._now = (n(this, P), null), this._hasContentSlot = !1, this._language = new Z(this);
34
+ }
35
+ /** The trip prop */
36
+ get trip() {
37
+ return u(this, y);
38
+ }
39
+ set trip(e) {
40
+ l(this, y, e);
41
+ }
42
+ /** The tripBack prop */
43
+ get tripBack() {
44
+ return u(this, v);
45
+ }
46
+ set tripBack(e) {
47
+ l(this, v, e);
48
+ }
49
+ /**
50
+ * The RoundTrip prop. This prop controls if one or two arrows are displayed in the header.
51
+ */
52
+ get roundTrip() {
53
+ return u(this, f);
54
+ }
55
+ set roundTrip(e) {
56
+ l(this, f, e);
57
+ }
58
+ /** Heading level of the journey header element (e.g. h1-h6). */
59
+ get headerLevel() {
60
+ return u(this, g);
61
+ }
62
+ set headerLevel(e) {
63
+ l(this, g, e);
64
+ }
65
+ /**
66
+ * Per default, the current location has a pulsating animation. You can
67
+ * disable the animation with this property.
68
+ */
69
+ get disableAnimation() {
70
+ return u(this, k);
71
+ }
72
+ set disableAnimation(e) {
73
+ l(this, k, e);
74
+ }
75
+ /**
76
+ * The Footpath attribute for rendering different icons
77
+ * true: render a11y-icon
78
+ * false: render walk-icon
79
+ * default: render walk-icon
80
+ */
81
+ get a11yFootpath() {
82
+ return u(this, $);
83
+ }
84
+ set a11yFootpath(e) {
85
+ l(this, $, e);
86
+ }
87
+ /** A configured date which acts as the current date instead of the real current date. Recommended for testing purposes. */
88
+ set now(e) {
89
+ this._now = x.getValidDateOrNull(x.deserialize(e));
90
+ }
91
+ get now() {
92
+ return this._now ?? /* @__PURE__ */ new Date();
93
+ }
94
+ connectedCallback() {
95
+ var e;
96
+ super.connectedCallback(), this._hasContentSlot = !!((e = this.querySelector) != null && e.call(this, '[slot="content"]'));
97
+ }
98
+ /** renders the date of the journey or if it is the current or next day */
99
+ _renderJourneyStart(e, t) {
100
+ const a = x, p = t ? st(t, this._language.current) : null;
101
+ if (nt(e))
102
+ return d`
103
+ <time datetime=${R(e, "d") + " " + R(e, "M")}>
104
+ ${a.format(e).replace(",", ".")}</time
105
+ >${t && t > 0 ? d`,<time>
41
106
  <sbb-screen-reader-only>
42
- ${h[this._language.current]} ${r.long}
107
+ ${tt[this._language.current]} ${p.long}
43
108
  </sbb-screen-reader-only>
44
- <span aria-hidden="true">${r.short}</span>
45
- </time>` : n}
109
+ <span aria-hidden="true">${p.short}</span>
110
+ </time>` : m}
46
111
  `;
47
- }
48
- _renderJourneyVias(e) {
49
- const t = e.slice(0, 5);
50
- return o`
112
+ }
113
+ _renderJourneyVias(e) {
114
+ const t = e.slice(0, 5);
115
+ return d`
51
116
  <div class="sbb-journey-summary__via-block">
52
117
  <span class="sbb-journey-summary__via-text">Via</span>
53
- <ul class="sbb-journey-summary__vias" role=${e.length <= 1 ? "presentation" : n}>
54
- ${t.map(
55
- (s, r) => o`<li class="sbb-journey-summary__via">
56
- ${s}${r !== t.length - 1 && r < 4 ? o`<span>,</span>` : n}
57
- </li>`
58
- )}
118
+ <ul class="sbb-journey-summary__vias" role=${e.length <= 1 ? "presentation" : m}>
119
+ ${t.map((a, p) => d`<li class="sbb-journey-summary__via">
120
+ ${a}${p !== t.length - 1 && p < 4 ? d`<span>,</span>` : m}
121
+ </li>`)}
59
122
  </ul>
60
123
  </div>
61
124
  `;
62
- }
63
- _renderJourneyInformation(e) {
64
- const { vias: t, duration: s, departureWalk: r, departure: i, arrivalWalk: p, arrival: m, legs: y } = e || {};
65
- return o`
125
+ }
126
+ _renderJourneyInformation(e) {
127
+ const { vias: t, duration: a, departureWalk: p, departure: H, arrivalWalk: U, arrival: X, legs: Y } = e || {};
128
+ return d`
66
129
  <div>
67
- ${t && t.length > 0 ? this._renderJourneyVias(t) : n}
130
+ ${t && t.length > 0 ? this._renderJourneyVias(t) : m}
68
131
  <div class="sbb-journey-summary__date">
69
- ${this._renderJourneyStart($(i), s)}
132
+ ${this._renderJourneyStart(rt(H), a)}
70
133
  </div>
71
134
  <sbb-pearl-chain-time
72
- .arrivalTime=${m}
73
- .departureTime=${i}
74
- .departureWalk=${r}
75
- .arrivalWalk=${p}
76
- .legs=${y}
135
+ .arrivalTime=${X}
136
+ .departureTime=${H}
137
+ .departureWalk=${p}
138
+ .arrivalWalk=${U}
139
+ .legs=${Y}
77
140
  .disableAnimation=${this.disableAnimation}
78
141
  .a11yFootpath=${this.a11yFootpath}
79
142
  .now=${this.now}
80
143
  ></sbb-pearl-chain-time>
81
144
  </div>
82
145
  `;
83
- }
84
- render() {
85
- const { origin: e, destination: t } = this.trip || {};
86
- return o`
146
+ }
147
+ render() {
148
+ const { origin: e, destination: t } = this.trip || {};
149
+ return d`
87
150
  <div class="sbb-journey-summary">
88
- ${e ? o`<sbb-journey-header
151
+ ${e ? d`<sbb-journey-header
89
152
  size="l"
90
- .level=${this.headerLevel || n}
153
+ .level=${this.headerLevel || m}
91
154
  .origin=${e}
92
155
  .destination=${t}
93
- .roundTrip=${this.roundTrip ?? n}
94
- ></sbb-journey-header>` : n}
156
+ .roundTrip=${this.roundTrip ?? m}
157
+ ></sbb-journey-header>` : m}
95
158
  ${this._renderJourneyInformation(this.trip)}
96
- ${this.tripBack ? o`<div>
159
+ ${this.tripBack ? d`<div>
97
160
  <sbb-divider class="sbb-journey-summary__divider"></sbb-divider>
98
161
  ${this._renderJourneyInformation(this.tripBack)}
99
- </div>` : n}
100
- ${this._hasContentSlot ? o` <div class="sbb-journey-summary__slot">
162
+ </div>` : m}
163
+ ${this._hasContentSlot ? d` <div class="sbb-journey-summary__slot">
101
164
  <slot name="content"></slot>
102
- </div>` : n}
165
+ </div>` : m}
103
166
  </div>
104
167
  `;
105
- }
106
- };
107
- a.styles = w;
108
- l([
109
- b({ type: Object })
110
- ], a.prototype, "trip", 2);
111
- l([
112
- b({ attribute: "trip-back", type: Object })
113
- ], a.prototype, "tripBack", 2);
114
- l([
115
- b({ attribute: "round-trip", type: Boolean })
116
- ], a.prototype, "roundTrip", 2);
117
- l([
118
- b({ attribute: "header-level" })
119
- ], a.prototype, "headerLevel", 2);
120
- l([
121
- b({ attribute: "disable-animation", type: Boolean })
122
- ], a.prototype, "disableAnimation", 2);
123
- l([
124
- b({ attribute: "a11y-footpath", type: Boolean })
125
- ], a.prototype, "a11yFootpath", 2);
126
- l([
127
- b()
128
- ], a.prototype, "now", 1);
129
- a = l([
130
- f("sbb-journey-summary")
131
- ], a);
168
+ }
169
+ }, y = new WeakMap(), v = new WeakMap(), f = new WeakMap(), g = new WeakMap(), k = new WeakMap(), $ = new WeakMap(), c = r, (() => {
170
+ const e = typeof Symbol == "function" && Symbol.metadata ? Object.create(z[Symbol.metadata] ?? null) : void 0;
171
+ T = [_({ type: Object })], A = [_({ attribute: "trip-back", type: Object })], L = [w(), _({ attribute: "round-trip", type: Boolean })], O = [_({ attribute: "header-level" })], E = [w(), _({ attribute: "disable-animation", type: Boolean })], M = [w(), _({ attribute: "a11y-footpath", type: Boolean })], G = [_()], h(r, null, T, { kind: "accessor", name: "trip", static: !1, private: !1, access: { has: (t) => "trip" in t, get: (t) => t.trip, set: (t, a) => {
172
+ t.trip = a;
173
+ } }, metadata: e }, B, S), h(r, null, A, { kind: "accessor", name: "tripBack", static: !1, private: !1, access: { has: (t) => "tripBack" in t, get: (t) => t.tripBack, set: (t, a) => {
174
+ t.tripBack = a;
175
+ } }, metadata: e }, F, I), h(r, null, L, { kind: "accessor", name: "roundTrip", static: !1, private: !1, access: { has: (t) => "roundTrip" in t, get: (t) => t.roundTrip, set: (t, a) => {
176
+ t.roundTrip = a;
177
+ } }, metadata: e }, J, D), h(r, null, O, { kind: "accessor", name: "headerLevel", static: !1, private: !1, access: { has: (t) => "headerLevel" in t, get: (t) => t.headerLevel, set: (t, a) => {
178
+ t.headerLevel = a;
179
+ } }, metadata: e }, C, V), h(r, null, E, { kind: "accessor", name: "disableAnimation", static: !1, private: !1, access: { has: (t) => "disableAnimation" in t, get: (t) => t.disableAnimation, set: (t, a) => {
180
+ t.disableAnimation = a;
181
+ } }, metadata: e }, W, q), h(r, null, M, { kind: "accessor", name: "a11yFootpath", static: !1, private: !1, access: { has: (t) => "a11yFootpath" in t, get: (t) => t.a11yFootpath, set: (t, a) => {
182
+ t.a11yFootpath = a;
183
+ } }, metadata: e }, N, P), h(r, null, G, { kind: "setter", name: "now", static: !1, private: !1, access: { has: (t) => "now" in t, set: (t, a) => {
184
+ t.now = a;
185
+ } }, metadata: e }, null, j), h(null, s = { value: c }, i, { kind: "class", name: c.name, metadata: e }, null, o), c = s.value, e && Object.defineProperty(c, Symbol.metadata, { enumerable: !0, configurable: !0, writable: !0, value: e });
186
+ })(), r.styles = ot, n(c, o), c;
187
+ })();
132
188
  export {
133
- a as SbbJourneySummaryElement
189
+ wt as SbbJourneySummaryElement
134
190
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sbb-esta/lyne-elements-experimental",
3
- "version": "1.13.0",
3
+ "version": "1.14.0",
4
4
  "description": "Lyne Design System",
5
5
  "keywords": [
6
6
  "design system",
@@ -11,10 +11,11 @@
11
11
  "type": "module",
12
12
  "customElements": "custom-elements.json",
13
13
  "peerDependencies": {
14
- "@sbb-esta/lyne-elements": "1.13.0"
14
+ "@sbb-esta/lyne-elements": "1.14.0"
15
15
  },
16
16
  "dependencies": {
17
- "lit": "^3.2.1"
17
+ "lit": "^3.2.1",
18
+ "tslib": "^2.8.0"
18
19
  },
19
20
  "publishConfig": {
20
21
  "access": "public"
@@ -14,12 +14,12 @@ export declare class SbbPearlChainElement extends LitElement {
14
14
  * to the total travel time. Example: departure 16:30, change at 16:40,
15
15
  * arrival at 17:00. So the change should have a duration of 33.33%.
16
16
  */
17
- legs?: (Leg | PtRideLeg)[];
17
+ accessor legs: (Leg | PtRideLeg)[];
18
18
  /**
19
19
  * Per default, the current location has a pulsating animation. You can
20
20
  * disable the animation with this property.
21
21
  */
22
- disableAnimation?: boolean;
22
+ accessor disableAnimation: boolean;
23
23
  /** A configured date which acts as the current date instead of the real current date. Recommended for testing purposes. */
24
24
  set now(value: SbbDateLike | undefined);
25
25
  get now(): Date | null;
@@ -1 +1 @@
1
- {"version":3,"file":"pearl-chain.d.ts","sourceRoot":"","sources":["../../../src/elements-experimental/pearl-chain/pearl-chain.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,+CAA+C,CAAC;AAEjF,OAAO,KAAK,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,KAAK,CAAC;AAC1D,OAAO,EAAQ,UAAU,EAAW,MAAM,KAAK,CAAC;AAKhD,OAAO,KAAK,EAAE,GAAG,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAW3D;;GAEG;AACH,qBACa,oBAAqB,SAAQ,UAAU;IAClD,OAAuB,MAAM,EAAE,cAAc,CAAS;IAEtD;;;;;;;OAOG;IAC+B,IAAI,CAAC,EAAE,CAAC,GAAG,GAAG,SAAS,CAAC,EA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EjC,OAAO,CAAC,eAAe;IAiBvB,OAAO,CAAC,eAAe;IAIvB,OAAO,CAAC,oBAAoB;IAmB5B,OAAO,CAAC,YAAY;IAapB,OAAO,CAAC,UAAU;IAiBlB,OAAO,CAAC,eAAe;cAmBJ,MAAM,IAAI,cAAc;CA4I5C;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAE7B,iBAAiB,EAAE,oBAAoB,CAAC;KACzC;CACF"}
@@ -14,22 +14,22 @@ export declare class SbbPearlChainTimeElement extends LitElement {
14
14
  * to the total travel time. Example: departure 16:30, change at 16:40,
15
15
  * arrival at 17:00. So the change should have a duration of 33.33%.
16
16
  */
17
- legs: (Leg | PtRideLeg)[];
17
+ accessor legs: (Leg | PtRideLeg)[];
18
18
  /** Prop to render the departure time - will be formatted as "H:mm" */
19
- departureTime?: string;
19
+ accessor departureTime: string;
20
20
  /** Prop to render the arrival time - will be formatted as "H:mm" */
21
- arrivalTime?: string;
21
+ accessor arrivalTime: string;
22
22
  /** Optional prop to render the walk time (in minutes) before departure */
23
- departureWalk?: number;
23
+ accessor departureWalk: number;
24
24
  /** Optional prop to render the walk time (in minutes) after arrival */
25
- arrivalWalk?: number;
25
+ accessor arrivalWalk: number;
26
26
  /**
27
27
  * Per default, the current location has a pulsating animation. You can
28
28
  * disable the animation with this property.
29
29
  */
30
- disableAnimation?: boolean;
30
+ accessor disableAnimation: boolean;
31
31
  /** Optional prop to render wheelchair-small instead of walk-small */
32
- a11yFootpath?: boolean;
32
+ accessor a11yFootpath: boolean;
33
33
  /** A configured date which acts as the current date instead of the real current date. Recommended for testing purposes. */
34
34
  set now(value: SbbDateLike | undefined);
35
35
  get now(): Date;
@@ -1 +1 @@
1
- {"version":3,"file":"pearl-chain-time.d.ts","sourceRoot":"","sources":["../../../src/elements-experimental/pearl-chain-time/pearl-chain-time.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,+CAA+C,CAAC;AAEjF,OAA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UAAU,EAAW,MAAM,KAAK,CAAC;AAIhD,OAAO,KAAK,EAAE,GAAG,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAK3D,OAAO,mBAAmB,CAAC;AAE3B;;GAEG;AACH,qBAEM,wBAAyB,SAAQ,UAAU;IAC/C,OAAuB,MAAM,EAAE,cAAc,CAAS;IAEtD;;;;;;;OAOG;IACH,SAA2C,IAAI,EAAE,CAAC,GAAG,GAAG,SAAS,CAAC,EAAE,CAAM;IAE1E,sEAAsE;IACtE,SAEgB,aAAa,EAAE,MAAM,CAAM;IAE3C,oEAAoE;IACpE,SAEgB,WAAW,EAAE,MAAM,CAAM;IAEzC,0EAA0E;IAC1E,SAEgB,aAAa,EAAE,MAAM,CAAO;IAE5C,uEAAuE;IACvE,SAEgB,WAAW,EAAE,MAAM,CAAO;IAE1C;;;OAGG;IACH,SAEgB,gBAAgB,EAAE,OAAO,CAAS;IAElD,qEAAqE;IACrE,SAEgB,YAAY,EAAE,OAAO,CAAS;IAE9C,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,MAAM,IAAI,cAAc;CAoD5C;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAE7B,sBAAsB,EAAE,wBAAwB,CAAC;KAClD;CACF"}