react-querybuilder
Version:
React Query Builder component for constructing queries and filters, with utilities for executing them in various database and evaluation contexts
31 lines (30 loc) • 852 B
text/typescript
import type { Path } from "./basic.mjs";
import type { Schema } from "./propsUsingReact.mjs";
import type { RuleType } from "./ruleGroups.mjs";
import type { RuleGroupTypeAny } from "./ruleGroupsIC.mjs";
export type DndDropTargetType = "rule" | "ruleGroup" | "inlineCombinator";
export type DraggedItem = (RuleType & {
path: Path
qbId: string
}) | (RuleGroupTypeAny & {
path: Path
qbId: string
});
export type DropEffect = "move" | "copy";
export interface DropResult {
path: Path;
type: DndDropTargetType;
dropEffect?: DropEffect;
qbId: string;
getQuery: Schema<any, any>["getQuery"];
dispatchQuery: Schema<any, any>["dispatchQuery"];
}
export interface DragCollection {
isDragging: boolean;
dragMonitorId: string | symbol;
}
export interface DropCollection {
isOver: boolean;
dropMonitorId: string | symbol;
dropEffect?: DropEffect;
}