@sbb-esta/lyne-elements-experimental 2.11.0 → 2.11.2

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 (142) hide show
  1. package/core/datetime/date-helper.js +142 -142
  2. package/core/timetable/access-leg-helper.js +49 -52
  3. package/core/timetable/timetable-helper.js +7 -8
  4. package/custom-elements.json +106 -35
  5. package/development/core/datetime/date-helper.js +10 -10
  6. package/development/core/timetable/access-leg-helper.js +12 -15
  7. package/development/core/timetable/timetable-helper.js +6 -7
  8. package/development/{differenceInMinutes-CHSyWiQs.js → differenceInMinutes-D5Nj8Stc.js} +3 -3
  9. package/development/{format-D0-yhzi4.js → format-BQfaa1ZT.js} +22 -26
  10. package/development/{isValid-Bo4R7iA7.js → isValid-DvieCZVi.js} +3 -3
  11. package/development/journey-summary/journey-summary.component.js +4 -5
  12. package/development/pearl-chain/pearl-chain.component.d.ts.map +1 -1
  13. package/development/pearl-chain/pearl-chain.component.js +28 -39
  14. package/development/pearl-chain-time/pearl-chain-time.component.js +5 -6
  15. package/development/pearl-chain-vertical/pearl-chain-vertical.component.js +1 -1
  16. package/development/pearl-chain-vertical-item/pearl-chain-vertical-item.component.js +1 -1
  17. package/development/seat-reservation/common/mapper/icon-mapper.js +1 -1
  18. package/development/seat-reservation/common/mapper/mapper.d.ts +5 -5
  19. package/development/seat-reservation/common/mapper/mapper.d.ts.map +1 -1
  20. package/development/seat-reservation/common/mapper/mapper.js +17 -19
  21. package/development/seat-reservation/common/mapper/seat-reservation-sample-data.js +1 -1
  22. package/development/seat-reservation/common/svgs.js +1 -1
  23. package/development/seat-reservation/common/translations/i18n.js +2 -3
  24. package/development/seat-reservation/common/types.d.ts +71 -0
  25. package/development/seat-reservation/common/types.d.ts.map +1 -0
  26. package/development/seat-reservation/common/types.js +2 -0
  27. package/development/seat-reservation/common.d.ts +6 -3
  28. package/development/seat-reservation/common.d.ts.map +1 -1
  29. package/development/seat-reservation/common.js +3 -7
  30. package/development/seat-reservation/seat-reservation/seat-reservation-base-element.d.ts +4 -3
  31. package/development/seat-reservation/seat-reservation/seat-reservation-base-element.d.ts.map +1 -1
  32. package/development/seat-reservation/seat-reservation/seat-reservation-base-element.js +27 -38
  33. package/development/seat-reservation/seat-reservation/seat-reservation-scoped/seat-reservation-scoped.component.d.ts.map +1 -0
  34. package/development/seat-reservation/seat-reservation/{seat-reservation-scoped-component → seat-reservation-scoped}/seat-reservation-scoped.component.js +6 -7
  35. package/development/seat-reservation/seat-reservation/seat-reservation-scoped.d.ts +5 -0
  36. package/development/seat-reservation/seat-reservation/seat-reservation-scoped.d.ts.map +1 -0
  37. package/development/seat-reservation/seat-reservation/seat-reservation-scoped.js +5 -0
  38. package/development/seat-reservation/seat-reservation/seat-reservation.component.d.ts +4 -4
  39. package/development/seat-reservation/seat-reservation/seat-reservation.component.d.ts.map +1 -1
  40. package/development/seat-reservation/seat-reservation/seat-reservation.component.js +20 -27
  41. package/development/seat-reservation/seat-reservation-area/seat-reservation-area.component.js +1 -1
  42. package/development/seat-reservation/seat-reservation-area.d.ts +3 -0
  43. package/development/seat-reservation/seat-reservation-area.d.ts.map +1 -1
  44. package/development/seat-reservation/seat-reservation-graphic/seat-reservation-assets.js +2 -3
  45. package/development/seat-reservation/seat-reservation-graphic/seat-reservation-graphic.component.js +7 -8
  46. package/development/seat-reservation/seat-reservation-graphic.d.ts +3 -0
  47. package/development/seat-reservation/seat-reservation-graphic.d.ts.map +1 -1
  48. package/development/seat-reservation/seat-reservation-navigation/seat-reservation-navigation-coach/seat-reservation-navigation-coach.component.d.ts +6 -5
  49. package/development/seat-reservation/seat-reservation-navigation/seat-reservation-navigation-coach/seat-reservation-navigation-coach.component.d.ts.map +1 -1
  50. package/development/seat-reservation/seat-reservation-navigation/seat-reservation-navigation-coach/seat-reservation-navigation-coach.component.js +7 -11
  51. package/development/seat-reservation/seat-reservation-navigation/seat-reservation-navigation-coach.d.ts +3 -0
  52. package/development/seat-reservation/seat-reservation-navigation/seat-reservation-navigation-coach.d.ts.map +1 -1
  53. package/development/seat-reservation/seat-reservation-navigation/seat-reservation-navigation-services/seat-reservation-navigation-services.component.js +2 -3
  54. package/development/seat-reservation/seat-reservation-navigation/seat-reservation-navigation-services.d.ts +3 -0
  55. package/development/seat-reservation/seat-reservation-navigation/seat-reservation-navigation-services.d.ts.map +1 -1
  56. package/development/seat-reservation/seat-reservation-navigation.d.ts +6 -0
  57. package/development/seat-reservation/seat-reservation-navigation.d.ts.map +1 -0
  58. package/development/seat-reservation/seat-reservation-navigation.js +7 -0
  59. package/development/seat-reservation/seat-reservation-place-control/seat-reservation-place-control.component.d.ts +2 -2
  60. package/development/seat-reservation/seat-reservation-place-control/seat-reservation-place-control.component.d.ts.map +1 -1
  61. package/development/seat-reservation/seat-reservation-place-control/seat-reservation-place-control.component.js +5 -6
  62. package/development/seat-reservation/seat-reservation-place-control.d.ts +3 -0
  63. package/development/seat-reservation/seat-reservation-place-control.d.ts.map +1 -1
  64. package/development/seat-reservation/seat-reservation.d.ts +5 -71
  65. package/development/seat-reservation/seat-reservation.d.ts.map +1 -1
  66. package/development/seat-reservation/seat-reservation.js +4 -2
  67. package/development/seat-reservation.d.ts +5 -0
  68. package/development/seat-reservation.d.ts.map +1 -1
  69. package/development/seat-reservation.js +26 -3
  70. package/development/timetable-duration/timetable-duration.component.js +1 -1
  71. package/development/timetable-row/timetable-row.component.js +58 -89
  72. package/differenceInMinutes-CP_C5onR.js +23 -0
  73. package/{format-Dg8rkk7h.js → format-lqeCzmzS.js} +438 -442
  74. package/index.d.ts +1 -1
  75. package/index.js +1 -1
  76. package/isValid-Ceq2O0NQ.js +45 -0
  77. package/journey-summary/journey-summary.component.js +3 -4
  78. package/package.json +47 -2
  79. package/pearl-chain/pearl-chain.component.d.ts.map +1 -1
  80. package/pearl-chain/pearl-chain.component.js +78 -95
  81. package/pearl-chain-time/pearl-chain-time.component.js +44 -45
  82. package/seat-reservation/common/mapper/mapper.d.ts +5 -5
  83. package/seat-reservation/common/mapper/mapper.d.ts.map +1 -1
  84. package/seat-reservation/common/mapper/mapper.js +50 -54
  85. package/seat-reservation/common/translations/i18n.js +5 -6
  86. package/seat-reservation/common/types.d.ts +71 -0
  87. package/seat-reservation/common/types.d.ts.map +1 -0
  88. package/seat-reservation/common/types.js +1 -0
  89. package/seat-reservation/common.d.ts +6 -3
  90. package/seat-reservation/common.d.ts.map +1 -1
  91. package/seat-reservation/common.js +11 -15
  92. package/seat-reservation/seat-reservation/seat-reservation-base-element.d.ts +4 -3
  93. package/seat-reservation/seat-reservation/seat-reservation-base-element.d.ts.map +1 -1
  94. package/seat-reservation/seat-reservation/seat-reservation-base-element.js +107 -118
  95. package/seat-reservation/seat-reservation/seat-reservation-scoped/seat-reservation-scoped.component.d.ts.map +1 -0
  96. package/seat-reservation/seat-reservation/{seat-reservation-scoped-component → seat-reservation-scoped}/seat-reservation-scoped.component.js +40 -41
  97. package/seat-reservation/seat-reservation/seat-reservation-scoped.d.ts +5 -0
  98. package/seat-reservation/seat-reservation/seat-reservation-scoped.d.ts.map +1 -0
  99. package/seat-reservation/seat-reservation/{seat-reservation-scoped-component.js → seat-reservation-scoped.js} +1 -1
  100. package/seat-reservation/seat-reservation/seat-reservation.component.d.ts +4 -4
  101. package/seat-reservation/seat-reservation/seat-reservation.component.d.ts.map +1 -1
  102. package/seat-reservation/seat-reservation/seat-reservation.component.js +82 -91
  103. package/seat-reservation/seat-reservation-area.d.ts +3 -0
  104. package/seat-reservation/seat-reservation-area.d.ts.map +1 -1
  105. package/seat-reservation/seat-reservation-graphic/seat-reservation-assets.js +15 -18
  106. package/seat-reservation/seat-reservation-graphic/seat-reservation-graphic.component.js +58 -59
  107. package/seat-reservation/seat-reservation-graphic.d.ts +3 -0
  108. package/seat-reservation/seat-reservation-graphic.d.ts.map +1 -1
  109. package/seat-reservation/seat-reservation-navigation/seat-reservation-navigation-coach/seat-reservation-navigation-coach.component.d.ts +6 -5
  110. package/seat-reservation/seat-reservation-navigation/seat-reservation-navigation-coach/seat-reservation-navigation-coach.component.d.ts.map +1 -1
  111. package/seat-reservation/seat-reservation-navigation/seat-reservation-navigation-coach/seat-reservation-navigation-coach.component.js +71 -75
  112. package/seat-reservation/seat-reservation-navigation/seat-reservation-navigation-coach.d.ts +3 -0
  113. package/seat-reservation/seat-reservation-navigation/seat-reservation-navigation-coach.d.ts.map +1 -1
  114. package/seat-reservation/seat-reservation-navigation/seat-reservation-navigation-services/seat-reservation-navigation-services.component.js +12 -13
  115. package/seat-reservation/seat-reservation-navigation/seat-reservation-navigation-services.d.ts +3 -0
  116. package/seat-reservation/seat-reservation-navigation/seat-reservation-navigation-services.d.ts.map +1 -1
  117. package/seat-reservation/seat-reservation-navigation.d.ts +6 -0
  118. package/seat-reservation/seat-reservation-navigation.d.ts.map +1 -0
  119. package/seat-reservation/seat-reservation-navigation.js +6 -0
  120. package/seat-reservation/seat-reservation-place-control/seat-reservation-place-control.component.d.ts +2 -2
  121. package/seat-reservation/seat-reservation-place-control/seat-reservation-place-control.component.d.ts.map +1 -1
  122. package/seat-reservation/seat-reservation-place-control/seat-reservation-place-control.component.js +24 -25
  123. package/seat-reservation/seat-reservation-place-control.d.ts +3 -0
  124. package/seat-reservation/seat-reservation-place-control.d.ts.map +1 -1
  125. package/seat-reservation/seat-reservation.d.ts +5 -71
  126. package/seat-reservation/seat-reservation.d.ts.map +1 -1
  127. package/seat-reservation/seat-reservation.js +6 -4
  128. package/seat-reservation.d.ts +5 -0
  129. package/seat-reservation.d.ts.map +1 -1
  130. package/seat-reservation.js +27 -4
  131. package/timetable-row/timetable-row.component.js +207 -247
  132. package/development/seat-reservation/seat-reservation/seat-reservation-scoped-component/seat-reservation-scoped.component.d.ts.map +0 -1
  133. package/development/seat-reservation/seat-reservation/seat-reservation-scoped-component.d.ts +0 -2
  134. package/development/seat-reservation/seat-reservation/seat-reservation-scoped-component.d.ts.map +0 -1
  135. package/development/seat-reservation/seat-reservation/seat-reservation-scoped-component.js +0 -5
  136. package/differenceInMinutes-BMqUZdhj.js +0 -23
  137. package/isValid-DJ69OMZJ.js +0 -45
  138. package/seat-reservation/seat-reservation/seat-reservation-scoped-component/seat-reservation-scoped.component.d.ts.map +0 -1
  139. package/seat-reservation/seat-reservation/seat-reservation-scoped-component.d.ts +0 -2
  140. package/seat-reservation/seat-reservation/seat-reservation-scoped-component.d.ts.map +0 -1
  141. /package/development/seat-reservation/seat-reservation/{seat-reservation-scoped-component → seat-reservation-scoped}/seat-reservation-scoped.component.d.ts +0 -0
  142. /package/seat-reservation/seat-reservation/{seat-reservation-scoped-component → seat-reservation-scoped}/seat-reservation-scoped.component.d.ts +0 -0
@@ -1,81 +1,80 @@
1
- var q = (i) => {
2
- throw TypeError(i);
1
+ var F = (s) => {
2
+ throw TypeError(s);
3
3
  };
4
- var H = (i, r, a) => r.has(i) || q("Cannot " + a);
5
- var g = (i, r, a) => (H(i, r, "read from private field"), a ? a.call(i) : r.get(i)), b = (i, r, a) => r.has(i) ? q("Cannot add the same private member more than once") : r instanceof WeakSet ? r.add(i) : r.set(i, a), o = (i, r, a, c) => (H(i, r, "write to private field"), c ? c.call(i, a) : r.set(i, a), a);
6
- import { __runInitializers as h, __esDecorate as m } from "tslib";
7
- import { SbbLanguageController as J } from "@sbb-esta/lyne-elements/core/controllers.js";
8
- import { forceType as w } from "@sbb-esta/lyne-elements/core/decorators.js";
9
- import { css as K, LitElement as O, html as z } from "lit";
10
- import { customElement as Q, property as y } from "lit/decorators.js";
11
- import { classMap as V } from "lit/directives/class-map.js";
12
- import { mapIconToSvg as W, getI18nSeatReservation as X } from "../common.js";
4
+ var G = (s, i, r) => i.has(s) || F("Cannot " + r);
5
+ var l = (s, i, r) => (G(s, i, "read from private field"), r ? r.call(s) : i.get(s)), g = (s, i, r) => i.has(s) ? F("Cannot add the same private member more than once") : i instanceof WeakSet ? i.add(s) : i.set(s, r), o = (s, i, r, c) => (G(s, i, "write to private field"), c ? c.call(s, r) : i.set(s, r), r);
6
+ import { __runInitializers as h, __esDecorate as b } from "tslib";
7
+ import { SbbLanguageController as q } from "@sbb-esta/lyne-elements/core/controllers.js";
8
+ import { forceType as f } from "@sbb-esta/lyne-elements/core/decorators.js";
9
+ import { css as H, LitElement as J, html as z } from "lit";
10
+ import { customElement as K, property as w } from "lit/decorators.js";
11
+ import { classMap as Q } from "lit/directives/class-map.js";
12
+ import { mapIconToSvg as V, getI18nSeatReservation as W } from "../common.js";
13
13
  import "@sbb-esta/lyne-elements/icon.js";
14
- const Y = K`*,:before,:after{box-sizing:border-box}:host{--sbb-reservation-graphic-width: 16;--sbb-reservation-graphic-height: 16;--sbb-reservation-graphic-rotation: 0;--sbb-reservation-graphic-inverse-rotation: 0}.sbb-sr-icon,.sbb-sr-graphic{--sbb-icon-svg-width: calc(var(--sbb-reservation-graphic-width) * .0625rem);--sbb-icon-svg-height: calc(var(--sbb-reservation-graphic-height) * .0625rem);display:flex;justify-content:center;align-items:center;width:calc(var(--sbb-reservation-graphic-width) * .0625rem);height:calc(var(--sbb-reservation-graphic-height) * .0625rem);transform-origin:center;rotate:calc(var(--sbb-reservation-graphic-rotation) * 1deg)}.sbb-sr-icon{color:var(--sbb-color-granite)}.sbb-sr-graphic svg{width:100%;height:100%}.sbb-sr-graphic svg .fix-rotation-inverse{transform-origin:center;rotate:calc(var(--sbb-reservation-graphic-inverse-rotation) * 1deg)}@media (forced-colors: active){.sbb-sr-graphic svg:not(.color-immutable) [fill]:not([fill=none]){fill:currentcolor}.sbb-sr-graphic .no-bg{fill:transparent}}`;
15
- let ct = (() => {
16
- var v, p, _, d, u, f, n;
17
- let i = [Q("sbb-seat-reservation-graphic")], r, a = [], c, R = O, x, S = [], I = [], N, $ = [], k = [], E, D = [], C = [], L, T = [], A = [], M, P = [], U = [], B, F = [], G = [];
18
- return n = class extends R {
14
+ const X = H`*,:before,:after{box-sizing:border-box}:host{--sbb-reservation-graphic-width: 16;--sbb-reservation-graphic-height: 16;--sbb-reservation-graphic-rotation: 0;--sbb-reservation-graphic-inverse-rotation: 0}.sbb-sr-icon,.sbb-sr-graphic{--sbb-icon-svg-width: calc(var(--sbb-reservation-graphic-width) * .0625rem);--sbb-icon-svg-height: calc(var(--sbb-reservation-graphic-height) * .0625rem);display:flex;justify-content:center;align-items:center;width:calc(var(--sbb-reservation-graphic-width) * .0625rem);height:calc(var(--sbb-reservation-graphic-height) * .0625rem);transform-origin:center;rotate:calc(var(--sbb-reservation-graphic-rotation) * 1deg)}.sbb-sr-icon{color:var(--sbb-color-granite)}.sbb-sr-graphic svg{width:100%;height:100%}.sbb-sr-graphic svg .fix-rotation-inverse{transform-origin:center;rotate:calc(var(--sbb-reservation-graphic-inverse-rotation) * 1deg)}@media (forced-colors: active){.sbb-sr-graphic svg:not(.color-immutable) [fill]:not([fill=none]){fill:currentcolor}.sbb-sr-graphic .no-bg{fill:transparent}}`;
15
+ let ht = (() => {
16
+ var m, v, p, _, d, u, a;
17
+ let s = [K("sbb-seat-reservation-graphic")], i, r = [], c, R = J, x, S = [], I = [], N, $ = [], E = [], k, j = [], D = [], O, C = [], L = [], T, A = [], M = [], P, U = [], B = [];
18
+ return a = class extends R {
19
19
  constructor() {
20
20
  super(...arguments);
21
- b(this, v);
22
- b(this, p);
23
- b(this, _);
24
- b(this, d);
25
- b(this, u);
26
- b(this, f);
27
- o(this, v, h(this, S, "")), o(this, p, (h(this, I), h(this, $, !1))), o(this, _, (h(this, k), h(this, D, 0))), o(this, d, (h(this, C), h(this, T, 0))), o(this, u, (h(this, A), h(this, P, null))), o(this, f, (h(this, U), h(this, F, null))), this._language = (h(this, G), new J(this));
21
+ g(this, m);
22
+ g(this, v);
23
+ g(this, p);
24
+ g(this, _);
25
+ g(this, d);
26
+ g(this, u);
27
+ o(this, m, h(this, S, "")), o(this, v, (h(this, I), h(this, $, !1))), o(this, p, (h(this, E), h(this, j, 0))), o(this, _, (h(this, D), h(this, C, 0))), o(this, d, (h(this, L), h(this, A, null))), o(this, u, (h(this, M), h(this, U, null))), this._language = (h(this, B), new q(this));
28
28
  }
29
29
  /** Name of the SVG graphic to be displayed. */
30
30
  get name() {
31
- return g(this, v);
31
+ return l(this, m);
32
32
  }
33
33
  set name(t) {
34
- o(this, v, t);
34
+ o(this, m, t);
35
35
  }
36
36
  /** if true, scale the graphic content of the given element non-uniformly if necessary */
37
37
  get stretch() {
38
- return g(this, p);
38
+ return l(this, v);
39
39
  }
40
40
  set stretch(t) {
41
- o(this, p, t);
41
+ o(this, v, t);
42
42
  }
43
43
  /** handles the rotation of the SVG graphic */
44
44
  get rotation() {
45
- return g(this, _);
45
+ return l(this, p);
46
46
  }
47
47
  set rotation(t) {
48
- o(this, _, t);
48
+ o(this, p, t);
49
49
  }
50
50
  /** Inverse rotation for part of an SVG that can be rotated opposite to the normal rotation */
51
51
  get inverseRotation() {
52
- return g(this, d);
52
+ return l(this, _);
53
53
  }
54
54
  set inverseRotation(t) {
55
- o(this, d, t);
55
+ o(this, _, t);
56
56
  }
57
57
  /** width of the svg in pixels (without unit) */
58
58
  get width() {
59
- return g(this, u);
59
+ return l(this, d);
60
60
  }
61
61
  set width(t) {
62
- o(this, u, t);
62
+ o(this, d, t);
63
63
  }
64
64
  /** height of the svg in pixels (without unit) */
65
65
  get height() {
66
- return g(this, f);
66
+ return l(this, u);
67
67
  }
68
68
  set height(t) {
69
- o(this, f, t);
69
+ o(this, u, t);
70
70
  }
71
71
  willUpdate(t) {
72
- var e, s, l, j;
73
- super.willUpdate(t), t.has("width") && this.width && ((e = this.style) == null || e.setProperty("--sbb-reservation-graphic-width", `${this.width}`)), t.has("height") && this.height && ((s = this.style) == null || s.setProperty("--sbb-reservation-graphic-height", `${this.height}`)), t.has("rotation") && ((l = this.style) == null || l.setProperty("--sbb-reservation-graphic-rotation", `${this.rotation}`)), t.has("inverseRotation") && ((j = this.style) == null || j.setProperty("--sbb-reservation-graphic-inverse-rotation", `${this.inverseRotation}`));
72
+ super.willUpdate(t), t.has("width") && this.width && this.style?.setProperty("--sbb-reservation-graphic-width", `${this.width}`), t.has("height") && this.height && this.style?.setProperty("--sbb-reservation-graphic-height", `${this.height}`), t.has("rotation") && this.style?.setProperty("--sbb-reservation-graphic-rotation", `${this.rotation}`), t.has("inverseRotation") && this.style?.setProperty("--sbb-reservation-graphic-inverse-rotation", `${this.inverseRotation}`);
74
73
  }
75
74
  render() {
76
- const t = W[this.name];
77
- return !(t != null && t.svg) && !(t != null && t.svgName) ? null : z`<span
78
- class="${V({
75
+ const t = V[this.name];
76
+ return !t?.svg && !t?.svgName ? null : z`<span
77
+ class="${Q({
79
78
  "sbb-sr-icon": !!t.svgName,
80
79
  "sbb-sr-graphic": !!t.svg
81
80
  })}"
@@ -83,31 +82,31 @@ let ct = (() => {
83
82
  ${t.svgName ? z` <sbb-icon
84
83
  name="${t.svgName || ""}"
85
84
  aria-hidden="false"
86
- aria-label="${X(t.svgName, this._language.current)}"
85
+ aria-label="${W(t.svgName, this._language.current)}"
87
86
  ></sbb-icon>` : z`${this._getSvgElement(t.svg)}`}
88
87
  </span>`;
89
88
  }
90
89
  _getSvgElement(t) {
91
- const e = new DOMParser(), s = t || "<svg></svg>", l = e.parseFromString(s, "image/svg+xml").firstElementChild;
92
- return this.stretch && (l == null ? void 0 : l.nodeName.toLowerCase()) === "svg" && l.setAttribute("preserveAspectRatio", "none"), l;
90
+ const e = new DOMParser(), n = t || "<svg></svg>", y = e.parseFromString(n, "image/svg+xml").firstElementChild;
91
+ return this.stretch && y?.nodeName.toLowerCase() === "svg" && y.setAttribute("preserveAspectRatio", "none"), y;
93
92
  }
94
- }, v = new WeakMap(), p = new WeakMap(), _ = new WeakMap(), d = new WeakMap(), u = new WeakMap(), f = new WeakMap(), c = n, (() => {
93
+ }, m = new WeakMap(), v = new WeakMap(), p = new WeakMap(), _ = new WeakMap(), d = new WeakMap(), u = new WeakMap(), c = a, (() => {
95
94
  const t = typeof Symbol == "function" && Symbol.metadata ? Object.create(R[Symbol.metadata] ?? null) : void 0;
96
- x = [w(), y({ attribute: "name" })], N = [w(), y({ attribute: "stretch", type: Boolean })], E = [w(), y({ attribute: "rotation", type: Number })], L = [w(), y({ attribute: "inverse-roration", type: Number })], M = [w(), y({ attribute: "width", type: Number })], B = [w(), y({ attribute: "height", type: Number })], m(n, null, x, { kind: "accessor", name: "name", static: !1, private: !1, access: { has: (e) => "name" in e, get: (e) => e.name, set: (e, s) => {
97
- e.name = s;
98
- } }, metadata: t }, S, I), m(n, null, N, { kind: "accessor", name: "stretch", static: !1, private: !1, access: { has: (e) => "stretch" in e, get: (e) => e.stretch, set: (e, s) => {
99
- e.stretch = s;
100
- } }, metadata: t }, $, k), m(n, null, E, { kind: "accessor", name: "rotation", static: !1, private: !1, access: { has: (e) => "rotation" in e, get: (e) => e.rotation, set: (e, s) => {
101
- e.rotation = s;
102
- } }, metadata: t }, D, C), m(n, null, L, { kind: "accessor", name: "inverseRotation", static: !1, private: !1, access: { has: (e) => "inverseRotation" in e, get: (e) => e.inverseRotation, set: (e, s) => {
103
- e.inverseRotation = s;
104
- } }, metadata: t }, T, A), m(n, null, M, { kind: "accessor", name: "width", static: !1, private: !1, access: { has: (e) => "width" in e, get: (e) => e.width, set: (e, s) => {
105
- e.width = s;
106
- } }, metadata: t }, P, U), m(n, null, B, { kind: "accessor", name: "height", static: !1, private: !1, access: { has: (e) => "height" in e, get: (e) => e.height, set: (e, s) => {
107
- e.height = s;
108
- } }, metadata: t }, F, G), m(null, r = { value: c }, i, { kind: "class", name: c.name, metadata: t }, null, a), c = r.value, t && Object.defineProperty(c, Symbol.metadata, { enumerable: !0, configurable: !0, writable: !0, value: t });
109
- })(), n.styles = Y, h(c, a), c;
95
+ x = [f(), w({ attribute: "name" })], N = [f(), w({ attribute: "stretch", type: Boolean })], k = [f(), w({ attribute: "rotation", type: Number })], O = [f(), w({ attribute: "inverse-roration", type: Number })], T = [f(), w({ attribute: "width", type: Number })], P = [f(), w({ attribute: "height", type: Number })], b(a, null, x, { kind: "accessor", name: "name", static: !1, private: !1, access: { has: (e) => "name" in e, get: (e) => e.name, set: (e, n) => {
96
+ e.name = n;
97
+ } }, metadata: t }, S, I), b(a, null, N, { kind: "accessor", name: "stretch", static: !1, private: !1, access: { has: (e) => "stretch" in e, get: (e) => e.stretch, set: (e, n) => {
98
+ e.stretch = n;
99
+ } }, metadata: t }, $, E), b(a, null, k, { kind: "accessor", name: "rotation", static: !1, private: !1, access: { has: (e) => "rotation" in e, get: (e) => e.rotation, set: (e, n) => {
100
+ e.rotation = n;
101
+ } }, metadata: t }, j, D), b(a, null, O, { kind: "accessor", name: "inverseRotation", static: !1, private: !1, access: { has: (e) => "inverseRotation" in e, get: (e) => e.inverseRotation, set: (e, n) => {
102
+ e.inverseRotation = n;
103
+ } }, metadata: t }, C, L), b(a, null, T, { kind: "accessor", name: "width", static: !1, private: !1, access: { has: (e) => "width" in e, get: (e) => e.width, set: (e, n) => {
104
+ e.width = n;
105
+ } }, metadata: t }, A, M), b(a, null, P, { kind: "accessor", name: "height", static: !1, private: !1, access: { has: (e) => "height" in e, get: (e) => e.height, set: (e, n) => {
106
+ e.height = n;
107
+ } }, metadata: t }, U, B), b(null, i = { value: c }, s, { kind: "class", name: c.name, metadata: t }, null, r), c = i.value, t && Object.defineProperty(c, Symbol.metadata, { enumerable: !0, configurable: !0, writable: !0, value: t });
108
+ })(), a.styles = X, h(c, r), c;
110
109
  })();
111
110
  export {
112
- ct as SbbSeatReservationGraphicElement
111
+ ht as SbbSeatReservationGraphicElement
113
112
  };
@@ -1,2 +1,5 @@
1
+ /**
2
+ * @entrypoint
3
+ */
1
4
  export * from './seat-reservation-graphic/seat-reservation-graphic.component.js';
2
5
  //# sourceMappingURL=seat-reservation-graphic.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"seat-reservation-graphic.d.ts","sourceRoot":"","sources":["../../../src/elements-experimental/seat-reservation/seat-reservation-graphic.ts"],"names":[],"mappings":"AAAA,cAAc,kEAAkE,CAAC"}
1
+ {"version":3,"file":"seat-reservation-graphic.d.ts","sourceRoot":"","sources":["../../../src/elements-experimental/seat-reservation/seat-reservation-graphic.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,cAAc,kEAAkE,CAAC"}
@@ -1,11 +1,12 @@
1
1
  import { EventEmitter } from '@sbb-esta/lyne-elements/core/eventing.js';
2
2
  import { CSSResultGroup, PropertyValues, TemplateResult, LitElement } from 'lit';
3
- import { PlaceTravelClass } from '../../seat-reservation.js';
3
+ import { PlaceTravelClass } from '../../common.js';
4
+ export type SelectCoachEventDetails = number;
4
5
  /**
5
6
  * This component will display the navigation coach item for Seat reservation.
6
7
  *
7
- * @event {CustomEvent<T>} selectCoach - Emits when a coach within the navigation was selected and returns the clicked coach nav index
8
- * @event {CustomEvent<T>} focusCoach - Emits when a nav coach has the focus
8
+ * @event {CustomEvent<SelectCoachEventDetails>} selectCoach - Emits when a coach within the navigation was selected and returns the clicked coach nav index
9
+ * @event {CustomEvent<void>} focusCoach - Emits when a nav coach has the focus
9
10
  */
10
11
  export declare class SbbSeatReservationNavigationCoachElement extends LitElement {
11
12
  static styles: CSSResultGroup;
@@ -34,8 +35,8 @@ export declare class SbbSeatReservationNavigationCoachElement extends LitElement
34
35
  accessor vertical: boolean;
35
36
  private _language;
36
37
  /** Emits when a coach within the navigation was selected */
37
- protected selectNavCoach: EventEmitter;
38
- protected focusNavCoach: EventEmitter;
38
+ protected selectNavCoach: EventEmitter<SelectCoachEventDetails>;
39
+ protected focusNavCoach: EventEmitter<void>;
39
40
  protected willUpdate(changedProperties: PropertyValues<this>): void;
40
41
  /**
41
42
  * Render a maximum of 3 of the service sign icons (slice(0,3)) regardless of the input from Backend,
@@ -1 +1 @@
1
- {"version":3,"file":"seat-reservation-navigation-coach.component.d.ts","sourceRoot":"","sources":["../../../../../src/elements-experimental/seat-reservation/seat-reservation-navigation/seat-reservation-navigation-coach/seat-reservation-navigation-coach.component.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,MAAM,0CAA0C,CAAC;AACxE,OAAO,EAAE,KAAK,cAAc,EAAW,KAAK,cAAc,EAAE,KAAK,cAAc,EAAE,MAAM,KAAK,CAAC;AAC7F,OAAO,EAAQ,UAAU,EAAE,MAAM,KAAK,CAAC;AAKvC,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAIlE,OAAO,+CAA+C,CAAC;AACvD,OAAO,4CAA4C,CAAC;AAIpD;;;;;GAKG;AACH,qBAEM,wCAAyC,SAAQ,UAAU;IAC/D,OAAuB,MAAM,EAAE,cAAc,CAAS;IACtD,gBAAuB,MAAM;;;MAGlB;IAEX,sEAAsE;IACtE,SAEgB,OAAO,EAAE,MAAM,CAAM;IAErC,2FAA2F;IAC3F,SACgB,WAAW,EAAE,MAAM,EAAE,CAAM;IAG3C,SAEgB,QAAQ,EAAE,OAAO,CAAS;IAG1C,SAEgB,OAAO,EAAE,OAAO,CAAS;IAEzC,SAEgB,KAAK,EAAE,MAAM,CAAK;IAElC,gCAAgC;IAChC,SACgB,WAAW,EAAE,gBAAgB,EAAE,CAAiB;IAEhE,+CAA+C;IAC/C,SAEgB,UAAU,EAAE,OAAO,CAAS;IAE5C,kDAAkD;IAClD,SAEgB,KAAK,EAAE,OAAO,CAAS;IAEvC,iDAAiD;IACjD,SAEgB,IAAI,EAAE,OAAO,CAAS;IAEtC,mCAAmC;IACnC,SAEgB,OAAO,EAAE,OAAO,CAAS;IAEzC,6DAA6D;IAC7D,SAEgB,QAAQ,EAAE,OAAO,CAAS;IAE1C,OAAO,CAAC,SAAS,CAAmC;IAEpD,4DAA4D;IAC5D,SAAS,CAAC,cAAc,EAAE,YAAY,CAGpC;IACF,SAAS,CAAC,aAAa,EAAE,YAAY,CAGnC;cAEiB,UAAU,CAAC,iBAAiB,EAAE,cAAc,CAAC,IAAI,CAAC,GAAG,IAAI;IAuB5E;;;;;;OAMG;cACgB,MAAM,IAAI,cAAc;IAyB3C,OAAO,CAAC,oBAAoB;IAwB5B,OAAO,CAAC,kBAAkB;IA4B1B,OAAO,CAAC,kCAAkC;IA4B1C,OAAO,CAAC,gCAAgC;IAYxC;;;;OAIG;IACH,OAAO,CAAC,eAAe;IAMvB,OAAO,CAAC,2BAA2B;CASpC;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAE7B,uCAAuC,EAAE,wCAAwC,CAAC;KACnF;CACF"}
1
+ {"version":3,"file":"seat-reservation-navigation-coach.component.d.ts","sourceRoot":"","sources":["../../../../../src/elements-experimental/seat-reservation/seat-reservation-navigation/seat-reservation-navigation-coach/seat-reservation-navigation-coach.component.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,MAAM,0CAA0C,CAAC;AACxE,OAAO,EAAE,KAAK,cAAc,EAAW,KAAK,cAAc,EAAE,KAAK,cAAc,EAAE,MAAM,KAAK,CAAC;AAC7F,OAAO,EAAQ,UAAU,EAAE,MAAM,KAAK,CAAC;AAKvC,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAIxD,OAAO,+CAA+C,CAAC;AACvD,OAAO,4CAA4C,CAAC;AAIpD,MAAM,MAAM,uBAAuB,GAAG,MAAM,CAAC;AAE7C;;;;;GAKG;AACH,qBAEM,wCAAyC,SAAQ,UAAU;IAC/D,OAAuB,MAAM,EAAE,cAAc,CAAS;IACtD,gBAAuB,MAAM;;;MAGlB;IAEX,sEAAsE;IACtE,SAEgB,OAAO,EAAE,MAAM,CAAM;IAErC,2FAA2F;IAC3F,SACgB,WAAW,EAAE,MAAM,EAAE,CAAM;IAG3C,SAEgB,QAAQ,EAAE,OAAO,CAAS;IAG1C,SAEgB,OAAO,EAAE,OAAO,CAAS;IAEzC,SAEgB,KAAK,EAAE,MAAM,CAAK;IAElC,gCAAgC;IAChC,SACgB,WAAW,EAAE,gBAAgB,EAAE,CAAiB;IAEhE,+CAA+C;IAC/C,SAEgB,UAAU,EAAE,OAAO,CAAS;IAE5C,kDAAkD;IAClD,SAEgB,KAAK,EAAE,OAAO,CAAS;IAEvC,iDAAiD;IACjD,SAEgB,IAAI,EAAE,OAAO,CAAS;IAEtC,mCAAmC;IACnC,SAEgB,OAAO,EAAE,OAAO,CAAS;IAEzC,6DAA6D;IAC7D,SAEgB,QAAQ,EAAE,OAAO,CAAS;IAE1C,OAAO,CAAC,SAAS,CAAmC;IAEpD,4DAA4D;IAC5D,SAAS,CAAC,cAAc,EAAE,YAAY,CAAC,uBAAuB,CAAC,CAG7D;IACF,SAAS,CAAC,aAAa,EAAE,YAAY,CAAC,IAAI,CAAC,CAGzC;cAEiB,UAAU,CAAC,iBAAiB,EAAE,cAAc,CAAC,IAAI,CAAC,GAAG,IAAI;IAuB5E;;;;;;OAMG;cACgB,MAAM,IAAI,cAAc;IAyB3C,OAAO,CAAC,oBAAoB;IAwB5B,OAAO,CAAC,kBAAkB;IA4B1B,OAAO,CAAC,kCAAkC;IA4B1C,OAAO,CAAC,gCAAgC;IAYxC;;;;OAIG;IACH,OAAO,CAAC,eAAe;IAMvB,OAAO,CAAC,2BAA2B;CASpC;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAE7B,uCAAuC,EAAE,wCAAwC,CAAC;KACnF;CACF"}
@@ -1,25 +1,26 @@
1
- var dt = (o) => {
1
+ var bt = (o) => {
2
2
  throw TypeError(o);
3
3
  };
4
- var vt = (o, n, c) => n.has(o) || dt("Cannot " + c);
5
- var l = (o, n, c) => (vt(o, n, "read from private field"), c ? c.call(o) : n.get(o)), b = (o, n, c) => n.has(o) ? dt("Cannot add the same private member more than once") : n instanceof WeakSet ? n.add(o) : n.set(o, c), s = (o, n, c, h) => (vt(o, n, "write to private field"), h ? h.call(o, c) : n.set(o, c), c);
4
+ var dt = (o, n, c) => n.has(o) || bt("Cannot " + c);
5
+ var l = (o, n, c) => (dt(o, n, "read from private field"), c ? c.call(o) : n.get(o)), b = (o, n, c) => n.has(o) ? bt("Cannot add the same private member more than once") : n instanceof WeakSet ? n.add(o) : n.set(o, c), s = (o, n, c, h) => (dt(o, n, "write to private field"), h ? h.call(o, c) : n.set(o, c), c);
6
6
  import { __runInitializers as i, __esDecorate as d } from "tslib";
7
7
  import { SbbLanguageController as ut } from "@sbb-esta/lyne-elements/core/controllers.js";
8
8
  import { forceType as _ } from "@sbb-esta/lyne-elements/core/decorators.js";
9
- import { EventEmitter as ht } from "@sbb-esta/lyne-elements/core/eventing.js";
10
- import { css as mt, LitElement as ft, nothing as z, html as u } from "lit";
9
+ import { EventEmitter as vt } from "@sbb-esta/lyne-elements/core/eventing.js";
10
+ import { css as mt, LitElement as ft, nothing as E, html as g } from "lit";
11
11
  import { customElement as pt, property as v } from "lit/decorators.js";
12
- import { classMap as _t } from "lit/directives/class-map.js";
13
- import { getI18nSeatReservation as E } from "../../common/translations.js";
12
+ import { classMap as ht } from "lit/directives/class-map.js";
13
+ import { getI18nSeatReservation as w } from "../../common/translations.js";
14
14
  import "@sbb-esta/lyne-elements/screen-reader-only.js";
15
15
  import "../seat-reservation-navigation-services.js";
16
16
  const xt = mt`*,:before,:after{box-sizing:border-box}:host{--sbb-seat-reservation-navigation-travelclass-spacing: .625rem;--sbb-seat-reservation-navigation-btn-outline-color: var(--sbb-color-granite);--sbb-seat-reservation-navigation-btn-outline-width: var(--sbb-border-width-1x);--sbb-seat-reservation-navigation-btn-background-color: var(--sbb-color-white);--sbb-seat-reservation-navigation-btn-outline-color-selected: var(--sbb-color-black);--sbb-seat-reservation-navigation-btn-outline-width-hover: var(--sbb-border-width-2x);--sbb-seat-reservation-navigation-btn-background-color-hover: var(--sbb-color-cloud)}.sbb-sr-navigation__item-coach{display:flex;flex-direction:column;gap:var(--sbb-spacing-fixed-2x);width:var(--sbb-train-formation-wagon-width);list-style-type:none}.sbb-sr-navigation__item-coach.first-coach .sbb-sr-navigation--first-class,.sbb-sr-navigation__item-coach.last-coach .sbb-sr-navigation--first-class{width:calc(100% - 1.125rem)}.sbb-sr-navigation__item-coach.first-coach .sbb-sr-navigation__ctrl-button:not(.sbb-seat-reservation-navigation-driver-area){border-start-start-radius:var(--sbb-border-radius-8x);border-end-start-radius:var(--sbb-border-radius-8x)}.sbb-sr-navigation__item-coach.first-coach .sbb-sr-navigation--first-class{margin-inline-start:var(--sbb-seat-reservation-navigation-travelclass-spacing)}.sbb-sr-navigation__item-coach.last-coach .sbb-sr-navigation__ctrl-button:not(.sbb-sr-navigation-driver-area){border-start-end-radius:var(--sbb-border-radius-8x);border-end-end-radius:var(--sbb-border-radius-8x)}.sbb-sr-navigation__item-coach.last-coach .sbb-sr-navigation__additional-information{padding-inline-end:var(--sbb-seat-reservation-navigation-travelclass-spacing)}.sbb-sr-navigation__item-coach.last-coach .sbb-sr-navigation--first-class{margin-inline-end:var(--sbb-seat-reservation-navigation-travelclass-spacing)}.sbb-sr-navigation__item-coach.vertical-coach{flex-direction:row}.sbb-sr-navigation__ctrl-button{-webkit-appearance:none;-moz-appearance:none;box-sizing:border-box;margin:0;outline:none;border:none;border-radius:0;padding:0;background:none;-webkit-tap-highlight-color:transparent;color:inherit;display:flex;flex-direction:column;justify-content:center;height:2.25rem;position:relative;outline:var(--sbb-seat-reservation-navigation-btn-outline-width) solid var(--sbb-seat-reservation-navigation-btn-outline-color);border-radius:var(--sbb-border-radius-2x);background-color:var(--sbb-seat-reservation-navigation-btn-background-color);cursor:pointer}.sbb-sr-navigation__ctrl-button.sbb-sr-navigation-driver-area{border-radius:var(--sbb-border-radius-8x);cursor:initial}.sbb-sr-navigation__item-coach--selected .sbb-sr-navigation__ctrl-button,.sbb-sr-navigation__ctrl-button:focus-visible:not([disabled],:disabled,.sbb-sr-navigation-driver-area),.sbb-sr-navigation__ctrl-button:hover:not([disabled],:disabled,.sbb-sr-navigation-driver-area){--sbb-seat-reservation-navigation-btn-outline-width: var( --sbb-seat-reservation-navigation-btn-outline-width-hover );--sbb-seat-reservation-navigation-btn-outline-color: var(--sbb-color-black)}.sbb-sr-navigation__ctrl-button:focus-visible:not([disabled],:disabled){--sbb-seat-reservation-navigation-btn-background-color: var(--sbb-color-silver)}.sbb-sr-navigation__ctrl-button:focus-visible:not([disabled],:disabled) .sbb-sr-navigation__item-coach-travelclass{background-color:var(--sbb-color-metal)}.sbb-sr-navigation__ctrl-button:focus-visible:not([disabled],:disabled) .sbb-sr-navigation__item-coach-number{color:var(--sbb-color-anthracite)}.sbb-sr-navigation__item-coach--selected .sbb-sr-navigation__ctrl-button{--sbb-seat-reservation-navigation-btn-background-color: var(--sbb-color-milk)}.sbb-sr-navigation__item-coach--selected .sbb-sr-navigation__ctrl-button .sbb-sr-navigation__item-coach-travelclass{background-color:var(--sbb-color-black)}.sbb-sr-navigation__item-coach--selected .sbb-sr-navigation__ctrl-button .sbb-sr-navigation__item-coach-number{color:var(--sbb-color-black)}.sbb-sr-navigation__ctrl-button:hover:not([disabled],:disabled,.sbb-sr-navigation-driver-area){--sbb-seat-reservation-navigation-btn-background-color: var(--sbb-color-cloud)}.sbb-sr-navigation__ctrl-button:hover:not([disabled],:disabled,.sbb-sr-navigation-driver-area) .sbb-sr-navigation__item-coach-travelclass{background-color:var(--sbb-color-smoke)}.sbb-sr-navigation__ctrl-button:hover:not([disabled],:disabled,.sbb-sr-navigation-driver-area) .sbb-sr-navigation__item-coach-number{color:var(--sbb-color-iron)}.sbb-sr-navigation__ctrl-button:is([disabled],:disabled){--sbb-seat-reservation-navigation-btn-background-color: var(--sbb-color-white);--sbb-seat-reservation-navigation-btn-outline-color: var(--sbb-color-platinum);cursor:unset;pointer-events:unset}.sbb-sr-navigation__ctrl-button:is([disabled],:disabled) .sbb-sr-navigation__item-coach-travelclass{background-color:var(--sbb-color-graphite)}.sbb-sr-navigation__ctrl-button:is([disabled],:disabled) .sbb-sr-navigation__item-coach-number{color:var(--sbb-color-graphite)}.sbb-sr-navigation__additional-information{display:flex;justify-content:space-between;align-items:center;flex:1;column-gap:var(--sbb-spacing-fixed-2x);padding-inline:1rem 1rem;font-family:var(--sbb-typo-font-family);font-weight:700;color:var(--sbb-color-granite)}@media (forced-colors: active){.sbb-sr-navigation__additional-information{color:var(--sbb-color-milk)}}.sbb-sr-navigation__item-coach-number{color:var(--sbb-color-granite)}@media (forced-colors: active){.sbb-sr-navigation__item-coach-number{color:var(--sbb-color-granite)}}@media (forced-colors: active) and (forced-colors: active){.sbb-sr-navigation__item-coach-number{color:inherit}}.sbb-sr-navigation__item-coach-number .sbb-sr-navigation__item-coach-travelclass{background-color:var(--sbb-color-charcoal)}.sbb-sr-navigation--first-class{width:calc(100% - .5rem);position:absolute;inset-block-start:.1875rem;inset-inline-start:.25rem;border:var(--sbb-border-width-1x) solid transparent;border-radius:var(--sbb-border-radius-1x);margin:auto;background-color:var(--sbb-color-lemon)}.sbb-sr-navigation__item-coach-travelclass{display:flex;align-items:center;justify-content:center;min-height:1.25rem;min-width:1.25rem;border-radius:var(--sbb-border-radius-1x);text-align:center;background-color:var(--sbb-color-granite);color:var(--sbb-color-white)}.sbb-sr-navigation__item-coach.vertical-coach .sbb-sr-navigation__ctrl-button{flex-direction:row-reverse;height:5rem;min-width:2.25rem}.sbb-sr-navigation__item-coach.vertical-coach .sbb-sr-navigation__additional-information{flex-direction:column-reverse;padding-block:1rem 1rem;padding-inline-start:unset;padding-inline-end:unset}.sbb-sr-navigation__item-coach.vertical-coach .sbb-sr-navigation--first-class{height:calc(100% - .5rem);width:initial;inset-inline-end:.1875rem;inset-block-start:.25rem;inset-inline-start:initial}.sbb-sr-navigation__item-coach.vertical-coach.first-coach .sbb-sr-navigation--first-class,.sbb-sr-navigation__item-coach.vertical-coach.last-coach .sbb-sr-navigation--first-class{height:calc(100% - 1.125rem)}.sbb-sr-navigation__item-coach.vertical-coach.first-coach:not(.last-coach) .sbb-sr-navigation__ctrl-button:not(.sbb-sr-navigation-driver-area){border-start-end-radius:var(--sbb-border-radius-8x);border-end-start-radius:var(--sbb-border-radius-2x)}.sbb-sr-navigation__item-coach.vertical-coach.first-coach:not(.last-coach) .sbb-sr-navigation--first-class{margin-block-start:var(--sbb-seat-reservation-navigation-travelclass-spacing);margin-inline-start:initial}.sbb-sr-navigation__item-coach.vertical-coach.last-coach:not(.first-coach) .sbb-sr-navigation__ctrl-button:not(.sbb-sr-navigation-driver-area){border-start-end-radius:var(--sbb-border-radius-2x);border-end-start-radius:var(--sbb-border-radius-8x)}.sbb-sr-navigation__item-coach.vertical-coach.last-coach:not(.first-coach) .sbb-sr-navigation--first-class{margin-block-end:var(--sbb-seat-reservation-navigation-travelclass-spacing);margin-inline-end:initial}.sbb-sr-navigation__item-coach.vertical-coach .sbb-sr-navigation-driver-area{height:5rem;min-width:2.25rem}`, yt = 3;
17
17
  let Rt = (() => {
18
- var m, f, p, x, y, C, I, k, S, A, w, r;
19
- let o = [pt("sbb-seat-reservation-navigation-coach")], n, c = [], h, B = ft, $, T = [], R = [], D, O = [], L = [], V, j = [], H = [], G, K = [], U = [], q, F = [], M = [], Y, P = [], X = [], J, Q = [], W = [], Z, tt = [], at = [], et, st = [], it = [], rt, ot = [], nt = [], ct, lt = [], bt = [];
20
- var N = (r = class extends B {
18
+ var u, m, f, p, x, y, C, I, k, S, A, r;
19
+ let o = [pt("sbb-seat-reservation-navigation-coach")], n, c = [], h, N = ft, B, $ = [], T = [], R, D = [], O = [], L, V = [], j = [], H, G = [], K = [], U, q = [], F = [], M, Y = [], P = [], X, J = [], Q = [], W, Z = [], tt = [], at, et = [], st = [], it, rt = [], ot = [], nt, ct = [], lt = [];
20
+ var z = (r = class extends N {
21
21
  constructor() {
22
22
  super(...arguments);
23
+ b(this, u);
23
24
  b(this, m);
24
25
  b(this, f);
25
26
  b(this, p);
@@ -30,94 +31,92 @@ let Rt = (() => {
30
31
  b(this, k);
31
32
  b(this, S);
32
33
  b(this, A);
33
- b(this, w);
34
- s(this, m, i(this, T, "")), s(this, f, (i(this, R), i(this, O, []))), s(this, p, (i(this, L), i(this, j, !1))), s(this, x, (i(this, H), i(this, K, !1))), s(this, y, (i(this, U), i(this, F, 0))), s(this, C, (i(this, M), i(this, P, ["ANY_CLASS"]))), s(this, I, (i(this, X), i(this, Q, !1))), s(this, k, (i(this, W), i(this, tt, !1))), s(this, S, (i(this, at), i(this, st, !1))), s(this, A, (i(this, it), i(this, ot, !1))), s(this, w, (i(this, nt), i(this, lt, !1))), this._language = (i(this, bt), new ut(this)), this.selectNavCoach = new ht(this, N.events.selectCoach), this.focusNavCoach = new ht(this, N.events.focusCoach);
34
+ s(this, u, i(this, $, "")), s(this, m, (i(this, T), i(this, D, []))), s(this, f, (i(this, O), i(this, V, !1))), s(this, p, (i(this, j), i(this, G, !1))), s(this, x, (i(this, K), i(this, q, 0))), s(this, y, (i(this, F), i(this, Y, ["ANY_CLASS"]))), s(this, C, (i(this, P), i(this, J, !1))), s(this, I, (i(this, Q), i(this, Z, !1))), s(this, k, (i(this, tt), i(this, et, !1))), s(this, S, (i(this, st), i(this, rt, !1))), s(this, A, (i(this, ot), i(this, ct, !1))), this._language = (i(this, lt), new ut(this)), this.selectNavCoach = new vt(this, z.events.selectCoach), this.focusNavCoach = new vt(this, z.events.focusCoach);
35
35
  }
36
36
  /** Coach ID, which is used to identify the coach in the navigation */
37
37
  get coachId() {
38
- return l(this, m);
38
+ return l(this, u);
39
39
  }
40
40
  set coachId(a) {
41
- s(this, m, a);
41
+ s(this, u, a);
42
42
  }
43
43
  /** Coach service property ids, which are used to display the services in the navigation */
44
44
  get propertyIds() {
45
- return l(this, f);
45
+ return l(this, m);
46
46
  }
47
47
  set propertyIds(a) {
48
- s(this, f, a);
48
+ s(this, m, a);
49
49
  }
50
50
  /* pre-selected Coach index property */
51
51
  get selected() {
52
- return l(this, p);
52
+ return l(this, f);
53
53
  }
54
54
  set selected(a) {
55
- s(this, p, a);
55
+ s(this, f, a);
56
56
  }
57
57
  /* focus Coach index property */
58
58
  get focused() {
59
- return l(this, x);
59
+ return l(this, p);
60
60
  }
61
61
  set focused(a) {
62
- s(this, x, a);
62
+ s(this, p, a);
63
63
  }
64
64
  get index() {
65
- return l(this, y);
65
+ return l(this, x);
66
66
  }
67
67
  set index(a) {
68
- s(this, y, a);
68
+ s(this, x, a);
69
69
  }
70
70
  /** Travel class of the coach */
71
71
  get travelClass() {
72
- return l(this, C);
72
+ return l(this, y);
73
73
  }
74
74
  set travelClass(a) {
75
- s(this, C, a);
75
+ s(this, y, a);
76
76
  }
77
77
  /** If the coach is a driver/restricted area */
78
78
  get driverArea() {
79
- return l(this, I);
79
+ return l(this, C);
80
80
  }
81
81
  set driverArea(a) {
82
- s(this, I, a);
82
+ s(this, C, a);
83
83
  }
84
84
  /** If the coach is the first in the navigation */
85
85
  get first() {
86
- return l(this, k);
86
+ return l(this, I);
87
87
  }
88
88
  set first(a) {
89
- s(this, k, a);
89
+ s(this, I, a);
90
90
  }
91
91
  /** If the coach is the last in the navigation */
92
92
  get last() {
93
- return l(this, S);
93
+ return l(this, k);
94
94
  }
95
95
  set last(a) {
96
- s(this, S, a);
96
+ s(this, k, a);
97
97
  }
98
98
  /** Disable the coach navigation */
99
99
  get disable() {
100
- return l(this, A);
100
+ return l(this, S);
101
101
  }
102
102
  set disable(a) {
103
- s(this, A, a);
103
+ s(this, S, a);
104
104
  }
105
105
  /** If the coach navigation should be displayed vertically */
106
106
  get vertical() {
107
- return l(this, w);
107
+ return l(this, A);
108
108
  }
109
109
  set vertical(a) {
110
- s(this, w, a);
110
+ s(this, A, a);
111
111
  }
112
112
  willUpdate(a) {
113
- var t, e;
114
113
  if (super.willUpdate(a), a.has("selected")) {
115
- const g = (t = this.shadowRoot) == null ? void 0 : t.querySelector(".sbb-sr-navigation__ctrl-button");
116
- this.selected && g && (g.focus(), this.focusNavCoach.emit());
114
+ const t = this.shadowRoot?.querySelector(".sbb-sr-navigation__ctrl-button");
115
+ this.selected && t && (t.focus(), this.focusNavCoach.emit());
117
116
  }
118
117
  if (a.has("focused") && this.focused) {
119
- const g = (e = this.shadowRoot) == null ? void 0 : e.querySelector(".sbb-sr-navigation__ctrl-button");
120
- g && g.focus();
118
+ const t = this.shadowRoot?.querySelector(".sbb-sr-navigation__ctrl-button");
119
+ t && t.focus();
121
120
  }
122
121
  }
123
122
  /**
@@ -128,10 +127,9 @@ let Rt = (() => {
128
127
  * @protected
129
128
  */
130
129
  render() {
131
- var a;
132
- return this.propertyIds = this.propertyIds.filter((t) => t !== "ANY_SEAT").slice(0, yt), u`
130
+ return this.propertyIds = this.propertyIds.filter((a) => a !== "ANY_SEAT").slice(0, yt), g`
133
131
  <div
134
- class="${_t({
132
+ class="${ht({
135
133
  "sbb-sr-navigation__item-coach": !0,
136
134
  "last-coach": this.last,
137
135
  "first-coach": this.first,
@@ -140,19 +138,19 @@ let Rt = (() => {
140
138
  })}"
141
139
  >
142
140
  ${this._getNavigationButton()}
143
- ${(a = this.propertyIds) != null && a.length ? u`<sbb-seat-reservation-navigation-services
141
+ ${this.propertyIds?.length ? g`<sbb-seat-reservation-navigation-services
144
142
  ?vertical="${this.vertical}"
145
143
  .propertyIds="${this.propertyIds}"
146
- ></sbb-seat-reservation-navigation-services>` : z}
144
+ ></sbb-seat-reservation-navigation-services>` : E}
147
145
  </div>
148
146
  `;
149
147
  }
150
148
  _getNavigationButton() {
151
149
  const a = this._getCoachServiceClassNumber(), t = this._getTitleDescriptionNavCoachButton(a), e = this._getAriaDescriptionCoachServices();
152
- return u` <button
150
+ return g` <button
153
151
  type="button"
154
152
  ?disabled="${this.disable}"
155
- class="${_t({
153
+ class="${ht({
156
154
  "sbb-sr-navigation__ctrl-button": !0,
157
155
  "sbb-sr-navigation-driver-area": this.driverArea
158
156
  })}"
@@ -167,38 +165,37 @@ let Rt = (() => {
167
165
  >`;
168
166
  }
169
167
  _getBtnInformation(a) {
170
- var t;
171
- return this.driverArea ? null : u`
172
- ${a === 1 ? u`<span class="sbb-sr-navigation--first-class"></span>` : z}
173
- ${((t = this.travelClass) == null ? void 0 : t.length) > 0 || this.coachId ? u`<div class="sbb-sr-navigation__additional-information">
174
- ${this.coachId ? u`<div class="sbb-sr-navigation__item-coach-number" aria-hidden="true">
168
+ return this.driverArea ? null : g`
169
+ ${a === 1 ? g`<span class="sbb-sr-navigation--first-class"></span>` : E}
170
+ ${this.travelClass?.length > 0 || this.coachId ? g`<div class="sbb-sr-navigation__additional-information">
171
+ ${this.coachId ? g`<div class="sbb-sr-navigation__item-coach-number" aria-hidden="true">
175
172
  ${this.coachId}
176
- </div>` : z}
173
+ </div>` : E}
177
174
  <div
178
- ${a ?? z}
175
+ ${a ?? E}
179
176
  class="sbb-sr-navigation__item-coach-travelclass"
180
177
  aria-hidden="true"
181
178
  >
182
179
  ${a}
183
180
  </div>
184
- </div>` : z}
181
+ </div>` : E}
185
182
  `;
186
183
  }
187
184
  _getTitleDescriptionNavCoachButton(a) {
188
185
  if (this.driverArea)
189
- return E("NAVIGATE_COACH_BLOCKED", this._language.current, [
186
+ return w("NAVIGATE_COACH_BLOCKED", this._language.current, [
190
187
  this.coachId
191
188
  ]);
192
- let t = E("NAVIGATE_TO_COACH", this._language.current, [this.coachId]);
189
+ let t = w("NAVIGATE_TO_COACH", this._language.current, [this.coachId]);
193
190
  if (a) {
194
- const g = E(a === 1 ? "SERVICE_CLASS_FIRST" : "SERVICE_CLASS_SECOND", this._language.current), gt = E("NAVIGATE_TO_COACH_SERVICE_CLASS_SUB", this._language.current, [g]);
191
+ const _t = w(a === 1 ? "SERVICE_CLASS_FIRST" : "SERVICE_CLASS_SECOND", this._language.current), gt = w("NAVIGATE_TO_COACH_SERVICE_CLASS_SUB", this._language.current, [_t]);
195
192
  t = t.concat(gt);
196
193
  }
197
194
  return t;
198
195
  }
199
196
  _getAriaDescriptionCoachServices() {
200
197
  let a = null;
201
- return this.propertyIds.length && (a = E("COACH_AVAILABLE_SERVICES", this._language.current) + ": ", a += this.propertyIds.map((t) => E(t, this._language.current)).join()), a;
198
+ return this.propertyIds.length && (a = w("COACH_AVAILABLE_SERVICES", this._language.current) + ": ", a += this.propertyIds.map((t) => w(t, this._language.current)).join()), a;
202
199
  }
203
200
  /**
204
201
  * emits the index of the coach array for the main navigation.
@@ -209,39 +206,38 @@ let Rt = (() => {
209
206
  this.driverArea || this.selectNavCoach.emit(a);
210
207
  }
211
208
  _getCoachServiceClassNumber() {
212
- var a, t;
213
- return (a = this.travelClass) != null && a.includes("FIRST") ? 1 : (t = this.travelClass) != null && t.includes("SECOND") ? 2 : null;
209
+ return this.travelClass?.includes("FIRST") ? 1 : this.travelClass?.includes("SECOND") ? 2 : null;
214
210
  }
215
- }, m = new WeakMap(), f = new WeakMap(), p = new WeakMap(), x = new WeakMap(), y = new WeakMap(), C = new WeakMap(), I = new WeakMap(), k = new WeakMap(), S = new WeakMap(), A = new WeakMap(), w = new WeakMap(), h = r, (() => {
216
- const a = typeof Symbol == "function" && Symbol.metadata ? Object.create(B[Symbol.metadata] ?? null) : void 0;
217
- $ = [_(), v({ attribute: "coach-id" })], D = [v({ attribute: "property-ids", type: Array })], V = [_(), v({ type: Boolean })], G = [_(), v({ type: Boolean })], q = [_(), v({ type: Number })], Y = [v({ attribute: "travel-class", type: Array })], J = [_(), v({ attribute: "driver-area", type: Boolean })], Z = [_(), v({ type: Boolean })], et = [_(), v({ type: Boolean })], rt = [_(), v({ attribute: "disable", type: Boolean })], ct = [_(), v({ type: Boolean })], d(r, null, $, { kind: "accessor", name: "coachId", static: !1, private: !1, access: { has: (t) => "coachId" in t, get: (t) => t.coachId, set: (t, e) => {
211
+ }, u = new WeakMap(), m = new WeakMap(), f = new WeakMap(), p = new WeakMap(), x = new WeakMap(), y = new WeakMap(), C = new WeakMap(), I = new WeakMap(), k = new WeakMap(), S = new WeakMap(), A = new WeakMap(), h = r, (() => {
212
+ const a = typeof Symbol == "function" && Symbol.metadata ? Object.create(N[Symbol.metadata] ?? null) : void 0;
213
+ B = [_(), v({ attribute: "coach-id" })], R = [v({ attribute: "property-ids", type: Array })], L = [_(), v({ type: Boolean })], H = [_(), v({ type: Boolean })], U = [_(), v({ type: Number })], M = [v({ attribute: "travel-class", type: Array })], X = [_(), v({ attribute: "driver-area", type: Boolean })], W = [_(), v({ type: Boolean })], at = [_(), v({ type: Boolean })], it = [_(), v({ attribute: "disable", type: Boolean })], nt = [_(), v({ type: Boolean })], d(r, null, B, { kind: "accessor", name: "coachId", static: !1, private: !1, access: { has: (t) => "coachId" in t, get: (t) => t.coachId, set: (t, e) => {
218
214
  t.coachId = e;
219
- } }, metadata: a }, T, R), d(r, null, D, { kind: "accessor", name: "propertyIds", static: !1, private: !1, access: { has: (t) => "propertyIds" in t, get: (t) => t.propertyIds, set: (t, e) => {
215
+ } }, metadata: a }, $, T), d(r, null, R, { kind: "accessor", name: "propertyIds", static: !1, private: !1, access: { has: (t) => "propertyIds" in t, get: (t) => t.propertyIds, set: (t, e) => {
220
216
  t.propertyIds = e;
221
- } }, metadata: a }, O, L), d(r, null, V, { kind: "accessor", name: "selected", static: !1, private: !1, access: { has: (t) => "selected" in t, get: (t) => t.selected, set: (t, e) => {
217
+ } }, metadata: a }, D, O), d(r, null, L, { kind: "accessor", name: "selected", static: !1, private: !1, access: { has: (t) => "selected" in t, get: (t) => t.selected, set: (t, e) => {
222
218
  t.selected = e;
223
- } }, metadata: a }, j, H), d(r, null, G, { kind: "accessor", name: "focused", static: !1, private: !1, access: { has: (t) => "focused" in t, get: (t) => t.focused, set: (t, e) => {
219
+ } }, metadata: a }, V, j), d(r, null, H, { kind: "accessor", name: "focused", static: !1, private: !1, access: { has: (t) => "focused" in t, get: (t) => t.focused, set: (t, e) => {
224
220
  t.focused = e;
225
- } }, metadata: a }, K, U), d(r, null, q, { kind: "accessor", name: "index", static: !1, private: !1, access: { has: (t) => "index" in t, get: (t) => t.index, set: (t, e) => {
221
+ } }, metadata: a }, G, K), d(r, null, U, { kind: "accessor", name: "index", static: !1, private: !1, access: { has: (t) => "index" in t, get: (t) => t.index, set: (t, e) => {
226
222
  t.index = e;
227
- } }, metadata: a }, F, M), d(r, null, Y, { kind: "accessor", name: "travelClass", static: !1, private: !1, access: { has: (t) => "travelClass" in t, get: (t) => t.travelClass, set: (t, e) => {
223
+ } }, metadata: a }, q, F), d(r, null, M, { kind: "accessor", name: "travelClass", static: !1, private: !1, access: { has: (t) => "travelClass" in t, get: (t) => t.travelClass, set: (t, e) => {
228
224
  t.travelClass = e;
229
- } }, metadata: a }, P, X), d(r, null, J, { kind: "accessor", name: "driverArea", static: !1, private: !1, access: { has: (t) => "driverArea" in t, get: (t) => t.driverArea, set: (t, e) => {
225
+ } }, metadata: a }, Y, P), d(r, null, X, { kind: "accessor", name: "driverArea", static: !1, private: !1, access: { has: (t) => "driverArea" in t, get: (t) => t.driverArea, set: (t, e) => {
230
226
  t.driverArea = e;
231
- } }, metadata: a }, Q, W), d(r, null, Z, { kind: "accessor", name: "first", static: !1, private: !1, access: { has: (t) => "first" in t, get: (t) => t.first, set: (t, e) => {
227
+ } }, metadata: a }, J, Q), d(r, null, W, { kind: "accessor", name: "first", static: !1, private: !1, access: { has: (t) => "first" in t, get: (t) => t.first, set: (t, e) => {
232
228
  t.first = e;
233
- } }, metadata: a }, tt, at), d(r, null, et, { kind: "accessor", name: "last", static: !1, private: !1, access: { has: (t) => "last" in t, get: (t) => t.last, set: (t, e) => {
229
+ } }, metadata: a }, Z, tt), d(r, null, at, { kind: "accessor", name: "last", static: !1, private: !1, access: { has: (t) => "last" in t, get: (t) => t.last, set: (t, e) => {
234
230
  t.last = e;
235
- } }, metadata: a }, st, it), d(r, null, rt, { kind: "accessor", name: "disable", static: !1, private: !1, access: { has: (t) => "disable" in t, get: (t) => t.disable, set: (t, e) => {
231
+ } }, metadata: a }, et, st), d(r, null, it, { kind: "accessor", name: "disable", static: !1, private: !1, access: { has: (t) => "disable" in t, get: (t) => t.disable, set: (t, e) => {
236
232
  t.disable = e;
237
- } }, metadata: a }, ot, nt), d(r, null, ct, { kind: "accessor", name: "vertical", static: !1, private: !1, access: { has: (t) => "vertical" in t, get: (t) => t.vertical, set: (t, e) => {
233
+ } }, metadata: a }, rt, ot), d(r, null, nt, { kind: "accessor", name: "vertical", static: !1, private: !1, access: { has: (t) => "vertical" in t, get: (t) => t.vertical, set: (t, e) => {
238
234
  t.vertical = e;
239
- } }, metadata: a }, lt, bt), d(null, n = { value: h }, o, { kind: "class", name: h.name, metadata: a }, null, c), N = h = n.value, a && Object.defineProperty(h, Symbol.metadata, { enumerable: !0, configurable: !0, writable: !0, value: a });
235
+ } }, metadata: a }, ct, lt), d(null, n = { value: h }, o, { kind: "class", name: h.name, metadata: a }, null, c), z = h = n.value, a && Object.defineProperty(h, Symbol.metadata, { enumerable: !0, configurable: !0, writable: !0, value: a });
240
236
  })(), r.styles = xt, r.events = {
241
237
  selectCoach: "selectCoach",
242
238
  focusCoach: "focusCoach"
243
239
  }, i(h, c), r);
244
- return N = h;
240
+ return z = h;
245
241
  })();
246
242
  export {
247
243
  Rt as SbbSeatReservationNavigationCoachElement
@@ -1,2 +1,5 @@
1
+ /**
2
+ * @entrypoint
3
+ */
1
4
  export * from './seat-reservation-navigation-coach/seat-reservation-navigation-coach.component.js';
2
5
  //# sourceMappingURL=seat-reservation-navigation-coach.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"seat-reservation-navigation-coach.d.ts","sourceRoot":"","sources":["../../../../src/elements-experimental/seat-reservation/seat-reservation-navigation/seat-reservation-navigation-coach.ts"],"names":[],"mappings":"AAAA,cAAc,oFAAoF,CAAC"}
1
+ {"version":3,"file":"seat-reservation-navigation-coach.d.ts","sourceRoot":"","sources":["../../../../src/elements-experimental/seat-reservation/seat-reservation-navigation/seat-reservation-navigation-coach.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,cAAc,oFAAoF,CAAC"}