@mapsindoors/map-template 1.0.0-rc.2 → 1.0.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/README.md +2 -1
- package/dist/{combo-box-item.entry-59124312.mjs → combo-box-item.entry-95ce1f59.mjs} +1 -1
- package/dist/{combo-box-item.entry-8762d714.mjs → combo-box-item.entry-dbddbad6.mjs} +1 -1
- package/dist/mapsindoors-react.es.js +1 -1
- package/dist/mapsindoors-react.umd.js +31 -31
- package/dist/mapsindoors-webcomponent.es.js +1 -1
- package/dist/mapsindoors-webcomponent.umd.js +58 -58
- package/dist/{mi-card_2.entry-3de1663c.mjs → mi-card_2.entry-19c978a9.mjs} +1 -1
- package/dist/{mi-card_2.entry-508f65b2.mjs → mi-card_2.entry-edc337b6.mjs} +1 -1
- package/dist/{mi-chip.entry-74b3118c.mjs → mi-chip.entry-4e72635b.mjs} +1 -1
- package/dist/{mi-chip.entry-8bfee95c.mjs → mi-chip.entry-a27bcae2.mjs} +1 -1
- package/dist/{mi-column.entry-6a55a95f.mjs → mi-column.entry-f0216749.mjs} +1 -1
- package/dist/{mi-column.entry-9b46d3b8.mjs → mi-column.entry-fff64658.mjs} +1 -1
- package/dist/{mi-combo-box.entry-5cd60eff.mjs → mi-combo-box.entry-1df97caf.mjs} +1 -1
- package/dist/{mi-combo-box.entry-144ed7be.mjs → mi-combo-box.entry-d5c49dbf.mjs} +1 -1
- package/dist/{mi-data-table.entry-ff1bd14d.mjs → mi-data-table.entry-075c3b63.mjs} +1 -1
- package/dist/{mi-data-table.entry-0ace7eb1.mjs → mi-data-table.entry-1a2a465b.mjs} +1 -1
- package/dist/{mi-distance_2.entry-33e65994.mjs → mi-distance_2.entry-67441b8d.mjs} +1 -1
- package/dist/{mi-distance_2.entry-02d887f0.mjs → mi-distance_2.entry-99adc361.mjs} +1 -1
- package/dist/{mi-dropdown-item.entry-aeae3cf1.mjs → mi-dropdown-item.entry-62debc4c.mjs} +1 -1
- package/dist/{mi-dropdown-item.entry-508c6605.mjs → mi-dropdown-item.entry-6c3c44c7.mjs} +1 -1
- package/dist/{mi-dropdown.entry-e1325610.mjs → mi-dropdown.entry-8eae4521.mjs} +1 -1
- package/dist/{mi-dropdown.entry-43258637.mjs → mi-dropdown.entry-b0e299e8.mjs} +1 -1
- package/dist/{mi-keyboard.entry-60e47fb9.mjs → mi-keyboard.entry-b730227d.mjs} +1 -1
- package/dist/{mi-keyboard.entry-e320a1e8.mjs → mi-keyboard.entry-e869affa.mjs} +1 -1
- package/dist/{mi-list-item-category.entry-6aa84b17.mjs → mi-list-item-category.entry-8896172f.mjs} +1 -1
- package/dist/{mi-list-item-category.entry-b5f547b8.mjs → mi-list-item-category.entry-955e75d9.mjs} +1 -1
- package/dist/{mi-list-item-location.entry-72f8d5db.mjs → mi-list-item-location.entry-da7df958.mjs} +1 -1
- package/dist/{mi-list-item-location.entry-15ec9c7e.mjs → mi-list-item-location.entry-f36e8cf1.mjs} +1 -1
- package/dist/{mi-list.entry-656130ea.mjs → mi-list.entry-15713742.mjs} +1 -1
- package/dist/{mi-list.entry-6eddb682.mjs → mi-list.entry-6e9a5556.mjs} +1 -1
- package/dist/{mi-location-booking.entry-4424927f.mjs → mi-location-booking.entry-49bbfc83.mjs} +1 -1
- package/dist/{mi-location-booking.entry-36f5d6a4.mjs → mi-location-booking.entry-a8ab6205.mjs} +1 -1
- package/dist/{mi-location-info.entry-2f1c328d.mjs → mi-location-info.entry-366b91be.mjs} +1 -1
- package/dist/{mi-location-info.entry-78f0dbde.mjs → mi-location-info.entry-ed98b07a.mjs} +1 -1
- package/dist/{mi-map-googlemaps.entry-73b0ae03.mjs → mi-map-googlemaps.entry-172794d0.mjs} +1 -1
- package/dist/{mi-map-googlemaps.entry-6cb264de.mjs → mi-map-googlemaps.entry-a71fa364.mjs} +1 -1
- package/dist/{mi-map-mapbox.entry-7a41963d.mjs → mi-map-mapbox.entry-45457559.mjs} +1 -1
- package/dist/{mi-map-mapbox.entry-a53b3e68.mjs → mi-map-mapbox.entry-c77a7266.mjs} +1 -1
- package/dist/{mi-metric-card.entry-1215b29e.mjs → mi-metric-card.entry-32f831b0.mjs} +1 -1
- package/dist/{mi-metric-card.entry-3d06eaea.mjs → mi-metric-card.entry-55487c97.mjs} +1 -1
- package/dist/{mi-notification.entry-20418bdd.mjs → mi-notification.entry-44dee5c8.mjs} +1 -1
- package/dist/{mi-notification.entry-29b28ba8.mjs → mi-notification.entry-eadf8dc9.mjs} +1 -1
- package/dist/{mi-route-instructions-heading.entry-60a49210.mjs → mi-route-instructions-heading.entry-a4e69ea6.mjs} +1 -1
- package/dist/{mi-route-instructions-heading.entry-874593f4.mjs → mi-route-instructions-heading.entry-e612f18b.mjs} +1 -1
- package/dist/{mi-route-instructions-maneuver_2.entry-383704ad.mjs → mi-route-instructions-maneuver_2.entry-9a0ff4c4.mjs} +1 -1
- package/dist/{mi-route-instructions-maneuver_2.entry-80c51e6a.mjs → mi-route-instructions-maneuver_2.entry-a8e830aa.mjs} +1 -1
- package/dist/{mi-route-instructions-step-legacy.entry-eff068ed.mjs → mi-route-instructions-step-legacy.entry-27292122.mjs} +1 -1
- package/dist/{mi-route-instructions-step-legacy.entry-785cb60b.mjs → mi-route-instructions-step-legacy.entry-4591ba3d.mjs} +1 -1
- package/dist/{mi-route-instructions-step.entry-057d5c48.mjs → mi-route-instructions-step.entry-09d5478d.mjs} +1 -1
- package/dist/{mi-route-instructions-step.entry-8ecfdbd0.mjs → mi-route-instructions-step.entry-2cce3752.mjs} +1 -1
- package/dist/{mi-route-instructions.entry-2ded8acb.mjs → mi-route-instructions.entry-2bc0ccf6.mjs} +1 -1
- package/dist/{mi-route-instructions.entry-0628d220.mjs → mi-route-instructions.entry-b0cadde4.mjs} +1 -1
- package/dist/{mi-scroll-buttons.entry-55fa9459.mjs → mi-scroll-buttons.entry-1f0e7f57.mjs} +1 -1
- package/dist/{mi-scroll-buttons.entry-5ebd3f9b.mjs → mi-scroll-buttons.entry-822cb937.mjs} +1 -1
- package/dist/{mi-search.entry-140efd52.mjs → mi-search.entry-8462b146.mjs} +1 -1
- package/dist/{mi-search.entry-b04e74ff.mjs → mi-search.entry-b0ed69a4.mjs} +1 -1
- package/dist/{mi-share-sms.entry-ced7f275.mjs → mi-share-sms.entry-15b65316.mjs} +1 -1
- package/dist/{mi-share-sms.entry-26650f3b.mjs → mi-share-sms.entry-f455e43c.mjs} +1 -1
- package/dist/{mi-step-switcher.entry-c9e28e79.mjs → mi-step-switcher.entry-1a3cca1d.mjs} +1 -1
- package/dist/{mi-step-switcher.entry-812a5096.mjs → mi-step-switcher.entry-5001def0.mjs} +1 -1
- package/dist/{mi-tab-panel.entry-bde9bd39.mjs → mi-tab-panel.entry-4720796b.mjs} +1 -1
- package/dist/{mi-tab-panel.entry-63c34f28.mjs → mi-tab-panel.entry-e06e834d.mjs} +1 -1
- package/dist/{mi-tab.entry-1767468e.mjs → mi-tab.entry-93c67c99.mjs} +1 -1
- package/dist/{mi-tab.entry-b5ac50ac.mjs → mi-tab.entry-a6fccd52.mjs} +1 -1
- package/dist/{mi-tabs.entry-1209c5bb.mjs → mi-tabs.entry-0880cd97.mjs} +1 -1
- package/dist/{mi-tabs.entry-1b8327bf.mjs → mi-tabs.entry-32262f70.mjs} +1 -1
- package/dist/{reactcomponent-aa96e777.mjs → reactcomponent-2798f651.mjs} +2900 -2893
- package/dist/{webcomponent-ac588828.mjs → webcomponent-5ad04e2a.mjs} +6482 -6475
- package/package.json +6 -2
- package/dist/combo-box-item.entry-92232c29.mjs +0 -12
- package/dist/combo-box-item.entry-f244c01a.mjs +0 -14
- package/dist/mi-card_2.entry-7dabf461.mjs +0 -23
- package/dist/mi-card_2.entry-d24478d0.mjs +0 -25
- package/dist/mi-chip.entry-bcc6599b.mjs +0 -15
- package/dist/mi-chip.entry-d43333c8.mjs +0 -13
- package/dist/mi-column.entry-f66623b9.mjs +0 -20
- package/dist/mi-column.entry-f901d5d1.mjs +0 -18
- package/dist/mi-combo-box.entry-0e6d9797.mjs +0 -262
- package/dist/mi-combo-box.entry-69a04955.mjs +0 -260
- package/dist/mi-data-table.entry-6cae08b0.mjs +0 -215
- package/dist/mi-data-table.entry-7fe09cbe.mjs +0 -213
- package/dist/mi-distance_2.entry-dca308c3.mjs +0 -54
- package/dist/mi-distance_2.entry-dffb2e64.mjs +0 -56
- package/dist/mi-dropdown-item.entry-b6aa9d36.mjs +0 -14
- package/dist/mi-dropdown-item.entry-be1c1055.mjs +0 -12
- package/dist/mi-dropdown.entry-1f1fce9f.mjs +0 -298
- package/dist/mi-dropdown.entry-e00c3e14.mjs +0 -296
- package/dist/mi-keyboard.entry-c97c80e8.mjs +0 -2960
- package/dist/mi-keyboard.entry-f1813a27.mjs +0 -2962
- package/dist/mi-list-item-category.entry-b0f61751.mjs +0 -38
- package/dist/mi-list-item-category.entry-bcac342a.mjs +0 -36
- package/dist/mi-list-item-location.entry-b642f1fb.mjs +0 -125
- package/dist/mi-list-item-location.entry-ee56967a.mjs +0 -127
- package/dist/mi-list.entry-c8f1f377.mjs +0 -39
- package/dist/mi-list.entry-e8089911.mjs +0 -41
- package/dist/mi-location-booking.entry-a5b9b331.mjs +0 -4863
- package/dist/mi-location-booking.entry-ea841d6e.mjs +0 -4865
- package/dist/mi-location-info.entry-89b37774.mjs +0 -22
- package/dist/mi-location-info.entry-fe2c6c32.mjs +0 -24
- package/dist/mi-map-googlemaps.entry-85c05897.mjs +0 -398
- package/dist/mi-map-googlemaps.entry-8877f16d.mjs +0 -396
- package/dist/mi-map-mapbox.entry-928da21a.mjs +0 -300
- package/dist/mi-map-mapbox.entry-9fc28c96.mjs +0 -298
- package/dist/mi-metric-card.entry-51daca25.mjs +0 -28
- package/dist/mi-metric-card.entry-95dbb9f1.mjs +0 -26
- package/dist/mi-notification.entry-9e49e3de.mjs +0 -81
- package/dist/mi-notification.entry-f7677761.mjs +0 -83
- package/dist/mi-route-instructions-heading.entry-79c22cdd.mjs +0 -72
- package/dist/mi-route-instructions-heading.entry-a4c7f18f.mjs +0 -74
- package/dist/mi-route-instructions-maneuver_2.entry-2950c143.mjs +0 -113
- package/dist/mi-route-instructions-maneuver_2.entry-b62eb513.mjs +0 -115
- package/dist/mi-route-instructions-step-legacy.entry-4058ea77.mjs +0 -201
- package/dist/mi-route-instructions-step-legacy.entry-f6ca174d.mjs +0 -199
- package/dist/mi-route-instructions-step.entry-272e3c84.mjs +0 -199
- package/dist/mi-route-instructions-step.entry-95f5dc43.mjs +0 -201
- package/dist/mi-route-instructions.entry-1b4fb352.mjs +0 -141
- package/dist/mi-route-instructions.entry-4adef014.mjs +0 -139
- package/dist/mi-scroll-buttons.entry-274b003f.mjs +0 -48
- package/dist/mi-scroll-buttons.entry-6132935b.mjs +0 -46
- package/dist/mi-search.entry-994c0189.mjs +0 -206
- package/dist/mi-search.entry-d0e582d1.mjs +0 -208
- package/dist/mi-share-sms.entry-ae15cf77.mjs +0 -53
- package/dist/mi-share-sms.entry-d082547b.mjs +0 -55
- package/dist/mi-step-switcher.entry-1863a369.mjs +0 -26
- package/dist/mi-step-switcher.entry-ecfc6a44.mjs +0 -24
- package/dist/mi-tab-panel.entry-089486fd.mjs +0 -21
- package/dist/mi-tab-panel.entry-cbe08c18.mjs +0 -19
- package/dist/mi-tab.entry-81e86bc6.mjs +0 -11
- package/dist/mi-tab.entry-ec6a52fb.mjs +0 -13
- package/dist/mi-tabs.entry-bd190e21.mjs +0 -36
- package/dist/mi-tabs.entry-c6b55639.mjs +0 -34
- package/dist/reactcomponent-2f9f051f.mjs +0 -27190
- package/dist/webcomponent-a10be1e6.mjs +0 -31969
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import { r as s, c as i, h as e, H as a } from "./reactcomponent-2f9f051f.mjs";
|
|
2
|
-
import { m as o } from "./icon-b8d01d6f-ddfa2c17.mjs";
|
|
3
|
-
import { b as c } from "./utils-ae714467-b07fc3be.mjs";
|
|
4
|
-
import "react";
|
|
5
|
-
import "react-dom";
|
|
6
|
-
const h = "html{box-sizing:border-box}*,*:before,*:after{box-sizing:inherit}:host{color:#1c1917;transition:300ms ease;display:flex;align-items:center;cursor:pointer}:host img{-o-object-fit:cover;object-fit:cover}:host([orientation=horizontal]){width:100%;height:100%;float:left;flex-direction:column;justify-content:center}:host([orientation=horizontal]) img{width:48px;height:48px}:host([orientation=horizontal]) p{height:16px;overflow:visible;font-size:0.875rem;line-height:1rem;text-align:center}:host([orientation=vertical]){padding:16px;flex-direction:row;font-size:1rem;font-weight:500;line-height:1.25rem}:host([orientation=vertical]) img{width:24px;height:24px}:host([orientation=vertical]) p{margin:0;padding-left:16px}:host(:hover){background-color:#fcfcfc}", l = class {
|
|
7
|
-
constructor(t) {
|
|
8
|
-
s(this, t), this.categoryClicked = i(this, "categoryClicked", 7), this.listItemDidRender = i(this, "listItemDidRender", 7), this.category = void 0, this.orientation = "vertical";
|
|
9
|
-
}
|
|
10
|
-
componentDidRender() {
|
|
11
|
-
this.listItemDidRender.emit(), "objectFit" in document.documentElement.style || this.objectFitImage(this.image);
|
|
12
|
-
}
|
|
13
|
-
/**
|
|
14
|
-
* @description Emits the category object to event listeners.
|
|
15
|
-
* @private
|
|
16
|
-
* @param {*} category - Category object.
|
|
17
|
-
* @memberof ListItemCategory
|
|
18
|
-
*/
|
|
19
|
-
categoryClickedHandler(t) {
|
|
20
|
-
this.categoryClicked.emit(t);
|
|
21
|
-
}
|
|
22
|
-
/**
|
|
23
|
-
* @description Set image as background image.
|
|
24
|
-
* @private
|
|
25
|
-
* @param {HTMLImageElement} image
|
|
26
|
-
*/
|
|
27
|
-
objectFitImage(t) {
|
|
28
|
-
t.setAttribute("style", `background: no-repeat center center url("${this.category.iconUrl}"); background-size: cover;`), t.src = `data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='${t.width}' height='${t.height}'%3E%3C/svg%3E`;
|
|
29
|
-
}
|
|
30
|
-
render() {
|
|
31
|
-
const t = this.orientation.toUpperCase() === "VERTICAL" ? parseInt(o.icon.size.medium.value) : parseInt(o.icon.size["xx-large"].value), r = c(this.category.iconUrl, t);
|
|
32
|
-
return e(a, { onClick: () => this.categoryClickedHandler(this.category) }, e("img", { ref: (n) => this.image = n, src: r }), e("p", null, this.category.name));
|
|
33
|
-
}
|
|
34
|
-
};
|
|
35
|
-
l.style = h;
|
|
36
|
-
export {
|
|
37
|
-
l as mi_list_item_category
|
|
38
|
-
};
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import { r as s, c as i, h as e, H as a } from "./webcomponent-a10be1e6.mjs";
|
|
2
|
-
import { m as o } from "./icon-b8d01d6f-ddfa2c17.mjs";
|
|
3
|
-
import { b as c } from "./utils-ae714467-b07fc3be.mjs";
|
|
4
|
-
const h = "html{box-sizing:border-box}*,*:before,*:after{box-sizing:inherit}:host{color:#1c1917;transition:300ms ease;display:flex;align-items:center;cursor:pointer}:host img{-o-object-fit:cover;object-fit:cover}:host([orientation=horizontal]){width:100%;height:100%;float:left;flex-direction:column;justify-content:center}:host([orientation=horizontal]) img{width:48px;height:48px}:host([orientation=horizontal]) p{height:16px;overflow:visible;font-size:0.875rem;line-height:1rem;text-align:center}:host([orientation=vertical]){padding:16px;flex-direction:row;font-size:1rem;font-weight:500;line-height:1.25rem}:host([orientation=vertical]) img{width:24px;height:24px}:host([orientation=vertical]) p{margin:0;padding-left:16px}:host(:hover){background-color:#fcfcfc}", l = class {
|
|
5
|
-
constructor(t) {
|
|
6
|
-
s(this, t), this.categoryClicked = i(this, "categoryClicked", 7), this.listItemDidRender = i(this, "listItemDidRender", 7), this.category = void 0, this.orientation = "vertical";
|
|
7
|
-
}
|
|
8
|
-
componentDidRender() {
|
|
9
|
-
this.listItemDidRender.emit(), "objectFit" in document.documentElement.style || this.objectFitImage(this.image);
|
|
10
|
-
}
|
|
11
|
-
/**
|
|
12
|
-
* @description Emits the category object to event listeners.
|
|
13
|
-
* @private
|
|
14
|
-
* @param {*} category - Category object.
|
|
15
|
-
* @memberof ListItemCategory
|
|
16
|
-
*/
|
|
17
|
-
categoryClickedHandler(t) {
|
|
18
|
-
this.categoryClicked.emit(t);
|
|
19
|
-
}
|
|
20
|
-
/**
|
|
21
|
-
* @description Set image as background image.
|
|
22
|
-
* @private
|
|
23
|
-
* @param {HTMLImageElement} image
|
|
24
|
-
*/
|
|
25
|
-
objectFitImage(t) {
|
|
26
|
-
t.setAttribute("style", `background: no-repeat center center url("${this.category.iconUrl}"); background-size: cover;`), t.src = `data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='${t.width}' height='${t.height}'%3E%3C/svg%3E`;
|
|
27
|
-
}
|
|
28
|
-
render() {
|
|
29
|
-
const t = this.orientation.toUpperCase() === "VERTICAL" ? parseInt(o.icon.size.medium.value) : parseInt(o.icon.size["xx-large"].value), r = c(this.category.iconUrl, t);
|
|
30
|
-
return e(a, { onClick: () => this.categoryClickedHandler(this.category) }, e("img", { ref: (n) => this.image = n, src: r }), e("p", null, this.category.name));
|
|
31
|
-
}
|
|
32
|
-
};
|
|
33
|
-
l.style = h;
|
|
34
|
-
export {
|
|
35
|
-
l as mi_list_item_category
|
|
36
|
-
};
|
|
@@ -1,125 +0,0 @@
|
|
|
1
|
-
import { r, c as s, h as o, H as c } from "./webcomponent-ac588828.mjs";
|
|
2
|
-
import { m as d } from "./icon-b8d01d6f-ddfa2c17.mjs";
|
|
3
|
-
import { b as a } from "./utils-ae714467-b07fc3be.mjs";
|
|
4
|
-
const l = 'html{box-sizing:border-box}*,*:before,*:after{box-sizing:inherit}:host{padding:16px;font-size:1rem;font-weight:500;line-height:1rem;transition:300ms ease;font-family:-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";border-radius:8px;background-color:#f9fafb;display:flex;flex-direction:row;align-items:center;cursor:pointer;gap:16px;border:1px solid #e5e7eb}:host(:hover){background-color:#fcfcfc}.img-container{width:32px;height:32px;display:flex;justify-content:center;align-items:center}img{border-radius:8px;width:100%;height:100%;-o-object-fit:cover;object-fit:cover}.details{padding-right:16px;flex:1;display:grid;gap:4px}.details-title{margin:0;padding:0}.distance{font-weight:400}mi-location-info{color:#6b7280}', h = class {
|
|
5
|
-
constructor(e) {
|
|
6
|
-
r(this, e), this.locationClicked = s(this, "locationClicked", 7), this.listItemDidRender = s(this, "listItemDidRender", 7), this.iconDisplaySize = parseInt(d.icon.size.medium.value), this.location = void 0, this.unit = void 0, this.icon = void 0, this.iconBadge = void 0, this.iconBadgeValue = void 0, this.iconURLToRender = void 0;
|
|
7
|
-
}
|
|
8
|
-
iconChanged() {
|
|
9
|
-
var e;
|
|
10
|
-
this.iconURLToRender = this.icon ? this.icon : (e = this.location) === null || e === void 0 ? void 0 : e.properties.imageURL, this.updateBadge();
|
|
11
|
-
}
|
|
12
|
-
iconBadgeChanged() {
|
|
13
|
-
this.updateBadge();
|
|
14
|
-
}
|
|
15
|
-
iconBadgeValueChanged() {
|
|
16
|
-
this.updateBadge();
|
|
17
|
-
}
|
|
18
|
-
/**
|
|
19
|
-
* @description Emits the location to event listeners.
|
|
20
|
-
* @param {*} location - Location object.
|
|
21
|
-
* @memberof List
|
|
22
|
-
*/
|
|
23
|
-
locationClickedHandler(e) {
|
|
24
|
-
this.locationClicked.emit(e);
|
|
25
|
-
}
|
|
26
|
-
componentWillLoad() {
|
|
27
|
-
var e;
|
|
28
|
-
this.iconURLToRender = this.icon ? this.icon : (e = this.location) === null || e === void 0 ? void 0 : e.properties.imageURL, this.updateBadge();
|
|
29
|
-
}
|
|
30
|
-
componentDidRender() {
|
|
31
|
-
this.location && (this.infoElement.location = this.location, this.listItemDidRender.emit(), this.imageElement && !("objectFit" in document.documentElement.style) && this.objectFitImage(this.imageElement));
|
|
32
|
-
}
|
|
33
|
-
/**
|
|
34
|
-
* Apply badge to location icon
|
|
35
|
-
*/
|
|
36
|
-
updateBadge() {
|
|
37
|
-
this.iconBadge && this.iconBadgeValue && this.iconURLToRender && this.applyBadgeToIcon();
|
|
38
|
-
}
|
|
39
|
-
/**
|
|
40
|
-
* @description Set image as background image.
|
|
41
|
-
* @param {HTMLImageElement} image
|
|
42
|
-
*/
|
|
43
|
-
objectFitImage(e) {
|
|
44
|
-
e.setAttribute("style", `background: no-repeat center center url("${this.iconURLToRender}"); background-size: cover;`), e.src = `data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='${e.width}' height='${e.height}'%3E%3C/svg%3E`;
|
|
45
|
-
}
|
|
46
|
-
/**
|
|
47
|
-
* Apply badge to location icon.
|
|
48
|
-
* Will make the original icon appear the intended size even though the badge exceeds its bounds.
|
|
49
|
-
*/
|
|
50
|
-
applyBadgeToIcon() {
|
|
51
|
-
let e;
|
|
52
|
-
this.iconURLToRender = this.icon ? this.icon : this.location.properties.imageURL;
|
|
53
|
-
const t = a(this.iconURLToRender, this.iconDisplaySize);
|
|
54
|
-
this.getImageFromUrl(t).then((i) => {
|
|
55
|
-
switch (e = i.width / 24, this.iconBadge.toLowerCase()) {
|
|
56
|
-
case "availability":
|
|
57
|
-
if (this.iconBadgeValue === "true")
|
|
58
|
-
return mapsindoors.BadgeRenderer.AvailableBadge.overlay(i);
|
|
59
|
-
if (this.iconBadgeValue === "false")
|
|
60
|
-
return mapsindoors.BadgeRenderer.UnavailableBadge.overlay(i);
|
|
61
|
-
break;
|
|
62
|
-
case "occupancy":
|
|
63
|
-
return mapsindoors.BadgeRenderer.TextBadge.overlay(i, {
|
|
64
|
-
text: this.iconBadgeValue.toString()
|
|
65
|
-
});
|
|
66
|
-
}
|
|
67
|
-
}).then((i) => {
|
|
68
|
-
if (i) {
|
|
69
|
-
this.iconURLToRender = i.src;
|
|
70
|
-
const n = (i.width - 24) / -2;
|
|
71
|
-
this.iconAttributes = {
|
|
72
|
-
style: {
|
|
73
|
-
transform: "translateX(" + n + "px)",
|
|
74
|
-
width: i.width / e + "px",
|
|
75
|
-
height: i.height / e + "px"
|
|
76
|
-
}
|
|
77
|
-
};
|
|
78
|
-
}
|
|
79
|
-
});
|
|
80
|
-
}
|
|
81
|
-
/**
|
|
82
|
-
* Create and return an Image from URL.
|
|
83
|
-
* @param {string} url
|
|
84
|
-
* @returns {Image}
|
|
85
|
-
*/
|
|
86
|
-
async getImageFromUrl(e) {
|
|
87
|
-
return fetch(e).then((t) => t.blob()).then((t) => URL.createObjectURL(t)).then((t) => new Promise((i) => {
|
|
88
|
-
const n = new Image();
|
|
89
|
-
n.width = this.iconDisplaySize, n.height = this.iconDisplaySize, n.onload = () => i(n), n.onerror = () => i(null), n.src = t;
|
|
90
|
-
}));
|
|
91
|
-
}
|
|
92
|
-
/**
|
|
93
|
-
* @description Render location list-item.
|
|
94
|
-
* @returns {JSX.Element}
|
|
95
|
-
*/
|
|
96
|
-
render() {
|
|
97
|
-
return this.location && o(c, { role: "listitem", onClick: () => this.locationClickedHandler(this.location) }, this.iconURLToRender ? this.renderIcon() : null, o("div", { class: "details" }, o("p", { class: "details-title" }, this.location.properties.name), o("mi-location-info", { ref: (e) => this.infoElement = e })), this.location.properties.geodesicDistance && this.renderDistance());
|
|
98
|
-
}
|
|
99
|
-
/**
|
|
100
|
-
* @description Get JSX template for icon.
|
|
101
|
-
* @returns {JSX.Element}
|
|
102
|
-
*/
|
|
103
|
-
renderIcon() {
|
|
104
|
-
const e = a(this.iconURLToRender, this.iconDisplaySize);
|
|
105
|
-
return o("div", { class: "img-container" }, o("img", Object.assign({}, this.iconAttributes, { ref: (t) => this.imageElement = t, src: e })));
|
|
106
|
-
}
|
|
107
|
-
/**
|
|
108
|
-
* @description Get JSX template for distance.
|
|
109
|
-
* @returns {JSX.Element}
|
|
110
|
-
*/
|
|
111
|
-
renderDistance() {
|
|
112
|
-
return o("div", { class: "distance" }, o("mi-distance", { meters: this.location.properties.geodesicDistance, unit: this.unit }));
|
|
113
|
-
}
|
|
114
|
-
static get watchers() {
|
|
115
|
-
return {
|
|
116
|
-
icon: ["iconChanged"],
|
|
117
|
-
iconBadge: ["iconBadgeChanged"],
|
|
118
|
-
iconBadgeValue: ["iconBadgeValueChanged"]
|
|
119
|
-
};
|
|
120
|
-
}
|
|
121
|
-
};
|
|
122
|
-
h.style = l;
|
|
123
|
-
export {
|
|
124
|
-
h as mi_list_item_location
|
|
125
|
-
};
|
|
@@ -1,127 +0,0 @@
|
|
|
1
|
-
import { r, c as s, h as o, H as c } from "./reactcomponent-2f9f051f.mjs";
|
|
2
|
-
import { m as d } from "./icon-b8d01d6f-ddfa2c17.mjs";
|
|
3
|
-
import { b as a } from "./utils-ae714467-b07fc3be.mjs";
|
|
4
|
-
import "react";
|
|
5
|
-
import "react-dom";
|
|
6
|
-
const l = 'html{box-sizing:border-box}*,*:before,*:after{box-sizing:inherit}:host{padding:16px;font-size:1rem;font-weight:500;line-height:1rem;transition:300ms ease;font-family:-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";border-radius:8px;background-color:#f9fafb;display:flex;flex-direction:row;align-items:center;cursor:pointer;gap:16px;border:1px solid #e5e7eb}:host(:hover){background-color:#fcfcfc}.img-container{width:32px;height:32px;display:flex;justify-content:center;align-items:center}img{border-radius:8px;width:100%;height:100%;-o-object-fit:cover;object-fit:cover}.details{padding-right:16px;flex:1;display:grid;gap:4px}.details-title{margin:0;padding:0}.distance{font-weight:400}mi-location-info{color:#6b7280}', h = class {
|
|
7
|
-
constructor(e) {
|
|
8
|
-
r(this, e), this.locationClicked = s(this, "locationClicked", 7), this.listItemDidRender = s(this, "listItemDidRender", 7), this.iconDisplaySize = parseInt(d.icon.size.medium.value), this.location = void 0, this.unit = void 0, this.icon = void 0, this.iconBadge = void 0, this.iconBadgeValue = void 0, this.iconURLToRender = void 0;
|
|
9
|
-
}
|
|
10
|
-
iconChanged() {
|
|
11
|
-
var e;
|
|
12
|
-
this.iconURLToRender = this.icon ? this.icon : (e = this.location) === null || e === void 0 ? void 0 : e.properties.imageURL, this.updateBadge();
|
|
13
|
-
}
|
|
14
|
-
iconBadgeChanged() {
|
|
15
|
-
this.updateBadge();
|
|
16
|
-
}
|
|
17
|
-
iconBadgeValueChanged() {
|
|
18
|
-
this.updateBadge();
|
|
19
|
-
}
|
|
20
|
-
/**
|
|
21
|
-
* @description Emits the location to event listeners.
|
|
22
|
-
* @param {*} location - Location object.
|
|
23
|
-
* @memberof List
|
|
24
|
-
*/
|
|
25
|
-
locationClickedHandler(e) {
|
|
26
|
-
this.locationClicked.emit(e);
|
|
27
|
-
}
|
|
28
|
-
componentWillLoad() {
|
|
29
|
-
var e;
|
|
30
|
-
this.iconURLToRender = this.icon ? this.icon : (e = this.location) === null || e === void 0 ? void 0 : e.properties.imageURL, this.updateBadge();
|
|
31
|
-
}
|
|
32
|
-
componentDidRender() {
|
|
33
|
-
this.location && (this.infoElement.location = this.location, this.listItemDidRender.emit(), this.imageElement && !("objectFit" in document.documentElement.style) && this.objectFitImage(this.imageElement));
|
|
34
|
-
}
|
|
35
|
-
/**
|
|
36
|
-
* Apply badge to location icon
|
|
37
|
-
*/
|
|
38
|
-
updateBadge() {
|
|
39
|
-
this.iconBadge && this.iconBadgeValue && this.iconURLToRender && this.applyBadgeToIcon();
|
|
40
|
-
}
|
|
41
|
-
/**
|
|
42
|
-
* @description Set image as background image.
|
|
43
|
-
* @param {HTMLImageElement} image
|
|
44
|
-
*/
|
|
45
|
-
objectFitImage(e) {
|
|
46
|
-
e.setAttribute("style", `background: no-repeat center center url("${this.iconURLToRender}"); background-size: cover;`), e.src = `data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='${e.width}' height='${e.height}'%3E%3C/svg%3E`;
|
|
47
|
-
}
|
|
48
|
-
/**
|
|
49
|
-
* Apply badge to location icon.
|
|
50
|
-
* Will make the original icon appear the intended size even though the badge exceeds its bounds.
|
|
51
|
-
*/
|
|
52
|
-
applyBadgeToIcon() {
|
|
53
|
-
let e;
|
|
54
|
-
this.iconURLToRender = this.icon ? this.icon : this.location.properties.imageURL;
|
|
55
|
-
const t = a(this.iconURLToRender, this.iconDisplaySize);
|
|
56
|
-
this.getImageFromUrl(t).then((i) => {
|
|
57
|
-
switch (e = i.width / 24, this.iconBadge.toLowerCase()) {
|
|
58
|
-
case "availability":
|
|
59
|
-
if (this.iconBadgeValue === "true")
|
|
60
|
-
return mapsindoors.BadgeRenderer.AvailableBadge.overlay(i);
|
|
61
|
-
if (this.iconBadgeValue === "false")
|
|
62
|
-
return mapsindoors.BadgeRenderer.UnavailableBadge.overlay(i);
|
|
63
|
-
break;
|
|
64
|
-
case "occupancy":
|
|
65
|
-
return mapsindoors.BadgeRenderer.TextBadge.overlay(i, {
|
|
66
|
-
text: this.iconBadgeValue.toString()
|
|
67
|
-
});
|
|
68
|
-
}
|
|
69
|
-
}).then((i) => {
|
|
70
|
-
if (i) {
|
|
71
|
-
this.iconURLToRender = i.src;
|
|
72
|
-
const n = (i.width - 24) / -2;
|
|
73
|
-
this.iconAttributes = {
|
|
74
|
-
style: {
|
|
75
|
-
transform: "translateX(" + n + "px)",
|
|
76
|
-
width: i.width / e + "px",
|
|
77
|
-
height: i.height / e + "px"
|
|
78
|
-
}
|
|
79
|
-
};
|
|
80
|
-
}
|
|
81
|
-
});
|
|
82
|
-
}
|
|
83
|
-
/**
|
|
84
|
-
* Create and return an Image from URL.
|
|
85
|
-
* @param {string} url
|
|
86
|
-
* @returns {Image}
|
|
87
|
-
*/
|
|
88
|
-
async getImageFromUrl(e) {
|
|
89
|
-
return fetch(e).then((t) => t.blob()).then((t) => URL.createObjectURL(t)).then((t) => new Promise((i) => {
|
|
90
|
-
const n = new Image();
|
|
91
|
-
n.width = this.iconDisplaySize, n.height = this.iconDisplaySize, n.onload = () => i(n), n.onerror = () => i(null), n.src = t;
|
|
92
|
-
}));
|
|
93
|
-
}
|
|
94
|
-
/**
|
|
95
|
-
* @description Render location list-item.
|
|
96
|
-
* @returns {JSX.Element}
|
|
97
|
-
*/
|
|
98
|
-
render() {
|
|
99
|
-
return this.location && o(c, { role: "listitem", onClick: () => this.locationClickedHandler(this.location) }, this.iconURLToRender ? this.renderIcon() : null, o("div", { class: "details" }, o("p", { class: "details-title" }, this.location.properties.name), o("mi-location-info", { ref: (e) => this.infoElement = e })), this.location.properties.geodesicDistance && this.renderDistance());
|
|
100
|
-
}
|
|
101
|
-
/**
|
|
102
|
-
* @description Get JSX template for icon.
|
|
103
|
-
* @returns {JSX.Element}
|
|
104
|
-
*/
|
|
105
|
-
renderIcon() {
|
|
106
|
-
const e = a(this.iconURLToRender, this.iconDisplaySize);
|
|
107
|
-
return o("div", { class: "img-container" }, o("img", Object.assign({}, this.iconAttributes, { ref: (t) => this.imageElement = t, src: e })));
|
|
108
|
-
}
|
|
109
|
-
/**
|
|
110
|
-
* @description Get JSX template for distance.
|
|
111
|
-
* @returns {JSX.Element}
|
|
112
|
-
*/
|
|
113
|
-
renderDistance() {
|
|
114
|
-
return o("div", { class: "distance" }, o("mi-distance", { meters: this.location.properties.geodesicDistance, unit: this.unit }));
|
|
115
|
-
}
|
|
116
|
-
static get watchers() {
|
|
117
|
-
return {
|
|
118
|
-
icon: ["iconChanged"],
|
|
119
|
-
iconBadge: ["iconBadgeChanged"],
|
|
120
|
-
iconBadgeValue: ["iconBadgeValueChanged"]
|
|
121
|
-
};
|
|
122
|
-
}
|
|
123
|
-
};
|
|
124
|
-
h.style = l;
|
|
125
|
-
export {
|
|
126
|
-
h as mi_list_item_location
|
|
127
|
-
};
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import { r as s, h as e } from "./webcomponent-a10be1e6.mjs";
|
|
2
|
-
const l = "html{box-sizing:border-box}*,*:before,*:after{box-sizing:inherit}:host{display:block;height:100%;width:100%}.container{height:100%;display:flex}.container .scroll-container{width:100%;overflow-y:auto}", n = class {
|
|
3
|
-
constructor(t) {
|
|
4
|
-
s(this, t), this.scrollButtonsEnabled = !1, this.scrollLength = 100;
|
|
5
|
-
}
|
|
6
|
-
componentDidLoad() {
|
|
7
|
-
this.addIntersectionObserver(), this.scrollButtonsEnabled && this.setScrollContainerElementRef();
|
|
8
|
-
}
|
|
9
|
-
/**
|
|
10
|
-
* @description Update state of scroll buttons when a "listItemDidRender" event is fired.
|
|
11
|
-
* @private
|
|
12
|
-
*/
|
|
13
|
-
updateScrollButtonsState() {
|
|
14
|
-
this.scrollButtonsEnabled && this.miScrollButtonsElement.scrollContainerElementRef && this.miScrollButtonsElement.updateScrollButtonsState();
|
|
15
|
-
}
|
|
16
|
-
/**
|
|
17
|
-
* @description Set scrollContainerElementRef attribute on miScrollButtonsElement.
|
|
18
|
-
* @private
|
|
19
|
-
*/
|
|
20
|
-
setScrollContainerElementRef() {
|
|
21
|
-
this.miScrollButtonsElement.scrollContainerElementRef = this.scrollContainerElement;
|
|
22
|
-
}
|
|
23
|
-
/**
|
|
24
|
-
* @description Add intersection observer and update scroll buttons state on intersection – workaround to avoid the element not having any dimensions before it's shown.
|
|
25
|
-
* @private
|
|
26
|
-
*/
|
|
27
|
-
addIntersectionObserver() {
|
|
28
|
-
this.intersectionObserver = new IntersectionObserver((t) => {
|
|
29
|
-
t[0].intersectionRatio <= 0 || (this.scrollContainerElement.scrollHeight - this.scrollContainerElement.scrollTop === this.scrollContainerElement.clientHeight && this.updateScrollButtonsState(), this.intersectionObserver.disconnect());
|
|
30
|
-
}), this.intersectionObserver.observe(this.scrollContainerElement);
|
|
31
|
-
}
|
|
32
|
-
render() {
|
|
33
|
-
return e("div", { class: "container" }, e("div", { role: "list", class: "scroll-container", ref: (t) => this.scrollContainerElement = t }, e("slot", null)), this.scrollButtonsEnabled ? e("mi-scroll-buttons", { scrollLength: this.scrollLength, ref: (t) => this.miScrollButtonsElement = t }) : null);
|
|
34
|
-
}
|
|
35
|
-
};
|
|
36
|
-
n.style = l;
|
|
37
|
-
export {
|
|
38
|
-
n as mi_list
|
|
39
|
-
};
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import { r as s, h as e } from "./reactcomponent-aa96e777.mjs";
|
|
2
|
-
import "react";
|
|
3
|
-
import "react-dom";
|
|
4
|
-
const l = "html{box-sizing:border-box}*,*:before,*:after{box-sizing:inherit}:host{display:block;height:100%;width:100%}.container{height:100%;display:flex}.container .scroll-container{width:100%;overflow-y:auto}", n = class {
|
|
5
|
-
constructor(t) {
|
|
6
|
-
s(this, t), this.scrollButtonsEnabled = !1, this.scrollLength = 100;
|
|
7
|
-
}
|
|
8
|
-
componentDidLoad() {
|
|
9
|
-
this.addIntersectionObserver(), this.scrollButtonsEnabled && this.setScrollContainerElementRef();
|
|
10
|
-
}
|
|
11
|
-
/**
|
|
12
|
-
* @description Update state of scroll buttons when a "listItemDidRender" event is fired.
|
|
13
|
-
* @private
|
|
14
|
-
*/
|
|
15
|
-
updateScrollButtonsState() {
|
|
16
|
-
this.scrollButtonsEnabled && this.miScrollButtonsElement.scrollContainerElementRef && this.miScrollButtonsElement.updateScrollButtonsState();
|
|
17
|
-
}
|
|
18
|
-
/**
|
|
19
|
-
* @description Set scrollContainerElementRef attribute on miScrollButtonsElement.
|
|
20
|
-
* @private
|
|
21
|
-
*/
|
|
22
|
-
setScrollContainerElementRef() {
|
|
23
|
-
this.miScrollButtonsElement.scrollContainerElementRef = this.scrollContainerElement;
|
|
24
|
-
}
|
|
25
|
-
/**
|
|
26
|
-
* @description Add intersection observer and update scroll buttons state on intersection – workaround to avoid the element not having any dimensions before it's shown.
|
|
27
|
-
* @private
|
|
28
|
-
*/
|
|
29
|
-
addIntersectionObserver() {
|
|
30
|
-
this.intersectionObserver = new IntersectionObserver((t) => {
|
|
31
|
-
t[0].intersectionRatio <= 0 || (this.scrollContainerElement.scrollHeight - this.scrollContainerElement.scrollTop === this.scrollContainerElement.clientHeight && this.updateScrollButtonsState(), this.intersectionObserver.disconnect());
|
|
32
|
-
}), this.intersectionObserver.observe(this.scrollContainerElement);
|
|
33
|
-
}
|
|
34
|
-
render() {
|
|
35
|
-
return e("div", { class: "container" }, e("div", { role: "list", class: "scroll-container", ref: (t) => this.scrollContainerElement = t }, e("slot", null)), this.scrollButtonsEnabled ? e("mi-scroll-buttons", { scrollLength: this.scrollLength, ref: (t) => this.miScrollButtonsElement = t }) : null);
|
|
36
|
-
}
|
|
37
|
-
};
|
|
38
|
-
n.style = l;
|
|
39
|
-
export {
|
|
40
|
-
n as mi_list
|
|
41
|
-
};
|