@mapsindoors/map-template 1.95.8 → 1.95.10

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 (59) hide show
  1. package/dist/{GoogleMapsMap-mNXwkS5r.mjs → GoogleMapsMap-CwUKio6U.mjs} +2 -2
  2. package/dist/{MapboxMap-JSpSXMbZ.mjs → MapboxMap-C5oy5rc4.mjs} +2 -2
  3. package/dist/favicon.png +0 -0
  4. package/dist/logo-192.png +0 -0
  5. package/dist/manifest.json +21 -0
  6. package/dist/mapsindoors-react.es.js +1 -1
  7. package/dist/mapsindoors-react.umd.js +236 -198
  8. package/dist/mapsindoors-webcomponent.es.js +51235 -42443
  9. package/dist/reactcomponent-Dyc_LGHg.mjs +37841 -0
  10. package/dist/robots.txt +3 -0
  11. package/package.json +5 -7
  12. package/dist/_commonjsHelpers-B85MJLTf.js +0 -5
  13. package/dist/app-globals-DQuL1Twl.js +0 -3
  14. package/dist/combo-box-item.entry.js +0 -13
  15. package/dist/icon-DT_sDkmK.js +0 -11
  16. package/dist/index-BZQHyS7V.js +0 -1701
  17. package/dist/index.js +0 -1
  18. package/dist/loader.js +0 -11
  19. package/dist/mi-card_2.entry.js +0 -33
  20. package/dist/mi-chip.entry.js +0 -31
  21. package/dist/mi-column.entry.js +0 -52
  22. package/dist/mi-combo-box.entry.js +0 -449
  23. package/dist/mi-components.js +0 -21
  24. package/dist/mi-data-table.entry.js +0 -324
  25. package/dist/mi-distance_2.entry.js +0 -69
  26. package/dist/mi-dropdown-item.entry.js +0 -13
  27. package/dist/mi-dropdown.entry.js +0 -656
  28. package/dist/mi-floor-selector.entry.js +0 -209
  29. package/dist/mi-keyboard.entry.js +0 -261
  30. package/dist/mi-list-item-category.entry.js +0 -51
  31. package/dist/mi-list-item-location.entry.js +0 -177
  32. package/dist/mi-list.entry.js +0 -68
  33. package/dist/mi-location-booking.entry.js +0 -5218
  34. package/dist/mi-location-info.entry.js +0 -71
  35. package/dist/mi-map-googlemaps.entry.js +0 -795
  36. package/dist/mi-map-mapbox.entry.js +0 -530
  37. package/dist/mi-metric-card.entry.js +0 -61
  38. package/dist/mi-my-position.entry.js +0 -2457
  39. package/dist/mi-notification.entry.js +0 -137
  40. package/dist/mi-route-instructions-heading.entry.js +0 -78
  41. package/dist/mi-route-instructions-maneuver-legacy.entry.js +0 -86
  42. package/dist/mi-route-instructions-maneuver.entry.js +0 -86
  43. package/dist/mi-route-instructions-step-legacy.entry.js +0 -322
  44. package/dist/mi-route-instructions-step.entry.js +0 -342
  45. package/dist/mi-route-instructions.entry.js +0 -176
  46. package/dist/mi-scroll-buttons.entry.js +0 -120
  47. package/dist/mi-search.entry.js +0 -429
  48. package/dist/mi-share-sms.entry.js +0 -94
  49. package/dist/mi-step-switcher.entry.js +0 -40
  50. package/dist/mi-tab-panel.entry.js +0 -25
  51. package/dist/mi-tab.entry.js +0 -10
  52. package/dist/mi-tabs.entry.js +0 -49
  53. package/dist/mi-time.entry.js +0 -57
  54. package/dist/mi-variables-CDNvnTkH.js +0 -5
  55. package/dist/reactcomponent-BrPGG2Eb.mjs +0 -29048
  56. package/dist/route-travel-mode.enum-BvqP1fpw.js +0 -9
  57. package/dist/sort-order.enum-jsLAbYWg.js +0 -566
  58. package/dist/unit-system.enum-BwPgAWqL.js +0 -7
  59. package/dist/utils-DNHzysQ6.js +0 -61
@@ -1,177 +0,0 @@
1
- import { r as registerInstance, c as createEvent, h, H as Host } from './index-BZQHyS7V.js';
2
- import { m as midtIcon } from './icon-DT_sDkmK.js';
3
- import { b as appendMapsIndoorsImageQueryParameters } from './utils-DNHzysQ6.js';
4
-
5
- const listItemLocationCss = () => `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}`;
6
-
7
- const ListItemLocation = class {
8
- constructor(hostRef) {
9
- registerInstance(this, hostRef);
10
- this.locationClicked = createEvent(this, "locationClicked", 7);
11
- this.listItemDidRender = createEvent(this, "listItemDidRender", 7);
12
- /**
13
- * Whether to show the External ID.
14
- */
15
- this.showExternalId = true;
16
- /**
17
- * @description The word used for "Level" when showing level info. Default is "Level".
18
- */
19
- this.level = 'Level';
20
- this.iconDisplaySize = parseInt(midtIcon.icon.size.medium.value);
21
- }
22
- iconChanged() {
23
- var _a;
24
- this.iconURLToRender = this.icon ? this.icon : (_a = this.location) === null || _a === void 0 ? void 0 : _a.properties.imageURL;
25
- this.updateBadge();
26
- }
27
- iconBadgeChanged() {
28
- this.updateBadge();
29
- }
30
- iconBadgeValueChanged() {
31
- this.updateBadge();
32
- }
33
- /**
34
- * @description Emits the location to event listeners.
35
- * @param {*} location - Location object.
36
- * @memberof List
37
- */
38
- locationClickedHandler(location) {
39
- this.locationClicked.emit(location);
40
- }
41
- /**
42
- * Called once just after the component is first connected to the DOM.
43
- */
44
- componentWillLoad() {
45
- var _a;
46
- this.iconURLToRender = this.icon ? this.icon : (_a = this.location) === null || _a === void 0 ? void 0 : _a.properties.imageURL;
47
- this.updateBadge();
48
- }
49
- /**
50
- * Called after every render().
51
- */
52
- componentDidRender() {
53
- if (!this.location) {
54
- return;
55
- }
56
- this.infoElement.location = this.location;
57
- this.listItemDidRender.emit();
58
- // IE fallback for 'object-fit' css property
59
- if (this.imageElement && 'objectFit' in document.documentElement.style === false) {
60
- this.objectFitImage(this.imageElement);
61
- }
62
- }
63
- /**
64
- * Apply badge to location icon.
65
- */
66
- updateBadge() {
67
- if (this.iconBadge && this.iconBadgeValue && this.iconURLToRender) {
68
- this.applyBadgeToIcon();
69
- }
70
- }
71
- /**
72
- * @description Set image as background image.
73
- * @param {HTMLImageElement} image
74
- */
75
- objectFitImage(image) {
76
- image.setAttribute('style', `background: no-repeat center center url("${this.iconURLToRender}"); background-size: cover;`);
77
- image.src = `data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='${image.width}' height='${image.height}'%3E%3C/svg%3E`;
78
- }
79
- /**
80
- * Apply badge to location icon.
81
- * Will make the original icon appear the intended size even though the badge exceeds its bounds.
82
- */
83
- applyBadgeToIcon() {
84
- let originalIconScale;
85
- this.iconURLToRender = this.icon ? this.icon : this.location.properties.imageURL;
86
- const iconURL = appendMapsIndoorsImageQueryParameters(this.iconURLToRender, this.iconDisplaySize);
87
- this.getImageFromUrl(iconURL).then(image => {
88
- originalIconScale = image.width / 24;
89
- switch (this.iconBadge.toLowerCase()) {
90
- case 'availability':
91
- if (this.iconBadgeValue === 'true') {
92
- return mapsindoors.BadgeRenderer.AvailableBadge.overlay(image);
93
- }
94
- else if (this.iconBadgeValue === 'false') {
95
- return mapsindoors.BadgeRenderer.UnavailableBadge.overlay(image);
96
- }
97
- break;
98
- case 'occupancy':
99
- return mapsindoors.BadgeRenderer.TextBadge.overlay(image, {
100
- text: this.iconBadgeValue.toString()
101
- });
102
- }
103
- }).then(badgedImage => {
104
- if (badgedImage) {
105
- this.iconURLToRender = badgedImage.src;
106
- // Badged image must be moved so the original image aligns with other.
107
- const translateIcon = (badgedImage.width - 24) / -2;
108
- this.iconAttributes = {
109
- style: {
110
- transform: 'translateX(' + translateIcon + 'px)',
111
- width: badgedImage.width / originalIconScale + 'px',
112
- height: badgedImage.height / originalIconScale + 'px'
113
- }
114
- };
115
- }
116
- });
117
- }
118
- /**
119
- * Create and return an Image from URL.
120
- *
121
- * @param {string} url
122
- * @returns {Image}
123
- */
124
- async getImageFromUrl(url) {
125
- return fetch(url)
126
- .then(res => res.blob())
127
- .then(blob => URL.createObjectURL(blob))
128
- .then(objUrl => {
129
- return new Promise((resolve) => {
130
- const image = new Image();
131
- image.width = this.iconDisplaySize;
132
- image.height = this.iconDisplaySize;
133
- image.onload = () => resolve(image);
134
- image.onerror = () => resolve(null);
135
- image.src = objUrl;
136
- });
137
- });
138
- }
139
- /**
140
- * Render location list-item.
141
- *
142
- * @description Render location list-item.
143
- * @returns {JSX.Element}
144
- */
145
- render() {
146
- return this.location && (h(Host, { key: '5aef44556a0231b84c5d287630b7c0b1e942337b', role: "listitem", onClick: () => this.locationClickedHandler(this.location) }, this.iconURLToRender ? this.renderIcon() : null, h("div", { key: '2d04abcf241d6f4ffd18a3750e6c97a2e390f0dd', class: "details" }, h("p", { key: '67fb00fa0af9f721d5e25c01d04408d1bb218397', class: "details-title" }, this.location.properties.name), h("mi-location-info", { key: '84a8de0de326865bd51904dba3ed732df429bdd0', level: this.level, ref: (el) => this.infoElement = el, showExternalId: this.showExternalId })), typeof this.location.properties.geodesicDistance === 'number' && this.renderDistance()));
147
- }
148
- /**
149
- * @description Get JSX template for icon.
150
- * @returns {JSX.Element}
151
- */
152
- renderIcon() {
153
- const iconURL = appendMapsIndoorsImageQueryParameters(this.iconURLToRender, this.iconDisplaySize);
154
- return (h("div", { class: "img-container" }, h("img", Object.assign({}, this.iconAttributes, { ref: (el) => this.imageElement = el, src: iconURL }))));
155
- }
156
- /**
157
- * @description Get JSX template for distance.
158
- * @returns {JSX.Element}
159
- */
160
- renderDistance() {
161
- return (h("div", { class: "distance" }, h("mi-distance", { meters: this.location.properties.geodesicDistance, unit: this.unit })));
162
- }
163
- static get watchers() { return {
164
- "icon": [{
165
- "iconChanged": 0
166
- }],
167
- "iconBadge": [{
168
- "iconBadgeChanged": 0
169
- }],
170
- "iconBadgeValue": [{
171
- "iconBadgeValueChanged": 0
172
- }]
173
- }; }
174
- };
175
- ListItemLocation.style = listItemLocationCss();
176
-
177
- export { ListItemLocation as mi_list_item_location };
@@ -1,68 +0,0 @@
1
- import { r as registerInstance, h } from './index-BZQHyS7V.js';
2
-
3
- const listCss = () => `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}`;
4
-
5
- const List = class {
6
- constructor(hostRef) {
7
- registerInstance(this, hostRef);
8
- /**
9
- * @description Determines if the MI Scroll Buttons Component should be rendered.
10
- * @type {boolean}
11
- */
12
- this.scrollButtonsEnabled = false;
13
- /**
14
- * @description Determines how far to scroll when clicking one of the buttons from the MI Scroll Buttons Component.
15
- * @type {number}
16
- */
17
- this.scrollLength = 100;
18
- }
19
- componentDidLoad() {
20
- if (!this.scrollButtonsEnabled && this.scrollButtonsEnabled !== false)
21
- return;
22
- if (typeof this.scrollLength !== 'number')
23
- return;
24
- this.addIntersectionObserver();
25
- if (this.scrollButtonsEnabled) {
26
- this.setScrollContainerElementRef();
27
- }
28
- }
29
- /**
30
- * @description Update state of scroll buttons when a "listItemDidRender" event is fired.
31
- * @private
32
- */
33
- updateScrollButtonsState() {
34
- if (this.scrollButtonsEnabled && this.miScrollButtonsElement.scrollContainerElementRef) {
35
- this.miScrollButtonsElement.updateScrollButtonsState();
36
- }
37
- }
38
- /**
39
- * @description Set scrollContainerElementRef attribute on miScrollButtonsElement.
40
- * @private
41
- */
42
- setScrollContainerElementRef() {
43
- this.miScrollButtonsElement.scrollContainerElementRef = this.scrollContainerElement;
44
- }
45
- /**
46
- * @description Add intersection observer and update scroll buttons state on intersection – workaround to avoid the element not having any dimensions before it's shown.
47
- * @private
48
- */
49
- addIntersectionObserver() {
50
- this.intersectionObserver = new IntersectionObserver((entries) => {
51
- if (entries[0].intersectionRatio <= 0) {
52
- return;
53
- }
54
- // Disable scroll buttons if container element doesn't have scroll
55
- if (this.scrollContainerElement.scrollHeight - this.scrollContainerElement.scrollTop === this.scrollContainerElement.clientHeight) {
56
- this.updateScrollButtonsState();
57
- }
58
- this.intersectionObserver.disconnect();
59
- });
60
- this.intersectionObserver.observe(this.scrollContainerElement);
61
- }
62
- render() {
63
- return (h("div", { key: 'bc2f046eadf87cd3ce09af999a80f3c46b83f985', class: "container" }, h("div", { key: '59fce6d0b99e85506457e8cd26378b771853c091', role: "list", class: "scroll-container", ref: (el) => this.scrollContainerElement = el }, h("slot", { key: '589917cef174ca09f80310b8acbc8f726a11581b' })), this.scrollButtonsEnabled ? h("mi-scroll-buttons", { scrollLength: this.scrollLength, ref: (el) => this.miScrollButtonsElement = el }) : null));
64
- }
65
- };
66
- List.style = listCss();
67
-
68
- export { List as mi_list };