@mapsindoors/map-template 1.95.1 → 1.95.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.
- package/dist/{GoogleMapsMap-C5n6Bgtp.mjs → GoogleMapsMap-Dkn60-_e.mjs} +2 -2
- package/dist/{MapboxMap-UCqzt1AC.mjs → MapboxMap-B1oo7IUm.mjs} +2 -2
- package/dist/_commonjsHelpers-B85MJLTf.js +5 -0
- package/dist/app-globals-DQuL1Twl.js +3 -0
- package/dist/combo-box-item.entry.js +8 -10
- package/dist/icon-DT_sDkmK.js +11 -0
- package/dist/index-BZQHyS7V.js +1701 -0
- package/dist/loader.js +7 -14
- package/dist/mapsindoors-react.es.js +1 -1
- package/dist/mapsindoors-react.umd.js +175 -175
- package/dist/mapsindoors-webcomponent.es.js +2916 -2904
- package/dist/mi-card_2.entry.js +23 -18
- package/dist/mi-chip.entry.js +25 -16
- package/dist/mi-column.entry.js +47 -23
- package/dist/mi-combo-box.entry.js +412 -379
- package/dist/mi-components.js +15 -12
- package/dist/mi-data-table.entry.js +298 -278
- package/dist/mi-distance_2.entry.js +58 -56
- package/dist/mi-dropdown-item.entry.js +8 -10
- package/dist/mi-dropdown.entry.js +525 -481
- package/dist/mi-floor-selector.entry.js +183 -180
- package/dist/mi-keyboard.entry.js +207 -186
- package/dist/mi-list-item-category.entry.js +44 -41
- package/dist/mi-list-item-location.entry.js +168 -162
- package/dist/mi-list.entry.js +56 -48
- package/dist/mi-location-booking.entry.js +320 -295
- package/dist/mi-location-info.entry.js +61 -53
- package/dist/mi-map-googlemaps.entry.js +369 -324
- package/dist/mi-map-mapbox.entry.js +502 -439
- package/dist/mi-metric-card.entry.js +50 -37
- package/dist/mi-my-position.entry.js +2341 -874
- package/dist/mi-notification.entry.js +112 -102
- package/dist/mi-route-instructions-heading.entry.js +70 -65
- package/dist/mi-route-instructions-maneuver-legacy.entry.js +80 -76
- package/dist/mi-route-instructions-maneuver.entry.js +80 -76
- package/dist/mi-route-instructions-step-legacy.entry.js +296 -282
- package/dist/mi-route-instructions-step.entry.js +313 -292
- package/dist/mi-route-instructions.entry.js +167 -150
- package/dist/mi-scroll-buttons.entry.js +104 -98
- package/dist/mi-search.entry.js +366 -325
- package/dist/mi-share-sms.entry.js +82 -70
- package/dist/mi-step-switcher.entry.js +34 -25
- package/dist/mi-tab-panel.entry.js +18 -18
- package/dist/mi-tab.entry.js +5 -7
- package/dist/mi-tabs.entry.js +42 -40
- package/dist/mi-time.entry.js +49 -49
- package/dist/mi-variables-CDNvnTkH.js +5 -0
- package/dist/{reactcomponent-DQsjxRIN.mjs → reactcomponent-2Oa1vSiK.mjs} +8996 -8660
- package/dist/route-travel-mode.enum-BvqP1fpw.js +9 -0
- package/dist/sort-order.enum-jsLAbYWg.js +566 -0
- package/dist/{unit-system.enum-eaefb53e.js → unit-system.enum-BwPgAWqL.js} +2 -2
- package/dist/utils-DNHzysQ6.js +61 -0
- package/package.json +1 -1
- package/dist/_commonjsHelpers-ba3f0406.js +0 -21
- package/dist/icon-b8d01d6f.js +0 -24
- package/dist/index-7e9696f3.js +0 -1678
- package/dist/mi-variables-9a6c8d4d.js +0 -6
- package/dist/polyfills/core-js.js +0 -11
- package/dist/polyfills/css-shim.js +0 -1
- package/dist/polyfills/dom.js +0 -79
- package/dist/polyfills/es5-html-element.js +0 -1
- package/dist/polyfills/index.js +0 -34
- package/dist/polyfills/system.js +0 -6
- package/dist/route-travel-mode.enum-7f4ce9c7.js +0 -9
- package/dist/sort-order.enum-64ce8998.js +0 -552
- package/dist/utils-ae714467.js +0 -61
|
@@ -1,82 +1,86 @@
|
|
|
1
|
-
import { r as registerInstance, h, H as Host } from './index-
|
|
2
|
-
import { U as UnitSystem } from './unit-system.enum-
|
|
1
|
+
import { r as registerInstance, h, H as Host } from './index-BZQHyS7V.js';
|
|
2
|
+
import { U as UnitSystem } from './unit-system.enum-BwPgAWqL.js';
|
|
3
3
|
|
|
4
|
-
const routeInstructionsManeuverCss =
|
|
4
|
+
const routeInstructionsManeuverCss = () => `: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}`;
|
|
5
5
|
|
|
6
6
|
const RouteInstructionsManeuver = class {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
7
|
+
constructor(hostRef) {
|
|
8
|
+
registerInstance(this, hostRef);
|
|
9
|
+
/**
|
|
10
|
+
* Set imperial or metric as default unit system.
|
|
11
|
+
* @type {UnitSystem} 'imperial' or 'metric'
|
|
12
|
+
*/
|
|
13
|
+
this.unit = UnitSystem.Metric;
|
|
14
|
+
}
|
|
15
|
+
parseManeuverProp() {
|
|
16
|
+
this.maneuverData = JSON.parse(this.maneuver);
|
|
17
|
+
}
|
|
18
|
+
parseTranslationsProp() {
|
|
19
|
+
this.translationsData = JSON.parse(this.translations);
|
|
20
|
+
}
|
|
21
|
+
componentWillLoad() {
|
|
22
|
+
this.parseManeuverProp();
|
|
23
|
+
this.parseTranslationsProp();
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Get maneuver name.
|
|
27
|
+
*
|
|
28
|
+
* @returns {string}
|
|
29
|
+
*/
|
|
30
|
+
getManeuverName(maneuver) {
|
|
31
|
+
if (maneuver.includes('straight'))
|
|
32
|
+
return 'straight';
|
|
33
|
+
if (maneuver.includes('sharp right'))
|
|
34
|
+
return 'sharp-right';
|
|
35
|
+
if (maneuver.includes('sharp left'))
|
|
36
|
+
return 'sharp-left';
|
|
37
|
+
if (maneuver.includes('slight right'))
|
|
38
|
+
return 'slight-right';
|
|
39
|
+
if (maneuver.includes('slight left'))
|
|
40
|
+
return 'slight-left';
|
|
41
|
+
if (maneuver.includes('right'))
|
|
42
|
+
return 'right';
|
|
43
|
+
if (maneuver.includes('left'))
|
|
44
|
+
return 'left';
|
|
45
|
+
if (maneuver.includes('uturn'))
|
|
46
|
+
return 'u-turn';
|
|
47
|
+
if (maneuver.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 maneuverStrings = {
|
|
60
|
+
'straight': this.translationsData.continueStraightAhead, // 'Continue straight ahead',
|
|
61
|
+
'left': `${this.translationsData.goLeft} ${this.translationsData.andContinue}`, // 'Go left and continue',
|
|
62
|
+
'sharp-left': `${this.translationsData.goSharpLeft} ${this.translationsData.andContinue}`, // 'Go sharp left and continue',
|
|
63
|
+
'slight-left': `${this.translationsData.goSlightLeft} ${this.translationsData.andContinue}`, // 'Go slight left and continue',
|
|
64
|
+
'right': `${this.translationsData.goRight} ${this.translationsData.andContinue}`, // 'Go right and continue',
|
|
65
|
+
'sharp-right': `${this.translationsData.goSharpRight} ${this.translationsData.andContinue}`, // 'Go sharp right and continue',
|
|
66
|
+
'slight-right': `${this.translationsData.goSlightRight} ${this.translationsData.andContinue}`, // 'Go slight right and continue',
|
|
67
|
+
'u-turn': `${this.translationsData.turnAround} ${this.translationsData.andContinue}`, // 'Turn around and continue'
|
|
68
|
+
};
|
|
69
|
+
const maneuver = this.getManeuverName(this.maneuverData.maneuver.toLowerCase());
|
|
70
|
+
const iconName = `arrow-${maneuver}`;
|
|
71
|
+
// Check if the instructions property has a value otherwise fallback to maneuver property
|
|
72
|
+
const translatedManeuver = this.maneuverData.instructions ? this.maneuverData.instructions : maneuverStrings[maneuver];
|
|
73
|
+
return (h(Host, null, h("div", { class: "icon" }, maneuver ? h("mi-icon", { part: "maneuver-icon", "icon-name": iconName }) : null), h("div", { class: "description" }, h("div", { class: "description__text" }, translatedManeuver), h("mi-distance", { part: "maneuver-description-distance", meters: this.maneuverData.distance.value, unit: this.unit }))));
|
|
74
|
+
}
|
|
75
|
+
static get watchers() { return {
|
|
76
|
+
"maneuver": [{
|
|
77
|
+
"parseManeuverProp": 0
|
|
78
|
+
}],
|
|
79
|
+
"translations": [{
|
|
80
|
+
"parseTranslationsProp": 0
|
|
81
|
+
}]
|
|
82
|
+
}; }
|
|
79
83
|
};
|
|
80
|
-
RouteInstructionsManeuver.style = routeInstructionsManeuverCss;
|
|
84
|
+
RouteInstructionsManeuver.style = routeInstructionsManeuverCss();
|
|
81
85
|
|
|
82
86
|
export { RouteInstructionsManeuver as mi_route_instructions_maneuver };
|