@expofp/floorplan
Version:
Interactive floor plan library for expos and events
51 lines • 1.81 kB
TypeScript
import Color from 'color';
import { type GaEventActions } from '../tools/gtag';
import { BoothBase } from './BoothStore';
import { Exhibitor } from './ExhibitorStore';
import { type ListItem } from './types';
export default class HeatmapStore {
heatmapData: HeatmapData;
/**
* A booth view parked for the next `selectedExhibitor` reaction: a click on
* a booth with a single exhibitor opens that exhibitor's card, but counts as
* a view of the BOOTH. `exhibitor` is the selection it stands in for — the
* reaction honours the entry for that selection only, so one left behind by
* a click that changed nothing cannot mislabel a later, unrelated view.
*/
forceTrack: {
action: GaEventActions;
label: string;
exhibitor: Exhibitor;
} | null;
get minAndMaxClicks(): {
min: number;
max: number;
};
getClicksByType(item: ListItem): number;
getClicksByItem(item: ListItem | BoothBase): number;
getTotalClicksByBooth(b: BoothBase): number;
getColorByClicks(clicks: number): string;
getHeatmapColorForBooth(booth: BoothBase): Color<string>;
}
export interface HeatmapData {
booths?: HeatmapItem[];
exhibitors?: HeatmapItem[];
yah?: HeatmapYah[];
}
export declare class HeatmapYah {
readonly id: number | string;
readonly name: string;
readonly viewCount: number;
readonly x: number;
readonly y: number;
readonly z?: number | string | undefined;
readonly entity: {
readonly type: 'heatmap-yah';
};
constructor(id: number | string, name: string, viewCount: number, x: number, y: number, z?: number | string | undefined);
}
export interface HeatmapItem {
id: number | string;
viewCount: number;
}
//# sourceMappingURL=HeatmapStore.d.ts.map