@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.
- package/custom-elements.json +1147 -590
- package/development/seat-reservation/common/mapper/icon-mapper.d.ts.map +1 -1
- package/development/seat-reservation/common/mapper/icon-mapper.js +4 -5
- package/development/seat-reservation/common/mapper/mapper.d.ts +6 -5
- package/development/seat-reservation/common/mapper/mapper.d.ts.map +1 -1
- package/development/seat-reservation/common/mapper/mapper.js +14 -11
- package/development/seat-reservation/common/mapper/seat-reservation-sample-data.d.ts +113 -0
- package/development/seat-reservation/common/mapper/seat-reservation-sample-data.d.ts.map +1 -1
- package/development/seat-reservation/common/mapper/seat-reservation-sample-data.js +25999 -649
- package/development/seat-reservation/common/svgs.d.ts +0 -1
- package/development/seat-reservation/common/svgs.d.ts.map +1 -1
- package/development/seat-reservation/common/svgs.js +1 -3
- package/development/seat-reservation/common/translations/i18n.d.ts.map +1 -1
- package/development/seat-reservation/common/translations/i18n.js +225 -194
- package/development/seat-reservation/common/types.d.ts +20 -3
- package/development/seat-reservation/common/types.d.ts.map +1 -1
- package/development/seat-reservation/seat-reservation/seat-reservation-base-element.d.ts +50 -18
- 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 +352 -172
- package/development/seat-reservation/seat-reservation/seat-reservation.component.d.ts +29 -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 +603 -308
- package/development/seat-reservation/seat-reservation-area/seat-reservation-area.component.js +17 -10
- package/development/seat-reservation/seat-reservation-graphic/seat-reservation-assets.d.ts.map +1 -1
- package/development/seat-reservation/seat-reservation-graphic/seat-reservation-assets.js +1 -6
- package/development/seat-reservation/seat-reservation-graphic/seat-reservation-graphic.component.js +36 -18
- package/development/seat-reservation/seat-reservation-navigation-coach/seat-reservation-navigation-coach.component.d.ts +3 -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 +54 -32
- package/development/seat-reservation/seat-reservation-place-control/seat-reservation-place-control.component.d.ts +2 -0
- package/development/seat-reservation/seat-reservation-place-control/seat-reservation-place-control.component.d.ts.map +1 -1
- package/development/seat-reservation/seat-reservation-place-control/seat-reservation-place-control.component.js +107 -58
- package/development/seat-reservation/seat-reservation-scoped/seat-reservation-scoped.component.d.ts +1 -16
- package/development/seat-reservation/seat-reservation-scoped/seat-reservation-scoped.component.d.ts.map +1 -1
- package/development/seat-reservation/seat-reservation-scoped/seat-reservation-scoped.component.js +10 -164
- package/package.json +2 -2
- package/seat-reservation/common/mapper/icon-mapper.d.ts.map +1 -1
- package/seat-reservation/common/mapper/icon-mapper.js +3 -4
- package/seat-reservation/common/mapper/mapper.d.ts +6 -5
- package/seat-reservation/common/mapper/mapper.d.ts.map +1 -1
- package/seat-reservation/common/mapper/mapper.js +35 -32
- package/seat-reservation/common/mapper/seat-reservation-sample-data.d.ts +113 -0
- package/seat-reservation/common/mapper/seat-reservation-sample-data.d.ts.map +1 -1
- package/seat-reservation/common/mapper/seat-reservation-sample-data.js +25997 -648
- package/seat-reservation/common/svgs.d.ts +0 -1
- package/seat-reservation/common/svgs.d.ts.map +1 -1
- package/seat-reservation/common/svgs.js +4 -11
- package/seat-reservation/common/translations/i18n.d.ts.map +1 -1
- package/seat-reservation/common/translations/i18n.js +228 -197
- package/seat-reservation/common/types.d.ts +20 -3
- package/seat-reservation/common/types.d.ts.map +1 -1
- package/seat-reservation/seat-reservation/seat-reservation-base-element.d.ts +50 -18
- package/seat-reservation/seat-reservation/seat-reservation-base-element.d.ts.map +1 -1
- package/seat-reservation/seat-reservation/seat-reservation-base-element.js +294 -175
- package/seat-reservation/seat-reservation/seat-reservation.component.d.ts +29 -13
- package/seat-reservation/seat-reservation/seat-reservation.component.d.ts.map +1 -1
- package/seat-reservation/seat-reservation/seat-reservation.component.js +318 -303
- package/seat-reservation/seat-reservation-area/seat-reservation-area.component.js +22 -22
- package/seat-reservation/seat-reservation-graphic/seat-reservation-assets.d.ts.map +1 -1
- package/seat-reservation/seat-reservation-graphic/seat-reservation-assets.js +0 -5
- package/seat-reservation/seat-reservation-graphic/seat-reservation-graphic.component.js +37 -37
- package/seat-reservation/seat-reservation-navigation-coach/seat-reservation-navigation-coach.component.d.ts +3 -1
- package/seat-reservation/seat-reservation-navigation-coach/seat-reservation-navigation-coach.component.d.ts.map +1 -1
- package/seat-reservation/seat-reservation-navigation-coach/seat-reservation-navigation-coach.component.js +95 -84
- package/seat-reservation/seat-reservation-place-control/seat-reservation-place-control.component.d.ts +2 -0
- package/seat-reservation/seat-reservation-place-control/seat-reservation-place-control.component.d.ts.map +1 -1
- package/seat-reservation/seat-reservation-place-control/seat-reservation-place-control.component.js +75 -63
- package/seat-reservation/seat-reservation-scoped/seat-reservation-scoped.component.d.ts +1 -16
- package/seat-reservation/seat-reservation-scoped/seat-reservation-scoped.component.d.ts.map +1 -1
- package/seat-reservation/seat-reservation-scoped/seat-reservation-scoped.component.js +14 -101
package/development/seat-reservation/seat-reservation-scoped/seat-reservation-scoped.component.js
CHANGED
|
@@ -1,14 +1,6 @@
|
|
|
1
|
-
var __typeError = (msg) => {
|
|
2
|
-
throw TypeError(msg);
|
|
3
|
-
};
|
|
4
|
-
var __accessCheck = (obj, member, msg) => member.has(obj) || __typeError("Cannot " + msg);
|
|
5
|
-
var __privateGet = (obj, member, getter) => (__accessCheck(obj, member, "read from private field"), getter ? getter.call(obj) : member.get(obj));
|
|
6
|
-
var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot add the same private member more than once") : member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
|
|
7
|
-
var __privateSet = (obj, member, value, setter) => (__accessCheck(obj, member, "write to private field"), setter ? setter.call(obj, value) : member.set(obj, value), value);
|
|
8
1
|
import { __esDecorate, __runInitializers } from "tslib";
|
|
9
|
-
import { forceType } from "@sbb-esta/lyne-elements/core/decorators.js";
|
|
10
2
|
import { css, LitElement, html } from "lit";
|
|
11
|
-
import { customElement
|
|
3
|
+
import { customElement } from "lit/decorators.js";
|
|
12
4
|
const style = css`*,
|
|
13
5
|
::before,
|
|
14
6
|
::after {
|
|
@@ -16,173 +8,27 @@ const style = css`*,
|
|
|
16
8
|
}
|
|
17
9
|
|
|
18
10
|
:host {
|
|
11
|
+
--sbb-seat-reservation-scoped-width: 0;
|
|
12
|
+
--sbb-seat-reservation-scoped-height: 0;
|
|
19
13
|
display: block;
|
|
20
14
|
}
|
|
21
|
-
:host .
|
|
22
|
-
:
|
|
23
|
-
:
|
|
24
|
-
width: var(--sbb-seat-reservation-scoped-width);
|
|
25
|
-
height: var(--sbb-seat-reservation-scoped-height);
|
|
26
|
-
inset-block-start: var(--sbb-seat-reservation-scoped-inset-block-start);
|
|
27
|
-
inset-inline-start: var(--sbb-seat-reservation-scoped-inset-inline-start);
|
|
28
|
-
z-index: var(--sbb-seat-reservation-scoped-z-index);
|
|
29
|
-
}
|
|
30
|
-
:host .coach-border,
|
|
31
|
-
:host .graphical-element ::slotted(*),
|
|
32
|
-
:host .graphical-element {
|
|
33
|
-
position: absolute;
|
|
34
|
-
}
|
|
35
|
-
:host .coach-border {
|
|
36
|
-
z-index: 0;
|
|
15
|
+
:host .scoped-element {
|
|
16
|
+
width: calc(var(--sbb-seat-reservation-scoped-width) * var(--sbb-seat-reservation-one-px-rem, 0.0625rem));
|
|
17
|
+
height: calc(var(--sbb-seat-reservation-scoped-height) * var(--sbb-seat-reservation-one-px-rem, 0.0625rem));
|
|
37
18
|
}`;
|
|
38
19
|
let SbbSeatReservationScopedElement = (() => {
|
|
39
|
-
var
|
|
20
|
+
var _a;
|
|
40
21
|
let _classDecorators = [customElement("sbb-seat-reservation-scoped")];
|
|
41
22
|
let _classDescriptor;
|
|
42
23
|
let _classExtraInitializers = [];
|
|
43
24
|
let _classThis;
|
|
44
25
|
let _classSuper = LitElement;
|
|
45
|
-
let _insetBlockStart_decorators;
|
|
46
|
-
let _insetBlockStart_initializers = [];
|
|
47
|
-
let _insetBlockStart_extraInitializers = [];
|
|
48
|
-
let _insetInlineStart_decorators;
|
|
49
|
-
let _insetInlineStart_initializers = [];
|
|
50
|
-
let _insetInlineStart_extraInitializers = [];
|
|
51
|
-
let _width_decorators;
|
|
52
|
-
let _width_initializers = [];
|
|
53
|
-
let _width_extraInitializers = [];
|
|
54
|
-
let _height_decorators;
|
|
55
|
-
let _height_initializers = [];
|
|
56
|
-
let _height_extraInitializers = [];
|
|
57
|
-
let _zIndex_decorators;
|
|
58
|
-
let _zIndex_initializers = [];
|
|
59
|
-
let _zIndex_extraInitializers = [];
|
|
60
|
-
let _cellId_decorators;
|
|
61
|
-
let _cellId_initializers = [];
|
|
62
|
-
let _cellId_extraInitializers = [];
|
|
63
|
-
let _scopedClasses_decorators;
|
|
64
|
-
let _scopedClasses_initializers = [];
|
|
65
|
-
let _scopedClasses_extraInitializers = [];
|
|
66
26
|
_a = class extends _classSuper {
|
|
67
|
-
constructor() {
|
|
68
|
-
super(...arguments);
|
|
69
|
-
__privateAdd(this, _insetBlockStart_accessor_storage, __runInitializers(this, _insetBlockStart_initializers, ""));
|
|
70
|
-
__privateAdd(this, _insetInlineStart_accessor_storage, (__runInitializers(this, _insetBlockStart_extraInitializers), __runInitializers(this, _insetInlineStart_initializers, "")));
|
|
71
|
-
__privateAdd(this, _width_accessor_storage, (__runInitializers(this, _insetInlineStart_extraInitializers), __runInitializers(this, _width_initializers, "")));
|
|
72
|
-
__privateAdd(this, _height_accessor_storage, (__runInitializers(this, _width_extraInitializers), __runInitializers(this, _height_initializers, "")));
|
|
73
|
-
__privateAdd(this, _zIndex_accessor_storage, (__runInitializers(this, _height_extraInitializers), __runInitializers(this, _zIndex_initializers, "")));
|
|
74
|
-
__privateAdd(this, _cellId_accessor_storage, (__runInitializers(this, _zIndex_extraInitializers), __runInitializers(this, _cellId_initializers, "")));
|
|
75
|
-
__privateAdd(this, _scopedClasses_accessor_storage, (__runInitializers(this, _cellId_extraInitializers), __runInitializers(this, _scopedClasses_initializers, "")));
|
|
76
|
-
__runInitializers(this, _scopedClasses_extraInitializers);
|
|
77
|
-
}
|
|
78
|
-
/** Inset block start in pixels (without unit) */
|
|
79
|
-
get insetBlockStart() {
|
|
80
|
-
return __privateGet(this, _insetBlockStart_accessor_storage);
|
|
81
|
-
}
|
|
82
|
-
set insetBlockStart(value) {
|
|
83
|
-
__privateSet(this, _insetBlockStart_accessor_storage, value);
|
|
84
|
-
}
|
|
85
|
-
/** Inset inline start in pixels (without unit) */
|
|
86
|
-
get insetInlineStart() {
|
|
87
|
-
return __privateGet(this, _insetInlineStart_accessor_storage);
|
|
88
|
-
}
|
|
89
|
-
set insetInlineStart(value) {
|
|
90
|
-
__privateSet(this, _insetInlineStart_accessor_storage, value);
|
|
91
|
-
}
|
|
92
|
-
/** Width of the scoped element in pixels (without unit) */
|
|
93
|
-
get width() {
|
|
94
|
-
return __privateGet(this, _width_accessor_storage);
|
|
95
|
-
}
|
|
96
|
-
set width(value) {
|
|
97
|
-
__privateSet(this, _width_accessor_storage, value);
|
|
98
|
-
}
|
|
99
|
-
/** Height of the scoped element in pixels (without unit) */
|
|
100
|
-
get height() {
|
|
101
|
-
return __privateGet(this, _height_accessor_storage);
|
|
102
|
-
}
|
|
103
|
-
set height(value) {
|
|
104
|
-
__privateSet(this, _height_accessor_storage, value);
|
|
105
|
-
}
|
|
106
|
-
/** Z-index of the scoped element */
|
|
107
|
-
get zIndex() {
|
|
108
|
-
return __privateGet(this, _zIndex_accessor_storage);
|
|
109
|
-
}
|
|
110
|
-
set zIndex(value) {
|
|
111
|
-
__privateSet(this, _zIndex_accessor_storage, value);
|
|
112
|
-
}
|
|
113
|
-
/** Cell id of the scoped element, if it is used in a table */
|
|
114
|
-
get cellId() {
|
|
115
|
-
return __privateGet(this, _cellId_accessor_storage);
|
|
116
|
-
}
|
|
117
|
-
set cellId(value) {
|
|
118
|
-
__privateSet(this, _cellId_accessor_storage, value);
|
|
119
|
-
}
|
|
120
|
-
/** Scoped classes for the scoped element */
|
|
121
|
-
get scopedClasses() {
|
|
122
|
-
return __privateGet(this, _scopedClasses_accessor_storage);
|
|
123
|
-
}
|
|
124
|
-
set scopedClasses(value) {
|
|
125
|
-
__privateSet(this, _scopedClasses_accessor_storage, value);
|
|
126
|
-
}
|
|
127
|
-
willUpdate(_changedProperties) {
|
|
128
|
-
super.willUpdate(_changedProperties);
|
|
129
|
-
if (_changedProperties.has("width")) {
|
|
130
|
-
this.style?.setProperty("--sbb-seat-reservation-scoped-width", `${this.width}`);
|
|
131
|
-
}
|
|
132
|
-
if (_changedProperties.has("height")) {
|
|
133
|
-
this.style?.setProperty("--sbb-seat-reservation-scoped-height", `${this.height}`);
|
|
134
|
-
}
|
|
135
|
-
if (_changedProperties.has("insetBlockStart")) {
|
|
136
|
-
this.style?.setProperty("--sbb-seat-reservation-scoped-inset-block-start", `${this.insetBlockStart}`);
|
|
137
|
-
}
|
|
138
|
-
if (_changedProperties.has("insetInlineStart")) {
|
|
139
|
-
this.style?.setProperty("--sbb-seat-reservation-scoped-inset-inline-start", `${this.insetInlineStart}`);
|
|
140
|
-
}
|
|
141
|
-
if (_changedProperties.has("zIndex")) {
|
|
142
|
-
this.style?.setProperty("--sbb-seat-reservation-scoped-z-index", `${this.zIndex}`);
|
|
143
|
-
}
|
|
144
|
-
}
|
|
145
27
|
render() {
|
|
146
|
-
|
|
147
|
-
return html`<div class="${this.scopedClasses}">
|
|
148
|
-
<slot></slot>
|
|
149
|
-
</div>`;
|
|
150
|
-
} else {
|
|
151
|
-
return html`<td id="${this.cellId}" class="${this.scopedClasses}">
|
|
152
|
-
<slot></slot>
|
|
153
|
-
</td>`;
|
|
154
|
-
}
|
|
28
|
+
return html`<div class="scoped-element"><slot></slot></div>`;
|
|
155
29
|
}
|
|
156
|
-
},
|
|
30
|
+
}, _classThis = _a, (() => {
|
|
157
31
|
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
158
|
-
_insetBlockStart_decorators = [forceType(), property({ attribute: "inset-block-start" })];
|
|
159
|
-
_insetInlineStart_decorators = [forceType(), property({ attribute: "inset-inline-start" })];
|
|
160
|
-
_width_decorators = [forceType(), property({ attribute: "width" })];
|
|
161
|
-
_height_decorators = [forceType(), property({ attribute: "height" })];
|
|
162
|
-
_zIndex_decorators = [forceType(), property({ attribute: "z-index" })];
|
|
163
|
-
_cellId_decorators = [forceType(), property({ attribute: "cell-id" })];
|
|
164
|
-
_scopedClasses_decorators = [forceType(), property({ attribute: "scoped-classes" })];
|
|
165
|
-
__esDecorate(_a, null, _insetBlockStart_decorators, { kind: "accessor", name: "insetBlockStart", static: false, private: false, access: { has: (obj) => "insetBlockStart" in obj, get: (obj) => obj.insetBlockStart, set: (obj, value) => {
|
|
166
|
-
obj.insetBlockStart = value;
|
|
167
|
-
} }, metadata: _metadata }, _insetBlockStart_initializers, _insetBlockStart_extraInitializers);
|
|
168
|
-
__esDecorate(_a, null, _insetInlineStart_decorators, { kind: "accessor", name: "insetInlineStart", static: false, private: false, access: { has: (obj) => "insetInlineStart" in obj, get: (obj) => obj.insetInlineStart, set: (obj, value) => {
|
|
169
|
-
obj.insetInlineStart = value;
|
|
170
|
-
} }, metadata: _metadata }, _insetInlineStart_initializers, _insetInlineStart_extraInitializers);
|
|
171
|
-
__esDecorate(_a, null, _width_decorators, { kind: "accessor", name: "width", static: false, private: false, access: { has: (obj) => "width" in obj, get: (obj) => obj.width, set: (obj, value) => {
|
|
172
|
-
obj.width = value;
|
|
173
|
-
} }, metadata: _metadata }, _width_initializers, _width_extraInitializers);
|
|
174
|
-
__esDecorate(_a, null, _height_decorators, { kind: "accessor", name: "height", static: false, private: false, access: { has: (obj) => "height" in obj, get: (obj) => obj.height, set: (obj, value) => {
|
|
175
|
-
obj.height = value;
|
|
176
|
-
} }, metadata: _metadata }, _height_initializers, _height_extraInitializers);
|
|
177
|
-
__esDecorate(_a, null, _zIndex_decorators, { kind: "accessor", name: "zIndex", static: false, private: false, access: { has: (obj) => "zIndex" in obj, get: (obj) => obj.zIndex, set: (obj, value) => {
|
|
178
|
-
obj.zIndex = value;
|
|
179
|
-
} }, metadata: _metadata }, _zIndex_initializers, _zIndex_extraInitializers);
|
|
180
|
-
__esDecorate(_a, null, _cellId_decorators, { kind: "accessor", name: "cellId", static: false, private: false, access: { has: (obj) => "cellId" in obj, get: (obj) => obj.cellId, set: (obj, value) => {
|
|
181
|
-
obj.cellId = value;
|
|
182
|
-
} }, metadata: _metadata }, _cellId_initializers, _cellId_extraInitializers);
|
|
183
|
-
__esDecorate(_a, null, _scopedClasses_decorators, { kind: "accessor", name: "scopedClasses", static: false, private: false, access: { has: (obj) => "scopedClasses" in obj, get: (obj) => obj.scopedClasses, set: (obj, value) => {
|
|
184
|
-
obj.scopedClasses = value;
|
|
185
|
-
} }, metadata: _metadata }, _scopedClasses_initializers, _scopedClasses_extraInitializers);
|
|
186
32
|
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
187
33
|
_classThis = _classDescriptor.value;
|
|
188
34
|
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
@@ -192,4 +38,4 @@ let SbbSeatReservationScopedElement = (() => {
|
|
|
192
38
|
export {
|
|
193
39
|
SbbSeatReservationScopedElement
|
|
194
40
|
};
|
|
195
|
-
//# sourceMappingURL=data:application/json;charset=utf-8;base64,
|
|
41
|
+
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2VhdC1yZXNlcnZhdGlvbi1zY29wZWQuY29tcG9uZW50LmpzIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9zcmMvZWxlbWVudHMtZXhwZXJpbWVudGFsL3NlYXQtcmVzZXJ2YXRpb24vc2VhdC1yZXNlcnZhdGlvbi1zY29wZWQvc2VhdC1yZXNlcnZhdGlvbi1zY29wZWQuY29tcG9uZW50LnRzIl0sInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IHR5cGUgQ1NTUmVzdWx0R3JvdXAsIHR5cGUgVGVtcGxhdGVSZXN1bHQgfSBmcm9tICdsaXQnO1xuaW1wb3J0IHsgaHRtbCwgTGl0RWxlbWVudCB9IGZyb20gJ2xpdCc7XG5pbXBvcnQgeyBjdXN0b21FbGVtZW50IH0gZnJvbSAnbGl0L2RlY29yYXRvcnMuanMnO1xuXG5pbXBvcnQgc3R5bGUgZnJvbSAnLi9zZWF0LXJlc2VydmF0aW9uLXNjb3BlZC5zY3NzP2xpdCZpbmxpbmUnO1xuXG4vKipcbiAqIFdyYXBwZXIgY2xhc3MgZm9yIHNjb3BlZCBlbGVtZW50cyB3aXRoIHNpbWlsYXIgcHJvcGVydGllcyB0byBzZXQuXG4gKi9cbmV4cG9ydFxuQGN1c3RvbUVsZW1lbnQoJ3NiYi1zZWF0LXJlc2VydmF0aW9uLXNjb3BlZCcpXG5jbGFzcyBTYmJTZWF0UmVzZXJ2YXRpb25TY29wZWRFbGVtZW50IGV4dGVuZHMgTGl0RWxlbWVudCB7XG4gIHB1YmxpYyBzdGF0aWMgb3ZlcnJpZGUgc3R5bGVzOiBDU1NSZXN1bHRHcm91cCA9IHN0eWxlO1xuXG4gIHByb3RlY3RlZCBvdmVycmlkZSByZW5kZXIoKTogVGVtcGxhdGVSZXN1bHQge1xuICAgIHJldHVybiBodG1sYDxkaXYgY2xhc3M9XCJzY29wZWQtZWxlbWVudFwiPjxzbG90Pjwvc2xvdD48L2Rpdj5gO1xuICB9XG59XG5cbmRlY2xhcmUgZ2xvYmFsIHtcbiAgaW50ZXJmYWNlIEhUTUxFbGVtZW50VGFnTmFtZU1hcCB7XG4gICAgLy8gZXNsaW50LWRpc2FibGUtbmV4dC1saW5lIEB0eXBlc2NyaXB0LWVzbGludC9uYW1pbmctY29udmVudGlvblxuICAgICdzYmItc2VhdC1yZXNlcnZhdGlvbi1zY29wZWQnOiBTYmJTZWF0UmVzZXJ2YXRpb25TY29wZWRFbGVtZW50O1xuICB9XG59XG4iXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7Ozs7Ozs7O0lBV00sbUNBQStCLE1BQUE7OzBCQURwQyxjQUFjLDZCQUE2QixDQUFDOzs7O29CQUNDO0FBQVIsRUFBQSxtQkFBUSxZQUFVO0FBQUEsSUFHbkMsU0FBTTtBQUN2QixhQUFPO0FBQUEsSUFDVDtBQUFBOztBQUxGLGlCQUFBLE1BQUEsbUJBQUEsRUFBQSxPQUFBLFdBQUEsR0FBQSxrQkFBQSxFQUFBLE1BQUEsU0FBQSxNQUFBLFdBQUEsTUFBQSxVQUFBLFVBQUEsR0FBQSxNQUFBLHVCQUFBOzs7UUFDeUIsR0FBQSxTQUF5QixPQUQ1QyxrQkFBQSxZQUFBLHVCQUFBLEdBQWdDOzs7In0=
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sbb-esta/lyne-elements-experimental",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.3.0",
|
|
4
4
|
"description": "Lyne Design System",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"design system",
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"type": "module",
|
|
12
12
|
"customElements": "custom-elements.json",
|
|
13
13
|
"peerDependencies": {
|
|
14
|
-
"@sbb-esta/lyne-elements": "3.
|
|
14
|
+
"@sbb-esta/lyne-elements": "3.3.0"
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
17
|
"lit": "^3.3.1",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"icon-mapper.d.ts","sourceRoot":"","sources":["../../../../../src/elements-experimental/seat-reservation/common/mapper/icon-mapper.ts"],"names":[],"mappings":"AAEA;;;GAGG;AACH,MAAM,MAAM,mBAAmB,GAAG;IAChC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,GAAG,CAAC,EAAE,MAAM,CAAC;CACd,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,mBAAmB,
|
|
1
|
+
{"version":3,"file":"icon-mapper.d.ts","sourceRoot":"","sources":["../../../../../src/elements-experimental/seat-reservation/common/mapper/icon-mapper.ts"],"names":[],"mappings":"AAEA;;;GAGG;AACH,MAAM,MAAM,mBAAmB,GAAG;IAChC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,GAAG,CAAC,EAAE,MAAM,CAAC;CACd,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,mBAAmB,CAiE5D,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqGG"}
|
|
@@ -20,8 +20,8 @@ const E = {
|
|
|
20
20
|
COMPARTMENT_PASSAGE_HIGH: { svg: a.chassisPassageCompartmentLeftTop },
|
|
21
21
|
COMPARTMENT_PASSAGE_LOW: { svg: a.chassisPassageCompartmentRightBottom },
|
|
22
22
|
DRIVER_AREA: { svg: a.chassisDriverTrain },
|
|
23
|
-
|
|
24
|
-
|
|
23
|
+
DRIVER_AREA_BUS: { svg: a.chassisDriverBus },
|
|
24
|
+
DRIVER_AREA_TRAIN: { svg: a.chassisDriverTrainFull },
|
|
25
25
|
EASY_ACCESS: { svgName: "sa-em" },
|
|
26
26
|
EASY_ACCESS_AREA: { svgName: "sa-em" },
|
|
27
27
|
EASY_ACCESS_ICON: { svgName: "sa-em" },
|
|
@@ -52,9 +52,8 @@ const E = {
|
|
|
52
52
|
SILENCE_ICON: { svgName: "sa-rz" },
|
|
53
53
|
SKI_AREA: { svgName: "sa-sa" },
|
|
54
54
|
SKI_ICON: { svgName: "sa-sa" },
|
|
55
|
+
STAFF_AREA: { svgName: "avatar-train-staff-medium" },
|
|
55
56
|
STAIR_AREA: { svgName: "sa-ac" },
|
|
56
|
-
TABLE: { svg: a.interiorTable },
|
|
57
|
-
TABLE_RESTAURANT: { svg: a.interiorTable },
|
|
58
57
|
TOILET_AREA: { svgName: "sa-wc" },
|
|
59
58
|
TOILET_ICON: { svgName: "sa-wc" },
|
|
60
59
|
TOILET_WHEELCHAIR_AREA: { svgName: "sa-rw" },
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { CoachItem, Place, PlaceSelection, SeatReservation,
|
|
1
|
+
import { CoachItem, CoachNumberOfFreePlaces, Place, PlaceSelection, SeatReservation, SeatReservationPlaceSelection, SeatReservationSelectedCoach, VehicleType } from '../types.js';
|
|
2
2
|
/**
|
|
3
3
|
* Map function that converts the RAW OSDM mock data into SeatReservation
|
|
4
4
|
*/
|
|
5
5
|
export declare const mapRawDataToSeatReservation: (vehicleType: VehicleType) => SeatReservation;
|
|
6
6
|
/**
|
|
7
|
-
* Mapped place and coach
|
|
7
|
+
* Mapped place and coach information to place selection
|
|
8
8
|
* @param place
|
|
9
9
|
* @param coachIndex
|
|
10
10
|
* @returns PlaceSelection
|
|
11
11
|
*/
|
|
12
|
-
export declare const mapPlaceInfosToPlaceSelection: (place: Place, coachIndex: number) => PlaceSelection;
|
|
12
|
+
export declare const mapPlaceInfosToPlaceSelection: (place: Place, deckIndex: number, coachIndex: number) => PlaceSelection;
|
|
13
13
|
/**
|
|
14
14
|
* Mapped information from place, coach and the coachindex to the seatReservationPlaceSelection.
|
|
15
15
|
* This Object information is emitted outwards
|
|
@@ -18,12 +18,13 @@ export declare const mapPlaceInfosToPlaceSelection: (place: Place, coachIndex: n
|
|
|
18
18
|
* @param coachIndex
|
|
19
19
|
* @returns SeatReservationPlaceSelection
|
|
20
20
|
*/
|
|
21
|
-
export declare const mapPlaceAndCoachToSeatReservationPlaceSelection: (place: Place, coach: CoachItem, coachIndex: number) => SeatReservationPlaceSelection;
|
|
21
|
+
export declare const mapPlaceAndCoachToSeatReservationPlaceSelection: (place: Place, coach: CoachItem, deckIndex: number, coachIndex: number) => SeatReservationPlaceSelection;
|
|
22
22
|
/**
|
|
23
23
|
* Mapped coach information to coach selection
|
|
24
24
|
* @param coachIndex
|
|
25
25
|
* @param coach
|
|
26
|
+
* @param coachNumberOfFreePlaces
|
|
26
27
|
* @returns PlaceSelection
|
|
27
28
|
*/
|
|
28
|
-
export declare const mapCoachInfosToCoachSelection: (coachIndex: number, coach: CoachItem) =>
|
|
29
|
+
export declare const mapCoachInfosToCoachSelection: (coachIndex: number, coach: CoachItem, coachNumberOfFreePlaces: CoachNumberOfFreePlaces) => SeatReservationSelectedCoach;
|
|
29
30
|
//# sourceMappingURL=mapper.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mapper.d.ts","sourceRoot":"","sources":["../../../../../src/elements-experimental/seat-reservation/common/mapper/mapper.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,SAAS,EACT,KAAK,EACL,cAAc,EAEd,eAAe,EACf,6BAA6B,EAC7B,
|
|
1
|
+
{"version":3,"file":"mapper.d.ts","sourceRoot":"","sources":["../../../../../src/elements-experimental/seat-reservation/common/mapper/mapper.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,SAAS,EACT,uBAAuB,EACvB,KAAK,EACL,cAAc,EAEd,eAAe,EACf,6BAA6B,EAC7B,4BAA4B,EAC5B,WAAW,EACZ,MAAM,aAAa,CAAC;AAIrB;;GAEG;AACH,eAAO,MAAM,2BAA2B,GAAI,aAAa,WAAW,KAAG,eAmFtE,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,6BAA6B,GACxC,OAAO,KAAK,EACZ,WAAW,MAAM,EACjB,YAAY,MAAM,KACjB,cAWF,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,+CAA+C,GAC1D,OAAO,KAAK,EACZ,OAAO,SAAS,EAChB,WAAW,MAAM,EACjB,YAAY,MAAM,KACjB,6BAcF,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,6BAA6B,GACxC,YAAY,MAAM,EAClB,OAAO,SAAS,EAChB,yBAAyB,uBAAuB,KAC/C,4BAUF,CAAC"}
|
|
@@ -1,22 +1,20 @@
|
|
|
1
1
|
import { MOCK_COACHES_RAW_0 as l, MOCK_COACHES_RAW_1 as h } from "./seat-reservation-sample-data.js";
|
|
2
2
|
const u = (e) => {
|
|
3
|
-
const
|
|
4
|
-
const
|
|
5
|
-
number:
|
|
6
|
-
state:
|
|
3
|
+
const o = (e === "TRAIN" ? l : h).map((a) => {
|
|
4
|
+
const i = a?.coachDeckLayout, r = [], c = [], m = i.placeGroups.map((t) => (r.indexOf(t.travelClass) === -1 && r.push(t.travelClass), c.indexOf(t.accommodationSubType) === -1 && c.push(t.accommodationSubType), t.places?.map((s) => ({
|
|
5
|
+
number: s?.number,
|
|
6
|
+
state: s?.state,
|
|
7
7
|
type: t.accommodationSubType.indexOf("BICYCLE") === -1 ? "SEAT" : "BICYCLE",
|
|
8
|
-
dimension: { w:
|
|
8
|
+
dimension: { w: s.rectangle.dimension.width, h: s.rectangle.dimension.height },
|
|
9
9
|
position: {
|
|
10
|
-
x:
|
|
11
|
-
y:
|
|
12
|
-
z:
|
|
10
|
+
x: s.rectangle.position.x,
|
|
11
|
+
y: s.rectangle.position.y,
|
|
12
|
+
z: s.rectangle.position.z
|
|
13
13
|
},
|
|
14
|
-
rotation:
|
|
14
|
+
rotation: s?.orientation || 0,
|
|
15
15
|
travelClass: t?.travelClass,
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
selected: !1
|
|
19
|
-
})))).flat(), m = s.serviceIcons.map((t) => ({
|
|
16
|
+
propertyIds: s.placeProperties || []
|
|
17
|
+
})))).flat(), p = i.serviceIcons.map((t) => ({
|
|
20
18
|
icon: t.type,
|
|
21
19
|
position: {
|
|
22
20
|
x: t.rectangle.position.x,
|
|
@@ -27,7 +25,7 @@ const u = (e) => {
|
|
|
27
25
|
w: t.rectangle.dimension.width,
|
|
28
26
|
h: t.rectangle.dimension.height
|
|
29
27
|
}
|
|
30
|
-
})),
|
|
28
|
+
})), d = i.graphicElements.map((t) => ({
|
|
31
29
|
icon: t?.type,
|
|
32
30
|
position: {
|
|
33
31
|
x: t.rectangle.position.x,
|
|
@@ -38,42 +36,47 @@ const u = (e) => {
|
|
|
38
36
|
rotation: t.orientation
|
|
39
37
|
}));
|
|
40
38
|
return {
|
|
41
|
-
id:
|
|
42
|
-
number:
|
|
43
|
-
dimension: { w:
|
|
44
|
-
places:
|
|
45
|
-
serviceElements:
|
|
46
|
-
graphicElements:
|
|
47
|
-
travelClass:
|
|
48
|
-
propertyIds:
|
|
39
|
+
id: i?.id,
|
|
40
|
+
number: i?.name,
|
|
41
|
+
dimension: { w: i.dimension?.width, h: i.dimension?.height },
|
|
42
|
+
places: m,
|
|
43
|
+
serviceElements: p,
|
|
44
|
+
graphicElements: d,
|
|
45
|
+
travelClass: r,
|
|
46
|
+
propertyIds: c
|
|
49
47
|
};
|
|
50
48
|
});
|
|
51
49
|
return {
|
|
52
50
|
vehicleType: e,
|
|
53
51
|
deckCoachIndex: 0,
|
|
54
|
-
|
|
52
|
+
deckCoachLevel: "SINGLE_DECK",
|
|
53
|
+
coachItems: o
|
|
55
54
|
};
|
|
56
|
-
}, y = (e, n) => ({
|
|
57
|
-
id: "seat-reservation__place-button-" + n + "-" + e.number,
|
|
55
|
+
}, y = (e, n, o) => ({
|
|
56
|
+
id: "seat-reservation__place-button-" + n + "-" + o + "-" + e.number,
|
|
58
57
|
number: e.number,
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
58
|
+
deckIndex: n,
|
|
59
|
+
coachIndex: o,
|
|
60
|
+
state: e.state,
|
|
61
|
+
placeType: e.type
|
|
62
|
+
}), g = (e, n, o, a) => ({
|
|
63
|
+
id: "seat-reservation__place-button-" + o + "-" + a + "-" + e.number,
|
|
63
64
|
coachId: n.id,
|
|
64
65
|
coachNumber: n.number,
|
|
65
|
-
coachIndex:
|
|
66
|
+
coachIndex: a,
|
|
67
|
+
deckIndex: o,
|
|
66
68
|
placeNumber: e.number,
|
|
67
69
|
placeType: e.type,
|
|
68
70
|
placeTravelClass: e.travelClass || "ANY_CLASS",
|
|
69
71
|
propertyIds: e.propertyIds || []
|
|
70
|
-
}), b = (e, n) => ({
|
|
72
|
+
}), b = (e, n, o) => ({
|
|
71
73
|
coachId: n.id,
|
|
72
74
|
coachNumber: n.number,
|
|
73
75
|
coachIndex: e,
|
|
74
76
|
coachType: n?.type,
|
|
75
77
|
coachTravelClass: n?.travelClass,
|
|
76
|
-
coachPropertyIds: n?.propertyIds
|
|
78
|
+
coachPropertyIds: n?.propertyIds,
|
|
79
|
+
coachNumberOfFreePlaces: o
|
|
77
80
|
});
|
|
78
81
|
export {
|
|
79
82
|
b as mapCoachInfosToCoachSelection,
|
|
@@ -222,4 +222,117 @@ export declare const MOCK_COACHES_RAW_REAL_DATA: {
|
|
|
222
222
|
}[];
|
|
223
223
|
};
|
|
224
224
|
}[];
|
|
225
|
+
export declare const MOCK_GIRUNO_TRAIN: {
|
|
226
|
+
vehicleType: string;
|
|
227
|
+
deckCoachIndex: number;
|
|
228
|
+
coachItems: ({
|
|
229
|
+
id: string;
|
|
230
|
+
number: string;
|
|
231
|
+
dimension: {
|
|
232
|
+
w: number;
|
|
233
|
+
h: number;
|
|
234
|
+
};
|
|
235
|
+
places: {
|
|
236
|
+
number: string;
|
|
237
|
+
state: string;
|
|
238
|
+
type: string;
|
|
239
|
+
travelClass: string;
|
|
240
|
+
remarkId: string;
|
|
241
|
+
propertyIds: string[];
|
|
242
|
+
selected: boolean;
|
|
243
|
+
rotation: number;
|
|
244
|
+
dimension: {
|
|
245
|
+
w: number;
|
|
246
|
+
h: number;
|
|
247
|
+
};
|
|
248
|
+
position: {
|
|
249
|
+
x: number;
|
|
250
|
+
y: number;
|
|
251
|
+
z: number;
|
|
252
|
+
};
|
|
253
|
+
}[];
|
|
254
|
+
serviceElements: {
|
|
255
|
+
icon: string;
|
|
256
|
+
dimension: {
|
|
257
|
+
w: number;
|
|
258
|
+
h: number;
|
|
259
|
+
};
|
|
260
|
+
position: {
|
|
261
|
+
x: number;
|
|
262
|
+
y: number;
|
|
263
|
+
z: number;
|
|
264
|
+
};
|
|
265
|
+
}[];
|
|
266
|
+
graphicElements: {
|
|
267
|
+
icon: string;
|
|
268
|
+
dimension: {
|
|
269
|
+
w: number;
|
|
270
|
+
h: number;
|
|
271
|
+
};
|
|
272
|
+
position: {
|
|
273
|
+
x: number;
|
|
274
|
+
y: number;
|
|
275
|
+
z: number;
|
|
276
|
+
};
|
|
277
|
+
rotation: number;
|
|
278
|
+
}[];
|
|
279
|
+
travelClass: string[];
|
|
280
|
+
propertyIds: string[];
|
|
281
|
+
type?: undefined;
|
|
282
|
+
} | {
|
|
283
|
+
id: string;
|
|
284
|
+
number: string;
|
|
285
|
+
dimension: {
|
|
286
|
+
w: number;
|
|
287
|
+
h: number;
|
|
288
|
+
};
|
|
289
|
+
places: {
|
|
290
|
+
number: string;
|
|
291
|
+
state: string;
|
|
292
|
+
type: string;
|
|
293
|
+
travelClass: string;
|
|
294
|
+
remarkId: string;
|
|
295
|
+
propertyIds: never[];
|
|
296
|
+
selected: boolean;
|
|
297
|
+
rotation: number;
|
|
298
|
+
dimension: {
|
|
299
|
+
w: number;
|
|
300
|
+
h: number;
|
|
301
|
+
};
|
|
302
|
+
position: {
|
|
303
|
+
x: number;
|
|
304
|
+
y: number;
|
|
305
|
+
z: number;
|
|
306
|
+
};
|
|
307
|
+
}[];
|
|
308
|
+
serviceElements: {
|
|
309
|
+
icon: string;
|
|
310
|
+
dimension: {
|
|
311
|
+
w: number;
|
|
312
|
+
h: number;
|
|
313
|
+
};
|
|
314
|
+
position: {
|
|
315
|
+
x: number;
|
|
316
|
+
y: number;
|
|
317
|
+
z: number;
|
|
318
|
+
};
|
|
319
|
+
}[];
|
|
320
|
+
graphicElements: {
|
|
321
|
+
icon: string;
|
|
322
|
+
dimension: {
|
|
323
|
+
w: number;
|
|
324
|
+
h: number;
|
|
325
|
+
};
|
|
326
|
+
position: {
|
|
327
|
+
x: number;
|
|
328
|
+
y: number;
|
|
329
|
+
z: number;
|
|
330
|
+
};
|
|
331
|
+
rotation: number;
|
|
332
|
+
}[];
|
|
333
|
+
travelClass: string[];
|
|
334
|
+
propertyIds: string[];
|
|
335
|
+
type: string;
|
|
336
|
+
})[];
|
|
337
|
+
};
|
|
225
338
|
//# sourceMappingURL=seat-reservation-sample-data.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"seat-reservation-sample-data.d.ts","sourceRoot":"","sources":["../../../../../src/elements-experimental/seat-reservation/common/mapper/seat-reservation-sample-data.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"seat-reservation-sample-data.d.ts","sourceRoot":"","sources":["../../../../../src/elements-experimental/seat-reservation/common/mapper/seat-reservation-sample-data.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyjT9B,CAAC;AAEF,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0hB9B,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4yBtC,CAAC;AAEF,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA24nB7B,CAAC"}
|