@sbb-esta/lyne-elements-experimental 3.3.2 → 3.5.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 (40) hide show
  1. package/custom-elements.json +33 -173
  2. package/development/seat-reservation/common/translations/i18n.js +4 -4
  3. package/development/seat-reservation/seat-reservation/seat-reservation-base-element.d.ts +5 -0
  4. package/development/seat-reservation/seat-reservation/seat-reservation-base-element.d.ts.map +1 -1
  5. package/development/seat-reservation/seat-reservation/seat-reservation-base-element.js +15 -3
  6. package/development/seat-reservation/seat-reservation/seat-reservation.component.d.ts +0 -1
  7. package/development/seat-reservation/seat-reservation/seat-reservation.component.d.ts.map +1 -1
  8. package/development/seat-reservation/seat-reservation/seat-reservation.component.js +41 -49
  9. package/development/seat-reservation/seat-reservation-graphic/seat-reservation-assets.js +5 -5
  10. package/development/seat-reservation/seat-reservation-graphic/seat-reservation-graphic.component.d.ts +1 -10
  11. package/development/seat-reservation/seat-reservation-graphic/seat-reservation-graphic.component.d.ts.map +1 -1
  12. package/development/seat-reservation/seat-reservation-graphic/seat-reservation-graphic.component.js +4 -83
  13. package/development/seat-reservation/seat-reservation-navigation-coach/seat-reservation-navigation-coach.component.d.ts.map +1 -1
  14. package/development/seat-reservation/seat-reservation-navigation-coach/seat-reservation-navigation-coach.component.js +16 -17
  15. package/development/seat-reservation/seat-reservation-navigation-services/seat-reservation-navigation-services.component.d.ts.map +1 -1
  16. package/development/seat-reservation/seat-reservation-navigation-services/seat-reservation-navigation-services.component.js +11 -14
  17. package/development/seat-reservation/seat-reservation-place-control/seat-reservation-place-control.component.d.ts +0 -8
  18. package/development/seat-reservation/seat-reservation-place-control/seat-reservation-place-control.component.d.ts.map +1 -1
  19. package/development/seat-reservation/seat-reservation-place-control/seat-reservation-place-control.component.js +20 -87
  20. package/development/seat-reservation/seat-reservation-scoped/seat-reservation-scoped.component.js +2 -4
  21. package/package.json +2 -2
  22. package/seat-reservation/common/translations/i18n.js +3 -3
  23. package/seat-reservation/seat-reservation/seat-reservation-base-element.d.ts +5 -0
  24. package/seat-reservation/seat-reservation/seat-reservation-base-element.d.ts.map +1 -1
  25. package/seat-reservation/seat-reservation/seat-reservation-base-element.js +24 -14
  26. package/seat-reservation/seat-reservation/seat-reservation.component.d.ts +0 -1
  27. package/seat-reservation/seat-reservation/seat-reservation.component.d.ts.map +1 -1
  28. package/seat-reservation/seat-reservation/seat-reservation.component.js +129 -134
  29. package/seat-reservation/seat-reservation-graphic/seat-reservation-assets.js +6 -6
  30. package/seat-reservation/seat-reservation-graphic/seat-reservation-graphic.component.d.ts +1 -10
  31. package/seat-reservation/seat-reservation-graphic/seat-reservation-graphic.component.d.ts.map +1 -1
  32. package/seat-reservation/seat-reservation-graphic/seat-reservation-graphic.component.js +47 -90
  33. package/seat-reservation/seat-reservation-navigation-coach/seat-reservation-navigation-coach.component.d.ts.map +1 -1
  34. package/seat-reservation/seat-reservation-navigation-coach/seat-reservation-navigation-coach.component.js +75 -76
  35. package/seat-reservation/seat-reservation-navigation-services/seat-reservation-navigation-services.component.d.ts.map +1 -1
  36. package/seat-reservation/seat-reservation-navigation-services/seat-reservation-navigation-services.component.js +32 -35
  37. package/seat-reservation/seat-reservation-place-control/seat-reservation-place-control.component.d.ts +0 -8
  38. package/seat-reservation/seat-reservation-place-control/seat-reservation-place-control.component.d.ts.map +1 -1
  39. package/seat-reservation/seat-reservation-place-control/seat-reservation-place-control.component.js +92 -129
  40. package/seat-reservation/seat-reservation-scoped/seat-reservation-scoped.component.js +2 -2
@@ -2,58 +2,55 @@ var x = (e) => {
2
2
  throw TypeError(e);
3
3
  };
4
4
  var L = (e, s, a) => s.has(e) || x("Cannot " + a);
5
- var _ = (e, s, a) => (L(e, s, "read from private field"), a ? a.call(e) : s.get(e)), d = (e, s, a) => s.has(e) ? x("Cannot add the same private member more than once") : s instanceof WeakSet ? s.add(e) : s.set(e, a), p = (e, s, a, i) => (L(e, s, "write to private field"), i ? i.call(e, a) : s.set(e, a), a);
6
- import { __runInitializers as b, __esDecorate as g } from "tslib";
5
+ var u = (e, s, a) => (L(e, s, "read from private field"), a ? a.call(e) : s.get(e)), d = (e, s, a) => s.has(e) ? x("Cannot add the same private member more than once") : s instanceof WeakSet ? s.add(e) : s.set(e, a), p = (e, s, a, i) => (L(e, s, "write to private field"), i ? i.call(e, a) : s.set(e, a), a);
6
+ import { __runInitializers as b, __esDecorate as m } from "tslib";
7
7
  import { SbbLanguageController as $ } from "@sbb-esta/lyne-elements/core/controllers.js";
8
- import { forceType as w } from "@sbb-esta/lyne-elements/core/decorators.js";
9
- import { css as A, LitElement as j, nothing as z, html as E } from "lit";
10
- import { customElement as C, property as D } from "lit/decorators.js";
11
- import { classMap as k } from "lit/directives/class-map.js";
12
- import { getI18nSeatReservation as m } from "../common.js";
8
+ import { forceType as A } from "@sbb-esta/lyne-elements/core/decorators.js";
9
+ import { css as j, LitElement as w, nothing as z, html as D } from "lit";
10
+ import { customElement as C, property as E } from "lit/decorators.js";
11
+ import { styleMap as k } from "lit/directives/style-map.js";
12
+ import { getI18nSeatReservation as g } from "../common.js";
13
13
  import "@sbb-esta/lyne-elements/screen-reader-only.js";
14
14
  import "../seat-reservation-graphic.js";
15
- const O = A`*,:before,:after{box-sizing:border-box}.sbb-sr-navigation__signs{display:flex;justify-content:center;flex-wrap:wrap;gap:var(--sbb-spacing-fixed-2x);color:var(--sbb-color-granite)}.sbb-sr-navigation__signs--vertical{align-content:center;height:100%}`;
15
+ const O = j`*,:before,:after{box-sizing:border-box}.sbb-sr-navigation__signs{display:flex;flex-direction:row;justify-content:center;gap:var(--sbb-spacing-fixed-2x);color:var(--sbb-color-granite)}:host([vertical]) .sbb-sr-navigation__signs{flex-direction:column;height:100%}`;
16
16
  let J = (() => {
17
- var o, c, l;
18
- let e = [C("sbb-seat-reservation-navigation-services")], s, a = [], i, u = j, v, h = [], y = [], f, I = [], S = [];
19
- return l = class extends u {
17
+ var n, c, l;
18
+ let e = [C("sbb-seat-reservation-navigation-services")], s, a = [], i, h = w, _, v = [], y = [], f, I = [], S = [];
19
+ return l = class extends h {
20
20
  constructor() {
21
21
  super(...arguments);
22
- d(this, o);
22
+ d(this, n);
23
23
  d(this, c);
24
- p(this, o, b(this, h, [])), p(this, c, (b(this, y), b(this, I, !1))), this._language = (b(this, S), new $(this));
24
+ p(this, n, b(this, v, [])), p(this, c, (b(this, y), b(this, I, !1))), this._language = (b(this, S), new $(this));
25
25
  }
26
26
  /** Coach service property ids, which are used to display the services in the navigation */
27
27
  get propertyIds() {
28
- return _(this, o);
28
+ return u(this, n);
29
29
  }
30
30
  set propertyIds(r) {
31
- p(this, o, r);
31
+ p(this, n, r);
32
32
  }
33
33
  /** If true, the service icons are displayed vertically */
34
34
  get vertical() {
35
- return _(this, c);
35
+ return u(this, c);
36
36
  }
37
37
  set vertical(r) {
38
38
  p(this, c, r);
39
39
  }
40
40
  render() {
41
41
  const r = this.propertyIds.length ? this._getServiceLabelDescription() : null;
42
- return E` <div
43
- class="${k({
44
- "sbb-sr-navigation__signs": !0,
45
- "sbb-sr-navigation__signs--vertical": this.vertical
46
- })}"
47
- >
42
+ return D` <div class="sbb-sr-navigation__signs">
48
43
  <sbb-screen-reader-only ${r || z}
49
44
  >${r}</sbb-screen-reader-only
50
45
  >
51
- ${this.propertyIds?.map((t) => E`
46
+ ${this.propertyIds?.map((t) => D`
52
47
  <sbb-seat-reservation-graphic
48
+ style=${k({
49
+ "--sbb-seat-reservation-graphic-width": 20,
50
+ "--sbb-seat-reservation-graphic-height": 20
51
+ })}
53
52
  name=${t ?? z}
54
- width="20"
55
- height="20"
56
- title=${m(t, this._language.current)}
53
+ title=${g(t, this._language.current)}
57
54
  aria-hidden="true"
58
55
  ></sbb-seat-reservation-graphic>
59
56
  `)}
@@ -62,16 +59,16 @@ let J = (() => {
62
59
  //Generate the translated service label from the available properties
63
60
  _getServiceLabelDescription() {
64
61
  let r = null;
65
- const t = this.propertyIds.map((n) => m(n, this._language.current)).filter((n) => !!n).join(", ");
66
- return t && (r = m("COACH_AVAILABLE_SERVICES", this._language.current).concat(":").concat(t)), r;
62
+ const t = this.propertyIds.map((o) => g(o, this._language.current)).filter((o) => !!o).join(", ");
63
+ return t && (r = g("COACH_AVAILABLE_SERVICES", this._language.current).concat(":").concat(t)), r;
67
64
  }
68
- }, o = new WeakMap(), c = new WeakMap(), i = l, (() => {
69
- const r = typeof Symbol == "function" && Symbol.metadata ? Object.create(u[Symbol.metadata] ?? null) : void 0;
70
- v = [D({ attribute: "property-ids", type: Array })], f = [w(), D({ type: Boolean })], g(l, null, v, { kind: "accessor", name: "propertyIds", static: !1, private: !1, access: { has: (t) => "propertyIds" in t, get: (t) => t.propertyIds, set: (t, n) => {
71
- t.propertyIds = n;
72
- } }, metadata: r }, h, y), g(l, null, f, { kind: "accessor", name: "vertical", static: !1, private: !1, access: { has: (t) => "vertical" in t, get: (t) => t.vertical, set: (t, n) => {
73
- t.vertical = n;
74
- } }, metadata: r }, I, S), g(null, s = { value: i }, e, { kind: "class", name: i.name, metadata: r }, null, a), i = s.value, r && Object.defineProperty(i, Symbol.metadata, { enumerable: !0, configurable: !0, writable: !0, value: r });
65
+ }, n = new WeakMap(), c = new WeakMap(), i = l, (() => {
66
+ const r = typeof Symbol == "function" && Symbol.metadata ? Object.create(h[Symbol.metadata] ?? null) : void 0;
67
+ _ = [E({ attribute: "property-ids", type: Array })], f = [A(), E({ type: Boolean, reflect: !0, useDefault: !0 })], m(l, null, _, { kind: "accessor", name: "propertyIds", static: !1, private: !1, access: { has: (t) => "propertyIds" in t, get: (t) => t.propertyIds, set: (t, o) => {
68
+ t.propertyIds = o;
69
+ } }, metadata: r }, v, y), m(l, null, f, { kind: "accessor", name: "vertical", static: !1, private: !1, access: { has: (t) => "vertical" in t, get: (t) => t.vertical, set: (t, o) => {
70
+ t.vertical = o;
71
+ } }, metadata: r }, I, S), m(null, s = { value: i }, e, { kind: "class", name: i.name, metadata: r }, null, a), i = s.value, r && Object.defineProperty(i, Symbol.metadata, { enumerable: !0, configurable: !0, writable: !0, value: r });
75
72
  })(), l.styles = O, b(i, a), i;
76
73
  })();
77
74
  export {
@@ -15,16 +15,8 @@ export declare class SbbSeatReservationPlaceControlElement extends SbbButtonBase
15
15
  accessor state: PlaceState;
16
16
  /** property ids of the place, to display more info about the place */
17
17
  accessor propertyIds: string[];
18
- /** rotation in degrees (without unit) */
19
- accessor rotation: number;
20
- /** width of the place in pixels (without unit) */
21
- accessor width: number;
22
- /** height of the place in pixels (without unit) */
23
- accessor height: number;
24
18
  /** label of the place, e.g. '1A', '2B' */
25
19
  accessor text: string;
26
- /** Rotation of the text in degrees (without unit) */
27
- accessor textRotation: number;
28
20
  /** Deck Index Prop to identifier the right place to deck */
29
21
  accessor deckIndex: number;
30
22
  /** Coach Index Prop to identifier the right place to coach */
@@ -1 +1 @@
1
- {"version":3,"file":"seat-reservation-place-control.component.d.ts","sourceRoot":"","sources":["../../../../src/elements-experimental/seat-reservation/seat-reservation-place-control/seat-reservation-place-control.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,+CAA+C,CAAC;AAGrF,OAAO,EAAE,KAAK,cAAc,EAAiB,KAAK,cAAc,EAAE,KAAK,cAAc,EAAE,MAAM,KAAK,CAAC;AAInG,OAAO,KAAK,EAAkB,UAAU,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAE1E,OAAO,gCAAgC,CAAC;AAIxC;;GAEG;AACH,qBAEM,qCAAsC,SAAQ,oBAAoB;IACtE,OAAuB,MAAM,EAAE,cAAc,CAAS;IACtD,gBAAuB,MAAM;;MAElB;IAEX,qDAAqD;IACrD,SAEgB,SAAS,EAAE,SAAS,CAAU;IAE9C,6DAA6D;IAC7D,SAEgB,KAAK,EAAE,UAAU,CAAU;IAE3C,sEAAsE;IACtE,SACgB,WAAW,EAAE,MAAM,EAAE,CAAM;IAE3C,yCAAyC;IACzC,SAEgB,QAAQ,EAAE,MAAM,CAAK;IAErC,kDAAkD;IAClD,SAEgB,KAAK,EAAE,MAAM,CAAM;IAEnC,mDAAmD;IACnD,SAEgB,MAAM,EAAE,MAAM,CAAM;IAEpC,0CAA0C;IAC1C,SAEgB,IAAI,EAAE,MAAM,CAAM;IAElC,qDAAqD;IACrD,SAEgB,YAAY,EAAE,MAAM,CAAK;IAEzC,4DAA4D;IAC5D,SAEgB,SAAS,EAAE,MAAM,CAAS;IAE1C,8DAA8D;IAC9D,SAEgB,UAAU,EAAE,MAAM,CAAS;IAE3C,kDAAkD;IAClD,SAEgB,YAAY,EAAE,OAAO,CAAS;IAE9C,wCAAwC;IACxC,SAEgB,QAAQ,EAAE,MAAM,CAAa;IAE7C,OAAO,CAAC,SAAS,CAAmC;;cAOjC,UAAU,CAAC,iBAAiB,EAAE,cAAc,CAAC,IAAI,CAAC,GAAG,IAAI;cA4BzD,MAAM,IAAI,cAAc;IAkC3C,OAAO,CAAC,YAAY;IAMpB,OAAO,CAAC,yBAAyB;IAejC,yGAAyG;IACzG,OAAO,CAAC,YAAY;CA4BrB;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAE7B,oCAAoC,EAAE,qCAAqC,CAAC;KAC7E;CACF"}
1
+ {"version":3,"file":"seat-reservation-place-control.component.d.ts","sourceRoot":"","sources":["../../../../src/elements-experimental/seat-reservation/seat-reservation-place-control/seat-reservation-place-control.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,+CAA+C,CAAC;AAGrF,OAAO,EAAE,KAAK,cAAc,EAAiB,KAAK,cAAc,EAAE,KAAK,cAAc,EAAE,MAAM,KAAK,CAAC;AAKnG,OAAO,KAAK,EAAkB,UAAU,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAE1E,OAAO,gCAAgC,CAAC;AAIxC;;GAEG;AACH,qBAEM,qCAAsC,SAAQ,oBAAoB;IACtE,OAAuB,MAAM,EAAE,cAAc,CAAS;IACtD,gBAAuB,MAAM;;MAElB;IAEX,qDAAqD;IACrD,SAEgB,SAAS,EAAE,SAAS,CAAU;IAE9C,6DAA6D;IAC7D,SAEgB,KAAK,EAAE,UAAU,CAAU;IAE3C,sEAAsE;IACtE,SACgB,WAAW,EAAE,MAAM,EAAE,CAAM;IAE3C,0CAA0C;IAC1C,SAEgB,IAAI,EAAE,MAAM,CAAM;IAElC,4DAA4D;IAC5D,SAEgB,SAAS,EAAE,MAAM,CAAS;IAE1C,8DAA8D;IAC9D,SAEgB,UAAU,EAAE,MAAM,CAAS;IAE3C,kDAAkD;IAClD,SAEgB,YAAY,EAAE,OAAO,CAAS;IAE9C,wCAAwC;IACxC,SAEgB,QAAQ,EAAE,MAAM,CAAa;IAE7C,OAAO,CAAC,SAAS,CAAmC;;cAOjC,UAAU,CAAC,iBAAiB,EAAE,cAAc,CAAC,IAAI,CAAC,GAAG,IAAI;cAUzD,MAAM,IAAI,cAAc;IAuC3C,OAAO,CAAC,YAAY;IAMpB,OAAO,CAAC,yBAAyB;IAejC,yGAAyG;IACzG,OAAO,CAAC,YAAY;CA4BrB;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAE7B,oCAAoC,EAAE,qCAAqC,CAAC;KAC7E;CACF"}
@@ -1,158 +1,129 @@
1
- var dt = (l) => {
2
- throw TypeError(l);
1
+ var W = (r) => {
2
+ throw TypeError(r);
3
3
  };
4
- var ht = (l, o, i) => o.has(l) || dt("Cannot " + i);
5
- var n = (l, o, i) => (ht(l, o, "read from private field"), i ? i.call(l) : o.get(l)), b = (l, o, i) => o.has(l) ? dt("Cannot add the same private member more than once") : o instanceof WeakSet ? o.add(l) : o.set(l, i), a = (l, o, i, v) => (ht(l, o, "write to private field"), v ? v.call(l, i) : o.set(l, i), i);
6
- import { __esDecorate as p, __runInitializers as r } from "tslib";
7
- import { SbbButtonBaseElement as gt } from "@sbb-esta/lyne-elements/core/base-elements.js";
8
- import { SbbLanguageController as kt } from "@sbb-esta/lyne-elements/core/controllers.js";
4
+ var X = (r, o, i) => o.has(r) || W("Cannot " + i);
5
+ var b = (r, o, i) => (X(r, o, "read from private field"), i ? i.call(r) : o.get(r)), p = (r, o, i) => o.has(r) ? W("Cannot add the same private member more than once") : o instanceof WeakSet ? o.add(r) : o.set(r, i), a = (r, o, i, n) => (X(r, o, "write to private field"), n ? n.call(r, i) : o.set(r, i), i);
6
+ import { __esDecorate as d, __runInitializers as c } from "tslib";
7
+ import { SbbButtonBaseElement as ae } from "@sbb-esta/lyne-elements/core/base-elements.js";
8
+ import { SbbLanguageController as ce } from "@sbb-esta/lyne-elements/core/controllers.js";
9
9
  import { forceType as h } from "@sbb-esta/lyne-elements/core/decorators.js";
10
- import { css as xt, nothing as mt, html as yt } from "lit";
11
- import { customElement as It, property as d } from "lit/decorators.js";
12
- import { getI18nSeatReservation as C } from "../common.js";
10
+ import { css as le, nothing as oe, html as ie } from "lit";
11
+ import { customElement as ne, property as v } from "lit/decorators.js";
12
+ import { styleMap as be } from "lit/directives/style-map.js";
13
+ import { getI18nSeatReservation as E } from "../common.js";
13
14
  import "../seat-reservation-graphic.js";
14
- const zt = xt`*,:before,:after{box-sizing:border-box}:host{--sbb-seat-reservation-place-control-width: 16;--sbb-seat-reservation-place-control-height: 16;--sbb-seat-reservation-place-control-top: 0;--sbb-seat-reservation-place-control-left: 0;--sbb-seat-reservation-place-control-rotation: 0;--sbb-seat-reservation-place-control-text-rotation: 0;--sbb-seat-reservation-place-control-text-size: calc( var(--sbb-place-control-text-scale-value, 1) * .5 );--sbb-seat-reservation-place-control-default-text: var(--sbb-color-black);--sbb-seat-reservation-place-control-hover-text: var(--sbb-color-iron);--sbb-seat-reservation-place-control-focus-text: var(--sbb-color-anthracite);--sbb-seat-reservation-place-control-allocated-text: var(--sbb-color-smoke);--sbb-seat-reservation-place-control-free-background-default: var(--sbb-color-white);--sbb-seat-reservation-place-control-free-background-hover: var(--sbb-color-cloud);--sbb-seat-reservation-place-control-free-background-focus: var(--sbb-color-silver);--sbb-seat-reservation-place-control-free-backrest-background-default: var(--sbb-color-black);--sbb-seat-reservation-place-control-free-backrest-background-hover: var(--sbb-color-black);--sbb-seat-reservation-place-control-free-backrest-background-focus: var(--sbb-color-black);--sbb-seat-reservation-place-control-selected-background-default: var(--sbb-color-red);--sbb-seat-reservation-place-control-selected-background-hover: var(--sbb-color-red125);--sbb-seat-reservation-place-control-selected-background-focus: var(--sbb-color-red150);--sbb-seat-reservation-place-control-selected-backrest-background-default: var( --sbb-color-red150 );--sbb-seat-reservation-place-control-selected-backrest-background-hover: #7d000f;--sbb-seat-reservation-place-control-selected-backrest-background-focus: #5a000b;--sbb-seat-reservation-place-control-allocated-background-default: var(--sbb-color-milk);width:calc(var(--sbb-seat-reservation-place-control-width) * var(--sbb-seat-reservation-one-px-rem, .0625rem));height:calc(var(--sbb-seat-reservation-place-control-height) * var(--sbb-seat-reservation-one-px-rem, .0625rem));position:absolute;inset-block-start:calc(var(--sbb-seat-reservation-place-control-top) * var(--sbb-seat-reservation-one-px-rem, .0625rem));inset-inline-start:calc(var(--sbb-seat-reservation-place-control-left) * var(--sbb-seat-reservation-one-px-rem, .0625rem));cursor:pointer}:host(:hover) .sbb-sr-place-ctrl--state-free:not(.sbb-reservation-place-control--disabled) ::part(svg-place){fill:var(--sbb-seat-reservation-place-control-free-background-hover)}:host(:hover) .sbb-sr-place-ctrl--state-free:not(.sbb-reservation-place-control--disabled) ::part(svg-backrest){fill:var(--sbb-seat-reservation-place-control-free-backrest-background-hover)}:host(:hover) .sbb-sr-place-ctrl--state-free:not(.sbb-reservation-place-control--disabled) .sbb-sr-place-ctrl__text{background-color:var(--sbb-seat-reservation-place-control-free-background-hover);color:var(--sbb-seat-reservation-place-control-free-text)}:host(:hover) .sbb-sr-place-ctrl--state-selected:not(.sbb-reservation-place-control--disabled) ::part(svg-place){fill:var(--sbb-seat-reservation-place-control-selected-background-hover)}:host(:hover) .sbb-sr-place-ctrl--state-selected:not(.sbb-reservation-place-control--disabled) ::part(svg-backrest){fill:var(--sbb-seat-reservation-place-control-selected-backrest-background-hover)}:host(:hover) .sbb-sr-place-ctrl--state-selected:not(.sbb-reservation-place-control--disabled) .sbb-sr-place-ctrl__text{background-color:var(--sbb-seat-reservation-place-control-selected-background-hover);color:var(--sbb-seat-reservation-place-control-selected-text)}:host(:focus){border-radius:var(--sbb-border-width-1x);outline:calc(2 * var(--sbb-seat-reservation-one-px-rem, .0625rem)) solid var(--sbb-color-black)}:host(:focus) .sbb-sr-place-ctrl--state-free:not(.sbb-reservation-place-control--disabled) ::part(svg-place){fill:var(--sbb-seat-reservation-place-control-free-background-focus)}:host(:focus) .sbb-sr-place-ctrl--state-free:not(.sbb-reservation-place-control--disabled) ::part(svg-backrest){fill:var(--sbb-seat-reservation-place-control-free-backrest-background-focus)}:host(:focus) .sbb-sr-place-ctrl--state-free:not(.sbb-reservation-place-control--disabled) .sbb-sr-place-ctrl__text{background-color:var(--sbb-seat-reservation-place-control-free-background-focus);color:var(--sbb-seat-reservation-place-control-free-text)}:host(:focus) .sbb-sr-place-ctrl--state-selected:not(.sbb-reservation-place-control--disabled) ::part(svg-place){fill:var(--sbb-seat-reservation-place-control-selected-background-focus)}:host(:focus) .sbb-sr-place-ctrl--state-selected:not(.sbb-reservation-place-control--disabled) ::part(svg-backrest){fill:var(--sbb-seat-reservation-place-control-selected-backrest-background-focus)}:host(:focus) .sbb-sr-place-ctrl--state-selected:not(.sbb-reservation-place-control--disabled) .sbb-sr-place-ctrl__text{background-color:var(--sbb-seat-reservation-place-control-selected-background-focus);color:var(--sbb-seat-reservation-place-control-selected-text)}:host(:dir(rtl)) :not(.sbb-sr-place-ctrl--type-bicycle,.sbb-sr-place-ctrl--orientation-90,.sbb-sr-place-ctrl--orientation-270,.sbb-sr-place-ctrl--state-selected) ::part(svg-place){rotate:180deg}.sbb-sr-place-ctrl{width:max-content;position:relative;font-size:calc(var(--sbb-seat-reservation-place-control-text-size) * var(--sbb-seat-reservation-one-px-rem, .0625rem))}.sbb-sr-place-ctrl--state-free ::part(svg-place){fill:var(--sbb-seat-reservation-place-control-free-background-default)}.sbb-sr-place-ctrl--state-free ::part(svg-backrest){fill:var(--sbb-seat-reservation-place-control-free-backrest-background-default)}.sbb-sr-place-ctrl--state-free .sbb-sr-place-ctrl__text{background-color:var(--sbb-seat-reservation-place-control-free-background-default);color:var(--sbb-seat-reservation-place-control-free-text)}.sbb-sr-place-ctrl--state-selected ::part(svg-place){fill:var(--sbb-seat-reservation-place-control-selected-background-default)}.sbb-sr-place-ctrl--state-selected ::part(svg-backrest){fill:var(--sbb-seat-reservation-place-control-selected-backrest-background-default)}.sbb-sr-place-ctrl--state-selected .sbb-sr-place-ctrl__text{background-color:var(--sbb-seat-reservation-place-control-selected-background-default);color:var(--sbb-seat-reservation-place-control-selected-text)}.sbb-sr-place-ctrl--state-allocated,.sbb-sr-place-ctrl--state-restricted{cursor:not-allowed}.sbb-sr-place-ctrl--state-allocated ::part(svg-place),.sbb-sr-place-ctrl--state-restricted ::part(svg-place){fill:var(--sbb-seat-reservation-place-control-allocated-background-default)}.sbb-sr-place-ctrl--state-allocated ::part(svg-backrest),.sbb-sr-place-ctrl--state-restricted ::part(svg-backrest){fill:var(--sbb-seat-reservation-place-control-allocated-backrest-background-default)}.sbb-sr-place-ctrl--state-allocated .sbb-sr-place-ctrl__text,.sbb-sr-place-ctrl--state-restricted .sbb-sr-place-ctrl__text{background-color:var(--sbb-seat-reservation-place-control-allocated-background-default);color:var(--sbb-seat-reservation-place-control-allocated-text)}.sbb-sr-place-ctrl__text{overflow:hidden;display:none;position:absolute;inset-block-start:50%;translate:-50% -50%;rotate:calc(var(--sbb-seat-reservation-place-control-text-rotation) * 1deg);font-family:var(--sbb-typo-font-family);font-size:.75em;line-height:initial}.sbb-sr-place-ctrl--state-free .sbb-sr-place-ctrl__text,.sbb-sr-place-ctrl--state-allocated .sbb-sr-place-ctrl__text,.sbb-sr-place-ctrl--state-restricted.sbb-sr-place-ctrl--type-bicycle .sbb-sr-place-ctrl__text{display:block}.sbb-sr-place-ctrl--type-bicycle .sbb-sr-place-ctrl__text{inset-block-start:65%;inset-inline-start:50%;transform-origin:center 16%;font-size:.6875em}.sbb-sr-place-ctrl--orientation-0.sbb-sr-place-ctrl--type-seat .sbb-sr-place-ctrl__text{inset-inline-start:45%}.sbb-sr-place-ctrl--orientation-90.sbb-sr-place-ctrl--type-seat .sbb-sr-place-ctrl__text{inset-block-start:46%;inset-inline-start:50%}.sbb-sr-place-ctrl--orientation-180.sbb-sr-place-ctrl--type-seat .sbb-sr-place-ctrl__text{inset-inline-start:55%}.sbb-sr-place-ctrl--orientation-270.sbb-sr-place-ctrl--type-seat .sbb-sr-place-ctrl__text{inset-block-start:52%;inset-inline-start:52%}:host(:dir(rtl)) .sbb-sr-place-ctrl--orientation-0 .sbb-sr-place-ctrl__text{inset-inline-start:3%}:host(:dir(rtl)) .sbb-sr-place-ctrl--orientation-90 .sbb-sr-place-ctrl__text,:host(:dir(rtl)) .sbb-sr-place-ctrl--orientation-180 .sbb-sr-place-ctrl__text{inset-inline-start:10%}:host(:dir(rtl)) .sbb-sr-place-ctrl--orientation-270 .sbb-sr-place-ctrl__text{inset-inline-start:5%}:host(:dir(rtl)) .sbb-sr-place-ctrl--type-bicycle .sbb-sr-place-ctrl__text{inset-inline-start:-10%}`;
15
- let Nt = (() => {
16
- var u, _, f, g, k, x, m, y, I, z, w, E, c;
17
- let l = [It("sbb-seat-reservation-place-control")], o, i = [], v, R = gt, T, S = [], $ = [], P, L = [], D = [], N, A = [], O = [], F, j = [], B = [], U, K = [], M = [], Y, q = [], G = [], H, J = [], Q = [], V, W = [], X = [], Z, tt = [], et = [], st, at = [], rt = [], ct, lt = [], ot = [], it, nt = [], bt = [];
18
- return c = class extends R {
15
+ const pe = le`*,:before,:after{box-sizing:border-box}:host{--sbb-seat-reservation-place-control-text-scale-value: 1;--sbb-seat-reservation-place-control-width: 16;--sbb-seat-reservation-place-control-height: 16;--sbb-seat-reservation-place-control-top: 0;--sbb-seat-reservation-place-control-left: 0;--sbb-seat-reservation-place-control-rotation: 0;--sbb-seat-reservation-place-control-text-rotation: 0;--sbb-seat-reservation-place-control-text-size: calc( var(--sbb-seat-reservation-place-control-text-scale-value, 1) * .5 );--sbb-seat-reservation-place-control-default-text: var(--sbb-color-black);--sbb-seat-reservation-place-control-hover-text: var(--sbb-color-iron);--sbb-seat-reservation-place-control-focus-text: var(--sbb-color-anthracite);--sbb-seat-reservation-place-control-allocated-text: var(--sbb-color-smoke);--sbb-seat-reservation-place-control-free-background-default: var(--sbb-color-white);--sbb-seat-reservation-place-control-free-background-hover: var(--sbb-color-cloud);--sbb-seat-reservation-place-control-free-background-focus: var(--sbb-color-silver);--sbb-seat-reservation-place-control-free-backrest-background-default: var(--sbb-color-black);--sbb-seat-reservation-place-control-free-backrest-background-hover: var(--sbb-color-black);--sbb-seat-reservation-place-control-free-backrest-background-focus: var(--sbb-color-black);--sbb-seat-reservation-place-control-selected-background-default: var(--sbb-color-red);--sbb-seat-reservation-place-control-selected-background-hover: var(--sbb-color-red125);--sbb-seat-reservation-place-control-selected-background-focus: var(--sbb-color-red150);--sbb-seat-reservation-place-control-selected-backrest-background-default: var( --sbb-color-red150 );--sbb-seat-reservation-place-control-selected-backrest-background-hover: #7d000f;--sbb-seat-reservation-place-control-selected-backrest-background-focus: #5a000b;--sbb-seat-reservation-place-control-allocated-background-default: var(--sbb-color-milk);width:calc(var(--sbb-seat-reservation-place-control-width) * var(--sbb-seat-reservation-one-px-rem, .0625rem));height:calc(var(--sbb-seat-reservation-place-control-height) * var(--sbb-seat-reservation-one-px-rem, .0625rem));position:absolute;inset-block-start:calc(var(--sbb-seat-reservation-place-control-top) * var(--sbb-seat-reservation-one-px-rem, .0625rem));inset-inline-start:calc(var(--sbb-seat-reservation-place-control-left) * var(--sbb-seat-reservation-one-px-rem, .0625rem));cursor:pointer}:host(:hover) .sbb-sr-place-ctrl--state-free:not(.sbb-reservation-place-control--disabled) ::part(svg-place){fill:var(--sbb-seat-reservation-place-control-free-background-hover)}:host(:hover) .sbb-sr-place-ctrl--state-free:not(.sbb-reservation-place-control--disabled) ::part(svg-backrest){fill:var(--sbb-seat-reservation-place-control-free-backrest-background-hover)}:host(:hover) .sbb-sr-place-ctrl--state-free:not(.sbb-reservation-place-control--disabled) .sbb-sr-place-ctrl__text{background-color:var(--sbb-seat-reservation-place-control-free-background-hover);color:var(--sbb-seat-reservation-place-control-free-text)}:host(:hover) .sbb-sr-place-ctrl--state-selected:not(.sbb-reservation-place-control--disabled) ::part(svg-place){fill:var(--sbb-seat-reservation-place-control-selected-background-hover)}:host(:hover) .sbb-sr-place-ctrl--state-selected:not(.sbb-reservation-place-control--disabled) ::part(svg-backrest){fill:var(--sbb-seat-reservation-place-control-selected-backrest-background-hover)}:host(:hover) .sbb-sr-place-ctrl--state-selected:not(.sbb-reservation-place-control--disabled) .sbb-sr-place-ctrl__text{background-color:var(--sbb-seat-reservation-place-control-selected-background-hover);color:var(--sbb-seat-reservation-place-control-selected-text)}:host(:focus){border-radius:var(--sbb-border-width-1x);outline:calc(2 * var(--sbb-seat-reservation-one-px-rem, .0625rem)) solid var(--sbb-color-black)}:host(:focus) .sbb-sr-place-ctrl--state-free:not(.sbb-reservation-place-control--disabled) ::part(svg-place){fill:var(--sbb-seat-reservation-place-control-free-background-focus)}:host(:focus) .sbb-sr-place-ctrl--state-free:not(.sbb-reservation-place-control--disabled) ::part(svg-backrest){fill:var(--sbb-seat-reservation-place-control-free-backrest-background-focus)}:host(:focus) .sbb-sr-place-ctrl--state-free:not(.sbb-reservation-place-control--disabled) .sbb-sr-place-ctrl__text{background-color:var(--sbb-seat-reservation-place-control-free-background-focus);color:var(--sbb-seat-reservation-place-control-free-text)}:host(:focus) .sbb-sr-place-ctrl--state-selected:not(.sbb-reservation-place-control--disabled) ::part(svg-place){fill:var(--sbb-seat-reservation-place-control-selected-background-focus)}:host(:focus) .sbb-sr-place-ctrl--state-selected:not(.sbb-reservation-place-control--disabled) ::part(svg-backrest){fill:var(--sbb-seat-reservation-place-control-selected-backrest-background-focus)}:host(:focus) .sbb-sr-place-ctrl--state-selected:not(.sbb-reservation-place-control--disabled) .sbb-sr-place-ctrl__text{background-color:var(--sbb-seat-reservation-place-control-selected-background-focus);color:var(--sbb-seat-reservation-place-control-selected-text)}:host(:dir(rtl)) :not(.sbb-sr-place-ctrl--type-bicycle,.sbb-sr-place-ctrl--orientation-90,.sbb-sr-place-ctrl--orientation-270,.sbb-sr-place-ctrl--state-selected) ::part(svg-place){rotate:180deg}.sbb-sr-place-ctrl{width:max-content;position:relative;font-size:calc(var(--sbb-seat-reservation-place-control-text-size) * var(--sbb-seat-reservation-one-px-rem, .0625rem))}.sbb-sr-place-ctrl--state-free ::part(svg-place){fill:var(--sbb-seat-reservation-place-control-free-background-default)}.sbb-sr-place-ctrl--state-free ::part(svg-backrest){fill:var(--sbb-seat-reservation-place-control-free-backrest-background-default)}.sbb-sr-place-ctrl--state-free .sbb-sr-place-ctrl__text{background-color:var(--sbb-seat-reservation-place-control-free-background-default);color:var(--sbb-seat-reservation-place-control-free-text)}.sbb-sr-place-ctrl--state-selected ::part(svg-place){fill:var(--sbb-seat-reservation-place-control-selected-background-default)}.sbb-sr-place-ctrl--state-selected ::part(svg-backrest){fill:var(--sbb-seat-reservation-place-control-selected-backrest-background-default)}.sbb-sr-place-ctrl--state-selected .sbb-sr-place-ctrl__text{background-color:var(--sbb-seat-reservation-place-control-selected-background-default);color:var(--sbb-seat-reservation-place-control-selected-text)}.sbb-sr-place-ctrl--state-allocated,.sbb-sr-place-ctrl--state-restricted{cursor:not-allowed}.sbb-sr-place-ctrl--state-allocated ::part(svg-place),.sbb-sr-place-ctrl--state-restricted ::part(svg-place){fill:var(--sbb-seat-reservation-place-control-allocated-background-default)}.sbb-sr-place-ctrl--state-allocated ::part(svg-backrest),.sbb-sr-place-ctrl--state-restricted ::part(svg-backrest){fill:var(--sbb-seat-reservation-place-control-allocated-backrest-background-default)}.sbb-sr-place-ctrl--state-allocated .sbb-sr-place-ctrl__text,.sbb-sr-place-ctrl--state-restricted .sbb-sr-place-ctrl__text{background-color:var(--sbb-seat-reservation-place-control-allocated-background-default);color:var(--sbb-seat-reservation-place-control-allocated-text)}.sbb-sr-place-ctrl__text{overflow:hidden;display:none;position:absolute;inset-block-start:50%;translate:-50% -50%;rotate:calc(var(--sbb-seat-reservation-place-control-text-rotation) * 1deg);font-family:var(--sbb-typo-font-family);font-size:.75em;line-height:initial}.sbb-sr-place-ctrl--state-free .sbb-sr-place-ctrl__text,.sbb-sr-place-ctrl--state-allocated .sbb-sr-place-ctrl__text,.sbb-sr-place-ctrl--state-restricted.sbb-sr-place-ctrl--type-bicycle .sbb-sr-place-ctrl__text{display:block}.sbb-sr-place-ctrl--type-bicycle .sbb-sr-place-ctrl__text{inset-block-start:65%;inset-inline-start:50%;transform-origin:center 16%;font-size:.6875em}.sbb-sr-place-ctrl--orientation-0.sbb-sr-place-ctrl--type-seat .sbb-sr-place-ctrl__text{inset-inline-start:45%}.sbb-sr-place-ctrl--orientation-90.sbb-sr-place-ctrl--type-seat .sbb-sr-place-ctrl__text{inset-block-start:46%;inset-inline-start:50%}.sbb-sr-place-ctrl--orientation-180.sbb-sr-place-ctrl--type-seat .sbb-sr-place-ctrl__text{inset-inline-start:55%}.sbb-sr-place-ctrl--orientation-270.sbb-sr-place-ctrl--type-seat .sbb-sr-place-ctrl__text{inset-block-start:52%;inset-inline-start:52%}:host(:dir(rtl)) .sbb-sr-place-ctrl--orientation-0 .sbb-sr-place-ctrl__text{inset-inline-start:3%}:host(:dir(rtl)) .sbb-sr-place-ctrl--orientation-90 .sbb-sr-place-ctrl__text,:host(:dir(rtl)) .sbb-sr-place-ctrl--orientation-180 .sbb-sr-place-ctrl__text{inset-inline-start:10%}:host(:dir(rtl)) .sbb-sr-place-ctrl--orientation-270 .sbb-sr-place-ctrl__text{inset-inline-start:5%}:host(:dir(rtl)) .sbb-sr-place-ctrl--type-bicycle .sbb-sr-place-ctrl__text{inset-inline-start:-10%}`;
16
+ let Ie = (() => {
17
+ var u, f, _, g, k, x, y, m, l;
18
+ let r = [ne("sbb-seat-reservation-place-control")], o, i = [], n, C = ae, z, T = [], S = [], w, P = [], R = [], L, $ = [], D = [], A, N = [], O = [], F, V = [], j = [], B, U = [], K = [], M, Y = [], q = [], G, H = [], J = [];
19
+ return l = class extends C {
19
20
  constructor() {
20
21
  super();
21
- b(this, u);
22
- b(this, _);
23
- b(this, f);
24
- b(this, g);
25
- b(this, k);
26
- b(this, x);
27
- b(this, m);
28
- b(this, y);
29
- b(this, I);
30
- b(this, z);
31
- b(this, w);
32
- b(this, E);
33
- a(this, u, r(this, S, "SEAT")), a(this, _, (r(this, $), r(this, L, "FREE"))), a(this, f, (r(this, D), r(this, A, []))), a(this, g, (r(this, O), r(this, j, 0))), a(this, k, (r(this, B), r(this, K, 32))), a(this, x, (r(this, M), r(this, q, 32))), a(this, m, (r(this, G), r(this, J, ""))), a(this, y, (r(this, Q), r(this, W, 0))), a(this, I, (r(this, X), r(this, tt, null))), a(this, z, (r(this, et), r(this, at, null))), a(this, w, (r(this, rt), r(this, lt, !1))), a(this, E, (r(this, ot), r(this, nt, "unfocus"))), this._language = (r(this, bt), new kt(this)), this.addEventListener("click", () => this._selectPlace());
22
+ p(this, u);
23
+ p(this, f);
24
+ p(this, _);
25
+ p(this, g);
26
+ p(this, k);
27
+ p(this, x);
28
+ p(this, y);
29
+ p(this, m);
30
+ a(this, u, c(this, T, "SEAT")), a(this, f, (c(this, S), c(this, P, "FREE"))), a(this, _, (c(this, R), c(this, $, []))), a(this, g, (c(this, D), c(this, N, ""))), a(this, k, (c(this, O), c(this, V, null))), a(this, x, (c(this, j), c(this, U, null))), a(this, y, (c(this, K), c(this, Y, !1))), a(this, m, (c(this, q), c(this, H, "unfocus"))), this._language = (c(this, J), new ce(this)), this.addEventListener("click", () => this._selectPlace());
34
31
  }
35
32
  /** placeType of the place, e.g. 'SEAT', 'BICYCLE' */
36
33
  get placeType() {
37
- return n(this, u);
34
+ return b(this, u);
38
35
  }
39
- set placeType(e) {
40
- a(this, u, e);
36
+ set placeType(t) {
37
+ a(this, u, t);
41
38
  }
42
39
  /** state of the place, e.g. 'FREE', 'SELECTED', 'BLOCKED' */
43
40
  get state() {
44
- return n(this, _);
41
+ return b(this, f);
45
42
  }
46
- set state(e) {
47
- a(this, _, e);
43
+ set state(t) {
44
+ a(this, f, t);
48
45
  }
49
46
  /** property ids of the place, to display more info about the place */
50
47
  get propertyIds() {
51
- return n(this, f);
48
+ return b(this, _);
52
49
  }
53
- set propertyIds(e) {
54
- a(this, f, e);
55
- }
56
- /** rotation in degrees (without unit) */
57
- get rotation() {
58
- return n(this, g);
59
- }
60
- set rotation(e) {
61
- a(this, g, e);
62
- }
63
- /** width of the place in pixels (without unit) */
64
- get width() {
65
- return n(this, k);
66
- }
67
- set width(e) {
68
- a(this, k, e);
69
- }
70
- /** height of the place in pixels (without unit) */
71
- get height() {
72
- return n(this, x);
73
- }
74
- set height(e) {
75
- a(this, x, e);
50
+ set propertyIds(t) {
51
+ a(this, _, t);
76
52
  }
77
53
  /** label of the place, e.g. '1A', '2B' */
78
54
  get text() {
79
- return n(this, m);
80
- }
81
- set text(e) {
82
- a(this, m, e);
83
- }
84
- /** Rotation of the text in degrees (without unit) */
85
- get textRotation() {
86
- return n(this, y);
55
+ return b(this, g);
87
56
  }
88
- set textRotation(e) {
89
- a(this, y, e);
57
+ set text(t) {
58
+ a(this, g, t);
90
59
  }
91
60
  /** Deck Index Prop to identifier the right place to deck */
92
61
  get deckIndex() {
93
- return n(this, I);
62
+ return b(this, k);
94
63
  }
95
- set deckIndex(e) {
96
- a(this, I, e);
64
+ set deckIndex(t) {
65
+ a(this, k, t);
97
66
  }
98
67
  /** Coach Index Prop to identifier the right place to coach */
99
68
  get coachIndex() {
100
- return n(this, z);
69
+ return b(this, x);
101
70
  }
102
- set coachIndex(e) {
103
- a(this, z, e);
71
+ set coachIndex(t) {
72
+ a(this, x, t);
104
73
  }
105
74
  /** Prevent click prop prevent any place action */
106
75
  get preventClick() {
107
- return n(this, w);
76
+ return b(this, y);
108
77
  }
109
- set preventClick(e) {
110
- a(this, w, e);
78
+ set preventClick(t) {
79
+ a(this, y, t);
111
80
  }
112
81
  /** Set the place focus outline style */
113
82
  get keyfocus() {
114
- return n(this, E);
83
+ return b(this, m);
115
84
  }
116
- set keyfocus(e) {
117
- a(this, E, e);
85
+ set keyfocus(t) {
86
+ a(this, m, t);
118
87
  }
119
- willUpdate(e) {
120
- super.willUpdate(e), (e.has("width") || e.has("height")) && this.style?.setProperty("--sbb-place-control-text-scale-value", `${Math.min(this.width, this.height)}`), e.has("textRotation") && this.style?.setProperty("--sbb-seat-reservation-place-control-text-rotation", `${this.textRotation}`), e.has("rotation") && this.style?.setProperty("--sbb-seat-reservation-place-control-rotation", `${this.rotation}`), e.has("keyfocus") && this.keyfocus === "focus" && this.focus();
88
+ willUpdate(t) {
89
+ super.willUpdate(t), t.has("keyfocus") && this.keyfocus === "focus" && this.focus();
121
90
  }
122
91
  render() {
123
- const e = this._getPlaceSvg(this.placeType, this.state), t = this.type.toLowerCase(), s = this.state.toLowerCase(), pt = this.text, vt = this.width, ut = this.height, _t = this.textRotation - this.rotation, ft = this.preventClick ? "sbb-reservation-place-control--disabled" : null;
124
- return this.title = this._getTitleDescriptionPlace(), this.tabIndex = -1, yt`
92
+ const t = this._getPlaceSvg(this.placeType, this.state), e = this.type.toLowerCase(), s = this.state.toLowerCase(), Q = this.text, Z = this.style?.getPropertyValue("--sbb-seat-reservation-place-control-width"), ee = this.style?.getPropertyValue("--sbb-seat-reservation-place-control-height"), I = this.style?.getPropertyValue("--sbb-seat-reservation-place-control-rotation"), te = this.style?.getPropertyValue("--sbb-seat-reservation-place-control-text-rotation"), se = Number(te) - Number(I), re = this.preventClick ? "sbb-reservation-place-control--disabled" : null;
93
+ return this.title = this._getTitleDescriptionPlace(), this.tabIndex = -1, ie`
125
94
  <div
126
95
  part="sbb-sr-place-part"
127
- class="sbb-sr-place-ctrl sbb-sr-place-ctrl--orientation-${this.rotation} sbb-sr-place-ctrl--state-${s} sbb-sr-place-ctrl--type-${t} ${ft}"
96
+ class="sbb-sr-place-ctrl sbb-sr-place-ctrl--orientation-${I} sbb-sr-place-ctrl--state-${s} sbb-sr-place-ctrl--type-${e} ${re}"
128
97
  >
129
98
  <sbb-seat-reservation-graphic
130
- .name=${e}
131
- .width=${vt}
132
- .height=${ut}
133
- .rotation=${this.rotation}
134
- .inverseRotation=${_t}
99
+ style=${be({
100
+ "--sbb-seat-reservation-graphic-width": Z,
101
+ "--sbb-seat-reservation-graphic-height": ee,
102
+ "--sbb-seat-reservation-graphic-rotation": I,
103
+ "--sbb-seat-reservation-graphic-inverse-rotation": se
104
+ })}
105
+ .name=${t}
135
106
  aria-hidden="true"
136
107
  ></sbb-seat-reservation-graphic>
137
- <span ${this.text ?? mt} class="sbb-sr-place-ctrl__text" aria-hidden="true"
138
- >${pt}</span
108
+ <span ${this.text ?? oe} class="sbb-sr-place-ctrl__text" aria-hidden="true"
109
+ >${Q}</span
139
110
  >
140
111
  </div>
141
112
  `;
142
113
  }
143
- _getPlaceSvg(e, t) {
144
- return `PLACE_${e}_${t}`;
114
+ _getPlaceSvg(t, e) {
115
+ return `PLACE_${t}_${e}`;
145
116
  }
146
117
  _getTitleDescriptionPlace() {
147
- const e = "PLACE_CONTROL_" + this.type + "_" + this.state;
148
- let t = C(e, this._language.current, [this.text]);
149
- return this.propertyIds.length && (t += ". " + C("PLACE_PROPERTY", this._language.current).concat(": "), t += this.propertyIds.map((s) => C(s, this._language.current)).join(", ")), t;
118
+ const t = "PLACE_CONTROL_" + this.type + "_" + this.state;
119
+ let e = E(t, this._language.current, [this.text]);
120
+ return this.propertyIds.length && (e += ". " + E("PLACE_PROPERTY", this._language.current).concat(": "), e += this.propertyIds.map((s) => E(s, this._language.current)).join(", ")), e;
150
121
  }
151
122
  /** If the place selectable, we emit the placeSelection object which contains infos to the place state */
152
123
  _selectPlace() {
153
124
  if ((this.state === "FREE" || this.state === "SELECTED") && !this.preventClick) {
154
125
  this.state = this.state === "FREE" ? "SELECTED" : "FREE";
155
- const t = {
126
+ const e = {
156
127
  id: this.id,
157
128
  deckIndex: this.deckIndex,
158
129
  coachIndex: this.coachIndex,
@@ -161,43 +132,35 @@ let Nt = (() => {
161
132
  placeType: this.placeType
162
133
  };
163
134
  this.dispatchEvent(new CustomEvent("selectplace", {
164
- detail: t,
135
+ detail: e,
165
136
  bubbles: !0,
166
137
  composed: !0
167
138
  }));
168
139
  }
169
140
  }
170
- }, u = new WeakMap(), _ = new WeakMap(), f = new WeakMap(), g = new WeakMap(), k = new WeakMap(), x = new WeakMap(), m = new WeakMap(), y = new WeakMap(), I = new WeakMap(), z = new WeakMap(), w = new WeakMap(), E = new WeakMap(), v = c, (() => {
171
- const e = typeof Symbol == "function" && Symbol.metadata ? Object.create(R[Symbol.metadata] ?? null) : void 0;
172
- T = [h(), d({ attribute: "type" })], P = [h(), d({ attribute: "state" })], N = [d({ attribute: "propertyIds", type: Array })], F = [h(), d({ attribute: "rotation", type: Number })], U = [h(), d({ attribute: "width", type: Number })], Y = [h(), d({ attribute: "height", type: Number })], H = [h(), d({ attribute: "text" })], V = [h(), d({ attribute: "text-rotation" })], Z = [h(), d({ attribute: "deck-index", type: Number })], st = [h(), d({ attribute: "coach-index", type: Number })], ct = [h(), d({ attribute: "prevent-click", type: Boolean })], it = [h(), d({ attribute: "keyfocus" })], p(c, null, T, { kind: "accessor", name: "placeType", static: !1, private: !1, access: { has: (t) => "placeType" in t, get: (t) => t.placeType, set: (t, s) => {
173
- t.placeType = s;
174
- } }, metadata: e }, S, $), p(c, null, P, { kind: "accessor", name: "state", static: !1, private: !1, access: { has: (t) => "state" in t, get: (t) => t.state, set: (t, s) => {
175
- t.state = s;
176
- } }, metadata: e }, L, D), p(c, null, N, { kind: "accessor", name: "propertyIds", static: !1, private: !1, access: { has: (t) => "propertyIds" in t, get: (t) => t.propertyIds, set: (t, s) => {
177
- t.propertyIds = s;
178
- } }, metadata: e }, A, O), p(c, null, F, { kind: "accessor", name: "rotation", static: !1, private: !1, access: { has: (t) => "rotation" in t, get: (t) => t.rotation, set: (t, s) => {
179
- t.rotation = s;
180
- } }, metadata: e }, j, B), p(c, null, U, { kind: "accessor", name: "width", static: !1, private: !1, access: { has: (t) => "width" in t, get: (t) => t.width, set: (t, s) => {
181
- t.width = s;
182
- } }, metadata: e }, K, M), p(c, null, Y, { kind: "accessor", name: "height", static: !1, private: !1, access: { has: (t) => "height" in t, get: (t) => t.height, set: (t, s) => {
183
- t.height = s;
184
- } }, metadata: e }, q, G), p(c, null, H, { kind: "accessor", name: "text", static: !1, private: !1, access: { has: (t) => "text" in t, get: (t) => t.text, set: (t, s) => {
185
- t.text = s;
186
- } }, metadata: e }, J, Q), p(c, null, V, { kind: "accessor", name: "textRotation", static: !1, private: !1, access: { has: (t) => "textRotation" in t, get: (t) => t.textRotation, set: (t, s) => {
187
- t.textRotation = s;
188
- } }, metadata: e }, W, X), p(c, null, Z, { kind: "accessor", name: "deckIndex", static: !1, private: !1, access: { has: (t) => "deckIndex" in t, get: (t) => t.deckIndex, set: (t, s) => {
189
- t.deckIndex = s;
190
- } }, metadata: e }, tt, et), p(c, null, st, { kind: "accessor", name: "coachIndex", static: !1, private: !1, access: { has: (t) => "coachIndex" in t, get: (t) => t.coachIndex, set: (t, s) => {
191
- t.coachIndex = s;
192
- } }, metadata: e }, at, rt), p(c, null, ct, { kind: "accessor", name: "preventClick", static: !1, private: !1, access: { has: (t) => "preventClick" in t, get: (t) => t.preventClick, set: (t, s) => {
193
- t.preventClick = s;
194
- } }, metadata: e }, lt, ot), p(c, null, it, { kind: "accessor", name: "keyfocus", static: !1, private: !1, access: { has: (t) => "keyfocus" in t, get: (t) => t.keyfocus, set: (t, s) => {
195
- t.keyfocus = s;
196
- } }, metadata: e }, nt, bt), p(null, o = { value: v }, l, { kind: "class", name: v.name, metadata: e }, null, i), v = o.value, e && Object.defineProperty(v, Symbol.metadata, { enumerable: !0, configurable: !0, writable: !0, value: e });
197
- })(), c.styles = zt, c.events = {
141
+ }, u = new WeakMap(), f = new WeakMap(), _ = new WeakMap(), g = new WeakMap(), k = new WeakMap(), x = new WeakMap(), y = new WeakMap(), m = new WeakMap(), n = l, (() => {
142
+ const t = typeof Symbol == "function" && Symbol.metadata ? Object.create(C[Symbol.metadata] ?? null) : void 0;
143
+ z = [h(), v({ attribute: "type" })], w = [h(), v({ attribute: "state" })], L = [v({ attribute: "propertyIds", type: Array })], A = [h(), v({ attribute: "text" })], F = [h(), v({ attribute: "deck-index", type: Number })], B = [h(), v({ attribute: "coach-index", type: Number })], M = [h(), v({ attribute: "prevent-click", type: Boolean })], G = [h(), v({ attribute: "keyfocus" })], d(l, null, z, { kind: "accessor", name: "placeType", static: !1, private: !1, access: { has: (e) => "placeType" in e, get: (e) => e.placeType, set: (e, s) => {
144
+ e.placeType = s;
145
+ } }, metadata: t }, T, S), d(l, null, w, { kind: "accessor", name: "state", static: !1, private: !1, access: { has: (e) => "state" in e, get: (e) => e.state, set: (e, s) => {
146
+ e.state = s;
147
+ } }, metadata: t }, P, R), d(l, null, L, { kind: "accessor", name: "propertyIds", static: !1, private: !1, access: { has: (e) => "propertyIds" in e, get: (e) => e.propertyIds, set: (e, s) => {
148
+ e.propertyIds = s;
149
+ } }, metadata: t }, $, D), d(l, null, A, { kind: "accessor", name: "text", static: !1, private: !1, access: { has: (e) => "text" in e, get: (e) => e.text, set: (e, s) => {
150
+ e.text = s;
151
+ } }, metadata: t }, N, O), d(l, null, F, { kind: "accessor", name: "deckIndex", static: !1, private: !1, access: { has: (e) => "deckIndex" in e, get: (e) => e.deckIndex, set: (e, s) => {
152
+ e.deckIndex = s;
153
+ } }, metadata: t }, V, j), d(l, null, B, { kind: "accessor", name: "coachIndex", static: !1, private: !1, access: { has: (e) => "coachIndex" in e, get: (e) => e.coachIndex, set: (e, s) => {
154
+ e.coachIndex = s;
155
+ } }, metadata: t }, U, K), d(l, null, M, { kind: "accessor", name: "preventClick", static: !1, private: !1, access: { has: (e) => "preventClick" in e, get: (e) => e.preventClick, set: (e, s) => {
156
+ e.preventClick = s;
157
+ } }, metadata: t }, Y, q), d(l, null, G, { kind: "accessor", name: "keyfocus", static: !1, private: !1, access: { has: (e) => "keyfocus" in e, get: (e) => e.keyfocus, set: (e, s) => {
158
+ e.keyfocus = s;
159
+ } }, metadata: t }, H, J), d(null, o = { value: n }, r, { kind: "class", name: n.name, metadata: t }, null, i), n = o.value, t && Object.defineProperty(n, Symbol.metadata, { enumerable: !0, configurable: !0, writable: !0, value: t });
160
+ })(), l.styles = pe, l.events = {
198
161
  selectplace: "selectplace"
199
- }, r(v, i), v;
162
+ }, c(n, i), n;
200
163
  })();
201
164
  export {
202
- Nt as SbbSeatReservationPlaceControlElement
165
+ Ie as SbbSeatReservationPlaceControlElement
203
166
  };
@@ -1,13 +1,13 @@
1
1
  import { __esDecorate as i, __runInitializers as c } from "tslib";
2
2
  import { css as n, LitElement as b, html as m } from "lit";
3
3
  import { customElement as d } from "lit/decorators.js";
4
- const p = n`*,:before,:after{box-sizing:border-box}:host{--sbb-seat-reservation-scoped-width: 0;--sbb-seat-reservation-scoped-height: 0;display:block}:host .scoped-element{width:calc(var(--sbb-seat-reservation-scoped-width) * var(--sbb-seat-reservation-one-px-rem, .0625rem));height:calc(var(--sbb-seat-reservation-scoped-height) * var(--sbb-seat-reservation-one-px-rem, .0625rem))}`;
4
+ const p = n`*,:before,:after{box-sizing:border-box}:host{--sbb-seat-reservation-scoped-width: 0;--sbb-seat-reservation-scoped-height: 0;display:block;width:calc(var(--sbb-seat-reservation-scoped-width) * var(--sbb-seat-reservation-one-px-rem, .0625rem));height:calc(var(--sbb-seat-reservation-scoped-height) * var(--sbb-seat-reservation-one-px-rem, .0625rem))}`;
5
5
  let f = (() => {
6
6
  var t;
7
7
  let l = [d("sbb-seat-reservation-scoped")], a, r = [], e, o = b;
8
8
  return t = class extends o {
9
9
  render() {
10
- return m`<div class="scoped-element"><slot></slot></div>`;
10
+ return m`<slot></slot>`;
11
11
  }
12
12
  }, e = t, (() => {
13
13
  const s = typeof Symbol == "function" && Symbol.metadata ? Object.create(o[Symbol.metadata] ?? null) : void 0;