@mapsindoors/map-template 1.87.14 → 1.87.15
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/{GoogleMapsMap-e7d5a4bf.mjs → GoogleMapsMap-0db165c8.mjs} +73 -82
- package/dist/{MapboxMap-756d0b66.mjs → MapboxMap-ad5bc5d8.mjs} +3336 -3338
- package/dist/{combo-box-item.entry-26a56eab.mjs → combo-box-item.entry-c149187e.mjs} +2 -2
- package/dist/mapsindoors-react.es.js +2 -2
- package/dist/mapsindoors-react.umd.js +107 -107
- package/dist/mapsindoors-webcomponent.es.js +17321 -17117
- package/dist/mapsindoors-webcomponent.umd.js +53 -53
- package/dist/{mi-card_2.entry-dd20cb1f.mjs → mi-card_2.entry-8e20a029.mjs} +2 -2
- package/dist/{mi-chip.entry-e2850260.mjs → mi-chip.entry-973a78b6.mjs} +2 -2
- package/dist/{mi-column.entry-9b45b630.mjs → mi-column.entry-752e9e36.mjs} +2 -2
- package/dist/{mi-combo-box.entry-75cd1009.mjs → mi-combo-box.entry-2cdbd168.mjs} +2 -2
- package/dist/{mi-data-table.entry-636fb644.mjs → mi-data-table.entry-7734e76c.mjs} +2 -2
- package/dist/{mi-distance_2.entry-2ddac053.mjs → mi-distance_2.entry-bd069051.mjs} +2 -2
- package/dist/{mi-dropdown-item.entry-7697e0a4.mjs → mi-dropdown-item.entry-2d370388.mjs} +2 -2
- package/dist/{mi-dropdown.entry-842f5a8e.mjs → mi-dropdown.entry-6d9f8fd9.mjs} +2 -2
- package/dist/{mi-floor-selector.entry-097b1341.mjs → mi-floor-selector.entry-4f4c52b5.mjs} +2 -2
- package/dist/{mi-keyboard.entry-412c40d6.mjs → mi-keyboard.entry-77c14d8f.mjs} +2 -2
- package/dist/{mi-list-item-category.entry-8125859a.mjs → mi-list-item-category.entry-d66e8312.mjs} +2 -2
- package/dist/{mi-list-item-location.entry-7a5e9475.mjs → mi-list-item-location.entry-822eee60.mjs} +2 -2
- package/dist/{mi-list.entry-48ccc810.mjs → mi-list.entry-7b52a4a0.mjs} +2 -2
- package/dist/{mi-location-booking.entry-06a9000a.mjs → mi-location-booking.entry-27882b6b.mjs} +2 -2
- package/dist/{mi-location-info.entry-31dabcc8.mjs → mi-location-info.entry-885aef7a.mjs} +2 -2
- package/dist/{mi-map-googlemaps.entry-de8058da.mjs → mi-map-googlemaps.entry-8943e1a3.mjs} +2 -2
- package/dist/{mi-map-mapbox.entry-4b89a0b4.mjs → mi-map-mapbox.entry-f53f9f18.mjs} +2 -2
- package/dist/{mi-metric-card.entry-a685d12d.mjs → mi-metric-card.entry-10ef16f7.mjs} +2 -2
- package/dist/{mi-my-position.entry-6f0a3c24.mjs → mi-my-position.entry-0bf24cba.mjs} +2 -2
- package/dist/{mi-notification.entry-1f099805.mjs → mi-notification.entry-0eeac5ab.mjs} +2 -2
- package/dist/{mi-route-instructions-heading.entry-7c405431.mjs → mi-route-instructions-heading.entry-292279ee.mjs} +2 -2
- package/dist/{mi-route-instructions-maneuver-legacy.entry-f92f2ea2.mjs → mi-route-instructions-maneuver-legacy.entry-56d985a1.mjs} +2 -2
- package/dist/{mi-route-instructions-maneuver.entry-ffc0d14c.mjs → mi-route-instructions-maneuver.entry-15651e06.mjs} +2 -2
- package/dist/{mi-route-instructions-step-legacy.entry-fac6b5d1.mjs → mi-route-instructions-step-legacy.entry-447edbb3.mjs} +2 -2
- package/dist/{mi-route-instructions-step.entry-30b14e22.mjs → mi-route-instructions-step.entry-662b524a.mjs} +2 -2
- package/dist/{mi-route-instructions.entry-b7e70ffa.mjs → mi-route-instructions.entry-87100620.mjs} +2 -2
- package/dist/{mi-scroll-buttons.entry-0f59e492.mjs → mi-scroll-buttons.entry-1eaa7291.mjs} +2 -2
- package/dist/{mi-search.entry-091aa958.mjs → mi-search.entry-b6600740.mjs} +2 -2
- package/dist/{mi-share-sms.entry-c50ff350.mjs → mi-share-sms.entry-28d0625e.mjs} +2 -2
- package/dist/{mi-step-switcher.entry-08a4c906.mjs → mi-step-switcher.entry-4b03e06b.mjs} +2 -2
- package/dist/{mi-tab-panel.entry-308f87e2.mjs → mi-tab-panel.entry-969003f2.mjs} +2 -2
- package/dist/{mi-tab.entry-02736eaa.mjs → mi-tab.entry-ddac3934.mjs} +2 -2
- package/dist/{mi-tabs.entry-ec2fb02b.mjs → mi-tabs.entry-9c8c4e8e.mjs} +2 -2
- package/dist/{mi-time.entry-86427183.mjs → mi-time.entry-175f2c96.mjs} +2 -2
- package/dist/{reactcomponent-e8992463.mjs → reactcomponent-63f2e472.mjs} +5780 -5566
- package/package.json +1 -1
|
@@ -1,37 +1,37 @@
|
|
|
1
|
-
import { P as
|
|
2
|
-
import { useState as
|
|
1
|
+
import { P as p, i as g, j as _ } from "./reactcomponent-63f2e472.mjs";
|
|
2
|
+
import { useState as A, useEffect as j } from "react";
|
|
3
3
|
import "react-dom";
|
|
4
|
-
function
|
|
4
|
+
function C(n, e, t, r) {
|
|
5
5
|
function s(i) {
|
|
6
|
-
return i instanceof t ? i : new t(function(
|
|
7
|
-
|
|
6
|
+
return i instanceof t ? i : new t(function(o) {
|
|
7
|
+
o(i);
|
|
8
8
|
});
|
|
9
9
|
}
|
|
10
|
-
return new (t || (t = Promise))(function(i,
|
|
10
|
+
return new (t || (t = Promise))(function(i, o) {
|
|
11
11
|
function c(a) {
|
|
12
12
|
try {
|
|
13
|
-
|
|
14
|
-
} catch (
|
|
15
|
-
|
|
13
|
+
u(r.next(a));
|
|
14
|
+
} catch (h) {
|
|
15
|
+
o(h);
|
|
16
16
|
}
|
|
17
17
|
}
|
|
18
18
|
function l(a) {
|
|
19
19
|
try {
|
|
20
|
-
|
|
21
|
-
} catch (
|
|
22
|
-
|
|
20
|
+
u(r.throw(a));
|
|
21
|
+
} catch (h) {
|
|
22
|
+
o(h);
|
|
23
23
|
}
|
|
24
24
|
}
|
|
25
|
-
function
|
|
25
|
+
function u(a) {
|
|
26
26
|
a.done ? i(a.value) : s(a.value).then(c, l);
|
|
27
27
|
}
|
|
28
|
-
|
|
28
|
+
u((r = r.apply(n, e || [])).next());
|
|
29
29
|
});
|
|
30
30
|
}
|
|
31
|
-
function
|
|
32
|
-
return
|
|
31
|
+
function $(n) {
|
|
32
|
+
return n && n.__esModule && Object.prototype.hasOwnProperty.call(n, "default") ? n.default : n;
|
|
33
33
|
}
|
|
34
|
-
var
|
|
34
|
+
var D = function n(e, t) {
|
|
35
35
|
if (e === t)
|
|
36
36
|
return !0;
|
|
37
37
|
if (e && t && typeof e == "object" && typeof t == "object") {
|
|
@@ -42,7 +42,7 @@ var O = function o(e, t) {
|
|
|
42
42
|
if (r = e.length, r != t.length)
|
|
43
43
|
return !1;
|
|
44
44
|
for (s = r; s-- !== 0; )
|
|
45
|
-
if (!
|
|
45
|
+
if (!n(e[s], t[s]))
|
|
46
46
|
return !1;
|
|
47
47
|
return !0;
|
|
48
48
|
}
|
|
@@ -58,20 +58,20 @@ var O = function o(e, t) {
|
|
|
58
58
|
if (!Object.prototype.hasOwnProperty.call(t, i[s]))
|
|
59
59
|
return !1;
|
|
60
60
|
for (s = r; s-- !== 0; ) {
|
|
61
|
-
var
|
|
62
|
-
if (!
|
|
61
|
+
var o = i[s];
|
|
62
|
+
if (!n(e[o], t[o]))
|
|
63
63
|
return !1;
|
|
64
64
|
}
|
|
65
65
|
return !0;
|
|
66
66
|
}
|
|
67
67
|
return e !== e && t !== t;
|
|
68
|
-
},
|
|
69
|
-
const
|
|
70
|
-
var
|
|
71
|
-
(function(
|
|
72
|
-
|
|
73
|
-
})(
|
|
74
|
-
class
|
|
68
|
+
}, U = /* @__PURE__ */ $(D);
|
|
69
|
+
const k = "__googleMapsScriptId";
|
|
70
|
+
var y;
|
|
71
|
+
(function(n) {
|
|
72
|
+
n[n.INITIALIZED = 0] = "INITIALIZED", n[n.LOADING = 1] = "LOADING", n[n.SUCCESS = 2] = "SUCCESS", n[n.FAILURE = 3] = "FAILURE";
|
|
73
|
+
})(y || (y = {}));
|
|
74
|
+
class m {
|
|
75
75
|
/**
|
|
76
76
|
* Creates an instance of Loader using [[LoaderOptions]]. No defaults are set
|
|
77
77
|
* using this library, instead the defaults are set by the Google Maps
|
|
@@ -81,13 +81,13 @@ class w {
|
|
|
81
81
|
* const loader = Loader({apiKey, version: 'weekly', libraries: ['places']});
|
|
82
82
|
* ```
|
|
83
83
|
*/
|
|
84
|
-
constructor({ apiKey: e, authReferrerPolicy: t, channel: r, client: s, id: i =
|
|
85
|
-
if (this.callbacks = [], this.done = !1, this.loading = !1, this.errors = [], this.apiKey = e, this.authReferrerPolicy = t, this.channel = r, this.client = s, this.id = i ||
|
|
86
|
-
if (
|
|
87
|
-
throw new Error(`Loader must not be called again with different options. ${JSON.stringify(this.options)} !== ${JSON.stringify(
|
|
88
|
-
return
|
|
84
|
+
constructor({ apiKey: e, authReferrerPolicy: t, channel: r, client: s, id: i = k, language: o, libraries: c = [], mapIds: l, nonce: u, region: a, retries: h = 3, url: w = "https://maps.googleapis.com/maps/api/js", version: f }) {
|
|
85
|
+
if (this.callbacks = [], this.done = !1, this.loading = !1, this.errors = [], this.apiKey = e, this.authReferrerPolicy = t, this.channel = r, this.client = s, this.id = i || k, this.language = o, this.libraries = c, this.mapIds = l, this.nonce = u, this.region = a, this.retries = h, this.url = w, this.version = f, m.instance) {
|
|
86
|
+
if (!U(this.options, m.instance.options))
|
|
87
|
+
throw new Error(`Loader must not be called again with different options. ${JSON.stringify(this.options)} !== ${JSON.stringify(m.instance.options)}`);
|
|
88
|
+
return m.instance;
|
|
89
89
|
}
|
|
90
|
-
|
|
90
|
+
m.instance = this;
|
|
91
91
|
}
|
|
92
92
|
get options() {
|
|
93
93
|
return {
|
|
@@ -106,7 +106,7 @@ class w {
|
|
|
106
106
|
};
|
|
107
107
|
}
|
|
108
108
|
get status() {
|
|
109
|
-
return this.errors.length ?
|
|
109
|
+
return this.errors.length ? y.FAILURE : this.done ? y.SUCCESS : this.loading ? y.LOADING : y.INITIALIZED;
|
|
110
110
|
}
|
|
111
111
|
get failed() {
|
|
112
112
|
return this.done && !this.loading && this.errors.length >= this.retries + 1;
|
|
@@ -179,24 +179,24 @@ class w {
|
|
|
179
179
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
180
180
|
(i) => !r[i] && delete r[i]
|
|
181
181
|
), !((t = (e = window == null ? void 0 : window.google) === null || e === void 0 ? void 0 : e.maps) === null || t === void 0) && t.importLibrary || ((i) => {
|
|
182
|
-
let
|
|
183
|
-
|
|
184
|
-
const b =
|
|
182
|
+
let o, c, l, u = "The Google Maps JavaScript API", a = "google", h = "importLibrary", w = "__ib__", f = document, d = window;
|
|
183
|
+
d = d[a] || (d[a] = {});
|
|
184
|
+
const b = d.maps || (d.maps = {}), S = /* @__PURE__ */ new Set(), I = new URLSearchParams(), P = () => (
|
|
185
185
|
// @ts-ignore
|
|
186
|
-
|
|
187
|
-
var
|
|
188
|
-
yield c =
|
|
186
|
+
o || (o = new Promise((v, E) => C(this, void 0, void 0, function* () {
|
|
187
|
+
var M;
|
|
188
|
+
yield c = f.createElement("script"), c.id = this.id, I.set("libraries", [...S] + "");
|
|
189
189
|
for (l in i)
|
|
190
|
-
|
|
191
|
-
|
|
190
|
+
I.set(l.replace(/[A-Z]/g, (R) => "_" + R[0].toLowerCase()), i[l]);
|
|
191
|
+
I.set("callback", a + ".maps." + w), c.src = this.url + "?" + I, b[w] = v, c.onerror = () => o = E(Error(u + " could not load.")), c.nonce = this.nonce || ((M = f.querySelector("script[nonce]")) === null || M === void 0 ? void 0 : M.nonce) || "", f.head.append(c);
|
|
192
192
|
})))
|
|
193
193
|
);
|
|
194
|
-
b[
|
|
194
|
+
b[h] ? console.warn(u + " only loads once. Ignoring:", i) : b[h] = (v, ...E) => S.add(v) && P().then(() => b[h](v, ...E));
|
|
195
195
|
})(r);
|
|
196
196
|
const s = this.libraries.map((i) => this.importLibrary(i));
|
|
197
197
|
s.length || s.push(this.importLibrary("core")), Promise.all(s).then(() => this.callback(), (i) => {
|
|
198
|
-
const
|
|
199
|
-
this.loadErrorCallback(
|
|
198
|
+
const o = new ErrorEvent("error", { error: i });
|
|
199
|
+
this.loadErrorCallback(o);
|
|
200
200
|
});
|
|
201
201
|
}
|
|
202
202
|
/**
|
|
@@ -235,38 +235,29 @@ class w {
|
|
|
235
235
|
}
|
|
236
236
|
}
|
|
237
237
|
}
|
|
238
|
-
|
|
239
|
-
apiKey:
|
|
240
|
-
onInitialized:
|
|
241
|
-
center:
|
|
242
|
-
zoom:
|
|
243
|
-
bounds:
|
|
244
|
-
heading:
|
|
245
|
-
tilt:
|
|
246
|
-
mapsIndoorsInstance:
|
|
247
|
-
mapOptions:
|
|
248
|
-
gmMapId:
|
|
238
|
+
N.propTypes = {
|
|
239
|
+
apiKey: p.string.isRequired,
|
|
240
|
+
onInitialized: p.func.isRequired,
|
|
241
|
+
center: p.object,
|
|
242
|
+
zoom: p.number,
|
|
243
|
+
bounds: p.object,
|
|
244
|
+
heading: p.number,
|
|
245
|
+
tilt: p.number,
|
|
246
|
+
mapsIndoorsInstance: p.object,
|
|
247
|
+
mapOptions: p.object,
|
|
248
|
+
gmMapId: p.string
|
|
249
249
|
};
|
|
250
|
-
function
|
|
251
|
-
const [a,
|
|
252
|
-
return
|
|
253
|
-
|
|
254
|
-
}, [
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
zoomControlOptions: {
|
|
258
|
-
style: a.maps.ZoomControlStyle.DEFAULT,
|
|
259
|
-
position: a.maps.ControlPosition.RIGHT_BOTTOM
|
|
260
|
-
}
|
|
261
|
-
}), b(!0));
|
|
262
|
-
}, [c, h, a]), C(() => {
|
|
263
|
-
new w({
|
|
264
|
-
apiKey: o,
|
|
250
|
+
function N({ apiKey: n, onInitialized: e, center: t, zoom: r, bounds: s, heading: i, tilt: o, mapsIndoorsInstance: c, mapOptions: l, gmMapId: u }) {
|
|
251
|
+
const [a, h] = A();
|
|
252
|
+
return j(() => {
|
|
253
|
+
a && (g(s) || c.getMapView().fitBounds(s, l == null ? void 0 : l.fitBoundsPadding), !g(t) && g(s) && a.getMap().setCenter(t), !g(r) && g(s) && a.getMap().setZoom(r), g(i) || a.getMap().setHeading(i), g(o) || a.getMap().setTilt(o));
|
|
254
|
+
}, [a, t, r, i, o, s, l]), j(() => {
|
|
255
|
+
new m({
|
|
256
|
+
apiKey: n,
|
|
265
257
|
version: "quarterly",
|
|
266
258
|
libraries: ["geometry", "places"]
|
|
267
|
-
}).load().then((
|
|
268
|
-
|
|
269
|
-
const y = {
|
|
259
|
+
}).load().then(() => {
|
|
260
|
+
const f = {
|
|
270
261
|
element: document.getElementById("map"),
|
|
271
262
|
disableDefaultUI: !0,
|
|
272
263
|
// Disable Map Type control, Street view control and Zoom controls.
|
|
@@ -274,18 +265,18 @@ function U({ apiKey: o, onInitialized: e, center: t, zoom: r, bounds: s, heading
|
|
|
274
265
|
// The MapsIndoors SDK needs a starting point and a zoom level to avoid timing issues when setting a venue.
|
|
275
266
|
zoom: r ?? 21,
|
|
276
267
|
heading: i ?? 0,
|
|
277
|
-
tilt:
|
|
278
|
-
mapId:
|
|
268
|
+
tilt: o ?? 0,
|
|
269
|
+
mapId: u,
|
|
279
270
|
gestureHandling: "greedy",
|
|
280
271
|
...l
|
|
281
272
|
};
|
|
282
|
-
|
|
283
|
-
const
|
|
284
|
-
|
|
273
|
+
g(l == null ? void 0 : l.showMapMarkers) || (f.showMapMarkers = l.showMapMarkers);
|
|
274
|
+
const d = new window.mapsindoors.mapView.GoogleMapsView(f);
|
|
275
|
+
h(d), e(d);
|
|
285
276
|
});
|
|
286
|
-
}, []), /* @__PURE__ */
|
|
277
|
+
}, []), /* @__PURE__ */ _.jsx("div", { className: "mapsindoors-map google-maps-map-container", id: "map" });
|
|
287
278
|
}
|
|
288
279
|
export {
|
|
289
|
-
|
|
280
|
+
N as default
|
|
290
281
|
};
|
|
291
|
-
//# sourceMappingURL=GoogleMapsMap-
|
|
282
|
+
//# sourceMappingURL=GoogleMapsMap-0db165c8.mjs.map
|