@expofp/floorplan 3.46.1 → 3.47.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/browser/{Button-OKcMiyWO.js → Button-DyqVe4xL.js} +5 -5
- package/dist/browser/{CookieConsent-6ulFPlqA.js → CookieConsent-Dne5UXwi.js} +7 -7
- package/dist/browser/{Debug-BxskUF4D.js → Debug-CSY6FmRs.js} +7 -7
- package/dist/browser/{DebugTools-C1is5dXX.js → DebugTools-CSGF0Uqi.js} +6 -6
- package/dist/browser/{Demo-Dx8IKR7Q.js → Demo-AI-22qbf.js} +9 -9
- package/dist/browser/{Free-BaIZnChc.js → Free-BmItczwV.js} +10 -10
- package/dist/browser/{GalleryContainer-BXomiMwG.js → GalleryContainer-Do5QXu8h.js} +11 -11
- package/dist/browser/{GpsLoader-Ccwug0hj.js → GpsLoader-D6boL0AQ.js} +13 -13
- package/dist/browser/{KioskStore-D_Ejv_K0.js → KioskStore-DodjzUdk.js} +16 -16
- package/dist/browser/{LayerStore-DKg7vekG.js → LayerStore-DCg-juRT.js} +44 -44
- package/dist/browser/{MaplibreAdapter-Dh_ASXEG.js → MaplibreAdapter-D838jbrB.js} +17 -17
- package/dist/browser/{ModalContainer-DXN2lQG-.js → ModalContainer-DAh3OT88.js} +10 -10
- package/dist/browser/{PermissionNotice-CljwxHGD.js → PermissionNotice-D9dFiy8Z.js} +6 -6
- package/dist/browser/{RouteStore-4r6xqu2L.js → RouteStore-B82dztUW.js} +24 -24
- package/dist/browser/{SetKioskMode-3YCa73LZ.js → SetKioskMode-DcQFm_UG.js} +11 -11
- package/dist/browser/{ShowKiosk-CmozIEWm.js → ShowKiosk-BnuT9vM-.js} +11 -11
- package/dist/browser/{UIState-DOVwNW-h.js → UIState-Dd6fvko0.js} +12 -12
- package/dist/browser/{ViewerMenuPanel-ukfCjPlv.js → ViewerMenuPanel-C3B3OmlN.js} +10 -10
- package/dist/browser/{add-debug-secret-listener-DiW9122w.js → add-debug-secret-listener-BJu3pH2x.js} +1 -1
- package/dist/browser/{adopt-global-settings-C8NxCufU.js → adopt-global-settings-BerG23m2.js} +9 -9
- package/dist/browser/{boolean-editor-DAUiSxaZ.js → boolean-editor-C1i1ID8g.js} +9 -9
- package/dist/browser/{bootIntercom-Cxu_tGyN.js → bootIntercom-C3tqD4Ct.js} +2 -2
- package/dist/browser/bundle.json +87 -87
- package/dist/browser/{camera-events-BzkvmmVT.js → camera-events-DzSywgw0.js} +1 -1
- package/dist/browser/{classnames-ht7j544T.js → classnames-CQMYVTW5.js} +2 -2
- package/dist/browser/{client-cb0OfXbM.js → client-DbQnuxsE.js} +5 -5
- package/dist/browser/{components-D1hWFJkH.js → components-CzNKFauU.js} +2212 -2161
- package/dist/browser/{create-live-plan-BYQmwyu_.js → create-live-plan-D17jzmnD.js} +482 -416
- package/dist/browser/{debug-context-D-Az5hsc.js → debug-context-CLE9u3W1.js} +6 -6
- package/dist/browser/{debug-overlay-Cx_TzAOa.js → debug-overlay-CqyQd6Tu.js} +10 -10
- package/dist/browser/{debug-ui-BWGZ29bU.js → debug-ui-CopIbPwZ.js} +6 -6
- package/dist/browser/{dist-CxdNXcdm.js → dist-CXSdtHNF.js} +6 -6
- package/dist/browser/{dist-DI0TDNHP.js → dist-DrhAFaXl.js} +5 -5
- package/dist/browser/{dist-TE6VoTiX.js → dist-mSjAoqZa.js} +3 -3
- package/dist/browser/{efp-debug-init-pyajqRUx.js → efp-debug-init-D3gNE8Zq.js} +3 -3
- package/dist/browser/{enum-editor-CtGMxTY9.js → enum-editor-DfEZj9xj.js} +4 -4
- package/dist/browser/{es5-CaaQfpSO.js → es5-CRZbJ3RK.js} +2 -2
- package/dist/browser/{event-head-BM-eM_Bb.js → event-head-C5Pqy8aE.js} +1 -1
- package/dist/browser/{event-not-found-B65hzXQP.js → event-not-found-y-baKtlx.js} +3 -3
- package/dist/browser/{event-scoped-cache-Dy_k6CT0.js → event-scoped-cache-CUHa0QyF.js} +3 -3
- package/dist/browser/{expofpUrl-CtHaWZhI.js → expofpUrl-CUIqO5kL.js} +1 -1
- package/dist/browser/{exports-B117IH-s.js → exports-CnYQMV4a.js} +1 -1
- package/dist/browser/{favicon-BZ8MgZoI.js → favicon-DtPw8IL3.js} +1 -1
- package/dist/browser/{fetch-retry.umd-CZoakvnh.js → fetch-retry.umd-DjnZ3Ut9.js} +2 -2
- package/dist/browser/{flex-DqZnQXWR.js → flex-C5mQXGq5.js} +5 -5
- package/dist/browser/{floorplan.loader-Dj1p_2Uj.js → floorplan.loader-DEaS-fgT.js} +12 -12
- package/dist/browser/{floorplan.ready-DV6RYY5y.js → floorplan.ready-BOnFLVHj.js} +70 -70
- package/dist/browser/{framing-rect-BPQPxCHJ.js → framing-rect-BIpsCqTB.js} +12 -12
- package/dist/browser/{freeBanner-CV-7PVgM.js → freeBanner-BQ-1hI0V.js} +2 -2
- package/dist/browser/{fuse-o5_aSzm4.js → fuse-jVBfzHic.js} +2 -2
- package/dist/browser/{i18n-DT4SjeA3.js → i18n-DlquqKCP.js} +333 -318
- package/dist/browser/index.js +33 -33
- package/dist/browser/{index.module-AwGISzVZ.js → index.module-CN0EtZcO.js} +4 -4
- package/dist/browser/{init-ui-_JZLWvuF.js → init-ui-BQ7d5hKB.js} +9 -9
- package/dist/browser/{integrateKiosk-LP784XEO.js → integrateKiosk-CumGPvbc.js} +5 -5
- package/dist/browser/{is-debug-sgFB2_R1.js → is-debug-IkNSAGo8.js} +4 -4
- package/dist/browser/{is-own-domain-Cgslc30X.js → is-own-domain-yrTLx04R.js} +1 -1
- package/dist/browser/{is-webview-Cbjly4fl.js → is-webview-DA6FLdme.js} +1 -1
- package/dist/browser/{jsx-runtime-DJq9zytl.js → jsx-runtime-BzLvm2y2.js} +2 -2
- package/dist/browser/{kiosk-mode-D0Muk9LN.js → kiosk-mode-zD8K_fUT.js} +3 -3
- package/dist/browser/{kiosk-record-QLKP2NTE.js → kiosk-record-Ckxa0L0B.js} +1 -1
- package/dist/browser/{kioskApi-Cm0aHEDq.js → kioskApi-CG3QGuUx.js} +7 -7
- package/dist/browser/{ktx2-D9vr5u5B.js → ktx2-Dx_h97CR.js} +2 -2
- package/dist/browser/{lib-Cu-YSKSO.js → lib-5KOc2jVl.js} +3 -3
- package/dist/browser/{loadImage-DC3BioQw.js → loadImage-iqS2KHgN.js} +1 -1
- package/dist/browser/{logDeviceInfo-U-dghNEE.js → logDeviceInfo-DhvfxT2K.js} +9 -9
- package/dist/browser/{mobx-B3ugy_Uo.js → mobx-CUFHrL57.js} +4 -4
- package/dist/browser/{mobx.module-C9pJfT4z.js → mobx.module-BTnTbXnp.js} +1 -1
- package/dist/browser/{optional-boolean-editor-B6peoFdP.js → optional-boolean-editor-C3k-DXeF.js} +3 -3
- package/dist/browser/{optional-enum-editor-DdGc6bGo.js → optional-enum-editor-CeY1nCnF.js} +4 -4
- package/dist/browser/{optional-string-editor-D-mZ5TcA.js → optional-string-editor-DrVHjvsL.js} +4 -4
- package/dist/browser/{particles.min-r05NeIIO.js → particles.min-BPS1Hdpf.js} +2 -2
- package/dist/browser/{react-CAiPe_Qk.js → react-XuvSZP7j.js} +2 -2
- package/dist/browser/{react-dom-B-n3e4uH.js → react-dom-Cg1Pcvni.js} +3 -3
- package/dist/browser/{rolldown-runtime-BkAGFH-3.js → rolldown-runtime-5rOLGCTp.js} +1 -1
- package/dist/browser/{scene-DBB57-1M.js → scene-CeKqMicD.js} +3 -3
- package/dist/browser/{scheduler-Btu7810I.js → scheduler-D5sEY0Dn.js} +2 -2
- package/dist/browser/{select-1x7gpaD6.js → select-Cbv7ufJV.js} +10 -10
- package/dist/browser/{settings-Clb327Gp.js → settings-DgySPhLO.js} +2 -2
- package/dist/browser/{settings-item-9ehuHN7w.js → settings-item-e3YLYS4G.js} +6 -6
- package/dist/browser/{store-B618He5O.js → store-DTvNQcN7.js} +2 -2
- package/dist/browser/{string-editor-zH6d37oA.js → string-editor-Dbv6xI9s.js} +4 -4
- package/dist/browser/{text-field-hTc5zeaz.js → text-field-Cg5awwlh.js} +5 -5
- package/dist/browser/{theme-rkMDBBl_.js → theme-BRoMMdQq.js} +8 -8
- package/dist/browser/{three.core-CoaBWF0W.js → three.core-DvpRLNmt.js} +1 -1
- package/dist/browser/{ui-d7u7XbmX.js → ui-DNMlY_VB.js} +8 -8
- package/dist/browser/{useRenderTarget-Dsf3ugHo.js → useRenderTarget-C__MnkX7.js} +4 -4
- package/dist/browser/{viewport-BDI0afn8.js → viewport-DBuFXrrj.js} +3 -3
- package/dist/browser/{wayfinding-BkpHRhUO.js → wayfinding-BUQns13Y.js} +5 -5
- package/dist/esm/components/BaseFilterModal.d.ts +4 -2
- package/dist/esm/components/BaseFilterModal.js +1 -1
- package/dist/esm/components/CategoryFilterModal.js +1 -1
- package/dist/esm/components/SearchButtons/SearchButton.d.ts +1 -0
- package/dist/esm/components/SearchButtons/SearchButton.js +1 -1
- package/dist/esm/services/URLFilterManager.d.ts +8 -0
- package/dist/esm/services/URLFilterManager.js +1 -1
- package/dist/esm/store/CategoryFilterStore.d.ts +33 -1
- package/dist/esm/store/CategoryFilterStore.js +1 -1
- package/dist/esm/store/SearchStore.js +1 -1
- package/dist/esm/store/providers/SearchShortcutProvider.js +1 -1
- package/dist/esm/store/search-buttons/SearchButtonsActions.d.ts +7 -0
- package/dist/esm/store/search-buttons/SearchButtonsActions.js +1 -1
- package/dist/esm/store/search-buttons/SearchButtonsFactory.d.ts +2 -2
- package/dist/esm/store/search-buttons/SearchButtonsFactory.js +1 -1
- package/dist/esm/store/search-buttons/SearchButtonsFilters.d.ts +2 -2
- package/dist/esm/store/search-buttons/SearchButtonsFilters.js +1 -1
- package/dist/esm/store/search-buttons/constants.d.ts +0 -3
- package/dist/esm/store/search-buttons/constants.js +1 -1
- package/dist/esm/store/search-buttons/utils.d.ts +23 -2
- package/dist/esm/store/search-buttons/utils.js +1 -1
- package/dist/esm/store/types.d.ts +5 -0
- package/dist/esm/test/store-harness.js +1 -1
- package/dist/esm/utils/filter-groups.d.ts +9 -0
- package/dist/esm/utils/filter-groups.js +1 -0
- package/package.json +10 -10
|
@@ -1 +1 @@
|
|
|
1
|
-
import
|
|
1
|
+
import d from"../../data";import{getContrastTextColor as S}from"../../utils/getContrastTextColor";import{tIfExists as B}from"../../utils/i18n";import{BUTTON_ICONS as a,PREFIXES as p,SearchButtonType as n}from"./constants";import{countScopedCategories as C,deriveSearchButtonId as c,getScopeCategoryIds as T}from"./utils";export class SearchButtonsFactory{constructor(t,e,o){this.rootStore=t,this.state=e,this.actions=o,this.buttonFactories={[n.BOOKMARKS]:r=>this.createBookmarksButton(r),[n.VISITED]:r=>this.createVisitedButton(r),[n.CATEGORIES]:r=>this.createCategoriesButton(r),[n.SESSIONS]:r=>this.createSessionsButton(r),[n.TOURS]:r=>this.createGuidedToursButton(r),[n.POI_TYPE]:r=>this.createPoiTypeButton(r),[n.POI_TYPES]:r=>this.createPoiTypesButton(r),[n.LINK]:r=>this.createLinkButton(r),[n.EXHIBITORS]:r=>this.createExhibitorsButton(r)}}createButtons(t){return this.dedupeButtons(t).filter(e=>e.visible).map(e=>({button:this.createButton(e),order:e.order??Number.MAX_SAFE_INTEGER})).filter(e=>e.button!==null).sort((e,o)=>e.order-o.order).map(e=>e.button)}createButton(t){const e=this.buttonFactories[t.type];return e?e(t):null}createBaseButton(t){const e=t.color&&t.color.toUpperCase()!=="#FFFFFF",o=B(t.name);return{id:c(t),label:o,text:o,enabled:!0,isDimmed:!1,isClickable:!0,backgroundColor:e?t.color:void 0,textColor:e&&t.color?S(t.color):void 0}}createBookmarksButton(t){const{uiState:e}=this.rootStore;return e.kiosk||e.disableBookmarked||d.hideBookmarks?null:{...this.createBaseButton(t),id:n.BOOKMARKS,icon:a.BOOKMARKS,active:e.list.type==="bookmarks",count:this.countBookmarks(),onClick:()=>this.actions.handleSearchButtonClick(n.BOOKMARKS,t.name)}}createVisitedButton(t){const{uiState:e}=this.rootStore;return e.kiosk?null:{...this.createBaseButton(t),id:n.VISITED,icon:a.VISITED,active:e.list.type==="visited",count:this.countVisited(),onClick:()=>this.actions.handleSearchButtonClick(n.VISITED,t.name)}}createCategoriesButton(t){if(!t.children?.length){const l=this.getCategoriesTotalCount();return l>0?this.createSimpleCategoriesButton(t,l):null}const e=C(this.rootStore.categoryStore.categories,T(t));if(e===0)return null;const o=c(t),{categoryFilterStore:r,uiState:s}=this.rootStore,u=r.scopeButtonId===o?s.selectedCategoryFilters.length:0,h=this.isModalOpenFor(o);return{...this.createBaseButton(t),id:o,active:u>0||h,expanded:h,count:u>0?u:e,showZeroCount:!0,variant:"action",onClick:()=>this.actions.handleExtendedSearchButtonClick(o)}}createSimpleCategoriesButton(t,e){const{categoryFilterStore:o,uiState:r}=this.rootStore,i=o.scopeButtonId===null?r.selectedCategoryFilters.length:0,u=i>0?i:e;return{...this.createBaseButton(t),id:n.CATEGORIES,active:i>0&&!this.state.searchShortcutState.activeParentId,expanded:this.isModalOpenFor(null),count:u,showZeroCount:!0,variant:"action",onClick:()=>this.actions.handleSearchButtonClick(n.CATEGORIES,t.name)}}isModalOpenFor(t){const{categoryFilterStore:e}=this.rootStore;return e.state.isOpen&&e.viewScope?.buttonId===t}createSessionsButton(t){const{uiState:e}=this.rootStore,o=this.getSessionsTotalCount();return o===0?null:{...this.createBaseButton(t),id:n.SESSIONS,icon:a.SESSIONS,active:e.list.type==="sessions",count:o,showZeroCount:!0,hasSubButtons:!0,onClick:()=>this.actions.handleSessionsClick(t.name)}}createGuidedToursButton(t){const{uiState:e}=this.rootStore,o=this.getGuidedToursTotalCount();return o===0?null:{...this.createBaseButton(t),id:"guided_tours",active:e.list.type==="tours"||e.list.type==="multi-point-tour",count:o,showZeroCount:!0,onClick:()=>this.actions.handleSearchButtonClick("guided_tours",t.name)}}createPoiTypeButton(t){const e=this.rootStore.poiTypeStore.poiTypes.find(s=>s.name===t.name);if(!e)return null;const o=`${p.POI_TYPE}${e.id}`,r=this.getPoiTypeTotalCount(e.id);return r===0?null:{...this.createBaseButton(t),id:o,active:this.state.activePoiFilterId===o,count:r,showZeroCount:!0,onClick:()=>this.actions.handleSearchButtonClick(o,t.name)}}createPoiTypesButton(t){if(!t.children?.length)return this.createPoiTypeButton(t);const e=t.children.filter(i=>i.visible);if(e.length===0)return null;if(this.shouldFlattenToSinglePoiType(e,t))return this.createPoiTypeButton(t);const o=e.filter(i=>i.type!=="link"),r=this.countPoiTypes(o),s=c(t);return{...this.createBaseButton(t),id:s,active:this.state.searchShortcutState.activeParentId===s,count:r,showZeroCount:!0,onClick:()=>this.actions.handleExtendedSearchButtonClick(s)}}shouldFlattenToSinglePoiType(t,e){return t.length===1&&t[0].type==="poi_types"&&t[0].name===e.name}createLinkButton(t){const e=c(t);return{...this.createBaseButton(t),id:e,active:!1,onClick:()=>this.actions.handleExtendedSearchButtonClick(e)}}createExhibitorsButton(t){const{uiState:e}=this.rootStore,o=this.getExhibitorsTotalCount();return o===0?null:{...this.createBaseButton(t),id:n.EXHIBITORS,icon:a.EXHIBITORS,active:e.list.type==="exhibitors",count:o,showZeroCount:!0,onClick:()=>this.actions.handleSearchButtonClick(n.EXHIBITORS,t.name)}}countPoiTypes(t){return t.reduce((e,o)=>{if(o.type!=="poi_types")return e;if(o.count!==void 0)return e+o.count;const r=Number(o.id),s=this.rootStore.poiTypeStore.poiTypes.find(i=>i.id===r);if(s){const i=this.rootStore.boothStore.booths.filter(u=>u.poiTypeId===s.id).length;return e+i}return e},0)}dedupeButtons(t){const e=new Set;return t.filter(o=>{const r=`${o.type}_${o.name}`;return e.has(r)?!1:(e.add(r),!0)})}countBookmarks(){return this.rootStore.exhibitorStore.bookmarked.length+this.rootStore.eventStore.bookmarked.length+this.rootStore.speakerStore.bookmarked.length+this.rootStore.boothStore.booths.filter(t=>t.exhibitors.length===0&&t.bookmarkedDirectly).length}countVisited(){return this.rootStore.exhibitorStore.visited.length+this.rootStore.eventStore.visited.length}getSessionsTotalCount(){return this.rootStore.eventStore.eventItems.length}getGuidedToursTotalCount(){return this.rootStore.toursStore.hasTours?this.rootStore.toursStore.tourItems.length:0}getCategoriesTotalCount(){return this.rootStore.categoryStore.categories.filter(t=>t.exhibitors.length>0).length}getPoiTypeTotalCount(t){return this.rootStore.boothStore.booths.filter(e=>e.poiTypeId===t).length}getExhibitorsTotalCount(){return this.rootStore.exhibitorStore.exhibitors.length}}
|
|
@@ -14,7 +14,7 @@ export declare class SearchButtonsFilters {
|
|
|
14
14
|
getActiveParent(): SearchButtonTypeConfig | null;
|
|
15
15
|
areAllSelected(): boolean;
|
|
16
16
|
getChildrenCount(): number;
|
|
17
|
-
private
|
|
18
|
-
private
|
|
17
|
+
private collectPoiTypes;
|
|
18
|
+
private collectSelectedPoiTypes;
|
|
19
19
|
}
|
|
20
20
|
//# sourceMappingURL=SearchButtonsFilters.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__decorate as
|
|
1
|
+
import{__decorate as o}from"tslib";import{action as s}from"mobx";import{getButtonConfig as a}from"./utils";export class SearchButtonsFilters{constructor(t,r){this.rootStore=t,this.state=r}applyAllChildrenFilters(t){if(!t.children)return;const{uiState:r}=this.rootStore,e=t.children.filter(i=>i.visible);r.selectedPoiTypeFilters=this.collectPoiTypes(e),this.rootStore.categoryFilterStore.clearSelection()}applyChildFilters(){const{uiState:t}=this.rootStore,r=Array.from(this.state.searchShortcutState.activeChildren);if(t.selectedPoiTypeFilters=[],this.rootStore.categoryFilterStore.clearSelection(),r.length===0)return;const e=a(this.state.searchShortcutState.activeParentId);if(!e?.children)return;const i=e.children.filter(l=>l.visible);t.selectedPoiTypeFilters=this.collectSelectedPoiTypes(i,r)}clearAllChildFilters(){this.state.clearChildren(),this.rootStore.uiState.selectedPoiTypeFilters=[],this.rootStore.categoryFilterStore.clearSelection()}clearCategoryFilters(){this.rootStore.categoryFilterStore.clearSelection(),this.rootStore.urlFilterManager.setCategories([])}clearPoiTypeFilters(){this.state.setPoiFilter(null),this.rootStore.uiState.selectedPoiTypeFilters=[],this.rootStore.urlFilterManager.setPoiType(null)}toggleChildFilter(t){const r=a(this.state.searchShortcutState.activeParentId);r?.children&&(this.state.toggleChild(t),this.state.hasActiveChildren?this.applyChildFilters():this.applyAllChildrenFilters(r))}getActiveParent(){return this.state.searchShortcutState.activeParentId?a(this.state.searchShortcutState.activeParentId):null}areAllSelected(){if(!this.state.searchShortcutState.activeParentId)return!1;const t=a(this.state.searchShortcutState.activeParentId);if(!t?.children)return!1;const e=t.children.filter(i=>i.visible).filter(i=>i.type!=="link");return e.length>0&&e.every(i=>{const l=i.id?.toString()||i.name;return this.state.isChildActive(l)})}getChildrenCount(){if(!this.state.searchShortcutState.activeParentId)return 0;const t=a(this.state.searchShortcutState.activeParentId);return t?.children?t.children.filter(e=>e.visible).filter(e=>e.type!=="link").length:0}collectPoiTypes(t){const r=[];return t.forEach(e=>{if(e.type!=="poi_types")return;const i=this.rootStore.poiTypeStore.poiTypes.find(l=>l.id===Number(e.id));i&&r.push(i)}),r}collectSelectedPoiTypes(t,r){const e=[];return r.forEach(i=>{const l=t.find(n=>n.type==="link"?!1:(n.id?.toString()||n.name)===i);if(l?.type!=="poi_types")return;const c=this.rootStore.poiTypeStore.poiTypes.find(n=>n.id===Number(l.id));c&&e.push(c)}),e}}o([s],SearchButtonsFilters.prototype,"applyAllChildrenFilters",null),o([s],SearchButtonsFilters.prototype,"applyChildFilters",null),o([s],SearchButtonsFilters.prototype,"clearAllChildFilters",null),o([s],SearchButtonsFilters.prototype,"clearCategoryFilters",null),o([s],SearchButtonsFilters.prototype,"clearPoiTypeFilters",null),o([s],SearchButtonsFilters.prototype,"toggleChildFilter",null);
|
|
@@ -11,9 +11,6 @@ export declare enum SearchButtonType {
|
|
|
11
11
|
}
|
|
12
12
|
export declare const PREFIXES: {
|
|
13
13
|
readonly POI_TYPE: 'poiType_';
|
|
14
|
-
readonly CATEGORIES: 'categories_';
|
|
15
|
-
readonly POI_TYPES: 'poi_types_';
|
|
16
|
-
readonly LINK: 'link_';
|
|
17
14
|
};
|
|
18
15
|
export declare const BUTTON_ICONS: {
|
|
19
16
|
readonly BOOKMARKS: 'icon-bookmark';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export var SearchButtonType;(function(i){i.BOOKMARKS="bookmarks",i.VISITED="visited",i.SESSIONS="sessions",i.TOURS="guided_tours",i.CATEGORIES="categories",i.POI_TYPE="poi_type",i.POI_TYPES="poi_types",i.LINK="link",i.EXHIBITORS="exhibitors"})(SearchButtonType||(SearchButtonType={}));export const PREFIXES={POI_TYPE:"poiType_"
|
|
1
|
+
export var SearchButtonType;(function(i){i.BOOKMARKS="bookmarks",i.VISITED="visited",i.SESSIONS="sessions",i.TOURS="guided_tours",i.CATEGORIES="categories",i.POI_TYPE="poi_type",i.POI_TYPES="poi_types",i.LINK="link",i.EXHIBITORS="exhibitors"})(SearchButtonType||(SearchButtonType={}));export const PREFIXES={POI_TYPE:"poiType_"},BUTTON_ICONS={BOOKMARKS:"icon-bookmark",VISITED:"icon-checkmark",SESSIONS:"icon-schedule",EXHIBITORS:"icon-exhibitors"};
|
|
@@ -1,6 +1,27 @@
|
|
|
1
1
|
import { type SearchButtonTypeConfig } from '../types';
|
|
2
2
|
export declare function extractPoiTypeId(filterId: string): number | null;
|
|
3
|
+
/**
|
|
4
|
+
* The id of a configured search button — the platform's own `id` when it sends
|
|
5
|
+
* one, otherwise `<type>_<name>`. The single formula: the factory that builds a
|
|
6
|
+
* button and every lookup that resolves one back (the click handler, the URL's
|
|
7
|
+
* `filters[searchButton]` owner) must agree, or a button whose `id` the platform
|
|
8
|
+
* omitted — most of them — resolves to nothing and its click silently does
|
|
9
|
+
* nothing.
|
|
10
|
+
*/
|
|
11
|
+
export declare function deriveSearchButtonId(config: SearchButtonTypeConfig): string;
|
|
3
12
|
export declare function getButtonConfig(buttonId: string): SearchButtonTypeConfig | null;
|
|
4
|
-
export declare function
|
|
5
|
-
|
|
13
|
+
export declare function getScopeCategoryIds(config: SearchButtonTypeConfig): number[];
|
|
14
|
+
/**
|
|
15
|
+
* How many of a custom button's scoped categories the category modal will
|
|
16
|
+
* actually draw. `CategoryFilterModal` skips a category with no exhibitors, and
|
|
17
|
+
* a configured child id may name no catalog category at all — counting the raw
|
|
18
|
+
* `children` promised a badge the modal could not fill, and was not the
|
|
19
|
+
* consistency with the built-in button's count it claimed to be.
|
|
20
|
+
*/
|
|
21
|
+
export declare function countScopedCategories(categories: readonly {
|
|
22
|
+
id: number;
|
|
23
|
+
exhibitors: readonly unknown[];
|
|
24
|
+
}[], scopeIds: readonly number[]): number;
|
|
25
|
+
export declare function countMapValues(map: Map<unknown, number>): number;
|
|
26
|
+
export declare function isValidConfig(config: unknown): boolean;
|
|
6
27
|
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import
|
|
1
|
+
import o from"../../data";import{PREFIXES as u}from"./constants";export function extractPoiTypeId(t){try{const e=t.replace(u.POI_TYPE,""),r=parseInt(e,10);return isNaN(r)?null:r}catch{return null}}export function deriveSearchButtonId(t){return t.id||`${t.type}_${t.name}`}export function getButtonConfig(t){const e=o.filterButtonsConfig;return!e?.searchButtons||!Array.isArray(e.searchButtons)?null:e.searchButtons.find(n=>deriveSearchButtonId(n)===t)||null}export function getScopeCategoryIds(t){return(t.children??[]).filter(e=>e.visible===!0&&e.type==="categories").map(e=>Number(e.id)).filter(e=>Number.isFinite(e))}export function countScopedCategories(t,e){return t.filter(r=>e.includes(r.id)&&r.exhibitors.length>0).length}export function countMapValues(t){let e=0;for(const r of t.values())e+=r;return e}export function isValidConfig(t){return!!t&&typeof t=="object"&&Array.isArray(t.searchButtons)&&t.searchButtons.length>0}
|
|
@@ -93,6 +93,7 @@ export interface URLFilters {
|
|
|
93
93
|
poiType: string | null;
|
|
94
94
|
poiTypes: string[];
|
|
95
95
|
exhibitors: boolean;
|
|
96
|
+
searchButton: string | null;
|
|
96
97
|
}
|
|
97
98
|
export interface TourItem {
|
|
98
99
|
id: string;
|
|
@@ -167,6 +168,10 @@ export interface SearchButtonConfig {
|
|
|
167
168
|
enabled: boolean;
|
|
168
169
|
active: boolean;
|
|
169
170
|
count?: number;
|
|
171
|
+
/** `'action'` draws a chevron: the click opens a modal instead of toggling a filter in place. */
|
|
172
|
+
variant?: 'toggle' | 'action';
|
|
173
|
+
/** Whether an `'action'` button's modal is open right now — its `aria-expanded`. */
|
|
174
|
+
expanded?: boolean;
|
|
170
175
|
modalComponent?: React.ComponentType;
|
|
171
176
|
isDimmed?: boolean;
|
|
172
177
|
isClickable?: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{setConfig as
|
|
1
|
+
import{setConfig as w}from"@expofp/config";import{vi as e}from"vitest";let c={};async function S(r={}){g();const{default:o}=await import("../store/UIState.js"),n={fp:{},...r};return n.uiState=c=new o(n),n}export async function createUIState(r={}){return(await S(r)).uiState}export async function createRouteStore(r={}){const o=await S({fp:{},moveToList:e.fn(),showMap:e.fn(),layerStore:{layers:[],updateVisibility:e.fn(),findLayer:e.fn(()=>null)},...r}),{default:n,Route:t}=await import("../store/RouteStore.js"),a=new n(o);return o.routeStore=a,{routeStore:a,uiState:o.uiState,rootStore:o,Route:t}}export async function createSearchButtonsStore(r={}){const{routeStore:o,uiState:n,rootStore:t,Route:a}=await createRouteStore({fp:{hidePathways:e.fn(),getOptimizedRoutes:()=>[]},boothStore:{booths:[]},poiTypeStore:{poiTypes:[]},searchStore:{selectSearchAndFocus:e.fn(),setFocused:e.fn()},...r}),{default:f}=await import("../store/CategoryFilterStore.js"),{default:l}=await import("../store/RoutePlannerStore.js"),{URLFilterManager:p}=await import("../services/URLFilterManager.js"),{default:d}=await import("../store/search-buttons/SearchButtonsStore.js");t.categoryFilterStore=new f(t);const s=new l(t);t.routePlannerStore=s;const i=new d(t);t.searchButtonsStore=i;const u=new p(t);return t.urlFilterManager=u,{searchButtonsStore:i,routePlannerStore:s,routeStore:o,urlFilterManager:u,uiState:n,rootStore:t,Route:a}}function g(){window.__efpEvent="demo",HTMLCanvasElement.prototype.getContext=(()=>new Proxy({},{get:()=>()=>{}})),e.doMock("../store/index.js",()=>({get uiState(){return c}})),e.doMock("../data/svg.js",()=>({svgArea:()=>null,svgAreaExplicit:()=>null,getLayerSvg:()=>document.createElementNS("http://www.w3.org/2000/svg","svg")})),e.doMock("../tools/gtag.js",()=>({hasUserConsent:()=>!1,sendEventToGa:e.fn(),GaEventActions:{}})),w({expo:"demo",fpSvgJsRef:{},fpSvgLayerJsRefs:{}})}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { FilterGroup } from '../store/types.js';
|
|
2
|
+
/**
|
|
3
|
+
* Narrows filter groups to a text query. A group survives either because its own name
|
|
4
|
+
* matches — `CategoryFilterModal` splits `"Food/Beverages"` into the group `Food` plus
|
|
5
|
+
* the item `Beverages`, so matching items alone would never find `"food"` — or because
|
|
6
|
+
* some of its items match, in which case only those items remain.
|
|
7
|
+
*/
|
|
8
|
+
export declare const filterGroups: (groups: FilterGroup[], query: string) => FilterGroup[];
|
|
9
|
+
//# sourceMappingURL=filter-groups.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const filterGroups=(r,n)=>{const t=n.trim().toLowerCase();if(!t)return r;const o=[];for(const e of r){if(e.groupName.toLowerCase().includes(t)){o.push(e);continue}const s=e.items.filter(i=>i.name.toLowerCase().includes(t));s.length>0&&o.push({...e,items:s})}return o};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@expofp/floorplan",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.47.0",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "https://github.com/expofp/efp-app.git",
|
|
@@ -69,15 +69,15 @@
|
|
|
69
69
|
"tslib": "^2.3.0",
|
|
70
70
|
"uuid": "^9.0.1",
|
|
71
71
|
"zod": "4.4.3",
|
|
72
|
-
"@expofp/config": "3.
|
|
73
|
-
"@expofp/debug": "3.
|
|
74
|
-
"@expofp/geometry": "3.
|
|
75
|
-
"@expofp/renderer": "3.
|
|
76
|
-
"@expofp/resolve": "3.
|
|
77
|
-
"@expofp/schema": "3.
|
|
78
|
-
"@expofp/ui": "3.
|
|
79
|
-
"@expofp/utils": "3.
|
|
80
|
-
"@expofp/wayfinding": "3.
|
|
72
|
+
"@expofp/config": "3.47.0",
|
|
73
|
+
"@expofp/debug": "3.47.0",
|
|
74
|
+
"@expofp/geometry": "3.47.0",
|
|
75
|
+
"@expofp/renderer": "3.47.0",
|
|
76
|
+
"@expofp/resolve": "3.47.0",
|
|
77
|
+
"@expofp/schema": "3.47.0",
|
|
78
|
+
"@expofp/ui": "3.47.0",
|
|
79
|
+
"@expofp/utils": "3.47.0",
|
|
80
|
+
"@expofp/wayfinding": "3.47.0"
|
|
81
81
|
},
|
|
82
82
|
"devDependencies": {
|
|
83
83
|
"@babel/plugin-proposal-decorators": "^8.0.2",
|