@mapsindoors/map-template 1.12.0-rc.3 → 1.12.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 (73) hide show
  1. package/package.json +1 -1
  2. package/dist/combo-box-item.entry-04f0e546.mjs +0 -12
  3. package/dist/combo-box-item.entry-f1f36e49.mjs +0 -14
  4. package/dist/mi-card_2.entry-112d6cec.mjs +0 -25
  5. package/dist/mi-card_2.entry-138c7653.mjs +0 -23
  6. package/dist/mi-chip.entry-3a9b51dd.mjs +0 -16
  7. package/dist/mi-chip.entry-b0cb0da5.mjs +0 -18
  8. package/dist/mi-column.entry-e8b74502.mjs +0 -20
  9. package/dist/mi-column.entry-fe197b13.mjs +0 -18
  10. package/dist/mi-combo-box.entry-5776c4cc.mjs +0 -260
  11. package/dist/mi-combo-box.entry-b23feef3.mjs +0 -262
  12. package/dist/mi-data-table.entry-0d04f901.mjs +0 -215
  13. package/dist/mi-data-table.entry-ff82dd01.mjs +0 -213
  14. package/dist/mi-distance_2.entry-80019828.mjs +0 -56
  15. package/dist/mi-distance_2.entry-c18ff16b.mjs +0 -54
  16. package/dist/mi-dropdown-item.entry-63c41efc.mjs +0 -14
  17. package/dist/mi-dropdown-item.entry-bb3d99f0.mjs +0 -12
  18. package/dist/mi-dropdown.entry-870fa8de.mjs +0 -296
  19. package/dist/mi-dropdown.entry-adcf21a7.mjs +0 -298
  20. package/dist/mi-floor-selector.entry-6b91f5fc.mjs +0 -110
  21. package/dist/mi-floor-selector.entry-9a4296ba.mjs +0 -112
  22. package/dist/mi-keyboard.entry-668f536d.mjs +0 -2960
  23. package/dist/mi-keyboard.entry-b0c17b79.mjs +0 -2962
  24. package/dist/mi-list-item-category.entry-b2884dba.mjs +0 -38
  25. package/dist/mi-list-item-category.entry-b9536a7c.mjs +0 -36
  26. package/dist/mi-list-item-location.entry-ab46e53a.mjs +0 -134
  27. package/dist/mi-list-item-location.entry-d34a5690.mjs +0 -136
  28. package/dist/mi-list.entry-40b86f7f.mjs +0 -39
  29. package/dist/mi-list.entry-f9fdb0da.mjs +0 -41
  30. package/dist/mi-location-booking.entry-0f7f2812.mjs +0 -4863
  31. package/dist/mi-location-booking.entry-32cb574a.mjs +0 -4865
  32. package/dist/mi-location-info.entry-5cc2e91c.mjs +0 -31
  33. package/dist/mi-location-info.entry-c0cc0b69.mjs +0 -29
  34. package/dist/mi-map-googlemaps.entry-46829aaa.mjs +0 -398
  35. package/dist/mi-map-googlemaps.entry-e559c0dc.mjs +0 -396
  36. package/dist/mi-map-mapbox.entry-2c18333b.mjs +0 -300
  37. package/dist/mi-map-mapbox.entry-68c783cf.mjs +0 -298
  38. package/dist/mi-metric-card.entry-2f6981e7.mjs +0 -26
  39. package/dist/mi-metric-card.entry-7e16c8f8.mjs +0 -28
  40. package/dist/mi-my-position.entry-23e243aa.mjs +0 -1395
  41. package/dist/mi-my-position.entry-5a94c83d.mjs +0 -1393
  42. package/dist/mi-notification.entry-401c9cb9.mjs +0 -81
  43. package/dist/mi-notification.entry-4d06c318.mjs +0 -83
  44. package/dist/mi-route-instructions-heading.entry-8f5eaa1d.mjs +0 -74
  45. package/dist/mi-route-instructions-heading.entry-f3b4f871.mjs +0 -72
  46. package/dist/mi-route-instructions-maneuver-legacy.entry-66dad3ef.mjs +0 -75
  47. package/dist/mi-route-instructions-maneuver-legacy.entry-8ffeb735.mjs +0 -73
  48. package/dist/mi-route-instructions-maneuver.entry-24bcf67d.mjs +0 -75
  49. package/dist/mi-route-instructions-maneuver.entry-703bbcd9.mjs +0 -73
  50. package/dist/mi-route-instructions-step-legacy.entry-27a5fe00.mjs +0 -199
  51. package/dist/mi-route-instructions-step-legacy.entry-cf34cec4.mjs +0 -201
  52. package/dist/mi-route-instructions-step.entry-c3beb0c0.mjs +0 -234
  53. package/dist/mi-route-instructions-step.entry-e8a13502.mjs +0 -236
  54. package/dist/mi-route-instructions.entry-d9cabf3f.mjs +0 -142
  55. package/dist/mi-route-instructions.entry-fd85a9a4.mjs +0 -140
  56. package/dist/mi-scroll-buttons.entry-7666d055.mjs +0 -48
  57. package/dist/mi-scroll-buttons.entry-c069579b.mjs +0 -46
  58. package/dist/mi-search.entry-5e428c8e.mjs +0 -209
  59. package/dist/mi-search.entry-7ad753cf.mjs +0 -207
  60. package/dist/mi-share-sms.entry-25262279.mjs +0 -53
  61. package/dist/mi-share-sms.entry-33766d61.mjs +0 -55
  62. package/dist/mi-step-switcher.entry-81d295f8.mjs +0 -24
  63. package/dist/mi-step-switcher.entry-95ade6f3.mjs +0 -26
  64. package/dist/mi-tab-panel.entry-8c9b016e.mjs +0 -19
  65. package/dist/mi-tab-panel.entry-d77c094f.mjs +0 -21
  66. package/dist/mi-tab.entry-458faa22.mjs +0 -11
  67. package/dist/mi-tab.entry-d45194c0.mjs +0 -13
  68. package/dist/mi-tabs.entry-94ef09f5.mjs +0 -34
  69. package/dist/mi-tabs.entry-a78c550d.mjs +0 -36
  70. package/dist/mi-time.entry-c35e476f.mjs +0 -43
  71. package/dist/mi-time.entry-cae11551.mjs +0 -45
  72. package/dist/reactcomponent-0e140537.mjs +0 -31717
  73. package/dist/webcomponent-592597b2.mjs +0 -36391
@@ -1,199 +0,0 @@
1
- import { r as n, c as r, h as e } from "./webcomponent-592597b2.mjs";
2
- import { U as o } from "./unit-system.enum-eaefb53e-0f424da4.mjs";
3
- import { c as l } from "./utils-ae714467-b07fc3be.mjs";
4
- const p = ':host{display:block;font-family:Figtree, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"}.step{display:grid;grid-template-columns:40px 1fr 40px;grid-template-areas:"actionicon heading heading" "modeicon description toggle" "modeicon substeps substeps"}.step__action-icon{-ms-grid-row:1;-ms-grid-column:1;display:flex;justify-content:center;align-items:center;grid-area:actionicon}.step__action-icon--circled{position:relative}.step__action-icon--circled::before{position:absolute;width:24px;height:24px;border:1px solid #1c1917;content:"";border-radius:50%}.step__action-icon mi-icon{display:block;width:12px;height:12px}.step__heading{-ms-grid-row:1;-ms-grid-column:2;-ms-grid-column-span:2;grid-area:heading;font-size:1rem;margin:0;border-bottom:1px solid #DCDCDF;border-top:1px solid #DCDCDF;padding:12px}.step__heading>span{font-size:0.875rem;color:#6b7280}.step__travel-mode{-ms-grid-row:2;-ms-grid-row-span:2;-ms-grid-column:1;grid-area:modeicon;display:flex;justify-content:center;align-items:center;position:relative;min-height:72px}.step__travel-mode::before{position:absolute;width:calc(50% - 2px);left:0;height:100%;content:""}.step__travel-mode--dotted::before{border-right:4px dotted #bfdbfe}.step__travel-mode--solid::before{border-right:4px solid #bfdbfe}.step__travel-mode-icon{position:absolute;left:50%;top:24px;transform:translateX(-50%);background-color:#fcfcfc;padding:3px;border-radius:4px}.step__travel-mode-icon mi-icon{width:16px;height:16px;background-color:#6b7280;display:block}.step__description{-ms-grid-row:2;-ms-grid-column:2;grid-area:description;padding:12px}.step__short-name{margin-right:4px;padding:2px 4px;font-size:0.875rem;color:#fcfcfc;background-color:#6b7280;border-radius:2px}.step__distance-duration{color:#6b7280;font-size:0.875rem}.step__toggle{-ms-grid-row:2;-ms-grid-column:3;grid-area:toggle;display:flex;justify-content:center;align-items:center;transition:transform 300ms;cursor:pointer}.step__toggle--open{transform:rotate(180deg)}.step__toggle mi-icon{width:16px;height:16px;display:block;background-color:#3b82f6}.step__substeps{-ms-grid-row:3;-ms-grid-column:2;-ms-grid-column-span:2;grid-area:substeps}', d = class {
5
- constructor(t) {
6
- n(this, t), this.stepClicked = r(this, "stepClicked", 7), this.isInternetExplorer = l(), this.step = void 0, this.stepData = void 0, this.hideIndoorSubsteps = !0, this.fromRouteContext = "", this.fromTravelMode = void 0, this.fromTransitStop = void 0, this.unit = o.Metric, this.translations = void 0, this.translationsData = void 0, this.substepsAreOpen = !1;
7
- }
8
- parseStepProp() {
9
- this.step && (this.stepData = JSON.parse(this.step));
10
- }
11
- parseTranslationsProp() {
12
- this.translations && (this.translationsData = JSON.parse(this.translations));
13
- }
14
- componentWillLoad() {
15
- this.parseStepProp(), this.parseTranslationsProp();
16
- }
17
- /**
18
- * Render if there is step data.
19
- */
20
- render() {
21
- return this.stepData && this.translationsData ? this.renderStep() : null;
22
- }
23
- /**
24
- * Emits stepClicked event (if click target is not related to an action)
25
- * @param event Event
26
- */
27
- stepClickHandler(t) {
28
- if (Array.from(t.target.classList).includes("icon-toggle"))
29
- return;
30
- let s = null;
31
- t.target.dataset.maneuverIndex !== void 0 && (s = parseInt(t.target.dataset.maneuverIndex)), this.stepClicked.emit({ maneuverIndex: s });
32
- }
33
- /**
34
- * Render step part depending on travel mode.
35
- *
36
- * @returns {JSX.Element}
37
- */
38
- renderStep() {
39
- switch (this.stepData.travel_mode.toUpperCase()) {
40
- case "DRIVING":
41
- return this.renderDrivingStep();
42
- case "WALKING":
43
- return this.renderWalkingStep();
44
- case "BICYCLING":
45
- return this.renderBicyclingStep();
46
- case "TRANSIT":
47
- return this.renderTransitStep();
48
- default:
49
- return e("div", null, "Unknown travel mode: ", this.stepData.travel_mode);
50
- }
51
- }
52
- /**
53
- * Render the travel mode indicator and dotted/solid line.
54
- *
55
- * @returns {JSX.Element}
56
- */
57
- renderTravelMode() {
58
- if (this.isInternetExplorer)
59
- return null;
60
- let t;
61
- switch (this.stepData.travel_mode.toUpperCase()) {
62
- case "DRIVING":
63
- t = "car";
64
- break;
65
- case "WALKING":
66
- t = "walk";
67
- break;
68
- case "BICYCLING":
69
- t = "bike";
70
- break;
71
- case "TRANSIT":
72
- t = this.getTransitVehicleIconName();
73
- break;
74
- }
75
- return e("span", { part: "step-travel-mode", class: `step__travel-mode step__travel-mode--${this.stepData.travel_mode.toUpperCase() === "TRANSIT" ? "solid" : "dotted"}` }, e("span", { class: "step__travel-mode-icon" }, e("mi-icon", { part: "step-travel-mode-icon", "icon-name": t })));
76
- }
77
- /**
78
- * Get icon name for transit vehicle.
79
- *
80
- * @returns {string}
81
- */
82
- getTransitVehicleIconName() {
83
- var t, s;
84
- const i = (s = (t = this.stepData.transit_information) === null || t === void 0 ? void 0 : t.line.vehicle) === null || s === void 0 ? void 0 : s.type.toLowerCase();
85
- return i && ["boat", "bus", "railway", "train", "subway"].some((a) => a === i) ? i : "transit";
86
- }
87
- /**
88
- * Toggles visibility of sub steps (steps in steps)
89
- */
90
- toggleSubsteps() {
91
- this.substepsAreOpen = !this.substepsAreOpen;
92
- }
93
- /**
94
- * Render substeps if they should be visible.
95
- *
96
- * @returns {JSX.Element}
97
- */
98
- renderSubsteps() {
99
- return this.substepsAreOpen === !0 ? e("div", { class: "step__substeps" }, this.stepData.steps.map((t, s) => e("mi-route-instructions-maneuver-legacy", {
100
- "data-maneuver-index": s,
101
- maneuver: JSON.stringify(t),
102
- translations: this.translations,
103
- unit: this.unit,
104
- // @ts-ignore
105
- exportparts: `
106
- maneuver-icon,
107
- maneuver-description,
108
- maneuver-description-distance,
109
- maneuver-description-distance-border`
110
- }))) : null;
111
- }
112
- /**
113
- * Render the toggle button for the sub step expander.
114
- *
115
- * @returns {JSX.Element}
116
- */
117
- renderToggleButton() {
118
- return this.stepData.steps.length <= 0 || this.hideIndoorSubsteps === !0 && this.stepData.route_context.toLowerCase() === "insidebuilding" ? null : e("span", { class: `step__toggle ${this.substepsAreOpen ? "step__toggle--open" : ""}`, onClick: () => this.toggleSubsteps() }, this.isInternetExplorer ? "▼" : e("mi-icon", { part: "step-toggle", "icon-name": "toggle" }));
119
- }
120
- /**
121
- * Render time and distance part.
122
- *
123
- * @returns {JSX.Element}
124
- */
125
- renderTimeAndDistance() {
126
- return e("span", { part: "step-info", class: "step__distance-duration" }, e("mi-time", { seconds: this.stepData.duration.value, translations: `{"days":"${this.translationsData.days}","hours":"${this.translationsData.hours}","minutes":"${this.translationsData.minutes}"}` }), " · ", e("mi-distance", { meters: this.stepData.distance.value, unit: this.unit }), e("br", null));
127
- }
128
- /**
129
- * Render a driving step.
130
- *
131
- * @returns {JSX.Element}
132
- */
133
- renderDrivingStep() {
134
- return e("div", { class: "step", onClick: (t) => this.stepClickHandler(t) }, this.isInternetExplorer ? null : e("span", { class: "step__action-icon step__action-icon--circled" }, e("mi-icon", { "icon-name": "car" })), e("h3", { part: "step-heading", class: "step__heading" }, this.getStepHeading()), this.renderTravelMode(), e("div", { part: "step-description", class: "step__description" }, this.translationsData.drive, e("br", null), this.renderTimeAndDistance()), this.renderToggleButton(), this.renderSubsteps());
135
- }
136
- /**
137
- * Get display heading.
138
- *
139
- * @returns {string}
140
- */
141
- getStepHeading() {
142
- var t;
143
- const s = {
144
- driving: this.translationsData.drive,
145
- walking: this.translationsData.walk,
146
- bicycling: this.translationsData.bike
147
- };
148
- return !((t = this.stepData.steps[0]) === null || t === void 0) && t.instructions ? this.stepData.steps[0].instructions : s[this.stepData.travel_mode.toLowerCase()];
149
- }
150
- /**
151
- * Render a walking step.
152
- *
153
- *
154
- * @returns {JSX.Element}
155
- */
156
- renderWalkingStep() {
157
- let t, s;
158
- return this.stepData.parking === !0 ? (t = `${this.translationsData.park} ${this.stepData.label ? ` ${this.translationsData.at} ` + this.stepData.label : ""}`, s = "park") : this.stepData.highway && this.stepData.highway.toUpperCase() === "STEPS" ? (t = `${this.translationsData.takeStaircaseToLevel} ${this.stepData.end_location.floor_name}`, s = "stairs") : this.stepData.highway && this.stepData.highway.toUpperCase() === "LADDER" ? (t = `${this.translationsData.takeLadderToLevel} ${this.stepData.end_location.floor_name}`, s = "ladder") : this.stepData.highway && this.stepData.highway.toUpperCase() === "ESCALATOR" ? (t = `${this.translationsData.takeEscalatorToLevel} ${this.stepData.end_location.floor_name}`, s = "escalator") : this.stepData.highway && this.stepData.highway.toUpperCase() === "WHEELCHAIRRAMP" ? (t = `${this.translationsData.takeWheelchairRampToLevel} ${this.stepData.end_location.floor_name}`, s = "wheelchair-ramp") : this.stepData.highway && this.stepData.highway.toUpperCase() === "WHEELCHAIRLIFT" ? (t = `${this.translationsData.takeWheelchairLiftToLevel} ${this.stepData.end_location.floor_name}`, s = "wheelchair-lift") : this.stepData.highway && this.stepData.highway.toUpperCase() === "ELEVATOR" ? (t = `${this.translationsData.takeElevatorToLevel} ${this.stepData.end_location.floor_name}`, s = "elevator") : this.fromRouteContext === "InsideBuilding" && this.stepData.route_context === "Outside" ? (t = this.addStepContextNameToHeading(this.translationsData.exit, this.stepData.start_context), s = "exit") : this.fromRouteContext === "InsideBuilding" && this.stepData.route_context === "InsideBuilding" ? (t = this.getStepHeading(), s = "walk") : this.fromRouteContext === "Outside" && this.stepData.route_context === "Outside" && this.fromTravelMode.toUpperCase() === "TRANSIT" ? (t = this.fromTransitStop, s = "transit-stop") : this.fromRouteContext === "Outside" && this.stepData.route_context === "Outside" ? (t = this.getStepHeading(), s = "walk") : this.fromRouteContext === "Outside" && this.stepData.route_context === "InsideBuilding" ? (t = this.addStepContextNameToHeading(this.translationsData.enter, this.stepData.end_context), s = "enter") : (t = this.fromRouteContext, s = "circle"), e("div", { class: "step", onClick: (i) => this.stepClickHandler(i) }, this.isInternetExplorer ? null : e("span", { class: `step__action-icon ${s !== "circle" ? "step__action-icon--circled" : ""}` }, e("mi-icon", { "icon-name": s })), e("h3", { part: "step-heading", class: "step__heading" }, t), this.renderTravelMode(), e("div", { part: "step-description", class: "step__description" }, this.translationsData.walk, e("br", null), this.renderTimeAndDistance()), this.renderToggleButton(), this.renderSubsteps());
159
- }
160
- /**
161
- * Add building or venue name to the step heading
162
- * @param {string} heading
163
- * @param {StepContext} stepContext
164
- * @returns
165
- */
166
- addStepContextNameToHeading(t, s) {
167
- return s && (s.building ? t += ` ${s.building.buildingInfo.name} ${this.translationsData.building}` : s.venue && (t += ` ${s.venue.venueInfo.name} ${this.translationsData.venue}`)), t;
168
- }
169
- /**
170
- * Render a bicycling step.
171
- *
172
- * @returns {JSX.Element}
173
- */
174
- renderBicyclingStep() {
175
- return e("div", { class: "step", onClick: (t) => this.stepClickHandler(t) }, this.isInternetExplorer ? null : e("span", { class: "step__action-icon step__action-icon--circled" }, e("mi-icon", { "icon-name": "bike" })), e("h3", { part: "step-heading", class: "step__heading" }, this.getStepHeading()), this.renderTravelMode(), e("div", { part: "step-description", class: "step__description" }, this.translationsData.bike, e("br", null), this.renderTimeAndDistance()), this.renderToggleButton(), this.renderSubsteps());
176
- }
177
- /**
178
- * Render a transit step.
179
- *
180
- * @returns {JSX.Element}
181
- */
182
- renderTransitStep() {
183
- var t, s;
184
- return e("div", { class: "step", onClick: (i) => this.stepClickHandler(i) }, this.isInternetExplorer ? null : e("span", { class: "step__action-icon step__action-icon--circled" }, e("mi-icon", { "icon-name": "transit-stop" })), e("h3", { part: "step-heading", class: "step__heading" }, this.stepData.instructions), this.renderTravelMode(), e("div", { part: "step-description", class: "step__description" }, this.stepData.transit_information.line.short_name ? e("span", { class: "step__short-name", style: {
185
- backgroundColor: !((t = this.stepData.transit_information.line) === null || t === void 0) && t.color ? this.stepData.transit_information.line.color : null,
186
- color: !((s = this.stepData.transit_information.line) === null || s === void 0) && s.text_color ? this.stepData.transit_information.line.text_color : null
187
- } }, this.stepData.transit_information.line.short_name) : null, this.stepData.transit_information.headsign ? this.stepData.transit_information.headsign : null, e("br", null), e("span", { part: "step-info", class: "step__distance-duration" }, e("mi-time", { seconds: this.stepData.duration.value, translations: `{"days":"${this.translationsData.days}","hours":"${this.translationsData.hours}","minutes":"${this.translationsData.minutes}"}` }), " · ", this.stepData.transit_information.num_stops ? this.stepData.transit_information.num_stops : null, " ", this.translationsData.stops ? this.translationsData.stops : null)), this.renderToggleButton(), this.renderSubsteps());
188
- }
189
- static get watchers() {
190
- return {
191
- step: ["parseStepProp"],
192
- translations: ["parseTranslationsProp"]
193
- };
194
- }
195
- };
196
- d.style = p;
197
- export {
198
- d as mi_route_instructions_step_legacy
199
- };
@@ -1,201 +0,0 @@
1
- import { r as n, c as r, h as e } from "./reactcomponent-0e140537.mjs";
2
- import { U as o } from "./unit-system.enum-eaefb53e-0f424da4.mjs";
3
- import { c as l } from "./utils-ae714467-b07fc3be.mjs";
4
- import "react";
5
- import "react-dom";
6
- const p = ':host{display:block;font-family:Figtree, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"}.step{display:grid;grid-template-columns:40px 1fr 40px;grid-template-areas:"actionicon heading heading" "modeicon description toggle" "modeicon substeps substeps"}.step__action-icon{-ms-grid-row:1;-ms-grid-column:1;display:flex;justify-content:center;align-items:center;grid-area:actionicon}.step__action-icon--circled{position:relative}.step__action-icon--circled::before{position:absolute;width:24px;height:24px;border:1px solid #1c1917;content:"";border-radius:50%}.step__action-icon mi-icon{display:block;width:12px;height:12px}.step__heading{-ms-grid-row:1;-ms-grid-column:2;-ms-grid-column-span:2;grid-area:heading;font-size:1rem;margin:0;border-bottom:1px solid #DCDCDF;border-top:1px solid #DCDCDF;padding:12px}.step__heading>span{font-size:0.875rem;color:#6b7280}.step__travel-mode{-ms-grid-row:2;-ms-grid-row-span:2;-ms-grid-column:1;grid-area:modeicon;display:flex;justify-content:center;align-items:center;position:relative;min-height:72px}.step__travel-mode::before{position:absolute;width:calc(50% - 2px);left:0;height:100%;content:""}.step__travel-mode--dotted::before{border-right:4px dotted #bfdbfe}.step__travel-mode--solid::before{border-right:4px solid #bfdbfe}.step__travel-mode-icon{position:absolute;left:50%;top:24px;transform:translateX(-50%);background-color:#fcfcfc;padding:3px;border-radius:4px}.step__travel-mode-icon mi-icon{width:16px;height:16px;background-color:#6b7280;display:block}.step__description{-ms-grid-row:2;-ms-grid-column:2;grid-area:description;padding:12px}.step__short-name{margin-right:4px;padding:2px 4px;font-size:0.875rem;color:#fcfcfc;background-color:#6b7280;border-radius:2px}.step__distance-duration{color:#6b7280;font-size:0.875rem}.step__toggle{-ms-grid-row:2;-ms-grid-column:3;grid-area:toggle;display:flex;justify-content:center;align-items:center;transition:transform 300ms;cursor:pointer}.step__toggle--open{transform:rotate(180deg)}.step__toggle mi-icon{width:16px;height:16px;display:block;background-color:#3b82f6}.step__substeps{-ms-grid-row:3;-ms-grid-column:2;-ms-grid-column-span:2;grid-area:substeps}', d = class {
7
- constructor(t) {
8
- n(this, t), this.stepClicked = r(this, "stepClicked", 7), this.isInternetExplorer = l(), this.step = void 0, this.stepData = void 0, this.hideIndoorSubsteps = !0, this.fromRouteContext = "", this.fromTravelMode = void 0, this.fromTransitStop = void 0, this.unit = o.Metric, this.translations = void 0, this.translationsData = void 0, this.substepsAreOpen = !1;
9
- }
10
- parseStepProp() {
11
- this.step && (this.stepData = JSON.parse(this.step));
12
- }
13
- parseTranslationsProp() {
14
- this.translations && (this.translationsData = JSON.parse(this.translations));
15
- }
16
- componentWillLoad() {
17
- this.parseStepProp(), this.parseTranslationsProp();
18
- }
19
- /**
20
- * Render if there is step data.
21
- */
22
- render() {
23
- return this.stepData && this.translationsData ? this.renderStep() : null;
24
- }
25
- /**
26
- * Emits stepClicked event (if click target is not related to an action)
27
- * @param event Event
28
- */
29
- stepClickHandler(t) {
30
- if (Array.from(t.target.classList).includes("icon-toggle"))
31
- return;
32
- let s = null;
33
- t.target.dataset.maneuverIndex !== void 0 && (s = parseInt(t.target.dataset.maneuverIndex)), this.stepClicked.emit({ maneuverIndex: s });
34
- }
35
- /**
36
- * Render step part depending on travel mode.
37
- *
38
- * @returns {JSX.Element}
39
- */
40
- renderStep() {
41
- switch (this.stepData.travel_mode.toUpperCase()) {
42
- case "DRIVING":
43
- return this.renderDrivingStep();
44
- case "WALKING":
45
- return this.renderWalkingStep();
46
- case "BICYCLING":
47
- return this.renderBicyclingStep();
48
- case "TRANSIT":
49
- return this.renderTransitStep();
50
- default:
51
- return e("div", null, "Unknown travel mode: ", this.stepData.travel_mode);
52
- }
53
- }
54
- /**
55
- * Render the travel mode indicator and dotted/solid line.
56
- *
57
- * @returns {JSX.Element}
58
- */
59
- renderTravelMode() {
60
- if (this.isInternetExplorer)
61
- return null;
62
- let t;
63
- switch (this.stepData.travel_mode.toUpperCase()) {
64
- case "DRIVING":
65
- t = "car";
66
- break;
67
- case "WALKING":
68
- t = "walk";
69
- break;
70
- case "BICYCLING":
71
- t = "bike";
72
- break;
73
- case "TRANSIT":
74
- t = this.getTransitVehicleIconName();
75
- break;
76
- }
77
- return e("span", { part: "step-travel-mode", class: `step__travel-mode step__travel-mode--${this.stepData.travel_mode.toUpperCase() === "TRANSIT" ? "solid" : "dotted"}` }, e("span", { class: "step__travel-mode-icon" }, e("mi-icon", { part: "step-travel-mode-icon", "icon-name": t })));
78
- }
79
- /**
80
- * Get icon name for transit vehicle.
81
- *
82
- * @returns {string}
83
- */
84
- getTransitVehicleIconName() {
85
- var t, s;
86
- const i = (s = (t = this.stepData.transit_information) === null || t === void 0 ? void 0 : t.line.vehicle) === null || s === void 0 ? void 0 : s.type.toLowerCase();
87
- return i && ["boat", "bus", "railway", "train", "subway"].some((a) => a === i) ? i : "transit";
88
- }
89
- /**
90
- * Toggles visibility of sub steps (steps in steps)
91
- */
92
- toggleSubsteps() {
93
- this.substepsAreOpen = !this.substepsAreOpen;
94
- }
95
- /**
96
- * Render substeps if they should be visible.
97
- *
98
- * @returns {JSX.Element}
99
- */
100
- renderSubsteps() {
101
- return this.substepsAreOpen === !0 ? e("div", { class: "step__substeps" }, this.stepData.steps.map((t, s) => e("mi-route-instructions-maneuver-legacy", {
102
- "data-maneuver-index": s,
103
- maneuver: JSON.stringify(t),
104
- translations: this.translations,
105
- unit: this.unit,
106
- // @ts-ignore
107
- exportparts: `
108
- maneuver-icon,
109
- maneuver-description,
110
- maneuver-description-distance,
111
- maneuver-description-distance-border`
112
- }))) : null;
113
- }
114
- /**
115
- * Render the toggle button for the sub step expander.
116
- *
117
- * @returns {JSX.Element}
118
- */
119
- renderToggleButton() {
120
- return this.stepData.steps.length <= 0 || this.hideIndoorSubsteps === !0 && this.stepData.route_context.toLowerCase() === "insidebuilding" ? null : e("span", { class: `step__toggle ${this.substepsAreOpen ? "step__toggle--open" : ""}`, onClick: () => this.toggleSubsteps() }, this.isInternetExplorer ? "▼" : e("mi-icon", { part: "step-toggle", "icon-name": "toggle" }));
121
- }
122
- /**
123
- * Render time and distance part.
124
- *
125
- * @returns {JSX.Element}
126
- */
127
- renderTimeAndDistance() {
128
- return e("span", { part: "step-info", class: "step__distance-duration" }, e("mi-time", { seconds: this.stepData.duration.value, translations: `{"days":"${this.translationsData.days}","hours":"${this.translationsData.hours}","minutes":"${this.translationsData.minutes}"}` }), " · ", e("mi-distance", { meters: this.stepData.distance.value, unit: this.unit }), e("br", null));
129
- }
130
- /**
131
- * Render a driving step.
132
- *
133
- * @returns {JSX.Element}
134
- */
135
- renderDrivingStep() {
136
- return e("div", { class: "step", onClick: (t) => this.stepClickHandler(t) }, this.isInternetExplorer ? null : e("span", { class: "step__action-icon step__action-icon--circled" }, e("mi-icon", { "icon-name": "car" })), e("h3", { part: "step-heading", class: "step__heading" }, this.getStepHeading()), this.renderTravelMode(), e("div", { part: "step-description", class: "step__description" }, this.translationsData.drive, e("br", null), this.renderTimeAndDistance()), this.renderToggleButton(), this.renderSubsteps());
137
- }
138
- /**
139
- * Get display heading.
140
- *
141
- * @returns {string}
142
- */
143
- getStepHeading() {
144
- var t;
145
- const s = {
146
- driving: this.translationsData.drive,
147
- walking: this.translationsData.walk,
148
- bicycling: this.translationsData.bike
149
- };
150
- return !((t = this.stepData.steps[0]) === null || t === void 0) && t.instructions ? this.stepData.steps[0].instructions : s[this.stepData.travel_mode.toLowerCase()];
151
- }
152
- /**
153
- * Render a walking step.
154
- *
155
- *
156
- * @returns {JSX.Element}
157
- */
158
- renderWalkingStep() {
159
- let t, s;
160
- return this.stepData.parking === !0 ? (t = `${this.translationsData.park} ${this.stepData.label ? ` ${this.translationsData.at} ` + this.stepData.label : ""}`, s = "park") : this.stepData.highway && this.stepData.highway.toUpperCase() === "STEPS" ? (t = `${this.translationsData.takeStaircaseToLevel} ${this.stepData.end_location.floor_name}`, s = "stairs") : this.stepData.highway && this.stepData.highway.toUpperCase() === "LADDER" ? (t = `${this.translationsData.takeLadderToLevel} ${this.stepData.end_location.floor_name}`, s = "ladder") : this.stepData.highway && this.stepData.highway.toUpperCase() === "ESCALATOR" ? (t = `${this.translationsData.takeEscalatorToLevel} ${this.stepData.end_location.floor_name}`, s = "escalator") : this.stepData.highway && this.stepData.highway.toUpperCase() === "WHEELCHAIRRAMP" ? (t = `${this.translationsData.takeWheelchairRampToLevel} ${this.stepData.end_location.floor_name}`, s = "wheelchair-ramp") : this.stepData.highway && this.stepData.highway.toUpperCase() === "WHEELCHAIRLIFT" ? (t = `${this.translationsData.takeWheelchairLiftToLevel} ${this.stepData.end_location.floor_name}`, s = "wheelchair-lift") : this.stepData.highway && this.stepData.highway.toUpperCase() === "ELEVATOR" ? (t = `${this.translationsData.takeElevatorToLevel} ${this.stepData.end_location.floor_name}`, s = "elevator") : this.fromRouteContext === "InsideBuilding" && this.stepData.route_context === "Outside" ? (t = this.addStepContextNameToHeading(this.translationsData.exit, this.stepData.start_context), s = "exit") : this.fromRouteContext === "InsideBuilding" && this.stepData.route_context === "InsideBuilding" ? (t = this.getStepHeading(), s = "walk") : this.fromRouteContext === "Outside" && this.stepData.route_context === "Outside" && this.fromTravelMode.toUpperCase() === "TRANSIT" ? (t = this.fromTransitStop, s = "transit-stop") : this.fromRouteContext === "Outside" && this.stepData.route_context === "Outside" ? (t = this.getStepHeading(), s = "walk") : this.fromRouteContext === "Outside" && this.stepData.route_context === "InsideBuilding" ? (t = this.addStepContextNameToHeading(this.translationsData.enter, this.stepData.end_context), s = "enter") : (t = this.fromRouteContext, s = "circle"), e("div", { class: "step", onClick: (i) => this.stepClickHandler(i) }, this.isInternetExplorer ? null : e("span", { class: `step__action-icon ${s !== "circle" ? "step__action-icon--circled" : ""}` }, e("mi-icon", { "icon-name": s })), e("h3", { part: "step-heading", class: "step__heading" }, t), this.renderTravelMode(), e("div", { part: "step-description", class: "step__description" }, this.translationsData.walk, e("br", null), this.renderTimeAndDistance()), this.renderToggleButton(), this.renderSubsteps());
161
- }
162
- /**
163
- * Add building or venue name to the step heading
164
- * @param {string} heading
165
- * @param {StepContext} stepContext
166
- * @returns
167
- */
168
- addStepContextNameToHeading(t, s) {
169
- return s && (s.building ? t += ` ${s.building.buildingInfo.name} ${this.translationsData.building}` : s.venue && (t += ` ${s.venue.venueInfo.name} ${this.translationsData.venue}`)), t;
170
- }
171
- /**
172
- * Render a bicycling step.
173
- *
174
- * @returns {JSX.Element}
175
- */
176
- renderBicyclingStep() {
177
- return e("div", { class: "step", onClick: (t) => this.stepClickHandler(t) }, this.isInternetExplorer ? null : e("span", { class: "step__action-icon step__action-icon--circled" }, e("mi-icon", { "icon-name": "bike" })), e("h3", { part: "step-heading", class: "step__heading" }, this.getStepHeading()), this.renderTravelMode(), e("div", { part: "step-description", class: "step__description" }, this.translationsData.bike, e("br", null), this.renderTimeAndDistance()), this.renderToggleButton(), this.renderSubsteps());
178
- }
179
- /**
180
- * Render a transit step.
181
- *
182
- * @returns {JSX.Element}
183
- */
184
- renderTransitStep() {
185
- var t, s;
186
- return e("div", { class: "step", onClick: (i) => this.stepClickHandler(i) }, this.isInternetExplorer ? null : e("span", { class: "step__action-icon step__action-icon--circled" }, e("mi-icon", { "icon-name": "transit-stop" })), e("h3", { part: "step-heading", class: "step__heading" }, this.stepData.instructions), this.renderTravelMode(), e("div", { part: "step-description", class: "step__description" }, this.stepData.transit_information.line.short_name ? e("span", { class: "step__short-name", style: {
187
- backgroundColor: !((t = this.stepData.transit_information.line) === null || t === void 0) && t.color ? this.stepData.transit_information.line.color : null,
188
- color: !((s = this.stepData.transit_information.line) === null || s === void 0) && s.text_color ? this.stepData.transit_information.line.text_color : null
189
- } }, this.stepData.transit_information.line.short_name) : null, this.stepData.transit_information.headsign ? this.stepData.transit_information.headsign : null, e("br", null), e("span", { part: "step-info", class: "step__distance-duration" }, e("mi-time", { seconds: this.stepData.duration.value, translations: `{"days":"${this.translationsData.days}","hours":"${this.translationsData.hours}","minutes":"${this.translationsData.minutes}"}` }), " · ", this.stepData.transit_information.num_stops ? this.stepData.transit_information.num_stops : null, " ", this.translationsData.stops ? this.translationsData.stops : null)), this.renderToggleButton(), this.renderSubsteps());
190
- }
191
- static get watchers() {
192
- return {
193
- step: ["parseStepProp"],
194
- translations: ["parseTranslationsProp"]
195
- };
196
- }
197
- };
198
- d.style = p;
199
- export {
200
- d as mi_route_instructions_step_legacy
201
- };
@@ -1,234 +0,0 @@
1
- import { r as o, c as a, h as e } from "./webcomponent-592597b2.mjs";
2
- import { U as n } from "./unit-system.enum-eaefb53e-0f424da4.mjs";
3
- import { c as p } from "./utils-ae714467-b07fc3be.mjs";
4
- const l = ':host{display:block;font-family:Figtree, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"}.step{display:grid;gap:8px;justify-items:center}.step__info{display:grid;grid-auto-flow:column;gap:8px;align-items:center}.step__info.destination{grid-auto-flow:row;justify-items:center}.step__destination{display:grid;gap:8px;align-items:center;justify-content:center;grid-auto-flow:column}.step__action-icon--circled{position:relative}.step__action-icon mi-icon{display:block;width:40px;height:40px}.step__heading{font-size:1.25rem;margin:0}.step__heading>span{font-size:0.875rem;color:#6b7280}.step__travel-mode{display:flex;justify-content:center;align-items:center;position:relative;min-height:72px}.step__travel-mode::before{position:absolute;width:calc(50% - 2px);left:0;height:100%;content:""}.step__travel-mode--dotted::before{border-right:4px dotted #bfdbfe}.step__travel-mode--solid::before{border-right:4px solid #bfdbfe}.step__travel-mode-icon{position:absolute;left:50%;top:24px;transform:translateX(-50%);background-color:#fcfcfc;padding:3px;border-radius:4px}.step__travel-mode-icon mi-icon{width:16px;height:16px;background-color:#6b7280;display:block}.step__short-name{margin-right:4px;padding:2px 4px;font-size:0.875rem;color:#fcfcfc;background-color:#6b7280;border-radius:2px}.step__distance-duration{color:#6b7280;font-size:0.875rem}.step__toggle{display:grid;justify-content:center}.step__toggle mi-icon{width:24px;height:24px;display:block}.step__substeps{display:grid;gap:32px}.step__details{display:grid;gap:24px;width:100%}', d = class {
5
- constructor(t) {
6
- o(this, t), this.stepClicked = a(this, "stepClicked", 7), this.substepsToggled = a(this, "substepsToggled", 7), this.isInternetExplorer = p(), this.step = void 0, this.stepData = void 0, this.hideIndoorSubsteps = !0, this.fromRouteContext = "", this.fromTravelMode = void 0, this.fromTransitStop = void 0, this.destinationLocation = void 0, this.unit = navigator.language === "en-US" ? n.Imperial : n.Metric, this.translations = void 0, this.translationsData = void 0, this.substepsAreOpen = !1;
7
- }
8
- parseStepProp() {
9
- this.step && (this.stepData = JSON.parse(this.step));
10
- }
11
- parseTranslationsProp() {
12
- this.translations && (this.translationsData = JSON.parse(this.translations));
13
- }
14
- /**
15
- * Programmatically open the substeps.
16
- */
17
- openSubsteps() {
18
- this.substepsAreOpen = !0;
19
- }
20
- /**
21
- * Programmatically close the substeps.
22
- */
23
- closeSubsteps() {
24
- this.substepsAreOpen = !1;
25
- }
26
- componentWillLoad() {
27
- this.parseStepProp(), this.parseTranslationsProp();
28
- }
29
- /**
30
- * Render if there is step data.
31
- */
32
- render() {
33
- return this.stepData && this.translationsData ? this.renderStep() : null;
34
- }
35
- /**
36
- * Emits stepClicked event (if click target is not related to an action)
37
- * @param event Event
38
- */
39
- stepClickHandler(t) {
40
- if (Array.from(t.target.classList).includes("icon-toggle"))
41
- return;
42
- let s = null;
43
- t.target.dataset.maneuverIndex !== void 0 && (s = parseInt(t.target.dataset.maneuverIndex)), this.stepClicked.emit({ maneuverIndex: s });
44
- }
45
- /**
46
- * Render step part depending on travel mode.
47
- *
48
- * @returns {JSX.Element}
49
- */
50
- renderStep() {
51
- switch (this.stepData.travel_mode.toUpperCase()) {
52
- case "DRIVING":
53
- return this.renderDrivingStep();
54
- case "WALKING":
55
- return this.renderWalkingStep();
56
- case "BICYCLING":
57
- return this.renderBicyclingStep();
58
- case "TRANSIT":
59
- return this.renderTransitStep();
60
- case "DESTINATION":
61
- return this.renderDestinationStep();
62
- default:
63
- return e("div", null, "Unknown travel mode: ", this.stepData.travel_mode);
64
- }
65
- }
66
- /**
67
- * Render the travel mode indicator and dotted/solid line.
68
- *
69
- * @returns {JSX.Element}
70
- */
71
- renderTravelMode() {
72
- if (this.isInternetExplorer)
73
- return null;
74
- let t;
75
- switch (this.stepData.travel_mode.toUpperCase()) {
76
- case "DRIVING":
77
- t = "car";
78
- break;
79
- case "WALKING":
80
- t = "walk";
81
- break;
82
- case "BICYCLING":
83
- t = "bike";
84
- break;
85
- case "TRANSIT":
86
- t = this.getTransitVehicleIconName();
87
- break;
88
- case "DESTINATION":
89
- t = "logo";
90
- break;
91
- }
92
- return e("span", { part: "step-travel-mode", class: `step__travel-mode step__travel-mode--${this.stepData.travel_mode.toUpperCase() === "TRANSIT" ? "solid" : "dotted"}` }, e("span", { class: "step__travel-mode-icon" }, e("mi-icon", { part: "step-travel-mode-icon", "icon-name": t })));
93
- }
94
- /**
95
- * Get icon name for transit vehicle.
96
- *
97
- * @returns {string}
98
- */
99
- getTransitVehicleIconName() {
100
- var t, s;
101
- const i = (s = (t = this.stepData.transit_information) === null || t === void 0 ? void 0 : t.line.vehicle) === null || s === void 0 ? void 0 : s.type.toLowerCase();
102
- return i && ["boat", "bus", "railway", "train", "subway"].some((r) => r === i) ? i : "transit";
103
- }
104
- /**
105
- * Toggles visibility of sub steps (steps in steps)
106
- */
107
- toggleSubsteps() {
108
- this.substepsToggled.emit(), this.substepsAreOpen = !this.substepsAreOpen;
109
- }
110
- /**
111
- * Render substeps if they should be visible.
112
- *
113
- * @returns {JSX.Element}
114
- */
115
- renderSubsteps() {
116
- var t;
117
- return this.substepsAreOpen === !0 ? e("div", { class: "step__substeps" }, (t = this.stepData.steps) === null || t === void 0 ? void 0 : t.map((s, i) => e("mi-route-instructions-maneuver", {
118
- "data-maneuver-index": i,
119
- maneuver: JSON.stringify(s),
120
- translations: this.translations,
121
- unit: this.unit,
122
- // @ts-ignore
123
- exportparts: `
124
- maneuver-icon,
125
- maneuver-description,
126
- maneuver-description-distance,
127
- maneuver-description-distance-border`
128
- }))) : null;
129
- }
130
- /**
131
- * Render the toggle button for the sub step expander.
132
- *
133
- * @returns {JSX.Element}
134
- */
135
- renderToggleButton() {
136
- var t;
137
- return ((t = this.stepData.steps) === null || t === void 0 ? void 0 : t.length) <= 0 ? null : e("span", { class: "step__toggle", onClick: () => this.toggleSubsteps() }, this.substepsAreOpen ? e("mi-icon", { part: "step-toggle", "icon-name": "minimize" }) : e("mi-icon", { part: "step-toggle", "icon-name": "maximize" }));
138
- }
139
- /**
140
- * Render distance part.
141
- *
142
- * @returns {JSX.Element}
143
- */
144
- renderDistance() {
145
- return e("span", { part: "step-info", class: "step__distance-duration" }, e("mi-distance", { meters: this.stepData.distance.value, unit: this.unit }), e("br", null));
146
- }
147
- /**
148
- * Render toggle and substeps.
149
- *
150
- * @returns {JSX.Element}
151
- */
152
- renderToggleAndSubsteps() {
153
- return e("div", { class: "step__details" }, this.renderToggleButton(), this.renderSubsteps());
154
- }
155
- /**
156
- * Render a driving step.
157
- *
158
- * @returns {JSX.Element}
159
- */
160
- renderDrivingStep() {
161
- return e("div", { class: "step", onClick: (t) => this.stepClickHandler(t) }, e("div", { part: "step-description", class: "step__description" }, this.renderDistance()), e("div", { class: "step__info" }, this.isInternetExplorer ? null : e("span", { class: "step__action-icon step__action-icon--circled" }, e("mi-icon", { "icon-name": "car" })), e("div", { part: "step-heading", class: "step__heading" }, this.getStepHeading())), this.renderToggleAndSubsteps());
162
- }
163
- /**
164
- * Get display heading.
165
- *
166
- * @returns {string}
167
- */
168
- getStepHeading() {
169
- var t;
170
- const s = {
171
- driving: this.translationsData.drive,
172
- walking: this.translationsData.walk,
173
- bicycling: this.translationsData.bike
174
- };
175
- return !((t = this.stepData.steps[0]) === null || t === void 0) && t.instructions ? this.stepData.steps[0].instructions : s[this.stepData.travel_mode.toLowerCase()];
176
- }
177
- /**
178
- * Render a walking step.
179
- *
180
- *
181
- * @returns {JSX.Element}
182
- */
183
- renderWalkingStep() {
184
- let t, s;
185
- return this.stepData.parking === !0 ? (t = `${this.translationsData.park} ${this.stepData.label ? ` ${this.translationsData.at} ` + this.stepData.label : ""}`, s = "park") : this.stepData.highway && this.stepData.highway.toUpperCase() === "STEPS" ? (t = `${this.translationsData.takeStaircaseToLevel} ${this.stepData.end_location.floor_name}`, s = "stairs") : this.stepData.highway && this.stepData.highway.toUpperCase() === "LADDER" ? (t = `${this.translationsData.takeLadderToLevel} ${this.stepData.end_location.floor_name}`, s = "ladder") : this.stepData.highway && this.stepData.highway.toUpperCase() === "ESCALATOR" ? (t = `${this.translationsData.takeEscalatorToLevel} ${this.stepData.end_location.floor_name}`, s = "escalator") : this.stepData.highway && this.stepData.highway.toUpperCase() === "WHEELCHAIRRAMP" ? (t = `${this.translationsData.takeWheelchairRampToLevel} ${this.stepData.end_location.floor_name}`, s = "wheelchair-ramp") : this.stepData.highway && this.stepData.highway.toUpperCase() === "WHEELCHAIRLIFT" ? (t = `${this.translationsData.takeWheelchairLiftToLevel} ${this.stepData.end_location.floor_name}`, s = "wheelchair-lift") : this.stepData.highway && this.stepData.highway.toUpperCase() === "ELEVATOR" ? (t = `${this.translationsData.takeElevatorToLevel} ${this.stepData.end_location.floor_name}`, s = "elevator") : this.fromRouteContext === "InsideBuilding" && this.stepData.route_context === "Outside" ? (t = this.addStepContextNameToHeading(this.translationsData.exit, this.stepData.start_context), s = "exit") : this.fromRouteContext === "InsideBuilding" && this.stepData.route_context === "InsideBuilding" ? (t = this.getStepHeading(), s = "walk") : this.fromRouteContext === "Outside" && this.stepData.route_context === "Outside" && this.fromTravelMode.toUpperCase() === "TRANSIT" ? (t = this.fromTransitStop, s = "transit-stop") : this.fromRouteContext === "Outside" && this.stepData.route_context === "Outside" ? (t = this.getStepHeading(), s = "walk") : this.fromRouteContext === "Outside" && this.stepData.route_context === "InsideBuilding" ? (t = this.addStepContextNameToHeading(this.translationsData.enter, this.stepData.end_context), s = "enter") : (t = this.fromRouteContext, s = "circle"), e("div", { class: "step", onClick: (i) => this.stepClickHandler(i) }, e("div", { part: "step-description", class: "step__description" }, this.renderDistance()), e("div", { class: "step__info" }, this.isInternetExplorer ? null : e("span", { class: `step__action-icon ${s !== "circle" ? "step__action-icon--circled" : ""}` }, e("mi-icon", { "icon-name": s })), e("div", { part: "step-heading", class: "step__heading" }, t)), this.renderToggleAndSubsteps());
186
- }
187
- /**
188
- * Add building or venue name to the step heading
189
- * @param {string} heading
190
- * @param {StepContext} stepContext
191
- * @returns
192
- */
193
- addStepContextNameToHeading(t, s) {
194
- return s && (s.building ? t += ` ${s.building.buildingInfo.name} ${this.translationsData.building}` : s.venue && (t += ` ${s.venue.venueInfo.name} ${this.translationsData.venue}`)), t;
195
- }
196
- /**
197
- * Render a bicycling step.
198
- *
199
- * @returns {JSX.Element}
200
- */
201
- renderBicyclingStep() {
202
- return e("div", { class: "step", onClick: (t) => this.stepClickHandler(t) }, e("div", { part: "step-description", class: "step__description" }, this.renderDistance()), e("div", { class: "step__info" }, this.isInternetExplorer ? null : e("span", { class: "step__action-icon step__action-icon--circled" }, e("mi-icon", { "icon-name": "bike" })), e("div", { part: "step-heading", class: "step__heading" }, this.getStepHeading())), this.renderToggleAndSubsteps());
203
- }
204
- /**
205
- * Render the destination step.
206
- *
207
- * @returns {JSX.Element}
208
- */
209
- renderDestinationStep() {
210
- return e("div", { class: "step", onClick: (t) => this.stepClickHandler(t) }, e("div", { class: "step__info destination" }, e("div", { class: "step__destination" }, this.isInternetExplorer ? null : e("span", { class: "step__action-icon step__action-icon--circled" }, e("mi-icon", { "icon-name": "logo" })), e("div", { part: "step-heading", class: "step__heading" }, this.translationsData.destination)), e("div", { part: "step-location", class: "step__location" }, this.destinationLocation)), this.renderToggleAndSubsteps());
211
- }
212
- /**
213
- * Render a transit step.
214
- *
215
- * @returns {JSX.Element}
216
- */
217
- renderTransitStep() {
218
- var t, s;
219
- return e("div", { class: "step", onClick: (i) => this.stepClickHandler(i) }, this.isInternetExplorer ? null : e("span", { class: "step__action-icon step__action-icon--circled" }, e("mi-icon", { "icon-name": "transit-stop" })), e("h3", { part: "step-heading", class: "step__heading" }, this.stepData.instructions), this.renderTravelMode(), e("div", { part: "step-description", class: "step__description" }, this.stepData.transit_information.line.short_name ? e("span", { class: "step__short-name", style: {
220
- backgroundColor: !((t = this.stepData.transit_information.line) === null || t === void 0) && t.color ? this.stepData.transit_information.line.color : null,
221
- color: !((s = this.stepData.transit_information.line) === null || s === void 0) && s.text_color ? this.stepData.transit_information.line.text_color : null
222
- } }, this.stepData.transit_information.line.short_name) : null, this.stepData.transit_information.headsign ? this.stepData.transit_information.headsign : null, e("br", null), e("span", { part: "step-info", class: "step__distance-duration" }, e("mi-time", { seconds: this.stepData.duration.value, translations: `{"days":"${this.translationsData.days}","hours":"${this.translationsData.hours}","minutes":"${this.translationsData.minutes}"}` }), " · ", this.stepData.transit_information.num_stops ? this.stepData.transit_information.num_stops : null, " ", this.translationsData.stops ? this.translationsData.stops : null)), this.renderToggleAndSubsteps());
223
- }
224
- static get watchers() {
225
- return {
226
- step: ["parseStepProp"],
227
- translations: ["parseTranslationsProp"]
228
- };
229
- }
230
- };
231
- d.style = l;
232
- export {
233
- d as mi_route_instructions_step
234
- };