@sbb-esta/lyne-elements-experimental 3.1.0 → 3.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (70) hide show
  1. package/custom-elements.json +1147 -590
  2. package/development/seat-reservation/common/mapper/icon-mapper.d.ts.map +1 -1
  3. package/development/seat-reservation/common/mapper/icon-mapper.js +4 -5
  4. package/development/seat-reservation/common/mapper/mapper.d.ts +6 -5
  5. package/development/seat-reservation/common/mapper/mapper.d.ts.map +1 -1
  6. package/development/seat-reservation/common/mapper/mapper.js +14 -11
  7. package/development/seat-reservation/common/mapper/seat-reservation-sample-data.d.ts +113 -0
  8. package/development/seat-reservation/common/mapper/seat-reservation-sample-data.d.ts.map +1 -1
  9. package/development/seat-reservation/common/mapper/seat-reservation-sample-data.js +25999 -649
  10. package/development/seat-reservation/common/svgs.d.ts +0 -1
  11. package/development/seat-reservation/common/svgs.d.ts.map +1 -1
  12. package/development/seat-reservation/common/svgs.js +1 -3
  13. package/development/seat-reservation/common/translations/i18n.d.ts.map +1 -1
  14. package/development/seat-reservation/common/translations/i18n.js +225 -194
  15. package/development/seat-reservation/common/types.d.ts +20 -3
  16. package/development/seat-reservation/common/types.d.ts.map +1 -1
  17. package/development/seat-reservation/seat-reservation/seat-reservation-base-element.d.ts +50 -18
  18. package/development/seat-reservation/seat-reservation/seat-reservation-base-element.d.ts.map +1 -1
  19. package/development/seat-reservation/seat-reservation/seat-reservation-base-element.js +352 -172
  20. package/development/seat-reservation/seat-reservation/seat-reservation.component.d.ts +29 -13
  21. package/development/seat-reservation/seat-reservation/seat-reservation.component.d.ts.map +1 -1
  22. package/development/seat-reservation/seat-reservation/seat-reservation.component.js +603 -308
  23. package/development/seat-reservation/seat-reservation-area/seat-reservation-area.component.js +17 -10
  24. package/development/seat-reservation/seat-reservation-graphic/seat-reservation-assets.d.ts.map +1 -1
  25. package/development/seat-reservation/seat-reservation-graphic/seat-reservation-assets.js +1 -6
  26. package/development/seat-reservation/seat-reservation-graphic/seat-reservation-graphic.component.js +36 -18
  27. package/development/seat-reservation/seat-reservation-navigation-coach/seat-reservation-navigation-coach.component.d.ts +3 -1
  28. package/development/seat-reservation/seat-reservation-navigation-coach/seat-reservation-navigation-coach.component.d.ts.map +1 -1
  29. package/development/seat-reservation/seat-reservation-navigation-coach/seat-reservation-navigation-coach.component.js +54 -32
  30. package/development/seat-reservation/seat-reservation-place-control/seat-reservation-place-control.component.d.ts +2 -0
  31. package/development/seat-reservation/seat-reservation-place-control/seat-reservation-place-control.component.d.ts.map +1 -1
  32. package/development/seat-reservation/seat-reservation-place-control/seat-reservation-place-control.component.js +107 -58
  33. package/development/seat-reservation/seat-reservation-scoped/seat-reservation-scoped.component.d.ts +1 -16
  34. package/development/seat-reservation/seat-reservation-scoped/seat-reservation-scoped.component.d.ts.map +1 -1
  35. package/development/seat-reservation/seat-reservation-scoped/seat-reservation-scoped.component.js +10 -164
  36. package/package.json +2 -2
  37. package/seat-reservation/common/mapper/icon-mapper.d.ts.map +1 -1
  38. package/seat-reservation/common/mapper/icon-mapper.js +3 -4
  39. package/seat-reservation/common/mapper/mapper.d.ts +6 -5
  40. package/seat-reservation/common/mapper/mapper.d.ts.map +1 -1
  41. package/seat-reservation/common/mapper/mapper.js +35 -32
  42. package/seat-reservation/common/mapper/seat-reservation-sample-data.d.ts +113 -0
  43. package/seat-reservation/common/mapper/seat-reservation-sample-data.d.ts.map +1 -1
  44. package/seat-reservation/common/mapper/seat-reservation-sample-data.js +25997 -648
  45. package/seat-reservation/common/svgs.d.ts +0 -1
  46. package/seat-reservation/common/svgs.d.ts.map +1 -1
  47. package/seat-reservation/common/svgs.js +4 -11
  48. package/seat-reservation/common/translations/i18n.d.ts.map +1 -1
  49. package/seat-reservation/common/translations/i18n.js +228 -197
  50. package/seat-reservation/common/types.d.ts +20 -3
  51. package/seat-reservation/common/types.d.ts.map +1 -1
  52. package/seat-reservation/seat-reservation/seat-reservation-base-element.d.ts +50 -18
  53. package/seat-reservation/seat-reservation/seat-reservation-base-element.d.ts.map +1 -1
  54. package/seat-reservation/seat-reservation/seat-reservation-base-element.js +294 -175
  55. package/seat-reservation/seat-reservation/seat-reservation.component.d.ts +29 -13
  56. package/seat-reservation/seat-reservation/seat-reservation.component.d.ts.map +1 -1
  57. package/seat-reservation/seat-reservation/seat-reservation.component.js +318 -303
  58. package/seat-reservation/seat-reservation-area/seat-reservation-area.component.js +22 -22
  59. package/seat-reservation/seat-reservation-graphic/seat-reservation-assets.d.ts.map +1 -1
  60. package/seat-reservation/seat-reservation-graphic/seat-reservation-assets.js +0 -5
  61. package/seat-reservation/seat-reservation-graphic/seat-reservation-graphic.component.js +37 -37
  62. package/seat-reservation/seat-reservation-navigation-coach/seat-reservation-navigation-coach.component.d.ts +3 -1
  63. package/seat-reservation/seat-reservation-navigation-coach/seat-reservation-navigation-coach.component.d.ts.map +1 -1
  64. package/seat-reservation/seat-reservation-navigation-coach/seat-reservation-navigation-coach.component.js +95 -84
  65. package/seat-reservation/seat-reservation-place-control/seat-reservation-place-control.component.d.ts +2 -0
  66. package/seat-reservation/seat-reservation-place-control/seat-reservation-place-control.component.d.ts.map +1 -1
  67. package/seat-reservation/seat-reservation-place-control/seat-reservation-place-control.component.js +75 -63
  68. package/seat-reservation/seat-reservation-scoped/seat-reservation-scoped.component.d.ts +1 -16
  69. package/seat-reservation/seat-reservation-scoped/seat-reservation-scoped.component.d.ts.map +1 -1
  70. package/seat-reservation/seat-reservation-scoped/seat-reservation-scoped.component.js +14 -101
@@ -1,21 +1,21 @@
1
- var it = (o) => {
2
- throw TypeError(o);
1
+ var dt = (l) => {
2
+ throw TypeError(l);
3
3
  };
4
- var nt = (o, l, i) => l.has(o) || it("Cannot " + i);
5
- var n = (o, l, i) => (nt(o, l, "read from private field"), i ? i.call(o) : l.get(o)), b = (o, l, i) => l.has(o) ? it("Cannot add the same private member more than once") : l instanceof WeakSet ? l.add(o) : l.set(o, i), r = (o, l, i, h) => (nt(o, l, "write to private field"), h ? h.call(o, i) : l.set(o, i), i);
6
- import { __esDecorate as p, __runInitializers as a } from "tslib";
7
- import { SbbButtonBaseElement as vt } from "@sbb-esta/lyne-elements/core/base-elements.js";
8
- import { SbbLanguageController as ut } from "@sbb-esta/lyne-elements/core/controllers.js";
9
- import { forceType as v } from "@sbb-esta/lyne-elements/core/decorators.js";
10
- import { css as _t, nothing as ft, html as gt } from "lit";
11
- import { customElement as kt, property as d } from "lit/decorators.js";
12
- import { getI18nSeatReservation as E } from "../common.js";
4
+ var ht = (l, o, i) => o.has(l) || dt("Cannot " + i);
5
+ var n = (l, o, i) => (ht(l, o, "read from private field"), i ? i.call(l) : o.get(l)), b = (l, o, i) => o.has(l) ? dt("Cannot add the same private member more than once") : o instanceof WeakSet ? o.add(l) : o.set(l, i), a = (l, o, i, v) => (ht(l, o, "write to private field"), v ? v.call(l, i) : o.set(l, i), i);
6
+ import { __esDecorate as p, __runInitializers as r } from "tslib";
7
+ import { SbbButtonBaseElement as gt } from "@sbb-esta/lyne-elements/core/base-elements.js";
8
+ import { SbbLanguageController as kt } from "@sbb-esta/lyne-elements/core/controllers.js";
9
+ import { forceType as h } from "@sbb-esta/lyne-elements/core/decorators.js";
10
+ import { css as xt, nothing as mt, html as yt } from "lit";
11
+ import { customElement as It, property as d } from "lit/decorators.js";
12
+ import { getI18nSeatReservation as C } from "../common.js";
13
13
  import "../seat-reservation-graphic.js";
14
- const xt = _t`*,:before,:after{box-sizing:border-box}:host{--sbb-reservation-place-control-rotation: 0;--sbb-reservation-place-control-text-rotation: 0;--sbb-reservation-place-control-text-size: calc( var(--sbb-place-control-text-scale-value, 1) * .5 );--sbb-reservation-place-control-default-text: var(--sbb-color-black);--sbb-reservation-place-control-hover-text: var(--sbb-color-iron);--sbb-reservation-place-control-focus-text: var(--sbb-color-anthracite);--sbb-reservation-place-control-allocated-text: var(--sbb-color-smoke);--sbb-reservation-place-control-free-background-default: var(--sbb-color-white);--sbb-reservation-place-control-free-background-hover: var(--sbb-color-cloud);--sbb-reservation-place-control-free-background-focus: var(--sbb-color-silver);--sbb-reservation-place-control-free-backrest-background-default: var(--sbb-color-black);--sbb-reservation-place-control-free-backrest-background-hover: var(--sbb-color-black);--sbb-reservation-place-control-free-backrest-background-focus: var(--sbb-color-black);--sbb-reservation-place-control-selected-background-default: var(--sbb-color-red);--sbb-reservation-place-control-selected-background-hover: var(--sbb-color-red125);--sbb-reservation-place-control-selected-background-focus: var(--sbb-color-red150);--sbb-reservation-place-control-selected-backrest-background-default: var(--sbb-color-red150);--sbb-reservation-place-control-selected-backrest-background-hover: #7d000f;--sbb-reservation-place-control-selected-backrest-background-focus: #5a000b;--sbb-reservation-place-control-allocated-background-default: var(--sbb-color-milk);cursor:pointer}:host(:hover) .sbb-sr-place-ctrl--state-free:not(.sbb-reservation-place-control--disabled) ::part(svg-place){fill:var(--sbb-reservation-place-control-free-background-hover)}:host(:hover) .sbb-sr-place-ctrl--state-free:not(.sbb-reservation-place-control--disabled) ::part(svg-backrest){fill:var(--sbb-reservation-place-control-free-backrest-background-hover)}:host(:hover) .sbb-sr-place-ctrl--state-free:not(.sbb-reservation-place-control--disabled) .sbb-sr-place-ctrl__text{background-color:var(--sbb-reservation-place-control-free-background-hover);color:var(--sbb-reservation-place-control-free-text)}:host(:hover) .sbb-sr-place-ctrl--state-selected:not(.sbb-reservation-place-control--disabled) ::part(svg-place){fill:var(--sbb-reservation-place-control-selected-background-hover)}:host(:hover) .sbb-sr-place-ctrl--state-selected:not(.sbb-reservation-place-control--disabled) ::part(svg-backrest){fill:var(--sbb-reservation-place-control-selected-backrest-background-hover)}:host(:hover) .sbb-sr-place-ctrl--state-selected:not(.sbb-reservation-place-control--disabled) .sbb-sr-place-ctrl__text{background-color:var(--sbb-reservation-place-control-selected-background-hover);color:var(--sbb-reservation-place-control-selected-text)}:host(:focus){border-radius:var(--sbb-border-width-1x);outline:var(--sbb-border-width-2x) solid var(--sbb-color-black)}:host(:focus) .sbb-sr-place-ctrl--state-free:not(.sbb-reservation-place-control--disabled) ::part(svg-place){fill:var(--sbb-reservation-place-control-free-background-focus)}:host(:focus) .sbb-sr-place-ctrl--state-free:not(.sbb-reservation-place-control--disabled) ::part(svg-backrest){fill:var(--sbb-reservation-place-control-free-backrest-background-focus)}:host(:focus) .sbb-sr-place-ctrl--state-free:not(.sbb-reservation-place-control--disabled) .sbb-sr-place-ctrl__text{background-color:var(--sbb-reservation-place-control-free-background-focus);color:var(--sbb-reservation-place-control-free-text)}:host(:focus) .sbb-sr-place-ctrl--state-selected:not(.sbb-reservation-place-control--disabled) ::part(svg-place){fill:var(--sbb-reservation-place-control-selected-background-focus)}:host(:focus) .sbb-sr-place-ctrl--state-selected:not(.sbb-reservation-place-control--disabled) ::part(svg-backrest){fill:var(--sbb-reservation-place-control-selected-backrest-background-focus)}:host(:focus) .sbb-sr-place-ctrl--state-selected:not(.sbb-reservation-place-control--disabled) .sbb-sr-place-ctrl__text{background-color:var(--sbb-reservation-place-control-selected-background-focus);color:var(--sbb-reservation-place-control-selected-text)}.sbb-sr-place-ctrl{width:max-content;position:relative;font-size:calc(var(--sbb-reservation-place-control-text-size) * .0625rem)}.sbb-sr-place-ctrl--state-free ::part(svg-place){fill:var(--sbb-reservation-place-control-free-background-default)}.sbb-sr-place-ctrl--state-free ::part(svg-backrest){fill:var(--sbb-reservation-place-control-free-backrest-background-default)}.sbb-sr-place-ctrl--state-free .sbb-sr-place-ctrl__text{background-color:var(--sbb-reservation-place-control-free-background-default);color:var(--sbb-reservation-place-control-free-text)}.sbb-sr-place-ctrl--state-selected ::part(svg-place){fill:var(--sbb-reservation-place-control-selected-background-default)}.sbb-sr-place-ctrl--state-selected ::part(svg-backrest){fill:var(--sbb-reservation-place-control-selected-backrest-background-default)}.sbb-sr-place-ctrl--state-selected .sbb-sr-place-ctrl__text{background-color:var(--sbb-reservation-place-control-selected-background-default);color:var(--sbb-reservation-place-control-selected-text)}.sbb-sr-place-ctrl--state-allocated,.sbb-sr-place-ctrl--state-restricted{cursor:not-allowed}.sbb-sr-place-ctrl--state-allocated ::part(svg-place),.sbb-sr-place-ctrl--state-restricted ::part(svg-place){fill:var(--sbb-reservation-place-control-allocated-background-default)}.sbb-sr-place-ctrl--state-allocated ::part(svg-backrest),.sbb-sr-place-ctrl--state-restricted ::part(svg-backrest){fill:var(--sbb-reservation-place-control-allocated-backrest-background-default)}.sbb-sr-place-ctrl--state-allocated .sbb-sr-place-ctrl__text,.sbb-sr-place-ctrl--state-restricted .sbb-sr-place-ctrl__text{background-color:var(--sbb-reservation-place-control-allocated-background-default);color:var(--sbb-reservation-place-control-allocated-text)}.sbb-sr-place-ctrl__text{overflow:hidden;display:none;position:absolute;inset-block-start:50%;translate:-50% -50%;rotate:calc(var(--sbb-reservation-place-control-text-rotation) * 1deg);font-family:var(--sbb-typo-font-family);font-size:.75em;line-height:initial}.sbb-sr-place-ctrl--state-free .sbb-sr-place-ctrl__text,.sbb-sr-place-ctrl--state-allocated .sbb-sr-place-ctrl__text,.sbb-sr-place-ctrl--state-restricted.sbb-sr-place-ctrl--type-bicycle .sbb-sr-place-ctrl__text{display:block}.sbb-sr-place-ctrl--type-bicycle .sbb-sr-place-ctrl__text{inset-block-start:65%;inset-inline-start:50%;transform-origin:center 16%;font-size:.6875em}.sbb-sr-place-ctrl--orientation-0.sbb-sr-place-ctrl--type-seat .sbb-sr-place-ctrl__text{inset-inline-start:45%}.sbb-sr-place-ctrl--orientation-90.sbb-sr-place-ctrl--type-seat .sbb-sr-place-ctrl__text{inset-block-start:46%;inset-inline-start:50%}.sbb-sr-place-ctrl--orientation-180.sbb-sr-place-ctrl--type-seat .sbb-sr-place-ctrl__text{inset-inline-start:55%}.sbb-sr-place-ctrl--orientation-270.sbb-sr-place-ctrl--type-seat .sbb-sr-place-ctrl__text{inset-block-start:52%;inset-inline-start:52%}`;
15
- let $t = (() => {
16
- var u, _, f, g, k, x, y, m, I, z, w, c;
17
- let o = [kt("sbb-seat-reservation-place-control")], l, i = [], h, C = vt, R, S = [], T = [], $, P = [], L = [], D, A = [], N = [], O, F = [], j = [], B, U = [], K = [], M, Y = [], q = [], G, H = [], J = [], Q, V = [], W = [], X, Z = [], tt = [], et, st = [], rt = [], at, ct = [], ot = [];
18
- return c = class extends C {
14
+ const zt = xt`*,:before,:after{box-sizing:border-box}:host{--sbb-seat-reservation-place-control-width: 16;--sbb-seat-reservation-place-control-height: 16;--sbb-seat-reservation-place-control-top: 0;--sbb-seat-reservation-place-control-left: 0;--sbb-seat-reservation-place-control-rotation: 0;--sbb-seat-reservation-place-control-text-rotation: 0;--sbb-seat-reservation-place-control-text-size: calc( var(--sbb-place-control-text-scale-value, 1) * .5 );--sbb-seat-reservation-place-control-default-text: var(--sbb-color-black);--sbb-seat-reservation-place-control-hover-text: var(--sbb-color-iron);--sbb-seat-reservation-place-control-focus-text: var(--sbb-color-anthracite);--sbb-seat-reservation-place-control-allocated-text: var(--sbb-color-smoke);--sbb-seat-reservation-place-control-free-background-default: var(--sbb-color-white);--sbb-seat-reservation-place-control-free-background-hover: var(--sbb-color-cloud);--sbb-seat-reservation-place-control-free-background-focus: var(--sbb-color-silver);--sbb-seat-reservation-place-control-free-backrest-background-default: var(--sbb-color-black);--sbb-seat-reservation-place-control-free-backrest-background-hover: var(--sbb-color-black);--sbb-seat-reservation-place-control-free-backrest-background-focus: var(--sbb-color-black);--sbb-seat-reservation-place-control-selected-background-default: var(--sbb-color-red);--sbb-seat-reservation-place-control-selected-background-hover: var(--sbb-color-red125);--sbb-seat-reservation-place-control-selected-background-focus: var(--sbb-color-red150);--sbb-seat-reservation-place-control-selected-backrest-background-default: var( --sbb-color-red150 );--sbb-seat-reservation-place-control-selected-backrest-background-hover: #7d000f;--sbb-seat-reservation-place-control-selected-backrest-background-focus: #5a000b;--sbb-seat-reservation-place-control-allocated-background-default: var(--sbb-color-milk);width:calc(var(--sbb-seat-reservation-place-control-width) * var(--sbb-seat-reservation-one-px-rem, .0625rem));height:calc(var(--sbb-seat-reservation-place-control-height) * var(--sbb-seat-reservation-one-px-rem, .0625rem));position:absolute;inset-block-start:calc(var(--sbb-seat-reservation-place-control-top) * var(--sbb-seat-reservation-one-px-rem, .0625rem));inset-inline-start:calc(var(--sbb-seat-reservation-place-control-left) * var(--sbb-seat-reservation-one-px-rem, .0625rem));cursor:pointer}:host(:hover) .sbb-sr-place-ctrl--state-free:not(.sbb-reservation-place-control--disabled) ::part(svg-place){fill:var(--sbb-seat-reservation-place-control-free-background-hover)}:host(:hover) .sbb-sr-place-ctrl--state-free:not(.sbb-reservation-place-control--disabled) ::part(svg-backrest){fill:var(--sbb-seat-reservation-place-control-free-backrest-background-hover)}:host(:hover) .sbb-sr-place-ctrl--state-free:not(.sbb-reservation-place-control--disabled) .sbb-sr-place-ctrl__text{background-color:var(--sbb-seat-reservation-place-control-free-background-hover);color:var(--sbb-seat-reservation-place-control-free-text)}:host(:hover) .sbb-sr-place-ctrl--state-selected:not(.sbb-reservation-place-control--disabled) ::part(svg-place){fill:var(--sbb-seat-reservation-place-control-selected-background-hover)}:host(:hover) .sbb-sr-place-ctrl--state-selected:not(.sbb-reservation-place-control--disabled) ::part(svg-backrest){fill:var(--sbb-seat-reservation-place-control-selected-backrest-background-hover)}:host(:hover) .sbb-sr-place-ctrl--state-selected:not(.sbb-reservation-place-control--disabled) .sbb-sr-place-ctrl__text{background-color:var(--sbb-seat-reservation-place-control-selected-background-hover);color:var(--sbb-seat-reservation-place-control-selected-text)}:host(:focus){border-radius:var(--sbb-border-width-1x);outline:calc(2 * var(--sbb-seat-reservation-one-px-rem, .0625rem)) solid var(--sbb-color-black)}:host(:focus) .sbb-sr-place-ctrl--state-free:not(.sbb-reservation-place-control--disabled) ::part(svg-place){fill:var(--sbb-seat-reservation-place-control-free-background-focus)}:host(:focus) .sbb-sr-place-ctrl--state-free:not(.sbb-reservation-place-control--disabled) ::part(svg-backrest){fill:var(--sbb-seat-reservation-place-control-free-backrest-background-focus)}:host(:focus) .sbb-sr-place-ctrl--state-free:not(.sbb-reservation-place-control--disabled) .sbb-sr-place-ctrl__text{background-color:var(--sbb-seat-reservation-place-control-free-background-focus);color:var(--sbb-seat-reservation-place-control-free-text)}:host(:focus) .sbb-sr-place-ctrl--state-selected:not(.sbb-reservation-place-control--disabled) ::part(svg-place){fill:var(--sbb-seat-reservation-place-control-selected-background-focus)}:host(:focus) .sbb-sr-place-ctrl--state-selected:not(.sbb-reservation-place-control--disabled) ::part(svg-backrest){fill:var(--sbb-seat-reservation-place-control-selected-backrest-background-focus)}:host(:focus) .sbb-sr-place-ctrl--state-selected:not(.sbb-reservation-place-control--disabled) .sbb-sr-place-ctrl__text{background-color:var(--sbb-seat-reservation-place-control-selected-background-focus);color:var(--sbb-seat-reservation-place-control-selected-text)}: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(svg-place){rotate:180deg}.sbb-sr-place-ctrl{width:max-content;position:relative;font-size:calc(var(--sbb-seat-reservation-place-control-text-size) * var(--sbb-seat-reservation-one-px-rem, .0625rem))}.sbb-sr-place-ctrl--state-free ::part(svg-place){fill:var(--sbb-seat-reservation-place-control-free-background-default)}.sbb-sr-place-ctrl--state-free ::part(svg-backrest){fill:var(--sbb-seat-reservation-place-control-free-backrest-background-default)}.sbb-sr-place-ctrl--state-free .sbb-sr-place-ctrl__text{background-color:var(--sbb-seat-reservation-place-control-free-background-default);color:var(--sbb-seat-reservation-place-control-free-text)}.sbb-sr-place-ctrl--state-selected ::part(svg-place){fill:var(--sbb-seat-reservation-place-control-selected-background-default)}.sbb-sr-place-ctrl--state-selected ::part(svg-backrest){fill:var(--sbb-seat-reservation-place-control-selected-backrest-background-default)}.sbb-sr-place-ctrl--state-selected .sbb-sr-place-ctrl__text{background-color:var(--sbb-seat-reservation-place-control-selected-background-default);color:var(--sbb-seat-reservation-place-control-selected-text)}.sbb-sr-place-ctrl--state-allocated,.sbb-sr-place-ctrl--state-restricted{cursor:not-allowed}.sbb-sr-place-ctrl--state-allocated ::part(svg-place),.sbb-sr-place-ctrl--state-restricted ::part(svg-place){fill:var(--sbb-seat-reservation-place-control-allocated-background-default)}.sbb-sr-place-ctrl--state-allocated ::part(svg-backrest),.sbb-sr-place-ctrl--state-restricted ::part(svg-backrest){fill:var(--sbb-seat-reservation-place-control-allocated-backrest-background-default)}.sbb-sr-place-ctrl--state-allocated .sbb-sr-place-ctrl__text,.sbb-sr-place-ctrl--state-restricted .sbb-sr-place-ctrl__text{background-color:var(--sbb-seat-reservation-place-control-allocated-background-default);color:var(--sbb-seat-reservation-place-control-allocated-text)}.sbb-sr-place-ctrl__text{overflow:hidden;display:none;position:absolute;inset-block-start:50%;translate:-50% -50%;rotate:calc(var(--sbb-seat-reservation-place-control-text-rotation) * 1deg);font-family:var(--sbb-typo-font-family);font-size:.75em;line-height:initial}.sbb-sr-place-ctrl--state-free .sbb-sr-place-ctrl__text,.sbb-sr-place-ctrl--state-allocated .sbb-sr-place-ctrl__text,.sbb-sr-place-ctrl--state-restricted.sbb-sr-place-ctrl--type-bicycle .sbb-sr-place-ctrl__text{display:block}.sbb-sr-place-ctrl--type-bicycle .sbb-sr-place-ctrl__text{inset-block-start:65%;inset-inline-start:50%;transform-origin:center 16%;font-size:.6875em}.sbb-sr-place-ctrl--orientation-0.sbb-sr-place-ctrl--type-seat .sbb-sr-place-ctrl__text{inset-inline-start:45%}.sbb-sr-place-ctrl--orientation-90.sbb-sr-place-ctrl--type-seat .sbb-sr-place-ctrl__text{inset-block-start:46%;inset-inline-start:50%}.sbb-sr-place-ctrl--orientation-180.sbb-sr-place-ctrl--type-seat .sbb-sr-place-ctrl__text{inset-inline-start:55%}.sbb-sr-place-ctrl--orientation-270.sbb-sr-place-ctrl--type-seat .sbb-sr-place-ctrl__text{inset-block-start:52%;inset-inline-start:52%}:host(:dir(rtl)) .sbb-sr-place-ctrl--orientation-0 .sbb-sr-place-ctrl__text{inset-inline-start:3%}:host(:dir(rtl)) .sbb-sr-place-ctrl--orientation-90 .sbb-sr-place-ctrl__text,:host(:dir(rtl)) .sbb-sr-place-ctrl--orientation-180 .sbb-sr-place-ctrl__text{inset-inline-start:10%}:host(:dir(rtl)) .sbb-sr-place-ctrl--orientation-270 .sbb-sr-place-ctrl__text{inset-inline-start:5%}:host(:dir(rtl)) .sbb-sr-place-ctrl--type-bicycle .sbb-sr-place-ctrl__text{inset-inline-start:-10%}`;
15
+ let Nt = (() => {
16
+ var u, _, f, g, k, x, m, y, I, z, w, E, c;
17
+ let l = [It("sbb-seat-reservation-place-control")], o, i = [], v, R = gt, T, S = [], $ = [], P, L = [], D = [], N, A = [], O = [], F, j = [], B = [], U, K = [], M = [], Y, q = [], G = [], H, J = [], Q = [], V, W = [], X = [], Z, tt = [], et = [], st, at = [], rt = [], ct, lt = [], ot = [], it, nt = [], bt = [];
18
+ return c = class extends R {
19
19
  constructor() {
20
20
  super();
21
21
  b(this, u);
@@ -24,110 +24,118 @@ let $t = (() => {
24
24
  b(this, g);
25
25
  b(this, k);
26
26
  b(this, x);
27
- b(this, y);
28
27
  b(this, m);
28
+ b(this, y);
29
29
  b(this, I);
30
30
  b(this, z);
31
31
  b(this, w);
32
- r(this, u, a(this, S, "SEAT")), r(this, _, (a(this, T), a(this, P, "FREE"))), r(this, f, (a(this, L), a(this, A, []))), r(this, g, (a(this, N), a(this, F, 0))), r(this, k, (a(this, j), a(this, U, 32))), r(this, x, (a(this, K), a(this, Y, 32))), r(this, y, (a(this, q), a(this, H, ""))), r(this, m, (a(this, J), a(this, V, 0))), r(this, I, (a(this, W), a(this, Z, null))), r(this, z, (a(this, tt), a(this, st, !1))), r(this, w, (a(this, rt), a(this, ct, "unfocus"))), this._language = (a(this, ot), new ut(this)), this.addEventListener("click", () => this._selectPlace());
32
+ b(this, E);
33
+ a(this, u, r(this, S, "SEAT")), a(this, _, (r(this, $), r(this, L, "FREE"))), a(this, f, (r(this, D), r(this, A, []))), a(this, g, (r(this, O), r(this, j, 0))), a(this, k, (r(this, B), r(this, K, 32))), a(this, x, (r(this, M), r(this, q, 32))), a(this, m, (r(this, G), r(this, J, ""))), a(this, y, (r(this, Q), r(this, W, 0))), a(this, I, (r(this, X), r(this, tt, null))), a(this, z, (r(this, et), r(this, at, null))), a(this, w, (r(this, rt), r(this, lt, !1))), a(this, E, (r(this, ot), r(this, nt, "unfocus"))), this._language = (r(this, bt), new kt(this)), this.addEventListener("click", () => this._selectPlace());
33
34
  }
34
35
  /** placeType of the place, e.g. 'SEAT', 'BICYCLE' */
35
36
  get placeType() {
36
37
  return n(this, u);
37
38
  }
38
39
  set placeType(e) {
39
- r(this, u, e);
40
+ a(this, u, e);
40
41
  }
41
42
  /** state of the place, e.g. 'FREE', 'SELECTED', 'BLOCKED' */
42
43
  get state() {
43
44
  return n(this, _);
44
45
  }
45
46
  set state(e) {
46
- r(this, _, e);
47
+ a(this, _, e);
47
48
  }
48
49
  /** property ids of the place, to display more info about the place */
49
50
  get propertyIds() {
50
51
  return n(this, f);
51
52
  }
52
53
  set propertyIds(e) {
53
- r(this, f, e);
54
+ a(this, f, e);
54
55
  }
55
56
  /** rotation in degrees (without unit) */
56
57
  get rotation() {
57
58
  return n(this, g);
58
59
  }
59
60
  set rotation(e) {
60
- r(this, g, e);
61
+ a(this, g, e);
61
62
  }
62
63
  /** width of the place in pixels (without unit) */
63
64
  get width() {
64
65
  return n(this, k);
65
66
  }
66
67
  set width(e) {
67
- r(this, k, e);
68
+ a(this, k, e);
68
69
  }
69
70
  /** height of the place in pixels (without unit) */
70
71
  get height() {
71
72
  return n(this, x);
72
73
  }
73
74
  set height(e) {
74
- r(this, x, e);
75
+ a(this, x, e);
75
76
  }
76
77
  /** label of the place, e.g. '1A', '2B' */
77
78
  get text() {
78
- return n(this, y);
79
+ return n(this, m);
79
80
  }
80
81
  set text(e) {
81
- r(this, y, e);
82
+ a(this, m, e);
82
83
  }
83
84
  /** Rotation of the text in degrees (without unit) */
84
85
  get textRotation() {
85
- return n(this, m);
86
+ return n(this, y);
86
87
  }
87
88
  set textRotation(e) {
88
- r(this, m, e);
89
+ a(this, y, e);
90
+ }
91
+ /** Deck Index Prop to identifier the right place to deck */
92
+ get deckIndex() {
93
+ return n(this, I);
94
+ }
95
+ set deckIndex(e) {
96
+ a(this, I, e);
89
97
  }
90
98
  /** Coach Index Prop to identifier the right place to coach */
91
99
  get coachIndex() {
92
- return n(this, I);
100
+ return n(this, z);
93
101
  }
94
102
  set coachIndex(e) {
95
- r(this, I, e);
103
+ a(this, z, e);
96
104
  }
97
105
  /** Prevent click prop prevent any place action */
98
106
  get preventClick() {
99
- return n(this, z);
107
+ return n(this, w);
100
108
  }
101
109
  set preventClick(e) {
102
- r(this, z, e);
110
+ a(this, w, e);
103
111
  }
104
112
  /** Set the place focus outline style */
105
113
  get keyfocus() {
106
- return n(this, w);
114
+ return n(this, E);
107
115
  }
108
116
  set keyfocus(e) {
109
- r(this, w, e);
117
+ a(this, E, e);
110
118
  }
111
119
  willUpdate(e) {
112
- super.willUpdate(e), (e.has("width") || e.has("height")) && this.style?.setProperty("--sbb-place-control-text-scale-value", `${Math.min(this.width, this.height)}`), e.has("textRotation") && this.style?.setProperty("--sbb-reservation-place-control-text-rotation", `${this.textRotation}`), e.has("rotation") && this.style?.setProperty("--sbb-reservation-place-control-rotation", `${this.rotation}`), e.has("keyfocus") && this.keyfocus === "focus" && this.focus();
120
+ super.willUpdate(e), (e.has("width") || e.has("height")) && this.style?.setProperty("--sbb-place-control-text-scale-value", `${Math.min(this.width, this.height)}`), e.has("textRotation") && this.style?.setProperty("--sbb-seat-reservation-place-control-text-rotation", `${this.textRotation}`), e.has("rotation") && this.style?.setProperty("--sbb-seat-reservation-place-control-rotation", `${this.rotation}`), e.has("keyfocus") && this.keyfocus === "focus" && this.focus();
113
121
  }
114
122
  render() {
115
- const e = this._getPlaceSvg(this.placeType, this.state), t = this.type.toLowerCase(), s = this.state.toLowerCase(), lt = this.text, bt = this.width, pt = this.height, dt = this.textRotation - this.rotation, ht = this.preventClick ? "sbb-reservation-place-control--disabled" : null;
116
- return this.title = this._getTitleDescriptionPlace(), this.tabIndex = -1, gt`
123
+ const e = this._getPlaceSvg(this.placeType, this.state), t = this.type.toLowerCase(), s = this.state.toLowerCase(), pt = this.text, vt = this.width, ut = this.height, _t = this.textRotation - this.rotation, ft = this.preventClick ? "sbb-reservation-place-control--disabled" : null;
124
+ return this.title = this._getTitleDescriptionPlace(), this.tabIndex = -1, yt`
117
125
  <div
118
126
  part="sbb-sr-place-part"
119
- class="sbb-sr-place-ctrl sbb-sr-place-ctrl--orientation-${this.rotation} sbb-sr-place-ctrl--state-${s} sbb-sr-place-ctrl--type-${t} ${ht}"
127
+ class="sbb-sr-place-ctrl sbb-sr-place-ctrl--orientation-${this.rotation} sbb-sr-place-ctrl--state-${s} sbb-sr-place-ctrl--type-${t} ${ft}"
120
128
  >
121
129
  <sbb-seat-reservation-graphic
122
130
  .name=${e}
123
- .width=${bt}
124
- .height=${pt}
131
+ .width=${vt}
132
+ .height=${ut}
125
133
  .rotation=${this.rotation}
126
- .inverseRotation=${dt}
134
+ .inverseRotation=${_t}
127
135
  aria-hidden="true"
128
136
  ></sbb-seat-reservation-graphic>
129
- <span ${this.text ?? ft} class="sbb-sr-place-ctrl__text" aria-hidden="true"
130
- >${lt}</span
137
+ <span ${this.text ?? mt} class="sbb-sr-place-ctrl__text" aria-hidden="true"
138
+ >${pt}</span
131
139
  >
132
140
  </div>
133
141
  `;
@@ -137,8 +145,8 @@ let $t = (() => {
137
145
  }
138
146
  _getTitleDescriptionPlace() {
139
147
  const e = "PLACE_CONTROL_" + this.type + "_" + this.state;
140
- let t = E(e, this._language.current, [this.text]);
141
- return this.propertyIds.length && (t += ". " + E("PLACE_PROPERTY", this._language.current).concat(": "), t += this.propertyIds.map((s) => E(s, this._language.current)).join(", ")), t;
148
+ let t = C(e, this._language.current, [this.text]);
149
+ return this.propertyIds.length && (t += ". " + C("PLACE_PROPERTY", this._language.current).concat(": "), t += this.propertyIds.map((s) => C(s, this._language.current)).join(", ")), t;
142
150
  }
143
151
  /** If the place selectable, we emit the placeSelection object which contains infos to the place state */
144
152
  _selectPlace() {
@@ -146,9 +154,11 @@ let $t = (() => {
146
154
  this.state = this.state === "FREE" ? "SELECTED" : "FREE";
147
155
  const t = {
148
156
  id: this.id,
157
+ deckIndex: this.deckIndex,
149
158
  coachIndex: this.coachIndex,
150
159
  number: this.text,
151
- state: this.state
160
+ state: this.state,
161
+ placeType: this.placeType
152
162
  };
153
163
  this.dispatchEvent(new CustomEvent("selectplace", {
154
164
  detail: t,
@@ -157,35 +167,37 @@ let $t = (() => {
157
167
  }));
158
168
  }
159
169
  }
160
- }, u = new WeakMap(), _ = new WeakMap(), f = new WeakMap(), g = new WeakMap(), k = new WeakMap(), x = new WeakMap(), y = new WeakMap(), m = new WeakMap(), I = new WeakMap(), z = new WeakMap(), w = new WeakMap(), h = c, (() => {
161
- const e = typeof Symbol == "function" && Symbol.metadata ? Object.create(C[Symbol.metadata] ?? null) : void 0;
162
- R = [v(), d({ attribute: "type" })], $ = [v(), d({ attribute: "state" })], D = [d({ attribute: "propertyIds", type: Array })], O = [v(), d({ attribute: "rotation", type: Number })], B = [v(), d({ attribute: "width", type: Number })], M = [v(), d({ attribute: "height", type: Number })], G = [v(), d({ attribute: "text" })], Q = [v(), d({ attribute: "text-rotation" })], X = [v(), d({ attribute: "coach-index", type: Number })], et = [v(), d({ attribute: "prevent-click", type: Boolean })], at = [v(), d({ attribute: "keyfocus" })], p(c, null, R, { kind: "accessor", name: "placeType", static: !1, private: !1, access: { has: (t) => "placeType" in t, get: (t) => t.placeType, set: (t, s) => {
170
+ }, u = new WeakMap(), _ = new WeakMap(), f = new WeakMap(), g = new WeakMap(), k = new WeakMap(), x = new WeakMap(), m = new WeakMap(), y = new WeakMap(), I = new WeakMap(), z = new WeakMap(), w = new WeakMap(), E = new WeakMap(), v = c, (() => {
171
+ const e = typeof Symbol == "function" && Symbol.metadata ? Object.create(R[Symbol.metadata] ?? null) : void 0;
172
+ T = [h(), d({ attribute: "type" })], P = [h(), d({ attribute: "state" })], N = [d({ attribute: "propertyIds", type: Array })], F = [h(), d({ attribute: "rotation", type: Number })], U = [h(), d({ attribute: "width", type: Number })], Y = [h(), d({ attribute: "height", type: Number })], H = [h(), d({ attribute: "text" })], V = [h(), d({ attribute: "text-rotation" })], Z = [h(), d({ attribute: "deck-index", type: Number })], st = [h(), d({ attribute: "coach-index", type: Number })], ct = [h(), d({ attribute: "prevent-click", type: Boolean })], it = [h(), d({ attribute: "keyfocus" })], p(c, null, T, { kind: "accessor", name: "placeType", static: !1, private: !1, access: { has: (t) => "placeType" in t, get: (t) => t.placeType, set: (t, s) => {
163
173
  t.placeType = s;
164
- } }, metadata: e }, S, T), p(c, null, $, { kind: "accessor", name: "state", static: !1, private: !1, access: { has: (t) => "state" in t, get: (t) => t.state, set: (t, s) => {
174
+ } }, metadata: e }, S, $), p(c, null, P, { kind: "accessor", name: "state", static: !1, private: !1, access: { has: (t) => "state" in t, get: (t) => t.state, set: (t, s) => {
165
175
  t.state = s;
166
- } }, metadata: e }, P, L), p(c, null, D, { kind: "accessor", name: "propertyIds", static: !1, private: !1, access: { has: (t) => "propertyIds" in t, get: (t) => t.propertyIds, set: (t, s) => {
176
+ } }, metadata: e }, L, D), p(c, null, N, { kind: "accessor", name: "propertyIds", static: !1, private: !1, access: { has: (t) => "propertyIds" in t, get: (t) => t.propertyIds, set: (t, s) => {
167
177
  t.propertyIds = s;
168
- } }, metadata: e }, A, N), p(c, null, O, { kind: "accessor", name: "rotation", static: !1, private: !1, access: { has: (t) => "rotation" in t, get: (t) => t.rotation, set: (t, s) => {
178
+ } }, metadata: e }, A, O), p(c, null, F, { kind: "accessor", name: "rotation", static: !1, private: !1, access: { has: (t) => "rotation" in t, get: (t) => t.rotation, set: (t, s) => {
169
179
  t.rotation = s;
170
- } }, metadata: e }, F, j), p(c, null, B, { kind: "accessor", name: "width", static: !1, private: !1, access: { has: (t) => "width" in t, get: (t) => t.width, set: (t, s) => {
180
+ } }, metadata: e }, j, B), p(c, null, U, { kind: "accessor", name: "width", static: !1, private: !1, access: { has: (t) => "width" in t, get: (t) => t.width, set: (t, s) => {
171
181
  t.width = s;
172
- } }, metadata: e }, U, K), p(c, null, M, { kind: "accessor", name: "height", static: !1, private: !1, access: { has: (t) => "height" in t, get: (t) => t.height, set: (t, s) => {
182
+ } }, metadata: e }, K, M), p(c, null, Y, { kind: "accessor", name: "height", static: !1, private: !1, access: { has: (t) => "height" in t, get: (t) => t.height, set: (t, s) => {
173
183
  t.height = s;
174
- } }, metadata: e }, Y, q), p(c, null, G, { kind: "accessor", name: "text", static: !1, private: !1, access: { has: (t) => "text" in t, get: (t) => t.text, set: (t, s) => {
184
+ } }, metadata: e }, q, G), p(c, null, H, { kind: "accessor", name: "text", static: !1, private: !1, access: { has: (t) => "text" in t, get: (t) => t.text, set: (t, s) => {
175
185
  t.text = s;
176
- } }, metadata: e }, H, J), p(c, null, Q, { kind: "accessor", name: "textRotation", static: !1, private: !1, access: { has: (t) => "textRotation" in t, get: (t) => t.textRotation, set: (t, s) => {
186
+ } }, metadata: e }, J, Q), p(c, null, V, { kind: "accessor", name: "textRotation", static: !1, private: !1, access: { has: (t) => "textRotation" in t, get: (t) => t.textRotation, set: (t, s) => {
177
187
  t.textRotation = s;
178
- } }, metadata: e }, V, W), p(c, null, X, { kind: "accessor", name: "coachIndex", static: !1, private: !1, access: { has: (t) => "coachIndex" in t, get: (t) => t.coachIndex, set: (t, s) => {
188
+ } }, metadata: e }, W, X), p(c, null, Z, { kind: "accessor", name: "deckIndex", static: !1, private: !1, access: { has: (t) => "deckIndex" in t, get: (t) => t.deckIndex, set: (t, s) => {
189
+ t.deckIndex = s;
190
+ } }, metadata: e }, tt, et), p(c, null, st, { kind: "accessor", name: "coachIndex", static: !1, private: !1, access: { has: (t) => "coachIndex" in t, get: (t) => t.coachIndex, set: (t, s) => {
179
191
  t.coachIndex = s;
180
- } }, metadata: e }, Z, tt), p(c, null, et, { kind: "accessor", name: "preventClick", static: !1, private: !1, access: { has: (t) => "preventClick" in t, get: (t) => t.preventClick, set: (t, s) => {
192
+ } }, metadata: e }, at, rt), p(c, null, ct, { kind: "accessor", name: "preventClick", static: !1, private: !1, access: { has: (t) => "preventClick" in t, get: (t) => t.preventClick, set: (t, s) => {
181
193
  t.preventClick = s;
182
- } }, metadata: e }, st, rt), p(c, null, at, { kind: "accessor", name: "keyfocus", static: !1, private: !1, access: { has: (t) => "keyfocus" in t, get: (t) => t.keyfocus, set: (t, s) => {
194
+ } }, metadata: e }, lt, ot), p(c, null, it, { kind: "accessor", name: "keyfocus", static: !1, private: !1, access: { has: (t) => "keyfocus" in t, get: (t) => t.keyfocus, set: (t, s) => {
183
195
  t.keyfocus = s;
184
- } }, metadata: e }, ct, ot), p(null, l = { value: h }, o, { kind: "class", name: h.name, metadata: e }, null, i), h = l.value, e && Object.defineProperty(h, Symbol.metadata, { enumerable: !0, configurable: !0, writable: !0, value: e });
185
- })(), c.styles = xt, c.events = {
196
+ } }, metadata: e }, nt, bt), p(null, o = { value: v }, l, { kind: "class", name: v.name, metadata: e }, null, i), v = o.value, e && Object.defineProperty(v, Symbol.metadata, { enumerable: !0, configurable: !0, writable: !0, value: e });
197
+ })(), c.styles = zt, c.events = {
186
198
  selectplace: "selectplace"
187
- }, a(h, i), h;
199
+ }, r(v, i), v;
188
200
  })();
189
201
  export {
190
- $t as SbbSeatReservationPlaceControlElement
202
+ Nt as SbbSeatReservationPlaceControlElement
191
203
  };
@@ -1,24 +1,9 @@
1
- import { CSSResultGroup, PropertyValues, TemplateResult, LitElement } from 'lit';
1
+ import { CSSResultGroup, TemplateResult, LitElement } from 'lit';
2
2
  /**
3
3
  * Wrapper class for scoped elements with similar properties to set.
4
4
  */
5
5
  export declare class SbbSeatReservationScopedElement extends LitElement {
6
6
  static styles: CSSResultGroup;
7
- /** Inset block start in pixels (without unit) */
8
- accessor insetBlockStart: string;
9
- /** Inset inline start in pixels (without unit) */
10
- accessor insetInlineStart: string;
11
- /** Width of the scoped element in pixels (without unit) */
12
- accessor width: string;
13
- /** Height of the scoped element in pixels (without unit) */
14
- accessor height: string;
15
- /** Z-index of the scoped element */
16
- accessor zIndex: string;
17
- /** Cell id of the scoped element, if it is used in a table */
18
- accessor cellId: string;
19
- /** Scoped classes for the scoped element */
20
- accessor scopedClasses: string;
21
- protected willUpdate(_changedProperties: PropertyValues): void;
22
7
  protected render(): TemplateResult;
23
8
  }
24
9
  declare global {
@@ -1 +1 @@
1
- {"version":3,"file":"seat-reservation-scoped.component.d.ts","sourceRoot":"","sources":["../../../../src/elements-experimental/seat-reservation/seat-reservation-scoped/seat-reservation-scoped.component.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,cAAc,EAAE,KAAK,cAAc,EAAE,KAAK,cAAc,EAAE,MAAM,KAAK,CAAC;AACpF,OAAO,EAAQ,UAAU,EAAE,MAAM,KAAK,CAAC;AAKvC;;GAEG;AACH,qBAEM,+BAAgC,SAAQ,UAAU;IACtD,OAAuB,MAAM,EAAE,cAAc,CAAS;IAEtD,iDAAiD;IACjD,SAEgB,eAAe,EAAE,MAAM,CAAM;IAE7C,kDAAkD;IAClD,SAEgB,gBAAgB,EAAE,MAAM,CAAM;IAE9C,2DAA2D;IAC3D,SAEgB,KAAK,EAAE,MAAM,CAAM;IAEnC,4DAA4D;IAC5D,SAEgB,MAAM,EAAE,MAAM,CAAM;IAEpC,oCAAoC;IACpC,SAEgB,MAAM,EAAE,MAAM,CAAM;IAEpC,8DAA8D;IAC9D,SAEgB,MAAM,EAAE,MAAM,CAAM;IAEpC,4CAA4C;IAC5C,SAEgB,aAAa,EAAE,MAAM,CAAM;cAExB,UAAU,CAAC,kBAAkB,EAAE,cAAc,GAAG,IAAI;cA8BpD,MAAM,IAAI,cAAc;CAW5C;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAE7B,6BAA6B,EAAE,+BAA+B,CAAC;KAChE;CACF"}
1
+ {"version":3,"file":"seat-reservation-scoped.component.d.ts","sourceRoot":"","sources":["../../../../src/elements-experimental/seat-reservation/seat-reservation-scoped/seat-reservation-scoped.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,cAAc,EAAE,KAAK,cAAc,EAAE,MAAM,KAAK,CAAC;AAC/D,OAAO,EAAQ,UAAU,EAAE,MAAM,KAAK,CAAC;AAKvC;;GAEG;AACH,qBAEM,+BAAgC,SAAQ,UAAU;IACtD,OAAuB,MAAM,EAAE,cAAc,CAAS;cAEnC,MAAM,IAAI,cAAc;CAG5C;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAE7B,6BAA6B,EAAE,+BAA+B,CAAC;KAChE;CACF"}
@@ -1,106 +1,19 @@
1
- var J = (s) => {
2
- throw TypeError(s);
3
- };
4
- var K = (s, i, l) => i.has(s) || J("Cannot " + l);
5
- var o = (s, i, l) => (K(s, i, "read from private field"), l ? l.call(s) : i.get(s)), h = (s, i, l) => i.has(s) ? J("Cannot add the same private member more than once") : i instanceof WeakSet ? i.add(s) : i.set(s, l), d = (s, i, l, c) => (K(s, i, "write to private field"), c ? c.call(s, l) : i.set(s, l), l);
6
- import { __esDecorate as _, __runInitializers as a } from "tslib";
7
- import { forceType as p } from "@sbb-esta/lyne-elements/core/decorators.js";
8
- import { css as N, LitElement as Q, html as M } from "lit";
9
- import { customElement as V, property as b } from "lit/decorators.js";
10
- const W = N`*,:before,:after{box-sizing:border-box}:host{display:block}:host .coach-border,:host .coach-wrapper,:host .graphical-element{width:var(--sbb-seat-reservation-scoped-width);height:var(--sbb-seat-reservation-scoped-height);inset-block-start:var(--sbb-seat-reservation-scoped-inset-block-start);inset-inline-start:var(--sbb-seat-reservation-scoped-inset-inline-start);z-index:var(--sbb-seat-reservation-scoped-z-index)}:host .coach-border,:host .graphical-element ::slotted(*),:host .graphical-element{position:absolute}:host .coach-border{z-index:0}`;
11
- let it = (() => {
12
- var I, u, m, g, z, f, S, r;
13
- let s = [V("sbb-seat-reservation-scoped")], i, l = [], c, v = Q, x, k = [], y = [], w, B = [], C = [], $, E = [], D = [], j, O = [], T = [], U, L = [], P = [], R, q = [], A = [], F, G = [], H = [];
14
- return r = class extends v {
15
- constructor() {
16
- super(...arguments);
17
- h(this, I, a(this, k, ""));
18
- h(this, u, (a(this, y), a(this, B, "")));
19
- h(this, m, (a(this, C), a(this, E, "")));
20
- h(this, g, (a(this, D), a(this, O, "")));
21
- h(this, z, (a(this, T), a(this, L, "")));
22
- h(this, f, (a(this, P), a(this, q, "")));
23
- h(this, S, (a(this, A), a(this, G, "")));
24
- a(this, H);
25
- }
26
- /** Inset block start in pixels (without unit) */
27
- get insetBlockStart() {
28
- return o(this, I);
29
- }
30
- set insetBlockStart(e) {
31
- d(this, I, e);
32
- }
33
- /** Inset inline start in pixels (without unit) */
34
- get insetInlineStart() {
35
- return o(this, u);
36
- }
37
- set insetInlineStart(e) {
38
- d(this, u, e);
39
- }
40
- /** Width of the scoped element in pixels (without unit) */
41
- get width() {
42
- return o(this, m);
43
- }
44
- set width(e) {
45
- d(this, m, e);
46
- }
47
- /** Height of the scoped element in pixels (without unit) */
48
- get height() {
49
- return o(this, g);
50
- }
51
- set height(e) {
52
- d(this, g, e);
53
- }
54
- /** Z-index of the scoped element */
55
- get zIndex() {
56
- return o(this, z);
57
- }
58
- set zIndex(e) {
59
- d(this, z, e);
60
- }
61
- /** Cell id of the scoped element, if it is used in a table */
62
- get cellId() {
63
- return o(this, f);
64
- }
65
- set cellId(e) {
66
- d(this, f, e);
67
- }
68
- /** Scoped classes for the scoped element */
69
- get scopedClasses() {
70
- return o(this, S);
71
- }
72
- set scopedClasses(e) {
73
- d(this, S, e);
74
- }
75
- willUpdate(e) {
76
- super.willUpdate(e), e.has("width") && this.style?.setProperty("--sbb-seat-reservation-scoped-width", `${this.width}`), e.has("height") && this.style?.setProperty("--sbb-seat-reservation-scoped-height", `${this.height}`), e.has("insetBlockStart") && this.style?.setProperty("--sbb-seat-reservation-scoped-inset-block-start", `${this.insetBlockStart}`), e.has("insetInlineStart") && this.style?.setProperty("--sbb-seat-reservation-scoped-inset-inline-start", `${this.insetInlineStart}`), e.has("zIndex") && this.style?.setProperty("--sbb-seat-reservation-scoped-z-index", `${this.zIndex}`);
77
- }
1
+ import { __esDecorate as i, __runInitializers as c } from "tslib";
2
+ import { css as n, LitElement as b, html as m } from "lit";
3
+ import { customElement as d } from "lit/decorators.js";
4
+ const p = n`*,:before,:after{box-sizing:border-box}:host{--sbb-seat-reservation-scoped-width: 0;--sbb-seat-reservation-scoped-height: 0;display:block}:host .scoped-element{width:calc(var(--sbb-seat-reservation-scoped-width) * var(--sbb-seat-reservation-one-px-rem, .0625rem));height:calc(var(--sbb-seat-reservation-scoped-height) * var(--sbb-seat-reservation-one-px-rem, .0625rem))}`;
5
+ let f = (() => {
6
+ var t;
7
+ let l = [d("sbb-seat-reservation-scoped")], a, r = [], e, o = b;
8
+ return t = class extends o {
78
9
  render() {
79
- return this.cellId ? M`<td id="${this.cellId}" class="${this.scopedClasses}">
80
- <slot></slot>
81
- </td>` : M`<div class="${this.scopedClasses}">
82
- <slot></slot>
83
- </div>`;
10
+ return m`<div class="scoped-element"><slot></slot></div>`;
84
11
  }
85
- }, I = new WeakMap(), u = new WeakMap(), m = new WeakMap(), g = new WeakMap(), z = new WeakMap(), f = new WeakMap(), S = new WeakMap(), c = r, (() => {
86
- const e = typeof Symbol == "function" && Symbol.metadata ? Object.create(v[Symbol.metadata] ?? null) : void 0;
87
- x = [p(), b({ attribute: "inset-block-start" })], w = [p(), b({ attribute: "inset-inline-start" })], $ = [p(), b({ attribute: "width" })], j = [p(), b({ attribute: "height" })], U = [p(), b({ attribute: "z-index" })], R = [p(), b({ attribute: "cell-id" })], F = [p(), b({ attribute: "scoped-classes" })], _(r, null, x, { kind: "accessor", name: "insetBlockStart", static: !1, private: !1, access: { has: (t) => "insetBlockStart" in t, get: (t) => t.insetBlockStart, set: (t, n) => {
88
- t.insetBlockStart = n;
89
- } }, metadata: e }, k, y), _(r, null, w, { kind: "accessor", name: "insetInlineStart", static: !1, private: !1, access: { has: (t) => "insetInlineStart" in t, get: (t) => t.insetInlineStart, set: (t, n) => {
90
- t.insetInlineStart = n;
91
- } }, metadata: e }, B, C), _(r, null, $, { kind: "accessor", name: "width", static: !1, private: !1, access: { has: (t) => "width" in t, get: (t) => t.width, set: (t, n) => {
92
- t.width = n;
93
- } }, metadata: e }, E, D), _(r, null, j, { kind: "accessor", name: "height", static: !1, private: !1, access: { has: (t) => "height" in t, get: (t) => t.height, set: (t, n) => {
94
- t.height = n;
95
- } }, metadata: e }, O, T), _(r, null, U, { kind: "accessor", name: "zIndex", static: !1, private: !1, access: { has: (t) => "zIndex" in t, get: (t) => t.zIndex, set: (t, n) => {
96
- t.zIndex = n;
97
- } }, metadata: e }, L, P), _(r, null, R, { kind: "accessor", name: "cellId", static: !1, private: !1, access: { has: (t) => "cellId" in t, get: (t) => t.cellId, set: (t, n) => {
98
- t.cellId = n;
99
- } }, metadata: e }, q, A), _(r, null, F, { kind: "accessor", name: "scopedClasses", static: !1, private: !1, access: { has: (t) => "scopedClasses" in t, get: (t) => t.scopedClasses, set: (t, n) => {
100
- t.scopedClasses = n;
101
- } }, metadata: e }, G, H), _(null, i = { value: c }, s, { kind: "class", name: c.name, metadata: e }, null, l), c = i.value, e && Object.defineProperty(c, Symbol.metadata, { enumerable: !0, configurable: !0, writable: !0, value: e });
102
- })(), r.styles = W, a(c, l), c;
12
+ }, e = t, (() => {
13
+ const s = typeof Symbol == "function" && Symbol.metadata ? Object.create(o[Symbol.metadata] ?? null) : void 0;
14
+ i(null, a = { value: e }, l, { kind: "class", name: e.name, metadata: s }, null, r), e = a.value, s && Object.defineProperty(e, Symbol.metadata, { enumerable: !0, configurable: !0, writable: !0, value: s });
15
+ })(), t.styles = p, c(e, r), e;
103
16
  })();
104
17
  export {
105
- it as SbbSeatReservationScopedElement
18
+ f as SbbSeatReservationScopedElement
106
19
  };