@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,24 +1,24 @@
1
- var U = (a) => {
1
+ var Q = (a) => {
2
2
  throw TypeError(a);
3
3
  };
4
- var X = (a, s, o) => s.has(a) || U("Cannot " + o);
5
- var h = (a, s, o) => (X(a, s, "read from private field"), o ? o.call(a) : s.get(a)), b = (a, s, o) => s.has(a) ? U("Cannot add the same private member more than once") : s instanceof WeakSet ? s.add(a) : s.set(a, o), n = (a, s, o, m) => (X(a, s, "write to private field"), m ? m.call(a, o) : s.set(a, o), o);
4
+ var U = (a, s, o) => s.has(a) || Q("Cannot " + o);
5
+ var h = (a, s, o) => (U(a, s, "read from private field"), o ? o.call(a) : s.get(a)), b = (a, s, o) => s.has(a) ? Q("Cannot add the same private member more than once") : s instanceof WeakSet ? s.add(a) : s.set(a, o), n = (a, s, o, m) => (U(a, s, "write to private field"), m ? m.call(a, o) : s.set(a, o), o);
6
6
  import { __runInitializers as r, __esDecorate as c } from "tslib";
7
- import { SbbLanguageController as ie } from "@sbb-esta/lyne-elements/core/controllers.js";
8
- import { defaultDateAdapter as Y } from "@sbb-esta/lyne-elements/core/datetime.js";
9
- import { forceType as k } from "@sbb-esta/lyne-elements/core/decorators.js";
10
- import { i18nDeparture as re, i18nTransferProcedures as se, i18nArrival as le } from "@sbb-esta/lyne-elements/core/i18n.js";
11
- import { css as ne, LitElement as oe, nothing as T, html as w } from "lit";
12
- import { customElement as me, property as p } from "lit/decorators.js";
13
- import { removeTimezoneFromISOTimeString as Z } from "../core/datetime.js";
14
- import { getDepartureArrivalTimeAttribute as ce, isRideLeg as he } from "../core/timetable.js";
7
+ import { SbbLanguageController as ae } 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 x } from "@sbb-esta/lyne-elements/core/decorators.js";
10
+ import { i18nDeparture as ie, i18nTransferProcedures as re, i18nArrival as se } from "@sbb-esta/lyne-elements/core/i18n.js";
11
+ import { css as le, LitElement as ne, nothing as w, html as k } from "lit";
12
+ import { customElement as oe, property as p } from "lit/decorators.js";
13
+ import { removeTimezoneFromISOTimeString as Y } from "../core/datetime.js";
14
+ import { getDepartureArrivalTimeAttribute as me, isRideLeg as ce } from "../core/timetable.js";
15
15
  import "../pearl-chain.js";
16
- import { f as ee } from "../format-Dg8rkk7h.js";
17
- const be = ne`*,:before,:after{box-sizing:border-box}:host{display:block;--sbb-pearl-chain-time-height: auto}@media (min-width: 37.5rem){:host{--sbb-pearl-chain-time-height: 1.5625rem}}@media (min-width: 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--walk-small-left{transform:translate(-.4375rem);margin-inline-end:calc(var(--sbb-spacing-fixed-2x) - .4375rem)}.sbb-pearl-chain__time-walktime--walk-small-right{margin-inline-start:calc(var(--sbb-spacing-fixed-2x) - .25rem)}.sbb-pearl-chain__time-walktime--wheelchair-small-left{transform:translate(-.375rem);margin-inline-end:calc(var(--sbb-spacing-fixed-2x) - .4375rem)}.sbb-pearl-chain__time-walktime--wheelchair-small-right{margin-inline-start:calc(var(--sbb-spacing-fixed-2x) - .25rem)}.sbb-pearl-chain__time-walktime-prime-symbol{float:right}.sbb-pearl-chain__time-transfer{gap:var(--sbb-spacing-fixed-1x)}.sbb-pearl-chain__time-transfer--sa-ci-departure{margin-inline-end:var(--sbb-spacing-fixed-2x)}.sbb-pearl-chain__time-transfer--sa-ci-arrival{margin-inline-start:calc(var(--sbb-spacing-fixed-2x) - .25rem)}.sbb-pearl-chain__time-chain{flex:1 1 auto;align-self:center;margin-inline:var(--sbb-spacing-fixed-3x)}.sbb-pearl-chain__time-time{--sbb-text-font-size: var(--sbb-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}`;
18
- let We = (() => {
16
+ import { f as Z } from "../format-lqeCzmzS.js";
17
+ const he = le`*,:before,:after{box-sizing:border-box}:host{display:block;--sbb-pearl-chain-time-height: auto}@media (min-width: 37.5rem){:host{--sbb-pearl-chain-time-height: 1.5625rem}}@media (min-width: 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--walk-small-left{transform:translate(-.4375rem);margin-inline-end:calc(var(--sbb-spacing-fixed-2x) - .4375rem)}.sbb-pearl-chain__time-walktime--walk-small-right{margin-inline-start:calc(var(--sbb-spacing-fixed-2x) - .25rem)}.sbb-pearl-chain__time-walktime--wheelchair-small-left{transform:translate(-.375rem);margin-inline-end:calc(var(--sbb-spacing-fixed-2x) - .4375rem)}.sbb-pearl-chain__time-walktime--wheelchair-small-right{margin-inline-start:calc(var(--sbb-spacing-fixed-2x) - .25rem)}.sbb-pearl-chain__time-walktime-prime-symbol{float:right}.sbb-pearl-chain__time-transfer{gap:var(--sbb-spacing-fixed-1x)}.sbb-pearl-chain__time-transfer--sa-ci-departure{margin-inline-end:var(--sbb-spacing-fixed-2x)}.sbb-pearl-chain__time-transfer--sa-ci-arrival{margin-inline-start:calc(var(--sbb-spacing-fixed-2x) - .25rem)}.sbb-pearl-chain__time-chain{flex:1 1 auto;align-self:center;margin-inline:var(--sbb-spacing-fixed-3x)}.sbb-pearl-chain__time-time{--sbb-text-font-size: var(--sbb-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}`;
18
+ let ze = (() => {
19
19
  var d, _, g, u, f, v, y, l;
20
- let a = [me("sbb-pearl-chain-time")], s, o = [], m, z = oe, W = [], A, $ = [], F = [], I, D = [], S = [], N, E = [], H = [], O, j = [], P = [], B, C = [], R = [], V, q = [], G = [], J, K = [], L = [], M;
21
- return l = class extends z {
20
+ let a = [oe("sbb-pearl-chain-time")], s, o = [], m, T = ne, z = [], W, A = [], $ = [], F, I = [], D = [], S, N = [], E = [], H, L = [], O = [], j, P = [], B = [], C, R = [], V = [], q, G = [], J = [], K;
21
+ return l = class extends T {
22
22
  constructor() {
23
23
  super(...arguments);
24
24
  b(this, d);
@@ -28,7 +28,7 @@ let We = (() => {
28
28
  b(this, f);
29
29
  b(this, v);
30
30
  b(this, y);
31
- n(this, d, (r(this, W), r(this, $, []))), n(this, _, (r(this, F), r(this, D, ""))), n(this, g, (r(this, S), r(this, E, ""))), n(this, u, (r(this, H), r(this, j, NaN))), n(this, f, (r(this, P), r(this, C, NaN))), n(this, v, (r(this, R), r(this, q, !1))), n(this, y, (r(this, G), r(this, K, !1))), this._now = (r(this, L), null), this._language = new ie(this);
31
+ n(this, d, (r(this, z), r(this, A, []))), n(this, _, (r(this, $), r(this, I, ""))), n(this, g, (r(this, D), r(this, N, ""))), n(this, u, (r(this, E), r(this, L, NaN))), n(this, f, (r(this, O), r(this, P, NaN))), n(this, v, (r(this, B), r(this, R, !1))), n(this, y, (r(this, V), r(this, G, !1))), this._now = (r(this, J), null), this._language = new ae(this);
32
32
  }
33
33
  /**
34
34
  * define the legs of the pearl-chain.
@@ -91,63 +91,62 @@ let We = (() => {
91
91
  }
92
92
  /** A configured date which acts as the current date instead of the real current date. Recommended for testing purposes. */
93
93
  set now(t) {
94
- this._now = Y.getValidDateOrNull(Y.deserialize(t));
94
+ this._now = X.getValidDateOrNull(X.deserialize(t));
95
95
  }
96
96
  get now() {
97
97
  return this._now ?? /* @__PURE__ */ new Date();
98
98
  }
99
99
  render() {
100
- var Q;
101
- const t = this.departureTime ? Z(this.departureTime) : void 0, e = this.arrivalTime ? Z(this.arrivalTime) : void 0, { renderDepartureTimeAttribute: i, renderArrivalTimeAttribute: te } = ce(this.legs, this.departureWalk || 0, this.arrivalWalk || 0, this._language.current, this.a11yFootpath), x = (Q = this.legs) == null ? void 0 : Q.filter((ae) => he(ae));
102
- return w`
100
+ const t = this.departureTime ? Y(this.departureTime) : void 0, e = this.arrivalTime ? Y(this.arrivalTime) : void 0, { renderDepartureTimeAttribute: i, renderArrivalTimeAttribute: ee } = me(this.legs, this.departureWalk || 0, this.arrivalWalk || 0, this._language.current, this.a11yFootpath), M = this.legs?.filter((te) => ce(te));
101
+ return k`
103
102
  <div class="sbb-pearl-chain__time">
104
103
  ${i()}
105
- ${t ? w`<time class="sbb-pearl-chain__time-time" datetime=${this.departureTime}>
104
+ ${t ? k`<time class="sbb-pearl-chain__time-time" datetime=${this.departureTime}>
106
105
  <span class="sbb-screen-reader-only"
107
- >${re[this._language.current]}:&nbsp;</span
106
+ >${ie[this._language.current]}:&nbsp;</span
108
107
  >
109
- ${ee(t, "HH:mm")}
110
- </time>` : T}
111
- ${(x == null ? void 0 : x.length) > 1 ? w`<span class="sbb-screen-reader-only" role="paragraph">
112
- ${(x == null ? void 0 : x.length) - 1} ${se[this._language.current]}
113
- </span>` : T}
108
+ ${Z(t, "HH:mm")}
109
+ </time>` : w}
110
+ ${M?.length > 1 ? k`<span class="sbb-screen-reader-only" role="paragraph">
111
+ ${M?.length - 1} ${re[this._language.current]}
112
+ </span>` : w}
114
113
  <sbb-pearl-chain
115
114
  class="sbb-pearl-chain__time-chain"
116
115
  .legs=${this.legs}
117
116
  .disableAnimation=${this.disableAnimation}
118
117
  .now=${this.now}
119
118
  ></sbb-pearl-chain>
120
- ${e ? w`<time class="sbb-pearl-chain__time-time" datetime=${this.arrivalTime}>
119
+ ${e ? k`<time class="sbb-pearl-chain__time-time" datetime=${this.arrivalTime}>
121
120
  <span class="sbb-screen-reader-only"
122
- >${le[this._language.current]}:&nbsp;</span
121
+ >${se[this._language.current]}:&nbsp;</span
123
122
  >
124
- ${ee(e, "HH:mm")}
125
- </time>` : T}
126
- ${te()}
123
+ ${Z(e, "HH:mm")}
124
+ </time>` : w}
125
+ ${ee()}
127
126
  </div>
128
127
  `;
129
128
  }
130
129
  }, d = new WeakMap(), _ = new WeakMap(), g = new WeakMap(), u = new WeakMap(), f = new WeakMap(), v = new WeakMap(), y = new WeakMap(), m = l, (() => {
131
- const t = typeof Symbol == "function" && Symbol.metadata ? Object.create(z[Symbol.metadata] ?? null) : void 0;
132
- A = [p({ type: Array })], I = [k(), p({ attribute: "departure-time" })], N = [k(), p({ attribute: "arrival-time" })], O = [k(), p({ attribute: "departure-walk", type: Number })], B = [k(), p({ attribute: "arrival-walk", type: Number })], V = [k(), p({ attribute: "disable-animation", type: Boolean })], J = [k(), p({ attribute: "a11y-footpath", type: Boolean })], M = [p()], c(l, null, A, { kind: "accessor", name: "legs", static: !1, private: !1, access: { has: (e) => "legs" in e, get: (e) => e.legs, set: (e, i) => {
130
+ const t = typeof Symbol == "function" && Symbol.metadata ? Object.create(T[Symbol.metadata] ?? null) : void 0;
131
+ W = [p({ type: Array })], F = [x(), p({ attribute: "departure-time" })], S = [x(), p({ attribute: "arrival-time" })], H = [x(), p({ attribute: "departure-walk", type: Number })], j = [x(), p({ attribute: "arrival-walk", type: Number })], C = [x(), p({ attribute: "disable-animation", type: Boolean })], q = [x(), p({ attribute: "a11y-footpath", type: Boolean })], K = [p()], c(l, null, W, { kind: "accessor", name: "legs", static: !1, private: !1, access: { has: (e) => "legs" in e, get: (e) => e.legs, set: (e, i) => {
133
132
  e.legs = i;
134
- } }, metadata: t }, $, F), c(l, null, I, { kind: "accessor", name: "departureTime", static: !1, private: !1, access: { has: (e) => "departureTime" in e, get: (e) => e.departureTime, set: (e, i) => {
133
+ } }, metadata: t }, A, $), c(l, null, F, { kind: "accessor", name: "departureTime", static: !1, private: !1, access: { has: (e) => "departureTime" in e, get: (e) => e.departureTime, set: (e, i) => {
135
134
  e.departureTime = i;
136
- } }, metadata: t }, D, S), c(l, null, N, { kind: "accessor", name: "arrivalTime", static: !1, private: !1, access: { has: (e) => "arrivalTime" in e, get: (e) => e.arrivalTime, set: (e, i) => {
135
+ } }, metadata: t }, I, D), c(l, null, S, { kind: "accessor", name: "arrivalTime", static: !1, private: !1, access: { has: (e) => "arrivalTime" in e, get: (e) => e.arrivalTime, set: (e, i) => {
137
136
  e.arrivalTime = i;
138
- } }, metadata: t }, E, H), c(l, null, O, { kind: "accessor", name: "departureWalk", static: !1, private: !1, access: { has: (e) => "departureWalk" in e, get: (e) => e.departureWalk, set: (e, i) => {
137
+ } }, metadata: t }, N, E), c(l, null, H, { kind: "accessor", name: "departureWalk", static: !1, private: !1, access: { has: (e) => "departureWalk" in e, get: (e) => e.departureWalk, set: (e, i) => {
139
138
  e.departureWalk = i;
140
- } }, metadata: t }, j, P), c(l, null, B, { kind: "accessor", name: "arrivalWalk", static: !1, private: !1, access: { has: (e) => "arrivalWalk" in e, get: (e) => e.arrivalWalk, set: (e, i) => {
139
+ } }, metadata: t }, L, O), c(l, null, j, { kind: "accessor", name: "arrivalWalk", static: !1, private: !1, access: { has: (e) => "arrivalWalk" in e, get: (e) => e.arrivalWalk, set: (e, i) => {
141
140
  e.arrivalWalk = i;
142
- } }, metadata: t }, C, R), c(l, null, V, { kind: "accessor", name: "disableAnimation", static: !1, private: !1, access: { has: (e) => "disableAnimation" in e, get: (e) => e.disableAnimation, set: (e, i) => {
141
+ } }, metadata: t }, P, B), c(l, null, C, { kind: "accessor", name: "disableAnimation", static: !1, private: !1, access: { has: (e) => "disableAnimation" in e, get: (e) => e.disableAnimation, set: (e, i) => {
143
142
  e.disableAnimation = i;
144
- } }, metadata: t }, q, G), c(l, null, J, { kind: "accessor", name: "a11yFootpath", static: !1, private: !1, access: { has: (e) => "a11yFootpath" in e, get: (e) => e.a11yFootpath, set: (e, i) => {
143
+ } }, metadata: t }, R, V), c(l, null, q, { kind: "accessor", name: "a11yFootpath", static: !1, private: !1, access: { has: (e) => "a11yFootpath" in e, get: (e) => e.a11yFootpath, set: (e, i) => {
145
144
  e.a11yFootpath = i;
146
- } }, metadata: t }, K, L), c(l, null, M, { kind: "setter", name: "now", static: !1, private: !1, access: { has: (e) => "now" in e, set: (e, i) => {
145
+ } }, metadata: t }, G, J), c(l, null, K, { kind: "setter", name: "now", static: !1, private: !1, access: { has: (e) => "now" in e, set: (e, i) => {
147
146
  e.now = i;
148
- } }, metadata: t }, null, W), c(null, s = { value: m }, a, { kind: "class", name: m.name, metadata: t }, null, o), m = s.value, t && Object.defineProperty(m, Symbol.metadata, { enumerable: !0, configurable: !0, writable: !0, value: t });
149
- })(), l.styles = be, r(m, o), m;
147
+ } }, metadata: t }, null, z), c(null, s = { value: m }, a, { kind: "class", name: m.name, metadata: t }, null, o), m = s.value, t && Object.defineProperty(m, Symbol.metadata, { enumerable: !0, configurable: !0, writable: !0, value: t });
148
+ })(), l.styles = he, r(m, o), m;
150
149
  })();
151
150
  export {
152
- We as SbbPearlChainTimeElement
151
+ ze as SbbPearlChainTimeElement
153
152
  };
@@ -1,4 +1,4 @@
1
- import { CoachItem, Place, PlaceSelection, SeatReservation, SeatReservationCoachSelection, SeatReservationPlaceSelection, VehicleType } from '../../seat-reservation.js';
1
+ import { CoachItem, Place, PlaceSelection, SeatReservation, SeatReservationCoachSelection, SeatReservationPlaceSelection, VehicleType } from '../types.js';
2
2
  /**
3
3
  * Map function that converts the RAW OSDM mock data into SeatReservation
4
4
  */
@@ -11,18 +11,18 @@ export declare const mapRawDataToSeatReservation: (vehicleType: VehicleType) =>
11
11
  */
12
12
  export declare const mapPlaceInfosToPlaceSelection: (place: Place, coachIndex: number) => PlaceSelection;
13
13
  /**
14
- * Mapped informations from place, coach and the coachiondex to the seatReaservationPlaceSelection.
14
+ * Mapped information from place, coach and the coachindex to the seatReservationPlaceSelection.
15
15
  * This Object information is emitted outwards
16
16
  * @param place
17
- * @param CoachItem
17
+ * @param coach
18
18
  * @param coachIndex
19
19
  * @returns SeatReservationPlaceSelection
20
20
  */
21
21
  export declare const mapPlaceAndCoachToSeatReservationPlaceSelection: (place: Place, coach: CoachItem, coachIndex: number) => SeatReservationPlaceSelection;
22
22
  /**
23
- * Mapped coach informations to coach selection
24
- * @param place
23
+ * Mapped coach information to coach selection
25
24
  * @param coachIndex
25
+ * @param coach
26
26
  * @returns PlaceSelection
27
27
  */
28
28
  export declare const mapCoachInfosToCoachSelection: (coachIndex: number, coach: CoachItem) => SeatReservationCoachSelection;
@@ -1 +1 @@
1
- {"version":3,"file":"mapper.d.ts","sourceRoot":"","sources":["../../../../../src/elements-experimental/seat-reservation/common/mapper/mapper.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,SAAS,EACT,KAAK,EACL,cAAc,EAEd,eAAe,EACf,6BAA6B,EAC7B,6BAA6B,EAC7B,WAAW,EACZ,MAAM,2BAA2B,CAAC;AAInC;;GAEG;AACH,eAAO,MAAM,2BAA2B,GAAI,aAAa,WAAW,KAAG,eAoFtE,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,6BAA6B,GAAI,OAAO,KAAK,EAAE,YAAY,MAAM,KAAG,cAQhF,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,+CAA+C,GAC1D,OAAO,KAAK,EACZ,OAAO,SAAS,EAChB,YAAY,MAAM,KACjB,6BAYF,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,6BAA6B,GACxC,YAAY,MAAM,EAClB,OAAO,SAAS,KACf,6BASF,CAAC"}
1
+ {"version":3,"file":"mapper.d.ts","sourceRoot":"","sources":["../../../../../src/elements-experimental/seat-reservation/common/mapper/mapper.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,SAAS,EACT,KAAK,EACL,cAAc,EAEd,eAAe,EACf,6BAA6B,EAC7B,6BAA6B,EAC7B,WAAW,EACZ,MAAM,aAAa,CAAC;AAIrB;;GAEG;AACH,eAAO,MAAM,2BAA2B,GAAI,aAAa,WAAW,KAAG,eAoFtE,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,6BAA6B,GAAI,OAAO,KAAK,EAAE,YAAY,MAAM,KAAG,cAQhF,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,+CAA+C,GAC1D,OAAO,KAAK,EACZ,OAAO,SAAS,EAChB,YAAY,MAAM,KACjB,6BAYF,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,6BAA6B,GACxC,YAAY,MAAM,EAClB,OAAO,SAAS,KACf,6BASF,CAAC"}
@@ -1,26 +1,22 @@
1
- import { MOCK_COACHES_RAW_0 as y, MOCK_COACHES_RAW_1 as I } from "./seat-reservation-sample-data.js";
2
- const u = (i) => {
3
- const r = (i === "TRAIN" ? y : I).map((o) => {
4
- var m, C;
5
- const e = o == null ? void 0 : o.coachDeckLayout, d = [], a = [], b = e.placeGroups.map((t) => {
6
- var g;
7
- return d.indexOf(t.travelClass) === -1 && d.push(t.travelClass), a.indexOf(t.accommodationSubType) === -1 && a.push(t.accommodationSubType), (g = t.places) == null ? void 0 : g.map((s) => ({
8
- number: s == null ? void 0 : s.number,
9
- state: s == null ? void 0 : s.state,
10
- type: t.accommodationSubType.indexOf("BICYCLE") === -1 ? "SEAT" : "BICYCLE",
11
- dimension: { w: s.rectangle.dimension.width, h: s.rectangle.dimension.height },
12
- position: {
13
- x: s.rectangle.position.x,
14
- y: s.rectangle.position.y,
15
- z: s.rectangle.position.z
16
- },
17
- rotation: (s == null ? void 0 : s.orientation) || 0,
18
- travelClass: t == null ? void 0 : t.travelClass,
19
- remarkId: "",
20
- propertyIds: s.placeProperties || [],
21
- selected: !1
22
- }));
23
- }).flat(), p = e.serviceIcons.map((t) => ({
1
+ import { MOCK_COACHES_RAW_0 as l, MOCK_COACHES_RAW_1 as h } from "./seat-reservation-sample-data.js";
2
+ const u = (e) => {
3
+ const i = (e === "TRAIN" ? l : h).map((c) => {
4
+ const s = c?.coachDeckLayout, a = [], r = [], d = s.placeGroups.map((t) => (a.indexOf(t.travelClass) === -1 && a.push(t.travelClass), r.indexOf(t.accommodationSubType) === -1 && r.push(t.accommodationSubType), t.places?.map((o) => ({
5
+ number: o?.number,
6
+ state: o?.state,
7
+ type: t.accommodationSubType.indexOf("BICYCLE") === -1 ? "SEAT" : "BICYCLE",
8
+ dimension: { w: o.rectangle.dimension.width, h: o.rectangle.dimension.height },
9
+ position: {
10
+ x: o.rectangle.position.x,
11
+ y: o.rectangle.position.y,
12
+ z: o.rectangle.position.z
13
+ },
14
+ rotation: o?.orientation || 0,
15
+ travelClass: t?.travelClass,
16
+ remarkId: "",
17
+ propertyIds: o.placeProperties || [],
18
+ selected: !1
19
+ })))).flat(), m = s.serviceIcons.map((t) => ({
24
20
  icon: t.type,
25
21
  position: {
26
22
  x: t.rectangle.position.x,
@@ -31,8 +27,8 @@ const u = (i) => {
31
27
  w: t.rectangle.dimension.width,
32
28
  h: t.rectangle.dimension.height
33
29
  }
34
- })), l = e.graphicElements.map((t) => ({
35
- icon: t == null ? void 0 : t.type,
30
+ })), p = s.graphicElements.map((t) => ({
31
+ icon: t?.type,
36
32
  position: {
37
33
  x: t.rectangle.position.x,
38
34
  y: t.rectangle.position.y,
@@ -42,46 +38,46 @@ const u = (i) => {
42
38
  rotation: t.orientation
43
39
  }));
44
40
  return {
45
- id: e == null ? void 0 : e.id,
46
- number: e == null ? void 0 : e.name,
47
- dimension: { w: (m = e.dimension) == null ? void 0 : m.width, h: (C = e.dimension) == null ? void 0 : C.height },
48
- places: b,
49
- serviceElements: p,
50
- graphicElements: l,
51
- travelClass: d,
52
- propertyIds: a
41
+ id: s?.id,
42
+ number: s?.name,
43
+ dimension: { w: s.dimension?.width, h: s.dimension?.height },
44
+ places: d,
45
+ serviceElements: m,
46
+ graphicElements: p,
47
+ travelClass: a,
48
+ propertyIds: r
53
49
  };
54
50
  });
55
51
  return {
56
- vehicleType: i,
52
+ vehicleType: e,
57
53
  deckCoachIndex: 0,
58
- coachItems: r
54
+ coachItems: i
59
55
  };
60
- }, A = (i, n) => ({
61
- id: "seat-reservation__place-button-" + n + "-" + i.number,
62
- number: i.number,
56
+ }, y = (e, n) => ({
57
+ id: "seat-reservation__place-button-" + n + "-" + e.number,
58
+ number: e.number,
63
59
  coachIndex: n,
64
- state: i.state
65
- }), S = (i, n, r) => ({
66
- id: "seat-reservation__place-button-" + r + "-" + i.number,
60
+ state: e.state
61
+ }), g = (e, n, i) => ({
62
+ id: "seat-reservation__place-button-" + i + "-" + e.number,
67
63
  coachId: n.id,
68
64
  coachNumber: n.number,
69
- coachIndex: r,
70
- placeNumber: i.number,
71
- placeType: i.type,
72
- placeTravelClass: i.travelClass || "ANY_CLASS",
73
- propertyIds: i.propertyIds || []
74
- }), _ = (i, n) => ({
65
+ coachIndex: i,
66
+ placeNumber: e.number,
67
+ placeType: e.type,
68
+ placeTravelClass: e.travelClass || "ANY_CLASS",
69
+ propertyIds: e.propertyIds || []
70
+ }), b = (e, n) => ({
75
71
  coachId: n.id,
76
72
  coachNumber: n.number,
77
- coachIndex: i,
78
- coachType: n == null ? void 0 : n.type,
79
- coachTravelClass: n == null ? void 0 : n.travelClass,
80
- coachPropertyIds: n == null ? void 0 : n.propertyIds
73
+ coachIndex: e,
74
+ coachType: n?.type,
75
+ coachTravelClass: n?.travelClass,
76
+ coachPropertyIds: n?.propertyIds
81
77
  });
82
78
  export {
83
- _ as mapCoachInfosToCoachSelection,
84
- S as mapPlaceAndCoachToSeatReservationPlaceSelection,
85
- A as mapPlaceInfosToPlaceSelection,
79
+ b as mapCoachInfosToCoachSelection,
80
+ g as mapPlaceAndCoachToSeatReservationPlaceSelection,
81
+ y as mapPlaceInfosToPlaceSelection,
86
82
  u as mapRawDataToSeatReservation
87
83
  };
@@ -1,4 +1,4 @@
1
- const l = {
1
+ const o = {
2
2
  // BASICS
3
3
  // CAPTION FOR SCREENREADER INSIDE WAGON
4
4
  COACH_TABLE_CAPTION: {
@@ -450,11 +450,10 @@ const l = {
450
450
  fr: "Test avec paramètres: _param0_ et _param1_",
451
451
  it: "Test con parametri: _param0_ e _param1_"
452
452
  }
453
- }, _ = (i, t, e) => {
454
- var r;
455
- const a = ((r = l[i]) == null ? void 0 : r[t]) || "";
456
- return e ? e.reduce((n, s, o) => n.replace(`_param${o}_`, s), a) : a;
453
+ }, l = (r, i, e) => {
454
+ const a = o[r]?.[i] || "";
455
+ return e ? e.reduce((t, n, s) => t.replace(`_param${s}_`, n), a) : a;
457
456
  };
458
457
  export {
459
- _ as getI18nSeatReservation
458
+ l as getI18nSeatReservation
460
459
  };
@@ -0,0 +1,71 @@
1
+ /** SeatReservation defines all information about a vehicle and the wagons it contains */
2
+ export type SeatReservation = {
3
+ vehicleType: VehicleType;
4
+ deckCoachIndex: number;
5
+ coachItems: CoachItem[];
6
+ };
7
+ export type CoachItem = {
8
+ id: string;
9
+ number: string;
10
+ dimension: ElementDimension;
11
+ type?: CoachType;
12
+ places?: Place[];
13
+ graphicElements?: BaseElement[];
14
+ serviceElements?: BaseElement[];
15
+ travelClass: PlaceTravelClass[];
16
+ propertyIds?: string[];
17
+ };
18
+ export interface Place extends BaseElement {
19
+ number: string;
20
+ state: PlaceState;
21
+ type: PlaceType;
22
+ travelClass?: PlaceTravelClass;
23
+ remarkId?: string;
24
+ propertyIds?: string[];
25
+ selected?: boolean;
26
+ }
27
+ export type BaseElement = {
28
+ icon?: string | null;
29
+ rotation?: number;
30
+ position: ElementPosition;
31
+ dimension: ElementDimension;
32
+ };
33
+ export type ElementDimension = {
34
+ w: number;
35
+ h: number;
36
+ };
37
+ export type ElementPosition = {
38
+ x: number;
39
+ y: number;
40
+ z: number;
41
+ };
42
+ export type PlaceSelection = {
43
+ id: string;
44
+ number: string;
45
+ coachIndex: number;
46
+ state: PlaceState;
47
+ };
48
+ export type SeatReservationPlaceSelection = {
49
+ id: string;
50
+ coachId: string;
51
+ coachNumber: string;
52
+ coachIndex: number;
53
+ placeNumber: string;
54
+ placeType: PlaceType;
55
+ placeTravelClass: PlaceTravelClass;
56
+ propertyIds: string[];
57
+ };
58
+ export type SeatReservationCoachSelection = {
59
+ coachId: string;
60
+ coachNumber: string;
61
+ coachIndex: number;
62
+ coachType?: CoachType;
63
+ coachTravelClass: PlaceTravelClass[];
64
+ coachPropertyIds?: string[];
65
+ };
66
+ export type PlaceType = 'SEAT' | 'BICYCLE';
67
+ export type CoachType = 'RESTAURANT_COACH' | 'BICYCLE_COACH' | 'LUGGAGE_COACH' | 'TRAIN_HEAD';
68
+ export type PlaceState = 'FREE' | 'ALLOCATED' | 'RESTRICTED' | 'SELECTED';
69
+ export type PlaceTravelClass = 'FIRST' | 'SECOND' | 'ANY_CLASS';
70
+ export type VehicleType = 'TRAIN' | 'BUS';
71
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/elements-experimental/seat-reservation/common/types.ts"],"names":[],"mappings":"AAAA,yFAAyF;AACzF,MAAM,MAAM,eAAe,GAAG;IAC5B,WAAW,EAAE,WAAW,CAAC;IACzB,cAAc,EAAE,MAAM,CAAC;IACvB,UAAU,EAAE,SAAS,EAAE,CAAC;CACzB,CAAC;AAEF,MAAM,MAAM,SAAS,GAAG;IAGtB,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,gBAAgB,CAAC;IAC5B,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,MAAM,CAAC,EAAE,KAAK,EAAE,CAAC;IACjB,eAAe,CAAC,EAAE,WAAW,EAAE,CAAC;IAChC,eAAe,CAAC,EAAE,WAAW,EAAE,CAAC;IAChC,WAAW,EAAE,gBAAgB,EAAE,CAAC;IAChC,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;CACxB,CAAC;AAEF,MAAM,WAAW,KAAM,SAAQ,WAAW;IACxC,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,UAAU,CAAC;IAClB,IAAI,EAAE,SAAS,CAAC;IAChB,WAAW,CAAC,EAAE,gBAAgB,CAAC;IAC/B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;IACvB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,MAAM,MAAM,WAAW,GAAG;IACxB,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,eAAe,CAAC;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BAAgB,GAAG,OAAO,GAAG,QAAQ,GAAG,WAAW,CAAC;AAChE,MAAM,MAAM,WAAW,GAAG,OAAO,GAAG,KAAK,CAAC"}
@@ -0,0 +1 @@
1
+
@@ -1,5 +1,8 @@
1
- export * from './common/translations.js';
2
- export * from './common/svgs.js';
1
+ /**
2
+ * @entrypoint
3
+ */
3
4
  export * from './common/mapper.js';
4
- export * from './common/mapper/seat-reservation-sample-data.js';
5
+ export * from './common/svgs.js';
6
+ export * from './common/translations.js';
7
+ export * from './common/types.js';
5
8
  //# sourceMappingURL=common.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../../src/elements-experimental/seat-reservation/common.ts"],"names":[],"mappings":"AAAA,cAAc,0BAA0B,CAAC;AACzC,cAAc,kBAAkB,CAAC;AACjC,cAAc,oBAAoB,CAAC;AACnC,cAAc,iDAAiD,CAAC"}
1
+ {"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../../src/elements-experimental/seat-reservation/common.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC;AACjC,cAAc,0BAA0B,CAAC;AACzC,cAAc,mBAAmB,CAAC"}
@@ -1,17 +1,13 @@
1
- import { getI18nSeatReservation as a } from "./common/translations/i18n.js";
2
- import { svgs as r } from "./common/svgs.js";
3
- import { mapCoachInfosToCoachSelection as c, mapPlaceAndCoachToSeatReservationPlaceSelection as n, mapPlaceInfosToPlaceSelection as m, mapRawDataToSeatReservation as p } from "./common/mapper/mapper.js";
4
- import { mapIconToSvg as S } from "./common/mapper/icon-mapper.js";
5
- import { MOCK_COACHES_RAW_0 as R, MOCK_COACHES_RAW_1 as f, MOCK_COACHES_RAW_REAL_DATA as l } from "./common/mapper/seat-reservation-sample-data.js";
1
+ import { mapCoachInfosToCoachSelection as a, mapPlaceAndCoachToSeatReservationPlaceSelection as t, mapPlaceInfosToPlaceSelection as c, mapRawDataToSeatReservation as n } from "./common/mapper/mapper.js";
2
+ import { mapIconToSvg as m } from "./common/mapper/icon-mapper.js";
3
+ import { svgs as l } from "./common/svgs.js";
4
+ import { getI18nSeatReservation as S } from "./common/translations/i18n.js";
6
5
  export {
7
- R as MOCK_COACHES_RAW_0,
8
- f as MOCK_COACHES_RAW_1,
9
- l as MOCK_COACHES_RAW_REAL_DATA,
10
- a as getI18nSeatReservation,
11
- c as mapCoachInfosToCoachSelection,
12
- S as mapIconToSvg,
13
- n as mapPlaceAndCoachToSeatReservationPlaceSelection,
14
- m as mapPlaceInfosToPlaceSelection,
15
- p as mapRawDataToSeatReservation,
16
- r as svgs
6
+ S as getI18nSeatReservation,
7
+ a as mapCoachInfosToCoachSelection,
8
+ m as mapIconToSvg,
9
+ t as mapPlaceAndCoachToSeatReservationPlaceSelection,
10
+ c as mapPlaceInfosToPlaceSelection,
11
+ n as mapRawDataToSeatReservation,
12
+ l as svgs
17
13
  };
@@ -1,6 +1,6 @@
1
1
  import { EventEmitter } from '@sbb-esta/lyne-elements/core/eventing.js';
2
2
  import { LitElement, PropertyValues } from 'lit';
3
- import { ElementDimension, ElementPosition, Place, PlaceSelection, SeatReservation, SeatReservationCoachSelection, SeatReservationPlaceSelection } from '../seat-reservation.js';
3
+ import { ElementDimension, ElementPosition, Place, PlaceSelection, SeatReservation, SeatReservationCoachSelection, SeatReservationPlaceSelection } from '../common.js';
4
4
  declare enum ScrollDirection {
5
5
  right = "right",
6
6
  left = "left"
@@ -10,6 +10,7 @@ interface CoachScrollTriggerPoint {
10
10
  end: number;
11
11
  width: number;
12
12
  }
13
+ export type SeatReservationSelectedPlacesEventDetails = SeatReservationPlaceSelection[];
13
14
  export declare class SeatReservationBaseElement extends LitElement {
14
15
  static readonly events: {
15
16
  readonly selectedPlaces: "selectedPlaces";
@@ -32,7 +33,7 @@ export declare class SeatReservationBaseElement extends LitElement {
32
33
  protected accessor selectedCoachIndex: number;
33
34
  protected accessor focusedCoachIndex: number;
34
35
  /** Emits when a place was selected by user. */
35
- protected selectedPlaces: EventEmitter<SeatReservationPlaceSelection[]>;
36
+ protected selectedPlaces: EventEmitter<SeatReservationSelectedPlacesEventDetails>;
36
37
  /** Emits when a coach was selected by user. */
37
38
  protected selectedCoach: EventEmitter<SeatReservationCoachSelection>;
38
39
  protected coachBorderPadding: number;
@@ -50,7 +51,7 @@ export declare class SeatReservationBaseElement extends LitElement {
50
51
  protected preventCoachScrollByPlaceClick: boolean;
51
52
  protected selectedSeatReservationPlaces: SeatReservationPlaceSelection[];
52
53
  protected seatReservationWithoutNavigationHasFocus: boolean;
53
- protected isCochGridFocusable: boolean;
54
+ protected isCoachGridFocusable: boolean;
54
55
  protected isAutoScrolling: boolean;
55
56
  protected isKeyboardNavigation: boolean;
56
57
  protected keyboardNavigationEvents: {
@@ -1 +1 @@
1
- {"version":3,"file":"seat-reservation-base-element.d.ts","sourceRoot":"","sources":["../../../../src/elements-experimental/seat-reservation/seat-reservation/seat-reservation-base-element.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,MAAM,0CAA0C,CAAC;AACxE,OAAO,EAAE,UAAU,EAAE,KAAK,cAAc,EAAE,MAAM,KAAK,CAAC;AAStD,OAAO,KAAK,EAEV,gBAAgB,EAChB,eAAe,EACf,KAAK,EACL,cAAc,EACd,eAAe,EACf,6BAA6B,EAC7B,6BAA6B,EAC9B,MAAM,wBAAwB,CAAC;AAIhC,aAAK,eAAe;IAClB,KAAK,UAAU;IACf,IAAI,SAAS;CACd;AAED,UAAU,uBAAuB;IAC/B,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;CACf;AAED,qBAAa,0BAA2B,SAAQ,UAAU;IACxD,gBAAuB,MAAM;;;MAGlB;IAEX,wEAAwE;IACxE,SACgB,eAAe,EAAE,eAAe,CAAS;IAEzD,uEAAuE;IACvE,SAEgB,aAAa,EAAE,OAAO,CAAQ;IAE9C,sDAAsD;IACt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jC,cAAc,CAAC,EAAE,OAAO,GACvB,eAAe;IAsBlB,OAAO,CAAC,kCAAkC;IAiE1C,OAAO,CAAC,0BAA0B;IAkClC,SAAS,CAAC,0BAA0B,CAAC,YAAY,CAAC,EAAE,MAAM,GAAG,MAAM;IAKnE,SAAS,CAAC,0BAA0B,CAAC,YAAY,CAAC,EAAE,MAAM,GAAG,MAAM;IAKnE,SAAS,CAAC,mCAAmC,CAAC,cAAc,EAAE,cAAc,GAAG,IAAI;IAwBnF,SAAS,CAAC,iCAAiC,CAAC,cAAc,EAAE,cAAc,GAAG,IAAI;IAgBjF,SAAS,CAAC,0BAA0B,IAAI,IAAI;IAS5C;;;OAGG;IACH,OAAO,CAAC,kCAAkC;IAiB1C;;;OAGG;IACH,OAAO,CAAC,wBAAwB;IAkBhC,OAAO,CAAC,iCAAiC;IAWzC,OAAO,CAAC,iCAAiC;IASzC,OAAO,CAAC,8BAA8B;IAStC;;;;;;OAMG;IACH,OAAO,CAAC,oBAAoB;IAS5B,OAAO,CAAC,2BAA2B;CAepC"}
1
+ {"version":3,"file":"seat-reservation-base-element.d.ts","sourceRoot":"","sources":["../../../../src/elements-experimental/seat-reservation/seat-reservation/seat-reservation-base-element.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,MAAM,0CAA0C,CAAC;AACxE,OAAO,EAAE,UAAU,EAAE,KAAK,cAAc,EAAE,MAAM,KAAK,CAAC;AAQtD,OAAO,KAAK,EAEV,gBAAgB,EAChB,eAAe,EACf,KAAK,EACL,cAAc,EACd,eAAe,EACf,6BAA6B,EAC7B,6BAA6B,EAC9B,MAAM,cAAc,CAAC;AAKtB,aAAK,eAAe;IAClB,KAAK,UAAU;IACf,IAAI,SAAS;CACd;AAED,UAAU,uBAAuB;IAC/B,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,MAAM,yCAAyC,GAAG,6BAA6B,EA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