import { LitElement, PropertyValues } from 'lit'; import type { RuleGroupType, QueryField, QueryBuilderSize } from './defs/types'; import './queryBuilderGroup'; import './queryBuilderRule'; /** * Query Builder component. * A visual query builder for constructing complex filter conditions. * * @fires on-query-change - Emits when the query changes. `detail: { query: RuleGroupType }` * @slot header - Slot for custom header content * * @example * ```html * console.log(e.detail.query)} * > * ``` */ export declare class QueryBuilder extends LitElement { static styles: import("lit").CSSResult; /** The query data structure */ accessor query: RuleGroupType; /** Available fields to query */ accessor fields: QueryField[]; /** Available combinators * @internal */ private get _combinators(); /** Show clone button on rules/groups */ accessor showCloneButtons: boolean; /** Show lock/disable button on rules/groups */ accessor showLockButtons: boolean; /** Maximum nesting depth (default: unlimited) */ accessor maxDepth: number; /** Disable drag-and-drop reordering */ accessor disableDragAndDrop: boolean; /** Disable the entire query builder */ accessor disabled: boolean; /** Size of all child components (buttons, inputs, dropdowns, datepickers) */ accessor size: QueryBuilderSize; /** * Minimum number of dropdown options before a search input is shown. * Applies to field, value, and multi-select dropdowns within rules. * When `0`, search is always shown. Default `25`. */ accessor searchThreshold: number; /** Text string customization for i18n. */ accessor textStrings: { and: string; or: string; removeGroup: string; cloneGroup: string; addRule: string; addGroup: string; lockGroup: string; unlockGroup: string; removeRule: string; cloneRule: string; lockRule: string; unlockRule: string; dragToReorder: string; selectField: string; selectOperator: string; value: string; selectValue: string; selectValues: string; selectDate: string; selectDateTime: string; selectTime: string; min: string; max: string; start: string; end: string; from: string; to: string; validationErrors: string; validationErrorCount: string; }; /** Internal query state for tracking changes * @internal */ accessor _internalQuery: RuleGroupType; /** Internal text strings. * @internal */ accessor _textStrings: { and: string; or: string; removeGroup: string; cloneGroup: string; addRule: string; addGroup: string; lockGroup: string; unlockGroup: string; removeRule: string; cloneRule: string; lockRule: string; unlockRule: string; dragToReorder: string; selectField: string; selectOperator: string; value: string; selectValue: string; selectValues: string; selectDate: string; selectDateTime: string; selectTime: string; min: string; max: string; start: string; end: string; from: string; to: string; validationErrors: string; validationErrorCount: string; }; willUpdate(changedProps: PropertyValues): void; render(): import("lit-html").TemplateResult<1>; private _renderValidationSummary; /** * Recursively collect all validation errors from the query tree */ private _collectValidationErrors; private _handleGroupChange; private _handleGroupLock; private _emitQueryChange; /** * get the current query */ getQuery(): RuleGroupType; /** * set the query programmatically */ setQuery(query: RuleGroupType): void; /** * reset the query to initial empty state */ resetQuery(): void; /** * handle drag-and-drop move events */ private _handleItemMove; /** * get a group at a specific path in the query tree */ private _getGroupAtPath; private _normalizeQuery; private _cloneQuery; private _getMaxGroupDepth; } declare global { interface HTMLElementTagNameMap { 'kyn-query-builder': QueryBuilder; } } //# sourceMappingURL=queryBuilder.d.ts.map