kodama-ui
Version:
Kodama UI is a Vue 3 component library that provides a set of components & funcionality to build your application.
59 lines (58 loc) • 1.6 kB
TypeScript
export type QueryFilterOperator = {
$eq?: string | number;
$neq?: string | number;
$gt?: number;
$lt?: number;
$gte?: number;
$lte?: number;
$in?: string | number | (string | number)[];
$nin?: string | number | (string | number)[];
$like?: string;
$from?: string | Date;
$to?: string | Date;
$null?: boolean;
};
export type QueryCondition = {
[key: string]: QueryFilterOperator;
};
export type QueryLogicalOperator = {
$and?: QueryFilter[];
$or?: QueryFilter[];
};
export type QueryFilter = QueryCondition | QueryLogicalOperator;
export type QueryOrder = Record<string, 'asc' | 'desc'>;
export type QueryParams = {
order: QueryOrder | null;
filter: QueryFilter | null;
limit: number;
strict: boolean;
};
type Query = Record<string, QueryParams>;
declare const _default: import("pinia").StoreDefinition<"query", {
queries: Query;
}, {
get: (state: {
queries: Query;
} & import("pinia").PiniaCustomStateProperties<{
queries: Query;
}>) => (view: string) => QueryParams;
}, {
clean(): void;
init(view: string, params?: Partial<QueryParams>): void;
order(view: string): {
set(field: string, value: 'asc' | 'desc'): void;
delete(field: string): boolean;
};
limit(view: string): {
set(value: number): void;
};
strict(view: string): {
set(value: boolean): void;
};
filter(view: string): {
reset(): void;
set(field: string, value: any): void;
delete(field: string): void;
};
}>;
export default _default;