@sbb-esta/lyne-elements-experimental-dev 4.12.0-dev.1777534804 → 4.12.0-dev.1777541244
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 +288 -167
- package/development/seat-reservation/common/types.d.ts +3 -4
- package/development/seat-reservation/common/types.d.ts.map +1 -1
- package/development/seat-reservation/seat-reservation/seat-reservation-base-element.d.ts +38 -7
- 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 +143 -32
- package/development/seat-reservation/seat-reservation/seat-reservation.component.d.ts +2 -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 +1 -1
- package/development/seat-reservation/seat-reservation-area/seat-reservation-area.component.js +1 -1
- package/development/seat-reservation/seat-reservation-area.js +1 -1
- package/development/seat-reservation/seat-reservation-graphic/seat-reservation-assets.js +1 -1
- package/development/seat-reservation/seat-reservation-graphic/seat-reservation-graphic.component.js +1 -1
- package/development/seat-reservation/seat-reservation-graphic.js +1 -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 +1 -1
- package/development/seat-reservation/seat-reservation-navigation-coach.js +1 -1
- package/development/seat-reservation/seat-reservation.js +1 -1
- package/development/seat-reservation-area.component-BWdrKqek.js +96 -0
- package/development/seat-reservation-graphic.component-CN5sWn0I.js +129 -0
- package/development/{seat-reservation-navigation-coach.component-CjoDkcVU.js → seat-reservation-navigation-coach.component-tDZkXl-3.js} +3 -3
- package/development/seat-reservation.component-DyB5FVpD.js +464 -0
- package/development/seat-reservation.js +4 -4
- package/development/seat-reservation.pure.js +4 -4
- package/package.json +2 -2
- package/seat-reservation/seat-reservation/seat-reservation-base-element.js +130 -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-area.js +1 -1
- package/seat-reservation/seat-reservation-graphic/seat-reservation-assets.js +1 -1
- package/seat-reservation/seat-reservation-graphic/seat-reservation-graphic.component.js +1 -1
- package/seat-reservation/seat-reservation-graphic.js +1 -1
- package/seat-reservation/seat-reservation-navigation-coach/seat-reservation-navigation-coach.component.js +1 -1
- package/seat-reservation/seat-reservation-navigation-coach.js +1 -1
- package/seat-reservation/seat-reservation.js +1 -1
- package/{seat-reservation-area.component-CtYawDjE.js → seat-reservation-area.component-B5_N7H_a.js} +1 -1
- package/seat-reservation-graphic.component-Dh1e2Pve.js +102 -0
- package/{seat-reservation-navigation-coach.component-sug9IBTH.js → seat-reservation-navigation-coach.component-BdCUfksf.js} +2 -2
- package/{seat-reservation.component-DajC6fqU.js → seat-reservation.component-DEtsEzex.js} +74 -81
- package/seat-reservation.js +4 -4
- package/seat-reservation.pure.js +4 -4
- package/development/seat-reservation-area.component-DbeuTnXT.js +0 -96
- package/development/seat-reservation-graphic.component-DlrHtlia.js +0 -129
- package/development/seat-reservation.component-DFJVFmrI.js +0 -510
- package/seat-reservation-graphic.component-Cm_pVxaB.js +0 -102
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import { __esDecorate as e, __runInitializers as t } from "tslib";
|
|
2
|
+
import { SbbElement as n } from "@sbb-esta/lyne-elements/core/base-elements.js";
|
|
3
|
+
import { SbbLanguageController as r } from "@sbb-esta/lyne-elements/core/controllers.js";
|
|
4
|
+
import { forceType as i } from "@sbb-esta/lyne-elements/core/decorators.js";
|
|
5
|
+
import { boxSizingStyles as a } from "@sbb-esta/lyne-elements/core/styles.js";
|
|
6
|
+
import "@sbb-esta/lyne-elements/icon.js";
|
|
7
|
+
import { html as o, isServer as s, unsafeCSS as c } from "lit";
|
|
8
|
+
import { property as l } from "lit/decorators.js";
|
|
9
|
+
import { mapIconToSvg as u } from "./seat-reservation/common/mapper.js";
|
|
10
|
+
import { classMap as d } from "lit/directives/class-map.js";
|
|
11
|
+
import { getI18nSeatReservation as f } from "./seat-reservation/common/translations.js";
|
|
12
|
+
//#region src/elements-experimental/seat-reservation/seat-reservation-graphic/seat-reservation-graphic.scss?inline
|
|
13
|
+
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 = (() => {
|
|
14
|
+
let m = n, h, g = [], _ = [], v, y = [], b = [];
|
|
15
|
+
return class extends m {
|
|
16
|
+
constructor() {
|
|
17
|
+
super(...arguments), this.#e = t(this, g, ""), this.#t = (t(this, _), t(this, y, !1)), this._language = (t(this, b), new r(this));
|
|
18
|
+
}
|
|
19
|
+
static {
|
|
20
|
+
let t = typeof Symbol == "function" && Symbol.metadata ? Object.create(m[Symbol.metadata] ?? null) : void 0;
|
|
21
|
+
h = [i(), l({ attribute: "name" })], v = [i(), l({
|
|
22
|
+
attribute: "stretch",
|
|
23
|
+
type: Boolean
|
|
24
|
+
})], e(this, null, h, {
|
|
25
|
+
kind: "accessor",
|
|
26
|
+
name: "name",
|
|
27
|
+
static: !1,
|
|
28
|
+
private: !1,
|
|
29
|
+
access: {
|
|
30
|
+
has: (e) => "name" in e,
|
|
31
|
+
get: (e) => e.name,
|
|
32
|
+
set: (e, t) => {
|
|
33
|
+
e.name = t;
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
metadata: t
|
|
37
|
+
}, g, _), e(this, null, v, {
|
|
38
|
+
kind: "accessor",
|
|
39
|
+
name: "stretch",
|
|
40
|
+
static: !1,
|
|
41
|
+
private: !1,
|
|
42
|
+
access: {
|
|
43
|
+
has: (e) => "stretch" in e,
|
|
44
|
+
get: (e) => e.stretch,
|
|
45
|
+
set: (e, t) => {
|
|
46
|
+
e.stretch = t;
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
metadata: t
|
|
50
|
+
}, y, b), t && Object.defineProperty(this, Symbol.metadata, {
|
|
51
|
+
enumerable: !0,
|
|
52
|
+
configurable: !0,
|
|
53
|
+
writable: !0,
|
|
54
|
+
value: t
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
static {
|
|
58
|
+
this.elementName = "sbb-seat-reservation-graphic";
|
|
59
|
+
}
|
|
60
|
+
static {
|
|
61
|
+
this.styles = [a, c(p)];
|
|
62
|
+
}
|
|
63
|
+
#e;
|
|
64
|
+
get name() {
|
|
65
|
+
return this.#e;
|
|
66
|
+
}
|
|
67
|
+
set name(e) {
|
|
68
|
+
this.#e = e;
|
|
69
|
+
}
|
|
70
|
+
#t;
|
|
71
|
+
get stretch() {
|
|
72
|
+
return this.#t;
|
|
73
|
+
}
|
|
74
|
+
set stretch(e) {
|
|
75
|
+
this.#t = e;
|
|
76
|
+
}
|
|
77
|
+
render() {
|
|
78
|
+
let e = u[this.name];
|
|
79
|
+
return !e?.svg && !e?.svgName ? null : o`<span
|
|
80
|
+
class="${d({
|
|
81
|
+
"sbb-sr-icon": !!e.svgName,
|
|
82
|
+
"sbb-sr-graphic": !!e.svg
|
|
83
|
+
})}"
|
|
84
|
+
>
|
|
85
|
+
${e.svgName ? o` <sbb-icon
|
|
86
|
+
name="${e.svgName || ""}"
|
|
87
|
+
aria-hidden="false"
|
|
88
|
+
aria-label="${f(e.svgName, this._language.current)}"
|
|
89
|
+
></sbb-icon>` : o`${this._getSvgElement(e.svg)}`}
|
|
90
|
+
</span>`;
|
|
91
|
+
}
|
|
92
|
+
_getSvgElement(e) {
|
|
93
|
+
if (!s) {
|
|
94
|
+
let t = new DOMParser(), n = e || "<svg></svg>", r = t.parseFromString(n, "image/svg+xml").firstElementChild;
|
|
95
|
+
return this.stretch && r?.nodeName.toLowerCase() === "svg" && r.setAttribute("preserveAspectRatio", "none"), r;
|
|
96
|
+
}
|
|
97
|
+
return null;
|
|
98
|
+
}
|
|
99
|
+
};
|
|
100
|
+
})();
|
|
101
|
+
//#endregion
|
|
102
|
+
export { m as t };
|
|
@@ -303,8 +303,8 @@ var m = (() => {
|
|
|
303
303
|
`;
|
|
304
304
|
}
|
|
305
305
|
_getTitleDescriptionNavCoachButton(e) {
|
|
306
|
-
if (this.coachItemDetails.isDriverArea && !this.coachItemDetails.
|
|
307
|
-
if (this.coachItemDetails.
|
|
306
|
+
if (this.coachItemDetails.isDriverArea && !this.coachItemDetails.isLocomotive) return d("NAVIGATE_COACH_BLOCKED", this._language.current, [this.coachItemDetails.id]);
|
|
307
|
+
if (this.coachItemDetails.isLocomotive) return d("COACH_LOCOMOTIVE", this._language.current);
|
|
308
308
|
let t = d("NAVIGATE_TO_COACH", this._language.current, [this.coachItemDetails.id]);
|
|
309
309
|
if (e) {
|
|
310
310
|
let n = d(e === 1 ? "SERVICE_CLASS_FIRST" : "SERVICE_CLASS_SECOND", this._language.current), r = d("NAVIGATE_TO_COACH_SERVICE_CLASS_SUB", this._language.current, [n]);
|
|
@@ -19,7 +19,7 @@ var g = ":host{--sbb-seat-reservation-grid-size: 16px;--sbb-seat-reservation-hei
|
|
|
19
19
|
c.define(), d.define(), m.define(), p.define(), h.define();
|
|
20
20
|
var _ = class extends e {
|
|
21
21
|
constructor() {
|
|
22
|
-
super(...arguments), this._language = new t(this)
|
|
22
|
+
super(...arguments), this._language = new t(this);
|
|
23
23
|
}
|
|
24
24
|
static {
|
|
25
25
|
this.elementName = "sbb-seat-reservation";
|
|
@@ -151,9 +151,10 @@ var _ = class extends e {
|
|
|
151
151
|
"--sbb-seat-reservation-scoped-height": a.h
|
|
152
152
|
})}
|
|
153
153
|
>
|
|
154
|
-
${this._getRenderedCoachBorders(e, t)}
|
|
155
|
-
${this.
|
|
156
|
-
${this.
|
|
154
|
+
${this._getRenderedCoachBorders(e, n, t)}
|
|
155
|
+
${this._getRenderedCoachElements(n, t)}
|
|
156
|
+
${this._getRenderedAreaElements(n, t)}
|
|
157
|
+
${this._getRenderedServiceElements(n, t)}
|
|
157
158
|
|
|
158
159
|
<table
|
|
159
160
|
@focus=${() => this.onFocusTableCoachAndPreselectPlace(t)}
|
|
@@ -169,21 +170,17 @@ var _ = class extends e {
|
|
|
169
170
|
</table>
|
|
170
171
|
</sbb-seat-reservation-scoped>`;
|
|
171
172
|
}
|
|
172
|
-
_getRenderedCoachBorders(e, t) {
|
|
173
|
+
_getRenderedCoachBorders(e, t, n) {
|
|
173
174
|
if (!e.graphicElements) return null;
|
|
174
|
-
let
|
|
175
|
-
|
|
176
|
-
let o = (e.dimension.h + this.coachBorderOffset * 2) * this.baseGridSize, c = n && n.position.x === 0 ? n?.dimension.w * this.baseGridSize : this.baseGridSize;
|
|
177
|
-
i && (a = this.getCalculatedDimension(e.dimension).w - 2 * (i.dimension.w * this.baseGridSize), c = i.dimension.w * this.baseGridSize);
|
|
178
|
-
let u = this.overHangingElementInformation.find((t) => t.coachId === e.id);
|
|
179
|
-
return (u?.overhangingPlaces || u?.overhangingGraphicAreas) && (a += 2 * this.baseGridSize, c = 0), r`
|
|
175
|
+
let i = this.seatReservationStructure.decks[t].deckCoaches[n], a = i.borderMiddleElement, o = i.hasOverhangingElements;
|
|
176
|
+
return r`
|
|
180
177
|
<sbb-seat-reservation-graphic
|
|
181
|
-
class="${l({ "sbb-sr-coach-has-overhanging-elements":
|
|
178
|
+
class="${l({ "sbb-sr-coach-has-overhanging-elements": o || !1 })}"
|
|
182
179
|
style=${s({
|
|
183
|
-
"--sbb-seat-reservation-graphic-width": a,
|
|
184
|
-
"--sbb-seat-reservation-graphic-height":
|
|
185
|
-
"--sbb-seat-reservation-graphic-top":
|
|
186
|
-
"--sbb-seat-reservation-graphic-left":
|
|
180
|
+
"--sbb-seat-reservation-graphic-width": a.dimension.w,
|
|
181
|
+
"--sbb-seat-reservation-graphic-height": a.dimension.h,
|
|
182
|
+
"--sbb-seat-reservation-graphic-top": a.position.y,
|
|
183
|
+
"--sbb-seat-reservation-graphic-left": a.position.x,
|
|
187
184
|
"--sbb-seat-reservation-graphic-position": "absolute"
|
|
188
185
|
})}
|
|
189
186
|
name="COACH_BORDER_MIDDLE"
|
|
@@ -241,86 +238,82 @@ var _ = class extends e {
|
|
|
241
238
|
`;
|
|
242
239
|
})}`;
|
|
243
240
|
}
|
|
244
|
-
|
|
245
|
-
return e
|
|
246
|
-
let i = e.icon ?? "", a = e.rotation || 0, o = this._notFixedRotatableAreaIcons.indexOf(e.icon) === -1, s = this.alignVertical && o ? a - 90 : a;
|
|
247
|
-
return this.notAreaElements.findIndex((e) => e === i) > -1 ? this._getRenderElementWithoutArea(e, a, t) : this._getRenderElementWithArea(e, s, t, n, r);
|
|
248
|
-
}) : null;
|
|
249
|
-
}
|
|
250
|
-
_getRenderElementWithArea(e, t, n, i, o) {
|
|
251
|
-
let c = e.icon?.indexOf("TABLE") === -1, d = e.icon && c ? e.icon : null, f = this.isElementDirectlyOnBorder(e, n) && d !== "ENTRY_EXIT", p = e.icon ? u(e.icon, this._language.current) : a, m = this.getCalculatedDimension(e.dimension, n, !0, f), h = this.getCalculatedPosition(e.position, e.dimension, n, !0), g = `popover-trigger-${o}-${i}-${h.x}-${h.y}`, _ = "free";
|
|
252
|
-
return e.position.y === this.coachBorderOffset * -1 ? _ = "upper-border" : e.position.y + e.dimension.h === n.h + this.coachBorderOffset && (_ = "lower-border"), _ !== "free" && (h.y += _ === "upper-border" ? 2 : 1, m.h -= 3), r`
|
|
253
|
-
<sbb-seat-reservation-area
|
|
254
|
-
id="${g}"
|
|
255
|
-
class="${l({ "sbb-seat-reservation-area--cursor-pointer": d !== null })}"
|
|
241
|
+
_getRenderedCoachElements(e, t) {
|
|
242
|
+
return this.seatReservationStructure.decks[e].deckCoaches[t].otherElements.map((e) => r` <sbb-seat-reservation-graphic
|
|
256
243
|
style=${s({
|
|
257
|
-
"--sbb-seat-reservation-
|
|
258
|
-
"--sbb-seat-reservation-
|
|
259
|
-
"--sbb-seat-reservation-
|
|
260
|
-
"--sbb-seat-reservation-
|
|
244
|
+
"--sbb-seat-reservation-graphic-width": e.dimension.w,
|
|
245
|
+
"--sbb-seat-reservation-graphic-height": e.dimension.h,
|
|
246
|
+
"--sbb-seat-reservation-graphic-top": e.position.y,
|
|
247
|
+
"--sbb-seat-reservation-graphic-left": e.position.x,
|
|
248
|
+
"--sbb-seat-reservation-graphic-position": "absolute",
|
|
249
|
+
"--sbb-seat-reservation-graphic-rotation": e.rotation
|
|
261
250
|
})}
|
|
262
|
-
|
|
263
|
-
background="dark"
|
|
251
|
+
name=${e.icon ?? a}
|
|
264
252
|
aria-hidden="true"
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
<sbb-seat-reservation-graphic
|
|
268
|
-
style=${s({
|
|
269
|
-
"--sbb-seat-reservation-graphic-max-width": this.globalAreaIconDim.w,
|
|
270
|
-
"--sbb-seat-reservation-graphic-max-height": this.globalAreaIconDim.h,
|
|
271
|
-
"--sbb-seat-reservation-graphic-width": m.w,
|
|
272
|
-
"--sbb-seat-reservation-graphic-height": m.h,
|
|
273
|
-
"--sbb-seat-reservation-graphic-rotation": t,
|
|
274
|
-
"--sbb-seat-reservation-graphic-padding-percent": d === "ENTRY_EXIT" ? 1 : this.globalAreaIconPadding
|
|
275
|
-
})}
|
|
276
|
-
name=${d}
|
|
277
|
-
role="img"
|
|
278
|
-
aria-hidden="true"
|
|
279
|
-
class="sbb-sr-graphic__dimension--square-dim"
|
|
280
|
-
></sbb-seat-reservation-graphic>
|
|
281
|
-
` : a}
|
|
282
|
-
</sbb-seat-reservation-area>
|
|
283
|
-
${d ? this._popover(g, p) : a}
|
|
284
|
-
`;
|
|
253
|
+
?stretch=${!0}
|
|
254
|
+
></sbb-seat-reservation-graphic>`);
|
|
285
255
|
}
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
256
|
+
_getRenderedAreaElements(e, t) {
|
|
257
|
+
return this.seatReservationStructure.decks[e].deckCoaches[t].areaElements.map((n) => {
|
|
258
|
+
let i = `popover-trigger-${e}-${t}-${n.position.x}-${n.position.y}`, o = n.icon?.indexOf("TABLE") === -1, c = n.icon && o ? n.icon : null, d = n.icon ? u(n.icon, this._language.current) : a;
|
|
259
|
+
return r`
|
|
260
|
+
<sbb-seat-reservation-area
|
|
261
|
+
id="${i}"
|
|
262
|
+
class="${l({ "sbb-seat-reservation-area--cursor-pointer": c !== null })}"
|
|
263
|
+
style=${s({
|
|
264
|
+
"--sbb-seat-reservation-area-width": n.dimension.w,
|
|
265
|
+
"--sbb-seat-reservation-area-height": n.dimension.h,
|
|
266
|
+
"--sbb-seat-reservation-area-top": n.position.y,
|
|
267
|
+
"--sbb-seat-reservation-area-left": n.position.x,
|
|
268
|
+
"--sbb-seat-reservation-area-z-index": n.position.z
|
|
269
|
+
})}
|
|
270
|
+
mounting=${n.mounting ?? a}
|
|
271
|
+
background="dark"
|
|
272
|
+
aria-hidden="true"
|
|
273
|
+
>
|
|
274
|
+
${c ? r`
|
|
275
|
+
<sbb-seat-reservation-graphic
|
|
276
|
+
style=${s({
|
|
277
|
+
"--sbb-seat-reservation-graphic-max-width": this.globalAreaIconDim.w,
|
|
278
|
+
"--sbb-seat-reservation-graphic-max-height": this.globalAreaIconDim.h,
|
|
279
|
+
"--sbb-seat-reservation-graphic-width": n.dimension.w,
|
|
280
|
+
"--sbb-seat-reservation-graphic-height": n.dimension.h,
|
|
281
|
+
"--sbb-seat-reservation-graphic-rotation": n.rotation,
|
|
282
|
+
"--sbb-seat-reservation-graphic-padding-percent": c === "ENTRY_EXIT" ? 1 : this.globalAreaIconPadding
|
|
283
|
+
})}
|
|
284
|
+
name=${c}
|
|
285
|
+
role="img"
|
|
286
|
+
aria-hidden="true"
|
|
287
|
+
class="sbb-sr-graphic__dimension--square-dim"
|
|
288
|
+
></sbb-seat-reservation-graphic>
|
|
289
|
+
` : a}
|
|
290
|
+
</sbb-seat-reservation-area>
|
|
291
|
+
${c ? this._popover(i, d) : a}
|
|
292
|
+
`;
|
|
293
|
+
});
|
|
301
294
|
}
|
|
302
|
-
_getRenderedServiceElements(e, t
|
|
303
|
-
return
|
|
304
|
-
let i = n.
|
|
295
|
+
_getRenderedServiceElements(e, t) {
|
|
296
|
+
return this.seatReservationStructure.decks[e].deckCoaches[t].serviceElements.map((n) => {
|
|
297
|
+
let i = `popover-trigger-${e}-${t}-${n.position.x}-${n.position.y}`, o = n.icon ? u(n.icon, this._language.current) : null;
|
|
305
298
|
return r`
|
|
306
299
|
<sbb-seat-reservation-graphic
|
|
307
|
-
id="${
|
|
300
|
+
id="${i}"
|
|
308
301
|
style=${s({
|
|
309
|
-
"--sbb-seat-reservation-graphic-width":
|
|
310
|
-
"--sbb-seat-reservation-graphic-height":
|
|
311
|
-
"--sbb-seat-reservation-graphic-top":
|
|
312
|
-
"--sbb-seat-reservation-graphic-left":
|
|
302
|
+
"--sbb-seat-reservation-graphic-width": n.dimension.w,
|
|
303
|
+
"--sbb-seat-reservation-graphic-height": n.dimension.h,
|
|
304
|
+
"--sbb-seat-reservation-graphic-top": n.position.y,
|
|
305
|
+
"--sbb-seat-reservation-graphic-left": n.position.x,
|
|
313
306
|
"--sbb-seat-reservation-graphic-position": "absolute",
|
|
314
|
-
"--sbb-seat-reservation-graphic-rotation":
|
|
307
|
+
"--sbb-seat-reservation-graphic-rotation": n.rotation
|
|
315
308
|
})}
|
|
316
309
|
class="sbb-seat-reservation-graphic--cursor-pointer"
|
|
317
310
|
name=${n.icon ?? a}
|
|
318
311
|
role="img"
|
|
319
312
|
aria-hidden="true"
|
|
320
313
|
></sbb-seat-reservation-graphic>
|
|
321
|
-
${this._popover(
|
|
314
|
+
${this._popover(i, o)}
|
|
322
315
|
`;
|
|
323
|
-
})
|
|
316
|
+
});
|
|
324
317
|
}
|
|
325
318
|
_onSelectPlace(e) {
|
|
326
319
|
let t = e.detail;
|
|
@@ -358,7 +351,7 @@ var _ = class extends e {
|
|
|
358
351
|
return e?.map((e) => {
|
|
359
352
|
let n = e.icon;
|
|
360
353
|
if (!n) return null;
|
|
361
|
-
let r = t.indexOf(n) > -1, i = u(e.icon, this._language.current), a = this.
|
|
354
|
+
let r = t.indexOf(n) > -1, i = u(e.icon, this._language.current), a = this.notFixedRotatableAreaIcons.indexOf(n) === -1 && this.notAreaElements.indexOf(n) === -1;
|
|
362
355
|
return r || t.push(e.icon), i && !r && a ? i : null;
|
|
363
356
|
}).filter((e) => !!e).join(", ");
|
|
364
357
|
}
|
package/seat-reservation.js
CHANGED
|
@@ -2,15 +2,15 @@ import { i as e, n as t, r as n, t as r } from "./mapper-Cqie5ivY.js";
|
|
|
2
2
|
import { mapIconToSvg as i } from "./seat-reservation/common/mapper/icon-mapper.js";
|
|
3
3
|
import { t as a } from "./svgs-D5DhLHxC.js";
|
|
4
4
|
import { getI18nSeatReservation as o } from "./seat-reservation/common/translations/i18n.js";
|
|
5
|
-
import { t as s } from "./seat-reservation-area.component-
|
|
6
|
-
import { t as c } from "./seat-reservation-graphic.component-
|
|
5
|
+
import { t as s } from "./seat-reservation-area.component-B5_N7H_a.js";
|
|
6
|
+
import { t as c } from "./seat-reservation-graphic.component-Dh1e2Pve.js";
|
|
7
7
|
import { assetsTemplate as l, svgImageByOSDMCode as u } from "./seat-reservation/seat-reservation-graphic/seat-reservation-assets.js";
|
|
8
|
-
import { t as d } from "./seat-reservation-navigation-coach.component-
|
|
8
|
+
import { t as d } from "./seat-reservation-navigation-coach.component-BdCUfksf.js";
|
|
9
9
|
import { t as f } from "./seat-reservation-navigation-services.component-C9dDYD_M.js";
|
|
10
10
|
import { t as p } from "./seat-reservation-place-control.component-CE7d9M2b.js";
|
|
11
11
|
import { t as m } from "./seat-reservation-scoped.component-DVyP2JGE.js";
|
|
12
12
|
import { SeatReservationBaseElement as h } from "./seat-reservation/seat-reservation/seat-reservation-base-element.js";
|
|
13
|
-
import { t as g } from "./seat-reservation.component-
|
|
13
|
+
import { t as g } from "./seat-reservation.component-DEtsEzex.js";
|
|
14
14
|
import "./seat-reservation.pure.js";
|
|
15
15
|
g.define(), s.define(), c.define(), d.define(), f.define(), p.define(), m.define();
|
|
16
16
|
//#endregion
|
package/seat-reservation.pure.js
CHANGED
|
@@ -3,13 +3,13 @@ import { mapIconToSvg as i } from "./seat-reservation/common/mapper/icon-mapper.
|
|
|
3
3
|
import "./seat-reservation/common/mapper.js";
|
|
4
4
|
import { t as a } from "./svgs-D5DhLHxC.js";
|
|
5
5
|
import { getI18nSeatReservation as o } from "./seat-reservation/common/translations/i18n.js";
|
|
6
|
-
import { t as s } from "./seat-reservation-area.component-
|
|
7
|
-
import { t as c } from "./seat-reservation-graphic.component-
|
|
6
|
+
import { t as s } from "./seat-reservation-area.component-B5_N7H_a.js";
|
|
7
|
+
import { t as c } from "./seat-reservation-graphic.component-Dh1e2Pve.js";
|
|
8
8
|
import { assetsTemplate as l, svgImageByOSDMCode as u } from "./seat-reservation/seat-reservation-graphic/seat-reservation-assets.js";
|
|
9
|
-
import { t as d } from "./seat-reservation-navigation-coach.component-
|
|
9
|
+
import { t as d } from "./seat-reservation-navigation-coach.component-BdCUfksf.js";
|
|
10
10
|
import { t as f } from "./seat-reservation-navigation-services.component-C9dDYD_M.js";
|
|
11
11
|
import { t as p } from "./seat-reservation-place-control.component-CE7d9M2b.js";
|
|
12
12
|
import { t as m } from "./seat-reservation-scoped.component-DVyP2JGE.js";
|
|
13
13
|
import { SeatReservationBaseElement as h } from "./seat-reservation/seat-reservation/seat-reservation-base-element.js";
|
|
14
|
-
import { t as g } from "./seat-reservation.component-
|
|
14
|
+
import { t as g } from "./seat-reservation.component-DEtsEzex.js";
|
|
15
15
|
export { s as SbbSeatReservationAreaElement, g as SbbSeatReservationElement, c as SbbSeatReservationGraphicElement, d as SbbSeatReservationNavigationCoachElement, f as SbbSeatReservationNavigationServicesElement, p as SbbSeatReservationPlaceControlElement, m as SbbSeatReservationScopedElement, h as SeatReservationBaseElement, l as assetsTemplate, o as getI18nSeatReservation, r as mapCoachInfosToCoachSelection, i as mapIconToSvg, t as mapPlaceAndCoachToSeatReservationPlaceSelection, n as mapPlaceInfosToPlaceSelection, e as mapRawDataToSeatReservation, u as svgImageByOSDMCode, a as svgs };
|
|
@@ -1,96 +0,0 @@
|
|
|
1
|
-
import { __esDecorate, __runInitializers } from "tslib";
|
|
2
|
-
import { SbbElement } from "@sbb-esta/lyne-elements/core/base-elements.js";
|
|
3
|
-
import { forceType } from "@sbb-esta/lyne-elements/core/decorators.js";
|
|
4
|
-
import { boxSizingStyles } from "@sbb-esta/lyne-elements/core/styles.js";
|
|
5
|
-
import { html, unsafeCSS } from "lit";
|
|
6
|
-
import { property } from "lit/decorators.js";
|
|
7
|
-
//#region src/elements-experimental/seat-reservation/seat-reservation-area/seat-reservation-area.scss?inline
|
|
8
|
-
var seat_reservation_area_default = ":host {\n --sbb-seat-reservation-area-border-radius: var(--sbb-border-width-4x);\n --sbb-seat-reservation-area-rotation: 0;\n display: flex;\n justify-content: center;\n align-items: center;\n height: calc(var(--sbb-seat-reservation-area-height) * var(--sbb-seat-reservation-one-px-rem, 0.0625rem));\n width: calc(var(--sbb-seat-reservation-area-width) * var(--sbb-seat-reservation-one-px-rem, 0.0625rem));\n border: var(--sbb-border-width-1x) solid var(--sbb-color-graphite);\n border: var(--sbb-border-width-1x) solid light-dark(var(--sbb-color-graphite), var(--sbb-color-granite));\n border-radius: var(--sbb-seat-reservation-area-border-radius);\n position: absolute;\n inset-block-start: calc(var(--sbb-seat-reservation-area-top) * var(--sbb-seat-reservation-one-px-rem, 0.0625rem));\n inset-inline-start: calc(var(--sbb-seat-reservation-area-left) * var(--sbb-seat-reservation-one-px-rem, 0.0625rem));\n rotate: calc(var(--sbb-seat-reservation-area-rotation) * 1deg);\n line-height: normal;\n background-color: var(--sbb-background-color-2);\n}\n\n:host([background=dark]) {\n background-color: var(--sbb-color-milk);\n background-color: light-dark(var(--sbb-color-milk), var(--sbb-color-iron));\n}\n\n:host([mounting=upper-border]) {\n border-block-start-width: 0;\n border-radius: 0 0 var(--sbb-seat-reservation-area-border-radius) var(--sbb-seat-reservation-area-border-radius);\n}\n\n:host([mounting=lower-border]) {\n border-block-end-width: 0;\n border-radius: var(--sbb-seat-reservation-area-border-radius) var(--sbb-seat-reservation-area-border-radius) 0 0;\n}\n\n:host([mounting=upper-to-lower-border]) {\n border-block-start: none;\n border-block-end: none;\n border-radius: 0;\n}\n\n:host(.sbb-seat-reservation-area--cursor-pointer) {\n cursor: var(--sbb-cursor-pointer);\n}";
|
|
9
|
-
//#endregion
|
|
10
|
-
//#region src/elements-experimental/seat-reservation/seat-reservation-area/seat-reservation-area.component.ts
|
|
11
|
-
/**
|
|
12
|
-
* Visualize an area with a special meaning within a wagon.
|
|
13
|
-
*/
|
|
14
|
-
var SbbSeatReservationAreaElement = (() => {
|
|
15
|
-
let _classSuper = SbbElement;
|
|
16
|
-
let _mounting_decorators;
|
|
17
|
-
let _mounting_initializers = [];
|
|
18
|
-
let _mounting_extraInitializers = [];
|
|
19
|
-
let _background_decorators;
|
|
20
|
-
let _background_initializers = [];
|
|
21
|
-
let _background_extraInitializers = [];
|
|
22
|
-
return class SbbSeatReservationAreaElement extends _classSuper {
|
|
23
|
-
static {
|
|
24
|
-
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
25
|
-
_mounting_decorators = [forceType(), property({ reflect: true })];
|
|
26
|
-
_background_decorators = [forceType(), property({ reflect: true })];
|
|
27
|
-
__esDecorate(this, null, _mounting_decorators, {
|
|
28
|
-
kind: "accessor",
|
|
29
|
-
name: "mounting",
|
|
30
|
-
static: false,
|
|
31
|
-
private: false,
|
|
32
|
-
access: {
|
|
33
|
-
has: (obj) => "mounting" in obj,
|
|
34
|
-
get: (obj) => obj.mounting,
|
|
35
|
-
set: (obj, value) => {
|
|
36
|
-
obj.mounting = value;
|
|
37
|
-
}
|
|
38
|
-
},
|
|
39
|
-
metadata: _metadata
|
|
40
|
-
}, _mounting_initializers, _mounting_extraInitializers);
|
|
41
|
-
__esDecorate(this, null, _background_decorators, {
|
|
42
|
-
kind: "accessor",
|
|
43
|
-
name: "background",
|
|
44
|
-
static: false,
|
|
45
|
-
private: false,
|
|
46
|
-
access: {
|
|
47
|
-
has: (obj) => "background" in obj,
|
|
48
|
-
get: (obj) => obj.background,
|
|
49
|
-
set: (obj, value) => {
|
|
50
|
-
obj.background = value;
|
|
51
|
-
}
|
|
52
|
-
},
|
|
53
|
-
metadata: _metadata
|
|
54
|
-
}, _background_initializers, _background_extraInitializers);
|
|
55
|
-
if (_metadata) Object.defineProperty(this, Symbol.metadata, {
|
|
56
|
-
enumerable: true,
|
|
57
|
-
configurable: true,
|
|
58
|
-
writable: true,
|
|
59
|
-
value: _metadata
|
|
60
|
-
});
|
|
61
|
-
}
|
|
62
|
-
static {
|
|
63
|
-
this.elementName = "sbb-seat-reservation-area";
|
|
64
|
-
}
|
|
65
|
-
static {
|
|
66
|
-
this.styles = [boxSizingStyles, unsafeCSS(seat_reservation_area_default)];
|
|
67
|
-
}
|
|
68
|
-
#mounting_accessor_storage = __runInitializers(this, _mounting_initializers, "free");
|
|
69
|
-
/** Mounting Prop */
|
|
70
|
-
get mounting() {
|
|
71
|
-
return this.#mounting_accessor_storage;
|
|
72
|
-
}
|
|
73
|
-
set mounting(value) {
|
|
74
|
-
this.#mounting_accessor_storage = value;
|
|
75
|
-
}
|
|
76
|
-
#background_accessor_storage = (__runInitializers(this, _mounting_extraInitializers), __runInitializers(this, _background_initializers, "light"));
|
|
77
|
-
/** the background of the area */
|
|
78
|
-
get background() {
|
|
79
|
-
return this.#background_accessor_storage;
|
|
80
|
-
}
|
|
81
|
-
set background(value) {
|
|
82
|
-
this.#background_accessor_storage = value;
|
|
83
|
-
}
|
|
84
|
-
render() {
|
|
85
|
-
return html`<slot></slot>`;
|
|
86
|
-
}
|
|
87
|
-
constructor() {
|
|
88
|
-
super(...arguments);
|
|
89
|
-
__runInitializers(this, _background_extraInitializers);
|
|
90
|
-
}
|
|
91
|
-
};
|
|
92
|
-
})();
|
|
93
|
-
//#endregion
|
|
94
|
-
export { SbbSeatReservationAreaElement as t };
|
|
95
|
-
|
|
96
|
-
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2VhdC1yZXNlcnZhdGlvbi1hcmVhLmNvbXBvbmVudC1EYmV1VG5YVC5qcyIsIm5hbWVzIjpbXSwic291cmNlcyI6WyIuLi8uLi8uLi9zcmMvZWxlbWVudHMtZXhwZXJpbWVudGFsL3NlYXQtcmVzZXJ2YXRpb24vc2VhdC1yZXNlcnZhdGlvbi1hcmVhL3NlYXQtcmVzZXJ2YXRpb24tYXJlYS5zY3NzP2lubGluZSIsIi4uLy4uLy4uL3NyYy9lbGVtZW50cy1leHBlcmltZW50YWwvc2VhdC1yZXNlcnZhdGlvbi9zZWF0LXJlc2VydmF0aW9uLWFyZWEvc2VhdC1yZXNlcnZhdGlvbi1hcmVhLmNvbXBvbmVudC50cyJdLCJzb3VyY2VzQ29udGVudCI6WyJAdXNlICdAc2JiLWVzdGEvbHluZS1lbGVtZW50cy9jb3JlL3N0eWxlcycgYXMgc2JiO1xuXG46aG9zdCB7XG4gIC0tc2JiLXNlYXQtcmVzZXJ2YXRpb24tYXJlYS1ib3JkZXItcmFkaXVzOiB2YXIoLS1zYmItYm9yZGVyLXdpZHRoLTR4KTtcbiAgLS1zYmItc2VhdC1yZXNlcnZhdGlvbi1hcmVhLXJvdGF0aW9uOiAwO1xuXG4gIGRpc3BsYXk6IGZsZXg7XG4gIGp1c3RpZnktY29udGVudDogY2VudGVyO1xuICBhbGlnbi1pdGVtczogY2VudGVyO1xuICBoZWlnaHQ6IGNhbGMoXG4gICAgdmFyKC0tc2JiLXNlYXQtcmVzZXJ2YXRpb24tYXJlYS1oZWlnaHQpICpcbiAgICAgIHZhcigtLXNiYi1zZWF0LXJlc2VydmF0aW9uLW9uZS1weC1yZW0sICN7c2JiLnB4LXR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0VBS25GLDZCQUFBLGtCQUFBLE1BQUEsd0JBQ0UsT0FBTTs7RUFEUixJQUFnQixXQUFRO0FBQUEsVUFBQSxNQUFBOztFQUF4QixJQUFnQixTQUFRLE9BQUE7QUFBQSxTQUFBLDRCQUFBOztFQU14QixnQ0FBQSxrQkFBQSxNQUFBLDRCQUFBLEVBQUEsa0JBQUEsTUFBQSwwQkFBK0MsUUFBTzs7RUFBdEQsSUFBZ0IsYUFBVTtBQUFBLFVBQUEsTUFBQTs7RUFBMUIsSUFBZ0IsV0FBVSxPQUFBO0FBQUEsU0FBQSw4QkFBQTs7RUFFUCxTQUFNO0FBQ3ZCLFVBQU8sSUFBSSJ9
|
|
@@ -1,129 +0,0 @@
|
|
|
1
|
-
import { __esDecorate, __runInitializers } from "tslib";
|
|
2
|
-
import { SbbElement } from "@sbb-esta/lyne-elements/core/base-elements.js";
|
|
3
|
-
import { SbbLanguageController } from "@sbb-esta/lyne-elements/core/controllers.js";
|
|
4
|
-
import { forceType } from "@sbb-esta/lyne-elements/core/decorators.js";
|
|
5
|
-
import { boxSizingStyles } from "@sbb-esta/lyne-elements/core/styles.js";
|
|
6
|
-
import "@sbb-esta/lyne-elements/icon.js";
|
|
7
|
-
import { html, isServer, unsafeCSS } from "lit";
|
|
8
|
-
import { property } from "lit/decorators.js";
|
|
9
|
-
import { mapIconToSvg } from "./seat-reservation/common/mapper.js";
|
|
10
|
-
import { classMap } from "lit/directives/class-map.js";
|
|
11
|
-
import { getI18nSeatReservation } from "./seat-reservation/common/translations.js";
|
|
12
|
-
//#region src/elements-experimental/seat-reservation/seat-reservation-graphic/seat-reservation-graphic.scss?inline
|
|
13
|
-
var seat_reservation_graphic_default = ":host {\n --sbb-seat-reservation-graphic-max-width: auto;\n --sbb-seat-reservation-graphic-max-height: auto;\n --sbb-seat-reservation-graphic-width: 16;\n --sbb-seat-reservation-graphic-height: 16;\n --sbb-seat-reservation-graphic-rotation: 0;\n --sbb-seat-reservation-graphic-inverse-rotation: 0;\n --sbb-seat-reservation-graphic-padding-percent: 1;\n --sbb-seat-reservation-graphic-position: initial;\n --sbb-seat-reservation-graphic-left: 0;\n --sbb-seat-reservation-graphic-top: 0;\n --sbb-icon-svg-width: calc(\n var(--sbb-seat-reservation-graphic-width) *\n var(--sbb-seat-reservation-one-px-rem, 0.0625rem)\n );\n --sbb-icon-svg-height: calc(\n var(--sbb-seat-reservation-graphic-height) *\n var(--sbb-seat-reservation-one-px-rem, 0.0625rem)\n );\n display: flex;\n justify-content: center;\n align-items: center;\n width: calc(var(--sbb-seat-reservation-graphic-width) * var(--sbb-seat-reservation-one-px-rem, 0.0625rem));\n height: calc(var(--sbb-seat-reservation-graphic-height) * var(--sbb-seat-reservation-one-px-rem, 0.0625rem));\n position: var(--sbb-seat-reservation-graphic-position);\n inset-inline-start: calc(var(--sbb-seat-reservation-graphic-left) * var(--sbb-seat-reservation-one-px-rem, 0.0625rem));\n inset-block-start: calc(var(--sbb-seat-reservation-graphic-top) * var(--sbb-seat-reservation-one-px-rem, 0.0625rem));\n}\n\n:host(.auto-width) {\n --sbb-icon-svg-width: auto;\n max-width: calc(var(--sbb-seat-reservation-graphic-max-width) * var(--sbb-seat-reservation-one-px-rem, 0.0625rem));\n width: auto;\n}\n\n:host(.sbb-sr-graphic__dimension--square-dim) {\n --sbb-icon-svg-width: min(min(var(--sbb-seat-reservation-graphic-width) * var(--sbb-seat-reservation-one-px-rem, 0.0625rem), var(--sbb-seat-reservation-graphic-height) * var(--sbb-seat-reservation-one-px-rem, 0.0625rem)) * var(--sbb-seat-reservation-graphic-padding-percent), min(var(--sbb-seat-reservation-graphic-max-width) * var(--sbb-seat-reservation-one-px-rem, 0.0625rem), var(--sbb-seat-reservation-graphic-max-height) * var(--sbb-seat-reservation-one-px-rem, 0.0625rem)));\n --sbb-icon-svg-height: min(min(var(--sbb-seat-reservation-graphic-width) * var(--sbb-seat-reservation-one-px-rem, 0.0625rem), var(--sbb-seat-reservation-graphic-height) * var(--sbb-seat-reservation-one-px-rem, 0.0625rem)) * var(--sbb-seat-reservation-graphic-padding-percent), min(var(--sbb-seat-reservation-graphic-max-width) * var(--sbb-seat-reservation-one-px-rem, 0.0625rem), var(--sbb-seat-reservation-graphic-max-height) * var(--sbb-seat-reservation-one-px-rem, 0.0625rem)));\n width: min(min(var(--sbb-seat-reservation-graphic-width) * var(--sbb-seat-reservation-one-px-rem, 0.0625rem), var(--sbb-seat-reservation-graphic-height) * var(--sbb-seat-reservation-one-px-rem, 0.0625rem)) * var(--sbb-seat-reservation-graphic-padding-percent), min(var(--sbb-seat-reservation-graphic-max-width) * var(--sbb-seat-reservation-one-px-rem, 0.0625rem), var(--sbb-seat-reservation-graphic-max-height) * var(--sbb-seat-reservation-one-px-rem, 0.0625rem)));\n height: min(min(var(--sbb-seat-reservation-graphic-width) * var(--sbb-seat-reservation-one-px-rem, 0.0625rem), var(--sbb-seat-reservation-graphic-height) * var(--sbb-seat-reservation-one-px-rem, 0.0625rem)) * var(--sbb-seat-reservation-graphic-padding-percent), min(var(--sbb-seat-reservation-graphic-max-width) * var(--sbb-seat-reservation-one-px-rem, 0.0625rem), var(--sbb-seat-reservation-graphic-max-height) * var(--sbb-seat-reservation-one-px-rem, 0.0625rem)));\n}\n\n:host(.sbb-seat-reservation-graphic--cursor-pointer) {\n cursor: var(--sbb-cursor-pointer);\n}\n\n.sbb-sr-icon,\n.sbb-sr-graphic {\n width: inherit;\n height: inherit;\n transform-origin: center;\n rotate: calc(var(--sbb-seat-reservation-graphic-rotation) * 1deg);\n}\n\n.sbb-sr-icon {\n color: var(--sbb-color-granite);\n color: light-dark(var(--sbb-color-granite), var(--sbb-color-graphite));\n}\n\n.sbb-sr-graphic svg {\n width: 100%;\n height: 100%;\n}\n.sbb-sr-graphic svg .fix-rotation-inverse {\n transform-origin: center;\n rotate: calc(var(--sbb-seat-reservation-graphic-inverse-rotation) * 1deg);\n}\n@media (forced-colors: active) {\n .sbb-sr-graphic svg:not(.color-immutable) [fill]:not([fill=none]) {\n fill: currentcolor;\n }\n .sbb-sr-graphic .no-bg {\n fill: transparent;\n }\n}";
|
|
14
|
-
//#endregion
|
|
15
|
-
//#region src/elements-experimental/seat-reservation/seat-reservation-graphic/seat-reservation-graphic.component.ts
|
|
16
|
-
/**
|
|
17
|
-
* Output one of the SVG graphics based on its code.
|
|
18
|
-
*/
|
|
19
|
-
var SbbSeatReservationGraphicElement = (() => {
|
|
20
|
-
let _classSuper = SbbElement;
|
|
21
|
-
let _name_decorators;
|
|
22
|
-
let _name_initializers = [];
|
|
23
|
-
let _name_extraInitializers = [];
|
|
24
|
-
let _stretch_decorators;
|
|
25
|
-
let _stretch_initializers = [];
|
|
26
|
-
let _stretch_extraInitializers = [];
|
|
27
|
-
return class SbbSeatReservationGraphicElement extends _classSuper {
|
|
28
|
-
constructor() {
|
|
29
|
-
super(...arguments);
|
|
30
|
-
this.#name_accessor_storage = __runInitializers(this, _name_initializers, "");
|
|
31
|
-
this.#stretch_accessor_storage = (__runInitializers(this, _name_extraInitializers), __runInitializers(this, _stretch_initializers, false));
|
|
32
|
-
this._language = (__runInitializers(this, _stretch_extraInitializers), new SbbLanguageController(this));
|
|
33
|
-
}
|
|
34
|
-
static {
|
|
35
|
-
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
36
|
-
_name_decorators = [forceType(), property({ attribute: "name" })];
|
|
37
|
-
_stretch_decorators = [forceType(), property({
|
|
38
|
-
attribute: "stretch",
|
|
39
|
-
type: Boolean
|
|
40
|
-
})];
|
|
41
|
-
__esDecorate(this, null, _name_decorators, {
|
|
42
|
-
kind: "accessor",
|
|
43
|
-
name: "name",
|
|
44
|
-
static: false,
|
|
45
|
-
private: false,
|
|
46
|
-
access: {
|
|
47
|
-
has: (obj) => "name" in obj,
|
|
48
|
-
get: (obj) => obj.name,
|
|
49
|
-
set: (obj, value) => {
|
|
50
|
-
obj.name = value;
|
|
51
|
-
}
|
|
52
|
-
},
|
|
53
|
-
metadata: _metadata
|
|
54
|
-
}, _name_initializers, _name_extraInitializers);
|
|
55
|
-
__esDecorate(this, null, _stretch_decorators, {
|
|
56
|
-
kind: "accessor",
|
|
57
|
-
name: "stretch",
|
|
58
|
-
static: false,
|
|
59
|
-
private: false,
|
|
60
|
-
access: {
|
|
61
|
-
has: (obj) => "stretch" in obj,
|
|
62
|
-
get: (obj) => obj.stretch,
|
|
63
|
-
set: (obj, value) => {
|
|
64
|
-
obj.stretch = value;
|
|
65
|
-
}
|
|
66
|
-
},
|
|
67
|
-
metadata: _metadata
|
|
68
|
-
}, _stretch_initializers, _stretch_extraInitializers);
|
|
69
|
-
if (_metadata) Object.defineProperty(this, Symbol.metadata, {
|
|
70
|
-
enumerable: true,
|
|
71
|
-
configurable: true,
|
|
72
|
-
writable: true,
|
|
73
|
-
value: _metadata
|
|
74
|
-
});
|
|
75
|
-
}
|
|
76
|
-
static {
|
|
77
|
-
this.elementName = "sbb-seat-reservation-graphic";
|
|
78
|
-
}
|
|
79
|
-
static {
|
|
80
|
-
this.styles = [boxSizingStyles, unsafeCSS(seat_reservation_graphic_default)];
|
|
81
|
-
}
|
|
82
|
-
#name_accessor_storage;
|
|
83
|
-
/** Name of the SVG graphic to be displayed. */
|
|
84
|
-
get name() {
|
|
85
|
-
return this.#name_accessor_storage;
|
|
86
|
-
}
|
|
87
|
-
set name(value) {
|
|
88
|
-
this.#name_accessor_storage = value;
|
|
89
|
-
}
|
|
90
|
-
#stretch_accessor_storage;
|
|
91
|
-
/** if true, scale the graphic content of the given element non-uniformly if necessary */
|
|
92
|
-
get stretch() {
|
|
93
|
-
return this.#stretch_accessor_storage;
|
|
94
|
-
}
|
|
95
|
-
set stretch(value) {
|
|
96
|
-
this.#stretch_accessor_storage = value;
|
|
97
|
-
}
|
|
98
|
-
render() {
|
|
99
|
-
const svgObj = mapIconToSvg[this.name];
|
|
100
|
-
if (!svgObj?.svg && !svgObj?.svgName) return null;
|
|
101
|
-
return html`<span
|
|
102
|
-
class="${classMap({
|
|
103
|
-
"sbb-sr-icon": !!svgObj.svgName,
|
|
104
|
-
"sbb-sr-graphic": !!svgObj.svg
|
|
105
|
-
})}"
|
|
106
|
-
>
|
|
107
|
-
${svgObj.svgName ? html` <sbb-icon
|
|
108
|
-
name="${svgObj.svgName || ""}"
|
|
109
|
-
aria-hidden="false"
|
|
110
|
-
aria-label="${getI18nSeatReservation(svgObj.svgName, this._language.current)}"
|
|
111
|
-
></sbb-icon>` : html`${this._getSvgElement(svgObj.svg)}`}
|
|
112
|
-
</span>`;
|
|
113
|
-
}
|
|
114
|
-
_getSvgElement(svg) {
|
|
115
|
-
if (!isServer) {
|
|
116
|
-
const parser = new DOMParser();
|
|
117
|
-
const svgString = svg || "<svg></svg>";
|
|
118
|
-
const svgElm = parser.parseFromString(svgString, "image/svg+xml").firstElementChild;
|
|
119
|
-
if (this.stretch && svgElm?.nodeName.toLowerCase() === "svg") svgElm.setAttribute("preserveAspectRatio", "none");
|
|
120
|
-
return svgElm;
|
|
121
|
-
}
|
|
122
|
-
return null;
|
|
123
|
-
}
|
|
124
|
-
};
|
|
125
|
-
})();
|
|
126
|
-
//#endregion
|
|
127
|
-
export { SbbSeatReservationGraphicElement as t };
|
|
128
|
-
|
|
129
|
-
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2VhdC1yZXNlcnZhdGlvbi1ncmFwaGljLmNvbXBvbmVudC1EbHJIdGxpYS5qcyIsIm5hbWVzIjpbXSwic291cmNlcyI6WyIuLi8uLi8uLi9zcmMvZWxlbWVudHMtZXhwZXJpbWVudGFsL3NlYXQtcmVzZXJ2YXRpb24vc2VhdC1yZXNlcnZhdGlvbi1ncmFwaGljL3NlYXQtcmVzZXJ2YXRpb24tZ3JhcGhpYy5zY3NzP2lubGluZSIsIi4uLy4uLy4uL3NyYy9lbGVtZW50cy1leHBlcmltZW50YWwvc2VhdC1yZXNlcnZhdGlvbi9zZWF0LXJlc2VydmF0a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