import { LeafExpressionOperator, DataType } from '../../PredefinedConfig/Common/Enums'; import { Expression } from '../../PredefinedConfig/Common/Expression/Expression'; import { IColumn } from '../Interface/IColumn'; import { IAdaptableBlotter } from '../Interface/IAdaptableBlotter'; import { UserFilter } from '../../PredefinedConfig/RunTimeState/UserFilterState'; import { QueryRange } from '../../PredefinedConfig/Common/Expression/QueryRange'; import { NamedFilter } from '../../PredefinedConfig/RunTimeState/NamedFilterState'; export interface IRangeEvaluation { operand1: any; operand2: any; newValue: any; operator: LeafExpressionOperator; initialValue: any; columnId: string; } /** * This is the main Helper class dealing with Expressions (a.k.a. Queries) * This class allows you to create and evalute (i.e. see if they are satisfied) Expressions and represent them as strings */ export declare function CreateSingleColumnExpression(columnId: string, columnDisplayValues: Array, columnRawValues: Array, userFilters: Array, ranges: Array): Expression; export declare function ConvertExpressionToString(Expression: Expression, columns: Array, includeColumnName?: boolean): string; export declare function ConvertRangeToString(range: QueryRange, columns: IColumn[]): string; export declare function checkForExpression(Expression: Expression, identifierValue: any, columns: IColumn[], blotter: IAdaptableBlotter): boolean; export declare function checkForExpressionFromRecord(Expression: Expression, record: any, columns: IColumn[], blotter: IAdaptableBlotter): boolean; export declare function IsSatisfied(Expression: Expression, getColumnValue: (columnId: string) => any, getDisplayColumnValue: (columnId: string) => string, getOtherColumnValue: (columnId: string) => any, columnBlotterList: IColumn[], userFilters: UserFilter[], systemFilters: string[], namedFilters: NamedFilter[], blotter: IAdaptableBlotter, record?: any): boolean; export declare function OperatorToOneCharacterString(operator: LeafExpressionOperator): string; export declare function OperatorToShortFriendlyString(operator: LeafExpressionOperator): string; export declare function OperatorToLongFriendlyString(leafExpressionOperator: LeafExpressionOperator, dataType: DataType): string; export declare function GetOperatorsForDataType(dataType: DataType): LeafExpressionOperator[]; export declare function GetColumnListFromExpression(expression: Expression): Array; export declare function IsNullOrEmptyExpression(expression: Expression): boolean; export declare function IsEmptyExpression(expression: Expression): boolean; export declare function IsNotNullOrEmptyExpression(expression: Expression): boolean; export declare function IsNotEmptyExpression(expression: Expression): boolean; export declare function IsNotEmptyOrInvalidExpression(expression: Expression): boolean; export declare function IsNullOrEmptyOrValidExpression(expression: Expression): boolean; export declare function IsEmptyOrValidExpression(expression: Expression): boolean; export declare function IsExpressionValid(expression: Expression): boolean; export declare function IsEmptyRange(range: QueryRange): boolean; export declare function CreateEmptyExpression(): Expression; export declare function CreateEmptyRange(): QueryRange; export declare function GetRangeEvaluation(rangeExpression: QueryRange, newValue: any, initialValue: any, column: IColumn, blotter: IAdaptableBlotter, getOtherColumnValue: (columnId: string) => any): IRangeEvaluation; export declare function TestRangeEvaluation(rangeEvaluation: IRangeEvaluation, blotter: IAdaptableBlotter): boolean; export declare function ExpressionContainsFilter(expression: Expression, filter: UserFilter): boolean; export declare function OperatorRequiresValue(operator: LeafExpressionOperator): boolean; export declare function AddMissingProperties(expression: Expression): void; export declare const ExpressionHelper: { CreateSingleColumnExpression: typeof CreateSingleColumnExpression; ConvertExpressionToString: typeof ConvertExpressionToString; ConvertRangeToString: typeof ConvertRangeToString; checkForExpression: typeof checkForExpression; checkForExpressionFromRecord: typeof checkForExpressionFromRecord; IsSatisfied: typeof IsSatisfied; OperatorToOneCharacterString: typeof OperatorToOneCharacterString; OperatorToShortFriendlyString: typeof OperatorToShortFriendlyString; OperatorToLongFriendlyString: typeof OperatorToLongFriendlyString; GetOperatorsForDataType: typeof GetOperatorsForDataType; GetColumnListFromExpression: typeof GetColumnListFromExpression; IsNullOrEmptyExpression: typeof IsNullOrEmptyExpression; IsEmptyExpression: typeof IsEmptyExpression; IsNotNullOrEmptyExpression: typeof IsNotNullOrEmptyExpression; IsNotEmptyExpression: typeof IsNotEmptyExpression; IsNotEmptyOrInvalidExpression: typeof IsNotEmptyOrInvalidExpression; IsNullOrEmptyOrValidExpression: typeof IsNullOrEmptyOrValidExpression; IsEmptyOrValidExpression: typeof IsEmptyOrValidExpression; IsExpressionValid: typeof IsExpressionValid; IsEmptyRange: typeof IsEmptyRange; CreateEmptyExpression: typeof CreateEmptyExpression; CreateEmptyRange: typeof CreateEmptyRange; GetRangeEvaluation: typeof GetRangeEvaluation; TestRangeEvaluation: typeof TestRangeEvaluation; ExpressionContainsFilter: typeof ExpressionContainsFilter; OperatorRequiresValue: typeof OperatorRequiresValue; AddMissingProperties: typeof AddMissingProperties; }; export default ExpressionHelper;