@mapsindoors/map-template 1.17.0 → 1.18.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 +6 -5
- package/dist/{combo-box-item.entry-3bdf398c.mjs → combo-box-item.entry-e05be9ce.mjs} +1 -1
- package/dist/mapsindoors-react.es.js +2 -2
- package/dist/mapsindoors-react.umd.js +49 -49
- package/dist/mapsindoors-webcomponent.es.js +49634 -3
- package/dist/mapsindoors-webcomponent.umd.js +35 -35
- package/dist/{mi-card_2.entry-40da4c22.mjs → mi-card_2.entry-30bca2a7.mjs} +1 -1
- package/dist/{mi-chip.entry-8361080b.mjs → mi-chip.entry-a657a5be.mjs} +1 -1
- package/dist/{mi-column.entry-1a4d1bd7.mjs → mi-column.entry-542b9b8e.mjs} +1 -1
- package/dist/{mi-combo-box.entry-3512ddbe.mjs → mi-combo-box.entry-ecb7a2bc.mjs} +1 -1
- package/dist/{mi-data-table.entry-3220f2be.mjs → mi-data-table.entry-cc697548.mjs} +1 -1
- package/dist/{mi-distance_2.entry-dcbb24c5.mjs → mi-distance_2.entry-305694ff.mjs} +1 -1
- package/dist/{mi-dropdown-item.entry-280ba4ce.mjs → mi-dropdown-item.entry-dfd22682.mjs} +1 -1
- package/dist/{mi-dropdown.entry-6c8f21d6.mjs → mi-dropdown.entry-6ce94df1.mjs} +1 -1
- package/dist/{mi-floor-selector.entry-5305d533.mjs → mi-floor-selector.entry-50fe744e.mjs} +1 -1
- package/dist/{mi-keyboard.entry-fcd58e0d.mjs → mi-keyboard.entry-23e3a9eb.mjs} +1 -1
- package/dist/{mi-list-item-category.entry-01d06afa.mjs → mi-list-item-category.entry-ad248d06.mjs} +1 -1
- package/dist/{mi-list-item-location.entry-71cad82b.mjs → mi-list-item-location.entry-c7986d5a.mjs} +1 -1
- package/dist/{mi-list.entry-6b662039.mjs → mi-list.entry-fbb1f3c4.mjs} +1 -1
- package/dist/{mi-location-booking.entry-3ede4961.mjs → mi-location-booking.entry-c31fe81c.mjs} +1 -1
- package/dist/{mi-location-info.entry-bc94c6aa.mjs → mi-location-info.entry-402ae1d2.mjs} +1 -1
- package/dist/{mi-map-googlemaps.entry-92d13571.mjs → mi-map-googlemaps.entry-8d886e24.mjs} +1 -1
- package/dist/{mi-map-mapbox.entry-793e7606.mjs → mi-map-mapbox.entry-7094ed74.mjs} +1 -1
- package/dist/{mi-metric-card.entry-517557b8.mjs → mi-metric-card.entry-b673efca.mjs} +1 -1
- package/dist/{mi-my-position.entry-f10f3919.mjs → mi-my-position.entry-ee78adf4.mjs} +1 -1
- package/dist/{mi-notification.entry-cc765c3c.mjs → mi-notification.entry-c5850f79.mjs} +1 -1
- package/dist/{mi-route-instructions-heading.entry-4d3417ae.mjs → mi-route-instructions-heading.entry-2261bd54.mjs} +1 -1
- package/dist/{mi-route-instructions-maneuver-legacy.entry-ff7e6758.mjs → mi-route-instructions-maneuver-legacy.entry-6cc6f576.mjs} +1 -1
- package/dist/{mi-route-instructions-maneuver.entry-5d1bf1ef.mjs → mi-route-instructions-maneuver.entry-289522a4.mjs} +1 -1
- package/dist/{mi-route-instructions-step-legacy.entry-9c75f214.mjs → mi-route-instructions-step-legacy.entry-94bf97e1.mjs} +1 -1
- package/dist/{mi-route-instructions-step.entry-b5588bd5.mjs → mi-route-instructions-step.entry-056b5816.mjs} +1 -1
- package/dist/{mi-route-instructions.entry-71ff4605.mjs → mi-route-instructions.entry-d1f327a3.mjs} +1 -1
- package/dist/{mi-scroll-buttons.entry-312b45dd.mjs → mi-scroll-buttons.entry-f653bccf.mjs} +1 -1
- package/dist/{mi-search.entry-a7b3ccc6.mjs → mi-search.entry-89bc09d8.mjs} +1 -1
- package/dist/{mi-share-sms.entry-89c98479.mjs → mi-share-sms.entry-1b6fda8a.mjs} +1 -1
- package/dist/{mi-step-switcher.entry-a5889eaf.mjs → mi-step-switcher.entry-4e3430ee.mjs} +1 -1
- package/dist/{mi-tab-panel.entry-065b3497.mjs → mi-tab-panel.entry-0a7392ac.mjs} +1 -1
- package/dist/{mi-tab.entry-44ba1f0f.mjs → mi-tab.entry-4a5e90b9.mjs} +1 -1
- package/dist/{mi-tabs.entry-9b0f103f.mjs → mi-tabs.entry-38132aed.mjs} +1 -1
- package/dist/{mi-time.entry-591fe0bd.mjs → mi-time.entry-a1e75edd.mjs} +1 -1
- package/dist/{reactcomponent-2fa842c6.mjs → reactcomponent-de25b3b8.mjs} +5738 -5713
- package/package.json +1 -1
- package/dist/combo-box-item.entry-1661239b.mjs +0 -12
- package/dist/mi-card_2.entry-03b59654.mjs +0 -23
- package/dist/mi-chip.entry-73240ce7.mjs +0 -16
- package/dist/mi-column.entry-ecdc4b58.mjs +0 -18
- package/dist/mi-combo-box.entry-0125ca72.mjs +0 -260
- package/dist/mi-data-table.entry-1295e9c8.mjs +0 -213
- package/dist/mi-distance_2.entry-57fa711a.mjs +0 -54
- package/dist/mi-dropdown-item.entry-97e6700c.mjs +0 -12
- package/dist/mi-dropdown.entry-46e42f89.mjs +0 -296
- package/dist/mi-floor-selector.entry-bcff4715.mjs +0 -112
- package/dist/mi-keyboard.entry-39a7abc7.mjs +0 -2960
- package/dist/mi-list-item-category.entry-c44ff712.mjs +0 -36
- package/dist/mi-list-item-location.entry-c555ad05.mjs +0 -134
- package/dist/mi-list.entry-f43c3984.mjs +0 -39
- package/dist/mi-location-booking.entry-b5d22929.mjs +0 -4863
- package/dist/mi-location-info.entry-845e1d9f.mjs +0 -29
- package/dist/mi-map-googlemaps.entry-9d22da25.mjs +0 -396
- package/dist/mi-map-mapbox.entry-c0d1d1ca.mjs +0 -298
- package/dist/mi-metric-card.entry-43337ef9.mjs +0 -26
- package/dist/mi-my-position.entry-1341862b.mjs +0 -1396
- package/dist/mi-notification.entry-3fafed6e.mjs +0 -81
- package/dist/mi-route-instructions-heading.entry-e394444b.mjs +0 -72
- package/dist/mi-route-instructions-maneuver-legacy.entry-ba040c96.mjs +0 -73
- package/dist/mi-route-instructions-maneuver.entry-b2c0e3bd.mjs +0 -73
- package/dist/mi-route-instructions-step-legacy.entry-e89095a2.mjs +0 -199
- package/dist/mi-route-instructions-step.entry-00eda3a5.mjs +0 -234
- package/dist/mi-route-instructions.entry-e9ddc518.mjs +0 -140
- package/dist/mi-scroll-buttons.entry-a8217dd5.mjs +0 -46
- package/dist/mi-search.entry-7fe3b1c4.mjs +0 -240
- package/dist/mi-share-sms.entry-673aa041.mjs +0 -53
- package/dist/mi-step-switcher.entry-9569c012.mjs +0 -24
- package/dist/mi-tab-panel.entry-97268db9.mjs +0 -19
- package/dist/mi-tab.entry-95ac3515.mjs +0 -11
- package/dist/mi-tabs.entry-200621d5.mjs +0 -34
- package/dist/mi-time.entry-312b124d.mjs +0 -43
- package/dist/webcomponent-7931b9da.mjs +0 -36749
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import { r as s, c as i, h as e, H as a } from "./webcomponent-7931b9da.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,134 +0,0 @@
|
|
|
1
|
-
import { r, c as s, h as o, H as c } from "./webcomponent-7931b9da.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),:host(.hovered){background-color:var(--tailwind-colors-gray-200);border:1px solid #d1d5db}.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.showExternalId = !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
|
-
/**
|
|
27
|
-
* Called once just after the component is first connected to the DOM.
|
|
28
|
-
*/
|
|
29
|
-
componentWillLoad() {
|
|
30
|
-
var e;
|
|
31
|
-
this.iconURLToRender = this.icon ? this.icon : (e = this.location) === null || e === void 0 ? void 0 : e.properties.imageURL, this.updateBadge();
|
|
32
|
-
}
|
|
33
|
-
/**
|
|
34
|
-
* Called after every render().
|
|
35
|
-
*/
|
|
36
|
-
componentDidRender() {
|
|
37
|
-
this.location && (this.infoElement.location = this.location, this.listItemDidRender.emit(), this.imageElement && !("objectFit" in document.documentElement.style) && this.objectFitImage(this.imageElement));
|
|
38
|
-
}
|
|
39
|
-
/**
|
|
40
|
-
* Apply badge to location icon.
|
|
41
|
-
*/
|
|
42
|
-
updateBadge() {
|
|
43
|
-
this.iconBadge && this.iconBadgeValue && this.iconURLToRender && this.applyBadgeToIcon();
|
|
44
|
-
}
|
|
45
|
-
/**
|
|
46
|
-
* @description Set image as background image.
|
|
47
|
-
* @param {HTMLImageElement} image
|
|
48
|
-
*/
|
|
49
|
-
objectFitImage(e) {
|
|
50
|
-
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`;
|
|
51
|
-
}
|
|
52
|
-
/**
|
|
53
|
-
* Apply badge to location icon.
|
|
54
|
-
* Will make the original icon appear the intended size even though the badge exceeds its bounds.
|
|
55
|
-
*/
|
|
56
|
-
applyBadgeToIcon() {
|
|
57
|
-
let e;
|
|
58
|
-
this.iconURLToRender = this.icon ? this.icon : this.location.properties.imageURL;
|
|
59
|
-
const t = a(this.iconURLToRender, this.iconDisplaySize);
|
|
60
|
-
this.getImageFromUrl(t).then((i) => {
|
|
61
|
-
switch (e = i.width / 24, this.iconBadge.toLowerCase()) {
|
|
62
|
-
case "availability":
|
|
63
|
-
if (this.iconBadgeValue === "true")
|
|
64
|
-
return mapsindoors.BadgeRenderer.AvailableBadge.overlay(i);
|
|
65
|
-
if (this.iconBadgeValue === "false")
|
|
66
|
-
return mapsindoors.BadgeRenderer.UnavailableBadge.overlay(i);
|
|
67
|
-
break;
|
|
68
|
-
case "occupancy":
|
|
69
|
-
return mapsindoors.BadgeRenderer.TextBadge.overlay(i, {
|
|
70
|
-
text: this.iconBadgeValue.toString()
|
|
71
|
-
});
|
|
72
|
-
}
|
|
73
|
-
}).then((i) => {
|
|
74
|
-
if (i) {
|
|
75
|
-
this.iconURLToRender = i.src;
|
|
76
|
-
const n = (i.width - 24) / -2;
|
|
77
|
-
this.iconAttributes = {
|
|
78
|
-
style: {
|
|
79
|
-
transform: "translateX(" + n + "px)",
|
|
80
|
-
width: i.width / e + "px",
|
|
81
|
-
height: i.height / e + "px"
|
|
82
|
-
}
|
|
83
|
-
};
|
|
84
|
-
}
|
|
85
|
-
});
|
|
86
|
-
}
|
|
87
|
-
/**
|
|
88
|
-
* Create and return an Image from URL.
|
|
89
|
-
*
|
|
90
|
-
* @param {string} url
|
|
91
|
-
* @returns {Image}
|
|
92
|
-
*/
|
|
93
|
-
async getImageFromUrl(e) {
|
|
94
|
-
return fetch(e).then((t) => t.blob()).then((t) => URL.createObjectURL(t)).then((t) => new Promise((i) => {
|
|
95
|
-
const n = new Image();
|
|
96
|
-
n.width = this.iconDisplaySize, n.height = this.iconDisplaySize, n.onload = () => i(n), n.onerror = () => i(null), n.src = t;
|
|
97
|
-
}));
|
|
98
|
-
}
|
|
99
|
-
/**
|
|
100
|
-
* Render location list-item.
|
|
101
|
-
*
|
|
102
|
-
* @description Render location list-item.
|
|
103
|
-
* @returns {JSX.Element}
|
|
104
|
-
*/
|
|
105
|
-
render() {
|
|
106
|
-
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, showExternalId: this.showExternalId })), this.location.properties.geodesicDistance && this.renderDistance());
|
|
107
|
-
}
|
|
108
|
-
/**
|
|
109
|
-
* @description Get JSX template for icon.
|
|
110
|
-
* @returns {JSX.Element}
|
|
111
|
-
*/
|
|
112
|
-
renderIcon() {
|
|
113
|
-
const e = a(this.iconURLToRender, this.iconDisplaySize);
|
|
114
|
-
return o("div", { class: "img-container" }, o("img", Object.assign({}, this.iconAttributes, { ref: (t) => this.imageElement = t, src: e })));
|
|
115
|
-
}
|
|
116
|
-
/**
|
|
117
|
-
* @description Get JSX template for distance.
|
|
118
|
-
* @returns {JSX.Element}
|
|
119
|
-
*/
|
|
120
|
-
renderDistance() {
|
|
121
|
-
return o("div", { class: "distance" }, o("mi-distance", { meters: this.location.properties.geodesicDistance, unit: this.unit }));
|
|
122
|
-
}
|
|
123
|
-
static get watchers() {
|
|
124
|
-
return {
|
|
125
|
-
icon: ["iconChanged"],
|
|
126
|
-
iconBadge: ["iconBadgeChanged"],
|
|
127
|
-
iconBadgeValue: ["iconBadgeValueChanged"]
|
|
128
|
-
};
|
|
129
|
-
}
|
|
130
|
-
};
|
|
131
|
-
h.style = l;
|
|
132
|
-
export {
|
|
133
|
-
h as mi_list_item_location
|
|
134
|
-
};
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import { r as s, h as e } from "./webcomponent-7931b9da.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
|
-
};
|