@sbb-esta/lyne-elements-experimental 2.10.1 → 2.11.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 (166) hide show
  1. package/custom-elements.json +4357 -0
  2. package/development/seat-reservation/common/mapper/icon-mapper.d.ts +112 -0
  3. package/development/seat-reservation/common/mapper/icon-mapper.d.ts.map +1 -0
  4. package/development/seat-reservation/common/mapper/icon-mapper.js +72 -0
  5. package/development/seat-reservation/common/mapper/mapper.d.ts +29 -0
  6. package/development/seat-reservation/common/mapper/mapper.d.ts.map +1 -0
  7. package/development/seat-reservation/common/mapper/mapper.js +117 -0
  8. package/development/seat-reservation/common/mapper/seat-reservation-sample-data.d.ts +225 -0
  9. package/development/seat-reservation/common/mapper/seat-reservation-sample-data.d.ts.map +1 -0
  10. package/development/seat-reservation/common/mapper/seat-reservation-sample-data.js +6152 -0
  11. package/development/seat-reservation/common/mapper.d.ts +3 -0
  12. package/development/seat-reservation/common/mapper.d.ts.map +1 -0
  13. package/development/seat-reservation/common/mapper.js +10 -0
  14. package/development/seat-reservation/common/svgs.d.ts +25 -0
  15. package/development/seat-reservation/common/svgs.d.ts.map +1 -0
  16. package/development/seat-reservation/common/svgs.js +48 -0
  17. package/development/seat-reservation/common/translations/i18n.d.ts +19 -0
  18. package/development/seat-reservation/common/translations/i18n.d.ts.map +1 -0
  19. package/development/seat-reservation/common/translations/i18n.js +462 -0
  20. package/development/seat-reservation/common/translations.d.ts +2 -0
  21. package/development/seat-reservation/common/translations.d.ts.map +1 -0
  22. package/development/seat-reservation/common/translations.js +5 -0
  23. package/development/seat-reservation/common/types.d.ts +71 -0
  24. package/development/seat-reservation/common/types.d.ts.map +1 -0
  25. package/development/seat-reservation/common/types.js +2 -0
  26. package/development/seat-reservation/common.d.ts +8 -0
  27. package/development/seat-reservation/common.d.ts.map +1 -0
  28. package/development/seat-reservation/common.js +14 -0
  29. package/development/seat-reservation/seat-reservation/seat-reservation-base-element.d.ts +157 -0
  30. package/development/seat-reservation/seat-reservation/seat-reservation-base-element.d.ts.map +1 -0
  31. package/development/seat-reservation/seat-reservation/seat-reservation-base-element.js +706 -0
  32. package/development/seat-reservation/seat-reservation/seat-reservation-scoped/seat-reservation-scoped.component.d.ts +29 -0
  33. package/development/seat-reservation/seat-reservation/seat-reservation-scoped/seat-reservation-scoped.component.d.ts.map +1 -0
  34. package/development/seat-reservation/seat-reservation/seat-reservation-scoped/seat-reservation-scoped.component.js +196 -0
  35. package/development/seat-reservation/seat-reservation/seat-reservation-scoped.d.ts +5 -0
  36. package/development/seat-reservation/seat-reservation/seat-reservation-scoped.d.ts.map +1 -0
  37. package/development/seat-reservation/seat-reservation/seat-reservation-scoped.js +5 -0
  38. package/development/seat-reservation/seat-reservation/seat-reservation.component.d.ts +62 -0
  39. package/development/seat-reservation/seat-reservation/seat-reservation.component.d.ts.map +1 -0
  40. package/development/seat-reservation/seat-reservation/seat-reservation.component.js +615 -0
  41. package/development/seat-reservation/seat-reservation-area/seat-reservation-area.component.d.ts +18 -0
  42. package/development/seat-reservation/seat-reservation-area/seat-reservation-area.component.d.ts.map +1 -0
  43. package/development/seat-reservation/seat-reservation-area/seat-reservation-area.component.js +108 -0
  44. package/development/seat-reservation/seat-reservation-area.d.ts +5 -0
  45. package/development/seat-reservation/seat-reservation-area.d.ts.map +1 -0
  46. package/development/seat-reservation/seat-reservation-area.js +5 -0
  47. package/development/seat-reservation/seat-reservation-graphic/seat-reservation-assets.d.ts +9 -0
  48. package/development/seat-reservation/seat-reservation-graphic/seat-reservation-assets.d.ts.map +1 -0
  49. package/development/seat-reservation/seat-reservation-graphic/seat-reservation-assets.js +326 -0
  50. package/development/seat-reservation/seat-reservation-graphic/seat-reservation-graphic.component.d.ts +29 -0
  51. package/development/seat-reservation/seat-reservation-graphic/seat-reservation-graphic.component.d.ts.map +1 -0
  52. package/development/seat-reservation/seat-reservation-graphic/seat-reservation-graphic.component.js +224 -0
  53. package/development/seat-reservation/seat-reservation-graphic.d.ts +5 -0
  54. package/development/seat-reservation/seat-reservation-graphic.d.ts.map +1 -0
  55. package/development/seat-reservation/seat-reservation-graphic.js +5 -0
  56. package/development/seat-reservation/seat-reservation-navigation/seat-reservation-navigation-coach/seat-reservation-navigation-coach.component.d.ts +66 -0
  57. package/development/seat-reservation/seat-reservation-navigation/seat-reservation-navigation-coach/seat-reservation-navigation-coach.component.d.ts.map +1 -0
  58. package/development/seat-reservation/seat-reservation-navigation/seat-reservation-navigation-coach/seat-reservation-navigation-coach.component.js +576 -0
  59. package/development/seat-reservation/seat-reservation-navigation/seat-reservation-navigation-coach.d.ts +5 -0
  60. package/development/seat-reservation/seat-reservation-navigation/seat-reservation-navigation-coach.d.ts.map +1 -0
  61. package/development/seat-reservation/seat-reservation-navigation/seat-reservation-navigation-coach.js +5 -0
  62. package/development/seat-reservation/seat-reservation-navigation/seat-reservation-navigation-services/seat-reservation-navigation-services.component.d.ts +21 -0
  63. package/development/seat-reservation/seat-reservation-navigation/seat-reservation-navigation-services/seat-reservation-navigation-services.component.d.ts.map +1 -0
  64. package/development/seat-reservation/seat-reservation-navigation/seat-reservation-navigation-services/seat-reservation-navigation-services.component.js +123 -0
  65. package/development/seat-reservation/seat-reservation-navigation/seat-reservation-navigation-services.d.ts +5 -0
  66. package/development/seat-reservation/seat-reservation-navigation/seat-reservation-navigation-services.d.ts.map +1 -0
  67. package/development/seat-reservation/seat-reservation-navigation/seat-reservation-navigation-services.js +5 -0
  68. package/development/seat-reservation/seat-reservation-navigation.d.ts +6 -0
  69. package/development/seat-reservation/seat-reservation-navigation.d.ts.map +1 -0
  70. package/development/seat-reservation/seat-reservation-navigation.js +7 -0
  71. package/development/seat-reservation/seat-reservation-place-control/seat-reservation-place-control.component.d.ts +53 -0
  72. package/development/seat-reservation/seat-reservation-place-control/seat-reservation-place-control.component.d.ts.map +1 -0
  73. package/development/seat-reservation/seat-reservation-place-control/seat-reservation-place-control.component.js +446 -0
  74. package/development/seat-reservation/seat-reservation-place-control.d.ts +5 -0
  75. package/development/seat-reservation/seat-reservation-place-control.d.ts.map +1 -0
  76. package/development/seat-reservation/seat-reservation-place-control.js +5 -0
  77. package/development/seat-reservation/seat-reservation.d.ts +7 -0
  78. package/development/seat-reservation/seat-reservation.d.ts.map +1 -0
  79. package/development/seat-reservation/seat-reservation.js +9 -0
  80. package/development/seat-reservation.d.ts +10 -0
  81. package/development/seat-reservation.d.ts.map +1 -0
  82. package/development/seat-reservation.js +30 -0
  83. package/index.d.ts +14 -0
  84. package/index.js +14 -0
  85. package/package.json +52 -2
  86. package/seat-reservation/common/mapper/icon-mapper.d.ts +112 -0
  87. package/seat-reservation/common/mapper/icon-mapper.d.ts.map +1 -0
  88. package/seat-reservation/common/mapper/icon-mapper.js +71 -0
  89. package/seat-reservation/common/mapper/mapper.d.ts +29 -0
  90. package/seat-reservation/common/mapper/mapper.d.ts.map +1 -0
  91. package/seat-reservation/common/mapper/mapper.js +87 -0
  92. package/seat-reservation/common/mapper/seat-reservation-sample-data.d.ts +225 -0
  93. package/seat-reservation/common/mapper/seat-reservation-sample-data.d.ts.map +1 -0
  94. package/seat-reservation/common/mapper/seat-reservation-sample-data.js +6149 -0
  95. package/seat-reservation/common/mapper.d.ts +3 -0
  96. package/seat-reservation/common/mapper.d.ts.map +1 -0
  97. package/seat-reservation/common/mapper.js +9 -0
  98. package/seat-reservation/common/svgs.d.ts +25 -0
  99. package/seat-reservation/common/svgs.d.ts.map +1 -0
  100. package/seat-reservation/common/svgs.js +250 -0
  101. package/seat-reservation/common/translations/i18n.d.ts +19 -0
  102. package/seat-reservation/common/translations/i18n.d.ts.map +1 -0
  103. package/seat-reservation/common/translations/i18n.js +460 -0
  104. package/seat-reservation/common/translations.d.ts +2 -0
  105. package/seat-reservation/common/translations.d.ts.map +1 -0
  106. package/seat-reservation/common/translations.js +4 -0
  107. package/seat-reservation/common/types.d.ts +71 -0
  108. package/seat-reservation/common/types.d.ts.map +1 -0
  109. package/seat-reservation/common/types.js +1 -0
  110. package/seat-reservation/common.d.ts +8 -0
  111. package/seat-reservation/common.d.ts.map +1 -0
  112. package/seat-reservation/common.js +13 -0
  113. package/seat-reservation/seat-reservation/seat-reservation-base-element.d.ts +157 -0
  114. package/seat-reservation/seat-reservation/seat-reservation-base-element.d.ts.map +1 -0
  115. package/seat-reservation/seat-reservation/seat-reservation-base-element.js +435 -0
  116. package/seat-reservation/seat-reservation/seat-reservation-scoped/seat-reservation-scoped.component.d.ts +29 -0
  117. package/seat-reservation/seat-reservation/seat-reservation-scoped/seat-reservation-scoped.component.d.ts.map +1 -0
  118. package/seat-reservation/seat-reservation/seat-reservation-scoped/seat-reservation-scoped.component.js +107 -0
  119. package/seat-reservation/seat-reservation/seat-reservation-scoped.d.ts +5 -0
  120. package/seat-reservation/seat-reservation/seat-reservation-scoped.d.ts.map +1 -0
  121. package/seat-reservation/seat-reservation/seat-reservation-scoped.js +4 -0
  122. package/seat-reservation/seat-reservation/seat-reservation.component.d.ts +62 -0
  123. package/seat-reservation/seat-reservation/seat-reservation.component.d.ts.map +1 -0
  124. package/seat-reservation/seat-reservation/seat-reservation.component.js +404 -0
  125. package/seat-reservation/seat-reservation-area/seat-reservation-area.component.d.ts +18 -0
  126. package/seat-reservation/seat-reservation-area/seat-reservation-area.component.d.ts.map +1 -0
  127. package/seat-reservation/seat-reservation-area/seat-reservation-area.component.js +49 -0
  128. package/seat-reservation/seat-reservation-area.d.ts +5 -0
  129. package/seat-reservation/seat-reservation-area.d.ts.map +1 -0
  130. package/seat-reservation/seat-reservation-area.js +4 -0
  131. package/seat-reservation/seat-reservation-graphic/seat-reservation-assets.d.ts +9 -0
  132. package/seat-reservation/seat-reservation-graphic/seat-reservation-assets.d.ts.map +1 -0
  133. package/seat-reservation/seat-reservation-graphic/seat-reservation-assets.js +317 -0
  134. package/seat-reservation/seat-reservation-graphic/seat-reservation-graphic.component.d.ts +29 -0
  135. package/seat-reservation/seat-reservation-graphic/seat-reservation-graphic.component.d.ts.map +1 -0
  136. package/seat-reservation/seat-reservation-graphic/seat-reservation-graphic.component.js +113 -0
  137. package/seat-reservation/seat-reservation-graphic.d.ts +5 -0
  138. package/seat-reservation/seat-reservation-graphic.d.ts.map +1 -0
  139. package/seat-reservation/seat-reservation-graphic.js +4 -0
  140. package/seat-reservation/seat-reservation-navigation/seat-reservation-navigation-coach/seat-reservation-navigation-coach.component.d.ts +66 -0
  141. package/seat-reservation/seat-reservation-navigation/seat-reservation-navigation-coach/seat-reservation-navigation-coach.component.d.ts.map +1 -0
  142. package/seat-reservation/seat-reservation-navigation/seat-reservation-navigation-coach/seat-reservation-navigation-coach.component.js +248 -0
  143. package/seat-reservation/seat-reservation-navigation/seat-reservation-navigation-coach.d.ts +5 -0
  144. package/seat-reservation/seat-reservation-navigation/seat-reservation-navigation-coach.d.ts.map +1 -0
  145. package/seat-reservation/seat-reservation-navigation/seat-reservation-navigation-coach.js +4 -0
  146. package/seat-reservation/seat-reservation-navigation/seat-reservation-navigation-services/seat-reservation-navigation-services.component.d.ts +21 -0
  147. package/seat-reservation/seat-reservation-navigation/seat-reservation-navigation-services/seat-reservation-navigation-services.component.d.ts.map +1 -0
  148. package/seat-reservation/seat-reservation-navigation/seat-reservation-navigation-services/seat-reservation-navigation-services.component.js +80 -0
  149. package/seat-reservation/seat-reservation-navigation/seat-reservation-navigation-services.d.ts +5 -0
  150. package/seat-reservation/seat-reservation-navigation/seat-reservation-navigation-services.d.ts.map +1 -0
  151. package/seat-reservation/seat-reservation-navigation/seat-reservation-navigation-services.js +4 -0
  152. package/seat-reservation/seat-reservation-navigation.d.ts +6 -0
  153. package/seat-reservation/seat-reservation-navigation.d.ts.map +1 -0
  154. package/seat-reservation/seat-reservation-navigation.js +6 -0
  155. package/seat-reservation/seat-reservation-place-control/seat-reservation-place-control.component.d.ts +53 -0
  156. package/seat-reservation/seat-reservation-place-control/seat-reservation-place-control.component.d.ts.map +1 -0
  157. package/seat-reservation/seat-reservation-place-control/seat-reservation-place-control.component.js +190 -0
  158. package/seat-reservation/seat-reservation-place-control.d.ts +5 -0
  159. package/seat-reservation/seat-reservation-place-control.d.ts.map +1 -0
  160. package/seat-reservation/seat-reservation-place-control.js +4 -0
  161. package/seat-reservation/seat-reservation.d.ts +7 -0
  162. package/seat-reservation/seat-reservation.d.ts.map +1 -0
  163. package/seat-reservation/seat-reservation.js +8 -0
  164. package/seat-reservation.d.ts +10 -0
  165. package/seat-reservation.d.ts.map +1 -0
  166. package/seat-reservation.js +29 -0
@@ -0,0 +1,107 @@
1
+ var N = (s) => {
2
+ throw TypeError(s);
3
+ };
4
+ var Q = (s, a, n) => a.has(s) || N("Cannot " + n);
5
+ var o = (s, a, n) => (Q(s, a, "read from private field"), n ? n.call(s) : a.get(s)), h = (s, a, n) => a.has(s) ? N("Cannot add the same private member more than once") : a instanceof WeakSet ? a.add(s) : a.set(s, n), d = (s, a, n, c) => (Q(s, a, "write to private field"), c ? c.call(s, n) : a.set(s, n), n);
6
+ import { __esDecorate as _, __runInitializers as r } from "tslib";
7
+ import { forceType as p } from "@sbb-esta/lyne-elements/core/decorators.js";
8
+ import { css as W, LitElement as X, html as V } from "lit";
9
+ import { customElement as Y, property as b } from "lit/decorators.js";
10
+ const Z = W`*,:before,:after{box-sizing:border-box}:host{display:block}:host .coach-border,:host .coach-wrapper,:host .graphical-element{width:var(--sbb-seat-reservation-scoped-width);height:var(--sbb-seat-reservation-scoped-height);inset-block-start:var(--sbb-seat-reservation-scoped-inset-block-start);inset-inline-start:var(--sbb-seat-reservation-scoped-inset-inline-start);z-index:var(--sbb-seat-reservation-scoped-z-index)}:host .coach-border,:host .graphical-element ::slotted(*),:host .graphical-element{position:absolute}:host .coach-border{z-index:0}`;
11
+ let lt = (() => {
12
+ var I, u, m, g, z, f, S, l;
13
+ let s = [Y("sbb-seat-reservation-scoped")], a, n = [], c, v = X, x, k = [], y = [], w, B = [], C = [], $, E = [], D = [], j, O = [], T = [], U, L = [], P = [], R, q = [], A = [], F, G = [], H = [];
14
+ return l = class extends v {
15
+ constructor() {
16
+ super(...arguments);
17
+ h(this, I, r(this, k, ""));
18
+ h(this, u, (r(this, y), r(this, B, "")));
19
+ h(this, m, (r(this, C), r(this, E, "")));
20
+ h(this, g, (r(this, D), r(this, O, "")));
21
+ h(this, z, (r(this, T), r(this, L, "")));
22
+ h(this, f, (r(this, P), r(this, q, "")));
23
+ h(this, S, (r(this, A), r(this, G, "")));
24
+ r(this, H);
25
+ }
26
+ /** Inset block start in pixels (without unit) */
27
+ get insetBlockStart() {
28
+ return o(this, I);
29
+ }
30
+ set insetBlockStart(e) {
31
+ d(this, I, e);
32
+ }
33
+ /** Inset inline start in pixels (without unit) */
34
+ get insetInlineStart() {
35
+ return o(this, u);
36
+ }
37
+ set insetInlineStart(e) {
38
+ d(this, u, e);
39
+ }
40
+ /** Width of the scoped element in pixels (without unit) */
41
+ get width() {
42
+ return o(this, m);
43
+ }
44
+ set width(e) {
45
+ d(this, m, e);
46
+ }
47
+ /** Height of the scoped element in pixels (without unit) */
48
+ get height() {
49
+ return o(this, g);
50
+ }
51
+ set height(e) {
52
+ d(this, g, e);
53
+ }
54
+ /** Z-index of the scoped element */
55
+ get zIndex() {
56
+ return o(this, z);
57
+ }
58
+ set zIndex(e) {
59
+ d(this, z, e);
60
+ }
61
+ /** Cell id of the scoped element, if it is used in a table */
62
+ get cellId() {
63
+ return o(this, f);
64
+ }
65
+ set cellId(e) {
66
+ d(this, f, e);
67
+ }
68
+ /** Scoped classes for the scoped element */
69
+ get scopedClasses() {
70
+ return o(this, S);
71
+ }
72
+ set scopedClasses(e) {
73
+ d(this, S, e);
74
+ }
75
+ willUpdate(e) {
76
+ var t, i, J, K, M;
77
+ super.willUpdate(e), e.has("width") && ((t = this.style) == null || t.setProperty("--sbb-seat-reservation-scoped-width", `${this.width}`)), e.has("height") && ((i = this.style) == null || i.setProperty("--sbb-seat-reservation-scoped-height", `${this.height}`)), e.has("insetBlockStart") && ((J = this.style) == null || J.setProperty("--sbb-seat-reservation-scoped-inset-block-start", `${this.insetBlockStart}`)), e.has("insetInlineStart") && ((K = this.style) == null || K.setProperty("--sbb-seat-reservation-scoped-inset-inline-start", `${this.insetInlineStart}`)), e.has("zIndex") && ((M = this.style) == null || M.setProperty("--sbb-seat-reservation-scoped-z-index", `${this.zIndex}`));
78
+ }
79
+ render() {
80
+ return this.cellId ? V`<td id="${this.cellId}" class="${this.scopedClasses}">
81
+ <slot></slot>
82
+ </td>` : V`<div class="${this.scopedClasses}">
83
+ <slot></slot>
84
+ </div>`;
85
+ }
86
+ }, I = new WeakMap(), u = new WeakMap(), m = new WeakMap(), g = new WeakMap(), z = new WeakMap(), f = new WeakMap(), S = new WeakMap(), c = l, (() => {
87
+ const e = typeof Symbol == "function" && Symbol.metadata ? Object.create(v[Symbol.metadata] ?? null) : void 0;
88
+ x = [p(), b({ attribute: "inset-block-start" })], w = [p(), b({ attribute: "inset-inline-start" })], $ = [p(), b({ attribute: "width" })], j = [p(), b({ attribute: "height" })], U = [p(), b({ attribute: "z-index" })], R = [p(), b({ attribute: "cell-id" })], F = [p(), b({ attribute: "scoped-classes" })], _(l, null, x, { kind: "accessor", name: "insetBlockStart", static: !1, private: !1, access: { has: (t) => "insetBlockStart" in t, get: (t) => t.insetBlockStart, set: (t, i) => {
89
+ t.insetBlockStart = i;
90
+ } }, metadata: e }, k, y), _(l, null, w, { kind: "accessor", name: "insetInlineStart", static: !1, private: !1, access: { has: (t) => "insetInlineStart" in t, get: (t) => t.insetInlineStart, set: (t, i) => {
91
+ t.insetInlineStart = i;
92
+ } }, metadata: e }, B, C), _(l, null, $, { kind: "accessor", name: "width", static: !1, private: !1, access: { has: (t) => "width" in t, get: (t) => t.width, set: (t, i) => {
93
+ t.width = i;
94
+ } }, metadata: e }, E, D), _(l, null, j, { kind: "accessor", name: "height", static: !1, private: !1, access: { has: (t) => "height" in t, get: (t) => t.height, set: (t, i) => {
95
+ t.height = i;
96
+ } }, metadata: e }, O, T), _(l, null, U, { kind: "accessor", name: "zIndex", static: !1, private: !1, access: { has: (t) => "zIndex" in t, get: (t) => t.zIndex, set: (t, i) => {
97
+ t.zIndex = i;
98
+ } }, metadata: e }, L, P), _(l, null, R, { kind: "accessor", name: "cellId", static: !1, private: !1, access: { has: (t) => "cellId" in t, get: (t) => t.cellId, set: (t, i) => {
99
+ t.cellId = i;
100
+ } }, metadata: e }, q, A), _(l, null, F, { kind: "accessor", name: "scopedClasses", static: !1, private: !1, access: { has: (t) => "scopedClasses" in t, get: (t) => t.scopedClasses, set: (t, i) => {
101
+ t.scopedClasses = i;
102
+ } }, metadata: e }, G, H), _(null, a = { value: c }, s, { kind: "class", name: c.name, metadata: e }, null, n), c = a.value, e && Object.defineProperty(c, Symbol.metadata, { enumerable: !0, configurable: !0, writable: !0, value: e });
103
+ })(), l.styles = Z, r(c, n), c;
104
+ })();
105
+ export {
106
+ lt as SbbSeatReservationScopedElement
107
+ };
@@ -0,0 +1,5 @@
1
+ /**
2
+ * @entrypoint
3
+ */
4
+ export * from './seat-reservation-scoped/seat-reservation-scoped.component.js';
5
+ //# sourceMappingURL=seat-reservation-scoped.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"seat-reservation-scoped.d.ts","sourceRoot":"","sources":["../../../../src/elements-experimental/seat-reservation/seat-reservation/seat-reservation-scoped.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,cAAc,gEAAgE,CAAC"}
@@ -0,0 +1,4 @@
1
+ import { SbbSeatReservationScopedElement as t } from "./seat-reservation-scoped/seat-reservation-scoped.component.js";
2
+ export {
3
+ t as SbbSeatReservationScopedElement
4
+ };
@@ -0,0 +1,62 @@
1
+ import { CSSResultGroup, PropertyValues, TemplateResult } from 'lit';
2
+ import { SeatReservation } from '../common.js';
3
+ import { SeatReservationBaseElement } from './seat-reservation-base-element.js';
4
+ /**
5
+ * Describe the purpose of the component with a single short sentence.
6
+ *
7
+ * @event {CustomEvent<SeatReservationSelectedPlacesEventDetails>} selectedPlaces - Emits when a place was selected and returns a Place array with all selected places
8
+ * @event {CustomEvent<SeatReservationCoachSelection>} selectedCoach - Emits when a coach was selected and returns a CoachSelection
9
+ */
10
+ export declare class SbbSeatReservationElement extends SeatReservationBaseElement {
11
+ static styles: CSSResultGroup;
12
+ /** The seat reservation object which contains all coaches and places */
13
+ accessor seatReservation: SeatReservation;
14
+ /** The seat reservation navigation can be toggled by this property */
15
+ accessor hasNavigation: boolean;
16
+ /** Controls the visual representation of seat reservation in a horizonal or vertical alignment */
17
+ accessor alignVertical: boolean;
18
+ /** Maximal number of possible clickable seats */
19
+ accessor maxReservations: number;
20
+ /** Any click functionality is prevented */
21
+ accessor preventPlaceClick: boolean;
22
+ private _language;
23
+ private _coachesHtmlTemplate?;
24
+ private _notAreaElements;
25
+ private _notFixedRotatableAreaIcons;
26
+ protected willUpdate(changedProperties: PropertyValues<this>): void;
27
+ protected firstUpdated(changedProperties: PropertyValues<this>): void;
28
+ protected render(): TemplateResult | null;
29
+ private _componentSetup;
30
+ private _initVehicleSeatReservationConstruction;
31
+ private _renderNavigation;
32
+ /**
33
+ *
34
+ * @param coaches
35
+ * @returns
36
+ */
37
+ private _renderCoaches;
38
+ private _renderCoachElement;
39
+ private _getRenderedCoachBorders;
40
+ private _getRenderedRowPlaces;
41
+ private _getRenderedColumnPlaces;
42
+ private _getRenderedGraphicalElements;
43
+ private _getRenderElementWithArea;
44
+ private _getRenderElementWithoutArea;
45
+ private _getRenderedServiceElements;
46
+ /**
47
+ * Manages the selected place event triggered from the place
48
+ * Each selection emits an array of all selected places
49
+ * @param selectPlaceEvent
50
+ */
51
+ private _onSelectPlace;
52
+ private _onSelectNavCoach;
53
+ private _onFocusNavCoach;
54
+ private _getDescriptionTableCoach;
55
+ private _getTitleDescriptionListString;
56
+ }
57
+ declare global {
58
+ interface HTMLElementTagNameMap {
59
+ 'sbb-seat-reservation': SbbSeatReservationElement;
60
+ }
61
+ }
62
+ //# sourceMappingURL=seat-reservation.component.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"seat-reservation.component.d.ts","sourceRoot":"","sources":["../../../../src/elements-experimental/seat-reservation/seat-reservation/seat-reservation.component.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,cAAc,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,KAAK,CAAC;AAM1E,OAAO,KAAK,EAMV,eAAe,EAChB,MAAM,cAAc,CAAC;AAEtB,OAAO,EAAE,0BAA0B,EAAE,MAAM,oCAAoC,CAAC;AAGhF,OAAO,+CAA+C,CAAC;AACvD,OAAO,6BAA6B,CAAC;AACrC,OAAO,gCAAgC,CAAC;AACxC,OAAO,sCAAsC,CAAC;AAC9C,OAAO,qEAAqE,CAAC;AAC7E,OAAO,8BAA8B,CAAC;AAEtC;;;;;GAKG;AACH,qBAEM,yBAA0B,SAAQ,0BAA0B;IAChE,OAAuB,MAAM,EAAE,cAAc,CAAS;IAEtD,wEAAwE;IACxE,SACyB,eAAe,EAAE,eAAe,CAAS;IAElE,sEAAsE;IACtE,SAEyB,aAAa,EAAE,OAAO,CAAQ;IAEvD,kGAAkG;IAClG,SAEyB,aAAa,EAAE,OAAO,CAAS;IAExD,iDAAiD;IACjD,SAEyB,eAAe,EAAE,MAAM,CAAS;IAEzD,2CAA2C;IAC3C,SAEyB,iBAAiB,EAAE,OAAO,CAAS;IAE5D,OAAO,CAAC,SAAS,CAAmC;IACpD,OAAO,CAAC,oBAAoB,CAAC,CAAiB;IAE9C,OAAO,CAAC,gBAAgB,CAQtB;IAEF,OAAO,CAAC,2BAA2B,CAAkB;cAElC,UAAU,CAAC,iBAAiB,EAAE,cAAc,CAAC,IAAI,CAAC,GAAG,IAAI;cAgBzD,YAAY,CAAC,iBAAiB,EAAE,cAAc,CAAC,IAAI,CAAC,GAAG,IAAI;cAK3D,MAAM,IAAI,cAAc,GAAG,IAAI;IAKlD,OAAO,CAAC,eAAe;IAIvB,OAAO,CAAC,uCAAuC;IAwC/C,OAAO,CAAC,iBAAiB;IAqCzB;;;;OAIG;IACH,OAAO,CAAC,cAAc;IAWtB,OAAO,CAAC,mBAAmB;IA0B3B,OAAO,CAAC,wBAAwB;IA+BhC,OAAO,CAAC,qBAAqB;IA0B7B,OAAO,CAAC,wBAAwB;IA2ChC,OAAO,CAAC,6BAA6B;IA0BrC,OAAO,CAAC,yBAAyB;IA2EjC,OAAO,CAAC,4BAA4B;IA0CpC,OAAO,CAAC,2BAA2B;IAyCnC;;;;OAIG;IACH,OAAO,CAAC,cAAc;IAYtB,OAAO,CAAC,iBAAiB;IAazB,OAAO,CAAC,gBAAgB;IASxB,OAAO,CAAC,yBAAyB;IAuBjC,OAAO,CAAC,8BAA8B;CAyBvC;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAE7B,sBAAsB,EAAE,yBAAyB,CAAC;KACnD;CACF"}
@@ -0,0 +1,404 @@
1
+ var q = (n) => {
2
+ throw TypeError(n);
3
+ };
4
+ var K = (n, o, c) => o.has(n) || q("Cannot " + c);
5
+ var R = (n, o, c) => (K(n, o, "read from private field"), c ? c.call(n) : o.get(n)), x = (n, o, c) => o.has(n) ? q("Cannot add the same private member more than once") : o instanceof WeakSet ? o.add(n) : o.set(n, c), b = (n, o, c, u) => (K(n, o, "write to private field"), u ? u.call(n, c) : o.set(n, c), c);
6
+ import { __runInitializers as p, __esDecorate as S } from "tslib";
7
+ import { SbbLanguageController as X } from "@sbb-esta/lyne-elements/core/controllers.js";
8
+ import { forceType as P } from "@sbb-esta/lyne-elements/core/decorators.js";
9
+ import { css as J, html as h, nothing as A } from "lit";
10
+ import { customElement as Y, property as y } from "lit/decorators.js";
11
+ import { classMap as Q } from "lit/directives/class-map.js";
12
+ import { styleMap as Z } from "lit/directives/style-map.js";
13
+ import { getI18nSeatReservation as _ } from "../common.js";
14
+ import { SeatReservationBaseElement as ee } from "./seat-reservation-base-element.js";
15
+ import "@sbb-esta/lyne-elements/screen-reader-only.js";
16
+ import "../seat-reservation-area.js";
17
+ import "../seat-reservation-graphic.js";
18
+ import "../seat-reservation-place-control.js";
19
+ import "../seat-reservation-navigation/seat-reservation-navigation-coach.js";
20
+ import "./seat-reservation-scoped/seat-reservation-scoped.component.js";
21
+ const te = J`*,:before,:after{box-sizing:border-box}:host{--sbb-seat-reservation-grid-size: 16px;--sbb-seat-reservation-vertical-offset: 0;display:block}:host ::part(coach-floor){fill:var(--sbb-color-white)}@media (forced-colors: active){:host ::part(coach-floor){fill:transparent}}.sbb-sr__wrapper--vertical{width:fit-content;position:relative;inset-inline-start:var(--sbb-seat-reservation-vertical-offset);rotate:90deg;transform-origin:top left}.sbb-sr__wrapper--vertical .sbb-sr__parent{overflow-y:hidden}.sbb-sr__wrapper--vertical .sbb-sr__list-coaches{width:100vw}.sbb-sr-navigation--vertical{inset-inline-start:var(--sbb-seat-reservation-vertical-offset);margin-inline-start:1.25rem;position:absolute}.sbb-sr-navigation--vertical .sbb-sr-navigation__list-coaches{flex-direction:column}.sbb-sr-navigation__list-coaches{list-style:none;margin:0;padding:0;font-size:inherit;display:flex;justify-content:center;flex-wrap:nowrap;gap:var(--sbb-spacing-fixed-1x);min-height:3.75rem}.sbb-sr__parent{overflow-x:scroll;padding:3rem 0}.sbb-sr__list-coaches{display:flex;gap:.25rem;padding:0;margin:0;list-style:none}.sbb-sr__item-coach{padding:0;margin:0;position:relative}.sbb-sr-coach-wrapper__table{outline:0}`;
22
+ let me = (() => {
23
+ var g, f, m, $, C, d;
24
+ let n = [Y("sbb-seat-reservation")], o, c = [], u, N = ee, T, z = [], O = [], k, D = [], G = [], I, V = [], E = [], B, L = [], F = [], M, H = [], W = [];
25
+ return d = class extends N {
26
+ constructor() {
27
+ super(...arguments);
28
+ x(this, g);
29
+ x(this, f);
30
+ x(this, m);
31
+ x(this, $);
32
+ x(this, C);
33
+ b(this, g, p(this, z, null)), b(this, f, (p(this, O), p(this, D, !0))), b(this, m, (p(this, G), p(this, V, !1))), b(this, $, (p(this, E), p(this, L, null))), b(this, C, (p(this, F), p(this, H, !1))), this._language = (p(this, W), new X(this)), this._notAreaElements = [
34
+ "DRIVER_AREA_FULL",
35
+ "COACH_PASSAGE",
36
+ "COACH_WALL_NO_PASSAGE",
37
+ "COMPARTMENT_PASSAGE",
38
+ "COMPARTMENT_PASSAGE_HIGH",
39
+ "COMPARTMENT_PASSAGE_MIDDLE",
40
+ "COMPARTMENT_PASSAGE_LOW"
41
+ ], this._notFixedRotatableAreaIcons = ["ENTRY_EXIT"];
42
+ }
43
+ /** The seat reservation object which contains all coaches and places */
44
+ get seatReservation() {
45
+ return R(this, g);
46
+ }
47
+ set seatReservation(e) {
48
+ b(this, g, e);
49
+ }
50
+ /** The seat reservation navigation can be toggled by this property */
51
+ get hasNavigation() {
52
+ return R(this, f);
53
+ }
54
+ set hasNavigation(e) {
55
+ b(this, f, e);
56
+ }
57
+ /** Controls the visual representation of seat reservation in a horizonal or vertical alignment */
58
+ get alignVertical() {
59
+ return R(this, m);
60
+ }
61
+ set alignVertical(e) {
62
+ b(this, m, e);
63
+ }
64
+ /** Maximal number of possible clickable seats */
65
+ get maxReservations() {
66
+ return R(this, $);
67
+ }
68
+ set maxReservations(e) {
69
+ b(this, $, e);
70
+ }
71
+ /** Any click functionality is prevented */
72
+ get preventPlaceClick() {
73
+ return R(this, C);
74
+ }
75
+ set preventPlaceClick(e) {
76
+ b(this, C, e);
77
+ }
78
+ willUpdate(e) {
79
+ var t, i;
80
+ super.willUpdate(e), e.has("hasNavigation") && (this.hasNavigation ? (t = this.shadowRoot) == null || t.querySelectorAll("table").forEach((s) => s.removeAttribute("tabindex")) : (i = this.shadowRoot) == null || i.querySelectorAll("table").forEach((s) => s.setAttribute("tabindex", "0")));
81
+ }
82
+ firstUpdated(e) {
83
+ super.firstUpdated(e), this._componentSetup();
84
+ }
85
+ render() {
86
+ return this._initVehicleSeatReservationConstruction(), this._coachesHtmlTemplate || null;
87
+ }
88
+ _componentSetup() {
89
+ this.initNavigationSelectionByScrollEvent();
90
+ }
91
+ _initVehicleSeatReservationConstruction() {
92
+ var i;
93
+ const e = JSON.parse(JSON.stringify((i = this.seatReservation) == null ? void 0 : i.coachItems)), t = this.alignVertical ? "sbb-sr__wrapper--vertical" : "";
94
+ this._coachesHtmlTemplate = h`
95
+ <div>
96
+ <sbb-screen-reader-only>
97
+ <input
98
+ id="first-tab-element"
99
+ role="contentinfo"
100
+ type="text"
101
+ aria-label="${_("SEAT_RESERVATION_BEGIN", this._language.current)}"
102
+ readonly
103
+ />
104
+ </sbb-screen-reader-only>
105
+
106
+ <div @keydown=${(s) => this.handleKeyboardEvent(s)}>
107
+ ${this._renderNavigation()}
108
+ <div class="sbb-sr__wrapper ${t}">
109
+ <div id="sbb-sr__parent-area" class="sbb-sr__parent" tabindex="-1">
110
+ <ul class="sbb-sr__list-coaches" role="presentation">
111
+ ${this._renderCoaches(e)}
112
+ </ul>
113
+ </div>
114
+ </div>
115
+ </div>
116
+
117
+ <sbb-screen-reader-only>
118
+ <input
119
+ id="last-tab-element"
120
+ role="contentinfo"
121
+ type="text"
122
+ aria-label="${_("SEAT_RESERVATION_END", this._language.current)}"
123
+ readonly
124
+ />
125
+ </sbb-screen-reader-only>
126
+ </div>
127
+ `;
128
+ }
129
+ _renderNavigation() {
130
+ var e;
131
+ return this.hasNavigation ? h`
132
+ <nav class="${Q({ "sbb-sr-navigation--vertical": this.alignVertical })}">
133
+ <ul
134
+ class="sbb-sr-navigation__list-coaches"
135
+ aria-label="${_("SEAT_RESERVATION_NAVIGATION", this._language.current)}"
136
+ >
137
+ ${(e = this.seatReservation) == null ? void 0 : e.coachItems.map((t, i) => {
138
+ var s, a;
139
+ return h`<li>
140
+ <sbb-seat-reservation-navigation-coach
141
+ @selectCoach=${(r) => this._onSelectNavCoach(r)}
142
+ @focusCoach=${() => this._onFocusNavCoach()}
143
+ index="${i}"
144
+ coach-id="${t.id}"
145
+ .selected=${this.selectedCoachIndex === i}
146
+ .focused=${this.focusedCoachIndex === i}
147
+ .propertyIds="${t.propertyIds}"
148
+ .travelClass="${t.travelClass}"
149
+ ?driver-area="${!((s = t.places) != null && s.length)}"
150
+ ?first="${i === 0}"
151
+ ?last="${i === ((a = this.seatReservation) == null ? void 0 : a.coachItems.length) - 1}"
152
+ ?vertical="${this.alignVertical}"
153
+ >
154
+ </sbb-seat-reservation-navigation-coach>
155
+ </li>`;
156
+ })}
157
+ </ul>
158
+ </nav>
159
+ ` : null;
160
+ }
161
+ /**
162
+ *
163
+ * @param coaches
164
+ * @returns
165
+ */
166
+ _renderCoaches(e) {
167
+ return e ? e.map((t, i) => h`
168
+ <li class="sbb-sr__item-coach">${this._renderCoachElement(t, i)}</li>
169
+ `) : null;
170
+ }
171
+ _renderCoachElement(e, t) {
172
+ const i = this.getCalculatedDimension(e.dimension), s = this._getDescriptionTableCoach(e);
173
+ return h` <sbb-seat-reservation-scoped
174
+ scoped-classes="coach-wrapper"
175
+ height="${i.h}px"
176
+ width="${i.w}px"
177
+ >
178
+ ${this._getRenderedCoachBorders(e, t)}
179
+ ${this._getRenderedGraphicalElements(e.graphicElements || [], e.dimension)}
180
+ ${this._getRenderedServiceElements(e.serviceElements)}
181
+ <table
182
+ @focus=${() => this.onFocusTableCoachAndPreselectPlace(t)}
183
+ id="sbb-sr-coach-${t}"
184
+ class="sbb-sr-coach-wrapper__table"
185
+ aria-describedby="sbb-sr-coach-caption-${t}"
186
+ >
187
+ <caption id="sbb-sr-coach-caption-${t}" tabindex="-1">
188
+ <sbb-screen-reader-only>${s}</sbb-screen-reader-only>
189
+ </caption>
190
+ ${this._getRenderedRowPlaces(e, t)}
191
+ </table>
192
+ </sbb-seat-reservation-scoped>`;
193
+ }
194
+ _getRenderedCoachBorders(e, t) {
195
+ const i = e.graphicElements, s = 1, a = i == null ? void 0 : i.find((v) => v.icon === "DRIVER_AREA_FULL"), r = a ? e.dimension.w - a.dimension.w - s : e.dimension.w - s * 2, l = t === 0 && a ? (a == null ? void 0 : a.dimension.w) * this.baseGridSize : this.baseGridSize;
196
+ return h`
197
+ <sbb-seat-reservation-scoped
198
+ scoped-classes="coach-border"
199
+ inset-block-start="${this.coachBorderPadding * -1}px"
200
+ inset-inline-start="${l}px"
201
+ >
202
+ <sbb-seat-reservation-graphic
203
+ name="COACH_BORDER_MIDDLE"
204
+ width=${r * this.baseGridSize}
205
+ height=${(e.dimension.h + this.coachBorderOffset * 2) * this.baseGridSize}
206
+ ?stretch=${!0}
207
+ role="presentation"
208
+ ></sbb-seat-reservation-graphic>
209
+ </sbb-seat-reservation-scoped>
210
+ `;
211
+ }
212
+ _getRenderedRowPlaces(e, t) {
213
+ if (!e.places)
214
+ return null;
215
+ const i = {};
216
+ for (const s of e.places)
217
+ i[s.position.y] ? i[s.position.y].push(s) : i[s.position.y] = [s];
218
+ return Object.values(i).map((s, a) => h`
219
+ <tr id="row-${t}-${s[0].position.y}" data-row-index=${a}>
220
+ ${this._getRenderedColumnPlaces(s, t)}
221
+ </tr>
222
+ `).flatMap((s) => s);
223
+ }
224
+ _getRenderedColumnPlaces(e, t) {
225
+ return e.sort((i, s) => Number(i.position.x) - Number(s.position.x)), e == null ? void 0 : e.map((i, s) => {
226
+ const a = this.getCalculatedDimension(i.dimension), r = this.getCalculatedPosition(i.position), l = this.alignVertical ? -90 : 0;
227
+ return h`
228
+ <sbb-seat-reservation-scoped
229
+ scoped-classes="graphical-element"
230
+ inset-block-start="${r.y}px"
231
+ inset-inline-start="${r.x}px"
232
+ width="${a.w}px"
233
+ height="${a.h}px"
234
+ z-index="${i.position.z}"
235
+ cell-id="cell-${t}-${i.position.y}-${s}"
236
+ >
237
+ <sbb-seat-reservation-place-control
238
+ @selectPlace=${(v) => this._onSelectPlace(v)}
239
+ exportparts="sbb-sr-place-part"
240
+ id="seat-reservation__place-button-${t}-${i.number}"
241
+ class="seat-reservation-place-control"
242
+ data-cell-id="${t}-${i.position.y}-${s}"
243
+ text=${i.number}
244
+ type=${i.type}
245
+ state=${i.state}
246
+ width=${i.dimension.w * this.baseGridSize}
247
+ height=${i.dimension.h * this.baseGridSize}
248
+ rotation=${i.rotation ?? A}
249
+ text-rotation=${l}
250
+ coach-index=${t}
251
+ .propertyIds=${i.propertyIds}
252
+ .preventClick=${this.preventPlaceClick}
253
+ ></sbb-seat-reservation-place-control>
254
+ </sbb-seat-reservation-scoped>
255
+ `;
256
+ });
257
+ }
258
+ _getRenderedGraphicalElements(e, t) {
259
+ return e ? e == null ? void 0 : e.map((i) => {
260
+ const s = i.icon ?? "", a = i.rotation || 0, r = this._notFixedRotatableAreaIcons.indexOf(i.icon) === -1, l = this.alignVertical && r ? a - 90 : a;
261
+ return this._notAreaElements.findIndex((v) => v === s) > -1 ? this._getRenderElementWithoutArea(i, a, t) : this._getRenderElementWithArea(i, l, t);
262
+ }) : null;
263
+ }
264
+ _getRenderElementWithArea(e, t, i) {
265
+ var U;
266
+ const s = ((U = e.icon) == null ? void 0 : U.indexOf("TABLE")) === -1, a = e.icon && s ? e.icon : null, r = a !== "ENTRY_EXIT", l = e.icon ? _(e.icon, this._language.current) : A, v = this.getCalculatedDimension(e.dimension, i, !0, r), j = this.getCalculatedPosition(e.position, e.dimension, i, !0);
267
+ let w = "free";
268
+ return e.position.y === this.coachBorderOffset * -1 ? w = "upper-border" : e.position.y + e.dimension.h === i.h + this.coachBorderOffset && (w = "lower-border"), h`
269
+ <sbb-seat-reservation-scoped
270
+ scoped-classes="graphical-element"
271
+ inset-block-start="${j.y}px"
272
+ inset-inline-start="${j.x}px"
273
+ width="${v.w}px"
274
+ height="${v.h}px"
275
+ z-index="${e.position.z}"
276
+ >
277
+ <sbb-seat-reservation-area
278
+ style=${Z({
279
+ "--sbb-reservation-area-width": e.dimension.w * this.baseGridSize,
280
+ "--sbb-reservation-area-height": e.dimension.h * this.baseGridSize
281
+ })}
282
+ mounting=${w}
283
+ background="dark"
284
+ aria-hidden="true"
285
+ title=${l}
286
+ >
287
+ ${a ? h`
288
+ <sbb-seat-reservation-graphic
289
+ name=${a}
290
+ rotation=${t}
291
+ width=${this.baseGridSize}
292
+ height=${this.baseGridSize}
293
+ role="img"
294
+ aria-hidden="true"
295
+ ></sbb-seat-reservation-graphic>
296
+ ` : A}
297
+ </sbb-seat-reservation-area>
298
+ </sbb-seat-reservation-scoped>
299
+ `;
300
+ }
301
+ _getRenderElementWithoutArea(e, t, i) {
302
+ var l;
303
+ const s = this.getCalculatedDimension(e.dimension, i), a = this.getCalculatedPosition(e.position, e.dimension, i), r = e.icon && e.icon.indexOf("DRIVER_AREA") === -1 ? e.icon : (l = e.icon) == null ? void 0 : l.concat("_", this.seatReservation.vehicleType);
304
+ return h`
305
+ <sbb-seat-reservation-scoped
306
+ scoped-classes="graphical-element"
307
+ inset-block-start="${a.y}px"
308
+ inset-inline-start="${a.x}px"
309
+ width="${s.w}px"
310
+ height="${s.h}px"
311
+ z-index="${e.position.z}"
312
+ >
313
+ <sbb-seat-reservation-graphic
314
+ name=${r ?? A}
315
+ width=${e.dimension.w * this.baseGridSize}
316
+ height=${e.dimension.h * this.baseGridSize}
317
+ rotation=${t}
318
+ aria-hidden="true"
319
+ ?stretch=${!0}
320
+ ></sbb-seat-reservation-graphic>
321
+ </sbb-seat-reservation-scoped>
322
+ `;
323
+ }
324
+ _getRenderedServiceElements(e) {
325
+ return e ? e == null ? void 0 : e.map((t) => {
326
+ const i = t.icon ? _(t.icon, this._language.current) : null, s = this.getCalculatedDimension(t.dimension), a = this.getCalculatedPosition(t.position), r = t.rotation || 0, l = this.alignVertical ? r - 90 : r;
327
+ return h`
328
+ <sbb-seat-reservation-scoped
329
+ scoped-classes="graphical-element"
330
+ inset-block-start="${a.y}px"
331
+ inset-inline-start="${a.x}px"
332
+ width="${s.w}px"
333
+ height="${s.h}px"
334
+ z-index="${t.position.z}"
335
+ >
336
+ <sbb-seat-reservation-graphic
337
+ name=${t.icon ?? A}
338
+ width=${t.dimension.w * this.baseGridSize}
339
+ height=${t.dimension.h * this.baseGridSize}
340
+ .rotation=${l}
341
+ role="img"
342
+ aria-hidden="true"
343
+ title=${i ?? A}
344
+ ></sbb-seat-reservation-graphic>
345
+ </sbb-seat-reservation-scoped>
346
+ `;
347
+ }) : null;
348
+ }
349
+ /**
350
+ * Manages the selected place event triggered from the place
351
+ * Each selection emits an array of all selected places
352
+ * @param selectPlaceEvent
353
+ */
354
+ _onSelectPlace(e) {
355
+ const t = e.detail;
356
+ this.preventCoachScrollByPlaceClick = !0, this.isCoachGridFocusable = !1, this.preventPlaceClick || (this.updateSelectedSeatReservationPlaces(t), this.updateCurrentSelectedPlaceInCoach(t));
357
+ }
358
+ _onSelectNavCoach(e) {
359
+ const t = e.detail;
360
+ this.isKeyboardNavigation = !1, t !== null && t !== this.currSelectedCoachIndex ? (this.unfocusPlaceElement(), this.scrollToSelectedNavCoach(t)) : t === this.currSelectedCoachIndex && (this.updateCurrentSelectedCoach(), this.preselectPlaceInCoach());
361
+ }
362
+ _onFocusNavCoach() {
363
+ this.preventCoachScrollByPlaceClick ? this.focusPlaceElement(this.currSelectedPlace) : this.preselectPlaceInCoach(), this.isAutoScrolling = !1;
364
+ }
365
+ _getDescriptionTableCoach(e) {
366
+ var a;
367
+ if (!((a = e.places) != null && a.length))
368
+ return _("COACH_BLOCKED_TABLE_CAPTION", this._language.current, [
369
+ e.id
370
+ ]);
371
+ let t = "";
372
+ const i = this._getTitleDescriptionListString(e.graphicElements), s = this._getTitleDescriptionListString(e.serviceElements);
373
+ return t = _("COACH_TABLE_CAPTION", this._language.current, [
374
+ e.id
375
+ ]), (i || s) && (t += ". " + _("COACH_AVAILABLE_SERVICES", this._language.current) + ": ", t += s + ", " + i + "."), t;
376
+ }
377
+ _getTitleDescriptionListString(e) {
378
+ const t = [];
379
+ return e == null ? void 0 : e.map((i) => {
380
+ const s = i.icon;
381
+ if (!s)
382
+ return null;
383
+ const a = t.indexOf(s) > -1, r = _(i.icon, this._language.current), l = this._notFixedRotatableAreaIcons.indexOf(s) === -1 && this._notAreaElements.indexOf(s) === -1;
384
+ return a || t.push(i.icon), r && !a && l ? r : null;
385
+ }).filter((i) => !!i).join(", ");
386
+ }
387
+ }, g = new WeakMap(), f = new WeakMap(), m = new WeakMap(), $ = new WeakMap(), C = new WeakMap(), u = d, (() => {
388
+ const e = typeof Symbol == "function" && Symbol.metadata ? Object.create(N[Symbol.metadata] ?? null) : void 0;
389
+ T = [y({ attribute: "seat-reservation", type: Object })], k = [P(), y({ attribute: "has-navigation", type: Boolean })], I = [P(), y({ attribute: "align-vertical", type: Boolean })], B = [P(), y({ attribute: "max-reservations", type: Number })], M = [P(), y({ attribute: "prevent-place-click", type: Boolean })], S(d, null, T, { kind: "accessor", name: "seatReservation", static: !1, private: !1, access: { has: (t) => "seatReservation" in t, get: (t) => t.seatReservation, set: (t, i) => {
390
+ t.seatReservation = i;
391
+ } }, metadata: e }, z, O), S(d, null, k, { kind: "accessor", name: "hasNavigation", static: !1, private: !1, access: { has: (t) => "hasNavigation" in t, get: (t) => t.hasNavigation, set: (t, i) => {
392
+ t.hasNavigation = i;
393
+ } }, metadata: e }, D, G), S(d, null, I, { kind: "accessor", name: "alignVertical", static: !1, private: !1, access: { has: (t) => "alignVertical" in t, get: (t) => t.alignVertical, set: (t, i) => {
394
+ t.alignVertical = i;
395
+ } }, metadata: e }, V, E), S(d, null, B, { kind: "accessor", name: "maxReservations", static: !1, private: !1, access: { has: (t) => "maxReservations" in t, get: (t) => t.maxReservations, set: (t, i) => {
396
+ t.maxReservations = i;
397
+ } }, metadata: e }, L, F), S(d, null, M, { kind: "accessor", name: "preventPlaceClick", static: !1, private: !1, access: { has: (t) => "preventPlaceClick" in t, get: (t) => t.preventPlaceClick, set: (t, i) => {
398
+ t.preventPlaceClick = i;
399
+ } }, metadata: e }, H, W), S(null, o = { value: u }, n, { kind: "class", name: u.name, metadata: e }, null, c), u = o.value, e && Object.defineProperty(u, Symbol.metadata, { enumerable: !0, configurable: !0, writable: !0, value: e });
400
+ })(), d.styles = te, p(u, c), u;
401
+ })();
402
+ export {
403
+ me as SbbSeatReservationElement
404
+ };
@@ -0,0 +1,18 @@
1
+ import { CSSResultGroup, TemplateResult, LitElement } from 'lit';
2
+ /**
3
+ * Visualize an area with a special meaning within a wagon.
4
+ */
5
+ export declare class SbbSeatReservationAreaElement extends LitElement {
6
+ static styles: CSSResultGroup;
7
+ /** Mounting Prop */
8
+ accessor mounting: 'free' | 'upper-border' | 'lower-border' | 'upper-to-lower-border';
9
+ /** the background of the area */
10
+ accessor background: 'light' | 'dark';
11
+ protected render(): TemplateResult;
12
+ }
13
+ declare global {
14
+ interface HTMLElementTagNameMap {
15
+ 'sbb-seat-reservation-area': SbbSeatReservationAreaElement;
16
+ }
17
+ }
18
+ //# sourceMappingURL=seat-reservation-area.component.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"seat-reservation-area.component.d.ts","sourceRoot":"","sources":["../../../../src/elements-experimental/seat-reservation/seat-reservation-area/seat-reservation-area.component.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,KAAK,CAAC;AAC1D,OAAO,EAAQ,UAAU,EAAE,MAAM,KAAK,CAAC;AAKvC;;GAEG;AACH,qBAEM,6BAA8B,SAAQ,UAAU;IACpD,OAAuB,MAAM,EAAE,cAAc,CAAS;IAEtD,oBAAoB;IACpB,SAEgB,QAAQ,EAAE,MAAM,GAAG,cAAc,GAAG,cAAc,GAAG,uBAAuB,CACnF;IAET,iCAAiC;IACjC,SAEgB,UAAU,EAAE,OAAO,GAAG,MAAM,CAAW;cAEpC,MAAM,IAAI,cAAc;CAG5C;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAE7B,2BAA2B,EAAE,6BAA6B,CAAC;KAC5D;CACF"}