@sbb-esta/lyne-elements-experimental-dev 5.0.0-next.1-dev.1777525840 → 5.0.0-next.1-dev.1777528735
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 +220 -99
- 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-graphic/seat-reservation-graphic.component.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-area.component-DlH14rY-.js +94 -0
- package/development/seat-reservation-graphic.component-B771YtOf.js +129 -0
- package/development/{seat-reservation-navigation-coach.component-cSX-OEsP.js → seat-reservation-navigation-coach.component-CnA9MEBr.js} +3 -3
- package/development/seat-reservation.component-CZm8Lsj1.js +472 -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-graphic/seat-reservation-graphic.component.js +1 -1
- package/seat-reservation/seat-reservation-navigation-coach/seat-reservation-navigation-coach.component.js +1 -1
- package/{seat-reservation-area.component-CVc6uuMG.js → seat-reservation-area.component-B_T7k-dq.js} +1 -1
- package/seat-reservation-graphic.component-BNtFgIVM.js +102 -0
- package/{seat-reservation-navigation-coach.component-cYSUjsBj.js → seat-reservation-navigation-coach.component-BF2dTeIb.js} +2 -2
- package/{seat-reservation.component-80NgYHsf.js → seat-reservation.component-CNtc2Xcr.js} +74 -81
- package/seat-reservation.js +4 -4
- package/seat-reservation.pure.js +4 -4
- package/development/seat-reservation-area.component-BQEtJhk0.js +0 -94
- package/development/seat-reservation-graphic.component-XpqxL5nq.js +0 -129
- package/development/seat-reservation.component-Dkn66vPo.js +0 -518
- package/seat-reservation-graphic.component-Dzkv9tyR.js +0 -102
|
@@ -302,8 +302,8 @@ var m = ":host{display:inline-block;min-height:calc(44 * var(--sbb-seat-reservat
|
|
|
302
302
|
`;
|
|
303
303
|
}
|
|
304
304
|
_getTitleDescriptionNavCoachButton(e) {
|
|
305
|
-
if (this.coachItemDetails.isDriverArea && !this.coachItemDetails.
|
|
306
|
-
if (this.coachItemDetails.
|
|
305
|
+
if (this.coachItemDetails.isDriverArea && !this.coachItemDetails.isLocomotive) return f("NAVIGATE_COACH_BLOCKED", this._language.current, [this.coachItemDetails.id]);
|
|
306
|
+
if (this.coachItemDetails.isLocomotive) return f("COACH_LOCOMOTIVE", this._language.current);
|
|
307
307
|
let t = f("NAVIGATE_TO_COACH", this._language.current, [this.coachItemDetails.id]);
|
|
308
308
|
if (e) {
|
|
309
309
|
let n = f(e === 1 ? "SERVICE_CLASS_FIRST" : "SERVICE_CLASS_SECOND", this._language.current), r = f("NAVIGATE_TO_COACH_SERVICE_CLASS_SUB", this._language.current, [n]);
|
|
@@ -15,7 +15,7 @@ import { SbbSeatReservationScopedElement as v } from "./seat-reservation/seat-re
|
|
|
15
15
|
//#region src/elements-experimental/seat-reservation/seat-reservation/seat-reservation.scss?inline
|
|
16
16
|
var y = ":host{--sbb-seat-reservation-grid-size: 16px;--sbb-seat-reservation-height: 0;--sbb-seat-reservation-decks: 1;display:block;height:inherit}:host ::part(coach-floor){fill:var(--sbb-background-color-2)}@media(forced-colors:active){:host ::part(coach-floor){fill:transparent}}:host(:dir(rtl)) :not(.sbb-sr-place-ctrl--type-bicycle,.sbb-sr-place-ctrl--orientation-90,.sbb-sr-place-ctrl--orientation-270,.sbb-sr-place-ctrl--state-selected) ::part(coach-floor){rotate:180deg}[popover]:where(sbb-popover){margin:0;padding:0;border:none;width:auto;height:auto;background-color:transparent;color:inherit;pointer-events:none}[popover]:where(sbb-popover) .sbb-sr-popover{margin-block:calc(4 * var(--sbb-seat-reservation-one-px-rem, .0625rem))}:host([align-vertical]) .sbb-sr__component{flex-direction:row-reverse;justify-content:flex-end;gap:calc(22 * var(--sbb-seat-reservation-one-px-rem, .0625rem));height:inherit}@media(min-width:37.5rem){:host([align-vertical]) .sbb-sr__component{gap:calc(54 * var(--sbb-seat-reservation-one-px-rem, .0625rem))}}:host([align-vertical]) .sbb-sr__component nav.sbb-sr-navigation,:host([align-vertical]) .sbb-sr__component ul.sbb-sr-navigation__list-coaches{flex-direction:column}:host([align-vertical]) .sbb-sr__component nav.sbb-sr-navigation{padding:calc(16 * var(--sbb-seat-reservation-one-px-rem, .0625rem)) 0}:host([align-vertical]) .sbb-sr__component nav.sbb-sr-navigation .sbb-sr__navigation-control-button{left:calc(1 * var(--sbb-seat-reservation-one-px-rem, .0625rem));top:0;rotate:90deg}@media(min-width:64rem){:host([align-vertical]) .sbb-sr__component nav.sbb-sr-navigation .sbb-sr__navigation-control-button{left:calc(-1 * var(--sbb-seat-reservation-one-px-rem, .0625rem))}}:host([align-vertical]) .sbb-sr__component nav.sbb-sr-navigation ul.sbb-sr-navigation__list-coaches{max-width:initial;padding:calc(5 * var(--sbb-seat-reservation-one-px-rem, .0625rem));overflow:hidden scroll}:host([align-vertical]) .sbb-sr__component nav.sbb-sr-navigation ul.sbb-sr-navigation__list-coaches li{display:flex}:host([align-vertical]) .sbb-sr__wrapper-coach-decks{flex-direction:column}:host([align-vertical]) .sbb-sr__wrapper-coach-decks .sbb-sr__wrapper-deck-labels{flex-direction:column-reverse;width:calc((var(--sbb-seat-reservation-height) + 24) * var(--sbb-seat-reservation-one-px-rem, .0625rem));height:initial}:host([align-vertical]) .sbb-sr__wrapper-coach-decks .sbb-sr__wrapper-deck-labels b{inline-size:calc(50% - 16 * var(--sbb-seat-reservation-one-px-rem, .0625rem));block-size:calc(20 * var(--sbb-seat-reservation-one-px-rem, .0625rem));margin-bottom:calc(16 * var(--sbb-seat-reservation-one-px-rem, .0625rem));rotate:initial;writing-mode:initial}:host([align-vertical]) .sbb-sr__wrapper-scrollarea{width:calc((var(--sbb-seat-reservation-height) + 24) * var(--sbb-seat-reservation-one-px-rem, .0625rem));height:100%;overflow:hidden scroll}:host([align-vertical]) .sbb-sr__wrapper-scrollarea .sbb-sr__parent{rotate:90deg}:host([align-vertical]) .sbb-sr-travel-direction-wrapper{width:calc(var(--sbb-seat-reservation-height) * var(--sbb-seat-reservation-one-px-rem, .0625rem));margin-block-start:calc(4 * var(--sbb-seat-reservation-one-px-rem, .0625rem))}.sbb-sr-navigation{gap:calc(3 * var(--sbb-seat-reservation-one-px-rem, .0625rem))}.sbb-sr-navigation .sbb-sr__navigation-control-button{position:relative;top:calc(2 * var(--sbb-seat-reservation-one-px-rem, .0625rem))}@media(min-width:64rem){.sbb-sr-navigation .sbb-sr__navigation-control-button{top:0}}.sbb-sr__component{display:flex;flex-direction:column;gap:calc(64 * var(--sbb-seat-reservation-one-px-rem, .0625rem) - 16px)}.sbb-sr-travel-direction-wrapper{display:flex;justify-content:center;align-items:center;column-gap:calc(4 * var(--sbb-seat-reservation-one-px-rem, .0625rem));margin-block:calc(8 * var(--sbb-seat-reservation-one-px-rem, .0625rem)) calc(4 * var(--sbb-seat-reservation-one-px-rem, .0625rem));font-size:var(--sbb-text-font-size-s)}.sbb-sr-travel-direction-wrapper .sbb-sr__travel-direction--arrow{display:flex;align-items:center}.sbb-sr-navigation-wrapper{display:flex}.sbb-sr-navigation{display:flex;justify-content:center;width:100%;padding-inline:16px}.sbb-sr-navigation__list-coaches{list-style:none;margin:0;padding:0;font-size:inherit;--sbb-scrollbar-width: var(--sbb-spacing-fixed-3x);--sbb-scrollbar-thumb-width: .125rem;--sbb-scrollbar-thumb-width-hover: .25rem;--sbb-scrollbar-width-firefox: thin;--sbb-scrollbar-color: color-mix(in srgb, var(--sbb-color-black) 30%, transparent);--sbb-scrollbar-color: light-dark( color-mix(in srgb, var(--sbb-color-black) 30%, transparent), color-mix(in srgb, var(--sbb-color-white) 30%, transparent) );--sbb-scrollbar-color-hover: color-mix(in srgb, var(--sbb-color-black) 60%, transparent);--sbb-scrollbar-color-hover: light-dark( color-mix(in srgb, var(--sbb-color-black) 60%, transparent), color-mix(in srgb, var(--sbb-color-white) 60%, transparent) );--sbb-scrollbar-track-color: transparent}.sbb-sr-navigation__list-coaches::-webkit-scrollbar{width:var(--sbb-scrollbar-width);height:var(--sbb-scrollbar-width);background-color:var(--sbb-scrollbar-track-color, transparent)}.sbb-sr-navigation__list-coaches::-webkit-scrollbar-corner{background-color:var(--sbb-scrollbar-track-color, transparent)}.sbb-sr-navigation__list-coaches::-webkit-scrollbar-thumb{background-color:var(--sbb-scrollbar-color, currentcolor);border:calc(.5 * (var(--sbb-scrollbar-width) - var(--sbb-scrollbar-thumb-width))) solid transparent;border-radius:var(--sbb-border-radius-4x);background-clip:padding-box}.sbb-sr-navigation__list-coaches::-webkit-scrollbar-thumb:hover{background-color:var(--sbb-scrollbar-color-hover, currentcolor);border-width:calc(.5 * (var(--sbb-scrollbar-width) - var(--sbb-scrollbar-thumb-width-hover)))}.sbb-sr-navigation__list-coaches::-webkit-scrollbar-button,.sbb-sr-navigation__list-coaches::-webkit-scrollbar-corner{display:none}@supports not selector(::-webkit-scrollbar){.sbb-sr-navigation__list-coaches{scrollbar-width:var(--sbb-scrollbar-width-firefox);scrollbar-color:var(--sbb-scrollbar-color, currentcolor) var(--sbb-scrollbar-track-color, transparent)}}.sbb-sr-navigation__list-coaches{display:flex;flex-wrap:nowrap;gap:calc(4 * var(--sbb-seat-reservation-one-px-rem, .0625rem));padding:calc(6 * var(--sbb-seat-reservation-one-px-rem, .0625rem)) calc(5 * var(--sbb-seat-reservation-one-px-rem, .0625rem)) 0;max-width:856px;--sbb-scrollbar-color: transparent;overflow:scroll hidden;position:relative}.sbb-sr__wrapper-coach-decks{display:flex;overflow:hidden;height:inherit}.sbb-sr__wrapper-coach-decks .sbb-sr__wrapper-deck-labels{display:flex;justify-content:space-between;height:calc(var(--sbb-seat-reservation-height) * var(--sbb-seat-reservation-one-px-rem, .0625rem));writing-mode:vertical-lr}.sbb-sr__wrapper-coach-decks .sbb-sr__wrapper-deck-labels b{height:calc(50% - 16 * var(--sbb-seat-reservation-one-px-rem, .0625rem));width:calc(20 * var(--sbb-seat-reservation-one-px-rem, .0625rem));margin-block-end:16px;rotate:180deg;text-align:center;line-height:calc(20 * var(--sbb-seat-reservation-one-px-rem, .0625rem))}.sbb-sr__wrapper-scrollarea{--sbb-scrollbar-width: var(--sbb-spacing-fixed-3x);--sbb-scrollbar-thumb-width: .125rem;--sbb-scrollbar-thumb-width-hover: .25rem;--sbb-scrollbar-width-firefox: thin;--sbb-scrollbar-color: color-mix(in srgb, var(--sbb-color-black) 30%, transparent);--sbb-scrollbar-color: light-dark( color-mix(in srgb, var(--sbb-color-black) 30%, transparent), color-mix(in srgb, var(--sbb-color-white) 30%, transparent) );--sbb-scrollbar-color-hover: color-mix(in srgb, var(--sbb-color-black) 60%, transparent);--sbb-scrollbar-color-hover: light-dark( color-mix(in srgb, var(--sbb-color-black) 60%, transparent), color-mix(in srgb, var(--sbb-color-white) 60%, transparent) );--sbb-scrollbar-track-color: transparent}.sbb-sr__wrapper-scrollarea::-webkit-scrollbar{width:var(--sbb-scrollbar-width);height:var(--sbb-scrollbar-width);background-color:var(--sbb-scrollbar-track-color, transparent)}.sbb-sr__wrapper-scrollarea::-webkit-scrollbar-corner{background-color:var(--sbb-scrollbar-track-color, transparent)}.sbb-sr__wrapper-scrollarea::-webkit-scrollbar-thumb{background-color:var(--sbb-scrollbar-color, currentcolor);border:calc(.5 * (var(--sbb-scrollbar-width) - var(--sbb-scrollbar-thumb-width))) solid transparent;border-radius:var(--sbb-border-radius-4x);background-clip:padding-box}.sbb-sr__wrapper-scrollarea::-webkit-scrollbar-thumb:hover{background-color:var(--sbb-scrollbar-color-hover, currentcolor);border-width:calc(.5 * (var(--sbb-scrollbar-width) - var(--sbb-scrollbar-thumb-width-hover)))}.sbb-sr__wrapper-scrollarea::-webkit-scrollbar-button,.sbb-sr__wrapper-scrollarea::-webkit-scrollbar-corner{display:none}@supports not selector(::-webkit-scrollbar){.sbb-sr__wrapper-scrollarea{scrollbar-width:var(--sbb-scrollbar-width-firefox);scrollbar-color:var(--sbb-scrollbar-color, currentcolor) var(--sbb-scrollbar-track-color, transparent)}}.sbb-sr__wrapper-scrollarea{overflow:scroll hidden;padding-block:calc(8 * var(--sbb-seat-reservation-one-px-rem, .0625rem)) calc(16 * var(--sbb-seat-reservation-one-px-rem, .0625rem))}.sbb-sr__wrapper-scrollarea .sbb-sr__parent{display:flex;flex-direction:column;position:relative}.sbb-sr__list-decks{list-style:none;margin:0;padding:0;font-size:inherit;display:flex;flex-direction:column}.sbb-sr__list-decks--gap{gap:calc(48 * var(--sbb-seat-reservation-one-px-rem, .0625rem))}.sbb-sr__list-item-deck{position:relative}.sbb-sr__list-coaches{list-style:none;margin:0;padding:0;font-size:inherit;display:flex;gap:calc(4 * var(--sbb-seat-reservation-one-px-rem, .0625rem))}.sbb-sr__list-decks:has(.sbb-sr-coach-has-overhanging-elements) .sbb-sr__list-coaches{gap:calc(8 * var(--sbb-seat-reservation-one-px-rem, .0625rem))}.sbb-sr__item-coach{position:relative}.sbb-sr-coach-wrapper__table{outline:0}", b = class extends e {
|
|
17
17
|
constructor() {
|
|
18
|
-
super(...arguments), this._language = new n(this)
|
|
18
|
+
super(...arguments), this._language = new n(this);
|
|
19
19
|
}
|
|
20
20
|
static {
|
|
21
21
|
this.elementName = "sbb-seat-reservation";
|
|
@@ -162,9 +162,10 @@ var y = ":host{--sbb-seat-reservation-grid-size: 16px;--sbb-seat-reservation-hei
|
|
|
162
162
|
"--sbb-seat-reservation-scoped-height": i.h
|
|
163
163
|
})}
|
|
164
164
|
>
|
|
165
|
-
${this._getRenderedCoachBorders(e, t)}
|
|
166
|
-
${this.
|
|
167
|
-
${this.
|
|
165
|
+
${this._getRenderedCoachBorders(e, n, t)}
|
|
166
|
+
${this._getRenderedCoachElements(n, t)}
|
|
167
|
+
${this._getRenderedAreaElements(n, t)}
|
|
168
|
+
${this._getRenderedServiceElements(n, t)}
|
|
168
169
|
|
|
169
170
|
<table
|
|
170
171
|
@focus=${() => this.onFocusTableCoachAndPreselectPlace(t)}
|
|
@@ -180,21 +181,17 @@ var y = ":host{--sbb-seat-reservation-grid-size: 16px;--sbb-seat-reservation-hei
|
|
|
180
181
|
</table>
|
|
181
182
|
</sbb-seat-reservation-scoped>`;
|
|
182
183
|
}
|
|
183
|
-
_getRenderedCoachBorders(e, t) {
|
|
184
|
+
_getRenderedCoachBorders(e, t, n) {
|
|
184
185
|
if (!e.graphicElements) return null;
|
|
185
|
-
let
|
|
186
|
-
|
|
187
|
-
let o = (e.dimension.h + this.coachBorderOffset * 2) * this.baseGridSize, s = n && n.position.x === 0 ? n?.dimension.w * this.baseGridSize : this.baseGridSize;
|
|
188
|
-
r && (i = this.getCalculatedDimension(e.dimension).w - 2 * (r.dimension.w * this.baseGridSize), s = r.dimension.w * this.baseGridSize);
|
|
189
|
-
let c = this.overHangingElementInformation.find((t) => t.coachId === e.id);
|
|
190
|
-
return (c?.overhangingPlaces || c?.overhangingGraphicAreas) && (i += 2 * this.baseGridSize, s = 0), a`
|
|
186
|
+
let r = this.seatReservationStructure.decks[t].deckCoaches[n], i = r.borderMiddleElement, o = r.hasOverhangingElements;
|
|
187
|
+
return a`
|
|
191
188
|
<sbb-seat-reservation-graphic
|
|
192
|
-
class="${u({ "sbb-sr-coach-has-overhanging-elements":
|
|
189
|
+
class="${u({ "sbb-sr-coach-has-overhanging-elements": o || !1 })}"
|
|
193
190
|
style=${l({
|
|
194
|
-
"--sbb-seat-reservation-graphic-width": i,
|
|
195
|
-
"--sbb-seat-reservation-graphic-height":
|
|
196
|
-
"--sbb-seat-reservation-graphic-top":
|
|
197
|
-
"--sbb-seat-reservation-graphic-left":
|
|
191
|
+
"--sbb-seat-reservation-graphic-width": i.dimension.w,
|
|
192
|
+
"--sbb-seat-reservation-graphic-height": i.dimension.h,
|
|
193
|
+
"--sbb-seat-reservation-graphic-top": i.position.y,
|
|
194
|
+
"--sbb-seat-reservation-graphic-left": i.position.x,
|
|
198
195
|
"--sbb-seat-reservation-graphic-position": "absolute"
|
|
199
196
|
})}
|
|
200
197
|
name="COACH_BORDER_MIDDLE"
|
|
@@ -252,86 +249,82 @@ var y = ":host{--sbb-seat-reservation-grid-size: 16px;--sbb-seat-reservation-hei
|
|
|
252
249
|
`;
|
|
253
250
|
})}`;
|
|
254
251
|
}
|
|
255
|
-
|
|
256
|
-
return e
|
|
257
|
-
let i = e.icon ?? "", a = e.rotation || 0, o = this._notFixedRotatableAreaIcons.indexOf(e.icon) === -1, s = this.alignVertical && o ? a - 90 : a;
|
|
258
|
-
return this.notAreaElements.findIndex((e) => e === i) > -1 ? this._getRenderElementWithoutArea(e, a, t) : this._getRenderElementWithArea(e, s, t, n, r);
|
|
259
|
-
}) : null;
|
|
260
|
-
}
|
|
261
|
-
_getRenderElementWithArea(e, t, n, r, i) {
|
|
262
|
-
let o = e.icon?.indexOf("TABLE") === -1, c = e.icon && o ? e.icon : null, f = this.isElementDirectlyOnBorder(e, n) && c !== "ENTRY_EXIT", p = e.icon ? d(e.icon, this._language.current) : s, m = this.getCalculatedDimension(e.dimension, n, !0, f), h = this.getCalculatedPosition(e.position, e.dimension, n, !0), g = `popover-trigger-${i}-${r}-${h.x}-${h.y}`, _ = "free";
|
|
263
|
-
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), a`
|
|
264
|
-
<sbb-seat-reservation-area
|
|
265
|
-
id="${g}"
|
|
266
|
-
class="${u({ "sbb-seat-reservation-area--cursor-pointer": c !== null })}"
|
|
252
|
+
_getRenderedCoachElements(e, t) {
|
|
253
|
+
return this.seatReservationStructure.decks[e].deckCoaches[t].otherElements.map((e) => a` <sbb-seat-reservation-graphic
|
|
267
254
|
style=${l({
|
|
268
|
-
"--sbb-seat-reservation-
|
|
269
|
-
"--sbb-seat-reservation-
|
|
270
|
-
"--sbb-seat-reservation-
|
|
271
|
-
"--sbb-seat-reservation-
|
|
255
|
+
"--sbb-seat-reservation-graphic-width": e.dimension.w,
|
|
256
|
+
"--sbb-seat-reservation-graphic-height": e.dimension.h,
|
|
257
|
+
"--sbb-seat-reservation-graphic-top": e.position.y,
|
|
258
|
+
"--sbb-seat-reservation-graphic-left": e.position.x,
|
|
259
|
+
"--sbb-seat-reservation-graphic-position": "absolute",
|
|
260
|
+
"--sbb-seat-reservation-graphic-rotation": e.rotation
|
|
272
261
|
})}
|
|
273
|
-
|
|
274
|
-
background="dark"
|
|
262
|
+
name=${e.icon ?? s}
|
|
275
263
|
aria-hidden="true"
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
<sbb-seat-reservation-graphic
|
|
279
|
-
style=${l({
|
|
280
|
-
"--sbb-seat-reservation-graphic-max-width": this.globalAreaIconDim.w,
|
|
281
|
-
"--sbb-seat-reservation-graphic-max-height": this.globalAreaIconDim.h,
|
|
282
|
-
"--sbb-seat-reservation-graphic-width": m.w,
|
|
283
|
-
"--sbb-seat-reservation-graphic-height": m.h,
|
|
284
|
-
"--sbb-seat-reservation-graphic-rotation": t,
|
|
285
|
-
"--sbb-seat-reservation-graphic-padding-percent": c === "ENTRY_EXIT" ? 1 : this.globalAreaIconPadding
|
|
286
|
-
})}
|
|
287
|
-
name=${c}
|
|
288
|
-
role="img"
|
|
289
|
-
aria-hidden="true"
|
|
290
|
-
class="sbb-sr-graphic__dimension--square-dim"
|
|
291
|
-
></sbb-seat-reservation-graphic>
|
|
292
|
-
` : s}
|
|
293
|
-
</sbb-seat-reservation-area>
|
|
294
|
-
${c ? this._popover(g, p) : s}
|
|
295
|
-
`;
|
|
264
|
+
?stretch=${!0}
|
|
265
|
+
></sbb-seat-reservation-graphic>`);
|
|
296
266
|
}
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
267
|
+
_getRenderedAreaElements(e, t) {
|
|
268
|
+
return this.seatReservationStructure.decks[e].deckCoaches[t].areaElements.map((n) => {
|
|
269
|
+
let r = `popover-trigger-${e}-${t}-${n.position.x}-${n.position.y}`, i = n.icon?.indexOf("TABLE") === -1, o = n.icon && i ? n.icon : null, c = n.icon ? d(n.icon, this._language.current) : s;
|
|
270
|
+
return a`
|
|
271
|
+
<sbb-seat-reservation-area
|
|
272
|
+
id="${r}"
|
|
273
|
+
class="${u({ "sbb-seat-reservation-area--cursor-pointer": o !== null })}"
|
|
274
|
+
style=${l({
|
|
275
|
+
"--sbb-seat-reservation-area-width": n.dimension.w,
|
|
276
|
+
"--sbb-seat-reservation-area-height": n.dimension.h,
|
|
277
|
+
"--sbb-seat-reservation-area-top": n.position.y,
|
|
278
|
+
"--sbb-seat-reservation-area-left": n.position.x,
|
|
279
|
+
"--sbb-seat-reservation-area-z-index": n.position.z
|
|
280
|
+
})}
|
|
281
|
+
mounting=${n.mounting ?? s}
|
|
282
|
+
background="dark"
|
|
283
|
+
aria-hidden="true"
|
|
284
|
+
>
|
|
285
|
+
${o ? a`
|
|
286
|
+
<sbb-seat-reservation-graphic
|
|
287
|
+
style=${l({
|
|
288
|
+
"--sbb-seat-reservation-graphic-max-width": this.globalAreaIconDim.w,
|
|
289
|
+
"--sbb-seat-reservation-graphic-max-height": this.globalAreaIconDim.h,
|
|
290
|
+
"--sbb-seat-reservation-graphic-width": n.dimension.w,
|
|
291
|
+
"--sbb-seat-reservation-graphic-height": n.dimension.h,
|
|
292
|
+
"--sbb-seat-reservation-graphic-rotation": n.rotation,
|
|
293
|
+
"--sbb-seat-reservation-graphic-padding-percent": o === "ENTRY_EXIT" ? 1 : this.globalAreaIconPadding
|
|
294
|
+
})}
|
|
295
|
+
name=${o}
|
|
296
|
+
role="img"
|
|
297
|
+
aria-hidden="true"
|
|
298
|
+
class="sbb-sr-graphic__dimension--square-dim"
|
|
299
|
+
></sbb-seat-reservation-graphic>
|
|
300
|
+
` : s}
|
|
301
|
+
</sbb-seat-reservation-area>
|
|
302
|
+
${o ? this._popover(r, c) : s}
|
|
303
|
+
`;
|
|
304
|
+
});
|
|
312
305
|
}
|
|
313
|
-
_getRenderedServiceElements(e, t
|
|
314
|
-
return
|
|
315
|
-
let r = n.
|
|
306
|
+
_getRenderedServiceElements(e, t) {
|
|
307
|
+
return this.seatReservationStructure.decks[e].deckCoaches[t].serviceElements.map((n) => {
|
|
308
|
+
let r = `popover-trigger-${e}-${t}-${n.position.x}-${n.position.y}`, i = n.icon ? d(n.icon, this._language.current) : null;
|
|
316
309
|
return a`
|
|
317
310
|
<sbb-seat-reservation-graphic
|
|
318
|
-
id="${
|
|
311
|
+
id="${r}"
|
|
319
312
|
style=${l({
|
|
320
|
-
"--sbb-seat-reservation-graphic-width":
|
|
321
|
-
"--sbb-seat-reservation-graphic-height":
|
|
322
|
-
"--sbb-seat-reservation-graphic-top":
|
|
323
|
-
"--sbb-seat-reservation-graphic-left":
|
|
313
|
+
"--sbb-seat-reservation-graphic-width": n.dimension.w,
|
|
314
|
+
"--sbb-seat-reservation-graphic-height": n.dimension.h,
|
|
315
|
+
"--sbb-seat-reservation-graphic-top": n.position.y,
|
|
316
|
+
"--sbb-seat-reservation-graphic-left": n.position.x,
|
|
324
317
|
"--sbb-seat-reservation-graphic-position": "absolute",
|
|
325
|
-
"--sbb-seat-reservation-graphic-rotation":
|
|
318
|
+
"--sbb-seat-reservation-graphic-rotation": n.rotation
|
|
326
319
|
})}
|
|
327
320
|
class="sbb-seat-reservation-graphic--cursor-pointer"
|
|
328
321
|
name=${n.icon ?? s}
|
|
329
322
|
role="img"
|
|
330
323
|
aria-hidden="true"
|
|
331
324
|
></sbb-seat-reservation-graphic>
|
|
332
|
-
${this._popover(
|
|
325
|
+
${this._popover(r, i)}
|
|
333
326
|
`;
|
|
334
|
-
})
|
|
327
|
+
});
|
|
335
328
|
}
|
|
336
329
|
_onSelectPlace(e) {
|
|
337
330
|
let t = e.detail;
|
|
@@ -369,7 +362,7 @@ var y = ":host{--sbb-seat-reservation-grid-size: 16px;--sbb-seat-reservation-hei
|
|
|
369
362
|
return e?.map((e) => {
|
|
370
363
|
let n = e.icon;
|
|
371
364
|
if (!n) return null;
|
|
372
|
-
let r = t.indexOf(n) > -1, i = d(e.icon, this._language.current), a = this.
|
|
365
|
+
let r = t.indexOf(n) > -1, i = d(e.icon, this._language.current), a = this.notFixedRotatableAreaIcons.indexOf(n) === -1 && this.notAreaElements.indexOf(n) === -1;
|
|
373
366
|
return r || t.push(e.icon), i && !r && a ? i : null;
|
|
374
367
|
}).filter((e) => !!e).join(", ");
|
|
375
368
|
}
|
package/seat-reservation.js
CHANGED
|
@@ -2,14 +2,14 @@ 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-
|
|
7
|
-
import { t as l } from "./seat-reservation-navigation-coach.component-
|
|
5
|
+
import { t as s } from "./seat-reservation-area.component-B_T7k-dq.js";
|
|
6
|
+
import { t as c } from "./seat-reservation-graphic.component-BNtFgIVM.js";
|
|
7
|
+
import { t as l } from "./seat-reservation-navigation-coach.component-BF2dTeIb.js";
|
|
8
8
|
import { t as u } from "./seat-reservation-navigation-services.component-BSeCIGnn.js";
|
|
9
9
|
import { t as d } from "./seat-reservation-place-control.component-DOEKL6FP.js";
|
|
10
10
|
import { t as f } from "./seat-reservation-scoped.component-CdB7HYzl.js";
|
|
11
11
|
import { SeatReservationBaseElement as p } from "./seat-reservation/seat-reservation/seat-reservation-base-element.js";
|
|
12
|
-
import { t as m } from "./seat-reservation.component-
|
|
12
|
+
import { t as m } from "./seat-reservation.component-CNtc2Xcr.js";
|
|
13
13
|
import "./seat-reservation.pure.js";
|
|
14
14
|
m.define(), s.define(), c.define(), l.define(), u.define(), d.define(), f.define();
|
|
15
15
|
//#endregion
|
package/seat-reservation.pure.js
CHANGED
|
@@ -3,12 +3,12 @@ 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-
|
|
8
|
-
import { t as l } from "./seat-reservation-navigation-coach.component-
|
|
6
|
+
import { t as s } from "./seat-reservation-area.component-B_T7k-dq.js";
|
|
7
|
+
import { t as c } from "./seat-reservation-graphic.component-BNtFgIVM.js";
|
|
8
|
+
import { t as l } from "./seat-reservation-navigation-coach.component-BF2dTeIb.js";
|
|
9
9
|
import { t as u } from "./seat-reservation-navigation-services.component-BSeCIGnn.js";
|
|
10
10
|
import { t as d } from "./seat-reservation-place-control.component-DOEKL6FP.js";
|
|
11
11
|
import { t as f } from "./seat-reservation-scoped.component-CdB7HYzl.js";
|
|
12
12
|
import { SeatReservationBaseElement as p } from "./seat-reservation/seat-reservation/seat-reservation-base-element.js";
|
|
13
|
-
import { t as m } from "./seat-reservation.component-
|
|
13
|
+
import { t as m } from "./seat-reservation.component-CNtc2Xcr.js";
|
|
14
14
|
export { s as SbbSeatReservationAreaElement, m as SbbSeatReservationElement, c as SbbSeatReservationGraphicElement, l as SbbSeatReservationNavigationCoachElement, u as SbbSeatReservationNavigationServicesElement, d as SbbSeatReservationPlaceControlElement, f as SbbSeatReservationScopedElement, p as SeatReservationBaseElement, o as getI18nSeatReservation, r as mapCoachInfosToCoachSelection, i as mapIconToSvg, t as mapPlaceAndCoachToSeatReservationPlaceSelection, n as mapPlaceInfosToPlaceSelection, e as mapRawDataToSeatReservation, a as svgs };
|
|
@@ -1,94 +0,0 @@
|
|
|
1
|
-
import { __esDecorate, __runInitializers } from "tslib";
|
|
2
|
-
import { SbbElement, boxSizingStyles, forceType } from "@sbb-esta/lyne-elements/core.js";
|
|
3
|
-
import { html, unsafeCSS } from "lit";
|
|
4
|
-
import { property } from "lit/decorators.js";
|
|
5
|
-
//#region src/elements-experimental/seat-reservation/seat-reservation-area/seat-reservation-area.scss?inline
|
|
6
|
-
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}";
|
|
7
|
-
//#endregion
|
|
8
|
-
//#region src/elements-experimental/seat-reservation/seat-reservation-area/seat-reservation-area.component.ts
|
|
9
|
-
/**
|
|
10
|
-
* Visualize an area with a special meaning within a wagon.
|
|
11
|
-
*/
|
|
12
|
-
var SbbSeatReservationAreaElement = (() => {
|
|
13
|
-
let _classSuper = SbbElement;
|
|
14
|
-
let _mounting_decorators;
|
|
15
|
-
let _mounting_initializers = [];
|
|
16
|
-
let _mounting_extraInitializers = [];
|
|
17
|
-
let _background_decorators;
|
|
18
|
-
let _background_initializers = [];
|
|
19
|
-
let _background_extraInitializers = [];
|
|
20
|
-
return class SbbSeatReservationAreaElement extends _classSuper {
|
|
21
|
-
static {
|
|
22
|
-
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
23
|
-
_mounting_decorators = [forceType(), property({ reflect: true })];
|
|
24
|
-
_background_decorators = [forceType(), property({ reflect: true })];
|
|
25
|
-
__esDecorate(this, null, _mounting_decorators, {
|
|
26
|
-
kind: "accessor",
|
|
27
|
-
name: "mounting",
|
|
28
|
-
static: false,
|
|
29
|
-
private: false,
|
|
30
|
-
access: {
|
|
31
|
-
has: (obj) => "mounting" in obj,
|
|
32
|
-
get: (obj) => obj.mounting,
|
|
33
|
-
set: (obj, value) => {
|
|
34
|
-
obj.mounting = value;
|
|
35
|
-
}
|
|
36
|
-
},
|
|
37
|
-
metadata: _metadata
|
|
38
|
-
}, _mounting_initializers, _mounting_extraInitializers);
|
|
39
|
-
__esDecorate(this, null, _background_decorators, {
|
|
40
|
-
kind: "accessor",
|
|
41
|
-
name: "background",
|
|
42
|
-
static: false,
|
|
43
|
-
private: false,
|
|
44
|
-
access: {
|
|
45
|
-
has: (obj) => "background" in obj,
|
|
46
|
-
get: (obj) => obj.background,
|
|
47
|
-
set: (obj, value) => {
|
|
48
|
-
obj.background = value;
|
|
49
|
-
}
|
|
50
|
-
},
|
|
51
|
-
metadata: _metadata
|
|
52
|
-
}, _background_initializers, _background_extraInitializers);
|
|
53
|
-
if (_metadata) Object.defineProperty(this, Symbol.metadata, {
|
|
54
|
-
enumerable: true,
|
|
55
|
-
configurable: true,
|
|
56
|
-
writable: true,
|
|
57
|
-
value: _metadata
|
|
58
|
-
});
|
|
59
|
-
}
|
|
60
|
-
static {
|
|
61
|
-
this.elementName = "sbb-seat-reservation-area";
|
|
62
|
-
}
|
|
63
|
-
static {
|
|
64
|
-
this.styles = [boxSizingStyles, unsafeCSS(seat_reservation_area_default)];
|
|
65
|
-
}
|
|
66
|
-
#mounting_accessor_storage = __runInitializers(this, _mounting_initializers, "free");
|
|
67
|
-
/** Mounting Prop */
|
|
68
|
-
get mounting() {
|
|
69
|
-
return this.#mounting_accessor_storage;
|
|
70
|
-
}
|
|
71
|
-
set mounting(value) {
|
|
72
|
-
this.#mounting_accessor_storage = value;
|
|
73
|
-
}
|
|
74
|
-
#background_accessor_storage = (__runInitializers(this, _mounting_extraInitializers), __runInitializers(this, _background_initializers, "light"));
|
|
75
|
-
/** the background of the area */
|
|
76
|
-
get background() {
|
|
77
|
-
return this.#background_accessor_storage;
|
|
78
|
-
}
|
|
79
|
-
set background(value) {
|
|
80
|
-
this.#background_accessor_storage = value;
|
|
81
|
-
}
|
|
82
|
-
render() {
|
|
83
|
-
return html`<slot></slot>`;
|
|
84
|
-
}
|
|
85
|
-
constructor() {
|
|
86
|
-
super(...arguments);
|
|
87
|
-
__runInitializers(this, _background_extraInitializers);
|
|
88
|
-
}
|
|
89
|
-
};
|
|
90
|
-
})();
|
|
91
|
-
//#endregion
|
|
92
|
-
export { SbbSeatReservationAreaElement as t };
|
|
93
|
-
|
|
94
|
-
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2VhdC1yZXNlcnZhdGlvbi1hcmVhLmNvbXBvbmVudC1CUUV0SmhrMC5qcyIsIm5hbWVzIjpbXSwic291cmNlcyI6WyIuLi8uLi8uLi9zcmMvZWxlbWVudHMtZXhwZXJpbWVudGFsL3NlYXQtcmVzZXJ2YXRpb24vc2VhdC1yZXNlcnZhdGlvbi1hcmVhL3NlYXQtcmVzZXJ2YXRpb24tYXJlYS5zY3NzP2lubGluZSIsIi4uLy4uLy4uL3NyYy9lbGVtZW50cy1leHBlcmltZW50YWwvc2VhdC1yZXNlcnZhdGlvbi9zZWF0LXJlc2VydmF0aW9uLWFyZWEvc2VhdC1yZXNlcnZhdGlvbi1hcmVhLmNvbXBvbmVudC50cyJdLCJzb3VyY2VzQ29udGVudCI6WyJAdXNlICdAc2JiLWVzdGEvbHluZS1lbGVtZW50cy9jb3JlL3N0eWxlcycgYXMgc2JiO1xuXG46aG9zdCB7XG4gIC0tc2JiLXNlYXQtcmVzZXJ2YXRpb24tYXJlYS1ib3JkZXItcmFkaXVzOiB2YXIoLS1zYmItYm9yZGVyLXdpZHRoLTR4KTtcbiAgLS1zYmItc2VhdC1yZXNlcn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ztBQVpNLFFBQUEsY0FBc0I7OztBQUMvQixRQUFBLFNBQXlCLENBQUMsaUJBQWlCLFVBQVUsOEJBQU0sQ0FBQzs7RUFLbkYsNkJBQUEsa0JBQUEsTUFBQSx3QkFDRSxPQUFNOztFQURSLElBQWdCLFdBQVE7QUFBQSxVQUFBLE1BQUE7O0VBQXhCLElBQWdCLFNBQVEsT0FBQTtBQUFBLFNBQUEsNEJBQUE7O0VBTXhCLGdDQUFBLGtCQUFBLE1BQUEsNEJBQUEsRUFBQSxrQkFBQSxNQUFBLDBCQUErQyxRQUFPOztFQUF0RCxJQUFnQixhQUFVO0FBQUEsVUFBQSxNQUFBOztFQUExQixJQUFnQixXQUFVLE9BQUE7QUFBQSxTQUFBLDhCQUFBOztFQUVQLFNBQU07QUFDdkIsVUFBTyxJQUFJIn0=
|
|
@@ -1,129 +0,0 @@
|
|
|
1
|
-
import { __esDecorate, __runInitializers } from "tslib";
|
|
2
|
-
import { SbbElement, SbbLanguageController, boxSizingStyles, forceType } from "@sbb-esta/lyne-elements/core.js";
|
|
3
|
-
import { SbbIconElement } from "@sbb-esta/lyne-elements/icon.pure.js";
|
|
4
|
-
import { html, isServer, unsafeCSS } from "lit";
|
|
5
|
-
import { property } from "lit/decorators.js";
|
|
6
|
-
import { classMap } from "lit/directives/class-map.js";
|
|
7
|
-
import { mapIconToSvg } from "./seat-reservation/common/mapper.js";
|
|
8
|
-
import { getI18nSeatReservation } from "./seat-reservation/common/translations.js";
|
|
9
|
-
//#region src/elements-experimental/seat-reservation/seat-reservation-graphic/seat-reservation-graphic.scss?inline
|
|
10
|
-
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}";
|
|
11
|
-
//#endregion
|
|
12
|
-
//#region src/elements-experimental/seat-reservation/seat-reservation-graphic/seat-reservation-graphic.component.ts
|
|
13
|
-
/**
|
|
14
|
-
* Output one of the SVG graphics based on its code.
|
|
15
|
-
*/
|
|
16
|
-
var SbbSeatReservationGraphicElement = (() => {
|
|
17
|
-
let _classSuper = SbbElement;
|
|
18
|
-
let _name_decorators;
|
|
19
|
-
let _name_initializers = [];
|
|
20
|
-
let _name_extraInitializers = [];
|
|
21
|
-
let _stretch_decorators;
|
|
22
|
-
let _stretch_initializers = [];
|
|
23
|
-
let _stretch_extraInitializers = [];
|
|
24
|
-
return class SbbSeatReservationGraphicElement extends _classSuper {
|
|
25
|
-
constructor() {
|
|
26
|
-
super(...arguments);
|
|
27
|
-
this.#name_accessor_storage = __runInitializers(this, _name_initializers, "");
|
|
28
|
-
this.#stretch_accessor_storage = (__runInitializers(this, _name_extraInitializers), __runInitializers(this, _stretch_initializers, false));
|
|
29
|
-
this._language = (__runInitializers(this, _stretch_extraInitializers), new SbbLanguageController(this));
|
|
30
|
-
}
|
|
31
|
-
static {
|
|
32
|
-
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
33
|
-
_name_decorators = [forceType(), property({ attribute: "name" })];
|
|
34
|
-
_stretch_decorators = [forceType(), property({
|
|
35
|
-
attribute: "stretch",
|
|
36
|
-
type: Boolean
|
|
37
|
-
})];
|
|
38
|
-
__esDecorate(this, null, _name_decorators, {
|
|
39
|
-
kind: "accessor",
|
|
40
|
-
name: "name",
|
|
41
|
-
static: false,
|
|
42
|
-
private: false,
|
|
43
|
-
access: {
|
|
44
|
-
has: (obj) => "name" in obj,
|
|
45
|
-
get: (obj) => obj.name,
|
|
46
|
-
set: (obj, value) => {
|
|
47
|
-
obj.name = value;
|
|
48
|
-
}
|
|
49
|
-
},
|
|
50
|
-
metadata: _metadata
|
|
51
|
-
}, _name_initializers, _name_extraInitializers);
|
|
52
|
-
__esDecorate(this, null, _stretch_decorators, {
|
|
53
|
-
kind: "accessor",
|
|
54
|
-
name: "stretch",
|
|
55
|
-
static: false,
|
|
56
|
-
private: false,
|
|
57
|
-
access: {
|
|
58
|
-
has: (obj) => "stretch" in obj,
|
|
59
|
-
get: (obj) => obj.stretch,
|
|
60
|
-
set: (obj, value) => {
|
|
61
|
-
obj.stretch = value;
|
|
62
|
-
}
|
|
63
|
-
},
|
|
64
|
-
metadata: _metadata
|
|
65
|
-
}, _stretch_initializers, _stretch_extraInitializers);
|
|
66
|
-
if (_metadata) Object.defineProperty(this, Symbol.metadata, {
|
|
67
|
-
enumerable: true,
|
|
68
|
-
configurable: true,
|
|
69
|
-
writable: true,
|
|
70
|
-
value: _metadata
|
|
71
|
-
});
|
|
72
|
-
}
|
|
73
|
-
static {
|
|
74
|
-
this.elementName = "sbb-seat-reservation-graphic";
|
|
75
|
-
}
|
|
76
|
-
static {
|
|
77
|
-
this.elementDependencies = [SbbIconElement];
|
|
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,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2VhdC1yZXNlcnZhdGlvbi1ncmFwaGljLmNvbXBvbmVudC1YcHF4TDVucS5qcyIsIm5hbWVzIjpbXSwic291cmNlcyI6WyIuLi8uLi8uLi9zcmMvZWxlbWVudHMtZXhwZXJpbWVudGFsL3NlYXQtcmVzZXJ2YXRpb24vc2VhdC1yZXNlcnZhdGlvbi1ncmFwaGljL3NlYXQtcmVzZXJ2YXRpb24tZ3JhcGhpYy5zY3NzP2lubGluZSIsIi4uLy4uLy4uL3NyYy9lbGVtZW50cy1leHBlcmltZW50YWwvc2VhdC1yZXNlcnZhdG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