UNPKG

@expofp/floorplan

Version:

Interactive floor plan library for expos and events

73 lines • 3.21 kB
import type RootStore from '../RootStore'; import type { SearchButtonConfig, SearchButtonTypeConfig, SearchShortcutState, SearchSubButtonConfig } from '../types'; export default class SearchButtonsStore { private readonly rootStore; private _subButtonRegistry?; private readonly state; private readonly filters; private readonly actions; private readonly factory; private poiTypeCountsCache; /** Set by `keepFiltersOnNextNavigation`, spent by the next entry into navigation. */ private keepFiltersOnNextEntry; private lastPoiTypeCountUpdate; constructor(rootStore: RootStore); private setupReactions; /** * Lets the next entry into navigation keep the active filter. For a deep * link that opens with both a filter and a route or planner: that is not a * switch into navigation, so its filter stays. Call it only right before * opening navigation that is sure to land, or the hold outlives it and * spares the user's own next entry. */ keepFiltersOnNextNavigation(): void; /** * Navigation is the route planner or the directions panel. The planner opens * before its route is drawn, so a planner session counts as one entry. */ private get isNavigationOpen(); private get subButtonRegistry(); private registerSubButtonProviders; private invalidatePoiTypeCounts; get isVisible(): boolean; get shouldShow(): boolean; get activePoiFilterId(): string | null; get activeSubButtonsParentId(): string | null; get activeSubButtonId(): string | null; get subButtonsEnabled(): boolean; get searchShortcutState(): SearchShortcutState; get searchButtons(): SearchButtonConfig[]; get hasAnySearchButtons(): boolean; get hasActiveSearchButton(): boolean; get activeSearchButtonLabel(): string | null; get activeSubButtons(): SearchSubButtonConfig[]; get shouldShowSubButtons(): boolean; get hasActiveParentWithChildren(): boolean; get areAllSelected(): boolean; get activeChildrenCount(): number; get totalChildrenCount(): number; get poiTypeCounts(): Map<number, number>; get totalPoiTypeCount(): number; get activePoiTypeId(): number | null; handleSearchButtonClick(searchButtonId: string, caption?: string): void; handleExtendedSearchButtonClick(buttonId: string): void; handleMainButtonClick(buttonId: string): void; handleSessionsClick(caption?: string): void; togglePoiType(poiTypeId: number): void; clearAllFilters(): void; showSubButtons(parentButtonId: string): void; hideSubButtons(): void; handleSubButtonClick(subButtonId: string): void; toggleChildFilter(childId: string): void; clearPoiTypeFilters(): void; clearAllChildFilters(): void; setActiveParentId(parentId: string | null): void; showShortcuts(visible: boolean): void; clearChildren(): void; setSubButtonId(buttonId: string | null): void; setPoiFilterId(filterId: string | null): void; getPoiTypeTotalCount(poiTypeId: number): number; isChildActive(childId: string): boolean; getActiveParent(): SearchButtonTypeConfig | null; } //# sourceMappingURL=SearchButtonsStore.d.ts.map