@expofp/floorplan 3.25.2 → 3.26.0
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-DZ5RJVoX.js → Button-DI5g1CPS.js} +5 -5
- package/dist/browser/{CookieConsent-CNE-7zNI.js → CookieConsent-Qws_nQ3N.js} +7 -7
- package/dist/browser/{Debug-TDQ_xzea.js → Debug-DTNPNDds.js} +7 -7
- package/dist/browser/{Demo-A0X5mRqG.js → Demo-BDZjOBQc.js} +9 -9
- package/dist/browser/{Free-BjYK0xDM.js → Free-Cage9TkV.js} +9 -9
- package/dist/browser/{GalleryContainer-BsQuHOrj.js → GalleryContainer-EeLKgziN.js} +10 -10
- package/dist/browser/{GpsLoader-DoutzmU_.js → GpsLoader-CJMX_mJN.js} +11 -11
- package/dist/browser/{KioskStore-CRN9B487.js → KioskStore-BSza48xl.js} +24 -24
- package/dist/browser/{MaplibreAdapter-W1ZdQQ00.js → MaplibreAdapter-evVQiVQj.js} +245 -245
- package/dist/browser/{ModalContainer-BfZm0B_L.js → ModalContainer-CTKDfIyR.js} +10 -10
- package/dist/browser/{PermissionNotice-Cm6qrOC_.js → PermissionNotice-O469DuWb.js} +6 -6
- package/dist/browser/{SetKioskMode-BlmUmBkH.js → SetKioskMode-DUk4c-Gs.js} +11 -11
- package/dist/browser/{ShowKiosk-B0cj0p6h.js → ShowKiosk-DumFiuHU.js} +10 -10
- package/dist/browser/{ViewerMenuPanel-FFmV-n9m.js → ViewerMenuPanel-ByFemA_T.js} +10 -10
- package/dist/browser/{add-debug-secret-listener-BOW3NQe7.js → add-debug-secret-listener-TLumKuSo.js} +1 -1
- package/dist/browser/{adopt-global-settings-DNTNdr3z.js → adopt-global-settings-ghJrZaU5.js} +9 -9
- package/dist/browser/{boolean-editor-Bx4HLLyu.js → boolean-editor-WIpm-pFP.js} +9 -9
- package/dist/browser/{bootIntercom-C_8HLvxg.js → bootIntercom-BR_Ehbyl.js} +2 -2
- package/dist/browser/{booth-by-xy-DgXTlV8u.js → booth-by-xy-CyZpg1Fn.js} +287 -287
- package/dist/browser/bundle.json +65 -65
- package/dist/browser/{classnames-DovQg6we.js → classnames-BmlkHMS8.js} +2 -2
- package/dist/browser/{client-CadlVOps.js → client-CIHxJZmk.js} +4 -4
- package/dist/browser/{components-BK-czcTL.js → components-7lxOhyyi.js} +1911 -1902
- package/dist/browser/{debug-overlay-vFTynZrP.js → debug-overlay-B7jCqVlX.js} +10 -10
- package/dist/browser/{debug-ui-BgSppEQg.js → debug-ui-D1ApG52e.js} +6 -6
- package/dist/browser/{dist-CkAU9dsV.js → dist-BrF5yJyj.js} +5 -5
- package/dist/browser/{dist-C1WQpGAq.js → dist-C67OkD_4.js} +6 -6
- package/dist/browser/{dist-gIYlJ33F.js → dist-CnpnDA-V.js} +3 -3
- package/dist/browser/{efp-debug-init-CGEJSmuk.js → efp-debug-init-BqEN61Fo.js} +3 -3
- package/dist/browser/{enum-editor-BZXgS3I-.js → enum-editor-Cy6VeZZd.js} +4 -4
- package/dist/browser/{es5-DoqUhz95.js → es5-DyV1fctu.js} +2 -2
- package/dist/browser/{event-not-found-Dl66nXH1.js → event-not-found-BpFVdXz_.js} +1 -1
- package/dist/browser/{exports-CK5UTqgq.js → exports-C7NzL4lf.js} +1 -1
- package/dist/browser/{favicon-BnTLQysW.js → favicon-BHscWjwp.js} +1 -1
- package/dist/browser/{fetch-retry.umd-D_tGjwEb.js → fetch-retry.umd-BytZeydp.js} +2 -2
- package/dist/browser/{flex-BCrAgMxK.js → flex-BQBLAC6l.js} +5 -5
- package/dist/browser/{floorplan.loader-DXJR9eeS.js → floorplan.loader-DkaQPhwC.js} +10 -10
- package/dist/browser/{floorplan.ready-C0sdmceF.js → floorplan.ready-DwuXZphI.js} +158 -158
- package/dist/browser/{fuse-C7evxCwi.js → fuse-DZTwJ52u.js} +2 -2
- package/dist/browser/{i18n-Cp32ZzDq.js → i18n-Bcv8xw_q.js} +5 -5
- package/dist/browser/index.js +14 -14
- package/dist/browser/{index.module-CeDH7KeK.js → index.module-BFxDVa3K.js} +4 -4
- package/dist/browser/{integrateKiosk-JZG1AZBF.js → integrateKiosk-VTNZSSfD.js} +4 -4
- package/dist/browser/{is-webview-Be9due3O.js → is-webview-CjItzxdV.js} +1 -1
- package/dist/browser/{jsx-runtime-DwNSQYOA.js → jsx-runtime-CT2c-IhD.js} +2 -2
- package/dist/browser/{kiosk-record-BMwfA16j.js → kiosk-record-v7r7q7t0.js} +1 -1
- package/dist/browser/{lib-DeQ47J_S.js → lib-DGh8lZgT.js} +3 -3
- package/dist/browser/{loadImage-DVBOry5-.js → loadImage-a_ahClbD.js} +4 -4
- package/dist/browser/{logDeviceInfo-uPn7yfGH.js → logDeviceInfo-DHfa6NcE.js} +9 -9
- package/dist/browser/{main-WTEdqNkt.js → main-sUuehgQu.js} +1 -1
- package/dist/browser/{mobx-DFFcUY2e.js → mobx-dAtztuiQ.js} +4 -4
- package/dist/browser/{optional-boolean-editor-DfcaW7-l.js → optional-boolean-editor-D43-yLO3.js} +3 -3
- package/dist/browser/{optional-enum-editor-SEARu4hs.js → optional-enum-editor-Cvn8TV-x.js} +4 -4
- package/dist/browser/{optional-string-editor-COLkp8EA.js → optional-string-editor-sY0yVw_j.js} +4 -4
- package/dist/browser/{particles.min-DHvuM5ou.js → particles.min-BD7iDSr6.js} +2 -2
- package/dist/browser/{react-BNCBBLDK.js → react-BJopqGbW.js} +2 -2
- package/dist/browser/{react-dom-ql8ZgjdB.js → react-dom-B77nDdqp.js} +3 -3
- package/dist/browser/{rolldown-runtime-D0mAPq9J.js → rolldown-runtime-BmHtYG9i.js} +1 -1
- package/dist/browser/{select-CwB0Zi7C.js → select-ByU-Ym6-.js} +10 -10
- package/dist/browser/{settings-MzAuoQZ6.js → settings-CEH1i0Pj.js} +2 -2
- package/dist/browser/{settings-item-Ca6s5CDf.js → settings-item-_PTji9Bz.js} +6 -6
- package/dist/browser/{store-B_c3r86U.js → store-Oj0dGPnb.js} +1098 -1037
- package/dist/browser/{string-editor-BjOeNcgJ.js → string-editor-DaF1t7MK.js} +4 -4
- package/dist/browser/{text-field-6Ccfbuuo.js → text-field-XRLZPyNV.js} +5 -5
- package/dist/browser/{theme-XlV0fBPc.js → theme-D0OZcdto.js} +8 -8
- package/dist/browser/{ui-BopruaHZ.js → ui-7ozfXlN3.js} +8 -8
- package/dist/browser/{useRenderTarget-CdH-VI6E.js → useRenderTarget-BG295f3e.js} +4 -4
- package/dist/esm/components/Booth/Booth.js +1 -1
- package/dist/esm/components/Event.js +1 -1
- package/dist/esm/components/Exhibitor.js +1 -1
- package/dist/esm/components/Layout.js +1 -1
- package/dist/esm/components/Speaker.js +1 -1
- package/dist/esm/floorplan.ready.js +1 -1
- package/dist/esm/services/url-sync.js +1 -1
- package/dist/esm/store/HeatmapStore.d.ts +9 -0
- package/dist/esm/store/RootStore.js +1 -1
- package/dist/esm/store/ShortcutRegistry.d.ts +14 -0
- package/dist/esm/store/ShortcutRegistry.js +1 -1
- package/dist/esm/store/providers/SessionsSubButtonProvider.d.ts +18 -0
- package/dist/esm/store/providers/SessionsSubButtonProvider.js +1 -1
- package/dist/esm/store/search-buttons/SearchButtonsActions.d.ts +15 -2
- package/dist/esm/store/search-buttons/SearchButtonsActions.js +1 -1
- package/dist/esm/store/search-buttons/SearchButtonsFactory.js +1 -1
- package/dist/esm/store/search-buttons/SearchButtonsStore.d.ts +3 -3
- package/dist/esm/store/search-buttons/SearchButtonsStore.js +1 -1
- package/dist/esm/tools/gtag.d.ts +1 -0
- package/dist/esm/tools/gtag.js +1 -1
- package/dist/esm/tools/telemetry.d.ts +2 -0
- package/dist/esm/tools/telemetry.js +1 -1
- package/dist/esm/tools/track-event.d.ts +26 -2
- package/dist/esm/tools/track-event.js +1 -1
- package/package.json +9 -9
|
@@ -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.
|
|
4
|
+
e.SENTRY_RELEASE = { id: "3.26.0" };
|
|
5
5
|
var t = new e.Error().stack;
|
|
6
6
|
t && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[t] = "0a67f4c1-0ef6-428f-92c6-94c57178bf21", e._sentryDebugIdIdentifier = "sentry-dbid-0a67f4c1-0ef6-428f-92c6-94c57178bf21");
|
|
7
7
|
} catch {}
|
|
8
8
|
})();
|
|
9
|
-
import { t as e } from "./jsx-runtime-
|
|
10
|
-
import { t } from "./settings-item-
|
|
11
|
-
import { t as n } from "./text-field-
|
|
9
|
+
import { t as e } from "./jsx-runtime-CT2c-IhD.js";
|
|
10
|
+
import { t } from "./settings-item-_PTji9Bz.js";
|
|
11
|
+
import { t as n } from "./text-field-XRLZPyNV.js";
|
|
12
12
|
//#region ../debug/src/lib/ui/string-editor.tsx
|
|
13
13
|
var r = e(), i = (e) => {
|
|
14
14
|
var i;
|
|
@@ -1,15 +1,15 @@
|
|
|
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.
|
|
4
|
+
e.SENTRY_RELEASE = { id: "3.26.0" };
|
|
5
5
|
var t = new e.Error().stack;
|
|
6
6
|
t && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[t] = "9c5a0877-c176-4e2d-b51c-123d50ab2b3c", e._sentryDebugIdIdentifier = "sentry-dbid-9c5a0877-c176-4e2d-b51c-123d50ab2b3c");
|
|
7
7
|
} catch {}
|
|
8
8
|
})();
|
|
9
|
-
import { r as e } from "./rolldown-runtime-
|
|
10
|
-
import { t } from "./react-
|
|
11
|
-
import { D as n, i as r, l as i, n as a, s as o, u as s, y as c } from "./flex-
|
|
12
|
-
import { t as l } from "./classnames-
|
|
9
|
+
import { r as e } from "./rolldown-runtime-BmHtYG9i.js";
|
|
10
|
+
import { t } from "./react-BJopqGbW.js";
|
|
11
|
+
import { D as n, i as r, l as i, n as a, s as o, u as s, y as c } from "./flex-BQBLAC6l.js";
|
|
12
|
+
import { t as l } from "./classnames-BmlkHMS8.js";
|
|
13
13
|
//#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._5ea800d4e947acedb1fa1275f1697b17/node_modules/@radix-ui/themes/dist/esm/components/text-field.props.js
|
|
14
14
|
var u = /* @__PURE__ */ e(t()), d = /* @__PURE__ */ e(l()), f = {
|
|
15
15
|
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.
|
|
4
|
+
e.SENTRY_RELEASE = { id: "3.26.0" };
|
|
5
5
|
var t = new e.Error().stack;
|
|
6
6
|
t && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[t] = "f658045a-5be7-4ea4-a4b2-ddea9ab9caf3", e._sentryDebugIdIdentifier = "sentry-dbid-f658045a-5be7-4ea4-a4b2-ddea9ab9caf3");
|
|
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-BmHtYG9i.js";
|
|
10
|
+
import { t } from "./react-BJopqGbW.js";
|
|
11
|
+
import { t as n } from "./jsx-runtime-CT2c-IhD.js";
|
|
12
|
+
import { t as r } from "./react-dom-B77nDdqp.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-BQBLAC6l.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-C67OkD_4.js";
|
|
15
|
+
import { t as y } from "./classnames-BmlkHMS8.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_cffccd7838985066e8e1d993b5cb6017/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.
|
|
4
|
+
e.SENTRY_RELEASE = { id: "3.26.0" };
|
|
5
5
|
var t = new e.Error().stack;
|
|
6
6
|
t && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[t] = "3c34ab8b-5d65-4c06-8595-6ed371acabc5", e._sentryDebugIdIdentifier = "sentry-dbid-3c34ab8b-5d65-4c06-8595-6ed371acabc5");
|
|
7
7
|
} catch {}
|
|
8
8
|
})();
|
|
9
|
-
import { r as e } from "./rolldown-runtime-
|
|
10
|
-
import { a as t, i as n, s as r } from "./efp-debug-init-
|
|
11
|
-
import { a as i, i as a } from "./adopt-global-settings-
|
|
12
|
-
import { t as o } from "./jsx-runtime-
|
|
13
|
-
import "./settings-
|
|
14
|
-
import { t as s } from "./add-debug-secret-listener-
|
|
9
|
+
import { r as e } from "./rolldown-runtime-BmHtYG9i.js";
|
|
10
|
+
import { a as t, i as n, s as r } from "./efp-debug-init-BqEN61Fo.js";
|
|
11
|
+
import { a as i, i as a } from "./adopt-global-settings-ghJrZaU5.js";
|
|
12
|
+
import { t as o } from "./jsx-runtime-CT2c-IhD.js";
|
|
13
|
+
import "./settings-CEH1i0Pj.js";
|
|
14
|
+
import { t as s } from "./add-debug-secret-listener-TLumKuSo.js";
|
|
15
15
|
//#region ../debug/src/lib/ui/render-debug-ui.tsx
|
|
16
16
|
var c = /* @__PURE__ */ e(r(), 1), l = o(), u = !1;
|
|
17
17
|
function d() {
|
|
@@ -26,7 +26,7 @@ function d() {
|
|
|
26
26
|
}
|
|
27
27
|
});
|
|
28
28
|
let o = async (t) => {
|
|
29
|
-
let { DebugUi: n } = await import("./debug-ui-
|
|
29
|
+
let { DebugUi: n } = await import("./debug-ui-D1ApG52e.js"), { createRoot: i } = await import("./client-CIHxJZmk.js").then((t) => /* @__PURE__ */ e(t.default, 1)), a = document.createElement("div");
|
|
30
30
|
document.body.appendChild(a), i(a).render(/* @__PURE__ */ (0, l.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.
|
|
4
|
+
e.SENTRY_RELEASE = { id: "3.26.0" };
|
|
5
5
|
var t = new e.Error().stack;
|
|
6
6
|
t && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[t] = "7407e64e-4c4e-4bfb-b2ef-80063ad22998", e._sentryDebugIdIdentifier = "sentry-dbid-7407e64e-4c4e-4bfb-b2ef-80063ad22998");
|
|
7
7
|
} catch {}
|
|
8
8
|
})();
|
|
9
|
-
import { r as e } from "./rolldown-runtime-
|
|
10
|
-
import { t } from "./react-
|
|
11
|
-
import { l as n } from "./store-
|
|
9
|
+
import { r as e } from "./rolldown-runtime-BmHtYG9i.js";
|
|
10
|
+
import { t } from "./react-BJopqGbW.js";
|
|
11
|
+
import { l as n } from "./store-Oj0dGPnb.js";
|
|
12
12
|
//#region ../ui/src/shared/activeElement.ts
|
|
13
13
|
var r = (e) => !!e && "activeElement" in e;
|
|
14
14
|
function i(e) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Fragment as b,jsx as
|
|
1
|
+
import{Fragment as b,jsx as t,jsxs as m}from"react/jsx-runtime";import"./Booth.scss";import{observer as p,useLocalStore as y}from"mobx-react-lite";import{useEffect as _,useRef as x}from"react";import l from"../../data";import c,{uiState as i}from"../../store";import{RegularBooth as N,SpecialBooth as E}from"../../store/BoothStore";import S from"../../tools/settings";import C from"../../tools/track-event";import{t as T}from"../../utils/i18n";import I from"../../utils/useHeatmapOverlay";import{LevelBadge as L}from"../";import j from"../EntityItemContainer";import H from"../Schedule";import A from"../SidebarActionsContainer";import{BoothOnHold as M}from"./BoothOnHold";import{BoothReserved as U}from"./BoothReserved";import{BoothWithoutExhibitor as k}from"./BoothWithoutExhibitor";const F=p(()=>{const d=x(),e=y(()=>({get booth(){return i.selectedBooth},get regular(){return this.booth instanceof N?this.booth:null},get special(){return this.booth instanceof E?this.booth:null},get showReserve(){return!i.kiosk&&this.regular&&(this.regular.price==="0"&&!!this.regular.buyUrl||!!this.regular.reserveUrl)},get showBuy(){return!i.kiosk&&this.regular&&this.regular.buyUrl&&this.regular.price&&this.regular.price!=="0"},get title(){return this.booth.fullName},get reserveTitle(){return l.reserveButtonTerm||T("Reserve")},get descriptionCombined(){return this.booth.description||l.reserveInstructions||""}}));_(()=>{if(e.booth.schedule?.length){const o=new Date,r=[...e.booth.schedule].sort((n,s)=>new Date(n.startDate).getTime()-new Date(s.startDate).getTime());if(r.some(n=>(n.endDate?new Date(n.endDate):new Date(n.startDate))<o)){const n=r.find(s=>(s.endDate?new Date(s.endDate):new Date(s.startDate))>o);if(n&&d.current){const s=d.current.querySelector(`[data-event-id="${n.id}"]`);s&&setTimeout(()=>{const f=d.current.getBoundingClientRect(),R=s.getBoundingClientRect().top-f.top-20;d.current.scrollTop=R},100)}}}},[e.booth.schedule]);function v(o){const r=parseInt(o);c.clickExhibitor(c.exhibitorStore.exhibitors.find(g=>g.id===r))}function B(o){c.selectEventItem(o,!0)}function D(){e.booth.exhibitors.length===0&&(e.booth.bookmarkedDirectly=!e.booth.bookmarkedDirectly,e.booth.bookmarkedDirectly&&C("bookmark",e.booth.name,"booth"))}const O=t("div",{className:"booth__bar",children:e.title});let a=null;const h=e.booth.layer?.description,{heatmapBar:w}=I(e.booth),u=e.booth.exhibitors.sort((o,r)=>+!!r.featured-+!!o.featured).map(o=>t(j,{onClick:v,id:o.id.toString(),featured:o.featured,kind:"exhibitor",image:o.logo?.url,title:o.name,bookmarked:o.bookmarked,visited:o.visited,additionalInfo:o.booths.map(r=>({type:"location",locationName:r.name,level:h||r.layer?.name}))},o.id.toString()));if(l.isRebooking)a=t(b,{children:u});else if(e.regular){const o=e.regular;o.onHold?a=t(M,{booth:o,description:"",showBuy:!1,showReserve:!1,isRebooking:!1,level:h}):o.reserved?a=t(U,{}):o.exhibitors.length===0?a=t(k,{booth:o,description:e.descriptionCombined,showBuy:!i.previewMode&&e.showBuy,showReserve:!i.previewMode&&e.showReserve,isRebooking:!1,level:h}):a=t(b,{children:u})}else a=m("div",{className:"booth__content -spec",children:[t(L,{level:h}),t("div",{className:"booth__desc",dangerouslySetInnerHTML:{__html:e.special.description}}),t(b,{children:u})]});return m("div",{className:"booth",children:[m("div",{className:"booth__header",children:[m("div",{className:"booth__header-name",children:[t("div",{className:"booth__header-icon",children:t("i",{className:"icon-booth-solid"})}),t("span",{dir:"auto",children:e.title}),w]}),t("button",{type:"button",onClick:()=>c.searchStore.handleBackAction(),className:"booth__header-close",children:t("i",{className:"icon-close"})})]}),!l.isRebooking&&S.wayfinding&&!i.isGuidedToursActive&&t("div",{className:"exhibitor__directions",style:{paddingLeft:15,paddingRight:15},children:t(A,{showBookmark:!i.disableBookmarked&&!l.hideBookmarks&&!i.kiosk&&e.booth.exhibitors.length===0,showShare:!1,inBookmark:e.booth.exhibitors.length===0?e.booth.bookmarkedDirectly:!1,onClickBookmark:D,onClickDirections:()=>{c.routeStore.clickRoute(null,e.booth)}})}),a,l.isRebooking&&e.regular&&e.regular.exhibitors.length===0&&t(k,{showBuy:!1,description:e.descriptionCombined,showReserve:!1,booth:e.regular,isRebooking:l.isRebooking,level:h}),!!e.booth.schedule?.length&&t(H,{isSessions:!0,showBooths:!0,events:[...e.booth.schedule].sort((o,r)=>new Date(o.startDate).getTime()-new Date(r.startDate).getTime()),onEventClick:B})]})});export default p(()=>!i.menu&&i.selectedBooth?t(F,{}):null);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Fragment as I,jsx as e,jsxs as l}from"react/jsx-runtime";import"./Event.scss";import{Button as M}from"@expofp/ui";import c from"classnames";import g from"dateformat";import{observer as T,useLocalStore as x,useObserver as F}from"mobx-react-lite";import{useEffect as O,useRef as C,useState as y}from"react";import
|
|
1
|
+
import{Fragment as I,jsx as e,jsxs as l}from"react/jsx-runtime";import"./Event.scss";import{Button as M}from"@expofp/ui";import c from"classnames";import g from"dateformat";import{observer as T,useLocalStore as x,useObserver as F}from"mobx-react-lite";import{useEffect as O,useRef as C,useState as y}from"react";import k from"../data";import a,{uiState as s}from"../store";import{GaEventActions as m,sendEventToGa as v}from"../tools/gtag";import H from"../tools/settings";import j from"../tools/track-event";import{useReaction as A}from"../utils/mobx";import V from"../utils/sanitizeHtml";import B from"./EventBadgeContainer";import G from"./ShowMoreButtonContainer";import L from"./SidebarActionsContainer";import{getDescription as R}from"./utils/getDescription";function K(){const o=C(null),n=x(()=>({collapsed:!0,updateOverlayContent:null,get event(){return s.selectedEventItem},get booth(){return this.event?.boothId?a.boothStore.boothById.get(this.event.boothId):null},get disableCollapse(){return(this.event?.description||"").length<800}})),[u,D]=y(!1),[h,_]=y(!1),f=C(null);O(()=>{(()=>{if(f.current){const r=f.current.offsetHeight;D(r>300)}})()},[]),A(()=>n.event,()=>{o.current&&o.current.parentElement&&(o.current.parentElement.scrollTop=0),n.collapsed=!0,_(!1)});function J(t,r){if(b(r),s.kiosk)return t.preventDefault()}function b(t){n.event&&v(t,n.event.name)}const N=t=>{const r=a.sessionsFilterStore.state.filters.use24hFormat.value,p=new Date(t);return g(p,r?"HH:MM":"h:MMtt")},w=t=>{const r=new Date(t);return g(r,"dddd, mmmm d, yyyy")};return F(()=>{const t=n.event;if(!t)return null;const r=l(I,{children:[e("div",{className:"efp-event__bar",children:e("span",{onClick:()=>a.toggleMapOverlay(),children:l("div",{className:"efp-event__bar-name",children:[e("div",{className:"efp-event__bar-icon",children:e("i",{className:"icon-event-solid"})}),l("span",{dir:"auto",children:[t.name,e(B,{event:t})]})]})})}),e("div",{className:"efp-event__bar-booth",onClick:()=>a.toggleMapOverlay(),children:k.boothTerm})]}),p=()=>{n.collapsed=!1,setTimeout(n.updateOverlayContent)};function P(i,d){return!i||!d||s.kiosk||s.previewMode?null:e("div",{className:"event-custom-button",children:e(M,{link:d,inline:!0,onClick:E=>{E.preventDefault(),b(m.ClickCustomButton),window.open(d,"_blank","noopener,noreferrer")},target:"_blank",children:i})})}const S=c({"efp-event":!0,[s.responsiveClass]:!0});return l("div",{className:S,children:[l("div",{className:"efp-event__header",children:[l("div",{className:"efp-event__header-name",children:[e("div",{className:"efp-event__header-icon",children:e("i",{className:"icon-event-solid"})}),l("span",{dir:"auto",children:[t.name,e(B,{event:t})]})]}),e("button",{type:"button",onClick:()=>a.searchStore.handleBackAction(),className:"efp-event__header-close",children:e("i",{className:"icon-close"})})]}),e("div",{className:"efp-event__buttons",children:!s.isGuidedToursActive&&e(L,{showBookmark:!s.disableBookmarked&&!k.hideBookmarks&&!s.kiosk,showDirections:n.booth&&H.wayfinding,inBookmark:n.event?.bookmarked||!1,showShare:!0,showVisited:!s.kiosk,visited:n.event?.visited||!1,onClickBookmark:z,onClickShare:$,onClickDirections:()=>{n.booth&&a.routeStore.clickRoute(null,n.booth)},onClickVisited:W})}),l("div",{className:c("efp-event__details",{"details-hidden":s.kiosk&&u&&!h}),ref:f,children:[l("div",{className:c("efp-event-booths",{"is-links-disabled":s.isGuidedToursActive}),children:[n.booth&&l("a",{href:`?${n.booth.slug}`,onClick:i=>{i.preventDefault(),a.toggleMapOverlay(),a.selectBooth(n.booth)},className:"efp-event-booths__booth",children:[e("div",{className:"efp-event-booths__booth-name",children:n.booth.name}),n.booth.layer&&e("div",{className:"efp-event-categories__booth-level",children:k.shortLevelName?n.booth.layer.shortName:n.booth.layer.description})]}),t.hasTracks&&t.tracks.map(i=>e("div",{className:"efp-event-booths__track",children:i.name},i.id))]}),l("div",{className:"efp-event-list",children:[l("div",{className:"efp-event-list__block",children:[e("div",{className:"efp-event-list__block-icon",children:e("i",{className:"icon-event-solid"})}),e("div",{className:"efp-event-list__block-content",children:e("div",{className:"efp-event-list__block-item",children:l("div",{className:"efp-event-list__block-info",children:[e("div",{className:"efp-event-list__block-title",children:w(t.startDate)}),l("div",{className:"efp-event-list__block-description",children:[N(t.startDate)," to"," ",t.endDate?N(t.endDate):"-"]})]})})})]}),t.hasSpeakers&&l("div",{className:"efp-event-list__block",children:[e("div",{className:"efp-event-list__block-icon",children:e("i",{className:"icon-speaker-solid"})}),e("div",{className:"efp-event-list__block-content",children:t.speakers.map(i=>l("a",{href:`?${i.slug}`,onClick:d=>{d.preventDefault(),a.selectSpeaker(i,!0)},className:"efp-event-list__block-item efp-event-list__block-item--clickable",children:[i.photoFile&&e("div",{className:"efp-event-list__block-avatar",children:e("img",{src:i.photoFile,alt:i.name})}),l("div",{className:"efp-event-list__block-info",children:[e("div",{className:"efp-event-list__block-title",children:i.name}),l("div",{className:"efp-event-list__block-description",children:[i.company&&e("strong",{children:i.company}),i.jobTitle&&e("span",{children:i.jobTitle})]})]})]},i.id))})]})]}),(t.description||t.logoFile)&&l("div",{className:c("efp-event-description",{collapsed:n.collapsed&&!n.disableCollapse&&!s.kiosk}),children:[t.logoFile&&e("div",{className:c("efp-event-description__logo",{"efp-event-description__logo--left":!t.description}),children:e("img",{src:t.logoFile,alt:t.name,crossOrigin:"anonymous"})}),t.description&&e("span",{className:"event-description__content",dir:"auto",dangerouslySetInnerHTML:{__html:V(R(t.description))},onClick:p})]})]}),s.kiosk&&u&&e(G,{className:c("efp-event__show-more",{"is-sticky":h}),expanded:h,onClick:()=>_(i=>!i)})]})})}function $(){const o=s.selectedEventItem;o&&(v(m.ClickCustomButton,o.name),a.toggleModal("share"))}function z(){const o=s.selectedEventItem;o&&(o.bookmarked=!o.bookmarked,s.onBookmarkClick&&s.onBookmarkClick({name:o.name,bookmarked:o.bookmarked,externalId:o.externalId}),v(m.ClickBookmark,o.name),o.bookmarked&&j("bookmark",o.name,"session"))}function W(){const o=s.selectedEventItem;o&&(o.visited=!o.visited,s.onVisitedClick&&s.onVisitedClick({name:o.name,visited:o.visited,externalId:o.externalId}),v(m.ClickCustomButton,o.name))}const q=T(()=>s.selectedEventItem?e(K,{}):null);export default q;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Fragment as N,jsx as i,jsxs as n}from"react/jsx-runtime";import"./Exhibitor.scss";import{Button as R}from"@expofp/ui";import g from"classnames";import{observer as Q,useLocalStore as Z,useObserver as T}from"mobx-react-lite";import ee,{Suspense as D,useEffect as ie,useRef as C,useState as I}from"react";import{Transition as te}from"react-transition-group";import p from"../data";import a,{uiState as o}from"../store";import{RegularBooth as oe}from"../store/BoothStore";import{GaEventActions as d,sendEventToGa as O}from"../tools/gtag";import re from"../tools/logger";import y from"../tools/settings";import{t as h}from"../utils/i18n";import ne from"../utils/is-mobile";import{useReaction as ae}from"../utils/mobx";import se from"../utils/useHeatmapOverlay";import le from"./AlertContainer";import ce from"./DownloadListContainer";import U from"./ErrorBoundary";import de from"./RebookingNotesContainer";import he from"./RebookingRadioGroupContainer";import me from"./Schedule";import ue from"./ShowMoreButtonContainer";import be from"./SidebarActionsContainer";import{getDescription as ke}from"./utils/getDescription";const G=ee.lazy(()=>import("./GalleryContainer")),ge=Q(function(){const S=C(null),r=Z(()=>({collapsed:!0,updateOverlayContent:null,get exhibitor(){return o.selectedExhibitor},get websiteTrimmed(){return this.exhibitor.website?this.exhibitor.website.replace(/^(http(s?):\/\/)([^/]+)(\/)?$/i,"$3"):""},get anySocial(){return o.kiosk?!1:!!["facebook","instagram","linkedin","twitter","googlePlus","xing","youtube"].find(e=>this.exhibitor[e])},get anyAddress(){return!!["address","address2","phone1","website","email"].find(e=>this.exhibitor[e])},get anyMedia(){return!!this.exhibitor.videoUrl||!!(this.exhibitor.gallery&&this.exhibitor.gallery.length)},get anyButtons(){return!!(this.exhibitor.customButtonTitle||this.exhibitor.customButton2Title||this.exhibitor.customButton3Title)},get disableCollapse(){return!this.anySocial&&!this.anyAddress&&!this.anyMedia&&!this.anyButtons||o.overlayPosition==="left"&&(this.exhibitor.description||"").length<800},get showEdit(){return!!(p.sendLoginLinkUrl&&this.sendLinkEmail)},get sendLinkEmail(){return this.exhibitor.privateEmail||this.exhibitor.email}})),{heatmapBar:A}=se(r.exhibitor),[w,z]=I(!1),[f,M]=I(!1),x=C(null);ie(()=>((()=>{if(x.current){const c=x.current.offsetHeight;z(c>300)}})(),()=>{a.exhibitorStore.rebookingStateChangeRequested=!1}),[]),ae(()=>r.exhibitor,()=>{S.current&&(S.current.parentElement.scrollTop=0),r.collapsed=!0});function _(e,c){if(u(c),o.kiosk)return e.preventDefault()}function H(e,c,m){O(d.ClickCustomButton,r.exhibitor.name);const b={externalId:r.exhibitor.externalId,buttonNumber:e,buttonUrl:c,preventDefault:m.preventDefault.bind(m)};o.onExhibitorCustomButtonClick&&o.onExhibitorCustomButtonClick(b)}function u(e){O(e,r.exhibitor.name)}const B=C(),V={entering:{opacity:1},entered:{opacity:1},exiting:{opacity:0},exited:{opacity:0}},E=150;return T(()=>{const e=r.exhibitor,c=p.isRebooking?(()=>{const t=new Set;for(const s of e.booths)s instanceof oe&&s.size&&t.add(s.size);const l=Array.from(t);return n("div",{children:[l.length>0&&i("div",{className:"booth__infos",style:{padding:"0 15px",marginBottom:"1rem"},children:n("div",{className:"booth__info",children:[i("div",{className:"booth__info-icon",children:i("i",{className:"icon-size"})}),n("div",{className:"booth__info-body",children:[i("div",{className:"booth__info-title",children:h("Size")}),i("div",{className:"booth__info-val",children:l.join(", ")})]})]})}),i(he,{value:e.rebookingState.toString(),onChange:s=>a.exhibitorStore.setRebookingState(e,parseInt(s),e.rebookingNote)}),i(de,{value:e.rebookingNote||"",onSave:s=>a.exhibitorStore.setRebookingState(e,e.rebookingState,s)},e.id),i(te,{in:a.exhibitorStore.rebookingStateChangeRequested,nodeRef:B,timeout:E,appear:!0,enter:!0,exit:!0,mountOnEnter:!0,unmountOnExit:!0,children:s=>i("div",{ref:B,style:{position:"fixed",bottom:"1rem",left:"1rem",zIndex:9999,transition:`opacity ${E}ms ease-in-out`,opacity:0,...V[s]},children:i(le,{title:a.exhibitorStore.rebookingStateSaved?h("Changes saved"):h("Oops! Something went wrong"),variant:a.exhibitorStore.rebookingStateSaved?"success":"error",inline:!0,closable:!0,onClose:()=>{a.exhibitorStore.rebookingStateChangeRequested=!1}})})})]})})():null,m=g({exhibitor:!0,"is-featured":e.featured,bookmarked:e.bookmarked,[o.responsiveClass]:!0}),b=()=>{r.collapsed=!1,setTimeout(r.updateOverlayContent)};function k(t,l,s){return!t||!l||o.kiosk||o.previewMode?null:i("div",{className:"exhibitor-custom-button",children:i(R,{link:l,inline:!0,onClick:v=>{H(s,l,v)},target:"_blank",children:t})},s)}const X=({exhibitor:t})=>{const s=[k(t.customButtonTitle,t.customButtonUrl,1),k(t.customButton2Title,t.customButton2Url,2),k(t.customButton3Title,t.customButton3Url,3)].filter(Boolean);return s.length===0?null:i("div",{className:"exhibitor-custom-buttons",children:s})};function K(){return!p.hideShareButton&&!o.kiosk&&window.location.host.endsWith(".expofp.com")&&y.EXPO!=="globalaltsmiami2024"}function L(){r.updateOverlayContent()}const W=()=>{a.routeStore.clickRoute(null,a.routeStore.tempToBooth||e.booths[0]),a.routeStore.currentRouteExhibitor=e},J=t=>/^\d+$/.test(t),Y=t=>p.shortLevelName?t.layer?.shortName:t.layer?.description;return n("div",{className:m,"aria-label":h("Details"),children:[n("div",{className:"exhibitor__header",children:[n("div",{className:"exhibitor__header-name",children:[i("div",{className:"exhibitor__header-icon",children:i("i",{className:"icon-exhibitor-solid"})}),i("span",{dir:"auto",children:e.name}),A]}),i("button",{type:"button",onClick:()=>a.searchStore.handleBackAction(),className:"exhibitor__header-close",children:i("i",{className:"icon-close"})})]}),c||n(N,{children:[i("div",{className:"exhibitor__buttons",children:!o.isGuidedToursActive&&i(be,{showBookmark:!o.disableBookmarked&&!p.hideBookmarks&&!o.kiosk,showDirections:e.booths.length>0&&y.wayfinding,inBookmark:e.bookmarked,showShare:K(),showVisited:!o.kiosk,visited:e.visited,onClickBookmark:F,onClickShare:P,onClickDirections:W,onClickVisited:$})}),e.leadingImageUrl?i("div",{className:"exhibitor__leading-image-container exhibitor-slider",children:e.leadingImageLinkUrl?i("a",{href:e.leadingImageLinkUrl,target:"_blank",rel:"noopener noreferrer",children:i("img",{src:e.leadingImageUrl,className:"exhibitor__leading-image",alt:"",crossOrigin:"anonymous"})}):i(U,{children:i(D,{fallback:null,children:i(G,{className:o.responsiveClass,onOpenGallery:()=>a.openGallery(),onCloseGallery:()=>a.closeGallery(),onImageLoadHeightUpdate:L,leading:!0,images:[e.leadingImageUrl]})})})}):null,n("div",{className:g("exhibitor__details",{"details-hidden":o.kiosk&&w&&!f}),ref:x,children:[n("div",{className:g("exhibitor-categories",{"is-links-disabled":o.isGuidedToursActive}),children:[e.featured&&i("div",{className:"exhibitor-featured",children:h("Featured")}),e.booths.map(t=>{const l=Y(t),s=v=>{v.preventDefault(),a.toggleMapOverlay(),a.selectBooth(t)};return n("a",{href:`?${t.slug}`,onClick:s,className:"exhibitor-categories__booth",children:[i("div",{className:"exhibitor-categories__booth-name",children:t.name}),l&&n("div",{className:"exhibitor-categories__booth-level",children:[J(l)?h("Level")+" ":"",l]})]},t.id)}),e.categories.map(t=>i("a",{href:"?"+encodeURIComponent(t.slug),onClick:l=>{l.preventDefault(),j(t)},className:t.sponsorship?"exhibitor-categories__sponsorship":"exhibitor-categories__cat",children:t.name},t.id))]}),e.description||e.logo?.url?n("div",{className:g("exhibitor-description",{collapsed:r.collapsed&&!r.disableCollapse}),children:[e.logo?.url?i("div",{className:g("exhibitor-description__logo",{"exhibitor-description__logo--left":!e.description}),children:i("img",{src:e.logo.url,alt:e.name,crossOrigin:"anonymous"})}):null,e.description?i("span",{className:"exhibitor-description__content",dir:"auto",dangerouslySetInnerHTML:{__html:ke(e.description)},onClick:b}):null]}):null,(!!e.schedule?.length||!!e.booths[0]?.schedule.length)&&i(me,{events:[...e.schedule||e.booths[0]?.schedule||[]].sort((t,l)=>new Date(t.startDate).getTime()-new Date(l.startDate).getTime())}),!o.kiosk&&e.videoUrl&&navigator.onLine&&i("div",{className:"exhibitor-video",children:i("iframe",{src:e.videoUrl,"data-allow":"encrypted-media; autoplay; fullscreen",title:h("Exhibitor Video"),allowFullScreen:!0})}),e.gallery&&i("div",{className:"exhibitor-slider",onClick:()=>u(d.ViewGallery),children:i(U,{children:i(D,{fallback:null,children:i(G,{className:o.responsiveClass,onOpenGallery:()=>a.openGallery(),onCloseGallery:()=>a.closeGallery(),onImageLoadHeightUpdate:L,images:e.gallery})})})}),!o.kiosk&&e.marketMaterials&&n(N,{children:[i("div",{className:"exhibitor-sep"}),i(ce,{list:e.marketMaterials})]}),r.showEdit&&i("div",{className:"exhibitor-sep"}),!o.kiosk&&r.showEdit&&i("div",{className:"exhibitor-edit",children:i(R,{size:"sm",variant:"secondary",onClick:q,children:h("Edit")})}),r.anyAddress&&n("div",{className:"exhibitor-meta",children:[!!(e.address||e.address2)&&n("div",{className:"exhibitor-meta__item",children:[i("div",{className:"exhibitor-meta__icon",children:i("i",{className:"icon-marker-pin-solid"})}),n("div",{className:"exhibitor-meta__content",children:[e.address,!!e.address2&&i("div",{children:e.address2}),!!(e.city||e.state||e.zip)&&n("div",{children:[e.city,!!(e.city&&e.state)&&i("span",{children:" "}),e.state,!!(e.state&&e.zip)&&i("span",{children:"\xA0"})," ",e.zip]}),!!e.country&&i("div",{children:e.country})]})]}),!!e.phone1&&n("div",{className:"exhibitor-meta__item",children:[i("div",{className:"exhibitor-meta__icon",children:i("i",{className:"icon-phone-solid"})}),i("div",{className:"exhibitor-meta__content",children:i("a",{dir:"ltr",href:"tel:"+e.phone1,className:"exhibitor-meta__link",onClick:t=>_(t,d.ClickPhone),children:e.phone1})})]}),!!e.website&&n("div",{className:"exhibitor-meta__item",children:[i("div",{className:"exhibitor-meta__icon",children:i("i",{className:"icon-globe-solid"})}),i("div",{className:"exhibitor-meta__content",children:i("a",{href:e.website,target:"_blank",rel:"noopener noreferrer",className:"exhibitor-meta__link",onClick:t=>_(t,d.ClickWebsite),children:r.websiteTrimmed})})]}),!!e.email&&n("div",{className:"exhibitor-meta__item",children:[i("div",{className:"exhibitor-meta__icon",children:i("i",{className:"icon-mail-at-solid"})}),i("div",{className:"exhibitor-meta__content",children:i("a",{href:"mailto:"+e.email,target:"_blank",rel:"noopener noreferrer",className:"exhibitor-meta__link",onClick:t=>_(t,d.ClickEmail),children:e.email})})]}),r.anySocial&&n("div",{className:"exhibitor-meta__socials",children:[i("a",{href:e.facebook,className:"exhibitor-meta__social",onClick:()=>u(d.ClickFacebook),target:"_blank",rel:"noopener noreferrer",children:i("i",{className:"icon-facebook"})}),i("a",{href:e.instagram,className:"exhibitor-meta__social",onClick:()=>u(d.ClickInstagaram),target:"_blank",rel:"noopener noreferrer",children:i("i",{className:"icon-instagram"})}),i("a",{href:e.linkedin,className:"exhibitor-meta__social",onClick:()=>u(d.ClickLinkedin),target:"_blank",rel:"noopener noreferrer",children:i("i",{className:"icon-linkedin"})}),i("a",{href:e.twitter,className:"exhibitor-meta__social",onClick:()=>u(d.ClickTwitter),target:"_blank",rel:"noopener noreferrer",children:i("i",{className:"icon-twitter-x"})}),i("a",{href:e.xing,className:"exhibitor-meta__social",onClick:()=>u(d.ClickXing),target:"_blank",rel:"noopener noreferrer",children:i("i",{className:"icon-xing"})}),i("a",{href:e.youtube,className:"exhibitor-meta__social",onClick:()=>u(d.ClickYoutube),target:"_blank",rel:"noopener noreferrer",children:i("i",{className:"icon-youtube"})})]})]}),i(X,{exhibitor:e})]}),o.kiosk&&w&&i(ue,{className:g("exhibitor__show-more",{"is-sticky":f}),expanded:f,onClick:()=>M(t=>!t)})]})]})});function P(){const e=window.navigator,c={title:o.selectedExhibitor.name,url:window.location.href};ne&&e?.canShare&&e.canShare(c)?e.share(c):a.toggleModal("share")}function j(e){a.clickCategory(e)}function q(e){if(o.kiosk)return e.preventDefault();e.target.blur();const c=r.sendLinkEmail;if(!window.confirm(h("Send login instructions to {{email}} to edit profile?",{email:c}))||y.EXPO==="expo")return;const m=new XMLHttpRequest;m.open("POST",p.sendLoginLinkUrl),m.setRequestHeader("Content-Type","application/json");function b(){alert(h("Error sending login instructions"))}m.onload=function(k){if(this.status!==200){b();return}alert(h("A link to edit profile was sent to {{email}}",{email:c}))},m.onerror=function(k){re.error("Error",k),b()},m.send(JSON.stringify({id:r.exhibitor.id}))}function F(){r.exhibitor.bookmarked=!r.exhibitor.bookmarked,o.onBookmarkClick&&o.onBookmarkClick({name:r.exhibitor.name,bookmarked:r.exhibitor.bookmarked,externalId:r.exhibitor.externalId})}function $(){r.exhibitor.visited=!r.exhibitor.visited,o.onVisitedClick&&o.onVisitedClick({name:r.exhibitor.name,visited:r.exhibitor.visited,externalId:r.exhibitor.externalId})}});export default()=>T(()=>i(N,{children:!o.menu&&o.selectedExhibitor?i(ge,{}):null}));
|
|
1
|
+
import{Fragment as N,jsx as i,jsxs as n}from"react/jsx-runtime";import"./Exhibitor.scss";import{Button as R}from"@expofp/ui";import g from"classnames";import{observer as Q,useLocalStore as Z,useObserver as T}from"mobx-react-lite";import ee,{Suspense as D,useEffect as ie,useRef as C,useState as I}from"react";import{Transition as te}from"react-transition-group";import p from"../data";import a,{uiState as r}from"../store";import{RegularBooth as oe}from"../store/BoothStore";import{GaEventActions as d,sendEventToGa as O}from"../tools/gtag";import re from"../tools/logger";import y from"../tools/settings";import ne from"../tools/track-event";import{t as h}from"../utils/i18n";import ae from"../utils/is-mobile";import{useReaction as se}from"../utils/mobx";import le from"../utils/useHeatmapOverlay";import ce from"./AlertContainer";import de from"./DownloadListContainer";import U from"./ErrorBoundary";import he from"./RebookingNotesContainer";import me from"./RebookingRadioGroupContainer";import ue from"./Schedule";import be from"./ShowMoreButtonContainer";import ke from"./SidebarActionsContainer";import{getDescription as ge}from"./utils/getDescription";const G=ee.lazy(()=>import("./GalleryContainer")),pe=Q(function(){const S=C(null),o=Z(()=>({collapsed:!0,updateOverlayContent:null,get exhibitor(){return r.selectedExhibitor},get websiteTrimmed(){return this.exhibitor.website?this.exhibitor.website.replace(/^(http(s?):\/\/)([^/]+)(\/)?$/i,"$3"):""},get anySocial(){return r.kiosk?!1:!!["facebook","instagram","linkedin","twitter","googlePlus","xing","youtube"].find(e=>this.exhibitor[e])},get anyAddress(){return!!["address","address2","phone1","website","email"].find(e=>this.exhibitor[e])},get anyMedia(){return!!this.exhibitor.videoUrl||!!(this.exhibitor.gallery&&this.exhibitor.gallery.length)},get anyButtons(){return!!(this.exhibitor.customButtonTitle||this.exhibitor.customButton2Title||this.exhibitor.customButton3Title)},get disableCollapse(){return!this.anySocial&&!this.anyAddress&&!this.anyMedia&&!this.anyButtons||r.overlayPosition==="left"&&(this.exhibitor.description||"").length<800},get showEdit(){return!!(p.sendLoginLinkUrl&&this.sendLinkEmail)},get sendLinkEmail(){return this.exhibitor.privateEmail||this.exhibitor.email}})),{heatmapBar:A}=le(o.exhibitor),[w,z]=I(!1),[f,M]=I(!1),x=C(null);ie(()=>((()=>{if(x.current){const c=x.current.offsetHeight;z(c>300)}})(),()=>{a.exhibitorStore.rebookingStateChangeRequested=!1}),[]),se(()=>o.exhibitor,()=>{S.current&&(S.current.parentElement.scrollTop=0),o.collapsed=!0});function _(e,c){if(u(c),r.kiosk)return e.preventDefault()}function H(e,c,m){O(d.ClickCustomButton,o.exhibitor.name);const b={externalId:o.exhibitor.externalId,buttonNumber:e,buttonUrl:c,preventDefault:m.preventDefault.bind(m)};r.onExhibitorCustomButtonClick&&r.onExhibitorCustomButtonClick(b)}function u(e){O(e,o.exhibitor.name)}const B=C(),V={entering:{opacity:1},entered:{opacity:1},exiting:{opacity:0},exited:{opacity:0}},E=150;return T(()=>{const e=o.exhibitor,c=p.isRebooking?(()=>{const t=new Set;for(const s of e.booths)s instanceof oe&&s.size&&t.add(s.size);const l=Array.from(t);return n("div",{children:[l.length>0&&i("div",{className:"booth__infos",style:{padding:"0 15px",marginBottom:"1rem"},children:n("div",{className:"booth__info",children:[i("div",{className:"booth__info-icon",children:i("i",{className:"icon-size"})}),n("div",{className:"booth__info-body",children:[i("div",{className:"booth__info-title",children:h("Size")}),i("div",{className:"booth__info-val",children:l.join(", ")})]})]})}),i(me,{value:e.rebookingState.toString(),onChange:s=>a.exhibitorStore.setRebookingState(e,parseInt(s),e.rebookingNote)}),i(he,{value:e.rebookingNote||"",onSave:s=>a.exhibitorStore.setRebookingState(e,e.rebookingState,s)},e.id),i(te,{in:a.exhibitorStore.rebookingStateChangeRequested,nodeRef:B,timeout:E,appear:!0,enter:!0,exit:!0,mountOnEnter:!0,unmountOnExit:!0,children:s=>i("div",{ref:B,style:{position:"fixed",bottom:"1rem",left:"1rem",zIndex:9999,transition:`opacity ${E}ms ease-in-out`,opacity:0,...V[s]},children:i(ce,{title:a.exhibitorStore.rebookingStateSaved?h("Changes saved"):h("Oops! Something went wrong"),variant:a.exhibitorStore.rebookingStateSaved?"success":"error",inline:!0,closable:!0,onClose:()=>{a.exhibitorStore.rebookingStateChangeRequested=!1}})})})]})})():null,m=g({exhibitor:!0,"is-featured":e.featured,bookmarked:e.bookmarked,[r.responsiveClass]:!0}),b=()=>{o.collapsed=!1,setTimeout(o.updateOverlayContent)};function k(t,l,s){return!t||!l||r.kiosk||r.previewMode?null:i("div",{className:"exhibitor-custom-button",children:i(R,{link:l,inline:!0,onClick:v=>{H(s,l,v)},target:"_blank",children:t})},s)}const X=({exhibitor:t})=>{const s=[k(t.customButtonTitle,t.customButtonUrl,1),k(t.customButton2Title,t.customButton2Url,2),k(t.customButton3Title,t.customButton3Url,3)].filter(Boolean);return s.length===0?null:i("div",{className:"exhibitor-custom-buttons",children:s})};function K(){return!p.hideShareButton&&!r.kiosk&&window.location.host.endsWith(".expofp.com")&&y.EXPO!=="globalaltsmiami2024"}function L(){o.updateOverlayContent()}const W=()=>{a.routeStore.clickRoute(null,a.routeStore.tempToBooth||e.booths[0]),a.routeStore.currentRouteExhibitor=e},J=t=>/^\d+$/.test(t),Y=t=>p.shortLevelName?t.layer?.shortName:t.layer?.description;return n("div",{className:m,"aria-label":h("Details"),children:[n("div",{className:"exhibitor__header",children:[n("div",{className:"exhibitor__header-name",children:[i("div",{className:"exhibitor__header-icon",children:i("i",{className:"icon-exhibitor-solid"})}),i("span",{dir:"auto",children:e.name}),A]}),i("button",{type:"button",onClick:()=>a.searchStore.handleBackAction(),className:"exhibitor__header-close",children:i("i",{className:"icon-close"})})]}),c||n(N,{children:[i("div",{className:"exhibitor__buttons",children:!r.isGuidedToursActive&&i(ke,{showBookmark:!r.disableBookmarked&&!p.hideBookmarks&&!r.kiosk,showDirections:e.booths.length>0&&y.wayfinding,inBookmark:e.bookmarked,showShare:K(),showVisited:!r.kiosk,visited:e.visited,onClickBookmark:F,onClickShare:P,onClickDirections:W,onClickVisited:$})}),e.leadingImageUrl?i("div",{className:"exhibitor__leading-image-container exhibitor-slider",children:e.leadingImageLinkUrl?i("a",{href:e.leadingImageLinkUrl,target:"_blank",rel:"noopener noreferrer",children:i("img",{src:e.leadingImageUrl,className:"exhibitor__leading-image",alt:"",crossOrigin:"anonymous"})}):i(U,{children:i(D,{fallback:null,children:i(G,{className:r.responsiveClass,onOpenGallery:()=>a.openGallery(),onCloseGallery:()=>a.closeGallery(),onImageLoadHeightUpdate:L,leading:!0,images:[e.leadingImageUrl]})})})}):null,n("div",{className:g("exhibitor__details",{"details-hidden":r.kiosk&&w&&!f}),ref:x,children:[n("div",{className:g("exhibitor-categories",{"is-links-disabled":r.isGuidedToursActive}),children:[e.featured&&i("div",{className:"exhibitor-featured",children:h("Featured")}),e.booths.map(t=>{const l=Y(t),s=v=>{v.preventDefault(),a.toggleMapOverlay(),a.selectBooth(t)};return n("a",{href:`?${t.slug}`,onClick:s,className:"exhibitor-categories__booth",children:[i("div",{className:"exhibitor-categories__booth-name",children:t.name}),l&&n("div",{className:"exhibitor-categories__booth-level",children:[J(l)?h("Level")+" ":"",l]})]},t.id)}),e.categories.map(t=>i("a",{href:"?"+encodeURIComponent(t.slug),onClick:l=>{l.preventDefault(),j(t)},className:t.sponsorship?"exhibitor-categories__sponsorship":"exhibitor-categories__cat",children:t.name},t.id))]}),e.description||e.logo?.url?n("div",{className:g("exhibitor-description",{collapsed:o.collapsed&&!o.disableCollapse}),children:[e.logo?.url?i("div",{className:g("exhibitor-description__logo",{"exhibitor-description__logo--left":!e.description}),children:i("img",{src:e.logo.url,alt:e.name,crossOrigin:"anonymous"})}):null,e.description?i("span",{className:"exhibitor-description__content",dir:"auto",dangerouslySetInnerHTML:{__html:ge(e.description)},onClick:b}):null]}):null,(!!e.schedule?.length||!!e.booths[0]?.schedule.length)&&i(ue,{events:[...e.schedule||e.booths[0]?.schedule||[]].sort((t,l)=>new Date(t.startDate).getTime()-new Date(l.startDate).getTime())}),!r.kiosk&&e.videoUrl&&navigator.onLine&&i("div",{className:"exhibitor-video",children:i("iframe",{src:e.videoUrl,"data-allow":"encrypted-media; autoplay; fullscreen",title:h("Exhibitor Video"),allowFullScreen:!0})}),e.gallery&&i("div",{className:"exhibitor-slider",onClick:()=>u(d.ViewGallery),children:i(U,{children:i(D,{fallback:null,children:i(G,{className:r.responsiveClass,onOpenGallery:()=>a.openGallery(),onCloseGallery:()=>a.closeGallery(),onImageLoadHeightUpdate:L,images:e.gallery})})})}),!r.kiosk&&e.marketMaterials&&n(N,{children:[i("div",{className:"exhibitor-sep"}),i(de,{list:e.marketMaterials})]}),o.showEdit&&i("div",{className:"exhibitor-sep"}),!r.kiosk&&o.showEdit&&i("div",{className:"exhibitor-edit",children:i(R,{size:"sm",variant:"secondary",onClick:q,children:h("Edit")})}),o.anyAddress&&n("div",{className:"exhibitor-meta",children:[!!(e.address||e.address2)&&n("div",{className:"exhibitor-meta__item",children:[i("div",{className:"exhibitor-meta__icon",children:i("i",{className:"icon-marker-pin-solid"})}),n("div",{className:"exhibitor-meta__content",children:[e.address,!!e.address2&&i("div",{children:e.address2}),!!(e.city||e.state||e.zip)&&n("div",{children:[e.city,!!(e.city&&e.state)&&i("span",{children:" "}),e.state,!!(e.state&&e.zip)&&i("span",{children:"\xA0"})," ",e.zip]}),!!e.country&&i("div",{children:e.country})]})]}),!!e.phone1&&n("div",{className:"exhibitor-meta__item",children:[i("div",{className:"exhibitor-meta__icon",children:i("i",{className:"icon-phone-solid"})}),i("div",{className:"exhibitor-meta__content",children:i("a",{dir:"ltr",href:"tel:"+e.phone1,className:"exhibitor-meta__link",onClick:t=>_(t,d.ClickPhone),children:e.phone1})})]}),!!e.website&&n("div",{className:"exhibitor-meta__item",children:[i("div",{className:"exhibitor-meta__icon",children:i("i",{className:"icon-globe-solid"})}),i("div",{className:"exhibitor-meta__content",children:i("a",{href:e.website,target:"_blank",rel:"noopener noreferrer",className:"exhibitor-meta__link",onClick:t=>_(t,d.ClickWebsite),children:o.websiteTrimmed})})]}),!!e.email&&n("div",{className:"exhibitor-meta__item",children:[i("div",{className:"exhibitor-meta__icon",children:i("i",{className:"icon-mail-at-solid"})}),i("div",{className:"exhibitor-meta__content",children:i("a",{href:"mailto:"+e.email,target:"_blank",rel:"noopener noreferrer",className:"exhibitor-meta__link",onClick:t=>_(t,d.ClickEmail),children:e.email})})]}),o.anySocial&&n("div",{className:"exhibitor-meta__socials",children:[i("a",{href:e.facebook,className:"exhibitor-meta__social",onClick:()=>u(d.ClickFacebook),target:"_blank",rel:"noopener noreferrer",children:i("i",{className:"icon-facebook"})}),i("a",{href:e.instagram,className:"exhibitor-meta__social",onClick:()=>u(d.ClickInstagaram),target:"_blank",rel:"noopener noreferrer",children:i("i",{className:"icon-instagram"})}),i("a",{href:e.linkedin,className:"exhibitor-meta__social",onClick:()=>u(d.ClickLinkedin),target:"_blank",rel:"noopener noreferrer",children:i("i",{className:"icon-linkedin"})}),i("a",{href:e.twitter,className:"exhibitor-meta__social",onClick:()=>u(d.ClickTwitter),target:"_blank",rel:"noopener noreferrer",children:i("i",{className:"icon-twitter-x"})}),i("a",{href:e.xing,className:"exhibitor-meta__social",onClick:()=>u(d.ClickXing),target:"_blank",rel:"noopener noreferrer",children:i("i",{className:"icon-xing"})}),i("a",{href:e.youtube,className:"exhibitor-meta__social",onClick:()=>u(d.ClickYoutube),target:"_blank",rel:"noopener noreferrer",children:i("i",{className:"icon-youtube"})})]})]}),i(X,{exhibitor:e})]}),r.kiosk&&w&&i(be,{className:g("exhibitor__show-more",{"is-sticky":f}),expanded:f,onClick:()=>M(t=>!t)})]})]})});function P(){const e=window.navigator,c={title:r.selectedExhibitor.name,url:window.location.href};ae&&e?.canShare&&e.canShare(c)?e.share(c):a.toggleModal("share")}function j(e){a.clickCategory(e)}function q(e){if(r.kiosk)return e.preventDefault();e.target.blur();const c=o.sendLinkEmail;if(!window.confirm(h("Send login instructions to {{email}} to edit profile?",{email:c}))||y.EXPO==="expo")return;const m=new XMLHttpRequest;m.open("POST",p.sendLoginLinkUrl),m.setRequestHeader("Content-Type","application/json");function b(){alert(h("Error sending login instructions"))}m.onload=function(k){if(this.status!==200){b();return}alert(h("A link to edit profile was sent to {{email}}",{email:c}))},m.onerror=function(k){re.error("Error",k),b()},m.send(JSON.stringify({id:o.exhibitor.id}))}function F(){o.exhibitor.bookmarked=!o.exhibitor.bookmarked,r.onBookmarkClick&&r.onBookmarkClick({name:o.exhibitor.name,bookmarked:o.exhibitor.bookmarked,externalId:o.exhibitor.externalId}),o.exhibitor.bookmarked&&ne("bookmark",o.exhibitor.id,"exhibitor")}function $(){o.exhibitor.visited=!o.exhibitor.visited,r.onVisitedClick&&r.onVisitedClick({name:o.exhibitor.name,visited:o.exhibitor.visited,externalId:o.exhibitor.externalId})}});export default()=>T(()=>i(N,{children:!r.menu&&r.selectedExhibitor?i(pe,{}):null}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as o,jsxs as
|
|
1
|
+
import{jsx as o,jsxs as x}from"react/jsx-runtime";import"@styles/main.scss";import"./Layout.scss";import{Spinner as R}from"@expofp/ui";import B from"classnames";import{observer as L}from"mobx-react-lite";import r,{Suspense as n,useEffect as G,useState as k}from"react";import t,{layersStore as f,uiState as e}from"../store";import{LayersMode as C}from"../store/LayerStore";import{checkUserIsGDPR as F,GaEventActions as d,hasUserConsent as T,sendEventToGa as s,setConsentSettings as S,setCookieConsent as b}from"../tools/gtag";import j from"../tools/settings";import u from"../tools/track-event";import{isWebGlSupported as A}from"../utils";import{t as P}from"../utils/i18n";import V from"../utils/is-debug";import{useReaction as l}from"../utils/mobx";import{CategoryFilterModal as H}from"./CategoryFilterModal";import I from"./ErrorBoundary";import $ from"./GlobalErrorMessage";import K from"./HeatmapLegendContainer";import N from"./IntercomLauncher";import _ from"./LevelSelectorContainer";import U from"./LogoOverlay";import W from"./Map/Map";import q from"./MapControlsContainer";import X from"./MobileToggleButtonContainer";import Y from"./OverlayContainer";import J from"./SearchBox";import Q from"./SearchButtons/SearchButtons";import Z from"./SessionsFiltersModal";import ee from"./ShareContainer";import oe from"./SpeakersFiltersModal";import te from"./Ws";const ie=r.lazy(()=>import("./Demo")),re=r.lazy(()=>import("./Free")),ae=r.lazy(()=>import("./Debug")),ne=r.lazy(()=>import("./Maplibre/MaplibreAdapter")),le=r.lazy(()=>import("./ModalContainer")),se=r.lazy(()=>import("./CookieConsent")),me=r.lazy(()=>import("./GpsLoader")),de=r.lazy(()=>import("./Kiosk/SetKioskMode")),pe=r.lazy(()=>import("./Kiosk/ShowKiosk"));export default L(function({offHistory:w,consent:p}){const[y,c]=k(!1),[z,M]=k(!1),h=t.maplibreStore.showMaplibre,O=e.searchButtonsOverride!==!1&&(!e.noOverlay||e.overlayOnDemand),g=!e.noOverlay||e.overlayOnDemand&&(z||e.isOverlayOpen);let m=null;e.bannerType==="demo"?m=o(ie,{}):e.bannerType==="free"&&(m=o(re,{}));const E=()=>{b(!0),S(),t.uiState.hideCookieConsent=!0},D=()=>{b(!1),S(),t.uiState.hideCookieConsent=!0};G(()=>{async function i(){const a=await F();c(!!(a||a===null))}T(p)?c(!0):i()},[]),l(()=>e.isOverlayOpen,i=>i&&M(!0)),l(()=>e.selectedExhibitor,i=>{const a=t.heatmapStore.forceTrack;if(t.heatmapStore.forceTrack=null,a&&a.exhibitor===i){s(a.action,a.label);return}i&&(u("exview",i.id),s(d.ViewExhibitor,i.name))}),l(()=>e.selectedBooth,i=>i?.name&&s(d.ViewBooth,i.name)),l(()=>e.selectedCategory,i=>i?.name&&s(d.ViewCategory,i?.name)),l(()=>e.selectedEventItem,i=>{i?.name&&(u("sesview",i.name),s(d.ViewExhibitor,i.name))}),l(()=>e.selectedSpeaker,i=>{i?.name&&u("spkview",i.name)});const v=!e.hideCookieConsent&&!e.kiosk&&y&&p==="ask";return o("div",{id:"efp-layout",className:B("layout",{"efp-kiosk":e.kiosk,"efp-kiosk-route-active":e.kiosk&&e.selectedRoute?.from&&e.selectedRoute?.to,"efp-layers-mode":t.layerStore.mode,"efp-ws-mode":e.wsShown,"efp-no-overlay":e.overlayHiddenNow,"efp-overlay-on-demand":e.overlayOnDemand,"efp-top-banner":e.bannerType==="free"&&!e.freeBannerDismissed,"efp-viewer-mode":e.viewerMode}),dir:e.rtl?"rtl":"ltr",style:{"--ui-scale":e.uiScale.toString()},children:x("div",{className:`layout__fixed expo-${j.EXPO} overlay-${t.uiState.overlayPosition}`,children:[(f.mode===C.Radio||f.mode===C.CheckBox)&&!e.floorsControlHidden&&t.initialized&&o(_,{}),g&&t.initialized&&o(Y,{isGDPR:y,consent:p}),t.initialized&&o(U,{}),(!e.noOverlay||e.overlayOnDemand&&e.isOverlayOpen)&&t.initialized&&!(e.viewerMode&&e.menu)&&o(J,{}),O&&t.initialized&&o(Q,{}),!e.noOverlay&&t.initialized&&o(X,{}),!e.mapControlsHidden&&t.initialized&&o(q,{}),o(N,{}),!e.hideHeaderLogo&&t.initialized&&o(te,{}),t.routeStore.gpsEnabled&&o(me,{requestCompassAllowed:!v}),A&&!h&&o(W,{}),h&&o(I,{children:o(n,{fallback:o("div",{}),children:o(ne,{viewMode:t.maplibreStore.mapViewMode})})}),m&&!e.hideFreeOrDemo&&!e.heatmap?o(n,{fallback:null,children:m}):null,v&&o(n,{fallback:null,children:o(se,{link:"https://expofp.com/pages/viewer-cookie-consent",onAccept:E,onReject:D})}),V?o(n,{fallback:null,children:o(ae,{})}):null,e.modalActive.share?o(n,{fallback:null,children:o(le,{variant:"share",ariaLabel:P("Share"),open:e.modalActive.share,onClose:()=>t.toggleModal("share"),children:o(ee,{title:e.selectedExhibitor?.name||e.selectedEventItem?.name||"",url:w?`${window.location.origin}?${encodeURI(e.selectedExhibitor?.slug||e.selectedEventItem?.slug)}`:window.location.href})})}):null,e.heatmap||e.heatmapYah?o(K,{style:{left:`calc(50% + ${t.uiState.mapVisibleStart/2}px)`},className:e.responsiveClass}):null,o(R,{active:!f.layersLoaded}),o("div",{id:"fps"}),t.initialized&&o(H,{}),t.initialized&&o(Z,{store:t.sessionsFilterStore}),t.initialized&&o(oe,{store:t.speakerFilterStore}),o($,{}),t.initialized&&e.setKioskModeEnabled&&o(n,{fallback:null,children:o(de,{})}),t.initialized&&!e.setKioskModeEnabled&&o(n,{fallback:null,children:o(pe,{})})]})})});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as s,jsxs as r}from"react/jsx-runtime";import"./Speaker.scss";import
|
|
1
|
+
import{jsx as s,jsxs as r}from"react/jsx-runtime";import"./Speaker.scss";import p from"classnames";import{observer as f}from"mobx-react-lite";import{useObserver as w}from"mobx-react-lite";import{useEffect as j,useMemo as y,useRef as h,useState as T}from"react";import x from"../data";import t,{uiState as o}from"../store";import{GaEventActions as l,sendEventToGa as m}from"../tools/gtag";import A from"../tools/track-event";import{t as u}from"../utils/i18n";import{Schedule as D,SidebarActionsContainer as G}from"./";const H=f(()=>{const i=h(null),n=h(null),[v,_]=T(!1),e=t.speakerStore.selectedSpeaker;if(!e)return s("div",{className:"efp-speaker-empty",children:u("Speaker not found")});const k=t.speakerStore.getEventsBySpeaker(e.id),d=y(()=>[...k].sort((a,c)=>{const B=new Date(a.startDate).getTime(),E=new Date(c.startDate).getTime();return B-E}),[k]);j(()=>{(()=>{if(n.current){const c=n.current.offsetHeight;_(c>300)}})()},[]);const S=a=>{t.selectEventItem(a,!0)},b=()=>{e.bookmarked=!e.bookmarked,m(l.ClickBookmark,e.name),e.bookmarked&&A("bookmark",e.name,"speaker")},N=()=>{m(l.ClickCustomButton,e.name),t.toggleModal("share")},C=()=>{m(l.ClickCustomButton,e.name)},g=p({"efp-speaker":!0,[o.responsiveClass]:!0});return w(()=>r("div",{className:g,children:[r("div",{className:"efp-speaker__header",children:[s("div",{className:"efp-speaker__icon",children:s("i",{className:"icon-speaker-solid"})}),r("div",{className:"efp-speaker__content",children:[s("div",{className:"efp-speaker__name",children:e.name}),e.company&&s("div",{className:"efp-speaker__company",children:e.company}),e.jobTitle&&s("div",{className:"efp-speaker__job-title",children:e.jobTitle})]}),e.photoFile&&s("div",{className:"efp-speaker__photo",children:s("img",{src:e.photoFile,alt:e.name})})]}),s("div",{className:"efp-speaker__buttons",children:!o.isGuidedToursActive&&s(G,{showBookmark:!o.disableBookmarked&&!x.hideBookmarks&&!o.kiosk,showDirections:!1,inBookmark:e.bookmarked||!1,showShare:!0,showVisited:!1,visited:!1,onClickBookmark:b,onClickShare:N,onClickVisited:C})}),s("div",{className:p("efp-speaker__details",{"details-hidden":o.kiosk&&v}),ref:n,children:d.length>0&&r("div",{className:"efp-speaker-events",children:[s("h3",{className:"efp-speaker-events__title",children:u("Sessions")}),s(D,{events:d,showBooths:!0,isSessions:!1,onEventClick:S})]})})]}))}),O=f(()=>{const i=t.uiState.details;return!i||i?.entity?.type!=="speaker"?null:s(H,{})});export default O;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Fragment as A,jsx as x,jsxs as T}from"react/jsx-runtime";import{Box as E}from"@expofp/geometry";import{CameraSchema as I}from"@expofp/schema";import{optimizeWaypointOrder as M}from"@expofp/wayfinding";import{ErrorBoundary as R}from"@sentry/react";import $ from"debug";import{reaction as V}from"mobx";import{createRoot as z}from"react-dom/client";import{install as j}from"resize-observer";import G from"./components/Layout";import{MAX_ROUTE_WAYPOINTS as d}from"./constants";import N from"./data";import{fpGeo as b}from"./data/fpGeo";import q from"./floorplan.loader";import{shouldLoadIntercom as O}from"./intercom";import{BoundsSchema as U,POISelectorsSchema as P,ZoomToOptionsSchema as w}from"./schemas/sdk.schemas";import{applyDeclarativeConfig as Y,applyParameters as D,applyPathway as H,initUrlRouting as W}from"./services/url-dispatch";import{destroyUrlSync as X}from"./services/url-sync";import r from"./store";import{bindRootElement as K,destroyUiHandlers as Q}from"./store/init/init-ui";import{findBooth as S,Route as B,separateExternalIds as k}from"./store/RouteStore";import{destroyGtag as Z,GaEventActions as v,sendEventToGa as F,setConsentSettings as J}from"./tools/gtag";import _ from"./tools/report-error";import ee from"./tools/track-event";import{cameraToMapSettings as te,mapSettingsToCamera as re}from"./utils/camera-map-settings";import{getStorage as C}from"./utils/entity-storage";import{getMostFrequent as oe}from"./utils/getMostFrequent";import{convertLocalToGps as ie,isValidPointCoords as y}from"./utils/gps";import{getLocales as se,hasLocale as ne,setLocale as ae}from"./utils/i18n";import{mapEntity as g}from"./utils/mapEntity";const p=$("efp:api");j();export default class he extends q{init(){Y(),this.ignoreQuery||W(this.offHistory),ee("load"),K(r),r.fp=this,J(this.consent),F(v.Load,""),this.root=z(this.renderTarget),this.root.render(x(R,{children:x(G,{offHistory:this.offHistory,consent:this.consent})})),F(v.Rendered,""),V(()=>r.layerStore.layersLoaded,()=>{this.resolveReady(),r.initialized||this.onInit?.(this),r.initialized=!0});const e=O(N);e&&import("./intercom/bootIntercom").then(({bootIntercom:t})=>t(e)).catch(()=>{})}selectBooth(e){if(typeof e!="string"&&!Array.isArray(e)){a("selectBooth","Parameter must be a string or an array of strings.","EFP000000");return}const t=r.boothStore.booths.filter(o=>typeof e=="string"?o.name===e||o.externalId===e:e.includes(o.name)||e.includes(o.externalId));r.selectBooth(t)}selectExhibitor(e){if(typeof e!="string"&&!Array.isArray(e)){a("selectExhibitor","Parameter must be a string or an array of strings.","EFP000100");return}if(!e?.length){r.uiState.menu=!1,r.searchStore.resetSearchBox(),r.uiState.details=null;return}const t=r.exhibitorStore.exhibitors.filter(s=>typeof e=="string"?s.name===e||s.externalId===e:e.includes(s.name)||e.includes(s.externalId));if(!t?.length)return;if(typeof e=="string"){r.selectExhibitor(t[0]),r.moveToList([t[0]]);return}const o=t.flatMap(s=>s.booths.map(i=>i.layer)),n=oe(o.map(s=>s.description));n&&r.layerStore.updateVisibility(n,!0),r.uiState.menu=!1,r.searchStore.resetSearchBox(),r.uiState.details=null,r.uiState.list={type:"filter",items:t,query:{key:"exhibitors",value:t.map(s=>s.name).join(",")}},r.moveToList()}highlightExhibitors(e){Array.isArray(e)||a("highlightExhibitors","Parameter must be an array of strings.","EFP000200"),r.boothStore.highlightedByExternalIds=[],r.exhibitorStore.highlightedByExternalIds=[...e]}highlightBooths(e){Array.isArray(e)||a("highlightBooths","Parameter must be an array of strings.","EFP000300"),r.exhibitorStore.highlightedByExternalIds=[],r.boothStore.highlightedByExternalIds=[...e]}highlightEntities(e){Array.isArray(e)||a("highlightEntities","Parameter must be an array of strings.","EFP000400");const{boothExternalIds:t,exhibitorExternalIds:o}=k(e);r.boothStore.highlightedByExternalIds=[...t],r.exhibitorStore.highlightedByExternalIds=[...o]}selectRoute(e,t){if(Array.isArray(e)){let o=[...e];const n=o.shift(),s=o.pop();if(o.length>d)throw new Error(`The maximum number of waypoints is ${d}.`);if(!n||!s){a("selectRoute","Invalid route format: When providing an array, it must include at least two points: a start and a destination.","EFP000401");return}r.routeStore.selectRoute(new B(m(n),m(s),o.map(m)));return}e||a("selectRoute","At a minimum, the starting point must be passed.","EFP000402"),r.routeStore.selectRoute(new B(m(e),m(t)))}getOptimizedRoutes(e){if(!Array.isArray(e))return a("getOptimizedRoutes","Parameter must be an array.","EFP000500"),[];if(e.length>d)throw new Error(`The maximum number of waypoints is ${d}.`);const t=e.map(m).filter(n=>!!n);if(!t.length)throw new Error("No booths found for the provided waypoints.");const o=new Map;for(const n of t){const s=n.layer?.name??"",i=o.get(s);i?i.push(n):o.set(s,[n])}return Array.from(o.values()).map(n=>({waypoints:M(n.map(s=>[s.name,{x:s.rect.center.x,y:s.rect.center.y}]))}))}selectCurrentPosition(e,t,o){const n=y(e.x)&&y(e.y),s=y(e.lng)&&y(e.lat);!n&&!s&&a("selectCurrentPosition","A point must be passed. Either (x,y) or (lat,lng) are required.","EFP000600"),r.routeStore.selectCurrentPosition(e,t,o),this.onCurrentPositionChanged?.(e)}setBookmarks(e){(!Array.isArray(e)||!e.length)&&a("setBookmarks","Parameter must be an array.","EFP000700"),e.forEach(t=>{const o=r.exhibitorStore.exhibitors.find(n=>n.name===t.name||n.externalId===t.externalId);o&&(o.bookmarked=t.bookmarked)})}setEntitiesBookmarks(e){if(!Array.isArray(e)||!e.length){a("setEntitiesBookmarks","Parameter must be an array.","EFP000701");return}const t=["exhibitor","event","speaker","booth"],o=e.find(i=>!i.type||!t.includes(i.type));if(o){a("setEntitiesBookmarks",`Invalid entity type: ${o.type}. Must be one of: ${t.join(", ")}.`,"EFP000702");return}const n=C("bookmarked"),s={exhibitor:{existingIds:new Set(n.exhibitors||[]),finder:i=>r.exhibitorStore.findExhibitor(i),replacer:i=>r.exhibitorStore.replaceBookmarked(i)},event:{existingIds:new Set(n.events||[]),finder:i=>r.eventStore.findByNameOrSlug(i),replacer:i=>r.eventStore.replaceBookmarked(i)},speaker:{existingIds:new Set(n.speakers||[]),finder:i=>r.speakerStore.speakers.find(h=>h.name===i||h.externalId===i||h.slug===i),replacer:i=>r.speakerStore.replaceBookmarked(i)},booth:{existingIds:new Set(n.booths||[]),finder:i=>{const h=r.boothStore.findBooth(i);return h?.exhibitors.length===0?h:void 0},replacer:i=>r.boothStore.replaceBookmarked(i)}};e.forEach(i=>{const h=s[i.type],u=i.name||i.externalId||"",c=h.finder(u);c?i.bookmarked?h.existingIds.add(c.id):h.existingIds.delete(c.id):console.warn(`Entity not found: ${i.type} with query "${u}"`)}),Object.values(s).forEach(i=>{i.replacer(Array.from(i.existingIds))})}setEntitiesVisited(e){if(!Array.isArray(e)||!e.length){a("setEntitiesVisited","Parameter must be an array.","EFP000703");return}const t=["exhibitor","event"],o=e.find(i=>!i.type||!t.includes(i.type));if(o){a("setEntitiesVisited",`Invalid entity type: ${o.type}. Must be one of: ${t.join(", ")}.`,"EFP000704");return}const n=C("visited"),s={exhibitor:{existingIds:new Set(n.exhibitors||[]),finder:i=>r.exhibitorStore.findExhibitor(i),replacer:i=>r.exhibitorStore.replaceVisited(i)},event:{existingIds:new Set(n.events||[]),finder:i=>r.eventStore.findByNameOrSlug(i),replacer:i=>r.eventStore.replaceVisited(i)}};e.forEach(i=>{const h=s[i.type],u=i.name||i.externalId||"",c=h.finder(u);c?i.visited?h.existingIds.add(c.id):h.existingIds.delete(c.id):console.warn(`Entity not found: ${i.type} with query "${u}"`)}),Object.values(s).forEach(i=>{i.replacer(Array.from(i.existingIds))})}setMarkers(e){if(!e||!Array.isArray(e.icons)||!Array.isArray(e.markers)){a("setMarkers","Invalid input.","EFP000800");return}r.routeStore.setMarkers(e)}selectMarker(e,t=!0){return typeof e!="string"&&a("selectMarker","The identifier must be passed.","EFP000900"),r.routeStore.selectMarker(e,t)}drawCircles(e){Array.isArray(e)||a("drawCircles","Invalid input.","EFP000A00"),r.uiState.debugCircles=e}checkRoutes(){r.routeStore.checkRoutes()}updateLayerVisibility(e,t){typeof e!="string"&&a("updateLayerVisibility","The layer name (string) must be passed.","EFP000B00"),t||a("updateLayerVisibility","Passing a false value to visible will have no effect.","EFP000B01"),r.layerStore.updateVisibility(e,t)}getCenterCoordinates(){return r.fp.getCenterCoordinates()}exhibitorsList(){return r.exhibitorStore.exhibitors.map(e=>g(e))}boothsList(){return r.boothStore.booths.map(e=>g(e))}categoriesList(){return r.categoryStore.categories.map(e=>g(e))}selectCategory(e){if(e==null||typeof e!="string"){r.searchStore.selectSearch();return}const t=e?.toLowerCase(),o=r.categoryStore.categories.find(({name:n,slug:s})=>n?.toLowerCase()===t||s?.toLowerCase()===t);if(!o){a("selectCategory",`Category ${e} not found.`,"EFP000C01");return}r.selectCategory(o)}select(e){if(typeof e!="string"){a("select","Parameter must be a string.","EFP001700");return}const t=e,o=t?.toLowerCase(),n=r.boothStore.booths.find(c=>c.slug?.toLowerCase()===o||c.externalId?.toLowerCase()===o||c.externalId?.toLowerCase()?.replace(/\s+/g,"")===o);if(n){setTimeout(()=>r.selectBooth(n),250);return}const s=r.eventStore.eventItems.find(c=>c.slug?.toLowerCase()===o||c.externalId?.toLowerCase()===o);if(s){r.selectEventItem(s,!0);return}const i=r.exhibitorStore.exhibitors.find(c=>c.slug?.toLowerCase()===o||c.externalId?.toLowerCase()===o);if(i){setTimeout(()=>r.clickExhibitor(i),250);return}const h=r.categoryStore.categories.find(c=>c.slug===t);if(h){r.selectCategory(h);return}const u=r.speakerStore.findBySlug(t);if(u){r.selectSpeaker(u,!0);return}t.includes("heatmap=true")||r.searchStore.selectSearch(t)}showList(e){const t={bookmarks:()=>r.selectBookmarks(),visited:()=>r.selectVisited(),sessions:()=>r.selectSessions(),exhibitors:()=>r.selectExhibitors(),speakers:()=>r.selectSpeakers(),tours:()=>r.selectTours(),language:()=>r.selectLanguage()},o=t[e];if(!o){a("showList",`Unknown list "${e}". Must be one of: ${Object.keys(t).join(", ")}.`,"EFP001800");return}o()}selectTour(e){if(typeof e!="string"||!e){a("selectTour","A tour id must be passed.","EFP001900");return}const t=r.toursStore.getTourById(e);t?r.toursStore.launchTour(t,t.name,t.description):(console.warn(`Route with id "${e}" not found`),r.selectTours())}openPlanner(e={}){if(typeof e!="object"||e===null){a("openPlanner","An options object must be passed.","EFP001A00");return}const t=e.from?S(e.from):null;e.fromBookmarks?r.routePlannerStore.launchFromBookmarks(t??void 0):r.routePlannerStore.launchFromSlugs(e.items??[],t??void 0)}startBuildRoute(){r.uiState.startBuildRoute()}applyParameters(e){typeof e!="string"&&a("applyParameters","A query string must be passed.","EFP000D00"),D(e)}getVisibility(){return r.uiState.visibility}setVisibility(e){(typeof e!="object"||!Object.keys(e).length)&&a("setVisibility","The parameter must be passed.","EFP000E00"),r.uiState.setVisibility(e)}findLocation(){r.routeStore.findLocation()}zoomIn(){r.uiState.zoomIn()}zoomOut(){r.uiState.zoomOut()}switchView(){r.maplibreStore.activateMaplibre()}setCamera(e){p("setCamera called with camera=%O",e);const t=I.safeParse(e);if(!t.success){a("setCamera",t.error.message,"EFP001B00");return}r.uiState.setMapSettings(te(t.data))}getCamera(){return re(r.uiState.mapSettings)}zoomTo(e,t){p("zoomTo called with selectors=%O options=%O",e,t);const o=P.safeParse(e);if(!o.success){a("zoomTo",o.error.message,"EFP001600");return}const n=w.safeParse(t);if(!n.success){a("zoomTo",n.error.message,"EFP001601");return}const s=this.getBounds(e);s&&this.fitBounds(s,t)}getBounds(e){p("getBounds called with selectors=%O",e);const t=P.safeParse(e);if(!t.success){a("getBounds",t.error.message,"EFP001400");return}const o=[];if(e.booths?.forEach(s=>{let i;s.externalId?i=r.boothStore.boothByExternalId.get(s.externalId):s.name&&(i=r.boothStore.boothByName.get(s.name.toLowerCase())),i?.rect&&o.push(i.rect)}),e.exhibitors?.forEach(s=>{let i;s.externalId?i=r.exhibitorStore.exhibitorByExternalId.get(s.externalId):s.name&&(i=r.exhibitorStore.exhibitorByName.get(s.name.toLowerCase())),i?.booths?.forEach(h=>{h.rect&&o.push(h.rect)})}),o.length===0)return;const n=E.fromUnion(...o);return{leftTop:{x:n.min.x,y:n.min.y},rightBottom:{x:n.max.x,y:n.max.y}}}fitBounds(e,t){if(p("fitBounds called with bounds=%O options=%O",e,t),!e){r.uiState.fitBounds();return}const o=U.safeParse(e);if(!o.success){a("fitBounds",o.error.message,"EFP001500");return}const n=w.safeParse(t);if(!n.success){a("fitBounds",n.error.message,"EFP001501");return}const s=E.fromMinMax({x:e.leftTop.x,y:e.leftTop.y},{x:e.rightBottom.x,y:e.rightBottom.y});r.uiState.moveToRect=t?.padding?s.expand(t.padding):s}getBoothRect(e){typeof e!="string"&&a("getBoothRect","A booth name must be passed.","EFP000F00");const t=S(e)?.rect;return t?l.fromBox(t):void 0}convertToGeo(e,t){if(!b?.properties?.config){a("convertToGeo","The coordinates cannot be converted because the GPS configuration is not defined.","EFP001000");return}if(!e||!t){a("convertToGeo","Both coordinates must be passed.","EFP001001");return}return ie(e,t,b.properties.config)}getGeoConfig(){const e=b?.properties?.config;return e?{bearing:e.bearing??0,p0:e.p0,p1:e.p1,p2:e.p2}:null}releaseResources(){window.removeEventListener("error",_),r.maplibreStore.dispose(),X(),Q(),Z(),this.root.unmount(),super.releaseResources()}search(e){return typeof e!="string"&&a("search","A search string must be passed.","EFP001100"),r.fuzzySearchEngineStore.loadEngine().then(()=>(r.searchStore.selectSearch(e),r.uiState.fuzzySearchItems.map(t=>({item:g(t.item),score:t.score}))))}getFloors(){return r.layerStore.floors.map(e=>({name:e.name,shortName:e.shortName,description:e.description,active:e.active,disabled:e.disabled,index:e.index}))}activateFloor(e){if(!e?.name&&e?.index==null){a("activateFloor","Invalid floorId. It must contain either a name or an index.","EFP001200");return}const t=this.getFloors();if(e.name){const o=t.find(n=>n.name===e.name||n.shortName===e.name);if(!o){a("activateFloor",`Floor with name "${e.name}" not found.`,"EFP001201");return}if(o.active)return;this.updateLayerVisibility(o.name,!0);return}if(e.index!==null){const o=t.find(s=>s.index===e.index),n=o?.name;if(!n){a("activateFloor",`Floor at index ${e.index} does not exist.`,"EFP001203");return}if(o.active)return;this.updateLayerVisibility(n,!0);return}}showPathway(e,t){const{boothExternalIds:o,exhibitorExternalIds:n}=t?.length?k(t):{boothExternalIds:[],exhibitorExternalIds:[]};H({pathwayId:e,boothIds:o,exhibitorIds:n})}showPathwayOnly(e,t){this.activateFloor({name:t}),r.layerStore.showPathWay(e),r.uiState.setPathwayOnlyMode(!0);const o=r.layerStore.findLayer(e),n=r.layerStore.findLayer(t),s=o?.rect||o?.viewbox?o:n;if(s?.rect||s?.viewbox){const i=s.viewbox??s.rect;r.uiState.moveToRect=i.clone()}}hidePathways(){this.highlightBooths([]),r.layerStore.hidePathways(),r.uiState.setPathwayOnlyMode(!1)}showSearch(){r.selectSearch("")}changeLanguage(e){const t=e?.toLowerCase?.();if(!ne(t)){a("changeLanguage",`Language "${e}" was not found. Available languages: ${se().map(o=>o.id).join(",")}`,"EFP001300");return}ae(t)}isGpsTrackingEnabled(){return r.routeStore.gpsEnabled}setGpsTrackingEnabled(e){r.routeStore.setGpsTrackingEnabled(e)}deselectCurrentPosition(){r.routeStore.selectCurrentPosition(null,!1)}deselectRoute(){r.routeStore.selectRoute(null),r.routeStore.setOnlyAccessible(!1)}reset(){this.selectBooth(""),this.selectExhibitor(""),this.selectCategory(),this.deselectCurrentPosition(),this.deselectRoute(),this.highlightEntities([]),r.uiState.kioskData&&r.resetCameraFn?r.resetCameraFn?.():this.fitBounds()}selectAccessibleRoute(e){r.routeStore.setOnlyAccessible(!0),this.selectRoute(e)}}function m(f){return typeof f=="string"?S(f):r.routeStore.getNearestBooth(f)}let L=0;function a(f,e,t){const o=`Error calling "${f}" SDK method.`,n=`${e.endsWith(".")?e:e+"."} More information at`;let s="https://js-sdk.expofp.com/api/packages";if(t&&(s+=`#error-${t}`),console.error(`${o} ${n} ${s}`),r.fp.disableRuntimeAlerts)return;r.uiState.setGlobalErrorMessage({title:o,body:T(A,{children:[n," ",x("a",{href:s,target:"_blank",rel:"noreferrer",children:s})]})}),clearTimeout(L);const i=8e3;L=window.setTimeout(()=>{const h=async()=>{r.uiState.globalErrorMessages.length>0&&(r.uiState.popGlobalErrorMessage(),await new Promise(u=>setTimeout(u,i/2)),h())};h()},i)}class l{get h(){return Math.abs(this.y2-this.y1)}get w(){return Math.abs(this.x2-this.x1)}get cx(){return(this.x1+this.x2)/2}get cy(){return(this.y1+this.y2)/2}constructor(e,t,o,n){if(e>o){const s=e;e=o,o=s}if(t>n){const s=t;t=n,n=s}this.x1=e,this.y1=t,this.x2=o,this.y2=n}static fromBox(e){return new l(e.min.x,e.min.y,e.max.x,e.max.y)}static fromCxcywh(e,t,o,n){return new l(e-o/2,t-n/2,e+o/2,t+n/2)}contains(e){return e.x1>=this.x1&&e.x2<=this.x2&&e.y1>=this.y1&&e.y2<=this.y2}intersects(e){const t=Math.max(this.x1,e.x1),o=Math.min(this.x2,e.x2),n=Math.max(this.y1,e.y1),s=Math.min(this.y2,e.y2);return o>=t&&s>=n}getIntersection(e){const t=Math.max(this.x1,e.x1),o=Math.min(this.x2,e.x2),n=Math.max(this.y1,e.y1),s=Math.min(this.y2,e.y2);return o>=t&&s>=n?new l(t,n,o,s):new l(0,0,0,0)}getRotated90(){return l.fromCxcywh(this.cx,this.cy,this.h,this.w)}normalize(e,t){return new l(this.x1/e,this.y1/t,this.x2/e,this.y2/t)}withPadding(e,t=e){return this.w<e*2||this.h<t*2?this:l.fromCxcywh(this.cx,this.cy,this.w-e*2,this.h-t*2)}scale(e){return new l(this.x1*e,this.y1*e,this.x2*e,this.y2*e)}getArea(){return this.w*this.h}clone(){return new l(this.x1,this.y1,this.x2,this.y2)}translate(e,t){return this.x1+=e,this.x2+=e,this.y1+=t,this.y2+=t,this}equals(e){return e.x1===this.x1&&e.x2===this.x2&&e.y1===this.y1&&e.y2===this.y2}toString(){return this.x1+","+this.y1+","+this.w+","+this.h}containsPoint(e,t){return e>=this.x1&&e<=this.x2&&t>=this.y1&&t<=this.y2}}
|
|
1
|
+
import{Fragment as A,jsx as x,jsxs as T}from"react/jsx-runtime";import{Box as E}from"@expofp/geometry";import{CameraSchema as I}from"@expofp/schema";import{optimizeWaypointOrder as M}from"@expofp/wayfinding";import{ErrorBoundary as R}from"@sentry/react";import $ from"debug";import{reaction as V}from"mobx";import{createRoot as z}from"react-dom/client";import{install as j}from"resize-observer";import G from"./components/Layout";import{MAX_ROUTE_WAYPOINTS as d}from"./constants";import N from"./data";import{fpGeo as b}from"./data/fpGeo";import q from"./floorplan.loader";import{shouldLoadIntercom as O}from"./intercom";import{BoundsSchema as U,POISelectorsSchema as P,ZoomToOptionsSchema as w}from"./schemas/sdk.schemas";import{applyDeclarativeConfig as Y,applyParameters as D,applyPathway as H,initUrlRouting as W}from"./services/url-dispatch";import{destroyUrlSync as X}from"./services/url-sync";import r from"./store";import{bindRootElement as K,destroyUiHandlers as Q}from"./store/init/init-ui";import{findBooth as S,Route as B,separateExternalIds as k}from"./store/RouteStore";import{destroyGtag as Z,GaEventActions as v,sendEventToGa as F,setConsentSettings as J}from"./tools/gtag";import _ from"./tools/report-error";import ee,{resetTelemetry as te}from"./tools/track-event";import{cameraToMapSettings as re,mapSettingsToCamera as oe}from"./utils/camera-map-settings";import{getStorage as C}from"./utils/entity-storage";import{getMostFrequent as ie}from"./utils/getMostFrequent";import{convertLocalToGps as se,isValidPointCoords as y}from"./utils/gps";import{getLocales as ne,hasLocale as ae,setLocale as he}from"./utils/i18n";import{mapEntity as g}from"./utils/mapEntity";const p=$("efp:api");j();export default class ce extends q{init(){Y(),this.ignoreQuery||W(this.offHistory),ee("load"),K(r),r.fp=this,J(this.consent),F(v.Load,""),this.root=z(this.renderTarget),this.root.render(x(R,{children:x(G,{offHistory:this.offHistory,consent:this.consent})})),F(v.Rendered,""),V(()=>r.layerStore.layersLoaded,()=>{this.resolveReady(),r.initialized||this.onInit?.(this),r.initialized=!0});const e=O(N);e&&import("./intercom/bootIntercom").then(({bootIntercom:t})=>t(e)).catch(()=>{})}selectBooth(e){if(typeof e!="string"&&!Array.isArray(e)){a("selectBooth","Parameter must be a string or an array of strings.","EFP000000");return}const t=r.boothStore.booths.filter(o=>typeof e=="string"?o.name===e||o.externalId===e:e.includes(o.name)||e.includes(o.externalId));r.selectBooth(t)}selectExhibitor(e){if(typeof e!="string"&&!Array.isArray(e)){a("selectExhibitor","Parameter must be a string or an array of strings.","EFP000100");return}if(!e?.length){r.uiState.menu=!1,r.searchStore.resetSearchBox(),r.uiState.details=null;return}const t=r.exhibitorStore.exhibitors.filter(s=>typeof e=="string"?s.name===e||s.externalId===e:e.includes(s.name)||e.includes(s.externalId));if(!t?.length)return;if(typeof e=="string"){r.selectExhibitor(t[0]),r.moveToList([t[0]]);return}const o=t.flatMap(s=>s.booths.map(i=>i.layer)),n=ie(o.map(s=>s.description));n&&r.layerStore.updateVisibility(n,!0),r.uiState.menu=!1,r.searchStore.resetSearchBox(),r.uiState.details=null,r.uiState.list={type:"filter",items:t,query:{key:"exhibitors",value:t.map(s=>s.name).join(",")}},r.moveToList()}highlightExhibitors(e){Array.isArray(e)||a("highlightExhibitors","Parameter must be an array of strings.","EFP000200"),r.boothStore.highlightedByExternalIds=[],r.exhibitorStore.highlightedByExternalIds=[...e]}highlightBooths(e){Array.isArray(e)||a("highlightBooths","Parameter must be an array of strings.","EFP000300"),r.exhibitorStore.highlightedByExternalIds=[],r.boothStore.highlightedByExternalIds=[...e]}highlightEntities(e){Array.isArray(e)||a("highlightEntities","Parameter must be an array of strings.","EFP000400");const{boothExternalIds:t,exhibitorExternalIds:o}=k(e);r.boothStore.highlightedByExternalIds=[...t],r.exhibitorStore.highlightedByExternalIds=[...o]}selectRoute(e,t){if(Array.isArray(e)){let o=[...e];const n=o.shift(),s=o.pop();if(o.length>d)throw new Error(`The maximum number of waypoints is ${d}.`);if(!n||!s){a("selectRoute","Invalid route format: When providing an array, it must include at least two points: a start and a destination.","EFP000401");return}r.routeStore.selectRoute(new B(m(n),m(s),o.map(m)));return}e||a("selectRoute","At a minimum, the starting point must be passed.","EFP000402"),r.routeStore.selectRoute(new B(m(e),m(t)))}getOptimizedRoutes(e){if(!Array.isArray(e))return a("getOptimizedRoutes","Parameter must be an array.","EFP000500"),[];if(e.length>d)throw new Error(`The maximum number of waypoints is ${d}.`);const t=e.map(m).filter(n=>!!n);if(!t.length)throw new Error("No booths found for the provided waypoints.");const o=new Map;for(const n of t){const s=n.layer?.name??"",i=o.get(s);i?i.push(n):o.set(s,[n])}return Array.from(o.values()).map(n=>({waypoints:M(n.map(s=>[s.name,{x:s.rect.center.x,y:s.rect.center.y}]))}))}selectCurrentPosition(e,t,o){const n=y(e.x)&&y(e.y),s=y(e.lng)&&y(e.lat);!n&&!s&&a("selectCurrentPosition","A point must be passed. Either (x,y) or (lat,lng) are required.","EFP000600"),r.routeStore.selectCurrentPosition(e,t,o),this.onCurrentPositionChanged?.(e)}setBookmarks(e){(!Array.isArray(e)||!e.length)&&a("setBookmarks","Parameter must be an array.","EFP000700"),e.forEach(t=>{const o=r.exhibitorStore.exhibitors.find(n=>n.name===t.name||n.externalId===t.externalId);o&&(o.bookmarked=t.bookmarked)})}setEntitiesBookmarks(e){if(!Array.isArray(e)||!e.length){a("setEntitiesBookmarks","Parameter must be an array.","EFP000701");return}const t=["exhibitor","event","speaker","booth"],o=e.find(i=>!i.type||!t.includes(i.type));if(o){a("setEntitiesBookmarks",`Invalid entity type: ${o.type}. Must be one of: ${t.join(", ")}.`,"EFP000702");return}const n=C("bookmarked"),s={exhibitor:{existingIds:new Set(n.exhibitors||[]),finder:i=>r.exhibitorStore.findExhibitor(i),replacer:i=>r.exhibitorStore.replaceBookmarked(i)},event:{existingIds:new Set(n.events||[]),finder:i=>r.eventStore.findByNameOrSlug(i),replacer:i=>r.eventStore.replaceBookmarked(i)},speaker:{existingIds:new Set(n.speakers||[]),finder:i=>r.speakerStore.speakers.find(h=>h.name===i||h.externalId===i||h.slug===i),replacer:i=>r.speakerStore.replaceBookmarked(i)},booth:{existingIds:new Set(n.booths||[]),finder:i=>{const h=r.boothStore.findBooth(i);return h?.exhibitors.length===0?h:void 0},replacer:i=>r.boothStore.replaceBookmarked(i)}};e.forEach(i=>{const h=s[i.type],u=i.name||i.externalId||"",c=h.finder(u);c?i.bookmarked?h.existingIds.add(c.id):h.existingIds.delete(c.id):console.warn(`Entity not found: ${i.type} with query "${u}"`)}),Object.values(s).forEach(i=>{i.replacer(Array.from(i.existingIds))})}setEntitiesVisited(e){if(!Array.isArray(e)||!e.length){a("setEntitiesVisited","Parameter must be an array.","EFP000703");return}const t=["exhibitor","event"],o=e.find(i=>!i.type||!t.includes(i.type));if(o){a("setEntitiesVisited",`Invalid entity type: ${o.type}. Must be one of: ${t.join(", ")}.`,"EFP000704");return}const n=C("visited"),s={exhibitor:{existingIds:new Set(n.exhibitors||[]),finder:i=>r.exhibitorStore.findExhibitor(i),replacer:i=>r.exhibitorStore.replaceVisited(i)},event:{existingIds:new Set(n.events||[]),finder:i=>r.eventStore.findByNameOrSlug(i),replacer:i=>r.eventStore.replaceVisited(i)}};e.forEach(i=>{const h=s[i.type],u=i.name||i.externalId||"",c=h.finder(u);c?i.visited?h.existingIds.add(c.id):h.existingIds.delete(c.id):console.warn(`Entity not found: ${i.type} with query "${u}"`)}),Object.values(s).forEach(i=>{i.replacer(Array.from(i.existingIds))})}setMarkers(e){if(!e||!Array.isArray(e.icons)||!Array.isArray(e.markers)){a("setMarkers","Invalid input.","EFP000800");return}r.routeStore.setMarkers(e)}selectMarker(e,t=!0){return typeof e!="string"&&a("selectMarker","The identifier must be passed.","EFP000900"),r.routeStore.selectMarker(e,t)}drawCircles(e){Array.isArray(e)||a("drawCircles","Invalid input.","EFP000A00"),r.uiState.debugCircles=e}checkRoutes(){r.routeStore.checkRoutes()}updateLayerVisibility(e,t){typeof e!="string"&&a("updateLayerVisibility","The layer name (string) must be passed.","EFP000B00"),t||a("updateLayerVisibility","Passing a false value to visible will have no effect.","EFP000B01"),r.layerStore.updateVisibility(e,t)}getCenterCoordinates(){return r.fp.getCenterCoordinates()}exhibitorsList(){return r.exhibitorStore.exhibitors.map(e=>g(e))}boothsList(){return r.boothStore.booths.map(e=>g(e))}categoriesList(){return r.categoryStore.categories.map(e=>g(e))}selectCategory(e){if(e==null||typeof e!="string"){r.searchStore.selectSearch();return}const t=e?.toLowerCase(),o=r.categoryStore.categories.find(({name:n,slug:s})=>n?.toLowerCase()===t||s?.toLowerCase()===t);if(!o){a("selectCategory",`Category ${e} not found.`,"EFP000C01");return}r.selectCategory(o)}select(e){if(typeof e!="string"){a("select","Parameter must be a string.","EFP001700");return}const t=e,o=t?.toLowerCase(),n=r.boothStore.booths.find(c=>c.slug?.toLowerCase()===o||c.externalId?.toLowerCase()===o||c.externalId?.toLowerCase()?.replace(/\s+/g,"")===o);if(n){setTimeout(()=>r.selectBooth(n),250);return}const s=r.eventStore.eventItems.find(c=>c.slug?.toLowerCase()===o||c.externalId?.toLowerCase()===o);if(s){r.selectEventItem(s,!0);return}const i=r.exhibitorStore.exhibitors.find(c=>c.slug?.toLowerCase()===o||c.externalId?.toLowerCase()===o);if(i){setTimeout(()=>r.clickExhibitor(i),250);return}const h=r.categoryStore.categories.find(c=>c.slug===t);if(h){r.selectCategory(h);return}const u=r.speakerStore.findBySlug(t);if(u){r.selectSpeaker(u,!0);return}t.includes("heatmap=true")||r.searchStore.selectSearch(t)}showList(e){const t={bookmarks:()=>r.selectBookmarks(),visited:()=>r.selectVisited(),sessions:()=>r.selectSessions(),exhibitors:()=>r.selectExhibitors(),speakers:()=>r.selectSpeakers(),tours:()=>r.selectTours(),language:()=>r.selectLanguage()},o=t[e];if(!o){a("showList",`Unknown list "${e}". Must be one of: ${Object.keys(t).join(", ")}.`,"EFP001800");return}o()}selectTour(e){if(typeof e!="string"||!e){a("selectTour","A tour id must be passed.","EFP001900");return}const t=r.toursStore.getTourById(e);t?r.toursStore.launchTour(t,t.name,t.description):(console.warn(`Route with id "${e}" not found`),r.selectTours())}openPlanner(e={}){if(typeof e!="object"||e===null){a("openPlanner","An options object must be passed.","EFP001A00");return}const t=e.from?S(e.from):null;e.fromBookmarks?r.routePlannerStore.launchFromBookmarks(t??void 0):r.routePlannerStore.launchFromSlugs(e.items??[],t??void 0)}startBuildRoute(){r.uiState.startBuildRoute()}applyParameters(e){typeof e!="string"&&a("applyParameters","A query string must be passed.","EFP000D00"),D(e)}getVisibility(){return r.uiState.visibility}setVisibility(e){(typeof e!="object"||!Object.keys(e).length)&&a("setVisibility","The parameter must be passed.","EFP000E00"),r.uiState.setVisibility(e)}findLocation(){r.routeStore.findLocation()}zoomIn(){r.uiState.zoomIn()}zoomOut(){r.uiState.zoomOut()}switchView(){r.maplibreStore.activateMaplibre()}setCamera(e){p("setCamera called with camera=%O",e);const t=I.safeParse(e);if(!t.success){a("setCamera",t.error.message,"EFP001B00");return}r.uiState.setMapSettings(re(t.data))}getCamera(){return oe(r.uiState.mapSettings)}zoomTo(e,t){p("zoomTo called with selectors=%O options=%O",e,t);const o=P.safeParse(e);if(!o.success){a("zoomTo",o.error.message,"EFP001600");return}const n=w.safeParse(t);if(!n.success){a("zoomTo",n.error.message,"EFP001601");return}const s=this.getBounds(e);s&&this.fitBounds(s,t)}getBounds(e){p("getBounds called with selectors=%O",e);const t=P.safeParse(e);if(!t.success){a("getBounds",t.error.message,"EFP001400");return}const o=[];if(e.booths?.forEach(s=>{let i;s.externalId?i=r.boothStore.boothByExternalId.get(s.externalId):s.name&&(i=r.boothStore.boothByName.get(s.name.toLowerCase())),i?.rect&&o.push(i.rect)}),e.exhibitors?.forEach(s=>{let i;s.externalId?i=r.exhibitorStore.exhibitorByExternalId.get(s.externalId):s.name&&(i=r.exhibitorStore.exhibitorByName.get(s.name.toLowerCase())),i?.booths?.forEach(h=>{h.rect&&o.push(h.rect)})}),o.length===0)return;const n=E.fromUnion(...o);return{leftTop:{x:n.min.x,y:n.min.y},rightBottom:{x:n.max.x,y:n.max.y}}}fitBounds(e,t){if(p("fitBounds called with bounds=%O options=%O",e,t),!e){r.uiState.fitBounds();return}const o=U.safeParse(e);if(!o.success){a("fitBounds",o.error.message,"EFP001500");return}const n=w.safeParse(t);if(!n.success){a("fitBounds",n.error.message,"EFP001501");return}const s=E.fromMinMax({x:e.leftTop.x,y:e.leftTop.y},{x:e.rightBottom.x,y:e.rightBottom.y});r.uiState.moveToRect=t?.padding?s.expand(t.padding):s}getBoothRect(e){typeof e!="string"&&a("getBoothRect","A booth name must be passed.","EFP000F00");const t=S(e)?.rect;return t?l.fromBox(t):void 0}convertToGeo(e,t){if(!b?.properties?.config){a("convertToGeo","The coordinates cannot be converted because the GPS configuration is not defined.","EFP001000");return}if(!e||!t){a("convertToGeo","Both coordinates must be passed.","EFP001001");return}return se(e,t,b.properties.config)}getGeoConfig(){const e=b?.properties?.config;return e?{bearing:e.bearing??0,p0:e.p0,p1:e.p1,p2:e.p2}:null}releaseResources(){window.removeEventListener("error",_),r.maplibreStore.dispose(),X(),Q(),Z(),te(),this.root.unmount(),super.releaseResources()}search(e){return typeof e!="string"&&a("search","A search string must be passed.","EFP001100"),r.fuzzySearchEngineStore.loadEngine().then(()=>(r.searchStore.selectSearch(e),r.uiState.fuzzySearchItems.map(t=>({item:g(t.item),score:t.score}))))}getFloors(){return r.layerStore.floors.map(e=>({name:e.name,shortName:e.shortName,description:e.description,active:e.active,disabled:e.disabled,index:e.index}))}activateFloor(e){if(!e?.name&&e?.index==null){a("activateFloor","Invalid floorId. It must contain either a name or an index.","EFP001200");return}const t=this.getFloors();if(e.name){const o=t.find(n=>n.name===e.name||n.shortName===e.name);if(!o){a("activateFloor",`Floor with name "${e.name}" not found.`,"EFP001201");return}if(o.active)return;this.updateLayerVisibility(o.name,!0);return}if(e.index!==null){const o=t.find(s=>s.index===e.index),n=o?.name;if(!n){a("activateFloor",`Floor at index ${e.index} does not exist.`,"EFP001203");return}if(o.active)return;this.updateLayerVisibility(n,!0);return}}showPathway(e,t){const{boothExternalIds:o,exhibitorExternalIds:n}=t?.length?k(t):{boothExternalIds:[],exhibitorExternalIds:[]};H({pathwayId:e,boothIds:o,exhibitorIds:n})}showPathwayOnly(e,t){this.activateFloor({name:t}),r.layerStore.showPathWay(e),r.uiState.setPathwayOnlyMode(!0);const o=r.layerStore.findLayer(e),n=r.layerStore.findLayer(t),s=o?.rect||o?.viewbox?o:n;if(s?.rect||s?.viewbox){const i=s.viewbox??s.rect;r.uiState.moveToRect=i.clone()}}hidePathways(){this.highlightBooths([]),r.layerStore.hidePathways(),r.uiState.setPathwayOnlyMode(!1)}showSearch(){r.selectSearch("")}changeLanguage(e){const t=e?.toLowerCase?.();if(!ae(t)){a("changeLanguage",`Language "${e}" was not found. Available languages: ${ne().map(o=>o.id).join(",")}`,"EFP001300");return}he(t)}isGpsTrackingEnabled(){return r.routeStore.gpsEnabled}setGpsTrackingEnabled(e){r.routeStore.setGpsTrackingEnabled(e)}deselectCurrentPosition(){r.routeStore.selectCurrentPosition(null,!1)}deselectRoute(){r.routeStore.selectRoute(null),r.routeStore.setOnlyAccessible(!1)}reset(){this.selectBooth(""),this.selectExhibitor(""),this.selectCategory(),this.deselectCurrentPosition(),this.deselectRoute(),this.highlightEntities([]),r.uiState.kioskData&&r.resetCameraFn?r.resetCameraFn?.():this.fitBounds()}selectAccessibleRoute(e){r.routeStore.setOnlyAccessible(!0),this.selectRoute(e)}}function m(f){return typeof f=="string"?S(f):r.routeStore.getNearestBooth(f)}let L=0;function a(f,e,t){const o=`Error calling "${f}" SDK method.`,n=`${e.endsWith(".")?e:e+"."} More information at`;let s="https://js-sdk.expofp.com/api/packages";if(t&&(s+=`#error-${t}`),console.error(`${o} ${n} ${s}`),r.fp.disableRuntimeAlerts)return;r.uiState.setGlobalErrorMessage({title:o,body:T(A,{children:[n," ",x("a",{href:s,target:"_blank",rel:"noreferrer",children:s})]})}),clearTimeout(L);const i=8e3;L=window.setTimeout(()=>{const h=async()=>{r.uiState.globalErrorMessages.length>0&&(r.uiState.popGlobalErrorMessage(),await new Promise(u=>setTimeout(u,i/2)),h())};h()},i)}class l{get h(){return Math.abs(this.y2-this.y1)}get w(){return Math.abs(this.x2-this.x1)}get cx(){return(this.x1+this.x2)/2}get cy(){return(this.y1+this.y2)/2}constructor(e,t,o,n){if(e>o){const s=e;e=o,o=s}if(t>n){const s=t;t=n,n=s}this.x1=e,this.y1=t,this.x2=o,this.y2=n}static fromBox(e){return new l(e.min.x,e.min.y,e.max.x,e.max.y)}static fromCxcywh(e,t,o,n){return new l(e-o/2,t-n/2,e+o/2,t+n/2)}contains(e){return e.x1>=this.x1&&e.x2<=this.x2&&e.y1>=this.y1&&e.y2<=this.y2}intersects(e){const t=Math.max(this.x1,e.x1),o=Math.min(this.x2,e.x2),n=Math.max(this.y1,e.y1),s=Math.min(this.y2,e.y2);return o>=t&&s>=n}getIntersection(e){const t=Math.max(this.x1,e.x1),o=Math.min(this.x2,e.x2),n=Math.max(this.y1,e.y1),s=Math.min(this.y2,e.y2);return o>=t&&s>=n?new l(t,n,o,s):new l(0,0,0,0)}getRotated90(){return l.fromCxcywh(this.cx,this.cy,this.h,this.w)}normalize(e,t){return new l(this.x1/e,this.y1/t,this.x2/e,this.y2/t)}withPadding(e,t=e){return this.w<e*2||this.h<t*2?this:l.fromCxcywh(this.cx,this.cy,this.w-e*2,this.h-t*2)}scale(e){return new l(this.x1*e,this.y1*e,this.x2*e,this.y2*e)}getArea(){return this.w*this.h}clone(){return new l(this.x1,this.y1,this.x2,this.y2)}translate(e,t){return this.x1+=e,this.x2+=e,this.y1+=t,this.y2+=t,this}equals(e){return e.x1===this.x1&&e.x2===this.x2&&e.y1===this.y1&&e.y2===this.y2}toString(){return this.x1+","+this.y1+","+this.w+","+this.h}containsPoint(e,t){return e>=this.x1&&e<=this.x2&&t>=this.y1&&t<=this.y2}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{splitPlatformParams as s}from"@expofp/config";import{createBrowserHistory as
|
|
1
|
+
import{splitPlatformParams as s}from"@expofp/config";import{createBrowserHistory as g}from"history";import w from"../tools/logger";const t=g();let a=window.location.pathname;const o=[];let c="",r=!1,l=!1,u=0,h=()=>{},m;export function getLocationHistory(){return o}function d(e){if(!c)return a+e;const n=s(e).search,i=n==="?"?"":n;return a+(i?`${i}&${c}`:`?${c}`)}export function currentSearch(){return s(t.location.search).search}export function pushQuery(e){!r&&!l&&t.push(d(e))}export function replaceQuery(e){return r||l?!1:(t.replace(d(e)),!0)}export function disableUrlWrites(){r=!0}export function initUrlSync(e){r||=e.offHistory,h=e.onNavigate,a=window.location.pathname,c=s(t.location.search).platform,r||o.push(a+t.location.search),m=t.listen((n,i)=>{if(f(),r)return;const p=a+n.search;o[o.length-1]!==p&&o.push(p),w.log("history",i,n),i==="POP"&&h()})}export function destroyUrlSync(){r=!1,c="",o.length=0,f(),m?.()}function f(){l=!1,window.clearTimeout(u)}export function goBack(){l=!0,window.clearTimeout(u),u=window.setTimeout(f,1e3),t.goBack()}
|
|
@@ -1,12 +1,21 @@
|
|
|
1
1
|
import Color from 'color';
|
|
2
2
|
import { type GaEventActions } from '../tools/gtag';
|
|
3
3
|
import { BoothBase } from './BoothStore';
|
|
4
|
+
import { Exhibitor } from './ExhibitorStore';
|
|
4
5
|
import { type ListItem } from './types';
|
|
5
6
|
export default class HeatmapStore {
|
|
6
7
|
heatmapData: HeatmapData;
|
|
8
|
+
/**
|
|
9
|
+
* A booth view parked for the next `selectedExhibitor` reaction: a click on
|
|
10
|
+
* a booth with a single exhibitor opens that exhibitor's card, but counts as
|
|
11
|
+
* a view of the BOOTH. `exhibitor` is the selection it stands in for — the
|
|
12
|
+
* reaction honours the entry for that selection only, so one left behind by
|
|
13
|
+
* a click that changed nothing cannot mislabel a later, unrelated view.
|
|
14
|
+
*/
|
|
7
15
|
forceTrack: {
|
|
8
16
|
action: GaEventActions;
|
|
9
17
|
label: string;
|
|
18
|
+
exhibitor: Exhibitor;
|
|
10
19
|
} | null;
|
|
11
20
|
get minAndMaxClicks(): {
|
|
12
21
|
min: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__decorate as i}from"tslib";import{action as s,computed as m,observable as u,runInAction as S}from"mobx";import{LANGUAGE_TYPE as d}from"../constants";import{RendererService as y}from"../renderer";import{URLFilterManager as w}from"../services/URLFilterManager";import{GaEventActions as b}from"../tools/gtag";import v from"../tools/logger";import{isWebGlSupported as g}from"../utils";import{resetLocale as k}from"../utils/i18n";import h from"../utils/is-mobile";import n from"../utils/is-webview";import{sanitizeSearch as x}from"../utils/sanitizeText";import B from"./BookmarksStore";import _,{BoothBase as c,RegularBooth as L}from"./BoothStore";import C from"./CategoryFilterStore";import E,{Category as T}from"./CategoryStore";import I,{EventItem as F}from"./EventStore";import M,{Exhibitor as p}from"./ExhibitorStore";import O from"./FuzzySearchEngineStore";import z from"./HeatmapStore";import R from"./IntercomStore";import A,{LayersMode as f}from"./LayerStore";import P from"./MaplibreStore";import V from"./OverlayStore";import G from"./PoiMarkerStore";import q from"./PoiTypeStore";import{SearchShortcutProvider as N}from"./providers/SearchShortcutProvider";import{SessionsShortcutProvider as U}from"./providers/SessionsShortcutProvider";import{SpeakerShortcutProvider as W}from"./providers/SpeakerShortcutProvider";import j from"./RoutePlannerStore";import H from"./RouteStore";import K from"./SearchButtonsStore";import Y from"./SearchStore";import $ from"./SessionsFilterStore";import{ShortcutRegistry as D}from"./ShortcutRegistry";import J from"./SpeakerFilterStore";import Q from"./SpeakerStore";import{SpeakerItem as X}from"./SpeakerStore";import Z from"./ToursStore";import tt from"./UIState";export default class e{setResetCameraFn(t){this.resetCameraFn=t}constructor(){this.rendererService=new y,this.initialized=!1,this.categoryStore=new E(this),this.exhibitorStore=new M(this),this.boothStore=new _(this),this.routeStore=new H(this),this.routePlannerStore=new j(this),this.toursStore=new Z(this),this.uiState=new tt(this),this.overlayStore=new V(this),this.maplibreStore=new P(this),this.layerStore=new A,this.intercomStore=new R,this.eventStore=new I(this),this.heatmapStore=new z,this.poiTypeStore=new q(this),this.poiMarkerStore=new G(this),this.fuzzySearchEngineStore=new O(["name","title","fullName","booths.name"]),this.categoryFilterStore=new C(this),this.sessionsFilterStore=new $(this),this.speakerStore=new Q(this),this.speakerFilterStore=new J(this),this.searchStore=new Y(this),this.searchButtonsStore=new K(this),this.bookmarksStore=new B(this),this.urlFilterManager=new w(this),this.shortcutRegistry=new D,this.registerShortcutProviders()}selectExhibitor(t,r=!0){this.uiState.hoveredExhibitor=null,this.uiState.details=t;var o=t.booths.filter(a=>a.visible),l=t.booths.filter(a=>!a.visible);!o.length&&l.length&&this.layerStore.updateVisibility(l[0].layer,!0),r&&setTimeout(()=>this.moveToList(t.booths.filter(a=>a.visible)),n||h?500:50)}selectBooth(t,r=!0){let o=Array.isArray(t)?t:[t];this.uiState.details=o[0],o.length===1&&o[0].schedule?.length&&(this.uiState.desiredOverlaySize="medium"),o.length===1&&o[0].layer&&!o[0].visible&&this.layerStore.mode===f.Radio&&this.layerStore.updateVisibility(o[0].layer,!0),r&&setTimeout(()=>this.moveToList(o),n||h?500:50)}reset(){const t=window.__searchi;t&&t.querySelector&&t.querySelector("input[type=search]")&&t.querySelector("input[type=search]").blur&&t.querySelector("input[type=search]").blur(),window.setTimeout(()=>{this.uiState.setKioskModeEnabled||k().then(()=>{S(()=>{this.selectSearch(""),this.uiState.details=null,this.resetCameraFn?.(),this.uiState.menu=!1,this.searchStore.resetSearchBox(),this.searchButtonsStore.clearAllFilters()}),setTimeout(()=>{S(()=>{this.uiState.inIdle=!0})},100)})},1e3)}selectNone(){window.__resett&&window.__resett(),this.uiState.details=this.uiState.selectedCategory}selectBookmarks(){this.uiState.details=null,this.uiState.list={type:"bookmarks"}}selectVisited(){this.uiState.details=null,this.uiState.list={type:"visited"}}selectLanguage(){this.uiState.details=null,this.uiState.list={type:d}}selectCategory(t){window.__resett&&window.__resett(),this.uiState.details=t,this.uiState.list={type:"category",category:t},this.uiState.desiredOverlaySize="full",t.exhibitors.find(o=>o.booths.find(l=>l.visible))||this.layerStore.updateVisibility(t.exhibitors[0]?.booths[0]?.layer,!0),setTimeout(()=>{this.uiState.moveToBooths=t.exhibitors.filter(o=>o.booths.find(l=>l.visible)).flatMap(o=>o.booths)},200)}selectEventItem(t,r=!0){if(this.uiState.hoveredExhibitor=null,this.uiState.details=t,this.uiState.desiredOverlaySize="medium",t.boothId){const o=this.boothStore.booths.find(l=>l.id===t.boothId);o&&o.layer&&!o.visible&&this.layerStore.mode===f.Radio&&this.layerStore.updateVisibility(o.layer,!0)}r&&setTimeout(()=>{if(t.boothId){const o=this.boothStore.booths.find(l=>l.id===t.boothId);o&&this.moveToList([o])}},n||h?500:50)}selectSearch(t){window.__resett&&window.__resett(),this.uiState.details=null,this.speakerStore.clearSelectedSpeaker(),this.uiState.list={type:"search",text:x(t,Object.keys(this.uiState.mapSettings).map(r=>`${r}=`)),focused:!1},this.uiState.activeListIndex=-1}clickBookmarks(){window.__resett&&window.__resett(),this.uiState.menu=!1,this.selectBookmarks(),this.moveToList(),this.showMap()}clickVisited(){window.__resett&&window.__resett(),this.uiState.menu=!1,this.selectVisited(),this.moveToList(),this.showMap()}clickLanguage(){window.__resett&&window.__resett(),this.uiState.menu=!1,this.selectLanguage()}clickCategory(t){window.__resett&&window.__resett(),this.uiState.menu=!1,this.selectCategory(t),this.uiState.onCategoryClick&&this.uiState.onCategoryClick({id:t.id,name:t.name,exhibitors:t.exhibitors.map(r=>r.id)}),setTimeout(()=>{this.moveToList(),this.showMap()},100)}clickSeminars(){this.clickCategory(this.categoryStore.seminarsCategory)}clickBoothInList(t){window.__resett&&window.__resett(),this.uiState.hoveredBooth=null,this.selectBooth(t),this.moveToList([t]),this.showMap()}clickBoothInList2(t){window.__resett&&window.__resett(),this.uiState.hoveredBooth=null,this.selectBooth(t,!1),window.setTimeout(()=>{this.moveToList([t]),this.showMap()},navigator.userAgent.toLowerCase().indexOf("android")>-1?400:50)}clickBooth(t){if(this.uiState.menu=!1,this.uiState.list.type==="sessions"&&this.searchStore.selectSearch(),this.uiState.list.type==="speakers"&&this.searchStore.selectSearch(),this.uiState.list.type==="tours"&&this.searchStore.selectSearch(),this.uiState.list.type==="multi-point-tour"&&this.searchStore.selectSearch(),!(this.uiState.selectedRoute?.from&&this.uiState.selectedRoute?.to)){if(this.uiState.selectedRoute?.to&&!this.uiState.selectedRoute?.from&&t){this.routeStore.setStartPoint(t);return}if(t)this.routeStore.tempToBooth=t;else{this.uiState.details=null,this.fp.hidePathways(),this.uiState.list={type:"search",text:"",focused:!1},this.uiState.onBoothClick&&this.uiState.onBoothClick({target:null});return}if(this.uiState.onBoothClick){const r={name:"",description:""},o={target:{...t,layer:t.layer||r}};this.uiState.onBoothClick(o)}t.exhibitors.length===1&&t instanceof L?(this.heatmapStore.forceTrack={action:b.ViewBooth,label:t.name},this.selectExhibitor(t.exhibitors[0],!1)):this.selectBooth(t,!1),this.showMap()}}clickExhibitor2(t){this.selectExhibitor(t,!0),this.showMap()}clickExhibitor(t){window.setTimeout(()=>{this.clickExhibitor2(t)},navigator.userAgent.toLowerCase().indexOf("android")>-1?400:50)}showMap(){this.uiState.overlayPosition==="bottom"&&g&&(this.uiState.desiredOverlaySize="medium")}showOverlay(){this.uiState.overlayPosition==="bottom"&&(this.uiState.desiredOverlaySize="full")}toggleMapOverlay(){this.uiState.overlayPosition==="bottom"&&this.uiState.overlaySize==="full"?this.uiState.desiredOverlaySize="medium":this.uiState.overlayPosition==="bottom"&&this.uiState.overlaySize!=="full"&&(this.uiState.desiredOverlaySize="full")}moveToList(t){t=t||this.uiState.listItems;const r=[];t.forEach(o=>{if(o instanceof p)r.push(...o.booths.filter(l=>l.visible));else if(o instanceof c)o.visible&&r.push(o);else if(o instanceof F&&o.boothId){const l=this.boothStore.boothById.get(o.boothId);l?.visible&&r.push(l)}else o instanceof X&&this.speakerStore.getEventsBySpeaker(o.id).forEach(l=>{if(!l.boothId)return;const a=this.boothStore.boothById.get(l.boothId);a?.visible&&r.push(a)})}),this.uiState.moveToBooths=r}moveToExhibitor(t){this.moveToList([t])}changeActiveListIndex(t){let r=this.uiState.activeListIndex+t;r=Math.max(0,Math.min(this.uiState.listItems.length-1,r)),this.uiState.activeListIndex=r}toggleModal(t){this.uiState.modalActive[t]=!this.uiState.modalActive[t]}openGallery(){this.uiState.galleryActive=!0}closeGallery(){this.uiState.galleryActive=!1}openActiveListItem(){const t=this.uiState.listItems[this.uiState.activeListIndex];t&&(v.log("Opening",t),t instanceof p?this.clickExhibitor(t):t instanceof T?this.clickCategory(t):t instanceof c&&this.clickBoothInList2(t))}toggleCategoryFilter(){this.uiState.categoryFilterOpen=!this.uiState.categoryFilterOpen}applyCategoryFilters(t){this.uiState.selectedCategoryFilters=t,this.uiState.categoryFilterOpen=!1}get filteredExhibitors(){return this.uiState.selectedCategoryFilters.length===0?this.exhibitorStore.exhibitors:this.exhibitorStore.exhibitors.filter(t=>this.uiState.selectedCategoryFilters.some(r=>t.categories.some(o=>o.id===r.id)))}selectSessions(){this.uiState.list={type:"sessions",text:"",focused:!1},this.uiState.menu=!1,this.uiState.selectedTrack=null,this.searchButtonsStore.setSubButtonId(null),this.searchButtonsStore.subButtonsEnabled&&this.searchButtonsStore.showSubButtons("sessions"),h&&(this.uiState.desiredOverlaySize="full")}selectExhibitors(){this.uiState.list={type:"exhibitors",text:"",focused:!1},this.uiState.menu=!1,h&&(this.uiState.desiredOverlaySize="full")}selectTours(){this.uiState.list={type:"tours",text:"",focused:!1},this.uiState.menu=!1,h&&(this.uiState.desiredOverlaySize="full")}selectSpeakers(){this.uiState.list={type:"speakers",text:"",focused:!1},this.uiState.menu=!1,h&&(this.uiState.desiredOverlaySize="full")}selectSpeaker(t,r=!0){this.speakerStore.selectSpeaker(t,r)}resetFilters(){this.searchButtonsStore.clearAllFilters()}registerShortcutProviders(){this.shortcutRegistry.register(new U(this)),this.shortcutRegistry.register(new W(this)),this.shortcutRegistry.register(new N(this))}}i([u],e.prototype,"initialized",void 0),i([u],e.prototype,"resetCameraFn",void 0),i([s],e.prototype,"setResetCameraFn",null),i([s],e.prototype,"selectExhibitor",null),i([s],e.prototype,"selectBooth",null),i([s],e.prototype,"reset",null),i([s],e.prototype,"selectNone",null),i([s],e.prototype,"selectBookmarks",null),i([s],e.prototype,"selectVisited",null),i([s],e.prototype,"selectLanguage",null),i([s],e.prototype,"selectCategory",null),i([s],e.prototype,"selectEventItem",null),i([s],e.prototype,"selectSearch",null),i([s],e.prototype,"clickBookmarks",null),i([s],e.prototype,"clickVisited",null),i([s],e.prototype,"clickLanguage",null),i([s],e.prototype,"clickCategory",null),i([s],e.prototype,"clickSeminars",null),i([s],e.prototype,"clickBoothInList",null),i([s],e.prototype,"clickBoothInList2",null),i([s],e.prototype,"clickBooth",null),i([s],e.prototype,"clickExhibitor2",null),i([s],e.prototype,"clickExhibitor",null),i([s],e.prototype,"showMap",null),i([s],e.prototype,"showOverlay",null),i([s],e.prototype,"toggleMapOverlay",null),i([s],e.prototype,"moveToList",null),i([s],e.prototype,"moveToExhibitor",null),i([s],e.prototype,"changeActiveListIndex",null),i([s],e.prototype,"toggleModal",null),i([s],e.prototype,"openGallery",null),i([s],e.prototype,"closeGallery",null),i([s],e.prototype,"openActiveListItem",null),i([s],e.prototype,"toggleCategoryFilter",null),i([s],e.prototype,"applyCategoryFilters",null),i([m],e.prototype,"filteredExhibitors",null),i([s],e.prototype,"selectSessions",null),i([s],e.prototype,"selectExhibitors",null),i([s],e.prototype,"selectTours",null),i([s],e.prototype,"selectSpeakers",null),i([s],e.prototype,"selectSpeaker",null),i([s],e.prototype,"resetFilters",null);
|
|
1
|
+
import{__decorate as o}from"tslib";import{action as s,computed as y,observable as S,runInAction as c}from"mobx";import{LANGUAGE_TYPE as w}from"../constants";import{RendererService as v}from"../renderer";import{URLFilterManager as b}from"../services/URLFilterManager";import{GaEventActions as n,sendEventToGa as p}from"../tools/gtag";import g from"../tools/logger";import{isWebGlSupported as k}from"../utils";import{resetLocale as x}from"../utils/i18n";import h from"../utils/is-mobile";import u from"../utils/is-webview";import{sanitizeSearch as B}from"../utils/sanitizeText";import _ from"./BookmarksStore";import L,{BoothBase as f,RegularBooth as E}from"./BoothStore";import C from"./CategoryFilterStore";import T,{Category as I}from"./CategoryStore";import F,{EventItem as M}from"./EventStore";import O,{Exhibitor as m}from"./ExhibitorStore";import z from"./FuzzySearchEngineStore";import R from"./HeatmapStore";import A from"./IntercomStore";import P,{LayersMode as d}from"./LayerStore";import V from"./MaplibreStore";import G from"./OverlayStore";import q from"./PoiMarkerStore";import N from"./PoiTypeStore";import{SearchShortcutProvider as U}from"./providers/SearchShortcutProvider";import{SessionsShortcutProvider as W}from"./providers/SessionsShortcutProvider";import{SpeakerShortcutProvider as j}from"./providers/SpeakerShortcutProvider";import D from"./RoutePlannerStore";import H from"./RouteStore";import K from"./SearchButtonsStore";import Y from"./SearchStore";import $ from"./SessionsFilterStore";import{ShortcutRegistry as J}from"./ShortcutRegistry";import Q from"./SpeakerFilterStore";import X from"./SpeakerStore";import{SpeakerItem as Z}from"./SpeakerStore";import tt from"./ToursStore";import et from"./UIState";export default class i{setResetCameraFn(t){this.resetCameraFn=t}constructor(){this.rendererService=new v,this.initialized=!1,this.categoryStore=new T(this),this.exhibitorStore=new O(this),this.boothStore=new L(this),this.routeStore=new H(this),this.routePlannerStore=new D(this),this.toursStore=new tt(this),this.uiState=new et(this),this.overlayStore=new G(this),this.maplibreStore=new V(this),this.layerStore=new P,this.intercomStore=new A,this.eventStore=new F(this),this.heatmapStore=new R,this.poiTypeStore=new N(this),this.poiMarkerStore=new q(this),this.fuzzySearchEngineStore=new z(["name","title","fullName","booths.name"]),this.categoryFilterStore=new C(this),this.sessionsFilterStore=new $(this),this.speakerStore=new X(this),this.speakerFilterStore=new Q(this),this.searchStore=new Y(this),this.searchButtonsStore=new K(this),this.bookmarksStore=new _(this),this.urlFilterManager=new b(this),this.shortcutRegistry=new J,this.registerShortcutProviders()}selectExhibitor(t,r=!0){this.uiState.hoveredExhibitor=null,this.uiState.details=t;var e=t.booths.filter(a=>a.visible),l=t.booths.filter(a=>!a.visible);!e.length&&l.length&&this.layerStore.updateVisibility(l[0].layer,!0),r&&setTimeout(()=>this.moveToList(t.booths.filter(a=>a.visible)),u||h?500:50)}selectBooth(t,r=!0){let e=Array.isArray(t)?t:[t];this.uiState.details=e[0],e.length===1&&e[0].schedule?.length&&(this.uiState.desiredOverlaySize="medium"),e.length===1&&e[0].layer&&!e[0].visible&&this.layerStore.mode===d.Radio&&this.layerStore.updateVisibility(e[0].layer,!0),r&&setTimeout(()=>this.moveToList(e),u||h?500:50)}reset(){const t=window.__searchi;t&&t.querySelector&&t.querySelector("input[type=search]")&&t.querySelector("input[type=search]").blur&&t.querySelector("input[type=search]").blur(),window.setTimeout(()=>{this.uiState.setKioskModeEnabled||x().then(()=>{c(()=>{this.selectSearch(""),this.uiState.details=null,this.resetCameraFn?.(),this.uiState.menu=!1,this.searchStore.resetSearchBox(),this.searchButtonsStore.clearAllFilters()}),setTimeout(()=>{c(()=>{this.uiState.inIdle=!0})},100)})},1e3)}selectNone(){window.__resett&&window.__resett(),this.uiState.details=this.uiState.selectedCategory}selectBookmarks(){this.uiState.details=null,this.uiState.list={type:"bookmarks"}}selectVisited(){this.uiState.details=null,this.uiState.list={type:"visited"}}selectLanguage(){this.uiState.details=null,this.uiState.list={type:w}}selectCategory(t){window.__resett&&window.__resett(),this.uiState.details=t,this.uiState.list={type:"category",category:t},this.uiState.desiredOverlaySize="full",t.exhibitors.find(e=>e.booths.find(l=>l.visible))||this.layerStore.updateVisibility(t.exhibitors[0]?.booths[0]?.layer,!0),setTimeout(()=>{this.uiState.moveToBooths=t.exhibitors.filter(e=>e.booths.find(l=>l.visible)).flatMap(e=>e.booths)},200)}selectEventItem(t,r=!0){if(this.uiState.hoveredExhibitor=null,this.uiState.details=t,this.uiState.desiredOverlaySize="medium",t.boothId){const e=this.boothStore.booths.find(l=>l.id===t.boothId);e&&e.layer&&!e.visible&&this.layerStore.mode===d.Radio&&this.layerStore.updateVisibility(e.layer,!0)}r&&setTimeout(()=>{if(t.boothId){const e=this.boothStore.booths.find(l=>l.id===t.boothId);e&&this.moveToList([e])}},u||h?500:50)}selectSearch(t){window.__resett&&window.__resett(),this.uiState.details=null,this.speakerStore.clearSelectedSpeaker(),this.uiState.list={type:"search",text:B(t,Object.keys(this.uiState.mapSettings).map(r=>`${r}=`)),focused:!1},this.uiState.activeListIndex=-1}clickBookmarks(){window.__resett&&window.__resett(),this.uiState.menu=!1,this.selectBookmarks(),this.moveToList(),this.showMap()}clickVisited(){window.__resett&&window.__resett(),this.uiState.menu=!1,this.selectVisited(),this.moveToList(),this.showMap()}clickLanguage(){window.__resett&&window.__resett(),this.uiState.menu=!1,this.selectLanguage()}clickCategory(t){window.__resett&&window.__resett(),this.uiState.menu=!1,this.selectCategory(t),this.uiState.onCategoryClick&&this.uiState.onCategoryClick({id:t.id,name:t.name,exhibitors:t.exhibitors.map(r=>r.id)}),setTimeout(()=>{this.moveToList(),this.showMap()},100)}clickSeminars(){this.clickCategory(this.categoryStore.seminarsCategory)}clickBoothInList(t){window.__resett&&window.__resett(),this.uiState.hoveredBooth=null,this.selectBooth(t),this.moveToList([t]),this.showMap()}clickBoothInList2(t){window.__resett&&window.__resett(),this.uiState.hoveredBooth=null,this.selectBooth(t,!1),window.setTimeout(()=>{this.moveToList([t]),this.showMap()},navigator.userAgent.toLowerCase().indexOf("android")>-1?400:50)}clickBooth(t){const r=this.uiState.details;if(this.uiState.menu=!1,this.uiState.list.type==="sessions"&&this.searchStore.selectSearch(),this.uiState.list.type==="speakers"&&this.searchStore.selectSearch(),this.uiState.list.type==="tours"&&this.searchStore.selectSearch(),this.uiState.list.type==="multi-point-tour"&&this.searchStore.selectSearch(),!(this.uiState.selectedRoute?.from&&this.uiState.selectedRoute?.to)){if(this.uiState.selectedRoute?.to&&!this.uiState.selectedRoute?.from&&t){this.routeStore.setStartPoint(t);return}if(t)this.routeStore.tempToBooth=t;else{this.uiState.details=null,this.fp.hidePathways(),this.uiState.list={type:"search",text:"",focused:!1},this.uiState.onBoothClick&&this.uiState.onBoothClick({target:null});return}if(this.uiState.onBoothClick){const e={name:"",description:""},l={target:{...t,layer:t.layer||e}};this.uiState.onBoothClick(l)}if(t.exhibitors.length===1&&t instanceof E){const e=t.exhibitors[0];r===e?p(n.ViewBooth,t.name):this.heatmapStore.forceTrack={action:n.ViewBooth,label:t.name,exhibitor:e},this.selectExhibitor(e,!1)}else r===t&&p(n.ViewBooth,t.name),this.selectBooth(t,!1);this.showMap()}}clickExhibitor2(t){this.selectExhibitor(t,!0),this.showMap()}clickExhibitor(t){window.setTimeout(()=>{this.clickExhibitor2(t)},navigator.userAgent.toLowerCase().indexOf("android")>-1?400:50)}showMap(){this.uiState.overlayPosition==="bottom"&&k&&(this.uiState.desiredOverlaySize="medium")}showOverlay(){this.uiState.overlayPosition==="bottom"&&(this.uiState.desiredOverlaySize="full")}toggleMapOverlay(){this.uiState.overlayPosition==="bottom"&&this.uiState.overlaySize==="full"?this.uiState.desiredOverlaySize="medium":this.uiState.overlayPosition==="bottom"&&this.uiState.overlaySize!=="full"&&(this.uiState.desiredOverlaySize="full")}moveToList(t){t=t||this.uiState.listItems;const r=[];t.forEach(e=>{if(e instanceof m)r.push(...e.booths.filter(l=>l.visible));else if(e instanceof f)e.visible&&r.push(e);else if(e instanceof M&&e.boothId){const l=this.boothStore.boothById.get(e.boothId);l?.visible&&r.push(l)}else e instanceof Z&&this.speakerStore.getEventsBySpeaker(e.id).forEach(l=>{if(!l.boothId)return;const a=this.boothStore.boothById.get(l.boothId);a?.visible&&r.push(a)})}),this.uiState.moveToBooths=r}moveToExhibitor(t){this.moveToList([t])}changeActiveListIndex(t){let r=this.uiState.activeListIndex+t;r=Math.max(0,Math.min(this.uiState.listItems.length-1,r)),this.uiState.activeListIndex=r}toggleModal(t){this.uiState.modalActive[t]=!this.uiState.modalActive[t]}openGallery(){this.uiState.galleryActive=!0}closeGallery(){this.uiState.galleryActive=!1}openActiveListItem(){const t=this.uiState.listItems[this.uiState.activeListIndex];t&&(g.log("Opening",t),t instanceof m?this.clickExhibitor(t):t instanceof I?this.clickCategory(t):t instanceof f&&this.clickBoothInList2(t))}toggleCategoryFilter(){this.uiState.categoryFilterOpen=!this.uiState.categoryFilterOpen}applyCategoryFilters(t){this.uiState.selectedCategoryFilters=t,this.uiState.categoryFilterOpen=!1}get filteredExhibitors(){return this.uiState.selectedCategoryFilters.length===0?this.exhibitorStore.exhibitors:this.exhibitorStore.exhibitors.filter(t=>this.uiState.selectedCategoryFilters.some(r=>t.categories.some(e=>e.id===r.id)))}selectSessions(){this.uiState.list={type:"sessions",text:"",focused:!1},this.uiState.menu=!1,this.uiState.selectedTrack=null,this.searchButtonsStore.setSubButtonId(null),this.searchButtonsStore.subButtonsEnabled&&this.searchButtonsStore.showSubButtons("sessions"),h&&(this.uiState.desiredOverlaySize="full")}selectExhibitors(){this.uiState.list={type:"exhibitors",text:"",focused:!1},this.uiState.menu=!1,h&&(this.uiState.desiredOverlaySize="full")}selectTours(){this.uiState.list={type:"tours",text:"",focused:!1},this.uiState.menu=!1,h&&(this.uiState.desiredOverlaySize="full")}selectSpeakers(){this.uiState.list={type:"speakers",text:"",focused:!1},this.uiState.menu=!1,h&&(this.uiState.desiredOverlaySize="full")}selectSpeaker(t,r=!0){this.speakerStore.selectSpeaker(t,r)}resetFilters(){this.searchButtonsStore.clearAllFilters()}registerShortcutProviders(){this.shortcutRegistry.register(new W(this)),this.shortcutRegistry.register(new j(this)),this.shortcutRegistry.register(new U(this))}}o([S],i.prototype,"initialized",void 0),o([S],i.prototype,"resetCameraFn",void 0),o([s],i.prototype,"setResetCameraFn",null),o([s],i.prototype,"selectExhibitor",null),o([s],i.prototype,"selectBooth",null),o([s],i.prototype,"reset",null),o([s],i.prototype,"selectNone",null),o([s],i.prototype,"selectBookmarks",null),o([s],i.prototype,"selectVisited",null),o([s],i.prototype,"selectLanguage",null),o([s],i.prototype,"selectCategory",null),o([s],i.prototype,"selectEventItem",null),o([s],i.prototype,"selectSearch",null),o([s],i.prototype,"clickBookmarks",null),o([s],i.prototype,"clickVisited",null),o([s],i.prototype,"clickLanguage",null),o([s],i.prototype,"clickCategory",null),o([s],i.prototype,"clickSeminars",null),o([s],i.prototype,"clickBoothInList",null),o([s],i.prototype,"clickBoothInList2",null),o([s],i.prototype,"clickBooth",null),o([s],i.prototype,"clickExhibitor2",null),o([s],i.prototype,"clickExhibitor",null),o([s],i.prototype,"showMap",null),o([s],i.prototype,"showOverlay",null),o([s],i.prototype,"toggleMapOverlay",null),o([s],i.prototype,"moveToList",null),o([s],i.prototype,"moveToExhibitor",null),o([s],i.prototype,"changeActiveListIndex",null),o([s],i.prototype,"toggleModal",null),o([s],i.prototype,"openGallery",null),o([s],i.prototype,"closeGallery",null),o([s],i.prototype,"openActiveListItem",null),o([s],i.prototype,"toggleCategoryFilter",null),o([s],i.prototype,"applyCategoryFilters",null),o([y],i.prototype,"filteredExhibitors",null),o([s],i.prototype,"selectSessions",null),o([s],i.prototype,"selectExhibitors",null),o([s],i.prototype,"selectTours",null),o([s],i.prototype,"selectSpeakers",null),o([s],i.prototype,"selectSpeaker",null),o([s],i.prototype,"resetFilters",null);
|
|
@@ -7,6 +7,20 @@ export declare class ShortcutRegistry {
|
|
|
7
7
|
getShortcuts(interfaceId: string): ShortcutConfig[];
|
|
8
8
|
private sortShortcuts;
|
|
9
9
|
handleShortcutClick(interfaceId: string, shortcutId: string): void;
|
|
10
|
+
/**
|
|
11
|
+
* Reports a chip click to stats, using the `action` each provider already
|
|
12
|
+
* declares rather than guessing from `active`:
|
|
13
|
+
*
|
|
14
|
+
* - `toggle` — `active` IS the filter, so only the click that turns it on is
|
|
15
|
+
* a view of it; turning it off is not.
|
|
16
|
+
* - `custom` — opens a panel or a list on every click, while `active` says
|
|
17
|
+
* whether a filter happens to be set. Reading `active` here would drop
|
|
18
|
+
* every re-open made after the first selection.
|
|
19
|
+
*
|
|
20
|
+
* Tagged `shortcut` so these stay separable from the main button row, whose
|
|
21
|
+
* `sbtnview` carries no subtype.
|
|
22
|
+
*/
|
|
23
|
+
private reportClick;
|
|
10
24
|
private isShortcutActive;
|
|
11
25
|
handleShortcutReset(interfaceId: string, shortcutId: string): void;
|
|
12
26
|
private updateActivationOrder;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export class ShortcutRegistry{constructor(){this.providers=new Map,this.activationOrder=new Map}register(t){if(!t?.id)throw new Error("Provider must have a valid id");this.providers.set(t.id,t)}unregister(t){this.providers.delete(t),this.activationOrder.delete(t)}getShortcuts(t){const e=this.providers.get(t);if(!e)return[];const
|
|
1
|
+
import c from"../tools/track-event";export class ShortcutRegistry{constructor(){this.providers=new Map,this.activationOrder=new Map}register(t){if(!t?.id)throw new Error("Provider must have a valid id");this.providers.set(t.id,t)}unregister(t){this.providers.delete(t),this.activationOrder.delete(t)}getShortcuts(t){const e=this.providers.get(t);if(!e)return[];const r=e.createShortcuts(),i=this.activationOrder.get(t);return i?this.sortShortcuts(r,i):r}sortShortcuts(t,e){const r=new Map(e.map((i,s)=>[i,s]));return t.sort((i,s)=>{if(i.active!==s.active)return i.active?-1:1;if(i.active&&s.active){const o=r.get(i.id),n=r.get(s.id);return o!==void 0&&n!==void 0?o-n:(o!==void 0?-1:0)-(n!==void 0?-1:0)}return 0})}handleShortcutClick(t,e){const r=this.providers.get(t);if(!r)return;const i=r.createShortcuts().find(n=>n.id===e),s=i?.active??!1;r.handleShortcutClick(e);const o=this.isShortcutActive(r,e);this.reportClick(i,s,o),s!==o&&this.updateActivationOrder(t,e,s,o)}reportClick(t,e,r){if(!t||!(t.action==="custom"||!e&&r))return;const s=t.label||t.id;s&&c("sbtnview",s,"shortcut")}isShortcutActive(t,e){return t.createShortcuts().find(i=>i.id===e)?.active??!1}handleShortcutReset(t,e){const r=this.providers.get(t);if(!r?.handleShortcutReset)return;r.handleShortcutReset(e),this.activationOrder.get(t)?.includes(e)&&this.updateActivationOrder(t,e,!0,!1)}updateActivationOrder(t,e,r,i){const s=this.activationOrder.get(t)||[];let o;if(!r&&i)o=s.includes(e)?s:[...s,e];else if(r&&!i)o=s.filter(n=>n!==e);else return;o.length>0?this.activationOrder.set(t,o):this.activationOrder.delete(t)}updateActivationOrderFromState(t,e,r,i){this.updateActivationOrder(t,e,r,i)}shouldShowShortcuts(t){return this.providers.get(t)?.shouldShowShortcuts?.()??!0}getRegisteredProviders(){return Array.from(this.providers.keys())}isProviderRegistered(t){return this.providers.has(t)}clear(){this.providers.clear(),this.activationOrder.clear()}}
|