@sbb-esta/lyne-elements-experimental 4.0.1 → 4.0.3

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 (56) hide show
  1. package/autocomplete-grid/autocomplete-grid/autocomplete-grid.component.d.ts.map +1 -1
  2. package/autocomplete-grid/autocomplete-grid/autocomplete-grid.component.js +15 -16
  3. package/core/datetime/date-helper.js +3 -3
  4. package/custom-elements.json +241 -53
  5. package/development/autocomplete-grid/autocomplete-grid/autocomplete-grid.component.d.ts.map +1 -1
  6. package/development/autocomplete-grid/autocomplete-grid/autocomplete-grid.component.js +17 -19
  7. package/development/core/datetime/date-helper.js +3 -3
  8. package/development/{differenceInMinutes-D5Nj8Stc.js → differenceInMinutes-B0dawX-5.js} +2 -2
  9. package/development/{format-BQfaa1ZT.js → format-BMkeaqaF.js} +3 -3
  10. package/development/{isValid-DvieCZVi.js → isValid-BYRch7pV.js} +2 -2
  11. package/development/journey-summary/journey-summary.component.js +2 -2
  12. package/development/pearl-chain/pearl-chain.component.js +3 -5
  13. package/development/pearl-chain-time/pearl-chain-time.component.js +1 -1
  14. package/development/seat-reservation/common/mapper/mapper.d.ts +2 -2
  15. package/development/seat-reservation/common/mapper/mapper.d.ts.map +1 -1
  16. package/development/seat-reservation/common/mapper/mapper.js +19 -6
  17. package/development/seat-reservation/common/mapper/seat-reservation-sample-data.d.ts +122 -0
  18. package/development/seat-reservation/common/mapper/seat-reservation-sample-data.d.ts.map +1 -1
  19. package/development/seat-reservation/common/mapper/seat-reservation-sample-data.js +970 -1
  20. package/development/seat-reservation/seat-reservation/seat-reservation-base-element.d.ts +11 -5
  21. package/development/seat-reservation/seat-reservation/seat-reservation-base-element.d.ts.map +1 -1
  22. package/development/seat-reservation/seat-reservation/seat-reservation-base-element.js +118 -56
  23. package/development/seat-reservation/seat-reservation/seat-reservation.component.d.ts.map +1 -1
  24. package/development/seat-reservation/seat-reservation/seat-reservation.component.js +170 -282
  25. package/development/seat-reservation/seat-reservation-graphic/seat-reservation-graphic.component.d.ts.map +1 -1
  26. package/development/seat-reservation/seat-reservation-graphic/seat-reservation-graphic.component.js +11 -8
  27. package/development/seat-reservation/seat-reservation-navigation-coach/seat-reservation-navigation-coach.component.d.ts.map +1 -1
  28. package/development/seat-reservation/seat-reservation-navigation-coach/seat-reservation-navigation-coach.component.js +153 -45
  29. package/development/seat-reservation/seat-reservation-place-control/seat-reservation-place-control.component.js +2 -2
  30. package/development/timetable-row/timetable-row.component.js +1 -1
  31. package/development/{toDate-D_Vjps95.js → toDate-BWb6Z1JD.js} +2 -2
  32. package/{differenceInMinutes-CP_C5onR.js → differenceInMinutes-COvvdYsJ.js} +1 -1
  33. package/{format-lqeCzmzS.js → format-CmKROkbc.js} +2 -41
  34. package/{isValid-Ceq2O0NQ.js → isValid-m3_OsPaB.js} +1 -1
  35. package/journey-summary/journey-summary.component.js +2 -2
  36. package/package.json +2 -2
  37. package/pearl-chain/pearl-chain.component.js +3 -3
  38. package/pearl-chain-time/pearl-chain-time.component.js +1 -1
  39. package/seat-reservation/common/mapper/mapper.d.ts +2 -2
  40. package/seat-reservation/common/mapper/mapper.d.ts.map +1 -1
  41. package/seat-reservation/common/mapper/mapper.js +41 -38
  42. package/seat-reservation/common/mapper/seat-reservation-sample-data.d.ts +122 -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 +968 -1
  45. package/seat-reservation/seat-reservation/seat-reservation-base-element.d.ts +11 -5
  46. package/seat-reservation/seat-reservation/seat-reservation-base-element.d.ts.map +1 -1
  47. package/seat-reservation/seat-reservation/seat-reservation-base-element.js +99 -73
  48. package/seat-reservation/seat-reservation/seat-reservation.component.d.ts.map +1 -1
  49. package/seat-reservation/seat-reservation/seat-reservation.component.js +210 -213
  50. package/seat-reservation/seat-reservation-graphic/seat-reservation-graphic.component.d.ts.map +1 -1
  51. package/seat-reservation/seat-reservation-graphic/seat-reservation-graphic.component.js +31 -28
  52. package/seat-reservation/seat-reservation-navigation-coach/seat-reservation-navigation-coach.component.d.ts.map +1 -1
  53. package/seat-reservation/seat-reservation-navigation-coach/seat-reservation-navigation-coach.component.js +143 -142
  54. package/seat-reservation/seat-reservation-place-control/seat-reservation-place-control.component.js +1 -1
  55. package/timetable-row/timetable-row.component.js +1 -1
  56. package/{toDate-BCXKL_wM.js → toDate-Bw2KTWeq.js} +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"autocomplete-grid.component.d.ts","sourceRoot":"","sources":["../../../../src/elements-experimental/autocomplete-grid/autocomplete-grid/autocomplete-grid.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,0BAA0B,EAAE,MAAM,yCAAyC,CAAC;AAUrF,OAAO,EAAE,gCAAgC,EAAE,MAAM,gCAAgC,CAAC;AAUlF;;;;;;;GAOG;AACH,qBAEM,0BAA0B,CAAC,CAAC,GAAG,MAAM,CAAE,SAAQ,0BAA0B,CAAC,CAAC,CAAC;IAChF,gBAAgC,IAAI,gBAAkC;IACtE,SAAS,CAAC,SAAS,SAAuC;IAC1D,SAAS,CAAC,SAAS,SAAU;IAC7B,OAAO,CAAC,kBAAkB,CAAK;IAE/B,SAAS,KAAK,OAAO,IAAI,gCAAgC,CAAC,CAAC,CAAC,EAAE,CAM7D;;IAOD,SAAS,CAAC,YAAY,IAAI,IAAI;IAY9B,SAAS,CAAC,8BAA8B,CAAC,KAAK,EAAE,aAAa,GAAG,IAAI;IA0BpE;;;;;;OAMG;IACH,SAAS,CAAC,gBAAgB,CAAC,KAAK,EAAE,aAAa,GAAG,IAAI;IAgBtD,SAAS,CAAC,mBAAmB,CAAC,KAAK,CAAC,EAAE,aAAa,GAAG,IAAI;IA+B1D,OAAO,CAAC,+BAA+B;IAqCvC,SAAS,CAAC,kBAAkB,IAAI,IAAI;IAapC,SAAS,CAAC,oBAAoB,CAAC,OAAO,EAAE,gBAAgB,GAAG,IAAI;CAGhE;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAE7B,uBAAuB,EAAE,0BAA0B,CAAC;KACrD;CACF"}
1
+ {"version":3,"file":"autocomplete-grid.component.d.ts","sourceRoot":"","sources":["../../../../src/elements-experimental/autocomplete-grid/autocomplete-grid/autocomplete-grid.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,0BAA0B,EAAE,MAAM,yCAAyC,CAAC;AAUrF,OAAO,EAAE,gCAAgC,EAAE,MAAM,gCAAgC,CAAC;AAUlF;;;;;;;GAOG;AACH,qBAEM,0BAA0B,CAAC,CAAC,GAAG,MAAM,CAAE,SAAQ,0BAA0B,CAAC,CAAC,CAAC;IAChF,gBAAgC,IAAI,gBAAkC;IACtE,SAAS,CAAC,SAAS,SAAuC;IAC1D,SAAS,CAAC,SAAS,SAAU;IAC7B,OAAO,CAAC,kBAAkB,CAAK;IAE/B,SAAS,KAAK,OAAO,IAAI,gCAAgC,CAAC,CAAC,CAAC,EAAE,CAM7D;;IAOD,SAAS,CAAC,YAAY,IAAI,IAAI;IAY9B,SAAS,CAAC,8BAA8B,CAAC,KAAK,EAAE,aAAa,GAAG,IAAI;IAsBpE;;;;;;OAMG;IACH,SAAS,CAAC,gBAAgB,CAAC,KAAK,EAAE,aAAa,GAAG,IAAI;IAgBtD,SAAS,CAAC,mBAAmB,CAAC,KAAK,CAAC,EAAE,aAAa,GAAG,IAAI;IA+B1D,OAAO,CAAC,+BAA+B;IAqCvC,SAAS,CAAC,kBAAkB,IAAI,IAAI;IAapC,SAAS,CAAC,oBAAoB,CAAC,OAAO,EAAE,gBAAgB,GAAG,IAAI;CAGhE;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAE7B,uBAAuB,EAAE,0BAA0B,CAAC;KACrD;CACF"}
@@ -1,32 +1,31 @@
1
1
  import { __esDecorate as v, __runInitializers as f } from "tslib";
2
2
  import { SbbAutocompleteBaseElement as g } from "@sbb-esta/lyne-elements/autocomplete.js";
3
- import { getNextElementIndex as b } from "@sbb-esta/lyne-elements/core/a11y.js";
3
+ import { getNextElementIndex as u } from "@sbb-esta/lyne-elements/core/a11y.js";
4
4
  import { isSafari as A } from "@sbb-esta/lyne-elements/core/dom.js";
5
5
  import { ɵstateController as a } from "@sbb-esta/lyne-elements/core/mixins.js";
6
6
  import { setAriaComboBoxAttributes as O } from "@sbb-esta/lyne-elements/core/overlay.js";
7
- import { customElement as x } from "lit/decorators.js";
8
- import { SbbAutocompleteGridOptionElement as d } from "../autocomplete-grid-option.js";
9
- let y = 0;
7
+ import { customElement as y } from "lit/decorators.js";
8
+ import { SbbAutocompleteGridOptionElement as b } from "../autocomplete-grid-option.js";
9
+ let x = 0;
10
10
  const m = A;
11
11
  let N = (() => {
12
12
  var o;
13
- let p = [x("sbb-autocomplete-grid")], n, c = [], i, u = g;
14
- return o = class extends u {
13
+ let p = [y("sbb-autocomplete-grid")], n, c = [], i, d = g;
14
+ return o = class extends d {
15
15
  get options() {
16
16
  return Array.from(this.querySelectorAll?.("sbb-autocomplete-grid-option") ?? []);
17
17
  }
18
18
  constructor() {
19
- super(), this.overlayId = `sbb-autocomplete-grid-${++y}`, this.panelRole = "grid", this._activeColumnIndex = 0, this.addEventListener?.("optionselected", (t) => this.onOptionSelected(t));
19
+ super(), this.overlayId = `sbb-autocomplete-grid-${++x}`, this.panelRole = "grid", this._activeColumnIndex = 0, this.addEventListener?.("optionselected", (t) => this.onOptionSelected(t));
20
20
  }
21
21
  syncNegative() {
22
22
  this.querySelectorAll?.("sbb-divider, sbb-autocomplete-grid-button, sbb-option-hint").forEach((t) => t.negative = this.negative), this.querySelectorAll?.("sbb-autocomplete-grid-row, sbb-autocomplete-grid-option, sbb-autocomplete-grid-optgroup").forEach((t) => a(t).toggle("negative", this.negative));
23
23
  }
24
24
  openedPanelKeyboardInteraction(t) {
25
- if (this.state === "opened")
25
+ if ((this.state === "opening" || this.state === "opened") && t.key === "Tab")
26
+ this.close();
27
+ else if (this.isOpen)
26
28
  switch (t.key) {
27
- case "Tab":
28
- this.close();
29
- break;
30
29
  case "Enter":
31
30
  this.selectByKeyboard(t);
32
31
  break;
@@ -59,7 +58,7 @@ let N = (() => {
59
58
  this.activeOption = null;
60
59
  return;
61
60
  }
62
- const l = this.activeOption ? e.indexOf(this.activeOption) : -1, s = b(t, l, e.length);
61
+ const l = this.activeOption ? e.indexOf(this.activeOption) : -1, s = u(t, l, e.length);
63
62
  this.activeOption = e[s], this.activeOption.setActive(!0), this.triggerElement?.setAttribute("aria-activedescendant", this.activeOption.id), this.activeOption.scrollIntoView({ block: "nearest" }), this.autoSelectActiveOption && this.onOptionArrowsSelected(this.activeOption);
64
63
  }
65
64
  _setNextHorizontalActiveElement(t) {
@@ -68,10 +67,10 @@ let N = (() => {
68
67
  const e = Array.from(this.activeOption?.closest("sbb-autocomplete-grid-row")?.querySelectorAll("sbb-autocomplete-grid-option, sbb-autocomplete-grid-button") ?? [])?.filter((h) => !h.matches(":is(:state(disabled),[state--disabled])"));
69
68
  if (!e.length)
70
69
  return;
71
- const l = b(t, this._activeColumnIndex, e.length), s = e[l];
72
- s instanceof d ? s.setActive(!0) : a(s).add("focus-visible");
70
+ const l = u(t, this._activeColumnIndex, e.length), s = e[l];
71
+ s instanceof b ? s.setActive(!0) : a(s).add("focus-visible");
73
72
  const r = e[this._activeColumnIndex];
74
- r instanceof d ? r.setActive(!1) : a(r).delete("focus-visible"), this.triggerElement?.setAttribute("aria-activedescendant", s.id), s.scrollIntoView({ block: "nearest" }), this._activeColumnIndex = l;
73
+ r instanceof b ? r.setActive(!1) : a(r).delete("focus-visible"), this.triggerElement?.setAttribute("aria-activedescendant", s.id), s.scrollIntoView({ block: "nearest" }), this._activeColumnIndex = l;
75
74
  }
76
75
  resetActiveElement() {
77
76
  this._activeColumnIndex !== 0 && this.activeOption?.closest("sbb-autocomplete-grid-row")?.querySelectorAll("sbb-autocomplete-grid-button").forEach((t) => a(t).delete("focus-visible")), this.activeOption?.setActive(!1), this.activeOption = null, this._activeColumnIndex = 0, this.triggerElement?.removeAttribute("aria-activedescendant");
@@ -80,7 +79,7 @@ let N = (() => {
80
79
  O(t, m ? this.id : this.overlayId, !1, "grid");
81
80
  }
82
81
  }, i = o, (() => {
83
- const t = typeof Symbol == "function" && Symbol.metadata ? Object.create(u[Symbol.metadata] ?? null) : void 0;
82
+ const t = typeof Symbol == "function" && Symbol.metadata ? Object.create(d[Symbol.metadata] ?? null) : void 0;
84
83
  v(null, n = { value: i }, p, { kind: "class", name: i.name, metadata: t }, null, c), i = n.value, t && Object.defineProperty(i, Symbol.metadata, { enumerable: !0, configurable: !0, writable: !0, value: t });
85
84
  })(), o.role = m ? "grid" : null, f(i, c), i;
86
85
  })();
@@ -1,7 +1,7 @@
1
1
  import { i18nDurationDay as N, i18nDurationHour as h, i18nDurationMinute as T } from "@sbb-esta/lyne-elements/core/i18n.js";
2
- import { t as d, c as g, b as m, m as w } from "../../toDate-BCXKL_wM.js";
3
- import { n as I, d as y, i as U } from "../../isValid-Ceq2O0NQ.js";
4
- import { g as C, a as Y, d as F } from "../../differenceInMinutes-CP_C5onR.js";
2
+ import { t as d, c as g, b as m, m as w } from "../../toDate-Bw2KTWeq.js";
3
+ import { n as I, d as y, i as U } from "../../isValid-m3_OsPaB.js";
4
+ import { g as C, a as Y, d as F } from "../../differenceInMinutes-COvvdYsJ.js";
5
5
  function x(e, t, n) {
6
6
  const i = d(e, n?.in);
7
7
  return isNaN(t) ? g(e, NaN) : (t && i.setDate(i.getDate() + t), i);