@expofp/floorplan 3.11.12 → 3.12.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/browser/{Button-CdChKHNd.js → Button-CxYYwdV3.js} +6 -6
- package/dist/browser/CookieConsent-Cltod-AQ.js +38 -0
- package/dist/browser/{Debug-BQJRkSVw.js → Debug-DnZLaoNY.js} +14 -14
- package/dist/browser/{Demo-Dh5hQ00u.js → Demo-CbuT3wW6.js} +14 -14
- package/dist/browser/{Free-Be0wdt8h.js → Free-CVEJPdaI.js} +16 -16
- package/dist/browser/{Gallery-DsC-3InH.js → Gallery-D2dTKIqn.js} +24 -24
- package/dist/browser/{GpsLoader-l-DhiN5_.js → GpsLoader-Bpn0jys4.js} +51 -50
- package/dist/browser/{KioskStore-hBGigttj.js → KioskStore-Bf3tKr77.js} +31 -31
- package/dist/browser/{MaplibreAdapter-B2PgQxAb.js → MaplibreAdapter-D6Fqdelu.js} +2360 -2331
- package/dist/browser/{ModalContainer-DngQzOVE.js → ModalContainer-C7E4QKwY.js} +13 -13
- package/dist/browser/{PermissionNotice-Bstp1Ig2.js → PermissionNotice-CTckXfzd.js} +7 -7
- package/dist/browser/{SetKioskMode-BXTIENxU.js → SetKioskMode-BPvChiTX.js} +9 -9
- package/dist/browser/ShowKiosk-97iuNiDq.js +33 -0
- package/dist/browser/{TouchHand-CZ4-CE4e.js → TouchHand-BEPM0Ix6.js} +5 -5
- package/dist/browser/{ViewerMenuPanel-Dc7XYnXW.js → ViewerMenuPanel-CTDMmojE.js} +25 -25
- package/dist/browser/{add-debug-secret-listener-DOVFjqJo.js → add-debug-secret-listener-rtzwkssg.js} +1 -1
- package/dist/browser/{boolean-editor-B-S4WhPP.js → boolean-editor-Buj1Gh2Q.js} +10 -10
- package/dist/browser/{bootIntercom-D41iCVYM.js → bootIntercom-CLXK1aCU.js} +3 -3
- package/dist/browser/{booth-by-xy-S_lLb4ur.js → booth-by-xy-DYsVPBrO.js} +292 -295
- package/dist/browser/bundle.json +78 -63
- package/dist/browser/{classnames-BeH2kA4o.js → classnames-C7JqIDkz.js} +2 -2
- package/dist/browser/{client-Be_UxAZT.js → client-DRCaFfyq.js} +5 -5
- package/dist/browser/{components-RZNETvKi.js → components-CoSFc4pe.js} +1369 -1316
- package/dist/browser/{debug-overlay-DjwfpG69.js → debug-overlay-l2O5ATYR.js} +415 -415
- package/dist/browser/{debug-ui-D_afzMrh.js → debug-ui-fkLeLMTN.js} +7 -7
- package/dist/browser/{dist-B-m8ZFBo.js → dist-B8Jegpa2.js} +4 -4
- package/dist/browser/{dist-CZz9piI4.js → dist-Br0u22MB.js} +6 -6
- package/dist/browser/{dist-DKu24Nie.js → dist-DQ04vk8X.js} +7 -7
- package/dist/browser/{browser-pQxW93uF.js → efp-debug-init-DolwvXvu.js} +61 -14
- package/dist/browser/enum-editor-BRlr42ZG.js +34 -0
- package/dist/browser/{es5-DPnfG3EX.js → es5-hugWWUki.js} +2 -2
- package/dist/browser/{event-not-found-CE2zhFPJ.js → event-not-found-DrCgFYgQ.js} +1 -1
- package/dist/browser/{exports-BtXbxSeU.js → exports-DY1Pe4xZ.js} +1 -1
- package/dist/browser/{favicon-B7xwIKyS.js → favicon-v6HqMJRd.js} +1 -1
- package/dist/browser/{fetch-retry.umd-BiAebF_i.js → fetch-retry.umd-CtpzesBT.js} +2 -2
- package/dist/browser/{flex-DGirEfRz.js → flex-5lvsJlaO.js} +6 -6
- package/dist/browser/{floorplan.loader-DSx2rwZS.js → floorplan.loader-D4AZdgsy.js} +890 -902
- package/dist/browser/floorplan.ready-BnsAv7j1.js +1326 -0
- package/dist/browser/{fuse-BuZwVNBr.js → fuse-BWnB1Pgo.js} +2 -2
- package/dist/browser/i18n-wZml67KB.js +8659 -0
- package/dist/browser/index.js +49 -117
- package/dist/browser/{index.module-BktNOlw2.js → index.module-GNnIO9vr.js} +23 -23
- package/dist/browser/integrateKiosk-uxqH2FgD.js +28 -0
- package/dist/browser/{is-webview-DxtfBbGj.js → is-webview-BlxQlyaS.js} +1 -1
- package/dist/browser/{jsx-runtime-DftMjMlZ.js → jsx-runtime-xVcN9g8F.js} +2 -2
- package/dist/browser/{lib-_QD5dt19.js → lib-CIYjsvFB.js} +5 -5
- package/dist/browser/loadImage-DZxHBSrL.js +58 -0
- package/dist/browser/{logDeviceInfo-CiCKGxKy.js → logDeviceInfo-BQn3HG5l.js} +9 -9
- package/dist/browser/{main-C6h73Uc5.js → main-DKRaY1QU.js} +1 -1
- package/dist/browser/mobx-rpWRRJB9.js +24 -0
- package/dist/browser/optional-boolean-editor-fWgfIGvs.js +20 -0
- package/dist/browser/optional-enum-editor-CQ8-ut60.js +34 -0
- package/dist/browser/optional-string-editor-BP4b7LsR.js +30 -0
- package/dist/browser/{particles.min-CiLQfUCo.js → particles.min-D-VdW4Qr.js} +2 -2
- package/dist/browser/{prop-types-8E5fCOgQ.js → prop-types-CE7JeEE-.js} +2 -2
- package/dist/browser/{react-B9lmaQYI.js → react-DxSEhu-j.js} +2 -2
- package/dist/browser/{react-dom-CPWfZdj5.js → react-dom-CqQZIZ5q.js} +4 -4
- package/dist/browser/reset-all-settings--GzHxj4F.js +190 -0
- package/dist/browser/{rolldown-runtime-CJax_ib9.js → rolldown-runtime-Ik1ocWLm.js} +1 -1
- package/dist/browser/{enum-editor-BtYkUhft.js → select-DQmL3TsB.js} +261 -283
- package/dist/browser/{settings-BufKqYwI.js → settings-BndqjdZx.js} +3 -3
- package/dist/browser/{settings-item-D3AzjjoO.js → settings-item-5zzAH3FT.js} +7 -7
- package/dist/browser/{store-DGdGzsa_.js → store-CgXKlx2n.js} +7328 -7646
- package/dist/browser/string-editor-Bxbp0JHl.js +30 -0
- package/dist/browser/text-field-ySWl7XqC.js +88 -0
- package/dist/browser/{theme-DvIMSzdB.js → theme-ByGstXaJ.js} +9 -9
- package/dist/browser/ui-LJGsaayP.js +43 -0
- package/dist/browser/{useRenderTarget-hqd7cVeW.js → useRenderTarget-DaUlOis9.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-booth-bookmark.js +1 -1
- package/dist/esm/components/Map/drawing/config/config-booth-labels-special.js +2 -2
- package/dist/esm/components/Map/drawing/config/config-booth-labels.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
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Rect as E}from"@expofp/geometry";import{reaction as W}from"mobx";import{FONT_WEIGHT_PRIMARY_BOOTH as N,FONT_WEIGHT_PRIMARY_EXHIBITOR as U,FONT_WEIGHT_SECONDARY_BOOTH as V,FONT_WEIGHT_SECONDARY_EXHIBITOR as Z}from"../../../../constants";import
|
|
1
|
+
import{Rect as E}from"@expofp/geometry";import{reaction as W}from"mobx";import{FONT_WEIGHT_PRIMARY_BOOTH as N,FONT_WEIGHT_PRIMARY_EXHIBITOR as U,FONT_WEIGHT_SECONDARY_BOOTH as V,FONT_WEIGHT_SECONDARY_EXHIBITOR as Z}from"../../../../constants";import p from"../../../../data";import{createShapeDot as X,createTextDef as G,createTextDefLines as Y,DEFAULT_FONT_LIGHT_URL as $,DEFAULT_FONT_URL as B,getRollValue as k,getRotation as q,updateLinesScale as j,updateRectRotation as J,updateTextDefRotation as K}from"../../../../renderer";import{layersStore as M,uiState as f}from"../../../../store";import{RegularBooth as Q,SpecialBooth as ee}from"../../../../store/BoothStore";import x from"../../../../tools/settings";import{t as v}from"../../../../utils/i18n";import te from"../../../../utils/is-mobile";import ie from"../../../../utils/is-webview";import{isArabicText as se}from"../../../../utils/rtl";import{BoothDrawerBaseWithoutPainter as ne}from"./BoothDrawerBase";import{getFont as _}from"./canvases";let z=x.boothLabelColor;x.EXPO==="tqs2021"&&(z="#000");const b=te||ie,D=r=>r.replace(" ","").substring(0,4).replace(/[0-9]/g,"3").replace(/[A-Z]/gi,"A"),I=document.createElement("canvas").getContext("2d");export default function oe(r,e){if(!(!(e instanceof Q)||e.noLabels))return new BoothLabelDrawer(r,e)}export function getMinZoomFactorForDot(r){return Array.isArray(r)&&r.length>0?Math.max(...r.map(e=>e)):typeof r=="number"?r:-0}export const isDirectionsMode=()=>!!(f.selectedRoute?.from&&f.selectedRoute?.to);export function getFontUrlByWeight(r,e=[],t="normal"){return[...e,{weight:500,url:B,style:"normal"},{weight:300,url:$,style:"normal"}].find(i=>+i.weight===r&&i.style===t)?.url||B}function S(r,e){return Number(getComputedStyle(document.body).getPropertyValue(r))||e}export function getBoothLabelWeights(){return{main:S(N,500),details:S(V,300)}}export function getExhibitorLabelWeights(){return{main:S(U,500),details:S(Z,300)}}export function getBadgeFontWeight(){return getExhibitorLabelWeights().details}const R="Details";export class BoothLabelDrawer extends ne{rendererService;canvasRect;paddingScaled;padding;minZoomDotVisible;maxZoomDotVisible;exh;shapeLabel;shapeDot;fontSizes;lines;topLeftAlignment;centerAlignment;prefixes;fontUrls;constructor(e,t){if(super(t),this.rendererService=e,this.canvasRect=new E(t.rect.center,t.rect.size,t.rotate),this.paddingScaled=[4,4],this.padding=(t.borderWidth||x.boothBorderWidth)/2,this.topLeftAlignment={horizontal:f.rtl?"right":"left",vertical:"top"},this.centerAlignment={horizontal:"center",vertical:"center"},this.prefixes=b?[{fontSize:7,name:"XS",short:!0},{fontSize:10,name:"S",short:!0},{fontSize:16,name:R,short:!1}]:[{fontSize:7,name:"XS",short:!0},{fontSize:10,name:"S",short:!0},{fontSize:12,name:"M",short:!0},{fontSize:14,name:"L",short:!0},{fontSize:18,name:R,short:!1}],t instanceof ee)return;this.exh=p.hideExhibitors?[]:p.onlyFeaturedExhibitors?t.exhibitors.filter(i=>i.featured):t.exhibitors,b&&this.optimizationLevel()>=3&&(this.prefixes=this.prefixes.filter(i=>i.name!=="S")),this.createLines(),this.calculateFontSizeFactors(),this.shapeLabel=G(Y(this.lines,this.booth.labelColor||z,0,this.fontUrls),new E(this.booth.rect.center,this.booth.rect.size,this.booth.rotate),[...this.paddingScaled],{horizontal:"left",vertical:"top"}),this.getShapeDot();const o=i=>{const n=this.lines[1]??[],s=this.fontSizes[1]??[];if(x.EXPO!=="wineparis2026"){const m=this.exh.length?this.topLeftAlignment:n.length?i<s[s.length-1].scaleFactor?this.topLeftAlignment:this.centerAlignment:this.topLeftAlignment;this.shapeLabel.alignment=m}if(!j(this.shapeLabel.lines,i,this.fontSizes,this.booth.name))return;const l=this.paddingScaled[0]*i+this.padding,d=this.paddingScaled[1]*i+this.padding;return this.shapeLabel.padding[0]=l,this.shapeLabel.padding[1]=d,this.shapeLabel},h=i=>{const n=i>=this.minZoomDotVisible&&i<=this.maxZoomDotVisible,s=this.shapeDot.source.width*i,a=this.shapeDot.source.height*i;if(!(!n&&this.shapeDot.hidden))return this.shapeDot.bounds.size={x:s,y:a},this.shapeDot.hidden=!n,this.shapeDot};W(()=>[this.booth.skipDim,f.selectedRoute,M.layersLoaded],()=>{if(!M.layersLoaded)return;const i=isDirectionsMode();this.shapeLabel.dim=i||this.booth.skipDim?!1:void 0,this.shapeDot.dim=i||this.booth.skipDim?!1:void 0,this.rendererService.update(this.shapeLabel,this.shapeDot)}),W(()=>f.mapSettings,({roll:i})=>{k(i)&&this.rendererService.onRoll(`booth-roll-${t.id}`,n=>{const s=q(n,this.shapeLabel.bounds.rotation),{size:a}=this.canvasRect;return s!==void 0&&(this.shapeLabel=K(this.shapeLabel,s),!this.shapeLabel.hidden&&!this.exh.length&&a.x!==a.y&&(this.canvasRect=J(this.canvasRect,s),this.calculateFontSizeFactors(),o(this.rendererService.scale),h(this.rendererService.scale))),[this.shapeLabel,this.shapeDot]})},{fireImmediately:!0}),this.rendererService.onPtScale(`booth-label-${t.id}`,o),this.rendererService.onPtScale(`booth-dot-${t.id}`,h)}getShape(){return[this.shapeLabel,this.shapeDot]}getShapeDot(){this.shapeDot=X(this.canvasRect,this.booth.labelColor||z),this.shapeDot.hidden=!0,this.maxZoomDotVisible=Math.min(this.canvasRect.size.x/this.shapeDot.source.width,this.canvasRect.size.y/this.shapeDot.source.height)}createLines(){const e=this.booth,t=[],o=[],h=b&&this.optimizationLevel()>=3?1:3;if(this.exh.length){const i=e.exhibitors.filter(s=>s.order===0),n=e.exhibitors.filter(s=>s.order);if(i.length>0)t.push(...i.map(s=>s.name));else if(p.onlyFeaturedExhibitors)t.push(...e.exhibitors.filter(s=>s.featured).map(s=>s.name));else if(n.length>0){t.push(...n.map(a=>a.name));const s=e.exhibitors.filter(a=>a.order===void 0);s.length>0&&t.push(v("and {{moreCount}} more",{moreCount:s.length}))}else e.exhibitors.length>h?t.push(`${e.exhibitors.length} ${p.exhibitorTermPlural}`):t.push(...e.exhibitors.map(s=>s.name));o.push(e.title||e.name)}else{const i=!!e.exhibitors.length;t.push(e.title||e.name),e.onHold?o.push(v("On Hold")):e.reserved?o.push(v("Reserved")):i||o.push(...e.exhibitors.map(n=>n.name).sort((n,s)=>n>s?1:-1)),e.size&&o.push(e.size.indexOf("/")>-1?e.size.substring(0,e.size.indexOf("/")).trim():e.size),e.price&&e.price!=="0"&&!f.previewMode&&o.push(e.price)}f.rtl&&t.forEach((i,n)=>{(i.endsWith(".")||i.endsWith("!")||i.endsWith("?"))&&(t[n]=t[n]+"\u200F"),se(i)&&(t[n]=t[n]+" ")}),this.lines=[t,o]}calculateFontSizeFactors(){let[e,t]=this.lines;const o=this.canvasRect,h=[],i=[],n=this.prefixes.slice(0,this.exh.length?this.prefixes.length:this.prefixes.length-1),{main:s,details:a}=this.exh.length?getExhibitorLabelWeights():getBoothLabelWeights();for(const{fontSize:l,short:d}of n){const m=l*devicePixelRatio,F=.9*l*devicePixelRatio,u=_(m,s),T=_(F,a),y=p.hideExhibitorBoothNumber||d;let w,A,L,g;if(this.exh.length)d?t=[]:t=this.lines[1],L=Math.max(...e.map(c=>this.measureText(c,u).width),...t.map(c=>this.measureText(c,T).width)),w=Math.max(...e.map(c=>this.exh.length?this.measureText(D(c),u).width:this.measureText(D(c),u).width+3+3),...t.map(c=>this.measureText(D(c),T).width)),g=m*e.length+F*t.length+devicePixelRatio*(e.length+t.length)+3,A=y?g/e.length:null;else{const c=e[0].replace(/[0-9]/g,"3").replace(/[A-Z]/g,"A"),C=4;L=this.measureText(c,u).width+3+3,g=m+C}const H=o.size.x/(w||L),P=o.size.y/(A||g),O=Math.min(H,P);h.push({scaleFactor:O,value:l}),!y&&i.push({scaleFactor:O,value:.9*l})}if(!this.exh.length){const l=h[h.length-1],d=this.prefixes.find(m=>m.name===R);h.push({scaleFactor:l.scaleFactor/1.8,value:d.fontSize}),i.push({scaleFactor:l.scaleFactor/1.8,value:d.fontSize*(b?1:.9)})}this.fontUrls=[getFontUrlByWeight(s,this.rendererService.fontUrls),getFontUrlByWeight(a,this.rendererService.fontUrls)],this.minZoomDotVisible=getMinZoomFactorForDot(h.map(l=>l.scaleFactor)),this.fontSizes=[h,i]}calcArea(e,t){return Math.floor(Math.max(0,e)*Math.max(0,t)/1e3)}optimizationLevel(){return Math.min(p.viewOptimizationLevel?p.viewOptimizationLevel:Math.floor(this.calcArea(this.canvasRect.size.x,this.canvasRect.size.y)/5e3),3)}measureText(e,t){return I.font=t,I.measureText(e)}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{degToRad as
|
|
1
|
+
import{getConfig as x}from"@expofp/config";import{resolve as O}from"@expofp/resolve";import{degToRad as T,Rect as v}from"@expofp/geometry";import{BOOTHS_PAINTER_MARKER as D,SEPARATOR as m}from"../../../../constants";import{createImageDef as H,createLayerDef as k}from"../../../../renderer";import c,{boothStore as F}from"../../../../store";import G from"../../../../store/init/init-booths";import{getChildLayers as K}from"../../../../store/init/init-layers";import{LayersMode as Y}from"../../../../store/LayerStore";import{chunkArray as j}from"../../../../utils";import{getFpPaths as J}from"../../../../data/fp-payloads";import{loadIcons as U}from"../../../../utils/imageloader";import Z,{BG_LAYER_NAME as R,FG_LAYER_NAME as $}from"./config-bg";import q,{BOOTHS_CHUNK_SIZE as z}from"./config-booths";import{getImageLayerName as Q,getLayerIcons as V}from"./loadBoothsImages";function W(e){return e.childLayers.length?e.childLayers:K(e,e.basePriority,15).layers}function E(e,t,f){return new Promise(async g=>{let n=[];const i=G(c,t),s=await Z(t),a=[],h=j(i,z),l=F.booths.filter(o=>o.rect&&(!o.layer||o.layer===t||o.layer.childLayers.includes(t))&&o.exhibitors.find(r=>!!r.logoInBooth&&!!r.logo?.url)&&!c.uiState.hideLogoInBooth),I=new Map(l.map(o=>[o.id,o.noLabels]));l.forEach(o=>o.noLabels=!0),i.length&&h.forEach((o,r)=>{a.push(q(e,`${t.name}${m}${D}${m}${r}`,o))}),l.forEach(o=>{o.noLabels=I.get(o.id)}),t.loaded=!0;const y=s.children.find(o=>o.name===R),u=s.children.find(o=>o.name===$),p=Q(t.name),d=V(t),L={name:p,children:[]};d.length&&e.onLayerImages(p,async()=>{const o=await U(d),r=[];for(const w of o.filter(Boolean)){const{bounds:{x:b,y:P,height:A,angle:S,width:_},htmlImage:M}=w,N=v.fromMinMax({x:b,y:P},{x:b+_,y:P+A},T(S)),C=H(M,N);r.push({shape:C})}return{layer:L,children:r}}),y&&n.push({...y,name:`${s.name}${m}${R}`}),a.length&&n.push(...a),u&&n.push({...u,name:`${s.name}${m}${$}`}),d.length&&n.push(L);const B=t.childLayers.sort((o,r)=>o.basePriority-r.basePriority).map(async o=>E(e,o,!0));Promise.all(B).then(o=>{const r=o.flat();r.length&&n.push(...r),t.children=n,t.configured=!0,g(k(t.name,n,{hidden:!f}))})})}export default async function X(e,t){return e.configured?Promise.resolve({name:e.name,children:e.children}):new Promise(async(f,g)=>{if(c.layerStore.mode!==Y.Default&&!J(e.name)&&!e.rootParent)try{const a=x().fpSvgLayerJsRefs[e.name];a&&await O(a)}catch(a){console.warn(`Layer data not loaded: ${e.name}`,a)}const n=W(e);n.length&&(e.childLayers=n);const{layers:i}=c.layerStore;c.layerStore.layers=[...i,...n.filter(a=>!i.some(h=>h.name===a.name))];const s=await E(t,e,e.visible);f(s)})}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{degToRad as
|
|
1
|
+
import{getFpSvgJs as f}from"../../../../data/fp-payloads";import{degToRad as d,radToDeg as h,Rect as u}from"@expofp/geometry";import{select as y}from"d3";import{SEPARATOR as R}from"../../../../constants";import{getLayerSvg as x}from"../../../../data/svg";import{flipImageDef as I,isInnerInsideOuter as w}from"../../../../renderer";import{rotateImageDef as A}from"../../../../renderer/engine-core/utils/rotation";import{getLogoUrl as L}from"../../../../utils/getLogoUrl";export async function loadLayersImages(e){const a=e.layerImagesRegistry.invoke();await Promise.all(a.map(async s=>{const n=await s;if(!n)return;const{layer:r,children:c}=n;if(c.length){const i=[];for(let o=0;o<c.length;o++){const{shape:t,parentRect:g}=c[o],l=w(t.bounds,g);if(!r.name.includes("Pathway_")){const m=l?"image-rotate":"image-flip";e.onRoll(`${m}-${r.name}-${o}`,l?p=>A(t,p):p=>I(t,p))}i.push(t)}r.children.push(...i),e.update(r)}}))}export const getImageLayerName=e=>`${e}${R}images`;export function mapBoothsLogos(e){return new Map(e.map(a=>{const s=a.rect&&a.exhibitors.find(n=>n.logoInBooth&&n.logo);return s?[a.id,{preferred:L(s.logo),fallback:s.logo.url}]:null}).filter(Boolean))}export function getLayerIcons(e){const a=y(x(e)).select(`[data-layer="${e.name}"]`);return(f().__fpVersion>5?a.selectAll(":scope > image, :scope > g:not([data-layer]) image").nodes():a.selectAll(":scope > g[data-is-editable='false'] image").nodes()).filter(Boolean)}export function createBoothImg(e,a){const s=e.rect,n=s.size.width,r=s.size.height,c=r?n/r:1,i=a.height?a.width/a.height:1;let o,t,g;const l=.9;c>i?(t=r*l,o=t*i):(o=n*l,t=o/i);const m=e.rotate||0;return i>=2&&!m&&r>=n*2?(t=n*l,o=t*i,g=-90):g=h(m),o>n&&(o=n,t=o/i),t>r&&(t=r,o=t*i),{name:e.slug,bounds:new u(s.center,{x:o,y:t},d(g)),htmlImage:a,booth:e}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as J}from"react/jsx-runtime";import{degToRad as _}from"@expofp/geometry";import W from"color";import{runInAction as H}from"mobx";import{observer as K}from"mobx-react-lite";import{useCallback as k,useEffect as I,useMemo as u,useRef as y,useState as F}from"react";import Z from"../../data";import{getLayerSvg as Q,svgArea as L,svgAreaExplicit as Y}from"../../data/svg";import{createSceneDef as q}from"../../renderer";import a,{uiState as R}from"../../store";import D from"../../tools/settings";import{resolveVenueFitRect as ee}from"../../utils/scene-bounds";import re from"../Map/drawing/config/config-all";import{loadLayersImages as oe}from"../Map/drawing/config/loadBoothsImages";import{useBuildRoute as te}from"../Map/traffic/useBuildRoute";import{useManageTraffic as ne}from"../Map/traffic/useManageTraffic";import ae from"./MaplibreWrapper";import{useCameraReactions as ie}from"./useCameraReactions";import{useDimming as se}from"./useDimming";import{useLayerVisibilitySync as le}from"./useLayerVisibilitySync";import{useRendererEvents as ce}from"./useRendererEvents";import{useWayfindingAndMarkers as ue}from"./useWayfindingAndMarkers";import{deriveGeoConfig as fe,getLocalRectGeoBounds as me,getVisibleRectFitPadding as pe,INITIAL_FIT_ZOOM_ADJUSTMENT as de}from"./utils/geo-config";import{applyMapOptions as $,DEFAULT_MAP_OPTIONS as ge,getTileSource as ye,MAP_2D_OPTIONS as Re}from"./utils/map-helpers";import{calculateTransformMatrix as be}from"./utils/solver";const w="routes-api.expofp.com";function j(){H(()=>{a.layerStore.layers.forEach(t=>{t.configured=!1,t.children=[],t.loaded=!1}),a.layerStore.layersLoaded=!1})}function z(t,l){const o=[];for(const f of t.rollRegistry.invoke(l))Array.isArray(f)?o.push(...f):o.push(f);o.length&&t.update(...o)}function Se(t){const l=Math.abs(t[0]??0),o=Math.hypot(t[0]??0,t[1]??0);return l<=0||o<=0?1:l/o}const Ae=K(function({viewMode:l}){const[o,f]=F(null),[T,O]=F(null),e=a.rendererService,h=y(null),c=y(null),b=y(null),x=y(null),r=u(()=>fe(),[]),E=u(()=>{const{rect:n}=ee({layerViewbox:a.layerStore.viewboxRectangle,explicitArea:Y?L:null,layerRectangle:a.layerStore.rectangle,sceneDef:o,svgArea:L});return n},[o]),m=u(()=>r?{center:r.center,bearing:r.bearing,zoom:r.zoom,bounds:me(E,r.gpsConfig),fitPadding:pe(0),zoomAdjustment:de}:null,[r,E]),p=u(()=>r?be(r.gpsConfig,Q()?.getAttribute("units")):null,[r]),d=u(()=>({...l==="map2d"?Re:ge}),[l]),P=y(d),B=u(()=>ye(),[]),{mapDimAnimatorRef:S,venueDimAnimatorRef:A,handleMapDimLayerReady:N}=se(c,e);I(()=>{if(!r)return;let n=!1;j();const i=re(e).then(s=>{if(n)return;const M=W(D.backgroundColor==="none"?"#ebebeb":D.backgroundColor).string(),C=q(s,L,M);f(C)}).catch(s=>{n||console.warn("Maplibre scene configuration failed.",s)}),v=S.current,g=A.current;return()=>{n=!0,j();const s=h.current;i.finally(()=>e.disposeIfCurrent(s)),b.current?.(),b.current=null,h.current=null,c.current=null,x.current=null,O(null),v?.stop(),g?.stop(),R.sceneDefReady=!1}},[r,S,e,A]);const U=k((n,i,v,g)=>{h.current=n,c.current=i,x.current=g,O(n),e.attach(n,v,g,p?Se(p):1),$(i,P.current),S.current?.setTarget(R.dimmed,{immediate:!0}),A.current?.setTarget(R.dimmed,{immediate:!0}),b.current?.();const s=()=>{const C=i.getBearing()-(r?.bearing??0);z(e,_(C))};i.on("rotate",s),i.on("rotateend",s),b.current=()=>{i.off("rotate",s),i.off("rotateend",s)},oe(e);const M=e.ptScaleRegistry.invoke(e.scale||1);M.length&&e.update(...M),z(e,_(i.getBearing()-(r?.bearing??0))),a.layerStore.layersLoaded=!0,a.fp.onFpConfigured&&a.fp.onFpConfigured(),R.sceneDefReady=!0,g()},[e,S,p,A]);I(()=>{P.current=d,$(c.current,d,!0)},[d]),ce(T,e),ue(T,e),le(e,c,r),ie(c,r,o),te({enabled:a.layerStore.layersLoaded&&R.buildRoute,rendererService:e});const V=Z.
|
|
1
|
+
import{jsx as J}from"react/jsx-runtime";import{degToRad as _}from"@expofp/geometry";import W from"color";import{runInAction as H}from"mobx";import{observer as K}from"mobx-react-lite";import{useCallback as k,useEffect as I,useMemo as u,useRef as y,useState as F}from"react";import Z from"../../data";import{getLayerSvg as Q,svgArea as L,svgAreaExplicit as Y}from"../../data/svg";import{createSceneDef as q}from"../../renderer";import a,{uiState as R}from"../../store";import D from"../../tools/settings";import{resolveVenueFitRect as ee}from"../../utils/scene-bounds";import re from"../Map/drawing/config/config-all";import{loadLayersImages as oe}from"../Map/drawing/config/loadBoothsImages";import{useBuildRoute as te}from"../Map/traffic/useBuildRoute";import{useManageTraffic as ne}from"../Map/traffic/useManageTraffic";import ae from"./MaplibreWrapper";import{useCameraReactions as ie}from"./useCameraReactions";import{useDimming as se}from"./useDimming";import{useLayerVisibilitySync as le}from"./useLayerVisibilitySync";import{useRendererEvents as ce}from"./useRendererEvents";import{useWayfindingAndMarkers as ue}from"./useWayfindingAndMarkers";import{deriveGeoConfig as fe,getLocalRectGeoBounds as me,getVisibleRectFitPadding as pe,INITIAL_FIT_ZOOM_ADJUSTMENT as de}from"./utils/geo-config";import{applyMapOptions as $,DEFAULT_MAP_OPTIONS as ge,getTileSource as ye,MAP_2D_OPTIONS as Re}from"./utils/map-helpers";import{calculateTransformMatrix as be}from"./utils/solver";const w="routes-api.expofp.com";function j(){H(()=>{a.layerStore.layers.forEach(t=>{t.configured=!1,t.children=[],t.loaded=!1}),a.layerStore.layersLoaded=!1})}function z(t,l){const o=[];for(const f of t.rollRegistry.invoke(l))Array.isArray(f)?o.push(...f):o.push(f);o.length&&t.update(...o)}function Se(t){const l=Math.abs(t[0]??0),o=Math.hypot(t[0]??0,t[1]??0);return l<=0||o<=0?1:l/o}const Ae=K(function({viewMode:l}){const[o,f]=F(null),[T,O]=F(null),e=a.rendererService,h=y(null),c=y(null),b=y(null),x=y(null),r=u(()=>fe(),[]),E=u(()=>{const{rect:n}=ee({layerViewbox:a.layerStore.viewboxRectangle,explicitArea:Y?L:null,layerRectangle:a.layerStore.rectangle,sceneDef:o,svgArea:L});return n},[o]),m=u(()=>r?{center:r.center,bearing:r.bearing,zoom:r.zoom,bounds:me(E,r.gpsConfig),fitPadding:pe(0),zoomAdjustment:de}:null,[r,E]),p=u(()=>r?be(r.gpsConfig,Q()?.getAttribute("units")):null,[r]),d=u(()=>({...l==="map2d"?Re:ge}),[l]),P=y(d),B=u(()=>ye(),[]),{mapDimAnimatorRef:S,venueDimAnimatorRef:A,handleMapDimLayerReady:N}=se(c,e);I(()=>{if(!r)return;let n=!1;j();const i=re(e).then(s=>{if(n)return;const M=W(D.backgroundColor==="none"?"#ebebeb":D.backgroundColor).string(),C=q(s,L,M);f(C)}).catch(s=>{n||console.warn("Maplibre scene configuration failed.",s)}),v=S.current,g=A.current;return()=>{n=!0,j();const s=h.current;i.finally(()=>e.disposeIfCurrent(s)),b.current?.(),b.current=null,h.current=null,c.current=null,x.current=null,O(null),v?.stop(),g?.stop(),R.sceneDefReady=!1}},[r,S,e,A]);const U=k((n,i,v,g)=>{h.current=n,c.current=i,x.current=g,O(n),e.attach(n,v,g,p?Se(p):1),$(i,P.current),S.current?.setTarget(R.dimmed,{immediate:!0}),A.current?.setTarget(R.dimmed,{immediate:!0}),b.current?.();const s=()=>{const C=i.getBearing()-(r?.bearing??0);z(e,_(C))};i.on("rotate",s),i.on("rotateend",s),b.current=()=>{i.off("rotate",s),i.off("rotateend",s)},oe(e);const M=e.ptScaleRegistry.invoke(e.scale||1);M.length&&e.update(...M),z(e,_(i.getBearing()-(r?.bearing??0))),a.layerStore.layersLoaded=!0,a.fp.onFpConfigured&&a.fp.onFpConfigured(),R.sceneDefReady=!0,g()},[e,S,p,A]);I(()=>{P.current=d,$(c.current,d,!0)},[d]),ce(T,e),ue(T,e),le(e,c,r),ie(c,r,o),te({enabled:a.layerStore.layersLoaded&&R.buildRoute,rendererService:e});const V=Z.busRoutes??!1;ne({permission:a.layerStore.layersLoaded&&V,rendererService:e,dataJsonUrl:`https://${w}/v1/routes?expo=${D.EXPO}`,websocketUrl:`wss://${w}/locations?expo=${D.EXPO}`});const G=k(n=>{console.warn("Maplibre map failed to load; falling back to floorplan mode.",n),a.maplibreStore.deactivateMaplibre()},[]);if(!r||!m||!p||!o)return null;const X=`${m.center.join(",")}:${m.bearing}:${m.zoom}`;return J(ae,{sceneDef:o,geoConfig:m,staticTransform:p,tileSource:B,mapOptions:d,onRendererReady:U,onMapDimLayerReady:N,onMapLoadError:G},X)});export default Ae;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import{jsx as B}from"react/jsx-runtime";import"maplibre-gl/dist/maplibre-gl.css";import{Renderer as N}from"@expofp/renderer";import{addProtocol as U,Map as G}from"maplibre-gl";import{Protocol as Y}from"pmtiles";import{useEffect as E,useRef as c}from"react";import{createStyleTransform as k}from"./utils/resolve-map-style";export const MAP_DIM_LAYER_ID="expofp-map-dim";const y="expofp-map-dim-source",H="3d-expofp";let g=null;const J=["coalesce",["get","name:en"],["get","name_en"],["get","name:latin"],["get","name"]],V={type:"Feature",geometry:{type:"Polygon",coordinates:[[[-180,-85],[180,-85],[180,85],[-180,85],[-180,-85]]]},properties:{}};function I(e){if(!e||typeof e!="object")return!1;const r=e.length;if(typeof r!="number"||r<16)return!1;const o=e[0];return typeof o=="number"&&Number.isFinite(o)}function W(e){if(I(e))return Array.from(e);const o=e?.defaultProjectionData?.mainMatrix;return I(o)?Array.from(o):(console.warn("Maplibre custom layer received an unsupported projection matrix payload.",e),null)}function b(e){return typeof e=="string"?e.includes("name"):Array.isArray(e)?e.some(r=>b(r)):!e||typeof e!="object"?!1:Object.values(e).some(r=>b(r))}function X(e){return e.type!=="symbol"||!e.id||!e.layout?!1:b(e.layout["text-field"])}function q(e){const r=e.getStyle();for(const o of r.layers??[])X(o)&&e.setLayoutProperty(o.id,"text-field",J)}function K(){if(!g){g=new Y;try{U("pmtiles",g.tile)}catch(e){console.warn("Maplibre PMTiles protocol registration failed.",e)}}}export default function Q({sceneDef:e,geoConfig:r,staticTransform:o,tileSource:w,mapOptions:O,onRendererReady:h,onMapDimLayerReady:x,onMapLoadError:M}){const d=c(null),L=c(null),l=c(null),P=c(h),S=c(x),_=c(M),C=c({sceneDef:e,geoConfig:r,staticTransform:o,tileSource:w,mapOptions:O});return E(()=>{P.current=h,S.current=x,_.current=M}),E(()=>{if(!d.current)return;const{sceneDef:m,geoConfig:n,staticTransform:T,tileSource:A,mapOptions:u}=C.current;let p=!1;const f={...m};f.rootLayer={...m.rootLayer};const F=m.rootLayer.children;f.rootLayer.children=F.filter(i=>i?.name?.toString().toLowerCase()!=="areamap"),f.background=void 0,f.staticTransform=T,K();const z=n.bounds?{bounds:n.bounds,fitBoundsOptions:{padding:n.fitPadding,bearing:n.bearing}}:{center:n.center,zoom:n.zoom},j=k(A.style),t=new G({container:d.current,...z,bearing:n.bearing,pitch:u?.pitch??30,maxPitch:u?.maxPitch??70,minZoom:u?.minZoom,maxZoom:u?.maxZoom,maxBounds:u?.maxBounds,bearingSnap:0,canvasContextAttributes:{antialias:!0}});n.zoomAdjustment&&t.jumpTo({zoom:t.getZoom()+n.zoomAdjustment}),L.current=t,t.once("error",i=>{t.isStyleLoaded()||_.current?.(i?.error??i)});const R=i=>{const a=i?.id;!a||t.hasImage(a)||t.addImage(a,{width:1,height:1,data:new Uint8Array(4)})};t.on("styleimagemissing",R);const Z={id:H,type:"custom",renderingMode:"3d",onAdd(i,a){if(p)return;const s=new N({canvas:t.getCanvas(),gl:a});if(p){s.dispose();return}s.init(f),l.current=s,P.current?.(s,t,f,()=>t.triggerRepaint())},render(i,a){if(!l.current||l.current.isDisposed)return;const s=W(a??i);s&&l.current.render(s)}},D=()=>{q(t),t.getSource(y)||t.addSource(y,{type:"geojson",data:V}),t.getLayer(MAP_DIM_LAYER_ID)||t.addLayer({id:MAP_DIM_LAYER_ID,type:"fill",source:y,paint:{"fill-color":"#000000","fill-opacity":0,"fill-opacity-transition":{duration:0,delay:0}}}),S.current?.(t),t.addLayer(Z)};return t.on("style.load",D),t.setStyle(A.style,j?{transformStyle:j}:void 0),()=>{p=!0,t.off("style.load",D),t.off("styleimagemissing",R),l.current?.dispose(),l.current=null,t.remove(),L.current=null}},[]),B("div",{ref:d,style:{position:"absolute",top:0,left:0,width:"100%",height:"100%"}})}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { type StyleSpecification, type TransformStyleFunction } from 'maplibre-gl';
|
|
2
|
+
/**
|
|
3
|
+
* Build a MapLibre `transformStyle` hook that makes a style's internal URLs
|
|
4
|
+
* safe to use, or `undefined` when none is needed.
|
|
5
|
+
*
|
|
6
|
+
* MapLibre requires the URLs *inside* a style — `sprite`, `glyphs`, source
|
|
7
|
+
* `url`, and source `tiles` — to be fully absolute before it consumes them;
|
|
8
|
+
* for example, `normalizeSpriteURL` calls `new URL(url)` with no base and
|
|
9
|
+
* rejects rooted or relative values.
|
|
10
|
+
*
|
|
11
|
+
* Inline style objects have no style URL to resolve against; callers must pass
|
|
12
|
+
* already-absolute internals for those.
|
|
13
|
+
*/
|
|
14
|
+
export declare function createStyleTransform(style: string | StyleSpecification): TransformStyleFunction | undefined;
|
|
15
|
+
//# sourceMappingURL=resolve-map-style.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export function createStyleTransform(c){if(typeof c!="string")return;const p=new URL(c,window.location.href).href,o=i=>new URL(i,p).href.replace(/%7B/g,"{").replace(/%7D/g,"}"),l=i=>i.startsWith("pmtiles://")?`pmtiles://${o(i.slice(10))}`:o(i);return(i,u)=>{const e={...u};typeof e.sprite=="string"?e.sprite=o(e.sprite):Array.isArray(e.sprite)&&(e.sprite=e.sprite.map(t=>{if(!t||typeof t!="object")return t;const r=t;return typeof r.url!="string"?t:{...r,url:o(r.url)}})),typeof e.glyphs=="string"&&(e.glyphs=o(e.glyphs));const n=e.sources;if(n){e.sources={...n};for(const[t,r]of Object.entries(n)){if(!r||typeof r!="object")continue;const s={...r};typeof s.url=="string"&&(s.url=l(s.url)),Array.isArray(s.tiles)&&(s.tiles=s.tiles.map(f=>typeof f=="string"?l(f):f)),e.sources[t]=s}}return e}}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
+
import { type Consent } from '@expofp/config';
|
|
1
2
|
import React from 'react';
|
|
2
3
|
import './Menu.scss';
|
|
3
4
|
import './Menu_custom.scss';
|
|
4
5
|
interface MenuProps {
|
|
5
6
|
isGDPR: boolean;
|
|
6
|
-
|
|
7
|
+
consent: Consent;
|
|
7
8
|
}
|
|
8
|
-
declare const _default: ({ isGDPR,
|
|
9
|
+
declare const _default: ({ isGDPR, consent }: MenuProps) => React.JSX.Element;
|
|
9
10
|
export default _default;
|
|
10
11
|
//# sourceMappingURL=Menu.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as e,jsxs as s,Fragment as L}from"react/jsx-runtime";import{autorun as N}from"mobx";import{useLocalStore as S,useObserver as
|
|
1
|
+
import{jsx as e,jsxs as s,Fragment as L}from"react/jsx-runtime";import{autorun as N}from"mobx";import{useLocalStore as S,useObserver as f}from"mobx-react-lite";import C,{Suspense as x}from"react";import r from"../data";import{getFpSvgJs as D}from"../data/fp-payloads";import t,{uiState as n}from"../store";import E from"../ui/Badge";import{getLocale as T,getLocales as U,t as m}from"../utils/i18n";import d from"../utils/is-iframe";const j=C.lazy(()=>import("./ViewerMenuPanel"));import"./Menu.scss";import"./Menu_custom.scss";import h from"../tools/logger";import g from"../tools/settings";const u=r.logo;h.log("Logo url: ",u),window.setTimeout(function(){const l=new Image;l.onload=()=>{h.log("Logo image loaded")},l.crossOrigin="anonymous",l.src=u},1500);function F({consent:l,isGDPR:c}){const a=S(()=>({logoVisibility:"visible",shown:!1,shownTimeout:void 0,modalOpen:!1,selectedCategoryIds:(n.selectedCategoryFilters||[]).map(o=>Number(o.id)),pendingSelectedIds:(n.selectedCategoryFilters||[]).map(o=>Number(o.id))}));N(()=>{n.menu?(a.shownTimeout=window.setTimeout(()=>a.shown=!0,1),n.list.type==="sessions"&&t.searchStore.selectSearch()):(a.shown=!1,a.shownTimeout&&window.clearTimeout(a.shownTimeout))});function p(o){if(n.kiosk)return o.preventDefault()}function v(o){o.preventDefault(),w(),t.searchStore.selectSearch()}function k(o){o.preventDefault(),t.fp?.onLeaveEvent?.()}function _(o){o.preventDefault(),t.clickLanguage()}return f(()=>{if(!n.menu)return null;const o=t.boothStore.booths.filter(i=>i.bookmarked).map(i=>i.name),b=D().__fpSettings?.fpVer?`https://d2.expofp.com/export/v2/${g.EXPO}/pdf`:`https://api.expofp.com/service/convert/${g.EXPO}/pdf`,y=n.viewerMode&&typeof t.fp?.onLeaveEvent=="function";return s("div",{className:`menu ${a.shown?"shown":""}`,children:[d?e("div",{className:"menu__cover -empty"}):e("div",{className:"menu__cover",children:e("a",{href:r.homeUrl,target:"_blank",rel:"noopener noreferrer",onClick:p,children:e("img",{src:u,onError:()=>a.logoVisibility="hidden",style:{visibility:a.logoVisibility},alt:"",crossOrigin:"anonymous"})})}),s("div",{className:"menu__content",children:[n.viewerMode&&e(x,{fallback:null,children:e(j,{})}),!n.viewerMode&&e("a",{href:"/#",onClick:v,className:"menu__item",children:m("Search")}),!r.hideEventHomeLink&&!n.kiosk&&!d&&!!r.homeUrl&&s("a",{href:r.homeUrl,target:"_blank",className:"menu__item",rel:"noopener noreferrer",children:[m("Event Home").replace(/ /g,"\xA0"),e("i",{className:"icon-link-external"})]}),!r.hideRegisterToAttendLink&&!n.kiosk&&!d&&!!r.registerUrl&&s("a",{href:r.registerUrl,target:"_blank",className:"menu__item",rel:"noopener noreferrer",children:[m("Register to Attend").replace(/ /g,"\xA0"),e("i",{className:"icon-link-external"})]}),!n.hideLanguage&&!r.hideLanguage&&!r.hideLanguageLink&&s("a",{href:"?language",onClick:_,className:"menu__item -language",children:[s("span",{children:[m("Language")," "]}),s("span",{className:"menu__icons",children:[e(E,{variant:"gray",size:"md",noMargins:!0,rounded:!0,children:U().find(i=>i.id===T())?.name}),e("i",{className:"icon-chevron-right"})]})]}),!r.hideDownloadPdfLink&&!n.kiosk&&e("a",{className:"menu__item -pdf",target:"_blank",rel:"noopener noreferrer",href:`${b}/?exhibitors=true&bookmarks=${o.join(",")}&layers=${(t.layerStore.layers.length>=t.layerStore.visible.length?t.layerStore.visible.map(i=>i.name).join(","):"").replace(/&/g,"%26")}`,children:m("Download PDF")}),l==="ask"&&c&&e("a",{href:"/#",className:"menu__item -cookie-consent",onClick:i=>{i.preventDefault(),n.hideCookieConsent=!1},children:m("Review Cookie Consent")}),y&&e("div",{className:"menu__item-leave",children:e("a",{href:"/#",className:"menu__item -leave-event menu__leave-link",onClick:k,children:m("Select another event")})})]})]})});function w(){n.menu=!1}}export default({isGDPR:l,consent:c})=>f(()=>e(L,{children:n.menu?e(F,{isGDPR:l,consent:c}):null}));
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
import { type Consent } from '@expofp/config';
|
|
1
2
|
import React from 'react';
|
|
2
3
|
interface OverlayContainerProps {
|
|
3
4
|
isGDPR: boolean;
|
|
4
|
-
|
|
5
|
+
consent: Consent;
|
|
5
6
|
}
|
|
6
7
|
declare const OverlayContainer: React.FunctionComponent<OverlayContainerProps>;
|
|
7
8
|
export default OverlayContainer;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as o,jsxs as S}from"react/jsx-runtime";import h from"classnames";import{observer as g}from"mobx-react-lite";import{useCallback as l,useMemo as a}from"react";import k from"../data";import{uiState as e}from"../store";import
|
|
1
|
+
import{jsx as o,jsxs as S}from"react/jsx-runtime";import h from"classnames";import{observer as g}from"mobx-react-lite";import{useCallback as l,useMemo as a}from"react";import k from"../data";import{uiState as e}from"../store";import z from"./Bookmarks";import C from"./Booth/Booth";import O from"./Category";import b from"./Event";import x from"./Exhibitor";import M from"./Filter";import R from"./Language";import P from"./Menu";import A from"./Overlay";import E from"./RoutePlanner/RoutePlanner";import j from"./Search";import F from"./Sessions";import w from"./Speaker";import B from"./Speakers";import I from"./TourPoints";import _ from"./Tours";import K from"./Visited";import L from"./Wayfinding";const T={full:"full",medium:"medium",small:"medium"},D=r=>T[r],N=()=>e.list.type==="search"||k.isRebooking&&e.list.type==="exhibitors",U=r=>r?7:e.details?3:N()?9:3,V=g(({isGDPR:r,consent:m})=>{const n=l(t=>{e.desiredOverlaySize=t},[]),c=l(t=>{e.setOverlayScrolled(t)},[]),f=D(e.overlaySize),d=e.selectedRoute?.from&&e.selectedRoute?.to,p=U(!!d),u=e.fullSizeOffset,v=a(()=>[e.list.type,e.details],[e.list.type,e.details]),y=a(()=>{const t={"-backdrop":e.canvasStarted&&e.shouldUseBackdrop&&!e.dimmed&&!e.galleryActive,"-no-transition":e.dimmed,"-gallery-active":e.galleryActive,collapsed:e.overlayCollapsed,kiosk:e.kiosk,start:e.overlayPosition==="left",bottom:e.overlayPosition!=="left",[e.overlaySize]:!0},i=h(t),s=e.overlayInterfaceClasses.join(" ");return s?`${i} ${s}`:i},[e.canvasStarted,e.shouldUseBackdrop,e.dimmed,e.galleryActive,e.overlayCollapsed,e.kiosk,e.inIdle,e.setKioskModeEnabled,e.overlayPosition,e.overlaySize,e.overlayInterfaceClasses]);return S(A,{open:e.isOverlayOpen,size:f,particles:e.isFeaturedExhibitorActive,className:y,mediumSizeMultiplier:p,fullSizeOffset:u,disableDrag:e.viewerMode&&e.menu,forceFull:e.viewerMode&&e.menu,scrollResetKey:v,onChangeSize:n,onScrollStateChange:c,children:[o(P,{isGDPR:r,consent:m}),o(j,{}),o(x,{}),o(C,{}),o(z,{}),o(K,{}),o(R,{}),o(O,{}),o(L,{}),o(M,{}),o(F,{showFilters:!0}),o(B,{showFilters:!0}),o(_,{}),o(I,{}),o(E,{}),o(b,{}),o(w,{})]})});export default V;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import{jsx as n}from"react/jsx-runtime";import"./Ws.scss";import p from"classnames";import{reaction as x}from"mobx";import{useLocalStore as w,useObserver as g}from"mobx-react-lite";import b,{createRef as I,useCallback as m}from"react";import{CSSTransition as y,TransitionGroup as S}from"react-transition-group";import T,{exhibitorStore as k,uiState as r}from"../store";import{trackWsExhibitorClick as v}from"../tools/gtag";import{remsToPixels as E,shuffle as N}from"../utils";import{loadImagesInBatchesById as B}from"../utils/loadImagesInBatches";import{useInit as L}from"../utils/mobx";const h=8e3,M=b.memo(()=>{const e=w(()=>({el:null,all:[],adv:[],keySeq:0,index:0,imgByExhibitorId:new Map,batchSize:100,loading:!1,leftToNextLoad:0,timeoutId:0,get sectionStyle(){const{wsStarted:t,wsPosition:i}=r,a=i==="top",o={right:0,width:"100%",opacity:t?1:0};return a?o.top=0:o.bottom=0,o}})),s=m(()=>{const i=(e.el?.getBoundingClientRect().width??0)-E(.3)*2;let a=0;const o=[];do{const l=e.all[e.index%e.all.length],c=e.imgByExhibitorId.get(l.id);if(!c)break;const f=c.width*r.wsImageHeightPx/c.height+20;if(a+f>i&&o.length)break;a+=f,o.push({key:e.keySeq++,e:l}),e.index=(e.index+1)%e.all.length}while(!0);e.adv=o.map(l=>({...l,nodeRef:I()})),e.leftToNextLoad=Math.max(0,e.leftToNextLoad-o.length)},[e]),d=m(async()=>{e.loading=!0;let t=e.all.slice(e.index,e.index+e.batchSize);t.length<e.batchSize&&(t=t.concat(e.all.slice(0,e.batchSize-t.length)));const i=await B(new Map(t.map(a=>[a.id,{fallback:a.logo?.url}])));return e.leftToNextLoad=i.size,e.loading=!1,i},[e]),u=m(()=>{const t=async()=>{if(e.loading){e.timeoutId=window.setTimeout(t,h);return}e.leftToNextLoad<=e.adv.length&&(e.imgByExhibitorId=await d()),s(),e.timeoutId=window.setTimeout(t,h)};clearTimeout(e.timeoutId),e.timeoutId=window.setTimeout(t,h)},[d,s]);return L(()=>{let t,i=!0;return(async()=>(e.all=N(k.advertised),e.imgByExhibitorId=await d(),i&&(s(),u(),r.wsStarted=!0,t=x(()=>r.screenSize,s))))(),()=>{i=!1,t?.(),clearInterval(e.timeoutId)}}),g(()=>n("section",{className:p("ws",{"efp-semi-transparent":r.setKioskModeEnabled}),ref:t=>e.el=t,onMouseOver:()=>clearInterval(e.timeoutId),onMouseOut:u,style:e.sectionStyle,children:n(S,{component:null,children:e.adv.map(t=>n(y,{timeout:500,nodeRef:t.nodeRef,children:n("a",{ref:t.nodeRef,href:`?${t.e.slug}`,className:"ws__exhibitor",style:{height:`${r.wsImageHeightPx}px`},onClick:i=>{i.preventDefault(),v(t.e),T.clickExhibitor(t.e)},children:n("img",{src:t.e.logo?.url,alt:t.e.name,crossOrigin:"anonymous"})})},t.key))})}))});export default()=>g(()=>r.wsShown?n(M,{}):null);
|
package/dist/esm/constants.d.ts
CHANGED
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
export declare const VISIBILITY_STORAGE_KEY = "___visibility";
|
|
2
|
-
export declare const PREVIEW_MODE_QUERY = "previewMode";
|
|
3
|
-
export declare const PREVIEW_MODE_STORAGE_KEY = "___preview_mode";
|
|
4
2
|
export declare const PREVIEW_MODE_ATTRIBUTE = "data-preview-mode";
|
|
5
3
|
export declare const BOOTHS_PAINTER_MARKER = "booths";
|
|
6
4
|
export declare const SEPARATOR = ":";
|
|
@@ -12,21 +10,19 @@ export declare const SET_KIOSK_KEY = "setkiosk";
|
|
|
12
10
|
export declare const BOOKMARK_PAINTER_MARKER = "booth-bookmark";
|
|
13
11
|
export declare const MAP_SETTINGS_KEY = "expofp-map-settings";
|
|
14
12
|
export declare const DEBUG_KEY = "debug";
|
|
15
|
-
export declare const DEBUG_STORAGE_KEY = "efp
|
|
13
|
+
export declare const DEBUG_STORAGE_KEY = "efp-debugMode";
|
|
16
14
|
export declare const DEFAULT_UNITS = "ft";
|
|
17
|
-
export declare const BUILD_ROUTE_KEY = "build-route";
|
|
18
|
-
export declare const PLANNER_KEY = "planner";
|
|
19
|
-
export declare const PLANNER_SOURCE_KEY = "source";
|
|
20
|
-
export declare const PLANNER_FROM_KEY = "from";
|
|
21
15
|
export declare const PATHWAY_KEY = "pathway";
|
|
22
16
|
export declare const CACHE_DURATION = 1000;
|
|
23
17
|
export declare const MOBILE_BREAKPOINT = 768;
|
|
24
|
-
export declare const LANG_KEY = "lang";
|
|
25
18
|
export declare const LANGUAGE_TYPE = "language";
|
|
26
|
-
export declare const UI_SCALE_PARAM_KEY = "uiscale";
|
|
27
|
-
export declare const UI_SCALE_RESET_PARAM_KEY = "resetuiscale";
|
|
28
|
-
export declare const UI_SCALE_STORAGE_KEY = "___ui-scale";
|
|
29
19
|
export declare const MAX_ROUTE_WAYPOINTS = 8;
|
|
20
|
+
export declare const VIEWER_MODE_STORAGE_KEY = "efp-viewerMode";
|
|
21
|
+
export declare const LEGACY_VIEWER_MODE_STORAGE_KEY = "___viewer_mode";
|
|
22
|
+
export declare const PREVIEW_MODE_STORAGE_KEY = "efp-previewMode";
|
|
23
|
+
export declare const LEGACY_PREVIEW_MODE_STORAGE_KEY = "___preview_mode";
|
|
24
|
+
export declare const UI_SCALE_STORAGE_KEY = "efp-uiScale";
|
|
25
|
+
export declare const LEGACY_UI_SCALE_STORAGE_KEY = "___ui-scale";
|
|
30
26
|
export declare const FONT_FACE = "--expofp-font-face";
|
|
31
27
|
export declare const FONT_WEIGHT_PRIMARY_BOOTH = "--expofp-booth-main-weight";
|
|
32
28
|
export declare const FONT_WEIGHT_SECONDARY_BOOTH = "--expofp-booth-details-weight";
|
|
@@ -34,6 +30,4 @@ export declare const FONT_WEIGHT_PRIMARY_EXHIBITOR = "--expofp-exhibitor-main-we
|
|
|
34
30
|
export declare const FONT_WEIGHT_SECONDARY_EXHIBITOR = "--expofp-exhibitor-details-weight";
|
|
35
31
|
export declare const FONT_WEIGHT_PRIMARY_SPECIAL = "--expofp-booth-special-weight";
|
|
36
32
|
export declare const ORIENTATION_GRANTED_KEY = "efp-compass-permission-granted";
|
|
37
|
-
export declare const VIEWER_MODE_QUERY = "viewermode";
|
|
38
|
-
export declare const VIEWER_MODE_STORAGE_KEY = "___viewer_mode";
|
|
39
33
|
//# sourceMappingURL=constants.d.ts.map
|
package/dist/esm/constants.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VISIBILITY_STORAGE_KEY="___visibility",
|
|
1
|
+
export const VISIBILITY_STORAGE_KEY="___visibility",PREVIEW_MODE_ATTRIBUTE="data-preview-mode",BOOTHS_PAINTER_MARKER="booths",SEPARATOR=":",LAYER_LOGOS_MARKER="logos",LAYER_ICONS_MARKER="icons",STRING_META_DELIMITER="$$",KIOSK_ENABLE_KEY="kiosk",SET_KIOSK_KEY="setkiosk",BOOKMARK_PAINTER_MARKER="booth-bookmark",MAP_SETTINGS_KEY="expofp-map-settings",DEBUG_KEY="debug",DEBUG_STORAGE_KEY="efp-debugMode",DEFAULT_UNITS="ft",PATHWAY_KEY="pathway",CACHE_DURATION=1e3,MOBILE_BREAKPOINT=768,LANGUAGE_TYPE="language",MAX_ROUTE_WAYPOINTS=8,VIEWER_MODE_STORAGE_KEY="efp-viewerMode",LEGACY_VIEWER_MODE_STORAGE_KEY="___viewer_mode",PREVIEW_MODE_STORAGE_KEY="efp-previewMode",LEGACY_PREVIEW_MODE_STORAGE_KEY="___preview_mode",UI_SCALE_STORAGE_KEY="efp-uiScale",LEGACY_UI_SCALE_STORAGE_KEY="___ui-scale",FONT_FACE="--expofp-font-face",FONT_WEIGHT_PRIMARY_BOOTH="--expofp-booth-main-weight",FONT_WEIGHT_SECONDARY_BOOTH="--expofp-booth-details-weight",FONT_WEIGHT_PRIMARY_EXHIBITOR="--expofp-exhibitor-main-weight",FONT_WEIGHT_SECONDARY_EXHIBITOR="--expofp-exhibitor-details-weight",FONT_WEIGHT_PRIMARY_SPECIAL="--expofp-booth-special-weight",ORIENTATION_GRANTED_KEY="efp-compass-permission-granted";
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { type FpPath, type FpSvgJs, type WfData } from '@expofp/schema';
|
|
2
|
+
/**
|
|
3
|
+
* Read access to the legacy drawing/wayfinding payloads behind the config's
|
|
4
|
+
* refs. The config carries only `$ref`s; `loadConfig` resolved the drawing
|
|
5
|
+
* (`fpSvgJsRef`) and the graph (`wfDataJsRef`) before the floorplan booted,
|
|
6
|
+
* and lazy layers are resolved on demand (`config-load-layer.ts`) — this
|
|
7
|
+
* module reads them all back synchronously from `@expofp/resolve`'s memo.
|
|
8
|
+
* Payloads settle with every asset URL already absolute (schema-aware
|
|
9
|
+
* resolution), so these are plain reads.
|
|
10
|
+
*
|
|
11
|
+
* The old `window.__fp<layerName>` alias lookups are gone: a layer name maps
|
|
12
|
+
* to its lazily-resolved payload, or to the eager drawing when it names the
|
|
13
|
+
* default layer (whose drawing IS `fp.svg.js`). Newer converters emit ONLY
|
|
14
|
+
* the layer-suffixed globals in layer files (`window['__fpBooth'] = …`), but
|
|
15
|
+
* the loader folds those onto the canonical `__fp`/`__fpPaths` keys when the
|
|
16
|
+
* payload resolves (`normalizeFpSvgLayerAliases`, `@expofp/config`) — so
|
|
17
|
+
* these reads see one canonical shape from either converter generation.
|
|
18
|
+
*/
|
|
19
|
+
/** The eagerly-resolved `fp.svg.js` payload (drawing + plan-wide metadata). */
|
|
20
|
+
export declare function getFpSvgJs(): FpSvgJs;
|
|
21
|
+
/** One layer's SVG document (`''` = the default drawing), asset hrefs resolved. */
|
|
22
|
+
export declare function getFpSvg(layerName?: string): string | undefined;
|
|
23
|
+
/** One layer's triangulated meshes (`''` = the default drawing). */
|
|
24
|
+
export declare function getFpPaths(layerName?: string): FpPath[] | undefined;
|
|
25
|
+
/** The wayfinding graph; `null` while unloaded or when the plan has none. */
|
|
26
|
+
export declare function getWfData(): WfData | null;
|
|
27
|
+
//# sourceMappingURL=fp-payloads.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{getConfig as f}from"@expofp/config";import{getResolved as n,isResolved as o}from"@expofp/resolve";export function getFpSvgJs(){const t=f().fpSvgJsRef;if(!t)throw new Error("No drawing in the config (fpSvgJsRef is not set)");return n(t)}function i(t){const e=f().fpSvgLayerJsRefs[t];if(e&&o(e))return n(e);const r=getFpSvgJs();if(t===""||t===r.__fpDefaultLayer)return r}export function getFpSvg(t=""){return i(t)?.__fp}export function getFpPaths(t=""){return i(t)?.__fpPaths}export function getWfData(){const t=f().wfDataJsRef;return!t||!o(t)?null:n(t).__wfData??null}
|
package/dist/esm/data/fpGeo.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const fpGeo=
|
|
1
|
+
import{getFpSvgJs as o}from"./fp-payloads";export const fpGeo=o().__fpGeo;
|
package/dist/esm/data/index.d.ts
CHANGED
|
@@ -1,4 +1,10 @@
|
|
|
1
|
-
import { type
|
|
2
|
-
|
|
1
|
+
import { type Config } from '@expofp/config';
|
|
2
|
+
/**
|
|
3
|
+
* The event data document, read straight off the active config — the merged,
|
|
4
|
+
* asset-resolved, normalized and frozen copy `loadConfig` produced (it carries
|
|
5
|
+
* every legacy `data.js` field; `window.__data` is gone). This module only
|
|
6
|
+
* loads inside the floorplan chunk, after `load()` has called `setConfig`.
|
|
7
|
+
*/
|
|
8
|
+
declare const data: Config;
|
|
3
9
|
export default data;
|
|
4
10
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/esm/data/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import t
|
|
1
|
+
import{getConfig as t}from"@expofp/config";const o=t();export default o;
|
package/dist/esm/data/svg.d.ts
CHANGED
|
@@ -9,6 +9,9 @@ declare let floors: {
|
|
|
9
9
|
}[];
|
|
10
10
|
export { floors, svgArea, svgAreaExplicit, svgViewBox };
|
|
11
11
|
export declare function getTrianglesFromFpPaths(index: number, suffix: string): number[][][];
|
|
12
|
-
export declare let gtePathByIndex: (index: number, suffix?: string) =>
|
|
12
|
+
export declare let gtePathByIndex: (index: number, suffix?: string) => {
|
|
13
|
+
positions: [number, number, (number | undefined)?][];
|
|
14
|
+
cells: [number, number, number][];
|
|
15
|
+
};
|
|
13
16
|
export declare let getLayerSvg: (layer?: Layer | string) => SVGElement;
|
|
14
17
|
//# sourceMappingURL=svg.d.ts.map
|
package/dist/esm/data/svg.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Box as
|
|
1
|
+
import{getFpPaths as x,getFpSvg as a,getFpSvgJs as M,getWfData as E}from"./fp-payloads";import{Box as h}from"@expofp/geometry";import*as c from"d3-selection";import{STRING_META_DELIMITER as b}from"../constants";import A from"../tools/logger";import _ from"../tools/settings";import{extractMetaFromString as P}from"../utils/extractMetaFromString";import V from".";const n=new Map;function p(e,r=""){if(n.has(r))return n.get(r);const s=new DOMParser().parseFromString(e,"image/svg+xml").documentElement;s.firstChild.tagName==="parsererror"&&A.error("Parsed svg with error: ",l);const i=new Map;return c.select(s).selectAll("style").each(function(){const t=this.textContent,S=/\.([a-z0-9.]+)\s*{[^}]*fill\s*:\s*([^};]+);[^}]*}/gi;let v;for(;(v=S.exec(t))!==null;){const B=v[1],F=v[2];i.set(B,F)}}),c.select(s).selectAll("*[class]").each(function(){const t=this;t.style.fill=i.get(t.className.baseVal)}),N(s),n.set(r,s),s}let l=p(a());const m=M().__viewbox,d=c.select(l).select("rect#VIEWBOX").node(),u=l.viewBox.baseVal,g=new h(u.x,u.y,u.width,u.height);let f,w=!1;m?(f=new h(m.x,m.y,m.width,m.height),w=!0,d?.remove()):d?(f=h.fromSvg(d),w=!0,d.remove()):f=g.scale(1.1),c.select(l).attr("width",g.size.width),c.select(l).attr("height",g.size.height),A.log("svgArea",f,"svgViewBox",g),_.wayfinding=!!(!V.hideDirections&&E());let I=M().__fpLayersMode?c.select(l).selectAll("[data-floor]").nodes().map(e=>(e.remove(),{name:e.dataset.floor,rect:h.fromSvg(e)})).sort():[];export{I as floors,f as svgArea,w as svgAreaExplicit,g as svgViewBox};export function getTrianglesFromFpPaths(e,r){const o=gtePathByIndex(e,r),s=o.positions.map(t=>[t[0],Math.abs(t[1])]),i=[];for(const t of o.cells)i.push([s[t[0]],s[t[1]],s[t[2]]]);return i}export let gtePathByIndex=(e,r="")=>(x(r)??x())[e],getLayerSvg=(e="")=>typeof e=="string"?n.has(e)?n.get(e):a(e)?p(a(e),e):n.get(""):e.rootParent?n.has(e.rootParent.name)?n.get(e.rootParent.name):a(e.rootParent.name)?p(a(e.rootParent.name),e.rootParent.name):n.get(""):a(e.name)?p(a(e.name),e.name):n.get("");function N(e){c.select(e).selectAll("[id], [data-name]").each(function(){const r=this;let o={};const s=r.getAttribute("data-name");if(s&&s.includes(b)){const{meta:t}=P(s);o={...o,...t}}const i=r.getAttribute("id");if(i&&i.includes(b)){const{meta:t}=P(i);o={...o,...t}}r.setAttribute("data-meta",JSON.stringify(o))})}
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
+
import { type Consent } from '@expofp/config';
|
|
2
|
+
import { type Camera, type ListPanel, type PlannerOptions } from '@expofp/schema';
|
|
1
3
|
import type { CurrentPosition, MarkersData } from './store/RouteStore';
|
|
2
4
|
import type { Visibility } from './store/types';
|
|
3
5
|
import type { FloorPlan, FloorPlanCustomButtonEvent, FloorPlanDetailsEvent, FloorPlanGetCoordsEvent, FloorPlanMarkerEvent, FloorPlanOptions, GeoConfig } from './types';
|
|
4
6
|
import { type Bounds, type POISelectors } from './types/sdk.types';
|
|
5
7
|
export default class FloorPlanLoader implements FloorPlan {
|
|
6
|
-
protected readonly options: FloorPlanOptions;
|
|
7
8
|
protected readonly renderTarget: HTMLDivElement;
|
|
8
9
|
private readonly _ready;
|
|
9
10
|
readonly element: HTMLDivElement;
|
|
10
11
|
readonly eventId: string;
|
|
11
|
-
readonly dataUrl: string;
|
|
12
12
|
readonly noOverlay: boolean;
|
|
13
13
|
readonly offHistory: boolean;
|
|
14
14
|
readonly ignoreQuery: boolean;
|
|
15
|
-
readonly
|
|
15
|
+
protected readonly consent: Consent;
|
|
16
16
|
readonly onInit: (fp: FloorPlan) => void;
|
|
17
17
|
readonly disableRuntimeAlerts: boolean;
|
|
18
18
|
readonly viewerMode: boolean;
|
|
@@ -24,6 +24,8 @@ export default class FloorPlanLoader implements FloorPlan {
|
|
|
24
24
|
alwaysShowSidebar: boolean;
|
|
25
25
|
get ready(): Promise<void>;
|
|
26
26
|
get previewMode(): boolean;
|
|
27
|
+
/** @deprecated The consent decision lives on the config — set the `consent` option instead. */
|
|
28
|
+
get allowConsent(): boolean | undefined;
|
|
27
29
|
onBoothClick: (e: FloorPlanBoothClickEvent) => void;
|
|
28
30
|
onBookmarkClick: (e: FloorPlanBookmarkClickEvent) => void;
|
|
29
31
|
onVisitedClick: (e: FloorPlanVisitedClickEvent) => void;
|
|
@@ -66,6 +68,11 @@ export default class FloorPlanLoader implements FloorPlan {
|
|
|
66
68
|
boothsList(): any;
|
|
67
69
|
categoriesList(): any;
|
|
68
70
|
selectCategory(nameOrSlug?: string): void;
|
|
71
|
+
select(slugOrExternalId: string): void;
|
|
72
|
+
showList(list: ListPanel): void;
|
|
73
|
+
selectTour(tourId: string): void;
|
|
74
|
+
openPlanner(options?: PlannerOptions): void;
|
|
75
|
+
startBuildRoute(): void;
|
|
69
76
|
getVisibility(): any;
|
|
70
77
|
setVisibility(visibility: Visibility): void;
|
|
71
78
|
findLocation(): void;
|
|
@@ -75,6 +82,8 @@ export default class FloorPlanLoader implements FloorPlan {
|
|
|
75
82
|
padding?: number;
|
|
76
83
|
}): void;
|
|
77
84
|
switchView(): void;
|
|
85
|
+
setCamera(camera: Camera): void;
|
|
86
|
+
getCamera(): Camera;
|
|
78
87
|
fitBounds(): void;
|
|
79
88
|
getBounds(selectors: POISelectors): Bounds | undefined;
|
|
80
89
|
getBoothRect(name: string): any;
|
|
@@ -105,6 +114,6 @@ export default class FloorPlanLoader implements FloorPlan {
|
|
|
105
114
|
deselectRoute(): void;
|
|
106
115
|
reset(): void;
|
|
107
116
|
selectAccessibleRoute(waypoints: RouteWaypoint[]): void;
|
|
108
|
-
constructor(options
|
|
117
|
+
constructor(options: FloorPlanOptions, element: HTMLDivElement);
|
|
109
118
|
}
|
|
110
119
|
//# sourceMappingURL=floorplan.loader.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{PREVIEW_MODE_ATTRIBUTE as
|
|
1
|
+
import{getConfig as v}from"@expofp/config";import{PREVIEW_MODE_ATTRIBUTE as D}from"./constants";import c from"./tools/base-runtime-url";import{loadCss as R,loadFont as p}from"./tools/loaders";import x from"./tools/logger";import{initSentry as T}from"./tools/sentry";import{heatmapEnabled as F}from"./utils/heatmap-enabled";import{initI18n as j}from"./utils/i18n";import A from"./utils/is-debug";import V from"./utils/is-localhost";import _ from"./utils/is-webview";import{loadCustomCss as H}from"./utils/loadCustomCss";import{loadIcons as z}from"./utils/loadIcons";import E from"./utils/use-shadow";function e(){throw new Error("FloorPlan not ready")}export default class G{renderTarget;_ready;element;eventId;noOverlay;offHistory;ignoreQuery;consent;onInit;disableRuntimeAlerts;viewerMode;maplibre;efpStyleLoadHandler;resolveReady;icons=new Map;enableRotation=!0;alwaysShowSidebar=!1;get ready(){return this._ready}get previewMode(){return v().previewMode||this.element.hasAttribute(D)}get allowConsent(){return this.consent==="ask"?void 0:this.consent==="granted"}onBoothClick;onBookmarkClick;onVisitedClick;onCategoryClick;onFpConfigured;onDirection;onDetails;onExhibitorCustomButtonClick;onGetCoordsClick;onMarkerClick;onLeaveEvent;selectBooth(t){e()}selectExhibitor(t){e()}selectRoute(t,i){e()}getOptimizedRoutes(t){e()}selectCurrentPosition(t,i,n){e()}setBookmarks(t){e()}setEntitiesBookmarks(t){e()}setEntitiesVisited(t){e()}setMarkers(t){e()}updateLayerVisibility(t,i){e()}getCenterCoordinates(){e()}applyParameters(t){e()}exhibitorsList(){e()}boothsList(){e()}categoriesList(){e()}selectCategory(t){e()}select(t){e()}showList(t){e()}selectTour(t){e()}openPlanner(t){e()}startBuildRoute(){e()}getVisibility(){e()}setVisibility(t){e()}findLocation(){e()}zoomIn(){e()}zoomOut(){e()}zoomTo(t,i){e()}switchView(){e()}setCamera(t){e()}getCamera(){e()}fitBounds(){e()}getBounds(t){e()}getBoothRect(t){e()}convertToGeo(t,i){e()}getGeoConfig(){e()}unstable_destroy(){e()}highlightExhibitors(t){e()}highlightBooths(t){e()}onCurrentPositionChanged(t){e()}search(t){e()}getFloors(){e()}onFloorActivated(t){e()}activateFloor(t){e()}showPathway(t,i){e()}showPathwayOnly(t,i){e()}hidePathways(){e()}showSearch(){e()}changeLanguage(t){e()}isGpsTrackingEnabled(){e()}setGpsTrackingEnabled(t){e()}deselectCurrentPosition(){e()}deselectRoute(){e()}reset(){e()}selectAccessibleRoute(t){e()}constructor(t,i){const n=v();if(this.noOverlay=!!n.noOverlay,this.offHistory=!!n.offHistory,this.ignoreQuery=n.ignoreQuery,this.consent=n.consent,this.consent==="ask"&&(_?this.consent="granted":V&&!A&&(this.consent="denied")),this.onBoothClick=t.onBoothClick,this.onBookmarkClick=t.onBookmarkClick,this.onVisitedClick=t.onVisitedClick,this.onCategoryClick=t.onCategoryClick,this.onDetails=t.onDetails,this.onExhibitorCustomButtonClick=t.onExhibitorCustomButtonClick,this.onGetCoordsClick=t.onGetCoordsClick,this.onMarkerClick=t.onMarkerClick,this.onFpConfigured=t.onFpConfigured,this.onDirection=t.onDirection,this.onInit=t.onInit,this.onCurrentPositionChanged=t.onCurrentPositionChanged,this.onFloorActivated=t.onFloorActivated,this.onLeaveEvent=t.onLeaveEvent,this.viewerMode=!!n.viewerMode,this.disableRuntimeAlerts=n.disableRuntimeAlerts,this.maplibre=n.maplibre,window.__efpMaplibre=n.maplibre,this._ready=new Promise((d,r)=>{this.resolveReady=d}),this.element=i,i.__expofp)throw new Error("Element already in use");i.__expofp=this;const y=n.expo;T({eventId:y||"",isWebview:_}),this.eventId=y,window.__efpEvent=y,window.__efpElement=i;const h=document.createElement("div");h.style.height="100%",h.style.width="100%",i.appendChild(h);let s;if(E){s=h.attachShadow({mode:"open"});const d=s,r=document;d.createElement=(...a)=>r.createElement(...a),d.createElementNS=(...a)=>r.createElementNS(...a),d.createTextNode=(...a)=>r.createTextNode(...a)}else s=h;const f=document.createElement("div");f.style.height="100%",f.style.width="100%",s.appendChild(f),E&&Object.defineProperty(f,"ownerDocument",{value:s}),window.__efpShadowDOMStyleParent=E?s:void 0,this.renderTarget=f,x.log("Instantiating ExpoFP floorplan",i,y);let k=0;this.efpStyleLoadHandler=function(d){const r=window.__efpStyleElements;for(;k<r.length;){const a=r[k];s.appendChild(a),k++}},window.addEventListener("__efpStyleLoad",this.efpStyleLoadHandler);const g=this;(async function(){const r=v();await j();const a=new URLSearchParams(window.location.search);let m,w;if(r?.trackerUrl)try{m=new URL(r.trackerUrl),w=m.searchParams.get("expoId")}catch(o){console.error(o)}const I=async o=>{if(!m||!w)return Promise.reject(new Error("trackerUrl or expoId is missing"));const l=new URL(o.dataUrl,m.origin),u=await fetch(l.toString(),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({expoId:w,token:decodeURIComponent(a.get("t"))})});let C=[];u.ok&&(C=(await u.json()).map(o.dataMapper)),window.__heatmapDataYah={yah:C}},b=r?.heatmap??{},S=F(b)||a.get("heatmap")==="true",O=b.variant==="yah"||a.get("type")==="yah",L=b.kiosk===!0||a.get("subtype")==="kiosk";if(S)try{if(O)L?await I({dataUrl:"/api/kiosks/list/viewer",dataMapper:o=>({...o,id:o.key,name:`Kiosk ${o.key}`})}):await I({dataUrl:"/api/v1/you-are-here/qr-code/list/viewer",dataMapper:(o,l)=>({...o,name:`QR Code #${l+1}`})});else{const o=new URL("/api/fp-stats/get",m.origin);o.searchParams.set("expoId",w),o.searchParams.set("type","booview"),o.searchParams.set("t",decodeURIComponent(a.get("t")));const l=new URL("api/fp-stats/get",m.origin);l.searchParams.set("expoId",w),l.searchParams.set("type","exview"),l.searchParams.set("t",decodeURIComponent(a.get("t")));const[u,C]=await Promise.all([fetch(o.toString()),fetch(l.toString())]),[P,M]=await Promise.all([u.json(),C.json()]);window.__heatmapData={booths:P,exhibitors:M}}}catch(o){console.error("Heatmap: Initialization error",o)}const U=[R(c+"vendor/sanitize-css/sanitize.css",s),R(c+"vendor/perfect-scrollbar/css/perfect-scrollbar.css",s),p("Oswald",c+"fonts/oswald-v17-cyrillic_latin-300.woff",{weight:300}),p("Oswald",c+"fonts/oswald-v17-cyrillic_latin-500.woff",{weight:500}),p("Inter",c+"fonts/inter-400.woff2",{weight:400}),p("Inter",c+"fonts/inter-500.woff2",{weight:500}),p("Inter",c+"fonts/inter-600.woff2",{weight:600}),p("efp-symbols",c+"fonts/efp-symbols.woff",{weight:400}),H(r,s),z(g.icons)];await Promise.all(U),g.enableRotation=r?.enableRotation??!1,g.alwaysShowSidebar=r?.alwaysShowSidebar??!1,x.log("Data loaded"),window.__storeInitAllowed=!0;const{default:B}=await import("./floorplan.ready");for(document.querySelectorAll(".expofp-floorplan-loader").forEach(o=>o.remove());i.firstChild&&i.firstChild!==h;)i.removeChild(i.firstChild);Object.setPrototypeOf(g,B.prototype).init()})()}}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Box } from '@expofp/geometry';
|
|
2
|
+
import { type Camera, type ListPanel, type PlannerOptions } from '@expofp/schema';
|
|
2
3
|
import { createRoot } from 'react-dom/client';
|
|
3
4
|
import FloorPlanLoader from './floorplan.loader';
|
|
4
5
|
import { CurrentPosition, MarkersData } from './store/RouteStore';
|
|
@@ -48,6 +49,11 @@ export default class FloorPlanReady extends FloorPlanLoader {
|
|
|
48
49
|
boothsList(): FloorPlanBooth[];
|
|
49
50
|
categoriesList(): FloorPlanCategory[];
|
|
50
51
|
selectCategory(nameOrSlug?: string): void;
|
|
52
|
+
select(slugOrExternalId: string): void;
|
|
53
|
+
showList(list: ListPanel): void;
|
|
54
|
+
selectTour(tourId: string): void;
|
|
55
|
+
openPlanner(options?: PlannerOptions): void;
|
|
56
|
+
startBuildRoute(): void;
|
|
51
57
|
applyParameters(queryRaw: string): void;
|
|
52
58
|
getVisibility(): Visibility;
|
|
53
59
|
setVisibility(visibility: Visibility): void;
|
|
@@ -55,6 +61,8 @@ export default class FloorPlanReady extends FloorPlanLoader {
|
|
|
55
61
|
zoomIn(): void;
|
|
56
62
|
zoomOut(): void;
|
|
57
63
|
switchView(): void;
|
|
64
|
+
setCamera(camera: Camera): void;
|
|
65
|
+
getCamera(): Camera;
|
|
58
66
|
zoomTo(selectors: POISelectors, options?: {
|
|
59
67
|
padding?: number;
|
|
60
68
|
}): void;
|