@sbb-esta/lyne-elements-experimental 3.1.0 → 3.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (70) hide show
  1. package/custom-elements.json +1147 -590
  2. package/development/seat-reservation/common/mapper/icon-mapper.d.ts.map +1 -1
  3. package/development/seat-reservation/common/mapper/icon-mapper.js +4 -5
  4. package/development/seat-reservation/common/mapper/mapper.d.ts +6 -5
  5. package/development/seat-reservation/common/mapper/mapper.d.ts.map +1 -1
  6. package/development/seat-reservation/common/mapper/mapper.js +14 -11
  7. package/development/seat-reservation/common/mapper/seat-reservation-sample-data.d.ts +113 -0
  8. package/development/seat-reservation/common/mapper/seat-reservation-sample-data.d.ts.map +1 -1
  9. package/development/seat-reservation/common/mapper/seat-reservation-sample-data.js +25999 -649
  10. package/development/seat-reservation/common/svgs.d.ts +0 -1
  11. package/development/seat-reservation/common/svgs.d.ts.map +1 -1
  12. package/development/seat-reservation/common/svgs.js +1 -3
  13. package/development/seat-reservation/common/translations/i18n.d.ts.map +1 -1
  14. package/development/seat-reservation/common/translations/i18n.js +225 -194
  15. package/development/seat-reservation/common/types.d.ts +20 -3
  16. package/development/seat-reservation/common/types.d.ts.map +1 -1
  17. package/development/seat-reservation/seat-reservation/seat-reservation-base-element.d.ts +50 -18
  18. package/development/seat-reservation/seat-reservation/seat-reservation-base-element.d.ts.map +1 -1
  19. package/development/seat-reservation/seat-reservation/seat-reservation-base-element.js +352 -172
  20. package/development/seat-reservation/seat-reservation/seat-reservation.component.d.ts +29 -13
  21. package/development/seat-reservation/seat-reservation/seat-reservation.component.d.ts.map +1 -1
  22. package/development/seat-reservation/seat-reservation/seat-reservation.component.js +603 -308
  23. package/development/seat-reservation/seat-reservation-area/seat-reservation-area.component.js +17 -10
  24. package/development/seat-reservation/seat-reservation-graphic/seat-reservation-assets.d.ts.map +1 -1
  25. package/development/seat-reservation/seat-reservation-graphic/seat-reservation-assets.js +1 -6
  26. package/development/seat-reservation/seat-reservation-graphic/seat-reservation-graphic.component.js +36 -18
  27. package/development/seat-reservation/seat-reservation-navigation-coach/seat-reservation-navigation-coach.component.d.ts +3 -1
  28. package/development/seat-reservation/seat-reservation-navigation-coach/seat-reservation-navigation-coach.component.d.ts.map +1 -1
  29. package/development/seat-reservation/seat-reservation-navigation-coach/seat-reservation-navigation-coach.component.js +54 -32
  30. package/development/seat-reservation/seat-reservation-place-control/seat-reservation-place-control.component.d.ts +2 -0
  31. package/development/seat-reservation/seat-reservation-place-control/seat-reservation-place-control.component.d.ts.map +1 -1
  32. package/development/seat-reservation/seat-reservation-place-control/seat-reservation-place-control.component.js +107 -58
  33. package/development/seat-reservation/seat-reservation-scoped/seat-reservation-scoped.component.d.ts +1 -16
  34. package/development/seat-reservation/seat-reservation-scoped/seat-reservation-scoped.component.d.ts.map +1 -1
  35. package/development/seat-reservation/seat-reservation-scoped/seat-reservation-scoped.component.js +10 -164
  36. package/package.json +2 -2
  37. package/seat-reservation/common/mapper/icon-mapper.d.ts.map +1 -1
  38. package/seat-reservation/common/mapper/icon-mapper.js +3 -4
  39. package/seat-reservation/common/mapper/mapper.d.ts +6 -5
  40. package/seat-reservation/common/mapper/mapper.d.ts.map +1 -1
  41. package/seat-reservation/common/mapper/mapper.js +35 -32
  42. package/seat-reservation/common/mapper/seat-reservation-sample-data.d.ts +113 -0
  43. package/seat-reservation/common/mapper/seat-reservation-sample-data.d.ts.map +1 -1
  44. package/seat-reservation/common/mapper/seat-reservation-sample-data.js +25997 -648
  45. package/seat-reservation/common/svgs.d.ts +0 -1
  46. package/seat-reservation/common/svgs.d.ts.map +1 -1
  47. package/seat-reservation/common/svgs.js +4 -11
  48. package/seat-reservation/common/translations/i18n.d.ts.map +1 -1
  49. package/seat-reservation/common/translations/i18n.js +228 -197
  50. package/seat-reservation/common/types.d.ts +20 -3
  51. package/seat-reservation/common/types.d.ts.map +1 -1
  52. package/seat-reservation/seat-reservation/seat-reservation-base-element.d.ts +50 -18
  53. package/seat-reservation/seat-reservation/seat-reservation-base-element.d.ts.map +1 -1
  54. package/seat-reservation/seat-reservation/seat-reservation-base-element.js +294 -175
  55. package/seat-reservation/seat-reservation/seat-reservation.component.d.ts +29 -13
  56. package/seat-reservation/seat-reservation/seat-reservation.component.d.ts.map +1 -1
  57. package/seat-reservation/seat-reservation/seat-reservation.component.js +318 -303
  58. package/seat-reservation/seat-reservation-area/seat-reservation-area.component.js +22 -22
  59. package/seat-reservation/seat-reservation-graphic/seat-reservation-assets.d.ts.map +1 -1
  60. package/seat-reservation/seat-reservation-graphic/seat-reservation-assets.js +0 -5
  61. package/seat-reservation/seat-reservation-graphic/seat-reservation-graphic.component.js +37 -37
  62. package/seat-reservation/seat-reservation-navigation-coach/seat-reservation-navigation-coach.component.d.ts +3 -1
  63. package/seat-reservation/seat-reservation-navigation-coach/seat-reservation-navigation-coach.component.d.ts.map +1 -1
  64. package/seat-reservation/seat-reservation-navigation-coach/seat-reservation-navigation-coach.component.js +95 -84
  65. package/seat-reservation/seat-reservation-place-control/seat-reservation-place-control.component.d.ts +2 -0
  66. package/seat-reservation/seat-reservation-place-control/seat-reservation-place-control.component.d.ts.map +1 -1
  67. package/seat-reservation/seat-reservation-place-control/seat-reservation-place-control.component.js +75 -63
  68. package/seat-reservation/seat-reservation-scoped/seat-reservation-scoped.component.d.ts +1 -16
  69. package/seat-reservation/seat-reservation-scoped/seat-reservation-scoped.component.d.ts.map +1 -1
  70. package/seat-reservation/seat-reservation-scoped/seat-reservation-scoped.component.js +14 -101
@@ -1,33 +1,33 @@
1
- var x = (r) => {
2
- throw TypeError(r);
1
+ var w = (e) => {
2
+ throw TypeError(e);
3
3
  };
4
- var y = (r, e, t) => e.has(r) || x("Cannot " + t);
5
- var c = (r, e, t) => (y(r, e, "read from private field"), t ? t.call(r) : e.get(r)), u = (r, e, t) => e.has(r) ? x("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(r) : e.set(r, t), m = (r, e, t, o) => (y(r, e, "write to private field"), o ? o.call(r, t) : e.set(r, t), t);
6
- import { __esDecorate as g, __runInitializers as l } from "tslib";
4
+ var y = (e, r, t) => r.has(e) || w("Cannot " + t);
5
+ var d = (e, r, t) => (y(e, r, "read from private field"), t ? t.call(e) : r.get(e)), u = (e, r, t) => r.has(e) ? w("Cannot add the same private member more than once") : r instanceof WeakSet ? r.add(e) : r.set(e, t), m = (e, r, t, s) => (y(e, r, "write to private field"), s ? s.call(e, t) : r.set(e, t), t);
6
+ import { __esDecorate as v, __runInitializers as l } from "tslib";
7
7
  import { forceType as z } from "@sbb-esta/lyne-elements/core/decorators.js";
8
8
  import { css as E, LitElement as I, html as j } from "lit";
9
9
  import { customElement as D, property as S } from "lit/decorators.js";
10
- const O = E`*,:before,:after{box-sizing:border-box}:host{--sbb-reservation-area-border-radius: var(--sbb-border-width-4x);--sbb-reservation-area-rotation: 0;display:flex;justify-content:center;align-items:center;height:calc(var(--sbb-reservation-area-height) * .0625rem);width:calc(var(--sbb-reservation-area-width) * .0625rem);border:var(--sbb-border-width-1x) solid var(--sbb-color-graphite);border-radius:var(--sbb-reservation-area-border-radius);position:inherit;rotate:calc(var(--sbb-reservation-area-rotation) * 1deg);background-color:var(--sbb-color-white)}:host([background=dark]){background-color:var(--sbb-color-milk)}:host([mounting=upper-border]){border-block-start-width:var(--sbb-border-width-2x);border-radius:0 0 var(--sbb-reservation-area-border-radius) var(--sbb-reservation-area-border-radius)}:host([mounting=lower-border]){border-block-end-width:var(--sbb-border-width-2x);border-radius:var(--sbb-reservation-area-border-radius) var(--sbb-reservation-area-border-radius) 0 0}:host([mounting=upper-to-lower-border]){border-block-start:none;border-block-end:none;border-radius:0}`;
10
+ const O = E`*,:before,:after{box-sizing:border-box}:host{--sbb-seat-reservation-area-border-radius: var(--sbb-border-width-4x);--sbb-seat-reservation-area-rotation: 0;display:flex;justify-content:center;align-items:center;height:calc(var(--sbb-seat-reservation-area-height) * var(--sbb-seat-reservation-one-px-rem, .0625rem));width:calc(var(--sbb-seat-reservation-area-width) * var(--sbb-seat-reservation-one-px-rem, .0625rem));border:var(--sbb-border-width-1x) solid var(--sbb-color-graphite);border-radius:var(--sbb-seat-reservation-area-border-radius);position:absolute;inset-block-start:calc(var(--sbb-seat-reservation-area-top) * var(--sbb-seat-reservation-one-px-rem, .0625rem));inset-inline-start:calc(var(--sbb-seat-reservation-area-left) * var(--sbb-seat-reservation-one-px-rem, .0625rem));rotate:calc(var(--sbb-seat-reservation-area-rotation) * 1deg);line-height:normal;background-color:var(--sbb-color-white)}:host([background=dark]){background-color:var(--sbb-color-milk)}:host([mounting=upper-border]){border-block-start-width:var(--sbb-border-width-2x);border-radius:0 0 var(--sbb-seat-reservation-area-border-radius) var(--sbb-seat-reservation-area-border-radius)}:host([mounting=lower-border]){border-block-end-width:var(--sbb-border-width-2x);border-radius:var(--sbb-seat-reservation-area-border-radius) var(--sbb-seat-reservation-area-border-radius) 0 0}:host([mounting=upper-to-lower-border]){border-block-start:none;border-block-end:none;border-radius:0}:host(.sbb-seat-reservation-area--cursor-pointer){cursor:pointer}`;
11
11
  let B = (() => {
12
- var n, b, s;
13
- let r = [D("sbb-seat-reservation-area")], e, t = [], o, h = I, v, _ = [], k = [], p, f = [], w = [];
14
- return s = class extends h {
12
+ var n, b, o;
13
+ let e = [D("sbb-seat-reservation-area")], r, t = [], s, g = I, h, p = [], _ = [], k, f = [], x = [];
14
+ return o = class extends g {
15
15
  constructor() {
16
16
  super(...arguments);
17
- u(this, n, l(this, _, "free"));
18
- u(this, b, (l(this, k), l(this, f, "light")));
19
- l(this, w);
17
+ u(this, n, l(this, p, "free"));
18
+ u(this, b, (l(this, _), l(this, f, "light")));
19
+ l(this, x);
20
20
  }
21
21
  /** Mounting Prop */
22
22
  get mounting() {
23
- return c(this, n);
23
+ return d(this, n);
24
24
  }
25
25
  set mounting(i) {
26
26
  m(this, n, i);
27
27
  }
28
28
  /** the background of the area */
29
29
  get background() {
30
- return c(this, b);
30
+ return d(this, b);
31
31
  }
32
32
  set background(i) {
33
33
  m(this, b, i);
@@ -35,14 +35,14 @@ let B = (() => {
35
35
  render() {
36
36
  return j`<slot></slot>`;
37
37
  }
38
- }, n = new WeakMap(), b = new WeakMap(), o = s, (() => {
39
- const i = typeof Symbol == "function" && Symbol.metadata ? Object.create(h[Symbol.metadata] ?? null) : void 0;
40
- v = [z(), S({ reflect: !0 })], p = [z(), S({ reflect: !0 })], g(s, null, v, { kind: "accessor", name: "mounting", static: !1, private: !1, access: { has: (a) => "mounting" in a, get: (a) => a.mounting, set: (a, d) => {
41
- a.mounting = d;
42
- } }, metadata: i }, _, k), g(s, null, p, { kind: "accessor", name: "background", static: !1, private: !1, access: { has: (a) => "background" in a, get: (a) => a.background, set: (a, d) => {
43
- a.background = d;
44
- } }, metadata: i }, f, w), g(null, e = { value: o }, r, { kind: "class", name: o.name, metadata: i }, null, t), o = e.value, i && Object.defineProperty(o, Symbol.metadata, { enumerable: !0, configurable: !0, writable: !0, value: i });
45
- })(), s.styles = O, l(o, t), o;
38
+ }, n = new WeakMap(), b = new WeakMap(), s = o, (() => {
39
+ const i = typeof Symbol == "function" && Symbol.metadata ? Object.create(g[Symbol.metadata] ?? null) : void 0;
40
+ h = [z(), S({ reflect: !0 })], k = [z(), S({ reflect: !0 })], v(o, null, h, { kind: "accessor", name: "mounting", static: !1, private: !1, access: { has: (a) => "mounting" in a, get: (a) => a.mounting, set: (a, c) => {
41
+ a.mounting = c;
42
+ } }, metadata: i }, p, _), v(o, null, k, { kind: "accessor", name: "background", static: !1, private: !1, access: { has: (a) => "background" in a, get: (a) => a.background, set: (a, c) => {
43
+ a.background = c;
44
+ } }, metadata: i }, f, x), v(null, r = { value: s }, e, { kind: "class", name: s.name, metadata: i }, null, t), s = r.value, i && Object.defineProperty(s, Symbol.metadata, { enumerable: !0, configurable: !0, writable: !0, value: i });
45
+ })(), o.styles = O, l(s, t), s;
46
46
  })();
47
47
  export {
48
48
  B as SbbSeatReservationAreaElement
@@ -1 +1 @@
1
- {"version":3,"file":"seat-reservation-assets.d.ts","sourceRoot":"","sources":["../../../../src/elements-experimental/seat-reservation/seat-reservation-graphic/seat-reservation-assets.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,KAAK,cAAc,EAAE,MAAM,KAAK,CAAC;AAKhD,OAAO,kCAAkC,CAAC;AAC1C,OAAO,gCAAgC,CAAC;AAUxC;;;;GAIG;AACH,eAAO,MAAM,kBAAkB,GAAI,UAAU,MAAM,KAAG,cAAc,GAAG,IAMtE,CAAC;AAmSF,eAAO,MAAM,cAAc,EAAE,cAgB5B,CAAC"}
1
+ {"version":3,"file":"seat-reservation-assets.d.ts","sourceRoot":"","sources":["../../../../src/elements-experimental/seat-reservation/seat-reservation-graphic/seat-reservation-assets.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,KAAK,cAAc,EAAE,MAAM,KAAK,CAAC;AAKhD,OAAO,kCAAkC,CAAC;AAC1C,OAAO,gCAAgC,CAAC;AAUxC;;;;GAIG;AACH,eAAO,MAAM,kBAAkB,GAAI,UAAU,MAAM,KAAG,cAAc,GAAG,IAMtE,CAAC;AA8RF,eAAO,MAAM,cAAc,EAAE,cAgB5B,CAAC"}
@@ -283,11 +283,6 @@ const E = (A) => d`
283
283
  TODO: check if still in use, may be deleted
284
284
  </td>
285
285
  </tr>
286
- <tr>
287
- <td>${t("TABLE")}</td>
288
- <td>Table</td>
289
- <td>TABLE</td>
290
- </tr>
291
286
  </tbody>
292
287
  </table>
293
288
  </sbb-table-wrapper>
@@ -2,43 +2,43 @@ var F = (s) => {
2
2
  throw TypeError(s);
3
3
  };
4
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";
5
+ var l = (s, i, r) => (G(s, i, "read from private field"), r ? r.call(s) : i.get(s)), b = (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 g } from "tslib";
7
7
  import { SbbLanguageController as q } from "@sbb-esta/lyne-elements/core/controllers.js";
8
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";
9
+ import { css as H, LitElement as J, html as x } from "lit";
10
10
  import { customElement as K, property as w } from "lit/decorators.js";
11
11
  import { classMap as Q } from "lit/directives/class-map.js";
12
12
  import { mapIconToSvg as V, getI18nSeatReservation as W } from "../common.js";
13
13
  import "@sbb-esta/lyne-elements/icon.js";
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}}`;
14
+ const X = H`*,:before,:after{box-sizing:border-box}:host{--sbb-seat-reservation-graphic-width: 16;--sbb-seat-reservation-graphic-height: 16;--sbb-seat-reservation-graphic-rotation: 0;--sbb-seat-reservation-graphic-inverse-rotation: 0;--sbb-seat-reservation-graphic-position: initial;--sbb-seat-reservation-graphic-left: 0;--sbb-seat-reservation-graphic-top: 0;--sbb-icon-svg-width: calc( var(--sbb-seat-reservation-graphic-width) * var(--sbb-seat-reservation-one-px-rem, .0625rem) );--sbb-icon-svg-height: calc( var(--sbb-seat-reservation-graphic-height) * var(--sbb-seat-reservation-one-px-rem, .0625rem) );display:flex;justify-content:center;align-items:center;width:calc(var(--sbb-seat-reservation-graphic-width) * var(--sbb-seat-reservation-one-px-rem, .0625rem));height:calc(var(--sbb-seat-reservation-graphic-height) * var(--sbb-seat-reservation-one-px-rem, .0625rem));position:var(--sbb-seat-reservation-graphic-position);inset-inline-start:calc(var(--sbb-seat-reservation-graphic-left) * var(--sbb-seat-reservation-one-px-rem, .0625rem));inset-block-start:calc(var(--sbb-seat-reservation-graphic-top) * var(--sbb-seat-reservation-one-px-rem, .0625rem))}:host(.sbb-seat-reservation-graphic--cursor-pointer){cursor:pointer}.sbb-sr-icon,.sbb-sr-graphic{width:inherit;height:inherit;transform-origin:center;rotate:calc(var(--sbb-seat-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-seat-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
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 {
16
+ var v, m, p, d, u, _, a;
17
+ let s = [K("sbb-seat-reservation-graphic")], i, r = [], c, z = J, R, S = [], I = [], N, $ = [], k = [], E, j = [], D = [], O, C = [], L = [], T, A = [], M = [], P, U = [], B = [];
18
+ return a = class extends z {
19
19
  constructor() {
20
20
  super(...arguments);
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));
21
+ b(this, v);
22
+ b(this, m);
23
+ b(this, p);
24
+ b(this, d);
25
+ b(this, u);
26
+ b(this, _);
27
+ o(this, v, h(this, S, "")), o(this, m, (h(this, I), h(this, $, !1))), o(this, p, (h(this, k), h(this, j, 0))), o(this, d, (h(this, D), h(this, C, 0))), o(this, u, (h(this, L), h(this, A, null))), o(this, _, (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 l(this, m);
31
+ return l(this, v);
32
32
  }
33
33
  set name(t) {
34
- o(this, m, t);
34
+ o(this, v, 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 l(this, v);
38
+ return l(this, m);
39
39
  }
40
40
  set stretch(t) {
41
- o(this, v, t);
41
+ o(this, m, t);
42
42
  }
43
43
  /** handles the rotation of the SVG graphic */
44
44
  get rotation() {
@@ -49,62 +49,62 @@ let ht = (() => {
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 l(this, _);
52
+ return l(this, d);
53
53
  }
54
54
  set inverseRotation(t) {
55
- o(this, _, t);
55
+ o(this, d, t);
56
56
  }
57
57
  /** width of the svg in pixels (without unit) */
58
58
  get width() {
59
- return l(this, d);
59
+ return l(this, u);
60
60
  }
61
61
  set width(t) {
62
- o(this, d, t);
62
+ o(this, u, t);
63
63
  }
64
64
  /** height of the svg in pixels (without unit) */
65
65
  get height() {
66
- return l(this, u);
66
+ return l(this, _);
67
67
  }
68
68
  set height(t) {
69
- o(this, u, t);
69
+ o(this, _, t);
70
70
  }
71
71
  willUpdate(t) {
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}`);
72
+ super.willUpdate(t), t.has("width") && this.width && this.style?.setProperty("--sbb-seat-reservation-graphic-width", `${this.width}`), t.has("height") && this.height && this.style?.setProperty("--sbb-seat-reservation-graphic-height", `${this.height}`), t.has("rotation") && this.style?.setProperty("--sbb-seat-reservation-graphic-rotation", `${this.rotation}`), t.has("inverseRotation") && this.style?.setProperty("--sbb-seat-reservation-graphic-inverse-rotation", `${this.inverseRotation}`);
73
73
  }
74
74
  render() {
75
75
  const t = V[this.name];
76
- return !t?.svg && !t?.svgName ? null : z`<span
76
+ return !t?.svg && !t?.svgName ? null : x`<span
77
77
  class="${Q({
78
78
  "sbb-sr-icon": !!t.svgName,
79
79
  "sbb-sr-graphic": !!t.svg
80
80
  })}"
81
81
  >
82
- ${t.svgName ? z` <sbb-icon
82
+ ${t.svgName ? x` <sbb-icon
83
83
  name="${t.svgName || ""}"
84
84
  aria-hidden="false"
85
85
  aria-label="${W(t.svgName, this._language.current)}"
86
- ></sbb-icon>` : z`${this._getSvgElement(t.svg)}`}
86
+ ></sbb-icon>` : x`${this._getSvgElement(t.svg)}`}
87
87
  </span>`;
88
88
  }
89
89
  _getSvgElement(t) {
90
90
  const e = new DOMParser(), n = t || "<svg></svg>", y = e.parseFromString(n, "image/svg+xml").firstElementChild;
91
91
  return this.stretch && y?.nodeName.toLowerCase() === "svg" && y.setAttribute("preserveAspectRatio", "none"), y;
92
92
  }
93
- }, m = new WeakMap(), v = new WeakMap(), p = new WeakMap(), _ = new WeakMap(), d = new WeakMap(), u = new WeakMap(), c = a, (() => {
94
- const t = typeof Symbol == "function" && Symbol.metadata ? Object.create(R[Symbol.metadata] ?? null) : void 0;
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) => {
93
+ }, v = new WeakMap(), m = new WeakMap(), p = new WeakMap(), d = new WeakMap(), u = new WeakMap(), _ = new WeakMap(), c = a, (() => {
94
+ const t = typeof Symbol == "function" && Symbol.metadata ? Object.create(z[Symbol.metadata] ?? null) : void 0;
95
+ R = [f(), w({ attribute: "name" })], N = [f(), w({ attribute: "stretch", type: Boolean })], E = [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 })], g(a, null, R, { kind: "accessor", name: "name", static: !1, private: !1, access: { has: (e) => "name" in e, get: (e) => e.name, set: (e, n) => {
96
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) => {
97
+ } }, metadata: t }, S, I), g(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
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) => {
99
+ } }, metadata: t }, $, k), g(a, null, E, { kind: "accessor", name: "rotation", static: !1, private: !1, access: { has: (e) => "rotation" in e, get: (e) => e.rotation, set: (e, n) => {
100
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) => {
101
+ } }, metadata: t }, j, D), g(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
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) => {
103
+ } }, metadata: t }, C, L), g(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
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) => {
105
+ } }, metadata: t }, A, M), g(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
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 });
107
+ } }, metadata: t }, U, B), g(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
108
  })(), a.styles = X, h(c, r), c;
109
109
  })();
110
110
  export {
@@ -1,5 +1,5 @@
1
1
  import { CSSResultGroup, PropertyValues, TemplateResult, LitElement } from 'lit';
2
- import { PlaceTravelClass } from '../common.js';
2
+ import { CoachNumberOfFreePlaces, PlaceTravelClass } from '../common.js';
3
3
  export type SelectCoachEventDetails = number;
4
4
  /**
5
5
  * This component will display the navigation coach item for Seat reservation.
@@ -17,6 +17,8 @@ export declare class SbbSeatReservationNavigationCoachElement extends LitElement
17
17
  accessor selected: boolean;
18
18
  accessor focused: boolean;
19
19
  accessor index: number;
20
+ /** Representation of places available for selecting, counting seat places and bicycle places separetely */
21
+ accessor freePlacesByType: CoachNumberOfFreePlaces;
20
22
  /** Travel class of the coach */
21
23
  accessor travelClass: PlaceTravelClass[];
22
24
  /** If the coach is a driver/restricted area */
@@ -1 +1 @@
1
- {"version":3,"file":"seat-reservation-navigation-coach.component.d.ts","sourceRoot":"","sources":["../../../../src/elements-experimental/seat-reservation/seat-reservation-navigation-coach/seat-reservation-navigation-coach.component.ts"],"names":[],"mappings":"AAEA,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,cAAc,CAAC;AAIrD,OAAO,+CAA+C,CAAC;AACvD,OAAO,4CAA4C,CAAC;AAIpD,MAAM,MAAM,uBAAuB,GAAG,MAAM,CAAC;AAE7C;;GAEG;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;cAEjC,UAAU,CAAC,iBAAiB,EAAE,cAAc,CAAC,IAAI,CAAC,GAAG,IAAI;IAwB5E;;;;;;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;IAgBvB,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-coach/seat-reservation-navigation-coach.component.ts"],"names":[],"mappings":"AAEA,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,uBAAuB,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAI9E,OAAO,+CAA+C,CAAC;AACvD,OAAO,4CAA4C,CAAC;AAIpD,MAAM,MAAM,uBAAuB,GAAG,MAAM,CAAC;AAE7C;;GAEG;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,2GAA2G;IAC3G,SACgB,gBAAgB,EAAE,uBAAuB,CAA6B;IAEtF,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;cAEjC,UAAU,CAAC,iBAAiB,EAAE,cAAc,CAAC,IAAI,CAAC,GAAG,IAAI;IAwB5E;;;;;;OAMG;cACgB,MAAM,IAAI,cAAc;IAyB3C,OAAO,CAAC,oBAAoB;IAwB5B,OAAO,CAAC,kBAAkB;IA4B1B,OAAO,CAAC,kCAAkC;IAmC1C,OAAO,CAAC,gCAAgC;IAYxC;;;;OAIG;IACH,OAAO,CAAC,eAAe;IAgBvB,OAAO,CAAC,2BAA2B;CASpC;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAE7B,uCAAuC,EAAE,wCAAwC,CAAC;KACnF;CACF"}