UNPKG

react-querybuilder

Version:

React Query Builder component for constructing queries and filters, with utilities for executing them in various database and evaluation contexts

33 lines (32 loc) 3.31 kB
import type { DefaultCombinatorName, DefaultOperatorName } from "../../types/index.noReact"; import type { CELBooleanLiteral, CELBytesLiteral, CELConditionalAnd, CELConditionalOr, CELExpression, CELExpressionGroup, CELIdentifier, CELLikeExpression, CELList, CELLiteral, CELMap, CELMember, CELMemberIdentifierChain, CELMemberNegatedIdentifier, CELMemberNegatedIdentifierChain, CELNegatedLikeExpression, CELNegation, CELNullLiteral, CELNumericLiteral, CELRelation, CELRelop, CELStringLiteral } from "./types"; export declare const isCELExpressionGroup: (expr: CELExpression) => expr is CELExpressionGroup; export declare const isCELConditionalAnd: (expr: CELExpression) => expr is CELConditionalAnd; export declare const isCELConditionalOr: (expr: CELExpression) => expr is CELConditionalOr; export declare const isCELStringLiteral: (expr: CELExpression) => expr is CELStringLiteral; export declare const isCELLiteral: (expr: CELExpression) => expr is CELLiteral; export declare const isCELNumericLiteral: (expr: CELExpression) => expr is CELNumericLiteral; export declare const isCELRelation: (expr: CELExpression) => expr is CELRelation; export declare const isCELList: (expr: CELExpression) => expr is CELList; export declare const isCELMap: (expr: CELExpression) => expr is CELMap; export declare const isCELIdentifier: (expr: CELExpression) => expr is CELIdentifier; export declare const isCELNegation: (expr: CELExpression) => expr is CELNegation; export declare const isCELMember: (expr: CELExpression) => expr is CELMember; export declare const isCELIdentifierOrChain: (expr: CELExpression) => expr is CELMemberIdentifierChain | CELIdentifier; export declare const isCELNegatedIdentifier: (expr: CELExpression) => expr is CELMemberNegatedIdentifier; export declare const isCELNegatedIdentifierOrChain: (expr: CELExpression) => expr is CELMemberNegatedIdentifierChain | CELMemberNegatedIdentifier; export declare const isCELLikeExpression: (expr: CELExpression) => expr is CELLikeExpression; export declare const isCELNegatedLikeExpression: (expr: CELExpression) => expr is CELNegatedLikeExpression; export declare const getIdentifierFromChain: (expr: CELIdentifier | CELMemberIdentifierChain) => string; export declare const getIdentifierFromNegatedChain: (expr: CELMemberNegatedIdentifier | CELMemberNegatedIdentifierChain) => string; declare function evalCELLiteralValue(literal: CELStringLiteral): string; declare function evalCELLiteralValue(literal: CELBooleanLiteral): boolean; declare function evalCELLiteralValue(literal: CELNumericLiteral): number | null; declare function evalCELLiteralValue(literal: CELBytesLiteral): null; declare function evalCELLiteralValue(literal: CELNullLiteral): null; declare function evalCELLiteralValue(literal: CELLiteral): string | boolean | number | null; export declare const normalizeCombinator: (c: "&&" | "||") => DefaultCombinatorName; export declare const normalizeOperator: (op: CELRelop, flip?: boolean) => DefaultOperatorName; export declare const generateFlatAndOrList: (expr: CELConditionalAnd | CELConditionalOr) => (DefaultCombinatorName | CELExpression)[]; export declare const generateMixedAndOrList: (expr: CELConditionalAnd | CELConditionalOr) => (DefaultCombinatorName | CELExpression | ("and" | CELExpression)[])[]; export { evalCELLiteralValue };