@mapvx/web-components 0.0.27 → 0.0.29
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/cjs/{base-floor-selector-CLFTtgbp.cjs → base-floor-selector--o9_09ZI.cjs} +2 -2
- package/dist/cjs/{class-map-BTH_74Qs.cjs → class-map-BSlQmGw8.cjs} +2 -2
- package/dist/cjs/{compact-floor-selector-CUgAJzTC.cjs → compact-floor-selector-CM85VieL.cjs} +2 -2
- package/dist/cjs/{consume-DvEpk7ME.cjs → consume-57OpMeCx.cjs} +2 -2
- package/dist/cjs/custom-map-DRJdhNz0.cjs +97 -0
- package/dist/cjs/{floor-selector-_ZGeTisd.cjs → floor-selector-BwhllcLc.cjs} +2 -2
- package/dist/cjs/{lazy-load-C0UlvHkw.cjs → lazy-load-CqAzFOsw.cjs} +2 -2
- package/dist/cjs/map-view-with-modal.cjs +2 -1
- package/dist/cjs/{qr-modal-dwEr6sDk.cjs → qr-modal-LH9N2Lki.cjs} +2 -2
- package/dist/cjs/{route-options-5hZvnUEf.cjs → route-options-EkTBrOWM.cjs} +2 -2
- package/dist/cjs/route-view-totems.cjs +1 -1
- package/dist/components/custom-map.d.ts +13 -0
- package/dist/components/custom-map.js +64 -0
- package/dist/components/floor-selector.d.ts +6 -0
- package/dist/components/floor-selector.js +40 -0
- package/dist/components/qr-modal.d.ts +7 -0
- package/dist/components/qr-modal.js +69 -0
- package/dist/components/route-options.d.ts +6 -0
- package/dist/components/route-options.js +51 -0
- package/dist/components/zoom-controls.d.ts +6 -0
- package/dist/components/zoom-controls.js +40 -0
- package/dist/es/assets/{compact-floor-selector-oq3Ovsm1.js → compact-floor-selector-DbMwoA34.js} +3 -3
- package/dist/es/assets/{components-BT9NDTry.js → components-DW6Fj5ug.js} +31 -6
- package/dist/es/assets/{map-view-with-modal-DiR8q30Q.js → map-view-with-modal-C76m0zr6.js} +4 -3
- package/dist/es/assets/{route-view-totems-CdM6PRGO.js → route-view-totems-CRCPdxwQ.js} +7 -7
- package/dist/es/assets/{utils-DM-AJZn2.js → utils-D7tfdubm.js} +15 -30
- package/dist/es/index.js +2 -2
- package/dist/es/route-view-totems.js +2 -2
- package/dist/iife/map-view-with-modal.js +13 -12
- package/dist/iife/route-view-totems.js +12 -12
- package/dist/route-view-totems.d.ts +16 -0
- package/dist/route-view-totems.js +58 -0
- package/dist/utils/styles.d.ts +2 -0
- package/dist/utils/styles.js +5 -0
- package/package.json +1 -1
- package/dist/cjs/custom-map-BT2xrMK_.cjs +0 -97
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { a as i$2, x, r, i as i$3, t as t$1, T } from './route-view-totems-
|
|
2
|
-
import { R as RouteAnimationController, M as MarkerController } from './utils-
|
|
1
|
+
import { a as i$2, x, r, i as i$3, n as n$1, t as t$1, T } from './route-view-totems-CRCPdxwQ.js';
|
|
2
|
+
import { R as RouteAnimationController, M as MarkerController } from './utils-D7tfdubm.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* @license
|
|
@@ -46,6 +46,9 @@ const style$3 = ":host{display:block;height:100%;width:100%}#map,.maplibregl-can
|
|
|
46
46
|
|
|
47
47
|
var __defProp$3 = Object.defineProperty;
|
|
48
48
|
var __getOwnPropDesc$3 = Object.getOwnPropertyDescriptor;
|
|
49
|
+
var __typeError = (msg) => {
|
|
50
|
+
throw TypeError(msg);
|
|
51
|
+
};
|
|
49
52
|
var __decorateClass$4 = (decorators, target, key, kind) => {
|
|
50
53
|
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$3(target, key) : target;
|
|
51
54
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
@@ -54,9 +57,15 @@ var __decorateClass$4 = (decorators, target, key, kind) => {
|
|
|
54
57
|
if (kind && result) __defProp$3(target, key, result);
|
|
55
58
|
return result;
|
|
56
59
|
};
|
|
60
|
+
var __accessCheck = (obj, member, msg) => member.has(obj) || __typeError("Cannot " + msg);
|
|
61
|
+
var __privateGet = (obj, member, getter) => (__accessCheck(obj, member, "read from private field"), getter ? getter.call(obj) : member.get(obj));
|
|
62
|
+
var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot add the same private member more than once") : member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
|
|
63
|
+
var __privateSet = (obj, member, value, setter) => (__accessCheck(obj, member, "write to private field"), member.set(obj, value), value);
|
|
64
|
+
var _useConfigZoom;
|
|
57
65
|
let CustomMap = class extends i$2 {
|
|
58
66
|
constructor() {
|
|
59
67
|
super();
|
|
68
|
+
__privateAdd(this, _useConfigZoom, false);
|
|
60
69
|
this.mapReady = false;
|
|
61
70
|
this.routeAnimationHandlers = {
|
|
62
71
|
onRouteAnimationFinished: () => {
|
|
@@ -97,6 +106,12 @@ let CustomMap = class extends i$2 {
|
|
|
97
106
|
this.routeAnimationController = new RouteAnimationController(this, this.routeAnimationHandlers);
|
|
98
107
|
this.markerController = new MarkerController(this);
|
|
99
108
|
}
|
|
109
|
+
get useConfigZoom() {
|
|
110
|
+
return __privateGet(this, _useConfigZoom);
|
|
111
|
+
}
|
|
112
|
+
set useConfigZoom(_) {
|
|
113
|
+
__privateSet(this, _useConfigZoom, _);
|
|
114
|
+
}
|
|
100
115
|
async firstUpdated() {
|
|
101
116
|
if (this.shadowRoot) {
|
|
102
117
|
const style2 = document.createElement("style");
|
|
@@ -106,6 +121,7 @@ let CustomMap = class extends i$2 {
|
|
|
106
121
|
}
|
|
107
122
|
async updated() {
|
|
108
123
|
this.updateAttributes();
|
|
124
|
+
this.markerController.setUseConfigZoom(this.useConfigZoom);
|
|
109
125
|
if (!this.sdkData?.sdk) return;
|
|
110
126
|
const {
|
|
111
127
|
sdk,
|
|
@@ -159,6 +175,7 @@ let CustomMap = class extends i$2 {
|
|
|
159
175
|
this.markerController.setMap(this.lzMap);
|
|
160
176
|
this.markerController.setParentPlace(parentPlace);
|
|
161
177
|
this.markerController.setConfig(generalConfig);
|
|
178
|
+
this.markerController.setUseConfigZoom(this.useConfigZoom);
|
|
162
179
|
}
|
|
163
180
|
if (currentFloor && currentFloor.key !== this._currentMapFloor && this.mapReady) {
|
|
164
181
|
this.setCurrentMapFloor(currentFloor.key);
|
|
@@ -198,6 +215,7 @@ let CustomMap = class extends i$2 {
|
|
|
198
215
|
_initializeCamera() {
|
|
199
216
|
if (!this.lzMap || !this.mapReady || !this.sdkData) return;
|
|
200
217
|
const { destination, origin, route } = this.sdkData;
|
|
218
|
+
const desiredZoom = this.useConfigZoom ? this.config?.initialZoom ?? 18 : 20.5;
|
|
201
219
|
if (!route) {
|
|
202
220
|
const center = destination ? destination.position : origin?.position;
|
|
203
221
|
this.lzMap?.updateCamera({
|
|
@@ -205,7 +223,8 @@ let CustomMap = class extends i$2 {
|
|
|
205
223
|
animate: false,
|
|
206
224
|
pitch: this.config?.pitch ?? 0,
|
|
207
225
|
center,
|
|
208
|
-
zoom:
|
|
226
|
+
zoom: desiredZoom
|
|
227
|
+
// zoom: this.config?.initialZoom ?? 18,
|
|
209
228
|
});
|
|
210
229
|
} else {
|
|
211
230
|
const originFloor = origin?.inFloors?.[0];
|
|
@@ -229,7 +248,8 @@ let CustomMap = class extends i$2 {
|
|
|
229
248
|
animate: false,
|
|
230
249
|
pitch: this.config?.pitch ?? 0,
|
|
231
250
|
center,
|
|
232
|
-
zoom:
|
|
251
|
+
zoom: desiredZoom
|
|
252
|
+
// zoom: this.config?.initialZoom ?? 18,
|
|
233
253
|
});
|
|
234
254
|
}
|
|
235
255
|
} else {
|
|
@@ -239,7 +259,8 @@ let CustomMap = class extends i$2 {
|
|
|
239
259
|
animate: false,
|
|
240
260
|
pitch: this.config?.pitch ?? 0,
|
|
241
261
|
center,
|
|
242
|
-
zoom:
|
|
262
|
+
zoom: desiredZoom
|
|
263
|
+
// zoom: this.config?.initialZoom ?? 18,
|
|
243
264
|
});
|
|
244
265
|
}
|
|
245
266
|
}
|
|
@@ -291,6 +312,7 @@ let CustomMap = class extends i$2 {
|
|
|
291
312
|
</div>`;
|
|
292
313
|
}
|
|
293
314
|
};
|
|
315
|
+
_useConfigZoom = new WeakMap();
|
|
294
316
|
CustomMap.styles = [
|
|
295
317
|
i$3`
|
|
296
318
|
:host {
|
|
@@ -388,6 +410,9 @@ CustomMap.styles = [
|
|
|
388
410
|
__decorateClass$4([
|
|
389
411
|
c({ context: sdkContext, subscribe: true })
|
|
390
412
|
], CustomMap.prototype, "sdkData", 2);
|
|
413
|
+
__decorateClass$4([
|
|
414
|
+
n$1({ type: Boolean, attribute: "use-config-zoom", reflect: true })
|
|
415
|
+
], CustomMap.prototype, "useConfigZoom", 1);
|
|
391
416
|
CustomMap = __decorateClass$4([
|
|
392
417
|
t$1("custom-map")
|
|
393
418
|
], CustomMap);
|
|
@@ -3826,4 +3851,4 @@ const routeOptions = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProper
|
|
|
3826
3851
|
}, Symbol.toStringTag, { value: 'Module' }));
|
|
3827
3852
|
|
|
3828
3853
|
export { BaseFloorSelector as B, customMap as c, e, floorSelector as f, i$1 as i, qrModal as q, routeOptions as r, sdkContext as s };
|
|
3829
|
-
//# sourceMappingURL=components-
|
|
3854
|
+
//# sourceMappingURL=components-DW6Fj5ug.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { i, n, a as i$1, A as AnalyticsController, l as loadCustomMap, b as loadCompactFloorSelector, p as preloadMaplibreCss, R as RollbarController, x, t } from './route-view-totems-
|
|
2
|
-
import { S as SDKController } from './utils-
|
|
1
|
+
import { i, n, a as i$1, A as AnalyticsController, l as loadCustomMap, b as loadCompactFloorSelector, p as preloadMaplibreCss, R as RollbarController, x, t } from './route-view-totems-CRCPdxwQ.js';
|
|
2
|
+
import { S as SDKController } from './utils-D7tfdubm.js';
|
|
3
3
|
|
|
4
4
|
var __defProp = Object.defineProperty;
|
|
5
5
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
@@ -203,6 +203,7 @@ let MapViewWithModal = class extends i$1 {
|
|
|
203
203
|
class="map-container"
|
|
204
204
|
?compact-mode=${this.compactMode}
|
|
205
205
|
zoom-size=${this.zoomButtonSize}
|
|
206
|
+
use-config-zoom
|
|
206
207
|
style="
|
|
207
208
|
/* Forward theme to custom-map */
|
|
208
209
|
--zoom-border-color: var(--mvx-zoom-border-color, var(--mvx-border-color));
|
|
@@ -321,4 +322,4 @@ MapViewWithModal = __decorateClass([
|
|
|
321
322
|
], MapViewWithModal);
|
|
322
323
|
|
|
323
324
|
export { MapViewWithModal as M };
|
|
324
|
-
//# sourceMappingURL=map-view-with-modal-
|
|
325
|
+
//# sourceMappingURL=map-view-with-modal-C76m0zr6.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { S as SDKController } from './utils-
|
|
1
|
+
import { S as SDKController } from './utils-D7tfdubm.js';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* @license
|
|
@@ -184,11 +184,11 @@ class AnalyticsController {
|
|
|
184
184
|
}
|
|
185
185
|
}
|
|
186
186
|
|
|
187
|
-
const loadCustomMap = () => import('./components-
|
|
188
|
-
const loadFloorSelector = () => import('./components-
|
|
189
|
-
const loadCompactFloorSelector = () => import('./compact-floor-selector-
|
|
190
|
-
const loadQrModal = () => import('./components-
|
|
191
|
-
const loadRouteOptions = () => import('./components-
|
|
187
|
+
const loadCustomMap = () => import('./components-DW6Fj5ug.js').then(n => n.c);
|
|
188
|
+
const loadFloorSelector = () => import('./components-DW6Fj5ug.js').then(n => n.f);
|
|
189
|
+
const loadCompactFloorSelector = () => import('./compact-floor-selector-DbMwoA34.js');
|
|
190
|
+
const loadQrModal = () => import('./components-DW6Fj5ug.js').then(n => n.q);
|
|
191
|
+
const loadRouteOptions = () => import('./components-DW6Fj5ug.js').then(n => n.r);
|
|
192
192
|
const preloadMaplibreCss = async () => {
|
|
193
193
|
try {
|
|
194
194
|
await import('./maplibre-gl-BKzNcqp_.js');
|
|
@@ -466,4 +466,4 @@ RouteViewTotems = __decorateClass([
|
|
|
466
466
|
], RouteViewTotems);
|
|
467
467
|
|
|
468
468
|
export { AnalyticsController as A, RollbarController as R, T, i as a, loadCompactFloorSelector as b, RouteViewTotems as c, i$3 as i, loadCustomMap as l, n, preloadMaplibreCss as p, r$3 as r, t, x };
|
|
469
|
-
//# sourceMappingURL=route-view-totems-
|
|
469
|
+
//# sourceMappingURL=route-view-totems-CRCPdxwQ.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { i, s as sdkContext } from './components-
|
|
2
|
-
import { R as RollbarController } from './route-view-totems-
|
|
1
|
+
import { i, s as sdkContext } from './components-DW6Fj5ug.js';
|
|
2
|
+
import { R as RollbarController } from './route-view-totems-CRCPdxwQ.js';
|
|
3
3
|
|
|
4
4
|
var dist = {exports: {}};
|
|
5
5
|
|
|
@@ -12694,6 +12694,7 @@ class MarkerController {
|
|
|
12694
12694
|
this.markersIds = [];
|
|
12695
12695
|
this.mapReady = false;
|
|
12696
12696
|
this.accessibleRoute = false;
|
|
12697
|
+
this.useConfigZoom = false;
|
|
12697
12698
|
this.host.addController(this);
|
|
12698
12699
|
}
|
|
12699
12700
|
hostConnected() {
|
|
@@ -12717,6 +12718,9 @@ class MarkerController {
|
|
|
12717
12718
|
setConfig(config) {
|
|
12718
12719
|
this.config = config;
|
|
12719
12720
|
}
|
|
12721
|
+
setUseConfigZoom(useConfig) {
|
|
12722
|
+
this.useConfigZoom = useConfig;
|
|
12723
|
+
}
|
|
12720
12724
|
updateMarkers(markers) {
|
|
12721
12725
|
if (!this.connected || !this.map || !this.mapReady || !this.parentPlace) return;
|
|
12722
12726
|
this.markersIds.forEach((m) => {
|
|
@@ -12829,7 +12833,8 @@ class MarkerController {
|
|
|
12829
12833
|
center: coordinates[0],
|
|
12830
12834
|
bearing: this.config?.mapRotations?.[this.parentPlace?.lazarilloId ?? ""]?.angle ?? 0,
|
|
12831
12835
|
pitch: this.config?.pitch ?? 0,
|
|
12832
|
-
zoom: this.config?.initialZoom ?? 18,
|
|
12836
|
+
zoom: this.useConfigZoom ? this.config?.initialZoom ?? 18 : 20.5,
|
|
12837
|
+
// zoom: this.config?.initialZoom ?? 18,
|
|
12833
12838
|
animate: true
|
|
12834
12839
|
});
|
|
12835
12840
|
}, 200);
|
|
@@ -12846,8 +12851,8 @@ class MarkerController {
|
|
|
12846
12851
|
this.map?.updateCamera({
|
|
12847
12852
|
bearing: this.config?.mapRotations?.[this.parentPlace?.lazarilloId ?? ""]?.angle ?? 0,
|
|
12848
12853
|
pitch: this.config?.pitch ?? 0,
|
|
12849
|
-
|
|
12850
|
-
zoom: Math.min(this.config?.initialZoom ?? 18, this.map?.map.getZoom() ?? 18),
|
|
12854
|
+
zoom: this.useConfigZoom ? this.config?.initialZoom ?? 18 : 20.5,
|
|
12855
|
+
// zoom: Math.min(this.config?.initialZoom ?? 18, this.map?.map.getZoom() ?? 18),
|
|
12851
12856
|
animate: true
|
|
12852
12857
|
});
|
|
12853
12858
|
}, 200);
|
|
@@ -12894,30 +12899,10 @@ class RouteAnimationController {
|
|
|
12894
12899
|
if (coordinates.length > 0) {
|
|
12895
12900
|
this.lzMap?.fitCoordinates(coordinates, {
|
|
12896
12901
|
padding: {
|
|
12897
|
-
bottom:
|
|
12898
|
-
left:
|
|
12899
|
-
right:
|
|
12900
|
-
top:
|
|
12901
|
-
}
|
|
12902
|
-
});
|
|
12903
|
-
const routeSteps = [
|
|
12904
|
-
{
|
|
12905
|
-
floorId: this.route?.legs?.at(0)?.steps?.at(0)?.startInsideFloor,
|
|
12906
|
-
coordinates: this.route?.legs?.at(0)?.steps?.at(0)?.startLocation
|
|
12907
|
-
},
|
|
12908
|
-
{
|
|
12909
|
-
floorId: this.route?.legs?.at(-1)?.steps?.at(-1)?.endInsideFloor,
|
|
12910
|
-
coordinates: this.route?.legs?.at(-1)?.steps?.at(-1)?.endLocation
|
|
12911
|
-
}
|
|
12912
|
-
];
|
|
12913
|
-
routeSteps.forEach((step) => {
|
|
12914
|
-
if (floorId === step.floorId && step.coordinates) {
|
|
12915
|
-
this.lzMap?.updateCamera({
|
|
12916
|
-
animate: false,
|
|
12917
|
-
center: step.coordinates,
|
|
12918
|
-
// @ts-expect-error TODO: need sdk to get zoom
|
|
12919
|
-
zoom: Math.min(this.lzMap?.map.getZoom() ?? 18, this.config?.initialZoom ?? 18)
|
|
12920
|
-
});
|
|
12902
|
+
bottom: 200,
|
|
12903
|
+
left: 350,
|
|
12904
|
+
right: 350,
|
|
12905
|
+
top: 200
|
|
12921
12906
|
}
|
|
12922
12907
|
});
|
|
12923
12908
|
}
|
|
@@ -13058,4 +13043,4 @@ class RouteAnimationController {
|
|
|
13058
13043
|
}
|
|
13059
13044
|
|
|
13060
13045
|
export { MarkerController as M, RouteAnimationController as R, SDKController as S };
|
|
13061
|
-
//# sourceMappingURL=utils-
|
|
13046
|
+
//# sourceMappingURL=utils-D7tfdubm.js.map
|
package/dist/es/index.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { c as RouteViewTotems } from './assets/route-view-totems-
|
|
2
|
-
export { M as MapViewWithModal } from './assets/map-view-with-modal-
|
|
1
|
+
export { c as RouteViewTotems } from './assets/route-view-totems-CRCPdxwQ.js';
|
|
2
|
+
export { M as MapViewWithModal } from './assets/map-view-with-modal-C76m0zr6.js';
|
|
3
3
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { c as RouteViewTotems } from './assets/route-view-totems-
|
|
2
|
-
import './assets/utils-
|
|
1
|
+
export { c as RouteViewTotems } from './assets/route-view-totems-CRCPdxwQ.js';
|
|
2
|
+
import './assets/utils-D7tfdubm.js';
|
|
3
3
|
//# sourceMappingURL=route-view-totems.js.map
|