@sbb-esta/lyne-elements-experimental 5.2.0 → 5.4.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.
- package/custom-elements.json +865 -4
- package/development/easter-egg/easter-egg.component.d.ts +80 -0
- package/development/easter-egg/i18n.d.ts +10 -0
- package/development/easter-egg/svgs.d.ts +10 -0
- package/development/easter-egg.d.ts +1 -0
- package/development/easter-egg.js +9 -0
- package/development/easter-egg.pure.d.ts +2 -0
- package/development/easter-egg.pure.js +758 -0
- package/development/seat-reservation.pure.js +6 -6
- package/easter-egg.js +1 -0
- package/easter-egg.pure.js +567 -0
- package/index.d.ts +2 -0
- package/index.js +2 -0
- package/package.json +12 -2
- package/seat-reservation.pure.js +1 -1
|
@@ -15371,9 +15371,9 @@ let SeatReservationBaseElement = (() => {
|
|
|
15371
15371
|
seatReservation?.coachItems?.forEach((coachItem) => {
|
|
15372
15372
|
const allElemenets = (coachItem.graphicElements?.filter((e) => e.icon && !this.notAreaElements.includes(e.icon)))?.concat(coachItem.serviceElements || []).concat(coachItem.places || []) || [];
|
|
15373
15373
|
const hasOverhangingElements = this._isOverhangingElementsPresent(coachItem.dimension.w, allElemenets);
|
|
15374
|
-
const areaElements = coachItem.graphicElements?.filter((graphicalElement) => !this.notAreaElements.includes(graphicalElement.icon)).map((ele) => this._getCalculatedDimensionPositionElement(ele, coachItem.dimension,
|
|
15375
|
-
const otherElements = coachItem.graphicElements?.filter((graphicalElement) => this.notAreaElements.includes(graphicalElement.icon)).map((ele) => this._getCalculatedDimensionPositionElement(ele, coachItem.dimension,
|
|
15376
|
-
const serviceElements = coachItem.serviceElements?.map((ele) => this._getCalculatedDimensionPositionElement(ele, coachItem.dimension,
|
|
15374
|
+
const areaElements = coachItem.graphicElements?.filter((graphicalElement) => !this.notAreaElements.includes(graphicalElement.icon)).map((ele) => this._getCalculatedDimensionPositionElement(ele, coachItem.dimension, "AREA"));
|
|
15375
|
+
const otherElements = coachItem.graphicElements?.filter((graphicalElement) => this.notAreaElements.includes(graphicalElement.icon)).map((ele) => this._getCalculatedDimensionPositionElement(ele, coachItem.dimension, "OTHER"));
|
|
15376
|
+
const serviceElements = coachItem.serviceElements?.map((ele) => this._getCalculatedDimensionPositionElement(ele, coachItem.dimension, "SERVICE"));
|
|
15377
15377
|
const borderMiddleElement = this._getCalculatedMiddleBorderElement(coachItem);
|
|
15378
15378
|
const calcCoachDimension = this.getCalculatedDimension({ ...coachItem.dimension });
|
|
15379
15379
|
const coachSturcture = {
|
|
@@ -15448,14 +15448,14 @@ let SeatReservationBaseElement = (() => {
|
|
|
15448
15448
|
* Returns the calculated positions and dimensions of graphical, service and area elements
|
|
15449
15449
|
* @returns BaseElement
|
|
15450
15450
|
*/
|
|
15451
|
-
_getCalculatedDimensionPositionElement(element, coachDimension,
|
|
15451
|
+
_getCalculatedDimensionPositionElement(element, coachDimension, elementType) {
|
|
15452
15452
|
const dim = { ...element.dimension };
|
|
15453
15453
|
const pos = { ...element.position };
|
|
15454
15454
|
const rotation = element.rotation || 0;
|
|
15455
15455
|
const isNotFixedRotationGraphicalElement = this.notAreaElements.concat(this.notFixedRotatableAreaIcons).indexOf(element.icon) === -1;
|
|
15456
15456
|
const calcRotation = this.alignVertical && isNotFixedRotationGraphicalElement ? rotation - 90 : rotation;
|
|
15457
15457
|
let areaMounting = null;
|
|
15458
|
-
if (
|
|
15458
|
+
if (elementType === "AREA") {
|
|
15459
15459
|
const isNotTableGraphic = element.icon?.indexOf("TABLE") === -1;
|
|
15460
15460
|
const areaProperty = element.icon && isNotTableGraphic ? element.icon : null;
|
|
15461
15461
|
const stretchHeight = this.isElementDirectlyOnBorder(element, coachDimension) && areaProperty !== "ENTRY_EXIT";
|
|
@@ -15467,7 +15467,7 @@ let SeatReservationBaseElement = (() => {
|
|
|
15467
15467
|
if (!stretchHeight) pos.y += this.coachBorderOffset - this.coachBorderOffset / 3;
|
|
15468
15468
|
}
|
|
15469
15469
|
if (stretchHeight) dim.h += this.coachBorderOffset - this.coachBorderOffset / 3;
|
|
15470
|
-
} else {
|
|
15470
|
+
} else if (elementType === "OTHER") {
|
|
15471
15471
|
if (element.position.y === 0) pos.y -= this.coachBorderOffset;
|
|
15472
15472
|
if (coachDimension.h === element.position.y + element.dimension.h) dim.h += this.coachBorderOffset * 2;
|
|
15473
15473
|
}
|
package/easter-egg.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{SbbEasterEggElement as e}from"./easter-egg.pure.js";export*from"./easter-egg.pure.js";e.define();
|