@adaptabletools/adaptable-cjs
Version:
Powerful data-agnostic HTML5 AG Grid extension which provides advanced, cutting-edge functionality to meet all DataGrid requirements
69 lines (68 loc) • 2.75 kB
TypeScript
import * as React from 'react';
import { NamedQuery, CachedQuery } from '../../../AdaptableState/NamedQueryState';
/**
* Column item for the dropdown menu
*/
export interface ColumnItem {
/** Column identifier */
columnId: string;
/** Display label for the column */
label: string;
/** Callback when column is selected */
onClick: () => void;
}
/**
* Props for the GridFilterPopupUI component.
* This is a pure presentation component that receives all data and callbacks as props.
*/
export interface GridFilterPopupUIProps {
/** Current filter expression value */
expression: string;
/** Whether the current expression is valid */
isExpressionValid: boolean;
/** Whether the current expression matches a named query */
isExpressionNamedQuery: boolean;
/** Whether the grid filter is currently suspended */
isSuspended: boolean;
/** Whether the grid filter is read only */
isReadOnly: boolean;
/** Available columns for the dropdown menu */
availableColumns: ColumnItem[];
/** List of saved named queries */
namedQueries: NamedQuery[];
/** List of recently used cached queries */
cachedQueries: CachedQuery[];
/** Current grid filter expression (may differ from input expression) */
currentGridFilterExpression?: string;
/** Header text for the popup panel */
headerText: string;
/** Icon name for the popup panel */
glyphicon: string;
/** Help page URL for the info link */
infoLink?: string;
/** Whether the info link should be disabled */
infoLinkDisabled?: boolean;
/** Called when the expression input value changes */
onExpressionChange: (value: string) => void;
/** Called when the query should be executed */
onRunQuery: (expression?: string) => void;
/** Called when the clear button is clicked */
onClearQuery: () => void;
/** Called when the save button is clicked */
onSaveQuery: () => void;
/** Called when the suspend button is clicked */
onSuspend: () => void;
/** Called when the unsuspend/resume button is clicked */
onUnsuspend: () => void;
/** Called when the expand button is clicked */
onExpand: () => void;
/** Called when a named query is selected */
onSelectNamedQuery: (query: string) => void;
/** Called when setting the grid filter expression directly */
onSetGridFilterExpression: (query: string) => void;
/** Access level for grid filter operations */
gridFilterAccessLevel: 'ReadOnly' | 'Hidden' | 'Full';
/** Access level for named query operations */
namedQueryAccessLevel: 'ReadOnly' | 'Hidden' | 'Full';
}
export declare const GridFilterPopupUI: (props: GridFilterPopupUIProps) => React.JSX.Element;