@mapsindoors/map-template 1.93.2 → 1.94.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.
Files changed (103) hide show
  1. package/dist/{GoogleMapsMap-982405ad.mjs → GoogleMapsMap-BqYRaFgc.mjs} +51 -62
  2. package/dist/MapboxMap-CUYrfLHY.mjs +34732 -0
  3. package/dist/_commonjsHelpers-ba3f0406.js +21 -0
  4. package/dist/combo-box-item.entry.js +15 -0
  5. package/dist/icon-b8d01d6f.js +24 -0
  6. package/dist/index-7e9696f3.js +1678 -0
  7. package/dist/index.js +1 -0
  8. package/dist/loader.js +18 -0
  9. package/dist/mapsindoors-react.es.js +3 -5
  10. package/dist/mapsindoors-react.umd.js +197 -582
  11. package/dist/mapsindoors-webcomponent.es.js +58512 -75790
  12. package/dist/mi-card_2.entry.js +28 -0
  13. package/dist/mi-chip.entry.js +22 -0
  14. package/dist/mi-column.entry.js +28 -0
  15. package/dist/mi-combo-box.entry.js +416 -0
  16. package/dist/mi-components.js +18 -0
  17. package/dist/mi-data-table.entry.js +302 -0
  18. package/dist/mi-distance_2.entry.js +67 -0
  19. package/dist/mi-dropdown-item.entry.js +15 -0
  20. package/dist/mi-dropdown.entry.js +610 -0
  21. package/dist/mi-floor-selector.entry.js +202 -0
  22. package/dist/mi-keyboard.entry.js +238 -0
  23. package/dist/mi-list-item-category.entry.js +48 -0
  24. package/dist/mi-list-item-location.entry.js +171 -0
  25. package/dist/mi-list.entry.js +56 -0
  26. package/dist/mi-location-booking.entry.js +5193 -0
  27. package/dist/mi-location-info.entry.js +63 -0
  28. package/dist/mi-map-googlemaps.entry.js +750 -0
  29. package/dist/mi-map-mapbox.entry.js +467 -0
  30. package/dist/mi-metric-card.entry.js +48 -0
  31. package/dist/mi-my-position.entry.js +986 -0
  32. package/dist/mi-notification.entry.js +127 -0
  33. package/dist/mi-route-instructions-heading.entry.js +73 -0
  34. package/dist/mi-route-instructions-maneuver-legacy.entry.js +82 -0
  35. package/dist/mi-route-instructions-maneuver.entry.js +82 -0
  36. package/dist/mi-route-instructions-step-legacy.entry.js +308 -0
  37. package/dist/mi-route-instructions-step.entry.js +321 -0
  38. package/dist/mi-route-instructions.entry.js +157 -0
  39. package/dist/mi-scroll-buttons.entry.js +112 -0
  40. package/dist/mi-search.entry.js +376 -0
  41. package/dist/mi-share-sms.entry.js +80 -0
  42. package/dist/mi-step-switcher.entry.js +31 -0
  43. package/dist/mi-tab-panel.entry.js +25 -0
  44. package/dist/mi-tab.entry.js +12 -0
  45. package/dist/mi-tabs.entry.js +47 -0
  46. package/dist/mi-time.entry.js +57 -0
  47. package/dist/mi-variables-9a6c8d4d.js +6 -0
  48. package/dist/polyfills/core-js.js +11 -0
  49. package/dist/polyfills/css-shim.js +1 -0
  50. package/dist/polyfills/dom.js +79 -0
  51. package/dist/polyfills/es5-html-element.js +1 -0
  52. package/dist/polyfills/index.js +34 -0
  53. package/dist/polyfills/system.js +6 -0
  54. package/dist/{reactcomponent-7fbbd9b2.mjs → reactcomponent-DTepe7hB.mjs} +14121 -14626
  55. package/dist/route-travel-mode.enum-7f4ce9c7.js +9 -0
  56. package/dist/sort-order.enum-64ce8998.js +552 -0
  57. package/dist/unit-system.enum-eaefb53e.js +7 -0
  58. package/dist/utils-ae714467.js +61 -0
  59. package/package.json +10 -6
  60. package/dist/MapboxMap-06ef82a3.mjs +0 -37815
  61. package/dist/_commonjsHelpers-ba3f0406-b96e6d6a.mjs +0 -22
  62. package/dist/combo-box-item.entry-d35f3d51.mjs +0 -15
  63. package/dist/icon-b8d01d6f-ddfa2c17.mjs +0 -25
  64. package/dist/mapsindoors-webcomponent.umd.js +0 -3245
  65. package/dist/mi-card_2.entry-fc772c35.mjs +0 -26
  66. package/dist/mi-chip.entry-81c742a1.mjs +0 -19
  67. package/dist/mi-column.entry-3a083282.mjs +0 -21
  68. package/dist/mi-combo-box.entry-cae6401a.mjs +0 -263
  69. package/dist/mi-data-table.entry-d4c3f445.mjs +0 -224
  70. package/dist/mi-distance_2.entry-a33ed69a.mjs +0 -339
  71. package/dist/mi-dropdown-item.entry-974d1e4f.mjs +0 -15
  72. package/dist/mi-dropdown.entry-5317db65.mjs +0 -349
  73. package/dist/mi-floor-selector.entry-185fbd8b.mjs +0 -115
  74. package/dist/mi-keyboard.entry-eaf4b9ef.mjs +0 -3103
  75. package/dist/mi-list-item-category.entry-9c95008c.mjs +0 -39
  76. package/dist/mi-list-item-location.entry-8b41e8f0.mjs +0 -137
  77. package/dist/mi-list.entry-1218d29d.mjs +0 -42
  78. package/dist/mi-location-booking.entry-270aaf5a.mjs +0 -4866
  79. package/dist/mi-location-info.entry-e4f7fd04.mjs +0 -32
  80. package/dist/mi-map-googlemaps.entry-81fa28d2.mjs +0 -467
  81. package/dist/mi-map-mapbox.entry-31821da3.mjs +0 -301
  82. package/dist/mi-metric-card.entry-40407f04.mjs +0 -29
  83. package/dist/mi-my-position.entry-bc48fe6e.mjs +0 -703
  84. package/dist/mi-notification.entry-9a2bc53b.mjs +0 -84
  85. package/dist/mi-route-instructions-heading.entry-e5b1ff04.mjs +0 -75
  86. package/dist/mi-route-instructions-maneuver-legacy.entry-2c3d73ab.mjs +0 -76
  87. package/dist/mi-route-instructions-maneuver.entry-c6f01024.mjs +0 -76
  88. package/dist/mi-route-instructions-step-legacy.entry-80bcf097.mjs +0 -202
  89. package/dist/mi-route-instructions-step.entry-db802e13.mjs +0 -231
  90. package/dist/mi-route-instructions.entry-62416e29.mjs +0 -143
  91. package/dist/mi-scroll-buttons.entry-92b62b21.mjs +0 -83
  92. package/dist/mi-search.entry-87f1e64a.mjs +0 -251
  93. package/dist/mi-share-sms.entry-b6725edb.mjs +0 -56
  94. package/dist/mi-step-switcher.entry-f8f6c040.mjs +0 -27
  95. package/dist/mi-tab-panel.entry-a89213c2.mjs +0 -22
  96. package/dist/mi-tab.entry-a2fb3f8c.mjs +0 -14
  97. package/dist/mi-tabs.entry-cd638ea7.mjs +0 -37
  98. package/dist/mi-time.entry-0b02870d.mjs +0 -46
  99. package/dist/mi-variables-9a6c8d4d-e06eec88.mjs +0 -8
  100. package/dist/route-travel-mode.enum-7f4ce9c7-a9c95a83.mjs +0 -8
  101. package/dist/sort-order.enum-64ce8998-b75ac596.mjs +0 -318
  102. package/dist/unit-system.enum-eaefb53e-0f424da4.mjs +0 -8
  103. package/dist/utils-ae714467-b07fc3be.mjs +0 -37
@@ -1,39 +0,0 @@
1
- import { r as s, c as i, h as e, H as a } from "./reactcomponent-7fbbd9b2.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
- };
39
- //# sourceMappingURL=mi-list-item-category.entry-9c95008c.mjs.map
@@ -1,137 +0,0 @@
1
- import { r, c as s, h as o, H as c } from "./reactcomponent-7fbbd9b2.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:1rem;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:1rem;border:1px solid #e5e7eb}:host(:hover),:host(.hovered){background-color:var(--tailwind-colors-gray-200);border:1px solid #d1d5db}.img-container{width:2rem;height:2rem;display:flex;justify-content:center;align-items:center;flex-shrink:0}img{border-radius:8px;width:100%;height:100%;-o-object-fit:cover;object-fit:cover}.details{padding-right:1rem;flex:1;min-width:0;display:grid;gap:0.25rem}.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.showExternalId = !0, this.unit = void 0, this.icon = void 0, this.level = "Level", 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
- /**
29
- * Called once just after the component is first connected to the DOM.
30
- */
31
- componentWillLoad() {
32
- var e;
33
- this.iconURLToRender = this.icon ? this.icon : (e = this.location) === null || e === void 0 ? void 0 : e.properties.imageURL, this.updateBadge();
34
- }
35
- /**
36
- * Called after every render().
37
- */
38
- componentDidRender() {
39
- this.location && (this.infoElement.location = this.location, this.listItemDidRender.emit(), this.imageElement && !("objectFit" in document.documentElement.style) && this.objectFitImage(this.imageElement));
40
- }
41
- /**
42
- * Apply badge to location icon.
43
- */
44
- updateBadge() {
45
- this.iconBadge && this.iconBadgeValue && this.iconURLToRender && this.applyBadgeToIcon();
46
- }
47
- /**
48
- * @description Set image as background image.
49
- * @param {HTMLImageElement} image
50
- */
51
- objectFitImage(e) {
52
- 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`;
53
- }
54
- /**
55
- * Apply badge to location icon.
56
- * Will make the original icon appear the intended size even though the badge exceeds its bounds.
57
- */
58
- applyBadgeToIcon() {
59
- let e;
60
- this.iconURLToRender = this.icon ? this.icon : this.location.properties.imageURL;
61
- const t = a(this.iconURLToRender, this.iconDisplaySize);
62
- this.getImageFromUrl(t).then((i) => {
63
- switch (e = i.width / 24, this.iconBadge.toLowerCase()) {
64
- case "availability":
65
- if (this.iconBadgeValue === "true")
66
- return mapsindoors.BadgeRenderer.AvailableBadge.overlay(i);
67
- if (this.iconBadgeValue === "false")
68
- return mapsindoors.BadgeRenderer.UnavailableBadge.overlay(i);
69
- break;
70
- case "occupancy":
71
- return mapsindoors.BadgeRenderer.TextBadge.overlay(i, {
72
- text: this.iconBadgeValue.toString()
73
- });
74
- }
75
- }).then((i) => {
76
- if (i) {
77
- this.iconURLToRender = i.src;
78
- const n = (i.width - 24) / -2;
79
- this.iconAttributes = {
80
- style: {
81
- transform: "translateX(" + n + "px)",
82
- width: i.width / e + "px",
83
- height: i.height / e + "px"
84
- }
85
- };
86
- }
87
- });
88
- }
89
- /**
90
- * Create and return an Image from URL.
91
- *
92
- * @param {string} url
93
- * @returns {Image}
94
- */
95
- async getImageFromUrl(e) {
96
- return fetch(e).then((t) => t.blob()).then((t) => URL.createObjectURL(t)).then((t) => new Promise((i) => {
97
- const n = new Image();
98
- n.width = this.iconDisplaySize, n.height = this.iconDisplaySize, n.onload = () => i(n), n.onerror = () => i(null), n.src = t;
99
- }));
100
- }
101
- /**
102
- * Render location list-item.
103
- *
104
- * @description Render location list-item.
105
- * @returns {JSX.Element}
106
- */
107
- render() {
108
- 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", { level: this.level, ref: (e) => this.infoElement = e, showExternalId: this.showExternalId })), this.location.properties.geodesicDistance && this.renderDistance());
109
- }
110
- /**
111
- * @description Get JSX template for icon.
112
- * @returns {JSX.Element}
113
- */
114
- renderIcon() {
115
- const e = a(this.iconURLToRender, this.iconDisplaySize);
116
- return o("div", { class: "img-container" }, o("img", Object.assign({}, this.iconAttributes, { ref: (t) => this.imageElement = t, src: e })));
117
- }
118
- /**
119
- * @description Get JSX template for distance.
120
- * @returns {JSX.Element}
121
- */
122
- renderDistance() {
123
- return o("div", { class: "distance" }, o("mi-distance", { meters: this.location.properties.geodesicDistance, unit: this.unit }));
124
- }
125
- static get watchers() {
126
- return {
127
- icon: ["iconChanged"],
128
- iconBadge: ["iconBadgeChanged"],
129
- iconBadgeValue: ["iconBadgeValueChanged"]
130
- };
131
- }
132
- };
133
- h.style = l;
134
- export {
135
- h as mi_list_item_location
136
- };
137
- //# sourceMappingURL=mi-list-item-location.entry-8b41e8f0.mjs.map
@@ -1,42 +0,0 @@
1
- import { r as s, h as e } from "./reactcomponent-7fbbd9b2.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
- };
42
- //# sourceMappingURL=mi-list.entry-1218d29d.mjs.map