@sbb-esta/lyne-elements-experimental 3.0.1 → 3.2.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.
- package/custom-elements.json +908 -567
- package/development/seat-reservation/common/mapper/icon-mapper.d.ts.map +1 -1
- package/development/seat-reservation/common/mapper/icon-mapper.js +1 -3
- package/development/seat-reservation/common/mapper/mapper.d.ts +4 -3
- package/development/seat-reservation/common/mapper/mapper.d.ts.map +1 -1
- package/development/seat-reservation/common/mapper/mapper.js +6 -4
- package/development/seat-reservation/common/mapper/seat-reservation-sample-data.d.ts.map +1 -1
- package/development/seat-reservation/common/mapper/seat-reservation-sample-data.js +4989 -4
- package/development/seat-reservation/common/svgs.d.ts +0 -1
- package/development/seat-reservation/common/svgs.d.ts.map +1 -1
- package/development/seat-reservation/common/svgs.js +1 -3
- package/development/seat-reservation/common/translations/i18n.js +194 -194
- package/development/seat-reservation/common/types.d.ts +10 -0
- package/development/seat-reservation/common/types.d.ts.map +1 -1
- package/development/seat-reservation/seat-reservation/seat-reservation-base-element.d.ts +38 -12
- package/development/seat-reservation/seat-reservation/seat-reservation-base-element.d.ts.map +1 -1
- package/development/seat-reservation/seat-reservation/seat-reservation-base-element.js +252 -122
- package/development/seat-reservation/seat-reservation/seat-reservation.component.d.ts +28 -13
- package/development/seat-reservation/seat-reservation/seat-reservation.component.d.ts.map +1 -1
- package/development/seat-reservation/seat-reservation/seat-reservation.component.js +481 -262
- package/development/seat-reservation/seat-reservation-area/seat-reservation-area.component.js +17 -10
- package/development/seat-reservation/seat-reservation-graphic/seat-reservation-assets.d.ts.map +1 -1
- package/development/seat-reservation/seat-reservation-graphic/seat-reservation-assets.js +1 -6
- package/development/seat-reservation/seat-reservation-graphic/seat-reservation-graphic.component.js +36 -18
- package/development/seat-reservation/seat-reservation-navigation-coach/seat-reservation-navigation-coach.component.d.ts +3 -1
- package/development/seat-reservation/seat-reservation-navigation-coach/seat-reservation-navigation-coach.component.d.ts.map +1 -1
- package/development/seat-reservation/seat-reservation-navigation-coach/seat-reservation-navigation-coach.component.js +26 -4
- package/development/seat-reservation/seat-reservation-place-control/seat-reservation-place-control.component.d.ts.map +1 -1
- package/development/seat-reservation/seat-reservation-place-control/seat-reservation-place-control.component.js +86 -54
- package/development/seat-reservation/seat-reservation-scoped/seat-reservation-scoped.component.d.ts +1 -16
- package/development/seat-reservation/seat-reservation-scoped/seat-reservation-scoped.component.d.ts.map +1 -1
- package/development/seat-reservation/seat-reservation-scoped/seat-reservation-scoped.component.js +10 -164
- package/package.json +3 -3
- package/seat-reservation/common/mapper/icon-mapper.d.ts.map +1 -1
- package/seat-reservation/common/mapper/icon-mapper.js +0 -2
- package/seat-reservation/common/mapper/mapper.d.ts +4 -3
- package/seat-reservation/common/mapper/mapper.d.ts.map +1 -1
- package/seat-reservation/common/mapper/mapper.js +16 -14
- package/seat-reservation/common/mapper/seat-reservation-sample-data.d.ts.map +1 -1
- package/seat-reservation/common/mapper/seat-reservation-sample-data.js +4988 -3
- package/seat-reservation/common/svgs.d.ts +0 -1
- package/seat-reservation/common/svgs.d.ts.map +1 -1
- package/seat-reservation/common/svgs.js +4 -11
- package/seat-reservation/common/translations/i18n.js +197 -197
- package/seat-reservation/common/types.d.ts +10 -0
- package/seat-reservation/common/types.d.ts.map +1 -1
- package/seat-reservation/seat-reservation/seat-reservation-base-element.d.ts +38 -12
- package/seat-reservation/seat-reservation/seat-reservation-base-element.d.ts.map +1 -1
- package/seat-reservation/seat-reservation/seat-reservation-base-element.js +208 -134
- package/seat-reservation/seat-reservation/seat-reservation.component.d.ts +28 -13
- package/seat-reservation/seat-reservation/seat-reservation.component.d.ts.map +1 -1
- package/seat-reservation/seat-reservation/seat-reservation.component.js +290 -298
- package/seat-reservation/seat-reservation-area/seat-reservation-area.component.js +22 -22
- package/seat-reservation/seat-reservation-graphic/seat-reservation-assets.d.ts.map +1 -1
- package/seat-reservation/seat-reservation-graphic/seat-reservation-assets.js +0 -5
- package/seat-reservation/seat-reservation-graphic/seat-reservation-graphic.component.js +37 -37
- package/seat-reservation/seat-reservation-navigation-coach/seat-reservation-navigation-coach.component.d.ts +3 -1
- package/seat-reservation/seat-reservation-navigation-coach/seat-reservation-navigation-coach.component.d.ts.map +1 -1
- package/seat-reservation/seat-reservation-navigation-coach/seat-reservation-navigation-coach.component.js +69 -58
- package/seat-reservation/seat-reservation-place-control/seat-reservation-place-control.component.d.ts.map +1 -1
- package/seat-reservation/seat-reservation-place-control/seat-reservation-place-control.component.js +28 -27
- package/seat-reservation/seat-reservation-scoped/seat-reservation-scoped.component.d.ts +1 -16
- package/seat-reservation/seat-reservation-scoped/seat-reservation-scoped.component.d.ts.map +1 -1
- package/seat-reservation/seat-reservation-scoped/seat-reservation-scoped.component.js +14 -101
|
@@ -1,33 +1,33 @@
|
|
|
1
|
-
var
|
|
2
|
-
throw TypeError(
|
|
1
|
+
var w = (e) => {
|
|
2
|
+
throw TypeError(e);
|
|
3
3
|
};
|
|
4
|
-
var y = (
|
|
5
|
-
var
|
|
6
|
-
import { __esDecorate as
|
|
4
|
+
var y = (e, r, t) => r.has(e) || w("Cannot " + t);
|
|
5
|
+
var d = (e, r, t) => (y(e, r, "read from private field"), t ? t.call(e) : r.get(e)), u = (e, r, t) => r.has(e) ? w("Cannot add the same private member more than once") : r instanceof WeakSet ? r.add(e) : r.set(e, t), m = (e, r, t, s) => (y(e, r, "write to private field"), s ? s.call(e, t) : r.set(e, t), t);
|
|
6
|
+
import { __esDecorate as v, __runInitializers as l } from "tslib";
|
|
7
7
|
import { forceType as z } from "@sbb-esta/lyne-elements/core/decorators.js";
|
|
8
8
|
import { css as E, LitElement as I, html as j } from "lit";
|
|
9
9
|
import { customElement as D, property as S } from "lit/decorators.js";
|
|
10
|
-
const O = E`*,:before,:after{box-sizing:border-box}:host{--sbb-reservation-area-border-radius: var(--sbb-border-width-4x);--sbb-reservation-area-rotation: 0;display:flex;justify-content:center;align-items:center;height:calc(var(--sbb-reservation-area-height) * .0625rem);width:calc(var(--sbb-reservation-area-width) * .0625rem);border:var(--sbb-border-width-1x) solid var(--sbb-color-graphite);border-radius:var(--sbb-reservation-area-border-radius);position:
|
|
10
|
+
const O = E`*,:before,:after{box-sizing:border-box}:host{--sbb-seat-reservation-area-border-radius: var(--sbb-border-width-4x);--sbb-seat-reservation-area-rotation: 0;display:flex;justify-content:center;align-items:center;height:calc(var(--sbb-seat-reservation-area-height) * var(--sbb-seat-reservation-one-px-rem, .0625rem));width:calc(var(--sbb-seat-reservation-area-width) * var(--sbb-seat-reservation-one-px-rem, .0625rem));border:var(--sbb-border-width-1x) solid var(--sbb-color-graphite);border-radius:var(--sbb-seat-reservation-area-border-radius);position:absolute;inset-block-start:calc(var(--sbb-seat-reservation-area-top) * var(--sbb-seat-reservation-one-px-rem, .0625rem));inset-inline-start:calc(var(--sbb-seat-reservation-area-left) * var(--sbb-seat-reservation-one-px-rem, .0625rem));rotate:calc(var(--sbb-seat-reservation-area-rotation) * 1deg);line-height:normal;background-color:var(--sbb-color-white)}:host([background=dark]){background-color:var(--sbb-color-milk)}:host([mounting=upper-border]){border-block-start-width:var(--sbb-border-width-2x);border-radius:0 0 var(--sbb-seat-reservation-area-border-radius) var(--sbb-seat-reservation-area-border-radius)}:host([mounting=lower-border]){border-block-end-width:var(--sbb-border-width-2x);border-radius:var(--sbb-seat-reservation-area-border-radius) var(--sbb-seat-reservation-area-border-radius) 0 0}:host([mounting=upper-to-lower-border]){border-block-start:none;border-block-end:none;border-radius:0}:host(:hover){cursor:pointer}`;
|
|
11
11
|
let B = (() => {
|
|
12
|
-
var n, b,
|
|
13
|
-
let
|
|
14
|
-
return
|
|
12
|
+
var n, b, o;
|
|
13
|
+
let e = [D("sbb-seat-reservation-area")], r, t = [], s, g = I, h, p = [], _ = [], k, f = [], x = [];
|
|
14
|
+
return o = class extends g {
|
|
15
15
|
constructor() {
|
|
16
16
|
super(...arguments);
|
|
17
|
-
u(this, n, l(this,
|
|
18
|
-
u(this, b, (l(this,
|
|
19
|
-
l(this,
|
|
17
|
+
u(this, n, l(this, p, "free"));
|
|
18
|
+
u(this, b, (l(this, _), l(this, f, "light")));
|
|
19
|
+
l(this, x);
|
|
20
20
|
}
|
|
21
21
|
/** Mounting Prop */
|
|
22
22
|
get mounting() {
|
|
23
|
-
return
|
|
23
|
+
return d(this, n);
|
|
24
24
|
}
|
|
25
25
|
set mounting(i) {
|
|
26
26
|
m(this, n, i);
|
|
27
27
|
}
|
|
28
28
|
/** the background of the area */
|
|
29
29
|
get background() {
|
|
30
|
-
return
|
|
30
|
+
return d(this, b);
|
|
31
31
|
}
|
|
32
32
|
set background(i) {
|
|
33
33
|
m(this, b, i);
|
|
@@ -35,14 +35,14 @@ let B = (() => {
|
|
|
35
35
|
render() {
|
|
36
36
|
return j`<slot></slot>`;
|
|
37
37
|
}
|
|
38
|
-
}, n = new WeakMap(), b = new WeakMap(),
|
|
39
|
-
const i = typeof Symbol == "function" && Symbol.metadata ? Object.create(
|
|
40
|
-
|
|
41
|
-
a.mounting =
|
|
42
|
-
} }, metadata: i },
|
|
43
|
-
a.background =
|
|
44
|
-
} }, metadata: i }, f,
|
|
45
|
-
})(),
|
|
38
|
+
}, n = new WeakMap(), b = new WeakMap(), s = o, (() => {
|
|
39
|
+
const i = typeof Symbol == "function" && Symbol.metadata ? Object.create(g[Symbol.metadata] ?? null) : void 0;
|
|
40
|
+
h = [z(), S({ reflect: !0 })], k = [z(), S({ reflect: !0 })], v(o, null, h, { kind: "accessor", name: "mounting", static: !1, private: !1, access: { has: (a) => "mounting" in a, get: (a) => a.mounting, set: (a, c) => {
|
|
41
|
+
a.mounting = c;
|
|
42
|
+
} }, metadata: i }, p, _), v(o, null, k, { kind: "accessor", name: "background", static: !1, private: !1, access: { has: (a) => "background" in a, get: (a) => a.background, set: (a, c) => {
|
|
43
|
+
a.background = c;
|
|
44
|
+
} }, metadata: i }, f, x), v(null, r = { value: s }, e, { kind: "class", name: s.name, metadata: i }, null, t), s = r.value, i && Object.defineProperty(s, Symbol.metadata, { enumerable: !0, configurable: !0, writable: !0, value: i });
|
|
45
|
+
})(), o.styles = O, l(s, t), s;
|
|
46
46
|
})();
|
|
47
47
|
export {
|
|
48
48
|
B as SbbSeatReservationAreaElement
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"seat-reservation-assets.d.ts","sourceRoot":"","sources":["../../../../src/elements-experimental/seat-reservation/seat-reservation-graphic/seat-reservation-assets.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,KAAK,cAAc,EAAE,MAAM,KAAK,CAAC;AAKhD,OAAO,kCAAkC,CAAC;AAC1C,OAAO,gCAAgC,CAAC;AAUxC;;;;GAIG;AACH,eAAO,MAAM,kBAAkB,GAAI,UAAU,MAAM,KAAG,cAAc,GAAG,IAMtE,CAAC;
|
|
1
|
+
{"version":3,"file":"seat-reservation-assets.d.ts","sourceRoot":"","sources":["../../../../src/elements-experimental/seat-reservation/seat-reservation-graphic/seat-reservation-assets.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,KAAK,cAAc,EAAE,MAAM,KAAK,CAAC;AAKhD,OAAO,kCAAkC,CAAC;AAC1C,OAAO,gCAAgC,CAAC;AAUxC;;;;GAIG;AACH,eAAO,MAAM,kBAAkB,GAAI,UAAU,MAAM,KAAG,cAAc,GAAG,IAMtE,CAAC;AA8RF,eAAO,MAAM,cAAc,EAAE,cAgB5B,CAAC"}
|
|
@@ -2,43 +2,43 @@ var F = (s) => {
|
|
|
2
2
|
throw TypeError(s);
|
|
3
3
|
};
|
|
4
4
|
var G = (s, i, r) => i.has(s) || F("Cannot " + r);
|
|
5
|
-
var l = (s, i, r) => (G(s, i, "read from private field"), r ? r.call(s) : i.get(s)),
|
|
6
|
-
import { __runInitializers as h, __esDecorate as
|
|
5
|
+
var l = (s, i, r) => (G(s, i, "read from private field"), r ? r.call(s) : i.get(s)), b = (s, i, r) => i.has(s) ? F("Cannot add the same private member more than once") : i instanceof WeakSet ? i.add(s) : i.set(s, r), o = (s, i, r, c) => (G(s, i, "write to private field"), c ? c.call(s, r) : i.set(s, r), r);
|
|
6
|
+
import { __runInitializers as h, __esDecorate as g } from "tslib";
|
|
7
7
|
import { SbbLanguageController as q } from "@sbb-esta/lyne-elements/core/controllers.js";
|
|
8
8
|
import { forceType as f } from "@sbb-esta/lyne-elements/core/decorators.js";
|
|
9
|
-
import { css as H, LitElement as J, html as
|
|
9
|
+
import { css as H, LitElement as J, html as x } from "lit";
|
|
10
10
|
import { customElement as K, property as w } from "lit/decorators.js";
|
|
11
11
|
import { classMap as Q } from "lit/directives/class-map.js";
|
|
12
12
|
import { mapIconToSvg as V, getI18nSeatReservation as W } from "../common.js";
|
|
13
13
|
import "@sbb-esta/lyne-elements/icon.js";
|
|
14
|
-
const X = H`*,:before,:after{box-sizing:border-box}:host{--sbb-reservation-graphic-width: 16;--sbb-reservation-graphic-height: 16;--sbb-reservation-graphic-rotation: 0;--sbb-reservation-graphic-inverse-rotation: 0
|
|
14
|
+
const X = H`*,:before,:after{box-sizing:border-box}:host{--sbb-seat-reservation-graphic-width: 16;--sbb-seat-reservation-graphic-height: 16;--sbb-seat-reservation-graphic-rotation: 0;--sbb-seat-reservation-graphic-inverse-rotation: 0;--sbb-seat-reservation-graphic-position: initial;--sbb-seat-reservation-graphic-left: 0;--sbb-seat-reservation-graphic-top: 0;--sbb-icon-svg-width: calc( var(--sbb-seat-reservation-graphic-width) * var(--sbb-seat-reservation-one-px-rem, .0625rem) );--sbb-icon-svg-height: calc( var(--sbb-seat-reservation-graphic-height) * var(--sbb-seat-reservation-one-px-rem, .0625rem) );display:flex;justify-content:center;align-items:center;width:calc(var(--sbb-seat-reservation-graphic-width) * var(--sbb-seat-reservation-one-px-rem, .0625rem));height:calc(var(--sbb-seat-reservation-graphic-height) * var(--sbb-seat-reservation-one-px-rem, .0625rem));position:var(--sbb-seat-reservation-graphic-position);inset-inline-start:calc(var(--sbb-seat-reservation-graphic-left) * var(--sbb-seat-reservation-one-px-rem, .0625rem));inset-block-start:calc(var(--sbb-seat-reservation-graphic-top) * var(--sbb-seat-reservation-one-px-rem, .0625rem))}.sbb-sr-icon,.sbb-sr-graphic{width:inherit;height:inherit;transform-origin:center;rotate:calc(var(--sbb-seat-reservation-graphic-rotation) * 1deg)}.sbb-sr-icon:hover{cursor:var(--sbb-seat-reservation--cursor-pointer, default)}.sbb-sr-icon{color:var(--sbb-color-granite)}.sbb-sr-graphic svg{width:100%;height:100%}.sbb-sr-graphic svg .fix-rotation-inverse{transform-origin:center;rotate:calc(var(--sbb-seat-reservation-graphic-inverse-rotation) * 1deg)}@media (forced-colors: active){.sbb-sr-graphic svg:not(.color-immutable) [fill]:not([fill=none]){fill:currentcolor}.sbb-sr-graphic .no-bg{fill:transparent}}`;
|
|
15
15
|
let ht = (() => {
|
|
16
|
-
var
|
|
17
|
-
let s = [K("sbb-seat-reservation-graphic")], i, r = [], c,
|
|
18
|
-
return a = class extends
|
|
16
|
+
var v, m, p, d, u, _, a;
|
|
17
|
+
let s = [K("sbb-seat-reservation-graphic")], i, r = [], c, z = J, R, S = [], I = [], N, $ = [], k = [], E, j = [], D = [], O, C = [], L = [], T, A = [], M = [], P, U = [], B = [];
|
|
18
|
+
return a = class extends z {
|
|
19
19
|
constructor() {
|
|
20
20
|
super(...arguments);
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
o(this,
|
|
21
|
+
b(this, v);
|
|
22
|
+
b(this, m);
|
|
23
|
+
b(this, p);
|
|
24
|
+
b(this, d);
|
|
25
|
+
b(this, u);
|
|
26
|
+
b(this, _);
|
|
27
|
+
o(this, v, h(this, S, "")), o(this, m, (h(this, I), h(this, $, !1))), o(this, p, (h(this, k), h(this, j, 0))), o(this, d, (h(this, D), h(this, C, 0))), o(this, u, (h(this, L), h(this, A, null))), o(this, _, (h(this, M), h(this, U, null))), this._language = (h(this, B), new q(this));
|
|
28
28
|
}
|
|
29
29
|
/** Name of the SVG graphic to be displayed. */
|
|
30
30
|
get name() {
|
|
31
|
-
return l(this,
|
|
31
|
+
return l(this, v);
|
|
32
32
|
}
|
|
33
33
|
set name(t) {
|
|
34
|
-
o(this,
|
|
34
|
+
o(this, v, t);
|
|
35
35
|
}
|
|
36
36
|
/** if true, scale the graphic content of the given element non-uniformly if necessary */
|
|
37
37
|
get stretch() {
|
|
38
|
-
return l(this,
|
|
38
|
+
return l(this, m);
|
|
39
39
|
}
|
|
40
40
|
set stretch(t) {
|
|
41
|
-
o(this,
|
|
41
|
+
o(this, m, t);
|
|
42
42
|
}
|
|
43
43
|
/** handles the rotation of the SVG graphic */
|
|
44
44
|
get rotation() {
|
|
@@ -49,62 +49,62 @@ let ht = (() => {
|
|
|
49
49
|
}
|
|
50
50
|
/** Inverse rotation for part of an SVG that can be rotated opposite to the normal rotation */
|
|
51
51
|
get inverseRotation() {
|
|
52
|
-
return l(this,
|
|
52
|
+
return l(this, d);
|
|
53
53
|
}
|
|
54
54
|
set inverseRotation(t) {
|
|
55
|
-
o(this,
|
|
55
|
+
o(this, d, t);
|
|
56
56
|
}
|
|
57
57
|
/** width of the svg in pixels (without unit) */
|
|
58
58
|
get width() {
|
|
59
|
-
return l(this,
|
|
59
|
+
return l(this, u);
|
|
60
60
|
}
|
|
61
61
|
set width(t) {
|
|
62
|
-
o(this,
|
|
62
|
+
o(this, u, t);
|
|
63
63
|
}
|
|
64
64
|
/** height of the svg in pixels (without unit) */
|
|
65
65
|
get height() {
|
|
66
|
-
return l(this,
|
|
66
|
+
return l(this, _);
|
|
67
67
|
}
|
|
68
68
|
set height(t) {
|
|
69
|
-
o(this,
|
|
69
|
+
o(this, _, t);
|
|
70
70
|
}
|
|
71
71
|
willUpdate(t) {
|
|
72
|
-
super.willUpdate(t), t.has("width") && this.width && this.style?.setProperty("--sbb-reservation-graphic-width", `${this.width}`), t.has("height") && this.height && this.style?.setProperty("--sbb-reservation-graphic-height", `${this.height}`), t.has("rotation") && this.style?.setProperty("--sbb-reservation-graphic-rotation", `${this.rotation}`), t.has("inverseRotation") && this.style?.setProperty("--sbb-reservation-graphic-inverse-rotation", `${this.inverseRotation}`);
|
|
72
|
+
super.willUpdate(t), t.has("width") && this.width && this.style?.setProperty("--sbb-seat-reservation-graphic-width", `${this.width}`), t.has("height") && this.height && this.style?.setProperty("--sbb-seat-reservation-graphic-height", `${this.height}`), t.has("rotation") && this.style?.setProperty("--sbb-seat-reservation-graphic-rotation", `${this.rotation}`), t.has("inverseRotation") && this.style?.setProperty("--sbb-seat-reservation-graphic-inverse-rotation", `${this.inverseRotation}`);
|
|
73
73
|
}
|
|
74
74
|
render() {
|
|
75
75
|
const t = V[this.name];
|
|
76
|
-
return !t?.svg && !t?.svgName ? null :
|
|
76
|
+
return !t?.svg && !t?.svgName ? null : x`<span
|
|
77
77
|
class="${Q({
|
|
78
78
|
"sbb-sr-icon": !!t.svgName,
|
|
79
79
|
"sbb-sr-graphic": !!t.svg
|
|
80
80
|
})}"
|
|
81
81
|
>
|
|
82
|
-
${t.svgName ?
|
|
82
|
+
${t.svgName ? x` <sbb-icon
|
|
83
83
|
name="${t.svgName || ""}"
|
|
84
84
|
aria-hidden="false"
|
|
85
85
|
aria-label="${W(t.svgName, this._language.current)}"
|
|
86
|
-
></sbb-icon>` :
|
|
86
|
+
></sbb-icon>` : x`${this._getSvgElement(t.svg)}`}
|
|
87
87
|
</span>`;
|
|
88
88
|
}
|
|
89
89
|
_getSvgElement(t) {
|
|
90
90
|
const e = new DOMParser(), n = t || "<svg></svg>", y = e.parseFromString(n, "image/svg+xml").firstElementChild;
|
|
91
91
|
return this.stretch && y?.nodeName.toLowerCase() === "svg" && y.setAttribute("preserveAspectRatio", "none"), y;
|
|
92
92
|
}
|
|
93
|
-
},
|
|
94
|
-
const t = typeof Symbol == "function" && Symbol.metadata ? Object.create(
|
|
95
|
-
|
|
93
|
+
}, v = new WeakMap(), m = new WeakMap(), p = new WeakMap(), d = new WeakMap(), u = new WeakMap(), _ = new WeakMap(), c = a, (() => {
|
|
94
|
+
const t = typeof Symbol == "function" && Symbol.metadata ? Object.create(z[Symbol.metadata] ?? null) : void 0;
|
|
95
|
+
R = [f(), w({ attribute: "name" })], N = [f(), w({ attribute: "stretch", type: Boolean })], E = [f(), w({ attribute: "rotation", type: Number })], O = [f(), w({ attribute: "inverse-roration", type: Number })], T = [f(), w({ attribute: "width", type: Number })], P = [f(), w({ attribute: "height", type: Number })], g(a, null, R, { kind: "accessor", name: "name", static: !1, private: !1, access: { has: (e) => "name" in e, get: (e) => e.name, set: (e, n) => {
|
|
96
96
|
e.name = n;
|
|
97
|
-
} }, metadata: t }, S, I),
|
|
97
|
+
} }, metadata: t }, S, I), g(a, null, N, { kind: "accessor", name: "stretch", static: !1, private: !1, access: { has: (e) => "stretch" in e, get: (e) => e.stretch, set: (e, n) => {
|
|
98
98
|
e.stretch = n;
|
|
99
|
-
} }, metadata: t }, $,
|
|
99
|
+
} }, metadata: t }, $, k), g(a, null, E, { kind: "accessor", name: "rotation", static: !1, private: !1, access: { has: (e) => "rotation" in e, get: (e) => e.rotation, set: (e, n) => {
|
|
100
100
|
e.rotation = n;
|
|
101
|
-
} }, metadata: t }, j, D),
|
|
101
|
+
} }, metadata: t }, j, D), g(a, null, O, { kind: "accessor", name: "inverseRotation", static: !1, private: !1, access: { has: (e) => "inverseRotation" in e, get: (e) => e.inverseRotation, set: (e, n) => {
|
|
102
102
|
e.inverseRotation = n;
|
|
103
|
-
} }, metadata: t }, C, L),
|
|
103
|
+
} }, metadata: t }, C, L), g(a, null, T, { kind: "accessor", name: "width", static: !1, private: !1, access: { has: (e) => "width" in e, get: (e) => e.width, set: (e, n) => {
|
|
104
104
|
e.width = n;
|
|
105
|
-
} }, metadata: t }, A, M),
|
|
105
|
+
} }, metadata: t }, A, M), g(a, null, P, { kind: "accessor", name: "height", static: !1, private: !1, access: { has: (e) => "height" in e, get: (e) => e.height, set: (e, n) => {
|
|
106
106
|
e.height = n;
|
|
107
|
-
} }, metadata: t }, U, B),
|
|
107
|
+
} }, metadata: t }, U, B), g(null, i = { value: c }, s, { kind: "class", name: c.name, metadata: t }, null, r), c = i.value, t && Object.defineProperty(c, Symbol.metadata, { enumerable: !0, configurable: !0, writable: !0, value: t });
|
|
108
108
|
})(), a.styles = X, h(c, r), c;
|
|
109
109
|
})();
|
|
110
110
|
export {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { CSSResultGroup, PropertyValues, TemplateResult, LitElement } from 'lit';
|
|
2
|
-
import { PlaceTravelClass } from '../common.js';
|
|
2
|
+
import { CoachNumberOfFreePlaces, PlaceTravelClass } from '../common.js';
|
|
3
3
|
export type SelectCoachEventDetails = number;
|
|
4
4
|
/**
|
|
5
5
|
* This component will display the navigation coach item for Seat reservation.
|
|
@@ -17,6 +17,8 @@ export declare class SbbSeatReservationNavigationCoachElement extends LitElement
|
|
|
17
17
|
accessor selected: boolean;
|
|
18
18
|
accessor focused: boolean;
|
|
19
19
|
accessor index: number;
|
|
20
|
+
/** Representation of places available for selecting, counting seat places and bicycle places separetely */
|
|
21
|
+
accessor freePlacesByType: CoachNumberOfFreePlaces;
|
|
20
22
|
/** Travel class of the coach */
|
|
21
23
|
accessor travelClass: PlaceTravelClass[];
|
|
22
24
|
/** If the coach is a driver/restricted area */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"seat-reservation-navigation-coach.component.d.ts","sourceRoot":"","sources":["../../../../src/elements-experimental/seat-reservation/seat-reservation-navigation-coach/seat-reservation-navigation-coach.component.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,cAAc,EAAW,KAAK,cAAc,EAAE,KAAK,cAAc,EAAE,MAAM,KAAK,CAAC;AAC7F,OAAO,EAAQ,UAAU,EAAE,MAAM,KAAK,CAAC;AAKvC,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"seat-reservation-navigation-coach.component.d.ts","sourceRoot":"","sources":["../../../../src/elements-experimental/seat-reservation/seat-reservation-navigation-coach/seat-reservation-navigation-coach.component.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,cAAc,EAAW,KAAK,cAAc,EAAE,KAAK,cAAc,EAAE,MAAM,KAAK,CAAC;AAC7F,OAAO,EAAQ,UAAU,EAAE,MAAM,KAAK,CAAC;AAKvC,OAAO,KAAK,EAAE,uBAAuB,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAI9E,OAAO,+CAA+C,CAAC;AACvD,OAAO,4CAA4C,CAAC;AAIpD,MAAM,MAAM,uBAAuB,GAAG,MAAM,CAAC;AAE7C;;GAEG;AACH,qBAEM,wCAAyC,SAAQ,UAAU;IAC/D,OAAuB,MAAM,EAAE,cAAc,CAAS;IACtD,gBAAuB,MAAM;;;MAGlB;IAEX,sEAAsE;IACtE,SAEgB,OAAO,EAAE,MAAM,CAAM;IAErC,2FAA2F;IAC3F,SACgB,WAAW,EAAE,MAAM,EAAE,CAAM;IAG3C,SAEgB,QAAQ,EAAE,OAAO,CAAS;IAG1C,SAEgB,OAAO,EAAE,OAAO,CAAS;IAEzC,SAEgB,KAAK,EAAE,MAAM,CAAK;IAElC,2GAA2G;IAC3G,SACgB,gBAAgB,EAAE,uBAAuB,CAA6B;IAEtF,gCAAgC;IAChC,SACgB,WAAW,EAAE,gBAAgB,EAAE,CAAiB;IAEhE,+CAA+C;IAC/C,SAEgB,UAAU,EAAE,OAAO,CAAS;IAE5C,kDAAkD;IAClD,SAEgB,KAAK,EAAE,OAAO,CAAS;IAEvC,iDAAiD;IACjD,SAEgB,IAAI,EAAE,OAAO,CAAS;IAEtC,mCAAmC;IACnC,SAEgB,OAAO,EAAE,OAAO,CAAS;IAEzC,6DAA6D;IAC7D,SAEgB,QAAQ,EAAE,OAAO,CAAS;IAE1C,OAAO,CAAC,SAAS,CAAmC;cAEjC,UAAU,CAAC,iBAAiB,EAAE,cAAc,CAAC,IAAI,CAAC,GAAG,IAAI;IAwB5E;;;;;;OAMG;cACgB,MAAM,IAAI,cAAc;IAyB3C,OAAO,CAAC,oBAAoB;IAwB5B,OAAO,CAAC,kBAAkB;IA4B1B,OAAO,CAAC,kCAAkC;IAmC1C,OAAO,CAAC,gCAAgC;IAYxC;;;;OAIG;IACH,OAAO,CAAC,eAAe;IAgBvB,OAAO,CAAC,2BAA2B;CASpC;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAE7B,uCAAuC,EAAE,wCAAwC,CAAC;KACnF;CACF"}
|
|
@@ -1,64 +1,65 @@
|
|
|
1
|
-
var
|
|
1
|
+
var ht = (o) => {
|
|
2
2
|
throw TypeError(o);
|
|
3
3
|
};
|
|
4
|
-
var
|
|
5
|
-
var l = (o, n, c) => (
|
|
4
|
+
var _t = (o, n, c) => n.has(o) || ht("Cannot " + c);
|
|
5
|
+
var l = (o, n, c) => (_t(o, n, "read from private field"), c ? c.call(o) : n.get(o)), b = (o, n, c) => n.has(o) ? ht("Cannot add the same private member more than once") : n instanceof WeakSet ? n.add(o) : n.set(o, c), s = (o, n, c, h) => (_t(o, n, "write to private field"), h ? h.call(o, c) : n.set(o, c), c);
|
|
6
6
|
import { __runInitializers as i, __esDecorate as d } from "tslib";
|
|
7
|
-
import { SbbLanguageController as
|
|
7
|
+
import { SbbLanguageController as ft } from "@sbb-esta/lyne-elements/core/controllers.js";
|
|
8
8
|
import { forceType as _ } from "@sbb-esta/lyne-elements/core/decorators.js";
|
|
9
|
-
import { css as
|
|
10
|
-
import { customElement as
|
|
11
|
-
import { classMap as
|
|
12
|
-
import { getI18nSeatReservation as
|
|
9
|
+
import { css as pt, LitElement as yt, nothing as E, html as g } from "lit";
|
|
10
|
+
import { customElement as xt, property as v } from "lit/decorators.js";
|
|
11
|
+
import { classMap as gt } from "lit/directives/class-map.js";
|
|
12
|
+
import { getI18nSeatReservation as u } from "../common/translations.js";
|
|
13
13
|
import "@sbb-esta/lyne-elements/screen-reader-only.js";
|
|
14
14
|
import "../seat-reservation-navigation-services.js";
|
|
15
|
-
const
|
|
16
|
-
let
|
|
17
|
-
var
|
|
18
|
-
let o = [
|
|
15
|
+
const It = pt`*,:before,:after{box-sizing:border-box}:host{--sbb-seat-reservation-navigation-travelclass-spacing: .625rem;--sbb-seat-reservation-navigation-btn-outline-color: var(--sbb-color-granite);--sbb-seat-reservation-navigation-btn-outline-width: var(--sbb-border-width-1x);--sbb-seat-reservation-navigation-btn-background-color: var(--sbb-color-white);--sbb-seat-reservation-navigation-btn-outline-color-selected: var(--sbb-color-black);--sbb-seat-reservation-navigation-btn-outline-width-hover: var(--sbb-border-width-2x);--sbb-seat-reservation-navigation-btn-background-color-hover: var(--sbb-color-cloud)}:host(.sbb-sr__navigation-coach--hover-scroll){--sbb-seat-reservation-navigation-btn-background-color: var(--sbb-color-cloud)}.sbb-sr-navigation__item-coach{display:flex;flex-direction:column;gap:var(--sbb-spacing-fixed-2x);width:var(--sbb-train-formation-wagon-width);list-style-type:none}.sbb-sr-navigation__item-coach.first-coach .sbb-sr-navigation--first-class,.sbb-sr-navigation__item-coach.last-coach .sbb-sr-navigation--first-class{width:calc(100% - 1.125rem)}.sbb-sr-navigation__item-coach.first-coach .sbb-sr-navigation__ctrl-button:not(.sbb-seat-reservation-navigation-driver-area){border-start-start-radius:var(--sbb-border-radius-8x);border-end-start-radius:var(--sbb-border-radius-8x)}.sbb-sr-navigation__item-coach.first-coach .sbb-sr-navigation--first-class{margin-inline-start:var(--sbb-seat-reservation-navigation-travelclass-spacing)}.sbb-sr-navigation__item-coach.last-coach .sbb-sr-navigation__ctrl-button:not(.sbb-sr-navigation-driver-area){border-start-end-radius:var(--sbb-border-radius-8x);border-end-end-radius:var(--sbb-border-radius-8x)}.sbb-sr-navigation__item-coach.last-coach .sbb-sr-navigation__additional-information{padding-inline-end:var(--sbb-seat-reservation-navigation-travelclass-spacing)}.sbb-sr-navigation__item-coach.last-coach .sbb-sr-navigation--first-class{margin-inline-end:var(--sbb-seat-reservation-navigation-travelclass-spacing)}.sbb-sr-navigation__item-coach.vertical-coach{flex-direction:row}.sbb-sr-navigation__ctrl-button{-webkit-appearance:none;-moz-appearance:none;box-sizing:border-box;margin:0;outline:none;border:none;border-radius:0;padding:0;background:none;-webkit-tap-highlight-color:transparent;color:inherit;display:flex;flex-direction:column;justify-content:center;height:2.25rem;position:relative;outline:var(--sbb-seat-reservation-navigation-btn-outline-width) solid var(--sbb-seat-reservation-navigation-btn-outline-color);border-radius:var(--sbb-border-radius-2x);background-color:var(--sbb-seat-reservation-navigation-btn-background-color);cursor:pointer}.sbb-sr-navigation__ctrl-button.sbb-sr-navigation-driver-area{border-radius:var(--sbb-border-radius-8x);cursor:initial}.sbb-sr-navigation__item-coach--selected .sbb-sr-navigation__ctrl-button,.sbb-sr-navigation__ctrl-button:focus-visible:not([disabled],:disabled,.sbb-sr-navigation-driver-area),.sbb-sr-navigation__ctrl-button:hover:not([disabled],:disabled,.sbb-sr-navigation-driver-area){--sbb-seat-reservation-navigation-btn-outline-width: var( --sbb-seat-reservation-navigation-btn-outline-width-hover );--sbb-seat-reservation-navigation-btn-outline-color: var(--sbb-color-black)}.sbb-sr-navigation__ctrl-button:focus-visible:not([disabled],:disabled){--sbb-seat-reservation-navigation-btn-background-color: var(--sbb-color-silver)}.sbb-sr-navigation__ctrl-button:focus-visible:not([disabled],:disabled) .sbb-sr-navigation__item-coach-travelclass{background-color:var(--sbb-color-metal)}.sbb-sr-navigation__ctrl-button:focus-visible:not([disabled],:disabled) .sbb-sr-navigation__item-coach-number{color:var(--sbb-color-anthracite)}.sbb-sr-navigation__item-coach--selected .sbb-sr-navigation__ctrl-button{--sbb-seat-reservation-navigation-btn-background-color: var(--sbb-color-milk)}.sbb-sr-navigation__item-coach--selected .sbb-sr-navigation__ctrl-button .sbb-sr-navigation__item-coach-travelclass{background-color:var(--sbb-color-black)}.sbb-sr-navigation__item-coach--selected .sbb-sr-navigation__ctrl-button .sbb-sr-navigation__item-coach-number{color:var(--sbb-color-black)}.sbb-sr-navigation__ctrl-button:hover:not([disabled],:disabled,.sbb-sr-navigation-driver-area){--sbb-seat-reservation-navigation-btn-background-color: var(--sbb-color-cloud)}.sbb-sr-navigation__ctrl-button:hover:not([disabled],:disabled,.sbb-sr-navigation-driver-area) .sbb-sr-navigation__item-coach-travelclass{background-color:var(--sbb-color-smoke)}.sbb-sr-navigation__ctrl-button:hover:not([disabled],:disabled,.sbb-sr-navigation-driver-area) .sbb-sr-navigation__item-coach-number{color:var(--sbb-color-iron)}.sbb-sr-navigation__ctrl-button:is([disabled],:disabled){--sbb-seat-reservation-navigation-btn-background-color: var(--sbb-color-white);--sbb-seat-reservation-navigation-btn-outline-color: var(--sbb-color-platinum);cursor:unset;pointer-events:unset}.sbb-sr-navigation__ctrl-button:is([disabled],:disabled) .sbb-sr-navigation__item-coach-travelclass{background-color:var(--sbb-color-graphite)}.sbb-sr-navigation__ctrl-button:is([disabled],:disabled) .sbb-sr-navigation__item-coach-number{color:var(--sbb-color-graphite)}.sbb-sr-navigation__additional-information{display:flex;justify-content:space-between;align-items:center;flex:1;column-gap:var(--sbb-spacing-fixed-2x);padding-inline:1rem 1rem;font-family:var(--sbb-typo-font-family);font-weight:700;color:var(--sbb-color-granite)}@media (forced-colors: active){.sbb-sr-navigation__additional-information{color:var(--sbb-color-milk)}}.sbb-sr-navigation__item-coach-number{color:var(--sbb-color-granite)}@media (forced-colors: active){.sbb-sr-navigation__item-coach-number{color:var(--sbb-color-granite)}}@media (forced-colors: active) and (forced-colors: active){.sbb-sr-navigation__item-coach-number{color:inherit}}.sbb-sr-navigation__item-coach-number .sbb-sr-navigation__item-coach-travelclass{background-color:var(--sbb-color-charcoal)}.sbb-sr-navigation--first-class{width:calc(100% - .5rem);position:absolute;inset-block-start:.1875rem;inset-inline-start:.25rem;border:var(--sbb-border-width-1x) solid transparent;border-radius:var(--sbb-border-radius-1x);margin:auto;background-color:var(--sbb-color-lemon)}.sbb-sr-navigation__item-coach-travelclass{display:flex;align-items:center;justify-content:center;min-height:1.25rem;min-width:1.25rem;border-radius:var(--sbb-border-radius-1x);text-align:center;background-color:var(--sbb-color-granite);color:var(--sbb-color-white)}.sbb-sr-navigation__item-coach.vertical-coach .sbb-sr-navigation__ctrl-button{flex-direction:row-reverse;height:5rem;min-width:2.25rem}.sbb-sr-navigation__item-coach.vertical-coach .sbb-sr-navigation__additional-information{flex-direction:column-reverse;padding-block:1rem 1rem;padding-inline-start:unset;padding-inline-end:unset}.sbb-sr-navigation__item-coach.vertical-coach .sbb-sr-navigation--first-class{height:calc(100% - .5rem);width:initial;inset-inline-end:.1875rem;inset-block-start:.25rem;inset-inline-start:initial}.sbb-sr-navigation__item-coach.vertical-coach.first-coach .sbb-sr-navigation--first-class,.sbb-sr-navigation__item-coach.vertical-coach.last-coach .sbb-sr-navigation--first-class{height:calc(100% - 1.125rem)}.sbb-sr-navigation__item-coach.vertical-coach.first-coach:not(.last-coach) .sbb-sr-navigation__ctrl-button:not(.sbb-sr-navigation-driver-area){border-start-end-radius:var(--sbb-border-radius-8x);border-end-start-radius:var(--sbb-border-radius-2x)}.sbb-sr-navigation__item-coach.vertical-coach.first-coach:not(.last-coach) .sbb-sr-navigation--first-class{margin-block-start:var(--sbb-seat-reservation-navigation-travelclass-spacing);margin-inline-start:initial}.sbb-sr-navigation__item-coach.vertical-coach.last-coach:not(.first-coach) .sbb-sr-navigation__ctrl-button:not(.sbb-sr-navigation-driver-area){border-start-end-radius:var(--sbb-border-radius-2x);border-end-start-radius:var(--sbb-border-radius-8x)}.sbb-sr-navigation__item-coach.vertical-coach.last-coach:not(.first-coach) .sbb-sr-navigation--first-class{margin-block-end:var(--sbb-seat-reservation-navigation-travelclass-spacing);margin-inline-end:initial}.sbb-sr-navigation__item-coach.vertical-coach .sbb-sr-navigation-driver-area{height:5rem;min-width:2.25rem}`, Ct = 3;
|
|
16
|
+
let Rt = (() => {
|
|
17
|
+
var m, f, p, y, x, I, C, k, A, S, w, B, r;
|
|
18
|
+
let o = [xt("sbb-seat-reservation-navigation-coach")], n, c = [], h, z = yt, T, N = [], $ = [], O, P = [], R = [], D, L = [], V = [], j, H = [], U = [], F, G = [], K = [], M, q = [], Y = [], X, J = [], Q = [], W, Z = [], tt = [], at, et = [], st = [], it, rt = [], ot = [], nt, ct = [], lt = [], bt, dt = [], vt = [];
|
|
19
19
|
return r = class extends z {
|
|
20
20
|
constructor() {
|
|
21
21
|
super(...arguments);
|
|
22
|
-
b(this, u);
|
|
23
22
|
b(this, m);
|
|
24
23
|
b(this, f);
|
|
25
24
|
b(this, p);
|
|
26
|
-
b(this, x);
|
|
27
25
|
b(this, y);
|
|
26
|
+
b(this, x);
|
|
28
27
|
b(this, I);
|
|
29
28
|
b(this, C);
|
|
30
29
|
b(this, k);
|
|
31
30
|
b(this, A);
|
|
32
31
|
b(this, S);
|
|
33
|
-
|
|
32
|
+
b(this, w);
|
|
33
|
+
b(this, B);
|
|
34
|
+
s(this, m, i(this, N, "")), s(this, f, (i(this, $), i(this, P, []))), s(this, p, (i(this, R), i(this, L, !1))), s(this, y, (i(this, V), i(this, H, !1))), s(this, x, (i(this, U), i(this, G, 0))), s(this, I, (i(this, K), i(this, q, { seats: 0, bicycles: 0 }))), s(this, C, (i(this, Y), i(this, J, ["ANY_CLASS"]))), s(this, k, (i(this, Q), i(this, Z, !1))), s(this, A, (i(this, tt), i(this, et, !1))), s(this, S, (i(this, st), i(this, rt, !1))), s(this, w, (i(this, ot), i(this, ct, !1))), s(this, B, (i(this, lt), i(this, dt, !1))), this._language = (i(this, vt), new ft(this));
|
|
34
35
|
}
|
|
35
36
|
/** Coach ID, which is used to identify the coach in the navigation */
|
|
36
37
|
get coachId() {
|
|
37
|
-
return l(this,
|
|
38
|
+
return l(this, m);
|
|
38
39
|
}
|
|
39
40
|
set coachId(a) {
|
|
40
|
-
s(this,
|
|
41
|
+
s(this, m, a);
|
|
41
42
|
}
|
|
42
43
|
/** Coach service property ids, which are used to display the services in the navigation */
|
|
43
44
|
get propertyIds() {
|
|
44
|
-
return l(this,
|
|
45
|
+
return l(this, f);
|
|
45
46
|
}
|
|
46
47
|
set propertyIds(a) {
|
|
47
|
-
s(this,
|
|
48
|
+
s(this, f, a);
|
|
48
49
|
}
|
|
49
50
|
/* pre-selected Coach index property */
|
|
50
51
|
get selected() {
|
|
51
|
-
return l(this,
|
|
52
|
+
return l(this, p);
|
|
52
53
|
}
|
|
53
54
|
set selected(a) {
|
|
54
|
-
s(this,
|
|
55
|
+
s(this, p, a);
|
|
55
56
|
}
|
|
56
57
|
/* focus Coach index property */
|
|
57
58
|
get focused() {
|
|
58
|
-
return l(this,
|
|
59
|
+
return l(this, y);
|
|
59
60
|
}
|
|
60
61
|
set focused(a) {
|
|
61
|
-
s(this,
|
|
62
|
+
s(this, y, a);
|
|
62
63
|
}
|
|
63
64
|
get index() {
|
|
64
65
|
return l(this, x);
|
|
@@ -66,47 +67,54 @@ let $t = (() => {
|
|
|
66
67
|
set index(a) {
|
|
67
68
|
s(this, x, a);
|
|
68
69
|
}
|
|
70
|
+
/** Representation of places available for selecting, counting seat places and bicycle places separetely */
|
|
71
|
+
get freePlacesByType() {
|
|
72
|
+
return l(this, I);
|
|
73
|
+
}
|
|
74
|
+
set freePlacesByType(a) {
|
|
75
|
+
s(this, I, a);
|
|
76
|
+
}
|
|
69
77
|
/** Travel class of the coach */
|
|
70
78
|
get travelClass() {
|
|
71
|
-
return l(this,
|
|
79
|
+
return l(this, C);
|
|
72
80
|
}
|
|
73
81
|
set travelClass(a) {
|
|
74
|
-
s(this,
|
|
82
|
+
s(this, C, a);
|
|
75
83
|
}
|
|
76
84
|
/** If the coach is a driver/restricted area */
|
|
77
85
|
get driverArea() {
|
|
78
|
-
return l(this,
|
|
86
|
+
return l(this, k);
|
|
79
87
|
}
|
|
80
88
|
set driverArea(a) {
|
|
81
|
-
s(this,
|
|
89
|
+
s(this, k, a);
|
|
82
90
|
}
|
|
83
91
|
/** If the coach is the first in the navigation */
|
|
84
92
|
get first() {
|
|
85
|
-
return l(this,
|
|
93
|
+
return l(this, A);
|
|
86
94
|
}
|
|
87
95
|
set first(a) {
|
|
88
|
-
s(this,
|
|
96
|
+
s(this, A, a);
|
|
89
97
|
}
|
|
90
98
|
/** If the coach is the last in the navigation */
|
|
91
99
|
get last() {
|
|
92
|
-
return l(this,
|
|
100
|
+
return l(this, S);
|
|
93
101
|
}
|
|
94
102
|
set last(a) {
|
|
95
|
-
s(this,
|
|
103
|
+
s(this, S, a);
|
|
96
104
|
}
|
|
97
105
|
/** Disable the coach navigation */
|
|
98
106
|
get disable() {
|
|
99
|
-
return l(this,
|
|
107
|
+
return l(this, w);
|
|
100
108
|
}
|
|
101
109
|
set disable(a) {
|
|
102
|
-
s(this,
|
|
110
|
+
s(this, w, a);
|
|
103
111
|
}
|
|
104
112
|
/** If the coach navigation should be displayed vertically */
|
|
105
113
|
get vertical() {
|
|
106
|
-
return l(this,
|
|
114
|
+
return l(this, B);
|
|
107
115
|
}
|
|
108
116
|
set vertical(a) {
|
|
109
|
-
s(this,
|
|
117
|
+
s(this, B, a);
|
|
110
118
|
}
|
|
111
119
|
willUpdate(a) {
|
|
112
120
|
if (super.willUpdate(a), a.has("selected")) {
|
|
@@ -126,9 +134,9 @@ let $t = (() => {
|
|
|
126
134
|
* @protected
|
|
127
135
|
*/
|
|
128
136
|
render() {
|
|
129
|
-
return this.propertyIds = this.propertyIds.filter((a) => a !== "ANY_SEAT").slice(0,
|
|
137
|
+
return this.propertyIds = this.propertyIds.filter((a) => a !== "ANY_SEAT").slice(0, Ct), g`
|
|
130
138
|
<div
|
|
131
|
-
class="${
|
|
139
|
+
class="${gt({
|
|
132
140
|
"sbb-sr-navigation__item-coach": !0,
|
|
133
141
|
"last-coach": this.last,
|
|
134
142
|
"first-coach": this.first,
|
|
@@ -149,7 +157,7 @@ let $t = (() => {
|
|
|
149
157
|
return g` <button
|
|
150
158
|
type="button"
|
|
151
159
|
?disabled="${this.disable}"
|
|
152
|
-
class="${
|
|
160
|
+
class="${gt({
|
|
153
161
|
"sbb-sr-navigation__ctrl-button": !0,
|
|
154
162
|
"sbb-sr-navigation-driver-area": this.driverArea
|
|
155
163
|
})}"
|
|
@@ -182,19 +190,20 @@ let $t = (() => {
|
|
|
182
190
|
}
|
|
183
191
|
_getTitleDescriptionNavCoachButton(a) {
|
|
184
192
|
if (this.driverArea)
|
|
185
|
-
return
|
|
193
|
+
return u("NAVIGATE_COACH_BLOCKED", this._language.current, [
|
|
186
194
|
this.coachId
|
|
187
195
|
]);
|
|
188
|
-
let t =
|
|
196
|
+
let t = u("NAVIGATE_TO_COACH", this._language.current, [this.coachId]);
|
|
189
197
|
if (a) {
|
|
190
|
-
const
|
|
191
|
-
t = t.concat(
|
|
198
|
+
const ut = u(a === 1 ? "SERVICE_CLASS_FIRST" : "SERVICE_CLASS_SECOND", this._language.current), mt = u("NAVIGATE_TO_COACH_SERVICE_CLASS_SUB", this._language.current, [ut]);
|
|
199
|
+
t = t.concat(mt);
|
|
192
200
|
}
|
|
193
|
-
|
|
201
|
+
const e = u("COACH_AVAILABLE_NUMBER_OF_PLACES", this._language.current, [this.freePlacesByType.seats, this.freePlacesByType.bicycles]);
|
|
202
|
+
return t = t.concat(". ").concat(e), t;
|
|
194
203
|
}
|
|
195
204
|
_getAriaDescriptionCoachServices() {
|
|
196
205
|
let a = null;
|
|
197
|
-
return this.propertyIds.length && (a =
|
|
206
|
+
return this.propertyIds.length && (a = u("COACH_AVAILABLE_SERVICES", this._language.current) + ": ", a += this.propertyIds.map((t) => u(t, this._language.current)).join()), a;
|
|
198
207
|
}
|
|
199
208
|
/**
|
|
200
209
|
* emits the index of the coach array for the main navigation.
|
|
@@ -211,36 +220,38 @@ let $t = (() => {
|
|
|
211
220
|
_getCoachServiceClassNumber() {
|
|
212
221
|
return this.travelClass?.includes("FIRST") ? 1 : this.travelClass?.includes("SECOND") ? 2 : null;
|
|
213
222
|
}
|
|
214
|
-
},
|
|
223
|
+
}, m = new WeakMap(), f = new WeakMap(), p = new WeakMap(), y = new WeakMap(), x = new WeakMap(), I = new WeakMap(), C = new WeakMap(), k = new WeakMap(), A = new WeakMap(), S = new WeakMap(), w = new WeakMap(), B = new WeakMap(), h = r, (() => {
|
|
215
224
|
const a = typeof Symbol == "function" && Symbol.metadata ? Object.create(z[Symbol.metadata] ?? null) : void 0;
|
|
216
|
-
|
|
225
|
+
T = [_(), v({ attribute: "coach-id" })], O = [v({ attribute: "property-ids", type: Array })], D = [_(), v({ type: Boolean })], j = [_(), v({ type: Boolean })], F = [_(), v({ type: Number })], M = [v({ attribute: "free-places-by-type", type: Object })], X = [v({ attribute: "travel-class", type: Array })], W = [_(), v({ attribute: "driver-area", type: Boolean })], at = [_(), v({ type: Boolean })], it = [_(), v({ type: Boolean })], nt = [_(), v({ attribute: "disable", type: Boolean })], bt = [_(), v({ type: Boolean })], d(r, null, T, { kind: "accessor", name: "coachId", static: !1, private: !1, access: { has: (t) => "coachId" in t, get: (t) => t.coachId, set: (t, e) => {
|
|
217
226
|
t.coachId = e;
|
|
218
|
-
} }, metadata: a },
|
|
227
|
+
} }, metadata: a }, N, $), d(r, null, O, { kind: "accessor", name: "propertyIds", static: !1, private: !1, access: { has: (t) => "propertyIds" in t, get: (t) => t.propertyIds, set: (t, e) => {
|
|
219
228
|
t.propertyIds = e;
|
|
220
|
-
} }, metadata: a },
|
|
229
|
+
} }, metadata: a }, P, R), d(r, null, D, { kind: "accessor", name: "selected", static: !1, private: !1, access: { has: (t) => "selected" in t, get: (t) => t.selected, set: (t, e) => {
|
|
221
230
|
t.selected = e;
|
|
222
231
|
} }, metadata: a }, L, V), d(r, null, j, { kind: "accessor", name: "focused", static: !1, private: !1, access: { has: (t) => "focused" in t, get: (t) => t.focused, set: (t, e) => {
|
|
223
232
|
t.focused = e;
|
|
224
|
-
} }, metadata: a }, H,
|
|
233
|
+
} }, metadata: a }, H, U), d(r, null, F, { kind: "accessor", name: "index", static: !1, private: !1, access: { has: (t) => "index" in t, get: (t) => t.index, set: (t, e) => {
|
|
225
234
|
t.index = e;
|
|
226
|
-
} }, metadata: a },
|
|
235
|
+
} }, metadata: a }, G, K), d(r, null, M, { kind: "accessor", name: "freePlacesByType", static: !1, private: !1, access: { has: (t) => "freePlacesByType" in t, get: (t) => t.freePlacesByType, set: (t, e) => {
|
|
236
|
+
t.freePlacesByType = e;
|
|
237
|
+
} }, metadata: a }, q, Y), d(r, null, X, { kind: "accessor", name: "travelClass", static: !1, private: !1, access: { has: (t) => "travelClass" in t, get: (t) => t.travelClass, set: (t, e) => {
|
|
227
238
|
t.travelClass = e;
|
|
228
|
-
} }, metadata: a },
|
|
239
|
+
} }, metadata: a }, J, Q), d(r, null, W, { kind: "accessor", name: "driverArea", static: !1, private: !1, access: { has: (t) => "driverArea" in t, get: (t) => t.driverArea, set: (t, e) => {
|
|
229
240
|
t.driverArea = e;
|
|
230
|
-
} }, metadata: a },
|
|
241
|
+
} }, metadata: a }, Z, tt), d(r, null, at, { kind: "accessor", name: "first", static: !1, private: !1, access: { has: (t) => "first" in t, get: (t) => t.first, set: (t, e) => {
|
|
231
242
|
t.first = e;
|
|
232
|
-
} }, metadata: a },
|
|
243
|
+
} }, metadata: a }, et, st), d(r, null, it, { kind: "accessor", name: "last", static: !1, private: !1, access: { has: (t) => "last" in t, get: (t) => t.last, set: (t, e) => {
|
|
233
244
|
t.last = e;
|
|
234
|
-
} }, metadata: a },
|
|
245
|
+
} }, metadata: a }, rt, ot), d(r, null, nt, { kind: "accessor", name: "disable", static: !1, private: !1, access: { has: (t) => "disable" in t, get: (t) => t.disable, set: (t, e) => {
|
|
235
246
|
t.disable = e;
|
|
236
|
-
} }, metadata: a },
|
|
247
|
+
} }, metadata: a }, ct, lt), d(r, null, bt, { kind: "accessor", name: "vertical", static: !1, private: !1, access: { has: (t) => "vertical" in t, get: (t) => t.vertical, set: (t, e) => {
|
|
237
248
|
t.vertical = e;
|
|
238
|
-
} }, metadata: a },
|
|
239
|
-
})(), r.styles =
|
|
249
|
+
} }, metadata: a }, dt, vt), d(null, n = { value: h }, o, { kind: "class", name: h.name, metadata: a }, null, c), h = n.value, a && Object.defineProperty(h, Symbol.metadata, { enumerable: !0, configurable: !0, writable: !0, value: a });
|
|
250
|
+
})(), r.styles = It, r.events = {
|
|
240
251
|
selectcoach: "selectcoach",
|
|
241
252
|
focuscoach: "focuscoach"
|
|
242
253
|
}, i(h, c), h;
|
|
243
254
|
})();
|
|
244
255
|
export {
|
|
245
|
-
|
|
256
|
+
Rt as SbbSeatReservationNavigationCoachElement
|
|
246
257
|
};
|
|
@@ -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,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;
|
|
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,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;CA2BrB;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAE7B,oCAAoC,EAAE,qCAAqC,CAAC;KAC7E;CACF"}
|