@mapsindoors/map-template 1.8.2 → 1.9.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.
- package/dist/{combo-box-item.entry-89372d9b.mjs → combo-box-item.entry-491f3a23.mjs} +1 -1
- package/dist/{combo-box-item.entry-51ec0deb.mjs → combo-box-item.entry-a27edde5.mjs} +1 -1
- package/dist/mapsindoors-react.es.js +2 -2
- package/dist/mapsindoors-react.umd.js +79 -79
- package/dist/mapsindoors-webcomponent.es.js +2 -2
- package/dist/mapsindoors-webcomponent.umd.js +51 -51
- package/dist/{mi-card_2.entry-80d405d2.mjs → mi-card_2.entry-b3cae653.mjs} +1 -1
- package/dist/{mi-card_2.entry-fa326ba5.mjs → mi-card_2.entry-f9e647ca.mjs} +1 -1
- package/dist/{mi-chip.entry-515d007c.mjs → mi-chip.entry-a420c55c.mjs} +1 -1
- package/dist/{mi-chip.entry-b4a69e78.mjs → mi-chip.entry-c6e8dfda.mjs} +1 -1
- package/dist/{mi-column.entry-1aca0c78.mjs → mi-column.entry-5200d1f6.mjs} +1 -1
- package/dist/{mi-column.entry-68b11fe5.mjs → mi-column.entry-c1afada2.mjs} +1 -1
- package/dist/{mi-combo-box.entry-998196cc.mjs → mi-combo-box.entry-c8c842b6.mjs} +1 -1
- package/dist/{mi-combo-box.entry-dedfa99d.mjs → mi-combo-box.entry-ccddcd3e.mjs} +1 -1
- package/dist/{mi-data-table.entry-73086bfd.mjs → mi-data-table.entry-1a3da6c8.mjs} +1 -1
- package/dist/{mi-data-table.entry-3718fe61.mjs → mi-data-table.entry-e0fa53db.mjs} +1 -1
- package/dist/{mi-distance_2.entry-7a7254cc.mjs → mi-distance_2.entry-6fd1425f.mjs} +4 -4
- package/dist/{mi-distance_2.entry-1a7d85cc.mjs → mi-distance_2.entry-fda0b47c.mjs} +4 -4
- package/dist/{mi-dropdown-item.entry-19c32445.mjs → mi-dropdown-item.entry-4d659dbf.mjs} +1 -1
- package/dist/{mi-dropdown-item.entry-45636ef7.mjs → mi-dropdown-item.entry-8534b3e9.mjs} +1 -1
- package/dist/{mi-dropdown.entry-69b9e67c.mjs → mi-dropdown.entry-1ea98a50.mjs} +1 -1
- package/dist/{mi-dropdown.entry-aef74a0e.mjs → mi-dropdown.entry-7a129220.mjs} +1 -1
- package/dist/{mi-floor-selector.entry-67ea5b4e.mjs → mi-floor-selector.entry-a6a1a59b.mjs} +1 -1
- package/dist/{mi-floor-selector.entry-2fad6805.mjs → mi-floor-selector.entry-c2dd39b8.mjs} +1 -1
- package/dist/{mi-keyboard.entry-cf1e9ac1.mjs → mi-keyboard.entry-21ad76e3.mjs} +1 -1
- package/dist/{mi-keyboard.entry-b6619db9.mjs → mi-keyboard.entry-3ff05804.mjs} +1 -1
- package/dist/{mi-list-item-category.entry-da0adc83.mjs → mi-list-item-category.entry-1a7d378a.mjs} +1 -1
- package/dist/{mi-list-item-category.entry-61bb2ad3.mjs → mi-list-item-category.entry-acb3a4e6.mjs} +1 -1
- package/dist/{mi-list-item-location.entry-2f53e749.mjs → mi-list-item-location.entry-4541e6b0.mjs} +1 -1
- package/dist/{mi-list-item-location.entry-ff46036b.mjs → mi-list-item-location.entry-66de0f61.mjs} +1 -1
- package/dist/{mi-list.entry-7daf35fb.mjs → mi-list.entry-0a5883c0.mjs} +1 -1
- package/dist/{mi-list.entry-5aff4202.mjs → mi-list.entry-49686cb4.mjs} +1 -1
- package/dist/{mi-location-booking.entry-b48195cd.mjs → mi-location-booking.entry-447ed30f.mjs} +1 -1
- package/dist/{mi-location-booking.entry-24f4144f.mjs → mi-location-booking.entry-fbb21d88.mjs} +1 -1
- package/dist/{mi-location-info.entry-7c441d75.mjs → mi-location-info.entry-1e179751.mjs} +1 -1
- package/dist/{mi-location-info.entry-959ac6d9.mjs → mi-location-info.entry-76a928d0.mjs} +1 -1
- package/dist/{mi-map-googlemaps.entry-fa4ec7eb.mjs → mi-map-googlemaps.entry-2d0dafa9.mjs} +1 -1
- package/dist/{mi-map-googlemaps.entry-1b35a901.mjs → mi-map-googlemaps.entry-82d5c9f4.mjs} +1 -1
- package/dist/{mi-map-mapbox.entry-977fd311.mjs → mi-map-mapbox.entry-7ff6abbb.mjs} +1 -1
- package/dist/{mi-map-mapbox.entry-7aa23da3.mjs → mi-map-mapbox.entry-c251cd7f.mjs} +1 -1
- package/dist/{mi-metric-card.entry-cd042b09.mjs → mi-metric-card.entry-582fbaa9.mjs} +1 -1
- package/dist/{mi-metric-card.entry-f7e657ea.mjs → mi-metric-card.entry-a1083af0.mjs} +1 -1
- package/dist/{mi-my-position.entry-a20cffb4.mjs → mi-my-position.entry-45dff65a.mjs} +1 -1
- package/dist/{mi-my-position.entry-e51c2125.mjs → mi-my-position.entry-cb79266c.mjs} +1 -1
- package/dist/{mi-notification.entry-9133e431.mjs → mi-notification.entry-502af68b.mjs} +1 -1
- package/dist/{mi-notification.entry-d762eceb.mjs → mi-notification.entry-cfeb1dde.mjs} +1 -1
- package/dist/{mi-route-instructions-heading.entry-db862537.mjs → mi-route-instructions-heading.entry-79ab86df.mjs} +1 -1
- package/dist/{mi-route-instructions-heading.entry-788bfaf2.mjs → mi-route-instructions-heading.entry-d59618f0.mjs} +1 -1
- package/dist/{mi-route-instructions-maneuver_2.entry-2b201d3f.mjs → mi-route-instructions-maneuver-legacy.entry-59cf8ab1.mjs} +8 -48
- package/dist/{mi-route-instructions-maneuver_2.entry-3e9106ed.mjs → mi-route-instructions-maneuver-legacy.entry-8a4e4a5f.mjs} +8 -48
- package/dist/mi-route-instructions-maneuver.entry-3982d45a.mjs +73 -0
- package/dist/mi-route-instructions-maneuver.entry-49aa250a.mjs +75 -0
- package/dist/{mi-route-instructions-step-legacy.entry-5e9c3869.mjs → mi-route-instructions-step-legacy.entry-c7d4c75d.mjs} +2 -2
- package/dist/{mi-route-instructions-step-legacy.entry-3b111960.mjs → mi-route-instructions-step-legacy.entry-fc17f947.mjs} +2 -2
- package/dist/{mi-route-instructions-step.entry-9b5783de.mjs → mi-route-instructions-step.entry-3a05e2f2.mjs} +39 -17
- package/dist/{mi-route-instructions-step.entry-527d8816.mjs → mi-route-instructions-step.entry-b6001884.mjs} +39 -17
- package/dist/{mi-route-instructions.entry-863fdf04.mjs → mi-route-instructions.entry-61376d64.mjs} +1 -1
- package/dist/{mi-route-instructions.entry-a1c07e37.mjs → mi-route-instructions.entry-f7474ade.mjs} +1 -1
- package/dist/{mi-scroll-buttons.entry-8dd35ab8.mjs → mi-scroll-buttons.entry-68a2990a.mjs} +1 -1
- package/dist/{mi-scroll-buttons.entry-a24ce4b9.mjs → mi-scroll-buttons.entry-973345e4.mjs} +1 -1
- package/dist/{mi-search.entry-34f6d81b.mjs → mi-search.entry-0617eb4a.mjs} +1 -1
- package/dist/{mi-search.entry-413f35c9.mjs → mi-search.entry-62930342.mjs} +1 -1
- package/dist/{mi-share-sms.entry-05347a69.mjs → mi-share-sms.entry-41f6a2de.mjs} +1 -1
- package/dist/{mi-share-sms.entry-87d0cc49.mjs → mi-share-sms.entry-47a67d3a.mjs} +1 -1
- package/dist/{mi-step-switcher.entry-a35d3b34.mjs → mi-step-switcher.entry-74ff6694.mjs} +1 -1
- package/dist/{mi-step-switcher.entry-12abf62a.mjs → mi-step-switcher.entry-9f9ca195.mjs} +1 -1
- package/dist/{mi-tab-panel.entry-e2b46da4.mjs → mi-tab-panel.entry-48dd4dc5.mjs} +1 -1
- package/dist/{mi-tab-panel.entry-10746cef.mjs → mi-tab-panel.entry-fcb462fa.mjs} +1 -1
- package/dist/{mi-tab.entry-6c72fc7a.mjs → mi-tab.entry-1e38461e.mjs} +1 -1
- package/dist/{mi-tab.entry-90e1c929.mjs → mi-tab.entry-cd6c7e32.mjs} +1 -1
- package/dist/{mi-tabs.entry-713b336a.mjs → mi-tabs.entry-50fd9e9c.mjs} +1 -1
- package/dist/{mi-tabs.entry-dbc6bd81.mjs → mi-tabs.entry-b59c57d9.mjs} +1 -1
- package/dist/mi-time.entry-e0bac6a6.mjs +43 -0
- package/dist/mi-time.entry-ee167fd1.mjs +45 -0
- package/dist/{reactcomponent-6ee301d4.mjs → reactcomponent-74fb79b5.mjs} +7184 -7129
- package/dist/{webcomponent-11ee81df.mjs → webcomponent-4e32af2f.mjs} +6466 -6411
- package/package.json +1 -1
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { r as e, h as l } from "./reactcomponent-74fb79b5.mjs";
|
|
2
|
+
import "react";
|
|
3
|
+
import "react-dom";
|
|
4
|
+
const D = class {
|
|
5
|
+
constructor(t) {
|
|
6
|
+
e(this, t), this.seconds = void 0, this.translations = void 0, this.translationsData = void 0;
|
|
7
|
+
}
|
|
8
|
+
setTranslations() {
|
|
9
|
+
this.translations ? this.translationsData = JSON.parse(this.translations) : this.translationsData = { days: "d", hours: "h", minutes: "min" };
|
|
10
|
+
}
|
|
11
|
+
componentWillLoad() {
|
|
12
|
+
this.setTranslations();
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Get display string in days, hours, and minutes, eg. "1 d 23 h 4 min".
|
|
16
|
+
* Minimum display value is 1 minute.
|
|
17
|
+
*
|
|
18
|
+
* @param {number} seconds Duration in seconds.
|
|
19
|
+
* @returns {string}
|
|
20
|
+
*/
|
|
21
|
+
getDurationDisplayString(t) {
|
|
22
|
+
const n = Math.floor(t / 86400), a = Math.floor(t % 86400 / 3600), i = Math.floor(t % 86400 % 3600 / 60), r = n > 0 ? `${n} ${this.translationsData.days} ` : "", o = a > 0 ? `${a} ${this.translationsData.hours} ` : "";
|
|
23
|
+
let s = i > 0 ? `${i} ${this.translationsData.minutes}` : "";
|
|
24
|
+
return !r && !o && !s && (s = "1 min"), `${r}${o}${s}`.trim();
|
|
25
|
+
}
|
|
26
|
+
render() {
|
|
27
|
+
return this.seconds >= 0 && this.translationsData ? this.renderDuration() : null;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Render formatted duration string.
|
|
31
|
+
*
|
|
32
|
+
* @returns {JSX.Element}
|
|
33
|
+
*/
|
|
34
|
+
renderDuration() {
|
|
35
|
+
return l("span", null, this.getDurationDisplayString(this.seconds));
|
|
36
|
+
}
|
|
37
|
+
static get watchers() {
|
|
38
|
+
return {
|
|
39
|
+
translations: ["setTranslations"]
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
};
|
|
43
|
+
export {
|
|
44
|
+
D as mi_time
|
|
45
|
+
};
|