@mapsindoors/map-template 1.0.0 → 1.1.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 (77) hide show
  1. package/README.md +1 -1
  2. package/package.json +2 -2
  3. package/dist/_commonjsHelpers-ba3f0406-b96e6d6a.mjs +0 -21
  4. package/dist/combo-box-item.entry-95ce1f59.mjs +0 -14
  5. package/dist/combo-box-item.entry-dbddbad6.mjs +0 -12
  6. package/dist/icon-b8d01d6f-ddfa2c17.mjs +0 -24
  7. package/dist/mapsindoors-react.es.js +0 -7
  8. package/dist/mapsindoors-react.umd.js +0 -1391
  9. package/dist/mapsindoors-webcomponent.es.js +0 -5
  10. package/dist/mapsindoors-webcomponent.umd.js +0 -1385
  11. package/dist/mi-card_2.entry-19c978a9.mjs +0 -25
  12. package/dist/mi-card_2.entry-edc337b6.mjs +0 -23
  13. package/dist/mi-chip.entry-4e72635b.mjs +0 -15
  14. package/dist/mi-chip.entry-a27bcae2.mjs +0 -13
  15. package/dist/mi-column.entry-f0216749.mjs +0 -20
  16. package/dist/mi-column.entry-fff64658.mjs +0 -18
  17. package/dist/mi-combo-box.entry-1df97caf.mjs +0 -262
  18. package/dist/mi-combo-box.entry-d5c49dbf.mjs +0 -260
  19. package/dist/mi-data-table.entry-075c3b63.mjs +0 -215
  20. package/dist/mi-data-table.entry-1a2a465b.mjs +0 -213
  21. package/dist/mi-distance_2.entry-67441b8d.mjs +0 -54
  22. package/dist/mi-distance_2.entry-99adc361.mjs +0 -56
  23. package/dist/mi-dropdown-item.entry-62debc4c.mjs +0 -14
  24. package/dist/mi-dropdown-item.entry-6c3c44c7.mjs +0 -12
  25. package/dist/mi-dropdown.entry-8eae4521.mjs +0 -298
  26. package/dist/mi-dropdown.entry-b0e299e8.mjs +0 -296
  27. package/dist/mi-keyboard.entry-b730227d.mjs +0 -2962
  28. package/dist/mi-keyboard.entry-e869affa.mjs +0 -2960
  29. package/dist/mi-list-item-category.entry-8896172f.mjs +0 -38
  30. package/dist/mi-list-item-category.entry-955e75d9.mjs +0 -36
  31. package/dist/mi-list-item-location.entry-da7df958.mjs +0 -127
  32. package/dist/mi-list-item-location.entry-f36e8cf1.mjs +0 -125
  33. package/dist/mi-list.entry-15713742.mjs +0 -41
  34. package/dist/mi-list.entry-6e9a5556.mjs +0 -39
  35. package/dist/mi-location-booking.entry-49bbfc83.mjs +0 -4863
  36. package/dist/mi-location-booking.entry-a8ab6205.mjs +0 -4865
  37. package/dist/mi-location-info.entry-366b91be.mjs +0 -24
  38. package/dist/mi-location-info.entry-ed98b07a.mjs +0 -22
  39. package/dist/mi-map-googlemaps.entry-172794d0.mjs +0 -396
  40. package/dist/mi-map-googlemaps.entry-a71fa364.mjs +0 -398
  41. package/dist/mi-map-mapbox.entry-45457559.mjs +0 -298
  42. package/dist/mi-map-mapbox.entry-c77a7266.mjs +0 -300
  43. package/dist/mi-metric-card.entry-32f831b0.mjs +0 -26
  44. package/dist/mi-metric-card.entry-55487c97.mjs +0 -28
  45. package/dist/mi-notification.entry-44dee5c8.mjs +0 -83
  46. package/dist/mi-notification.entry-eadf8dc9.mjs +0 -81
  47. package/dist/mi-route-instructions-heading.entry-a4e69ea6.mjs +0 -72
  48. package/dist/mi-route-instructions-heading.entry-e612f18b.mjs +0 -74
  49. package/dist/mi-route-instructions-maneuver_2.entry-9a0ff4c4.mjs +0 -115
  50. package/dist/mi-route-instructions-maneuver_2.entry-a8e830aa.mjs +0 -113
  51. package/dist/mi-route-instructions-step-legacy.entry-27292122.mjs +0 -201
  52. package/dist/mi-route-instructions-step-legacy.entry-4591ba3d.mjs +0 -199
  53. package/dist/mi-route-instructions-step.entry-09d5478d.mjs +0 -201
  54. package/dist/mi-route-instructions-step.entry-2cce3752.mjs +0 -199
  55. package/dist/mi-route-instructions.entry-2bc0ccf6.mjs +0 -141
  56. package/dist/mi-route-instructions.entry-b0cadde4.mjs +0 -139
  57. package/dist/mi-scroll-buttons.entry-1f0e7f57.mjs +0 -46
  58. package/dist/mi-scroll-buttons.entry-822cb937.mjs +0 -48
  59. package/dist/mi-search.entry-8462b146.mjs +0 -206
  60. package/dist/mi-search.entry-b0ed69a4.mjs +0 -208
  61. package/dist/mi-share-sms.entry-15b65316.mjs +0 -55
  62. package/dist/mi-share-sms.entry-f455e43c.mjs +0 -53
  63. package/dist/mi-step-switcher.entry-1a3cca1d.mjs +0 -26
  64. package/dist/mi-step-switcher.entry-5001def0.mjs +0 -24
  65. package/dist/mi-tab-panel.entry-4720796b.mjs +0 -21
  66. package/dist/mi-tab-panel.entry-e06e834d.mjs +0 -19
  67. package/dist/mi-tab.entry-93c67c99.mjs +0 -13
  68. package/dist/mi-tab.entry-a6fccd52.mjs +0 -11
  69. package/dist/mi-tabs.entry-0880cd97.mjs +0 -36
  70. package/dist/mi-tabs.entry-32262f70.mjs +0 -34
  71. package/dist/mi-variables-9a6c8d4d-e06eec88.mjs +0 -7
  72. package/dist/reactcomponent-2798f651.mjs +0 -27217
  73. package/dist/route-travel-mode.enum-7f4ce9c7-a9c95a83.mjs +0 -7
  74. package/dist/sort-order.enum-64ce8998-b75ac596.mjs +0 -317
  75. package/dist/unit-system.enum-eaefb53e-0f424da4.mjs +0 -7
  76. package/dist/utils-ae714467-b07fc3be.mjs +0 -36
  77. package/dist/webcomponent-5ad04e2a.mjs +0 -31996
@@ -1,199 +0,0 @@
1
- import { r, c as o, h as e } from "./webcomponent-5ad04e2a.mjs";
2
- import { U as a } 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;gap:8px;justify-items:center}.step__info{display:grid;grid-auto-flow:column;gap:8px;align-items:center}.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{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__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{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{grid-area:substeps}', d = class {
5
- constructor(t) {
6
- r(this, t), this.stepClicked = o(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 = navigator.language === "en-US" ? a.Imperial : a.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((n) => n === 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", {
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 distance part.
122
- *
123
- * @returns {JSX.Element}
124
- */
125
- renderDistance() {
126
- return e("span", { part: "step-info", class: "step__distance-duration" }, 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.renderDistance()), 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) }, 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)));
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.renderDistance()), 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
199
- };
@@ -1,141 +0,0 @@
1
- import { r as u, c as g, h as s, H as m } from "./reactcomponent-2798f651.mjs";
2
- import { R as v } from "./route-travel-mode.enum-7f4ce9c7-a9c95a83.mjs";
3
- import { U as f } from "./unit-system.enum-eaefb53e-0f424da4.mjs";
4
- import { c as S } from "./utils-ae714467-b07fc3be.mjs";
5
- import "react";
6
- import "react-dom";
7
- const x = ':host{display:block;background-color:#fcfcfc;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"}:host mi-route-instructions-step:hover{cursor:pointer;background-color:#f9fafb;transition:300ms ease}:host mi-route-instructions-step.active{background-color:#f3f4f6;transition:none;cursor:default}:host .instructions-destination{display:flex}:host .instructions-destination-icon{width:40px;display:flex;justify-content:center;align-items:center}:host .instructions-destination-icon mi-icon{width:24px;height:24px;background-color:#1c1917}:host .instructions-destination-details{flex:1;padding:12px}:host .instructions-destination-details mi-location-info{font-size:0.875rem}', I = class {
8
- constructor(t) {
9
- u(this, t), this.clicked = g(this, "clicked", 7), this.miStepElements = [], this.lastStepRouteContext = null, this.lastStepTravelMode = null, this.lastStepTransitStop = null, this.activeStep = {
10
- legIndex: 0,
11
- stepIndex: 0
12
- }, this.unit = f.Metric, this.route = void 0, this.hideIndoorSubsteps = !1, this.travelMode = v.Walking, this.originLocation = void 0, this.originName = void 0, this.destinationLocation = void 0, this.destinationName = void 0, this.translations = {
13
- walk: "Walk",
14
- bike: "Bike",
15
- transit: "Transit",
16
- drive: "Drive",
17
- leave: "Leave",
18
- from: "From",
19
- park: "Park",
20
- at: "at",
21
- building: "Building",
22
- venue: "Venue",
23
- takeStaircaseToLevel: "Take staircase to level",
24
- takeLadderToLevel: "Take the ladder to level",
25
- takeElevatorToLevel: "Take elevator to level",
26
- takeEscalatorToLevel: "Take escalator to level",
27
- takeWheelchairLiftToLevel: "Take wheelchair lift to level",
28
- takeWheelchairRampToLevel: "Take wheelchair ramp to level",
29
- exit: "Exit",
30
- enter: "Enter",
31
- stops: "stops",
32
- andContinue: "and continue",
33
- continueStraightAhead: "Continue straight ahead",
34
- goLeft: "Go left",
35
- goSharpLeft: "Go sharp left",
36
- goSlightLeft: "Go slight left",
37
- goRight: "Go right",
38
- goSharpRight: "Go sharp right",
39
- goSlightRight: "Go slight right",
40
- turnAround: "Turn around",
41
- days: "d",
42
- hours: "h",
43
- minutes: "min"
44
- };
45
- }
46
- componentDidRender() {
47
- this.miStepElements.forEach((t) => {
48
- t.hideIndoorSubsteps = this.hideIndoorSubsteps;
49
- });
50
- }
51
- /**
52
- * Transform the step in legs to a flat array of steps.
53
- *
54
- * @returns {Step[]}
55
- */
56
- getRouteSteps() {
57
- return this.route ? this.route.legs.reduce((t, i, e) => {
58
- for (const o in i.steps) {
59
- const n = i.steps[o];
60
- n.originalLegIndex = e, n.originalStepIndex = parseInt(o), t.push(n);
61
- }
62
- return t;
63
- }, []) : [];
64
- }
65
- /**
66
- * Updates the activeStep attribute and emits an object with leg, step and maneuver index information.
67
- *
68
- * @param {CustomEvent<any>} event Step object.
69
- * @param {number} stepIndex step index.
70
- */
71
- stepClickedHandler(t, i) {
72
- const e = this.getRouteSteps()[i];
73
- this.activeStep = {
74
- legIndex: e.originalLegIndex,
75
- stepIndex: e.originalStepIndex
76
- }, this.clicked.emit({
77
- legIndex: e.originalLegIndex,
78
- stepIndex: e.originalStepIndex,
79
- maneuverIndex: t.detail.maneuverIndex
80
- });
81
- }
82
- /**
83
- * Check if the step is active.
84
- *
85
- * @param {Step} step
86
- * @returns {boolean}
87
- */
88
- isActiveStep(t) {
89
- return this.activeStep ? this.activeStep.legIndex === t.originalLegIndex && this.activeStep.stepIndex === t.originalStepIndex : !1;
90
- }
91
- render() {
92
- return this.route ? this.renderInstructions() : null;
93
- }
94
- /**
95
- * Render instructions.
96
- *
97
- * @returns {JSX.Element}
98
- */
99
- renderInstructions() {
100
- return s(m, null, this.getRouteSteps().map((t, i) => {
101
- var e, o, n, a, r;
102
- const d = !((o = (e = this.originLocation) === null || e === void 0 ? void 0 : e.properties) === null || o === void 0) && o.name ? this.originLocation.properties.name : this.originName || "", c = t.originalLegIndex === 0 && t.originalStepIndex === 0 ? d : this.lastStepRouteContext, p = this.lastStepTravelMode, h = this.lastStepTransitStop;
103
- return this.lastStepRouteContext = t.route_context, this.lastStepTravelMode = t.travel_mode, this.lastStepTransitStop = !((a = (n = t.transit_information) === null || n === void 0 ? void 0 : n.arrival_stop) === null || a === void 0) && a.name ? (r = t.transit_information) === null || r === void 0 ? void 0 : r.arrival_stop.name : null, s("mi-route-instructions-step-legacy", {
104
- ref: (l) => this.miStepElements.push(l),
105
- "from-travel-mode": p,
106
- "from-route-context": c,
107
- "from-transit-stop": h,
108
- step: JSON.stringify(t),
109
- translations: JSON.stringify(this.translations),
110
- unit: this.unit,
111
- onStepClicked: (l) => this.stepClickedHandler(l, i),
112
- class: this.isActiveStep(t) ? "active" : "",
113
- part: this.isActiveStep(t) ? "step active" : "step",
114
- // @ts-ignore
115
- exportparts: `
116
- step-toggle,
117
- step-heading,
118
- step-description,
119
- step-info,
120
- step-travel-mode,
121
- step-travel-mode-icon,
122
- maneuver-icon,
123
- maneuver-description,
124
- maneuver-description-distance,
125
- maneuver-description-distance-border`
126
- });
127
- }), this.destinationLocation || this.destinationName ? this.renderDestination() : null);
128
- }
129
- /**
130
- * Render destination.
131
- *
132
- * @returns {JSX.Element}
133
- */
134
- renderDestination() {
135
- return s("div", { class: "instructions-destination" }, s("div", { class: "instructions-destination-icon" }, S() ? null : s("mi-icon", { "icon-name": "marker" })), s("div", { part: "instructions-destination", class: "instructions-destination-details" }, this.destinationLocation ? this.destinationLocation.properties.name : this.destinationName, this.destinationLocation ? s("mi-location-info", { part: "instructions-destination-info", location: this.destinationLocation }) : null));
136
- }
137
- };
138
- I.style = x;
139
- export {
140
- I as mi_route_instructions
141
- };
@@ -1,139 +0,0 @@
1
- import { r as u, c as g, h as s, H as m } from "./webcomponent-5ad04e2a.mjs";
2
- import { R as v } from "./route-travel-mode.enum-7f4ce9c7-a9c95a83.mjs";
3
- import { U as f } from "./unit-system.enum-eaefb53e-0f424da4.mjs";
4
- import { c as S } from "./utils-ae714467-b07fc3be.mjs";
5
- const x = ':host{display:block;background-color:#fcfcfc;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"}:host mi-route-instructions-step:hover{cursor:pointer;background-color:#f9fafb;transition:300ms ease}:host mi-route-instructions-step.active{background-color:#f3f4f6;transition:none;cursor:default}:host .instructions-destination{display:flex}:host .instructions-destination-icon{width:40px;display:flex;justify-content:center;align-items:center}:host .instructions-destination-icon mi-icon{width:24px;height:24px;background-color:#1c1917}:host .instructions-destination-details{flex:1;padding:12px}:host .instructions-destination-details mi-location-info{font-size:0.875rem}', I = class {
6
- constructor(t) {
7
- u(this, t), this.clicked = g(this, "clicked", 7), this.miStepElements = [], this.lastStepRouteContext = null, this.lastStepTravelMode = null, this.lastStepTransitStop = null, this.activeStep = {
8
- legIndex: 0,
9
- stepIndex: 0
10
- }, this.unit = f.Metric, this.route = void 0, this.hideIndoorSubsteps = !1, this.travelMode = v.Walking, this.originLocation = void 0, this.originName = void 0, this.destinationLocation = void 0, this.destinationName = void 0, this.translations = {
11
- walk: "Walk",
12
- bike: "Bike",
13
- transit: "Transit",
14
- drive: "Drive",
15
- leave: "Leave",
16
- from: "From",
17
- park: "Park",
18
- at: "at",
19
- building: "Building",
20
- venue: "Venue",
21
- takeStaircaseToLevel: "Take staircase to level",
22
- takeLadderToLevel: "Take the ladder to level",
23
- takeElevatorToLevel: "Take elevator to level",
24
- takeEscalatorToLevel: "Take escalator to level",
25
- takeWheelchairLiftToLevel: "Take wheelchair lift to level",
26
- takeWheelchairRampToLevel: "Take wheelchair ramp to level",
27
- exit: "Exit",
28
- enter: "Enter",
29
- stops: "stops",
30
- andContinue: "and continue",
31
- continueStraightAhead: "Continue straight ahead",
32
- goLeft: "Go left",
33
- goSharpLeft: "Go sharp left",
34
- goSlightLeft: "Go slight left",
35
- goRight: "Go right",
36
- goSharpRight: "Go sharp right",
37
- goSlightRight: "Go slight right",
38
- turnAround: "Turn around",
39
- days: "d",
40
- hours: "h",
41
- minutes: "min"
42
- };
43
- }
44
- componentDidRender() {
45
- this.miStepElements.forEach((t) => {
46
- t.hideIndoorSubsteps = this.hideIndoorSubsteps;
47
- });
48
- }
49
- /**
50
- * Transform the step in legs to a flat array of steps.
51
- *
52
- * @returns {Step[]}
53
- */
54
- getRouteSteps() {
55
- return this.route ? this.route.legs.reduce((t, i, e) => {
56
- for (const o in i.steps) {
57
- const n = i.steps[o];
58
- n.originalLegIndex = e, n.originalStepIndex = parseInt(o), t.push(n);
59
- }
60
- return t;
61
- }, []) : [];
62
- }
63
- /**
64
- * Updates the activeStep attribute and emits an object with leg, step and maneuver index information.
65
- *
66
- * @param {CustomEvent<any>} event Step object.
67
- * @param {number} stepIndex step index.
68
- */
69
- stepClickedHandler(t, i) {
70
- const e = this.getRouteSteps()[i];
71
- this.activeStep = {
72
- legIndex: e.originalLegIndex,
73
- stepIndex: e.originalStepIndex
74
- }, this.clicked.emit({
75
- legIndex: e.originalLegIndex,
76
- stepIndex: e.originalStepIndex,
77
- maneuverIndex: t.detail.maneuverIndex
78
- });
79
- }
80
- /**
81
- * Check if the step is active.
82
- *
83
- * @param {Step} step
84
- * @returns {boolean}
85
- */
86
- isActiveStep(t) {
87
- return this.activeStep ? this.activeStep.legIndex === t.originalLegIndex && this.activeStep.stepIndex === t.originalStepIndex : !1;
88
- }
89
- render() {
90
- return this.route ? this.renderInstructions() : null;
91
- }
92
- /**
93
- * Render instructions.
94
- *
95
- * @returns {JSX.Element}
96
- */
97
- renderInstructions() {
98
- return s(m, null, this.getRouteSteps().map((t, i) => {
99
- var e, o, n, a, r;
100
- const d = !((o = (e = this.originLocation) === null || e === void 0 ? void 0 : e.properties) === null || o === void 0) && o.name ? this.originLocation.properties.name : this.originName || "", c = t.originalLegIndex === 0 && t.originalStepIndex === 0 ? d : this.lastStepRouteContext, p = this.lastStepTravelMode, h = this.lastStepTransitStop;
101
- return this.lastStepRouteContext = t.route_context, this.lastStepTravelMode = t.travel_mode, this.lastStepTransitStop = !((a = (n = t.transit_information) === null || n === void 0 ? void 0 : n.arrival_stop) === null || a === void 0) && a.name ? (r = t.transit_information) === null || r === void 0 ? void 0 : r.arrival_stop.name : null, s("mi-route-instructions-step-legacy", {
102
- ref: (l) => this.miStepElements.push(l),
103
- "from-travel-mode": p,
104
- "from-route-context": c,
105
- "from-transit-stop": h,
106
- step: JSON.stringify(t),
107
- translations: JSON.stringify(this.translations),
108
- unit: this.unit,
109
- onStepClicked: (l) => this.stepClickedHandler(l, i),
110
- class: this.isActiveStep(t) ? "active" : "",
111
- part: this.isActiveStep(t) ? "step active" : "step",
112
- // @ts-ignore
113
- exportparts: `
114
- step-toggle,
115
- step-heading,
116
- step-description,
117
- step-info,
118
- step-travel-mode,
119
- step-travel-mode-icon,
120
- maneuver-icon,
121
- maneuver-description,
122
- maneuver-description-distance,
123
- maneuver-description-distance-border`
124
- });
125
- }), this.destinationLocation || this.destinationName ? this.renderDestination() : null);
126
- }
127
- /**
128
- * Render destination.
129
- *
130
- * @returns {JSX.Element}
131
- */
132
- renderDestination() {
133
- return s("div", { class: "instructions-destination" }, s("div", { class: "instructions-destination-icon" }, S() ? null : s("mi-icon", { "icon-name": "marker" })), s("div", { part: "instructions-destination", class: "instructions-destination-details" }, this.destinationLocation ? this.destinationLocation.properties.name : this.destinationName, this.destinationLocation ? s("mi-location-info", { part: "instructions-destination-info", location: this.destinationLocation }) : null));
134
- }
135
- };
136
- I.style = x;
137
- export {
138
- I as mi_route_instructions
139
- };
@@ -1,46 +0,0 @@
1
- import { r as o, h as e } from "./webcomponent-5ad04e2a.mjs";
2
- const n = '@charset "UTF-8";a.mi-button{cursor:default}.mi-button{border-radius:4px;border-width:1px;border-style:solid;font-family:Inter, -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";font-size:1rem;font-weight:500;padding-left:16px;padding-right:16px;padding-top:12px;padding-bottom:12px;display:inline-flex;align-items:center}.mi-button:disabled{opacity:0.48;cursor:not-allowed}.mi-button object{filter:invert(9%) sepia(13%) saturate(692%) hue-rotate(185deg) brightness(98%) contrast(91%);width:16px;height:16px}.mi-button--small{padding-left:12px;padding-right:12px;padding-top:8px;padding-bottom:8px;font-size:0.875rem;height:32px}.mi-button--small object{width:16px;height:16px}.mi-button--large{padding-left:16px;padding-right:16px;font-size:1.25rem}.mi-button--large object{width:20px;height:20px}.mi-button--full-width{width:100%;justify-content:center}.mi-button--icon-left{padding-left:12px}.mi-button--icon-left object{margin-right:8px}.mi-button--icon-right{padding-right:12px}.mi-button--icon-right object{margin-left:8px}.mi-button--icon-both{padding-top:12px;padding-bottom:12px}.mi-button--icon-both object:first-of-type{margin-right:8px}.mi-button--icon-both object:last-of-type{margin-left:8px}.mi-button--base{background:linear-gradient(#f5f7fa, #ebeff5);color:#1e2025;border-color:#c8d0e0}.mi-button--base:not(:disabled):hover{background:linear-gradient(#ebeff5, #dee3ed);border-color:#aeb9cb}.mi-button--base:not(:disabled):active{background:linear-gradient(#dee3ed, #ebeff5)}.mi-button--primary{color:#ffffff;border-color:#20693e;background:linear-gradient(#3ba064, #2a844e)}.mi-button--primary object{filter:invert(100%) sepia(93%) saturate(0%) hue-rotate(201deg) brightness(106%) contrast(106%)}.mi-button--primary:not(:disabled):hover{background:linear-gradient(#2a844e, #20693e)}.mi-button--primary:not(:disabled):active{background:linear-gradient(#20693e, #2a844e)}.mi-button--delete{background:linear-gradient(#f55151, #de1b1b);color:#ffffff;border-color:#ba0d0d}.mi-button--delete object{filter:invert(100%) sepia(93%) saturate(0%) hue-rotate(201deg) brightness(106%) contrast(106%)}.mi-button--delete:not(:disabled):hover{background:linear-gradient(#de1b1b, #ba0d0d)}.mi-button--delete:not(:disabled):active{background:linear-gradient(#ba0d0d, #de1b1b)}.mi-button--outline{color:#3071d9;border-color:#3071d9;background-color:transparent}.mi-button--outline object{filter:invert(38%) sepia(97%) saturate(742%) hue-rotate(188deg) brightness(86%) contrast(97%)}.mi-button--outline:not(:disabled):hover{color:#1d5bbf;border-color:#1d5bbf;background-color:#eef4fc}.mi-button--outline:not(:disabled):active{color:#1d5bbf;border-color:#1d5bbf;background-color:#cfe0fc}.mi-button--link{color:#3071d9;border-style:none;background-color:transparent;cursor:pointer}.mi-button--link object{filter:invert(38%) sepia(97%) saturate(742%) hue-rotate(188deg) brightness(86%) contrast(97%)}.mi-button--link:not(:disabled):hover{color:#1d5bbf;border-color:#1d5bbf;background-color:#eef4fc}.mi-button--link:disabled:hover{cursor:not-allowed}.mi-button--link:not(:disabled):active{color:#1d5bbf;border-color:#1d5bbf;background-color:#cfe0fc}html{box-sizing:border-box}*,*:before,*:after{box-sizing:inherit}.scroll-buttons{height:100%;width:64px;background-color:#f9fafb;border-left:solid;border-color:#e5e7eb;border-width:1px;display:flex;flex-direction:column;align-items:center;justify-content:center}.scroll-buttons .btn{margin:8px}.scroll-buttons .btn-up::after{content:"↑"}.scroll-buttons .btn-down::after{content:"↓"}', r = class {
3
- constructor(t) {
4
- o(this, t), this.scrollContainerElementRef = void 0, this.scrollLength = 100;
5
- }
6
- addScrollEventListener() {
7
- this.scrollContainerElementRef.addEventListener("scroll", () => {
8
- this.updateScrollButtonsState();
9
- });
10
- }
11
- /**
12
- * Adds scroll event listener to the container element when this component is first attached to the DOM.
13
- */
14
- connectedCallback() {
15
- this.addScrollEventListener();
16
- }
17
- /**
18
- * Updates enable/disable state for scroll up and down buttons.
19
- * @returns {Promise<void>}
20
- */
21
- async updateScrollButtonsState() {
22
- this.scrollContainerElementRef.scrollTop === 0 ? this.upButtonElement.disabled = !0 : this.upButtonElement.disabled && (this.upButtonElement.disabled = !1), this.scrollContainerElementRef.scrollHeight - this.scrollContainerElementRef.scrollTop === this.scrollContainerElementRef.clientHeight ? this.downButtonElement.disabled = !0 : this.downButtonElement.disabled && (this.downButtonElement.disabled = !1);
23
- }
24
- /**
25
- * Update scroll position.
26
- * @param {number} value - Value to scroll.
27
- */
28
- updateScrollPosition(t) {
29
- "scrollBehavior" in document.documentElement.style ? this.scrollContainerElementRef.scroll({
30
- top: this.scrollContainerElementRef.scrollTop + t,
31
- behavior: "smooth"
32
- }) : this.scrollContainerElementRef.scrollTop = t;
33
- }
34
- render() {
35
- return e("div", { class: "scroll-buttons" }, e("button", { class: "mi-button mi-button--base btn btn-up", type: "button", disabled: !0, "aria-label": "Scroll Up", ref: (t) => this.upButtonElement = t, onClick: () => this.updateScrollPosition(-this.scrollLength) }), e("button", { class: "mi-button mi-button--base btn btn-down", type: "button", "aria-label": "Scroll Down", ref: (t) => this.downButtonElement = t, onClick: () => this.updateScrollPosition(this.scrollLength) }));
36
- }
37
- static get watchers() {
38
- return {
39
- scrollContainerElementRef: ["addScrollEventListener"]
40
- };
41
- }
42
- };
43
- r.style = n;
44
- export {
45
- r as mi_scroll_buttons
46
- };
@@ -1,48 +0,0 @@
1
- import { r as o, h as e } from "./reactcomponent-2798f651.mjs";
2
- import "react";
3
- import "react-dom";
4
- const n = '@charset "UTF-8";a.mi-button{cursor:default}.mi-button{border-radius:4px;border-width:1px;border-style:solid;font-family:Inter, -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";font-size:1rem;font-weight:500;padding-left:16px;padding-right:16px;padding-top:12px;padding-bottom:12px;display:inline-flex;align-items:center}.mi-button:disabled{opacity:0.48;cursor:not-allowed}.mi-button object{filter:invert(9%) sepia(13%) saturate(692%) hue-rotate(185deg) brightness(98%) contrast(91%);width:16px;height:16px}.mi-button--small{padding-left:12px;padding-right:12px;padding-top:8px;padding-bottom:8px;font-size:0.875rem;height:32px}.mi-button--small object{width:16px;height:16px}.mi-button--large{padding-left:16px;padding-right:16px;font-size:1.25rem}.mi-button--large object{width:20px;height:20px}.mi-button--full-width{width:100%;justify-content:center}.mi-button--icon-left{padding-left:12px}.mi-button--icon-left object{margin-right:8px}.mi-button--icon-right{padding-right:12px}.mi-button--icon-right object{margin-left:8px}.mi-button--icon-both{padding-top:12px;padding-bottom:12px}.mi-button--icon-both object:first-of-type{margin-right:8px}.mi-button--icon-both object:last-of-type{margin-left:8px}.mi-button--base{background:linear-gradient(#f5f7fa, #ebeff5);color:#1e2025;border-color:#c8d0e0}.mi-button--base:not(:disabled):hover{background:linear-gradient(#ebeff5, #dee3ed);border-color:#aeb9cb}.mi-button--base:not(:disabled):active{background:linear-gradient(#dee3ed, #ebeff5)}.mi-button--primary{color:#ffffff;border-color:#20693e;background:linear-gradient(#3ba064, #2a844e)}.mi-button--primary object{filter:invert(100%) sepia(93%) saturate(0%) hue-rotate(201deg) brightness(106%) contrast(106%)}.mi-button--primary:not(:disabled):hover{background:linear-gradient(#2a844e, #20693e)}.mi-button--primary:not(:disabled):active{background:linear-gradient(#20693e, #2a844e)}.mi-button--delete{background:linear-gradient(#f55151, #de1b1b);color:#ffffff;border-color:#ba0d0d}.mi-button--delete object{filter:invert(100%) sepia(93%) saturate(0%) hue-rotate(201deg) brightness(106%) contrast(106%)}.mi-button--delete:not(:disabled):hover{background:linear-gradient(#de1b1b, #ba0d0d)}.mi-button--delete:not(:disabled):active{background:linear-gradient(#ba0d0d, #de1b1b)}.mi-button--outline{color:#3071d9;border-color:#3071d9;background-color:transparent}.mi-button--outline object{filter:invert(38%) sepia(97%) saturate(742%) hue-rotate(188deg) brightness(86%) contrast(97%)}.mi-button--outline:not(:disabled):hover{color:#1d5bbf;border-color:#1d5bbf;background-color:#eef4fc}.mi-button--outline:not(:disabled):active{color:#1d5bbf;border-color:#1d5bbf;background-color:#cfe0fc}.mi-button--link{color:#3071d9;border-style:none;background-color:transparent;cursor:pointer}.mi-button--link object{filter:invert(38%) sepia(97%) saturate(742%) hue-rotate(188deg) brightness(86%) contrast(97%)}.mi-button--link:not(:disabled):hover{color:#1d5bbf;border-color:#1d5bbf;background-color:#eef4fc}.mi-button--link:disabled:hover{cursor:not-allowed}.mi-button--link:not(:disabled):active{color:#1d5bbf;border-color:#1d5bbf;background-color:#cfe0fc}html{box-sizing:border-box}*,*:before,*:after{box-sizing:inherit}.scroll-buttons{height:100%;width:64px;background-color:#f9fafb;border-left:solid;border-color:#e5e7eb;border-width:1px;display:flex;flex-direction:column;align-items:center;justify-content:center}.scroll-buttons .btn{margin:8px}.scroll-buttons .btn-up::after{content:"↑"}.scroll-buttons .btn-down::after{content:"↓"}', r = class {
5
- constructor(t) {
6
- o(this, t), this.scrollContainerElementRef = void 0, this.scrollLength = 100;
7
- }
8
- addScrollEventListener() {
9
- this.scrollContainerElementRef.addEventListener("scroll", () => {
10
- this.updateScrollButtonsState();
11
- });
12
- }
13
- /**
14
- * Adds scroll event listener to the container element when this component is first attached to the DOM.
15
- */
16
- connectedCallback() {
17
- this.addScrollEventListener();
18
- }
19
- /**
20
- * Updates enable/disable state for scroll up and down buttons.
21
- * @returns {Promise<void>}
22
- */
23
- async updateScrollButtonsState() {
24
- this.scrollContainerElementRef.scrollTop === 0 ? this.upButtonElement.disabled = !0 : this.upButtonElement.disabled && (this.upButtonElement.disabled = !1), this.scrollContainerElementRef.scrollHeight - this.scrollContainerElementRef.scrollTop === this.scrollContainerElementRef.clientHeight ? this.downButtonElement.disabled = !0 : this.downButtonElement.disabled && (this.downButtonElement.disabled = !1);
25
- }
26
- /**
27
- * Update scroll position.
28
- * @param {number} value - Value to scroll.
29
- */
30
- updateScrollPosition(t) {
31
- "scrollBehavior" in document.documentElement.style ? this.scrollContainerElementRef.scroll({
32
- top: this.scrollContainerElementRef.scrollTop + t,
33
- behavior: "smooth"
34
- }) : this.scrollContainerElementRef.scrollTop = t;
35
- }
36
- render() {
37
- return e("div", { class: "scroll-buttons" }, e("button", { class: "mi-button mi-button--base btn btn-up", type: "button", disabled: !0, "aria-label": "Scroll Up", ref: (t) => this.upButtonElement = t, onClick: () => this.updateScrollPosition(-this.scrollLength) }), e("button", { class: "mi-button mi-button--base btn btn-down", type: "button", "aria-label": "Scroll Down", ref: (t) => this.downButtonElement = t, onClick: () => this.updateScrollPosition(this.scrollLength) }));
38
- }
39
- static get watchers() {
40
- return {
41
- scrollContainerElementRef: ["addScrollEventListener"]
42
- };
43
- }
44
- };
45
- r.style = n;
46
- export {
47
- r as mi_scroll_buttons
48
- };