@expofp/floorplan 3.17.0 → 3.18.1
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/browser/{Button-BvHs209k.js → Button-D24xOa4I.js} +5 -5
- package/dist/browser/{CookieConsent-uGe-orOE.js → CookieConsent-BTzsoyoV.js} +7 -7
- package/dist/browser/{Debug-DM3Cnzjy.js → Debug-CqKhUi06.js} +7 -7
- package/dist/browser/{Demo-DIExdSw5.js → Demo-B3EOY0Xq.js} +9 -9
- package/dist/browser/{Free-C90eDy1u.js → Free-pY7M8m4h.js} +9 -9
- package/dist/browser/{Gallery-DseC1DGK.js → Gallery-A8cqqrTJ.js} +9 -9
- package/dist/browser/{GpsLoader-uaVrSMAP.js → GpsLoader-DpJhUdzw.js} +22 -22
- package/dist/browser/KioskStore-DICU_c9W.js +288 -0
- package/dist/browser/{MaplibreAdapter-CCIJmi3w.js → MaplibreAdapter-DDSPODNR.js} +2127 -2070
- package/dist/browser/{ModalContainer-DJALRumx.js → ModalContainer-DnwGQgDt.js} +10 -10
- package/dist/browser/{PermissionNotice-Ck0m5tkz.js → PermissionNotice-Gw1lUPnc.js} +6 -6
- package/dist/browser/{SetKioskMode-BAlK8FJQ.js → SetKioskMode-mh3piul9.js} +11 -11
- package/dist/browser/{ShowKiosk-D1qMukNo.js → ShowKiosk-zkF-CXr8.js} +12 -12
- package/dist/browser/{TouchHand-DJKOFZCg.js → TouchHand-DWec6Hd2.js} +4 -4
- package/dist/browser/{ViewerMenuPanel-DfKgKmA-.js → ViewerMenuPanel-C_wp1AsD.js} +10 -10
- package/dist/browser/{add-debug-secret-listener-G4LjvH4q.js → add-debug-secret-listener-DVLr6HP8.js} +1 -1
- package/dist/browser/{adopt-global-settings-BmgJScKv.js → adopt-global-settings-Btj0VnLn.js} +9 -9
- package/dist/browser/{boolean-editor-P87LiphM.js → boolean-editor-BpIQdba3.js} +9 -9
- package/dist/browser/{bootIntercom-DtSpojcT.js → bootIntercom-DSg-Cxkq.js} +2 -2
- package/dist/browser/{booth-by-xy-DgltL0jn.js → booth-by-xy-BvNNTs6Q.js} +429 -376
- package/dist/browser/bundle.json +68 -65
- package/dist/browser/{classnames-D-Qg-3tl.js → classnames-CFZOol_A.js} +2 -2
- package/dist/browser/{client-Bzcq41f0.js → client-BSrj7kzz.js} +4 -4
- package/dist/browser/{components-Bv7sEfN0.js → components-6Db-nRo5.js} +1544 -1540
- package/dist/browser/{debug-overlay-B6eWMym4.js → debug-overlay-Bt6DNp-8.js} +10 -10
- package/dist/browser/{debug-ui-CmcCYtr0.js → debug-ui-X9kyhrgx.js} +6 -6
- package/dist/browser/{dist-BbIPnlzY.js → dist-CSjEqv2k.js} +3 -3
- package/dist/browser/{dist-BsMb6HPT.js → dist-H1U2_uEE.js} +5 -5
- package/dist/browser/{dist-BX0nA41K.js → dist-HS_i2V3o.js} +6 -6
- package/dist/browser/{efp-debug-init-BRktPQXJ.js → efp-debug-init-D0_xHeMm.js} +3 -3
- package/dist/browser/{enum-editor-BHa21MHI.js → enum-editor-Y3eY0GZN.js} +4 -4
- package/dist/browser/{es5-C4TOotvl.js → es5-Bnh-FuEf.js} +2 -2
- package/dist/browser/{event-not-found-5FiUS2L1.js → event-not-found-DaBAYGFy.js} +1 -1
- package/dist/browser/{exports-DE-f0obs.js → exports-pRH9fRPj.js} +1 -1
- package/dist/browser/{favicon-B1qr1OYc.js → favicon-eVAPrhqR.js} +1 -1
- package/dist/browser/{fetch-retry.umd-CdOGnxGU.js → fetch-retry.umd-CU86oApr.js} +2 -2
- package/dist/browser/{flex-OjTlgVl3.js → flex-CBHNyrZ4.js} +5 -5
- package/dist/browser/{floorplan.loader-DZfgXzTQ.js → floorplan.loader-C2Uhu9rp.js} +10 -10
- package/dist/browser/{floorplan.ready-D4YwQEXj.js → floorplan.ready-D1uAmP_v.js} +161 -161
- package/dist/browser/{fuse-C28vZbTE.js → fuse-N8kU4K-S.js} +2 -2
- package/dist/browser/{i18n-BsYXLDK5.js → i18n-BtP9mFz3.js} +13 -8
- package/dist/browser/index.js +14 -14
- package/dist/browser/{index.module-DqUrH37c.js → index.module-BsJ6W9of.js} +4 -4
- package/dist/browser/integrateKiosk-3pSiw3dQ.js +33 -0
- package/dist/browser/{is-webview-CZP7j8cz.js → is-webview-Cta8T4n3.js} +1 -1
- package/dist/browser/{jsx-runtime--6my_WCj.js → jsx-runtime-BEbKJk0I.js} +2 -2
- package/dist/browser/kiosk-record-CqwMLWxV.js +18 -0
- package/dist/browser/{lib-YBUjKSJT.js → lib-I9l3N_qn.js} +3 -3
- package/dist/browser/{loadImage-jxJkKG3w.js → loadImage-Dss1EbV-.js} +4 -4
- package/dist/browser/{logDeviceInfo-COuAthf5.js → logDeviceInfo-C71JR2gm.js} +9 -9
- package/dist/browser/{main-ffAOHstq.js → main-CfBwT8A1.js} +1 -1
- package/dist/browser/{mobx-BaMKXcrS.js → mobx-BczBqzzL.js} +4 -4
- package/dist/browser/{optional-boolean-editor-B60pTwsX.js → optional-boolean-editor-DzQfvreW.js} +3 -3
- package/dist/browser/{optional-enum-editor-iqX384jX.js → optional-enum-editor-CLMliNto.js} +4 -4
- package/dist/browser/{optional-string-editor-CyROCUHO.js → optional-string-editor-_KGdUVEY.js} +4 -4
- package/dist/browser/{particles.min-DVNuNdIF.js → particles.min-B1MXziWd.js} +2 -2
- package/dist/browser/{react-BCe3bV8J.js → react-DGnrgmGu.js} +2 -2
- package/dist/browser/{react-dom-CN00JDn_.js → react-dom-Cw00D2pA.js} +3 -3
- package/dist/browser/{rolldown-runtime-k6cAZhal.js → rolldown-runtime-BwZ60izJ.js} +1 -1
- package/dist/browser/{select-BGQoI7LX.js → select-D1YJPbva.js} +10 -10
- package/dist/browser/{settings-BJy-4Ynk.js → settings-Bi32JyQ7.js} +2 -2
- package/dist/browser/{settings-item-OZTob0if.js → settings-item-SFeXQJg_.js} +6 -6
- package/dist/browser/{store--s4Hqnvn.js → store-D3AM4bNd.js} +24 -15
- package/dist/browser/{string-editor-PZ1g-Xj9.js → string-editor-CDi_Yy04.js} +4 -4
- package/dist/browser/{text-field-BnEH_wLE.js → text-field-BtEculxh.js} +5 -5
- package/dist/browser/{theme-HBJ7wWWR.js → theme-DDvtl3pp.js} +8 -8
- package/dist/browser/{ui-3KmVe3Bv.js → ui-xJEwvFPJ.js} +8 -8
- package/dist/browser/{useRenderTarget-DJqfltMZ.js → useRenderTarget-Cswo9eRB.js} +4 -4
- package/dist/esm/components/Kiosk/KioskStore.d.ts +9 -0
- package/dist/esm/components/Kiosk/KioskStore.js +1 -1
- package/dist/esm/components/Kiosk/SetKiosk/types.d.ts +18 -14
- package/dist/esm/components/Kiosk/integrateKiosk.d.ts +1 -1
- package/dist/esm/components/Kiosk/integrateKiosk.js +1 -1
- package/dist/esm/components/Kiosk/kiosk-record.d.ts +19 -0
- package/dist/esm/components/Kiosk/kiosk-record.js +1 -0
- package/dist/esm/components/Map/Map.js +1 -1
- package/dist/esm/components/Map/drawing/config/config-all.d.ts +6 -3
- package/dist/esm/components/Map/drawing/config/config-all.js +1 -1
- package/dist/esm/components/Map/drawing/config/config-booth-badge.d.ts +8 -4
- package/dist/esm/components/Map/drawing/config/config-booth-badge.js +1 -1
- package/dist/esm/components/Maplibre/MaplibreAdapter.js +1 -1
- package/dist/esm/components/Maplibre/useKioskIdleEvents.d.ts +18 -0
- package/dist/esm/components/Maplibre/useKioskIdleEvents.js +1 -0
- package/dist/esm/store/MaplibreStore.d.ts +47 -0
- package/dist/esm/store/MaplibreStore.js +1 -1
- package/package.json +8 -8
- package/dist/browser/KioskStore-BG94IdLy.js +0 -241
- package/dist/browser/integrateKiosk-BEXKHkvI.js +0 -28
|
@@ -1,15 +1,62 @@
|
|
|
1
1
|
import type RootStore from './RootStore';
|
|
2
2
|
export type MaplibreViewMode = 'floorplan' | 'map2d' | 'map3d';
|
|
3
|
+
/** The MapLibre camera framing, in the map's own terms. */
|
|
4
|
+
export interface MaplibreCameraState {
|
|
5
|
+
lng: number;
|
|
6
|
+
lat: number;
|
|
7
|
+
zoom: number;
|
|
8
|
+
/** Degrees. */
|
|
9
|
+
bearing: number;
|
|
10
|
+
/** Degrees. */
|
|
11
|
+
pitch: number;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* A framing to move the camera to. `bearing` and `pitch` are optional because a
|
|
15
|
+
* kiosk saved before those fields existed carries neither.
|
|
16
|
+
*/
|
|
17
|
+
export interface MaplibreCameraTarget {
|
|
18
|
+
lng: number;
|
|
19
|
+
lat: number;
|
|
20
|
+
zoom: number;
|
|
21
|
+
/** Degrees; omitted falls back to the venue bearing. */
|
|
22
|
+
bearing?: number;
|
|
23
|
+
/** Degrees; omitted falls back to the view mode's default pitch. */
|
|
24
|
+
pitch?: number;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Read/write access to the live MapLibre camera, registered by MaplibreAdapter
|
|
28
|
+
* once the map is up. In map mode the renderer runs in the renderer's external
|
|
29
|
+
* mode, where `renderer.controls` is a no-op stub that reports a zeroed camera —
|
|
30
|
+
* so anything that has to capture or restore the camera (the kiosk home framing)
|
|
31
|
+
* must go through the map itself.
|
|
32
|
+
*/
|
|
33
|
+
export interface MaplibreCameraPort {
|
|
34
|
+
getCameraState(): MaplibreCameraState;
|
|
35
|
+
applyCameraState(target: MaplibreCameraTarget): void;
|
|
36
|
+
/**
|
|
37
|
+
* Snaps pitch back to the view mode's default, leaving center/zoom/bearing
|
|
38
|
+
* alone — for the "fit the venue" fallback, which restores a framing through
|
|
39
|
+
* `moveToRect` (bearing only) and would otherwise leave a map3d kiosk tilted.
|
|
40
|
+
* Call it before starting that fit, not after: MapLibre runs one move at a
|
|
41
|
+
* time.
|
|
42
|
+
*/
|
|
43
|
+
resetPitch(): void;
|
|
44
|
+
}
|
|
3
45
|
export default class MaplibreStore {
|
|
4
46
|
rootStore: RootStore;
|
|
5
47
|
mapViewMode: MaplibreViewMode;
|
|
6
48
|
maplibreSelected: boolean;
|
|
7
49
|
isOnline: boolean;
|
|
50
|
+
private readonly cameraPortBox;
|
|
8
51
|
private readonly handleOnline;
|
|
9
52
|
private readonly handleOffline;
|
|
10
53
|
constructor(rootStore: RootStore);
|
|
11
54
|
dispose(): void;
|
|
12
55
|
setOnline(isOnline: boolean): void;
|
|
56
|
+
get cameraPort(): MaplibreCameraPort | null;
|
|
57
|
+
setCameraPort(port: MaplibreCameraPort): void;
|
|
58
|
+
/** Clears only if `port` is still the registered one — a remount may already have replaced it. */
|
|
59
|
+
clearCameraPortIfCurrent(port: MaplibreCameraPort): void;
|
|
13
60
|
activateMaplibre(): void;
|
|
14
61
|
deactivateMaplibre(): void;
|
|
15
62
|
get hideModeSwitchButton(): boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__decorate as
|
|
1
|
+
import{__decorate as t}from"tslib";import{action as o,computed as l,observable as a}from"mobx";import r from"../data";import{fpGeo as n}from"../data/fpGeo";const d=import.meta.env?.VITE_EXPOFP_DISABLE_3D_TOGGLE!=="false";function s(){return typeof window>"u"||window.navigator.onLine}export default class e{constructor(i){this.mapViewMode="floorplan",this.maplibreSelected=!1,this.isOnline=s(),this.cameraPortBox=a.box(null,{deep:!1}),this.handleOnline=()=>this.setOnline(!0),this.handleOffline=()=>this.setOnline(!1),this.rootStore=i,this.mapViewMode=this.getInitialViewMode(),this.maplibreSelected=this.mapViewMode!=="floorplan",typeof window<"u"&&(window.addEventListener("online",this.handleOnline),window.addEventListener("offline",this.handleOffline))}dispose(){typeof window>"u"||(window.removeEventListener("online",this.handleOnline),window.removeEventListener("offline",this.handleOffline))}setOnline(i){this.isOnline=i}get cameraPort(){return this.cameraPortBox.get()}setCameraPort(i){this.cameraPortBox.set(i)}clearCameraPortIfCurrent(i){this.cameraPortBox.get()===i&&this.cameraPortBox.set(null)}activateMaplibre(){this.maplibreEnabled&&(this.mapViewMode=r.allow3dView&&this.mapViewMode!=="map3d"?"map3d":"map2d",this.maplibreSelected=!0)}deactivateMaplibre(){this.mapViewMode="floorplan",this.maplibreSelected=!1}get hideModeSwitchButton(){return!this.maplibreEnabled||!r.allow3dView||d||r.hideModeSwitchButton}get maplibreEnabled(){const i=this.rootStore.fp?.maplibre??window.__efpMaplibre,p=!!i?.offline&&(!!i.style||!!i.styleUrl);return this.useMaplibreMap&&!!n?.properties?.config&&(this.isOnline||p)}get useMaplibreMap(){return r.enableExperimentalMaplibre??n?.properties?.config?.type==="maplibre"}get showMaplibre(){return this.maplibreEnabled&&(this.mapViewMode==="map2d"||this.mapViewMode==="map3d")}get isMap3d(){return this.maplibreEnabled&&this.mapViewMode==="map3d"}getInitialViewMode(){return this.maplibreEnabled?r.allow3dView&&!r.hide3dMapDefault?"map3d":"map2d":"floorplan"}}t([a],e.prototype,"mapViewMode",void 0),t([a],e.prototype,"maplibreSelected",void 0),t([a],e.prototype,"isOnline",void 0),t([o],e.prototype,"setOnline",null),t([o],e.prototype,"setCameraPort",null),t([o],e.prototype,"clearCameraPortIfCurrent",null),t([o],e.prototype,"activateMaplibre",null),t([o],e.prototype,"deactivateMaplibre",null),t([l({keepAlive:!0})],e.prototype,"hideModeSwitchButton",null),t([l({keepAlive:!0})],e.prototype,"maplibreEnabled",null),t([l({keepAlive:!0})],e.prototype,"useMaplibreMap",null),t([l({keepAlive:!0})],e.prototype,"showMaplibre",null),t([l({keepAlive:!0})],e.prototype,"isMap3d",null);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@expofp/floorplan",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.18.1",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "https://github.com/expofp/efp-app.git",
|
|
@@ -72,13 +72,13 @@
|
|
|
72
72
|
"tslib": "^2.3.0",
|
|
73
73
|
"uuid": "^9.0.1",
|
|
74
74
|
"zod": "4.4.3",
|
|
75
|
-
"@expofp/
|
|
76
|
-
"@expofp/
|
|
77
|
-
"@expofp/
|
|
78
|
-
"@expofp/
|
|
79
|
-
"@expofp/
|
|
80
|
-
"@expofp/wayfinding": "3.
|
|
81
|
-
"@expofp/utils": "3.
|
|
75
|
+
"@expofp/config": "3.18.1",
|
|
76
|
+
"@expofp/debug": "3.18.1",
|
|
77
|
+
"@expofp/geometry": "3.18.1",
|
|
78
|
+
"@expofp/resolve": "3.18.1",
|
|
79
|
+
"@expofp/schema": "3.18.1",
|
|
80
|
+
"@expofp/wayfinding": "3.18.1",
|
|
81
|
+
"@expofp/utils": "3.18.1"
|
|
82
82
|
},
|
|
83
83
|
"devDependencies": {
|
|
84
84
|
"@babel/plugin-proposal-decorators": "^8.0.2",
|
|
@@ -1,241 +0,0 @@
|
|
|
1
|
-
(function() {
|
|
2
|
-
try {
|
|
3
|
-
var e = typeof window < "u" ? window : typeof global < "u" ? global : typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : {};
|
|
4
|
-
e.SENTRY_RELEASE = { id: "3.17.0" };
|
|
5
|
-
var t = new e.Error().stack;
|
|
6
|
-
t && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[t] = "903557b3-0f34-4752-a7b6-97830c2c5f58", e._sentryDebugIdIdentifier = "sentry-dbid-903557b3-0f34-4752-a7b6-97830c2c5f58");
|
|
7
|
-
} catch {}
|
|
8
|
-
})();
|
|
9
|
-
import { _ as e, d as t, m as n, s as r, x as i } from "./i18n-BsYXLDK5.js";
|
|
10
|
-
import { $ as a, Mt as o, Q as s, Xt as c, Z as l, rt as u, s as d } from "./store--s4Hqnvn.js";
|
|
11
|
-
//#region src/components/Map/pointInConvexQuad.ts
|
|
12
|
-
function f(e, t) {
|
|
13
|
-
let n = 0;
|
|
14
|
-
for (let r = 0; r < 4; r++) {
|
|
15
|
-
let i = t[r], a = t[(r + 1) % 4], o = (a.x - i.x) * (e.y - i.y) - (a.y - i.y) * (e.x - i.x);
|
|
16
|
-
if (!Number.isFinite(o)) return !1;
|
|
17
|
-
if (o === 0) continue;
|
|
18
|
-
let s = o > 0 ? 1 : -1;
|
|
19
|
-
if (n === 0) n = s;
|
|
20
|
-
else if (n !== s) return !1;
|
|
21
|
-
}
|
|
22
|
-
return n !== 0;
|
|
23
|
-
}
|
|
24
|
-
//#endregion
|
|
25
|
-
//#region src/components/Map/visibleArea.ts
|
|
26
|
-
function p(e) {
|
|
27
|
-
let t = o(e.viewport.canvasToSvg({
|
|
28
|
-
x: 0,
|
|
29
|
-
y: 0
|
|
30
|
-
})), n = o(e.viewport.canvasToSvg({
|
|
31
|
-
x: e.canvas.clientWidth,
|
|
32
|
-
y: 0
|
|
33
|
-
})), r = o(e.viewport.canvasToSvg({
|
|
34
|
-
x: 0,
|
|
35
|
-
y: e.canvas.clientHeight
|
|
36
|
-
})), i = o(e.viewport.canvasToSvg({
|
|
37
|
-
x: e.canvas.clientWidth,
|
|
38
|
-
y: e.canvas.clientHeight
|
|
39
|
-
})), a = Math.min(t.x, n.x, r.x, i.x), s = Math.max(t.x, n.x, r.x, i.x), c = Math.min(t.y, n.y, r.y, i.y), l = Math.max(t.y, n.y, r.y, i.y);
|
|
40
|
-
return {
|
|
41
|
-
x: a,
|
|
42
|
-
y: c,
|
|
43
|
-
width: s - a,
|
|
44
|
-
height: l - c,
|
|
45
|
-
left: a,
|
|
46
|
-
right: s,
|
|
47
|
-
top: l,
|
|
48
|
-
bottom: c,
|
|
49
|
-
center: {
|
|
50
|
-
x: (a + s) / 2,
|
|
51
|
-
y: (c + l) / 2
|
|
52
|
-
},
|
|
53
|
-
corners: [
|
|
54
|
-
t,
|
|
55
|
-
n,
|
|
56
|
-
i,
|
|
57
|
-
r
|
|
58
|
-
]
|
|
59
|
-
};
|
|
60
|
-
}
|
|
61
|
-
function m(e, t) {
|
|
62
|
-
return f(t, p(e).corners);
|
|
63
|
-
}
|
|
64
|
-
//#endregion
|
|
65
|
-
//#region src/components/Kiosk/KioskStore.ts
|
|
66
|
-
var h, g, _, v, y, b;
|
|
67
|
-
function x(e, t, n, r) {
|
|
68
|
-
n && Object.defineProperty(e, t, {
|
|
69
|
-
enumerable: n.enumerable,
|
|
70
|
-
configurable: n.configurable,
|
|
71
|
-
writable: n.writable,
|
|
72
|
-
value: n.initializer ? n.initializer.call(r) : void 0
|
|
73
|
-
});
|
|
74
|
-
}
|
|
75
|
-
function S(e, t, n, r, i) {
|
|
76
|
-
var a = {};
|
|
77
|
-
return Object.keys(r).forEach(function(e) {
|
|
78
|
-
a[e] = r[e];
|
|
79
|
-
}), a.enumerable = !!a.enumerable, a.configurable = !!a.configurable, ("value" in a || a.initializer) && (a.writable = !0), a = n.slice().reverse().reduce(function(n, r) {
|
|
80
|
-
return r(e, t, n) || n;
|
|
81
|
-
}, a), i && a.initializer !== void 0 && (a.value = a.initializer ? a.initializer.call(i) : void 0, a.initializer = void 0), a.initializer === void 0 ? (Object.defineProperty(e, t, a), null) : a;
|
|
82
|
-
}
|
|
83
|
-
var C = new (h = n({ keepAlive: !0 }), g = n({ keepAlive: !0 }), _ = n({ keepAlive: !0 }), v = class {
|
|
84
|
-
constructor() {
|
|
85
|
-
x(this, "savedKiosk", y, this), x(this, "statusMessages", b, this), this.statusMessageTimer = 0, this.isResettingCamera = !1, this.initialPtScale = void 0;
|
|
86
|
-
}
|
|
87
|
-
get kiosk() {
|
|
88
|
-
return d.uiState.kioskData;
|
|
89
|
-
}
|
|
90
|
-
setKiosk(e) {
|
|
91
|
-
d.uiState.setKioskData(e);
|
|
92
|
-
}
|
|
93
|
-
get renderer() {
|
|
94
|
-
return d.rendererService.renderer;
|
|
95
|
-
}
|
|
96
|
-
getCameraState() {
|
|
97
|
-
let e = d.rendererService.getCameraState();
|
|
98
|
-
return e ? {
|
|
99
|
-
mapInitialPtScale: this.initialPtScale,
|
|
100
|
-
mapPtScale: e.ptScale,
|
|
101
|
-
mapCenterX: e.center.x,
|
|
102
|
-
mapCenterY: e.center.y,
|
|
103
|
-
mapRollDegrees: e.roll,
|
|
104
|
-
mapPitch: e.pitch
|
|
105
|
-
} : {};
|
|
106
|
-
}
|
|
107
|
-
get hasUnsavedChanges() {
|
|
108
|
-
let e = this.savedKiosk, t = i(this.kiosk);
|
|
109
|
-
if (!t || !e) return !!t != !!e;
|
|
110
|
-
let n = Object.keys(e), r = Object.keys(t);
|
|
111
|
-
if (n.length !== r.length) return !0;
|
|
112
|
-
for (let r of n) if (!(r in t) || e[r] !== t[r]) return !0;
|
|
113
|
-
return !1;
|
|
114
|
-
}
|
|
115
|
-
addStatusMessage(e) {
|
|
116
|
-
this.statusMessages = [{
|
|
117
|
-
...e,
|
|
118
|
-
id: Date.now()
|
|
119
|
-
}], this.startCleanupMessages();
|
|
120
|
-
}
|
|
121
|
-
clearStatusMessages() {
|
|
122
|
-
this.statusMessages = [];
|
|
123
|
-
}
|
|
124
|
-
startCleanupMessages() {
|
|
125
|
-
clearTimeout(this.statusMessageTimer), this.statusMessageTimer = window.setTimeout(() => this.clearStatusMessages(), 1e3);
|
|
126
|
-
}
|
|
127
|
-
async resetCamera() {
|
|
128
|
-
let e = this.renderer;
|
|
129
|
-
if (!(!e || this.isResettingCamera)) {
|
|
130
|
-
this.isResettingCamera = !0;
|
|
131
|
-
try {
|
|
132
|
-
let { z: t, mapRollDegrees: n, mapInitialPtScale: r, mapPtScale: i, mapCenterX: a, mapCenterY: o } = this.kiosk || {};
|
|
133
|
-
await e.controls.resetCamera({
|
|
134
|
-
pan: !0,
|
|
135
|
-
zoom: !0,
|
|
136
|
-
roll: !0,
|
|
137
|
-
pitch: !0
|
|
138
|
-
}, !0), t && d.fp.activateFloor({ name: t }), Number.isFinite(r) && Number.isFinite(i) && i > 0 && await e.controls.zoomBy(r / i, !0), Number.isFinite(a) && Number.isFinite(o) && await e.controls.panTo(a, o, !0), Number.isFinite(n) && await e.controls.rollTo(n, !0);
|
|
139
|
-
} finally {
|
|
140
|
-
this.isResettingCamera = !1;
|
|
141
|
-
}
|
|
142
|
-
}
|
|
143
|
-
}
|
|
144
|
-
restoreData() {
|
|
145
|
-
let e = l();
|
|
146
|
-
e && (this.setKiosk(e), this.savedKiosk = e, d.uiState.kiosk = !0);
|
|
147
|
-
}
|
|
148
|
-
handleSetupReady() {
|
|
149
|
-
this.restoreData(), d.uiState.kiosk = !0, d.uiState.hideFreeOrDemo = !0, d.uiState.setForceDim(!0), d.searchStore.setSearchText(""), d.searchStore.setFocused(!1), this.resetCamera();
|
|
150
|
-
}
|
|
151
|
-
handleClose() {
|
|
152
|
-
this.setKiosk(null), d.uiState.setForceDim(!1), d.uiState.enableSetKioskMode(!1), d.searchStore.closeSearch();
|
|
153
|
-
}
|
|
154
|
-
handleDelete() {
|
|
155
|
-
s(), this.setKiosk(null), d.uiState.resetMapSettings(), d.uiState.resetUIScale(), this.addStatusMessage({
|
|
156
|
-
variant: "success",
|
|
157
|
-
title: r("Deleted")
|
|
158
|
-
});
|
|
159
|
-
}
|
|
160
|
-
handleSave() {
|
|
161
|
-
let e = this.renderer;
|
|
162
|
-
if (!e) return;
|
|
163
|
-
let t = i(this.kiosk), n = this.getCameraState(), o = {
|
|
164
|
-
...t,
|
|
165
|
-
...n
|
|
166
|
-
};
|
|
167
|
-
if (!m(e, o)) {
|
|
168
|
-
this.addStatusMessage({
|
|
169
|
-
variant: "error",
|
|
170
|
-
title: r("Kiosk not visible")
|
|
171
|
-
});
|
|
172
|
-
return;
|
|
173
|
-
}
|
|
174
|
-
this.setKiosk(o), a(o), u(o, "https://app.expofp.com/"), d.uiState.setUIScale(o.uiScale, !0), this.addStatusMessage({
|
|
175
|
-
variant: "success",
|
|
176
|
-
title: r("Saved")
|
|
177
|
-
}), this.savedKiosk = o;
|
|
178
|
-
}
|
|
179
|
-
delayChange(e) {
|
|
180
|
-
requestAnimationFrame(() => e == null ? void 0 : e());
|
|
181
|
-
}
|
|
182
|
-
handleChange(e) {
|
|
183
|
-
let t = i(this.kiosk);
|
|
184
|
-
t && (Number.isFinite(e.angle) && this.setKiosk({
|
|
185
|
-
...t,
|
|
186
|
-
heading: e.angle
|
|
187
|
-
}), Number.isFinite(e.scale) && (this.setKiosk({
|
|
188
|
-
...t,
|
|
189
|
-
uiScale: e.scale
|
|
190
|
-
}), this.delayChange(() => d.uiState.setUIScale(e.scale, !1))), Number.isFinite(e.percent) && this.setKiosk({
|
|
191
|
-
...t,
|
|
192
|
-
iconSizePercent: e.percent
|
|
193
|
-
}));
|
|
194
|
-
}
|
|
195
|
-
setInitialPtScale(e) {
|
|
196
|
-
if (this.initialPtScale) return;
|
|
197
|
-
this.initialPtScale = e;
|
|
198
|
-
let t = i(this.kiosk);
|
|
199
|
-
t && this.setKiosk({
|
|
200
|
-
...t,
|
|
201
|
-
mapInitialPtScale: e
|
|
202
|
-
});
|
|
203
|
-
}
|
|
204
|
-
handleClick(e) {
|
|
205
|
-
var t, n;
|
|
206
|
-
let r = i(this.kiosk), a = d.fp.getFloors(), o = c() ? (t = (n = a.find((e) => e.active)) == null ? void 0 : n.name) == null ? null : t : null, s = d.uiState.uiScale;
|
|
207
|
-
this.setKiosk({
|
|
208
|
-
...r,
|
|
209
|
-
x: e.x,
|
|
210
|
-
y: e.y,
|
|
211
|
-
z: o,
|
|
212
|
-
uiScale: (r == null ? void 0 : r.uiScale) || s,
|
|
213
|
-
heading: (r == null ? void 0 : r.heading) || 0,
|
|
214
|
-
iconSizePercent: (r == null ? void 0 : r.iconSizePercent) || 100,
|
|
215
|
-
...this.getCameraState()
|
|
216
|
-
});
|
|
217
|
-
}
|
|
218
|
-
handleNavigationChange() {
|
|
219
|
-
let e = i(this.kiosk);
|
|
220
|
-
e && this.setKiosk({
|
|
221
|
-
...e,
|
|
222
|
-
...this.getCameraState()
|
|
223
|
-
});
|
|
224
|
-
}
|
|
225
|
-
}, S(v.prototype, "kiosk", [h], Object.getOwnPropertyDescriptor(v.prototype, "kiosk"), v.prototype), S(v.prototype, "setKiosk", [t], Object.getOwnPropertyDescriptor(v.prototype, "setKiosk"), v.prototype), S(v.prototype, "renderer", [g], Object.getOwnPropertyDescriptor(v.prototype, "renderer"), v.prototype), y = S(v.prototype, "savedKiosk", [e], {
|
|
226
|
-
configurable: !0,
|
|
227
|
-
enumerable: !0,
|
|
228
|
-
writable: !0,
|
|
229
|
-
initializer: function() {
|
|
230
|
-
return null;
|
|
231
|
-
}
|
|
232
|
-
}), S(v.prototype, "hasUnsavedChanges", [_], Object.getOwnPropertyDescriptor(v.prototype, "hasUnsavedChanges"), v.prototype), b = S(v.prototype, "statusMessages", [e], {
|
|
233
|
-
configurable: !0,
|
|
234
|
-
enumerable: !0,
|
|
235
|
-
writable: !0,
|
|
236
|
-
initializer: function() {
|
|
237
|
-
return [];
|
|
238
|
-
}
|
|
239
|
-
}), S(v.prototype, "addStatusMessage", [t], Object.getOwnPropertyDescriptor(v.prototype, "addStatusMessage"), v.prototype), S(v.prototype, "clearStatusMessages", [t], Object.getOwnPropertyDescriptor(v.prototype, "clearStatusMessages"), v.prototype), S(v.prototype, "startCleanupMessages", [t], Object.getOwnPropertyDescriptor(v.prototype, "startCleanupMessages"), v.prototype), S(v.prototype, "resetCamera", [t], Object.getOwnPropertyDescriptor(v.prototype, "resetCamera"), v.prototype), S(v.prototype, "restoreData", [t], Object.getOwnPropertyDescriptor(v.prototype, "restoreData"), v.prototype), S(v.prototype, "handleSetupReady", [t], Object.getOwnPropertyDescriptor(v.prototype, "handleSetupReady"), v.prototype), S(v.prototype, "handleClose", [t], Object.getOwnPropertyDescriptor(v.prototype, "handleClose"), v.prototype), S(v.prototype, "handleDelete", [t], Object.getOwnPropertyDescriptor(v.prototype, "handleDelete"), v.prototype), S(v.prototype, "handleSave", [t], Object.getOwnPropertyDescriptor(v.prototype, "handleSave"), v.prototype), S(v.prototype, "handleChange", [t], Object.getOwnPropertyDescriptor(v.prototype, "handleChange"), v.prototype), S(v.prototype, "setInitialPtScale", [t], Object.getOwnPropertyDescriptor(v.prototype, "setInitialPtScale"), v.prototype), S(v.prototype, "handleClick", [t], Object.getOwnPropertyDescriptor(v.prototype, "handleClick"), v.prototype), S(v.prototype, "handleNavigationChange", [t], Object.getOwnPropertyDescriptor(v.prototype, "handleNavigationChange"), v.prototype), v)();
|
|
240
|
-
//#endregion
|
|
241
|
-
export { C as t };
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
(function() {
|
|
2
|
-
try {
|
|
3
|
-
var e = typeof window < "u" ? window : typeof global < "u" ? global : typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : {};
|
|
4
|
-
e.SENTRY_RELEASE = { id: "3.17.0" };
|
|
5
|
-
var t = new e.Error().stack;
|
|
6
|
-
t && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[t] = "d799903c-385a-4e0c-9a0b-1eaa51911590", e._sentryDebugIdIdentifier = "sentry-dbid-d799903c-385a-4e0c-9a0b-1eaa51911590");
|
|
7
|
-
} catch {}
|
|
8
|
-
})();
|
|
9
|
-
import { C as e, y as t } from "./i18n-BsYXLDK5.js";
|
|
10
|
-
import { s as n } from "./store--s4Hqnvn.js";
|
|
11
|
-
//#region src/components/Kiosk/integrateKiosk.ts
|
|
12
|
-
function r(e, r) {
|
|
13
|
-
e && t(() => {
|
|
14
|
-
n.uiState.setKioskData(e), n.uiState.kiosk = r, n.uiState.setMapSettings({
|
|
15
|
-
centerxy: `${e.mapCenterX},${e.mapCenterY}`,
|
|
16
|
-
z: e.z,
|
|
17
|
-
bearing: e.mapRollDegrees
|
|
18
|
-
}), e.mapPtScale && n.uiState.changeZoom(e.mapInitialPtScale / e.mapPtScale);
|
|
19
|
-
});
|
|
20
|
-
}
|
|
21
|
-
function i(t) {
|
|
22
|
-
t && (t.z != null && n.fp.activateFloor({ name: t.z.toString() }), e(() => !!n.uiState.selectedRoute, () => {
|
|
23
|
-
let e = n.uiState.selectedRoute;
|
|
24
|
-
e.to && !e.from && n.routeStore.selectRoute(e, !1, !0);
|
|
25
|
-
}));
|
|
26
|
-
}
|
|
27
|
-
//#endregion
|
|
28
|
-
export { i as n, r as t };
|