@sbb-esta/lyne-elements-experimental 5.0.0-next.3 → 5.0.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.
- package/_index.scss +2 -0
- package/{core.css → autocomplete-grid/_autocomplete-grid.global.scss} +4 -3
- package/autocomplete-grid/autocomplete-grid/autocomplete-grid.component.js +4 -4
- package/autocomplete-grid/autocomplete-grid-button/autocomplete-grid-button.component.js +42 -66
- package/autocomplete-grid/autocomplete-grid-cell/autocomplete-grid-cell.component.js +1 -1
- package/autocomplete-grid/autocomplete-grid-option/autocomplete-grid-option.component.js +1 -1
- package/autocomplete-grid/autocomplete-grid-row/autocomplete-grid-row.component.js +1 -1
- package/{autocomplete-grid-option.component-kcihiOWt.js → autocomplete-grid-option.component-DUFBhQwI.js} +1 -1
- package/autocomplete-grid.js +3 -3
- package/autocomplete-grid.pure.js +3 -3
- package/core/datetime/date-helper.js +1 -1
- package/core/styles/_theme.scss +19 -0
- package/core.js +1 -1
- package/custom-elements.json +165 -27
- package/{date-helper-CuMnZCsr.js → date-helper-DNzMLcyb.js} +3 -3
- package/development/autocomplete-grid/autocomplete-grid/autocomplete-grid.component.d.ts.map +1 -1
- package/development/autocomplete-grid/autocomplete-grid/autocomplete-grid.component.js +5 -5
- package/development/autocomplete-grid/autocomplete-grid-button/autocomplete-grid-button.component.d.ts.map +1 -1
- package/development/autocomplete-grid/autocomplete-grid-button/autocomplete-grid-button.component.js +54 -83
- package/development/autocomplete-grid/autocomplete-grid-cell/autocomplete-grid-cell.component.js +1 -1
- package/development/autocomplete-grid/autocomplete-grid-optgroup/autocomplete-grid-optgroup.component.js +1 -1
- package/development/autocomplete-grid/autocomplete-grid-option/autocomplete-grid-option.component.d.ts +0 -1
- package/development/autocomplete-grid/autocomplete-grid-option/autocomplete-grid-option.component.d.ts.map +1 -1
- package/development/autocomplete-grid/autocomplete-grid-option/autocomplete-grid-option.component.js +1 -1
- package/development/autocomplete-grid/autocomplete-grid-row/autocomplete-grid-row.component.js +1 -1
- package/development/{autocomplete-grid-cell.component-BF8i4388.js → autocomplete-grid-cell.component-BbdELDro.js} +1 -1
- package/development/{autocomplete-grid-option.component-D9pTXPlu.js → autocomplete-grid-option.component-C7WuqRit.js} +1 -2
- package/development/{autocomplete-grid-row.component-CBHh50jC.js → autocomplete-grid-row.component-DoXbOsQM.js} +1 -1
- package/development/autocomplete-grid.js +4 -4
- package/development/autocomplete-grid.pure.js +3 -3
- package/development/core/datetime/date-helper.js +1 -1
- package/development/core/timetable/access-leg-helper.js +1 -1
- package/development/core/timetable/timetable-helper.js +1 -1
- package/development/core.js +1 -1
- package/development/date-helper-BcTDWVeP.js +539 -0
- package/development/{differenceInMinutes-B7_GTDq7.js → differenceInMinutes-CxAbGYQ3.js} +2 -2
- package/development/{format-DFx4997p.js → format-Cx3zmmaF.js} +3 -3
- package/development/{isValid-JpZ7FphI.js → isValid-40Olgzo1.js} +2 -2
- package/development/journey-summary/journey-summary.component.js +1 -1
- package/development/journey-summary.component-BsC7wBIn.js +341 -0
- package/development/journey-summary.js +2 -2
- package/development/journey-summary.pure.js +1 -1
- package/development/{mapper-hWWm7Uke.js → mapper-BrZOqqfe.js} +1 -1
- package/development/pearl-chain/pearl-chain.component.js +1 -1
- package/development/pearl-chain-time/pearl-chain-time.component.js +1 -1
- package/development/{pearl-chain-time.component-BxVQ1z-Z.js → pearl-chain-time.component-C-CuC1ke.js} +3 -3
- package/development/pearl-chain-time.js +2 -2
- package/development/pearl-chain-time.pure.js +1 -1
- package/development/pearl-chain-vertical/pearl-chain-vertical.component.js +1 -1
- package/development/pearl-chain-vertical-item/pearl-chain-vertical-item.component.js +1 -1
- package/development/{pearl-chain-vertical-item.component-DJioJtxP.js → pearl-chain-vertical-item.component-CLu9QrqJ.js} +2 -2
- package/development/pearl-chain-vertical-item.js +2 -2
- package/development/pearl-chain-vertical-item.pure.js +1 -1
- package/development/{pearl-chain-vertical.component-zSOeIkhh.js → pearl-chain-vertical.component-DbPz5k_R.js} +1 -1
- package/development/pearl-chain-vertical.js +2 -2
- package/development/pearl-chain-vertical.pure.js +1 -1
- package/development/pearl-chain.component-10OsJZIX.js +318 -0
- package/development/pearl-chain.js +2 -2
- package/development/pearl-chain.pure.js +1 -1
- package/development/seat-reservation/common/mapper/icon-mapper.js +1 -1
- package/development/seat-reservation/common/mapper/mapper.js +1 -1
- package/development/seat-reservation/common/mapper.js +1 -1
- package/development/seat-reservation/common/svgs.js +1 -1
- package/development/seat-reservation/common/translations/i18n.js +1 -1
- package/development/seat-reservation/seat-reservation/seat-reservation-base-element.d.ts +11 -1
- 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 +41 -24
- package/development/seat-reservation/seat-reservation/seat-reservation.component.d.ts.map +1 -1
- package/development/seat-reservation/seat-reservation/seat-reservation.component.js +1 -1
- package/development/seat-reservation/seat-reservation-area/seat-reservation-area.component.js +1 -1
- package/development/seat-reservation/seat-reservation-graphic/seat-reservation-graphic.component.js +1 -1
- package/development/seat-reservation/seat-reservation-navigation-coach/seat-reservation-navigation-coach.component.d.ts +6 -2
- 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 +2 -2
- package/development/seat-reservation/seat-reservation-navigation-services/seat-reservation-navigation-services.component.js +1 -1
- package/development/seat-reservation/seat-reservation-place-control/seat-reservation-place-control.component.d.ts +6 -2
- 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 +2 -2
- package/development/seat-reservation/seat-reservation-scoped/seat-reservation-scoped.component.js +1 -1
- package/development/{seat-reservation-area.component-CMqjbUtV.js → seat-reservation-area.component-DPhQJFid.js} +2 -2
- package/development/{seat-reservation-graphic.component-C2r57590.js → seat-reservation-graphic.component-0LYsmerm.js} +2 -2
- package/development/seat-reservation-navigation-coach.component-B97jKD7Y.js +438 -0
- package/development/{seat-reservation-navigation-services.component-Do8JLJh3.js → seat-reservation-navigation-services.component-Cx0Is97w.js} +2 -2
- package/development/{seat-reservation-place-control.component-BfuOGZYq.js → seat-reservation-place-control.component-DaL1g8WH.js} +40 -37
- package/development/{seat-reservation-scoped.component-D-Mvw-Q3.js → seat-reservation-scoped.component-BHbORVsR.js} +1 -1
- package/development/seat-reservation.component-DI9pSlzt.js +473 -0
- package/development/seat-reservation.js +12 -12
- package/development/seat-reservation.pure.js +11 -11
- package/development/{svgs-kDpBCto5.js → svgs-Dj-RKmRs.js} +1 -1
- package/development/timetable-duration/timetable-duration.component.js +1 -1
- package/development/timetable-duration.component-Chk5D4Is.js +96 -0
- package/development/timetable-duration.js +2 -2
- package/development/timetable-duration.pure.js +1 -1
- package/development/timetable-row/timetable-row.component.d.ts.map +1 -1
- package/development/timetable-row/timetable-row.component.js +1 -1
- package/development/timetable-row.component-nzrQzxL6.js +736 -0
- package/development/timetable-row.js +2 -2
- package/development/timetable-row.pure.js +1 -1
- package/development/{toDate-DOFAOjP-.js → toDate-CDWut5fS.js} +1 -1
- package/{differenceInMinutes-Dr9gRqtu.js → differenceInMinutes-BAZ-Fham.js} +1 -1
- package/{format-DbUuNYFU.js → format-DjgG1QPc.js} +2 -2
- package/{isValid-B9oVW3lA.js → isValid-CXnsFZVu.js} +1 -1
- package/journey-summary/journey-summary.component.js +1 -1
- package/{journey-summary.component-CkDRawn9.js → journey-summary.component-DNoO3OCf.js} +41 -41
- package/journey-summary.js +1 -1
- package/journey-summary.pure.js +1 -1
- package/package.json +6 -6
- package/pearl-chain/pearl-chain.component.js +1 -1
- package/pearl-chain-time/pearl-chain-time.component.js +1 -1
- package/{pearl-chain-time.component-D5OCEBJ_.js → pearl-chain-time.component-BuvA6IE1.js} +33 -33
- package/pearl-chain-time.js +1 -1
- package/pearl-chain-time.pure.js +1 -1
- package/pearl-chain-vertical/pearl-chain-vertical.component.js +1 -1
- package/pearl-chain-vertical-item/pearl-chain-vertical-item.component.js +1 -1
- package/{pearl-chain-vertical-item.component-IdquCJMy.js → pearl-chain-vertical-item.component-QZ4s8Jbv.js} +24 -24
- package/pearl-chain-vertical-item.js +1 -1
- package/pearl-chain-vertical-item.pure.js +1 -1
- package/pearl-chain-vertical.js +1 -1
- package/pearl-chain-vertical.pure.js +1 -1
- package/{pearl-chain.component-C6lcD7Xl.js → pearl-chain.component-DtGXXkY6.js} +26 -26
- package/pearl-chain.js +1 -1
- package/pearl-chain.pure.js +1 -1
- package/seat-reservation/common/mapper/mapper.js +1 -1
- package/seat-reservation/common/mapper.js +1 -1
- package/seat-reservation/common/svgs.js +1 -1
- package/seat-reservation/seat-reservation/seat-reservation-base-element.js +91 -77
- package/seat-reservation/seat-reservation/seat-reservation.component.js +1 -1
- package/seat-reservation/seat-reservation-area/seat-reservation-area.component.js +1 -1
- package/seat-reservation/seat-reservation-graphic/seat-reservation-graphic.component.js +1 -1
- package/seat-reservation/seat-reservation-navigation-coach/seat-reservation-navigation-coach.component.js +2 -2
- package/seat-reservation/seat-reservation-navigation-services/seat-reservation-navigation-services.component.js +1 -1
- package/seat-reservation/seat-reservation-place-control/seat-reservation-place-control.component.js +2 -2
- package/seat-reservation/seat-reservation-scoped/seat-reservation-scoped.component.js +1 -1
- package/{seat-reservation-area.component-BcmwKJSK.js → seat-reservation-area.component-G9lHb7S8.js} +16 -16
- package/{seat-reservation-graphic.component-C3wc4DKr.js → seat-reservation-graphic.component-BXFcQDxY.js} +20 -20
- package/seat-reservation-navigation-coach.component-BXy8EkJe.js +338 -0
- package/{seat-reservation-navigation-services.component-CfAQa7pa.js → seat-reservation-navigation-services.component-49XmV9rv.js} +21 -21
- package/{seat-reservation-place-control.component-DrzEDW8Z.js → seat-reservation-place-control.component-DToIW328.js} +70 -71
- package/{seat-reservation.component-RNI6_X71.js → seat-reservation.component--0XnrCkk.js} +78 -77
- package/seat-reservation.js +12 -12
- package/seat-reservation.pure.js +11 -11
- package/timetable-duration/timetable-duration.component.js +1 -1
- package/timetable-duration.component-iMCvh1zr.js +61 -0
- package/timetable-duration.js +1 -1
- package/timetable-duration.pure.js +1 -1
- package/timetable-row/timetable-row.component.js +1 -1
- package/{timetable-row.component-Din-TQ9u.js → timetable-row.component-mNKmhRmP.js} +89 -85
- package/timetable-row.js +1 -1
- package/timetable-row.pure.js +1 -1
- package/core/styles/core.scss +0 -13
- package/core/styles/theme.scss +0 -5
- package/development/date-helper-DGz-ztQM.js +0 -520
- package/development/journey-summary.component-De1ioDRq.js +0 -341
- package/development/pearl-chain.component-B83OsEx8.js +0 -312
- package/development/seat-reservation-navigation-coach.component-BwLbiHCG.js +0 -426
- package/development/seat-reservation.component-B-n0sIL5.js +0 -472
- package/development/timetable-duration.component-fBla8Kue.js +0 -96
- package/development/timetable-row.component-DSTGtQAC.js +0 -732
- package/seat-reservation-navigation-coach.component-D1SgS8BU.js +0 -328
- package/timetable-duration.component-DPRcG1LP.js +0 -61
- /package/{autocomplete-grid-cell.component-DAsWZlTn.js → autocomplete-grid-cell.component-79IjA__I.js} +0 -0
- /package/{autocomplete-grid-row.component-VbyYP0U-.js → autocomplete-grid-row.component-B3U15Rwa.js} +0 -0
- /package/{mapper-Cqie5ivY.js → mapper-Dcou8VEf.js} +0 -0
- /package/{pearl-chain-vertical.component-CDOWaup3.js → pearl-chain-vertical.component-Dc3vaHsQ.js} +0 -0
- /package/{seat-reservation-scoped.component-BohQUGVW.js → seat-reservation-scoped.component-D8dAmrP7.js} +0 -0
- /package/{svgs-D5DhLHxC.js → svgs-D4fuYTHV.js} +0 -0
- /package/{toDate-p-Tpkb7t.js → toDate-BhNUyM4s.js} +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { SbbElement as e, forceType as t, isArrowKeyOrPageKeysPressed as n } from "@sbb-esta/lyne-elements/core.js";
|
|
2
|
+
import { isServer as r } from "lit";
|
|
3
|
+
import { __esDecorate as i, __runInitializers as a } from "tslib";
|
|
4
4
|
import { eventOptions as o, property as s, state as c } from "lit/decorators.js";
|
|
5
5
|
import { mapCoachInfosToCoachSelection as l, mapIconToSvg as u, mapPlaceAndCoachToSeatReservationPlaceSelection as ee, mapPlaceInfosToPlaceSelection as te } from "../common/mapper.js";
|
|
6
6
|
//#region src/elements-experimental/seat-reservation/seat-reservation/seat-reservation-base-element.ts
|
|
@@ -16,47 +16,67 @@ var ne = 3, re = [
|
|
|
16
16
|
"sa-fa",
|
|
17
17
|
"sa-bz",
|
|
18
18
|
"sa-rz"
|
|
19
|
-
], f =
|
|
20
|
-
|
|
21
|
-
|
|
19
|
+
], f = class extends Event {
|
|
20
|
+
get detail() {
|
|
21
|
+
return this._detail;
|
|
22
|
+
}
|
|
23
|
+
constructor(e) {
|
|
24
|
+
super("selectedplaces", {
|
|
25
|
+
bubbles: !0,
|
|
26
|
+
composed: !0
|
|
27
|
+
}), this._detail = e;
|
|
28
|
+
}
|
|
29
|
+
}, p = class extends Event {
|
|
30
|
+
get detail() {
|
|
31
|
+
return this._detail;
|
|
32
|
+
}
|
|
33
|
+
constructor(e) {
|
|
34
|
+
super("selectedcoach", {
|
|
35
|
+
bubbles: !0,
|
|
36
|
+
composed: !0
|
|
37
|
+
}), this._detail = e;
|
|
38
|
+
}
|
|
39
|
+
}, m = (() => {
|
|
40
|
+
let m = e, h = [], g, _ = [], v = [], y, b = [], x = [], S, C = [], w = [], T, E = [], D = [], O, k = [], A = [], j, ie = [], M = [], N, P = [], F = [], I, L = [], R = [], z, B = [], V = [], H, U = [], W = [], G, K = [], q = [], J, Y = [], X = [], Z, Q = [], $ = [], ae, oe = [], se = [], ce;
|
|
41
|
+
return class extends m {
|
|
22
42
|
static {
|
|
23
|
-
let
|
|
24
|
-
|
|
43
|
+
let e = typeof Symbol == "function" && Symbol.metadata ? Object.create(m[Symbol.metadata] ?? null) : void 0;
|
|
44
|
+
g = [s({
|
|
25
45
|
attribute: "seat-reservations",
|
|
26
46
|
type: Array
|
|
27
|
-
})],
|
|
47
|
+
})], y = [s({
|
|
28
48
|
attribute: "travel-direction",
|
|
29
49
|
type: String
|
|
30
|
-
})],
|
|
50
|
+
})], S = [t(), s({
|
|
31
51
|
attribute: "has-navigation",
|
|
32
52
|
type: Boolean
|
|
33
|
-
})],
|
|
53
|
+
})], T = [t(), s({
|
|
34
54
|
attribute: "align-vertical",
|
|
35
55
|
type: Boolean,
|
|
36
56
|
reflect: !0,
|
|
37
57
|
useDefault: !0
|
|
38
|
-
})],
|
|
58
|
+
})], O = [t(), s({
|
|
39
59
|
attribute: "base-grid-size",
|
|
40
60
|
type: Number
|
|
41
|
-
})],
|
|
61
|
+
})], j = [t(), s({
|
|
42
62
|
attribute: "height",
|
|
43
63
|
type: Number
|
|
44
|
-
})],
|
|
64
|
+
})], N = [t(), s({
|
|
45
65
|
attribute: "max-seat-reservations",
|
|
46
66
|
type: Number
|
|
47
|
-
})],
|
|
67
|
+
})], I = [t(), s({
|
|
48
68
|
attribute: "max-bicycle-reservations",
|
|
49
69
|
type: Number
|
|
50
|
-
})],
|
|
70
|
+
})], z = [t(), s({
|
|
51
71
|
attribute: "prevent-place-click",
|
|
52
72
|
type: Boolean
|
|
53
|
-
})],
|
|
73
|
+
})], H = [t(), s({
|
|
54
74
|
attribute: "preselect-coach-index",
|
|
55
75
|
type: Number
|
|
56
|
-
})],
|
|
76
|
+
})], G = [t(), s({
|
|
57
77
|
attribute: "show-title-info",
|
|
58
78
|
type: Boolean
|
|
59
|
-
})],
|
|
79
|
+
})], J = [c()], Z = [c()], ae = [c()], ce = [o({ passive: !0 })], i(this, null, g, {
|
|
60
80
|
kind: "accessor",
|
|
61
81
|
name: "seatReservations",
|
|
62
82
|
static: !1,
|
|
@@ -68,8 +88,8 @@ var ne = 3, re = [
|
|
|
68
88
|
e.seatReservations = t;
|
|
69
89
|
}
|
|
70
90
|
},
|
|
71
|
-
metadata:
|
|
72
|
-
},
|
|
91
|
+
metadata: e
|
|
92
|
+
}, _, v), i(this, null, y, {
|
|
73
93
|
kind: "accessor",
|
|
74
94
|
name: "travelDirection",
|
|
75
95
|
static: !1,
|
|
@@ -81,8 +101,8 @@ var ne = 3, re = [
|
|
|
81
101
|
e.travelDirection = t;
|
|
82
102
|
}
|
|
83
103
|
},
|
|
84
|
-
metadata:
|
|
85
|
-
},
|
|
104
|
+
metadata: e
|
|
105
|
+
}, b, x), i(this, null, S, {
|
|
86
106
|
kind: "accessor",
|
|
87
107
|
name: "hasNavigation",
|
|
88
108
|
static: !1,
|
|
@@ -94,8 +114,8 @@ var ne = 3, re = [
|
|
|
94
114
|
e.hasNavigation = t;
|
|
95
115
|
}
|
|
96
116
|
},
|
|
97
|
-
metadata:
|
|
98
|
-
},
|
|
117
|
+
metadata: e
|
|
118
|
+
}, C, w), i(this, null, T, {
|
|
99
119
|
kind: "accessor",
|
|
100
120
|
name: "alignVertical",
|
|
101
121
|
static: !1,
|
|
@@ -107,8 +127,8 @@ var ne = 3, re = [
|
|
|
107
127
|
e.alignVertical = t;
|
|
108
128
|
}
|
|
109
129
|
},
|
|
110
|
-
metadata:
|
|
111
|
-
},
|
|
130
|
+
metadata: e
|
|
131
|
+
}, E, D), i(this, null, O, {
|
|
112
132
|
kind: "accessor",
|
|
113
133
|
name: "baseGridSize",
|
|
114
134
|
static: !1,
|
|
@@ -120,8 +140,8 @@ var ne = 3, re = [
|
|
|
120
140
|
e.baseGridSize = t;
|
|
121
141
|
}
|
|
122
142
|
},
|
|
123
|
-
metadata:
|
|
124
|
-
},
|
|
143
|
+
metadata: e
|
|
144
|
+
}, k, A), i(this, null, j, {
|
|
125
145
|
kind: "accessor",
|
|
126
146
|
name: "height",
|
|
127
147
|
static: !1,
|
|
@@ -133,8 +153,8 @@ var ne = 3, re = [
|
|
|
133
153
|
e.height = t;
|
|
134
154
|
}
|
|
135
155
|
},
|
|
136
|
-
metadata:
|
|
137
|
-
},
|
|
156
|
+
metadata: e
|
|
157
|
+
}, ie, M), i(this, null, N, {
|
|
138
158
|
kind: "accessor",
|
|
139
159
|
name: "maxSeatReservations",
|
|
140
160
|
static: !1,
|
|
@@ -146,8 +166,8 @@ var ne = 3, re = [
|
|
|
146
166
|
e.maxSeatReservations = t;
|
|
147
167
|
}
|
|
148
168
|
},
|
|
149
|
-
metadata:
|
|
150
|
-
},
|
|
169
|
+
metadata: e
|
|
170
|
+
}, P, F), i(this, null, I, {
|
|
151
171
|
kind: "accessor",
|
|
152
172
|
name: "maxBicycleReservations",
|
|
153
173
|
static: !1,
|
|
@@ -159,8 +179,8 @@ var ne = 3, re = [
|
|
|
159
179
|
e.maxBicycleReservations = t;
|
|
160
180
|
}
|
|
161
181
|
},
|
|
162
|
-
metadata:
|
|
163
|
-
},
|
|
182
|
+
metadata: e
|
|
183
|
+
}, L, R), i(this, null, z, {
|
|
164
184
|
kind: "accessor",
|
|
165
185
|
name: "preventPlaceClick",
|
|
166
186
|
static: !1,
|
|
@@ -172,8 +192,8 @@ var ne = 3, re = [
|
|
|
172
192
|
e.preventPlaceClick = t;
|
|
173
193
|
}
|
|
174
194
|
},
|
|
175
|
-
metadata:
|
|
176
|
-
},
|
|
195
|
+
metadata: e
|
|
196
|
+
}, B, V), i(this, null, H, {
|
|
177
197
|
kind: "accessor",
|
|
178
198
|
name: "preselectCoachIndex",
|
|
179
199
|
static: !1,
|
|
@@ -185,8 +205,8 @@ var ne = 3, re = [
|
|
|
185
205
|
e.preselectCoachIndex = t;
|
|
186
206
|
}
|
|
187
207
|
},
|
|
188
|
-
metadata:
|
|
189
|
-
},
|
|
208
|
+
metadata: e
|
|
209
|
+
}, U, W), i(this, null, G, {
|
|
190
210
|
kind: "accessor",
|
|
191
211
|
name: "showTitleInfo",
|
|
192
212
|
static: !1,
|
|
@@ -198,8 +218,8 @@ var ne = 3, re = [
|
|
|
198
218
|
e.showTitleInfo = t;
|
|
199
219
|
}
|
|
200
220
|
},
|
|
201
|
-
metadata:
|
|
202
|
-
},
|
|
221
|
+
metadata: e
|
|
222
|
+
}, K, q), i(this, null, J, {
|
|
203
223
|
kind: "accessor",
|
|
204
224
|
name: "selectedCoachIndex",
|
|
205
225
|
static: !1,
|
|
@@ -211,8 +231,8 @@ var ne = 3, re = [
|
|
|
211
231
|
e.selectedCoachIndex = t;
|
|
212
232
|
}
|
|
213
233
|
},
|
|
214
|
-
metadata:
|
|
215
|
-
},
|
|
234
|
+
metadata: e
|
|
235
|
+
}, Y, X), i(this, null, Z, {
|
|
216
236
|
kind: "accessor",
|
|
217
237
|
name: "focusedCoachIndex",
|
|
218
238
|
static: !1,
|
|
@@ -224,8 +244,8 @@ var ne = 3, re = [
|
|
|
224
244
|
e.focusedCoachIndex = t;
|
|
225
245
|
}
|
|
226
246
|
},
|
|
227
|
-
metadata:
|
|
228
|
-
},
|
|
247
|
+
metadata: e
|
|
248
|
+
}, Q, $), i(this, null, ae, {
|
|
229
249
|
kind: "accessor",
|
|
230
250
|
name: "hoveredCoachIndex",
|
|
231
251
|
static: !1,
|
|
@@ -237,8 +257,8 @@ var ne = 3, re = [
|
|
|
237
257
|
e.hoveredCoachIndex = t;
|
|
238
258
|
}
|
|
239
259
|
},
|
|
240
|
-
metadata:
|
|
241
|
-
},
|
|
260
|
+
metadata: e
|
|
261
|
+
}, oe, se), i(this, null, ce, {
|
|
242
262
|
kind: "method",
|
|
243
263
|
name: "coachAreaScrollend",
|
|
244
264
|
static: !1,
|
|
@@ -247,12 +267,12 @@ var ne = 3, re = [
|
|
|
247
267
|
has: (e) => "coachAreaScrollend" in e,
|
|
248
268
|
get: (e) => e.coachAreaScrollend
|
|
249
269
|
},
|
|
250
|
-
metadata:
|
|
251
|
-
}, null,
|
|
270
|
+
metadata: e
|
|
271
|
+
}, null, h), e && Object.defineProperty(this, Symbol.metadata, {
|
|
252
272
|
enumerable: !0,
|
|
253
273
|
configurable: !0,
|
|
254
274
|
writable: !0,
|
|
255
|
-
value:
|
|
275
|
+
value: e
|
|
256
276
|
});
|
|
257
277
|
}
|
|
258
278
|
static {
|
|
@@ -360,7 +380,7 @@ var ne = 3, re = [
|
|
|
360
380
|
this.#p = e;
|
|
361
381
|
}
|
|
362
382
|
constructor() {
|
|
363
|
-
super(), this.#e = (
|
|
383
|
+
super(), this.#e = (a(this, h), a(this, _, null)), this.#t = (a(this, v), a(this, b, "NONE")), this.#n = (a(this, x), a(this, C, !0)), this.#r = (a(this, w), a(this, E, !1)), this.#i = (a(this, D), a(this, k, 16)), this.#a = (a(this, A), a(this, ie, null)), this.#o = (a(this, M), a(this, P, -1)), this.#s = (a(this, F), a(this, L, -1)), this.#c = (a(this, R), a(this, B, !1)), this.#l = (a(this, V), a(this, U, -1)), this.#u = (a(this, W), a(this, K, !1)), this.#d = (a(this, q), a(this, Y, -1)), this.#f = (a(this, X), a(this, Q, -1)), this.#p = (a(this, $), a(this, oe, -1)), this.coachBorderPadding = (a(this, se), 6), this.gapBetweenCoaches = 4, this.coachBorderOffset = this.coachBorderPadding / this.baseGridSize, this.gapBetweenCoachDecks = 48, this.coachNavButtonDim = 0, this.globalAreaIconDim = {
|
|
364
384
|
w: 2,
|
|
365
385
|
h: 2
|
|
366
386
|
}, this.globalAreaIconPadding = .8, this.coachItemDetailsElements = [], this.currScrollDirection = d.right, this.maxCalcCoachesWidth = 0, this.scrollCoachesAreaWidth = 0, this.scrollNavigationAreaDim = 0, this.triggerCoachPositionsCollection = [], this.navigationScrollArea = null, this.coachScrollArea = null, this.currSelectedPlace = null, this.currSelectedPlaceElementId = null, this.currSelectedCoachIndex = -1, this.currSelectedDeckIndex = 0, this.preventCoachScrollByPlaceClick = !1, this.selectedSeatReservationPlaces = {
|
|
@@ -451,42 +471,42 @@ var ne = 3, re = [
|
|
|
451
471
|
this._handleTabKeyNavigation(e, "navigation", t);
|
|
452
472
|
return;
|
|
453
473
|
}
|
|
454
|
-
|
|
474
|
+
n(e) && this.keyboardSeatmapEventHandling(e);
|
|
455
475
|
}
|
|
456
476
|
_handleTabKeyNavigation(e, t, n) {
|
|
457
477
|
let r = e.key, i = e.shiftKey;
|
|
458
478
|
r === this.keyboardNavigationEvents.Tab && (t == "navigation" ? (n == this.currSelectedCoachIndex ? !this.currSelectedPlace || !i || this.coachItemDetailsElements[n].isDriverArea || this.focusedCoachIndex == -1 ? this.focusedCoachIndex = n : i && this.currSelectedPlace && (this.focusedCoachIndex = -1, this.focusPlaceElement(this.currSelectedPlace)) : this.focusedCoachIndex = n, this._scrollToSelectedNavigationButton(n)) : t == "seatmap" && (e.preventDefault(), i ? this._navigateCoachNavigationByKeyboard("PREV_TAB") : this._navigateCoachNavigationByKeyboard("NEXT_TAB")));
|
|
459
479
|
}
|
|
460
480
|
keyboardSeatmapEventHandling(e) {
|
|
461
|
-
let t = e.key === this.keyboardNavigationEvents.Tab,
|
|
462
|
-
if (!this.hasNavigation && this.currSelectedCoachIndex === 0 &&
|
|
463
|
-
let
|
|
464
|
-
if (this.preventCoachScrollByPlaceClick = !1, !this.hasSeatReservationNativeFocus && (t ||
|
|
481
|
+
let t = e.key === this.keyboardNavigationEvents.Tab, r = e.shiftKey && t;
|
|
482
|
+
if (!this.hasNavigation && this.currSelectedCoachIndex === 0 && r || this.currSelectedCoachIndex === this.coachItemDetailsElements.length - 1 && t) return;
|
|
483
|
+
let i = e.key;
|
|
484
|
+
if (this.preventCoachScrollByPlaceClick = !1, !this.hasSeatReservationNativeFocus && (t || r) && (this.hasSeatReservationNativeFocus = !0), t) {
|
|
465
485
|
this._handleTabKeyNavigation(e, "seatmap");
|
|
466
486
|
return;
|
|
467
487
|
}
|
|
468
|
-
if (this.currSelectedCoachIndex !== -1 &&
|
|
488
|
+
if (this.currSelectedCoachIndex !== -1 && n(e)) switch (e.preventDefault(), i) {
|
|
469
489
|
case this.keyboardNavigationEvents.ArrowLeft:
|
|
470
490
|
{
|
|
471
|
-
let e = this.alignVertical ? this.keyboardNavigationEvents.ArrowDown :
|
|
491
|
+
let e = this.alignVertical ? this.keyboardNavigationEvents.ArrowDown : i;
|
|
472
492
|
this._navigateToPlaceByKeyboard(e);
|
|
473
493
|
}
|
|
474
494
|
break;
|
|
475
495
|
case this.keyboardNavigationEvents.ArrowRight:
|
|
476
496
|
{
|
|
477
|
-
let e = this.alignVertical ? this.keyboardNavigationEvents.ArrowUp :
|
|
497
|
+
let e = this.alignVertical ? this.keyboardNavigationEvents.ArrowUp : i;
|
|
478
498
|
this._navigateToPlaceByKeyboard(e);
|
|
479
499
|
}
|
|
480
500
|
break;
|
|
481
501
|
case this.keyboardNavigationEvents.ArrowUp:
|
|
482
502
|
{
|
|
483
|
-
let e = this.alignVertical ? this.keyboardNavigationEvents.ArrowLeft :
|
|
503
|
+
let e = this.alignVertical ? this.keyboardNavigationEvents.ArrowLeft : i;
|
|
484
504
|
this._navigateToPlaceByKeyboard(e);
|
|
485
505
|
}
|
|
486
506
|
break;
|
|
487
507
|
case this.keyboardNavigationEvents.ArrowDown:
|
|
488
508
|
{
|
|
489
|
-
let e = this.alignVertical ? this.keyboardNavigationEvents.ArrowRight :
|
|
509
|
+
let e = this.alignVertical ? this.keyboardNavigationEvents.ArrowRight : i;
|
|
490
510
|
this._navigateToPlaceByKeyboard(e);
|
|
491
511
|
}
|
|
492
512
|
break;
|
|
@@ -661,11 +681,9 @@ var ne = 3, re = [
|
|
|
661
681
|
}
|
|
662
682
|
updateSelectedSeatReservationPlaces(e) {
|
|
663
683
|
let t = e.placeType === "SEAT" ? "seats" : "bicycles", n = e.placeType === "SEAT" ? this.maxSeatReservations : this.maxBicycleReservations, r = this.selectedSeatReservationPlaces[t];
|
|
664
|
-
this.selectedSeatReservationPlaces[t] = this._updateSelectedSeatReservationPlaces(r, n, e)
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
detail: this.selectedSeatReservationPlaces
|
|
668
|
-
}));
|
|
684
|
+
this.selectedSeatReservationPlaces[t] = this._updateSelectedSeatReservationPlaces(r, n, e);
|
|
685
|
+
let i = this.selectedSeatReservationPlaces;
|
|
686
|
+
this.dispatchEvent(new f(i));
|
|
669
687
|
}
|
|
670
688
|
_updateSelectedSeatReservationPlaces(e, t, n) {
|
|
671
689
|
if (n.state === "SELECTED") {
|
|
@@ -692,11 +710,7 @@ var ne = 3, re = [
|
|
|
692
710
|
if (this.currSelectedCoachIndex == this.selectedCoachIndex) return;
|
|
693
711
|
this.focusedCoachIndex != -1 && (this.focusedCoachIndex = this.currSelectedCoachIndex), this.selectedCoachIndex = this.currSelectedCoachIndex;
|
|
694
712
|
let e = this._getSeatReservationSelectedCoach(this.selectedCoachIndex);
|
|
695
|
-
e && this.dispatchEvent(new
|
|
696
|
-
bubbles: !0,
|
|
697
|
-
composed: !0,
|
|
698
|
-
detail: e
|
|
699
|
-
}));
|
|
713
|
+
e && this.dispatchEvent(new p(e));
|
|
700
714
|
}
|
|
701
715
|
getPlaceElementId(e, t, n) {
|
|
702
716
|
return "seat-reservation__place-button-" + e + "-" + t + "-" + n;
|
|
@@ -750,7 +764,7 @@ var ne = 3, re = [
|
|
|
750
764
|
this.currSelectedPlaceElementId = e ? this.getPlaceElementId(this.currSelectedDeckIndex, this.currSelectedCoachIndex, e.number) : null;
|
|
751
765
|
}
|
|
752
766
|
_determineBaseFontSize() {
|
|
753
|
-
if (!
|
|
767
|
+
if (!r) {
|
|
754
768
|
let e = 1 / parseInt(window.getComputedStyle(document.body).fontSize, 10);
|
|
755
769
|
this.style?.setProperty("--sbb-seat-reservation-one-px-rem", `${e + "rem"}`);
|
|
756
770
|
}
|
|
@@ -816,7 +830,7 @@ var ne = 3, re = [
|
|
|
816
830
|
deckCoaches: []
|
|
817
831
|
};
|
|
818
832
|
e?.coachItems?.forEach((e) => {
|
|
819
|
-
let t = (e.graphicElements?.filter((e) => e.icon && !this.notAreaElements.includes(e.icon)))?.concat(e.serviceElements || []).concat(e.places || []) || [], r = this._isOverhangingElementsPresent(e.dimension.w, t), i = e.graphicElements?.filter((e) => !this.notAreaElements.includes(e.icon)).map((t) => this._getCalculatedDimensionPositionElement(t, e.dimension, !0)), a = e.graphicElements?.filter((e) => this.notAreaElements.includes(e.icon)).map((t) => this._getCalculatedDimensionPositionElement(t, e.dimension, !1)), o = e.serviceElements?.map((t) => this._getCalculatedDimensionPositionElement(t, e.dimension, !
|
|
833
|
+
let t = (e.graphicElements?.filter((e) => e.icon && !this.notAreaElements.includes(e.icon)))?.concat(e.serviceElements || []).concat(e.places || []) || [], r = this._isOverhangingElementsPresent(e.dimension.w, t), i = e.graphicElements?.filter((e) => !this.notAreaElements.includes(e.icon)).map((t) => this._getCalculatedDimensionPositionElement(t, e.dimension, !0)), a = e.graphicElements?.filter((e) => this.notAreaElements.includes(e.icon)).map((t) => this._getCalculatedDimensionPositionElement(t, e.dimension, !1)), o = e.serviceElements?.map((t) => this._getCalculatedDimensionPositionElement(t, e.dimension, !0)), s = this._getCalculatedMiddleBorderElement(e), c = this.getCalculatedDimension({ ...e.dimension }), l = {
|
|
820
834
|
width: c.w,
|
|
821
835
|
height: c.h,
|
|
822
836
|
otherElements: a || [],
|
|
@@ -844,12 +858,12 @@ var ne = 3, re = [
|
|
|
844
858
|
let i = this.coachBorderPadding * -1;
|
|
845
859
|
return {
|
|
846
860
|
position: {
|
|
847
|
-
x: n * this.baseGridSize,
|
|
861
|
+
x: Math.floor(n * this.baseGridSize) - 1,
|
|
848
862
|
y: i,
|
|
849
863
|
z: 0
|
|
850
864
|
},
|
|
851
865
|
dimension: {
|
|
852
|
-
w: r * this.baseGridSize,
|
|
866
|
+
w: Math.floor(r * this.baseGridSize) + 2,
|
|
853
867
|
h: t
|
|
854
868
|
}
|
|
855
869
|
};
|
|
@@ -867,7 +881,7 @@ var ne = 3, re = [
|
|
|
867
881
|
let n = e.icon?.indexOf("TABLE") === -1, a = e.icon && n ? e.icon : null, o = this.isElementDirectlyOnBorder(e, t) && a !== "ENTRY_EXIT";
|
|
868
882
|
e.position.y === 0 ? (c = "upper-border", i.y -= this.coachBorderOffset - this.coachBorderOffset / 3) : e.position.y + e.dimension.h === t.h && (c = "lower-border", o || (i.y += this.coachBorderOffset - this.coachBorderOffset / 3)), o && (r.h += this.coachBorderOffset - this.coachBorderOffset / 3);
|
|
869
883
|
} else e.position.y === 0 && (i.y -= this.coachBorderOffset), t.h === e.position.y + e.dimension.h && (r.h += this.coachBorderOffset * 2);
|
|
870
|
-
return r.w = Math.
|
|
884
|
+
return r.w = Math.floor(r.w * this.baseGridSize), r.h = Math.floor(r.h * this.baseGridSize), i.x = Math.floor(i.x * this.baseGridSize), i.y = Math.floor(i.y * this.baseGridSize), {
|
|
871
885
|
icon: e.icon && e.icon.endsWith("DRIVER_AREA") ? e.icon?.concat("_", this.seatReservations[this.currSelectedDeckIndex].vehicleType) : e.icon,
|
|
872
886
|
rotation: s,
|
|
873
887
|
dimension: r,
|
|
@@ -909,4 +923,4 @@ var ne = 3, re = [
|
|
|
909
923
|
};
|
|
910
924
|
})();
|
|
911
925
|
//#endregion
|
|
912
|
-
export { f as SeatReservationBaseElement };
|
|
926
|
+
export { p as SbbSeatReservationSelectedCoachEvent, f as SbbSeatReservationSelectedPlacesEvent, m as SeatReservationBaseElement };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as e } from "../../seat-reservation.component
|
|
1
|
+
import { t as e } from "../../seat-reservation.component--0XnrCkk.js";
|
|
2
2
|
export { e as SbbSeatReservationElement };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as e } from "../../seat-reservation-area.component-
|
|
1
|
+
import { t as e } from "../../seat-reservation-area.component-G9lHb7S8.js";
|
|
2
2
|
export { e as SbbSeatReservationAreaElement };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as e } from "../../seat-reservation-graphic.component-
|
|
1
|
+
import { t as e } from "../../seat-reservation-graphic.component-BXFcQDxY.js";
|
|
2
2
|
export { e as SbbSeatReservationGraphicElement };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export {
|
|
1
|
+
import { n as e, t } from "../../seat-reservation-navigation-coach.component-BXy8EkJe.js";
|
|
2
|
+
export { t as SbbSeatReservationNavigationCoachElement, e as SbbSelectCoachEvent };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as e } from "../../seat-reservation-navigation-services.component-
|
|
1
|
+
import { t as e } from "../../seat-reservation-navigation-services.component-49XmV9rv.js";
|
|
2
2
|
export { e as SbbSeatReservationNavigationServicesElement };
|
package/seat-reservation/seat-reservation-place-control/seat-reservation-place-control.component.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export { e as SbbSeatReservationPlaceControlElement };
|
|
1
|
+
import { n as e, t } from "../../seat-reservation-place-control.component-DToIW328.js";
|
|
2
|
+
export { t as SbbPlaceSelectionEvent, e as SbbSeatReservationPlaceControlElement };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as e } from "../../seat-reservation-scoped.component-
|
|
1
|
+
import { t as e } from "../../seat-reservation-scoped.component-D8dAmrP7.js";
|
|
2
2
|
export { e as SbbSeatReservationScopedElement };
|
package/{seat-reservation-area.component-BcmwKJSK.js → seat-reservation-area.component-G9lHb7S8.js}
RENAMED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { SbbElement as e, forceType as t } from "@sbb-esta/lyne-elements/core.js";
|
|
2
|
+
import { html as n, unsafeCSS as r } from "lit";
|
|
3
|
+
import { __esDecorate as i, __runInitializers as a } from "tslib";
|
|
4
4
|
import { property as o } from "lit/decorators.js";
|
|
5
5
|
//#region src/elements-experimental/seat-reservation/seat-reservation-area/seat-reservation-area.scss?inline
|
|
6
6
|
var s = ":host{--sbb-seat-reservation-area-border-radius: var(--sbb-border-width-4x);--sbb-seat-reservation-area-rotation: 0;--sbb-seat-reservation-area-z-index: 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:var(--sbb-border-width-1x) solid light-dark(var(--sbb-color-graphite),var(--sbb-color-granite));border-radius:var(--sbb-seat-reservation-area-border-radius);position:absolute;z-index:var(--sbb-seat-reservation-area-z-index);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-background-color-2)}:host([background=dark]){background-color:var(--sbb-color-milk);background-color:light-dark(var(--sbb-color-milk),var(--sbb-color-iron))}:host([mounting=upper-border]){border-block-start-width:0;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:0;border-radius:var(--sbb-seat-reservation-area-border-radius) var(--sbb-seat-reservation-area-border-radius) 0 0}:host([mounting=upper-to-lower-border]){border-block-start:none;border-block-end:none;border-radius:0}:host(.sbb-seat-reservation-area--cursor-pointer){cursor:var(--sbb-cursor-pointer)}", c = (() => {
|
|
7
|
-
let c =
|
|
7
|
+
let c = e, l, u = [], d = [], f, p = [], m = [];
|
|
8
8
|
return class extends c {
|
|
9
9
|
static {
|
|
10
|
-
let
|
|
11
|
-
l = [
|
|
10
|
+
let e = typeof Symbol == "function" && Symbol.metadata ? Object.create(c[Symbol.metadata] ?? null) : void 0;
|
|
11
|
+
l = [t(), o({ reflect: !0 })], f = [t(), o({ reflect: !0 })], i(this, null, l, {
|
|
12
12
|
kind: "accessor",
|
|
13
13
|
name: "mounting",
|
|
14
14
|
static: !1,
|
|
@@ -20,8 +20,8 @@ var s = ":host{--sbb-seat-reservation-area-border-radius: var(--sbb-border-width
|
|
|
20
20
|
e.mounting = t;
|
|
21
21
|
}
|
|
22
22
|
},
|
|
23
|
-
metadata:
|
|
24
|
-
}, u, d),
|
|
23
|
+
metadata: e
|
|
24
|
+
}, u, d), i(this, null, f, {
|
|
25
25
|
kind: "accessor",
|
|
26
26
|
name: "background",
|
|
27
27
|
static: !1,
|
|
@@ -33,28 +33,28 @@ var s = ":host{--sbb-seat-reservation-area-border-radius: var(--sbb-border-width
|
|
|
33
33
|
e.background = t;
|
|
34
34
|
}
|
|
35
35
|
},
|
|
36
|
-
metadata:
|
|
37
|
-
}, p, m),
|
|
36
|
+
metadata: e
|
|
37
|
+
}, p, m), e && Object.defineProperty(this, Symbol.metadata, {
|
|
38
38
|
enumerable: !0,
|
|
39
39
|
configurable: !0,
|
|
40
40
|
writable: !0,
|
|
41
|
-
value:
|
|
41
|
+
value: e
|
|
42
42
|
});
|
|
43
43
|
}
|
|
44
44
|
static {
|
|
45
45
|
this.elementName = "sbb-seat-reservation-area";
|
|
46
46
|
}
|
|
47
47
|
static {
|
|
48
|
-
this.styles = [
|
|
48
|
+
this.styles = [r(s)];
|
|
49
49
|
}
|
|
50
|
-
#e =
|
|
50
|
+
#e = a(this, u, "free");
|
|
51
51
|
get mounting() {
|
|
52
52
|
return this.#e;
|
|
53
53
|
}
|
|
54
54
|
set mounting(e) {
|
|
55
55
|
this.#e = e;
|
|
56
56
|
}
|
|
57
|
-
#t = (
|
|
57
|
+
#t = (a(this, d), a(this, p, "light"));
|
|
58
58
|
get background() {
|
|
59
59
|
return this.#t;
|
|
60
60
|
}
|
|
@@ -62,10 +62,10 @@ var s = ":host{--sbb-seat-reservation-area-border-radius: var(--sbb-border-width
|
|
|
62
62
|
this.#t = e;
|
|
63
63
|
}
|
|
64
64
|
render() {
|
|
65
|
-
return
|
|
65
|
+
return n`<slot></slot>`;
|
|
66
66
|
}
|
|
67
67
|
constructor() {
|
|
68
|
-
super(...arguments),
|
|
68
|
+
super(...arguments), a(this, m);
|
|
69
69
|
}
|
|
70
70
|
};
|
|
71
71
|
})();
|
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
1
|
+
import { SbbElement as e, SbbLanguageController as t, forceType as n } from "@sbb-esta/lyne-elements/core.js";
|
|
2
|
+
import { SbbIconElement as r } from "@sbb-esta/lyne-elements/icon.pure.js";
|
|
3
|
+
import { html as i, isServer as a, unsafeCSS as o } from "lit";
|
|
4
|
+
import { __esDecorate as s, __runInitializers as c } from "tslib";
|
|
5
5
|
import { property as l } from "lit/decorators.js";
|
|
6
6
|
import { classMap as u } from "lit/directives/class-map.js";
|
|
7
7
|
import { mapIconToSvg as d } from "./seat-reservation/common/mapper.js";
|
|
8
8
|
import { getI18nSeatReservation as f } from "./seat-reservation/common/translations.js";
|
|
9
9
|
//#region src/elements-experimental/seat-reservation/seat-reservation-graphic/seat-reservation-graphic.scss?inline
|
|
10
10
|
var p = ":host{--sbb-seat-reservation-graphic-max-width: auto;--sbb-seat-reservation-graphic-max-height: auto;--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-padding-percent: 1;--sbb-seat-reservation-graphic-position: initial;--sbb-seat-reservation-graphic-z-index: 0;--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);z-index:var(--sbb-seat-reservation-graphic-z-index);inset-inline-start:calc(var(--sbb-seat-reservation-graphic-left) * var(--sbb-seat-reservation-one-px-rem, .0625rem));inset-block-start:calc(var(--sbb-seat-reservation-graphic-top) * var(--sbb-seat-reservation-one-px-rem, .0625rem))}:host(.auto-width){--sbb-icon-svg-width: auto;max-width:calc(var(--sbb-seat-reservation-graphic-max-width) * var(--sbb-seat-reservation-one-px-rem, .0625rem));width:auto}:host(.sbb-sr-graphic__dimension--square-dim){--sbb-icon-svg-width: min(min(var(--sbb-seat-reservation-graphic-width) * var(--sbb-seat-reservation-one-px-rem, .0625rem), var(--sbb-seat-reservation-graphic-height) * var(--sbb-seat-reservation-one-px-rem, .0625rem)) * var(--sbb-seat-reservation-graphic-padding-percent), min(var(--sbb-seat-reservation-graphic-max-width) * var(--sbb-seat-reservation-one-px-rem, .0625rem), var(--sbb-seat-reservation-graphic-max-height) * var(--sbb-seat-reservation-one-px-rem, .0625rem)));--sbb-icon-svg-height: min(min(var(--sbb-seat-reservation-graphic-width) * var(--sbb-seat-reservation-one-px-rem, .0625rem), var(--sbb-seat-reservation-graphic-height) * var(--sbb-seat-reservation-one-px-rem, .0625rem)) * var(--sbb-seat-reservation-graphic-padding-percent), min(var(--sbb-seat-reservation-graphic-max-width) * var(--sbb-seat-reservation-one-px-rem, .0625rem), var(--sbb-seat-reservation-graphic-max-height) * var(--sbb-seat-reservation-one-px-rem, .0625rem)));width:min(min(var(--sbb-seat-reservation-graphic-width) * var(--sbb-seat-reservation-one-px-rem, .0625rem),var(--sbb-seat-reservation-graphic-height) * var(--sbb-seat-reservation-one-px-rem, .0625rem)) * var(--sbb-seat-reservation-graphic-padding-percent),min(var(--sbb-seat-reservation-graphic-max-width) * var(--sbb-seat-reservation-one-px-rem, .0625rem),var(--sbb-seat-reservation-graphic-max-height) * var(--sbb-seat-reservation-one-px-rem, .0625rem)));height:min(min(var(--sbb-seat-reservation-graphic-width) * var(--sbb-seat-reservation-one-px-rem, .0625rem),var(--sbb-seat-reservation-graphic-height) * var(--sbb-seat-reservation-one-px-rem, .0625rem)) * var(--sbb-seat-reservation-graphic-padding-percent),min(var(--sbb-seat-reservation-graphic-max-width) * var(--sbb-seat-reservation-one-px-rem, .0625rem),var(--sbb-seat-reservation-graphic-max-height) * var(--sbb-seat-reservation-one-px-rem, .0625rem)))}:host(.sbb-seat-reservation-graphic--cursor-pointer){cursor:var(--sbb-cursor-pointer)}.sbb-sr-icon,.sbb-sr-graphic{width:inherit;height:inherit;transform-origin:center;rotate:calc(var(--sbb-seat-reservation-graphic-rotation) * 1deg)}.sbb-sr-icon{color:var(--sbb-color-granite);color:light-dark(var(--sbb-color-granite),var(--sbb-color-graphite))}.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}}", m = (() => {
|
|
11
|
-
let m =
|
|
11
|
+
let m = e, h, g = [], _ = [], v, y = [], b = [];
|
|
12
12
|
return class extends m {
|
|
13
13
|
constructor() {
|
|
14
|
-
super(...arguments), this.#e =
|
|
14
|
+
super(...arguments), this.#e = c(this, g, ""), this.#t = (c(this, _), c(this, y, !1)), this._language = (c(this, b), new t(this));
|
|
15
15
|
}
|
|
16
16
|
static {
|
|
17
|
-
let
|
|
18
|
-
h = [
|
|
17
|
+
let e = typeof Symbol == "function" && Symbol.metadata ? Object.create(m[Symbol.metadata] ?? null) : void 0;
|
|
18
|
+
h = [n(), l({ attribute: "name" })], v = [n(), l({
|
|
19
19
|
attribute: "stretch",
|
|
20
20
|
type: Boolean
|
|
21
|
-
})],
|
|
21
|
+
})], s(this, null, h, {
|
|
22
22
|
kind: "accessor",
|
|
23
23
|
name: "name",
|
|
24
24
|
static: !1,
|
|
@@ -30,8 +30,8 @@ var p = ":host{--sbb-seat-reservation-graphic-max-width: auto;--sbb-seat-reserva
|
|
|
30
30
|
e.name = t;
|
|
31
31
|
}
|
|
32
32
|
},
|
|
33
|
-
metadata:
|
|
34
|
-
}, g, _),
|
|
33
|
+
metadata: e
|
|
34
|
+
}, g, _), s(this, null, v, {
|
|
35
35
|
kind: "accessor",
|
|
36
36
|
name: "stretch",
|
|
37
37
|
static: !1,
|
|
@@ -43,22 +43,22 @@ var p = ":host{--sbb-seat-reservation-graphic-max-width: auto;--sbb-seat-reserva
|
|
|
43
43
|
e.stretch = t;
|
|
44
44
|
}
|
|
45
45
|
},
|
|
46
|
-
metadata:
|
|
47
|
-
}, y, b),
|
|
46
|
+
metadata: e
|
|
47
|
+
}, y, b), e && Object.defineProperty(this, Symbol.metadata, {
|
|
48
48
|
enumerable: !0,
|
|
49
49
|
configurable: !0,
|
|
50
50
|
writable: !0,
|
|
51
|
-
value:
|
|
51
|
+
value: e
|
|
52
52
|
});
|
|
53
53
|
}
|
|
54
54
|
static {
|
|
55
55
|
this.elementName = "sbb-seat-reservation-graphic";
|
|
56
56
|
}
|
|
57
57
|
static {
|
|
58
|
-
this.elementDependencies = [
|
|
58
|
+
this.elementDependencies = [r];
|
|
59
59
|
}
|
|
60
60
|
static {
|
|
61
|
-
this.styles = [
|
|
61
|
+
this.styles = [o(p)];
|
|
62
62
|
}
|
|
63
63
|
#e;
|
|
64
64
|
get name() {
|
|
@@ -76,21 +76,21 @@ var p = ":host{--sbb-seat-reservation-graphic-max-width: auto;--sbb-seat-reserva
|
|
|
76
76
|
}
|
|
77
77
|
render() {
|
|
78
78
|
let e = d[this.name];
|
|
79
|
-
return !e?.svg && !e?.svgName ? null :
|
|
79
|
+
return !e?.svg && !e?.svgName ? null : i`<span
|
|
80
80
|
class="${u({
|
|
81
81
|
"sbb-sr-icon": !!e.svgName,
|
|
82
82
|
"sbb-sr-graphic": !!e.svg
|
|
83
83
|
})}"
|
|
84
84
|
>
|
|
85
|
-
${e.svgName ?
|
|
85
|
+
${e.svgName ? i` <sbb-icon
|
|
86
86
|
name="${e.svgName || ""}"
|
|
87
87
|
aria-hidden="false"
|
|
88
88
|
aria-label="${f(e.svgName, this._language.current)}"
|
|
89
|
-
></sbb-icon>` :
|
|
89
|
+
></sbb-icon>` : i`${this._getSvgElement(e.svg)}`}
|
|
90
90
|
</span>`;
|
|
91
91
|
}
|
|
92
92
|
_getSvgElement(e) {
|
|
93
|
-
if (!
|
|
93
|
+
if (!a) {
|
|
94
94
|
let t = new DOMParser(), n = e || "<svg></svg>", r = t.parseFromString(n, "image/svg+xml").firstElementChild;
|
|
95
95
|
return this.stretch && r?.nodeName.toLowerCase() === "svg" && r.setAttribute("preserveAspectRatio", "none"), r;
|
|
96
96
|
}
|