UNPKG

@expofp/floorplan

Version:

Interactive floor plan library for expos and events

27 lines • 1.54 kB
import { type SearchButtonTypeConfig } from '../types'; export declare function extractPoiTypeId(filterId: string): number | null; /** * The id of a configured search button — the platform's own `id` when it sends * one, otherwise `<type>_<name>`. The single formula: the factory that builds a * button and every lookup that resolves one back (the click handler, the URL's * `filters[searchButton]` owner) must agree, or a button whose `id` the platform * omitted — most of them — resolves to nothing and its click silently does * nothing. */ export declare function deriveSearchButtonId(config: SearchButtonTypeConfig): string; export declare function getButtonConfig(buttonId: string): SearchButtonTypeConfig | null; export declare function getScopeCategoryIds(config: SearchButtonTypeConfig): number[]; /** * How many of a custom button's scoped categories the category modal will * actually draw. `CategoryFilterModal` skips a category with no exhibitors, and * a configured child id may name no catalog category at all — counting the raw * `children` promised a badge the modal could not fill, and was not the * consistency with the built-in button's count it claimed to be. */ export declare function countScopedCategories(categories: readonly { id: number; exhibitors: readonly unknown[]; }[], scopeIds: readonly number[]): number; export declare function countMapValues(map: Map<unknown, number>): number; export declare function isValidConfig(config: unknown): boolean; //# sourceMappingURL=utils.d.ts.map