@mapsindoors/map-template 1.1.0 → 1.2.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 (76) hide show
  1. package/dist/_commonjsHelpers-ba3f0406-b96e6d6a.mjs +21 -0
  2. package/dist/combo-box-item.entry-081be325.mjs +12 -0
  3. package/dist/combo-box-item.entry-2e0df596.mjs +14 -0
  4. package/dist/icon-b8d01d6f-ddfa2c17.mjs +24 -0
  5. package/dist/mapsindoors-react.es.js +7 -0
  6. package/dist/mapsindoors-react.umd.js +1404 -0
  7. package/dist/mapsindoors-webcomponent.es.js +5 -0
  8. package/dist/mapsindoors-webcomponent.umd.js +1387 -0
  9. package/dist/mi-card_2.entry-4b292faa.mjs +25 -0
  10. package/dist/mi-card_2.entry-d7b7c0fe.mjs +23 -0
  11. package/dist/mi-chip.entry-e64c10b2.mjs +13 -0
  12. package/dist/mi-chip.entry-e7925002.mjs +15 -0
  13. package/dist/mi-column.entry-b6860a05.mjs +20 -0
  14. package/dist/mi-column.entry-c5e30d82.mjs +18 -0
  15. package/dist/mi-combo-box.entry-17c94a6c.mjs +260 -0
  16. package/dist/mi-combo-box.entry-82f01df0.mjs +262 -0
  17. package/dist/mi-data-table.entry-36189410.mjs +215 -0
  18. package/dist/mi-data-table.entry-df16a8e8.mjs +213 -0
  19. package/dist/mi-distance_2.entry-99a76cf1.mjs +54 -0
  20. package/dist/mi-distance_2.entry-a4162ff0.mjs +56 -0
  21. package/dist/mi-dropdown-item.entry-1d7057d0.mjs +12 -0
  22. package/dist/mi-dropdown-item.entry-a7f44844.mjs +14 -0
  23. package/dist/mi-dropdown.entry-61286ab0.mjs +296 -0
  24. package/dist/mi-dropdown.entry-9265d65f.mjs +298 -0
  25. package/dist/mi-keyboard.entry-72005f8d.mjs +2960 -0
  26. package/dist/mi-keyboard.entry-8078d7e4.mjs +2962 -0
  27. package/dist/mi-list-item-category.entry-a17468a2.mjs +38 -0
  28. package/dist/mi-list-item-category.entry-e2e99419.mjs +36 -0
  29. package/dist/mi-list-item-location.entry-17a5378b.mjs +125 -0
  30. package/dist/mi-list-item-location.entry-f10307eb.mjs +127 -0
  31. package/dist/mi-list.entry-bff068a8.mjs +39 -0
  32. package/dist/mi-list.entry-efaefddc.mjs +41 -0
  33. package/dist/mi-location-booking.entry-0419b652.mjs +4863 -0
  34. package/dist/mi-location-booking.entry-04ceb8e0.mjs +4865 -0
  35. package/dist/mi-location-info.entry-0fa152c7.mjs +24 -0
  36. package/dist/mi-location-info.entry-54b642de.mjs +22 -0
  37. package/dist/mi-map-googlemaps.entry-0ff75c12.mjs +396 -0
  38. package/dist/mi-map-googlemaps.entry-e7ac7723.mjs +398 -0
  39. package/dist/mi-map-mapbox.entry-63ee5433.mjs +298 -0
  40. package/dist/mi-map-mapbox.entry-e68a762d.mjs +300 -0
  41. package/dist/mi-metric-card.entry-4255583a.mjs +28 -0
  42. package/dist/mi-metric-card.entry-640e7f0f.mjs +26 -0
  43. package/dist/mi-notification.entry-44181f39.mjs +81 -0
  44. package/dist/mi-notification.entry-7dfaa490.mjs +83 -0
  45. package/dist/mi-route-instructions-heading.entry-b1a6cd48.mjs +74 -0
  46. package/dist/mi-route-instructions-heading.entry-b36072c1.mjs +72 -0
  47. package/dist/mi-route-instructions-maneuver_2.entry-72cacc4c.mjs +113 -0
  48. package/dist/mi-route-instructions-maneuver_2.entry-9d6a9d67.mjs +115 -0
  49. package/dist/mi-route-instructions-step-legacy.entry-9248b651.mjs +201 -0
  50. package/dist/mi-route-instructions-step-legacy.entry-a914afdb.mjs +199 -0
  51. package/dist/mi-route-instructions-step.entry-24e476fd.mjs +201 -0
  52. package/dist/mi-route-instructions-step.entry-558653ac.mjs +199 -0
  53. package/dist/mi-route-instructions.entry-29ae2a73.mjs +141 -0
  54. package/dist/mi-route-instructions.entry-69f7c2b4.mjs +139 -0
  55. package/dist/mi-scroll-buttons.entry-6cb8af99.mjs +48 -0
  56. package/dist/mi-scroll-buttons.entry-b870e6ab.mjs +46 -0
  57. package/dist/mi-search.entry-bf585b83.mjs +206 -0
  58. package/dist/mi-search.entry-c5cabd50.mjs +208 -0
  59. package/dist/mi-share-sms.entry-8c407552.mjs +55 -0
  60. package/dist/mi-share-sms.entry-f9102c1c.mjs +53 -0
  61. package/dist/mi-step-switcher.entry-3ff171cb.mjs +24 -0
  62. package/dist/mi-step-switcher.entry-7da93bef.mjs +26 -0
  63. package/dist/mi-tab-panel.entry-9f73c5c1.mjs +21 -0
  64. package/dist/mi-tab-panel.entry-d7cf8128.mjs +19 -0
  65. package/dist/mi-tab.entry-db38180f.mjs +11 -0
  66. package/dist/mi-tab.entry-f994c320.mjs +13 -0
  67. package/dist/mi-tabs.entry-7e30a2d7.mjs +36 -0
  68. package/dist/mi-tabs.entry-85c369bc.mjs +34 -0
  69. package/dist/mi-variables-9a6c8d4d-e06eec88.mjs +7 -0
  70. package/dist/reactcomponent-9b2cb048.mjs +31641 -0
  71. package/dist/route-travel-mode.enum-7f4ce9c7-a9c95a83.mjs +7 -0
  72. package/dist/sort-order.enum-64ce8998-b75ac596.mjs +317 -0
  73. package/dist/unit-system.enum-eaefb53e-0f424da4.mjs +7 -0
  74. package/dist/utils-ae714467-b07fc3be.mjs +36 -0
  75. package/dist/webcomponent-f6a0e3ed.mjs +36314 -0
  76. package/package.json +2 -1
@@ -0,0 +1,199 @@
1
+ import { r, c as o, h as e } from "./webcomponent-f6a0e3ed.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) }, 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())));
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) }, 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())));
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
+ };
@@ -0,0 +1,141 @@
1
+ import { r as u, c as g, h as s, H as m } from "./reactcomponent-9b2cb048.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
+ };
@@ -0,0 +1,139 @@
1
+ import { r as u, c as g, h as s, H as m } from "./webcomponent-f6a0e3ed.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
+ };
@@ -0,0 +1,48 @@
1
+ import { r as o, h as e } from "./reactcomponent-9b2cb048.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
+ };
@@ -0,0 +1,46 @@
1
+ import { r as o, h as e } from "./webcomponent-f6a0e3ed.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
+ };