@sbb-esta/lyne-elements-experimental 3.1.0 → 3.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/custom-elements.json +1147 -590
- package/development/seat-reservation/common/mapper/icon-mapper.d.ts.map +1 -1
- package/development/seat-reservation/common/mapper/icon-mapper.js +4 -5
- package/development/seat-reservation/common/mapper/mapper.d.ts +6 -5
- package/development/seat-reservation/common/mapper/mapper.d.ts.map +1 -1
- package/development/seat-reservation/common/mapper/mapper.js +14 -11
- package/development/seat-reservation/common/mapper/seat-reservation-sample-data.d.ts +113 -0
- 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 +25999 -649
- 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.d.ts.map +1 -1
- package/development/seat-reservation/common/translations/i18n.js +225 -194
- package/development/seat-reservation/common/types.d.ts +20 -3
- package/development/seat-reservation/common/types.d.ts.map +1 -1
- package/development/seat-reservation/seat-reservation/seat-reservation-base-element.d.ts +50 -18
- 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 +352 -172
- package/development/seat-reservation/seat-reservation/seat-reservation.component.d.ts +29 -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 +603 -308
- 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 +54 -32
- package/development/seat-reservation/seat-reservation-place-control/seat-reservation-place-control.component.d.ts +2 -0
- 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 +107 -58
- 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 +2 -2
- package/seat-reservation/common/mapper/icon-mapper.d.ts.map +1 -1
- package/seat-reservation/common/mapper/icon-mapper.js +3 -4
- package/seat-reservation/common/mapper/mapper.d.ts +6 -5
- package/seat-reservation/common/mapper/mapper.d.ts.map +1 -1
- package/seat-reservation/common/mapper/mapper.js +35 -32
- package/seat-reservation/common/mapper/seat-reservation-sample-data.d.ts +113 -0
- package/seat-reservation/common/mapper/seat-reservation-sample-data.d.ts.map +1 -1
- package/seat-reservation/common/mapper/seat-reservation-sample-data.js +25997 -648
- 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.d.ts.map +1 -1
- package/seat-reservation/common/translations/i18n.js +228 -197
- package/seat-reservation/common/types.d.ts +20 -3
- package/seat-reservation/common/types.d.ts.map +1 -1
- package/seat-reservation/seat-reservation/seat-reservation-base-element.d.ts +50 -18
- package/seat-reservation/seat-reservation/seat-reservation-base-element.d.ts.map +1 -1
- package/seat-reservation/seat-reservation/seat-reservation-base-element.js +294 -175
- package/seat-reservation/seat-reservation/seat-reservation.component.d.ts +29 -13
- package/seat-reservation/seat-reservation/seat-reservation.component.d.ts.map +1 -1
- package/seat-reservation/seat-reservation/seat-reservation.component.js +318 -303
- 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 +95 -84
- package/seat-reservation/seat-reservation-place-control/seat-reservation-place-control.component.d.ts +2 -0
- 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 +75 -63
- 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,50 +1,51 @@
|
|
|
1
|
-
var
|
|
1
|
+
var he = (o) => {
|
|
2
2
|
throw TypeError(o);
|
|
3
3
|
};
|
|
4
|
-
var
|
|
5
|
-
var l = (o, n, c) => (
|
|
6
|
-
import { __runInitializers as
|
|
7
|
-
import { SbbLanguageController as
|
|
4
|
+
var _e = (o, n, c) => n.has(o) || he("Cannot " + c);
|
|
5
|
+
var l = (o, n, c) => (_e(o, n, "read from private field"), c ? c.call(o) : n.get(o)), b = (o, n, c) => n.has(o) ? he("Cannot add the same private member more than once") : n instanceof WeakSet ? n.add(o) : n.set(o, c), s = (o, n, c, h) => (_e(o, n, "write to private field"), h ? h.call(o, c) : n.set(o, c), c);
|
|
6
|
+
import { __runInitializers as r, __esDecorate as v } from "tslib";
|
|
7
|
+
import { SbbLanguageController as pe } 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 fe, LitElement as ye, nothing as w, html as g } from "lit";
|
|
10
|
+
import { customElement as xe, property as d } from "lit/decorators.js";
|
|
11
|
+
import { classMap as ge } 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 = [
|
|
19
|
-
return
|
|
15
|
+
const Ie = fe`*,:before,:after{box-sizing:border-box}:host{--sbb-seat-reservation-navigation-travelclass-spacing: 10;--sbb-seat-reservation-navigation-btn-outline-color: var(--sbb-color-granite);--sbb-seat-reservation-navigation-btn-outline-width: 1;--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: 2;--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:calc(80 * var(--sbb-seat-reservation-one-px-rem, .0625rem));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:calc(var(--sbb-seat-reservation-navigation-travelclass-spacing) * var(--sbb-seat-reservation-one-px-rem, .0625rem))}.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:calc(var(--sbb-seat-reservation-navigation-travelclass-spacing) * var(--sbb-seat-reservation-one-px-rem, .0625rem))}.sbb-sr-navigation__item-coach.last-coach .sbb-sr-navigation--first-class{margin-inline-end:calc(var(--sbb-seat-reservation-navigation-travelclass-spacing) * var(--sbb-seat-reservation-one-px-rem, .0625rem))}.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:calc(36 * var(--sbb-seat-reservation-one-px-rem, .0625rem));position:relative;outline:calc(var(--sbb-seat-reservation-navigation-btn-outline-width) * var(--sbb-seat-reservation-one-px-rem, .0625rem)) 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:calc(8 * var(--sbb-seat-reservation-one-px-rem, .0625rem));padding-inline:calc(16 * var(--sbb-seat-reservation-one-px-rem, .0625rem));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% - 8 * var(--sbb-seat-reservation-one-px-rem, .0625rem));position:absolute;inset-block-start:calc(3 * var(--sbb-seat-reservation-one-px-rem, .0625rem));inset-inline-start:calc(4 * var(--sbb-seat-reservation-one-px-rem, .0625rem));border:calc(1 * var(--sbb-seat-reservation-one-px-rem, .0625rem)) 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:calc(20 * var(--sbb-seat-reservation-one-px-rem, .0625rem));min-width:calc(20 * var(--sbb-seat-reservation-one-px-rem, .0625rem));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:calc(80 * var(--sbb-seat-reservation-one-px-rem, .0625rem));min-width:calc(36 * var(--sbb-seat-reservation-one-px-rem, .0625rem))}.sbb-sr-navigation__item-coach.vertical-coach .sbb-sr-navigation__additional-information{flex-direction:column-reverse;padding-block:calc(16 * var(--sbb-seat-reservation-one-px-rem, .0625rem));padding-inline-start:unset;padding-inline-end:unset}.sbb-sr-navigation__item-coach.vertical-coach .sbb-sr-navigation--first-class{height:calc(100% - 8 * var(--sbb-seat-reservation-one-px-rem, .0625rem));width:initial;inset-inline-end:calc(3 * var(--sbb-seat-reservation-one-px-rem, .0625rem));inset-block-start:calc(4 * var(--sbb-seat-reservation-one-px-rem, .0625rem));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% - 18 * var(--sbb-seat-reservation-one-px-rem, .0625rem))}.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:calc(var(--sbb-seat-reservation-navigation-travelclass-spacing) * var(--sbb-seat-reservation-one-px-rem, .0625rem));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:calc(var(--sbb-seat-reservation-navigation-travelclass-spacing) * var(--sbb-seat-reservation-one-px-rem, .0625rem));margin-inline-end:initial}.sbb-sr-navigation__item-coach.vertical-coach .sbb-sr-navigation-driver-area{height:calc(80 * var(--sbb-seat-reservation-one-px-rem, .0625rem));min-width:calc(36 * var(--sbb-seat-reservation-one-px-rem, .0625rem))}`, Ce = 3;
|
|
16
|
+
let Re = (() => {
|
|
17
|
+
var m, p, f, y, x, I, C, k, A, S, B, E, i;
|
|
18
|
+
let o = [xe("sbb-seat-reservation-navigation-coach")], n, c = [], h, z = ye, T, N = [], $ = [], O, P = [], R = [], D, L = [], V = [], j, H = [], U = [], F, G = [], K = [], M, q = [], Y = [], X, J = [], Q = [], W, Z = [], ee = [], ae, te = [], se = [], re, ie = [], oe = [], ne, ce = [], le = [], be, ve = [], de = [];
|
|
19
|
+
return i = class extends z {
|
|
20
20
|
constructor() {
|
|
21
21
|
super(...arguments);
|
|
22
|
-
b(this, u);
|
|
23
22
|
b(this, m);
|
|
24
|
-
b(this, f);
|
|
25
23
|
b(this, p);
|
|
26
|
-
b(this,
|
|
24
|
+
b(this, f);
|
|
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, B);
|
|
33
|
+
b(this, E);
|
|
34
|
+
s(this, m, r(this, N, "")), s(this, p, (r(this, $), r(this, P, []))), s(this, f, (r(this, R), r(this, L, !1))), s(this, y, (r(this, V), r(this, H, !1))), s(this, x, (r(this, U), r(this, G, 0))), s(this, I, (r(this, K), r(this, q, { seats: 0, bicycles: 0 }))), s(this, C, (r(this, Y), r(this, J, ["ANY_CLASS"]))), s(this, k, (r(this, Q), r(this, Z, !1))), s(this, A, (r(this, ee), r(this, te, !1))), s(this, S, (r(this, se), r(this, ie, !1))), s(this, B, (r(this, oe), r(this, ce, !1))), s(this, E, (r(this, le), r(this, ve, !1))), this._language = (r(this, de), new pe(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, p);
|
|
45
46
|
}
|
|
46
47
|
set propertyIds(a) {
|
|
47
|
-
s(this,
|
|
48
|
+
s(this, p, a);
|
|
48
49
|
}
|
|
49
50
|
/* pre-selected Coach index property */
|
|
50
51
|
get selected() {
|
|
@@ -55,10 +56,10 @@ let $t = (() => {
|
|
|
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,56 +67,63 @@ 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, B);
|
|
100
108
|
}
|
|
101
109
|
set disable(a) {
|
|
102
|
-
s(this,
|
|
110
|
+
s(this, B, 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, E);
|
|
107
115
|
}
|
|
108
116
|
set vertical(a) {
|
|
109
|
-
s(this,
|
|
117
|
+
s(this, E, a);
|
|
110
118
|
}
|
|
111
119
|
willUpdate(a) {
|
|
112
120
|
if (super.willUpdate(a), a.has("selected")) {
|
|
113
|
-
const
|
|
114
|
-
this.selected &&
|
|
121
|
+
const e = this.shadowRoot?.querySelector(".sbb-sr-navigation__ctrl-button");
|
|
122
|
+
this.selected && e && (e.focus(), this.dispatchEvent(new Event("focuscoach", { bubbles: !0, composed: !0 })));
|
|
115
123
|
}
|
|
116
124
|
if (a.has("focused") && this.focused) {
|
|
117
|
-
const
|
|
118
|
-
|
|
125
|
+
const e = this.shadowRoot?.querySelector(".sbb-sr-navigation__ctrl-button");
|
|
126
|
+
e && e.focus();
|
|
119
127
|
}
|
|
120
128
|
}
|
|
121
129
|
/**
|
|
@@ -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, Ce), g`
|
|
130
138
|
<div
|
|
131
|
-
class="${
|
|
139
|
+
class="${ge({
|
|
132
140
|
"sbb-sr-navigation__item-coach": !0,
|
|
133
141
|
"last-coach": this.last,
|
|
134
142
|
"first-coach": this.first,
|
|
@@ -140,61 +148,62 @@ let $t = (() => {
|
|
|
140
148
|
${this.propertyIds?.length ? g`<sbb-seat-reservation-navigation-services
|
|
141
149
|
?vertical="${this.vertical}"
|
|
142
150
|
.propertyIds="${this.propertyIds}"
|
|
143
|
-
></sbb-seat-reservation-navigation-services>` :
|
|
151
|
+
></sbb-seat-reservation-navigation-services>` : w}
|
|
144
152
|
</div>
|
|
145
153
|
`;
|
|
146
154
|
}
|
|
147
155
|
_getNavigationButton() {
|
|
148
|
-
const a = this._getCoachServiceClassNumber(),
|
|
156
|
+
const a = this._getCoachServiceClassNumber(), e = this._getTitleDescriptionNavCoachButton(a), t = this._getAriaDescriptionCoachServices();
|
|
149
157
|
return g` <button
|
|
150
158
|
type="button"
|
|
151
159
|
?disabled="${this.disable}"
|
|
152
|
-
class="${
|
|
160
|
+
class="${ge({
|
|
153
161
|
"sbb-sr-navigation__ctrl-button": !0,
|
|
154
162
|
"sbb-sr-navigation-driver-area": this.driverArea
|
|
155
163
|
})}"
|
|
156
|
-
title="${
|
|
164
|
+
title="${e}"
|
|
157
165
|
aria-describedby="nav-coach-service-descriptions-${this.index}"
|
|
158
166
|
@click=${() => this._selectNavCoach(this.index)}
|
|
159
167
|
>
|
|
160
168
|
${this._getBtnInformation(a)}
|
|
161
169
|
</button>
|
|
162
170
|
<sbb-screen-reader-only id="nav-coach-service-descriptions-${this.index}"
|
|
163
|
-
>${
|
|
171
|
+
>${t}</sbb-screen-reader-only
|
|
164
172
|
>`;
|
|
165
173
|
}
|
|
166
174
|
_getBtnInformation(a) {
|
|
167
175
|
return this.driverArea ? null : g`
|
|
168
|
-
${a === 1 ? g`<span class="sbb-sr-navigation--first-class"></span>` :
|
|
176
|
+
${a === 1 ? g`<span class="sbb-sr-navigation--first-class"></span>` : w}
|
|
169
177
|
${this.travelClass?.length > 0 || this.coachId ? g`<div class="sbb-sr-navigation__additional-information">
|
|
170
178
|
${this.coachId ? g`<div class="sbb-sr-navigation__item-coach-number" aria-hidden="true">
|
|
171
179
|
${this.coachId}
|
|
172
|
-
</div>` :
|
|
180
|
+
</div>` : w}
|
|
173
181
|
<div
|
|
174
|
-
${a ??
|
|
182
|
+
${a ?? w}
|
|
175
183
|
class="sbb-sr-navigation__item-coach-travelclass"
|
|
176
184
|
aria-hidden="true"
|
|
177
185
|
>
|
|
178
186
|
${a}
|
|
179
187
|
</div>
|
|
180
|
-
</div>` :
|
|
188
|
+
</div>` : w}
|
|
181
189
|
`;
|
|
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
|
|
196
|
+
let e = u("NAVIGATE_TO_COACH", this._language.current, [this.coachId]);
|
|
189
197
|
if (a) {
|
|
190
|
-
const
|
|
191
|
-
|
|
198
|
+
const ue = u(a === 1 ? "SERVICE_CLASS_FIRST" : "SERVICE_CLASS_SECOND", this._language.current), me = u("NAVIGATE_TO_COACH_SERVICE_CLASS_SUB", this._language.current, [ue]);
|
|
199
|
+
e = e.concat(me);
|
|
192
200
|
}
|
|
193
|
-
|
|
201
|
+
const t = u("COACH_AVAILABLE_NUMBER_OF_PLACES", this._language.current, [this.freePlacesByType.seats, this.freePlacesByType.bicycles]);
|
|
202
|
+
return e = e.concat(". ").concat(t), e;
|
|
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((e) => u(e, 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(), p = new WeakMap(), f = new WeakMap(), y = new WeakMap(), x = new WeakMap(), I = new WeakMap(), C = new WeakMap(), k = new WeakMap(), A = new WeakMap(), S = new WeakMap(), B = new WeakMap(), E = new WeakMap(), h = i, (() => {
|
|
215
224
|
const a = typeof Symbol == "function" && Symbol.metadata ? Object.create(z[Symbol.metadata] ?? null) : void 0;
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
} }, metadata: a },
|
|
219
|
-
|
|
220
|
-
} }, metadata: a },
|
|
221
|
-
|
|
222
|
-
} }, metadata: a }, L, V),
|
|
223
|
-
|
|
224
|
-
} }, metadata: a }, H,
|
|
225
|
-
|
|
226
|
-
} }, metadata: a },
|
|
227
|
-
|
|
228
|
-
} }, metadata: a },
|
|
229
|
-
|
|
230
|
-
} }, metadata: a },
|
|
231
|
-
|
|
232
|
-
} }, metadata: a },
|
|
233
|
-
|
|
234
|
-
} }, metadata: a },
|
|
235
|
-
|
|
236
|
-
} }, metadata: a },
|
|
237
|
-
|
|
238
|
-
} }, metadata: a },
|
|
239
|
-
|
|
225
|
+
T = [_(), d({ attribute: "coach-id" })], O = [d({ attribute: "property-ids", type: Array })], D = [_(), d({ type: Boolean })], j = [_(), d({ type: Boolean })], F = [_(), d({ type: Number })], M = [d({ attribute: "free-places-by-type", type: Object })], X = [d({ attribute: "travel-class", type: Array })], W = [_(), d({ attribute: "driver-area", type: Boolean })], ae = [_(), d({ type: Boolean })], re = [_(), d({ type: Boolean })], ne = [_(), d({ attribute: "disable", type: Boolean })], be = [_(), d({ type: Boolean })], v(i, null, T, { kind: "accessor", name: "coachId", static: !1, private: !1, access: { has: (e) => "coachId" in e, get: (e) => e.coachId, set: (e, t) => {
|
|
226
|
+
e.coachId = t;
|
|
227
|
+
} }, metadata: a }, N, $), v(i, null, O, { kind: "accessor", name: "propertyIds", static: !1, private: !1, access: { has: (e) => "propertyIds" in e, get: (e) => e.propertyIds, set: (e, t) => {
|
|
228
|
+
e.propertyIds = t;
|
|
229
|
+
} }, metadata: a }, P, R), v(i, null, D, { kind: "accessor", name: "selected", static: !1, private: !1, access: { has: (e) => "selected" in e, get: (e) => e.selected, set: (e, t) => {
|
|
230
|
+
e.selected = t;
|
|
231
|
+
} }, metadata: a }, L, V), v(i, null, j, { kind: "accessor", name: "focused", static: !1, private: !1, access: { has: (e) => "focused" in e, get: (e) => e.focused, set: (e, t) => {
|
|
232
|
+
e.focused = t;
|
|
233
|
+
} }, metadata: a }, H, U), v(i, null, F, { kind: "accessor", name: "index", static: !1, private: !1, access: { has: (e) => "index" in e, get: (e) => e.index, set: (e, t) => {
|
|
234
|
+
e.index = t;
|
|
235
|
+
} }, metadata: a }, G, K), v(i, null, M, { kind: "accessor", name: "freePlacesByType", static: !1, private: !1, access: { has: (e) => "freePlacesByType" in e, get: (e) => e.freePlacesByType, set: (e, t) => {
|
|
236
|
+
e.freePlacesByType = t;
|
|
237
|
+
} }, metadata: a }, q, Y), v(i, null, X, { kind: "accessor", name: "travelClass", static: !1, private: !1, access: { has: (e) => "travelClass" in e, get: (e) => e.travelClass, set: (e, t) => {
|
|
238
|
+
e.travelClass = t;
|
|
239
|
+
} }, metadata: a }, J, Q), v(i, null, W, { kind: "accessor", name: "driverArea", static: !1, private: !1, access: { has: (e) => "driverArea" in e, get: (e) => e.driverArea, set: (e, t) => {
|
|
240
|
+
e.driverArea = t;
|
|
241
|
+
} }, metadata: a }, Z, ee), v(i, null, ae, { kind: "accessor", name: "first", static: !1, private: !1, access: { has: (e) => "first" in e, get: (e) => e.first, set: (e, t) => {
|
|
242
|
+
e.first = t;
|
|
243
|
+
} }, metadata: a }, te, se), v(i, null, re, { kind: "accessor", name: "last", static: !1, private: !1, access: { has: (e) => "last" in e, get: (e) => e.last, set: (e, t) => {
|
|
244
|
+
e.last = t;
|
|
245
|
+
} }, metadata: a }, ie, oe), v(i, null, ne, { kind: "accessor", name: "disable", static: !1, private: !1, access: { has: (e) => "disable" in e, get: (e) => e.disable, set: (e, t) => {
|
|
246
|
+
e.disable = t;
|
|
247
|
+
} }, metadata: a }, ce, le), v(i, null, be, { kind: "accessor", name: "vertical", static: !1, private: !1, access: { has: (e) => "vertical" in e, get: (e) => e.vertical, set: (e, t) => {
|
|
248
|
+
e.vertical = t;
|
|
249
|
+
} }, metadata: a }, ve, de), v(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
|
+
})(), i.styles = Ie, i.events = {
|
|
240
251
|
selectcoach: "selectcoach",
|
|
241
252
|
focuscoach: "focuscoach"
|
|
242
|
-
},
|
|
253
|
+
}, r(h, c), h;
|
|
243
254
|
})();
|
|
244
255
|
export {
|
|
245
|
-
|
|
256
|
+
Re as SbbSeatReservationNavigationCoachElement
|
|
246
257
|
};
|
|
@@ -25,6 +25,8 @@ export declare class SbbSeatReservationPlaceControlElement extends SbbButtonBase
|
|
|
25
25
|
accessor text: string;
|
|
26
26
|
/** Rotation of the text in degrees (without unit) */
|
|
27
27
|
accessor textRotation: number;
|
|
28
|
+
/** Deck Index Prop to identifier the right place to deck */
|
|
29
|
+
accessor deckIndex: number;
|
|
28
30
|
/** Coach Index Prop to identifier the right place to coach */
|
|
29
31
|
accessor coachIndex: number;
|
|
30
32
|
/** Prevent click prop prevent any place action */
|
|
@@ -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,4DAA4D;IAC5D,SAEgB,SAAS,EAAE,MAAM,CAAS;IAE1C,8DAA8D;IAC9D,SAEgB,UAAU,EAAE,MAAM,CAAS;IAE3C,kDAAkD;IAClD,SAEgB,YAAY,EAAE,OAAO,CAAS;IAE9C,wCAAwC;IACxC,SAEgB,QAAQ,EAAE,MAAM,CAAa;IAE7C,OAAO,CAAC,SAAS,CAAmC;;cAOjC,UAAU,CAAC,iBAAiB,EAAE,cAAc,CAAC,IAAI,CAAC,GAAG,IAAI;cA4BzD,MAAM,IAAI,cAAc;IAkC3C,OAAO,CAAC,YAAY;IAMpB,OAAO,CAAC,yBAAyB;IAejC,yGAAyG;IACzG,OAAO,CAAC,YAAY;CA4BrB;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAE7B,oCAAoC,EAAE,qCAAqC,CAAC;KAC7E;CACF"}
|