@expofp/floorplan 3.7.1 → 3.7.3
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/{CookieConsent-BTBtNSL4.js → CookieConsent-B9r34uCC.js} +8 -8
- package/dist/browser/{Debug-BdwQwhiQ.js → Debug-DunksSNj.js} +9 -9
- package/dist/browser/{Demo-Buqcfw7W.js → Demo-891f5t9l.js} +9 -9
- package/dist/browser/{Free-DlGGWYcj.js → Free-DVER8MHL.js} +11 -11
- package/dist/browser/{Gallery-aa79wHFQ.js → Gallery-CyRq9QY2.js} +10 -10
- package/dist/browser/{GpsLoader-Dh_U8H51.js → GpsLoader-9_3XrM1S.js} +22 -22
- package/dist/browser/{KioskStore-37p-3HM2.js → KioskStore-BOSyfMyO.js} +44 -40
- package/dist/browser/{MaplibreAdapter-GcuLfvZ5.js → MaplibreAdapter-C9a80Y5u.js} +325 -325
- package/dist/browser/{Modal-N2u3kqja.js → Modal-DcLxiT8t.js} +10 -10
- package/dist/browser/{PermissionNotice-ISmSMsbo.js → PermissionNotice-DWddxvUt.js} +7 -7
- package/dist/browser/{SetKioskMode-Du32HGMJ.js → SetKioskMode-CgzKiK3y.js} +16 -16
- package/dist/browser/ShowKiosk-DRR5jjXM.js +26 -0
- package/dist/browser/{TouchHand-8ZopG2q8.js → TouchHand-B6PlZY3K.js} +4 -4
- package/dist/browser/{ViewerMenuPanel-4BqW-Jdf.js → ViewerMenuPanel-B46Uw94g.js} +21 -21
- package/dist/browser/{add-debug-secret-listener-BjXftNTV.js → add-debug-secret-listener-DprGe6C-.js} +1 -1
- package/dist/browser/{boolean-editor-BhMIoPsa.js → boolean-editor-CdhFegqG.js} +9 -9
- package/dist/browser/{bootIntercom-B6p5fxfJ.js → bootIntercom-C2w8EmqK.js} +2 -2
- package/dist/browser/{browser-CnPEW9Lr.js → browser-D4L-gjqm.js} +2 -2
- package/dist/browser/bundle.json +56 -56
- package/dist/browser/{classnames-CRgVhgv0.js → classnames-CDxP0X2-.js} +2 -2
- package/dist/browser/{client-BUO_kQ1k.js → client-BUGY3NJ-.js} +4 -4
- package/dist/browser/{components-BfPS9gG1.js → components-C9eYt8L8.js} +1730 -1730
- package/dist/browser/{createWayfinding-Dt1LyGu0.js → createWayfinding-B9PG8HXm.js} +406 -406
- package/dist/browser/{debug-overlay-B0EofpfU.js → debug-overlay-DHL2Ipq8.js} +10 -10
- package/dist/browser/{debug-ui-DGJ2SkEi.js → debug-ui-BE-7wgWb.js} +6 -6
- package/dist/browser/{dist-DJxbAzyk.js → dist-BY2VkOah.js} +5 -5
- package/dist/browser/{dist-DjPMrEXM.js → dist-C6qlzHIi.js} +6 -6
- package/dist/browser/{dist-TGwGfy82.js → dist-DPH_nXx1.js} +3 -3
- package/dist/browser/{efp-debug-init-DHlNt03k.js → efp-debug-init-YS7dfyN-.js} +2 -2
- package/dist/browser/{enum-editor-CDXrDwYI.js → enum-editor-D_zEjkiJ.js} +11 -11
- package/dist/browser/{event-not-found-ddjIwKQI.js → event-not-found-FYtE_1nu.js} +1 -1
- package/dist/browser/{exports-DrNfOFs_.js → exports-Cjz1yZKk.js} +1 -1
- package/dist/browser/{favicon-BU-SX7hC.js → favicon-DrjHpzP4.js} +1 -1
- package/dist/browser/{fetch-retry.umd-CYgJBfTb.js → fetch-retry.umd-Cid9TH8f.js} +2 -2
- package/dist/browser/{flex-DhG3X7TO.js → flex-DeqbUH21.js} +5 -5
- package/dist/browser/{floorplan.loader-CLetOZGp.js → floorplan.loader-Bj-l8uDr.js} +36 -36
- package/dist/browser/{floorplan.ready-VzbeB1JK.js → floorplan.ready-ISdK-pOq.js} +304 -304
- package/dist/browser/{fuse-BwjwTuSA.js → fuse-DuhtQS_C.js} +2 -2
- package/dist/browser/{i18n-DWUkHBly.js → i18n-topUIylF.js} +3 -3
- package/dist/browser/index.js +11 -11
- package/dist/browser/{jsx-runtime-CCjvPhTZ.js → jsx-runtime-BqvudT0U.js} +2 -2
- package/dist/browser/{lib-CmUZvL-A.js → lib-Cs6Jo7Wv.js} +4 -4
- package/dist/browser/{main-D5cs84bD.js → main-BEqsYQfj.js} +1 -1
- package/dist/browser/{mobx-Crx8xVu_.js → mobx-C5AHTMbx.js} +4 -4
- package/dist/browser/{particles.min-4xFbqMer.js → particles.min-COvnIi42.js} +2 -2
- package/dist/browser/{prop-types-Df-0AVZe.js → prop-types-H1ekLSgm.js} +2 -2
- package/dist/browser/{react-CXBSzFGH.js → react-CDj0nSIt.js} +2 -2
- package/dist/browser/{react-dom-vkCA7ORh.js → react-dom-F1fx5UfT.js} +3 -3
- package/dist/browser/{reset-all-settings-_SJm36FD.js → reset-all-settings-Dj1Hc9SL.js} +7 -7
- package/dist/browser/{rolldown-runtime-CHynt3ZH.js → rolldown-runtime-CJ4NSGHF.js} +1 -1
- package/dist/browser/{settings-D8YocUE4.js → settings-bv5D0Jdx.js} +2 -2
- package/dist/browser/{settings-item-_8AjjHJ-.js → settings-item-BBkCXqTe.js} +6 -6
- package/dist/browser/{storage-BCJWp9_C.js → storage-DQBS2cde.js} +10 -10
- package/dist/browser/{store-CoBm8UFz.js → store-CG3Lvb_Y.js} +5872 -5845
- package/dist/browser/{string-editor-b0i54Igp.js → string-editor-DWJwFIbn.js} +7 -7
- package/dist/browser/{theme-D8c9f86A.js → theme-Bn3nZG-N.js} +8 -8
- package/dist/browser/{ui-7txfiTr8.js → ui-B_JKKY6c.js} +8 -8
- package/dist/browser/{useRenderTarget-D01j_Es7.js → useRenderTarget-cPhKH67H.js} +4 -4
- package/dist/esm/components/Kiosk/KioskStore.d.ts +8 -7
- package/dist/esm/components/Kiosk/KioskStore.js +1 -1
- package/dist/esm/components/Kiosk/SetKiosk/constants.d.ts +1 -0
- package/dist/esm/components/Kiosk/SetKiosk/constants.js +1 -1
- package/dist/esm/components/Kiosk/SetKiosk/types.d.ts +1 -1
- package/dist/esm/components/Kiosk/kioskApi.d.ts +4 -0
- package/dist/esm/components/Kiosk/kioskApi.js +1 -0
- package/dist/esm/services/routing.js +1 -1
- package/dist/esm/store/search-buttons/SearchButtonsFactory.d.ts +1 -0
- package/dist/esm/store/search-buttons/SearchButtonsFactory.js +1 -1
- package/dist/esm/store/search-buttons/SearchButtonsFilters.js +1 -1
- package/dist/esm/tools/track-event.js +1 -1
- package/package.json +3 -3
- package/dist/browser/ShowKiosk-kDSUSRXW.js +0 -26
- package/dist/esm/components/Kiosk/requestKioskKey.d.ts +0 -3
- package/dist/esm/components/Kiosk/requestKioskKey.js +0 -1
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
(function() {
|
|
2
2
|
try {
|
|
3
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.7.
|
|
4
|
+
e.SENTRY_RELEASE = { id: "3.7.3" };
|
|
5
5
|
var t = new e.Error().stack;
|
|
6
6
|
t && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[t] = "c13b5d2b-c064-4095-8a35-7ce6c1158176", e._sentryDebugIdIdentifier = "sentry-dbid-c13b5d2b-c064-4095-8a35-7ce6c1158176");
|
|
7
7
|
} catch {}
|
|
8
8
|
})();
|
|
9
|
-
import { r as e } from "./rolldown-runtime-
|
|
10
|
-
import { t } from "./react-
|
|
11
|
-
import { t as n } from "./jsx-runtime-
|
|
12
|
-
import { D as r, i, l as a, n as o, s, u as c, y as l } from "./flex-
|
|
13
|
-
import { t as u } from "./classnames-
|
|
14
|
-
import { t as d } from "./settings-item-
|
|
9
|
+
import { r as e } from "./rolldown-runtime-CJ4NSGHF.js";
|
|
10
|
+
import { t } from "./react-CDj0nSIt.js";
|
|
11
|
+
import { t as n } from "./jsx-runtime-BqvudT0U.js";
|
|
12
|
+
import { D as r, i, l as a, n as o, s, u as c, y as l } from "./flex-DeqbUH21.js";
|
|
13
|
+
import { t as u } from "./classnames-CDxP0X2-.js";
|
|
14
|
+
import { t as d } from "./settings-item-BBkCXqTe.js";
|
|
15
15
|
//#region ../../node_modules/.pnpm/@radix-ui+themes@3.3.0_@types+react-dom@19.2.3_@types+react@19.2.17__@types+react@19.2._925f851475345a9e5e368d312bb98178/node_modules/@radix-ui/themes/dist/esm/components/text-field.props.js
|
|
16
16
|
var f = {
|
|
17
17
|
size: {
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
(function() {
|
|
2
2
|
try {
|
|
3
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.7.
|
|
4
|
+
e.SENTRY_RELEASE = { id: "3.7.3" };
|
|
5
5
|
var t = new e.Error().stack;
|
|
6
6
|
t && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[t] = "14cfe74b-e711-4201-812b-ad94b4330a84", e._sentryDebugIdIdentifier = "sentry-dbid-14cfe74b-e711-4201-812b-ad94b4330a84");
|
|
7
7
|
} catch {}
|
|
8
8
|
})();
|
|
9
|
-
import { r as e } from "./rolldown-runtime-
|
|
10
|
-
import { t } from "./react-
|
|
11
|
-
import { t as n } from "./jsx-runtime-
|
|
12
|
-
import { t as r } from "./react-dom-
|
|
13
|
-
import { C as i, E as a, O as o, T as s, _ as c, o as l, v as u, w as d } from "./flex-
|
|
14
|
-
import { c as f, i as p, n as m, o as h, r as g, s as _, t as v } from "./dist-
|
|
15
|
-
import { t as y } from "./classnames-
|
|
9
|
+
import { r as e } from "./rolldown-runtime-CJ4NSGHF.js";
|
|
10
|
+
import { t } from "./react-CDj0nSIt.js";
|
|
11
|
+
import { t as n } from "./jsx-runtime-BqvudT0U.js";
|
|
12
|
+
import { t as r } from "./react-dom-F1fx5UfT.js";
|
|
13
|
+
import { C as i, E as a, O as o, T as s, _ as c, o as l, v as u, w as d } from "./flex-DeqbUH21.js";
|
|
14
|
+
import { c as f, i as p, n as m, o as h, r as g, s as _, t as v } from "./dist-C6qlzHIi.js";
|
|
15
|
+
import { t as y } from "./classnames-CDxP0X2-.js";
|
|
16
16
|
//#region ../../node_modules/.pnpm/@radix-ui+react-visually-hidden@1.2.3_@types+react-dom@19.2.3_@types+react@19.2.17__@ty_070bcfa32421a5876e7dcb93369fcbee/node_modules/@radix-ui/react-visually-hidden/dist/index.mjs
|
|
17
17
|
var b = /* @__PURE__ */ e(r(), 1), x = /* @__PURE__ */ e(t(), 1), S = n(), C = Object.freeze({
|
|
18
18
|
position: "absolute",
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
(function() {
|
|
2
2
|
try {
|
|
3
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.7.
|
|
4
|
+
e.SENTRY_RELEASE = { id: "3.7.3" };
|
|
5
5
|
var t = new e.Error().stack;
|
|
6
6
|
t && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[t] = "5091f250-052d-4365-8535-fbf8bf11a38b", e._sentryDebugIdIdentifier = "sentry-dbid-5091f250-052d-4365-8535-fbf8bf11a38b");
|
|
7
7
|
} catch {}
|
|
8
8
|
})();
|
|
9
|
-
import { r as e } from "./rolldown-runtime-
|
|
10
|
-
import { a as t, r as n } from "./reset-all-settings-
|
|
11
|
-
import { t as r } from "./jsx-runtime-
|
|
12
|
-
import "./settings-
|
|
13
|
-
import { t as i } from "./browser-
|
|
14
|
-
import { t as a } from "./add-debug-secret-listener-
|
|
9
|
+
import { r as e } from "./rolldown-runtime-CJ4NSGHF.js";
|
|
10
|
+
import { a as t, r as n } from "./reset-all-settings-Dj1Hc9SL.js";
|
|
11
|
+
import { t as r } from "./jsx-runtime-BqvudT0U.js";
|
|
12
|
+
import "./settings-bv5D0Jdx.js";
|
|
13
|
+
import { t as i } from "./browser-D4L-gjqm.js";
|
|
14
|
+
import { t as a } from "./add-debug-secret-listener-DprGe6C-.js";
|
|
15
15
|
//#region ../debug/src/lib/ui/render-debug-ui.tsx
|
|
16
16
|
var o = /* @__PURE__ */ e(i(), 1), s = r(), c = !1;
|
|
17
17
|
function l() {
|
|
@@ -26,7 +26,7 @@ function l() {
|
|
|
26
26
|
}
|
|
27
27
|
});
|
|
28
28
|
let i = async (t) => {
|
|
29
|
-
let { DebugUi: n } = await import("./debug-ui-
|
|
29
|
+
let { DebugUi: n } = await import("./debug-ui-BE-7wgWb.js"), { createRoot: i } = await import("./client-BUGY3NJ-.js").then((t) => /* @__PURE__ */ e(t.default, 1)), a = document.createElement("div");
|
|
30
30
|
document.body.appendChild(a), i(a).render(/* @__PURE__ */ (0, s.jsx)(n, {
|
|
31
31
|
useDebugButtonState: r.useState,
|
|
32
32
|
open: t
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
(function() {
|
|
2
2
|
try {
|
|
3
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.7.
|
|
4
|
+
e.SENTRY_RELEASE = { id: "3.7.3" };
|
|
5
5
|
var t = new e.Error().stack;
|
|
6
6
|
t && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[t] = "984e0491-e905-4403-8383-c156857f4f3c", e._sentryDebugIdIdentifier = "sentry-dbid-984e0491-e905-4403-8383-c156857f4f3c");
|
|
7
7
|
} catch {}
|
|
8
8
|
})();
|
|
9
|
-
import { r as e } from "./rolldown-runtime-
|
|
10
|
-
import { t } from "./react-
|
|
11
|
-
import { s as n } from "./store-
|
|
9
|
+
import { r as e } from "./rolldown-runtime-CJ4NSGHF.js";
|
|
10
|
+
import { t } from "./react-CDj0nSIt.js";
|
|
11
|
+
import { s as n } from "./store-CG3Lvb_Y.js";
|
|
12
12
|
//#region src/utils/getRenderTargetFromRoot.ts
|
|
13
13
|
var r = /* @__PURE__ */ e(t(), 1);
|
|
14
14
|
function i(e) {
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import type { AlertProps } from "../../ui/Alert";
|
|
2
|
+
import type { Kiosk, StatusMessage } from "./SetKiosk";
|
|
3
|
+
import type { SetKioskChangeEvent } from "./SetKiosk/types";
|
|
3
4
|
declare class KioskStore {
|
|
4
5
|
get kiosk(): Kiosk;
|
|
5
|
-
setKiosk(kiosk: Kiosk): void;
|
|
6
|
+
setKiosk(kiosk: Kiosk | null): void;
|
|
6
7
|
get renderer(): import("@expofp/renderer").Renderer | null;
|
|
7
8
|
private getCameraState;
|
|
8
|
-
savedKiosk: Kiosk;
|
|
9
|
+
savedKiosk: Kiosk | null;
|
|
9
10
|
get hasUnsavedChanges(): boolean;
|
|
10
11
|
statusMessages: StatusMessage[];
|
|
11
12
|
addStatusMessage(message: Omit<AlertProps, "closeLabel">): void;
|
|
@@ -13,14 +14,14 @@ declare class KioskStore {
|
|
|
13
14
|
statusMessageTimer: number;
|
|
14
15
|
startCleanupMessages(): void;
|
|
15
16
|
resetCamera(): Promise<void>;
|
|
16
|
-
restoreData(): Kiosk;
|
|
17
|
+
restoreData(): Kiosk | undefined;
|
|
17
18
|
handleSetupReady(): void;
|
|
18
19
|
handleClose(): void;
|
|
19
20
|
handleDelete(): void;
|
|
20
21
|
handleSave(): void;
|
|
21
22
|
delayChange(cb: () => void): void;
|
|
22
|
-
handleChange(event:
|
|
23
|
-
initialPtScale
|
|
23
|
+
handleChange(event: SetKioskChangeEvent): void;
|
|
24
|
+
initialPtScale?: number;
|
|
24
25
|
setInitialPtScale(ptscale: number): void;
|
|
25
26
|
handleClick(point: {
|
|
26
27
|
x: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__esDecorate as s,__runInitializers as
|
|
1
|
+
import{__esDecorate as s,__runInitializers as h}from"tslib";import{action as r,computed as m,observable as O,runInAction as j,toJS as c}from"mobx";import a from"../../store";import{areLayersEnabled as E}from"../../utils/areLayersEnabled";import{t as k}from"../../utils/i18n";import{isPointVisible as X}from"../Map/visibleArea";import{updateKiosk as Y}from"./kioskApi";import{getSavedKiosk as q,removeKiosk as B,saveKiosk as J}from"./SetKiosk";let L=(()=>{let i=[],g,S,f,p,v=[],_=[],C,K,M=[],b=[],y,D,P,I,F,z,N,x,T,U,w,R,A;return class{static{const t=typeof Symbol=="function"&&Symbol.metadata?Object.create(null):void 0;g=[m({keepAlive:!0})],S=[r],f=[m({keepAlive:!0})],p=[O],C=[m({keepAlive:!0})],K=[O],y=[r],D=[r],P=[r],I=[r],F=[r],z=[r],N=[r],x=[r],T=[r],U=[r],w=[r],R=[r],A=[r],s(this,null,g,{kind:"getter",name:"kiosk",static:!1,private:!1,access:{has:e=>"kiosk"in e,get:e=>e.kiosk},metadata:t},null,i),s(this,null,S,{kind:"method",name:"setKiosk",static:!1,private:!1,access:{has:e=>"setKiosk"in e,get:e=>e.setKiosk},metadata:t},null,i),s(this,null,f,{kind:"getter",name:"renderer",static:!1,private:!1,access:{has:e=>"renderer"in e,get:e=>e.renderer},metadata:t},null,i),s(this,null,C,{kind:"getter",name:"hasUnsavedChanges",static:!1,private:!1,access:{has:e=>"hasUnsavedChanges"in e,get:e=>e.hasUnsavedChanges},metadata:t},null,i),s(this,null,y,{kind:"method",name:"addStatusMessage",static:!1,private:!1,access:{has:e=>"addStatusMessage"in e,get:e=>e.addStatusMessage},metadata:t},null,i),s(this,null,D,{kind:"method",name:"clearStatusMessages",static:!1,private:!1,access:{has:e=>"clearStatusMessages"in e,get:e=>e.clearStatusMessages},metadata:t},null,i),s(this,null,P,{kind:"method",name:"startCleanupMessages",static:!1,private:!1,access:{has:e=>"startCleanupMessages"in e,get:e=>e.startCleanupMessages},metadata:t},null,i),s(this,null,I,{kind:"method",name:"resetCamera",static:!1,private:!1,access:{has:e=>"resetCamera"in e,get:e=>e.resetCamera},metadata:t},null,i),s(this,null,F,{kind:"method",name:"restoreData",static:!1,private:!1,access:{has:e=>"restoreData"in e,get:e=>e.restoreData},metadata:t},null,i),s(this,null,z,{kind:"method",name:"handleSetupReady",static:!1,private:!1,access:{has:e=>"handleSetupReady"in e,get:e=>e.handleSetupReady},metadata:t},null,i),s(this,null,N,{kind:"method",name:"handleClose",static:!1,private:!1,access:{has:e=>"handleClose"in e,get:e=>e.handleClose},metadata:t},null,i),s(this,null,x,{kind:"method",name:"handleDelete",static:!1,private:!1,access:{has:e=>"handleDelete"in e,get:e=>e.handleDelete},metadata:t},null,i),s(this,null,T,{kind:"method",name:"handleSave",static:!1,private:!1,access:{has:e=>"handleSave"in e,get:e=>e.handleSave},metadata:t},null,i),s(this,null,U,{kind:"method",name:"handleChange",static:!1,private:!1,access:{has:e=>"handleChange"in e,get:e=>e.handleChange},metadata:t},null,i),s(this,null,w,{kind:"method",name:"setInitialPtScale",static:!1,private:!1,access:{has:e=>"setInitialPtScale"in e,get:e=>e.setInitialPtScale},metadata:t},null,i),s(this,null,R,{kind:"method",name:"handleClick",static:!1,private:!1,access:{has:e=>"handleClick"in e,get:e=>e.handleClick},metadata:t},null,i),s(this,null,A,{kind:"method",name:"handleNavigationChange",static:!1,private:!1,access:{has:e=>"handleNavigationChange"in e,get:e=>e.handleNavigationChange},metadata:t},null,i),s(null,null,p,{kind:"field",name:"savedKiosk",static:!1,private:!1,access:{has:e=>"savedKiosk"in e,get:e=>e.savedKiosk,set:(e,n)=>{e.savedKiosk=n}},metadata:t},v,_),s(null,null,K,{kind:"field",name:"statusMessages",static:!1,private:!1,access:{has:e=>"statusMessages"in e,get:e=>e.statusMessages,set:(e,n)=>{e.statusMessages=n}},metadata:t},M,b),t&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:t})}get kiosk(){return a.uiState.kioskData}setKiosk(t){a.uiState.setKioskData(t)}get renderer(){return a.rendererService.renderer}getCameraState(){const t=a.rendererService.getCameraState();return t?{mapInitialPtScale:this.initialPtScale,mapPtScale:t.ptScale,mapCenterX:t.center.x,mapCenterY:t.center.y,mapRollDegrees:t.roll,mapPitch:t.pitch}:{}}savedKiosk=(h(this,i),h(this,v,null));get hasUnsavedChanges(){const t=this.savedKiosk,e=c(this.kiosk);if(!e||!t)return!!e!=!!t;const n=Object.keys(t),l=Object.keys(e);if(n.length!==l.length)return!0;for(const o of n)if(!(o in e)||t[o]!==e[o])return!0;return!1}statusMessages=(h(this,_),h(this,M,[]));addStatusMessage(t){this.statusMessages=[{...t,id:Date.now()}],this.startCleanupMessages()}clearStatusMessages(){this.statusMessages=[]}statusMessageTimer=(h(this,b),0);startCleanupMessages(){clearTimeout(this.statusMessageTimer),this.statusMessageTimer=window.setTimeout(()=>this.clearStatusMessages(),1e3)}async resetCamera(){const{z:t,mapRollDegrees:e,mapInitialPtScale:n,mapPtScale:l,mapCenterX:o,mapCenterY:u}=this.kiosk||{},d=this.renderer;d&&(await d.controls.resetCamera({pan:!0,zoom:!0,roll:!0,pitch:!0},!0),j(()=>{Number.isFinite(n)&&Number.isFinite(l)&&l>0&&d.controls.zoomBy(n/l,!0),Number.isFinite(o)&&Number.isFinite(u)&&d.controls.panTo(o,u,!0),Number.isFinite(e)&&d.controls.rollTo(e,!0),t&&a.fp.activateFloor({name:t})}))}restoreData(){const t=q();return t&&(this.setKiosk(t),this.savedKiosk=t,a.uiState.kiosk=!0,this.resetCamera()),t}handleSetupReady(){this.restoreData(),a.uiState.kiosk=!0,a.uiState.hideFreeOrDemo=!0,a.uiState.setForceDimm(!0),a.searchStore.setSearchText(""),a.searchStore.setFocused(!1)}handleClose(){this.setKiosk(null),a.uiState.setForceDimm(!1),a.uiState.enableSetKioskMode(!1),a.searchStore.closeSearch(),this.resetCamera()}handleDelete(){B(),this.setKiosk(null),a.uiState.resetMapSettings(),a.uiState.resetUIScale(),this.resetCamera(),this.addStatusMessage({variant:"success",title:k("Deleted")})}handleSave(){const t=this.renderer;if(!t)return;const e=c(this.kiosk),n=this.getCameraState(),l={...e,...n};if(!X(t,l)){this.addStatusMessage({variant:"error",title:k("Kiosk not visible")});return}this.setKiosk(l),J(l),Y(l,"https://app.expofp.com/"),a.uiState.setUIScale(l.uiScale,!0),this.addStatusMessage({variant:"success",title:k("Saved")}),this.savedKiosk=l}delayChange(t){requestAnimationFrame(()=>t?.())}handleChange(t){const e=c(this.kiosk);e&&(Number.isFinite(t.angle)&&this.setKiosk({...e,heading:t.angle}),Number.isFinite(t.scale)&&(this.setKiosk({...e,uiScale:t.scale}),this.delayChange(()=>a.uiState.setUIScale(t.scale,!1))),Number.isFinite(t.percent)&&this.setKiosk({...e,iconSizePercent:t.percent}))}initialPtScale;setInitialPtScale(t){if(this.initialPtScale)return;this.initialPtScale=t;const e=c(this.kiosk);e&&this.setKiosk({...e,mapInitialPtScale:t})}handleClick(t){const e=c(this.kiosk),n=a.fp.getFloors(),l=E()?n.find(u=>u.active)?.name??null:null,o=a.uiState.uiScale;this.setKiosk({...e,x:t.x,y:t.y,z:l,uiScale:e?.uiScale||o,heading:e?.heading||0,iconSizePercent:e?.iconSizePercent||100,...this.getCameraState()})}handleNavigationChange(){const t=c(this.kiosk);t&&this.setKiosk({...t,...this.getCameraState()})}}})();export default new L;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export declare const KIOSK_STORAGE_KEY = "expofp-kiosk";
|
|
2
|
+
export declare const KIOSK_STATS_ID_STORAGE_KEY = "expofp-kiosk-stats-id";
|
|
2
3
|
export declare const KIOSK_SLUG = "interactive-kiosk";
|
|
3
4
|
export declare const KIOSK_NAME = "Your Location";
|
|
4
5
|
export declare const KIOSK_URL_PARAM_PREFIX = "kiosk_";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export const KIOSK_STORAGE_KEY="expofp-kiosk",KIOSK_SLUG="interactive-kiosk",KIOSK_NAME="Your Location",KIOSK_URL_PARAM_PREFIX="kiosk_";
|
|
1
|
+
export const KIOSK_STORAGE_KEY="expofp-kiosk",KIOSK_STATS_ID_STORAGE_KEY="expofp-kiosk-stats-id",KIOSK_SLUG="interactive-kiosk",KIOSK_NAME="Your Location",KIOSK_URL_PARAM_PREFIX="kiosk_";
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { Kiosk } from "./SetKiosk";
|
|
2
|
+
export declare function createKiosk(kiosk: Kiosk, originUrlString: string): Promise<string | null>;
|
|
3
|
+
export declare function updateKiosk(kiosk: Kiosk, originUrlString: string): Promise<void>;
|
|
4
|
+
//# sourceMappingURL=kioskApi.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{KIOSK_STATS_ID_STORAGE_KEY as a}from"./SetKiosk/constants";const r={"Content-Type":"application/json"};function n(o,s){const e=new URL(o,s);return e.searchParams.set("expoKey",window.__efpEvent),e.toString()}export async function createKiosk(o,s){try{const e=await fetch(n("/api/kiosks",s),{method:"POST",headers:r,body:JSON.stringify(o)});return e.ok?(await e.json()).key??null:(console.error("createKiosk",e.status,e.statusText),null)}catch(e){return console.error("createKiosk",e),null}}export async function updateKiosk(o,s){const e=localStorage.getItem(a);if(e)try{const t=await fetch(n("/api/kiosks",s),{method:"POST",headers:r,body:JSON.stringify({...o,key:e})});t.ok||console.error("updateKiosk",t.status,t.statusText)}catch(t){console.error("updateKiosk",t)}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{createBrowserHistory as oe}from"history";import{autorun as O,reaction as k}from"mobx";import{handleCustomCommand as se}from"../utils/customCommands";import{BUILD_ROUTE_KEY as re,KIOSK_ENABLE_KEY as A,MAP_SETTINGS_KEY as ae,PREVIEW_MODE_QUERY as E,PREVIEW_MODE_STORAGE_KEY as F,SEPARATOR as R,PATHWAY_KEY as N,PLANNER_KEY as P,PLANNER_SOURCE_KEY as $,PLANNER_FROM_KEY as W,LANG_KEY as K,UI_SCALE_PARAM_KEY as Y,UI_SCALE_RESET_PARAM_KEY as V,VIEWER_MODE_QUERY as I,VIEWER_MODE_STORAGE_KEY as H,LANGUAGE_TYPE as x}from"../constants";import v from"../data";import s,{uiState as i}from"../store";import{BoothBase as G}from"../store/BoothStore";import{CurrentPosition as ie,extractRoute as ne,findBooth as le}from"../store/RouteStore";import{setConsentSettings as D}from"../tools/gtag";import U from"../tools/logger";import{isLocalStorageAvailable as L}from"../utils/localStorage";import{areLayersEnabled as ce}from"../utils/areLayersEnabled";import ue from"../core/Rect";import{getMostFrequent as he}from"../utils/getMostFrequent";import{runInAction as z}from"mobx";import{recoverKioskFromUrlPrams as fe}from"../components/Kiosk/recoverKioskFromUrlPrams";import{hasLocale as de,setLocale as me}from"../utils/i18n";let m=!1,C=!1,j=null,q=null,Q=null,J;const h=oe(),B=window.location.pathname,S=[];export function getLocationHistory(){return S}function b(t){return B+t}function pe(t){m||h.push(b(t))}export function historyReplace(t){m||h.push(b(t))}function f(t){return t.replace(/=&/g,"&").replace(/=$/,"")}function X(){let t="";const n=i.selectedExhibitor,a=i.selectedBooth,e=i.selectedEventItem,o=i.selectedRoute,r=i.selectedSpeaker,l=i.setKioskModeEnabled;if(i.list.type==="route-planner"&&!n&&!a&&!e){const d=s.routePlannerStore;if(d.source==="bookmarks")t=`${P}&${$}=bookmarks`;else{const w=d.items.map(g=>g.entity.slug).filter(Boolean).join(R);t=`${P}=${w}`}const p=d.startPoint?.slug;p&&(t+=`&${W}=${p}`)}else if(o&&!i.isMultiPointRoute){const d=o.from instanceof G?`:${o.from.slug}`:"",p=o.to instanceof G?`:${o.to.slug}`:"",w=s.routeStore.onlyAccessible?":true":":false",g=o.waypoints?.map(u=>`:${u.slug}`).join("");t=`route${p}${d}${w}${g||""}`}else if(n)t=n.slug;else if(a)t=a.slug;else if(e)t=e.slug;else if(r)t=r.slug;else if(l)t="";else switch(i.list.type){case"bookmarks":t="bookmarks";break;case"visited":t="visited";break;case"category":t=i.selectedCategory.slug;break;case"search":t=i.list.text||"";break;case x:t=x;break;case"filter":t=`${i.list.query.key}=${i.list.query.value}`;break;case"sessions":t="sessions";break;case"exhibitors":t="exhibitors";break;case"speakers":t="speakers";break;case"tours":t="tours";break;case"multi-point-tour":t=`tour=${i.list.tourId}`;break;default:throw new Error("Unkown list.type")}if(C)return;const c=t?"?"+encodeURIComponent(t):"";h.location.search!==c&&(n!==j||a!==q||e!==Q?pe(c):historyReplace(c),j=n,q=a,Q=e)}function Z(){const t=i.selectedExhibitor,n=i.selectedEventItem,a=i.selectedSpeaker;let e="";t?e=t.name:n?e=n.name:a?e=a.name:i.list.type==="search"&&i.list.text?e="`"+(i.list.text||"")+"`":i.list.type==="multi-point-tour"&&i.tourTitle&&(e=i.tourTitle),e.length&&(e+=" \u2013 "),e+=v.title,v.subtitle&&(e+=" \u2013 "+v.subtitle),e+=" \u2013 Expo Floor Plan by ExpoFP",document.title=e}function _(){const t=h.location.search.length>1?decodeURIComponent(h.location.search.substring(1)):"";return se(t)}function y(){const t=h.location.search.length>1?decodeURIComponent(h.location.search.substring(1)):"";C=!0;const n=s.boothStore.booths.find(e=>e.slug?.toLowerCase()===t?.toLowerCase()||e.externalId?.toLowerCase()===t?.toLowerCase()||e.externalId?.toLowerCase()?.replace(/\s+/g,"")===t?.toLowerCase()),a=new URLSearchParams(decodeURIComponent(window.location.search));if(fe(a),ge(a),!_())if(a.has(A)){const e=a.get(A);e==="1"?i.kiosk=!0:e==="0"&&(i.kiosk=!1,i.resetUIScale())}else if(t==="tours")s.selectTours();else if(t.startsWith("tour=")){const e=t.split("=")[1],o=s.toursStore.getTourById(e);o?s.toursStore.launchTour(o,o.name,o.description):(console.warn(`Route with id "${e}" not found`),s.selectTours())}else if(a.has(P)){const e=a.get($),o=a.get(W),r=o?le(o):null;if(e==="bookmarks")s.routePlannerStore.launchFromBookmarks(r??void 0);else{const l=(a.get(P)||"").split(R).filter(Boolean);s.routePlannerStore.launchFromSlugs(l,r??void 0)}}else if(t.startsWith("route")){const e=t.split(R);s.routeStore.setOnlyAccessible(e[3]==="true");const o=ne(e[2],e[1],e.slice(4));s.routeStore.selectRoute(o);const l=e.slice(4).length>0;s.uiState.setIsMultiPointRoute(l);const d=new URLSearchParams(window.location.search).get("title");d&&s.uiState.setRouteTitle(d)}else if(t==="bookmarks")s.selectBookmarks();else if(t==="visited")s.selectVisited();else if(t===x)s.selectLanguage();else if(a.has(K)){const e=a.get(K)?.toLowerCase();de(e)&&me(e)}else if(t==="sessions")s.selectSessions();else if(t==="exhibitors")s.selectExhibitors();else if(t==="speakers")s.selectSpeakers();else if(t==="-pdf")s.uiState.printingPdf=!0;else if(t.startsWith("hide"))s.uiState.setVisibility(new URLSearchParams(t).get("hide").split(",").filter(Boolean).reduce((e,o)=>({...e,[o]:!1}),{}));else if(n)setTimeout(()=>s.selectBooth(n),250);else if(t===re)s.uiState.startBuildRoute();else if(a.get(N)){const e=a.get(N),o=a.get("booths")?.split(",")||[],r=a.get("exhibitors")?.split(",")||[],l=a.get("tour");if(l){const u=s.toursStore.getTourById(l);u&&z(()=>{s.uiState.setTourTitle(u.name),s.uiState.setTourDescription(u.description),s.uiState.setIsMultiPointTour(!0),s.uiState.setMultiPointTourList(u.id)})}const c=s.boothStore.booths,d=s.exhibitorStore.exhibitors,p=c.filter(u=>o.includes(u.externalId)),w=d.filter(u=>r.includes(u.externalId)).flatMap(u=>u.booths),g=[...p,...w];if(ce()){const u=g.map(te=>te.layer.name),M=he(u);M&&s.fp.activateFloor({name:M})}(o.length>0||r.length>0)&&s.fp.highlightEntities([...o,...r]),s.layerStore.showPathWay(e),g.length>0&&z(()=>{s.uiState.moveToRect=ue.fromMultiple(g.map(u=>u.rect).filter(Boolean)),s.uiState.rollReset=!0})}else{const e=s.eventStore.eventItems.find(o=>o.slug?.toLowerCase()===t?.toLowerCase()||o.externalId?.toLowerCase()===t?.toLowerCase());if(e)s.selectEventItem(e,!0);else{const o=s.exhibitorStore.exhibitors.find(r=>r.slug?.toLowerCase()===t?.toLowerCase()||r.externalId?.toLowerCase()===t?.toLowerCase());if(t.startsWith("exhibitors")){const r=t.split("=")[1].split(",");setTimeout(()=>s.fp.selectExhibitor(r),250)}else if(o)setTimeout(()=>s.clickExhibitor(o),250);else if(t.includes("=")&&(t.startsWith("categories=")||t.startsWith("poiType=")))U.log("Skipping filter parameter in dispatchFromUrl:",t);else{const l=s.categoryStore.categories.find(c=>c.slug===t);if(l)s.selectCategory(l);else{const c=s.speakerStore.findBySlug(t);c?s.selectSpeaker(c,!0):t.includes("heatmap=true")||s.searchStore.selectSearch(t)}}}}C=!1,X(),Z()}function T(){const t=h.location.search;if(t.includes("heatmap")){const e=new URL(window.location.href);if(e.searchParams.get("heatmap")==="true")if(e.searchParams.get("type")==="yah"){let r=f(e.search);m=!0,historyReplace(r),s.uiState.heatmapYah=!0,s.uiState.monochrome=!0,s.uiState.hideLogoInBooth=!0,s.uiState.hideHeaderLogo=!0,s.uiState.disableBookmarked=!0}else{e.searchParams.delete("heatmap");let r=f(e.search);m=!0,historyReplace(r),s.uiState.heatmap=!0}}if(t.startsWith("?preview="))historyReplace("?");else if(t.startsWith("?b="))historyReplace("?bookmarks");else if(t.startsWith("?ba=")){const e=new URL(window.location.href),o=parseInt(e.searchParams.get("ba")),r=s.exhibitorStore.exhibitorById.get(o);historyReplace(r?"?"+r.slug:"?bookmarks")}if(t.includes("blue-dot")){const e=new URL(window.location.href),o=e.searchParams.get("blue-dot").split(",");if(e.searchParams.delete("blue-dot"),o.length>1){const l=s.layerStore.findLayer(o[2])?.name,c=new ie(Number(o[0])||void 0,Number(o[1])||void 0,l,void 0,Number(o[3])||void 0,Number(o[4])||void 0);s.layerStore.layersLoaded?s.routeStore.selectCurrentPosition(c,!0,1):k(()=>s.layerStore.layersLoaded,()=>{s.routeStore.selectCurrentPosition(c,!0,1)})}let r=f(e.search);historyReplace(r)}if(t.includes("copy_exh")){const e=new URL(window.location.href),o=e.searchParams.get("copy_exh");e.searchParams.delete("copy_exh"),historyReplace("?")}if(t.includes("noOverlay")){const e=new URL(window.location.href),o=e.searchParams.get("noOverlay");e.searchParams.delete("noOverlay");let r=f(e.search);o==="true"?s.uiState.hideOverlay=!0:o==="false"&&(s.uiState.hideOverlay=!1),historyReplace(r)}if(t.includes("allowConsent")){const e=new URL(window.location.href),o=e.searchParams.get("allowConsent");e.searchParams.delete("allowConsent");const r=f(e.search);o==="true"?D(!0):o==="false"&&D(!1),historyReplace(r)}if(t.includes("hideHeaderLogo")){const e=new URL(window.location.href),o=e.searchParams.get("hideHeaderLogo");e.searchParams.delete("hideHeaderLogo");const r=f(e.search);o==="true"&&(i.hideHeaderLogo=!0),historyReplace(r)}if(t.includes("hideLogoInBooth")){const e=new URL(window.location.href),o=e.searchParams.get("hideLogoInBooth");e.searchParams.delete("hideLogoInBooth");const r=f(e.search);o==="true"&&(i.hideLogoInBooth=!0),historyReplace(r)}if(t.includes("disableFeatured")){const e=new URL(window.location.href),o=e.searchParams.get("disableFeatured");e.searchParams.delete("disableFeatured");const r=f(e.search);o==="true"&&s.exhibitorStore.exhibitors.forEach(l=>l.featured=!1),historyReplace(r)}if(t.includes("disableBookmarked")){const e=new URL(window.location.href),o=e.searchParams.get("disableBookmarked");e.searchParams.delete("disableBookmarked");const r=f(e.search);o==="true"&&(i.disableBookmarked=!0),historyReplace(r)}if(t.includes("disableGps")){const e=new URL(window.location.href),o=e.searchParams.get("disableGps");e.searchParams.delete("disableGps");const r=f(e.search);o==="true"&&s.routeStore.setGpsTrackingEnabled(!1),historyReplace(r)}if(t.includes("monochrome")){const e=new URL(window.location.href),o=e.searchParams.get("monochrome");e.searchParams.delete("monochrome");const r=f(e.search);o==="true"&&(i.monochrome=!0),historyReplace(r)}if((t.startsWith("?fbclid")||t.startsWith("?_ga"))&&historyReplace("?"),t.includes(I)){const e=new URL(window.location.href),o=e.searchParams.get(I);o==="1"||o==="true"?L&&localStorage.setItem(H,"1"):(o==="0"||o==="false")&&L&&localStorage.removeItem(H),e.searchParams.delete(I),historyReplace(f(e.search))}if(t.includes(E)){const e=new URL(window.location.href),o=e.searchParams.get(E);o==="true"?L&&localStorage.setItem(F,"1"):o==="false"&&L&&localStorage.removeItem(F),e.searchParams.delete(E),historyReplace(f(e.search))}if(i.previewExhibitor&&historyReplace("?"+i.previewExhibitor.slug),h.location.search.includes("&")||h.location.search.includes("%26")){let e=h.location.search;e=e.startsWith("?")?e.slice(1):e;const o=e.includes("&")?"&":"%26",l=e.split(o).map(c=>{const d=s.exhibitorStore.exhibitors.find(p=>p.slug===c||p.externalId===c);return d?d.name:c}).join("&");historyReplace("?"+l)}const n=new URLSearchParams(window.location.search);if(n.has(V)){s.uiState.resetUIScale();const e=new URL(window.location.href);e.searchParams.delete(V);let o=f(e.search);m=!0,historyReplace(o),m=!1}const a=n.get(Y);if(a){const e=a.replace(",","."),o=parseFloat(e);!isNaN(o)&&o>=.8&&o<=1.4?s.uiState.setUIScale(o,!0):U.warn(`Invalid ui-scale parameter: ${a}. Must be a number between 0.8 and 1.4.`);const r=new URL(window.location.href);r.searchParams.delete(Y);let l=f(r.search);m=!0,historyReplace(l),m=!1}}export function initRouting(t=!1){m=t,!m&&b(h.location.search)===B&&S.push(b(h.location.search)),J=h.listen((n,a)=>{m||(S.push(b(n.search)),U.log("history",a,n),a==="POP"&&y())}),T(),_(),k(()=>s.layerStore.layersLoaded,()=>{s.urlFilterManager&&!s.urlFilterManager.isInitialized&&s.urlFilterManager.initialize(),y(),O(Z),O(X),i.viewerMode&&(i.menu=!0)})}export function applyParameters(t=""){historyReplace("?"+decodeURIComponent(t.toString())),s.layerStore.layersLoaded?(T(),y()):(_(),k(()=>s.layerStore.layersLoaded,()=>{T(),y()}))}export function destroyHistory(){J()}export function goBack(){if(console.log("goBack"),S.length>1){S.pop();const n=S[S.length-1].replace(B,"");return m=!0,h.replace(n),m=!1,y(),!0}else return h.go(-1),!1}function ge(t){try{let n={};const a=i.defaultMapSettings;if(new Set(t.keys()).size)n=ee(Object.fromEntries(t.entries()),a);else{const e=sessionStorage.getItem(ae);e&&(n=ee(JSON.parse(e),a))}if(i.setMapSettings(n),n.z){const e=s.layerStore.layers.find(o=>o.name===n.z);e&&s.layerStore.updateVisibility(e,!0)}}catch(n){console.error("Failed to process or save map settings.",n)}}function ee(t,n){const a={};for(const e in t){if(!Object.prototype.hasOwnProperty.call(n,e)||!Object.prototype.hasOwnProperty.call(t,e))continue;const o=t[e];typeof n[e]=="number"&&typeof o=="string"?a[e]=parseFloat(o):a[e]=o}return a}
|
|
1
|
+
import{createBrowserHistory as oe}from"history";import{autorun as O,reaction as k}from"mobx";import{handleCustomCommand as se}from"../utils/customCommands";import{BUILD_ROUTE_KEY as re,KIOSK_ENABLE_KEY as A,MAP_SETTINGS_KEY as ae,PREVIEW_MODE_QUERY as E,PREVIEW_MODE_STORAGE_KEY as F,SEPARATOR as R,PATHWAY_KEY as N,PLANNER_KEY as P,PLANNER_SOURCE_KEY as $,PLANNER_FROM_KEY as K,LANG_KEY as W,UI_SCALE_PARAM_KEY as Y,UI_SCALE_RESET_PARAM_KEY as V,VIEWER_MODE_QUERY as I,VIEWER_MODE_STORAGE_KEY as H,LANGUAGE_TYPE as x}from"../constants";import v from"../data";import s,{uiState as i}from"../store";import{BoothBase as G}from"../store/BoothStore";import{CurrentPosition as ie,extractRoute as ne,findBooth as le}from"../store/RouteStore";import{setConsentSettings as D}from"../tools/gtag";import U from"../tools/logger";import{isLocalStorageAvailable as L}from"../utils/localStorage";import{areLayersEnabled as ce}from"../utils/areLayersEnabled";import ue from"../core/Rect";import{getMostFrequent as he}from"../utils/getMostFrequent";import{runInAction as z}from"mobx";import{recoverKioskFromUrlPrams as fe}from"../components/Kiosk/recoverKioskFromUrlPrams";import{hasLocale as de,setLocale as me}from"../utils/i18n";let m=!1,C=!1,j=null,q=null,Q=null,J;const h=oe(),B=window.location.pathname,S=[];export function getLocationHistory(){return S}function b(t){return B+t}function pe(t){m||h.push(b(t))}export function historyReplace(t){m||h.push(b(t))}function f(t){return t.replace(/=&/g,"&").replace(/=$/,"")}function X(){let t="";const n=i.selectedExhibitor,a=i.selectedBooth,e=i.selectedEventItem,o=i.selectedRoute,r=i.selectedSpeaker,l=i.setKioskModeEnabled;if(i.list.type==="route-planner"&&!n&&!a&&!e){const d=s.routePlannerStore;if(d.source==="bookmarks")t=`${P}&${$}=bookmarks`;else{const w=d.items.map(g=>g.entity.slug).filter(Boolean).join(R);t=`${P}=${w}`}const p=d.startPoint?.slug;p&&(t+=`&${K}=${p}`)}else if(o&&!i.isMultiPointRoute){const d=o.from instanceof G?`:${o.from.slug}`:"",p=o.to instanceof G?`:${o.to.slug}`:"",w=s.routeStore.onlyAccessible?":true":":false",g=o.waypoints?.map(u=>`:${u.slug}`).join("");t=`route${p}${d}${w}${g||""}`}else if(n)t=n.slug;else if(a)t=a.slug;else if(e)t=e.slug;else if(r)t=r.slug;else if(l)t="";else switch(i.list.type){case"bookmarks":t="bookmarks";break;case"visited":t="visited";break;case"category":t=i.selectedCategory.slug;break;case"search":t=i.list.text||"";break;case x:t=x;break;case"filter":t=`${i.list.query.key}=${i.list.query.value}`;break;case"sessions":t="sessions";break;case"exhibitors":t="exhibitors";break;case"speakers":t="speakers";break;case"tours":t="tours";break;case"multi-point-tour":t=`tour=${i.list.tourId}`;break;default:throw new Error("Unkown list.type")}if(C)return;const c=t?"?"+encodeURIComponent(t):"";h.location.search!==c&&(n!==j||a!==q||e!==Q?pe(c):historyReplace(c),j=n,q=a,Q=e)}function Z(){const t=i.selectedExhibitor,n=i.selectedEventItem,a=i.selectedSpeaker;let e="";t?e=t.name:n?e=n.name:a?e=a.name:i.list.type==="search"&&i.list.text?e="`"+(i.list.text||"")+"`":i.list.type==="multi-point-tour"&&i.tourTitle&&(e=i.tourTitle),e.length&&(e+=" \u2013 "),e+=v.title,v.subtitle&&(e+=" \u2013 "+v.subtitle),e+=" \u2013 Expo Floor Plan by ExpoFP",document.title=e}function _(){const t=h.location.search.length>1?decodeURIComponent(h.location.search.substring(1)):"";return se(t)}function y(){const t=h.location.search.length>1?decodeURIComponent(h.location.search.substring(1)):"";C=!0;const n=s.boothStore.booths.find(e=>e.slug?.toLowerCase()===t?.toLowerCase()||e.externalId?.toLowerCase()===t?.toLowerCase()||e.externalId?.toLowerCase()?.replace(/\s+/g,"")===t?.toLowerCase()),a=new URLSearchParams(decodeURIComponent(window.location.search));if(fe(a),ge(a),!_())if(a.has(A)){const e=a.get(A);e==="1"?i.kiosk=!0:e==="0"&&(i.kiosk=!1,i.resetUIScale())}else if(t==="tours")s.selectTours();else if(t.startsWith("tour=")){const e=t.split("=")[1],o=s.toursStore.getTourById(e);o?s.toursStore.launchTour(o,o.name,o.description):(console.warn(`Route with id "${e}" not found`),s.selectTours())}else if(a.has(P)){const e=a.get($),o=a.get(K),r=o?le(o):null;if(e==="bookmarks")s.routePlannerStore.launchFromBookmarks(r??void 0);else{const l=(a.get(P)||"").split(R).filter(Boolean);s.routePlannerStore.launchFromSlugs(l,r??void 0)}}else if(t.startsWith("route")){const e=t.split(R);s.routeStore.setOnlyAccessible(e[3]==="true");const o=ne(e[2],e[1],e.slice(4));s.routeStore.selectRoute(o);const l=e.slice(4).length>0;s.uiState.setIsMultiPointRoute(l);const d=new URLSearchParams(window.location.search).get("title");d&&s.uiState.setRouteTitle(d)}else if(t==="bookmarks")s.selectBookmarks();else if(t==="visited")s.selectVisited();else if(t===x)s.selectLanguage();else if(a.has(W)){const e=a.get(W)?.toLowerCase();de(e)&&me(e)}else if(t==="sessions")s.selectSessions();else if(t==="exhibitors")s.selectExhibitors();else if(t==="speakers")s.selectSpeakers();else if(t==="-pdf")s.uiState.printingPdf=!0;else if(t.startsWith("hide"))s.uiState.setVisibility(new URLSearchParams(t).get("hide").split(",").filter(Boolean).reduce((e,o)=>({...e,[o]:!1}),{}));else if(n)setTimeout(()=>s.selectBooth(n),250);else if(t===re)s.uiState.startBuildRoute();else if(a.get(N)){const e=a.get(N),o=a.get("booths")?.split(",")||[],r=a.get("exhibitors")?.split(",")||[],l=a.get("tour");if(l){const u=s.toursStore.getTourById(l);u&&z(()=>{s.uiState.setTourTitle(u.name),s.uiState.setTourDescription(u.description),s.uiState.setIsMultiPointTour(!0),s.uiState.setMultiPointTourList(u.id)})}const c=s.boothStore.booths,d=s.exhibitorStore.exhibitors,p=c.filter(u=>o.includes(u.externalId)),w=d.filter(u=>r.includes(u.externalId)).flatMap(u=>u.booths),g=[...p,...w];if(ce()){const u=g.map(te=>te.layer.name),M=he(u);M&&s.fp.activateFloor({name:M})}(o.length>0||r.length>0)&&s.fp.highlightEntities([...o,...r]),s.layerStore.showPathWay(e),g.length>0&&z(()=>{s.uiState.moveToRect=ue.fromMultiple(g.map(u=>u.rect).filter(Boolean)),s.uiState.rollReset=!0})}else{const e=s.eventStore.eventItems.find(o=>o.slug?.toLowerCase()===t?.toLowerCase()||o.externalId?.toLowerCase()===t?.toLowerCase());if(e)s.selectEventItem(e,!0);else{const o=s.exhibitorStore.exhibitors.find(r=>r.slug?.toLowerCase()===t?.toLowerCase()||r.externalId?.toLowerCase()===t?.toLowerCase());if(t.startsWith("exhibitors")){const r=t.split("=")[1].split(",");setTimeout(()=>s.fp.selectExhibitor(r),250)}else if(o)setTimeout(()=>s.clickExhibitor(o),250);else if(t.includes("=")&&(t.startsWith("categories=")||/^poiTypes?=/.test(t)))U.log("Skipping filter parameter in dispatchFromUrl:",t);else{const l=s.categoryStore.categories.find(c=>c.slug===t);if(l)s.selectCategory(l);else{const c=s.speakerStore.findBySlug(t);c?s.selectSpeaker(c,!0):t.includes("heatmap=true")||s.searchStore.selectSearch(t)}}}}C=!1,X(),Z()}function T(){const t=h.location.search;if(t.includes("heatmap")){const e=new URL(window.location.href);if(e.searchParams.get("heatmap")==="true")if(e.searchParams.get("type")==="yah"){let r=f(e.search);m=!0,historyReplace(r),s.uiState.heatmapYah=!0,s.uiState.monochrome=!0,s.uiState.hideLogoInBooth=!0,s.uiState.hideHeaderLogo=!0,s.uiState.disableBookmarked=!0}else{e.searchParams.delete("heatmap");let r=f(e.search);m=!0,historyReplace(r),s.uiState.heatmap=!0}}if(t.startsWith("?preview="))historyReplace("?");else if(t.startsWith("?b="))historyReplace("?bookmarks");else if(t.startsWith("?ba=")){const e=new URL(window.location.href),o=parseInt(e.searchParams.get("ba")),r=s.exhibitorStore.exhibitorById.get(o);historyReplace(r?"?"+r.slug:"?bookmarks")}if(t.includes("blue-dot")){const e=new URL(window.location.href),o=e.searchParams.get("blue-dot").split(",");if(e.searchParams.delete("blue-dot"),o.length>1){const l=s.layerStore.findLayer(o[2])?.name,c=new ie(Number(o[0])||void 0,Number(o[1])||void 0,l,void 0,Number(o[3])||void 0,Number(o[4])||void 0);s.layerStore.layersLoaded?s.routeStore.selectCurrentPosition(c,!0,1):k(()=>s.layerStore.layersLoaded,()=>{s.routeStore.selectCurrentPosition(c,!0,1)})}let r=f(e.search);historyReplace(r)}if(t.includes("copy_exh")){const e=new URL(window.location.href),o=e.searchParams.get("copy_exh");e.searchParams.delete("copy_exh"),historyReplace("?")}if(t.includes("noOverlay")){const e=new URL(window.location.href),o=e.searchParams.get("noOverlay");e.searchParams.delete("noOverlay");let r=f(e.search);o==="true"?s.uiState.hideOverlay=!0:o==="false"&&(s.uiState.hideOverlay=!1),historyReplace(r)}if(t.includes("allowConsent")){const e=new URL(window.location.href),o=e.searchParams.get("allowConsent");e.searchParams.delete("allowConsent");const r=f(e.search);o==="true"?D(!0):o==="false"&&D(!1),historyReplace(r)}if(t.includes("hideHeaderLogo")){const e=new URL(window.location.href),o=e.searchParams.get("hideHeaderLogo");e.searchParams.delete("hideHeaderLogo");const r=f(e.search);o==="true"&&(i.hideHeaderLogo=!0),historyReplace(r)}if(t.includes("hideLogoInBooth")){const e=new URL(window.location.href),o=e.searchParams.get("hideLogoInBooth");e.searchParams.delete("hideLogoInBooth");const r=f(e.search);o==="true"&&(i.hideLogoInBooth=!0),historyReplace(r)}if(t.includes("disableFeatured")){const e=new URL(window.location.href),o=e.searchParams.get("disableFeatured");e.searchParams.delete("disableFeatured");const r=f(e.search);o==="true"&&s.exhibitorStore.exhibitors.forEach(l=>l.featured=!1),historyReplace(r)}if(t.includes("disableBookmarked")){const e=new URL(window.location.href),o=e.searchParams.get("disableBookmarked");e.searchParams.delete("disableBookmarked");const r=f(e.search);o==="true"&&(i.disableBookmarked=!0),historyReplace(r)}if(t.includes("disableGps")){const e=new URL(window.location.href),o=e.searchParams.get("disableGps");e.searchParams.delete("disableGps");const r=f(e.search);o==="true"&&s.routeStore.setGpsTrackingEnabled(!1),historyReplace(r)}if(t.includes("monochrome")){const e=new URL(window.location.href),o=e.searchParams.get("monochrome");e.searchParams.delete("monochrome");const r=f(e.search);o==="true"&&(i.monochrome=!0),historyReplace(r)}if((t.startsWith("?fbclid")||t.startsWith("?_ga"))&&historyReplace("?"),t.includes(I)){const e=new URL(window.location.href),o=e.searchParams.get(I);o==="1"||o==="true"?L&&localStorage.setItem(H,"1"):(o==="0"||o==="false")&&L&&localStorage.removeItem(H),e.searchParams.delete(I),historyReplace(f(e.search))}if(t.includes(E)){const e=new URL(window.location.href),o=e.searchParams.get(E);o==="true"?L&&localStorage.setItem(F,"1"):o==="false"&&L&&localStorage.removeItem(F),e.searchParams.delete(E),historyReplace(f(e.search))}if(i.previewExhibitor&&historyReplace("?"+i.previewExhibitor.slug),h.location.search.includes("&")||h.location.search.includes("%26")){let e=h.location.search;e=e.startsWith("?")?e.slice(1):e;const o=e.includes("&")?"&":"%26",l=e.split(o).map(c=>{const d=s.exhibitorStore.exhibitors.find(p=>p.slug===c||p.externalId===c);return d?d.name:c}).join("&");historyReplace("?"+l)}const n=new URLSearchParams(window.location.search);if(n.has(V)){s.uiState.resetUIScale();const e=new URL(window.location.href);e.searchParams.delete(V);let o=f(e.search);m=!0,historyReplace(o),m=!1}const a=n.get(Y);if(a){const e=a.replace(",","."),o=parseFloat(e);!isNaN(o)&&o>=.8&&o<=1.4?s.uiState.setUIScale(o,!0):U.warn(`Invalid ui-scale parameter: ${a}. Must be a number between 0.8 and 1.4.`);const r=new URL(window.location.href);r.searchParams.delete(Y);let l=f(r.search);m=!0,historyReplace(l),m=!1}}export function initRouting(t=!1){m=t,!m&&b(h.location.search)===B&&S.push(b(h.location.search)),J=h.listen((n,a)=>{m||(S.push(b(n.search)),U.log("history",a,n),a==="POP"&&y())}),T(),_(),k(()=>s.layerStore.layersLoaded,()=>{s.urlFilterManager&&!s.urlFilterManager.isInitialized&&s.urlFilterManager.initialize(),y(),O(Z),O(X),i.viewerMode&&(i.menu=!0)})}export function applyParameters(t=""){historyReplace("?"+decodeURIComponent(t.toString())),s.layerStore.layersLoaded?(T(),y()):(_(),k(()=>s.layerStore.layersLoaded,()=>{T(),y()}))}export function destroyHistory(){J()}export function goBack(){if(console.log("goBack"),S.length>1){S.pop();const n=S[S.length-1].replace(B,"");return m=!0,h.replace(n),m=!1,y(),!0}else return h.go(-1),!1}function ge(t){try{let n={};const a=i.defaultMapSettings;if(new Set(t.keys()).size)n=ee(Object.fromEntries(t.entries()),a);else{const e=sessionStorage.getItem(ae);e&&(n=ee(JSON.parse(e),a))}if(i.setMapSettings(n),n.z){const e=s.layerStore.layers.find(o=>o.name===n.z);e&&s.layerStore.updateVisibility(e,!0)}}catch(n){console.error("Failed to process or save map settings.",n)}}function ee(t,n){const a={};for(const e in t){if(!Object.prototype.hasOwnProperty.call(n,e)||!Object.prototype.hasOwnProperty.call(t,e))continue;const o=t[e];typeof n[e]=="number"&&typeof o=="string"?a[e]=parseFloat(o):a[e]=o}return a}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import
|
|
1
|
+
import h from"../../data";import{SearchButtonType as i,PREFIXES as u,BUTTON_ICONS as a}from"./constants";import{getContrastTextColor as l}from"../../utils/getContrastTextColor";export class SearchButtonsFactory{rootStore;state;actions;buttonFactories;constructor(t,e,o){this.rootStore=t,this.state=e,this.actions=o,this.buttonFactories={[i.BOOKMARKS]:r=>this.createBookmarksButton(r),[i.VISITED]:r=>this.createVisitedButton(r),[i.CATEGORIES]:r=>this.createCategoriesButton(r),[i.SESSIONS]:r=>this.createSessionsButton(r),[i.TOURS]:r=>this.createGuidedToursButton(r),[i.POI_TYPE]:r=>this.createPoiTypeButton(r),[i.POI_TYPES]:r=>this.createPoiTypesButton(r),[i.LINK]:r=>this.createLinkButton(r),[i.EXHIBITORS]:r=>this.createExhibitorsButton(r)}}createButtons(t){return this.dedupeButtons(t).filter(e=>e.visible).map(e=>({button:this.createButton(e),order:e.order??Number.MAX_SAFE_INTEGER})).filter(e=>e.button!==null).sort((e,o)=>e.order-o.order).map(e=>e.button)}createButton(t){const e=this.buttonFactories[t.type];return e?e(t):null}createBaseButton(t){const e=t.color&&t.color.toUpperCase()!=="#FFFFFF";return{id:t.id||`${t.type}_${t.name}`,label:t.name,text:t.name,enabled:!0,isDimmed:!1,isClickable:!0,backgroundColor:e?t.color:void 0,textColor:e&&t.color?l(t.color):void 0}}createButtonId(t,e){return e.id||`${t}${e.name}`}createBookmarksButton(t){const{uiState:e}=this.rootStore;return e.kiosk||e.disableBookmarked||h.hideBookmarks?null:{...this.createBaseButton(t),id:i.BOOKMARKS,icon:a.BOOKMARKS,active:e.list.type==="bookmarks",count:this.countBookmarks(),onClick:()=>this.actions.handleSearchButtonClick(i.BOOKMARKS)}}createVisitedButton(t){const{uiState:e}=this.rootStore;return e.kiosk?null:{...this.createBaseButton(t),id:i.VISITED,icon:a.VISITED,active:e.list.type==="visited",count:this.countVisited(),onClick:()=>this.actions.handleSearchButtonClick(i.VISITED)}}createCategoriesButton(t){if(!t.children?.length){const n=this.getCategoriesTotalCount();return n>0?this.createSimpleCategoriesButton(t,n):null}const e=(t.children||[]).filter(n=>n.visible);if(e.length===0)return null;const o=this.createButtonId(u.CATEGORIES,t),r=e.filter(n=>n.type==="categories"),s=this.countCategories(r);return{...this.createBaseButton(t),id:o,active:this.state.searchShortcutState.activeParentId===o,count:s,showZeroCount:!0,onClick:()=>this.actions.handleExtendedSearchButtonClick(o)}}createSimpleCategoriesButton(t,e){const{uiState:o}=this.rootStore,r=o.selectedCategoryFilters.length>0?o.selectedCategoryFilters.length:e;return{...this.createBaseButton(t),id:i.CATEGORIES,active:o.selectedCategoryFilters.length>0&&!this.state.searchShortcutState.activeParentId,count:r,showZeroCount:!0,onClick:()=>this.actions.handleSearchButtonClick(i.CATEGORIES)}}createSessionsButton(t){const{uiState:e}=this.rootStore,o=this.getSessionsTotalCount();return o===0?null:{...this.createBaseButton(t),id:i.SESSIONS,icon:a.SESSIONS,active:e.list.type==="sessions",count:o,showZeroCount:!0,hasSubButtons:!0,onClick:()=>this.actions.handleSessionsClick()}}createGuidedToursButton(t){const{uiState:e}=this.rootStore,o=this.getGuidedToursTotalCount();return o===0?null:{...this.createBaseButton(t),id:"guided_tours",active:e.list.type==="tours"||e.list.type==="multi-point-tour",count:o,showZeroCount:!0,onClick:()=>this.actions.handleSearchButtonClick("guided_tours")}}createPoiTypeButton(t){const e=this.rootStore.poiTypeStore.poiTypes.find(s=>s.name===t.name);if(!e)return null;const o=`${u.POI_TYPE}${e.id}`,r=this.getPoiTypeTotalCount(e.id);return r===0?null:{...this.createBaseButton(t),id:o,active:this.state.activePoiFilterId===o,count:r,showZeroCount:!0,onClick:()=>this.actions.handleSearchButtonClick(o)}}createPoiTypesButton(t){if(!t.children?.length)return this.createPoiTypeButton(t);const e=t.children.filter(n=>n.visible);if(e.length===0)return null;if(this.shouldFlattenToSinglePoiType(e,t))return this.createPoiTypeButton(t);const o=e.filter(n=>n.type!=="link"),r=this.countPoiTypes(o),s=this.createButtonId(u.POI_TYPES,t);return{...this.createBaseButton(t),id:s,active:this.state.searchShortcutState.activeParentId===s,count:r,showZeroCount:!0,onClick:()=>this.actions.handleExtendedSearchButtonClick(s)}}shouldFlattenToSinglePoiType(t,e){return t.length===1&&t[0].type==="poi_types"&&t[0].name===e.name}createLinkButton(t){const e=this.createButtonId(u.LINK,t);return{...this.createBaseButton(t),id:e,active:!1,onClick:()=>this.actions.handleExtendedSearchButtonClick(e)}}createExhibitorsButton(t){const{uiState:e}=this.rootStore,o=this.getExhibitorsTotalCount();return o===0?null:{...this.createBaseButton(t),id:i.EXHIBITORS,icon:a.EXHIBITORS,active:e.list.type==="exhibitors",count:o,showZeroCount:!0,onClick:()=>this.actions.handleSearchButtonClick(i.EXHIBITORS)}}countCategories(t){const{categoryById:e}=this.rootStore.categoryStore,o=new Set;return t.forEach(r=>{if(r.type!=="categories")return;const s=e.get(Number(r.id));s&&s.exhibitors.forEach(n=>o.add(n.id))}),o.size}countPoiTypes(t){return t.reduce((e,o)=>{if(o.type!=="poi_types")return e;if(o.count!==void 0)return e+o.count;const r=Number(o.id),s=this.rootStore.poiTypeStore.poiTypes.find(n=>n.id===r);if(s){const n=this.rootStore.boothStore.booths.filter(c=>c.poiTypeId===s.id).length;return e+n}return e},0)}dedupeButtons(t){const e=new Set;return t.filter(o=>{const r=`${o.type}_${o.name}`;return e.has(r)?!1:(e.add(r),!0)})}countBookmarks(){return this.rootStore.exhibitorStore.bookmarked.length+this.rootStore.eventStore.bookmarked.length+this.rootStore.speakerStore.bookmarked.length+this.rootStore.boothStore.booths.filter(t=>t.exhibitors.length===0&&t.bookmarkedDirectly).length}countVisited(){return this.rootStore.exhibitorStore.visited.length+this.rootStore.eventStore.visited.length}getSessionsTotalCount(){return this.rootStore.eventStore.eventItems.length}getGuidedToursTotalCount(){return this.rootStore.toursStore.hasTours?this.rootStore.toursStore.tourItems.length:0}getCategoriesTotalCount(){return this.rootStore.categoryStore.categories.filter(t=>t.exhibitors.length>0).length}getPoiTypeTotalCount(t){return this.rootStore.boothStore.booths.filter(e=>e.poiTypeId===t).length}getExhibitorsTotalCount(){return this.rootStore.exhibitorStore.exhibitors.length}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__esDecorate as n,__runInitializers as
|
|
1
|
+
import{__esDecorate as n,__runInitializers as C}from"tslib";import{action as h}from"mobx";import{getButtonConfig as d}from"./utils";let m=(()=>{let c=[],u,y,g,f,S,F;return class{static{const e=typeof Symbol=="function"&&Symbol.metadata?Object.create(null):void 0;u=[h],y=[h],g=[h],f=[h],S=[h],F=[h],n(this,null,u,{kind:"method",name:"applyAllChildrenFilters",static:!1,private:!1,access:{has:t=>"applyAllChildrenFilters"in t,get:t=>t.applyAllChildrenFilters},metadata:e},null,c),n(this,null,y,{kind:"method",name:"applyChildFilters",static:!1,private:!1,access:{has:t=>"applyChildFilters"in t,get:t=>t.applyChildFilters},metadata:e},null,c),n(this,null,g,{kind:"method",name:"clearAllChildFilters",static:!1,private:!1,access:{has:t=>"clearAllChildFilters"in t,get:t=>t.clearAllChildFilters},metadata:e},null,c),n(this,null,f,{kind:"method",name:"clearCategoryFilters",static:!1,private:!1,access:{has:t=>"clearCategoryFilters"in t,get:t=>t.clearCategoryFilters},metadata:e},null,c),n(this,null,S,{kind:"method",name:"clearPoiTypeFilters",static:!1,private:!1,access:{has:t=>"clearPoiTypeFilters"in t,get:t=>t.clearPoiTypeFilters},metadata:e},null,c),n(this,null,F,{kind:"method",name:"toggleChildFilter",static:!1,private:!1,access:{has:t=>"toggleChildFilter"in t,get:t=>t.toggleChildFilter},metadata:e},null,c),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})}rootStore=C(this,c);state;constructor(e,t){this.rootStore=e,this.state=t}applyAllChildrenFilters(e){if(!e.children)return;const{uiState:t}=this.rootStore,r=e.children.filter(l=>l.visible),{categories:i,poiTypes:s}=this.collectFilters(r);t.selectedCategoryFilters=i,t.selectedPoiTypeFilters=s,t.categoryFilterOpen=i.length>0}applyChildFilters(){const{uiState:e}=this.rootStore,t=Array.from(this.state.searchShortcutState.activeChildren);if(e.selectedCategoryFilters=[],e.selectedPoiTypeFilters=[],e.categoryFilterOpen=!1,t.length===0)return;const r=d(this.state.searchShortcutState.activeParentId);if(!r?.children)return;const i=r.children.filter(o=>o.visible),{categories:s,poiTypes:l}=this.collectSelectedFilters(i,t);e.selectedCategoryFilters=s,e.selectedPoiTypeFilters=l,e.categoryFilterOpen=s.length>0}clearAllChildFilters(){this.state.clearChildren(),this.rootStore.uiState.selectedCategoryFilters=[],this.rootStore.uiState.selectedPoiTypeFilters=[],this.rootStore.uiState.categoryFilterOpen=!1}clearCategoryFilters(){const{uiState:e}=this.rootStore;e.selectedCategoryFilters=[],this.rootStore.categoryFilterStore.state.selectedItems=[],this.rootStore.categoryFilterStore.state.pendingItems=[],this.rootStore.urlFilterManager.setCategories([])}clearPoiTypeFilters(){this.state.setPoiFilter(null),this.rootStore.uiState.selectedPoiTypeFilters=[],this.rootStore.urlFilterManager.setPoiType(null)}toggleChildFilter(e){const t=d(this.state.searchShortcutState.activeParentId);t?.children&&(this.state.toggleChild(e),this.state.hasActiveChildren?this.applyChildFilters():this.applyAllChildrenFilters(t))}getActiveParent(){return this.state.searchShortcutState.activeParentId?d(this.state.searchShortcutState.activeParentId):null}areAllSelected(){if(!this.state.searchShortcutState.activeParentId)return!1;const e=d(this.state.searchShortcutState.activeParentId);if(!e?.children)return!1;const r=e.children.filter(i=>i.visible).filter(i=>i.type!=="link");return r.length>0&&r.every(i=>{const s=i.id?.toString()||i.name;return this.state.isChildActive(s)})}getChildrenCount(){if(!this.state.searchShortcutState.activeParentId)return 0;const e=d(this.state.searchShortcutState.activeParentId);return e?.children?e.children.filter(r=>r.visible).filter(r=>r.type!=="link").length:0}collectFilters(e){const t=[],r=[];return e.forEach(i=>{const s=Number(i.id);if(i.type==="categories"){const l=this.rootStore.categoryStore.categories.find(o=>o.id===s);l&&t.push(l)}else if(i.type==="poi_types"){const l=this.rootStore.poiTypeStore.poiTypes.find(o=>o.id===s);l&&r.push(l)}}),{categories:t,poiTypes:r}}collectSelectedFilters(e,t){const r=[],i=[];return t.forEach(s=>{const l=e.find(a=>a.type==="link"?!1:(a.id?.toString()||a.name)===s);if(!l)return;const o=Number(l.id);if(l.type==="categories"){const a=this.rootStore.categoryStore.categories.find(p=>p.id===o);a&&r.push(a)}else if(l.type==="poi_types"){const a=this.rootStore.poiTypeStore.poiTypes.find(p=>p.id===o);a&&i.push(a)}}),{categories:r,poiTypes:i}}}})();export{m as SearchButtonsFilters};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import
|
|
1
|
+
import{createKiosk as f}from"../components/Kiosk/kioskApi";import{getSavedKiosk as u}from"../components/Kiosk/SetKiosk";import{KIOSK_STATS_ID_STORAGE_KEY as c}from"../components/Kiosk/SetKiosk/constants";import l from"../data";import{getLocationHistory as p}from"../services/routing";import{uiState as d}from"../store";import i from"./logger";import{createTelemetry as g}from"./telemetry";let a;function S(){if(a)return a;const r=window.__efpEvent;let e;try{const t=new URL(l.trackerUrl).searchParams.get("expoId");e=t?Number(t):void 0}catch(t){i.error(t)}return a=g({url:"https://app.expofp.com/api/telemetry",expo:r,expoId:e}),a}function s(r,e){const t=p(),n=t[t.length-2];return{type:r,value:e!==void 0?String(e):"",timestamp:new Date().toISOString(),url:window.location.href,referrer:n?window.location.origin+n:""}}function v(){return!!l?.trackerUrl&&process.env.NODE_ENV==="production"&&!d.heatmap}export default async function k(r,e){if(i.log("trackEvent",r,e),!!v())try{const t=S(),n=u();if(n){const o=await y(n);if(o)t.setKioskId(o);else{t.enqueue(s(r,e));return}}h(t),await t.send(s(r,e))}catch(t){i.error("trackEvent",String(t))}}async function y(r){if(!r)return null;let e=localStorage.getItem(c);return e||(e=await f(r,"https://app.expofp.com/"),e?(localStorage.setItem(c,e),e):null)}let m=!1;function h(r){if(m)return;m=!0;const e="efp-track-events";try{const t=localStorage.getItem(e);if(!t)return;const n=JSON.parse(t);if(!Array.isArray(n)){localStorage.removeItem(e);return}for(const o of n)!o||typeof o!="object"||!o.headers||r.enqueue({type:o.type,value:o.value!==void 0?String(o.value):"",timestamp:o.timeStamp,url:o.headers["X-href"],referrer:o.headers["X-ref"]??""});localStorage.removeItem(e)}catch(t){localStorage.removeItem(e),i.error("Failed to migrate old events.",String(t))}}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@expofp/floorplan",
|
|
3
|
-
"version": "3.7.
|
|
3
|
+
"version": "3.7.3",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "https://github.com/expofp/efp-app.git",
|
|
@@ -73,8 +73,8 @@
|
|
|
73
73
|
"tslib": "^2.3.0",
|
|
74
74
|
"uuid": "^9.0.1",
|
|
75
75
|
"zod": "4.3.5",
|
|
76
|
-
"@expofp/
|
|
77
|
-
"@expofp/
|
|
76
|
+
"@expofp/debug": "3.7.3",
|
|
77
|
+
"@expofp/resolve": "3.7.3"
|
|
78
78
|
},
|
|
79
79
|
"devDependencies": {
|
|
80
80
|
"@babel/plugin-proposal-decorators": "^7.29.7",
|
|
@@ -1,26 +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.7.1" };
|
|
5
|
-
var t = new e.Error().stack;
|
|
6
|
-
t && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[t] = "accadd55-acdf-4561-953c-6a459d8920f4", e._sentryDebugIdIdentifier = "sentry-dbid-accadd55-acdf-4561-953c-6a459d8920f4");
|
|
7
|
-
} catch {}
|
|
8
|
-
})();
|
|
9
|
-
import "./rolldown-runtime-CHynt3ZH.js";
|
|
10
|
-
import { t as e } from "./react-CXBSzFGH.js";
|
|
11
|
-
import { t } from "./jsx-runtime-CCjvPhTZ.js";
|
|
12
|
-
import "./i18n-DWUkHBly.js";
|
|
13
|
-
import { T as n, o as r, un as i, w as a } from "./store-CoBm8UFz.js";
|
|
14
|
-
import { n as o } from "./mobx-Crx8xVu_.js";
|
|
15
|
-
import { t as s } from "./KioskStore-37p-3HM2.js";
|
|
16
|
-
import { t as c } from "./TouchHand-8ZopG2q8.js";
|
|
17
|
-
e();
|
|
18
|
-
var l = t(), u = i(() => (o(() => {
|
|
19
|
-
if (localStorage.getItem("kiosk") === "0") return;
|
|
20
|
-
let e = s.restoreData();
|
|
21
|
-
if (e) return a(e, !0), n(e), r.setResetCameraFn(() => s.resetCamera()), () => {
|
|
22
|
-
r.uiState.setKioskData(null), r.uiState.resetMapSettings(), s.resetCamera();
|
|
23
|
-
};
|
|
24
|
-
}), r.uiState.kiosk && r.uiState.inIdle ? /* @__PURE__ */ (0, l.jsx)(c, {}) : null));
|
|
25
|
-
//#endregion
|
|
26
|
-
export { u as default };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export async function requestKioskKey(o,t){let s;try{const e=new URL("/api/kiosks",t);e.searchParams.set("expoKey",window.__efpEvent),s=(await(await fetch(e.toString(),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(o)})).json()).key}catch(e){console.error("requestKioskKey",e)}finally{return s}}
|