import { type PanelComponent } from '@deephaven/dashboard'; import { type TypeValue as FilterTypeValue } from '@deephaven/filters'; export type LinkType = 'invalid' | 'filterSource' | 'tableLink' | 'chartLink'; export type LinkPoint = { panelId: string; columnName: string; columnType: string | null; }; export type LinkPointOptions = { /** * The type of link this point is associated with. * If this point is the end point of a link, this will set the type of the link. */ type: LinkType; }; export type Link = { start: LinkPoint; end?: LinkPoint; id: string; isReversed?: boolean; type: LinkType; operator?: FilterTypeValue; }; export type LinkColumn = { name: string; type: string | null; description?: string | null; }; export type LinkDataValue = { operator?: FilterTypeValue; text: string; value: T; startColumnIndex: number; }; export type LinkFilterMapValue = { columnType: string | null; filterList: LinkDataValue[]; }; export type LinkFilterMap = Map>; export type LinkerCoordinate = [number, number]; export type LinkableFromPanel = PanelComponent & { getCoordinateForColumn: (name: string) => LinkerCoordinate; }; export type LinkablePanel = LinkableFromPanel & { setFilterMap: (filterMap: LinkFilterMap) => void; unsetFilterValue: (name: string, type: string | null) => void; }; export declare function isLinkableFromPanel(panel: PanelComponent): panel is LinkableFromPanel; export declare function isLinkablePanel(panel: PanelComponent): panel is LinkablePanel; export declare function isLinkableColumn(column: LinkColumn): boolean; /** * Collection of utility functions for use with the Linker */ declare class LinkerUtils { /** * Retrieve the type of link given parameters. * @param start The link start * @param end The link end * @param isolatedLinkerPanelId Whether there's an isolated linker * @returns The type of link, or invalid if there's an error */ static isLinkValid(start: LinkPoint, end: LinkPoint, isolatedLinkerPanelId?: string | string[]): boolean; /** * Find column matching the link point * @param columns Columns to search in * @param linkPoint Link point to find column for * @param linkPoint.columnName Column name to find * @param linkPoint.columnType Column type to find * @returns Column matching the link point, undefined if not found */ static findColumn(columns: readonly LinkColumn[], { columnName, columnType }: LinkPoint): LinkColumn | undefined; /** * Clone links for a given panel id * @param links Original links array * @param panelId Original panel id * @param cloneId Cloned panel id * @returns Cloned links array or empty array if no new links added */ static cloneLinksForPanel(links: Link[], panelId: string | string[], cloneId: string): Link[]; } export default LinkerUtils; //# sourceMappingURL=LinkerUtils.d.ts.map