@sbb-esta/lyne-elements-experimental 2.11.2 → 3.0.0-next.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (67) hide show
  1. package/core/datetime/date-helper.js +142 -142
  2. package/core/timetable/access-leg-helper.js +52 -49
  3. package/core/timetable/timetable-helper.js +8 -7
  4. package/custom-elements.json +8 -8
  5. package/development/core/datetime/date-helper.js +10 -10
  6. package/development/core/timetable/access-leg-helper.js +15 -12
  7. package/development/core/timetable/timetable-helper.js +7 -6
  8. package/development/{differenceInMinutes-D5Nj8Stc.js → differenceInMinutes-CHSyWiQs.js} +3 -3
  9. package/development/{format-BQfaa1ZT.js → format-D0-yhzi4.js} +26 -22
  10. package/development/{isValid-DvieCZVi.js → isValid-Bo4R7iA7.js} +3 -3
  11. package/development/journey-summary/journey-summary.component.d.ts +5 -3
  12. package/development/journey-summary/journey-summary.component.d.ts.map +1 -1
  13. package/development/journey-summary/journey-summary.component.js +9 -5
  14. package/development/pearl-chain/pearl-chain.component.d.ts +5 -3
  15. package/development/pearl-chain/pearl-chain.component.d.ts.map +1 -1
  16. package/development/pearl-chain/pearl-chain.component.js +43 -29
  17. package/development/pearl-chain-time/pearl-chain-time.component.d.ts +5 -3
  18. package/development/pearl-chain-time/pearl-chain-time.component.d.ts.map +1 -1
  19. package/development/pearl-chain-time/pearl-chain-time.component.js +10 -6
  20. package/development/pearl-chain-vertical/pearl-chain-vertical.component.js +1 -1
  21. package/development/pearl-chain-vertical-item/pearl-chain-vertical-item.component.js +1 -1
  22. package/development/seat-reservation/common/mapper/icon-mapper.js +1 -1
  23. package/development/seat-reservation/common/mapper/mapper.js +16 -14
  24. package/development/seat-reservation/common/mapper/seat-reservation-sample-data.js +1 -1
  25. package/development/seat-reservation/common/svgs.js +1 -1
  26. package/development/seat-reservation/common/translations/i18n.js +3 -2
  27. package/development/seat-reservation/seat-reservation/seat-reservation-base-element.js +33 -22
  28. package/development/seat-reservation/seat-reservation/seat-reservation-scoped/seat-reservation-scoped.component.js +7 -6
  29. package/development/seat-reservation/seat-reservation/seat-reservation.component.js +23 -16
  30. package/development/seat-reservation/seat-reservation-area/seat-reservation-area.component.js +1 -1
  31. package/development/seat-reservation/seat-reservation-graphic/seat-reservation-assets.js +3 -2
  32. package/development/seat-reservation/seat-reservation-graphic/seat-reservation-graphic.component.js +8 -7
  33. package/development/seat-reservation/seat-reservation-navigation/seat-reservation-navigation-coach/seat-reservation-navigation-coach.component.js +11 -7
  34. package/development/seat-reservation/seat-reservation-navigation/seat-reservation-navigation-services/seat-reservation-navigation-services.component.js +3 -2
  35. package/development/seat-reservation/seat-reservation-place-control/seat-reservation-place-control.component.js +5 -4
  36. package/development/timetable-duration/timetable-duration.component.js +1 -1
  37. package/development/timetable-row/timetable-row.component.d.ts +5 -3
  38. package/development/timetable-row/timetable-row.component.d.ts.map +1 -1
  39. package/development/timetable-row/timetable-row.component.js +93 -59
  40. package/differenceInMinutes-BMqUZdhj.js +23 -0
  41. package/{format-lqeCzmzS.js → format-Dg8rkk7h.js} +442 -438
  42. package/isValid-DJ69OMZJ.js +45 -0
  43. package/journey-summary/journey-summary.component.d.ts +5 -3
  44. package/journey-summary/journey-summary.component.d.ts.map +1 -1
  45. package/journey-summary/journey-summary.component.js +8 -4
  46. package/package.json +2 -2
  47. package/pearl-chain/pearl-chain.component.d.ts +5 -3
  48. package/pearl-chain/pearl-chain.component.d.ts.map +1 -1
  49. package/pearl-chain/pearl-chain.component.js +99 -79
  50. package/pearl-chain-time/pearl-chain-time.component.d.ts +5 -3
  51. package/pearl-chain-time/pearl-chain-time.component.d.ts.map +1 -1
  52. package/pearl-chain-time/pearl-chain-time.component.js +49 -45
  53. package/seat-reservation/common/mapper/mapper.js +54 -50
  54. package/seat-reservation/common/translations/i18n.js +6 -5
  55. package/seat-reservation/seat-reservation/seat-reservation-base-element.js +115 -104
  56. package/seat-reservation/seat-reservation/seat-reservation-scoped/seat-reservation-scoped.component.js +41 -40
  57. package/seat-reservation/seat-reservation/seat-reservation.component.js +87 -78
  58. package/seat-reservation/seat-reservation-graphic/seat-reservation-assets.js +18 -15
  59. package/seat-reservation/seat-reservation-graphic/seat-reservation-graphic.component.js +59 -58
  60. package/seat-reservation/seat-reservation-navigation/seat-reservation-navigation-coach/seat-reservation-navigation-coach.component.js +75 -71
  61. package/seat-reservation/seat-reservation-navigation/seat-reservation-navigation-services/seat-reservation-navigation-services.component.js +13 -12
  62. package/seat-reservation/seat-reservation-place-control/seat-reservation-place-control.component.js +24 -23
  63. package/timetable-row/timetable-row.component.d.ts +5 -3
  64. package/timetable-row/timetable-row.component.d.ts.map +1 -1
  65. package/timetable-row/timetable-row.component.js +251 -208
  66. package/differenceInMinutes-CP_C5onR.js +0 -23
  67. package/isValid-Ceq2O0NQ.js +0 -45
@@ -1,24 +1,24 @@
1
- var Q = (a) => {
1
+ var U = (a) => {
2
2
  throw TypeError(a);
3
3
  };
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);
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);
6
6
  import { __runInitializers as r, __esDecorate as c } from "tslib";
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";
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";
15
15
  import "../pearl-chain.js";
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 = (() => {
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 = (() => {
19
19
  var d, _, g, u, f, v, y, l;
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 {
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 {
22
22
  constructor() {
23
23
  super(...arguments);
24
24
  b(this, d);
@@ -28,7 +28,7 @@ let ze = (() => {
28
28
  b(this, f);
29
29
  b(this, v);
30
30
  b(this, y);
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);
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);
32
32
  }
33
33
  /**
34
34
  * define the legs of the pearl-chain.
@@ -89,64 +89,68 @@ let ze = (() => {
89
89
  set a11yFootpath(t) {
90
90
  n(this, y, t);
91
91
  }
92
- /** A configured date which acts as the current date instead of the real current date. Recommended for testing purposes. */
92
+ /**
93
+ * A configured date which acts as the current date instead of the real current date.
94
+ * Only recommended for testing purposes.
95
+ */
93
96
  set now(t) {
94
- this._now = X.getValidDateOrNull(X.deserialize(t));
97
+ this._now = Y.getValidDateOrNull(Y.deserialize(t));
95
98
  }
96
99
  get now() {
97
100
  return this._now ?? /* @__PURE__ */ new Date();
98
101
  }
99
102
  render() {
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
+ var Q;
104
+ 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));
105
+ return w`
102
106
  <div class="sbb-pearl-chain__time">
103
107
  ${i()}
104
- ${t ? k`<time class="sbb-pearl-chain__time-time" datetime=${this.departureTime}>
108
+ ${t ? w`<time class="sbb-pearl-chain__time-time" datetime=${this.departureTime}>
105
109
  <span class="sbb-screen-reader-only"
106
- >${ie[this._language.current]}:&nbsp;</span
110
+ >${re[this._language.current]}:&nbsp;</span
107
111
  >
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}
112
+ ${ee(t, "HH:mm")}
113
+ </time>` : T}
114
+ ${(x == null ? void 0 : x.length) > 1 ? w`<span class="sbb-screen-reader-only" role="paragraph">
115
+ ${(x == null ? void 0 : x.length) - 1} ${se[this._language.current]}
116
+ </span>` : T}
113
117
  <sbb-pearl-chain
114
118
  class="sbb-pearl-chain__time-chain"
115
119
  .legs=${this.legs}
116
120
  .disableAnimation=${this.disableAnimation}
117
121
  .now=${this.now}
118
122
  ></sbb-pearl-chain>
119
- ${e ? k`<time class="sbb-pearl-chain__time-time" datetime=${this.arrivalTime}>
123
+ ${e ? w`<time class="sbb-pearl-chain__time-time" datetime=${this.arrivalTime}>
120
124
  <span class="sbb-screen-reader-only"
121
- >${se[this._language.current]}:&nbsp;</span
125
+ >${le[this._language.current]}:&nbsp;</span
122
126
  >
123
- ${Z(e, "HH:mm")}
124
- </time>` : w}
125
- ${ee()}
127
+ ${ee(e, "HH:mm")}
128
+ </time>` : T}
129
+ ${te()}
126
130
  </div>
127
131
  `;
128
132
  }
129
133
  }, d = new WeakMap(), _ = new WeakMap(), g = new WeakMap(), u = new WeakMap(), f = new WeakMap(), v = new WeakMap(), y = new WeakMap(), m = l, (() => {
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) => {
134
+ const t = typeof Symbol == "function" && Symbol.metadata ? Object.create(z[Symbol.metadata] ?? null) : void 0;
135
+ 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) => {
132
136
  e.legs = 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) => {
137
+ } }, 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) => {
134
138
  e.departureTime = 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) => {
139
+ } }, 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) => {
136
140
  e.arrivalTime = 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) => {
141
+ } }, 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) => {
138
142
  e.departureWalk = 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) => {
143
+ } }, 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) => {
140
144
  e.arrivalWalk = 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) => {
145
+ } }, 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) => {
142
146
  e.disableAnimation = 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) => {
147
+ } }, 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) => {
144
148
  e.a11yFootpath = 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) => {
149
+ } }, 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) => {
146
150
  e.now = i;
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;
151
+ } }, 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 });
152
+ })(), l.styles = be, r(m, o), m;
149
153
  })();
150
154
  export {
151
- ze as SbbPearlChainTimeElement
155
+ We as SbbPearlChainTimeElement
152
156
  };
@@ -1,22 +1,26 @@
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) => ({
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) => ({
20
24
  icon: t.type,
21
25
  position: {
22
26
  x: t.rectangle.position.x,
@@ -27,8 +31,8 @@ const u = (e) => {
27
31
  w: t.rectangle.dimension.width,
28
32
  h: t.rectangle.dimension.height
29
33
  }
30
- })), p = s.graphicElements.map((t) => ({
31
- icon: t?.type,
34
+ })), l = e.graphicElements.map((t) => ({
35
+ icon: t == null ? void 0 : t.type,
32
36
  position: {
33
37
  x: t.rectangle.position.x,
34
38
  y: t.rectangle.position.y,
@@ -38,46 +42,46 @@ const u = (e) => {
38
42
  rotation: t.orientation
39
43
  }));
40
44
  return {
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
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
49
53
  };
50
54
  });
51
55
  return {
52
- vehicleType: e,
56
+ vehicleType: i,
53
57
  deckCoachIndex: 0,
54
- coachItems: i
58
+ coachItems: r
55
59
  };
56
- }, y = (e, n) => ({
57
- id: "seat-reservation__place-button-" + n + "-" + e.number,
58
- number: e.number,
60
+ }, A = (i, n) => ({
61
+ id: "seat-reservation__place-button-" + n + "-" + i.number,
62
+ number: i.number,
59
63
  coachIndex: n,
60
- state: e.state
61
- }), g = (e, n, i) => ({
62
- id: "seat-reservation__place-button-" + i + "-" + e.number,
64
+ state: i.state
65
+ }), S = (i, n, r) => ({
66
+ id: "seat-reservation__place-button-" + r + "-" + i.number,
63
67
  coachId: n.id,
64
68
  coachNumber: n.number,
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) => ({
69
+ coachIndex: r,
70
+ placeNumber: i.number,
71
+ placeType: i.type,
72
+ placeTravelClass: i.travelClass || "ANY_CLASS",
73
+ propertyIds: i.propertyIds || []
74
+ }), _ = (i, n) => ({
71
75
  coachId: n.id,
72
76
  coachNumber: n.number,
73
- coachIndex: e,
74
- coachType: n?.type,
75
- coachTravelClass: n?.travelClass,
76
- coachPropertyIds: n?.propertyIds
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
77
81
  });
78
82
  export {
79
- b as mapCoachInfosToCoachSelection,
80
- g as mapPlaceAndCoachToSeatReservationPlaceSelection,
81
- y as mapPlaceInfosToPlaceSelection,
83
+ _ as mapCoachInfosToCoachSelection,
84
+ S as mapPlaceAndCoachToSeatReservationPlaceSelection,
85
+ A as mapPlaceInfosToPlaceSelection,
82
86
  u as mapRawDataToSeatReservation
83
87
  };
@@ -1,4 +1,4 @@
1
- const o = {
1
+ const l = {
2
2
  // BASICS
3
3
  // CAPTION FOR SCREENREADER INSIDE WAGON
4
4
  COACH_TABLE_CAPTION: {
@@ -450,10 +450,11 @@ const o = {
450
450
  fr: "Test avec paramètres: _param0_ et _param1_",
451
451
  it: "Test con parametri: _param0_ e _param1_"
452
452
  }
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;
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;
456
457
  };
457
458
  export {
458
- l as getI18nSeatReservation
459
+ _ as getI18nSeatReservation
459
460
  };