@expofp/floorplan 3.11.12 → 3.12.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-CdChKHNd.js → Button-C5CmZ0so.js} +6 -6
- package/dist/browser/CookieConsent-kl_B6sH5.js +38 -0
- package/dist/browser/{Debug-BQJRkSVw.js → Debug-DymHiO2Z.js} +14 -14
- package/dist/browser/{Demo-Dh5hQ00u.js → Demo-5tRIgVJF.js} +14 -14
- package/dist/browser/{Free-Be0wdt8h.js → Free-hYQaAEbK.js} +16 -16
- package/dist/browser/{Gallery-DsC-3InH.js → Gallery-D10tiZuW.js} +24 -24
- package/dist/browser/{GpsLoader-l-DhiN5_.js → GpsLoader-CNkUVJdS.js} +51 -50
- package/dist/browser/{KioskStore-hBGigttj.js → KioskStore-2WAOxGM0.js} +31 -31
- package/dist/browser/{MaplibreAdapter-B2PgQxAb.js → MaplibreAdapter-B_tNIXx4.js} +2360 -2331
- package/dist/browser/{ModalContainer-DngQzOVE.js → ModalContainer-CckyeoUG.js} +13 -13
- package/dist/browser/{PermissionNotice-Bstp1Ig2.js → PermissionNotice-qetBrmIY.js} +7 -7
- package/dist/browser/{SetKioskMode-BXTIENxU.js → SetKioskMode-BOjaqczc.js} +9 -9
- package/dist/browser/ShowKiosk-CcQHeM8K.js +33 -0
- package/dist/browser/{TouchHand-CZ4-CE4e.js → TouchHand-DKpxmOwz.js} +5 -5
- package/dist/browser/{ViewerMenuPanel-Dc7XYnXW.js → ViewerMenuPanel-HULfvF54.js} +25 -25
- package/dist/browser/{add-debug-secret-listener-DOVFjqJo.js → add-debug-secret-listener-BTGIVZFY.js} +1 -1
- package/dist/browser/{boolean-editor-B-S4WhPP.js → boolean-editor-oT7I3D0U.js} +10 -10
- package/dist/browser/{bootIntercom-D41iCVYM.js → bootIntercom-YnsJPGCs.js} +3 -3
- package/dist/browser/{booth-by-xy-S_lLb4ur.js → booth-by-xy-DTknn14w.js} +292 -295
- package/dist/browser/bundle.json +78 -63
- package/dist/browser/{classnames-BeH2kA4o.js → classnames-VfuHc9uB.js} +2 -2
- package/dist/browser/{client-Be_UxAZT.js → client-Bevofhdz.js} +5 -5
- package/dist/browser/{components-RZNETvKi.js → components-COUCtdev.js} +1369 -1316
- package/dist/browser/{debug-overlay-DjwfpG69.js → debug-overlay-BLN24Eyb.js} +415 -415
- package/dist/browser/{debug-ui-D_afzMrh.js → debug-ui-BT7Ddvoj.js} +7 -7
- package/dist/browser/{dist-CZz9piI4.js → dist-CWBtHMZR.js} +6 -6
- package/dist/browser/{dist-B-m8ZFBo.js → dist-CtKSG8GG.js} +4 -4
- package/dist/browser/{dist-DKu24Nie.js → dist-saTnlhyc.js} +7 -7
- package/dist/browser/{browser-pQxW93uF.js → efp-debug-init-CYoM0s-a.js} +61 -14
- package/dist/browser/enum-editor-vF4eKelT.js +34 -0
- package/dist/browser/{es5-DPnfG3EX.js → es5-COzmRHZr.js} +2 -2
- package/dist/browser/{event-not-found-CE2zhFPJ.js → event-not-found-BZkFh-P9.js} +1 -1
- package/dist/browser/{exports-BtXbxSeU.js → exports-BsqJX0o4.js} +1 -1
- package/dist/browser/{favicon-B7xwIKyS.js → favicon-BBgsGFil.js} +1 -1
- package/dist/browser/{fetch-retry.umd-BiAebF_i.js → fetch-retry.umd-BFTNSvNa.js} +2 -2
- package/dist/browser/{flex-DGirEfRz.js → flex-DnOM12q-.js} +6 -6
- package/dist/browser/{floorplan.loader-DSx2rwZS.js → floorplan.loader-DuVsbJsr.js} +890 -902
- package/dist/browser/floorplan.ready-B2SvQNh9.js +1326 -0
- package/dist/browser/{fuse-BuZwVNBr.js → fuse-Ddn6vCOL.js} +2 -2
- package/dist/browser/i18n-D9dsV3GV.js +8659 -0
- package/dist/browser/index.js +49 -117
- package/dist/browser/{index.module-BktNOlw2.js → index.module-CFTe1PiT.js} +23 -23
- package/dist/browser/integrateKiosk-vlZ9-8EP.js +28 -0
- package/dist/browser/{is-webview-DxtfBbGj.js → is-webview-SfodrdWn.js} +1 -1
- package/dist/browser/{jsx-runtime-DftMjMlZ.js → jsx-runtime-DEIf9CUU.js} +2 -2
- package/dist/browser/{lib-_QD5dt19.js → lib-CCkkeprZ.js} +5 -5
- package/dist/browser/loadImage-C356B0zk.js +58 -0
- package/dist/browser/{logDeviceInfo-CiCKGxKy.js → logDeviceInfo-UnfHYhqR.js} +9 -9
- package/dist/browser/{main-C6h73Uc5.js → main-JnTe8DvY.js} +1 -1
- package/dist/browser/mobx-DPek3UBx.js +24 -0
- package/dist/browser/optional-boolean-editor-HEZXOpAy.js +20 -0
- package/dist/browser/optional-enum-editor-DpN8qtqv.js +34 -0
- package/dist/browser/optional-string-editor-iR5VHFAR.js +30 -0
- package/dist/browser/{particles.min-CiLQfUCo.js → particles.min-BWlVGdrr.js} +2 -2
- package/dist/browser/{prop-types-8E5fCOgQ.js → prop-types-DA-Iew4C.js} +2 -2
- package/dist/browser/{react-B9lmaQYI.js → react-C02q0n7M.js} +2 -2
- package/dist/browser/{react-dom-CPWfZdj5.js → react-dom-BV1hX9nO.js} +4 -4
- package/dist/browser/reset-all-settings-BQgeIRam.js +190 -0
- package/dist/browser/{rolldown-runtime-CJax_ib9.js → rolldown-runtime-DYSU24gn.js} +1 -1
- package/dist/browser/{enum-editor-BtYkUhft.js → select-D0S5iMvJ.js} +261 -283
- package/dist/browser/{settings-BufKqYwI.js → settings-Dw78gtQ_.js} +3 -3
- package/dist/browser/{settings-item-D3AzjjoO.js → settings-item-BSR8Iz1R.js} +7 -7
- package/dist/browser/{store-DGdGzsa_.js → store-DxRBdgZM.js} +7325 -7643
- package/dist/browser/string-editor-BwtRnquZ.js +30 -0
- package/dist/browser/text-field-D5x33kIn.js +88 -0
- package/dist/browser/{theme-DvIMSzdB.js → theme-uaffdJE1.js} +9 -9
- package/dist/browser/ui-jO3fquPn.js +43 -0
- package/dist/browser/{useRenderTarget-hqd7cVeW.js → useRenderTarget-NdsPPF5u.js} +5 -5
- package/dist/esm/components/Booth/Booth.js +1 -1
- package/dist/esm/components/EntityListRow.js +1 -1
- package/dist/esm/components/Exhibitor.js +1 -1
- package/dist/esm/components/Kiosk/ShowKiosk.js +1 -1
- package/dist/esm/components/LanguageRowContainer.d.ts +1 -0
- package/dist/esm/components/Layout.d.ts +2 -1
- package/dist/esm/components/Layout.js +1 -1
- package/dist/esm/components/LogoOverlay.js +1 -1
- package/dist/esm/components/Map/Map.js +1 -1
- package/dist/esm/components/Map/drawing/config/config-bg.d.ts +1 -1
- package/dist/esm/components/Map/drawing/config/config-booth-badge.js +1 -1
- package/dist/esm/components/Map/drawing/config/config-booth-bg.d.ts +1 -1
- package/dist/esm/components/Map/drawing/config/config-booth-bg.js +1 -1
- package/dist/esm/components/Map/drawing/config/config-load-layer.js +1 -1
- package/dist/esm/components/Map/drawing/config/loadBoothsImages.js +1 -1
- package/dist/esm/components/Maplibre/MaplibreAdapter.js +1 -1
- package/dist/esm/components/Maplibre/MaplibreWrapper.js +1 -1
- package/dist/esm/components/Maplibre/utils/resolve-map-style.d.ts +15 -0
- package/dist/esm/components/Maplibre/utils/resolve-map-style.js +1 -0
- package/dist/esm/components/Menu.d.ts +3 -2
- package/dist/esm/components/Menu.js +1 -1
- package/dist/esm/components/OverlayContainer.d.ts +2 -1
- package/dist/esm/components/OverlayContainer.js +1 -1
- package/dist/esm/components/Ws.js +1 -1
- package/dist/esm/constants.d.ts +7 -13
- package/dist/esm/constants.js +1 -1
- package/dist/esm/data/fp-payloads.d.ts +27 -0
- package/dist/esm/data/fp-payloads.js +1 -0
- package/dist/esm/data/fpGeo.js +1 -1
- package/dist/esm/data/index.d.ts +8 -2
- package/dist/esm/data/index.js +1 -1
- package/dist/esm/data/svg.d.ts +4 -1
- package/dist/esm/data/svg.js +1 -1
- package/dist/esm/floorplan.loader.d.ts +13 -4
- package/dist/esm/floorplan.loader.js +1 -1
- package/dist/esm/floorplan.ready.d.ts +8 -0
- package/dist/esm/floorplan.ready.js +1 -1
- package/dist/esm/index.d.ts +0 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/intercom/shouldLoad.d.ts +2 -2
- package/dist/esm/intercom/shouldLoad.js +1 -1
- package/dist/esm/load-dev.d.ts +44 -0
- package/dist/esm/load-dev.js +1 -0
- package/dist/esm/load.d.ts +3 -3
- package/dist/esm/load.js +3 -3
- package/dist/esm/renderer/engine-core/fonts.js +1 -1
- package/dist/esm/services/URLFilterManager.d.ts +15 -0
- package/dist/esm/services/URLFilterManager.js +1 -1
- package/dist/esm/services/multi-slug.d.ts +20 -0
- package/dist/esm/services/multi-slug.js +1 -0
- package/dist/esm/services/url-dispatch.d.ts +24 -0
- package/dist/esm/services/url-dispatch.js +1 -0
- package/dist/esm/services/url-sync.d.ts +36 -0
- package/dist/esm/services/url-sync.js +1 -0
- package/dist/esm/store/BoothStore.d.ts +2 -1
- package/dist/esm/store/ExhibitorStore.d.ts +3 -2
- package/dist/esm/store/ExhibitorStore.js +1 -1
- package/dist/esm/store/LayerStore.js +1 -1
- package/dist/esm/store/MaplibreStore.js +1 -1
- package/dist/esm/store/PoiTypeStore.d.ts +1 -1
- package/dist/esm/store/SearchStore.js +1 -1
- package/dist/esm/store/UIState.d.ts +1 -5
- package/dist/esm/store/UIState.js +1 -1
- package/dist/esm/store/init/init-bookmarks.d.ts +2 -0
- package/dist/esm/store/init/init-booths.js +1 -1
- package/dist/esm/store/init/init-categories.js +1 -1
- package/dist/esm/store/init/init-events.js +1 -1
- package/dist/esm/store/init/init-exhibitors.js +1 -1
- package/dist/esm/store/init/init-layers.js +1 -1
- package/dist/esm/store/types.d.ts +2 -1
- package/dist/esm/tools/event-not-found.d.ts +4 -3
- package/dist/esm/tools/gtag.d.ts +3 -2
- package/dist/esm/tools/gtag.js +1 -1
- package/dist/esm/tools/handleDebugMode.d.ts +17 -0
- package/dist/esm/tools/handleDebugMode.js +1 -1
- package/dist/esm/tools/loaders.d.ts +0 -2
- package/dist/esm/tools/loaders.js +1 -1
- package/dist/esm/tools/rebookingUrl.js +1 -1
- package/dist/esm/tools/reset.js +1 -1
- package/dist/esm/tools/settings.js +1 -1
- package/dist/esm/tools/track-event.js +1 -1
- package/dist/esm/types/drawing.types.d.ts +18 -0
- package/dist/esm/types.d.ts +52 -38
- package/dist/esm/utils/areLayersEnabled.js +1 -1
- package/dist/esm/utils/camera-map-settings.d.ts +20 -0
- package/dist/esm/utils/camera-map-settings.js +1 -0
- package/dist/esm/utils/customCommands.js +1 -1
- package/dist/esm/utils/getLogoUrl.d.ts +8 -1
- package/dist/esm/utils/getLogoUrl.js +1 -1
- package/dist/esm/utils/heatmap-enabled.d.ts +13 -0
- package/dist/esm/utils/heatmap-enabled.js +1 -0
- package/dist/esm/utils/i18n.js +1 -1
- package/dist/esm/utils/imageloader.js +1 -1
- package/dist/esm/utils/is-debug.d.ts +0 -8
- package/dist/esm/utils/is-debug.js +1 -1
- package/dist/esm/utils/legacy-storage-keys.d.ts +16 -0
- package/dist/esm/utils/legacy-storage-keys.js +1 -0
- package/dist/esm/utils/loadCustomCss.d.ts +2 -2
- package/dist/esm/utils/mapEntity.d.ts +1 -0
- package/dist/esm/utils/preview-exhibitor.d.ts +1 -1
- package/dist/esm/wayfinding/adapters/graphDataSource.d.ts +1 -1
- package/dist/esm/wayfinding/adapters/graphDataSource.js +1 -1
- package/package.json +8 -5
- package/dist/browser/CookieConsent-DmWcbyRQ.js +0 -38
- package/dist/browser/ShowKiosk-CpIQKRDF.js +0 -28
- package/dist/browser/efp-debug-init-B-EZE_S2.js +0 -42
- package/dist/browser/floorplan.ready-CX4L0Qyc.js +0 -1406
- package/dist/browser/i18n-BqlnpLSm.js +0 -3942
- package/dist/browser/loadImage-CvnSDOL0.js +0 -121
- package/dist/browser/mobx-71cpvuRe.js +0 -24
- package/dist/browser/reset-all-settings-CAVnp-HU.js +0 -141
- package/dist/browser/string-editor-BEBEF1X7.js +0 -108
- package/dist/browser/ui-DIQ3vheI.js +0 -43
- package/dist/esm/_NEW_types.d.ts +0 -6
- package/dist/esm/_NEW_types.js +0 -1
- package/dist/esm/_misc_to_move/manifest.d.ts +0 -14
- package/dist/esm/_misc_to_move/ref.d.ts +0 -6
- package/dist/esm/_misc_to_move/ref.js +0 -1
- package/dist/esm/data/Flags.d.ts +0 -23
- package/dist/esm/data/Flags.js +0 -1
- package/dist/esm/data/validate-data.d.ts +0 -3
- package/dist/esm/data/validate-data.js +0 -1
- package/dist/esm/services/routing.d.ts +0 -7
- package/dist/esm/services/routing.js +0 -1
- package/dist/esm/utils/mergeExhibitors.d.ts +0 -3
- package/dist/esm/utils/mergeExhibitors.js +0 -1
- /package/dist/esm/{_misc_to_move/manifest.js → types/drawing.types.js} +0 -0
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* TEMPORARY dev logging + console playground — DELETE this file together with
|
|
3
|
+
* its import in `load.ts`.
|
|
4
|
+
*
|
|
5
|
+
* Logs the effective config and the eagerly-loaded `fp.svg.js` payload while
|
|
6
|
+
* `pnpm dev:floorplan` runs. The lazy parts (layer `$ref`s — js evaluated to
|
|
7
|
+
* json by `@expofp/resolve` — and other data files) load only when called from
|
|
8
|
+
* the console. None of this feeds the app: `resolve()` evaluates scripts into
|
|
9
|
+
* a sandbox, so `window.__fp*` and the script-tag loader stay untouched.
|
|
10
|
+
*
|
|
11
|
+
* Play with it from the console:
|
|
12
|
+
*
|
|
13
|
+
* __efpDev.config // frozen effective config
|
|
14
|
+
* __efpDev.fpSvgJs // evaluated fp.svg.js payload
|
|
15
|
+
* __efpDev.refs // layer name -> { $ref }
|
|
16
|
+
* __efpDev.layers // resolved payloads so far
|
|
17
|
+
* await __efpDev.loadLayer('Venue') // resolve one layer by name
|
|
18
|
+
* await __efpDev.loadLayers() // resolve every layer ref
|
|
19
|
+
* await __efpDev.loadDataFile('wf.data.js') // any file next to fp.svg.js
|
|
20
|
+
* await __efpDev.loadDataFile('booths.json')
|
|
21
|
+
* await __efpDev.resolve({ $ref: 'https://…/fp.svg.js' }) // raw resolve, js or json
|
|
22
|
+
*/
|
|
23
|
+
import { type Config } from '@expofp/config';
|
|
24
|
+
import { type FpSvgJs, type FpSvgLayerJs, type FpSvgLayerJsRef } from '@expofp/schema';
|
|
25
|
+
import { resolve } from '@expofp/resolve';
|
|
26
|
+
interface EfpDevPlayground {
|
|
27
|
+
config: Config;
|
|
28
|
+
fpSvgJs: FpSvgJs;
|
|
29
|
+
refs: Record<string, FpSvgLayerJsRef>;
|
|
30
|
+
layers: Record<string, FpSvgLayerJs>;
|
|
31
|
+
loadLayer: (name: string) => Promise<FpSvgLayerJs | undefined>;
|
|
32
|
+
loadLayers: () => Promise<Record<string, FpSvgLayerJs>>;
|
|
33
|
+
loadDataFile: <T = unknown>(fileName: string) => Promise<T>;
|
|
34
|
+
resolve: typeof resolve;
|
|
35
|
+
}
|
|
36
|
+
declare global {
|
|
37
|
+
interface Window {
|
|
38
|
+
/** @deprecated temporary dev playground, see `load-dev.ts` */
|
|
39
|
+
__efpDev?: EfpDevPlayground;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
export declare function initLoadDev(config: Config): void;
|
|
43
|
+
export {};
|
|
44
|
+
//# sourceMappingURL=load-dev.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{getResolved as $,resolve as c}from"@expofp/resolve";const a="[efp-dev]";export function initLoadDev(o){const{fpSvgLayerJsRefs:s}=o,n=o.fpSvgJsRef?$(o.fpSvgJsRef):{};console.group(`${a} config loaded`),console.log("config:",o),console.log("fp.svg.js (eager):",_(n),n);const i=(n.__fpLayers??[]).map(e=>({name:e.name,description:e.description,mode:e.mode,floorIndex:e.floorIndex,hasViewbox:e.viewbox!=null,default:e.name===n.__fpDefaultLayer,$ref:s[e.name]?.$ref??"(inline in fp.svg.js)"}));i.length&&console.table(i),console.log("layersMode:",n.__fpLayersMode,"defaultLayer:",n.__fpDefaultLayer),console.groupEnd();const p={},d=async e=>{const t=s[e];if(!t){console.warn(`${a} no $ref for layer "${e}" \u2014 known:`,Object.keys(s));return}const f=performance.now(),r=await c(t),l=Math.round(performance.now()-f);return p[e]=r,console.log(`${a} layer "${e}" \u2190 ${t.$ref} (${l}ms)`,_(r),r),r},g=async()=>(await Promise.all(Object.keys(s).map(d)),p),u=async e=>{const f=`${o.fpSvgJsRef?o.fpSvgJsRef.$ref.split(/[?#]/)[0].replace(/[^/]*$/,""):""}${e}`,r=performance.now(),l=await c({$ref:f});return console.log(`${a} ${e} \u2190 ${f} (${Math.round(performance.now()-r)}ms)`,l),l};window.__efpDev={config:o,fpSvgJs:n,refs:s,layers:p,loadLayer:d,loadLayers:g,loadDataFile:u,resolve:c},console.log(`${a} playground ready \u2014 nothing loads until you ask; try:`,"await __efpDev.loadLayers()",`| await __efpDev.loadLayer('${Object.keys(s)[0]??"name"}')`,"| await __efpDev.loadDataFile('wf.data.js')")}function _(o){return{svgChars:o.__fp?.length??0,paths:o.__fpPaths?.length??0,fpVersion:o.__fpVersion,fpVer:o.__fpSettings?.fpVer,bearing:o.__fpGeo?.properties?.config?.bearing,keys:Object.keys(o).join(", ")}}
|
package/dist/esm/load.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import './utils/silence-mobx-react-lite-warning';
|
|
2
|
-
import { type Manifest } from '
|
|
3
|
-
import { type Ref } from '
|
|
2
|
+
import { type Manifest, type Options } from '@expofp/config';
|
|
3
|
+
import { type Ref } from '@expofp/resolve';
|
|
4
4
|
import { type FloorPlan, type FloorPlanOptions } from './types';
|
|
5
|
-
export declare function load(manifestRef: Manifest | Ref<Manifest>, options?: FloorPlanOptions): Promise<FloorPlan>;
|
|
5
|
+
export declare function load(manifestRef: Manifest | Ref<Manifest>, options?: Options & FloorPlanOptions): Promise<FloorPlan>;
|
|
6
6
|
declare global {
|
|
7
7
|
interface Window {
|
|
8
8
|
/** @deprecated */
|
package/dist/esm/load.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import"./utils/silence-mobx-react-lite-warning";import{
|
|
1
|
+
import"./utils/silence-mobx-react-lite-warning";import{applyIntents as c,loadConfig as p,setConfig as m}from"@expofp/config";import{safeLocalStorage as u}from"@expofp/utils";import l from"debug";import{initHtmlHead as y}from"./_misc_to_move/initHtmlHead";import{logBuildInfo as h}from"./_misc_to_move/logBuildInfo";import g from"./floorplan.loader";import{migrateLegacyStorageKeys as v}from"./utils/legacy-storage-keys";const d=l("efp:load");export async function load(r,e={}){y(),h(),l("efp:device").enabled&&import("./_misc_to_move/logDeviceInfo").then(o=>o.logDeviceInfo()).catch(()=>{});const a=e.element;let t;if(typeof a=="string"){const o=document.querySelector(a);if(!o)throw new Error(`Element not found for selector: ${a}`);t=o}else a?t=a:(t=document.getElementById("floorplan"),t||(t=document.createElement("div"),S(t),document.body.appendChild(t)));w(),t.setAttribute("data-efp-floorplan-defaults",""),document.documentElement.style.overscrollBehavior||="none",document.body.style.overscrollBehavior||="none",requestAnimationFrame(()=>{t.style.backgroundColor="#ebebeb"}),v();let i;try{if(i=await p(r,e,window.location.search,u()??void 0),!i.fpSvgJsRef)throw new Error("No floor plan drawing: the manifest must set `legacyDataUrlBase` (live event) or `fpSvgJsRef` (offline copy)")}catch(o){const{showEventNotFound:f}=await import("./tools/event-not-found");throw f(t),o}d("config",i),m(i);const n=new g(e,t),s=window.___fpResolve;return window.___fp=n,s&&(n.ready.then(()=>s(n)),delete window.___fpResolve),n.ready.then(()=>{const o=new CustomEvent("expofp:ready",{detail:{floorplan:n}});window.__expofpReady=o,window.dispatchEvent(o)}),n.ready.then(()=>c(n,i.intents)).catch(o=>d("config intents skipped:",o)),n}function w(){const r="efp-floorplan-defaults";if(document.getElementById(r))return;const e=document.createElement("style");e.id=r,e.textContent=`
|
|
2
2
|
[data-efp-floorplan-defaults] {
|
|
3
3
|
position: fixed;
|
|
4
4
|
top: 0;
|
|
@@ -10,7 +10,7 @@ import"./utils/silence-mobx-react-lite-warning";import{resolve as d}from"@expofp
|
|
|
10
10
|
overscroll-behavior: none;
|
|
11
11
|
background: #fff;
|
|
12
12
|
transition: background-color 2s ease;
|
|
13
|
-
}`,document.head.prepend(e)}function
|
|
13
|
+
}`,document.head.prepend(e)}function S(r){if(!document.adoptedStyleSheets)return;const e="efp-runtime-loader-spinner",a=`
|
|
14
14
|
.${e} {
|
|
15
15
|
position: fixed;
|
|
16
16
|
top: 50%;
|
|
@@ -61,7 +61,7 @@ import"./utils/silence-mobx-react-lite-warning";import{resolve as d}from"@expofp
|
|
|
61
61
|
100% {
|
|
62
62
|
stroke-dashoffset: -125px;
|
|
63
63
|
}
|
|
64
|
-
}`,
|
|
64
|
+
}`,t=new CSSStyleSheet;t.replaceSync(a),document.adoptedStyleSheets=[...document.adoptedStyleSheets,t],r.innerHTML=`<div class="${e}">
|
|
65
65
|
<svg viewBox="25 25 50 50">
|
|
66
66
|
<circle r="20" cy="50" cx="50"></circle>
|
|
67
67
|
</svg>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import
|
|
1
|
+
import{getConfig as s}from"@expofp/config";import t from"../../tools/base-runtime-url";export const DEFAULT_FONT_URL=`${t}fonts/oswald-v17-cyrillic_latin-500.woff`,DEFAULT_FONT_LIGHT_URL=`${t}fonts/oswald-v17-cyrillic_latin-300.woff`;export function loadCustomFontsUrls(){const o=s();return o.customCssFonts?.length?o.customCssFonts:[]}
|
|
@@ -7,7 +7,22 @@ export declare class URLFilterManager {
|
|
|
7
7
|
constructor(rootStore: RootStore);
|
|
8
8
|
initialize(): void;
|
|
9
9
|
private parseURLFilters;
|
|
10
|
+
/**
|
|
11
|
+
* The raw filter values, before catalog validation. The canonical
|
|
12
|
+
* `config.filters` node wins when present (`?filters[categories][0]=food` or
|
|
13
|
+
* any config layer; values are plain names, no custom decoding).
|
|
14
|
+
*/
|
|
15
|
+
private readRawFilters;
|
|
10
16
|
private applyFiltersToStore;
|
|
17
|
+
/**
|
|
18
|
+
* The active filters' contribution to `location.search` — `''` when no
|
|
19
|
+
* filter is active, else `'?<legacy filter keys>'`, byte-identical to what
|
|
20
|
+
* `updateURLFromFilters` writes. Also read by the URL autorun (url-dispatch):
|
|
21
|
+
* when nothing else claims the URL, the filter query IS the selection. Both
|
|
22
|
+
* writers must emit the same string — emitting different ones made their
|
|
23
|
+
* MobX ordering decide the final address bar (the poiType-clearing race).
|
|
24
|
+
*/
|
|
25
|
+
filterSearch(): string;
|
|
11
26
|
updateURLFromFilters(): void;
|
|
12
27
|
setCategories(categoryNames: string[]): void;
|
|
13
28
|
setPoiType(poiTypeName: string | null): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__esDecorate as l,__runInitializers as y}from"tslib";import{action as h,observable as A,reaction as F}from"mobx";import{PREFIXES as $}from"../store/search-buttons/constants";import a from"../tools/logger";import{decodeString as X,decodeStringArray as M,encodeString as G,encodeStringArray as N,toLowerCaseArray as m,toLowerCaseString as k}from"../utils/urlEncoding";const d={CATEGORIES:"categories",POI_TYPE:"poiType",POI_TYPES:"poiTypes",EXHIBITORS:"exhibitors"};let H=(()=>{let n=[],f,T=[],S=[],P,L=[],I=[],C,_,R,b,w,O,U,x,E,z;return class{static{const t=typeof Symbol=="function"&&Symbol.metadata?Object.create(null):void 0;f=[A],P=[A],C=[h],_=[h],R=[h],b=[h],w=[h],O=[h],U=[h],x=[h],E=[h],z=[h],l(this,null,C,{kind:"method",name:"initialize",static:!1,private:!1,access:{has:e=>"initialize"in e,get:e=>e.initialize},metadata:t},null,n),l(this,null,_,{kind:"method",name:"parseURLFilters",static:!1,private:!1,access:{has:e=>"parseURLFilters"in e,get:e=>e.parseURLFilters},metadata:t},null,n),l(this,null,R,{kind:"method",name:"applyFiltersToStore",static:!1,private:!1,access:{has:e=>"applyFiltersToStore"in e,get:e=>e.applyFiltersToStore},metadata:t},null,n),l(this,null,b,{kind:"method",name:"updateURLFromFilters",static:!1,private:!1,access:{has:e=>"updateURLFromFilters"in e,get:e=>e.updateURLFromFilters},metadata:t},null,n),l(this,null,w,{kind:"method",name:"setCategories",static:!1,private:!1,access:{has:e=>"setCategories"in e,get:e=>e.setCategories},metadata:t},null,n),l(this,null,O,{kind:"method",name:"setPoiType",static:!1,private:!1,access:{has:e=>"setPoiType"in e,get:e=>e.setPoiType},metadata:t},null,n),l(this,null,U,{kind:"method",name:"setPoiTypes",static:!1,private:!1,access:{has:e=>"setPoiTypes"in e,get:e=>e.setPoiTypes},metadata:t},null,n),l(this,null,x,{kind:"method",name:"clearAllFilters",static:!1,private:!1,access:{has:e=>"clearAllFilters"in e,get:e=>e.clearAllFilters},metadata:t},null,n),l(this,null,E,{kind:"method",name:"focusOnFilteredBooths",static:!1,private:!1,access:{has:e=>"focusOnFilteredBooths"in e,get:e=>e.focusOnFilteredBooths},metadata:t},null,n),l(this,null,z,{kind:"method",name:"openExhibitorsList",static:!1,private:!1,access:{has:e=>"openExhibitorsList"in e,get:e=>e.openExhibitorsList},metadata:t},null,n),l(null,null,f,{kind:"field",name:"currentFilters",static:!1,private:!1,access:{has:e=>"currentFilters"in e,get:e=>e.currentFilters,set:(e,r)=>{e.currentFilters=r}},metadata:t},T,S),l(null,null,P,{kind:"field",name:"isInitialized",static:!1,private:!1,access:{has:e=>"isInitialized"in e,get:e=>e.isInitialized,set:(e,r)=>{e.isInitialized=r}},metadata:t},L,I),t&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:t})}rootStore=y(this,n);currentFilters=y(this,T,{categories:[],poiType:null,poiTypes:[],exhibitors:!1});isInitialized=(y(this,S),y(this,L,!1));constructor(t){y(this,I),this.rootStore=t,this.setupReactions()}initialize(){this.parseURLFilters(),this.applyFiltersToStore(),this.isInitialized=!0,a.log("URLFilterManager initialized with filters:",this.currentFilters)}parseURLFilters(){const t=new URLSearchParams(window.location.search),e=t.get(d.CATEGORIES),r=e?M(e):[],i=t.get(d.POI_TYPE),s=i?X(i):null,o=t.get(d.POI_TYPES),c=o?M(o):[],p=t.get(d.EXHIBITORS),u=p==="true"||p==="",v=c.filter(g=>{if(!g)return!1;const B=this.rootStore.poiTypeStore.poiTypes.some(Y=>Y.name.toLowerCase()===g.toLowerCase());return B||a.warn(`POI type not found in data: ${g}`),B});r.length>0&&(s||v.length>0)?(a.warn("URL contains both categories and POI types. Clearing POI types."),this.currentFilters={categories:r,poiType:null,poiTypes:[],exhibitors:u}):this.currentFilters={categories:r,poiType:s,poiTypes:v,exhibitors:u},a.log("URLFilterManager parsed filters:",{categories:r,poiType:s,poiTypes:c,exhibitors:u}),this.validateFilters(this.currentFilters)}applyFiltersToStore(){const{uiState:t,categoryFilterStore:e,searchButtonsStore:r}=this.rootStore;if(this.currentFilters.categories.length>0){const i=this.currentFilters.categories.map(s=>this.rootStore.categoryStore.categories.find(o=>o.name.toLowerCase()===s.toLowerCase())).filter(s=>s!==void 0);i.length>0?(t.selectedCategoryFilters=i,e.state.selectedItems=i.map(s=>({id:s.id,name:s.name})),t.categoryFilterOpen=!0,a.log("URLFilterManager applied categories:",i.map(s=>s.name)),setTimeout(()=>{this.focusOnFilteredBooths(),this.rootStore.searchStore.setFocused(!0)},100)):a.warn("URLFilterManager: no categories found for names:",this.currentFilters.categories)}if(this.currentFilters.poiType){const i=this.rootStore.poiTypeStore.poiTypes.find(s=>s.name.toLowerCase()===this.currentFilters.poiType.toLowerCase());i?(t.selectedPoiTypeFilters=[i],r.setPoiFilterId(`${$.POI_TYPE}${i.id}`),a.log("URLFilterManager applied POI type:",i.name),setTimeout(()=>{this.focusOnFilteredBooths(),this.rootStore.searchStore.setFocused(!0)},100)):a.warn("URLFilterManager: no POI type found for name:",this.currentFilters.poiType)}if(this.currentFilters.poiTypes.length>0){const i=this.currentFilters.poiTypes.map(s=>s?this.rootStore.poiTypeStore.poiTypes.find(o=>o.name.toLowerCase()===s.toLowerCase()):null).filter(s=>s!=null);i.length>0?(t.selectedPoiTypeFilters=i,a.log("URLFilterManager applied POI types:",i.map(s=>s.name)),setTimeout(()=>{this.focusOnFilteredBooths(),this.rootStore.searchStore.setFocused(!0)},100)):(a.warn("URLFilterManager: no POI types found for names:",this.currentFilters.poiTypes),this.currentFilters.poiTypes=[])}this.currentFilters.exhibitors&&this.openExhibitorsList()}updateURLFromFilters(){const{uiState:t}=this.rootStore,e=new URLSearchParams;if(t.selectedCategoryFilters.length>0){const i=t.selectedCategoryFilters.map(o=>o.name.toLowerCase()),s=N(i);s&&e.set(d.CATEGORIES,s)}if(t.selectedPoiTypeFilters.length>0&&t.selectedCategoryFilters.length===0)if(t.selectedPoiTypeFilters.length===1){const i=t.selectedPoiTypeFilters[0].name.toLowerCase();if(i){const s=G(i);s&&e.set(d.POI_TYPE,s)}}else{const i=t.selectedPoiTypeFilters.map(o=>o.name.toLowerCase()),s=N(i);s&&e.set(d.POI_TYPES,s)}this.currentFilters.exhibitors&&t.selectedCategoryFilters.length===0&&t.selectedPoiTypeFilters.length===0&&e.set(d.EXHIBITORS,"true");const r=window.location.pathname+(e.toString()?`?${e.toString()}`:"");window.history.replaceState({},"",r),this.currentFilters={categories:t.selectedCategoryFilters.length>0?t.selectedCategoryFilters.map(i=>i.name):[],poiType:t.selectedPoiTypeFilters.length===1&&t.selectedCategoryFilters.length===0?t.selectedPoiTypeFilters[0].name:null,poiTypes:t.selectedPoiTypeFilters.length>1&&t.selectedCategoryFilters.length===0?t.selectedPoiTypeFilters.map(i=>i.name):[],exhibitors:this.currentFilters.exhibitors}}setCategories(t){this.currentFilters.categories=m(t),this.currentFilters.poiType=null,this.isInitialized&&this.updateURLFromFilters()}setPoiType(t){this.currentFilters.poiType=k(t),this.currentFilters.poiTypes=[],this.currentFilters.categories=[],this.isInitialized&&this.updateURLFromFilters()}setPoiTypes(t){this.currentFilters.poiTypes=m(t),this.currentFilters.poiType=null,this.currentFilters.categories=[],this.isInitialized&&this.updateURLFromFilters()}clearAllFilters(){this.currentFilters={categories:[],poiType:null,poiTypes:[],exhibitors:!1};const{uiState:t}=this.rootStore;t.categoryFilterOpen=!1,this.updateURLFromFilters()}getCurrentFilters(){return{...this.currentFilters}}setupReactions(){F(()=>this.rootStore.uiState.selectedCategoryFilters,t=>{if(this.isInitialized&&t.length>0){const e=m(t.map(r=>r.name));this.setCategories(e)}}),F(()=>this.rootStore.uiState.selectedPoiTypeFilters,t=>{if(this.isInitialized&&t.length>0)if(t.length===1){const e=k(t[0].name);e&&this.setPoiType(e)}else{const e=m(t.map(r=>r.name));this.setPoiTypes(e)}})}validateFilters(t){if(t.categories.length>0&&(t.poiType||t.poiTypes.length>0))return a.warn("Categories and POI types cannot be active simultaneously"),!1;if(t.poiType&&t.poiTypes.length>0)return a.warn("Both single POI type and multiple POI types cannot be active simultaneously"),!1;for(const e of t.categories)if(!this.getCategoryIdByName(e))return a.warn(`Category not found: ${e}`),!1;if(t.poiType&&!this.getPoiTypeIdByName(t.poiType))return a.warn(`POI type not found: ${t.poiType}`),!1;for(const e of t.poiTypes)if(!this.getPoiTypeIdByName(e))return a.warn(`POI type not found: ${e}`),!1;return!0}getCategoryIdByName(t){const e=this.rootStore.categoryStore.categories.find(r=>r.name.toLowerCase()===t.toLowerCase());return e?e.id:null}getPoiTypeIdByName(t){const e=this.rootStore.poiTypeStore.poiTypes.find(r=>r.name.toLowerCase()===t.toLowerCase());return e?e.id:null}focusOnFilteredBooths(){if(!this.rootStore.layerStore.layersLoaded){F(()=>this.rootStore.layerStore.layersLoaded,()=>{this.focusOnFilteredBooths()},{fireImmediately:!1});return}const{uiState:t,exhibitorStore:e,boothStore:r}=this.rootStore;let i=[];if(t.selectedCategoryFilters.length>0){const o=e.exhibitors.filter(c=>t.selectedCategoryFilters.some(p=>c.categories.some(u=>u.id===p.id)));i=r.booths.filter(c=>o.some(p=>p.id===c.exhibitors[0]?.id))}if(t.selectedPoiTypeFilters.length>0){const o=r.booths.filter(c=>t.selectedPoiTypeFilters.some(p=>c.poiTypeId===p.id));i.length>0?i=i.filter(c=>o.some(p=>p.id===c.id)):i=o}const s=i.filter(o=>o.visible);s.length>0?(t.moveToBooths=s,this.rootStore.moveToList(s)):i.length>0&&(this.rootStore.showMap(),this.rootStore.moveToList(i))}openExhibitorsList(){const{uiState:t}=this.rootStore;t.list={type:"exhibitors",text:"",focused:!1},setTimeout(()=>{this.rootStore.searchStore.setFocused(!0)},100),a.log("URLFilterManager opened exhibitors list")}}})();export{H as URLFilterManager};
|
|
1
|
+
import{__esDecorate as n,__runInitializers as u}from"tslib";import{getConfig as A}from"@expofp/config";import{action as h,observable as z,reaction as m}from"mobx";import{PREFIXES as M}from"../store/search-buttons/constants";import a from"../tools/logger";import{decodeString as N,decodeStringArray as v,encodeString as Y,encodeStringArray as B,toLowerCaseArray as g,toLowerCaseString as k}from"../utils/urlEncoding";import{replaceQuery as $}from"./url-sync";const d={CATEGORIES:"categories",POI_TYPE:"poiType",POI_TYPES:"poiTypes",EXHIBITORS:"exhibitors"};let X=(()=>{let c=[],F,f=[],T=[],S,P=[],L=[],I,C,_,b,R,O,w,x,U,E;return class{static{const t=typeof Symbol=="function"&&Symbol.metadata?Object.create(null):void 0;F=[z],S=[z],I=[h],C=[h],_=[h],b=[h],R=[h],O=[h],w=[h],x=[h],U=[h],E=[h],n(this,null,I,{kind:"method",name:"initialize",static:!1,private:!1,access:{has:e=>"initialize"in e,get:e=>e.initialize},metadata:t},null,c),n(this,null,C,{kind:"method",name:"parseURLFilters",static:!1,private:!1,access:{has:e=>"parseURLFilters"in e,get:e=>e.parseURLFilters},metadata:t},null,c),n(this,null,_,{kind:"method",name:"applyFiltersToStore",static:!1,private:!1,access:{has:e=>"applyFiltersToStore"in e,get:e=>e.applyFiltersToStore},metadata:t},null,c),n(this,null,b,{kind:"method",name:"updateURLFromFilters",static:!1,private:!1,access:{has:e=>"updateURLFromFilters"in e,get:e=>e.updateURLFromFilters},metadata:t},null,c),n(this,null,R,{kind:"method",name:"setCategories",static:!1,private:!1,access:{has:e=>"setCategories"in e,get:e=>e.setCategories},metadata:t},null,c),n(this,null,O,{kind:"method",name:"setPoiType",static:!1,private:!1,access:{has:e=>"setPoiType"in e,get:e=>e.setPoiType},metadata:t},null,c),n(this,null,w,{kind:"method",name:"setPoiTypes",static:!1,private:!1,access:{has:e=>"setPoiTypes"in e,get:e=>e.setPoiTypes},metadata:t},null,c),n(this,null,x,{kind:"method",name:"clearAllFilters",static:!1,private:!1,access:{has:e=>"clearAllFilters"in e,get:e=>e.clearAllFilters},metadata:t},null,c),n(this,null,U,{kind:"method",name:"focusOnFilteredBooths",static:!1,private:!1,access:{has:e=>"focusOnFilteredBooths"in e,get:e=>e.focusOnFilteredBooths},metadata:t},null,c),n(this,null,E,{kind:"method",name:"openExhibitorsList",static:!1,private:!1,access:{has:e=>"openExhibitorsList"in e,get:e=>e.openExhibitorsList},metadata:t},null,c),n(null,null,F,{kind:"field",name:"currentFilters",static:!1,private:!1,access:{has:e=>"currentFilters"in e,get:e=>e.currentFilters,set:(e,r)=>{e.currentFilters=r}},metadata:t},f,T),n(null,null,S,{kind:"field",name:"isInitialized",static:!1,private:!1,access:{has:e=>"isInitialized"in e,get:e=>e.isInitialized,set:(e,r)=>{e.isInitialized=r}},metadata:t},P,L),t&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:t})}rootStore=u(this,c);currentFilters=u(this,f,{categories:[],poiType:null,poiTypes:[],exhibitors:!1});isInitialized=(u(this,T),u(this,P,!1));constructor(t){u(this,L),this.rootStore=t,this.setupReactions()}initialize(){this.parseURLFilters(),this.applyFiltersToStore(),this.isInitialized=!0,a.log("URLFilterManager initialized with filters:",this.currentFilters)}parseURLFilters(){const{categories:t,poiType:e,poiTypes:r,exhibitors:i}=this.readRawFilters(),s=r.filter(o=>{if(!o)return!1;const l=this.rootStore.poiTypeStore.poiTypes.some(p=>p.name.toLowerCase()===o.toLowerCase());return l||a.warn(`POI type not found in data: ${o}`),l});t.length>0&&(e||s.length>0)?(a.warn("URL contains both categories and POI types. Clearing POI types."),this.currentFilters={categories:t,poiType:null,poiTypes:[],exhibitors:i}):this.currentFilters={categories:t,poiType:e,poiTypes:s,exhibitors:i},a.log("URLFilterManager parsed filters:",{categories:t,poiType:e,poiTypes:r,exhibitors:i}),this.validateFilters(this.currentFilters)}readRawFilters(){const t=A().filters;if(Object.keys(t).length>0)return{categories:[...t.categories??[]],poiType:t.poiType??null,poiTypes:[...t.poiTypes??[]],exhibitors:t.exhibitors??!1};const e=new URLSearchParams(window.location.search),r=e.get(d.CATEGORIES),i=r?v(r):[],s=e.get(d.POI_TYPE),o=s?N(s):null,l=e.get(d.POI_TYPES),p=l?v(l):[],y=e.get(d.EXHIBITORS);return{categories:i,poiType:o,poiTypes:p,exhibitors:y==="true"||y===""}}applyFiltersToStore(){const{uiState:t,categoryFilterStore:e,searchButtonsStore:r}=this.rootStore;if(this.currentFilters.categories.length>0){const i=this.currentFilters.categories.map(s=>this.rootStore.categoryStore.categories.find(o=>o.name.toLowerCase()===s.toLowerCase())).filter(s=>s!==void 0);i.length>0?(t.selectedCategoryFilters=i,e.state.selectedItems=i.map(s=>({id:s.id,name:s.name})),t.categoryFilterOpen=!0,a.log("URLFilterManager applied categories:",i.map(s=>s.name)),setTimeout(()=>{this.focusOnFilteredBooths(),this.rootStore.searchStore.setFocused(!0)},100)):a.warn("URLFilterManager: no categories found for names:",this.currentFilters.categories)}if(this.currentFilters.poiType){const i=this.rootStore.poiTypeStore.poiTypes.find(s=>s.name.toLowerCase()===this.currentFilters.poiType.toLowerCase());i?(t.selectedPoiTypeFilters=[i],r.setPoiFilterId(`${M.POI_TYPE}${i.id}`),a.log("URLFilterManager applied POI type:",i.name),setTimeout(()=>{this.focusOnFilteredBooths(),this.rootStore.searchStore.setFocused(!0)},100)):a.warn("URLFilterManager: no POI type found for name:",this.currentFilters.poiType)}if(this.currentFilters.poiTypes.length>0){const i=this.currentFilters.poiTypes.map(s=>s?this.rootStore.poiTypeStore.poiTypes.find(o=>o.name.toLowerCase()===s.toLowerCase()):null).filter(s=>s!=null);i.length>0?(t.selectedPoiTypeFilters=i,a.log("URLFilterManager applied POI types:",i.map(s=>s.name)),setTimeout(()=>{this.focusOnFilteredBooths(),this.rootStore.searchStore.setFocused(!0)},100)):(a.warn("URLFilterManager: no POI types found for names:",this.currentFilters.poiTypes),this.currentFilters.poiTypes=[])}this.currentFilters.exhibitors&&this.openExhibitorsList()}filterSearch(){const{uiState:t}=this.rootStore,e=new URLSearchParams;if(t.selectedCategoryFilters.length>0){const r=t.selectedCategoryFilters.map(s=>s.name.toLowerCase()),i=B(r);i&&e.set(d.CATEGORIES,i)}if(t.selectedPoiTypeFilters.length>0&&t.selectedCategoryFilters.length===0)if(t.selectedPoiTypeFilters.length===1){const r=t.selectedPoiTypeFilters[0].name.toLowerCase();if(r){const i=Y(r);i&&e.set(d.POI_TYPE,i)}}else{const r=t.selectedPoiTypeFilters.map(s=>s.name.toLowerCase()),i=B(r);i&&e.set(d.POI_TYPES,i)}return this.currentFilters.exhibitors&&t.selectedCategoryFilters.length===0&&t.selectedPoiTypeFilters.length===0&&e.set(d.EXHIBITORS,"true"),e.toString()?`?${e.toString()}`:""}updateURLFromFilters(){const{uiState:t}=this.rootStore;$(this.filterSearch()),this.currentFilters={categories:t.selectedCategoryFilters.length>0?t.selectedCategoryFilters.map(e=>e.name):[],poiType:t.selectedPoiTypeFilters.length===1&&t.selectedCategoryFilters.length===0?t.selectedPoiTypeFilters[0].name:null,poiTypes:t.selectedPoiTypeFilters.length>1&&t.selectedCategoryFilters.length===0?t.selectedPoiTypeFilters.map(e=>e.name):[],exhibitors:this.currentFilters.exhibitors}}setCategories(t){this.currentFilters.categories=g(t),this.currentFilters.poiType=null,this.isInitialized&&this.updateURLFromFilters()}setPoiType(t){this.currentFilters.poiType=k(t),this.currentFilters.poiTypes=[],this.currentFilters.categories=[],this.isInitialized&&this.updateURLFromFilters()}setPoiTypes(t){this.currentFilters.poiTypes=g(t),this.currentFilters.poiType=null,this.currentFilters.categories=[],this.isInitialized&&this.updateURLFromFilters()}clearAllFilters(){this.currentFilters={categories:[],poiType:null,poiTypes:[],exhibitors:!1};const{uiState:t}=this.rootStore;t.categoryFilterOpen=!1,this.updateURLFromFilters()}getCurrentFilters(){return{...this.currentFilters}}setupReactions(){m(()=>this.rootStore.uiState.selectedCategoryFilters,t=>{if(this.isInitialized&&t.length>0){const e=g(t.map(r=>r.name));this.setCategories(e)}}),m(()=>this.rootStore.uiState.selectedPoiTypeFilters,t=>{if(this.isInitialized&&t.length>0)if(t.length===1){const e=k(t[0].name);e&&this.setPoiType(e)}else{const e=g(t.map(r=>r.name));this.setPoiTypes(e)}})}validateFilters(t){if(t.categories.length>0&&(t.poiType||t.poiTypes.length>0))return a.warn("Categories and POI types cannot be active simultaneously"),!1;if(t.poiType&&t.poiTypes.length>0)return a.warn("Both single POI type and multiple POI types cannot be active simultaneously"),!1;for(const e of t.categories)if(!this.getCategoryIdByName(e))return a.warn(`Category not found: ${e}`),!1;if(t.poiType&&!this.getPoiTypeIdByName(t.poiType))return a.warn(`POI type not found: ${t.poiType}`),!1;for(const e of t.poiTypes)if(!this.getPoiTypeIdByName(e))return a.warn(`POI type not found: ${e}`),!1;return!0}getCategoryIdByName(t){const e=this.rootStore.categoryStore.categories.find(r=>r.name.toLowerCase()===t.toLowerCase());return e?e.id:null}getPoiTypeIdByName(t){const e=this.rootStore.poiTypeStore.poiTypes.find(r=>r.name.toLowerCase()===t.toLowerCase());return e?e.id:null}focusOnFilteredBooths(){if(!this.rootStore.layerStore.layersLoaded){m(()=>this.rootStore.layerStore.layersLoaded,()=>{this.focusOnFilteredBooths()},{fireImmediately:!1});return}const{uiState:t,exhibitorStore:e,boothStore:r}=this.rootStore;let i=[];if(t.selectedCategoryFilters.length>0){const o=e.exhibitors.filter(l=>t.selectedCategoryFilters.some(p=>l.categories.some(y=>y.id===p.id)));i=r.booths.filter(l=>o.some(p=>p.id===l.exhibitors[0]?.id))}if(t.selectedPoiTypeFilters.length>0){const o=r.booths.filter(l=>t.selectedPoiTypeFilters.some(p=>l.poiTypeId===p.id));i.length>0?i=i.filter(l=>o.some(p=>p.id===l.id)):i=o}const s=i.filter(o=>o.visible);s.length>0?(t.moveToBooths=s,this.rootStore.moveToList(s)):i.length>0&&(this.rootStore.showMap(),this.rootStore.moveToList(i))}openExhibitorsList(){const{uiState:t}=this.rootStore;t.list={type:"exhibitors",text:"",focused:!1},setTimeout(()=>{this.rootStore.searchStore.setFocused(!0)},100),a.log("URLFilterManager opened exhibitors list")}}})();export{X as URLFilterManager};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The multi-slug share-link rewrite rule, pure for testing (`url-dispatch`'s
|
|
3
|
+
* `rewriteMultiSlug` binds it to the exhibitor catalog).
|
|
4
|
+
*
|
|
5
|
+
* Legacy share links may join several exhibitor slugs with `&` (or with `%26`
|
|
6
|
+
* when the payload was encoded as one unit). Such a query never selects — the
|
|
7
|
+
* dispatch falls back to search text — so each part `resolveName` recognizes
|
|
8
|
+
* is rewritten to the exhibitor's display name, keeping that text readable.
|
|
9
|
+
*
|
|
10
|
+
* Only slug-shaped parts count and only they are rewritten: a `key=value`
|
|
11
|
+
* part (config key, intent shortcut, one-shot — `=` travels as `%3D` in the
|
|
12
|
+
* encoded form) is never a slug. A lone slug riding with such params
|
|
13
|
+
* (`?slug&allowConsent=false`) is NOT a multi-slug link — left alone, it
|
|
14
|
+
* flows through the parser's config-stripping to a clean single-slug select.
|
|
15
|
+
*
|
|
16
|
+
* Returns the rewritten search (delimiter normalized to `&`), or `null` when
|
|
17
|
+
* the query is not a multi-slug link.
|
|
18
|
+
*/
|
|
19
|
+
export declare function rewriteMultiSlugQuery(search: string, resolveName: (slugOrId: string) => string | undefined): string | null;
|
|
20
|
+
//# sourceMappingURL=multi-slug.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{safeDecode as s}from"@expofp/utils";export function rewriteMultiSlugQuery(t,u){if(!t.includes("&")&&!t.includes("%26"))return null;const n=t.startsWith("?")?t.slice(1):t,r=n.includes("&")?"&":"%26",e=n.split(r),l=i=>!!i&&!s(i).includes("=");return e.filter(l).length<2?null:"?"+e.map(i=>l(i)&&u(i)||i).join("&")}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Apply the declarative config nodes onto the runtime state — the presentation
|
|
3
|
+
* flags and heatmap engagement now, camera and visibility on first layers
|
|
4
|
+
* load. Runs in EVERY mode, before `initUrlRouting`: `ignoreQuery` isolates
|
|
5
|
+
* the floor plan from the page URL (`loadConfig` already left the URL slice
|
|
6
|
+
* out of the effective config), not from its own manifest/options config.
|
|
7
|
+
*/
|
|
8
|
+
export declare function applyDeclarativeConfig(): void;
|
|
9
|
+
export declare function initUrlRouting(offHistory: boolean): void;
|
|
10
|
+
/** The public `FloorPlan.applyParameters` — replay a legacy query at runtime. */
|
|
11
|
+
export declare function applyParameters(queryRaw?: string): void;
|
|
12
|
+
/**
|
|
13
|
+
* The pathway deep link: activate the busiest floor, highlight the listed
|
|
14
|
+
* entities, draw the pathway, zoom to the booths — plus the multi-point-tour
|
|
15
|
+
* list header when a tour rides along. Also the body of `FloorPlan.showPathway`
|
|
16
|
+
* (which passes no tour).
|
|
17
|
+
*/
|
|
18
|
+
export declare function applyPathway(options: {
|
|
19
|
+
pathwayId: string;
|
|
20
|
+
boothIds: string[];
|
|
21
|
+
exhibitorIds: string[];
|
|
22
|
+
tourId?: string;
|
|
23
|
+
}): void;
|
|
24
|
+
//# sourceMappingURL=url-dispatch.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{applyIntents as Y,getConfig as g,parseFromUrlTolerant as D,parseIntentsFromUrl as K,parseLegacyQuery as v,serializeSelection as W}from"@expofp/config";import{Box as z}from"@expofp/geometry";import{UrlConfigSchema as Q}from"@expofp/schema";import{safeDecode as d}from"@expofp/utils";import{autorun as x,runInAction as w,when as p}from"mobx";import{recoverKioskFromUrlPrams as H}from"../components/Kiosk/recoverKioskFromUrlPrams";import{LEGACY_PREVIEW_MODE_STORAGE_KEY as j,LEGACY_VIEWER_MODE_STORAGE_KEY as N,MAP_SETTINGS_KEY as $,PREVIEW_MODE_STORAGE_KEY as M,VIEWER_MODE_STORAGE_KEY as P}from"../constants";import b from"../data";import o,{uiState as r}from"../store";import{BoothBase as B}from"../store/BoothStore";import{CurrentPosition as q,extractRoute as J}from"../store/RouteStore";import{setConsentSettings as X}from"../tools/gtag";import L from"../tools/logger";import{areLayersEnabled as Z}from"../utils/areLayersEnabled";import{cameraToMapSettings as S}from"../utils/camera-map-settings";import{handleCustomCommand as ee}from"../utils/customCommands";import{getMostFrequent as te}from"../utils/getMostFrequent";import{heatmapEnabled as oe}from"../utils/heatmap-enabled";import{hasLocale as re,setLocale as ie}from"../utils/i18n";import{isLocalStorageAvailable as T}from"../utils/localStorage";import{stripTrackingParams as se}from"../utils/trackingParams";import{rewriteMultiSlugQuery as ae}from"./multi-slug";import{currentSearch as m,disableUrlWrites as ne,initUrlSync as le,pushQuery as ce,replaceQuery as f}from"./url-sync";let k=!1;export function applyDeclarativeConfig(){U(g()),p(()=>o.layerStore.layersLoaded,()=>{const e=g().camera;Object.keys(e).length&&h(S(e));const t=g().visibility;Object.keys(t).length&&r.setVisibility(t)})}export function initUrlRouting(e){le({offHistory:e,onNavigate:E}),R(),I(),p(()=>o.layerStore.layersLoaded,()=>{o.urlFilterManager&&!o.urlFilterManager.isInitialized&&o.urlFilterManager.initialize(),E(),x(V),x(G),r.viewerMode&&(r.menu=!0)})}export function applyParameters(e=""){f("?"+d(e.toString())),o.layerStore.layersLoaded?F(e):(I(),p(()=>o.layerStore.layersLoaded,()=>F(e)))}function F(e){const t="?"+d(e),s=de(t);U(s),s.consent&&X(s.consent),s.camera&&Object.keys(s.camera).length&&h(S(s.camera)),s.visibility&&Object.keys(s.visibility).length&&r.setVisibility(s.visibility),R(),E();const i=[...s.intents??[],...K(t).intents];i.length&&Y(o.fp,i)}function I(){const e=m(),t=e.length>1?d(e.substring(1)):"";return ee(t)}function E(){k=!0;try{const e=new URLSearchParams(d(window.location.search));H(e);const{primary:t,oneShots:s}=v(m()),i=s.find(l=>l.type==="camera");if(i){const l=i.roll;h({...S(i.camera),roll:l})}else new Set(e.keys()).size||he();const c=t.type==="select"&&(!t.slug||/^t=[^&]*$/.test(t.slug))&&(r.heatmap||r.heatmapYah);!I()&&!c&&ue(t)}finally{k=!1}G(),V()}function ue(e){const t=o.fp;switch(e.type){case"kiosk":e.enabled===!0?r.kiosk=!0:e.enabled===!1&&(r.kiosk=!1,r.resetUIScale());return;case"list":t.showList(e.list);return;case"tour":t.selectTour(e.tourId);return;case"planner":t.openPlanner({items:e.items,from:e.from,fromBookmarks:e.fromBookmarks});return;case"route":{o.routeStore.setOnlyAccessible(e.accessible),o.routeStore.selectRoute(J(e.from??"",e.to??"",e.waypoints)),o.uiState.setIsMultiPointRoute(e.waypoints.length>0),e.title&&o.uiState.setRouteTitle(e.title);return}case"language":re(e.langId)&&ie(e.langId);return;case"printPdf":o.uiState.printingPdf=!0;return;case"visibility":o.uiState.setVisibility(e.hidden.reduce((s,i)=>({...s,[i]:!1}),{}));return;case"buildRoute":t.startBuildRoute();return;case"pathway":applyPathway(e);return;case"selectExhibitors":setTimeout(()=>t.selectExhibitor(e.values),250);return;case"ownedByFilters":L.log("Skipping filter parameters in dispatchFromUrl (owned by URLFilterManager)");return;case"ownedByConfig":return;case"select":t.select(e.slug);return}}export function applyPathway(e){const{pathwayId:t,boothIds:s,exhibitorIds:i,tourId:c}=e;if(c){const a=o.toursStore.getTourById(c);a&&w(()=>{o.uiState.setTourTitle(a.name),o.uiState.setTourDescription(a.description??""),o.uiState.setIsMultiPointTour(!0),o.uiState.setMultiPointTourList(a.id)})}const l=o.boothStore.booths.filter(a=>s.includes(a.externalId)),u=o.exhibitorStore.exhibitors.filter(a=>i.includes(a.externalId)).flatMap(a=>a.booths),n=[...l,...u];if(Z()){const a=te(n.map(y=>y.layer.name));a&&o.fp.activateFloor({name:a})}(s.length>0||i.length>0)&&o.fp.highlightEntities([...s,...i]),o.layerStore.showPathWay(t),n.length>0&&w(()=>{o.uiState.moveToRect=z.fromUnion(...n.map(a=>a.rect).filter(Boolean)),o.uiState.rollReset=!0})}function R(){const e=m(),{oneShots:t}=v(e);for(const i of t)fe(i);e.startsWith("?preview=")&&f("?"),m().includes("copy_exh")&&f("?");const s=se(m());s!==null&&f("?"+s),r.previewExhibitor&&f("?"+r.previewExhibitor.slug),me()}function fe(e){switch(e.type){case"heatmap":O(e.yah);return;case"blueDot":{const t=new q(e.x,e.y,o.layerStore.findLayer(e.layer??"")?.name,void 0,e.lat,e.lng);p(()=>o.layerStore.layersLoaded,()=>o.routeStore.selectCurrentPosition(t,!0,1));return}case"viewerMode":T&&(e.enabled?localStorage.setItem(P,"true"):(localStorage.removeItem(P),localStorage.removeItem(N)));return;case"previewMode":T&&(e.enabled?localStorage.setItem(M,"true"):(localStorage.removeItem(M),localStorage.removeItem(j)));return;case"uiScale":e.scale!==null?o.uiState.setUIScale(e.scale,!0):L.warn(`Invalid ui-scale parameter: ${e.raw}. Must be a number between 0.8 and 1.4.`);return;case"resetUiScale":o.uiState.resetUIScale();return;case"legacyBookmarks":{const t=e.appendExhibitorId===null?void 0:o.exhibitorStore.exhibitorById.get(e.appendExhibitorId);f(t?"?"+t.slug:"?bookmarks");return}}}function O(e){ne(),e?(r.heatmapYah=!0,r.monochrome=!0,r.hideLogoInBooth=!0,r.hideHeaderLogo=!0,r.disableBookmarked=!0):r.heatmap=!0}function me(){const e=ae(m(),t=>o.exhibitorStore.exhibitors.find(i=>i.slug===t||i.externalId===t)?.name);e!==null&&f(e)}function U(e){e.noOverlay!==void 0&&(r.hideOverlay=e.noOverlay),e.monochrome&&(r.monochrome=!0),e.hideHeaderLogo&&(r.hideHeaderLogo=!0),e.hideLogoInBooth&&(r.hideLogoInBooth=!0),e.disableFeatured&&o.exhibitorStore.exhibitors.forEach(t=>t.featured=!1),e.disableBookmarked&&(r.disableBookmarked=!0),e.disableGps&&o.routeStore.setGpsTrackingEnabled(!1),e.heatmap&&oe(e.heatmap)&&O(e.heatmap.variant==="yah")}function de(e){return D(Q,e).value}let C=null,_=null,A=null;function G(){const{selection:e,exhibitor:t,booth:s,eventItem:i}=pe(),c=o.urlFilterManager.filterSearch();if(k)return;const l=W(e)||c;m()!==l&&(t!==C||s!==_||i!==A?ce(l):f(l),C=t,_=s,A=i)}function pe(){const e=r.selectedExhibitor,t=r.selectedBooth,s=r.selectedEventItem,i=r.selectedRoute,c=r.selectedSpeaker,l=r.setKioskModeEnabled,u=r.list;let n;if(u.type==="route-planner"&&!e&&!t&&!s){const a=o.routePlannerStore;n={type:"planner",fromBookmarks:a.source==="bookmarks",items:a.items.map(y=>y.entity.slug).filter(Boolean),from:a.startPoint?.slug||void 0}}else if(i&&!r.isMultiPointRoute)n={type:"route",to:i.to instanceof B?i.to.slug:void 0,from:i.from instanceof B?i.from.slug:void 0,accessible:o.routeStore.onlyAccessible,waypoints:i.waypoints?.map(a=>a.slug)};else if(e)n={type:"slug",slug:e.slug};else if(t)n={type:"slug",slug:t.slug};else if(s)n={type:"slug",slug:s.slug};else if(c)n={type:"slug",slug:c.slug};else if(l)n={type:"none"};else switch(u.type){case"bookmarks":case"visited":case"sessions":case"exhibitors":case"speakers":case"tours":case"language":n={type:"list",list:u.type};break;case"category":n={type:"slug",slug:r.selectedCategory?.slug??""};break;case"search":n={type:"slug",slug:u.text||""};break;case"filter":n={type:"filter",key:u.query.key,value:u.query.value};break;case"multi-point-tour":n={type:"tour",tourId:u.tourId};break;default:throw new Error("Unkown list.type")}return{selection:n,exhibitor:e,booth:t,eventItem:s}}function V(){const e=r.selectedExhibitor,t=r.selectedEventItem,s=r.selectedSpeaker;let i="";e?i=e.name:t?i=t.name:s?i=s.name:r.list.type==="search"&&r.list.text?i="`"+(r.list.text||"")+"`":r.list.type==="multi-point-tour"&&r.tourTitle&&(i=r.tourTitle),i.length&&(i+=" \u2013 "),i+=b.title,b.subtitle&&(i+=" \u2013 "+b.subtitle),i+=" \u2013 Expo Floor Plan by ExpoFP",document.title=i}function h(e){try{if(r.setMapSettings(e),e.z){const t=o.layerStore.layers.find(s=>s.name===e.z);t&&o.layerStore.updateVisibility(t,!0)}}catch(t){console.error("Failed to process or save map settings.",t)}}function he(){try{const e=sessionStorage.getItem($);e&&h(JSON.parse(e))}catch(e){console.error("Failed to process or save map settings.",e)}}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/** The visited-URL trail (pathname + search per entry) — analytics referrer feed. */
|
|
2
|
+
export declare function getLocationHistory(): string[];
|
|
3
|
+
/** The current search string as the history sees it (`''` or `'?…'`). */
|
|
4
|
+
export declare function currentSearch(): string;
|
|
5
|
+
export declare function pushQuery(search: string): void;
|
|
6
|
+
/**
|
|
7
|
+
* Returns whether the write actually happened — `false` under frozen writes,
|
|
8
|
+
* for callers whose follow-up only makes sense after a real URL change (the
|
|
9
|
+
* debug-mode scrub reloads only on `true`, else `?debug=` would reload forever).
|
|
10
|
+
*/
|
|
11
|
+
export declare function replaceQuery(search: string): boolean;
|
|
12
|
+
/** Stop writing to the history for the rest of the session (heatmap mode). */
|
|
13
|
+
export declare function disableUrlWrites(): void;
|
|
14
|
+
/**
|
|
15
|
+
* Start listening to the browser history. `onNavigate` fires on every POP
|
|
16
|
+
* (browser back/forward) so the dispatch side can replay the URL into state.
|
|
17
|
+
*/
|
|
18
|
+
export declare function initUrlSync(options: {
|
|
19
|
+
offHistory: boolean;
|
|
20
|
+
onNavigate: () => void;
|
|
21
|
+
}): void;
|
|
22
|
+
export declare function destroyUrlSync(): void;
|
|
23
|
+
/**
|
|
24
|
+
* The UI back button — a real browser back. The POP it produces flows through
|
|
25
|
+
* the listener above, so the state replay (`onNavigate`) and the trail
|
|
26
|
+
* recording happen exactly as for the browser's own back button. Note the
|
|
27
|
+
* replay is therefore asynchronous (it lands with the POP event), and on a
|
|
28
|
+
* history with no in-app pushes yet the browser may leave the page — both
|
|
29
|
+
* identical to pressing the browser's back button.
|
|
30
|
+
*
|
|
31
|
+
* Writes are frozen until that POP lands (see `backPending`); the timer lifts
|
|
32
|
+
* the freeze when no POP will ever come — a back with nowhere to go (empty
|
|
33
|
+
* back stack, e.g. a deep link opened in a fresh tab) is a silent no-op.
|
|
34
|
+
*/
|
|
35
|
+
export declare function goBack(): void;
|
|
36
|
+
//# sourceMappingURL=url-sync.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{createBrowserHistory as h}from"history";import d from"../tools/logger";const t=h(),l=window.location.pathname,i=[];let r=!1,o=!1,c=0,f=()=>{},p;export function getLocationHistory(){return i}function n(e){return l+e}export function currentSearch(){return t.location.search}export function pushQuery(e){!r&&!o&&t.push(n(e))}export function replaceQuery(e){return r||o?!1:(t.replace(n(e)),!0)}export function disableUrlWrites(){r=!0}export function initUrlSync(e){r||=e.offHistory,f=e.onNavigate,!r&&n(t.location.search)===l&&i.push(n(t.location.search)),p=t.listen((u,s)=>{a(),!r&&(i.push(n(u.search)),d.log("history",s,u),s==="POP"&&f())})}export function destroyUrlSync(){r=!1,a(),p?.()}function a(){o=!1,window.clearTimeout(c)}export function goBack(){o=!0,window.clearTimeout(c),c=window.setTimeout(a,1e3),t.goBack()}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import { RawPoiType, RawRegularBooth } from '@expofp/schema';
|
|
1
2
|
import { Box } from '@expofp/geometry';
|
|
2
3
|
import { ImageDef } from '@expofp/renderer';
|
|
3
|
-
import { PathInfo,
|
|
4
|
+
import { PathInfo, ShapeBgDef } from '../types/drawing.types';
|
|
4
5
|
import { EventItem } from './EventStore';
|
|
5
6
|
import { Exhibitor } from './ExhibitorStore';
|
|
6
7
|
import { Layer } from './LayerStore';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { MarketMaterial, RawExhibitor } from '
|
|
1
|
+
import { Logo, MarketMaterial, RawExhibitor } from '@expofp/schema';
|
|
2
2
|
import { Booth } from './BoothStore';
|
|
3
3
|
import { Category } from './CategoryStore';
|
|
4
4
|
import { EventItem } from './EventStore';
|
|
@@ -64,7 +64,8 @@ export declare class Exhibitor implements Omit<RawExhibitor, 'categories' | 'boo
|
|
|
64
64
|
readonly leadingImageLinkUrl: string;
|
|
65
65
|
readonly videoUrl: string;
|
|
66
66
|
readonly order: number;
|
|
67
|
-
|
|
67
|
+
/** Always the object form — `normalizeLegacyData` converts legacy string logos. */
|
|
68
|
+
readonly logo?: Logo;
|
|
68
69
|
readonly logoInBooth: boolean;
|
|
69
70
|
readonly gallery: string[];
|
|
70
71
|
readonly marketMaterials: MarketMaterial[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__esDecorate as o,__runInitializers as s}from"tslib";import{action as R,computed as g,observable as h}from"mobx";import{buildRebookingUrl as C,getRebookingToken as U}from"../tools/rebookingUrl";import w from"../tools/settings";import q from"../utils/is-debug";export var RebookingState;(function(a){a[a.Unasked=0]="Unasked",a[a.Accepted=1]="Accepted",a[a.Rejected=2]="Rejected",a[a.Undecided=3]="Undecided"})(RebookingState||(RebookingState={}));let A=(()=>{let a=[],c,u=[],b=[],k,m=[],f=[],_,v=[],p=[],x,S,y,B,I,z,d,i,l,N;return class{static{const t=typeof Symbol=="function"&&Symbol.metadata?Object.create(null):void 0;c=[h],k=[h],_=[h],x=[g({keepAlive:!0})],S=[g({keepAlive:!0})],y=[g({keepAlive:!0})],B=[g({keepAlive:!0})],I=[g],z=[g],d=[g({keepAlive:!0})],i=[R],l=[R],N=[R],o(this,null,x,{kind:"getter",name:"exhibitorById",static:!1,private:!1,access:{has:e=>"exhibitorById"in e,get:e=>e.exhibitorById},metadata:t},null,a),o(this,null,S,{kind:"getter",name:"exhibitorByExternalId",static:!1,private:!1,access:{has:e=>"exhibitorByExternalId"in e,get:e=>e.exhibitorByExternalId},metadata:t},null,a),o(this,null,y,{kind:"getter",name:"exhibitorByName",static:!1,private:!1,access:{has:e=>"exhibitorByName"in e,get:e=>e.exhibitorByName},metadata:t},null,a),o(this,null,B,{kind:"getter",name:"exhibitorBySlug",static:!1,private:!1,access:{has:e=>"exhibitorBySlug"in e,get:e=>e.exhibitorBySlug},metadata:t},null,a),o(this,null,I,{kind:"getter",name:"bookmarked",static:!1,private:!1,access:{has:e=>"bookmarked"in e,get:e=>e.bookmarked},metadata:t},null,a),o(this,null,z,{kind:"getter",name:"visited",static:!1,private:!1,access:{has:e=>"visited"in e,get:e=>e.visited},metadata:t},null,a),o(this,null,d,{kind:"getter",name:"advertised",static:!1,private:!1,access:{has:e=>"advertised"in e,get:e=>e.advertised},metadata:t},null,a),o(this,null,i,{kind:"method",name:"replaceBookmarked",static:!1,private:!1,access:{has:e=>"replaceBookmarked"in e,get:e=>e.replaceBookmarked},metadata:t},null,a),o(this,null,l,{kind:"method",name:"replaceVisited",static:!1,private:!1,access:{has:e=>"replaceVisited"in e,get:e=>e.replaceVisited},metadata:t},null,a),o(this,null,N,{kind:"method",name:"setRebookingState",static:!1,private:!1,access:{has:e=>"setRebookingState"in e,get:e=>e.setRebookingState},metadata:t},null,a),o(null,null,c,{kind:"field",name:"highlightedByExternalIds",static:!1,private:!1,access:{has:e=>"highlightedByExternalIds"in e,get:e=>e.highlightedByExternalIds,set:(e,n)=>{e.highlightedByExternalIds=n}},metadata:t},u,b),o(null,null,k,{kind:"field",name:"rebookingStateChangeRequested",static:!1,private:!1,access:{has:e=>"rebookingStateChangeRequested"in e,get:e=>e.rebookingStateChangeRequested,set:(e,n)=>{e.rebookingStateChangeRequested=n}},metadata:t},m,f),o(null,null,_,{kind:"field",name:"rebookingStateSaved",static:!1,private:!1,access:{has:e=>"rebookingStateSaved"in e,get:e=>e.rebookingStateSaved,set:(e,n)=>{e.rebookingStateSaved=n}},metadata:t},v,p),t&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:t})}rootStore=s(this,a);exhibitors=[];timeout;constructor(t){s(this,p),this.rootStore=t}highlightedByExternalIds=s(this,u,[]);rebookingStateChangeRequested=(s(this,b),s(this,m,!1));rebookingStateSaved=(s(this,f),s(this,v,!1));get exhibitorById(){return new Map(this.exhibitors.map(t=>[t.id,t]))}get exhibitorByExternalId(){return new Map(this.exhibitors.map(t=>[t.externalId,t]))}get exhibitorByName(){return new Map(this.exhibitors.map(t=>[t.name.toLowerCase(),t]))}get exhibitorBySlug(){return new Map(this.exhibitors.map(t=>[t.slug,t]))}get bookmarked(){return this.exhibitors.filter(t=>t.bookmarked)}get visited(){return this.exhibitors.filter(t=>t.visited)}get advertised(){return this.exhibitors.filter(t=>t.advertise&&t.logo)}replaceBookmarked(t){if(!Array.isArray(t))return;const e=(t||[]).map(r=>this.exhibitorById.get(r)).filter(r=>r),n=new Set(e),E=this.bookmarked.filter(r=>!n.has(r));for(const r of E)r.bookmarked=!1;for(const r of e)r.bookmarked=!0}replaceVisited(t){if(!Array.isArray(t))return;const e=(t||[]).map(r=>this.exhibitorById.get(r)).filter(r=>r),n=new Set(e),E=this.visited.filter(r=>!n.has(r));for(const r of E)r.visited=!1;for(const r of e)r.visited=!0}setRebookingState(t,e,n){clearTimeout(this.timeout),this.rebookingStateChangeRequested=!1,t.rebookingState=e,t.rebookingNote=n;const E=C("api/v1/set-rebooking-state",{rt:U(),expoKey:this.rootStore.fp.eventId});fetch(E,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({expoKey:w.EXPO,exhibitorId:t.id,rebookingState:e,rebookingNote:n})}).then(r=>{r.ok&&(this.rebookingStateSaved=!0),!r.ok&&!q&&(t.rebookingState=RebookingState.Unasked,this.rebookingStateSaved=!1)}).catch(()=>{t.rebookingState=RebookingState.Unasked,this.rebookingStateSaved=!1}).finally(()=>{this.rebookingStateChangeRequested=!0,this.timeout=setTimeout(()=>{this.rebookingStateChangeRequested=!1},5e3)})}findExhibitor(t){return this.exhibitorByExternalId.get(t)||this.exhibitorByName.get(t.toLowerCase())||this.exhibitorBySlug.get(t)}}})();export default A;let T=(()=>{let a,c=[],u=[],b,k=[],m=[],f,_=[],v=[],p,x=[],S=[],y,B=[],I=[];return class{static{const d=typeof Symbol=="function"&&Symbol.metadata?Object.create(null):void 0;a=[h],b=[h],f=[h],p=[h],y=[h],o(null,null,a,{kind:"field",name:"featured",static:!1,private:!1,access:{has:i=>"featured"in i,get:i=>i.featured,set:(i,l)=>{i.featured=l}},metadata:d},c,u),o(null,null,b,{kind:"field",name:"bookmarked",static:!1,private:!1,access:{has:i=>"bookmarked"in i,get:i=>i.bookmarked,set:(i,l)=>{i.bookmarked=l}},metadata:d},k,m),o(null,null,f,{kind:"field",name:"visited",static:!1,private:!1,access:{has:i=>"visited"in i,get:i=>i.visited,set:(i,l)=>{i.visited=l}},metadata:d},_,v),o(null,null,p,{kind:"field",name:"rebookingState",static:!1,private:!1,access:{has:i=>"rebookingState"in i,get:i=>i.rebookingState,set:(i,l)=>{i.rebookingState=l}},metadata:d},x,S),o(null,null,y,{kind:"field",name:"rebookingNote",static:!1,private:!1,access:{has:i=>"rebookingNote"in i,get:i=>i.rebookingNote,set:(i,l)=>{i.rebookingNote=l}},metadata:d},B,I),d&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:d})}store;id;name;externalId;featured=s(this,c,void 0);advertise=s(this,u);description;address;address2;city;state;zip;country;phone1;website;facebook;instagram;linkedin;twitter;googlePlus;xing;youtube;email;privateEmail;customButtonTitle;customButtonUrl;customButton2Title;customButton2Url;customButton3Title;customButton3Url;leadingImageUrl;leadingImageLinkUrl;videoUrl;order;logo;logoInBooth;gallery;marketMaterials;slug;bookmarked=s(this,k,void 0);visited=(s(this,m),s(this,_,void 0));rebookingState=(s(this,v),s(this,x,void 0));rebookingNote=(s(this,S),s(this,B,void 0));booths=s(this,I);categories;schedule;entity={type:"exhibitor"}}})();export{T as Exhibitor};
|
|
1
|
+
import{__esDecorate as o,__runInitializers as s}from"tslib";import{action as R,computed as g,observable as h}from"mobx";import{buildRebookingUrl as C,getRebookingToken as U}from"../tools/rebookingUrl";import w from"../tools/settings";import q from"../utils/is-debug";export var RebookingState;(function(a){a[a.Unasked=0]="Unasked",a[a.Accepted=1]="Accepted",a[a.Rejected=2]="Rejected",a[a.Undecided=3]="Undecided"})(RebookingState||(RebookingState={}));let A=(()=>{let a=[],c,u=[],b=[],k,m=[],f=[],_,v=[],p=[],x,S,y,B,I,z,d,i,l,N;return class{static{const t=typeof Symbol=="function"&&Symbol.metadata?Object.create(null):void 0;c=[h],k=[h],_=[h],x=[g({keepAlive:!0})],S=[g({keepAlive:!0})],y=[g({keepAlive:!0})],B=[g({keepAlive:!0})],I=[g],z=[g],d=[g({keepAlive:!0})],i=[R],l=[R],N=[R],o(this,null,x,{kind:"getter",name:"exhibitorById",static:!1,private:!1,access:{has:e=>"exhibitorById"in e,get:e=>e.exhibitorById},metadata:t},null,a),o(this,null,S,{kind:"getter",name:"exhibitorByExternalId",static:!1,private:!1,access:{has:e=>"exhibitorByExternalId"in e,get:e=>e.exhibitorByExternalId},metadata:t},null,a),o(this,null,y,{kind:"getter",name:"exhibitorByName",static:!1,private:!1,access:{has:e=>"exhibitorByName"in e,get:e=>e.exhibitorByName},metadata:t},null,a),o(this,null,B,{kind:"getter",name:"exhibitorBySlug",static:!1,private:!1,access:{has:e=>"exhibitorBySlug"in e,get:e=>e.exhibitorBySlug},metadata:t},null,a),o(this,null,I,{kind:"getter",name:"bookmarked",static:!1,private:!1,access:{has:e=>"bookmarked"in e,get:e=>e.bookmarked},metadata:t},null,a),o(this,null,z,{kind:"getter",name:"visited",static:!1,private:!1,access:{has:e=>"visited"in e,get:e=>e.visited},metadata:t},null,a),o(this,null,d,{kind:"getter",name:"advertised",static:!1,private:!1,access:{has:e=>"advertised"in e,get:e=>e.advertised},metadata:t},null,a),o(this,null,i,{kind:"method",name:"replaceBookmarked",static:!1,private:!1,access:{has:e=>"replaceBookmarked"in e,get:e=>e.replaceBookmarked},metadata:t},null,a),o(this,null,l,{kind:"method",name:"replaceVisited",static:!1,private:!1,access:{has:e=>"replaceVisited"in e,get:e=>e.replaceVisited},metadata:t},null,a),o(this,null,N,{kind:"method",name:"setRebookingState",static:!1,private:!1,access:{has:e=>"setRebookingState"in e,get:e=>e.setRebookingState},metadata:t},null,a),o(null,null,c,{kind:"field",name:"highlightedByExternalIds",static:!1,private:!1,access:{has:e=>"highlightedByExternalIds"in e,get:e=>e.highlightedByExternalIds,set:(e,n)=>{e.highlightedByExternalIds=n}},metadata:t},u,b),o(null,null,k,{kind:"field",name:"rebookingStateChangeRequested",static:!1,private:!1,access:{has:e=>"rebookingStateChangeRequested"in e,get:e=>e.rebookingStateChangeRequested,set:(e,n)=>{e.rebookingStateChangeRequested=n}},metadata:t},m,f),o(null,null,_,{kind:"field",name:"rebookingStateSaved",static:!1,private:!1,access:{has:e=>"rebookingStateSaved"in e,get:e=>e.rebookingStateSaved,set:(e,n)=>{e.rebookingStateSaved=n}},metadata:t},v,p),t&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:t})}rootStore=s(this,a);exhibitors=[];timeout;constructor(t){s(this,p),this.rootStore=t}highlightedByExternalIds=s(this,u,[]);rebookingStateChangeRequested=(s(this,b),s(this,m,!1));rebookingStateSaved=(s(this,f),s(this,v,!1));get exhibitorById(){return new Map(this.exhibitors.map(t=>[t.id,t]))}get exhibitorByExternalId(){return new Map(this.exhibitors.map(t=>[t.externalId,t]))}get exhibitorByName(){return new Map(this.exhibitors.map(t=>[t.name.toLowerCase(),t]))}get exhibitorBySlug(){return new Map(this.exhibitors.map(t=>[t.slug,t]))}get bookmarked(){return this.exhibitors.filter(t=>t.bookmarked)}get visited(){return this.exhibitors.filter(t=>t.visited)}get advertised(){return this.exhibitors.filter(t=>t.advertise&&t.logo?.url)}replaceBookmarked(t){if(!Array.isArray(t))return;const e=(t||[]).map(r=>this.exhibitorById.get(r)).filter(r=>r),n=new Set(e),E=this.bookmarked.filter(r=>!n.has(r));for(const r of E)r.bookmarked=!1;for(const r of e)r.bookmarked=!0}replaceVisited(t){if(!Array.isArray(t))return;const e=(t||[]).map(r=>this.exhibitorById.get(r)).filter(r=>r),n=new Set(e),E=this.visited.filter(r=>!n.has(r));for(const r of E)r.visited=!1;for(const r of e)r.visited=!0}setRebookingState(t,e,n){clearTimeout(this.timeout),this.rebookingStateChangeRequested=!1,t.rebookingState=e,t.rebookingNote=n;const E=C("api/v1/set-rebooking-state",{rt:U(),expoKey:this.rootStore.fp.eventId});fetch(E,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({expoKey:w.EXPO,exhibitorId:t.id,rebookingState:e,rebookingNote:n})}).then(r=>{r.ok&&(this.rebookingStateSaved=!0),!r.ok&&!q&&(t.rebookingState=RebookingState.Unasked,this.rebookingStateSaved=!1)}).catch(()=>{t.rebookingState=RebookingState.Unasked,this.rebookingStateSaved=!1}).finally(()=>{this.rebookingStateChangeRequested=!0,this.timeout=setTimeout(()=>{this.rebookingStateChangeRequested=!1},5e3)})}findExhibitor(t){return this.exhibitorByExternalId.get(t)||this.exhibitorByName.get(t.toLowerCase())||this.exhibitorBySlug.get(t)}}})();export default A;let T=(()=>{let a,c=[],u=[],b,k=[],m=[],f,_=[],v=[],p,x=[],S=[],y,B=[],I=[];return class{static{const d=typeof Symbol=="function"&&Symbol.metadata?Object.create(null):void 0;a=[h],b=[h],f=[h],p=[h],y=[h],o(null,null,a,{kind:"field",name:"featured",static:!1,private:!1,access:{has:i=>"featured"in i,get:i=>i.featured,set:(i,l)=>{i.featured=l}},metadata:d},c,u),o(null,null,b,{kind:"field",name:"bookmarked",static:!1,private:!1,access:{has:i=>"bookmarked"in i,get:i=>i.bookmarked,set:(i,l)=>{i.bookmarked=l}},metadata:d},k,m),o(null,null,f,{kind:"field",name:"visited",static:!1,private:!1,access:{has:i=>"visited"in i,get:i=>i.visited,set:(i,l)=>{i.visited=l}},metadata:d},_,v),o(null,null,p,{kind:"field",name:"rebookingState",static:!1,private:!1,access:{has:i=>"rebookingState"in i,get:i=>i.rebookingState,set:(i,l)=>{i.rebookingState=l}},metadata:d},x,S),o(null,null,y,{kind:"field",name:"rebookingNote",static:!1,private:!1,access:{has:i=>"rebookingNote"in i,get:i=>i.rebookingNote,set:(i,l)=>{i.rebookingNote=l}},metadata:d},B,I),d&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:d})}store;id;name;externalId;featured=s(this,c,void 0);advertise=s(this,u);description;address;address2;city;state;zip;country;phone1;website;facebook;instagram;linkedin;twitter;googlePlus;xing;youtube;email;privateEmail;customButtonTitle;customButtonUrl;customButton2Title;customButton2Url;customButton3Title;customButton3Url;leadingImageUrl;leadingImageLinkUrl;videoUrl;order;logo;logoInBooth;gallery;marketMaterials;slug;bookmarked=s(this,k,void 0);visited=(s(this,m),s(this,_,void 0));rebookingState=(s(this,v),s(this,x,void 0));rebookingNote=(s(this,S),s(this,B,void 0));booths=s(this,I);categories;schedule;entity={type:"exhibitor"}}})();export{T as Exhibitor};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__esDecorate as l,__runInitializers as d}from"tslib";import{Box as W}from"@expofp/geometry";import{action as g,computed as h,observable as m,runInAction as
|
|
1
|
+
import{__esDecorate as l,__runInitializers as d}from"tslib";import{getFpSvgJs as j}from"../data/fp-payloads";import{Box as W}from"@expofp/geometry";import{action as g,computed as h,observable as m,runInAction as D}from"mobx";import B from"../components/Map/drawing/config/config-load-layer";import N from"../tools/settings";import{areLayersEnabled as U}from"../utils/areLayersEnabled";import{shortenName as H}from"../utils/shortenName";import s from".";const X=["money2020usa","rodion2","possible2025","2025virtuosotravelweek","zscalerskofy26","gamescom2025"];export var LayersMode;(function(i){i[i.Default=0]="Default",i[i.Separated=1]="Separated",i[i.Radio=2]="Radio",i[i.CheckBox=3]="CheckBox"})(LayersMode||(LayersMode={}));export var LayerMode;(function(i){i[i.Unset=0]="Unset",i[i.AlwaysVisible=1]="AlwaysVisible",i[i.AlwaysHidden=2]="AlwaysHidden",i[i.TurnedOn=3]="TurnedOn",i[i.TurnedOff=4]="TurnedOff"})(LayerMode||(LayerMode={}));let C=(()=>{let i,y=[],p=[],v,b=[],_=[];return class{static{const c=typeof Symbol=="function"&&Symbol.metadata?Object.create(null):void 0;i=[m],v=[m],l(null,null,i,{kind:"field",name:"loaded",static:!1,private:!1,access:{has:n=>"loaded"in n,get:n=>n.loaded,set:(n,u)=>{n.loaded=u}},metadata:c},y,p),l(null,null,v,{kind:"field",name:"visible",static:!1,private:!1,access:{has:n=>"visible"in n,get:n=>n.visible,set:(n,u)=>{n.visible=u}},metadata:c},b,_),c&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:c})}basePriority;name;description;frozen;rect=null;viewbox=null;configured;childLayers=[];rootParent=null;mode;children=[];pathway;floorIndex;loaded=d(this,y,void 0);visible=(d(this,p),d(this,b,void 0));get shortName(){return H(this.description)}constructor(){d(this,_)}}})();export{C as Layer};let q=(()=>{let i=[],y,p=[],v=[],b,_=[],w=[],c,n=[],u=[],L,x=[],S=[],k,P,T,R,V,I,z,A,E,F;return class{static{const t=typeof Symbol=="function"&&Symbol.metadata?Object.create(null):void 0;y=[m],b=[m],c=[m],L=[m],k=[h({keepAlive:!0})],P=[h({keepAlive:!0})],T=[h({keepAlive:!0})],R=[h({keepAlive:!0})],V=[h],I=[h],z=[g],A=[g],E=[g],F=[g],l(this,null,k,{kind:"getter",name:"visible",static:!1,private:!1,access:{has:e=>"visible"in e,get:e=>e.visible},metadata:t},null,i),l(this,null,P,{kind:"getter",name:"loaded",static:!1,private:!1,access:{has:e=>"loaded"in e,get:e=>e.loaded},metadata:t},null,i),l(this,null,T,{kind:"getter",name:"rectangle",static:!1,private:!1,access:{has:e=>"rectangle"in e,get:e=>e.rectangle},metadata:t},null,i),l(this,null,R,{kind:"getter",name:"viewboxRectangle",static:!1,private:!1,access:{has:e=>"viewboxRectangle"in e,get:e=>e.viewboxRectangle},metadata:t},null,i),l(this,null,V,{kind:"getter",name:"pathwayLayers",static:!1,private:!1,access:{has:e=>"pathwayLayers"in e,get:e=>e.pathwayLayers},metadata:t},null,i),l(this,null,I,{kind:"getter",name:"floors",static:!1,private:!1,access:{has:e=>"floors"in e,get:e=>e.floors},metadata:t},null,i),l(this,null,z,{kind:"method",name:"selectFloor",static:!1,private:!1,access:{has:e=>"selectFloor"in e,get:e=>e.selectFloor},metadata:t},null,i),l(this,null,A,{kind:"method",name:"updateVisibility",static:!1,private:!1,access:{has:e=>"updateVisibility"in e,get:e=>e.updateVisibility},metadata:t},null,i),l(this,null,E,{kind:"method",name:"showPathWay",static:!1,private:!1,access:{has:e=>"showPathWay"in e,get:e=>e.showPathWay},metadata:t},null,i),l(this,null,F,{kind:"method",name:"hidePathways",static:!1,private:!1,access:{has:e=>"hidePathways"in e,get:e=>e.hidePathways},metadata:t},null,i),l(null,null,y,{kind:"field",name:"layers",static:!1,private:!1,access:{has:e=>"layers"in e,get:e=>e.layers,set:(e,a)=>{e.layers=a}},metadata:t},p,v),l(null,null,b,{kind:"field",name:"defaultLayer",static:!1,private:!1,access:{has:e=>"defaultLayer"in e,get:e=>e.defaultLayer,set:(e,a)=>{e.defaultLayer=a}},metadata:t},_,w),l(null,null,c,{kind:"field",name:"mode",static:!1,private:!1,access:{has:e=>"mode"in e,get:e=>e.mode,set:(e,a)=>{e.mode=a}},metadata:t},n,u),l(null,null,L,{kind:"field",name:"layersLoaded",static:!1,private:!1,access:{has:e=>"layersLoaded"in e,get:e=>e.layersLoaded,set:(e,a)=>{e.layersLoaded=a}},metadata:t},x,S),t&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:t})}layers=(d(this,i),d(this,p,[]));defaultLayer=(d(this,v),d(this,_,void 0));mode=(d(this,w),d(this,n,void 0));layersLoaded=(d(this,u),d(this,x,!1));updateVisibilityTimeout=(d(this,S),0);selectFloorTimeout=0;get visible(){return this.layers.filter(t=>t.frozen||t.visible)}get loaded(){return this.layers.filter(t=>t.loaded)}get rectangle(){var t=this.visible.filter(e=>!e.frozen).map(e=>e.viewbox??e.rect);return this.mode!==LayersMode.Radio||!t.length?null:W.fromUnion(...t)||null}get viewboxRectangle(){var t=this.visible.filter(e=>!e.frozen&&e.viewbox).map(e=>e.viewbox);return t.length&&W.fromUnion(...t)||null}get pathwayLayers(){return this.layers.filter(t=>t.pathway)}get floors(){if(!U())return[];const t=new Set(this.layers.filter(a=>a&&!a.frozen&&!a.rootParent&&!a.pathway).concat(s.routeStore.layers.filter(a=>a&&a.mode!==LayerMode.AlwaysHidden&&a.mode!==LayerMode.AlwaysVisible))),e=Array.from(t).reverse();return e.map((a,r)=>{const o=s.routeStore.layers.length>0&&s.routeStore.layers.indexOf(a)===-1,f=s.toursStore.tourLayers.length>0&&s.toursStore.tourLayers.indexOf(a)===-1;return{layer:a,name:a.name,shortName:a.shortName,description:a.description,active:a.visible,disabled:!!(o||f),index:a.floorIndex??e.length-r-1}})}selectFloor(t){if(this.selectFloorTimeout)return;this.selectFloorTimeout=setTimeout(()=>this.selectFloorTimeout=0,500);const e=this.layers.find(r=>r.description===t.description);if(!e)return;if(this.mode===LayersMode.Radio){if(this.updateVisibility(e,!0),s.maplibreStore.showMaplibre)return;if(!!j().__fpSettings?.fpVer||X.includes(N.EXPO)){const o=e.viewbox??e.rect;s.uiState.moveToRect=o}else{const o=this.layers.indexOf(this.layers.filter(O=>!O.frozen&&O.visible)[0]),f=this.layers.indexOf(e);if(o===f)return;s.uiState.zoomBy=f<o?.95:1.05}}else this.updateVisibility(e,!e.visible);const a=s.toursStore.getTourLayerInfo(e.name)||s.toursStore.getTourLayerInfo(e.description);if(a){this.showPathWay(a.id);return}s.toursStore.stopTour()}updateVisibility(t,e){if(this.mode===LayersMode.Radio&&!e)return;const a=t instanceof C?t:this.findLayer(t);if(!a||a.visible===e){a&&s.routeStore.currentRouteLayer!==a&&(s.routeStore.currentRouteLayer=a);return}B(a,s.rendererService).then(()=>{this.mode===LayersMode.Radio&&this.layers.filter(r=>!r.pathway).forEach(r=>{r.name!==a.name&&!r.frozen&&r.visible&&(r.visible=!1,r.childLayers.forEach(o=>{o.visible=!1}))}),a&&(a.visible=e,a.childLayers.forEach(r=>{r.visible=e}),e&&(s.routeStore.currentRouteLayer=a),typeof s.fp.onFloorActivated=="function"&&(clearTimeout(this.updateVisibilityTimeout),this.updateVisibilityTimeout=setTimeout(()=>{const r=s.fp.getFloors();s.fp.onFloorActivated(r.find(o=>o.name===a.name))})))})}findLayer(t){if(t==null)return null;const e=this.layers.filter(r=>!r.rootParent);if(typeof t=="number"&&(a=e.filter(r=>!r.frozen)[t],a))return a;t=t.toString().toLowerCase();var a=e.find(r=>{const o=(r.name.match(/(-?[0-9]+)/)||"")[0];return t===r?.name.toLowerCase()||t===r?.description.toLowerCase()||t===r?.shortName.toLowerCase()||t===o});return!a&&!/\D/.test(t)&&(a=e.filter(r=>!r.frozen)[parseInt(t)]),a}getPathwayList(){return this.layers.filter(t=>t.pathway)}async showPathWay(t){try{const e=this.findLayer(t);if(!e)throw new Error(`There is no pathway with this name. ${t}`);await B(e,s.rendererService);const a=this.getPathwayList();D(()=>{a.forEach(r=>{const o=r.name===t;r.visible=o,r.childLayers.forEach(f=>{f.visible=o})})})}catch(e){console.error("showPathWay",e)}}hidePathways(){this.getPathwayList().forEach(e=>{e.visible=!1,e.childLayers.forEach(a=>{a.visible=!1})})}}})();export default q;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__esDecorate as i,__runInitializers as l}from"tslib";import{
|
|
1
|
+
import{__esDecorate as i,__runInitializers as l}from"tslib";import{action as d,computed as r,observable as o}from"mobx";import n from"../data";import{fpGeo as y}from"../data/fpGeo";const I=import.meta.env?.VITE_EXPOFP_DISABLE_3D_TOGGLE!=="false";function z(){return typeof window>"u"||window.navigator.onLine}let B=(()=>{let a=[],p,m=[],c=[],h,f=[],u=[],b,M=[],w=[],_,v,g,O,S,V,E,k;return class{static{const t=typeof Symbol=="function"&&Symbol.metadata?Object.create(null):void 0;p=[o],h=[o],b=[o],_=[d],v=[d],g=[d],O=[r({keepAlive:!0})],S=[r({keepAlive:!0})],V=[r({keepAlive:!0})],E=[r({keepAlive:!0})],k=[r({keepAlive:!0})],i(this,null,_,{kind:"method",name:"setOnline",static:!1,private:!1,access:{has:e=>"setOnline"in e,get:e=>e.setOnline},metadata:t},null,a),i(this,null,v,{kind:"method",name:"activateMaplibre",static:!1,private:!1,access:{has:e=>"activateMaplibre"in e,get:e=>e.activateMaplibre},metadata:t},null,a),i(this,null,g,{kind:"method",name:"deactivateMaplibre",static:!1,private:!1,access:{has:e=>"deactivateMaplibre"in e,get:e=>e.deactivateMaplibre},metadata:t},null,a),i(this,null,O,{kind:"getter",name:"hideModeSwitchButton",static:!1,private:!1,access:{has:e=>"hideModeSwitchButton"in e,get:e=>e.hideModeSwitchButton},metadata:t},null,a),i(this,null,S,{kind:"getter",name:"maplibreEnabled",static:!1,private:!1,access:{has:e=>"maplibreEnabled"in e,get:e=>e.maplibreEnabled},metadata:t},null,a),i(this,null,V,{kind:"getter",name:"useMaplibreMap",static:!1,private:!1,access:{has:e=>"useMaplibreMap"in e,get:e=>e.useMaplibreMap},metadata:t},null,a),i(this,null,E,{kind:"getter",name:"showMaplibre",static:!1,private:!1,access:{has:e=>"showMaplibre"in e,get:e=>e.showMaplibre},metadata:t},null,a),i(this,null,k,{kind:"getter",name:"isMap3d",static:!1,private:!1,access:{has:e=>"isMap3d"in e,get:e=>e.isMap3d},metadata:t},null,a),i(null,null,p,{kind:"field",name:"mapViewMode",static:!1,private:!1,access:{has:e=>"mapViewMode"in e,get:e=>e.mapViewMode,set:(e,s)=>{e.mapViewMode=s}},metadata:t},m,c),i(null,null,h,{kind:"field",name:"maplibreSelected",static:!1,private:!1,access:{has:e=>"maplibreSelected"in e,get:e=>e.maplibreSelected,set:(e,s)=>{e.maplibreSelected=s}},metadata:t},f,u),i(null,null,b,{kind:"field",name:"isOnline",static:!1,private:!1,access:{has:e=>"isOnline"in e,get:e=>e.isOnline,set:(e,s)=>{e.isOnline=s}},metadata:t},M,w),t&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:t})}rootStore=l(this,a);mapViewMode=l(this,m,"floorplan");maplibreSelected=(l(this,c),l(this,f,!1));isOnline=(l(this,u),l(this,M,z()));handleOnline=(l(this,w),()=>this.setOnline(!0));handleOffline=()=>this.setOnline(!1);constructor(t){this.rootStore=t,this.mapViewMode=this.getInitialViewMode(),this.maplibreSelected=this.mapViewMode!=="floorplan",typeof window<"u"&&(window.addEventListener("online",this.handleOnline),window.addEventListener("offline",this.handleOffline))}dispose(){typeof window>"u"||(window.removeEventListener("online",this.handleOnline),window.removeEventListener("offline",this.handleOffline))}setOnline(t){this.isOnline=t}activateMaplibre(){this.maplibreEnabled&&(this.mapViewMode=n.allow3dView&&this.mapViewMode!=="map3d"?"map3d":"map2d",this.maplibreSelected=!0)}deactivateMaplibre(){this.mapViewMode="floorplan",this.maplibreSelected=!1}get hideModeSwitchButton(){return!this.maplibreEnabled||!n.allow3dView||I||n.hideModeSwitchButton}get maplibreEnabled(){const t=this.rootStore.fp?.maplibre??window.__efpMaplibre,e=!!t?.offline&&(!!t.style||!!t.styleUrl);return this.useMaplibreMap&&!!y?.properties?.config&&!this.rootStore.uiState.kiosk&&(this.isOnline||e)}get useMaplibreMap(){return!!n.enableExperimentalMaplibre}get showMaplibre(){return this.maplibreEnabled&&(this.mapViewMode==="map2d"||this.mapViewMode==="map3d")}get isMap3d(){return this.maplibreEnabled&&this.mapViewMode==="map3d"}getInitialViewMode(){return this.maplibreEnabled?n.allow3dView&&!n.hide3dMapDefault?"map3d":"map2d":"floorplan"}}})();export default B;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__esDecorate as s,__runInitializers as u}from"tslib";import{action as c,computed as l,observable as d}from"mobx";import{LANGUAGE_TYPE as ce,MOBILE_BREAKPOINT as he}from"../constants";import S from"../data";import{goBack as g}from"../services/routing";import le from"../tools/settings";import{t as n}from"../utils/i18n";import{sanitizeSearch as ne}from"../utils/sanitizeText";import{Route as f}from"./RouteStore";class i{static closeDetails(r){return r.details?(r.details=null,!0):!1}static closeMultiPointTour(r){return r.rootStore.fp.hidePathways(),!0}static clearSearchAndFocus(r){return r.searchText?(r.setSearchText(""),r.setFocused(!0),!0):!1}static returnToSearch(r,h=!1){r.list={type:"search",text:"",focused:h}}static returnToSessions(r,h=!1){r.list={type:"sessions",text:"",focused:h}}static returnToTours(r,h=!1){r.list={type:"tours",text:"",focused:h}}static openMenu(r){r.menu=!0}static closeMenu(r){r.menu=!1}static clearListScroll(r,h){r.clearListScroll(h)}static resetActiveListIndex(r){r.activeListIndex=-1}}let ue=(()=>{let a=[],r,h=[],x=[],m,_=[],B=[],k,y=[],b=[],v,F=[],T=[],M,I,C,A,w,z,L,O,E,P,W,D,U,R,j,G,K,N,X,Y,H,V,$,q,J,Q,Z,ee,te,se,ae,ie,re,oe;return class{static{const t=typeof Symbol=="function"&&Symbol.metadata?Object.create(null):void 0;r=[d],m=[d],k=[d],v=[d],M=[l],I=[l],C=[l],A=[l],w=[l],z=[l],L=[l],O=[l],E=[l],P=[l],W=[l],D=[l],U=[l],R=[l],j=[c],G=[c],K=[c],N=[c],X=[c],Y=[c],H=[c],V=[c],$=[c],q=[c],J=[c],Q=[c],Z=[c],ee=[c],te=[l],se=[c],ae=[l],ie=[l],re=[l],oe=[l],s(this,null,M,{kind:"getter",name:"searchBoxConfig",static:!1,private:!1,access:{has:e=>"searchBoxConfig"in e,get:e=>e.searchBoxConfig},metadata:t},null,a),s(this,null,I,{kind:"getter",name:"searchBoxMode",static:!1,private:!1,access:{has:e=>"searchBoxMode"in e,get:e=>e.searchBoxMode},metadata:t},null,a),s(this,null,C,{kind:"getter",name:"searchBoxTitle",static:!1,private:!1,access:{has:e=>"searchBoxTitle"in e,get:e=>e.searchBoxTitle},metadata:t},null,a),s(this,null,A,{kind:"getter",name:"searchBoxSubtitle",static:!1,private:!1,access:{has:e=>"searchBoxSubtitle"in e,get:e=>e.searchBoxSubtitle},metadata:t},null,a),s(this,null,w,{kind:"getter",name:"searchBoxBadge",static:!1,private:!1,access:{has:e=>"searchBoxBadge"in e,get:e=>e.searchBoxBadge},metadata:t},null,a),s(this,null,z,{kind:"getter",name:"searchBoxIcon",static:!1,private:!1,access:{has:e=>"searchBoxIcon"in e,get:e=>e.searchBoxIcon},metadata:t},null,a),s(this,null,L,{kind:"getter",name:"searchBoxActions",static:!1,private:!1,access:{has:e=>"searchBoxActions"in e,get:e=>e.searchBoxActions},metadata:t},null,a),s(this,null,O,{kind:"getter",name:"shouldShowSearchInput",static:!1,private:!1,access:{has:e=>"shouldShowSearchInput"in e,get:e=>e.shouldShowSearchInput},metadata:t},null,a),s(this,null,E,{kind:"getter",name:"shouldShowCloseButton",static:!1,private:!1,access:{has:e=>"shouldShowCloseButton"in e,get:e=>e.shouldShowCloseButton},metadata:t},null,a),s(this,null,P,{kind:"getter",name:"closeButtonAction",static:!1,private:!1,access:{has:e=>"closeButtonAction"in e,get:e=>e.closeButtonAction},metadata:t},null,a),s(this,null,W,{kind:"getter",name:"shouldShowShadow",static:!1,private:!1,access:{has:e=>"shouldShowShadow"in e,get:e=>e.shouldShowShadow},metadata:t},null,a),s(this,null,D,{kind:"getter",name:"placeholder",static:!1,private:!1,access:{has:e=>"placeholder"in e,get:e=>e.placeholder},metadata:t},null,a),s(this,null,U,{kind:"getter",name:"searchBoxClass",static:!1,private:!1,access:{has:e=>"searchBoxClass"in e,get:e=>e.searchBoxClass},metadata:t},null,a),s(this,null,R,{kind:"getter",name:"ariaLabel",static:!1,private:!1,access:{has:e=>"ariaLabel"in e,get:e=>e.ariaLabel},metadata:t},null,a),s(this,null,j,{kind:"method",name:"selectSearch",static:!1,private:!1,access:{has:e=>"selectSearch"in e,get:e=>e.selectSearch},metadata:t},null,a),s(this,null,G,{kind:"method",name:"selectSearchAndFocus",static:!1,private:!1,access:{has:e=>"selectSearchAndFocus"in e,get:e=>e.selectSearchAndFocus},metadata:t},null,a),s(this,null,K,{kind:"method",name:"setSearchText",static:!1,private:!1,access:{has:e=>"setSearchText"in e,get:e=>e.setSearchText},metadata:t},null,a),s(this,null,N,{kind:"method",name:"setFocused",static:!1,private:!1,access:{has:e=>"setFocused"in e,get:e=>e.setFocused},metadata:t},null,a),s(this,null,X,{kind:"method",name:"handleBackAction",static:!1,private:!1,access:{has:e=>"handleBackAction"in e,get:e=>e.handleBackAction},metadata:t},null,a),s(this,null,Y,{kind:"method",name:"closeSearch",static:!1,private:!1,access:{has:e=>"closeSearch"in e,get:e=>e.closeSearch},metadata:t},null,a),s(this,null,H,{kind:"method",name:"clearActiveFilters",static:!1,private:!1,access:{has:e=>"clearActiveFilters"in e,get:e=>e.clearActiveFilters},metadata:t},null,a),s(this,null,V,{kind:"method",name:"resetSearchButtonState",static:!1,private:!1,access:{has:e=>"resetSearchButtonState"in e,get:e=>e.resetSearchButtonState},metadata:t},null,a),s(this,null,$,{kind:"method",name:"handleSearchAction",static:!1,private:!1,access:{has:e=>"handleSearchAction"in e,get:e=>e.handleSearchAction},metadata:t},null,a),s(this,null,q,{kind:"method",name:"openOverlayWithoutInputFocus",static:!1,private:!1,access:{has:e=>"openOverlayWithoutInputFocus"in e,get:e=>e.openOverlayWithoutInputFocus},metadata:t},null,a),s(this,null,J,{kind:"method",name:"closeSessions",static:!1,private:!1,access:{has:e=>"closeSessions"in e,get:e=>e.closeSessions},metadata:t},null,a),s(this,null,Q,{kind:"method",name:"closeExhibitors",static:!1,private:!1,access:{has:e=>"closeExhibitors"in e,get:e=>e.closeExhibitors},metadata:t},null,a),s(this,null,Z,{kind:"method",name:"resetSearchBox",static:!1,private:!1,access:{has:e=>"resetSearchBox"in e,get:e=>e.resetSearchBox},metadata:t},null,a),s(this,null,ee,{kind:"method",name:"syncWithUIState",static:!1,private:!1,access:{has:e=>"syncWithUIState"in e,get:e=>e.syncWithUIState},metadata:t},null,a),s(this,null,te,{kind:"getter",name:"actionButtonIcon",static:!1,private:!1,access:{has:e=>"actionButtonIcon"in e,get:e=>e.actionButtonIcon},metadata:t},null,a),s(this,null,se,{kind:"method",name:"clearAndSelectSearch",static:!1,private:!1,access:{has:e=>"clearAndSelectSearch"in e,get:e=>e.clearAndSelectSearch},metadata:t},null,a),s(this,null,ae,{kind:"getter",name:"backMode",static:!1,private:!1,access:{has:e=>"backMode"in e,get:e=>e.backMode},metadata:t},null,a),s(this,null,ie,{kind:"getter",name:"isMobileDetailsMode",static:!1,private:!1,access:{has:e=>"isMobileDetailsMode"in e,get:e=>e.isMobileDetailsMode},metadata:t},null,a),s(this,null,re,{kind:"getter",name:"shouldShowTitle",static:!1,private:!1,access:{has:e=>"shouldShowTitle"in e,get:e=>e.shouldShowTitle},metadata:t},null,a),s(this,null,oe,{kind:"getter",name:"searchState",static:!1,private:!1,access:{has:e=>"searchState"in e,get:e=>e.searchState},metadata:t},null,a),s(null,null,r,{kind:"field",name:"searchText",static:!1,private:!1,access:{has:e=>"searchText"in e,get:e=>e.searchText,set:(e,o)=>{e.searchText=o}},metadata:t},h,x),s(null,null,m,{kind:"field",name:"isFocused",static:!1,private:!1,access:{has:e=>"isFocused"in e,get:e=>e.isFocused,set:(e,o)=>{e.isFocused=o}},metadata:t},_,B),s(null,null,k,{kind:"field",name:"isClearMode",static:!1,private:!1,access:{has:e=>"isClearMode"in e,get:e=>e.isClearMode,set:(e,o)=>{e.isClearMode=o}},metadata:t},y,b),s(null,null,v,{kind:"field",name:"skipInputFocus",static:!1,private:!1,access:{has:e=>"skipInputFocus"in e,get:e=>e.skipInputFocus,set:(e,o)=>{e.skipInputFocus=o}},metadata:t},F,T),t&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:t})}rootStore=u(this,a);searchText=u(this,h,"");isFocused=(u(this,x),u(this,_,!1));isClearMode=(u(this,B),u(this,y,!1));skipInputFocus=(u(this,b),u(this,F,!1));constructor(t){u(this,T),this.rootStore=t}get uiState(){return this.rootStore.uiState}get searchBoxConfig(){return this.uiState.searchBoxConfig}get searchBoxMode(){return this.searchBoxConfig.mode}get searchBoxTitle(){return this.searchBoxConfig.title}get searchBoxSubtitle(){return this.searchBoxConfig.subtitle}get searchBoxBadge(){return this.searchBoxConfig.badge}get searchBoxIcon(){return this.searchBoxConfig.icon}get searchBoxActions(){return this.uiState.searchBoxActions}get shouldShowSearchInput(){return this.searchBoxMode==="search"}get shouldShowCloseButton(){const{menu:t,details:e,list:o}=this.uiState,p=S.isRebooking&&o.type==="exhibitors";return!this.shouldShowSearchInput||o.type==="sessions"||o.type==="tours"||o.type==="speakers"||o.type==="exhibitors"&&!p?!0:t||e!==null||!!this.searchText||this.isClearMode||this.isFocused}get closeButtonAction(){return!this.shouldShowSearchInput||this.searchBoxMode==="details"||this.uiState.list.type==="sessions"||this.uiState.list.type==="speakers"||this.uiState.list.type==="exhibitors"&&!S.isRebooking?"close":this.searchText?"clear":"close"}get shouldShowShadow(){const{menu:t,details:e,list:o}=this.uiState,p=o.type==="search"&&!!o.text;return!(this.rootStore.fp.alwaysShowSidebar||t||e!==null||o.type!=="search"||p||this.isFocused||this.uiState.heatmap)}get placeholder(){const{list:t,heatmapYah:e}=this.uiState;return t.type==="sessions"?n("Search sessions"):t.type==="tours"?n("Search Guided Tours"):t.type==="exhibitors"?n("Search exhibitors"):t.type==="speakers"?n("Search speakers"):le.EXPO.startsWith("lenzerheidemotorclassics")?"SUCHE":le.EXPO.startsWith("jetlag")?"Search location or artist":e?n("Find values greater than"):this.uiState.hasAppliedFilters?n("Search"):S.searchText||n("Search")}get searchBoxClass(){return{"is-details":this.searchBoxMode==="details"&&!(this.uiState.details instanceof f),"is-interface":this.searchBoxMode==="interface","has-shadow":this.shouldShowShadow,"has-subtitle":!!this.searchBoxConfig.subtitle,"has-badge":!!this.searchBoxConfig.badge,"has-icon":!!this.searchBoxConfig.icon,"is-overlay-full":this.uiState.isOverlayOpen&&this.uiState.overlaySize==="full","is-featured-exhibitor":this.uiState.isFeaturedExhibitorActive,"is-route":this.uiState.details instanceof f,"is-guided-tours":this.uiState.isGuidedToursActive,"is-overlay-scrolled":this.uiState.isOverlayScrolled,"overlay-pulse":this.uiState.kiosk&&this.uiState.inIdle&&!this.uiState.setKioskModeEnabled}}get ariaLabel(){return!this.shouldShowSearchInput||this.searchBoxMode==="details"?n("Close"):this.searchText?n("Clear search"):n("Close")}selectSearch(t){window.__resett&&window.__resett(),this.uiState.details=null;const e=ne(t||"",Object.keys(this.uiState.mapSettings).map(o=>`${o}=`));this.setSearchText(e),this.uiState.activeListIndex=-1}selectSearchAndFocus(t){this.selectSearch(t),this.setFocused(!0)}setSearchText(t){this.searchText=t,this.uiState.hasAppliedFilters?this.rootStore.moveToList():this.uiState.centerMap=!0,this.uiState.activeListIndex=t?0:-1,this.uiState.list.type!=="sessions"&&this.uiState.list.type!=="tours"&&this.uiState.list.type!=="speakers"&&this.uiState.list.type!=="exhibitors"?this.uiState.list={type:"search",text:t,focused:this.isFocused}:this.uiState.list.type==="exhibitors"&&(this.uiState.list={type:"exhibitors",text:t,focused:this.isFocused}),this.uiState.searchClearMode=this.isClearMode}setFocused(t){this.isFocused=t,this.isClearMode=!1,this.skipInputFocus=!1,this.uiState.searchFocused=t,this.uiState.searchClearMode=!1,this.uiState.desiredOverlaySize="full"}handleBackAction(){const{uiState:t}=this,{list:e}=t;if(t.desiredOverlaySize="full",this.backMode==="menu"){this.resetSearchButtonState(),i.openMenu(t);return}if(e.type==="route-planner"){this.rootStore.routePlannerStore.close(),this.rootStore.selectBookmarks(),g();return}if(e.type==="multi-point-tour"&&!t.details){i.returnToTours(t,!1),this.rootStore.fp.hidePathways();return}if(t.details){t.details=null,g();return}if(t.menu){e.type==="sessions"?t.list={type:"sessions",text:"",focused:!0}:e.type==="exhibitors"?t.list={type:"exhibitors",text:"",focused:!0}:t.list={type:"search",text:"",focused:!0},this.setFocused(!0),this.isClearMode=!0,i.closeMenu(t);return}if(e.type==="tours"&&t.details instanceof f){t.details=null;return}if(e.type==="sessions"||e.type==="tours"||e.type==="exhibitors"){if(i.closeDetails(t))return;this.clearActiveFilters(),i.returnToSearch(t,!1),this.selectSearchAndFocus();return}switch(e.type){case"filter":t.details=null;return;case"multi-point-tour":this.rootStore.fp.hidePathways(),i.closeDetails(t)?i.returnToTours(t,!1):g();return;case"category":this.rootStore.selectCategory(e.category);return;case"speakers":if(i.closeDetails(t))return;i.returnToSessions(t,!1);return;case"bookmarks":case"visited":if(i.closeDetails(t))return;this.selectSearchAndFocus();return;case ce:i.returnToSearch(t,!1),i.openMenu(t);return}i.closeDetails(t)||i.clearSearchAndFocus(this)||i.openMenu(t)}closeSearch(){const{uiState:t}=this,{list:e}=t;if(e.type==="route-planner"){this.rootStore.routePlannerStore.close(),i.returnToSearch(t,!1),this.resetSearchBox();return}if(i.closeDetails(t),i.clearListScroll(t,e.type),i.closeMultiPointTour(t),e.type==="bookmarks"){i.returnToSearch(t,!1),this.resetSearchBox();return}if(t.selectedCategory){i.returnToSearch(t,!1),this.resetSearchBox();return}if(e.type==="sessions"){this.closeSessions();return}if(e.type==="exhibitors"){if(S.isRebooking){this.searchBoxMode==="search"&&this.searchText?(this.setSearchText(""),this.isClearMode=!0,this.clearActiveFilters()):this.resetSearchBox();return}this.closeExhibitors();return}if(t.menu){i.closeMenu(t),this.resetSearchBox();return}if(this.searchBoxMode==="search"&&!t.details&&this.searchText){this.setSearchText(""),this.isClearMode=!0,this.clearActiveFilters();return}i.returnToSearch(t,!1),this.searchText="",this.resetSearchBox(),t.details=null,this.clearActiveFilters()}clearActiveFilters(){this.rootStore.searchButtonsStore.setPoiFilterId(null),this.rootStore.uiState.selectedPoiTypeFilters=[],this.rootStore.uiState.selectedCategoryFilters=[],this.rootStore.categoryFilterStore.state.selectedItems=[],this.rootStore.categoryFilterStore.state.pendingItems=[],this.rootStore.searchButtonsStore.searchShortcutState.activeParentId=null,this.rootStore.searchButtonsStore.searchShortcutState.activeChildren.clear(),this.rootStore.searchButtonsStore.searchShortcutState.isShortcutsVisible=!1,this.rootStore.urlFilterManager&&this.rootStore.urlFilterManager.isInitialized&&this.rootStore.urlFilterManager.clearAllFilters()}resetSearchButtonState(){const{uiState:t}=this;this.rootStore.searchButtonsStore.clearAllFilters(),this.rootStore.searchButtonsStore.setSubButtonId(null),this.rootStore.searchButtonsStore.hideSubButtons(),t.selectedTrack=null,this.searchText="",this.isClearMode=!1}handleSearchAction(){this.isFocused||this.setFocused(!0)}openOverlayWithoutInputFocus(){this.skipInputFocus=!0,this.isFocused=!0,this.isClearMode=!1,this.uiState.searchFocused=!0,this.uiState.searchClearMode=!1,this.uiState.desiredOverlaySize="full"}closeSessions(){this.searchText="",i.returnToSearch(this.uiState,!1),this.uiState.details=null,i.resetActiveListIndex(this.uiState),this.uiState.selectedTrack=null,this.rootStore.searchButtonsStore.setSubButtonId(null),this.rootStore.searchButtonsStore.hideSubButtons()}closeExhibitors(){this.searchText="",i.returnToSearch(this.uiState,!1),this.uiState.details=null,i.resetActiveListIndex(this.uiState)}resetSearchBox(){this.setFocused(!1),this.isClearMode=!1,this.syncWithUIState()}syncWithUIState(){this.searchText=(this.uiState.list.type==="search"||this.uiState.list.type==="exhibitors")&&this.uiState.list.text||"",this.isFocused=this.uiState.searchFocused,this.isClearMode=this.uiState.searchClearMode}get actionButtonIcon(){return this.shouldShowSearchInput?this.shouldShowCloseButton?"icon-close":"icon-search":"icon-close"}clearAndSelectSearch(){this.selectSearch(""),this.setFocused(!1)}get backMode(){const t=this.uiState.list.type;return(t==="bookmarks"||t==="visited")&&!this.uiState.details&&!this.uiState.menu||this.shouldShowSearchInput&&!this.searchText?"menu":"back"}get isMobileDetailsMode(){return window.innerWidth<he&&this.uiState.details!==null&&this.uiState.overlaySize==="full"&&!(this.uiState.details instanceof f)}get shouldShowTitle(){return!this.shouldShowSearchInput}get searchState(){return{text:this.searchText,isFocused:this.isFocused,isClearMode:this.isClearMode,mode:this.searchBoxMode,title:this.searchBoxConfig.title,subtitle:this.searchBoxConfig.subtitle,badge:this.searchBoxConfig.badge,icon:this.searchBoxConfig.icon}}}})();export default ue;
|
|
1
|
+
import{__esDecorate as s,__runInitializers as u}from"tslib";import{action as c,computed as l,observable as d}from"mobx";import{LANGUAGE_TYPE as ce,MOBILE_BREAKPOINT as he}from"../constants";import S from"../data";import{goBack as g}from"../services/url-sync";import le from"../tools/settings";import{t as n}from"../utils/i18n";import{sanitizeSearch as ne}from"../utils/sanitizeText";import{Route as f}from"./RouteStore";class i{static closeDetails(r){return r.details?(r.details=null,!0):!1}static closeMultiPointTour(r){return r.rootStore.fp.hidePathways(),!0}static clearSearchAndFocus(r){return r.searchText?(r.setSearchText(""),r.setFocused(!0),!0):!1}static returnToSearch(r,h=!1){r.list={type:"search",text:"",focused:h}}static returnToSessions(r,h=!1){r.list={type:"sessions",text:"",focused:h}}static returnToTours(r,h=!1){r.list={type:"tours",text:"",focused:h}}static openMenu(r){r.menu=!0}static closeMenu(r){r.menu=!1}static clearListScroll(r,h){r.clearListScroll(h)}static resetActiveListIndex(r){r.activeListIndex=-1}}let ue=(()=>{let a=[],r,h=[],x=[],m,_=[],B=[],k,y=[],b=[],v,F=[],T=[],M,I,C,A,w,z,L,O,E,P,W,D,U,R,j,G,K,N,X,Y,H,V,$,q,J,Q,Z,ee,te,se,ae,ie,re,oe;return class{static{const t=typeof Symbol=="function"&&Symbol.metadata?Object.create(null):void 0;r=[d],m=[d],k=[d],v=[d],M=[l],I=[l],C=[l],A=[l],w=[l],z=[l],L=[l],O=[l],E=[l],P=[l],W=[l],D=[l],U=[l],R=[l],j=[c],G=[c],K=[c],N=[c],X=[c],Y=[c],H=[c],V=[c],$=[c],q=[c],J=[c],Q=[c],Z=[c],ee=[c],te=[l],se=[c],ae=[l],ie=[l],re=[l],oe=[l],s(this,null,M,{kind:"getter",name:"searchBoxConfig",static:!1,private:!1,access:{has:e=>"searchBoxConfig"in e,get:e=>e.searchBoxConfig},metadata:t},null,a),s(this,null,I,{kind:"getter",name:"searchBoxMode",static:!1,private:!1,access:{has:e=>"searchBoxMode"in e,get:e=>e.searchBoxMode},metadata:t},null,a),s(this,null,C,{kind:"getter",name:"searchBoxTitle",static:!1,private:!1,access:{has:e=>"searchBoxTitle"in e,get:e=>e.searchBoxTitle},metadata:t},null,a),s(this,null,A,{kind:"getter",name:"searchBoxSubtitle",static:!1,private:!1,access:{has:e=>"searchBoxSubtitle"in e,get:e=>e.searchBoxSubtitle},metadata:t},null,a),s(this,null,w,{kind:"getter",name:"searchBoxBadge",static:!1,private:!1,access:{has:e=>"searchBoxBadge"in e,get:e=>e.searchBoxBadge},metadata:t},null,a),s(this,null,z,{kind:"getter",name:"searchBoxIcon",static:!1,private:!1,access:{has:e=>"searchBoxIcon"in e,get:e=>e.searchBoxIcon},metadata:t},null,a),s(this,null,L,{kind:"getter",name:"searchBoxActions",static:!1,private:!1,access:{has:e=>"searchBoxActions"in e,get:e=>e.searchBoxActions},metadata:t},null,a),s(this,null,O,{kind:"getter",name:"shouldShowSearchInput",static:!1,private:!1,access:{has:e=>"shouldShowSearchInput"in e,get:e=>e.shouldShowSearchInput},metadata:t},null,a),s(this,null,E,{kind:"getter",name:"shouldShowCloseButton",static:!1,private:!1,access:{has:e=>"shouldShowCloseButton"in e,get:e=>e.shouldShowCloseButton},metadata:t},null,a),s(this,null,P,{kind:"getter",name:"closeButtonAction",static:!1,private:!1,access:{has:e=>"closeButtonAction"in e,get:e=>e.closeButtonAction},metadata:t},null,a),s(this,null,W,{kind:"getter",name:"shouldShowShadow",static:!1,private:!1,access:{has:e=>"shouldShowShadow"in e,get:e=>e.shouldShowShadow},metadata:t},null,a),s(this,null,D,{kind:"getter",name:"placeholder",static:!1,private:!1,access:{has:e=>"placeholder"in e,get:e=>e.placeholder},metadata:t},null,a),s(this,null,U,{kind:"getter",name:"searchBoxClass",static:!1,private:!1,access:{has:e=>"searchBoxClass"in e,get:e=>e.searchBoxClass},metadata:t},null,a),s(this,null,R,{kind:"getter",name:"ariaLabel",static:!1,private:!1,access:{has:e=>"ariaLabel"in e,get:e=>e.ariaLabel},metadata:t},null,a),s(this,null,j,{kind:"method",name:"selectSearch",static:!1,private:!1,access:{has:e=>"selectSearch"in e,get:e=>e.selectSearch},metadata:t},null,a),s(this,null,G,{kind:"method",name:"selectSearchAndFocus",static:!1,private:!1,access:{has:e=>"selectSearchAndFocus"in e,get:e=>e.selectSearchAndFocus},metadata:t},null,a),s(this,null,K,{kind:"method",name:"setSearchText",static:!1,private:!1,access:{has:e=>"setSearchText"in e,get:e=>e.setSearchText},metadata:t},null,a),s(this,null,N,{kind:"method",name:"setFocused",static:!1,private:!1,access:{has:e=>"setFocused"in e,get:e=>e.setFocused},metadata:t},null,a),s(this,null,X,{kind:"method",name:"handleBackAction",static:!1,private:!1,access:{has:e=>"handleBackAction"in e,get:e=>e.handleBackAction},metadata:t},null,a),s(this,null,Y,{kind:"method",name:"closeSearch",static:!1,private:!1,access:{has:e=>"closeSearch"in e,get:e=>e.closeSearch},metadata:t},null,a),s(this,null,H,{kind:"method",name:"clearActiveFilters",static:!1,private:!1,access:{has:e=>"clearActiveFilters"in e,get:e=>e.clearActiveFilters},metadata:t},null,a),s(this,null,V,{kind:"method",name:"resetSearchButtonState",static:!1,private:!1,access:{has:e=>"resetSearchButtonState"in e,get:e=>e.resetSearchButtonState},metadata:t},null,a),s(this,null,$,{kind:"method",name:"handleSearchAction",static:!1,private:!1,access:{has:e=>"handleSearchAction"in e,get:e=>e.handleSearchAction},metadata:t},null,a),s(this,null,q,{kind:"method",name:"openOverlayWithoutInputFocus",static:!1,private:!1,access:{has:e=>"openOverlayWithoutInputFocus"in e,get:e=>e.openOverlayWithoutInputFocus},metadata:t},null,a),s(this,null,J,{kind:"method",name:"closeSessions",static:!1,private:!1,access:{has:e=>"closeSessions"in e,get:e=>e.closeSessions},metadata:t},null,a),s(this,null,Q,{kind:"method",name:"closeExhibitors",static:!1,private:!1,access:{has:e=>"closeExhibitors"in e,get:e=>e.closeExhibitors},metadata:t},null,a),s(this,null,Z,{kind:"method",name:"resetSearchBox",static:!1,private:!1,access:{has:e=>"resetSearchBox"in e,get:e=>e.resetSearchBox},metadata:t},null,a),s(this,null,ee,{kind:"method",name:"syncWithUIState",static:!1,private:!1,access:{has:e=>"syncWithUIState"in e,get:e=>e.syncWithUIState},metadata:t},null,a),s(this,null,te,{kind:"getter",name:"actionButtonIcon",static:!1,private:!1,access:{has:e=>"actionButtonIcon"in e,get:e=>e.actionButtonIcon},metadata:t},null,a),s(this,null,se,{kind:"method",name:"clearAndSelectSearch",static:!1,private:!1,access:{has:e=>"clearAndSelectSearch"in e,get:e=>e.clearAndSelectSearch},metadata:t},null,a),s(this,null,ae,{kind:"getter",name:"backMode",static:!1,private:!1,access:{has:e=>"backMode"in e,get:e=>e.backMode},metadata:t},null,a),s(this,null,ie,{kind:"getter",name:"isMobileDetailsMode",static:!1,private:!1,access:{has:e=>"isMobileDetailsMode"in e,get:e=>e.isMobileDetailsMode},metadata:t},null,a),s(this,null,re,{kind:"getter",name:"shouldShowTitle",static:!1,private:!1,access:{has:e=>"shouldShowTitle"in e,get:e=>e.shouldShowTitle},metadata:t},null,a),s(this,null,oe,{kind:"getter",name:"searchState",static:!1,private:!1,access:{has:e=>"searchState"in e,get:e=>e.searchState},metadata:t},null,a),s(null,null,r,{kind:"field",name:"searchText",static:!1,private:!1,access:{has:e=>"searchText"in e,get:e=>e.searchText,set:(e,o)=>{e.searchText=o}},metadata:t},h,x),s(null,null,m,{kind:"field",name:"isFocused",static:!1,private:!1,access:{has:e=>"isFocused"in e,get:e=>e.isFocused,set:(e,o)=>{e.isFocused=o}},metadata:t},_,B),s(null,null,k,{kind:"field",name:"isClearMode",static:!1,private:!1,access:{has:e=>"isClearMode"in e,get:e=>e.isClearMode,set:(e,o)=>{e.isClearMode=o}},metadata:t},y,b),s(null,null,v,{kind:"field",name:"skipInputFocus",static:!1,private:!1,access:{has:e=>"skipInputFocus"in e,get:e=>e.skipInputFocus,set:(e,o)=>{e.skipInputFocus=o}},metadata:t},F,T),t&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:t})}rootStore=u(this,a);searchText=u(this,h,"");isFocused=(u(this,x),u(this,_,!1));isClearMode=(u(this,B),u(this,y,!1));skipInputFocus=(u(this,b),u(this,F,!1));constructor(t){u(this,T),this.rootStore=t}get uiState(){return this.rootStore.uiState}get searchBoxConfig(){return this.uiState.searchBoxConfig}get searchBoxMode(){return this.searchBoxConfig.mode}get searchBoxTitle(){return this.searchBoxConfig.title}get searchBoxSubtitle(){return this.searchBoxConfig.subtitle}get searchBoxBadge(){return this.searchBoxConfig.badge}get searchBoxIcon(){return this.searchBoxConfig.icon}get searchBoxActions(){return this.uiState.searchBoxActions}get shouldShowSearchInput(){return this.searchBoxMode==="search"}get shouldShowCloseButton(){const{menu:t,details:e,list:o}=this.uiState,p=S.isRebooking&&o.type==="exhibitors";return!this.shouldShowSearchInput||o.type==="sessions"||o.type==="tours"||o.type==="speakers"||o.type==="exhibitors"&&!p?!0:t||e!==null||!!this.searchText||this.isClearMode||this.isFocused}get closeButtonAction(){return!this.shouldShowSearchInput||this.searchBoxMode==="details"||this.uiState.list.type==="sessions"||this.uiState.list.type==="speakers"||this.uiState.list.type==="exhibitors"&&!S.isRebooking?"close":this.searchText?"clear":"close"}get shouldShowShadow(){const{menu:t,details:e,list:o}=this.uiState,p=o.type==="search"&&!!o.text;return!(this.rootStore.fp.alwaysShowSidebar||t||e!==null||o.type!=="search"||p||this.isFocused||this.uiState.heatmap)}get placeholder(){const{list:t,heatmapYah:e}=this.uiState;return t.type==="sessions"?n("Search sessions"):t.type==="tours"?n("Search Guided Tours"):t.type==="exhibitors"?n("Search exhibitors"):t.type==="speakers"?n("Search speakers"):le.EXPO.startsWith("lenzerheidemotorclassics")?"SUCHE":le.EXPO.startsWith("jetlag")?"Search location or artist":e?n("Find values greater than"):this.uiState.hasAppliedFilters?n("Search"):S.searchText||n("Search")}get searchBoxClass(){return{"is-details":this.searchBoxMode==="details"&&!(this.uiState.details instanceof f),"is-interface":this.searchBoxMode==="interface","has-shadow":this.shouldShowShadow,"has-subtitle":!!this.searchBoxConfig.subtitle,"has-badge":!!this.searchBoxConfig.badge,"has-icon":!!this.searchBoxConfig.icon,"is-overlay-full":this.uiState.isOverlayOpen&&this.uiState.overlaySize==="full","is-featured-exhibitor":this.uiState.isFeaturedExhibitorActive,"is-route":this.uiState.details instanceof f,"is-guided-tours":this.uiState.isGuidedToursActive,"is-overlay-scrolled":this.uiState.isOverlayScrolled,"overlay-pulse":this.uiState.kiosk&&this.uiState.inIdle&&!this.uiState.setKioskModeEnabled}}get ariaLabel(){return!this.shouldShowSearchInput||this.searchBoxMode==="details"?n("Close"):this.searchText?n("Clear search"):n("Close")}selectSearch(t){window.__resett&&window.__resett(),this.uiState.details=null;const e=ne(t||"",Object.keys(this.uiState.mapSettings).map(o=>`${o}=`));this.setSearchText(e),this.uiState.activeListIndex=-1}selectSearchAndFocus(t){this.selectSearch(t),this.setFocused(!0)}setSearchText(t){this.searchText=t,this.uiState.hasAppliedFilters?this.rootStore.moveToList():this.uiState.centerMap=!0,this.uiState.activeListIndex=t?0:-1,this.uiState.list.type!=="sessions"&&this.uiState.list.type!=="tours"&&this.uiState.list.type!=="speakers"&&this.uiState.list.type!=="exhibitors"?this.uiState.list={type:"search",text:t,focused:this.isFocused}:this.uiState.list.type==="exhibitors"&&(this.uiState.list={type:"exhibitors",text:t,focused:this.isFocused}),this.uiState.searchClearMode=this.isClearMode}setFocused(t){this.isFocused=t,this.isClearMode=!1,this.skipInputFocus=!1,this.uiState.searchFocused=t,this.uiState.searchClearMode=!1,this.uiState.desiredOverlaySize="full"}handleBackAction(){const{uiState:t}=this,{list:e}=t;if(t.desiredOverlaySize="full",this.backMode==="menu"){this.resetSearchButtonState(),i.openMenu(t);return}if(e.type==="route-planner"){this.rootStore.routePlannerStore.close(),this.rootStore.selectBookmarks(),g();return}if(e.type==="multi-point-tour"&&!t.details){i.returnToTours(t,!1),this.rootStore.fp.hidePathways();return}if(t.details){t.details=null,g();return}if(t.menu){e.type==="sessions"?t.list={type:"sessions",text:"",focused:!0}:e.type==="exhibitors"?t.list={type:"exhibitors",text:"",focused:!0}:t.list={type:"search",text:"",focused:!0},this.setFocused(!0),this.isClearMode=!0,i.closeMenu(t);return}if(e.type==="tours"&&t.details instanceof f){t.details=null;return}if(e.type==="sessions"||e.type==="tours"||e.type==="exhibitors"){if(i.closeDetails(t))return;this.clearActiveFilters(),i.returnToSearch(t,!1),this.selectSearchAndFocus();return}switch(e.type){case"filter":t.details=null;return;case"multi-point-tour":this.rootStore.fp.hidePathways(),i.closeDetails(t)?i.returnToTours(t,!1):g();return;case"category":this.rootStore.selectCategory(e.category);return;case"speakers":if(i.closeDetails(t))return;i.returnToSessions(t,!1);return;case"bookmarks":case"visited":if(i.closeDetails(t))return;this.selectSearchAndFocus();return;case ce:i.returnToSearch(t,!1),i.openMenu(t);return}i.closeDetails(t)||i.clearSearchAndFocus(this)||i.openMenu(t)}closeSearch(){const{uiState:t}=this,{list:e}=t;if(e.type==="route-planner"){this.rootStore.routePlannerStore.close(),i.returnToSearch(t,!1),this.resetSearchBox();return}if(i.closeDetails(t),i.clearListScroll(t,e.type),i.closeMultiPointTour(t),e.type==="bookmarks"){i.returnToSearch(t,!1),this.resetSearchBox();return}if(t.selectedCategory){i.returnToSearch(t,!1),this.resetSearchBox();return}if(e.type==="sessions"){this.closeSessions();return}if(e.type==="exhibitors"){if(S.isRebooking){this.searchBoxMode==="search"&&this.searchText?(this.setSearchText(""),this.isClearMode=!0,this.clearActiveFilters()):this.resetSearchBox();return}this.closeExhibitors();return}if(t.menu){i.closeMenu(t),this.resetSearchBox();return}if(this.searchBoxMode==="search"&&!t.details&&this.searchText){this.setSearchText(""),this.isClearMode=!0,this.clearActiveFilters();return}i.returnToSearch(t,!1),this.searchText="",this.resetSearchBox(),t.details=null,this.clearActiveFilters()}clearActiveFilters(){this.rootStore.searchButtonsStore.setPoiFilterId(null),this.rootStore.uiState.selectedPoiTypeFilters=[],this.rootStore.uiState.selectedCategoryFilters=[],this.rootStore.categoryFilterStore.state.selectedItems=[],this.rootStore.categoryFilterStore.state.pendingItems=[],this.rootStore.searchButtonsStore.searchShortcutState.activeParentId=null,this.rootStore.searchButtonsStore.searchShortcutState.activeChildren.clear(),this.rootStore.searchButtonsStore.searchShortcutState.isShortcutsVisible=!1,this.rootStore.urlFilterManager&&this.rootStore.urlFilterManager.isInitialized&&this.rootStore.urlFilterManager.clearAllFilters()}resetSearchButtonState(){const{uiState:t}=this;this.rootStore.searchButtonsStore.clearAllFilters(),this.rootStore.searchButtonsStore.setSubButtonId(null),this.rootStore.searchButtonsStore.hideSubButtons(),t.selectedTrack=null,this.searchText="",this.isClearMode=!1}handleSearchAction(){this.isFocused||this.setFocused(!0)}openOverlayWithoutInputFocus(){this.skipInputFocus=!0,this.isFocused=!0,this.isClearMode=!1,this.uiState.searchFocused=!0,this.uiState.searchClearMode=!1,this.uiState.desiredOverlaySize="full"}closeSessions(){this.searchText="",i.returnToSearch(this.uiState,!1),this.uiState.details=null,i.resetActiveListIndex(this.uiState),this.uiState.selectedTrack=null,this.rootStore.searchButtonsStore.setSubButtonId(null),this.rootStore.searchButtonsStore.hideSubButtons()}closeExhibitors(){this.searchText="",i.returnToSearch(this.uiState,!1),this.uiState.details=null,i.resetActiveListIndex(this.uiState)}resetSearchBox(){this.setFocused(!1),this.isClearMode=!1,this.syncWithUIState()}syncWithUIState(){this.searchText=(this.uiState.list.type==="search"||this.uiState.list.type==="exhibitors")&&this.uiState.list.text||"",this.isFocused=this.uiState.searchFocused,this.isClearMode=this.uiState.searchClearMode}get actionButtonIcon(){return this.shouldShowSearchInput?this.shouldShowCloseButton?"icon-close":"icon-search":"icon-close"}clearAndSelectSearch(){this.selectSearch(""),this.setFocused(!1)}get backMode(){const t=this.uiState.list.type;return(t==="bookmarks"||t==="visited")&&!this.uiState.details&&!this.uiState.menu||this.shouldShowSearchInput&&!this.searchText?"menu":"back"}get isMobileDetailsMode(){return window.innerWidth<he&&this.uiState.details!==null&&this.uiState.overlaySize==="full"&&!(this.uiState.details instanceof f)}get shouldShowTitle(){return!this.shouldShowSearchInput}get searchState(){return{text:this.searchText,isFocused:this.isFocused,isClearMode:this.isClearMode,mode:this.searchBoxMode,title:this.searchBoxConfig.title,subtitle:this.searchBoxConfig.subtitle,badge:this.searchBoxConfig.badge,icon:this.searchBoxConfig.icon}}}})();export default ue;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Box, Point } from '@expofp/geometry';
|
|
2
|
+
import { RawPoiType } from '@expofp/schema';
|
|
2
3
|
import { ReactNode } from 'react';
|
|
3
4
|
import { Kiosk } from '../components/Kiosk/SetKiosk';
|
|
4
|
-
import { RawPoiType } from '../data/Data';
|
|
5
5
|
import { Booth } from './BoothStore';
|
|
6
6
|
import { Category } from './CategoryStore';
|
|
7
7
|
import { EventItem, Track } from './EventStore';
|
|
@@ -194,10 +194,6 @@ export default class UIState {
|
|
|
194
194
|
get previewMode(): boolean;
|
|
195
195
|
get viewerMode(): boolean;
|
|
196
196
|
get selectedEventItem(): EventItem | null;
|
|
197
|
-
/**
|
|
198
|
-
* @warning If the property is of a numeric type, set the default value to be numeric, otherwise they will be cast incorrectly.
|
|
199
|
-
* @see {@link src/services/routing.ts~setMapSettings}
|
|
200
|
-
* */
|
|
201
197
|
get defaultMapSettings(): MapSettings;
|
|
202
198
|
mapSettings: MapSettings;
|
|
203
199
|
saveMapSettings(settings: MapSettings): void;
|