@mapsindoors/map-template 1.66.0 → 1.66.2

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 (48) hide show
  1. package/dist/mapsindoors-react.es.js +59824 -7
  2. package/dist/mapsindoors-react.umd.js +491 -560
  3. package/dist/mapsindoors-webcomponent.es.js +39970 -51199
  4. package/dist/mapsindoors-webcomponent.umd.js +480 -554
  5. package/package.json +6 -4
  6. package/dist/_commonjsHelpers-ba3f0406-b177c122.mjs +0 -30
  7. package/dist/combo-box-item.entry-9b982e8c.mjs +0 -22
  8. package/dist/icon-b8d01d6f-a7517024.mjs +0 -33
  9. package/dist/mi-card_2.entry-e26ef04d.mjs +0 -33
  10. package/dist/mi-chip.entry-cdb7e39c.mjs +0 -26
  11. package/dist/mi-column.entry-292211cb.mjs +0 -28
  12. package/dist/mi-combo-box.entry-c969e712.mjs +0 -270
  13. package/dist/mi-data-table.entry-8b2850dd.mjs +0 -231
  14. package/dist/mi-distance_2.entry-f00f425b.mjs +0 -346
  15. package/dist/mi-dropdown-item.entry-59303d02.mjs +0 -22
  16. package/dist/mi-dropdown.entry-bee1749d.mjs +0 -331
  17. package/dist/mi-floor-selector.entry-4e8b95b2.mjs +0 -122
  18. package/dist/mi-keyboard.entry-48ff850f.mjs +0 -3048
  19. package/dist/mi-list-item-category.entry-cfc47430.mjs +0 -46
  20. package/dist/mi-list-item-location.entry-6b5c4bc1.mjs +0 -144
  21. package/dist/mi-list.entry-0ed8f950.mjs +0 -49
  22. package/dist/mi-location-booking.entry-ad586693.mjs +0 -4873
  23. package/dist/mi-location-info.entry-638658ec.mjs +0 -39
  24. package/dist/mi-map-googlemaps.entry-21520a21.mjs +0 -406
  25. package/dist/mi-map-mapbox.entry-59fb70af.mjs +0 -308
  26. package/dist/mi-metric-card.entry-d71eb47f.mjs +0 -36
  27. package/dist/mi-my-position.entry-3cfdf5c0.mjs +0 -1406
  28. package/dist/mi-notification.entry-43a2513d.mjs +0 -91
  29. package/dist/mi-route-instructions-heading.entry-44d0821c.mjs +0 -82
  30. package/dist/mi-route-instructions-maneuver-legacy.entry-4c173878.mjs +0 -83
  31. package/dist/mi-route-instructions-maneuver.entry-bc47957a.mjs +0 -83
  32. package/dist/mi-route-instructions-step-legacy.entry-aaac79d0.mjs +0 -209
  33. package/dist/mi-route-instructions-step.entry-f86b55bf.mjs +0 -244
  34. package/dist/mi-route-instructions.entry-92ffcedb.mjs +0 -150
  35. package/dist/mi-scroll-buttons.entry-6491dd8f.mjs +0 -86
  36. package/dist/mi-search.entry-67e073b6.mjs +0 -258
  37. package/dist/mi-share-sms.entry-9744b5f5.mjs +0 -63
  38. package/dist/mi-step-switcher.entry-63c969ca.mjs +0 -34
  39. package/dist/mi-tab-panel.entry-d5e78add.mjs +0 -29
  40. package/dist/mi-tab.entry-7f290119.mjs +0 -21
  41. package/dist/mi-tabs.entry-4a660558.mjs +0 -44
  42. package/dist/mi-time.entry-f8deb036.mjs +0 -53
  43. package/dist/mi-variables-9a6c8d4d-6f6e1dd9.mjs +0 -16
  44. package/dist/reactcomponent-ad7142b4.mjs +0 -57763
  45. package/dist/route-travel-mode.enum-7f4ce9c7-f43c56e7.mjs +0 -16
  46. package/dist/sort-order.enum-64ce8998-958536ad.mjs +0 -326
  47. package/dist/unit-system.enum-eaefb53e-2fda1d29.mjs +0 -16
  48. package/dist/utils-ae714467-b97fee1b.mjs +0 -45
@@ -1,91 +0,0 @@
1
- import { r as c, f as r, h as i, H as f, g as d } from "./reactcomponent-ad7142b4.mjs";
2
- import "react";
3
- import "react-dom";
4
- (function() {
5
- try {
6
- var t = typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, e = new t.Error().stack;
7
- e && (t._sentryDebugIds = t._sentryDebugIds || {}, t._sentryDebugIds[e] = "df413ede-37ba-4e7f-8003-b95f35f0ba3d", t._sentryDebugIdIdentifier = "sentry-dbid-df413ede-37ba-4e7f-8003-b95f35f0ba3d");
8
- } catch {
9
- }
10
- })();
11
- var l;
12
- (function(t) {
13
- t.TOP_LEFT = "top-left", t.TOP_CENTER = "top-center", t.TOP_RIGHT = "top-right", t.BOTTOM_CENTER = "bottom-center", t.BOTTOM_LEFT = "bottom-left", t.BOTTOM_RIGHT = "bottom-right";
14
- })(l || (l = {}));
15
- var n;
16
- (function(t) {
17
- t.Error = "error", t.Info = "info", t.Success = "success", t.Warning = "warning", t.None = "none";
18
- })(n || (n = {}));
19
- const h = ':host{padding:16px;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";position:fixed;z-index:1000;display:flex;flex-direction:column}:host(.top-left){top:0;left:0}:host(.top-center){top:0;align-items:center;left:50%;transform:translate(-50%, 0)}:host(.top-right){top:0;right:0;align-items:flex-end}:host(.bottom-left){bottom:0;left:0}:host(.bottom-center){bottom:0;align-items:center;left:50%;transform:translate(-50%, 0)}:host(.bottom-right){bottom:0;right:0;align-items:flex-end}.notification{margin-top:16px;display:flex;flex-direction:row;box-shadow:0px 4px 4px rgba(0, 0, 0, 0.16), 0px 2px 2px rgba(0, 0, 0, 0.18), 0px 1px 1px rgba(0, 0, 0, 0.2);border-radius:2px;background-color:#fcfcfc;overflow:hidden}.notification .icon{width:48px;display:flex;justify-content:center;align-items:center}.notification .icon-type--error{background-color:#ef4444}.notification .icon-type--success{background-color:#22c55e}.notification .icon-type--warning{background-color:#f59e0b}.notification .icon-type--info{background-color:#6b7280}.notification .label{padding-left:16px;flex:1;font-size:0.875rem}.notification .btn{padding-left:24px;padding-right:16px;display:flex;align-items:center;border:none;background-color:#fcfcfc}.notification .btn:focus{outline:none;box-shadow:none}', g = class {
20
- constructor(t) {
21
- c(this, t), this.notifications = [], this.notificationId = 0, this.position = l.BOTTOM_RIGHT, this.duration = 3;
22
- }
23
- /**
24
- * Show a notification.
25
- *
26
- * @param {string} message - Message to display.
27
- * @param {string} [type='none'] - Type of notification. Available types: 'info', 'warning', 'success', 'error' and 'none'.
28
- * @param {boolean} [sticky=false] - Set message as sticky to prevent it from disappearing.
29
- * @returns {Promise<void>}
30
- */
31
- async push(t, e = "none", o = !1) {
32
- if (typeof t != "string" || t.length < 1)
33
- return;
34
- if (!Object.values(n).some((a) => a === e)) {
35
- console.error("Invalid notification type");
36
- return;
37
- }
38
- const s = {
39
- id: this.notificationId,
40
- message: t,
41
- sticky: o,
42
- type: e
43
- };
44
- o === !1 && (s.timer = window.setTimeout(() => this.dismiss(s.id), this.duration * 1e3)), this.notificationId++, this.notifications.push(s), r(this.hostElement);
45
- }
46
- /**
47
- * Clear all notifications.
48
- *
49
- * @returns {Promise<void>}
50
- */
51
- async clearAll() {
52
- this.notifications = [], r(this.hostElement);
53
- }
54
- /**
55
- * Dismiss a single notification.
56
- *
57
- * @param {number} id
58
- */
59
- dismiss(t) {
60
- this.notifications = this.notifications.filter((e) => e.id !== t), r(this.hostElement);
61
- }
62
- render() {
63
- return i(f, { class: this.position }, this.notifications.map((t) => this.renderNotification(t)));
64
- }
65
- /**
66
- * Get JSX for notification.
67
- *
68
- * @param {NotificationMessage} { id, message }
69
- * @returns {JSX.Element}
70
- */
71
- renderNotification({ id: t, message: e, type: o }) {
72
- return i("div", { class: "notification", role: "alert" }, o && o !== "none" ? this.renderIcon(o) : null, i("p", { class: "label" }, e), i("button", { type: "button", "aria-label": "Dismiss notification", class: "btn", onClick: () => this.dismiss(t) }, i("svg", { width: "14", height: "14", viewBox: "0 0 14 14", fill: "none", xmlns: "http://www.w3.org/2000/svg", role: "img", "aria-hidden": "true", focusable: "false" }, i("path", { d: "M14 1.41L12.59 0L7 5.59L1.41 0L0 1.41L5.59 7L0 12.59L1.41 14L7 8.41L12.59 14L14 12.59L8.41 7L14 1.41Z", fill: "#1E2025" }))));
73
- }
74
- /**
75
- * Get JSX for type-icon.
76
- *
77
- * @param {NotificationType} type
78
- * @returns {JSX.Element}
79
- */
80
- renderIcon(t) {
81
- return t === n.Error ? i("div", { class: "icon icon-type--error" }, i("svg", { width: "20", height: "20", viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg", role: "img", "aria-hidden": "true", focusable: "false" }, i("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M10 0C4.48 0 0 4.48 0 10C0 15.52 4.48 20 10 20C15.52 20 20 15.52 20 10C20 4.48 15.52 0 10 0ZM9 15V13H11V15H9ZM9 5V11H11V5H9Z", fill: "#FCFCFC" }))) : t === n.Success ? i("div", { class: "icon icon-type--success" }, i("svg", { width: "18", height: "14", viewBox: "0 0 18 14", fill: "none", xmlns: "http://www.w3.org/2000/svg", role: "img", "aria-hidden": "true", focusable: "false" }, i("path", { d: "M5.99997 11.17L1.82997 7L0.409973 8.41L5.99997 14L18 2L16.59 0.59L5.99997 11.17Z", fill: "#FCFCFC" }))) : t === n.Warning ? i("div", { class: "icon icon-type--warning" }, i("svg", { width: "22", height: "19", viewBox: "0 0 22 19", fill: "none", xmlns: "http://www.w3.org/2000/svg", role: "img", "aria-hidden": "true", focusable: "false" }, i("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M22 19L11 0L0 19H22ZM10 16V14H12V16H10ZM10 12H12V8H10V12Z", fill: "#FCFCFC" }))) : i("div", { class: "icon icon-type--info" }, i("svg", { width: "20", height: "20", viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg", role: "img", "aria-hidden": "true", focusable: "false" }, i("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M10 0C4.48 0 0 4.48 0 10C0 15.52 4.48 20 10 20C15.52 20 20 15.52 20 10C20 4.48 15.52 0 10 0ZM9 15V9H11V15H9ZM9 5V7H11V5H9Z", fill: "#FCFCFC" })));
82
- }
83
- get hostElement() {
84
- return d(this);
85
- }
86
- };
87
- g.style = h;
88
- export {
89
- g as mi_notification
90
- };
91
- //# sourceMappingURL=mi-notification.entry-43a2513d.mjs.map
@@ -1,82 +0,0 @@
1
- import { r as s, h as t } from "./reactcomponent-ad7142b4.mjs";
2
- import { R as i } from "./route-travel-mode.enum-7f4ce9c7-f43c56e7.mjs";
3
- import { U as a } from "./unit-system.enum-eaefb53e-2fda1d29.mjs";
4
- import "react";
5
- import "react-dom";
6
- (function() {
7
- try {
8
- var e = typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, n = new e.Error().stack;
9
- n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "32742bb1-c7a0-4c08-a187-1eed64116611", e._sentryDebugIdIdentifier = "sentry-dbid-32742bb1-c7a0-4c08-a187-1eed64116611");
10
- } catch {
11
- }
12
- })();
13
- const r = '.directions{border-bottom:1px solid #d1d5db;color:#1c1917;font-size:1rem;font-weight:400;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"}.directions-way-points{padding-top:24px;padding-bottom:24px;padding-left:16px;padding-right:16px;border-bottom:1px solid #f3f4f6}.directions-way-points span{display:block}.directions-way-points span:first-child{font-size:1.25rem;font-weight:500;line-height:1.5rem}.directions-way-points span:last-child{color:#6b7280}.directions-way-points span:last-child a{color:#3b82f6;text-decoration:none}.directions-details{padding:16px;display:flex;flex-direction:row;justify-content:space-between}.directions-details-numbers mi-time{font-weight:500}.directions-details-numbers-distance{color:#6b7280;font-size:0.875rem;font-weight:400;text-transform:lowercase}.directions-details-travel-mode-selector{display:flex;align-items:center;color:#3b82f6;text-decoration:none}.directions-details-travel-mode-selector mi-icon{width:24px;height:24px;margin-left:8px;background-color:#3b82f6}', o = class {
14
- constructor(e) {
15
- s(this, e), this.originName = void 0, this.destinationName = void 0, this.totalTravelTime = void 0, this.totalWalkingDistance = void 0, this.travelMode = i.Walking, this.unit = a.Metric, this.translations = {
16
- from: "From",
17
- to: "To",
18
- avoidStairs: "Avoid stairs",
19
- walk: "Walk",
20
- walking: "Walking",
21
- bike: "Bike",
22
- bicycling: "Bicycling",
23
- transit: "Transit",
24
- car: "Car",
25
- driving: "Driving"
26
- };
27
- }
28
- /**
29
- * Get travel mode as a string. Eg. "Walking", "Driving", "Transit", "Bicycling".
30
- *
31
- * @returns {string}
32
- */
33
- getTravelModeString() {
34
- switch (this.travelMode) {
35
- case i.Walking:
36
- return this.translations.walk;
37
- case i.Driving:
38
- return this.translations.car;
39
- case i.Transit:
40
- return this.translations.transit;
41
- case i.Bicycling:
42
- return this.translations.bike;
43
- default:
44
- return this.translations.walk;
45
- }
46
- }
47
- /**
48
- * Get icon name for travel mode.
49
- *
50
- * @returns {string}
51
- */
52
- getTravelModeIconName() {
53
- switch (this.travelMode) {
54
- case i.Walking:
55
- return "walk";
56
- case i.Driving:
57
- return "car";
58
- case i.Transit:
59
- return "transit";
60
- case i.Bicycling:
61
- return "bike";
62
- default:
63
- return "walk";
64
- }
65
- }
66
- render() {
67
- return t("div", { class: "directions" }, this.originName && this.destinationName ? this.renderWayPoints() : null, t("div", { class: "directions-details" }, this.totalTravelTime >= 0 || this.totalWalkingDistance >= 0 ? t("div", { class: "directions-details-numbers" }, this.totalTravelTime >= 0 ? t("div", null, t("mi-time", { seconds: this.totalTravelTime })) : null, this.totalWalkingDistance >= 0 ? t("div", { class: "directions-details-numbers-distance" }, t("mi-distance", { meters: this.totalWalkingDistance }), " ", this.translations.walking.toLowerCase()) : null) : null, t("a", { href: "#", class: "directions-details-travel-mode-selector" }, this.getTravelModeString(), t("mi-icon", { "icon-name": this.getTravelModeIconName() }))));
68
- }
69
- /**
70
- * Render direction way points.
71
- *
72
- * @returns {JSX.Element}
73
- */
74
- renderWayPoints() {
75
- return t("div", { class: "directions-way-points" }, t("span", null, this.translations.to, " ", this.destinationName), t("span", null, this.translations.from, " ", t("a", { href: "#" }, this.originName)));
76
- }
77
- };
78
- o.style = r;
79
- export {
80
- o as mi_route_instructions_heading
81
- };
82
- //# sourceMappingURL=mi-route-instructions-heading.entry-44d0821c.mjs.map
@@ -1,83 +0,0 @@
1
- import { r as s, h as e, H as r } from "./reactcomponent-ad7142b4.mjs";
2
- import { U as o } from "./unit-system.enum-eaefb53e-2fda1d29.mjs";
3
- import "react";
4
- import "react-dom";
5
- (function() {
6
- try {
7
- var t = typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, n = new t.Error().stack;
8
- n && (t._sentryDebugIds = t._sentryDebugIds || {}, t._sentryDebugIds[n] = "31294eba-4a02-436e-9bae-42e24efb251f", t._sentryDebugIdIdentifier = "sentry-dbid-31294eba-4a02-436e-9bae-42e24efb251f");
9
- } catch {
10
- }
11
- })();
12
- const l = ':host{display:flex;padding-top:12px;padding-bottom:12px;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"}.icon{width:48px;display:flex;justify-content:center}.icon mi-icon{width:24px;height:24px}.description{display:flex;flex-direction:column;flex:1}.description p{margin:0;padding-right:16px;font-size:0.875rem;word-break:break-all}.description__distance{display:flex;align-items:center}.description__distance mi-distance{font-size:0.75rem;padding-right:12px}.description__distance-border{flex:1;width:100%;height:0;border-bottom:1px solid #e5e7eb}', d = class {
13
- constructor(t) {
14
- s(this, t), this.maneuver = void 0, this.maneuverData = void 0, this.translations = void 0, this.translationsData = void 0, this.unit = o.Metric;
15
- }
16
- parseManeuverProp() {
17
- this.maneuverData = JSON.parse(this.maneuver);
18
- }
19
- parseTranslationsProp() {
20
- this.translationsData = JSON.parse(this.translations);
21
- }
22
- componentWillLoad() {
23
- this.parseManeuverProp(), this.parseTranslationsProp();
24
- }
25
- /**
26
- * Get maneuver name.
27
- *
28
- * @returns {string}
29
- */
30
- getManeuverName(t) {
31
- if (t.includes("straight"))
32
- return "straight";
33
- if (t.includes("sharp right"))
34
- return "sharp-right";
35
- if (t.includes("sharp left"))
36
- return "sharp-left";
37
- if (t.includes("slight right"))
38
- return "slight-right";
39
- if (t.includes("slight left"))
40
- return "slight-left";
41
- if (t.includes("right"))
42
- return "right";
43
- if (t.includes("left"))
44
- return "left";
45
- if (t.includes("uturn"))
46
- return "u-turn";
47
- if (t.includes("depart"))
48
- return "straight";
49
- }
50
- render() {
51
- return this.maneuverData && this.translationsData ? this.renderManeuver() : null;
52
- }
53
- /**
54
- * Render step.
55
- *
56
- * @returns {JSX.Element}
57
- */
58
- renderManeuver() {
59
- const t = {
60
- straight: this.translationsData.continueStraightAhead,
61
- left: `${this.translationsData.goLeft} ${this.translationsData.andContinue}`,
62
- "sharp-left": `${this.translationsData.goSharpLeft} ${this.translationsData.andContinue}`,
63
- "slight-left": `${this.translationsData.goSlightLeft} ${this.translationsData.andContinue}`,
64
- right: `${this.translationsData.goRight} ${this.translationsData.andContinue}`,
65
- "sharp-right": `${this.translationsData.goSharpRight} ${this.translationsData.andContinue}`,
66
- "slight-right": `${this.translationsData.goSlightRight} ${this.translationsData.andContinue}`,
67
- "u-turn": `${this.translationsData.turnAround} ${this.translationsData.andContinue}`
68
- // 'Turn around and continue'
69
- }, n = this.getManeuverName(this.maneuverData.maneuver.toLowerCase()), i = `arrow-${n}`, a = this.maneuverData.instructions ? this.maneuverData.instructions : t[n];
70
- return e(r, null, e("div", { class: "icon" }, n ? e("mi-icon", { part: "maneuver-icon", "icon-name": i }) : null), e("div", { class: "description" }, e("p", { part: "maneuver-description" }, a), e("div", { class: "description__distance" }, e("mi-distance", { part: "maneuver-description-distance", meters: this.maneuverData.distance.value, unit: this.unit }), e("span", { part: "maneuver-description-distance-border", class: "description__distance-border" }))));
71
- }
72
- static get watchers() {
73
- return {
74
- maneuver: ["parseManeuverProp"],
75
- translations: ["parseTranslationsProp"]
76
- };
77
- }
78
- };
79
- d.style = l;
80
- export {
81
- d as mi_route_instructions_maneuver_legacy
82
- };
83
- //# sourceMappingURL=mi-route-instructions-maneuver-legacy.entry-4c173878.mjs.map
@@ -1,83 +0,0 @@
1
- import { r as e, h as a, H as r } from "./reactcomponent-ad7142b4.mjs";
2
- import { U as o } from "./unit-system.enum-eaefb53e-2fda1d29.mjs";
3
- import "react";
4
- import "react-dom";
5
- (function() {
6
- try {
7
- var t = typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, n = new t.Error().stack;
8
- n && (t._sentryDebugIds = t._sentryDebugIds || {}, t._sentryDebugIds[n] = "d2260c26-a96c-4f2b-ab01-f533de617a97", t._sentryDebugIdIdentifier = "sentry-dbid-d2260c26-a96c-4f2b-ab01-f533de617a97");
9
- } catch {
10
- }
11
- })();
12
- const u = ":host{display:grid;gap:24px;grid-auto-flow:column;align-items:center;grid-template-columns:24px 1fr;border-top:1px solid #e5e7eb;padding:16px}.icon{width:24px;height:24px}.description{font-size:16px;display:grid;gap:8px;height:-moz-fit-content;height:fit-content}.description__text{margin:0;font-size:16px;word-break:break-all}.description mi-distance{font-size:12px;color:#6b7280}", l = class {
13
- constructor(t) {
14
- e(this, t), this.maneuver = void 0, this.maneuverData = void 0, this.translations = void 0, this.translationsData = void 0, this.unit = o.Metric;
15
- }
16
- parseManeuverProp() {
17
- this.maneuverData = JSON.parse(this.maneuver);
18
- }
19
- parseTranslationsProp() {
20
- this.translationsData = JSON.parse(this.translations);
21
- }
22
- componentWillLoad() {
23
- this.parseManeuverProp(), this.parseTranslationsProp();
24
- }
25
- /**
26
- * Get maneuver name.
27
- *
28
- * @returns {string}
29
- */
30
- getManeuverName(t) {
31
- if (t.includes("straight"))
32
- return "straight";
33
- if (t.includes("sharp right"))
34
- return "sharp-right";
35
- if (t.includes("sharp left"))
36
- return "sharp-left";
37
- if (t.includes("slight right"))
38
- return "slight-right";
39
- if (t.includes("slight left"))
40
- return "slight-left";
41
- if (t.includes("right"))
42
- return "right";
43
- if (t.includes("left"))
44
- return "left";
45
- if (t.includes("uturn"))
46
- return "u-turn";
47
- if (t.includes("depart"))
48
- return "straight";
49
- }
50
- render() {
51
- return this.maneuverData && this.translationsData ? this.renderManeuver() : null;
52
- }
53
- /**
54
- * Render step.
55
- *
56
- * @returns {JSX.Element}
57
- */
58
- renderManeuver() {
59
- const t = {
60
- straight: this.translationsData.continueStraightAhead,
61
- left: `${this.translationsData.goLeft} ${this.translationsData.andContinue}`,
62
- "sharp-left": `${this.translationsData.goSharpLeft} ${this.translationsData.andContinue}`,
63
- "slight-left": `${this.translationsData.goSlightLeft} ${this.translationsData.andContinue}`,
64
- right: `${this.translationsData.goRight} ${this.translationsData.andContinue}`,
65
- "sharp-right": `${this.translationsData.goSharpRight} ${this.translationsData.andContinue}`,
66
- "slight-right": `${this.translationsData.goSlightRight} ${this.translationsData.andContinue}`,
67
- "u-turn": `${this.translationsData.turnAround} ${this.translationsData.andContinue}`
68
- // 'Turn around and continue'
69
- }, n = this.getManeuverName(this.maneuverData.maneuver.toLowerCase()), i = `arrow-${n}`, s = this.maneuverData.instructions ? this.maneuverData.instructions : t[n];
70
- return a(r, null, a("div", { class: "icon" }, n ? a("mi-icon", { part: "maneuver-icon", "icon-name": i }) : null), a("div", { class: "description" }, a("div", { class: "description__text" }, s), a("mi-distance", { part: "maneuver-description-distance", meters: this.maneuverData.distance.value, unit: this.unit })));
71
- }
72
- static get watchers() {
73
- return {
74
- maneuver: ["parseManeuverProp"],
75
- translations: ["parseTranslationsProp"]
76
- };
77
- }
78
- };
79
- l.style = u;
80
- export {
81
- l as mi_route_instructions_maneuver
82
- };
83
- //# sourceMappingURL=mi-route-instructions-maneuver.entry-bc47957a.mjs.map
@@ -1,209 +0,0 @@
1
- import { r as n, c as r, h as s } from "./reactcomponent-ad7142b4.mjs";
2
- import { U as o } from "./unit-system.enum-eaefb53e-2fda1d29.mjs";
3
- import { c as l } from "./utils-ae714467-b97fee1b.mjs";
4
- import "react";
5
- import "react-dom";
6
- (function() {
7
- try {
8
- var t = typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, e = new t.Error().stack;
9
- e && (t._sentryDebugIds = t._sentryDebugIds || {}, t._sentryDebugIds[e] = "2251760d-9bc4-42dc-aa9f-5d7dad2122ac", t._sentryDebugIdIdentifier = "sentry-dbid-2251760d-9bc4-42dc-aa9f-5d7dad2122ac");
10
- } catch {
11
- }
12
- })();
13
- 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 {
14
- constructor(t) {
15
- 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;
16
- }
17
- parseStepProp() {
18
- this.step && (this.stepData = JSON.parse(this.step));
19
- }
20
- parseTranslationsProp() {
21
- this.translations && (this.translationsData = JSON.parse(this.translations));
22
- }
23
- componentWillLoad() {
24
- this.parseStepProp(), this.parseTranslationsProp();
25
- }
26
- /**
27
- * Render if there is step data.
28
- */
29
- render() {
30
- return this.stepData && this.translationsData ? this.renderStep() : null;
31
- }
32
- /**
33
- * Emits stepClicked event (if click target is not related to an action)
34
- * @param event Event
35
- */
36
- stepClickHandler(t) {
37
- if (Array.from(t.target.classList).includes("icon-toggle"))
38
- return;
39
- let e = null;
40
- t.target.dataset.maneuverIndex !== void 0 && (e = parseInt(t.target.dataset.maneuverIndex)), this.stepClicked.emit({ maneuverIndex: e });
41
- }
42
- /**
43
- * Render step part depending on travel mode.
44
- *
45
- * @returns {JSX.Element}
46
- */
47
- renderStep() {
48
- switch (this.stepData.travel_mode.toUpperCase()) {
49
- case "DRIVING":
50
- return this.renderDrivingStep();
51
- case "WALKING":
52
- return this.renderWalkingStep();
53
- case "BICYCLING":
54
- return this.renderBicyclingStep();
55
- case "TRANSIT":
56
- return this.renderTransitStep();
57
- default:
58
- return s("div", null, "Unknown travel mode: ", this.stepData.travel_mode);
59
- }
60
- }
61
- /**
62
- * Render the travel mode indicator and dotted/solid line.
63
- *
64
- * @returns {JSX.Element}
65
- */
66
- renderTravelMode() {
67
- if (this.isInternetExplorer)
68
- return null;
69
- let t;
70
- switch (this.stepData.travel_mode.toUpperCase()) {
71
- case "DRIVING":
72
- t = "car";
73
- break;
74
- case "WALKING":
75
- t = "walk";
76
- break;
77
- case "BICYCLING":
78
- t = "bike";
79
- break;
80
- case "TRANSIT":
81
- t = this.getTransitVehicleIconName();
82
- break;
83
- }
84
- return s("span", { part: "step-travel-mode", class: `step__travel-mode step__travel-mode--${this.stepData.travel_mode.toUpperCase() === "TRANSIT" ? "solid" : "dotted"}` }, s("span", { class: "step__travel-mode-icon" }, s("mi-icon", { part: "step-travel-mode-icon", "icon-name": t })));
85
- }
86
- /**
87
- * Get icon name for transit vehicle.
88
- *
89
- * @returns {string}
90
- */
91
- getTransitVehicleIconName() {
92
- var t, e;
93
- const i = (e = (t = this.stepData.transit_information) === null || t === void 0 ? void 0 : t.line.vehicle) === null || e === void 0 ? void 0 : e.type.toLowerCase();
94
- return i && ["boat", "bus", "railway", "train", "subway"].some((a) => a === i) ? i : "transit";
95
- }
96
- /**
97
- * Toggles visibility of sub steps (steps in steps)
98
- */
99
- toggleSubsteps() {
100
- this.substepsAreOpen = !this.substepsAreOpen;
101
- }
102
- /**
103
- * Render substeps if they should be visible.
104
- *
105
- * @returns {JSX.Element}
106
- */
107
- renderSubsteps() {
108
- return this.substepsAreOpen === !0 ? s("div", { class: "step__substeps" }, this.stepData.steps.map((t, e) => s("mi-route-instructions-maneuver-legacy", {
109
- "data-maneuver-index": e,
110
- maneuver: JSON.stringify(t),
111
- translations: this.translations,
112
- unit: this.unit,
113
- // @ts-ignore
114
- exportparts: `
115
- maneuver-icon,
116
- maneuver-description,
117
- maneuver-description-distance,
118
- maneuver-description-distance-border`
119
- }))) : null;
120
- }
121
- /**
122
- * Render the toggle button for the sub step expander.
123
- *
124
- * @returns {JSX.Element}
125
- */
126
- renderToggleButton() {
127
- return this.stepData.steps.length <= 0 || this.hideIndoorSubsteps === !0 && this.stepData.route_context.toLowerCase() === "insidebuilding" ? null : s("span", { class: `step__toggle ${this.substepsAreOpen ? "step__toggle--open" : ""}`, onClick: () => this.toggleSubsteps() }, this.isInternetExplorer ? "▼" : s("mi-icon", { part: "step-toggle", "icon-name": "toggle" }));
128
- }
129
- /**
130
- * Render time and distance part.
131
- *
132
- * @returns {JSX.Element}
133
- */
134
- renderTimeAndDistance() {
135
- return s("span", { part: "step-info", class: "step__distance-duration" }, s("mi-time", { seconds: this.stepData.duration.value, translations: `{"days":"${this.translationsData.days}","hours":"${this.translationsData.hours}","minutes":"${this.translationsData.minutes}"}` }), " · ", s("mi-distance", { meters: this.stepData.distance.value, unit: this.unit }), s("br", null));
136
- }
137
- /**
138
- * Render a driving step.
139
- *
140
- * @returns {JSX.Element}
141
- */
142
- renderDrivingStep() {
143
- return s("div", { class: "step", onClick: (t) => this.stepClickHandler(t) }, this.isInternetExplorer ? null : s("span", { class: "step__action-icon step__action-icon--circled" }, s("mi-icon", { "icon-name": "car" })), s("h3", { part: "step-heading", class: "step__heading" }, this.getStepHeading()), this.renderTravelMode(), s("div", { part: "step-description", class: "step__description" }, this.translationsData.drive, s("br", null), this.renderTimeAndDistance()), this.renderToggleButton(), this.renderSubsteps());
144
- }
145
- /**
146
- * Get display heading.
147
- *
148
- * @returns {string}
149
- */
150
- getStepHeading() {
151
- var t;
152
- const e = {
153
- driving: this.translationsData.drive,
154
- walking: this.translationsData.walk,
155
- bicycling: this.translationsData.bike
156
- };
157
- return !((t = this.stepData.steps[0]) === null || t === void 0) && t.instructions ? this.stepData.steps[0].instructions : e[this.stepData.travel_mode.toLowerCase()];
158
- }
159
- /**
160
- * Render a walking step.
161
- *
162
- *
163
- * @returns {JSX.Element}
164
- */
165
- renderWalkingStep() {
166
- let t, e;
167
- return this.stepData.parking === !0 ? (t = `${this.translationsData.park} ${this.stepData.label ? ` ${this.translationsData.at} ` + this.stepData.label : ""}`, e = "park") : this.stepData.highway && this.stepData.highway.toUpperCase() === "STEPS" ? (t = `${this.translationsData.takeStaircaseToLevel} ${this.stepData.end_location.floor_name}`, e = "stairs") : this.stepData.highway && this.stepData.highway.toUpperCase() === "LADDER" ? (t = `${this.translationsData.takeLadderToLevel} ${this.stepData.end_location.floor_name}`, e = "ladder") : this.stepData.highway && this.stepData.highway.toUpperCase() === "ESCALATOR" ? (t = `${this.translationsData.takeEscalatorToLevel} ${this.stepData.end_location.floor_name}`, e = "escalator") : this.stepData.highway && this.stepData.highway.toUpperCase() === "WHEELCHAIRRAMP" ? (t = `${this.translationsData.takeWheelchairRampToLevel} ${this.stepData.end_location.floor_name}`, e = "wheelchair-ramp") : this.stepData.highway && this.stepData.highway.toUpperCase() === "WHEELCHAIRLIFT" ? (t = `${this.translationsData.takeWheelchairLiftToLevel} ${this.stepData.end_location.floor_name}`, e = "wheelchair-lift") : this.stepData.highway && this.stepData.highway.toUpperCase() === "ELEVATOR" ? (t = `${this.translationsData.takeElevatorToLevel} ${this.stepData.end_location.floor_name}`, e = "elevator") : this.fromRouteContext === "InsideBuilding" && this.stepData.route_context === "Outside" ? (t = this.addStepContextNameToHeading(this.translationsData.exit, this.stepData.start_context), e = "exit") : this.fromRouteContext === "InsideBuilding" && this.stepData.route_context === "InsideBuilding" ? (t = this.getStepHeading(), e = "walk") : this.fromRouteContext === "Outside" && this.stepData.route_context === "Outside" && this.fromTravelMode.toUpperCase() === "TRANSIT" ? (t = this.fromTransitStop, e = "transit-stop") : this.fromRouteContext === "Outside" && this.stepData.route_context === "Outside" ? (t = this.getStepHeading(), e = "walk") : this.fromRouteContext === "Outside" && this.stepData.route_context === "InsideBuilding" ? (t = this.addStepContextNameToHeading(this.translationsData.enter, this.stepData.end_context), e = "enter") : (t = this.fromRouteContext, e = "circle"), s("div", { class: "step", onClick: (i) => this.stepClickHandler(i) }, this.isInternetExplorer ? null : s("span", { class: `step__action-icon ${e !== "circle" ? "step__action-icon--circled" : ""}` }, s("mi-icon", { "icon-name": e })), s("h3", { part: "step-heading", class: "step__heading" }, t), this.renderTravelMode(), s("div", { part: "step-description", class: "step__description" }, this.translationsData.walk, s("br", null), this.renderTimeAndDistance()), this.renderToggleButton(), this.renderSubsteps());
168
- }
169
- /**
170
- * Add building or venue name to the step heading
171
- * @param {string} heading
172
- * @param {StepContext} stepContext
173
- * @returns
174
- */
175
- addStepContextNameToHeading(t, e) {
176
- return e && (e.building ? t += ` ${e.building.buildingInfo.name} ${this.translationsData.building}` : e.venue && (t += ` ${e.venue.venueInfo.name} ${this.translationsData.venue}`)), t;
177
- }
178
- /**
179
- * Render a bicycling step.
180
- *
181
- * @returns {JSX.Element}
182
- */
183
- renderBicyclingStep() {
184
- return s("div", { class: "step", onClick: (t) => this.stepClickHandler(t) }, this.isInternetExplorer ? null : s("span", { class: "step__action-icon step__action-icon--circled" }, s("mi-icon", { "icon-name": "bike" })), s("h3", { part: "step-heading", class: "step__heading" }, this.getStepHeading()), this.renderTravelMode(), s("div", { part: "step-description", class: "step__description" }, this.translationsData.bike, s("br", null), this.renderTimeAndDistance()), this.renderToggleButton(), this.renderSubsteps());
185
- }
186
- /**
187
- * Render a transit step.
188
- *
189
- * @returns {JSX.Element}
190
- */
191
- renderTransitStep() {
192
- var t, e;
193
- return s("div", { class: "step", onClick: (i) => this.stepClickHandler(i) }, this.isInternetExplorer ? null : s("span", { class: "step__action-icon step__action-icon--circled" }, s("mi-icon", { "icon-name": "transit-stop" })), s("h3", { part: "step-heading", class: "step__heading" }, this.stepData.instructions), this.renderTravelMode(), s("div", { part: "step-description", class: "step__description" }, this.stepData.transit_information.line.short_name ? s("span", { class: "step__short-name", style: {
194
- backgroundColor: !((t = this.stepData.transit_information.line) === null || t === void 0) && t.color ? this.stepData.transit_information.line.color : null,
195
- color: !((e = this.stepData.transit_information.line) === null || e === void 0) && e.text_color ? this.stepData.transit_information.line.text_color : null
196
- } }, this.stepData.transit_information.line.short_name) : null, this.stepData.transit_information.headsign ? this.stepData.transit_information.headsign : null, s("br", null), s("span", { part: "step-info", class: "step__distance-duration" }, s("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());
197
- }
198
- static get watchers() {
199
- return {
200
- step: ["parseStepProp"],
201
- translations: ["parseTranslationsProp"]
202
- };
203
- }
204
- };
205
- d.style = p;
206
- export {
207
- d as mi_route_instructions_step_legacy
208
- };
209
- //# sourceMappingURL=mi-route-instructions-step-legacy.entry-aaac79d0.mjs.map