@mapsindoors/map-template 1.87.13 → 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.
Files changed (43) hide show
  1. package/dist/{GoogleMapsMap-a89aa859.mjs → GoogleMapsMap-0db165c8.mjs} +73 -82
  2. package/dist/{MapboxMap-49ab9031.mjs → MapboxMap-ad5bc5d8.mjs} +3336 -3338
  3. package/dist/{combo-box-item.entry-812bd7b4.mjs → combo-box-item.entry-c149187e.mjs} +2 -2
  4. package/dist/mapsindoors-react.es.js +2 -2
  5. package/dist/mapsindoors-react.umd.js +111 -111
  6. package/dist/mapsindoors-webcomponent.es.js +18555 -18348
  7. package/dist/mapsindoors-webcomponent.umd.js +57 -57
  8. package/dist/{mi-card_2.entry-bae2a9e8.mjs → mi-card_2.entry-8e20a029.mjs} +2 -2
  9. package/dist/{mi-chip.entry-a188a2fe.mjs → mi-chip.entry-973a78b6.mjs} +2 -2
  10. package/dist/{mi-column.entry-a29067f8.mjs → mi-column.entry-752e9e36.mjs} +2 -2
  11. package/dist/{mi-combo-box.entry-4b7159cd.mjs → mi-combo-box.entry-2cdbd168.mjs} +2 -2
  12. package/dist/{mi-data-table.entry-018d6dcf.mjs → mi-data-table.entry-7734e76c.mjs} +2 -2
  13. package/dist/{mi-distance_2.entry-49974c0b.mjs → mi-distance_2.entry-bd069051.mjs} +2 -2
  14. package/dist/{mi-dropdown-item.entry-dc6c160c.mjs → mi-dropdown-item.entry-2d370388.mjs} +2 -2
  15. package/dist/{mi-dropdown.entry-8233f3fb.mjs → mi-dropdown.entry-6d9f8fd9.mjs} +2 -2
  16. package/dist/{mi-floor-selector.entry-923c2d3f.mjs → mi-floor-selector.entry-4f4c52b5.mjs} +2 -2
  17. package/dist/{mi-keyboard.entry-587e509e.mjs → mi-keyboard.entry-77c14d8f.mjs} +2 -2
  18. package/dist/{mi-list-item-category.entry-7a8aa63b.mjs → mi-list-item-category.entry-d66e8312.mjs} +2 -2
  19. package/dist/{mi-list-item-location.entry-6f2623ba.mjs → mi-list-item-location.entry-822eee60.mjs} +2 -2
  20. package/dist/{mi-list.entry-ffe8a174.mjs → mi-list.entry-7b52a4a0.mjs} +2 -2
  21. package/dist/{mi-location-booking.entry-dd3d1c24.mjs → mi-location-booking.entry-27882b6b.mjs} +2 -2
  22. package/dist/{mi-location-info.entry-af1fd4a7.mjs → mi-location-info.entry-885aef7a.mjs} +2 -2
  23. package/dist/{mi-map-googlemaps.entry-7694b6f3.mjs → mi-map-googlemaps.entry-8943e1a3.mjs} +2 -2
  24. package/dist/{mi-map-mapbox.entry-43d07cce.mjs → mi-map-mapbox.entry-f53f9f18.mjs} +2 -2
  25. package/dist/{mi-metric-card.entry-e3743294.mjs → mi-metric-card.entry-10ef16f7.mjs} +2 -2
  26. package/dist/{mi-my-position.entry-38fefd24.mjs → mi-my-position.entry-0bf24cba.mjs} +2 -2
  27. package/dist/{mi-notification.entry-2b2fb599.mjs → mi-notification.entry-0eeac5ab.mjs} +2 -2
  28. package/dist/{mi-route-instructions-heading.entry-e3b053d3.mjs → mi-route-instructions-heading.entry-292279ee.mjs} +2 -2
  29. package/dist/{mi-route-instructions-maneuver-legacy.entry-43adc25d.mjs → mi-route-instructions-maneuver-legacy.entry-56d985a1.mjs} +2 -2
  30. package/dist/{mi-route-instructions-maneuver.entry-850b022d.mjs → mi-route-instructions-maneuver.entry-15651e06.mjs} +2 -2
  31. package/dist/{mi-route-instructions-step-legacy.entry-7838ab8b.mjs → mi-route-instructions-step-legacy.entry-447edbb3.mjs} +2 -2
  32. package/dist/{mi-route-instructions-step.entry-6430e774.mjs → mi-route-instructions-step.entry-662b524a.mjs} +2 -2
  33. package/dist/{mi-route-instructions.entry-b7d228c8.mjs → mi-route-instructions.entry-87100620.mjs} +2 -2
  34. package/dist/{mi-scroll-buttons.entry-2bd55174.mjs → mi-scroll-buttons.entry-1eaa7291.mjs} +2 -2
  35. package/dist/{mi-search.entry-6549dcdb.mjs → mi-search.entry-b6600740.mjs} +2 -2
  36. package/dist/{mi-share-sms.entry-f0fe3857.mjs → mi-share-sms.entry-28d0625e.mjs} +2 -2
  37. package/dist/{mi-step-switcher.entry-c92d13d6.mjs → mi-step-switcher.entry-4b03e06b.mjs} +2 -2
  38. package/dist/{mi-tab-panel.entry-85ff15ab.mjs → mi-tab-panel.entry-969003f2.mjs} +2 -2
  39. package/dist/{mi-tab.entry-9db9ace7.mjs → mi-tab.entry-ddac3934.mjs} +2 -2
  40. package/dist/{mi-tabs.entry-852470a6.mjs → mi-tabs.entry-9c8c4e8e.mjs} +2 -2
  41. package/dist/{mi-time.entry-adcc69e7.mjs → mi-time.entry-175f2c96.mjs} +2 -2
  42. package/dist/{reactcomponent-9850831c.mjs → reactcomponent-63f2e472.mjs} +6040 -5823
  43. package/package.json +1 -1
@@ -1,37 +1,37 @@
1
- import { P as f, u as _, i as d, j as A } from "./reactcomponent-9850831c.mjs";
2
- import { useState as j, useEffect as C } from "react";
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 D(o, e, t, r) {
4
+ function C(n, e, t, r) {
5
5
  function s(i) {
6
- return i instanceof t ? i : new t(function(n) {
7
- n(i);
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, n) {
10
+ return new (t || (t = Promise))(function(i, o) {
11
11
  function c(a) {
12
12
  try {
13
- p(r.next(a));
14
- } catch (u) {
15
- n(u);
13
+ u(r.next(a));
14
+ } catch (h) {
15
+ o(h);
16
16
  }
17
17
  }
18
18
  function l(a) {
19
19
  try {
20
- p(r.throw(a));
21
- } catch (u) {
22
- n(u);
20
+ u(r.throw(a));
21
+ } catch (h) {
22
+ o(h);
23
23
  }
24
24
  }
25
- function p(a) {
25
+ function u(a) {
26
26
  a.done ? i(a.value) : s(a.value).then(c, l);
27
27
  }
28
- p((r = r.apply(o, e || [])).next());
28
+ u((r = r.apply(n, e || [])).next());
29
29
  });
30
30
  }
31
- function T(o) {
32
- return o && o.__esModule && Object.prototype.hasOwnProperty.call(o, "default") ? o.default : o;
31
+ function $(n) {
32
+ return n && n.__esModule && Object.prototype.hasOwnProperty.call(n, "default") ? n.default : n;
33
33
  }
34
- var O = function o(e, t) {
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 (!o(e[s], t[s]))
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 n = i[s];
62
- if (!o(e[n], t[n]))
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
- }, $ = /* @__PURE__ */ T(O);
69
- const P = "__googleMapsScriptId";
70
- var I;
71
- (function(o) {
72
- o[o.INITIALIZED = 0] = "INITIALIZED", o[o.LOADING = 1] = "LOADING", o[o.SUCCESS = 2] = "SUCCESS", o[o.FAILURE = 3] = "FAILURE";
73
- })(I || (I = {}));
74
- class w {
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 = P, language: n, libraries: c = [], mapIds: l, nonce: p, region: a, retries: u = 3, url: h = "https://maps.googleapis.com/maps/api/js", version: g }) {
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 || P, this.language = n, this.libraries = c, this.mapIds = l, this.nonce = p, this.region = a, this.retries = u, this.url = h, this.version = g, w.instance) {
86
- if (!$(this.options, w.instance.options))
87
- throw new Error(`Loader must not be called again with different options. ${JSON.stringify(this.options)} !== ${JSON.stringify(w.instance.options)}`);
88
- return w.instance;
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
- w.instance = this;
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 ? I.FAILURE : this.done ? I.SUCCESS : this.loading ? I.LOADING : I.INITIALIZED;
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 n, c, l, p = "The Google Maps JavaScript API", a = "google", u = "importLibrary", h = "__ib__", g = document, m = window;
183
- m = m[a] || (m[a] = {});
184
- const b = m.maps || (m.maps = {}), M = /* @__PURE__ */ new Set(), E = new URLSearchParams(), S = () => (
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
- n || (n = new Promise((y, v) => D(this, void 0, void 0, function* () {
187
- var k;
188
- yield c = g.createElement("script"), c.id = this.id, E.set("libraries", [...M] + "");
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
- E.set(l.replace(/[A-Z]/g, (R) => "_" + R[0].toLowerCase()), i[l]);
191
- E.set("callback", a + ".maps." + h), c.src = this.url + "?" + E, b[h] = y, c.onerror = () => n = v(Error(p + " could not load.")), c.nonce = this.nonce || ((k = g.querySelector("script[nonce]")) === null || k === void 0 ? void 0 : k.nonce) || "", g.head.append(c);
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[u] ? console.warn(p + " only loads once. Ignoring:", i) : b[u] = (y, ...v) => M.add(y) && S().then(() => b[u](y, ...v));
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 n = new ErrorEvent("error", { error: i });
199
- this.loadErrorCallback(n);
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
- U.propTypes = {
239
- apiKey: f.string.isRequired,
240
- onInitialized: f.func.isRequired,
241
- center: f.object,
242
- zoom: f.number,
243
- bounds: f.object,
244
- heading: f.number,
245
- tilt: f.number,
246
- mapsIndoorsInstance: f.object,
247
- mapOptions: f.object,
248
- gmMapId: f.string
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 U({ apiKey: o, onInitialized: e, center: t, zoom: r, bounds: s, heading: i, tilt: n, mapsIndoorsInstance: c, mapOptions: l, gmMapId: p }) {
251
- const [a, u] = j(), [h, g] = j(), [m, b] = j(!1), M = _();
252
- return C(() => {
253
- h && (d(s) || c.getMapView().fitBounds(s, l == null ? void 0 : l.fitBoundsPadding), !d(t) && d(s) && h.getMap().setCenter(t), !d(r) && d(s) && h.getMap().setZoom(r), d(i) || h.getMap().setHeading(i), d(n) || h.getMap().setTilt(n));
254
- }, [h, t, r, i, n, s, l]), C(() => {
255
- c && h && a && !m && M && (h.getMap().setOptions({
256
- zoomControl: !0,
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((S) => {
268
- u(S);
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: n ?? 0,
278
- mapId: p,
268
+ tilt: o ?? 0,
269
+ mapId: u,
279
270
  gestureHandling: "greedy",
280
271
  ...l
281
272
  };
282
- d(l == null ? void 0 : l.showMapMarkers) || (y.showMapMarkers = l.showMapMarkers);
283
- const v = new window.mapsindoors.mapView.GoogleMapsView(y);
284
- g(v), e(v);
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__ */ A.jsx("div", { className: "mapsindoors-map google-maps-map-container", id: "map" });
277
+ }, []), /* @__PURE__ */ _.jsx("div", { className: "mapsindoors-map google-maps-map-container", id: "map" });
287
278
  }
288
279
  export {
289
- U as default
280
+ N as default
290
281
  };
291
- //# sourceMappingURL=GoogleMapsMap-a89aa859.mjs.map
282
+ //# sourceMappingURL=GoogleMapsMap-0db165c8.mjs.map