@expofp/floorplan
Version:
Interactive floor plan library for expos and events
62 lines • 2.87 kB
TypeScript
import type RootStore from '../RootStore';
import { type SearchButtonsFilters } from './SearchButtonsFilters';
import { type SearchButtonsState } from './SearchButtonsState';
export declare class SearchButtonsActions {
private rootStore;
private state;
private filters;
constructor(rootStore: RootStore, state: SearchButtonsState, filters: SearchButtonsFilters);
/**
* Reports a search-button click to stats. Called only from the branch of a
* handler that turns the button ON: the click that switches a filter off is
* not a view of it. Deriving that from the button's `active` prop instead
* would be wrong — `active` is a display flag whose meaning differs per
* button (for Categories it means "filters are applied", not "panel open"),
* so only the handler knows what its own click did.
*
* `caption` is the button's configured name, NOT the rendered label: the
* label is run through `tIfExists`, so reporting it would split one button
* into one analytics series per locale.
*/
private reportActivation;
handleSearchButtonClick(searchButtonId: string, caption?: string): void;
handleExtendedSearchButtonClick(buttonId: string): void;
handleMainButtonClick(buttonId: string): void;
handleSessionsClick(caption?: string): void;
togglePoiType(poiTypeId: number): void;
clearAllFilters(): void;
/**
* Turns the active search button off when navigation opens, so its pins do
* not crowd the route. Unlike `clearAllFilters` it leaves the panel, the
* list and the details alone (they now show the navigation) and keeps
* pathways, which belong to tours, not to search buttons.
*/
deactivateForNavigation(): void;
showSubButtons(parentButtonId: string): void;
hideSubButtons(): void;
handleSubButtonClick(subButtonId: string): void;
private toggleListView;
private handleBookmarksClick;
private handleVisitedClick;
private handleToursClick;
/**
* Opens the category modal. Without a scope it is the built-in Categories
* button — the whole catalog; with one, the custom `type: 'categories'` button
* that narrows the modal to its own children. Either takes the selection over
* only on Apply. Getting there is identical either way: leave whatever other
* filter is on, then open.
*/
private handleCategoriesClick;
private handleExhibitorsClick;
private handlePoiTypeClick;
private handleLinkClick;
private handleParentButton;
private preserveSearchText;
private switchToSearch;
private resetAllFilters;
/** Turns off the active search button and every filter it applied, URL included. */
private clearActiveFilters;
private setPoiFilterFromString;
private get isMobile();
}
//# sourceMappingURL=SearchButtonsActions.d.ts.map