@expofp/floorplan 3.13.4 → 3.14.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.
Files changed (80) hide show
  1. package/dist/browser/{Button-Di2ct8As.js → Button-D86HCanw.js} +5 -5
  2. package/dist/browser/{CookieConsent-CzE7xqru.js → CookieConsent-Bpm65jGz.js} +7 -7
  3. package/dist/browser/{Debug-BsFpCwAP.js → Debug-2bqwoFoW.js} +7 -7
  4. package/dist/browser/{Demo-CUBUALkV.js → Demo-BCxCzqf7.js} +9 -9
  5. package/dist/browser/Free-CeHNCGhR.js +68 -0
  6. package/dist/browser/{Gallery-BseorZVt.js → Gallery-C9_KIrgq.js} +9 -9
  7. package/dist/browser/{GpsLoader-CEqhVKuQ.js → GpsLoader-Cfl0pC1Z.js} +10 -10
  8. package/dist/browser/{KioskStore-CkjO0Hfm.js → KioskStore-Bgav3LFy.js} +3 -3
  9. package/dist/browser/{MaplibreAdapter-Cv3TA80a.js → MaplibreAdapter-C2XCg1ST.js} +2019 -2002
  10. package/dist/browser/{ModalContainer-DBzlfN-T.js → ModalContainer-Dcf7Fdqe.js} +10 -10
  11. package/dist/browser/{PermissionNotice-B07dAoJS.js → PermissionNotice-Dp771RtS.js} +6 -6
  12. package/dist/browser/{SetKioskMode-Bx1kz1kp.js → SetKioskMode-8668ova8.js} +8 -8
  13. package/dist/browser/{ShowKiosk-B7-iTNeI.js → ShowKiosk-CX02s0Hr.js} +11 -11
  14. package/dist/browser/{TouchHand-Bnn5MVhC.js → TouchHand-BJ0QVfng.js} +4 -4
  15. package/dist/browser/{ViewerMenuPanel-CXUBz4Wo.js → ViewerMenuPanel-DsYOnKLe.js} +9 -9
  16. package/dist/browser/{add-debug-secret-listener-BNYotAb-.js → add-debug-secret-listener-Djj9d8YJ.js} +1 -1
  17. package/dist/browser/{adopt-global-settings-4U11MsDW.js → adopt-global-settings-B3Nanhji.js} +9 -9
  18. package/dist/browser/{boolean-editor-CHApWCH1.js → boolean-editor-PKgRiLKf.js} +9 -9
  19. package/dist/browser/{bootIntercom-DxJQ9eFU.js → bootIntercom-BtDa_M2P.js} +2 -2
  20. package/dist/browser/{booth-by-xy-BLVVwNtj.js → booth-by-xy-45Jul1QY.js} +6 -6
  21. package/dist/browser/bundle.json +65 -65
  22. package/dist/browser/{classnames-DyPh2wWH.js → classnames-CLWWhTKJ.js} +2 -2
  23. package/dist/browser/{client-VtpPft-k.js → client-Xkcfy29b.js} +4 -4
  24. package/dist/browser/{components-pEqQBzpb.js → components-D24V8QOz.js} +44 -43
  25. package/dist/browser/{debug-overlay-BIIG939X.js → debug-overlay-Ddw3EVOv.js} +10 -10
  26. package/dist/browser/{debug-ui-Dd-aHSgD.js → debug-ui-B5Vq_Sfp.js} +6 -6
  27. package/dist/browser/{dist-B--b6-sL.js → dist-BAqsZuBv.js} +6 -6
  28. package/dist/browser/{dist-B-7AJaNA.js → dist-CevpSidK.js} +3 -3
  29. package/dist/browser/{dist-qa-F0eMk.js → dist-OFV2Jli_.js} +5 -5
  30. package/dist/browser/{efp-debug-init-Bzf4T8Xx.js → efp-debug-init-BlbXVgH7.js} +3 -3
  31. package/dist/browser/{enum-editor-DC0RIYSE.js → enum-editor-BxASWi_4.js} +4 -4
  32. package/dist/browser/{es5-DQ8JOeDN.js → es5-Z_wRAzDj.js} +2 -2
  33. package/dist/browser/{event-not-found-BKJBsZXi.js → event-not-found-BZ1rS6Ju.js} +1 -1
  34. package/dist/browser/{exports-6X24q5_8.js → exports-D45VeQF_.js} +1 -1
  35. package/dist/browser/{favicon-DxFo6cG6.js → favicon-YyO5OGhO.js} +1 -1
  36. package/dist/browser/{fetch-retry.umd-DbPKc93r.js → fetch-retry.umd-Bl7USHRH.js} +2 -2
  37. package/dist/browser/{flex-D7Rgw10G.js → flex-D4UPmbia.js} +5 -5
  38. package/dist/browser/{floorplan.loader-DWmxY4b8.js → floorplan.loader-BXsvHx-p.js} +10 -10
  39. package/dist/browser/{floorplan.ready-BBeRJMyN.js → floorplan.ready-CJoJBabr.js} +14 -14
  40. package/dist/browser/{fuse-CMjVlF0N.js → fuse-9yZmbT4s.js} +2 -2
  41. package/dist/browser/{i18n-xqAQbHAE.js → i18n-DPEJ2THs.js} +1038 -1037
  42. package/dist/browser/index.js +14 -14
  43. package/dist/browser/{index.module-Cow3RO4I.js → index.module-DHLcTsCW.js} +4 -4
  44. package/dist/browser/{integrateKiosk-GhnQowhu.js → integrateKiosk-Cc4MwmWT.js} +3 -3
  45. package/dist/browser/{is-webview-BL3sbVlT.js → is-webview-uzNL-0ik.js} +1 -1
  46. package/dist/browser/{jsx-runtime-1kuNv2jo.js → jsx-runtime-tyQxeA_u.js} +2 -2
  47. package/dist/browser/{lib-KmlWWpxs.js → lib-UXcMoio-.js} +3 -3
  48. package/dist/browser/{loadImage-OQCwDcXc.js → loadImage-CYgOta-k.js} +4 -4
  49. package/dist/browser/{logDeviceInfo-C4CqLCSB.js → logDeviceInfo-zFXqsyBa.js} +9 -9
  50. package/dist/browser/{main-lSz23rgB.js → main-DvOSht2-.js} +1 -1
  51. package/dist/browser/{mobx-Juv7YSNw.js → mobx-D9TGcLGA.js} +4 -4
  52. package/dist/browser/{optional-boolean-editor-Bzfn3FDz.js → optional-boolean-editor-B5JaTy9C.js} +3 -3
  53. package/dist/browser/{optional-enum-editor-C46BK0zF.js → optional-enum-editor-Bfqar794.js} +4 -4
  54. package/dist/browser/{optional-string-editor-77_tZQLr.js → optional-string-editor-Fx4xKx3o.js} +4 -4
  55. package/dist/browser/{particles.min-vy3ld3Rh.js → particles.min-BkmBviEA.js} +2 -2
  56. package/dist/browser/{react-dom--ZXNmyjd.js → react-dom-B_2qbNcY.js} +3 -3
  57. package/dist/browser/{react-DTFJ9F0z.js → react-rrDmeRcN.js} +2 -2
  58. package/dist/browser/{rolldown-runtime-DKhEBWux.js → rolldown-runtime-6-_Y0Haw.js} +1 -1
  59. package/dist/browser/{select-BSCoOOKF.js → select-BS5i9w7h.js} +10 -10
  60. package/dist/browser/{settings-COo-V6uV.js → settings-BXf1FL6v.js} +2 -2
  61. package/dist/browser/{settings-item-twkhiQs1.js → settings-item-DeGrnzNy.js} +6 -6
  62. package/dist/browser/{store-7Bfkwa8d.js → store-BkZ6zMrR.js} +6062 -6059
  63. package/dist/browser/{string-editor-D3_ZBuje.js → string-editor-B944rLGu.js} +4 -4
  64. package/dist/browser/{text-field-BlFx76b3.js → text-field-xHB57Mso.js} +5 -5
  65. package/dist/browser/{theme-Cdr_JTu6.js → theme-CpJdZqMD.js} +8 -8
  66. package/dist/browser/{ui-DsnmvJHp.js → ui-B3Zun-mt.js} +8 -8
  67. package/dist/browser/{useRenderTarget-CqTbZKLS.js → useRenderTarget-ChcXFhUj.js} +4 -4
  68. package/dist/esm/components/Maplibre/utils/map-helpers.d.ts +3 -2
  69. package/dist/esm/components/Maplibre/utils/map-helpers.js +1 -1
  70. package/dist/esm/components/Maplibre/utils/map-theme.d.ts +20 -0
  71. package/dist/esm/components/Maplibre/utils/map-theme.js +1 -0
  72. package/dist/esm/data/fpGeo.d.ts +11 -4
  73. package/dist/esm/data/fpGeo.js +1 -1
  74. package/dist/esm/store/RoutePlannerStore.d.ts +2 -4
  75. package/dist/esm/store/RoutePlannerStore.js +1 -1
  76. package/dist/esm/tools/settings.d.ts +2 -2
  77. package/dist/esm/tools/settings.js +1 -1
  78. package/dist/esm/ui/Autocomplete/Autocomplete.js +1 -1
  79. package/package.json +8 -8
  80. package/dist/browser/Free-CeVCkK7q.js +0 -68
@@ -1,14 +1,14 @@
1
1
  (function() {
2
2
  try {
3
3
  var e = typeof window < "u" ? window : typeof global < "u" ? global : typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : {};
4
- e.SENTRY_RELEASE = { id: "3.13.4" };
4
+ e.SENTRY_RELEASE = { id: "3.14.0" };
5
5
  var t = new e.Error().stack;
6
6
  t && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[t] = "0a67f4c1-0ef6-428f-92c6-94c57178bf21", e._sentryDebugIdIdentifier = "sentry-dbid-0a67f4c1-0ef6-428f-92c6-94c57178bf21");
7
7
  } catch {}
8
8
  })();
9
- import { t as e } from "./jsx-runtime-1kuNv2jo.js";
10
- import { t } from "./settings-item-twkhiQs1.js";
11
- import { t as n } from "./text-field-BlFx76b3.js";
9
+ import { t as e } from "./jsx-runtime-tyQxeA_u.js";
10
+ import { t } from "./settings-item-DeGrnzNy.js";
11
+ import { t as n } from "./text-field-xHB57Mso.js";
12
12
  //#region ../debug/src/lib/ui/string-editor.tsx
13
13
  var r = e(), i = (e) => {
14
14
  var i;
@@ -1,15 +1,15 @@
1
1
  (function() {
2
2
  try {
3
3
  var e = typeof window < "u" ? window : typeof global < "u" ? global : typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : {};
4
- e.SENTRY_RELEASE = { id: "3.13.4" };
4
+ e.SENTRY_RELEASE = { id: "3.14.0" };
5
5
  var t = new e.Error().stack;
6
6
  t && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[t] = "9c5a0877-c176-4e2d-b51c-123d50ab2b3c", e._sentryDebugIdIdentifier = "sentry-dbid-9c5a0877-c176-4e2d-b51c-123d50ab2b3c");
7
7
  } catch {}
8
8
  })();
9
- import { r as e } from "./rolldown-runtime-DKhEBWux.js";
10
- import { t } from "./react-DTFJ9F0z.js";
11
- import { D as n, i as r, l as i, n as a, s as o, u as s, y as c } from "./flex-D7Rgw10G.js";
12
- import { t as l } from "./classnames-DyPh2wWH.js";
9
+ import { r as e } from "./rolldown-runtime-6-_Y0Haw.js";
10
+ import { t } from "./react-rrDmeRcN.js";
11
+ import { D as n, i as r, l as i, n as a, s as o, u as s, y as c } from "./flex-D4UPmbia.js";
12
+ import { t as l } from "./classnames-CLWWhTKJ.js";
13
13
  //#region ../../node_modules/.pnpm/@radix-ui+themes@3.3.0_@types+react-dom@19.2.3_@types+react@19.2.17__@types+react@19.2._5ea800d4e947acedb1fa1275f1697b17/node_modules/@radix-ui/themes/dist/esm/components/text-field.props.js
14
14
  var u = /* @__PURE__ */ e(t()), d = /* @__PURE__ */ e(l()), f = {
15
15
  size: {
@@ -1,18 +1,18 @@
1
1
  (function() {
2
2
  try {
3
3
  var e = typeof window < "u" ? window : typeof global < "u" ? global : typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : {};
4
- e.SENTRY_RELEASE = { id: "3.13.4" };
4
+ e.SENTRY_RELEASE = { id: "3.14.0" };
5
5
  var t = new e.Error().stack;
6
6
  t && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[t] = "f658045a-5be7-4ea4-a4b2-ddea9ab9caf3", e._sentryDebugIdIdentifier = "sentry-dbid-f658045a-5be7-4ea4-a4b2-ddea9ab9caf3");
7
7
  } catch {}
8
8
  })();
9
- import { r as e } from "./rolldown-runtime-DKhEBWux.js";
10
- import { t } from "./react-DTFJ9F0z.js";
11
- import { t as n } from "./jsx-runtime-1kuNv2jo.js";
12
- import { t as r } from "./react-dom--ZXNmyjd.js";
13
- import { C as i, E as a, O as o, T as s, _ as c, o as l, v as u, w as d } from "./flex-D7Rgw10G.js";
14
- import { c as f, i as p, n as m, o as h, r as g, s as _, t as v } from "./dist-B--b6-sL.js";
15
- import { t as y } from "./classnames-DyPh2wWH.js";
9
+ import { r as e } from "./rolldown-runtime-6-_Y0Haw.js";
10
+ import { t } from "./react-rrDmeRcN.js";
11
+ import { t as n } from "./jsx-runtime-tyQxeA_u.js";
12
+ import { t as r } from "./react-dom-B_2qbNcY.js";
13
+ import { C as i, E as a, O as o, T as s, _ as c, o as l, v as u, w as d } from "./flex-D4UPmbia.js";
14
+ import { c as f, i as p, n as m, o as h, r as g, s as _, t as v } from "./dist-BAqsZuBv.js";
15
+ import { t as y } from "./classnames-CLWWhTKJ.js";
16
16
  //#region ../../node_modules/.pnpm/@radix-ui+react-visually-hidden@1.2.3_@types+react-dom@19.2.3_@types+react@19.2.17__@ty_cffccd7838985066e8e1d993b5cb6017/node_modules/@radix-ui/react-visually-hidden/dist/index.mjs
17
17
  var b = /* @__PURE__ */ e(r(), 1), x = /* @__PURE__ */ e(t(), 1), S = n(), C = Object.freeze({
18
18
  position: "absolute",
@@ -1,17 +1,17 @@
1
1
  (function() {
2
2
  try {
3
3
  var e = typeof window < "u" ? window : typeof global < "u" ? global : typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : {};
4
- e.SENTRY_RELEASE = { id: "3.13.4" };
4
+ e.SENTRY_RELEASE = { id: "3.14.0" };
5
5
  var t = new e.Error().stack;
6
6
  t && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[t] = "3c34ab8b-5d65-4c06-8595-6ed371acabc5", e._sentryDebugIdIdentifier = "sentry-dbid-3c34ab8b-5d65-4c06-8595-6ed371acabc5");
7
7
  } catch {}
8
8
  })();
9
- import { r as e } from "./rolldown-runtime-DKhEBWux.js";
10
- import { a as t, i as n, s as r } from "./efp-debug-init-Bzf4T8Xx.js";
11
- import { a as i, i as a } from "./adopt-global-settings-4U11MsDW.js";
12
- import { t as o } from "./jsx-runtime-1kuNv2jo.js";
13
- import "./settings-COo-V6uV.js";
14
- import { t as s } from "./add-debug-secret-listener-BNYotAb-.js";
9
+ import { r as e } from "./rolldown-runtime-6-_Y0Haw.js";
10
+ import { a as t, i as n, s as r } from "./efp-debug-init-BlbXVgH7.js";
11
+ import { a as i, i as a } from "./adopt-global-settings-B3Nanhji.js";
12
+ import { t as o } from "./jsx-runtime-tyQxeA_u.js";
13
+ import "./settings-BXf1FL6v.js";
14
+ import { t as s } from "./add-debug-secret-listener-Djj9d8YJ.js";
15
15
  //#region ../debug/src/lib/ui/render-debug-ui.tsx
16
16
  var c = /* @__PURE__ */ e(r(), 1), l = o(), u = !1;
17
17
  function d() {
@@ -26,7 +26,7 @@ function d() {
26
26
  }
27
27
  });
28
28
  let o = async (t) => {
29
- let { DebugUi: n } = await import("./debug-ui-Dd-aHSgD.js"), { createRoot: i } = await import("./client-VtpPft-k.js").then((t) => /* @__PURE__ */ e(t.default, 1)), a = document.createElement("div");
29
+ let { DebugUi: n } = await import("./debug-ui-B5Vq_Sfp.js"), { createRoot: i } = await import("./client-Xkcfy29b.js").then((t) => /* @__PURE__ */ e(t.default, 1)), a = document.createElement("div");
30
30
  document.body.appendChild(a), i(a).render(/* @__PURE__ */ (0, l.jsx)(n, {
31
31
  useDebugButtonState: r.useState,
32
32
  open: t
@@ -1,14 +1,14 @@
1
1
  (function() {
2
2
  try {
3
3
  var e = typeof window < "u" ? window : typeof global < "u" ? global : typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : {};
4
- e.SENTRY_RELEASE = { id: "3.13.4" };
4
+ e.SENTRY_RELEASE = { id: "3.14.0" };
5
5
  var t = new e.Error().stack;
6
6
  t && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[t] = "a7e05aea-745e-4a4b-ba82-432527d9c312", e._sentryDebugIdIdentifier = "sentry-dbid-a7e05aea-745e-4a4b-ba82-432527d9c312");
7
7
  } catch {}
8
8
  })();
9
- import { r as e } from "./rolldown-runtime-DKhEBWux.js";
10
- import { t } from "./react-DTFJ9F0z.js";
11
- import { c as n } from "./store-7Bfkwa8d.js";
9
+ import { r as e } from "./rolldown-runtime-6-_Y0Haw.js";
10
+ import { t } from "./react-rrDmeRcN.js";
11
+ import { c as n } from "./store-BkZ6zMrR.js";
12
12
  //#region src/utils/getRenderTargetFromRoot.ts
13
13
  var r = /* @__PURE__ */ e(t(), 1);
14
14
  function i(e) {
@@ -1,6 +1,7 @@
1
1
  import { type Map as MaplibreMap } from 'maplibre-gl';
2
- import { type MapOptions, type TileSourceConfig } from '../MaplibreWrapper';
3
- export declare const DEFAULT_TILE_SOURCE: TileSourceConfig;
2
+ import { type MapOptions, type TileSourceConfig } from '../MaplibreWrapper.js';
3
+ export declare const LIGHT_TILE_SOURCE: TileSourceConfig;
4
+ export declare const DARK_TILE_SOURCE: TileSourceConfig;
4
5
  export declare const DEFAULT_MAP_OPTIONS: MapOptions;
5
6
  export declare const MAP_2D_OPTIONS: MapOptions;
6
7
  export declare function applyMapDimValue(map: MaplibreMap | null, value: number): void;
@@ -1 +1 @@
1
- import u from"../../../store";import{MAP_DIM_LAYER_ID as c}from"../MaplibreWrapper";export const DEFAULT_TILE_SOURCE={style:"https://basemaps.cartocdn.com/gl/positron-gl-style/style.json"};const s=12;export const DEFAULT_MAP_OPTIONS={pitch:30,maxPitch:70,minZoom:s},MAP_2D_OPTIONS={pitch:0,maxPitch:0,minZoom:s};export function applyMapDimValue(t,e){t?.getLayer(c)&&(t.setPaintProperty(c,"fill-opacity",f(e)),t.triggerRepaint())}function f(t){return Math.min(Math.max(t,0),1)}export function applyMapOptions(t,e,i=!1){if(!t)return;t.setMinZoom(e.minZoom??null),t.setMaxZoom(e.maxZoom??null),t.setMaxBounds(e.maxBounds??null);const o=e.pitch,n=e.maxPitch,r=t.getPitch(),l=!!(i&&o!=null&&n!=null&&n<r);n!=null&&!l&&t.setMaxPitch(e.maxPitch),!(o==null||r===o)&&(i?(t.easeTo({pitch:o,duration:300}),l&&t.once("moveend",()=>t.setMaxPitch(n))):t.jumpTo({pitch:o}))}export function getTileSource(){const t=u.fp?.maplibre??window.__efpMaplibre;return t?.style?{style:t.style}:t?.styleUrl?{style:t.styleUrl}:DEFAULT_TILE_SOURCE}
1
+ import{fpGeo as u}from"../../../data/fpGeo.js";import a from"../../../store/index.js";import m from"../../../tools/settings.js";import{MAP_DIM_LAYER_ID as s}from"../MaplibreWrapper.js";import{resolveMapTheme as f}from"./map-theme.js";export const LIGHT_TILE_SOURCE={style:"https://basemaps.cartocdn.com/gl/positron-gl-style/style.json"},DARK_TILE_SOURCE={style:"https://basemaps.cartocdn.com/gl/dark-matter-gl-style/style.json"};const c=12;export const DEFAULT_MAP_OPTIONS={pitch:30,maxPitch:70,minZoom:c},MAP_2D_OPTIONS={pitch:0,maxPitch:0,minZoom:c};export function applyMapDimValue(t,e){t?.getLayer(s)&&(t.setPaintProperty(s,"fill-opacity",p(e)),t.triggerRepaint())}function p(t){return Math.min(Math.max(t,0),1)}export function applyMapOptions(t,e,n=!1){if(!t)return;t.setMinZoom(e.minZoom??null),t.setMaxZoom(e.maxZoom??null),t.setMaxBounds(e.maxBounds??null);const o=e.pitch,r=e.maxPitch,l=t.getPitch(),i=!!(n&&o!=null&&r!=null&&r<l);r!=null&&!i&&t.setMaxPitch(e.maxPitch),!(o==null||l===o)&&(n?(t.easeTo({pitch:o,duration:300}),i&&t.once("moveend",()=>t.setMaxPitch(r))):t.jumpTo({pitch:o}))}export function getTileSource(){const t=a.fp?.maplibre??window.__efpMaplibre;return t?.style?{style:t.style}:t?.styleUrl?{style:t.styleUrl}:f(u?.properties?.config?.style,m.backgroundColor)==="dark"?DARK_TILE_SOURCE:LIGHT_TILE_SOURCE}
@@ -0,0 +1,20 @@
1
+ import { type MapTheme } from '@expofp/schema';
2
+ /**
3
+ * The palette implied by the drawing's background color — the fallback for
4
+ * drawings that predate `__fpGeo.properties.config.style`.
5
+ *
6
+ * `'none'` is a real authored value (the plan asks for no background at all)
7
+ * and is not a parseable color, so it and anything else unparseable resolve to
8
+ * the light palette the SDK has always used.
9
+ *
10
+ * Inferring a palette from a background color is a guess — the two are separate
11
+ * decisions, and a plan may legitimately want a dark surround without a dark
12
+ * basemap. The Designer's explicit geo config avoids that ambiguity.
13
+ */
14
+ export declare function deriveMapThemeFromBackground(backgroundColor: string | undefined): MapTheme;
15
+ /**
16
+ * Resolve the basemap palette: the one the drawing declares in its geo config,
17
+ * else the one its background color implies.
18
+ */
19
+ export declare function resolveMapTheme(drawingTheme: MapTheme | undefined, backgroundColor: string | undefined): MapTheme;
20
+ //# sourceMappingURL=map-theme.d.ts.map
@@ -0,0 +1 @@
1
+ import e from"color";const n=50;function i(t){return t==="light"||t==="dark"}export function deriveMapThemeFromBackground(t){if(!t||t==="none")return"light";try{return e(t).lightness()<n?"dark":"light"}catch{return"light"}}export function resolveMapTheme(t,r){return i(t)?t:deriveMapThemeFromBackground(r)}
@@ -1,8 +1,8 @@
1
- import { type FeatureCollection } from 'geojson';
1
+ import { type MapTheme } from '@expofp/schema';
2
2
  interface ImageData {
3
3
  layer: string;
4
4
  data: string;
5
- points: [][];
5
+ points: unknown[][];
6
6
  }
7
7
  interface GeoAnchorPoint {
8
8
  x: number;
@@ -17,15 +17,22 @@ interface FpGeoProperties {
17
17
  p2: GeoAnchorPoint;
18
18
  bearing?: number;
19
19
  snapThreshold?: number;
20
+ /** Basemap palette the Designer authored the drawing for. */
21
+ style?: MapTheme;
20
22
  };
21
23
  mpViewbox?: number[];
22
24
  useMaplibre?: boolean;
23
25
  [key: string]: unknown;
24
26
  }
25
- interface ExtendFeatureCollection extends FeatureCollection {
27
+ /**
28
+ * `__fpGeo` as the SDK reads it: the georeferencing extension of a GeoJSON
29
+ * FeatureCollection. Only `properties` and `images` are consumed here — the
30
+ * FeatureCollection part (`type`, `features`) passes through untyped.
31
+ */
32
+ interface ExtendFeatureCollection {
26
33
  properties: FpGeoProperties;
27
34
  images: ImageData[];
28
35
  }
29
- export declare const fpGeo: ExtendFeatureCollection;
36
+ export declare const fpGeo: ExtendFeatureCollection | undefined;
30
37
  export {};
31
38
  //# sourceMappingURL=fpGeo.d.ts.map
@@ -1 +1 @@
1
- import{getFpSvgJs as o}from"./fp-payloads";export const fpGeo=o().__fpGeo;
1
+ import{getFpSvgJs as o}from"./fp-payloads.js";export const fpGeo=o().__fpGeo;
@@ -1,3 +1,4 @@
1
+ import type { AutocompleteOptionObject } from '../ui/Autocomplete';
1
2
  import { Booth } from './BoothStore';
2
3
  import { EventItem } from './EventStore';
3
4
  import { Exhibitor } from './ExhibitorStore';
@@ -18,10 +19,7 @@ export default class RoutePlannerStore {
18
19
  get resolvedBooths(): Booth[];
19
20
  get stopsCount(): number;
20
21
  get startPointBoothOptions(): Booth[];
21
- get startPointAutocompleteOptions(): {
22
- value: string;
23
- label: string;
24
- }[];
22
+ get startPointAutocompleteOptions(): AutocompleteOptionObject[];
25
23
  get title(): string;
26
24
  get subtitleParts(): {
27
25
  stops: string;
@@ -1 +1 @@
1
- import{__decorate as u}from"tslib";import{action as a,computed as c,observable as y}from"mobx";import{t as m}from"../utils/i18n";import{findBooth as b,Route as g}from"./RouteStore";export default class n{constructor(t){this.items=[],this.startPoint=null,this.source=null,this.excludedVisitedCount=0,this.rootStore=t}get resolvedBooths(){const t=new Map;return this.startPoint&&t.set(this.startPoint.id,this.startPoint),this.items.forEach(o=>{o.booth&&t.set(o.booth.id,o.booth)}),Array.from(t.values())}get stopsCount(){return this.items.length}get startPointBoothOptions(){return this.rootStore.boothStore.booths}get startPointAutocompleteOptions(){const{exhibitorStore:t}=this.rootStore,o=this.startPointBoothOptions,r=[],i=new Set;return t.exhibitors.forEach(e=>{e.booths.forEach(l=>{i.add(l.id),r.push({value:l.id.toString(),label:`${e.name} - ${l.name}`})})}),o.filter(e=>!i.has(e.id)).forEach(e=>{r.push({value:e.id.toString(),label:e.name})}),r.sort((e,l)=>e.label.localeCompare(l.label,void 0,{sensitivity:"base"}))}get title(){return this.source==="bookmarks"?m("Bookmarks route"):""}get subtitleParts(){const{routeInfo:t}=this.rootStore.routeStore;let o;if(t?.time){const r=t.time;o=r<60?m("< 1 min"):m("~ {{n}} min",{n:Math.round(r/60)})}return{stops:m("{{count}} stops",{count:this.stopsCount}),from:this.startPoint?m("From {{name}}",{name:this.startPoint.name}):void 0,distance:t?t.distance:void 0,travelTime:o}}get routeFloors(){const t=this.rootStore.routeStore.pathLayers;return t.map((o,r)=>{const i=t[r+1],s=o.layer?.basePriority??0,e=i?.layer?.basePriority??0,l=i?e<s?"up":"down":void 0;return{id:o.id,name:o.layer?.shortName,description:o.layer?.description,directionToNext:l}})}get currentRouteFloor(){const t=this.routeFloors,o=this.rootStore.routeStore.currentRouteLayer;if(!t.length)return;if(!o)return t[0]?{id:t[0].id,name:t[0].name}:void 0;const r=t.find(i=>i.description?.toLowerCase()===o.description?.toLowerCase());return r?{id:r.id,name:r.name}:{id:t[0].id,name:t[0].name}}setRouteFloor(t){const o=this.rootStore.routeStore.pathLayers.find(r=>r.id===t.id);o?.layer&&this.rootStore.layerStore.updateVisibility(o.layer,!0)}launch(t,o="custom",r){this.excludedVisitedCount=t.filter(s=>s.type==="exhibitor"&&s.entity.visited).length,this.items=t.filter(s=>s.type==="exhibitor"?!s.entity.visited:!0),this.source=o,this.startPoint=r!==void 0?r:this.detectStartPoint();const{uiState:i}=this.rootStore;i.list={type:"route-planner",source:o},i.details=null,i.menu=!1,this.buildRoute()}launchFromBookmarks(t){const{exhibitorStore:o,eventStore:r,boothStore:i}=this.rootStore,s=[];o.bookmarked.forEach(e=>{s.push({type:"exhibitor",entity:e,booth:e.booths[0]||null})}),i.booths.filter(e=>e.exhibitors.length===0&&e.bookmarkedDirectly).forEach(e=>{s.push({type:"booth",entity:e,booth:e})}),this.launch(s,"bookmarks",t)}launchFromSlugs(t,o){const r=this.resolveSlugs(t);this.launch(r,"custom",o)}resolveSlugs(t){const{exhibitorStore:o,eventStore:r,boothStore:i}=this.rootStore;return t.filter(Boolean).map(s=>{const e=s.toLowerCase(),l=o.exhibitors.find(d=>d.slug?.toLowerCase()===e||d.externalId?.toLowerCase()===e);if(l)return{type:"exhibitor",entity:l,booth:l.booths[0]||null};const p=b(s);return p?{type:"booth",entity:p,booth:p}:null}).filter(s=>s!==null)}buildRoute(){const t=[];if(this.startPoint&&this.startPoint.name&&t.push(this.startPoint.name),this.items.forEach(h=>{h.booth&&h.booth.name&&t.push(h.booth.name)}),t.length<2){this.rootStore.routeStore.updateRoute([]);return}let o;try{const h=this.rootStore.fp?.getOptimizedRoutes?.(t);o=Array.isArray(h)?h.flatMap(S=>S?.waypoints??[]):[]}catch{o=[]}const r=new Set(t),i=new Set(o),s=t.length>0&&[...r].every(h=>i.has(h));(!o.length||!s)&&(o=t.slice()),this.reorderItemsByNames(o);const e=this.resolvedBooths;if(e.length<2){this.rootStore.routeStore.updateRoute([]);return}const l=e[0],p=e[e.length-1],d=e.slice(1,-1),f=new g(l,p,d);this.rootStore.routeStore.selectRoute(f,!1),this.rootStore.uiState.setIsMultiPointRoute(d.length>0)}reorderItemsByNames(t){const o=this.startPoint?this.startPoint.name:null,r=new Map;this.items.forEach(s=>{const e=s.booth?s.booth.name:null;e&&(r.has(e)||r.set(e,[]),r.get(e).push(s))});const i=[];t.forEach(s=>{if(s!==o){const e=r.get(s);e&&e.length>0&&i.push(...e.splice(0))}}),this.items=i}detectStartPoint(){const{boothStore:t,poiTypeStore:o}=this.rootStore,r=["entrance","entrances"],i=o.poiTypes.find(s=>r.includes(s.name.toLowerCase()));return i&&t.booths.find(s=>s.poiTypeId===i.id)||null}setStartPoint(t){this.startPoint=t,this.buildRoute()}removeItem(t){this.items.splice(t,1),this.buildRoute()}reorderItems(t,o){const[r]=this.items.splice(t,1);this.items.splice(o,0,r),this.buildRoute()}close(){this.items=[],this.startPoint=null,this.source=null,this.excludedVisitedCount=0,this.rootStore.uiState.details=null,this.rootStore.uiState.list={type:"search",text:"",focused:!1},this.rootStore.routeStore.selectRoute(null,!1)}}u([y],n.prototype,"items",void 0),u([y],n.prototype,"startPoint",void 0),u([y],n.prototype,"source",void 0),u([y],n.prototype,"excludedVisitedCount",void 0),u([c],n.prototype,"resolvedBooths",null),u([c],n.prototype,"stopsCount",null),u([c],n.prototype,"startPointBoothOptions",null),u([c],n.prototype,"startPointAutocompleteOptions",null),u([c],n.prototype,"title",null),u([c],n.prototype,"subtitleParts",null),u([c],n.prototype,"routeFloors",null),u([c],n.prototype,"currentRouteFloor",null),u([a],n.prototype,"setRouteFloor",null),u([a],n.prototype,"launch",null),u([a],n.prototype,"launchFromBookmarks",null),u([a],n.prototype,"launchFromSlugs",null),u([a],n.prototype,"buildRoute",null),u([a],n.prototype,"setStartPoint",null),u([a],n.prototype,"removeItem",null),u([a],n.prototype,"reorderItems",null),u([a],n.prototype,"close",null);
1
+ import{__decorate as u}from"tslib";import{action as a,computed as c,observable as y}from"mobx";import{t as m}from"../utils/i18n";import{findBooth as b,Route as g}from"./RouteStore";export default class n{constructor(t){this.items=[],this.startPoint=null,this.source=null,this.excludedVisitedCount=0,this.rootStore=t}get resolvedBooths(){const t=new Map;return this.startPoint&&t.set(this.startPoint.id,this.startPoint),this.items.forEach(o=>{o.booth&&t.set(o.booth.id,o.booth)}),Array.from(t.values())}get stopsCount(){return this.items.length}get startPointBoothOptions(){return this.rootStore.boothStore.booths}get startPointAutocompleteOptions(){const{exhibitorStore:t}=this.rootStore,o=this.startPointBoothOptions,r=[],i=new Set;return t.exhibitors.forEach(e=>{e.booths.forEach(l=>{i.add(l.id),r.push({value:l.id.toString(),label:`${e.name} - ${l.name}`,exhibitorId:e.id})})}),o.filter(e=>!i.has(e.id)).forEach(e=>{r.push({value:e.id.toString(),label:e.name})}),r.sort((e,l)=>e.label.localeCompare(l.label,void 0,{sensitivity:"base"}))}get title(){return this.source==="bookmarks"?m("Bookmarks route"):""}get subtitleParts(){const{routeInfo:t}=this.rootStore.routeStore;let o;if(t?.time){const r=t.time;o=r<60?m("< 1 min"):m("~ {{n}} min",{n:Math.round(r/60)})}return{stops:m("{{count}} stops",{count:this.stopsCount}),from:this.startPoint?m("From {{name}}",{name:this.startPoint.name}):void 0,distance:t?t.distance:void 0,travelTime:o}}get routeFloors(){const t=this.rootStore.routeStore.pathLayers;return t.map((o,r)=>{const i=t[r+1],s=o.layer?.basePriority??0,e=i?.layer?.basePriority??0,l=i?e<s?"up":"down":void 0;return{id:o.id,name:o.layer?.shortName,description:o.layer?.description,directionToNext:l}})}get currentRouteFloor(){const t=this.routeFloors,o=this.rootStore.routeStore.currentRouteLayer;if(!t.length)return;if(!o)return t[0]?{id:t[0].id,name:t[0].name}:void 0;const r=t.find(i=>i.description?.toLowerCase()===o.description?.toLowerCase());return r?{id:r.id,name:r.name}:{id:t[0].id,name:t[0].name}}setRouteFloor(t){const o=this.rootStore.routeStore.pathLayers.find(r=>r.id===t.id);o?.layer&&this.rootStore.layerStore.updateVisibility(o.layer,!0)}launch(t,o="custom",r){this.excludedVisitedCount=t.filter(s=>s.type==="exhibitor"&&s.entity.visited).length,this.items=t.filter(s=>s.type==="exhibitor"?!s.entity.visited:!0),this.source=o,this.startPoint=r!==void 0?r:this.detectStartPoint();const{uiState:i}=this.rootStore;i.list={type:"route-planner",source:o},i.details=null,i.menu=!1,this.buildRoute()}launchFromBookmarks(t){const{exhibitorStore:o,eventStore:r,boothStore:i}=this.rootStore,s=[];o.bookmarked.forEach(e=>{s.push({type:"exhibitor",entity:e,booth:e.booths[0]||null})}),i.booths.filter(e=>e.exhibitors.length===0&&e.bookmarkedDirectly).forEach(e=>{s.push({type:"booth",entity:e,booth:e})}),this.launch(s,"bookmarks",t)}launchFromSlugs(t,o){const r=this.resolveSlugs(t);this.launch(r,"custom",o)}resolveSlugs(t){const{exhibitorStore:o,eventStore:r,boothStore:i}=this.rootStore;return t.filter(Boolean).map(s=>{const e=s.toLowerCase(),l=o.exhibitors.find(d=>d.slug?.toLowerCase()===e||d.externalId?.toLowerCase()===e);if(l)return{type:"exhibitor",entity:l,booth:l.booths[0]||null};const p=b(s);return p?{type:"booth",entity:p,booth:p}:null}).filter(s=>s!==null)}buildRoute(){const t=[];if(this.startPoint&&this.startPoint.name&&t.push(this.startPoint.name),this.items.forEach(h=>{h.booth&&h.booth.name&&t.push(h.booth.name)}),t.length<2){this.rootStore.routeStore.updateRoute([]);return}let o;try{const h=this.rootStore.fp?.getOptimizedRoutes?.(t);o=Array.isArray(h)?h.flatMap(S=>S?.waypoints??[]):[]}catch{o=[]}const r=new Set(t),i=new Set(o),s=t.length>0&&[...r].every(h=>i.has(h));(!o.length||!s)&&(o=t.slice()),this.reorderItemsByNames(o);const e=this.resolvedBooths;if(e.length<2){this.rootStore.routeStore.updateRoute([]);return}const l=e[0],p=e[e.length-1],d=e.slice(1,-1),f=new g(l,p,d);this.rootStore.routeStore.selectRoute(f,!1),this.rootStore.uiState.setIsMultiPointRoute(d.length>0)}reorderItemsByNames(t){const o=this.startPoint?this.startPoint.name:null,r=new Map;this.items.forEach(s=>{const e=s.booth?s.booth.name:null;e&&(r.has(e)||r.set(e,[]),r.get(e).push(s))});const i=[];t.forEach(s=>{if(s!==o){const e=r.get(s);e&&e.length>0&&i.push(...e.splice(0))}}),this.items=i}detectStartPoint(){const{boothStore:t,poiTypeStore:o}=this.rootStore,r=["entrance","entrances"],i=o.poiTypes.find(s=>r.includes(s.name.toLowerCase()));return i&&t.booths.find(s=>s.poiTypeId===i.id)||null}setStartPoint(t){this.startPoint=t,this.buildRoute()}removeItem(t){this.items.splice(t,1),this.buildRoute()}reorderItems(t,o){const[r]=this.items.splice(t,1);this.items.splice(o,0,r),this.buildRoute()}close(){this.items=[],this.startPoint=null,this.source=null,this.excludedVisitedCount=0,this.rootStore.uiState.details=null,this.rootStore.uiState.list={type:"search",text:"",focused:!1},this.rootStore.routeStore.selectRoute(null,!1)}}u([y],n.prototype,"items",void 0),u([y],n.prototype,"startPoint",void 0),u([y],n.prototype,"source",void 0),u([y],n.prototype,"excludedVisitedCount",void 0),u([c],n.prototype,"resolvedBooths",null),u([c],n.prototype,"stopsCount",null),u([c],n.prototype,"startPointBoothOptions",null),u([c],n.prototype,"startPointAutocompleteOptions",null),u([c],n.prototype,"title",null),u([c],n.prototype,"subtitleParts",null),u([c],n.prototype,"routeFloors",null),u([c],n.prototype,"currentRouteFloor",null),u([a],n.prototype,"setRouteFloor",null),u([a],n.prototype,"launch",null),u([a],n.prototype,"launchFromBookmarks",null),u([a],n.prototype,"launchFromSlugs",null),u([a],n.prototype,"buildRoute",null),u([a],n.prototype,"setStartPoint",null),u([a],n.prototype,"removeItem",null),u([a],n.prototype,"reorderItems",null),u([a],n.prototype,"close",null);
@@ -2,7 +2,7 @@ export declare class FpSettings {
2
2
  boothLabelColor: string;
3
3
  boothBorderColor: string;
4
4
  backgroundColor: string;
5
- boothBorderWidth: number;
5
+ boothBorderWidth?: number;
6
6
  heatmapColors: string[];
7
7
  maxZoom?: number;
8
8
  }
@@ -15,7 +15,7 @@ declare class Settings extends FpSettings {
15
15
  default: string;
16
16
  defaultHold: string;
17
17
  defaultSold: string;
18
- seectedLight: null;
18
+ seectedLight: string | null;
19
19
  selected: string;
20
20
  selectedBorder: null;
21
21
  wayfinding: {
@@ -1 +1 @@
1
- import s from"deepmerge";import{getFpSvgJs as t}from"../data/fp-payloads";export class FpSettings{constructor(){this.boothLabelColor="#fff",this.boothBorderColor="#fff",this.backgroundColor="#ebebeb",this.heatmapColors=["#FDE7C7","#FDDBAE","#FDC48D","#FCB37C","#FCA26D","#F67B5B","#EB483E","#E03143","#6C0022"]}}class l extends FpSettings{constructor(){super(...arguments),this.EXPO=window.__efpEvent,this.borderless=!1,this.wayfinding=!1,this.colors={booths:{default:"#41b6e7",defaultHold:"#48484A",defaultSold:"#41b6e7",seectedLight:null,selected:"#fb3e59",selectedBorder:null,wayfinding:{selected:"#0088D6",selectedBorder:null},empty:"#aaaaaa"}}}}let e=new l;e.EXPO.startsWith("sxsw2024")?(e.colors.booths.selected="#FF6400",e.colors.booths.seectedLight="#808080"):e.EXPO==="whxdubai2026"?(e.colors.booths.selected="#2B66FE",e.maxZoom=450):e.EXPO==="whxlabs2026"?e.colors.booths.selected="#2B66FE":(e.EXPO==="wineparis2026"||e.EXPO==="rdemo2025")&&(e.maxZoom=450),e=s(e,window.__settings||t().__fpSettings||{}),e=s(e,t().__fpSettings||{});export default e;
1
+ import t from"deepmerge";import{getFpSvgJs as l}from"../data/fp-payloads.js";export class FpSettings{constructor(){this.boothLabelColor="#fff",this.boothBorderColor="#fff",this.backgroundColor="#ebebeb",this.heatmapColors=["#FDE7C7","#FDDBAE","#FDC48D","#FCB37C","#FCA26D","#F67B5B","#EB483E","#E03143","#6C0022"]}}class i extends FpSettings{constructor(){super(...arguments),this.EXPO=window.__efpEvent,this.borderless=!1,this.wayfinding=!1,this.colors={booths:{default:"#41b6e7",defaultHold:"#48484A",defaultSold:"#41b6e7",seectedLight:null,selected:"#fb3e59",selectedBorder:null,wayfinding:{selected:"#0088D6",selectedBorder:null},empty:"#aaaaaa"}}}}let e=new i;e.EXPO.startsWith("sxsw2024")?(e.colors.booths.selected="#FF6400",e.colors.booths.seectedLight="#808080"):e.EXPO==="whxdubai2026"?(e.colors.booths.selected="#2B66FE",e.maxZoom=450):e.EXPO==="whxlabs2026"?e.colors.booths.selected="#2B66FE":(e.EXPO==="wineparis2026"||e.EXPO==="rdemo2025")&&(e.maxZoom=450);const r=window.__settings,s=l().__fpSettings??{};e=t(e,r??s),e=t(e,s);export default e;
@@ -1 +1 @@
1
- import{Fragment as oe,jsx as c,jsxs as F}from"react/jsx-runtime";import"./Autocomplete.scss";import re from"classnames";import{useEffect as N,useId as le,useMemo as se,useRef as v,useState as O}from"react";import{createPortal as ce}from"react-dom";import ie from"../shared/hooks/useOnClickOutside";const ue=({placeholder:S,options:i,value:k,showClear:A=!1,onChange:T,renderTarget:B,noOptionsLabel:j,ariaLabel:P,clearLabel:K})=>{const E=B,f=v(null),a=v(null),m=v(null),d=v(null),x=le(),L=e=>`${x}-option-${e}`,M=e=>e.value,w=e=>e.label,V=(e,t)=>e.value===t.value&&e.exhibitorId===t.exhibitorId,R=e=>i.findIndex(t=>V(t,e)),z=e=>i.find(t=>V(t,e)),[r,h]=O(null),[n,l]=O(null),[o,u]=O(!1),[g,U]=O({top:0,left:0,width:0}),b=k?z(k):void 0,D=b?R(b):null,I=r!==null?r:b?w(b):"",s=se(()=>{if(!r)return[];const e=r.toLowerCase();return i.filter(t=>w(t).toLowerCase().includes(e))},[r,i]),p=()=>{if(f.current&&o){const e=f.current.getBoundingClientRect();U({top:e.bottom+window.scrollY+4,left:e.left+window.scrollX,width:e.width})}};N(()=>{if(o)return p(),window.addEventListener("scroll",p,!0),window.addEventListener("resize",p),()=>{window.removeEventListener("scroll",p,!0),window.removeEventListener("resize",p)}},[o]),N(()=>{if(n===null||!m.current)return;m.current.querySelectorAll("li")[n]?.scrollIntoView({block:"nearest"})},[n]),ie([f,m],()=>{u(!1)}),N(()=>()=>{d.current&&clearTimeout(d.current)},[]);const _=e=>{h(null),T?.(e)},q=e=>{_(e),l(null),u(!1),a.current?.blur()},$=(e=!1)=>{_(void 0),l(null),e&&a.current?.focus()},X=()=>{u(!0)},Y=()=>{d.current&&clearTimeout(d.current),d.current=setTimeout(()=>{h(null)},200)},G=()=>{if(!I&&n===null||r&&n===null)return;const e=s.length>0?s:i;if(n!==null&&e[n]){const t=e[n];_(t)}l(null),u(!1),a.current?.blur()},H=()=>{!o||n===0||n===null||l(n-1)},J=()=>{if(!o){l(D??0),u(!0);return}const e=s.length>0?s:i,t=n===null?0:n+1;t<e.length&&l(t)},Q=e=>{switch(e.key){case"Enter":G();break;case"ArrowUp":H();break;case"ArrowDown":J();break;case"Delete":$(!0);break;case"Escape":r?(h(null),l(D)):(e.preventDefault(),u(!1),a.current?.blur());break}},W=e=>{h(e.target.value),u(!0),l(null)},Z=()=>{const e=s.length>0?s:i;return r&&s.length===0?c("div",{className:"efp-autocomplete__empty",children:j}):c("ul",{role:"listbox",id:x,children:e.map((t,y)=>{const ee=y===n,C=s.length===0&&y===D,te=ee?"is-focus":C?"is-active":void 0;return c("li",{id:L(y),role:"option","aria-selected":C,className:te,onMouseDown:ne=>ne.preventDefault(),onClick:()=>q(t),children:w(t)},`${M(t)}-${w(t)}`)})})};return F(oe,{children:[c("div",{ref:f,className:re("efp-autocomplete",{"is-open":o,"with-clear":o&&A}),children:F("div",{className:"efp-autocomplete__inner",children:[c("input",{type:"search",className:"efp-autocomplete__input",role:"combobox","aria-label":P,"aria-autocomplete":"list","aria-expanded":o,"aria-controls":o?x:void 0,"aria-activedescendant":o&&n!==null?L(n):void 0,onChange:W,onFocus:X,onBlur:Y,onKeyDown:Q,value:I,placeholder:S,ref:a}),A&&o&&I&&c("button",{type:"button",className:"efp-autocomplete__clear","aria-label":K,onMouseDown:e=>{e.preventDefault(),$(!0)}})]})}),o&&E&&ce(c("div",{ref:m,className:"efp-autocomplete-options",style:{top:`${g.top}px`,left:`${g.left}px`,width:`${g.width}px`},children:c("div",{className:"efp-autocomplete-options__scroll",children:Z()})}),E)]})};export default ue;
1
+ import{Fragment as oe,jsx as c,jsxs as F}from"react/jsx-runtime";import"./Autocomplete.scss";import re from"classnames";import{useEffect as N,useId as le,useMemo as se,useRef as b,useState as v}from"react";import{createPortal as ce}from"react-dom";import ie from"../shared/hooks/useOnClickOutside";const ue=({placeholder:S,options:i,value:k,showClear:A=!1,onChange:T,renderTarget:B,noOptionsLabel:j,ariaLabel:P,clearLabel:K})=>{const E=B,f=b(null),a=b(null),m=b(null),d=b(null),x=le(),L=e=>`${x}-option-${e}`,M=e=>e.value,O=e=>e.label,V=(e,t)=>e.value===t.value&&e.exhibitorId===t.exhibitorId,R=e=>i.findIndex(t=>V(t,e)),z=e=>i.find(t=>V(t,e)),[r,w]=v(null),[n,l]=v(null),[o,u]=v(!1),[g,U]=v({top:0,left:0,width:0}),h=k?z(k):void 0,I=h?R(h):null,D=r!==null?r:h?O(h):"",s=se(()=>{if(!r)return[];const e=r.toLowerCase();return i.filter(t=>O(t).toLowerCase().includes(e))},[r,i]),p=()=>{if(f.current&&o){const e=f.current.getBoundingClientRect();U({top:e.bottom+window.scrollY+4,left:e.left+window.scrollX,width:e.width})}};N(()=>{if(o)return p(),window.addEventListener("scroll",p,!0),window.addEventListener("resize",p),()=>{window.removeEventListener("scroll",p,!0),window.removeEventListener("resize",p)}},[o]),N(()=>{if(n===null||!m.current)return;m.current.querySelectorAll("li")[n]?.scrollIntoView({block:"nearest"})},[n]),ie([f,m],()=>{u(!1)}),N(()=>()=>{d.current&&clearTimeout(d.current)},[]);const _=e=>{w(null),T?.(e)},q=e=>{_(e),l(null),u(!1),a.current?.blur()},$=(e=!1)=>{_(void 0),l(null),e&&a.current?.focus()},X=()=>{u(!0)},Y=()=>{d.current&&clearTimeout(d.current),d.current=setTimeout(()=>{w(null)},200)},G=()=>{if(!D&&n===null||r&&n===null)return;const e=s.length>0?s:i;if(n!==null&&e[n]){const t=e[n];_(t)}l(null),u(!1),a.current?.blur()},H=()=>{!o||n===0||n===null||l(n-1)},J=()=>{if(!o){l(I??0),u(!0);return}const e=s.length>0?s:i,t=n===null?0:n+1;t<e.length&&l(t)},Q=e=>{switch(e.key){case"Enter":G();break;case"ArrowUp":H();break;case"ArrowDown":J();break;case"Delete":$(!0);break;case"Escape":r?(w(null),l(I)):(e.preventDefault(),u(!1),a.current?.blur());break}},W=e=>{w(e.target.value),u(!0),l(null)},Z=()=>{const e=s.length>0?s:i;return r&&s.length===0?c("div",{className:"efp-autocomplete__empty",children:j}):c("ul",{role:"listbox",id:x,children:e.map((t,y)=>{const ee=y===n,C=s.length===0&&y===I,te=ee?"is-focus":C?"is-active":void 0;return c("li",{id:L(y),role:"option","aria-selected":C,className:te,onMouseDown:ne=>ne.preventDefault(),onClick:()=>q(t),children:O(t)},`${M(t)}-${t.exhibitorId??""}`)})})};return F(oe,{children:[c("div",{ref:f,className:re("efp-autocomplete",{"is-open":o,"with-clear":o&&A}),children:F("div",{className:"efp-autocomplete__inner",children:[c("input",{type:"search",className:"efp-autocomplete__input",role:"combobox","aria-label":P,"aria-autocomplete":"list","aria-expanded":o,"aria-controls":o?x:void 0,"aria-activedescendant":o&&n!==null?L(n):void 0,onChange:W,onFocus:X,onBlur:Y,onKeyDown:Q,value:D,placeholder:S,ref:a}),A&&o&&D&&c("button",{type:"button",className:"efp-autocomplete__clear","aria-label":K,onMouseDown:e=>{e.preventDefault(),$(!0)}})]})}),o&&E&&ce(c("div",{ref:m,className:"efp-autocomplete-options",style:{top:`${g.top}px`,left:`${g.left}px`,width:`${g.width}px`},children:c("div",{className:"efp-autocomplete-options__scroll",children:Z()})}),E)]})};export default ue;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@expofp/floorplan",
3
- "version": "3.13.4",
3
+ "version": "3.14.0",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/expofp/efp-app.git",
@@ -72,13 +72,13 @@
72
72
  "tslib": "^2.3.0",
73
73
  "uuid": "^9.0.1",
74
74
  "zod": "4.4.3",
75
- "@expofp/debug": "3.13.4",
76
- "@expofp/geometry": "3.13.4",
77
- "@expofp/resolve": "3.13.4",
78
- "@expofp/schema": "3.13.4",
79
- "@expofp/utils": "3.13.4",
80
- "@expofp/wayfinding": "3.13.4",
81
- "@expofp/config": "3.13.4"
75
+ "@expofp/config": "3.14.0",
76
+ "@expofp/debug": "3.14.0",
77
+ "@expofp/geometry": "3.14.0",
78
+ "@expofp/resolve": "3.14.0",
79
+ "@expofp/schema": "3.14.0",
80
+ "@expofp/utils": "3.14.0",
81
+ "@expofp/wayfinding": "3.14.0"
82
82
  },
83
83
  "devDependencies": {
84
84
  "@babel/plugin-proposal-decorators": "^8.0.2",
@@ -1,68 +0,0 @@
1
- function __vite_inject_css__(css, id, forceLightDom){ if (typeof document==='undefined') return; var shadow=!forceLightDom&&typeof window!=='undefined'&&window.__efpShadowDOMStyleParent; var parent=shadow||document.head; var s=document.createElement('style'); s.setAttribute('data-chunk-style', id); s.appendChild(document.createTextNode(css)); parent.appendChild(s);}
2
- (function() {
3
- try {
4
- var e = typeof window < "u" ? window : typeof global < "u" ? global : typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : {};
5
- e.SENTRY_RELEASE = { id: "3.13.4" };
6
- var t = new e.Error().stack;
7
- t && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[t] = "f7cddd06-14c0-4e66-8ea8-d83302104dc7", e._sentryDebugIdIdentifier = "sentry-dbid-f7cddd06-14c0-4e66-8ea8-d83302104dc7");
8
- } catch {}
9
- })();
10
- import { r as e } from "./rolldown-runtime-DKhEBWux.js";
11
- import { s as t } from "./i18n-xqAQbHAE.js";
12
- import { t as n } from "./react-DTFJ9F0z.js";
13
- import { t as r } from "./jsx-runtime-1kuNv2jo.js";
14
- import { t as i } from "./classnames-DyPh2wWH.js";
15
- import { n as a, r as o } from "./index.module-Cow3RO4I.js";
16
- import { c as s, f as c, p as l } from "./store-7Bfkwa8d.js";
17
- import { n as u } from "./mobx-Juv7YSNw.js";
18
- //#region src/components/Free.tsx
19
- var d = /* @__PURE__ */ e(i(), 1);
20
- n();
21
- var f = r();
22
- function p() {
23
- let e = a(() => ({
24
- hidden: !0,
25
- get classes() {
26
- return (0, d.default)("free", { hidden: this.hidden });
27
- }
28
- }));
29
- return u(() => {
30
- if (s.freeBannerDismissed) return;
31
- let t = window.setTimeout(() => {
32
- e.hidden = !1;
33
- }, 2e3);
34
- return () => window.clearTimeout(t);
35
- }), o(() => /* @__PURE__ */ (0, f.jsx)("div", {
36
- className: e.classes,
37
- children: /* @__PURE__ */ (0, f.jsxs)("section", { children: [/* @__PURE__ */ (0, f.jsx)("div", {
38
- className: "free__message",
39
- children: /* @__PURE__ */ (0, f.jsxs)("span", { children: [
40
- t("Create a free floor plan at"),
41
- "\xA0",
42
- /* @__PURE__ */ (0, f.jsx)("a", {
43
- href: c(),
44
- target: "_blank",
45
- rel: "noopener noreferrer",
46
- children: "ExpoFP.com"
47
- })
48
- ] })
49
- }), /* @__PURE__ */ (0, f.jsx)("button", {
50
- type: "button",
51
- className: "free__dismiss",
52
- onClick: n,
53
- "aria-label": t("Dismiss"),
54
- children: /* @__PURE__ */ (0, f.jsx)("i", {
55
- className: "icon-close",
56
- "aria-hidden": "true"
57
- })
58
- })] })
59
- }));
60
- function n() {
61
- e.hidden = !0, l(sessionStorage), s.freeBannerDismissed = !0;
62
- }
63
- }
64
- //#endregion
65
- export { p as default };
66
-
67
- ;/* vite-per-chunk-css */
68
- __vite_inject_css__(".free{width:100%;min-height:calc(2.5rem * var(--ui-scale));opacity:1;background:linear-gradient(90deg,#e5175c,#5c17e5);justify-content:center;transition:all .5s;display:flex;position:absolute;top:0}.free>section{padding:calc(.1875rem * var(--ui-scale)) calc(.5rem * var(--ui-scale));-webkit-user-select:none;user-select:none;display:flex}.free__message{font-size:calc(1.125rem * var(--ui-scale));color:#fff;align-items:center;display:flex}.free__message a{color:#fff;text-decoration:underline}.free__dismiss{opacity:.8;color:#fff;cursor:pointer;background:0 0;border:0;justify-content:center;align-items:center;padding:0;transition:opacity .2s;display:flex;position:absolute;top:50%;transform:translateY(-50%)}.free__dismiss:not(:-webkit-any(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi))){right:calc(.5rem * var(--ui-scale))}.free__dismiss:not(:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi))){right:calc(.5rem * var(--ui-scale))}.free__dismiss:-webkit-any(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){left:calc(.5rem * var(--ui-scale))}.free__dismiss:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){left:calc(.5rem * var(--ui-scale))}.free__dismiss i{font-size:var(--icon-size-sm)}.free__dismiss:hover{opacity:1}@media print{.free__dismiss{display:none}}@media (min-width:768px){.free{min-height:calc(3.25rem * var(--ui-scale))}.free>section{padding:calc(.5rem * var(--ui-scale))}.free .free__message{color:#ffffffe6;font-weight:300}.free .free__dismiss i{font-size:var(--icon-size-lg)}}.free.hidden{transform:translateY(-100%)}\n/*$vite$:1*/", "Free.css", false);