UNPKG

amis-model-design

Version:

amis模型设计器

65 lines (64 loc) 2.02 kB
import { JSONQLWhereConditionOP, JSONQLWhereCondition } from '../jsonql'; import { type OperatorType } from 'amis'; export type ConditionBuilderOp = Exclude<OperatorType, { label: string; value: string; }>; export type FilterOP = 'eq' | 'ne' | 'gt' | 'ge' | 'lt' | 'le' | 'like' | 'sw' | 'ew' | 'bt' | 'in'; /** ConditionBuilder的条件转JSONQL条件 */ export declare const ConditionBuilderOp2JSONQL: any; export declare const ConditionBuilderOpMapping: Record<FilterOP | 'is_empty' | 'is_not_empty', ConditionBuilderOp>; export declare class FilterUtils { static optionEqual: { label: string; value: string; }; static optionNotEqual: { label: string; value: string; }; static optionGreatThan: { label: string; value: string; }; static optionGreatThanOrEqual: { label: string; value: string; }; static optionLessThan: { label: string; value: string; }; static optionLessThanOrEqual: { label: string; value: string; }; static optionLike: { label: string; value: string; }; static optionStartWith: { label: string; value: string; }; static optionEndWith: { label: string; value: string; }; static optionBetween: { label: string; value: string; }; static optionIn: { label: string; value: string; }; static getOptionLabel(value: string): string | undefined; static filterOPToJsonQLWhereOp(op: FilterOP): JSONQLWhereConditionOP; static filterOpToConditionBuilderOp(op: FilterOP): ConditionBuilderOp; static ConditonBuilder2JSONQLWhere(filters: any, expressions: Record<string, any>): JSONQLWhereCondition | undefined; /** * 根据字段指定的filter op,对jsonql中的右值进行写法转换,因为jsonql的op和字段的op不一致 */ static opValueToJsonQLRight: (op: FilterOP, queryKey: string) => string; }