@mapvx/web-components 0.0.21 → 0.0.22
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-DHIQdC2s.cjs +2 -0
- package/dist/cjs/{class-map-DsgSsfJZ.cjs → class-map-BGLcy4Zq.cjs} +2 -2
- package/dist/cjs/compact-floor-selector-BCLDxKto.cjs +151 -0
- package/dist/cjs/{consume-BqcKIzaR.cjs → consume-vuXzE_ul.cjs} +2 -2
- package/dist/cjs/custom-map-CqKD5Fum.cjs +90 -0
- package/dist/cjs/{floor-selector-Bs-_2vdJ.cjs → floor-selector-Bp_umxgG.cjs} +7 -7
- package/dist/cjs/{lazy-load-jYim30I-.cjs → lazy-load-DWZU-puG.cjs} +2 -2
- package/dist/cjs/map-view-with-modal.cjs +39 -5
- package/dist/cjs/{qr-modal-C0-FMRdg.cjs → qr-modal-7T6NzJv6.cjs} +2 -2
- package/dist/cjs/{route-options-IY7Qxb9z.cjs → route-options-DdF4AtDx.cjs} +2 -2
- package/dist/cjs/route-view-totems.cjs +1 -1
- package/dist/es/assets/compact-floor-selector-D-LPjNVW.js +253 -0
- package/dist/es/assets/{components-BX-NvkMO.js → components-BGe90NOX.js} +165 -31
- package/dist/es/assets/map-view-with-modal-CwE9e04X.js +274 -0
- package/dist/es/assets/{route-view-totems-DXCPYztz.js → route-view-totems-Cu8sG0kp.js} +8 -7
- package/dist/es/assets/{utils-FyhZTuD9.js → utils-4sQ3ZnpP.js} +9 -6
- package/dist/es/index.js +2 -2
- package/dist/es/route-view-totems.js +2 -2
- package/dist/iife/map-view-with-modal.js +285 -9
- package/dist/iife/route-view-totems.js +91 -9
- package/package.json +1 -1
- package/dist/cjs/custom-map-d_XJ3r-x.cjs +0 -8
- package/dist/es/assets/map-view-with-modal-Dpg6IjBv.js +0 -148
|
@@ -1,148 +0,0 @@
|
|
|
1
|
-
import { i, a as i$1, A as AnalyticsController, l as loadCustomMap, R as RollbarController, x, n, t } from './route-view-totems-DXCPYztz.js';
|
|
2
|
-
import { S as SDKController } from './utils-FyhZTuD9.js';
|
|
3
|
-
|
|
4
|
-
var __defProp = Object.defineProperty;
|
|
5
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
6
|
-
var __typeError = (msg) => {
|
|
7
|
-
throw TypeError(msg);
|
|
8
|
-
};
|
|
9
|
-
var __decorateClass = (decorators, target, key, kind) => {
|
|
10
|
-
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
|
|
11
|
-
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
12
|
-
if (decorator = decorators[i])
|
|
13
|
-
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
14
|
-
if (kind && result) __defProp(target, key, result);
|
|
15
|
-
return result;
|
|
16
|
-
};
|
|
17
|
-
var __accessCheck = (obj, member, msg) => member.has(obj) || __typeError("Cannot " + msg);
|
|
18
|
-
var __privateGet = (obj, member, getter) => (__accessCheck(obj, member, "read from private field"), getter ? getter.call(obj) : member.get(obj));
|
|
19
|
-
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);
|
|
20
|
-
var __privateSet = (obj, member, value, setter) => (__accessCheck(obj, member, "write to private field"), member.set(obj, value), value);
|
|
21
|
-
var _apiKey, _parentPlaceId, _locale, _placeId;
|
|
22
|
-
let MapViewWithModal = class extends i {
|
|
23
|
-
constructor() {
|
|
24
|
-
super(...arguments);
|
|
25
|
-
this.styles = [
|
|
26
|
-
i$1`
|
|
27
|
-
:host {
|
|
28
|
-
display: block;
|
|
29
|
-
height: 100%;
|
|
30
|
-
width: 100%;
|
|
31
|
-
}
|
|
32
|
-
`,
|
|
33
|
-
i$1`
|
|
34
|
-
.map-container {
|
|
35
|
-
height: 100%;
|
|
36
|
-
width: 100%;
|
|
37
|
-
}
|
|
38
|
-
`
|
|
39
|
-
];
|
|
40
|
-
__privateAdd(this, _apiKey, "");
|
|
41
|
-
__privateAdd(this, _parentPlaceId, "");
|
|
42
|
-
__privateAdd(this, _locale, "es");
|
|
43
|
-
__privateAdd(this, _placeId, "");
|
|
44
|
-
this.sdkController = new SDKController(this);
|
|
45
|
-
this.analyticsController = AnalyticsController.getInstance();
|
|
46
|
-
}
|
|
47
|
-
get apiKey() {
|
|
48
|
-
return __privateGet(this, _apiKey);
|
|
49
|
-
}
|
|
50
|
-
set apiKey(_) {
|
|
51
|
-
__privateSet(this, _apiKey, _);
|
|
52
|
-
}
|
|
53
|
-
get parentPlaceId() {
|
|
54
|
-
return __privateGet(this, _parentPlaceId);
|
|
55
|
-
}
|
|
56
|
-
set parentPlaceId(_) {
|
|
57
|
-
__privateSet(this, _parentPlaceId, _);
|
|
58
|
-
}
|
|
59
|
-
get locale() {
|
|
60
|
-
return __privateGet(this, _locale);
|
|
61
|
-
}
|
|
62
|
-
set locale(_) {
|
|
63
|
-
__privateSet(this, _locale, _);
|
|
64
|
-
}
|
|
65
|
-
get placeId() {
|
|
66
|
-
return __privateGet(this, _placeId);
|
|
67
|
-
}
|
|
68
|
-
set placeId(_) {
|
|
69
|
-
__privateSet(this, _placeId, _);
|
|
70
|
-
}
|
|
71
|
-
async _loadComponents() {
|
|
72
|
-
await Promise.all([loadCustomMap()]);
|
|
73
|
-
}
|
|
74
|
-
async firstUpdated() {
|
|
75
|
-
await this._loadComponents();
|
|
76
|
-
{
|
|
77
|
-
this.analyticsController.initialize("map-view-with-modal");
|
|
78
|
-
RollbarController.initialize("map-view-with-modal");
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
_mapReadyHandler() {
|
|
82
|
-
this.sdkController.setMapReady(true);
|
|
83
|
-
this.analyticsController.trackEvent("map_ready", this.baseParams());
|
|
84
|
-
}
|
|
85
|
-
_updateFloorHandler(event) {
|
|
86
|
-
const floorId = event.detail;
|
|
87
|
-
this.sdkController.setFloor(floorId);
|
|
88
|
-
const params = this.baseParams();
|
|
89
|
-
params["floor_id"] = floorId;
|
|
90
|
-
this.analyticsController.trackEvent("floor_change", params);
|
|
91
|
-
}
|
|
92
|
-
baseParams() {
|
|
93
|
-
return {
|
|
94
|
-
apiKey: this.apiKey,
|
|
95
|
-
locale: this.locale,
|
|
96
|
-
parentPlaceId: this.parentPlaceId,
|
|
97
|
-
placeId: this.placeId,
|
|
98
|
-
host: window.location.host,
|
|
99
|
-
pathname: window.location.pathname,
|
|
100
|
-
search: window.location.search,
|
|
101
|
-
hash: window.location.hash,
|
|
102
|
-
referrer: document.referrer,
|
|
103
|
-
userAgent: navigator.userAgent,
|
|
104
|
-
screenWidth: window.innerWidth
|
|
105
|
-
};
|
|
106
|
-
}
|
|
107
|
-
updated(changedProperties) {
|
|
108
|
-
if (this.apiKey && this.locale && this.parentPlaceId && (changedProperties.has("apiKey") || changedProperties.has("locale") || changedProperties.has("parentPlaceId"))) {
|
|
109
|
-
this.sdkController.initialize(this.apiKey, this.locale, this.parentPlaceId);
|
|
110
|
-
}
|
|
111
|
-
if (this.placeId && changedProperties.has("placeId")) {
|
|
112
|
-
this.sdkController.setOriginAndDestination("", this.placeId);
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
render() {
|
|
116
|
-
return x`
|
|
117
|
-
<div class="route-container" style="height: 100%; width: 100%;">
|
|
118
|
-
<custom-map
|
|
119
|
-
class="map-container"
|
|
120
|
-
@mapReady=${this._mapReadyHandler}
|
|
121
|
-
@floorChange=${this._updateFloorHandler}
|
|
122
|
-
></custom-map>
|
|
123
|
-
</div>
|
|
124
|
-
`;
|
|
125
|
-
}
|
|
126
|
-
};
|
|
127
|
-
_apiKey = /* @__PURE__ */ new WeakMap();
|
|
128
|
-
_parentPlaceId = /* @__PURE__ */ new WeakMap();
|
|
129
|
-
_locale = /* @__PURE__ */ new WeakMap();
|
|
130
|
-
_placeId = /* @__PURE__ */ new WeakMap();
|
|
131
|
-
__decorateClass([
|
|
132
|
-
n({ type: String })
|
|
133
|
-
], MapViewWithModal.prototype, "apiKey", 1);
|
|
134
|
-
__decorateClass([
|
|
135
|
-
n({ type: String })
|
|
136
|
-
], MapViewWithModal.prototype, "parentPlaceId", 1);
|
|
137
|
-
__decorateClass([
|
|
138
|
-
n({ type: String })
|
|
139
|
-
], MapViewWithModal.prototype, "locale", 1);
|
|
140
|
-
__decorateClass([
|
|
141
|
-
n({ type: String })
|
|
142
|
-
], MapViewWithModal.prototype, "placeId", 1);
|
|
143
|
-
MapViewWithModal = __decorateClass([
|
|
144
|
-
t("map-view-with-modal")
|
|
145
|
-
], MapViewWithModal);
|
|
146
|
-
|
|
147
|
-
export { MapViewWithModal as M };
|
|
148
|
-
//# sourceMappingURL=map-view-with-modal-Dpg6IjBv.js.map
|